aboutsummaryrefslogtreecommitdiffstats
path: root/grub-core
diff options
context:
space:
mode:
authorJames <james.mckenzie@citrix.com>2012-11-16 10:41:01 +0000
committerJames <james.mckenzie@citrix.com>2012-11-16 10:41:01 +0000
commit041d1ea37802bf7178a31a53f96c26efa6b8fb7b (patch)
treec193e84ad1237f25a79d0f6a267722e44c73f56a /grub-core
downloadgrub-1.99-041d1ea37802bf7178a31a53f96c26efa6b8fb7b.tar.gz
grub-1.99-041d1ea37802bf7178a31a53f96c26efa6b8fb7b.tar.bz2
grub-1.99-041d1ea37802bf7178a31a53f96c26efa6b8fb7b.zip
fish
Diffstat (limited to 'grub-core')
-rw-r--r--grub-core/Makefile.am351
-rw-r--r--grub-core/Makefile.core.am39086
-rw-r--r--grub-core/Makefile.core.def1520
-rw-r--r--grub-core/Makefile.gcry.def136
-rw-r--r--grub-core/Makefile.in57678
-rw-r--r--grub-core/boot/decompressor/minilib.c102
-rw-r--r--grub-core/boot/decompressor/none.c39
-rw-r--r--grub-core/boot/decompressor/xz.c60
-rw-r--r--grub-core/boot/i386/pc/boot.S481
-rw-r--r--grub-core/boot/i386/pc/cdboot.S173
-rw-r--r--grub-core/boot/i386/pc/diskboot.S380
-rw-r--r--grub-core/boot/i386/pc/lnxboot.S299
-rw-r--r--grub-core/boot/i386/pc/pxeboot.S42
-rw-r--r--grub-core/boot/i386/qemu/boot.S68
-rw-r--r--grub-core/boot/mips/startup_raw.S196
-rw-r--r--grub-core/boot/mips/yeeloong/fwstart.S632
-rw-r--r--grub-core/boot/sparc64/ieee1275/boot.S209
-rw-r--r--grub-core/boot/sparc64/ieee1275/diskboot.S146
-rw-r--r--grub-core/bus/bonito.c90
-rw-r--r--grub-core/bus/cs5536.c384
-rw-r--r--grub-core/bus/emu/pci.c77
-rw-r--r--grub-core/bus/pci.c137
-rw-r--r--grub-core/bus/usb/emu/usb.c203
-rw-r--r--grub-core/bus/usb/ohci.c1441
-rw-r--r--grub-core/bus/usb/serial/common.c134
-rw-r--r--grub-core/bus/usb/serial/ftdi.c207
-rw-r--r--grub-core/bus/usb/serial/pl2303.c220
-rw-r--r--grub-core/bus/usb/uhci.c816
-rw-r--r--grub-core/bus/usb/usb.c349
-rw-r--r--grub-core/bus/usb/usbhub.c559
-rw-r--r--grub-core/bus/usb/usbtrans.c413
-rw-r--r--grub-core/commands/acpi.c774
-rw-r--r--grub-core/commands/acpihalt.c332
-rw-r--r--grub-core/commands/blocklist.c122
-rw-r--r--grub-core/commands/boot.c198
-rw-r--r--grub-core/commands/cat.c104
-rw-r--r--grub-core/commands/cmp.c120
-rw-r--r--grub-core/commands/configfile.c98
-rw-r--r--grub-core/commands/date.c148
-rw-r--r--grub-core/commands/echo.c141
-rw-r--r--grub-core/commands/efi/acpi.c59
-rw-r--r--grub-core/commands/efi/fixvideo.c112
-rw-r--r--grub-core/commands/efi/loadbios.c220
-rw-r--r--grub-core/commands/efi/lsefimmap.c145
-rw-r--r--grub-core/commands/efi/lsefisystab.c110
-rw-r--r--grub-core/commands/efi/lssal.c165
-rw-r--r--grub-core/commands/extcmd.c118
-rw-r--r--grub-core/commands/gptsync.c258
-rw-r--r--grub-core/commands/halt.c48
-rw-r--r--grub-core/commands/hashsum.c300
-rw-r--r--grub-core/commands/hdparm.c422
-rw-r--r--grub-core/commands/help.c143
-rw-r--r--grub-core/commands/hexdump.c133
-rw-r--r--grub-core/commands/i386/cmostest.c92
-rw-r--r--grub-core/commands/i386/cpuid.c100
-rw-r--r--grub-core/commands/i386/pc/acpi.c81
-rw-r--r--grub-core/commands/i386/pc/drivemap.c422
-rw-r--r--grub-core/commands/i386/pc/drivemap_int13h.S110
-rw-r--r--grub-core/commands/i386/pc/halt.c127
-rw-r--r--grub-core/commands/i386/pc/lsapm.c115
-rw-r--r--grub-core/commands/i386/pc/play.c275
-rw-r--r--grub-core/commands/i386/pc/pxecmd.c54
-rw-r--r--grub-core/commands/i386/pc/sendkey.c385
-rw-r--r--grub-core/commands/ieee1275/suspend.c51
-rw-r--r--grub-core/commands/iorw.c152
-rw-r--r--grub-core/commands/keylayouts.c299
-rw-r--r--grub-core/commands/keystatus.c110
-rw-r--r--grub-core/commands/legacycfg.c820
-rw-r--r--grub-core/commands/loadenv.c399
-rw-r--r--grub-core/commands/ls.c282
-rw-r--r--grub-core/commands/lsacpi.c252
-rw-r--r--grub-core/commands/lsmmap.c74
-rw-r--r--grub-core/commands/lspci.c236
-rw-r--r--grub-core/commands/memrw.c151
-rw-r--r--grub-core/commands/menuentry.c307
-rw-r--r--grub-core/commands/minicmd.c230
-rw-r--r--grub-core/commands/mips/yeeloong/lsspd.c94
-rw-r--r--grub-core/commands/parttool.c333
-rw-r--r--grub-core/commands/password.c93
-rw-r--r--grub-core/commands/password_pbkdf2.c199
-rw-r--r--grub-core/commands/probe.c162
-rw-r--r--grub-core/commands/read.c92
-rw-r--r--grub-core/commands/reboot.c47
-rw-r--r--grub-core/commands/regexp.c151
-rw-r--r--grub-core/commands/search.c245
-rw-r--r--grub-core/commands/search_file.c6
-rw-r--r--grub-core/commands/search_label.c6
-rw-r--r--grub-core/commands/search_uuid.c6
-rw-r--r--grub-core/commands/search_wrap.c109
-rw-r--r--grub-core/commands/setpci.c343
-rw-r--r--grub-core/commands/sleep.c114
-rw-r--r--grub-core/commands/terminal.c258
-rw-r--r--grub-core/commands/test.c438
-rw-r--r--grub-core/commands/testload.c157
-rw-r--r--grub-core/commands/true.c59
-rw-r--r--grub-core/commands/usbtest.c218
-rw-r--r--grub-core/commands/videoinfo.c186
-rw-r--r--grub-core/commands/videotest.c218
-rw-r--r--grub-core/commands/wildcard.c495
-rw-r--r--grub-core/commands/xnu_uuid.c102
-rw-r--r--grub-core/disk/ata.c933
-rw-r--r--grub-core/disk/ata_pthru.c108
-rw-r--r--grub-core/disk/dmraid_nvidia.c171
-rw-r--r--grub-core/disk/efi/efidisk.c850
-rw-r--r--grub-core/disk/host.c95
-rw-r--r--grub-core/disk/i386/pc/biosdisk.c641
-rw-r--r--grub-core/disk/ieee1275/nand.c216
-rw-r--r--grub-core/disk/ieee1275/ofdisk.c373
-rw-r--r--grub-core/disk/loopback.c232
-rw-r--r--grub-core/disk/lvm.c896
-rw-r--r--grub-core/disk/mdraid1x_linux.c247
-rw-r--r--grub-core/disk/mdraid_linux.c248
-rw-r--r--grub-core/disk/memdisk.c117
-rw-r--r--grub-core/disk/raid.c812
-rw-r--r--grub-core/disk/raid5_recover.c76
-rw-r--r--grub-core/disk/raid6_recover.c230
-rw-r--r--grub-core/disk/scsi.c606
-rw-r--r--grub-core/disk/usbms.c441
-rw-r--r--grub-core/efiemu/i386/coredetect.c59
-rw-r--r--grub-core/efiemu/i386/loadcore32.c114
-rw-r--r--grub-core/efiemu/i386/loadcore64.c120
-rw-r--r--grub-core/efiemu/i386/nocfgtables.c30
-rw-r--r--grub-core/efiemu/i386/pc/cfgtables.c75
-rw-r--r--grub-core/efiemu/loadcore.c369
-rw-r--r--grub-core/efiemu/loadcore32.c22
-rw-r--r--grub-core/efiemu/loadcore64.c22
-rw-r--r--grub-core/efiemu/loadcore_common.c189
-rw-r--r--grub-core/efiemu/main.c334
-rw-r--r--grub-core/efiemu/mm.c652
-rw-r--r--grub-core/efiemu/pnvram.c280
-rw-r--r--grub-core/efiemu/prepare.c160
-rw-r--r--grub-core/efiemu/prepare32.c22
-rw-r--r--grub-core/efiemu/prepare64.c22
-rw-r--r--grub-core/efiemu/runtime/config.h34
-rw-r--r--grub-core/efiemu/runtime/efiemu.S159
-rw-r--r--grub-core/efiemu/runtime/efiemu.c630
-rw-r--r--grub-core/efiemu/symbols.c271
-rw-r--r--grub-core/font/font.c1538
-rw-r--r--grub-core/font/font_cmd.c84
-rw-r--r--grub-core/fs/affs.c555
-rw-r--r--grub-core/fs/afs.c720
-rw-r--r--grub-core/fs/afs_be.c2
-rw-r--r--grub-core/fs/befs.c3
-rw-r--r--grub-core/fs/befs_be.c4
-rw-r--r--grub-core/fs/btrfs.c1491
-rw-r--r--grub-core/fs/cpio.c381
-rw-r--r--grub-core/fs/ext2.c991
-rw-r--r--grub-core/fs/fat.c878
-rw-r--r--grub-core/fs/fshelp.c317
-rw-r--r--grub-core/fs/hfs.c1124
-rw-r--r--grub-core/fs/hfsplus.c1050
-rw-r--r--grub-core/fs/i386/pc/pxe.c652
-rw-r--r--grub-core/fs/iso9660.c908
-rw-r--r--grub-core/fs/jfs.c908
-rw-r--r--grub-core/fs/minix.c590
-rw-r--r--grub-core/fs/minix2.c2
-rw-r--r--grub-core/fs/nilfs2.c1186
-rw-r--r--grub-core/fs/ntfs.c1117
-rw-r--r--grub-core/fs/ntfscomp.c376
-rw-r--r--grub-core/fs/reiserfs.c1384
-rw-r--r--grub-core/fs/sfs.c599
-rw-r--r--grub-core/fs/tar.c2
-rw-r--r--grub-core/fs/udf.c1061
-rw-r--r--grub-core/fs/ufs.c812
-rw-r--r--grub-core/fs/ufs2.c3
-rw-r--r--grub-core/fs/xfs.c837
-rw-r--r--grub-core/fs/zfs/zfs.c2550
-rw-r--r--grub-core/fs/zfs/zfs_fletcher.c84
-rw-r--r--grub-core/fs/zfs/zfs_lzjb.c93
-rw-r--r--grub-core/fs/zfs/zfs_sha256.c143
-rw-r--r--grub-core/fs/zfs/zfsinfo.c409
-rw-r--r--grub-core/genemuinit.sh72
-rw-r--r--grub-core/genemuinitheader.sh52
-rw-r--r--grub-core/genmod.sh.in73
-rw-r--r--grub-core/genmoddep.awk62
-rw-r--r--grub-core/gensyminfo.sh.in34
-rw-r--r--grub-core/gensymlist.sh71
-rw-r--r--grub-core/gentrigtables.c57
-rw-r--r--grub-core/gettext/gettext.c400
-rw-r--r--grub-core/gfxmenu/font.c109
-rw-r--r--grub-core/gfxmenu/gfxmenu.c135
-rw-r--r--grub-core/gfxmenu/gui_box.c412
-rw-r--r--grub-core/gfxmenu/gui_canvas.c267
-rw-r--r--grub-core/gfxmenu/gui_circular_progress.c308
-rw-r--r--grub-core/gfxmenu/gui_image.c272
-rw-r--r--grub-core/gfxmenu/gui_label.c254
-rw-r--r--grub-core/gfxmenu/gui_list.c620
-rw-r--r--grub-core/gfxmenu/gui_progress_bar.c391
-rw-r--r--grub-core/gfxmenu/gui_string_util.c327
-rw-r--r--grub-core/gfxmenu/gui_util.c101
-rw-r--r--grub-core/gfxmenu/icon_manager.c263
-rw-r--r--grub-core/gfxmenu/model.c0
-rw-r--r--grub-core/gfxmenu/named_colors.c209
-rw-r--r--grub-core/gfxmenu/theme_loader.c723
-rw-r--r--grub-core/gfxmenu/view.c446
-rw-r--r--grub-core/gfxmenu/widget-box.c310
-rw-r--r--grub-core/gnulib/Makefile.am1359
-rw-r--r--grub-core/gnulib/Makefile.in2107
-rw-r--r--grub-core/gnulib/alloca.c489
-rw-r--r--grub-core/gnulib/alloca.in.h56
-rw-r--r--grub-core/gnulib/argp-ba.c34
-rw-r--r--grub-core/gnulib/argp-eexst.c30
-rw-r--r--grub-core/gnulib/argp-fmtstream.c435
-rw-r--r--grub-core/gnulib/argp-fmtstream.h354
-rw-r--r--grub-core/gnulib/argp-fs-xinl.c42
-rw-r--r--grub-core/gnulib/argp-help.c1951
-rw-r--r--grub-core/gnulib/argp-namefrob.h157
-rw-r--r--grub-core/gnulib/argp-parse.c952
-rw-r--r--grub-core/gnulib/argp-pin.c27
-rw-r--r--grub-core/gnulib/argp-pv.c34
-rw-r--r--grub-core/gnulib/argp-pvh.c31
-rw-r--r--grub-core/gnulib/argp-xinl.c42
-rw-r--r--grub-core/gnulib/argp.h645
-rw-r--r--grub-core/gnulib/asnprintf.c35
-rw-r--r--grub-core/gnulib/basename-lgpl.c75
-rw-r--r--grub-core/gnulib/btowc.c39
-rw-r--r--grub-core/gnulib/config.charset683
-rw-r--r--grub-core/gnulib/dirname-lgpl.c86
-rw-r--r--grub-core/gnulib/dirname.h74
-rw-r--r--grub-core/gnulib/errno.in.h160
-rw-r--r--grub-core/gnulib/error.c394
-rw-r--r--grub-core/gnulib/error.h65
-rw-r--r--grub-core/gnulib/float+.h148
-rw-r--r--grub-core/gnulib/float.in.h62
-rw-r--r--grub-core/gnulib/fnmatch.c354
-rw-r--r--grub-core/gnulib/fnmatch.in.h68
-rw-r--r--grub-core/gnulib/fnmatch_loop.c1215
-rw-r--r--grub-core/gnulib/getdelim.c137
-rw-r--r--grub-core/gnulib/getline.c29
-rw-r--r--grub-core/gnulib/getopt.c1192
-rw-r--r--grub-core/gnulib/getopt.in.h249
-rw-r--r--grub-core/gnulib/getopt1.c170
-rw-r--r--grub-core/gnulib/getopt_int.h135
-rw-r--r--grub-core/gnulib/gettext.h280
-rw-r--r--grub-core/gnulib/intprops.h83
-rw-r--r--grub-core/gnulib/langinfo.in.h173
-rw-r--r--grub-core/gnulib/localcharset.c548
-rw-r--r--grub-core/gnulib/localcharset.h41
-rw-r--r--grub-core/gnulib/malloc.c60
-rw-r--r--grub-core/gnulib/mbrtowc.c386
-rw-r--r--grub-core/gnulib/mbsinit.c47
-rw-r--r--grub-core/gnulib/mbsrtowcs-state.c37
-rw-r--r--grub-core/gnulib/mbsrtowcs.c136
-rw-r--r--grub-core/gnulib/memchr.c172
-rw-r--r--grub-core/gnulib/memchr.valgrind14
-rw-r--r--grub-core/gnulib/mempcpy.c29
-rw-r--r--grub-core/gnulib/nl_langinfo.c270
-rw-r--r--grub-core/gnulib/printf-args.c188
-rw-r--r--grub-core/gnulib/printf-args.h155
-rw-r--r--grub-core/gnulib/printf-parse.c627
-rw-r--r--grub-core/gnulib/printf-parse.h180
-rw-r--r--grub-core/gnulib/progname.c92
-rw-r--r--grub-core/gnulib/progname.h62
-rw-r--r--grub-core/gnulib/rawmemchr.c136
-rw-r--r--grub-core/gnulib/rawmemchr.valgrind12
-rw-r--r--grub-core/gnulib/realloc.c91
-rw-r--r--grub-core/gnulib/ref-add.sin30
-rw-r--r--grub-core/gnulib/ref-del.sin25
-rw-r--r--grub-core/gnulib/regcomp.c3877
-rw-r--r--grub-core/gnulib/regex.c72
-rw-r--r--grub-core/gnulib/regex.h676
-rw-r--r--grub-core/gnulib/regex_internal.c1742
-rw-r--r--grub-core/gnulib/regex_internal.h873
-rw-r--r--grub-core/gnulib/regexec.c4416
-rw-r--r--grub-core/gnulib/size_max.h31
-rw-r--r--grub-core/gnulib/sleep.c75
-rw-r--r--grub-core/gnulib/stdbool.in.h122
-rw-r--r--grub-core/gnulib/stddef.in.h86
-rw-r--r--grub-core/gnulib/stdint.in.h568
-rw-r--r--grub-core/gnulib/stdio-write.c148
-rw-r--r--grub-core/gnulib/stdio.in.h1071
-rw-r--r--grub-core/gnulib/stdlib.in.h715
-rw-r--r--grub-core/gnulib/strcasecmp.c63
-rw-r--r--grub-core/gnulib/strchrnul.c142
-rw-r--r--grub-core/gnulib/strchrnul.valgrind12
-rw-r--r--grub-core/gnulib/streq.h176
-rw-r--r--grub-core/gnulib/strerror.c350
-rw-r--r--grub-core/gnulib/string.in.h945
-rw-r--r--grub-core/gnulib/strings.in.h93
-rw-r--r--grub-core/gnulib/stripslash.c45
-rw-r--r--grub-core/gnulib/strncasecmp.c63
-rw-r--r--grub-core/gnulib/strndup.c37
-rw-r--r--grub-core/gnulib/strnlen.c31
-rw-r--r--grub-core/gnulib/strnlen1.c35
-rw-r--r--grub-core/gnulib/strnlen1.h39
-rw-r--r--grub-core/gnulib/sys_wait.in.h106
-rw-r--r--grub-core/gnulib/sysexits.in.h71
-rw-r--r--grub-core/gnulib/unistd.in.h1326
-rw-r--r--grub-core/gnulib/vasnprintf.c5567
-rw-r--r--grub-core/gnulib/vasnprintf.h80
-rw-r--r--grub-core/gnulib/verify.h163
-rw-r--r--grub-core/gnulib/vsnprintf.c71
-rw-r--r--grub-core/gnulib/wchar.in.h428
-rw-r--r--grub-core/gnulib/wcrtomb.c53
-rw-r--r--grub-core/gnulib/wctype.in.h392
-rw-r--r--grub-core/gnulib/xsize.h108
-rw-r--r--grub-core/hello/hello.c51
-rw-r--r--grub-core/hook/datehook.c110
-rw-r--r--grub-core/io/bufio.c209
-rw-r--r--grub-core/io/gzio.c1322
-rw-r--r--grub-core/io/xzio.c356
-rw-r--r--grub-core/kern/command.c58
-rw-r--r--grub-core/kern/corecmd.c194
-rw-r--r--grub-core/kern/device.c169
-rw-r--r--grub-core/kern/disk.c604
-rw-r--r--grub-core/kern/dl.c724
-rw-r--r--grub-core/kern/efi/efi.c742
-rw-r--r--grub-core/kern/efi/init.c130
-rw-r--r--grub-core/kern/efi/mm.c453
-rw-r--r--grub-core/kern/elf.c488
-rw-r--r--grub-core/kern/emu/cache.S28
-rw-r--r--grub-core/kern/emu/console.c293
-rw-r--r--grub-core/kern/emu/full.c71
-rw-r--r--grub-core/kern/emu/getroot.c932
-rw-r--r--grub-core/kern/emu/hostdisk.c1776
-rw-r--r--grub-core/kern/emu/hostfs.c175
-rw-r--r--grub-core/kern/emu/lite.c45
-rw-r--r--grub-core/kern/emu/main.c259
-rw-r--r--grub-core/kern/emu/misc.c537
-rw-r--r--grub-core/kern/emu/mm.c87
-rw-r--r--grub-core/kern/emu/time.c46
-rw-r--r--grub-core/kern/env.c262
-rw-r--r--grub-core/kern/err.c139
-rw-r--r--grub-core/kern/file.c186
-rw-r--r--grub-core/kern/fs.c231
-rw-r--r--grub-core/kern/generic/millisleep.c39
-rw-r--r--grub-core/kern/generic/rtc_get_time_ms.c37
-rw-r--r--grub-core/kern/i386/coreboot/init.c132
-rw-r--r--grub-core/kern/i386/coreboot/mmap.c108
-rw-r--r--grub-core/kern/i386/coreboot/startup.S89
-rw-r--r--grub-core/kern/i386/dl.c109
-rw-r--r--grub-core/kern/i386/efi/init.c47
-rw-r--r--grub-core/kern/i386/efi/startup.S66
-rw-r--r--grub-core/kern/i386/ieee1275/startup.S65
-rw-r--r--grub-core/kern/i386/multiboot_mmap.c73
-rw-r--r--grub-core/kern/i386/pc/init.c234
-rw-r--r--grub-core/kern/i386/pc/lzma_decode.S614
-rw-r--r--grub-core/kern/i386/pc/mmap.c190
-rw-r--r--grub-core/kern/i386/pc/startup.S1011
-rw-r--r--grub-core/kern/i386/pit.c56
-rw-r--r--grub-core/kern/i386/qemu/init.c147
-rw-r--r--grub-core/kern/i386/qemu/mmap.c100
-rw-r--r--grub-core/kern/i386/qemu/startup.S104
-rw-r--r--grub-core/kern/i386/realmode.S242
-rw-r--r--grub-core/kern/i386/tsc.c74
-rw-r--r--grub-core/kern/ieee1275/cmain.c182
-rw-r--r--grub-core/kern/ieee1275/ieee1275.c609
-rw-r--r--grub-core/kern/ieee1275/init.c274
-rw-r--r--grub-core/kern/ieee1275/mmap.c80
-rw-r--r--grub-core/kern/ieee1275/openfw.c469
-rw-r--r--grub-core/kern/list.c87
-rw-r--r--grub-core/kern/main.c200
-rw-r--r--grub-core/kern/mips/cache.S45
-rw-r--r--grub-core/kern/mips/cache_flush.S23
-rw-r--r--grub-core/kern/mips/dl.c239
-rw-r--r--grub-core/kern/mips/init.c34
-rw-r--r--grub-core/kern/mips/qemu-mips/init.c58
-rw-r--r--grub-core/kern/mips/startup.S126
-rw-r--r--grub-core/kern/mips/yeeloong/init.c253
-rw-r--r--grub-core/kern/misc.c1019
-rw-r--r--grub-core/kern/mm.c572
-rw-r--r--grub-core/kern/parser.c267
-rw-r--r--grub-core/kern/partition.c253
-rw-r--r--grub-core/kern/powerpc/cache.S26
-rw-r--r--grub-core/kern/powerpc/cache_flush.S43
-rw-r--r--grub-core/kern/powerpc/dl.c136
-rw-r--r--grub-core/kern/powerpc/ieee1275/startup.S64
-rw-r--r--grub-core/kern/rescue_parser.c76
-rw-r--r--grub-core/kern/rescue_reader.c97
-rw-r--r--grub-core/kern/sparc64/cache.S41
-rw-r--r--grub-core/kern/sparc64/dl.c142
-rw-r--r--grub-core/kern/sparc64/ieee1275/crt0.S94
-rw-r--r--grub-core/kern/sparc64/ieee1275/ieee1275.c91
-rw-r--r--grub-core/kern/sparc64/ieee1275/init.c174
-rw-r--r--grub-core/kern/term.c130
-rw-r--r--grub-core/kern/time.c37
-rw-r--r--grub-core/kern/x86_64/dl.c119
-rw-r--r--grub-core/kern/x86_64/efi/callwrap.S116
-rw-r--r--grub-core/kern/x86_64/efi/startup.S63
-rw-r--r--grub-core/lib/LzFind.c777
-rw-r--r--grub-core/lib/LzmaDec.c1035
-rw-r--r--grub-core/lib/LzmaEnc.c2357
-rw-r--r--grub-core/lib/arg.c478
-rw-r--r--grub-core/lib/cmdline.c105
-rw-r--r--grub-core/lib/cmos_datetime.c158
-rw-r--r--grub-core/lib/crc.c75
-rw-r--r--grub-core/lib/crypto.c456
-rw-r--r--grub-core/lib/efi/datetime.c82
-rw-r--r--grub-core/lib/efi/halt.c36
-rw-r--r--grub-core/lib/efi/relocator.c119
-rw-r--r--grub-core/lib/emu/halt.c25
-rw-r--r--grub-core/lib/envblk.c296
-rw-r--r--grub-core/lib/hexdump.c85
-rw-r--r--grub-core/lib/i386/halt.c60
-rw-r--r--grub-core/lib/i386/pc/biosnum.c47
-rw-r--r--grub-core/lib/i386/pc/vesa_modes_table.c127
-rw-r--r--grub-core/lib/i386/relocator.c270
-rw-r--r--grub-core/lib/i386/relocator16.S193
-rw-r--r--grub-core/lib/i386/relocator32.S134
-rw-r--r--grub-core/lib/i386/relocator64.S160
-rw-r--r--grub-core/lib/i386/relocator_asm.S80
-rw-r--r--grub-core/lib/i386/relocator_backward.S2
-rw-r--r--grub-core/lib/i386/relocator_common.S82
-rw-r--r--grub-core/lib/i386/setjmp.S59
-rw-r--r--grub-core/lib/ieee1275/datetime.c145
-rw-r--r--grub-core/lib/ieee1275/halt.c33
-rw-r--r--grub-core/lib/ieee1275/relocator.c95
-rw-r--r--grub-core/lib/legacy_parse.c815
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/ChangeLog4212
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/arcfour.c141
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/bithelp.h57
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/blowfish.c588
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/camellia-glue.c199
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/camellia.c1463
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/camellia.h83
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/cast5.c586
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/cipher.h2
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/crc.c318
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/crypto.lst38
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/des.c923
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/dsa.c1063
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/ecc.c1351
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/elgamal.c846
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/g10lib.h1
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/hash-common.h36
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/md4.c341
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/md5.c368
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/memory.h1
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/primegen.c1861
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/rfc2268.c282
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/rijndael-tables.h1690
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/rijndael.c767
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/rmd.h40
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/rmd160.c575
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/rsa.c1160
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/seed.c458
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/serpent.c994
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/sha1.c418
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/sha256.c388
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/sha512.c441
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/tiger.c864
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/twofish.c993
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/types.h2
-rw-r--r--grub-core/lib/libgcrypt-grub/cipher/whirlpool.c1419
-rw-r--r--grub-core/lib/libgcrypt/cipher/ChangeLog3900
-rw-r--r--grub-core/lib/libgcrypt/cipher/ac.c3301
-rw-r--r--grub-core/lib/libgcrypt/cipher/arcfour.c156
-rw-r--r--grub-core/lib/libgcrypt/cipher/bithelp.h54
-rw-r--r--grub-core/lib/libgcrypt/cipher/blowfish.c605
-rw-r--r--grub-core/lib/libgcrypt/cipher/camellia-glue.c253
-rw-r--r--grub-core/lib/libgcrypt/cipher/camellia.c1461
-rw-r--r--grub-core/lib/libgcrypt/cipher/camellia.h81
-rw-r--r--grub-core/lib/libgcrypt/cipher/cast5.c620
-rw-r--r--grub-core/lib/libgcrypt/cipher/cipher.c1932
-rw-r--r--grub-core/lib/libgcrypt/cipher/crc.c297
-rw-r--r--grub-core/lib/libgcrypt/cipher/des.c1196
-rw-r--r--grub-core/lib/libgcrypt/cipher/dsa.c1181
-rw-r--r--grub-core/lib/libgcrypt/cipher/ecc.c1390
-rw-r--r--grub-core/lib/libgcrypt/cipher/elgamal.c846
-rw-r--r--grub-core/lib/libgcrypt/cipher/hash-common.c94
-rw-r--r--grub-core/lib/libgcrypt/cipher/hash-common.h33
-rw-r--r--grub-core/lib/libgcrypt/cipher/hmac-tests.c732
-rw-r--r--grub-core/lib/libgcrypt/cipher/md.c1375
-rw-r--r--grub-core/lib/libgcrypt/cipher/md4.c328
-rw-r--r--grub-core/lib/libgcrypt/cipher/md5.c355
-rw-r--r--grub-core/lib/libgcrypt/cipher/primegen.c1862
-rw-r--r--grub-core/lib/libgcrypt/cipher/pubkey.c2749
-rw-r--r--grub-core/lib/libgcrypt/cipher/rfc2268.c345
-rw-r--r--grub-core/lib/libgcrypt/cipher/rijndael-tables.h1687
-rw-r--r--grub-core/lib/libgcrypt/cipher/rijndael.c1253
-rw-r--r--grub-core/lib/libgcrypt/cipher/rmd.h37
-rw-r--r--grub-core/lib/libgcrypt/cipher/rmd160.c572
-rw-r--r--grub-core/lib/libgcrypt/cipher/rsa.c1379
-rw-r--r--grub-core/lib/libgcrypt/cipher/seed.c478
-rw-r--r--grub-core/lib/libgcrypt/cipher/serpent.c978
-rw-r--r--grub-core/lib/libgcrypt/cipher/sha1.c479
-rw-r--r--grub-core/lib/libgcrypt/cipher/sha256.c487
-rw-r--r--grub-core/lib/libgcrypt/cipher/sha512.c553
-rw-r--r--grub-core/lib/libgcrypt/cipher/tiger.c851
-rw-r--r--grub-core/lib/libgcrypt/cipher/twofish.c1040
-rw-r--r--grub-core/lib/libgcrypt/cipher/whirlpool.c1406
-rw-r--r--grub-core/lib/libgcrypt_wrap/cipher_wrap.h92
-rw-r--r--grub-core/lib/mips/relocator.c149
-rw-r--r--grub-core/lib/mips/relocator_asm.S61
-rw-r--r--grub-core/lib/mips/setjmp.S68
-rw-r--r--grub-core/lib/pbkdf2.c105
-rw-r--r--grub-core/lib/posix_wrap/assert.h33
-rw-r--r--grub-core/lib/posix_wrap/ctype.h103
-rw-r--r--grub-core/lib/posix_wrap/errno.h28
-rw-r--r--grub-core/lib/posix_wrap/inttypes.h1
-rw-r--r--grub-core/lib/posix_wrap/langinfo.h38
-rw-r--r--grub-core/lib/posix_wrap/limits.h0
-rw-r--r--grub-core/lib/posix_wrap/localcharset.h28
-rw-r--r--grub-core/lib/posix_wrap/locale.h0
-rw-r--r--grub-core/lib/posix_wrap/stdint.h1
-rw-r--r--grub-core/lib/posix_wrap/stdio.h29
-rw-r--r--grub-core/lib/posix_wrap/stdlib.h57
-rw-r--r--grub-core/lib/posix_wrap/string.h42
-rw-r--r--grub-core/lib/posix_wrap/sys/types.h46
-rw-r--r--grub-core/lib/posix_wrap/unistd.h0
-rw-r--r--grub-core/lib/posix_wrap/wchar.h25
-rw-r--r--grub-core/lib/posix_wrap/wctype.h0
-rw-r--r--grub-core/lib/powerpc/relocator.c142
-rw-r--r--grub-core/lib/powerpc/relocator_asm.S60
-rw-r--r--grub-core/lib/powerpc/setjmp.S87
-rw-r--r--grub-core/lib/reed_solomon.c527
-rw-r--r--grub-core/lib/relocator.c1602
-rw-r--r--grub-core/lib/setjmp.S13
-rw-r--r--grub-core/lib/sparc64/setjmp.S50
-rw-r--r--grub-core/lib/x86_64/relocator_asm.S85
-rw-r--r--grub-core/lib/x86_64/setjmp.S68
-rw-r--r--grub-core/lib/xzembed/xz.h180
-rw-r--r--grub-core/lib/xzembed/xz_config.h141
-rw-r--r--grub-core/lib/xzembed/xz_dec_bcj.c578
-rw-r--r--grub-core/lib/xzembed/xz_dec_lzma2.c1182
-rw-r--r--grub-core/lib/xzembed/xz_dec_stream.c919
-rw-r--r--grub-core/lib/xzembed/xz_lzma2.h236
-rw-r--r--grub-core/lib/xzembed/xz_private.h96
-rw-r--r--grub-core/lib/xzembed/xz_stream.h53
-rw-r--r--grub-core/loader/aout.c62
-rw-r--r--grub-core/loader/efi/appleloader.c230
-rw-r--r--grub-core/loader/efi/chainloader.c355
-rw-r--r--grub-core/loader/i386/bsd.c1992
-rw-r--r--grub-core/loader/i386/bsd32.c6
-rw-r--r--grub-core/loader/i386/bsd64.c6
-rw-r--r--grub-core/loader/i386/bsdXX.c621
-rw-r--r--grub-core/loader/i386/bsd_pagetable.c92
-rw-r--r--grub-core/loader/i386/linux.c1016
-rw-r--r--grub-core/loader/i386/multiboot_mbi.c731
-rw-r--r--grub-core/loader/i386/pc/chainloader.c177
-rw-r--r--grub-core/loader/i386/pc/linux.c450
-rw-r--r--grub-core/loader/i386/pc/ntldr.c159
-rw-r--r--grub-core/loader/i386/xnu.c1137
-rw-r--r--grub-core/loader/macho.c160
-rw-r--r--grub-core/loader/macho32.c18
-rw-r--r--grub-core/loader/macho64.c18
-rw-r--r--grub-core/loader/machoXX.c239
-rw-r--r--grub-core/loader/mips/linux.c443
-rw-r--r--grub-core/loader/multiboot.c358
-rw-r--r--grub-core/loader/multiboot_elfxx.c225
-rw-r--r--grub-core/loader/multiboot_mbi2.c911
-rw-r--r--grub-core/loader/powerpc/ieee1275/linux.c385
-rw-r--r--grub-core/loader/sparc64/ieee1275/linux.c525
-rw-r--r--grub-core/loader/xnu.c1498
-rw-r--r--grub-core/loader/xnu_resume.c172
-rw-r--r--grub-core/mmap/efi/mmap.c282
-rw-r--r--grub-core/mmap/i386/mmap.c99
-rw-r--r--grub-core/mmap/i386/pc/mmap.c216
-rw-r--r--grub-core/mmap/i386/pc/mmap_helper.S133
-rw-r--r--grub-core/mmap/i386/uppermem.c89
-rw-r--r--grub-core/mmap/mips/yeeloong/uppermem.c68
-rw-r--r--grub-core/mmap/mmap.c486
-rw-r--r--grub-core/normal/auth.c273
-rw-r--r--grub-core/normal/autofs.c136
-rw-r--r--grub-core/normal/charset.c1274
-rw-r--r--grub-core/normal/cmdline.c650
-rw-r--r--grub-core/normal/color.c150
-rw-r--r--grub-core/normal/completion.c518
-rw-r--r--grub-core/normal/context.c209
-rw-r--r--grub-core/normal/crypto.c151
-rw-r--r--grub-core/normal/datetime.c100
-rw-r--r--grub-core/normal/dyncmd.c182
-rw-r--r--grub-core/normal/main.c535
-rw-r--r--grub-core/normal/menu.c773
-rw-r--r--grub-core/normal/menu_entry.c1447
-rw-r--r--grub-core/normal/menu_text.c491
-rw-r--r--grub-core/normal/misc.c128
-rw-r--r--grub-core/normal/term.c888
-rw-r--r--grub-core/partmap/acorn.c147
-rw-r--r--grub-core/partmap/amiga.c160
-rw-r--r--grub-core/partmap/apple.c199
-rw-r--r--grub-core/partmap/bsdlabel.c254
-rw-r--r--grub-core/partmap/gpt.c208
-rw-r--r--grub-core/partmap/msdos.c284
-rw-r--r--grub-core/partmap/sun.c151
-rw-r--r--grub-core/partmap/sunpc.c146
-rw-r--r--grub-core/parttool/msdospart.c157
-rw-r--r--grub-core/script/argv.c153
-rw-r--r--grub-core/script/execute.c783
-rw-r--r--grub-core/script/function.c105
-rw-r--r--grub-core/script/lexer.c327
-rw-r--r--grub-core/script/main.c88
-rw-r--r--grub-core/script/parser.y353
-rw-r--r--grub-core/script/script.c394
-rw-r--r--grub-core/script/yylex.l368
-rw-r--r--grub-core/term/at_keyboard.c638
-rw-r--r--grub-core/term/efi/console.c291
-rw-r--r--grub-core/term/gfxterm.c1220
-rw-r--r--grub-core/term/i386/pc/console.c68
-rw-r--r--grub-core/term/i386/pc/vga_text.c175
-rw-r--r--grub-core/term/i386/vga_common.c48
-rw-r--r--grub-core/term/ieee1275/ofconsole.c249
-rw-r--r--grub-core/term/ns8250.c278
-rw-r--r--grub-core/term/serial.c372
-rw-r--r--grub-core/term/terminfo.c652
-rw-r--r--grub-core/term/tparm.c761
-rw-r--r--grub-core/term/usb_keyboard.c472
-rw-r--r--grub-core/tests/boot/kbsd.init-i386.S125
-rw-r--r--grub-core/tests/boot/kbsd.init-x86_64.S111
-rw-r--r--grub-core/tests/boot/kbsd.spec.txt3
-rw-r--r--grub-core/tests/boot/kernel-8086.S69
-rw-r--r--grub-core/tests/boot/kernel-i386.S89
-rw-r--r--grub-core/tests/boot/kfreebsd-aout.cfg4
-rw-r--r--grub-core/tests/boot/kfreebsd.cfg8
-rw-r--r--grub-core/tests/boot/kfreebsd.init-i386.S114
-rw-r--r--grub-core/tests/boot/kfreebsd.init-x86_64.S98
-rw-r--r--grub-core/tests/boot/knetbsd.cfg5
-rw-r--r--grub-core/tests/boot/kopenbsd.cfg5
-rw-r--r--grub-core/tests/boot/kopenbsdlabel.txt3
-rw-r--r--grub-core/tests/boot/linux.cfg5
-rw-r--r--grub-core/tests/boot/linux.init-i386.S79
-rw-r--r--grub-core/tests/boot/linux.init-x86_64.S78
-rw-r--r--grub-core/tests/boot/linux16.cfg5
-rw-r--r--grub-core/tests/boot/multiboot.cfg4
-rw-r--r--grub-core/tests/boot/multiboot2.cfg4
-rw-r--r--grub-core/tests/boot/ntldr.cfg4
-rw-r--r--grub-core/tests/boot/pc-chainloader.cfg4
-rw-r--r--grub-core/tests/example_functional_test.c38
-rw-r--r--grub-core/tests/lib/functional_test.c50
-rw-r--r--grub-core/tests/lib/test.c157
-rw-r--r--grub-core/tests/test_blockarg.c53
-rw-r--r--grub-core/unidata.c1494
-rw-r--r--grub-core/video/bitmap.c255
-rw-r--r--grub-core/video/bitmap_scale.c311
-rw-r--r--grub-core/video/bochs.c426
-rw-r--r--grub-core/video/cirrus.c506
-rw-r--r--grub-core/video/efi_gop.c441
-rw-r--r--grub-core/video/efi_uga.c344
-rw-r--r--grub-core/video/emu/sdl.c242
-rw-r--r--grub-core/video/fb/fbblit.c1420
-rw-r--r--grub-core/video/fb/fbfill.c177
-rw-r--r--grub-core/video/fb/fbutil.c178
-rw-r--r--grub-core/video/fb/video_fb.c1533
-rw-r--r--grub-core/video/i386/pc/vbe.c918
-rw-r--r--grub-core/video/i386/pc/vga.c390
-rw-r--r--grub-core/video/ieee1275.c316
-rw-r--r--grub-core/video/readers/jpeg.c764
-rw-r--r--grub-core/video/readers/png.c915
-rw-r--r--grub-core/video/readers/tga.c497
-rw-r--r--grub-core/video/sm712.c787
-rw-r--r--grub-core/video/sm712_init.c14
-rw-r--r--grub-core/video/video.c675
642 files changed, 344250 insertions, 0 deletions
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
new file mode 100644
index 0000000..94f7f3f
--- /dev/null
+++ b/grub-core/Makefile.am
@@ -0,0 +1,351 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
+DEPDIR=.deps-core
+
+include $(top_srcdir)/conf/Makefile.common
+
+CC=$(TARGET_CC)
+CPP=$(TARGET_CC)
+CCAS=$(TARGET_CC)
+
+if COND_GRUB_MKFONT
+if COND_HAVE_FONT_SOURCE
+TARGET_CFLAGS += -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1
+endif
+endif
+
+AM_CFLAGS = $(TARGET_CFLAGS)
+AM_LDFLAGS = $(TARGET_LDFLAGS)
+AM_CPPFLAGS = $(TARGET_CPPFLAGS) $(CPPFLAGS_DEFAULT)
+AM_CCASFLAGS = $(TARGET_CCASFLAGS) $(CCASFLAGS_DEFAULT)
+
+CFLAGS_PROGRAM += $(CFLAGS_PLATFORM)
+LDFLAGS_PROGRAM += $(LDFLAGS_PLATFORM)
+CPPFLAGS_PROGRAM += $(CPPFLAGS_PLATFORM)
+CCASFLAGS_PROGRAM += $(CCASFLAGS_PLATFORM)
+
+CFLAGS_LIBRARY += $(CFLAGS_PLATFORM) -fno-builtin
+CPPFLAGS_LIBRARY += $(CPPFLAGS_PLATFORM)
+CCASFLAGS_LIBRARY += $(CCASFLAGS_PLATFORM)
+
+# gentrigtables
+gentrigtables: gentrigtables.c
+ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(CPPFLAGS) $< -lm
+CLEANFILES += gentrigtables
+
+# trigtables.c
+trigtables.c: gentrigtables gentrigtables.c $(top_srcdir)/configure.ac
+ $(builddir)/gentrigtables > $@
+CLEANFILES += trigtables.c
+
+# XXX Use Automake's LEX & YACC support
+grub_script.tab.h: script/parser.y
+ $(YACC) -d -p grub_script_yy -b grub_script $<
+grub_script.tab.c: grub_script.tab.h
+CLEANFILES += grub_script.tab.c grub_script.tab.h
+
+# For the lexer.
+grub_script.yy.h: script/yylex.l
+ $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $<
+grub_script.yy.c: grub_script.yy.h
+
+rs_decoder.S: $(srcdir)/lib/reed_solomon.c
+ $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3
+
+kern/i386/pc/startup.S: $(builddir)/rs_decoder.S
+
+CLEANFILES += grub_script.yy.c grub_script.yy.h
+
+include $(srcdir)/Makefile.core.am
+
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/file.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fs.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i18n.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/kernel.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/list.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/misc.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/parser.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
+
+if COND_i386_pc
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/loader.h
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pxe.h
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+endif
+
+if COND_i386_efi
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/time.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+endif
+
+if COND_i386_coreboot
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+endif
+
+if COND_i386_multiboot
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+endif
+
+if COND_i386_qemu
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+endif
+
+if COND_i386_ieee1275
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+endif
+
+if COND_x86_64_efi
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/time.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+endif
+
+if COND_mips_yeeloong
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/cache.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bitmap.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bitmap_scale.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cs5536.h
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pci.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
+endif
+
+if COND_powerpc_ieee1275
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
+endif
+
+if COND_sparc64_ieee1275
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
+endif
+
+if COND_emu
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h
+if COND_GRUB_EMU_SDL
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
+endif
+if COND_GRUB_EMU_USB
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libusb.h
+endif
+if COND_GRUB_EMU_PCI
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libpciaccess.h
+endif
+endif
+
+symlist.h: $(top_builddir)/config.h $(KERNEL_HEADER_FILES)
+ @list='$^'; \
+ for p in $$list; do \
+ echo "#include <$$p>" >> $@ || (rm -f $@; exit 1); \
+ done
+CLEANFILES += symlist.h
+BUILT_SOURCES += symlist.h
+
+symlist.c: symlist.h gensymlist.sh
+ $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DGRUB_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1)
+ cat symlist.p | /bin/sh $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
+ rm -f symlist.p
+CLEANFILES += symlist.c
+BUILT_SOURCES += symlist.c
+
+if COND_HAVE_ASM_USCORE
+ASM_PREFIX=_
+else
+ASM_PREFIX=
+endif
+
+noinst_DATA += kernel_syms.lst
+
+kernel_syms.lst: $(KERNEL_HEADER_FILES) $(top_builddir)/config.h
+ $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DGRUB_SYMBOL_GENERATOR=1 $^ >kernel_syms.input
+ cat kernel_syms.input | grep -v '^#' | sed -n \
+ -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
+ -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
+ | sort -u >$@
+ rm -f kernel_syms.input
+CLEANFILES += kernel_syms.lst
+
+if COND_emu
+kern/emu/grub_emu-main.$(OBJEXT):grub_emu_init.h
+grub_emu-grub_emu_init.$(OBJEXT):grub_emu_init.h
+kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h
+grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h
+
+grub_emu_init.h: genemuinitheader.sh $(MOD_FILES)
+ rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@
+CLEANFILES += grub_emu_init.h
+
+grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES)
+ rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinit.sh $(NM) > $@
+CLEANFILES += grub_emu_init.c
+endif
+
+# List files
+
+fs.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ if grep 'FS_LIST_MARKER' $$pp >/dev/null 2>&1; then \
+ echo $$b; \
+ fi; \
+ done) | sort -u > $@
+platform_DATA += fs.lst
+CLEANFILES += fs.lst
+
+command.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ sed -n \
+ -e "/EXTCOMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
+ -e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
+ -e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
+ done) | sort -u > $@
+platform_DATA += command.lst
+CLEANFILES += command.lst
+
+partmap.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ if grep 'PARTMAP_LIST_MARKER' $$pp >/dev/null 2>&1; then \
+ echo $$b; \
+ fi; \
+ done) | sort -u > $@
+platform_DATA += partmap.lst
+CLEANFILES += partmap.lst
+
+terminal.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ sed -n \
+ -e "/INPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
+ -e "/OUTPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
+ done) | sort -u > $@
+platform_DATA += terminal.lst
+CLEANFILES += terminal.lst
+
+parttool.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ sed -n \
+ -e "/PARTTOOL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
+ done) | sort -u > $@
+platform_DATA += parttool.lst
+CLEANFILES += parttool.lst
+
+video.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ if grep 'VIDEO_LIST_MARKER' $$pp >/dev/null 2>&1; then \
+ echo $$b; \
+ fi; \
+ done) | sort -u > $@
+platform_DATA += video.lst
+CLEANFILES += video.lst
+
+# but, crypto.lst is simply copied
+crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
+ cp $^ $@
+platform_DATA += crypto.lst
+CLEANFILES += crypto.lst
+
+syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
+ cat kernel_syms.lst > $@.new
+ for m in $(MODULE_FILES); do \
+ sh $< $$m >> $@.new || exit 1; \
+ done
+ mv $@.new $@
+
+# generate global module dependencies list
+moddep.lst: syminfo.lst genmoddep.awk
+ cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
+platform_DATA += moddep.lst
+CLEANFILES += config.log syminfo.lst moddep.lst
+
+$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
+ TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
+platform_DATA += $(MOD_FILES)
+CLEANFILES += $(MOD_FILES)
+
+if COND_ENABLE_EFIEMU
+efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+ -rm -f $@; \
+ if test "x$(TARGET_APPLE_CC)" = x1; then \
+ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -DAPPLE_CC -m32 -Wall -Werror -nostdlib -O2 -c -o $@.bin $< || exit 1; \
+ $(OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
+ rm -f $@.bin; \
+ else \
+ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -m32 -Wall -Werror -nostdlib -O2 -c -o $@ $< || exit 1; \
+ if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
+ fi
+
+efiemu64_c.o: efiemu/runtime/efiemu.c
+ if test "x$(TARGET_APPLE_CC)" = x1; then \
+ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -nostdlib -Wall -Werror -mno-red-zone -c -o $@ $< || exit 1; \
+ else \
+ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
+ fi
+
+efiemu64_s.o: efiemu/runtime/efiemu.S
+ -rm -f $@
+ if test "x$(TARGET_APPLE_CC)" = x1; then \
+ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -Wall -Werror -nostdlib -O2 -mno-red-zone -c -o $@ $< || exit 1; \
+ else \
+ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
+ fi
+
+efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
+ -rm -f $@; \
+ if test "x$(TARGET_APPLE_CC)" = x1; then \
+ rm -f $@.bin; \
+ $(TARGET_CC) -m64 -Wl,-r -nostdlib -o $@.bin $^ || exit 1; \
+ $(OBJCONV) -felf64 -nu -nd $@.bin $@ || exit 1; \
+ rm -f $@.bin; \
+ else \
+ $(TARGET_CC) -m64 -nostdlib -Wl,-r -o $@ $^ || exit 1; \
+ if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
+ fi
+
+platform_DATA += efiemu32.o efiemu64.o
+CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
+endif
diff --git a/grub-core/Makefile.core.am b/grub-core/Makefile.core.am
new file mode 100644
index 0000000..f1da527
--- /dev/null
+++ b/grub-core/Makefile.core.am
@@ -0,0 +1,39086 @@
+
+if COND_emu
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += trig.module
+MODULE_FILES += trig.module$(EXEEXT)
+trig_module_SOURCES = ## platform sources
+nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+trig_module_LDADD =
+trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += gentrigtables.c
+BUILT_SOURCES += $(nodist_trig_module_SOURCES)
+CLEANFILES += $(nodist_trig_module_SOURCES)
+MOD_FILES += trig.mod
+MARKER_FILES += trig.marker
+CLEANFILES += trig.marker
+
+trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += cs5536.module
+MODULE_FILES += cs5536.module$(EXEEXT)
+cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+nodist_cs5536_module_SOURCES = ## platform nodist sources
+cs5536_module_LDADD =
+cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cs5536_module_SOURCES)
+CLEANFILES += $(nodist_cs5536_module_SOURCES)
+MOD_FILES += cs5536.mod
+MARKER_FILES += cs5536.marker
+CLEANFILES += cs5536.marker
+
+cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += cs5536.module
+MODULE_FILES += cs5536.module$(EXEEXT)
+cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+nodist_cs5536_module_SOURCES = ## platform nodist sources
+cs5536_module_LDADD =
+cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cs5536_module_SOURCES)
+CLEANFILES += $(nodist_cs5536_module_SOURCES)
+MOD_FILES += cs5536.mod
+MARKER_FILES += cs5536.marker
+CLEANFILES += cs5536.marker
+
+cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += cs5536.module
+MODULE_FILES += cs5536.module$(EXEEXT)
+cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+nodist_cs5536_module_SOURCES = ## platform nodist sources
+cs5536_module_LDADD =
+cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cs5536_module_SOURCES)
+CLEANFILES += $(nodist_cs5536_module_SOURCES)
+MOD_FILES += cs5536.mod
+MARKER_FILES += cs5536.marker
+CLEANFILES += cs5536.marker
+
+cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += cs5536.module
+MODULE_FILES += cs5536.module$(EXEEXT)
+cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+nodist_cs5536_module_SOURCES = ## platform nodist sources
+cs5536_module_LDADD =
+cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cs5536_module_SOURCES)
+CLEANFILES += $(nodist_cs5536_module_SOURCES)
+MOD_FILES += cs5536.mod
+MARKER_FILES += cs5536.marker
+CLEANFILES += cs5536.marker
+
+cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += cs5536.module
+MODULE_FILES += cs5536.module$(EXEEXT)
+cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+nodist_cs5536_module_SOURCES = ## platform nodist sources
+cs5536_module_LDADD =
+cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cs5536_module_SOURCES)
+CLEANFILES += $(nodist_cs5536_module_SOURCES)
+MOD_FILES += cs5536.mod
+MARKER_FILES += cs5536.marker
+CLEANFILES += cs5536.marker
+
+cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += cs5536.module
+MODULE_FILES += cs5536.module$(EXEEXT)
+cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+nodist_cs5536_module_SOURCES = ## platform nodist sources
+cs5536_module_LDADD =
+cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cs5536_module_SOURCES)
+CLEANFILES += $(nodist_cs5536_module_SOURCES)
+MOD_FILES += cs5536.mod
+MARKER_FILES += cs5536.marker
+CLEANFILES += cs5536.marker
+
+cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += cs5536.module
+MODULE_FILES += cs5536.module$(EXEEXT)
+cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+nodist_cs5536_module_SOURCES = ## platform nodist sources
+cs5536_module_LDADD =
+cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cs5536_module_SOURCES)
+CLEANFILES += $(nodist_cs5536_module_SOURCES)
+MOD_FILES += cs5536.mod
+MARKER_FILES += cs5536.marker
+CLEANFILES += cs5536.marker
+
+cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+if COND_GRUB_EMU_USB
+noinst_PROGRAMS += libusb.module
+MODULE_FILES += libusb.module$(EXEEXT)
+libusb_module_SOURCES = bus/usb/emu/usb.c ## platform sources
+nodist_libusb_module_SOURCES = ## platform nodist sources
+libusb_module_LDADD =
+libusb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+libusb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+libusb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+libusb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libusb_module_SOURCES)
+CLEANFILES += $(nodist_libusb_module_SOURCES)
+MOD_FILES += libusb.mod
+MARKER_FILES += libusb.marker
+CLEANFILES += libusb.marker
+
+libusb.marker: $(libusb_module_SOURCES) $(nodist_libusb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libusb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif COND_GRUB_EMU_USB
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += lsspd.module
+MODULE_FILES += lsspd.module$(EXEEXT)
+lsspd_module_SOURCES = commands/mips/yeeloong/lsspd.c ## platform sources
+nodist_lsspd_module_SOURCES = ## platform nodist sources
+lsspd_module_LDADD =
+lsspd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsspd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsspd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsspd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsspd_module_SOURCES)
+CLEANFILES += $(nodist_lsspd_module_SOURCES)
+MOD_FILES += lsspd.mod
+MARKER_FILES += lsspd.marker
+CLEANFILES += lsspd.marker
+
+lsspd.marker: $(lsspd_module_SOURCES) $(nodist_lsspd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsspd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+if COND_GRUB_EMU_USB
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif COND_GRUB_EMU_USB
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += usb.module
+MODULE_FILES += usb.module$(EXEEXT)
+usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+nodist_usb_module_SOURCES = ## platform nodist sources
+usb_module_LDADD =
+usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_module_SOURCES)
+CLEANFILES += $(nodist_usb_module_SOURCES)
+MOD_FILES += usb.mod
+MARKER_FILES += usb.marker
+CLEANFILES += usb.marker
+
+usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += usbserial_common.module
+MODULE_FILES += usbserial_common.module$(EXEEXT)
+usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+usbserial_common_module_LDADD =
+usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_common_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_common_module_SOURCES)
+MOD_FILES += usbserial_common.mod
+MARKER_FILES += usbserial_common.marker
+CLEANFILES += usbserial_common.marker
+
+usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += usbserial_pl2303.module
+MODULE_FILES += usbserial_pl2303.module$(EXEEXT)
+usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+usbserial_pl2303_module_LDADD =
+usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_pl2303_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_pl2303_module_SOURCES)
+MOD_FILES += usbserial_pl2303.mod
+MARKER_FILES += usbserial_pl2303.marker
+CLEANFILES += usbserial_pl2303.marker
+
+usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += usbserial_ftdi.module
+MODULE_FILES += usbserial_ftdi.module$(EXEEXT)
+usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+usbserial_ftdi_module_LDADD =
+usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbserial_ftdi_module_SOURCES)
+CLEANFILES += $(nodist_usbserial_ftdi_module_SOURCES)
+MOD_FILES += usbserial_ftdi.mod
+MARKER_FILES += usbserial_ftdi.marker
+CLEANFILES += usbserial_ftdi.marker
+
+usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += uhci.module
+MODULE_FILES += uhci.module$(EXEEXT)
+uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+nodist_uhci_module_SOURCES = ## platform nodist sources
+uhci_module_LDADD =
+uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_uhci_module_SOURCES)
+CLEANFILES += $(nodist_uhci_module_SOURCES)
+MOD_FILES += uhci.mod
+MARKER_FILES += uhci.marker
+CLEANFILES += uhci.marker
+
+uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += uhci.module
+MODULE_FILES += uhci.module$(EXEEXT)
+uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+nodist_uhci_module_SOURCES = ## platform nodist sources
+uhci_module_LDADD =
+uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_uhci_module_SOURCES)
+CLEANFILES += $(nodist_uhci_module_SOURCES)
+MOD_FILES += uhci.mod
+MARKER_FILES += uhci.marker
+CLEANFILES += uhci.marker
+
+uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += uhci.module
+MODULE_FILES += uhci.module$(EXEEXT)
+uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+nodist_uhci_module_SOURCES = ## platform nodist sources
+uhci_module_LDADD =
+uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_uhci_module_SOURCES)
+CLEANFILES += $(nodist_uhci_module_SOURCES)
+MOD_FILES += uhci.mod
+MARKER_FILES += uhci.marker
+CLEANFILES += uhci.marker
+
+uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += uhci.module
+MODULE_FILES += uhci.module$(EXEEXT)
+uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+nodist_uhci_module_SOURCES = ## platform nodist sources
+uhci_module_LDADD =
+uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_uhci_module_SOURCES)
+CLEANFILES += $(nodist_uhci_module_SOURCES)
+MOD_FILES += uhci.mod
+MARKER_FILES += uhci.marker
+CLEANFILES += uhci.marker
+
+uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += uhci.module
+MODULE_FILES += uhci.module$(EXEEXT)
+uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+nodist_uhci_module_SOURCES = ## platform nodist sources
+uhci_module_LDADD =
+uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_uhci_module_SOURCES)
+CLEANFILES += $(nodist_uhci_module_SOURCES)
+MOD_FILES += uhci.mod
+MARKER_FILES += uhci.marker
+CLEANFILES += uhci.marker
+
+uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += uhci.module
+MODULE_FILES += uhci.module$(EXEEXT)
+uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+nodist_uhci_module_SOURCES = ## platform nodist sources
+uhci_module_LDADD =
+uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_uhci_module_SOURCES)
+CLEANFILES += $(nodist_uhci_module_SOURCES)
+MOD_FILES += uhci.mod
+MARKER_FILES += uhci.marker
+CLEANFILES += uhci.marker
+
+uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += uhci.module
+MODULE_FILES += uhci.module$(EXEEXT)
+uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+nodist_uhci_module_SOURCES = ## platform nodist sources
+uhci_module_LDADD =
+uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_uhci_module_SOURCES)
+CLEANFILES += $(nodist_uhci_module_SOURCES)
+MOD_FILES += uhci.mod
+MARKER_FILES += uhci.marker
+CLEANFILES += uhci.marker
+
+uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ohci.module
+MODULE_FILES += ohci.module$(EXEEXT)
+ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+nodist_ohci_module_SOURCES = ## platform nodist sources
+ohci_module_LDADD =
+ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ohci_module_SOURCES)
+CLEANFILES += $(nodist_ohci_module_SOURCES)
+MOD_FILES += ohci.mod
+MARKER_FILES += ohci.marker
+CLEANFILES += ohci.marker
+
+ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+if COND_GRUB_EMU_PCI
+noinst_PROGRAMS += pci.module
+MODULE_FILES += pci.module$(EXEEXT)
+pci_module_SOURCES = bus/emu/pci.c commands/lspci.c ## platform sources
+nodist_pci_module_SOURCES = ## platform nodist sources
+pci_module_LDADD =
+pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pci_module_SOURCES)
+CLEANFILES += $(nodist_pci_module_SOURCES)
+MOD_FILES += pci.mod
+MARKER_FILES += pci.marker
+CLEANFILES += pci.marker
+
+pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif COND_GRUB_EMU_PCI
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += pci.module
+MODULE_FILES += pci.module$(EXEEXT)
+pci_module_SOURCES = bus/pci.c ## platform sources
+nodist_pci_module_SOURCES = ## platform nodist sources
+pci_module_LDADD =
+pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pci_module_SOURCES)
+CLEANFILES += $(nodist_pci_module_SOURCES)
+MOD_FILES += pci.mod
+MARKER_FILES += pci.marker
+CLEANFILES += pci.marker
+
+pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += pci.module
+MODULE_FILES += pci.module$(EXEEXT)
+pci_module_SOURCES = bus/pci.c ## platform sources
+nodist_pci_module_SOURCES = ## platform nodist sources
+pci_module_LDADD =
+pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pci_module_SOURCES)
+CLEANFILES += $(nodist_pci_module_SOURCES)
+MOD_FILES += pci.mod
+MARKER_FILES += pci.marker
+CLEANFILES += pci.marker
+
+pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += pci.module
+MODULE_FILES += pci.module$(EXEEXT)
+pci_module_SOURCES = bus/pci.c ## platform sources
+nodist_pci_module_SOURCES = ## platform nodist sources
+pci_module_LDADD =
+pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pci_module_SOURCES)
+CLEANFILES += $(nodist_pci_module_SOURCES)
+MOD_FILES += pci.mod
+MARKER_FILES += pci.marker
+CLEANFILES += pci.marker
+
+pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += pci.module
+MODULE_FILES += pci.module$(EXEEXT)
+pci_module_SOURCES = bus/pci.c ## platform sources
+nodist_pci_module_SOURCES = ## platform nodist sources
+pci_module_LDADD =
+pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pci_module_SOURCES)
+CLEANFILES += $(nodist_pci_module_SOURCES)
+MOD_FILES += pci.mod
+MARKER_FILES += pci.marker
+CLEANFILES += pci.marker
+
+pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += pci.module
+MODULE_FILES += pci.module$(EXEEXT)
+pci_module_SOURCES = bus/pci.c ## platform sources
+nodist_pci_module_SOURCES = ## platform nodist sources
+pci_module_LDADD =
+pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pci_module_SOURCES)
+CLEANFILES += $(nodist_pci_module_SOURCES)
+MOD_FILES += pci.mod
+MARKER_FILES += pci.marker
+CLEANFILES += pci.marker
+
+pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += pci.module
+MODULE_FILES += pci.module$(EXEEXT)
+pci_module_SOURCES = bus/pci.c ## platform sources
+nodist_pci_module_SOURCES = ## platform nodist sources
+pci_module_LDADD =
+pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pci_module_SOURCES)
+CLEANFILES += $(nodist_pci_module_SOURCES)
+MOD_FILES += pci.mod
+MARKER_FILES += pci.marker
+CLEANFILES += pci.marker
+
+pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += cmostest.module
+MODULE_FILES += cmostest.module$(EXEEXT)
+cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+nodist_cmostest_module_SOURCES = ## platform nodist sources
+cmostest_module_LDADD =
+cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmostest_module_SOURCES)
+CLEANFILES += $(nodist_cmostest_module_SOURCES)
+MOD_FILES += cmostest.mod
+MARKER_FILES += cmostest.marker
+CLEANFILES += cmostest.marker
+
+cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += cmostest.module
+MODULE_FILES += cmostest.module$(EXEEXT)
+cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+nodist_cmostest_module_SOURCES = ## platform nodist sources
+cmostest_module_LDADD =
+cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmostest_module_SOURCES)
+CLEANFILES += $(nodist_cmostest_module_SOURCES)
+MOD_FILES += cmostest.mod
+MARKER_FILES += cmostest.marker
+CLEANFILES += cmostest.marker
+
+cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += cmostest.module
+MODULE_FILES += cmostest.module$(EXEEXT)
+cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+nodist_cmostest_module_SOURCES = ## platform nodist sources
+cmostest_module_LDADD =
+cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmostest_module_SOURCES)
+CLEANFILES += $(nodist_cmostest_module_SOURCES)
+MOD_FILES += cmostest.mod
+MARKER_FILES += cmostest.marker
+CLEANFILES += cmostest.marker
+
+cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += cmostest.module
+MODULE_FILES += cmostest.module$(EXEEXT)
+cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+nodist_cmostest_module_SOURCES = ## platform nodist sources
+cmostest_module_LDADD =
+cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmostest_module_SOURCES)
+CLEANFILES += $(nodist_cmostest_module_SOURCES)
+MOD_FILES += cmostest.mod
+MARKER_FILES += cmostest.marker
+CLEANFILES += cmostest.marker
+
+cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += cmostest.module
+MODULE_FILES += cmostest.module$(EXEEXT)
+cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+nodist_cmostest_module_SOURCES = ## platform nodist sources
+cmostest_module_LDADD =
+cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmostest_module_SOURCES)
+CLEANFILES += $(nodist_cmostest_module_SOURCES)
+MOD_FILES += cmostest.mod
+MARKER_FILES += cmostest.marker
+CLEANFILES += cmostest.marker
+
+cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += cmostest.module
+MODULE_FILES += cmostest.module$(EXEEXT)
+cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+nodist_cmostest_module_SOURCES = ## platform nodist sources
+cmostest_module_LDADD =
+cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmostest_module_SOURCES)
+CLEANFILES += $(nodist_cmostest_module_SOURCES)
+MOD_FILES += cmostest.mod
+MARKER_FILES += cmostest.marker
+CLEANFILES += cmostest.marker
+
+cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += iorw.module
+MODULE_FILES += iorw.module$(EXEEXT)
+iorw_module_SOURCES = commands/iorw.c ## platform sources
+nodist_iorw_module_SOURCES = ## platform nodist sources
+iorw_module_LDADD =
+iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iorw_module_SOURCES)
+CLEANFILES += $(nodist_iorw_module_SOURCES)
+MOD_FILES += iorw.mod
+MARKER_FILES += iorw.marker
+CLEANFILES += iorw.marker
+
+iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += iorw.module
+MODULE_FILES += iorw.module$(EXEEXT)
+iorw_module_SOURCES = commands/iorw.c ## platform sources
+nodist_iorw_module_SOURCES = ## platform nodist sources
+iorw_module_LDADD =
+iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iorw_module_SOURCES)
+CLEANFILES += $(nodist_iorw_module_SOURCES)
+MOD_FILES += iorw.mod
+MARKER_FILES += iorw.marker
+CLEANFILES += iorw.marker
+
+iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += iorw.module
+MODULE_FILES += iorw.module$(EXEEXT)
+iorw_module_SOURCES = commands/iorw.c ## platform sources
+nodist_iorw_module_SOURCES = ## platform nodist sources
+iorw_module_LDADD =
+iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iorw_module_SOURCES)
+CLEANFILES += $(nodist_iorw_module_SOURCES)
+MOD_FILES += iorw.mod
+MARKER_FILES += iorw.marker
+CLEANFILES += iorw.marker
+
+iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += iorw.module
+MODULE_FILES += iorw.module$(EXEEXT)
+iorw_module_SOURCES = commands/iorw.c ## platform sources
+nodist_iorw_module_SOURCES = ## platform nodist sources
+iorw_module_LDADD =
+iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iorw_module_SOURCES)
+CLEANFILES += $(nodist_iorw_module_SOURCES)
+MOD_FILES += iorw.mod
+MARKER_FILES += iorw.marker
+CLEANFILES += iorw.marker
+
+iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += iorw.module
+MODULE_FILES += iorw.module$(EXEEXT)
+iorw_module_SOURCES = commands/iorw.c ## platform sources
+nodist_iorw_module_SOURCES = ## platform nodist sources
+iorw_module_LDADD =
+iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iorw_module_SOURCES)
+CLEANFILES += $(nodist_iorw_module_SOURCES)
+MOD_FILES += iorw.mod
+MARKER_FILES += iorw.marker
+CLEANFILES += iorw.marker
+
+iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += iorw.module
+MODULE_FILES += iorw.module$(EXEEXT)
+iorw_module_SOURCES = commands/iorw.c ## platform sources
+nodist_iorw_module_SOURCES = ## platform nodist sources
+iorw_module_LDADD =
+iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iorw_module_SOURCES)
+CLEANFILES += $(nodist_iorw_module_SOURCES)
+MOD_FILES += iorw.mod
+MARKER_FILES += iorw.marker
+CLEANFILES += iorw.marker
+
+iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += iorw.module
+MODULE_FILES += iorw.module$(EXEEXT)
+iorw_module_SOURCES = commands/iorw.c ## platform sources
+nodist_iorw_module_SOURCES = ## platform nodist sources
+iorw_module_LDADD =
+iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iorw_module_SOURCES)
+CLEANFILES += $(nodist_iorw_module_SOURCES)
+MOD_FILES += iorw.mod
+MARKER_FILES += iorw.marker
+CLEANFILES += iorw.marker
+
+iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += regexp.module
+MODULE_FILES += regexp.module$(EXEEXT)
+regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+nodist_regexp_module_SOURCES = ## platform nodist sources
+regexp_module_LDADD = libgnulib.a
+regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_regexp_module_SOURCES)
+CLEANFILES += $(nodist_regexp_module_SOURCES)
+MOD_FILES += regexp.mod
+MARKER_FILES += regexp.marker
+CLEANFILES += regexp.marker
+
+regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += acpi.module
+MODULE_FILES += acpi.module$(EXEEXT)
+acpi_module_SOURCES = commands/i386/pc/acpi.c commands/acpi.c ## platform sources
+nodist_acpi_module_SOURCES = ## platform nodist sources
+acpi_module_LDADD =
+acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_acpi_module_SOURCES)
+CLEANFILES += $(nodist_acpi_module_SOURCES)
+MOD_FILES += acpi.mod
+MARKER_FILES += acpi.marker
+CLEANFILES += acpi.marker
+
+acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += acpi.module
+MODULE_FILES += acpi.module$(EXEEXT)
+acpi_module_SOURCES = commands/efi/acpi.c commands/acpi.c ## platform sources
+nodist_acpi_module_SOURCES = ## platform nodist sources
+acpi_module_LDADD =
+acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_acpi_module_SOURCES)
+CLEANFILES += $(nodist_acpi_module_SOURCES)
+MOD_FILES += acpi.mod
+MARKER_FILES += acpi.marker
+CLEANFILES += acpi.marker
+
+acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += acpi.module
+MODULE_FILES += acpi.module$(EXEEXT)
+acpi_module_SOURCES = commands/i386/pc/acpi.c commands/acpi.c ## platform sources
+nodist_acpi_module_SOURCES = ## platform nodist sources
+acpi_module_LDADD =
+acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_acpi_module_SOURCES)
+CLEANFILES += $(nodist_acpi_module_SOURCES)
+MOD_FILES += acpi.mod
+MARKER_FILES += acpi.marker
+CLEANFILES += acpi.marker
+
+acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += acpi.module
+MODULE_FILES += acpi.module$(EXEEXT)
+acpi_module_SOURCES = commands/i386/pc/acpi.c commands/acpi.c ## platform sources
+nodist_acpi_module_SOURCES = ## platform nodist sources
+acpi_module_LDADD =
+acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_acpi_module_SOURCES)
+CLEANFILES += $(nodist_acpi_module_SOURCES)
+MOD_FILES += acpi.mod
+MARKER_FILES += acpi.marker
+CLEANFILES += acpi.marker
+
+acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += acpi.module
+MODULE_FILES += acpi.module$(EXEEXT)
+acpi_module_SOURCES = commands/efi/acpi.c commands/acpi.c ## platform sources
+nodist_acpi_module_SOURCES = ## platform nodist sources
+acpi_module_LDADD =
+acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_acpi_module_SOURCES)
+CLEANFILES += $(nodist_acpi_module_SOURCES)
+MOD_FILES += acpi.mod
+MARKER_FILES += acpi.marker
+CLEANFILES += acpi.marker
+
+acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += lsacpi.module
+MODULE_FILES += lsacpi.module$(EXEEXT)
+lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+nodist_lsacpi_module_SOURCES = ## platform nodist sources
+lsacpi_module_LDADD =
+lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsacpi_module_SOURCES)
+CLEANFILES += $(nodist_lsacpi_module_SOURCES)
+MOD_FILES += lsacpi.mod
+MARKER_FILES += lsacpi.marker
+CLEANFILES += lsacpi.marker
+
+lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += lsacpi.module
+MODULE_FILES += lsacpi.module$(EXEEXT)
+lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+nodist_lsacpi_module_SOURCES = ## platform nodist sources
+lsacpi_module_LDADD =
+lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsacpi_module_SOURCES)
+CLEANFILES += $(nodist_lsacpi_module_SOURCES)
+MOD_FILES += lsacpi.mod
+MARKER_FILES += lsacpi.marker
+CLEANFILES += lsacpi.marker
+
+lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += lsacpi.module
+MODULE_FILES += lsacpi.module$(EXEEXT)
+lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+nodist_lsacpi_module_SOURCES = ## platform nodist sources
+lsacpi_module_LDADD =
+lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsacpi_module_SOURCES)
+CLEANFILES += $(nodist_lsacpi_module_SOURCES)
+MOD_FILES += lsacpi.mod
+MARKER_FILES += lsacpi.marker
+CLEANFILES += lsacpi.marker
+
+lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += lsacpi.module
+MODULE_FILES += lsacpi.module$(EXEEXT)
+lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+nodist_lsacpi_module_SOURCES = ## platform nodist sources
+lsacpi_module_LDADD =
+lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsacpi_module_SOURCES)
+CLEANFILES += $(nodist_lsacpi_module_SOURCES)
+MOD_FILES += lsacpi.mod
+MARKER_FILES += lsacpi.marker
+CLEANFILES += lsacpi.marker
+
+lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += lsacpi.module
+MODULE_FILES += lsacpi.module$(EXEEXT)
+lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+nodist_lsacpi_module_SOURCES = ## platform nodist sources
+lsacpi_module_LDADD =
+lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsacpi_module_SOURCES)
+CLEANFILES += $(nodist_lsacpi_module_SOURCES)
+MOD_FILES += lsacpi.mod
+MARKER_FILES += lsacpi.marker
+CLEANFILES += lsacpi.marker
+
+lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += lsefisystab.module
+MODULE_FILES += lsefisystab.module$(EXEEXT)
+lsefisystab_module_SOURCES = commands/efi/lsefisystab.c ## platform sources
+nodist_lsefisystab_module_SOURCES = ## platform nodist sources
+lsefisystab_module_LDADD =
+lsefisystab_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsefisystab_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsefisystab_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsefisystab_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsefisystab_module_SOURCES)
+CLEANFILES += $(nodist_lsefisystab_module_SOURCES)
+MOD_FILES += lsefisystab.mod
+MARKER_FILES += lsefisystab.marker
+CLEANFILES += lsefisystab.marker
+
+lsefisystab.marker: $(lsefisystab_module_SOURCES) $(nodist_lsefisystab_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += lsefisystab.module
+MODULE_FILES += lsefisystab.module$(EXEEXT)
+lsefisystab_module_SOURCES = commands/efi/lsefisystab.c ## platform sources
+nodist_lsefisystab_module_SOURCES = ## platform nodist sources
+lsefisystab_module_LDADD =
+lsefisystab_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsefisystab_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsefisystab_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsefisystab_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsefisystab_module_SOURCES)
+CLEANFILES += $(nodist_lsefisystab_module_SOURCES)
+MOD_FILES += lsefisystab.mod
+MARKER_FILES += lsefisystab.marker
+CLEANFILES += lsefisystab.marker
+
+lsefisystab.marker: $(lsefisystab_module_SOURCES) $(nodist_lsefisystab_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += lssal.module
+MODULE_FILES += lssal.module$(EXEEXT)
+lssal_module_SOURCES = commands/efi/lssal.c ## platform sources
+nodist_lssal_module_SOURCES = ## platform nodist sources
+lssal_module_LDADD =
+lssal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lssal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lssal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lssal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lssal_module_SOURCES)
+CLEANFILES += $(nodist_lssal_module_SOURCES)
+MOD_FILES += lssal.mod
+MARKER_FILES += lssal.marker
+CLEANFILES += lssal.marker
+
+lssal.marker: $(lssal_module_SOURCES) $(nodist_lssal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += lssal.module
+MODULE_FILES += lssal.module$(EXEEXT)
+lssal_module_SOURCES = commands/efi/lssal.c ## platform sources
+nodist_lssal_module_SOURCES = ## platform nodist sources
+lssal_module_LDADD =
+lssal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lssal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lssal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lssal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lssal_module_SOURCES)
+CLEANFILES += $(nodist_lssal_module_SOURCES)
+MOD_FILES += lssal.mod
+MARKER_FILES += lssal.marker
+CLEANFILES += lssal.marker
+
+lssal.marker: $(lssal_module_SOURCES) $(nodist_lssal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += lsefimmap.module
+MODULE_FILES += lsefimmap.module$(EXEEXT)
+lsefimmap_module_SOURCES = commands/efi/lsefimmap.c ## platform sources
+nodist_lsefimmap_module_SOURCES = ## platform nodist sources
+lsefimmap_module_LDADD =
+lsefimmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsefimmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsefimmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsefimmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsefimmap_module_SOURCES)
+CLEANFILES += $(nodist_lsefimmap_module_SOURCES)
+MOD_FILES += lsefimmap.mod
+MARKER_FILES += lsefimmap.marker
+CLEANFILES += lsefimmap.marker
+
+lsefimmap.marker: $(lsefimmap_module_SOURCES) $(nodist_lsefimmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += lsefimmap.module
+MODULE_FILES += lsefimmap.module$(EXEEXT)
+lsefimmap_module_SOURCES = commands/efi/lsefimmap.c ## platform sources
+nodist_lsefimmap_module_SOURCES = ## platform nodist sources
+lsefimmap_module_LDADD =
+lsefimmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsefimmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsefimmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsefimmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsefimmap_module_SOURCES)
+CLEANFILES += $(nodist_lsefimmap_module_SOURCES)
+MOD_FILES += lsefimmap.mod
+MARKER_FILES += lsefimmap.marker
+CLEANFILES += lsefimmap.marker
+
+lsefimmap.marker: $(lsefimmap_module_SOURCES) $(nodist_lsefimmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += blocklist.module
+MODULE_FILES += blocklist.module$(EXEEXT)
+blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+nodist_blocklist_module_SOURCES = ## platform nodist sources
+blocklist_module_LDADD =
+blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_blocklist_module_SOURCES)
+CLEANFILES += $(nodist_blocklist_module_SOURCES)
+MOD_FILES += blocklist.mod
+MARKER_FILES += blocklist.marker
+CLEANFILES += blocklist.marker
+
+blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = lib/i386/pc/biosnum.c commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += boot.module
+MODULE_FILES += boot.module$(EXEEXT)
+boot_module_SOURCES = commands/boot.c ## platform sources
+nodist_boot_module_SOURCES = ## platform nodist sources
+boot_module_LDADD =
+boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_module_SOURCES)
+CLEANFILES += $(nodist_boot_module_SOURCES)
+MOD_FILES += boot.mod
+MARKER_FILES += boot.marker
+CLEANFILES += boot.marker
+
+boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += cat.module
+MODULE_FILES += cat.module$(EXEEXT)
+cat_module_SOURCES = commands/cat.c ## platform sources
+nodist_cat_module_SOURCES = ## platform nodist sources
+cat_module_LDADD =
+cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cat_module_SOURCES)
+CLEANFILES += $(nodist_cat_module_SOURCES)
+MOD_FILES += cat.mod
+MARKER_FILES += cat.marker
+CLEANFILES += cat.marker
+
+cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += cmp.module
+MODULE_FILES += cmp.module$(EXEEXT)
+cmp_module_SOURCES = commands/cmp.c ## platform sources
+nodist_cmp_module_SOURCES = ## platform nodist sources
+cmp_module_LDADD =
+cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cmp_module_SOURCES)
+CLEANFILES += $(nodist_cmp_module_SOURCES)
+MOD_FILES += cmp.mod
+MARKER_FILES += cmp.marker
+CLEANFILES += cmp.marker
+
+cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += configfile.module
+MODULE_FILES += configfile.module$(EXEEXT)
+configfile_module_SOURCES = commands/configfile.c ## platform sources
+nodist_configfile_module_SOURCES = ## platform nodist sources
+configfile_module_LDADD =
+configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_configfile_module_SOURCES)
+CLEANFILES += $(nodist_configfile_module_SOURCES)
+MOD_FILES += configfile.mod
+MARKER_FILES += configfile.marker
+CLEANFILES += configfile.marker
+
+configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += cpuid.module
+MODULE_FILES += cpuid.module$(EXEEXT)
+cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+nodist_cpuid_module_SOURCES = ## platform nodist sources
+cpuid_module_LDADD =
+cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpuid_module_SOURCES)
+CLEANFILES += $(nodist_cpuid_module_SOURCES)
+MOD_FILES += cpuid.mod
+MARKER_FILES += cpuid.marker
+CLEANFILES += cpuid.marker
+
+cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += cpuid.module
+MODULE_FILES += cpuid.module$(EXEEXT)
+cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+nodist_cpuid_module_SOURCES = ## platform nodist sources
+cpuid_module_LDADD =
+cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpuid_module_SOURCES)
+CLEANFILES += $(nodist_cpuid_module_SOURCES)
+MOD_FILES += cpuid.mod
+MARKER_FILES += cpuid.marker
+CLEANFILES += cpuid.marker
+
+cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += cpuid.module
+MODULE_FILES += cpuid.module$(EXEEXT)
+cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+nodist_cpuid_module_SOURCES = ## platform nodist sources
+cpuid_module_LDADD =
+cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpuid_module_SOURCES)
+CLEANFILES += $(nodist_cpuid_module_SOURCES)
+MOD_FILES += cpuid.mod
+MARKER_FILES += cpuid.marker
+CLEANFILES += cpuid.marker
+
+cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += cpuid.module
+MODULE_FILES += cpuid.module$(EXEEXT)
+cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+nodist_cpuid_module_SOURCES = ## platform nodist sources
+cpuid_module_LDADD =
+cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpuid_module_SOURCES)
+CLEANFILES += $(nodist_cpuid_module_SOURCES)
+MOD_FILES += cpuid.mod
+MARKER_FILES += cpuid.marker
+CLEANFILES += cpuid.marker
+
+cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += cpuid.module
+MODULE_FILES += cpuid.module$(EXEEXT)
+cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+nodist_cpuid_module_SOURCES = ## platform nodist sources
+cpuid_module_LDADD =
+cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpuid_module_SOURCES)
+CLEANFILES += $(nodist_cpuid_module_SOURCES)
+MOD_FILES += cpuid.mod
+MARKER_FILES += cpuid.marker
+CLEANFILES += cpuid.marker
+
+cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += cpuid.module
+MODULE_FILES += cpuid.module$(EXEEXT)
+cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+nodist_cpuid_module_SOURCES = ## platform nodist sources
+cpuid_module_LDADD =
+cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpuid_module_SOURCES)
+CLEANFILES += $(nodist_cpuid_module_SOURCES)
+MOD_FILES += cpuid.mod
+MARKER_FILES += cpuid.marker
+CLEANFILES += cpuid.marker
+
+cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += cpuid.module
+MODULE_FILES += cpuid.module$(EXEEXT)
+cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+nodist_cpuid_module_SOURCES = ## platform nodist sources
+cpuid_module_LDADD =
+cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpuid_module_SOURCES)
+CLEANFILES += $(nodist_cpuid_module_SOURCES)
+MOD_FILES += cpuid.mod
+MARKER_FILES += cpuid.marker
+CLEANFILES += cpuid.marker
+
+cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += date.module
+MODULE_FILES += date.module$(EXEEXT)
+date_module_SOURCES = commands/date.c ## platform sources
+nodist_date_module_SOURCES = ## platform nodist sources
+date_module_LDADD =
+date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_date_module_SOURCES)
+CLEANFILES += $(nodist_date_module_SOURCES)
+MOD_FILES += date.mod
+MARKER_FILES += date.marker
+CLEANFILES += date.marker
+
+date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += drivemap.module
+MODULE_FILES += drivemap.module$(EXEEXT)
+drivemap_module_SOURCES = commands/i386/pc/drivemap.c commands/i386/pc/drivemap_int13h.S ## platform sources
+nodist_drivemap_module_SOURCES = ## platform nodist sources
+drivemap_module_LDADD =
+drivemap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+drivemap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+drivemap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+drivemap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_drivemap_module_SOURCES)
+CLEANFILES += $(nodist_drivemap_module_SOURCES)
+MOD_FILES += drivemap.mod
+MARKER_FILES += drivemap.marker
+CLEANFILES += drivemap.marker
+
+drivemap.marker: $(drivemap_module_SOURCES) $(nodist_drivemap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += echo.module
+MODULE_FILES += echo.module$(EXEEXT)
+echo_module_SOURCES = commands/echo.c ## platform sources
+nodist_echo_module_SOURCES = ## platform nodist sources
+echo_module_LDADD =
+echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_echo_module_SOURCES)
+CLEANFILES += $(nodist_echo_module_SOURCES)
+MOD_FILES += echo.mod
+MARKER_FILES += echo.marker
+CLEANFILES += echo.marker
+
+echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += extcmd.module
+MODULE_FILES += extcmd.module$(EXEEXT)
+extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+nodist_extcmd_module_SOURCES = ## platform nodist sources
+extcmd_module_LDADD =
+extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_extcmd_module_SOURCES)
+CLEANFILES += $(nodist_extcmd_module_SOURCES)
+MOD_FILES += extcmd.mod
+MARKER_FILES += extcmd.marker
+CLEANFILES += extcmd.marker
+
+extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += extcmd.module
+MODULE_FILES += extcmd.module$(EXEEXT)
+extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+nodist_extcmd_module_SOURCES = ## platform nodist sources
+extcmd_module_LDADD =
+extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_extcmd_module_SOURCES)
+CLEANFILES += $(nodist_extcmd_module_SOURCES)
+MOD_FILES += extcmd.mod
+MARKER_FILES += extcmd.marker
+CLEANFILES += extcmd.marker
+
+extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += extcmd.module
+MODULE_FILES += extcmd.module$(EXEEXT)
+extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+nodist_extcmd_module_SOURCES = ## platform nodist sources
+extcmd_module_LDADD =
+extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_extcmd_module_SOURCES)
+CLEANFILES += $(nodist_extcmd_module_SOURCES)
+MOD_FILES += extcmd.mod
+MARKER_FILES += extcmd.marker
+CLEANFILES += extcmd.marker
+
+extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += extcmd.module
+MODULE_FILES += extcmd.module$(EXEEXT)
+extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+nodist_extcmd_module_SOURCES = ## platform nodist sources
+extcmd_module_LDADD =
+extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_extcmd_module_SOURCES)
+CLEANFILES += $(nodist_extcmd_module_SOURCES)
+MOD_FILES += extcmd.mod
+MARKER_FILES += extcmd.marker
+CLEANFILES += extcmd.marker
+
+extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += extcmd.module
+MODULE_FILES += extcmd.module$(EXEEXT)
+extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+nodist_extcmd_module_SOURCES = ## platform nodist sources
+extcmd_module_LDADD =
+extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_extcmd_module_SOURCES)
+CLEANFILES += $(nodist_extcmd_module_SOURCES)
+MOD_FILES += extcmd.mod
+MARKER_FILES += extcmd.marker
+CLEANFILES += extcmd.marker
+
+extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += extcmd.module
+MODULE_FILES += extcmd.module$(EXEEXT)
+extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+nodist_extcmd_module_SOURCES = ## platform nodist sources
+extcmd_module_LDADD =
+extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_extcmd_module_SOURCES)
+CLEANFILES += $(nodist_extcmd_module_SOURCES)
+MOD_FILES += extcmd.mod
+MARKER_FILES += extcmd.marker
+CLEANFILES += extcmd.marker
+
+extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += extcmd.module
+MODULE_FILES += extcmd.module$(EXEEXT)
+extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+nodist_extcmd_module_SOURCES = ## platform nodist sources
+extcmd_module_LDADD =
+extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_extcmd_module_SOURCES)
+CLEANFILES += $(nodist_extcmd_module_SOURCES)
+MOD_FILES += extcmd.mod
+MARKER_FILES += extcmd.marker
+CLEANFILES += extcmd.marker
+
+extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += fixvideo.module
+MODULE_FILES += fixvideo.module$(EXEEXT)
+fixvideo_module_SOURCES = commands/efi/fixvideo.c ## platform sources
+nodist_fixvideo_module_SOURCES = ## platform nodist sources
+fixvideo_module_LDADD =
+fixvideo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fixvideo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fixvideo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fixvideo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fixvideo_module_SOURCES)
+CLEANFILES += $(nodist_fixvideo_module_SOURCES)
+MOD_FILES += fixvideo.mod
+MARKER_FILES += fixvideo.marker
+CLEANFILES += fixvideo.marker
+
+fixvideo.marker: $(fixvideo_module_SOURCES) $(nodist_fixvideo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += fixvideo.module
+MODULE_FILES += fixvideo.module$(EXEEXT)
+fixvideo_module_SOURCES = commands/efi/fixvideo.c ## platform sources
+nodist_fixvideo_module_SOURCES = ## platform nodist sources
+fixvideo_module_LDADD =
+fixvideo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fixvideo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fixvideo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fixvideo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fixvideo_module_SOURCES)
+CLEANFILES += $(nodist_fixvideo_module_SOURCES)
+MOD_FILES += fixvideo.mod
+MARKER_FILES += fixvideo.marker
+CLEANFILES += fixvideo.marker
+
+fixvideo.marker: $(fixvideo_module_SOURCES) $(nodist_fixvideo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gptsync.module
+MODULE_FILES += gptsync.module$(EXEEXT)
+gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+nodist_gptsync_module_SOURCES = ## platform nodist sources
+gptsync_module_LDADD =
+gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gptsync_module_SOURCES)
+CLEANFILES += $(nodist_gptsync_module_SOURCES)
+MOD_FILES += gptsync.mod
+MARKER_FILES += gptsync.marker
+CLEANFILES += gptsync.marker
+
+gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = lib/emu/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = commands/i386/pc/halt.c commands/acpihalt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = commands/acpihalt.c lib/efi/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = lib/i386/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = commands/acpihalt.c lib/i386/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = commands/acpihalt.c lib/i386/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = lib/ieee1275/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = commands/acpihalt.c lib/efi/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = lib/ieee1275/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += halt.module
+MODULE_FILES += halt.module$(EXEEXT)
+halt_module_SOURCES = lib/ieee1275/halt.c commands/halt.c ## platform sources
+nodist_halt_module_SOURCES = ## platform nodist sources
+halt_module_LDADD =
+halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_halt_module_SOURCES)
+CLEANFILES += $(nodist_halt_module_SOURCES)
+MOD_FILES += halt.mod
+MARKER_FILES += halt.marker
+CLEANFILES += halt.marker
+
+halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += hashsum.module
+MODULE_FILES += hashsum.module$(EXEEXT)
+hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+nodist_hashsum_module_SOURCES = ## platform nodist sources
+hashsum_module_LDADD =
+hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hashsum_module_SOURCES)
+CLEANFILES += $(nodist_hashsum_module_SOURCES)
+MOD_FILES += hashsum.mod
+MARKER_FILES += hashsum.marker
+CLEANFILES += hashsum.marker
+
+hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += hdparm.module
+MODULE_FILES += hdparm.module$(EXEEXT)
+hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+nodist_hdparm_module_SOURCES = ## platform nodist sources
+hdparm_module_LDADD =
+hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hdparm_module_SOURCES)
+CLEANFILES += $(nodist_hdparm_module_SOURCES)
+MOD_FILES += hdparm.mod
+MARKER_FILES += hdparm.marker
+CLEANFILES += hdparm.marker
+
+hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += help.module
+MODULE_FILES += help.module$(EXEEXT)
+help_module_SOURCES = commands/help.c ## platform sources
+nodist_help_module_SOURCES = ## platform nodist sources
+help_module_LDADD =
+help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_help_module_SOURCES)
+CLEANFILES += $(nodist_help_module_SOURCES)
+MOD_FILES += help.mod
+MARKER_FILES += help.marker
+CLEANFILES += help.marker
+
+help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += hexdump.module
+MODULE_FILES += hexdump.module$(EXEEXT)
+hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+nodist_hexdump_module_SOURCES = ## platform nodist sources
+hexdump_module_LDADD =
+hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hexdump_module_SOURCES)
+CLEANFILES += $(nodist_hexdump_module_SOURCES)
+MOD_FILES += hexdump.mod
+MARKER_FILES += hexdump.marker
+CLEANFILES += hexdump.marker
+
+hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += keystatus.module
+MODULE_FILES += keystatus.module$(EXEEXT)
+keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+nodist_keystatus_module_SOURCES = ## platform nodist sources
+keystatus_module_LDADD =
+keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keystatus_module_SOURCES)
+CLEANFILES += $(nodist_keystatus_module_SOURCES)
+MOD_FILES += keystatus.mod
+MARKER_FILES += keystatus.marker
+CLEANFILES += keystatus.marker
+
+keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += loadbios.module
+MODULE_FILES += loadbios.module$(EXEEXT)
+loadbios_module_SOURCES = commands/efi/loadbios.c ## platform sources
+nodist_loadbios_module_SOURCES = ## platform nodist sources
+loadbios_module_LDADD =
+loadbios_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadbios_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadbios_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadbios_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadbios_module_SOURCES)
+CLEANFILES += $(nodist_loadbios_module_SOURCES)
+MOD_FILES += loadbios.mod
+MARKER_FILES += loadbios.marker
+CLEANFILES += loadbios.marker
+
+loadbios.marker: $(loadbios_module_SOURCES) $(nodist_loadbios_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += loadbios.module
+MODULE_FILES += loadbios.module$(EXEEXT)
+loadbios_module_SOURCES = commands/efi/loadbios.c ## platform sources
+nodist_loadbios_module_SOURCES = ## platform nodist sources
+loadbios_module_LDADD =
+loadbios_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadbios_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadbios_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadbios_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadbios_module_SOURCES)
+CLEANFILES += $(nodist_loadbios_module_SOURCES)
+MOD_FILES += loadbios.mod
+MARKER_FILES += loadbios.marker
+CLEANFILES += loadbios.marker
+
+loadbios.marker: $(loadbios_module_SOURCES) $(nodist_loadbios_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += loadenv.module
+MODULE_FILES += loadenv.module$(EXEEXT)
+loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+nodist_loadenv_module_SOURCES = ## platform nodist sources
+loadenv_module_LDADD =
+loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loadenv_module_SOURCES)
+CLEANFILES += $(nodist_loadenv_module_SOURCES)
+MOD_FILES += loadenv.mod
+MARKER_FILES += loadenv.marker
+CLEANFILES += loadenv.marker
+
+loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += ls.module
+MODULE_FILES += ls.module$(EXEEXT)
+ls_module_SOURCES = commands/ls.c ## platform sources
+nodist_ls_module_SOURCES = ## platform nodist sources
+ls_module_LDADD =
+ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ls_module_SOURCES)
+CLEANFILES += $(nodist_ls_module_SOURCES)
+MOD_FILES += ls.mod
+MARKER_FILES += ls.marker
+CLEANFILES += ls.marker
+
+ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += lsmmap.module
+MODULE_FILES += lsmmap.module$(EXEEXT)
+lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+nodist_lsmmap_module_SOURCES = ## platform nodist sources
+lsmmap_module_LDADD =
+lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsmmap_module_SOURCES)
+CLEANFILES += $(nodist_lsmmap_module_SOURCES)
+MOD_FILES += lsmmap.mod
+MARKER_FILES += lsmmap.marker
+CLEANFILES += lsmmap.marker
+
+lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += lspci.module
+MODULE_FILES += lspci.module$(EXEEXT)
+lspci_module_SOURCES = commands/lspci.c ## platform sources
+nodist_lspci_module_SOURCES = ## platform nodist sources
+lspci_module_LDADD =
+lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lspci_module_SOURCES)
+CLEANFILES += $(nodist_lspci_module_SOURCES)
+MOD_FILES += lspci.mod
+MARKER_FILES += lspci.marker
+CLEANFILES += lspci.marker
+
+lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += memrw.module
+MODULE_FILES += memrw.module$(EXEEXT)
+memrw_module_SOURCES = commands/memrw.c ## platform sources
+nodist_memrw_module_SOURCES = ## platform nodist sources
+memrw_module_LDADD =
+memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memrw_module_SOURCES)
+CLEANFILES += $(nodist_memrw_module_SOURCES)
+MOD_FILES += memrw.mod
+MARKER_FILES += memrw.marker
+CLEANFILES += memrw.marker
+
+memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += minicmd.module
+MODULE_FILES += minicmd.module$(EXEEXT)
+minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+nodist_minicmd_module_SOURCES = ## platform nodist sources
+minicmd_module_LDADD =
+minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minicmd_module_SOURCES)
+CLEANFILES += $(nodist_minicmd_module_SOURCES)
+MOD_FILES += minicmd.mod
+MARKER_FILES += minicmd.marker
+CLEANFILES += minicmd.marker
+
+minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += parttool.module
+MODULE_FILES += parttool.module$(EXEEXT)
+parttool_module_SOURCES = commands/parttool.c ## platform sources
+nodist_parttool_module_SOURCES = ## platform nodist sources
+parttool_module_LDADD =
+parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_parttool_module_SOURCES)
+CLEANFILES += $(nodist_parttool_module_SOURCES)
+MOD_FILES += parttool.mod
+MARKER_FILES += parttool.marker
+CLEANFILES += parttool.marker
+
+parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += password.module
+MODULE_FILES += password.module$(EXEEXT)
+password_module_SOURCES = commands/password.c ## platform sources
+nodist_password_module_SOURCES = ## platform nodist sources
+password_module_LDADD =
+password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_module_SOURCES)
+CLEANFILES += $(nodist_password_module_SOURCES)
+MOD_FILES += password.mod
+MARKER_FILES += password.marker
+CLEANFILES += password.marker
+
+password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += password_pbkdf2.module
+MODULE_FILES += password_pbkdf2.module$(EXEEXT)
+password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+password_pbkdf2_module_LDADD =
+password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_password_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_password_pbkdf2_module_SOURCES)
+MOD_FILES += password_pbkdf2.mod
+MARKER_FILES += password_pbkdf2.marker
+CLEANFILES += password_pbkdf2.marker
+
+password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += play.module
+MODULE_FILES += play.module$(EXEEXT)
+play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+nodist_play_module_SOURCES = ## platform nodist sources
+play_module_LDADD =
+play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_play_module_SOURCES)
+CLEANFILES += $(nodist_play_module_SOURCES)
+MOD_FILES += play.mod
+MARKER_FILES += play.marker
+CLEANFILES += play.marker
+
+play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += play.module
+MODULE_FILES += play.module$(EXEEXT)
+play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+nodist_play_module_SOURCES = ## platform nodist sources
+play_module_LDADD =
+play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_play_module_SOURCES)
+CLEANFILES += $(nodist_play_module_SOURCES)
+MOD_FILES += play.mod
+MARKER_FILES += play.marker
+CLEANFILES += play.marker
+
+play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += play.module
+MODULE_FILES += play.module$(EXEEXT)
+play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+nodist_play_module_SOURCES = ## platform nodist sources
+play_module_LDADD =
+play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_play_module_SOURCES)
+CLEANFILES += $(nodist_play_module_SOURCES)
+MOD_FILES += play.mod
+MARKER_FILES += play.marker
+CLEANFILES += play.marker
+
+play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += play.module
+MODULE_FILES += play.module$(EXEEXT)
+play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+nodist_play_module_SOURCES = ## platform nodist sources
+play_module_LDADD =
+play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_play_module_SOURCES)
+CLEANFILES += $(nodist_play_module_SOURCES)
+MOD_FILES += play.mod
+MARKER_FILES += play.marker
+CLEANFILES += play.marker
+
+play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += play.module
+MODULE_FILES += play.module$(EXEEXT)
+play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+nodist_play_module_SOURCES = ## platform nodist sources
+play_module_LDADD =
+play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_play_module_SOURCES)
+CLEANFILES += $(nodist_play_module_SOURCES)
+MOD_FILES += play.mod
+MARKER_FILES += play.marker
+CLEANFILES += play.marker
+
+play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += play.module
+MODULE_FILES += play.module$(EXEEXT)
+play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+nodist_play_module_SOURCES = ## platform nodist sources
+play_module_LDADD =
+play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_play_module_SOURCES)
+CLEANFILES += $(nodist_play_module_SOURCES)
+MOD_FILES += play.mod
+MARKER_FILES += play.marker
+CLEANFILES += play.marker
+
+play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += play.module
+MODULE_FILES += play.module$(EXEEXT)
+play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+nodist_play_module_SOURCES = ## platform nodist sources
+play_module_LDADD =
+play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_play_module_SOURCES)
+CLEANFILES += $(nodist_play_module_SOURCES)
+MOD_FILES += play.mod
+MARKER_FILES += play.marker
+CLEANFILES += play.marker
+
+play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += probe.module
+MODULE_FILES += probe.module$(EXEEXT)
+probe_module_SOURCES = commands/probe.c ## platform sources
+nodist_probe_module_SOURCES = ## platform nodist sources
+probe_module_LDADD =
+probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_probe_module_SOURCES)
+CLEANFILES += $(nodist_probe_module_SOURCES)
+MOD_FILES += probe.mod
+MARKER_FILES += probe.marker
+CLEANFILES += probe.marker
+
+probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += pxecmd.module
+MODULE_FILES += pxecmd.module$(EXEEXT)
+pxecmd_module_SOURCES = commands/i386/pc/pxecmd.c ## platform sources
+nodist_pxecmd_module_SOURCES = ## platform nodist sources
+pxecmd_module_LDADD =
+pxecmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pxecmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pxecmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pxecmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pxecmd_module_SOURCES)
+CLEANFILES += $(nodist_pxecmd_module_SOURCES)
+MOD_FILES += pxecmd.mod
+MARKER_FILES += pxecmd.marker
+CLEANFILES += pxecmd.marker
+
+pxecmd.marker: $(pxecmd_module_SOURCES) $(nodist_pxecmd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxecmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += read.module
+MODULE_FILES += read.module$(EXEEXT)
+read_module_SOURCES = commands/read.c ## platform sources
+nodist_read_module_SOURCES = ## platform nodist sources
+read_module_LDADD =
+read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_read_module_SOURCES)
+CLEANFILES += $(nodist_read_module_SOURCES)
+MOD_FILES += read.mod
+MARKER_FILES += read.marker
+CLEANFILES += read.marker
+
+read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += reboot.module
+MODULE_FILES += reboot.module$(EXEEXT)
+reboot_module_SOURCES = commands/reboot.c ## platform sources
+nodist_reboot_module_SOURCES = ## platform nodist sources
+reboot_module_LDADD =
+reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reboot_module_SOURCES)
+CLEANFILES += $(nodist_reboot_module_SOURCES)
+MOD_FILES += reboot.mod
+MARKER_FILES += reboot.marker
+CLEANFILES += reboot.marker
+
+reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += search.module
+MODULE_FILES += search.module$(EXEEXT)
+search_module_SOURCES = commands/search_wrap.c ## platform sources
+nodist_search_module_SOURCES = ## platform nodist sources
+search_module_LDADD =
+search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += commands/search.c
+BUILT_SOURCES += $(nodist_search_module_SOURCES)
+CLEANFILES += $(nodist_search_module_SOURCES)
+MOD_FILES += search.mod
+MARKER_FILES += search.marker
+CLEANFILES += search.marker
+
+search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += search_fs_file.module
+MODULE_FILES += search_fs_file.module$(EXEEXT)
+search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+search_fs_file_module_LDADD =
+search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_file_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_file_module_SOURCES)
+MOD_FILES += search_fs_file.mod
+MARKER_FILES += search_fs_file.marker
+CLEANFILES += search_fs_file.marker
+
+search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += search_fs_uuid.module
+MODULE_FILES += search_fs_uuid.module$(EXEEXT)
+search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+search_fs_uuid_module_LDADD =
+search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_fs_uuid_module_SOURCES)
+CLEANFILES += $(nodist_search_fs_uuid_module_SOURCES)
+MOD_FILES += search_fs_uuid.mod
+MARKER_FILES += search_fs_uuid.marker
+CLEANFILES += search_fs_uuid.marker
+
+search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += search_label.module
+MODULE_FILES += search_label.module$(EXEEXT)
+search_label_module_SOURCES = commands/search_label.c ## platform sources
+nodist_search_label_module_SOURCES = ## platform nodist sources
+search_label_module_LDADD =
+search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_search_label_module_SOURCES)
+CLEANFILES += $(nodist_search_label_module_SOURCES)
+MOD_FILES += search_label.mod
+MARKER_FILES += search_label.marker
+CLEANFILES += search_label.marker
+
+search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += setpci.module
+MODULE_FILES += setpci.module$(EXEEXT)
+setpci_module_SOURCES = commands/setpci.c ## platform sources
+nodist_setpci_module_SOURCES = ## platform nodist sources
+setpci_module_LDADD =
+setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_setpci_module_SOURCES)
+CLEANFILES += $(nodist_setpci_module_SOURCES)
+MOD_FILES += setpci.mod
+MARKER_FILES += setpci.marker
+CLEANFILES += setpci.marker
+
+setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += setpci.module
+MODULE_FILES += setpci.module$(EXEEXT)
+setpci_module_SOURCES = commands/setpci.c ## platform sources
+nodist_setpci_module_SOURCES = ## platform nodist sources
+setpci_module_LDADD =
+setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_setpci_module_SOURCES)
+CLEANFILES += $(nodist_setpci_module_SOURCES)
+MOD_FILES += setpci.mod
+MARKER_FILES += setpci.marker
+CLEANFILES += setpci.marker
+
+setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += setpci.module
+MODULE_FILES += setpci.module$(EXEEXT)
+setpci_module_SOURCES = commands/setpci.c ## platform sources
+nodist_setpci_module_SOURCES = ## platform nodist sources
+setpci_module_LDADD =
+setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_setpci_module_SOURCES)
+CLEANFILES += $(nodist_setpci_module_SOURCES)
+MOD_FILES += setpci.mod
+MARKER_FILES += setpci.marker
+CLEANFILES += setpci.marker
+
+setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += setpci.module
+MODULE_FILES += setpci.module$(EXEEXT)
+setpci_module_SOURCES = commands/setpci.c ## platform sources
+nodist_setpci_module_SOURCES = ## platform nodist sources
+setpci_module_LDADD =
+setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_setpci_module_SOURCES)
+CLEANFILES += $(nodist_setpci_module_SOURCES)
+MOD_FILES += setpci.mod
+MARKER_FILES += setpci.marker
+CLEANFILES += setpci.marker
+
+setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += setpci.module
+MODULE_FILES += setpci.module$(EXEEXT)
+setpci_module_SOURCES = commands/setpci.c ## platform sources
+nodist_setpci_module_SOURCES = ## platform nodist sources
+setpci_module_LDADD =
+setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_setpci_module_SOURCES)
+CLEANFILES += $(nodist_setpci_module_SOURCES)
+MOD_FILES += setpci.mod
+MARKER_FILES += setpci.marker
+CLEANFILES += setpci.marker
+
+setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += setpci.module
+MODULE_FILES += setpci.module$(EXEEXT)
+setpci_module_SOURCES = commands/setpci.c ## platform sources
+nodist_setpci_module_SOURCES = ## platform nodist sources
+setpci_module_LDADD =
+setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_setpci_module_SOURCES)
+CLEANFILES += $(nodist_setpci_module_SOURCES)
+MOD_FILES += setpci.mod
+MARKER_FILES += setpci.marker
+CLEANFILES += setpci.marker
+
+setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += setpci.module
+MODULE_FILES += setpci.module$(EXEEXT)
+setpci_module_SOURCES = commands/setpci.c ## platform sources
+nodist_setpci_module_SOURCES = ## platform nodist sources
+setpci_module_LDADD =
+setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_setpci_module_SOURCES)
+CLEANFILES += $(nodist_setpci_module_SOURCES)
+MOD_FILES += setpci.mod
+MARKER_FILES += setpci.marker
+CLEANFILES += setpci.marker
+
+setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += sleep.module
+MODULE_FILES += sleep.module$(EXEEXT)
+sleep_module_SOURCES = commands/sleep.c ## platform sources
+nodist_sleep_module_SOURCES = ## platform nodist sources
+sleep_module_LDADD =
+sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sleep_module_SOURCES)
+CLEANFILES += $(nodist_sleep_module_SOURCES)
+MOD_FILES += sleep.mod
+MARKER_FILES += sleep.marker
+CLEANFILES += sleep.marker
+
+sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += suspend.module
+MODULE_FILES += suspend.module$(EXEEXT)
+suspend_module_SOURCES = commands/ieee1275/suspend.c ## platform sources
+nodist_suspend_module_SOURCES = ## platform nodist sources
+suspend_module_LDADD =
+suspend_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+suspend_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+suspend_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+suspend_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_suspend_module_SOURCES)
+CLEANFILES += $(nodist_suspend_module_SOURCES)
+MOD_FILES += suspend.mod
+MARKER_FILES += suspend.marker
+CLEANFILES += suspend.marker
+
+suspend.marker: $(suspend_module_SOURCES) $(nodist_suspend_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += suspend.module
+MODULE_FILES += suspend.module$(EXEEXT)
+suspend_module_SOURCES = commands/ieee1275/suspend.c ## platform sources
+nodist_suspend_module_SOURCES = ## platform nodist sources
+suspend_module_LDADD =
+suspend_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+suspend_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+suspend_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+suspend_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_suspend_module_SOURCES)
+CLEANFILES += $(nodist_suspend_module_SOURCES)
+MOD_FILES += suspend.mod
+MARKER_FILES += suspend.marker
+CLEANFILES += suspend.marker
+
+suspend.marker: $(suspend_module_SOURCES) $(nodist_suspend_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += terminal.module
+MODULE_FILES += terminal.module$(EXEEXT)
+terminal_module_SOURCES = commands/terminal.c ## platform sources
+nodist_terminal_module_SOURCES = ## platform nodist sources
+terminal_module_LDADD =
+terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminal_module_SOURCES)
+CLEANFILES += $(nodist_terminal_module_SOURCES)
+MOD_FILES += terminal.mod
+MARKER_FILES += terminal.marker
+CLEANFILES += terminal.marker
+
+terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += test.module
+MODULE_FILES += test.module$(EXEEXT)
+test_module_SOURCES = commands/test.c ## platform sources
+nodist_test_module_SOURCES = ## platform nodist sources
+test_module_LDADD =
+test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_module_SOURCES)
+CLEANFILES += $(nodist_test_module_SOURCES)
+MOD_FILES += test.mod
+MARKER_FILES += test.marker
+CLEANFILES += test.marker
+
+test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += true.module
+MODULE_FILES += true.module$(EXEEXT)
+true_module_SOURCES = commands/true.c ## platform sources
+nodist_true_module_SOURCES = ## platform nodist sources
+true_module_LDADD =
+true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_true_module_SOURCES)
+CLEANFILES += $(nodist_true_module_SOURCES)
+MOD_FILES += true.mod
+MARKER_FILES += true.marker
+CLEANFILES += true.marker
+
+true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+if COND_GRUB_EMU_USB
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif COND_GRUB_EMU_USB
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += usbtest.module
+MODULE_FILES += usbtest.module$(EXEEXT)
+usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+nodist_usbtest_module_SOURCES = ## platform nodist sources
+usbtest_module_LDADD =
+usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbtest_module_SOURCES)
+CLEANFILES += $(nodist_usbtest_module_SOURCES)
+MOD_FILES += usbtest.mod
+MARKER_FILES += usbtest.marker
+CLEANFILES += usbtest.marker
+
+usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += videoinfo.module
+MODULE_FILES += videoinfo.module$(EXEEXT)
+videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+nodist_videoinfo_module_SOURCES = ## platform nodist sources
+videoinfo_module_LDADD =
+videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videoinfo_module_SOURCES)
+CLEANFILES += $(nodist_videoinfo_module_SOURCES)
+MOD_FILES += videoinfo.mod
+MARKER_FILES += videoinfo.marker
+CLEANFILES += videoinfo.marker
+
+videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += videotest.module
+MODULE_FILES += videotest.module$(EXEEXT)
+videotest_module_SOURCES = commands/videotest.c ## platform sources
+nodist_videotest_module_SOURCES = ## platform nodist sources
+videotest_module_LDADD =
+videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_videotest_module_SOURCES)
+CLEANFILES += $(nodist_videotest_module_SOURCES)
+MOD_FILES += videotest.mod
+MARKER_FILES += videotest.marker
+CLEANFILES += videotest.marker
+
+videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += xnu_uuid.module
+MODULE_FILES += xnu_uuid.module$(EXEEXT)
+xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+xnu_uuid_module_LDADD =
+xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xnu_uuid_module_SOURCES)
+CLEANFILES += $(nodist_xnu_uuid_module_SOURCES)
+MOD_FILES += xnu_uuid.mod
+MARKER_FILES += xnu_uuid.marker
+CLEANFILES += xnu_uuid.marker
+
+xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += dm_nv.module
+MODULE_FILES += dm_nv.module$(EXEEXT)
+dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+nodist_dm_nv_module_SOURCES = ## platform nodist sources
+dm_nv_module_LDADD =
+dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_dm_nv_module_SOURCES)
+CLEANFILES += $(nodist_dm_nv_module_SOURCES)
+MOD_FILES += dm_nv.mod
+MARKER_FILES += dm_nv.marker
+CLEANFILES += dm_nv.marker
+
+dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += loopback.module
+MODULE_FILES += loopback.module$(EXEEXT)
+loopback_module_SOURCES = disk/loopback.c ## platform sources
+nodist_loopback_module_SOURCES = ## platform nodist sources
+loopback_module_LDADD =
+loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_loopback_module_SOURCES)
+CLEANFILES += $(nodist_loopback_module_SOURCES)
+MOD_FILES += loopback.mod
+MARKER_FILES += loopback.marker
+CLEANFILES += loopback.marker
+
+loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += lvm.module
+MODULE_FILES += lvm.module$(EXEEXT)
+lvm_module_SOURCES = disk/lvm.c ## platform sources
+nodist_lvm_module_SOURCES = ## platform nodist sources
+lvm_module_LDADD =
+lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lvm_module_SOURCES)
+CLEANFILES += $(nodist_lvm_module_SOURCES)
+MOD_FILES += lvm.mod
+MARKER_FILES += lvm.marker
+CLEANFILES += lvm.marker
+
+lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += mdraid09.module
+MODULE_FILES += mdraid09.module$(EXEEXT)
+mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+nodist_mdraid09_module_SOURCES = ## platform nodist sources
+mdraid09_module_LDADD =
+mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid09_module_SOURCES)
+CLEANFILES += $(nodist_mdraid09_module_SOURCES)
+MOD_FILES += mdraid09.mod
+MARKER_FILES += mdraid09.marker
+CLEANFILES += mdraid09.marker
+
+mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += mdraid1x.module
+MODULE_FILES += mdraid1x.module$(EXEEXT)
+mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+mdraid1x_module_LDADD =
+mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mdraid1x_module_SOURCES)
+CLEANFILES += $(nodist_mdraid1x_module_SOURCES)
+MOD_FILES += mdraid1x.mod
+MARKER_FILES += mdraid1x.marker
+CLEANFILES += mdraid1x.marker
+
+mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += raid.module
+MODULE_FILES += raid.module$(EXEEXT)
+raid_module_SOURCES = disk/raid.c ## platform sources
+nodist_raid_module_SOURCES = ## platform nodist sources
+raid_module_LDADD =
+raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid_module_SOURCES)
+CLEANFILES += $(nodist_raid_module_SOURCES)
+MOD_FILES += raid.mod
+MARKER_FILES += raid.marker
+CLEANFILES += raid.marker
+
+raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += raid5rec.module
+MODULE_FILES += raid5rec.module$(EXEEXT)
+raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+nodist_raid5rec_module_SOURCES = ## platform nodist sources
+raid5rec_module_LDADD =
+raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid5rec_module_SOURCES)
+CLEANFILES += $(nodist_raid5rec_module_SOURCES)
+MOD_FILES += raid5rec.mod
+MARKER_FILES += raid5rec.marker
+CLEANFILES += raid5rec.marker
+
+raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += raid6rec.module
+MODULE_FILES += raid6rec.module$(EXEEXT)
+raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+nodist_raid6rec_module_SOURCES = ## platform nodist sources
+raid6rec_module_LDADD =
+raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_raid6rec_module_SOURCES)
+CLEANFILES += $(nodist_raid6rec_module_SOURCES)
+MOD_FILES += raid6rec.mod
+MARKER_FILES += raid6rec.marker
+CLEANFILES += raid6rec.marker
+
+raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += scsi.module
+MODULE_FILES += scsi.module$(EXEEXT)
+scsi_module_SOURCES = disk/scsi.c ## platform sources
+nodist_scsi_module_SOURCES = ## platform nodist sources
+scsi_module_LDADD =
+scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_scsi_module_SOURCES)
+CLEANFILES += $(nodist_scsi_module_SOURCES)
+MOD_FILES += scsi.mod
+MARKER_FILES += scsi.marker
+CLEANFILES += scsi.marker
+
+scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += memdisk.module
+MODULE_FILES += memdisk.module$(EXEEXT)
+memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+nodist_memdisk_module_SOURCES = ## platform nodist sources
+memdisk_module_LDADD =
+memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_memdisk_module_SOURCES)
+CLEANFILES += $(nodist_memdisk_module_SOURCES)
+MOD_FILES += memdisk.mod
+MARKER_FILES += memdisk.marker
+CLEANFILES += memdisk.marker
+
+memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ata.module
+MODULE_FILES += ata.module$(EXEEXT)
+ata_module_SOURCES = disk/ata.c ## platform sources
+nodist_ata_module_SOURCES = ## platform nodist sources
+ata_module_LDADD =
+ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_module_SOURCES)
+CLEANFILES += $(nodist_ata_module_SOURCES)
+MOD_FILES += ata.mod
+MARKER_FILES += ata.marker
+CLEANFILES += ata.marker
+
+ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ata_pthru.module
+MODULE_FILES += ata_pthru.module$(EXEEXT)
+ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+ata_pthru_module_LDADD =
+ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ata_pthru_module_SOURCES)
+CLEANFILES += $(nodist_ata_pthru_module_SOURCES)
+MOD_FILES += ata_pthru.mod
+MARKER_FILES += ata_pthru.marker
+CLEANFILES += ata_pthru.marker
+
+ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += biosdisk.module
+MODULE_FILES += biosdisk.module$(EXEEXT)
+biosdisk_module_SOURCES = disk/i386/pc/biosdisk.c ## platform sources
+nodist_biosdisk_module_SOURCES = ## platform nodist sources
+biosdisk_module_LDADD =
+biosdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+biosdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+biosdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+biosdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_biosdisk_module_SOURCES)
+CLEANFILES += $(nodist_biosdisk_module_SOURCES)
+MOD_FILES += biosdisk.mod
+MARKER_FILES += biosdisk.marker
+CLEANFILES += biosdisk.marker
+
+biosdisk.marker: $(biosdisk_module_SOURCES) $(nodist_biosdisk_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(biosdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+if COND_GRUB_EMU_USB
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif COND_GRUB_EMU_USB
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += usbms.module
+MODULE_FILES += usbms.module$(EXEEXT)
+usbms_module_SOURCES = disk/usbms.c ## platform sources
+nodist_usbms_module_SOURCES = ## platform nodist sources
+usbms_module_LDADD =
+usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usbms_module_SOURCES)
+CLEANFILES += $(nodist_usbms_module_SOURCES)
+MOD_FILES += usbms.mod
+MARKER_FILES += usbms.marker
+CLEANFILES += usbms.marker
+
+usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += nand.module
+MODULE_FILES += nand.module$(EXEEXT)
+nand_module_SOURCES = disk/ieee1275/nand.c ## platform sources
+nodist_nand_module_SOURCES = ## platform nodist sources
+nand_module_LDADD =
+nand_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nand_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nand_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nand_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nand_module_SOURCES)
+CLEANFILES += $(nodist_nand_module_SOURCES)
+MOD_FILES += nand.mod
+MARKER_FILES += nand.marker
+CLEANFILES += nand.marker
+
+nand.marker: $(nand_module_SOURCES) $(nodist_nand_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nand_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += efiemu.module
+MODULE_FILES += efiemu.module$(EXEEXT)
+efiemu_module_SOURCES = efiemu/i386/pc/cfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+nodist_efiemu_module_SOURCES = ## platform nodist sources
+efiemu_module_LDADD =
+efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+BUILT_SOURCES += $(nodist_efiemu_module_SOURCES)
+CLEANFILES += $(nodist_efiemu_module_SOURCES)
+MOD_FILES += efiemu.mod
+MARKER_FILES += efiemu.marker
+CLEANFILES += efiemu.marker
+
+efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += efiemu.module
+MODULE_FILES += efiemu.module$(EXEEXT)
+efiemu_module_SOURCES = efiemu/i386/nocfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+nodist_efiemu_module_SOURCES = ## platform nodist sources
+efiemu_module_LDADD =
+efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+BUILT_SOURCES += $(nodist_efiemu_module_SOURCES)
+CLEANFILES += $(nodist_efiemu_module_SOURCES)
+MOD_FILES += efiemu.mod
+MARKER_FILES += efiemu.marker
+CLEANFILES += efiemu.marker
+
+efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += efiemu.module
+MODULE_FILES += efiemu.module$(EXEEXT)
+efiemu_module_SOURCES = efiemu/i386/pc/cfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+nodist_efiemu_module_SOURCES = ## platform nodist sources
+efiemu_module_LDADD =
+efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+BUILT_SOURCES += $(nodist_efiemu_module_SOURCES)
+CLEANFILES += $(nodist_efiemu_module_SOURCES)
+MOD_FILES += efiemu.mod
+MARKER_FILES += efiemu.marker
+CLEANFILES += efiemu.marker
+
+efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += efiemu.module
+MODULE_FILES += efiemu.module$(EXEEXT)
+efiemu_module_SOURCES = efiemu/i386/pc/cfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+nodist_efiemu_module_SOURCES = ## platform nodist sources
+efiemu_module_LDADD =
+efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+BUILT_SOURCES += $(nodist_efiemu_module_SOURCES)
+CLEANFILES += $(nodist_efiemu_module_SOURCES)
+MOD_FILES += efiemu.mod
+MARKER_FILES += efiemu.marker
+CLEANFILES += efiemu.marker
+
+efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += efiemu.module
+MODULE_FILES += efiemu.module$(EXEEXT)
+efiemu_module_SOURCES = efiemu/i386/nocfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+nodist_efiemu_module_SOURCES = ## platform nodist sources
+efiemu_module_LDADD =
+efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+BUILT_SOURCES += $(nodist_efiemu_module_SOURCES)
+CLEANFILES += $(nodist_efiemu_module_SOURCES)
+MOD_FILES += efiemu.mod
+MARKER_FILES += efiemu.marker
+CLEANFILES += efiemu.marker
+
+efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += font.module
+MODULE_FILES += font.module$(EXEEXT)
+font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+nodist_font_module_SOURCES = ## platform nodist sources
+font_module_LDADD =
+font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_font_module_SOURCES)
+CLEANFILES += $(nodist_font_module_SOURCES)
+MOD_FILES += font.mod
+MARKER_FILES += font.marker
+CLEANFILES += font.marker
+
+font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += affs.module
+MODULE_FILES += affs.module$(EXEEXT)
+affs_module_SOURCES = fs/affs.c ## platform sources
+nodist_affs_module_SOURCES = ## platform nodist sources
+affs_module_LDADD =
+affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_affs_module_SOURCES)
+CLEANFILES += $(nodist_affs_module_SOURCES)
+MOD_FILES += affs.mod
+MARKER_FILES += affs.marker
+CLEANFILES += affs.marker
+
+affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += afs.module
+MODULE_FILES += afs.module$(EXEEXT)
+afs_module_SOURCES = fs/afs.c ## platform sources
+nodist_afs_module_SOURCES = ## platform nodist sources
+afs_module_LDADD =
+afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_module_SOURCES)
+CLEANFILES += $(nodist_afs_module_SOURCES)
+MOD_FILES += afs.mod
+MARKER_FILES += afs.marker
+CLEANFILES += afs.marker
+
+afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += afs_be.module
+MODULE_FILES += afs_be.module$(EXEEXT)
+afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+nodist_afs_be_module_SOURCES = ## platform nodist sources
+afs_be_module_LDADD =
+afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_afs_be_module_SOURCES)
+CLEANFILES += $(nodist_afs_be_module_SOURCES)
+MOD_FILES += afs_be.mod
+MARKER_FILES += afs_be.marker
+CLEANFILES += afs_be.marker
+
+afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += befs.module
+MODULE_FILES += befs.module$(EXEEXT)
+befs_module_SOURCES = fs/befs.c ## platform sources
+nodist_befs_module_SOURCES = ## platform nodist sources
+befs_module_LDADD =
+befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_module_SOURCES)
+CLEANFILES += $(nodist_befs_module_SOURCES)
+MOD_FILES += befs.mod
+MARKER_FILES += befs.marker
+CLEANFILES += befs.marker
+
+befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += befs_be.module
+MODULE_FILES += befs_be.module$(EXEEXT)
+befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+nodist_befs_be_module_SOURCES = ## platform nodist sources
+befs_be_module_LDADD =
+befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_befs_be_module_SOURCES)
+CLEANFILES += $(nodist_befs_be_module_SOURCES)
+MOD_FILES += befs_be.mod
+MARKER_FILES += befs_be.marker
+CLEANFILES += befs_be.marker
+
+befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += btrfs.module
+MODULE_FILES += btrfs.module$(EXEEXT)
+btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+nodist_btrfs_module_SOURCES = ## platform nodist sources
+btrfs_module_LDADD =
+btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_btrfs_module_SOURCES)
+CLEANFILES += $(nodist_btrfs_module_SOURCES)
+MOD_FILES += btrfs.mod
+MARKER_FILES += btrfs.marker
+CLEANFILES += btrfs.marker
+
+btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += cpio.module
+MODULE_FILES += cpio.module$(EXEEXT)
+cpio_module_SOURCES = fs/cpio.c ## platform sources
+nodist_cpio_module_SOURCES = ## platform nodist sources
+cpio_module_LDADD =
+cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cpio_module_SOURCES)
+CLEANFILES += $(nodist_cpio_module_SOURCES)
+MOD_FILES += cpio.mod
+MARKER_FILES += cpio.marker
+CLEANFILES += cpio.marker
+
+cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += ext2.module
+MODULE_FILES += ext2.module$(EXEEXT)
+ext2_module_SOURCES = fs/ext2.c ## platform sources
+nodist_ext2_module_SOURCES = ## platform nodist sources
+ext2_module_LDADD =
+ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ext2_module_SOURCES)
+CLEANFILES += $(nodist_ext2_module_SOURCES)
+MOD_FILES += ext2.mod
+MARKER_FILES += ext2.marker
+CLEANFILES += ext2.marker
+
+ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += fat.module
+MODULE_FILES += fat.module$(EXEEXT)
+fat_module_SOURCES = fs/fat.c ## platform sources
+nodist_fat_module_SOURCES = ## platform nodist sources
+fat_module_LDADD =
+fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fat_module_SOURCES)
+CLEANFILES += $(nodist_fat_module_SOURCES)
+MOD_FILES += fat.mod
+MARKER_FILES += fat.marker
+CLEANFILES += fat.marker
+
+fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += fshelp.module
+MODULE_FILES += fshelp.module$(EXEEXT)
+fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+nodist_fshelp_module_SOURCES = ## platform nodist sources
+fshelp_module_LDADD =
+fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fshelp_module_SOURCES)
+CLEANFILES += $(nodist_fshelp_module_SOURCES)
+MOD_FILES += fshelp.mod
+MARKER_FILES += fshelp.marker
+CLEANFILES += fshelp.marker
+
+fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += hfs.module
+MODULE_FILES += hfs.module$(EXEEXT)
+hfs_module_SOURCES = fs/hfs.c ## platform sources
+nodist_hfs_module_SOURCES = ## platform nodist sources
+hfs_module_LDADD =
+hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfs_module_SOURCES)
+CLEANFILES += $(nodist_hfs_module_SOURCES)
+MOD_FILES += hfs.mod
+MARKER_FILES += hfs.marker
+CLEANFILES += hfs.marker
+
+hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += hfsplus.module
+MODULE_FILES += hfsplus.module$(EXEEXT)
+hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+nodist_hfsplus_module_SOURCES = ## platform nodist sources
+hfsplus_module_LDADD =
+hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hfsplus_module_SOURCES)
+CLEANFILES += $(nodist_hfsplus_module_SOURCES)
+MOD_FILES += hfsplus.mod
+MARKER_FILES += hfsplus.marker
+CLEANFILES += hfsplus.marker
+
+hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += iso9660.module
+MODULE_FILES += iso9660.module$(EXEEXT)
+iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+nodist_iso9660_module_SOURCES = ## platform nodist sources
+iso9660_module_LDADD =
+iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_iso9660_module_SOURCES)
+CLEANFILES += $(nodist_iso9660_module_SOURCES)
+MOD_FILES += iso9660.mod
+MARKER_FILES += iso9660.marker
+CLEANFILES += iso9660.marker
+
+iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += jfs.module
+MODULE_FILES += jfs.module$(EXEEXT)
+jfs_module_SOURCES = fs/jfs.c ## platform sources
+nodist_jfs_module_SOURCES = ## platform nodist sources
+jfs_module_LDADD =
+jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jfs_module_SOURCES)
+CLEANFILES += $(nodist_jfs_module_SOURCES)
+MOD_FILES += jfs.mod
+MARKER_FILES += jfs.marker
+CLEANFILES += jfs.marker
+
+jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += minix.module
+MODULE_FILES += minix.module$(EXEEXT)
+minix_module_SOURCES = fs/minix.c ## platform sources
+nodist_minix_module_SOURCES = ## platform nodist sources
+minix_module_LDADD =
+minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix_module_SOURCES)
+CLEANFILES += $(nodist_minix_module_SOURCES)
+MOD_FILES += minix.mod
+MARKER_FILES += minix.marker
+CLEANFILES += minix.marker
+
+minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += minix2.module
+MODULE_FILES += minix2.module$(EXEEXT)
+minix2_module_SOURCES = fs/minix2.c ## platform sources
+nodist_minix2_module_SOURCES = ## platform nodist sources
+minix2_module_LDADD =
+minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_minix2_module_SOURCES)
+CLEANFILES += $(nodist_minix2_module_SOURCES)
+MOD_FILES += minix2.mod
+MARKER_FILES += minix2.marker
+CLEANFILES += minix2.marker
+
+minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += nilfs2.module
+MODULE_FILES += nilfs2.module$(EXEEXT)
+nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+nodist_nilfs2_module_SOURCES = ## platform nodist sources
+nilfs2_module_LDADD =
+nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_nilfs2_module_SOURCES)
+CLEANFILES += $(nodist_nilfs2_module_SOURCES)
+MOD_FILES += nilfs2.mod
+MARKER_FILES += nilfs2.marker
+CLEANFILES += nilfs2.marker
+
+nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += ntfs.module
+MODULE_FILES += ntfs.module$(EXEEXT)
+ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+nodist_ntfs_module_SOURCES = ## platform nodist sources
+ntfs_module_LDADD =
+ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfs_module_SOURCES)
+CLEANFILES += $(nodist_ntfs_module_SOURCES)
+MOD_FILES += ntfs.mod
+MARKER_FILES += ntfs.marker
+CLEANFILES += ntfs.marker
+
+ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += ntfscomp.module
+MODULE_FILES += ntfscomp.module$(EXEEXT)
+ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+ntfscomp_module_LDADD =
+ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntfscomp_module_SOURCES)
+CLEANFILES += $(nodist_ntfscomp_module_SOURCES)
+MOD_FILES += ntfscomp.mod
+MARKER_FILES += ntfscomp.marker
+CLEANFILES += ntfscomp.marker
+
+ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += reiserfs.module
+MODULE_FILES += reiserfs.module$(EXEEXT)
+reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+nodist_reiserfs_module_SOURCES = ## platform nodist sources
+reiserfs_module_LDADD =
+reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_reiserfs_module_SOURCES)
+CLEANFILES += $(nodist_reiserfs_module_SOURCES)
+MOD_FILES += reiserfs.mod
+MARKER_FILES += reiserfs.marker
+CLEANFILES += reiserfs.marker
+
+reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += sfs.module
+MODULE_FILES += sfs.module$(EXEEXT)
+sfs_module_SOURCES = fs/sfs.c ## platform sources
+nodist_sfs_module_SOURCES = ## platform nodist sources
+sfs_module_LDADD =
+sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sfs_module_SOURCES)
+CLEANFILES += $(nodist_sfs_module_SOURCES)
+MOD_FILES += sfs.mod
+MARKER_FILES += sfs.marker
+CLEANFILES += sfs.marker
+
+sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += tar.module
+MODULE_FILES += tar.module$(EXEEXT)
+tar_module_SOURCES = fs/tar.c ## platform sources
+nodist_tar_module_SOURCES = ## platform nodist sources
+tar_module_LDADD =
+tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tar_module_SOURCES)
+CLEANFILES += $(nodist_tar_module_SOURCES)
+MOD_FILES += tar.mod
+MARKER_FILES += tar.marker
+CLEANFILES += tar.marker
+
+tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += udf.module
+MODULE_FILES += udf.module$(EXEEXT)
+udf_module_SOURCES = fs/udf.c ## platform sources
+nodist_udf_module_SOURCES = ## platform nodist sources
+udf_module_LDADD =
+udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_udf_module_SOURCES)
+CLEANFILES += $(nodist_udf_module_SOURCES)
+MOD_FILES += udf.mod
+MARKER_FILES += udf.marker
+CLEANFILES += udf.marker
+
+udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += ufs1.module
+MODULE_FILES += ufs1.module$(EXEEXT)
+ufs1_module_SOURCES = fs/ufs.c ## platform sources
+nodist_ufs1_module_SOURCES = ## platform nodist sources
+ufs1_module_LDADD =
+ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs1_module_SOURCES)
+CLEANFILES += $(nodist_ufs1_module_SOURCES)
+MOD_FILES += ufs1.mod
+MARKER_FILES += ufs1.marker
+CLEANFILES += ufs1.marker
+
+ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += ufs2.module
+MODULE_FILES += ufs2.module$(EXEEXT)
+ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+nodist_ufs2_module_SOURCES = ## platform nodist sources
+ufs2_module_LDADD =
+ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ufs2_module_SOURCES)
+CLEANFILES += $(nodist_ufs2_module_SOURCES)
+MOD_FILES += ufs2.mod
+MARKER_FILES += ufs2.marker
+CLEANFILES += ufs2.marker
+
+ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += xfs.module
+MODULE_FILES += xfs.module$(EXEEXT)
+xfs_module_SOURCES = fs/xfs.c ## platform sources
+nodist_xfs_module_SOURCES = ## platform nodist sources
+xfs_module_LDADD =
+xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xfs_module_SOURCES)
+CLEANFILES += $(nodist_xfs_module_SOURCES)
+MOD_FILES += xfs.mod
+MARKER_FILES += xfs.marker
+CLEANFILES += xfs.marker
+
+xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += zfs.module
+MODULE_FILES += zfs.module$(EXEEXT)
+zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+nodist_zfs_module_SOURCES = ## platform nodist sources
+zfs_module_LDADD =
+zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfs_module_SOURCES)
+CLEANFILES += $(nodist_zfs_module_SOURCES)
+MOD_FILES += zfs.mod
+MARKER_FILES += zfs.marker
+CLEANFILES += zfs.marker
+
+zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += zfsinfo.module
+MODULE_FILES += zfsinfo.module$(EXEEXT)
+zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+zfsinfo_module_LDADD =
+zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_zfsinfo_module_SOURCES)
+CLEANFILES += $(nodist_zfsinfo_module_SOURCES)
+MOD_FILES += zfsinfo.mod
+MARKER_FILES += zfsinfo.marker
+CLEANFILES += zfsinfo.marker
+
+zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += pxe.module
+MODULE_FILES += pxe.module$(EXEEXT)
+pxe_module_SOURCES = fs/i386/pc/pxe.c ## platform sources
+nodist_pxe_module_SOURCES = ## platform nodist sources
+pxe_module_LDADD =
+pxe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pxe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pxe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pxe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pxe_module_SOURCES)
+CLEANFILES += $(nodist_pxe_module_SOURCES)
+MOD_FILES += pxe.mod
+MARKER_FILES += pxe.marker
+CLEANFILES += pxe.marker
+
+pxe.marker: $(pxe_module_SOURCES) $(nodist_pxe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gettext.module
+MODULE_FILES += gettext.module$(EXEEXT)
+gettext_module_SOURCES = gettext/gettext.c ## platform sources
+nodist_gettext_module_SOURCES = ## platform nodist sources
+gettext_module_LDADD =
+gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gettext_module_SOURCES)
+CLEANFILES += $(nodist_gettext_module_SOURCES)
+MOD_FILES += gettext.mod
+MARKER_FILES += gettext.marker
+CLEANFILES += gettext.marker
+
+gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gfxmenu.module
+MODULE_FILES += gfxmenu.module$(EXEEXT)
+gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+gfxmenu_module_LDADD =
+gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxmenu_module_SOURCES)
+CLEANFILES += $(nodist_gfxmenu_module_SOURCES)
+MOD_FILES += gfxmenu.mod
+MARKER_FILES += gfxmenu.marker
+CLEANFILES += gfxmenu.marker
+
+gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += hello.module
+MODULE_FILES += hello.module$(EXEEXT)
+hello_module_SOURCES = hello/hello.c ## platform sources
+nodist_hello_module_SOURCES = ## platform nodist sources
+hello_module_LDADD =
+hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_hello_module_SOURCES)
+CLEANFILES += $(nodist_hello_module_SOURCES)
+MOD_FILES += hello.mod
+MARKER_FILES += hello.marker
+CLEANFILES += hello.marker
+
+hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gzio.module
+MODULE_FILES += gzio.module$(EXEEXT)
+gzio_module_SOURCES = io/gzio.c ## platform sources
+nodist_gzio_module_SOURCES = ## platform nodist sources
+gzio_module_LDADD =
+gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gzio_module_SOURCES)
+CLEANFILES += $(nodist_gzio_module_SOURCES)
+MOD_FILES += gzio.mod
+MARKER_FILES += gzio.marker
+CLEANFILES += gzio.marker
+
+gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += bufio.module
+MODULE_FILES += bufio.module$(EXEEXT)
+bufio_module_SOURCES = io/bufio.c ## platform sources
+nodist_bufio_module_SOURCES = ## platform nodist sources
+bufio_module_LDADD =
+bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bufio_module_SOURCES)
+CLEANFILES += $(nodist_bufio_module_SOURCES)
+MOD_FILES += bufio.mod
+MARKER_FILES += bufio.marker
+CLEANFILES += bufio.marker
+
+bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += elf.module
+MODULE_FILES += elf.module$(EXEEXT)
+elf_module_SOURCES = kern/elf.c ## platform sources
+nodist_elf_module_SOURCES = ## platform nodist sources
+elf_module_LDADD =
+elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_elf_module_SOURCES)
+CLEANFILES += $(nodist_elf_module_SOURCES)
+MOD_FILES += elf.mod
+MARKER_FILES += elf.marker
+CLEANFILES += elf.marker
+
+elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += crypto.module
+MODULE_FILES += crypto.module$(EXEEXT)
+crypto_module_SOURCES = lib/crypto.c ## platform sources
+nodist_crypto_module_SOURCES = ## platform nodist sources
+crypto_module_LDADD =
+crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst
+BUILT_SOURCES += $(nodist_crypto_module_SOURCES)
+CLEANFILES += $(nodist_crypto_module_SOURCES)
+MOD_FILES += crypto.mod
+MARKER_FILES += crypto.marker
+CLEANFILES += crypto.marker
+
+crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += pbkdf2.module
+MODULE_FILES += pbkdf2.module$(EXEEXT)
+pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+pbkdf2_module_LDADD =
+pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pbkdf2_module_SOURCES)
+CLEANFILES += $(nodist_pbkdf2_module_SOURCES)
+MOD_FILES += pbkdf2.mod
+MARKER_FILES += pbkdf2.marker
+CLEANFILES += pbkdf2.marker
+
+pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/efi/relocator.c lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/ieee1275/relocator.c lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/x86_64/relocator_asm.S lib/efi/relocator.c lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/mips/relocator_asm.S lib/mips/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += relocator.module
+MODULE_FILES += relocator.module$(EXEEXT)
+relocator_module_SOURCES = lib/powerpc/relocator_asm.S lib/powerpc/relocator.c lib/ieee1275/relocator.c lib/relocator.c ## platform sources
+nodist_relocator_module_SOURCES = ## platform nodist sources
+relocator_module_LDADD =
+relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+BUILT_SOURCES += $(nodist_relocator_module_SOURCES)
+CLEANFILES += $(nodist_relocator_module_SOURCES)
+MOD_FILES += relocator.mod
+MARKER_FILES += relocator.marker
+CLEANFILES += relocator.marker
+
+relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/efi/datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/efi/datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/ieee1275/datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += datetime.module
+MODULE_FILES += datetime.module$(EXEEXT)
+datetime_module_SOURCES = lib/ieee1275/datetime.c ## platform sources
+nodist_datetime_module_SOURCES = ## platform nodist sources
+datetime_module_LDADD =
+datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datetime_module_SOURCES)
+CLEANFILES += $(nodist_datetime_module_SOURCES)
+MOD_FILES += datetime.mod
+MARKER_FILES += datetime.marker
+CLEANFILES += datetime.marker
+
+datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += setjmp.module
+MODULE_FILES += setjmp.module$(EXEEXT)
+setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+nodist_setjmp_module_SOURCES = ## platform nodist sources
+setjmp_module_LDADD =
+setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+BUILT_SOURCES += $(nodist_setjmp_module_SOURCES)
+CLEANFILES += $(nodist_setjmp_module_SOURCES)
+MOD_FILES += setjmp.mod
+MARKER_FILES += setjmp.marker
+CLEANFILES += setjmp.marker
+
+setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += aout.module
+MODULE_FILES += aout.module$(EXEEXT)
+aout_module_SOURCES = loader/aout.c ## platform sources
+nodist_aout_module_SOURCES = ## platform nodist sources
+aout_module_LDADD =
+aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_aout_module_SOURCES)
+CLEANFILES += $(nodist_aout_module_SOURCES)
+MOD_FILES += aout.mod
+MARKER_FILES += aout.marker
+CLEANFILES += aout.marker
+
+aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += aout.module
+MODULE_FILES += aout.module$(EXEEXT)
+aout_module_SOURCES = loader/aout.c ## platform sources
+nodist_aout_module_SOURCES = ## platform nodist sources
+aout_module_LDADD =
+aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_aout_module_SOURCES)
+CLEANFILES += $(nodist_aout_module_SOURCES)
+MOD_FILES += aout.mod
+MARKER_FILES += aout.marker
+CLEANFILES += aout.marker
+
+aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += aout.module
+MODULE_FILES += aout.module$(EXEEXT)
+aout_module_SOURCES = loader/aout.c ## platform sources
+nodist_aout_module_SOURCES = ## platform nodist sources
+aout_module_LDADD =
+aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_aout_module_SOURCES)
+CLEANFILES += $(nodist_aout_module_SOURCES)
+MOD_FILES += aout.mod
+MARKER_FILES += aout.marker
+CLEANFILES += aout.marker
+
+aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += aout.module
+MODULE_FILES += aout.module$(EXEEXT)
+aout_module_SOURCES = loader/aout.c ## platform sources
+nodist_aout_module_SOURCES = ## platform nodist sources
+aout_module_LDADD =
+aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_aout_module_SOURCES)
+CLEANFILES += $(nodist_aout_module_SOURCES)
+MOD_FILES += aout.mod
+MARKER_FILES += aout.marker
+CLEANFILES += aout.marker
+
+aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += aout.module
+MODULE_FILES += aout.module$(EXEEXT)
+aout_module_SOURCES = loader/aout.c ## platform sources
+nodist_aout_module_SOURCES = ## platform nodist sources
+aout_module_LDADD =
+aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_aout_module_SOURCES)
+CLEANFILES += $(nodist_aout_module_SOURCES)
+MOD_FILES += aout.mod
+MARKER_FILES += aout.marker
+CLEANFILES += aout.marker
+
+aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += aout.module
+MODULE_FILES += aout.module$(EXEEXT)
+aout_module_SOURCES = loader/aout.c ## platform sources
+nodist_aout_module_SOURCES = ## platform nodist sources
+aout_module_LDADD =
+aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_aout_module_SOURCES)
+CLEANFILES += $(nodist_aout_module_SOURCES)
+MOD_FILES += aout.mod
+MARKER_FILES += aout.marker
+CLEANFILES += aout.marker
+
+aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += aout.module
+MODULE_FILES += aout.module$(EXEEXT)
+aout_module_SOURCES = loader/aout.c ## platform sources
+nodist_aout_module_SOURCES = ## platform nodist sources
+aout_module_LDADD =
+aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_aout_module_SOURCES)
+CLEANFILES += $(nodist_aout_module_SOURCES)
+MOD_FILES += aout.mod
+MARKER_FILES += aout.marker
+CLEANFILES += aout.marker
+
+aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += bsd.module
+MODULE_FILES += bsd.module$(EXEEXT)
+bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+nodist_bsd_module_SOURCES = ## platform nodist sources
+bsd_module_LDADD =
+bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+BUILT_SOURCES += $(nodist_bsd_module_SOURCES)
+CLEANFILES += $(nodist_bsd_module_SOURCES)
+MOD_FILES += bsd.mod
+MARKER_FILES += bsd.marker
+CLEANFILES += bsd.marker
+
+bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += bsd.module
+MODULE_FILES += bsd.module$(EXEEXT)
+bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+nodist_bsd_module_SOURCES = ## platform nodist sources
+bsd_module_LDADD =
+bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+BUILT_SOURCES += $(nodist_bsd_module_SOURCES)
+CLEANFILES += $(nodist_bsd_module_SOURCES)
+MOD_FILES += bsd.mod
+MARKER_FILES += bsd.marker
+CLEANFILES += bsd.marker
+
+bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += bsd.module
+MODULE_FILES += bsd.module$(EXEEXT)
+bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+nodist_bsd_module_SOURCES = ## platform nodist sources
+bsd_module_LDADD =
+bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+BUILT_SOURCES += $(nodist_bsd_module_SOURCES)
+CLEANFILES += $(nodist_bsd_module_SOURCES)
+MOD_FILES += bsd.mod
+MARKER_FILES += bsd.marker
+CLEANFILES += bsd.marker
+
+bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += bsd.module
+MODULE_FILES += bsd.module$(EXEEXT)
+bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+nodist_bsd_module_SOURCES = ## platform nodist sources
+bsd_module_LDADD =
+bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+BUILT_SOURCES += $(nodist_bsd_module_SOURCES)
+CLEANFILES += $(nodist_bsd_module_SOURCES)
+MOD_FILES += bsd.mod
+MARKER_FILES += bsd.marker
+CLEANFILES += bsd.marker
+
+bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += bsd.module
+MODULE_FILES += bsd.module$(EXEEXT)
+bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+nodist_bsd_module_SOURCES = ## platform nodist sources
+bsd_module_LDADD =
+bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+BUILT_SOURCES += $(nodist_bsd_module_SOURCES)
+CLEANFILES += $(nodist_bsd_module_SOURCES)
+MOD_FILES += bsd.mod
+MARKER_FILES += bsd.marker
+CLEANFILES += bsd.marker
+
+bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += bsd.module
+MODULE_FILES += bsd.module$(EXEEXT)
+bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+nodist_bsd_module_SOURCES = ## platform nodist sources
+bsd_module_LDADD =
+bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+BUILT_SOURCES += $(nodist_bsd_module_SOURCES)
+CLEANFILES += $(nodist_bsd_module_SOURCES)
+MOD_FILES += bsd.mod
+MARKER_FILES += bsd.marker
+CLEANFILES += bsd.marker
+
+bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += bsd.module
+MODULE_FILES += bsd.module$(EXEEXT)
+bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+nodist_bsd_module_SOURCES = ## platform nodist sources
+bsd_module_LDADD =
+bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+BUILT_SOURCES += $(nodist_bsd_module_SOURCES)
+CLEANFILES += $(nodist_bsd_module_SOURCES)
+MOD_FILES += bsd.mod
+MARKER_FILES += bsd.marker
+CLEANFILES += bsd.marker
+
+bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += linux16.module
+MODULE_FILES += linux16.module$(EXEEXT)
+linux16_module_SOURCES = loader/i386/pc/linux.c lib/cmdline.c ## platform sources
+nodist_linux16_module_SOURCES = ## platform nodist sources
+linux16_module_LDADD =
+linux16_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux16_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux16_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux16_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux16_module_SOURCES)
+CLEANFILES += $(nodist_linux16_module_SOURCES)
+MOD_FILES += linux16.mod
+MARKER_FILES += linux16.marker
+CLEANFILES += linux16.marker
+
+linux16.marker: $(linux16_module_SOURCES) $(nodist_linux16_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += ntldr.module
+MODULE_FILES += ntldr.module$(EXEEXT)
+ntldr_module_SOURCES = loader/i386/pc/ntldr.c ## platform sources
+nodist_ntldr_module_SOURCES = ## platform nodist sources
+ntldr_module_LDADD =
+ntldr_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ntldr_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ntldr_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ntldr_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ntldr_module_SOURCES)
+CLEANFILES += $(nodist_ntldr_module_SOURCES)
+MOD_FILES += ntldr.mod
+MARKER_FILES += ntldr.marker
+CLEANFILES += ntldr.marker
+
+ntldr.marker: $(ntldr_module_SOURCES) $(nodist_ntldr_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntldr_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += multiboot2.module
+MODULE_FILES += multiboot2.module$(EXEEXT)
+multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+nodist_multiboot2_module_SOURCES = ## platform nodist sources
+multiboot2_module_LDADD =
+multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_multiboot2_module_SOURCES)
+CLEANFILES += $(nodist_multiboot2_module_SOURCES)
+MOD_FILES += multiboot2.mod
+MARKER_FILES += multiboot2.marker
+CLEANFILES += multiboot2.marker
+
+multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += multiboot.module
+MODULE_FILES += multiboot.module$(EXEEXT)
+multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+nodist_multiboot_module_SOURCES = ## platform nodist sources
+multiboot_module_LDADD =
+multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/multiboot_elfxx.c
+BUILT_SOURCES += $(nodist_multiboot_module_SOURCES)
+CLEANFILES += $(nodist_multiboot_module_SOURCES)
+MOD_FILES += multiboot.mod
+MARKER_FILES += multiboot.marker
+CLEANFILES += multiboot.marker
+
+multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += multiboot.module
+MODULE_FILES += multiboot.module$(EXEEXT)
+multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+nodist_multiboot_module_SOURCES = ## platform nodist sources
+multiboot_module_LDADD =
+multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/multiboot_elfxx.c
+BUILT_SOURCES += $(nodist_multiboot_module_SOURCES)
+CLEANFILES += $(nodist_multiboot_module_SOURCES)
+MOD_FILES += multiboot.mod
+MARKER_FILES += multiboot.marker
+CLEANFILES += multiboot.marker
+
+multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += multiboot.module
+MODULE_FILES += multiboot.module$(EXEEXT)
+multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+nodist_multiboot_module_SOURCES = ## platform nodist sources
+multiboot_module_LDADD =
+multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/multiboot_elfxx.c
+BUILT_SOURCES += $(nodist_multiboot_module_SOURCES)
+CLEANFILES += $(nodist_multiboot_module_SOURCES)
+MOD_FILES += multiboot.mod
+MARKER_FILES += multiboot.marker
+CLEANFILES += multiboot.marker
+
+multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += multiboot.module
+MODULE_FILES += multiboot.module$(EXEEXT)
+multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+nodist_multiboot_module_SOURCES = ## platform nodist sources
+multiboot_module_LDADD =
+multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/multiboot_elfxx.c
+BUILT_SOURCES += $(nodist_multiboot_module_SOURCES)
+CLEANFILES += $(nodist_multiboot_module_SOURCES)
+MOD_FILES += multiboot.mod
+MARKER_FILES += multiboot.marker
+CLEANFILES += multiboot.marker
+
+multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += multiboot.module
+MODULE_FILES += multiboot.module$(EXEEXT)
+multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+nodist_multiboot_module_SOURCES = ## platform nodist sources
+multiboot_module_LDADD =
+multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/multiboot_elfxx.c
+BUILT_SOURCES += $(nodist_multiboot_module_SOURCES)
+CLEANFILES += $(nodist_multiboot_module_SOURCES)
+MOD_FILES += multiboot.mod
+MARKER_FILES += multiboot.marker
+CLEANFILES += multiboot.marker
+
+multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += multiboot.module
+MODULE_FILES += multiboot.module$(EXEEXT)
+multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+nodist_multiboot_module_SOURCES = ## platform nodist sources
+multiboot_module_LDADD =
+multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/multiboot_elfxx.c
+BUILT_SOURCES += $(nodist_multiboot_module_SOURCES)
+CLEANFILES += $(nodist_multiboot_module_SOURCES)
+MOD_FILES += multiboot.mod
+MARKER_FILES += multiboot.marker
+CLEANFILES += multiboot.marker
+
+multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += multiboot.module
+MODULE_FILES += multiboot.module$(EXEEXT)
+multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+nodist_multiboot_module_SOURCES = ## platform nodist sources
+multiboot_module_LDADD =
+multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/multiboot_elfxx.c
+BUILT_SOURCES += $(nodist_multiboot_module_SOURCES)
+CLEANFILES += $(nodist_multiboot_module_SOURCES)
+MOD_FILES += multiboot.mod
+MARKER_FILES += multiboot.marker
+CLEANFILES += multiboot.marker
+
+multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = lib/i386/pc/vesa_modes_table.c loader/i386/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/mips/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/sparc64/ieee1275/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += linux.module
+MODULE_FILES += linux.module$(EXEEXT)
+linux_module_SOURCES = loader/powerpc/ieee1275/linux.c lib/cmdline.c ## platform sources
+nodist_linux_module_SOURCES = ## platform nodist sources
+linux_module_LDADD =
+linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_linux_module_SOURCES)
+CLEANFILES += $(nodist_linux_module_SOURCES)
+MOD_FILES += linux.mod
+MARKER_FILES += linux.marker
+CLEANFILES += linux.marker
+
+linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += xnu.module
+MODULE_FILES += xnu.module$(EXEEXT)
+xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+nodist_xnu_module_SOURCES = ## platform nodist sources
+xnu_module_LDADD =
+xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/machoXX.c
+BUILT_SOURCES += $(nodist_xnu_module_SOURCES)
+CLEANFILES += $(nodist_xnu_module_SOURCES)
+MOD_FILES += xnu.mod
+MARKER_FILES += xnu.marker
+CLEANFILES += xnu.marker
+
+xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += xnu.module
+MODULE_FILES += xnu.module$(EXEEXT)
+xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+nodist_xnu_module_SOURCES = ## platform nodist sources
+xnu_module_LDADD =
+xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/machoXX.c
+BUILT_SOURCES += $(nodist_xnu_module_SOURCES)
+CLEANFILES += $(nodist_xnu_module_SOURCES)
+MOD_FILES += xnu.mod
+MARKER_FILES += xnu.marker
+CLEANFILES += xnu.marker
+
+xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += xnu.module
+MODULE_FILES += xnu.module$(EXEEXT)
+xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+nodist_xnu_module_SOURCES = ## platform nodist sources
+xnu_module_LDADD =
+xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/machoXX.c
+BUILT_SOURCES += $(nodist_xnu_module_SOURCES)
+CLEANFILES += $(nodist_xnu_module_SOURCES)
+MOD_FILES += xnu.mod
+MARKER_FILES += xnu.marker
+CLEANFILES += xnu.marker
+
+xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += xnu.module
+MODULE_FILES += xnu.module$(EXEEXT)
+xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+nodist_xnu_module_SOURCES = ## platform nodist sources
+xnu_module_LDADD =
+xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/machoXX.c
+BUILT_SOURCES += $(nodist_xnu_module_SOURCES)
+CLEANFILES += $(nodist_xnu_module_SOURCES)
+MOD_FILES += xnu.mod
+MARKER_FILES += xnu.marker
+CLEANFILES += xnu.marker
+
+xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += xnu.module
+MODULE_FILES += xnu.module$(EXEEXT)
+xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+nodist_xnu_module_SOURCES = ## platform nodist sources
+xnu_module_LDADD =
+xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/machoXX.c
+BUILT_SOURCES += $(nodist_xnu_module_SOURCES)
+CLEANFILES += $(nodist_xnu_module_SOURCES)
+MOD_FILES += xnu.mod
+MARKER_FILES += xnu.marker
+CLEANFILES += xnu.marker
+
+xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += xnu.module
+MODULE_FILES += xnu.module$(EXEEXT)
+xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+nodist_xnu_module_SOURCES = ## platform nodist sources
+xnu_module_LDADD =
+xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/machoXX.c
+BUILT_SOURCES += $(nodist_xnu_module_SOURCES)
+CLEANFILES += $(nodist_xnu_module_SOURCES)
+MOD_FILES += xnu.mod
+MARKER_FILES += xnu.marker
+CLEANFILES += xnu.marker
+
+xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += xnu.module
+MODULE_FILES += xnu.module$(EXEEXT)
+xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+nodist_xnu_module_SOURCES = ## platform nodist sources
+xnu_module_LDADD =
+xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += loader/machoXX.c
+BUILT_SOURCES += $(nodist_xnu_module_SOURCES)
+CLEANFILES += $(nodist_xnu_module_SOURCES)
+MOD_FILES += xnu.mod
+MARKER_FILES += xnu.marker
+CLEANFILES += xnu.marker
+
+xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += appleldr.module
+MODULE_FILES += appleldr.module$(EXEEXT)
+appleldr_module_SOURCES = loader/efi/appleloader.c ## platform sources
+nodist_appleldr_module_SOURCES = ## platform nodist sources
+appleldr_module_LDADD =
+appleldr_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+appleldr_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+appleldr_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+appleldr_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_appleldr_module_SOURCES)
+CLEANFILES += $(nodist_appleldr_module_SOURCES)
+MOD_FILES += appleldr.mod
+MARKER_FILES += appleldr.marker
+CLEANFILES += appleldr.marker
+
+appleldr.marker: $(appleldr_module_SOURCES) $(nodist_appleldr_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += appleldr.module
+MODULE_FILES += appleldr.module$(EXEEXT)
+appleldr_module_SOURCES = loader/efi/appleloader.c ## platform sources
+nodist_appleldr_module_SOURCES = ## platform nodist sources
+appleldr_module_LDADD =
+appleldr_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+appleldr_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+appleldr_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+appleldr_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_appleldr_module_SOURCES)
+CLEANFILES += $(nodist_appleldr_module_SOURCES)
+MOD_FILES += appleldr.mod
+MARKER_FILES += appleldr.marker
+CLEANFILES += appleldr.marker
+
+appleldr.marker: $(appleldr_module_SOURCES) $(nodist_appleldr_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += chain.module
+MODULE_FILES += chain.module$(EXEEXT)
+chain_module_SOURCES = loader/i386/pc/chainloader.c ## platform sources
+nodist_chain_module_SOURCES = ## platform nodist sources
+chain_module_LDADD =
+chain_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+chain_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+chain_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+chain_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_chain_module_SOURCES)
+CLEANFILES += $(nodist_chain_module_SOURCES)
+MOD_FILES += chain.mod
+MARKER_FILES += chain.marker
+CLEANFILES += chain.marker
+
+chain.marker: $(chain_module_SOURCES) $(nodist_chain_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += chain.module
+MODULE_FILES += chain.module$(EXEEXT)
+chain_module_SOURCES = loader/efi/chainloader.c ## platform sources
+nodist_chain_module_SOURCES = ## platform nodist sources
+chain_module_LDADD =
+chain_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+chain_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+chain_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+chain_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_chain_module_SOURCES)
+CLEANFILES += $(nodist_chain_module_SOURCES)
+MOD_FILES += chain.mod
+MARKER_FILES += chain.marker
+CLEANFILES += chain.marker
+
+chain.marker: $(chain_module_SOURCES) $(nodist_chain_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += chain.module
+MODULE_FILES += chain.module$(EXEEXT)
+chain_module_SOURCES = loader/efi/chainloader.c ## platform sources
+nodist_chain_module_SOURCES = ## platform nodist sources
+chain_module_LDADD =
+chain_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+chain_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+chain_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+chain_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_chain_module_SOURCES)
+CLEANFILES += $(nodist_chain_module_SOURCES)
+MOD_FILES += chain.mod
+MARKER_FILES += chain.marker
+CLEANFILES += chain.marker
+
+chain.marker: $(chain_module_SOURCES) $(nodist_chain_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/i386/pc/mmap.c mmap/i386/pc/mmap_helper.S mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/efi/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/efi/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += mmap.module
+MODULE_FILES += mmap.module$(EXEEXT)
+mmap_module_SOURCES = mmap/mips/yeeloong/uppermem.c mmap/mmap.c ## platform sources
+nodist_mmap_module_SOURCES = ## platform nodist sources
+mmap_module_LDADD =
+mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_mmap_module_SOURCES)
+CLEANFILES += $(nodist_mmap_module_SOURCES)
+MOD_FILES += mmap.mod
+MARKER_FILES += mmap.marker
+CLEANFILES += mmap.marker
+
+mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += normal.module
+MODULE_FILES += normal.module$(EXEEXT)
+normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+normal_module_LDADD =
+normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST += script/yylex.l script/parser.y
+BUILT_SOURCES += $(nodist_normal_module_SOURCES)
+CLEANFILES += $(nodist_normal_module_SOURCES)
+MOD_FILES += normal.mod
+MARKER_FILES += normal.marker
+CLEANFILES += normal.marker
+
+normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_acorn.module
+MODULE_FILES += part_acorn.module$(EXEEXT)
+part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+nodist_part_acorn_module_SOURCES = ## platform nodist sources
+part_acorn_module_LDADD =
+part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_acorn_module_SOURCES)
+CLEANFILES += $(nodist_part_acorn_module_SOURCES)
+MOD_FILES += part_acorn.mod
+MARKER_FILES += part_acorn.marker
+CLEANFILES += part_acorn.marker
+
+part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_amiga.module
+MODULE_FILES += part_amiga.module$(EXEEXT)
+part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+nodist_part_amiga_module_SOURCES = ## platform nodist sources
+part_amiga_module_LDADD =
+part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_amiga_module_SOURCES)
+CLEANFILES += $(nodist_part_amiga_module_SOURCES)
+MOD_FILES += part_amiga.mod
+MARKER_FILES += part_amiga.marker
+CLEANFILES += part_amiga.marker
+
+part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_apple.module
+MODULE_FILES += part_apple.module$(EXEEXT)
+part_apple_module_SOURCES = partmap/apple.c ## platform sources
+nodist_part_apple_module_SOURCES = ## platform nodist sources
+part_apple_module_LDADD =
+part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_apple_module_SOURCES)
+CLEANFILES += $(nodist_part_apple_module_SOURCES)
+MOD_FILES += part_apple.mod
+MARKER_FILES += part_apple.marker
+CLEANFILES += part_apple.marker
+
+part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_gpt.module
+MODULE_FILES += part_gpt.module$(EXEEXT)
+part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+nodist_part_gpt_module_SOURCES = ## platform nodist sources
+part_gpt_module_LDADD =
+part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_gpt_module_SOURCES)
+CLEANFILES += $(nodist_part_gpt_module_SOURCES)
+MOD_FILES += part_gpt.mod
+MARKER_FILES += part_gpt.marker
+CLEANFILES += part_gpt.marker
+
+part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_msdos.module
+MODULE_FILES += part_msdos.module$(EXEEXT)
+part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+nodist_part_msdos_module_SOURCES = ## platform nodist sources
+part_msdos_module_LDADD =
+part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_msdos_module_SOURCES)
+CLEANFILES += $(nodist_part_msdos_module_SOURCES)
+MOD_FILES += part_msdos.mod
+MARKER_FILES += part_msdos.marker
+CLEANFILES += part_msdos.marker
+
+part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_sun.module
+MODULE_FILES += part_sun.module$(EXEEXT)
+part_sun_module_SOURCES = partmap/sun.c ## platform sources
+nodist_part_sun_module_SOURCES = ## platform nodist sources
+part_sun_module_LDADD =
+part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sun_module_SOURCES)
+CLEANFILES += $(nodist_part_sun_module_SOURCES)
+MOD_FILES += part_sun.mod
+MARKER_FILES += part_sun.marker
+CLEANFILES += part_sun.marker
+
+part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_bsd.module
+MODULE_FILES += part_bsd.module$(EXEEXT)
+part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+nodist_part_bsd_module_SOURCES = ## platform nodist sources
+part_bsd_module_LDADD =
+part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_bsd_module_SOURCES)
+CLEANFILES += $(nodist_part_bsd_module_SOURCES)
+MOD_FILES += part_bsd.mod
+MARKER_FILES += part_bsd.marker
+CLEANFILES += part_bsd.marker
+
+part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += part_sunpc.module
+MODULE_FILES += part_sunpc.module$(EXEEXT)
+part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+part_sunpc_module_LDADD =
+part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_part_sunpc_module_SOURCES)
+CLEANFILES += $(nodist_part_sunpc_module_SOURCES)
+MOD_FILES += part_sunpc.mod
+MARKER_FILES += part_sunpc.marker
+CLEANFILES += part_sunpc.marker
+
+part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += msdospart.module
+MODULE_FILES += msdospart.module$(EXEEXT)
+msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+nodist_msdospart_module_SOURCES = ## platform nodist sources
+msdospart_module_LDADD =
+msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_msdospart_module_SOURCES)
+CLEANFILES += $(nodist_msdospart_module_SOURCES)
+MOD_FILES += msdospart.mod
+MARKER_FILES += msdospart.marker
+CLEANFILES += msdospart.marker
+
+msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += at_keyboard.module
+MODULE_FILES += at_keyboard.module$(EXEEXT)
+at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+at_keyboard_module_LDADD =
+at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_at_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_at_keyboard_module_SOURCES)
+MOD_FILES += at_keyboard.mod
+MARKER_FILES += at_keyboard.marker
+CLEANFILES += at_keyboard.marker
+
+at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += at_keyboard.module
+MODULE_FILES += at_keyboard.module$(EXEEXT)
+at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+at_keyboard_module_LDADD =
+at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_at_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_at_keyboard_module_SOURCES)
+MOD_FILES += at_keyboard.mod
+MARKER_FILES += at_keyboard.marker
+CLEANFILES += at_keyboard.marker
+
+at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += at_keyboard.module
+MODULE_FILES += at_keyboard.module$(EXEEXT)
+at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+at_keyboard_module_LDADD =
+at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_at_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_at_keyboard_module_SOURCES)
+MOD_FILES += at_keyboard.mod
+MARKER_FILES += at_keyboard.marker
+CLEANFILES += at_keyboard.marker
+
+at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += at_keyboard.module
+MODULE_FILES += at_keyboard.module$(EXEEXT)
+at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+at_keyboard_module_LDADD =
+at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_at_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_at_keyboard_module_SOURCES)
+MOD_FILES += at_keyboard.mod
+MARKER_FILES += at_keyboard.marker
+CLEANFILES += at_keyboard.marker
+
+at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += at_keyboard.module
+MODULE_FILES += at_keyboard.module$(EXEEXT)
+at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+at_keyboard_module_LDADD =
+at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_at_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_at_keyboard_module_SOURCES)
+MOD_FILES += at_keyboard.mod
+MARKER_FILES += at_keyboard.marker
+CLEANFILES += at_keyboard.marker
+
+at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += at_keyboard.module
+MODULE_FILES += at_keyboard.module$(EXEEXT)
+at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+at_keyboard_module_LDADD =
+at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_at_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_at_keyboard_module_SOURCES)
+MOD_FILES += at_keyboard.mod
+MARKER_FILES += at_keyboard.marker
+CLEANFILES += at_keyboard.marker
+
+at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += at_keyboard.module
+MODULE_FILES += at_keyboard.module$(EXEEXT)
+at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+at_keyboard_module_LDADD =
+at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_at_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_at_keyboard_module_SOURCES)
+MOD_FILES += at_keyboard.mod
+MARKER_FILES += at_keyboard.marker
+CLEANFILES += at_keyboard.marker
+
+at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gfxterm.module
+MODULE_FILES += gfxterm.module$(EXEEXT)
+gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+nodist_gfxterm_module_SOURCES = ## platform nodist sources
+gfxterm_module_LDADD =
+gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gfxterm_module_SOURCES)
+CLEANFILES += $(nodist_gfxterm_module_SOURCES)
+MOD_FILES += gfxterm.mod
+MARKER_FILES += gfxterm.marker
+CLEANFILES += gfxterm.marker
+
+gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+if COND_GRUB_EMU_USB
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif COND_GRUB_EMU_USB
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += serial.module
+MODULE_FILES += serial.module$(EXEEXT)
+serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+nodist_serial_module_SOURCES = ## platform nodist sources
+serial_module_LDADD =
+serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_serial_module_SOURCES)
+CLEANFILES += $(nodist_serial_module_SOURCES)
+MOD_FILES += serial.mod
+MARKER_FILES += serial.marker
+CLEANFILES += serial.marker
+
+serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += sendkey.module
+MODULE_FILES += sendkey.module$(EXEEXT)
+sendkey_module_SOURCES = commands/i386/pc/sendkey.c ## platform sources
+nodist_sendkey_module_SOURCES = ## platform nodist sources
+sendkey_module_LDADD =
+sendkey_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sendkey_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sendkey_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sendkey_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sendkey_module_SOURCES)
+CLEANFILES += $(nodist_sendkey_module_SOURCES)
+MOD_FILES += sendkey.mod
+MARKER_FILES += sendkey.marker
+CLEANFILES += sendkey.marker
+
+sendkey.marker: $(sendkey_module_SOURCES) $(nodist_sendkey_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sendkey_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += terminfo.module
+MODULE_FILES += terminfo.module$(EXEEXT)
+terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+nodist_terminfo_module_SOURCES = ## platform nodist sources
+terminfo_module_LDADD =
+terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminfo_module_SOURCES)
+CLEANFILES += $(nodist_terminfo_module_SOURCES)
+MOD_FILES += terminfo.mod
+MARKER_FILES += terminfo.marker
+CLEANFILES += terminfo.marker
+
+terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += terminfo.module
+MODULE_FILES += terminfo.module$(EXEEXT)
+terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+nodist_terminfo_module_SOURCES = ## platform nodist sources
+terminfo_module_LDADD =
+terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminfo_module_SOURCES)
+CLEANFILES += $(nodist_terminfo_module_SOURCES)
+MOD_FILES += terminfo.mod
+MARKER_FILES += terminfo.marker
+CLEANFILES += terminfo.marker
+
+terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += terminfo.module
+MODULE_FILES += terminfo.module$(EXEEXT)
+terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+nodist_terminfo_module_SOURCES = ## platform nodist sources
+terminfo_module_LDADD =
+terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminfo_module_SOURCES)
+CLEANFILES += $(nodist_terminfo_module_SOURCES)
+MOD_FILES += terminfo.mod
+MARKER_FILES += terminfo.marker
+CLEANFILES += terminfo.marker
+
+terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += terminfo.module
+MODULE_FILES += terminfo.module$(EXEEXT)
+terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+nodist_terminfo_module_SOURCES = ## platform nodist sources
+terminfo_module_LDADD =
+terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminfo_module_SOURCES)
+CLEANFILES += $(nodist_terminfo_module_SOURCES)
+MOD_FILES += terminfo.mod
+MARKER_FILES += terminfo.marker
+CLEANFILES += terminfo.marker
+
+terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += terminfo.module
+MODULE_FILES += terminfo.module$(EXEEXT)
+terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+nodist_terminfo_module_SOURCES = ## platform nodist sources
+terminfo_module_LDADD =
+terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminfo_module_SOURCES)
+CLEANFILES += $(nodist_terminfo_module_SOURCES)
+MOD_FILES += terminfo.mod
+MARKER_FILES += terminfo.marker
+CLEANFILES += terminfo.marker
+
+terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += terminfo.module
+MODULE_FILES += terminfo.module$(EXEEXT)
+terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+nodist_terminfo_module_SOURCES = ## platform nodist sources
+terminfo_module_LDADD =
+terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminfo_module_SOURCES)
+CLEANFILES += $(nodist_terminfo_module_SOURCES)
+MOD_FILES += terminfo.mod
+MARKER_FILES += terminfo.marker
+CLEANFILES += terminfo.marker
+
+terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += terminfo.module
+MODULE_FILES += terminfo.module$(EXEEXT)
+terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+nodist_terminfo_module_SOURCES = ## platform nodist sources
+terminfo_module_LDADD =
+terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_terminfo_module_SOURCES)
+CLEANFILES += $(nodist_terminfo_module_SOURCES)
+MOD_FILES += terminfo.mod
+MARKER_FILES += terminfo.marker
+CLEANFILES += terminfo.marker
+
+terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += usb_keyboard.module
+MODULE_FILES += usb_keyboard.module$(EXEEXT)
+usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+usb_keyboard_module_LDADD =
+usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_usb_keyboard_module_SOURCES)
+CLEANFILES += $(nodist_usb_keyboard_module_SOURCES)
+MOD_FILES += usb_keyboard.mod
+MARKER_FILES += usb_keyboard.marker
+CLEANFILES += usb_keyboard.marker
+
+usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += vga.module
+MODULE_FILES += vga.module$(EXEEXT)
+vga_module_SOURCES = video/i386/pc/vga.c ## platform sources
+nodist_vga_module_SOURCES = ## platform nodist sources
+vga_module_LDADD =
+vga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+vga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+vga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+vga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_vga_module_SOURCES)
+CLEANFILES += $(nodist_vga_module_SOURCES)
+MOD_FILES += vga.mod
+MARKER_FILES += vga.marker
+CLEANFILES += vga.marker
+
+vga.marker: $(vga_module_SOURCES) $(nodist_vga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += vga_text.module
+MODULE_FILES += vga_text.module$(EXEEXT)
+vga_text_module_SOURCES = term/i386/pc/vga_text.c term/i386/vga_common.c ## platform sources
+nodist_vga_text_module_SOURCES = ## platform nodist sources
+vga_text_module_LDADD =
+vga_text_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+vga_text_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+vga_text_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+vga_text_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_vga_text_module_SOURCES)
+CLEANFILES += $(nodist_vga_text_module_SOURCES)
+MOD_FILES += vga_text.mod
+MARKER_FILES += vga_text.marker
+CLEANFILES += vga_text.marker
+
+vga_text.marker: $(vga_text_module_SOURCES) $(nodist_vga_text_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += vga_text.module
+MODULE_FILES += vga_text.module$(EXEEXT)
+vga_text_module_SOURCES = term/i386/pc/vga_text.c term/i386/vga_common.c ## platform sources
+nodist_vga_text_module_SOURCES = ## platform nodist sources
+vga_text_module_LDADD =
+vga_text_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+vga_text_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+vga_text_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+vga_text_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_vga_text_module_SOURCES)
+CLEANFILES += $(nodist_vga_text_module_SOURCES)
+MOD_FILES += vga_text.mod
+MARKER_FILES += vga_text.marker
+CLEANFILES += vga_text.marker
+
+vga_text.marker: $(vga_text_module_SOURCES) $(nodist_vga_text_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += vga_text.module
+MODULE_FILES += vga_text.module$(EXEEXT)
+vga_text_module_SOURCES = term/i386/pc/vga_text.c term/i386/vga_common.c ## platform sources
+nodist_vga_text_module_SOURCES = ## platform nodist sources
+vga_text_module_LDADD =
+vga_text_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+vga_text_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+vga_text_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+vga_text_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_vga_text_module_SOURCES)
+CLEANFILES += $(nodist_vga_text_module_SOURCES)
+MOD_FILES += vga_text.mod
+MARKER_FILES += vga_text.marker
+CLEANFILES += vga_text.marker
+
+vga_text.marker: $(vga_text_module_SOURCES) $(nodist_vga_text_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += video_cirrus.module
+MODULE_FILES += video_cirrus.module$(EXEEXT)
+video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+video_cirrus_module_LDADD =
+video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_cirrus_module_SOURCES)
+CLEANFILES += $(nodist_video_cirrus_module_SOURCES)
+MOD_FILES += video_cirrus.mod
+MARKER_FILES += video_cirrus.marker
+CLEANFILES += video_cirrus.marker
+
+video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += video_cirrus.module
+MODULE_FILES += video_cirrus.module$(EXEEXT)
+video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+video_cirrus_module_LDADD =
+video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_cirrus_module_SOURCES)
+CLEANFILES += $(nodist_video_cirrus_module_SOURCES)
+MOD_FILES += video_cirrus.mod
+MARKER_FILES += video_cirrus.marker
+CLEANFILES += video_cirrus.marker
+
+video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += video_cirrus.module
+MODULE_FILES += video_cirrus.module$(EXEEXT)
+video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+video_cirrus_module_LDADD =
+video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_cirrus_module_SOURCES)
+CLEANFILES += $(nodist_video_cirrus_module_SOURCES)
+MOD_FILES += video_cirrus.mod
+MARKER_FILES += video_cirrus.marker
+CLEANFILES += video_cirrus.marker
+
+video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += video_cirrus.module
+MODULE_FILES += video_cirrus.module$(EXEEXT)
+video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+video_cirrus_module_LDADD =
+video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_cirrus_module_SOURCES)
+CLEANFILES += $(nodist_video_cirrus_module_SOURCES)
+MOD_FILES += video_cirrus.mod
+MARKER_FILES += video_cirrus.marker
+CLEANFILES += video_cirrus.marker
+
+video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += video_cirrus.module
+MODULE_FILES += video_cirrus.module$(EXEEXT)
+video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+video_cirrus_module_LDADD =
+video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_cirrus_module_SOURCES)
+CLEANFILES += $(nodist_video_cirrus_module_SOURCES)
+MOD_FILES += video_cirrus.mod
+MARKER_FILES += video_cirrus.marker
+CLEANFILES += video_cirrus.marker
+
+video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += video_cirrus.module
+MODULE_FILES += video_cirrus.module$(EXEEXT)
+video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+video_cirrus_module_LDADD =
+video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_cirrus_module_SOURCES)
+CLEANFILES += $(nodist_video_cirrus_module_SOURCES)
+MOD_FILES += video_cirrus.mod
+MARKER_FILES += video_cirrus.marker
+CLEANFILES += video_cirrus.marker
+
+video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += video_cirrus.module
+MODULE_FILES += video_cirrus.module$(EXEEXT)
+video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+video_cirrus_module_LDADD =
+video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_cirrus_module_SOURCES)
+CLEANFILES += $(nodist_video_cirrus_module_SOURCES)
+MOD_FILES += video_cirrus.mod
+MARKER_FILES += video_cirrus.marker
+CLEANFILES += video_cirrus.marker
+
+video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += video_bochs.module
+MODULE_FILES += video_bochs.module$(EXEEXT)
+video_bochs_module_SOURCES = video/bochs.c ## platform sources
+nodist_video_bochs_module_SOURCES = ## platform nodist sources
+video_bochs_module_LDADD =
+video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_bochs_module_SOURCES)
+CLEANFILES += $(nodist_video_bochs_module_SOURCES)
+MOD_FILES += video_bochs.mod
+MARKER_FILES += video_bochs.marker
+CLEANFILES += video_bochs.marker
+
+video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += video_bochs.module
+MODULE_FILES += video_bochs.module$(EXEEXT)
+video_bochs_module_SOURCES = video/bochs.c ## platform sources
+nodist_video_bochs_module_SOURCES = ## platform nodist sources
+video_bochs_module_LDADD =
+video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_bochs_module_SOURCES)
+CLEANFILES += $(nodist_video_bochs_module_SOURCES)
+MOD_FILES += video_bochs.mod
+MARKER_FILES += video_bochs.marker
+CLEANFILES += video_bochs.marker
+
+video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += video_bochs.module
+MODULE_FILES += video_bochs.module$(EXEEXT)
+video_bochs_module_SOURCES = video/bochs.c ## platform sources
+nodist_video_bochs_module_SOURCES = ## platform nodist sources
+video_bochs_module_LDADD =
+video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_bochs_module_SOURCES)
+CLEANFILES += $(nodist_video_bochs_module_SOURCES)
+MOD_FILES += video_bochs.mod
+MARKER_FILES += video_bochs.marker
+CLEANFILES += video_bochs.marker
+
+video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += video_bochs.module
+MODULE_FILES += video_bochs.module$(EXEEXT)
+video_bochs_module_SOURCES = video/bochs.c ## platform sources
+nodist_video_bochs_module_SOURCES = ## platform nodist sources
+video_bochs_module_LDADD =
+video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_bochs_module_SOURCES)
+CLEANFILES += $(nodist_video_bochs_module_SOURCES)
+MOD_FILES += video_bochs.mod
+MARKER_FILES += video_bochs.marker
+CLEANFILES += video_bochs.marker
+
+video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += video_bochs.module
+MODULE_FILES += video_bochs.module$(EXEEXT)
+video_bochs_module_SOURCES = video/bochs.c ## platform sources
+nodist_video_bochs_module_SOURCES = ## platform nodist sources
+video_bochs_module_LDADD =
+video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_bochs_module_SOURCES)
+CLEANFILES += $(nodist_video_bochs_module_SOURCES)
+MOD_FILES += video_bochs.mod
+MARKER_FILES += video_bochs.marker
+CLEANFILES += video_bochs.marker
+
+video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += video_bochs.module
+MODULE_FILES += video_bochs.module$(EXEEXT)
+video_bochs_module_SOURCES = video/bochs.c ## platform sources
+nodist_video_bochs_module_SOURCES = ## platform nodist sources
+video_bochs_module_LDADD =
+video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_bochs_module_SOURCES)
+CLEANFILES += $(nodist_video_bochs_module_SOURCES)
+MOD_FILES += video_bochs.mod
+MARKER_FILES += video_bochs.marker
+CLEANFILES += video_bochs.marker
+
+video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += video_bochs.module
+MODULE_FILES += video_bochs.module$(EXEEXT)
+video_bochs_module_SOURCES = video/bochs.c ## platform sources
+nodist_video_bochs_module_SOURCES = ## platform nodist sources
+video_bochs_module_LDADD =
+video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_bochs_module_SOURCES)
+CLEANFILES += $(nodist_video_bochs_module_SOURCES)
+MOD_FILES += video_bochs.mod
+MARKER_FILES += video_bochs.marker
+CLEANFILES += video_bochs.marker
+
+video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += functional_test.module
+MODULE_FILES += functional_test.module$(EXEEXT)
+functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+nodist_functional_test_module_SOURCES = ## platform nodist sources
+functional_test_module_LDADD =
+functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_functional_test_module_SOURCES)
+MOD_FILES += functional_test.mod
+MARKER_FILES += functional_test.marker
+CLEANFILES += functional_test.marker
+
+functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += example_functional_test.module
+MODULE_FILES += example_functional_test.module$(EXEEXT)
+example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+example_functional_test_module_LDADD =
+example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_example_functional_test_module_SOURCES)
+CLEANFILES += $(nodist_example_functional_test_module_SOURCES)
+MOD_FILES += example_functional_test.mod
+MARKER_FILES += example_functional_test.marker
+CLEANFILES += example_functional_test.marker
+
+example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += bitmap.module
+MODULE_FILES += bitmap.module$(EXEEXT)
+bitmap_module_SOURCES = video/bitmap.c ## platform sources
+nodist_bitmap_module_SOURCES = ## platform nodist sources
+bitmap_module_LDADD =
+bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_module_SOURCES)
+MOD_FILES += bitmap.mod
+MARKER_FILES += bitmap.marker
+CLEANFILES += bitmap.marker
+
+bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += bitmap_scale.module
+MODULE_FILES += bitmap_scale.module$(EXEEXT)
+bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+bitmap_scale_module_LDADD =
+bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_bitmap_scale_module_SOURCES)
+CLEANFILES += $(nodist_bitmap_scale_module_SOURCES)
+MOD_FILES += bitmap_scale.mod
+MARKER_FILES += bitmap_scale.marker
+CLEANFILES += bitmap_scale.marker
+
+bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += efi_gop.module
+MODULE_FILES += efi_gop.module$(EXEEXT)
+efi_gop_module_SOURCES = video/efi_gop.c ## platform sources
+nodist_efi_gop_module_SOURCES = ## platform nodist sources
+efi_gop_module_LDADD =
+efi_gop_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efi_gop_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efi_gop_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efi_gop_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_efi_gop_module_SOURCES)
+CLEANFILES += $(nodist_efi_gop_module_SOURCES)
+MOD_FILES += efi_gop.mod
+MARKER_FILES += efi_gop.marker
+CLEANFILES += efi_gop.marker
+
+efi_gop.marker: $(efi_gop_module_SOURCES) $(nodist_efi_gop_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += efi_gop.module
+MODULE_FILES += efi_gop.module$(EXEEXT)
+efi_gop_module_SOURCES = video/efi_gop.c ## platform sources
+nodist_efi_gop_module_SOURCES = ## platform nodist sources
+efi_gop_module_LDADD =
+efi_gop_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efi_gop_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efi_gop_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efi_gop_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_efi_gop_module_SOURCES)
+CLEANFILES += $(nodist_efi_gop_module_SOURCES)
+MOD_FILES += efi_gop.mod
+MARKER_FILES += efi_gop.marker
+CLEANFILES += efi_gop.marker
+
+efi_gop.marker: $(efi_gop_module_SOURCES) $(nodist_efi_gop_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += efi_uga.module
+MODULE_FILES += efi_uga.module$(EXEEXT)
+efi_uga_module_SOURCES = video/efi_uga.c ## platform sources
+nodist_efi_uga_module_SOURCES = ## platform nodist sources
+efi_uga_module_LDADD =
+efi_uga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efi_uga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efi_uga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efi_uga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_efi_uga_module_SOURCES)
+CLEANFILES += $(nodist_efi_uga_module_SOURCES)
+MOD_FILES += efi_uga.mod
+MARKER_FILES += efi_uga.marker
+CLEANFILES += efi_uga.marker
+
+efi_uga.marker: $(efi_uga_module_SOURCES) $(nodist_efi_uga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += efi_uga.module
+MODULE_FILES += efi_uga.module$(EXEEXT)
+efi_uga_module_SOURCES = video/efi_uga.c ## platform sources
+nodist_efi_uga_module_SOURCES = ## platform nodist sources
+efi_uga_module_LDADD =
+efi_uga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+efi_uga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+efi_uga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+efi_uga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_efi_uga_module_SOURCES)
+CLEANFILES += $(nodist_efi_uga_module_SOURCES)
+MOD_FILES += efi_uga.mod
+MARKER_FILES += efi_uga.marker
+CLEANFILES += efi_uga.marker
+
+efi_uga.marker: $(efi_uga_module_SOURCES) $(nodist_efi_uga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += jpeg.module
+MODULE_FILES += jpeg.module$(EXEEXT)
+jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+nodist_jpeg_module_SOURCES = ## platform nodist sources
+jpeg_module_LDADD =
+jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_jpeg_module_SOURCES)
+CLEANFILES += $(nodist_jpeg_module_SOURCES)
+MOD_FILES += jpeg.mod
+MARKER_FILES += jpeg.marker
+CLEANFILES += jpeg.marker
+
+jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += png.module
+MODULE_FILES += png.module$(EXEEXT)
+png_module_SOURCES = video/readers/png.c ## platform sources
+nodist_png_module_SOURCES = ## platform nodist sources
+png_module_LDADD =
+png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_png_module_SOURCES)
+CLEANFILES += $(nodist_png_module_SOURCES)
+MOD_FILES += png.mod
+MARKER_FILES += png.marker
+CLEANFILES += png.marker
+
+png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += tga.module
+MODULE_FILES += tga.module$(EXEEXT)
+tga_module_SOURCES = video/readers/tga.c ## platform sources
+nodist_tga_module_SOURCES = ## platform nodist sources
+tga_module_LDADD =
+tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_tga_module_SOURCES)
+CLEANFILES += $(nodist_tga_module_SOURCES)
+MOD_FILES += tga.mod
+MARKER_FILES += tga.marker
+CLEANFILES += tga.marker
+
+tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += vbe.module
+MODULE_FILES += vbe.module$(EXEEXT)
+vbe_module_SOURCES = video/i386/pc/vbe.c ## platform sources
+nodist_vbe_module_SOURCES = ## platform nodist sources
+vbe_module_LDADD =
+vbe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+vbe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+vbe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+vbe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_vbe_module_SOURCES)
+CLEANFILES += $(nodist_vbe_module_SOURCES)
+MOD_FILES += vbe.mod
+MARKER_FILES += vbe.marker
+CLEANFILES += vbe.marker
+
+vbe.marker: $(vbe_module_SOURCES) $(nodist_vbe_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vbe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += video_fb.module
+MODULE_FILES += video_fb.module$(EXEEXT)
+video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+nodist_video_fb_module_SOURCES = ## platform nodist sources
+video_fb_module_LDADD =
+video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_fb_module_SOURCES)
+CLEANFILES += $(nodist_video_fb_module_SOURCES)
+MOD_FILES += video_fb.mod
+MARKER_FILES += video_fb.marker
+CLEANFILES += video_fb.marker
+
+video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += video.module
+MODULE_FILES += video.module$(EXEEXT)
+video_module_SOURCES = video/video.c ## platform sources
+nodist_video_module_SOURCES = ## platform nodist sources
+video_module_LDADD =
+video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_video_module_SOURCES)
+CLEANFILES += $(nodist_video_module_SOURCES)
+MOD_FILES += video.mod
+MARKER_FILES += video.marker
+CLEANFILES += video.marker
+
+video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += ieee1275_fb.module
+MODULE_FILES += ieee1275_fb.module$(EXEEXT)
+ieee1275_fb_module_SOURCES = video/ieee1275.c ## platform sources
+nodist_ieee1275_fb_module_SOURCES = ## platform nodist sources
+ieee1275_fb_module_LDADD =
+ieee1275_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+ieee1275_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+ieee1275_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+ieee1275_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_ieee1275_fb_module_SOURCES)
+CLEANFILES += $(nodist_ieee1275_fb_module_SOURCES)
+MOD_FILES += ieee1275_fb.mod
+MARKER_FILES += ieee1275_fb.marker
+CLEANFILES += ieee1275_fb.marker
+
+ieee1275_fb.marker: $(ieee1275_fb_module_SOURCES) $(nodist_ieee1275_fb_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ieee1275_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+if COND_GRUB_EMU_SDL
+noinst_PROGRAMS += sdl.module
+MODULE_FILES += sdl.module$(EXEEXT)
+sdl_module_SOURCES = video/emu/sdl.c ## platform sources
+nodist_sdl_module_SOURCES = ## platform nodist sources
+sdl_module_LDADD =
+sdl_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+sdl_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+sdl_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+sdl_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_sdl_module_SOURCES)
+CLEANFILES += $(nodist_sdl_module_SOURCES)
+MOD_FILES += sdl.mod
+MARKER_FILES += sdl.marker
+CLEANFILES += sdl.marker
+
+sdl.marker: $(sdl_module_SOURCES) $(nodist_sdl_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sdl_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif COND_GRUB_EMU_SDL
+endif
+
+if COND_emu
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += datehook.module
+MODULE_FILES += datehook.module$(EXEEXT)
+datehook_module_SOURCES = hook/datehook.c ## platform sources
+nodist_datehook_module_SOURCES = ## platform nodist sources
+datehook_module_LDADD =
+datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_datehook_module_SOURCES)
+CLEANFILES += $(nodist_datehook_module_SOURCES)
+MOD_FILES += datehook.mod
+MARKER_FILES += datehook.marker
+CLEANFILES += datehook.marker
+
+datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += legacycfg.module
+MODULE_FILES += legacycfg.module$(EXEEXT)
+legacycfg_module_SOURCES = lib/i386/pc/vesa_modes_table.c commands/legacycfg.c lib/legacy_parse.c ## platform sources
+nodist_legacycfg_module_SOURCES = ## platform nodist sources
+legacycfg_module_LDADD =
+legacycfg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+legacycfg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+legacycfg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+legacycfg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_legacycfg_module_SOURCES)
+CLEANFILES += $(nodist_legacycfg_module_SOURCES)
+MOD_FILES += legacycfg.mod
+MARKER_FILES += legacycfg.marker
+CLEANFILES += legacycfg.marker
+
+legacycfg.marker: $(legacycfg_module_SOURCES) $(nodist_legacycfg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += legacycfg.module
+MODULE_FILES += legacycfg.module$(EXEEXT)
+legacycfg_module_SOURCES = commands/legacycfg.c lib/legacy_parse.c ## platform sources
+nodist_legacycfg_module_SOURCES = ## platform nodist sources
+legacycfg_module_LDADD =
+legacycfg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+legacycfg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+legacycfg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+legacycfg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_legacycfg_module_SOURCES)
+CLEANFILES += $(nodist_legacycfg_module_SOURCES)
+MOD_FILES += legacycfg.mod
+MARKER_FILES += legacycfg.marker
+CLEANFILES += legacycfg.marker
+
+legacycfg.marker: $(legacycfg_module_SOURCES) $(nodist_legacycfg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += test_blockarg.module
+MODULE_FILES += test_blockarg.module$(EXEEXT)
+test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+test_blockarg_module_LDADD =
+test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_test_blockarg_module_SOURCES)
+CLEANFILES += $(nodist_test_blockarg_module_SOURCES)
+MOD_FILES += test_blockarg.mod
+MARKER_FILES += test_blockarg.marker
+CLEANFILES += test_blockarg.marker
+
+test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += xzio.module
+MODULE_FILES += xzio.module$(EXEEXT)
+xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+nodist_xzio_module_SOURCES = ## platform nodist sources
+xzio_module_LDADD =
+xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xzio_module_SOURCES)
+CLEANFILES += $(nodist_xzio_module_SOURCES)
+MOD_FILES += xzio.mod
+MARKER_FILES += xzio.marker
+CLEANFILES += xzio.marker
+
+xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += testload.module
+MODULE_FILES += testload.module$(EXEEXT)
+testload_module_SOURCES = commands/testload.c ## platform sources
+nodist_testload_module_SOURCES = ## platform nodist sources
+testload_module_LDADD =
+testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_testload_module_SOURCES)
+CLEANFILES += $(nodist_testload_module_SOURCES)
+MOD_FILES += testload.mod
+MARKER_FILES += testload.marker
+CLEANFILES += testload.marker
+
+testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += lsapm.module
+MODULE_FILES += lsapm.module$(EXEEXT)
+lsapm_module_SOURCES = commands/i386/pc/lsapm.c ## platform sources
+nodist_lsapm_module_SOURCES = ## platform nodist sources
+lsapm_module_LDADD =
+lsapm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+lsapm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+lsapm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+lsapm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lsapm_module_SOURCES)
+CLEANFILES += $(nodist_lsapm_module_SOURCES)
+MOD_FILES += lsapm.mod
+MARKER_FILES += lsapm.marker
+CLEANFILES += lsapm.marker
+
+lsapm.marker: $(lsapm_module_SOURCES) $(nodist_lsapm_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsapm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += keylayouts.module
+MODULE_FILES += keylayouts.module$(EXEEXT)
+keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+nodist_keylayouts_module_SOURCES = ## platform nodist sources
+keylayouts_module_LDADD =
+keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_keylayouts_module_SOURCES)
+CLEANFILES += $(nodist_keylayouts_module_SOURCES)
+MOD_FILES += keylayouts.mod
+MARKER_FILES += keylayouts.marker
+CLEANFILES += keylayouts.marker
+
+keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_arcfour.module
+MODULE_FILES += gcry_arcfour.module$(EXEEXT)
+gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+gcry_arcfour_module_LDADD =
+gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_arcfour_module_SOURCES)
+CLEANFILES += $(nodist_gcry_arcfour_module_SOURCES)
+MOD_FILES += gcry_arcfour.mod
+MARKER_FILES += gcry_arcfour.marker
+CLEANFILES += gcry_arcfour.marker
+
+gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_blowfish.module
+MODULE_FILES += gcry_blowfish.module$(EXEEXT)
+gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+gcry_blowfish_module_LDADD =
+gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_blowfish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_blowfish_module_SOURCES)
+MOD_FILES += gcry_blowfish.mod
+MARKER_FILES += gcry_blowfish.marker
+CLEANFILES += gcry_blowfish.marker
+
+gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_camellia.module
+MODULE_FILES += gcry_camellia.module$(EXEEXT)
+gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+gcry_camellia_module_LDADD =
+gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_camellia_module_SOURCES)
+CLEANFILES += $(nodist_gcry_camellia_module_SOURCES)
+MOD_FILES += gcry_camellia.mod
+MARKER_FILES += gcry_camellia.marker
+CLEANFILES += gcry_camellia.marker
+
+gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_cast5.module
+MODULE_FILES += gcry_cast5.module$(EXEEXT)
+gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+gcry_cast5_module_LDADD =
+gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_cast5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_cast5_module_SOURCES)
+MOD_FILES += gcry_cast5.mod
+MARKER_FILES += gcry_cast5.marker
+CLEANFILES += gcry_cast5.marker
+
+gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_crc.module
+MODULE_FILES += gcry_crc.module$(EXEEXT)
+gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+gcry_crc_module_LDADD =
+gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_crc_module_SOURCES)
+CLEANFILES += $(nodist_gcry_crc_module_SOURCES)
+MOD_FILES += gcry_crc.mod
+MARKER_FILES += gcry_crc.marker
+CLEANFILES += gcry_crc.marker
+
+gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_des.module
+MODULE_FILES += gcry_des.module$(EXEEXT)
+gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+nodist_gcry_des_module_SOURCES = ## platform nodist sources
+gcry_des_module_LDADD =
+gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_des_module_SOURCES)
+CLEANFILES += $(nodist_gcry_des_module_SOURCES)
+MOD_FILES += gcry_des.mod
+MARKER_FILES += gcry_des.marker
+CLEANFILES += gcry_des.marker
+
+gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_md4.module
+MODULE_FILES += gcry_md4.module$(EXEEXT)
+gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+gcry_md4_module_LDADD =
+gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md4_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md4_module_SOURCES)
+MOD_FILES += gcry_md4.mod
+MARKER_FILES += gcry_md4.marker
+CLEANFILES += gcry_md4.marker
+
+gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_md5.module
+MODULE_FILES += gcry_md5.module$(EXEEXT)
+gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+gcry_md5_module_LDADD =
+gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_md5_module_SOURCES)
+CLEANFILES += $(nodist_gcry_md5_module_SOURCES)
+MOD_FILES += gcry_md5.mod
+MARKER_FILES += gcry_md5.marker
+CLEANFILES += gcry_md5.marker
+
+gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_rfc2268.module
+MODULE_FILES += gcry_rfc2268.module$(EXEEXT)
+gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+gcry_rfc2268_module_LDADD =
+gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rfc2268_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rfc2268_module_SOURCES)
+MOD_FILES += gcry_rfc2268.mod
+MARKER_FILES += gcry_rfc2268.marker
+CLEANFILES += gcry_rfc2268.marker
+
+gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_rijndael.module
+MODULE_FILES += gcry_rijndael.module$(EXEEXT)
+gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+gcry_rijndael_module_LDADD =
+gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rijndael_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rijndael_module_SOURCES)
+MOD_FILES += gcry_rijndael.mod
+MARKER_FILES += gcry_rijndael.marker
+CLEANFILES += gcry_rijndael.marker
+
+gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_rmd160.module
+MODULE_FILES += gcry_rmd160.module$(EXEEXT)
+gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+gcry_rmd160_module_LDADD =
+gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_rmd160_module_SOURCES)
+CLEANFILES += $(nodist_gcry_rmd160_module_SOURCES)
+MOD_FILES += gcry_rmd160.mod
+MARKER_FILES += gcry_rmd160.marker
+CLEANFILES += gcry_rmd160.marker
+
+gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_seed.module
+MODULE_FILES += gcry_seed.module$(EXEEXT)
+gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+gcry_seed_module_LDADD =
+gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_seed_module_SOURCES)
+CLEANFILES += $(nodist_gcry_seed_module_SOURCES)
+MOD_FILES += gcry_seed.mod
+MARKER_FILES += gcry_seed.marker
+CLEANFILES += gcry_seed.marker
+
+gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_serpent.module
+MODULE_FILES += gcry_serpent.module$(EXEEXT)
+gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+gcry_serpent_module_LDADD =
+gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_serpent_module_SOURCES)
+CLEANFILES += $(nodist_gcry_serpent_module_SOURCES)
+MOD_FILES += gcry_serpent.mod
+MARKER_FILES += gcry_serpent.marker
+CLEANFILES += gcry_serpent.marker
+
+gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_sha1.module
+MODULE_FILES += gcry_sha1.module$(EXEEXT)
+gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+gcry_sha1_module_LDADD =
+gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha1_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha1_module_SOURCES)
+MOD_FILES += gcry_sha1.mod
+MARKER_FILES += gcry_sha1.marker
+CLEANFILES += gcry_sha1.marker
+
+gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_sha256.module
+MODULE_FILES += gcry_sha256.module$(EXEEXT)
+gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+gcry_sha256_module_LDADD =
+gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha256_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha256_module_SOURCES)
+MOD_FILES += gcry_sha256.mod
+MARKER_FILES += gcry_sha256.marker
+CLEANFILES += gcry_sha256.marker
+
+gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_sha512.module
+MODULE_FILES += gcry_sha512.module$(EXEEXT)
+gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+gcry_sha512_module_LDADD =
+gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_sha512_module_SOURCES)
+CLEANFILES += $(nodist_gcry_sha512_module_SOURCES)
+MOD_FILES += gcry_sha512.mod
+MARKER_FILES += gcry_sha512.marker
+CLEANFILES += gcry_sha512.marker
+
+gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_tiger.module
+MODULE_FILES += gcry_tiger.module$(EXEEXT)
+gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+gcry_tiger_module_LDADD =
+gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_tiger_module_SOURCES)
+CLEANFILES += $(nodist_gcry_tiger_module_SOURCES)
+MOD_FILES += gcry_tiger.mod
+MARKER_FILES += gcry_tiger.marker
+CLEANFILES += gcry_tiger.marker
+
+gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_twofish.module
+MODULE_FILES += gcry_twofish.module$(EXEEXT)
+gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+gcry_twofish_module_LDADD =
+gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_twofish_module_SOURCES)
+CLEANFILES += $(nodist_gcry_twofish_module_SOURCES)
+MOD_FILES += gcry_twofish.mod
+MARKER_FILES += gcry_twofish.marker
+CLEANFILES += gcry_twofish.marker
+
+gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += gcry_whirlpool.module
+MODULE_FILES += gcry_whirlpool.module$(EXEEXT)
+gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+gcry_whirlpool_module_LDADD =
+gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_gcry_whirlpool_module_SOURCES)
+CLEANFILES += $(nodist_gcry_whirlpool_module_SOURCES)
+MOD_FILES += gcry_whirlpool.mod
+MARKER_FILES += gcry_whirlpool.marker
+CLEANFILES += gcry_whirlpool.marker
+
+gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+ grep 'MARKER' $@.new > $@; rm -f $@.new
+endif
+
+if COND_emu
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES =
+kernel_exec_SOURCES += disk/host.c gnulib/progname.c gnulib/error.c kern/emu/cache.S kern/emu/console.c kern/emu/getroot.c kern/emu/hostdisk.c kern/emu/hostfs.c kern/emu/main.c kern/emu/misc.c kern/emu/mm.c kern/emu/time.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL) $(CFLAGS_GNULIB)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-r,-d
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS_GNULIB)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ cp $< $@
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/i386/pc/startup.S
+kernel_exec_SOURCES += kern/generic/rtc_get_time_ms.c term/i386/vga_common.c kern/i386/pc/init.c kern/i386/pc/mmap.c kern/i386/tsc.c term/i386/pc/console.c kern/i386/dl.c kern/i386/pit.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_i386_efi
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/i386/efi/startup.S
+kernel_exec_SOURCES += kern/i386/tsc.c kern/generic/rtc_get_time_ms.c disk/efi/efidisk.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c kern/i386/efi/init.c term/efi/console.c kern/i386/dl.c kern/i386/pit.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-r,-d
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL) --strip-unneeded -K start -R .note -R .comment
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/i386/qemu/startup.S
+kernel_exec_SOURCES += kern/generic/rtc_get_time_ms.c bus/pci.c kern/i386/qemu/init.c kern/i386/qemu/mmap.c kern/i386/tsc.c kern/i386/coreboot/init.c term/i386/pc/vga_text.c term/i386/vga_common.c kern/i386/dl.c kern/i386/pit.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_i386_coreboot
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/i386/coreboot/startup.S
+kernel_exec_SOURCES += kern/generic/rtc_get_time_ms.c kern/i386/coreboot/mmap.c kern/i386/tsc.c kern/i386/coreboot/init.c term/i386/pc/vga_text.c term/i386/vga_common.c kern/i386/dl.c kern/i386/pit.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext=0x8200
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_i386_multiboot
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/i386/coreboot/startup.S
+kernel_exec_SOURCES += kern/generic/rtc_get_time_ms.c kern/i386/multiboot_mmap.c kern/i386/tsc.c kern/i386/coreboot/init.c term/i386/pc/vga_text.c term/i386/vga_common.c kern/i386/dl.c kern/i386/pit.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext=0x8200
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_i386_ieee1275
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/i386/ieee1275/startup.S
+kernel_exec_SOURCES += kern/ieee1275/init.c disk/ieee1275/ofdisk.c kern/ieee1275/cmain.c kern/ieee1275/ieee1275.c kern/ieee1275/mmap.c kern/ieee1275/openfw.c term/ieee1275/ofconsole.c term/terminfo.c term/tparm.c commands/extcmd.c lib/arg.c kern/i386/dl.c kern/i386/pit.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext=0x10000
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_x86_64_efi
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/x86_64/efi/startup.S
+kernel_exec_SOURCES += kern/i386/tsc.c kern/x86_64/dl.c kern/x86_64/efi/callwrap.S kern/generic/rtc_get_time_ms.c disk/efi/efidisk.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c kern/i386/efi/init.c term/efi/console.c kern/i386/pit.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-r,-d
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL) --strip-unneeded -K start -R .note -R .comment
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/mips/startup.S
+kernel_exec_SOURCES += kern/generic/rtc_get_time_ms.c term/ns8250.c bus/bonito.c bus/cs5536.c bus/pci.c kern/mips/cache.S kern/mips/dl.c kern/mips/init.c kern/mips/yeeloong/init.c term/at_keyboard.c term/serial.c video/sm712.c commands/keylayouts.c term/gfxterm.c font/font.c font/font_cmd.c io/bufio.c video/bitmap.c video/bitmap_scale.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c video/fb/video_fb.c video/video.c commands/boot.c term/terminfo.c term/tparm.c commands/extcmd.c lib/arg.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext,0x80200000
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) -DUSE_ASCII_FAILBACK
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/sparc64/ieee1275/crt0.S
+kernel_exec_SOURCES += kern/sparc64/cache.S kern/sparc64/dl.c kern/sparc64/ieee1275/ieee1275.c kern/sparc64/ieee1275/init.c disk/ieee1275/ofdisk.c kern/ieee1275/cmain.c kern/ieee1275/ieee1275.c kern/ieee1275/mmap.c kern/ieee1275/openfw.c term/ieee1275/ofconsole.c term/terminfo.c term/tparm.c commands/extcmd.c lib/arg.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext,0x4400
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_powerpc_ieee1275
+noinst_PROGRAMS += kernel.exec
+kernel_exec_SOURCES = kern/powerpc/ieee1275/startup.S
+kernel_exec_SOURCES += kern/ieee1275/init.c kern/powerpc/cache.S kern/powerpc/dl.c disk/ieee1275/ofdisk.c kern/ieee1275/cmain.c kern/ieee1275/ieee1275.c kern/ieee1275/mmap.c kern/ieee1275/openfw.c term/ieee1275/ofconsole.c term/terminfo.c term/tparm.c commands/extcmd.c lib/arg.c kern/mm.c kern/time.c kern/generic/millisleep.c kern/command.c kern/corecmd.c kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c kern/list.c kern/main.c kern/misc.c kern/parser.c kern/partition.c kern/rescue_parser.c kern/rescue_reader.c kern/term.c
+nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+kernel_exec_LDADD = $(LDADD_KERNEL)
+kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext,0x200000
+kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+EXTRA_DIST += video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+BUILT_SOURCES += $(nodist_kernel_exec_SOURCES)
+CLEANFILES += $(nodist_kernel_exec_SOURCES)
+platform_DATA += kernel.img
+CLEANFILES += kernel.img
+
+kernel.img: kernel.exec$(EXEEXT)
+ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += boot.image
+boot_image_SOURCES = boot/i386/pc/boot.S
+nodist_boot_image_SOURCES = ## platform nodist sources
+boot_image_LDADD =
+boot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+boot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x7C00
+boot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+boot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+boot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_image_SOURCES)
+CLEANFILES += $(nodist_boot_image_SOURCES)
+platform_DATA += boot.img
+CLEANFILES += boot.img
+
+boot.img: boot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_i386_qemu
+noinst_PROGRAMS += boot.image
+boot_image_SOURCES = boot/i386/qemu/boot.S
+nodist_boot_image_SOURCES = ## platform nodist sources
+boot_image_LDADD =
+boot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+boot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),$(GRUB_BOOT_MACHINE_LINK_ADDR)
+boot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+boot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
+boot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_image_SOURCES)
+CLEANFILES += $(nodist_boot_image_SOURCES)
+platform_DATA += boot.img
+CLEANFILES += boot.img
+
+boot.img: boot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += boot.image
+boot_image_SOURCES = boot/sparc64/ieee1275/boot.S
+nodist_boot_image_SOURCES = ## platform nodist sources
+boot_image_LDADD =
+boot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+boot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -Wl,-Ttext=0x4000
+boot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+boot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+boot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O a.out-sunos-big
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_boot_image_SOURCES)
+CLEANFILES += $(nodist_boot_image_SOURCES)
+platform_DATA += boot.img
+CLEANFILES += boot.img
+
+boot.img: boot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += cdboot.image
+cdboot_image_SOURCES = boot/i386/pc/cdboot.S
+nodist_cdboot_image_SOURCES = ## platform nodist sources
+cdboot_image_LDADD =
+cdboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+cdboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x7C00
+cdboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+cdboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+cdboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_cdboot_image_SOURCES)
+CLEANFILES += $(nodist_cdboot_image_SOURCES)
+platform_DATA += cdboot.img
+CLEANFILES += cdboot.img
+
+cdboot.img: cdboot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += pxeboot.image
+pxeboot_image_SOURCES = boot/i386/pc/pxeboot.S
+nodist_pxeboot_image_SOURCES = ## platform nodist sources
+pxeboot_image_LDADD =
+pxeboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+pxeboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x7C00
+pxeboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+pxeboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+pxeboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_pxeboot_image_SOURCES)
+CLEANFILES += $(nodist_pxeboot_image_SOURCES)
+platform_DATA += pxeboot.img
+CLEANFILES += pxeboot.img
+
+pxeboot.img: pxeboot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += diskboot.image
+diskboot_image_SOURCES = boot/i386/pc/diskboot.S
+nodist_diskboot_image_SOURCES = ## platform nodist sources
+diskboot_image_LDADD =
+diskboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+diskboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8000
+diskboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+diskboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+diskboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_diskboot_image_SOURCES)
+CLEANFILES += $(nodist_diskboot_image_SOURCES)
+platform_DATA += diskboot.img
+CLEANFILES += diskboot.img
+
+diskboot.img: diskboot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_sparc64_ieee1275
+noinst_PROGRAMS += diskboot.image
+diskboot_image_SOURCES = boot/sparc64/ieee1275/diskboot.S
+nodist_diskboot_image_SOURCES = ## platform nodist sources
+diskboot_image_LDADD =
+diskboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+diskboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -Wl,-Ttext=0x4200
+diskboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+diskboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+diskboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_diskboot_image_SOURCES)
+CLEANFILES += $(nodist_diskboot_image_SOURCES)
+platform_DATA += diskboot.img
+CLEANFILES += diskboot.img
+
+diskboot.img: diskboot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_i386_pc
+noinst_PROGRAMS += lnxboot.image
+lnxboot_image_SOURCES = boot/i386/pc/lnxboot.S
+nodist_lnxboot_image_SOURCES = ## platform nodist sources
+lnxboot_image_LDADD =
+lnxboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+lnxboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x6000
+lnxboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+lnxboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+lnxboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_lnxboot_image_SOURCES)
+CLEANFILES += $(nodist_lnxboot_image_SOURCES)
+platform_DATA += lnxboot.img
+CLEANFILES += lnxboot.img
+
+lnxboot.img: lnxboot.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += xz_decompress.image
+xz_decompress_image_SOURCES = boot/mips/startup_raw.S boot/decompressor/minilib.c boot/decompressor/xz.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c
+nodist_xz_decompress_image_SOURCES = ## platform nodist sources
+xz_decompress_image_LDADD = -lgcc
+xz_decompress_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE) -static-libgcc
+xz_decompress_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -static-libgcc -Wl,-Ttext,0x80100000
+xz_decompress_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000
+xz_decompress_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+xz_decompress_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_xz_decompress_image_SOURCES)
+CLEANFILES += $(nodist_xz_decompress_image_SOURCES)
+platform_DATA += xz_decompress.img
+CLEANFILES += xz_decompress.img
+
+xz_decompress.img: xz_decompress.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += none_decompress.image
+none_decompress_image_SOURCES = boot/mips/startup_raw.S boot/decompressor/none.c
+nodist_none_decompress_image_SOURCES = ## platform nodist sources
+none_decompress_image_LDADD = -lgcc
+none_decompress_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE) -static-libgcc
+none_decompress_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -static-libgcc -Wl,-Ttext,0x80100000
+none_decompress_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000
+none_decompress_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+none_decompress_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_none_decompress_image_SOURCES)
+CLEANFILES += $(nodist_none_decompress_image_SOURCES)
+platform_DATA += none_decompress.img
+CLEANFILES += none_decompress.img
+
+none_decompress.img: none_decompress.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+if COND_mips_yeeloong
+noinst_PROGRAMS += fwstart.image
+fwstart_image_SOURCES = boot/mips/yeeloong/fwstart.S
+nodist_fwstart_image_SOURCES = ## platform nodist sources
+fwstart_image_LDADD =
+fwstart_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+fwstart_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic
+fwstart_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+fwstart_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+fwstart_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_fwstart_image_SOURCES)
+CLEANFILES += $(nodist_fwstart_image_SOURCES)
+platform_DATA += fwstart.img
+CLEANFILES += fwstart.img
+
+fwstart.img: fwstart.image$(EXEEXT)
+ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+endif
+
+libgnulib_a_SOURCES =
+nodist_libgnulib_a_SOURCES =
+libgnulib_a_CFLAGS =
+libgnulib_a_CPPFLAGS =
+libgnulib_a_CCASFLAGS =
+
+if COND_emu
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_i386_pc
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_i386_efi
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_i386_qemu
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_i386_coreboot
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_i386_multiboot
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_i386_ieee1275
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_x86_64_efi
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_mips_yeeloong
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_sparc64_ieee1275
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_powerpc_ieee1275
+noinst_LIBRARIES += libgnulib.a
+libgnulib_a_SOURCES += gnulib/regex.c
+nodist_libgnulib_a_SOURCES +=
+libgnulib_a_CFLAGS += $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+libgnulib_a_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+libgnulib_a_CCASFLAGS += $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_libgnulib_a_SOURCES)
+CLEANFILES += $(nodist_libgnulib_a_SOURCES)
+endif
+
+if COND_emu
+bin_PROGRAMS += grub-emu
+if COND_MAN_PAGES
+man_MANS += grub-emu.1
+
+grub-emu.1: grub-emu
+ chmod a+x grub-emu
+ PATH=$(builddir):$$PATH $(HELP2MAN) --section=1 -i $(top_srcdir)/docs/man/grub-emu.h2m -o $@ grub-emu
+
+CLEANFILES += grub-emu.1
+endif
+grub_emu_SOURCES = kern/emu/full.c
+nodist_grub_emu_SOURCES = grub_emu_init.c
+grub_emu_LDADD = kernel.img$(EXEEXT) $(MODULE_FILES) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
+grub_emu_CFLAGS = $(AM_CFLAGS) $(CFLAGS_PROGRAM)
+grub_emu_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM)
+grub_emu_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM)
+grub_emu_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_grub_emu_SOURCES)
+CLEANFILES += $(nodist_grub_emu_SOURCES)
+endif
+
+if COND_emu
+bin_PROGRAMS += grub-emu-lite
+grub_emu_lite_SOURCES = kern/emu/lite.c
+nodist_grub_emu_lite_SOURCES = symlist.c
+grub_emu_lite_LDADD = kernel.img$(EXEEXT) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
+grub_emu_lite_CFLAGS = $(AM_CFLAGS) $(CFLAGS_PROGRAM)
+grub_emu_lite_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM)
+grub_emu_lite_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM)
+grub_emu_lite_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM)
+EXTRA_DIST +=
+BUILT_SOURCES += $(nodist_grub_emu_lite_SOURCES)
+CLEANFILES += $(nodist_grub_emu_lite_SOURCES)
+endif
+
+if COND_emu
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_i386_pc
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_i386_efi
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_i386_qemu
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_i386_coreboot
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_i386_multiboot
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_i386_ieee1275
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_x86_64_efi
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_mips_yeeloong
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_sparc64_ieee1275
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_powerpc_ieee1275
+noinst_SCRIPTS += gensyminfo.sh
+
+gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x gensyminfo.sh
+
+CLEANFILES += gensyminfo.sh
+dist_noinst_DATA += gensyminfo.sh.in
+endif
+
+if COND_emu
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_i386_pc
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_i386_efi
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_i386_qemu
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_i386_coreboot
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_i386_multiboot
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_i386_ieee1275
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_x86_64_efi
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_mips_yeeloong
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_sparc64_ieee1275
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
+if COND_powerpc_ieee1275
+noinst_SCRIPTS += genmod.sh
+
+genmod.sh: genmod.sh.in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+ chmod a+x genmod.sh
+
+CLEANFILES += genmod.sh
+dist_noinst_DATA += genmod.sh.in
+endif
+
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
new file mode 100644
index 0000000..f4d3814
--- /dev/null
+++ b/grub-core/Makefile.core.def
@@ -0,0 +1,1520 @@
+AutoGen definitions Makefile.tpl;
+
+script = {
+ installdir = noinst;
+ name = gensyminfo.sh;
+ common = gensyminfo.sh.in;
+};
+
+script = {
+ installdir = noinst;
+ name = genmod.sh;
+ common = genmod.sh.in;
+};
+
+kernel = {
+ name = kernel;
+
+ nostrip = emu;
+
+ emu_ldflags = '-Wl,-r,-d';
+ x86_efi_ldflags = '-Wl,-r,-d';
+ x86_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment';
+
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
+
+ i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200';
+
+ ldadd = '$(LDADD_KERNEL)';
+
+ i386_coreboot_ldflags = '-Wl,-Ttext=0x8200';
+ i386_multiboot_ldflags = '-Wl,-Ttext=0x8200';
+ i386_ieee1275_ldflags = '-Wl,-Ttext=0x10000';
+ mips_yeeloong_ldflags = '-Wl,-Ttext,0x80200000';
+ powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
+ sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
+
+ mips_yeeloong_cppflags = '-DUSE_ASCII_FAILBACK';
+ i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
+ emu_cflags = '$(CFLAGS_GNULIB)';
+ emu_cppflags = '$(CPPFLAGS_GNULIB)';
+
+ i386_pc_startup = kern/i386/pc/startup.S;
+ i386_efi_startup = kern/i386/efi/startup.S;
+ x86_64_efi_startup = kern/x86_64/efi/startup.S;
+ i386_qemu_startup = kern/i386/qemu/startup.S;
+ i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
+ i386_coreboot_startup = kern/i386/coreboot/startup.S;
+ i386_multiboot_startup = kern/i386/coreboot/startup.S;
+ mips_yeeloong_startup = kern/mips/startup.S;
+ sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
+ powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
+
+ common = kern/command.c;
+ common = kern/corecmd.c;
+ common = kern/device.c;
+ common = kern/disk.c;
+ common = kern/dl.c;
+ common = kern/env.c;
+ common = kern/err.c;
+ common = kern/file.c;
+ common = kern/fs.c;
+ common = kern/list.c;
+ common = kern/main.c;
+ common = kern/misc.c;
+ common = kern/parser.c;
+ common = kern/partition.c;
+ common = kern/rescue_parser.c;
+ common = kern/rescue_reader.c;
+ common = kern/term.c;
+
+ noemu = kern/mm.c;
+ noemu = kern/time.c;
+ noemu = kern/generic/millisleep.c;
+
+ noemu_nodist = symlist.c;
+
+ i386_pc = kern/generic/rtc_get_time_ms.c;
+ x86_efi = kern/generic/rtc_get_time_ms.c;
+ i386_qemu = kern/generic/rtc_get_time_ms.c;
+ i386_coreboot = kern/generic/rtc_get_time_ms.c;
+ i386_multiboot = kern/generic/rtc_get_time_ms.c;
+ mips_yeeloong = kern/generic/rtc_get_time_ms.c;
+
+ ieee1275 = disk/ieee1275/ofdisk.c;
+ ieee1275 = kern/ieee1275/cmain.c;
+ ieee1275 = kern/ieee1275/ieee1275.c;
+ ieee1275 = kern/ieee1275/mmap.c;
+ ieee1275 = kern/ieee1275/openfw.c;
+ ieee1275 = term/ieee1275/ofconsole.c;
+
+ terminfoinkernel = term/terminfo.c;
+ terminfoinkernel = term/tparm.c;
+ terminfoinkernel = commands/extcmd.c;
+ terminfoinkernel = lib/arg.c;
+
+ i386 = kern/i386/dl.c;
+
+ i386_coreboot_multiboot_qemu = kern/i386/coreboot/init.c;
+ i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
+
+ i386_coreboot_multiboot_qemu = term/i386/vga_common.c;
+ i386_pc = term/i386/vga_common.c;
+
+ x86 = kern/i386/pit.c;
+
+ x86_efi = disk/efi/efidisk.c;
+ x86_efi = kern/efi/efi.c;
+ x86_efi = kern/efi/init.c;
+ x86_efi = kern/efi/mm.c;
+ x86_efi = kern/i386/efi/init.c;
+ x86_efi = term/efi/console.c;
+
+ i386_efi = kern/i386/tsc.c;
+
+ x86_64_efi = kern/i386/tsc.c;
+ x86_64_efi = kern/x86_64/dl.c;
+ x86_64_efi = kern/x86_64/efi/callwrap.S;
+
+ i386_pc = kern/i386/pc/init.c;
+ i386_pc = kern/i386/pc/mmap.c;
+ i386_pc = kern/i386/tsc.c;
+ i386_pc = term/i386/pc/console.c;
+
+ i386_qemu = bus/pci.c;
+ i386_qemu = kern/i386/qemu/init.c;
+ i386_qemu = kern/i386/qemu/mmap.c;
+ i386_qemu = kern/i386/tsc.c;
+
+ i386_coreboot = kern/i386/coreboot/mmap.c;
+ i386_coreboot = kern/i386/tsc.c;
+
+ i386_multiboot = kern/i386/multiboot_mmap.c;
+ i386_multiboot = kern/i386/tsc.c;
+
+ i386_ieee1275 = kern/ieee1275/init.c;
+
+ mips_yeeloong = term/ns8250.c;
+ mips_yeeloong = bus/bonito.c;
+ mips_yeeloong = bus/cs5536.c;
+ mips_yeeloong = bus/pci.c;
+ mips_yeeloong = kern/mips/cache.S;
+ mips_yeeloong = kern/mips/dl.c;
+ mips_yeeloong = kern/mips/init.c;
+ mips_yeeloong = kern/mips/yeeloong/init.c;
+ mips_yeeloong = term/at_keyboard.c;
+ mips_yeeloong = term/serial.c;
+ mips_yeeloong = video/sm712.c;
+ extra_dist = video/sm712_init.c;
+ mips_yeeloong = commands/keylayouts.c;
+
+ powerpc_ieee1275 = kern/ieee1275/init.c;
+ powerpc_ieee1275 = kern/powerpc/cache.S;
+ powerpc_ieee1275 = kern/powerpc/dl.c;
+
+ sparc64_ieee1275 = kern/sparc64/cache.S;
+ sparc64_ieee1275 = kern/sparc64/dl.c;
+ sparc64_ieee1275 = kern/sparc64/ieee1275/ieee1275.c;
+ sparc64_ieee1275 = kern/sparc64/ieee1275/init.c;
+
+ emu = disk/host.c;
+ emu = gnulib/progname.c;
+ emu = gnulib/error.c;
+ emu = kern/emu/cache.S;
+ emu = kern/emu/console.c;
+ emu = kern/emu/getroot.c;
+ emu = kern/emu/hostdisk.c;
+ emu = kern/emu/hostfs.c;
+ emu = kern/emu/main.c;
+ emu = kern/emu/misc.c;
+ emu = kern/emu/mm.c;
+ emu = kern/emu/time.c;
+
+ videoinkernel = term/gfxterm.c;
+ videoinkernel = font/font.c;
+ videoinkernel = font/font_cmd.c;
+ videoinkernel = io/bufio.c;
+ videoinkernel = video/bitmap.c;
+ videoinkernel = video/bitmap_scale.c;
+ videoinkernel = video/fb/fbblit.c;
+ videoinkernel = video/fb/fbfill.c;
+ videoinkernel = video/fb/fbutil.c;
+ videoinkernel = video/fb/video_fb.c;
+ videoinkernel = video/video.c;
+
+ videoinkernel = commands/boot.c;
+
+ extra_dist = kern/i386/realmode.S;
+ extra_dist = kern/i386/pc/lzma_decode.S;
+ extra_dist = kern/mips/cache_flush.S;
+};
+
+program = {
+ name = grub-emu;
+ mansection = 1;
+
+ emu = kern/emu/full.c;
+ emu_nodist = grub_emu_init.c;
+
+ ldadd = 'kernel.img$(EXEEXT)';
+ ldadd = '$(MODULE_FILES)';
+ ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
+
+ enable = emu;
+};
+
+program = {
+ name = grub-emu-lite;
+
+ emu = kern/emu/lite.c;
+ emu_nodist = symlist.c;
+
+ ldadd = 'kernel.img$(EXEEXT)';
+ ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
+
+ enable = emu;
+};
+
+image = {
+ name = boot;
+ i386_pc = boot/i386/pc/boot.S;
+ i386_qemu = boot/i386/qemu/boot.S;
+ sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S;
+
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
+
+ i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_BOOT_MACHINE_LINK_ADDR)';
+ i386_qemu_ccasflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
+
+ sparc64_ieee1275_objcopyflags = '-O a.out-sunos-big';
+ sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x4000';
+
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+ enable = i386_qemu;
+ enable = sparc64_ieee1275;
+};
+
+image = {
+ name = cdboot;
+ i386_pc = boot/i386/pc/cdboot.S;
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+};
+
+image = {
+ name = pxeboot;
+ i386_pc = boot/i386/pc/pxeboot.S;
+
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
+
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+};
+
+image = {
+ name = diskboot;
+ i386_pc = boot/i386/pc/diskboot.S;
+
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8000';
+
+ sparc64_ieee1275 = boot/sparc64/ieee1275/diskboot.S;
+ sparc64_ieee1275_ldflags = '-Wl,-Ttext=0x4200';
+
+ objcopyflags = '-O binary';
+
+ enable = i386_pc;
+ enable = sparc64_ieee1275;
+};
+
+image = {
+ name = lnxboot;
+ i386_pc = boot/i386/pc/lnxboot.S;
+
+ i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
+ i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x6000';
+
+ objcopyflags = '-O binary';
+ enable = i386_pc;
+};
+
+image = {
+ name = xz_decompress;
+ mips = boot/mips/startup_raw.S;
+ common = boot/decompressor/minilib.c;
+ common = boot/decompressor/xz.c;
+ common = lib/xzembed/xz_dec_bcj.c;
+ common = lib/xzembed/xz_dec_lzma2.c;
+ common = lib/xzembed/xz_dec_stream.c;
+
+ cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
+
+ mips_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
+
+ objcopyflags = '-O binary';
+ ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
+ ldadd = '-lgcc';
+ cflags = '-static-libgcc';
+ enable = mips;
+};
+
+image = {
+ name = none_decompress;
+ mips = boot/mips/startup_raw.S;
+ common = boot/decompressor/none.c;
+
+ mips_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000';
+
+ objcopyflags = '-O binary';
+ ldflags = '-static-libgcc -Wl,-Ttext,0x80100000';
+ ldadd = '-lgcc';
+ cflags = '-static-libgcc';
+ enable = mips;
+};
+
+image = {
+ name = fwstart;
+ mips_yeeloong = boot/mips/yeeloong/fwstart.S;
+ objcopyflags = '-O binary';
+ ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
+ enable = mips_yeeloong;
+};
+
+module = {
+ name = trig;
+ common_nodist = trigtables.c;
+ extra_dist = gentrigtables.c;
+};
+
+module = {
+ name = cs5536;
+ x86 = bus/cs5536.c;
+ enable = x86;
+};
+
+module = {
+ name = libusb;
+ emu = bus/usb/emu/usb.c;
+ enable = emu;
+ condition = COND_GRUB_EMU_USB;
+};
+
+module = {
+ name = lsspd;
+ mips_yeeloong = commands/mips/yeeloong/lsspd.c;
+ enable = mips_yeeloong;
+};
+
+module = {
+ name = usb;
+ common = bus/usb/usb.c;
+ noemu = bus/usb/usbtrans.c;
+ noemu = bus/usb/usbhub.c;
+ enable = emu;
+ enable = usb;
+ emu_condition = COND_GRUB_EMU_USB;
+};
+
+module = {
+ name = usbserial_common;
+ common = bus/usb/serial/common.c;
+ enable = usb;
+};
+
+module = {
+ name = usbserial_pl2303;
+ common = bus/usb/serial/pl2303.c;
+ enable = usb;
+};
+
+module = {
+ name = usbserial_ftdi;
+ common = bus/usb/serial/ftdi.c;
+ enable = usb;
+};
+
+module = {
+ name = uhci;
+ common = bus/usb/uhci.c;
+ enable = x86;
+};
+
+module = {
+ name = ohci;
+ common = bus/usb/ohci.c;
+ enable = pci;
+};
+
+module = {
+ name = pci;
+ noemu = bus/pci.c;
+ emu = bus/emu/pci.c;
+ emu = commands/lspci.c;
+
+ enable = emu;
+ enable = i386_pc;
+ enable = x86_efi;
+ enable = i386_ieee1275;
+ enable = i386_coreboot;
+ enable = i386_multiboot;
+ emu_condition = COND_GRUB_EMU_PCI;
+};
+
+library = {
+ name = libgnulib.a;
+ common = gnulib/regex.c;
+ cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
+ cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)';
+};
+
+module = {
+ name = cmostest;
+ common = commands/i386/cmostest.c;
+ enable = cmos;
+};
+
+module = {
+ name = iorw;
+ common = commands/iorw.c;
+ enable = x86;
+};
+
+module = {
+ name = regexp;
+ common = commands/regexp.c;
+ common = commands/wildcard.c;
+ ldadd = libgnulib.a;
+ cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
+ cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)';
+};
+
+module = {
+ name = acpi;
+
+ common = commands/acpi.c;
+ x86_efi = commands/efi/acpi.c;
+ i386_pc = commands/i386/pc/acpi.c;
+ i386_coreboot = commands/i386/pc/acpi.c;
+ i386_multiboot = commands/i386/pc/acpi.c;
+
+ enable = x86_efi;
+ enable = i386_pc;
+ enable = i386_coreboot;
+ enable = i386_multiboot;
+};
+
+module = {
+ name = lsacpi;
+
+ common = commands/lsacpi.c;
+
+ enable = x86_efi;
+ enable = i386_pc;
+ enable = i386_coreboot;
+ enable = i386_multiboot;
+};
+
+module = {
+ name = lsefisystab;
+
+ common = commands/efi/lsefisystab.c;
+
+ enable = x86_efi;
+};
+
+module = {
+ name = lssal;
+
+ common = commands/efi/lssal.c;
+
+ enable = x86_efi;
+};
+
+module = {
+ name = lsefimmap;
+
+ common = commands/efi/lsefimmap.c;
+
+ enable = x86_efi;
+};
+
+module = {
+ name = blocklist;
+ common = commands/blocklist.c;
+};
+
+module = {
+ name = boot;
+ common = commands/boot.c;
+ i386_pc = lib/i386/pc/biosnum.c;
+ enable = videomodules;
+};
+
+module = {
+ name = cat;
+ common = commands/cat.c;
+};
+
+module = {
+ name = cmp;
+ common = commands/cmp.c;
+};
+
+module = {
+ name = configfile;
+ common = commands/configfile.c;
+};
+
+module = {
+ name = cpuid;
+ x86 = commands/i386/cpuid.c;
+ enable = x86;
+};
+
+module = {
+ name = date;
+ common = commands/date.c;
+};
+
+module = {
+ name = drivemap;
+
+ i386_pc = commands/i386/pc/drivemap.c;
+ i386_pc = commands/i386/pc/drivemap_int13h.S;
+ enable = i386_pc;
+};
+
+module = {
+ name = echo;
+ common = commands/echo.c;
+};
+
+module = {
+ name = extcmd;
+ common = commands/extcmd.c;
+ common = lib/arg.c;
+ enable = terminfomodule;
+};
+
+module = {
+ name = fixvideo;
+ x86_efi = commands/efi/fixvideo.c;
+ enable = x86_efi;
+};
+
+module = {
+ name = gptsync;
+ common = commands/gptsync.c;
+};
+
+module = {
+ name = halt;
+ nopc = commands/halt.c;
+ i386_pc = commands/i386/pc/halt.c;
+ i386_pc = commands/acpihalt.c;
+ i386_coreboot = commands/acpihalt.c;
+ i386_multiboot = commands/acpihalt.c;
+ x86_efi = commands/acpihalt.c;
+ i386_multiboot = lib/i386/halt.c;
+ i386_coreboot = lib/i386/halt.c;
+ i386_qemu = lib/i386/halt.c;
+ x86_efi = lib/efi/halt.c;
+ ieee1275 = lib/ieee1275/halt.c;
+ emu = lib/emu/halt.c;
+};
+
+module = {
+ name = hashsum;
+ common = commands/hashsum.c;
+};
+
+module = {
+ name = hdparm;
+ common = commands/hdparm.c;
+ common = lib/hexdump.c;
+ enable = pci;
+};
+
+module = {
+ name = help;
+ common = commands/help.c;
+};
+
+module = {
+ name = hexdump;
+ common = commands/hexdump.c;
+ common = lib/hexdump.c;
+};
+
+module = {
+ name = keystatus;
+ common = commands/keystatus.c;
+};
+
+module = {
+ name = loadbios;
+ x86_efi = commands/efi/loadbios.c;
+ enable = x86_efi;
+};
+
+module = {
+ name = loadenv;
+ common = commands/loadenv.c;
+ common = lib/envblk.c;
+};
+
+module = {
+ name = ls;
+ common = commands/ls.c;
+};
+
+module = {
+ name = lsmmap;
+ common = commands/lsmmap.c;
+};
+
+module = {
+ name = lspci;
+ common = commands/lspci.c;
+
+ enable = pci;
+};
+
+module = {
+ name = memrw;
+ common = commands/memrw.c;
+};
+
+module = {
+ name = minicmd;
+ common = commands/minicmd.c;
+};
+
+module = {
+ name = parttool;
+ common = commands/parttool.c;
+};
+
+module = {
+ name = password;
+ common = commands/password.c;
+};
+
+module = {
+ name = password_pbkdf2;
+ common = commands/password_pbkdf2.c;
+};
+
+module = {
+ name = play;
+ x86 = commands/i386/pc/play.c;
+ enable = x86;
+};
+
+module = {
+ name = probe;
+ common = commands/probe.c;
+};
+
+module = {
+ name = pxecmd;
+ i386_pc = commands/i386/pc/pxecmd.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = read;
+ common = commands/read.c;
+};
+
+module = {
+ name = reboot;
+ common = commands/reboot.c;
+};
+
+module = {
+ name = search;
+ common = commands/search_wrap.c;
+ extra_dist = commands/search.c;
+};
+
+module = {
+ name = search_fs_file;
+ common = commands/search_file.c;
+};
+
+module = {
+ name = search_fs_uuid;
+ common = commands/search_uuid.c;
+};
+
+module = {
+ name = search_label;
+ common = commands/search_label.c;
+};
+
+module = {
+ name = setpci;
+ common = commands/setpci.c;
+ enable = x86;
+};
+
+module = {
+ name = sleep;
+ common = commands/sleep.c;
+};
+
+module = {
+ name = suspend;
+ ieee1275 = commands/ieee1275/suspend.c;
+ enable = i386_ieee1275;
+ enable = powerpc_ieee1275;
+};
+
+module = {
+ name = terminal;
+ common = commands/terminal.c;
+};
+
+module = {
+ name = test;
+ common = commands/test.c;
+};
+
+module = {
+ name = true;
+ common = commands/true.c;
+};
+
+module = {
+ name = usbtest;
+ common = commands/usbtest.c;
+ enable = usb;
+ enable = emu;
+ emu_condition = COND_GRUB_EMU_USB;
+};
+
+module = {
+ name = videoinfo;
+ common = commands/videoinfo.c;
+};
+
+module = {
+ name = videotest;
+ common = commands/videotest.c;
+};
+
+module = {
+ name = xnu_uuid;
+ common = commands/xnu_uuid.c;
+};
+
+module = {
+ name = dm_nv;
+ common = disk/dmraid_nvidia.c;
+};
+
+module = {
+ name = loopback;
+ common = disk/loopback.c;
+};
+
+module = {
+ name = lvm;
+ common = disk/lvm.c;
+};
+
+module = {
+ name = mdraid09;
+ common = disk/mdraid_linux.c;
+};
+
+module = {
+ name = mdraid1x;
+ common = disk/mdraid1x_linux.c;
+};
+
+module = {
+ name = raid;
+ common = disk/raid.c;
+};
+
+module = {
+ name = raid5rec;
+ common = disk/raid5_recover.c;
+};
+
+module = {
+ name = raid6rec;
+ common = disk/raid6_recover.c;
+};
+
+module = {
+ name = scsi;
+ common = disk/scsi.c;
+};
+
+module = {
+ name = memdisk;
+ common = disk/memdisk.c;
+};
+
+module = {
+ name = ata;
+ common = disk/ata.c;
+ enable = pci;
+};
+
+module = {
+ name = ata_pthru;
+ common = disk/ata_pthru.c;
+ enable = pci;
+};
+
+module = {
+ name = biosdisk;
+ i386_pc = disk/i386/pc/biosdisk.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = usbms;
+ common = disk/usbms.c;
+ enable = usb;
+ enable = emu;
+ emu_condition = COND_GRUB_EMU_USB;
+};
+
+module = {
+ name = nand;
+ ieee1275 = disk/ieee1275/nand.c;
+ enable = i386_ieee1275;
+};
+
+module = {
+ name = efiemu;
+ common = efiemu/main.c;
+ common = efiemu/i386/loadcore32.c;
+ common = efiemu/i386/loadcore64.c;
+ i386_pc = efiemu/i386/pc/cfgtables.c;
+ i386_coreboot = efiemu/i386/pc/cfgtables.c;
+ i386_multiboot = efiemu/i386/pc/cfgtables.c;
+ i386_ieee1275 = efiemu/i386/nocfgtables.c;
+ i386_qemu = efiemu/i386/nocfgtables.c;
+ common = efiemu/mm.c;
+ common = efiemu/loadcore_common.c;
+ common = efiemu/symbols.c;
+ common = efiemu/loadcore32.c;
+ common = efiemu/loadcore64.c;
+ common = efiemu/prepare32.c;
+ common = efiemu/prepare64.c;
+ common = efiemu/pnvram.c;
+ common = efiemu/i386/coredetect.c;
+
+ extra_dist = efiemu/prepare.c;
+ extra_dist = efiemu/loadcore.c;
+ extra_dist = efiemu/runtime/efiemu.S;
+ extra_dist = efiemu/runtime/efiemu.c;
+
+ enable = i386_pc;
+ enable = i386_coreboot;
+ enable = i386_ieee1275;
+ enable = i386_multiboot;
+ enable = i386_qemu;
+};
+
+module = {
+ name = font;
+ common = font/font.c;
+ common = font/font_cmd.c;
+ enable = videomodules;
+};
+
+module = {
+ name = affs;
+ common = fs/affs.c;
+};
+
+module = {
+ name = afs;
+ common = fs/afs.c;
+};
+
+module = {
+ name = afs_be;
+ common = fs/afs_be.c;
+};
+
+module = {
+ name = befs;
+ common = fs/befs.c;
+};
+
+module = {
+ name = befs_be;
+ common = fs/befs_be.c;
+};
+
+module = {
+ name = btrfs;
+ common = fs/btrfs.c;
+ common = lib/crc.c;
+};
+
+module = {
+ name = cpio;
+ common = fs/cpio.c;
+};
+
+module = {
+ name = ext2;
+ common = fs/ext2.c;
+};
+
+module = {
+ name = fat;
+ common = fs/fat.c;
+};
+
+module = {
+ name = fshelp;
+ common = fs/fshelp.c;
+};
+
+module = {
+ name = hfs;
+ common = fs/hfs.c;
+};
+
+module = {
+ name = hfsplus;
+ common = fs/hfsplus.c;
+};
+
+module = {
+ name = iso9660;
+ common = fs/iso9660.c;
+};
+
+module = {
+ name = jfs;
+ common = fs/jfs.c;
+};
+
+module = {
+ name = minix;
+ common = fs/minix.c;
+};
+
+module = {
+ name = minix2;
+ common = fs/minix2.c;
+};
+
+module = {
+ name = nilfs2;
+ common = fs/nilfs2.c;
+};
+
+module = {
+ name = ntfs;
+ common = fs/ntfs.c;
+};
+
+module = {
+ name = ntfscomp;
+ common = fs/ntfscomp.c;
+};
+
+module = {
+ name = reiserfs;
+ common = fs/reiserfs.c;
+};
+
+module = {
+ name = sfs;
+ common = fs/sfs.c;
+};
+
+module = {
+ name = tar;
+ common = fs/tar.c;
+};
+
+module = {
+ name = udf;
+ common = fs/udf.c;
+};
+
+module = {
+ name = ufs1;
+ common = fs/ufs.c;
+};
+
+module = {
+ name = ufs2;
+ common = fs/ufs2.c;
+};
+
+module = {
+ name = xfs;
+ common = fs/xfs.c;
+};
+
+module = {
+ name = zfs;
+ common = fs/zfs/zfs.c;
+ common = fs/zfs/zfs_lzjb.c;
+ common = fs/zfs/zfs_sha256.c;
+ common = fs/zfs/zfs_fletcher.c;
+};
+
+module = {
+ name = zfsinfo;
+ common = fs/zfs/zfsinfo.c;
+};
+
+module = {
+ name = pxe;
+ i386_pc = fs/i386/pc/pxe.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = gettext;
+ common = gettext/gettext.c;
+};
+
+module = {
+ name = gfxmenu;
+ common = gfxmenu/gfxmenu.c;
+ common = gfxmenu/model.c;
+ common = gfxmenu/view.c;
+ common = gfxmenu/font.c;
+ common = gfxmenu/icon_manager.c;
+ common = gfxmenu/theme_loader.c;
+ common = gfxmenu/widget-box.c;
+ common = gfxmenu/gui_canvas.c;
+ common = gfxmenu/gui_circular_progress.c;
+ common = gfxmenu/gui_box.c;
+ common = gfxmenu/gui_label.c;
+ common = gfxmenu/gui_list.c;
+ common = gfxmenu/gui_image.c;
+ common = gfxmenu/gui_progress_bar.c;
+ common = gfxmenu/gui_util.c;
+ common = gfxmenu/gui_string_util.c;
+ common = gfxmenu/named_colors.c;
+};
+
+module = {
+ name = hello;
+ common = hello/hello.c;
+};
+
+module = {
+ name = gzio;
+ common = io/gzio.c;
+};
+
+module = {
+ name = bufio;
+ common = io/bufio.c;
+ enable = videomodules;
+};
+
+module = {
+ name = elf;
+ common = kern/elf.c;
+};
+
+module = {
+ name = crypto;
+ common = lib/crypto.c;
+
+ extra_dist = lib/libgcrypt-grub/cipher/crypto.lst;
+};
+
+module = {
+ name = pbkdf2;
+ common = lib/pbkdf2.c;
+};
+
+module = {
+ name = relocator;
+ common = lib/relocator.c;
+ x86 = lib/i386/relocator16.S;
+ x86 = lib/i386/relocator32.S;
+ x86 = lib/i386/relocator64.S;
+ i386 = lib/i386/relocator_asm.S;
+ x86_64 = lib/x86_64/relocator_asm.S;
+ x86 = lib/i386/relocator.c;
+ ieee1275 = lib/ieee1275/relocator.c;
+ x86_efi = lib/efi/relocator.c;
+ mips = lib/mips/relocator_asm.S;
+ mips = lib/mips/relocator.c;
+ powerpc = lib/powerpc/relocator_asm.S;
+ powerpc = lib/powerpc/relocator.c;
+
+ extra_dist = lib/i386/relocator_common.S;
+ extra_dist = kern/powerpc/cache_flush.S;
+
+ enable = mips;
+ enable = powerpc;
+ enable = x86;
+};
+
+module = {
+ name = datetime;
+ cmos = lib/cmos_datetime.c;
+ x86_efi = lib/efi/datetime.c;
+ sparc64_ieee1275 = lib/ieee1275/datetime.c;
+ powerpc_ieee1275 = lib/ieee1275/datetime.c;
+ enable = noemu;
+};
+
+module = {
+ name = setjmp;
+ common = lib/setjmp.S;
+ extra_dist = lib/i386/setjmp.S;
+ extra_dist = lib/mips/setjmp.S;
+ extra_dist = lib/x86_64/setjmp.S;
+ extra_dist = lib/sparc64/setjmp.S;
+ extra_dist = lib/powerpc/setjmp.S;
+};
+
+module = {
+ name = aout;
+ common = loader/aout.c;
+ enable = x86;
+};
+
+module = {
+ name = bsd;
+ x86 = loader/i386/bsd.c;
+ x86 = loader/i386/bsd32.c;
+ x86 = loader/i386/bsd64.c;
+
+ extra_dist = loader/i386/bsdXX.c;
+ extra_dist = loader/i386/bsd_pagetable.c;
+
+ enable = x86;
+};
+
+module = {
+ name = linux16;
+ i386_pc = loader/i386/pc/linux.c;
+ i386_pc = lib/cmdline.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = ntldr;
+ i386_pc = loader/i386/pc/ntldr.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = multiboot2;
+ cppflags = "-DGRUB_USE_MULTIBOOT2";
+
+ common = loader/multiboot.c;
+ common = loader/multiboot_mbi2.c;
+ enable = x86;
+ enable = mips;
+};
+
+module = {
+ name = multiboot;
+ common = loader/multiboot.c;
+ x86 = loader/i386/multiboot_mbi.c;
+ extra_dist = loader/multiboot_elfxx.c;
+ enable = x86;
+};
+
+module = {
+ name = linux;
+ x86 = loader/i386/linux.c;
+ i386_pc = lib/i386/pc/vesa_modes_table.c;
+ mips = loader/mips/linux.c;
+ powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
+ sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
+ common = lib/cmdline.c;
+ enable = noemu;
+};
+
+module = {
+ name = xnu;
+ x86 = loader/xnu_resume.c;
+ x86 = loader/i386/xnu.c;
+ x86 = loader/macho32.c;
+ x86 = loader/macho64.c;
+ x86 = loader/macho.c;
+ x86 = loader/xnu.c;
+
+ extra_dist = loader/machoXX.c;
+ enable = x86;
+};
+
+module = {
+ name = appleldr;
+ x86_efi = loader/efi/appleloader.c;
+ enable = x86_efi;
+};
+
+module = {
+ name = chain;
+ x86_efi = loader/efi/chainloader.c;
+ i386_pc = loader/i386/pc/chainloader.c;
+ enable = i386_pc;
+ enable = x86_efi;
+};
+
+module = {
+ name = mmap;
+ common = mmap/mmap.c;
+ x86 = mmap/i386/uppermem.c;
+ x86 = mmap/i386/mmap.c;
+
+ i386_pc = mmap/i386/pc/mmap.c;
+ i386_pc = mmap/i386/pc/mmap_helper.S;
+
+ x86_efi = mmap/efi/mmap.c;
+
+ mips_yeeloong = mmap/mips/yeeloong/uppermem.c;
+
+ enable = x86;
+ enable = mips_yeeloong;
+};
+
+module = {
+ name = normal;
+ common = normal/main.c;
+ common = normal/cmdline.c;
+ common = normal/dyncmd.c;
+ common = normal/auth.c;
+ common = normal/autofs.c;
+ common = normal/color.c;
+ common = normal/completion.c;
+ common = normal/datetime.c;
+ common = normal/menu.c;
+ common = normal/menu_entry.c;
+ common = normal/menu_text.c;
+ common = normal/misc.c;
+ common = normal/crypto.c;
+ common = normal/term.c;
+ common = normal/context.c;
+ common = normal/charset.c;
+
+ common = script/main.c;
+ common = script/script.c;
+ common = script/execute.c;
+ common = script/function.c;
+ common = script/lexer.c;
+ common = script/argv.c;
+
+ common = commands/menuentry.c;
+
+ common = unidata.c;
+ common_nodist = grub_script.tab.c;
+ common_nodist = grub_script.yy.c;
+ common_nodist = grub_script.tab.h;
+ common_nodist = grub_script.yy.h;
+
+ extra_dist = script/yylex.l;
+ extra_dist = script/parser.y;
+
+ cflags = '$(CFLAGS_POSIX) -Wno-error';
+ cppflags = '$(CPPFLAGS_POSIX)';
+};
+
+module = {
+ name = part_acorn;
+ common = partmap/acorn.c;
+};
+
+module = {
+ name = part_amiga;
+ common = partmap/amiga.c;
+};
+
+module = {
+ name = part_apple;
+ common = partmap/apple.c;
+};
+
+module = {
+ name = part_gpt;
+ common = partmap/gpt.c;
+};
+
+module = {
+ name = part_msdos;
+ common = partmap/msdos.c;
+};
+
+module = {
+ name = part_sun;
+ common = partmap/sun.c;
+};
+
+module = {
+ name = part_bsd;
+ common = partmap/bsdlabel.c;
+};
+
+module = {
+ name = part_sunpc;
+ common = partmap/sunpc.c;
+};
+
+module = {
+ name = msdospart;
+ common = parttool/msdospart.c;
+};
+
+module = {
+ name = at_keyboard;
+ common = term/at_keyboard.c;
+ enable = x86;
+};
+
+module = {
+ name = gfxterm;
+ common = term/gfxterm.c;
+ enable = videomodules;
+};
+
+module = {
+ name = serial;
+ common = term/serial.c;
+ x86 = term/ns8250.c;
+
+ enable = emu;
+ enable = i386;
+ enable = x86_64_efi;
+ emu_condition = COND_GRUB_EMU_USB;
+};
+
+module = {
+ name = sendkey;
+ i386_pc = commands/i386/pc/sendkey.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = terminfo;
+ common = term/terminfo.c;
+ common = term/tparm.c;
+ enable = terminfomodule;
+};
+
+module = {
+ name = usb_keyboard;
+ common = term/usb_keyboard.c;
+ enable = usb;
+};
+
+module = {
+ name = vga;
+ i386_pc = video/i386/pc/vga.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = vga_text;
+ common = term/i386/pc/vga_text.c;
+ common = term/i386/vga_common.c;
+ enable = i386_pc;
+ enable = i386_coreboot;
+ enable = i386_multiboot;
+};
+
+module = {
+ name = video_cirrus;
+ x86 = video/cirrus.c;
+ enable = x86;
+};
+
+module = {
+ name = video_bochs;
+ x86 = video/bochs.c;
+ enable = x86;
+};
+
+module = {
+ name = functional_test;
+ common = tests/lib/functional_test.c;
+ common = tests/lib/test.c;
+};
+
+module = {
+ name = example_functional_test;
+ common = tests/example_functional_test.c;
+ cflags = -Wno-format;
+};
+
+module = {
+ name = bitmap;
+ common = video/bitmap.c;
+ enable = videomodules;
+};
+
+module = {
+ name = bitmap_scale;
+ common = video/bitmap_scale.c;
+ enable = videomodules;
+};
+
+module = {
+ name = efi_gop;
+ x86_efi = video/efi_gop.c;
+ enable = x86_efi;
+};
+
+module = {
+ name = efi_uga;
+ x86_efi = video/efi_uga.c;
+ enable = x86_efi;
+};
+
+module = {
+ name = jpeg;
+ common = video/readers/jpeg.c;
+};
+
+module = {
+ name = png;
+ common = video/readers/png.c;
+};
+
+module = {
+ name = tga;
+ common = video/readers/tga.c;
+};
+
+module = {
+ name = vbe;
+ i386_pc = video/i386/pc/vbe.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = video_fb;
+ common = video/fb/video_fb.c;
+ common = video/fb/fbblit.c;
+ common = video/fb/fbfill.c;
+ common = video/fb/fbutil.c;
+ enable = videomodules;
+};
+
+module = {
+ name = video;
+ common = video/video.c;
+ enable = videomodules;
+};
+
+module = {
+ name = ieee1275_fb;
+ ieee1275 = video/ieee1275.c;
+ enable = powerpc;
+};
+
+module = {
+ name = sdl;
+ emu = video/emu/sdl.c;
+ enable = emu;
+ condition = COND_GRUB_EMU_SDL;
+};
+
+module = {
+ name = datehook;
+ common = hook/datehook.c;
+};
+
+module = {
+ name = legacycfg;
+ common = commands/legacycfg.c;
+ common = lib/legacy_parse.c;
+ emu = lib/i386/pc/vesa_modes_table.c;
+ enable = i386_pc;
+ enable = emu;
+};
+
+module = {
+ name = test_blockarg;
+ common = tests/test_blockarg.c;
+};
+
+module = {
+ name = xzio;
+ common = io/xzio.c;
+ common = lib/xzembed/xz_dec_bcj.c;
+ common = lib/xzembed/xz_dec_lzma2.c;
+ common = lib/xzembed/xz_dec_stream.c;
+ cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
+};
+
+module = {
+ name = testload;
+ common = commands/testload.c;
+};
+
+module = {
+ name = lsapm;
+ common = commands/i386/pc/lsapm.c;
+ enable = i386_pc;
+};
+
+module = {
+ name = keylayouts;
+ common = commands/keylayouts.c;
+ enable = videomodules;
+};
diff --git a/grub-core/Makefile.gcry.def b/grub-core/Makefile.gcry.def
new file mode 100644
index 0000000..9a17712
--- /dev/null
+++ b/grub-core/Makefile.gcry.def
@@ -0,0 +1,136 @@
+AutoGen definitions Makefile.tpl;
+
+module = {
+ name = gcry_arcfour;
+ common = lib/libgcrypt-grub/cipher/arcfour.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_blowfish;
+ common = lib/libgcrypt-grub/cipher/blowfish.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_camellia;
+ common = lib/libgcrypt-grub/cipher/camellia-glue.c;
+ common = lib/libgcrypt-grub/cipher/camellia.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_cast5;
+ common = lib/libgcrypt-grub/cipher/cast5.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_crc;
+ common = lib/libgcrypt-grub/cipher/crc.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_des;
+ common = lib/libgcrypt-grub/cipher/des.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_md4;
+ common = lib/libgcrypt-grub/cipher/md4.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_md5;
+ common = lib/libgcrypt-grub/cipher/md5.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_rfc2268;
+ common = lib/libgcrypt-grub/cipher/rfc2268.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_rijndael;
+ common = lib/libgcrypt-grub/cipher/rijndael.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_rmd160;
+ common = lib/libgcrypt-grub/cipher/rmd160.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_seed;
+ common = lib/libgcrypt-grub/cipher/seed.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_serpent;
+ common = lib/libgcrypt-grub/cipher/serpent.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_sha1;
+ common = lib/libgcrypt-grub/cipher/sha1.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_sha256;
+ common = lib/libgcrypt-grub/cipher/sha256.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_sha512;
+ common = lib/libgcrypt-grub/cipher/sha512.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_tiger;
+ common = lib/libgcrypt-grub/cipher/tiger.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_twofish;
+ common = lib/libgcrypt-grub/cipher/twofish.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+ name = gcry_whirlpool;
+ common = lib/libgcrypt-grub/cipher/whirlpool.c;
+ cflags = '$(CFLAGS_GCRY)';
+ cppflags = '$(CPPFLAGS_GCRY)';
+};
+
diff --git a/grub-core/Makefile.in b/grub-core/Makefile.in
new file mode 100644
index 0000000..7c4859f
--- /dev/null
+++ b/grub-core/Makefile.in
@@ -0,0 +1,57678 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# -*- makefile -*-
+
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(am__dist_noinst_DATA_DIST) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.core.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/conf/Makefile.common
+
+# Platform specific options
+@COND_i386_pc_TRUE@am__append_1 = -mrtd -mregparm=3
+@COND_i386_qemu_TRUE@am__append_2 = -mrtd -mregparm=3
+@COND_i386_coreboot_TRUE@am__append_3 = -mrtd -mregparm=3
+@COND_i386_ieee1275_TRUE@am__append_4 = -mrtd -mregparm=3
+@COND_mips_yeeloong_TRUE@am__append_5 = -mexplicit-relocs
+@COND_mips_TRUE@am__append_6 = -mflush-func=grub_cpu_flush_cache
+@COND_sparc64_ieee1275_TRUE@am__append_7 = -mno-app-regs
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_FALSE@am__append_8 = -lgcc
+bin_PROGRAMS = $(am__EXEEXT_1)
+sbin_PROGRAMS =
+check_PROGRAMS =
+noinst_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \
+ $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \
+ $(am__EXEEXT_8) $(am__EXEEXT_9) $(am__EXEEXT_10) \
+ $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) \
+ $(am__EXEEXT_14) $(am__EXEEXT_15) $(am__EXEEXT_16) \
+ $(am__EXEEXT_17) $(am__EXEEXT_18) $(am__EXEEXT_19) \
+ $(am__EXEEXT_20) $(am__EXEEXT_21) $(am__EXEEXT_22) \
+ $(am__EXEEXT_23) $(am__EXEEXT_24) $(am__EXEEXT_25) \
+ $(am__EXEEXT_26) $(am__EXEEXT_27) $(am__EXEEXT_28) \
+ $(am__EXEEXT_29) $(am__EXEEXT_30) $(am__EXEEXT_31) \
+ $(am__EXEEXT_32) $(am__EXEEXT_33) $(am__EXEEXT_34) \
+ $(am__EXEEXT_35) $(am__EXEEXT_36) $(am__EXEEXT_37) \
+ $(am__EXEEXT_38) $(am__EXEEXT_39) $(am__EXEEXT_40) \
+ $(am__EXEEXT_41) $(am__EXEEXT_42) $(am__EXEEXT_43) \
+ $(am__EXEEXT_44) $(am__EXEEXT_45) $(am__EXEEXT_46) \
+ $(am__EXEEXT_47) $(am__EXEEXT_48) $(am__EXEEXT_49) \
+ $(am__EXEEXT_50) $(am__EXEEXT_51) $(am__EXEEXT_52) \
+ $(am__EXEEXT_53) $(am__EXEEXT_54) $(am__EXEEXT_55) \
+ $(am__EXEEXT_56) $(am__EXEEXT_57) $(am__EXEEXT_58) \
+ $(am__EXEEXT_59) $(am__EXEEXT_60) $(am__EXEEXT_61) \
+ $(am__EXEEXT_62) $(am__EXEEXT_63) $(am__EXEEXT_64) \
+ $(am__EXEEXT_65) $(am__EXEEXT_66) $(am__EXEEXT_67) \
+ $(am__EXEEXT_68) $(am__EXEEXT_69) $(am__EXEEXT_70) \
+ $(am__EXEEXT_71) $(am__EXEEXT_72) $(am__EXEEXT_73) \
+ $(am__EXEEXT_74) $(am__EXEEXT_75) $(am__EXEEXT_76) \
+ $(am__EXEEXT_77) $(am__EXEEXT_78) $(am__EXEEXT_79) \
+ $(am__EXEEXT_80) $(am__EXEEXT_81) $(am__EXEEXT_82) \
+ $(am__EXEEXT_83) $(am__EXEEXT_84) $(am__EXEEXT_85) \
+ $(am__EXEEXT_86) $(am__EXEEXT_87) $(am__EXEEXT_88) \
+ $(am__EXEEXT_89) $(am__EXEEXT_90) $(am__EXEEXT_91) \
+ $(am__EXEEXT_92) $(am__EXEEXT_93) $(am__EXEEXT_94) \
+ $(am__EXEEXT_95) $(am__EXEEXT_96) $(am__EXEEXT_97) \
+ $(am__EXEEXT_98) $(am__EXEEXT_99) $(am__EXEEXT_100) \
+ $(am__EXEEXT_101) $(am__EXEEXT_102) $(am__EXEEXT_103) \
+ $(am__EXEEXT_104) $(am__EXEEXT_105) $(am__EXEEXT_106) \
+ $(am__EXEEXT_107) $(am__EXEEXT_108) $(am__EXEEXT_109) \
+ $(am__EXEEXT_110) $(am__EXEEXT_111) $(am__EXEEXT_112) \
+ $(am__EXEEXT_113) $(am__EXEEXT_114) $(am__EXEEXT_115) \
+ $(am__EXEEXT_116) $(am__EXEEXT_117) $(am__EXEEXT_118) \
+ $(am__EXEEXT_119) $(am__EXEEXT_120) $(am__EXEEXT_121) \
+ $(am__EXEEXT_122) $(am__EXEEXT_123) $(am__EXEEXT_124) \
+ $(am__EXEEXT_125) $(am__EXEEXT_126) $(am__EXEEXT_127) \
+ $(am__EXEEXT_128) $(am__EXEEXT_129) $(am__EXEEXT_130) \
+ $(am__EXEEXT_131) $(am__EXEEXT_132) $(am__EXEEXT_133) \
+ $(am__EXEEXT_134) $(am__EXEEXT_135) $(am__EXEEXT_136) \
+ $(am__EXEEXT_137) $(am__EXEEXT_138) $(am__EXEEXT_139) \
+ $(am__EXEEXT_140) $(am__EXEEXT_141) $(am__EXEEXT_142) \
+ $(am__EXEEXT_143) $(am__EXEEXT_144) $(am__EXEEXT_145) \
+ $(am__EXEEXT_146) $(am__EXEEXT_147) $(am__EXEEXT_148) \
+ $(am__EXEEXT_149) $(am__EXEEXT_150) $(am__EXEEXT_151) \
+ $(am__EXEEXT_152) $(am__EXEEXT_153) $(am__EXEEXT_154) \
+ $(am__EXEEXT_155) $(am__EXEEXT_156) $(am__EXEEXT_157) \
+ $(am__EXEEXT_158) $(am__EXEEXT_159) $(am__EXEEXT_160) \
+ $(am__EXEEXT_161) $(am__EXEEXT_162) $(am__EXEEXT_163) \
+ $(am__EXEEXT_164) $(am__EXEEXT_165) $(am__EXEEXT_166) \
+ $(am__EXEEXT_167) $(am__EXEEXT_168) $(am__EXEEXT_169) \
+ $(am__EXEEXT_170) $(am__EXEEXT_171) $(am__EXEEXT_172) \
+ $(am__EXEEXT_173) $(am__EXEEXT_174) $(am__EXEEXT_175) \
+ $(am__EXEEXT_176) $(am__EXEEXT_177) $(am__EXEEXT_178) \
+ $(am__EXEEXT_179) $(am__EXEEXT_180) $(am__EXEEXT_181) \
+ $(am__EXEEXT_182) $(am__EXEEXT_183) $(am__EXEEXT_184) \
+ $(am__EXEEXT_185) $(am__EXEEXT_186) $(am__EXEEXT_187) \
+ $(am__EXEEXT_188) $(am__EXEEXT_189) $(am__EXEEXT_190) \
+ $(am__EXEEXT_191) $(am__EXEEXT_192) $(am__EXEEXT_193) \
+ $(am__EXEEXT_194) $(am__EXEEXT_195) $(am__EXEEXT_196) \
+ $(am__EXEEXT_197) $(am__EXEEXT_198) $(am__EXEEXT_199) \
+ $(am__EXEEXT_200) $(am__EXEEXT_201) $(am__EXEEXT_202) \
+ $(am__EXEEXT_203) $(am__EXEEXT_204) $(am__EXEEXT_205) \
+ $(am__EXEEXT_206) $(am__EXEEXT_207) $(am__EXEEXT_208) \
+ $(am__EXEEXT_209) $(am__EXEEXT_210) $(am__EXEEXT_211) \
+ $(am__EXEEXT_212) $(am__EXEEXT_213) $(am__EXEEXT_214) \
+ $(am__EXEEXT_215) $(am__EXEEXT_216) $(am__EXEEXT_217) \
+ $(am__EXEEXT_218) $(am__EXEEXT_219) $(am__EXEEXT_220) \
+ $(am__EXEEXT_221) $(am__EXEEXT_222) $(am__EXEEXT_223) \
+ $(am__EXEEXT_224) $(am__EXEEXT_225) $(am__EXEEXT_226) \
+ $(am__EXEEXT_227) $(am__EXEEXT_228) $(am__EXEEXT_229) \
+ $(am__EXEEXT_230) $(am__EXEEXT_231) $(am__EXEEXT_232) \
+ $(am__EXEEXT_233) $(am__EXEEXT_234) $(am__EXEEXT_235) \
+ $(am__EXEEXT_236) $(am__EXEEXT_237) $(am__EXEEXT_238) \
+ $(am__EXEEXT_239) $(am__EXEEXT_240) $(am__EXEEXT_241) \
+ $(am__EXEEXT_242) $(am__EXEEXT_243) $(am__EXEEXT_244) \
+ $(am__EXEEXT_245) $(am__EXEEXT_246) $(am__EXEEXT_247) \
+ $(am__EXEEXT_248) $(am__EXEEXT_249) $(am__EXEEXT_250) \
+ $(am__EXEEXT_251) $(am__EXEEXT_252) $(am__EXEEXT_253) \
+ $(am__EXEEXT_254) $(am__EXEEXT_255) $(am__EXEEXT_256) \
+ $(am__EXEEXT_257) $(am__EXEEXT_258) $(am__EXEEXT_259) \
+ $(am__EXEEXT_260) $(am__EXEEXT_261) $(am__EXEEXT_262) \
+ $(am__EXEEXT_263) $(am__EXEEXT_264) $(am__EXEEXT_265) \
+ $(am__EXEEXT_266) $(am__EXEEXT_267) $(am__EXEEXT_268) \
+ $(am__EXEEXT_269) $(am__EXEEXT_270) $(am__EXEEXT_271) \
+ $(am__EXEEXT_272) $(am__EXEEXT_273) $(am__EXEEXT_274) \
+ $(am__EXEEXT_275) $(am__EXEEXT_276) $(am__EXEEXT_277) \
+ $(am__EXEEXT_278) $(am__EXEEXT_279) $(am__EXEEXT_280) \
+ $(am__EXEEXT_281) $(am__EXEEXT_282) $(am__EXEEXT_283) \
+ $(am__EXEEXT_284) $(am__EXEEXT_285) $(am__EXEEXT_286) \
+ $(am__EXEEXT_287) $(am__EXEEXT_288) $(am__EXEEXT_289) \
+ $(am__EXEEXT_290) $(am__EXEEXT_291) $(am__EXEEXT_292) \
+ $(am__EXEEXT_293) $(am__EXEEXT_294) $(am__EXEEXT_295) \
+ $(am__EXEEXT_296) $(am__EXEEXT_297) $(am__EXEEXT_298) \
+ $(am__EXEEXT_299) $(am__EXEEXT_300) $(am__EXEEXT_301) \
+ $(am__EXEEXT_302) $(am__EXEEXT_303) $(am__EXEEXT_304) \
+ $(am__EXEEXT_305) $(am__EXEEXT_306) $(am__EXEEXT_307) \
+ $(am__EXEEXT_308) $(am__EXEEXT_309) $(am__EXEEXT_310) \
+ $(am__EXEEXT_311) $(am__EXEEXT_312) $(am__EXEEXT_313) \
+ $(am__EXEEXT_314) $(am__EXEEXT_315) $(am__EXEEXT_316) \
+ $(am__EXEEXT_317) $(am__EXEEXT_318) $(am__EXEEXT_319) \
+ $(am__EXEEXT_320) $(am__EXEEXT_321) $(am__EXEEXT_322) \
+ $(am__EXEEXT_323) $(am__EXEEXT_324) $(am__EXEEXT_325) \
+ $(am__EXEEXT_326) $(am__EXEEXT_327) $(am__EXEEXT_328) \
+ $(am__EXEEXT_329) $(am__EXEEXT_330) $(am__EXEEXT_331) \
+ $(am__EXEEXT_332) $(am__EXEEXT_333) $(am__EXEEXT_334) \
+ $(am__EXEEXT_335) $(am__EXEEXT_336) $(am__EXEEXT_337) \
+ $(am__EXEEXT_338) $(am__EXEEXT_339) $(am__EXEEXT_340) \
+ $(am__EXEEXT_341) $(am__EXEEXT_342) $(am__EXEEXT_343) \
+ $(am__EXEEXT_344) $(am__EXEEXT_345) $(am__EXEEXT_346) \
+ $(am__EXEEXT_347) $(am__EXEEXT_348) $(am__EXEEXT_349) \
+ $(am__EXEEXT_350) $(am__EXEEXT_351) $(am__EXEEXT_352) \
+ $(am__EXEEXT_353) $(am__EXEEXT_354) $(am__EXEEXT_355) \
+ $(am__EXEEXT_356) $(am__EXEEXT_357) $(am__EXEEXT_358) \
+ $(am__EXEEXT_359) $(am__EXEEXT_360) $(am__EXEEXT_361) \
+ $(am__EXEEXT_362) $(am__EXEEXT_363) $(am__EXEEXT_364) \
+ $(am__EXEEXT_365) $(am__EXEEXT_366) $(am__EXEEXT_367) \
+ $(am__EXEEXT_368) $(am__EXEEXT_369) $(am__EXEEXT_370) \
+ $(am__EXEEXT_371) $(am__EXEEXT_372) $(am__EXEEXT_373) \
+ $(am__EXEEXT_374) $(am__EXEEXT_375) $(am__EXEEXT_376) \
+ $(am__EXEEXT_377) $(am__EXEEXT_378) $(am__EXEEXT_379) \
+ $(am__EXEEXT_380) $(am__EXEEXT_381) $(am__EXEEXT_382) \
+ $(am__EXEEXT_383) $(am__EXEEXT_384) $(am__EXEEXT_385) \
+ $(am__EXEEXT_386) $(am__EXEEXT_387) $(am__EXEEXT_388) \
+ $(am__EXEEXT_389) $(am__EXEEXT_390) $(am__EXEEXT_391) \
+ $(am__EXEEXT_392) $(am__EXEEXT_393) $(am__EXEEXT_394) \
+ $(am__EXEEXT_395) $(am__EXEEXT_396) $(am__EXEEXT_397) \
+ $(am__EXEEXT_398) $(am__EXEEXT_399) $(am__EXEEXT_400) \
+ $(am__EXEEXT_401) $(am__EXEEXT_402) $(am__EXEEXT_403) \
+ $(am__EXEEXT_404) $(am__EXEEXT_405) $(am__EXEEXT_406) \
+ $(am__EXEEXT_407) $(am__EXEEXT_408) $(am__EXEEXT_409) \
+ $(am__EXEEXT_410) $(am__EXEEXT_411) $(am__EXEEXT_412) \
+ $(am__EXEEXT_413) $(am__EXEEXT_414) $(am__EXEEXT_415) \
+ $(am__EXEEXT_416) $(am__EXEEXT_417) $(am__EXEEXT_418) \
+ $(am__EXEEXT_419) $(am__EXEEXT_420) $(am__EXEEXT_421) \
+ $(am__EXEEXT_422) $(am__EXEEXT_423) $(am__EXEEXT_424) \
+ $(am__EXEEXT_425) $(am__EXEEXT_426) $(am__EXEEXT_427) \
+ $(am__EXEEXT_428) $(am__EXEEXT_429) $(am__EXEEXT_430) \
+ $(am__EXEEXT_431) $(am__EXEEXT_432) $(am__EXEEXT_433) \
+ $(am__EXEEXT_434) $(am__EXEEXT_435) $(am__EXEEXT_436) \
+ $(am__EXEEXT_437) $(am__EXEEXT_438) $(am__EXEEXT_439) \
+ $(am__EXEEXT_440) $(am__EXEEXT_441) $(am__EXEEXT_442) \
+ $(am__EXEEXT_443) $(am__EXEEXT_444) $(am__EXEEXT_445) \
+ $(am__EXEEXT_446) $(am__EXEEXT_447) $(am__EXEEXT_448) \
+ $(am__EXEEXT_449) $(am__EXEEXT_450) $(am__EXEEXT_451) \
+ $(am__EXEEXT_452) $(am__EXEEXT_453) $(am__EXEEXT_454) \
+ $(am__EXEEXT_455) $(am__EXEEXT_456) $(am__EXEEXT_457) \
+ $(am__EXEEXT_458) $(am__EXEEXT_459) $(am__EXEEXT_460) \
+ $(am__EXEEXT_461) $(am__EXEEXT_462) $(am__EXEEXT_463) \
+ $(am__EXEEXT_464) $(am__EXEEXT_465) $(am__EXEEXT_466) \
+ $(am__EXEEXT_467) $(am__EXEEXT_468) $(am__EXEEXT_469) \
+ $(am__EXEEXT_470) $(am__EXEEXT_471) $(am__EXEEXT_472) \
+ $(am__EXEEXT_473) $(am__EXEEXT_474) $(am__EXEEXT_475) \
+ $(am__EXEEXT_476) $(am__EXEEXT_477) $(am__EXEEXT_478) \
+ $(am__EXEEXT_479) $(am__EXEEXT_480) $(am__EXEEXT_481) \
+ $(am__EXEEXT_482) $(am__EXEEXT_483) $(am__EXEEXT_484) \
+ $(am__EXEEXT_485) $(am__EXEEXT_486) $(am__EXEEXT_487) \
+ $(am__EXEEXT_488) $(am__EXEEXT_489) $(am__EXEEXT_490) \
+ $(am__EXEEXT_491) $(am__EXEEXT_492) $(am__EXEEXT_493) \
+ $(am__EXEEXT_494) $(am__EXEEXT_495) $(am__EXEEXT_496) \
+ $(am__EXEEXT_497) $(am__EXEEXT_498) $(am__EXEEXT_499) \
+ $(am__EXEEXT_500) $(am__EXEEXT_501) $(am__EXEEXT_502) \
+ $(am__EXEEXT_503) $(am__EXEEXT_504) $(am__EXEEXT_505) \
+ $(am__EXEEXT_506) $(am__EXEEXT_507) $(am__EXEEXT_508) \
+ $(am__EXEEXT_509) $(am__EXEEXT_510) $(am__EXEEXT_511) \
+ $(am__EXEEXT_512) $(am__EXEEXT_513) $(am__EXEEXT_514) \
+ $(am__EXEEXT_515) $(am__EXEEXT_516) $(am__EXEEXT_517) \
+ $(am__EXEEXT_518) $(am__EXEEXT_519) $(am__EXEEXT_520) \
+ $(am__EXEEXT_521) $(am__EXEEXT_522) $(am__EXEEXT_523) \
+ $(am__EXEEXT_524) $(am__EXEEXT_525) $(am__EXEEXT_526) \
+ $(am__EXEEXT_527) $(am__EXEEXT_528) $(am__EXEEXT_529) \
+ $(am__EXEEXT_530) $(am__EXEEXT_531) $(am__EXEEXT_532) \
+ $(am__EXEEXT_533) $(am__EXEEXT_534) $(am__EXEEXT_535) \
+ $(am__EXEEXT_536) $(am__EXEEXT_537) $(am__EXEEXT_538) \
+ $(am__EXEEXT_539) $(am__EXEEXT_540) $(am__EXEEXT_541) \
+ $(am__EXEEXT_542) $(am__EXEEXT_543) $(am__EXEEXT_544) \
+ $(am__EXEEXT_545) $(am__EXEEXT_546) $(am__EXEEXT_547) \
+ $(am__EXEEXT_548) $(am__EXEEXT_549) $(am__EXEEXT_550) \
+ $(am__EXEEXT_551) $(am__EXEEXT_552) $(am__EXEEXT_553) \
+ $(am__EXEEXT_554) $(am__EXEEXT_555) $(am__EXEEXT_556) \
+ $(am__EXEEXT_557) $(am__EXEEXT_558) $(am__EXEEXT_559) \
+ $(am__EXEEXT_560) $(am__EXEEXT_561) $(am__EXEEXT_562) \
+ $(am__EXEEXT_563) $(am__EXEEXT_564) $(am__EXEEXT_565) \
+ $(am__EXEEXT_566) $(am__EXEEXT_567) $(am__EXEEXT_568) \
+ $(am__EXEEXT_569) $(am__EXEEXT_570) $(am__EXEEXT_571) \
+ $(am__EXEEXT_572) $(am__EXEEXT_573) $(am__EXEEXT_574) \
+ $(am__EXEEXT_575) $(am__EXEEXT_576) $(am__EXEEXT_577) \
+ $(am__EXEEXT_578) $(am__EXEEXT_579) $(am__EXEEXT_580) \
+ $(am__EXEEXT_581) $(am__EXEEXT_582) $(am__EXEEXT_583) \
+ $(am__EXEEXT_584) $(am__EXEEXT_585) $(am__EXEEXT_586) \
+ $(am__EXEEXT_587) $(am__EXEEXT_588) $(am__EXEEXT_589) \
+ $(am__EXEEXT_590) $(am__EXEEXT_591) $(am__EXEEXT_592) \
+ $(am__EXEEXT_593) $(am__EXEEXT_594) $(am__EXEEXT_595) \
+ $(am__EXEEXT_596) $(am__EXEEXT_597) $(am__EXEEXT_598) \
+ $(am__EXEEXT_599) $(am__EXEEXT_600) $(am__EXEEXT_601) \
+ $(am__EXEEXT_602) $(am__EXEEXT_603) $(am__EXEEXT_604) \
+ $(am__EXEEXT_605) $(am__EXEEXT_606) $(am__EXEEXT_607) \
+ $(am__EXEEXT_608) $(am__EXEEXT_609) $(am__EXEEXT_610) \
+ $(am__EXEEXT_611) $(am__EXEEXT_612) $(am__EXEEXT_613) \
+ $(am__EXEEXT_614) $(am__EXEEXT_615) $(am__EXEEXT_616) \
+ $(am__EXEEXT_617) $(am__EXEEXT_618) $(am__EXEEXT_619) \
+ $(am__EXEEXT_620) $(am__EXEEXT_621) $(am__EXEEXT_622) \
+ $(am__EXEEXT_623) $(am__EXEEXT_624) $(am__EXEEXT_625) \
+ $(am__EXEEXT_626) $(am__EXEEXT_627) $(am__EXEEXT_628) \
+ $(am__EXEEXT_629) $(am__EXEEXT_630) $(am__EXEEXT_631) \
+ $(am__EXEEXT_632) $(am__EXEEXT_633) $(am__EXEEXT_634) \
+ $(am__EXEEXT_635) $(am__EXEEXT_636) $(am__EXEEXT_637) \
+ $(am__EXEEXT_638) $(am__EXEEXT_639) $(am__EXEEXT_640) \
+ $(am__EXEEXT_641) $(am__EXEEXT_642) $(am__EXEEXT_643) \
+ $(am__EXEEXT_644) $(am__EXEEXT_645) $(am__EXEEXT_646) \
+ $(am__EXEEXT_647) $(am__EXEEXT_648) $(am__EXEEXT_649) \
+ $(am__EXEEXT_650) $(am__EXEEXT_651) $(am__EXEEXT_652) \
+ $(am__EXEEXT_653) $(am__EXEEXT_654) $(am__EXEEXT_655) \
+ $(am__EXEEXT_656) $(am__EXEEXT_657) $(am__EXEEXT_658) \
+ $(am__EXEEXT_659) $(am__EXEEXT_660) $(am__EXEEXT_661) \
+ $(am__EXEEXT_662) $(am__EXEEXT_663) $(am__EXEEXT_664) \
+ $(am__EXEEXT_665) $(am__EXEEXT_666) $(am__EXEEXT_667) \
+ $(am__EXEEXT_668) $(am__EXEEXT_669) $(am__EXEEXT_670) \
+ $(am__EXEEXT_671) $(am__EXEEXT_672) $(am__EXEEXT_673) \
+ $(am__EXEEXT_674) $(am__EXEEXT_675) $(am__EXEEXT_676) \
+ $(am__EXEEXT_677) $(am__EXEEXT_678) $(am__EXEEXT_679) \
+ $(am__EXEEXT_680) $(am__EXEEXT_681) $(am__EXEEXT_682) \
+ $(am__EXEEXT_683) $(am__EXEEXT_684) $(am__EXEEXT_685) \
+ $(am__EXEEXT_686) $(am__EXEEXT_687) $(am__EXEEXT_688) \
+ $(am__EXEEXT_689) $(am__EXEEXT_690) $(am__EXEEXT_691) \
+ $(am__EXEEXT_692) $(am__EXEEXT_693) $(am__EXEEXT_694) \
+ $(am__EXEEXT_695) $(am__EXEEXT_696) $(am__EXEEXT_697) \
+ $(am__EXEEXT_698) $(am__EXEEXT_699) $(am__EXEEXT_700) \
+ $(am__EXEEXT_701) $(am__EXEEXT_702) $(am__EXEEXT_703) \
+ $(am__EXEEXT_704) $(am__EXEEXT_705) $(am__EXEEXT_706) \
+ $(am__EXEEXT_707) $(am__EXEEXT_708) $(am__EXEEXT_709) \
+ $(am__EXEEXT_710) $(am__EXEEXT_711) $(am__EXEEXT_712) \
+ $(am__EXEEXT_713) $(am__EXEEXT_714) $(am__EXEEXT_715) \
+ $(am__EXEEXT_716) $(am__EXEEXT_717) $(am__EXEEXT_718) \
+ $(am__EXEEXT_719) $(am__EXEEXT_720) $(am__EXEEXT_721) \
+ $(am__EXEEXT_722) $(am__EXEEXT_723) $(am__EXEEXT_724) \
+ $(am__EXEEXT_725) $(am__EXEEXT_726) $(am__EXEEXT_727) \
+ $(am__EXEEXT_728) $(am__EXEEXT_729) $(am__EXEEXT_730) \
+ $(am__EXEEXT_731) $(am__EXEEXT_732) $(am__EXEEXT_733) \
+ $(am__EXEEXT_734) $(am__EXEEXT_735) $(am__EXEEXT_736) \
+ $(am__EXEEXT_737) $(am__EXEEXT_738) $(am__EXEEXT_739) \
+ $(am__EXEEXT_740) $(am__EXEEXT_741) $(am__EXEEXT_742) \
+ $(am__EXEEXT_743) $(am__EXEEXT_744) $(am__EXEEXT_745) \
+ $(am__EXEEXT_746) $(am__EXEEXT_747) $(am__EXEEXT_748) \
+ $(am__EXEEXT_749) $(am__EXEEXT_750) $(am__EXEEXT_751) \
+ $(am__EXEEXT_752) $(am__EXEEXT_753) $(am__EXEEXT_754) \
+ $(am__EXEEXT_755) $(am__EXEEXT_756) $(am__EXEEXT_757) \
+ $(am__EXEEXT_758) $(am__EXEEXT_759) $(am__EXEEXT_760) \
+ $(am__EXEEXT_761) $(am__EXEEXT_762) $(am__EXEEXT_763) \
+ $(am__EXEEXT_764) $(am__EXEEXT_765) $(am__EXEEXT_766) \
+ $(am__EXEEXT_767) $(am__EXEEXT_768) $(am__EXEEXT_769) \
+ $(am__EXEEXT_770) $(am__EXEEXT_771) $(am__EXEEXT_772) \
+ $(am__EXEEXT_773) $(am__EXEEXT_774) $(am__EXEEXT_775) \
+ $(am__EXEEXT_776) $(am__EXEEXT_777) $(am__EXEEXT_778) \
+ $(am__EXEEXT_779) $(am__EXEEXT_780) $(am__EXEEXT_781) \
+ $(am__EXEEXT_782) $(am__EXEEXT_783) $(am__EXEEXT_784) \
+ $(am__EXEEXT_785) $(am__EXEEXT_786) $(am__EXEEXT_787) \
+ $(am__EXEEXT_788) $(am__EXEEXT_789) $(am__EXEEXT_790) \
+ $(am__EXEEXT_791) $(am__EXEEXT_792) $(am__EXEEXT_793) \
+ $(am__EXEEXT_794) $(am__EXEEXT_795) $(am__EXEEXT_796) \
+ $(am__EXEEXT_797) $(am__EXEEXT_798) $(am__EXEEXT_799) \
+ $(am__EXEEXT_800) $(am__EXEEXT_801) $(am__EXEEXT_802) \
+ $(am__EXEEXT_803) $(am__EXEEXT_804) $(am__EXEEXT_805) \
+ $(am__EXEEXT_806) $(am__EXEEXT_807) $(am__EXEEXT_808) \
+ $(am__EXEEXT_809) $(am__EXEEXT_810) $(am__EXEEXT_811) \
+ $(am__EXEEXT_812) $(am__EXEEXT_813) $(am__EXEEXT_814) \
+ $(am__EXEEXT_815) $(am__EXEEXT_816) $(am__EXEEXT_817) \
+ $(am__EXEEXT_818) $(am__EXEEXT_819) $(am__EXEEXT_820) \
+ $(am__EXEEXT_821) $(am__EXEEXT_822) $(am__EXEEXT_823) \
+ $(am__EXEEXT_824) $(am__EXEEXT_825) $(am__EXEEXT_826) \
+ $(am__EXEEXT_827) $(am__EXEEXT_828) $(am__EXEEXT_829) \
+ $(am__EXEEXT_830) $(am__EXEEXT_831) $(am__EXEEXT_832) \
+ $(am__EXEEXT_833) $(am__EXEEXT_834) $(am__EXEEXT_835) \
+ $(am__EXEEXT_836) $(am__EXEEXT_837) $(am__EXEEXT_838) \
+ $(am__EXEEXT_839) $(am__EXEEXT_840) $(am__EXEEXT_841) \
+ $(am__EXEEXT_842) $(am__EXEEXT_843) $(am__EXEEXT_844) \
+ $(am__EXEEXT_845) $(am__EXEEXT_846) $(am__EXEEXT_847) \
+ $(am__EXEEXT_848) $(am__EXEEXT_849) $(am__EXEEXT_850) \
+ $(am__EXEEXT_851) $(am__EXEEXT_852) $(am__EXEEXT_853) \
+ $(am__EXEEXT_854) $(am__EXEEXT_855) $(am__EXEEXT_856) \
+ $(am__EXEEXT_857) $(am__EXEEXT_858) $(am__EXEEXT_859) \
+ $(am__EXEEXT_860) $(am__EXEEXT_861) $(am__EXEEXT_862) \
+ $(am__EXEEXT_863) $(am__EXEEXT_864) $(am__EXEEXT_865) \
+ $(am__EXEEXT_866) $(am__EXEEXT_867) $(am__EXEEXT_868) \
+ $(am__EXEEXT_869) $(am__EXEEXT_870) $(am__EXEEXT_871) \
+ $(am__EXEEXT_872) $(am__EXEEXT_873) $(am__EXEEXT_874) \
+ $(am__EXEEXT_875) $(am__EXEEXT_876) $(am__EXEEXT_877) \
+ $(am__EXEEXT_878) $(am__EXEEXT_879) $(am__EXEEXT_880) \
+ $(am__EXEEXT_881) $(am__EXEEXT_882) $(am__EXEEXT_883) \
+ $(am__EXEEXT_884) $(am__EXEEXT_885) $(am__EXEEXT_886) \
+ $(am__EXEEXT_887) $(am__EXEEXT_888) $(am__EXEEXT_889) \
+ $(am__EXEEXT_890) $(am__EXEEXT_891) $(am__EXEEXT_892) \
+ $(am__EXEEXT_893) $(am__EXEEXT_894) $(am__EXEEXT_895) \
+ $(am__EXEEXT_896) $(am__EXEEXT_897) $(am__EXEEXT_898) \
+ $(am__EXEEXT_899) $(am__EXEEXT_900) $(am__EXEEXT_901) \
+ $(am__EXEEXT_902) $(am__EXEEXT_903) $(am__EXEEXT_904) \
+ $(am__EXEEXT_905) $(am__EXEEXT_906) $(am__EXEEXT_907) \
+ $(am__EXEEXT_908) $(am__EXEEXT_909) $(am__EXEEXT_910) \
+ $(am__EXEEXT_911) $(am__EXEEXT_912) $(am__EXEEXT_913) \
+ $(am__EXEEXT_914) $(am__EXEEXT_915) $(am__EXEEXT_916) \
+ $(am__EXEEXT_917) $(am__EXEEXT_918) $(am__EXEEXT_919) \
+ $(am__EXEEXT_920) $(am__EXEEXT_921) $(am__EXEEXT_922) \
+ $(am__EXEEXT_923) $(am__EXEEXT_924) $(am__EXEEXT_925) \
+ $(am__EXEEXT_926) $(am__EXEEXT_927) $(am__EXEEXT_928) \
+ $(am__EXEEXT_929) $(am__EXEEXT_930) $(am__EXEEXT_931) \
+ $(am__EXEEXT_932) $(am__EXEEXT_933) $(am__EXEEXT_934) \
+ $(am__EXEEXT_935) $(am__EXEEXT_936) $(am__EXEEXT_937) \
+ $(am__EXEEXT_938) $(am__EXEEXT_939) $(am__EXEEXT_940) \
+ $(am__EXEEXT_941) $(am__EXEEXT_942) $(am__EXEEXT_943) \
+ $(am__EXEEXT_944) $(am__EXEEXT_945) $(am__EXEEXT_946) \
+ $(am__EXEEXT_947) $(am__EXEEXT_948) $(am__EXEEXT_949) \
+ $(am__EXEEXT_950) $(am__EXEEXT_951) $(am__EXEEXT_952) \
+ $(am__EXEEXT_953) $(am__EXEEXT_954) $(am__EXEEXT_955) \
+ $(am__EXEEXT_956) $(am__EXEEXT_957) $(am__EXEEXT_958) \
+ $(am__EXEEXT_959) $(am__EXEEXT_960) $(am__EXEEXT_961) \
+ $(am__EXEEXT_962) $(am__EXEEXT_963) $(am__EXEEXT_964) \
+ $(am__EXEEXT_965) $(am__EXEEXT_966) $(am__EXEEXT_967) \
+ $(am__EXEEXT_968) $(am__EXEEXT_969) $(am__EXEEXT_970) \
+ $(am__EXEEXT_971) $(am__EXEEXT_972) $(am__EXEEXT_973) \
+ $(am__EXEEXT_974) $(am__EXEEXT_975) $(am__EXEEXT_976) \
+ $(am__EXEEXT_977) $(am__EXEEXT_978) $(am__EXEEXT_979) \
+ $(am__EXEEXT_980) $(am__EXEEXT_981) $(am__EXEEXT_982) \
+ $(am__EXEEXT_983) $(am__EXEEXT_984) $(am__EXEEXT_985) \
+ $(am__EXEEXT_986) $(am__EXEEXT_987) $(am__EXEEXT_988) \
+ $(am__EXEEXT_989) $(am__EXEEXT_990) $(am__EXEEXT_991) \
+ $(am__EXEEXT_992) $(am__EXEEXT_993) $(am__EXEEXT_994) \
+ $(am__EXEEXT_995) $(am__EXEEXT_996) $(am__EXEEXT_997) \
+ $(am__EXEEXT_998) $(am__EXEEXT_999) $(am__EXEEXT_1000) \
+ $(am__EXEEXT_1001) $(am__EXEEXT_1002) $(am__EXEEXT_1003) \
+ $(am__EXEEXT_1004) $(am__EXEEXT_1005) $(am__EXEEXT_1006) \
+ $(am__EXEEXT_1007) $(am__EXEEXT_1008) $(am__EXEEXT_1009) \
+ $(am__EXEEXT_1010) $(am__EXEEXT_1011) $(am__EXEEXT_1012) \
+ $(am__EXEEXT_1013) $(am__EXEEXT_1014) $(am__EXEEXT_1015) \
+ $(am__EXEEXT_1016) $(am__EXEEXT_1017) $(am__EXEEXT_1018) \
+ $(am__EXEEXT_1019) $(am__EXEEXT_1020) $(am__EXEEXT_1021) \
+ $(am__EXEEXT_1022) $(am__EXEEXT_1023) $(am__EXEEXT_1024) \
+ $(am__EXEEXT_1025) $(am__EXEEXT_1026) $(am__EXEEXT_1027) \
+ $(am__EXEEXT_1028) $(am__EXEEXT_1029) $(am__EXEEXT_1030) \
+ $(am__EXEEXT_1031) $(am__EXEEXT_1032) $(am__EXEEXT_1033) \
+ $(am__EXEEXT_1034) $(am__EXEEXT_1035) $(am__EXEEXT_1036) \
+ $(am__EXEEXT_1037) $(am__EXEEXT_1038) $(am__EXEEXT_1039) \
+ $(am__EXEEXT_1040) $(am__EXEEXT_1041) $(am__EXEEXT_1042) \
+ $(am__EXEEXT_1043) $(am__EXEEXT_1044) $(am__EXEEXT_1045) \
+ $(am__EXEEXT_1046) $(am__EXEEXT_1047) $(am__EXEEXT_1048) \
+ $(am__EXEEXT_1049) $(am__EXEEXT_1050) $(am__EXEEXT_1051) \
+ $(am__EXEEXT_1052) $(am__EXEEXT_1053) $(am__EXEEXT_1054) \
+ $(am__EXEEXT_1055) $(am__EXEEXT_1056) $(am__EXEEXT_1057) \
+ $(am__EXEEXT_1058) $(am__EXEEXT_1059) $(am__EXEEXT_1060) \
+ $(am__EXEEXT_1061) $(am__EXEEXT_1062) $(am__EXEEXT_1063) \
+ $(am__EXEEXT_1064) $(am__EXEEXT_1065) $(am__EXEEXT_1066) \
+ $(am__EXEEXT_1067) $(am__EXEEXT_1068) $(am__EXEEXT_1069) \
+ $(am__EXEEXT_1070) $(am__EXEEXT_1071) $(am__EXEEXT_1072) \
+ $(am__EXEEXT_1073) $(am__EXEEXT_1074) $(am__EXEEXT_1075) \
+ $(am__EXEEXT_1076) $(am__EXEEXT_1077) $(am__EXEEXT_1078) \
+ $(am__EXEEXT_1079) $(am__EXEEXT_1080) $(am__EXEEXT_1081) \
+ $(am__EXEEXT_1082) $(am__EXEEXT_1083) $(am__EXEEXT_1084) \
+ $(am__EXEEXT_1085) $(am__EXEEXT_1086) $(am__EXEEXT_1087) \
+ $(am__EXEEXT_1088) $(am__EXEEXT_1089) $(am__EXEEXT_1090) \
+ $(am__EXEEXT_1091) $(am__EXEEXT_1092) $(am__EXEEXT_1093) \
+ $(am__EXEEXT_1094) $(am__EXEEXT_1095) $(am__EXEEXT_1096) \
+ $(am__EXEEXT_1097) $(am__EXEEXT_1098) $(am__EXEEXT_1099) \
+ $(am__EXEEXT_1100) $(am__EXEEXT_1101) $(am__EXEEXT_1102) \
+ $(am__EXEEXT_1103) $(am__EXEEXT_1104) $(am__EXEEXT_1105) \
+ $(am__EXEEXT_1106) $(am__EXEEXT_1107) $(am__EXEEXT_1108) \
+ $(am__EXEEXT_1109) $(am__EXEEXT_1110) $(am__EXEEXT_1111) \
+ $(am__EXEEXT_1112) $(am__EXEEXT_1113) $(am__EXEEXT_1114) \
+ $(am__EXEEXT_1115) $(am__EXEEXT_1116) $(am__EXEEXT_1117) \
+ $(am__EXEEXT_1118) $(am__EXEEXT_1119) $(am__EXEEXT_1120) \
+ $(am__EXEEXT_1121) $(am__EXEEXT_1122) $(am__EXEEXT_1123) \
+ $(am__EXEEXT_1124) $(am__EXEEXT_1125) $(am__EXEEXT_1126) \
+ $(am__EXEEXT_1127) $(am__EXEEXT_1128) $(am__EXEEXT_1129) \
+ $(am__EXEEXT_1130) $(am__EXEEXT_1131) $(am__EXEEXT_1132) \
+ $(am__EXEEXT_1133) $(am__EXEEXT_1134) $(am__EXEEXT_1135) \
+ $(am__EXEEXT_1136) $(am__EXEEXT_1137) $(am__EXEEXT_1138) \
+ $(am__EXEEXT_1139) $(am__EXEEXT_1140) $(am__EXEEXT_1141) \
+ $(am__EXEEXT_1142) $(am__EXEEXT_1143) $(am__EXEEXT_1144) \
+ $(am__EXEEXT_1145) $(am__EXEEXT_1146) $(am__EXEEXT_1147) \
+ $(am__EXEEXT_1148) $(am__EXEEXT_1149) $(am__EXEEXT_1150) \
+ $(am__EXEEXT_1151) $(am__EXEEXT_1152) $(am__EXEEXT_1153) \
+ $(am__EXEEXT_1154) $(am__EXEEXT_1155) $(am__EXEEXT_1156) \
+ $(am__EXEEXT_1157) $(am__EXEEXT_1158) $(am__EXEEXT_1159) \
+ $(am__EXEEXT_1160) $(am__EXEEXT_1161) $(am__EXEEXT_1162) \
+ $(am__EXEEXT_1163) $(am__EXEEXT_1164) $(am__EXEEXT_1165) \
+ $(am__EXEEXT_1166) $(am__EXEEXT_1167) $(am__EXEEXT_1168) \
+ $(am__EXEEXT_1169) $(am__EXEEXT_1170) $(am__EXEEXT_1171) \
+ $(am__EXEEXT_1172) $(am__EXEEXT_1173) $(am__EXEEXT_1174) \
+ $(am__EXEEXT_1175) $(am__EXEEXT_1176) $(am__EXEEXT_1177) \
+ $(am__EXEEXT_1178) $(am__EXEEXT_1179) $(am__EXEEXT_1180) \
+ $(am__EXEEXT_1181) $(am__EXEEXT_1182) $(am__EXEEXT_1183) \
+ $(am__EXEEXT_1184) $(am__EXEEXT_1185) $(am__EXEEXT_1186) \
+ $(am__EXEEXT_1187) $(am__EXEEXT_1188) $(am__EXEEXT_1189) \
+ $(am__EXEEXT_1190) $(am__EXEEXT_1191) $(am__EXEEXT_1192) \
+ $(am__EXEEXT_1193) $(am__EXEEXT_1194) $(am__EXEEXT_1195) \
+ $(am__EXEEXT_1196) $(am__EXEEXT_1197) $(am__EXEEXT_1198) \
+ $(am__EXEEXT_1199) $(am__EXEEXT_1200) $(am__EXEEXT_1201) \
+ $(am__EXEEXT_1202) $(am__EXEEXT_1203) $(am__EXEEXT_1204) \
+ $(am__EXEEXT_1205) $(am__EXEEXT_1206) $(am__EXEEXT_1207) \
+ $(am__EXEEXT_1208) $(am__EXEEXT_1209) $(am__EXEEXT_1210) \
+ $(am__EXEEXT_1211) $(am__EXEEXT_1212) $(am__EXEEXT_1213) \
+ $(am__EXEEXT_1214) $(am__EXEEXT_1215) $(am__EXEEXT_1216) \
+ $(am__EXEEXT_1217) $(am__EXEEXT_1218) $(am__EXEEXT_1219) \
+ $(am__EXEEXT_1220) $(am__EXEEXT_1221) $(am__EXEEXT_1222) \
+ $(am__EXEEXT_1223) $(am__EXEEXT_1224) $(am__EXEEXT_1225) \
+ $(am__EXEEXT_1226) $(am__EXEEXT_1227) $(am__EXEEXT_1228) \
+ $(am__EXEEXT_1229) $(am__EXEEXT_1230) $(am__EXEEXT_1231) \
+ $(am__EXEEXT_1232) $(am__EXEEXT_1233) $(am__EXEEXT_1234) \
+ $(am__EXEEXT_1235) $(am__EXEEXT_1236) $(am__EXEEXT_1237) \
+ $(am__EXEEXT_1238) $(am__EXEEXT_1239) $(am__EXEEXT_1240) \
+ $(am__EXEEXT_1241) $(am__EXEEXT_1242) $(am__EXEEXT_1243) \
+ $(am__EXEEXT_1244) $(am__EXEEXT_1245) $(am__EXEEXT_1246) \
+ $(am__EXEEXT_1247) $(am__EXEEXT_1248) $(am__EXEEXT_1249) \
+ $(am__EXEEXT_1250) $(am__EXEEXT_1251) $(am__EXEEXT_1252) \
+ $(am__EXEEXT_1253) $(am__EXEEXT_1254) $(am__EXEEXT_1255) \
+ $(am__EXEEXT_1256) $(am__EXEEXT_1257) $(am__EXEEXT_1258) \
+ $(am__EXEEXT_1259) $(am__EXEEXT_1260) $(am__EXEEXT_1261) \
+ $(am__EXEEXT_1262) $(am__EXEEXT_1263) $(am__EXEEXT_1264) \
+ $(am__EXEEXT_1265) $(am__EXEEXT_1266) $(am__EXEEXT_1267) \
+ $(am__EXEEXT_1268) $(am__EXEEXT_1269) $(am__EXEEXT_1270) \
+ $(am__EXEEXT_1271) $(am__EXEEXT_1272) $(am__EXEEXT_1273) \
+ $(am__EXEEXT_1274) $(am__EXEEXT_1275) $(am__EXEEXT_1276) \
+ $(am__EXEEXT_1277) $(am__EXEEXT_1278) $(am__EXEEXT_1279) \
+ $(am__EXEEXT_1280) $(am__EXEEXT_1281) $(am__EXEEXT_1282) \
+ $(am__EXEEXT_1283) $(am__EXEEXT_1284) $(am__EXEEXT_1285) \
+ $(am__EXEEXT_1286) $(am__EXEEXT_1287) $(am__EXEEXT_1288) \
+ $(am__EXEEXT_1289) $(am__EXEEXT_1290) $(am__EXEEXT_1291) \
+ $(am__EXEEXT_1292) $(am__EXEEXT_1293) $(am__EXEEXT_1294) \
+ $(am__EXEEXT_1295) $(am__EXEEXT_1296) $(am__EXEEXT_1297) \
+ $(am__EXEEXT_1298) $(am__EXEEXT_1299) $(am__EXEEXT_1300) \
+ $(am__EXEEXT_1301) $(am__EXEEXT_1302) $(am__EXEEXT_1303) \
+ $(am__EXEEXT_1304) $(am__EXEEXT_1305) $(am__EXEEXT_1306) \
+ $(am__EXEEXT_1307) $(am__EXEEXT_1308) $(am__EXEEXT_1309) \
+ $(am__EXEEXT_1310) $(am__EXEEXT_1311) $(am__EXEEXT_1312) \
+ $(am__EXEEXT_1313) $(am__EXEEXT_1314) $(am__EXEEXT_1315) \
+ $(am__EXEEXT_1316) $(am__EXEEXT_1317) $(am__EXEEXT_1318) \
+ $(am__EXEEXT_1319) $(am__EXEEXT_1320) $(am__EXEEXT_1321) \
+ $(am__EXEEXT_1322) $(am__EXEEXT_1323) $(am__EXEEXT_1324) \
+ $(am__EXEEXT_1325) $(am__EXEEXT_1326) $(am__EXEEXT_1327) \
+ $(am__EXEEXT_1328) $(am__EXEEXT_1329) $(am__EXEEXT_1330) \
+ $(am__EXEEXT_1331) $(am__EXEEXT_1332) $(am__EXEEXT_1333) \
+ $(am__EXEEXT_1334) $(am__EXEEXT_1335) $(am__EXEEXT_1336) \
+ $(am__EXEEXT_1337) $(am__EXEEXT_1338) $(am__EXEEXT_1339) \
+ $(am__EXEEXT_1340) $(am__EXEEXT_1341) $(am__EXEEXT_1342) \
+ $(am__EXEEXT_1343) $(am__EXEEXT_1344) $(am__EXEEXT_1345) \
+ $(am__EXEEXT_1346) $(am__EXEEXT_1347) $(am__EXEEXT_1348) \
+ $(am__EXEEXT_1349) $(am__EXEEXT_1350) $(am__EXEEXT_1351) \
+ $(am__EXEEXT_1352) $(am__EXEEXT_1353) $(am__EXEEXT_1354) \
+ $(am__EXEEXT_1355) $(am__EXEEXT_1356) $(am__EXEEXT_1357) \
+ $(am__EXEEXT_1358) $(am__EXEEXT_1359) $(am__EXEEXT_1360) \
+ $(am__EXEEXT_1361) $(am__EXEEXT_1362) $(am__EXEEXT_1363) \
+ $(am__EXEEXT_1364) $(am__EXEEXT_1365) $(am__EXEEXT_1366) \
+ $(am__EXEEXT_1367) $(am__EXEEXT_1368) $(am__EXEEXT_1369) \
+ $(am__EXEEXT_1370) $(am__EXEEXT_1371) $(am__EXEEXT_1372) \
+ $(am__EXEEXT_1373) $(am__EXEEXT_1374) $(am__EXEEXT_1375) \
+ $(am__EXEEXT_1376) $(am__EXEEXT_1377) $(am__EXEEXT_1378) \
+ $(am__EXEEXT_1379) $(am__EXEEXT_1380) $(am__EXEEXT_1381) \
+ $(am__EXEEXT_1382) $(am__EXEEXT_1383) $(am__EXEEXT_1384) \
+ $(am__EXEEXT_1385) $(am__EXEEXT_1386) $(am__EXEEXT_1387) \
+ $(am__EXEEXT_1388) $(am__EXEEXT_1389) $(am__EXEEXT_1390) \
+ $(am__EXEEXT_1391) $(am__EXEEXT_1392) $(am__EXEEXT_1393) \
+ $(am__EXEEXT_1394) $(am__EXEEXT_1395) $(am__EXEEXT_1396) \
+ $(am__EXEEXT_1397) $(am__EXEEXT_1398) $(am__EXEEXT_1399) \
+ $(am__EXEEXT_1400) $(am__EXEEXT_1401) $(am__EXEEXT_1402) \
+ $(am__EXEEXT_1403) $(am__EXEEXT_1404) $(am__EXEEXT_1405) \
+ $(am__EXEEXT_1406) $(am__EXEEXT_1407) $(am__EXEEXT_1408) \
+ $(am__EXEEXT_1409) $(am__EXEEXT_1410) $(am__EXEEXT_1411) \
+ $(am__EXEEXT_1412) $(am__EXEEXT_1413) $(am__EXEEXT_1414) \
+ $(am__EXEEXT_1415) $(am__EXEEXT_1416) $(am__EXEEXT_1417) \
+ $(am__EXEEXT_1418) $(am__EXEEXT_1419) $(am__EXEEXT_1420) \
+ $(am__EXEEXT_1421) $(am__EXEEXT_1422) $(am__EXEEXT_1423) \
+ $(am__EXEEXT_1424) $(am__EXEEXT_1425) $(am__EXEEXT_1426) \
+ $(am__EXEEXT_1427) $(am__EXEEXT_1428) $(am__EXEEXT_1429) \
+ $(am__EXEEXT_1430) $(am__EXEEXT_1431) $(am__EXEEXT_1432) \
+ $(am__EXEEXT_1433) $(am__EXEEXT_1434) $(am__EXEEXT_1435) \
+ $(am__EXEEXT_1436) $(am__EXEEXT_1437) $(am__EXEEXT_1438) \
+ $(am__EXEEXT_1439) $(am__EXEEXT_1440) $(am__EXEEXT_1441) \
+ $(am__EXEEXT_1442) $(am__EXEEXT_1443) $(am__EXEEXT_1444) \
+ $(am__EXEEXT_1445) $(am__EXEEXT_1446) $(am__EXEEXT_1447) \
+ $(am__EXEEXT_1448) $(am__EXEEXT_1449) $(am__EXEEXT_1450) \
+ $(am__EXEEXT_1451) $(am__EXEEXT_1452) $(am__EXEEXT_1453) \
+ $(am__EXEEXT_1454) $(am__EXEEXT_1455) $(am__EXEEXT_1456) \
+ $(am__EXEEXT_1457) $(am__EXEEXT_1458) $(am__EXEEXT_1459) \
+ $(am__EXEEXT_1460) $(am__EXEEXT_1461) $(am__EXEEXT_1462) \
+ $(am__EXEEXT_1463) $(am__EXEEXT_1464) $(am__EXEEXT_1465) \
+ $(am__EXEEXT_1466) $(am__EXEEXT_1467) $(am__EXEEXT_1468) \
+ $(am__EXEEXT_1469) $(am__EXEEXT_1470) $(am__EXEEXT_1471) \
+ $(am__EXEEXT_1472) $(am__EXEEXT_1473) $(am__EXEEXT_1474) \
+ $(am__EXEEXT_1475) $(am__EXEEXT_1476) $(am__EXEEXT_1477) \
+ $(am__EXEEXT_1478) $(am__EXEEXT_1479) $(am__EXEEXT_1480) \
+ $(am__EXEEXT_1481) $(am__EXEEXT_1482) $(am__EXEEXT_1483) \
+ $(am__EXEEXT_1484) $(am__EXEEXT_1485) $(am__EXEEXT_1486) \
+ $(am__EXEEXT_1487) $(am__EXEEXT_1488) $(am__EXEEXT_1489) \
+ $(am__EXEEXT_1490) $(am__EXEEXT_1491) $(am__EXEEXT_1492) \
+ $(am__EXEEXT_1493) $(am__EXEEXT_1494) $(am__EXEEXT_1495) \
+ $(am__EXEEXT_1496) $(am__EXEEXT_1497) $(am__EXEEXT_1498) \
+ $(am__EXEEXT_1499) $(am__EXEEXT_1500) $(am__EXEEXT_1501) \
+ $(am__EXEEXT_1502) $(am__EXEEXT_1503) $(am__EXEEXT_1504) \
+ $(am__EXEEXT_1505) $(am__EXEEXT_1506) $(am__EXEEXT_1507) \
+ $(am__EXEEXT_1508) $(am__EXEEXT_1509) $(am__EXEEXT_1510) \
+ $(am__EXEEXT_1511) $(am__EXEEXT_1512) $(am__EXEEXT_1513) \
+ $(am__EXEEXT_1514) $(am__EXEEXT_1515) $(am__EXEEXT_1516) \
+ $(am__EXEEXT_1517) $(am__EXEEXT_1518) $(am__EXEEXT_1519) \
+ $(am__EXEEXT_1520) $(am__EXEEXT_1521) $(am__EXEEXT_1522) \
+ $(am__EXEEXT_1523) $(am__EXEEXT_1524) $(am__EXEEXT_1525) \
+ $(am__EXEEXT_1526) $(am__EXEEXT_1527) $(am__EXEEXT_1528) \
+ $(am__EXEEXT_1529) $(am__EXEEXT_1530) $(am__EXEEXT_1531) \
+ $(am__EXEEXT_1532) $(am__EXEEXT_1533) $(am__EXEEXT_1534) \
+ $(am__EXEEXT_1535) $(am__EXEEXT_1536) $(am__EXEEXT_1537) \
+ $(am__EXEEXT_1538) $(am__EXEEXT_1539) $(am__EXEEXT_1540) \
+ $(am__EXEEXT_1541) $(am__EXEEXT_1542) $(am__EXEEXT_1543) \
+ $(am__EXEEXT_1544) $(am__EXEEXT_1545) $(am__EXEEXT_1546) \
+ $(am__EXEEXT_1547) $(am__EXEEXT_1548) $(am__EXEEXT_1549) \
+ $(am__EXEEXT_1550) $(am__EXEEXT_1551) $(am__EXEEXT_1552) \
+ $(am__EXEEXT_1553) $(am__EXEEXT_1554) $(am__EXEEXT_1555) \
+ $(am__EXEEXT_1556) $(am__EXEEXT_1557) $(am__EXEEXT_1558) \
+ $(am__EXEEXT_1559) $(am__EXEEXT_1560) $(am__EXEEXT_1561) \
+ $(am__EXEEXT_1562) $(am__EXEEXT_1563) $(am__EXEEXT_1564) \
+ $(am__EXEEXT_1565) $(am__EXEEXT_1566) $(am__EXEEXT_1567) \
+ $(am__EXEEXT_1568) $(am__EXEEXT_1569) $(am__EXEEXT_1570) \
+ $(am__EXEEXT_1571) $(am__EXEEXT_1572) $(am__EXEEXT_1573) \
+ $(am__EXEEXT_1574) $(am__EXEEXT_1575) $(am__EXEEXT_1576) \
+ $(am__EXEEXT_1577) $(am__EXEEXT_1578) $(am__EXEEXT_1579) \
+ $(am__EXEEXT_1580) $(am__EXEEXT_1581) $(am__EXEEXT_1582) \
+ $(am__EXEEXT_1583) $(am__EXEEXT_1584) $(am__EXEEXT_1585) \
+ $(am__EXEEXT_1586) $(am__EXEEXT_1587) $(am__EXEEXT_1588) \
+ $(am__EXEEXT_1589) $(am__EXEEXT_1590) $(am__EXEEXT_1591) \
+ $(am__EXEEXT_1592) $(am__EXEEXT_1593) $(am__EXEEXT_1594) \
+ $(am__EXEEXT_1595) $(am__EXEEXT_1596) $(am__EXEEXT_1597) \
+ $(am__EXEEXT_1598) $(am__EXEEXT_1599) $(am__EXEEXT_1600) \
+ $(am__EXEEXT_1601) $(am__EXEEXT_1602) $(am__EXEEXT_1603) \
+ $(am__EXEEXT_1604) $(am__EXEEXT_1605) $(am__EXEEXT_1606) \
+ $(am__EXEEXT_1607) $(am__EXEEXT_1608) $(am__EXEEXT_1609) \
+ $(am__EXEEXT_1610) $(am__EXEEXT_1611) $(am__EXEEXT_1612) \
+ $(am__EXEEXT_1613) $(am__EXEEXT_1614) $(am__EXEEXT_1615) \
+ $(am__EXEEXT_1616) $(am__EXEEXT_1617) $(am__EXEEXT_1618) \
+ $(am__EXEEXT_1619) $(am__EXEEXT_1620) $(am__EXEEXT_1621) \
+ $(am__EXEEXT_1622) $(am__EXEEXT_1623) $(am__EXEEXT_1624) \
+ $(am__EXEEXT_1625) $(am__EXEEXT_1626) $(am__EXEEXT_1627) \
+ $(am__EXEEXT_1628) $(am__EXEEXT_1629) $(am__EXEEXT_1630) \
+ $(am__EXEEXT_1631) $(am__EXEEXT_1632) $(am__EXEEXT_1633) \
+ $(am__EXEEXT_1634) $(am__EXEEXT_1635) $(am__EXEEXT_1636) \
+ $(am__EXEEXT_1637) $(am__EXEEXT_1638) $(am__EXEEXT_1639) \
+ $(am__EXEEXT_1640) $(am__EXEEXT_1641) $(am__EXEEXT_1642) \
+ $(am__EXEEXT_1643) $(am__EXEEXT_1644) $(am__EXEEXT_1645) \
+ $(am__EXEEXT_1646) $(am__EXEEXT_1647) $(am__EXEEXT_1648) \
+ $(am__EXEEXT_1649) $(am__EXEEXT_1650) $(am__EXEEXT_1651) \
+ $(am__EXEEXT_1652) $(am__EXEEXT_1653) $(am__EXEEXT_1654) \
+ $(am__EXEEXT_1655) $(am__EXEEXT_1656) $(am__EXEEXT_1657) \
+ $(am__EXEEXT_1658) $(am__EXEEXT_1659) $(am__EXEEXT_1660) \
+ $(am__EXEEXT_1661) $(am__EXEEXT_1662) $(am__EXEEXT_1663) \
+ $(am__EXEEXT_1664) $(am__EXEEXT_1665) $(am__EXEEXT_1666) \
+ $(am__EXEEXT_1667) $(am__EXEEXT_1668) $(am__EXEEXT_1669) \
+ $(am__EXEEXT_1670) $(am__EXEEXT_1671) $(am__EXEEXT_1672) \
+ $(am__EXEEXT_1673) $(am__EXEEXT_1674) $(am__EXEEXT_1675) \
+ $(am__EXEEXT_1676) $(am__EXEEXT_1677) $(am__EXEEXT_1678) \
+ $(am__EXEEXT_1679) $(am__EXEEXT_1680) $(am__EXEEXT_1681) \
+ $(am__EXEEXT_1682) $(am__EXEEXT_1683) $(am__EXEEXT_1684) \
+ $(am__EXEEXT_1685) $(am__EXEEXT_1686) $(am__EXEEXT_1687) \
+ $(am__EXEEXT_1688) $(am__EXEEXT_1689) $(am__EXEEXT_1690) \
+ $(am__EXEEXT_1691) $(am__EXEEXT_1692) $(am__EXEEXT_1693) \
+ $(am__EXEEXT_1694) $(am__EXEEXT_1695) $(am__EXEEXT_1696) \
+ $(am__EXEEXT_1697) $(am__EXEEXT_1698) $(am__EXEEXT_1699) \
+ $(am__EXEEXT_1700) $(am__EXEEXT_1701) $(am__EXEEXT_1702) \
+ $(am__EXEEXT_1703) $(am__EXEEXT_1704) $(am__EXEEXT_1705) \
+ $(am__EXEEXT_1706) $(am__EXEEXT_1707) $(am__EXEEXT_1708) \
+ $(am__EXEEXT_1709) $(am__EXEEXT_1710) $(am__EXEEXT_1711) \
+ $(am__EXEEXT_1712) $(am__EXEEXT_1713) $(am__EXEEXT_1714) \
+ $(am__EXEEXT_1715) $(am__EXEEXT_1716) $(am__EXEEXT_1717) \
+ $(am__EXEEXT_1718) $(am__EXEEXT_1719) $(am__EXEEXT_1720) \
+ $(am__EXEEXT_1721) $(am__EXEEXT_1722) $(am__EXEEXT_1723) \
+ $(am__EXEEXT_1724) $(am__EXEEXT_1725) $(am__EXEEXT_1726) \
+ $(am__EXEEXT_1727) $(am__EXEEXT_1728) $(am__EXEEXT_1729) \
+ $(am__EXEEXT_1730) $(am__EXEEXT_1731) $(am__EXEEXT_1732) \
+ $(am__EXEEXT_1733) $(am__EXEEXT_1734) $(am__EXEEXT_1735) \
+ $(am__EXEEXT_1736) $(am__EXEEXT_1737) $(am__EXEEXT_1738) \
+ $(am__EXEEXT_1739) $(am__EXEEXT_1740) $(am__EXEEXT_1741) \
+ $(am__EXEEXT_1742) $(am__EXEEXT_1743) $(am__EXEEXT_1744) \
+ $(am__EXEEXT_1745) $(am__EXEEXT_1746) $(am__EXEEXT_1747) \
+ $(am__EXEEXT_1748) $(am__EXEEXT_1749) $(am__EXEEXT_1750) \
+ $(am__EXEEXT_1751)
+TESTS =
+@COND_GRUB_MKFONT_TRUE@@COND_HAVE_FONT_SOURCE_TRUE@am__append_9 = -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1
+@COND_emu_TRUE@am__append_10 = trig.module
+@COND_emu_TRUE@am__append_11 = trig.module$(EXEEXT)
+@COND_emu_TRUE@am__append_12 = gentrigtables.c
+@COND_emu_TRUE@am__append_13 = $(nodist_trig_module_SOURCES)
+@COND_emu_TRUE@am__append_14 = $(nodist_trig_module_SOURCES) \
+@COND_emu_TRUE@ trig.marker
+@COND_emu_TRUE@am__append_15 = trig.mod
+@COND_emu_TRUE@am__append_16 = trig.marker
+@COND_i386_pc_TRUE@am__append_17 = trig.module
+@COND_i386_pc_TRUE@am__append_18 = trig.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_19 = gentrigtables.c
+@COND_i386_pc_TRUE@am__append_20 = $(nodist_trig_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_21 = $(nodist_trig_module_SOURCES) \
+@COND_i386_pc_TRUE@ trig.marker
+@COND_i386_pc_TRUE@am__append_22 = trig.mod
+@COND_i386_pc_TRUE@am__append_23 = trig.marker
+@COND_i386_efi_TRUE@am__append_24 = trig.module
+@COND_i386_efi_TRUE@am__append_25 = trig.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_26 = gentrigtables.c
+@COND_i386_efi_TRUE@am__append_27 = $(nodist_trig_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_28 = $(nodist_trig_module_SOURCES) \
+@COND_i386_efi_TRUE@ trig.marker
+@COND_i386_efi_TRUE@am__append_29 = trig.mod
+@COND_i386_efi_TRUE@am__append_30 = trig.marker
+@COND_i386_qemu_TRUE@am__append_31 = trig.module
+@COND_i386_qemu_TRUE@am__append_32 = trig.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_33 = gentrigtables.c
+@COND_i386_qemu_TRUE@am__append_34 = $(nodist_trig_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_35 = $(nodist_trig_module_SOURCES) \
+@COND_i386_qemu_TRUE@ trig.marker
+@COND_i386_qemu_TRUE@am__append_36 = trig.mod
+@COND_i386_qemu_TRUE@am__append_37 = trig.marker
+@COND_i386_coreboot_TRUE@am__append_38 = trig.module
+@COND_i386_coreboot_TRUE@am__append_39 = trig.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_40 = gentrigtables.c
+@COND_i386_coreboot_TRUE@am__append_41 = $(nodist_trig_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_42 = \
+@COND_i386_coreboot_TRUE@ $(nodist_trig_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ trig.marker
+@COND_i386_coreboot_TRUE@am__append_43 = trig.mod
+@COND_i386_coreboot_TRUE@am__append_44 = trig.marker
+@COND_i386_multiboot_TRUE@am__append_45 = trig.module
+@COND_i386_multiboot_TRUE@am__append_46 = trig.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_47 = gentrigtables.c
+@COND_i386_multiboot_TRUE@am__append_48 = $(nodist_trig_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_49 = \
+@COND_i386_multiboot_TRUE@ $(nodist_trig_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ trig.marker
+@COND_i386_multiboot_TRUE@am__append_50 = trig.mod
+@COND_i386_multiboot_TRUE@am__append_51 = trig.marker
+@COND_i386_ieee1275_TRUE@am__append_52 = trig.module
+@COND_i386_ieee1275_TRUE@am__append_53 = trig.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_54 = gentrigtables.c
+@COND_i386_ieee1275_TRUE@am__append_55 = $(nodist_trig_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_56 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_trig_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ trig.marker
+@COND_i386_ieee1275_TRUE@am__append_57 = trig.mod
+@COND_i386_ieee1275_TRUE@am__append_58 = trig.marker
+@COND_x86_64_efi_TRUE@am__append_59 = trig.module
+@COND_x86_64_efi_TRUE@am__append_60 = trig.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_61 = gentrigtables.c
+@COND_x86_64_efi_TRUE@am__append_62 = $(nodist_trig_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_63 = $(nodist_trig_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ trig.marker
+@COND_x86_64_efi_TRUE@am__append_64 = trig.mod
+@COND_x86_64_efi_TRUE@am__append_65 = trig.marker
+@COND_mips_yeeloong_TRUE@am__append_66 = trig.module
+@COND_mips_yeeloong_TRUE@am__append_67 = trig.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_68 = gentrigtables.c
+@COND_mips_yeeloong_TRUE@am__append_69 = $(nodist_trig_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_70 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_trig_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ trig.marker
+@COND_mips_yeeloong_TRUE@am__append_71 = trig.mod
+@COND_mips_yeeloong_TRUE@am__append_72 = trig.marker
+@COND_sparc64_ieee1275_TRUE@am__append_73 = trig.module
+@COND_sparc64_ieee1275_TRUE@am__append_74 = trig.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_75 = gentrigtables.c
+@COND_sparc64_ieee1275_TRUE@am__append_76 = $(nodist_trig_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_77 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_trig_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ trig.marker
+@COND_sparc64_ieee1275_TRUE@am__append_78 = trig.mod
+@COND_sparc64_ieee1275_TRUE@am__append_79 = trig.marker
+@COND_powerpc_ieee1275_TRUE@am__append_80 = trig.module
+@COND_powerpc_ieee1275_TRUE@am__append_81 = trig.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_82 = gentrigtables.c
+@COND_powerpc_ieee1275_TRUE@am__append_83 = $(nodist_trig_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_84 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_trig_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ trig.marker
+@COND_powerpc_ieee1275_TRUE@am__append_85 = trig.mod
+@COND_powerpc_ieee1275_TRUE@am__append_86 = trig.marker
+@COND_i386_pc_TRUE@am__append_87 = cs5536.module
+@COND_i386_pc_TRUE@am__append_88 = cs5536.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_89 =
+@COND_i386_pc_TRUE@am__append_90 = $(nodist_cs5536_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_91 = $(nodist_cs5536_module_SOURCES) \
+@COND_i386_pc_TRUE@ cs5536.marker
+@COND_i386_pc_TRUE@am__append_92 = cs5536.mod
+@COND_i386_pc_TRUE@am__append_93 = cs5536.marker
+@COND_i386_efi_TRUE@am__append_94 = cs5536.module
+@COND_i386_efi_TRUE@am__append_95 = cs5536.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_96 =
+@COND_i386_efi_TRUE@am__append_97 = $(nodist_cs5536_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_98 = $(nodist_cs5536_module_SOURCES) \
+@COND_i386_efi_TRUE@ cs5536.marker
+@COND_i386_efi_TRUE@am__append_99 = cs5536.mod
+@COND_i386_efi_TRUE@am__append_100 = cs5536.marker
+@COND_i386_qemu_TRUE@am__append_101 = cs5536.module
+@COND_i386_qemu_TRUE@am__append_102 = cs5536.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_103 =
+@COND_i386_qemu_TRUE@am__append_104 = $(nodist_cs5536_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_105 = $(nodist_cs5536_module_SOURCES) \
+@COND_i386_qemu_TRUE@ cs5536.marker
+@COND_i386_qemu_TRUE@am__append_106 = cs5536.mod
+@COND_i386_qemu_TRUE@am__append_107 = cs5536.marker
+@COND_i386_coreboot_TRUE@am__append_108 = cs5536.module
+@COND_i386_coreboot_TRUE@am__append_109 = cs5536.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_110 =
+@COND_i386_coreboot_TRUE@am__append_111 = $(nodist_cs5536_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_112 = \
+@COND_i386_coreboot_TRUE@ $(nodist_cs5536_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ cs5536.marker
+@COND_i386_coreboot_TRUE@am__append_113 = cs5536.mod
+@COND_i386_coreboot_TRUE@am__append_114 = cs5536.marker
+@COND_i386_multiboot_TRUE@am__append_115 = cs5536.module
+@COND_i386_multiboot_TRUE@am__append_116 = cs5536.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_117 =
+@COND_i386_multiboot_TRUE@am__append_118 = $(nodist_cs5536_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_119 = \
+@COND_i386_multiboot_TRUE@ $(nodist_cs5536_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ cs5536.marker
+@COND_i386_multiboot_TRUE@am__append_120 = cs5536.mod
+@COND_i386_multiboot_TRUE@am__append_121 = cs5536.marker
+@COND_i386_ieee1275_TRUE@am__append_122 = cs5536.module
+@COND_i386_ieee1275_TRUE@am__append_123 = cs5536.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_124 =
+@COND_i386_ieee1275_TRUE@am__append_125 = $(nodist_cs5536_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_126 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_cs5536_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ cs5536.marker
+@COND_i386_ieee1275_TRUE@am__append_127 = cs5536.mod
+@COND_i386_ieee1275_TRUE@am__append_128 = cs5536.marker
+@COND_x86_64_efi_TRUE@am__append_129 = cs5536.module
+@COND_x86_64_efi_TRUE@am__append_130 = cs5536.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_131 =
+@COND_x86_64_efi_TRUE@am__append_132 = $(nodist_cs5536_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_133 = \
+@COND_x86_64_efi_TRUE@ $(nodist_cs5536_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ cs5536.marker
+@COND_x86_64_efi_TRUE@am__append_134 = cs5536.mod
+@COND_x86_64_efi_TRUE@am__append_135 = cs5536.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_136 = libusb.module
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_137 = libusb.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_138 =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_139 = $(nodist_libusb_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_140 = $(nodist_libusb_module_SOURCES) \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ libusb.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_141 = libusb.mod
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_142 = libusb.marker
+@COND_mips_yeeloong_TRUE@am__append_143 = lsspd.module
+@COND_mips_yeeloong_TRUE@am__append_144 = lsspd.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_145 =
+@COND_mips_yeeloong_TRUE@am__append_146 = $(nodist_lsspd_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_147 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_lsspd_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ lsspd.marker
+@COND_mips_yeeloong_TRUE@am__append_148 = lsspd.mod
+@COND_mips_yeeloong_TRUE@am__append_149 = lsspd.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_150 = usb.module
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_151 = usb.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_152 =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_153 = $(nodist_usb_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_154 = $(nodist_usb_module_SOURCES) \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ usb.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_155 = usb.mod
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_156 = usb.marker
+@COND_i386_pc_TRUE@am__append_157 = usb.module
+@COND_i386_pc_TRUE@am__append_158 = usb.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_159 =
+@COND_i386_pc_TRUE@am__append_160 = $(nodist_usb_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_161 = $(nodist_usb_module_SOURCES) \
+@COND_i386_pc_TRUE@ usb.marker
+@COND_i386_pc_TRUE@am__append_162 = usb.mod
+@COND_i386_pc_TRUE@am__append_163 = usb.marker
+@COND_i386_efi_TRUE@am__append_164 = usb.module
+@COND_i386_efi_TRUE@am__append_165 = usb.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_166 =
+@COND_i386_efi_TRUE@am__append_167 = $(nodist_usb_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_168 = $(nodist_usb_module_SOURCES) \
+@COND_i386_efi_TRUE@ usb.marker
+@COND_i386_efi_TRUE@am__append_169 = usb.mod
+@COND_i386_efi_TRUE@am__append_170 = usb.marker
+@COND_i386_qemu_TRUE@am__append_171 = usb.module
+@COND_i386_qemu_TRUE@am__append_172 = usb.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_173 =
+@COND_i386_qemu_TRUE@am__append_174 = $(nodist_usb_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_175 = $(nodist_usb_module_SOURCES) \
+@COND_i386_qemu_TRUE@ usb.marker
+@COND_i386_qemu_TRUE@am__append_176 = usb.mod
+@COND_i386_qemu_TRUE@am__append_177 = usb.marker
+@COND_i386_coreboot_TRUE@am__append_178 = usb.module
+@COND_i386_coreboot_TRUE@am__append_179 = usb.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_180 =
+@COND_i386_coreboot_TRUE@am__append_181 = $(nodist_usb_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_182 = \
+@COND_i386_coreboot_TRUE@ $(nodist_usb_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ usb.marker
+@COND_i386_coreboot_TRUE@am__append_183 = usb.mod
+@COND_i386_coreboot_TRUE@am__append_184 = usb.marker
+@COND_i386_multiboot_TRUE@am__append_185 = usb.module
+@COND_i386_multiboot_TRUE@am__append_186 = usb.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_187 =
+@COND_i386_multiboot_TRUE@am__append_188 = $(nodist_usb_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_189 = \
+@COND_i386_multiboot_TRUE@ $(nodist_usb_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ usb.marker
+@COND_i386_multiboot_TRUE@am__append_190 = usb.mod
+@COND_i386_multiboot_TRUE@am__append_191 = usb.marker
+@COND_i386_ieee1275_TRUE@am__append_192 = usb.module
+@COND_i386_ieee1275_TRUE@am__append_193 = usb.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_194 =
+@COND_i386_ieee1275_TRUE@am__append_195 = $(nodist_usb_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_196 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_usb_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ usb.marker
+@COND_i386_ieee1275_TRUE@am__append_197 = usb.mod
+@COND_i386_ieee1275_TRUE@am__append_198 = usb.marker
+@COND_x86_64_efi_TRUE@am__append_199 = usb.module
+@COND_x86_64_efi_TRUE@am__append_200 = usb.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_201 =
+@COND_x86_64_efi_TRUE@am__append_202 = $(nodist_usb_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_203 = $(nodist_usb_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ usb.marker
+@COND_x86_64_efi_TRUE@am__append_204 = usb.mod
+@COND_x86_64_efi_TRUE@am__append_205 = usb.marker
+@COND_mips_yeeloong_TRUE@am__append_206 = usb.module
+@COND_mips_yeeloong_TRUE@am__append_207 = usb.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_208 =
+@COND_mips_yeeloong_TRUE@am__append_209 = $(nodist_usb_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_210 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_usb_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ usb.marker
+@COND_mips_yeeloong_TRUE@am__append_211 = usb.mod
+@COND_mips_yeeloong_TRUE@am__append_212 = usb.marker
+@COND_i386_pc_TRUE@am__append_213 = usbserial_common.module
+@COND_i386_pc_TRUE@am__append_214 = usbserial_common.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_215 =
+@COND_i386_pc_TRUE@am__append_216 = $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_217 = \
+@COND_i386_pc_TRUE@ $(nodist_usbserial_common_module_SOURCES) \
+@COND_i386_pc_TRUE@ usbserial_common.marker
+@COND_i386_pc_TRUE@am__append_218 = usbserial_common.mod
+@COND_i386_pc_TRUE@am__append_219 = usbserial_common.marker
+@COND_i386_efi_TRUE@am__append_220 = usbserial_common.module
+@COND_i386_efi_TRUE@am__append_221 = usbserial_common.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_222 =
+@COND_i386_efi_TRUE@am__append_223 = $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_224 = \
+@COND_i386_efi_TRUE@ $(nodist_usbserial_common_module_SOURCES) \
+@COND_i386_efi_TRUE@ usbserial_common.marker
+@COND_i386_efi_TRUE@am__append_225 = usbserial_common.mod
+@COND_i386_efi_TRUE@am__append_226 = usbserial_common.marker
+@COND_i386_qemu_TRUE@am__append_227 = usbserial_common.module
+@COND_i386_qemu_TRUE@am__append_228 = usbserial_common.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_229 =
+@COND_i386_qemu_TRUE@am__append_230 = $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_231 = $(nodist_usbserial_common_module_SOURCES) \
+@COND_i386_qemu_TRUE@ usbserial_common.marker
+@COND_i386_qemu_TRUE@am__append_232 = usbserial_common.mod
+@COND_i386_qemu_TRUE@am__append_233 = usbserial_common.marker
+@COND_i386_coreboot_TRUE@am__append_234 = usbserial_common.module
+@COND_i386_coreboot_TRUE@am__append_235 = usbserial_common.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_236 =
+@COND_i386_coreboot_TRUE@am__append_237 = $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_238 = $(nodist_usbserial_common_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ usbserial_common.marker
+@COND_i386_coreboot_TRUE@am__append_239 = usbserial_common.mod
+@COND_i386_coreboot_TRUE@am__append_240 = usbserial_common.marker
+@COND_i386_multiboot_TRUE@am__append_241 = usbserial_common.module
+@COND_i386_multiboot_TRUE@am__append_242 = usbserial_common.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_243 =
+@COND_i386_multiboot_TRUE@am__append_244 = $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_245 = $(nodist_usbserial_common_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ usbserial_common.marker
+@COND_i386_multiboot_TRUE@am__append_246 = usbserial_common.mod
+@COND_i386_multiboot_TRUE@am__append_247 = usbserial_common.marker
+@COND_i386_ieee1275_TRUE@am__append_248 = usbserial_common.module
+@COND_i386_ieee1275_TRUE@am__append_249 = usbserial_common.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_250 =
+@COND_i386_ieee1275_TRUE@am__append_251 = $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_252 = $(nodist_usbserial_common_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ usbserial_common.marker
+@COND_i386_ieee1275_TRUE@am__append_253 = usbserial_common.mod
+@COND_i386_ieee1275_TRUE@am__append_254 = usbserial_common.marker
+@COND_x86_64_efi_TRUE@am__append_255 = usbserial_common.module
+@COND_x86_64_efi_TRUE@am__append_256 = usbserial_common.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_257 =
+@COND_x86_64_efi_TRUE@am__append_258 = $(nodist_usbserial_common_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_259 = $(nodist_usbserial_common_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ usbserial_common.marker
+@COND_x86_64_efi_TRUE@am__append_260 = usbserial_common.mod
+@COND_x86_64_efi_TRUE@am__append_261 = usbserial_common.marker
+@COND_mips_yeeloong_TRUE@am__append_262 = usbserial_common.module
+@COND_mips_yeeloong_TRUE@am__append_263 = usbserial_common.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_264 =
+@COND_mips_yeeloong_TRUE@am__append_265 = $(nodist_usbserial_common_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_266 = $(nodist_usbserial_common_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ usbserial_common.marker
+@COND_mips_yeeloong_TRUE@am__append_267 = usbserial_common.mod
+@COND_mips_yeeloong_TRUE@am__append_268 = usbserial_common.marker
+@COND_i386_pc_TRUE@am__append_269 = usbserial_pl2303.module
+@COND_i386_pc_TRUE@am__append_270 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_271 =
+@COND_i386_pc_TRUE@am__append_272 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_273 = \
+@COND_i386_pc_TRUE@ $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_i386_pc_TRUE@ usbserial_pl2303.marker
+@COND_i386_pc_TRUE@am__append_274 = usbserial_pl2303.mod
+@COND_i386_pc_TRUE@am__append_275 = usbserial_pl2303.marker
+@COND_i386_efi_TRUE@am__append_276 = usbserial_pl2303.module
+@COND_i386_efi_TRUE@am__append_277 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_278 =
+@COND_i386_efi_TRUE@am__append_279 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_280 = \
+@COND_i386_efi_TRUE@ $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_i386_efi_TRUE@ usbserial_pl2303.marker
+@COND_i386_efi_TRUE@am__append_281 = usbserial_pl2303.mod
+@COND_i386_efi_TRUE@am__append_282 = usbserial_pl2303.marker
+@COND_i386_qemu_TRUE@am__append_283 = usbserial_pl2303.module
+@COND_i386_qemu_TRUE@am__append_284 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_285 =
+@COND_i386_qemu_TRUE@am__append_286 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_287 = $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_i386_qemu_TRUE@ usbserial_pl2303.marker
+@COND_i386_qemu_TRUE@am__append_288 = usbserial_pl2303.mod
+@COND_i386_qemu_TRUE@am__append_289 = usbserial_pl2303.marker
+@COND_i386_coreboot_TRUE@am__append_290 = usbserial_pl2303.module
+@COND_i386_coreboot_TRUE@am__append_291 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_292 =
+@COND_i386_coreboot_TRUE@am__append_293 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_294 = $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ usbserial_pl2303.marker
+@COND_i386_coreboot_TRUE@am__append_295 = usbserial_pl2303.mod
+@COND_i386_coreboot_TRUE@am__append_296 = usbserial_pl2303.marker
+@COND_i386_multiboot_TRUE@am__append_297 = usbserial_pl2303.module
+@COND_i386_multiboot_TRUE@am__append_298 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_299 =
+@COND_i386_multiboot_TRUE@am__append_300 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_301 = $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ usbserial_pl2303.marker
+@COND_i386_multiboot_TRUE@am__append_302 = usbserial_pl2303.mod
+@COND_i386_multiboot_TRUE@am__append_303 = usbserial_pl2303.marker
+@COND_i386_ieee1275_TRUE@am__append_304 = usbserial_pl2303.module
+@COND_i386_ieee1275_TRUE@am__append_305 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_306 =
+@COND_i386_ieee1275_TRUE@am__append_307 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_308 = $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ usbserial_pl2303.marker
+@COND_i386_ieee1275_TRUE@am__append_309 = usbserial_pl2303.mod
+@COND_i386_ieee1275_TRUE@am__append_310 = usbserial_pl2303.marker
+@COND_x86_64_efi_TRUE@am__append_311 = usbserial_pl2303.module
+@COND_x86_64_efi_TRUE@am__append_312 = usbserial_pl2303.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_313 =
+@COND_x86_64_efi_TRUE@am__append_314 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_315 = $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ usbserial_pl2303.marker
+@COND_x86_64_efi_TRUE@am__append_316 = usbserial_pl2303.mod
+@COND_x86_64_efi_TRUE@am__append_317 = usbserial_pl2303.marker
+@COND_mips_yeeloong_TRUE@am__append_318 = usbserial_pl2303.module
+@COND_mips_yeeloong_TRUE@am__append_319 = usbserial_pl2303.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_320 =
+@COND_mips_yeeloong_TRUE@am__append_321 = $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_322 = $(nodist_usbserial_pl2303_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ usbserial_pl2303.marker
+@COND_mips_yeeloong_TRUE@am__append_323 = usbserial_pl2303.mod
+@COND_mips_yeeloong_TRUE@am__append_324 = usbserial_pl2303.marker
+@COND_i386_pc_TRUE@am__append_325 = usbserial_ftdi.module
+@COND_i386_pc_TRUE@am__append_326 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_327 =
+@COND_i386_pc_TRUE@am__append_328 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_329 = \
+@COND_i386_pc_TRUE@ $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_i386_pc_TRUE@ usbserial_ftdi.marker
+@COND_i386_pc_TRUE@am__append_330 = usbserial_ftdi.mod
+@COND_i386_pc_TRUE@am__append_331 = usbserial_ftdi.marker
+@COND_i386_efi_TRUE@am__append_332 = usbserial_ftdi.module
+@COND_i386_efi_TRUE@am__append_333 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_334 =
+@COND_i386_efi_TRUE@am__append_335 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_336 = \
+@COND_i386_efi_TRUE@ $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_i386_efi_TRUE@ usbserial_ftdi.marker
+@COND_i386_efi_TRUE@am__append_337 = usbserial_ftdi.mod
+@COND_i386_efi_TRUE@am__append_338 = usbserial_ftdi.marker
+@COND_i386_qemu_TRUE@am__append_339 = usbserial_ftdi.module
+@COND_i386_qemu_TRUE@am__append_340 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_341 =
+@COND_i386_qemu_TRUE@am__append_342 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_343 = \
+@COND_i386_qemu_TRUE@ $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_i386_qemu_TRUE@ usbserial_ftdi.marker
+@COND_i386_qemu_TRUE@am__append_344 = usbserial_ftdi.mod
+@COND_i386_qemu_TRUE@am__append_345 = usbserial_ftdi.marker
+@COND_i386_coreboot_TRUE@am__append_346 = usbserial_ftdi.module
+@COND_i386_coreboot_TRUE@am__append_347 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_348 =
+@COND_i386_coreboot_TRUE@am__append_349 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_350 = $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ usbserial_ftdi.marker
+@COND_i386_coreboot_TRUE@am__append_351 = usbserial_ftdi.mod
+@COND_i386_coreboot_TRUE@am__append_352 = usbserial_ftdi.marker
+@COND_i386_multiboot_TRUE@am__append_353 = usbserial_ftdi.module
+@COND_i386_multiboot_TRUE@am__append_354 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_355 =
+@COND_i386_multiboot_TRUE@am__append_356 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_357 = $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ usbserial_ftdi.marker
+@COND_i386_multiboot_TRUE@am__append_358 = usbserial_ftdi.mod
+@COND_i386_multiboot_TRUE@am__append_359 = usbserial_ftdi.marker
+@COND_i386_ieee1275_TRUE@am__append_360 = usbserial_ftdi.module
+@COND_i386_ieee1275_TRUE@am__append_361 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_362 =
+@COND_i386_ieee1275_TRUE@am__append_363 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_364 = $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ usbserial_ftdi.marker
+@COND_i386_ieee1275_TRUE@am__append_365 = usbserial_ftdi.mod
+@COND_i386_ieee1275_TRUE@am__append_366 = usbserial_ftdi.marker
+@COND_x86_64_efi_TRUE@am__append_367 = usbserial_ftdi.module
+@COND_x86_64_efi_TRUE@am__append_368 = usbserial_ftdi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_369 =
+@COND_x86_64_efi_TRUE@am__append_370 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_371 = \
+@COND_x86_64_efi_TRUE@ $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ usbserial_ftdi.marker
+@COND_x86_64_efi_TRUE@am__append_372 = usbserial_ftdi.mod
+@COND_x86_64_efi_TRUE@am__append_373 = usbserial_ftdi.marker
+@COND_mips_yeeloong_TRUE@am__append_374 = usbserial_ftdi.module
+@COND_mips_yeeloong_TRUE@am__append_375 = usbserial_ftdi.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_376 =
+@COND_mips_yeeloong_TRUE@am__append_377 = $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_378 = $(nodist_usbserial_ftdi_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ usbserial_ftdi.marker
+@COND_mips_yeeloong_TRUE@am__append_379 = usbserial_ftdi.mod
+@COND_mips_yeeloong_TRUE@am__append_380 = usbserial_ftdi.marker
+@COND_i386_pc_TRUE@am__append_381 = uhci.module
+@COND_i386_pc_TRUE@am__append_382 = uhci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_383 =
+@COND_i386_pc_TRUE@am__append_384 = $(nodist_uhci_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_385 = $(nodist_uhci_module_SOURCES) \
+@COND_i386_pc_TRUE@ uhci.marker
+@COND_i386_pc_TRUE@am__append_386 = uhci.mod
+@COND_i386_pc_TRUE@am__append_387 = uhci.marker
+@COND_i386_efi_TRUE@am__append_388 = uhci.module
+@COND_i386_efi_TRUE@am__append_389 = uhci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_390 =
+@COND_i386_efi_TRUE@am__append_391 = $(nodist_uhci_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_392 = $(nodist_uhci_module_SOURCES) \
+@COND_i386_efi_TRUE@ uhci.marker
+@COND_i386_efi_TRUE@am__append_393 = uhci.mod
+@COND_i386_efi_TRUE@am__append_394 = uhci.marker
+@COND_i386_qemu_TRUE@am__append_395 = uhci.module
+@COND_i386_qemu_TRUE@am__append_396 = uhci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_397 =
+@COND_i386_qemu_TRUE@am__append_398 = $(nodist_uhci_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_399 = $(nodist_uhci_module_SOURCES) \
+@COND_i386_qemu_TRUE@ uhci.marker
+@COND_i386_qemu_TRUE@am__append_400 = uhci.mod
+@COND_i386_qemu_TRUE@am__append_401 = uhci.marker
+@COND_i386_coreboot_TRUE@am__append_402 = uhci.module
+@COND_i386_coreboot_TRUE@am__append_403 = uhci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_404 =
+@COND_i386_coreboot_TRUE@am__append_405 = $(nodist_uhci_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_406 = \
+@COND_i386_coreboot_TRUE@ $(nodist_uhci_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ uhci.marker
+@COND_i386_coreboot_TRUE@am__append_407 = uhci.mod
+@COND_i386_coreboot_TRUE@am__append_408 = uhci.marker
+@COND_i386_multiboot_TRUE@am__append_409 = uhci.module
+@COND_i386_multiboot_TRUE@am__append_410 = uhci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_411 =
+@COND_i386_multiboot_TRUE@am__append_412 = $(nodist_uhci_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_413 = \
+@COND_i386_multiboot_TRUE@ $(nodist_uhci_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ uhci.marker
+@COND_i386_multiboot_TRUE@am__append_414 = uhci.mod
+@COND_i386_multiboot_TRUE@am__append_415 = uhci.marker
+@COND_i386_ieee1275_TRUE@am__append_416 = uhci.module
+@COND_i386_ieee1275_TRUE@am__append_417 = uhci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_418 =
+@COND_i386_ieee1275_TRUE@am__append_419 = $(nodist_uhci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_420 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_uhci_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ uhci.marker
+@COND_i386_ieee1275_TRUE@am__append_421 = uhci.mod
+@COND_i386_ieee1275_TRUE@am__append_422 = uhci.marker
+@COND_x86_64_efi_TRUE@am__append_423 = uhci.module
+@COND_x86_64_efi_TRUE@am__append_424 = uhci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_425 =
+@COND_x86_64_efi_TRUE@am__append_426 = $(nodist_uhci_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_427 = $(nodist_uhci_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ uhci.marker
+@COND_x86_64_efi_TRUE@am__append_428 = uhci.mod
+@COND_x86_64_efi_TRUE@am__append_429 = uhci.marker
+@COND_i386_pc_TRUE@am__append_430 = ohci.module
+@COND_i386_pc_TRUE@am__append_431 = ohci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_432 =
+@COND_i386_pc_TRUE@am__append_433 = $(nodist_ohci_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_434 = $(nodist_ohci_module_SOURCES) \
+@COND_i386_pc_TRUE@ ohci.marker
+@COND_i386_pc_TRUE@am__append_435 = ohci.mod
+@COND_i386_pc_TRUE@am__append_436 = ohci.marker
+@COND_i386_efi_TRUE@am__append_437 = ohci.module
+@COND_i386_efi_TRUE@am__append_438 = ohci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_439 =
+@COND_i386_efi_TRUE@am__append_440 = $(nodist_ohci_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_441 = $(nodist_ohci_module_SOURCES) \
+@COND_i386_efi_TRUE@ ohci.marker
+@COND_i386_efi_TRUE@am__append_442 = ohci.mod
+@COND_i386_efi_TRUE@am__append_443 = ohci.marker
+@COND_i386_qemu_TRUE@am__append_444 = ohci.module
+@COND_i386_qemu_TRUE@am__append_445 = ohci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_446 =
+@COND_i386_qemu_TRUE@am__append_447 = $(nodist_ohci_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_448 = $(nodist_ohci_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ohci.marker
+@COND_i386_qemu_TRUE@am__append_449 = ohci.mod
+@COND_i386_qemu_TRUE@am__append_450 = ohci.marker
+@COND_i386_coreboot_TRUE@am__append_451 = ohci.module
+@COND_i386_coreboot_TRUE@am__append_452 = ohci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_453 =
+@COND_i386_coreboot_TRUE@am__append_454 = $(nodist_ohci_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_455 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ohci_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ohci.marker
+@COND_i386_coreboot_TRUE@am__append_456 = ohci.mod
+@COND_i386_coreboot_TRUE@am__append_457 = ohci.marker
+@COND_i386_multiboot_TRUE@am__append_458 = ohci.module
+@COND_i386_multiboot_TRUE@am__append_459 = ohci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_460 =
+@COND_i386_multiboot_TRUE@am__append_461 = $(nodist_ohci_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_462 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ohci_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ohci.marker
+@COND_i386_multiboot_TRUE@am__append_463 = ohci.mod
+@COND_i386_multiboot_TRUE@am__append_464 = ohci.marker
+@COND_i386_ieee1275_TRUE@am__append_465 = ohci.module
+@COND_i386_ieee1275_TRUE@am__append_466 = ohci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_467 =
+@COND_i386_ieee1275_TRUE@am__append_468 = $(nodist_ohci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_469 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ohci_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ohci.marker
+@COND_i386_ieee1275_TRUE@am__append_470 = ohci.mod
+@COND_i386_ieee1275_TRUE@am__append_471 = ohci.marker
+@COND_x86_64_efi_TRUE@am__append_472 = ohci.module
+@COND_x86_64_efi_TRUE@am__append_473 = ohci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_474 =
+@COND_x86_64_efi_TRUE@am__append_475 = $(nodist_ohci_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_476 = $(nodist_ohci_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ohci.marker
+@COND_x86_64_efi_TRUE@am__append_477 = ohci.mod
+@COND_x86_64_efi_TRUE@am__append_478 = ohci.marker
+@COND_mips_yeeloong_TRUE@am__append_479 = ohci.module
+@COND_mips_yeeloong_TRUE@am__append_480 = ohci.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_481 =
+@COND_mips_yeeloong_TRUE@am__append_482 = $(nodist_ohci_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_483 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ohci_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ohci.marker
+@COND_mips_yeeloong_TRUE@am__append_484 = ohci.mod
+@COND_mips_yeeloong_TRUE@am__append_485 = ohci.marker
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_486 = pci.module
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_487 = pci.module$(EXEEXT)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_488 =
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_489 = $(nodist_pci_module_SOURCES)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_490 = $(nodist_pci_module_SOURCES) \
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@ pci.marker
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_491 = pci.mod
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_492 = pci.marker
+@COND_i386_pc_TRUE@am__append_493 = pci.module
+@COND_i386_pc_TRUE@am__append_494 = pci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_495 =
+@COND_i386_pc_TRUE@am__append_496 = $(nodist_pci_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_497 = $(nodist_pci_module_SOURCES) \
+@COND_i386_pc_TRUE@ pci.marker
+@COND_i386_pc_TRUE@am__append_498 = pci.mod
+@COND_i386_pc_TRUE@am__append_499 = pci.marker
+@COND_i386_efi_TRUE@am__append_500 = pci.module
+@COND_i386_efi_TRUE@am__append_501 = pci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_502 =
+@COND_i386_efi_TRUE@am__append_503 = $(nodist_pci_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_504 = $(nodist_pci_module_SOURCES) \
+@COND_i386_efi_TRUE@ pci.marker
+@COND_i386_efi_TRUE@am__append_505 = pci.mod
+@COND_i386_efi_TRUE@am__append_506 = pci.marker
+@COND_i386_coreboot_TRUE@am__append_507 = pci.module
+@COND_i386_coreboot_TRUE@am__append_508 = pci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_509 =
+@COND_i386_coreboot_TRUE@am__append_510 = $(nodist_pci_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_511 = \
+@COND_i386_coreboot_TRUE@ $(nodist_pci_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ pci.marker
+@COND_i386_coreboot_TRUE@am__append_512 = pci.mod
+@COND_i386_coreboot_TRUE@am__append_513 = pci.marker
+@COND_i386_multiboot_TRUE@am__append_514 = pci.module
+@COND_i386_multiboot_TRUE@am__append_515 = pci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_516 =
+@COND_i386_multiboot_TRUE@am__append_517 = $(nodist_pci_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_518 = \
+@COND_i386_multiboot_TRUE@ $(nodist_pci_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ pci.marker
+@COND_i386_multiboot_TRUE@am__append_519 = pci.mod
+@COND_i386_multiboot_TRUE@am__append_520 = pci.marker
+@COND_i386_ieee1275_TRUE@am__append_521 = pci.module
+@COND_i386_ieee1275_TRUE@am__append_522 = pci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_523 =
+@COND_i386_ieee1275_TRUE@am__append_524 = $(nodist_pci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_525 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_pci_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ pci.marker
+@COND_i386_ieee1275_TRUE@am__append_526 = pci.mod
+@COND_i386_ieee1275_TRUE@am__append_527 = pci.marker
+@COND_x86_64_efi_TRUE@am__append_528 = pci.module
+@COND_x86_64_efi_TRUE@am__append_529 = pci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_530 =
+@COND_x86_64_efi_TRUE@am__append_531 = $(nodist_pci_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_532 = $(nodist_pci_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ pci.marker
+@COND_x86_64_efi_TRUE@am__append_533 = pci.mod
+@COND_x86_64_efi_TRUE@am__append_534 = pci.marker
+@COND_i386_pc_TRUE@am__append_535 = cmostest.module
+@COND_i386_pc_TRUE@am__append_536 = cmostest.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_537 =
+@COND_i386_pc_TRUE@am__append_538 = $(nodist_cmostest_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_539 = $(nodist_cmostest_module_SOURCES) \
+@COND_i386_pc_TRUE@ cmostest.marker
+@COND_i386_pc_TRUE@am__append_540 = cmostest.mod
+@COND_i386_pc_TRUE@am__append_541 = cmostest.marker
+@COND_i386_qemu_TRUE@am__append_542 = cmostest.module
+@COND_i386_qemu_TRUE@am__append_543 = cmostest.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_544 =
+@COND_i386_qemu_TRUE@am__append_545 = $(nodist_cmostest_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_546 = \
+@COND_i386_qemu_TRUE@ $(nodist_cmostest_module_SOURCES) \
+@COND_i386_qemu_TRUE@ cmostest.marker
+@COND_i386_qemu_TRUE@am__append_547 = cmostest.mod
+@COND_i386_qemu_TRUE@am__append_548 = cmostest.marker
+@COND_i386_coreboot_TRUE@am__append_549 = cmostest.module
+@COND_i386_coreboot_TRUE@am__append_550 = cmostest.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_551 =
+@COND_i386_coreboot_TRUE@am__append_552 = $(nodist_cmostest_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_553 = \
+@COND_i386_coreboot_TRUE@ $(nodist_cmostest_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ cmostest.marker
+@COND_i386_coreboot_TRUE@am__append_554 = cmostest.mod
+@COND_i386_coreboot_TRUE@am__append_555 = cmostest.marker
+@COND_i386_multiboot_TRUE@am__append_556 = cmostest.module
+@COND_i386_multiboot_TRUE@am__append_557 = cmostest.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_558 =
+@COND_i386_multiboot_TRUE@am__append_559 = $(nodist_cmostest_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_560 = \
+@COND_i386_multiboot_TRUE@ $(nodist_cmostest_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ cmostest.marker
+@COND_i386_multiboot_TRUE@am__append_561 = cmostest.mod
+@COND_i386_multiboot_TRUE@am__append_562 = cmostest.marker
+@COND_i386_ieee1275_TRUE@am__append_563 = cmostest.module
+@COND_i386_ieee1275_TRUE@am__append_564 = cmostest.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_565 =
+@COND_i386_ieee1275_TRUE@am__append_566 = $(nodist_cmostest_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_567 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_cmostest_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ cmostest.marker
+@COND_i386_ieee1275_TRUE@am__append_568 = cmostest.mod
+@COND_i386_ieee1275_TRUE@am__append_569 = cmostest.marker
+@COND_mips_yeeloong_TRUE@am__append_570 = cmostest.module
+@COND_mips_yeeloong_TRUE@am__append_571 = cmostest.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_572 =
+@COND_mips_yeeloong_TRUE@am__append_573 = $(nodist_cmostest_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_574 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_cmostest_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ cmostest.marker
+@COND_mips_yeeloong_TRUE@am__append_575 = cmostest.mod
+@COND_mips_yeeloong_TRUE@am__append_576 = cmostest.marker
+@COND_i386_pc_TRUE@am__append_577 = iorw.module
+@COND_i386_pc_TRUE@am__append_578 = iorw.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_579 =
+@COND_i386_pc_TRUE@am__append_580 = $(nodist_iorw_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_581 = $(nodist_iorw_module_SOURCES) \
+@COND_i386_pc_TRUE@ iorw.marker
+@COND_i386_pc_TRUE@am__append_582 = iorw.mod
+@COND_i386_pc_TRUE@am__append_583 = iorw.marker
+@COND_i386_efi_TRUE@am__append_584 = iorw.module
+@COND_i386_efi_TRUE@am__append_585 = iorw.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_586 =
+@COND_i386_efi_TRUE@am__append_587 = $(nodist_iorw_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_588 = $(nodist_iorw_module_SOURCES) \
+@COND_i386_efi_TRUE@ iorw.marker
+@COND_i386_efi_TRUE@am__append_589 = iorw.mod
+@COND_i386_efi_TRUE@am__append_590 = iorw.marker
+@COND_i386_qemu_TRUE@am__append_591 = iorw.module
+@COND_i386_qemu_TRUE@am__append_592 = iorw.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_593 =
+@COND_i386_qemu_TRUE@am__append_594 = $(nodist_iorw_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_595 = $(nodist_iorw_module_SOURCES) \
+@COND_i386_qemu_TRUE@ iorw.marker
+@COND_i386_qemu_TRUE@am__append_596 = iorw.mod
+@COND_i386_qemu_TRUE@am__append_597 = iorw.marker
+@COND_i386_coreboot_TRUE@am__append_598 = iorw.module
+@COND_i386_coreboot_TRUE@am__append_599 = iorw.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_600 =
+@COND_i386_coreboot_TRUE@am__append_601 = $(nodist_iorw_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_602 = \
+@COND_i386_coreboot_TRUE@ $(nodist_iorw_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ iorw.marker
+@COND_i386_coreboot_TRUE@am__append_603 = iorw.mod
+@COND_i386_coreboot_TRUE@am__append_604 = iorw.marker
+@COND_i386_multiboot_TRUE@am__append_605 = iorw.module
+@COND_i386_multiboot_TRUE@am__append_606 = iorw.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_607 =
+@COND_i386_multiboot_TRUE@am__append_608 = $(nodist_iorw_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_609 = \
+@COND_i386_multiboot_TRUE@ $(nodist_iorw_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ iorw.marker
+@COND_i386_multiboot_TRUE@am__append_610 = iorw.mod
+@COND_i386_multiboot_TRUE@am__append_611 = iorw.marker
+@COND_i386_ieee1275_TRUE@am__append_612 = iorw.module
+@COND_i386_ieee1275_TRUE@am__append_613 = iorw.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_614 =
+@COND_i386_ieee1275_TRUE@am__append_615 = $(nodist_iorw_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_616 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_iorw_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ iorw.marker
+@COND_i386_ieee1275_TRUE@am__append_617 = iorw.mod
+@COND_i386_ieee1275_TRUE@am__append_618 = iorw.marker
+@COND_x86_64_efi_TRUE@am__append_619 = iorw.module
+@COND_x86_64_efi_TRUE@am__append_620 = iorw.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_621 =
+@COND_x86_64_efi_TRUE@am__append_622 = $(nodist_iorw_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_623 = $(nodist_iorw_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ iorw.marker
+@COND_x86_64_efi_TRUE@am__append_624 = iorw.mod
+@COND_x86_64_efi_TRUE@am__append_625 = iorw.marker
+@COND_emu_TRUE@am__append_626 = regexp.module
+@COND_emu_TRUE@am__append_627 = regexp.module$(EXEEXT)
+@COND_emu_TRUE@am__append_628 =
+@COND_emu_TRUE@am__append_629 = $(nodist_regexp_module_SOURCES)
+@COND_emu_TRUE@am__append_630 = $(nodist_regexp_module_SOURCES) \
+@COND_emu_TRUE@ regexp.marker
+@COND_emu_TRUE@am__append_631 = regexp.mod
+@COND_emu_TRUE@am__append_632 = regexp.marker
+@COND_i386_pc_TRUE@am__append_633 = regexp.module
+@COND_i386_pc_TRUE@am__append_634 = regexp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_635 =
+@COND_i386_pc_TRUE@am__append_636 = $(nodist_regexp_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_637 = $(nodist_regexp_module_SOURCES) \
+@COND_i386_pc_TRUE@ regexp.marker
+@COND_i386_pc_TRUE@am__append_638 = regexp.mod
+@COND_i386_pc_TRUE@am__append_639 = regexp.marker
+@COND_i386_efi_TRUE@am__append_640 = regexp.module
+@COND_i386_efi_TRUE@am__append_641 = regexp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_642 =
+@COND_i386_efi_TRUE@am__append_643 = $(nodist_regexp_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_644 = $(nodist_regexp_module_SOURCES) \
+@COND_i386_efi_TRUE@ regexp.marker
+@COND_i386_efi_TRUE@am__append_645 = regexp.mod
+@COND_i386_efi_TRUE@am__append_646 = regexp.marker
+@COND_i386_qemu_TRUE@am__append_647 = regexp.module
+@COND_i386_qemu_TRUE@am__append_648 = regexp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_649 =
+@COND_i386_qemu_TRUE@am__append_650 = $(nodist_regexp_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_651 = $(nodist_regexp_module_SOURCES) \
+@COND_i386_qemu_TRUE@ regexp.marker
+@COND_i386_qemu_TRUE@am__append_652 = regexp.mod
+@COND_i386_qemu_TRUE@am__append_653 = regexp.marker
+@COND_i386_coreboot_TRUE@am__append_654 = regexp.module
+@COND_i386_coreboot_TRUE@am__append_655 = regexp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_656 =
+@COND_i386_coreboot_TRUE@am__append_657 = $(nodist_regexp_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_658 = \
+@COND_i386_coreboot_TRUE@ $(nodist_regexp_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ regexp.marker
+@COND_i386_coreboot_TRUE@am__append_659 = regexp.mod
+@COND_i386_coreboot_TRUE@am__append_660 = regexp.marker
+@COND_i386_multiboot_TRUE@am__append_661 = regexp.module
+@COND_i386_multiboot_TRUE@am__append_662 = regexp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_663 =
+@COND_i386_multiboot_TRUE@am__append_664 = $(nodist_regexp_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_665 = \
+@COND_i386_multiboot_TRUE@ $(nodist_regexp_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ regexp.marker
+@COND_i386_multiboot_TRUE@am__append_666 = regexp.mod
+@COND_i386_multiboot_TRUE@am__append_667 = regexp.marker
+@COND_i386_ieee1275_TRUE@am__append_668 = regexp.module
+@COND_i386_ieee1275_TRUE@am__append_669 = regexp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_670 =
+@COND_i386_ieee1275_TRUE@am__append_671 = $(nodist_regexp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_672 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_regexp_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ regexp.marker
+@COND_i386_ieee1275_TRUE@am__append_673 = regexp.mod
+@COND_i386_ieee1275_TRUE@am__append_674 = regexp.marker
+@COND_x86_64_efi_TRUE@am__append_675 = regexp.module
+@COND_x86_64_efi_TRUE@am__append_676 = regexp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_677 =
+@COND_x86_64_efi_TRUE@am__append_678 = $(nodist_regexp_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_679 = \
+@COND_x86_64_efi_TRUE@ $(nodist_regexp_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ regexp.marker
+@COND_x86_64_efi_TRUE@am__append_680 = regexp.mod
+@COND_x86_64_efi_TRUE@am__append_681 = regexp.marker
+@COND_mips_yeeloong_TRUE@am__append_682 = regexp.module
+@COND_mips_yeeloong_TRUE@am__append_683 = regexp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_684 =
+@COND_mips_yeeloong_TRUE@am__append_685 = $(nodist_regexp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_686 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_regexp_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ regexp.marker
+@COND_mips_yeeloong_TRUE@am__append_687 = regexp.mod
+@COND_mips_yeeloong_TRUE@am__append_688 = regexp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_689 = regexp.module
+@COND_sparc64_ieee1275_TRUE@am__append_690 = regexp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_691 =
+@COND_sparc64_ieee1275_TRUE@am__append_692 = $(nodist_regexp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_693 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_regexp_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ regexp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_694 = regexp.mod
+@COND_sparc64_ieee1275_TRUE@am__append_695 = regexp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_696 = regexp.module
+@COND_powerpc_ieee1275_TRUE@am__append_697 = regexp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_698 =
+@COND_powerpc_ieee1275_TRUE@am__append_699 = $(nodist_regexp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_700 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_regexp_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ regexp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_701 = regexp.mod
+@COND_powerpc_ieee1275_TRUE@am__append_702 = regexp.marker
+@COND_i386_pc_TRUE@am__append_703 = acpi.module
+@COND_i386_pc_TRUE@am__append_704 = acpi.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_705 =
+@COND_i386_pc_TRUE@am__append_706 = $(nodist_acpi_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_707 = $(nodist_acpi_module_SOURCES) \
+@COND_i386_pc_TRUE@ acpi.marker
+@COND_i386_pc_TRUE@am__append_708 = acpi.mod
+@COND_i386_pc_TRUE@am__append_709 = acpi.marker
+@COND_i386_efi_TRUE@am__append_710 = acpi.module
+@COND_i386_efi_TRUE@am__append_711 = acpi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_712 =
+@COND_i386_efi_TRUE@am__append_713 = $(nodist_acpi_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_714 = $(nodist_acpi_module_SOURCES) \
+@COND_i386_efi_TRUE@ acpi.marker
+@COND_i386_efi_TRUE@am__append_715 = acpi.mod
+@COND_i386_efi_TRUE@am__append_716 = acpi.marker
+@COND_i386_coreboot_TRUE@am__append_717 = acpi.module
+@COND_i386_coreboot_TRUE@am__append_718 = acpi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_719 =
+@COND_i386_coreboot_TRUE@am__append_720 = $(nodist_acpi_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_721 = \
+@COND_i386_coreboot_TRUE@ $(nodist_acpi_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ acpi.marker
+@COND_i386_coreboot_TRUE@am__append_722 = acpi.mod
+@COND_i386_coreboot_TRUE@am__append_723 = acpi.marker
+@COND_i386_multiboot_TRUE@am__append_724 = acpi.module
+@COND_i386_multiboot_TRUE@am__append_725 = acpi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_726 =
+@COND_i386_multiboot_TRUE@am__append_727 = $(nodist_acpi_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_728 = \
+@COND_i386_multiboot_TRUE@ $(nodist_acpi_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ acpi.marker
+@COND_i386_multiboot_TRUE@am__append_729 = acpi.mod
+@COND_i386_multiboot_TRUE@am__append_730 = acpi.marker
+@COND_x86_64_efi_TRUE@am__append_731 = acpi.module
+@COND_x86_64_efi_TRUE@am__append_732 = acpi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_733 =
+@COND_x86_64_efi_TRUE@am__append_734 = $(nodist_acpi_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_735 = $(nodist_acpi_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ acpi.marker
+@COND_x86_64_efi_TRUE@am__append_736 = acpi.mod
+@COND_x86_64_efi_TRUE@am__append_737 = acpi.marker
+@COND_i386_pc_TRUE@am__append_738 = lsacpi.module
+@COND_i386_pc_TRUE@am__append_739 = lsacpi.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_740 =
+@COND_i386_pc_TRUE@am__append_741 = $(nodist_lsacpi_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_742 = $(nodist_lsacpi_module_SOURCES) \
+@COND_i386_pc_TRUE@ lsacpi.marker
+@COND_i386_pc_TRUE@am__append_743 = lsacpi.mod
+@COND_i386_pc_TRUE@am__append_744 = lsacpi.marker
+@COND_i386_efi_TRUE@am__append_745 = lsacpi.module
+@COND_i386_efi_TRUE@am__append_746 = lsacpi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_747 =
+@COND_i386_efi_TRUE@am__append_748 = $(nodist_lsacpi_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_749 = $(nodist_lsacpi_module_SOURCES) \
+@COND_i386_efi_TRUE@ lsacpi.marker
+@COND_i386_efi_TRUE@am__append_750 = lsacpi.mod
+@COND_i386_efi_TRUE@am__append_751 = lsacpi.marker
+@COND_i386_coreboot_TRUE@am__append_752 = lsacpi.module
+@COND_i386_coreboot_TRUE@am__append_753 = lsacpi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_754 =
+@COND_i386_coreboot_TRUE@am__append_755 = $(nodist_lsacpi_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_756 = \
+@COND_i386_coreboot_TRUE@ $(nodist_lsacpi_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ lsacpi.marker
+@COND_i386_coreboot_TRUE@am__append_757 = lsacpi.mod
+@COND_i386_coreboot_TRUE@am__append_758 = lsacpi.marker
+@COND_i386_multiboot_TRUE@am__append_759 = lsacpi.module
+@COND_i386_multiboot_TRUE@am__append_760 = lsacpi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_761 =
+@COND_i386_multiboot_TRUE@am__append_762 = $(nodist_lsacpi_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_763 = \
+@COND_i386_multiboot_TRUE@ $(nodist_lsacpi_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ lsacpi.marker
+@COND_i386_multiboot_TRUE@am__append_764 = lsacpi.mod
+@COND_i386_multiboot_TRUE@am__append_765 = lsacpi.marker
+@COND_x86_64_efi_TRUE@am__append_766 = lsacpi.module
+@COND_x86_64_efi_TRUE@am__append_767 = lsacpi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_768 =
+@COND_x86_64_efi_TRUE@am__append_769 = $(nodist_lsacpi_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_770 = \
+@COND_x86_64_efi_TRUE@ $(nodist_lsacpi_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ lsacpi.marker
+@COND_x86_64_efi_TRUE@am__append_771 = lsacpi.mod
+@COND_x86_64_efi_TRUE@am__append_772 = lsacpi.marker
+@COND_i386_efi_TRUE@am__append_773 = lsefisystab.module
+@COND_i386_efi_TRUE@am__append_774 = lsefisystab.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_775 =
+@COND_i386_efi_TRUE@am__append_776 = $(nodist_lsefisystab_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_777 = \
+@COND_i386_efi_TRUE@ $(nodist_lsefisystab_module_SOURCES) \
+@COND_i386_efi_TRUE@ lsefisystab.marker
+@COND_i386_efi_TRUE@am__append_778 = lsefisystab.mod
+@COND_i386_efi_TRUE@am__append_779 = lsefisystab.marker
+@COND_x86_64_efi_TRUE@am__append_780 = lsefisystab.module
+@COND_x86_64_efi_TRUE@am__append_781 = lsefisystab.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_782 =
+@COND_x86_64_efi_TRUE@am__append_783 = $(nodist_lsefisystab_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_784 = \
+@COND_x86_64_efi_TRUE@ $(nodist_lsefisystab_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ lsefisystab.marker
+@COND_x86_64_efi_TRUE@am__append_785 = lsefisystab.mod
+@COND_x86_64_efi_TRUE@am__append_786 = lsefisystab.marker
+@COND_i386_efi_TRUE@am__append_787 = lssal.module
+@COND_i386_efi_TRUE@am__append_788 = lssal.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_789 =
+@COND_i386_efi_TRUE@am__append_790 = $(nodist_lssal_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_791 = $(nodist_lssal_module_SOURCES) \
+@COND_i386_efi_TRUE@ lssal.marker
+@COND_i386_efi_TRUE@am__append_792 = lssal.mod
+@COND_i386_efi_TRUE@am__append_793 = lssal.marker
+@COND_x86_64_efi_TRUE@am__append_794 = lssal.module
+@COND_x86_64_efi_TRUE@am__append_795 = lssal.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_796 =
+@COND_x86_64_efi_TRUE@am__append_797 = $(nodist_lssal_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_798 = $(nodist_lssal_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ lssal.marker
+@COND_x86_64_efi_TRUE@am__append_799 = lssal.mod
+@COND_x86_64_efi_TRUE@am__append_800 = lssal.marker
+@COND_i386_efi_TRUE@am__append_801 = lsefimmap.module
+@COND_i386_efi_TRUE@am__append_802 = lsefimmap.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_803 =
+@COND_i386_efi_TRUE@am__append_804 = $(nodist_lsefimmap_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_805 = \
+@COND_i386_efi_TRUE@ $(nodist_lsefimmap_module_SOURCES) \
+@COND_i386_efi_TRUE@ lsefimmap.marker
+@COND_i386_efi_TRUE@am__append_806 = lsefimmap.mod
+@COND_i386_efi_TRUE@am__append_807 = lsefimmap.marker
+@COND_x86_64_efi_TRUE@am__append_808 = lsefimmap.module
+@COND_x86_64_efi_TRUE@am__append_809 = lsefimmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_810 =
+@COND_x86_64_efi_TRUE@am__append_811 = $(nodist_lsefimmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_812 = \
+@COND_x86_64_efi_TRUE@ $(nodist_lsefimmap_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ lsefimmap.marker
+@COND_x86_64_efi_TRUE@am__append_813 = lsefimmap.mod
+@COND_x86_64_efi_TRUE@am__append_814 = lsefimmap.marker
+@COND_emu_TRUE@am__append_815 = blocklist.module
+@COND_emu_TRUE@am__append_816 = blocklist.module$(EXEEXT)
+@COND_emu_TRUE@am__append_817 =
+@COND_emu_TRUE@am__append_818 = $(nodist_blocklist_module_SOURCES)
+@COND_emu_TRUE@am__append_819 = $(nodist_blocklist_module_SOURCES) \
+@COND_emu_TRUE@ blocklist.marker
+@COND_emu_TRUE@am__append_820 = blocklist.mod
+@COND_emu_TRUE@am__append_821 = blocklist.marker
+@COND_i386_pc_TRUE@am__append_822 = blocklist.module
+@COND_i386_pc_TRUE@am__append_823 = blocklist.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_824 =
+@COND_i386_pc_TRUE@am__append_825 = $(nodist_blocklist_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_826 = \
+@COND_i386_pc_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_i386_pc_TRUE@ blocklist.marker
+@COND_i386_pc_TRUE@am__append_827 = blocklist.mod
+@COND_i386_pc_TRUE@am__append_828 = blocklist.marker
+@COND_i386_efi_TRUE@am__append_829 = blocklist.module
+@COND_i386_efi_TRUE@am__append_830 = blocklist.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_831 =
+@COND_i386_efi_TRUE@am__append_832 = $(nodist_blocklist_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_833 = \
+@COND_i386_efi_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_i386_efi_TRUE@ blocklist.marker
+@COND_i386_efi_TRUE@am__append_834 = blocklist.mod
+@COND_i386_efi_TRUE@am__append_835 = blocklist.marker
+@COND_i386_qemu_TRUE@am__append_836 = blocklist.module
+@COND_i386_qemu_TRUE@am__append_837 = blocklist.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_838 =
+@COND_i386_qemu_TRUE@am__append_839 = $(nodist_blocklist_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_840 = \
+@COND_i386_qemu_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_i386_qemu_TRUE@ blocklist.marker
+@COND_i386_qemu_TRUE@am__append_841 = blocklist.mod
+@COND_i386_qemu_TRUE@am__append_842 = blocklist.marker
+@COND_i386_coreboot_TRUE@am__append_843 = blocklist.module
+@COND_i386_coreboot_TRUE@am__append_844 = blocklist.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_845 =
+@COND_i386_coreboot_TRUE@am__append_846 = $(nodist_blocklist_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_847 = \
+@COND_i386_coreboot_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ blocklist.marker
+@COND_i386_coreboot_TRUE@am__append_848 = blocklist.mod
+@COND_i386_coreboot_TRUE@am__append_849 = blocklist.marker
+@COND_i386_multiboot_TRUE@am__append_850 = blocklist.module
+@COND_i386_multiboot_TRUE@am__append_851 = blocklist.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_852 =
+@COND_i386_multiboot_TRUE@am__append_853 = $(nodist_blocklist_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_854 = \
+@COND_i386_multiboot_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ blocklist.marker
+@COND_i386_multiboot_TRUE@am__append_855 = blocklist.mod
+@COND_i386_multiboot_TRUE@am__append_856 = blocklist.marker
+@COND_i386_ieee1275_TRUE@am__append_857 = blocklist.module
+@COND_i386_ieee1275_TRUE@am__append_858 = blocklist.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_859 =
+@COND_i386_ieee1275_TRUE@am__append_860 = $(nodist_blocklist_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_861 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ blocklist.marker
+@COND_i386_ieee1275_TRUE@am__append_862 = blocklist.mod
+@COND_i386_ieee1275_TRUE@am__append_863 = blocklist.marker
+@COND_x86_64_efi_TRUE@am__append_864 = blocklist.module
+@COND_x86_64_efi_TRUE@am__append_865 = blocklist.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_866 =
+@COND_x86_64_efi_TRUE@am__append_867 = $(nodist_blocklist_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_868 = \
+@COND_x86_64_efi_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ blocklist.marker
+@COND_x86_64_efi_TRUE@am__append_869 = blocklist.mod
+@COND_x86_64_efi_TRUE@am__append_870 = blocklist.marker
+@COND_mips_yeeloong_TRUE@am__append_871 = blocklist.module
+@COND_mips_yeeloong_TRUE@am__append_872 = blocklist.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_873 =
+@COND_mips_yeeloong_TRUE@am__append_874 = $(nodist_blocklist_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_875 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_blocklist_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ blocklist.marker
+@COND_mips_yeeloong_TRUE@am__append_876 = blocklist.mod
+@COND_mips_yeeloong_TRUE@am__append_877 = blocklist.marker
+@COND_sparc64_ieee1275_TRUE@am__append_878 = blocklist.module
+@COND_sparc64_ieee1275_TRUE@am__append_879 = blocklist.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_880 =
+@COND_sparc64_ieee1275_TRUE@am__append_881 = $(nodist_blocklist_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_882 = $(nodist_blocklist_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ blocklist.marker
+@COND_sparc64_ieee1275_TRUE@am__append_883 = blocklist.mod
+@COND_sparc64_ieee1275_TRUE@am__append_884 = blocklist.marker
+@COND_powerpc_ieee1275_TRUE@am__append_885 = blocklist.module
+@COND_powerpc_ieee1275_TRUE@am__append_886 = blocklist.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_887 =
+@COND_powerpc_ieee1275_TRUE@am__append_888 = $(nodist_blocklist_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_889 = $(nodist_blocklist_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ blocklist.marker
+@COND_powerpc_ieee1275_TRUE@am__append_890 = blocklist.mod
+@COND_powerpc_ieee1275_TRUE@am__append_891 = blocklist.marker
+@COND_emu_TRUE@am__append_892 = boot.module
+@COND_emu_TRUE@am__append_893 = boot.module$(EXEEXT)
+@COND_emu_TRUE@am__append_894 =
+@COND_emu_TRUE@am__append_895 = $(nodist_boot_module_SOURCES)
+@COND_emu_TRUE@am__append_896 = $(nodist_boot_module_SOURCES) \
+@COND_emu_TRUE@ boot.marker
+@COND_emu_TRUE@am__append_897 = boot.mod
+@COND_emu_TRUE@am__append_898 = boot.marker
+@COND_i386_pc_TRUE@am__append_899 = boot.module
+@COND_i386_pc_TRUE@am__append_900 = boot.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_901 =
+@COND_i386_pc_TRUE@am__append_902 = $(nodist_boot_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_903 = $(nodist_boot_module_SOURCES) \
+@COND_i386_pc_TRUE@ boot.marker
+@COND_i386_pc_TRUE@am__append_904 = boot.mod
+@COND_i386_pc_TRUE@am__append_905 = boot.marker
+@COND_i386_efi_TRUE@am__append_906 = boot.module
+@COND_i386_efi_TRUE@am__append_907 = boot.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_908 =
+@COND_i386_efi_TRUE@am__append_909 = $(nodist_boot_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_910 = $(nodist_boot_module_SOURCES) \
+@COND_i386_efi_TRUE@ boot.marker
+@COND_i386_efi_TRUE@am__append_911 = boot.mod
+@COND_i386_efi_TRUE@am__append_912 = boot.marker
+@COND_i386_qemu_TRUE@am__append_913 = boot.module
+@COND_i386_qemu_TRUE@am__append_914 = boot.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_915 =
+@COND_i386_qemu_TRUE@am__append_916 = $(nodist_boot_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_917 = $(nodist_boot_module_SOURCES) \
+@COND_i386_qemu_TRUE@ boot.marker
+@COND_i386_qemu_TRUE@am__append_918 = boot.mod
+@COND_i386_qemu_TRUE@am__append_919 = boot.marker
+@COND_i386_coreboot_TRUE@am__append_920 = boot.module
+@COND_i386_coreboot_TRUE@am__append_921 = boot.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_922 =
+@COND_i386_coreboot_TRUE@am__append_923 = $(nodist_boot_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_924 = \
+@COND_i386_coreboot_TRUE@ $(nodist_boot_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ boot.marker
+@COND_i386_coreboot_TRUE@am__append_925 = boot.mod
+@COND_i386_coreboot_TRUE@am__append_926 = boot.marker
+@COND_i386_multiboot_TRUE@am__append_927 = boot.module
+@COND_i386_multiboot_TRUE@am__append_928 = boot.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_929 =
+@COND_i386_multiboot_TRUE@am__append_930 = $(nodist_boot_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_931 = \
+@COND_i386_multiboot_TRUE@ $(nodist_boot_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ boot.marker
+@COND_i386_multiboot_TRUE@am__append_932 = boot.mod
+@COND_i386_multiboot_TRUE@am__append_933 = boot.marker
+@COND_i386_ieee1275_TRUE@am__append_934 = boot.module
+@COND_i386_ieee1275_TRUE@am__append_935 = boot.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_936 =
+@COND_i386_ieee1275_TRUE@am__append_937 = $(nodist_boot_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_938 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_boot_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ boot.marker
+@COND_i386_ieee1275_TRUE@am__append_939 = boot.mod
+@COND_i386_ieee1275_TRUE@am__append_940 = boot.marker
+@COND_x86_64_efi_TRUE@am__append_941 = boot.module
+@COND_x86_64_efi_TRUE@am__append_942 = boot.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_943 =
+@COND_x86_64_efi_TRUE@am__append_944 = $(nodist_boot_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_945 = $(nodist_boot_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ boot.marker
+@COND_x86_64_efi_TRUE@am__append_946 = boot.mod
+@COND_x86_64_efi_TRUE@am__append_947 = boot.marker
+@COND_sparc64_ieee1275_TRUE@am__append_948 = boot.module
+@COND_sparc64_ieee1275_TRUE@am__append_949 = boot.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_950 =
+@COND_sparc64_ieee1275_TRUE@am__append_951 = $(nodist_boot_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_952 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_boot_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ boot.marker
+@COND_sparc64_ieee1275_TRUE@am__append_953 = boot.mod
+@COND_sparc64_ieee1275_TRUE@am__append_954 = boot.marker
+@COND_powerpc_ieee1275_TRUE@am__append_955 = boot.module
+@COND_powerpc_ieee1275_TRUE@am__append_956 = boot.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_957 =
+@COND_powerpc_ieee1275_TRUE@am__append_958 = $(nodist_boot_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_959 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_boot_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ boot.marker
+@COND_powerpc_ieee1275_TRUE@am__append_960 = boot.mod
+@COND_powerpc_ieee1275_TRUE@am__append_961 = boot.marker
+@COND_emu_TRUE@am__append_962 = cat.module
+@COND_emu_TRUE@am__append_963 = cat.module$(EXEEXT)
+@COND_emu_TRUE@am__append_964 =
+@COND_emu_TRUE@am__append_965 = $(nodist_cat_module_SOURCES)
+@COND_emu_TRUE@am__append_966 = $(nodist_cat_module_SOURCES) \
+@COND_emu_TRUE@ cat.marker
+@COND_emu_TRUE@am__append_967 = cat.mod
+@COND_emu_TRUE@am__append_968 = cat.marker
+@COND_i386_pc_TRUE@am__append_969 = cat.module
+@COND_i386_pc_TRUE@am__append_970 = cat.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_971 =
+@COND_i386_pc_TRUE@am__append_972 = $(nodist_cat_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_973 = $(nodist_cat_module_SOURCES) \
+@COND_i386_pc_TRUE@ cat.marker
+@COND_i386_pc_TRUE@am__append_974 = cat.mod
+@COND_i386_pc_TRUE@am__append_975 = cat.marker
+@COND_i386_efi_TRUE@am__append_976 = cat.module
+@COND_i386_efi_TRUE@am__append_977 = cat.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_978 =
+@COND_i386_efi_TRUE@am__append_979 = $(nodist_cat_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_980 = $(nodist_cat_module_SOURCES) \
+@COND_i386_efi_TRUE@ cat.marker
+@COND_i386_efi_TRUE@am__append_981 = cat.mod
+@COND_i386_efi_TRUE@am__append_982 = cat.marker
+@COND_i386_qemu_TRUE@am__append_983 = cat.module
+@COND_i386_qemu_TRUE@am__append_984 = cat.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_985 =
+@COND_i386_qemu_TRUE@am__append_986 = $(nodist_cat_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_987 = $(nodist_cat_module_SOURCES) \
+@COND_i386_qemu_TRUE@ cat.marker
+@COND_i386_qemu_TRUE@am__append_988 = cat.mod
+@COND_i386_qemu_TRUE@am__append_989 = cat.marker
+@COND_i386_coreboot_TRUE@am__append_990 = cat.module
+@COND_i386_coreboot_TRUE@am__append_991 = cat.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_992 =
+@COND_i386_coreboot_TRUE@am__append_993 = $(nodist_cat_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_994 = \
+@COND_i386_coreboot_TRUE@ $(nodist_cat_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ cat.marker
+@COND_i386_coreboot_TRUE@am__append_995 = cat.mod
+@COND_i386_coreboot_TRUE@am__append_996 = cat.marker
+@COND_i386_multiboot_TRUE@am__append_997 = cat.module
+@COND_i386_multiboot_TRUE@am__append_998 = cat.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_999 =
+@COND_i386_multiboot_TRUE@am__append_1000 = $(nodist_cat_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1001 = \
+@COND_i386_multiboot_TRUE@ $(nodist_cat_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ cat.marker
+@COND_i386_multiboot_TRUE@am__append_1002 = cat.mod
+@COND_i386_multiboot_TRUE@am__append_1003 = cat.marker
+@COND_i386_ieee1275_TRUE@am__append_1004 = cat.module
+@COND_i386_ieee1275_TRUE@am__append_1005 = cat.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1006 =
+@COND_i386_ieee1275_TRUE@am__append_1007 = $(nodist_cat_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1008 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_cat_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ cat.marker
+@COND_i386_ieee1275_TRUE@am__append_1009 = cat.mod
+@COND_i386_ieee1275_TRUE@am__append_1010 = cat.marker
+@COND_x86_64_efi_TRUE@am__append_1011 = cat.module
+@COND_x86_64_efi_TRUE@am__append_1012 = cat.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1013 =
+@COND_x86_64_efi_TRUE@am__append_1014 = $(nodist_cat_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1015 = $(nodist_cat_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ cat.marker
+@COND_x86_64_efi_TRUE@am__append_1016 = cat.mod
+@COND_x86_64_efi_TRUE@am__append_1017 = cat.marker
+@COND_mips_yeeloong_TRUE@am__append_1018 = cat.module
+@COND_mips_yeeloong_TRUE@am__append_1019 = cat.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1020 =
+@COND_mips_yeeloong_TRUE@am__append_1021 = $(nodist_cat_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1022 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_cat_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ cat.marker
+@COND_mips_yeeloong_TRUE@am__append_1023 = cat.mod
+@COND_mips_yeeloong_TRUE@am__append_1024 = cat.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1025 = cat.module
+@COND_sparc64_ieee1275_TRUE@am__append_1026 = cat.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1027 =
+@COND_sparc64_ieee1275_TRUE@am__append_1028 = $(nodist_cat_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1029 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_cat_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ cat.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1030 = cat.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1031 = cat.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1032 = cat.module
+@COND_powerpc_ieee1275_TRUE@am__append_1033 = cat.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1034 =
+@COND_powerpc_ieee1275_TRUE@am__append_1035 = $(nodist_cat_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1036 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_cat_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ cat.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1037 = cat.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1038 = cat.marker
+@COND_emu_TRUE@am__append_1039 = cmp.module
+@COND_emu_TRUE@am__append_1040 = cmp.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1041 =
+@COND_emu_TRUE@am__append_1042 = $(nodist_cmp_module_SOURCES)
+@COND_emu_TRUE@am__append_1043 = $(nodist_cmp_module_SOURCES) \
+@COND_emu_TRUE@ cmp.marker
+@COND_emu_TRUE@am__append_1044 = cmp.mod
+@COND_emu_TRUE@am__append_1045 = cmp.marker
+@COND_i386_pc_TRUE@am__append_1046 = cmp.module
+@COND_i386_pc_TRUE@am__append_1047 = cmp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1048 =
+@COND_i386_pc_TRUE@am__append_1049 = $(nodist_cmp_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1050 = $(nodist_cmp_module_SOURCES) \
+@COND_i386_pc_TRUE@ cmp.marker
+@COND_i386_pc_TRUE@am__append_1051 = cmp.mod
+@COND_i386_pc_TRUE@am__append_1052 = cmp.marker
+@COND_i386_efi_TRUE@am__append_1053 = cmp.module
+@COND_i386_efi_TRUE@am__append_1054 = cmp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1055 =
+@COND_i386_efi_TRUE@am__append_1056 = $(nodist_cmp_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1057 = $(nodist_cmp_module_SOURCES) \
+@COND_i386_efi_TRUE@ cmp.marker
+@COND_i386_efi_TRUE@am__append_1058 = cmp.mod
+@COND_i386_efi_TRUE@am__append_1059 = cmp.marker
+@COND_i386_qemu_TRUE@am__append_1060 = cmp.module
+@COND_i386_qemu_TRUE@am__append_1061 = cmp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1062 =
+@COND_i386_qemu_TRUE@am__append_1063 = $(nodist_cmp_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1064 = $(nodist_cmp_module_SOURCES) \
+@COND_i386_qemu_TRUE@ cmp.marker
+@COND_i386_qemu_TRUE@am__append_1065 = cmp.mod
+@COND_i386_qemu_TRUE@am__append_1066 = cmp.marker
+@COND_i386_coreboot_TRUE@am__append_1067 = cmp.module
+@COND_i386_coreboot_TRUE@am__append_1068 = cmp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1069 =
+@COND_i386_coreboot_TRUE@am__append_1070 = $(nodist_cmp_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1071 = \
+@COND_i386_coreboot_TRUE@ $(nodist_cmp_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ cmp.marker
+@COND_i386_coreboot_TRUE@am__append_1072 = cmp.mod
+@COND_i386_coreboot_TRUE@am__append_1073 = cmp.marker
+@COND_i386_multiboot_TRUE@am__append_1074 = cmp.module
+@COND_i386_multiboot_TRUE@am__append_1075 = cmp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1076 =
+@COND_i386_multiboot_TRUE@am__append_1077 = $(nodist_cmp_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1078 = \
+@COND_i386_multiboot_TRUE@ $(nodist_cmp_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ cmp.marker
+@COND_i386_multiboot_TRUE@am__append_1079 = cmp.mod
+@COND_i386_multiboot_TRUE@am__append_1080 = cmp.marker
+@COND_i386_ieee1275_TRUE@am__append_1081 = cmp.module
+@COND_i386_ieee1275_TRUE@am__append_1082 = cmp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1083 =
+@COND_i386_ieee1275_TRUE@am__append_1084 = $(nodist_cmp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1085 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_cmp_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ cmp.marker
+@COND_i386_ieee1275_TRUE@am__append_1086 = cmp.mod
+@COND_i386_ieee1275_TRUE@am__append_1087 = cmp.marker
+@COND_x86_64_efi_TRUE@am__append_1088 = cmp.module
+@COND_x86_64_efi_TRUE@am__append_1089 = cmp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1090 =
+@COND_x86_64_efi_TRUE@am__append_1091 = $(nodist_cmp_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1092 = $(nodist_cmp_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ cmp.marker
+@COND_x86_64_efi_TRUE@am__append_1093 = cmp.mod
+@COND_x86_64_efi_TRUE@am__append_1094 = cmp.marker
+@COND_mips_yeeloong_TRUE@am__append_1095 = cmp.module
+@COND_mips_yeeloong_TRUE@am__append_1096 = cmp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1097 =
+@COND_mips_yeeloong_TRUE@am__append_1098 = $(nodist_cmp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1099 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_cmp_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ cmp.marker
+@COND_mips_yeeloong_TRUE@am__append_1100 = cmp.mod
+@COND_mips_yeeloong_TRUE@am__append_1101 = cmp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1102 = cmp.module
+@COND_sparc64_ieee1275_TRUE@am__append_1103 = cmp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1104 =
+@COND_sparc64_ieee1275_TRUE@am__append_1105 = $(nodist_cmp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1106 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_cmp_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ cmp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1107 = cmp.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1108 = cmp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1109 = cmp.module
+@COND_powerpc_ieee1275_TRUE@am__append_1110 = cmp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1111 =
+@COND_powerpc_ieee1275_TRUE@am__append_1112 = $(nodist_cmp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1113 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_cmp_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ cmp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1114 = cmp.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1115 = cmp.marker
+@COND_emu_TRUE@am__append_1116 = configfile.module
+@COND_emu_TRUE@am__append_1117 = configfile.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1118 =
+@COND_emu_TRUE@am__append_1119 = $(nodist_configfile_module_SOURCES)
+@COND_emu_TRUE@am__append_1120 = $(nodist_configfile_module_SOURCES) \
+@COND_emu_TRUE@ configfile.marker
+@COND_emu_TRUE@am__append_1121 = configfile.mod
+@COND_emu_TRUE@am__append_1122 = configfile.marker
+@COND_i386_pc_TRUE@am__append_1123 = configfile.module
+@COND_i386_pc_TRUE@am__append_1124 = configfile.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1125 =
+@COND_i386_pc_TRUE@am__append_1126 = $(nodist_configfile_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1127 = \
+@COND_i386_pc_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_i386_pc_TRUE@ configfile.marker
+@COND_i386_pc_TRUE@am__append_1128 = configfile.mod
+@COND_i386_pc_TRUE@am__append_1129 = configfile.marker
+@COND_i386_efi_TRUE@am__append_1130 = configfile.module
+@COND_i386_efi_TRUE@am__append_1131 = configfile.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1132 =
+@COND_i386_efi_TRUE@am__append_1133 = $(nodist_configfile_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1134 = \
+@COND_i386_efi_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_i386_efi_TRUE@ configfile.marker
+@COND_i386_efi_TRUE@am__append_1135 = configfile.mod
+@COND_i386_efi_TRUE@am__append_1136 = configfile.marker
+@COND_i386_qemu_TRUE@am__append_1137 = configfile.module
+@COND_i386_qemu_TRUE@am__append_1138 = configfile.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1139 =
+@COND_i386_qemu_TRUE@am__append_1140 = $(nodist_configfile_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1141 = \
+@COND_i386_qemu_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_i386_qemu_TRUE@ configfile.marker
+@COND_i386_qemu_TRUE@am__append_1142 = configfile.mod
+@COND_i386_qemu_TRUE@am__append_1143 = configfile.marker
+@COND_i386_coreboot_TRUE@am__append_1144 = configfile.module
+@COND_i386_coreboot_TRUE@am__append_1145 = configfile.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1146 =
+@COND_i386_coreboot_TRUE@am__append_1147 = $(nodist_configfile_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1148 = \
+@COND_i386_coreboot_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ configfile.marker
+@COND_i386_coreboot_TRUE@am__append_1149 = configfile.mod
+@COND_i386_coreboot_TRUE@am__append_1150 = configfile.marker
+@COND_i386_multiboot_TRUE@am__append_1151 = configfile.module
+@COND_i386_multiboot_TRUE@am__append_1152 = configfile.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1153 =
+@COND_i386_multiboot_TRUE@am__append_1154 = $(nodist_configfile_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1155 = \
+@COND_i386_multiboot_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ configfile.marker
+@COND_i386_multiboot_TRUE@am__append_1156 = configfile.mod
+@COND_i386_multiboot_TRUE@am__append_1157 = configfile.marker
+@COND_i386_ieee1275_TRUE@am__append_1158 = configfile.module
+@COND_i386_ieee1275_TRUE@am__append_1159 = configfile.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1160 =
+@COND_i386_ieee1275_TRUE@am__append_1161 = $(nodist_configfile_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1162 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ configfile.marker
+@COND_i386_ieee1275_TRUE@am__append_1163 = configfile.mod
+@COND_i386_ieee1275_TRUE@am__append_1164 = configfile.marker
+@COND_x86_64_efi_TRUE@am__append_1165 = configfile.module
+@COND_x86_64_efi_TRUE@am__append_1166 = configfile.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1167 =
+@COND_x86_64_efi_TRUE@am__append_1168 = $(nodist_configfile_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1169 = \
+@COND_x86_64_efi_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ configfile.marker
+@COND_x86_64_efi_TRUE@am__append_1170 = configfile.mod
+@COND_x86_64_efi_TRUE@am__append_1171 = configfile.marker
+@COND_mips_yeeloong_TRUE@am__append_1172 = configfile.module
+@COND_mips_yeeloong_TRUE@am__append_1173 = configfile.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1174 =
+@COND_mips_yeeloong_TRUE@am__append_1175 = $(nodist_configfile_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1176 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_configfile_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ configfile.marker
+@COND_mips_yeeloong_TRUE@am__append_1177 = configfile.mod
+@COND_mips_yeeloong_TRUE@am__append_1178 = configfile.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1179 = configfile.module
+@COND_sparc64_ieee1275_TRUE@am__append_1180 = configfile.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1181 =
+@COND_sparc64_ieee1275_TRUE@am__append_1182 = $(nodist_configfile_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1183 = $(nodist_configfile_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ configfile.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1184 = configfile.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1185 = configfile.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1186 = configfile.module
+@COND_powerpc_ieee1275_TRUE@am__append_1187 = configfile.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1188 =
+@COND_powerpc_ieee1275_TRUE@am__append_1189 = $(nodist_configfile_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1190 = $(nodist_configfile_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ configfile.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1191 = configfile.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1192 = configfile.marker
+@COND_i386_pc_TRUE@am__append_1193 = cpuid.module
+@COND_i386_pc_TRUE@am__append_1194 = cpuid.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1195 =
+@COND_i386_pc_TRUE@am__append_1196 = $(nodist_cpuid_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1197 = $(nodist_cpuid_module_SOURCES) \
+@COND_i386_pc_TRUE@ cpuid.marker
+@COND_i386_pc_TRUE@am__append_1198 = cpuid.mod
+@COND_i386_pc_TRUE@am__append_1199 = cpuid.marker
+@COND_i386_efi_TRUE@am__append_1200 = cpuid.module
+@COND_i386_efi_TRUE@am__append_1201 = cpuid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1202 =
+@COND_i386_efi_TRUE@am__append_1203 = $(nodist_cpuid_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1204 = $(nodist_cpuid_module_SOURCES) \
+@COND_i386_efi_TRUE@ cpuid.marker
+@COND_i386_efi_TRUE@am__append_1205 = cpuid.mod
+@COND_i386_efi_TRUE@am__append_1206 = cpuid.marker
+@COND_i386_qemu_TRUE@am__append_1207 = cpuid.module
+@COND_i386_qemu_TRUE@am__append_1208 = cpuid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1209 =
+@COND_i386_qemu_TRUE@am__append_1210 = $(nodist_cpuid_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1211 = $(nodist_cpuid_module_SOURCES) \
+@COND_i386_qemu_TRUE@ cpuid.marker
+@COND_i386_qemu_TRUE@am__append_1212 = cpuid.mod
+@COND_i386_qemu_TRUE@am__append_1213 = cpuid.marker
+@COND_i386_coreboot_TRUE@am__append_1214 = cpuid.module
+@COND_i386_coreboot_TRUE@am__append_1215 = cpuid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1216 =
+@COND_i386_coreboot_TRUE@am__append_1217 = $(nodist_cpuid_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1218 = \
+@COND_i386_coreboot_TRUE@ $(nodist_cpuid_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ cpuid.marker
+@COND_i386_coreboot_TRUE@am__append_1219 = cpuid.mod
+@COND_i386_coreboot_TRUE@am__append_1220 = cpuid.marker
+@COND_i386_multiboot_TRUE@am__append_1221 = cpuid.module
+@COND_i386_multiboot_TRUE@am__append_1222 = cpuid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1223 =
+@COND_i386_multiboot_TRUE@am__append_1224 = $(nodist_cpuid_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1225 = \
+@COND_i386_multiboot_TRUE@ $(nodist_cpuid_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ cpuid.marker
+@COND_i386_multiboot_TRUE@am__append_1226 = cpuid.mod
+@COND_i386_multiboot_TRUE@am__append_1227 = cpuid.marker
+@COND_i386_ieee1275_TRUE@am__append_1228 = cpuid.module
+@COND_i386_ieee1275_TRUE@am__append_1229 = cpuid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1230 =
+@COND_i386_ieee1275_TRUE@am__append_1231 = $(nodist_cpuid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1232 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_cpuid_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ cpuid.marker
+@COND_i386_ieee1275_TRUE@am__append_1233 = cpuid.mod
+@COND_i386_ieee1275_TRUE@am__append_1234 = cpuid.marker
+@COND_x86_64_efi_TRUE@am__append_1235 = cpuid.module
+@COND_x86_64_efi_TRUE@am__append_1236 = cpuid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1237 =
+@COND_x86_64_efi_TRUE@am__append_1238 = $(nodist_cpuid_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1239 = \
+@COND_x86_64_efi_TRUE@ $(nodist_cpuid_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ cpuid.marker
+@COND_x86_64_efi_TRUE@am__append_1240 = cpuid.mod
+@COND_x86_64_efi_TRUE@am__append_1241 = cpuid.marker
+@COND_emu_TRUE@am__append_1242 = date.module
+@COND_emu_TRUE@am__append_1243 = date.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1244 =
+@COND_emu_TRUE@am__append_1245 = $(nodist_date_module_SOURCES)
+@COND_emu_TRUE@am__append_1246 = $(nodist_date_module_SOURCES) \
+@COND_emu_TRUE@ date.marker
+@COND_emu_TRUE@am__append_1247 = date.mod
+@COND_emu_TRUE@am__append_1248 = date.marker
+@COND_i386_pc_TRUE@am__append_1249 = date.module
+@COND_i386_pc_TRUE@am__append_1250 = date.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1251 =
+@COND_i386_pc_TRUE@am__append_1252 = $(nodist_date_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1253 = $(nodist_date_module_SOURCES) \
+@COND_i386_pc_TRUE@ date.marker
+@COND_i386_pc_TRUE@am__append_1254 = date.mod
+@COND_i386_pc_TRUE@am__append_1255 = date.marker
+@COND_i386_efi_TRUE@am__append_1256 = date.module
+@COND_i386_efi_TRUE@am__append_1257 = date.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1258 =
+@COND_i386_efi_TRUE@am__append_1259 = $(nodist_date_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1260 = $(nodist_date_module_SOURCES) \
+@COND_i386_efi_TRUE@ date.marker
+@COND_i386_efi_TRUE@am__append_1261 = date.mod
+@COND_i386_efi_TRUE@am__append_1262 = date.marker
+@COND_i386_qemu_TRUE@am__append_1263 = date.module
+@COND_i386_qemu_TRUE@am__append_1264 = date.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1265 =
+@COND_i386_qemu_TRUE@am__append_1266 = $(nodist_date_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1267 = $(nodist_date_module_SOURCES) \
+@COND_i386_qemu_TRUE@ date.marker
+@COND_i386_qemu_TRUE@am__append_1268 = date.mod
+@COND_i386_qemu_TRUE@am__append_1269 = date.marker
+@COND_i386_coreboot_TRUE@am__append_1270 = date.module
+@COND_i386_coreboot_TRUE@am__append_1271 = date.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1272 =
+@COND_i386_coreboot_TRUE@am__append_1273 = $(nodist_date_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1274 = \
+@COND_i386_coreboot_TRUE@ $(nodist_date_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ date.marker
+@COND_i386_coreboot_TRUE@am__append_1275 = date.mod
+@COND_i386_coreboot_TRUE@am__append_1276 = date.marker
+@COND_i386_multiboot_TRUE@am__append_1277 = date.module
+@COND_i386_multiboot_TRUE@am__append_1278 = date.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1279 =
+@COND_i386_multiboot_TRUE@am__append_1280 = $(nodist_date_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1281 = \
+@COND_i386_multiboot_TRUE@ $(nodist_date_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ date.marker
+@COND_i386_multiboot_TRUE@am__append_1282 = date.mod
+@COND_i386_multiboot_TRUE@am__append_1283 = date.marker
+@COND_i386_ieee1275_TRUE@am__append_1284 = date.module
+@COND_i386_ieee1275_TRUE@am__append_1285 = date.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1286 =
+@COND_i386_ieee1275_TRUE@am__append_1287 = $(nodist_date_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1288 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_date_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ date.marker
+@COND_i386_ieee1275_TRUE@am__append_1289 = date.mod
+@COND_i386_ieee1275_TRUE@am__append_1290 = date.marker
+@COND_x86_64_efi_TRUE@am__append_1291 = date.module
+@COND_x86_64_efi_TRUE@am__append_1292 = date.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1293 =
+@COND_x86_64_efi_TRUE@am__append_1294 = $(nodist_date_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1295 = $(nodist_date_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ date.marker
+@COND_x86_64_efi_TRUE@am__append_1296 = date.mod
+@COND_x86_64_efi_TRUE@am__append_1297 = date.marker
+@COND_mips_yeeloong_TRUE@am__append_1298 = date.module
+@COND_mips_yeeloong_TRUE@am__append_1299 = date.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1300 =
+@COND_mips_yeeloong_TRUE@am__append_1301 = $(nodist_date_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1302 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_date_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ date.marker
+@COND_mips_yeeloong_TRUE@am__append_1303 = date.mod
+@COND_mips_yeeloong_TRUE@am__append_1304 = date.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1305 = date.module
+@COND_sparc64_ieee1275_TRUE@am__append_1306 = date.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1307 =
+@COND_sparc64_ieee1275_TRUE@am__append_1308 = $(nodist_date_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1309 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_date_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ date.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1310 = date.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1311 = date.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1312 = date.module
+@COND_powerpc_ieee1275_TRUE@am__append_1313 = date.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1314 =
+@COND_powerpc_ieee1275_TRUE@am__append_1315 = $(nodist_date_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1316 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_date_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ date.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1317 = date.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1318 = date.marker
+@COND_i386_pc_TRUE@am__append_1319 = drivemap.module
+@COND_i386_pc_TRUE@am__append_1320 = drivemap.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1321 =
+@COND_i386_pc_TRUE@am__append_1322 = $(nodist_drivemap_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1323 = \
+@COND_i386_pc_TRUE@ $(nodist_drivemap_module_SOURCES) \
+@COND_i386_pc_TRUE@ drivemap.marker
+@COND_i386_pc_TRUE@am__append_1324 = drivemap.mod
+@COND_i386_pc_TRUE@am__append_1325 = drivemap.marker
+@COND_emu_TRUE@am__append_1326 = echo.module
+@COND_emu_TRUE@am__append_1327 = echo.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1328 =
+@COND_emu_TRUE@am__append_1329 = $(nodist_echo_module_SOURCES)
+@COND_emu_TRUE@am__append_1330 = $(nodist_echo_module_SOURCES) \
+@COND_emu_TRUE@ echo.marker
+@COND_emu_TRUE@am__append_1331 = echo.mod
+@COND_emu_TRUE@am__append_1332 = echo.marker
+@COND_i386_pc_TRUE@am__append_1333 = echo.module
+@COND_i386_pc_TRUE@am__append_1334 = echo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1335 =
+@COND_i386_pc_TRUE@am__append_1336 = $(nodist_echo_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1337 = $(nodist_echo_module_SOURCES) \
+@COND_i386_pc_TRUE@ echo.marker
+@COND_i386_pc_TRUE@am__append_1338 = echo.mod
+@COND_i386_pc_TRUE@am__append_1339 = echo.marker
+@COND_i386_efi_TRUE@am__append_1340 = echo.module
+@COND_i386_efi_TRUE@am__append_1341 = echo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1342 =
+@COND_i386_efi_TRUE@am__append_1343 = $(nodist_echo_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1344 = $(nodist_echo_module_SOURCES) \
+@COND_i386_efi_TRUE@ echo.marker
+@COND_i386_efi_TRUE@am__append_1345 = echo.mod
+@COND_i386_efi_TRUE@am__append_1346 = echo.marker
+@COND_i386_qemu_TRUE@am__append_1347 = echo.module
+@COND_i386_qemu_TRUE@am__append_1348 = echo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1349 =
+@COND_i386_qemu_TRUE@am__append_1350 = $(nodist_echo_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1351 = $(nodist_echo_module_SOURCES) \
+@COND_i386_qemu_TRUE@ echo.marker
+@COND_i386_qemu_TRUE@am__append_1352 = echo.mod
+@COND_i386_qemu_TRUE@am__append_1353 = echo.marker
+@COND_i386_coreboot_TRUE@am__append_1354 = echo.module
+@COND_i386_coreboot_TRUE@am__append_1355 = echo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1356 =
+@COND_i386_coreboot_TRUE@am__append_1357 = $(nodist_echo_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1358 = \
+@COND_i386_coreboot_TRUE@ $(nodist_echo_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ echo.marker
+@COND_i386_coreboot_TRUE@am__append_1359 = echo.mod
+@COND_i386_coreboot_TRUE@am__append_1360 = echo.marker
+@COND_i386_multiboot_TRUE@am__append_1361 = echo.module
+@COND_i386_multiboot_TRUE@am__append_1362 = echo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1363 =
+@COND_i386_multiboot_TRUE@am__append_1364 = $(nodist_echo_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1365 = \
+@COND_i386_multiboot_TRUE@ $(nodist_echo_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ echo.marker
+@COND_i386_multiboot_TRUE@am__append_1366 = echo.mod
+@COND_i386_multiboot_TRUE@am__append_1367 = echo.marker
+@COND_i386_ieee1275_TRUE@am__append_1368 = echo.module
+@COND_i386_ieee1275_TRUE@am__append_1369 = echo.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1370 =
+@COND_i386_ieee1275_TRUE@am__append_1371 = $(nodist_echo_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1372 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_echo_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ echo.marker
+@COND_i386_ieee1275_TRUE@am__append_1373 = echo.mod
+@COND_i386_ieee1275_TRUE@am__append_1374 = echo.marker
+@COND_x86_64_efi_TRUE@am__append_1375 = echo.module
+@COND_x86_64_efi_TRUE@am__append_1376 = echo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1377 =
+@COND_x86_64_efi_TRUE@am__append_1378 = $(nodist_echo_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1379 = $(nodist_echo_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ echo.marker
+@COND_x86_64_efi_TRUE@am__append_1380 = echo.mod
+@COND_x86_64_efi_TRUE@am__append_1381 = echo.marker
+@COND_mips_yeeloong_TRUE@am__append_1382 = echo.module
+@COND_mips_yeeloong_TRUE@am__append_1383 = echo.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1384 =
+@COND_mips_yeeloong_TRUE@am__append_1385 = $(nodist_echo_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1386 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_echo_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ echo.marker
+@COND_mips_yeeloong_TRUE@am__append_1387 = echo.mod
+@COND_mips_yeeloong_TRUE@am__append_1388 = echo.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1389 = echo.module
+@COND_sparc64_ieee1275_TRUE@am__append_1390 = echo.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1391 =
+@COND_sparc64_ieee1275_TRUE@am__append_1392 = $(nodist_echo_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1393 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_echo_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ echo.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1394 = echo.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1395 = echo.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1396 = echo.module
+@COND_powerpc_ieee1275_TRUE@am__append_1397 = echo.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1398 =
+@COND_powerpc_ieee1275_TRUE@am__append_1399 = $(nodist_echo_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1400 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_echo_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ echo.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1401 = echo.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1402 = echo.marker
+@COND_emu_TRUE@am__append_1403 = extcmd.module
+@COND_emu_TRUE@am__append_1404 = extcmd.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1405 =
+@COND_emu_TRUE@am__append_1406 = $(nodist_extcmd_module_SOURCES)
+@COND_emu_TRUE@am__append_1407 = $(nodist_extcmd_module_SOURCES) \
+@COND_emu_TRUE@ extcmd.marker
+@COND_emu_TRUE@am__append_1408 = extcmd.mod
+@COND_emu_TRUE@am__append_1409 = extcmd.marker
+@COND_i386_pc_TRUE@am__append_1410 = extcmd.module
+@COND_i386_pc_TRUE@am__append_1411 = extcmd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1412 =
+@COND_i386_pc_TRUE@am__append_1413 = $(nodist_extcmd_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1414 = $(nodist_extcmd_module_SOURCES) \
+@COND_i386_pc_TRUE@ extcmd.marker
+@COND_i386_pc_TRUE@am__append_1415 = extcmd.mod
+@COND_i386_pc_TRUE@am__append_1416 = extcmd.marker
+@COND_i386_efi_TRUE@am__append_1417 = extcmd.module
+@COND_i386_efi_TRUE@am__append_1418 = extcmd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1419 =
+@COND_i386_efi_TRUE@am__append_1420 = $(nodist_extcmd_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1421 = $(nodist_extcmd_module_SOURCES) \
+@COND_i386_efi_TRUE@ extcmd.marker
+@COND_i386_efi_TRUE@am__append_1422 = extcmd.mod
+@COND_i386_efi_TRUE@am__append_1423 = extcmd.marker
+@COND_i386_qemu_TRUE@am__append_1424 = extcmd.module
+@COND_i386_qemu_TRUE@am__append_1425 = extcmd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1426 =
+@COND_i386_qemu_TRUE@am__append_1427 = $(nodist_extcmd_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1428 = \
+@COND_i386_qemu_TRUE@ $(nodist_extcmd_module_SOURCES) \
+@COND_i386_qemu_TRUE@ extcmd.marker
+@COND_i386_qemu_TRUE@am__append_1429 = extcmd.mod
+@COND_i386_qemu_TRUE@am__append_1430 = extcmd.marker
+@COND_i386_coreboot_TRUE@am__append_1431 = extcmd.module
+@COND_i386_coreboot_TRUE@am__append_1432 = extcmd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1433 =
+@COND_i386_coreboot_TRUE@am__append_1434 = $(nodist_extcmd_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1435 = \
+@COND_i386_coreboot_TRUE@ $(nodist_extcmd_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ extcmd.marker
+@COND_i386_coreboot_TRUE@am__append_1436 = extcmd.mod
+@COND_i386_coreboot_TRUE@am__append_1437 = extcmd.marker
+@COND_i386_multiboot_TRUE@am__append_1438 = extcmd.module
+@COND_i386_multiboot_TRUE@am__append_1439 = extcmd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1440 =
+@COND_i386_multiboot_TRUE@am__append_1441 = $(nodist_extcmd_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1442 = \
+@COND_i386_multiboot_TRUE@ $(nodist_extcmd_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ extcmd.marker
+@COND_i386_multiboot_TRUE@am__append_1443 = extcmd.mod
+@COND_i386_multiboot_TRUE@am__append_1444 = extcmd.marker
+@COND_x86_64_efi_TRUE@am__append_1445 = extcmd.module
+@COND_x86_64_efi_TRUE@am__append_1446 = extcmd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1447 =
+@COND_x86_64_efi_TRUE@am__append_1448 = $(nodist_extcmd_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1449 = \
+@COND_x86_64_efi_TRUE@ $(nodist_extcmd_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ extcmd.marker
+@COND_x86_64_efi_TRUE@am__append_1450 = extcmd.mod
+@COND_x86_64_efi_TRUE@am__append_1451 = extcmd.marker
+@COND_i386_efi_TRUE@am__append_1452 = fixvideo.module
+@COND_i386_efi_TRUE@am__append_1453 = fixvideo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1454 =
+@COND_i386_efi_TRUE@am__append_1455 = $(nodist_fixvideo_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1456 = \
+@COND_i386_efi_TRUE@ $(nodist_fixvideo_module_SOURCES) \
+@COND_i386_efi_TRUE@ fixvideo.marker
+@COND_i386_efi_TRUE@am__append_1457 = fixvideo.mod
+@COND_i386_efi_TRUE@am__append_1458 = fixvideo.marker
+@COND_x86_64_efi_TRUE@am__append_1459 = fixvideo.module
+@COND_x86_64_efi_TRUE@am__append_1460 = fixvideo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1461 =
+@COND_x86_64_efi_TRUE@am__append_1462 = $(nodist_fixvideo_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1463 = \
+@COND_x86_64_efi_TRUE@ $(nodist_fixvideo_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ fixvideo.marker
+@COND_x86_64_efi_TRUE@am__append_1464 = fixvideo.mod
+@COND_x86_64_efi_TRUE@am__append_1465 = fixvideo.marker
+@COND_emu_TRUE@am__append_1466 = gptsync.module
+@COND_emu_TRUE@am__append_1467 = gptsync.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1468 =
+@COND_emu_TRUE@am__append_1469 = $(nodist_gptsync_module_SOURCES)
+@COND_emu_TRUE@am__append_1470 = $(nodist_gptsync_module_SOURCES) \
+@COND_emu_TRUE@ gptsync.marker
+@COND_emu_TRUE@am__append_1471 = gptsync.mod
+@COND_emu_TRUE@am__append_1472 = gptsync.marker
+@COND_i386_pc_TRUE@am__append_1473 = gptsync.module
+@COND_i386_pc_TRUE@am__append_1474 = gptsync.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1475 =
+@COND_i386_pc_TRUE@am__append_1476 = $(nodist_gptsync_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1477 = $(nodist_gptsync_module_SOURCES) \
+@COND_i386_pc_TRUE@ gptsync.marker
+@COND_i386_pc_TRUE@am__append_1478 = gptsync.mod
+@COND_i386_pc_TRUE@am__append_1479 = gptsync.marker
+@COND_i386_efi_TRUE@am__append_1480 = gptsync.module
+@COND_i386_efi_TRUE@am__append_1481 = gptsync.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1482 =
+@COND_i386_efi_TRUE@am__append_1483 = $(nodist_gptsync_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1484 = \
+@COND_i386_efi_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_i386_efi_TRUE@ gptsync.marker
+@COND_i386_efi_TRUE@am__append_1485 = gptsync.mod
+@COND_i386_efi_TRUE@am__append_1486 = gptsync.marker
+@COND_i386_qemu_TRUE@am__append_1487 = gptsync.module
+@COND_i386_qemu_TRUE@am__append_1488 = gptsync.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1489 =
+@COND_i386_qemu_TRUE@am__append_1490 = $(nodist_gptsync_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1491 = \
+@COND_i386_qemu_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gptsync.marker
+@COND_i386_qemu_TRUE@am__append_1492 = gptsync.mod
+@COND_i386_qemu_TRUE@am__append_1493 = gptsync.marker
+@COND_i386_coreboot_TRUE@am__append_1494 = gptsync.module
+@COND_i386_coreboot_TRUE@am__append_1495 = gptsync.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1496 =
+@COND_i386_coreboot_TRUE@am__append_1497 = $(nodist_gptsync_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1498 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gptsync.marker
+@COND_i386_coreboot_TRUE@am__append_1499 = gptsync.mod
+@COND_i386_coreboot_TRUE@am__append_1500 = gptsync.marker
+@COND_i386_multiboot_TRUE@am__append_1501 = gptsync.module
+@COND_i386_multiboot_TRUE@am__append_1502 = gptsync.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1503 =
+@COND_i386_multiboot_TRUE@am__append_1504 = $(nodist_gptsync_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1505 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gptsync.marker
+@COND_i386_multiboot_TRUE@am__append_1506 = gptsync.mod
+@COND_i386_multiboot_TRUE@am__append_1507 = gptsync.marker
+@COND_i386_ieee1275_TRUE@am__append_1508 = gptsync.module
+@COND_i386_ieee1275_TRUE@am__append_1509 = gptsync.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1510 =
+@COND_i386_ieee1275_TRUE@am__append_1511 = $(nodist_gptsync_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1512 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gptsync.marker
+@COND_i386_ieee1275_TRUE@am__append_1513 = gptsync.mod
+@COND_i386_ieee1275_TRUE@am__append_1514 = gptsync.marker
+@COND_x86_64_efi_TRUE@am__append_1515 = gptsync.module
+@COND_x86_64_efi_TRUE@am__append_1516 = gptsync.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1517 =
+@COND_x86_64_efi_TRUE@am__append_1518 = $(nodist_gptsync_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1519 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gptsync.marker
+@COND_x86_64_efi_TRUE@am__append_1520 = gptsync.mod
+@COND_x86_64_efi_TRUE@am__append_1521 = gptsync.marker
+@COND_mips_yeeloong_TRUE@am__append_1522 = gptsync.module
+@COND_mips_yeeloong_TRUE@am__append_1523 = gptsync.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1524 =
+@COND_mips_yeeloong_TRUE@am__append_1525 = $(nodist_gptsync_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1526 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gptsync.marker
+@COND_mips_yeeloong_TRUE@am__append_1527 = gptsync.mod
+@COND_mips_yeeloong_TRUE@am__append_1528 = gptsync.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1529 = gptsync.module
+@COND_sparc64_ieee1275_TRUE@am__append_1530 = gptsync.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1531 =
+@COND_sparc64_ieee1275_TRUE@am__append_1532 = $(nodist_gptsync_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1533 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gptsync.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1534 = gptsync.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1535 = gptsync.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1536 = gptsync.module
+@COND_powerpc_ieee1275_TRUE@am__append_1537 = gptsync.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1538 =
+@COND_powerpc_ieee1275_TRUE@am__append_1539 = $(nodist_gptsync_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1540 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gptsync_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gptsync.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1541 = gptsync.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1542 = gptsync.marker
+@COND_emu_TRUE@am__append_1543 = halt.module
+@COND_emu_TRUE@am__append_1544 = halt.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1545 =
+@COND_emu_TRUE@am__append_1546 = $(nodist_halt_module_SOURCES)
+@COND_emu_TRUE@am__append_1547 = $(nodist_halt_module_SOURCES) \
+@COND_emu_TRUE@ halt.marker
+@COND_emu_TRUE@am__append_1548 = halt.mod
+@COND_emu_TRUE@am__append_1549 = halt.marker
+@COND_i386_pc_TRUE@am__append_1550 = halt.module
+@COND_i386_pc_TRUE@am__append_1551 = halt.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1552 =
+@COND_i386_pc_TRUE@am__append_1553 = $(nodist_halt_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1554 = $(nodist_halt_module_SOURCES) \
+@COND_i386_pc_TRUE@ halt.marker
+@COND_i386_pc_TRUE@am__append_1555 = halt.mod
+@COND_i386_pc_TRUE@am__append_1556 = halt.marker
+@COND_i386_efi_TRUE@am__append_1557 = halt.module
+@COND_i386_efi_TRUE@am__append_1558 = halt.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1559 =
+@COND_i386_efi_TRUE@am__append_1560 = $(nodist_halt_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1561 = $(nodist_halt_module_SOURCES) \
+@COND_i386_efi_TRUE@ halt.marker
+@COND_i386_efi_TRUE@am__append_1562 = halt.mod
+@COND_i386_efi_TRUE@am__append_1563 = halt.marker
+@COND_i386_qemu_TRUE@am__append_1564 = halt.module
+@COND_i386_qemu_TRUE@am__append_1565 = halt.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1566 =
+@COND_i386_qemu_TRUE@am__append_1567 = $(nodist_halt_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1568 = $(nodist_halt_module_SOURCES) \
+@COND_i386_qemu_TRUE@ halt.marker
+@COND_i386_qemu_TRUE@am__append_1569 = halt.mod
+@COND_i386_qemu_TRUE@am__append_1570 = halt.marker
+@COND_i386_coreboot_TRUE@am__append_1571 = halt.module
+@COND_i386_coreboot_TRUE@am__append_1572 = halt.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1573 =
+@COND_i386_coreboot_TRUE@am__append_1574 = $(nodist_halt_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1575 = \
+@COND_i386_coreboot_TRUE@ $(nodist_halt_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ halt.marker
+@COND_i386_coreboot_TRUE@am__append_1576 = halt.mod
+@COND_i386_coreboot_TRUE@am__append_1577 = halt.marker
+@COND_i386_multiboot_TRUE@am__append_1578 = halt.module
+@COND_i386_multiboot_TRUE@am__append_1579 = halt.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1580 =
+@COND_i386_multiboot_TRUE@am__append_1581 = $(nodist_halt_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1582 = \
+@COND_i386_multiboot_TRUE@ $(nodist_halt_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ halt.marker
+@COND_i386_multiboot_TRUE@am__append_1583 = halt.mod
+@COND_i386_multiboot_TRUE@am__append_1584 = halt.marker
+@COND_i386_ieee1275_TRUE@am__append_1585 = halt.module
+@COND_i386_ieee1275_TRUE@am__append_1586 = halt.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1587 =
+@COND_i386_ieee1275_TRUE@am__append_1588 = $(nodist_halt_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1589 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_halt_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ halt.marker
+@COND_i386_ieee1275_TRUE@am__append_1590 = halt.mod
+@COND_i386_ieee1275_TRUE@am__append_1591 = halt.marker
+@COND_x86_64_efi_TRUE@am__append_1592 = halt.module
+@COND_x86_64_efi_TRUE@am__append_1593 = halt.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1594 =
+@COND_x86_64_efi_TRUE@am__append_1595 = $(nodist_halt_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1596 = $(nodist_halt_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ halt.marker
+@COND_x86_64_efi_TRUE@am__append_1597 = halt.mod
+@COND_x86_64_efi_TRUE@am__append_1598 = halt.marker
+@COND_mips_yeeloong_TRUE@am__append_1599 = halt.module
+@COND_mips_yeeloong_TRUE@am__append_1600 = halt.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1601 =
+@COND_mips_yeeloong_TRUE@am__append_1602 = $(nodist_halt_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1603 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_halt_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ halt.marker
+@COND_mips_yeeloong_TRUE@am__append_1604 = halt.mod
+@COND_mips_yeeloong_TRUE@am__append_1605 = halt.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1606 = halt.module
+@COND_sparc64_ieee1275_TRUE@am__append_1607 = halt.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1608 =
+@COND_sparc64_ieee1275_TRUE@am__append_1609 = $(nodist_halt_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1610 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_halt_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ halt.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1611 = halt.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1612 = halt.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1613 = halt.module
+@COND_powerpc_ieee1275_TRUE@am__append_1614 = halt.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1615 =
+@COND_powerpc_ieee1275_TRUE@am__append_1616 = $(nodist_halt_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1617 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_halt_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ halt.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1618 = halt.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1619 = halt.marker
+@COND_emu_TRUE@am__append_1620 = hashsum.module
+@COND_emu_TRUE@am__append_1621 = hashsum.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1622 =
+@COND_emu_TRUE@am__append_1623 = $(nodist_hashsum_module_SOURCES)
+@COND_emu_TRUE@am__append_1624 = $(nodist_hashsum_module_SOURCES) \
+@COND_emu_TRUE@ hashsum.marker
+@COND_emu_TRUE@am__append_1625 = hashsum.mod
+@COND_emu_TRUE@am__append_1626 = hashsum.marker
+@COND_i386_pc_TRUE@am__append_1627 = hashsum.module
+@COND_i386_pc_TRUE@am__append_1628 = hashsum.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1629 =
+@COND_i386_pc_TRUE@am__append_1630 = $(nodist_hashsum_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1631 = $(nodist_hashsum_module_SOURCES) \
+@COND_i386_pc_TRUE@ hashsum.marker
+@COND_i386_pc_TRUE@am__append_1632 = hashsum.mod
+@COND_i386_pc_TRUE@am__append_1633 = hashsum.marker
+@COND_i386_efi_TRUE@am__append_1634 = hashsum.module
+@COND_i386_efi_TRUE@am__append_1635 = hashsum.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1636 =
+@COND_i386_efi_TRUE@am__append_1637 = $(nodist_hashsum_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1638 = \
+@COND_i386_efi_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_i386_efi_TRUE@ hashsum.marker
+@COND_i386_efi_TRUE@am__append_1639 = hashsum.mod
+@COND_i386_efi_TRUE@am__append_1640 = hashsum.marker
+@COND_i386_qemu_TRUE@am__append_1641 = hashsum.module
+@COND_i386_qemu_TRUE@am__append_1642 = hashsum.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1643 =
+@COND_i386_qemu_TRUE@am__append_1644 = $(nodist_hashsum_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1645 = \
+@COND_i386_qemu_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_i386_qemu_TRUE@ hashsum.marker
+@COND_i386_qemu_TRUE@am__append_1646 = hashsum.mod
+@COND_i386_qemu_TRUE@am__append_1647 = hashsum.marker
+@COND_i386_coreboot_TRUE@am__append_1648 = hashsum.module
+@COND_i386_coreboot_TRUE@am__append_1649 = hashsum.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1650 =
+@COND_i386_coreboot_TRUE@am__append_1651 = $(nodist_hashsum_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1652 = \
+@COND_i386_coreboot_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ hashsum.marker
+@COND_i386_coreboot_TRUE@am__append_1653 = hashsum.mod
+@COND_i386_coreboot_TRUE@am__append_1654 = hashsum.marker
+@COND_i386_multiboot_TRUE@am__append_1655 = hashsum.module
+@COND_i386_multiboot_TRUE@am__append_1656 = hashsum.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1657 =
+@COND_i386_multiboot_TRUE@am__append_1658 = $(nodist_hashsum_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1659 = \
+@COND_i386_multiboot_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ hashsum.marker
+@COND_i386_multiboot_TRUE@am__append_1660 = hashsum.mod
+@COND_i386_multiboot_TRUE@am__append_1661 = hashsum.marker
+@COND_i386_ieee1275_TRUE@am__append_1662 = hashsum.module
+@COND_i386_ieee1275_TRUE@am__append_1663 = hashsum.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1664 =
+@COND_i386_ieee1275_TRUE@am__append_1665 = $(nodist_hashsum_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1666 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ hashsum.marker
+@COND_i386_ieee1275_TRUE@am__append_1667 = hashsum.mod
+@COND_i386_ieee1275_TRUE@am__append_1668 = hashsum.marker
+@COND_x86_64_efi_TRUE@am__append_1669 = hashsum.module
+@COND_x86_64_efi_TRUE@am__append_1670 = hashsum.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1671 =
+@COND_x86_64_efi_TRUE@am__append_1672 = $(nodist_hashsum_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1673 = \
+@COND_x86_64_efi_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ hashsum.marker
+@COND_x86_64_efi_TRUE@am__append_1674 = hashsum.mod
+@COND_x86_64_efi_TRUE@am__append_1675 = hashsum.marker
+@COND_mips_yeeloong_TRUE@am__append_1676 = hashsum.module
+@COND_mips_yeeloong_TRUE@am__append_1677 = hashsum.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1678 =
+@COND_mips_yeeloong_TRUE@am__append_1679 = $(nodist_hashsum_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1680 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ hashsum.marker
+@COND_mips_yeeloong_TRUE@am__append_1681 = hashsum.mod
+@COND_mips_yeeloong_TRUE@am__append_1682 = hashsum.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1683 = hashsum.module
+@COND_sparc64_ieee1275_TRUE@am__append_1684 = hashsum.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1685 =
+@COND_sparc64_ieee1275_TRUE@am__append_1686 = $(nodist_hashsum_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1687 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ hashsum.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1688 = hashsum.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1689 = hashsum.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1690 = hashsum.module
+@COND_powerpc_ieee1275_TRUE@am__append_1691 = hashsum.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1692 =
+@COND_powerpc_ieee1275_TRUE@am__append_1693 = $(nodist_hashsum_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1694 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_hashsum_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ hashsum.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1695 = hashsum.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1696 = hashsum.marker
+@COND_i386_pc_TRUE@am__append_1697 = hdparm.module
+@COND_i386_pc_TRUE@am__append_1698 = hdparm.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1699 =
+@COND_i386_pc_TRUE@am__append_1700 = $(nodist_hdparm_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1701 = $(nodist_hdparm_module_SOURCES) \
+@COND_i386_pc_TRUE@ hdparm.marker
+@COND_i386_pc_TRUE@am__append_1702 = hdparm.mod
+@COND_i386_pc_TRUE@am__append_1703 = hdparm.marker
+@COND_i386_efi_TRUE@am__append_1704 = hdparm.module
+@COND_i386_efi_TRUE@am__append_1705 = hdparm.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1706 =
+@COND_i386_efi_TRUE@am__append_1707 = $(nodist_hdparm_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1708 = $(nodist_hdparm_module_SOURCES) \
+@COND_i386_efi_TRUE@ hdparm.marker
+@COND_i386_efi_TRUE@am__append_1709 = hdparm.mod
+@COND_i386_efi_TRUE@am__append_1710 = hdparm.marker
+@COND_i386_qemu_TRUE@am__append_1711 = hdparm.module
+@COND_i386_qemu_TRUE@am__append_1712 = hdparm.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1713 =
+@COND_i386_qemu_TRUE@am__append_1714 = $(nodist_hdparm_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1715 = \
+@COND_i386_qemu_TRUE@ $(nodist_hdparm_module_SOURCES) \
+@COND_i386_qemu_TRUE@ hdparm.marker
+@COND_i386_qemu_TRUE@am__append_1716 = hdparm.mod
+@COND_i386_qemu_TRUE@am__append_1717 = hdparm.marker
+@COND_i386_coreboot_TRUE@am__append_1718 = hdparm.module
+@COND_i386_coreboot_TRUE@am__append_1719 = hdparm.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1720 =
+@COND_i386_coreboot_TRUE@am__append_1721 = $(nodist_hdparm_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1722 = \
+@COND_i386_coreboot_TRUE@ $(nodist_hdparm_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ hdparm.marker
+@COND_i386_coreboot_TRUE@am__append_1723 = hdparm.mod
+@COND_i386_coreboot_TRUE@am__append_1724 = hdparm.marker
+@COND_i386_multiboot_TRUE@am__append_1725 = hdparm.module
+@COND_i386_multiboot_TRUE@am__append_1726 = hdparm.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1727 =
+@COND_i386_multiboot_TRUE@am__append_1728 = $(nodist_hdparm_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1729 = \
+@COND_i386_multiboot_TRUE@ $(nodist_hdparm_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ hdparm.marker
+@COND_i386_multiboot_TRUE@am__append_1730 = hdparm.mod
+@COND_i386_multiboot_TRUE@am__append_1731 = hdparm.marker
+@COND_i386_ieee1275_TRUE@am__append_1732 = hdparm.module
+@COND_i386_ieee1275_TRUE@am__append_1733 = hdparm.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1734 =
+@COND_i386_ieee1275_TRUE@am__append_1735 = $(nodist_hdparm_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1736 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_hdparm_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ hdparm.marker
+@COND_i386_ieee1275_TRUE@am__append_1737 = hdparm.mod
+@COND_i386_ieee1275_TRUE@am__append_1738 = hdparm.marker
+@COND_x86_64_efi_TRUE@am__append_1739 = hdparm.module
+@COND_x86_64_efi_TRUE@am__append_1740 = hdparm.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1741 =
+@COND_x86_64_efi_TRUE@am__append_1742 = $(nodist_hdparm_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1743 = \
+@COND_x86_64_efi_TRUE@ $(nodist_hdparm_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ hdparm.marker
+@COND_x86_64_efi_TRUE@am__append_1744 = hdparm.mod
+@COND_x86_64_efi_TRUE@am__append_1745 = hdparm.marker
+@COND_mips_yeeloong_TRUE@am__append_1746 = hdparm.module
+@COND_mips_yeeloong_TRUE@am__append_1747 = hdparm.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1748 =
+@COND_mips_yeeloong_TRUE@am__append_1749 = $(nodist_hdparm_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1750 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_hdparm_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ hdparm.marker
+@COND_mips_yeeloong_TRUE@am__append_1751 = hdparm.mod
+@COND_mips_yeeloong_TRUE@am__append_1752 = hdparm.marker
+@COND_emu_TRUE@am__append_1753 = help.module
+@COND_emu_TRUE@am__append_1754 = help.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1755 =
+@COND_emu_TRUE@am__append_1756 = $(nodist_help_module_SOURCES)
+@COND_emu_TRUE@am__append_1757 = $(nodist_help_module_SOURCES) \
+@COND_emu_TRUE@ help.marker
+@COND_emu_TRUE@am__append_1758 = help.mod
+@COND_emu_TRUE@am__append_1759 = help.marker
+@COND_i386_pc_TRUE@am__append_1760 = help.module
+@COND_i386_pc_TRUE@am__append_1761 = help.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1762 =
+@COND_i386_pc_TRUE@am__append_1763 = $(nodist_help_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1764 = $(nodist_help_module_SOURCES) \
+@COND_i386_pc_TRUE@ help.marker
+@COND_i386_pc_TRUE@am__append_1765 = help.mod
+@COND_i386_pc_TRUE@am__append_1766 = help.marker
+@COND_i386_efi_TRUE@am__append_1767 = help.module
+@COND_i386_efi_TRUE@am__append_1768 = help.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1769 =
+@COND_i386_efi_TRUE@am__append_1770 = $(nodist_help_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1771 = $(nodist_help_module_SOURCES) \
+@COND_i386_efi_TRUE@ help.marker
+@COND_i386_efi_TRUE@am__append_1772 = help.mod
+@COND_i386_efi_TRUE@am__append_1773 = help.marker
+@COND_i386_qemu_TRUE@am__append_1774 = help.module
+@COND_i386_qemu_TRUE@am__append_1775 = help.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1776 =
+@COND_i386_qemu_TRUE@am__append_1777 = $(nodist_help_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1778 = $(nodist_help_module_SOURCES) \
+@COND_i386_qemu_TRUE@ help.marker
+@COND_i386_qemu_TRUE@am__append_1779 = help.mod
+@COND_i386_qemu_TRUE@am__append_1780 = help.marker
+@COND_i386_coreboot_TRUE@am__append_1781 = help.module
+@COND_i386_coreboot_TRUE@am__append_1782 = help.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1783 =
+@COND_i386_coreboot_TRUE@am__append_1784 = $(nodist_help_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1785 = \
+@COND_i386_coreboot_TRUE@ $(nodist_help_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ help.marker
+@COND_i386_coreboot_TRUE@am__append_1786 = help.mod
+@COND_i386_coreboot_TRUE@am__append_1787 = help.marker
+@COND_i386_multiboot_TRUE@am__append_1788 = help.module
+@COND_i386_multiboot_TRUE@am__append_1789 = help.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1790 =
+@COND_i386_multiboot_TRUE@am__append_1791 = $(nodist_help_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1792 = \
+@COND_i386_multiboot_TRUE@ $(nodist_help_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ help.marker
+@COND_i386_multiboot_TRUE@am__append_1793 = help.mod
+@COND_i386_multiboot_TRUE@am__append_1794 = help.marker
+@COND_i386_ieee1275_TRUE@am__append_1795 = help.module
+@COND_i386_ieee1275_TRUE@am__append_1796 = help.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1797 =
+@COND_i386_ieee1275_TRUE@am__append_1798 = $(nodist_help_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1799 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_help_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ help.marker
+@COND_i386_ieee1275_TRUE@am__append_1800 = help.mod
+@COND_i386_ieee1275_TRUE@am__append_1801 = help.marker
+@COND_x86_64_efi_TRUE@am__append_1802 = help.module
+@COND_x86_64_efi_TRUE@am__append_1803 = help.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1804 =
+@COND_x86_64_efi_TRUE@am__append_1805 = $(nodist_help_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1806 = $(nodist_help_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ help.marker
+@COND_x86_64_efi_TRUE@am__append_1807 = help.mod
+@COND_x86_64_efi_TRUE@am__append_1808 = help.marker
+@COND_mips_yeeloong_TRUE@am__append_1809 = help.module
+@COND_mips_yeeloong_TRUE@am__append_1810 = help.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1811 =
+@COND_mips_yeeloong_TRUE@am__append_1812 = $(nodist_help_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1813 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_help_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ help.marker
+@COND_mips_yeeloong_TRUE@am__append_1814 = help.mod
+@COND_mips_yeeloong_TRUE@am__append_1815 = help.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1816 = help.module
+@COND_sparc64_ieee1275_TRUE@am__append_1817 = help.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1818 =
+@COND_sparc64_ieee1275_TRUE@am__append_1819 = $(nodist_help_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1820 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_help_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ help.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1821 = help.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1822 = help.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1823 = help.module
+@COND_powerpc_ieee1275_TRUE@am__append_1824 = help.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1825 =
+@COND_powerpc_ieee1275_TRUE@am__append_1826 = $(nodist_help_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1827 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_help_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ help.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1828 = help.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1829 = help.marker
+@COND_emu_TRUE@am__append_1830 = hexdump.module
+@COND_emu_TRUE@am__append_1831 = hexdump.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1832 =
+@COND_emu_TRUE@am__append_1833 = $(nodist_hexdump_module_SOURCES)
+@COND_emu_TRUE@am__append_1834 = $(nodist_hexdump_module_SOURCES) \
+@COND_emu_TRUE@ hexdump.marker
+@COND_emu_TRUE@am__append_1835 = hexdump.mod
+@COND_emu_TRUE@am__append_1836 = hexdump.marker
+@COND_i386_pc_TRUE@am__append_1837 = hexdump.module
+@COND_i386_pc_TRUE@am__append_1838 = hexdump.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1839 =
+@COND_i386_pc_TRUE@am__append_1840 = $(nodist_hexdump_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1841 = $(nodist_hexdump_module_SOURCES) \
+@COND_i386_pc_TRUE@ hexdump.marker
+@COND_i386_pc_TRUE@am__append_1842 = hexdump.mod
+@COND_i386_pc_TRUE@am__append_1843 = hexdump.marker
+@COND_i386_efi_TRUE@am__append_1844 = hexdump.module
+@COND_i386_efi_TRUE@am__append_1845 = hexdump.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1846 =
+@COND_i386_efi_TRUE@am__append_1847 = $(nodist_hexdump_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1848 = \
+@COND_i386_efi_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_i386_efi_TRUE@ hexdump.marker
+@COND_i386_efi_TRUE@am__append_1849 = hexdump.mod
+@COND_i386_efi_TRUE@am__append_1850 = hexdump.marker
+@COND_i386_qemu_TRUE@am__append_1851 = hexdump.module
+@COND_i386_qemu_TRUE@am__append_1852 = hexdump.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1853 =
+@COND_i386_qemu_TRUE@am__append_1854 = $(nodist_hexdump_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1855 = \
+@COND_i386_qemu_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_i386_qemu_TRUE@ hexdump.marker
+@COND_i386_qemu_TRUE@am__append_1856 = hexdump.mod
+@COND_i386_qemu_TRUE@am__append_1857 = hexdump.marker
+@COND_i386_coreboot_TRUE@am__append_1858 = hexdump.module
+@COND_i386_coreboot_TRUE@am__append_1859 = hexdump.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1860 =
+@COND_i386_coreboot_TRUE@am__append_1861 = $(nodist_hexdump_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1862 = \
+@COND_i386_coreboot_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ hexdump.marker
+@COND_i386_coreboot_TRUE@am__append_1863 = hexdump.mod
+@COND_i386_coreboot_TRUE@am__append_1864 = hexdump.marker
+@COND_i386_multiboot_TRUE@am__append_1865 = hexdump.module
+@COND_i386_multiboot_TRUE@am__append_1866 = hexdump.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1867 =
+@COND_i386_multiboot_TRUE@am__append_1868 = $(nodist_hexdump_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1869 = \
+@COND_i386_multiboot_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ hexdump.marker
+@COND_i386_multiboot_TRUE@am__append_1870 = hexdump.mod
+@COND_i386_multiboot_TRUE@am__append_1871 = hexdump.marker
+@COND_i386_ieee1275_TRUE@am__append_1872 = hexdump.module
+@COND_i386_ieee1275_TRUE@am__append_1873 = hexdump.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1874 =
+@COND_i386_ieee1275_TRUE@am__append_1875 = $(nodist_hexdump_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1876 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ hexdump.marker
+@COND_i386_ieee1275_TRUE@am__append_1877 = hexdump.mod
+@COND_i386_ieee1275_TRUE@am__append_1878 = hexdump.marker
+@COND_x86_64_efi_TRUE@am__append_1879 = hexdump.module
+@COND_x86_64_efi_TRUE@am__append_1880 = hexdump.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1881 =
+@COND_x86_64_efi_TRUE@am__append_1882 = $(nodist_hexdump_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1883 = \
+@COND_x86_64_efi_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ hexdump.marker
+@COND_x86_64_efi_TRUE@am__append_1884 = hexdump.mod
+@COND_x86_64_efi_TRUE@am__append_1885 = hexdump.marker
+@COND_mips_yeeloong_TRUE@am__append_1886 = hexdump.module
+@COND_mips_yeeloong_TRUE@am__append_1887 = hexdump.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1888 =
+@COND_mips_yeeloong_TRUE@am__append_1889 = $(nodist_hexdump_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1890 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ hexdump.marker
+@COND_mips_yeeloong_TRUE@am__append_1891 = hexdump.mod
+@COND_mips_yeeloong_TRUE@am__append_1892 = hexdump.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1893 = hexdump.module
+@COND_sparc64_ieee1275_TRUE@am__append_1894 = hexdump.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1895 =
+@COND_sparc64_ieee1275_TRUE@am__append_1896 = $(nodist_hexdump_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1897 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ hexdump.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1898 = hexdump.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1899 = hexdump.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1900 = hexdump.module
+@COND_powerpc_ieee1275_TRUE@am__append_1901 = hexdump.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1902 =
+@COND_powerpc_ieee1275_TRUE@am__append_1903 = $(nodist_hexdump_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1904 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_hexdump_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ hexdump.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1905 = hexdump.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1906 = hexdump.marker
+@COND_emu_TRUE@am__append_1907 = keystatus.module
+@COND_emu_TRUE@am__append_1908 = keystatus.module$(EXEEXT)
+@COND_emu_TRUE@am__append_1909 =
+@COND_emu_TRUE@am__append_1910 = $(nodist_keystatus_module_SOURCES)
+@COND_emu_TRUE@am__append_1911 = $(nodist_keystatus_module_SOURCES) \
+@COND_emu_TRUE@ keystatus.marker
+@COND_emu_TRUE@am__append_1912 = keystatus.mod
+@COND_emu_TRUE@am__append_1913 = keystatus.marker
+@COND_i386_pc_TRUE@am__append_1914 = keystatus.module
+@COND_i386_pc_TRUE@am__append_1915 = keystatus.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_1916 =
+@COND_i386_pc_TRUE@am__append_1917 = $(nodist_keystatus_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_1918 = \
+@COND_i386_pc_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_i386_pc_TRUE@ keystatus.marker
+@COND_i386_pc_TRUE@am__append_1919 = keystatus.mod
+@COND_i386_pc_TRUE@am__append_1920 = keystatus.marker
+@COND_i386_efi_TRUE@am__append_1921 = keystatus.module
+@COND_i386_efi_TRUE@am__append_1922 = keystatus.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1923 =
+@COND_i386_efi_TRUE@am__append_1924 = $(nodist_keystatus_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1925 = \
+@COND_i386_efi_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_i386_efi_TRUE@ keystatus.marker
+@COND_i386_efi_TRUE@am__append_1926 = keystatus.mod
+@COND_i386_efi_TRUE@am__append_1927 = keystatus.marker
+@COND_i386_qemu_TRUE@am__append_1928 = keystatus.module
+@COND_i386_qemu_TRUE@am__append_1929 = keystatus.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_1930 =
+@COND_i386_qemu_TRUE@am__append_1931 = $(nodist_keystatus_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_1932 = \
+@COND_i386_qemu_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_i386_qemu_TRUE@ keystatus.marker
+@COND_i386_qemu_TRUE@am__append_1933 = keystatus.mod
+@COND_i386_qemu_TRUE@am__append_1934 = keystatus.marker
+@COND_i386_coreboot_TRUE@am__append_1935 = keystatus.module
+@COND_i386_coreboot_TRUE@am__append_1936 = keystatus.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_1937 =
+@COND_i386_coreboot_TRUE@am__append_1938 = $(nodist_keystatus_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_1939 = \
+@COND_i386_coreboot_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ keystatus.marker
+@COND_i386_coreboot_TRUE@am__append_1940 = keystatus.mod
+@COND_i386_coreboot_TRUE@am__append_1941 = keystatus.marker
+@COND_i386_multiboot_TRUE@am__append_1942 = keystatus.module
+@COND_i386_multiboot_TRUE@am__append_1943 = keystatus.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_1944 =
+@COND_i386_multiboot_TRUE@am__append_1945 = $(nodist_keystatus_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_1946 = \
+@COND_i386_multiboot_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ keystatus.marker
+@COND_i386_multiboot_TRUE@am__append_1947 = keystatus.mod
+@COND_i386_multiboot_TRUE@am__append_1948 = keystatus.marker
+@COND_i386_ieee1275_TRUE@am__append_1949 = keystatus.module
+@COND_i386_ieee1275_TRUE@am__append_1950 = keystatus.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_1951 =
+@COND_i386_ieee1275_TRUE@am__append_1952 = $(nodist_keystatus_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_1953 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ keystatus.marker
+@COND_i386_ieee1275_TRUE@am__append_1954 = keystatus.mod
+@COND_i386_ieee1275_TRUE@am__append_1955 = keystatus.marker
+@COND_x86_64_efi_TRUE@am__append_1956 = keystatus.module
+@COND_x86_64_efi_TRUE@am__append_1957 = keystatus.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1958 =
+@COND_x86_64_efi_TRUE@am__append_1959 = $(nodist_keystatus_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1960 = \
+@COND_x86_64_efi_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ keystatus.marker
+@COND_x86_64_efi_TRUE@am__append_1961 = keystatus.mod
+@COND_x86_64_efi_TRUE@am__append_1962 = keystatus.marker
+@COND_mips_yeeloong_TRUE@am__append_1963 = keystatus.module
+@COND_mips_yeeloong_TRUE@am__append_1964 = keystatus.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_1965 =
+@COND_mips_yeeloong_TRUE@am__append_1966 = $(nodist_keystatus_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_1967 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_keystatus_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ keystatus.marker
+@COND_mips_yeeloong_TRUE@am__append_1968 = keystatus.mod
+@COND_mips_yeeloong_TRUE@am__append_1969 = keystatus.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1970 = keystatus.module
+@COND_sparc64_ieee1275_TRUE@am__append_1971 = keystatus.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_1972 =
+@COND_sparc64_ieee1275_TRUE@am__append_1973 = $(nodist_keystatus_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_1974 = $(nodist_keystatus_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ keystatus.marker
+@COND_sparc64_ieee1275_TRUE@am__append_1975 = keystatus.mod
+@COND_sparc64_ieee1275_TRUE@am__append_1976 = keystatus.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1977 = keystatus.module
+@COND_powerpc_ieee1275_TRUE@am__append_1978 = keystatus.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_1979 =
+@COND_powerpc_ieee1275_TRUE@am__append_1980 = $(nodist_keystatus_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_1981 = $(nodist_keystatus_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ keystatus.marker
+@COND_powerpc_ieee1275_TRUE@am__append_1982 = keystatus.mod
+@COND_powerpc_ieee1275_TRUE@am__append_1983 = keystatus.marker
+@COND_i386_efi_TRUE@am__append_1984 = loadbios.module
+@COND_i386_efi_TRUE@am__append_1985 = loadbios.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_1986 =
+@COND_i386_efi_TRUE@am__append_1987 = $(nodist_loadbios_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_1988 = \
+@COND_i386_efi_TRUE@ $(nodist_loadbios_module_SOURCES) \
+@COND_i386_efi_TRUE@ loadbios.marker
+@COND_i386_efi_TRUE@am__append_1989 = loadbios.mod
+@COND_i386_efi_TRUE@am__append_1990 = loadbios.marker
+@COND_x86_64_efi_TRUE@am__append_1991 = loadbios.module
+@COND_x86_64_efi_TRUE@am__append_1992 = loadbios.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_1993 =
+@COND_x86_64_efi_TRUE@am__append_1994 = $(nodist_loadbios_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_1995 = \
+@COND_x86_64_efi_TRUE@ $(nodist_loadbios_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ loadbios.marker
+@COND_x86_64_efi_TRUE@am__append_1996 = loadbios.mod
+@COND_x86_64_efi_TRUE@am__append_1997 = loadbios.marker
+@COND_emu_TRUE@am__append_1998 = loadenv.module
+@COND_emu_TRUE@am__append_1999 = loadenv.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2000 =
+@COND_emu_TRUE@am__append_2001 = $(nodist_loadenv_module_SOURCES)
+@COND_emu_TRUE@am__append_2002 = $(nodist_loadenv_module_SOURCES) \
+@COND_emu_TRUE@ loadenv.marker
+@COND_emu_TRUE@am__append_2003 = loadenv.mod
+@COND_emu_TRUE@am__append_2004 = loadenv.marker
+@COND_i386_pc_TRUE@am__append_2005 = loadenv.module
+@COND_i386_pc_TRUE@am__append_2006 = loadenv.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2007 =
+@COND_i386_pc_TRUE@am__append_2008 = $(nodist_loadenv_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2009 = $(nodist_loadenv_module_SOURCES) \
+@COND_i386_pc_TRUE@ loadenv.marker
+@COND_i386_pc_TRUE@am__append_2010 = loadenv.mod
+@COND_i386_pc_TRUE@am__append_2011 = loadenv.marker
+@COND_i386_efi_TRUE@am__append_2012 = loadenv.module
+@COND_i386_efi_TRUE@am__append_2013 = loadenv.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2014 =
+@COND_i386_efi_TRUE@am__append_2015 = $(nodist_loadenv_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2016 = \
+@COND_i386_efi_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_i386_efi_TRUE@ loadenv.marker
+@COND_i386_efi_TRUE@am__append_2017 = loadenv.mod
+@COND_i386_efi_TRUE@am__append_2018 = loadenv.marker
+@COND_i386_qemu_TRUE@am__append_2019 = loadenv.module
+@COND_i386_qemu_TRUE@am__append_2020 = loadenv.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2021 =
+@COND_i386_qemu_TRUE@am__append_2022 = $(nodist_loadenv_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2023 = \
+@COND_i386_qemu_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_i386_qemu_TRUE@ loadenv.marker
+@COND_i386_qemu_TRUE@am__append_2024 = loadenv.mod
+@COND_i386_qemu_TRUE@am__append_2025 = loadenv.marker
+@COND_i386_coreboot_TRUE@am__append_2026 = loadenv.module
+@COND_i386_coreboot_TRUE@am__append_2027 = loadenv.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2028 =
+@COND_i386_coreboot_TRUE@am__append_2029 = $(nodist_loadenv_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2030 = \
+@COND_i386_coreboot_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ loadenv.marker
+@COND_i386_coreboot_TRUE@am__append_2031 = loadenv.mod
+@COND_i386_coreboot_TRUE@am__append_2032 = loadenv.marker
+@COND_i386_multiboot_TRUE@am__append_2033 = loadenv.module
+@COND_i386_multiboot_TRUE@am__append_2034 = loadenv.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2035 =
+@COND_i386_multiboot_TRUE@am__append_2036 = $(nodist_loadenv_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2037 = \
+@COND_i386_multiboot_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ loadenv.marker
+@COND_i386_multiboot_TRUE@am__append_2038 = loadenv.mod
+@COND_i386_multiboot_TRUE@am__append_2039 = loadenv.marker
+@COND_i386_ieee1275_TRUE@am__append_2040 = loadenv.module
+@COND_i386_ieee1275_TRUE@am__append_2041 = loadenv.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2042 =
+@COND_i386_ieee1275_TRUE@am__append_2043 = $(nodist_loadenv_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2044 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ loadenv.marker
+@COND_i386_ieee1275_TRUE@am__append_2045 = loadenv.mod
+@COND_i386_ieee1275_TRUE@am__append_2046 = loadenv.marker
+@COND_x86_64_efi_TRUE@am__append_2047 = loadenv.module
+@COND_x86_64_efi_TRUE@am__append_2048 = loadenv.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2049 =
+@COND_x86_64_efi_TRUE@am__append_2050 = $(nodist_loadenv_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2051 = \
+@COND_x86_64_efi_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ loadenv.marker
+@COND_x86_64_efi_TRUE@am__append_2052 = loadenv.mod
+@COND_x86_64_efi_TRUE@am__append_2053 = loadenv.marker
+@COND_mips_yeeloong_TRUE@am__append_2054 = loadenv.module
+@COND_mips_yeeloong_TRUE@am__append_2055 = loadenv.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2056 =
+@COND_mips_yeeloong_TRUE@am__append_2057 = $(nodist_loadenv_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2058 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ loadenv.marker
+@COND_mips_yeeloong_TRUE@am__append_2059 = loadenv.mod
+@COND_mips_yeeloong_TRUE@am__append_2060 = loadenv.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2061 = loadenv.module
+@COND_sparc64_ieee1275_TRUE@am__append_2062 = loadenv.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2063 =
+@COND_sparc64_ieee1275_TRUE@am__append_2064 = $(nodist_loadenv_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2065 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ loadenv.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2066 = loadenv.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2067 = loadenv.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2068 = loadenv.module
+@COND_powerpc_ieee1275_TRUE@am__append_2069 = loadenv.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2070 =
+@COND_powerpc_ieee1275_TRUE@am__append_2071 = $(nodist_loadenv_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2072 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_loadenv_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ loadenv.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2073 = loadenv.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2074 = loadenv.marker
+@COND_emu_TRUE@am__append_2075 = ls.module
+@COND_emu_TRUE@am__append_2076 = ls.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2077 =
+@COND_emu_TRUE@am__append_2078 = $(nodist_ls_module_SOURCES)
+@COND_emu_TRUE@am__append_2079 = $(nodist_ls_module_SOURCES) ls.marker
+@COND_emu_TRUE@am__append_2080 = ls.mod
+@COND_emu_TRUE@am__append_2081 = ls.marker
+@COND_i386_pc_TRUE@am__append_2082 = ls.module
+@COND_i386_pc_TRUE@am__append_2083 = ls.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2084 =
+@COND_i386_pc_TRUE@am__append_2085 = $(nodist_ls_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2086 = $(nodist_ls_module_SOURCES) \
+@COND_i386_pc_TRUE@ ls.marker
+@COND_i386_pc_TRUE@am__append_2087 = ls.mod
+@COND_i386_pc_TRUE@am__append_2088 = ls.marker
+@COND_i386_efi_TRUE@am__append_2089 = ls.module
+@COND_i386_efi_TRUE@am__append_2090 = ls.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2091 =
+@COND_i386_efi_TRUE@am__append_2092 = $(nodist_ls_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2093 = $(nodist_ls_module_SOURCES) \
+@COND_i386_efi_TRUE@ ls.marker
+@COND_i386_efi_TRUE@am__append_2094 = ls.mod
+@COND_i386_efi_TRUE@am__append_2095 = ls.marker
+@COND_i386_qemu_TRUE@am__append_2096 = ls.module
+@COND_i386_qemu_TRUE@am__append_2097 = ls.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2098 =
+@COND_i386_qemu_TRUE@am__append_2099 = $(nodist_ls_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2100 = $(nodist_ls_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ls.marker
+@COND_i386_qemu_TRUE@am__append_2101 = ls.mod
+@COND_i386_qemu_TRUE@am__append_2102 = ls.marker
+@COND_i386_coreboot_TRUE@am__append_2103 = ls.module
+@COND_i386_coreboot_TRUE@am__append_2104 = ls.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2105 =
+@COND_i386_coreboot_TRUE@am__append_2106 = $(nodist_ls_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2107 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ls_module_SOURCES) ls.marker
+@COND_i386_coreboot_TRUE@am__append_2108 = ls.mod
+@COND_i386_coreboot_TRUE@am__append_2109 = ls.marker
+@COND_i386_multiboot_TRUE@am__append_2110 = ls.module
+@COND_i386_multiboot_TRUE@am__append_2111 = ls.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2112 =
+@COND_i386_multiboot_TRUE@am__append_2113 = $(nodist_ls_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2114 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ls_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ls.marker
+@COND_i386_multiboot_TRUE@am__append_2115 = ls.mod
+@COND_i386_multiboot_TRUE@am__append_2116 = ls.marker
+@COND_i386_ieee1275_TRUE@am__append_2117 = ls.module
+@COND_i386_ieee1275_TRUE@am__append_2118 = ls.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2119 =
+@COND_i386_ieee1275_TRUE@am__append_2120 = $(nodist_ls_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2121 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ls_module_SOURCES) ls.marker
+@COND_i386_ieee1275_TRUE@am__append_2122 = ls.mod
+@COND_i386_ieee1275_TRUE@am__append_2123 = ls.marker
+@COND_x86_64_efi_TRUE@am__append_2124 = ls.module
+@COND_x86_64_efi_TRUE@am__append_2125 = ls.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2126 =
+@COND_x86_64_efi_TRUE@am__append_2127 = $(nodist_ls_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2128 = $(nodist_ls_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ls.marker
+@COND_x86_64_efi_TRUE@am__append_2129 = ls.mod
+@COND_x86_64_efi_TRUE@am__append_2130 = ls.marker
+@COND_mips_yeeloong_TRUE@am__append_2131 = ls.module
+@COND_mips_yeeloong_TRUE@am__append_2132 = ls.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2133 =
+@COND_mips_yeeloong_TRUE@am__append_2134 = $(nodist_ls_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2135 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ls_module_SOURCES) ls.marker
+@COND_mips_yeeloong_TRUE@am__append_2136 = ls.mod
+@COND_mips_yeeloong_TRUE@am__append_2137 = ls.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2138 = ls.module
+@COND_sparc64_ieee1275_TRUE@am__append_2139 = ls.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2140 =
+@COND_sparc64_ieee1275_TRUE@am__append_2141 = $(nodist_ls_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2142 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_ls_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ ls.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2143 = ls.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2144 = ls.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2145 = ls.module
+@COND_powerpc_ieee1275_TRUE@am__append_2146 = ls.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2147 =
+@COND_powerpc_ieee1275_TRUE@am__append_2148 = $(nodist_ls_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2149 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ls_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ ls.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2150 = ls.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2151 = ls.marker
+@COND_emu_TRUE@am__append_2152 = lsmmap.module
+@COND_emu_TRUE@am__append_2153 = lsmmap.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2154 =
+@COND_emu_TRUE@am__append_2155 = $(nodist_lsmmap_module_SOURCES)
+@COND_emu_TRUE@am__append_2156 = $(nodist_lsmmap_module_SOURCES) \
+@COND_emu_TRUE@ lsmmap.marker
+@COND_emu_TRUE@am__append_2157 = lsmmap.mod
+@COND_emu_TRUE@am__append_2158 = lsmmap.marker
+@COND_i386_pc_TRUE@am__append_2159 = lsmmap.module
+@COND_i386_pc_TRUE@am__append_2160 = lsmmap.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2161 =
+@COND_i386_pc_TRUE@am__append_2162 = $(nodist_lsmmap_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2163 = $(nodist_lsmmap_module_SOURCES) \
+@COND_i386_pc_TRUE@ lsmmap.marker
+@COND_i386_pc_TRUE@am__append_2164 = lsmmap.mod
+@COND_i386_pc_TRUE@am__append_2165 = lsmmap.marker
+@COND_i386_efi_TRUE@am__append_2166 = lsmmap.module
+@COND_i386_efi_TRUE@am__append_2167 = lsmmap.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2168 =
+@COND_i386_efi_TRUE@am__append_2169 = $(nodist_lsmmap_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2170 = $(nodist_lsmmap_module_SOURCES) \
+@COND_i386_efi_TRUE@ lsmmap.marker
+@COND_i386_efi_TRUE@am__append_2171 = lsmmap.mod
+@COND_i386_efi_TRUE@am__append_2172 = lsmmap.marker
+@COND_i386_qemu_TRUE@am__append_2173 = lsmmap.module
+@COND_i386_qemu_TRUE@am__append_2174 = lsmmap.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2175 =
+@COND_i386_qemu_TRUE@am__append_2176 = $(nodist_lsmmap_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2177 = \
+@COND_i386_qemu_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_i386_qemu_TRUE@ lsmmap.marker
+@COND_i386_qemu_TRUE@am__append_2178 = lsmmap.mod
+@COND_i386_qemu_TRUE@am__append_2179 = lsmmap.marker
+@COND_i386_coreboot_TRUE@am__append_2180 = lsmmap.module
+@COND_i386_coreboot_TRUE@am__append_2181 = lsmmap.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2182 =
+@COND_i386_coreboot_TRUE@am__append_2183 = $(nodist_lsmmap_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2184 = \
+@COND_i386_coreboot_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ lsmmap.marker
+@COND_i386_coreboot_TRUE@am__append_2185 = lsmmap.mod
+@COND_i386_coreboot_TRUE@am__append_2186 = lsmmap.marker
+@COND_i386_multiboot_TRUE@am__append_2187 = lsmmap.module
+@COND_i386_multiboot_TRUE@am__append_2188 = lsmmap.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2189 =
+@COND_i386_multiboot_TRUE@am__append_2190 = $(nodist_lsmmap_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2191 = \
+@COND_i386_multiboot_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ lsmmap.marker
+@COND_i386_multiboot_TRUE@am__append_2192 = lsmmap.mod
+@COND_i386_multiboot_TRUE@am__append_2193 = lsmmap.marker
+@COND_i386_ieee1275_TRUE@am__append_2194 = lsmmap.module
+@COND_i386_ieee1275_TRUE@am__append_2195 = lsmmap.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2196 =
+@COND_i386_ieee1275_TRUE@am__append_2197 = $(nodist_lsmmap_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2198 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ lsmmap.marker
+@COND_i386_ieee1275_TRUE@am__append_2199 = lsmmap.mod
+@COND_i386_ieee1275_TRUE@am__append_2200 = lsmmap.marker
+@COND_x86_64_efi_TRUE@am__append_2201 = lsmmap.module
+@COND_x86_64_efi_TRUE@am__append_2202 = lsmmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2203 =
+@COND_x86_64_efi_TRUE@am__append_2204 = $(nodist_lsmmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2205 = \
+@COND_x86_64_efi_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ lsmmap.marker
+@COND_x86_64_efi_TRUE@am__append_2206 = lsmmap.mod
+@COND_x86_64_efi_TRUE@am__append_2207 = lsmmap.marker
+@COND_mips_yeeloong_TRUE@am__append_2208 = lsmmap.module
+@COND_mips_yeeloong_TRUE@am__append_2209 = lsmmap.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2210 =
+@COND_mips_yeeloong_TRUE@am__append_2211 = $(nodist_lsmmap_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2212 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ lsmmap.marker
+@COND_mips_yeeloong_TRUE@am__append_2213 = lsmmap.mod
+@COND_mips_yeeloong_TRUE@am__append_2214 = lsmmap.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2215 = lsmmap.module
+@COND_sparc64_ieee1275_TRUE@am__append_2216 = lsmmap.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2217 =
+@COND_sparc64_ieee1275_TRUE@am__append_2218 = $(nodist_lsmmap_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2219 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ lsmmap.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2220 = lsmmap.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2221 = lsmmap.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2222 = lsmmap.module
+@COND_powerpc_ieee1275_TRUE@am__append_2223 = lsmmap.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2224 =
+@COND_powerpc_ieee1275_TRUE@am__append_2225 = $(nodist_lsmmap_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2226 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_lsmmap_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ lsmmap.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2227 = lsmmap.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2228 = lsmmap.marker
+@COND_i386_pc_TRUE@am__append_2229 = lspci.module
+@COND_i386_pc_TRUE@am__append_2230 = lspci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2231 =
+@COND_i386_pc_TRUE@am__append_2232 = $(nodist_lspci_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2233 = $(nodist_lspci_module_SOURCES) \
+@COND_i386_pc_TRUE@ lspci.marker
+@COND_i386_pc_TRUE@am__append_2234 = lspci.mod
+@COND_i386_pc_TRUE@am__append_2235 = lspci.marker
+@COND_i386_efi_TRUE@am__append_2236 = lspci.module
+@COND_i386_efi_TRUE@am__append_2237 = lspci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2238 =
+@COND_i386_efi_TRUE@am__append_2239 = $(nodist_lspci_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2240 = $(nodist_lspci_module_SOURCES) \
+@COND_i386_efi_TRUE@ lspci.marker
+@COND_i386_efi_TRUE@am__append_2241 = lspci.mod
+@COND_i386_efi_TRUE@am__append_2242 = lspci.marker
+@COND_i386_qemu_TRUE@am__append_2243 = lspci.module
+@COND_i386_qemu_TRUE@am__append_2244 = lspci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2245 =
+@COND_i386_qemu_TRUE@am__append_2246 = $(nodist_lspci_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2247 = $(nodist_lspci_module_SOURCES) \
+@COND_i386_qemu_TRUE@ lspci.marker
+@COND_i386_qemu_TRUE@am__append_2248 = lspci.mod
+@COND_i386_qemu_TRUE@am__append_2249 = lspci.marker
+@COND_i386_coreboot_TRUE@am__append_2250 = lspci.module
+@COND_i386_coreboot_TRUE@am__append_2251 = lspci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2252 =
+@COND_i386_coreboot_TRUE@am__append_2253 = $(nodist_lspci_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2254 = \
+@COND_i386_coreboot_TRUE@ $(nodist_lspci_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ lspci.marker
+@COND_i386_coreboot_TRUE@am__append_2255 = lspci.mod
+@COND_i386_coreboot_TRUE@am__append_2256 = lspci.marker
+@COND_i386_multiboot_TRUE@am__append_2257 = lspci.module
+@COND_i386_multiboot_TRUE@am__append_2258 = lspci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2259 =
+@COND_i386_multiboot_TRUE@am__append_2260 = $(nodist_lspci_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2261 = \
+@COND_i386_multiboot_TRUE@ $(nodist_lspci_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ lspci.marker
+@COND_i386_multiboot_TRUE@am__append_2262 = lspci.mod
+@COND_i386_multiboot_TRUE@am__append_2263 = lspci.marker
+@COND_i386_ieee1275_TRUE@am__append_2264 = lspci.module
+@COND_i386_ieee1275_TRUE@am__append_2265 = lspci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2266 =
+@COND_i386_ieee1275_TRUE@am__append_2267 = $(nodist_lspci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2268 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_lspci_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ lspci.marker
+@COND_i386_ieee1275_TRUE@am__append_2269 = lspci.mod
+@COND_i386_ieee1275_TRUE@am__append_2270 = lspci.marker
+@COND_x86_64_efi_TRUE@am__append_2271 = lspci.module
+@COND_x86_64_efi_TRUE@am__append_2272 = lspci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2273 =
+@COND_x86_64_efi_TRUE@am__append_2274 = $(nodist_lspci_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2275 = \
+@COND_x86_64_efi_TRUE@ $(nodist_lspci_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ lspci.marker
+@COND_x86_64_efi_TRUE@am__append_2276 = lspci.mod
+@COND_x86_64_efi_TRUE@am__append_2277 = lspci.marker
+@COND_mips_yeeloong_TRUE@am__append_2278 = lspci.module
+@COND_mips_yeeloong_TRUE@am__append_2279 = lspci.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2280 =
+@COND_mips_yeeloong_TRUE@am__append_2281 = $(nodist_lspci_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2282 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_lspci_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ lspci.marker
+@COND_mips_yeeloong_TRUE@am__append_2283 = lspci.mod
+@COND_mips_yeeloong_TRUE@am__append_2284 = lspci.marker
+@COND_emu_TRUE@am__append_2285 = memrw.module
+@COND_emu_TRUE@am__append_2286 = memrw.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2287 =
+@COND_emu_TRUE@am__append_2288 = $(nodist_memrw_module_SOURCES)
+@COND_emu_TRUE@am__append_2289 = $(nodist_memrw_module_SOURCES) \
+@COND_emu_TRUE@ memrw.marker
+@COND_emu_TRUE@am__append_2290 = memrw.mod
+@COND_emu_TRUE@am__append_2291 = memrw.marker
+@COND_i386_pc_TRUE@am__append_2292 = memrw.module
+@COND_i386_pc_TRUE@am__append_2293 = memrw.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2294 =
+@COND_i386_pc_TRUE@am__append_2295 = $(nodist_memrw_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2296 = $(nodist_memrw_module_SOURCES) \
+@COND_i386_pc_TRUE@ memrw.marker
+@COND_i386_pc_TRUE@am__append_2297 = memrw.mod
+@COND_i386_pc_TRUE@am__append_2298 = memrw.marker
+@COND_i386_efi_TRUE@am__append_2299 = memrw.module
+@COND_i386_efi_TRUE@am__append_2300 = memrw.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2301 =
+@COND_i386_efi_TRUE@am__append_2302 = $(nodist_memrw_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2303 = $(nodist_memrw_module_SOURCES) \
+@COND_i386_efi_TRUE@ memrw.marker
+@COND_i386_efi_TRUE@am__append_2304 = memrw.mod
+@COND_i386_efi_TRUE@am__append_2305 = memrw.marker
+@COND_i386_qemu_TRUE@am__append_2306 = memrw.module
+@COND_i386_qemu_TRUE@am__append_2307 = memrw.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2308 =
+@COND_i386_qemu_TRUE@am__append_2309 = $(nodist_memrw_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2310 = $(nodist_memrw_module_SOURCES) \
+@COND_i386_qemu_TRUE@ memrw.marker
+@COND_i386_qemu_TRUE@am__append_2311 = memrw.mod
+@COND_i386_qemu_TRUE@am__append_2312 = memrw.marker
+@COND_i386_coreboot_TRUE@am__append_2313 = memrw.module
+@COND_i386_coreboot_TRUE@am__append_2314 = memrw.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2315 =
+@COND_i386_coreboot_TRUE@am__append_2316 = $(nodist_memrw_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2317 = \
+@COND_i386_coreboot_TRUE@ $(nodist_memrw_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ memrw.marker
+@COND_i386_coreboot_TRUE@am__append_2318 = memrw.mod
+@COND_i386_coreboot_TRUE@am__append_2319 = memrw.marker
+@COND_i386_multiboot_TRUE@am__append_2320 = memrw.module
+@COND_i386_multiboot_TRUE@am__append_2321 = memrw.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2322 =
+@COND_i386_multiboot_TRUE@am__append_2323 = $(nodist_memrw_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2324 = \
+@COND_i386_multiboot_TRUE@ $(nodist_memrw_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ memrw.marker
+@COND_i386_multiboot_TRUE@am__append_2325 = memrw.mod
+@COND_i386_multiboot_TRUE@am__append_2326 = memrw.marker
+@COND_i386_ieee1275_TRUE@am__append_2327 = memrw.module
+@COND_i386_ieee1275_TRUE@am__append_2328 = memrw.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2329 =
+@COND_i386_ieee1275_TRUE@am__append_2330 = $(nodist_memrw_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2331 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_memrw_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ memrw.marker
+@COND_i386_ieee1275_TRUE@am__append_2332 = memrw.mod
+@COND_i386_ieee1275_TRUE@am__append_2333 = memrw.marker
+@COND_x86_64_efi_TRUE@am__append_2334 = memrw.module
+@COND_x86_64_efi_TRUE@am__append_2335 = memrw.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2336 =
+@COND_x86_64_efi_TRUE@am__append_2337 = $(nodist_memrw_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2338 = \
+@COND_x86_64_efi_TRUE@ $(nodist_memrw_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ memrw.marker
+@COND_x86_64_efi_TRUE@am__append_2339 = memrw.mod
+@COND_x86_64_efi_TRUE@am__append_2340 = memrw.marker
+@COND_mips_yeeloong_TRUE@am__append_2341 = memrw.module
+@COND_mips_yeeloong_TRUE@am__append_2342 = memrw.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2343 =
+@COND_mips_yeeloong_TRUE@am__append_2344 = $(nodist_memrw_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2345 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_memrw_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ memrw.marker
+@COND_mips_yeeloong_TRUE@am__append_2346 = memrw.mod
+@COND_mips_yeeloong_TRUE@am__append_2347 = memrw.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2348 = memrw.module
+@COND_sparc64_ieee1275_TRUE@am__append_2349 = memrw.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2350 =
+@COND_sparc64_ieee1275_TRUE@am__append_2351 = $(nodist_memrw_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2352 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_memrw_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ memrw.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2353 = memrw.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2354 = memrw.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2355 = memrw.module
+@COND_powerpc_ieee1275_TRUE@am__append_2356 = memrw.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2357 =
+@COND_powerpc_ieee1275_TRUE@am__append_2358 = $(nodist_memrw_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2359 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_memrw_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ memrw.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2360 = memrw.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2361 = memrw.marker
+@COND_emu_TRUE@am__append_2362 = minicmd.module
+@COND_emu_TRUE@am__append_2363 = minicmd.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2364 =
+@COND_emu_TRUE@am__append_2365 = $(nodist_minicmd_module_SOURCES)
+@COND_emu_TRUE@am__append_2366 = $(nodist_minicmd_module_SOURCES) \
+@COND_emu_TRUE@ minicmd.marker
+@COND_emu_TRUE@am__append_2367 = minicmd.mod
+@COND_emu_TRUE@am__append_2368 = minicmd.marker
+@COND_i386_pc_TRUE@am__append_2369 = minicmd.module
+@COND_i386_pc_TRUE@am__append_2370 = minicmd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2371 =
+@COND_i386_pc_TRUE@am__append_2372 = $(nodist_minicmd_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2373 = $(nodist_minicmd_module_SOURCES) \
+@COND_i386_pc_TRUE@ minicmd.marker
+@COND_i386_pc_TRUE@am__append_2374 = minicmd.mod
+@COND_i386_pc_TRUE@am__append_2375 = minicmd.marker
+@COND_i386_efi_TRUE@am__append_2376 = minicmd.module
+@COND_i386_efi_TRUE@am__append_2377 = minicmd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2378 =
+@COND_i386_efi_TRUE@am__append_2379 = $(nodist_minicmd_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2380 = \
+@COND_i386_efi_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_i386_efi_TRUE@ minicmd.marker
+@COND_i386_efi_TRUE@am__append_2381 = minicmd.mod
+@COND_i386_efi_TRUE@am__append_2382 = minicmd.marker
+@COND_i386_qemu_TRUE@am__append_2383 = minicmd.module
+@COND_i386_qemu_TRUE@am__append_2384 = minicmd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2385 =
+@COND_i386_qemu_TRUE@am__append_2386 = $(nodist_minicmd_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2387 = \
+@COND_i386_qemu_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_i386_qemu_TRUE@ minicmd.marker
+@COND_i386_qemu_TRUE@am__append_2388 = minicmd.mod
+@COND_i386_qemu_TRUE@am__append_2389 = minicmd.marker
+@COND_i386_coreboot_TRUE@am__append_2390 = minicmd.module
+@COND_i386_coreboot_TRUE@am__append_2391 = minicmd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2392 =
+@COND_i386_coreboot_TRUE@am__append_2393 = $(nodist_minicmd_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2394 = \
+@COND_i386_coreboot_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ minicmd.marker
+@COND_i386_coreboot_TRUE@am__append_2395 = minicmd.mod
+@COND_i386_coreboot_TRUE@am__append_2396 = minicmd.marker
+@COND_i386_multiboot_TRUE@am__append_2397 = minicmd.module
+@COND_i386_multiboot_TRUE@am__append_2398 = minicmd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2399 =
+@COND_i386_multiboot_TRUE@am__append_2400 = $(nodist_minicmd_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2401 = \
+@COND_i386_multiboot_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ minicmd.marker
+@COND_i386_multiboot_TRUE@am__append_2402 = minicmd.mod
+@COND_i386_multiboot_TRUE@am__append_2403 = minicmd.marker
+@COND_i386_ieee1275_TRUE@am__append_2404 = minicmd.module
+@COND_i386_ieee1275_TRUE@am__append_2405 = minicmd.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2406 =
+@COND_i386_ieee1275_TRUE@am__append_2407 = $(nodist_minicmd_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2408 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ minicmd.marker
+@COND_i386_ieee1275_TRUE@am__append_2409 = minicmd.mod
+@COND_i386_ieee1275_TRUE@am__append_2410 = minicmd.marker
+@COND_x86_64_efi_TRUE@am__append_2411 = minicmd.module
+@COND_x86_64_efi_TRUE@am__append_2412 = minicmd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2413 =
+@COND_x86_64_efi_TRUE@am__append_2414 = $(nodist_minicmd_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2415 = \
+@COND_x86_64_efi_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ minicmd.marker
+@COND_x86_64_efi_TRUE@am__append_2416 = minicmd.mod
+@COND_x86_64_efi_TRUE@am__append_2417 = minicmd.marker
+@COND_mips_yeeloong_TRUE@am__append_2418 = minicmd.module
+@COND_mips_yeeloong_TRUE@am__append_2419 = minicmd.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2420 =
+@COND_mips_yeeloong_TRUE@am__append_2421 = $(nodist_minicmd_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2422 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ minicmd.marker
+@COND_mips_yeeloong_TRUE@am__append_2423 = minicmd.mod
+@COND_mips_yeeloong_TRUE@am__append_2424 = minicmd.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2425 = minicmd.module
+@COND_sparc64_ieee1275_TRUE@am__append_2426 = minicmd.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2427 =
+@COND_sparc64_ieee1275_TRUE@am__append_2428 = $(nodist_minicmd_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2429 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ minicmd.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2430 = minicmd.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2431 = minicmd.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2432 = minicmd.module
+@COND_powerpc_ieee1275_TRUE@am__append_2433 = minicmd.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2434 =
+@COND_powerpc_ieee1275_TRUE@am__append_2435 = $(nodist_minicmd_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2436 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_minicmd_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ minicmd.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2437 = minicmd.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2438 = minicmd.marker
+@COND_emu_TRUE@am__append_2439 = parttool.module
+@COND_emu_TRUE@am__append_2440 = parttool.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2441 =
+@COND_emu_TRUE@am__append_2442 = $(nodist_parttool_module_SOURCES)
+@COND_emu_TRUE@am__append_2443 = $(nodist_parttool_module_SOURCES) \
+@COND_emu_TRUE@ parttool.marker
+@COND_emu_TRUE@am__append_2444 = parttool.mod
+@COND_emu_TRUE@am__append_2445 = parttool.marker
+@COND_i386_pc_TRUE@am__append_2446 = parttool.module
+@COND_i386_pc_TRUE@am__append_2447 = parttool.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2448 =
+@COND_i386_pc_TRUE@am__append_2449 = $(nodist_parttool_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2450 = \
+@COND_i386_pc_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_i386_pc_TRUE@ parttool.marker
+@COND_i386_pc_TRUE@am__append_2451 = parttool.mod
+@COND_i386_pc_TRUE@am__append_2452 = parttool.marker
+@COND_i386_efi_TRUE@am__append_2453 = parttool.module
+@COND_i386_efi_TRUE@am__append_2454 = parttool.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2455 =
+@COND_i386_efi_TRUE@am__append_2456 = $(nodist_parttool_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2457 = \
+@COND_i386_efi_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_i386_efi_TRUE@ parttool.marker
+@COND_i386_efi_TRUE@am__append_2458 = parttool.mod
+@COND_i386_efi_TRUE@am__append_2459 = parttool.marker
+@COND_i386_qemu_TRUE@am__append_2460 = parttool.module
+@COND_i386_qemu_TRUE@am__append_2461 = parttool.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2462 =
+@COND_i386_qemu_TRUE@am__append_2463 = $(nodist_parttool_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2464 = \
+@COND_i386_qemu_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_i386_qemu_TRUE@ parttool.marker
+@COND_i386_qemu_TRUE@am__append_2465 = parttool.mod
+@COND_i386_qemu_TRUE@am__append_2466 = parttool.marker
+@COND_i386_coreboot_TRUE@am__append_2467 = parttool.module
+@COND_i386_coreboot_TRUE@am__append_2468 = parttool.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2469 =
+@COND_i386_coreboot_TRUE@am__append_2470 = $(nodist_parttool_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2471 = \
+@COND_i386_coreboot_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ parttool.marker
+@COND_i386_coreboot_TRUE@am__append_2472 = parttool.mod
+@COND_i386_coreboot_TRUE@am__append_2473 = parttool.marker
+@COND_i386_multiboot_TRUE@am__append_2474 = parttool.module
+@COND_i386_multiboot_TRUE@am__append_2475 = parttool.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2476 =
+@COND_i386_multiboot_TRUE@am__append_2477 = $(nodist_parttool_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2478 = \
+@COND_i386_multiboot_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ parttool.marker
+@COND_i386_multiboot_TRUE@am__append_2479 = parttool.mod
+@COND_i386_multiboot_TRUE@am__append_2480 = parttool.marker
+@COND_i386_ieee1275_TRUE@am__append_2481 = parttool.module
+@COND_i386_ieee1275_TRUE@am__append_2482 = parttool.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2483 =
+@COND_i386_ieee1275_TRUE@am__append_2484 = $(nodist_parttool_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2485 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ parttool.marker
+@COND_i386_ieee1275_TRUE@am__append_2486 = parttool.mod
+@COND_i386_ieee1275_TRUE@am__append_2487 = parttool.marker
+@COND_x86_64_efi_TRUE@am__append_2488 = parttool.module
+@COND_x86_64_efi_TRUE@am__append_2489 = parttool.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2490 =
+@COND_x86_64_efi_TRUE@am__append_2491 = $(nodist_parttool_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2492 = \
+@COND_x86_64_efi_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ parttool.marker
+@COND_x86_64_efi_TRUE@am__append_2493 = parttool.mod
+@COND_x86_64_efi_TRUE@am__append_2494 = parttool.marker
+@COND_mips_yeeloong_TRUE@am__append_2495 = parttool.module
+@COND_mips_yeeloong_TRUE@am__append_2496 = parttool.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2497 =
+@COND_mips_yeeloong_TRUE@am__append_2498 = $(nodist_parttool_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2499 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ parttool.marker
+@COND_mips_yeeloong_TRUE@am__append_2500 = parttool.mod
+@COND_mips_yeeloong_TRUE@am__append_2501 = parttool.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2502 = parttool.module
+@COND_sparc64_ieee1275_TRUE@am__append_2503 = parttool.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2504 =
+@COND_sparc64_ieee1275_TRUE@am__append_2505 = $(nodist_parttool_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2506 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ parttool.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2507 = parttool.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2508 = parttool.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2509 = parttool.module
+@COND_powerpc_ieee1275_TRUE@am__append_2510 = parttool.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2511 =
+@COND_powerpc_ieee1275_TRUE@am__append_2512 = $(nodist_parttool_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2513 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_parttool_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ parttool.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2514 = parttool.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2515 = parttool.marker
+@COND_emu_TRUE@am__append_2516 = password.module
+@COND_emu_TRUE@am__append_2517 = password.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2518 =
+@COND_emu_TRUE@am__append_2519 = $(nodist_password_module_SOURCES)
+@COND_emu_TRUE@am__append_2520 = $(nodist_password_module_SOURCES) \
+@COND_emu_TRUE@ password.marker
+@COND_emu_TRUE@am__append_2521 = password.mod
+@COND_emu_TRUE@am__append_2522 = password.marker
+@COND_i386_pc_TRUE@am__append_2523 = password.module
+@COND_i386_pc_TRUE@am__append_2524 = password.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2525 =
+@COND_i386_pc_TRUE@am__append_2526 = $(nodist_password_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2527 = \
+@COND_i386_pc_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_i386_pc_TRUE@ password.marker
+@COND_i386_pc_TRUE@am__append_2528 = password.mod
+@COND_i386_pc_TRUE@am__append_2529 = password.marker
+@COND_i386_efi_TRUE@am__append_2530 = password.module
+@COND_i386_efi_TRUE@am__append_2531 = password.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2532 =
+@COND_i386_efi_TRUE@am__append_2533 = $(nodist_password_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2534 = \
+@COND_i386_efi_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_i386_efi_TRUE@ password.marker
+@COND_i386_efi_TRUE@am__append_2535 = password.mod
+@COND_i386_efi_TRUE@am__append_2536 = password.marker
+@COND_i386_qemu_TRUE@am__append_2537 = password.module
+@COND_i386_qemu_TRUE@am__append_2538 = password.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2539 =
+@COND_i386_qemu_TRUE@am__append_2540 = $(nodist_password_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2541 = \
+@COND_i386_qemu_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_i386_qemu_TRUE@ password.marker
+@COND_i386_qemu_TRUE@am__append_2542 = password.mod
+@COND_i386_qemu_TRUE@am__append_2543 = password.marker
+@COND_i386_coreboot_TRUE@am__append_2544 = password.module
+@COND_i386_coreboot_TRUE@am__append_2545 = password.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2546 =
+@COND_i386_coreboot_TRUE@am__append_2547 = $(nodist_password_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2548 = \
+@COND_i386_coreboot_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ password.marker
+@COND_i386_coreboot_TRUE@am__append_2549 = password.mod
+@COND_i386_coreboot_TRUE@am__append_2550 = password.marker
+@COND_i386_multiboot_TRUE@am__append_2551 = password.module
+@COND_i386_multiboot_TRUE@am__append_2552 = password.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2553 =
+@COND_i386_multiboot_TRUE@am__append_2554 = $(nodist_password_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2555 = \
+@COND_i386_multiboot_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ password.marker
+@COND_i386_multiboot_TRUE@am__append_2556 = password.mod
+@COND_i386_multiboot_TRUE@am__append_2557 = password.marker
+@COND_i386_ieee1275_TRUE@am__append_2558 = password.module
+@COND_i386_ieee1275_TRUE@am__append_2559 = password.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2560 =
+@COND_i386_ieee1275_TRUE@am__append_2561 = $(nodist_password_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2562 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ password.marker
+@COND_i386_ieee1275_TRUE@am__append_2563 = password.mod
+@COND_i386_ieee1275_TRUE@am__append_2564 = password.marker
+@COND_x86_64_efi_TRUE@am__append_2565 = password.module
+@COND_x86_64_efi_TRUE@am__append_2566 = password.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2567 =
+@COND_x86_64_efi_TRUE@am__append_2568 = $(nodist_password_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2569 = \
+@COND_x86_64_efi_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ password.marker
+@COND_x86_64_efi_TRUE@am__append_2570 = password.mod
+@COND_x86_64_efi_TRUE@am__append_2571 = password.marker
+@COND_mips_yeeloong_TRUE@am__append_2572 = password.module
+@COND_mips_yeeloong_TRUE@am__append_2573 = password.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2574 =
+@COND_mips_yeeloong_TRUE@am__append_2575 = $(nodist_password_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2576 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ password.marker
+@COND_mips_yeeloong_TRUE@am__append_2577 = password.mod
+@COND_mips_yeeloong_TRUE@am__append_2578 = password.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2579 = password.module
+@COND_sparc64_ieee1275_TRUE@am__append_2580 = password.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2581 =
+@COND_sparc64_ieee1275_TRUE@am__append_2582 = $(nodist_password_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2583 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ password.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2584 = password.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2585 = password.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2586 = password.module
+@COND_powerpc_ieee1275_TRUE@am__append_2587 = password.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2588 =
+@COND_powerpc_ieee1275_TRUE@am__append_2589 = $(nodist_password_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2590 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_password_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ password.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2591 = password.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2592 = password.marker
+@COND_emu_TRUE@am__append_2593 = password_pbkdf2.module
+@COND_emu_TRUE@am__append_2594 = password_pbkdf2.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2595 =
+@COND_emu_TRUE@am__append_2596 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_emu_TRUE@am__append_2597 = \
+@COND_emu_TRUE@ $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_emu_TRUE@ password_pbkdf2.marker
+@COND_emu_TRUE@am__append_2598 = password_pbkdf2.mod
+@COND_emu_TRUE@am__append_2599 = password_pbkdf2.marker
+@COND_i386_pc_TRUE@am__append_2600 = password_pbkdf2.module
+@COND_i386_pc_TRUE@am__append_2601 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2602 =
+@COND_i386_pc_TRUE@am__append_2603 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2604 = \
+@COND_i386_pc_TRUE@ $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_i386_pc_TRUE@ password_pbkdf2.marker
+@COND_i386_pc_TRUE@am__append_2605 = password_pbkdf2.mod
+@COND_i386_pc_TRUE@am__append_2606 = password_pbkdf2.marker
+@COND_i386_efi_TRUE@am__append_2607 = password_pbkdf2.module
+@COND_i386_efi_TRUE@am__append_2608 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2609 =
+@COND_i386_efi_TRUE@am__append_2610 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2611 = \
+@COND_i386_efi_TRUE@ $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_i386_efi_TRUE@ password_pbkdf2.marker
+@COND_i386_efi_TRUE@am__append_2612 = password_pbkdf2.mod
+@COND_i386_efi_TRUE@am__append_2613 = password_pbkdf2.marker
+@COND_i386_qemu_TRUE@am__append_2614 = password_pbkdf2.module
+@COND_i386_qemu_TRUE@am__append_2615 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2616 =
+@COND_i386_qemu_TRUE@am__append_2617 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2618 = \
+@COND_i386_qemu_TRUE@ $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_i386_qemu_TRUE@ password_pbkdf2.marker
+@COND_i386_qemu_TRUE@am__append_2619 = password_pbkdf2.mod
+@COND_i386_qemu_TRUE@am__append_2620 = password_pbkdf2.marker
+@COND_i386_coreboot_TRUE@am__append_2621 = password_pbkdf2.module
+@COND_i386_coreboot_TRUE@am__append_2622 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2623 =
+@COND_i386_coreboot_TRUE@am__append_2624 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2625 = $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ password_pbkdf2.marker
+@COND_i386_coreboot_TRUE@am__append_2626 = password_pbkdf2.mod
+@COND_i386_coreboot_TRUE@am__append_2627 = password_pbkdf2.marker
+@COND_i386_multiboot_TRUE@am__append_2628 = password_pbkdf2.module
+@COND_i386_multiboot_TRUE@am__append_2629 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2630 =
+@COND_i386_multiboot_TRUE@am__append_2631 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2632 = $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ password_pbkdf2.marker
+@COND_i386_multiboot_TRUE@am__append_2633 = password_pbkdf2.mod
+@COND_i386_multiboot_TRUE@am__append_2634 = password_pbkdf2.marker
+@COND_i386_ieee1275_TRUE@am__append_2635 = password_pbkdf2.module
+@COND_i386_ieee1275_TRUE@am__append_2636 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2637 =
+@COND_i386_ieee1275_TRUE@am__append_2638 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2639 = $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ password_pbkdf2.marker
+@COND_i386_ieee1275_TRUE@am__append_2640 = password_pbkdf2.mod
+@COND_i386_ieee1275_TRUE@am__append_2641 = password_pbkdf2.marker
+@COND_x86_64_efi_TRUE@am__append_2642 = password_pbkdf2.module
+@COND_x86_64_efi_TRUE@am__append_2643 = password_pbkdf2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2644 =
+@COND_x86_64_efi_TRUE@am__append_2645 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2646 = $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ password_pbkdf2.marker
+@COND_x86_64_efi_TRUE@am__append_2647 = password_pbkdf2.mod
+@COND_x86_64_efi_TRUE@am__append_2648 = password_pbkdf2.marker
+@COND_mips_yeeloong_TRUE@am__append_2649 = password_pbkdf2.module
+@COND_mips_yeeloong_TRUE@am__append_2650 = password_pbkdf2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2651 =
+@COND_mips_yeeloong_TRUE@am__append_2652 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2653 = $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ password_pbkdf2.marker
+@COND_mips_yeeloong_TRUE@am__append_2654 = password_pbkdf2.mod
+@COND_mips_yeeloong_TRUE@am__append_2655 = password_pbkdf2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2656 = password_pbkdf2.module
+@COND_sparc64_ieee1275_TRUE@am__append_2657 = password_pbkdf2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2658 =
+@COND_sparc64_ieee1275_TRUE@am__append_2659 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2660 = $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ password_pbkdf2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2661 = password_pbkdf2.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2662 = password_pbkdf2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2663 = password_pbkdf2.module
+@COND_powerpc_ieee1275_TRUE@am__append_2664 = password_pbkdf2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2665 =
+@COND_powerpc_ieee1275_TRUE@am__append_2666 = $(nodist_password_pbkdf2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2667 = $(nodist_password_pbkdf2_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ password_pbkdf2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2668 = password_pbkdf2.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2669 = password_pbkdf2.marker
+@COND_i386_pc_TRUE@am__append_2670 = play.module
+@COND_i386_pc_TRUE@am__append_2671 = play.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2672 =
+@COND_i386_pc_TRUE@am__append_2673 = $(nodist_play_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2674 = $(nodist_play_module_SOURCES) \
+@COND_i386_pc_TRUE@ play.marker
+@COND_i386_pc_TRUE@am__append_2675 = play.mod
+@COND_i386_pc_TRUE@am__append_2676 = play.marker
+@COND_i386_efi_TRUE@am__append_2677 = play.module
+@COND_i386_efi_TRUE@am__append_2678 = play.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2679 =
+@COND_i386_efi_TRUE@am__append_2680 = $(nodist_play_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2681 = $(nodist_play_module_SOURCES) \
+@COND_i386_efi_TRUE@ play.marker
+@COND_i386_efi_TRUE@am__append_2682 = play.mod
+@COND_i386_efi_TRUE@am__append_2683 = play.marker
+@COND_i386_qemu_TRUE@am__append_2684 = play.module
+@COND_i386_qemu_TRUE@am__append_2685 = play.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2686 =
+@COND_i386_qemu_TRUE@am__append_2687 = $(nodist_play_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2688 = $(nodist_play_module_SOURCES) \
+@COND_i386_qemu_TRUE@ play.marker
+@COND_i386_qemu_TRUE@am__append_2689 = play.mod
+@COND_i386_qemu_TRUE@am__append_2690 = play.marker
+@COND_i386_coreboot_TRUE@am__append_2691 = play.module
+@COND_i386_coreboot_TRUE@am__append_2692 = play.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2693 =
+@COND_i386_coreboot_TRUE@am__append_2694 = $(nodist_play_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2695 = \
+@COND_i386_coreboot_TRUE@ $(nodist_play_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ play.marker
+@COND_i386_coreboot_TRUE@am__append_2696 = play.mod
+@COND_i386_coreboot_TRUE@am__append_2697 = play.marker
+@COND_i386_multiboot_TRUE@am__append_2698 = play.module
+@COND_i386_multiboot_TRUE@am__append_2699 = play.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2700 =
+@COND_i386_multiboot_TRUE@am__append_2701 = $(nodist_play_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2702 = \
+@COND_i386_multiboot_TRUE@ $(nodist_play_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ play.marker
+@COND_i386_multiboot_TRUE@am__append_2703 = play.mod
+@COND_i386_multiboot_TRUE@am__append_2704 = play.marker
+@COND_i386_ieee1275_TRUE@am__append_2705 = play.module
+@COND_i386_ieee1275_TRUE@am__append_2706 = play.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2707 =
+@COND_i386_ieee1275_TRUE@am__append_2708 = $(nodist_play_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2709 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_play_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ play.marker
+@COND_i386_ieee1275_TRUE@am__append_2710 = play.mod
+@COND_i386_ieee1275_TRUE@am__append_2711 = play.marker
+@COND_x86_64_efi_TRUE@am__append_2712 = play.module
+@COND_x86_64_efi_TRUE@am__append_2713 = play.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2714 =
+@COND_x86_64_efi_TRUE@am__append_2715 = $(nodist_play_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2716 = $(nodist_play_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ play.marker
+@COND_x86_64_efi_TRUE@am__append_2717 = play.mod
+@COND_x86_64_efi_TRUE@am__append_2718 = play.marker
+@COND_emu_TRUE@am__append_2719 = probe.module
+@COND_emu_TRUE@am__append_2720 = probe.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2721 =
+@COND_emu_TRUE@am__append_2722 = $(nodist_probe_module_SOURCES)
+@COND_emu_TRUE@am__append_2723 = $(nodist_probe_module_SOURCES) \
+@COND_emu_TRUE@ probe.marker
+@COND_emu_TRUE@am__append_2724 = probe.mod
+@COND_emu_TRUE@am__append_2725 = probe.marker
+@COND_i386_pc_TRUE@am__append_2726 = probe.module
+@COND_i386_pc_TRUE@am__append_2727 = probe.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2728 =
+@COND_i386_pc_TRUE@am__append_2729 = $(nodist_probe_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2730 = $(nodist_probe_module_SOURCES) \
+@COND_i386_pc_TRUE@ probe.marker
+@COND_i386_pc_TRUE@am__append_2731 = probe.mod
+@COND_i386_pc_TRUE@am__append_2732 = probe.marker
+@COND_i386_efi_TRUE@am__append_2733 = probe.module
+@COND_i386_efi_TRUE@am__append_2734 = probe.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2735 =
+@COND_i386_efi_TRUE@am__append_2736 = $(nodist_probe_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2737 = $(nodist_probe_module_SOURCES) \
+@COND_i386_efi_TRUE@ probe.marker
+@COND_i386_efi_TRUE@am__append_2738 = probe.mod
+@COND_i386_efi_TRUE@am__append_2739 = probe.marker
+@COND_i386_qemu_TRUE@am__append_2740 = probe.module
+@COND_i386_qemu_TRUE@am__append_2741 = probe.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2742 =
+@COND_i386_qemu_TRUE@am__append_2743 = $(nodist_probe_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2744 = $(nodist_probe_module_SOURCES) \
+@COND_i386_qemu_TRUE@ probe.marker
+@COND_i386_qemu_TRUE@am__append_2745 = probe.mod
+@COND_i386_qemu_TRUE@am__append_2746 = probe.marker
+@COND_i386_coreboot_TRUE@am__append_2747 = probe.module
+@COND_i386_coreboot_TRUE@am__append_2748 = probe.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2749 =
+@COND_i386_coreboot_TRUE@am__append_2750 = $(nodist_probe_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2751 = \
+@COND_i386_coreboot_TRUE@ $(nodist_probe_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ probe.marker
+@COND_i386_coreboot_TRUE@am__append_2752 = probe.mod
+@COND_i386_coreboot_TRUE@am__append_2753 = probe.marker
+@COND_i386_multiboot_TRUE@am__append_2754 = probe.module
+@COND_i386_multiboot_TRUE@am__append_2755 = probe.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2756 =
+@COND_i386_multiboot_TRUE@am__append_2757 = $(nodist_probe_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2758 = \
+@COND_i386_multiboot_TRUE@ $(nodist_probe_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ probe.marker
+@COND_i386_multiboot_TRUE@am__append_2759 = probe.mod
+@COND_i386_multiboot_TRUE@am__append_2760 = probe.marker
+@COND_i386_ieee1275_TRUE@am__append_2761 = probe.module
+@COND_i386_ieee1275_TRUE@am__append_2762 = probe.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2763 =
+@COND_i386_ieee1275_TRUE@am__append_2764 = $(nodist_probe_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2765 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_probe_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ probe.marker
+@COND_i386_ieee1275_TRUE@am__append_2766 = probe.mod
+@COND_i386_ieee1275_TRUE@am__append_2767 = probe.marker
+@COND_x86_64_efi_TRUE@am__append_2768 = probe.module
+@COND_x86_64_efi_TRUE@am__append_2769 = probe.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2770 =
+@COND_x86_64_efi_TRUE@am__append_2771 = $(nodist_probe_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2772 = \
+@COND_x86_64_efi_TRUE@ $(nodist_probe_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ probe.marker
+@COND_x86_64_efi_TRUE@am__append_2773 = probe.mod
+@COND_x86_64_efi_TRUE@am__append_2774 = probe.marker
+@COND_mips_yeeloong_TRUE@am__append_2775 = probe.module
+@COND_mips_yeeloong_TRUE@am__append_2776 = probe.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2777 =
+@COND_mips_yeeloong_TRUE@am__append_2778 = $(nodist_probe_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2779 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_probe_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ probe.marker
+@COND_mips_yeeloong_TRUE@am__append_2780 = probe.mod
+@COND_mips_yeeloong_TRUE@am__append_2781 = probe.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2782 = probe.module
+@COND_sparc64_ieee1275_TRUE@am__append_2783 = probe.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2784 =
+@COND_sparc64_ieee1275_TRUE@am__append_2785 = $(nodist_probe_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2786 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_probe_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ probe.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2787 = probe.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2788 = probe.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2789 = probe.module
+@COND_powerpc_ieee1275_TRUE@am__append_2790 = probe.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2791 =
+@COND_powerpc_ieee1275_TRUE@am__append_2792 = $(nodist_probe_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2793 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_probe_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ probe.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2794 = probe.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2795 = probe.marker
+@COND_i386_pc_TRUE@am__append_2796 = pxecmd.module
+@COND_i386_pc_TRUE@am__append_2797 = pxecmd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2798 =
+@COND_i386_pc_TRUE@am__append_2799 = $(nodist_pxecmd_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2800 = $(nodist_pxecmd_module_SOURCES) \
+@COND_i386_pc_TRUE@ pxecmd.marker
+@COND_i386_pc_TRUE@am__append_2801 = pxecmd.mod
+@COND_i386_pc_TRUE@am__append_2802 = pxecmd.marker
+@COND_emu_TRUE@am__append_2803 = read.module
+@COND_emu_TRUE@am__append_2804 = read.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2805 =
+@COND_emu_TRUE@am__append_2806 = $(nodist_read_module_SOURCES)
+@COND_emu_TRUE@am__append_2807 = $(nodist_read_module_SOURCES) \
+@COND_emu_TRUE@ read.marker
+@COND_emu_TRUE@am__append_2808 = read.mod
+@COND_emu_TRUE@am__append_2809 = read.marker
+@COND_i386_pc_TRUE@am__append_2810 = read.module
+@COND_i386_pc_TRUE@am__append_2811 = read.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2812 =
+@COND_i386_pc_TRUE@am__append_2813 = $(nodist_read_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2814 = $(nodist_read_module_SOURCES) \
+@COND_i386_pc_TRUE@ read.marker
+@COND_i386_pc_TRUE@am__append_2815 = read.mod
+@COND_i386_pc_TRUE@am__append_2816 = read.marker
+@COND_i386_efi_TRUE@am__append_2817 = read.module
+@COND_i386_efi_TRUE@am__append_2818 = read.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2819 =
+@COND_i386_efi_TRUE@am__append_2820 = $(nodist_read_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2821 = $(nodist_read_module_SOURCES) \
+@COND_i386_efi_TRUE@ read.marker
+@COND_i386_efi_TRUE@am__append_2822 = read.mod
+@COND_i386_efi_TRUE@am__append_2823 = read.marker
+@COND_i386_qemu_TRUE@am__append_2824 = read.module
+@COND_i386_qemu_TRUE@am__append_2825 = read.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2826 =
+@COND_i386_qemu_TRUE@am__append_2827 = $(nodist_read_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2828 = $(nodist_read_module_SOURCES) \
+@COND_i386_qemu_TRUE@ read.marker
+@COND_i386_qemu_TRUE@am__append_2829 = read.mod
+@COND_i386_qemu_TRUE@am__append_2830 = read.marker
+@COND_i386_coreboot_TRUE@am__append_2831 = read.module
+@COND_i386_coreboot_TRUE@am__append_2832 = read.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2833 =
+@COND_i386_coreboot_TRUE@am__append_2834 = $(nodist_read_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2835 = \
+@COND_i386_coreboot_TRUE@ $(nodist_read_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ read.marker
+@COND_i386_coreboot_TRUE@am__append_2836 = read.mod
+@COND_i386_coreboot_TRUE@am__append_2837 = read.marker
+@COND_i386_multiboot_TRUE@am__append_2838 = read.module
+@COND_i386_multiboot_TRUE@am__append_2839 = read.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2840 =
+@COND_i386_multiboot_TRUE@am__append_2841 = $(nodist_read_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2842 = \
+@COND_i386_multiboot_TRUE@ $(nodist_read_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ read.marker
+@COND_i386_multiboot_TRUE@am__append_2843 = read.mod
+@COND_i386_multiboot_TRUE@am__append_2844 = read.marker
+@COND_i386_ieee1275_TRUE@am__append_2845 = read.module
+@COND_i386_ieee1275_TRUE@am__append_2846 = read.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2847 =
+@COND_i386_ieee1275_TRUE@am__append_2848 = $(nodist_read_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2849 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_read_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ read.marker
+@COND_i386_ieee1275_TRUE@am__append_2850 = read.mod
+@COND_i386_ieee1275_TRUE@am__append_2851 = read.marker
+@COND_x86_64_efi_TRUE@am__append_2852 = read.module
+@COND_x86_64_efi_TRUE@am__append_2853 = read.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2854 =
+@COND_x86_64_efi_TRUE@am__append_2855 = $(nodist_read_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2856 = $(nodist_read_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ read.marker
+@COND_x86_64_efi_TRUE@am__append_2857 = read.mod
+@COND_x86_64_efi_TRUE@am__append_2858 = read.marker
+@COND_mips_yeeloong_TRUE@am__append_2859 = read.module
+@COND_mips_yeeloong_TRUE@am__append_2860 = read.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2861 =
+@COND_mips_yeeloong_TRUE@am__append_2862 = $(nodist_read_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2863 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_read_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ read.marker
+@COND_mips_yeeloong_TRUE@am__append_2864 = read.mod
+@COND_mips_yeeloong_TRUE@am__append_2865 = read.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2866 = read.module
+@COND_sparc64_ieee1275_TRUE@am__append_2867 = read.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2868 =
+@COND_sparc64_ieee1275_TRUE@am__append_2869 = $(nodist_read_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2870 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_read_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ read.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2871 = read.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2872 = read.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2873 = read.module
+@COND_powerpc_ieee1275_TRUE@am__append_2874 = read.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2875 =
+@COND_powerpc_ieee1275_TRUE@am__append_2876 = $(nodist_read_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2877 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_read_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ read.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2878 = read.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2879 = read.marker
+@COND_emu_TRUE@am__append_2880 = reboot.module
+@COND_emu_TRUE@am__append_2881 = reboot.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2882 =
+@COND_emu_TRUE@am__append_2883 = $(nodist_reboot_module_SOURCES)
+@COND_emu_TRUE@am__append_2884 = $(nodist_reboot_module_SOURCES) \
+@COND_emu_TRUE@ reboot.marker
+@COND_emu_TRUE@am__append_2885 = reboot.mod
+@COND_emu_TRUE@am__append_2886 = reboot.marker
+@COND_i386_pc_TRUE@am__append_2887 = reboot.module
+@COND_i386_pc_TRUE@am__append_2888 = reboot.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2889 =
+@COND_i386_pc_TRUE@am__append_2890 = $(nodist_reboot_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2891 = $(nodist_reboot_module_SOURCES) \
+@COND_i386_pc_TRUE@ reboot.marker
+@COND_i386_pc_TRUE@am__append_2892 = reboot.mod
+@COND_i386_pc_TRUE@am__append_2893 = reboot.marker
+@COND_i386_efi_TRUE@am__append_2894 = reboot.module
+@COND_i386_efi_TRUE@am__append_2895 = reboot.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2896 =
+@COND_i386_efi_TRUE@am__append_2897 = $(nodist_reboot_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2898 = $(nodist_reboot_module_SOURCES) \
+@COND_i386_efi_TRUE@ reboot.marker
+@COND_i386_efi_TRUE@am__append_2899 = reboot.mod
+@COND_i386_efi_TRUE@am__append_2900 = reboot.marker
+@COND_i386_qemu_TRUE@am__append_2901 = reboot.module
+@COND_i386_qemu_TRUE@am__append_2902 = reboot.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2903 =
+@COND_i386_qemu_TRUE@am__append_2904 = $(nodist_reboot_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2905 = \
+@COND_i386_qemu_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_i386_qemu_TRUE@ reboot.marker
+@COND_i386_qemu_TRUE@am__append_2906 = reboot.mod
+@COND_i386_qemu_TRUE@am__append_2907 = reboot.marker
+@COND_i386_coreboot_TRUE@am__append_2908 = reboot.module
+@COND_i386_coreboot_TRUE@am__append_2909 = reboot.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2910 =
+@COND_i386_coreboot_TRUE@am__append_2911 = $(nodist_reboot_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2912 = \
+@COND_i386_coreboot_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ reboot.marker
+@COND_i386_coreboot_TRUE@am__append_2913 = reboot.mod
+@COND_i386_coreboot_TRUE@am__append_2914 = reboot.marker
+@COND_i386_multiboot_TRUE@am__append_2915 = reboot.module
+@COND_i386_multiboot_TRUE@am__append_2916 = reboot.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2917 =
+@COND_i386_multiboot_TRUE@am__append_2918 = $(nodist_reboot_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2919 = \
+@COND_i386_multiboot_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ reboot.marker
+@COND_i386_multiboot_TRUE@am__append_2920 = reboot.mod
+@COND_i386_multiboot_TRUE@am__append_2921 = reboot.marker
+@COND_i386_ieee1275_TRUE@am__append_2922 = reboot.module
+@COND_i386_ieee1275_TRUE@am__append_2923 = reboot.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_2924 =
+@COND_i386_ieee1275_TRUE@am__append_2925 = $(nodist_reboot_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_2926 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ reboot.marker
+@COND_i386_ieee1275_TRUE@am__append_2927 = reboot.mod
+@COND_i386_ieee1275_TRUE@am__append_2928 = reboot.marker
+@COND_x86_64_efi_TRUE@am__append_2929 = reboot.module
+@COND_x86_64_efi_TRUE@am__append_2930 = reboot.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_2931 =
+@COND_x86_64_efi_TRUE@am__append_2932 = $(nodist_reboot_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_2933 = \
+@COND_x86_64_efi_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ reboot.marker
+@COND_x86_64_efi_TRUE@am__append_2934 = reboot.mod
+@COND_x86_64_efi_TRUE@am__append_2935 = reboot.marker
+@COND_mips_yeeloong_TRUE@am__append_2936 = reboot.module
+@COND_mips_yeeloong_TRUE@am__append_2937 = reboot.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_2938 =
+@COND_mips_yeeloong_TRUE@am__append_2939 = $(nodist_reboot_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_2940 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ reboot.marker
+@COND_mips_yeeloong_TRUE@am__append_2941 = reboot.mod
+@COND_mips_yeeloong_TRUE@am__append_2942 = reboot.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2943 = reboot.module
+@COND_sparc64_ieee1275_TRUE@am__append_2944 = reboot.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_2945 =
+@COND_sparc64_ieee1275_TRUE@am__append_2946 = $(nodist_reboot_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_2947 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ reboot.marker
+@COND_sparc64_ieee1275_TRUE@am__append_2948 = reboot.mod
+@COND_sparc64_ieee1275_TRUE@am__append_2949 = reboot.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2950 = reboot.module
+@COND_powerpc_ieee1275_TRUE@am__append_2951 = reboot.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_2952 =
+@COND_powerpc_ieee1275_TRUE@am__append_2953 = $(nodist_reboot_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_2954 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_reboot_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ reboot.marker
+@COND_powerpc_ieee1275_TRUE@am__append_2955 = reboot.mod
+@COND_powerpc_ieee1275_TRUE@am__append_2956 = reboot.marker
+@COND_emu_TRUE@am__append_2957 = search.module
+@COND_emu_TRUE@am__append_2958 = search.module$(EXEEXT)
+@COND_emu_TRUE@am__append_2959 = commands/search.c
+@COND_emu_TRUE@am__append_2960 = $(nodist_search_module_SOURCES)
+@COND_emu_TRUE@am__append_2961 = $(nodist_search_module_SOURCES) \
+@COND_emu_TRUE@ search.marker
+@COND_emu_TRUE@am__append_2962 = search.mod
+@COND_emu_TRUE@am__append_2963 = search.marker
+@COND_i386_pc_TRUE@am__append_2964 = search.module
+@COND_i386_pc_TRUE@am__append_2965 = search.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_2966 = commands/search.c
+@COND_i386_pc_TRUE@am__append_2967 = $(nodist_search_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_2968 = $(nodist_search_module_SOURCES) \
+@COND_i386_pc_TRUE@ search.marker
+@COND_i386_pc_TRUE@am__append_2969 = search.mod
+@COND_i386_pc_TRUE@am__append_2970 = search.marker
+@COND_i386_efi_TRUE@am__append_2971 = search.module
+@COND_i386_efi_TRUE@am__append_2972 = search.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_2973 = commands/search.c
+@COND_i386_efi_TRUE@am__append_2974 = $(nodist_search_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_2975 = $(nodist_search_module_SOURCES) \
+@COND_i386_efi_TRUE@ search.marker
+@COND_i386_efi_TRUE@am__append_2976 = search.mod
+@COND_i386_efi_TRUE@am__append_2977 = search.marker
+@COND_i386_qemu_TRUE@am__append_2978 = search.module
+@COND_i386_qemu_TRUE@am__append_2979 = search.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_2980 = commands/search.c
+@COND_i386_qemu_TRUE@am__append_2981 = $(nodist_search_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_2982 = \
+@COND_i386_qemu_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_i386_qemu_TRUE@ search.marker
+@COND_i386_qemu_TRUE@am__append_2983 = search.mod
+@COND_i386_qemu_TRUE@am__append_2984 = search.marker
+@COND_i386_coreboot_TRUE@am__append_2985 = search.module
+@COND_i386_coreboot_TRUE@am__append_2986 = search.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_2987 = commands/search.c
+@COND_i386_coreboot_TRUE@am__append_2988 = $(nodist_search_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_2989 = \
+@COND_i386_coreboot_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ search.marker
+@COND_i386_coreboot_TRUE@am__append_2990 = search.mod
+@COND_i386_coreboot_TRUE@am__append_2991 = search.marker
+@COND_i386_multiboot_TRUE@am__append_2992 = search.module
+@COND_i386_multiboot_TRUE@am__append_2993 = search.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_2994 = commands/search.c
+@COND_i386_multiboot_TRUE@am__append_2995 = $(nodist_search_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_2996 = \
+@COND_i386_multiboot_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ search.marker
+@COND_i386_multiboot_TRUE@am__append_2997 = search.mod
+@COND_i386_multiboot_TRUE@am__append_2998 = search.marker
+@COND_i386_ieee1275_TRUE@am__append_2999 = search.module
+@COND_i386_ieee1275_TRUE@am__append_3000 = search.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3001 = commands/search.c
+@COND_i386_ieee1275_TRUE@am__append_3002 = $(nodist_search_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3003 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ search.marker
+@COND_i386_ieee1275_TRUE@am__append_3004 = search.mod
+@COND_i386_ieee1275_TRUE@am__append_3005 = search.marker
+@COND_x86_64_efi_TRUE@am__append_3006 = search.module
+@COND_x86_64_efi_TRUE@am__append_3007 = search.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3008 = commands/search.c
+@COND_x86_64_efi_TRUE@am__append_3009 = $(nodist_search_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3010 = \
+@COND_x86_64_efi_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ search.marker
+@COND_x86_64_efi_TRUE@am__append_3011 = search.mod
+@COND_x86_64_efi_TRUE@am__append_3012 = search.marker
+@COND_mips_yeeloong_TRUE@am__append_3013 = search.module
+@COND_mips_yeeloong_TRUE@am__append_3014 = search.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3015 = commands/search.c
+@COND_mips_yeeloong_TRUE@am__append_3016 = $(nodist_search_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3017 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ search.marker
+@COND_mips_yeeloong_TRUE@am__append_3018 = search.mod
+@COND_mips_yeeloong_TRUE@am__append_3019 = search.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3020 = search.module
+@COND_sparc64_ieee1275_TRUE@am__append_3021 = search.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3022 = commands/search.c
+@COND_sparc64_ieee1275_TRUE@am__append_3023 = $(nodist_search_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3024 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ search.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3025 = search.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3026 = search.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3027 = search.module
+@COND_powerpc_ieee1275_TRUE@am__append_3028 = search.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3029 = commands/search.c
+@COND_powerpc_ieee1275_TRUE@am__append_3030 = $(nodist_search_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3031 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_search_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ search.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3032 = search.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3033 = search.marker
+@COND_emu_TRUE@am__append_3034 = search_fs_file.module
+@COND_emu_TRUE@am__append_3035 = search_fs_file.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3036 =
+@COND_emu_TRUE@am__append_3037 = $(nodist_search_fs_file_module_SOURCES)
+@COND_emu_TRUE@am__append_3038 = \
+@COND_emu_TRUE@ $(nodist_search_fs_file_module_SOURCES) \
+@COND_emu_TRUE@ search_fs_file.marker
+@COND_emu_TRUE@am__append_3039 = search_fs_file.mod
+@COND_emu_TRUE@am__append_3040 = search_fs_file.marker
+@COND_i386_pc_TRUE@am__append_3041 = search_fs_file.module
+@COND_i386_pc_TRUE@am__append_3042 = search_fs_file.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3043 =
+@COND_i386_pc_TRUE@am__append_3044 = $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3045 = \
+@COND_i386_pc_TRUE@ $(nodist_search_fs_file_module_SOURCES) \
+@COND_i386_pc_TRUE@ search_fs_file.marker
+@COND_i386_pc_TRUE@am__append_3046 = search_fs_file.mod
+@COND_i386_pc_TRUE@am__append_3047 = search_fs_file.marker
+@COND_i386_efi_TRUE@am__append_3048 = search_fs_file.module
+@COND_i386_efi_TRUE@am__append_3049 = search_fs_file.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3050 =
+@COND_i386_efi_TRUE@am__append_3051 = $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3052 = \
+@COND_i386_efi_TRUE@ $(nodist_search_fs_file_module_SOURCES) \
+@COND_i386_efi_TRUE@ search_fs_file.marker
+@COND_i386_efi_TRUE@am__append_3053 = search_fs_file.mod
+@COND_i386_efi_TRUE@am__append_3054 = search_fs_file.marker
+@COND_i386_qemu_TRUE@am__append_3055 = search_fs_file.module
+@COND_i386_qemu_TRUE@am__append_3056 = search_fs_file.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3057 =
+@COND_i386_qemu_TRUE@am__append_3058 = $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3059 = \
+@COND_i386_qemu_TRUE@ $(nodist_search_fs_file_module_SOURCES) \
+@COND_i386_qemu_TRUE@ search_fs_file.marker
+@COND_i386_qemu_TRUE@am__append_3060 = search_fs_file.mod
+@COND_i386_qemu_TRUE@am__append_3061 = search_fs_file.marker
+@COND_i386_coreboot_TRUE@am__append_3062 = search_fs_file.module
+@COND_i386_coreboot_TRUE@am__append_3063 = search_fs_file.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3064 =
+@COND_i386_coreboot_TRUE@am__append_3065 = $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3066 = $(nodist_search_fs_file_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ search_fs_file.marker
+@COND_i386_coreboot_TRUE@am__append_3067 = search_fs_file.mod
+@COND_i386_coreboot_TRUE@am__append_3068 = search_fs_file.marker
+@COND_i386_multiboot_TRUE@am__append_3069 = search_fs_file.module
+@COND_i386_multiboot_TRUE@am__append_3070 = search_fs_file.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3071 =
+@COND_i386_multiboot_TRUE@am__append_3072 = $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3073 = $(nodist_search_fs_file_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ search_fs_file.marker
+@COND_i386_multiboot_TRUE@am__append_3074 = search_fs_file.mod
+@COND_i386_multiboot_TRUE@am__append_3075 = search_fs_file.marker
+@COND_i386_ieee1275_TRUE@am__append_3076 = search_fs_file.module
+@COND_i386_ieee1275_TRUE@am__append_3077 = search_fs_file.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3078 =
+@COND_i386_ieee1275_TRUE@am__append_3079 = $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3080 = $(nodist_search_fs_file_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ search_fs_file.marker
+@COND_i386_ieee1275_TRUE@am__append_3081 = search_fs_file.mod
+@COND_i386_ieee1275_TRUE@am__append_3082 = search_fs_file.marker
+@COND_x86_64_efi_TRUE@am__append_3083 = search_fs_file.module
+@COND_x86_64_efi_TRUE@am__append_3084 = search_fs_file.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3085 =
+@COND_x86_64_efi_TRUE@am__append_3086 = $(nodist_search_fs_file_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3087 = \
+@COND_x86_64_efi_TRUE@ $(nodist_search_fs_file_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ search_fs_file.marker
+@COND_x86_64_efi_TRUE@am__append_3088 = search_fs_file.mod
+@COND_x86_64_efi_TRUE@am__append_3089 = search_fs_file.marker
+@COND_mips_yeeloong_TRUE@am__append_3090 = search_fs_file.module
+@COND_mips_yeeloong_TRUE@am__append_3091 = search_fs_file.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3092 =
+@COND_mips_yeeloong_TRUE@am__append_3093 = $(nodist_search_fs_file_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3094 = $(nodist_search_fs_file_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ search_fs_file.marker
+@COND_mips_yeeloong_TRUE@am__append_3095 = search_fs_file.mod
+@COND_mips_yeeloong_TRUE@am__append_3096 = search_fs_file.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3097 = search_fs_file.module
+@COND_sparc64_ieee1275_TRUE@am__append_3098 = search_fs_file.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3099 =
+@COND_sparc64_ieee1275_TRUE@am__append_3100 = $(nodist_search_fs_file_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3101 = $(nodist_search_fs_file_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ search_fs_file.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3102 = search_fs_file.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3103 = search_fs_file.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3104 = search_fs_file.module
+@COND_powerpc_ieee1275_TRUE@am__append_3105 = search_fs_file.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3106 =
+@COND_powerpc_ieee1275_TRUE@am__append_3107 = $(nodist_search_fs_file_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3108 = $(nodist_search_fs_file_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ search_fs_file.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3109 = search_fs_file.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3110 = search_fs_file.marker
+@COND_emu_TRUE@am__append_3111 = search_fs_uuid.module
+@COND_emu_TRUE@am__append_3112 = search_fs_uuid.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3113 =
+@COND_emu_TRUE@am__append_3114 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_emu_TRUE@am__append_3115 = \
+@COND_emu_TRUE@ $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_emu_TRUE@ search_fs_uuid.marker
+@COND_emu_TRUE@am__append_3116 = search_fs_uuid.mod
+@COND_emu_TRUE@am__append_3117 = search_fs_uuid.marker
+@COND_i386_pc_TRUE@am__append_3118 = search_fs_uuid.module
+@COND_i386_pc_TRUE@am__append_3119 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3120 =
+@COND_i386_pc_TRUE@am__append_3121 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3122 = \
+@COND_i386_pc_TRUE@ $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_i386_pc_TRUE@ search_fs_uuid.marker
+@COND_i386_pc_TRUE@am__append_3123 = search_fs_uuid.mod
+@COND_i386_pc_TRUE@am__append_3124 = search_fs_uuid.marker
+@COND_i386_efi_TRUE@am__append_3125 = search_fs_uuid.module
+@COND_i386_efi_TRUE@am__append_3126 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3127 =
+@COND_i386_efi_TRUE@am__append_3128 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3129 = \
+@COND_i386_efi_TRUE@ $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_i386_efi_TRUE@ search_fs_uuid.marker
+@COND_i386_efi_TRUE@am__append_3130 = search_fs_uuid.mod
+@COND_i386_efi_TRUE@am__append_3131 = search_fs_uuid.marker
+@COND_i386_qemu_TRUE@am__append_3132 = search_fs_uuid.module
+@COND_i386_qemu_TRUE@am__append_3133 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3134 =
+@COND_i386_qemu_TRUE@am__append_3135 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3136 = \
+@COND_i386_qemu_TRUE@ $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_i386_qemu_TRUE@ search_fs_uuid.marker
+@COND_i386_qemu_TRUE@am__append_3137 = search_fs_uuid.mod
+@COND_i386_qemu_TRUE@am__append_3138 = search_fs_uuid.marker
+@COND_i386_coreboot_TRUE@am__append_3139 = search_fs_uuid.module
+@COND_i386_coreboot_TRUE@am__append_3140 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3141 =
+@COND_i386_coreboot_TRUE@am__append_3142 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3143 = $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ search_fs_uuid.marker
+@COND_i386_coreboot_TRUE@am__append_3144 = search_fs_uuid.mod
+@COND_i386_coreboot_TRUE@am__append_3145 = search_fs_uuid.marker
+@COND_i386_multiboot_TRUE@am__append_3146 = search_fs_uuid.module
+@COND_i386_multiboot_TRUE@am__append_3147 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3148 =
+@COND_i386_multiboot_TRUE@am__append_3149 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3150 = $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ search_fs_uuid.marker
+@COND_i386_multiboot_TRUE@am__append_3151 = search_fs_uuid.mod
+@COND_i386_multiboot_TRUE@am__append_3152 = search_fs_uuid.marker
+@COND_i386_ieee1275_TRUE@am__append_3153 = search_fs_uuid.module
+@COND_i386_ieee1275_TRUE@am__append_3154 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3155 =
+@COND_i386_ieee1275_TRUE@am__append_3156 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3157 = $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ search_fs_uuid.marker
+@COND_i386_ieee1275_TRUE@am__append_3158 = search_fs_uuid.mod
+@COND_i386_ieee1275_TRUE@am__append_3159 = search_fs_uuid.marker
+@COND_x86_64_efi_TRUE@am__append_3160 = search_fs_uuid.module
+@COND_x86_64_efi_TRUE@am__append_3161 = search_fs_uuid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3162 =
+@COND_x86_64_efi_TRUE@am__append_3163 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3164 = \
+@COND_x86_64_efi_TRUE@ $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ search_fs_uuid.marker
+@COND_x86_64_efi_TRUE@am__append_3165 = search_fs_uuid.mod
+@COND_x86_64_efi_TRUE@am__append_3166 = search_fs_uuid.marker
+@COND_mips_yeeloong_TRUE@am__append_3167 = search_fs_uuid.module
+@COND_mips_yeeloong_TRUE@am__append_3168 = search_fs_uuid.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3169 =
+@COND_mips_yeeloong_TRUE@am__append_3170 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3171 = $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ search_fs_uuid.marker
+@COND_mips_yeeloong_TRUE@am__append_3172 = search_fs_uuid.mod
+@COND_mips_yeeloong_TRUE@am__append_3173 = search_fs_uuid.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3174 = search_fs_uuid.module
+@COND_sparc64_ieee1275_TRUE@am__append_3175 = search_fs_uuid.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3176 =
+@COND_sparc64_ieee1275_TRUE@am__append_3177 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3178 = $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ search_fs_uuid.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3179 = search_fs_uuid.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3180 = search_fs_uuid.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3181 = search_fs_uuid.module
+@COND_powerpc_ieee1275_TRUE@am__append_3182 = search_fs_uuid.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3183 =
+@COND_powerpc_ieee1275_TRUE@am__append_3184 = $(nodist_search_fs_uuid_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3185 = $(nodist_search_fs_uuid_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ search_fs_uuid.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3186 = search_fs_uuid.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3187 = search_fs_uuid.marker
+@COND_emu_TRUE@am__append_3188 = search_label.module
+@COND_emu_TRUE@am__append_3189 = search_label.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3190 =
+@COND_emu_TRUE@am__append_3191 = $(nodist_search_label_module_SOURCES)
+@COND_emu_TRUE@am__append_3192 = \
+@COND_emu_TRUE@ $(nodist_search_label_module_SOURCES) \
+@COND_emu_TRUE@ search_label.marker
+@COND_emu_TRUE@am__append_3193 = search_label.mod
+@COND_emu_TRUE@am__append_3194 = search_label.marker
+@COND_i386_pc_TRUE@am__append_3195 = search_label.module
+@COND_i386_pc_TRUE@am__append_3196 = search_label.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3197 =
+@COND_i386_pc_TRUE@am__append_3198 = $(nodist_search_label_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3199 = \
+@COND_i386_pc_TRUE@ $(nodist_search_label_module_SOURCES) \
+@COND_i386_pc_TRUE@ search_label.marker
+@COND_i386_pc_TRUE@am__append_3200 = search_label.mod
+@COND_i386_pc_TRUE@am__append_3201 = search_label.marker
+@COND_i386_efi_TRUE@am__append_3202 = search_label.module
+@COND_i386_efi_TRUE@am__append_3203 = search_label.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3204 =
+@COND_i386_efi_TRUE@am__append_3205 = $(nodist_search_label_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3206 = \
+@COND_i386_efi_TRUE@ $(nodist_search_label_module_SOURCES) \
+@COND_i386_efi_TRUE@ search_label.marker
+@COND_i386_efi_TRUE@am__append_3207 = search_label.mod
+@COND_i386_efi_TRUE@am__append_3208 = search_label.marker
+@COND_i386_qemu_TRUE@am__append_3209 = search_label.module
+@COND_i386_qemu_TRUE@am__append_3210 = search_label.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3211 =
+@COND_i386_qemu_TRUE@am__append_3212 = $(nodist_search_label_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3213 = \
+@COND_i386_qemu_TRUE@ $(nodist_search_label_module_SOURCES) \
+@COND_i386_qemu_TRUE@ search_label.marker
+@COND_i386_qemu_TRUE@am__append_3214 = search_label.mod
+@COND_i386_qemu_TRUE@am__append_3215 = search_label.marker
+@COND_i386_coreboot_TRUE@am__append_3216 = search_label.module
+@COND_i386_coreboot_TRUE@am__append_3217 = search_label.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3218 =
+@COND_i386_coreboot_TRUE@am__append_3219 = $(nodist_search_label_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3220 = $(nodist_search_label_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ search_label.marker
+@COND_i386_coreboot_TRUE@am__append_3221 = search_label.mod
+@COND_i386_coreboot_TRUE@am__append_3222 = search_label.marker
+@COND_i386_multiboot_TRUE@am__append_3223 = search_label.module
+@COND_i386_multiboot_TRUE@am__append_3224 = search_label.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3225 =
+@COND_i386_multiboot_TRUE@am__append_3226 = $(nodist_search_label_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3227 = $(nodist_search_label_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ search_label.marker
+@COND_i386_multiboot_TRUE@am__append_3228 = search_label.mod
+@COND_i386_multiboot_TRUE@am__append_3229 = search_label.marker
+@COND_i386_ieee1275_TRUE@am__append_3230 = search_label.module
+@COND_i386_ieee1275_TRUE@am__append_3231 = search_label.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3232 =
+@COND_i386_ieee1275_TRUE@am__append_3233 = $(nodist_search_label_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3234 = $(nodist_search_label_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ search_label.marker
+@COND_i386_ieee1275_TRUE@am__append_3235 = search_label.mod
+@COND_i386_ieee1275_TRUE@am__append_3236 = search_label.marker
+@COND_x86_64_efi_TRUE@am__append_3237 = search_label.module
+@COND_x86_64_efi_TRUE@am__append_3238 = search_label.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3239 =
+@COND_x86_64_efi_TRUE@am__append_3240 = $(nodist_search_label_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3241 = \
+@COND_x86_64_efi_TRUE@ $(nodist_search_label_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ search_label.marker
+@COND_x86_64_efi_TRUE@am__append_3242 = search_label.mod
+@COND_x86_64_efi_TRUE@am__append_3243 = search_label.marker
+@COND_mips_yeeloong_TRUE@am__append_3244 = search_label.module
+@COND_mips_yeeloong_TRUE@am__append_3245 = search_label.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3246 =
+@COND_mips_yeeloong_TRUE@am__append_3247 = $(nodist_search_label_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3248 = $(nodist_search_label_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ search_label.marker
+@COND_mips_yeeloong_TRUE@am__append_3249 = search_label.mod
+@COND_mips_yeeloong_TRUE@am__append_3250 = search_label.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3251 = search_label.module
+@COND_sparc64_ieee1275_TRUE@am__append_3252 = search_label.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3253 =
+@COND_sparc64_ieee1275_TRUE@am__append_3254 = $(nodist_search_label_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3255 = $(nodist_search_label_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ search_label.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3256 = search_label.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3257 = search_label.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3258 = search_label.module
+@COND_powerpc_ieee1275_TRUE@am__append_3259 = search_label.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3260 =
+@COND_powerpc_ieee1275_TRUE@am__append_3261 = $(nodist_search_label_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3262 = $(nodist_search_label_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ search_label.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3263 = search_label.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3264 = search_label.marker
+@COND_i386_pc_TRUE@am__append_3265 = setpci.module
+@COND_i386_pc_TRUE@am__append_3266 = setpci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3267 =
+@COND_i386_pc_TRUE@am__append_3268 = $(nodist_setpci_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3269 = $(nodist_setpci_module_SOURCES) \
+@COND_i386_pc_TRUE@ setpci.marker
+@COND_i386_pc_TRUE@am__append_3270 = setpci.mod
+@COND_i386_pc_TRUE@am__append_3271 = setpci.marker
+@COND_i386_efi_TRUE@am__append_3272 = setpci.module
+@COND_i386_efi_TRUE@am__append_3273 = setpci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3274 =
+@COND_i386_efi_TRUE@am__append_3275 = $(nodist_setpci_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3276 = $(nodist_setpci_module_SOURCES) \
+@COND_i386_efi_TRUE@ setpci.marker
+@COND_i386_efi_TRUE@am__append_3277 = setpci.mod
+@COND_i386_efi_TRUE@am__append_3278 = setpci.marker
+@COND_i386_qemu_TRUE@am__append_3279 = setpci.module
+@COND_i386_qemu_TRUE@am__append_3280 = setpci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3281 =
+@COND_i386_qemu_TRUE@am__append_3282 = $(nodist_setpci_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3283 = \
+@COND_i386_qemu_TRUE@ $(nodist_setpci_module_SOURCES) \
+@COND_i386_qemu_TRUE@ setpci.marker
+@COND_i386_qemu_TRUE@am__append_3284 = setpci.mod
+@COND_i386_qemu_TRUE@am__append_3285 = setpci.marker
+@COND_i386_coreboot_TRUE@am__append_3286 = setpci.module
+@COND_i386_coreboot_TRUE@am__append_3287 = setpci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3288 =
+@COND_i386_coreboot_TRUE@am__append_3289 = $(nodist_setpci_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3290 = \
+@COND_i386_coreboot_TRUE@ $(nodist_setpci_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ setpci.marker
+@COND_i386_coreboot_TRUE@am__append_3291 = setpci.mod
+@COND_i386_coreboot_TRUE@am__append_3292 = setpci.marker
+@COND_i386_multiboot_TRUE@am__append_3293 = setpci.module
+@COND_i386_multiboot_TRUE@am__append_3294 = setpci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3295 =
+@COND_i386_multiboot_TRUE@am__append_3296 = $(nodist_setpci_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3297 = \
+@COND_i386_multiboot_TRUE@ $(nodist_setpci_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ setpci.marker
+@COND_i386_multiboot_TRUE@am__append_3298 = setpci.mod
+@COND_i386_multiboot_TRUE@am__append_3299 = setpci.marker
+@COND_i386_ieee1275_TRUE@am__append_3300 = setpci.module
+@COND_i386_ieee1275_TRUE@am__append_3301 = setpci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3302 =
+@COND_i386_ieee1275_TRUE@am__append_3303 = $(nodist_setpci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3304 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_setpci_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ setpci.marker
+@COND_i386_ieee1275_TRUE@am__append_3305 = setpci.mod
+@COND_i386_ieee1275_TRUE@am__append_3306 = setpci.marker
+@COND_x86_64_efi_TRUE@am__append_3307 = setpci.module
+@COND_x86_64_efi_TRUE@am__append_3308 = setpci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3309 =
+@COND_x86_64_efi_TRUE@am__append_3310 = $(nodist_setpci_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3311 = \
+@COND_x86_64_efi_TRUE@ $(nodist_setpci_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ setpci.marker
+@COND_x86_64_efi_TRUE@am__append_3312 = setpci.mod
+@COND_x86_64_efi_TRUE@am__append_3313 = setpci.marker
+@COND_emu_TRUE@am__append_3314 = sleep.module
+@COND_emu_TRUE@am__append_3315 = sleep.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3316 =
+@COND_emu_TRUE@am__append_3317 = $(nodist_sleep_module_SOURCES)
+@COND_emu_TRUE@am__append_3318 = $(nodist_sleep_module_SOURCES) \
+@COND_emu_TRUE@ sleep.marker
+@COND_emu_TRUE@am__append_3319 = sleep.mod
+@COND_emu_TRUE@am__append_3320 = sleep.marker
+@COND_i386_pc_TRUE@am__append_3321 = sleep.module
+@COND_i386_pc_TRUE@am__append_3322 = sleep.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3323 =
+@COND_i386_pc_TRUE@am__append_3324 = $(nodist_sleep_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3325 = $(nodist_sleep_module_SOURCES) \
+@COND_i386_pc_TRUE@ sleep.marker
+@COND_i386_pc_TRUE@am__append_3326 = sleep.mod
+@COND_i386_pc_TRUE@am__append_3327 = sleep.marker
+@COND_i386_efi_TRUE@am__append_3328 = sleep.module
+@COND_i386_efi_TRUE@am__append_3329 = sleep.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3330 =
+@COND_i386_efi_TRUE@am__append_3331 = $(nodist_sleep_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3332 = $(nodist_sleep_module_SOURCES) \
+@COND_i386_efi_TRUE@ sleep.marker
+@COND_i386_efi_TRUE@am__append_3333 = sleep.mod
+@COND_i386_efi_TRUE@am__append_3334 = sleep.marker
+@COND_i386_qemu_TRUE@am__append_3335 = sleep.module
+@COND_i386_qemu_TRUE@am__append_3336 = sleep.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3337 =
+@COND_i386_qemu_TRUE@am__append_3338 = $(nodist_sleep_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3339 = $(nodist_sleep_module_SOURCES) \
+@COND_i386_qemu_TRUE@ sleep.marker
+@COND_i386_qemu_TRUE@am__append_3340 = sleep.mod
+@COND_i386_qemu_TRUE@am__append_3341 = sleep.marker
+@COND_i386_coreboot_TRUE@am__append_3342 = sleep.module
+@COND_i386_coreboot_TRUE@am__append_3343 = sleep.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3344 =
+@COND_i386_coreboot_TRUE@am__append_3345 = $(nodist_sleep_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3346 = \
+@COND_i386_coreboot_TRUE@ $(nodist_sleep_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ sleep.marker
+@COND_i386_coreboot_TRUE@am__append_3347 = sleep.mod
+@COND_i386_coreboot_TRUE@am__append_3348 = sleep.marker
+@COND_i386_multiboot_TRUE@am__append_3349 = sleep.module
+@COND_i386_multiboot_TRUE@am__append_3350 = sleep.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3351 =
+@COND_i386_multiboot_TRUE@am__append_3352 = $(nodist_sleep_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3353 = \
+@COND_i386_multiboot_TRUE@ $(nodist_sleep_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ sleep.marker
+@COND_i386_multiboot_TRUE@am__append_3354 = sleep.mod
+@COND_i386_multiboot_TRUE@am__append_3355 = sleep.marker
+@COND_i386_ieee1275_TRUE@am__append_3356 = sleep.module
+@COND_i386_ieee1275_TRUE@am__append_3357 = sleep.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3358 =
+@COND_i386_ieee1275_TRUE@am__append_3359 = $(nodist_sleep_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3360 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_sleep_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ sleep.marker
+@COND_i386_ieee1275_TRUE@am__append_3361 = sleep.mod
+@COND_i386_ieee1275_TRUE@am__append_3362 = sleep.marker
+@COND_x86_64_efi_TRUE@am__append_3363 = sleep.module
+@COND_x86_64_efi_TRUE@am__append_3364 = sleep.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3365 =
+@COND_x86_64_efi_TRUE@am__append_3366 = $(nodist_sleep_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3367 = \
+@COND_x86_64_efi_TRUE@ $(nodist_sleep_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ sleep.marker
+@COND_x86_64_efi_TRUE@am__append_3368 = sleep.mod
+@COND_x86_64_efi_TRUE@am__append_3369 = sleep.marker
+@COND_mips_yeeloong_TRUE@am__append_3370 = sleep.module
+@COND_mips_yeeloong_TRUE@am__append_3371 = sleep.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3372 =
+@COND_mips_yeeloong_TRUE@am__append_3373 = $(nodist_sleep_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3374 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_sleep_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ sleep.marker
+@COND_mips_yeeloong_TRUE@am__append_3375 = sleep.mod
+@COND_mips_yeeloong_TRUE@am__append_3376 = sleep.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3377 = sleep.module
+@COND_sparc64_ieee1275_TRUE@am__append_3378 = sleep.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3379 =
+@COND_sparc64_ieee1275_TRUE@am__append_3380 = $(nodist_sleep_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3381 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_sleep_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ sleep.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3382 = sleep.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3383 = sleep.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3384 = sleep.module
+@COND_powerpc_ieee1275_TRUE@am__append_3385 = sleep.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3386 =
+@COND_powerpc_ieee1275_TRUE@am__append_3387 = $(nodist_sleep_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3388 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_sleep_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ sleep.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3389 = sleep.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3390 = sleep.marker
+@COND_i386_ieee1275_TRUE@am__append_3391 = suspend.module
+@COND_i386_ieee1275_TRUE@am__append_3392 = suspend.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3393 =
+@COND_i386_ieee1275_TRUE@am__append_3394 = $(nodist_suspend_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3395 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_suspend_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ suspend.marker
+@COND_i386_ieee1275_TRUE@am__append_3396 = suspend.mod
+@COND_i386_ieee1275_TRUE@am__append_3397 = suspend.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3398 = suspend.module
+@COND_powerpc_ieee1275_TRUE@am__append_3399 = suspend.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3400 =
+@COND_powerpc_ieee1275_TRUE@am__append_3401 = $(nodist_suspend_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3402 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_suspend_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ suspend.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3403 = suspend.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3404 = suspend.marker
+@COND_emu_TRUE@am__append_3405 = terminal.module
+@COND_emu_TRUE@am__append_3406 = terminal.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3407 =
+@COND_emu_TRUE@am__append_3408 = $(nodist_terminal_module_SOURCES)
+@COND_emu_TRUE@am__append_3409 = $(nodist_terminal_module_SOURCES) \
+@COND_emu_TRUE@ terminal.marker
+@COND_emu_TRUE@am__append_3410 = terminal.mod
+@COND_emu_TRUE@am__append_3411 = terminal.marker
+@COND_i386_pc_TRUE@am__append_3412 = terminal.module
+@COND_i386_pc_TRUE@am__append_3413 = terminal.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3414 =
+@COND_i386_pc_TRUE@am__append_3415 = $(nodist_terminal_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3416 = \
+@COND_i386_pc_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_i386_pc_TRUE@ terminal.marker
+@COND_i386_pc_TRUE@am__append_3417 = terminal.mod
+@COND_i386_pc_TRUE@am__append_3418 = terminal.marker
+@COND_i386_efi_TRUE@am__append_3419 = terminal.module
+@COND_i386_efi_TRUE@am__append_3420 = terminal.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3421 =
+@COND_i386_efi_TRUE@am__append_3422 = $(nodist_terminal_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3423 = \
+@COND_i386_efi_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_i386_efi_TRUE@ terminal.marker
+@COND_i386_efi_TRUE@am__append_3424 = terminal.mod
+@COND_i386_efi_TRUE@am__append_3425 = terminal.marker
+@COND_i386_qemu_TRUE@am__append_3426 = terminal.module
+@COND_i386_qemu_TRUE@am__append_3427 = terminal.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3428 =
+@COND_i386_qemu_TRUE@am__append_3429 = $(nodist_terminal_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3430 = \
+@COND_i386_qemu_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_i386_qemu_TRUE@ terminal.marker
+@COND_i386_qemu_TRUE@am__append_3431 = terminal.mod
+@COND_i386_qemu_TRUE@am__append_3432 = terminal.marker
+@COND_i386_coreboot_TRUE@am__append_3433 = terminal.module
+@COND_i386_coreboot_TRUE@am__append_3434 = terminal.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3435 =
+@COND_i386_coreboot_TRUE@am__append_3436 = $(nodist_terminal_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3437 = \
+@COND_i386_coreboot_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ terminal.marker
+@COND_i386_coreboot_TRUE@am__append_3438 = terminal.mod
+@COND_i386_coreboot_TRUE@am__append_3439 = terminal.marker
+@COND_i386_multiboot_TRUE@am__append_3440 = terminal.module
+@COND_i386_multiboot_TRUE@am__append_3441 = terminal.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3442 =
+@COND_i386_multiboot_TRUE@am__append_3443 = $(nodist_terminal_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3444 = \
+@COND_i386_multiboot_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ terminal.marker
+@COND_i386_multiboot_TRUE@am__append_3445 = terminal.mod
+@COND_i386_multiboot_TRUE@am__append_3446 = terminal.marker
+@COND_i386_ieee1275_TRUE@am__append_3447 = terminal.module
+@COND_i386_ieee1275_TRUE@am__append_3448 = terminal.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3449 =
+@COND_i386_ieee1275_TRUE@am__append_3450 = $(nodist_terminal_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3451 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ terminal.marker
+@COND_i386_ieee1275_TRUE@am__append_3452 = terminal.mod
+@COND_i386_ieee1275_TRUE@am__append_3453 = terminal.marker
+@COND_x86_64_efi_TRUE@am__append_3454 = terminal.module
+@COND_x86_64_efi_TRUE@am__append_3455 = terminal.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3456 =
+@COND_x86_64_efi_TRUE@am__append_3457 = $(nodist_terminal_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3458 = \
+@COND_x86_64_efi_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ terminal.marker
+@COND_x86_64_efi_TRUE@am__append_3459 = terminal.mod
+@COND_x86_64_efi_TRUE@am__append_3460 = terminal.marker
+@COND_mips_yeeloong_TRUE@am__append_3461 = terminal.module
+@COND_mips_yeeloong_TRUE@am__append_3462 = terminal.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3463 =
+@COND_mips_yeeloong_TRUE@am__append_3464 = $(nodist_terminal_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3465 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ terminal.marker
+@COND_mips_yeeloong_TRUE@am__append_3466 = terminal.mod
+@COND_mips_yeeloong_TRUE@am__append_3467 = terminal.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3468 = terminal.module
+@COND_sparc64_ieee1275_TRUE@am__append_3469 = terminal.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3470 =
+@COND_sparc64_ieee1275_TRUE@am__append_3471 = $(nodist_terminal_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3472 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ terminal.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3473 = terminal.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3474 = terminal.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3475 = terminal.module
+@COND_powerpc_ieee1275_TRUE@am__append_3476 = terminal.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3477 =
+@COND_powerpc_ieee1275_TRUE@am__append_3478 = $(nodist_terminal_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3479 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_terminal_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ terminal.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3480 = terminal.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3481 = terminal.marker
+@COND_emu_TRUE@am__append_3482 = test.module
+@COND_emu_TRUE@am__append_3483 = test.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3484 =
+@COND_emu_TRUE@am__append_3485 = $(nodist_test_module_SOURCES)
+@COND_emu_TRUE@am__append_3486 = $(nodist_test_module_SOURCES) \
+@COND_emu_TRUE@ test.marker
+@COND_emu_TRUE@am__append_3487 = test.mod
+@COND_emu_TRUE@am__append_3488 = test.marker
+@COND_i386_pc_TRUE@am__append_3489 = test.module
+@COND_i386_pc_TRUE@am__append_3490 = test.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3491 =
+@COND_i386_pc_TRUE@am__append_3492 = $(nodist_test_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3493 = $(nodist_test_module_SOURCES) \
+@COND_i386_pc_TRUE@ test.marker
+@COND_i386_pc_TRUE@am__append_3494 = test.mod
+@COND_i386_pc_TRUE@am__append_3495 = test.marker
+@COND_i386_efi_TRUE@am__append_3496 = test.module
+@COND_i386_efi_TRUE@am__append_3497 = test.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3498 =
+@COND_i386_efi_TRUE@am__append_3499 = $(nodist_test_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3500 = $(nodist_test_module_SOURCES) \
+@COND_i386_efi_TRUE@ test.marker
+@COND_i386_efi_TRUE@am__append_3501 = test.mod
+@COND_i386_efi_TRUE@am__append_3502 = test.marker
+@COND_i386_qemu_TRUE@am__append_3503 = test.module
+@COND_i386_qemu_TRUE@am__append_3504 = test.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3505 =
+@COND_i386_qemu_TRUE@am__append_3506 = $(nodist_test_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3507 = $(nodist_test_module_SOURCES) \
+@COND_i386_qemu_TRUE@ test.marker
+@COND_i386_qemu_TRUE@am__append_3508 = test.mod
+@COND_i386_qemu_TRUE@am__append_3509 = test.marker
+@COND_i386_coreboot_TRUE@am__append_3510 = test.module
+@COND_i386_coreboot_TRUE@am__append_3511 = test.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3512 =
+@COND_i386_coreboot_TRUE@am__append_3513 = $(nodist_test_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3514 = \
+@COND_i386_coreboot_TRUE@ $(nodist_test_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ test.marker
+@COND_i386_coreboot_TRUE@am__append_3515 = test.mod
+@COND_i386_coreboot_TRUE@am__append_3516 = test.marker
+@COND_i386_multiboot_TRUE@am__append_3517 = test.module
+@COND_i386_multiboot_TRUE@am__append_3518 = test.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3519 =
+@COND_i386_multiboot_TRUE@am__append_3520 = $(nodist_test_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3521 = \
+@COND_i386_multiboot_TRUE@ $(nodist_test_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ test.marker
+@COND_i386_multiboot_TRUE@am__append_3522 = test.mod
+@COND_i386_multiboot_TRUE@am__append_3523 = test.marker
+@COND_i386_ieee1275_TRUE@am__append_3524 = test.module
+@COND_i386_ieee1275_TRUE@am__append_3525 = test.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3526 =
+@COND_i386_ieee1275_TRUE@am__append_3527 = $(nodist_test_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3528 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_test_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ test.marker
+@COND_i386_ieee1275_TRUE@am__append_3529 = test.mod
+@COND_i386_ieee1275_TRUE@am__append_3530 = test.marker
+@COND_x86_64_efi_TRUE@am__append_3531 = test.module
+@COND_x86_64_efi_TRUE@am__append_3532 = test.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3533 =
+@COND_x86_64_efi_TRUE@am__append_3534 = $(nodist_test_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3535 = $(nodist_test_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ test.marker
+@COND_x86_64_efi_TRUE@am__append_3536 = test.mod
+@COND_x86_64_efi_TRUE@am__append_3537 = test.marker
+@COND_mips_yeeloong_TRUE@am__append_3538 = test.module
+@COND_mips_yeeloong_TRUE@am__append_3539 = test.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3540 =
+@COND_mips_yeeloong_TRUE@am__append_3541 = $(nodist_test_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3542 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_test_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ test.marker
+@COND_mips_yeeloong_TRUE@am__append_3543 = test.mod
+@COND_mips_yeeloong_TRUE@am__append_3544 = test.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3545 = test.module
+@COND_sparc64_ieee1275_TRUE@am__append_3546 = test.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3547 =
+@COND_sparc64_ieee1275_TRUE@am__append_3548 = $(nodist_test_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3549 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_test_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ test.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3550 = test.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3551 = test.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3552 = test.module
+@COND_powerpc_ieee1275_TRUE@am__append_3553 = test.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3554 =
+@COND_powerpc_ieee1275_TRUE@am__append_3555 = $(nodist_test_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3556 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_test_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ test.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3557 = test.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3558 = test.marker
+@COND_emu_TRUE@am__append_3559 = true.module
+@COND_emu_TRUE@am__append_3560 = true.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3561 =
+@COND_emu_TRUE@am__append_3562 = $(nodist_true_module_SOURCES)
+@COND_emu_TRUE@am__append_3563 = $(nodist_true_module_SOURCES) \
+@COND_emu_TRUE@ true.marker
+@COND_emu_TRUE@am__append_3564 = true.mod
+@COND_emu_TRUE@am__append_3565 = true.marker
+@COND_i386_pc_TRUE@am__append_3566 = true.module
+@COND_i386_pc_TRUE@am__append_3567 = true.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3568 =
+@COND_i386_pc_TRUE@am__append_3569 = $(nodist_true_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3570 = $(nodist_true_module_SOURCES) \
+@COND_i386_pc_TRUE@ true.marker
+@COND_i386_pc_TRUE@am__append_3571 = true.mod
+@COND_i386_pc_TRUE@am__append_3572 = true.marker
+@COND_i386_efi_TRUE@am__append_3573 = true.module
+@COND_i386_efi_TRUE@am__append_3574 = true.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3575 =
+@COND_i386_efi_TRUE@am__append_3576 = $(nodist_true_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3577 = $(nodist_true_module_SOURCES) \
+@COND_i386_efi_TRUE@ true.marker
+@COND_i386_efi_TRUE@am__append_3578 = true.mod
+@COND_i386_efi_TRUE@am__append_3579 = true.marker
+@COND_i386_qemu_TRUE@am__append_3580 = true.module
+@COND_i386_qemu_TRUE@am__append_3581 = true.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3582 =
+@COND_i386_qemu_TRUE@am__append_3583 = $(nodist_true_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3584 = $(nodist_true_module_SOURCES) \
+@COND_i386_qemu_TRUE@ true.marker
+@COND_i386_qemu_TRUE@am__append_3585 = true.mod
+@COND_i386_qemu_TRUE@am__append_3586 = true.marker
+@COND_i386_coreboot_TRUE@am__append_3587 = true.module
+@COND_i386_coreboot_TRUE@am__append_3588 = true.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3589 =
+@COND_i386_coreboot_TRUE@am__append_3590 = $(nodist_true_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3591 = \
+@COND_i386_coreboot_TRUE@ $(nodist_true_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ true.marker
+@COND_i386_coreboot_TRUE@am__append_3592 = true.mod
+@COND_i386_coreboot_TRUE@am__append_3593 = true.marker
+@COND_i386_multiboot_TRUE@am__append_3594 = true.module
+@COND_i386_multiboot_TRUE@am__append_3595 = true.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3596 =
+@COND_i386_multiboot_TRUE@am__append_3597 = $(nodist_true_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3598 = \
+@COND_i386_multiboot_TRUE@ $(nodist_true_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ true.marker
+@COND_i386_multiboot_TRUE@am__append_3599 = true.mod
+@COND_i386_multiboot_TRUE@am__append_3600 = true.marker
+@COND_i386_ieee1275_TRUE@am__append_3601 = true.module
+@COND_i386_ieee1275_TRUE@am__append_3602 = true.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3603 =
+@COND_i386_ieee1275_TRUE@am__append_3604 = $(nodist_true_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3605 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_true_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ true.marker
+@COND_i386_ieee1275_TRUE@am__append_3606 = true.mod
+@COND_i386_ieee1275_TRUE@am__append_3607 = true.marker
+@COND_x86_64_efi_TRUE@am__append_3608 = true.module
+@COND_x86_64_efi_TRUE@am__append_3609 = true.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3610 =
+@COND_x86_64_efi_TRUE@am__append_3611 = $(nodist_true_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3612 = $(nodist_true_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ true.marker
+@COND_x86_64_efi_TRUE@am__append_3613 = true.mod
+@COND_x86_64_efi_TRUE@am__append_3614 = true.marker
+@COND_mips_yeeloong_TRUE@am__append_3615 = true.module
+@COND_mips_yeeloong_TRUE@am__append_3616 = true.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3617 =
+@COND_mips_yeeloong_TRUE@am__append_3618 = $(nodist_true_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3619 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_true_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ true.marker
+@COND_mips_yeeloong_TRUE@am__append_3620 = true.mod
+@COND_mips_yeeloong_TRUE@am__append_3621 = true.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3622 = true.module
+@COND_sparc64_ieee1275_TRUE@am__append_3623 = true.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3624 =
+@COND_sparc64_ieee1275_TRUE@am__append_3625 = $(nodist_true_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3626 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_true_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ true.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3627 = true.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3628 = true.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3629 = true.module
+@COND_powerpc_ieee1275_TRUE@am__append_3630 = true.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3631 =
+@COND_powerpc_ieee1275_TRUE@am__append_3632 = $(nodist_true_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3633 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_true_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ true.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3634 = true.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3635 = true.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_3636 = usbtest.module
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_3637 = usbtest.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_3638 =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_3639 = $(nodist_usbtest_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_3640 = $(nodist_usbtest_module_SOURCES) \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ usbtest.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_3641 = usbtest.mod
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_3642 = usbtest.marker
+@COND_i386_pc_TRUE@am__append_3643 = usbtest.module
+@COND_i386_pc_TRUE@am__append_3644 = usbtest.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3645 =
+@COND_i386_pc_TRUE@am__append_3646 = $(nodist_usbtest_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3647 = $(nodist_usbtest_module_SOURCES) \
+@COND_i386_pc_TRUE@ usbtest.marker
+@COND_i386_pc_TRUE@am__append_3648 = usbtest.mod
+@COND_i386_pc_TRUE@am__append_3649 = usbtest.marker
+@COND_i386_efi_TRUE@am__append_3650 = usbtest.module
+@COND_i386_efi_TRUE@am__append_3651 = usbtest.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3652 =
+@COND_i386_efi_TRUE@am__append_3653 = $(nodist_usbtest_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3654 = \
+@COND_i386_efi_TRUE@ $(nodist_usbtest_module_SOURCES) \
+@COND_i386_efi_TRUE@ usbtest.marker
+@COND_i386_efi_TRUE@am__append_3655 = usbtest.mod
+@COND_i386_efi_TRUE@am__append_3656 = usbtest.marker
+@COND_i386_qemu_TRUE@am__append_3657 = usbtest.module
+@COND_i386_qemu_TRUE@am__append_3658 = usbtest.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3659 =
+@COND_i386_qemu_TRUE@am__append_3660 = $(nodist_usbtest_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3661 = \
+@COND_i386_qemu_TRUE@ $(nodist_usbtest_module_SOURCES) \
+@COND_i386_qemu_TRUE@ usbtest.marker
+@COND_i386_qemu_TRUE@am__append_3662 = usbtest.mod
+@COND_i386_qemu_TRUE@am__append_3663 = usbtest.marker
+@COND_i386_coreboot_TRUE@am__append_3664 = usbtest.module
+@COND_i386_coreboot_TRUE@am__append_3665 = usbtest.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3666 =
+@COND_i386_coreboot_TRUE@am__append_3667 = $(nodist_usbtest_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3668 = \
+@COND_i386_coreboot_TRUE@ $(nodist_usbtest_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ usbtest.marker
+@COND_i386_coreboot_TRUE@am__append_3669 = usbtest.mod
+@COND_i386_coreboot_TRUE@am__append_3670 = usbtest.marker
+@COND_i386_multiboot_TRUE@am__append_3671 = usbtest.module
+@COND_i386_multiboot_TRUE@am__append_3672 = usbtest.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3673 =
+@COND_i386_multiboot_TRUE@am__append_3674 = $(nodist_usbtest_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3675 = \
+@COND_i386_multiboot_TRUE@ $(nodist_usbtest_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ usbtest.marker
+@COND_i386_multiboot_TRUE@am__append_3676 = usbtest.mod
+@COND_i386_multiboot_TRUE@am__append_3677 = usbtest.marker
+@COND_i386_ieee1275_TRUE@am__append_3678 = usbtest.module
+@COND_i386_ieee1275_TRUE@am__append_3679 = usbtest.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3680 =
+@COND_i386_ieee1275_TRUE@am__append_3681 = $(nodist_usbtest_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3682 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_usbtest_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ usbtest.marker
+@COND_i386_ieee1275_TRUE@am__append_3683 = usbtest.mod
+@COND_i386_ieee1275_TRUE@am__append_3684 = usbtest.marker
+@COND_x86_64_efi_TRUE@am__append_3685 = usbtest.module
+@COND_x86_64_efi_TRUE@am__append_3686 = usbtest.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3687 =
+@COND_x86_64_efi_TRUE@am__append_3688 = $(nodist_usbtest_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3689 = \
+@COND_x86_64_efi_TRUE@ $(nodist_usbtest_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ usbtest.marker
+@COND_x86_64_efi_TRUE@am__append_3690 = usbtest.mod
+@COND_x86_64_efi_TRUE@am__append_3691 = usbtest.marker
+@COND_mips_yeeloong_TRUE@am__append_3692 = usbtest.module
+@COND_mips_yeeloong_TRUE@am__append_3693 = usbtest.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3694 =
+@COND_mips_yeeloong_TRUE@am__append_3695 = $(nodist_usbtest_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3696 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_usbtest_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ usbtest.marker
+@COND_mips_yeeloong_TRUE@am__append_3697 = usbtest.mod
+@COND_mips_yeeloong_TRUE@am__append_3698 = usbtest.marker
+@COND_emu_TRUE@am__append_3699 = videoinfo.module
+@COND_emu_TRUE@am__append_3700 = videoinfo.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3701 =
+@COND_emu_TRUE@am__append_3702 = $(nodist_videoinfo_module_SOURCES)
+@COND_emu_TRUE@am__append_3703 = $(nodist_videoinfo_module_SOURCES) \
+@COND_emu_TRUE@ videoinfo.marker
+@COND_emu_TRUE@am__append_3704 = videoinfo.mod
+@COND_emu_TRUE@am__append_3705 = videoinfo.marker
+@COND_i386_pc_TRUE@am__append_3706 = videoinfo.module
+@COND_i386_pc_TRUE@am__append_3707 = videoinfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3708 =
+@COND_i386_pc_TRUE@am__append_3709 = $(nodist_videoinfo_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3710 = \
+@COND_i386_pc_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_i386_pc_TRUE@ videoinfo.marker
+@COND_i386_pc_TRUE@am__append_3711 = videoinfo.mod
+@COND_i386_pc_TRUE@am__append_3712 = videoinfo.marker
+@COND_i386_efi_TRUE@am__append_3713 = videoinfo.module
+@COND_i386_efi_TRUE@am__append_3714 = videoinfo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3715 =
+@COND_i386_efi_TRUE@am__append_3716 = $(nodist_videoinfo_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3717 = \
+@COND_i386_efi_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_i386_efi_TRUE@ videoinfo.marker
+@COND_i386_efi_TRUE@am__append_3718 = videoinfo.mod
+@COND_i386_efi_TRUE@am__append_3719 = videoinfo.marker
+@COND_i386_qemu_TRUE@am__append_3720 = videoinfo.module
+@COND_i386_qemu_TRUE@am__append_3721 = videoinfo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3722 =
+@COND_i386_qemu_TRUE@am__append_3723 = $(nodist_videoinfo_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3724 = \
+@COND_i386_qemu_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_i386_qemu_TRUE@ videoinfo.marker
+@COND_i386_qemu_TRUE@am__append_3725 = videoinfo.mod
+@COND_i386_qemu_TRUE@am__append_3726 = videoinfo.marker
+@COND_i386_coreboot_TRUE@am__append_3727 = videoinfo.module
+@COND_i386_coreboot_TRUE@am__append_3728 = videoinfo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3729 =
+@COND_i386_coreboot_TRUE@am__append_3730 = $(nodist_videoinfo_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3731 = \
+@COND_i386_coreboot_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ videoinfo.marker
+@COND_i386_coreboot_TRUE@am__append_3732 = videoinfo.mod
+@COND_i386_coreboot_TRUE@am__append_3733 = videoinfo.marker
+@COND_i386_multiboot_TRUE@am__append_3734 = videoinfo.module
+@COND_i386_multiboot_TRUE@am__append_3735 = videoinfo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3736 =
+@COND_i386_multiboot_TRUE@am__append_3737 = $(nodist_videoinfo_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3738 = \
+@COND_i386_multiboot_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ videoinfo.marker
+@COND_i386_multiboot_TRUE@am__append_3739 = videoinfo.mod
+@COND_i386_multiboot_TRUE@am__append_3740 = videoinfo.marker
+@COND_i386_ieee1275_TRUE@am__append_3741 = videoinfo.module
+@COND_i386_ieee1275_TRUE@am__append_3742 = videoinfo.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3743 =
+@COND_i386_ieee1275_TRUE@am__append_3744 = $(nodist_videoinfo_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3745 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ videoinfo.marker
+@COND_i386_ieee1275_TRUE@am__append_3746 = videoinfo.mod
+@COND_i386_ieee1275_TRUE@am__append_3747 = videoinfo.marker
+@COND_x86_64_efi_TRUE@am__append_3748 = videoinfo.module
+@COND_x86_64_efi_TRUE@am__append_3749 = videoinfo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3750 =
+@COND_x86_64_efi_TRUE@am__append_3751 = $(nodist_videoinfo_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3752 = \
+@COND_x86_64_efi_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ videoinfo.marker
+@COND_x86_64_efi_TRUE@am__append_3753 = videoinfo.mod
+@COND_x86_64_efi_TRUE@am__append_3754 = videoinfo.marker
+@COND_mips_yeeloong_TRUE@am__append_3755 = videoinfo.module
+@COND_mips_yeeloong_TRUE@am__append_3756 = videoinfo.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3757 =
+@COND_mips_yeeloong_TRUE@am__append_3758 = $(nodist_videoinfo_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3759 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_videoinfo_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ videoinfo.marker
+@COND_mips_yeeloong_TRUE@am__append_3760 = videoinfo.mod
+@COND_mips_yeeloong_TRUE@am__append_3761 = videoinfo.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3762 = videoinfo.module
+@COND_sparc64_ieee1275_TRUE@am__append_3763 = videoinfo.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3764 =
+@COND_sparc64_ieee1275_TRUE@am__append_3765 = $(nodist_videoinfo_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3766 = $(nodist_videoinfo_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ videoinfo.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3767 = videoinfo.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3768 = videoinfo.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3769 = videoinfo.module
+@COND_powerpc_ieee1275_TRUE@am__append_3770 = videoinfo.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3771 =
+@COND_powerpc_ieee1275_TRUE@am__append_3772 = $(nodist_videoinfo_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3773 = $(nodist_videoinfo_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ videoinfo.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3774 = videoinfo.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3775 = videoinfo.marker
+@COND_emu_TRUE@am__append_3776 = videotest.module
+@COND_emu_TRUE@am__append_3777 = videotest.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3778 =
+@COND_emu_TRUE@am__append_3779 = $(nodist_videotest_module_SOURCES)
+@COND_emu_TRUE@am__append_3780 = $(nodist_videotest_module_SOURCES) \
+@COND_emu_TRUE@ videotest.marker
+@COND_emu_TRUE@am__append_3781 = videotest.mod
+@COND_emu_TRUE@am__append_3782 = videotest.marker
+@COND_i386_pc_TRUE@am__append_3783 = videotest.module
+@COND_i386_pc_TRUE@am__append_3784 = videotest.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3785 =
+@COND_i386_pc_TRUE@am__append_3786 = $(nodist_videotest_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3787 = \
+@COND_i386_pc_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_i386_pc_TRUE@ videotest.marker
+@COND_i386_pc_TRUE@am__append_3788 = videotest.mod
+@COND_i386_pc_TRUE@am__append_3789 = videotest.marker
+@COND_i386_efi_TRUE@am__append_3790 = videotest.module
+@COND_i386_efi_TRUE@am__append_3791 = videotest.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3792 =
+@COND_i386_efi_TRUE@am__append_3793 = $(nodist_videotest_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3794 = \
+@COND_i386_efi_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_i386_efi_TRUE@ videotest.marker
+@COND_i386_efi_TRUE@am__append_3795 = videotest.mod
+@COND_i386_efi_TRUE@am__append_3796 = videotest.marker
+@COND_i386_qemu_TRUE@am__append_3797 = videotest.module
+@COND_i386_qemu_TRUE@am__append_3798 = videotest.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3799 =
+@COND_i386_qemu_TRUE@am__append_3800 = $(nodist_videotest_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3801 = \
+@COND_i386_qemu_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_i386_qemu_TRUE@ videotest.marker
+@COND_i386_qemu_TRUE@am__append_3802 = videotest.mod
+@COND_i386_qemu_TRUE@am__append_3803 = videotest.marker
+@COND_i386_coreboot_TRUE@am__append_3804 = videotest.module
+@COND_i386_coreboot_TRUE@am__append_3805 = videotest.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3806 =
+@COND_i386_coreboot_TRUE@am__append_3807 = $(nodist_videotest_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3808 = \
+@COND_i386_coreboot_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ videotest.marker
+@COND_i386_coreboot_TRUE@am__append_3809 = videotest.mod
+@COND_i386_coreboot_TRUE@am__append_3810 = videotest.marker
+@COND_i386_multiboot_TRUE@am__append_3811 = videotest.module
+@COND_i386_multiboot_TRUE@am__append_3812 = videotest.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3813 =
+@COND_i386_multiboot_TRUE@am__append_3814 = $(nodist_videotest_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3815 = \
+@COND_i386_multiboot_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ videotest.marker
+@COND_i386_multiboot_TRUE@am__append_3816 = videotest.mod
+@COND_i386_multiboot_TRUE@am__append_3817 = videotest.marker
+@COND_i386_ieee1275_TRUE@am__append_3818 = videotest.module
+@COND_i386_ieee1275_TRUE@am__append_3819 = videotest.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3820 =
+@COND_i386_ieee1275_TRUE@am__append_3821 = $(nodist_videotest_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3822 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ videotest.marker
+@COND_i386_ieee1275_TRUE@am__append_3823 = videotest.mod
+@COND_i386_ieee1275_TRUE@am__append_3824 = videotest.marker
+@COND_x86_64_efi_TRUE@am__append_3825 = videotest.module
+@COND_x86_64_efi_TRUE@am__append_3826 = videotest.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3827 =
+@COND_x86_64_efi_TRUE@am__append_3828 = $(nodist_videotest_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3829 = \
+@COND_x86_64_efi_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ videotest.marker
+@COND_x86_64_efi_TRUE@am__append_3830 = videotest.mod
+@COND_x86_64_efi_TRUE@am__append_3831 = videotest.marker
+@COND_mips_yeeloong_TRUE@am__append_3832 = videotest.module
+@COND_mips_yeeloong_TRUE@am__append_3833 = videotest.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3834 =
+@COND_mips_yeeloong_TRUE@am__append_3835 = $(nodist_videotest_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3836 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_videotest_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ videotest.marker
+@COND_mips_yeeloong_TRUE@am__append_3837 = videotest.mod
+@COND_mips_yeeloong_TRUE@am__append_3838 = videotest.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3839 = videotest.module
+@COND_sparc64_ieee1275_TRUE@am__append_3840 = videotest.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3841 =
+@COND_sparc64_ieee1275_TRUE@am__append_3842 = $(nodist_videotest_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3843 = $(nodist_videotest_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ videotest.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3844 = videotest.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3845 = videotest.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3846 = videotest.module
+@COND_powerpc_ieee1275_TRUE@am__append_3847 = videotest.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3848 =
+@COND_powerpc_ieee1275_TRUE@am__append_3849 = $(nodist_videotest_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3850 = $(nodist_videotest_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ videotest.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3851 = videotest.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3852 = videotest.marker
+@COND_emu_TRUE@am__append_3853 = xnu_uuid.module
+@COND_emu_TRUE@am__append_3854 = xnu_uuid.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3855 =
+@COND_emu_TRUE@am__append_3856 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_emu_TRUE@am__append_3857 = $(nodist_xnu_uuid_module_SOURCES) \
+@COND_emu_TRUE@ xnu_uuid.marker
+@COND_emu_TRUE@am__append_3858 = xnu_uuid.mod
+@COND_emu_TRUE@am__append_3859 = xnu_uuid.marker
+@COND_i386_pc_TRUE@am__append_3860 = xnu_uuid.module
+@COND_i386_pc_TRUE@am__append_3861 = xnu_uuid.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3862 =
+@COND_i386_pc_TRUE@am__append_3863 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3864 = \
+@COND_i386_pc_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_i386_pc_TRUE@ xnu_uuid.marker
+@COND_i386_pc_TRUE@am__append_3865 = xnu_uuid.mod
+@COND_i386_pc_TRUE@am__append_3866 = xnu_uuid.marker
+@COND_i386_efi_TRUE@am__append_3867 = xnu_uuid.module
+@COND_i386_efi_TRUE@am__append_3868 = xnu_uuid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3869 =
+@COND_i386_efi_TRUE@am__append_3870 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3871 = \
+@COND_i386_efi_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_i386_efi_TRUE@ xnu_uuid.marker
+@COND_i386_efi_TRUE@am__append_3872 = xnu_uuid.mod
+@COND_i386_efi_TRUE@am__append_3873 = xnu_uuid.marker
+@COND_i386_qemu_TRUE@am__append_3874 = xnu_uuid.module
+@COND_i386_qemu_TRUE@am__append_3875 = xnu_uuid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3876 =
+@COND_i386_qemu_TRUE@am__append_3877 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3878 = \
+@COND_i386_qemu_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_i386_qemu_TRUE@ xnu_uuid.marker
+@COND_i386_qemu_TRUE@am__append_3879 = xnu_uuid.mod
+@COND_i386_qemu_TRUE@am__append_3880 = xnu_uuid.marker
+@COND_i386_coreboot_TRUE@am__append_3881 = xnu_uuid.module
+@COND_i386_coreboot_TRUE@am__append_3882 = xnu_uuid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3883 =
+@COND_i386_coreboot_TRUE@am__append_3884 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3885 = \
+@COND_i386_coreboot_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ xnu_uuid.marker
+@COND_i386_coreboot_TRUE@am__append_3886 = xnu_uuid.mod
+@COND_i386_coreboot_TRUE@am__append_3887 = xnu_uuid.marker
+@COND_i386_multiboot_TRUE@am__append_3888 = xnu_uuid.module
+@COND_i386_multiboot_TRUE@am__append_3889 = xnu_uuid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3890 =
+@COND_i386_multiboot_TRUE@am__append_3891 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3892 = \
+@COND_i386_multiboot_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ xnu_uuid.marker
+@COND_i386_multiboot_TRUE@am__append_3893 = xnu_uuid.mod
+@COND_i386_multiboot_TRUE@am__append_3894 = xnu_uuid.marker
+@COND_i386_ieee1275_TRUE@am__append_3895 = xnu_uuid.module
+@COND_i386_ieee1275_TRUE@am__append_3896 = xnu_uuid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3897 =
+@COND_i386_ieee1275_TRUE@am__append_3898 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3899 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ xnu_uuid.marker
+@COND_i386_ieee1275_TRUE@am__append_3900 = xnu_uuid.mod
+@COND_i386_ieee1275_TRUE@am__append_3901 = xnu_uuid.marker
+@COND_x86_64_efi_TRUE@am__append_3902 = xnu_uuid.module
+@COND_x86_64_efi_TRUE@am__append_3903 = xnu_uuid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3904 =
+@COND_x86_64_efi_TRUE@am__append_3905 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3906 = \
+@COND_x86_64_efi_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ xnu_uuid.marker
+@COND_x86_64_efi_TRUE@am__append_3907 = xnu_uuid.mod
+@COND_x86_64_efi_TRUE@am__append_3908 = xnu_uuid.marker
+@COND_mips_yeeloong_TRUE@am__append_3909 = xnu_uuid.module
+@COND_mips_yeeloong_TRUE@am__append_3910 = xnu_uuid.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3911 =
+@COND_mips_yeeloong_TRUE@am__append_3912 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3913 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ xnu_uuid.marker
+@COND_mips_yeeloong_TRUE@am__append_3914 = xnu_uuid.mod
+@COND_mips_yeeloong_TRUE@am__append_3915 = xnu_uuid.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3916 = xnu_uuid.module
+@COND_sparc64_ieee1275_TRUE@am__append_3917 = xnu_uuid.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3918 =
+@COND_sparc64_ieee1275_TRUE@am__append_3919 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3920 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ xnu_uuid.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3921 = xnu_uuid.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3922 = xnu_uuid.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3923 = xnu_uuid.module
+@COND_powerpc_ieee1275_TRUE@am__append_3924 = xnu_uuid.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_3925 =
+@COND_powerpc_ieee1275_TRUE@am__append_3926 = $(nodist_xnu_uuid_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_3927 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_xnu_uuid_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ xnu_uuid.marker
+@COND_powerpc_ieee1275_TRUE@am__append_3928 = xnu_uuid.mod
+@COND_powerpc_ieee1275_TRUE@am__append_3929 = xnu_uuid.marker
+@COND_emu_TRUE@am__append_3930 = dm_nv.module
+@COND_emu_TRUE@am__append_3931 = dm_nv.module$(EXEEXT)
+@COND_emu_TRUE@am__append_3932 =
+@COND_emu_TRUE@am__append_3933 = $(nodist_dm_nv_module_SOURCES)
+@COND_emu_TRUE@am__append_3934 = $(nodist_dm_nv_module_SOURCES) \
+@COND_emu_TRUE@ dm_nv.marker
+@COND_emu_TRUE@am__append_3935 = dm_nv.mod
+@COND_emu_TRUE@am__append_3936 = dm_nv.marker
+@COND_i386_pc_TRUE@am__append_3937 = dm_nv.module
+@COND_i386_pc_TRUE@am__append_3938 = dm_nv.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_3939 =
+@COND_i386_pc_TRUE@am__append_3940 = $(nodist_dm_nv_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_3941 = $(nodist_dm_nv_module_SOURCES) \
+@COND_i386_pc_TRUE@ dm_nv.marker
+@COND_i386_pc_TRUE@am__append_3942 = dm_nv.mod
+@COND_i386_pc_TRUE@am__append_3943 = dm_nv.marker
+@COND_i386_efi_TRUE@am__append_3944 = dm_nv.module
+@COND_i386_efi_TRUE@am__append_3945 = dm_nv.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_3946 =
+@COND_i386_efi_TRUE@am__append_3947 = $(nodist_dm_nv_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_3948 = $(nodist_dm_nv_module_SOURCES) \
+@COND_i386_efi_TRUE@ dm_nv.marker
+@COND_i386_efi_TRUE@am__append_3949 = dm_nv.mod
+@COND_i386_efi_TRUE@am__append_3950 = dm_nv.marker
+@COND_i386_qemu_TRUE@am__append_3951 = dm_nv.module
+@COND_i386_qemu_TRUE@am__append_3952 = dm_nv.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_3953 =
+@COND_i386_qemu_TRUE@am__append_3954 = $(nodist_dm_nv_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_3955 = $(nodist_dm_nv_module_SOURCES) \
+@COND_i386_qemu_TRUE@ dm_nv.marker
+@COND_i386_qemu_TRUE@am__append_3956 = dm_nv.mod
+@COND_i386_qemu_TRUE@am__append_3957 = dm_nv.marker
+@COND_i386_coreboot_TRUE@am__append_3958 = dm_nv.module
+@COND_i386_coreboot_TRUE@am__append_3959 = dm_nv.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_3960 =
+@COND_i386_coreboot_TRUE@am__append_3961 = $(nodist_dm_nv_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_3962 = \
+@COND_i386_coreboot_TRUE@ $(nodist_dm_nv_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ dm_nv.marker
+@COND_i386_coreboot_TRUE@am__append_3963 = dm_nv.mod
+@COND_i386_coreboot_TRUE@am__append_3964 = dm_nv.marker
+@COND_i386_multiboot_TRUE@am__append_3965 = dm_nv.module
+@COND_i386_multiboot_TRUE@am__append_3966 = dm_nv.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_3967 =
+@COND_i386_multiboot_TRUE@am__append_3968 = $(nodist_dm_nv_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_3969 = \
+@COND_i386_multiboot_TRUE@ $(nodist_dm_nv_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ dm_nv.marker
+@COND_i386_multiboot_TRUE@am__append_3970 = dm_nv.mod
+@COND_i386_multiboot_TRUE@am__append_3971 = dm_nv.marker
+@COND_i386_ieee1275_TRUE@am__append_3972 = dm_nv.module
+@COND_i386_ieee1275_TRUE@am__append_3973 = dm_nv.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_3974 =
+@COND_i386_ieee1275_TRUE@am__append_3975 = $(nodist_dm_nv_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_3976 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_dm_nv_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ dm_nv.marker
+@COND_i386_ieee1275_TRUE@am__append_3977 = dm_nv.mod
+@COND_i386_ieee1275_TRUE@am__append_3978 = dm_nv.marker
+@COND_x86_64_efi_TRUE@am__append_3979 = dm_nv.module
+@COND_x86_64_efi_TRUE@am__append_3980 = dm_nv.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_3981 =
+@COND_x86_64_efi_TRUE@am__append_3982 = $(nodist_dm_nv_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_3983 = \
+@COND_x86_64_efi_TRUE@ $(nodist_dm_nv_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ dm_nv.marker
+@COND_x86_64_efi_TRUE@am__append_3984 = dm_nv.mod
+@COND_x86_64_efi_TRUE@am__append_3985 = dm_nv.marker
+@COND_mips_yeeloong_TRUE@am__append_3986 = dm_nv.module
+@COND_mips_yeeloong_TRUE@am__append_3987 = dm_nv.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_3988 =
+@COND_mips_yeeloong_TRUE@am__append_3989 = $(nodist_dm_nv_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_3990 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_dm_nv_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ dm_nv.marker
+@COND_mips_yeeloong_TRUE@am__append_3991 = dm_nv.mod
+@COND_mips_yeeloong_TRUE@am__append_3992 = dm_nv.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3993 = dm_nv.module
+@COND_sparc64_ieee1275_TRUE@am__append_3994 = dm_nv.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_3995 =
+@COND_sparc64_ieee1275_TRUE@am__append_3996 = $(nodist_dm_nv_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_3997 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_dm_nv_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ dm_nv.marker
+@COND_sparc64_ieee1275_TRUE@am__append_3998 = dm_nv.mod
+@COND_sparc64_ieee1275_TRUE@am__append_3999 = dm_nv.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4000 = dm_nv.module
+@COND_powerpc_ieee1275_TRUE@am__append_4001 = dm_nv.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4002 =
+@COND_powerpc_ieee1275_TRUE@am__append_4003 = $(nodist_dm_nv_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4004 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_dm_nv_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ dm_nv.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4005 = dm_nv.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4006 = dm_nv.marker
+@COND_emu_TRUE@am__append_4007 = loopback.module
+@COND_emu_TRUE@am__append_4008 = loopback.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4009 =
+@COND_emu_TRUE@am__append_4010 = $(nodist_loopback_module_SOURCES)
+@COND_emu_TRUE@am__append_4011 = $(nodist_loopback_module_SOURCES) \
+@COND_emu_TRUE@ loopback.marker
+@COND_emu_TRUE@am__append_4012 = loopback.mod
+@COND_emu_TRUE@am__append_4013 = loopback.marker
+@COND_i386_pc_TRUE@am__append_4014 = loopback.module
+@COND_i386_pc_TRUE@am__append_4015 = loopback.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4016 =
+@COND_i386_pc_TRUE@am__append_4017 = $(nodist_loopback_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4018 = \
+@COND_i386_pc_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_i386_pc_TRUE@ loopback.marker
+@COND_i386_pc_TRUE@am__append_4019 = loopback.mod
+@COND_i386_pc_TRUE@am__append_4020 = loopback.marker
+@COND_i386_efi_TRUE@am__append_4021 = loopback.module
+@COND_i386_efi_TRUE@am__append_4022 = loopback.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4023 =
+@COND_i386_efi_TRUE@am__append_4024 = $(nodist_loopback_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4025 = \
+@COND_i386_efi_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_i386_efi_TRUE@ loopback.marker
+@COND_i386_efi_TRUE@am__append_4026 = loopback.mod
+@COND_i386_efi_TRUE@am__append_4027 = loopback.marker
+@COND_i386_qemu_TRUE@am__append_4028 = loopback.module
+@COND_i386_qemu_TRUE@am__append_4029 = loopback.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4030 =
+@COND_i386_qemu_TRUE@am__append_4031 = $(nodist_loopback_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4032 = \
+@COND_i386_qemu_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_i386_qemu_TRUE@ loopback.marker
+@COND_i386_qemu_TRUE@am__append_4033 = loopback.mod
+@COND_i386_qemu_TRUE@am__append_4034 = loopback.marker
+@COND_i386_coreboot_TRUE@am__append_4035 = loopback.module
+@COND_i386_coreboot_TRUE@am__append_4036 = loopback.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4037 =
+@COND_i386_coreboot_TRUE@am__append_4038 = $(nodist_loopback_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4039 = \
+@COND_i386_coreboot_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ loopback.marker
+@COND_i386_coreboot_TRUE@am__append_4040 = loopback.mod
+@COND_i386_coreboot_TRUE@am__append_4041 = loopback.marker
+@COND_i386_multiboot_TRUE@am__append_4042 = loopback.module
+@COND_i386_multiboot_TRUE@am__append_4043 = loopback.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4044 =
+@COND_i386_multiboot_TRUE@am__append_4045 = $(nodist_loopback_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4046 = \
+@COND_i386_multiboot_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ loopback.marker
+@COND_i386_multiboot_TRUE@am__append_4047 = loopback.mod
+@COND_i386_multiboot_TRUE@am__append_4048 = loopback.marker
+@COND_i386_ieee1275_TRUE@am__append_4049 = loopback.module
+@COND_i386_ieee1275_TRUE@am__append_4050 = loopback.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4051 =
+@COND_i386_ieee1275_TRUE@am__append_4052 = $(nodist_loopback_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4053 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ loopback.marker
+@COND_i386_ieee1275_TRUE@am__append_4054 = loopback.mod
+@COND_i386_ieee1275_TRUE@am__append_4055 = loopback.marker
+@COND_x86_64_efi_TRUE@am__append_4056 = loopback.module
+@COND_x86_64_efi_TRUE@am__append_4057 = loopback.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4058 =
+@COND_x86_64_efi_TRUE@am__append_4059 = $(nodist_loopback_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4060 = \
+@COND_x86_64_efi_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ loopback.marker
+@COND_x86_64_efi_TRUE@am__append_4061 = loopback.mod
+@COND_x86_64_efi_TRUE@am__append_4062 = loopback.marker
+@COND_mips_yeeloong_TRUE@am__append_4063 = loopback.module
+@COND_mips_yeeloong_TRUE@am__append_4064 = loopback.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4065 =
+@COND_mips_yeeloong_TRUE@am__append_4066 = $(nodist_loopback_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4067 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ loopback.marker
+@COND_mips_yeeloong_TRUE@am__append_4068 = loopback.mod
+@COND_mips_yeeloong_TRUE@am__append_4069 = loopback.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4070 = loopback.module
+@COND_sparc64_ieee1275_TRUE@am__append_4071 = loopback.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4072 =
+@COND_sparc64_ieee1275_TRUE@am__append_4073 = $(nodist_loopback_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4074 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ loopback.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4075 = loopback.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4076 = loopback.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4077 = loopback.module
+@COND_powerpc_ieee1275_TRUE@am__append_4078 = loopback.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4079 =
+@COND_powerpc_ieee1275_TRUE@am__append_4080 = $(nodist_loopback_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4081 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_loopback_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ loopback.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4082 = loopback.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4083 = loopback.marker
+@COND_emu_TRUE@am__append_4084 = lvm.module
+@COND_emu_TRUE@am__append_4085 = lvm.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4086 =
+@COND_emu_TRUE@am__append_4087 = $(nodist_lvm_module_SOURCES)
+@COND_emu_TRUE@am__append_4088 = $(nodist_lvm_module_SOURCES) \
+@COND_emu_TRUE@ lvm.marker
+@COND_emu_TRUE@am__append_4089 = lvm.mod
+@COND_emu_TRUE@am__append_4090 = lvm.marker
+@COND_i386_pc_TRUE@am__append_4091 = lvm.module
+@COND_i386_pc_TRUE@am__append_4092 = lvm.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4093 =
+@COND_i386_pc_TRUE@am__append_4094 = $(nodist_lvm_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4095 = $(nodist_lvm_module_SOURCES) \
+@COND_i386_pc_TRUE@ lvm.marker
+@COND_i386_pc_TRUE@am__append_4096 = lvm.mod
+@COND_i386_pc_TRUE@am__append_4097 = lvm.marker
+@COND_i386_efi_TRUE@am__append_4098 = lvm.module
+@COND_i386_efi_TRUE@am__append_4099 = lvm.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4100 =
+@COND_i386_efi_TRUE@am__append_4101 = $(nodist_lvm_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4102 = $(nodist_lvm_module_SOURCES) \
+@COND_i386_efi_TRUE@ lvm.marker
+@COND_i386_efi_TRUE@am__append_4103 = lvm.mod
+@COND_i386_efi_TRUE@am__append_4104 = lvm.marker
+@COND_i386_qemu_TRUE@am__append_4105 = lvm.module
+@COND_i386_qemu_TRUE@am__append_4106 = lvm.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4107 =
+@COND_i386_qemu_TRUE@am__append_4108 = $(nodist_lvm_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4109 = $(nodist_lvm_module_SOURCES) \
+@COND_i386_qemu_TRUE@ lvm.marker
+@COND_i386_qemu_TRUE@am__append_4110 = lvm.mod
+@COND_i386_qemu_TRUE@am__append_4111 = lvm.marker
+@COND_i386_coreboot_TRUE@am__append_4112 = lvm.module
+@COND_i386_coreboot_TRUE@am__append_4113 = lvm.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4114 =
+@COND_i386_coreboot_TRUE@am__append_4115 = $(nodist_lvm_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4116 = \
+@COND_i386_coreboot_TRUE@ $(nodist_lvm_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ lvm.marker
+@COND_i386_coreboot_TRUE@am__append_4117 = lvm.mod
+@COND_i386_coreboot_TRUE@am__append_4118 = lvm.marker
+@COND_i386_multiboot_TRUE@am__append_4119 = lvm.module
+@COND_i386_multiboot_TRUE@am__append_4120 = lvm.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4121 =
+@COND_i386_multiboot_TRUE@am__append_4122 = $(nodist_lvm_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4123 = \
+@COND_i386_multiboot_TRUE@ $(nodist_lvm_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ lvm.marker
+@COND_i386_multiboot_TRUE@am__append_4124 = lvm.mod
+@COND_i386_multiboot_TRUE@am__append_4125 = lvm.marker
+@COND_i386_ieee1275_TRUE@am__append_4126 = lvm.module
+@COND_i386_ieee1275_TRUE@am__append_4127 = lvm.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4128 =
+@COND_i386_ieee1275_TRUE@am__append_4129 = $(nodist_lvm_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4130 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_lvm_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ lvm.marker
+@COND_i386_ieee1275_TRUE@am__append_4131 = lvm.mod
+@COND_i386_ieee1275_TRUE@am__append_4132 = lvm.marker
+@COND_x86_64_efi_TRUE@am__append_4133 = lvm.module
+@COND_x86_64_efi_TRUE@am__append_4134 = lvm.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4135 =
+@COND_x86_64_efi_TRUE@am__append_4136 = $(nodist_lvm_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4137 = $(nodist_lvm_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ lvm.marker
+@COND_x86_64_efi_TRUE@am__append_4138 = lvm.mod
+@COND_x86_64_efi_TRUE@am__append_4139 = lvm.marker
+@COND_mips_yeeloong_TRUE@am__append_4140 = lvm.module
+@COND_mips_yeeloong_TRUE@am__append_4141 = lvm.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4142 =
+@COND_mips_yeeloong_TRUE@am__append_4143 = $(nodist_lvm_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4144 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_lvm_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ lvm.marker
+@COND_mips_yeeloong_TRUE@am__append_4145 = lvm.mod
+@COND_mips_yeeloong_TRUE@am__append_4146 = lvm.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4147 = lvm.module
+@COND_sparc64_ieee1275_TRUE@am__append_4148 = lvm.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4149 =
+@COND_sparc64_ieee1275_TRUE@am__append_4150 = $(nodist_lvm_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4151 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_lvm_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ lvm.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4152 = lvm.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4153 = lvm.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4154 = lvm.module
+@COND_powerpc_ieee1275_TRUE@am__append_4155 = lvm.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4156 =
+@COND_powerpc_ieee1275_TRUE@am__append_4157 = $(nodist_lvm_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4158 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_lvm_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ lvm.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4159 = lvm.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4160 = lvm.marker
+@COND_emu_TRUE@am__append_4161 = mdraid09.module
+@COND_emu_TRUE@am__append_4162 = mdraid09.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4163 =
+@COND_emu_TRUE@am__append_4164 = $(nodist_mdraid09_module_SOURCES)
+@COND_emu_TRUE@am__append_4165 = $(nodist_mdraid09_module_SOURCES) \
+@COND_emu_TRUE@ mdraid09.marker
+@COND_emu_TRUE@am__append_4166 = mdraid09.mod
+@COND_emu_TRUE@am__append_4167 = mdraid09.marker
+@COND_i386_pc_TRUE@am__append_4168 = mdraid09.module
+@COND_i386_pc_TRUE@am__append_4169 = mdraid09.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4170 =
+@COND_i386_pc_TRUE@am__append_4171 = $(nodist_mdraid09_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4172 = \
+@COND_i386_pc_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_i386_pc_TRUE@ mdraid09.marker
+@COND_i386_pc_TRUE@am__append_4173 = mdraid09.mod
+@COND_i386_pc_TRUE@am__append_4174 = mdraid09.marker
+@COND_i386_efi_TRUE@am__append_4175 = mdraid09.module
+@COND_i386_efi_TRUE@am__append_4176 = mdraid09.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4177 =
+@COND_i386_efi_TRUE@am__append_4178 = $(nodist_mdraid09_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4179 = \
+@COND_i386_efi_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_i386_efi_TRUE@ mdraid09.marker
+@COND_i386_efi_TRUE@am__append_4180 = mdraid09.mod
+@COND_i386_efi_TRUE@am__append_4181 = mdraid09.marker
+@COND_i386_qemu_TRUE@am__append_4182 = mdraid09.module
+@COND_i386_qemu_TRUE@am__append_4183 = mdraid09.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4184 =
+@COND_i386_qemu_TRUE@am__append_4185 = $(nodist_mdraid09_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4186 = \
+@COND_i386_qemu_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_i386_qemu_TRUE@ mdraid09.marker
+@COND_i386_qemu_TRUE@am__append_4187 = mdraid09.mod
+@COND_i386_qemu_TRUE@am__append_4188 = mdraid09.marker
+@COND_i386_coreboot_TRUE@am__append_4189 = mdraid09.module
+@COND_i386_coreboot_TRUE@am__append_4190 = mdraid09.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4191 =
+@COND_i386_coreboot_TRUE@am__append_4192 = $(nodist_mdraid09_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4193 = \
+@COND_i386_coreboot_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ mdraid09.marker
+@COND_i386_coreboot_TRUE@am__append_4194 = mdraid09.mod
+@COND_i386_coreboot_TRUE@am__append_4195 = mdraid09.marker
+@COND_i386_multiboot_TRUE@am__append_4196 = mdraid09.module
+@COND_i386_multiboot_TRUE@am__append_4197 = mdraid09.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4198 =
+@COND_i386_multiboot_TRUE@am__append_4199 = $(nodist_mdraid09_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4200 = \
+@COND_i386_multiboot_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ mdraid09.marker
+@COND_i386_multiboot_TRUE@am__append_4201 = mdraid09.mod
+@COND_i386_multiboot_TRUE@am__append_4202 = mdraid09.marker
+@COND_i386_ieee1275_TRUE@am__append_4203 = mdraid09.module
+@COND_i386_ieee1275_TRUE@am__append_4204 = mdraid09.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4205 =
+@COND_i386_ieee1275_TRUE@am__append_4206 = $(nodist_mdraid09_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4207 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ mdraid09.marker
+@COND_i386_ieee1275_TRUE@am__append_4208 = mdraid09.mod
+@COND_i386_ieee1275_TRUE@am__append_4209 = mdraid09.marker
+@COND_x86_64_efi_TRUE@am__append_4210 = mdraid09.module
+@COND_x86_64_efi_TRUE@am__append_4211 = mdraid09.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4212 =
+@COND_x86_64_efi_TRUE@am__append_4213 = $(nodist_mdraid09_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4214 = \
+@COND_x86_64_efi_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ mdraid09.marker
+@COND_x86_64_efi_TRUE@am__append_4215 = mdraid09.mod
+@COND_x86_64_efi_TRUE@am__append_4216 = mdraid09.marker
+@COND_mips_yeeloong_TRUE@am__append_4217 = mdraid09.module
+@COND_mips_yeeloong_TRUE@am__append_4218 = mdraid09.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4219 =
+@COND_mips_yeeloong_TRUE@am__append_4220 = $(nodist_mdraid09_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4221 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ mdraid09.marker
+@COND_mips_yeeloong_TRUE@am__append_4222 = mdraid09.mod
+@COND_mips_yeeloong_TRUE@am__append_4223 = mdraid09.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4224 = mdraid09.module
+@COND_sparc64_ieee1275_TRUE@am__append_4225 = mdraid09.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4226 =
+@COND_sparc64_ieee1275_TRUE@am__append_4227 = $(nodist_mdraid09_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4228 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ mdraid09.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4229 = mdraid09.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4230 = mdraid09.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4231 = mdraid09.module
+@COND_powerpc_ieee1275_TRUE@am__append_4232 = mdraid09.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4233 =
+@COND_powerpc_ieee1275_TRUE@am__append_4234 = $(nodist_mdraid09_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4235 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_mdraid09_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ mdraid09.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4236 = mdraid09.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4237 = mdraid09.marker
+@COND_emu_TRUE@am__append_4238 = mdraid1x.module
+@COND_emu_TRUE@am__append_4239 = mdraid1x.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4240 =
+@COND_emu_TRUE@am__append_4241 = $(nodist_mdraid1x_module_SOURCES)
+@COND_emu_TRUE@am__append_4242 = $(nodist_mdraid1x_module_SOURCES) \
+@COND_emu_TRUE@ mdraid1x.marker
+@COND_emu_TRUE@am__append_4243 = mdraid1x.mod
+@COND_emu_TRUE@am__append_4244 = mdraid1x.marker
+@COND_i386_pc_TRUE@am__append_4245 = mdraid1x.module
+@COND_i386_pc_TRUE@am__append_4246 = mdraid1x.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4247 =
+@COND_i386_pc_TRUE@am__append_4248 = $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4249 = \
+@COND_i386_pc_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_i386_pc_TRUE@ mdraid1x.marker
+@COND_i386_pc_TRUE@am__append_4250 = mdraid1x.mod
+@COND_i386_pc_TRUE@am__append_4251 = mdraid1x.marker
+@COND_i386_efi_TRUE@am__append_4252 = mdraid1x.module
+@COND_i386_efi_TRUE@am__append_4253 = mdraid1x.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4254 =
+@COND_i386_efi_TRUE@am__append_4255 = $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4256 = \
+@COND_i386_efi_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_i386_efi_TRUE@ mdraid1x.marker
+@COND_i386_efi_TRUE@am__append_4257 = mdraid1x.mod
+@COND_i386_efi_TRUE@am__append_4258 = mdraid1x.marker
+@COND_i386_qemu_TRUE@am__append_4259 = mdraid1x.module
+@COND_i386_qemu_TRUE@am__append_4260 = mdraid1x.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4261 =
+@COND_i386_qemu_TRUE@am__append_4262 = $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4263 = \
+@COND_i386_qemu_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_i386_qemu_TRUE@ mdraid1x.marker
+@COND_i386_qemu_TRUE@am__append_4264 = mdraid1x.mod
+@COND_i386_qemu_TRUE@am__append_4265 = mdraid1x.marker
+@COND_i386_coreboot_TRUE@am__append_4266 = mdraid1x.module
+@COND_i386_coreboot_TRUE@am__append_4267 = mdraid1x.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4268 =
+@COND_i386_coreboot_TRUE@am__append_4269 = $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4270 = \
+@COND_i386_coreboot_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ mdraid1x.marker
+@COND_i386_coreboot_TRUE@am__append_4271 = mdraid1x.mod
+@COND_i386_coreboot_TRUE@am__append_4272 = mdraid1x.marker
+@COND_i386_multiboot_TRUE@am__append_4273 = mdraid1x.module
+@COND_i386_multiboot_TRUE@am__append_4274 = mdraid1x.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4275 =
+@COND_i386_multiboot_TRUE@am__append_4276 = $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4277 = \
+@COND_i386_multiboot_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ mdraid1x.marker
+@COND_i386_multiboot_TRUE@am__append_4278 = mdraid1x.mod
+@COND_i386_multiboot_TRUE@am__append_4279 = mdraid1x.marker
+@COND_i386_ieee1275_TRUE@am__append_4280 = mdraid1x.module
+@COND_i386_ieee1275_TRUE@am__append_4281 = mdraid1x.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4282 =
+@COND_i386_ieee1275_TRUE@am__append_4283 = $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4284 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ mdraid1x.marker
+@COND_i386_ieee1275_TRUE@am__append_4285 = mdraid1x.mod
+@COND_i386_ieee1275_TRUE@am__append_4286 = mdraid1x.marker
+@COND_x86_64_efi_TRUE@am__append_4287 = mdraid1x.module
+@COND_x86_64_efi_TRUE@am__append_4288 = mdraid1x.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4289 =
+@COND_x86_64_efi_TRUE@am__append_4290 = $(nodist_mdraid1x_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4291 = \
+@COND_x86_64_efi_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ mdraid1x.marker
+@COND_x86_64_efi_TRUE@am__append_4292 = mdraid1x.mod
+@COND_x86_64_efi_TRUE@am__append_4293 = mdraid1x.marker
+@COND_mips_yeeloong_TRUE@am__append_4294 = mdraid1x.module
+@COND_mips_yeeloong_TRUE@am__append_4295 = mdraid1x.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4296 =
+@COND_mips_yeeloong_TRUE@am__append_4297 = $(nodist_mdraid1x_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4298 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ mdraid1x.marker
+@COND_mips_yeeloong_TRUE@am__append_4299 = mdraid1x.mod
+@COND_mips_yeeloong_TRUE@am__append_4300 = mdraid1x.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4301 = mdraid1x.module
+@COND_sparc64_ieee1275_TRUE@am__append_4302 = mdraid1x.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4303 =
+@COND_sparc64_ieee1275_TRUE@am__append_4304 = $(nodist_mdraid1x_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4305 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ mdraid1x.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4306 = mdraid1x.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4307 = mdraid1x.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4308 = mdraid1x.module
+@COND_powerpc_ieee1275_TRUE@am__append_4309 = mdraid1x.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4310 =
+@COND_powerpc_ieee1275_TRUE@am__append_4311 = $(nodist_mdraid1x_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4312 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_mdraid1x_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ mdraid1x.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4313 = mdraid1x.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4314 = mdraid1x.marker
+@COND_emu_TRUE@am__append_4315 = raid.module
+@COND_emu_TRUE@am__append_4316 = raid.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4317 =
+@COND_emu_TRUE@am__append_4318 = $(nodist_raid_module_SOURCES)
+@COND_emu_TRUE@am__append_4319 = $(nodist_raid_module_SOURCES) \
+@COND_emu_TRUE@ raid.marker
+@COND_emu_TRUE@am__append_4320 = raid.mod
+@COND_emu_TRUE@am__append_4321 = raid.marker
+@COND_i386_pc_TRUE@am__append_4322 = raid.module
+@COND_i386_pc_TRUE@am__append_4323 = raid.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4324 =
+@COND_i386_pc_TRUE@am__append_4325 = $(nodist_raid_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4326 = $(nodist_raid_module_SOURCES) \
+@COND_i386_pc_TRUE@ raid.marker
+@COND_i386_pc_TRUE@am__append_4327 = raid.mod
+@COND_i386_pc_TRUE@am__append_4328 = raid.marker
+@COND_i386_efi_TRUE@am__append_4329 = raid.module
+@COND_i386_efi_TRUE@am__append_4330 = raid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4331 =
+@COND_i386_efi_TRUE@am__append_4332 = $(nodist_raid_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4333 = $(nodist_raid_module_SOURCES) \
+@COND_i386_efi_TRUE@ raid.marker
+@COND_i386_efi_TRUE@am__append_4334 = raid.mod
+@COND_i386_efi_TRUE@am__append_4335 = raid.marker
+@COND_i386_qemu_TRUE@am__append_4336 = raid.module
+@COND_i386_qemu_TRUE@am__append_4337 = raid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4338 =
+@COND_i386_qemu_TRUE@am__append_4339 = $(nodist_raid_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4340 = $(nodist_raid_module_SOURCES) \
+@COND_i386_qemu_TRUE@ raid.marker
+@COND_i386_qemu_TRUE@am__append_4341 = raid.mod
+@COND_i386_qemu_TRUE@am__append_4342 = raid.marker
+@COND_i386_coreboot_TRUE@am__append_4343 = raid.module
+@COND_i386_coreboot_TRUE@am__append_4344 = raid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4345 =
+@COND_i386_coreboot_TRUE@am__append_4346 = $(nodist_raid_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4347 = \
+@COND_i386_coreboot_TRUE@ $(nodist_raid_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ raid.marker
+@COND_i386_coreboot_TRUE@am__append_4348 = raid.mod
+@COND_i386_coreboot_TRUE@am__append_4349 = raid.marker
+@COND_i386_multiboot_TRUE@am__append_4350 = raid.module
+@COND_i386_multiboot_TRUE@am__append_4351 = raid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4352 =
+@COND_i386_multiboot_TRUE@am__append_4353 = $(nodist_raid_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4354 = \
+@COND_i386_multiboot_TRUE@ $(nodist_raid_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ raid.marker
+@COND_i386_multiboot_TRUE@am__append_4355 = raid.mod
+@COND_i386_multiboot_TRUE@am__append_4356 = raid.marker
+@COND_i386_ieee1275_TRUE@am__append_4357 = raid.module
+@COND_i386_ieee1275_TRUE@am__append_4358 = raid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4359 =
+@COND_i386_ieee1275_TRUE@am__append_4360 = $(nodist_raid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4361 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_raid_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ raid.marker
+@COND_i386_ieee1275_TRUE@am__append_4362 = raid.mod
+@COND_i386_ieee1275_TRUE@am__append_4363 = raid.marker
+@COND_x86_64_efi_TRUE@am__append_4364 = raid.module
+@COND_x86_64_efi_TRUE@am__append_4365 = raid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4366 =
+@COND_x86_64_efi_TRUE@am__append_4367 = $(nodist_raid_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4368 = $(nodist_raid_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ raid.marker
+@COND_x86_64_efi_TRUE@am__append_4369 = raid.mod
+@COND_x86_64_efi_TRUE@am__append_4370 = raid.marker
+@COND_mips_yeeloong_TRUE@am__append_4371 = raid.module
+@COND_mips_yeeloong_TRUE@am__append_4372 = raid.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4373 =
+@COND_mips_yeeloong_TRUE@am__append_4374 = $(nodist_raid_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4375 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_raid_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ raid.marker
+@COND_mips_yeeloong_TRUE@am__append_4376 = raid.mod
+@COND_mips_yeeloong_TRUE@am__append_4377 = raid.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4378 = raid.module
+@COND_sparc64_ieee1275_TRUE@am__append_4379 = raid.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4380 =
+@COND_sparc64_ieee1275_TRUE@am__append_4381 = $(nodist_raid_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4382 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_raid_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ raid.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4383 = raid.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4384 = raid.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4385 = raid.module
+@COND_powerpc_ieee1275_TRUE@am__append_4386 = raid.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4387 =
+@COND_powerpc_ieee1275_TRUE@am__append_4388 = $(nodist_raid_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4389 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_raid_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ raid.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4390 = raid.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4391 = raid.marker
+@COND_emu_TRUE@am__append_4392 = raid5rec.module
+@COND_emu_TRUE@am__append_4393 = raid5rec.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4394 =
+@COND_emu_TRUE@am__append_4395 = $(nodist_raid5rec_module_SOURCES)
+@COND_emu_TRUE@am__append_4396 = $(nodist_raid5rec_module_SOURCES) \
+@COND_emu_TRUE@ raid5rec.marker
+@COND_emu_TRUE@am__append_4397 = raid5rec.mod
+@COND_emu_TRUE@am__append_4398 = raid5rec.marker
+@COND_i386_pc_TRUE@am__append_4399 = raid5rec.module
+@COND_i386_pc_TRUE@am__append_4400 = raid5rec.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4401 =
+@COND_i386_pc_TRUE@am__append_4402 = $(nodist_raid5rec_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4403 = \
+@COND_i386_pc_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_i386_pc_TRUE@ raid5rec.marker
+@COND_i386_pc_TRUE@am__append_4404 = raid5rec.mod
+@COND_i386_pc_TRUE@am__append_4405 = raid5rec.marker
+@COND_i386_efi_TRUE@am__append_4406 = raid5rec.module
+@COND_i386_efi_TRUE@am__append_4407 = raid5rec.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4408 =
+@COND_i386_efi_TRUE@am__append_4409 = $(nodist_raid5rec_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4410 = \
+@COND_i386_efi_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_i386_efi_TRUE@ raid5rec.marker
+@COND_i386_efi_TRUE@am__append_4411 = raid5rec.mod
+@COND_i386_efi_TRUE@am__append_4412 = raid5rec.marker
+@COND_i386_qemu_TRUE@am__append_4413 = raid5rec.module
+@COND_i386_qemu_TRUE@am__append_4414 = raid5rec.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4415 =
+@COND_i386_qemu_TRUE@am__append_4416 = $(nodist_raid5rec_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4417 = \
+@COND_i386_qemu_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_i386_qemu_TRUE@ raid5rec.marker
+@COND_i386_qemu_TRUE@am__append_4418 = raid5rec.mod
+@COND_i386_qemu_TRUE@am__append_4419 = raid5rec.marker
+@COND_i386_coreboot_TRUE@am__append_4420 = raid5rec.module
+@COND_i386_coreboot_TRUE@am__append_4421 = raid5rec.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4422 =
+@COND_i386_coreboot_TRUE@am__append_4423 = $(nodist_raid5rec_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4424 = \
+@COND_i386_coreboot_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ raid5rec.marker
+@COND_i386_coreboot_TRUE@am__append_4425 = raid5rec.mod
+@COND_i386_coreboot_TRUE@am__append_4426 = raid5rec.marker
+@COND_i386_multiboot_TRUE@am__append_4427 = raid5rec.module
+@COND_i386_multiboot_TRUE@am__append_4428 = raid5rec.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4429 =
+@COND_i386_multiboot_TRUE@am__append_4430 = $(nodist_raid5rec_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4431 = \
+@COND_i386_multiboot_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ raid5rec.marker
+@COND_i386_multiboot_TRUE@am__append_4432 = raid5rec.mod
+@COND_i386_multiboot_TRUE@am__append_4433 = raid5rec.marker
+@COND_i386_ieee1275_TRUE@am__append_4434 = raid5rec.module
+@COND_i386_ieee1275_TRUE@am__append_4435 = raid5rec.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4436 =
+@COND_i386_ieee1275_TRUE@am__append_4437 = $(nodist_raid5rec_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4438 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ raid5rec.marker
+@COND_i386_ieee1275_TRUE@am__append_4439 = raid5rec.mod
+@COND_i386_ieee1275_TRUE@am__append_4440 = raid5rec.marker
+@COND_x86_64_efi_TRUE@am__append_4441 = raid5rec.module
+@COND_x86_64_efi_TRUE@am__append_4442 = raid5rec.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4443 =
+@COND_x86_64_efi_TRUE@am__append_4444 = $(nodist_raid5rec_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4445 = \
+@COND_x86_64_efi_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ raid5rec.marker
+@COND_x86_64_efi_TRUE@am__append_4446 = raid5rec.mod
+@COND_x86_64_efi_TRUE@am__append_4447 = raid5rec.marker
+@COND_mips_yeeloong_TRUE@am__append_4448 = raid5rec.module
+@COND_mips_yeeloong_TRUE@am__append_4449 = raid5rec.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4450 =
+@COND_mips_yeeloong_TRUE@am__append_4451 = $(nodist_raid5rec_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4452 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ raid5rec.marker
+@COND_mips_yeeloong_TRUE@am__append_4453 = raid5rec.mod
+@COND_mips_yeeloong_TRUE@am__append_4454 = raid5rec.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4455 = raid5rec.module
+@COND_sparc64_ieee1275_TRUE@am__append_4456 = raid5rec.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4457 =
+@COND_sparc64_ieee1275_TRUE@am__append_4458 = $(nodist_raid5rec_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4459 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ raid5rec.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4460 = raid5rec.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4461 = raid5rec.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4462 = raid5rec.module
+@COND_powerpc_ieee1275_TRUE@am__append_4463 = raid5rec.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4464 =
+@COND_powerpc_ieee1275_TRUE@am__append_4465 = $(nodist_raid5rec_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4466 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_raid5rec_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ raid5rec.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4467 = raid5rec.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4468 = raid5rec.marker
+@COND_emu_TRUE@am__append_4469 = raid6rec.module
+@COND_emu_TRUE@am__append_4470 = raid6rec.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4471 =
+@COND_emu_TRUE@am__append_4472 = $(nodist_raid6rec_module_SOURCES)
+@COND_emu_TRUE@am__append_4473 = $(nodist_raid6rec_module_SOURCES) \
+@COND_emu_TRUE@ raid6rec.marker
+@COND_emu_TRUE@am__append_4474 = raid6rec.mod
+@COND_emu_TRUE@am__append_4475 = raid6rec.marker
+@COND_i386_pc_TRUE@am__append_4476 = raid6rec.module
+@COND_i386_pc_TRUE@am__append_4477 = raid6rec.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4478 =
+@COND_i386_pc_TRUE@am__append_4479 = $(nodist_raid6rec_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4480 = \
+@COND_i386_pc_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_i386_pc_TRUE@ raid6rec.marker
+@COND_i386_pc_TRUE@am__append_4481 = raid6rec.mod
+@COND_i386_pc_TRUE@am__append_4482 = raid6rec.marker
+@COND_i386_efi_TRUE@am__append_4483 = raid6rec.module
+@COND_i386_efi_TRUE@am__append_4484 = raid6rec.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4485 =
+@COND_i386_efi_TRUE@am__append_4486 = $(nodist_raid6rec_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4487 = \
+@COND_i386_efi_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_i386_efi_TRUE@ raid6rec.marker
+@COND_i386_efi_TRUE@am__append_4488 = raid6rec.mod
+@COND_i386_efi_TRUE@am__append_4489 = raid6rec.marker
+@COND_i386_qemu_TRUE@am__append_4490 = raid6rec.module
+@COND_i386_qemu_TRUE@am__append_4491 = raid6rec.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4492 =
+@COND_i386_qemu_TRUE@am__append_4493 = $(nodist_raid6rec_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4494 = \
+@COND_i386_qemu_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_i386_qemu_TRUE@ raid6rec.marker
+@COND_i386_qemu_TRUE@am__append_4495 = raid6rec.mod
+@COND_i386_qemu_TRUE@am__append_4496 = raid6rec.marker
+@COND_i386_coreboot_TRUE@am__append_4497 = raid6rec.module
+@COND_i386_coreboot_TRUE@am__append_4498 = raid6rec.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4499 =
+@COND_i386_coreboot_TRUE@am__append_4500 = $(nodist_raid6rec_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4501 = \
+@COND_i386_coreboot_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ raid6rec.marker
+@COND_i386_coreboot_TRUE@am__append_4502 = raid6rec.mod
+@COND_i386_coreboot_TRUE@am__append_4503 = raid6rec.marker
+@COND_i386_multiboot_TRUE@am__append_4504 = raid6rec.module
+@COND_i386_multiboot_TRUE@am__append_4505 = raid6rec.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4506 =
+@COND_i386_multiboot_TRUE@am__append_4507 = $(nodist_raid6rec_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4508 = \
+@COND_i386_multiboot_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ raid6rec.marker
+@COND_i386_multiboot_TRUE@am__append_4509 = raid6rec.mod
+@COND_i386_multiboot_TRUE@am__append_4510 = raid6rec.marker
+@COND_i386_ieee1275_TRUE@am__append_4511 = raid6rec.module
+@COND_i386_ieee1275_TRUE@am__append_4512 = raid6rec.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4513 =
+@COND_i386_ieee1275_TRUE@am__append_4514 = $(nodist_raid6rec_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4515 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ raid6rec.marker
+@COND_i386_ieee1275_TRUE@am__append_4516 = raid6rec.mod
+@COND_i386_ieee1275_TRUE@am__append_4517 = raid6rec.marker
+@COND_x86_64_efi_TRUE@am__append_4518 = raid6rec.module
+@COND_x86_64_efi_TRUE@am__append_4519 = raid6rec.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4520 =
+@COND_x86_64_efi_TRUE@am__append_4521 = $(nodist_raid6rec_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4522 = \
+@COND_x86_64_efi_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ raid6rec.marker
+@COND_x86_64_efi_TRUE@am__append_4523 = raid6rec.mod
+@COND_x86_64_efi_TRUE@am__append_4524 = raid6rec.marker
+@COND_mips_yeeloong_TRUE@am__append_4525 = raid6rec.module
+@COND_mips_yeeloong_TRUE@am__append_4526 = raid6rec.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4527 =
+@COND_mips_yeeloong_TRUE@am__append_4528 = $(nodist_raid6rec_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4529 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ raid6rec.marker
+@COND_mips_yeeloong_TRUE@am__append_4530 = raid6rec.mod
+@COND_mips_yeeloong_TRUE@am__append_4531 = raid6rec.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4532 = raid6rec.module
+@COND_sparc64_ieee1275_TRUE@am__append_4533 = raid6rec.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4534 =
+@COND_sparc64_ieee1275_TRUE@am__append_4535 = $(nodist_raid6rec_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4536 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ raid6rec.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4537 = raid6rec.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4538 = raid6rec.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4539 = raid6rec.module
+@COND_powerpc_ieee1275_TRUE@am__append_4540 = raid6rec.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4541 =
+@COND_powerpc_ieee1275_TRUE@am__append_4542 = $(nodist_raid6rec_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4543 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_raid6rec_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ raid6rec.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4544 = raid6rec.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4545 = raid6rec.marker
+@COND_emu_TRUE@am__append_4546 = scsi.module
+@COND_emu_TRUE@am__append_4547 = scsi.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4548 =
+@COND_emu_TRUE@am__append_4549 = $(nodist_scsi_module_SOURCES)
+@COND_emu_TRUE@am__append_4550 = $(nodist_scsi_module_SOURCES) \
+@COND_emu_TRUE@ scsi.marker
+@COND_emu_TRUE@am__append_4551 = scsi.mod
+@COND_emu_TRUE@am__append_4552 = scsi.marker
+@COND_i386_pc_TRUE@am__append_4553 = scsi.module
+@COND_i386_pc_TRUE@am__append_4554 = scsi.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4555 =
+@COND_i386_pc_TRUE@am__append_4556 = $(nodist_scsi_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4557 = $(nodist_scsi_module_SOURCES) \
+@COND_i386_pc_TRUE@ scsi.marker
+@COND_i386_pc_TRUE@am__append_4558 = scsi.mod
+@COND_i386_pc_TRUE@am__append_4559 = scsi.marker
+@COND_i386_efi_TRUE@am__append_4560 = scsi.module
+@COND_i386_efi_TRUE@am__append_4561 = scsi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4562 =
+@COND_i386_efi_TRUE@am__append_4563 = $(nodist_scsi_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4564 = $(nodist_scsi_module_SOURCES) \
+@COND_i386_efi_TRUE@ scsi.marker
+@COND_i386_efi_TRUE@am__append_4565 = scsi.mod
+@COND_i386_efi_TRUE@am__append_4566 = scsi.marker
+@COND_i386_qemu_TRUE@am__append_4567 = scsi.module
+@COND_i386_qemu_TRUE@am__append_4568 = scsi.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4569 =
+@COND_i386_qemu_TRUE@am__append_4570 = $(nodist_scsi_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4571 = $(nodist_scsi_module_SOURCES) \
+@COND_i386_qemu_TRUE@ scsi.marker
+@COND_i386_qemu_TRUE@am__append_4572 = scsi.mod
+@COND_i386_qemu_TRUE@am__append_4573 = scsi.marker
+@COND_i386_coreboot_TRUE@am__append_4574 = scsi.module
+@COND_i386_coreboot_TRUE@am__append_4575 = scsi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4576 =
+@COND_i386_coreboot_TRUE@am__append_4577 = $(nodist_scsi_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4578 = \
+@COND_i386_coreboot_TRUE@ $(nodist_scsi_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ scsi.marker
+@COND_i386_coreboot_TRUE@am__append_4579 = scsi.mod
+@COND_i386_coreboot_TRUE@am__append_4580 = scsi.marker
+@COND_i386_multiboot_TRUE@am__append_4581 = scsi.module
+@COND_i386_multiboot_TRUE@am__append_4582 = scsi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4583 =
+@COND_i386_multiboot_TRUE@am__append_4584 = $(nodist_scsi_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4585 = \
+@COND_i386_multiboot_TRUE@ $(nodist_scsi_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ scsi.marker
+@COND_i386_multiboot_TRUE@am__append_4586 = scsi.mod
+@COND_i386_multiboot_TRUE@am__append_4587 = scsi.marker
+@COND_i386_ieee1275_TRUE@am__append_4588 = scsi.module
+@COND_i386_ieee1275_TRUE@am__append_4589 = scsi.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4590 =
+@COND_i386_ieee1275_TRUE@am__append_4591 = $(nodist_scsi_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4592 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_scsi_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ scsi.marker
+@COND_i386_ieee1275_TRUE@am__append_4593 = scsi.mod
+@COND_i386_ieee1275_TRUE@am__append_4594 = scsi.marker
+@COND_x86_64_efi_TRUE@am__append_4595 = scsi.module
+@COND_x86_64_efi_TRUE@am__append_4596 = scsi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4597 =
+@COND_x86_64_efi_TRUE@am__append_4598 = $(nodist_scsi_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4599 = $(nodist_scsi_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ scsi.marker
+@COND_x86_64_efi_TRUE@am__append_4600 = scsi.mod
+@COND_x86_64_efi_TRUE@am__append_4601 = scsi.marker
+@COND_mips_yeeloong_TRUE@am__append_4602 = scsi.module
+@COND_mips_yeeloong_TRUE@am__append_4603 = scsi.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4604 =
+@COND_mips_yeeloong_TRUE@am__append_4605 = $(nodist_scsi_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4606 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_scsi_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ scsi.marker
+@COND_mips_yeeloong_TRUE@am__append_4607 = scsi.mod
+@COND_mips_yeeloong_TRUE@am__append_4608 = scsi.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4609 = scsi.module
+@COND_sparc64_ieee1275_TRUE@am__append_4610 = scsi.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4611 =
+@COND_sparc64_ieee1275_TRUE@am__append_4612 = $(nodist_scsi_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4613 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_scsi_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ scsi.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4614 = scsi.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4615 = scsi.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4616 = scsi.module
+@COND_powerpc_ieee1275_TRUE@am__append_4617 = scsi.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4618 =
+@COND_powerpc_ieee1275_TRUE@am__append_4619 = $(nodist_scsi_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4620 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_scsi_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ scsi.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4621 = scsi.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4622 = scsi.marker
+@COND_emu_TRUE@am__append_4623 = memdisk.module
+@COND_emu_TRUE@am__append_4624 = memdisk.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4625 =
+@COND_emu_TRUE@am__append_4626 = $(nodist_memdisk_module_SOURCES)
+@COND_emu_TRUE@am__append_4627 = $(nodist_memdisk_module_SOURCES) \
+@COND_emu_TRUE@ memdisk.marker
+@COND_emu_TRUE@am__append_4628 = memdisk.mod
+@COND_emu_TRUE@am__append_4629 = memdisk.marker
+@COND_i386_pc_TRUE@am__append_4630 = memdisk.module
+@COND_i386_pc_TRUE@am__append_4631 = memdisk.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4632 =
+@COND_i386_pc_TRUE@am__append_4633 = $(nodist_memdisk_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4634 = $(nodist_memdisk_module_SOURCES) \
+@COND_i386_pc_TRUE@ memdisk.marker
+@COND_i386_pc_TRUE@am__append_4635 = memdisk.mod
+@COND_i386_pc_TRUE@am__append_4636 = memdisk.marker
+@COND_i386_efi_TRUE@am__append_4637 = memdisk.module
+@COND_i386_efi_TRUE@am__append_4638 = memdisk.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4639 =
+@COND_i386_efi_TRUE@am__append_4640 = $(nodist_memdisk_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4641 = \
+@COND_i386_efi_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_i386_efi_TRUE@ memdisk.marker
+@COND_i386_efi_TRUE@am__append_4642 = memdisk.mod
+@COND_i386_efi_TRUE@am__append_4643 = memdisk.marker
+@COND_i386_qemu_TRUE@am__append_4644 = memdisk.module
+@COND_i386_qemu_TRUE@am__append_4645 = memdisk.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4646 =
+@COND_i386_qemu_TRUE@am__append_4647 = $(nodist_memdisk_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4648 = \
+@COND_i386_qemu_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_i386_qemu_TRUE@ memdisk.marker
+@COND_i386_qemu_TRUE@am__append_4649 = memdisk.mod
+@COND_i386_qemu_TRUE@am__append_4650 = memdisk.marker
+@COND_i386_coreboot_TRUE@am__append_4651 = memdisk.module
+@COND_i386_coreboot_TRUE@am__append_4652 = memdisk.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4653 =
+@COND_i386_coreboot_TRUE@am__append_4654 = $(nodist_memdisk_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4655 = \
+@COND_i386_coreboot_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ memdisk.marker
+@COND_i386_coreboot_TRUE@am__append_4656 = memdisk.mod
+@COND_i386_coreboot_TRUE@am__append_4657 = memdisk.marker
+@COND_i386_multiboot_TRUE@am__append_4658 = memdisk.module
+@COND_i386_multiboot_TRUE@am__append_4659 = memdisk.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4660 =
+@COND_i386_multiboot_TRUE@am__append_4661 = $(nodist_memdisk_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4662 = \
+@COND_i386_multiboot_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ memdisk.marker
+@COND_i386_multiboot_TRUE@am__append_4663 = memdisk.mod
+@COND_i386_multiboot_TRUE@am__append_4664 = memdisk.marker
+@COND_i386_ieee1275_TRUE@am__append_4665 = memdisk.module
+@COND_i386_ieee1275_TRUE@am__append_4666 = memdisk.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4667 =
+@COND_i386_ieee1275_TRUE@am__append_4668 = $(nodist_memdisk_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4669 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ memdisk.marker
+@COND_i386_ieee1275_TRUE@am__append_4670 = memdisk.mod
+@COND_i386_ieee1275_TRUE@am__append_4671 = memdisk.marker
+@COND_x86_64_efi_TRUE@am__append_4672 = memdisk.module
+@COND_x86_64_efi_TRUE@am__append_4673 = memdisk.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4674 =
+@COND_x86_64_efi_TRUE@am__append_4675 = $(nodist_memdisk_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4676 = \
+@COND_x86_64_efi_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ memdisk.marker
+@COND_x86_64_efi_TRUE@am__append_4677 = memdisk.mod
+@COND_x86_64_efi_TRUE@am__append_4678 = memdisk.marker
+@COND_mips_yeeloong_TRUE@am__append_4679 = memdisk.module
+@COND_mips_yeeloong_TRUE@am__append_4680 = memdisk.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4681 =
+@COND_mips_yeeloong_TRUE@am__append_4682 = $(nodist_memdisk_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4683 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ memdisk.marker
+@COND_mips_yeeloong_TRUE@am__append_4684 = memdisk.mod
+@COND_mips_yeeloong_TRUE@am__append_4685 = memdisk.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4686 = memdisk.module
+@COND_sparc64_ieee1275_TRUE@am__append_4687 = memdisk.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4688 =
+@COND_sparc64_ieee1275_TRUE@am__append_4689 = $(nodist_memdisk_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4690 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ memdisk.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4691 = memdisk.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4692 = memdisk.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4693 = memdisk.module
+@COND_powerpc_ieee1275_TRUE@am__append_4694 = memdisk.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4695 =
+@COND_powerpc_ieee1275_TRUE@am__append_4696 = $(nodist_memdisk_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4697 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_memdisk_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ memdisk.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4698 = memdisk.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4699 = memdisk.marker
+@COND_i386_pc_TRUE@am__append_4700 = ata.module
+@COND_i386_pc_TRUE@am__append_4701 = ata.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4702 =
+@COND_i386_pc_TRUE@am__append_4703 = $(nodist_ata_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4704 = $(nodist_ata_module_SOURCES) \
+@COND_i386_pc_TRUE@ ata.marker
+@COND_i386_pc_TRUE@am__append_4705 = ata.mod
+@COND_i386_pc_TRUE@am__append_4706 = ata.marker
+@COND_i386_efi_TRUE@am__append_4707 = ata.module
+@COND_i386_efi_TRUE@am__append_4708 = ata.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4709 =
+@COND_i386_efi_TRUE@am__append_4710 = $(nodist_ata_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4711 = $(nodist_ata_module_SOURCES) \
+@COND_i386_efi_TRUE@ ata.marker
+@COND_i386_efi_TRUE@am__append_4712 = ata.mod
+@COND_i386_efi_TRUE@am__append_4713 = ata.marker
+@COND_i386_qemu_TRUE@am__append_4714 = ata.module
+@COND_i386_qemu_TRUE@am__append_4715 = ata.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4716 =
+@COND_i386_qemu_TRUE@am__append_4717 = $(nodist_ata_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4718 = $(nodist_ata_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ata.marker
+@COND_i386_qemu_TRUE@am__append_4719 = ata.mod
+@COND_i386_qemu_TRUE@am__append_4720 = ata.marker
+@COND_i386_coreboot_TRUE@am__append_4721 = ata.module
+@COND_i386_coreboot_TRUE@am__append_4722 = ata.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4723 =
+@COND_i386_coreboot_TRUE@am__append_4724 = $(nodist_ata_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4725 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ata_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ata.marker
+@COND_i386_coreboot_TRUE@am__append_4726 = ata.mod
+@COND_i386_coreboot_TRUE@am__append_4727 = ata.marker
+@COND_i386_multiboot_TRUE@am__append_4728 = ata.module
+@COND_i386_multiboot_TRUE@am__append_4729 = ata.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4730 =
+@COND_i386_multiboot_TRUE@am__append_4731 = $(nodist_ata_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4732 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ata_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ata.marker
+@COND_i386_multiboot_TRUE@am__append_4733 = ata.mod
+@COND_i386_multiboot_TRUE@am__append_4734 = ata.marker
+@COND_i386_ieee1275_TRUE@am__append_4735 = ata.module
+@COND_i386_ieee1275_TRUE@am__append_4736 = ata.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4737 =
+@COND_i386_ieee1275_TRUE@am__append_4738 = $(nodist_ata_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4739 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ata_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ata.marker
+@COND_i386_ieee1275_TRUE@am__append_4740 = ata.mod
+@COND_i386_ieee1275_TRUE@am__append_4741 = ata.marker
+@COND_x86_64_efi_TRUE@am__append_4742 = ata.module
+@COND_x86_64_efi_TRUE@am__append_4743 = ata.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4744 =
+@COND_x86_64_efi_TRUE@am__append_4745 = $(nodist_ata_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4746 = $(nodist_ata_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ata.marker
+@COND_x86_64_efi_TRUE@am__append_4747 = ata.mod
+@COND_x86_64_efi_TRUE@am__append_4748 = ata.marker
+@COND_mips_yeeloong_TRUE@am__append_4749 = ata.module
+@COND_mips_yeeloong_TRUE@am__append_4750 = ata.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4751 =
+@COND_mips_yeeloong_TRUE@am__append_4752 = $(nodist_ata_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4753 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ata_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ata.marker
+@COND_mips_yeeloong_TRUE@am__append_4754 = ata.mod
+@COND_mips_yeeloong_TRUE@am__append_4755 = ata.marker
+@COND_i386_pc_TRUE@am__append_4756 = ata_pthru.module
+@COND_i386_pc_TRUE@am__append_4757 = ata_pthru.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4758 =
+@COND_i386_pc_TRUE@am__append_4759 = $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4760 = \
+@COND_i386_pc_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_i386_pc_TRUE@ ata_pthru.marker
+@COND_i386_pc_TRUE@am__append_4761 = ata_pthru.mod
+@COND_i386_pc_TRUE@am__append_4762 = ata_pthru.marker
+@COND_i386_efi_TRUE@am__append_4763 = ata_pthru.module
+@COND_i386_efi_TRUE@am__append_4764 = ata_pthru.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4765 =
+@COND_i386_efi_TRUE@am__append_4766 = $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4767 = \
+@COND_i386_efi_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_i386_efi_TRUE@ ata_pthru.marker
+@COND_i386_efi_TRUE@am__append_4768 = ata_pthru.mod
+@COND_i386_efi_TRUE@am__append_4769 = ata_pthru.marker
+@COND_i386_qemu_TRUE@am__append_4770 = ata_pthru.module
+@COND_i386_qemu_TRUE@am__append_4771 = ata_pthru.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4772 =
+@COND_i386_qemu_TRUE@am__append_4773 = $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4774 = \
+@COND_i386_qemu_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ata_pthru.marker
+@COND_i386_qemu_TRUE@am__append_4775 = ata_pthru.mod
+@COND_i386_qemu_TRUE@am__append_4776 = ata_pthru.marker
+@COND_i386_coreboot_TRUE@am__append_4777 = ata_pthru.module
+@COND_i386_coreboot_TRUE@am__append_4778 = ata_pthru.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4779 =
+@COND_i386_coreboot_TRUE@am__append_4780 = $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4781 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ata_pthru.marker
+@COND_i386_coreboot_TRUE@am__append_4782 = ata_pthru.mod
+@COND_i386_coreboot_TRUE@am__append_4783 = ata_pthru.marker
+@COND_i386_multiboot_TRUE@am__append_4784 = ata_pthru.module
+@COND_i386_multiboot_TRUE@am__append_4785 = ata_pthru.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4786 =
+@COND_i386_multiboot_TRUE@am__append_4787 = $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4788 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ata_pthru.marker
+@COND_i386_multiboot_TRUE@am__append_4789 = ata_pthru.mod
+@COND_i386_multiboot_TRUE@am__append_4790 = ata_pthru.marker
+@COND_i386_ieee1275_TRUE@am__append_4791 = ata_pthru.module
+@COND_i386_ieee1275_TRUE@am__append_4792 = ata_pthru.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4793 =
+@COND_i386_ieee1275_TRUE@am__append_4794 = $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4795 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ata_pthru.marker
+@COND_i386_ieee1275_TRUE@am__append_4796 = ata_pthru.mod
+@COND_i386_ieee1275_TRUE@am__append_4797 = ata_pthru.marker
+@COND_x86_64_efi_TRUE@am__append_4798 = ata_pthru.module
+@COND_x86_64_efi_TRUE@am__append_4799 = ata_pthru.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4800 =
+@COND_x86_64_efi_TRUE@am__append_4801 = $(nodist_ata_pthru_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4802 = \
+@COND_x86_64_efi_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ata_pthru.marker
+@COND_x86_64_efi_TRUE@am__append_4803 = ata_pthru.mod
+@COND_x86_64_efi_TRUE@am__append_4804 = ata_pthru.marker
+@COND_mips_yeeloong_TRUE@am__append_4805 = ata_pthru.module
+@COND_mips_yeeloong_TRUE@am__append_4806 = ata_pthru.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4807 =
+@COND_mips_yeeloong_TRUE@am__append_4808 = $(nodist_ata_pthru_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4809 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ata_pthru_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ata_pthru.marker
+@COND_mips_yeeloong_TRUE@am__append_4810 = ata_pthru.mod
+@COND_mips_yeeloong_TRUE@am__append_4811 = ata_pthru.marker
+@COND_i386_pc_TRUE@am__append_4812 = biosdisk.module
+@COND_i386_pc_TRUE@am__append_4813 = biosdisk.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4814 =
+@COND_i386_pc_TRUE@am__append_4815 = $(nodist_biosdisk_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4816 = \
+@COND_i386_pc_TRUE@ $(nodist_biosdisk_module_SOURCES) \
+@COND_i386_pc_TRUE@ biosdisk.marker
+@COND_i386_pc_TRUE@am__append_4817 = biosdisk.mod
+@COND_i386_pc_TRUE@am__append_4818 = biosdisk.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_4819 = usbms.module
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_4820 = usbms.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_4821 =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_4822 = $(nodist_usbms_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_4823 = $(nodist_usbms_module_SOURCES) \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ usbms.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_4824 = usbms.mod
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_4825 = usbms.marker
+@COND_i386_pc_TRUE@am__append_4826 = usbms.module
+@COND_i386_pc_TRUE@am__append_4827 = usbms.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4828 =
+@COND_i386_pc_TRUE@am__append_4829 = $(nodist_usbms_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4830 = $(nodist_usbms_module_SOURCES) \
+@COND_i386_pc_TRUE@ usbms.marker
+@COND_i386_pc_TRUE@am__append_4831 = usbms.mod
+@COND_i386_pc_TRUE@am__append_4832 = usbms.marker
+@COND_i386_efi_TRUE@am__append_4833 = usbms.module
+@COND_i386_efi_TRUE@am__append_4834 = usbms.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4835 =
+@COND_i386_efi_TRUE@am__append_4836 = $(nodist_usbms_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4837 = $(nodist_usbms_module_SOURCES) \
+@COND_i386_efi_TRUE@ usbms.marker
+@COND_i386_efi_TRUE@am__append_4838 = usbms.mod
+@COND_i386_efi_TRUE@am__append_4839 = usbms.marker
+@COND_i386_qemu_TRUE@am__append_4840 = usbms.module
+@COND_i386_qemu_TRUE@am__append_4841 = usbms.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4842 =
+@COND_i386_qemu_TRUE@am__append_4843 = $(nodist_usbms_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4844 = $(nodist_usbms_module_SOURCES) \
+@COND_i386_qemu_TRUE@ usbms.marker
+@COND_i386_qemu_TRUE@am__append_4845 = usbms.mod
+@COND_i386_qemu_TRUE@am__append_4846 = usbms.marker
+@COND_i386_coreboot_TRUE@am__append_4847 = usbms.module
+@COND_i386_coreboot_TRUE@am__append_4848 = usbms.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4849 =
+@COND_i386_coreboot_TRUE@am__append_4850 = $(nodist_usbms_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4851 = \
+@COND_i386_coreboot_TRUE@ $(nodist_usbms_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ usbms.marker
+@COND_i386_coreboot_TRUE@am__append_4852 = usbms.mod
+@COND_i386_coreboot_TRUE@am__append_4853 = usbms.marker
+@COND_i386_multiboot_TRUE@am__append_4854 = usbms.module
+@COND_i386_multiboot_TRUE@am__append_4855 = usbms.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4856 =
+@COND_i386_multiboot_TRUE@am__append_4857 = $(nodist_usbms_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4858 = \
+@COND_i386_multiboot_TRUE@ $(nodist_usbms_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ usbms.marker
+@COND_i386_multiboot_TRUE@am__append_4859 = usbms.mod
+@COND_i386_multiboot_TRUE@am__append_4860 = usbms.marker
+@COND_i386_ieee1275_TRUE@am__append_4861 = usbms.module
+@COND_i386_ieee1275_TRUE@am__append_4862 = usbms.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4863 =
+@COND_i386_ieee1275_TRUE@am__append_4864 = $(nodist_usbms_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4865 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_usbms_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ usbms.marker
+@COND_i386_ieee1275_TRUE@am__append_4866 = usbms.mod
+@COND_i386_ieee1275_TRUE@am__append_4867 = usbms.marker
+@COND_x86_64_efi_TRUE@am__append_4868 = usbms.module
+@COND_x86_64_efi_TRUE@am__append_4869 = usbms.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4870 =
+@COND_x86_64_efi_TRUE@am__append_4871 = $(nodist_usbms_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4872 = \
+@COND_x86_64_efi_TRUE@ $(nodist_usbms_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ usbms.marker
+@COND_x86_64_efi_TRUE@am__append_4873 = usbms.mod
+@COND_x86_64_efi_TRUE@am__append_4874 = usbms.marker
+@COND_mips_yeeloong_TRUE@am__append_4875 = usbms.module
+@COND_mips_yeeloong_TRUE@am__append_4876 = usbms.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_4877 =
+@COND_mips_yeeloong_TRUE@am__append_4878 = $(nodist_usbms_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_4879 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_usbms_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ usbms.marker
+@COND_mips_yeeloong_TRUE@am__append_4880 = usbms.mod
+@COND_mips_yeeloong_TRUE@am__append_4881 = usbms.marker
+@COND_i386_ieee1275_TRUE@am__append_4882 = nand.module
+@COND_i386_ieee1275_TRUE@am__append_4883 = nand.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4884 =
+@COND_i386_ieee1275_TRUE@am__append_4885 = $(nodist_nand_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4886 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_nand_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ nand.marker
+@COND_i386_ieee1275_TRUE@am__append_4887 = nand.mod
+@COND_i386_ieee1275_TRUE@am__append_4888 = nand.marker
+@COND_i386_pc_TRUE@am__append_4889 = efiemu.module
+@COND_i386_pc_TRUE@am__append_4890 = efiemu.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4891 = efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+@COND_i386_pc_TRUE@am__append_4892 = $(nodist_efiemu_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4893 = $(nodist_efiemu_module_SOURCES) \
+@COND_i386_pc_TRUE@ efiemu.marker
+@COND_i386_pc_TRUE@am__append_4894 = efiemu.mod
+@COND_i386_pc_TRUE@am__append_4895 = efiemu.marker
+@COND_i386_qemu_TRUE@am__append_4896 = efiemu.module
+@COND_i386_qemu_TRUE@am__append_4897 = efiemu.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4898 = efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+@COND_i386_qemu_TRUE@am__append_4899 = $(nodist_efiemu_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4900 = \
+@COND_i386_qemu_TRUE@ $(nodist_efiemu_module_SOURCES) \
+@COND_i386_qemu_TRUE@ efiemu.marker
+@COND_i386_qemu_TRUE@am__append_4901 = efiemu.mod
+@COND_i386_qemu_TRUE@am__append_4902 = efiemu.marker
+@COND_i386_coreboot_TRUE@am__append_4903 = efiemu.module
+@COND_i386_coreboot_TRUE@am__append_4904 = efiemu.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4905 = efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+@COND_i386_coreboot_TRUE@am__append_4906 = $(nodist_efiemu_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4907 = \
+@COND_i386_coreboot_TRUE@ $(nodist_efiemu_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ efiemu.marker
+@COND_i386_coreboot_TRUE@am__append_4908 = efiemu.mod
+@COND_i386_coreboot_TRUE@am__append_4909 = efiemu.marker
+@COND_i386_multiboot_TRUE@am__append_4910 = efiemu.module
+@COND_i386_multiboot_TRUE@am__append_4911 = efiemu.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4912 = efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+@COND_i386_multiboot_TRUE@am__append_4913 = $(nodist_efiemu_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4914 = \
+@COND_i386_multiboot_TRUE@ $(nodist_efiemu_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ efiemu.marker
+@COND_i386_multiboot_TRUE@am__append_4915 = efiemu.mod
+@COND_i386_multiboot_TRUE@am__append_4916 = efiemu.marker
+@COND_i386_ieee1275_TRUE@am__append_4917 = efiemu.module
+@COND_i386_ieee1275_TRUE@am__append_4918 = efiemu.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4919 = efiemu/prepare.c efiemu/loadcore.c efiemu/runtime/efiemu.S efiemu/runtime/efiemu.c
+@COND_i386_ieee1275_TRUE@am__append_4920 = $(nodist_efiemu_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4921 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_efiemu_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ efiemu.marker
+@COND_i386_ieee1275_TRUE@am__append_4922 = efiemu.mod
+@COND_i386_ieee1275_TRUE@am__append_4923 = efiemu.marker
+@COND_emu_TRUE@am__append_4924 = font.module
+@COND_emu_TRUE@am__append_4925 = font.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4926 =
+@COND_emu_TRUE@am__append_4927 = $(nodist_font_module_SOURCES)
+@COND_emu_TRUE@am__append_4928 = $(nodist_font_module_SOURCES) \
+@COND_emu_TRUE@ font.marker
+@COND_emu_TRUE@am__append_4929 = font.mod
+@COND_emu_TRUE@am__append_4930 = font.marker
+@COND_i386_pc_TRUE@am__append_4931 = font.module
+@COND_i386_pc_TRUE@am__append_4932 = font.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_4933 =
+@COND_i386_pc_TRUE@am__append_4934 = $(nodist_font_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_4935 = $(nodist_font_module_SOURCES) \
+@COND_i386_pc_TRUE@ font.marker
+@COND_i386_pc_TRUE@am__append_4936 = font.mod
+@COND_i386_pc_TRUE@am__append_4937 = font.marker
+@COND_i386_efi_TRUE@am__append_4938 = font.module
+@COND_i386_efi_TRUE@am__append_4939 = font.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_4940 =
+@COND_i386_efi_TRUE@am__append_4941 = $(nodist_font_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_4942 = $(nodist_font_module_SOURCES) \
+@COND_i386_efi_TRUE@ font.marker
+@COND_i386_efi_TRUE@am__append_4943 = font.mod
+@COND_i386_efi_TRUE@am__append_4944 = font.marker
+@COND_i386_qemu_TRUE@am__append_4945 = font.module
+@COND_i386_qemu_TRUE@am__append_4946 = font.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_4947 =
+@COND_i386_qemu_TRUE@am__append_4948 = $(nodist_font_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_4949 = $(nodist_font_module_SOURCES) \
+@COND_i386_qemu_TRUE@ font.marker
+@COND_i386_qemu_TRUE@am__append_4950 = font.mod
+@COND_i386_qemu_TRUE@am__append_4951 = font.marker
+@COND_i386_coreboot_TRUE@am__append_4952 = font.module
+@COND_i386_coreboot_TRUE@am__append_4953 = font.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_4954 =
+@COND_i386_coreboot_TRUE@am__append_4955 = $(nodist_font_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_4956 = \
+@COND_i386_coreboot_TRUE@ $(nodist_font_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ font.marker
+@COND_i386_coreboot_TRUE@am__append_4957 = font.mod
+@COND_i386_coreboot_TRUE@am__append_4958 = font.marker
+@COND_i386_multiboot_TRUE@am__append_4959 = font.module
+@COND_i386_multiboot_TRUE@am__append_4960 = font.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_4961 =
+@COND_i386_multiboot_TRUE@am__append_4962 = $(nodist_font_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_4963 = \
+@COND_i386_multiboot_TRUE@ $(nodist_font_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ font.marker
+@COND_i386_multiboot_TRUE@am__append_4964 = font.mod
+@COND_i386_multiboot_TRUE@am__append_4965 = font.marker
+@COND_i386_ieee1275_TRUE@am__append_4966 = font.module
+@COND_i386_ieee1275_TRUE@am__append_4967 = font.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_4968 =
+@COND_i386_ieee1275_TRUE@am__append_4969 = $(nodist_font_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_4970 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_font_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ font.marker
+@COND_i386_ieee1275_TRUE@am__append_4971 = font.mod
+@COND_i386_ieee1275_TRUE@am__append_4972 = font.marker
+@COND_x86_64_efi_TRUE@am__append_4973 = font.module
+@COND_x86_64_efi_TRUE@am__append_4974 = font.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_4975 =
+@COND_x86_64_efi_TRUE@am__append_4976 = $(nodist_font_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_4977 = $(nodist_font_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ font.marker
+@COND_x86_64_efi_TRUE@am__append_4978 = font.mod
+@COND_x86_64_efi_TRUE@am__append_4979 = font.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4980 = font.module
+@COND_sparc64_ieee1275_TRUE@am__append_4981 = font.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_4982 =
+@COND_sparc64_ieee1275_TRUE@am__append_4983 = $(nodist_font_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_4984 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_font_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ font.marker
+@COND_sparc64_ieee1275_TRUE@am__append_4985 = font.mod
+@COND_sparc64_ieee1275_TRUE@am__append_4986 = font.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4987 = font.module
+@COND_powerpc_ieee1275_TRUE@am__append_4988 = font.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_4989 =
+@COND_powerpc_ieee1275_TRUE@am__append_4990 = $(nodist_font_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_4991 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_font_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ font.marker
+@COND_powerpc_ieee1275_TRUE@am__append_4992 = font.mod
+@COND_powerpc_ieee1275_TRUE@am__append_4993 = font.marker
+@COND_emu_TRUE@am__append_4994 = affs.module
+@COND_emu_TRUE@am__append_4995 = affs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_4996 =
+@COND_emu_TRUE@am__append_4997 = $(nodist_affs_module_SOURCES)
+@COND_emu_TRUE@am__append_4998 = $(nodist_affs_module_SOURCES) \
+@COND_emu_TRUE@ affs.marker
+@COND_emu_TRUE@am__append_4999 = affs.mod
+@COND_emu_TRUE@am__append_5000 = affs.marker
+@COND_i386_pc_TRUE@am__append_5001 = affs.module
+@COND_i386_pc_TRUE@am__append_5002 = affs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5003 =
+@COND_i386_pc_TRUE@am__append_5004 = $(nodist_affs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5005 = $(nodist_affs_module_SOURCES) \
+@COND_i386_pc_TRUE@ affs.marker
+@COND_i386_pc_TRUE@am__append_5006 = affs.mod
+@COND_i386_pc_TRUE@am__append_5007 = affs.marker
+@COND_i386_efi_TRUE@am__append_5008 = affs.module
+@COND_i386_efi_TRUE@am__append_5009 = affs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5010 =
+@COND_i386_efi_TRUE@am__append_5011 = $(nodist_affs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5012 = $(nodist_affs_module_SOURCES) \
+@COND_i386_efi_TRUE@ affs.marker
+@COND_i386_efi_TRUE@am__append_5013 = affs.mod
+@COND_i386_efi_TRUE@am__append_5014 = affs.marker
+@COND_i386_qemu_TRUE@am__append_5015 = affs.module
+@COND_i386_qemu_TRUE@am__append_5016 = affs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5017 =
+@COND_i386_qemu_TRUE@am__append_5018 = $(nodist_affs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5019 = $(nodist_affs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ affs.marker
+@COND_i386_qemu_TRUE@am__append_5020 = affs.mod
+@COND_i386_qemu_TRUE@am__append_5021 = affs.marker
+@COND_i386_coreboot_TRUE@am__append_5022 = affs.module
+@COND_i386_coreboot_TRUE@am__append_5023 = affs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5024 =
+@COND_i386_coreboot_TRUE@am__append_5025 = $(nodist_affs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5026 = \
+@COND_i386_coreboot_TRUE@ $(nodist_affs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ affs.marker
+@COND_i386_coreboot_TRUE@am__append_5027 = affs.mod
+@COND_i386_coreboot_TRUE@am__append_5028 = affs.marker
+@COND_i386_multiboot_TRUE@am__append_5029 = affs.module
+@COND_i386_multiboot_TRUE@am__append_5030 = affs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5031 =
+@COND_i386_multiboot_TRUE@am__append_5032 = $(nodist_affs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5033 = \
+@COND_i386_multiboot_TRUE@ $(nodist_affs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ affs.marker
+@COND_i386_multiboot_TRUE@am__append_5034 = affs.mod
+@COND_i386_multiboot_TRUE@am__append_5035 = affs.marker
+@COND_i386_ieee1275_TRUE@am__append_5036 = affs.module
+@COND_i386_ieee1275_TRUE@am__append_5037 = affs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5038 =
+@COND_i386_ieee1275_TRUE@am__append_5039 = $(nodist_affs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5040 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_affs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ affs.marker
+@COND_i386_ieee1275_TRUE@am__append_5041 = affs.mod
+@COND_i386_ieee1275_TRUE@am__append_5042 = affs.marker
+@COND_x86_64_efi_TRUE@am__append_5043 = affs.module
+@COND_x86_64_efi_TRUE@am__append_5044 = affs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5045 =
+@COND_x86_64_efi_TRUE@am__append_5046 = $(nodist_affs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5047 = $(nodist_affs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ affs.marker
+@COND_x86_64_efi_TRUE@am__append_5048 = affs.mod
+@COND_x86_64_efi_TRUE@am__append_5049 = affs.marker
+@COND_mips_yeeloong_TRUE@am__append_5050 = affs.module
+@COND_mips_yeeloong_TRUE@am__append_5051 = affs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5052 =
+@COND_mips_yeeloong_TRUE@am__append_5053 = $(nodist_affs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5054 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_affs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ affs.marker
+@COND_mips_yeeloong_TRUE@am__append_5055 = affs.mod
+@COND_mips_yeeloong_TRUE@am__append_5056 = affs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5057 = affs.module
+@COND_sparc64_ieee1275_TRUE@am__append_5058 = affs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5059 =
+@COND_sparc64_ieee1275_TRUE@am__append_5060 = $(nodist_affs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5061 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_affs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ affs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5062 = affs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5063 = affs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5064 = affs.module
+@COND_powerpc_ieee1275_TRUE@am__append_5065 = affs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5066 =
+@COND_powerpc_ieee1275_TRUE@am__append_5067 = $(nodist_affs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5068 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_affs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ affs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5069 = affs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5070 = affs.marker
+@COND_emu_TRUE@am__append_5071 = afs.module
+@COND_emu_TRUE@am__append_5072 = afs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5073 =
+@COND_emu_TRUE@am__append_5074 = $(nodist_afs_module_SOURCES)
+@COND_emu_TRUE@am__append_5075 = $(nodist_afs_module_SOURCES) \
+@COND_emu_TRUE@ afs.marker
+@COND_emu_TRUE@am__append_5076 = afs.mod
+@COND_emu_TRUE@am__append_5077 = afs.marker
+@COND_i386_pc_TRUE@am__append_5078 = afs.module
+@COND_i386_pc_TRUE@am__append_5079 = afs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5080 =
+@COND_i386_pc_TRUE@am__append_5081 = $(nodist_afs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5082 = $(nodist_afs_module_SOURCES) \
+@COND_i386_pc_TRUE@ afs.marker
+@COND_i386_pc_TRUE@am__append_5083 = afs.mod
+@COND_i386_pc_TRUE@am__append_5084 = afs.marker
+@COND_i386_efi_TRUE@am__append_5085 = afs.module
+@COND_i386_efi_TRUE@am__append_5086 = afs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5087 =
+@COND_i386_efi_TRUE@am__append_5088 = $(nodist_afs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5089 = $(nodist_afs_module_SOURCES) \
+@COND_i386_efi_TRUE@ afs.marker
+@COND_i386_efi_TRUE@am__append_5090 = afs.mod
+@COND_i386_efi_TRUE@am__append_5091 = afs.marker
+@COND_i386_qemu_TRUE@am__append_5092 = afs.module
+@COND_i386_qemu_TRUE@am__append_5093 = afs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5094 =
+@COND_i386_qemu_TRUE@am__append_5095 = $(nodist_afs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5096 = $(nodist_afs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ afs.marker
+@COND_i386_qemu_TRUE@am__append_5097 = afs.mod
+@COND_i386_qemu_TRUE@am__append_5098 = afs.marker
+@COND_i386_coreboot_TRUE@am__append_5099 = afs.module
+@COND_i386_coreboot_TRUE@am__append_5100 = afs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5101 =
+@COND_i386_coreboot_TRUE@am__append_5102 = $(nodist_afs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5103 = \
+@COND_i386_coreboot_TRUE@ $(nodist_afs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ afs.marker
+@COND_i386_coreboot_TRUE@am__append_5104 = afs.mod
+@COND_i386_coreboot_TRUE@am__append_5105 = afs.marker
+@COND_i386_multiboot_TRUE@am__append_5106 = afs.module
+@COND_i386_multiboot_TRUE@am__append_5107 = afs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5108 =
+@COND_i386_multiboot_TRUE@am__append_5109 = $(nodist_afs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5110 = \
+@COND_i386_multiboot_TRUE@ $(nodist_afs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ afs.marker
+@COND_i386_multiboot_TRUE@am__append_5111 = afs.mod
+@COND_i386_multiboot_TRUE@am__append_5112 = afs.marker
+@COND_i386_ieee1275_TRUE@am__append_5113 = afs.module
+@COND_i386_ieee1275_TRUE@am__append_5114 = afs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5115 =
+@COND_i386_ieee1275_TRUE@am__append_5116 = $(nodist_afs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5117 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_afs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ afs.marker
+@COND_i386_ieee1275_TRUE@am__append_5118 = afs.mod
+@COND_i386_ieee1275_TRUE@am__append_5119 = afs.marker
+@COND_x86_64_efi_TRUE@am__append_5120 = afs.module
+@COND_x86_64_efi_TRUE@am__append_5121 = afs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5122 =
+@COND_x86_64_efi_TRUE@am__append_5123 = $(nodist_afs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5124 = $(nodist_afs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ afs.marker
+@COND_x86_64_efi_TRUE@am__append_5125 = afs.mod
+@COND_x86_64_efi_TRUE@am__append_5126 = afs.marker
+@COND_mips_yeeloong_TRUE@am__append_5127 = afs.module
+@COND_mips_yeeloong_TRUE@am__append_5128 = afs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5129 =
+@COND_mips_yeeloong_TRUE@am__append_5130 = $(nodist_afs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5131 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_afs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ afs.marker
+@COND_mips_yeeloong_TRUE@am__append_5132 = afs.mod
+@COND_mips_yeeloong_TRUE@am__append_5133 = afs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5134 = afs.module
+@COND_sparc64_ieee1275_TRUE@am__append_5135 = afs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5136 =
+@COND_sparc64_ieee1275_TRUE@am__append_5137 = $(nodist_afs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5138 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_afs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ afs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5139 = afs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5140 = afs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5141 = afs.module
+@COND_powerpc_ieee1275_TRUE@am__append_5142 = afs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5143 =
+@COND_powerpc_ieee1275_TRUE@am__append_5144 = $(nodist_afs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5145 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_afs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ afs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5146 = afs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5147 = afs.marker
+@COND_emu_TRUE@am__append_5148 = afs_be.module
+@COND_emu_TRUE@am__append_5149 = afs_be.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5150 =
+@COND_emu_TRUE@am__append_5151 = $(nodist_afs_be_module_SOURCES)
+@COND_emu_TRUE@am__append_5152 = $(nodist_afs_be_module_SOURCES) \
+@COND_emu_TRUE@ afs_be.marker
+@COND_emu_TRUE@am__append_5153 = afs_be.mod
+@COND_emu_TRUE@am__append_5154 = afs_be.marker
+@COND_i386_pc_TRUE@am__append_5155 = afs_be.module
+@COND_i386_pc_TRUE@am__append_5156 = afs_be.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5157 =
+@COND_i386_pc_TRUE@am__append_5158 = $(nodist_afs_be_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5159 = $(nodist_afs_be_module_SOURCES) \
+@COND_i386_pc_TRUE@ afs_be.marker
+@COND_i386_pc_TRUE@am__append_5160 = afs_be.mod
+@COND_i386_pc_TRUE@am__append_5161 = afs_be.marker
+@COND_i386_efi_TRUE@am__append_5162 = afs_be.module
+@COND_i386_efi_TRUE@am__append_5163 = afs_be.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5164 =
+@COND_i386_efi_TRUE@am__append_5165 = $(nodist_afs_be_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5166 = $(nodist_afs_be_module_SOURCES) \
+@COND_i386_efi_TRUE@ afs_be.marker
+@COND_i386_efi_TRUE@am__append_5167 = afs_be.mod
+@COND_i386_efi_TRUE@am__append_5168 = afs_be.marker
+@COND_i386_qemu_TRUE@am__append_5169 = afs_be.module
+@COND_i386_qemu_TRUE@am__append_5170 = afs_be.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5171 =
+@COND_i386_qemu_TRUE@am__append_5172 = $(nodist_afs_be_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5173 = \
+@COND_i386_qemu_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_i386_qemu_TRUE@ afs_be.marker
+@COND_i386_qemu_TRUE@am__append_5174 = afs_be.mod
+@COND_i386_qemu_TRUE@am__append_5175 = afs_be.marker
+@COND_i386_coreboot_TRUE@am__append_5176 = afs_be.module
+@COND_i386_coreboot_TRUE@am__append_5177 = afs_be.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5178 =
+@COND_i386_coreboot_TRUE@am__append_5179 = $(nodist_afs_be_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5180 = \
+@COND_i386_coreboot_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ afs_be.marker
+@COND_i386_coreboot_TRUE@am__append_5181 = afs_be.mod
+@COND_i386_coreboot_TRUE@am__append_5182 = afs_be.marker
+@COND_i386_multiboot_TRUE@am__append_5183 = afs_be.module
+@COND_i386_multiboot_TRUE@am__append_5184 = afs_be.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5185 =
+@COND_i386_multiboot_TRUE@am__append_5186 = $(nodist_afs_be_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5187 = \
+@COND_i386_multiboot_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ afs_be.marker
+@COND_i386_multiboot_TRUE@am__append_5188 = afs_be.mod
+@COND_i386_multiboot_TRUE@am__append_5189 = afs_be.marker
+@COND_i386_ieee1275_TRUE@am__append_5190 = afs_be.module
+@COND_i386_ieee1275_TRUE@am__append_5191 = afs_be.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5192 =
+@COND_i386_ieee1275_TRUE@am__append_5193 = $(nodist_afs_be_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5194 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ afs_be.marker
+@COND_i386_ieee1275_TRUE@am__append_5195 = afs_be.mod
+@COND_i386_ieee1275_TRUE@am__append_5196 = afs_be.marker
+@COND_x86_64_efi_TRUE@am__append_5197 = afs_be.module
+@COND_x86_64_efi_TRUE@am__append_5198 = afs_be.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5199 =
+@COND_x86_64_efi_TRUE@am__append_5200 = $(nodist_afs_be_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5201 = \
+@COND_x86_64_efi_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ afs_be.marker
+@COND_x86_64_efi_TRUE@am__append_5202 = afs_be.mod
+@COND_x86_64_efi_TRUE@am__append_5203 = afs_be.marker
+@COND_mips_yeeloong_TRUE@am__append_5204 = afs_be.module
+@COND_mips_yeeloong_TRUE@am__append_5205 = afs_be.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5206 =
+@COND_mips_yeeloong_TRUE@am__append_5207 = $(nodist_afs_be_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5208 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ afs_be.marker
+@COND_mips_yeeloong_TRUE@am__append_5209 = afs_be.mod
+@COND_mips_yeeloong_TRUE@am__append_5210 = afs_be.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5211 = afs_be.module
+@COND_sparc64_ieee1275_TRUE@am__append_5212 = afs_be.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5213 =
+@COND_sparc64_ieee1275_TRUE@am__append_5214 = $(nodist_afs_be_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5215 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ afs_be.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5216 = afs_be.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5217 = afs_be.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5218 = afs_be.module
+@COND_powerpc_ieee1275_TRUE@am__append_5219 = afs_be.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5220 =
+@COND_powerpc_ieee1275_TRUE@am__append_5221 = $(nodist_afs_be_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5222 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_afs_be_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ afs_be.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5223 = afs_be.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5224 = afs_be.marker
+@COND_emu_TRUE@am__append_5225 = befs.module
+@COND_emu_TRUE@am__append_5226 = befs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5227 =
+@COND_emu_TRUE@am__append_5228 = $(nodist_befs_module_SOURCES)
+@COND_emu_TRUE@am__append_5229 = $(nodist_befs_module_SOURCES) \
+@COND_emu_TRUE@ befs.marker
+@COND_emu_TRUE@am__append_5230 = befs.mod
+@COND_emu_TRUE@am__append_5231 = befs.marker
+@COND_i386_pc_TRUE@am__append_5232 = befs.module
+@COND_i386_pc_TRUE@am__append_5233 = befs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5234 =
+@COND_i386_pc_TRUE@am__append_5235 = $(nodist_befs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5236 = $(nodist_befs_module_SOURCES) \
+@COND_i386_pc_TRUE@ befs.marker
+@COND_i386_pc_TRUE@am__append_5237 = befs.mod
+@COND_i386_pc_TRUE@am__append_5238 = befs.marker
+@COND_i386_efi_TRUE@am__append_5239 = befs.module
+@COND_i386_efi_TRUE@am__append_5240 = befs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5241 =
+@COND_i386_efi_TRUE@am__append_5242 = $(nodist_befs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5243 = $(nodist_befs_module_SOURCES) \
+@COND_i386_efi_TRUE@ befs.marker
+@COND_i386_efi_TRUE@am__append_5244 = befs.mod
+@COND_i386_efi_TRUE@am__append_5245 = befs.marker
+@COND_i386_qemu_TRUE@am__append_5246 = befs.module
+@COND_i386_qemu_TRUE@am__append_5247 = befs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5248 =
+@COND_i386_qemu_TRUE@am__append_5249 = $(nodist_befs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5250 = $(nodist_befs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ befs.marker
+@COND_i386_qemu_TRUE@am__append_5251 = befs.mod
+@COND_i386_qemu_TRUE@am__append_5252 = befs.marker
+@COND_i386_coreboot_TRUE@am__append_5253 = befs.module
+@COND_i386_coreboot_TRUE@am__append_5254 = befs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5255 =
+@COND_i386_coreboot_TRUE@am__append_5256 = $(nodist_befs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5257 = \
+@COND_i386_coreboot_TRUE@ $(nodist_befs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ befs.marker
+@COND_i386_coreboot_TRUE@am__append_5258 = befs.mod
+@COND_i386_coreboot_TRUE@am__append_5259 = befs.marker
+@COND_i386_multiboot_TRUE@am__append_5260 = befs.module
+@COND_i386_multiboot_TRUE@am__append_5261 = befs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5262 =
+@COND_i386_multiboot_TRUE@am__append_5263 = $(nodist_befs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5264 = \
+@COND_i386_multiboot_TRUE@ $(nodist_befs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ befs.marker
+@COND_i386_multiboot_TRUE@am__append_5265 = befs.mod
+@COND_i386_multiboot_TRUE@am__append_5266 = befs.marker
+@COND_i386_ieee1275_TRUE@am__append_5267 = befs.module
+@COND_i386_ieee1275_TRUE@am__append_5268 = befs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5269 =
+@COND_i386_ieee1275_TRUE@am__append_5270 = $(nodist_befs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5271 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_befs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ befs.marker
+@COND_i386_ieee1275_TRUE@am__append_5272 = befs.mod
+@COND_i386_ieee1275_TRUE@am__append_5273 = befs.marker
+@COND_x86_64_efi_TRUE@am__append_5274 = befs.module
+@COND_x86_64_efi_TRUE@am__append_5275 = befs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5276 =
+@COND_x86_64_efi_TRUE@am__append_5277 = $(nodist_befs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5278 = $(nodist_befs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ befs.marker
+@COND_x86_64_efi_TRUE@am__append_5279 = befs.mod
+@COND_x86_64_efi_TRUE@am__append_5280 = befs.marker
+@COND_mips_yeeloong_TRUE@am__append_5281 = befs.module
+@COND_mips_yeeloong_TRUE@am__append_5282 = befs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5283 =
+@COND_mips_yeeloong_TRUE@am__append_5284 = $(nodist_befs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5285 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_befs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ befs.marker
+@COND_mips_yeeloong_TRUE@am__append_5286 = befs.mod
+@COND_mips_yeeloong_TRUE@am__append_5287 = befs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5288 = befs.module
+@COND_sparc64_ieee1275_TRUE@am__append_5289 = befs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5290 =
+@COND_sparc64_ieee1275_TRUE@am__append_5291 = $(nodist_befs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5292 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_befs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ befs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5293 = befs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5294 = befs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5295 = befs.module
+@COND_powerpc_ieee1275_TRUE@am__append_5296 = befs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5297 =
+@COND_powerpc_ieee1275_TRUE@am__append_5298 = $(nodist_befs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5299 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_befs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ befs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5300 = befs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5301 = befs.marker
+@COND_emu_TRUE@am__append_5302 = befs_be.module
+@COND_emu_TRUE@am__append_5303 = befs_be.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5304 =
+@COND_emu_TRUE@am__append_5305 = $(nodist_befs_be_module_SOURCES)
+@COND_emu_TRUE@am__append_5306 = $(nodist_befs_be_module_SOURCES) \
+@COND_emu_TRUE@ befs_be.marker
+@COND_emu_TRUE@am__append_5307 = befs_be.mod
+@COND_emu_TRUE@am__append_5308 = befs_be.marker
+@COND_i386_pc_TRUE@am__append_5309 = befs_be.module
+@COND_i386_pc_TRUE@am__append_5310 = befs_be.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5311 =
+@COND_i386_pc_TRUE@am__append_5312 = $(nodist_befs_be_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5313 = $(nodist_befs_be_module_SOURCES) \
+@COND_i386_pc_TRUE@ befs_be.marker
+@COND_i386_pc_TRUE@am__append_5314 = befs_be.mod
+@COND_i386_pc_TRUE@am__append_5315 = befs_be.marker
+@COND_i386_efi_TRUE@am__append_5316 = befs_be.module
+@COND_i386_efi_TRUE@am__append_5317 = befs_be.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5318 =
+@COND_i386_efi_TRUE@am__append_5319 = $(nodist_befs_be_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5320 = \
+@COND_i386_efi_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_i386_efi_TRUE@ befs_be.marker
+@COND_i386_efi_TRUE@am__append_5321 = befs_be.mod
+@COND_i386_efi_TRUE@am__append_5322 = befs_be.marker
+@COND_i386_qemu_TRUE@am__append_5323 = befs_be.module
+@COND_i386_qemu_TRUE@am__append_5324 = befs_be.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5325 =
+@COND_i386_qemu_TRUE@am__append_5326 = $(nodist_befs_be_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5327 = \
+@COND_i386_qemu_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_i386_qemu_TRUE@ befs_be.marker
+@COND_i386_qemu_TRUE@am__append_5328 = befs_be.mod
+@COND_i386_qemu_TRUE@am__append_5329 = befs_be.marker
+@COND_i386_coreboot_TRUE@am__append_5330 = befs_be.module
+@COND_i386_coreboot_TRUE@am__append_5331 = befs_be.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5332 =
+@COND_i386_coreboot_TRUE@am__append_5333 = $(nodist_befs_be_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5334 = \
+@COND_i386_coreboot_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ befs_be.marker
+@COND_i386_coreboot_TRUE@am__append_5335 = befs_be.mod
+@COND_i386_coreboot_TRUE@am__append_5336 = befs_be.marker
+@COND_i386_multiboot_TRUE@am__append_5337 = befs_be.module
+@COND_i386_multiboot_TRUE@am__append_5338 = befs_be.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5339 =
+@COND_i386_multiboot_TRUE@am__append_5340 = $(nodist_befs_be_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5341 = \
+@COND_i386_multiboot_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ befs_be.marker
+@COND_i386_multiboot_TRUE@am__append_5342 = befs_be.mod
+@COND_i386_multiboot_TRUE@am__append_5343 = befs_be.marker
+@COND_i386_ieee1275_TRUE@am__append_5344 = befs_be.module
+@COND_i386_ieee1275_TRUE@am__append_5345 = befs_be.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5346 =
+@COND_i386_ieee1275_TRUE@am__append_5347 = $(nodist_befs_be_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5348 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ befs_be.marker
+@COND_i386_ieee1275_TRUE@am__append_5349 = befs_be.mod
+@COND_i386_ieee1275_TRUE@am__append_5350 = befs_be.marker
+@COND_x86_64_efi_TRUE@am__append_5351 = befs_be.module
+@COND_x86_64_efi_TRUE@am__append_5352 = befs_be.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5353 =
+@COND_x86_64_efi_TRUE@am__append_5354 = $(nodist_befs_be_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5355 = \
+@COND_x86_64_efi_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ befs_be.marker
+@COND_x86_64_efi_TRUE@am__append_5356 = befs_be.mod
+@COND_x86_64_efi_TRUE@am__append_5357 = befs_be.marker
+@COND_mips_yeeloong_TRUE@am__append_5358 = befs_be.module
+@COND_mips_yeeloong_TRUE@am__append_5359 = befs_be.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5360 =
+@COND_mips_yeeloong_TRUE@am__append_5361 = $(nodist_befs_be_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5362 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ befs_be.marker
+@COND_mips_yeeloong_TRUE@am__append_5363 = befs_be.mod
+@COND_mips_yeeloong_TRUE@am__append_5364 = befs_be.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5365 = befs_be.module
+@COND_sparc64_ieee1275_TRUE@am__append_5366 = befs_be.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5367 =
+@COND_sparc64_ieee1275_TRUE@am__append_5368 = $(nodist_befs_be_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5369 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ befs_be.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5370 = befs_be.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5371 = befs_be.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5372 = befs_be.module
+@COND_powerpc_ieee1275_TRUE@am__append_5373 = befs_be.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5374 =
+@COND_powerpc_ieee1275_TRUE@am__append_5375 = $(nodist_befs_be_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5376 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_befs_be_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ befs_be.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5377 = befs_be.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5378 = befs_be.marker
+@COND_emu_TRUE@am__append_5379 = btrfs.module
+@COND_emu_TRUE@am__append_5380 = btrfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5381 =
+@COND_emu_TRUE@am__append_5382 = $(nodist_btrfs_module_SOURCES)
+@COND_emu_TRUE@am__append_5383 = $(nodist_btrfs_module_SOURCES) \
+@COND_emu_TRUE@ btrfs.marker
+@COND_emu_TRUE@am__append_5384 = btrfs.mod
+@COND_emu_TRUE@am__append_5385 = btrfs.marker
+@COND_i386_pc_TRUE@am__append_5386 = btrfs.module
+@COND_i386_pc_TRUE@am__append_5387 = btrfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5388 =
+@COND_i386_pc_TRUE@am__append_5389 = $(nodist_btrfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5390 = $(nodist_btrfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ btrfs.marker
+@COND_i386_pc_TRUE@am__append_5391 = btrfs.mod
+@COND_i386_pc_TRUE@am__append_5392 = btrfs.marker
+@COND_i386_efi_TRUE@am__append_5393 = btrfs.module
+@COND_i386_efi_TRUE@am__append_5394 = btrfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5395 =
+@COND_i386_efi_TRUE@am__append_5396 = $(nodist_btrfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5397 = $(nodist_btrfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ btrfs.marker
+@COND_i386_efi_TRUE@am__append_5398 = btrfs.mod
+@COND_i386_efi_TRUE@am__append_5399 = btrfs.marker
+@COND_i386_qemu_TRUE@am__append_5400 = btrfs.module
+@COND_i386_qemu_TRUE@am__append_5401 = btrfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5402 =
+@COND_i386_qemu_TRUE@am__append_5403 = $(nodist_btrfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5404 = $(nodist_btrfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ btrfs.marker
+@COND_i386_qemu_TRUE@am__append_5405 = btrfs.mod
+@COND_i386_qemu_TRUE@am__append_5406 = btrfs.marker
+@COND_i386_coreboot_TRUE@am__append_5407 = btrfs.module
+@COND_i386_coreboot_TRUE@am__append_5408 = btrfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5409 =
+@COND_i386_coreboot_TRUE@am__append_5410 = $(nodist_btrfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5411 = \
+@COND_i386_coreboot_TRUE@ $(nodist_btrfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ btrfs.marker
+@COND_i386_coreboot_TRUE@am__append_5412 = btrfs.mod
+@COND_i386_coreboot_TRUE@am__append_5413 = btrfs.marker
+@COND_i386_multiboot_TRUE@am__append_5414 = btrfs.module
+@COND_i386_multiboot_TRUE@am__append_5415 = btrfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5416 =
+@COND_i386_multiboot_TRUE@am__append_5417 = $(nodist_btrfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5418 = \
+@COND_i386_multiboot_TRUE@ $(nodist_btrfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ btrfs.marker
+@COND_i386_multiboot_TRUE@am__append_5419 = btrfs.mod
+@COND_i386_multiboot_TRUE@am__append_5420 = btrfs.marker
+@COND_i386_ieee1275_TRUE@am__append_5421 = btrfs.module
+@COND_i386_ieee1275_TRUE@am__append_5422 = btrfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5423 =
+@COND_i386_ieee1275_TRUE@am__append_5424 = $(nodist_btrfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5425 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_btrfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ btrfs.marker
+@COND_i386_ieee1275_TRUE@am__append_5426 = btrfs.mod
+@COND_i386_ieee1275_TRUE@am__append_5427 = btrfs.marker
+@COND_x86_64_efi_TRUE@am__append_5428 = btrfs.module
+@COND_x86_64_efi_TRUE@am__append_5429 = btrfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5430 =
+@COND_x86_64_efi_TRUE@am__append_5431 = $(nodist_btrfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5432 = \
+@COND_x86_64_efi_TRUE@ $(nodist_btrfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ btrfs.marker
+@COND_x86_64_efi_TRUE@am__append_5433 = btrfs.mod
+@COND_x86_64_efi_TRUE@am__append_5434 = btrfs.marker
+@COND_mips_yeeloong_TRUE@am__append_5435 = btrfs.module
+@COND_mips_yeeloong_TRUE@am__append_5436 = btrfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5437 =
+@COND_mips_yeeloong_TRUE@am__append_5438 = $(nodist_btrfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5439 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_btrfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ btrfs.marker
+@COND_mips_yeeloong_TRUE@am__append_5440 = btrfs.mod
+@COND_mips_yeeloong_TRUE@am__append_5441 = btrfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5442 = btrfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_5443 = btrfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5444 =
+@COND_sparc64_ieee1275_TRUE@am__append_5445 = $(nodist_btrfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5446 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_btrfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ btrfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5447 = btrfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5448 = btrfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5449 = btrfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_5450 = btrfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5451 =
+@COND_powerpc_ieee1275_TRUE@am__append_5452 = $(nodist_btrfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5453 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_btrfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ btrfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5454 = btrfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5455 = btrfs.marker
+@COND_emu_TRUE@am__append_5456 = cpio.module
+@COND_emu_TRUE@am__append_5457 = cpio.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5458 =
+@COND_emu_TRUE@am__append_5459 = $(nodist_cpio_module_SOURCES)
+@COND_emu_TRUE@am__append_5460 = $(nodist_cpio_module_SOURCES) \
+@COND_emu_TRUE@ cpio.marker
+@COND_emu_TRUE@am__append_5461 = cpio.mod
+@COND_emu_TRUE@am__append_5462 = cpio.marker
+@COND_i386_pc_TRUE@am__append_5463 = cpio.module
+@COND_i386_pc_TRUE@am__append_5464 = cpio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5465 =
+@COND_i386_pc_TRUE@am__append_5466 = $(nodist_cpio_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5467 = $(nodist_cpio_module_SOURCES) \
+@COND_i386_pc_TRUE@ cpio.marker
+@COND_i386_pc_TRUE@am__append_5468 = cpio.mod
+@COND_i386_pc_TRUE@am__append_5469 = cpio.marker
+@COND_i386_efi_TRUE@am__append_5470 = cpio.module
+@COND_i386_efi_TRUE@am__append_5471 = cpio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5472 =
+@COND_i386_efi_TRUE@am__append_5473 = $(nodist_cpio_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5474 = $(nodist_cpio_module_SOURCES) \
+@COND_i386_efi_TRUE@ cpio.marker
+@COND_i386_efi_TRUE@am__append_5475 = cpio.mod
+@COND_i386_efi_TRUE@am__append_5476 = cpio.marker
+@COND_i386_qemu_TRUE@am__append_5477 = cpio.module
+@COND_i386_qemu_TRUE@am__append_5478 = cpio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5479 =
+@COND_i386_qemu_TRUE@am__append_5480 = $(nodist_cpio_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5481 = $(nodist_cpio_module_SOURCES) \
+@COND_i386_qemu_TRUE@ cpio.marker
+@COND_i386_qemu_TRUE@am__append_5482 = cpio.mod
+@COND_i386_qemu_TRUE@am__append_5483 = cpio.marker
+@COND_i386_coreboot_TRUE@am__append_5484 = cpio.module
+@COND_i386_coreboot_TRUE@am__append_5485 = cpio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5486 =
+@COND_i386_coreboot_TRUE@am__append_5487 = $(nodist_cpio_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5488 = \
+@COND_i386_coreboot_TRUE@ $(nodist_cpio_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ cpio.marker
+@COND_i386_coreboot_TRUE@am__append_5489 = cpio.mod
+@COND_i386_coreboot_TRUE@am__append_5490 = cpio.marker
+@COND_i386_multiboot_TRUE@am__append_5491 = cpio.module
+@COND_i386_multiboot_TRUE@am__append_5492 = cpio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5493 =
+@COND_i386_multiboot_TRUE@am__append_5494 = $(nodist_cpio_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5495 = \
+@COND_i386_multiboot_TRUE@ $(nodist_cpio_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ cpio.marker
+@COND_i386_multiboot_TRUE@am__append_5496 = cpio.mod
+@COND_i386_multiboot_TRUE@am__append_5497 = cpio.marker
+@COND_i386_ieee1275_TRUE@am__append_5498 = cpio.module
+@COND_i386_ieee1275_TRUE@am__append_5499 = cpio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5500 =
+@COND_i386_ieee1275_TRUE@am__append_5501 = $(nodist_cpio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5502 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_cpio_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ cpio.marker
+@COND_i386_ieee1275_TRUE@am__append_5503 = cpio.mod
+@COND_i386_ieee1275_TRUE@am__append_5504 = cpio.marker
+@COND_x86_64_efi_TRUE@am__append_5505 = cpio.module
+@COND_x86_64_efi_TRUE@am__append_5506 = cpio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5507 =
+@COND_x86_64_efi_TRUE@am__append_5508 = $(nodist_cpio_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5509 = $(nodist_cpio_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ cpio.marker
+@COND_x86_64_efi_TRUE@am__append_5510 = cpio.mod
+@COND_x86_64_efi_TRUE@am__append_5511 = cpio.marker
+@COND_mips_yeeloong_TRUE@am__append_5512 = cpio.module
+@COND_mips_yeeloong_TRUE@am__append_5513 = cpio.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5514 =
+@COND_mips_yeeloong_TRUE@am__append_5515 = $(nodist_cpio_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5516 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_cpio_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ cpio.marker
+@COND_mips_yeeloong_TRUE@am__append_5517 = cpio.mod
+@COND_mips_yeeloong_TRUE@am__append_5518 = cpio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5519 = cpio.module
+@COND_sparc64_ieee1275_TRUE@am__append_5520 = cpio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5521 =
+@COND_sparc64_ieee1275_TRUE@am__append_5522 = $(nodist_cpio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5523 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_cpio_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ cpio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5524 = cpio.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5525 = cpio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5526 = cpio.module
+@COND_powerpc_ieee1275_TRUE@am__append_5527 = cpio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5528 =
+@COND_powerpc_ieee1275_TRUE@am__append_5529 = $(nodist_cpio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5530 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_cpio_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ cpio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5531 = cpio.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5532 = cpio.marker
+@COND_emu_TRUE@am__append_5533 = ext2.module
+@COND_emu_TRUE@am__append_5534 = ext2.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5535 =
+@COND_emu_TRUE@am__append_5536 = $(nodist_ext2_module_SOURCES)
+@COND_emu_TRUE@am__append_5537 = $(nodist_ext2_module_SOURCES) \
+@COND_emu_TRUE@ ext2.marker
+@COND_emu_TRUE@am__append_5538 = ext2.mod
+@COND_emu_TRUE@am__append_5539 = ext2.marker
+@COND_i386_pc_TRUE@am__append_5540 = ext2.module
+@COND_i386_pc_TRUE@am__append_5541 = ext2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5542 =
+@COND_i386_pc_TRUE@am__append_5543 = $(nodist_ext2_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5544 = $(nodist_ext2_module_SOURCES) \
+@COND_i386_pc_TRUE@ ext2.marker
+@COND_i386_pc_TRUE@am__append_5545 = ext2.mod
+@COND_i386_pc_TRUE@am__append_5546 = ext2.marker
+@COND_i386_efi_TRUE@am__append_5547 = ext2.module
+@COND_i386_efi_TRUE@am__append_5548 = ext2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5549 =
+@COND_i386_efi_TRUE@am__append_5550 = $(nodist_ext2_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5551 = $(nodist_ext2_module_SOURCES) \
+@COND_i386_efi_TRUE@ ext2.marker
+@COND_i386_efi_TRUE@am__append_5552 = ext2.mod
+@COND_i386_efi_TRUE@am__append_5553 = ext2.marker
+@COND_i386_qemu_TRUE@am__append_5554 = ext2.module
+@COND_i386_qemu_TRUE@am__append_5555 = ext2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5556 =
+@COND_i386_qemu_TRUE@am__append_5557 = $(nodist_ext2_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5558 = $(nodist_ext2_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ext2.marker
+@COND_i386_qemu_TRUE@am__append_5559 = ext2.mod
+@COND_i386_qemu_TRUE@am__append_5560 = ext2.marker
+@COND_i386_coreboot_TRUE@am__append_5561 = ext2.module
+@COND_i386_coreboot_TRUE@am__append_5562 = ext2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5563 =
+@COND_i386_coreboot_TRUE@am__append_5564 = $(nodist_ext2_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5565 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ext2_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ext2.marker
+@COND_i386_coreboot_TRUE@am__append_5566 = ext2.mod
+@COND_i386_coreboot_TRUE@am__append_5567 = ext2.marker
+@COND_i386_multiboot_TRUE@am__append_5568 = ext2.module
+@COND_i386_multiboot_TRUE@am__append_5569 = ext2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5570 =
+@COND_i386_multiboot_TRUE@am__append_5571 = $(nodist_ext2_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5572 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ext2_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ext2.marker
+@COND_i386_multiboot_TRUE@am__append_5573 = ext2.mod
+@COND_i386_multiboot_TRUE@am__append_5574 = ext2.marker
+@COND_i386_ieee1275_TRUE@am__append_5575 = ext2.module
+@COND_i386_ieee1275_TRUE@am__append_5576 = ext2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5577 =
+@COND_i386_ieee1275_TRUE@am__append_5578 = $(nodist_ext2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5579 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ext2_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ext2.marker
+@COND_i386_ieee1275_TRUE@am__append_5580 = ext2.mod
+@COND_i386_ieee1275_TRUE@am__append_5581 = ext2.marker
+@COND_x86_64_efi_TRUE@am__append_5582 = ext2.module
+@COND_x86_64_efi_TRUE@am__append_5583 = ext2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5584 =
+@COND_x86_64_efi_TRUE@am__append_5585 = $(nodist_ext2_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5586 = $(nodist_ext2_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ext2.marker
+@COND_x86_64_efi_TRUE@am__append_5587 = ext2.mod
+@COND_x86_64_efi_TRUE@am__append_5588 = ext2.marker
+@COND_mips_yeeloong_TRUE@am__append_5589 = ext2.module
+@COND_mips_yeeloong_TRUE@am__append_5590 = ext2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5591 =
+@COND_mips_yeeloong_TRUE@am__append_5592 = $(nodist_ext2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5593 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ext2_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ext2.marker
+@COND_mips_yeeloong_TRUE@am__append_5594 = ext2.mod
+@COND_mips_yeeloong_TRUE@am__append_5595 = ext2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5596 = ext2.module
+@COND_sparc64_ieee1275_TRUE@am__append_5597 = ext2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5598 =
+@COND_sparc64_ieee1275_TRUE@am__append_5599 = $(nodist_ext2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5600 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_ext2_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ ext2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5601 = ext2.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5602 = ext2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5603 = ext2.module
+@COND_powerpc_ieee1275_TRUE@am__append_5604 = ext2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5605 =
+@COND_powerpc_ieee1275_TRUE@am__append_5606 = $(nodist_ext2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5607 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ext2_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ ext2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5608 = ext2.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5609 = ext2.marker
+@COND_emu_TRUE@am__append_5610 = fat.module
+@COND_emu_TRUE@am__append_5611 = fat.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5612 =
+@COND_emu_TRUE@am__append_5613 = $(nodist_fat_module_SOURCES)
+@COND_emu_TRUE@am__append_5614 = $(nodist_fat_module_SOURCES) \
+@COND_emu_TRUE@ fat.marker
+@COND_emu_TRUE@am__append_5615 = fat.mod
+@COND_emu_TRUE@am__append_5616 = fat.marker
+@COND_i386_pc_TRUE@am__append_5617 = fat.module
+@COND_i386_pc_TRUE@am__append_5618 = fat.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5619 =
+@COND_i386_pc_TRUE@am__append_5620 = $(nodist_fat_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5621 = $(nodist_fat_module_SOURCES) \
+@COND_i386_pc_TRUE@ fat.marker
+@COND_i386_pc_TRUE@am__append_5622 = fat.mod
+@COND_i386_pc_TRUE@am__append_5623 = fat.marker
+@COND_i386_efi_TRUE@am__append_5624 = fat.module
+@COND_i386_efi_TRUE@am__append_5625 = fat.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5626 =
+@COND_i386_efi_TRUE@am__append_5627 = $(nodist_fat_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5628 = $(nodist_fat_module_SOURCES) \
+@COND_i386_efi_TRUE@ fat.marker
+@COND_i386_efi_TRUE@am__append_5629 = fat.mod
+@COND_i386_efi_TRUE@am__append_5630 = fat.marker
+@COND_i386_qemu_TRUE@am__append_5631 = fat.module
+@COND_i386_qemu_TRUE@am__append_5632 = fat.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5633 =
+@COND_i386_qemu_TRUE@am__append_5634 = $(nodist_fat_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5635 = $(nodist_fat_module_SOURCES) \
+@COND_i386_qemu_TRUE@ fat.marker
+@COND_i386_qemu_TRUE@am__append_5636 = fat.mod
+@COND_i386_qemu_TRUE@am__append_5637 = fat.marker
+@COND_i386_coreboot_TRUE@am__append_5638 = fat.module
+@COND_i386_coreboot_TRUE@am__append_5639 = fat.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5640 =
+@COND_i386_coreboot_TRUE@am__append_5641 = $(nodist_fat_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5642 = \
+@COND_i386_coreboot_TRUE@ $(nodist_fat_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ fat.marker
+@COND_i386_coreboot_TRUE@am__append_5643 = fat.mod
+@COND_i386_coreboot_TRUE@am__append_5644 = fat.marker
+@COND_i386_multiboot_TRUE@am__append_5645 = fat.module
+@COND_i386_multiboot_TRUE@am__append_5646 = fat.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5647 =
+@COND_i386_multiboot_TRUE@am__append_5648 = $(nodist_fat_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5649 = \
+@COND_i386_multiboot_TRUE@ $(nodist_fat_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ fat.marker
+@COND_i386_multiboot_TRUE@am__append_5650 = fat.mod
+@COND_i386_multiboot_TRUE@am__append_5651 = fat.marker
+@COND_i386_ieee1275_TRUE@am__append_5652 = fat.module
+@COND_i386_ieee1275_TRUE@am__append_5653 = fat.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5654 =
+@COND_i386_ieee1275_TRUE@am__append_5655 = $(nodist_fat_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5656 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_fat_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ fat.marker
+@COND_i386_ieee1275_TRUE@am__append_5657 = fat.mod
+@COND_i386_ieee1275_TRUE@am__append_5658 = fat.marker
+@COND_x86_64_efi_TRUE@am__append_5659 = fat.module
+@COND_x86_64_efi_TRUE@am__append_5660 = fat.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5661 =
+@COND_x86_64_efi_TRUE@am__append_5662 = $(nodist_fat_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5663 = $(nodist_fat_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ fat.marker
+@COND_x86_64_efi_TRUE@am__append_5664 = fat.mod
+@COND_x86_64_efi_TRUE@am__append_5665 = fat.marker
+@COND_mips_yeeloong_TRUE@am__append_5666 = fat.module
+@COND_mips_yeeloong_TRUE@am__append_5667 = fat.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5668 =
+@COND_mips_yeeloong_TRUE@am__append_5669 = $(nodist_fat_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5670 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_fat_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ fat.marker
+@COND_mips_yeeloong_TRUE@am__append_5671 = fat.mod
+@COND_mips_yeeloong_TRUE@am__append_5672 = fat.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5673 = fat.module
+@COND_sparc64_ieee1275_TRUE@am__append_5674 = fat.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5675 =
+@COND_sparc64_ieee1275_TRUE@am__append_5676 = $(nodist_fat_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5677 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_fat_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ fat.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5678 = fat.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5679 = fat.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5680 = fat.module
+@COND_powerpc_ieee1275_TRUE@am__append_5681 = fat.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5682 =
+@COND_powerpc_ieee1275_TRUE@am__append_5683 = $(nodist_fat_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5684 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_fat_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ fat.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5685 = fat.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5686 = fat.marker
+@COND_emu_TRUE@am__append_5687 = fshelp.module
+@COND_emu_TRUE@am__append_5688 = fshelp.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5689 =
+@COND_emu_TRUE@am__append_5690 = $(nodist_fshelp_module_SOURCES)
+@COND_emu_TRUE@am__append_5691 = $(nodist_fshelp_module_SOURCES) \
+@COND_emu_TRUE@ fshelp.marker
+@COND_emu_TRUE@am__append_5692 = fshelp.mod
+@COND_emu_TRUE@am__append_5693 = fshelp.marker
+@COND_i386_pc_TRUE@am__append_5694 = fshelp.module
+@COND_i386_pc_TRUE@am__append_5695 = fshelp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5696 =
+@COND_i386_pc_TRUE@am__append_5697 = $(nodist_fshelp_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5698 = $(nodist_fshelp_module_SOURCES) \
+@COND_i386_pc_TRUE@ fshelp.marker
+@COND_i386_pc_TRUE@am__append_5699 = fshelp.mod
+@COND_i386_pc_TRUE@am__append_5700 = fshelp.marker
+@COND_i386_efi_TRUE@am__append_5701 = fshelp.module
+@COND_i386_efi_TRUE@am__append_5702 = fshelp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5703 =
+@COND_i386_efi_TRUE@am__append_5704 = $(nodist_fshelp_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5705 = $(nodist_fshelp_module_SOURCES) \
+@COND_i386_efi_TRUE@ fshelp.marker
+@COND_i386_efi_TRUE@am__append_5706 = fshelp.mod
+@COND_i386_efi_TRUE@am__append_5707 = fshelp.marker
+@COND_i386_qemu_TRUE@am__append_5708 = fshelp.module
+@COND_i386_qemu_TRUE@am__append_5709 = fshelp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5710 =
+@COND_i386_qemu_TRUE@am__append_5711 = $(nodist_fshelp_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5712 = \
+@COND_i386_qemu_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_i386_qemu_TRUE@ fshelp.marker
+@COND_i386_qemu_TRUE@am__append_5713 = fshelp.mod
+@COND_i386_qemu_TRUE@am__append_5714 = fshelp.marker
+@COND_i386_coreboot_TRUE@am__append_5715 = fshelp.module
+@COND_i386_coreboot_TRUE@am__append_5716 = fshelp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5717 =
+@COND_i386_coreboot_TRUE@am__append_5718 = $(nodist_fshelp_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5719 = \
+@COND_i386_coreboot_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ fshelp.marker
+@COND_i386_coreboot_TRUE@am__append_5720 = fshelp.mod
+@COND_i386_coreboot_TRUE@am__append_5721 = fshelp.marker
+@COND_i386_multiboot_TRUE@am__append_5722 = fshelp.module
+@COND_i386_multiboot_TRUE@am__append_5723 = fshelp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5724 =
+@COND_i386_multiboot_TRUE@am__append_5725 = $(nodist_fshelp_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5726 = \
+@COND_i386_multiboot_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ fshelp.marker
+@COND_i386_multiboot_TRUE@am__append_5727 = fshelp.mod
+@COND_i386_multiboot_TRUE@am__append_5728 = fshelp.marker
+@COND_i386_ieee1275_TRUE@am__append_5729 = fshelp.module
+@COND_i386_ieee1275_TRUE@am__append_5730 = fshelp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5731 =
+@COND_i386_ieee1275_TRUE@am__append_5732 = $(nodist_fshelp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5733 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ fshelp.marker
+@COND_i386_ieee1275_TRUE@am__append_5734 = fshelp.mod
+@COND_i386_ieee1275_TRUE@am__append_5735 = fshelp.marker
+@COND_x86_64_efi_TRUE@am__append_5736 = fshelp.module
+@COND_x86_64_efi_TRUE@am__append_5737 = fshelp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5738 =
+@COND_x86_64_efi_TRUE@am__append_5739 = $(nodist_fshelp_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5740 = \
+@COND_x86_64_efi_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ fshelp.marker
+@COND_x86_64_efi_TRUE@am__append_5741 = fshelp.mod
+@COND_x86_64_efi_TRUE@am__append_5742 = fshelp.marker
+@COND_mips_yeeloong_TRUE@am__append_5743 = fshelp.module
+@COND_mips_yeeloong_TRUE@am__append_5744 = fshelp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5745 =
+@COND_mips_yeeloong_TRUE@am__append_5746 = $(nodist_fshelp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5747 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ fshelp.marker
+@COND_mips_yeeloong_TRUE@am__append_5748 = fshelp.mod
+@COND_mips_yeeloong_TRUE@am__append_5749 = fshelp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5750 = fshelp.module
+@COND_sparc64_ieee1275_TRUE@am__append_5751 = fshelp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5752 =
+@COND_sparc64_ieee1275_TRUE@am__append_5753 = $(nodist_fshelp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5754 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ fshelp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5755 = fshelp.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5756 = fshelp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5757 = fshelp.module
+@COND_powerpc_ieee1275_TRUE@am__append_5758 = fshelp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5759 =
+@COND_powerpc_ieee1275_TRUE@am__append_5760 = $(nodist_fshelp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5761 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_fshelp_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ fshelp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5762 = fshelp.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5763 = fshelp.marker
+@COND_emu_TRUE@am__append_5764 = hfs.module
+@COND_emu_TRUE@am__append_5765 = hfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5766 =
+@COND_emu_TRUE@am__append_5767 = $(nodist_hfs_module_SOURCES)
+@COND_emu_TRUE@am__append_5768 = $(nodist_hfs_module_SOURCES) \
+@COND_emu_TRUE@ hfs.marker
+@COND_emu_TRUE@am__append_5769 = hfs.mod
+@COND_emu_TRUE@am__append_5770 = hfs.marker
+@COND_i386_pc_TRUE@am__append_5771 = hfs.module
+@COND_i386_pc_TRUE@am__append_5772 = hfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5773 =
+@COND_i386_pc_TRUE@am__append_5774 = $(nodist_hfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5775 = $(nodist_hfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ hfs.marker
+@COND_i386_pc_TRUE@am__append_5776 = hfs.mod
+@COND_i386_pc_TRUE@am__append_5777 = hfs.marker
+@COND_i386_efi_TRUE@am__append_5778 = hfs.module
+@COND_i386_efi_TRUE@am__append_5779 = hfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5780 =
+@COND_i386_efi_TRUE@am__append_5781 = $(nodist_hfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5782 = $(nodist_hfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ hfs.marker
+@COND_i386_efi_TRUE@am__append_5783 = hfs.mod
+@COND_i386_efi_TRUE@am__append_5784 = hfs.marker
+@COND_i386_qemu_TRUE@am__append_5785 = hfs.module
+@COND_i386_qemu_TRUE@am__append_5786 = hfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5787 =
+@COND_i386_qemu_TRUE@am__append_5788 = $(nodist_hfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5789 = $(nodist_hfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ hfs.marker
+@COND_i386_qemu_TRUE@am__append_5790 = hfs.mod
+@COND_i386_qemu_TRUE@am__append_5791 = hfs.marker
+@COND_i386_coreboot_TRUE@am__append_5792 = hfs.module
+@COND_i386_coreboot_TRUE@am__append_5793 = hfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5794 =
+@COND_i386_coreboot_TRUE@am__append_5795 = $(nodist_hfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5796 = \
+@COND_i386_coreboot_TRUE@ $(nodist_hfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ hfs.marker
+@COND_i386_coreboot_TRUE@am__append_5797 = hfs.mod
+@COND_i386_coreboot_TRUE@am__append_5798 = hfs.marker
+@COND_i386_multiboot_TRUE@am__append_5799 = hfs.module
+@COND_i386_multiboot_TRUE@am__append_5800 = hfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5801 =
+@COND_i386_multiboot_TRUE@am__append_5802 = $(nodist_hfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5803 = \
+@COND_i386_multiboot_TRUE@ $(nodist_hfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ hfs.marker
+@COND_i386_multiboot_TRUE@am__append_5804 = hfs.mod
+@COND_i386_multiboot_TRUE@am__append_5805 = hfs.marker
+@COND_i386_ieee1275_TRUE@am__append_5806 = hfs.module
+@COND_i386_ieee1275_TRUE@am__append_5807 = hfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5808 =
+@COND_i386_ieee1275_TRUE@am__append_5809 = $(nodist_hfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5810 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_hfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ hfs.marker
+@COND_i386_ieee1275_TRUE@am__append_5811 = hfs.mod
+@COND_i386_ieee1275_TRUE@am__append_5812 = hfs.marker
+@COND_x86_64_efi_TRUE@am__append_5813 = hfs.module
+@COND_x86_64_efi_TRUE@am__append_5814 = hfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5815 =
+@COND_x86_64_efi_TRUE@am__append_5816 = $(nodist_hfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5817 = $(nodist_hfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ hfs.marker
+@COND_x86_64_efi_TRUE@am__append_5818 = hfs.mod
+@COND_x86_64_efi_TRUE@am__append_5819 = hfs.marker
+@COND_mips_yeeloong_TRUE@am__append_5820 = hfs.module
+@COND_mips_yeeloong_TRUE@am__append_5821 = hfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5822 =
+@COND_mips_yeeloong_TRUE@am__append_5823 = $(nodist_hfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5824 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_hfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ hfs.marker
+@COND_mips_yeeloong_TRUE@am__append_5825 = hfs.mod
+@COND_mips_yeeloong_TRUE@am__append_5826 = hfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5827 = hfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_5828 = hfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5829 =
+@COND_sparc64_ieee1275_TRUE@am__append_5830 = $(nodist_hfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5831 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_hfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ hfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5832 = hfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5833 = hfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5834 = hfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_5835 = hfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5836 =
+@COND_powerpc_ieee1275_TRUE@am__append_5837 = $(nodist_hfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5838 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_hfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ hfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5839 = hfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5840 = hfs.marker
+@COND_emu_TRUE@am__append_5841 = hfsplus.module
+@COND_emu_TRUE@am__append_5842 = hfsplus.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5843 =
+@COND_emu_TRUE@am__append_5844 = $(nodist_hfsplus_module_SOURCES)
+@COND_emu_TRUE@am__append_5845 = $(nodist_hfsplus_module_SOURCES) \
+@COND_emu_TRUE@ hfsplus.marker
+@COND_emu_TRUE@am__append_5846 = hfsplus.mod
+@COND_emu_TRUE@am__append_5847 = hfsplus.marker
+@COND_i386_pc_TRUE@am__append_5848 = hfsplus.module
+@COND_i386_pc_TRUE@am__append_5849 = hfsplus.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5850 =
+@COND_i386_pc_TRUE@am__append_5851 = $(nodist_hfsplus_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5852 = $(nodist_hfsplus_module_SOURCES) \
+@COND_i386_pc_TRUE@ hfsplus.marker
+@COND_i386_pc_TRUE@am__append_5853 = hfsplus.mod
+@COND_i386_pc_TRUE@am__append_5854 = hfsplus.marker
+@COND_i386_efi_TRUE@am__append_5855 = hfsplus.module
+@COND_i386_efi_TRUE@am__append_5856 = hfsplus.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5857 =
+@COND_i386_efi_TRUE@am__append_5858 = $(nodist_hfsplus_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5859 = \
+@COND_i386_efi_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_i386_efi_TRUE@ hfsplus.marker
+@COND_i386_efi_TRUE@am__append_5860 = hfsplus.mod
+@COND_i386_efi_TRUE@am__append_5861 = hfsplus.marker
+@COND_i386_qemu_TRUE@am__append_5862 = hfsplus.module
+@COND_i386_qemu_TRUE@am__append_5863 = hfsplus.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5864 =
+@COND_i386_qemu_TRUE@am__append_5865 = $(nodist_hfsplus_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5866 = \
+@COND_i386_qemu_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_i386_qemu_TRUE@ hfsplus.marker
+@COND_i386_qemu_TRUE@am__append_5867 = hfsplus.mod
+@COND_i386_qemu_TRUE@am__append_5868 = hfsplus.marker
+@COND_i386_coreboot_TRUE@am__append_5869 = hfsplus.module
+@COND_i386_coreboot_TRUE@am__append_5870 = hfsplus.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5871 =
+@COND_i386_coreboot_TRUE@am__append_5872 = $(nodist_hfsplus_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5873 = \
+@COND_i386_coreboot_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ hfsplus.marker
+@COND_i386_coreboot_TRUE@am__append_5874 = hfsplus.mod
+@COND_i386_coreboot_TRUE@am__append_5875 = hfsplus.marker
+@COND_i386_multiboot_TRUE@am__append_5876 = hfsplus.module
+@COND_i386_multiboot_TRUE@am__append_5877 = hfsplus.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5878 =
+@COND_i386_multiboot_TRUE@am__append_5879 = $(nodist_hfsplus_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5880 = \
+@COND_i386_multiboot_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ hfsplus.marker
+@COND_i386_multiboot_TRUE@am__append_5881 = hfsplus.mod
+@COND_i386_multiboot_TRUE@am__append_5882 = hfsplus.marker
+@COND_i386_ieee1275_TRUE@am__append_5883 = hfsplus.module
+@COND_i386_ieee1275_TRUE@am__append_5884 = hfsplus.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5885 =
+@COND_i386_ieee1275_TRUE@am__append_5886 = $(nodist_hfsplus_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5887 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ hfsplus.marker
+@COND_i386_ieee1275_TRUE@am__append_5888 = hfsplus.mod
+@COND_i386_ieee1275_TRUE@am__append_5889 = hfsplus.marker
+@COND_x86_64_efi_TRUE@am__append_5890 = hfsplus.module
+@COND_x86_64_efi_TRUE@am__append_5891 = hfsplus.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5892 =
+@COND_x86_64_efi_TRUE@am__append_5893 = $(nodist_hfsplus_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5894 = \
+@COND_x86_64_efi_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ hfsplus.marker
+@COND_x86_64_efi_TRUE@am__append_5895 = hfsplus.mod
+@COND_x86_64_efi_TRUE@am__append_5896 = hfsplus.marker
+@COND_mips_yeeloong_TRUE@am__append_5897 = hfsplus.module
+@COND_mips_yeeloong_TRUE@am__append_5898 = hfsplus.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5899 =
+@COND_mips_yeeloong_TRUE@am__append_5900 = $(nodist_hfsplus_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5901 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ hfsplus.marker
+@COND_mips_yeeloong_TRUE@am__append_5902 = hfsplus.mod
+@COND_mips_yeeloong_TRUE@am__append_5903 = hfsplus.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5904 = hfsplus.module
+@COND_sparc64_ieee1275_TRUE@am__append_5905 = hfsplus.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5906 =
+@COND_sparc64_ieee1275_TRUE@am__append_5907 = $(nodist_hfsplus_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5908 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ hfsplus.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5909 = hfsplus.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5910 = hfsplus.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5911 = hfsplus.module
+@COND_powerpc_ieee1275_TRUE@am__append_5912 = hfsplus.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5913 =
+@COND_powerpc_ieee1275_TRUE@am__append_5914 = $(nodist_hfsplus_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5915 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_hfsplus_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ hfsplus.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5916 = hfsplus.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5917 = hfsplus.marker
+@COND_emu_TRUE@am__append_5918 = iso9660.module
+@COND_emu_TRUE@am__append_5919 = iso9660.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5920 =
+@COND_emu_TRUE@am__append_5921 = $(nodist_iso9660_module_SOURCES)
+@COND_emu_TRUE@am__append_5922 = $(nodist_iso9660_module_SOURCES) \
+@COND_emu_TRUE@ iso9660.marker
+@COND_emu_TRUE@am__append_5923 = iso9660.mod
+@COND_emu_TRUE@am__append_5924 = iso9660.marker
+@COND_i386_pc_TRUE@am__append_5925 = iso9660.module
+@COND_i386_pc_TRUE@am__append_5926 = iso9660.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_5927 =
+@COND_i386_pc_TRUE@am__append_5928 = $(nodist_iso9660_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_5929 = $(nodist_iso9660_module_SOURCES) \
+@COND_i386_pc_TRUE@ iso9660.marker
+@COND_i386_pc_TRUE@am__append_5930 = iso9660.mod
+@COND_i386_pc_TRUE@am__append_5931 = iso9660.marker
+@COND_i386_efi_TRUE@am__append_5932 = iso9660.module
+@COND_i386_efi_TRUE@am__append_5933 = iso9660.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_5934 =
+@COND_i386_efi_TRUE@am__append_5935 = $(nodist_iso9660_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_5936 = \
+@COND_i386_efi_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_i386_efi_TRUE@ iso9660.marker
+@COND_i386_efi_TRUE@am__append_5937 = iso9660.mod
+@COND_i386_efi_TRUE@am__append_5938 = iso9660.marker
+@COND_i386_qemu_TRUE@am__append_5939 = iso9660.module
+@COND_i386_qemu_TRUE@am__append_5940 = iso9660.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_5941 =
+@COND_i386_qemu_TRUE@am__append_5942 = $(nodist_iso9660_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_5943 = \
+@COND_i386_qemu_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_i386_qemu_TRUE@ iso9660.marker
+@COND_i386_qemu_TRUE@am__append_5944 = iso9660.mod
+@COND_i386_qemu_TRUE@am__append_5945 = iso9660.marker
+@COND_i386_coreboot_TRUE@am__append_5946 = iso9660.module
+@COND_i386_coreboot_TRUE@am__append_5947 = iso9660.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_5948 =
+@COND_i386_coreboot_TRUE@am__append_5949 = $(nodist_iso9660_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_5950 = \
+@COND_i386_coreboot_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ iso9660.marker
+@COND_i386_coreboot_TRUE@am__append_5951 = iso9660.mod
+@COND_i386_coreboot_TRUE@am__append_5952 = iso9660.marker
+@COND_i386_multiboot_TRUE@am__append_5953 = iso9660.module
+@COND_i386_multiboot_TRUE@am__append_5954 = iso9660.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_5955 =
+@COND_i386_multiboot_TRUE@am__append_5956 = $(nodist_iso9660_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_5957 = \
+@COND_i386_multiboot_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ iso9660.marker
+@COND_i386_multiboot_TRUE@am__append_5958 = iso9660.mod
+@COND_i386_multiboot_TRUE@am__append_5959 = iso9660.marker
+@COND_i386_ieee1275_TRUE@am__append_5960 = iso9660.module
+@COND_i386_ieee1275_TRUE@am__append_5961 = iso9660.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_5962 =
+@COND_i386_ieee1275_TRUE@am__append_5963 = $(nodist_iso9660_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_5964 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ iso9660.marker
+@COND_i386_ieee1275_TRUE@am__append_5965 = iso9660.mod
+@COND_i386_ieee1275_TRUE@am__append_5966 = iso9660.marker
+@COND_x86_64_efi_TRUE@am__append_5967 = iso9660.module
+@COND_x86_64_efi_TRUE@am__append_5968 = iso9660.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_5969 =
+@COND_x86_64_efi_TRUE@am__append_5970 = $(nodist_iso9660_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_5971 = \
+@COND_x86_64_efi_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ iso9660.marker
+@COND_x86_64_efi_TRUE@am__append_5972 = iso9660.mod
+@COND_x86_64_efi_TRUE@am__append_5973 = iso9660.marker
+@COND_mips_yeeloong_TRUE@am__append_5974 = iso9660.module
+@COND_mips_yeeloong_TRUE@am__append_5975 = iso9660.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_5976 =
+@COND_mips_yeeloong_TRUE@am__append_5977 = $(nodist_iso9660_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_5978 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ iso9660.marker
+@COND_mips_yeeloong_TRUE@am__append_5979 = iso9660.mod
+@COND_mips_yeeloong_TRUE@am__append_5980 = iso9660.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5981 = iso9660.module
+@COND_sparc64_ieee1275_TRUE@am__append_5982 = iso9660.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_5983 =
+@COND_sparc64_ieee1275_TRUE@am__append_5984 = $(nodist_iso9660_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_5985 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ iso9660.marker
+@COND_sparc64_ieee1275_TRUE@am__append_5986 = iso9660.mod
+@COND_sparc64_ieee1275_TRUE@am__append_5987 = iso9660.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5988 = iso9660.module
+@COND_powerpc_ieee1275_TRUE@am__append_5989 = iso9660.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_5990 =
+@COND_powerpc_ieee1275_TRUE@am__append_5991 = $(nodist_iso9660_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_5992 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_iso9660_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ iso9660.marker
+@COND_powerpc_ieee1275_TRUE@am__append_5993 = iso9660.mod
+@COND_powerpc_ieee1275_TRUE@am__append_5994 = iso9660.marker
+@COND_emu_TRUE@am__append_5995 = jfs.module
+@COND_emu_TRUE@am__append_5996 = jfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_5997 =
+@COND_emu_TRUE@am__append_5998 = $(nodist_jfs_module_SOURCES)
+@COND_emu_TRUE@am__append_5999 = $(nodist_jfs_module_SOURCES) \
+@COND_emu_TRUE@ jfs.marker
+@COND_emu_TRUE@am__append_6000 = jfs.mod
+@COND_emu_TRUE@am__append_6001 = jfs.marker
+@COND_i386_pc_TRUE@am__append_6002 = jfs.module
+@COND_i386_pc_TRUE@am__append_6003 = jfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6004 =
+@COND_i386_pc_TRUE@am__append_6005 = $(nodist_jfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6006 = $(nodist_jfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ jfs.marker
+@COND_i386_pc_TRUE@am__append_6007 = jfs.mod
+@COND_i386_pc_TRUE@am__append_6008 = jfs.marker
+@COND_i386_efi_TRUE@am__append_6009 = jfs.module
+@COND_i386_efi_TRUE@am__append_6010 = jfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6011 =
+@COND_i386_efi_TRUE@am__append_6012 = $(nodist_jfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6013 = $(nodist_jfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ jfs.marker
+@COND_i386_efi_TRUE@am__append_6014 = jfs.mod
+@COND_i386_efi_TRUE@am__append_6015 = jfs.marker
+@COND_i386_qemu_TRUE@am__append_6016 = jfs.module
+@COND_i386_qemu_TRUE@am__append_6017 = jfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6018 =
+@COND_i386_qemu_TRUE@am__append_6019 = $(nodist_jfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6020 = $(nodist_jfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ jfs.marker
+@COND_i386_qemu_TRUE@am__append_6021 = jfs.mod
+@COND_i386_qemu_TRUE@am__append_6022 = jfs.marker
+@COND_i386_coreboot_TRUE@am__append_6023 = jfs.module
+@COND_i386_coreboot_TRUE@am__append_6024 = jfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6025 =
+@COND_i386_coreboot_TRUE@am__append_6026 = $(nodist_jfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6027 = \
+@COND_i386_coreboot_TRUE@ $(nodist_jfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ jfs.marker
+@COND_i386_coreboot_TRUE@am__append_6028 = jfs.mod
+@COND_i386_coreboot_TRUE@am__append_6029 = jfs.marker
+@COND_i386_multiboot_TRUE@am__append_6030 = jfs.module
+@COND_i386_multiboot_TRUE@am__append_6031 = jfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6032 =
+@COND_i386_multiboot_TRUE@am__append_6033 = $(nodist_jfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6034 = \
+@COND_i386_multiboot_TRUE@ $(nodist_jfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ jfs.marker
+@COND_i386_multiboot_TRUE@am__append_6035 = jfs.mod
+@COND_i386_multiboot_TRUE@am__append_6036 = jfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6037 = jfs.module
+@COND_i386_ieee1275_TRUE@am__append_6038 = jfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6039 =
+@COND_i386_ieee1275_TRUE@am__append_6040 = $(nodist_jfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6041 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_jfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ jfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6042 = jfs.mod
+@COND_i386_ieee1275_TRUE@am__append_6043 = jfs.marker
+@COND_x86_64_efi_TRUE@am__append_6044 = jfs.module
+@COND_x86_64_efi_TRUE@am__append_6045 = jfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6046 =
+@COND_x86_64_efi_TRUE@am__append_6047 = $(nodist_jfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6048 = $(nodist_jfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ jfs.marker
+@COND_x86_64_efi_TRUE@am__append_6049 = jfs.mod
+@COND_x86_64_efi_TRUE@am__append_6050 = jfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6051 = jfs.module
+@COND_mips_yeeloong_TRUE@am__append_6052 = jfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6053 =
+@COND_mips_yeeloong_TRUE@am__append_6054 = $(nodist_jfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6055 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_jfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ jfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6056 = jfs.mod
+@COND_mips_yeeloong_TRUE@am__append_6057 = jfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6058 = jfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_6059 = jfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6060 =
+@COND_sparc64_ieee1275_TRUE@am__append_6061 = $(nodist_jfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6062 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_jfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ jfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6063 = jfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6064 = jfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6065 = jfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_6066 = jfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6067 =
+@COND_powerpc_ieee1275_TRUE@am__append_6068 = $(nodist_jfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6069 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_jfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ jfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6070 = jfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6071 = jfs.marker
+@COND_emu_TRUE@am__append_6072 = minix.module
+@COND_emu_TRUE@am__append_6073 = minix.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6074 =
+@COND_emu_TRUE@am__append_6075 = $(nodist_minix_module_SOURCES)
+@COND_emu_TRUE@am__append_6076 = $(nodist_minix_module_SOURCES) \
+@COND_emu_TRUE@ minix.marker
+@COND_emu_TRUE@am__append_6077 = minix.mod
+@COND_emu_TRUE@am__append_6078 = minix.marker
+@COND_i386_pc_TRUE@am__append_6079 = minix.module
+@COND_i386_pc_TRUE@am__append_6080 = minix.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6081 =
+@COND_i386_pc_TRUE@am__append_6082 = $(nodist_minix_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6083 = $(nodist_minix_module_SOURCES) \
+@COND_i386_pc_TRUE@ minix.marker
+@COND_i386_pc_TRUE@am__append_6084 = minix.mod
+@COND_i386_pc_TRUE@am__append_6085 = minix.marker
+@COND_i386_efi_TRUE@am__append_6086 = minix.module
+@COND_i386_efi_TRUE@am__append_6087 = minix.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6088 =
+@COND_i386_efi_TRUE@am__append_6089 = $(nodist_minix_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6090 = $(nodist_minix_module_SOURCES) \
+@COND_i386_efi_TRUE@ minix.marker
+@COND_i386_efi_TRUE@am__append_6091 = minix.mod
+@COND_i386_efi_TRUE@am__append_6092 = minix.marker
+@COND_i386_qemu_TRUE@am__append_6093 = minix.module
+@COND_i386_qemu_TRUE@am__append_6094 = minix.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6095 =
+@COND_i386_qemu_TRUE@am__append_6096 = $(nodist_minix_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6097 = $(nodist_minix_module_SOURCES) \
+@COND_i386_qemu_TRUE@ minix.marker
+@COND_i386_qemu_TRUE@am__append_6098 = minix.mod
+@COND_i386_qemu_TRUE@am__append_6099 = minix.marker
+@COND_i386_coreboot_TRUE@am__append_6100 = minix.module
+@COND_i386_coreboot_TRUE@am__append_6101 = minix.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6102 =
+@COND_i386_coreboot_TRUE@am__append_6103 = $(nodist_minix_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6104 = \
+@COND_i386_coreboot_TRUE@ $(nodist_minix_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ minix.marker
+@COND_i386_coreboot_TRUE@am__append_6105 = minix.mod
+@COND_i386_coreboot_TRUE@am__append_6106 = minix.marker
+@COND_i386_multiboot_TRUE@am__append_6107 = minix.module
+@COND_i386_multiboot_TRUE@am__append_6108 = minix.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6109 =
+@COND_i386_multiboot_TRUE@am__append_6110 = $(nodist_minix_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6111 = \
+@COND_i386_multiboot_TRUE@ $(nodist_minix_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ minix.marker
+@COND_i386_multiboot_TRUE@am__append_6112 = minix.mod
+@COND_i386_multiboot_TRUE@am__append_6113 = minix.marker
+@COND_i386_ieee1275_TRUE@am__append_6114 = minix.module
+@COND_i386_ieee1275_TRUE@am__append_6115 = minix.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6116 =
+@COND_i386_ieee1275_TRUE@am__append_6117 = $(nodist_minix_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6118 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_minix_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ minix.marker
+@COND_i386_ieee1275_TRUE@am__append_6119 = minix.mod
+@COND_i386_ieee1275_TRUE@am__append_6120 = minix.marker
+@COND_x86_64_efi_TRUE@am__append_6121 = minix.module
+@COND_x86_64_efi_TRUE@am__append_6122 = minix.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6123 =
+@COND_x86_64_efi_TRUE@am__append_6124 = $(nodist_minix_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6125 = \
+@COND_x86_64_efi_TRUE@ $(nodist_minix_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ minix.marker
+@COND_x86_64_efi_TRUE@am__append_6126 = minix.mod
+@COND_x86_64_efi_TRUE@am__append_6127 = minix.marker
+@COND_mips_yeeloong_TRUE@am__append_6128 = minix.module
+@COND_mips_yeeloong_TRUE@am__append_6129 = minix.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6130 =
+@COND_mips_yeeloong_TRUE@am__append_6131 = $(nodist_minix_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6132 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_minix_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ minix.marker
+@COND_mips_yeeloong_TRUE@am__append_6133 = minix.mod
+@COND_mips_yeeloong_TRUE@am__append_6134 = minix.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6135 = minix.module
+@COND_sparc64_ieee1275_TRUE@am__append_6136 = minix.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6137 =
+@COND_sparc64_ieee1275_TRUE@am__append_6138 = $(nodist_minix_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6139 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_minix_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ minix.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6140 = minix.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6141 = minix.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6142 = minix.module
+@COND_powerpc_ieee1275_TRUE@am__append_6143 = minix.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6144 =
+@COND_powerpc_ieee1275_TRUE@am__append_6145 = $(nodist_minix_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6146 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_minix_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ minix.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6147 = minix.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6148 = minix.marker
+@COND_emu_TRUE@am__append_6149 = minix2.module
+@COND_emu_TRUE@am__append_6150 = minix2.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6151 =
+@COND_emu_TRUE@am__append_6152 = $(nodist_minix2_module_SOURCES)
+@COND_emu_TRUE@am__append_6153 = $(nodist_minix2_module_SOURCES) \
+@COND_emu_TRUE@ minix2.marker
+@COND_emu_TRUE@am__append_6154 = minix2.mod
+@COND_emu_TRUE@am__append_6155 = minix2.marker
+@COND_i386_pc_TRUE@am__append_6156 = minix2.module
+@COND_i386_pc_TRUE@am__append_6157 = minix2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6158 =
+@COND_i386_pc_TRUE@am__append_6159 = $(nodist_minix2_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6160 = $(nodist_minix2_module_SOURCES) \
+@COND_i386_pc_TRUE@ minix2.marker
+@COND_i386_pc_TRUE@am__append_6161 = minix2.mod
+@COND_i386_pc_TRUE@am__append_6162 = minix2.marker
+@COND_i386_efi_TRUE@am__append_6163 = minix2.module
+@COND_i386_efi_TRUE@am__append_6164 = minix2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6165 =
+@COND_i386_efi_TRUE@am__append_6166 = $(nodist_minix2_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6167 = $(nodist_minix2_module_SOURCES) \
+@COND_i386_efi_TRUE@ minix2.marker
+@COND_i386_efi_TRUE@am__append_6168 = minix2.mod
+@COND_i386_efi_TRUE@am__append_6169 = minix2.marker
+@COND_i386_qemu_TRUE@am__append_6170 = minix2.module
+@COND_i386_qemu_TRUE@am__append_6171 = minix2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6172 =
+@COND_i386_qemu_TRUE@am__append_6173 = $(nodist_minix2_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6174 = \
+@COND_i386_qemu_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_i386_qemu_TRUE@ minix2.marker
+@COND_i386_qemu_TRUE@am__append_6175 = minix2.mod
+@COND_i386_qemu_TRUE@am__append_6176 = minix2.marker
+@COND_i386_coreboot_TRUE@am__append_6177 = minix2.module
+@COND_i386_coreboot_TRUE@am__append_6178 = minix2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6179 =
+@COND_i386_coreboot_TRUE@am__append_6180 = $(nodist_minix2_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6181 = \
+@COND_i386_coreboot_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ minix2.marker
+@COND_i386_coreboot_TRUE@am__append_6182 = minix2.mod
+@COND_i386_coreboot_TRUE@am__append_6183 = minix2.marker
+@COND_i386_multiboot_TRUE@am__append_6184 = minix2.module
+@COND_i386_multiboot_TRUE@am__append_6185 = minix2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6186 =
+@COND_i386_multiboot_TRUE@am__append_6187 = $(nodist_minix2_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6188 = \
+@COND_i386_multiboot_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ minix2.marker
+@COND_i386_multiboot_TRUE@am__append_6189 = minix2.mod
+@COND_i386_multiboot_TRUE@am__append_6190 = minix2.marker
+@COND_i386_ieee1275_TRUE@am__append_6191 = minix2.module
+@COND_i386_ieee1275_TRUE@am__append_6192 = minix2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6193 =
+@COND_i386_ieee1275_TRUE@am__append_6194 = $(nodist_minix2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6195 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ minix2.marker
+@COND_i386_ieee1275_TRUE@am__append_6196 = minix2.mod
+@COND_i386_ieee1275_TRUE@am__append_6197 = minix2.marker
+@COND_x86_64_efi_TRUE@am__append_6198 = minix2.module
+@COND_x86_64_efi_TRUE@am__append_6199 = minix2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6200 =
+@COND_x86_64_efi_TRUE@am__append_6201 = $(nodist_minix2_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6202 = \
+@COND_x86_64_efi_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ minix2.marker
+@COND_x86_64_efi_TRUE@am__append_6203 = minix2.mod
+@COND_x86_64_efi_TRUE@am__append_6204 = minix2.marker
+@COND_mips_yeeloong_TRUE@am__append_6205 = minix2.module
+@COND_mips_yeeloong_TRUE@am__append_6206 = minix2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6207 =
+@COND_mips_yeeloong_TRUE@am__append_6208 = $(nodist_minix2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6209 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ minix2.marker
+@COND_mips_yeeloong_TRUE@am__append_6210 = minix2.mod
+@COND_mips_yeeloong_TRUE@am__append_6211 = minix2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6212 = minix2.module
+@COND_sparc64_ieee1275_TRUE@am__append_6213 = minix2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6214 =
+@COND_sparc64_ieee1275_TRUE@am__append_6215 = $(nodist_minix2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6216 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ minix2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6217 = minix2.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6218 = minix2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6219 = minix2.module
+@COND_powerpc_ieee1275_TRUE@am__append_6220 = minix2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6221 =
+@COND_powerpc_ieee1275_TRUE@am__append_6222 = $(nodist_minix2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6223 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_minix2_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ minix2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6224 = minix2.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6225 = minix2.marker
+@COND_emu_TRUE@am__append_6226 = nilfs2.module
+@COND_emu_TRUE@am__append_6227 = nilfs2.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6228 =
+@COND_emu_TRUE@am__append_6229 = $(nodist_nilfs2_module_SOURCES)
+@COND_emu_TRUE@am__append_6230 = $(nodist_nilfs2_module_SOURCES) \
+@COND_emu_TRUE@ nilfs2.marker
+@COND_emu_TRUE@am__append_6231 = nilfs2.mod
+@COND_emu_TRUE@am__append_6232 = nilfs2.marker
+@COND_i386_pc_TRUE@am__append_6233 = nilfs2.module
+@COND_i386_pc_TRUE@am__append_6234 = nilfs2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6235 =
+@COND_i386_pc_TRUE@am__append_6236 = $(nodist_nilfs2_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6237 = $(nodist_nilfs2_module_SOURCES) \
+@COND_i386_pc_TRUE@ nilfs2.marker
+@COND_i386_pc_TRUE@am__append_6238 = nilfs2.mod
+@COND_i386_pc_TRUE@am__append_6239 = nilfs2.marker
+@COND_i386_efi_TRUE@am__append_6240 = nilfs2.module
+@COND_i386_efi_TRUE@am__append_6241 = nilfs2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6242 =
+@COND_i386_efi_TRUE@am__append_6243 = $(nodist_nilfs2_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6244 = $(nodist_nilfs2_module_SOURCES) \
+@COND_i386_efi_TRUE@ nilfs2.marker
+@COND_i386_efi_TRUE@am__append_6245 = nilfs2.mod
+@COND_i386_efi_TRUE@am__append_6246 = nilfs2.marker
+@COND_i386_qemu_TRUE@am__append_6247 = nilfs2.module
+@COND_i386_qemu_TRUE@am__append_6248 = nilfs2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6249 =
+@COND_i386_qemu_TRUE@am__append_6250 = $(nodist_nilfs2_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6251 = \
+@COND_i386_qemu_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_i386_qemu_TRUE@ nilfs2.marker
+@COND_i386_qemu_TRUE@am__append_6252 = nilfs2.mod
+@COND_i386_qemu_TRUE@am__append_6253 = nilfs2.marker
+@COND_i386_coreboot_TRUE@am__append_6254 = nilfs2.module
+@COND_i386_coreboot_TRUE@am__append_6255 = nilfs2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6256 =
+@COND_i386_coreboot_TRUE@am__append_6257 = $(nodist_nilfs2_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6258 = \
+@COND_i386_coreboot_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ nilfs2.marker
+@COND_i386_coreboot_TRUE@am__append_6259 = nilfs2.mod
+@COND_i386_coreboot_TRUE@am__append_6260 = nilfs2.marker
+@COND_i386_multiboot_TRUE@am__append_6261 = nilfs2.module
+@COND_i386_multiboot_TRUE@am__append_6262 = nilfs2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6263 =
+@COND_i386_multiboot_TRUE@am__append_6264 = $(nodist_nilfs2_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6265 = \
+@COND_i386_multiboot_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ nilfs2.marker
+@COND_i386_multiboot_TRUE@am__append_6266 = nilfs2.mod
+@COND_i386_multiboot_TRUE@am__append_6267 = nilfs2.marker
+@COND_i386_ieee1275_TRUE@am__append_6268 = nilfs2.module
+@COND_i386_ieee1275_TRUE@am__append_6269 = nilfs2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6270 =
+@COND_i386_ieee1275_TRUE@am__append_6271 = $(nodist_nilfs2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6272 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ nilfs2.marker
+@COND_i386_ieee1275_TRUE@am__append_6273 = nilfs2.mod
+@COND_i386_ieee1275_TRUE@am__append_6274 = nilfs2.marker
+@COND_x86_64_efi_TRUE@am__append_6275 = nilfs2.module
+@COND_x86_64_efi_TRUE@am__append_6276 = nilfs2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6277 =
+@COND_x86_64_efi_TRUE@am__append_6278 = $(nodist_nilfs2_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6279 = \
+@COND_x86_64_efi_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ nilfs2.marker
+@COND_x86_64_efi_TRUE@am__append_6280 = nilfs2.mod
+@COND_x86_64_efi_TRUE@am__append_6281 = nilfs2.marker
+@COND_mips_yeeloong_TRUE@am__append_6282 = nilfs2.module
+@COND_mips_yeeloong_TRUE@am__append_6283 = nilfs2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6284 =
+@COND_mips_yeeloong_TRUE@am__append_6285 = $(nodist_nilfs2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6286 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ nilfs2.marker
+@COND_mips_yeeloong_TRUE@am__append_6287 = nilfs2.mod
+@COND_mips_yeeloong_TRUE@am__append_6288 = nilfs2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6289 = nilfs2.module
+@COND_sparc64_ieee1275_TRUE@am__append_6290 = nilfs2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6291 =
+@COND_sparc64_ieee1275_TRUE@am__append_6292 = $(nodist_nilfs2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6293 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ nilfs2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6294 = nilfs2.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6295 = nilfs2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6296 = nilfs2.module
+@COND_powerpc_ieee1275_TRUE@am__append_6297 = nilfs2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6298 =
+@COND_powerpc_ieee1275_TRUE@am__append_6299 = $(nodist_nilfs2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6300 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_nilfs2_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ nilfs2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6301 = nilfs2.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6302 = nilfs2.marker
+@COND_emu_TRUE@am__append_6303 = ntfs.module
+@COND_emu_TRUE@am__append_6304 = ntfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6305 =
+@COND_emu_TRUE@am__append_6306 = $(nodist_ntfs_module_SOURCES)
+@COND_emu_TRUE@am__append_6307 = $(nodist_ntfs_module_SOURCES) \
+@COND_emu_TRUE@ ntfs.marker
+@COND_emu_TRUE@am__append_6308 = ntfs.mod
+@COND_emu_TRUE@am__append_6309 = ntfs.marker
+@COND_i386_pc_TRUE@am__append_6310 = ntfs.module
+@COND_i386_pc_TRUE@am__append_6311 = ntfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6312 =
+@COND_i386_pc_TRUE@am__append_6313 = $(nodist_ntfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6314 = $(nodist_ntfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ ntfs.marker
+@COND_i386_pc_TRUE@am__append_6315 = ntfs.mod
+@COND_i386_pc_TRUE@am__append_6316 = ntfs.marker
+@COND_i386_efi_TRUE@am__append_6317 = ntfs.module
+@COND_i386_efi_TRUE@am__append_6318 = ntfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6319 =
+@COND_i386_efi_TRUE@am__append_6320 = $(nodist_ntfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6321 = $(nodist_ntfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ ntfs.marker
+@COND_i386_efi_TRUE@am__append_6322 = ntfs.mod
+@COND_i386_efi_TRUE@am__append_6323 = ntfs.marker
+@COND_i386_qemu_TRUE@am__append_6324 = ntfs.module
+@COND_i386_qemu_TRUE@am__append_6325 = ntfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6326 =
+@COND_i386_qemu_TRUE@am__append_6327 = $(nodist_ntfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6328 = $(nodist_ntfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ntfs.marker
+@COND_i386_qemu_TRUE@am__append_6329 = ntfs.mod
+@COND_i386_qemu_TRUE@am__append_6330 = ntfs.marker
+@COND_i386_coreboot_TRUE@am__append_6331 = ntfs.module
+@COND_i386_coreboot_TRUE@am__append_6332 = ntfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6333 =
+@COND_i386_coreboot_TRUE@am__append_6334 = $(nodist_ntfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6335 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ntfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ntfs.marker
+@COND_i386_coreboot_TRUE@am__append_6336 = ntfs.mod
+@COND_i386_coreboot_TRUE@am__append_6337 = ntfs.marker
+@COND_i386_multiboot_TRUE@am__append_6338 = ntfs.module
+@COND_i386_multiboot_TRUE@am__append_6339 = ntfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6340 =
+@COND_i386_multiboot_TRUE@am__append_6341 = $(nodist_ntfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6342 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ntfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ntfs.marker
+@COND_i386_multiboot_TRUE@am__append_6343 = ntfs.mod
+@COND_i386_multiboot_TRUE@am__append_6344 = ntfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6345 = ntfs.module
+@COND_i386_ieee1275_TRUE@am__append_6346 = ntfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6347 =
+@COND_i386_ieee1275_TRUE@am__append_6348 = $(nodist_ntfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6349 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ntfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ntfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6350 = ntfs.mod
+@COND_i386_ieee1275_TRUE@am__append_6351 = ntfs.marker
+@COND_x86_64_efi_TRUE@am__append_6352 = ntfs.module
+@COND_x86_64_efi_TRUE@am__append_6353 = ntfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6354 =
+@COND_x86_64_efi_TRUE@am__append_6355 = $(nodist_ntfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6356 = $(nodist_ntfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ntfs.marker
+@COND_x86_64_efi_TRUE@am__append_6357 = ntfs.mod
+@COND_x86_64_efi_TRUE@am__append_6358 = ntfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6359 = ntfs.module
+@COND_mips_yeeloong_TRUE@am__append_6360 = ntfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6361 =
+@COND_mips_yeeloong_TRUE@am__append_6362 = $(nodist_ntfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6363 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ntfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ntfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6364 = ntfs.mod
+@COND_mips_yeeloong_TRUE@am__append_6365 = ntfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6366 = ntfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_6367 = ntfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6368 =
+@COND_sparc64_ieee1275_TRUE@am__append_6369 = $(nodist_ntfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6370 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_ntfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ ntfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6371 = ntfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6372 = ntfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6373 = ntfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_6374 = ntfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6375 =
+@COND_powerpc_ieee1275_TRUE@am__append_6376 = $(nodist_ntfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6377 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ntfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ ntfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6378 = ntfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6379 = ntfs.marker
+@COND_emu_TRUE@am__append_6380 = ntfscomp.module
+@COND_emu_TRUE@am__append_6381 = ntfscomp.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6382 =
+@COND_emu_TRUE@am__append_6383 = $(nodist_ntfscomp_module_SOURCES)
+@COND_emu_TRUE@am__append_6384 = $(nodist_ntfscomp_module_SOURCES) \
+@COND_emu_TRUE@ ntfscomp.marker
+@COND_emu_TRUE@am__append_6385 = ntfscomp.mod
+@COND_emu_TRUE@am__append_6386 = ntfscomp.marker
+@COND_i386_pc_TRUE@am__append_6387 = ntfscomp.module
+@COND_i386_pc_TRUE@am__append_6388 = ntfscomp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6389 =
+@COND_i386_pc_TRUE@am__append_6390 = $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6391 = \
+@COND_i386_pc_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_i386_pc_TRUE@ ntfscomp.marker
+@COND_i386_pc_TRUE@am__append_6392 = ntfscomp.mod
+@COND_i386_pc_TRUE@am__append_6393 = ntfscomp.marker
+@COND_i386_efi_TRUE@am__append_6394 = ntfscomp.module
+@COND_i386_efi_TRUE@am__append_6395 = ntfscomp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6396 =
+@COND_i386_efi_TRUE@am__append_6397 = $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6398 = \
+@COND_i386_efi_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_i386_efi_TRUE@ ntfscomp.marker
+@COND_i386_efi_TRUE@am__append_6399 = ntfscomp.mod
+@COND_i386_efi_TRUE@am__append_6400 = ntfscomp.marker
+@COND_i386_qemu_TRUE@am__append_6401 = ntfscomp.module
+@COND_i386_qemu_TRUE@am__append_6402 = ntfscomp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6403 =
+@COND_i386_qemu_TRUE@am__append_6404 = $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6405 = \
+@COND_i386_qemu_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ntfscomp.marker
+@COND_i386_qemu_TRUE@am__append_6406 = ntfscomp.mod
+@COND_i386_qemu_TRUE@am__append_6407 = ntfscomp.marker
+@COND_i386_coreboot_TRUE@am__append_6408 = ntfscomp.module
+@COND_i386_coreboot_TRUE@am__append_6409 = ntfscomp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6410 =
+@COND_i386_coreboot_TRUE@am__append_6411 = $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6412 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ntfscomp.marker
+@COND_i386_coreboot_TRUE@am__append_6413 = ntfscomp.mod
+@COND_i386_coreboot_TRUE@am__append_6414 = ntfscomp.marker
+@COND_i386_multiboot_TRUE@am__append_6415 = ntfscomp.module
+@COND_i386_multiboot_TRUE@am__append_6416 = ntfscomp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6417 =
+@COND_i386_multiboot_TRUE@am__append_6418 = $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6419 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ntfscomp.marker
+@COND_i386_multiboot_TRUE@am__append_6420 = ntfscomp.mod
+@COND_i386_multiboot_TRUE@am__append_6421 = ntfscomp.marker
+@COND_i386_ieee1275_TRUE@am__append_6422 = ntfscomp.module
+@COND_i386_ieee1275_TRUE@am__append_6423 = ntfscomp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6424 =
+@COND_i386_ieee1275_TRUE@am__append_6425 = $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6426 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ntfscomp.marker
+@COND_i386_ieee1275_TRUE@am__append_6427 = ntfscomp.mod
+@COND_i386_ieee1275_TRUE@am__append_6428 = ntfscomp.marker
+@COND_x86_64_efi_TRUE@am__append_6429 = ntfscomp.module
+@COND_x86_64_efi_TRUE@am__append_6430 = ntfscomp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6431 =
+@COND_x86_64_efi_TRUE@am__append_6432 = $(nodist_ntfscomp_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6433 = \
+@COND_x86_64_efi_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ntfscomp.marker
+@COND_x86_64_efi_TRUE@am__append_6434 = ntfscomp.mod
+@COND_x86_64_efi_TRUE@am__append_6435 = ntfscomp.marker
+@COND_mips_yeeloong_TRUE@am__append_6436 = ntfscomp.module
+@COND_mips_yeeloong_TRUE@am__append_6437 = ntfscomp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6438 =
+@COND_mips_yeeloong_TRUE@am__append_6439 = $(nodist_ntfscomp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6440 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ntfscomp.marker
+@COND_mips_yeeloong_TRUE@am__append_6441 = ntfscomp.mod
+@COND_mips_yeeloong_TRUE@am__append_6442 = ntfscomp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6443 = ntfscomp.module
+@COND_sparc64_ieee1275_TRUE@am__append_6444 = ntfscomp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6445 =
+@COND_sparc64_ieee1275_TRUE@am__append_6446 = $(nodist_ntfscomp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6447 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ ntfscomp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6448 = ntfscomp.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6449 = ntfscomp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6450 = ntfscomp.module
+@COND_powerpc_ieee1275_TRUE@am__append_6451 = ntfscomp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6452 =
+@COND_powerpc_ieee1275_TRUE@am__append_6453 = $(nodist_ntfscomp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6454 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ntfscomp_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ ntfscomp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6455 = ntfscomp.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6456 = ntfscomp.marker
+@COND_emu_TRUE@am__append_6457 = reiserfs.module
+@COND_emu_TRUE@am__append_6458 = reiserfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6459 =
+@COND_emu_TRUE@am__append_6460 = $(nodist_reiserfs_module_SOURCES)
+@COND_emu_TRUE@am__append_6461 = $(nodist_reiserfs_module_SOURCES) \
+@COND_emu_TRUE@ reiserfs.marker
+@COND_emu_TRUE@am__append_6462 = reiserfs.mod
+@COND_emu_TRUE@am__append_6463 = reiserfs.marker
+@COND_i386_pc_TRUE@am__append_6464 = reiserfs.module
+@COND_i386_pc_TRUE@am__append_6465 = reiserfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6466 =
+@COND_i386_pc_TRUE@am__append_6467 = $(nodist_reiserfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6468 = \
+@COND_i386_pc_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ reiserfs.marker
+@COND_i386_pc_TRUE@am__append_6469 = reiserfs.mod
+@COND_i386_pc_TRUE@am__append_6470 = reiserfs.marker
+@COND_i386_efi_TRUE@am__append_6471 = reiserfs.module
+@COND_i386_efi_TRUE@am__append_6472 = reiserfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6473 =
+@COND_i386_efi_TRUE@am__append_6474 = $(nodist_reiserfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6475 = \
+@COND_i386_efi_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ reiserfs.marker
+@COND_i386_efi_TRUE@am__append_6476 = reiserfs.mod
+@COND_i386_efi_TRUE@am__append_6477 = reiserfs.marker
+@COND_i386_qemu_TRUE@am__append_6478 = reiserfs.module
+@COND_i386_qemu_TRUE@am__append_6479 = reiserfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6480 =
+@COND_i386_qemu_TRUE@am__append_6481 = $(nodist_reiserfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6482 = \
+@COND_i386_qemu_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ reiserfs.marker
+@COND_i386_qemu_TRUE@am__append_6483 = reiserfs.mod
+@COND_i386_qemu_TRUE@am__append_6484 = reiserfs.marker
+@COND_i386_coreboot_TRUE@am__append_6485 = reiserfs.module
+@COND_i386_coreboot_TRUE@am__append_6486 = reiserfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6487 =
+@COND_i386_coreboot_TRUE@am__append_6488 = $(nodist_reiserfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6489 = \
+@COND_i386_coreboot_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ reiserfs.marker
+@COND_i386_coreboot_TRUE@am__append_6490 = reiserfs.mod
+@COND_i386_coreboot_TRUE@am__append_6491 = reiserfs.marker
+@COND_i386_multiboot_TRUE@am__append_6492 = reiserfs.module
+@COND_i386_multiboot_TRUE@am__append_6493 = reiserfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6494 =
+@COND_i386_multiboot_TRUE@am__append_6495 = $(nodist_reiserfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6496 = \
+@COND_i386_multiboot_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ reiserfs.marker
+@COND_i386_multiboot_TRUE@am__append_6497 = reiserfs.mod
+@COND_i386_multiboot_TRUE@am__append_6498 = reiserfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6499 = reiserfs.module
+@COND_i386_ieee1275_TRUE@am__append_6500 = reiserfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6501 =
+@COND_i386_ieee1275_TRUE@am__append_6502 = $(nodist_reiserfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6503 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ reiserfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6504 = reiserfs.mod
+@COND_i386_ieee1275_TRUE@am__append_6505 = reiserfs.marker
+@COND_x86_64_efi_TRUE@am__append_6506 = reiserfs.module
+@COND_x86_64_efi_TRUE@am__append_6507 = reiserfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6508 =
+@COND_x86_64_efi_TRUE@am__append_6509 = $(nodist_reiserfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6510 = \
+@COND_x86_64_efi_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ reiserfs.marker
+@COND_x86_64_efi_TRUE@am__append_6511 = reiserfs.mod
+@COND_x86_64_efi_TRUE@am__append_6512 = reiserfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6513 = reiserfs.module
+@COND_mips_yeeloong_TRUE@am__append_6514 = reiserfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6515 =
+@COND_mips_yeeloong_TRUE@am__append_6516 = $(nodist_reiserfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6517 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ reiserfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6518 = reiserfs.mod
+@COND_mips_yeeloong_TRUE@am__append_6519 = reiserfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6520 = reiserfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_6521 = reiserfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6522 =
+@COND_sparc64_ieee1275_TRUE@am__append_6523 = $(nodist_reiserfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6524 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ reiserfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6525 = reiserfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6526 = reiserfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6527 = reiserfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_6528 = reiserfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6529 =
+@COND_powerpc_ieee1275_TRUE@am__append_6530 = $(nodist_reiserfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6531 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_reiserfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ reiserfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6532 = reiserfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6533 = reiserfs.marker
+@COND_emu_TRUE@am__append_6534 = sfs.module
+@COND_emu_TRUE@am__append_6535 = sfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6536 =
+@COND_emu_TRUE@am__append_6537 = $(nodist_sfs_module_SOURCES)
+@COND_emu_TRUE@am__append_6538 = $(nodist_sfs_module_SOURCES) \
+@COND_emu_TRUE@ sfs.marker
+@COND_emu_TRUE@am__append_6539 = sfs.mod
+@COND_emu_TRUE@am__append_6540 = sfs.marker
+@COND_i386_pc_TRUE@am__append_6541 = sfs.module
+@COND_i386_pc_TRUE@am__append_6542 = sfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6543 =
+@COND_i386_pc_TRUE@am__append_6544 = $(nodist_sfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6545 = $(nodist_sfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ sfs.marker
+@COND_i386_pc_TRUE@am__append_6546 = sfs.mod
+@COND_i386_pc_TRUE@am__append_6547 = sfs.marker
+@COND_i386_efi_TRUE@am__append_6548 = sfs.module
+@COND_i386_efi_TRUE@am__append_6549 = sfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6550 =
+@COND_i386_efi_TRUE@am__append_6551 = $(nodist_sfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6552 = $(nodist_sfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ sfs.marker
+@COND_i386_efi_TRUE@am__append_6553 = sfs.mod
+@COND_i386_efi_TRUE@am__append_6554 = sfs.marker
+@COND_i386_qemu_TRUE@am__append_6555 = sfs.module
+@COND_i386_qemu_TRUE@am__append_6556 = sfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6557 =
+@COND_i386_qemu_TRUE@am__append_6558 = $(nodist_sfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6559 = $(nodist_sfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ sfs.marker
+@COND_i386_qemu_TRUE@am__append_6560 = sfs.mod
+@COND_i386_qemu_TRUE@am__append_6561 = sfs.marker
+@COND_i386_coreboot_TRUE@am__append_6562 = sfs.module
+@COND_i386_coreboot_TRUE@am__append_6563 = sfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6564 =
+@COND_i386_coreboot_TRUE@am__append_6565 = $(nodist_sfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6566 = \
+@COND_i386_coreboot_TRUE@ $(nodist_sfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ sfs.marker
+@COND_i386_coreboot_TRUE@am__append_6567 = sfs.mod
+@COND_i386_coreboot_TRUE@am__append_6568 = sfs.marker
+@COND_i386_multiboot_TRUE@am__append_6569 = sfs.module
+@COND_i386_multiboot_TRUE@am__append_6570 = sfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6571 =
+@COND_i386_multiboot_TRUE@am__append_6572 = $(nodist_sfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6573 = \
+@COND_i386_multiboot_TRUE@ $(nodist_sfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ sfs.marker
+@COND_i386_multiboot_TRUE@am__append_6574 = sfs.mod
+@COND_i386_multiboot_TRUE@am__append_6575 = sfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6576 = sfs.module
+@COND_i386_ieee1275_TRUE@am__append_6577 = sfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6578 =
+@COND_i386_ieee1275_TRUE@am__append_6579 = $(nodist_sfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6580 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_sfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ sfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6581 = sfs.mod
+@COND_i386_ieee1275_TRUE@am__append_6582 = sfs.marker
+@COND_x86_64_efi_TRUE@am__append_6583 = sfs.module
+@COND_x86_64_efi_TRUE@am__append_6584 = sfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6585 =
+@COND_x86_64_efi_TRUE@am__append_6586 = $(nodist_sfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6587 = $(nodist_sfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ sfs.marker
+@COND_x86_64_efi_TRUE@am__append_6588 = sfs.mod
+@COND_x86_64_efi_TRUE@am__append_6589 = sfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6590 = sfs.module
+@COND_mips_yeeloong_TRUE@am__append_6591 = sfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6592 =
+@COND_mips_yeeloong_TRUE@am__append_6593 = $(nodist_sfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6594 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_sfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ sfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6595 = sfs.mod
+@COND_mips_yeeloong_TRUE@am__append_6596 = sfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6597 = sfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_6598 = sfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6599 =
+@COND_sparc64_ieee1275_TRUE@am__append_6600 = $(nodist_sfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6601 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_sfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ sfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6602 = sfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6603 = sfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6604 = sfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_6605 = sfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6606 =
+@COND_powerpc_ieee1275_TRUE@am__append_6607 = $(nodist_sfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6608 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_sfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ sfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6609 = sfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6610 = sfs.marker
+@COND_emu_TRUE@am__append_6611 = tar.module
+@COND_emu_TRUE@am__append_6612 = tar.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6613 =
+@COND_emu_TRUE@am__append_6614 = $(nodist_tar_module_SOURCES)
+@COND_emu_TRUE@am__append_6615 = $(nodist_tar_module_SOURCES) \
+@COND_emu_TRUE@ tar.marker
+@COND_emu_TRUE@am__append_6616 = tar.mod
+@COND_emu_TRUE@am__append_6617 = tar.marker
+@COND_i386_pc_TRUE@am__append_6618 = tar.module
+@COND_i386_pc_TRUE@am__append_6619 = tar.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6620 =
+@COND_i386_pc_TRUE@am__append_6621 = $(nodist_tar_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6622 = $(nodist_tar_module_SOURCES) \
+@COND_i386_pc_TRUE@ tar.marker
+@COND_i386_pc_TRUE@am__append_6623 = tar.mod
+@COND_i386_pc_TRUE@am__append_6624 = tar.marker
+@COND_i386_efi_TRUE@am__append_6625 = tar.module
+@COND_i386_efi_TRUE@am__append_6626 = tar.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6627 =
+@COND_i386_efi_TRUE@am__append_6628 = $(nodist_tar_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6629 = $(nodist_tar_module_SOURCES) \
+@COND_i386_efi_TRUE@ tar.marker
+@COND_i386_efi_TRUE@am__append_6630 = tar.mod
+@COND_i386_efi_TRUE@am__append_6631 = tar.marker
+@COND_i386_qemu_TRUE@am__append_6632 = tar.module
+@COND_i386_qemu_TRUE@am__append_6633 = tar.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6634 =
+@COND_i386_qemu_TRUE@am__append_6635 = $(nodist_tar_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6636 = $(nodist_tar_module_SOURCES) \
+@COND_i386_qemu_TRUE@ tar.marker
+@COND_i386_qemu_TRUE@am__append_6637 = tar.mod
+@COND_i386_qemu_TRUE@am__append_6638 = tar.marker
+@COND_i386_coreboot_TRUE@am__append_6639 = tar.module
+@COND_i386_coreboot_TRUE@am__append_6640 = tar.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6641 =
+@COND_i386_coreboot_TRUE@am__append_6642 = $(nodist_tar_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6643 = \
+@COND_i386_coreboot_TRUE@ $(nodist_tar_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ tar.marker
+@COND_i386_coreboot_TRUE@am__append_6644 = tar.mod
+@COND_i386_coreboot_TRUE@am__append_6645 = tar.marker
+@COND_i386_multiboot_TRUE@am__append_6646 = tar.module
+@COND_i386_multiboot_TRUE@am__append_6647 = tar.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6648 =
+@COND_i386_multiboot_TRUE@am__append_6649 = $(nodist_tar_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6650 = \
+@COND_i386_multiboot_TRUE@ $(nodist_tar_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ tar.marker
+@COND_i386_multiboot_TRUE@am__append_6651 = tar.mod
+@COND_i386_multiboot_TRUE@am__append_6652 = tar.marker
+@COND_i386_ieee1275_TRUE@am__append_6653 = tar.module
+@COND_i386_ieee1275_TRUE@am__append_6654 = tar.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6655 =
+@COND_i386_ieee1275_TRUE@am__append_6656 = $(nodist_tar_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6657 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_tar_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ tar.marker
+@COND_i386_ieee1275_TRUE@am__append_6658 = tar.mod
+@COND_i386_ieee1275_TRUE@am__append_6659 = tar.marker
+@COND_x86_64_efi_TRUE@am__append_6660 = tar.module
+@COND_x86_64_efi_TRUE@am__append_6661 = tar.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6662 =
+@COND_x86_64_efi_TRUE@am__append_6663 = $(nodist_tar_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6664 = $(nodist_tar_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ tar.marker
+@COND_x86_64_efi_TRUE@am__append_6665 = tar.mod
+@COND_x86_64_efi_TRUE@am__append_6666 = tar.marker
+@COND_mips_yeeloong_TRUE@am__append_6667 = tar.module
+@COND_mips_yeeloong_TRUE@am__append_6668 = tar.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6669 =
+@COND_mips_yeeloong_TRUE@am__append_6670 = $(nodist_tar_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6671 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_tar_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ tar.marker
+@COND_mips_yeeloong_TRUE@am__append_6672 = tar.mod
+@COND_mips_yeeloong_TRUE@am__append_6673 = tar.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6674 = tar.module
+@COND_sparc64_ieee1275_TRUE@am__append_6675 = tar.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6676 =
+@COND_sparc64_ieee1275_TRUE@am__append_6677 = $(nodist_tar_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6678 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_tar_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ tar.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6679 = tar.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6680 = tar.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6681 = tar.module
+@COND_powerpc_ieee1275_TRUE@am__append_6682 = tar.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6683 =
+@COND_powerpc_ieee1275_TRUE@am__append_6684 = $(nodist_tar_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6685 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_tar_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ tar.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6686 = tar.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6687 = tar.marker
+@COND_emu_TRUE@am__append_6688 = udf.module
+@COND_emu_TRUE@am__append_6689 = udf.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6690 =
+@COND_emu_TRUE@am__append_6691 = $(nodist_udf_module_SOURCES)
+@COND_emu_TRUE@am__append_6692 = $(nodist_udf_module_SOURCES) \
+@COND_emu_TRUE@ udf.marker
+@COND_emu_TRUE@am__append_6693 = udf.mod
+@COND_emu_TRUE@am__append_6694 = udf.marker
+@COND_i386_pc_TRUE@am__append_6695 = udf.module
+@COND_i386_pc_TRUE@am__append_6696 = udf.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6697 =
+@COND_i386_pc_TRUE@am__append_6698 = $(nodist_udf_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6699 = $(nodist_udf_module_SOURCES) \
+@COND_i386_pc_TRUE@ udf.marker
+@COND_i386_pc_TRUE@am__append_6700 = udf.mod
+@COND_i386_pc_TRUE@am__append_6701 = udf.marker
+@COND_i386_efi_TRUE@am__append_6702 = udf.module
+@COND_i386_efi_TRUE@am__append_6703 = udf.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6704 =
+@COND_i386_efi_TRUE@am__append_6705 = $(nodist_udf_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6706 = $(nodist_udf_module_SOURCES) \
+@COND_i386_efi_TRUE@ udf.marker
+@COND_i386_efi_TRUE@am__append_6707 = udf.mod
+@COND_i386_efi_TRUE@am__append_6708 = udf.marker
+@COND_i386_qemu_TRUE@am__append_6709 = udf.module
+@COND_i386_qemu_TRUE@am__append_6710 = udf.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6711 =
+@COND_i386_qemu_TRUE@am__append_6712 = $(nodist_udf_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6713 = $(nodist_udf_module_SOURCES) \
+@COND_i386_qemu_TRUE@ udf.marker
+@COND_i386_qemu_TRUE@am__append_6714 = udf.mod
+@COND_i386_qemu_TRUE@am__append_6715 = udf.marker
+@COND_i386_coreboot_TRUE@am__append_6716 = udf.module
+@COND_i386_coreboot_TRUE@am__append_6717 = udf.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6718 =
+@COND_i386_coreboot_TRUE@am__append_6719 = $(nodist_udf_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6720 = \
+@COND_i386_coreboot_TRUE@ $(nodist_udf_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ udf.marker
+@COND_i386_coreboot_TRUE@am__append_6721 = udf.mod
+@COND_i386_coreboot_TRUE@am__append_6722 = udf.marker
+@COND_i386_multiboot_TRUE@am__append_6723 = udf.module
+@COND_i386_multiboot_TRUE@am__append_6724 = udf.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6725 =
+@COND_i386_multiboot_TRUE@am__append_6726 = $(nodist_udf_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6727 = \
+@COND_i386_multiboot_TRUE@ $(nodist_udf_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ udf.marker
+@COND_i386_multiboot_TRUE@am__append_6728 = udf.mod
+@COND_i386_multiboot_TRUE@am__append_6729 = udf.marker
+@COND_i386_ieee1275_TRUE@am__append_6730 = udf.module
+@COND_i386_ieee1275_TRUE@am__append_6731 = udf.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6732 =
+@COND_i386_ieee1275_TRUE@am__append_6733 = $(nodist_udf_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6734 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_udf_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ udf.marker
+@COND_i386_ieee1275_TRUE@am__append_6735 = udf.mod
+@COND_i386_ieee1275_TRUE@am__append_6736 = udf.marker
+@COND_x86_64_efi_TRUE@am__append_6737 = udf.module
+@COND_x86_64_efi_TRUE@am__append_6738 = udf.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6739 =
+@COND_x86_64_efi_TRUE@am__append_6740 = $(nodist_udf_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6741 = $(nodist_udf_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ udf.marker
+@COND_x86_64_efi_TRUE@am__append_6742 = udf.mod
+@COND_x86_64_efi_TRUE@am__append_6743 = udf.marker
+@COND_mips_yeeloong_TRUE@am__append_6744 = udf.module
+@COND_mips_yeeloong_TRUE@am__append_6745 = udf.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6746 =
+@COND_mips_yeeloong_TRUE@am__append_6747 = $(nodist_udf_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6748 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_udf_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ udf.marker
+@COND_mips_yeeloong_TRUE@am__append_6749 = udf.mod
+@COND_mips_yeeloong_TRUE@am__append_6750 = udf.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6751 = udf.module
+@COND_sparc64_ieee1275_TRUE@am__append_6752 = udf.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6753 =
+@COND_sparc64_ieee1275_TRUE@am__append_6754 = $(nodist_udf_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6755 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_udf_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ udf.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6756 = udf.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6757 = udf.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6758 = udf.module
+@COND_powerpc_ieee1275_TRUE@am__append_6759 = udf.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6760 =
+@COND_powerpc_ieee1275_TRUE@am__append_6761 = $(nodist_udf_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6762 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_udf_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ udf.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6763 = udf.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6764 = udf.marker
+@COND_emu_TRUE@am__append_6765 = ufs1.module
+@COND_emu_TRUE@am__append_6766 = ufs1.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6767 =
+@COND_emu_TRUE@am__append_6768 = $(nodist_ufs1_module_SOURCES)
+@COND_emu_TRUE@am__append_6769 = $(nodist_ufs1_module_SOURCES) \
+@COND_emu_TRUE@ ufs1.marker
+@COND_emu_TRUE@am__append_6770 = ufs1.mod
+@COND_emu_TRUE@am__append_6771 = ufs1.marker
+@COND_i386_pc_TRUE@am__append_6772 = ufs1.module
+@COND_i386_pc_TRUE@am__append_6773 = ufs1.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6774 =
+@COND_i386_pc_TRUE@am__append_6775 = $(nodist_ufs1_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6776 = $(nodist_ufs1_module_SOURCES) \
+@COND_i386_pc_TRUE@ ufs1.marker
+@COND_i386_pc_TRUE@am__append_6777 = ufs1.mod
+@COND_i386_pc_TRUE@am__append_6778 = ufs1.marker
+@COND_i386_efi_TRUE@am__append_6779 = ufs1.module
+@COND_i386_efi_TRUE@am__append_6780 = ufs1.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6781 =
+@COND_i386_efi_TRUE@am__append_6782 = $(nodist_ufs1_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6783 = $(nodist_ufs1_module_SOURCES) \
+@COND_i386_efi_TRUE@ ufs1.marker
+@COND_i386_efi_TRUE@am__append_6784 = ufs1.mod
+@COND_i386_efi_TRUE@am__append_6785 = ufs1.marker
+@COND_i386_qemu_TRUE@am__append_6786 = ufs1.module
+@COND_i386_qemu_TRUE@am__append_6787 = ufs1.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6788 =
+@COND_i386_qemu_TRUE@am__append_6789 = $(nodist_ufs1_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6790 = $(nodist_ufs1_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ufs1.marker
+@COND_i386_qemu_TRUE@am__append_6791 = ufs1.mod
+@COND_i386_qemu_TRUE@am__append_6792 = ufs1.marker
+@COND_i386_coreboot_TRUE@am__append_6793 = ufs1.module
+@COND_i386_coreboot_TRUE@am__append_6794 = ufs1.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6795 =
+@COND_i386_coreboot_TRUE@am__append_6796 = $(nodist_ufs1_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6797 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ufs1_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ufs1.marker
+@COND_i386_coreboot_TRUE@am__append_6798 = ufs1.mod
+@COND_i386_coreboot_TRUE@am__append_6799 = ufs1.marker
+@COND_i386_multiboot_TRUE@am__append_6800 = ufs1.module
+@COND_i386_multiboot_TRUE@am__append_6801 = ufs1.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6802 =
+@COND_i386_multiboot_TRUE@am__append_6803 = $(nodist_ufs1_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6804 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ufs1_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ufs1.marker
+@COND_i386_multiboot_TRUE@am__append_6805 = ufs1.mod
+@COND_i386_multiboot_TRUE@am__append_6806 = ufs1.marker
+@COND_i386_ieee1275_TRUE@am__append_6807 = ufs1.module
+@COND_i386_ieee1275_TRUE@am__append_6808 = ufs1.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6809 =
+@COND_i386_ieee1275_TRUE@am__append_6810 = $(nodist_ufs1_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6811 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ufs1_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ufs1.marker
+@COND_i386_ieee1275_TRUE@am__append_6812 = ufs1.mod
+@COND_i386_ieee1275_TRUE@am__append_6813 = ufs1.marker
+@COND_x86_64_efi_TRUE@am__append_6814 = ufs1.module
+@COND_x86_64_efi_TRUE@am__append_6815 = ufs1.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6816 =
+@COND_x86_64_efi_TRUE@am__append_6817 = $(nodist_ufs1_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6818 = $(nodist_ufs1_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ufs1.marker
+@COND_x86_64_efi_TRUE@am__append_6819 = ufs1.mod
+@COND_x86_64_efi_TRUE@am__append_6820 = ufs1.marker
+@COND_mips_yeeloong_TRUE@am__append_6821 = ufs1.module
+@COND_mips_yeeloong_TRUE@am__append_6822 = ufs1.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6823 =
+@COND_mips_yeeloong_TRUE@am__append_6824 = $(nodist_ufs1_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6825 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ufs1_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ufs1.marker
+@COND_mips_yeeloong_TRUE@am__append_6826 = ufs1.mod
+@COND_mips_yeeloong_TRUE@am__append_6827 = ufs1.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6828 = ufs1.module
+@COND_sparc64_ieee1275_TRUE@am__append_6829 = ufs1.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6830 =
+@COND_sparc64_ieee1275_TRUE@am__append_6831 = $(nodist_ufs1_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6832 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_ufs1_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ ufs1.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6833 = ufs1.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6834 = ufs1.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6835 = ufs1.module
+@COND_powerpc_ieee1275_TRUE@am__append_6836 = ufs1.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6837 =
+@COND_powerpc_ieee1275_TRUE@am__append_6838 = $(nodist_ufs1_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6839 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ufs1_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ ufs1.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6840 = ufs1.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6841 = ufs1.marker
+@COND_emu_TRUE@am__append_6842 = ufs2.module
+@COND_emu_TRUE@am__append_6843 = ufs2.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6844 =
+@COND_emu_TRUE@am__append_6845 = $(nodist_ufs2_module_SOURCES)
+@COND_emu_TRUE@am__append_6846 = $(nodist_ufs2_module_SOURCES) \
+@COND_emu_TRUE@ ufs2.marker
+@COND_emu_TRUE@am__append_6847 = ufs2.mod
+@COND_emu_TRUE@am__append_6848 = ufs2.marker
+@COND_i386_pc_TRUE@am__append_6849 = ufs2.module
+@COND_i386_pc_TRUE@am__append_6850 = ufs2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6851 =
+@COND_i386_pc_TRUE@am__append_6852 = $(nodist_ufs2_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6853 = $(nodist_ufs2_module_SOURCES) \
+@COND_i386_pc_TRUE@ ufs2.marker
+@COND_i386_pc_TRUE@am__append_6854 = ufs2.mod
+@COND_i386_pc_TRUE@am__append_6855 = ufs2.marker
+@COND_i386_efi_TRUE@am__append_6856 = ufs2.module
+@COND_i386_efi_TRUE@am__append_6857 = ufs2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6858 =
+@COND_i386_efi_TRUE@am__append_6859 = $(nodist_ufs2_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6860 = $(nodist_ufs2_module_SOURCES) \
+@COND_i386_efi_TRUE@ ufs2.marker
+@COND_i386_efi_TRUE@am__append_6861 = ufs2.mod
+@COND_i386_efi_TRUE@am__append_6862 = ufs2.marker
+@COND_i386_qemu_TRUE@am__append_6863 = ufs2.module
+@COND_i386_qemu_TRUE@am__append_6864 = ufs2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6865 =
+@COND_i386_qemu_TRUE@am__append_6866 = $(nodist_ufs2_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6867 = $(nodist_ufs2_module_SOURCES) \
+@COND_i386_qemu_TRUE@ ufs2.marker
+@COND_i386_qemu_TRUE@am__append_6868 = ufs2.mod
+@COND_i386_qemu_TRUE@am__append_6869 = ufs2.marker
+@COND_i386_coreboot_TRUE@am__append_6870 = ufs2.module
+@COND_i386_coreboot_TRUE@am__append_6871 = ufs2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6872 =
+@COND_i386_coreboot_TRUE@am__append_6873 = $(nodist_ufs2_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6874 = \
+@COND_i386_coreboot_TRUE@ $(nodist_ufs2_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ ufs2.marker
+@COND_i386_coreboot_TRUE@am__append_6875 = ufs2.mod
+@COND_i386_coreboot_TRUE@am__append_6876 = ufs2.marker
+@COND_i386_multiboot_TRUE@am__append_6877 = ufs2.module
+@COND_i386_multiboot_TRUE@am__append_6878 = ufs2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6879 =
+@COND_i386_multiboot_TRUE@am__append_6880 = $(nodist_ufs2_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6881 = \
+@COND_i386_multiboot_TRUE@ $(nodist_ufs2_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ ufs2.marker
+@COND_i386_multiboot_TRUE@am__append_6882 = ufs2.mod
+@COND_i386_multiboot_TRUE@am__append_6883 = ufs2.marker
+@COND_i386_ieee1275_TRUE@am__append_6884 = ufs2.module
+@COND_i386_ieee1275_TRUE@am__append_6885 = ufs2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6886 =
+@COND_i386_ieee1275_TRUE@am__append_6887 = $(nodist_ufs2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6888 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_ufs2_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ ufs2.marker
+@COND_i386_ieee1275_TRUE@am__append_6889 = ufs2.mod
+@COND_i386_ieee1275_TRUE@am__append_6890 = ufs2.marker
+@COND_x86_64_efi_TRUE@am__append_6891 = ufs2.module
+@COND_x86_64_efi_TRUE@am__append_6892 = ufs2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6893 =
+@COND_x86_64_efi_TRUE@am__append_6894 = $(nodist_ufs2_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6895 = $(nodist_ufs2_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ ufs2.marker
+@COND_x86_64_efi_TRUE@am__append_6896 = ufs2.mod
+@COND_x86_64_efi_TRUE@am__append_6897 = ufs2.marker
+@COND_mips_yeeloong_TRUE@am__append_6898 = ufs2.module
+@COND_mips_yeeloong_TRUE@am__append_6899 = ufs2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6900 =
+@COND_mips_yeeloong_TRUE@am__append_6901 = $(nodist_ufs2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6902 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_ufs2_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ ufs2.marker
+@COND_mips_yeeloong_TRUE@am__append_6903 = ufs2.mod
+@COND_mips_yeeloong_TRUE@am__append_6904 = ufs2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6905 = ufs2.module
+@COND_sparc64_ieee1275_TRUE@am__append_6906 = ufs2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6907 =
+@COND_sparc64_ieee1275_TRUE@am__append_6908 = $(nodist_ufs2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6909 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_ufs2_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ ufs2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6910 = ufs2.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6911 = ufs2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6912 = ufs2.module
+@COND_powerpc_ieee1275_TRUE@am__append_6913 = ufs2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6914 =
+@COND_powerpc_ieee1275_TRUE@am__append_6915 = $(nodist_ufs2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6916 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ufs2_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ ufs2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6917 = ufs2.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6918 = ufs2.marker
+@COND_emu_TRUE@am__append_6919 = xfs.module
+@COND_emu_TRUE@am__append_6920 = xfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6921 =
+@COND_emu_TRUE@am__append_6922 = $(nodist_xfs_module_SOURCES)
+@COND_emu_TRUE@am__append_6923 = $(nodist_xfs_module_SOURCES) \
+@COND_emu_TRUE@ xfs.marker
+@COND_emu_TRUE@am__append_6924 = xfs.mod
+@COND_emu_TRUE@am__append_6925 = xfs.marker
+@COND_i386_pc_TRUE@am__append_6926 = xfs.module
+@COND_i386_pc_TRUE@am__append_6927 = xfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_6928 =
+@COND_i386_pc_TRUE@am__append_6929 = $(nodist_xfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_6930 = $(nodist_xfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ xfs.marker
+@COND_i386_pc_TRUE@am__append_6931 = xfs.mod
+@COND_i386_pc_TRUE@am__append_6932 = xfs.marker
+@COND_i386_efi_TRUE@am__append_6933 = xfs.module
+@COND_i386_efi_TRUE@am__append_6934 = xfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_6935 =
+@COND_i386_efi_TRUE@am__append_6936 = $(nodist_xfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_6937 = $(nodist_xfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ xfs.marker
+@COND_i386_efi_TRUE@am__append_6938 = xfs.mod
+@COND_i386_efi_TRUE@am__append_6939 = xfs.marker
+@COND_i386_qemu_TRUE@am__append_6940 = xfs.module
+@COND_i386_qemu_TRUE@am__append_6941 = xfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_6942 =
+@COND_i386_qemu_TRUE@am__append_6943 = $(nodist_xfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_6944 = $(nodist_xfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ xfs.marker
+@COND_i386_qemu_TRUE@am__append_6945 = xfs.mod
+@COND_i386_qemu_TRUE@am__append_6946 = xfs.marker
+@COND_i386_coreboot_TRUE@am__append_6947 = xfs.module
+@COND_i386_coreboot_TRUE@am__append_6948 = xfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_6949 =
+@COND_i386_coreboot_TRUE@am__append_6950 = $(nodist_xfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_6951 = \
+@COND_i386_coreboot_TRUE@ $(nodist_xfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ xfs.marker
+@COND_i386_coreboot_TRUE@am__append_6952 = xfs.mod
+@COND_i386_coreboot_TRUE@am__append_6953 = xfs.marker
+@COND_i386_multiboot_TRUE@am__append_6954 = xfs.module
+@COND_i386_multiboot_TRUE@am__append_6955 = xfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_6956 =
+@COND_i386_multiboot_TRUE@am__append_6957 = $(nodist_xfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_6958 = \
+@COND_i386_multiboot_TRUE@ $(nodist_xfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ xfs.marker
+@COND_i386_multiboot_TRUE@am__append_6959 = xfs.mod
+@COND_i386_multiboot_TRUE@am__append_6960 = xfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6961 = xfs.module
+@COND_i386_ieee1275_TRUE@am__append_6962 = xfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_6963 =
+@COND_i386_ieee1275_TRUE@am__append_6964 = $(nodist_xfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_6965 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_xfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ xfs.marker
+@COND_i386_ieee1275_TRUE@am__append_6966 = xfs.mod
+@COND_i386_ieee1275_TRUE@am__append_6967 = xfs.marker
+@COND_x86_64_efi_TRUE@am__append_6968 = xfs.module
+@COND_x86_64_efi_TRUE@am__append_6969 = xfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_6970 =
+@COND_x86_64_efi_TRUE@am__append_6971 = $(nodist_xfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_6972 = $(nodist_xfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ xfs.marker
+@COND_x86_64_efi_TRUE@am__append_6973 = xfs.mod
+@COND_x86_64_efi_TRUE@am__append_6974 = xfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6975 = xfs.module
+@COND_mips_yeeloong_TRUE@am__append_6976 = xfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_6977 =
+@COND_mips_yeeloong_TRUE@am__append_6978 = $(nodist_xfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_6979 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_xfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ xfs.marker
+@COND_mips_yeeloong_TRUE@am__append_6980 = xfs.mod
+@COND_mips_yeeloong_TRUE@am__append_6981 = xfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6982 = xfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_6983 = xfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_6984 =
+@COND_sparc64_ieee1275_TRUE@am__append_6985 = $(nodist_xfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_6986 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_xfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ xfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_6987 = xfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_6988 = xfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6989 = xfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_6990 = xfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_6991 =
+@COND_powerpc_ieee1275_TRUE@am__append_6992 = $(nodist_xfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_6993 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_xfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ xfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_6994 = xfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_6995 = xfs.marker
+@COND_emu_TRUE@am__append_6996 = zfs.module
+@COND_emu_TRUE@am__append_6997 = zfs.module$(EXEEXT)
+@COND_emu_TRUE@am__append_6998 =
+@COND_emu_TRUE@am__append_6999 = $(nodist_zfs_module_SOURCES)
+@COND_emu_TRUE@am__append_7000 = $(nodist_zfs_module_SOURCES) \
+@COND_emu_TRUE@ zfs.marker
+@COND_emu_TRUE@am__append_7001 = zfs.mod
+@COND_emu_TRUE@am__append_7002 = zfs.marker
+@COND_i386_pc_TRUE@am__append_7003 = zfs.module
+@COND_i386_pc_TRUE@am__append_7004 = zfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7005 =
+@COND_i386_pc_TRUE@am__append_7006 = $(nodist_zfs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7007 = $(nodist_zfs_module_SOURCES) \
+@COND_i386_pc_TRUE@ zfs.marker
+@COND_i386_pc_TRUE@am__append_7008 = zfs.mod
+@COND_i386_pc_TRUE@am__append_7009 = zfs.marker
+@COND_i386_efi_TRUE@am__append_7010 = zfs.module
+@COND_i386_efi_TRUE@am__append_7011 = zfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7012 =
+@COND_i386_efi_TRUE@am__append_7013 = $(nodist_zfs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7014 = $(nodist_zfs_module_SOURCES) \
+@COND_i386_efi_TRUE@ zfs.marker
+@COND_i386_efi_TRUE@am__append_7015 = zfs.mod
+@COND_i386_efi_TRUE@am__append_7016 = zfs.marker
+@COND_i386_qemu_TRUE@am__append_7017 = zfs.module
+@COND_i386_qemu_TRUE@am__append_7018 = zfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7019 =
+@COND_i386_qemu_TRUE@am__append_7020 = $(nodist_zfs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7021 = $(nodist_zfs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ zfs.marker
+@COND_i386_qemu_TRUE@am__append_7022 = zfs.mod
+@COND_i386_qemu_TRUE@am__append_7023 = zfs.marker
+@COND_i386_coreboot_TRUE@am__append_7024 = zfs.module
+@COND_i386_coreboot_TRUE@am__append_7025 = zfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7026 =
+@COND_i386_coreboot_TRUE@am__append_7027 = $(nodist_zfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7028 = \
+@COND_i386_coreboot_TRUE@ $(nodist_zfs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ zfs.marker
+@COND_i386_coreboot_TRUE@am__append_7029 = zfs.mod
+@COND_i386_coreboot_TRUE@am__append_7030 = zfs.marker
+@COND_i386_multiboot_TRUE@am__append_7031 = zfs.module
+@COND_i386_multiboot_TRUE@am__append_7032 = zfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7033 =
+@COND_i386_multiboot_TRUE@am__append_7034 = $(nodist_zfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7035 = \
+@COND_i386_multiboot_TRUE@ $(nodist_zfs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ zfs.marker
+@COND_i386_multiboot_TRUE@am__append_7036 = zfs.mod
+@COND_i386_multiboot_TRUE@am__append_7037 = zfs.marker
+@COND_i386_ieee1275_TRUE@am__append_7038 = zfs.module
+@COND_i386_ieee1275_TRUE@am__append_7039 = zfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7040 =
+@COND_i386_ieee1275_TRUE@am__append_7041 = $(nodist_zfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7042 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_zfs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ zfs.marker
+@COND_i386_ieee1275_TRUE@am__append_7043 = zfs.mod
+@COND_i386_ieee1275_TRUE@am__append_7044 = zfs.marker
+@COND_x86_64_efi_TRUE@am__append_7045 = zfs.module
+@COND_x86_64_efi_TRUE@am__append_7046 = zfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7047 =
+@COND_x86_64_efi_TRUE@am__append_7048 = $(nodist_zfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7049 = $(nodist_zfs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ zfs.marker
+@COND_x86_64_efi_TRUE@am__append_7050 = zfs.mod
+@COND_x86_64_efi_TRUE@am__append_7051 = zfs.marker
+@COND_mips_yeeloong_TRUE@am__append_7052 = zfs.module
+@COND_mips_yeeloong_TRUE@am__append_7053 = zfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7054 =
+@COND_mips_yeeloong_TRUE@am__append_7055 = $(nodist_zfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7056 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_zfs_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ zfs.marker
+@COND_mips_yeeloong_TRUE@am__append_7057 = zfs.mod
+@COND_mips_yeeloong_TRUE@am__append_7058 = zfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7059 = zfs.module
+@COND_sparc64_ieee1275_TRUE@am__append_7060 = zfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7061 =
+@COND_sparc64_ieee1275_TRUE@am__append_7062 = $(nodist_zfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7063 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_zfs_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ zfs.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7064 = zfs.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7065 = zfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7066 = zfs.module
+@COND_powerpc_ieee1275_TRUE@am__append_7067 = zfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7068 =
+@COND_powerpc_ieee1275_TRUE@am__append_7069 = $(nodist_zfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7070 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_zfs_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ zfs.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7071 = zfs.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7072 = zfs.marker
+@COND_emu_TRUE@am__append_7073 = zfsinfo.module
+@COND_emu_TRUE@am__append_7074 = zfsinfo.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7075 =
+@COND_emu_TRUE@am__append_7076 = $(nodist_zfsinfo_module_SOURCES)
+@COND_emu_TRUE@am__append_7077 = $(nodist_zfsinfo_module_SOURCES) \
+@COND_emu_TRUE@ zfsinfo.marker
+@COND_emu_TRUE@am__append_7078 = zfsinfo.mod
+@COND_emu_TRUE@am__append_7079 = zfsinfo.marker
+@COND_i386_pc_TRUE@am__append_7080 = zfsinfo.module
+@COND_i386_pc_TRUE@am__append_7081 = zfsinfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7082 =
+@COND_i386_pc_TRUE@am__append_7083 = $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7084 = $(nodist_zfsinfo_module_SOURCES) \
+@COND_i386_pc_TRUE@ zfsinfo.marker
+@COND_i386_pc_TRUE@am__append_7085 = zfsinfo.mod
+@COND_i386_pc_TRUE@am__append_7086 = zfsinfo.marker
+@COND_i386_efi_TRUE@am__append_7087 = zfsinfo.module
+@COND_i386_efi_TRUE@am__append_7088 = zfsinfo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7089 =
+@COND_i386_efi_TRUE@am__append_7090 = $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7091 = \
+@COND_i386_efi_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_i386_efi_TRUE@ zfsinfo.marker
+@COND_i386_efi_TRUE@am__append_7092 = zfsinfo.mod
+@COND_i386_efi_TRUE@am__append_7093 = zfsinfo.marker
+@COND_i386_qemu_TRUE@am__append_7094 = zfsinfo.module
+@COND_i386_qemu_TRUE@am__append_7095 = zfsinfo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7096 =
+@COND_i386_qemu_TRUE@am__append_7097 = $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7098 = \
+@COND_i386_qemu_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_i386_qemu_TRUE@ zfsinfo.marker
+@COND_i386_qemu_TRUE@am__append_7099 = zfsinfo.mod
+@COND_i386_qemu_TRUE@am__append_7100 = zfsinfo.marker
+@COND_i386_coreboot_TRUE@am__append_7101 = zfsinfo.module
+@COND_i386_coreboot_TRUE@am__append_7102 = zfsinfo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7103 =
+@COND_i386_coreboot_TRUE@am__append_7104 = $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7105 = \
+@COND_i386_coreboot_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ zfsinfo.marker
+@COND_i386_coreboot_TRUE@am__append_7106 = zfsinfo.mod
+@COND_i386_coreboot_TRUE@am__append_7107 = zfsinfo.marker
+@COND_i386_multiboot_TRUE@am__append_7108 = zfsinfo.module
+@COND_i386_multiboot_TRUE@am__append_7109 = zfsinfo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7110 =
+@COND_i386_multiboot_TRUE@am__append_7111 = $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7112 = \
+@COND_i386_multiboot_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ zfsinfo.marker
+@COND_i386_multiboot_TRUE@am__append_7113 = zfsinfo.mod
+@COND_i386_multiboot_TRUE@am__append_7114 = zfsinfo.marker
+@COND_i386_ieee1275_TRUE@am__append_7115 = zfsinfo.module
+@COND_i386_ieee1275_TRUE@am__append_7116 = zfsinfo.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7117 =
+@COND_i386_ieee1275_TRUE@am__append_7118 = $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7119 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ zfsinfo.marker
+@COND_i386_ieee1275_TRUE@am__append_7120 = zfsinfo.mod
+@COND_i386_ieee1275_TRUE@am__append_7121 = zfsinfo.marker
+@COND_x86_64_efi_TRUE@am__append_7122 = zfsinfo.module
+@COND_x86_64_efi_TRUE@am__append_7123 = zfsinfo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7124 =
+@COND_x86_64_efi_TRUE@am__append_7125 = $(nodist_zfsinfo_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7126 = \
+@COND_x86_64_efi_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ zfsinfo.marker
+@COND_x86_64_efi_TRUE@am__append_7127 = zfsinfo.mod
+@COND_x86_64_efi_TRUE@am__append_7128 = zfsinfo.marker
+@COND_mips_yeeloong_TRUE@am__append_7129 = zfsinfo.module
+@COND_mips_yeeloong_TRUE@am__append_7130 = zfsinfo.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7131 =
+@COND_mips_yeeloong_TRUE@am__append_7132 = $(nodist_zfsinfo_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7133 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ zfsinfo.marker
+@COND_mips_yeeloong_TRUE@am__append_7134 = zfsinfo.mod
+@COND_mips_yeeloong_TRUE@am__append_7135 = zfsinfo.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7136 = zfsinfo.module
+@COND_sparc64_ieee1275_TRUE@am__append_7137 = zfsinfo.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7138 =
+@COND_sparc64_ieee1275_TRUE@am__append_7139 = $(nodist_zfsinfo_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7140 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ zfsinfo.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7141 = zfsinfo.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7142 = zfsinfo.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7143 = zfsinfo.module
+@COND_powerpc_ieee1275_TRUE@am__append_7144 = zfsinfo.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7145 =
+@COND_powerpc_ieee1275_TRUE@am__append_7146 = $(nodist_zfsinfo_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7147 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_zfsinfo_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ zfsinfo.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7148 = zfsinfo.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7149 = zfsinfo.marker
+@COND_i386_pc_TRUE@am__append_7150 = pxe.module
+@COND_i386_pc_TRUE@am__append_7151 = pxe.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7152 =
+@COND_i386_pc_TRUE@am__append_7153 = $(nodist_pxe_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7154 = $(nodist_pxe_module_SOURCES) \
+@COND_i386_pc_TRUE@ pxe.marker
+@COND_i386_pc_TRUE@am__append_7155 = pxe.mod
+@COND_i386_pc_TRUE@am__append_7156 = pxe.marker
+@COND_emu_TRUE@am__append_7157 = gettext.module
+@COND_emu_TRUE@am__append_7158 = gettext.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7159 =
+@COND_emu_TRUE@am__append_7160 = $(nodist_gettext_module_SOURCES)
+@COND_emu_TRUE@am__append_7161 = $(nodist_gettext_module_SOURCES) \
+@COND_emu_TRUE@ gettext.marker
+@COND_emu_TRUE@am__append_7162 = gettext.mod
+@COND_emu_TRUE@am__append_7163 = gettext.marker
+@COND_i386_pc_TRUE@am__append_7164 = gettext.module
+@COND_i386_pc_TRUE@am__append_7165 = gettext.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7166 =
+@COND_i386_pc_TRUE@am__append_7167 = $(nodist_gettext_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7168 = $(nodist_gettext_module_SOURCES) \
+@COND_i386_pc_TRUE@ gettext.marker
+@COND_i386_pc_TRUE@am__append_7169 = gettext.mod
+@COND_i386_pc_TRUE@am__append_7170 = gettext.marker
+@COND_i386_efi_TRUE@am__append_7171 = gettext.module
+@COND_i386_efi_TRUE@am__append_7172 = gettext.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7173 =
+@COND_i386_efi_TRUE@am__append_7174 = $(nodist_gettext_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7175 = \
+@COND_i386_efi_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_i386_efi_TRUE@ gettext.marker
+@COND_i386_efi_TRUE@am__append_7176 = gettext.mod
+@COND_i386_efi_TRUE@am__append_7177 = gettext.marker
+@COND_i386_qemu_TRUE@am__append_7178 = gettext.module
+@COND_i386_qemu_TRUE@am__append_7179 = gettext.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7180 =
+@COND_i386_qemu_TRUE@am__append_7181 = $(nodist_gettext_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7182 = \
+@COND_i386_qemu_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gettext.marker
+@COND_i386_qemu_TRUE@am__append_7183 = gettext.mod
+@COND_i386_qemu_TRUE@am__append_7184 = gettext.marker
+@COND_i386_coreboot_TRUE@am__append_7185 = gettext.module
+@COND_i386_coreboot_TRUE@am__append_7186 = gettext.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7187 =
+@COND_i386_coreboot_TRUE@am__append_7188 = $(nodist_gettext_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7189 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gettext.marker
+@COND_i386_coreboot_TRUE@am__append_7190 = gettext.mod
+@COND_i386_coreboot_TRUE@am__append_7191 = gettext.marker
+@COND_i386_multiboot_TRUE@am__append_7192 = gettext.module
+@COND_i386_multiboot_TRUE@am__append_7193 = gettext.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7194 =
+@COND_i386_multiboot_TRUE@am__append_7195 = $(nodist_gettext_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7196 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gettext.marker
+@COND_i386_multiboot_TRUE@am__append_7197 = gettext.mod
+@COND_i386_multiboot_TRUE@am__append_7198 = gettext.marker
+@COND_i386_ieee1275_TRUE@am__append_7199 = gettext.module
+@COND_i386_ieee1275_TRUE@am__append_7200 = gettext.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7201 =
+@COND_i386_ieee1275_TRUE@am__append_7202 = $(nodist_gettext_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7203 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gettext.marker
+@COND_i386_ieee1275_TRUE@am__append_7204 = gettext.mod
+@COND_i386_ieee1275_TRUE@am__append_7205 = gettext.marker
+@COND_x86_64_efi_TRUE@am__append_7206 = gettext.module
+@COND_x86_64_efi_TRUE@am__append_7207 = gettext.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7208 =
+@COND_x86_64_efi_TRUE@am__append_7209 = $(nodist_gettext_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7210 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gettext.marker
+@COND_x86_64_efi_TRUE@am__append_7211 = gettext.mod
+@COND_x86_64_efi_TRUE@am__append_7212 = gettext.marker
+@COND_mips_yeeloong_TRUE@am__append_7213 = gettext.module
+@COND_mips_yeeloong_TRUE@am__append_7214 = gettext.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7215 =
+@COND_mips_yeeloong_TRUE@am__append_7216 = $(nodist_gettext_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7217 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gettext.marker
+@COND_mips_yeeloong_TRUE@am__append_7218 = gettext.mod
+@COND_mips_yeeloong_TRUE@am__append_7219 = gettext.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7220 = gettext.module
+@COND_sparc64_ieee1275_TRUE@am__append_7221 = gettext.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7222 =
+@COND_sparc64_ieee1275_TRUE@am__append_7223 = $(nodist_gettext_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7224 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gettext.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7225 = gettext.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7226 = gettext.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7227 = gettext.module
+@COND_powerpc_ieee1275_TRUE@am__append_7228 = gettext.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7229 =
+@COND_powerpc_ieee1275_TRUE@am__append_7230 = $(nodist_gettext_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7231 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gettext_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gettext.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7232 = gettext.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7233 = gettext.marker
+@COND_emu_TRUE@am__append_7234 = gfxmenu.module
+@COND_emu_TRUE@am__append_7235 = gfxmenu.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7236 =
+@COND_emu_TRUE@am__append_7237 = $(nodist_gfxmenu_module_SOURCES)
+@COND_emu_TRUE@am__append_7238 = $(nodist_gfxmenu_module_SOURCES) \
+@COND_emu_TRUE@ gfxmenu.marker
+@COND_emu_TRUE@am__append_7239 = gfxmenu.mod
+@COND_emu_TRUE@am__append_7240 = gfxmenu.marker
+@COND_i386_pc_TRUE@am__append_7241 = gfxmenu.module
+@COND_i386_pc_TRUE@am__append_7242 = gfxmenu.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7243 =
+@COND_i386_pc_TRUE@am__append_7244 = $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7245 = $(nodist_gfxmenu_module_SOURCES) \
+@COND_i386_pc_TRUE@ gfxmenu.marker
+@COND_i386_pc_TRUE@am__append_7246 = gfxmenu.mod
+@COND_i386_pc_TRUE@am__append_7247 = gfxmenu.marker
+@COND_i386_efi_TRUE@am__append_7248 = gfxmenu.module
+@COND_i386_efi_TRUE@am__append_7249 = gfxmenu.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7250 =
+@COND_i386_efi_TRUE@am__append_7251 = $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7252 = \
+@COND_i386_efi_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_i386_efi_TRUE@ gfxmenu.marker
+@COND_i386_efi_TRUE@am__append_7253 = gfxmenu.mod
+@COND_i386_efi_TRUE@am__append_7254 = gfxmenu.marker
+@COND_i386_qemu_TRUE@am__append_7255 = gfxmenu.module
+@COND_i386_qemu_TRUE@am__append_7256 = gfxmenu.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7257 =
+@COND_i386_qemu_TRUE@am__append_7258 = $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7259 = \
+@COND_i386_qemu_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gfxmenu.marker
+@COND_i386_qemu_TRUE@am__append_7260 = gfxmenu.mod
+@COND_i386_qemu_TRUE@am__append_7261 = gfxmenu.marker
+@COND_i386_coreboot_TRUE@am__append_7262 = gfxmenu.module
+@COND_i386_coreboot_TRUE@am__append_7263 = gfxmenu.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7264 =
+@COND_i386_coreboot_TRUE@am__append_7265 = $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7266 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gfxmenu.marker
+@COND_i386_coreboot_TRUE@am__append_7267 = gfxmenu.mod
+@COND_i386_coreboot_TRUE@am__append_7268 = gfxmenu.marker
+@COND_i386_multiboot_TRUE@am__append_7269 = gfxmenu.module
+@COND_i386_multiboot_TRUE@am__append_7270 = gfxmenu.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7271 =
+@COND_i386_multiboot_TRUE@am__append_7272 = $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7273 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gfxmenu.marker
+@COND_i386_multiboot_TRUE@am__append_7274 = gfxmenu.mod
+@COND_i386_multiboot_TRUE@am__append_7275 = gfxmenu.marker
+@COND_i386_ieee1275_TRUE@am__append_7276 = gfxmenu.module
+@COND_i386_ieee1275_TRUE@am__append_7277 = gfxmenu.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7278 =
+@COND_i386_ieee1275_TRUE@am__append_7279 = $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7280 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gfxmenu.marker
+@COND_i386_ieee1275_TRUE@am__append_7281 = gfxmenu.mod
+@COND_i386_ieee1275_TRUE@am__append_7282 = gfxmenu.marker
+@COND_x86_64_efi_TRUE@am__append_7283 = gfxmenu.module
+@COND_x86_64_efi_TRUE@am__append_7284 = gfxmenu.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7285 =
+@COND_x86_64_efi_TRUE@am__append_7286 = $(nodist_gfxmenu_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7287 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gfxmenu.marker
+@COND_x86_64_efi_TRUE@am__append_7288 = gfxmenu.mod
+@COND_x86_64_efi_TRUE@am__append_7289 = gfxmenu.marker
+@COND_mips_yeeloong_TRUE@am__append_7290 = gfxmenu.module
+@COND_mips_yeeloong_TRUE@am__append_7291 = gfxmenu.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7292 =
+@COND_mips_yeeloong_TRUE@am__append_7293 = $(nodist_gfxmenu_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7294 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gfxmenu.marker
+@COND_mips_yeeloong_TRUE@am__append_7295 = gfxmenu.mod
+@COND_mips_yeeloong_TRUE@am__append_7296 = gfxmenu.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7297 = gfxmenu.module
+@COND_sparc64_ieee1275_TRUE@am__append_7298 = gfxmenu.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7299 =
+@COND_sparc64_ieee1275_TRUE@am__append_7300 = $(nodist_gfxmenu_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7301 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gfxmenu.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7302 = gfxmenu.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7303 = gfxmenu.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7304 = gfxmenu.module
+@COND_powerpc_ieee1275_TRUE@am__append_7305 = gfxmenu.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7306 =
+@COND_powerpc_ieee1275_TRUE@am__append_7307 = $(nodist_gfxmenu_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7308 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gfxmenu_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gfxmenu.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7309 = gfxmenu.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7310 = gfxmenu.marker
+@COND_emu_TRUE@am__append_7311 = hello.module
+@COND_emu_TRUE@am__append_7312 = hello.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7313 =
+@COND_emu_TRUE@am__append_7314 = $(nodist_hello_module_SOURCES)
+@COND_emu_TRUE@am__append_7315 = $(nodist_hello_module_SOURCES) \
+@COND_emu_TRUE@ hello.marker
+@COND_emu_TRUE@am__append_7316 = hello.mod
+@COND_emu_TRUE@am__append_7317 = hello.marker
+@COND_i386_pc_TRUE@am__append_7318 = hello.module
+@COND_i386_pc_TRUE@am__append_7319 = hello.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7320 =
+@COND_i386_pc_TRUE@am__append_7321 = $(nodist_hello_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7322 = $(nodist_hello_module_SOURCES) \
+@COND_i386_pc_TRUE@ hello.marker
+@COND_i386_pc_TRUE@am__append_7323 = hello.mod
+@COND_i386_pc_TRUE@am__append_7324 = hello.marker
+@COND_i386_efi_TRUE@am__append_7325 = hello.module
+@COND_i386_efi_TRUE@am__append_7326 = hello.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7327 =
+@COND_i386_efi_TRUE@am__append_7328 = $(nodist_hello_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7329 = $(nodist_hello_module_SOURCES) \
+@COND_i386_efi_TRUE@ hello.marker
+@COND_i386_efi_TRUE@am__append_7330 = hello.mod
+@COND_i386_efi_TRUE@am__append_7331 = hello.marker
+@COND_i386_qemu_TRUE@am__append_7332 = hello.module
+@COND_i386_qemu_TRUE@am__append_7333 = hello.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7334 =
+@COND_i386_qemu_TRUE@am__append_7335 = $(nodist_hello_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7336 = $(nodist_hello_module_SOURCES) \
+@COND_i386_qemu_TRUE@ hello.marker
+@COND_i386_qemu_TRUE@am__append_7337 = hello.mod
+@COND_i386_qemu_TRUE@am__append_7338 = hello.marker
+@COND_i386_coreboot_TRUE@am__append_7339 = hello.module
+@COND_i386_coreboot_TRUE@am__append_7340 = hello.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7341 =
+@COND_i386_coreboot_TRUE@am__append_7342 = $(nodist_hello_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7343 = \
+@COND_i386_coreboot_TRUE@ $(nodist_hello_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ hello.marker
+@COND_i386_coreboot_TRUE@am__append_7344 = hello.mod
+@COND_i386_coreboot_TRUE@am__append_7345 = hello.marker
+@COND_i386_multiboot_TRUE@am__append_7346 = hello.module
+@COND_i386_multiboot_TRUE@am__append_7347 = hello.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7348 =
+@COND_i386_multiboot_TRUE@am__append_7349 = $(nodist_hello_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7350 = \
+@COND_i386_multiboot_TRUE@ $(nodist_hello_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ hello.marker
+@COND_i386_multiboot_TRUE@am__append_7351 = hello.mod
+@COND_i386_multiboot_TRUE@am__append_7352 = hello.marker
+@COND_i386_ieee1275_TRUE@am__append_7353 = hello.module
+@COND_i386_ieee1275_TRUE@am__append_7354 = hello.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7355 =
+@COND_i386_ieee1275_TRUE@am__append_7356 = $(nodist_hello_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7357 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_hello_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ hello.marker
+@COND_i386_ieee1275_TRUE@am__append_7358 = hello.mod
+@COND_i386_ieee1275_TRUE@am__append_7359 = hello.marker
+@COND_x86_64_efi_TRUE@am__append_7360 = hello.module
+@COND_x86_64_efi_TRUE@am__append_7361 = hello.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7362 =
+@COND_x86_64_efi_TRUE@am__append_7363 = $(nodist_hello_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7364 = \
+@COND_x86_64_efi_TRUE@ $(nodist_hello_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ hello.marker
+@COND_x86_64_efi_TRUE@am__append_7365 = hello.mod
+@COND_x86_64_efi_TRUE@am__append_7366 = hello.marker
+@COND_mips_yeeloong_TRUE@am__append_7367 = hello.module
+@COND_mips_yeeloong_TRUE@am__append_7368 = hello.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7369 =
+@COND_mips_yeeloong_TRUE@am__append_7370 = $(nodist_hello_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7371 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_hello_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ hello.marker
+@COND_mips_yeeloong_TRUE@am__append_7372 = hello.mod
+@COND_mips_yeeloong_TRUE@am__append_7373 = hello.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7374 = hello.module
+@COND_sparc64_ieee1275_TRUE@am__append_7375 = hello.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7376 =
+@COND_sparc64_ieee1275_TRUE@am__append_7377 = $(nodist_hello_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7378 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_hello_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ hello.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7379 = hello.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7380 = hello.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7381 = hello.module
+@COND_powerpc_ieee1275_TRUE@am__append_7382 = hello.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7383 =
+@COND_powerpc_ieee1275_TRUE@am__append_7384 = $(nodist_hello_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7385 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_hello_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ hello.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7386 = hello.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7387 = hello.marker
+@COND_emu_TRUE@am__append_7388 = gzio.module
+@COND_emu_TRUE@am__append_7389 = gzio.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7390 =
+@COND_emu_TRUE@am__append_7391 = $(nodist_gzio_module_SOURCES)
+@COND_emu_TRUE@am__append_7392 = $(nodist_gzio_module_SOURCES) \
+@COND_emu_TRUE@ gzio.marker
+@COND_emu_TRUE@am__append_7393 = gzio.mod
+@COND_emu_TRUE@am__append_7394 = gzio.marker
+@COND_i386_pc_TRUE@am__append_7395 = gzio.module
+@COND_i386_pc_TRUE@am__append_7396 = gzio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7397 =
+@COND_i386_pc_TRUE@am__append_7398 = $(nodist_gzio_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7399 = $(nodist_gzio_module_SOURCES) \
+@COND_i386_pc_TRUE@ gzio.marker
+@COND_i386_pc_TRUE@am__append_7400 = gzio.mod
+@COND_i386_pc_TRUE@am__append_7401 = gzio.marker
+@COND_i386_efi_TRUE@am__append_7402 = gzio.module
+@COND_i386_efi_TRUE@am__append_7403 = gzio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7404 =
+@COND_i386_efi_TRUE@am__append_7405 = $(nodist_gzio_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7406 = $(nodist_gzio_module_SOURCES) \
+@COND_i386_efi_TRUE@ gzio.marker
+@COND_i386_efi_TRUE@am__append_7407 = gzio.mod
+@COND_i386_efi_TRUE@am__append_7408 = gzio.marker
+@COND_i386_qemu_TRUE@am__append_7409 = gzio.module
+@COND_i386_qemu_TRUE@am__append_7410 = gzio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7411 =
+@COND_i386_qemu_TRUE@am__append_7412 = $(nodist_gzio_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7413 = $(nodist_gzio_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gzio.marker
+@COND_i386_qemu_TRUE@am__append_7414 = gzio.mod
+@COND_i386_qemu_TRUE@am__append_7415 = gzio.marker
+@COND_i386_coreboot_TRUE@am__append_7416 = gzio.module
+@COND_i386_coreboot_TRUE@am__append_7417 = gzio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7418 =
+@COND_i386_coreboot_TRUE@am__append_7419 = $(nodist_gzio_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7420 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gzio_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gzio.marker
+@COND_i386_coreboot_TRUE@am__append_7421 = gzio.mod
+@COND_i386_coreboot_TRUE@am__append_7422 = gzio.marker
+@COND_i386_multiboot_TRUE@am__append_7423 = gzio.module
+@COND_i386_multiboot_TRUE@am__append_7424 = gzio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7425 =
+@COND_i386_multiboot_TRUE@am__append_7426 = $(nodist_gzio_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7427 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gzio_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gzio.marker
+@COND_i386_multiboot_TRUE@am__append_7428 = gzio.mod
+@COND_i386_multiboot_TRUE@am__append_7429 = gzio.marker
+@COND_i386_ieee1275_TRUE@am__append_7430 = gzio.module
+@COND_i386_ieee1275_TRUE@am__append_7431 = gzio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7432 =
+@COND_i386_ieee1275_TRUE@am__append_7433 = $(nodist_gzio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7434 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gzio_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gzio.marker
+@COND_i386_ieee1275_TRUE@am__append_7435 = gzio.mod
+@COND_i386_ieee1275_TRUE@am__append_7436 = gzio.marker
+@COND_x86_64_efi_TRUE@am__append_7437 = gzio.module
+@COND_x86_64_efi_TRUE@am__append_7438 = gzio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7439 =
+@COND_x86_64_efi_TRUE@am__append_7440 = $(nodist_gzio_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7441 = $(nodist_gzio_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gzio.marker
+@COND_x86_64_efi_TRUE@am__append_7442 = gzio.mod
+@COND_x86_64_efi_TRUE@am__append_7443 = gzio.marker
+@COND_mips_yeeloong_TRUE@am__append_7444 = gzio.module
+@COND_mips_yeeloong_TRUE@am__append_7445 = gzio.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7446 =
+@COND_mips_yeeloong_TRUE@am__append_7447 = $(nodist_gzio_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7448 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gzio_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gzio.marker
+@COND_mips_yeeloong_TRUE@am__append_7449 = gzio.mod
+@COND_mips_yeeloong_TRUE@am__append_7450 = gzio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7451 = gzio.module
+@COND_sparc64_ieee1275_TRUE@am__append_7452 = gzio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7453 =
+@COND_sparc64_ieee1275_TRUE@am__append_7454 = $(nodist_gzio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7455 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gzio_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gzio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7456 = gzio.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7457 = gzio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7458 = gzio.module
+@COND_powerpc_ieee1275_TRUE@am__append_7459 = gzio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7460 =
+@COND_powerpc_ieee1275_TRUE@am__append_7461 = $(nodist_gzio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7462 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gzio_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gzio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7463 = gzio.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7464 = gzio.marker
+@COND_emu_TRUE@am__append_7465 = bufio.module
+@COND_emu_TRUE@am__append_7466 = bufio.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7467 =
+@COND_emu_TRUE@am__append_7468 = $(nodist_bufio_module_SOURCES)
+@COND_emu_TRUE@am__append_7469 = $(nodist_bufio_module_SOURCES) \
+@COND_emu_TRUE@ bufio.marker
+@COND_emu_TRUE@am__append_7470 = bufio.mod
+@COND_emu_TRUE@am__append_7471 = bufio.marker
+@COND_i386_pc_TRUE@am__append_7472 = bufio.module
+@COND_i386_pc_TRUE@am__append_7473 = bufio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7474 =
+@COND_i386_pc_TRUE@am__append_7475 = $(nodist_bufio_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7476 = $(nodist_bufio_module_SOURCES) \
+@COND_i386_pc_TRUE@ bufio.marker
+@COND_i386_pc_TRUE@am__append_7477 = bufio.mod
+@COND_i386_pc_TRUE@am__append_7478 = bufio.marker
+@COND_i386_efi_TRUE@am__append_7479 = bufio.module
+@COND_i386_efi_TRUE@am__append_7480 = bufio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7481 =
+@COND_i386_efi_TRUE@am__append_7482 = $(nodist_bufio_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7483 = $(nodist_bufio_module_SOURCES) \
+@COND_i386_efi_TRUE@ bufio.marker
+@COND_i386_efi_TRUE@am__append_7484 = bufio.mod
+@COND_i386_efi_TRUE@am__append_7485 = bufio.marker
+@COND_i386_qemu_TRUE@am__append_7486 = bufio.module
+@COND_i386_qemu_TRUE@am__append_7487 = bufio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7488 =
+@COND_i386_qemu_TRUE@am__append_7489 = $(nodist_bufio_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7490 = $(nodist_bufio_module_SOURCES) \
+@COND_i386_qemu_TRUE@ bufio.marker
+@COND_i386_qemu_TRUE@am__append_7491 = bufio.mod
+@COND_i386_qemu_TRUE@am__append_7492 = bufio.marker
+@COND_i386_coreboot_TRUE@am__append_7493 = bufio.module
+@COND_i386_coreboot_TRUE@am__append_7494 = bufio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7495 =
+@COND_i386_coreboot_TRUE@am__append_7496 = $(nodist_bufio_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7497 = \
+@COND_i386_coreboot_TRUE@ $(nodist_bufio_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ bufio.marker
+@COND_i386_coreboot_TRUE@am__append_7498 = bufio.mod
+@COND_i386_coreboot_TRUE@am__append_7499 = bufio.marker
+@COND_i386_multiboot_TRUE@am__append_7500 = bufio.module
+@COND_i386_multiboot_TRUE@am__append_7501 = bufio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7502 =
+@COND_i386_multiboot_TRUE@am__append_7503 = $(nodist_bufio_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7504 = \
+@COND_i386_multiboot_TRUE@ $(nodist_bufio_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ bufio.marker
+@COND_i386_multiboot_TRUE@am__append_7505 = bufio.mod
+@COND_i386_multiboot_TRUE@am__append_7506 = bufio.marker
+@COND_i386_ieee1275_TRUE@am__append_7507 = bufio.module
+@COND_i386_ieee1275_TRUE@am__append_7508 = bufio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7509 =
+@COND_i386_ieee1275_TRUE@am__append_7510 = $(nodist_bufio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7511 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_bufio_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ bufio.marker
+@COND_i386_ieee1275_TRUE@am__append_7512 = bufio.mod
+@COND_i386_ieee1275_TRUE@am__append_7513 = bufio.marker
+@COND_x86_64_efi_TRUE@am__append_7514 = bufio.module
+@COND_x86_64_efi_TRUE@am__append_7515 = bufio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7516 =
+@COND_x86_64_efi_TRUE@am__append_7517 = $(nodist_bufio_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7518 = \
+@COND_x86_64_efi_TRUE@ $(nodist_bufio_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ bufio.marker
+@COND_x86_64_efi_TRUE@am__append_7519 = bufio.mod
+@COND_x86_64_efi_TRUE@am__append_7520 = bufio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7521 = bufio.module
+@COND_sparc64_ieee1275_TRUE@am__append_7522 = bufio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7523 =
+@COND_sparc64_ieee1275_TRUE@am__append_7524 = $(nodist_bufio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7525 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_bufio_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ bufio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7526 = bufio.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7527 = bufio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7528 = bufio.module
+@COND_powerpc_ieee1275_TRUE@am__append_7529 = bufio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7530 =
+@COND_powerpc_ieee1275_TRUE@am__append_7531 = $(nodist_bufio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7532 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_bufio_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ bufio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7533 = bufio.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7534 = bufio.marker
+@COND_emu_TRUE@am__append_7535 = elf.module
+@COND_emu_TRUE@am__append_7536 = elf.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7537 =
+@COND_emu_TRUE@am__append_7538 = $(nodist_elf_module_SOURCES)
+@COND_emu_TRUE@am__append_7539 = $(nodist_elf_module_SOURCES) \
+@COND_emu_TRUE@ elf.marker
+@COND_emu_TRUE@am__append_7540 = elf.mod
+@COND_emu_TRUE@am__append_7541 = elf.marker
+@COND_i386_pc_TRUE@am__append_7542 = elf.module
+@COND_i386_pc_TRUE@am__append_7543 = elf.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7544 =
+@COND_i386_pc_TRUE@am__append_7545 = $(nodist_elf_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7546 = $(nodist_elf_module_SOURCES) \
+@COND_i386_pc_TRUE@ elf.marker
+@COND_i386_pc_TRUE@am__append_7547 = elf.mod
+@COND_i386_pc_TRUE@am__append_7548 = elf.marker
+@COND_i386_efi_TRUE@am__append_7549 = elf.module
+@COND_i386_efi_TRUE@am__append_7550 = elf.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7551 =
+@COND_i386_efi_TRUE@am__append_7552 = $(nodist_elf_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7553 = $(nodist_elf_module_SOURCES) \
+@COND_i386_efi_TRUE@ elf.marker
+@COND_i386_efi_TRUE@am__append_7554 = elf.mod
+@COND_i386_efi_TRUE@am__append_7555 = elf.marker
+@COND_i386_qemu_TRUE@am__append_7556 = elf.module
+@COND_i386_qemu_TRUE@am__append_7557 = elf.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7558 =
+@COND_i386_qemu_TRUE@am__append_7559 = $(nodist_elf_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7560 = $(nodist_elf_module_SOURCES) \
+@COND_i386_qemu_TRUE@ elf.marker
+@COND_i386_qemu_TRUE@am__append_7561 = elf.mod
+@COND_i386_qemu_TRUE@am__append_7562 = elf.marker
+@COND_i386_coreboot_TRUE@am__append_7563 = elf.module
+@COND_i386_coreboot_TRUE@am__append_7564 = elf.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7565 =
+@COND_i386_coreboot_TRUE@am__append_7566 = $(nodist_elf_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7567 = \
+@COND_i386_coreboot_TRUE@ $(nodist_elf_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ elf.marker
+@COND_i386_coreboot_TRUE@am__append_7568 = elf.mod
+@COND_i386_coreboot_TRUE@am__append_7569 = elf.marker
+@COND_i386_multiboot_TRUE@am__append_7570 = elf.module
+@COND_i386_multiboot_TRUE@am__append_7571 = elf.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7572 =
+@COND_i386_multiboot_TRUE@am__append_7573 = $(nodist_elf_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7574 = \
+@COND_i386_multiboot_TRUE@ $(nodist_elf_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ elf.marker
+@COND_i386_multiboot_TRUE@am__append_7575 = elf.mod
+@COND_i386_multiboot_TRUE@am__append_7576 = elf.marker
+@COND_i386_ieee1275_TRUE@am__append_7577 = elf.module
+@COND_i386_ieee1275_TRUE@am__append_7578 = elf.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7579 =
+@COND_i386_ieee1275_TRUE@am__append_7580 = $(nodist_elf_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7581 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_elf_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ elf.marker
+@COND_i386_ieee1275_TRUE@am__append_7582 = elf.mod
+@COND_i386_ieee1275_TRUE@am__append_7583 = elf.marker
+@COND_x86_64_efi_TRUE@am__append_7584 = elf.module
+@COND_x86_64_efi_TRUE@am__append_7585 = elf.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7586 =
+@COND_x86_64_efi_TRUE@am__append_7587 = $(nodist_elf_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7588 = $(nodist_elf_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ elf.marker
+@COND_x86_64_efi_TRUE@am__append_7589 = elf.mod
+@COND_x86_64_efi_TRUE@am__append_7590 = elf.marker
+@COND_mips_yeeloong_TRUE@am__append_7591 = elf.module
+@COND_mips_yeeloong_TRUE@am__append_7592 = elf.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7593 =
+@COND_mips_yeeloong_TRUE@am__append_7594 = $(nodist_elf_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7595 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_elf_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ elf.marker
+@COND_mips_yeeloong_TRUE@am__append_7596 = elf.mod
+@COND_mips_yeeloong_TRUE@am__append_7597 = elf.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7598 = elf.module
+@COND_sparc64_ieee1275_TRUE@am__append_7599 = elf.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7600 =
+@COND_sparc64_ieee1275_TRUE@am__append_7601 = $(nodist_elf_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7602 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_elf_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ elf.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7603 = elf.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7604 = elf.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7605 = elf.module
+@COND_powerpc_ieee1275_TRUE@am__append_7606 = elf.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7607 =
+@COND_powerpc_ieee1275_TRUE@am__append_7608 = $(nodist_elf_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7609 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_elf_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ elf.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7610 = elf.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7611 = elf.marker
+@COND_emu_TRUE@am__append_7612 = crypto.module
+@COND_emu_TRUE@am__append_7613 = crypto.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7614 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_emu_TRUE@am__append_7615 = $(nodist_crypto_module_SOURCES)
+@COND_emu_TRUE@am__append_7616 = $(nodist_crypto_module_SOURCES) \
+@COND_emu_TRUE@ crypto.marker
+@COND_emu_TRUE@am__append_7617 = crypto.mod
+@COND_emu_TRUE@am__append_7618 = crypto.marker
+@COND_i386_pc_TRUE@am__append_7619 = crypto.module
+@COND_i386_pc_TRUE@am__append_7620 = crypto.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7621 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_i386_pc_TRUE@am__append_7622 = $(nodist_crypto_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7623 = $(nodist_crypto_module_SOURCES) \
+@COND_i386_pc_TRUE@ crypto.marker
+@COND_i386_pc_TRUE@am__append_7624 = crypto.mod
+@COND_i386_pc_TRUE@am__append_7625 = crypto.marker
+@COND_i386_efi_TRUE@am__append_7626 = crypto.module
+@COND_i386_efi_TRUE@am__append_7627 = crypto.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7628 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_i386_efi_TRUE@am__append_7629 = $(nodist_crypto_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7630 = $(nodist_crypto_module_SOURCES) \
+@COND_i386_efi_TRUE@ crypto.marker
+@COND_i386_efi_TRUE@am__append_7631 = crypto.mod
+@COND_i386_efi_TRUE@am__append_7632 = crypto.marker
+@COND_i386_qemu_TRUE@am__append_7633 = crypto.module
+@COND_i386_qemu_TRUE@am__append_7634 = crypto.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7635 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_i386_qemu_TRUE@am__append_7636 = $(nodist_crypto_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7637 = \
+@COND_i386_qemu_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_i386_qemu_TRUE@ crypto.marker
+@COND_i386_qemu_TRUE@am__append_7638 = crypto.mod
+@COND_i386_qemu_TRUE@am__append_7639 = crypto.marker
+@COND_i386_coreboot_TRUE@am__append_7640 = crypto.module
+@COND_i386_coreboot_TRUE@am__append_7641 = crypto.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7642 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_i386_coreboot_TRUE@am__append_7643 = $(nodist_crypto_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7644 = \
+@COND_i386_coreboot_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ crypto.marker
+@COND_i386_coreboot_TRUE@am__append_7645 = crypto.mod
+@COND_i386_coreboot_TRUE@am__append_7646 = crypto.marker
+@COND_i386_multiboot_TRUE@am__append_7647 = crypto.module
+@COND_i386_multiboot_TRUE@am__append_7648 = crypto.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7649 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_i386_multiboot_TRUE@am__append_7650 = $(nodist_crypto_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7651 = \
+@COND_i386_multiboot_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ crypto.marker
+@COND_i386_multiboot_TRUE@am__append_7652 = crypto.mod
+@COND_i386_multiboot_TRUE@am__append_7653 = crypto.marker
+@COND_i386_ieee1275_TRUE@am__append_7654 = crypto.module
+@COND_i386_ieee1275_TRUE@am__append_7655 = crypto.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7656 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_i386_ieee1275_TRUE@am__append_7657 = $(nodist_crypto_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7658 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ crypto.marker
+@COND_i386_ieee1275_TRUE@am__append_7659 = crypto.mod
+@COND_i386_ieee1275_TRUE@am__append_7660 = crypto.marker
+@COND_x86_64_efi_TRUE@am__append_7661 = crypto.module
+@COND_x86_64_efi_TRUE@am__append_7662 = crypto.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7663 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_x86_64_efi_TRUE@am__append_7664 = $(nodist_crypto_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7665 = \
+@COND_x86_64_efi_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ crypto.marker
+@COND_x86_64_efi_TRUE@am__append_7666 = crypto.mod
+@COND_x86_64_efi_TRUE@am__append_7667 = crypto.marker
+@COND_mips_yeeloong_TRUE@am__append_7668 = crypto.module
+@COND_mips_yeeloong_TRUE@am__append_7669 = crypto.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7670 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_mips_yeeloong_TRUE@am__append_7671 = $(nodist_crypto_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7672 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ crypto.marker
+@COND_mips_yeeloong_TRUE@am__append_7673 = crypto.mod
+@COND_mips_yeeloong_TRUE@am__append_7674 = crypto.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7675 = crypto.module
+@COND_sparc64_ieee1275_TRUE@am__append_7676 = crypto.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7677 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_sparc64_ieee1275_TRUE@am__append_7678 = $(nodist_crypto_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7679 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ crypto.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7680 = crypto.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7681 = crypto.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7682 = crypto.module
+@COND_powerpc_ieee1275_TRUE@am__append_7683 = crypto.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7684 = lib/libgcrypt-grub/cipher/crypto.lst
+@COND_powerpc_ieee1275_TRUE@am__append_7685 = $(nodist_crypto_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7686 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_crypto_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ crypto.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7687 = crypto.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7688 = crypto.marker
+@COND_emu_TRUE@am__append_7689 = pbkdf2.module
+@COND_emu_TRUE@am__append_7690 = pbkdf2.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7691 =
+@COND_emu_TRUE@am__append_7692 = $(nodist_pbkdf2_module_SOURCES)
+@COND_emu_TRUE@am__append_7693 = $(nodist_pbkdf2_module_SOURCES) \
+@COND_emu_TRUE@ pbkdf2.marker
+@COND_emu_TRUE@am__append_7694 = pbkdf2.mod
+@COND_emu_TRUE@am__append_7695 = pbkdf2.marker
+@COND_i386_pc_TRUE@am__append_7696 = pbkdf2.module
+@COND_i386_pc_TRUE@am__append_7697 = pbkdf2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7698 =
+@COND_i386_pc_TRUE@am__append_7699 = $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7700 = $(nodist_pbkdf2_module_SOURCES) \
+@COND_i386_pc_TRUE@ pbkdf2.marker
+@COND_i386_pc_TRUE@am__append_7701 = pbkdf2.mod
+@COND_i386_pc_TRUE@am__append_7702 = pbkdf2.marker
+@COND_i386_efi_TRUE@am__append_7703 = pbkdf2.module
+@COND_i386_efi_TRUE@am__append_7704 = pbkdf2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7705 =
+@COND_i386_efi_TRUE@am__append_7706 = $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7707 = $(nodist_pbkdf2_module_SOURCES) \
+@COND_i386_efi_TRUE@ pbkdf2.marker
+@COND_i386_efi_TRUE@am__append_7708 = pbkdf2.mod
+@COND_i386_efi_TRUE@am__append_7709 = pbkdf2.marker
+@COND_i386_qemu_TRUE@am__append_7710 = pbkdf2.module
+@COND_i386_qemu_TRUE@am__append_7711 = pbkdf2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7712 =
+@COND_i386_qemu_TRUE@am__append_7713 = $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7714 = \
+@COND_i386_qemu_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_i386_qemu_TRUE@ pbkdf2.marker
+@COND_i386_qemu_TRUE@am__append_7715 = pbkdf2.mod
+@COND_i386_qemu_TRUE@am__append_7716 = pbkdf2.marker
+@COND_i386_coreboot_TRUE@am__append_7717 = pbkdf2.module
+@COND_i386_coreboot_TRUE@am__append_7718 = pbkdf2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7719 =
+@COND_i386_coreboot_TRUE@am__append_7720 = $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7721 = \
+@COND_i386_coreboot_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ pbkdf2.marker
+@COND_i386_coreboot_TRUE@am__append_7722 = pbkdf2.mod
+@COND_i386_coreboot_TRUE@am__append_7723 = pbkdf2.marker
+@COND_i386_multiboot_TRUE@am__append_7724 = pbkdf2.module
+@COND_i386_multiboot_TRUE@am__append_7725 = pbkdf2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7726 =
+@COND_i386_multiboot_TRUE@am__append_7727 = $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7728 = \
+@COND_i386_multiboot_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ pbkdf2.marker
+@COND_i386_multiboot_TRUE@am__append_7729 = pbkdf2.mod
+@COND_i386_multiboot_TRUE@am__append_7730 = pbkdf2.marker
+@COND_i386_ieee1275_TRUE@am__append_7731 = pbkdf2.module
+@COND_i386_ieee1275_TRUE@am__append_7732 = pbkdf2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7733 =
+@COND_i386_ieee1275_TRUE@am__append_7734 = $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7735 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ pbkdf2.marker
+@COND_i386_ieee1275_TRUE@am__append_7736 = pbkdf2.mod
+@COND_i386_ieee1275_TRUE@am__append_7737 = pbkdf2.marker
+@COND_x86_64_efi_TRUE@am__append_7738 = pbkdf2.module
+@COND_x86_64_efi_TRUE@am__append_7739 = pbkdf2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7740 =
+@COND_x86_64_efi_TRUE@am__append_7741 = $(nodist_pbkdf2_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7742 = \
+@COND_x86_64_efi_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ pbkdf2.marker
+@COND_x86_64_efi_TRUE@am__append_7743 = pbkdf2.mod
+@COND_x86_64_efi_TRUE@am__append_7744 = pbkdf2.marker
+@COND_mips_yeeloong_TRUE@am__append_7745 = pbkdf2.module
+@COND_mips_yeeloong_TRUE@am__append_7746 = pbkdf2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7747 =
+@COND_mips_yeeloong_TRUE@am__append_7748 = $(nodist_pbkdf2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7749 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ pbkdf2.marker
+@COND_mips_yeeloong_TRUE@am__append_7750 = pbkdf2.mod
+@COND_mips_yeeloong_TRUE@am__append_7751 = pbkdf2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7752 = pbkdf2.module
+@COND_sparc64_ieee1275_TRUE@am__append_7753 = pbkdf2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7754 =
+@COND_sparc64_ieee1275_TRUE@am__append_7755 = $(nodist_pbkdf2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7756 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ pbkdf2.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7757 = pbkdf2.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7758 = pbkdf2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7759 = pbkdf2.module
+@COND_powerpc_ieee1275_TRUE@am__append_7760 = pbkdf2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7761 =
+@COND_powerpc_ieee1275_TRUE@am__append_7762 = $(nodist_pbkdf2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7763 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_pbkdf2_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ pbkdf2.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7764 = pbkdf2.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7765 = pbkdf2.marker
+@COND_i386_pc_TRUE@am__append_7766 = relocator.module
+@COND_i386_pc_TRUE@am__append_7767 = relocator.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7768 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_i386_pc_TRUE@am__append_7769 = $(nodist_relocator_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7770 = \
+@COND_i386_pc_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_i386_pc_TRUE@ relocator.marker
+@COND_i386_pc_TRUE@am__append_7771 = relocator.mod
+@COND_i386_pc_TRUE@am__append_7772 = relocator.marker
+@COND_i386_efi_TRUE@am__append_7773 = relocator.module
+@COND_i386_efi_TRUE@am__append_7774 = relocator.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7775 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_i386_efi_TRUE@am__append_7776 = $(nodist_relocator_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7777 = \
+@COND_i386_efi_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_i386_efi_TRUE@ relocator.marker
+@COND_i386_efi_TRUE@am__append_7778 = relocator.mod
+@COND_i386_efi_TRUE@am__append_7779 = relocator.marker
+@COND_i386_qemu_TRUE@am__append_7780 = relocator.module
+@COND_i386_qemu_TRUE@am__append_7781 = relocator.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7782 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_i386_qemu_TRUE@am__append_7783 = $(nodist_relocator_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7784 = \
+@COND_i386_qemu_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_i386_qemu_TRUE@ relocator.marker
+@COND_i386_qemu_TRUE@am__append_7785 = relocator.mod
+@COND_i386_qemu_TRUE@am__append_7786 = relocator.marker
+@COND_i386_coreboot_TRUE@am__append_7787 = relocator.module
+@COND_i386_coreboot_TRUE@am__append_7788 = relocator.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7789 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_i386_coreboot_TRUE@am__append_7790 = $(nodist_relocator_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7791 = \
+@COND_i386_coreboot_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ relocator.marker
+@COND_i386_coreboot_TRUE@am__append_7792 = relocator.mod
+@COND_i386_coreboot_TRUE@am__append_7793 = relocator.marker
+@COND_i386_multiboot_TRUE@am__append_7794 = relocator.module
+@COND_i386_multiboot_TRUE@am__append_7795 = relocator.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7796 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_i386_multiboot_TRUE@am__append_7797 = $(nodist_relocator_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7798 = \
+@COND_i386_multiboot_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ relocator.marker
+@COND_i386_multiboot_TRUE@am__append_7799 = relocator.mod
+@COND_i386_multiboot_TRUE@am__append_7800 = relocator.marker
+@COND_i386_ieee1275_TRUE@am__append_7801 = relocator.module
+@COND_i386_ieee1275_TRUE@am__append_7802 = relocator.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7803 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_i386_ieee1275_TRUE@am__append_7804 = $(nodist_relocator_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7805 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ relocator.marker
+@COND_i386_ieee1275_TRUE@am__append_7806 = relocator.mod
+@COND_i386_ieee1275_TRUE@am__append_7807 = relocator.marker
+@COND_x86_64_efi_TRUE@am__append_7808 = relocator.module
+@COND_x86_64_efi_TRUE@am__append_7809 = relocator.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7810 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_x86_64_efi_TRUE@am__append_7811 = $(nodist_relocator_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7812 = \
+@COND_x86_64_efi_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ relocator.marker
+@COND_x86_64_efi_TRUE@am__append_7813 = relocator.mod
+@COND_x86_64_efi_TRUE@am__append_7814 = relocator.marker
+@COND_mips_yeeloong_TRUE@am__append_7815 = relocator.module
+@COND_mips_yeeloong_TRUE@am__append_7816 = relocator.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7817 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_mips_yeeloong_TRUE@am__append_7818 = $(nodist_relocator_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7819 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_relocator_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ relocator.marker
+@COND_mips_yeeloong_TRUE@am__append_7820 = relocator.mod
+@COND_mips_yeeloong_TRUE@am__append_7821 = relocator.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7822 = relocator.module
+@COND_powerpc_ieee1275_TRUE@am__append_7823 = relocator.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7824 = lib/i386/relocator_common.S kern/powerpc/cache_flush.S
+@COND_powerpc_ieee1275_TRUE@am__append_7825 = $(nodist_relocator_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7826 = $(nodist_relocator_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ relocator.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7827 = relocator.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7828 = relocator.marker
+@COND_i386_pc_TRUE@am__append_7829 = datetime.module
+@COND_i386_pc_TRUE@am__append_7830 = datetime.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7831 =
+@COND_i386_pc_TRUE@am__append_7832 = $(nodist_datetime_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7833 = \
+@COND_i386_pc_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_i386_pc_TRUE@ datetime.marker
+@COND_i386_pc_TRUE@am__append_7834 = datetime.mod
+@COND_i386_pc_TRUE@am__append_7835 = datetime.marker
+@COND_i386_efi_TRUE@am__append_7836 = datetime.module
+@COND_i386_efi_TRUE@am__append_7837 = datetime.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7838 =
+@COND_i386_efi_TRUE@am__append_7839 = $(nodist_datetime_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7840 = \
+@COND_i386_efi_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_i386_efi_TRUE@ datetime.marker
+@COND_i386_efi_TRUE@am__append_7841 = datetime.mod
+@COND_i386_efi_TRUE@am__append_7842 = datetime.marker
+@COND_i386_qemu_TRUE@am__append_7843 = datetime.module
+@COND_i386_qemu_TRUE@am__append_7844 = datetime.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7845 =
+@COND_i386_qemu_TRUE@am__append_7846 = $(nodist_datetime_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7847 = \
+@COND_i386_qemu_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_i386_qemu_TRUE@ datetime.marker
+@COND_i386_qemu_TRUE@am__append_7848 = datetime.mod
+@COND_i386_qemu_TRUE@am__append_7849 = datetime.marker
+@COND_i386_coreboot_TRUE@am__append_7850 = datetime.module
+@COND_i386_coreboot_TRUE@am__append_7851 = datetime.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7852 =
+@COND_i386_coreboot_TRUE@am__append_7853 = $(nodist_datetime_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7854 = \
+@COND_i386_coreboot_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ datetime.marker
+@COND_i386_coreboot_TRUE@am__append_7855 = datetime.mod
+@COND_i386_coreboot_TRUE@am__append_7856 = datetime.marker
+@COND_i386_multiboot_TRUE@am__append_7857 = datetime.module
+@COND_i386_multiboot_TRUE@am__append_7858 = datetime.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7859 =
+@COND_i386_multiboot_TRUE@am__append_7860 = $(nodist_datetime_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7861 = \
+@COND_i386_multiboot_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ datetime.marker
+@COND_i386_multiboot_TRUE@am__append_7862 = datetime.mod
+@COND_i386_multiboot_TRUE@am__append_7863 = datetime.marker
+@COND_i386_ieee1275_TRUE@am__append_7864 = datetime.module
+@COND_i386_ieee1275_TRUE@am__append_7865 = datetime.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7866 =
+@COND_i386_ieee1275_TRUE@am__append_7867 = $(nodist_datetime_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7868 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ datetime.marker
+@COND_i386_ieee1275_TRUE@am__append_7869 = datetime.mod
+@COND_i386_ieee1275_TRUE@am__append_7870 = datetime.marker
+@COND_x86_64_efi_TRUE@am__append_7871 = datetime.module
+@COND_x86_64_efi_TRUE@am__append_7872 = datetime.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7873 =
+@COND_x86_64_efi_TRUE@am__append_7874 = $(nodist_datetime_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7875 = \
+@COND_x86_64_efi_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ datetime.marker
+@COND_x86_64_efi_TRUE@am__append_7876 = datetime.mod
+@COND_x86_64_efi_TRUE@am__append_7877 = datetime.marker
+@COND_mips_yeeloong_TRUE@am__append_7878 = datetime.module
+@COND_mips_yeeloong_TRUE@am__append_7879 = datetime.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7880 =
+@COND_mips_yeeloong_TRUE@am__append_7881 = $(nodist_datetime_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7882 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ datetime.marker
+@COND_mips_yeeloong_TRUE@am__append_7883 = datetime.mod
+@COND_mips_yeeloong_TRUE@am__append_7884 = datetime.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7885 = datetime.module
+@COND_sparc64_ieee1275_TRUE@am__append_7886 = datetime.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7887 =
+@COND_sparc64_ieee1275_TRUE@am__append_7888 = $(nodist_datetime_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7889 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ datetime.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7890 = datetime.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7891 = datetime.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7892 = datetime.module
+@COND_powerpc_ieee1275_TRUE@am__append_7893 = datetime.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7894 =
+@COND_powerpc_ieee1275_TRUE@am__append_7895 = $(nodist_datetime_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7896 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_datetime_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ datetime.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7897 = datetime.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7898 = datetime.marker
+@COND_emu_TRUE@am__append_7899 = setjmp.module
+@COND_emu_TRUE@am__append_7900 = setjmp.module$(EXEEXT)
+@COND_emu_TRUE@am__append_7901 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_emu_TRUE@am__append_7902 = $(nodist_setjmp_module_SOURCES)
+@COND_emu_TRUE@am__append_7903 = $(nodist_setjmp_module_SOURCES) \
+@COND_emu_TRUE@ setjmp.marker
+@COND_emu_TRUE@am__append_7904 = setjmp.mod
+@COND_emu_TRUE@am__append_7905 = setjmp.marker
+@COND_i386_pc_TRUE@am__append_7906 = setjmp.module
+@COND_i386_pc_TRUE@am__append_7907 = setjmp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7908 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_i386_pc_TRUE@am__append_7909 = $(nodist_setjmp_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7910 = $(nodist_setjmp_module_SOURCES) \
+@COND_i386_pc_TRUE@ setjmp.marker
+@COND_i386_pc_TRUE@am__append_7911 = setjmp.mod
+@COND_i386_pc_TRUE@am__append_7912 = setjmp.marker
+@COND_i386_efi_TRUE@am__append_7913 = setjmp.module
+@COND_i386_efi_TRUE@am__append_7914 = setjmp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7915 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_i386_efi_TRUE@am__append_7916 = $(nodist_setjmp_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7917 = $(nodist_setjmp_module_SOURCES) \
+@COND_i386_efi_TRUE@ setjmp.marker
+@COND_i386_efi_TRUE@am__append_7918 = setjmp.mod
+@COND_i386_efi_TRUE@am__append_7919 = setjmp.marker
+@COND_i386_qemu_TRUE@am__append_7920 = setjmp.module
+@COND_i386_qemu_TRUE@am__append_7921 = setjmp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7922 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_i386_qemu_TRUE@am__append_7923 = $(nodist_setjmp_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7924 = \
+@COND_i386_qemu_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_i386_qemu_TRUE@ setjmp.marker
+@COND_i386_qemu_TRUE@am__append_7925 = setjmp.mod
+@COND_i386_qemu_TRUE@am__append_7926 = setjmp.marker
+@COND_i386_coreboot_TRUE@am__append_7927 = setjmp.module
+@COND_i386_coreboot_TRUE@am__append_7928 = setjmp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7929 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_i386_coreboot_TRUE@am__append_7930 = $(nodist_setjmp_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_7931 = \
+@COND_i386_coreboot_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ setjmp.marker
+@COND_i386_coreboot_TRUE@am__append_7932 = setjmp.mod
+@COND_i386_coreboot_TRUE@am__append_7933 = setjmp.marker
+@COND_i386_multiboot_TRUE@am__append_7934 = setjmp.module
+@COND_i386_multiboot_TRUE@am__append_7935 = setjmp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_7936 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_i386_multiboot_TRUE@am__append_7937 = $(nodist_setjmp_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_7938 = \
+@COND_i386_multiboot_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ setjmp.marker
+@COND_i386_multiboot_TRUE@am__append_7939 = setjmp.mod
+@COND_i386_multiboot_TRUE@am__append_7940 = setjmp.marker
+@COND_i386_ieee1275_TRUE@am__append_7941 = setjmp.module
+@COND_i386_ieee1275_TRUE@am__append_7942 = setjmp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_7943 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_i386_ieee1275_TRUE@am__append_7944 = $(nodist_setjmp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_7945 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ setjmp.marker
+@COND_i386_ieee1275_TRUE@am__append_7946 = setjmp.mod
+@COND_i386_ieee1275_TRUE@am__append_7947 = setjmp.marker
+@COND_x86_64_efi_TRUE@am__append_7948 = setjmp.module
+@COND_x86_64_efi_TRUE@am__append_7949 = setjmp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_7950 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_x86_64_efi_TRUE@am__append_7951 = $(nodist_setjmp_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_7952 = \
+@COND_x86_64_efi_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ setjmp.marker
+@COND_x86_64_efi_TRUE@am__append_7953 = setjmp.mod
+@COND_x86_64_efi_TRUE@am__append_7954 = setjmp.marker
+@COND_mips_yeeloong_TRUE@am__append_7955 = setjmp.module
+@COND_mips_yeeloong_TRUE@am__append_7956 = setjmp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_7957 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_mips_yeeloong_TRUE@am__append_7958 = $(nodist_setjmp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_7959 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ setjmp.marker
+@COND_mips_yeeloong_TRUE@am__append_7960 = setjmp.mod
+@COND_mips_yeeloong_TRUE@am__append_7961 = setjmp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7962 = setjmp.module
+@COND_sparc64_ieee1275_TRUE@am__append_7963 = setjmp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_7964 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_sparc64_ieee1275_TRUE@am__append_7965 = $(nodist_setjmp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_7966 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ setjmp.marker
+@COND_sparc64_ieee1275_TRUE@am__append_7967 = setjmp.mod
+@COND_sparc64_ieee1275_TRUE@am__append_7968 = setjmp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7969 = setjmp.module
+@COND_powerpc_ieee1275_TRUE@am__append_7970 = setjmp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_7971 = lib/i386/setjmp.S lib/mips/setjmp.S lib/x86_64/setjmp.S lib/sparc64/setjmp.S lib/powerpc/setjmp.S
+@COND_powerpc_ieee1275_TRUE@am__append_7972 = $(nodist_setjmp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_7973 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_setjmp_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ setjmp.marker
+@COND_powerpc_ieee1275_TRUE@am__append_7974 = setjmp.mod
+@COND_powerpc_ieee1275_TRUE@am__append_7975 = setjmp.marker
+@COND_i386_pc_TRUE@am__append_7976 = aout.module
+@COND_i386_pc_TRUE@am__append_7977 = aout.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_7978 =
+@COND_i386_pc_TRUE@am__append_7979 = $(nodist_aout_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_7980 = $(nodist_aout_module_SOURCES) \
+@COND_i386_pc_TRUE@ aout.marker
+@COND_i386_pc_TRUE@am__append_7981 = aout.mod
+@COND_i386_pc_TRUE@am__append_7982 = aout.marker
+@COND_i386_efi_TRUE@am__append_7983 = aout.module
+@COND_i386_efi_TRUE@am__append_7984 = aout.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_7985 =
+@COND_i386_efi_TRUE@am__append_7986 = $(nodist_aout_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_7987 = $(nodist_aout_module_SOURCES) \
+@COND_i386_efi_TRUE@ aout.marker
+@COND_i386_efi_TRUE@am__append_7988 = aout.mod
+@COND_i386_efi_TRUE@am__append_7989 = aout.marker
+@COND_i386_qemu_TRUE@am__append_7990 = aout.module
+@COND_i386_qemu_TRUE@am__append_7991 = aout.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_7992 =
+@COND_i386_qemu_TRUE@am__append_7993 = $(nodist_aout_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_7994 = $(nodist_aout_module_SOURCES) \
+@COND_i386_qemu_TRUE@ aout.marker
+@COND_i386_qemu_TRUE@am__append_7995 = aout.mod
+@COND_i386_qemu_TRUE@am__append_7996 = aout.marker
+@COND_i386_coreboot_TRUE@am__append_7997 = aout.module
+@COND_i386_coreboot_TRUE@am__append_7998 = aout.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_7999 =
+@COND_i386_coreboot_TRUE@am__append_8000 = $(nodist_aout_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8001 = \
+@COND_i386_coreboot_TRUE@ $(nodist_aout_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ aout.marker
+@COND_i386_coreboot_TRUE@am__append_8002 = aout.mod
+@COND_i386_coreboot_TRUE@am__append_8003 = aout.marker
+@COND_i386_multiboot_TRUE@am__append_8004 = aout.module
+@COND_i386_multiboot_TRUE@am__append_8005 = aout.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8006 =
+@COND_i386_multiboot_TRUE@am__append_8007 = $(nodist_aout_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8008 = \
+@COND_i386_multiboot_TRUE@ $(nodist_aout_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ aout.marker
+@COND_i386_multiboot_TRUE@am__append_8009 = aout.mod
+@COND_i386_multiboot_TRUE@am__append_8010 = aout.marker
+@COND_i386_ieee1275_TRUE@am__append_8011 = aout.module
+@COND_i386_ieee1275_TRUE@am__append_8012 = aout.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8013 =
+@COND_i386_ieee1275_TRUE@am__append_8014 = $(nodist_aout_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8015 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_aout_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ aout.marker
+@COND_i386_ieee1275_TRUE@am__append_8016 = aout.mod
+@COND_i386_ieee1275_TRUE@am__append_8017 = aout.marker
+@COND_x86_64_efi_TRUE@am__append_8018 = aout.module
+@COND_x86_64_efi_TRUE@am__append_8019 = aout.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8020 =
+@COND_x86_64_efi_TRUE@am__append_8021 = $(nodist_aout_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8022 = $(nodist_aout_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ aout.marker
+@COND_x86_64_efi_TRUE@am__append_8023 = aout.mod
+@COND_x86_64_efi_TRUE@am__append_8024 = aout.marker
+@COND_i386_pc_TRUE@am__append_8025 = bsd.module
+@COND_i386_pc_TRUE@am__append_8026 = bsd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8027 = loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+@COND_i386_pc_TRUE@am__append_8028 = $(nodist_bsd_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8029 = $(nodist_bsd_module_SOURCES) \
+@COND_i386_pc_TRUE@ bsd.marker
+@COND_i386_pc_TRUE@am__append_8030 = bsd.mod
+@COND_i386_pc_TRUE@am__append_8031 = bsd.marker
+@COND_i386_efi_TRUE@am__append_8032 = bsd.module
+@COND_i386_efi_TRUE@am__append_8033 = bsd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8034 = loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+@COND_i386_efi_TRUE@am__append_8035 = $(nodist_bsd_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8036 = $(nodist_bsd_module_SOURCES) \
+@COND_i386_efi_TRUE@ bsd.marker
+@COND_i386_efi_TRUE@am__append_8037 = bsd.mod
+@COND_i386_efi_TRUE@am__append_8038 = bsd.marker
+@COND_i386_qemu_TRUE@am__append_8039 = bsd.module
+@COND_i386_qemu_TRUE@am__append_8040 = bsd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8041 = loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+@COND_i386_qemu_TRUE@am__append_8042 = $(nodist_bsd_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8043 = $(nodist_bsd_module_SOURCES) \
+@COND_i386_qemu_TRUE@ bsd.marker
+@COND_i386_qemu_TRUE@am__append_8044 = bsd.mod
+@COND_i386_qemu_TRUE@am__append_8045 = bsd.marker
+@COND_i386_coreboot_TRUE@am__append_8046 = bsd.module
+@COND_i386_coreboot_TRUE@am__append_8047 = bsd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8048 = loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+@COND_i386_coreboot_TRUE@am__append_8049 = $(nodist_bsd_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8050 = \
+@COND_i386_coreboot_TRUE@ $(nodist_bsd_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ bsd.marker
+@COND_i386_coreboot_TRUE@am__append_8051 = bsd.mod
+@COND_i386_coreboot_TRUE@am__append_8052 = bsd.marker
+@COND_i386_multiboot_TRUE@am__append_8053 = bsd.module
+@COND_i386_multiboot_TRUE@am__append_8054 = bsd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8055 = loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+@COND_i386_multiboot_TRUE@am__append_8056 = $(nodist_bsd_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8057 = \
+@COND_i386_multiboot_TRUE@ $(nodist_bsd_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ bsd.marker
+@COND_i386_multiboot_TRUE@am__append_8058 = bsd.mod
+@COND_i386_multiboot_TRUE@am__append_8059 = bsd.marker
+@COND_i386_ieee1275_TRUE@am__append_8060 = bsd.module
+@COND_i386_ieee1275_TRUE@am__append_8061 = bsd.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8062 = loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+@COND_i386_ieee1275_TRUE@am__append_8063 = $(nodist_bsd_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8064 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_bsd_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ bsd.marker
+@COND_i386_ieee1275_TRUE@am__append_8065 = bsd.mod
+@COND_i386_ieee1275_TRUE@am__append_8066 = bsd.marker
+@COND_x86_64_efi_TRUE@am__append_8067 = bsd.module
+@COND_x86_64_efi_TRUE@am__append_8068 = bsd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8069 = loader/i386/bsdXX.c loader/i386/bsd_pagetable.c
+@COND_x86_64_efi_TRUE@am__append_8070 = $(nodist_bsd_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8071 = $(nodist_bsd_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ bsd.marker
+@COND_x86_64_efi_TRUE@am__append_8072 = bsd.mod
+@COND_x86_64_efi_TRUE@am__append_8073 = bsd.marker
+@COND_i386_pc_TRUE@am__append_8074 = linux16.module ntldr.module \
+@COND_i386_pc_TRUE@ multiboot2.module
+@COND_i386_pc_TRUE@am__append_8075 = linux16.module$(EXEEXT) \
+@COND_i386_pc_TRUE@ ntldr.module$(EXEEXT) \
+@COND_i386_pc_TRUE@ multiboot2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8076 =
+@COND_i386_pc_TRUE@am__append_8077 = $(nodist_linux16_module_SOURCES) \
+@COND_i386_pc_TRUE@ $(nodist_ntldr_module_SOURCES) \
+@COND_i386_pc_TRUE@ $(nodist_multiboot2_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8078 = $(nodist_linux16_module_SOURCES) \
+@COND_i386_pc_TRUE@ linux16.marker \
+@COND_i386_pc_TRUE@ $(nodist_ntldr_module_SOURCES) ntldr.marker \
+@COND_i386_pc_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_i386_pc_TRUE@ multiboot2.marker
+@COND_i386_pc_TRUE@am__append_8079 = linux16.mod ntldr.mod \
+@COND_i386_pc_TRUE@ multiboot2.mod
+@COND_i386_pc_TRUE@am__append_8080 = linux16.marker ntldr.marker \
+@COND_i386_pc_TRUE@ multiboot2.marker
+@COND_i386_efi_TRUE@am__append_8081 = multiboot2.module
+@COND_i386_efi_TRUE@am__append_8082 = multiboot2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8083 =
+@COND_i386_efi_TRUE@am__append_8084 = $(nodist_multiboot2_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8085 = \
+@COND_i386_efi_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_i386_efi_TRUE@ multiboot2.marker
+@COND_i386_efi_TRUE@am__append_8086 = multiboot2.mod
+@COND_i386_efi_TRUE@am__append_8087 = multiboot2.marker
+@COND_i386_qemu_TRUE@am__append_8088 = multiboot2.module
+@COND_i386_qemu_TRUE@am__append_8089 = multiboot2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8090 =
+@COND_i386_qemu_TRUE@am__append_8091 = $(nodist_multiboot2_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8092 = \
+@COND_i386_qemu_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_i386_qemu_TRUE@ multiboot2.marker
+@COND_i386_qemu_TRUE@am__append_8093 = multiboot2.mod
+@COND_i386_qemu_TRUE@am__append_8094 = multiboot2.marker
+@COND_i386_coreboot_TRUE@am__append_8095 = multiboot2.module
+@COND_i386_coreboot_TRUE@am__append_8096 = multiboot2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8097 =
+@COND_i386_coreboot_TRUE@am__append_8098 = $(nodist_multiboot2_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8099 = \
+@COND_i386_coreboot_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ multiboot2.marker
+@COND_i386_coreboot_TRUE@am__append_8100 = multiboot2.mod
+@COND_i386_coreboot_TRUE@am__append_8101 = multiboot2.marker
+@COND_i386_multiboot_TRUE@am__append_8102 = multiboot2.module
+@COND_i386_multiboot_TRUE@am__append_8103 = multiboot2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8104 =
+@COND_i386_multiboot_TRUE@am__append_8105 = $(nodist_multiboot2_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8106 = \
+@COND_i386_multiboot_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ multiboot2.marker
+@COND_i386_multiboot_TRUE@am__append_8107 = multiboot2.mod
+@COND_i386_multiboot_TRUE@am__append_8108 = multiboot2.marker
+@COND_i386_ieee1275_TRUE@am__append_8109 = multiboot2.module
+@COND_i386_ieee1275_TRUE@am__append_8110 = multiboot2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8111 =
+@COND_i386_ieee1275_TRUE@am__append_8112 = $(nodist_multiboot2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8113 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ multiboot2.marker
+@COND_i386_ieee1275_TRUE@am__append_8114 = multiboot2.mod
+@COND_i386_ieee1275_TRUE@am__append_8115 = multiboot2.marker
+@COND_x86_64_efi_TRUE@am__append_8116 = multiboot2.module
+@COND_x86_64_efi_TRUE@am__append_8117 = multiboot2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8118 =
+@COND_x86_64_efi_TRUE@am__append_8119 = $(nodist_multiboot2_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8120 = \
+@COND_x86_64_efi_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ multiboot2.marker
+@COND_x86_64_efi_TRUE@am__append_8121 = multiboot2.mod
+@COND_x86_64_efi_TRUE@am__append_8122 = multiboot2.marker
+@COND_mips_yeeloong_TRUE@am__append_8123 = multiboot2.module
+@COND_mips_yeeloong_TRUE@am__append_8124 = multiboot2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8125 =
+@COND_mips_yeeloong_TRUE@am__append_8126 = $(nodist_multiboot2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8127 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_multiboot2_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ multiboot2.marker
+@COND_mips_yeeloong_TRUE@am__append_8128 = multiboot2.mod
+@COND_mips_yeeloong_TRUE@am__append_8129 = multiboot2.marker
+@COND_i386_pc_TRUE@am__append_8130 = multiboot.module
+@COND_i386_pc_TRUE@am__append_8131 = multiboot.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8132 = loader/multiboot_elfxx.c
+@COND_i386_pc_TRUE@am__append_8133 = $(nodist_multiboot_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8134 = \
+@COND_i386_pc_TRUE@ $(nodist_multiboot_module_SOURCES) \
+@COND_i386_pc_TRUE@ multiboot.marker
+@COND_i386_pc_TRUE@am__append_8135 = multiboot.mod
+@COND_i386_pc_TRUE@am__append_8136 = multiboot.marker
+@COND_i386_efi_TRUE@am__append_8137 = multiboot.module
+@COND_i386_efi_TRUE@am__append_8138 = multiboot.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8139 = loader/multiboot_elfxx.c
+@COND_i386_efi_TRUE@am__append_8140 = $(nodist_multiboot_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8141 = \
+@COND_i386_efi_TRUE@ $(nodist_multiboot_module_SOURCES) \
+@COND_i386_efi_TRUE@ multiboot.marker
+@COND_i386_efi_TRUE@am__append_8142 = multiboot.mod
+@COND_i386_efi_TRUE@am__append_8143 = multiboot.marker
+@COND_i386_qemu_TRUE@am__append_8144 = multiboot.module
+@COND_i386_qemu_TRUE@am__append_8145 = multiboot.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8146 = loader/multiboot_elfxx.c
+@COND_i386_qemu_TRUE@am__append_8147 = $(nodist_multiboot_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8148 = \
+@COND_i386_qemu_TRUE@ $(nodist_multiboot_module_SOURCES) \
+@COND_i386_qemu_TRUE@ multiboot.marker
+@COND_i386_qemu_TRUE@am__append_8149 = multiboot.mod
+@COND_i386_qemu_TRUE@am__append_8150 = multiboot.marker
+@COND_i386_coreboot_TRUE@am__append_8151 = multiboot.module
+@COND_i386_coreboot_TRUE@am__append_8152 = multiboot.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8153 = loader/multiboot_elfxx.c
+@COND_i386_coreboot_TRUE@am__append_8154 = $(nodist_multiboot_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8155 = \
+@COND_i386_coreboot_TRUE@ $(nodist_multiboot_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ multiboot.marker
+@COND_i386_coreboot_TRUE@am__append_8156 = multiboot.mod
+@COND_i386_coreboot_TRUE@am__append_8157 = multiboot.marker
+@COND_i386_multiboot_TRUE@am__append_8158 = multiboot.module
+@COND_i386_multiboot_TRUE@am__append_8159 = multiboot.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8160 = loader/multiboot_elfxx.c
+@COND_i386_multiboot_TRUE@am__append_8161 = $(nodist_multiboot_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8162 = \
+@COND_i386_multiboot_TRUE@ $(nodist_multiboot_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ multiboot.marker
+@COND_i386_multiboot_TRUE@am__append_8163 = multiboot.mod
+@COND_i386_multiboot_TRUE@am__append_8164 = multiboot.marker
+@COND_i386_ieee1275_TRUE@am__append_8165 = multiboot.module
+@COND_i386_ieee1275_TRUE@am__append_8166 = multiboot.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8167 = loader/multiboot_elfxx.c
+@COND_i386_ieee1275_TRUE@am__append_8168 = $(nodist_multiboot_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8169 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_multiboot_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ multiboot.marker
+@COND_i386_ieee1275_TRUE@am__append_8170 = multiboot.mod
+@COND_i386_ieee1275_TRUE@am__append_8171 = multiboot.marker
+@COND_x86_64_efi_TRUE@am__append_8172 = multiboot.module
+@COND_x86_64_efi_TRUE@am__append_8173 = multiboot.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8174 = loader/multiboot_elfxx.c
+@COND_x86_64_efi_TRUE@am__append_8175 = $(nodist_multiboot_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8176 = \
+@COND_x86_64_efi_TRUE@ $(nodist_multiboot_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ multiboot.marker
+@COND_x86_64_efi_TRUE@am__append_8177 = multiboot.mod
+@COND_x86_64_efi_TRUE@am__append_8178 = multiboot.marker
+@COND_i386_pc_TRUE@am__append_8179 = linux.module
+@COND_i386_pc_TRUE@am__append_8180 = linux.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8181 =
+@COND_i386_pc_TRUE@am__append_8182 = $(nodist_linux_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8183 = $(nodist_linux_module_SOURCES) \
+@COND_i386_pc_TRUE@ linux.marker
+@COND_i386_pc_TRUE@am__append_8184 = linux.mod
+@COND_i386_pc_TRUE@am__append_8185 = linux.marker
+@COND_i386_efi_TRUE@am__append_8186 = linux.module
+@COND_i386_efi_TRUE@am__append_8187 = linux.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8188 =
+@COND_i386_efi_TRUE@am__append_8189 = $(nodist_linux_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8190 = $(nodist_linux_module_SOURCES) \
+@COND_i386_efi_TRUE@ linux.marker
+@COND_i386_efi_TRUE@am__append_8191 = linux.mod
+@COND_i386_efi_TRUE@am__append_8192 = linux.marker
+@COND_i386_qemu_TRUE@am__append_8193 = linux.module
+@COND_i386_qemu_TRUE@am__append_8194 = linux.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8195 =
+@COND_i386_qemu_TRUE@am__append_8196 = $(nodist_linux_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8197 = $(nodist_linux_module_SOURCES) \
+@COND_i386_qemu_TRUE@ linux.marker
+@COND_i386_qemu_TRUE@am__append_8198 = linux.mod
+@COND_i386_qemu_TRUE@am__append_8199 = linux.marker
+@COND_i386_coreboot_TRUE@am__append_8200 = linux.module
+@COND_i386_coreboot_TRUE@am__append_8201 = linux.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8202 =
+@COND_i386_coreboot_TRUE@am__append_8203 = $(nodist_linux_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8204 = \
+@COND_i386_coreboot_TRUE@ $(nodist_linux_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ linux.marker
+@COND_i386_coreboot_TRUE@am__append_8205 = linux.mod
+@COND_i386_coreboot_TRUE@am__append_8206 = linux.marker
+@COND_i386_multiboot_TRUE@am__append_8207 = linux.module
+@COND_i386_multiboot_TRUE@am__append_8208 = linux.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8209 =
+@COND_i386_multiboot_TRUE@am__append_8210 = $(nodist_linux_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8211 = \
+@COND_i386_multiboot_TRUE@ $(nodist_linux_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ linux.marker
+@COND_i386_multiboot_TRUE@am__append_8212 = linux.mod
+@COND_i386_multiboot_TRUE@am__append_8213 = linux.marker
+@COND_i386_ieee1275_TRUE@am__append_8214 = linux.module
+@COND_i386_ieee1275_TRUE@am__append_8215 = linux.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8216 =
+@COND_i386_ieee1275_TRUE@am__append_8217 = $(nodist_linux_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8218 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_linux_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ linux.marker
+@COND_i386_ieee1275_TRUE@am__append_8219 = linux.mod
+@COND_i386_ieee1275_TRUE@am__append_8220 = linux.marker
+@COND_x86_64_efi_TRUE@am__append_8221 = linux.module
+@COND_x86_64_efi_TRUE@am__append_8222 = linux.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8223 =
+@COND_x86_64_efi_TRUE@am__append_8224 = $(nodist_linux_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8225 = \
+@COND_x86_64_efi_TRUE@ $(nodist_linux_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ linux.marker
+@COND_x86_64_efi_TRUE@am__append_8226 = linux.mod
+@COND_x86_64_efi_TRUE@am__append_8227 = linux.marker
+@COND_mips_yeeloong_TRUE@am__append_8228 = linux.module
+@COND_mips_yeeloong_TRUE@am__append_8229 = linux.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8230 =
+@COND_mips_yeeloong_TRUE@am__append_8231 = $(nodist_linux_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8232 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_linux_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ linux.marker
+@COND_mips_yeeloong_TRUE@am__append_8233 = linux.mod
+@COND_mips_yeeloong_TRUE@am__append_8234 = linux.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8235 = linux.module
+@COND_sparc64_ieee1275_TRUE@am__append_8236 = linux.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8237 =
+@COND_sparc64_ieee1275_TRUE@am__append_8238 = $(nodist_linux_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8239 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_linux_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ linux.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8240 = linux.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8241 = linux.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8242 = linux.module
+@COND_powerpc_ieee1275_TRUE@am__append_8243 = linux.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8244 =
+@COND_powerpc_ieee1275_TRUE@am__append_8245 = $(nodist_linux_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8246 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_linux_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ linux.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8247 = linux.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8248 = linux.marker
+@COND_i386_pc_TRUE@am__append_8249 = xnu.module
+@COND_i386_pc_TRUE@am__append_8250 = xnu.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8251 = loader/machoXX.c
+@COND_i386_pc_TRUE@am__append_8252 = $(nodist_xnu_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8253 = $(nodist_xnu_module_SOURCES) \
+@COND_i386_pc_TRUE@ xnu.marker
+@COND_i386_pc_TRUE@am__append_8254 = xnu.mod
+@COND_i386_pc_TRUE@am__append_8255 = xnu.marker
+@COND_i386_efi_TRUE@am__append_8256 = xnu.module
+@COND_i386_efi_TRUE@am__append_8257 = xnu.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8258 = loader/machoXX.c
+@COND_i386_efi_TRUE@am__append_8259 = $(nodist_xnu_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8260 = $(nodist_xnu_module_SOURCES) \
+@COND_i386_efi_TRUE@ xnu.marker
+@COND_i386_efi_TRUE@am__append_8261 = xnu.mod
+@COND_i386_efi_TRUE@am__append_8262 = xnu.marker
+@COND_i386_qemu_TRUE@am__append_8263 = xnu.module
+@COND_i386_qemu_TRUE@am__append_8264 = xnu.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8265 = loader/machoXX.c
+@COND_i386_qemu_TRUE@am__append_8266 = $(nodist_xnu_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8267 = $(nodist_xnu_module_SOURCES) \
+@COND_i386_qemu_TRUE@ xnu.marker
+@COND_i386_qemu_TRUE@am__append_8268 = xnu.mod
+@COND_i386_qemu_TRUE@am__append_8269 = xnu.marker
+@COND_i386_coreboot_TRUE@am__append_8270 = xnu.module
+@COND_i386_coreboot_TRUE@am__append_8271 = xnu.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8272 = loader/machoXX.c
+@COND_i386_coreboot_TRUE@am__append_8273 = $(nodist_xnu_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8274 = \
+@COND_i386_coreboot_TRUE@ $(nodist_xnu_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ xnu.marker
+@COND_i386_coreboot_TRUE@am__append_8275 = xnu.mod
+@COND_i386_coreboot_TRUE@am__append_8276 = xnu.marker
+@COND_i386_multiboot_TRUE@am__append_8277 = xnu.module
+@COND_i386_multiboot_TRUE@am__append_8278 = xnu.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8279 = loader/machoXX.c
+@COND_i386_multiboot_TRUE@am__append_8280 = $(nodist_xnu_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8281 = \
+@COND_i386_multiboot_TRUE@ $(nodist_xnu_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ xnu.marker
+@COND_i386_multiboot_TRUE@am__append_8282 = xnu.mod
+@COND_i386_multiboot_TRUE@am__append_8283 = xnu.marker
+@COND_i386_ieee1275_TRUE@am__append_8284 = xnu.module
+@COND_i386_ieee1275_TRUE@am__append_8285 = xnu.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8286 = loader/machoXX.c
+@COND_i386_ieee1275_TRUE@am__append_8287 = $(nodist_xnu_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8288 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_xnu_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ xnu.marker
+@COND_i386_ieee1275_TRUE@am__append_8289 = xnu.mod
+@COND_i386_ieee1275_TRUE@am__append_8290 = xnu.marker
+@COND_x86_64_efi_TRUE@am__append_8291 = xnu.module
+@COND_x86_64_efi_TRUE@am__append_8292 = xnu.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8293 = loader/machoXX.c
+@COND_x86_64_efi_TRUE@am__append_8294 = $(nodist_xnu_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8295 = $(nodist_xnu_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ xnu.marker
+@COND_x86_64_efi_TRUE@am__append_8296 = xnu.mod
+@COND_x86_64_efi_TRUE@am__append_8297 = xnu.marker
+@COND_i386_efi_TRUE@am__append_8298 = appleldr.module
+@COND_i386_efi_TRUE@am__append_8299 = appleldr.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8300 =
+@COND_i386_efi_TRUE@am__append_8301 = $(nodist_appleldr_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8302 = \
+@COND_i386_efi_TRUE@ $(nodist_appleldr_module_SOURCES) \
+@COND_i386_efi_TRUE@ appleldr.marker
+@COND_i386_efi_TRUE@am__append_8303 = appleldr.mod
+@COND_i386_efi_TRUE@am__append_8304 = appleldr.marker
+@COND_x86_64_efi_TRUE@am__append_8305 = appleldr.module
+@COND_x86_64_efi_TRUE@am__append_8306 = appleldr.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8307 =
+@COND_x86_64_efi_TRUE@am__append_8308 = $(nodist_appleldr_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8309 = \
+@COND_x86_64_efi_TRUE@ $(nodist_appleldr_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ appleldr.marker
+@COND_x86_64_efi_TRUE@am__append_8310 = appleldr.mod
+@COND_x86_64_efi_TRUE@am__append_8311 = appleldr.marker
+@COND_i386_pc_TRUE@am__append_8312 = chain.module
+@COND_i386_pc_TRUE@am__append_8313 = chain.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8314 =
+@COND_i386_pc_TRUE@am__append_8315 = $(nodist_chain_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8316 = $(nodist_chain_module_SOURCES) \
+@COND_i386_pc_TRUE@ chain.marker
+@COND_i386_pc_TRUE@am__append_8317 = chain.mod
+@COND_i386_pc_TRUE@am__append_8318 = chain.marker
+@COND_i386_efi_TRUE@am__append_8319 = chain.module
+@COND_i386_efi_TRUE@am__append_8320 = chain.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8321 =
+@COND_i386_efi_TRUE@am__append_8322 = $(nodist_chain_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8323 = $(nodist_chain_module_SOURCES) \
+@COND_i386_efi_TRUE@ chain.marker
+@COND_i386_efi_TRUE@am__append_8324 = chain.mod
+@COND_i386_efi_TRUE@am__append_8325 = chain.marker
+@COND_x86_64_efi_TRUE@am__append_8326 = chain.module
+@COND_x86_64_efi_TRUE@am__append_8327 = chain.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8328 =
+@COND_x86_64_efi_TRUE@am__append_8329 = $(nodist_chain_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8330 = \
+@COND_x86_64_efi_TRUE@ $(nodist_chain_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ chain.marker
+@COND_x86_64_efi_TRUE@am__append_8331 = chain.mod
+@COND_x86_64_efi_TRUE@am__append_8332 = chain.marker
+@COND_i386_pc_TRUE@am__append_8333 = mmap.module
+@COND_i386_pc_TRUE@am__append_8334 = mmap.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8335 =
+@COND_i386_pc_TRUE@am__append_8336 = $(nodist_mmap_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8337 = $(nodist_mmap_module_SOURCES) \
+@COND_i386_pc_TRUE@ mmap.marker
+@COND_i386_pc_TRUE@am__append_8338 = mmap.mod
+@COND_i386_pc_TRUE@am__append_8339 = mmap.marker
+@COND_i386_efi_TRUE@am__append_8340 = mmap.module
+@COND_i386_efi_TRUE@am__append_8341 = mmap.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8342 =
+@COND_i386_efi_TRUE@am__append_8343 = $(nodist_mmap_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8344 = $(nodist_mmap_module_SOURCES) \
+@COND_i386_efi_TRUE@ mmap.marker
+@COND_i386_efi_TRUE@am__append_8345 = mmap.mod
+@COND_i386_efi_TRUE@am__append_8346 = mmap.marker
+@COND_i386_qemu_TRUE@am__append_8347 = mmap.module
+@COND_i386_qemu_TRUE@am__append_8348 = mmap.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8349 =
+@COND_i386_qemu_TRUE@am__append_8350 = $(nodist_mmap_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8351 = $(nodist_mmap_module_SOURCES) \
+@COND_i386_qemu_TRUE@ mmap.marker
+@COND_i386_qemu_TRUE@am__append_8352 = mmap.mod
+@COND_i386_qemu_TRUE@am__append_8353 = mmap.marker
+@COND_i386_coreboot_TRUE@am__append_8354 = mmap.module
+@COND_i386_coreboot_TRUE@am__append_8355 = mmap.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8356 =
+@COND_i386_coreboot_TRUE@am__append_8357 = $(nodist_mmap_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8358 = \
+@COND_i386_coreboot_TRUE@ $(nodist_mmap_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ mmap.marker
+@COND_i386_coreboot_TRUE@am__append_8359 = mmap.mod
+@COND_i386_coreboot_TRUE@am__append_8360 = mmap.marker
+@COND_i386_multiboot_TRUE@am__append_8361 = mmap.module
+@COND_i386_multiboot_TRUE@am__append_8362 = mmap.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8363 =
+@COND_i386_multiboot_TRUE@am__append_8364 = $(nodist_mmap_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8365 = \
+@COND_i386_multiboot_TRUE@ $(nodist_mmap_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ mmap.marker
+@COND_i386_multiboot_TRUE@am__append_8366 = mmap.mod
+@COND_i386_multiboot_TRUE@am__append_8367 = mmap.marker
+@COND_i386_ieee1275_TRUE@am__append_8368 = mmap.module
+@COND_i386_ieee1275_TRUE@am__append_8369 = mmap.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8370 =
+@COND_i386_ieee1275_TRUE@am__append_8371 = $(nodist_mmap_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8372 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_mmap_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ mmap.marker
+@COND_i386_ieee1275_TRUE@am__append_8373 = mmap.mod
+@COND_i386_ieee1275_TRUE@am__append_8374 = mmap.marker
+@COND_x86_64_efi_TRUE@am__append_8375 = mmap.module
+@COND_x86_64_efi_TRUE@am__append_8376 = mmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8377 =
+@COND_x86_64_efi_TRUE@am__append_8378 = $(nodist_mmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8379 = $(nodist_mmap_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ mmap.marker
+@COND_x86_64_efi_TRUE@am__append_8380 = mmap.mod
+@COND_x86_64_efi_TRUE@am__append_8381 = mmap.marker
+@COND_mips_yeeloong_TRUE@am__append_8382 = mmap.module
+@COND_mips_yeeloong_TRUE@am__append_8383 = mmap.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8384 =
+@COND_mips_yeeloong_TRUE@am__append_8385 = $(nodist_mmap_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8386 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_mmap_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ mmap.marker
+@COND_mips_yeeloong_TRUE@am__append_8387 = mmap.mod
+@COND_mips_yeeloong_TRUE@am__append_8388 = mmap.marker
+@COND_emu_TRUE@am__append_8389 = normal.module
+@COND_emu_TRUE@am__append_8390 = normal.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8391 = script/yylex.l script/parser.y
+@COND_emu_TRUE@am__append_8392 = $(nodist_normal_module_SOURCES)
+@COND_emu_TRUE@am__append_8393 = $(nodist_normal_module_SOURCES) \
+@COND_emu_TRUE@ normal.marker
+@COND_emu_TRUE@am__append_8394 = normal.mod
+@COND_emu_TRUE@am__append_8395 = normal.marker
+@COND_i386_pc_TRUE@am__append_8396 = normal.module
+@COND_i386_pc_TRUE@am__append_8397 = normal.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8398 = script/yylex.l script/parser.y
+@COND_i386_pc_TRUE@am__append_8399 = $(nodist_normal_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8400 = $(nodist_normal_module_SOURCES) \
+@COND_i386_pc_TRUE@ normal.marker
+@COND_i386_pc_TRUE@am__append_8401 = normal.mod
+@COND_i386_pc_TRUE@am__append_8402 = normal.marker
+@COND_i386_efi_TRUE@am__append_8403 = normal.module
+@COND_i386_efi_TRUE@am__append_8404 = normal.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8405 = script/yylex.l script/parser.y
+@COND_i386_efi_TRUE@am__append_8406 = $(nodist_normal_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8407 = $(nodist_normal_module_SOURCES) \
+@COND_i386_efi_TRUE@ normal.marker
+@COND_i386_efi_TRUE@am__append_8408 = normal.mod
+@COND_i386_efi_TRUE@am__append_8409 = normal.marker
+@COND_i386_qemu_TRUE@am__append_8410 = normal.module
+@COND_i386_qemu_TRUE@am__append_8411 = normal.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8412 = script/yylex.l script/parser.y
+@COND_i386_qemu_TRUE@am__append_8413 = $(nodist_normal_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8414 = \
+@COND_i386_qemu_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_i386_qemu_TRUE@ normal.marker
+@COND_i386_qemu_TRUE@am__append_8415 = normal.mod
+@COND_i386_qemu_TRUE@am__append_8416 = normal.marker
+@COND_i386_coreboot_TRUE@am__append_8417 = normal.module
+@COND_i386_coreboot_TRUE@am__append_8418 = normal.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8419 = script/yylex.l script/parser.y
+@COND_i386_coreboot_TRUE@am__append_8420 = $(nodist_normal_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8421 = \
+@COND_i386_coreboot_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ normal.marker
+@COND_i386_coreboot_TRUE@am__append_8422 = normal.mod
+@COND_i386_coreboot_TRUE@am__append_8423 = normal.marker
+@COND_i386_multiboot_TRUE@am__append_8424 = normal.module
+@COND_i386_multiboot_TRUE@am__append_8425 = normal.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8426 = script/yylex.l script/parser.y
+@COND_i386_multiboot_TRUE@am__append_8427 = $(nodist_normal_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8428 = \
+@COND_i386_multiboot_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ normal.marker
+@COND_i386_multiboot_TRUE@am__append_8429 = normal.mod
+@COND_i386_multiboot_TRUE@am__append_8430 = normal.marker
+@COND_i386_ieee1275_TRUE@am__append_8431 = normal.module
+@COND_i386_ieee1275_TRUE@am__append_8432 = normal.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8433 = script/yylex.l script/parser.y
+@COND_i386_ieee1275_TRUE@am__append_8434 = $(nodist_normal_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8435 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ normal.marker
+@COND_i386_ieee1275_TRUE@am__append_8436 = normal.mod
+@COND_i386_ieee1275_TRUE@am__append_8437 = normal.marker
+@COND_x86_64_efi_TRUE@am__append_8438 = normal.module
+@COND_x86_64_efi_TRUE@am__append_8439 = normal.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8440 = script/yylex.l script/parser.y
+@COND_x86_64_efi_TRUE@am__append_8441 = $(nodist_normal_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8442 = \
+@COND_x86_64_efi_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ normal.marker
+@COND_x86_64_efi_TRUE@am__append_8443 = normal.mod
+@COND_x86_64_efi_TRUE@am__append_8444 = normal.marker
+@COND_mips_yeeloong_TRUE@am__append_8445 = normal.module
+@COND_mips_yeeloong_TRUE@am__append_8446 = normal.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8447 = script/yylex.l script/parser.y
+@COND_mips_yeeloong_TRUE@am__append_8448 = $(nodist_normal_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8449 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ normal.marker
+@COND_mips_yeeloong_TRUE@am__append_8450 = normal.mod
+@COND_mips_yeeloong_TRUE@am__append_8451 = normal.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8452 = normal.module
+@COND_sparc64_ieee1275_TRUE@am__append_8453 = normal.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8454 = script/yylex.l script/parser.y
+@COND_sparc64_ieee1275_TRUE@am__append_8455 = $(nodist_normal_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8456 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ normal.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8457 = normal.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8458 = normal.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8459 = normal.module
+@COND_powerpc_ieee1275_TRUE@am__append_8460 = normal.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8461 = script/yylex.l script/parser.y
+@COND_powerpc_ieee1275_TRUE@am__append_8462 = $(nodist_normal_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8463 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_normal_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ normal.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8464 = normal.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8465 = normal.marker
+@COND_emu_TRUE@am__append_8466 = part_acorn.module
+@COND_emu_TRUE@am__append_8467 = part_acorn.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8468 =
+@COND_emu_TRUE@am__append_8469 = $(nodist_part_acorn_module_SOURCES)
+@COND_emu_TRUE@am__append_8470 = $(nodist_part_acorn_module_SOURCES) \
+@COND_emu_TRUE@ part_acorn.marker
+@COND_emu_TRUE@am__append_8471 = part_acorn.mod
+@COND_emu_TRUE@am__append_8472 = part_acorn.marker
+@COND_i386_pc_TRUE@am__append_8473 = part_acorn.module
+@COND_i386_pc_TRUE@am__append_8474 = part_acorn.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8475 =
+@COND_i386_pc_TRUE@am__append_8476 = $(nodist_part_acorn_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8477 = \
+@COND_i386_pc_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_acorn.marker
+@COND_i386_pc_TRUE@am__append_8478 = part_acorn.mod
+@COND_i386_pc_TRUE@am__append_8479 = part_acorn.marker
+@COND_i386_efi_TRUE@am__append_8480 = part_acorn.module
+@COND_i386_efi_TRUE@am__append_8481 = part_acorn.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8482 =
+@COND_i386_efi_TRUE@am__append_8483 = $(nodist_part_acorn_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8484 = \
+@COND_i386_efi_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_acorn.marker
+@COND_i386_efi_TRUE@am__append_8485 = part_acorn.mod
+@COND_i386_efi_TRUE@am__append_8486 = part_acorn.marker
+@COND_i386_qemu_TRUE@am__append_8487 = part_acorn.module
+@COND_i386_qemu_TRUE@am__append_8488 = part_acorn.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8489 =
+@COND_i386_qemu_TRUE@am__append_8490 = $(nodist_part_acorn_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8491 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_acorn.marker
+@COND_i386_qemu_TRUE@am__append_8492 = part_acorn.mod
+@COND_i386_qemu_TRUE@am__append_8493 = part_acorn.marker
+@COND_i386_coreboot_TRUE@am__append_8494 = part_acorn.module
+@COND_i386_coreboot_TRUE@am__append_8495 = part_acorn.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8496 =
+@COND_i386_coreboot_TRUE@am__append_8497 = $(nodist_part_acorn_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8498 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_acorn.marker
+@COND_i386_coreboot_TRUE@am__append_8499 = part_acorn.mod
+@COND_i386_coreboot_TRUE@am__append_8500 = part_acorn.marker
+@COND_i386_multiboot_TRUE@am__append_8501 = part_acorn.module
+@COND_i386_multiboot_TRUE@am__append_8502 = part_acorn.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8503 =
+@COND_i386_multiboot_TRUE@am__append_8504 = $(nodist_part_acorn_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8505 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_acorn.marker
+@COND_i386_multiboot_TRUE@am__append_8506 = part_acorn.mod
+@COND_i386_multiboot_TRUE@am__append_8507 = part_acorn.marker
+@COND_i386_ieee1275_TRUE@am__append_8508 = part_acorn.module
+@COND_i386_ieee1275_TRUE@am__append_8509 = part_acorn.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8510 =
+@COND_i386_ieee1275_TRUE@am__append_8511 = $(nodist_part_acorn_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8512 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_acorn.marker
+@COND_i386_ieee1275_TRUE@am__append_8513 = part_acorn.mod
+@COND_i386_ieee1275_TRUE@am__append_8514 = part_acorn.marker
+@COND_x86_64_efi_TRUE@am__append_8515 = part_acorn.module
+@COND_x86_64_efi_TRUE@am__append_8516 = part_acorn.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8517 =
+@COND_x86_64_efi_TRUE@am__append_8518 = $(nodist_part_acorn_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8519 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_acorn.marker
+@COND_x86_64_efi_TRUE@am__append_8520 = part_acorn.mod
+@COND_x86_64_efi_TRUE@am__append_8521 = part_acorn.marker
+@COND_mips_yeeloong_TRUE@am__append_8522 = part_acorn.module
+@COND_mips_yeeloong_TRUE@am__append_8523 = part_acorn.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8524 =
+@COND_mips_yeeloong_TRUE@am__append_8525 = $(nodist_part_acorn_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8526 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_acorn_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_acorn.marker
+@COND_mips_yeeloong_TRUE@am__append_8527 = part_acorn.mod
+@COND_mips_yeeloong_TRUE@am__append_8528 = part_acorn.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8529 = part_acorn.module
+@COND_sparc64_ieee1275_TRUE@am__append_8530 = part_acorn.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8531 =
+@COND_sparc64_ieee1275_TRUE@am__append_8532 = $(nodist_part_acorn_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8533 = $(nodist_part_acorn_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_acorn.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8534 = part_acorn.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8535 = part_acorn.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8536 = part_acorn.module
+@COND_powerpc_ieee1275_TRUE@am__append_8537 = part_acorn.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8538 =
+@COND_powerpc_ieee1275_TRUE@am__append_8539 = $(nodist_part_acorn_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8540 = $(nodist_part_acorn_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_acorn.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8541 = part_acorn.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8542 = part_acorn.marker
+@COND_emu_TRUE@am__append_8543 = part_amiga.module
+@COND_emu_TRUE@am__append_8544 = part_amiga.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8545 =
+@COND_emu_TRUE@am__append_8546 = $(nodist_part_amiga_module_SOURCES)
+@COND_emu_TRUE@am__append_8547 = $(nodist_part_amiga_module_SOURCES) \
+@COND_emu_TRUE@ part_amiga.marker
+@COND_emu_TRUE@am__append_8548 = part_amiga.mod
+@COND_emu_TRUE@am__append_8549 = part_amiga.marker
+@COND_i386_pc_TRUE@am__append_8550 = part_amiga.module
+@COND_i386_pc_TRUE@am__append_8551 = part_amiga.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8552 =
+@COND_i386_pc_TRUE@am__append_8553 = $(nodist_part_amiga_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8554 = \
+@COND_i386_pc_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_amiga.marker
+@COND_i386_pc_TRUE@am__append_8555 = part_amiga.mod
+@COND_i386_pc_TRUE@am__append_8556 = part_amiga.marker
+@COND_i386_efi_TRUE@am__append_8557 = part_amiga.module
+@COND_i386_efi_TRUE@am__append_8558 = part_amiga.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8559 =
+@COND_i386_efi_TRUE@am__append_8560 = $(nodist_part_amiga_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8561 = \
+@COND_i386_efi_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_amiga.marker
+@COND_i386_efi_TRUE@am__append_8562 = part_amiga.mod
+@COND_i386_efi_TRUE@am__append_8563 = part_amiga.marker
+@COND_i386_qemu_TRUE@am__append_8564 = part_amiga.module
+@COND_i386_qemu_TRUE@am__append_8565 = part_amiga.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8566 =
+@COND_i386_qemu_TRUE@am__append_8567 = $(nodist_part_amiga_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8568 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_amiga.marker
+@COND_i386_qemu_TRUE@am__append_8569 = part_amiga.mod
+@COND_i386_qemu_TRUE@am__append_8570 = part_amiga.marker
+@COND_i386_coreboot_TRUE@am__append_8571 = part_amiga.module
+@COND_i386_coreboot_TRUE@am__append_8572 = part_amiga.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8573 =
+@COND_i386_coreboot_TRUE@am__append_8574 = $(nodist_part_amiga_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8575 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_amiga.marker
+@COND_i386_coreboot_TRUE@am__append_8576 = part_amiga.mod
+@COND_i386_coreboot_TRUE@am__append_8577 = part_amiga.marker
+@COND_i386_multiboot_TRUE@am__append_8578 = part_amiga.module
+@COND_i386_multiboot_TRUE@am__append_8579 = part_amiga.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8580 =
+@COND_i386_multiboot_TRUE@am__append_8581 = $(nodist_part_amiga_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8582 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_amiga.marker
+@COND_i386_multiboot_TRUE@am__append_8583 = part_amiga.mod
+@COND_i386_multiboot_TRUE@am__append_8584 = part_amiga.marker
+@COND_i386_ieee1275_TRUE@am__append_8585 = part_amiga.module
+@COND_i386_ieee1275_TRUE@am__append_8586 = part_amiga.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8587 =
+@COND_i386_ieee1275_TRUE@am__append_8588 = $(nodist_part_amiga_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8589 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_amiga.marker
+@COND_i386_ieee1275_TRUE@am__append_8590 = part_amiga.mod
+@COND_i386_ieee1275_TRUE@am__append_8591 = part_amiga.marker
+@COND_x86_64_efi_TRUE@am__append_8592 = part_amiga.module
+@COND_x86_64_efi_TRUE@am__append_8593 = part_amiga.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8594 =
+@COND_x86_64_efi_TRUE@am__append_8595 = $(nodist_part_amiga_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8596 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_amiga.marker
+@COND_x86_64_efi_TRUE@am__append_8597 = part_amiga.mod
+@COND_x86_64_efi_TRUE@am__append_8598 = part_amiga.marker
+@COND_mips_yeeloong_TRUE@am__append_8599 = part_amiga.module
+@COND_mips_yeeloong_TRUE@am__append_8600 = part_amiga.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8601 =
+@COND_mips_yeeloong_TRUE@am__append_8602 = $(nodist_part_amiga_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8603 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_amiga_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_amiga.marker
+@COND_mips_yeeloong_TRUE@am__append_8604 = part_amiga.mod
+@COND_mips_yeeloong_TRUE@am__append_8605 = part_amiga.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8606 = part_amiga.module
+@COND_sparc64_ieee1275_TRUE@am__append_8607 = part_amiga.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8608 =
+@COND_sparc64_ieee1275_TRUE@am__append_8609 = $(nodist_part_amiga_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8610 = $(nodist_part_amiga_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_amiga.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8611 = part_amiga.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8612 = part_amiga.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8613 = part_amiga.module
+@COND_powerpc_ieee1275_TRUE@am__append_8614 = part_amiga.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8615 =
+@COND_powerpc_ieee1275_TRUE@am__append_8616 = $(nodist_part_amiga_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8617 = $(nodist_part_amiga_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_amiga.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8618 = part_amiga.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8619 = part_amiga.marker
+@COND_emu_TRUE@am__append_8620 = part_apple.module
+@COND_emu_TRUE@am__append_8621 = part_apple.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8622 =
+@COND_emu_TRUE@am__append_8623 = $(nodist_part_apple_module_SOURCES)
+@COND_emu_TRUE@am__append_8624 = $(nodist_part_apple_module_SOURCES) \
+@COND_emu_TRUE@ part_apple.marker
+@COND_emu_TRUE@am__append_8625 = part_apple.mod
+@COND_emu_TRUE@am__append_8626 = part_apple.marker
+@COND_i386_pc_TRUE@am__append_8627 = part_apple.module
+@COND_i386_pc_TRUE@am__append_8628 = part_apple.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8629 =
+@COND_i386_pc_TRUE@am__append_8630 = $(nodist_part_apple_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8631 = \
+@COND_i386_pc_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_apple.marker
+@COND_i386_pc_TRUE@am__append_8632 = part_apple.mod
+@COND_i386_pc_TRUE@am__append_8633 = part_apple.marker
+@COND_i386_efi_TRUE@am__append_8634 = part_apple.module
+@COND_i386_efi_TRUE@am__append_8635 = part_apple.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8636 =
+@COND_i386_efi_TRUE@am__append_8637 = $(nodist_part_apple_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8638 = \
+@COND_i386_efi_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_apple.marker
+@COND_i386_efi_TRUE@am__append_8639 = part_apple.mod
+@COND_i386_efi_TRUE@am__append_8640 = part_apple.marker
+@COND_i386_qemu_TRUE@am__append_8641 = part_apple.module
+@COND_i386_qemu_TRUE@am__append_8642 = part_apple.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8643 =
+@COND_i386_qemu_TRUE@am__append_8644 = $(nodist_part_apple_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8645 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_apple.marker
+@COND_i386_qemu_TRUE@am__append_8646 = part_apple.mod
+@COND_i386_qemu_TRUE@am__append_8647 = part_apple.marker
+@COND_i386_coreboot_TRUE@am__append_8648 = part_apple.module
+@COND_i386_coreboot_TRUE@am__append_8649 = part_apple.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8650 =
+@COND_i386_coreboot_TRUE@am__append_8651 = $(nodist_part_apple_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8652 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_apple.marker
+@COND_i386_coreboot_TRUE@am__append_8653 = part_apple.mod
+@COND_i386_coreboot_TRUE@am__append_8654 = part_apple.marker
+@COND_i386_multiboot_TRUE@am__append_8655 = part_apple.module
+@COND_i386_multiboot_TRUE@am__append_8656 = part_apple.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8657 =
+@COND_i386_multiboot_TRUE@am__append_8658 = $(nodist_part_apple_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8659 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_apple.marker
+@COND_i386_multiboot_TRUE@am__append_8660 = part_apple.mod
+@COND_i386_multiboot_TRUE@am__append_8661 = part_apple.marker
+@COND_i386_ieee1275_TRUE@am__append_8662 = part_apple.module
+@COND_i386_ieee1275_TRUE@am__append_8663 = part_apple.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8664 =
+@COND_i386_ieee1275_TRUE@am__append_8665 = $(nodist_part_apple_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8666 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_apple.marker
+@COND_i386_ieee1275_TRUE@am__append_8667 = part_apple.mod
+@COND_i386_ieee1275_TRUE@am__append_8668 = part_apple.marker
+@COND_x86_64_efi_TRUE@am__append_8669 = part_apple.module
+@COND_x86_64_efi_TRUE@am__append_8670 = part_apple.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8671 =
+@COND_x86_64_efi_TRUE@am__append_8672 = $(nodist_part_apple_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8673 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_apple.marker
+@COND_x86_64_efi_TRUE@am__append_8674 = part_apple.mod
+@COND_x86_64_efi_TRUE@am__append_8675 = part_apple.marker
+@COND_mips_yeeloong_TRUE@am__append_8676 = part_apple.module
+@COND_mips_yeeloong_TRUE@am__append_8677 = part_apple.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8678 =
+@COND_mips_yeeloong_TRUE@am__append_8679 = $(nodist_part_apple_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8680 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_apple_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_apple.marker
+@COND_mips_yeeloong_TRUE@am__append_8681 = part_apple.mod
+@COND_mips_yeeloong_TRUE@am__append_8682 = part_apple.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8683 = part_apple.module
+@COND_sparc64_ieee1275_TRUE@am__append_8684 = part_apple.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8685 =
+@COND_sparc64_ieee1275_TRUE@am__append_8686 = $(nodist_part_apple_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8687 = $(nodist_part_apple_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_apple.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8688 = part_apple.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8689 = part_apple.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8690 = part_apple.module
+@COND_powerpc_ieee1275_TRUE@am__append_8691 = part_apple.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8692 =
+@COND_powerpc_ieee1275_TRUE@am__append_8693 = $(nodist_part_apple_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8694 = $(nodist_part_apple_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_apple.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8695 = part_apple.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8696 = part_apple.marker
+@COND_emu_TRUE@am__append_8697 = part_gpt.module
+@COND_emu_TRUE@am__append_8698 = part_gpt.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8699 =
+@COND_emu_TRUE@am__append_8700 = $(nodist_part_gpt_module_SOURCES)
+@COND_emu_TRUE@am__append_8701 = $(nodist_part_gpt_module_SOURCES) \
+@COND_emu_TRUE@ part_gpt.marker
+@COND_emu_TRUE@am__append_8702 = part_gpt.mod
+@COND_emu_TRUE@am__append_8703 = part_gpt.marker
+@COND_i386_pc_TRUE@am__append_8704 = part_gpt.module
+@COND_i386_pc_TRUE@am__append_8705 = part_gpt.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8706 =
+@COND_i386_pc_TRUE@am__append_8707 = $(nodist_part_gpt_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8708 = \
+@COND_i386_pc_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_gpt.marker
+@COND_i386_pc_TRUE@am__append_8709 = part_gpt.mod
+@COND_i386_pc_TRUE@am__append_8710 = part_gpt.marker
+@COND_i386_efi_TRUE@am__append_8711 = part_gpt.module
+@COND_i386_efi_TRUE@am__append_8712 = part_gpt.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8713 =
+@COND_i386_efi_TRUE@am__append_8714 = $(nodist_part_gpt_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8715 = \
+@COND_i386_efi_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_gpt.marker
+@COND_i386_efi_TRUE@am__append_8716 = part_gpt.mod
+@COND_i386_efi_TRUE@am__append_8717 = part_gpt.marker
+@COND_i386_qemu_TRUE@am__append_8718 = part_gpt.module
+@COND_i386_qemu_TRUE@am__append_8719 = part_gpt.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8720 =
+@COND_i386_qemu_TRUE@am__append_8721 = $(nodist_part_gpt_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8722 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_gpt.marker
+@COND_i386_qemu_TRUE@am__append_8723 = part_gpt.mod
+@COND_i386_qemu_TRUE@am__append_8724 = part_gpt.marker
+@COND_i386_coreboot_TRUE@am__append_8725 = part_gpt.module
+@COND_i386_coreboot_TRUE@am__append_8726 = part_gpt.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8727 =
+@COND_i386_coreboot_TRUE@am__append_8728 = $(nodist_part_gpt_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8729 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_gpt.marker
+@COND_i386_coreboot_TRUE@am__append_8730 = part_gpt.mod
+@COND_i386_coreboot_TRUE@am__append_8731 = part_gpt.marker
+@COND_i386_multiboot_TRUE@am__append_8732 = part_gpt.module
+@COND_i386_multiboot_TRUE@am__append_8733 = part_gpt.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8734 =
+@COND_i386_multiboot_TRUE@am__append_8735 = $(nodist_part_gpt_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8736 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_gpt.marker
+@COND_i386_multiboot_TRUE@am__append_8737 = part_gpt.mod
+@COND_i386_multiboot_TRUE@am__append_8738 = part_gpt.marker
+@COND_i386_ieee1275_TRUE@am__append_8739 = part_gpt.module
+@COND_i386_ieee1275_TRUE@am__append_8740 = part_gpt.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8741 =
+@COND_i386_ieee1275_TRUE@am__append_8742 = $(nodist_part_gpt_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8743 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_gpt.marker
+@COND_i386_ieee1275_TRUE@am__append_8744 = part_gpt.mod
+@COND_i386_ieee1275_TRUE@am__append_8745 = part_gpt.marker
+@COND_x86_64_efi_TRUE@am__append_8746 = part_gpt.module
+@COND_x86_64_efi_TRUE@am__append_8747 = part_gpt.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8748 =
+@COND_x86_64_efi_TRUE@am__append_8749 = $(nodist_part_gpt_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8750 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_gpt.marker
+@COND_x86_64_efi_TRUE@am__append_8751 = part_gpt.mod
+@COND_x86_64_efi_TRUE@am__append_8752 = part_gpt.marker
+@COND_mips_yeeloong_TRUE@am__append_8753 = part_gpt.module
+@COND_mips_yeeloong_TRUE@am__append_8754 = part_gpt.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8755 =
+@COND_mips_yeeloong_TRUE@am__append_8756 = $(nodist_part_gpt_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8757 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_gpt.marker
+@COND_mips_yeeloong_TRUE@am__append_8758 = part_gpt.mod
+@COND_mips_yeeloong_TRUE@am__append_8759 = part_gpt.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8760 = part_gpt.module
+@COND_sparc64_ieee1275_TRUE@am__append_8761 = part_gpt.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8762 =
+@COND_sparc64_ieee1275_TRUE@am__append_8763 = $(nodist_part_gpt_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8764 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_gpt.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8765 = part_gpt.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8766 = part_gpt.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8767 = part_gpt.module
+@COND_powerpc_ieee1275_TRUE@am__append_8768 = part_gpt.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8769 =
+@COND_powerpc_ieee1275_TRUE@am__append_8770 = $(nodist_part_gpt_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8771 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_part_gpt_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_gpt.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8772 = part_gpt.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8773 = part_gpt.marker
+@COND_emu_TRUE@am__append_8774 = part_msdos.module
+@COND_emu_TRUE@am__append_8775 = part_msdos.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8776 =
+@COND_emu_TRUE@am__append_8777 = $(nodist_part_msdos_module_SOURCES)
+@COND_emu_TRUE@am__append_8778 = $(nodist_part_msdos_module_SOURCES) \
+@COND_emu_TRUE@ part_msdos.marker
+@COND_emu_TRUE@am__append_8779 = part_msdos.mod
+@COND_emu_TRUE@am__append_8780 = part_msdos.marker
+@COND_i386_pc_TRUE@am__append_8781 = part_msdos.module
+@COND_i386_pc_TRUE@am__append_8782 = part_msdos.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8783 =
+@COND_i386_pc_TRUE@am__append_8784 = $(nodist_part_msdos_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8785 = \
+@COND_i386_pc_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_msdos.marker
+@COND_i386_pc_TRUE@am__append_8786 = part_msdos.mod
+@COND_i386_pc_TRUE@am__append_8787 = part_msdos.marker
+@COND_i386_efi_TRUE@am__append_8788 = part_msdos.module
+@COND_i386_efi_TRUE@am__append_8789 = part_msdos.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8790 =
+@COND_i386_efi_TRUE@am__append_8791 = $(nodist_part_msdos_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8792 = \
+@COND_i386_efi_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_msdos.marker
+@COND_i386_efi_TRUE@am__append_8793 = part_msdos.mod
+@COND_i386_efi_TRUE@am__append_8794 = part_msdos.marker
+@COND_i386_qemu_TRUE@am__append_8795 = part_msdos.module
+@COND_i386_qemu_TRUE@am__append_8796 = part_msdos.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8797 =
+@COND_i386_qemu_TRUE@am__append_8798 = $(nodist_part_msdos_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8799 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_msdos.marker
+@COND_i386_qemu_TRUE@am__append_8800 = part_msdos.mod
+@COND_i386_qemu_TRUE@am__append_8801 = part_msdos.marker
+@COND_i386_coreboot_TRUE@am__append_8802 = part_msdos.module
+@COND_i386_coreboot_TRUE@am__append_8803 = part_msdos.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8804 =
+@COND_i386_coreboot_TRUE@am__append_8805 = $(nodist_part_msdos_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8806 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_msdos.marker
+@COND_i386_coreboot_TRUE@am__append_8807 = part_msdos.mod
+@COND_i386_coreboot_TRUE@am__append_8808 = part_msdos.marker
+@COND_i386_multiboot_TRUE@am__append_8809 = part_msdos.module
+@COND_i386_multiboot_TRUE@am__append_8810 = part_msdos.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8811 =
+@COND_i386_multiboot_TRUE@am__append_8812 = $(nodist_part_msdos_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8813 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_msdos.marker
+@COND_i386_multiboot_TRUE@am__append_8814 = part_msdos.mod
+@COND_i386_multiboot_TRUE@am__append_8815 = part_msdos.marker
+@COND_i386_ieee1275_TRUE@am__append_8816 = part_msdos.module
+@COND_i386_ieee1275_TRUE@am__append_8817 = part_msdos.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8818 =
+@COND_i386_ieee1275_TRUE@am__append_8819 = $(nodist_part_msdos_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8820 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_msdos.marker
+@COND_i386_ieee1275_TRUE@am__append_8821 = part_msdos.mod
+@COND_i386_ieee1275_TRUE@am__append_8822 = part_msdos.marker
+@COND_x86_64_efi_TRUE@am__append_8823 = part_msdos.module
+@COND_x86_64_efi_TRUE@am__append_8824 = part_msdos.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8825 =
+@COND_x86_64_efi_TRUE@am__append_8826 = $(nodist_part_msdos_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8827 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_msdos.marker
+@COND_x86_64_efi_TRUE@am__append_8828 = part_msdos.mod
+@COND_x86_64_efi_TRUE@am__append_8829 = part_msdos.marker
+@COND_mips_yeeloong_TRUE@am__append_8830 = part_msdos.module
+@COND_mips_yeeloong_TRUE@am__append_8831 = part_msdos.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8832 =
+@COND_mips_yeeloong_TRUE@am__append_8833 = $(nodist_part_msdos_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8834 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_msdos_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_msdos.marker
+@COND_mips_yeeloong_TRUE@am__append_8835 = part_msdos.mod
+@COND_mips_yeeloong_TRUE@am__append_8836 = part_msdos.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8837 = part_msdos.module
+@COND_sparc64_ieee1275_TRUE@am__append_8838 = part_msdos.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8839 =
+@COND_sparc64_ieee1275_TRUE@am__append_8840 = $(nodist_part_msdos_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8841 = $(nodist_part_msdos_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_msdos.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8842 = part_msdos.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8843 = part_msdos.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8844 = part_msdos.module
+@COND_powerpc_ieee1275_TRUE@am__append_8845 = part_msdos.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8846 =
+@COND_powerpc_ieee1275_TRUE@am__append_8847 = $(nodist_part_msdos_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8848 = $(nodist_part_msdos_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_msdos.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8849 = part_msdos.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8850 = part_msdos.marker
+@COND_emu_TRUE@am__append_8851 = part_sun.module
+@COND_emu_TRUE@am__append_8852 = part_sun.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8853 =
+@COND_emu_TRUE@am__append_8854 = $(nodist_part_sun_module_SOURCES)
+@COND_emu_TRUE@am__append_8855 = $(nodist_part_sun_module_SOURCES) \
+@COND_emu_TRUE@ part_sun.marker
+@COND_emu_TRUE@am__append_8856 = part_sun.mod
+@COND_emu_TRUE@am__append_8857 = part_sun.marker
+@COND_i386_pc_TRUE@am__append_8858 = part_sun.module
+@COND_i386_pc_TRUE@am__append_8859 = part_sun.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8860 =
+@COND_i386_pc_TRUE@am__append_8861 = $(nodist_part_sun_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8862 = \
+@COND_i386_pc_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_sun.marker
+@COND_i386_pc_TRUE@am__append_8863 = part_sun.mod
+@COND_i386_pc_TRUE@am__append_8864 = part_sun.marker
+@COND_i386_efi_TRUE@am__append_8865 = part_sun.module
+@COND_i386_efi_TRUE@am__append_8866 = part_sun.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8867 =
+@COND_i386_efi_TRUE@am__append_8868 = $(nodist_part_sun_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8869 = \
+@COND_i386_efi_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_sun.marker
+@COND_i386_efi_TRUE@am__append_8870 = part_sun.mod
+@COND_i386_efi_TRUE@am__append_8871 = part_sun.marker
+@COND_i386_qemu_TRUE@am__append_8872 = part_sun.module
+@COND_i386_qemu_TRUE@am__append_8873 = part_sun.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8874 =
+@COND_i386_qemu_TRUE@am__append_8875 = $(nodist_part_sun_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8876 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_sun.marker
+@COND_i386_qemu_TRUE@am__append_8877 = part_sun.mod
+@COND_i386_qemu_TRUE@am__append_8878 = part_sun.marker
+@COND_i386_coreboot_TRUE@am__append_8879 = part_sun.module
+@COND_i386_coreboot_TRUE@am__append_8880 = part_sun.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8881 =
+@COND_i386_coreboot_TRUE@am__append_8882 = $(nodist_part_sun_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8883 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_sun.marker
+@COND_i386_coreboot_TRUE@am__append_8884 = part_sun.mod
+@COND_i386_coreboot_TRUE@am__append_8885 = part_sun.marker
+@COND_i386_multiboot_TRUE@am__append_8886 = part_sun.module
+@COND_i386_multiboot_TRUE@am__append_8887 = part_sun.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8888 =
+@COND_i386_multiboot_TRUE@am__append_8889 = $(nodist_part_sun_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8890 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_sun.marker
+@COND_i386_multiboot_TRUE@am__append_8891 = part_sun.mod
+@COND_i386_multiboot_TRUE@am__append_8892 = part_sun.marker
+@COND_i386_ieee1275_TRUE@am__append_8893 = part_sun.module
+@COND_i386_ieee1275_TRUE@am__append_8894 = part_sun.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8895 =
+@COND_i386_ieee1275_TRUE@am__append_8896 = $(nodist_part_sun_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8897 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_sun.marker
+@COND_i386_ieee1275_TRUE@am__append_8898 = part_sun.mod
+@COND_i386_ieee1275_TRUE@am__append_8899 = part_sun.marker
+@COND_x86_64_efi_TRUE@am__append_8900 = part_sun.module
+@COND_x86_64_efi_TRUE@am__append_8901 = part_sun.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8902 =
+@COND_x86_64_efi_TRUE@am__append_8903 = $(nodist_part_sun_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8904 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_sun.marker
+@COND_x86_64_efi_TRUE@am__append_8905 = part_sun.mod
+@COND_x86_64_efi_TRUE@am__append_8906 = part_sun.marker
+@COND_mips_yeeloong_TRUE@am__append_8907 = part_sun.module
+@COND_mips_yeeloong_TRUE@am__append_8908 = part_sun.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8909 =
+@COND_mips_yeeloong_TRUE@am__append_8910 = $(nodist_part_sun_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8911 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_sun.marker
+@COND_mips_yeeloong_TRUE@am__append_8912 = part_sun.mod
+@COND_mips_yeeloong_TRUE@am__append_8913 = part_sun.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8914 = part_sun.module
+@COND_sparc64_ieee1275_TRUE@am__append_8915 = part_sun.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8916 =
+@COND_sparc64_ieee1275_TRUE@am__append_8917 = $(nodist_part_sun_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8918 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_sun.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8919 = part_sun.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8920 = part_sun.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8921 = part_sun.module
+@COND_powerpc_ieee1275_TRUE@am__append_8922 = part_sun.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_8923 =
+@COND_powerpc_ieee1275_TRUE@am__append_8924 = $(nodist_part_sun_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_8925 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_part_sun_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_sun.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8926 = part_sun.mod
+@COND_powerpc_ieee1275_TRUE@am__append_8927 = part_sun.marker
+@COND_emu_TRUE@am__append_8928 = part_bsd.module
+@COND_emu_TRUE@am__append_8929 = part_bsd.module$(EXEEXT)
+@COND_emu_TRUE@am__append_8930 =
+@COND_emu_TRUE@am__append_8931 = $(nodist_part_bsd_module_SOURCES)
+@COND_emu_TRUE@am__append_8932 = $(nodist_part_bsd_module_SOURCES) \
+@COND_emu_TRUE@ part_bsd.marker
+@COND_emu_TRUE@am__append_8933 = part_bsd.mod
+@COND_emu_TRUE@am__append_8934 = part_bsd.marker
+@COND_i386_pc_TRUE@am__append_8935 = part_bsd.module
+@COND_i386_pc_TRUE@am__append_8936 = part_bsd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_8937 =
+@COND_i386_pc_TRUE@am__append_8938 = $(nodist_part_bsd_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_8939 = \
+@COND_i386_pc_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_bsd.marker
+@COND_i386_pc_TRUE@am__append_8940 = part_bsd.mod
+@COND_i386_pc_TRUE@am__append_8941 = part_bsd.marker
+@COND_i386_efi_TRUE@am__append_8942 = part_bsd.module
+@COND_i386_efi_TRUE@am__append_8943 = part_bsd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_8944 =
+@COND_i386_efi_TRUE@am__append_8945 = $(nodist_part_bsd_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_8946 = \
+@COND_i386_efi_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_bsd.marker
+@COND_i386_efi_TRUE@am__append_8947 = part_bsd.mod
+@COND_i386_efi_TRUE@am__append_8948 = part_bsd.marker
+@COND_i386_qemu_TRUE@am__append_8949 = part_bsd.module
+@COND_i386_qemu_TRUE@am__append_8950 = part_bsd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_8951 =
+@COND_i386_qemu_TRUE@am__append_8952 = $(nodist_part_bsd_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_8953 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_bsd.marker
+@COND_i386_qemu_TRUE@am__append_8954 = part_bsd.mod
+@COND_i386_qemu_TRUE@am__append_8955 = part_bsd.marker
+@COND_i386_coreboot_TRUE@am__append_8956 = part_bsd.module
+@COND_i386_coreboot_TRUE@am__append_8957 = part_bsd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_8958 =
+@COND_i386_coreboot_TRUE@am__append_8959 = $(nodist_part_bsd_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_8960 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_bsd.marker
+@COND_i386_coreboot_TRUE@am__append_8961 = part_bsd.mod
+@COND_i386_coreboot_TRUE@am__append_8962 = part_bsd.marker
+@COND_i386_multiboot_TRUE@am__append_8963 = part_bsd.module
+@COND_i386_multiboot_TRUE@am__append_8964 = part_bsd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_8965 =
+@COND_i386_multiboot_TRUE@am__append_8966 = $(nodist_part_bsd_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_8967 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_bsd.marker
+@COND_i386_multiboot_TRUE@am__append_8968 = part_bsd.mod
+@COND_i386_multiboot_TRUE@am__append_8969 = part_bsd.marker
+@COND_i386_ieee1275_TRUE@am__append_8970 = part_bsd.module
+@COND_i386_ieee1275_TRUE@am__append_8971 = part_bsd.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_8972 =
+@COND_i386_ieee1275_TRUE@am__append_8973 = $(nodist_part_bsd_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_8974 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_bsd.marker
+@COND_i386_ieee1275_TRUE@am__append_8975 = part_bsd.mod
+@COND_i386_ieee1275_TRUE@am__append_8976 = part_bsd.marker
+@COND_x86_64_efi_TRUE@am__append_8977 = part_bsd.module
+@COND_x86_64_efi_TRUE@am__append_8978 = part_bsd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_8979 =
+@COND_x86_64_efi_TRUE@am__append_8980 = $(nodist_part_bsd_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_8981 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_bsd.marker
+@COND_x86_64_efi_TRUE@am__append_8982 = part_bsd.mod
+@COND_x86_64_efi_TRUE@am__append_8983 = part_bsd.marker
+@COND_mips_yeeloong_TRUE@am__append_8984 = part_bsd.module
+@COND_mips_yeeloong_TRUE@am__append_8985 = part_bsd.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_8986 =
+@COND_mips_yeeloong_TRUE@am__append_8987 = $(nodist_part_bsd_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_8988 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_bsd.marker
+@COND_mips_yeeloong_TRUE@am__append_8989 = part_bsd.mod
+@COND_mips_yeeloong_TRUE@am__append_8990 = part_bsd.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8991 = part_bsd.module
+@COND_sparc64_ieee1275_TRUE@am__append_8992 = part_bsd.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_8993 =
+@COND_sparc64_ieee1275_TRUE@am__append_8994 = $(nodist_part_bsd_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_8995 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_bsd.marker
+@COND_sparc64_ieee1275_TRUE@am__append_8996 = part_bsd.mod
+@COND_sparc64_ieee1275_TRUE@am__append_8997 = part_bsd.marker
+@COND_powerpc_ieee1275_TRUE@am__append_8998 = part_bsd.module
+@COND_powerpc_ieee1275_TRUE@am__append_8999 = part_bsd.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9000 =
+@COND_powerpc_ieee1275_TRUE@am__append_9001 = $(nodist_part_bsd_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9002 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_part_bsd_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_bsd.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9003 = part_bsd.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9004 = part_bsd.marker
+@COND_emu_TRUE@am__append_9005 = part_sunpc.module
+@COND_emu_TRUE@am__append_9006 = part_sunpc.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9007 =
+@COND_emu_TRUE@am__append_9008 = $(nodist_part_sunpc_module_SOURCES)
+@COND_emu_TRUE@am__append_9009 = $(nodist_part_sunpc_module_SOURCES) \
+@COND_emu_TRUE@ part_sunpc.marker
+@COND_emu_TRUE@am__append_9010 = part_sunpc.mod
+@COND_emu_TRUE@am__append_9011 = part_sunpc.marker
+@COND_i386_pc_TRUE@am__append_9012 = part_sunpc.module
+@COND_i386_pc_TRUE@am__append_9013 = part_sunpc.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9014 =
+@COND_i386_pc_TRUE@am__append_9015 = $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9016 = \
+@COND_i386_pc_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_i386_pc_TRUE@ part_sunpc.marker
+@COND_i386_pc_TRUE@am__append_9017 = part_sunpc.mod
+@COND_i386_pc_TRUE@am__append_9018 = part_sunpc.marker
+@COND_i386_efi_TRUE@am__append_9019 = part_sunpc.module
+@COND_i386_efi_TRUE@am__append_9020 = part_sunpc.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9021 =
+@COND_i386_efi_TRUE@am__append_9022 = $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9023 = \
+@COND_i386_efi_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_i386_efi_TRUE@ part_sunpc.marker
+@COND_i386_efi_TRUE@am__append_9024 = part_sunpc.mod
+@COND_i386_efi_TRUE@am__append_9025 = part_sunpc.marker
+@COND_i386_qemu_TRUE@am__append_9026 = part_sunpc.module
+@COND_i386_qemu_TRUE@am__append_9027 = part_sunpc.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9028 =
+@COND_i386_qemu_TRUE@am__append_9029 = $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9030 = \
+@COND_i386_qemu_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_i386_qemu_TRUE@ part_sunpc.marker
+@COND_i386_qemu_TRUE@am__append_9031 = part_sunpc.mod
+@COND_i386_qemu_TRUE@am__append_9032 = part_sunpc.marker
+@COND_i386_coreboot_TRUE@am__append_9033 = part_sunpc.module
+@COND_i386_coreboot_TRUE@am__append_9034 = part_sunpc.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9035 =
+@COND_i386_coreboot_TRUE@am__append_9036 = $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9037 = \
+@COND_i386_coreboot_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ part_sunpc.marker
+@COND_i386_coreboot_TRUE@am__append_9038 = part_sunpc.mod
+@COND_i386_coreboot_TRUE@am__append_9039 = part_sunpc.marker
+@COND_i386_multiboot_TRUE@am__append_9040 = part_sunpc.module
+@COND_i386_multiboot_TRUE@am__append_9041 = part_sunpc.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9042 =
+@COND_i386_multiboot_TRUE@am__append_9043 = $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9044 = \
+@COND_i386_multiboot_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ part_sunpc.marker
+@COND_i386_multiboot_TRUE@am__append_9045 = part_sunpc.mod
+@COND_i386_multiboot_TRUE@am__append_9046 = part_sunpc.marker
+@COND_i386_ieee1275_TRUE@am__append_9047 = part_sunpc.module
+@COND_i386_ieee1275_TRUE@am__append_9048 = part_sunpc.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9049 =
+@COND_i386_ieee1275_TRUE@am__append_9050 = $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9051 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ part_sunpc.marker
+@COND_i386_ieee1275_TRUE@am__append_9052 = part_sunpc.mod
+@COND_i386_ieee1275_TRUE@am__append_9053 = part_sunpc.marker
+@COND_x86_64_efi_TRUE@am__append_9054 = part_sunpc.module
+@COND_x86_64_efi_TRUE@am__append_9055 = part_sunpc.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9056 =
+@COND_x86_64_efi_TRUE@am__append_9057 = $(nodist_part_sunpc_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9058 = \
+@COND_x86_64_efi_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ part_sunpc.marker
+@COND_x86_64_efi_TRUE@am__append_9059 = part_sunpc.mod
+@COND_x86_64_efi_TRUE@am__append_9060 = part_sunpc.marker
+@COND_mips_yeeloong_TRUE@am__append_9061 = part_sunpc.module
+@COND_mips_yeeloong_TRUE@am__append_9062 = part_sunpc.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_9063 =
+@COND_mips_yeeloong_TRUE@am__append_9064 = $(nodist_part_sunpc_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_9065 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_part_sunpc_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ part_sunpc.marker
+@COND_mips_yeeloong_TRUE@am__append_9066 = part_sunpc.mod
+@COND_mips_yeeloong_TRUE@am__append_9067 = part_sunpc.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9068 = part_sunpc.module
+@COND_sparc64_ieee1275_TRUE@am__append_9069 = part_sunpc.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9070 =
+@COND_sparc64_ieee1275_TRUE@am__append_9071 = $(nodist_part_sunpc_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9072 = $(nodist_part_sunpc_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ part_sunpc.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9073 = part_sunpc.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9074 = part_sunpc.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9075 = part_sunpc.module
+@COND_powerpc_ieee1275_TRUE@am__append_9076 = part_sunpc.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9077 =
+@COND_powerpc_ieee1275_TRUE@am__append_9078 = $(nodist_part_sunpc_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9079 = $(nodist_part_sunpc_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ part_sunpc.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9080 = part_sunpc.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9081 = part_sunpc.marker
+@COND_emu_TRUE@am__append_9082 = msdospart.module
+@COND_emu_TRUE@am__append_9083 = msdospart.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9084 =
+@COND_emu_TRUE@am__append_9085 = $(nodist_msdospart_module_SOURCES)
+@COND_emu_TRUE@am__append_9086 = $(nodist_msdospart_module_SOURCES) \
+@COND_emu_TRUE@ msdospart.marker
+@COND_emu_TRUE@am__append_9087 = msdospart.mod
+@COND_emu_TRUE@am__append_9088 = msdospart.marker
+@COND_i386_pc_TRUE@am__append_9089 = msdospart.module
+@COND_i386_pc_TRUE@am__append_9090 = msdospart.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9091 =
+@COND_i386_pc_TRUE@am__append_9092 = $(nodist_msdospart_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9093 = \
+@COND_i386_pc_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_i386_pc_TRUE@ msdospart.marker
+@COND_i386_pc_TRUE@am__append_9094 = msdospart.mod
+@COND_i386_pc_TRUE@am__append_9095 = msdospart.marker
+@COND_i386_efi_TRUE@am__append_9096 = msdospart.module
+@COND_i386_efi_TRUE@am__append_9097 = msdospart.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9098 =
+@COND_i386_efi_TRUE@am__append_9099 = $(nodist_msdospart_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9100 = \
+@COND_i386_efi_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_i386_efi_TRUE@ msdospart.marker
+@COND_i386_efi_TRUE@am__append_9101 = msdospart.mod
+@COND_i386_efi_TRUE@am__append_9102 = msdospart.marker
+@COND_i386_qemu_TRUE@am__append_9103 = msdospart.module
+@COND_i386_qemu_TRUE@am__append_9104 = msdospart.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9105 =
+@COND_i386_qemu_TRUE@am__append_9106 = $(nodist_msdospart_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9107 = \
+@COND_i386_qemu_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_i386_qemu_TRUE@ msdospart.marker
+@COND_i386_qemu_TRUE@am__append_9108 = msdospart.mod
+@COND_i386_qemu_TRUE@am__append_9109 = msdospart.marker
+@COND_i386_coreboot_TRUE@am__append_9110 = msdospart.module
+@COND_i386_coreboot_TRUE@am__append_9111 = msdospart.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9112 =
+@COND_i386_coreboot_TRUE@am__append_9113 = $(nodist_msdospart_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9114 = \
+@COND_i386_coreboot_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ msdospart.marker
+@COND_i386_coreboot_TRUE@am__append_9115 = msdospart.mod
+@COND_i386_coreboot_TRUE@am__append_9116 = msdospart.marker
+@COND_i386_multiboot_TRUE@am__append_9117 = msdospart.module
+@COND_i386_multiboot_TRUE@am__append_9118 = msdospart.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9119 =
+@COND_i386_multiboot_TRUE@am__append_9120 = $(nodist_msdospart_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9121 = \
+@COND_i386_multiboot_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ msdospart.marker
+@COND_i386_multiboot_TRUE@am__append_9122 = msdospart.mod
+@COND_i386_multiboot_TRUE@am__append_9123 = msdospart.marker
+@COND_i386_ieee1275_TRUE@am__append_9124 = msdospart.module
+@COND_i386_ieee1275_TRUE@am__append_9125 = msdospart.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9126 =
+@COND_i386_ieee1275_TRUE@am__append_9127 = $(nodist_msdospart_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9128 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ msdospart.marker
+@COND_i386_ieee1275_TRUE@am__append_9129 = msdospart.mod
+@COND_i386_ieee1275_TRUE@am__append_9130 = msdospart.marker
+@COND_x86_64_efi_TRUE@am__append_9131 = msdospart.module
+@COND_x86_64_efi_TRUE@am__append_9132 = msdospart.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9133 =
+@COND_x86_64_efi_TRUE@am__append_9134 = $(nodist_msdospart_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9135 = \
+@COND_x86_64_efi_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ msdospart.marker
+@COND_x86_64_efi_TRUE@am__append_9136 = msdospart.mod
+@COND_x86_64_efi_TRUE@am__append_9137 = msdospart.marker
+@COND_mips_yeeloong_TRUE@am__append_9138 = msdospart.module
+@COND_mips_yeeloong_TRUE@am__append_9139 = msdospart.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_9140 =
+@COND_mips_yeeloong_TRUE@am__append_9141 = $(nodist_msdospart_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_9142 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_msdospart_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ msdospart.marker
+@COND_mips_yeeloong_TRUE@am__append_9143 = msdospart.mod
+@COND_mips_yeeloong_TRUE@am__append_9144 = msdospart.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9145 = msdospart.module
+@COND_sparc64_ieee1275_TRUE@am__append_9146 = msdospart.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9147 =
+@COND_sparc64_ieee1275_TRUE@am__append_9148 = $(nodist_msdospart_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9149 = $(nodist_msdospart_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ msdospart.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9150 = msdospart.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9151 = msdospart.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9152 = msdospart.module
+@COND_powerpc_ieee1275_TRUE@am__append_9153 = msdospart.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9154 =
+@COND_powerpc_ieee1275_TRUE@am__append_9155 = $(nodist_msdospart_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9156 = $(nodist_msdospart_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ msdospart.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9157 = msdospart.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9158 = msdospart.marker
+@COND_i386_pc_TRUE@am__append_9159 = at_keyboard.module
+@COND_i386_pc_TRUE@am__append_9160 = at_keyboard.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9161 =
+@COND_i386_pc_TRUE@am__append_9162 = $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9163 = \
+@COND_i386_pc_TRUE@ $(nodist_at_keyboard_module_SOURCES) \
+@COND_i386_pc_TRUE@ at_keyboard.marker
+@COND_i386_pc_TRUE@am__append_9164 = at_keyboard.mod
+@COND_i386_pc_TRUE@am__append_9165 = at_keyboard.marker
+@COND_i386_efi_TRUE@am__append_9166 = at_keyboard.module
+@COND_i386_efi_TRUE@am__append_9167 = at_keyboard.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9168 =
+@COND_i386_efi_TRUE@am__append_9169 = $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9170 = \
+@COND_i386_efi_TRUE@ $(nodist_at_keyboard_module_SOURCES) \
+@COND_i386_efi_TRUE@ at_keyboard.marker
+@COND_i386_efi_TRUE@am__append_9171 = at_keyboard.mod
+@COND_i386_efi_TRUE@am__append_9172 = at_keyboard.marker
+@COND_i386_qemu_TRUE@am__append_9173 = at_keyboard.module
+@COND_i386_qemu_TRUE@am__append_9174 = at_keyboard.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9175 =
+@COND_i386_qemu_TRUE@am__append_9176 = $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9177 = \
+@COND_i386_qemu_TRUE@ $(nodist_at_keyboard_module_SOURCES) \
+@COND_i386_qemu_TRUE@ at_keyboard.marker
+@COND_i386_qemu_TRUE@am__append_9178 = at_keyboard.mod
+@COND_i386_qemu_TRUE@am__append_9179 = at_keyboard.marker
+@COND_i386_coreboot_TRUE@am__append_9180 = at_keyboard.module
+@COND_i386_coreboot_TRUE@am__append_9181 = at_keyboard.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9182 =
+@COND_i386_coreboot_TRUE@am__append_9183 = $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9184 = \
+@COND_i386_coreboot_TRUE@ $(nodist_at_keyboard_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ at_keyboard.marker
+@COND_i386_coreboot_TRUE@am__append_9185 = at_keyboard.mod
+@COND_i386_coreboot_TRUE@am__append_9186 = at_keyboard.marker
+@COND_i386_multiboot_TRUE@am__append_9187 = at_keyboard.module
+@COND_i386_multiboot_TRUE@am__append_9188 = at_keyboard.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9189 =
+@COND_i386_multiboot_TRUE@am__append_9190 = $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9191 = $(nodist_at_keyboard_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ at_keyboard.marker
+@COND_i386_multiboot_TRUE@am__append_9192 = at_keyboard.mod
+@COND_i386_multiboot_TRUE@am__append_9193 = at_keyboard.marker
+@COND_i386_ieee1275_TRUE@am__append_9194 = at_keyboard.module
+@COND_i386_ieee1275_TRUE@am__append_9195 = at_keyboard.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9196 =
+@COND_i386_ieee1275_TRUE@am__append_9197 = $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9198 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_at_keyboard_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ at_keyboard.marker
+@COND_i386_ieee1275_TRUE@am__append_9199 = at_keyboard.mod
+@COND_i386_ieee1275_TRUE@am__append_9200 = at_keyboard.marker
+@COND_x86_64_efi_TRUE@am__append_9201 = at_keyboard.module
+@COND_x86_64_efi_TRUE@am__append_9202 = at_keyboard.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9203 =
+@COND_x86_64_efi_TRUE@am__append_9204 = $(nodist_at_keyboard_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9205 = \
+@COND_x86_64_efi_TRUE@ $(nodist_at_keyboard_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ at_keyboard.marker
+@COND_x86_64_efi_TRUE@am__append_9206 = at_keyboard.mod
+@COND_x86_64_efi_TRUE@am__append_9207 = at_keyboard.marker
+@COND_emu_TRUE@am__append_9208 = gfxterm.module
+@COND_emu_TRUE@am__append_9209 = gfxterm.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9210 =
+@COND_emu_TRUE@am__append_9211 = $(nodist_gfxterm_module_SOURCES)
+@COND_emu_TRUE@am__append_9212 = $(nodist_gfxterm_module_SOURCES) \
+@COND_emu_TRUE@ gfxterm.marker
+@COND_emu_TRUE@am__append_9213 = gfxterm.mod
+@COND_emu_TRUE@am__append_9214 = gfxterm.marker
+@COND_i386_pc_TRUE@am__append_9215 = gfxterm.module
+@COND_i386_pc_TRUE@am__append_9216 = gfxterm.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9217 =
+@COND_i386_pc_TRUE@am__append_9218 = $(nodist_gfxterm_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9219 = $(nodist_gfxterm_module_SOURCES) \
+@COND_i386_pc_TRUE@ gfxterm.marker
+@COND_i386_pc_TRUE@am__append_9220 = gfxterm.mod
+@COND_i386_pc_TRUE@am__append_9221 = gfxterm.marker
+@COND_i386_efi_TRUE@am__append_9222 = gfxterm.module
+@COND_i386_efi_TRUE@am__append_9223 = gfxterm.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9224 =
+@COND_i386_efi_TRUE@am__append_9225 = $(nodist_gfxterm_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9226 = \
+@COND_i386_efi_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_i386_efi_TRUE@ gfxterm.marker
+@COND_i386_efi_TRUE@am__append_9227 = gfxterm.mod
+@COND_i386_efi_TRUE@am__append_9228 = gfxterm.marker
+@COND_i386_qemu_TRUE@am__append_9229 = gfxterm.module
+@COND_i386_qemu_TRUE@am__append_9230 = gfxterm.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9231 =
+@COND_i386_qemu_TRUE@am__append_9232 = $(nodist_gfxterm_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9233 = \
+@COND_i386_qemu_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gfxterm.marker
+@COND_i386_qemu_TRUE@am__append_9234 = gfxterm.mod
+@COND_i386_qemu_TRUE@am__append_9235 = gfxterm.marker
+@COND_i386_coreboot_TRUE@am__append_9236 = gfxterm.module
+@COND_i386_coreboot_TRUE@am__append_9237 = gfxterm.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9238 =
+@COND_i386_coreboot_TRUE@am__append_9239 = $(nodist_gfxterm_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9240 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gfxterm.marker
+@COND_i386_coreboot_TRUE@am__append_9241 = gfxterm.mod
+@COND_i386_coreboot_TRUE@am__append_9242 = gfxterm.marker
+@COND_i386_multiboot_TRUE@am__append_9243 = gfxterm.module
+@COND_i386_multiboot_TRUE@am__append_9244 = gfxterm.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9245 =
+@COND_i386_multiboot_TRUE@am__append_9246 = $(nodist_gfxterm_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9247 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gfxterm.marker
+@COND_i386_multiboot_TRUE@am__append_9248 = gfxterm.mod
+@COND_i386_multiboot_TRUE@am__append_9249 = gfxterm.marker
+@COND_i386_ieee1275_TRUE@am__append_9250 = gfxterm.module
+@COND_i386_ieee1275_TRUE@am__append_9251 = gfxterm.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9252 =
+@COND_i386_ieee1275_TRUE@am__append_9253 = $(nodist_gfxterm_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9254 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gfxterm.marker
+@COND_i386_ieee1275_TRUE@am__append_9255 = gfxterm.mod
+@COND_i386_ieee1275_TRUE@am__append_9256 = gfxterm.marker
+@COND_x86_64_efi_TRUE@am__append_9257 = gfxterm.module
+@COND_x86_64_efi_TRUE@am__append_9258 = gfxterm.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9259 =
+@COND_x86_64_efi_TRUE@am__append_9260 = $(nodist_gfxterm_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9261 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gfxterm.marker
+@COND_x86_64_efi_TRUE@am__append_9262 = gfxterm.mod
+@COND_x86_64_efi_TRUE@am__append_9263 = gfxterm.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9264 = gfxterm.module
+@COND_sparc64_ieee1275_TRUE@am__append_9265 = gfxterm.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9266 =
+@COND_sparc64_ieee1275_TRUE@am__append_9267 = $(nodist_gfxterm_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9268 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gfxterm.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9269 = gfxterm.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9270 = gfxterm.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9271 = gfxterm.module
+@COND_powerpc_ieee1275_TRUE@am__append_9272 = gfxterm.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9273 =
+@COND_powerpc_ieee1275_TRUE@am__append_9274 = $(nodist_gfxterm_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9275 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gfxterm_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gfxterm.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9276 = gfxterm.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9277 = gfxterm.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_9278 = serial.module
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_9279 = serial.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_9280 =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_9281 = $(nodist_serial_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_9282 = $(nodist_serial_module_SOURCES) \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ serial.marker
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_9283 = serial.mod
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_9284 = serial.marker
+@COND_i386_pc_TRUE@am__append_9285 = serial.module
+@COND_i386_pc_TRUE@am__append_9286 = serial.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9287 =
+@COND_i386_pc_TRUE@am__append_9288 = $(nodist_serial_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9289 = $(nodist_serial_module_SOURCES) \
+@COND_i386_pc_TRUE@ serial.marker
+@COND_i386_pc_TRUE@am__append_9290 = serial.mod
+@COND_i386_pc_TRUE@am__append_9291 = serial.marker
+@COND_i386_efi_TRUE@am__append_9292 = serial.module
+@COND_i386_efi_TRUE@am__append_9293 = serial.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9294 =
+@COND_i386_efi_TRUE@am__append_9295 = $(nodist_serial_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9296 = $(nodist_serial_module_SOURCES) \
+@COND_i386_efi_TRUE@ serial.marker
+@COND_i386_efi_TRUE@am__append_9297 = serial.mod
+@COND_i386_efi_TRUE@am__append_9298 = serial.marker
+@COND_i386_qemu_TRUE@am__append_9299 = serial.module
+@COND_i386_qemu_TRUE@am__append_9300 = serial.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9301 =
+@COND_i386_qemu_TRUE@am__append_9302 = $(nodist_serial_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9303 = \
+@COND_i386_qemu_TRUE@ $(nodist_serial_module_SOURCES) \
+@COND_i386_qemu_TRUE@ serial.marker
+@COND_i386_qemu_TRUE@am__append_9304 = serial.mod
+@COND_i386_qemu_TRUE@am__append_9305 = serial.marker
+@COND_i386_coreboot_TRUE@am__append_9306 = serial.module
+@COND_i386_coreboot_TRUE@am__append_9307 = serial.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9308 =
+@COND_i386_coreboot_TRUE@am__append_9309 = $(nodist_serial_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9310 = \
+@COND_i386_coreboot_TRUE@ $(nodist_serial_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ serial.marker
+@COND_i386_coreboot_TRUE@am__append_9311 = serial.mod
+@COND_i386_coreboot_TRUE@am__append_9312 = serial.marker
+@COND_i386_multiboot_TRUE@am__append_9313 = serial.module
+@COND_i386_multiboot_TRUE@am__append_9314 = serial.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9315 =
+@COND_i386_multiboot_TRUE@am__append_9316 = $(nodist_serial_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9317 = \
+@COND_i386_multiboot_TRUE@ $(nodist_serial_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ serial.marker
+@COND_i386_multiboot_TRUE@am__append_9318 = serial.mod
+@COND_i386_multiboot_TRUE@am__append_9319 = serial.marker
+@COND_i386_ieee1275_TRUE@am__append_9320 = serial.module
+@COND_i386_ieee1275_TRUE@am__append_9321 = serial.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9322 =
+@COND_i386_ieee1275_TRUE@am__append_9323 = $(nodist_serial_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9324 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_serial_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ serial.marker
+@COND_i386_ieee1275_TRUE@am__append_9325 = serial.mod
+@COND_i386_ieee1275_TRUE@am__append_9326 = serial.marker
+@COND_x86_64_efi_TRUE@am__append_9327 = serial.module
+@COND_x86_64_efi_TRUE@am__append_9328 = serial.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9329 =
+@COND_x86_64_efi_TRUE@am__append_9330 = $(nodist_serial_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9331 = \
+@COND_x86_64_efi_TRUE@ $(nodist_serial_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ serial.marker
+@COND_x86_64_efi_TRUE@am__append_9332 = serial.mod
+@COND_x86_64_efi_TRUE@am__append_9333 = serial.marker
+@COND_i386_pc_TRUE@am__append_9334 = sendkey.module
+@COND_i386_pc_TRUE@am__append_9335 = sendkey.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9336 =
+@COND_i386_pc_TRUE@am__append_9337 = $(nodist_sendkey_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9338 = $(nodist_sendkey_module_SOURCES) \
+@COND_i386_pc_TRUE@ sendkey.marker
+@COND_i386_pc_TRUE@am__append_9339 = sendkey.mod
+@COND_i386_pc_TRUE@am__append_9340 = sendkey.marker
+@COND_emu_TRUE@am__append_9341 = terminfo.module
+@COND_emu_TRUE@am__append_9342 = terminfo.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9343 =
+@COND_emu_TRUE@am__append_9344 = $(nodist_terminfo_module_SOURCES)
+@COND_emu_TRUE@am__append_9345 = $(nodist_terminfo_module_SOURCES) \
+@COND_emu_TRUE@ terminfo.marker
+@COND_emu_TRUE@am__append_9346 = terminfo.mod
+@COND_emu_TRUE@am__append_9347 = terminfo.marker
+@COND_i386_pc_TRUE@am__append_9348 = terminfo.module
+@COND_i386_pc_TRUE@am__append_9349 = terminfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9350 =
+@COND_i386_pc_TRUE@am__append_9351 = $(nodist_terminfo_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9352 = \
+@COND_i386_pc_TRUE@ $(nodist_terminfo_module_SOURCES) \
+@COND_i386_pc_TRUE@ terminfo.marker
+@COND_i386_pc_TRUE@am__append_9353 = terminfo.mod
+@COND_i386_pc_TRUE@am__append_9354 = terminfo.marker
+@COND_i386_efi_TRUE@am__append_9355 = terminfo.module
+@COND_i386_efi_TRUE@am__append_9356 = terminfo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9357 =
+@COND_i386_efi_TRUE@am__append_9358 = $(nodist_terminfo_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9359 = \
+@COND_i386_efi_TRUE@ $(nodist_terminfo_module_SOURCES) \
+@COND_i386_efi_TRUE@ terminfo.marker
+@COND_i386_efi_TRUE@am__append_9360 = terminfo.mod
+@COND_i386_efi_TRUE@am__append_9361 = terminfo.marker
+@COND_i386_qemu_TRUE@am__append_9362 = terminfo.module
+@COND_i386_qemu_TRUE@am__append_9363 = terminfo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9364 =
+@COND_i386_qemu_TRUE@am__append_9365 = $(nodist_terminfo_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9366 = \
+@COND_i386_qemu_TRUE@ $(nodist_terminfo_module_SOURCES) \
+@COND_i386_qemu_TRUE@ terminfo.marker
+@COND_i386_qemu_TRUE@am__append_9367 = terminfo.mod
+@COND_i386_qemu_TRUE@am__append_9368 = terminfo.marker
+@COND_i386_coreboot_TRUE@am__append_9369 = terminfo.module
+@COND_i386_coreboot_TRUE@am__append_9370 = terminfo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9371 =
+@COND_i386_coreboot_TRUE@am__append_9372 = $(nodist_terminfo_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9373 = \
+@COND_i386_coreboot_TRUE@ $(nodist_terminfo_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ terminfo.marker
+@COND_i386_coreboot_TRUE@am__append_9374 = terminfo.mod
+@COND_i386_coreboot_TRUE@am__append_9375 = terminfo.marker
+@COND_i386_multiboot_TRUE@am__append_9376 = terminfo.module
+@COND_i386_multiboot_TRUE@am__append_9377 = terminfo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9378 =
+@COND_i386_multiboot_TRUE@am__append_9379 = $(nodist_terminfo_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9380 = \
+@COND_i386_multiboot_TRUE@ $(nodist_terminfo_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ terminfo.marker
+@COND_i386_multiboot_TRUE@am__append_9381 = terminfo.mod
+@COND_i386_multiboot_TRUE@am__append_9382 = terminfo.marker
+@COND_x86_64_efi_TRUE@am__append_9383 = terminfo.module
+@COND_x86_64_efi_TRUE@am__append_9384 = terminfo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9385 =
+@COND_x86_64_efi_TRUE@am__append_9386 = $(nodist_terminfo_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9387 = \
+@COND_x86_64_efi_TRUE@ $(nodist_terminfo_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ terminfo.marker
+@COND_x86_64_efi_TRUE@am__append_9388 = terminfo.mod
+@COND_x86_64_efi_TRUE@am__append_9389 = terminfo.marker
+@COND_i386_pc_TRUE@am__append_9390 = usb_keyboard.module
+@COND_i386_pc_TRUE@am__append_9391 = usb_keyboard.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9392 =
+@COND_i386_pc_TRUE@am__append_9393 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9394 = \
+@COND_i386_pc_TRUE@ $(nodist_usb_keyboard_module_SOURCES) \
+@COND_i386_pc_TRUE@ usb_keyboard.marker
+@COND_i386_pc_TRUE@am__append_9395 = usb_keyboard.mod
+@COND_i386_pc_TRUE@am__append_9396 = usb_keyboard.marker
+@COND_i386_efi_TRUE@am__append_9397 = usb_keyboard.module
+@COND_i386_efi_TRUE@am__append_9398 = usb_keyboard.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9399 =
+@COND_i386_efi_TRUE@am__append_9400 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9401 = \
+@COND_i386_efi_TRUE@ $(nodist_usb_keyboard_module_SOURCES) \
+@COND_i386_efi_TRUE@ usb_keyboard.marker
+@COND_i386_efi_TRUE@am__append_9402 = usb_keyboard.mod
+@COND_i386_efi_TRUE@am__append_9403 = usb_keyboard.marker
+@COND_i386_qemu_TRUE@am__append_9404 = usb_keyboard.module
+@COND_i386_qemu_TRUE@am__append_9405 = usb_keyboard.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9406 =
+@COND_i386_qemu_TRUE@am__append_9407 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9408 = \
+@COND_i386_qemu_TRUE@ $(nodist_usb_keyboard_module_SOURCES) \
+@COND_i386_qemu_TRUE@ usb_keyboard.marker
+@COND_i386_qemu_TRUE@am__append_9409 = usb_keyboard.mod
+@COND_i386_qemu_TRUE@am__append_9410 = usb_keyboard.marker
+@COND_i386_coreboot_TRUE@am__append_9411 = usb_keyboard.module
+@COND_i386_coreboot_TRUE@am__append_9412 = usb_keyboard.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9413 =
+@COND_i386_coreboot_TRUE@am__append_9414 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9415 = $(nodist_usb_keyboard_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ usb_keyboard.marker
+@COND_i386_coreboot_TRUE@am__append_9416 = usb_keyboard.mod
+@COND_i386_coreboot_TRUE@am__append_9417 = usb_keyboard.marker
+@COND_i386_multiboot_TRUE@am__append_9418 = usb_keyboard.module
+@COND_i386_multiboot_TRUE@am__append_9419 = usb_keyboard.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9420 =
+@COND_i386_multiboot_TRUE@am__append_9421 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9422 = $(nodist_usb_keyboard_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ usb_keyboard.marker
+@COND_i386_multiboot_TRUE@am__append_9423 = usb_keyboard.mod
+@COND_i386_multiboot_TRUE@am__append_9424 = usb_keyboard.marker
+@COND_i386_ieee1275_TRUE@am__append_9425 = usb_keyboard.module
+@COND_i386_ieee1275_TRUE@am__append_9426 = usb_keyboard.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9427 =
+@COND_i386_ieee1275_TRUE@am__append_9428 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9429 = $(nodist_usb_keyboard_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ usb_keyboard.marker
+@COND_i386_ieee1275_TRUE@am__append_9430 = usb_keyboard.mod
+@COND_i386_ieee1275_TRUE@am__append_9431 = usb_keyboard.marker
+@COND_x86_64_efi_TRUE@am__append_9432 = usb_keyboard.module
+@COND_x86_64_efi_TRUE@am__append_9433 = usb_keyboard.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9434 =
+@COND_x86_64_efi_TRUE@am__append_9435 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9436 = \
+@COND_x86_64_efi_TRUE@ $(nodist_usb_keyboard_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ usb_keyboard.marker
+@COND_x86_64_efi_TRUE@am__append_9437 = usb_keyboard.mod
+@COND_x86_64_efi_TRUE@am__append_9438 = usb_keyboard.marker
+@COND_mips_yeeloong_TRUE@am__append_9439 = usb_keyboard.module
+@COND_mips_yeeloong_TRUE@am__append_9440 = usb_keyboard.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_9441 =
+@COND_mips_yeeloong_TRUE@am__append_9442 = $(nodist_usb_keyboard_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_9443 = $(nodist_usb_keyboard_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ usb_keyboard.marker
+@COND_mips_yeeloong_TRUE@am__append_9444 = usb_keyboard.mod
+@COND_mips_yeeloong_TRUE@am__append_9445 = usb_keyboard.marker
+@COND_i386_pc_TRUE@am__append_9446 = vga.module vga_text.module
+@COND_i386_pc_TRUE@am__append_9447 = vga.module$(EXEEXT) \
+@COND_i386_pc_TRUE@ vga_text.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9448 =
+@COND_i386_pc_TRUE@am__append_9449 = $(nodist_vga_module_SOURCES) \
+@COND_i386_pc_TRUE@ $(nodist_vga_text_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9450 = $(nodist_vga_module_SOURCES) \
+@COND_i386_pc_TRUE@ vga.marker \
+@COND_i386_pc_TRUE@ $(nodist_vga_text_module_SOURCES) \
+@COND_i386_pc_TRUE@ vga_text.marker
+@COND_i386_pc_TRUE@am__append_9451 = vga.mod vga_text.mod
+@COND_i386_pc_TRUE@am__append_9452 = vga.marker vga_text.marker
+@COND_i386_coreboot_TRUE@am__append_9453 = vga_text.module
+@COND_i386_coreboot_TRUE@am__append_9454 = vga_text.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9455 =
+@COND_i386_coreboot_TRUE@am__append_9456 = $(nodist_vga_text_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9457 = \
+@COND_i386_coreboot_TRUE@ $(nodist_vga_text_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ vga_text.marker
+@COND_i386_coreboot_TRUE@am__append_9458 = vga_text.mod
+@COND_i386_coreboot_TRUE@am__append_9459 = vga_text.marker
+@COND_i386_multiboot_TRUE@am__append_9460 = vga_text.module
+@COND_i386_multiboot_TRUE@am__append_9461 = vga_text.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9462 =
+@COND_i386_multiboot_TRUE@am__append_9463 = $(nodist_vga_text_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9464 = \
+@COND_i386_multiboot_TRUE@ $(nodist_vga_text_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ vga_text.marker
+@COND_i386_multiboot_TRUE@am__append_9465 = vga_text.mod
+@COND_i386_multiboot_TRUE@am__append_9466 = vga_text.marker
+@COND_i386_pc_TRUE@am__append_9467 = video_cirrus.module
+@COND_i386_pc_TRUE@am__append_9468 = video_cirrus.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9469 =
+@COND_i386_pc_TRUE@am__append_9470 = $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9471 = \
+@COND_i386_pc_TRUE@ $(nodist_video_cirrus_module_SOURCES) \
+@COND_i386_pc_TRUE@ video_cirrus.marker
+@COND_i386_pc_TRUE@am__append_9472 = video_cirrus.mod
+@COND_i386_pc_TRUE@am__append_9473 = video_cirrus.marker
+@COND_i386_efi_TRUE@am__append_9474 = video_cirrus.module
+@COND_i386_efi_TRUE@am__append_9475 = video_cirrus.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9476 =
+@COND_i386_efi_TRUE@am__append_9477 = $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9478 = \
+@COND_i386_efi_TRUE@ $(nodist_video_cirrus_module_SOURCES) \
+@COND_i386_efi_TRUE@ video_cirrus.marker
+@COND_i386_efi_TRUE@am__append_9479 = video_cirrus.mod
+@COND_i386_efi_TRUE@am__append_9480 = video_cirrus.marker
+@COND_i386_qemu_TRUE@am__append_9481 = video_cirrus.module
+@COND_i386_qemu_TRUE@am__append_9482 = video_cirrus.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9483 =
+@COND_i386_qemu_TRUE@am__append_9484 = $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9485 = \
+@COND_i386_qemu_TRUE@ $(nodist_video_cirrus_module_SOURCES) \
+@COND_i386_qemu_TRUE@ video_cirrus.marker
+@COND_i386_qemu_TRUE@am__append_9486 = video_cirrus.mod
+@COND_i386_qemu_TRUE@am__append_9487 = video_cirrus.marker
+@COND_i386_coreboot_TRUE@am__append_9488 = video_cirrus.module
+@COND_i386_coreboot_TRUE@am__append_9489 = video_cirrus.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9490 =
+@COND_i386_coreboot_TRUE@am__append_9491 = $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9492 = $(nodist_video_cirrus_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ video_cirrus.marker
+@COND_i386_coreboot_TRUE@am__append_9493 = video_cirrus.mod
+@COND_i386_coreboot_TRUE@am__append_9494 = video_cirrus.marker
+@COND_i386_multiboot_TRUE@am__append_9495 = video_cirrus.module
+@COND_i386_multiboot_TRUE@am__append_9496 = video_cirrus.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9497 =
+@COND_i386_multiboot_TRUE@am__append_9498 = $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9499 = $(nodist_video_cirrus_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ video_cirrus.marker
+@COND_i386_multiboot_TRUE@am__append_9500 = video_cirrus.mod
+@COND_i386_multiboot_TRUE@am__append_9501 = video_cirrus.marker
+@COND_i386_ieee1275_TRUE@am__append_9502 = video_cirrus.module
+@COND_i386_ieee1275_TRUE@am__append_9503 = video_cirrus.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9504 =
+@COND_i386_ieee1275_TRUE@am__append_9505 = $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9506 = $(nodist_video_cirrus_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ video_cirrus.marker
+@COND_i386_ieee1275_TRUE@am__append_9507 = video_cirrus.mod
+@COND_i386_ieee1275_TRUE@am__append_9508 = video_cirrus.marker
+@COND_x86_64_efi_TRUE@am__append_9509 = video_cirrus.module
+@COND_x86_64_efi_TRUE@am__append_9510 = video_cirrus.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9511 =
+@COND_x86_64_efi_TRUE@am__append_9512 = $(nodist_video_cirrus_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9513 = \
+@COND_x86_64_efi_TRUE@ $(nodist_video_cirrus_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ video_cirrus.marker
+@COND_x86_64_efi_TRUE@am__append_9514 = video_cirrus.mod
+@COND_x86_64_efi_TRUE@am__append_9515 = video_cirrus.marker
+@COND_i386_pc_TRUE@am__append_9516 = video_bochs.module
+@COND_i386_pc_TRUE@am__append_9517 = video_bochs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9518 =
+@COND_i386_pc_TRUE@am__append_9519 = $(nodist_video_bochs_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9520 = \
+@COND_i386_pc_TRUE@ $(nodist_video_bochs_module_SOURCES) \
+@COND_i386_pc_TRUE@ video_bochs.marker
+@COND_i386_pc_TRUE@am__append_9521 = video_bochs.mod
+@COND_i386_pc_TRUE@am__append_9522 = video_bochs.marker
+@COND_i386_efi_TRUE@am__append_9523 = video_bochs.module
+@COND_i386_efi_TRUE@am__append_9524 = video_bochs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9525 =
+@COND_i386_efi_TRUE@am__append_9526 = $(nodist_video_bochs_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9527 = \
+@COND_i386_efi_TRUE@ $(nodist_video_bochs_module_SOURCES) \
+@COND_i386_efi_TRUE@ video_bochs.marker
+@COND_i386_efi_TRUE@am__append_9528 = video_bochs.mod
+@COND_i386_efi_TRUE@am__append_9529 = video_bochs.marker
+@COND_i386_qemu_TRUE@am__append_9530 = video_bochs.module
+@COND_i386_qemu_TRUE@am__append_9531 = video_bochs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9532 =
+@COND_i386_qemu_TRUE@am__append_9533 = $(nodist_video_bochs_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9534 = \
+@COND_i386_qemu_TRUE@ $(nodist_video_bochs_module_SOURCES) \
+@COND_i386_qemu_TRUE@ video_bochs.marker
+@COND_i386_qemu_TRUE@am__append_9535 = video_bochs.mod
+@COND_i386_qemu_TRUE@am__append_9536 = video_bochs.marker
+@COND_i386_coreboot_TRUE@am__append_9537 = video_bochs.module
+@COND_i386_coreboot_TRUE@am__append_9538 = video_bochs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9539 =
+@COND_i386_coreboot_TRUE@am__append_9540 = $(nodist_video_bochs_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9541 = \
+@COND_i386_coreboot_TRUE@ $(nodist_video_bochs_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ video_bochs.marker
+@COND_i386_coreboot_TRUE@am__append_9542 = video_bochs.mod
+@COND_i386_coreboot_TRUE@am__append_9543 = video_bochs.marker
+@COND_i386_multiboot_TRUE@am__append_9544 = video_bochs.module
+@COND_i386_multiboot_TRUE@am__append_9545 = video_bochs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9546 =
+@COND_i386_multiboot_TRUE@am__append_9547 = $(nodist_video_bochs_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9548 = $(nodist_video_bochs_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ video_bochs.marker
+@COND_i386_multiboot_TRUE@am__append_9549 = video_bochs.mod
+@COND_i386_multiboot_TRUE@am__append_9550 = video_bochs.marker
+@COND_i386_ieee1275_TRUE@am__append_9551 = video_bochs.module
+@COND_i386_ieee1275_TRUE@am__append_9552 = video_bochs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9553 =
+@COND_i386_ieee1275_TRUE@am__append_9554 = $(nodist_video_bochs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9555 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_video_bochs_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ video_bochs.marker
+@COND_i386_ieee1275_TRUE@am__append_9556 = video_bochs.mod
+@COND_i386_ieee1275_TRUE@am__append_9557 = video_bochs.marker
+@COND_x86_64_efi_TRUE@am__append_9558 = video_bochs.module
+@COND_x86_64_efi_TRUE@am__append_9559 = video_bochs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9560 =
+@COND_x86_64_efi_TRUE@am__append_9561 = $(nodist_video_bochs_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9562 = \
+@COND_x86_64_efi_TRUE@ $(nodist_video_bochs_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ video_bochs.marker
+@COND_x86_64_efi_TRUE@am__append_9563 = video_bochs.mod
+@COND_x86_64_efi_TRUE@am__append_9564 = video_bochs.marker
+@COND_emu_TRUE@am__append_9565 = functional_test.module
+@COND_emu_TRUE@am__append_9566 = functional_test.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9567 =
+@COND_emu_TRUE@am__append_9568 = $(nodist_functional_test_module_SOURCES)
+@COND_emu_TRUE@am__append_9569 = \
+@COND_emu_TRUE@ $(nodist_functional_test_module_SOURCES) \
+@COND_emu_TRUE@ functional_test.marker
+@COND_emu_TRUE@am__append_9570 = functional_test.mod
+@COND_emu_TRUE@am__append_9571 = functional_test.marker
+@COND_i386_pc_TRUE@am__append_9572 = functional_test.module
+@COND_i386_pc_TRUE@am__append_9573 = functional_test.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9574 =
+@COND_i386_pc_TRUE@am__append_9575 = $(nodist_functional_test_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9576 = \
+@COND_i386_pc_TRUE@ $(nodist_functional_test_module_SOURCES) \
+@COND_i386_pc_TRUE@ functional_test.marker
+@COND_i386_pc_TRUE@am__append_9577 = functional_test.mod
+@COND_i386_pc_TRUE@am__append_9578 = functional_test.marker
+@COND_i386_efi_TRUE@am__append_9579 = functional_test.module
+@COND_i386_efi_TRUE@am__append_9580 = functional_test.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9581 =
+@COND_i386_efi_TRUE@am__append_9582 = $(nodist_functional_test_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9583 = \
+@COND_i386_efi_TRUE@ $(nodist_functional_test_module_SOURCES) \
+@COND_i386_efi_TRUE@ functional_test.marker
+@COND_i386_efi_TRUE@am__append_9584 = functional_test.mod
+@COND_i386_efi_TRUE@am__append_9585 = functional_test.marker
+@COND_i386_qemu_TRUE@am__append_9586 = functional_test.module
+@COND_i386_qemu_TRUE@am__append_9587 = functional_test.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9588 =
+@COND_i386_qemu_TRUE@am__append_9589 = $(nodist_functional_test_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9590 = \
+@COND_i386_qemu_TRUE@ $(nodist_functional_test_module_SOURCES) \
+@COND_i386_qemu_TRUE@ functional_test.marker
+@COND_i386_qemu_TRUE@am__append_9591 = functional_test.mod
+@COND_i386_qemu_TRUE@am__append_9592 = functional_test.marker
+@COND_i386_coreboot_TRUE@am__append_9593 = functional_test.module
+@COND_i386_coreboot_TRUE@am__append_9594 = functional_test.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9595 =
+@COND_i386_coreboot_TRUE@am__append_9596 = $(nodist_functional_test_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9597 = $(nodist_functional_test_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ functional_test.marker
+@COND_i386_coreboot_TRUE@am__append_9598 = functional_test.mod
+@COND_i386_coreboot_TRUE@am__append_9599 = functional_test.marker
+@COND_i386_multiboot_TRUE@am__append_9600 = functional_test.module
+@COND_i386_multiboot_TRUE@am__append_9601 = functional_test.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9602 =
+@COND_i386_multiboot_TRUE@am__append_9603 = $(nodist_functional_test_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9604 = $(nodist_functional_test_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ functional_test.marker
+@COND_i386_multiboot_TRUE@am__append_9605 = functional_test.mod
+@COND_i386_multiboot_TRUE@am__append_9606 = functional_test.marker
+@COND_i386_ieee1275_TRUE@am__append_9607 = functional_test.module
+@COND_i386_ieee1275_TRUE@am__append_9608 = functional_test.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9609 =
+@COND_i386_ieee1275_TRUE@am__append_9610 = $(nodist_functional_test_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9611 = $(nodist_functional_test_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ functional_test.marker
+@COND_i386_ieee1275_TRUE@am__append_9612 = functional_test.mod
+@COND_i386_ieee1275_TRUE@am__append_9613 = functional_test.marker
+@COND_x86_64_efi_TRUE@am__append_9614 = functional_test.module
+@COND_x86_64_efi_TRUE@am__append_9615 = functional_test.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9616 =
+@COND_x86_64_efi_TRUE@am__append_9617 = $(nodist_functional_test_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9618 = $(nodist_functional_test_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ functional_test.marker
+@COND_x86_64_efi_TRUE@am__append_9619 = functional_test.mod
+@COND_x86_64_efi_TRUE@am__append_9620 = functional_test.marker
+@COND_mips_yeeloong_TRUE@am__append_9621 = functional_test.module
+@COND_mips_yeeloong_TRUE@am__append_9622 = functional_test.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_9623 =
+@COND_mips_yeeloong_TRUE@am__append_9624 = $(nodist_functional_test_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_9625 = $(nodist_functional_test_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ functional_test.marker
+@COND_mips_yeeloong_TRUE@am__append_9626 = functional_test.mod
+@COND_mips_yeeloong_TRUE@am__append_9627 = functional_test.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9628 = functional_test.module
+@COND_sparc64_ieee1275_TRUE@am__append_9629 = functional_test.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9630 =
+@COND_sparc64_ieee1275_TRUE@am__append_9631 = $(nodist_functional_test_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9632 = $(nodist_functional_test_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ functional_test.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9633 = functional_test.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9634 = functional_test.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9635 = functional_test.module
+@COND_powerpc_ieee1275_TRUE@am__append_9636 = functional_test.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9637 =
+@COND_powerpc_ieee1275_TRUE@am__append_9638 = $(nodist_functional_test_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9639 = $(nodist_functional_test_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ functional_test.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9640 = functional_test.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9641 = functional_test.marker
+@COND_emu_TRUE@am__append_9642 = example_functional_test.module
+@COND_emu_TRUE@am__append_9643 = example_functional_test.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9644 =
+@COND_emu_TRUE@am__append_9645 = $(nodist_example_functional_test_module_SOURCES)
+@COND_emu_TRUE@am__append_9646 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_emu_TRUE@ example_functional_test.marker
+@COND_emu_TRUE@am__append_9647 = example_functional_test.mod
+@COND_emu_TRUE@am__append_9648 = example_functional_test.marker
+@COND_i386_pc_TRUE@am__append_9649 = example_functional_test.module
+@COND_i386_pc_TRUE@am__append_9650 = example_functional_test.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9651 =
+@COND_i386_pc_TRUE@am__append_9652 = $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9653 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_i386_pc_TRUE@ example_functional_test.marker
+@COND_i386_pc_TRUE@am__append_9654 = example_functional_test.mod
+@COND_i386_pc_TRUE@am__append_9655 = example_functional_test.marker
+@COND_i386_efi_TRUE@am__append_9656 = example_functional_test.module
+@COND_i386_efi_TRUE@am__append_9657 = example_functional_test.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9658 =
+@COND_i386_efi_TRUE@am__append_9659 = $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9660 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_i386_efi_TRUE@ example_functional_test.marker
+@COND_i386_efi_TRUE@am__append_9661 = example_functional_test.mod
+@COND_i386_efi_TRUE@am__append_9662 = example_functional_test.marker
+@COND_i386_qemu_TRUE@am__append_9663 = example_functional_test.module
+@COND_i386_qemu_TRUE@am__append_9664 = example_functional_test.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9665 =
+@COND_i386_qemu_TRUE@am__append_9666 = $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9667 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_i386_qemu_TRUE@ example_functional_test.marker
+@COND_i386_qemu_TRUE@am__append_9668 = example_functional_test.mod
+@COND_i386_qemu_TRUE@am__append_9669 = example_functional_test.marker
+@COND_i386_coreboot_TRUE@am__append_9670 = example_functional_test.module
+@COND_i386_coreboot_TRUE@am__append_9671 = example_functional_test.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9672 =
+@COND_i386_coreboot_TRUE@am__append_9673 = $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9674 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ example_functional_test.marker
+@COND_i386_coreboot_TRUE@am__append_9675 = example_functional_test.mod
+@COND_i386_coreboot_TRUE@am__append_9676 = example_functional_test.marker
+@COND_i386_multiboot_TRUE@am__append_9677 = example_functional_test.module
+@COND_i386_multiboot_TRUE@am__append_9678 = example_functional_test.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9679 =
+@COND_i386_multiboot_TRUE@am__append_9680 = $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9681 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ example_functional_test.marker
+@COND_i386_multiboot_TRUE@am__append_9682 = example_functional_test.mod
+@COND_i386_multiboot_TRUE@am__append_9683 = example_functional_test.marker
+@COND_i386_ieee1275_TRUE@am__append_9684 = example_functional_test.module
+@COND_i386_ieee1275_TRUE@am__append_9685 = example_functional_test.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9686 =
+@COND_i386_ieee1275_TRUE@am__append_9687 = $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9688 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ example_functional_test.marker
+@COND_i386_ieee1275_TRUE@am__append_9689 = example_functional_test.mod
+@COND_i386_ieee1275_TRUE@am__append_9690 = example_functional_test.marker
+@COND_x86_64_efi_TRUE@am__append_9691 = example_functional_test.module
+@COND_x86_64_efi_TRUE@am__append_9692 = example_functional_test.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9693 =
+@COND_x86_64_efi_TRUE@am__append_9694 = $(nodist_example_functional_test_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9695 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ example_functional_test.marker
+@COND_x86_64_efi_TRUE@am__append_9696 = example_functional_test.mod
+@COND_x86_64_efi_TRUE@am__append_9697 = example_functional_test.marker
+@COND_mips_yeeloong_TRUE@am__append_9698 = example_functional_test.module
+@COND_mips_yeeloong_TRUE@am__append_9699 = example_functional_test.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_9700 =
+@COND_mips_yeeloong_TRUE@am__append_9701 = $(nodist_example_functional_test_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_9702 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ example_functional_test.marker
+@COND_mips_yeeloong_TRUE@am__append_9703 = example_functional_test.mod
+@COND_mips_yeeloong_TRUE@am__append_9704 = example_functional_test.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9705 = example_functional_test.module
+@COND_sparc64_ieee1275_TRUE@am__append_9706 = example_functional_test.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9707 =
+@COND_sparc64_ieee1275_TRUE@am__append_9708 = $(nodist_example_functional_test_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9709 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ example_functional_test.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9710 = example_functional_test.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9711 = example_functional_test.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9712 = example_functional_test.module
+@COND_powerpc_ieee1275_TRUE@am__append_9713 = example_functional_test.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9714 =
+@COND_powerpc_ieee1275_TRUE@am__append_9715 = $(nodist_example_functional_test_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9716 = $(nodist_example_functional_test_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ example_functional_test.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9717 = example_functional_test.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9718 = example_functional_test.marker
+@COND_emu_TRUE@am__append_9719 = bitmap.module
+@COND_emu_TRUE@am__append_9720 = bitmap.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9721 =
+@COND_emu_TRUE@am__append_9722 = $(nodist_bitmap_module_SOURCES)
+@COND_emu_TRUE@am__append_9723 = $(nodist_bitmap_module_SOURCES) \
+@COND_emu_TRUE@ bitmap.marker
+@COND_emu_TRUE@am__append_9724 = bitmap.mod
+@COND_emu_TRUE@am__append_9725 = bitmap.marker
+@COND_i386_pc_TRUE@am__append_9726 = bitmap.module
+@COND_i386_pc_TRUE@am__append_9727 = bitmap.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9728 =
+@COND_i386_pc_TRUE@am__append_9729 = $(nodist_bitmap_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9730 = $(nodist_bitmap_module_SOURCES) \
+@COND_i386_pc_TRUE@ bitmap.marker
+@COND_i386_pc_TRUE@am__append_9731 = bitmap.mod
+@COND_i386_pc_TRUE@am__append_9732 = bitmap.marker
+@COND_i386_efi_TRUE@am__append_9733 = bitmap.module
+@COND_i386_efi_TRUE@am__append_9734 = bitmap.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9735 =
+@COND_i386_efi_TRUE@am__append_9736 = $(nodist_bitmap_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9737 = $(nodist_bitmap_module_SOURCES) \
+@COND_i386_efi_TRUE@ bitmap.marker
+@COND_i386_efi_TRUE@am__append_9738 = bitmap.mod
+@COND_i386_efi_TRUE@am__append_9739 = bitmap.marker
+@COND_i386_qemu_TRUE@am__append_9740 = bitmap.module
+@COND_i386_qemu_TRUE@am__append_9741 = bitmap.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9742 =
+@COND_i386_qemu_TRUE@am__append_9743 = $(nodist_bitmap_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9744 = \
+@COND_i386_qemu_TRUE@ $(nodist_bitmap_module_SOURCES) \
+@COND_i386_qemu_TRUE@ bitmap.marker
+@COND_i386_qemu_TRUE@am__append_9745 = bitmap.mod
+@COND_i386_qemu_TRUE@am__append_9746 = bitmap.marker
+@COND_i386_coreboot_TRUE@am__append_9747 = bitmap.module
+@COND_i386_coreboot_TRUE@am__append_9748 = bitmap.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9749 =
+@COND_i386_coreboot_TRUE@am__append_9750 = $(nodist_bitmap_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9751 = \
+@COND_i386_coreboot_TRUE@ $(nodist_bitmap_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ bitmap.marker
+@COND_i386_coreboot_TRUE@am__append_9752 = bitmap.mod
+@COND_i386_coreboot_TRUE@am__append_9753 = bitmap.marker
+@COND_i386_multiboot_TRUE@am__append_9754 = bitmap.module
+@COND_i386_multiboot_TRUE@am__append_9755 = bitmap.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9756 =
+@COND_i386_multiboot_TRUE@am__append_9757 = $(nodist_bitmap_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9758 = \
+@COND_i386_multiboot_TRUE@ $(nodist_bitmap_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ bitmap.marker
+@COND_i386_multiboot_TRUE@am__append_9759 = bitmap.mod
+@COND_i386_multiboot_TRUE@am__append_9760 = bitmap.marker
+@COND_i386_ieee1275_TRUE@am__append_9761 = bitmap.module
+@COND_i386_ieee1275_TRUE@am__append_9762 = bitmap.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9763 =
+@COND_i386_ieee1275_TRUE@am__append_9764 = $(nodist_bitmap_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9765 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_bitmap_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ bitmap.marker
+@COND_i386_ieee1275_TRUE@am__append_9766 = bitmap.mod
+@COND_i386_ieee1275_TRUE@am__append_9767 = bitmap.marker
+@COND_x86_64_efi_TRUE@am__append_9768 = bitmap.module
+@COND_x86_64_efi_TRUE@am__append_9769 = bitmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9770 =
+@COND_x86_64_efi_TRUE@am__append_9771 = $(nodist_bitmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9772 = \
+@COND_x86_64_efi_TRUE@ $(nodist_bitmap_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ bitmap.marker
+@COND_x86_64_efi_TRUE@am__append_9773 = bitmap.mod
+@COND_x86_64_efi_TRUE@am__append_9774 = bitmap.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9775 = bitmap.module
+@COND_sparc64_ieee1275_TRUE@am__append_9776 = bitmap.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9777 =
+@COND_sparc64_ieee1275_TRUE@am__append_9778 = $(nodist_bitmap_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9779 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_bitmap_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ bitmap.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9780 = bitmap.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9781 = bitmap.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9782 = bitmap.module
+@COND_powerpc_ieee1275_TRUE@am__append_9783 = bitmap.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9784 =
+@COND_powerpc_ieee1275_TRUE@am__append_9785 = $(nodist_bitmap_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9786 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_bitmap_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ bitmap.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9787 = bitmap.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9788 = bitmap.marker
+@COND_emu_TRUE@am__append_9789 = bitmap_scale.module
+@COND_emu_TRUE@am__append_9790 = bitmap_scale.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9791 =
+@COND_emu_TRUE@am__append_9792 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_emu_TRUE@am__append_9793 = \
+@COND_emu_TRUE@ $(nodist_bitmap_scale_module_SOURCES) \
+@COND_emu_TRUE@ bitmap_scale.marker
+@COND_emu_TRUE@am__append_9794 = bitmap_scale.mod
+@COND_emu_TRUE@am__append_9795 = bitmap_scale.marker
+@COND_i386_pc_TRUE@am__append_9796 = bitmap_scale.module
+@COND_i386_pc_TRUE@am__append_9797 = bitmap_scale.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9798 =
+@COND_i386_pc_TRUE@am__append_9799 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9800 = \
+@COND_i386_pc_TRUE@ $(nodist_bitmap_scale_module_SOURCES) \
+@COND_i386_pc_TRUE@ bitmap_scale.marker
+@COND_i386_pc_TRUE@am__append_9801 = bitmap_scale.mod
+@COND_i386_pc_TRUE@am__append_9802 = bitmap_scale.marker
+@COND_i386_efi_TRUE@am__append_9803 = bitmap_scale.module
+@COND_i386_efi_TRUE@am__append_9804 = bitmap_scale.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9805 =
+@COND_i386_efi_TRUE@am__append_9806 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9807 = \
+@COND_i386_efi_TRUE@ $(nodist_bitmap_scale_module_SOURCES) \
+@COND_i386_efi_TRUE@ bitmap_scale.marker
+@COND_i386_efi_TRUE@am__append_9808 = bitmap_scale.mod
+@COND_i386_efi_TRUE@am__append_9809 = bitmap_scale.marker
+@COND_i386_qemu_TRUE@am__append_9810 = bitmap_scale.module
+@COND_i386_qemu_TRUE@am__append_9811 = bitmap_scale.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9812 =
+@COND_i386_qemu_TRUE@am__append_9813 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9814 = \
+@COND_i386_qemu_TRUE@ $(nodist_bitmap_scale_module_SOURCES) \
+@COND_i386_qemu_TRUE@ bitmap_scale.marker
+@COND_i386_qemu_TRUE@am__append_9815 = bitmap_scale.mod
+@COND_i386_qemu_TRUE@am__append_9816 = bitmap_scale.marker
+@COND_i386_coreboot_TRUE@am__append_9817 = bitmap_scale.module
+@COND_i386_coreboot_TRUE@am__append_9818 = bitmap_scale.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9819 =
+@COND_i386_coreboot_TRUE@am__append_9820 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9821 = $(nodist_bitmap_scale_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ bitmap_scale.marker
+@COND_i386_coreboot_TRUE@am__append_9822 = bitmap_scale.mod
+@COND_i386_coreboot_TRUE@am__append_9823 = bitmap_scale.marker
+@COND_i386_multiboot_TRUE@am__append_9824 = bitmap_scale.module
+@COND_i386_multiboot_TRUE@am__append_9825 = bitmap_scale.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9826 =
+@COND_i386_multiboot_TRUE@am__append_9827 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9828 = $(nodist_bitmap_scale_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ bitmap_scale.marker
+@COND_i386_multiboot_TRUE@am__append_9829 = bitmap_scale.mod
+@COND_i386_multiboot_TRUE@am__append_9830 = bitmap_scale.marker
+@COND_i386_ieee1275_TRUE@am__append_9831 = bitmap_scale.module
+@COND_i386_ieee1275_TRUE@am__append_9832 = bitmap_scale.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9833 =
+@COND_i386_ieee1275_TRUE@am__append_9834 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9835 = $(nodist_bitmap_scale_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ bitmap_scale.marker
+@COND_i386_ieee1275_TRUE@am__append_9836 = bitmap_scale.mod
+@COND_i386_ieee1275_TRUE@am__append_9837 = bitmap_scale.marker
+@COND_x86_64_efi_TRUE@am__append_9838 = bitmap_scale.module
+@COND_x86_64_efi_TRUE@am__append_9839 = bitmap_scale.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9840 =
+@COND_x86_64_efi_TRUE@am__append_9841 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9842 = \
+@COND_x86_64_efi_TRUE@ $(nodist_bitmap_scale_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ bitmap_scale.marker
+@COND_x86_64_efi_TRUE@am__append_9843 = bitmap_scale.mod
+@COND_x86_64_efi_TRUE@am__append_9844 = bitmap_scale.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9845 = bitmap_scale.module
+@COND_sparc64_ieee1275_TRUE@am__append_9846 = bitmap_scale.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9847 =
+@COND_sparc64_ieee1275_TRUE@am__append_9848 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9849 = $(nodist_bitmap_scale_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ bitmap_scale.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9850 = bitmap_scale.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9851 = bitmap_scale.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9852 = bitmap_scale.module
+@COND_powerpc_ieee1275_TRUE@am__append_9853 = bitmap_scale.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9854 =
+@COND_powerpc_ieee1275_TRUE@am__append_9855 = $(nodist_bitmap_scale_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9856 = $(nodist_bitmap_scale_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ bitmap_scale.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9857 = bitmap_scale.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9858 = bitmap_scale.marker
+@COND_i386_efi_TRUE@am__append_9859 = efi_gop.module
+@COND_i386_efi_TRUE@am__append_9860 = efi_gop.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9861 =
+@COND_i386_efi_TRUE@am__append_9862 = $(nodist_efi_gop_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9863 = \
+@COND_i386_efi_TRUE@ $(nodist_efi_gop_module_SOURCES) \
+@COND_i386_efi_TRUE@ efi_gop.marker
+@COND_i386_efi_TRUE@am__append_9864 = efi_gop.mod
+@COND_i386_efi_TRUE@am__append_9865 = efi_gop.marker
+@COND_x86_64_efi_TRUE@am__append_9866 = efi_gop.module
+@COND_x86_64_efi_TRUE@am__append_9867 = efi_gop.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9868 =
+@COND_x86_64_efi_TRUE@am__append_9869 = $(nodist_efi_gop_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9870 = \
+@COND_x86_64_efi_TRUE@ $(nodist_efi_gop_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ efi_gop.marker
+@COND_x86_64_efi_TRUE@am__append_9871 = efi_gop.mod
+@COND_x86_64_efi_TRUE@am__append_9872 = efi_gop.marker
+@COND_i386_efi_TRUE@am__append_9873 = efi_uga.module
+@COND_i386_efi_TRUE@am__append_9874 = efi_uga.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9875 =
+@COND_i386_efi_TRUE@am__append_9876 = $(nodist_efi_uga_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9877 = \
+@COND_i386_efi_TRUE@ $(nodist_efi_uga_module_SOURCES) \
+@COND_i386_efi_TRUE@ efi_uga.marker
+@COND_i386_efi_TRUE@am__append_9878 = efi_uga.mod
+@COND_i386_efi_TRUE@am__append_9879 = efi_uga.marker
+@COND_x86_64_efi_TRUE@am__append_9880 = efi_uga.module
+@COND_x86_64_efi_TRUE@am__append_9881 = efi_uga.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9882 =
+@COND_x86_64_efi_TRUE@am__append_9883 = $(nodist_efi_uga_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9884 = \
+@COND_x86_64_efi_TRUE@ $(nodist_efi_uga_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ efi_uga.marker
+@COND_x86_64_efi_TRUE@am__append_9885 = efi_uga.mod
+@COND_x86_64_efi_TRUE@am__append_9886 = efi_uga.marker
+@COND_emu_TRUE@am__append_9887 = jpeg.module
+@COND_emu_TRUE@am__append_9888 = jpeg.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9889 =
+@COND_emu_TRUE@am__append_9890 = $(nodist_jpeg_module_SOURCES)
+@COND_emu_TRUE@am__append_9891 = $(nodist_jpeg_module_SOURCES) \
+@COND_emu_TRUE@ jpeg.marker
+@COND_emu_TRUE@am__append_9892 = jpeg.mod
+@COND_emu_TRUE@am__append_9893 = jpeg.marker
+@COND_i386_pc_TRUE@am__append_9894 = jpeg.module
+@COND_i386_pc_TRUE@am__append_9895 = jpeg.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9896 =
+@COND_i386_pc_TRUE@am__append_9897 = $(nodist_jpeg_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9898 = $(nodist_jpeg_module_SOURCES) \
+@COND_i386_pc_TRUE@ jpeg.marker
+@COND_i386_pc_TRUE@am__append_9899 = jpeg.mod
+@COND_i386_pc_TRUE@am__append_9900 = jpeg.marker
+@COND_i386_efi_TRUE@am__append_9901 = jpeg.module
+@COND_i386_efi_TRUE@am__append_9902 = jpeg.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9903 =
+@COND_i386_efi_TRUE@am__append_9904 = $(nodist_jpeg_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9905 = $(nodist_jpeg_module_SOURCES) \
+@COND_i386_efi_TRUE@ jpeg.marker
+@COND_i386_efi_TRUE@am__append_9906 = jpeg.mod
+@COND_i386_efi_TRUE@am__append_9907 = jpeg.marker
+@COND_i386_qemu_TRUE@am__append_9908 = jpeg.module
+@COND_i386_qemu_TRUE@am__append_9909 = jpeg.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9910 =
+@COND_i386_qemu_TRUE@am__append_9911 = $(nodist_jpeg_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9912 = $(nodist_jpeg_module_SOURCES) \
+@COND_i386_qemu_TRUE@ jpeg.marker
+@COND_i386_qemu_TRUE@am__append_9913 = jpeg.mod
+@COND_i386_qemu_TRUE@am__append_9914 = jpeg.marker
+@COND_i386_coreboot_TRUE@am__append_9915 = jpeg.module
+@COND_i386_coreboot_TRUE@am__append_9916 = jpeg.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9917 =
+@COND_i386_coreboot_TRUE@am__append_9918 = $(nodist_jpeg_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9919 = \
+@COND_i386_coreboot_TRUE@ $(nodist_jpeg_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ jpeg.marker
+@COND_i386_coreboot_TRUE@am__append_9920 = jpeg.mod
+@COND_i386_coreboot_TRUE@am__append_9921 = jpeg.marker
+@COND_i386_multiboot_TRUE@am__append_9922 = jpeg.module
+@COND_i386_multiboot_TRUE@am__append_9923 = jpeg.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_9924 =
+@COND_i386_multiboot_TRUE@am__append_9925 = $(nodist_jpeg_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_9926 = \
+@COND_i386_multiboot_TRUE@ $(nodist_jpeg_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ jpeg.marker
+@COND_i386_multiboot_TRUE@am__append_9927 = jpeg.mod
+@COND_i386_multiboot_TRUE@am__append_9928 = jpeg.marker
+@COND_i386_ieee1275_TRUE@am__append_9929 = jpeg.module
+@COND_i386_ieee1275_TRUE@am__append_9930 = jpeg.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_9931 =
+@COND_i386_ieee1275_TRUE@am__append_9932 = $(nodist_jpeg_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_9933 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_jpeg_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ jpeg.marker
+@COND_i386_ieee1275_TRUE@am__append_9934 = jpeg.mod
+@COND_i386_ieee1275_TRUE@am__append_9935 = jpeg.marker
+@COND_x86_64_efi_TRUE@am__append_9936 = jpeg.module
+@COND_x86_64_efi_TRUE@am__append_9937 = jpeg.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_9938 =
+@COND_x86_64_efi_TRUE@am__append_9939 = $(nodist_jpeg_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_9940 = $(nodist_jpeg_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ jpeg.marker
+@COND_x86_64_efi_TRUE@am__append_9941 = jpeg.mod
+@COND_x86_64_efi_TRUE@am__append_9942 = jpeg.marker
+@COND_mips_yeeloong_TRUE@am__append_9943 = jpeg.module
+@COND_mips_yeeloong_TRUE@am__append_9944 = jpeg.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_9945 =
+@COND_mips_yeeloong_TRUE@am__append_9946 = $(nodist_jpeg_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_9947 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_jpeg_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ jpeg.marker
+@COND_mips_yeeloong_TRUE@am__append_9948 = jpeg.mod
+@COND_mips_yeeloong_TRUE@am__append_9949 = jpeg.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9950 = jpeg.module
+@COND_sparc64_ieee1275_TRUE@am__append_9951 = jpeg.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_9952 =
+@COND_sparc64_ieee1275_TRUE@am__append_9953 = $(nodist_jpeg_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_9954 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_jpeg_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ jpeg.marker
+@COND_sparc64_ieee1275_TRUE@am__append_9955 = jpeg.mod
+@COND_sparc64_ieee1275_TRUE@am__append_9956 = jpeg.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9957 = jpeg.module
+@COND_powerpc_ieee1275_TRUE@am__append_9958 = jpeg.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_9959 =
+@COND_powerpc_ieee1275_TRUE@am__append_9960 = $(nodist_jpeg_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_9961 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_jpeg_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ jpeg.marker
+@COND_powerpc_ieee1275_TRUE@am__append_9962 = jpeg.mod
+@COND_powerpc_ieee1275_TRUE@am__append_9963 = jpeg.marker
+@COND_emu_TRUE@am__append_9964 = png.module
+@COND_emu_TRUE@am__append_9965 = png.module$(EXEEXT)
+@COND_emu_TRUE@am__append_9966 =
+@COND_emu_TRUE@am__append_9967 = $(nodist_png_module_SOURCES)
+@COND_emu_TRUE@am__append_9968 = $(nodist_png_module_SOURCES) \
+@COND_emu_TRUE@ png.marker
+@COND_emu_TRUE@am__append_9969 = png.mod
+@COND_emu_TRUE@am__append_9970 = png.marker
+@COND_i386_pc_TRUE@am__append_9971 = png.module
+@COND_i386_pc_TRUE@am__append_9972 = png.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_9973 =
+@COND_i386_pc_TRUE@am__append_9974 = $(nodist_png_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_9975 = $(nodist_png_module_SOURCES) \
+@COND_i386_pc_TRUE@ png.marker
+@COND_i386_pc_TRUE@am__append_9976 = png.mod
+@COND_i386_pc_TRUE@am__append_9977 = png.marker
+@COND_i386_efi_TRUE@am__append_9978 = png.module
+@COND_i386_efi_TRUE@am__append_9979 = png.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_9980 =
+@COND_i386_efi_TRUE@am__append_9981 = $(nodist_png_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_9982 = $(nodist_png_module_SOURCES) \
+@COND_i386_efi_TRUE@ png.marker
+@COND_i386_efi_TRUE@am__append_9983 = png.mod
+@COND_i386_efi_TRUE@am__append_9984 = png.marker
+@COND_i386_qemu_TRUE@am__append_9985 = png.module
+@COND_i386_qemu_TRUE@am__append_9986 = png.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_9987 =
+@COND_i386_qemu_TRUE@am__append_9988 = $(nodist_png_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_9989 = $(nodist_png_module_SOURCES) \
+@COND_i386_qemu_TRUE@ png.marker
+@COND_i386_qemu_TRUE@am__append_9990 = png.mod
+@COND_i386_qemu_TRUE@am__append_9991 = png.marker
+@COND_i386_coreboot_TRUE@am__append_9992 = png.module
+@COND_i386_coreboot_TRUE@am__append_9993 = png.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_9994 =
+@COND_i386_coreboot_TRUE@am__append_9995 = $(nodist_png_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_9996 = \
+@COND_i386_coreboot_TRUE@ $(nodist_png_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ png.marker
+@COND_i386_coreboot_TRUE@am__append_9997 = png.mod
+@COND_i386_coreboot_TRUE@am__append_9998 = png.marker
+@COND_i386_multiboot_TRUE@am__append_9999 = png.module
+@COND_i386_multiboot_TRUE@am__append_10000 = png.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10001 =
+@COND_i386_multiboot_TRUE@am__append_10002 = $(nodist_png_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10003 = \
+@COND_i386_multiboot_TRUE@ $(nodist_png_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ png.marker
+@COND_i386_multiboot_TRUE@am__append_10004 = png.mod
+@COND_i386_multiboot_TRUE@am__append_10005 = png.marker
+@COND_i386_ieee1275_TRUE@am__append_10006 = png.module
+@COND_i386_ieee1275_TRUE@am__append_10007 = png.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10008 =
+@COND_i386_ieee1275_TRUE@am__append_10009 = $(nodist_png_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10010 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_png_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ png.marker
+@COND_i386_ieee1275_TRUE@am__append_10011 = png.mod
+@COND_i386_ieee1275_TRUE@am__append_10012 = png.marker
+@COND_x86_64_efi_TRUE@am__append_10013 = png.module
+@COND_x86_64_efi_TRUE@am__append_10014 = png.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10015 =
+@COND_x86_64_efi_TRUE@am__append_10016 = $(nodist_png_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10017 = $(nodist_png_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ png.marker
+@COND_x86_64_efi_TRUE@am__append_10018 = png.mod
+@COND_x86_64_efi_TRUE@am__append_10019 = png.marker
+@COND_mips_yeeloong_TRUE@am__append_10020 = png.module
+@COND_mips_yeeloong_TRUE@am__append_10021 = png.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10022 =
+@COND_mips_yeeloong_TRUE@am__append_10023 = $(nodist_png_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10024 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_png_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ png.marker
+@COND_mips_yeeloong_TRUE@am__append_10025 = png.mod
+@COND_mips_yeeloong_TRUE@am__append_10026 = png.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10027 = png.module
+@COND_sparc64_ieee1275_TRUE@am__append_10028 = png.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10029 =
+@COND_sparc64_ieee1275_TRUE@am__append_10030 = $(nodist_png_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10031 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_png_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ png.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10032 = png.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10033 = png.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10034 = png.module
+@COND_powerpc_ieee1275_TRUE@am__append_10035 = png.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10036 =
+@COND_powerpc_ieee1275_TRUE@am__append_10037 = $(nodist_png_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10038 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_png_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ png.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10039 = png.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10040 = png.marker
+@COND_emu_TRUE@am__append_10041 = tga.module
+@COND_emu_TRUE@am__append_10042 = tga.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10043 =
+@COND_emu_TRUE@am__append_10044 = $(nodist_tga_module_SOURCES)
+@COND_emu_TRUE@am__append_10045 = $(nodist_tga_module_SOURCES) \
+@COND_emu_TRUE@ tga.marker
+@COND_emu_TRUE@am__append_10046 = tga.mod
+@COND_emu_TRUE@am__append_10047 = tga.marker
+@COND_i386_pc_TRUE@am__append_10048 = tga.module
+@COND_i386_pc_TRUE@am__append_10049 = tga.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10050 =
+@COND_i386_pc_TRUE@am__append_10051 = $(nodist_tga_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10052 = $(nodist_tga_module_SOURCES) \
+@COND_i386_pc_TRUE@ tga.marker
+@COND_i386_pc_TRUE@am__append_10053 = tga.mod
+@COND_i386_pc_TRUE@am__append_10054 = tga.marker
+@COND_i386_efi_TRUE@am__append_10055 = tga.module
+@COND_i386_efi_TRUE@am__append_10056 = tga.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10057 =
+@COND_i386_efi_TRUE@am__append_10058 = $(nodist_tga_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10059 = $(nodist_tga_module_SOURCES) \
+@COND_i386_efi_TRUE@ tga.marker
+@COND_i386_efi_TRUE@am__append_10060 = tga.mod
+@COND_i386_efi_TRUE@am__append_10061 = tga.marker
+@COND_i386_qemu_TRUE@am__append_10062 = tga.module
+@COND_i386_qemu_TRUE@am__append_10063 = tga.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10064 =
+@COND_i386_qemu_TRUE@am__append_10065 = $(nodist_tga_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10066 = $(nodist_tga_module_SOURCES) \
+@COND_i386_qemu_TRUE@ tga.marker
+@COND_i386_qemu_TRUE@am__append_10067 = tga.mod
+@COND_i386_qemu_TRUE@am__append_10068 = tga.marker
+@COND_i386_coreboot_TRUE@am__append_10069 = tga.module
+@COND_i386_coreboot_TRUE@am__append_10070 = tga.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10071 =
+@COND_i386_coreboot_TRUE@am__append_10072 = $(nodist_tga_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10073 = \
+@COND_i386_coreboot_TRUE@ $(nodist_tga_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ tga.marker
+@COND_i386_coreboot_TRUE@am__append_10074 = tga.mod
+@COND_i386_coreboot_TRUE@am__append_10075 = tga.marker
+@COND_i386_multiboot_TRUE@am__append_10076 = tga.module
+@COND_i386_multiboot_TRUE@am__append_10077 = tga.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10078 =
+@COND_i386_multiboot_TRUE@am__append_10079 = $(nodist_tga_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10080 = \
+@COND_i386_multiboot_TRUE@ $(nodist_tga_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ tga.marker
+@COND_i386_multiboot_TRUE@am__append_10081 = tga.mod
+@COND_i386_multiboot_TRUE@am__append_10082 = tga.marker
+@COND_i386_ieee1275_TRUE@am__append_10083 = tga.module
+@COND_i386_ieee1275_TRUE@am__append_10084 = tga.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10085 =
+@COND_i386_ieee1275_TRUE@am__append_10086 = $(nodist_tga_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10087 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_tga_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ tga.marker
+@COND_i386_ieee1275_TRUE@am__append_10088 = tga.mod
+@COND_i386_ieee1275_TRUE@am__append_10089 = tga.marker
+@COND_x86_64_efi_TRUE@am__append_10090 = tga.module
+@COND_x86_64_efi_TRUE@am__append_10091 = tga.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10092 =
+@COND_x86_64_efi_TRUE@am__append_10093 = $(nodist_tga_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10094 = $(nodist_tga_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ tga.marker
+@COND_x86_64_efi_TRUE@am__append_10095 = tga.mod
+@COND_x86_64_efi_TRUE@am__append_10096 = tga.marker
+@COND_mips_yeeloong_TRUE@am__append_10097 = tga.module
+@COND_mips_yeeloong_TRUE@am__append_10098 = tga.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10099 =
+@COND_mips_yeeloong_TRUE@am__append_10100 = $(nodist_tga_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10101 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_tga_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ tga.marker
+@COND_mips_yeeloong_TRUE@am__append_10102 = tga.mod
+@COND_mips_yeeloong_TRUE@am__append_10103 = tga.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10104 = tga.module
+@COND_sparc64_ieee1275_TRUE@am__append_10105 = tga.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10106 =
+@COND_sparc64_ieee1275_TRUE@am__append_10107 = $(nodist_tga_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10108 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_tga_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ tga.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10109 = tga.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10110 = tga.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10111 = tga.module
+@COND_powerpc_ieee1275_TRUE@am__append_10112 = tga.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10113 =
+@COND_powerpc_ieee1275_TRUE@am__append_10114 = $(nodist_tga_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10115 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_tga_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ tga.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10116 = tga.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10117 = tga.marker
+@COND_i386_pc_TRUE@am__append_10118 = vbe.module
+@COND_i386_pc_TRUE@am__append_10119 = vbe.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10120 =
+@COND_i386_pc_TRUE@am__append_10121 = $(nodist_vbe_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10122 = $(nodist_vbe_module_SOURCES) \
+@COND_i386_pc_TRUE@ vbe.marker
+@COND_i386_pc_TRUE@am__append_10123 = vbe.mod
+@COND_i386_pc_TRUE@am__append_10124 = vbe.marker
+@COND_emu_TRUE@am__append_10125 = video_fb.module
+@COND_emu_TRUE@am__append_10126 = video_fb.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10127 =
+@COND_emu_TRUE@am__append_10128 = $(nodist_video_fb_module_SOURCES)
+@COND_emu_TRUE@am__append_10129 = $(nodist_video_fb_module_SOURCES) \
+@COND_emu_TRUE@ video_fb.marker
+@COND_emu_TRUE@am__append_10130 = video_fb.mod
+@COND_emu_TRUE@am__append_10131 = video_fb.marker
+@COND_i386_pc_TRUE@am__append_10132 = video_fb.module
+@COND_i386_pc_TRUE@am__append_10133 = video_fb.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10134 =
+@COND_i386_pc_TRUE@am__append_10135 = $(nodist_video_fb_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10136 = \
+@COND_i386_pc_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_i386_pc_TRUE@ video_fb.marker
+@COND_i386_pc_TRUE@am__append_10137 = video_fb.mod
+@COND_i386_pc_TRUE@am__append_10138 = video_fb.marker
+@COND_i386_efi_TRUE@am__append_10139 = video_fb.module
+@COND_i386_efi_TRUE@am__append_10140 = video_fb.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10141 =
+@COND_i386_efi_TRUE@am__append_10142 = $(nodist_video_fb_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10143 = \
+@COND_i386_efi_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_i386_efi_TRUE@ video_fb.marker
+@COND_i386_efi_TRUE@am__append_10144 = video_fb.mod
+@COND_i386_efi_TRUE@am__append_10145 = video_fb.marker
+@COND_i386_qemu_TRUE@am__append_10146 = video_fb.module
+@COND_i386_qemu_TRUE@am__append_10147 = video_fb.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10148 =
+@COND_i386_qemu_TRUE@am__append_10149 = $(nodist_video_fb_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10150 = \
+@COND_i386_qemu_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_i386_qemu_TRUE@ video_fb.marker
+@COND_i386_qemu_TRUE@am__append_10151 = video_fb.mod
+@COND_i386_qemu_TRUE@am__append_10152 = video_fb.marker
+@COND_i386_coreboot_TRUE@am__append_10153 = video_fb.module
+@COND_i386_coreboot_TRUE@am__append_10154 = video_fb.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10155 =
+@COND_i386_coreboot_TRUE@am__append_10156 = $(nodist_video_fb_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10157 = \
+@COND_i386_coreboot_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ video_fb.marker
+@COND_i386_coreboot_TRUE@am__append_10158 = video_fb.mod
+@COND_i386_coreboot_TRUE@am__append_10159 = video_fb.marker
+@COND_i386_multiboot_TRUE@am__append_10160 = video_fb.module
+@COND_i386_multiboot_TRUE@am__append_10161 = video_fb.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10162 =
+@COND_i386_multiboot_TRUE@am__append_10163 = $(nodist_video_fb_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10164 = \
+@COND_i386_multiboot_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ video_fb.marker
+@COND_i386_multiboot_TRUE@am__append_10165 = video_fb.mod
+@COND_i386_multiboot_TRUE@am__append_10166 = video_fb.marker
+@COND_i386_ieee1275_TRUE@am__append_10167 = video_fb.module
+@COND_i386_ieee1275_TRUE@am__append_10168 = video_fb.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10169 =
+@COND_i386_ieee1275_TRUE@am__append_10170 = $(nodist_video_fb_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10171 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ video_fb.marker
+@COND_i386_ieee1275_TRUE@am__append_10172 = video_fb.mod
+@COND_i386_ieee1275_TRUE@am__append_10173 = video_fb.marker
+@COND_x86_64_efi_TRUE@am__append_10174 = video_fb.module
+@COND_x86_64_efi_TRUE@am__append_10175 = video_fb.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10176 =
+@COND_x86_64_efi_TRUE@am__append_10177 = $(nodist_video_fb_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10178 = \
+@COND_x86_64_efi_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ video_fb.marker
+@COND_x86_64_efi_TRUE@am__append_10179 = video_fb.mod
+@COND_x86_64_efi_TRUE@am__append_10180 = video_fb.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10181 = video_fb.module
+@COND_sparc64_ieee1275_TRUE@am__append_10182 = video_fb.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10183 =
+@COND_sparc64_ieee1275_TRUE@am__append_10184 = $(nodist_video_fb_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10185 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ video_fb.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10186 = video_fb.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10187 = video_fb.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10188 = video_fb.module
+@COND_powerpc_ieee1275_TRUE@am__append_10189 = video_fb.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10190 =
+@COND_powerpc_ieee1275_TRUE@am__append_10191 = $(nodist_video_fb_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10192 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_video_fb_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ video_fb.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10193 = video_fb.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10194 = video_fb.marker
+@COND_emu_TRUE@am__append_10195 = video.module
+@COND_emu_TRUE@am__append_10196 = video.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10197 =
+@COND_emu_TRUE@am__append_10198 = $(nodist_video_module_SOURCES)
+@COND_emu_TRUE@am__append_10199 = $(nodist_video_module_SOURCES) \
+@COND_emu_TRUE@ video.marker
+@COND_emu_TRUE@am__append_10200 = video.mod
+@COND_emu_TRUE@am__append_10201 = video.marker
+@COND_i386_pc_TRUE@am__append_10202 = video.module
+@COND_i386_pc_TRUE@am__append_10203 = video.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10204 =
+@COND_i386_pc_TRUE@am__append_10205 = $(nodist_video_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10206 = $(nodist_video_module_SOURCES) \
+@COND_i386_pc_TRUE@ video.marker
+@COND_i386_pc_TRUE@am__append_10207 = video.mod
+@COND_i386_pc_TRUE@am__append_10208 = video.marker
+@COND_i386_efi_TRUE@am__append_10209 = video.module
+@COND_i386_efi_TRUE@am__append_10210 = video.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10211 =
+@COND_i386_efi_TRUE@am__append_10212 = $(nodist_video_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10213 = $(nodist_video_module_SOURCES) \
+@COND_i386_efi_TRUE@ video.marker
+@COND_i386_efi_TRUE@am__append_10214 = video.mod
+@COND_i386_efi_TRUE@am__append_10215 = video.marker
+@COND_i386_qemu_TRUE@am__append_10216 = video.module
+@COND_i386_qemu_TRUE@am__append_10217 = video.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10218 =
+@COND_i386_qemu_TRUE@am__append_10219 = $(nodist_video_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10220 = \
+@COND_i386_qemu_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_i386_qemu_TRUE@ video.marker
+@COND_i386_qemu_TRUE@am__append_10221 = video.mod
+@COND_i386_qemu_TRUE@am__append_10222 = video.marker
+@COND_i386_coreboot_TRUE@am__append_10223 = video.module
+@COND_i386_coreboot_TRUE@am__append_10224 = video.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10225 =
+@COND_i386_coreboot_TRUE@am__append_10226 = $(nodist_video_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10227 = \
+@COND_i386_coreboot_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ video.marker
+@COND_i386_coreboot_TRUE@am__append_10228 = video.mod
+@COND_i386_coreboot_TRUE@am__append_10229 = video.marker
+@COND_i386_multiboot_TRUE@am__append_10230 = video.module
+@COND_i386_multiboot_TRUE@am__append_10231 = video.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10232 =
+@COND_i386_multiboot_TRUE@am__append_10233 = $(nodist_video_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10234 = \
+@COND_i386_multiboot_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ video.marker
+@COND_i386_multiboot_TRUE@am__append_10235 = video.mod
+@COND_i386_multiboot_TRUE@am__append_10236 = video.marker
+@COND_i386_ieee1275_TRUE@am__append_10237 = video.module
+@COND_i386_ieee1275_TRUE@am__append_10238 = video.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10239 =
+@COND_i386_ieee1275_TRUE@am__append_10240 = $(nodist_video_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10241 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ video.marker
+@COND_i386_ieee1275_TRUE@am__append_10242 = video.mod
+@COND_i386_ieee1275_TRUE@am__append_10243 = video.marker
+@COND_x86_64_efi_TRUE@am__append_10244 = video.module
+@COND_x86_64_efi_TRUE@am__append_10245 = video.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10246 =
+@COND_x86_64_efi_TRUE@am__append_10247 = $(nodist_video_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10248 = \
+@COND_x86_64_efi_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ video.marker
+@COND_x86_64_efi_TRUE@am__append_10249 = video.mod
+@COND_x86_64_efi_TRUE@am__append_10250 = video.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10251 = video.module
+@COND_sparc64_ieee1275_TRUE@am__append_10252 = video.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10253 =
+@COND_sparc64_ieee1275_TRUE@am__append_10254 = $(nodist_video_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10255 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ video.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10256 = video.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10257 = video.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10258 = video.module \
+@COND_powerpc_ieee1275_TRUE@ ieee1275_fb.module
+@COND_powerpc_ieee1275_TRUE@am__append_10259 = video.module$(EXEEXT) \
+@COND_powerpc_ieee1275_TRUE@ ieee1275_fb.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10260 =
+@COND_powerpc_ieee1275_TRUE@am__append_10261 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ieee1275_fb_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10262 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_video_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ video.marker \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_ieee1275_fb_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ ieee1275_fb.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10263 = video.mod \
+@COND_powerpc_ieee1275_TRUE@ ieee1275_fb.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10264 = video.marker \
+@COND_powerpc_ieee1275_TRUE@ ieee1275_fb.marker
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_10265 = sdl.module
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_10266 = sdl.module$(EXEEXT)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_10267 =
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_10268 = $(nodist_sdl_module_SOURCES)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_10269 = $(nodist_sdl_module_SOURCES) \
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@ sdl.marker
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_10270 = sdl.mod
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_10271 = sdl.marker
+@COND_emu_TRUE@am__append_10272 = datehook.module
+@COND_emu_TRUE@am__append_10273 = datehook.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10274 =
+@COND_emu_TRUE@am__append_10275 = $(nodist_datehook_module_SOURCES)
+@COND_emu_TRUE@am__append_10276 = $(nodist_datehook_module_SOURCES) \
+@COND_emu_TRUE@ datehook.marker
+@COND_emu_TRUE@am__append_10277 = datehook.mod
+@COND_emu_TRUE@am__append_10278 = datehook.marker
+@COND_i386_pc_TRUE@am__append_10279 = datehook.module
+@COND_i386_pc_TRUE@am__append_10280 = datehook.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10281 =
+@COND_i386_pc_TRUE@am__append_10282 = $(nodist_datehook_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10283 = \
+@COND_i386_pc_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_i386_pc_TRUE@ datehook.marker
+@COND_i386_pc_TRUE@am__append_10284 = datehook.mod
+@COND_i386_pc_TRUE@am__append_10285 = datehook.marker
+@COND_i386_efi_TRUE@am__append_10286 = datehook.module
+@COND_i386_efi_TRUE@am__append_10287 = datehook.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10288 =
+@COND_i386_efi_TRUE@am__append_10289 = $(nodist_datehook_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10290 = \
+@COND_i386_efi_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_i386_efi_TRUE@ datehook.marker
+@COND_i386_efi_TRUE@am__append_10291 = datehook.mod
+@COND_i386_efi_TRUE@am__append_10292 = datehook.marker
+@COND_i386_qemu_TRUE@am__append_10293 = datehook.module
+@COND_i386_qemu_TRUE@am__append_10294 = datehook.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10295 =
+@COND_i386_qemu_TRUE@am__append_10296 = $(nodist_datehook_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10297 = \
+@COND_i386_qemu_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_i386_qemu_TRUE@ datehook.marker
+@COND_i386_qemu_TRUE@am__append_10298 = datehook.mod
+@COND_i386_qemu_TRUE@am__append_10299 = datehook.marker
+@COND_i386_coreboot_TRUE@am__append_10300 = datehook.module
+@COND_i386_coreboot_TRUE@am__append_10301 = datehook.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10302 =
+@COND_i386_coreboot_TRUE@am__append_10303 = $(nodist_datehook_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10304 = \
+@COND_i386_coreboot_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ datehook.marker
+@COND_i386_coreboot_TRUE@am__append_10305 = datehook.mod
+@COND_i386_coreboot_TRUE@am__append_10306 = datehook.marker
+@COND_i386_multiboot_TRUE@am__append_10307 = datehook.module
+@COND_i386_multiboot_TRUE@am__append_10308 = datehook.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10309 =
+@COND_i386_multiboot_TRUE@am__append_10310 = $(nodist_datehook_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10311 = \
+@COND_i386_multiboot_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ datehook.marker
+@COND_i386_multiboot_TRUE@am__append_10312 = datehook.mod
+@COND_i386_multiboot_TRUE@am__append_10313 = datehook.marker
+@COND_i386_ieee1275_TRUE@am__append_10314 = datehook.module
+@COND_i386_ieee1275_TRUE@am__append_10315 = datehook.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10316 =
+@COND_i386_ieee1275_TRUE@am__append_10317 = $(nodist_datehook_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10318 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ datehook.marker
+@COND_i386_ieee1275_TRUE@am__append_10319 = datehook.mod
+@COND_i386_ieee1275_TRUE@am__append_10320 = datehook.marker
+@COND_x86_64_efi_TRUE@am__append_10321 = datehook.module
+@COND_x86_64_efi_TRUE@am__append_10322 = datehook.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10323 =
+@COND_x86_64_efi_TRUE@am__append_10324 = $(nodist_datehook_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10325 = \
+@COND_x86_64_efi_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ datehook.marker
+@COND_x86_64_efi_TRUE@am__append_10326 = datehook.mod
+@COND_x86_64_efi_TRUE@am__append_10327 = datehook.marker
+@COND_mips_yeeloong_TRUE@am__append_10328 = datehook.module
+@COND_mips_yeeloong_TRUE@am__append_10329 = datehook.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10330 =
+@COND_mips_yeeloong_TRUE@am__append_10331 = $(nodist_datehook_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10332 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ datehook.marker
+@COND_mips_yeeloong_TRUE@am__append_10333 = datehook.mod
+@COND_mips_yeeloong_TRUE@am__append_10334 = datehook.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10335 = datehook.module
+@COND_sparc64_ieee1275_TRUE@am__append_10336 = datehook.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10337 =
+@COND_sparc64_ieee1275_TRUE@am__append_10338 = $(nodist_datehook_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10339 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ datehook.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10340 = datehook.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10341 = datehook.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10342 = datehook.module
+@COND_powerpc_ieee1275_TRUE@am__append_10343 = datehook.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10344 =
+@COND_powerpc_ieee1275_TRUE@am__append_10345 = $(nodist_datehook_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10346 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_datehook_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ datehook.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10347 = datehook.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10348 = datehook.marker
+@COND_emu_TRUE@am__append_10349 = legacycfg.module
+@COND_emu_TRUE@am__append_10350 = legacycfg.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10351 =
+@COND_emu_TRUE@am__append_10352 = $(nodist_legacycfg_module_SOURCES)
+@COND_emu_TRUE@am__append_10353 = $(nodist_legacycfg_module_SOURCES) \
+@COND_emu_TRUE@ legacycfg.marker
+@COND_emu_TRUE@am__append_10354 = legacycfg.mod
+@COND_emu_TRUE@am__append_10355 = legacycfg.marker
+@COND_i386_pc_TRUE@am__append_10356 = legacycfg.module
+@COND_i386_pc_TRUE@am__append_10357 = legacycfg.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10358 =
+@COND_i386_pc_TRUE@am__append_10359 = $(nodist_legacycfg_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10360 = \
+@COND_i386_pc_TRUE@ $(nodist_legacycfg_module_SOURCES) \
+@COND_i386_pc_TRUE@ legacycfg.marker
+@COND_i386_pc_TRUE@am__append_10361 = legacycfg.mod
+@COND_i386_pc_TRUE@am__append_10362 = legacycfg.marker
+@COND_emu_TRUE@am__append_10363 = test_blockarg.module
+@COND_emu_TRUE@am__append_10364 = test_blockarg.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10365 =
+@COND_emu_TRUE@am__append_10366 = $(nodist_test_blockarg_module_SOURCES)
+@COND_emu_TRUE@am__append_10367 = \
+@COND_emu_TRUE@ $(nodist_test_blockarg_module_SOURCES) \
+@COND_emu_TRUE@ test_blockarg.marker
+@COND_emu_TRUE@am__append_10368 = test_blockarg.mod
+@COND_emu_TRUE@am__append_10369 = test_blockarg.marker
+@COND_i386_pc_TRUE@am__append_10370 = test_blockarg.module
+@COND_i386_pc_TRUE@am__append_10371 = test_blockarg.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10372 =
+@COND_i386_pc_TRUE@am__append_10373 = $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10374 = \
+@COND_i386_pc_TRUE@ $(nodist_test_blockarg_module_SOURCES) \
+@COND_i386_pc_TRUE@ test_blockarg.marker
+@COND_i386_pc_TRUE@am__append_10375 = test_blockarg.mod
+@COND_i386_pc_TRUE@am__append_10376 = test_blockarg.marker
+@COND_i386_efi_TRUE@am__append_10377 = test_blockarg.module
+@COND_i386_efi_TRUE@am__append_10378 = test_blockarg.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10379 =
+@COND_i386_efi_TRUE@am__append_10380 = $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10381 = \
+@COND_i386_efi_TRUE@ $(nodist_test_blockarg_module_SOURCES) \
+@COND_i386_efi_TRUE@ test_blockarg.marker
+@COND_i386_efi_TRUE@am__append_10382 = test_blockarg.mod
+@COND_i386_efi_TRUE@am__append_10383 = test_blockarg.marker
+@COND_i386_qemu_TRUE@am__append_10384 = test_blockarg.module
+@COND_i386_qemu_TRUE@am__append_10385 = test_blockarg.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10386 =
+@COND_i386_qemu_TRUE@am__append_10387 = $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10388 = \
+@COND_i386_qemu_TRUE@ $(nodist_test_blockarg_module_SOURCES) \
+@COND_i386_qemu_TRUE@ test_blockarg.marker
+@COND_i386_qemu_TRUE@am__append_10389 = test_blockarg.mod
+@COND_i386_qemu_TRUE@am__append_10390 = test_blockarg.marker
+@COND_i386_coreboot_TRUE@am__append_10391 = test_blockarg.module
+@COND_i386_coreboot_TRUE@am__append_10392 = test_blockarg.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10393 =
+@COND_i386_coreboot_TRUE@am__append_10394 = $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10395 = $(nodist_test_blockarg_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ test_blockarg.marker
+@COND_i386_coreboot_TRUE@am__append_10396 = test_blockarg.mod
+@COND_i386_coreboot_TRUE@am__append_10397 = test_blockarg.marker
+@COND_i386_multiboot_TRUE@am__append_10398 = test_blockarg.module
+@COND_i386_multiboot_TRUE@am__append_10399 = test_blockarg.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10400 =
+@COND_i386_multiboot_TRUE@am__append_10401 = $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10402 = $(nodist_test_blockarg_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ test_blockarg.marker
+@COND_i386_multiboot_TRUE@am__append_10403 = test_blockarg.mod
+@COND_i386_multiboot_TRUE@am__append_10404 = test_blockarg.marker
+@COND_i386_ieee1275_TRUE@am__append_10405 = test_blockarg.module
+@COND_i386_ieee1275_TRUE@am__append_10406 = test_blockarg.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10407 =
+@COND_i386_ieee1275_TRUE@am__append_10408 = $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10409 = $(nodist_test_blockarg_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ test_blockarg.marker
+@COND_i386_ieee1275_TRUE@am__append_10410 = test_blockarg.mod
+@COND_i386_ieee1275_TRUE@am__append_10411 = test_blockarg.marker
+@COND_x86_64_efi_TRUE@am__append_10412 = test_blockarg.module
+@COND_x86_64_efi_TRUE@am__append_10413 = test_blockarg.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10414 =
+@COND_x86_64_efi_TRUE@am__append_10415 = $(nodist_test_blockarg_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10416 = \
+@COND_x86_64_efi_TRUE@ $(nodist_test_blockarg_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ test_blockarg.marker
+@COND_x86_64_efi_TRUE@am__append_10417 = test_blockarg.mod
+@COND_x86_64_efi_TRUE@am__append_10418 = test_blockarg.marker
+@COND_mips_yeeloong_TRUE@am__append_10419 = test_blockarg.module
+@COND_mips_yeeloong_TRUE@am__append_10420 = test_blockarg.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10421 =
+@COND_mips_yeeloong_TRUE@am__append_10422 = $(nodist_test_blockarg_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10423 = $(nodist_test_blockarg_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ test_blockarg.marker
+@COND_mips_yeeloong_TRUE@am__append_10424 = test_blockarg.mod
+@COND_mips_yeeloong_TRUE@am__append_10425 = test_blockarg.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10426 = test_blockarg.module
+@COND_sparc64_ieee1275_TRUE@am__append_10427 = test_blockarg.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10428 =
+@COND_sparc64_ieee1275_TRUE@am__append_10429 = $(nodist_test_blockarg_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10430 = $(nodist_test_blockarg_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ test_blockarg.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10431 = test_blockarg.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10432 = test_blockarg.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10433 = test_blockarg.module
+@COND_powerpc_ieee1275_TRUE@am__append_10434 = test_blockarg.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10435 =
+@COND_powerpc_ieee1275_TRUE@am__append_10436 = $(nodist_test_blockarg_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10437 = $(nodist_test_blockarg_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ test_blockarg.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10438 = test_blockarg.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10439 = test_blockarg.marker
+@COND_emu_TRUE@am__append_10440 = xzio.module
+@COND_emu_TRUE@am__append_10441 = xzio.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10442 =
+@COND_emu_TRUE@am__append_10443 = $(nodist_xzio_module_SOURCES)
+@COND_emu_TRUE@am__append_10444 = $(nodist_xzio_module_SOURCES) \
+@COND_emu_TRUE@ xzio.marker
+@COND_emu_TRUE@am__append_10445 = xzio.mod
+@COND_emu_TRUE@am__append_10446 = xzio.marker
+@COND_i386_pc_TRUE@am__append_10447 = xzio.module
+@COND_i386_pc_TRUE@am__append_10448 = xzio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10449 =
+@COND_i386_pc_TRUE@am__append_10450 = $(nodist_xzio_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10451 = $(nodist_xzio_module_SOURCES) \
+@COND_i386_pc_TRUE@ xzio.marker
+@COND_i386_pc_TRUE@am__append_10452 = xzio.mod
+@COND_i386_pc_TRUE@am__append_10453 = xzio.marker
+@COND_i386_efi_TRUE@am__append_10454 = xzio.module
+@COND_i386_efi_TRUE@am__append_10455 = xzio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10456 =
+@COND_i386_efi_TRUE@am__append_10457 = $(nodist_xzio_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10458 = $(nodist_xzio_module_SOURCES) \
+@COND_i386_efi_TRUE@ xzio.marker
+@COND_i386_efi_TRUE@am__append_10459 = xzio.mod
+@COND_i386_efi_TRUE@am__append_10460 = xzio.marker
+@COND_i386_qemu_TRUE@am__append_10461 = xzio.module
+@COND_i386_qemu_TRUE@am__append_10462 = xzio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10463 =
+@COND_i386_qemu_TRUE@am__append_10464 = $(nodist_xzio_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10465 = $(nodist_xzio_module_SOURCES) \
+@COND_i386_qemu_TRUE@ xzio.marker
+@COND_i386_qemu_TRUE@am__append_10466 = xzio.mod
+@COND_i386_qemu_TRUE@am__append_10467 = xzio.marker
+@COND_i386_coreboot_TRUE@am__append_10468 = xzio.module
+@COND_i386_coreboot_TRUE@am__append_10469 = xzio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10470 =
+@COND_i386_coreboot_TRUE@am__append_10471 = $(nodist_xzio_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10472 = \
+@COND_i386_coreboot_TRUE@ $(nodist_xzio_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ xzio.marker
+@COND_i386_coreboot_TRUE@am__append_10473 = xzio.mod
+@COND_i386_coreboot_TRUE@am__append_10474 = xzio.marker
+@COND_i386_multiboot_TRUE@am__append_10475 = xzio.module
+@COND_i386_multiboot_TRUE@am__append_10476 = xzio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10477 =
+@COND_i386_multiboot_TRUE@am__append_10478 = $(nodist_xzio_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10479 = \
+@COND_i386_multiboot_TRUE@ $(nodist_xzio_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ xzio.marker
+@COND_i386_multiboot_TRUE@am__append_10480 = xzio.mod
+@COND_i386_multiboot_TRUE@am__append_10481 = xzio.marker
+@COND_i386_ieee1275_TRUE@am__append_10482 = xzio.module
+@COND_i386_ieee1275_TRUE@am__append_10483 = xzio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10484 =
+@COND_i386_ieee1275_TRUE@am__append_10485 = $(nodist_xzio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10486 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_xzio_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ xzio.marker
+@COND_i386_ieee1275_TRUE@am__append_10487 = xzio.mod
+@COND_i386_ieee1275_TRUE@am__append_10488 = xzio.marker
+@COND_x86_64_efi_TRUE@am__append_10489 = xzio.module
+@COND_x86_64_efi_TRUE@am__append_10490 = xzio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10491 =
+@COND_x86_64_efi_TRUE@am__append_10492 = $(nodist_xzio_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10493 = \
+@COND_x86_64_efi_TRUE@ $(nodist_xzio_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ xzio.marker
+@COND_x86_64_efi_TRUE@am__append_10494 = xzio.mod
+@COND_x86_64_efi_TRUE@am__append_10495 = xzio.marker
+@COND_mips_yeeloong_TRUE@am__append_10496 = xzio.module
+@COND_mips_yeeloong_TRUE@am__append_10497 = xzio.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10498 =
+@COND_mips_yeeloong_TRUE@am__append_10499 = $(nodist_xzio_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10500 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_xzio_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ xzio.marker
+@COND_mips_yeeloong_TRUE@am__append_10501 = xzio.mod
+@COND_mips_yeeloong_TRUE@am__append_10502 = xzio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10503 = xzio.module
+@COND_sparc64_ieee1275_TRUE@am__append_10504 = xzio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10505 =
+@COND_sparc64_ieee1275_TRUE@am__append_10506 = $(nodist_xzio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10507 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_xzio_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ xzio.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10508 = xzio.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10509 = xzio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10510 = xzio.module
+@COND_powerpc_ieee1275_TRUE@am__append_10511 = xzio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10512 =
+@COND_powerpc_ieee1275_TRUE@am__append_10513 = $(nodist_xzio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10514 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_xzio_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ xzio.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10515 = xzio.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10516 = xzio.marker
+@COND_emu_TRUE@am__append_10517 = testload.module
+@COND_emu_TRUE@am__append_10518 = testload.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10519 =
+@COND_emu_TRUE@am__append_10520 = $(nodist_testload_module_SOURCES)
+@COND_emu_TRUE@am__append_10521 = $(nodist_testload_module_SOURCES) \
+@COND_emu_TRUE@ testload.marker
+@COND_emu_TRUE@am__append_10522 = testload.mod
+@COND_emu_TRUE@am__append_10523 = testload.marker
+@COND_i386_pc_TRUE@am__append_10524 = testload.module
+@COND_i386_pc_TRUE@am__append_10525 = testload.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10526 =
+@COND_i386_pc_TRUE@am__append_10527 = $(nodist_testload_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10528 = \
+@COND_i386_pc_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_i386_pc_TRUE@ testload.marker
+@COND_i386_pc_TRUE@am__append_10529 = testload.mod
+@COND_i386_pc_TRUE@am__append_10530 = testload.marker
+@COND_i386_efi_TRUE@am__append_10531 = testload.module
+@COND_i386_efi_TRUE@am__append_10532 = testload.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10533 =
+@COND_i386_efi_TRUE@am__append_10534 = $(nodist_testload_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10535 = \
+@COND_i386_efi_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_i386_efi_TRUE@ testload.marker
+@COND_i386_efi_TRUE@am__append_10536 = testload.mod
+@COND_i386_efi_TRUE@am__append_10537 = testload.marker
+@COND_i386_qemu_TRUE@am__append_10538 = testload.module
+@COND_i386_qemu_TRUE@am__append_10539 = testload.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10540 =
+@COND_i386_qemu_TRUE@am__append_10541 = $(nodist_testload_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10542 = \
+@COND_i386_qemu_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_i386_qemu_TRUE@ testload.marker
+@COND_i386_qemu_TRUE@am__append_10543 = testload.mod
+@COND_i386_qemu_TRUE@am__append_10544 = testload.marker
+@COND_i386_coreboot_TRUE@am__append_10545 = testload.module
+@COND_i386_coreboot_TRUE@am__append_10546 = testload.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10547 =
+@COND_i386_coreboot_TRUE@am__append_10548 = $(nodist_testload_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10549 = \
+@COND_i386_coreboot_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ testload.marker
+@COND_i386_coreboot_TRUE@am__append_10550 = testload.mod
+@COND_i386_coreboot_TRUE@am__append_10551 = testload.marker
+@COND_i386_multiboot_TRUE@am__append_10552 = testload.module
+@COND_i386_multiboot_TRUE@am__append_10553 = testload.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10554 =
+@COND_i386_multiboot_TRUE@am__append_10555 = $(nodist_testload_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10556 = \
+@COND_i386_multiboot_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ testload.marker
+@COND_i386_multiboot_TRUE@am__append_10557 = testload.mod
+@COND_i386_multiboot_TRUE@am__append_10558 = testload.marker
+@COND_i386_ieee1275_TRUE@am__append_10559 = testload.module
+@COND_i386_ieee1275_TRUE@am__append_10560 = testload.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10561 =
+@COND_i386_ieee1275_TRUE@am__append_10562 = $(nodist_testload_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10563 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ testload.marker
+@COND_i386_ieee1275_TRUE@am__append_10564 = testload.mod
+@COND_i386_ieee1275_TRUE@am__append_10565 = testload.marker
+@COND_x86_64_efi_TRUE@am__append_10566 = testload.module
+@COND_x86_64_efi_TRUE@am__append_10567 = testload.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10568 =
+@COND_x86_64_efi_TRUE@am__append_10569 = $(nodist_testload_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10570 = \
+@COND_x86_64_efi_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ testload.marker
+@COND_x86_64_efi_TRUE@am__append_10571 = testload.mod
+@COND_x86_64_efi_TRUE@am__append_10572 = testload.marker
+@COND_mips_yeeloong_TRUE@am__append_10573 = testload.module
+@COND_mips_yeeloong_TRUE@am__append_10574 = testload.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10575 =
+@COND_mips_yeeloong_TRUE@am__append_10576 = $(nodist_testload_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10577 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ testload.marker
+@COND_mips_yeeloong_TRUE@am__append_10578 = testload.mod
+@COND_mips_yeeloong_TRUE@am__append_10579 = testload.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10580 = testload.module
+@COND_sparc64_ieee1275_TRUE@am__append_10581 = testload.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10582 =
+@COND_sparc64_ieee1275_TRUE@am__append_10583 = $(nodist_testload_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10584 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ testload.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10585 = testload.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10586 = testload.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10587 = testload.module
+@COND_powerpc_ieee1275_TRUE@am__append_10588 = testload.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10589 =
+@COND_powerpc_ieee1275_TRUE@am__append_10590 = $(nodist_testload_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10591 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_testload_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ testload.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10592 = testload.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10593 = testload.marker
+@COND_i386_pc_TRUE@am__append_10594 = lsapm.module
+@COND_i386_pc_TRUE@am__append_10595 = lsapm.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10596 =
+@COND_i386_pc_TRUE@am__append_10597 = $(nodist_lsapm_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10598 = $(nodist_lsapm_module_SOURCES) \
+@COND_i386_pc_TRUE@ lsapm.marker
+@COND_i386_pc_TRUE@am__append_10599 = lsapm.mod
+@COND_i386_pc_TRUE@am__append_10600 = lsapm.marker
+@COND_emu_TRUE@am__append_10601 = keylayouts.module
+@COND_emu_TRUE@am__append_10602 = keylayouts.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10603 =
+@COND_emu_TRUE@am__append_10604 = $(nodist_keylayouts_module_SOURCES)
+@COND_emu_TRUE@am__append_10605 = $(nodist_keylayouts_module_SOURCES) \
+@COND_emu_TRUE@ keylayouts.marker
+@COND_emu_TRUE@am__append_10606 = keylayouts.mod
+@COND_emu_TRUE@am__append_10607 = keylayouts.marker
+@COND_i386_pc_TRUE@am__append_10608 = keylayouts.module
+@COND_i386_pc_TRUE@am__append_10609 = keylayouts.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10610 =
+@COND_i386_pc_TRUE@am__append_10611 = $(nodist_keylayouts_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10612 = \
+@COND_i386_pc_TRUE@ $(nodist_keylayouts_module_SOURCES) \
+@COND_i386_pc_TRUE@ keylayouts.marker
+@COND_i386_pc_TRUE@am__append_10613 = keylayouts.mod
+@COND_i386_pc_TRUE@am__append_10614 = keylayouts.marker
+@COND_i386_efi_TRUE@am__append_10615 = keylayouts.module
+@COND_i386_efi_TRUE@am__append_10616 = keylayouts.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10617 =
+@COND_i386_efi_TRUE@am__append_10618 = $(nodist_keylayouts_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10619 = \
+@COND_i386_efi_TRUE@ $(nodist_keylayouts_module_SOURCES) \
+@COND_i386_efi_TRUE@ keylayouts.marker
+@COND_i386_efi_TRUE@am__append_10620 = keylayouts.mod
+@COND_i386_efi_TRUE@am__append_10621 = keylayouts.marker
+@COND_i386_qemu_TRUE@am__append_10622 = keylayouts.module
+@COND_i386_qemu_TRUE@am__append_10623 = keylayouts.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10624 =
+@COND_i386_qemu_TRUE@am__append_10625 = $(nodist_keylayouts_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10626 = \
+@COND_i386_qemu_TRUE@ $(nodist_keylayouts_module_SOURCES) \
+@COND_i386_qemu_TRUE@ keylayouts.marker
+@COND_i386_qemu_TRUE@am__append_10627 = keylayouts.mod
+@COND_i386_qemu_TRUE@am__append_10628 = keylayouts.marker
+@COND_i386_coreboot_TRUE@am__append_10629 = keylayouts.module
+@COND_i386_coreboot_TRUE@am__append_10630 = keylayouts.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10631 =
+@COND_i386_coreboot_TRUE@am__append_10632 = $(nodist_keylayouts_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10633 = \
+@COND_i386_coreboot_TRUE@ $(nodist_keylayouts_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ keylayouts.marker
+@COND_i386_coreboot_TRUE@am__append_10634 = keylayouts.mod
+@COND_i386_coreboot_TRUE@am__append_10635 = keylayouts.marker
+@COND_i386_multiboot_TRUE@am__append_10636 = keylayouts.module
+@COND_i386_multiboot_TRUE@am__append_10637 = keylayouts.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10638 =
+@COND_i386_multiboot_TRUE@am__append_10639 = $(nodist_keylayouts_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10640 = \
+@COND_i386_multiboot_TRUE@ $(nodist_keylayouts_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ keylayouts.marker
+@COND_i386_multiboot_TRUE@am__append_10641 = keylayouts.mod
+@COND_i386_multiboot_TRUE@am__append_10642 = keylayouts.marker
+@COND_i386_ieee1275_TRUE@am__append_10643 = keylayouts.module
+@COND_i386_ieee1275_TRUE@am__append_10644 = keylayouts.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10645 =
+@COND_i386_ieee1275_TRUE@am__append_10646 = $(nodist_keylayouts_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10647 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_keylayouts_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ keylayouts.marker
+@COND_i386_ieee1275_TRUE@am__append_10648 = keylayouts.mod
+@COND_i386_ieee1275_TRUE@am__append_10649 = keylayouts.marker
+@COND_x86_64_efi_TRUE@am__append_10650 = keylayouts.module
+@COND_x86_64_efi_TRUE@am__append_10651 = keylayouts.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10652 =
+@COND_x86_64_efi_TRUE@am__append_10653 = $(nodist_keylayouts_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10654 = \
+@COND_x86_64_efi_TRUE@ $(nodist_keylayouts_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ keylayouts.marker
+@COND_x86_64_efi_TRUE@am__append_10655 = keylayouts.mod
+@COND_x86_64_efi_TRUE@am__append_10656 = keylayouts.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10657 = keylayouts.module
+@COND_sparc64_ieee1275_TRUE@am__append_10658 = keylayouts.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10659 =
+@COND_sparc64_ieee1275_TRUE@am__append_10660 = $(nodist_keylayouts_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10661 = $(nodist_keylayouts_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ keylayouts.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10662 = keylayouts.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10663 = keylayouts.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10664 = keylayouts.module
+@COND_powerpc_ieee1275_TRUE@am__append_10665 = keylayouts.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10666 =
+@COND_powerpc_ieee1275_TRUE@am__append_10667 = $(nodist_keylayouts_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10668 = $(nodist_keylayouts_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ keylayouts.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10669 = keylayouts.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10670 = keylayouts.marker
+@COND_emu_TRUE@am__append_10671 = gcry_arcfour.module
+@COND_emu_TRUE@am__append_10672 = gcry_arcfour.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10673 =
+@COND_emu_TRUE@am__append_10674 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_emu_TRUE@am__append_10675 = \
+@COND_emu_TRUE@ $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_emu_TRUE@ gcry_arcfour.marker
+@COND_emu_TRUE@am__append_10676 = gcry_arcfour.mod
+@COND_emu_TRUE@am__append_10677 = gcry_arcfour.marker
+@COND_i386_pc_TRUE@am__append_10678 = gcry_arcfour.module
+@COND_i386_pc_TRUE@am__append_10679 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10680 =
+@COND_i386_pc_TRUE@am__append_10681 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10682 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_arcfour.marker
+@COND_i386_pc_TRUE@am__append_10683 = gcry_arcfour.mod
+@COND_i386_pc_TRUE@am__append_10684 = gcry_arcfour.marker
+@COND_i386_efi_TRUE@am__append_10685 = gcry_arcfour.module
+@COND_i386_efi_TRUE@am__append_10686 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10687 =
+@COND_i386_efi_TRUE@am__append_10688 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10689 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_arcfour.marker
+@COND_i386_efi_TRUE@am__append_10690 = gcry_arcfour.mod
+@COND_i386_efi_TRUE@am__append_10691 = gcry_arcfour.marker
+@COND_i386_qemu_TRUE@am__append_10692 = gcry_arcfour.module
+@COND_i386_qemu_TRUE@am__append_10693 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10694 =
+@COND_i386_qemu_TRUE@am__append_10695 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10696 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_arcfour.marker
+@COND_i386_qemu_TRUE@am__append_10697 = gcry_arcfour.mod
+@COND_i386_qemu_TRUE@am__append_10698 = gcry_arcfour.marker
+@COND_i386_coreboot_TRUE@am__append_10699 = gcry_arcfour.module
+@COND_i386_coreboot_TRUE@am__append_10700 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10701 =
+@COND_i386_coreboot_TRUE@am__append_10702 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10703 = $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_arcfour.marker
+@COND_i386_coreboot_TRUE@am__append_10704 = gcry_arcfour.mod
+@COND_i386_coreboot_TRUE@am__append_10705 = gcry_arcfour.marker
+@COND_i386_multiboot_TRUE@am__append_10706 = gcry_arcfour.module
+@COND_i386_multiboot_TRUE@am__append_10707 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10708 =
+@COND_i386_multiboot_TRUE@am__append_10709 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10710 = $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_arcfour.marker
+@COND_i386_multiboot_TRUE@am__append_10711 = gcry_arcfour.mod
+@COND_i386_multiboot_TRUE@am__append_10712 = gcry_arcfour.marker
+@COND_i386_ieee1275_TRUE@am__append_10713 = gcry_arcfour.module
+@COND_i386_ieee1275_TRUE@am__append_10714 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10715 =
+@COND_i386_ieee1275_TRUE@am__append_10716 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10717 = $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_arcfour.marker
+@COND_i386_ieee1275_TRUE@am__append_10718 = gcry_arcfour.mod
+@COND_i386_ieee1275_TRUE@am__append_10719 = gcry_arcfour.marker
+@COND_x86_64_efi_TRUE@am__append_10720 = gcry_arcfour.module
+@COND_x86_64_efi_TRUE@am__append_10721 = gcry_arcfour.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10722 =
+@COND_x86_64_efi_TRUE@am__append_10723 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10724 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_arcfour.marker
+@COND_x86_64_efi_TRUE@am__append_10725 = gcry_arcfour.mod
+@COND_x86_64_efi_TRUE@am__append_10726 = gcry_arcfour.marker
+@COND_mips_yeeloong_TRUE@am__append_10727 = gcry_arcfour.module
+@COND_mips_yeeloong_TRUE@am__append_10728 = gcry_arcfour.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10729 =
+@COND_mips_yeeloong_TRUE@am__append_10730 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10731 = $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_arcfour.marker
+@COND_mips_yeeloong_TRUE@am__append_10732 = gcry_arcfour.mod
+@COND_mips_yeeloong_TRUE@am__append_10733 = gcry_arcfour.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10734 = gcry_arcfour.module
+@COND_sparc64_ieee1275_TRUE@am__append_10735 = gcry_arcfour.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10736 =
+@COND_sparc64_ieee1275_TRUE@am__append_10737 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10738 = $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_arcfour.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10739 = gcry_arcfour.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10740 = gcry_arcfour.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10741 = gcry_arcfour.module
+@COND_powerpc_ieee1275_TRUE@am__append_10742 = gcry_arcfour.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10743 =
+@COND_powerpc_ieee1275_TRUE@am__append_10744 = $(nodist_gcry_arcfour_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10745 = $(nodist_gcry_arcfour_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_arcfour.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10746 = gcry_arcfour.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10747 = gcry_arcfour.marker
+@COND_emu_TRUE@am__append_10748 = gcry_blowfish.module
+@COND_emu_TRUE@am__append_10749 = gcry_blowfish.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10750 =
+@COND_emu_TRUE@am__append_10751 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_emu_TRUE@am__append_10752 = \
+@COND_emu_TRUE@ $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_emu_TRUE@ gcry_blowfish.marker
+@COND_emu_TRUE@am__append_10753 = gcry_blowfish.mod
+@COND_emu_TRUE@am__append_10754 = gcry_blowfish.marker
+@COND_i386_pc_TRUE@am__append_10755 = gcry_blowfish.module
+@COND_i386_pc_TRUE@am__append_10756 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10757 =
+@COND_i386_pc_TRUE@am__append_10758 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10759 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_blowfish.marker
+@COND_i386_pc_TRUE@am__append_10760 = gcry_blowfish.mod
+@COND_i386_pc_TRUE@am__append_10761 = gcry_blowfish.marker
+@COND_i386_efi_TRUE@am__append_10762 = gcry_blowfish.module
+@COND_i386_efi_TRUE@am__append_10763 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10764 =
+@COND_i386_efi_TRUE@am__append_10765 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10766 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_blowfish.marker
+@COND_i386_efi_TRUE@am__append_10767 = gcry_blowfish.mod
+@COND_i386_efi_TRUE@am__append_10768 = gcry_blowfish.marker
+@COND_i386_qemu_TRUE@am__append_10769 = gcry_blowfish.module
+@COND_i386_qemu_TRUE@am__append_10770 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10771 =
+@COND_i386_qemu_TRUE@am__append_10772 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10773 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_blowfish.marker
+@COND_i386_qemu_TRUE@am__append_10774 = gcry_blowfish.mod
+@COND_i386_qemu_TRUE@am__append_10775 = gcry_blowfish.marker
+@COND_i386_coreboot_TRUE@am__append_10776 = gcry_blowfish.module
+@COND_i386_coreboot_TRUE@am__append_10777 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10778 =
+@COND_i386_coreboot_TRUE@am__append_10779 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10780 = $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_blowfish.marker
+@COND_i386_coreboot_TRUE@am__append_10781 = gcry_blowfish.mod
+@COND_i386_coreboot_TRUE@am__append_10782 = gcry_blowfish.marker
+@COND_i386_multiboot_TRUE@am__append_10783 = gcry_blowfish.module
+@COND_i386_multiboot_TRUE@am__append_10784 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10785 =
+@COND_i386_multiboot_TRUE@am__append_10786 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10787 = $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_blowfish.marker
+@COND_i386_multiboot_TRUE@am__append_10788 = gcry_blowfish.mod
+@COND_i386_multiboot_TRUE@am__append_10789 = gcry_blowfish.marker
+@COND_i386_ieee1275_TRUE@am__append_10790 = gcry_blowfish.module
+@COND_i386_ieee1275_TRUE@am__append_10791 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10792 =
+@COND_i386_ieee1275_TRUE@am__append_10793 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10794 = $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_blowfish.marker
+@COND_i386_ieee1275_TRUE@am__append_10795 = gcry_blowfish.mod
+@COND_i386_ieee1275_TRUE@am__append_10796 = gcry_blowfish.marker
+@COND_x86_64_efi_TRUE@am__append_10797 = gcry_blowfish.module
+@COND_x86_64_efi_TRUE@am__append_10798 = gcry_blowfish.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10799 =
+@COND_x86_64_efi_TRUE@am__append_10800 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10801 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_blowfish.marker
+@COND_x86_64_efi_TRUE@am__append_10802 = gcry_blowfish.mod
+@COND_x86_64_efi_TRUE@am__append_10803 = gcry_blowfish.marker
+@COND_mips_yeeloong_TRUE@am__append_10804 = gcry_blowfish.module
+@COND_mips_yeeloong_TRUE@am__append_10805 = gcry_blowfish.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10806 =
+@COND_mips_yeeloong_TRUE@am__append_10807 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10808 = $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_blowfish.marker
+@COND_mips_yeeloong_TRUE@am__append_10809 = gcry_blowfish.mod
+@COND_mips_yeeloong_TRUE@am__append_10810 = gcry_blowfish.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10811 = gcry_blowfish.module
+@COND_sparc64_ieee1275_TRUE@am__append_10812 = gcry_blowfish.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10813 =
+@COND_sparc64_ieee1275_TRUE@am__append_10814 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10815 = $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_blowfish.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10816 = gcry_blowfish.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10817 = gcry_blowfish.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10818 = gcry_blowfish.module
+@COND_powerpc_ieee1275_TRUE@am__append_10819 = gcry_blowfish.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10820 =
+@COND_powerpc_ieee1275_TRUE@am__append_10821 = $(nodist_gcry_blowfish_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10822 = $(nodist_gcry_blowfish_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_blowfish.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10823 = gcry_blowfish.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10824 = gcry_blowfish.marker
+@COND_emu_TRUE@am__append_10825 = gcry_camellia.module
+@COND_emu_TRUE@am__append_10826 = gcry_camellia.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10827 =
+@COND_emu_TRUE@am__append_10828 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_emu_TRUE@am__append_10829 = \
+@COND_emu_TRUE@ $(nodist_gcry_camellia_module_SOURCES) \
+@COND_emu_TRUE@ gcry_camellia.marker
+@COND_emu_TRUE@am__append_10830 = gcry_camellia.mod
+@COND_emu_TRUE@am__append_10831 = gcry_camellia.marker
+@COND_i386_pc_TRUE@am__append_10832 = gcry_camellia.module
+@COND_i386_pc_TRUE@am__append_10833 = gcry_camellia.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10834 =
+@COND_i386_pc_TRUE@am__append_10835 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10836 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_camellia_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_camellia.marker
+@COND_i386_pc_TRUE@am__append_10837 = gcry_camellia.mod
+@COND_i386_pc_TRUE@am__append_10838 = gcry_camellia.marker
+@COND_i386_efi_TRUE@am__append_10839 = gcry_camellia.module
+@COND_i386_efi_TRUE@am__append_10840 = gcry_camellia.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10841 =
+@COND_i386_efi_TRUE@am__append_10842 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10843 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_camellia_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_camellia.marker
+@COND_i386_efi_TRUE@am__append_10844 = gcry_camellia.mod
+@COND_i386_efi_TRUE@am__append_10845 = gcry_camellia.marker
+@COND_i386_qemu_TRUE@am__append_10846 = gcry_camellia.module
+@COND_i386_qemu_TRUE@am__append_10847 = gcry_camellia.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10848 =
+@COND_i386_qemu_TRUE@am__append_10849 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10850 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_camellia_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_camellia.marker
+@COND_i386_qemu_TRUE@am__append_10851 = gcry_camellia.mod
+@COND_i386_qemu_TRUE@am__append_10852 = gcry_camellia.marker
+@COND_i386_coreboot_TRUE@am__append_10853 = gcry_camellia.module
+@COND_i386_coreboot_TRUE@am__append_10854 = gcry_camellia.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10855 =
+@COND_i386_coreboot_TRUE@am__append_10856 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10857 = $(nodist_gcry_camellia_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_camellia.marker
+@COND_i386_coreboot_TRUE@am__append_10858 = gcry_camellia.mod
+@COND_i386_coreboot_TRUE@am__append_10859 = gcry_camellia.marker
+@COND_i386_multiboot_TRUE@am__append_10860 = gcry_camellia.module
+@COND_i386_multiboot_TRUE@am__append_10861 = gcry_camellia.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10862 =
+@COND_i386_multiboot_TRUE@am__append_10863 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10864 = $(nodist_gcry_camellia_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_camellia.marker
+@COND_i386_multiboot_TRUE@am__append_10865 = gcry_camellia.mod
+@COND_i386_multiboot_TRUE@am__append_10866 = gcry_camellia.marker
+@COND_i386_ieee1275_TRUE@am__append_10867 = gcry_camellia.module
+@COND_i386_ieee1275_TRUE@am__append_10868 = gcry_camellia.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10869 =
+@COND_i386_ieee1275_TRUE@am__append_10870 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10871 = $(nodist_gcry_camellia_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_camellia.marker
+@COND_i386_ieee1275_TRUE@am__append_10872 = gcry_camellia.mod
+@COND_i386_ieee1275_TRUE@am__append_10873 = gcry_camellia.marker
+@COND_x86_64_efi_TRUE@am__append_10874 = gcry_camellia.module
+@COND_x86_64_efi_TRUE@am__append_10875 = gcry_camellia.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10876 =
+@COND_x86_64_efi_TRUE@am__append_10877 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10878 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_camellia_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_camellia.marker
+@COND_x86_64_efi_TRUE@am__append_10879 = gcry_camellia.mod
+@COND_x86_64_efi_TRUE@am__append_10880 = gcry_camellia.marker
+@COND_mips_yeeloong_TRUE@am__append_10881 = gcry_camellia.module
+@COND_mips_yeeloong_TRUE@am__append_10882 = gcry_camellia.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10883 =
+@COND_mips_yeeloong_TRUE@am__append_10884 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10885 = $(nodist_gcry_camellia_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_camellia.marker
+@COND_mips_yeeloong_TRUE@am__append_10886 = gcry_camellia.mod
+@COND_mips_yeeloong_TRUE@am__append_10887 = gcry_camellia.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10888 = gcry_camellia.module
+@COND_sparc64_ieee1275_TRUE@am__append_10889 = gcry_camellia.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10890 =
+@COND_sparc64_ieee1275_TRUE@am__append_10891 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10892 = $(nodist_gcry_camellia_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_camellia.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10893 = gcry_camellia.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10894 = gcry_camellia.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10895 = gcry_camellia.module
+@COND_powerpc_ieee1275_TRUE@am__append_10896 = gcry_camellia.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10897 =
+@COND_powerpc_ieee1275_TRUE@am__append_10898 = $(nodist_gcry_camellia_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10899 = $(nodist_gcry_camellia_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_camellia.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10900 = gcry_camellia.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10901 = gcry_camellia.marker
+@COND_emu_TRUE@am__append_10902 = gcry_cast5.module
+@COND_emu_TRUE@am__append_10903 = gcry_cast5.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10904 =
+@COND_emu_TRUE@am__append_10905 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_emu_TRUE@am__append_10906 = $(nodist_gcry_cast5_module_SOURCES) \
+@COND_emu_TRUE@ gcry_cast5.marker
+@COND_emu_TRUE@am__append_10907 = gcry_cast5.mod
+@COND_emu_TRUE@am__append_10908 = gcry_cast5.marker
+@COND_i386_pc_TRUE@am__append_10909 = gcry_cast5.module
+@COND_i386_pc_TRUE@am__append_10910 = gcry_cast5.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10911 =
+@COND_i386_pc_TRUE@am__append_10912 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10913 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_cast5.marker
+@COND_i386_pc_TRUE@am__append_10914 = gcry_cast5.mod
+@COND_i386_pc_TRUE@am__append_10915 = gcry_cast5.marker
+@COND_i386_efi_TRUE@am__append_10916 = gcry_cast5.module
+@COND_i386_efi_TRUE@am__append_10917 = gcry_cast5.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10918 =
+@COND_i386_efi_TRUE@am__append_10919 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10920 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_cast5.marker
+@COND_i386_efi_TRUE@am__append_10921 = gcry_cast5.mod
+@COND_i386_efi_TRUE@am__append_10922 = gcry_cast5.marker
+@COND_i386_qemu_TRUE@am__append_10923 = gcry_cast5.module
+@COND_i386_qemu_TRUE@am__append_10924 = gcry_cast5.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_10925 =
+@COND_i386_qemu_TRUE@am__append_10926 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_10927 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_cast5.marker
+@COND_i386_qemu_TRUE@am__append_10928 = gcry_cast5.mod
+@COND_i386_qemu_TRUE@am__append_10929 = gcry_cast5.marker
+@COND_i386_coreboot_TRUE@am__append_10930 = gcry_cast5.module
+@COND_i386_coreboot_TRUE@am__append_10931 = gcry_cast5.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_10932 =
+@COND_i386_coreboot_TRUE@am__append_10933 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_10934 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_cast5.marker
+@COND_i386_coreboot_TRUE@am__append_10935 = gcry_cast5.mod
+@COND_i386_coreboot_TRUE@am__append_10936 = gcry_cast5.marker
+@COND_i386_multiboot_TRUE@am__append_10937 = gcry_cast5.module
+@COND_i386_multiboot_TRUE@am__append_10938 = gcry_cast5.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_10939 =
+@COND_i386_multiboot_TRUE@am__append_10940 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_10941 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_cast5.marker
+@COND_i386_multiboot_TRUE@am__append_10942 = gcry_cast5.mod
+@COND_i386_multiboot_TRUE@am__append_10943 = gcry_cast5.marker
+@COND_i386_ieee1275_TRUE@am__append_10944 = gcry_cast5.module
+@COND_i386_ieee1275_TRUE@am__append_10945 = gcry_cast5.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_10946 =
+@COND_i386_ieee1275_TRUE@am__append_10947 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_10948 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_cast5.marker
+@COND_i386_ieee1275_TRUE@am__append_10949 = gcry_cast5.mod
+@COND_i386_ieee1275_TRUE@am__append_10950 = gcry_cast5.marker
+@COND_x86_64_efi_TRUE@am__append_10951 = gcry_cast5.module
+@COND_x86_64_efi_TRUE@am__append_10952 = gcry_cast5.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_10953 =
+@COND_x86_64_efi_TRUE@am__append_10954 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_10955 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_cast5.marker
+@COND_x86_64_efi_TRUE@am__append_10956 = gcry_cast5.mod
+@COND_x86_64_efi_TRUE@am__append_10957 = gcry_cast5.marker
+@COND_mips_yeeloong_TRUE@am__append_10958 = gcry_cast5.module
+@COND_mips_yeeloong_TRUE@am__append_10959 = gcry_cast5.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_10960 =
+@COND_mips_yeeloong_TRUE@am__append_10961 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_10962 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_cast5_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_cast5.marker
+@COND_mips_yeeloong_TRUE@am__append_10963 = gcry_cast5.mod
+@COND_mips_yeeloong_TRUE@am__append_10964 = gcry_cast5.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10965 = gcry_cast5.module
+@COND_sparc64_ieee1275_TRUE@am__append_10966 = gcry_cast5.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_10967 =
+@COND_sparc64_ieee1275_TRUE@am__append_10968 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_10969 = $(nodist_gcry_cast5_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_cast5.marker
+@COND_sparc64_ieee1275_TRUE@am__append_10970 = gcry_cast5.mod
+@COND_sparc64_ieee1275_TRUE@am__append_10971 = gcry_cast5.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10972 = gcry_cast5.module
+@COND_powerpc_ieee1275_TRUE@am__append_10973 = gcry_cast5.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_10974 =
+@COND_powerpc_ieee1275_TRUE@am__append_10975 = $(nodist_gcry_cast5_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_10976 = $(nodist_gcry_cast5_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_cast5.marker
+@COND_powerpc_ieee1275_TRUE@am__append_10977 = gcry_cast5.mod
+@COND_powerpc_ieee1275_TRUE@am__append_10978 = gcry_cast5.marker
+@COND_emu_TRUE@am__append_10979 = gcry_crc.module
+@COND_emu_TRUE@am__append_10980 = gcry_crc.module$(EXEEXT)
+@COND_emu_TRUE@am__append_10981 =
+@COND_emu_TRUE@am__append_10982 = $(nodist_gcry_crc_module_SOURCES)
+@COND_emu_TRUE@am__append_10983 = $(nodist_gcry_crc_module_SOURCES) \
+@COND_emu_TRUE@ gcry_crc.marker
+@COND_emu_TRUE@am__append_10984 = gcry_crc.mod
+@COND_emu_TRUE@am__append_10985 = gcry_crc.marker
+@COND_i386_pc_TRUE@am__append_10986 = gcry_crc.module
+@COND_i386_pc_TRUE@am__append_10987 = gcry_crc.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_10988 =
+@COND_i386_pc_TRUE@am__append_10989 = $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_10990 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_crc.marker
+@COND_i386_pc_TRUE@am__append_10991 = gcry_crc.mod
+@COND_i386_pc_TRUE@am__append_10992 = gcry_crc.marker
+@COND_i386_efi_TRUE@am__append_10993 = gcry_crc.module
+@COND_i386_efi_TRUE@am__append_10994 = gcry_crc.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_10995 =
+@COND_i386_efi_TRUE@am__append_10996 = $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_10997 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_crc.marker
+@COND_i386_efi_TRUE@am__append_10998 = gcry_crc.mod
+@COND_i386_efi_TRUE@am__append_10999 = gcry_crc.marker
+@COND_i386_qemu_TRUE@am__append_11000 = gcry_crc.module
+@COND_i386_qemu_TRUE@am__append_11001 = gcry_crc.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11002 =
+@COND_i386_qemu_TRUE@am__append_11003 = $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11004 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_crc.marker
+@COND_i386_qemu_TRUE@am__append_11005 = gcry_crc.mod
+@COND_i386_qemu_TRUE@am__append_11006 = gcry_crc.marker
+@COND_i386_coreboot_TRUE@am__append_11007 = gcry_crc.module
+@COND_i386_coreboot_TRUE@am__append_11008 = gcry_crc.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11009 =
+@COND_i386_coreboot_TRUE@am__append_11010 = $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11011 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_crc.marker
+@COND_i386_coreboot_TRUE@am__append_11012 = gcry_crc.mod
+@COND_i386_coreboot_TRUE@am__append_11013 = gcry_crc.marker
+@COND_i386_multiboot_TRUE@am__append_11014 = gcry_crc.module
+@COND_i386_multiboot_TRUE@am__append_11015 = gcry_crc.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11016 =
+@COND_i386_multiboot_TRUE@am__append_11017 = $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11018 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_crc.marker
+@COND_i386_multiboot_TRUE@am__append_11019 = gcry_crc.mod
+@COND_i386_multiboot_TRUE@am__append_11020 = gcry_crc.marker
+@COND_i386_ieee1275_TRUE@am__append_11021 = gcry_crc.module
+@COND_i386_ieee1275_TRUE@am__append_11022 = gcry_crc.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11023 =
+@COND_i386_ieee1275_TRUE@am__append_11024 = $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11025 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_crc.marker
+@COND_i386_ieee1275_TRUE@am__append_11026 = gcry_crc.mod
+@COND_i386_ieee1275_TRUE@am__append_11027 = gcry_crc.marker
+@COND_x86_64_efi_TRUE@am__append_11028 = gcry_crc.module
+@COND_x86_64_efi_TRUE@am__append_11029 = gcry_crc.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11030 =
+@COND_x86_64_efi_TRUE@am__append_11031 = $(nodist_gcry_crc_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11032 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_crc.marker
+@COND_x86_64_efi_TRUE@am__append_11033 = gcry_crc.mod
+@COND_x86_64_efi_TRUE@am__append_11034 = gcry_crc.marker
+@COND_mips_yeeloong_TRUE@am__append_11035 = gcry_crc.module
+@COND_mips_yeeloong_TRUE@am__append_11036 = gcry_crc.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11037 =
+@COND_mips_yeeloong_TRUE@am__append_11038 = $(nodist_gcry_crc_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11039 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_crc.marker
+@COND_mips_yeeloong_TRUE@am__append_11040 = gcry_crc.mod
+@COND_mips_yeeloong_TRUE@am__append_11041 = gcry_crc.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11042 = gcry_crc.module
+@COND_sparc64_ieee1275_TRUE@am__append_11043 = gcry_crc.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11044 =
+@COND_sparc64_ieee1275_TRUE@am__append_11045 = $(nodist_gcry_crc_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11046 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_crc.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11047 = gcry_crc.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11048 = gcry_crc.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11049 = gcry_crc.module
+@COND_powerpc_ieee1275_TRUE@am__append_11050 = gcry_crc.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11051 =
+@COND_powerpc_ieee1275_TRUE@am__append_11052 = $(nodist_gcry_crc_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11053 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gcry_crc_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_crc.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11054 = gcry_crc.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11055 = gcry_crc.marker
+@COND_emu_TRUE@am__append_11056 = gcry_des.module
+@COND_emu_TRUE@am__append_11057 = gcry_des.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11058 =
+@COND_emu_TRUE@am__append_11059 = $(nodist_gcry_des_module_SOURCES)
+@COND_emu_TRUE@am__append_11060 = $(nodist_gcry_des_module_SOURCES) \
+@COND_emu_TRUE@ gcry_des.marker
+@COND_emu_TRUE@am__append_11061 = gcry_des.mod
+@COND_emu_TRUE@am__append_11062 = gcry_des.marker
+@COND_i386_pc_TRUE@am__append_11063 = gcry_des.module
+@COND_i386_pc_TRUE@am__append_11064 = gcry_des.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11065 =
+@COND_i386_pc_TRUE@am__append_11066 = $(nodist_gcry_des_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11067 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_des.marker
+@COND_i386_pc_TRUE@am__append_11068 = gcry_des.mod
+@COND_i386_pc_TRUE@am__append_11069 = gcry_des.marker
+@COND_i386_efi_TRUE@am__append_11070 = gcry_des.module
+@COND_i386_efi_TRUE@am__append_11071 = gcry_des.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11072 =
+@COND_i386_efi_TRUE@am__append_11073 = $(nodist_gcry_des_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11074 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_des.marker
+@COND_i386_efi_TRUE@am__append_11075 = gcry_des.mod
+@COND_i386_efi_TRUE@am__append_11076 = gcry_des.marker
+@COND_i386_qemu_TRUE@am__append_11077 = gcry_des.module
+@COND_i386_qemu_TRUE@am__append_11078 = gcry_des.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11079 =
+@COND_i386_qemu_TRUE@am__append_11080 = $(nodist_gcry_des_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11081 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_des.marker
+@COND_i386_qemu_TRUE@am__append_11082 = gcry_des.mod
+@COND_i386_qemu_TRUE@am__append_11083 = gcry_des.marker
+@COND_i386_coreboot_TRUE@am__append_11084 = gcry_des.module
+@COND_i386_coreboot_TRUE@am__append_11085 = gcry_des.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11086 =
+@COND_i386_coreboot_TRUE@am__append_11087 = $(nodist_gcry_des_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11088 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_des.marker
+@COND_i386_coreboot_TRUE@am__append_11089 = gcry_des.mod
+@COND_i386_coreboot_TRUE@am__append_11090 = gcry_des.marker
+@COND_i386_multiboot_TRUE@am__append_11091 = gcry_des.module
+@COND_i386_multiboot_TRUE@am__append_11092 = gcry_des.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11093 =
+@COND_i386_multiboot_TRUE@am__append_11094 = $(nodist_gcry_des_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11095 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_des.marker
+@COND_i386_multiboot_TRUE@am__append_11096 = gcry_des.mod
+@COND_i386_multiboot_TRUE@am__append_11097 = gcry_des.marker
+@COND_i386_ieee1275_TRUE@am__append_11098 = gcry_des.module
+@COND_i386_ieee1275_TRUE@am__append_11099 = gcry_des.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11100 =
+@COND_i386_ieee1275_TRUE@am__append_11101 = $(nodist_gcry_des_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11102 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_des.marker
+@COND_i386_ieee1275_TRUE@am__append_11103 = gcry_des.mod
+@COND_i386_ieee1275_TRUE@am__append_11104 = gcry_des.marker
+@COND_x86_64_efi_TRUE@am__append_11105 = gcry_des.module
+@COND_x86_64_efi_TRUE@am__append_11106 = gcry_des.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11107 =
+@COND_x86_64_efi_TRUE@am__append_11108 = $(nodist_gcry_des_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11109 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_des.marker
+@COND_x86_64_efi_TRUE@am__append_11110 = gcry_des.mod
+@COND_x86_64_efi_TRUE@am__append_11111 = gcry_des.marker
+@COND_mips_yeeloong_TRUE@am__append_11112 = gcry_des.module
+@COND_mips_yeeloong_TRUE@am__append_11113 = gcry_des.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11114 =
+@COND_mips_yeeloong_TRUE@am__append_11115 = $(nodist_gcry_des_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11116 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_des.marker
+@COND_mips_yeeloong_TRUE@am__append_11117 = gcry_des.mod
+@COND_mips_yeeloong_TRUE@am__append_11118 = gcry_des.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11119 = gcry_des.module
+@COND_sparc64_ieee1275_TRUE@am__append_11120 = gcry_des.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11121 =
+@COND_sparc64_ieee1275_TRUE@am__append_11122 = $(nodist_gcry_des_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11123 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_des.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11124 = gcry_des.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11125 = gcry_des.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11126 = gcry_des.module
+@COND_powerpc_ieee1275_TRUE@am__append_11127 = gcry_des.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11128 =
+@COND_powerpc_ieee1275_TRUE@am__append_11129 = $(nodist_gcry_des_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11130 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gcry_des_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_des.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11131 = gcry_des.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11132 = gcry_des.marker
+@COND_emu_TRUE@am__append_11133 = gcry_md4.module
+@COND_emu_TRUE@am__append_11134 = gcry_md4.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11135 =
+@COND_emu_TRUE@am__append_11136 = $(nodist_gcry_md4_module_SOURCES)
+@COND_emu_TRUE@am__append_11137 = $(nodist_gcry_md4_module_SOURCES) \
+@COND_emu_TRUE@ gcry_md4.marker
+@COND_emu_TRUE@am__append_11138 = gcry_md4.mod
+@COND_emu_TRUE@am__append_11139 = gcry_md4.marker
+@COND_i386_pc_TRUE@am__append_11140 = gcry_md4.module
+@COND_i386_pc_TRUE@am__append_11141 = gcry_md4.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11142 =
+@COND_i386_pc_TRUE@am__append_11143 = $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11144 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_md4.marker
+@COND_i386_pc_TRUE@am__append_11145 = gcry_md4.mod
+@COND_i386_pc_TRUE@am__append_11146 = gcry_md4.marker
+@COND_i386_efi_TRUE@am__append_11147 = gcry_md4.module
+@COND_i386_efi_TRUE@am__append_11148 = gcry_md4.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11149 =
+@COND_i386_efi_TRUE@am__append_11150 = $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11151 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_md4.marker
+@COND_i386_efi_TRUE@am__append_11152 = gcry_md4.mod
+@COND_i386_efi_TRUE@am__append_11153 = gcry_md4.marker
+@COND_i386_qemu_TRUE@am__append_11154 = gcry_md4.module
+@COND_i386_qemu_TRUE@am__append_11155 = gcry_md4.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11156 =
+@COND_i386_qemu_TRUE@am__append_11157 = $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11158 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_md4.marker
+@COND_i386_qemu_TRUE@am__append_11159 = gcry_md4.mod
+@COND_i386_qemu_TRUE@am__append_11160 = gcry_md4.marker
+@COND_i386_coreboot_TRUE@am__append_11161 = gcry_md4.module
+@COND_i386_coreboot_TRUE@am__append_11162 = gcry_md4.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11163 =
+@COND_i386_coreboot_TRUE@am__append_11164 = $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11165 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_md4.marker
+@COND_i386_coreboot_TRUE@am__append_11166 = gcry_md4.mod
+@COND_i386_coreboot_TRUE@am__append_11167 = gcry_md4.marker
+@COND_i386_multiboot_TRUE@am__append_11168 = gcry_md4.module
+@COND_i386_multiboot_TRUE@am__append_11169 = gcry_md4.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11170 =
+@COND_i386_multiboot_TRUE@am__append_11171 = $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11172 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_md4.marker
+@COND_i386_multiboot_TRUE@am__append_11173 = gcry_md4.mod
+@COND_i386_multiboot_TRUE@am__append_11174 = gcry_md4.marker
+@COND_i386_ieee1275_TRUE@am__append_11175 = gcry_md4.module
+@COND_i386_ieee1275_TRUE@am__append_11176 = gcry_md4.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11177 =
+@COND_i386_ieee1275_TRUE@am__append_11178 = $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11179 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_md4.marker
+@COND_i386_ieee1275_TRUE@am__append_11180 = gcry_md4.mod
+@COND_i386_ieee1275_TRUE@am__append_11181 = gcry_md4.marker
+@COND_x86_64_efi_TRUE@am__append_11182 = gcry_md4.module
+@COND_x86_64_efi_TRUE@am__append_11183 = gcry_md4.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11184 =
+@COND_x86_64_efi_TRUE@am__append_11185 = $(nodist_gcry_md4_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11186 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_md4.marker
+@COND_x86_64_efi_TRUE@am__append_11187 = gcry_md4.mod
+@COND_x86_64_efi_TRUE@am__append_11188 = gcry_md4.marker
+@COND_mips_yeeloong_TRUE@am__append_11189 = gcry_md4.module
+@COND_mips_yeeloong_TRUE@am__append_11190 = gcry_md4.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11191 =
+@COND_mips_yeeloong_TRUE@am__append_11192 = $(nodist_gcry_md4_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11193 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_md4.marker
+@COND_mips_yeeloong_TRUE@am__append_11194 = gcry_md4.mod
+@COND_mips_yeeloong_TRUE@am__append_11195 = gcry_md4.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11196 = gcry_md4.module
+@COND_sparc64_ieee1275_TRUE@am__append_11197 = gcry_md4.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11198 =
+@COND_sparc64_ieee1275_TRUE@am__append_11199 = $(nodist_gcry_md4_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11200 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_md4.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11201 = gcry_md4.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11202 = gcry_md4.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11203 = gcry_md4.module
+@COND_powerpc_ieee1275_TRUE@am__append_11204 = gcry_md4.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11205 =
+@COND_powerpc_ieee1275_TRUE@am__append_11206 = $(nodist_gcry_md4_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11207 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gcry_md4_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_md4.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11208 = gcry_md4.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11209 = gcry_md4.marker
+@COND_emu_TRUE@am__append_11210 = gcry_md5.module
+@COND_emu_TRUE@am__append_11211 = gcry_md5.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11212 =
+@COND_emu_TRUE@am__append_11213 = $(nodist_gcry_md5_module_SOURCES)
+@COND_emu_TRUE@am__append_11214 = $(nodist_gcry_md5_module_SOURCES) \
+@COND_emu_TRUE@ gcry_md5.marker
+@COND_emu_TRUE@am__append_11215 = gcry_md5.mod
+@COND_emu_TRUE@am__append_11216 = gcry_md5.marker
+@COND_i386_pc_TRUE@am__append_11217 = gcry_md5.module
+@COND_i386_pc_TRUE@am__append_11218 = gcry_md5.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11219 =
+@COND_i386_pc_TRUE@am__append_11220 = $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11221 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_md5.marker
+@COND_i386_pc_TRUE@am__append_11222 = gcry_md5.mod
+@COND_i386_pc_TRUE@am__append_11223 = gcry_md5.marker
+@COND_i386_efi_TRUE@am__append_11224 = gcry_md5.module
+@COND_i386_efi_TRUE@am__append_11225 = gcry_md5.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11226 =
+@COND_i386_efi_TRUE@am__append_11227 = $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11228 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_md5.marker
+@COND_i386_efi_TRUE@am__append_11229 = gcry_md5.mod
+@COND_i386_efi_TRUE@am__append_11230 = gcry_md5.marker
+@COND_i386_qemu_TRUE@am__append_11231 = gcry_md5.module
+@COND_i386_qemu_TRUE@am__append_11232 = gcry_md5.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11233 =
+@COND_i386_qemu_TRUE@am__append_11234 = $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11235 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_md5.marker
+@COND_i386_qemu_TRUE@am__append_11236 = gcry_md5.mod
+@COND_i386_qemu_TRUE@am__append_11237 = gcry_md5.marker
+@COND_i386_coreboot_TRUE@am__append_11238 = gcry_md5.module
+@COND_i386_coreboot_TRUE@am__append_11239 = gcry_md5.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11240 =
+@COND_i386_coreboot_TRUE@am__append_11241 = $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11242 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_md5.marker
+@COND_i386_coreboot_TRUE@am__append_11243 = gcry_md5.mod
+@COND_i386_coreboot_TRUE@am__append_11244 = gcry_md5.marker
+@COND_i386_multiboot_TRUE@am__append_11245 = gcry_md5.module
+@COND_i386_multiboot_TRUE@am__append_11246 = gcry_md5.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11247 =
+@COND_i386_multiboot_TRUE@am__append_11248 = $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11249 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_md5.marker
+@COND_i386_multiboot_TRUE@am__append_11250 = gcry_md5.mod
+@COND_i386_multiboot_TRUE@am__append_11251 = gcry_md5.marker
+@COND_i386_ieee1275_TRUE@am__append_11252 = gcry_md5.module
+@COND_i386_ieee1275_TRUE@am__append_11253 = gcry_md5.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11254 =
+@COND_i386_ieee1275_TRUE@am__append_11255 = $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11256 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_md5.marker
+@COND_i386_ieee1275_TRUE@am__append_11257 = gcry_md5.mod
+@COND_i386_ieee1275_TRUE@am__append_11258 = gcry_md5.marker
+@COND_x86_64_efi_TRUE@am__append_11259 = gcry_md5.module
+@COND_x86_64_efi_TRUE@am__append_11260 = gcry_md5.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11261 =
+@COND_x86_64_efi_TRUE@am__append_11262 = $(nodist_gcry_md5_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11263 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_md5.marker
+@COND_x86_64_efi_TRUE@am__append_11264 = gcry_md5.mod
+@COND_x86_64_efi_TRUE@am__append_11265 = gcry_md5.marker
+@COND_mips_yeeloong_TRUE@am__append_11266 = gcry_md5.module
+@COND_mips_yeeloong_TRUE@am__append_11267 = gcry_md5.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11268 =
+@COND_mips_yeeloong_TRUE@am__append_11269 = $(nodist_gcry_md5_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11270 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_md5.marker
+@COND_mips_yeeloong_TRUE@am__append_11271 = gcry_md5.mod
+@COND_mips_yeeloong_TRUE@am__append_11272 = gcry_md5.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11273 = gcry_md5.module
+@COND_sparc64_ieee1275_TRUE@am__append_11274 = gcry_md5.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11275 =
+@COND_sparc64_ieee1275_TRUE@am__append_11276 = $(nodist_gcry_md5_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11277 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_md5.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11278 = gcry_md5.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11279 = gcry_md5.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11280 = gcry_md5.module
+@COND_powerpc_ieee1275_TRUE@am__append_11281 = gcry_md5.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11282 =
+@COND_powerpc_ieee1275_TRUE@am__append_11283 = $(nodist_gcry_md5_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11284 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_gcry_md5_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_md5.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11285 = gcry_md5.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11286 = gcry_md5.marker
+@COND_emu_TRUE@am__append_11287 = gcry_rfc2268.module
+@COND_emu_TRUE@am__append_11288 = gcry_rfc2268.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11289 =
+@COND_emu_TRUE@am__append_11290 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_emu_TRUE@am__append_11291 = \
+@COND_emu_TRUE@ $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_emu_TRUE@ gcry_rfc2268.marker
+@COND_emu_TRUE@am__append_11292 = gcry_rfc2268.mod
+@COND_emu_TRUE@am__append_11293 = gcry_rfc2268.marker
+@COND_i386_pc_TRUE@am__append_11294 = gcry_rfc2268.module
+@COND_i386_pc_TRUE@am__append_11295 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11296 =
+@COND_i386_pc_TRUE@am__append_11297 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11298 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_rfc2268.marker
+@COND_i386_pc_TRUE@am__append_11299 = gcry_rfc2268.mod
+@COND_i386_pc_TRUE@am__append_11300 = gcry_rfc2268.marker
+@COND_i386_efi_TRUE@am__append_11301 = gcry_rfc2268.module
+@COND_i386_efi_TRUE@am__append_11302 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11303 =
+@COND_i386_efi_TRUE@am__append_11304 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11305 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_rfc2268.marker
+@COND_i386_efi_TRUE@am__append_11306 = gcry_rfc2268.mod
+@COND_i386_efi_TRUE@am__append_11307 = gcry_rfc2268.marker
+@COND_i386_qemu_TRUE@am__append_11308 = gcry_rfc2268.module
+@COND_i386_qemu_TRUE@am__append_11309 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11310 =
+@COND_i386_qemu_TRUE@am__append_11311 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11312 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_rfc2268.marker
+@COND_i386_qemu_TRUE@am__append_11313 = gcry_rfc2268.mod
+@COND_i386_qemu_TRUE@am__append_11314 = gcry_rfc2268.marker
+@COND_i386_coreboot_TRUE@am__append_11315 = gcry_rfc2268.module
+@COND_i386_coreboot_TRUE@am__append_11316 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11317 =
+@COND_i386_coreboot_TRUE@am__append_11318 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11319 = $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_rfc2268.marker
+@COND_i386_coreboot_TRUE@am__append_11320 = gcry_rfc2268.mod
+@COND_i386_coreboot_TRUE@am__append_11321 = gcry_rfc2268.marker
+@COND_i386_multiboot_TRUE@am__append_11322 = gcry_rfc2268.module
+@COND_i386_multiboot_TRUE@am__append_11323 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11324 =
+@COND_i386_multiboot_TRUE@am__append_11325 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11326 = $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_rfc2268.marker
+@COND_i386_multiboot_TRUE@am__append_11327 = gcry_rfc2268.mod
+@COND_i386_multiboot_TRUE@am__append_11328 = gcry_rfc2268.marker
+@COND_i386_ieee1275_TRUE@am__append_11329 = gcry_rfc2268.module
+@COND_i386_ieee1275_TRUE@am__append_11330 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11331 =
+@COND_i386_ieee1275_TRUE@am__append_11332 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11333 = $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_rfc2268.marker
+@COND_i386_ieee1275_TRUE@am__append_11334 = gcry_rfc2268.mod
+@COND_i386_ieee1275_TRUE@am__append_11335 = gcry_rfc2268.marker
+@COND_x86_64_efi_TRUE@am__append_11336 = gcry_rfc2268.module
+@COND_x86_64_efi_TRUE@am__append_11337 = gcry_rfc2268.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11338 =
+@COND_x86_64_efi_TRUE@am__append_11339 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11340 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_rfc2268.marker
+@COND_x86_64_efi_TRUE@am__append_11341 = gcry_rfc2268.mod
+@COND_x86_64_efi_TRUE@am__append_11342 = gcry_rfc2268.marker
+@COND_mips_yeeloong_TRUE@am__append_11343 = gcry_rfc2268.module
+@COND_mips_yeeloong_TRUE@am__append_11344 = gcry_rfc2268.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11345 =
+@COND_mips_yeeloong_TRUE@am__append_11346 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11347 = $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_rfc2268.marker
+@COND_mips_yeeloong_TRUE@am__append_11348 = gcry_rfc2268.mod
+@COND_mips_yeeloong_TRUE@am__append_11349 = gcry_rfc2268.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11350 = gcry_rfc2268.module
+@COND_sparc64_ieee1275_TRUE@am__append_11351 = gcry_rfc2268.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11352 =
+@COND_sparc64_ieee1275_TRUE@am__append_11353 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11354 = $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_rfc2268.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11355 = gcry_rfc2268.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11356 = gcry_rfc2268.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11357 = gcry_rfc2268.module
+@COND_powerpc_ieee1275_TRUE@am__append_11358 = gcry_rfc2268.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11359 =
+@COND_powerpc_ieee1275_TRUE@am__append_11360 = $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11361 = $(nodist_gcry_rfc2268_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_rfc2268.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11362 = gcry_rfc2268.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11363 = gcry_rfc2268.marker
+@COND_emu_TRUE@am__append_11364 = gcry_rijndael.module
+@COND_emu_TRUE@am__append_11365 = gcry_rijndael.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11366 =
+@COND_emu_TRUE@am__append_11367 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_emu_TRUE@am__append_11368 = \
+@COND_emu_TRUE@ $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_emu_TRUE@ gcry_rijndael.marker
+@COND_emu_TRUE@am__append_11369 = gcry_rijndael.mod
+@COND_emu_TRUE@am__append_11370 = gcry_rijndael.marker
+@COND_i386_pc_TRUE@am__append_11371 = gcry_rijndael.module
+@COND_i386_pc_TRUE@am__append_11372 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11373 =
+@COND_i386_pc_TRUE@am__append_11374 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11375 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_rijndael.marker
+@COND_i386_pc_TRUE@am__append_11376 = gcry_rijndael.mod
+@COND_i386_pc_TRUE@am__append_11377 = gcry_rijndael.marker
+@COND_i386_efi_TRUE@am__append_11378 = gcry_rijndael.module
+@COND_i386_efi_TRUE@am__append_11379 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11380 =
+@COND_i386_efi_TRUE@am__append_11381 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11382 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_rijndael.marker
+@COND_i386_efi_TRUE@am__append_11383 = gcry_rijndael.mod
+@COND_i386_efi_TRUE@am__append_11384 = gcry_rijndael.marker
+@COND_i386_qemu_TRUE@am__append_11385 = gcry_rijndael.module
+@COND_i386_qemu_TRUE@am__append_11386 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11387 =
+@COND_i386_qemu_TRUE@am__append_11388 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11389 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_rijndael.marker
+@COND_i386_qemu_TRUE@am__append_11390 = gcry_rijndael.mod
+@COND_i386_qemu_TRUE@am__append_11391 = gcry_rijndael.marker
+@COND_i386_coreboot_TRUE@am__append_11392 = gcry_rijndael.module
+@COND_i386_coreboot_TRUE@am__append_11393 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11394 =
+@COND_i386_coreboot_TRUE@am__append_11395 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11396 = $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_rijndael.marker
+@COND_i386_coreboot_TRUE@am__append_11397 = gcry_rijndael.mod
+@COND_i386_coreboot_TRUE@am__append_11398 = gcry_rijndael.marker
+@COND_i386_multiboot_TRUE@am__append_11399 = gcry_rijndael.module
+@COND_i386_multiboot_TRUE@am__append_11400 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11401 =
+@COND_i386_multiboot_TRUE@am__append_11402 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11403 = $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_rijndael.marker
+@COND_i386_multiboot_TRUE@am__append_11404 = gcry_rijndael.mod
+@COND_i386_multiboot_TRUE@am__append_11405 = gcry_rijndael.marker
+@COND_i386_ieee1275_TRUE@am__append_11406 = gcry_rijndael.module
+@COND_i386_ieee1275_TRUE@am__append_11407 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11408 =
+@COND_i386_ieee1275_TRUE@am__append_11409 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11410 = $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_rijndael.marker
+@COND_i386_ieee1275_TRUE@am__append_11411 = gcry_rijndael.mod
+@COND_i386_ieee1275_TRUE@am__append_11412 = gcry_rijndael.marker
+@COND_x86_64_efi_TRUE@am__append_11413 = gcry_rijndael.module
+@COND_x86_64_efi_TRUE@am__append_11414 = gcry_rijndael.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11415 =
+@COND_x86_64_efi_TRUE@am__append_11416 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11417 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_rijndael.marker
+@COND_x86_64_efi_TRUE@am__append_11418 = gcry_rijndael.mod
+@COND_x86_64_efi_TRUE@am__append_11419 = gcry_rijndael.marker
+@COND_mips_yeeloong_TRUE@am__append_11420 = gcry_rijndael.module
+@COND_mips_yeeloong_TRUE@am__append_11421 = gcry_rijndael.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11422 =
+@COND_mips_yeeloong_TRUE@am__append_11423 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11424 = $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_rijndael.marker
+@COND_mips_yeeloong_TRUE@am__append_11425 = gcry_rijndael.mod
+@COND_mips_yeeloong_TRUE@am__append_11426 = gcry_rijndael.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11427 = gcry_rijndael.module
+@COND_sparc64_ieee1275_TRUE@am__append_11428 = gcry_rijndael.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11429 =
+@COND_sparc64_ieee1275_TRUE@am__append_11430 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11431 = $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_rijndael.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11432 = gcry_rijndael.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11433 = gcry_rijndael.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11434 = gcry_rijndael.module
+@COND_powerpc_ieee1275_TRUE@am__append_11435 = gcry_rijndael.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11436 =
+@COND_powerpc_ieee1275_TRUE@am__append_11437 = $(nodist_gcry_rijndael_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11438 = $(nodist_gcry_rijndael_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_rijndael.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11439 = gcry_rijndael.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11440 = gcry_rijndael.marker
+@COND_emu_TRUE@am__append_11441 = gcry_rmd160.module
+@COND_emu_TRUE@am__append_11442 = gcry_rmd160.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11443 =
+@COND_emu_TRUE@am__append_11444 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_emu_TRUE@am__append_11445 = \
+@COND_emu_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_emu_TRUE@ gcry_rmd160.marker
+@COND_emu_TRUE@am__append_11446 = gcry_rmd160.mod
+@COND_emu_TRUE@am__append_11447 = gcry_rmd160.marker
+@COND_i386_pc_TRUE@am__append_11448 = gcry_rmd160.module
+@COND_i386_pc_TRUE@am__append_11449 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11450 =
+@COND_i386_pc_TRUE@am__append_11451 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11452 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_rmd160.marker
+@COND_i386_pc_TRUE@am__append_11453 = gcry_rmd160.mod
+@COND_i386_pc_TRUE@am__append_11454 = gcry_rmd160.marker
+@COND_i386_efi_TRUE@am__append_11455 = gcry_rmd160.module
+@COND_i386_efi_TRUE@am__append_11456 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11457 =
+@COND_i386_efi_TRUE@am__append_11458 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11459 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_rmd160.marker
+@COND_i386_efi_TRUE@am__append_11460 = gcry_rmd160.mod
+@COND_i386_efi_TRUE@am__append_11461 = gcry_rmd160.marker
+@COND_i386_qemu_TRUE@am__append_11462 = gcry_rmd160.module
+@COND_i386_qemu_TRUE@am__append_11463 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11464 =
+@COND_i386_qemu_TRUE@am__append_11465 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11466 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_rmd160.marker
+@COND_i386_qemu_TRUE@am__append_11467 = gcry_rmd160.mod
+@COND_i386_qemu_TRUE@am__append_11468 = gcry_rmd160.marker
+@COND_i386_coreboot_TRUE@am__append_11469 = gcry_rmd160.module
+@COND_i386_coreboot_TRUE@am__append_11470 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11471 =
+@COND_i386_coreboot_TRUE@am__append_11472 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11473 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_rmd160.marker
+@COND_i386_coreboot_TRUE@am__append_11474 = gcry_rmd160.mod
+@COND_i386_coreboot_TRUE@am__append_11475 = gcry_rmd160.marker
+@COND_i386_multiboot_TRUE@am__append_11476 = gcry_rmd160.module
+@COND_i386_multiboot_TRUE@am__append_11477 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11478 =
+@COND_i386_multiboot_TRUE@am__append_11479 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11480 = $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_rmd160.marker
+@COND_i386_multiboot_TRUE@am__append_11481 = gcry_rmd160.mod
+@COND_i386_multiboot_TRUE@am__append_11482 = gcry_rmd160.marker
+@COND_i386_ieee1275_TRUE@am__append_11483 = gcry_rmd160.module
+@COND_i386_ieee1275_TRUE@am__append_11484 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11485 =
+@COND_i386_ieee1275_TRUE@am__append_11486 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11487 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_rmd160.marker
+@COND_i386_ieee1275_TRUE@am__append_11488 = gcry_rmd160.mod
+@COND_i386_ieee1275_TRUE@am__append_11489 = gcry_rmd160.marker
+@COND_x86_64_efi_TRUE@am__append_11490 = gcry_rmd160.module
+@COND_x86_64_efi_TRUE@am__append_11491 = gcry_rmd160.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11492 =
+@COND_x86_64_efi_TRUE@am__append_11493 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11494 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_rmd160.marker
+@COND_x86_64_efi_TRUE@am__append_11495 = gcry_rmd160.mod
+@COND_x86_64_efi_TRUE@am__append_11496 = gcry_rmd160.marker
+@COND_mips_yeeloong_TRUE@am__append_11497 = gcry_rmd160.module
+@COND_mips_yeeloong_TRUE@am__append_11498 = gcry_rmd160.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11499 =
+@COND_mips_yeeloong_TRUE@am__append_11500 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11501 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_rmd160.marker
+@COND_mips_yeeloong_TRUE@am__append_11502 = gcry_rmd160.mod
+@COND_mips_yeeloong_TRUE@am__append_11503 = gcry_rmd160.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11504 = gcry_rmd160.module
+@COND_sparc64_ieee1275_TRUE@am__append_11505 = gcry_rmd160.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11506 =
+@COND_sparc64_ieee1275_TRUE@am__append_11507 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11508 = $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_rmd160.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11509 = gcry_rmd160.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11510 = gcry_rmd160.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11511 = gcry_rmd160.module
+@COND_powerpc_ieee1275_TRUE@am__append_11512 = gcry_rmd160.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11513 =
+@COND_powerpc_ieee1275_TRUE@am__append_11514 = $(nodist_gcry_rmd160_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11515 = $(nodist_gcry_rmd160_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_rmd160.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11516 = gcry_rmd160.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11517 = gcry_rmd160.marker
+@COND_emu_TRUE@am__append_11518 = gcry_seed.module
+@COND_emu_TRUE@am__append_11519 = gcry_seed.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11520 =
+@COND_emu_TRUE@am__append_11521 = $(nodist_gcry_seed_module_SOURCES)
+@COND_emu_TRUE@am__append_11522 = $(nodist_gcry_seed_module_SOURCES) \
+@COND_emu_TRUE@ gcry_seed.marker
+@COND_emu_TRUE@am__append_11523 = gcry_seed.mod
+@COND_emu_TRUE@am__append_11524 = gcry_seed.marker
+@COND_i386_pc_TRUE@am__append_11525 = gcry_seed.module
+@COND_i386_pc_TRUE@am__append_11526 = gcry_seed.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11527 =
+@COND_i386_pc_TRUE@am__append_11528 = $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11529 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_seed.marker
+@COND_i386_pc_TRUE@am__append_11530 = gcry_seed.mod
+@COND_i386_pc_TRUE@am__append_11531 = gcry_seed.marker
+@COND_i386_efi_TRUE@am__append_11532 = gcry_seed.module
+@COND_i386_efi_TRUE@am__append_11533 = gcry_seed.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11534 =
+@COND_i386_efi_TRUE@am__append_11535 = $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11536 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_seed.marker
+@COND_i386_efi_TRUE@am__append_11537 = gcry_seed.mod
+@COND_i386_efi_TRUE@am__append_11538 = gcry_seed.marker
+@COND_i386_qemu_TRUE@am__append_11539 = gcry_seed.module
+@COND_i386_qemu_TRUE@am__append_11540 = gcry_seed.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11541 =
+@COND_i386_qemu_TRUE@am__append_11542 = $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11543 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_seed.marker
+@COND_i386_qemu_TRUE@am__append_11544 = gcry_seed.mod
+@COND_i386_qemu_TRUE@am__append_11545 = gcry_seed.marker
+@COND_i386_coreboot_TRUE@am__append_11546 = gcry_seed.module
+@COND_i386_coreboot_TRUE@am__append_11547 = gcry_seed.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11548 =
+@COND_i386_coreboot_TRUE@am__append_11549 = $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11550 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_seed.marker
+@COND_i386_coreboot_TRUE@am__append_11551 = gcry_seed.mod
+@COND_i386_coreboot_TRUE@am__append_11552 = gcry_seed.marker
+@COND_i386_multiboot_TRUE@am__append_11553 = gcry_seed.module
+@COND_i386_multiboot_TRUE@am__append_11554 = gcry_seed.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11555 =
+@COND_i386_multiboot_TRUE@am__append_11556 = $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11557 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_seed.marker
+@COND_i386_multiboot_TRUE@am__append_11558 = gcry_seed.mod
+@COND_i386_multiboot_TRUE@am__append_11559 = gcry_seed.marker
+@COND_i386_ieee1275_TRUE@am__append_11560 = gcry_seed.module
+@COND_i386_ieee1275_TRUE@am__append_11561 = gcry_seed.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11562 =
+@COND_i386_ieee1275_TRUE@am__append_11563 = $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11564 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_seed.marker
+@COND_i386_ieee1275_TRUE@am__append_11565 = gcry_seed.mod
+@COND_i386_ieee1275_TRUE@am__append_11566 = gcry_seed.marker
+@COND_x86_64_efi_TRUE@am__append_11567 = gcry_seed.module
+@COND_x86_64_efi_TRUE@am__append_11568 = gcry_seed.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11569 =
+@COND_x86_64_efi_TRUE@am__append_11570 = $(nodist_gcry_seed_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11571 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_seed.marker
+@COND_x86_64_efi_TRUE@am__append_11572 = gcry_seed.mod
+@COND_x86_64_efi_TRUE@am__append_11573 = gcry_seed.marker
+@COND_mips_yeeloong_TRUE@am__append_11574 = gcry_seed.module
+@COND_mips_yeeloong_TRUE@am__append_11575 = gcry_seed.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11576 =
+@COND_mips_yeeloong_TRUE@am__append_11577 = $(nodist_gcry_seed_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11578 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_seed_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_seed.marker
+@COND_mips_yeeloong_TRUE@am__append_11579 = gcry_seed.mod
+@COND_mips_yeeloong_TRUE@am__append_11580 = gcry_seed.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11581 = gcry_seed.module
+@COND_sparc64_ieee1275_TRUE@am__append_11582 = gcry_seed.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11583 =
+@COND_sparc64_ieee1275_TRUE@am__append_11584 = $(nodist_gcry_seed_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11585 = $(nodist_gcry_seed_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_seed.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11586 = gcry_seed.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11587 = gcry_seed.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11588 = gcry_seed.module
+@COND_powerpc_ieee1275_TRUE@am__append_11589 = gcry_seed.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11590 =
+@COND_powerpc_ieee1275_TRUE@am__append_11591 = $(nodist_gcry_seed_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11592 = $(nodist_gcry_seed_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_seed.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11593 = gcry_seed.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11594 = gcry_seed.marker
+@COND_emu_TRUE@am__append_11595 = gcry_serpent.module
+@COND_emu_TRUE@am__append_11596 = gcry_serpent.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11597 =
+@COND_emu_TRUE@am__append_11598 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_emu_TRUE@am__append_11599 = \
+@COND_emu_TRUE@ $(nodist_gcry_serpent_module_SOURCES) \
+@COND_emu_TRUE@ gcry_serpent.marker
+@COND_emu_TRUE@am__append_11600 = gcry_serpent.mod
+@COND_emu_TRUE@am__append_11601 = gcry_serpent.marker
+@COND_i386_pc_TRUE@am__append_11602 = gcry_serpent.module
+@COND_i386_pc_TRUE@am__append_11603 = gcry_serpent.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11604 =
+@COND_i386_pc_TRUE@am__append_11605 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11606 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_serpent_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_serpent.marker
+@COND_i386_pc_TRUE@am__append_11607 = gcry_serpent.mod
+@COND_i386_pc_TRUE@am__append_11608 = gcry_serpent.marker
+@COND_i386_efi_TRUE@am__append_11609 = gcry_serpent.module
+@COND_i386_efi_TRUE@am__append_11610 = gcry_serpent.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11611 =
+@COND_i386_efi_TRUE@am__append_11612 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11613 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_serpent_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_serpent.marker
+@COND_i386_efi_TRUE@am__append_11614 = gcry_serpent.mod
+@COND_i386_efi_TRUE@am__append_11615 = gcry_serpent.marker
+@COND_i386_qemu_TRUE@am__append_11616 = gcry_serpent.module
+@COND_i386_qemu_TRUE@am__append_11617 = gcry_serpent.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11618 =
+@COND_i386_qemu_TRUE@am__append_11619 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11620 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_serpent_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_serpent.marker
+@COND_i386_qemu_TRUE@am__append_11621 = gcry_serpent.mod
+@COND_i386_qemu_TRUE@am__append_11622 = gcry_serpent.marker
+@COND_i386_coreboot_TRUE@am__append_11623 = gcry_serpent.module
+@COND_i386_coreboot_TRUE@am__append_11624 = gcry_serpent.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11625 =
+@COND_i386_coreboot_TRUE@am__append_11626 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11627 = $(nodist_gcry_serpent_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_serpent.marker
+@COND_i386_coreboot_TRUE@am__append_11628 = gcry_serpent.mod
+@COND_i386_coreboot_TRUE@am__append_11629 = gcry_serpent.marker
+@COND_i386_multiboot_TRUE@am__append_11630 = gcry_serpent.module
+@COND_i386_multiboot_TRUE@am__append_11631 = gcry_serpent.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11632 =
+@COND_i386_multiboot_TRUE@am__append_11633 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11634 = $(nodist_gcry_serpent_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_serpent.marker
+@COND_i386_multiboot_TRUE@am__append_11635 = gcry_serpent.mod
+@COND_i386_multiboot_TRUE@am__append_11636 = gcry_serpent.marker
+@COND_i386_ieee1275_TRUE@am__append_11637 = gcry_serpent.module
+@COND_i386_ieee1275_TRUE@am__append_11638 = gcry_serpent.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11639 =
+@COND_i386_ieee1275_TRUE@am__append_11640 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11641 = $(nodist_gcry_serpent_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_serpent.marker
+@COND_i386_ieee1275_TRUE@am__append_11642 = gcry_serpent.mod
+@COND_i386_ieee1275_TRUE@am__append_11643 = gcry_serpent.marker
+@COND_x86_64_efi_TRUE@am__append_11644 = gcry_serpent.module
+@COND_x86_64_efi_TRUE@am__append_11645 = gcry_serpent.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11646 =
+@COND_x86_64_efi_TRUE@am__append_11647 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11648 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_serpent_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_serpent.marker
+@COND_x86_64_efi_TRUE@am__append_11649 = gcry_serpent.mod
+@COND_x86_64_efi_TRUE@am__append_11650 = gcry_serpent.marker
+@COND_mips_yeeloong_TRUE@am__append_11651 = gcry_serpent.module
+@COND_mips_yeeloong_TRUE@am__append_11652 = gcry_serpent.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11653 =
+@COND_mips_yeeloong_TRUE@am__append_11654 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11655 = $(nodist_gcry_serpent_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_serpent.marker
+@COND_mips_yeeloong_TRUE@am__append_11656 = gcry_serpent.mod
+@COND_mips_yeeloong_TRUE@am__append_11657 = gcry_serpent.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11658 = gcry_serpent.module
+@COND_sparc64_ieee1275_TRUE@am__append_11659 = gcry_serpent.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11660 =
+@COND_sparc64_ieee1275_TRUE@am__append_11661 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11662 = $(nodist_gcry_serpent_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_serpent.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11663 = gcry_serpent.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11664 = gcry_serpent.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11665 = gcry_serpent.module
+@COND_powerpc_ieee1275_TRUE@am__append_11666 = gcry_serpent.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11667 =
+@COND_powerpc_ieee1275_TRUE@am__append_11668 = $(nodist_gcry_serpent_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11669 = $(nodist_gcry_serpent_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_serpent.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11670 = gcry_serpent.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11671 = gcry_serpent.marker
+@COND_emu_TRUE@am__append_11672 = gcry_sha1.module
+@COND_emu_TRUE@am__append_11673 = gcry_sha1.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11674 =
+@COND_emu_TRUE@am__append_11675 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_emu_TRUE@am__append_11676 = $(nodist_gcry_sha1_module_SOURCES) \
+@COND_emu_TRUE@ gcry_sha1.marker
+@COND_emu_TRUE@am__append_11677 = gcry_sha1.mod
+@COND_emu_TRUE@am__append_11678 = gcry_sha1.marker
+@COND_i386_pc_TRUE@am__append_11679 = gcry_sha1.module
+@COND_i386_pc_TRUE@am__append_11680 = gcry_sha1.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11681 =
+@COND_i386_pc_TRUE@am__append_11682 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11683 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_sha1.marker
+@COND_i386_pc_TRUE@am__append_11684 = gcry_sha1.mod
+@COND_i386_pc_TRUE@am__append_11685 = gcry_sha1.marker
+@COND_i386_efi_TRUE@am__append_11686 = gcry_sha1.module
+@COND_i386_efi_TRUE@am__append_11687 = gcry_sha1.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11688 =
+@COND_i386_efi_TRUE@am__append_11689 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11690 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_sha1.marker
+@COND_i386_efi_TRUE@am__append_11691 = gcry_sha1.mod
+@COND_i386_efi_TRUE@am__append_11692 = gcry_sha1.marker
+@COND_i386_qemu_TRUE@am__append_11693 = gcry_sha1.module
+@COND_i386_qemu_TRUE@am__append_11694 = gcry_sha1.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11695 =
+@COND_i386_qemu_TRUE@am__append_11696 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11697 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_sha1.marker
+@COND_i386_qemu_TRUE@am__append_11698 = gcry_sha1.mod
+@COND_i386_qemu_TRUE@am__append_11699 = gcry_sha1.marker
+@COND_i386_coreboot_TRUE@am__append_11700 = gcry_sha1.module
+@COND_i386_coreboot_TRUE@am__append_11701 = gcry_sha1.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11702 =
+@COND_i386_coreboot_TRUE@am__append_11703 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11704 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_sha1.marker
+@COND_i386_coreboot_TRUE@am__append_11705 = gcry_sha1.mod
+@COND_i386_coreboot_TRUE@am__append_11706 = gcry_sha1.marker
+@COND_i386_multiboot_TRUE@am__append_11707 = gcry_sha1.module
+@COND_i386_multiboot_TRUE@am__append_11708 = gcry_sha1.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11709 =
+@COND_i386_multiboot_TRUE@am__append_11710 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11711 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_sha1.marker
+@COND_i386_multiboot_TRUE@am__append_11712 = gcry_sha1.mod
+@COND_i386_multiboot_TRUE@am__append_11713 = gcry_sha1.marker
+@COND_i386_ieee1275_TRUE@am__append_11714 = gcry_sha1.module
+@COND_i386_ieee1275_TRUE@am__append_11715 = gcry_sha1.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11716 =
+@COND_i386_ieee1275_TRUE@am__append_11717 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11718 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_sha1.marker
+@COND_i386_ieee1275_TRUE@am__append_11719 = gcry_sha1.mod
+@COND_i386_ieee1275_TRUE@am__append_11720 = gcry_sha1.marker
+@COND_x86_64_efi_TRUE@am__append_11721 = gcry_sha1.module
+@COND_x86_64_efi_TRUE@am__append_11722 = gcry_sha1.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11723 =
+@COND_x86_64_efi_TRUE@am__append_11724 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11725 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_sha1.marker
+@COND_x86_64_efi_TRUE@am__append_11726 = gcry_sha1.mod
+@COND_x86_64_efi_TRUE@am__append_11727 = gcry_sha1.marker
+@COND_mips_yeeloong_TRUE@am__append_11728 = gcry_sha1.module
+@COND_mips_yeeloong_TRUE@am__append_11729 = gcry_sha1.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11730 =
+@COND_mips_yeeloong_TRUE@am__append_11731 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11732 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_sha1_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_sha1.marker
+@COND_mips_yeeloong_TRUE@am__append_11733 = gcry_sha1.mod
+@COND_mips_yeeloong_TRUE@am__append_11734 = gcry_sha1.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11735 = gcry_sha1.module
+@COND_sparc64_ieee1275_TRUE@am__append_11736 = gcry_sha1.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11737 =
+@COND_sparc64_ieee1275_TRUE@am__append_11738 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11739 = $(nodist_gcry_sha1_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_sha1.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11740 = gcry_sha1.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11741 = gcry_sha1.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11742 = gcry_sha1.module
+@COND_powerpc_ieee1275_TRUE@am__append_11743 = gcry_sha1.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11744 =
+@COND_powerpc_ieee1275_TRUE@am__append_11745 = $(nodist_gcry_sha1_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11746 = $(nodist_gcry_sha1_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_sha1.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11747 = gcry_sha1.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11748 = gcry_sha1.marker
+@COND_emu_TRUE@am__append_11749 = gcry_sha256.module
+@COND_emu_TRUE@am__append_11750 = gcry_sha256.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11751 =
+@COND_emu_TRUE@am__append_11752 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_emu_TRUE@am__append_11753 = \
+@COND_emu_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_emu_TRUE@ gcry_sha256.marker
+@COND_emu_TRUE@am__append_11754 = gcry_sha256.mod
+@COND_emu_TRUE@am__append_11755 = gcry_sha256.marker
+@COND_i386_pc_TRUE@am__append_11756 = gcry_sha256.module
+@COND_i386_pc_TRUE@am__append_11757 = gcry_sha256.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11758 =
+@COND_i386_pc_TRUE@am__append_11759 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11760 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_sha256.marker
+@COND_i386_pc_TRUE@am__append_11761 = gcry_sha256.mod
+@COND_i386_pc_TRUE@am__append_11762 = gcry_sha256.marker
+@COND_i386_efi_TRUE@am__append_11763 = gcry_sha256.module
+@COND_i386_efi_TRUE@am__append_11764 = gcry_sha256.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11765 =
+@COND_i386_efi_TRUE@am__append_11766 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11767 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_sha256.marker
+@COND_i386_efi_TRUE@am__append_11768 = gcry_sha256.mod
+@COND_i386_efi_TRUE@am__append_11769 = gcry_sha256.marker
+@COND_i386_qemu_TRUE@am__append_11770 = gcry_sha256.module
+@COND_i386_qemu_TRUE@am__append_11771 = gcry_sha256.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11772 =
+@COND_i386_qemu_TRUE@am__append_11773 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11774 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_sha256.marker
+@COND_i386_qemu_TRUE@am__append_11775 = gcry_sha256.mod
+@COND_i386_qemu_TRUE@am__append_11776 = gcry_sha256.marker
+@COND_i386_coreboot_TRUE@am__append_11777 = gcry_sha256.module
+@COND_i386_coreboot_TRUE@am__append_11778 = gcry_sha256.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11779 =
+@COND_i386_coreboot_TRUE@am__append_11780 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11781 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_sha256.marker
+@COND_i386_coreboot_TRUE@am__append_11782 = gcry_sha256.mod
+@COND_i386_coreboot_TRUE@am__append_11783 = gcry_sha256.marker
+@COND_i386_multiboot_TRUE@am__append_11784 = gcry_sha256.module
+@COND_i386_multiboot_TRUE@am__append_11785 = gcry_sha256.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11786 =
+@COND_i386_multiboot_TRUE@am__append_11787 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11788 = $(nodist_gcry_sha256_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_sha256.marker
+@COND_i386_multiboot_TRUE@am__append_11789 = gcry_sha256.mod
+@COND_i386_multiboot_TRUE@am__append_11790 = gcry_sha256.marker
+@COND_i386_ieee1275_TRUE@am__append_11791 = gcry_sha256.module
+@COND_i386_ieee1275_TRUE@am__append_11792 = gcry_sha256.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11793 =
+@COND_i386_ieee1275_TRUE@am__append_11794 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11795 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_sha256.marker
+@COND_i386_ieee1275_TRUE@am__append_11796 = gcry_sha256.mod
+@COND_i386_ieee1275_TRUE@am__append_11797 = gcry_sha256.marker
+@COND_x86_64_efi_TRUE@am__append_11798 = gcry_sha256.module
+@COND_x86_64_efi_TRUE@am__append_11799 = gcry_sha256.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11800 =
+@COND_x86_64_efi_TRUE@am__append_11801 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11802 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_sha256.marker
+@COND_x86_64_efi_TRUE@am__append_11803 = gcry_sha256.mod
+@COND_x86_64_efi_TRUE@am__append_11804 = gcry_sha256.marker
+@COND_mips_yeeloong_TRUE@am__append_11805 = gcry_sha256.module
+@COND_mips_yeeloong_TRUE@am__append_11806 = gcry_sha256.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11807 =
+@COND_mips_yeeloong_TRUE@am__append_11808 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11809 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_sha256_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_sha256.marker
+@COND_mips_yeeloong_TRUE@am__append_11810 = gcry_sha256.mod
+@COND_mips_yeeloong_TRUE@am__append_11811 = gcry_sha256.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11812 = gcry_sha256.module
+@COND_sparc64_ieee1275_TRUE@am__append_11813 = gcry_sha256.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11814 =
+@COND_sparc64_ieee1275_TRUE@am__append_11815 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11816 = $(nodist_gcry_sha256_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_sha256.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11817 = gcry_sha256.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11818 = gcry_sha256.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11819 = gcry_sha256.module
+@COND_powerpc_ieee1275_TRUE@am__append_11820 = gcry_sha256.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11821 =
+@COND_powerpc_ieee1275_TRUE@am__append_11822 = $(nodist_gcry_sha256_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11823 = $(nodist_gcry_sha256_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_sha256.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11824 = gcry_sha256.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11825 = gcry_sha256.marker
+@COND_emu_TRUE@am__append_11826 = gcry_sha512.module
+@COND_emu_TRUE@am__append_11827 = gcry_sha512.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11828 =
+@COND_emu_TRUE@am__append_11829 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_emu_TRUE@am__append_11830 = \
+@COND_emu_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_emu_TRUE@ gcry_sha512.marker
+@COND_emu_TRUE@am__append_11831 = gcry_sha512.mod
+@COND_emu_TRUE@am__append_11832 = gcry_sha512.marker
+@COND_i386_pc_TRUE@am__append_11833 = gcry_sha512.module
+@COND_i386_pc_TRUE@am__append_11834 = gcry_sha512.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11835 =
+@COND_i386_pc_TRUE@am__append_11836 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11837 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_sha512.marker
+@COND_i386_pc_TRUE@am__append_11838 = gcry_sha512.mod
+@COND_i386_pc_TRUE@am__append_11839 = gcry_sha512.marker
+@COND_i386_efi_TRUE@am__append_11840 = gcry_sha512.module
+@COND_i386_efi_TRUE@am__append_11841 = gcry_sha512.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11842 =
+@COND_i386_efi_TRUE@am__append_11843 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11844 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_sha512.marker
+@COND_i386_efi_TRUE@am__append_11845 = gcry_sha512.mod
+@COND_i386_efi_TRUE@am__append_11846 = gcry_sha512.marker
+@COND_i386_qemu_TRUE@am__append_11847 = gcry_sha512.module
+@COND_i386_qemu_TRUE@am__append_11848 = gcry_sha512.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11849 =
+@COND_i386_qemu_TRUE@am__append_11850 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11851 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_sha512.marker
+@COND_i386_qemu_TRUE@am__append_11852 = gcry_sha512.mod
+@COND_i386_qemu_TRUE@am__append_11853 = gcry_sha512.marker
+@COND_i386_coreboot_TRUE@am__append_11854 = gcry_sha512.module
+@COND_i386_coreboot_TRUE@am__append_11855 = gcry_sha512.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11856 =
+@COND_i386_coreboot_TRUE@am__append_11857 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11858 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_sha512.marker
+@COND_i386_coreboot_TRUE@am__append_11859 = gcry_sha512.mod
+@COND_i386_coreboot_TRUE@am__append_11860 = gcry_sha512.marker
+@COND_i386_multiboot_TRUE@am__append_11861 = gcry_sha512.module
+@COND_i386_multiboot_TRUE@am__append_11862 = gcry_sha512.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11863 =
+@COND_i386_multiboot_TRUE@am__append_11864 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11865 = $(nodist_gcry_sha512_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_sha512.marker
+@COND_i386_multiboot_TRUE@am__append_11866 = gcry_sha512.mod
+@COND_i386_multiboot_TRUE@am__append_11867 = gcry_sha512.marker
+@COND_i386_ieee1275_TRUE@am__append_11868 = gcry_sha512.module
+@COND_i386_ieee1275_TRUE@am__append_11869 = gcry_sha512.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11870 =
+@COND_i386_ieee1275_TRUE@am__append_11871 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11872 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_sha512.marker
+@COND_i386_ieee1275_TRUE@am__append_11873 = gcry_sha512.mod
+@COND_i386_ieee1275_TRUE@am__append_11874 = gcry_sha512.marker
+@COND_x86_64_efi_TRUE@am__append_11875 = gcry_sha512.module
+@COND_x86_64_efi_TRUE@am__append_11876 = gcry_sha512.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11877 =
+@COND_x86_64_efi_TRUE@am__append_11878 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11879 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_sha512.marker
+@COND_x86_64_efi_TRUE@am__append_11880 = gcry_sha512.mod
+@COND_x86_64_efi_TRUE@am__append_11881 = gcry_sha512.marker
+@COND_mips_yeeloong_TRUE@am__append_11882 = gcry_sha512.module
+@COND_mips_yeeloong_TRUE@am__append_11883 = gcry_sha512.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11884 =
+@COND_mips_yeeloong_TRUE@am__append_11885 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11886 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_sha512_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_sha512.marker
+@COND_mips_yeeloong_TRUE@am__append_11887 = gcry_sha512.mod
+@COND_mips_yeeloong_TRUE@am__append_11888 = gcry_sha512.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11889 = gcry_sha512.module
+@COND_sparc64_ieee1275_TRUE@am__append_11890 = gcry_sha512.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11891 =
+@COND_sparc64_ieee1275_TRUE@am__append_11892 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11893 = $(nodist_gcry_sha512_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_sha512.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11894 = gcry_sha512.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11895 = gcry_sha512.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11896 = gcry_sha512.module
+@COND_powerpc_ieee1275_TRUE@am__append_11897 = gcry_sha512.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11898 =
+@COND_powerpc_ieee1275_TRUE@am__append_11899 = $(nodist_gcry_sha512_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11900 = $(nodist_gcry_sha512_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_sha512.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11901 = gcry_sha512.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11902 = gcry_sha512.marker
+@COND_emu_TRUE@am__append_11903 = gcry_tiger.module
+@COND_emu_TRUE@am__append_11904 = gcry_tiger.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11905 =
+@COND_emu_TRUE@am__append_11906 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_emu_TRUE@am__append_11907 = $(nodist_gcry_tiger_module_SOURCES) \
+@COND_emu_TRUE@ gcry_tiger.marker
+@COND_emu_TRUE@am__append_11908 = gcry_tiger.mod
+@COND_emu_TRUE@am__append_11909 = gcry_tiger.marker
+@COND_i386_pc_TRUE@am__append_11910 = gcry_tiger.module
+@COND_i386_pc_TRUE@am__append_11911 = gcry_tiger.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11912 =
+@COND_i386_pc_TRUE@am__append_11913 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11914 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_tiger.marker
+@COND_i386_pc_TRUE@am__append_11915 = gcry_tiger.mod
+@COND_i386_pc_TRUE@am__append_11916 = gcry_tiger.marker
+@COND_i386_efi_TRUE@am__append_11917 = gcry_tiger.module
+@COND_i386_efi_TRUE@am__append_11918 = gcry_tiger.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11919 =
+@COND_i386_efi_TRUE@am__append_11920 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11921 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_tiger.marker
+@COND_i386_efi_TRUE@am__append_11922 = gcry_tiger.mod
+@COND_i386_efi_TRUE@am__append_11923 = gcry_tiger.marker
+@COND_i386_qemu_TRUE@am__append_11924 = gcry_tiger.module
+@COND_i386_qemu_TRUE@am__append_11925 = gcry_tiger.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_11926 =
+@COND_i386_qemu_TRUE@am__append_11927 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_11928 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_tiger.marker
+@COND_i386_qemu_TRUE@am__append_11929 = gcry_tiger.mod
+@COND_i386_qemu_TRUE@am__append_11930 = gcry_tiger.marker
+@COND_i386_coreboot_TRUE@am__append_11931 = gcry_tiger.module
+@COND_i386_coreboot_TRUE@am__append_11932 = gcry_tiger.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_11933 =
+@COND_i386_coreboot_TRUE@am__append_11934 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_11935 = \
+@COND_i386_coreboot_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_tiger.marker
+@COND_i386_coreboot_TRUE@am__append_11936 = gcry_tiger.mod
+@COND_i386_coreboot_TRUE@am__append_11937 = gcry_tiger.marker
+@COND_i386_multiboot_TRUE@am__append_11938 = gcry_tiger.module
+@COND_i386_multiboot_TRUE@am__append_11939 = gcry_tiger.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_11940 =
+@COND_i386_multiboot_TRUE@am__append_11941 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_11942 = \
+@COND_i386_multiboot_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_tiger.marker
+@COND_i386_multiboot_TRUE@am__append_11943 = gcry_tiger.mod
+@COND_i386_multiboot_TRUE@am__append_11944 = gcry_tiger.marker
+@COND_i386_ieee1275_TRUE@am__append_11945 = gcry_tiger.module
+@COND_i386_ieee1275_TRUE@am__append_11946 = gcry_tiger.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_11947 =
+@COND_i386_ieee1275_TRUE@am__append_11948 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_11949 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_tiger.marker
+@COND_i386_ieee1275_TRUE@am__append_11950 = gcry_tiger.mod
+@COND_i386_ieee1275_TRUE@am__append_11951 = gcry_tiger.marker
+@COND_x86_64_efi_TRUE@am__append_11952 = gcry_tiger.module
+@COND_x86_64_efi_TRUE@am__append_11953 = gcry_tiger.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_11954 =
+@COND_x86_64_efi_TRUE@am__append_11955 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_11956 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_tiger.marker
+@COND_x86_64_efi_TRUE@am__append_11957 = gcry_tiger.mod
+@COND_x86_64_efi_TRUE@am__append_11958 = gcry_tiger.marker
+@COND_mips_yeeloong_TRUE@am__append_11959 = gcry_tiger.module
+@COND_mips_yeeloong_TRUE@am__append_11960 = gcry_tiger.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_11961 =
+@COND_mips_yeeloong_TRUE@am__append_11962 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_11963 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_gcry_tiger_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_tiger.marker
+@COND_mips_yeeloong_TRUE@am__append_11964 = gcry_tiger.mod
+@COND_mips_yeeloong_TRUE@am__append_11965 = gcry_tiger.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11966 = gcry_tiger.module
+@COND_sparc64_ieee1275_TRUE@am__append_11967 = gcry_tiger.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_11968 =
+@COND_sparc64_ieee1275_TRUE@am__append_11969 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_11970 = $(nodist_gcry_tiger_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_tiger.marker
+@COND_sparc64_ieee1275_TRUE@am__append_11971 = gcry_tiger.mod
+@COND_sparc64_ieee1275_TRUE@am__append_11972 = gcry_tiger.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11973 = gcry_tiger.module
+@COND_powerpc_ieee1275_TRUE@am__append_11974 = gcry_tiger.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_11975 =
+@COND_powerpc_ieee1275_TRUE@am__append_11976 = $(nodist_gcry_tiger_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_11977 = $(nodist_gcry_tiger_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_tiger.marker
+@COND_powerpc_ieee1275_TRUE@am__append_11978 = gcry_tiger.mod
+@COND_powerpc_ieee1275_TRUE@am__append_11979 = gcry_tiger.marker
+@COND_emu_TRUE@am__append_11980 = gcry_twofish.module
+@COND_emu_TRUE@am__append_11981 = gcry_twofish.module$(EXEEXT)
+@COND_emu_TRUE@am__append_11982 =
+@COND_emu_TRUE@am__append_11983 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_emu_TRUE@am__append_11984 = \
+@COND_emu_TRUE@ $(nodist_gcry_twofish_module_SOURCES) \
+@COND_emu_TRUE@ gcry_twofish.marker
+@COND_emu_TRUE@am__append_11985 = gcry_twofish.mod
+@COND_emu_TRUE@am__append_11986 = gcry_twofish.marker
+@COND_i386_pc_TRUE@am__append_11987 = gcry_twofish.module
+@COND_i386_pc_TRUE@am__append_11988 = gcry_twofish.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_11989 =
+@COND_i386_pc_TRUE@am__append_11990 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_11991 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_twofish_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_twofish.marker
+@COND_i386_pc_TRUE@am__append_11992 = gcry_twofish.mod
+@COND_i386_pc_TRUE@am__append_11993 = gcry_twofish.marker
+@COND_i386_efi_TRUE@am__append_11994 = gcry_twofish.module
+@COND_i386_efi_TRUE@am__append_11995 = gcry_twofish.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_11996 =
+@COND_i386_efi_TRUE@am__append_11997 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_11998 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_twofish_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_twofish.marker
+@COND_i386_efi_TRUE@am__append_11999 = gcry_twofish.mod
+@COND_i386_efi_TRUE@am__append_12000 = gcry_twofish.marker
+@COND_i386_qemu_TRUE@am__append_12001 = gcry_twofish.module
+@COND_i386_qemu_TRUE@am__append_12002 = gcry_twofish.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_12003 =
+@COND_i386_qemu_TRUE@am__append_12004 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_12005 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_twofish_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_twofish.marker
+@COND_i386_qemu_TRUE@am__append_12006 = gcry_twofish.mod
+@COND_i386_qemu_TRUE@am__append_12007 = gcry_twofish.marker
+@COND_i386_coreboot_TRUE@am__append_12008 = gcry_twofish.module
+@COND_i386_coreboot_TRUE@am__append_12009 = gcry_twofish.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_12010 =
+@COND_i386_coreboot_TRUE@am__append_12011 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_12012 = $(nodist_gcry_twofish_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_twofish.marker
+@COND_i386_coreboot_TRUE@am__append_12013 = gcry_twofish.mod
+@COND_i386_coreboot_TRUE@am__append_12014 = gcry_twofish.marker
+@COND_i386_multiboot_TRUE@am__append_12015 = gcry_twofish.module
+@COND_i386_multiboot_TRUE@am__append_12016 = gcry_twofish.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_12017 =
+@COND_i386_multiboot_TRUE@am__append_12018 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_12019 = $(nodist_gcry_twofish_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_twofish.marker
+@COND_i386_multiboot_TRUE@am__append_12020 = gcry_twofish.mod
+@COND_i386_multiboot_TRUE@am__append_12021 = gcry_twofish.marker
+@COND_i386_ieee1275_TRUE@am__append_12022 = gcry_twofish.module
+@COND_i386_ieee1275_TRUE@am__append_12023 = gcry_twofish.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_12024 =
+@COND_i386_ieee1275_TRUE@am__append_12025 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_12026 = $(nodist_gcry_twofish_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_twofish.marker
+@COND_i386_ieee1275_TRUE@am__append_12027 = gcry_twofish.mod
+@COND_i386_ieee1275_TRUE@am__append_12028 = gcry_twofish.marker
+@COND_x86_64_efi_TRUE@am__append_12029 = gcry_twofish.module
+@COND_x86_64_efi_TRUE@am__append_12030 = gcry_twofish.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_12031 =
+@COND_x86_64_efi_TRUE@am__append_12032 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_12033 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_twofish_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_twofish.marker
+@COND_x86_64_efi_TRUE@am__append_12034 = gcry_twofish.mod
+@COND_x86_64_efi_TRUE@am__append_12035 = gcry_twofish.marker
+@COND_mips_yeeloong_TRUE@am__append_12036 = gcry_twofish.module
+@COND_mips_yeeloong_TRUE@am__append_12037 = gcry_twofish.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_12038 =
+@COND_mips_yeeloong_TRUE@am__append_12039 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_12040 = $(nodist_gcry_twofish_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_twofish.marker
+@COND_mips_yeeloong_TRUE@am__append_12041 = gcry_twofish.mod
+@COND_mips_yeeloong_TRUE@am__append_12042 = gcry_twofish.marker
+@COND_sparc64_ieee1275_TRUE@am__append_12043 = gcry_twofish.module
+@COND_sparc64_ieee1275_TRUE@am__append_12044 = gcry_twofish.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_12045 =
+@COND_sparc64_ieee1275_TRUE@am__append_12046 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_12047 = $(nodist_gcry_twofish_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_twofish.marker
+@COND_sparc64_ieee1275_TRUE@am__append_12048 = gcry_twofish.mod
+@COND_sparc64_ieee1275_TRUE@am__append_12049 = gcry_twofish.marker
+@COND_powerpc_ieee1275_TRUE@am__append_12050 = gcry_twofish.module
+@COND_powerpc_ieee1275_TRUE@am__append_12051 = gcry_twofish.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_12052 =
+@COND_powerpc_ieee1275_TRUE@am__append_12053 = $(nodist_gcry_twofish_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_12054 = $(nodist_gcry_twofish_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_twofish.marker
+@COND_powerpc_ieee1275_TRUE@am__append_12055 = gcry_twofish.mod
+@COND_powerpc_ieee1275_TRUE@am__append_12056 = gcry_twofish.marker
+@COND_emu_TRUE@am__append_12057 = gcry_whirlpool.module
+@COND_emu_TRUE@am__append_12058 = gcry_whirlpool.module$(EXEEXT)
+@COND_emu_TRUE@am__append_12059 =
+@COND_emu_TRUE@am__append_12060 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_emu_TRUE@am__append_12061 = \
+@COND_emu_TRUE@ $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_emu_TRUE@ gcry_whirlpool.marker
+@COND_emu_TRUE@am__append_12062 = gcry_whirlpool.mod
+@COND_emu_TRUE@am__append_12063 = gcry_whirlpool.marker
+@COND_i386_pc_TRUE@am__append_12064 = gcry_whirlpool.module
+@COND_i386_pc_TRUE@am__append_12065 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__append_12066 =
+@COND_i386_pc_TRUE@am__append_12067 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_pc_TRUE@am__append_12068 = \
+@COND_i386_pc_TRUE@ $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_i386_pc_TRUE@ gcry_whirlpool.marker
+@COND_i386_pc_TRUE@am__append_12069 = gcry_whirlpool.mod
+@COND_i386_pc_TRUE@am__append_12070 = gcry_whirlpool.marker
+@COND_i386_efi_TRUE@am__append_12071 = gcry_whirlpool.module
+@COND_i386_efi_TRUE@am__append_12072 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__append_12073 =
+@COND_i386_efi_TRUE@am__append_12074 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_efi_TRUE@am__append_12075 = \
+@COND_i386_efi_TRUE@ $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_i386_efi_TRUE@ gcry_whirlpool.marker
+@COND_i386_efi_TRUE@am__append_12076 = gcry_whirlpool.mod
+@COND_i386_efi_TRUE@am__append_12077 = gcry_whirlpool.marker
+@COND_i386_qemu_TRUE@am__append_12078 = gcry_whirlpool.module
+@COND_i386_qemu_TRUE@am__append_12079 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__append_12080 =
+@COND_i386_qemu_TRUE@am__append_12081 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_qemu_TRUE@am__append_12082 = \
+@COND_i386_qemu_TRUE@ $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_i386_qemu_TRUE@ gcry_whirlpool.marker
+@COND_i386_qemu_TRUE@am__append_12083 = gcry_whirlpool.mod
+@COND_i386_qemu_TRUE@am__append_12084 = gcry_whirlpool.marker
+@COND_i386_coreboot_TRUE@am__append_12085 = gcry_whirlpool.module
+@COND_i386_coreboot_TRUE@am__append_12086 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__append_12087 =
+@COND_i386_coreboot_TRUE@am__append_12088 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_12089 = $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_i386_coreboot_TRUE@ gcry_whirlpool.marker
+@COND_i386_coreboot_TRUE@am__append_12090 = gcry_whirlpool.mod
+@COND_i386_coreboot_TRUE@am__append_12091 = gcry_whirlpool.marker
+@COND_i386_multiboot_TRUE@am__append_12092 = gcry_whirlpool.module
+@COND_i386_multiboot_TRUE@am__append_12093 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__append_12094 =
+@COND_i386_multiboot_TRUE@am__append_12095 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_12096 = $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_i386_multiboot_TRUE@ gcry_whirlpool.marker
+@COND_i386_multiboot_TRUE@am__append_12097 = gcry_whirlpool.mod
+@COND_i386_multiboot_TRUE@am__append_12098 = gcry_whirlpool.marker
+@COND_i386_ieee1275_TRUE@am__append_12099 = gcry_whirlpool.module
+@COND_i386_ieee1275_TRUE@am__append_12100 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__append_12101 =
+@COND_i386_ieee1275_TRUE@am__append_12102 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_12103 = $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_i386_ieee1275_TRUE@ gcry_whirlpool.marker
+@COND_i386_ieee1275_TRUE@am__append_12104 = gcry_whirlpool.mod
+@COND_i386_ieee1275_TRUE@am__append_12105 = gcry_whirlpool.marker
+@COND_x86_64_efi_TRUE@am__append_12106 = gcry_whirlpool.module
+@COND_x86_64_efi_TRUE@am__append_12107 = gcry_whirlpool.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__append_12108 =
+@COND_x86_64_efi_TRUE@am__append_12109 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_12110 = \
+@COND_x86_64_efi_TRUE@ $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_x86_64_efi_TRUE@ gcry_whirlpool.marker
+@COND_x86_64_efi_TRUE@am__append_12111 = gcry_whirlpool.mod
+@COND_x86_64_efi_TRUE@am__append_12112 = gcry_whirlpool.marker
+@COND_mips_yeeloong_TRUE@am__append_12113 = gcry_whirlpool.module
+@COND_mips_yeeloong_TRUE@am__append_12114 = gcry_whirlpool.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__append_12115 =
+@COND_mips_yeeloong_TRUE@am__append_12116 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_12117 = $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_mips_yeeloong_TRUE@ gcry_whirlpool.marker
+@COND_mips_yeeloong_TRUE@am__append_12118 = gcry_whirlpool.mod
+@COND_mips_yeeloong_TRUE@am__append_12119 = gcry_whirlpool.marker
+@COND_sparc64_ieee1275_TRUE@am__append_12120 = gcry_whirlpool.module
+@COND_sparc64_ieee1275_TRUE@am__append_12121 = gcry_whirlpool.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__append_12122 =
+@COND_sparc64_ieee1275_TRUE@am__append_12123 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_12124 = $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ gcry_whirlpool.marker
+@COND_sparc64_ieee1275_TRUE@am__append_12125 = gcry_whirlpool.mod
+@COND_sparc64_ieee1275_TRUE@am__append_12126 = gcry_whirlpool.marker
+@COND_powerpc_ieee1275_TRUE@am__append_12127 = gcry_whirlpool.module
+@COND_powerpc_ieee1275_TRUE@am__append_12128 = gcry_whirlpool.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__append_12129 =
+@COND_powerpc_ieee1275_TRUE@am__append_12130 = $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_12131 = $(nodist_gcry_whirlpool_module_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ gcry_whirlpool.marker
+@COND_powerpc_ieee1275_TRUE@am__append_12132 = gcry_whirlpool.mod
+@COND_powerpc_ieee1275_TRUE@am__append_12133 = gcry_whirlpool.marker
+@COND_emu_TRUE@am__append_12134 = kernel.exec
+@COND_emu_TRUE@am__append_12135 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_emu_TRUE@am__append_12136 = $(nodist_kernel_exec_SOURCES)
+@COND_emu_TRUE@am__append_12137 = $(nodist_kernel_exec_SOURCES) \
+@COND_emu_TRUE@ kernel.img
+@COND_emu_TRUE@am__append_12138 = kernel.img
+@COND_i386_pc_TRUE@am__append_12139 = kernel.exec
+@COND_i386_pc_TRUE@am__append_12140 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_i386_pc_TRUE@am__append_12141 = $(nodist_kernel_exec_SOURCES)
+@COND_i386_pc_TRUE@am__append_12142 = $(nodist_kernel_exec_SOURCES) \
+@COND_i386_pc_TRUE@ kernel.img
+@COND_i386_pc_TRUE@am__append_12143 = kernel.img
+@COND_i386_efi_TRUE@am__append_12144 = kernel.exec
+@COND_i386_efi_TRUE@am__append_12145 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_i386_efi_TRUE@am__append_12146 = $(nodist_kernel_exec_SOURCES)
+@COND_i386_efi_TRUE@am__append_12147 = $(nodist_kernel_exec_SOURCES) \
+@COND_i386_efi_TRUE@ kernel.img
+@COND_i386_efi_TRUE@am__append_12148 = kernel.img
+@COND_i386_qemu_TRUE@am__append_12149 = kernel.exec
+@COND_i386_qemu_TRUE@am__append_12150 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_i386_qemu_TRUE@am__append_12151 = $(nodist_kernel_exec_SOURCES)
+@COND_i386_qemu_TRUE@am__append_12152 = $(nodist_kernel_exec_SOURCES) \
+@COND_i386_qemu_TRUE@ kernel.img
+@COND_i386_qemu_TRUE@am__append_12153 = kernel.img
+@COND_i386_coreboot_TRUE@am__append_12154 = kernel.exec
+@COND_i386_coreboot_TRUE@am__append_12155 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_i386_coreboot_TRUE@am__append_12156 = $(nodist_kernel_exec_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_12157 = \
+@COND_i386_coreboot_TRUE@ $(nodist_kernel_exec_SOURCES) \
+@COND_i386_coreboot_TRUE@ kernel.img
+@COND_i386_coreboot_TRUE@am__append_12158 = kernel.img
+@COND_i386_multiboot_TRUE@am__append_12159 = kernel.exec
+@COND_i386_multiboot_TRUE@am__append_12160 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_i386_multiboot_TRUE@am__append_12161 = $(nodist_kernel_exec_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_12162 = \
+@COND_i386_multiboot_TRUE@ $(nodist_kernel_exec_SOURCES) \
+@COND_i386_multiboot_TRUE@ kernel.img
+@COND_i386_multiboot_TRUE@am__append_12163 = kernel.img
+@COND_i386_ieee1275_TRUE@am__append_12164 = kernel.exec
+@COND_i386_ieee1275_TRUE@am__append_12165 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_i386_ieee1275_TRUE@am__append_12166 = $(nodist_kernel_exec_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_12167 = \
+@COND_i386_ieee1275_TRUE@ $(nodist_kernel_exec_SOURCES) \
+@COND_i386_ieee1275_TRUE@ kernel.img
+@COND_i386_ieee1275_TRUE@am__append_12168 = kernel.img
+@COND_x86_64_efi_TRUE@am__append_12169 = kernel.exec
+@COND_x86_64_efi_TRUE@am__append_12170 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_x86_64_efi_TRUE@am__append_12171 = $(nodist_kernel_exec_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_12172 = \
+@COND_x86_64_efi_TRUE@ $(nodist_kernel_exec_SOURCES) kernel.img
+@COND_x86_64_efi_TRUE@am__append_12173 = kernel.img
+@COND_mips_yeeloong_TRUE@am__append_12174 = kernel.exec
+@COND_mips_yeeloong_TRUE@am__append_12175 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_mips_yeeloong_TRUE@am__append_12176 = $(nodist_kernel_exec_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_12177 = \
+@COND_mips_yeeloong_TRUE@ $(nodist_kernel_exec_SOURCES) \
+@COND_mips_yeeloong_TRUE@ kernel.img
+@COND_mips_yeeloong_TRUE@am__append_12178 = kernel.img
+@COND_sparc64_ieee1275_TRUE@am__append_12179 = kernel.exec
+@COND_sparc64_ieee1275_TRUE@am__append_12180 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_sparc64_ieee1275_TRUE@am__append_12181 = $(nodist_kernel_exec_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_12182 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_kernel_exec_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ kernel.img
+@COND_sparc64_ieee1275_TRUE@am__append_12183 = kernel.img
+@COND_powerpc_ieee1275_TRUE@am__append_12184 = kernel.exec
+@COND_powerpc_ieee1275_TRUE@am__append_12185 = video/sm712_init.c kern/i386/realmode.S kern/i386/pc/lzma_decode.S kern/mips/cache_flush.S
+@COND_powerpc_ieee1275_TRUE@am__append_12186 = $(nodist_kernel_exec_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_12187 = \
+@COND_powerpc_ieee1275_TRUE@ $(nodist_kernel_exec_SOURCES) \
+@COND_powerpc_ieee1275_TRUE@ kernel.img
+@COND_powerpc_ieee1275_TRUE@am__append_12188 = kernel.img
+@COND_i386_pc_TRUE@am__append_12189 = boot.image
+@COND_i386_pc_TRUE@am__append_12190 =
+@COND_i386_pc_TRUE@am__append_12191 = $(nodist_boot_image_SOURCES)
+@COND_i386_pc_TRUE@am__append_12192 = $(nodist_boot_image_SOURCES) \
+@COND_i386_pc_TRUE@ boot.img
+@COND_i386_pc_TRUE@am__append_12193 = boot.img
+@COND_i386_qemu_TRUE@am__append_12194 = boot.image
+@COND_i386_qemu_TRUE@am__append_12195 =
+@COND_i386_qemu_TRUE@am__append_12196 = $(nodist_boot_image_SOURCES)
+@COND_i386_qemu_TRUE@am__append_12197 = $(nodist_boot_image_SOURCES) \
+@COND_i386_qemu_TRUE@ boot.img
+@COND_i386_qemu_TRUE@am__append_12198 = boot.img
+@COND_sparc64_ieee1275_TRUE@am__append_12199 = boot.image
+@COND_sparc64_ieee1275_TRUE@am__append_12200 =
+@COND_sparc64_ieee1275_TRUE@am__append_12201 = $(nodist_boot_image_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_12202 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_boot_image_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ boot.img
+@COND_sparc64_ieee1275_TRUE@am__append_12203 = boot.img
+@COND_i386_pc_TRUE@am__append_12204 = cdboot.image pxeboot.image \
+@COND_i386_pc_TRUE@ diskboot.image
+@COND_i386_pc_TRUE@am__append_12205 =
+@COND_i386_pc_TRUE@am__append_12206 = $(nodist_cdboot_image_SOURCES) \
+@COND_i386_pc_TRUE@ $(nodist_pxeboot_image_SOURCES) \
+@COND_i386_pc_TRUE@ $(nodist_diskboot_image_SOURCES)
+@COND_i386_pc_TRUE@am__append_12207 = $(nodist_cdboot_image_SOURCES) \
+@COND_i386_pc_TRUE@ cdboot.img $(nodist_pxeboot_image_SOURCES) \
+@COND_i386_pc_TRUE@ pxeboot.img \
+@COND_i386_pc_TRUE@ $(nodist_diskboot_image_SOURCES) \
+@COND_i386_pc_TRUE@ diskboot.img
+@COND_i386_pc_TRUE@am__append_12208 = cdboot.img pxeboot.img \
+@COND_i386_pc_TRUE@ diskboot.img
+@COND_sparc64_ieee1275_TRUE@am__append_12209 = diskboot.image
+@COND_sparc64_ieee1275_TRUE@am__append_12210 =
+@COND_sparc64_ieee1275_TRUE@am__append_12211 = $(nodist_diskboot_image_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_12212 = \
+@COND_sparc64_ieee1275_TRUE@ $(nodist_diskboot_image_SOURCES) \
+@COND_sparc64_ieee1275_TRUE@ diskboot.img
+@COND_sparc64_ieee1275_TRUE@am__append_12213 = diskboot.img
+@COND_i386_pc_TRUE@am__append_12214 = lnxboot.image
+@COND_i386_pc_TRUE@am__append_12215 =
+@COND_i386_pc_TRUE@am__append_12216 = $(nodist_lnxboot_image_SOURCES)
+@COND_i386_pc_TRUE@am__append_12217 = $(nodist_lnxboot_image_SOURCES) \
+@COND_i386_pc_TRUE@ lnxboot.img
+@COND_i386_pc_TRUE@am__append_12218 = lnxboot.img
+@COND_mips_yeeloong_TRUE@am__append_12219 = xz_decompress.image \
+@COND_mips_yeeloong_TRUE@ none_decompress.image fwstart.image
+@COND_mips_yeeloong_TRUE@am__append_12220 =
+@COND_mips_yeeloong_TRUE@am__append_12221 = $(nodist_xz_decompress_image_SOURCES) \
+@COND_mips_yeeloong_TRUE@ $(nodist_none_decompress_image_SOURCES) \
+@COND_mips_yeeloong_TRUE@ $(nodist_fwstart_image_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_12222 = $(nodist_xz_decompress_image_SOURCES) \
+@COND_mips_yeeloong_TRUE@ xz_decompress.img \
+@COND_mips_yeeloong_TRUE@ $(nodist_none_decompress_image_SOURCES) \
+@COND_mips_yeeloong_TRUE@ none_decompress.img \
+@COND_mips_yeeloong_TRUE@ $(nodist_fwstart_image_SOURCES) \
+@COND_mips_yeeloong_TRUE@ fwstart.img
+@COND_mips_yeeloong_TRUE@am__append_12223 = xz_decompress.img \
+@COND_mips_yeeloong_TRUE@ none_decompress.img fwstart.img
+@COND_emu_TRUE@am__append_12224 = libgnulib.a
+@COND_emu_TRUE@am__append_12225 = gnulib/regex.c
+@COND_emu_TRUE@am__append_12226 =
+@COND_emu_TRUE@am__append_12227 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_emu_TRUE@am__append_12228 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_emu_TRUE@am__append_12229 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_emu_TRUE@am__append_12230 =
+@COND_emu_TRUE@am__append_12231 = $(nodist_libgnulib_a_SOURCES)
+@COND_emu_TRUE@am__append_12232 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_pc_TRUE@am__append_12233 = libgnulib.a
+@COND_i386_pc_TRUE@am__append_12234 = gnulib/regex.c
+@COND_i386_pc_TRUE@am__append_12235 =
+@COND_i386_pc_TRUE@am__append_12236 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_pc_TRUE@am__append_12237 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_pc_TRUE@am__append_12238 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_i386_pc_TRUE@am__append_12239 =
+@COND_i386_pc_TRUE@am__append_12240 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_pc_TRUE@am__append_12241 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_efi_TRUE@am__append_12242 = libgnulib.a
+@COND_i386_efi_TRUE@am__append_12243 = gnulib/regex.c
+@COND_i386_efi_TRUE@am__append_12244 =
+@COND_i386_efi_TRUE@am__append_12245 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_efi_TRUE@am__append_12246 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_efi_TRUE@am__append_12247 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_i386_efi_TRUE@am__append_12248 =
+@COND_i386_efi_TRUE@am__append_12249 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_efi_TRUE@am__append_12250 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_qemu_TRUE@am__append_12251 = libgnulib.a
+@COND_i386_qemu_TRUE@am__append_12252 = gnulib/regex.c
+@COND_i386_qemu_TRUE@am__append_12253 =
+@COND_i386_qemu_TRUE@am__append_12254 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_qemu_TRUE@am__append_12255 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_qemu_TRUE@am__append_12256 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_i386_qemu_TRUE@am__append_12257 =
+@COND_i386_qemu_TRUE@am__append_12258 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_qemu_TRUE@am__append_12259 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_12260 = libgnulib.a
+@COND_i386_coreboot_TRUE@am__append_12261 = gnulib/regex.c
+@COND_i386_coreboot_TRUE@am__append_12262 =
+@COND_i386_coreboot_TRUE@am__append_12263 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_coreboot_TRUE@am__append_12264 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_coreboot_TRUE@am__append_12265 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_i386_coreboot_TRUE@am__append_12266 =
+@COND_i386_coreboot_TRUE@am__append_12267 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_coreboot_TRUE@am__append_12268 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_12269 = libgnulib.a
+@COND_i386_multiboot_TRUE@am__append_12270 = gnulib/regex.c
+@COND_i386_multiboot_TRUE@am__append_12271 =
+@COND_i386_multiboot_TRUE@am__append_12272 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_multiboot_TRUE@am__append_12273 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_multiboot_TRUE@am__append_12274 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_i386_multiboot_TRUE@am__append_12275 =
+@COND_i386_multiboot_TRUE@am__append_12276 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_multiboot_TRUE@am__append_12277 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_12278 = libgnulib.a
+@COND_i386_ieee1275_TRUE@am__append_12279 = gnulib/regex.c
+@COND_i386_ieee1275_TRUE@am__append_12280 =
+@COND_i386_ieee1275_TRUE@am__append_12281 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_ieee1275_TRUE@am__append_12282 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_ieee1275_TRUE@am__append_12283 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_i386_ieee1275_TRUE@am__append_12284 =
+@COND_i386_ieee1275_TRUE@am__append_12285 = $(nodist_libgnulib_a_SOURCES)
+@COND_i386_ieee1275_TRUE@am__append_12286 = $(nodist_libgnulib_a_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_12287 = libgnulib.a
+@COND_x86_64_efi_TRUE@am__append_12288 = gnulib/regex.c
+@COND_x86_64_efi_TRUE@am__append_12289 =
+@COND_x86_64_efi_TRUE@am__append_12290 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_x86_64_efi_TRUE@am__append_12291 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_x86_64_efi_TRUE@am__append_12292 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_x86_64_efi_TRUE@am__append_12293 =
+@COND_x86_64_efi_TRUE@am__append_12294 = $(nodist_libgnulib_a_SOURCES)
+@COND_x86_64_efi_TRUE@am__append_12295 = $(nodist_libgnulib_a_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_12296 = libgnulib.a
+@COND_mips_yeeloong_TRUE@am__append_12297 = gnulib/regex.c
+@COND_mips_yeeloong_TRUE@am__append_12298 =
+@COND_mips_yeeloong_TRUE@am__append_12299 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_mips_yeeloong_TRUE@am__append_12300 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_mips_yeeloong_TRUE@am__append_12301 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_mips_yeeloong_TRUE@am__append_12302 =
+@COND_mips_yeeloong_TRUE@am__append_12303 = $(nodist_libgnulib_a_SOURCES)
+@COND_mips_yeeloong_TRUE@am__append_12304 = $(nodist_libgnulib_a_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_12305 = libgnulib.a
+@COND_sparc64_ieee1275_TRUE@am__append_12306 = gnulib/regex.c
+@COND_sparc64_ieee1275_TRUE@am__append_12307 =
+@COND_sparc64_ieee1275_TRUE@am__append_12308 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_sparc64_ieee1275_TRUE@am__append_12309 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_sparc64_ieee1275_TRUE@am__append_12310 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_sparc64_ieee1275_TRUE@am__append_12311 =
+@COND_sparc64_ieee1275_TRUE@am__append_12312 = $(nodist_libgnulib_a_SOURCES)
+@COND_sparc64_ieee1275_TRUE@am__append_12313 = $(nodist_libgnulib_a_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_12314 = libgnulib.a
+@COND_powerpc_ieee1275_TRUE@am__append_12315 = gnulib/regex.c
+@COND_powerpc_ieee1275_TRUE@am__append_12316 =
+@COND_powerpc_ieee1275_TRUE@am__append_12317 = $(AM_CFLAGS) $(CFLAGS_LIBRARY) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_powerpc_ieee1275_TRUE@am__append_12318 = $(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_powerpc_ieee1275_TRUE@am__append_12319 = $(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY)
+@COND_powerpc_ieee1275_TRUE@am__append_12320 =
+@COND_powerpc_ieee1275_TRUE@am__append_12321 = $(nodist_libgnulib_a_SOURCES)
+@COND_powerpc_ieee1275_TRUE@am__append_12322 = $(nodist_libgnulib_a_SOURCES)
+@COND_emu_TRUE@am__append_12323 = grub-emu grub-emu-lite
+@COND_MAN_PAGES_TRUE@@COND_emu_TRUE@am__append_12324 = grub-emu.1
+@COND_MAN_PAGES_TRUE@@COND_emu_TRUE@am__append_12325 = grub-emu.1
+@COND_emu_TRUE@am__append_12326 =
+@COND_emu_TRUE@am__append_12327 = $(nodist_grub_emu_SOURCES) \
+@COND_emu_TRUE@ $(nodist_grub_emu_lite_SOURCES)
+@COND_emu_TRUE@am__append_12328 = $(nodist_grub_emu_SOURCES) \
+@COND_emu_TRUE@ $(nodist_grub_emu_lite_SOURCES) gensyminfo.sh
+@COND_emu_TRUE@am__append_12329 = gensyminfo.sh
+@COND_emu_TRUE@am__append_12330 = gensyminfo.sh.in
+@COND_i386_pc_TRUE@am__append_12331 = gensyminfo.sh
+@COND_i386_pc_TRUE@am__append_12332 = gensyminfo.sh
+@COND_i386_pc_TRUE@am__append_12333 = gensyminfo.sh.in
+@COND_i386_efi_TRUE@am__append_12334 = gensyminfo.sh
+@COND_i386_efi_TRUE@am__append_12335 = gensyminfo.sh
+@COND_i386_efi_TRUE@am__append_12336 = gensyminfo.sh.in
+@COND_i386_qemu_TRUE@am__append_12337 = gensyminfo.sh
+@COND_i386_qemu_TRUE@am__append_12338 = gensyminfo.sh
+@COND_i386_qemu_TRUE@am__append_12339 = gensyminfo.sh.in
+@COND_i386_coreboot_TRUE@am__append_12340 = gensyminfo.sh
+@COND_i386_coreboot_TRUE@am__append_12341 = gensyminfo.sh
+@COND_i386_coreboot_TRUE@am__append_12342 = gensyminfo.sh.in
+@COND_i386_multiboot_TRUE@am__append_12343 = gensyminfo.sh
+@COND_i386_multiboot_TRUE@am__append_12344 = gensyminfo.sh
+@COND_i386_multiboot_TRUE@am__append_12345 = gensyminfo.sh.in
+@COND_i386_ieee1275_TRUE@am__append_12346 = gensyminfo.sh
+@COND_i386_ieee1275_TRUE@am__append_12347 = gensyminfo.sh
+@COND_i386_ieee1275_TRUE@am__append_12348 = gensyminfo.sh.in
+@COND_x86_64_efi_TRUE@am__append_12349 = gensyminfo.sh
+@COND_x86_64_efi_TRUE@am__append_12350 = gensyminfo.sh
+@COND_x86_64_efi_TRUE@am__append_12351 = gensyminfo.sh.in
+@COND_mips_yeeloong_TRUE@am__append_12352 = gensyminfo.sh
+@COND_mips_yeeloong_TRUE@am__append_12353 = gensyminfo.sh
+@COND_mips_yeeloong_TRUE@am__append_12354 = gensyminfo.sh.in
+@COND_sparc64_ieee1275_TRUE@am__append_12355 = gensyminfo.sh
+@COND_sparc64_ieee1275_TRUE@am__append_12356 = gensyminfo.sh
+@COND_sparc64_ieee1275_TRUE@am__append_12357 = gensyminfo.sh.in
+@COND_powerpc_ieee1275_TRUE@am__append_12358 = gensyminfo.sh
+@COND_powerpc_ieee1275_TRUE@am__append_12359 = gensyminfo.sh
+@COND_powerpc_ieee1275_TRUE@am__append_12360 = gensyminfo.sh.in
+@COND_emu_TRUE@am__append_12361 = genmod.sh
+@COND_emu_TRUE@am__append_12362 = genmod.sh
+@COND_emu_TRUE@am__append_12363 = genmod.sh.in
+@COND_i386_pc_TRUE@am__append_12364 = genmod.sh
+@COND_i386_pc_TRUE@am__append_12365 = genmod.sh
+@COND_i386_pc_TRUE@am__append_12366 = genmod.sh.in
+@COND_i386_efi_TRUE@am__append_12367 = genmod.sh
+@COND_i386_efi_TRUE@am__append_12368 = genmod.sh
+@COND_i386_efi_TRUE@am__append_12369 = genmod.sh.in
+@COND_i386_qemu_TRUE@am__append_12370 = genmod.sh
+@COND_i386_qemu_TRUE@am__append_12371 = genmod.sh
+@COND_i386_qemu_TRUE@am__append_12372 = genmod.sh.in
+@COND_i386_coreboot_TRUE@am__append_12373 = genmod.sh
+@COND_i386_coreboot_TRUE@am__append_12374 = genmod.sh
+@COND_i386_coreboot_TRUE@am__append_12375 = genmod.sh.in
+@COND_i386_multiboot_TRUE@am__append_12376 = genmod.sh
+@COND_i386_multiboot_TRUE@am__append_12377 = genmod.sh
+@COND_i386_multiboot_TRUE@am__append_12378 = genmod.sh.in
+@COND_i386_ieee1275_TRUE@am__append_12379 = genmod.sh
+@COND_i386_ieee1275_TRUE@am__append_12380 = genmod.sh
+@COND_i386_ieee1275_TRUE@am__append_12381 = genmod.sh.in
+@COND_x86_64_efi_TRUE@am__append_12382 = genmod.sh
+@COND_x86_64_efi_TRUE@am__append_12383 = genmod.sh
+@COND_x86_64_efi_TRUE@am__append_12384 = genmod.sh.in
+@COND_mips_yeeloong_TRUE@am__append_12385 = genmod.sh
+@COND_mips_yeeloong_TRUE@am__append_12386 = genmod.sh
+@COND_mips_yeeloong_TRUE@am__append_12387 = genmod.sh.in
+@COND_sparc64_ieee1275_TRUE@am__append_12388 = genmod.sh
+@COND_sparc64_ieee1275_TRUE@am__append_12389 = genmod.sh
+@COND_sparc64_ieee1275_TRUE@am__append_12390 = genmod.sh.in
+@COND_powerpc_ieee1275_TRUE@am__append_12391 = genmod.sh
+@COND_powerpc_ieee1275_TRUE@am__append_12392 = genmod.sh
+@COND_powerpc_ieee1275_TRUE@am__append_12393 = genmod.sh.in
+@COND_i386_pc_TRUE@am__append_12394 = $(top_builddir)/include/grub/machine/loader.h \
+@COND_i386_pc_TRUE@ $(top_builddir)/include/grub/machine/kernel.h \
+@COND_i386_pc_TRUE@ $(top_builddir)/include/grub/machine/pxe.h \
+@COND_i386_pc_TRUE@ $(top_builddir)/include/grub/machine/int.h \
+@COND_i386_pc_TRUE@ $(top_srcdir)/include/grub/i386/pit.h
+@COND_i386_efi_TRUE@am__append_12395 = \
+@COND_i386_efi_TRUE@ $(top_srcdir)/include/grub/efi/efi.h \
+@COND_i386_efi_TRUE@ $(top_srcdir)/include/grub/efi/time.h \
+@COND_i386_efi_TRUE@ $(top_srcdir)/include/grub/efi/disk.h \
+@COND_i386_efi_TRUE@ $(top_srcdir)/include/grub/i386/pit.h
+@COND_i386_coreboot_TRUE@am__append_12396 = $(top_srcdir)/include/grub/i386/pit.h
+@COND_i386_multiboot_TRUE@am__append_12397 = $(top_srcdir)/include/grub/i386/pit.h
+@COND_i386_qemu_TRUE@am__append_12398 = \
+@COND_i386_qemu_TRUE@ $(top_srcdir)/include/grub/pci.h \
+@COND_i386_qemu_TRUE@ $(top_srcdir)/include/grub/i386/pit.h
+@COND_i386_ieee1275_TRUE@am__append_12399 = $(top_srcdir)/include/grub/ieee1275/ieee1275.h \
+@COND_i386_ieee1275_TRUE@ $(top_srcdir)/include/grub/terminfo.h \
+@COND_i386_ieee1275_TRUE@ $(top_srcdir)/include/grub/extcmd.h \
+@COND_i386_ieee1275_TRUE@ $(top_srcdir)/include/grub/lib/arg.h \
+@COND_i386_ieee1275_TRUE@ $(top_srcdir)/include/grub/i386/pit.h
+@COND_x86_64_efi_TRUE@am__append_12400 = \
+@COND_x86_64_efi_TRUE@ $(top_srcdir)/include/grub/efi/efi.h \
+@COND_x86_64_efi_TRUE@ $(top_srcdir)/include/grub/efi/time.h \
+@COND_x86_64_efi_TRUE@ $(top_srcdir)/include/grub/efi/disk.h \
+@COND_x86_64_efi_TRUE@ $(top_srcdir)/include/grub/i386/pit.h
+@COND_mips_yeeloong_TRUE@am__append_12401 = $(top_builddir)/include/grub/keyboard_layouts.h \
+@COND_mips_yeeloong_TRUE@ $(top_builddir)/include/grub/machine/kernel.h \
+@COND_mips_yeeloong_TRUE@ $(top_builddir)/include/grub/cpu/cache.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/bitmap.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/video.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/gfxterm.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/font.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/bitmap_scale.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/bufio.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/pci.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/cs5536.h \
+@COND_mips_yeeloong_TRUE@ $(top_builddir)/include/grub/machine/pci.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/serial.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/loader.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/terminfo.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/extcmd.h \
+@COND_mips_yeeloong_TRUE@ $(top_srcdir)/include/grub/lib/arg.h
+@COND_powerpc_ieee1275_TRUE@am__append_12402 = $(top_srcdir)/include/grub/ieee1275/ieee1275.h \
+@COND_powerpc_ieee1275_TRUE@ $(top_srcdir)/include/grub/terminfo.h \
+@COND_powerpc_ieee1275_TRUE@ $(top_srcdir)/include/grub/extcmd.h \
+@COND_powerpc_ieee1275_TRUE@ $(top_srcdir)/include/grub/lib/arg.h
+@COND_sparc64_ieee1275_TRUE@am__append_12403 = $(top_srcdir)/include/grub/ieee1275/ieee1275.h \
+@COND_sparc64_ieee1275_TRUE@ $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h \
+@COND_sparc64_ieee1275_TRUE@ $(top_srcdir)/include/grub/terminfo.h \
+@COND_sparc64_ieee1275_TRUE@ $(top_srcdir)/include/grub/extcmd.h \
+@COND_sparc64_ieee1275_TRUE@ $(top_srcdir)/include/grub/lib/arg.h
+@COND_emu_TRUE@am__append_12404 = \
+@COND_emu_TRUE@ $(top_srcdir)/include/grub/datetime.h \
+@COND_emu_TRUE@ $(top_srcdir)/include/grub/emu/misc.h
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__append_12405 = $(top_srcdir)/include/grub/sdl.h
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__append_12406 = $(top_srcdir)/include/grub/libusb.h
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__append_12407 = $(top_srcdir)/include/grub/libpciaccess.h
+@COND_emu_TRUE@am__append_12408 = grub_emu_init.h grub_emu_init.c
+@COND_ENABLE_EFIEMU_TRUE@am__append_12409 = efiemu32.o efiemu64.o
+@COND_ENABLE_EFIEMU_TRUE@am__append_12410 = efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
+subdir = grub-core
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argp.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/malloc.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \
+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
+ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \
+ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \
+ $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strerror.m4 \
+ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \
+ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
+ $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/sysexits.m4 \
+ $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/warn-on-use.m4 \
+ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config-util.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libgnulib_a_AR = $(AR) $(ARFLAGS)
+libgnulib_a_LIBADD =
+am__libgnulib_a_SOURCES_DIST = gnulib/regex.c
+am__dirstamp = $(am__leading_dot)dirstamp
+@COND_emu_TRUE@am__objects_1 = gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_i386_pc_TRUE@am__objects_2 = gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_i386_efi_TRUE@am__objects_3 = \
+@COND_i386_efi_TRUE@ gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_i386_qemu_TRUE@am__objects_4 = \
+@COND_i386_qemu_TRUE@ gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am__objects_5 = \
+@COND_i386_coreboot_TRUE@ gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_i386_multiboot_TRUE@am__objects_6 = \
+@COND_i386_multiboot_TRUE@ gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_i386_ieee1275_TRUE@am__objects_7 = \
+@COND_i386_ieee1275_TRUE@ gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_x86_64_efi_TRUE@am__objects_8 = \
+@COND_x86_64_efi_TRUE@ gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_mips_yeeloong_TRUE@am__objects_9 = \
+@COND_mips_yeeloong_TRUE@ gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_sparc64_ieee1275_TRUE@am__objects_10 = gnulib/libgnulib_a-regex.$(OBJEXT)
+@COND_powerpc_ieee1275_TRUE@am__objects_11 = gnulib/libgnulib_a-regex.$(OBJEXT)
+am_libgnulib_a_OBJECTS = $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+ $(am__objects_6) $(am__objects_7) $(am__objects_8) \
+ $(am__objects_9) $(am__objects_10) $(am__objects_11)
+am__objects_12 =
+nodist_libgnulib_a_OBJECTS = $(am__objects_12) $(am__objects_12) \
+ $(am__objects_12) $(am__objects_12) $(am__objects_12) \
+ $(am__objects_12) $(am__objects_12) $(am__objects_12) \
+ $(am__objects_12) $(am__objects_12) $(am__objects_12)
+libgnulib_a_OBJECTS = $(am_libgnulib_a_OBJECTS) \
+ $(nodist_libgnulib_a_OBJECTS)
+@COND_emu_TRUE@am__EXEEXT_1 = grub-emu$(EXEEXT) grub-emu-lite$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
+ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(grubconfdir)" \
+ "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(sbindir)" \
+ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(grubconfdir)" \
+ "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(platformdir)"
+@COND_emu_TRUE@am__EXEEXT_2 = trig.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_3 = trig.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_4 = trig.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_5 = trig.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_6 = trig.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_7 = trig.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_8 = trig.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_9 = trig.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_10 = trig.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_11 = trig.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_12 = trig.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_13 = cs5536.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_14 = cs5536.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_15 = cs5536.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_16 = cs5536.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_17 = cs5536.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_18 = cs5536.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_19 = cs5536.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__EXEEXT_20 = \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ libusb.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_21 = lsspd.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__EXEEXT_22 = \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ usb.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_23 = usb.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_24 = usb.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_25 = usb.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_26 = usb.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_27 = usb.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_28 = usb.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_29 = usb.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_30 = usb.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_31 = usbserial_common.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_32 = usbserial_common.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_33 = usbserial_common.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_34 = \
+@COND_i386_coreboot_TRUE@ usbserial_common.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_35 = \
+@COND_i386_multiboot_TRUE@ usbserial_common.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_36 = \
+@COND_i386_ieee1275_TRUE@ usbserial_common.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_37 = \
+@COND_x86_64_efi_TRUE@ usbserial_common.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_38 = \
+@COND_mips_yeeloong_TRUE@ usbserial_common.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_39 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_40 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_41 = usbserial_pl2303.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_42 = \
+@COND_i386_coreboot_TRUE@ usbserial_pl2303.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_43 = \
+@COND_i386_multiboot_TRUE@ usbserial_pl2303.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_44 = \
+@COND_i386_ieee1275_TRUE@ usbserial_pl2303.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_45 = \
+@COND_x86_64_efi_TRUE@ usbserial_pl2303.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_46 = \
+@COND_mips_yeeloong_TRUE@ usbserial_pl2303.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_47 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_48 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_49 = usbserial_ftdi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_50 = \
+@COND_i386_coreboot_TRUE@ usbserial_ftdi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_51 = \
+@COND_i386_multiboot_TRUE@ usbserial_ftdi.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_52 = \
+@COND_i386_ieee1275_TRUE@ usbserial_ftdi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_53 = usbserial_ftdi.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_54 = \
+@COND_mips_yeeloong_TRUE@ usbserial_ftdi.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_55 = uhci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_56 = uhci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_57 = uhci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_58 = uhci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_59 = uhci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_60 = uhci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_61 = uhci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_62 = ohci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_63 = ohci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_64 = ohci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_65 = ohci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_66 = ohci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_67 = ohci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_68 = ohci.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_69 = ohci.module$(EXEEXT)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am__EXEEXT_70 = \
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@ pci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_71 = pci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_72 = pci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_73 = pci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_74 = pci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_75 = pci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_76 = pci.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_77 = cmostest.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_78 = cmostest.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_79 = cmostest.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_80 = cmostest.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_81 = cmostest.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_82 = cmostest.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_83 = iorw.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_84 = iorw.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_85 = iorw.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_86 = iorw.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_87 = iorw.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_88 = iorw.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_89 = iorw.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_90 = regexp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_91 = regexp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_92 = regexp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_93 = regexp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_94 = regexp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_95 = regexp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_96 = regexp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_97 = regexp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_98 = regexp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_99 = regexp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_100 = regexp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_101 = acpi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_102 = acpi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_103 = acpi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_104 = acpi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_105 = acpi.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_106 = lsacpi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_107 = lsacpi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_108 = lsacpi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_109 = lsacpi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_110 = lsacpi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_111 = lsefisystab.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_112 = lsefisystab.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_113 = lssal.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_114 = lssal.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_115 = lsefimmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_116 = lsefimmap.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_117 = blocklist.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_118 = blocklist.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_119 = blocklist.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_120 = blocklist.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_121 = blocklist.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_122 = blocklist.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_123 = blocklist.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_124 = blocklist.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_125 = blocklist.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_126 = \
+@COND_sparc64_ieee1275_TRUE@ blocklist.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_127 = \
+@COND_powerpc_ieee1275_TRUE@ blocklist.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_128 = boot.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_129 = boot.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_130 = boot.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_131 = boot.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_132 = boot.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_133 = boot.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_134 = boot.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_135 = boot.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_136 = boot.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_137 = boot.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_138 = cat.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_139 = cat.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_140 = cat.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_141 = cat.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_142 = cat.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_143 = cat.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_144 = cat.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_145 = cat.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_146 = cat.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_147 = cat.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_148 = cat.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_149 = cmp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_150 = cmp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_151 = cmp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_152 = cmp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_153 = cmp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_154 = cmp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_155 = cmp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_156 = cmp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_157 = cmp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_158 = cmp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_159 = cmp.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_160 = configfile.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_161 = configfile.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_162 = configfile.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_163 = configfile.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_164 = configfile.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_165 = configfile.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_166 = configfile.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_167 = configfile.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_168 = configfile.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_169 = \
+@COND_sparc64_ieee1275_TRUE@ configfile.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_170 = \
+@COND_powerpc_ieee1275_TRUE@ configfile.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_171 = cpuid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_172 = cpuid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_173 = cpuid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_174 = cpuid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_175 = cpuid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_176 = cpuid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_177 = cpuid.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_178 = date.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_179 = date.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_180 = date.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_181 = date.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_182 = date.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_183 = date.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_184 = date.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_185 = date.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_186 = date.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_187 = date.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_188 = date.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_189 = drivemap.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_190 = echo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_191 = echo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_192 = echo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_193 = echo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_194 = echo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_195 = echo.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_196 = echo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_197 = echo.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_198 = echo.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_199 = echo.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_200 = echo.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_201 = extcmd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_202 = extcmd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_203 = extcmd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_204 = extcmd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_205 = extcmd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_206 = extcmd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_207 = extcmd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_208 = fixvideo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_209 = fixvideo.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_210 = gptsync.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_211 = gptsync.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_212 = gptsync.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_213 = gptsync.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_214 = gptsync.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_215 = gptsync.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_216 = gptsync.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_217 = gptsync.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_218 = gptsync.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_219 = gptsync.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_220 = gptsync.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_221 = halt.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_222 = halt.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_223 = halt.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_224 = halt.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_225 = halt.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_226 = halt.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_227 = halt.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_228 = halt.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_229 = halt.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_230 = halt.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_231 = halt.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_232 = hashsum.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_233 = hashsum.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_234 = hashsum.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_235 = hashsum.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_236 = hashsum.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_237 = hashsum.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_238 = hashsum.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_239 = hashsum.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_240 = hashsum.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_241 = hashsum.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_242 = hashsum.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_243 = hdparm.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_244 = hdparm.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_245 = hdparm.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_246 = hdparm.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_247 = hdparm.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_248 = hdparm.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_249 = hdparm.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_250 = hdparm.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_251 = help.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_252 = help.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_253 = help.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_254 = help.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_255 = help.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_256 = help.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_257 = help.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_258 = help.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_259 = help.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_260 = help.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_261 = help.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_262 = hexdump.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_263 = hexdump.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_264 = hexdump.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_265 = hexdump.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_266 = hexdump.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_267 = hexdump.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_268 = hexdump.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_269 = hexdump.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_270 = hexdump.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_271 = hexdump.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_272 = hexdump.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_273 = keystatus.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_274 = keystatus.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_275 = keystatus.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_276 = keystatus.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_277 = keystatus.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_278 = keystatus.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_279 = keystatus.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_280 = keystatus.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_281 = keystatus.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_282 = \
+@COND_sparc64_ieee1275_TRUE@ keystatus.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_283 = \
+@COND_powerpc_ieee1275_TRUE@ keystatus.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_284 = loadbios.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_285 = loadbios.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_286 = loadenv.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_287 = loadenv.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_288 = loadenv.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_289 = loadenv.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_290 = loadenv.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_291 = loadenv.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_292 = loadenv.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_293 = loadenv.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_294 = loadenv.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_295 = loadenv.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_296 = loadenv.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_297 = ls.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_298 = ls.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_299 = ls.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_300 = ls.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_301 = ls.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_302 = ls.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_303 = ls.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_304 = ls.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_305 = ls.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_306 = ls.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_307 = ls.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_308 = lsmmap.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_309 = lsmmap.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_310 = lsmmap.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_311 = lsmmap.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_312 = lsmmap.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_313 = lsmmap.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_314 = lsmmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_315 = lsmmap.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_316 = lsmmap.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_317 = lsmmap.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_318 = lsmmap.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_319 = lspci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_320 = lspci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_321 = lspci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_322 = lspci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_323 = lspci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_324 = lspci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_325 = lspci.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_326 = lspci.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_327 = memrw.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_328 = memrw.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_329 = memrw.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_330 = memrw.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_331 = memrw.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_332 = memrw.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_333 = memrw.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_334 = memrw.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_335 = memrw.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_336 = memrw.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_337 = memrw.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_338 = minicmd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_339 = minicmd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_340 = minicmd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_341 = minicmd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_342 = minicmd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_343 = minicmd.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_344 = minicmd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_345 = minicmd.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_346 = minicmd.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_347 = minicmd.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_348 = minicmd.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_349 = parttool.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_350 = parttool.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_351 = parttool.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_352 = parttool.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_353 = parttool.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_354 = parttool.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_355 = parttool.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_356 = parttool.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_357 = parttool.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_358 = parttool.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_359 = parttool.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_360 = password.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_361 = password.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_362 = password.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_363 = password.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_364 = password.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_365 = password.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_366 = password.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_367 = password.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_368 = password.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_369 = password.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_370 = password.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_371 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_372 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_373 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_374 = password_pbkdf2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_375 = \
+@COND_i386_coreboot_TRUE@ password_pbkdf2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_376 = \
+@COND_i386_multiboot_TRUE@ password_pbkdf2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_377 = \
+@COND_i386_ieee1275_TRUE@ password_pbkdf2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_378 = \
+@COND_x86_64_efi_TRUE@ password_pbkdf2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_379 = \
+@COND_mips_yeeloong_TRUE@ password_pbkdf2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_380 = \
+@COND_sparc64_ieee1275_TRUE@ password_pbkdf2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_381 = \
+@COND_powerpc_ieee1275_TRUE@ password_pbkdf2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_382 = play.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_383 = play.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_384 = play.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_385 = play.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_386 = play.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_387 = play.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_388 = play.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_389 = probe.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_390 = probe.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_391 = probe.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_392 = probe.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_393 = probe.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_394 = probe.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_395 = probe.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_396 = probe.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_397 = probe.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_398 = probe.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_399 = probe.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_400 = pxecmd.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_401 = read.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_402 = read.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_403 = read.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_404 = read.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_405 = read.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_406 = read.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_407 = read.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_408 = read.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_409 = read.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_410 = read.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_411 = read.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_412 = reboot.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_413 = reboot.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_414 = reboot.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_415 = reboot.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_416 = reboot.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_417 = reboot.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_418 = reboot.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_419 = reboot.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_420 = reboot.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_421 = reboot.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_422 = reboot.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_423 = search.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_424 = search.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_425 = search.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_426 = search.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_427 = search.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_428 = search.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_429 = search.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_430 = search.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_431 = search.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_432 = search.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_433 = search.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_434 = search_fs_file.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_435 = search_fs_file.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_436 = search_fs_file.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_437 = search_fs_file.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_438 = \
+@COND_i386_coreboot_TRUE@ search_fs_file.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_439 = \
+@COND_i386_multiboot_TRUE@ search_fs_file.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_440 = \
+@COND_i386_ieee1275_TRUE@ search_fs_file.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_441 = search_fs_file.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_442 = \
+@COND_mips_yeeloong_TRUE@ search_fs_file.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_443 = \
+@COND_sparc64_ieee1275_TRUE@ search_fs_file.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_444 = \
+@COND_powerpc_ieee1275_TRUE@ search_fs_file.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_445 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_446 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_447 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_448 = search_fs_uuid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_449 = \
+@COND_i386_coreboot_TRUE@ search_fs_uuid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_450 = \
+@COND_i386_multiboot_TRUE@ search_fs_uuid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_451 = \
+@COND_i386_ieee1275_TRUE@ search_fs_uuid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_452 = search_fs_uuid.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_453 = \
+@COND_mips_yeeloong_TRUE@ search_fs_uuid.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_454 = \
+@COND_sparc64_ieee1275_TRUE@ search_fs_uuid.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_455 = \
+@COND_powerpc_ieee1275_TRUE@ search_fs_uuid.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_456 = search_label.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_457 = search_label.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_458 = search_label.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_459 = search_label.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_460 = \
+@COND_i386_coreboot_TRUE@ search_label.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_461 = \
+@COND_i386_multiboot_TRUE@ search_label.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_462 = \
+@COND_i386_ieee1275_TRUE@ search_label.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_463 = search_label.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_464 = \
+@COND_mips_yeeloong_TRUE@ search_label.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_465 = \
+@COND_sparc64_ieee1275_TRUE@ search_label.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_466 = \
+@COND_powerpc_ieee1275_TRUE@ search_label.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_467 = setpci.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_468 = setpci.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_469 = setpci.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_470 = setpci.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_471 = setpci.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_472 = setpci.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_473 = setpci.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_474 = sleep.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_475 = sleep.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_476 = sleep.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_477 = sleep.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_478 = sleep.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_479 = sleep.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_480 = sleep.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_481 = sleep.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_482 = sleep.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_483 = sleep.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_484 = sleep.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_485 = suspend.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_486 = suspend.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_487 = terminal.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_488 = terminal.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_489 = terminal.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_490 = terminal.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_491 = terminal.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_492 = terminal.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_493 = terminal.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_494 = terminal.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_495 = terminal.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_496 = terminal.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_497 = terminal.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_498 = test.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_499 = test.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_500 = test.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_501 = test.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_502 = test.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_503 = test.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_504 = test.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_505 = test.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_506 = test.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_507 = test.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_508 = test.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_509 = true.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_510 = true.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_511 = true.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_512 = true.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_513 = true.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_514 = true.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_515 = true.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_516 = true.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_517 = true.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_518 = true.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_519 = true.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__EXEEXT_520 = usbtest.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_521 = usbtest.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_522 = usbtest.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_523 = usbtest.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_524 = usbtest.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_525 = usbtest.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_526 = usbtest.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_527 = usbtest.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_528 = usbtest.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_529 = videoinfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_530 = videoinfo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_531 = videoinfo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_532 = videoinfo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_533 = videoinfo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_534 = videoinfo.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_535 = videoinfo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_536 = videoinfo.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_537 = videoinfo.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_538 = \
+@COND_sparc64_ieee1275_TRUE@ videoinfo.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_539 = \
+@COND_powerpc_ieee1275_TRUE@ videoinfo.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_540 = videotest.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_541 = videotest.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_542 = videotest.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_543 = videotest.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_544 = videotest.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_545 = videotest.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_546 = videotest.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_547 = videotest.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_548 = videotest.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_549 = \
+@COND_sparc64_ieee1275_TRUE@ videotest.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_550 = \
+@COND_powerpc_ieee1275_TRUE@ videotest.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_551 = xnu_uuid.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_552 = xnu_uuid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_553 = xnu_uuid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_554 = xnu_uuid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_555 = xnu_uuid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_556 = xnu_uuid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_557 = xnu_uuid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_558 = xnu_uuid.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_559 = xnu_uuid.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_560 = xnu_uuid.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_561 = xnu_uuid.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_562 = dm_nv.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_563 = dm_nv.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_564 = dm_nv.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_565 = dm_nv.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_566 = dm_nv.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_567 = dm_nv.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_568 = dm_nv.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_569 = dm_nv.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_570 = dm_nv.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_571 = dm_nv.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_572 = dm_nv.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_573 = loopback.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_574 = loopback.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_575 = loopback.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_576 = loopback.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_577 = loopback.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_578 = loopback.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_579 = loopback.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_580 = loopback.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_581 = loopback.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_582 = loopback.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_583 = loopback.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_584 = lvm.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_585 = lvm.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_586 = lvm.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_587 = lvm.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_588 = lvm.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_589 = lvm.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_590 = lvm.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_591 = lvm.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_592 = lvm.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_593 = lvm.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_594 = lvm.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_595 = mdraid09.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_596 = mdraid09.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_597 = mdraid09.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_598 = mdraid09.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_599 = mdraid09.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_600 = mdraid09.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_601 = mdraid09.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_602 = mdraid09.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_603 = mdraid09.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_604 = mdraid09.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_605 = mdraid09.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_606 = mdraid1x.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_607 = mdraid1x.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_608 = mdraid1x.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_609 = mdraid1x.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_610 = mdraid1x.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_611 = mdraid1x.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_612 = mdraid1x.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_613 = mdraid1x.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_614 = mdraid1x.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_615 = mdraid1x.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_616 = mdraid1x.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_617 = raid.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_618 = raid.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_619 = raid.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_620 = raid.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_621 = raid.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_622 = raid.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_623 = raid.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_624 = raid.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_625 = raid.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_626 = raid.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_627 = raid.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_628 = raid5rec.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_629 = raid5rec.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_630 = raid5rec.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_631 = raid5rec.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_632 = raid5rec.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_633 = raid5rec.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_634 = raid5rec.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_635 = raid5rec.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_636 = raid5rec.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_637 = raid5rec.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_638 = raid5rec.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_639 = raid6rec.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_640 = raid6rec.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_641 = raid6rec.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_642 = raid6rec.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_643 = raid6rec.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_644 = raid6rec.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_645 = raid6rec.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_646 = raid6rec.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_647 = raid6rec.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_648 = raid6rec.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_649 = raid6rec.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_650 = scsi.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_651 = scsi.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_652 = scsi.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_653 = scsi.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_654 = scsi.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_655 = scsi.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_656 = scsi.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_657 = scsi.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_658 = scsi.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_659 = scsi.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_660 = scsi.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_661 = memdisk.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_662 = memdisk.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_663 = memdisk.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_664 = memdisk.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_665 = memdisk.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_666 = memdisk.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_667 = memdisk.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_668 = memdisk.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_669 = memdisk.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_670 = memdisk.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_671 = memdisk.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_672 = ata.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_673 = ata.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_674 = ata.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_675 = ata.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_676 = ata.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_677 = ata.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_678 = ata.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_679 = ata.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_680 = ata_pthru.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_681 = ata_pthru.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_682 = ata_pthru.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_683 = ata_pthru.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_684 = ata_pthru.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_685 = ata_pthru.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_686 = ata_pthru.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_687 = ata_pthru.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_688 = biosdisk.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__EXEEXT_689 = \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ usbms.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_690 = usbms.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_691 = usbms.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_692 = usbms.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_693 = usbms.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_694 = usbms.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_695 = usbms.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_696 = usbms.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_697 = usbms.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_698 = nand.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_699 = efiemu.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_700 = efiemu.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_701 = efiemu.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_702 = efiemu.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_703 = efiemu.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_704 = font.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_705 = font.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_706 = font.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_707 = font.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_708 = font.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_709 = font.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_710 = font.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_711 = font.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_712 = font.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_713 = font.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_714 = affs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_715 = affs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_716 = affs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_717 = affs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_718 = affs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_719 = affs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_720 = affs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_721 = affs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_722 = affs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_723 = affs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_724 = affs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_725 = afs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_726 = afs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_727 = afs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_728 = afs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_729 = afs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_730 = afs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_731 = afs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_732 = afs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_733 = afs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_734 = afs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_735 = afs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_736 = afs_be.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_737 = afs_be.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_738 = afs_be.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_739 = afs_be.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_740 = afs_be.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_741 = afs_be.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_742 = afs_be.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_743 = afs_be.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_744 = afs_be.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_745 = afs_be.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_746 = afs_be.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_747 = befs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_748 = befs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_749 = befs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_750 = befs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_751 = befs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_752 = befs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_753 = befs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_754 = befs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_755 = befs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_756 = befs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_757 = befs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_758 = befs_be.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_759 = befs_be.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_760 = befs_be.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_761 = befs_be.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_762 = befs_be.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_763 = befs_be.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_764 = befs_be.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_765 = befs_be.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_766 = befs_be.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_767 = befs_be.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_768 = befs_be.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_769 = btrfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_770 = btrfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_771 = btrfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_772 = btrfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_773 = btrfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_774 = btrfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_775 = btrfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_776 = btrfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_777 = btrfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_778 = btrfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_779 = btrfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_780 = cpio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_781 = cpio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_782 = cpio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_783 = cpio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_784 = cpio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_785 = cpio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_786 = cpio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_787 = cpio.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_788 = cpio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_789 = cpio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_790 = cpio.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_791 = ext2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_792 = ext2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_793 = ext2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_794 = ext2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_795 = ext2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_796 = ext2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_797 = ext2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_798 = ext2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_799 = ext2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_800 = ext2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_801 = ext2.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_802 = fat.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_803 = fat.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_804 = fat.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_805 = fat.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_806 = fat.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_807 = fat.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_808 = fat.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_809 = fat.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_810 = fat.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_811 = fat.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_812 = fat.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_813 = fshelp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_814 = fshelp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_815 = fshelp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_816 = fshelp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_817 = fshelp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_818 = fshelp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_819 = fshelp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_820 = fshelp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_821 = fshelp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_822 = fshelp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_823 = fshelp.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_824 = hfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_825 = hfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_826 = hfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_827 = hfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_828 = hfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_829 = hfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_830 = hfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_831 = hfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_832 = hfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_833 = hfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_834 = hfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_835 = hfsplus.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_836 = hfsplus.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_837 = hfsplus.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_838 = hfsplus.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_839 = hfsplus.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_840 = hfsplus.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_841 = hfsplus.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_842 = hfsplus.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_843 = hfsplus.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_844 = hfsplus.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_845 = hfsplus.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_846 = iso9660.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_847 = iso9660.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_848 = iso9660.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_849 = iso9660.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_850 = iso9660.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_851 = iso9660.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_852 = iso9660.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_853 = iso9660.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_854 = iso9660.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_855 = iso9660.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_856 = iso9660.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_857 = jfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_858 = jfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_859 = jfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_860 = jfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_861 = jfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_862 = jfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_863 = jfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_864 = jfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_865 = jfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_866 = jfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_867 = jfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_868 = minix.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_869 = minix.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_870 = minix.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_871 = minix.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_872 = minix.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_873 = minix.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_874 = minix.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_875 = minix.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_876 = minix.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_877 = minix.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_878 = minix.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_879 = minix2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_880 = minix2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_881 = minix2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_882 = minix2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_883 = minix2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_884 = minix2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_885 = minix2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_886 = minix2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_887 = minix2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_888 = minix2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_889 = minix2.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_890 = nilfs2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_891 = nilfs2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_892 = nilfs2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_893 = nilfs2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_894 = nilfs2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_895 = nilfs2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_896 = nilfs2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_897 = nilfs2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_898 = nilfs2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_899 = nilfs2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_900 = nilfs2.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_901 = ntfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_902 = ntfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_903 = ntfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_904 = ntfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_905 = ntfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_906 = ntfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_907 = ntfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_908 = ntfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_909 = ntfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_910 = ntfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_911 = ntfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_912 = ntfscomp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_913 = ntfscomp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_914 = ntfscomp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_915 = ntfscomp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_916 = ntfscomp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_917 = ntfscomp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_918 = ntfscomp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_919 = ntfscomp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_920 = ntfscomp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_921 = ntfscomp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_922 = ntfscomp.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_923 = reiserfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_924 = reiserfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_925 = reiserfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_926 = reiserfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_927 = reiserfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_928 = reiserfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_929 = reiserfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_930 = reiserfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_931 = reiserfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_932 = reiserfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_933 = reiserfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_934 = sfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_935 = sfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_936 = sfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_937 = sfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_938 = sfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_939 = sfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_940 = sfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_941 = sfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_942 = sfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_943 = sfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_944 = sfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_945 = tar.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_946 = tar.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_947 = tar.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_948 = tar.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_949 = tar.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_950 = tar.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_951 = tar.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_952 = tar.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_953 = tar.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_954 = tar.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_955 = tar.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_956 = udf.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_957 = udf.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_958 = udf.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_959 = udf.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_960 = udf.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_961 = udf.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_962 = udf.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_963 = udf.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_964 = udf.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_965 = udf.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_966 = udf.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_967 = ufs1.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_968 = ufs1.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_969 = ufs1.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_970 = ufs1.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_971 = ufs1.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_972 = ufs1.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_973 = ufs1.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_974 = ufs1.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_975 = ufs1.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_976 = ufs1.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_977 = ufs1.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_978 = ufs2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_979 = ufs2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_980 = ufs2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_981 = ufs2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_982 = ufs2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_983 = ufs2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_984 = ufs2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_985 = ufs2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_986 = ufs2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_987 = ufs2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_988 = ufs2.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_989 = xfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_990 = xfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_991 = xfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_992 = xfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_993 = xfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_994 = xfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_995 = xfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_996 = xfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_997 = xfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_998 = xfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_999 = xfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1000 = zfs.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1001 = zfs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1002 = zfs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1003 = zfs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1004 = zfs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1005 = zfs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1006 = zfs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1007 = zfs.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1008 = zfs.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1009 = zfs.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1010 = zfs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1011 = zfsinfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1012 = zfsinfo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1013 = zfsinfo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1014 = zfsinfo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1015 = zfsinfo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1016 = zfsinfo.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1017 = zfsinfo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1018 = zfsinfo.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1019 = zfsinfo.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1020 = zfsinfo.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1021 = zfsinfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1022 = pxe.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1023 = gettext.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1024 = gettext.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1025 = gettext.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1026 = gettext.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1027 = gettext.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1028 = gettext.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1029 = gettext.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1030 = gettext.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1031 = gettext.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1032 = gettext.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1033 = gettext.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1034 = gfxmenu.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1035 = gfxmenu.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1036 = gfxmenu.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1037 = gfxmenu.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1038 = gfxmenu.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1039 = gfxmenu.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1040 = gfxmenu.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1041 = gfxmenu.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1042 = gfxmenu.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1043 = gfxmenu.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1044 = gfxmenu.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1045 = hello.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1046 = hello.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1047 = hello.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1048 = hello.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1049 = hello.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1050 = hello.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1051 = hello.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1052 = hello.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1053 = hello.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1054 = hello.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1055 = hello.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1056 = gzio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1057 = gzio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1058 = gzio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1059 = gzio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1060 = gzio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1061 = gzio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1062 = gzio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1063 = gzio.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1064 = gzio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1065 = gzio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1066 = gzio.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1067 = bufio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1068 = bufio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1069 = bufio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1070 = bufio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1071 = bufio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1072 = bufio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1073 = bufio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1074 = bufio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1075 = bufio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1076 = bufio.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1077 = elf.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1078 = elf.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1079 = elf.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1080 = elf.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1081 = elf.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1082 = elf.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1083 = elf.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1084 = elf.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1085 = elf.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1086 = elf.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1087 = elf.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1088 = crypto.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1089 = crypto.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1090 = crypto.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1091 = crypto.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1092 = crypto.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1093 = crypto.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1094 = crypto.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1095 = crypto.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1096 = crypto.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1097 = crypto.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1098 = crypto.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1099 = pbkdf2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1100 = pbkdf2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1101 = pbkdf2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1102 = pbkdf2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1103 = pbkdf2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1104 = pbkdf2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1105 = pbkdf2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1106 = pbkdf2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1107 = pbkdf2.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1108 = pbkdf2.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1109 = pbkdf2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1110 = relocator.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1111 = relocator.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1112 = relocator.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1113 = relocator.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1114 = relocator.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1115 = relocator.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1116 = relocator.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1117 = relocator.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1118 = \
+@COND_powerpc_ieee1275_TRUE@ relocator.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1119 = datetime.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1120 = datetime.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1121 = datetime.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1122 = datetime.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1123 = datetime.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1124 = datetime.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1125 = datetime.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1126 = datetime.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1127 = \
+@COND_sparc64_ieee1275_TRUE@ datetime.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1128 = \
+@COND_powerpc_ieee1275_TRUE@ datetime.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1129 = setjmp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1130 = setjmp.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1131 = setjmp.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1132 = setjmp.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1133 = setjmp.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1134 = setjmp.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1135 = setjmp.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1136 = setjmp.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1137 = setjmp.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1138 = setjmp.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1139 = setjmp.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1140 = aout.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1141 = aout.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1142 = aout.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1143 = aout.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1144 = aout.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1145 = aout.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1146 = aout.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1147 = bsd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1148 = bsd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1149 = bsd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1150 = bsd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1151 = bsd.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1152 = bsd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1153 = bsd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1154 = linux16.module$(EXEEXT) \
+@COND_i386_pc_TRUE@ ntldr.module$(EXEEXT) \
+@COND_i386_pc_TRUE@ multiboot2.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1155 = multiboot2.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1156 = multiboot2.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1157 = multiboot2.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1158 = \
+@COND_i386_multiboot_TRUE@ multiboot2.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1159 = multiboot2.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1160 = multiboot2.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1161 = multiboot2.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1162 = multiboot.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1163 = multiboot.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1164 = multiboot.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1165 = multiboot.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1166 = multiboot.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1167 = multiboot.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1168 = multiboot.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1169 = linux.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1170 = linux.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1171 = linux.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1172 = linux.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1173 = linux.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1174 = linux.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1175 = linux.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1176 = linux.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1177 = linux.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1178 = linux.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1179 = xnu.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1180 = xnu.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1181 = xnu.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1182 = xnu.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1183 = xnu.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1184 = xnu.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1185 = xnu.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1186 = appleldr.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1187 = appleldr.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1188 = chain.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1189 = chain.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1190 = chain.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1191 = mmap.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1192 = mmap.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1193 = mmap.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1194 = mmap.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1195 = mmap.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1196 = mmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1197 = mmap.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1198 = mmap.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1199 = normal.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1200 = normal.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1201 = normal.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1202 = normal.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1203 = normal.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1204 = normal.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1205 = normal.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1206 = normal.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1207 = normal.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1208 = normal.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1209 = normal.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1210 = part_acorn.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1211 = part_acorn.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1212 = part_acorn.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1213 = part_acorn.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1214 = part_acorn.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1215 = \
+@COND_i386_multiboot_TRUE@ part_acorn.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1216 = part_acorn.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1217 = part_acorn.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1218 = part_acorn.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1219 = \
+@COND_sparc64_ieee1275_TRUE@ part_acorn.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1220 = \
+@COND_powerpc_ieee1275_TRUE@ part_acorn.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1221 = part_amiga.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1222 = part_amiga.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1223 = part_amiga.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1224 = part_amiga.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1225 = part_amiga.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1226 = \
+@COND_i386_multiboot_TRUE@ part_amiga.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1227 = part_amiga.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1228 = part_amiga.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1229 = part_amiga.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1230 = \
+@COND_sparc64_ieee1275_TRUE@ part_amiga.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1231 = \
+@COND_powerpc_ieee1275_TRUE@ part_amiga.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1232 = part_apple.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1233 = part_apple.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1234 = part_apple.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1235 = part_apple.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1236 = part_apple.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1237 = \
+@COND_i386_multiboot_TRUE@ part_apple.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1238 = part_apple.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1239 = part_apple.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1240 = part_apple.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1241 = \
+@COND_sparc64_ieee1275_TRUE@ part_apple.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1242 = \
+@COND_powerpc_ieee1275_TRUE@ part_apple.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1243 = part_gpt.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1244 = part_gpt.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1245 = part_gpt.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1246 = part_gpt.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1247 = part_gpt.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1248 = part_gpt.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1249 = part_gpt.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1250 = part_gpt.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1251 = part_gpt.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1252 = \
+@COND_sparc64_ieee1275_TRUE@ part_gpt.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1253 = \
+@COND_powerpc_ieee1275_TRUE@ part_gpt.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1254 = part_msdos.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1255 = part_msdos.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1256 = part_msdos.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1257 = part_msdos.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1258 = part_msdos.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1259 = \
+@COND_i386_multiboot_TRUE@ part_msdos.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1260 = part_msdos.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1261 = part_msdos.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1262 = part_msdos.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1263 = \
+@COND_sparc64_ieee1275_TRUE@ part_msdos.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1264 = \
+@COND_powerpc_ieee1275_TRUE@ part_msdos.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1265 = part_sun.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1266 = part_sun.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1267 = part_sun.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1268 = part_sun.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1269 = part_sun.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1270 = part_sun.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1271 = part_sun.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1272 = part_sun.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1273 = part_sun.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1274 = \
+@COND_sparc64_ieee1275_TRUE@ part_sun.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1275 = \
+@COND_powerpc_ieee1275_TRUE@ part_sun.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1276 = part_bsd.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1277 = part_bsd.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1278 = part_bsd.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1279 = part_bsd.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1280 = part_bsd.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1281 = part_bsd.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1282 = part_bsd.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1283 = part_bsd.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1284 = part_bsd.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1285 = \
+@COND_sparc64_ieee1275_TRUE@ part_bsd.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1286 = \
+@COND_powerpc_ieee1275_TRUE@ part_bsd.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1287 = part_sunpc.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1288 = part_sunpc.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1289 = part_sunpc.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1290 = part_sunpc.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1291 = part_sunpc.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1292 = \
+@COND_i386_multiboot_TRUE@ part_sunpc.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1293 = part_sunpc.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1294 = part_sunpc.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1295 = part_sunpc.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1296 = \
+@COND_sparc64_ieee1275_TRUE@ part_sunpc.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1297 = \
+@COND_powerpc_ieee1275_TRUE@ part_sunpc.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1298 = msdospart.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1299 = msdospart.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1300 = msdospart.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1301 = msdospart.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1302 = msdospart.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1303 = msdospart.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1304 = msdospart.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1305 = msdospart.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1306 = msdospart.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1307 = \
+@COND_sparc64_ieee1275_TRUE@ msdospart.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1308 = \
+@COND_powerpc_ieee1275_TRUE@ msdospart.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1309 = at_keyboard.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1310 = at_keyboard.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1311 = at_keyboard.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1312 = \
+@COND_i386_coreboot_TRUE@ at_keyboard.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1313 = \
+@COND_i386_multiboot_TRUE@ at_keyboard.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1314 = \
+@COND_i386_ieee1275_TRUE@ at_keyboard.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1315 = at_keyboard.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1316 = gfxterm.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1317 = gfxterm.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1318 = gfxterm.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1319 = gfxterm.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1320 = gfxterm.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1321 = gfxterm.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1322 = gfxterm.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1323 = gfxterm.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1324 = gfxterm.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1325 = gfxterm.module$(EXEEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am__EXEEXT_1326 = \
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ serial.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1327 = serial.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1328 = serial.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1329 = serial.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1330 = serial.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1331 = serial.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1332 = serial.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1333 = serial.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1334 = sendkey.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1335 = terminfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1336 = terminfo.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1337 = terminfo.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1338 = terminfo.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1339 = terminfo.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1340 = terminfo.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1341 = terminfo.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1342 = usb_keyboard.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1343 = usb_keyboard.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1344 = usb_keyboard.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1345 = \
+@COND_i386_coreboot_TRUE@ usb_keyboard.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1346 = \
+@COND_i386_multiboot_TRUE@ usb_keyboard.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1347 = \
+@COND_i386_ieee1275_TRUE@ usb_keyboard.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1348 = usb_keyboard.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1349 = \
+@COND_mips_yeeloong_TRUE@ usb_keyboard.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1350 = vga.module$(EXEEXT) \
+@COND_i386_pc_TRUE@ vga_text.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1351 = vga_text.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1352 = vga_text.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1353 = video_cirrus.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1354 = video_cirrus.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1355 = video_cirrus.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1356 = \
+@COND_i386_coreboot_TRUE@ video_cirrus.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1357 = \
+@COND_i386_multiboot_TRUE@ video_cirrus.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1358 = \
+@COND_i386_ieee1275_TRUE@ video_cirrus.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1359 = video_cirrus.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1360 = video_bochs.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1361 = video_bochs.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1362 = video_bochs.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1363 = \
+@COND_i386_coreboot_TRUE@ video_bochs.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1364 = \
+@COND_i386_multiboot_TRUE@ video_bochs.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1365 = \
+@COND_i386_ieee1275_TRUE@ video_bochs.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1366 = video_bochs.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1367 = functional_test.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1368 = functional_test.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1369 = functional_test.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1370 = \
+@COND_i386_qemu_TRUE@ functional_test.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1371 = \
+@COND_i386_coreboot_TRUE@ functional_test.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1372 = \
+@COND_i386_multiboot_TRUE@ functional_test.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1373 = \
+@COND_i386_ieee1275_TRUE@ functional_test.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1374 = \
+@COND_x86_64_efi_TRUE@ functional_test.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1375 = \
+@COND_mips_yeeloong_TRUE@ functional_test.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1376 = \
+@COND_sparc64_ieee1275_TRUE@ functional_test.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1377 = \
+@COND_powerpc_ieee1275_TRUE@ functional_test.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1378 = \
+@COND_emu_TRUE@ example_functional_test.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1379 = \
+@COND_i386_pc_TRUE@ example_functional_test.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1380 = \
+@COND_i386_efi_TRUE@ example_functional_test.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1381 = \
+@COND_i386_qemu_TRUE@ example_functional_test.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1382 = example_functional_test.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1383 = example_functional_test.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1384 = example_functional_test.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1385 = \
+@COND_x86_64_efi_TRUE@ example_functional_test.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1386 = example_functional_test.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1387 = example_functional_test.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1388 = example_functional_test.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1389 = bitmap.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1390 = bitmap.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1391 = bitmap.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1392 = bitmap.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1393 = bitmap.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1394 = bitmap.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1395 = bitmap.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1396 = bitmap.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1397 = bitmap.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1398 = bitmap.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1399 = bitmap_scale.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1400 = bitmap_scale.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1401 = bitmap_scale.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1402 = bitmap_scale.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1403 = \
+@COND_i386_coreboot_TRUE@ bitmap_scale.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1404 = \
+@COND_i386_multiboot_TRUE@ bitmap_scale.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1405 = \
+@COND_i386_ieee1275_TRUE@ bitmap_scale.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1406 = bitmap_scale.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1407 = \
+@COND_sparc64_ieee1275_TRUE@ bitmap_scale.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1408 = \
+@COND_powerpc_ieee1275_TRUE@ bitmap_scale.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1409 = efi_gop.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1410 = efi_gop.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1411 = efi_uga.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1412 = efi_uga.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1413 = jpeg.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1414 = jpeg.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1415 = jpeg.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1416 = jpeg.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1417 = jpeg.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1418 = jpeg.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1419 = jpeg.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1420 = jpeg.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1421 = jpeg.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1422 = jpeg.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1423 = jpeg.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1424 = png.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1425 = png.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1426 = png.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1427 = png.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1428 = png.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1429 = png.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1430 = png.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1431 = png.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1432 = png.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1433 = png.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1434 = png.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1435 = tga.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1436 = tga.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1437 = tga.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1438 = tga.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1439 = tga.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1440 = tga.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1441 = tga.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1442 = tga.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1443 = tga.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1444 = tga.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1445 = tga.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1446 = vbe.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1447 = video_fb.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1448 = video_fb.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1449 = video_fb.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1450 = video_fb.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1451 = video_fb.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1452 = video_fb.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1453 = video_fb.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1454 = video_fb.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1455 = \
+@COND_sparc64_ieee1275_TRUE@ video_fb.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1456 = \
+@COND_powerpc_ieee1275_TRUE@ video_fb.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1457 = video.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1458 = video.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1459 = video.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1460 = video.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1461 = video.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1462 = video.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1463 = video.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1464 = video.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1465 = video.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1466 = video.module$(EXEEXT) \
+@COND_powerpc_ieee1275_TRUE@ ieee1275_fb.module$(EXEEXT)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am__EXEEXT_1467 = \
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@ sdl.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1468 = datehook.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1469 = datehook.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1470 = datehook.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1471 = datehook.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1472 = datehook.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1473 = datehook.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1474 = datehook.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1475 = datehook.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1476 = datehook.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1477 = \
+@COND_sparc64_ieee1275_TRUE@ datehook.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1478 = \
+@COND_powerpc_ieee1275_TRUE@ datehook.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1479 = legacycfg.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1480 = legacycfg.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1481 = test_blockarg.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1482 = test_blockarg.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1483 = test_blockarg.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1484 = test_blockarg.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1485 = \
+@COND_i386_coreboot_TRUE@ test_blockarg.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1486 = \
+@COND_i386_multiboot_TRUE@ test_blockarg.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1487 = \
+@COND_i386_ieee1275_TRUE@ test_blockarg.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1488 = test_blockarg.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1489 = \
+@COND_mips_yeeloong_TRUE@ test_blockarg.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1490 = \
+@COND_sparc64_ieee1275_TRUE@ test_blockarg.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1491 = \
+@COND_powerpc_ieee1275_TRUE@ test_blockarg.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1492 = xzio.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1493 = xzio.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1494 = xzio.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1495 = xzio.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1496 = xzio.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1497 = xzio.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1498 = xzio.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1499 = xzio.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1500 = xzio.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1501 = xzio.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1502 = xzio.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1503 = testload.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1504 = testload.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1505 = testload.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1506 = testload.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1507 = testload.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1508 = testload.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1509 = testload.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1510 = testload.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1511 = testload.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1512 = \
+@COND_sparc64_ieee1275_TRUE@ testload.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1513 = \
+@COND_powerpc_ieee1275_TRUE@ testload.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1514 = lsapm.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1515 = keylayouts.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1516 = keylayouts.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1517 = keylayouts.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1518 = keylayouts.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1519 = keylayouts.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1520 = \
+@COND_i386_multiboot_TRUE@ keylayouts.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1521 = keylayouts.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1522 = keylayouts.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1523 = \
+@COND_sparc64_ieee1275_TRUE@ keylayouts.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1524 = \
+@COND_powerpc_ieee1275_TRUE@ keylayouts.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1525 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1526 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1527 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1528 = gcry_arcfour.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1529 = \
+@COND_i386_coreboot_TRUE@ gcry_arcfour.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1530 = \
+@COND_i386_multiboot_TRUE@ gcry_arcfour.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1531 = \
+@COND_i386_ieee1275_TRUE@ gcry_arcfour.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1532 = gcry_arcfour.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1533 = \
+@COND_mips_yeeloong_TRUE@ gcry_arcfour.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1534 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_arcfour.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1535 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_arcfour.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1536 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1537 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1538 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1539 = gcry_blowfish.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1540 = \
+@COND_i386_coreboot_TRUE@ gcry_blowfish.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1541 = \
+@COND_i386_multiboot_TRUE@ gcry_blowfish.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1542 = \
+@COND_i386_ieee1275_TRUE@ gcry_blowfish.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1543 = gcry_blowfish.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1544 = \
+@COND_mips_yeeloong_TRUE@ gcry_blowfish.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1545 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_blowfish.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1546 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_blowfish.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1547 = gcry_camellia.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1548 = gcry_camellia.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1549 = gcry_camellia.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1550 = gcry_camellia.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1551 = \
+@COND_i386_coreboot_TRUE@ gcry_camellia.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1552 = \
+@COND_i386_multiboot_TRUE@ gcry_camellia.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1553 = \
+@COND_i386_ieee1275_TRUE@ gcry_camellia.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1554 = gcry_camellia.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1555 = \
+@COND_mips_yeeloong_TRUE@ gcry_camellia.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1556 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_camellia.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1557 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_camellia.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1558 = gcry_cast5.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1559 = gcry_cast5.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1560 = gcry_cast5.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1561 = gcry_cast5.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1562 = gcry_cast5.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1563 = \
+@COND_i386_multiboot_TRUE@ gcry_cast5.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1564 = gcry_cast5.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1565 = gcry_cast5.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1566 = gcry_cast5.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1567 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_cast5.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1568 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_cast5.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1569 = gcry_crc.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1570 = gcry_crc.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1571 = gcry_crc.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1572 = gcry_crc.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1573 = gcry_crc.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1574 = gcry_crc.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1575 = gcry_crc.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1576 = gcry_crc.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1577 = gcry_crc.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1578 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_crc.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1579 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_crc.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1580 = gcry_des.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1581 = gcry_des.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1582 = gcry_des.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1583 = gcry_des.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1584 = gcry_des.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1585 = gcry_des.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1586 = gcry_des.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1587 = gcry_des.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1588 = gcry_des.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1589 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_des.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1590 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_des.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1591 = gcry_md4.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1592 = gcry_md4.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1593 = gcry_md4.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1594 = gcry_md4.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1595 = gcry_md4.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1596 = gcry_md4.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1597 = gcry_md4.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1598 = gcry_md4.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1599 = gcry_md4.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1600 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_md4.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1601 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_md4.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1602 = gcry_md5.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1603 = gcry_md5.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1604 = gcry_md5.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1605 = gcry_md5.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1606 = gcry_md5.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1607 = gcry_md5.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1608 = gcry_md5.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1609 = gcry_md5.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1610 = gcry_md5.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1611 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_md5.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1612 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_md5.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1613 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1614 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1615 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1616 = gcry_rfc2268.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1617 = \
+@COND_i386_coreboot_TRUE@ gcry_rfc2268.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1618 = \
+@COND_i386_multiboot_TRUE@ gcry_rfc2268.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1619 = \
+@COND_i386_ieee1275_TRUE@ gcry_rfc2268.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1620 = gcry_rfc2268.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1621 = \
+@COND_mips_yeeloong_TRUE@ gcry_rfc2268.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1622 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_rfc2268.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1623 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_rfc2268.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1624 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1625 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1626 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1627 = gcry_rijndael.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1628 = \
+@COND_i386_coreboot_TRUE@ gcry_rijndael.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1629 = \
+@COND_i386_multiboot_TRUE@ gcry_rijndael.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1630 = \
+@COND_i386_ieee1275_TRUE@ gcry_rijndael.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1631 = gcry_rijndael.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1632 = \
+@COND_mips_yeeloong_TRUE@ gcry_rijndael.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1633 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_rijndael.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1634 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_rijndael.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1635 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1636 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1637 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1638 = gcry_rmd160.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1639 = \
+@COND_i386_coreboot_TRUE@ gcry_rmd160.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1640 = \
+@COND_i386_multiboot_TRUE@ gcry_rmd160.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1641 = \
+@COND_i386_ieee1275_TRUE@ gcry_rmd160.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1642 = gcry_rmd160.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1643 = \
+@COND_mips_yeeloong_TRUE@ gcry_rmd160.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1644 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_rmd160.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1645 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_rmd160.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1646 = gcry_seed.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1647 = gcry_seed.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1648 = gcry_seed.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1649 = gcry_seed.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1650 = gcry_seed.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1651 = gcry_seed.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1652 = gcry_seed.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1653 = gcry_seed.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1654 = gcry_seed.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1655 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_seed.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1656 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_seed.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1657 = gcry_serpent.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1658 = gcry_serpent.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1659 = gcry_serpent.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1660 = gcry_serpent.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1661 = \
+@COND_i386_coreboot_TRUE@ gcry_serpent.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1662 = \
+@COND_i386_multiboot_TRUE@ gcry_serpent.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1663 = \
+@COND_i386_ieee1275_TRUE@ gcry_serpent.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1664 = gcry_serpent.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1665 = \
+@COND_mips_yeeloong_TRUE@ gcry_serpent.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1666 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_serpent.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1667 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_serpent.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1668 = gcry_sha1.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1669 = gcry_sha1.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1670 = gcry_sha1.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1671 = gcry_sha1.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1672 = gcry_sha1.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1673 = gcry_sha1.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1674 = gcry_sha1.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1675 = gcry_sha1.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1676 = gcry_sha1.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1677 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_sha1.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1678 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_sha1.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1679 = gcry_sha256.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1680 = gcry_sha256.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1681 = gcry_sha256.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1682 = gcry_sha256.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1683 = \
+@COND_i386_coreboot_TRUE@ gcry_sha256.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1684 = \
+@COND_i386_multiboot_TRUE@ gcry_sha256.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1685 = \
+@COND_i386_ieee1275_TRUE@ gcry_sha256.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1686 = gcry_sha256.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1687 = \
+@COND_mips_yeeloong_TRUE@ gcry_sha256.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1688 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_sha256.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1689 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_sha256.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1690 = gcry_sha512.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1691 = gcry_sha512.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1692 = gcry_sha512.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1693 = gcry_sha512.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1694 = \
+@COND_i386_coreboot_TRUE@ gcry_sha512.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1695 = \
+@COND_i386_multiboot_TRUE@ gcry_sha512.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1696 = \
+@COND_i386_ieee1275_TRUE@ gcry_sha512.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1697 = gcry_sha512.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1698 = \
+@COND_mips_yeeloong_TRUE@ gcry_sha512.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1699 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_sha512.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1700 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_sha512.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1701 = gcry_tiger.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1702 = gcry_tiger.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1703 = gcry_tiger.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1704 = gcry_tiger.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1705 = gcry_tiger.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1706 = \
+@COND_i386_multiboot_TRUE@ gcry_tiger.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1707 = gcry_tiger.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1708 = gcry_tiger.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1709 = gcry_tiger.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1710 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_tiger.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1711 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_tiger.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1712 = gcry_twofish.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1713 = gcry_twofish.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1714 = gcry_twofish.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1715 = gcry_twofish.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1716 = \
+@COND_i386_coreboot_TRUE@ gcry_twofish.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1717 = \
+@COND_i386_multiboot_TRUE@ gcry_twofish.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1718 = \
+@COND_i386_ieee1275_TRUE@ gcry_twofish.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1719 = gcry_twofish.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1720 = \
+@COND_mips_yeeloong_TRUE@ gcry_twofish.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1721 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_twofish.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1722 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_twofish.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1723 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1724 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1725 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1726 = gcry_whirlpool.module$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1727 = \
+@COND_i386_coreboot_TRUE@ gcry_whirlpool.module$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1728 = \
+@COND_i386_multiboot_TRUE@ gcry_whirlpool.module$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1729 = \
+@COND_i386_ieee1275_TRUE@ gcry_whirlpool.module$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1730 = \
+@COND_x86_64_efi_TRUE@ gcry_whirlpool.module$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1731 = \
+@COND_mips_yeeloong_TRUE@ gcry_whirlpool.module$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1732 = \
+@COND_sparc64_ieee1275_TRUE@ gcry_whirlpool.module$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1733 = \
+@COND_powerpc_ieee1275_TRUE@ gcry_whirlpool.module$(EXEEXT)
+@COND_emu_TRUE@am__EXEEXT_1734 = kernel.exec$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1735 = kernel.exec$(EXEEXT)
+@COND_i386_efi_TRUE@am__EXEEXT_1736 = kernel.exec$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1737 = kernel.exec$(EXEEXT)
+@COND_i386_coreboot_TRUE@am__EXEEXT_1738 = kernel.exec$(EXEEXT)
+@COND_i386_multiboot_TRUE@am__EXEEXT_1739 = kernel.exec$(EXEEXT)
+@COND_i386_ieee1275_TRUE@am__EXEEXT_1740 = kernel.exec$(EXEEXT)
+@COND_x86_64_efi_TRUE@am__EXEEXT_1741 = kernel.exec$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1742 = kernel.exec$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1743 = kernel.exec$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@am__EXEEXT_1744 = kernel.exec$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1745 = boot.image$(EXEEXT)
+@COND_i386_qemu_TRUE@am__EXEEXT_1746 = boot.image$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1747 = boot.image$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1748 = cdboot.image$(EXEEXT) \
+@COND_i386_pc_TRUE@ pxeboot.image$(EXEEXT) \
+@COND_i386_pc_TRUE@ diskboot.image$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@am__EXEEXT_1749 = diskboot.image$(EXEEXT)
+@COND_i386_pc_TRUE@am__EXEEXT_1750 = lnxboot.image$(EXEEXT)
+@COND_mips_yeeloong_TRUE@am__EXEEXT_1751 = \
+@COND_mips_yeeloong_TRUE@ xz_decompress.image$(EXEEXT) \
+@COND_mips_yeeloong_TRUE@ none_decompress.image$(EXEEXT) \
+@COND_mips_yeeloong_TRUE@ fwstart.image$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS)
+am__acpi_module_SOURCES_DIST = commands/i386/pc/acpi.c commands/acpi.c \
+ commands/efi/acpi.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_x86_64_efi_TRUE@am_acpi_module_OBJECTS = commands/efi/acpi_module-acpi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_x86_64_efi_TRUE@ commands/acpi_module-acpi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_acpi_module_OBJECTS = commands/i386/pc/acpi_module-acpi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ commands/acpi_module-acpi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_TRUE@am_acpi_module_OBJECTS = commands/i386/pc/acpi_module-acpi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_TRUE@ commands/acpi_module-acpi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_acpi_module_OBJECTS = commands/efi/acpi_module-acpi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ commands/acpi_module-acpi.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_acpi_module_OBJECTS = commands/i386/pc/acpi_module-acpi.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ commands/acpi_module-acpi.$(OBJEXT)
+nodist_acpi_module_OBJECTS =
+acpi_module_OBJECTS = $(am_acpi_module_OBJECTS) \
+ $(nodist_acpi_module_OBJECTS)
+acpi_module_DEPENDENCIES =
+acpi_module_LINK = $(CCLD) $(acpi_module_CFLAGS) $(CFLAGS) \
+ $(acpi_module_LDFLAGS) $(LDFLAGS) -o $@
+am__affs_module_SOURCES_DIST = fs/affs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+@COND_emu_TRUE@am_affs_module_OBJECTS = fs/affs_module-affs.$(OBJEXT)
+nodist_affs_module_OBJECTS =
+affs_module_OBJECTS = $(am_affs_module_OBJECTS) \
+ $(nodist_affs_module_OBJECTS)
+affs_module_DEPENDENCIES =
+affs_module_LINK = $(CCLD) $(affs_module_CFLAGS) $(CFLAGS) \
+ $(affs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__afs_module_SOURCES_DIST = fs/afs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+@COND_emu_TRUE@am_afs_module_OBJECTS = fs/afs_module-afs.$(OBJEXT)
+nodist_afs_module_OBJECTS =
+afs_module_OBJECTS = $(am_afs_module_OBJECTS) \
+ $(nodist_afs_module_OBJECTS)
+afs_module_DEPENDENCIES =
+afs_module_LINK = $(CCLD) $(afs_module_CFLAGS) $(CFLAGS) \
+ $(afs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__afs_be_module_SOURCES_DIST = fs/afs_be.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_afs_be_module_OBJECTS = fs/afs_be_module-afs_be.$(OBJEXT)
+@COND_emu_TRUE@am_afs_be_module_OBJECTS = \
+@COND_emu_TRUE@ fs/afs_be_module-afs_be.$(OBJEXT)
+nodist_afs_be_module_OBJECTS =
+afs_be_module_OBJECTS = $(am_afs_be_module_OBJECTS) \
+ $(nodist_afs_be_module_OBJECTS)
+afs_be_module_DEPENDENCIES =
+afs_be_module_LINK = $(CCLD) $(afs_be_module_CFLAGS) $(CFLAGS) \
+ $(afs_be_module_LDFLAGS) $(LDFLAGS) -o $@
+am__aout_module_SOURCES_DIST = loader/aout.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_aout_module_OBJECTS = loader/aout_module-aout.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_aout_module_OBJECTS = loader/aout_module-aout.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_aout_module_OBJECTS = loader/aout_module-aout.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_aout_module_OBJECTS = loader/aout_module-aout.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_aout_module_OBJECTS = loader/aout_module-aout.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_aout_module_OBJECTS = loader/aout_module-aout.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_aout_module_OBJECTS = \
+@COND_i386_coreboot_TRUE@ loader/aout_module-aout.$(OBJEXT)
+nodist_aout_module_OBJECTS =
+aout_module_OBJECTS = $(am_aout_module_OBJECTS) \
+ $(nodist_aout_module_OBJECTS)
+aout_module_DEPENDENCIES =
+aout_module_LINK = $(CCLD) $(aout_module_CFLAGS) $(CFLAGS) \
+ $(aout_module_LDFLAGS) $(LDFLAGS) -o $@
+am__appleldr_module_SOURCES_DIST = loader/efi/appleloader.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_appleldr_module_OBJECTS = loader/efi/appleldr_module-appleloader.$(OBJEXT)
+@COND_i386_efi_TRUE@am_appleldr_module_OBJECTS = loader/efi/appleldr_module-appleloader.$(OBJEXT)
+nodist_appleldr_module_OBJECTS =
+appleldr_module_OBJECTS = $(am_appleldr_module_OBJECTS) \
+ $(nodist_appleldr_module_OBJECTS)
+appleldr_module_DEPENDENCIES =
+appleldr_module_LINK = $(CCLD) $(appleldr_module_CFLAGS) $(CFLAGS) \
+ $(appleldr_module_LDFLAGS) $(LDFLAGS) -o $@
+am__at_keyboard_module_SOURCES_DIST = term/at_keyboard.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_at_keyboard_module_OBJECTS = term/at_keyboard_module-at_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_at_keyboard_module_OBJECTS = term/at_keyboard_module-at_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_at_keyboard_module_OBJECTS = term/at_keyboard_module-at_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_at_keyboard_module_OBJECTS = term/at_keyboard_module-at_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_at_keyboard_module_OBJECTS = term/at_keyboard_module-at_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_at_keyboard_module_OBJECTS = term/at_keyboard_module-at_keyboard.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_at_keyboard_module_OBJECTS = term/at_keyboard_module-at_keyboard.$(OBJEXT)
+nodist_at_keyboard_module_OBJECTS =
+at_keyboard_module_OBJECTS = $(am_at_keyboard_module_OBJECTS) \
+ $(nodist_at_keyboard_module_OBJECTS)
+at_keyboard_module_DEPENDENCIES =
+at_keyboard_module_LINK = $(CCLD) $(at_keyboard_module_CFLAGS) \
+ $(CFLAGS) $(at_keyboard_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ata_module_SOURCES_DIST = disk/ata.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_ata_module_OBJECTS = disk/ata_module-ata.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ata_module_OBJECTS = disk/ata_module-ata.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ata_module_OBJECTS = disk/ata_module-ata.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ata_module_OBJECTS = disk/ata_module-ata.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ata_module_OBJECTS = disk/ata_module-ata.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ata_module_OBJECTS = disk/ata_module-ata.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ata_module_OBJECTS = disk/ata_module-ata.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_ata_module_OBJECTS = \
+@COND_i386_coreboot_TRUE@ disk/ata_module-ata.$(OBJEXT)
+nodist_ata_module_OBJECTS =
+ata_module_OBJECTS = $(am_ata_module_OBJECTS) \
+ $(nodist_ata_module_OBJECTS)
+ata_module_DEPENDENCIES =
+ata_module_LINK = $(CCLD) $(ata_module_CFLAGS) $(CFLAGS) \
+ $(ata_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ata_pthru_module_SOURCES_DIST = disk/ata_pthru.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_ata_pthru_module_OBJECTS = disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+nodist_ata_pthru_module_OBJECTS =
+ata_pthru_module_OBJECTS = $(am_ata_pthru_module_OBJECTS) \
+ $(nodist_ata_pthru_module_OBJECTS)
+ata_pthru_module_DEPENDENCIES =
+ata_pthru_module_LINK = $(CCLD) $(ata_pthru_module_CFLAGS) $(CFLAGS) \
+ $(ata_pthru_module_LDFLAGS) $(LDFLAGS) -o $@
+am__befs_module_SOURCES_DIST = fs/befs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+@COND_emu_TRUE@am_befs_module_OBJECTS = fs/befs_module-befs.$(OBJEXT)
+nodist_befs_module_OBJECTS =
+befs_module_OBJECTS = $(am_befs_module_OBJECTS) \
+ $(nodist_befs_module_OBJECTS)
+befs_module_DEPENDENCIES =
+befs_module_LINK = $(CCLD) $(befs_module_CFLAGS) $(CFLAGS) \
+ $(befs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__befs_be_module_SOURCES_DIST = fs/befs_be.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_befs_be_module_OBJECTS = fs/befs_be_module-befs_be.$(OBJEXT)
+@COND_emu_TRUE@am_befs_be_module_OBJECTS = \
+@COND_emu_TRUE@ fs/befs_be_module-befs_be.$(OBJEXT)
+nodist_befs_be_module_OBJECTS =
+befs_be_module_OBJECTS = $(am_befs_be_module_OBJECTS) \
+ $(nodist_befs_be_module_OBJECTS)
+befs_be_module_DEPENDENCIES =
+befs_be_module_LINK = $(CCLD) $(befs_be_module_CFLAGS) $(CFLAGS) \
+ $(befs_be_module_LDFLAGS) $(LDFLAGS) -o $@
+am__biosdisk_module_SOURCES_DIST = disk/i386/pc/biosdisk.c
+@COND_i386_pc_TRUE@am_biosdisk_module_OBJECTS = disk/i386/pc/biosdisk_module-biosdisk.$(OBJEXT)
+nodist_biosdisk_module_OBJECTS =
+biosdisk_module_OBJECTS = $(am_biosdisk_module_OBJECTS) \
+ $(nodist_biosdisk_module_OBJECTS)
+biosdisk_module_DEPENDENCIES =
+biosdisk_module_LINK = $(CCLD) $(biosdisk_module_CFLAGS) $(CFLAGS) \
+ $(biosdisk_module_LDFLAGS) $(LDFLAGS) -o $@
+am__bitmap_module_SOURCES_DIST = video/bitmap.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_bitmap_module_OBJECTS = video/bitmap_module-bitmap.$(OBJEXT)
+@COND_emu_TRUE@am_bitmap_module_OBJECTS = \
+@COND_emu_TRUE@ video/bitmap_module-bitmap.$(OBJEXT)
+nodist_bitmap_module_OBJECTS =
+bitmap_module_OBJECTS = $(am_bitmap_module_OBJECTS) \
+ $(nodist_bitmap_module_OBJECTS)
+bitmap_module_DEPENDENCIES =
+bitmap_module_LINK = $(CCLD) $(bitmap_module_CFLAGS) $(CFLAGS) \
+ $(bitmap_module_LDFLAGS) $(LDFLAGS) -o $@
+am__bitmap_scale_module_SOURCES_DIST = video/bitmap_scale.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+@COND_emu_TRUE@am_bitmap_scale_module_OBJECTS = video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+nodist_bitmap_scale_module_OBJECTS =
+bitmap_scale_module_OBJECTS = $(am_bitmap_scale_module_OBJECTS) \
+ $(nodist_bitmap_scale_module_OBJECTS)
+bitmap_scale_module_DEPENDENCIES =
+bitmap_scale_module_LINK = $(CCLD) $(bitmap_scale_module_CFLAGS) \
+ $(CFLAGS) $(bitmap_scale_module_LDFLAGS) $(LDFLAGS) -o $@
+am__blocklist_module_SOURCES_DIST = commands/blocklist.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_blocklist_module_OBJECTS = commands/blocklist_module-blocklist.$(OBJEXT)
+@COND_emu_TRUE@am_blocklist_module_OBJECTS = \
+@COND_emu_TRUE@ commands/blocklist_module-blocklist.$(OBJEXT)
+nodist_blocklist_module_OBJECTS =
+blocklist_module_OBJECTS = $(am_blocklist_module_OBJECTS) \
+ $(nodist_blocklist_module_OBJECTS)
+blocklist_module_DEPENDENCIES =
+blocklist_module_LINK = $(CCLD) $(blocklist_module_CFLAGS) $(CFLAGS) \
+ $(blocklist_module_LDFLAGS) $(LDFLAGS) -o $@
+am__boot_image_SOURCES_DIST = boot/i386/pc/boot.S \
+ boot/i386/qemu/boot.S boot/sparc64/ieee1275/boot.S
+@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_sparc64_ieee1275_TRUE@am_boot_image_OBJECTS = boot/sparc64/ieee1275/boot_image-boot.$(OBJEXT)
+@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_boot_image_OBJECTS = boot/i386/qemu/boot_image-boot.$(OBJEXT)
+@COND_i386_pc_TRUE@am_boot_image_OBJECTS = \
+@COND_i386_pc_TRUE@ boot/i386/pc/boot_image-boot.$(OBJEXT)
+nodist_boot_image_OBJECTS =
+boot_image_OBJECTS = $(am_boot_image_OBJECTS) \
+ $(nodist_boot_image_OBJECTS)
+boot_image_DEPENDENCIES =
+boot_image_LINK = $(CCLD) $(boot_image_CFLAGS) $(CFLAGS) \
+ $(boot_image_LDFLAGS) $(LDFLAGS) -o $@
+am__boot_module_SOURCES_DIST = commands/boot.c lib/i386/pc/biosnum.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_boot_module_OBJECTS = lib/i386/pc/boot_module-biosnum.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_boot_module_OBJECTS = commands/boot_module-boot.$(OBJEXT)
+@COND_emu_TRUE@am_boot_module_OBJECTS = \
+@COND_emu_TRUE@ commands/boot_module-boot.$(OBJEXT)
+nodist_boot_module_OBJECTS =
+boot_module_OBJECTS = $(am_boot_module_OBJECTS) \
+ $(nodist_boot_module_OBJECTS)
+boot_module_DEPENDENCIES =
+boot_module_LINK = $(CCLD) $(boot_module_CFLAGS) $(CFLAGS) \
+ $(boot_module_LDFLAGS) $(LDFLAGS) -o $@
+am__bsd_module_SOURCES_DIST = loader/i386/bsd.c loader/i386/bsd32.c \
+ loader/i386/bsd64.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_bsd_module_OBJECTS = loader/i386/bsd_module-bsd.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/i386/bsd_module-bsd32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/i386/bsd_module-bsd64.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_bsd_module_OBJECTS = loader/i386/bsd_module-bsd.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/i386/bsd_module-bsd32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/i386/bsd_module-bsd64.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_bsd_module_OBJECTS = loader/i386/bsd_module-bsd.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/i386/bsd_module-bsd32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/i386/bsd_module-bsd64.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_bsd_module_OBJECTS = loader/i386/bsd_module-bsd.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/i386/bsd_module-bsd32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/i386/bsd_module-bsd64.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_bsd_module_OBJECTS = loader/i386/bsd_module-bsd.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/i386/bsd_module-bsd32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/i386/bsd_module-bsd64.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_bsd_module_OBJECTS = loader/i386/bsd_module-bsd.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/i386/bsd_module-bsd32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/i386/bsd_module-bsd64.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_bsd_module_OBJECTS = \
+@COND_i386_coreboot_TRUE@ loader/i386/bsd_module-bsd.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/i386/bsd_module-bsd32.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/i386/bsd_module-bsd64.$(OBJEXT)
+nodist_bsd_module_OBJECTS =
+bsd_module_OBJECTS = $(am_bsd_module_OBJECTS) \
+ $(nodist_bsd_module_OBJECTS)
+bsd_module_DEPENDENCIES =
+bsd_module_LINK = $(CCLD) $(bsd_module_CFLAGS) $(CFLAGS) \
+ $(bsd_module_LDFLAGS) $(LDFLAGS) -o $@
+am__btrfs_module_SOURCES_DIST = fs/btrfs.c lib/crc.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_btrfs_module_OBJECTS = fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+@COND_emu_TRUE@am_btrfs_module_OBJECTS = \
+@COND_emu_TRUE@ fs/btrfs_module-btrfs.$(OBJEXT) \
+@COND_emu_TRUE@ lib/btrfs_module-crc.$(OBJEXT)
+nodist_btrfs_module_OBJECTS =
+btrfs_module_OBJECTS = $(am_btrfs_module_OBJECTS) \
+ $(nodist_btrfs_module_OBJECTS)
+btrfs_module_DEPENDENCIES =
+btrfs_module_LINK = $(CCLD) $(btrfs_module_CFLAGS) $(CFLAGS) \
+ $(btrfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__bufio_module_SOURCES_DIST = io/bufio.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_bufio_module_OBJECTS = io/bufio_module-bufio.$(OBJEXT)
+@COND_emu_TRUE@am_bufio_module_OBJECTS = \
+@COND_emu_TRUE@ io/bufio_module-bufio.$(OBJEXT)
+nodist_bufio_module_OBJECTS =
+bufio_module_OBJECTS = $(am_bufio_module_OBJECTS) \
+ $(nodist_bufio_module_OBJECTS)
+bufio_module_DEPENDENCIES =
+bufio_module_LINK = $(CCLD) $(bufio_module_CFLAGS) $(CFLAGS) \
+ $(bufio_module_LDFLAGS) $(LDFLAGS) -o $@
+am__cat_module_SOURCES_DIST = commands/cat.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_cat_module_OBJECTS = commands/cat_module-cat.$(OBJEXT)
+@COND_emu_TRUE@am_cat_module_OBJECTS = \
+@COND_emu_TRUE@ commands/cat_module-cat.$(OBJEXT)
+nodist_cat_module_OBJECTS =
+cat_module_OBJECTS = $(am_cat_module_OBJECTS) \
+ $(nodist_cat_module_OBJECTS)
+cat_module_DEPENDENCIES =
+cat_module_LINK = $(CCLD) $(cat_module_CFLAGS) $(CFLAGS) \
+ $(cat_module_LDFLAGS) $(LDFLAGS) -o $@
+am__cdboot_image_SOURCES_DIST = boot/i386/pc/cdboot.S
+@COND_i386_pc_TRUE@am_cdboot_image_OBJECTS = \
+@COND_i386_pc_TRUE@ boot/i386/pc/cdboot_image-cdboot.$(OBJEXT)
+nodist_cdboot_image_OBJECTS =
+cdboot_image_OBJECTS = $(am_cdboot_image_OBJECTS) \
+ $(nodist_cdboot_image_OBJECTS)
+cdboot_image_DEPENDENCIES =
+cdboot_image_LINK = $(CCLD) $(cdboot_image_CFLAGS) $(CFLAGS) \
+ $(cdboot_image_LDFLAGS) $(LDFLAGS) -o $@
+am__chain_module_SOURCES_DIST = loader/efi/chainloader.c \
+ loader/i386/pc/chainloader.c
+@COND_i386_efi_FALSE@@COND_i386_pc_FALSE@@COND_x86_64_efi_TRUE@am_chain_module_OBJECTS = loader/efi/chain_module-chainloader.$(OBJEXT)
+@COND_i386_efi_FALSE@@COND_i386_pc_TRUE@am_chain_module_OBJECTS = loader/i386/pc/chain_module-chainloader.$(OBJEXT)
+@COND_i386_efi_TRUE@am_chain_module_OBJECTS = loader/efi/chain_module-chainloader.$(OBJEXT)
+nodist_chain_module_OBJECTS =
+chain_module_OBJECTS = $(am_chain_module_OBJECTS) \
+ $(nodist_chain_module_OBJECTS)
+chain_module_DEPENDENCIES =
+chain_module_LINK = $(CCLD) $(chain_module_CFLAGS) $(CFLAGS) \
+ $(chain_module_LDFLAGS) $(LDFLAGS) -o $@
+am__cmostest_module_SOURCES_DIST = commands/i386/cmostest.c
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_cmostest_module_OBJECTS = commands/i386/cmostest_module-cmostest.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_cmostest_module_OBJECTS = commands/i386/cmostest_module-cmostest.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_cmostest_module_OBJECTS = commands/i386/cmostest_module-cmostest.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_cmostest_module_OBJECTS = commands/i386/cmostest_module-cmostest.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@am_cmostest_module_OBJECTS = commands/i386/cmostest_module-cmostest.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_cmostest_module_OBJECTS = commands/i386/cmostest_module-cmostest.$(OBJEXT)
+nodist_cmostest_module_OBJECTS =
+cmostest_module_OBJECTS = $(am_cmostest_module_OBJECTS) \
+ $(nodist_cmostest_module_OBJECTS)
+cmostest_module_DEPENDENCIES =
+cmostest_module_LINK = $(CCLD) $(cmostest_module_CFLAGS) $(CFLAGS) \
+ $(cmostest_module_LDFLAGS) $(LDFLAGS) -o $@
+am__cmp_module_SOURCES_DIST = commands/cmp.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_cmp_module_OBJECTS = commands/cmp_module-cmp.$(OBJEXT)
+@COND_emu_TRUE@am_cmp_module_OBJECTS = \
+@COND_emu_TRUE@ commands/cmp_module-cmp.$(OBJEXT)
+nodist_cmp_module_OBJECTS =
+cmp_module_OBJECTS = $(am_cmp_module_OBJECTS) \
+ $(nodist_cmp_module_OBJECTS)
+cmp_module_DEPENDENCIES =
+cmp_module_LINK = $(CCLD) $(cmp_module_CFLAGS) $(CFLAGS) \
+ $(cmp_module_LDFLAGS) $(LDFLAGS) -o $@
+am__configfile_module_SOURCES_DIST = commands/configfile.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+@COND_emu_TRUE@am_configfile_module_OBJECTS = commands/configfile_module-configfile.$(OBJEXT)
+nodist_configfile_module_OBJECTS =
+configfile_module_OBJECTS = $(am_configfile_module_OBJECTS) \
+ $(nodist_configfile_module_OBJECTS)
+configfile_module_DEPENDENCIES =
+configfile_module_LINK = $(CCLD) $(configfile_module_CFLAGS) $(CFLAGS) \
+ $(configfile_module_LDFLAGS) $(LDFLAGS) -o $@
+am__cpio_module_SOURCES_DIST = fs/cpio.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+@COND_emu_TRUE@am_cpio_module_OBJECTS = fs/cpio_module-cpio.$(OBJEXT)
+nodist_cpio_module_OBJECTS =
+cpio_module_OBJECTS = $(am_cpio_module_OBJECTS) \
+ $(nodist_cpio_module_OBJECTS)
+cpio_module_DEPENDENCIES =
+cpio_module_LINK = $(CCLD) $(cpio_module_CFLAGS) $(CFLAGS) \
+ $(cpio_module_LDFLAGS) $(LDFLAGS) -o $@
+am__cpuid_module_SOURCES_DIST = commands/i386/cpuid.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_cpuid_module_OBJECTS = commands/i386/cpuid_module-cpuid.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_cpuid_module_OBJECTS = commands/i386/cpuid_module-cpuid.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_cpuid_module_OBJECTS = commands/i386/cpuid_module-cpuid.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_cpuid_module_OBJECTS = commands/i386/cpuid_module-cpuid.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_cpuid_module_OBJECTS = commands/i386/cpuid_module-cpuid.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_cpuid_module_OBJECTS = commands/i386/cpuid_module-cpuid.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_cpuid_module_OBJECTS = commands/i386/cpuid_module-cpuid.$(OBJEXT)
+nodist_cpuid_module_OBJECTS =
+cpuid_module_OBJECTS = $(am_cpuid_module_OBJECTS) \
+ $(nodist_cpuid_module_OBJECTS)
+cpuid_module_DEPENDENCIES =
+cpuid_module_LINK = $(CCLD) $(cpuid_module_CFLAGS) $(CFLAGS) \
+ $(cpuid_module_LDFLAGS) $(LDFLAGS) -o $@
+am__crypto_module_SOURCES_DIST = lib/crypto.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_crypto_module_OBJECTS = lib/crypto_module-crypto.$(OBJEXT)
+@COND_emu_TRUE@am_crypto_module_OBJECTS = \
+@COND_emu_TRUE@ lib/crypto_module-crypto.$(OBJEXT)
+nodist_crypto_module_OBJECTS =
+crypto_module_OBJECTS = $(am_crypto_module_OBJECTS) \
+ $(nodist_crypto_module_OBJECTS)
+crypto_module_DEPENDENCIES =
+crypto_module_LINK = $(CCLD) $(crypto_module_CFLAGS) $(CFLAGS) \
+ $(crypto_module_LDFLAGS) $(LDFLAGS) -o $@
+am__cs5536_module_SOURCES_DIST = bus/cs5536.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_cs5536_module_OBJECTS = bus/cs5536_module-cs5536.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_cs5536_module_OBJECTS = bus/cs5536_module-cs5536.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_cs5536_module_OBJECTS = bus/cs5536_module-cs5536.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_cs5536_module_OBJECTS = bus/cs5536_module-cs5536.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_cs5536_module_OBJECTS = bus/cs5536_module-cs5536.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_cs5536_module_OBJECTS = bus/cs5536_module-cs5536.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_cs5536_module_OBJECTS = \
+@COND_i386_coreboot_TRUE@ bus/cs5536_module-cs5536.$(OBJEXT)
+nodist_cs5536_module_OBJECTS =
+cs5536_module_OBJECTS = $(am_cs5536_module_OBJECTS) \
+ $(nodist_cs5536_module_OBJECTS)
+cs5536_module_DEPENDENCIES =
+cs5536_module_LINK = $(CCLD) $(cs5536_module_CFLAGS) $(CFLAGS) \
+ $(cs5536_module_LDFLAGS) $(LDFLAGS) -o $@
+am__date_module_SOURCES_DIST = commands/date.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_date_module_OBJECTS = commands/date_module-date.$(OBJEXT)
+@COND_emu_TRUE@am_date_module_OBJECTS = \
+@COND_emu_TRUE@ commands/date_module-date.$(OBJEXT)
+nodist_date_module_OBJECTS =
+date_module_OBJECTS = $(am_date_module_OBJECTS) \
+ $(nodist_date_module_OBJECTS)
+date_module_DEPENDENCIES =
+date_module_LINK = $(CCLD) $(date_module_CFLAGS) $(CFLAGS) \
+ $(date_module_LDFLAGS) $(LDFLAGS) -o $@
+am__datehook_module_SOURCES_DIST = hook/datehook.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_datehook_module_OBJECTS = hook/datehook_module-datehook.$(OBJEXT)
+@COND_emu_TRUE@am_datehook_module_OBJECTS = \
+@COND_emu_TRUE@ hook/datehook_module-datehook.$(OBJEXT)
+nodist_datehook_module_OBJECTS =
+datehook_module_OBJECTS = $(am_datehook_module_OBJECTS) \
+ $(nodist_datehook_module_OBJECTS)
+datehook_module_DEPENDENCIES =
+datehook_module_LINK = $(CCLD) $(datehook_module_CFLAGS) $(CFLAGS) \
+ $(datehook_module_LDFLAGS) $(LDFLAGS) -o $@
+am__datetime_module_SOURCES_DIST = lib/cmos_datetime.c \
+ lib/efi/datetime.c lib/ieee1275/datetime.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_datetime_module_OBJECTS = lib/efi/datetime_module-datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_datetime_module_OBJECTS = lib/ieee1275/datetime_module-datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_datetime_module_OBJECTS = lib/ieee1275/datetime_module-datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_datetime_module_OBJECTS = lib/datetime_module-cmos_datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_datetime_module_OBJECTS = lib/datetime_module-cmos_datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_datetime_module_OBJECTS = lib/datetime_module-cmos_datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_datetime_module_OBJECTS = lib/datetime_module-cmos_datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_datetime_module_OBJECTS = lib/datetime_module-cmos_datetime.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_datetime_module_OBJECTS = lib/efi/datetime_module-datetime.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_datetime_module_OBJECTS = lib/datetime_module-cmos_datetime.$(OBJEXT)
+nodist_datetime_module_OBJECTS =
+datetime_module_OBJECTS = $(am_datetime_module_OBJECTS) \
+ $(nodist_datetime_module_OBJECTS)
+datetime_module_DEPENDENCIES =
+datetime_module_LINK = $(CCLD) $(datetime_module_CFLAGS) $(CFLAGS) \
+ $(datetime_module_LDFLAGS) $(LDFLAGS) -o $@
+am__diskboot_image_SOURCES_DIST = boot/i386/pc/diskboot.S \
+ boot/sparc64/ieee1275/diskboot.S
+@COND_i386_pc_FALSE@@COND_sparc64_ieee1275_TRUE@am_diskboot_image_OBJECTS = boot/sparc64/ieee1275/diskboot_image-diskboot.$(OBJEXT)
+@COND_i386_pc_TRUE@am_diskboot_image_OBJECTS = boot/i386/pc/diskboot_image-diskboot.$(OBJEXT)
+nodist_diskboot_image_OBJECTS =
+diskboot_image_OBJECTS = $(am_diskboot_image_OBJECTS) \
+ $(nodist_diskboot_image_OBJECTS)
+diskboot_image_DEPENDENCIES =
+diskboot_image_LINK = $(CCLD) $(diskboot_image_CFLAGS) $(CFLAGS) \
+ $(diskboot_image_LDFLAGS) $(LDFLAGS) -o $@
+am__dm_nv_module_SOURCES_DIST = disk/dmraid_nvidia.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_dm_nv_module_OBJECTS = disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+@COND_emu_TRUE@am_dm_nv_module_OBJECTS = \
+@COND_emu_TRUE@ disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+nodist_dm_nv_module_OBJECTS =
+dm_nv_module_OBJECTS = $(am_dm_nv_module_OBJECTS) \
+ $(nodist_dm_nv_module_OBJECTS)
+dm_nv_module_DEPENDENCIES =
+dm_nv_module_LINK = $(CCLD) $(dm_nv_module_CFLAGS) $(CFLAGS) \
+ $(dm_nv_module_LDFLAGS) $(LDFLAGS) -o $@
+am__drivemap_module_SOURCES_DIST = commands/i386/pc/drivemap.c \
+ commands/i386/pc/drivemap_int13h.S
+@COND_i386_pc_TRUE@am_drivemap_module_OBJECTS = commands/i386/pc/drivemap_module-drivemap.$(OBJEXT) \
+@COND_i386_pc_TRUE@ commands/i386/pc/drivemap_module-drivemap_int13h.$(OBJEXT)
+nodist_drivemap_module_OBJECTS =
+drivemap_module_OBJECTS = $(am_drivemap_module_OBJECTS) \
+ $(nodist_drivemap_module_OBJECTS)
+drivemap_module_DEPENDENCIES =
+drivemap_module_LINK = $(CCLD) $(drivemap_module_CFLAGS) $(CFLAGS) \
+ $(drivemap_module_LDFLAGS) $(LDFLAGS) -o $@
+am__echo_module_SOURCES_DIST = commands/echo.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_echo_module_OBJECTS = commands/echo_module-echo.$(OBJEXT)
+@COND_emu_TRUE@am_echo_module_OBJECTS = \
+@COND_emu_TRUE@ commands/echo_module-echo.$(OBJEXT)
+nodist_echo_module_OBJECTS =
+echo_module_OBJECTS = $(am_echo_module_OBJECTS) \
+ $(nodist_echo_module_OBJECTS)
+echo_module_DEPENDENCIES =
+echo_module_LINK = $(CCLD) $(echo_module_CFLAGS) $(CFLAGS) \
+ $(echo_module_LDFLAGS) $(LDFLAGS) -o $@
+am__efi_gop_module_SOURCES_DIST = video/efi_gop.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_efi_gop_module_OBJECTS = video/efi_gop_module-efi_gop.$(OBJEXT)
+@COND_i386_efi_TRUE@am_efi_gop_module_OBJECTS = \
+@COND_i386_efi_TRUE@ video/efi_gop_module-efi_gop.$(OBJEXT)
+nodist_efi_gop_module_OBJECTS =
+efi_gop_module_OBJECTS = $(am_efi_gop_module_OBJECTS) \
+ $(nodist_efi_gop_module_OBJECTS)
+efi_gop_module_DEPENDENCIES =
+efi_gop_module_LINK = $(CCLD) $(efi_gop_module_CFLAGS) $(CFLAGS) \
+ $(efi_gop_module_LDFLAGS) $(LDFLAGS) -o $@
+am__efi_uga_module_SOURCES_DIST = video/efi_uga.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_efi_uga_module_OBJECTS = video/efi_uga_module-efi_uga.$(OBJEXT)
+@COND_i386_efi_TRUE@am_efi_uga_module_OBJECTS = \
+@COND_i386_efi_TRUE@ video/efi_uga_module-efi_uga.$(OBJEXT)
+nodist_efi_uga_module_OBJECTS =
+efi_uga_module_OBJECTS = $(am_efi_uga_module_OBJECTS) \
+ $(nodist_efi_uga_module_OBJECTS)
+efi_uga_module_DEPENDENCIES =
+efi_uga_module_LINK = $(CCLD) $(efi_uga_module_CFLAGS) $(CFLAGS) \
+ $(efi_uga_module_LDFLAGS) $(LDFLAGS) -o $@
+am__efiemu_module_SOURCES_DIST = efiemu/i386/pc/cfgtables.c \
+ efiemu/main.c efiemu/i386/loadcore32.c \
+ efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c \
+ efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c \
+ efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c \
+ efiemu/i386/coredetect.c efiemu/i386/nocfgtables.c
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_efiemu_module_OBJECTS = efiemu/i386/efiemu_module-nocfgtables.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-main.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/i386/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/i386/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-mm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-loadcore_common.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-symbols.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-prepare32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-prepare64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/efiemu_module-pnvram.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ efiemu/i386/efiemu_module-coredetect.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_efiemu_module_OBJECTS = efiemu/i386/pc/efiemu_module-cfgtables.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-main.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/i386/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/i386/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-mm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-loadcore_common.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-symbols.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-prepare32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-prepare64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/efiemu_module-pnvram.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ efiemu/i386/efiemu_module-coredetect.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_efiemu_module_OBJECTS = efiemu/i386/pc/efiemu_module-cfgtables.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-main.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/i386/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/i386/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-mm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-loadcore_common.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-symbols.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-prepare32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-prepare64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/efiemu_module-pnvram.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ efiemu/i386/efiemu_module-coredetect.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@am_efiemu_module_OBJECTS = efiemu/i386/efiemu_module-nocfgtables.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-main.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/i386/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/i386/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-mm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-loadcore_common.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-symbols.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-prepare32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-prepare64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/efiemu_module-pnvram.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_ieee1275_TRUE@ efiemu/i386/efiemu_module-coredetect.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_efiemu_module_OBJECTS = efiemu/i386/pc/efiemu_module-cfgtables.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-main.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/i386/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/i386/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-mm.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-loadcore_common.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-symbols.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-loadcore32.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-loadcore64.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-prepare32.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-prepare64.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/efiemu_module-pnvram.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ efiemu/i386/efiemu_module-coredetect.$(OBJEXT)
+nodist_efiemu_module_OBJECTS =
+efiemu_module_OBJECTS = $(am_efiemu_module_OBJECTS) \
+ $(nodist_efiemu_module_OBJECTS)
+efiemu_module_DEPENDENCIES =
+efiemu_module_LINK = $(CCLD) $(efiemu_module_CFLAGS) $(CFLAGS) \
+ $(efiemu_module_LDFLAGS) $(LDFLAGS) -o $@
+am__elf_module_SOURCES_DIST = kern/elf.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+@COND_emu_TRUE@am_elf_module_OBJECTS = kern/elf_module-elf.$(OBJEXT)
+nodist_elf_module_OBJECTS =
+elf_module_OBJECTS = $(am_elf_module_OBJECTS) \
+ $(nodist_elf_module_OBJECTS)
+elf_module_DEPENDENCIES =
+elf_module_LINK = $(CCLD) $(elf_module_CFLAGS) $(CFLAGS) \
+ $(elf_module_LDFLAGS) $(LDFLAGS) -o $@
+am__example_functional_test_module_SOURCES_DIST = \
+ tests/example_functional_test.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+@COND_emu_TRUE@am_example_functional_test_module_OBJECTS = tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+nodist_example_functional_test_module_OBJECTS =
+example_functional_test_module_OBJECTS = \
+ $(am_example_functional_test_module_OBJECTS) \
+ $(nodist_example_functional_test_module_OBJECTS)
+example_functional_test_module_DEPENDENCIES =
+example_functional_test_module_LINK = $(CCLD) \
+ $(example_functional_test_module_CFLAGS) $(CFLAGS) \
+ $(example_functional_test_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ext2_module_SOURCES_DIST = fs/ext2.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+@COND_emu_TRUE@am_ext2_module_OBJECTS = fs/ext2_module-ext2.$(OBJEXT)
+nodist_ext2_module_OBJECTS =
+ext2_module_OBJECTS = $(am_ext2_module_OBJECTS) \
+ $(nodist_ext2_module_OBJECTS)
+ext2_module_DEPENDENCIES =
+ext2_module_LINK = $(CCLD) $(ext2_module_CFLAGS) $(CFLAGS) \
+ $(ext2_module_LDFLAGS) $(LDFLAGS) -o $@
+am__extcmd_module_SOURCES_DIST = commands/extcmd.c lib/arg.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_extcmd_module_OBJECTS = commands/extcmd_module-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ lib/extcmd_module-arg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_extcmd_module_OBJECTS = commands/extcmd_module-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/extcmd_module-arg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_extcmd_module_OBJECTS = commands/extcmd_module-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/extcmd_module-arg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_TRUE@am_extcmd_module_OBJECTS = commands/extcmd_module-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_TRUE@ lib/extcmd_module-arg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_extcmd_module_OBJECTS = commands/extcmd_module-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/extcmd_module-arg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_extcmd_module_OBJECTS = commands/extcmd_module-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/extcmd_module-arg.$(OBJEXT)
+@COND_emu_TRUE@am_extcmd_module_OBJECTS = \
+@COND_emu_TRUE@ commands/extcmd_module-extcmd.$(OBJEXT) \
+@COND_emu_TRUE@ lib/extcmd_module-arg.$(OBJEXT)
+nodist_extcmd_module_OBJECTS =
+extcmd_module_OBJECTS = $(am_extcmd_module_OBJECTS) \
+ $(nodist_extcmd_module_OBJECTS)
+extcmd_module_DEPENDENCIES =
+extcmd_module_LINK = $(CCLD) $(extcmd_module_CFLAGS) $(CFLAGS) \
+ $(extcmd_module_LDFLAGS) $(LDFLAGS) -o $@
+am__fat_module_SOURCES_DIST = fs/fat.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+@COND_emu_TRUE@am_fat_module_OBJECTS = fs/fat_module-fat.$(OBJEXT)
+nodist_fat_module_OBJECTS =
+fat_module_OBJECTS = $(am_fat_module_OBJECTS) \
+ $(nodist_fat_module_OBJECTS)
+fat_module_DEPENDENCIES =
+fat_module_LINK = $(CCLD) $(fat_module_CFLAGS) $(CFLAGS) \
+ $(fat_module_LDFLAGS) $(LDFLAGS) -o $@
+am__fixvideo_module_SOURCES_DIST = commands/efi/fixvideo.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_fixvideo_module_OBJECTS = commands/efi/fixvideo_module-fixvideo.$(OBJEXT)
+@COND_i386_efi_TRUE@am_fixvideo_module_OBJECTS = commands/efi/fixvideo_module-fixvideo.$(OBJEXT)
+nodist_fixvideo_module_OBJECTS =
+fixvideo_module_OBJECTS = $(am_fixvideo_module_OBJECTS) \
+ $(nodist_fixvideo_module_OBJECTS)
+fixvideo_module_DEPENDENCIES =
+fixvideo_module_LINK = $(CCLD) $(fixvideo_module_CFLAGS) $(CFLAGS) \
+ $(fixvideo_module_LDFLAGS) $(LDFLAGS) -o $@
+am__font_module_SOURCES_DIST = font/font.c font/font_cmd.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_font_module_OBJECTS = font/font_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+@COND_emu_TRUE@am_font_module_OBJECTS = \
+@COND_emu_TRUE@ font/font_module-font.$(OBJEXT) \
+@COND_emu_TRUE@ font/font_module-font_cmd.$(OBJEXT)
+nodist_font_module_OBJECTS =
+font_module_OBJECTS = $(am_font_module_OBJECTS) \
+ $(nodist_font_module_OBJECTS)
+font_module_DEPENDENCIES =
+font_module_LINK = $(CCLD) $(font_module_CFLAGS) $(CFLAGS) \
+ $(font_module_LDFLAGS) $(LDFLAGS) -o $@
+am__fshelp_module_SOURCES_DIST = fs/fshelp.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_fshelp_module_OBJECTS = fs/fshelp_module-fshelp.$(OBJEXT)
+@COND_emu_TRUE@am_fshelp_module_OBJECTS = \
+@COND_emu_TRUE@ fs/fshelp_module-fshelp.$(OBJEXT)
+nodist_fshelp_module_OBJECTS =
+fshelp_module_OBJECTS = $(am_fshelp_module_OBJECTS) \
+ $(nodist_fshelp_module_OBJECTS)
+fshelp_module_DEPENDENCIES =
+fshelp_module_LINK = $(CCLD) $(fshelp_module_CFLAGS) $(CFLAGS) \
+ $(fshelp_module_LDFLAGS) $(LDFLAGS) -o $@
+am__functional_test_module_SOURCES_DIST = tests/lib/functional_test.c \
+ tests/lib/test.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+@COND_emu_TRUE@am_functional_test_module_OBJECTS = tests/lib/functional_test_module-functional_test.$(OBJEXT) \
+@COND_emu_TRUE@ tests/lib/functional_test_module-test.$(OBJEXT)
+nodist_functional_test_module_OBJECTS =
+functional_test_module_OBJECTS = $(am_functional_test_module_OBJECTS) \
+ $(nodist_functional_test_module_OBJECTS)
+functional_test_module_DEPENDENCIES =
+functional_test_module_LINK = $(CCLD) $(functional_test_module_CFLAGS) \
+ $(CFLAGS) $(functional_test_module_LDFLAGS) $(LDFLAGS) -o $@
+am__fwstart_image_SOURCES_DIST = boot/mips/yeeloong/fwstart.S
+@COND_mips_yeeloong_TRUE@am_fwstart_image_OBJECTS = boot/mips/yeeloong/fwstart_image-fwstart.$(OBJEXT)
+nodist_fwstart_image_OBJECTS =
+fwstart_image_OBJECTS = $(am_fwstart_image_OBJECTS) \
+ $(nodist_fwstart_image_OBJECTS)
+fwstart_image_DEPENDENCIES =
+fwstart_image_LINK = $(CCLD) $(fwstart_image_CFLAGS) $(CFLAGS) \
+ $(fwstart_image_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_arcfour_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/arcfour.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_arcfour_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+nodist_gcry_arcfour_module_OBJECTS =
+gcry_arcfour_module_OBJECTS = $(am_gcry_arcfour_module_OBJECTS) \
+ $(nodist_gcry_arcfour_module_OBJECTS)
+gcry_arcfour_module_DEPENDENCIES =
+gcry_arcfour_module_LINK = $(CCLD) $(gcry_arcfour_module_CFLAGS) \
+ $(CFLAGS) $(gcry_arcfour_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_blowfish_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/blowfish.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_blowfish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+nodist_gcry_blowfish_module_OBJECTS =
+gcry_blowfish_module_OBJECTS = $(am_gcry_blowfish_module_OBJECTS) \
+ $(nodist_gcry_blowfish_module_OBJECTS)
+gcry_blowfish_module_DEPENDENCIES =
+gcry_blowfish_module_LINK = $(CCLD) $(gcry_blowfish_module_CFLAGS) \
+ $(CFLAGS) $(gcry_blowfish_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_camellia_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/camellia-glue.c \
+ lib/libgcrypt-grub/cipher/camellia.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_camellia_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT) \
+@COND_emu_TRUE@ lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+nodist_gcry_camellia_module_OBJECTS =
+gcry_camellia_module_OBJECTS = $(am_gcry_camellia_module_OBJECTS) \
+ $(nodist_gcry_camellia_module_OBJECTS)
+gcry_camellia_module_DEPENDENCIES =
+gcry_camellia_module_LINK = $(CCLD) $(gcry_camellia_module_CFLAGS) \
+ $(CFLAGS) $(gcry_camellia_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_cast5_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/cast5.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_cast5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+nodist_gcry_cast5_module_OBJECTS =
+gcry_cast5_module_OBJECTS = $(am_gcry_cast5_module_OBJECTS) \
+ $(nodist_gcry_cast5_module_OBJECTS)
+gcry_cast5_module_DEPENDENCIES =
+gcry_cast5_module_LINK = $(CCLD) $(gcry_cast5_module_CFLAGS) $(CFLAGS) \
+ $(gcry_cast5_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_crc_module_SOURCES_DIST = lib/libgcrypt-grub/cipher/crc.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_crc_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+nodist_gcry_crc_module_OBJECTS =
+gcry_crc_module_OBJECTS = $(am_gcry_crc_module_OBJECTS) \
+ $(nodist_gcry_crc_module_OBJECTS)
+gcry_crc_module_DEPENDENCIES =
+gcry_crc_module_LINK = $(CCLD) $(gcry_crc_module_CFLAGS) $(CFLAGS) \
+ $(gcry_crc_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_des_module_SOURCES_DIST = lib/libgcrypt-grub/cipher/des.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_des_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+nodist_gcry_des_module_OBJECTS =
+gcry_des_module_OBJECTS = $(am_gcry_des_module_OBJECTS) \
+ $(nodist_gcry_des_module_OBJECTS)
+gcry_des_module_DEPENDENCIES =
+gcry_des_module_LINK = $(CCLD) $(gcry_des_module_CFLAGS) $(CFLAGS) \
+ $(gcry_des_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_md4_module_SOURCES_DIST = lib/libgcrypt-grub/cipher/md4.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_md4_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+nodist_gcry_md4_module_OBJECTS =
+gcry_md4_module_OBJECTS = $(am_gcry_md4_module_OBJECTS) \
+ $(nodist_gcry_md4_module_OBJECTS)
+gcry_md4_module_DEPENDENCIES =
+gcry_md4_module_LINK = $(CCLD) $(gcry_md4_module_CFLAGS) $(CFLAGS) \
+ $(gcry_md4_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_md5_module_SOURCES_DIST = lib/libgcrypt-grub/cipher/md5.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_md5_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+nodist_gcry_md5_module_OBJECTS =
+gcry_md5_module_OBJECTS = $(am_gcry_md5_module_OBJECTS) \
+ $(nodist_gcry_md5_module_OBJECTS)
+gcry_md5_module_DEPENDENCIES =
+gcry_md5_module_LINK = $(CCLD) $(gcry_md5_module_CFLAGS) $(CFLAGS) \
+ $(gcry_md5_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_rfc2268_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/rfc2268.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_rfc2268_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+nodist_gcry_rfc2268_module_OBJECTS =
+gcry_rfc2268_module_OBJECTS = $(am_gcry_rfc2268_module_OBJECTS) \
+ $(nodist_gcry_rfc2268_module_OBJECTS)
+gcry_rfc2268_module_DEPENDENCIES =
+gcry_rfc2268_module_LINK = $(CCLD) $(gcry_rfc2268_module_CFLAGS) \
+ $(CFLAGS) $(gcry_rfc2268_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_rijndael_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/rijndael.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_rijndael_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+nodist_gcry_rijndael_module_OBJECTS =
+gcry_rijndael_module_OBJECTS = $(am_gcry_rijndael_module_OBJECTS) \
+ $(nodist_gcry_rijndael_module_OBJECTS)
+gcry_rijndael_module_DEPENDENCIES =
+gcry_rijndael_module_LINK = $(CCLD) $(gcry_rijndael_module_CFLAGS) \
+ $(CFLAGS) $(gcry_rijndael_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_rmd160_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/rmd160.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_rmd160_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+nodist_gcry_rmd160_module_OBJECTS =
+gcry_rmd160_module_OBJECTS = $(am_gcry_rmd160_module_OBJECTS) \
+ $(nodist_gcry_rmd160_module_OBJECTS)
+gcry_rmd160_module_DEPENDENCIES =
+gcry_rmd160_module_LINK = $(CCLD) $(gcry_rmd160_module_CFLAGS) \
+ $(CFLAGS) $(gcry_rmd160_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_seed_module_SOURCES_DIST = lib/libgcrypt-grub/cipher/seed.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_seed_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+nodist_gcry_seed_module_OBJECTS =
+gcry_seed_module_OBJECTS = $(am_gcry_seed_module_OBJECTS) \
+ $(nodist_gcry_seed_module_OBJECTS)
+gcry_seed_module_DEPENDENCIES =
+gcry_seed_module_LINK = $(CCLD) $(gcry_seed_module_CFLAGS) $(CFLAGS) \
+ $(gcry_seed_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_serpent_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/serpent.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_serpent_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+nodist_gcry_serpent_module_OBJECTS =
+gcry_serpent_module_OBJECTS = $(am_gcry_serpent_module_OBJECTS) \
+ $(nodist_gcry_serpent_module_OBJECTS)
+gcry_serpent_module_DEPENDENCIES =
+gcry_serpent_module_LINK = $(CCLD) $(gcry_serpent_module_CFLAGS) \
+ $(CFLAGS) $(gcry_serpent_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_sha1_module_SOURCES_DIST = lib/libgcrypt-grub/cipher/sha1.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_sha1_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+nodist_gcry_sha1_module_OBJECTS =
+gcry_sha1_module_OBJECTS = $(am_gcry_sha1_module_OBJECTS) \
+ $(nodist_gcry_sha1_module_OBJECTS)
+gcry_sha1_module_DEPENDENCIES =
+gcry_sha1_module_LINK = $(CCLD) $(gcry_sha1_module_CFLAGS) $(CFLAGS) \
+ $(gcry_sha1_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_sha256_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/sha256.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_sha256_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+nodist_gcry_sha256_module_OBJECTS =
+gcry_sha256_module_OBJECTS = $(am_gcry_sha256_module_OBJECTS) \
+ $(nodist_gcry_sha256_module_OBJECTS)
+gcry_sha256_module_DEPENDENCIES =
+gcry_sha256_module_LINK = $(CCLD) $(gcry_sha256_module_CFLAGS) \
+ $(CFLAGS) $(gcry_sha256_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_sha512_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/sha512.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_sha512_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+nodist_gcry_sha512_module_OBJECTS =
+gcry_sha512_module_OBJECTS = $(am_gcry_sha512_module_OBJECTS) \
+ $(nodist_gcry_sha512_module_OBJECTS)
+gcry_sha512_module_DEPENDENCIES =
+gcry_sha512_module_LINK = $(CCLD) $(gcry_sha512_module_CFLAGS) \
+ $(CFLAGS) $(gcry_sha512_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_tiger_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/tiger.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_tiger_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+nodist_gcry_tiger_module_OBJECTS =
+gcry_tiger_module_OBJECTS = $(am_gcry_tiger_module_OBJECTS) \
+ $(nodist_gcry_tiger_module_OBJECTS)
+gcry_tiger_module_DEPENDENCIES =
+gcry_tiger_module_LINK = $(CCLD) $(gcry_tiger_module_CFLAGS) $(CFLAGS) \
+ $(gcry_tiger_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_twofish_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/twofish.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_twofish_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+nodist_gcry_twofish_module_OBJECTS =
+gcry_twofish_module_OBJECTS = $(am_gcry_twofish_module_OBJECTS) \
+ $(nodist_gcry_twofish_module_OBJECTS)
+gcry_twofish_module_DEPENDENCIES =
+gcry_twofish_module_LINK = $(CCLD) $(gcry_twofish_module_CFLAGS) \
+ $(CFLAGS) $(gcry_twofish_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gcry_whirlpool_module_SOURCES_DIST = \
+ lib/libgcrypt-grub/cipher/whirlpool.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+@COND_emu_TRUE@am_gcry_whirlpool_module_OBJECTS = lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+nodist_gcry_whirlpool_module_OBJECTS =
+gcry_whirlpool_module_OBJECTS = $(am_gcry_whirlpool_module_OBJECTS) \
+ $(nodist_gcry_whirlpool_module_OBJECTS)
+gcry_whirlpool_module_DEPENDENCIES =
+gcry_whirlpool_module_LINK = $(CCLD) $(gcry_whirlpool_module_CFLAGS) \
+ $(CFLAGS) $(gcry_whirlpool_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gettext_module_SOURCES_DIST = gettext/gettext.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gettext_module_OBJECTS = gettext/gettext_module-gettext.$(OBJEXT)
+@COND_emu_TRUE@am_gettext_module_OBJECTS = \
+@COND_emu_TRUE@ gettext/gettext_module-gettext.$(OBJEXT)
+nodist_gettext_module_OBJECTS =
+gettext_module_OBJECTS = $(am_gettext_module_OBJECTS) \
+ $(nodist_gettext_module_OBJECTS)
+gettext_module_DEPENDENCIES =
+gettext_module_LINK = $(CCLD) $(gettext_module_CFLAGS) $(CFLAGS) \
+ $(gettext_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gfxmenu_module_SOURCES_DIST = gfxmenu/gfxmenu.c gfxmenu/model.c \
+ gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c \
+ gfxmenu/theme_loader.c gfxmenu/widget-box.c \
+ gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c \
+ gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c \
+ gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c \
+ gfxmenu/gui_util.c gfxmenu/gui_string_util.c \
+ gfxmenu/named_colors.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gfxmenu_module_OBJECTS = gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+@COND_emu_TRUE@am_gfxmenu_module_OBJECTS = \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-model.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-view.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-font.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-widget-box.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_box.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_label.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_list.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_image.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_util.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT) \
+@COND_emu_TRUE@ gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+nodist_gfxmenu_module_OBJECTS =
+gfxmenu_module_OBJECTS = $(am_gfxmenu_module_OBJECTS) \
+ $(nodist_gfxmenu_module_OBJECTS)
+gfxmenu_module_DEPENDENCIES =
+gfxmenu_module_LINK = $(CCLD) $(gfxmenu_module_CFLAGS) $(CFLAGS) \
+ $(gfxmenu_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gfxterm_module_SOURCES_DIST = term/gfxterm.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gfxterm_module_OBJECTS = term/gfxterm_module-gfxterm.$(OBJEXT)
+@COND_emu_TRUE@am_gfxterm_module_OBJECTS = \
+@COND_emu_TRUE@ term/gfxterm_module-gfxterm.$(OBJEXT)
+nodist_gfxterm_module_OBJECTS =
+gfxterm_module_OBJECTS = $(am_gfxterm_module_OBJECTS) \
+ $(nodist_gfxterm_module_OBJECTS)
+gfxterm_module_DEPENDENCIES =
+gfxterm_module_LINK = $(CCLD) $(gfxterm_module_CFLAGS) $(CFLAGS) \
+ $(gfxterm_module_LDFLAGS) $(LDFLAGS) -o $@
+am__gptsync_module_SOURCES_DIST = commands/gptsync.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gptsync_module_OBJECTS = commands/gptsync_module-gptsync.$(OBJEXT)
+@COND_emu_TRUE@am_gptsync_module_OBJECTS = \
+@COND_emu_TRUE@ commands/gptsync_module-gptsync.$(OBJEXT)
+nodist_gptsync_module_OBJECTS =
+gptsync_module_OBJECTS = $(am_gptsync_module_OBJECTS) \
+ $(nodist_gptsync_module_OBJECTS)
+gptsync_module_DEPENDENCIES =
+gptsync_module_LINK = $(CCLD) $(gptsync_module_CFLAGS) $(CFLAGS) \
+ $(gptsync_module_LDFLAGS) $(LDFLAGS) -o $@
+am__grub_emu_SOURCES_DIST = kern/emu/full.c
+@COND_emu_TRUE@am_grub_emu_OBJECTS = kern/emu/grub_emu-full.$(OBJEXT)
+@COND_emu_TRUE@nodist_grub_emu_OBJECTS = \
+@COND_emu_TRUE@ grub_emu-grub_emu_init.$(OBJEXT)
+grub_emu_OBJECTS = $(am_grub_emu_OBJECTS) $(nodist_grub_emu_OBJECTS)
+am__DEPENDENCIES_1 =
+@COND_emu_TRUE@grub_emu_DEPENDENCIES = kernel.img$(EXEEXT) \
+@COND_emu_TRUE@ $(MODULE_FILES) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+grub_emu_LINK = $(CCLD) $(grub_emu_CFLAGS) $(CFLAGS) \
+ $(grub_emu_LDFLAGS) $(LDFLAGS) -o $@
+am__grub_emu_lite_SOURCES_DIST = kern/emu/lite.c
+@COND_emu_TRUE@am_grub_emu_lite_OBJECTS = \
+@COND_emu_TRUE@ kern/emu/grub_emu_lite-lite.$(OBJEXT)
+@COND_emu_TRUE@nodist_grub_emu_lite_OBJECTS = \
+@COND_emu_TRUE@ grub_emu_lite-symlist.$(OBJEXT)
+grub_emu_lite_OBJECTS = $(am_grub_emu_lite_OBJECTS) \
+ $(nodist_grub_emu_lite_OBJECTS)
+@COND_emu_TRUE@grub_emu_lite_DEPENDENCIES = kernel.img$(EXEEXT) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+@COND_emu_TRUE@ $(am__DEPENDENCIES_1)
+grub_emu_lite_LINK = $(CCLD) $(grub_emu_lite_CFLAGS) $(CFLAGS) \
+ $(grub_emu_lite_LDFLAGS) $(LDFLAGS) -o $@
+am__gzio_module_SOURCES_DIST = io/gzio.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+@COND_emu_TRUE@am_gzio_module_OBJECTS = io/gzio_module-gzio.$(OBJEXT)
+nodist_gzio_module_OBJECTS =
+gzio_module_OBJECTS = $(am_gzio_module_OBJECTS) \
+ $(nodist_gzio_module_OBJECTS)
+gzio_module_DEPENDENCIES =
+gzio_module_LINK = $(CCLD) $(gzio_module_CFLAGS) $(CFLAGS) \
+ $(gzio_module_LDFLAGS) $(LDFLAGS) -o $@
+am__halt_module_SOURCES_DIST = lib/emu/halt.c commands/halt.c \
+ commands/acpihalt.c lib/i386/halt.c lib/efi/halt.c \
+ lib/ieee1275/halt.c commands/i386/pc/halt.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_halt_module_OBJECTS = commands/halt_module-acpihalt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/efi/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_halt_module_OBJECTS = lib/ieee1275/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_halt_module_OBJECTS = lib/ieee1275/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_halt_module_OBJECTS = commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_halt_module_OBJECTS = lib/i386/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_halt_module_OBJECTS = commands/i386/pc/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ commands/halt_module-acpihalt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_halt_module_OBJECTS = commands/halt_module-acpihalt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/i386/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_halt_module_OBJECTS = lib/ieee1275/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_halt_module_OBJECTS = commands/halt_module-acpihalt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/efi/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_halt_module_OBJECTS = commands/halt_module-acpihalt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/i386/halt_module-halt.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ commands/halt_module-halt.$(OBJEXT)
+@COND_emu_TRUE@am_halt_module_OBJECTS = \
+@COND_emu_TRUE@ lib/emu/halt_module-halt.$(OBJEXT) \
+@COND_emu_TRUE@ commands/halt_module-halt.$(OBJEXT)
+nodist_halt_module_OBJECTS =
+halt_module_OBJECTS = $(am_halt_module_OBJECTS) \
+ $(nodist_halt_module_OBJECTS)
+halt_module_DEPENDENCIES =
+halt_module_LINK = $(CCLD) $(halt_module_CFLAGS) $(CFLAGS) \
+ $(halt_module_LDFLAGS) $(LDFLAGS) -o $@
+am__hashsum_module_SOURCES_DIST = commands/hashsum.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_hashsum_module_OBJECTS = commands/hashsum_module-hashsum.$(OBJEXT)
+@COND_emu_TRUE@am_hashsum_module_OBJECTS = \
+@COND_emu_TRUE@ commands/hashsum_module-hashsum.$(OBJEXT)
+nodist_hashsum_module_OBJECTS =
+hashsum_module_OBJECTS = $(am_hashsum_module_OBJECTS) \
+ $(nodist_hashsum_module_OBJECTS)
+hashsum_module_DEPENDENCIES =
+hashsum_module_LINK = $(CCLD) $(hashsum_module_CFLAGS) $(CFLAGS) \
+ $(hashsum_module_LDFLAGS) $(LDFLAGS) -o $@
+am__hdparm_module_SOURCES_DIST = commands/hdparm.c lib/hexdump.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_hdparm_module_OBJECTS = commands/hdparm_module-hdparm.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ lib/hdparm_module-hexdump.$(OBJEXT)
+nodist_hdparm_module_OBJECTS =
+hdparm_module_OBJECTS = $(am_hdparm_module_OBJECTS) \
+ $(nodist_hdparm_module_OBJECTS)
+hdparm_module_DEPENDENCIES =
+hdparm_module_LINK = $(CCLD) $(hdparm_module_CFLAGS) $(CFLAGS) \
+ $(hdparm_module_LDFLAGS) $(LDFLAGS) -o $@
+am__hello_module_SOURCES_DIST = hello/hello.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_hello_module_OBJECTS = hello/hello_module-hello.$(OBJEXT)
+@COND_emu_TRUE@am_hello_module_OBJECTS = \
+@COND_emu_TRUE@ hello/hello_module-hello.$(OBJEXT)
+nodist_hello_module_OBJECTS =
+hello_module_OBJECTS = $(am_hello_module_OBJECTS) \
+ $(nodist_hello_module_OBJECTS)
+hello_module_DEPENDENCIES =
+hello_module_LINK = $(CCLD) $(hello_module_CFLAGS) $(CFLAGS) \
+ $(hello_module_LDFLAGS) $(LDFLAGS) -o $@
+am__help_module_SOURCES_DIST = commands/help.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_help_module_OBJECTS = commands/help_module-help.$(OBJEXT)
+@COND_emu_TRUE@am_help_module_OBJECTS = \
+@COND_emu_TRUE@ commands/help_module-help.$(OBJEXT)
+nodist_help_module_OBJECTS =
+help_module_OBJECTS = $(am_help_module_OBJECTS) \
+ $(nodist_help_module_OBJECTS)
+help_module_DEPENDENCIES =
+help_module_LINK = $(CCLD) $(help_module_CFLAGS) $(CFLAGS) \
+ $(help_module_LDFLAGS) $(LDFLAGS) -o $@
+am__hexdump_module_SOURCES_DIST = commands/hexdump.c lib/hexdump.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_hexdump_module_OBJECTS = commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+@COND_emu_TRUE@am_hexdump_module_OBJECTS = \
+@COND_emu_TRUE@ commands/hexdump_module-hexdump.$(OBJEXT) \
+@COND_emu_TRUE@ lib/hexdump_module-hexdump.$(OBJEXT)
+nodist_hexdump_module_OBJECTS =
+hexdump_module_OBJECTS = $(am_hexdump_module_OBJECTS) \
+ $(nodist_hexdump_module_OBJECTS)
+hexdump_module_DEPENDENCIES =
+hexdump_module_LINK = $(CCLD) $(hexdump_module_CFLAGS) $(CFLAGS) \
+ $(hexdump_module_LDFLAGS) $(LDFLAGS) -o $@
+am__hfs_module_SOURCES_DIST = fs/hfs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+@COND_emu_TRUE@am_hfs_module_OBJECTS = fs/hfs_module-hfs.$(OBJEXT)
+nodist_hfs_module_OBJECTS =
+hfs_module_OBJECTS = $(am_hfs_module_OBJECTS) \
+ $(nodist_hfs_module_OBJECTS)
+hfs_module_DEPENDENCIES =
+hfs_module_LINK = $(CCLD) $(hfs_module_CFLAGS) $(CFLAGS) \
+ $(hfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__hfsplus_module_SOURCES_DIST = fs/hfsplus.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_hfsplus_module_OBJECTS = fs/hfsplus_module-hfsplus.$(OBJEXT)
+@COND_emu_TRUE@am_hfsplus_module_OBJECTS = \
+@COND_emu_TRUE@ fs/hfsplus_module-hfsplus.$(OBJEXT)
+nodist_hfsplus_module_OBJECTS =
+hfsplus_module_OBJECTS = $(am_hfsplus_module_OBJECTS) \
+ $(nodist_hfsplus_module_OBJECTS)
+hfsplus_module_DEPENDENCIES =
+hfsplus_module_LINK = $(CCLD) $(hfsplus_module_CFLAGS) $(CFLAGS) \
+ $(hfsplus_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ieee1275_fb_module_SOURCES_DIST = video/ieee1275.c
+@COND_powerpc_ieee1275_TRUE@am_ieee1275_fb_module_OBJECTS = video/ieee1275_fb_module-ieee1275.$(OBJEXT)
+nodist_ieee1275_fb_module_OBJECTS =
+ieee1275_fb_module_OBJECTS = $(am_ieee1275_fb_module_OBJECTS) \
+ $(nodist_ieee1275_fb_module_OBJECTS)
+ieee1275_fb_module_DEPENDENCIES =
+ieee1275_fb_module_LINK = $(CCLD) $(ieee1275_fb_module_CFLAGS) \
+ $(CFLAGS) $(ieee1275_fb_module_LDFLAGS) $(LDFLAGS) -o $@
+am__iorw_module_SOURCES_DIST = commands/iorw.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_iorw_module_OBJECTS = commands/iorw_module-iorw.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_iorw_module_OBJECTS = commands/iorw_module-iorw.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_iorw_module_OBJECTS = commands/iorw_module-iorw.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_iorw_module_OBJECTS = commands/iorw_module-iorw.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_iorw_module_OBJECTS = commands/iorw_module-iorw.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_iorw_module_OBJECTS = commands/iorw_module-iorw.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_iorw_module_OBJECTS = \
+@COND_i386_coreboot_TRUE@ commands/iorw_module-iorw.$(OBJEXT)
+nodist_iorw_module_OBJECTS =
+iorw_module_OBJECTS = $(am_iorw_module_OBJECTS) \
+ $(nodist_iorw_module_OBJECTS)
+iorw_module_DEPENDENCIES =
+iorw_module_LINK = $(CCLD) $(iorw_module_CFLAGS) $(CFLAGS) \
+ $(iorw_module_LDFLAGS) $(LDFLAGS) -o $@
+am__iso9660_module_SOURCES_DIST = fs/iso9660.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_iso9660_module_OBJECTS = fs/iso9660_module-iso9660.$(OBJEXT)
+@COND_emu_TRUE@am_iso9660_module_OBJECTS = \
+@COND_emu_TRUE@ fs/iso9660_module-iso9660.$(OBJEXT)
+nodist_iso9660_module_OBJECTS =
+iso9660_module_OBJECTS = $(am_iso9660_module_OBJECTS) \
+ $(nodist_iso9660_module_OBJECTS)
+iso9660_module_DEPENDENCIES =
+iso9660_module_LINK = $(CCLD) $(iso9660_module_CFLAGS) $(CFLAGS) \
+ $(iso9660_module_LDFLAGS) $(LDFLAGS) -o $@
+am__jfs_module_SOURCES_DIST = fs/jfs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+@COND_emu_TRUE@am_jfs_module_OBJECTS = fs/jfs_module-jfs.$(OBJEXT)
+nodist_jfs_module_OBJECTS =
+jfs_module_OBJECTS = $(am_jfs_module_OBJECTS) \
+ $(nodist_jfs_module_OBJECTS)
+jfs_module_DEPENDENCIES =
+jfs_module_LINK = $(CCLD) $(jfs_module_CFLAGS) $(CFLAGS) \
+ $(jfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__jpeg_module_SOURCES_DIST = video/readers/jpeg.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_jpeg_module_OBJECTS = video/readers/jpeg_module-jpeg.$(OBJEXT)
+@COND_emu_TRUE@am_jpeg_module_OBJECTS = \
+@COND_emu_TRUE@ video/readers/jpeg_module-jpeg.$(OBJEXT)
+nodist_jpeg_module_OBJECTS =
+jpeg_module_OBJECTS = $(am_jpeg_module_OBJECTS) \
+ $(nodist_jpeg_module_OBJECTS)
+jpeg_module_DEPENDENCIES =
+jpeg_module_LINK = $(CCLD) $(jpeg_module_CFLAGS) $(CFLAGS) \
+ $(jpeg_module_LDFLAGS) $(LDFLAGS) -o $@
+am__kernel_exec_SOURCES_DIST = disk/host.c gnulib/progname.c \
+ gnulib/error.c kern/emu/cache.S kern/emu/console.c \
+ kern/emu/getroot.c kern/emu/hostdisk.c kern/emu/hostfs.c \
+ kern/emu/main.c kern/emu/misc.c kern/emu/mm.c kern/emu/time.c \
+ kern/command.c kern/corecmd.c kern/device.c kern/disk.c \
+ kern/dl.c kern/env.c kern/err.c kern/file.c kern/fs.c \
+ kern/list.c kern/main.c kern/misc.c kern/parser.c \
+ kern/partition.c kern/rescue_parser.c kern/rescue_reader.c \
+ kern/term.c kern/i386/coreboot/startup.S \
+ kern/generic/rtc_get_time_ms.c kern/i386/coreboot/mmap.c \
+ kern/i386/tsc.c kern/i386/coreboot/init.c \
+ term/i386/pc/vga_text.c term/i386/vga_common.c kern/i386/dl.c \
+ kern/i386/pit.c kern/mm.c kern/time.c \
+ kern/generic/millisleep.c kern/i386/efi/startup.S \
+ disk/efi/efidisk.c kern/efi/efi.c kern/efi/init.c \
+ kern/efi/mm.c kern/i386/efi/init.c term/efi/console.c \
+ kern/i386/ieee1275/startup.S kern/ieee1275/init.c \
+ disk/ieee1275/ofdisk.c kern/ieee1275/cmain.c \
+ kern/ieee1275/ieee1275.c kern/ieee1275/mmap.c \
+ kern/ieee1275/openfw.c term/ieee1275/ofconsole.c \
+ term/terminfo.c term/tparm.c commands/extcmd.c lib/arg.c \
+ kern/i386/multiboot_mmap.c kern/i386/pc/startup.S \
+ kern/i386/pc/init.c kern/i386/pc/mmap.c term/i386/pc/console.c \
+ kern/i386/qemu/startup.S bus/pci.c kern/i386/qemu/init.c \
+ kern/i386/qemu/mmap.c kern/mips/startup.S term/ns8250.c \
+ bus/bonito.c bus/cs5536.c kern/mips/cache.S kern/mips/dl.c \
+ kern/mips/init.c kern/mips/yeeloong/init.c term/at_keyboard.c \
+ term/serial.c video/sm712.c commands/keylayouts.c \
+ term/gfxterm.c font/font.c font/font_cmd.c io/bufio.c \
+ video/bitmap.c video/bitmap_scale.c video/fb/fbblit.c \
+ video/fb/fbfill.c video/fb/fbutil.c video/fb/video_fb.c \
+ video/video.c commands/boot.c kern/powerpc/ieee1275/startup.S \
+ kern/powerpc/cache.S kern/powerpc/dl.c \
+ kern/sparc64/ieee1275/crt0.S kern/sparc64/cache.S \
+ kern/sparc64/dl.c kern/sparc64/ieee1275/ieee1275.c \
+ kern/sparc64/ieee1275/init.c kern/x86_64/efi/startup.S \
+ kern/x86_64/dl.c kern/x86_64/efi/callwrap.S
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_kernel_exec_OBJECTS = kern/x86_64/efi/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/i386/kernel_exec-tsc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/x86_64/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/x86_64/efi/kernel_exec-callwrap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ disk/efi/kernel_exec-efidisk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/efi/kernel_exec-efi.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/efi/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/efi/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/i386/efi/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ term/efi/kernel_exec-console.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/i386/kernel_exec-pit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_kernel_exec_OBJECTS = kern/sparc64/ieee1275/kernel_exec-crt0.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/sparc64/kernel_exec-cache.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/sparc64/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/sparc64/ieee1275/kernel_exec-ieee1275.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/sparc64/ieee1275/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ disk/ieee1275/kernel_exec-ofdisk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/kernel_exec-cmain.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/kernel_exec-ieee1275.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/kernel_exec-mmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/kernel_exec-openfw.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ term/ieee1275/kernel_exec-ofconsole.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ term/kernel_exec-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ term/kernel_exec-tparm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ commands/kernel_exec-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/kernel_exec-arg.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_kernel_exec_OBJECTS = kern/powerpc/ieee1275/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/powerpc/kernel_exec-cache.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/powerpc/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ disk/ieee1275/kernel_exec-ofdisk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/kernel_exec-cmain.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/kernel_exec-ieee1275.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/kernel_exec-mmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/kernel_exec-openfw.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ term/ieee1275/kernel_exec-ofconsole.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ term/kernel_exec-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ term/kernel_exec-tparm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ commands/kernel_exec-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/kernel_exec-arg.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_kernel_exec_OBJECTS = kern/mips/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ term/kernel_exec-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ bus/kernel_exec-bonito.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ bus/kernel_exec-cs5536.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ bus/kernel_exec-pci.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/mips/kernel_exec-cache.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/mips/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/mips/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/mips/yeeloong/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ term/kernel_exec-at_keyboard.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ term/kernel_exec-serial.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/kernel_exec-sm712.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ commands/kernel_exec-keylayouts.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ term/kernel_exec-gfxterm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ font/kernel_exec-font.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ font/kernel_exec-font_cmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ io/kernel_exec-bufio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/kernel_exec-bitmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/kernel_exec-bitmap_scale.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/fb/kernel_exec-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/fb/kernel_exec-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/fb/kernel_exec-fbutil.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/fb/kernel_exec-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ video/kernel_exec-video.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ commands/kernel_exec-boot.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ term/kernel_exec-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ term/kernel_exec-tparm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ commands/kernel_exec-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/kernel_exec-arg.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_kernel_exec_OBJECTS = kern/i386/qemu/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ bus/kernel_exec-pci.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/i386/qemu/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/i386/qemu/kernel_exec-mmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/i386/kernel_exec-tsc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/i386/coreboot/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ term/i386/pc/kernel_exec-vga_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ term/i386/kernel_exec-vga_common.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/i386/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/i386/kernel_exec-pit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_kernel_exec_OBJECTS = kern/i386/pc/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ term/i386/kernel_exec-vga_common.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/i386/pc/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/i386/pc/kernel_exec-mmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/i386/kernel_exec-tsc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ term/i386/pc/kernel_exec-console.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/i386/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/i386/kernel_exec-pit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_kernel_exec_OBJECTS = kern/i386/coreboot/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/i386/kernel_exec-multiboot_mmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/i386/kernel_exec-tsc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/i386/coreboot/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ term/i386/pc/kernel_exec-vga_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ term/i386/kernel_exec-vga_common.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/i386/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/i386/kernel_exec-pit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_kernel_exec_OBJECTS = kern/i386/ieee1275/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/ieee1275/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ disk/ieee1275/kernel_exec-ofdisk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/ieee1275/kernel_exec-cmain.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/ieee1275/kernel_exec-ieee1275.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/ieee1275/kernel_exec-mmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/ieee1275/kernel_exec-openfw.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ term/ieee1275/kernel_exec-ofconsole.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ term/kernel_exec-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ term/kernel_exec-tparm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ commands/kernel_exec-extcmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/kernel_exec-arg.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/i386/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/i386/kernel_exec-pit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_kernel_exec_OBJECTS = kern/i386/efi/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/i386/kernel_exec-tsc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ disk/efi/kernel_exec-efidisk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/efi/kernel_exec-efi.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/efi/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/efi/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/i386/efi/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ term/efi/kernel_exec-console.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/i386/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/i386/kernel_exec-pit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_kernel_exec_OBJECTS = kern/i386/coreboot/kernel_exec-startup.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/i386/coreboot/kernel_exec-mmap.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/i386/kernel_exec-tsc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/i386/coreboot/kernel_exec-init.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ term/i386/pc/kernel_exec-vga_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ term/i386/kernel_exec-vga_common.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/i386/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/i386/kernel_exec-pit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-time.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/generic/kernel_exec-millisleep.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_emu_TRUE@am_kernel_exec_OBJECTS = \
+@COND_emu_TRUE@ disk/kernel_exec-host.$(OBJEXT) \
+@COND_emu_TRUE@ gnulib/kernel_exec-progname.$(OBJEXT) \
+@COND_emu_TRUE@ gnulib/kernel_exec-error.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-cache.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-console.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-getroot.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-hostdisk.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-hostfs.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-main.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-mm.$(OBJEXT) \
+@COND_emu_TRUE@ kern/emu/kernel_exec-time.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-command.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-corecmd.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-device.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-disk.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-dl.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-env.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-err.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-file.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-fs.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-list.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-main.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-misc.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-parser.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-partition.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-rescue_parser.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-rescue_reader.$(OBJEXT) \
+@COND_emu_TRUE@ kern/kernel_exec-term.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@nodist_kernel_exec_OBJECTS = kernel_exec-symlist.$(OBJEXT)
+@COND_i386_coreboot_TRUE@nodist_kernel_exec_OBJECTS = \
+@COND_i386_coreboot_TRUE@ kernel_exec-symlist.$(OBJEXT)
+kernel_exec_OBJECTS = $(am_kernel_exec_OBJECTS) \
+ $(nodist_kernel_exec_OBJECTS)
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+@COND_emu_TRUE@kernel_exec_DEPENDENCIES = $(am__DEPENDENCIES_2)
+kernel_exec_LINK = $(CCLD) $(kernel_exec_CFLAGS) $(CFLAGS) \
+ $(kernel_exec_LDFLAGS) $(LDFLAGS) -o $@
+am__keylayouts_module_SOURCES_DIST = commands/keylayouts.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+@COND_emu_TRUE@am_keylayouts_module_OBJECTS = commands/keylayouts_module-keylayouts.$(OBJEXT)
+nodist_keylayouts_module_OBJECTS =
+keylayouts_module_OBJECTS = $(am_keylayouts_module_OBJECTS) \
+ $(nodist_keylayouts_module_OBJECTS)
+keylayouts_module_DEPENDENCIES =
+keylayouts_module_LINK = $(CCLD) $(keylayouts_module_CFLAGS) $(CFLAGS) \
+ $(keylayouts_module_LDFLAGS) $(LDFLAGS) -o $@
+am__keystatus_module_SOURCES_DIST = commands/keystatus.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_keystatus_module_OBJECTS = commands/keystatus_module-keystatus.$(OBJEXT)
+@COND_emu_TRUE@am_keystatus_module_OBJECTS = \
+@COND_emu_TRUE@ commands/keystatus_module-keystatus.$(OBJEXT)
+nodist_keystatus_module_OBJECTS =
+keystatus_module_OBJECTS = $(am_keystatus_module_OBJECTS) \
+ $(nodist_keystatus_module_OBJECTS)
+keystatus_module_DEPENDENCIES =
+keystatus_module_LINK = $(CCLD) $(keystatus_module_CFLAGS) $(CFLAGS) \
+ $(keystatus_module_LDFLAGS) $(LDFLAGS) -o $@
+am__legacycfg_module_SOURCES_DIST = lib/i386/pc/vesa_modes_table.c \
+ commands/legacycfg.c lib/legacy_parse.c
+@COND_emu_FALSE@@COND_i386_pc_TRUE@am_legacycfg_module_OBJECTS = commands/legacycfg_module-legacycfg.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_pc_TRUE@ lib/legacycfg_module-legacy_parse.$(OBJEXT)
+@COND_emu_TRUE@am_legacycfg_module_OBJECTS = lib/i386/pc/legacycfg_module-vesa_modes_table.$(OBJEXT) \
+@COND_emu_TRUE@ commands/legacycfg_module-legacycfg.$(OBJEXT) \
+@COND_emu_TRUE@ lib/legacycfg_module-legacy_parse.$(OBJEXT)
+nodist_legacycfg_module_OBJECTS =
+legacycfg_module_OBJECTS = $(am_legacycfg_module_OBJECTS) \
+ $(nodist_legacycfg_module_OBJECTS)
+legacycfg_module_DEPENDENCIES =
+legacycfg_module_LINK = $(CCLD) $(legacycfg_module_CFLAGS) $(CFLAGS) \
+ $(legacycfg_module_LDFLAGS) $(LDFLAGS) -o $@
+am__libusb_module_SOURCES_DIST = bus/usb/emu/usb.c
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am_libusb_module_OBJECTS = bus/usb/emu/libusb_module-usb.$(OBJEXT)
+nodist_libusb_module_OBJECTS =
+libusb_module_OBJECTS = $(am_libusb_module_OBJECTS) \
+ $(nodist_libusb_module_OBJECTS)
+libusb_module_DEPENDENCIES =
+libusb_module_LINK = $(CCLD) $(libusb_module_CFLAGS) $(CFLAGS) \
+ $(libusb_module_LDFLAGS) $(LDFLAGS) -o $@
+am__linux_module_SOURCES_DIST = loader/i386/linux.c lib/cmdline.c \
+ lib/i386/pc/vesa_modes_table.c loader/mips/linux.c \
+ loader/powerpc/ieee1275/linux.c \
+ loader/sparc64/ieee1275/linux.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_linux_module_OBJECTS = loader/i386/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_linux_module_OBJECTS = loader/sparc64/ieee1275/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_linux_module_OBJECTS = loader/powerpc/ieee1275/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_linux_module_OBJECTS = loader/mips/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_linux_module_OBJECTS = loader/i386/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_linux_module_OBJECTS = lib/i386/pc/linux_module-vesa_modes_table.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/i386/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_linux_module_OBJECTS = loader/i386/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_linux_module_OBJECTS = loader/i386/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_linux_module_OBJECTS = loader/i386/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_linux_module_OBJECTS = loader/i386/linux_module-linux.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ lib/linux_module-cmdline.$(OBJEXT)
+nodist_linux_module_OBJECTS =
+linux_module_OBJECTS = $(am_linux_module_OBJECTS) \
+ $(nodist_linux_module_OBJECTS)
+linux_module_DEPENDENCIES =
+linux_module_LINK = $(CCLD) $(linux_module_CFLAGS) $(CFLAGS) \
+ $(linux_module_LDFLAGS) $(LDFLAGS) -o $@
+am__linux16_module_SOURCES_DIST = loader/i386/pc/linux.c lib/cmdline.c
+@COND_i386_pc_TRUE@am_linux16_module_OBJECTS = loader/i386/pc/linux16_module-linux.$(OBJEXT) \
+@COND_i386_pc_TRUE@ lib/linux16_module-cmdline.$(OBJEXT)
+nodist_linux16_module_OBJECTS =
+linux16_module_OBJECTS = $(am_linux16_module_OBJECTS) \
+ $(nodist_linux16_module_OBJECTS)
+linux16_module_DEPENDENCIES =
+linux16_module_LINK = $(CCLD) $(linux16_module_CFLAGS) $(CFLAGS) \
+ $(linux16_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lnxboot_image_SOURCES_DIST = boot/i386/pc/lnxboot.S
+@COND_i386_pc_TRUE@am_lnxboot_image_OBJECTS = boot/i386/pc/lnxboot_image-lnxboot.$(OBJEXT)
+nodist_lnxboot_image_OBJECTS =
+lnxboot_image_OBJECTS = $(am_lnxboot_image_OBJECTS) \
+ $(nodist_lnxboot_image_OBJECTS)
+lnxboot_image_DEPENDENCIES =
+lnxboot_image_LINK = $(CCLD) $(lnxboot_image_CFLAGS) $(CFLAGS) \
+ $(lnxboot_image_LDFLAGS) $(LDFLAGS) -o $@
+am__loadbios_module_SOURCES_DIST = commands/efi/loadbios.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_loadbios_module_OBJECTS = commands/efi/loadbios_module-loadbios.$(OBJEXT)
+@COND_i386_efi_TRUE@am_loadbios_module_OBJECTS = commands/efi/loadbios_module-loadbios.$(OBJEXT)
+nodist_loadbios_module_OBJECTS =
+loadbios_module_OBJECTS = $(am_loadbios_module_OBJECTS) \
+ $(nodist_loadbios_module_OBJECTS)
+loadbios_module_DEPENDENCIES =
+loadbios_module_LINK = $(CCLD) $(loadbios_module_CFLAGS) $(CFLAGS) \
+ $(loadbios_module_LDFLAGS) $(LDFLAGS) -o $@
+am__loadenv_module_SOURCES_DIST = commands/loadenv.c lib/envblk.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_loadenv_module_OBJECTS = commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+@COND_emu_TRUE@am_loadenv_module_OBJECTS = \
+@COND_emu_TRUE@ commands/loadenv_module-loadenv.$(OBJEXT) \
+@COND_emu_TRUE@ lib/loadenv_module-envblk.$(OBJEXT)
+nodist_loadenv_module_OBJECTS =
+loadenv_module_OBJECTS = $(am_loadenv_module_OBJECTS) \
+ $(nodist_loadenv_module_OBJECTS)
+loadenv_module_DEPENDENCIES =
+loadenv_module_LINK = $(CCLD) $(loadenv_module_CFLAGS) $(CFLAGS) \
+ $(loadenv_module_LDFLAGS) $(LDFLAGS) -o $@
+am__loopback_module_SOURCES_DIST = disk/loopback.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_loopback_module_OBJECTS = disk/loopback_module-loopback.$(OBJEXT)
+@COND_emu_TRUE@am_loopback_module_OBJECTS = \
+@COND_emu_TRUE@ disk/loopback_module-loopback.$(OBJEXT)
+nodist_loopback_module_OBJECTS =
+loopback_module_OBJECTS = $(am_loopback_module_OBJECTS) \
+ $(nodist_loopback_module_OBJECTS)
+loopback_module_DEPENDENCIES =
+loopback_module_LINK = $(CCLD) $(loopback_module_CFLAGS) $(CFLAGS) \
+ $(loopback_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ls_module_SOURCES_DIST = commands/ls.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+@COND_emu_TRUE@am_ls_module_OBJECTS = commands/ls_module-ls.$(OBJEXT)
+nodist_ls_module_OBJECTS =
+ls_module_OBJECTS = $(am_ls_module_OBJECTS) \
+ $(nodist_ls_module_OBJECTS)
+ls_module_DEPENDENCIES =
+ls_module_LINK = $(CCLD) $(ls_module_CFLAGS) $(CFLAGS) \
+ $(ls_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lsacpi_module_SOURCES_DIST = commands/lsacpi.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_x86_64_efi_TRUE@am_lsacpi_module_OBJECTS = commands/lsacpi_module-lsacpi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_lsacpi_module_OBJECTS = commands/lsacpi_module-lsacpi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_TRUE@am_lsacpi_module_OBJECTS = commands/lsacpi_module-lsacpi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_lsacpi_module_OBJECTS = commands/lsacpi_module-lsacpi.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_lsacpi_module_OBJECTS = commands/lsacpi_module-lsacpi.$(OBJEXT)
+nodist_lsacpi_module_OBJECTS =
+lsacpi_module_OBJECTS = $(am_lsacpi_module_OBJECTS) \
+ $(nodist_lsacpi_module_OBJECTS)
+lsacpi_module_DEPENDENCIES =
+lsacpi_module_LINK = $(CCLD) $(lsacpi_module_CFLAGS) $(CFLAGS) \
+ $(lsacpi_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lsapm_module_SOURCES_DIST = commands/i386/pc/lsapm.c
+@COND_i386_pc_TRUE@am_lsapm_module_OBJECTS = commands/i386/pc/lsapm_module-lsapm.$(OBJEXT)
+nodist_lsapm_module_OBJECTS =
+lsapm_module_OBJECTS = $(am_lsapm_module_OBJECTS) \
+ $(nodist_lsapm_module_OBJECTS)
+lsapm_module_DEPENDENCIES =
+lsapm_module_LINK = $(CCLD) $(lsapm_module_CFLAGS) $(CFLAGS) \
+ $(lsapm_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lsefimmap_module_SOURCES_DIST = commands/efi/lsefimmap.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_lsefimmap_module_OBJECTS = commands/efi/lsefimmap_module-lsefimmap.$(OBJEXT)
+@COND_i386_efi_TRUE@am_lsefimmap_module_OBJECTS = commands/efi/lsefimmap_module-lsefimmap.$(OBJEXT)
+nodist_lsefimmap_module_OBJECTS =
+lsefimmap_module_OBJECTS = $(am_lsefimmap_module_OBJECTS) \
+ $(nodist_lsefimmap_module_OBJECTS)
+lsefimmap_module_DEPENDENCIES =
+lsefimmap_module_LINK = $(CCLD) $(lsefimmap_module_CFLAGS) $(CFLAGS) \
+ $(lsefimmap_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lsefisystab_module_SOURCES_DIST = commands/efi/lsefisystab.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_lsefisystab_module_OBJECTS = commands/efi/lsefisystab_module-lsefisystab.$(OBJEXT)
+@COND_i386_efi_TRUE@am_lsefisystab_module_OBJECTS = commands/efi/lsefisystab_module-lsefisystab.$(OBJEXT)
+nodist_lsefisystab_module_OBJECTS =
+lsefisystab_module_OBJECTS = $(am_lsefisystab_module_OBJECTS) \
+ $(nodist_lsefisystab_module_OBJECTS)
+lsefisystab_module_DEPENDENCIES =
+lsefisystab_module_LINK = $(CCLD) $(lsefisystab_module_CFLAGS) \
+ $(CFLAGS) $(lsefisystab_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lsmmap_module_SOURCES_DIST = commands/lsmmap.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_lsmmap_module_OBJECTS = commands/lsmmap_module-lsmmap.$(OBJEXT)
+@COND_emu_TRUE@am_lsmmap_module_OBJECTS = \
+@COND_emu_TRUE@ commands/lsmmap_module-lsmmap.$(OBJEXT)
+nodist_lsmmap_module_OBJECTS =
+lsmmap_module_OBJECTS = $(am_lsmmap_module_OBJECTS) \
+ $(nodist_lsmmap_module_OBJECTS)
+lsmmap_module_DEPENDENCIES =
+lsmmap_module_LINK = $(CCLD) $(lsmmap_module_CFLAGS) $(CFLAGS) \
+ $(lsmmap_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lspci_module_SOURCES_DIST = commands/lspci.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_lspci_module_OBJECTS = commands/lspci_module-lspci.$(OBJEXT)
+nodist_lspci_module_OBJECTS =
+lspci_module_OBJECTS = $(am_lspci_module_OBJECTS) \
+ $(nodist_lspci_module_OBJECTS)
+lspci_module_DEPENDENCIES =
+lspci_module_LINK = $(CCLD) $(lspci_module_CFLAGS) $(CFLAGS) \
+ $(lspci_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lssal_module_SOURCES_DIST = commands/efi/lssal.c
+@COND_i386_efi_FALSE@@COND_x86_64_efi_TRUE@am_lssal_module_OBJECTS = commands/efi/lssal_module-lssal.$(OBJEXT)
+@COND_i386_efi_TRUE@am_lssal_module_OBJECTS = \
+@COND_i386_efi_TRUE@ commands/efi/lssal_module-lssal.$(OBJEXT)
+nodist_lssal_module_OBJECTS =
+lssal_module_OBJECTS = $(am_lssal_module_OBJECTS) \
+ $(nodist_lssal_module_OBJECTS)
+lssal_module_DEPENDENCIES =
+lssal_module_LINK = $(CCLD) $(lssal_module_CFLAGS) $(CFLAGS) \
+ $(lssal_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lsspd_module_SOURCES_DIST = commands/mips/yeeloong/lsspd.c
+@COND_mips_yeeloong_TRUE@am_lsspd_module_OBJECTS = commands/mips/yeeloong/lsspd_module-lsspd.$(OBJEXT)
+nodist_lsspd_module_OBJECTS =
+lsspd_module_OBJECTS = $(am_lsspd_module_OBJECTS) \
+ $(nodist_lsspd_module_OBJECTS)
+lsspd_module_DEPENDENCIES =
+lsspd_module_LINK = $(CCLD) $(lsspd_module_CFLAGS) $(CFLAGS) \
+ $(lsspd_module_LDFLAGS) $(LDFLAGS) -o $@
+am__lvm_module_SOURCES_DIST = disk/lvm.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+@COND_emu_TRUE@am_lvm_module_OBJECTS = disk/lvm_module-lvm.$(OBJEXT)
+nodist_lvm_module_OBJECTS =
+lvm_module_OBJECTS = $(am_lvm_module_OBJECTS) \
+ $(nodist_lvm_module_OBJECTS)
+lvm_module_DEPENDENCIES =
+lvm_module_LINK = $(CCLD) $(lvm_module_CFLAGS) $(CFLAGS) \
+ $(lvm_module_LDFLAGS) $(LDFLAGS) -o $@
+am__mdraid09_module_SOURCES_DIST = disk/mdraid_linux.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_mdraid09_module_OBJECTS = disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+@COND_emu_TRUE@am_mdraid09_module_OBJECTS = \
+@COND_emu_TRUE@ disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+nodist_mdraid09_module_OBJECTS =
+mdraid09_module_OBJECTS = $(am_mdraid09_module_OBJECTS) \
+ $(nodist_mdraid09_module_OBJECTS)
+mdraid09_module_DEPENDENCIES =
+mdraid09_module_LINK = $(CCLD) $(mdraid09_module_CFLAGS) $(CFLAGS) \
+ $(mdraid09_module_LDFLAGS) $(LDFLAGS) -o $@
+am__mdraid1x_module_SOURCES_DIST = disk/mdraid1x_linux.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_mdraid1x_module_OBJECTS = disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+@COND_emu_TRUE@am_mdraid1x_module_OBJECTS = \
+@COND_emu_TRUE@ disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+nodist_mdraid1x_module_OBJECTS =
+mdraid1x_module_OBJECTS = $(am_mdraid1x_module_OBJECTS) \
+ $(nodist_mdraid1x_module_OBJECTS)
+mdraid1x_module_DEPENDENCIES =
+mdraid1x_module_LINK = $(CCLD) $(mdraid1x_module_CFLAGS) $(CFLAGS) \
+ $(mdraid1x_module_LDFLAGS) $(LDFLAGS) -o $@
+am__memdisk_module_SOURCES_DIST = disk/memdisk.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_memdisk_module_OBJECTS = disk/memdisk_module-memdisk.$(OBJEXT)
+@COND_emu_TRUE@am_memdisk_module_OBJECTS = \
+@COND_emu_TRUE@ disk/memdisk_module-memdisk.$(OBJEXT)
+nodist_memdisk_module_OBJECTS =
+memdisk_module_OBJECTS = $(am_memdisk_module_OBJECTS) \
+ $(nodist_memdisk_module_OBJECTS)
+memdisk_module_DEPENDENCIES =
+memdisk_module_LINK = $(CCLD) $(memdisk_module_CFLAGS) $(CFLAGS) \
+ $(memdisk_module_LDFLAGS) $(LDFLAGS) -o $@
+am__memrw_module_SOURCES_DIST = commands/memrw.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_memrw_module_OBJECTS = commands/memrw_module-memrw.$(OBJEXT)
+@COND_emu_TRUE@am_memrw_module_OBJECTS = \
+@COND_emu_TRUE@ commands/memrw_module-memrw.$(OBJEXT)
+nodist_memrw_module_OBJECTS =
+memrw_module_OBJECTS = $(am_memrw_module_OBJECTS) \
+ $(nodist_memrw_module_OBJECTS)
+memrw_module_DEPENDENCIES =
+memrw_module_LINK = $(CCLD) $(memrw_module_CFLAGS) $(CFLAGS) \
+ $(memrw_module_LDFLAGS) $(LDFLAGS) -o $@
+am__minicmd_module_SOURCES_DIST = commands/minicmd.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_minicmd_module_OBJECTS = commands/minicmd_module-minicmd.$(OBJEXT)
+@COND_emu_TRUE@am_minicmd_module_OBJECTS = \
+@COND_emu_TRUE@ commands/minicmd_module-minicmd.$(OBJEXT)
+nodist_minicmd_module_OBJECTS =
+minicmd_module_OBJECTS = $(am_minicmd_module_OBJECTS) \
+ $(nodist_minicmd_module_OBJECTS)
+minicmd_module_DEPENDENCIES =
+minicmd_module_LINK = $(CCLD) $(minicmd_module_CFLAGS) $(CFLAGS) \
+ $(minicmd_module_LDFLAGS) $(LDFLAGS) -o $@
+am__minix_module_SOURCES_DIST = fs/minix.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_minix_module_OBJECTS = fs/minix_module-minix.$(OBJEXT)
+@COND_emu_TRUE@am_minix_module_OBJECTS = \
+@COND_emu_TRUE@ fs/minix_module-minix.$(OBJEXT)
+nodist_minix_module_OBJECTS =
+minix_module_OBJECTS = $(am_minix_module_OBJECTS) \
+ $(nodist_minix_module_OBJECTS)
+minix_module_DEPENDENCIES =
+minix_module_LINK = $(CCLD) $(minix_module_CFLAGS) $(CFLAGS) \
+ $(minix_module_LDFLAGS) $(LDFLAGS) -o $@
+am__minix2_module_SOURCES_DIST = fs/minix2.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_minix2_module_OBJECTS = fs/minix2_module-minix2.$(OBJEXT)
+@COND_emu_TRUE@am_minix2_module_OBJECTS = \
+@COND_emu_TRUE@ fs/minix2_module-minix2.$(OBJEXT)
+nodist_minix2_module_OBJECTS =
+minix2_module_OBJECTS = $(am_minix2_module_OBJECTS) \
+ $(nodist_minix2_module_OBJECTS)
+minix2_module_DEPENDENCIES =
+minix2_module_LINK = $(CCLD) $(minix2_module_CFLAGS) $(CFLAGS) \
+ $(minix2_module_LDFLAGS) $(LDFLAGS) -o $@
+am__mmap_module_SOURCES_DIST = mmap/i386/uppermem.c mmap/i386/mmap.c \
+ mmap/mmap.c mmap/efi/mmap.c mmap/i386/pc/mmap.c \
+ mmap/i386/pc/mmap_helper.S mmap/mips/yeeloong/uppermem.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_mmap_module_OBJECTS = mmap/efi/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ mmap/i386/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ mmap/i386/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_mmap_module_OBJECTS = mmap/mips/yeeloong/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_mmap_module_OBJECTS = mmap/i386/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ mmap/i386/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_mmap_module_OBJECTS = mmap/i386/pc/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ mmap/i386/pc/mmap_module-mmap_helper.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ mmap/i386/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ mmap/i386/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_mmap_module_OBJECTS = mmap/i386/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ mmap/i386/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_mmap_module_OBJECTS = mmap/i386/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ mmap/i386/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_mmap_module_OBJECTS = mmap/efi/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ mmap/i386/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ mmap/i386/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_mmap_module_OBJECTS = mmap/i386/mmap_module-uppermem.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ mmap/i386/mmap_module-mmap.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ mmap/mmap_module-mmap.$(OBJEXT)
+nodist_mmap_module_OBJECTS =
+mmap_module_OBJECTS = $(am_mmap_module_OBJECTS) \
+ $(nodist_mmap_module_OBJECTS)
+mmap_module_DEPENDENCIES =
+mmap_module_LINK = $(CCLD) $(mmap_module_CFLAGS) $(CFLAGS) \
+ $(mmap_module_LDFLAGS) $(LDFLAGS) -o $@
+am__msdospart_module_SOURCES_DIST = parttool/msdospart.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_msdospart_module_OBJECTS = parttool/msdospart_module-msdospart.$(OBJEXT)
+@COND_emu_TRUE@am_msdospart_module_OBJECTS = \
+@COND_emu_TRUE@ parttool/msdospart_module-msdospart.$(OBJEXT)
+nodist_msdospart_module_OBJECTS =
+msdospart_module_OBJECTS = $(am_msdospart_module_OBJECTS) \
+ $(nodist_msdospart_module_OBJECTS)
+msdospart_module_DEPENDENCIES =
+msdospart_module_LINK = $(CCLD) $(msdospart_module_CFLAGS) $(CFLAGS) \
+ $(msdospart_module_LDFLAGS) $(LDFLAGS) -o $@
+am__multiboot_module_SOURCES_DIST = loader/i386/multiboot_mbi.c \
+ loader/multiboot.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_multiboot_module_OBJECTS = loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/multiboot_module-multiboot.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_multiboot_module_OBJECTS = loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/multiboot_module-multiboot.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_multiboot_module_OBJECTS = loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/multiboot_module-multiboot.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_multiboot_module_OBJECTS = loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/multiboot_module-multiboot.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_multiboot_module_OBJECTS = loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/multiboot_module-multiboot.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_multiboot_module_OBJECTS = loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/multiboot_module-multiboot.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_multiboot_module_OBJECTS = loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/multiboot_module-multiboot.$(OBJEXT)
+nodist_multiboot_module_OBJECTS =
+multiboot_module_OBJECTS = $(am_multiboot_module_OBJECTS) \
+ $(nodist_multiboot_module_OBJECTS)
+multiboot_module_DEPENDENCIES =
+multiboot_module_LINK = $(CCLD) $(multiboot_module_CFLAGS) $(CFLAGS) \
+ $(multiboot_module_LDFLAGS) $(LDFLAGS) -o $@
+am__multiboot2_module_SOURCES_DIST = loader/multiboot.c \
+ loader/multiboot_mbi2.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_multiboot2_module_OBJECTS = loader/multiboot2_module-multiboot.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+nodist_multiboot2_module_OBJECTS =
+multiboot2_module_OBJECTS = $(am_multiboot2_module_OBJECTS) \
+ $(nodist_multiboot2_module_OBJECTS)
+multiboot2_module_DEPENDENCIES =
+multiboot2_module_LINK = $(CCLD) $(multiboot2_module_CFLAGS) $(CFLAGS) \
+ $(multiboot2_module_LDFLAGS) $(LDFLAGS) -o $@
+am__nand_module_SOURCES_DIST = disk/ieee1275/nand.c
+@COND_i386_ieee1275_TRUE@am_nand_module_OBJECTS = disk/ieee1275/nand_module-nand.$(OBJEXT)
+nodist_nand_module_OBJECTS =
+nand_module_OBJECTS = $(am_nand_module_OBJECTS) \
+ $(nodist_nand_module_OBJECTS)
+nand_module_DEPENDENCIES =
+nand_module_LINK = $(CCLD) $(nand_module_CFLAGS) $(CFLAGS) \
+ $(nand_module_LDFLAGS) $(LDFLAGS) -o $@
+am__nilfs2_module_SOURCES_DIST = fs/nilfs2.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_nilfs2_module_OBJECTS = fs/nilfs2_module-nilfs2.$(OBJEXT)
+@COND_emu_TRUE@am_nilfs2_module_OBJECTS = \
+@COND_emu_TRUE@ fs/nilfs2_module-nilfs2.$(OBJEXT)
+nodist_nilfs2_module_OBJECTS =
+nilfs2_module_OBJECTS = $(am_nilfs2_module_OBJECTS) \
+ $(nodist_nilfs2_module_OBJECTS)
+nilfs2_module_DEPENDENCIES =
+nilfs2_module_LINK = $(CCLD) $(nilfs2_module_CFLAGS) $(CFLAGS) \
+ $(nilfs2_module_LDFLAGS) $(LDFLAGS) -o $@
+am__none_decompress_image_SOURCES_DIST = boot/mips/startup_raw.S \
+ boot/decompressor/none.c
+@COND_mips_yeeloong_TRUE@am_none_decompress_image_OBJECTS = boot/mips/none_decompress_image-startup_raw.$(OBJEXT) \
+@COND_mips_yeeloong_TRUE@ boot/decompressor/none_decompress_image-none.$(OBJEXT)
+nodist_none_decompress_image_OBJECTS =
+none_decompress_image_OBJECTS = $(am_none_decompress_image_OBJECTS) \
+ $(nodist_none_decompress_image_OBJECTS)
+none_decompress_image_DEPENDENCIES =
+none_decompress_image_LINK = $(CCLD) $(none_decompress_image_CFLAGS) \
+ $(CFLAGS) $(none_decompress_image_LDFLAGS) $(LDFLAGS) -o $@
+am__normal_module_SOURCES_DIST = normal/main.c normal/cmdline.c \
+ normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c \
+ normal/completion.c normal/datetime.c normal/menu.c \
+ normal/menu_entry.c normal/menu_text.c normal/misc.c \
+ normal/crypto.c normal/term.c normal/context.c \
+ normal/charset.c script/main.c script/script.c \
+ script/execute.c script/function.c script/lexer.c \
+ script/argv.c commands/menuentry.c unidata.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_normal_module_OBJECTS = normal/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_TRUE@am_normal_module_OBJECTS = \
+@COND_emu_TRUE@ normal/normal_module-main.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-cmdline.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-dyncmd.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-auth.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-autofs.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-color.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-completion.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-datetime.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-menu.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-menu_entry.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-menu_text.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-misc.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-crypto.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-term.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-context.$(OBJEXT) \
+@COND_emu_TRUE@ normal/normal_module-charset.$(OBJEXT) \
+@COND_emu_TRUE@ script/normal_module-main.$(OBJEXT) \
+@COND_emu_TRUE@ script/normal_module-script.$(OBJEXT) \
+@COND_emu_TRUE@ script/normal_module-execute.$(OBJEXT) \
+@COND_emu_TRUE@ script/normal_module-function.$(OBJEXT) \
+@COND_emu_TRUE@ script/normal_module-lexer.$(OBJEXT) \
+@COND_emu_TRUE@ script/normal_module-argv.$(OBJEXT) \
+@COND_emu_TRUE@ commands/normal_module-menuentry.$(OBJEXT) \
+@COND_emu_TRUE@ normal_module-unidata.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@nodist_normal_module_OBJECTS = normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+@COND_emu_TRUE@nodist_normal_module_OBJECTS = \
+@COND_emu_TRUE@ normal_module-grub_script.tab.$(OBJEXT) \
+@COND_emu_TRUE@ normal_module-grub_script.yy.$(OBJEXT)
+normal_module_OBJECTS = $(am_normal_module_OBJECTS) \
+ $(nodist_normal_module_OBJECTS)
+normal_module_DEPENDENCIES =
+normal_module_LINK = $(CCLD) $(normal_module_CFLAGS) $(CFLAGS) \
+ $(normal_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ntfs_module_SOURCES_DIST = fs/ntfs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+@COND_emu_TRUE@am_ntfs_module_OBJECTS = fs/ntfs_module-ntfs.$(OBJEXT)
+nodist_ntfs_module_OBJECTS =
+ntfs_module_OBJECTS = $(am_ntfs_module_OBJECTS) \
+ $(nodist_ntfs_module_OBJECTS)
+ntfs_module_DEPENDENCIES =
+ntfs_module_LINK = $(CCLD) $(ntfs_module_CFLAGS) $(CFLAGS) \
+ $(ntfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ntfscomp_module_SOURCES_DIST = fs/ntfscomp.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_ntfscomp_module_OBJECTS = fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+@COND_emu_TRUE@am_ntfscomp_module_OBJECTS = \
+@COND_emu_TRUE@ fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+nodist_ntfscomp_module_OBJECTS =
+ntfscomp_module_OBJECTS = $(am_ntfscomp_module_OBJECTS) \
+ $(nodist_ntfscomp_module_OBJECTS)
+ntfscomp_module_DEPENDENCIES =
+ntfscomp_module_LINK = $(CCLD) $(ntfscomp_module_CFLAGS) $(CFLAGS) \
+ $(ntfscomp_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ntldr_module_SOURCES_DIST = loader/i386/pc/ntldr.c
+@COND_i386_pc_TRUE@am_ntldr_module_OBJECTS = loader/i386/pc/ntldr_module-ntldr.$(OBJEXT)
+nodist_ntldr_module_OBJECTS =
+ntldr_module_OBJECTS = $(am_ntldr_module_OBJECTS) \
+ $(nodist_ntldr_module_OBJECTS)
+ntldr_module_DEPENDENCIES =
+ntldr_module_LINK = $(CCLD) $(ntldr_module_CFLAGS) $(CFLAGS) \
+ $(ntldr_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ohci_module_SOURCES_DIST = bus/usb/ohci.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_ohci_module_OBJECTS = bus/usb/ohci_module-ohci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ohci_module_OBJECTS = bus/usb/ohci_module-ohci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ohci_module_OBJECTS = bus/usb/ohci_module-ohci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ohci_module_OBJECTS = bus/usb/ohci_module-ohci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ohci_module_OBJECTS = bus/usb/ohci_module-ohci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ohci_module_OBJECTS = bus/usb/ohci_module-ohci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ohci_module_OBJECTS = bus/usb/ohci_module-ohci.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_ohci_module_OBJECTS = \
+@COND_i386_coreboot_TRUE@ bus/usb/ohci_module-ohci.$(OBJEXT)
+nodist_ohci_module_OBJECTS =
+ohci_module_OBJECTS = $(am_ohci_module_OBJECTS) \
+ $(nodist_ohci_module_OBJECTS)
+ohci_module_DEPENDENCIES =
+ohci_module_LINK = $(CCLD) $(ohci_module_CFLAGS) $(CFLAGS) \
+ $(ohci_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_acorn_module_SOURCES_DIST = partmap/acorn.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_acorn_module_OBJECTS = partmap/part_acorn_module-acorn.$(OBJEXT)
+@COND_emu_TRUE@am_part_acorn_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_acorn_module-acorn.$(OBJEXT)
+nodist_part_acorn_module_OBJECTS =
+part_acorn_module_OBJECTS = $(am_part_acorn_module_OBJECTS) \
+ $(nodist_part_acorn_module_OBJECTS)
+part_acorn_module_DEPENDENCIES =
+part_acorn_module_LINK = $(CCLD) $(part_acorn_module_CFLAGS) $(CFLAGS) \
+ $(part_acorn_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_amiga_module_SOURCES_DIST = partmap/amiga.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_amiga_module_OBJECTS = partmap/part_amiga_module-amiga.$(OBJEXT)
+@COND_emu_TRUE@am_part_amiga_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_amiga_module-amiga.$(OBJEXT)
+nodist_part_amiga_module_OBJECTS =
+part_amiga_module_OBJECTS = $(am_part_amiga_module_OBJECTS) \
+ $(nodist_part_amiga_module_OBJECTS)
+part_amiga_module_DEPENDENCIES =
+part_amiga_module_LINK = $(CCLD) $(part_amiga_module_CFLAGS) $(CFLAGS) \
+ $(part_amiga_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_apple_module_SOURCES_DIST = partmap/apple.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_apple_module_OBJECTS = partmap/part_apple_module-apple.$(OBJEXT)
+@COND_emu_TRUE@am_part_apple_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_apple_module-apple.$(OBJEXT)
+nodist_part_apple_module_OBJECTS =
+part_apple_module_OBJECTS = $(am_part_apple_module_OBJECTS) \
+ $(nodist_part_apple_module_OBJECTS)
+part_apple_module_DEPENDENCIES =
+part_apple_module_LINK = $(CCLD) $(part_apple_module_CFLAGS) $(CFLAGS) \
+ $(part_apple_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_bsd_module_SOURCES_DIST = partmap/bsdlabel.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_bsd_module_OBJECTS = partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+@COND_emu_TRUE@am_part_bsd_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+nodist_part_bsd_module_OBJECTS =
+part_bsd_module_OBJECTS = $(am_part_bsd_module_OBJECTS) \
+ $(nodist_part_bsd_module_OBJECTS)
+part_bsd_module_DEPENDENCIES =
+part_bsd_module_LINK = $(CCLD) $(part_bsd_module_CFLAGS) $(CFLAGS) \
+ $(part_bsd_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_gpt_module_SOURCES_DIST = partmap/gpt.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_gpt_module_OBJECTS = partmap/part_gpt_module-gpt.$(OBJEXT)
+@COND_emu_TRUE@am_part_gpt_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_gpt_module-gpt.$(OBJEXT)
+nodist_part_gpt_module_OBJECTS =
+part_gpt_module_OBJECTS = $(am_part_gpt_module_OBJECTS) \
+ $(nodist_part_gpt_module_OBJECTS)
+part_gpt_module_DEPENDENCIES =
+part_gpt_module_LINK = $(CCLD) $(part_gpt_module_CFLAGS) $(CFLAGS) \
+ $(part_gpt_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_msdos_module_SOURCES_DIST = partmap/msdos.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_msdos_module_OBJECTS = partmap/part_msdos_module-msdos.$(OBJEXT)
+@COND_emu_TRUE@am_part_msdos_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_msdos_module-msdos.$(OBJEXT)
+nodist_part_msdos_module_OBJECTS =
+part_msdos_module_OBJECTS = $(am_part_msdos_module_OBJECTS) \
+ $(nodist_part_msdos_module_OBJECTS)
+part_msdos_module_DEPENDENCIES =
+part_msdos_module_LINK = $(CCLD) $(part_msdos_module_CFLAGS) $(CFLAGS) \
+ $(part_msdos_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_sun_module_SOURCES_DIST = partmap/sun.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_sun_module_OBJECTS = partmap/part_sun_module-sun.$(OBJEXT)
+@COND_emu_TRUE@am_part_sun_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_sun_module-sun.$(OBJEXT)
+nodist_part_sun_module_OBJECTS =
+part_sun_module_OBJECTS = $(am_part_sun_module_OBJECTS) \
+ $(nodist_part_sun_module_OBJECTS)
+part_sun_module_DEPENDENCIES =
+part_sun_module_LINK = $(CCLD) $(part_sun_module_CFLAGS) $(CFLAGS) \
+ $(part_sun_module_LDFLAGS) $(LDFLAGS) -o $@
+am__part_sunpc_module_SOURCES_DIST = partmap/sunpc.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_part_sunpc_module_OBJECTS = partmap/part_sunpc_module-sunpc.$(OBJEXT)
+@COND_emu_TRUE@am_part_sunpc_module_OBJECTS = \
+@COND_emu_TRUE@ partmap/part_sunpc_module-sunpc.$(OBJEXT)
+nodist_part_sunpc_module_OBJECTS =
+part_sunpc_module_OBJECTS = $(am_part_sunpc_module_OBJECTS) \
+ $(nodist_part_sunpc_module_OBJECTS)
+part_sunpc_module_DEPENDENCIES =
+part_sunpc_module_LINK = $(CCLD) $(part_sunpc_module_CFLAGS) $(CFLAGS) \
+ $(part_sunpc_module_LDFLAGS) $(LDFLAGS) -o $@
+am__parttool_module_SOURCES_DIST = commands/parttool.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_parttool_module_OBJECTS = commands/parttool_module-parttool.$(OBJEXT)
+@COND_emu_TRUE@am_parttool_module_OBJECTS = \
+@COND_emu_TRUE@ commands/parttool_module-parttool.$(OBJEXT)
+nodist_parttool_module_OBJECTS =
+parttool_module_OBJECTS = $(am_parttool_module_OBJECTS) \
+ $(nodist_parttool_module_OBJECTS)
+parttool_module_DEPENDENCIES =
+parttool_module_LINK = $(CCLD) $(parttool_module_CFLAGS) $(CFLAGS) \
+ $(parttool_module_LDFLAGS) $(LDFLAGS) -o $@
+am__password_module_SOURCES_DIST = commands/password.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_password_module_OBJECTS = commands/password_module-password.$(OBJEXT)
+@COND_emu_TRUE@am_password_module_OBJECTS = \
+@COND_emu_TRUE@ commands/password_module-password.$(OBJEXT)
+nodist_password_module_OBJECTS =
+password_module_OBJECTS = $(am_password_module_OBJECTS) \
+ $(nodist_password_module_OBJECTS)
+password_module_DEPENDENCIES =
+password_module_LINK = $(CCLD) $(password_module_CFLAGS) $(CFLAGS) \
+ $(password_module_LDFLAGS) $(LDFLAGS) -o $@
+am__password_pbkdf2_module_SOURCES_DIST = commands/password_pbkdf2.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+@COND_emu_TRUE@am_password_pbkdf2_module_OBJECTS = commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+nodist_password_pbkdf2_module_OBJECTS =
+password_pbkdf2_module_OBJECTS = $(am_password_pbkdf2_module_OBJECTS) \
+ $(nodist_password_pbkdf2_module_OBJECTS)
+password_pbkdf2_module_DEPENDENCIES =
+password_pbkdf2_module_LINK = $(CCLD) $(password_pbkdf2_module_CFLAGS) \
+ $(CFLAGS) $(password_pbkdf2_module_LDFLAGS) $(LDFLAGS) -o $@
+am__pbkdf2_module_SOURCES_DIST = lib/pbkdf2.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_pbkdf2_module_OBJECTS = lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+@COND_emu_TRUE@am_pbkdf2_module_OBJECTS = \
+@COND_emu_TRUE@ lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+nodist_pbkdf2_module_OBJECTS =
+pbkdf2_module_OBJECTS = $(am_pbkdf2_module_OBJECTS) \
+ $(nodist_pbkdf2_module_OBJECTS)
+pbkdf2_module_DEPENDENCIES =
+pbkdf2_module_LINK = $(CCLD) $(pbkdf2_module_CFLAGS) $(CFLAGS) \
+ $(pbkdf2_module_LDFLAGS) $(LDFLAGS) -o $@
+am__pci_module_SOURCES_DIST = bus/emu/pci.c commands/lspci.c bus/pci.c
+@COND_GRUB_EMU_PCI_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_x86_64_efi_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_GRUB_EMU_PCI_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_GRUB_EMU_PCI_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_GRUB_EMU_PCI_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_GRUB_EMU_PCI_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_GRUB_EMU_PCI_FALSE@@COND_i386_coreboot_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@am_pci_module_OBJECTS = bus/emu/pci_module-pci.$(OBJEXT) \
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@ commands/pci_module-lspci.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_x86_64_efi_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_pci_module_OBJECTS = bus/pci_module-pci.$(OBJEXT)
+nodist_pci_module_OBJECTS =
+pci_module_OBJECTS = $(am_pci_module_OBJECTS) \
+ $(nodist_pci_module_OBJECTS)
+pci_module_DEPENDENCIES =
+pci_module_LINK = $(CCLD) $(pci_module_CFLAGS) $(CFLAGS) \
+ $(pci_module_LDFLAGS) $(LDFLAGS) -o $@
+am__play_module_SOURCES_DIST = commands/i386/pc/play.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_play_module_OBJECTS = commands/i386/pc/play_module-play.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_play_module_OBJECTS = commands/i386/pc/play_module-play.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_play_module_OBJECTS = commands/i386/pc/play_module-play.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_play_module_OBJECTS = commands/i386/pc/play_module-play.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_play_module_OBJECTS = commands/i386/pc/play_module-play.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_play_module_OBJECTS = commands/i386/pc/play_module-play.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_play_module_OBJECTS = commands/i386/pc/play_module-play.$(OBJEXT)
+nodist_play_module_OBJECTS =
+play_module_OBJECTS = $(am_play_module_OBJECTS) \
+ $(nodist_play_module_OBJECTS)
+play_module_DEPENDENCIES =
+play_module_LINK = $(CCLD) $(play_module_CFLAGS) $(CFLAGS) \
+ $(play_module_LDFLAGS) $(LDFLAGS) -o $@
+am__png_module_SOURCES_DIST = video/readers/png.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_png_module_OBJECTS = video/readers/png_module-png.$(OBJEXT)
+@COND_emu_TRUE@am_png_module_OBJECTS = \
+@COND_emu_TRUE@ video/readers/png_module-png.$(OBJEXT)
+nodist_png_module_OBJECTS =
+png_module_OBJECTS = $(am_png_module_OBJECTS) \
+ $(nodist_png_module_OBJECTS)
+png_module_DEPENDENCIES =
+png_module_LINK = $(CCLD) $(png_module_CFLAGS) $(CFLAGS) \
+ $(png_module_LDFLAGS) $(LDFLAGS) -o $@
+am__probe_module_SOURCES_DIST = commands/probe.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_probe_module_OBJECTS = commands/probe_module-probe.$(OBJEXT)
+@COND_emu_TRUE@am_probe_module_OBJECTS = \
+@COND_emu_TRUE@ commands/probe_module-probe.$(OBJEXT)
+nodist_probe_module_OBJECTS =
+probe_module_OBJECTS = $(am_probe_module_OBJECTS) \
+ $(nodist_probe_module_OBJECTS)
+probe_module_DEPENDENCIES =
+probe_module_LINK = $(CCLD) $(probe_module_CFLAGS) $(CFLAGS) \
+ $(probe_module_LDFLAGS) $(LDFLAGS) -o $@
+am__pxe_module_SOURCES_DIST = fs/i386/pc/pxe.c
+@COND_i386_pc_TRUE@am_pxe_module_OBJECTS = \
+@COND_i386_pc_TRUE@ fs/i386/pc/pxe_module-pxe.$(OBJEXT)
+nodist_pxe_module_OBJECTS =
+pxe_module_OBJECTS = $(am_pxe_module_OBJECTS) \
+ $(nodist_pxe_module_OBJECTS)
+pxe_module_DEPENDENCIES =
+pxe_module_LINK = $(CCLD) $(pxe_module_CFLAGS) $(CFLAGS) \
+ $(pxe_module_LDFLAGS) $(LDFLAGS) -o $@
+am__pxeboot_image_SOURCES_DIST = boot/i386/pc/pxeboot.S
+@COND_i386_pc_TRUE@am_pxeboot_image_OBJECTS = boot/i386/pc/pxeboot_image-pxeboot.$(OBJEXT)
+nodist_pxeboot_image_OBJECTS =
+pxeboot_image_OBJECTS = $(am_pxeboot_image_OBJECTS) \
+ $(nodist_pxeboot_image_OBJECTS)
+pxeboot_image_DEPENDENCIES =
+pxeboot_image_LINK = $(CCLD) $(pxeboot_image_CFLAGS) $(CFLAGS) \
+ $(pxeboot_image_LDFLAGS) $(LDFLAGS) -o $@
+am__pxecmd_module_SOURCES_DIST = commands/i386/pc/pxecmd.c
+@COND_i386_pc_TRUE@am_pxecmd_module_OBJECTS = commands/i386/pc/pxecmd_module-pxecmd.$(OBJEXT)
+nodist_pxecmd_module_OBJECTS =
+pxecmd_module_OBJECTS = $(am_pxecmd_module_OBJECTS) \
+ $(nodist_pxecmd_module_OBJECTS)
+pxecmd_module_DEPENDENCIES =
+pxecmd_module_LINK = $(CCLD) $(pxecmd_module_CFLAGS) $(CFLAGS) \
+ $(pxecmd_module_LDFLAGS) $(LDFLAGS) -o $@
+am__raid_module_SOURCES_DIST = disk/raid.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_raid_module_OBJECTS = disk/raid_module-raid.$(OBJEXT)
+@COND_emu_TRUE@am_raid_module_OBJECTS = \
+@COND_emu_TRUE@ disk/raid_module-raid.$(OBJEXT)
+nodist_raid_module_OBJECTS =
+raid_module_OBJECTS = $(am_raid_module_OBJECTS) \
+ $(nodist_raid_module_OBJECTS)
+raid_module_DEPENDENCIES =
+raid_module_LINK = $(CCLD) $(raid_module_CFLAGS) $(CFLAGS) \
+ $(raid_module_LDFLAGS) $(LDFLAGS) -o $@
+am__raid5rec_module_SOURCES_DIST = disk/raid5_recover.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_raid5rec_module_OBJECTS = disk/raid5rec_module-raid5_recover.$(OBJEXT)
+@COND_emu_TRUE@am_raid5rec_module_OBJECTS = \
+@COND_emu_TRUE@ disk/raid5rec_module-raid5_recover.$(OBJEXT)
+nodist_raid5rec_module_OBJECTS =
+raid5rec_module_OBJECTS = $(am_raid5rec_module_OBJECTS) \
+ $(nodist_raid5rec_module_OBJECTS)
+raid5rec_module_DEPENDENCIES =
+raid5rec_module_LINK = $(CCLD) $(raid5rec_module_CFLAGS) $(CFLAGS) \
+ $(raid5rec_module_LDFLAGS) $(LDFLAGS) -o $@
+am__raid6rec_module_SOURCES_DIST = disk/raid6_recover.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_raid6rec_module_OBJECTS = disk/raid6rec_module-raid6_recover.$(OBJEXT)
+@COND_emu_TRUE@am_raid6rec_module_OBJECTS = \
+@COND_emu_TRUE@ disk/raid6rec_module-raid6_recover.$(OBJEXT)
+nodist_raid6rec_module_OBJECTS =
+raid6rec_module_OBJECTS = $(am_raid6rec_module_OBJECTS) \
+ $(nodist_raid6rec_module_OBJECTS)
+raid6rec_module_DEPENDENCIES =
+raid6rec_module_LINK = $(CCLD) $(raid6rec_module_CFLAGS) $(CFLAGS) \
+ $(raid6rec_module_LDFLAGS) $(LDFLAGS) -o $@
+am__read_module_SOURCES_DIST = commands/read.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_read_module_OBJECTS = commands/read_module-read.$(OBJEXT)
+@COND_emu_TRUE@am_read_module_OBJECTS = \
+@COND_emu_TRUE@ commands/read_module-read.$(OBJEXT)
+nodist_read_module_OBJECTS =
+read_module_OBJECTS = $(am_read_module_OBJECTS) \
+ $(nodist_read_module_OBJECTS)
+read_module_DEPENDENCIES =
+read_module_LINK = $(CCLD) $(read_module_CFLAGS) $(CFLAGS) \
+ $(read_module_LDFLAGS) $(LDFLAGS) -o $@
+am__reboot_module_SOURCES_DIST = commands/reboot.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_reboot_module_OBJECTS = commands/reboot_module-reboot.$(OBJEXT)
+@COND_emu_TRUE@am_reboot_module_OBJECTS = \
+@COND_emu_TRUE@ commands/reboot_module-reboot.$(OBJEXT)
+nodist_reboot_module_OBJECTS =
+reboot_module_OBJECTS = $(am_reboot_module_OBJECTS) \
+ $(nodist_reboot_module_OBJECTS)
+reboot_module_DEPENDENCIES =
+reboot_module_LINK = $(CCLD) $(reboot_module_CFLAGS) $(CFLAGS) \
+ $(reboot_module_LDFLAGS) $(LDFLAGS) -o $@
+am__regexp_module_SOURCES_DIST = commands/regexp.c commands/wildcard.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_regexp_module_OBJECTS = commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+@COND_emu_TRUE@am_regexp_module_OBJECTS = \
+@COND_emu_TRUE@ commands/regexp_module-regexp.$(OBJEXT) \
+@COND_emu_TRUE@ commands/regexp_module-wildcard.$(OBJEXT)
+nodist_regexp_module_OBJECTS =
+regexp_module_OBJECTS = $(am_regexp_module_OBJECTS) \
+ $(nodist_regexp_module_OBJECTS)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@regexp_module_DEPENDENCIES = \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ libgnulib.a
+@COND_emu_TRUE@regexp_module_DEPENDENCIES = libgnulib.a
+regexp_module_LINK = $(CCLD) $(regexp_module_CFLAGS) $(CFLAGS) \
+ $(regexp_module_LDFLAGS) $(LDFLAGS) -o $@
+am__reiserfs_module_SOURCES_DIST = fs/reiserfs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_reiserfs_module_OBJECTS = fs/reiserfs_module-reiserfs.$(OBJEXT)
+@COND_emu_TRUE@am_reiserfs_module_OBJECTS = \
+@COND_emu_TRUE@ fs/reiserfs_module-reiserfs.$(OBJEXT)
+nodist_reiserfs_module_OBJECTS =
+reiserfs_module_OBJECTS = $(am_reiserfs_module_OBJECTS) \
+ $(nodist_reiserfs_module_OBJECTS)
+reiserfs_module_DEPENDENCIES =
+reiserfs_module_LINK = $(CCLD) $(reiserfs_module_CFLAGS) $(CFLAGS) \
+ $(reiserfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__relocator_module_SOURCES_DIST = lib/i386/relocator_asm.S \
+ lib/i386/relocator16.S lib/i386/relocator32.S \
+ lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c \
+ lib/efi/relocator.c lib/ieee1275/relocator.c \
+ lib/mips/relocator_asm.S lib/mips/relocator.c \
+ lib/powerpc/relocator_asm.S lib/powerpc/relocator.c \
+ lib/x86_64/relocator_asm.S
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_relocator_module_OBJECTS = lib/x86_64/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/efi/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/i386/relocator_module-relocator16.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/i386/relocator_module-relocator32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/i386/relocator_module-relocator64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/i386/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_relocator_module_OBJECTS = lib/powerpc/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/powerpc/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/ieee1275/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_relocator_module_OBJECTS = lib/mips/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/mips/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_relocator_module_OBJECTS = lib/i386/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/i386/relocator_module-relocator16.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/i386/relocator_module-relocator32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/i386/relocator_module-relocator64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/i386/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_relocator_module_OBJECTS = lib/i386/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/i386/relocator_module-relocator16.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/i386/relocator_module-relocator32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/i386/relocator_module-relocator64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/i386/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_relocator_module_OBJECTS = lib/i386/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/i386/relocator_module-relocator16.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/i386/relocator_module-relocator32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/i386/relocator_module-relocator64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/i386/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_relocator_module_OBJECTS = lib/ieee1275/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/i386/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/i386/relocator_module-relocator16.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/i386/relocator_module-relocator32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/i386/relocator_module-relocator64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/i386/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_relocator_module_OBJECTS = lib/efi/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/i386/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/i386/relocator_module-relocator16.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/i386/relocator_module-relocator32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/i386/relocator_module-relocator64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/i386/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_relocator_module_OBJECTS = lib/i386/relocator_module-relocator_asm.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ lib/i386/relocator_module-relocator16.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ lib/i386/relocator_module-relocator32.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ lib/i386/relocator_module-relocator64.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ lib/i386/relocator_module-relocator.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ lib/relocator_module-relocator.$(OBJEXT)
+nodist_relocator_module_OBJECTS =
+relocator_module_OBJECTS = $(am_relocator_module_OBJECTS) \
+ $(nodist_relocator_module_OBJECTS)
+relocator_module_DEPENDENCIES =
+relocator_module_LINK = $(CCLD) $(relocator_module_CFLAGS) $(CFLAGS) \
+ $(relocator_module_LDFLAGS) $(LDFLAGS) -o $@
+am__scsi_module_SOURCES_DIST = disk/scsi.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_scsi_module_OBJECTS = disk/scsi_module-scsi.$(OBJEXT)
+@COND_emu_TRUE@am_scsi_module_OBJECTS = \
+@COND_emu_TRUE@ disk/scsi_module-scsi.$(OBJEXT)
+nodist_scsi_module_OBJECTS =
+scsi_module_OBJECTS = $(am_scsi_module_OBJECTS) \
+ $(nodist_scsi_module_OBJECTS)
+scsi_module_DEPENDENCIES =
+scsi_module_LINK = $(CCLD) $(scsi_module_CFLAGS) $(CFLAGS) \
+ $(scsi_module_LDFLAGS) $(LDFLAGS) -o $@
+am__sdl_module_SOURCES_DIST = video/emu/sdl.c
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@am_sdl_module_OBJECTS = video/emu/sdl_module-sdl.$(OBJEXT)
+nodist_sdl_module_OBJECTS =
+sdl_module_OBJECTS = $(am_sdl_module_OBJECTS) \
+ $(nodist_sdl_module_OBJECTS)
+sdl_module_DEPENDENCIES =
+sdl_module_LINK = $(CCLD) $(sdl_module_CFLAGS) $(CFLAGS) \
+ $(sdl_module_LDFLAGS) $(LDFLAGS) -o $@
+am__search_module_SOURCES_DIST = commands/search_wrap.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_search_module_OBJECTS = commands/search_module-search_wrap.$(OBJEXT)
+@COND_emu_TRUE@am_search_module_OBJECTS = \
+@COND_emu_TRUE@ commands/search_module-search_wrap.$(OBJEXT)
+nodist_search_module_OBJECTS =
+search_module_OBJECTS = $(am_search_module_OBJECTS) \
+ $(nodist_search_module_OBJECTS)
+search_module_DEPENDENCIES =
+search_module_LINK = $(CCLD) $(search_module_CFLAGS) $(CFLAGS) \
+ $(search_module_LDFLAGS) $(LDFLAGS) -o $@
+am__search_fs_file_module_SOURCES_DIST = commands/search_file.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+@COND_emu_TRUE@am_search_fs_file_module_OBJECTS = commands/search_fs_file_module-search_file.$(OBJEXT)
+nodist_search_fs_file_module_OBJECTS =
+search_fs_file_module_OBJECTS = $(am_search_fs_file_module_OBJECTS) \
+ $(nodist_search_fs_file_module_OBJECTS)
+search_fs_file_module_DEPENDENCIES =
+search_fs_file_module_LINK = $(CCLD) $(search_fs_file_module_CFLAGS) \
+ $(CFLAGS) $(search_fs_file_module_LDFLAGS) $(LDFLAGS) -o $@
+am__search_fs_uuid_module_SOURCES_DIST = commands/search_uuid.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+@COND_emu_TRUE@am_search_fs_uuid_module_OBJECTS = commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+nodist_search_fs_uuid_module_OBJECTS =
+search_fs_uuid_module_OBJECTS = $(am_search_fs_uuid_module_OBJECTS) \
+ $(nodist_search_fs_uuid_module_OBJECTS)
+search_fs_uuid_module_DEPENDENCIES =
+search_fs_uuid_module_LINK = $(CCLD) $(search_fs_uuid_module_CFLAGS) \
+ $(CFLAGS) $(search_fs_uuid_module_LDFLAGS) $(LDFLAGS) -o $@
+am__search_label_module_SOURCES_DIST = commands/search_label.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+@COND_emu_TRUE@am_search_label_module_OBJECTS = commands/search_label_module-search_label.$(OBJEXT)
+nodist_search_label_module_OBJECTS =
+search_label_module_OBJECTS = $(am_search_label_module_OBJECTS) \
+ $(nodist_search_label_module_OBJECTS)
+search_label_module_DEPENDENCIES =
+search_label_module_LINK = $(CCLD) $(search_label_module_CFLAGS) \
+ $(CFLAGS) $(search_label_module_LDFLAGS) $(LDFLAGS) -o $@
+am__sendkey_module_SOURCES_DIST = commands/i386/pc/sendkey.c
+@COND_i386_pc_TRUE@am_sendkey_module_OBJECTS = commands/i386/pc/sendkey_module-sendkey.$(OBJEXT)
+nodist_sendkey_module_OBJECTS =
+sendkey_module_OBJECTS = $(am_sendkey_module_OBJECTS) \
+ $(nodist_sendkey_module_OBJECTS)
+sendkey_module_DEPENDENCIES =
+sendkey_module_LINK = $(CCLD) $(sendkey_module_CFLAGS) $(CFLAGS) \
+ $(sendkey_module_LDFLAGS) $(LDFLAGS) -o $@
+am__serial_module_SOURCES_DIST = term/serial.c term/ns8250.c
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am_serial_module_OBJECTS = term/serial_module-serial.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ term/serial_module-serial.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_serial_module_OBJECTS = term/serial_module-ns8250.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ term/serial_module-serial.$(OBJEXT)
+nodist_serial_module_OBJECTS =
+serial_module_OBJECTS = $(am_serial_module_OBJECTS) \
+ $(nodist_serial_module_OBJECTS)
+serial_module_DEPENDENCIES =
+serial_module_LINK = $(CCLD) $(serial_module_CFLAGS) $(CFLAGS) \
+ $(serial_module_LDFLAGS) $(LDFLAGS) -o $@
+am__setjmp_module_SOURCES_DIST = lib/setjmp.S
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_setjmp_module_OBJECTS = lib/setjmp_module-setjmp.$(OBJEXT)
+@COND_emu_TRUE@am_setjmp_module_OBJECTS = \
+@COND_emu_TRUE@ lib/setjmp_module-setjmp.$(OBJEXT)
+nodist_setjmp_module_OBJECTS =
+setjmp_module_OBJECTS = $(am_setjmp_module_OBJECTS) \
+ $(nodist_setjmp_module_OBJECTS)
+setjmp_module_DEPENDENCIES =
+setjmp_module_LINK = $(CCLD) $(setjmp_module_CFLAGS) $(CFLAGS) \
+ $(setjmp_module_LDFLAGS) $(LDFLAGS) -o $@
+am__setpci_module_SOURCES_DIST = commands/setpci.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_setpci_module_OBJECTS = commands/setpci_module-setpci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_setpci_module_OBJECTS = commands/setpci_module-setpci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_setpci_module_OBJECTS = commands/setpci_module-setpci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_setpci_module_OBJECTS = commands/setpci_module-setpci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_setpci_module_OBJECTS = commands/setpci_module-setpci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_setpci_module_OBJECTS = commands/setpci_module-setpci.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_setpci_module_OBJECTS = commands/setpci_module-setpci.$(OBJEXT)
+nodist_setpci_module_OBJECTS =
+setpci_module_OBJECTS = $(am_setpci_module_OBJECTS) \
+ $(nodist_setpci_module_OBJECTS)
+setpci_module_DEPENDENCIES =
+setpci_module_LINK = $(CCLD) $(setpci_module_CFLAGS) $(CFLAGS) \
+ $(setpci_module_LDFLAGS) $(LDFLAGS) -o $@
+am__sfs_module_SOURCES_DIST = fs/sfs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+@COND_emu_TRUE@am_sfs_module_OBJECTS = fs/sfs_module-sfs.$(OBJEXT)
+nodist_sfs_module_OBJECTS =
+sfs_module_OBJECTS = $(am_sfs_module_OBJECTS) \
+ $(nodist_sfs_module_OBJECTS)
+sfs_module_DEPENDENCIES =
+sfs_module_LINK = $(CCLD) $(sfs_module_CFLAGS) $(CFLAGS) \
+ $(sfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__sleep_module_SOURCES_DIST = commands/sleep.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_sleep_module_OBJECTS = commands/sleep_module-sleep.$(OBJEXT)
+@COND_emu_TRUE@am_sleep_module_OBJECTS = \
+@COND_emu_TRUE@ commands/sleep_module-sleep.$(OBJEXT)
+nodist_sleep_module_OBJECTS =
+sleep_module_OBJECTS = $(am_sleep_module_OBJECTS) \
+ $(nodist_sleep_module_OBJECTS)
+sleep_module_DEPENDENCIES =
+sleep_module_LINK = $(CCLD) $(sleep_module_CFLAGS) $(CFLAGS) \
+ $(sleep_module_LDFLAGS) $(LDFLAGS) -o $@
+am__suspend_module_SOURCES_DIST = commands/ieee1275/suspend.c
+@COND_i386_ieee1275_FALSE@@COND_powerpc_ieee1275_TRUE@am_suspend_module_OBJECTS = commands/ieee1275/suspend_module-suspend.$(OBJEXT)
+@COND_i386_ieee1275_TRUE@am_suspend_module_OBJECTS = commands/ieee1275/suspend_module-suspend.$(OBJEXT)
+nodist_suspend_module_OBJECTS =
+suspend_module_OBJECTS = $(am_suspend_module_OBJECTS) \
+ $(nodist_suspend_module_OBJECTS)
+suspend_module_DEPENDENCIES =
+suspend_module_LINK = $(CCLD) $(suspend_module_CFLAGS) $(CFLAGS) \
+ $(suspend_module_LDFLAGS) $(LDFLAGS) -o $@
+am__tar_module_SOURCES_DIST = fs/tar.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+@COND_emu_TRUE@am_tar_module_OBJECTS = fs/tar_module-tar.$(OBJEXT)
+nodist_tar_module_OBJECTS =
+tar_module_OBJECTS = $(am_tar_module_OBJECTS) \
+ $(nodist_tar_module_OBJECTS)
+tar_module_DEPENDENCIES =
+tar_module_LINK = $(CCLD) $(tar_module_CFLAGS) $(CFLAGS) \
+ $(tar_module_LDFLAGS) $(LDFLAGS) -o $@
+am__terminal_module_SOURCES_DIST = commands/terminal.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_terminal_module_OBJECTS = commands/terminal_module-terminal.$(OBJEXT)
+@COND_emu_TRUE@am_terminal_module_OBJECTS = \
+@COND_emu_TRUE@ commands/terminal_module-terminal.$(OBJEXT)
+nodist_terminal_module_OBJECTS =
+terminal_module_OBJECTS = $(am_terminal_module_OBJECTS) \
+ $(nodist_terminal_module_OBJECTS)
+terminal_module_DEPENDENCIES =
+terminal_module_LINK = $(CCLD) $(terminal_module_CFLAGS) $(CFLAGS) \
+ $(terminal_module_LDFLAGS) $(LDFLAGS) -o $@
+am__terminfo_module_SOURCES_DIST = term/terminfo.c term/tparm.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_terminfo_module_OBJECTS = term/terminfo_module-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ term/terminfo_module-tparm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_terminfo_module_OBJECTS = term/terminfo_module-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ term/terminfo_module-tparm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_terminfo_module_OBJECTS = term/terminfo_module-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ term/terminfo_module-tparm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_TRUE@am_terminfo_module_OBJECTS = term/terminfo_module-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_multiboot_TRUE@ term/terminfo_module-tparm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_terminfo_module_OBJECTS = term/terminfo_module-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ term/terminfo_module-tparm.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_terminfo_module_OBJECTS = term/terminfo_module-terminfo.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ term/terminfo_module-tparm.$(OBJEXT)
+@COND_emu_TRUE@am_terminfo_module_OBJECTS = \
+@COND_emu_TRUE@ term/terminfo_module-terminfo.$(OBJEXT) \
+@COND_emu_TRUE@ term/terminfo_module-tparm.$(OBJEXT)
+nodist_terminfo_module_OBJECTS =
+terminfo_module_OBJECTS = $(am_terminfo_module_OBJECTS) \
+ $(nodist_terminfo_module_OBJECTS)
+terminfo_module_DEPENDENCIES =
+terminfo_module_LINK = $(CCLD) $(terminfo_module_CFLAGS) $(CFLAGS) \
+ $(terminfo_module_LDFLAGS) $(LDFLAGS) -o $@
+am__test_module_SOURCES_DIST = commands/test.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_test_module_OBJECTS = commands/test_module-test.$(OBJEXT)
+@COND_emu_TRUE@am_test_module_OBJECTS = \
+@COND_emu_TRUE@ commands/test_module-test.$(OBJEXT)
+nodist_test_module_OBJECTS =
+test_module_OBJECTS = $(am_test_module_OBJECTS) \
+ $(nodist_test_module_OBJECTS)
+test_module_DEPENDENCIES =
+test_module_LINK = $(CCLD) $(test_module_CFLAGS) $(CFLAGS) \
+ $(test_module_LDFLAGS) $(LDFLAGS) -o $@
+am__test_blockarg_module_SOURCES_DIST = tests/test_blockarg.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+@COND_emu_TRUE@am_test_blockarg_module_OBJECTS = tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+nodist_test_blockarg_module_OBJECTS =
+test_blockarg_module_OBJECTS = $(am_test_blockarg_module_OBJECTS) \
+ $(nodist_test_blockarg_module_OBJECTS)
+test_blockarg_module_DEPENDENCIES =
+test_blockarg_module_LINK = $(CCLD) $(test_blockarg_module_CFLAGS) \
+ $(CFLAGS) $(test_blockarg_module_LDFLAGS) $(LDFLAGS) -o $@
+am__testload_module_SOURCES_DIST = commands/testload.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_testload_module_OBJECTS = commands/testload_module-testload.$(OBJEXT)
+@COND_emu_TRUE@am_testload_module_OBJECTS = \
+@COND_emu_TRUE@ commands/testload_module-testload.$(OBJEXT)
+nodist_testload_module_OBJECTS =
+testload_module_OBJECTS = $(am_testload_module_OBJECTS) \
+ $(nodist_testload_module_OBJECTS)
+testload_module_DEPENDENCIES =
+testload_module_LINK = $(CCLD) $(testload_module_CFLAGS) $(CFLAGS) \
+ $(testload_module_LDFLAGS) $(LDFLAGS) -o $@
+am__tga_module_SOURCES_DIST = video/readers/tga.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_tga_module_OBJECTS = video/readers/tga_module-tga.$(OBJEXT)
+@COND_emu_TRUE@am_tga_module_OBJECTS = \
+@COND_emu_TRUE@ video/readers/tga_module-tga.$(OBJEXT)
+nodist_tga_module_OBJECTS =
+tga_module_OBJECTS = $(am_tga_module_OBJECTS) \
+ $(nodist_tga_module_OBJECTS)
+tga_module_DEPENDENCIES =
+tga_module_LINK = $(CCLD) $(tga_module_CFLAGS) $(CFLAGS) \
+ $(tga_module_LDFLAGS) $(LDFLAGS) -o $@
+am_trig_module_OBJECTS =
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@nodist_trig_module_OBJECTS = trig_module-trigtables.$(OBJEXT)
+@COND_emu_TRUE@nodist_trig_module_OBJECTS = \
+@COND_emu_TRUE@ trig_module-trigtables.$(OBJEXT)
+trig_module_OBJECTS = $(am_trig_module_OBJECTS) \
+ $(nodist_trig_module_OBJECTS)
+trig_module_DEPENDENCIES =
+trig_module_LINK = $(CCLD) $(trig_module_CFLAGS) $(CFLAGS) \
+ $(trig_module_LDFLAGS) $(LDFLAGS) -o $@
+am__true_module_SOURCES_DIST = commands/true.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_true_module_OBJECTS = commands/true_module-true.$(OBJEXT)
+@COND_emu_TRUE@am_true_module_OBJECTS = \
+@COND_emu_TRUE@ commands/true_module-true.$(OBJEXT)
+nodist_true_module_OBJECTS =
+true_module_OBJECTS = $(am_true_module_OBJECTS) \
+ $(nodist_true_module_OBJECTS)
+true_module_DEPENDENCIES =
+true_module_LINK = $(CCLD) $(true_module_CFLAGS) $(CFLAGS) \
+ $(true_module_LDFLAGS) $(LDFLAGS) -o $@
+am__udf_module_SOURCES_DIST = fs/udf.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+@COND_emu_TRUE@am_udf_module_OBJECTS = fs/udf_module-udf.$(OBJEXT)
+nodist_udf_module_OBJECTS =
+udf_module_OBJECTS = $(am_udf_module_OBJECTS) \
+ $(nodist_udf_module_OBJECTS)
+udf_module_DEPENDENCIES =
+udf_module_LINK = $(CCLD) $(udf_module_CFLAGS) $(CFLAGS) \
+ $(udf_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ufs1_module_SOURCES_DIST = fs/ufs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+@COND_emu_TRUE@am_ufs1_module_OBJECTS = fs/ufs1_module-ufs.$(OBJEXT)
+nodist_ufs1_module_OBJECTS =
+ufs1_module_OBJECTS = $(am_ufs1_module_OBJECTS) \
+ $(nodist_ufs1_module_OBJECTS)
+ufs1_module_DEPENDENCIES =
+ufs1_module_LINK = $(CCLD) $(ufs1_module_CFLAGS) $(CFLAGS) \
+ $(ufs1_module_LDFLAGS) $(LDFLAGS) -o $@
+am__ufs2_module_SOURCES_DIST = fs/ufs2.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+@COND_emu_TRUE@am_ufs2_module_OBJECTS = fs/ufs2_module-ufs2.$(OBJEXT)
+nodist_ufs2_module_OBJECTS =
+ufs2_module_OBJECTS = $(am_ufs2_module_OBJECTS) \
+ $(nodist_ufs2_module_OBJECTS)
+ufs2_module_DEPENDENCIES =
+ufs2_module_LINK = $(CCLD) $(ufs2_module_CFLAGS) $(CFLAGS) \
+ $(ufs2_module_LDFLAGS) $(LDFLAGS) -o $@
+am__uhci_module_SOURCES_DIST = bus/usb/uhci.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_uhci_module_OBJECTS = bus/usb/uhci_module-uhci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_uhci_module_OBJECTS = bus/usb/uhci_module-uhci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_uhci_module_OBJECTS = bus/usb/uhci_module-uhci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_uhci_module_OBJECTS = bus/usb/uhci_module-uhci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_uhci_module_OBJECTS = bus/usb/uhci_module-uhci.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_uhci_module_OBJECTS = bus/usb/uhci_module-uhci.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_uhci_module_OBJECTS = \
+@COND_i386_coreboot_TRUE@ bus/usb/uhci_module-uhci.$(OBJEXT)
+nodist_uhci_module_OBJECTS =
+uhci_module_OBJECTS = $(am_uhci_module_OBJECTS) \
+ $(nodist_uhci_module_OBJECTS)
+uhci_module_DEPENDENCIES =
+uhci_module_LINK = $(CCLD) $(uhci_module_CFLAGS) $(CFLAGS) \
+ $(uhci_module_LDFLAGS) $(LDFLAGS) -o $@
+am__usb_module_SOURCES_DIST = bus/usb/usb.c bus/usb/usbtrans.c \
+ bus/usb/usbhub.c
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_usb_module_OBJECTS = bus/usb/usb_module-usbtrans.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ bus/usb/usb_module-usbhub.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ bus/usb/usb_module-usb.$(OBJEXT)
+nodist_usb_module_OBJECTS =
+usb_module_OBJECTS = $(am_usb_module_OBJECTS) \
+ $(nodist_usb_module_OBJECTS)
+usb_module_DEPENDENCIES =
+usb_module_LINK = $(CCLD) $(usb_module_CFLAGS) $(CFLAGS) \
+ $(usb_module_LDFLAGS) $(LDFLAGS) -o $@
+am__usb_keyboard_module_SOURCES_DIST = term/usb_keyboard.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_usb_keyboard_module_OBJECTS = term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+nodist_usb_keyboard_module_OBJECTS =
+usb_keyboard_module_OBJECTS = $(am_usb_keyboard_module_OBJECTS) \
+ $(nodist_usb_keyboard_module_OBJECTS)
+usb_keyboard_module_DEPENDENCIES =
+usb_keyboard_module_LINK = $(CCLD) $(usb_keyboard_module_CFLAGS) \
+ $(CFLAGS) $(usb_keyboard_module_LDFLAGS) $(LDFLAGS) -o $@
+am__usbms_module_SOURCES_DIST = disk/usbms.c
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_usbms_module_OBJECTS = disk/usbms_module-usbms.$(OBJEXT)
+nodist_usbms_module_OBJECTS =
+usbms_module_OBJECTS = $(am_usbms_module_OBJECTS) \
+ $(nodist_usbms_module_OBJECTS)
+usbms_module_DEPENDENCIES =
+usbms_module_LINK = $(CCLD) $(usbms_module_CFLAGS) $(CFLAGS) \
+ $(usbms_module_LDFLAGS) $(LDFLAGS) -o $@
+am__usbserial_common_module_SOURCES_DIST = bus/usb/serial/common.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_usbserial_common_module_OBJECTS = bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+nodist_usbserial_common_module_OBJECTS =
+usbserial_common_module_OBJECTS = \
+ $(am_usbserial_common_module_OBJECTS) \
+ $(nodist_usbserial_common_module_OBJECTS)
+usbserial_common_module_DEPENDENCIES =
+usbserial_common_module_LINK = $(CCLD) \
+ $(usbserial_common_module_CFLAGS) $(CFLAGS) \
+ $(usbserial_common_module_LDFLAGS) $(LDFLAGS) -o $@
+am__usbserial_ftdi_module_SOURCES_DIST = bus/usb/serial/ftdi.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_usbserial_ftdi_module_OBJECTS = bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+nodist_usbserial_ftdi_module_OBJECTS =
+usbserial_ftdi_module_OBJECTS = $(am_usbserial_ftdi_module_OBJECTS) \
+ $(nodist_usbserial_ftdi_module_OBJECTS)
+usbserial_ftdi_module_DEPENDENCIES =
+usbserial_ftdi_module_LINK = $(CCLD) $(usbserial_ftdi_module_CFLAGS) \
+ $(CFLAGS) $(usbserial_ftdi_module_LDFLAGS) $(LDFLAGS) -o $@
+am__usbserial_pl2303_module_SOURCES_DIST = bus/usb/serial/pl2303.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_usbserial_pl2303_module_OBJECTS = bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+nodist_usbserial_pl2303_module_OBJECTS =
+usbserial_pl2303_module_OBJECTS = \
+ $(am_usbserial_pl2303_module_OBJECTS) \
+ $(nodist_usbserial_pl2303_module_OBJECTS)
+usbserial_pl2303_module_DEPENDENCIES =
+usbserial_pl2303_module_LINK = $(CCLD) \
+ $(usbserial_pl2303_module_CFLAGS) $(CFLAGS) \
+ $(usbserial_pl2303_module_LDFLAGS) $(LDFLAGS) -o $@
+am__usbtest_module_SOURCES_DIST = commands/usbtest.c
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_FALSE@@COND_i386_coreboot_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_x86_64_efi_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_usbtest_module_OBJECTS = commands/usbtest_module-usbtest.$(OBJEXT)
+nodist_usbtest_module_OBJECTS =
+usbtest_module_OBJECTS = $(am_usbtest_module_OBJECTS) \
+ $(nodist_usbtest_module_OBJECTS)
+usbtest_module_DEPENDENCIES =
+usbtest_module_LINK = $(CCLD) $(usbtest_module_CFLAGS) $(CFLAGS) \
+ $(usbtest_module_LDFLAGS) $(LDFLAGS) -o $@
+am__vbe_module_SOURCES_DIST = video/i386/pc/vbe.c
+@COND_i386_pc_TRUE@am_vbe_module_OBJECTS = \
+@COND_i386_pc_TRUE@ video/i386/pc/vbe_module-vbe.$(OBJEXT)
+nodist_vbe_module_OBJECTS =
+vbe_module_OBJECTS = $(am_vbe_module_OBJECTS) \
+ $(nodist_vbe_module_OBJECTS)
+vbe_module_DEPENDENCIES =
+vbe_module_LINK = $(CCLD) $(vbe_module_CFLAGS) $(CFLAGS) \
+ $(vbe_module_LDFLAGS) $(LDFLAGS) -o $@
+am__vga_module_SOURCES_DIST = video/i386/pc/vga.c
+@COND_i386_pc_TRUE@am_vga_module_OBJECTS = \
+@COND_i386_pc_TRUE@ video/i386/pc/vga_module-vga.$(OBJEXT)
+nodist_vga_module_OBJECTS =
+vga_module_OBJECTS = $(am_vga_module_OBJECTS) \
+ $(nodist_vga_module_OBJECTS)
+vga_module_DEPENDENCIES =
+vga_module_LINK = $(CCLD) $(vga_module_CFLAGS) $(CFLAGS) \
+ $(vga_module_LDFLAGS) $(LDFLAGS) -o $@
+am__vga_text_module_SOURCES_DIST = term/i386/pc/vga_text.c \
+ term/i386/vga_common.c
+@COND_i386_coreboot_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_vga_text_module_OBJECTS = term/i386/pc/vga_text_module-vga_text.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ term/i386/vga_text_module-vga_common.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_multiboot_TRUE@am_vga_text_module_OBJECTS = term/i386/pc/vga_text_module-vga_text.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_multiboot_TRUE@ term/i386/vga_text_module-vga_common.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_vga_text_module_OBJECTS = term/i386/pc/vga_text_module-vga_text.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ term/i386/vga_text_module-vga_common.$(OBJEXT)
+nodist_vga_text_module_OBJECTS =
+vga_text_module_OBJECTS = $(am_vga_text_module_OBJECTS) \
+ $(nodist_vga_text_module_OBJECTS)
+vga_text_module_DEPENDENCIES =
+vga_text_module_LINK = $(CCLD) $(vga_text_module_CFLAGS) $(CFLAGS) \
+ $(vga_text_module_LDFLAGS) $(LDFLAGS) -o $@
+am__video_module_SOURCES_DIST = video/video.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_video_module_OBJECTS = video/video_module-video.$(OBJEXT)
+@COND_emu_TRUE@am_video_module_OBJECTS = \
+@COND_emu_TRUE@ video/video_module-video.$(OBJEXT)
+nodist_video_module_OBJECTS =
+video_module_OBJECTS = $(am_video_module_OBJECTS) \
+ $(nodist_video_module_OBJECTS)
+video_module_DEPENDENCIES =
+video_module_LINK = $(CCLD) $(video_module_CFLAGS) $(CFLAGS) \
+ $(video_module_LDFLAGS) $(LDFLAGS) -o $@
+am__video_bochs_module_SOURCES_DIST = video/bochs.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_video_bochs_module_OBJECTS = video/video_bochs_module-bochs.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_video_bochs_module_OBJECTS = video/video_bochs_module-bochs.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_video_bochs_module_OBJECTS = video/video_bochs_module-bochs.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_video_bochs_module_OBJECTS = video/video_bochs_module-bochs.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_video_bochs_module_OBJECTS = video/video_bochs_module-bochs.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_video_bochs_module_OBJECTS = video/video_bochs_module-bochs.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_video_bochs_module_OBJECTS = video/video_bochs_module-bochs.$(OBJEXT)
+nodist_video_bochs_module_OBJECTS =
+video_bochs_module_OBJECTS = $(am_video_bochs_module_OBJECTS) \
+ $(nodist_video_bochs_module_OBJECTS)
+video_bochs_module_DEPENDENCIES =
+video_bochs_module_LINK = $(CCLD) $(video_bochs_module_CFLAGS) \
+ $(CFLAGS) $(video_bochs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__video_cirrus_module_SOURCES_DIST = video/cirrus.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_video_cirrus_module_OBJECTS = video/video_cirrus_module-cirrus.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_video_cirrus_module_OBJECTS = video/video_cirrus_module-cirrus.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_video_cirrus_module_OBJECTS = video/video_cirrus_module-cirrus.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_video_cirrus_module_OBJECTS = video/video_cirrus_module-cirrus.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_video_cirrus_module_OBJECTS = video/video_cirrus_module-cirrus.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_video_cirrus_module_OBJECTS = video/video_cirrus_module-cirrus.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_video_cirrus_module_OBJECTS = video/video_cirrus_module-cirrus.$(OBJEXT)
+nodist_video_cirrus_module_OBJECTS =
+video_cirrus_module_OBJECTS = $(am_video_cirrus_module_OBJECTS) \
+ $(nodist_video_cirrus_module_OBJECTS)
+video_cirrus_module_DEPENDENCIES =
+video_cirrus_module_LINK = $(CCLD) $(video_cirrus_module_CFLAGS) \
+ $(CFLAGS) $(video_cirrus_module_LDFLAGS) $(LDFLAGS) -o $@
+am__video_fb_module_SOURCES_DIST = video/fb/video_fb.c \
+ video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_powerpc_ieee1275_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_video_fb_module_OBJECTS = video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+@COND_emu_TRUE@am_video_fb_module_OBJECTS = \
+@COND_emu_TRUE@ video/fb/video_fb_module-video_fb.$(OBJEXT) \
+@COND_emu_TRUE@ video/fb/video_fb_module-fbblit.$(OBJEXT) \
+@COND_emu_TRUE@ video/fb/video_fb_module-fbfill.$(OBJEXT) \
+@COND_emu_TRUE@ video/fb/video_fb_module-fbutil.$(OBJEXT)
+nodist_video_fb_module_OBJECTS =
+video_fb_module_OBJECTS = $(am_video_fb_module_OBJECTS) \
+ $(nodist_video_fb_module_OBJECTS)
+video_fb_module_DEPENDENCIES =
+video_fb_module_LINK = $(CCLD) $(video_fb_module_CFLAGS) $(CFLAGS) \
+ $(video_fb_module_LDFLAGS) $(LDFLAGS) -o $@
+am__videoinfo_module_SOURCES_DIST = commands/videoinfo.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_videoinfo_module_OBJECTS = commands/videoinfo_module-videoinfo.$(OBJEXT)
+@COND_emu_TRUE@am_videoinfo_module_OBJECTS = \
+@COND_emu_TRUE@ commands/videoinfo_module-videoinfo.$(OBJEXT)
+nodist_videoinfo_module_OBJECTS =
+videoinfo_module_OBJECTS = $(am_videoinfo_module_OBJECTS) \
+ $(nodist_videoinfo_module_OBJECTS)
+videoinfo_module_DEPENDENCIES =
+videoinfo_module_LINK = $(CCLD) $(videoinfo_module_CFLAGS) $(CFLAGS) \
+ $(videoinfo_module_LDFLAGS) $(LDFLAGS) -o $@
+am__videotest_module_SOURCES_DIST = commands/videotest.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_videotest_module_OBJECTS = commands/videotest_module-videotest.$(OBJEXT)
+@COND_emu_TRUE@am_videotest_module_OBJECTS = \
+@COND_emu_TRUE@ commands/videotest_module-videotest.$(OBJEXT)
+nodist_videotest_module_OBJECTS =
+videotest_module_OBJECTS = $(am_videotest_module_OBJECTS) \
+ $(nodist_videotest_module_OBJECTS)
+videotest_module_DEPENDENCIES =
+videotest_module_LINK = $(CCLD) $(videotest_module_CFLAGS) $(CFLAGS) \
+ $(videotest_module_LDFLAGS) $(LDFLAGS) -o $@
+am__xfs_module_SOURCES_DIST = fs/xfs.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+@COND_emu_TRUE@am_xfs_module_OBJECTS = fs/xfs_module-xfs.$(OBJEXT)
+nodist_xfs_module_OBJECTS =
+xfs_module_OBJECTS = $(am_xfs_module_OBJECTS) \
+ $(nodist_xfs_module_OBJECTS)
+xfs_module_DEPENDENCIES =
+xfs_module_LINK = $(CCLD) $(xfs_module_CFLAGS) $(CFLAGS) \
+ $(xfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__xnu_module_SOURCES_DIST = loader/xnu_resume.c loader/i386/xnu.c \
+ loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@am_xnu_module_OBJECTS = loader/xnu_module-xnu_resume.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/i386/xnu_module-xnu.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/xnu_module-macho32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/xnu_module-macho64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/xnu_module-macho.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_x86_64_efi_TRUE@ loader/xnu_module-xnu.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_xnu_module_OBJECTS = loader/xnu_module-xnu_resume.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/i386/xnu_module-xnu.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/xnu_module-macho32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/xnu_module-macho64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/xnu_module-macho.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ loader/xnu_module-xnu.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_xnu_module_OBJECTS = loader/xnu_module-xnu_resume.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/i386/xnu_module-xnu.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/xnu_module-macho32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/xnu_module-macho64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/xnu_module-macho.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ loader/xnu_module-xnu.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_xnu_module_OBJECTS = loader/xnu_module-xnu_resume.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/i386/xnu_module-xnu.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/xnu_module-macho32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/xnu_module-macho64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/xnu_module-macho.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ loader/xnu_module-xnu.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_xnu_module_OBJECTS = loader/xnu_module-xnu_resume.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/i386/xnu_module-xnu.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/xnu_module-macho32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/xnu_module-macho64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/xnu_module-macho.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ loader/xnu_module-xnu.$(OBJEXT)
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_xnu_module_OBJECTS = loader/xnu_module-xnu_resume.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/i386/xnu_module-xnu.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/xnu_module-macho32.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/xnu_module-macho64.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/xnu_module-macho.$(OBJEXT) \
+@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ loader/xnu_module-xnu.$(OBJEXT)
+@COND_i386_coreboot_TRUE@am_xnu_module_OBJECTS = loader/xnu_module-xnu_resume.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/i386/xnu_module-xnu.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/xnu_module-macho32.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/xnu_module-macho64.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/xnu_module-macho.$(OBJEXT) \
+@COND_i386_coreboot_TRUE@ loader/xnu_module-xnu.$(OBJEXT)
+nodist_xnu_module_OBJECTS =
+xnu_module_OBJECTS = $(am_xnu_module_OBJECTS) \
+ $(nodist_xnu_module_OBJECTS)
+xnu_module_DEPENDENCIES =
+xnu_module_LINK = $(CCLD) $(xnu_module_CFLAGS) $(CFLAGS) \
+ $(xnu_module_LDFLAGS) $(LDFLAGS) -o $@
+am__xnu_uuid_module_SOURCES_DIST = commands/xnu_uuid.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_xnu_uuid_module_OBJECTS = commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+@COND_emu_TRUE@am_xnu_uuid_module_OBJECTS = \
+@COND_emu_TRUE@ commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+nodist_xnu_uuid_module_OBJECTS =
+xnu_uuid_module_OBJECTS = $(am_xnu_uuid_module_OBJECTS) \
+ $(nodist_xnu_uuid_module_OBJECTS)
+xnu_uuid_module_DEPENDENCIES =
+xnu_uuid_module_LINK = $(CCLD) $(xnu_uuid_module_CFLAGS) $(CFLAGS) \
+ $(xnu_uuid_module_LDFLAGS) $(LDFLAGS) -o $@
+am__xz_decompress_image_SOURCES_DIST = boot/mips/startup_raw.S \
+ boot/decompressor/minilib.c boot/decompressor/xz.c \
+ lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c \
+ lib/xzembed/xz_dec_stream.c
+@COND_mips_yeeloong_TRUE@am_xz_decompress_image_OBJECTS = boot/mips/xz_decompress_image-startup_raw.$(OBJEXT) \
+@COND_mips_yeeloong_TRUE@ boot/decompressor/xz_decompress_image-minilib.$(OBJEXT) \
+@COND_mips_yeeloong_TRUE@ boot/decompressor/xz_decompress_image-xz.$(OBJEXT) \
+@COND_mips_yeeloong_TRUE@ lib/xzembed/xz_decompress_image-xz_dec_bcj.$(OBJEXT) \
+@COND_mips_yeeloong_TRUE@ lib/xzembed/xz_decompress_image-xz_dec_lzma2.$(OBJEXT) \
+@COND_mips_yeeloong_TRUE@ lib/xzembed/xz_decompress_image-xz_dec_stream.$(OBJEXT)
+nodist_xz_decompress_image_OBJECTS =
+xz_decompress_image_OBJECTS = $(am_xz_decompress_image_OBJECTS) \
+ $(nodist_xz_decompress_image_OBJECTS)
+xz_decompress_image_DEPENDENCIES =
+xz_decompress_image_LINK = $(CCLD) $(xz_decompress_image_CFLAGS) \
+ $(CFLAGS) $(xz_decompress_image_LDFLAGS) $(LDFLAGS) -o $@
+am__xzio_module_SOURCES_DIST = io/xzio.c lib/xzembed/xz_dec_bcj.c \
+ lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+@COND_emu_TRUE@am_xzio_module_OBJECTS = io/xzio_module-xzio.$(OBJEXT) \
+@COND_emu_TRUE@ lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT) \
+@COND_emu_TRUE@ lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT) \
+@COND_emu_TRUE@ lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+nodist_xzio_module_OBJECTS =
+xzio_module_OBJECTS = $(am_xzio_module_OBJECTS) \
+ $(nodist_xzio_module_OBJECTS)
+xzio_module_DEPENDENCIES =
+xzio_module_LINK = $(CCLD) $(xzio_module_CFLAGS) $(CFLAGS) \
+ $(xzio_module_LDFLAGS) $(LDFLAGS) -o $@
+am__zfs_module_SOURCES_DIST = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c \
+ fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_zfs_module_OBJECTS = fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+@COND_emu_TRUE@am_zfs_module_OBJECTS = \
+@COND_emu_TRUE@ fs/zfs/zfs_module-zfs.$(OBJEXT) \
+@COND_emu_TRUE@ fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT) \
+@COND_emu_TRUE@ fs/zfs/zfs_module-zfs_sha256.$(OBJEXT) \
+@COND_emu_TRUE@ fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+nodist_zfs_module_OBJECTS =
+zfs_module_OBJECTS = $(am_zfs_module_OBJECTS) \
+ $(nodist_zfs_module_OBJECTS)
+zfs_module_DEPENDENCIES =
+zfs_module_LINK = $(CCLD) $(zfs_module_CFLAGS) $(CFLAGS) \
+ $(zfs_module_LDFLAGS) $(LDFLAGS) -o $@
+am__zfsinfo_module_SOURCES_DIST = fs/zfs/zfsinfo.c
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_FALSE@@COND_x86_64_efi_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_FALSE@@COND_sparc64_ieee1275_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_FALSE@@COND_powerpc_ieee1275_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_FALSE@@COND_mips_yeeloong_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_FALSE@@COND_i386_qemu_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_FALSE@@COND_i386_pc_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_FALSE@@COND_i386_multiboot_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_FALSE@@COND_i386_ieee1275_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_FALSE@@COND_i386_efi_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_FALSE@@COND_i386_coreboot_TRUE@am_zfsinfo_module_OBJECTS = fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+@COND_emu_TRUE@am_zfsinfo_module_OBJECTS = \
+@COND_emu_TRUE@ fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+nodist_zfsinfo_module_OBJECTS =
+zfsinfo_module_OBJECTS = $(am_zfsinfo_module_OBJECTS) \
+ $(nodist_zfsinfo_module_OBJECTS)
+zfsinfo_module_DEPENDENCIES =
+zfsinfo_module_LINK = $(CCLD) $(zfsinfo_module_CFLAGS) $(CFLAGS) \
+ $(zfsinfo_module_LDFLAGS) $(LDFLAGS) -o $@
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+SCRIPTS = $(bin_SCRIPTS) $(grubconf_SCRIPTS) $(noinst_SCRIPTS) \
+ $(pkglib_SCRIPTS) $(sbin_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libgnulib_a_SOURCES) $(nodist_libgnulib_a_SOURCES) \
+ $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES) \
+ $(affs_module_SOURCES) $(nodist_affs_module_SOURCES) \
+ $(afs_module_SOURCES) $(nodist_afs_module_SOURCES) \
+ $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES) \
+ $(aout_module_SOURCES) $(nodist_aout_module_SOURCES) \
+ $(appleldr_module_SOURCES) $(nodist_appleldr_module_SOURCES) \
+ $(at_keyboard_module_SOURCES) \
+ $(nodist_at_keyboard_module_SOURCES) $(ata_module_SOURCES) \
+ $(nodist_ata_module_SOURCES) $(ata_pthru_module_SOURCES) \
+ $(nodist_ata_pthru_module_SOURCES) $(befs_module_SOURCES) \
+ $(nodist_befs_module_SOURCES) $(befs_be_module_SOURCES) \
+ $(nodist_befs_be_module_SOURCES) $(biosdisk_module_SOURCES) \
+ $(nodist_biosdisk_module_SOURCES) $(bitmap_module_SOURCES) \
+ $(nodist_bitmap_module_SOURCES) $(bitmap_scale_module_SOURCES) \
+ $(nodist_bitmap_scale_module_SOURCES) \
+ $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES) \
+ $(boot_image_SOURCES) $(nodist_boot_image_SOURCES) \
+ $(boot_module_SOURCES) $(nodist_boot_module_SOURCES) \
+ $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES) \
+ $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES) \
+ $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES) \
+ $(cat_module_SOURCES) $(nodist_cat_module_SOURCES) \
+ $(cdboot_image_SOURCES) $(nodist_cdboot_image_SOURCES) \
+ $(chain_module_SOURCES) $(nodist_chain_module_SOURCES) \
+ $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES) \
+ $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES) \
+ $(configfile_module_SOURCES) \
+ $(nodist_configfile_module_SOURCES) $(cpio_module_SOURCES) \
+ $(nodist_cpio_module_SOURCES) $(cpuid_module_SOURCES) \
+ $(nodist_cpuid_module_SOURCES) $(crypto_module_SOURCES) \
+ $(nodist_crypto_module_SOURCES) $(cs5536_module_SOURCES) \
+ $(nodist_cs5536_module_SOURCES) $(date_module_SOURCES) \
+ $(nodist_date_module_SOURCES) $(datehook_module_SOURCES) \
+ $(nodist_datehook_module_SOURCES) $(datetime_module_SOURCES) \
+ $(nodist_datetime_module_SOURCES) $(diskboot_image_SOURCES) \
+ $(nodist_diskboot_image_SOURCES) $(dm_nv_module_SOURCES) \
+ $(nodist_dm_nv_module_SOURCES) $(drivemap_module_SOURCES) \
+ $(nodist_drivemap_module_SOURCES) $(echo_module_SOURCES) \
+ $(nodist_echo_module_SOURCES) $(efi_gop_module_SOURCES) \
+ $(nodist_efi_gop_module_SOURCES) $(efi_uga_module_SOURCES) \
+ $(nodist_efi_uga_module_SOURCES) $(efiemu_module_SOURCES) \
+ $(nodist_efiemu_module_SOURCES) $(elf_module_SOURCES) \
+ $(nodist_elf_module_SOURCES) \
+ $(example_functional_test_module_SOURCES) \
+ $(nodist_example_functional_test_module_SOURCES) \
+ $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES) \
+ $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES) \
+ $(fat_module_SOURCES) $(nodist_fat_module_SOURCES) \
+ $(fixvideo_module_SOURCES) $(nodist_fixvideo_module_SOURCES) \
+ $(font_module_SOURCES) $(nodist_font_module_SOURCES) \
+ $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES) \
+ $(functional_test_module_SOURCES) \
+ $(nodist_functional_test_module_SOURCES) \
+ $(fwstart_image_SOURCES) $(nodist_fwstart_image_SOURCES) \
+ $(gcry_arcfour_module_SOURCES) \
+ $(nodist_gcry_arcfour_module_SOURCES) \
+ $(gcry_blowfish_module_SOURCES) \
+ $(nodist_gcry_blowfish_module_SOURCES) \
+ $(gcry_camellia_module_SOURCES) \
+ $(nodist_gcry_camellia_module_SOURCES) \
+ $(gcry_cast5_module_SOURCES) \
+ $(nodist_gcry_cast5_module_SOURCES) $(gcry_crc_module_SOURCES) \
+ $(nodist_gcry_crc_module_SOURCES) $(gcry_des_module_SOURCES) \
+ $(nodist_gcry_des_module_SOURCES) $(gcry_md4_module_SOURCES) \
+ $(nodist_gcry_md4_module_SOURCES) $(gcry_md5_module_SOURCES) \
+ $(nodist_gcry_md5_module_SOURCES) \
+ $(gcry_rfc2268_module_SOURCES) \
+ $(nodist_gcry_rfc2268_module_SOURCES) \
+ $(gcry_rijndael_module_SOURCES) \
+ $(nodist_gcry_rijndael_module_SOURCES) \
+ $(gcry_rmd160_module_SOURCES) \
+ $(nodist_gcry_rmd160_module_SOURCES) \
+ $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES) \
+ $(gcry_serpent_module_SOURCES) \
+ $(nodist_gcry_serpent_module_SOURCES) \
+ $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES) \
+ $(gcry_sha256_module_SOURCES) \
+ $(nodist_gcry_sha256_module_SOURCES) \
+ $(gcry_sha512_module_SOURCES) \
+ $(nodist_gcry_sha512_module_SOURCES) \
+ $(gcry_tiger_module_SOURCES) \
+ $(nodist_gcry_tiger_module_SOURCES) \
+ $(gcry_twofish_module_SOURCES) \
+ $(nodist_gcry_twofish_module_SOURCES) \
+ $(gcry_whirlpool_module_SOURCES) \
+ $(nodist_gcry_whirlpool_module_SOURCES) \
+ $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES) \
+ $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES) \
+ $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES) \
+ $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES) \
+ $(grub_emu_SOURCES) $(nodist_grub_emu_SOURCES) \
+ $(grub_emu_lite_SOURCES) $(nodist_grub_emu_lite_SOURCES) \
+ $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES) \
+ $(halt_module_SOURCES) $(nodist_halt_module_SOURCES) \
+ $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES) \
+ $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES) \
+ $(hello_module_SOURCES) $(nodist_hello_module_SOURCES) \
+ $(help_module_SOURCES) $(nodist_help_module_SOURCES) \
+ $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES) \
+ $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES) \
+ $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES) \
+ $(ieee1275_fb_module_SOURCES) \
+ $(nodist_ieee1275_fb_module_SOURCES) $(iorw_module_SOURCES) \
+ $(nodist_iorw_module_SOURCES) $(iso9660_module_SOURCES) \
+ $(nodist_iso9660_module_SOURCES) $(jfs_module_SOURCES) \
+ $(nodist_jfs_module_SOURCES) $(jpeg_module_SOURCES) \
+ $(nodist_jpeg_module_SOURCES) $(kernel_exec_SOURCES) \
+ $(nodist_kernel_exec_SOURCES) $(keylayouts_module_SOURCES) \
+ $(nodist_keylayouts_module_SOURCES) \
+ $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES) \
+ $(legacycfg_module_SOURCES) $(nodist_legacycfg_module_SOURCES) \
+ $(libusb_module_SOURCES) $(nodist_libusb_module_SOURCES) \
+ $(linux_module_SOURCES) $(nodist_linux_module_SOURCES) \
+ $(linux16_module_SOURCES) $(nodist_linux16_module_SOURCES) \
+ $(lnxboot_image_SOURCES) $(nodist_lnxboot_image_SOURCES) \
+ $(loadbios_module_SOURCES) $(nodist_loadbios_module_SOURCES) \
+ $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES) \
+ $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES) \
+ $(ls_module_SOURCES) $(nodist_ls_module_SOURCES) \
+ $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES) \
+ $(lsapm_module_SOURCES) $(nodist_lsapm_module_SOURCES) \
+ $(lsefimmap_module_SOURCES) $(nodist_lsefimmap_module_SOURCES) \
+ $(lsefisystab_module_SOURCES) \
+ $(nodist_lsefisystab_module_SOURCES) $(lsmmap_module_SOURCES) \
+ $(nodist_lsmmap_module_SOURCES) $(lspci_module_SOURCES) \
+ $(nodist_lspci_module_SOURCES) $(lssal_module_SOURCES) \
+ $(nodist_lssal_module_SOURCES) $(lsspd_module_SOURCES) \
+ $(nodist_lsspd_module_SOURCES) $(lvm_module_SOURCES) \
+ $(nodist_lvm_module_SOURCES) $(mdraid09_module_SOURCES) \
+ $(nodist_mdraid09_module_SOURCES) $(mdraid1x_module_SOURCES) \
+ $(nodist_mdraid1x_module_SOURCES) $(memdisk_module_SOURCES) \
+ $(nodist_memdisk_module_SOURCES) $(memrw_module_SOURCES) \
+ $(nodist_memrw_module_SOURCES) $(minicmd_module_SOURCES) \
+ $(nodist_minicmd_module_SOURCES) $(minix_module_SOURCES) \
+ $(nodist_minix_module_SOURCES) $(minix2_module_SOURCES) \
+ $(nodist_minix2_module_SOURCES) $(mmap_module_SOURCES) \
+ $(nodist_mmap_module_SOURCES) $(msdospart_module_SOURCES) \
+ $(nodist_msdospart_module_SOURCES) $(multiboot_module_SOURCES) \
+ $(nodist_multiboot_module_SOURCES) \
+ $(multiboot2_module_SOURCES) \
+ $(nodist_multiboot2_module_SOURCES) $(nand_module_SOURCES) \
+ $(nodist_nand_module_SOURCES) $(nilfs2_module_SOURCES) \
+ $(nodist_nilfs2_module_SOURCES) \
+ $(none_decompress_image_SOURCES) \
+ $(nodist_none_decompress_image_SOURCES) \
+ $(normal_module_SOURCES) $(nodist_normal_module_SOURCES) \
+ $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES) \
+ $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES) \
+ $(ntldr_module_SOURCES) $(nodist_ntldr_module_SOURCES) \
+ $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES) \
+ $(part_acorn_module_SOURCES) \
+ $(nodist_part_acorn_module_SOURCES) \
+ $(part_amiga_module_SOURCES) \
+ $(nodist_part_amiga_module_SOURCES) \
+ $(part_apple_module_SOURCES) \
+ $(nodist_part_apple_module_SOURCES) $(part_bsd_module_SOURCES) \
+ $(nodist_part_bsd_module_SOURCES) $(part_gpt_module_SOURCES) \
+ $(nodist_part_gpt_module_SOURCES) $(part_msdos_module_SOURCES) \
+ $(nodist_part_msdos_module_SOURCES) $(part_sun_module_SOURCES) \
+ $(nodist_part_sun_module_SOURCES) $(part_sunpc_module_SOURCES) \
+ $(nodist_part_sunpc_module_SOURCES) $(parttool_module_SOURCES) \
+ $(nodist_parttool_module_SOURCES) $(password_module_SOURCES) \
+ $(nodist_password_module_SOURCES) \
+ $(password_pbkdf2_module_SOURCES) \
+ $(nodist_password_pbkdf2_module_SOURCES) \
+ $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES) \
+ $(pci_module_SOURCES) $(nodist_pci_module_SOURCES) \
+ $(play_module_SOURCES) $(nodist_play_module_SOURCES) \
+ $(png_module_SOURCES) $(nodist_png_module_SOURCES) \
+ $(probe_module_SOURCES) $(nodist_probe_module_SOURCES) \
+ $(pxe_module_SOURCES) $(nodist_pxe_module_SOURCES) \
+ $(pxeboot_image_SOURCES) $(nodist_pxeboot_image_SOURCES) \
+ $(pxecmd_module_SOURCES) $(nodist_pxecmd_module_SOURCES) \
+ $(raid_module_SOURCES) $(nodist_raid_module_SOURCES) \
+ $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES) \
+ $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES) \
+ $(read_module_SOURCES) $(nodist_read_module_SOURCES) \
+ $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES) \
+ $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES) \
+ $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES) \
+ $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES) \
+ $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES) \
+ $(sdl_module_SOURCES) $(nodist_sdl_module_SOURCES) \
+ $(search_module_SOURCES) $(nodist_search_module_SOURCES) \
+ $(search_fs_file_module_SOURCES) \
+ $(nodist_search_fs_file_module_SOURCES) \
+ $(search_fs_uuid_module_SOURCES) \
+ $(nodist_search_fs_uuid_module_SOURCES) \
+ $(search_label_module_SOURCES) \
+ $(nodist_search_label_module_SOURCES) \
+ $(sendkey_module_SOURCES) $(nodist_sendkey_module_SOURCES) \
+ $(serial_module_SOURCES) $(nodist_serial_module_SOURCES) \
+ $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES) \
+ $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES) \
+ $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES) \
+ $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES) \
+ $(suspend_module_SOURCES) $(nodist_suspend_module_SOURCES) \
+ $(tar_module_SOURCES) $(nodist_tar_module_SOURCES) \
+ $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES) \
+ $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES) \
+ $(test_module_SOURCES) $(nodist_test_module_SOURCES) \
+ $(test_blockarg_module_SOURCES) \
+ $(nodist_test_blockarg_module_SOURCES) \
+ $(testload_module_SOURCES) $(nodist_testload_module_SOURCES) \
+ $(tga_module_SOURCES) $(nodist_tga_module_SOURCES) \
+ $(trig_module_SOURCES) $(nodist_trig_module_SOURCES) \
+ $(true_module_SOURCES) $(nodist_true_module_SOURCES) \
+ $(udf_module_SOURCES) $(nodist_udf_module_SOURCES) \
+ $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES) \
+ $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES) \
+ $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES) \
+ $(usb_module_SOURCES) $(nodist_usb_module_SOURCES) \
+ $(usb_keyboard_module_SOURCES) \
+ $(nodist_usb_keyboard_module_SOURCES) $(usbms_module_SOURCES) \
+ $(nodist_usbms_module_SOURCES) \
+ $(usbserial_common_module_SOURCES) \
+ $(nodist_usbserial_common_module_SOURCES) \
+ $(usbserial_ftdi_module_SOURCES) \
+ $(nodist_usbserial_ftdi_module_SOURCES) \
+ $(usbserial_pl2303_module_SOURCES) \
+ $(nodist_usbserial_pl2303_module_SOURCES) \
+ $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES) \
+ $(vbe_module_SOURCES) $(nodist_vbe_module_SOURCES) \
+ $(vga_module_SOURCES) $(nodist_vga_module_SOURCES) \
+ $(vga_text_module_SOURCES) $(nodist_vga_text_module_SOURCES) \
+ $(video_module_SOURCES) $(nodist_video_module_SOURCES) \
+ $(video_bochs_module_SOURCES) \
+ $(nodist_video_bochs_module_SOURCES) \
+ $(video_cirrus_module_SOURCES) \
+ $(nodist_video_cirrus_module_SOURCES) \
+ $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES) \
+ $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES) \
+ $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES) \
+ $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES) \
+ $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES) \
+ $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES) \
+ $(xz_decompress_image_SOURCES) \
+ $(nodist_xz_decompress_image_SOURCES) $(xzio_module_SOURCES) \
+ $(nodist_xzio_module_SOURCES) $(zfs_module_SOURCES) \
+ $(nodist_zfs_module_SOURCES) $(zfsinfo_module_SOURCES) \
+ $(nodist_zfsinfo_module_SOURCES)
+DIST_SOURCES = $(am__libgnulib_a_SOURCES_DIST) \
+ $(am__acpi_module_SOURCES_DIST) \
+ $(am__affs_module_SOURCES_DIST) $(am__afs_module_SOURCES_DIST) \
+ $(am__afs_be_module_SOURCES_DIST) \
+ $(am__aout_module_SOURCES_DIST) \
+ $(am__appleldr_module_SOURCES_DIST) \
+ $(am__at_keyboard_module_SOURCES_DIST) \
+ $(am__ata_module_SOURCES_DIST) \
+ $(am__ata_pthru_module_SOURCES_DIST) \
+ $(am__befs_module_SOURCES_DIST) \
+ $(am__befs_be_module_SOURCES_DIST) \
+ $(am__biosdisk_module_SOURCES_DIST) \
+ $(am__bitmap_module_SOURCES_DIST) \
+ $(am__bitmap_scale_module_SOURCES_DIST) \
+ $(am__blocklist_module_SOURCES_DIST) \
+ $(am__boot_image_SOURCES_DIST) $(am__boot_module_SOURCES_DIST) \
+ $(am__bsd_module_SOURCES_DIST) \
+ $(am__btrfs_module_SOURCES_DIST) \
+ $(am__bufio_module_SOURCES_DIST) \
+ $(am__cat_module_SOURCES_DIST) \
+ $(am__cdboot_image_SOURCES_DIST) \
+ $(am__chain_module_SOURCES_DIST) \
+ $(am__cmostest_module_SOURCES_DIST) \
+ $(am__cmp_module_SOURCES_DIST) \
+ $(am__configfile_module_SOURCES_DIST) \
+ $(am__cpio_module_SOURCES_DIST) \
+ $(am__cpuid_module_SOURCES_DIST) \
+ $(am__crypto_module_SOURCES_DIST) \
+ $(am__cs5536_module_SOURCES_DIST) \
+ $(am__date_module_SOURCES_DIST) \
+ $(am__datehook_module_SOURCES_DIST) \
+ $(am__datetime_module_SOURCES_DIST) \
+ $(am__diskboot_image_SOURCES_DIST) \
+ $(am__dm_nv_module_SOURCES_DIST) \
+ $(am__drivemap_module_SOURCES_DIST) \
+ $(am__echo_module_SOURCES_DIST) \
+ $(am__efi_gop_module_SOURCES_DIST) \
+ $(am__efi_uga_module_SOURCES_DIST) \
+ $(am__efiemu_module_SOURCES_DIST) \
+ $(am__elf_module_SOURCES_DIST) \
+ $(am__example_functional_test_module_SOURCES_DIST) \
+ $(am__ext2_module_SOURCES_DIST) \
+ $(am__extcmd_module_SOURCES_DIST) \
+ $(am__fat_module_SOURCES_DIST) \
+ $(am__fixvideo_module_SOURCES_DIST) \
+ $(am__font_module_SOURCES_DIST) \
+ $(am__fshelp_module_SOURCES_DIST) \
+ $(am__functional_test_module_SOURCES_DIST) \
+ $(am__fwstart_image_SOURCES_DIST) \
+ $(am__gcry_arcfour_module_SOURCES_DIST) \
+ $(am__gcry_blowfish_module_SOURCES_DIST) \
+ $(am__gcry_camellia_module_SOURCES_DIST) \
+ $(am__gcry_cast5_module_SOURCES_DIST) \
+ $(am__gcry_crc_module_SOURCES_DIST) \
+ $(am__gcry_des_module_SOURCES_DIST) \
+ $(am__gcry_md4_module_SOURCES_DIST) \
+ $(am__gcry_md5_module_SOURCES_DIST) \
+ $(am__gcry_rfc2268_module_SOURCES_DIST) \
+ $(am__gcry_rijndael_module_SOURCES_DIST) \
+ $(am__gcry_rmd160_module_SOURCES_DIST) \
+ $(am__gcry_seed_module_SOURCES_DIST) \
+ $(am__gcry_serpent_module_SOURCES_DIST) \
+ $(am__gcry_sha1_module_SOURCES_DIST) \
+ $(am__gcry_sha256_module_SOURCES_DIST) \
+ $(am__gcry_sha512_module_SOURCES_DIST) \
+ $(am__gcry_tiger_module_SOURCES_DIST) \
+ $(am__gcry_twofish_module_SOURCES_DIST) \
+ $(am__gcry_whirlpool_module_SOURCES_DIST) \
+ $(am__gettext_module_SOURCES_DIST) \
+ $(am__gfxmenu_module_SOURCES_DIST) \
+ $(am__gfxterm_module_SOURCES_DIST) \
+ $(am__gptsync_module_SOURCES_DIST) \
+ $(am__grub_emu_SOURCES_DIST) $(am__grub_emu_lite_SOURCES_DIST) \
+ $(am__gzio_module_SOURCES_DIST) \
+ $(am__halt_module_SOURCES_DIST) \
+ $(am__hashsum_module_SOURCES_DIST) \
+ $(am__hdparm_module_SOURCES_DIST) \
+ $(am__hello_module_SOURCES_DIST) \
+ $(am__help_module_SOURCES_DIST) \
+ $(am__hexdump_module_SOURCES_DIST) \
+ $(am__hfs_module_SOURCES_DIST) \
+ $(am__hfsplus_module_SOURCES_DIST) \
+ $(am__ieee1275_fb_module_SOURCES_DIST) \
+ $(am__iorw_module_SOURCES_DIST) \
+ $(am__iso9660_module_SOURCES_DIST) \
+ $(am__jfs_module_SOURCES_DIST) $(am__jpeg_module_SOURCES_DIST) \
+ $(am__kernel_exec_SOURCES_DIST) \
+ $(am__keylayouts_module_SOURCES_DIST) \
+ $(am__keystatus_module_SOURCES_DIST) \
+ $(am__legacycfg_module_SOURCES_DIST) \
+ $(am__libusb_module_SOURCES_DIST) \
+ $(am__linux_module_SOURCES_DIST) \
+ $(am__linux16_module_SOURCES_DIST) \
+ $(am__lnxboot_image_SOURCES_DIST) \
+ $(am__loadbios_module_SOURCES_DIST) \
+ $(am__loadenv_module_SOURCES_DIST) \
+ $(am__loopback_module_SOURCES_DIST) \
+ $(am__ls_module_SOURCES_DIST) \
+ $(am__lsacpi_module_SOURCES_DIST) \
+ $(am__lsapm_module_SOURCES_DIST) \
+ $(am__lsefimmap_module_SOURCES_DIST) \
+ $(am__lsefisystab_module_SOURCES_DIST) \
+ $(am__lsmmap_module_SOURCES_DIST) \
+ $(am__lspci_module_SOURCES_DIST) \
+ $(am__lssal_module_SOURCES_DIST) \
+ $(am__lsspd_module_SOURCES_DIST) \
+ $(am__lvm_module_SOURCES_DIST) \
+ $(am__mdraid09_module_SOURCES_DIST) \
+ $(am__mdraid1x_module_SOURCES_DIST) \
+ $(am__memdisk_module_SOURCES_DIST) \
+ $(am__memrw_module_SOURCES_DIST) \
+ $(am__minicmd_module_SOURCES_DIST) \
+ $(am__minix_module_SOURCES_DIST) \
+ $(am__minix2_module_SOURCES_DIST) \
+ $(am__mmap_module_SOURCES_DIST) \
+ $(am__msdospart_module_SOURCES_DIST) \
+ $(am__multiboot_module_SOURCES_DIST) \
+ $(am__multiboot2_module_SOURCES_DIST) \
+ $(am__nand_module_SOURCES_DIST) \
+ $(am__nilfs2_module_SOURCES_DIST) \
+ $(am__none_decompress_image_SOURCES_DIST) \
+ $(am__normal_module_SOURCES_DIST) \
+ $(am__ntfs_module_SOURCES_DIST) \
+ $(am__ntfscomp_module_SOURCES_DIST) \
+ $(am__ntldr_module_SOURCES_DIST) \
+ $(am__ohci_module_SOURCES_DIST) \
+ $(am__part_acorn_module_SOURCES_DIST) \
+ $(am__part_amiga_module_SOURCES_DIST) \
+ $(am__part_apple_module_SOURCES_DIST) \
+ $(am__part_bsd_module_SOURCES_DIST) \
+ $(am__part_gpt_module_SOURCES_DIST) \
+ $(am__part_msdos_module_SOURCES_DIST) \
+ $(am__part_sun_module_SOURCES_DIST) \
+ $(am__part_sunpc_module_SOURCES_DIST) \
+ $(am__parttool_module_SOURCES_DIST) \
+ $(am__password_module_SOURCES_DIST) \
+ $(am__password_pbkdf2_module_SOURCES_DIST) \
+ $(am__pbkdf2_module_SOURCES_DIST) \
+ $(am__pci_module_SOURCES_DIST) $(am__play_module_SOURCES_DIST) \
+ $(am__png_module_SOURCES_DIST) \
+ $(am__probe_module_SOURCES_DIST) \
+ $(am__pxe_module_SOURCES_DIST) \
+ $(am__pxeboot_image_SOURCES_DIST) \
+ $(am__pxecmd_module_SOURCES_DIST) \
+ $(am__raid_module_SOURCES_DIST) \
+ $(am__raid5rec_module_SOURCES_DIST) \
+ $(am__raid6rec_module_SOURCES_DIST) \
+ $(am__read_module_SOURCES_DIST) \
+ $(am__reboot_module_SOURCES_DIST) \
+ $(am__regexp_module_SOURCES_DIST) \
+ $(am__reiserfs_module_SOURCES_DIST) \
+ $(am__relocator_module_SOURCES_DIST) \
+ $(am__scsi_module_SOURCES_DIST) $(am__sdl_module_SOURCES_DIST) \
+ $(am__search_module_SOURCES_DIST) \
+ $(am__search_fs_file_module_SOURCES_DIST) \
+ $(am__search_fs_uuid_module_SOURCES_DIST) \
+ $(am__search_label_module_SOURCES_DIST) \
+ $(am__sendkey_module_SOURCES_DIST) \
+ $(am__serial_module_SOURCES_DIST) \
+ $(am__setjmp_module_SOURCES_DIST) \
+ $(am__setpci_module_SOURCES_DIST) \
+ $(am__sfs_module_SOURCES_DIST) \
+ $(am__sleep_module_SOURCES_DIST) \
+ $(am__suspend_module_SOURCES_DIST) \
+ $(am__tar_module_SOURCES_DIST) \
+ $(am__terminal_module_SOURCES_DIST) \
+ $(am__terminfo_module_SOURCES_DIST) \
+ $(am__test_module_SOURCES_DIST) \
+ $(am__test_blockarg_module_SOURCES_DIST) \
+ $(am__testload_module_SOURCES_DIST) \
+ $(am__tga_module_SOURCES_DIST) $(trig_module_SOURCES) \
+ $(am__true_module_SOURCES_DIST) $(am__udf_module_SOURCES_DIST) \
+ $(am__ufs1_module_SOURCES_DIST) \
+ $(am__ufs2_module_SOURCES_DIST) \
+ $(am__uhci_module_SOURCES_DIST) $(am__usb_module_SOURCES_DIST) \
+ $(am__usb_keyboard_module_SOURCES_DIST) \
+ $(am__usbms_module_SOURCES_DIST) \
+ $(am__usbserial_common_module_SOURCES_DIST) \
+ $(am__usbserial_ftdi_module_SOURCES_DIST) \
+ $(am__usbserial_pl2303_module_SOURCES_DIST) \
+ $(am__usbtest_module_SOURCES_DIST) \
+ $(am__vbe_module_SOURCES_DIST) $(am__vga_module_SOURCES_DIST) \
+ $(am__vga_text_module_SOURCES_DIST) \
+ $(am__video_module_SOURCES_DIST) \
+ $(am__video_bochs_module_SOURCES_DIST) \
+ $(am__video_cirrus_module_SOURCES_DIST) \
+ $(am__video_fb_module_SOURCES_DIST) \
+ $(am__videoinfo_module_SOURCES_DIST) \
+ $(am__videotest_module_SOURCES_DIST) \
+ $(am__xfs_module_SOURCES_DIST) $(am__xnu_module_SOURCES_DIST) \
+ $(am__xnu_uuid_module_SOURCES_DIST) \
+ $(am__xz_decompress_image_SOURCES_DIST) \
+ $(am__xzio_module_SOURCES_DIST) $(am__zfs_module_SOURCES_DIST) \
+ $(am__zfsinfo_module_SOURCES_DIST)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+am__dist_noinst_DATA_DIST = gensyminfo.sh.in genmod.sh.in
+DATA = $(dist_noinst_DATA) $(grubconf_DATA) $(noinst_DATA) \
+ $(pkglib_DATA) $(platform_DATA)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADDR32 = @ADDR32@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+BSS_START_SYMBOL = @BSS_START_SYMBOL@
+BUILD_CC = @BUILD_CC@
+CC = $(TARGET_CC)
+CCAS = $(TARGET_CC)
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CMP = @CMP@
+CPP = $(TARGET_CC)
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATA32 = @DATA32@
+DEFS = @DEFS@
+DEPDIR = .deps-core
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+END_SYMBOL = @END_SYMBOL@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+EXEEXT = @EXEEXT@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+FONT_SOURCE = @FONT_SOURCE@
+FREETYPE = @FREETYPE@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNCAT = @GNULIB_STRNCAT@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_TMPFILE = @GNULIB_TMPFILE@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GNULIB__EXIT = @GNULIB__EXIT@
+GREP = @GREP@
+GRUB_BOOT_MACHINE_LINK_ADDR = @GRUB_BOOT_MACHINE_LINK_ADDR@
+HAVE_ASM_USCORE = @HAVE_ASM_USCORE@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
+HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMP = @HAVE_MKSTEMP@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TTYNAME_R = @HAVE_TTYNAME_R@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+HELP2MAN = @HELP2MAN@
+HOST_CC = @HOST_CC@
+HOST_CCASFLAGS = @HOST_CCASFLAGS@
+HOST_CFLAGS = @HOST_CFLAGS@
+HOST_CPPFLAGS = @HOST_CPPFLAGS@
+HOST_LDFLAGS = @HOST_LDFLAGS@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBCURSES = @LIBCURSES@
+LIBDEVMAPPER = @LIBDEVMAPPER@
+LIBGEOM = @LIBGEOM@
+LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
+LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBLZMA = @LIBLZMA@
+LIBNVPAIR = @LIBNVPAIR@
+LIBOBJS = @LIBOBJS@
+LIBPCIACCESS = @LIBPCIACCESS@
+LIBS = @LIBS@
+LIBSDL = @LIBSDL@
+LIBUSB = @LIBUSB@
+LIBUTIL = @LIBUTIL@
+LIBZFS = @LIBZFS@
+LN_S = @LN_S@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEED_ENABLE_EXECUTE_STACK = @NEED_ENABLE_EXECUTE_STACK@
+NEED_REGISTER_FRAME_INFO = @NEED_REGISTER_FRAME_INFO@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@
+NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+NM = @NM@
+OBJCONV = @OBJCONV@
+OBJCOPY = @OBJCOPY@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYSEXITS_H = @SYSEXITS_H@
+TARGET_APPLE_CC = @TARGET_APPLE_CC@
+TARGET_CC = @TARGET_CC@
+TARGET_CCAS = @TARGET_CCAS@
+TARGET_CCASFLAGS = @TARGET_CCASFLAGS@
+TARGET_CFLAGS = @TARGET_CFLAGS@ $(am__append_9)
+TARGET_CPP = @TARGET_CPP@
+TARGET_CPPFLAGS = @TARGET_CPPFLAGS@
+TARGET_IMG_BASE_LDOPT = @TARGET_IMG_BASE_LDOPT@
+TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
+TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
+TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
+TARGET_LDFLAGS = @TARGET_LDFLAGS@
+TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
+TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_APPLE_CC_FIXES = @USE_APPLE_CC_FIXES@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_TARGET_CC = @ac_ct_TARGET_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+bootdirname = @bootdirname@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+enable_efiemu = @enable_efiemu@
+enable_grub_emu_pci = @enable_grub_emu_pci@
+enable_grub_emu_sdl = @enable_grub_emu_sdl@
+enable_grub_emu_usb = @enable_grub_emu_usb@
+enable_grub_mkfont = @enable_grub_mkfont@
+exec_prefix = @exec_prefix@
+freetype_cflags = @freetype_cflags@
+freetype_libs = @freetype_libs@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
+gltests_WITNESS = @gltests_WITNESS@
+grubdirname = @grubdirname@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_kernel = @host_kernel@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkglibrootdir = @pkglibrootdir@
+platform = @platform@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+CFLAGS_PLATFORM = $(am__append_1) $(am__append_2) $(am__append_3) \
+ $(am__append_4) $(am__append_5) $(am__append_6) \
+ $(am__append_7)
+@COND_i386_efi_TRUE@LDFLAGS_PLATFORM = -melf_i386
+@COND_sparc64_ieee1275_TRUE@LDFLAGS_PLATFORM = -melf64_sparc -mno-relax
+@COND_x86_64_efi_TRUE@LDFLAGS_PLATFORM = -melf_x86_64
+@COND_mips_yeeloong_TRUE@CPPFLAGS_PLATFORM = -DUSE_ASCII_FAILBACK
+@COND_mips_yeeloong_TRUE@CCASFLAGS_PLATFORM = -march=mips3
+
+# Other options
+CPPFLAGS_DEFAULT = -DGRUB_FILE=\"$(subst $(srcdir)/,,$<)\" \
+ -I$(builddir) -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) \
+ -I$(top_srcdir)/include -I$(top_builddir)/include
+CCASFLAGS_DEFAULT = -DASM_FILE=1
+LDADD_KERNEL = $(am__append_8)
+CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
+LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc
+CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
+CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
+@COND_CYGWIN_FALSE@STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment
+@COND_CYGWIN_TRUE@STRIPFLAGS_KERNEL = -F elf32-i386 -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve
+CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
+LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d
+CPPFLAGS_MODULE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
+CCASFLAGS_MODULE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
+CFLAGS_IMAGE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -fno-builtin
+LDFLAGS_IMAGE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-S
+CPPFLAGS_IMAGE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
+CCASFLAGS_IMAGE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
+CFLAGS_PROGRAM = $(CFLAGS_PLATFORM)
+LDFLAGS_PROGRAM = $(LDFLAGS_PLATFORM)
+CPPFLAGS_PROGRAM = $(CPPFLAGS_PLATFORM)
+CCASFLAGS_PROGRAM = $(CCASFLAGS_PLATFORM)
+CFLAGS_LIBRARY = $(CFLAGS_PLATFORM) -fno-builtin
+CPPFLAGS_LIBRARY = $(CPPFLAGS_PLATFORM)
+CCASFLAGS_LIBRARY = $(CCASFLAGS_PLATFORM)
+
+# Other variables
+grubconfdir = $(sysconfdir)/grub.d
+grubdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`
+platformdir = $(pkglibrootdir)/$(target_cpu)-$(platform)
+CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers
+CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap
+CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter
+CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/gnulib -I$(top_srcdir)/grub-core/gnulib
+CFLAGS_POSIX = -fno-builtin
+CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
+CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
+
+# List file macros for recognizing /interesting/ modules
+CPPFLAGS_FS_LIST = -Dgrub_fs_register=FS_LIST_MARKER
+CPPFLAGS_VIDEO_LIST = -Dgrub_video_register=VIDEO_LIST_MARKER
+CPPFLAGS_PARTMAP_LIST = -Dgrub_partition_map_register=PARTMAP_LIST_MARKER
+CPPFLAGS_PARTTOOL_LIST = -Dgrub_parttool_register=PARTTOOL_LIST_MARKER
+CPPFLAGS_TERMINAL_LIST = '-Dgrub_term_register_input(...)=INPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)' \
+ '-Dgrub_term_register_output(...)=OUTPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)'
+CPPFLAGS_COMMAND_LIST = '-Dgrub_register_command(...)=COMMAND_LIST_MARKER(__VA_ARGS__)' \
+ '-Dgrub_register_extcmd(...)=EXTCOMMAND_LIST_MARKER(__VA_ARGS__)' \
+ '-Dgrub_register_command_p1(...)=P1COMMAND_LIST_MARKER(__VA_ARGS__)'
+CPPFLAGS_MARKER = $(CPPFLAGS_FS_LIST) $(CPPFLAGS_VIDEO_LIST) \
+ $(CPPFLAGS_PARTTOOL_LIST) $(CPPFLAGS_PARTMAP_LIST) \
+ $(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST)
+
+
+# Define these variables to calm down automake
+IMG_FILES =
+MOD_FILES = $(am__append_15) $(am__append_22) $(am__append_29) \
+ $(am__append_36) $(am__append_43) $(am__append_50) \
+ $(am__append_57) $(am__append_64) $(am__append_71) \
+ $(am__append_78) $(am__append_85) $(am__append_92) \
+ $(am__append_99) $(am__append_106) $(am__append_113) \
+ $(am__append_120) $(am__append_127) $(am__append_134) \
+ $(am__append_141) $(am__append_148) $(am__append_155) \
+ $(am__append_162) $(am__append_169) $(am__append_176) \
+ $(am__append_183) $(am__append_190) $(am__append_197) \
+ $(am__append_204) $(am__append_211) $(am__append_218) \
+ $(am__append_225) $(am__append_232) $(am__append_239) \
+ $(am__append_246) $(am__append_253) $(am__append_260) \
+ $(am__append_267) $(am__append_274) $(am__append_281) \
+ $(am__append_288) $(am__append_295) $(am__append_302) \
+ $(am__append_309) $(am__append_316) $(am__append_323) \
+ $(am__append_330) $(am__append_337) $(am__append_344) \
+ $(am__append_351) $(am__append_358) $(am__append_365) \
+ $(am__append_372) $(am__append_379) $(am__append_386) \
+ $(am__append_393) $(am__append_400) $(am__append_407) \
+ $(am__append_414) $(am__append_421) $(am__append_428) \
+ $(am__append_435) $(am__append_442) $(am__append_449) \
+ $(am__append_456) $(am__append_463) $(am__append_470) \
+ $(am__append_477) $(am__append_484) $(am__append_491) \
+ $(am__append_498) $(am__append_505) $(am__append_512) \
+ $(am__append_519) $(am__append_526) $(am__append_533) \
+ $(am__append_540) $(am__append_547) $(am__append_554) \
+ $(am__append_561) $(am__append_568) $(am__append_575) \
+ $(am__append_582) $(am__append_589) $(am__append_596) \
+ $(am__append_603) $(am__append_610) $(am__append_617) \
+ $(am__append_624) $(am__append_631) $(am__append_638) \
+ $(am__append_645) $(am__append_652) $(am__append_659) \
+ $(am__append_666) $(am__append_673) $(am__append_680) \
+ $(am__append_687) $(am__append_694) $(am__append_701) \
+ $(am__append_708) $(am__append_715) $(am__append_722) \
+ $(am__append_729) $(am__append_736) $(am__append_743) \
+ $(am__append_750) $(am__append_757) $(am__append_764) \
+ $(am__append_771) $(am__append_778) $(am__append_785) \
+ $(am__append_792) $(am__append_799) $(am__append_806) \
+ $(am__append_813) $(am__append_820) $(am__append_827) \
+ $(am__append_834) $(am__append_841) $(am__append_848) \
+ $(am__append_855) $(am__append_862) $(am__append_869) \
+ $(am__append_876) $(am__append_883) $(am__append_890) \
+ $(am__append_897) $(am__append_904) $(am__append_911) \
+ $(am__append_918) $(am__append_925) $(am__append_932) \
+ $(am__append_939) $(am__append_946) $(am__append_953) \
+ $(am__append_960) $(am__append_967) $(am__append_974) \
+ $(am__append_981) $(am__append_988) $(am__append_995) \
+ $(am__append_1002) $(am__append_1009) $(am__append_1016) \
+ $(am__append_1023) $(am__append_1030) $(am__append_1037) \
+ $(am__append_1044) $(am__append_1051) $(am__append_1058) \
+ $(am__append_1065) $(am__append_1072) $(am__append_1079) \
+ $(am__append_1086) $(am__append_1093) $(am__append_1100) \
+ $(am__append_1107) $(am__append_1114) $(am__append_1121) \
+ $(am__append_1128) $(am__append_1135) $(am__append_1142) \
+ $(am__append_1149) $(am__append_1156) $(am__append_1163) \
+ $(am__append_1170) $(am__append_1177) $(am__append_1184) \
+ $(am__append_1191) $(am__append_1198) $(am__append_1205) \
+ $(am__append_1212) $(am__append_1219) $(am__append_1226) \
+ $(am__append_1233) $(am__append_1240) $(am__append_1247) \
+ $(am__append_1254) $(am__append_1261) $(am__append_1268) \
+ $(am__append_1275) $(am__append_1282) $(am__append_1289) \
+ $(am__append_1296) $(am__append_1303) $(am__append_1310) \
+ $(am__append_1317) $(am__append_1324) $(am__append_1331) \
+ $(am__append_1338) $(am__append_1345) $(am__append_1352) \
+ $(am__append_1359) $(am__append_1366) $(am__append_1373) \
+ $(am__append_1380) $(am__append_1387) $(am__append_1394) \
+ $(am__append_1401) $(am__append_1408) $(am__append_1415) \
+ $(am__append_1422) $(am__append_1429) $(am__append_1436) \
+ $(am__append_1443) $(am__append_1450) $(am__append_1457) \
+ $(am__append_1464) $(am__append_1471) $(am__append_1478) \
+ $(am__append_1485) $(am__append_1492) $(am__append_1499) \
+ $(am__append_1506) $(am__append_1513) $(am__append_1520) \
+ $(am__append_1527) $(am__append_1534) $(am__append_1541) \
+ $(am__append_1548) $(am__append_1555) $(am__append_1562) \
+ $(am__append_1569) $(am__append_1576) $(am__append_1583) \
+ $(am__append_1590) $(am__append_1597) $(am__append_1604) \
+ $(am__append_1611) $(am__append_1618) $(am__append_1625) \
+ $(am__append_1632) $(am__append_1639) $(am__append_1646) \
+ $(am__append_1653) $(am__append_1660) $(am__append_1667) \
+ $(am__append_1674) $(am__append_1681) $(am__append_1688) \
+ $(am__append_1695) $(am__append_1702) $(am__append_1709) \
+ $(am__append_1716) $(am__append_1723) $(am__append_1730) \
+ $(am__append_1737) $(am__append_1744) $(am__append_1751) \
+ $(am__append_1758) $(am__append_1765) $(am__append_1772) \
+ $(am__append_1779) $(am__append_1786) $(am__append_1793) \
+ $(am__append_1800) $(am__append_1807) $(am__append_1814) \
+ $(am__append_1821) $(am__append_1828) $(am__append_1835) \
+ $(am__append_1842) $(am__append_1849) $(am__append_1856) \
+ $(am__append_1863) $(am__append_1870) $(am__append_1877) \
+ $(am__append_1884) $(am__append_1891) $(am__append_1898) \
+ $(am__append_1905) $(am__append_1912) $(am__append_1919) \
+ $(am__append_1926) $(am__append_1933) $(am__append_1940) \
+ $(am__append_1947) $(am__append_1954) $(am__append_1961) \
+ $(am__append_1968) $(am__append_1975) $(am__append_1982) \
+ $(am__append_1989) $(am__append_1996) $(am__append_2003) \
+ $(am__append_2010) $(am__append_2017) $(am__append_2024) \
+ $(am__append_2031) $(am__append_2038) $(am__append_2045) \
+ $(am__append_2052) $(am__append_2059) $(am__append_2066) \
+ $(am__append_2073) $(am__append_2080) $(am__append_2087) \
+ $(am__append_2094) $(am__append_2101) $(am__append_2108) \
+ $(am__append_2115) $(am__append_2122) $(am__append_2129) \
+ $(am__append_2136) $(am__append_2143) $(am__append_2150) \
+ $(am__append_2157) $(am__append_2164) $(am__append_2171) \
+ $(am__append_2178) $(am__append_2185) $(am__append_2192) \
+ $(am__append_2199) $(am__append_2206) $(am__append_2213) \
+ $(am__append_2220) $(am__append_2227) $(am__append_2234) \
+ $(am__append_2241) $(am__append_2248) $(am__append_2255) \
+ $(am__append_2262) $(am__append_2269) $(am__append_2276) \
+ $(am__append_2283) $(am__append_2290) $(am__append_2297) \
+ $(am__append_2304) $(am__append_2311) $(am__append_2318) \
+ $(am__append_2325) $(am__append_2332) $(am__append_2339) \
+ $(am__append_2346) $(am__append_2353) $(am__append_2360) \
+ $(am__append_2367) $(am__append_2374) $(am__append_2381) \
+ $(am__append_2388) $(am__append_2395) $(am__append_2402) \
+ $(am__append_2409) $(am__append_2416) $(am__append_2423) \
+ $(am__append_2430) $(am__append_2437) $(am__append_2444) \
+ $(am__append_2451) $(am__append_2458) $(am__append_2465) \
+ $(am__append_2472) $(am__append_2479) $(am__append_2486) \
+ $(am__append_2493) $(am__append_2500) $(am__append_2507) \
+ $(am__append_2514) $(am__append_2521) $(am__append_2528) \
+ $(am__append_2535) $(am__append_2542) $(am__append_2549) \
+ $(am__append_2556) $(am__append_2563) $(am__append_2570) \
+ $(am__append_2577) $(am__append_2584) $(am__append_2591) \
+ $(am__append_2598) $(am__append_2605) $(am__append_2612) \
+ $(am__append_2619) $(am__append_2626) $(am__append_2633) \
+ $(am__append_2640) $(am__append_2647) $(am__append_2654) \
+ $(am__append_2661) $(am__append_2668) $(am__append_2675) \
+ $(am__append_2682) $(am__append_2689) $(am__append_2696) \
+ $(am__append_2703) $(am__append_2710) $(am__append_2717) \
+ $(am__append_2724) $(am__append_2731) $(am__append_2738) \
+ $(am__append_2745) $(am__append_2752) $(am__append_2759) \
+ $(am__append_2766) $(am__append_2773) $(am__append_2780) \
+ $(am__append_2787) $(am__append_2794) $(am__append_2801) \
+ $(am__append_2808) $(am__append_2815) $(am__append_2822) \
+ $(am__append_2829) $(am__append_2836) $(am__append_2843) \
+ $(am__append_2850) $(am__append_2857) $(am__append_2864) \
+ $(am__append_2871) $(am__append_2878) $(am__append_2885) \
+ $(am__append_2892) $(am__append_2899) $(am__append_2906) \
+ $(am__append_2913) $(am__append_2920) $(am__append_2927) \
+ $(am__append_2934) $(am__append_2941) $(am__append_2948) \
+ $(am__append_2955) $(am__append_2962) $(am__append_2969) \
+ $(am__append_2976) $(am__append_2983) $(am__append_2990) \
+ $(am__append_2997) $(am__append_3004) $(am__append_3011) \
+ $(am__append_3018) $(am__append_3025) $(am__append_3032) \
+ $(am__append_3039) $(am__append_3046) $(am__append_3053) \
+ $(am__append_3060) $(am__append_3067) $(am__append_3074) \
+ $(am__append_3081) $(am__append_3088) $(am__append_3095) \
+ $(am__append_3102) $(am__append_3109) $(am__append_3116) \
+ $(am__append_3123) $(am__append_3130) $(am__append_3137) \
+ $(am__append_3144) $(am__append_3151) $(am__append_3158) \
+ $(am__append_3165) $(am__append_3172) $(am__append_3179) \
+ $(am__append_3186) $(am__append_3193) $(am__append_3200) \
+ $(am__append_3207) $(am__append_3214) $(am__append_3221) \
+ $(am__append_3228) $(am__append_3235) $(am__append_3242) \
+ $(am__append_3249) $(am__append_3256) $(am__append_3263) \
+ $(am__append_3270) $(am__append_3277) $(am__append_3284) \
+ $(am__append_3291) $(am__append_3298) $(am__append_3305) \
+ $(am__append_3312) $(am__append_3319) $(am__append_3326) \
+ $(am__append_3333) $(am__append_3340) $(am__append_3347) \
+ $(am__append_3354) $(am__append_3361) $(am__append_3368) \
+ $(am__append_3375) $(am__append_3382) $(am__append_3389) \
+ $(am__append_3396) $(am__append_3403) $(am__append_3410) \
+ $(am__append_3417) $(am__append_3424) $(am__append_3431) \
+ $(am__append_3438) $(am__append_3445) $(am__append_3452) \
+ $(am__append_3459) $(am__append_3466) $(am__append_3473) \
+ $(am__append_3480) $(am__append_3487) $(am__append_3494) \
+ $(am__append_3501) $(am__append_3508) $(am__append_3515) \
+ $(am__append_3522) $(am__append_3529) $(am__append_3536) \
+ $(am__append_3543) $(am__append_3550) $(am__append_3557) \
+ $(am__append_3564) $(am__append_3571) $(am__append_3578) \
+ $(am__append_3585) $(am__append_3592) $(am__append_3599) \
+ $(am__append_3606) $(am__append_3613) $(am__append_3620) \
+ $(am__append_3627) $(am__append_3634) $(am__append_3641) \
+ $(am__append_3648) $(am__append_3655) $(am__append_3662) \
+ $(am__append_3669) $(am__append_3676) $(am__append_3683) \
+ $(am__append_3690) $(am__append_3697) $(am__append_3704) \
+ $(am__append_3711) $(am__append_3718) $(am__append_3725) \
+ $(am__append_3732) $(am__append_3739) $(am__append_3746) \
+ $(am__append_3753) $(am__append_3760) $(am__append_3767) \
+ $(am__append_3774) $(am__append_3781) $(am__append_3788) \
+ $(am__append_3795) $(am__append_3802) $(am__append_3809) \
+ $(am__append_3816) $(am__append_3823) $(am__append_3830) \
+ $(am__append_3837) $(am__append_3844) $(am__append_3851) \
+ $(am__append_3858) $(am__append_3865) $(am__append_3872) \
+ $(am__append_3879) $(am__append_3886) $(am__append_3893) \
+ $(am__append_3900) $(am__append_3907) $(am__append_3914) \
+ $(am__append_3921) $(am__append_3928) $(am__append_3935) \
+ $(am__append_3942) $(am__append_3949) $(am__append_3956) \
+ $(am__append_3963) $(am__append_3970) $(am__append_3977) \
+ $(am__append_3984) $(am__append_3991) $(am__append_3998) \
+ $(am__append_4005) $(am__append_4012) $(am__append_4019) \
+ $(am__append_4026) $(am__append_4033) $(am__append_4040) \
+ $(am__append_4047) $(am__append_4054) $(am__append_4061) \
+ $(am__append_4068) $(am__append_4075) $(am__append_4082) \
+ $(am__append_4089) $(am__append_4096) $(am__append_4103) \
+ $(am__append_4110) $(am__append_4117) $(am__append_4124) \
+ $(am__append_4131) $(am__append_4138) $(am__append_4145) \
+ $(am__append_4152) $(am__append_4159) $(am__append_4166) \
+ $(am__append_4173) $(am__append_4180) $(am__append_4187) \
+ $(am__append_4194) $(am__append_4201) $(am__append_4208) \
+ $(am__append_4215) $(am__append_4222) $(am__append_4229) \
+ $(am__append_4236) $(am__append_4243) $(am__append_4250) \
+ $(am__append_4257) $(am__append_4264) $(am__append_4271) \
+ $(am__append_4278) $(am__append_4285) $(am__append_4292) \
+ $(am__append_4299) $(am__append_4306) $(am__append_4313) \
+ $(am__append_4320) $(am__append_4327) $(am__append_4334) \
+ $(am__append_4341) $(am__append_4348) $(am__append_4355) \
+ $(am__append_4362) $(am__append_4369) $(am__append_4376) \
+ $(am__append_4383) $(am__append_4390) $(am__append_4397) \
+ $(am__append_4404) $(am__append_4411) $(am__append_4418) \
+ $(am__append_4425) $(am__append_4432) $(am__append_4439) \
+ $(am__append_4446) $(am__append_4453) $(am__append_4460) \
+ $(am__append_4467) $(am__append_4474) $(am__append_4481) \
+ $(am__append_4488) $(am__append_4495) $(am__append_4502) \
+ $(am__append_4509) $(am__append_4516) $(am__append_4523) \
+ $(am__append_4530) $(am__append_4537) $(am__append_4544) \
+ $(am__append_4551) $(am__append_4558) $(am__append_4565) \
+ $(am__append_4572) $(am__append_4579) $(am__append_4586) \
+ $(am__append_4593) $(am__append_4600) $(am__append_4607) \
+ $(am__append_4614) $(am__append_4621) $(am__append_4628) \
+ $(am__append_4635) $(am__append_4642) $(am__append_4649) \
+ $(am__append_4656) $(am__append_4663) $(am__append_4670) \
+ $(am__append_4677) $(am__append_4684) $(am__append_4691) \
+ $(am__append_4698) $(am__append_4705) $(am__append_4712) \
+ $(am__append_4719) $(am__append_4726) $(am__append_4733) \
+ $(am__append_4740) $(am__append_4747) $(am__append_4754) \
+ $(am__append_4761) $(am__append_4768) $(am__append_4775) \
+ $(am__append_4782) $(am__append_4789) $(am__append_4796) \
+ $(am__append_4803) $(am__append_4810) $(am__append_4817) \
+ $(am__append_4824) $(am__append_4831) $(am__append_4838) \
+ $(am__append_4845) $(am__append_4852) $(am__append_4859) \
+ $(am__append_4866) $(am__append_4873) $(am__append_4880) \
+ $(am__append_4887) $(am__append_4894) $(am__append_4901) \
+ $(am__append_4908) $(am__append_4915) $(am__append_4922) \
+ $(am__append_4929) $(am__append_4936) $(am__append_4943) \
+ $(am__append_4950) $(am__append_4957) $(am__append_4964) \
+ $(am__append_4971) $(am__append_4978) $(am__append_4985) \
+ $(am__append_4992) $(am__append_4999) $(am__append_5006) \
+ $(am__append_5013) $(am__append_5020) $(am__append_5027) \
+ $(am__append_5034) $(am__append_5041) $(am__append_5048) \
+ $(am__append_5055) $(am__append_5062) $(am__append_5069) \
+ $(am__append_5076) $(am__append_5083) $(am__append_5090) \
+ $(am__append_5097) $(am__append_5104) $(am__append_5111) \
+ $(am__append_5118) $(am__append_5125) $(am__append_5132) \
+ $(am__append_5139) $(am__append_5146) $(am__append_5153) \
+ $(am__append_5160) $(am__append_5167) $(am__append_5174) \
+ $(am__append_5181) $(am__append_5188) $(am__append_5195) \
+ $(am__append_5202) $(am__append_5209) $(am__append_5216) \
+ $(am__append_5223) $(am__append_5230) $(am__append_5237) \
+ $(am__append_5244) $(am__append_5251) $(am__append_5258) \
+ $(am__append_5265) $(am__append_5272) $(am__append_5279) \
+ $(am__append_5286) $(am__append_5293) $(am__append_5300) \
+ $(am__append_5307) $(am__append_5314) $(am__append_5321) \
+ $(am__append_5328) $(am__append_5335) $(am__append_5342) \
+ $(am__append_5349) $(am__append_5356) $(am__append_5363) \
+ $(am__append_5370) $(am__append_5377) $(am__append_5384) \
+ $(am__append_5391) $(am__append_5398) $(am__append_5405) \
+ $(am__append_5412) $(am__append_5419) $(am__append_5426) \
+ $(am__append_5433) $(am__append_5440) $(am__append_5447) \
+ $(am__append_5454) $(am__append_5461) $(am__append_5468) \
+ $(am__append_5475) $(am__append_5482) $(am__append_5489) \
+ $(am__append_5496) $(am__append_5503) $(am__append_5510) \
+ $(am__append_5517) $(am__append_5524) $(am__append_5531) \
+ $(am__append_5538) $(am__append_5545) $(am__append_5552) \
+ $(am__append_5559) $(am__append_5566) $(am__append_5573) \
+ $(am__append_5580) $(am__append_5587) $(am__append_5594) \
+ $(am__append_5601) $(am__append_5608) $(am__append_5615) \
+ $(am__append_5622) $(am__append_5629) $(am__append_5636) \
+ $(am__append_5643) $(am__append_5650) $(am__append_5657) \
+ $(am__append_5664) $(am__append_5671) $(am__append_5678) \
+ $(am__append_5685) $(am__append_5692) $(am__append_5699) \
+ $(am__append_5706) $(am__append_5713) $(am__append_5720) \
+ $(am__append_5727) $(am__append_5734) $(am__append_5741) \
+ $(am__append_5748) $(am__append_5755) $(am__append_5762) \
+ $(am__append_5769) $(am__append_5776) $(am__append_5783) \
+ $(am__append_5790) $(am__append_5797) $(am__append_5804) \
+ $(am__append_5811) $(am__append_5818) $(am__append_5825) \
+ $(am__append_5832) $(am__append_5839) $(am__append_5846) \
+ $(am__append_5853) $(am__append_5860) $(am__append_5867) \
+ $(am__append_5874) $(am__append_5881) $(am__append_5888) \
+ $(am__append_5895) $(am__append_5902) $(am__append_5909) \
+ $(am__append_5916) $(am__append_5923) $(am__append_5930) \
+ $(am__append_5937) $(am__append_5944) $(am__append_5951) \
+ $(am__append_5958) $(am__append_5965) $(am__append_5972) \
+ $(am__append_5979) $(am__append_5986) $(am__append_5993) \
+ $(am__append_6000) $(am__append_6007) $(am__append_6014) \
+ $(am__append_6021) $(am__append_6028) $(am__append_6035) \
+ $(am__append_6042) $(am__append_6049) $(am__append_6056) \
+ $(am__append_6063) $(am__append_6070) $(am__append_6077) \
+ $(am__append_6084) $(am__append_6091) $(am__append_6098) \
+ $(am__append_6105) $(am__append_6112) $(am__append_6119) \
+ $(am__append_6126) $(am__append_6133) $(am__append_6140) \
+ $(am__append_6147) $(am__append_6154) $(am__append_6161) \
+ $(am__append_6168) $(am__append_6175) $(am__append_6182) \
+ $(am__append_6189) $(am__append_6196) $(am__append_6203) \
+ $(am__append_6210) $(am__append_6217) $(am__append_6224) \
+ $(am__append_6231) $(am__append_6238) $(am__append_6245) \
+ $(am__append_6252) $(am__append_6259) $(am__append_6266) \
+ $(am__append_6273) $(am__append_6280) $(am__append_6287) \
+ $(am__append_6294) $(am__append_6301) $(am__append_6308) \
+ $(am__append_6315) $(am__append_6322) $(am__append_6329) \
+ $(am__append_6336) $(am__append_6343) $(am__append_6350) \
+ $(am__append_6357) $(am__append_6364) $(am__append_6371) \
+ $(am__append_6378) $(am__append_6385) $(am__append_6392) \
+ $(am__append_6399) $(am__append_6406) $(am__append_6413) \
+ $(am__append_6420) $(am__append_6427) $(am__append_6434) \
+ $(am__append_6441) $(am__append_6448) $(am__append_6455) \
+ $(am__append_6462) $(am__append_6469) $(am__append_6476) \
+ $(am__append_6483) $(am__append_6490) $(am__append_6497) \
+ $(am__append_6504) $(am__append_6511) $(am__append_6518) \
+ $(am__append_6525) $(am__append_6532) $(am__append_6539) \
+ $(am__append_6546) $(am__append_6553) $(am__append_6560) \
+ $(am__append_6567) $(am__append_6574) $(am__append_6581) \
+ $(am__append_6588) $(am__append_6595) $(am__append_6602) \
+ $(am__append_6609) $(am__append_6616) $(am__append_6623) \
+ $(am__append_6630) $(am__append_6637) $(am__append_6644) \
+ $(am__append_6651) $(am__append_6658) $(am__append_6665) \
+ $(am__append_6672) $(am__append_6679) $(am__append_6686) \
+ $(am__append_6693) $(am__append_6700) $(am__append_6707) \
+ $(am__append_6714) $(am__append_6721) $(am__append_6728) \
+ $(am__append_6735) $(am__append_6742) $(am__append_6749) \
+ $(am__append_6756) $(am__append_6763) $(am__append_6770) \
+ $(am__append_6777) $(am__append_6784) $(am__append_6791) \
+ $(am__append_6798) $(am__append_6805) $(am__append_6812) \
+ $(am__append_6819) $(am__append_6826) $(am__append_6833) \
+ $(am__append_6840) $(am__append_6847) $(am__append_6854) \
+ $(am__append_6861) $(am__append_6868) $(am__append_6875) \
+ $(am__append_6882) $(am__append_6889) $(am__append_6896) \
+ $(am__append_6903) $(am__append_6910) $(am__append_6917) \
+ $(am__append_6924) $(am__append_6931) $(am__append_6938) \
+ $(am__append_6945) $(am__append_6952) $(am__append_6959) \
+ $(am__append_6966) $(am__append_6973) $(am__append_6980) \
+ $(am__append_6987) $(am__append_6994) $(am__append_7001) \
+ $(am__append_7008) $(am__append_7015) $(am__append_7022) \
+ $(am__append_7029) $(am__append_7036) $(am__append_7043) \
+ $(am__append_7050) $(am__append_7057) $(am__append_7064) \
+ $(am__append_7071) $(am__append_7078) $(am__append_7085) \
+ $(am__append_7092) $(am__append_7099) $(am__append_7106) \
+ $(am__append_7113) $(am__append_7120) $(am__append_7127) \
+ $(am__append_7134) $(am__append_7141) $(am__append_7148) \
+ $(am__append_7155) $(am__append_7162) $(am__append_7169) \
+ $(am__append_7176) $(am__append_7183) $(am__append_7190) \
+ $(am__append_7197) $(am__append_7204) $(am__append_7211) \
+ $(am__append_7218) $(am__append_7225) $(am__append_7232) \
+ $(am__append_7239) $(am__append_7246) $(am__append_7253) \
+ $(am__append_7260) $(am__append_7267) $(am__append_7274) \
+ $(am__append_7281) $(am__append_7288) $(am__append_7295) \
+ $(am__append_7302) $(am__append_7309) $(am__append_7316) \
+ $(am__append_7323) $(am__append_7330) $(am__append_7337) \
+ $(am__append_7344) $(am__append_7351) $(am__append_7358) \
+ $(am__append_7365) $(am__append_7372) $(am__append_7379) \
+ $(am__append_7386) $(am__append_7393) $(am__append_7400) \
+ $(am__append_7407) $(am__append_7414) $(am__append_7421) \
+ $(am__append_7428) $(am__append_7435) $(am__append_7442) \
+ $(am__append_7449) $(am__append_7456) $(am__append_7463) \
+ $(am__append_7470) $(am__append_7477) $(am__append_7484) \
+ $(am__append_7491) $(am__append_7498) $(am__append_7505) \
+ $(am__append_7512) $(am__append_7519) $(am__append_7526) \
+ $(am__append_7533) $(am__append_7540) $(am__append_7547) \
+ $(am__append_7554) $(am__append_7561) $(am__append_7568) \
+ $(am__append_7575) $(am__append_7582) $(am__append_7589) \
+ $(am__append_7596) $(am__append_7603) $(am__append_7610) \
+ $(am__append_7617) $(am__append_7624) $(am__append_7631) \
+ $(am__append_7638) $(am__append_7645) $(am__append_7652) \
+ $(am__append_7659) $(am__append_7666) $(am__append_7673) \
+ $(am__append_7680) $(am__append_7687) $(am__append_7694) \
+ $(am__append_7701) $(am__append_7708) $(am__append_7715) \
+ $(am__append_7722) $(am__append_7729) $(am__append_7736) \
+ $(am__append_7743) $(am__append_7750) $(am__append_7757) \
+ $(am__append_7764) $(am__append_7771) $(am__append_7778) \
+ $(am__append_7785) $(am__append_7792) $(am__append_7799) \
+ $(am__append_7806) $(am__append_7813) $(am__append_7820) \
+ $(am__append_7827) $(am__append_7834) $(am__append_7841) \
+ $(am__append_7848) $(am__append_7855) $(am__append_7862) \
+ $(am__append_7869) $(am__append_7876) $(am__append_7883) \
+ $(am__append_7890) $(am__append_7897) $(am__append_7904) \
+ $(am__append_7911) $(am__append_7918) $(am__append_7925) \
+ $(am__append_7932) $(am__append_7939) $(am__append_7946) \
+ $(am__append_7953) $(am__append_7960) $(am__append_7967) \
+ $(am__append_7974) $(am__append_7981) $(am__append_7988) \
+ $(am__append_7995) $(am__append_8002) $(am__append_8009) \
+ $(am__append_8016) $(am__append_8023) $(am__append_8030) \
+ $(am__append_8037) $(am__append_8044) $(am__append_8051) \
+ $(am__append_8058) $(am__append_8065) $(am__append_8072) \
+ $(am__append_8079) $(am__append_8086) $(am__append_8093) \
+ $(am__append_8100) $(am__append_8107) $(am__append_8114) \
+ $(am__append_8121) $(am__append_8128) $(am__append_8135) \
+ $(am__append_8142) $(am__append_8149) $(am__append_8156) \
+ $(am__append_8163) $(am__append_8170) $(am__append_8177) \
+ $(am__append_8184) $(am__append_8191) $(am__append_8198) \
+ $(am__append_8205) $(am__append_8212) $(am__append_8219) \
+ $(am__append_8226) $(am__append_8233) $(am__append_8240) \
+ $(am__append_8247) $(am__append_8254) $(am__append_8261) \
+ $(am__append_8268) $(am__append_8275) $(am__append_8282) \
+ $(am__append_8289) $(am__append_8296) $(am__append_8303) \
+ $(am__append_8310) $(am__append_8317) $(am__append_8324) \
+ $(am__append_8331) $(am__append_8338) $(am__append_8345) \
+ $(am__append_8352) $(am__append_8359) $(am__append_8366) \
+ $(am__append_8373) $(am__append_8380) $(am__append_8387) \
+ $(am__append_8394) $(am__append_8401) $(am__append_8408) \
+ $(am__append_8415) $(am__append_8422) $(am__append_8429) \
+ $(am__append_8436) $(am__append_8443) $(am__append_8450) \
+ $(am__append_8457) $(am__append_8464) $(am__append_8471) \
+ $(am__append_8478) $(am__append_8485) $(am__append_8492) \
+ $(am__append_8499) $(am__append_8506) $(am__append_8513) \
+ $(am__append_8520) $(am__append_8527) $(am__append_8534) \
+ $(am__append_8541) $(am__append_8548) $(am__append_8555) \
+ $(am__append_8562) $(am__append_8569) $(am__append_8576) \
+ $(am__append_8583) $(am__append_8590) $(am__append_8597) \
+ $(am__append_8604) $(am__append_8611) $(am__append_8618) \
+ $(am__append_8625) $(am__append_8632) $(am__append_8639) \
+ $(am__append_8646) $(am__append_8653) $(am__append_8660) \
+ $(am__append_8667) $(am__append_8674) $(am__append_8681) \
+ $(am__append_8688) $(am__append_8695) $(am__append_8702) \
+ $(am__append_8709) $(am__append_8716) $(am__append_8723) \
+ $(am__append_8730) $(am__append_8737) $(am__append_8744) \
+ $(am__append_8751) $(am__append_8758) $(am__append_8765) \
+ $(am__append_8772) $(am__append_8779) $(am__append_8786) \
+ $(am__append_8793) $(am__append_8800) $(am__append_8807) \
+ $(am__append_8814) $(am__append_8821) $(am__append_8828) \
+ $(am__append_8835) $(am__append_8842) $(am__append_8849) \
+ $(am__append_8856) $(am__append_8863) $(am__append_8870) \
+ $(am__append_8877) $(am__append_8884) $(am__append_8891) \
+ $(am__append_8898) $(am__append_8905) $(am__append_8912) \
+ $(am__append_8919) $(am__append_8926) $(am__append_8933) \
+ $(am__append_8940) $(am__append_8947) $(am__append_8954) \
+ $(am__append_8961) $(am__append_8968) $(am__append_8975) \
+ $(am__append_8982) $(am__append_8989) $(am__append_8996) \
+ $(am__append_9003) $(am__append_9010) $(am__append_9017) \
+ $(am__append_9024) $(am__append_9031) $(am__append_9038) \
+ $(am__append_9045) $(am__append_9052) $(am__append_9059) \
+ $(am__append_9066) $(am__append_9073) $(am__append_9080) \
+ $(am__append_9087) $(am__append_9094) $(am__append_9101) \
+ $(am__append_9108) $(am__append_9115) $(am__append_9122) \
+ $(am__append_9129) $(am__append_9136) $(am__append_9143) \
+ $(am__append_9150) $(am__append_9157) $(am__append_9164) \
+ $(am__append_9171) $(am__append_9178) $(am__append_9185) \
+ $(am__append_9192) $(am__append_9199) $(am__append_9206) \
+ $(am__append_9213) $(am__append_9220) $(am__append_9227) \
+ $(am__append_9234) $(am__append_9241) $(am__append_9248) \
+ $(am__append_9255) $(am__append_9262) $(am__append_9269) \
+ $(am__append_9276) $(am__append_9283) $(am__append_9290) \
+ $(am__append_9297) $(am__append_9304) $(am__append_9311) \
+ $(am__append_9318) $(am__append_9325) $(am__append_9332) \
+ $(am__append_9339) $(am__append_9346) $(am__append_9353) \
+ $(am__append_9360) $(am__append_9367) $(am__append_9374) \
+ $(am__append_9381) $(am__append_9388) $(am__append_9395) \
+ $(am__append_9402) $(am__append_9409) $(am__append_9416) \
+ $(am__append_9423) $(am__append_9430) $(am__append_9437) \
+ $(am__append_9444) $(am__append_9451) $(am__append_9458) \
+ $(am__append_9465) $(am__append_9472) $(am__append_9479) \
+ $(am__append_9486) $(am__append_9493) $(am__append_9500) \
+ $(am__append_9507) $(am__append_9514) $(am__append_9521) \
+ $(am__append_9528) $(am__append_9535) $(am__append_9542) \
+ $(am__append_9549) $(am__append_9556) $(am__append_9563) \
+ $(am__append_9570) $(am__append_9577) $(am__append_9584) \
+ $(am__append_9591) $(am__append_9598) $(am__append_9605) \
+ $(am__append_9612) $(am__append_9619) $(am__append_9626) \
+ $(am__append_9633) $(am__append_9640) $(am__append_9647) \
+ $(am__append_9654) $(am__append_9661) $(am__append_9668) \
+ $(am__append_9675) $(am__append_9682) $(am__append_9689) \
+ $(am__append_9696) $(am__append_9703) $(am__append_9710) \
+ $(am__append_9717) $(am__append_9724) $(am__append_9731) \
+ $(am__append_9738) $(am__append_9745) $(am__append_9752) \
+ $(am__append_9759) $(am__append_9766) $(am__append_9773) \
+ $(am__append_9780) $(am__append_9787) $(am__append_9794) \
+ $(am__append_9801) $(am__append_9808) $(am__append_9815) \
+ $(am__append_9822) $(am__append_9829) $(am__append_9836) \
+ $(am__append_9843) $(am__append_9850) $(am__append_9857) \
+ $(am__append_9864) $(am__append_9871) $(am__append_9878) \
+ $(am__append_9885) $(am__append_9892) $(am__append_9899) \
+ $(am__append_9906) $(am__append_9913) $(am__append_9920) \
+ $(am__append_9927) $(am__append_9934) $(am__append_9941) \
+ $(am__append_9948) $(am__append_9955) $(am__append_9962) \
+ $(am__append_9969) $(am__append_9976) $(am__append_9983) \
+ $(am__append_9990) $(am__append_9997) $(am__append_10004) \
+ $(am__append_10011) $(am__append_10018) $(am__append_10025) \
+ $(am__append_10032) $(am__append_10039) $(am__append_10046) \
+ $(am__append_10053) $(am__append_10060) $(am__append_10067) \
+ $(am__append_10074) $(am__append_10081) $(am__append_10088) \
+ $(am__append_10095) $(am__append_10102) $(am__append_10109) \
+ $(am__append_10116) $(am__append_10123) $(am__append_10130) \
+ $(am__append_10137) $(am__append_10144) $(am__append_10151) \
+ $(am__append_10158) $(am__append_10165) $(am__append_10172) \
+ $(am__append_10179) $(am__append_10186) $(am__append_10193) \
+ $(am__append_10200) $(am__append_10207) $(am__append_10214) \
+ $(am__append_10221) $(am__append_10228) $(am__append_10235) \
+ $(am__append_10242) $(am__append_10249) $(am__append_10256) \
+ $(am__append_10263) $(am__append_10270) $(am__append_10277) \
+ $(am__append_10284) $(am__append_10291) $(am__append_10298) \
+ $(am__append_10305) $(am__append_10312) $(am__append_10319) \
+ $(am__append_10326) $(am__append_10333) $(am__append_10340) \
+ $(am__append_10347) $(am__append_10354) $(am__append_10361) \
+ $(am__append_10368) $(am__append_10375) $(am__append_10382) \
+ $(am__append_10389) $(am__append_10396) $(am__append_10403) \
+ $(am__append_10410) $(am__append_10417) $(am__append_10424) \
+ $(am__append_10431) $(am__append_10438) $(am__append_10445) \
+ $(am__append_10452) $(am__append_10459) $(am__append_10466) \
+ $(am__append_10473) $(am__append_10480) $(am__append_10487) \
+ $(am__append_10494) $(am__append_10501) $(am__append_10508) \
+ $(am__append_10515) $(am__append_10522) $(am__append_10529) \
+ $(am__append_10536) $(am__append_10543) $(am__append_10550) \
+ $(am__append_10557) $(am__append_10564) $(am__append_10571) \
+ $(am__append_10578) $(am__append_10585) $(am__append_10592) \
+ $(am__append_10599) $(am__append_10606) $(am__append_10613) \
+ $(am__append_10620) $(am__append_10627) $(am__append_10634) \
+ $(am__append_10641) $(am__append_10648) $(am__append_10655) \
+ $(am__append_10662) $(am__append_10669) $(am__append_10676) \
+ $(am__append_10683) $(am__append_10690) $(am__append_10697) \
+ $(am__append_10704) $(am__append_10711) $(am__append_10718) \
+ $(am__append_10725) $(am__append_10732) $(am__append_10739) \
+ $(am__append_10746) $(am__append_10753) $(am__append_10760) \
+ $(am__append_10767) $(am__append_10774) $(am__append_10781) \
+ $(am__append_10788) $(am__append_10795) $(am__append_10802) \
+ $(am__append_10809) $(am__append_10816) $(am__append_10823) \
+ $(am__append_10830) $(am__append_10837) $(am__append_10844) \
+ $(am__append_10851) $(am__append_10858) $(am__append_10865) \
+ $(am__append_10872) $(am__append_10879) $(am__append_10886) \
+ $(am__append_10893) $(am__append_10900) $(am__append_10907) \
+ $(am__append_10914) $(am__append_10921) $(am__append_10928) \
+ $(am__append_10935) $(am__append_10942) $(am__append_10949) \
+ $(am__append_10956) $(am__append_10963) $(am__append_10970) \
+ $(am__append_10977) $(am__append_10984) $(am__append_10991) \
+ $(am__append_10998) $(am__append_11005) $(am__append_11012) \
+ $(am__append_11019) $(am__append_11026) $(am__append_11033) \
+ $(am__append_11040) $(am__append_11047) $(am__append_11054) \
+ $(am__append_11061) $(am__append_11068) $(am__append_11075) \
+ $(am__append_11082) $(am__append_11089) $(am__append_11096) \
+ $(am__append_11103) $(am__append_11110) $(am__append_11117) \
+ $(am__append_11124) $(am__append_11131) $(am__append_11138) \
+ $(am__append_11145) $(am__append_11152) $(am__append_11159) \
+ $(am__append_11166) $(am__append_11173) $(am__append_11180) \
+ $(am__append_11187) $(am__append_11194) $(am__append_11201) \
+ $(am__append_11208) $(am__append_11215) $(am__append_11222) \
+ $(am__append_11229) $(am__append_11236) $(am__append_11243) \
+ $(am__append_11250) $(am__append_11257) $(am__append_11264) \
+ $(am__append_11271) $(am__append_11278) $(am__append_11285) \
+ $(am__append_11292) $(am__append_11299) $(am__append_11306) \
+ $(am__append_11313) $(am__append_11320) $(am__append_11327) \
+ $(am__append_11334) $(am__append_11341) $(am__append_11348) \
+ $(am__append_11355) $(am__append_11362) $(am__append_11369) \
+ $(am__append_11376) $(am__append_11383) $(am__append_11390) \
+ $(am__append_11397) $(am__append_11404) $(am__append_11411) \
+ $(am__append_11418) $(am__append_11425) $(am__append_11432) \
+ $(am__append_11439) $(am__append_11446) $(am__append_11453) \
+ $(am__append_11460) $(am__append_11467) $(am__append_11474) \
+ $(am__append_11481) $(am__append_11488) $(am__append_11495) \
+ $(am__append_11502) $(am__append_11509) $(am__append_11516) \
+ $(am__append_11523) $(am__append_11530) $(am__append_11537) \
+ $(am__append_11544) $(am__append_11551) $(am__append_11558) \
+ $(am__append_11565) $(am__append_11572) $(am__append_11579) \
+ $(am__append_11586) $(am__append_11593) $(am__append_11600) \
+ $(am__append_11607) $(am__append_11614) $(am__append_11621) \
+ $(am__append_11628) $(am__append_11635) $(am__append_11642) \
+ $(am__append_11649) $(am__append_11656) $(am__append_11663) \
+ $(am__append_11670) $(am__append_11677) $(am__append_11684) \
+ $(am__append_11691) $(am__append_11698) $(am__append_11705) \
+ $(am__append_11712) $(am__append_11719) $(am__append_11726) \
+ $(am__append_11733) $(am__append_11740) $(am__append_11747) \
+ $(am__append_11754) $(am__append_11761) $(am__append_11768) \
+ $(am__append_11775) $(am__append_11782) $(am__append_11789) \
+ $(am__append_11796) $(am__append_11803) $(am__append_11810) \
+ $(am__append_11817) $(am__append_11824) $(am__append_11831) \
+ $(am__append_11838) $(am__append_11845) $(am__append_11852) \
+ $(am__append_11859) $(am__append_11866) $(am__append_11873) \
+ $(am__append_11880) $(am__append_11887) $(am__append_11894) \
+ $(am__append_11901) $(am__append_11908) $(am__append_11915) \
+ $(am__append_11922) $(am__append_11929) $(am__append_11936) \
+ $(am__append_11943) $(am__append_11950) $(am__append_11957) \
+ $(am__append_11964) $(am__append_11971) $(am__append_11978) \
+ $(am__append_11985) $(am__append_11992) $(am__append_11999) \
+ $(am__append_12006) $(am__append_12013) $(am__append_12020) \
+ $(am__append_12027) $(am__append_12034) $(am__append_12041) \
+ $(am__append_12048) $(am__append_12055) $(am__append_12062) \
+ $(am__append_12069) $(am__append_12076) $(am__append_12083) \
+ $(am__append_12090) $(am__append_12097) $(am__append_12104) \
+ $(am__append_12111) $(am__append_12118) $(am__append_12125) \
+ $(am__append_12132)
+MODULE_FILES = $(am__append_11) $(am__append_18) $(am__append_25) \
+ $(am__append_32) $(am__append_39) $(am__append_46) \
+ $(am__append_53) $(am__append_60) $(am__append_67) \
+ $(am__append_74) $(am__append_81) $(am__append_88) \
+ $(am__append_95) $(am__append_102) $(am__append_109) \
+ $(am__append_116) $(am__append_123) $(am__append_130) \
+ $(am__append_137) $(am__append_144) $(am__append_151) \
+ $(am__append_158) $(am__append_165) $(am__append_172) \
+ $(am__append_179) $(am__append_186) $(am__append_193) \
+ $(am__append_200) $(am__append_207) $(am__append_214) \
+ $(am__append_221) $(am__append_228) $(am__append_235) \
+ $(am__append_242) $(am__append_249) $(am__append_256) \
+ $(am__append_263) $(am__append_270) $(am__append_277) \
+ $(am__append_284) $(am__append_291) $(am__append_298) \
+ $(am__append_305) $(am__append_312) $(am__append_319) \
+ $(am__append_326) $(am__append_333) $(am__append_340) \
+ $(am__append_347) $(am__append_354) $(am__append_361) \
+ $(am__append_368) $(am__append_375) $(am__append_382) \
+ $(am__append_389) $(am__append_396) $(am__append_403) \
+ $(am__append_410) $(am__append_417) $(am__append_424) \
+ $(am__append_431) $(am__append_438) $(am__append_445) \
+ $(am__append_452) $(am__append_459) $(am__append_466) \
+ $(am__append_473) $(am__append_480) $(am__append_487) \
+ $(am__append_494) $(am__append_501) $(am__append_508) \
+ $(am__append_515) $(am__append_522) $(am__append_529) \
+ $(am__append_536) $(am__append_543) $(am__append_550) \
+ $(am__append_557) $(am__append_564) $(am__append_571) \
+ $(am__append_578) $(am__append_585) $(am__append_592) \
+ $(am__append_599) $(am__append_606) $(am__append_613) \
+ $(am__append_620) $(am__append_627) $(am__append_634) \
+ $(am__append_641) $(am__append_648) $(am__append_655) \
+ $(am__append_662) $(am__append_669) $(am__append_676) \
+ $(am__append_683) $(am__append_690) $(am__append_697) \
+ $(am__append_704) $(am__append_711) $(am__append_718) \
+ $(am__append_725) $(am__append_732) $(am__append_739) \
+ $(am__append_746) $(am__append_753) $(am__append_760) \
+ $(am__append_767) $(am__append_774) $(am__append_781) \
+ $(am__append_788) $(am__append_795) $(am__append_802) \
+ $(am__append_809) $(am__append_816) $(am__append_823) \
+ $(am__append_830) $(am__append_837) $(am__append_844) \
+ $(am__append_851) $(am__append_858) $(am__append_865) \
+ $(am__append_872) $(am__append_879) $(am__append_886) \
+ $(am__append_893) $(am__append_900) $(am__append_907) \
+ $(am__append_914) $(am__append_921) $(am__append_928) \
+ $(am__append_935) $(am__append_942) $(am__append_949) \
+ $(am__append_956) $(am__append_963) $(am__append_970) \
+ $(am__append_977) $(am__append_984) $(am__append_991) \
+ $(am__append_998) $(am__append_1005) $(am__append_1012) \
+ $(am__append_1019) $(am__append_1026) $(am__append_1033) \
+ $(am__append_1040) $(am__append_1047) $(am__append_1054) \
+ $(am__append_1061) $(am__append_1068) $(am__append_1075) \
+ $(am__append_1082) $(am__append_1089) $(am__append_1096) \
+ $(am__append_1103) $(am__append_1110) $(am__append_1117) \
+ $(am__append_1124) $(am__append_1131) $(am__append_1138) \
+ $(am__append_1145) $(am__append_1152) $(am__append_1159) \
+ $(am__append_1166) $(am__append_1173) $(am__append_1180) \
+ $(am__append_1187) $(am__append_1194) $(am__append_1201) \
+ $(am__append_1208) $(am__append_1215) $(am__append_1222) \
+ $(am__append_1229) $(am__append_1236) $(am__append_1243) \
+ $(am__append_1250) $(am__append_1257) $(am__append_1264) \
+ $(am__append_1271) $(am__append_1278) $(am__append_1285) \
+ $(am__append_1292) $(am__append_1299) $(am__append_1306) \
+ $(am__append_1313) $(am__append_1320) $(am__append_1327) \
+ $(am__append_1334) $(am__append_1341) $(am__append_1348) \
+ $(am__append_1355) $(am__append_1362) $(am__append_1369) \
+ $(am__append_1376) $(am__append_1383) $(am__append_1390) \
+ $(am__append_1397) $(am__append_1404) $(am__append_1411) \
+ $(am__append_1418) $(am__append_1425) $(am__append_1432) \
+ $(am__append_1439) $(am__append_1446) $(am__append_1453) \
+ $(am__append_1460) $(am__append_1467) $(am__append_1474) \
+ $(am__append_1481) $(am__append_1488) $(am__append_1495) \
+ $(am__append_1502) $(am__append_1509) $(am__append_1516) \
+ $(am__append_1523) $(am__append_1530) $(am__append_1537) \
+ $(am__append_1544) $(am__append_1551) $(am__append_1558) \
+ $(am__append_1565) $(am__append_1572) $(am__append_1579) \
+ $(am__append_1586) $(am__append_1593) $(am__append_1600) \
+ $(am__append_1607) $(am__append_1614) $(am__append_1621) \
+ $(am__append_1628) $(am__append_1635) $(am__append_1642) \
+ $(am__append_1649) $(am__append_1656) $(am__append_1663) \
+ $(am__append_1670) $(am__append_1677) $(am__append_1684) \
+ $(am__append_1691) $(am__append_1698) $(am__append_1705) \
+ $(am__append_1712) $(am__append_1719) $(am__append_1726) \
+ $(am__append_1733) $(am__append_1740) $(am__append_1747) \
+ $(am__append_1754) $(am__append_1761) $(am__append_1768) \
+ $(am__append_1775) $(am__append_1782) $(am__append_1789) \
+ $(am__append_1796) $(am__append_1803) $(am__append_1810) \
+ $(am__append_1817) $(am__append_1824) $(am__append_1831) \
+ $(am__append_1838) $(am__append_1845) $(am__append_1852) \
+ $(am__append_1859) $(am__append_1866) $(am__append_1873) \
+ $(am__append_1880) $(am__append_1887) $(am__append_1894) \
+ $(am__append_1901) $(am__append_1908) $(am__append_1915) \
+ $(am__append_1922) $(am__append_1929) $(am__append_1936) \
+ $(am__append_1943) $(am__append_1950) $(am__append_1957) \
+ $(am__append_1964) $(am__append_1971) $(am__append_1978) \
+ $(am__append_1985) $(am__append_1992) $(am__append_1999) \
+ $(am__append_2006) $(am__append_2013) $(am__append_2020) \
+ $(am__append_2027) $(am__append_2034) $(am__append_2041) \
+ $(am__append_2048) $(am__append_2055) $(am__append_2062) \
+ $(am__append_2069) $(am__append_2076) $(am__append_2083) \
+ $(am__append_2090) $(am__append_2097) $(am__append_2104) \
+ $(am__append_2111) $(am__append_2118) $(am__append_2125) \
+ $(am__append_2132) $(am__append_2139) $(am__append_2146) \
+ $(am__append_2153) $(am__append_2160) $(am__append_2167) \
+ $(am__append_2174) $(am__append_2181) $(am__append_2188) \
+ $(am__append_2195) $(am__append_2202) $(am__append_2209) \
+ $(am__append_2216) $(am__append_2223) $(am__append_2230) \
+ $(am__append_2237) $(am__append_2244) $(am__append_2251) \
+ $(am__append_2258) $(am__append_2265) $(am__append_2272) \
+ $(am__append_2279) $(am__append_2286) $(am__append_2293) \
+ $(am__append_2300) $(am__append_2307) $(am__append_2314) \
+ $(am__append_2321) $(am__append_2328) $(am__append_2335) \
+ $(am__append_2342) $(am__append_2349) $(am__append_2356) \
+ $(am__append_2363) $(am__append_2370) $(am__append_2377) \
+ $(am__append_2384) $(am__append_2391) $(am__append_2398) \
+ $(am__append_2405) $(am__append_2412) $(am__append_2419) \
+ $(am__append_2426) $(am__append_2433) $(am__append_2440) \
+ $(am__append_2447) $(am__append_2454) $(am__append_2461) \
+ $(am__append_2468) $(am__append_2475) $(am__append_2482) \
+ $(am__append_2489) $(am__append_2496) $(am__append_2503) \
+ $(am__append_2510) $(am__append_2517) $(am__append_2524) \
+ $(am__append_2531) $(am__append_2538) $(am__append_2545) \
+ $(am__append_2552) $(am__append_2559) $(am__append_2566) \
+ $(am__append_2573) $(am__append_2580) $(am__append_2587) \
+ $(am__append_2594) $(am__append_2601) $(am__append_2608) \
+ $(am__append_2615) $(am__append_2622) $(am__append_2629) \
+ $(am__append_2636) $(am__append_2643) $(am__append_2650) \
+ $(am__append_2657) $(am__append_2664) $(am__append_2671) \
+ $(am__append_2678) $(am__append_2685) $(am__append_2692) \
+ $(am__append_2699) $(am__append_2706) $(am__append_2713) \
+ $(am__append_2720) $(am__append_2727) $(am__append_2734) \
+ $(am__append_2741) $(am__append_2748) $(am__append_2755) \
+ $(am__append_2762) $(am__append_2769) $(am__append_2776) \
+ $(am__append_2783) $(am__append_2790) $(am__append_2797) \
+ $(am__append_2804) $(am__append_2811) $(am__append_2818) \
+ $(am__append_2825) $(am__append_2832) $(am__append_2839) \
+ $(am__append_2846) $(am__append_2853) $(am__append_2860) \
+ $(am__append_2867) $(am__append_2874) $(am__append_2881) \
+ $(am__append_2888) $(am__append_2895) $(am__append_2902) \
+ $(am__append_2909) $(am__append_2916) $(am__append_2923) \
+ $(am__append_2930) $(am__append_2937) $(am__append_2944) \
+ $(am__append_2951) $(am__append_2958) $(am__append_2965) \
+ $(am__append_2972) $(am__append_2979) $(am__append_2986) \
+ $(am__append_2993) $(am__append_3000) $(am__append_3007) \
+ $(am__append_3014) $(am__append_3021) $(am__append_3028) \
+ $(am__append_3035) $(am__append_3042) $(am__append_3049) \
+ $(am__append_3056) $(am__append_3063) $(am__append_3070) \
+ $(am__append_3077) $(am__append_3084) $(am__append_3091) \
+ $(am__append_3098) $(am__append_3105) $(am__append_3112) \
+ $(am__append_3119) $(am__append_3126) $(am__append_3133) \
+ $(am__append_3140) $(am__append_3147) $(am__append_3154) \
+ $(am__append_3161) $(am__append_3168) $(am__append_3175) \
+ $(am__append_3182) $(am__append_3189) $(am__append_3196) \
+ $(am__append_3203) $(am__append_3210) $(am__append_3217) \
+ $(am__append_3224) $(am__append_3231) $(am__append_3238) \
+ $(am__append_3245) $(am__append_3252) $(am__append_3259) \
+ $(am__append_3266) $(am__append_3273) $(am__append_3280) \
+ $(am__append_3287) $(am__append_3294) $(am__append_3301) \
+ $(am__append_3308) $(am__append_3315) $(am__append_3322) \
+ $(am__append_3329) $(am__append_3336) $(am__append_3343) \
+ $(am__append_3350) $(am__append_3357) $(am__append_3364) \
+ $(am__append_3371) $(am__append_3378) $(am__append_3385) \
+ $(am__append_3392) $(am__append_3399) $(am__append_3406) \
+ $(am__append_3413) $(am__append_3420) $(am__append_3427) \
+ $(am__append_3434) $(am__append_3441) $(am__append_3448) \
+ $(am__append_3455) $(am__append_3462) $(am__append_3469) \
+ $(am__append_3476) $(am__append_3483) $(am__append_3490) \
+ $(am__append_3497) $(am__append_3504) $(am__append_3511) \
+ $(am__append_3518) $(am__append_3525) $(am__append_3532) \
+ $(am__append_3539) $(am__append_3546) $(am__append_3553) \
+ $(am__append_3560) $(am__append_3567) $(am__append_3574) \
+ $(am__append_3581) $(am__append_3588) $(am__append_3595) \
+ $(am__append_3602) $(am__append_3609) $(am__append_3616) \
+ $(am__append_3623) $(am__append_3630) $(am__append_3637) \
+ $(am__append_3644) $(am__append_3651) $(am__append_3658) \
+ $(am__append_3665) $(am__append_3672) $(am__append_3679) \
+ $(am__append_3686) $(am__append_3693) $(am__append_3700) \
+ $(am__append_3707) $(am__append_3714) $(am__append_3721) \
+ $(am__append_3728) $(am__append_3735) $(am__append_3742) \
+ $(am__append_3749) $(am__append_3756) $(am__append_3763) \
+ $(am__append_3770) $(am__append_3777) $(am__append_3784) \
+ $(am__append_3791) $(am__append_3798) $(am__append_3805) \
+ $(am__append_3812) $(am__append_3819) $(am__append_3826) \
+ $(am__append_3833) $(am__append_3840) $(am__append_3847) \
+ $(am__append_3854) $(am__append_3861) $(am__append_3868) \
+ $(am__append_3875) $(am__append_3882) $(am__append_3889) \
+ $(am__append_3896) $(am__append_3903) $(am__append_3910) \
+ $(am__append_3917) $(am__append_3924) $(am__append_3931) \
+ $(am__append_3938) $(am__append_3945) $(am__append_3952) \
+ $(am__append_3959) $(am__append_3966) $(am__append_3973) \
+ $(am__append_3980) $(am__append_3987) $(am__append_3994) \
+ $(am__append_4001) $(am__append_4008) $(am__append_4015) \
+ $(am__append_4022) $(am__append_4029) $(am__append_4036) \
+ $(am__append_4043) $(am__append_4050) $(am__append_4057) \
+ $(am__append_4064) $(am__append_4071) $(am__append_4078) \
+ $(am__append_4085) $(am__append_4092) $(am__append_4099) \
+ $(am__append_4106) $(am__append_4113) $(am__append_4120) \
+ $(am__append_4127) $(am__append_4134) $(am__append_4141) \
+ $(am__append_4148) $(am__append_4155) $(am__append_4162) \
+ $(am__append_4169) $(am__append_4176) $(am__append_4183) \
+ $(am__append_4190) $(am__append_4197) $(am__append_4204) \
+ $(am__append_4211) $(am__append_4218) $(am__append_4225) \
+ $(am__append_4232) $(am__append_4239) $(am__append_4246) \
+ $(am__append_4253) $(am__append_4260) $(am__append_4267) \
+ $(am__append_4274) $(am__append_4281) $(am__append_4288) \
+ $(am__append_4295) $(am__append_4302) $(am__append_4309) \
+ $(am__append_4316) $(am__append_4323) $(am__append_4330) \
+ $(am__append_4337) $(am__append_4344) $(am__append_4351) \
+ $(am__append_4358) $(am__append_4365) $(am__append_4372) \
+ $(am__append_4379) $(am__append_4386) $(am__append_4393) \
+ $(am__append_4400) $(am__append_4407) $(am__append_4414) \
+ $(am__append_4421) $(am__append_4428) $(am__append_4435) \
+ $(am__append_4442) $(am__append_4449) $(am__append_4456) \
+ $(am__append_4463) $(am__append_4470) $(am__append_4477) \
+ $(am__append_4484) $(am__append_4491) $(am__append_4498) \
+ $(am__append_4505) $(am__append_4512) $(am__append_4519) \
+ $(am__append_4526) $(am__append_4533) $(am__append_4540) \
+ $(am__append_4547) $(am__append_4554) $(am__append_4561) \
+ $(am__append_4568) $(am__append_4575) $(am__append_4582) \
+ $(am__append_4589) $(am__append_4596) $(am__append_4603) \
+ $(am__append_4610) $(am__append_4617) $(am__append_4624) \
+ $(am__append_4631) $(am__append_4638) $(am__append_4645) \
+ $(am__append_4652) $(am__append_4659) $(am__append_4666) \
+ $(am__append_4673) $(am__append_4680) $(am__append_4687) \
+ $(am__append_4694) $(am__append_4701) $(am__append_4708) \
+ $(am__append_4715) $(am__append_4722) $(am__append_4729) \
+ $(am__append_4736) $(am__append_4743) $(am__append_4750) \
+ $(am__append_4757) $(am__append_4764) $(am__append_4771) \
+ $(am__append_4778) $(am__append_4785) $(am__append_4792) \
+ $(am__append_4799) $(am__append_4806) $(am__append_4813) \
+ $(am__append_4820) $(am__append_4827) $(am__append_4834) \
+ $(am__append_4841) $(am__append_4848) $(am__append_4855) \
+ $(am__append_4862) $(am__append_4869) $(am__append_4876) \
+ $(am__append_4883) $(am__append_4890) $(am__append_4897) \
+ $(am__append_4904) $(am__append_4911) $(am__append_4918) \
+ $(am__append_4925) $(am__append_4932) $(am__append_4939) \
+ $(am__append_4946) $(am__append_4953) $(am__append_4960) \
+ $(am__append_4967) $(am__append_4974) $(am__append_4981) \
+ $(am__append_4988) $(am__append_4995) $(am__append_5002) \
+ $(am__append_5009) $(am__append_5016) $(am__append_5023) \
+ $(am__append_5030) $(am__append_5037) $(am__append_5044) \
+ $(am__append_5051) $(am__append_5058) $(am__append_5065) \
+ $(am__append_5072) $(am__append_5079) $(am__append_5086) \
+ $(am__append_5093) $(am__append_5100) $(am__append_5107) \
+ $(am__append_5114) $(am__append_5121) $(am__append_5128) \
+ $(am__append_5135) $(am__append_5142) $(am__append_5149) \
+ $(am__append_5156) $(am__append_5163) $(am__append_5170) \
+ $(am__append_5177) $(am__append_5184) $(am__append_5191) \
+ $(am__append_5198) $(am__append_5205) $(am__append_5212) \
+ $(am__append_5219) $(am__append_5226) $(am__append_5233) \
+ $(am__append_5240) $(am__append_5247) $(am__append_5254) \
+ $(am__append_5261) $(am__append_5268) $(am__append_5275) \
+ $(am__append_5282) $(am__append_5289) $(am__append_5296) \
+ $(am__append_5303) $(am__append_5310) $(am__append_5317) \
+ $(am__append_5324) $(am__append_5331) $(am__append_5338) \
+ $(am__append_5345) $(am__append_5352) $(am__append_5359) \
+ $(am__append_5366) $(am__append_5373) $(am__append_5380) \
+ $(am__append_5387) $(am__append_5394) $(am__append_5401) \
+ $(am__append_5408) $(am__append_5415) $(am__append_5422) \
+ $(am__append_5429) $(am__append_5436) $(am__append_5443) \
+ $(am__append_5450) $(am__append_5457) $(am__append_5464) \
+ $(am__append_5471) $(am__append_5478) $(am__append_5485) \
+ $(am__append_5492) $(am__append_5499) $(am__append_5506) \
+ $(am__append_5513) $(am__append_5520) $(am__append_5527) \
+ $(am__append_5534) $(am__append_5541) $(am__append_5548) \
+ $(am__append_5555) $(am__append_5562) $(am__append_5569) \
+ $(am__append_5576) $(am__append_5583) $(am__append_5590) \
+ $(am__append_5597) $(am__append_5604) $(am__append_5611) \
+ $(am__append_5618) $(am__append_5625) $(am__append_5632) \
+ $(am__append_5639) $(am__append_5646) $(am__append_5653) \
+ $(am__append_5660) $(am__append_5667) $(am__append_5674) \
+ $(am__append_5681) $(am__append_5688) $(am__append_5695) \
+ $(am__append_5702) $(am__append_5709) $(am__append_5716) \
+ $(am__append_5723) $(am__append_5730) $(am__append_5737) \
+ $(am__append_5744) $(am__append_5751) $(am__append_5758) \
+ $(am__append_5765) $(am__append_5772) $(am__append_5779) \
+ $(am__append_5786) $(am__append_5793) $(am__append_5800) \
+ $(am__append_5807) $(am__append_5814) $(am__append_5821) \
+ $(am__append_5828) $(am__append_5835) $(am__append_5842) \
+ $(am__append_5849) $(am__append_5856) $(am__append_5863) \
+ $(am__append_5870) $(am__append_5877) $(am__append_5884) \
+ $(am__append_5891) $(am__append_5898) $(am__append_5905) \
+ $(am__append_5912) $(am__append_5919) $(am__append_5926) \
+ $(am__append_5933) $(am__append_5940) $(am__append_5947) \
+ $(am__append_5954) $(am__append_5961) $(am__append_5968) \
+ $(am__append_5975) $(am__append_5982) $(am__append_5989) \
+ $(am__append_5996) $(am__append_6003) $(am__append_6010) \
+ $(am__append_6017) $(am__append_6024) $(am__append_6031) \
+ $(am__append_6038) $(am__append_6045) $(am__append_6052) \
+ $(am__append_6059) $(am__append_6066) $(am__append_6073) \
+ $(am__append_6080) $(am__append_6087) $(am__append_6094) \
+ $(am__append_6101) $(am__append_6108) $(am__append_6115) \
+ $(am__append_6122) $(am__append_6129) $(am__append_6136) \
+ $(am__append_6143) $(am__append_6150) $(am__append_6157) \
+ $(am__append_6164) $(am__append_6171) $(am__append_6178) \
+ $(am__append_6185) $(am__append_6192) $(am__append_6199) \
+ $(am__append_6206) $(am__append_6213) $(am__append_6220) \
+ $(am__append_6227) $(am__append_6234) $(am__append_6241) \
+ $(am__append_6248) $(am__append_6255) $(am__append_6262) \
+ $(am__append_6269) $(am__append_6276) $(am__append_6283) \
+ $(am__append_6290) $(am__append_6297) $(am__append_6304) \
+ $(am__append_6311) $(am__append_6318) $(am__append_6325) \
+ $(am__append_6332) $(am__append_6339) $(am__append_6346) \
+ $(am__append_6353) $(am__append_6360) $(am__append_6367) \
+ $(am__append_6374) $(am__append_6381) $(am__append_6388) \
+ $(am__append_6395) $(am__append_6402) $(am__append_6409) \
+ $(am__append_6416) $(am__append_6423) $(am__append_6430) \
+ $(am__append_6437) $(am__append_6444) $(am__append_6451) \
+ $(am__append_6458) $(am__append_6465) $(am__append_6472) \
+ $(am__append_6479) $(am__append_6486) $(am__append_6493) \
+ $(am__append_6500) $(am__append_6507) $(am__append_6514) \
+ $(am__append_6521) $(am__append_6528) $(am__append_6535) \
+ $(am__append_6542) $(am__append_6549) $(am__append_6556) \
+ $(am__append_6563) $(am__append_6570) $(am__append_6577) \
+ $(am__append_6584) $(am__append_6591) $(am__append_6598) \
+ $(am__append_6605) $(am__append_6612) $(am__append_6619) \
+ $(am__append_6626) $(am__append_6633) $(am__append_6640) \
+ $(am__append_6647) $(am__append_6654) $(am__append_6661) \
+ $(am__append_6668) $(am__append_6675) $(am__append_6682) \
+ $(am__append_6689) $(am__append_6696) $(am__append_6703) \
+ $(am__append_6710) $(am__append_6717) $(am__append_6724) \
+ $(am__append_6731) $(am__append_6738) $(am__append_6745) \
+ $(am__append_6752) $(am__append_6759) $(am__append_6766) \
+ $(am__append_6773) $(am__append_6780) $(am__append_6787) \
+ $(am__append_6794) $(am__append_6801) $(am__append_6808) \
+ $(am__append_6815) $(am__append_6822) $(am__append_6829) \
+ $(am__append_6836) $(am__append_6843) $(am__append_6850) \
+ $(am__append_6857) $(am__append_6864) $(am__append_6871) \
+ $(am__append_6878) $(am__append_6885) $(am__append_6892) \
+ $(am__append_6899) $(am__append_6906) $(am__append_6913) \
+ $(am__append_6920) $(am__append_6927) $(am__append_6934) \
+ $(am__append_6941) $(am__append_6948) $(am__append_6955) \
+ $(am__append_6962) $(am__append_6969) $(am__append_6976) \
+ $(am__append_6983) $(am__append_6990) $(am__append_6997) \
+ $(am__append_7004) $(am__append_7011) $(am__append_7018) \
+ $(am__append_7025) $(am__append_7032) $(am__append_7039) \
+ $(am__append_7046) $(am__append_7053) $(am__append_7060) \
+ $(am__append_7067) $(am__append_7074) $(am__append_7081) \
+ $(am__append_7088) $(am__append_7095) $(am__append_7102) \
+ $(am__append_7109) $(am__append_7116) $(am__append_7123) \
+ $(am__append_7130) $(am__append_7137) $(am__append_7144) \
+ $(am__append_7151) $(am__append_7158) $(am__append_7165) \
+ $(am__append_7172) $(am__append_7179) $(am__append_7186) \
+ $(am__append_7193) $(am__append_7200) $(am__append_7207) \
+ $(am__append_7214) $(am__append_7221) $(am__append_7228) \
+ $(am__append_7235) $(am__append_7242) $(am__append_7249) \
+ $(am__append_7256) $(am__append_7263) $(am__append_7270) \
+ $(am__append_7277) $(am__append_7284) $(am__append_7291) \
+ $(am__append_7298) $(am__append_7305) $(am__append_7312) \
+ $(am__append_7319) $(am__append_7326) $(am__append_7333) \
+ $(am__append_7340) $(am__append_7347) $(am__append_7354) \
+ $(am__append_7361) $(am__append_7368) $(am__append_7375) \
+ $(am__append_7382) $(am__append_7389) $(am__append_7396) \
+ $(am__append_7403) $(am__append_7410) $(am__append_7417) \
+ $(am__append_7424) $(am__append_7431) $(am__append_7438) \
+ $(am__append_7445) $(am__append_7452) $(am__append_7459) \
+ $(am__append_7466) $(am__append_7473) $(am__append_7480) \
+ $(am__append_7487) $(am__append_7494) $(am__append_7501) \
+ $(am__append_7508) $(am__append_7515) $(am__append_7522) \
+ $(am__append_7529) $(am__append_7536) $(am__append_7543) \
+ $(am__append_7550) $(am__append_7557) $(am__append_7564) \
+ $(am__append_7571) $(am__append_7578) $(am__append_7585) \
+ $(am__append_7592) $(am__append_7599) $(am__append_7606) \
+ $(am__append_7613) $(am__append_7620) $(am__append_7627) \
+ $(am__append_7634) $(am__append_7641) $(am__append_7648) \
+ $(am__append_7655) $(am__append_7662) $(am__append_7669) \
+ $(am__append_7676) $(am__append_7683) $(am__append_7690) \
+ $(am__append_7697) $(am__append_7704) $(am__append_7711) \
+ $(am__append_7718) $(am__append_7725) $(am__append_7732) \
+ $(am__append_7739) $(am__append_7746) $(am__append_7753) \
+ $(am__append_7760) $(am__append_7767) $(am__append_7774) \
+ $(am__append_7781) $(am__append_7788) $(am__append_7795) \
+ $(am__append_7802) $(am__append_7809) $(am__append_7816) \
+ $(am__append_7823) $(am__append_7830) $(am__append_7837) \
+ $(am__append_7844) $(am__append_7851) $(am__append_7858) \
+ $(am__append_7865) $(am__append_7872) $(am__append_7879) \
+ $(am__append_7886) $(am__append_7893) $(am__append_7900) \
+ $(am__append_7907) $(am__append_7914) $(am__append_7921) \
+ $(am__append_7928) $(am__append_7935) $(am__append_7942) \
+ $(am__append_7949) $(am__append_7956) $(am__append_7963) \
+ $(am__append_7970) $(am__append_7977) $(am__append_7984) \
+ $(am__append_7991) $(am__append_7998) $(am__append_8005) \
+ $(am__append_8012) $(am__append_8019) $(am__append_8026) \
+ $(am__append_8033) $(am__append_8040) $(am__append_8047) \
+ $(am__append_8054) $(am__append_8061) $(am__append_8068) \
+ $(am__append_8075) $(am__append_8082) $(am__append_8089) \
+ $(am__append_8096) $(am__append_8103) $(am__append_8110) \
+ $(am__append_8117) $(am__append_8124) $(am__append_8131) \
+ $(am__append_8138) $(am__append_8145) $(am__append_8152) \
+ $(am__append_8159) $(am__append_8166) $(am__append_8173) \
+ $(am__append_8180) $(am__append_8187) $(am__append_8194) \
+ $(am__append_8201) $(am__append_8208) $(am__append_8215) \
+ $(am__append_8222) $(am__append_8229) $(am__append_8236) \
+ $(am__append_8243) $(am__append_8250) $(am__append_8257) \
+ $(am__append_8264) $(am__append_8271) $(am__append_8278) \
+ $(am__append_8285) $(am__append_8292) $(am__append_8299) \
+ $(am__append_8306) $(am__append_8313) $(am__append_8320) \
+ $(am__append_8327) $(am__append_8334) $(am__append_8341) \
+ $(am__append_8348) $(am__append_8355) $(am__append_8362) \
+ $(am__append_8369) $(am__append_8376) $(am__append_8383) \
+ $(am__append_8390) $(am__append_8397) $(am__append_8404) \
+ $(am__append_8411) $(am__append_8418) $(am__append_8425) \
+ $(am__append_8432) $(am__append_8439) $(am__append_8446) \
+ $(am__append_8453) $(am__append_8460) $(am__append_8467) \
+ $(am__append_8474) $(am__append_8481) $(am__append_8488) \
+ $(am__append_8495) $(am__append_8502) $(am__append_8509) \
+ $(am__append_8516) $(am__append_8523) $(am__append_8530) \
+ $(am__append_8537) $(am__append_8544) $(am__append_8551) \
+ $(am__append_8558) $(am__append_8565) $(am__append_8572) \
+ $(am__append_8579) $(am__append_8586) $(am__append_8593) \
+ $(am__append_8600) $(am__append_8607) $(am__append_8614) \
+ $(am__append_8621) $(am__append_8628) $(am__append_8635) \
+ $(am__append_8642) $(am__append_8649) $(am__append_8656) \
+ $(am__append_8663) $(am__append_8670) $(am__append_8677) \
+ $(am__append_8684) $(am__append_8691) $(am__append_8698) \
+ $(am__append_8705) $(am__append_8712) $(am__append_8719) \
+ $(am__append_8726) $(am__append_8733) $(am__append_8740) \
+ $(am__append_8747) $(am__append_8754) $(am__append_8761) \
+ $(am__append_8768) $(am__append_8775) $(am__append_8782) \
+ $(am__append_8789) $(am__append_8796) $(am__append_8803) \
+ $(am__append_8810) $(am__append_8817) $(am__append_8824) \
+ $(am__append_8831) $(am__append_8838) $(am__append_8845) \
+ $(am__append_8852) $(am__append_8859) $(am__append_8866) \
+ $(am__append_8873) $(am__append_8880) $(am__append_8887) \
+ $(am__append_8894) $(am__append_8901) $(am__append_8908) \
+ $(am__append_8915) $(am__append_8922) $(am__append_8929) \
+ $(am__append_8936) $(am__append_8943) $(am__append_8950) \
+ $(am__append_8957) $(am__append_8964) $(am__append_8971) \
+ $(am__append_8978) $(am__append_8985) $(am__append_8992) \
+ $(am__append_8999) $(am__append_9006) $(am__append_9013) \
+ $(am__append_9020) $(am__append_9027) $(am__append_9034) \
+ $(am__append_9041) $(am__append_9048) $(am__append_9055) \
+ $(am__append_9062) $(am__append_9069) $(am__append_9076) \
+ $(am__append_9083) $(am__append_9090) $(am__append_9097) \
+ $(am__append_9104) $(am__append_9111) $(am__append_9118) \
+ $(am__append_9125) $(am__append_9132) $(am__append_9139) \
+ $(am__append_9146) $(am__append_9153) $(am__append_9160) \
+ $(am__append_9167) $(am__append_9174) $(am__append_9181) \
+ $(am__append_9188) $(am__append_9195) $(am__append_9202) \
+ $(am__append_9209) $(am__append_9216) $(am__append_9223) \
+ $(am__append_9230) $(am__append_9237) $(am__append_9244) \
+ $(am__append_9251) $(am__append_9258) $(am__append_9265) \
+ $(am__append_9272) $(am__append_9279) $(am__append_9286) \
+ $(am__append_9293) $(am__append_9300) $(am__append_9307) \
+ $(am__append_9314) $(am__append_9321) $(am__append_9328) \
+ $(am__append_9335) $(am__append_9342) $(am__append_9349) \
+ $(am__append_9356) $(am__append_9363) $(am__append_9370) \
+ $(am__append_9377) $(am__append_9384) $(am__append_9391) \
+ $(am__append_9398) $(am__append_9405) $(am__append_9412) \
+ $(am__append_9419) $(am__append_9426) $(am__append_9433) \
+ $(am__append_9440) $(am__append_9447) $(am__append_9454) \
+ $(am__append_9461) $(am__append_9468) $(am__append_9475) \
+ $(am__append_9482) $(am__append_9489) $(am__append_9496) \
+ $(am__append_9503) $(am__append_9510) $(am__append_9517) \
+ $(am__append_9524) $(am__append_9531) $(am__append_9538) \
+ $(am__append_9545) $(am__append_9552) $(am__append_9559) \
+ $(am__append_9566) $(am__append_9573) $(am__append_9580) \
+ $(am__append_9587) $(am__append_9594) $(am__append_9601) \
+ $(am__append_9608) $(am__append_9615) $(am__append_9622) \
+ $(am__append_9629) $(am__append_9636) $(am__append_9643) \
+ $(am__append_9650) $(am__append_9657) $(am__append_9664) \
+ $(am__append_9671) $(am__append_9678) $(am__append_9685) \
+ $(am__append_9692) $(am__append_9699) $(am__append_9706) \
+ $(am__append_9713) $(am__append_9720) $(am__append_9727) \
+ $(am__append_9734) $(am__append_9741) $(am__append_9748) \
+ $(am__append_9755) $(am__append_9762) $(am__append_9769) \
+ $(am__append_9776) $(am__append_9783) $(am__append_9790) \
+ $(am__append_9797) $(am__append_9804) $(am__append_9811) \
+ $(am__append_9818) $(am__append_9825) $(am__append_9832) \
+ $(am__append_9839) $(am__append_9846) $(am__append_9853) \
+ $(am__append_9860) $(am__append_9867) $(am__append_9874) \
+ $(am__append_9881) $(am__append_9888) $(am__append_9895) \
+ $(am__append_9902) $(am__append_9909) $(am__append_9916) \
+ $(am__append_9923) $(am__append_9930) $(am__append_9937) \
+ $(am__append_9944) $(am__append_9951) $(am__append_9958) \
+ $(am__append_9965) $(am__append_9972) $(am__append_9979) \
+ $(am__append_9986) $(am__append_9993) $(am__append_10000) \
+ $(am__append_10007) $(am__append_10014) $(am__append_10021) \
+ $(am__append_10028) $(am__append_10035) $(am__append_10042) \
+ $(am__append_10049) $(am__append_10056) $(am__append_10063) \
+ $(am__append_10070) $(am__append_10077) $(am__append_10084) \
+ $(am__append_10091) $(am__append_10098) $(am__append_10105) \
+ $(am__append_10112) $(am__append_10119) $(am__append_10126) \
+ $(am__append_10133) $(am__append_10140) $(am__append_10147) \
+ $(am__append_10154) $(am__append_10161) $(am__append_10168) \
+ $(am__append_10175) $(am__append_10182) $(am__append_10189) \
+ $(am__append_10196) $(am__append_10203) $(am__append_10210) \
+ $(am__append_10217) $(am__append_10224) $(am__append_10231) \
+ $(am__append_10238) $(am__append_10245) $(am__append_10252) \
+ $(am__append_10259) $(am__append_10266) $(am__append_10273) \
+ $(am__append_10280) $(am__append_10287) $(am__append_10294) \
+ $(am__append_10301) $(am__append_10308) $(am__append_10315) \
+ $(am__append_10322) $(am__append_10329) $(am__append_10336) \
+ $(am__append_10343) $(am__append_10350) $(am__append_10357) \
+ $(am__append_10364) $(am__append_10371) $(am__append_10378) \
+ $(am__append_10385) $(am__append_10392) $(am__append_10399) \
+ $(am__append_10406) $(am__append_10413) $(am__append_10420) \
+ $(am__append_10427) $(am__append_10434) $(am__append_10441) \
+ $(am__append_10448) $(am__append_10455) $(am__append_10462) \
+ $(am__append_10469) $(am__append_10476) $(am__append_10483) \
+ $(am__append_10490) $(am__append_10497) $(am__append_10504) \
+ $(am__append_10511) $(am__append_10518) $(am__append_10525) \
+ $(am__append_10532) $(am__append_10539) $(am__append_10546) \
+ $(am__append_10553) $(am__append_10560) $(am__append_10567) \
+ $(am__append_10574) $(am__append_10581) $(am__append_10588) \
+ $(am__append_10595) $(am__append_10602) $(am__append_10609) \
+ $(am__append_10616) $(am__append_10623) $(am__append_10630) \
+ $(am__append_10637) $(am__append_10644) $(am__append_10651) \
+ $(am__append_10658) $(am__append_10665) $(am__append_10672) \
+ $(am__append_10679) $(am__append_10686) $(am__append_10693) \
+ $(am__append_10700) $(am__append_10707) $(am__append_10714) \
+ $(am__append_10721) $(am__append_10728) $(am__append_10735) \
+ $(am__append_10742) $(am__append_10749) $(am__append_10756) \
+ $(am__append_10763) $(am__append_10770) $(am__append_10777) \
+ $(am__append_10784) $(am__append_10791) $(am__append_10798) \
+ $(am__append_10805) $(am__append_10812) $(am__append_10819) \
+ $(am__append_10826) $(am__append_10833) $(am__append_10840) \
+ $(am__append_10847) $(am__append_10854) $(am__append_10861) \
+ $(am__append_10868) $(am__append_10875) $(am__append_10882) \
+ $(am__append_10889) $(am__append_10896) $(am__append_10903) \
+ $(am__append_10910) $(am__append_10917) $(am__append_10924) \
+ $(am__append_10931) $(am__append_10938) $(am__append_10945) \
+ $(am__append_10952) $(am__append_10959) $(am__append_10966) \
+ $(am__append_10973) $(am__append_10980) $(am__append_10987) \
+ $(am__append_10994) $(am__append_11001) $(am__append_11008) \
+ $(am__append_11015) $(am__append_11022) $(am__append_11029) \
+ $(am__append_11036) $(am__append_11043) $(am__append_11050) \
+ $(am__append_11057) $(am__append_11064) $(am__append_11071) \
+ $(am__append_11078) $(am__append_11085) $(am__append_11092) \
+ $(am__append_11099) $(am__append_11106) $(am__append_11113) \
+ $(am__append_11120) $(am__append_11127) $(am__append_11134) \
+ $(am__append_11141) $(am__append_11148) $(am__append_11155) \
+ $(am__append_11162) $(am__append_11169) $(am__append_11176) \
+ $(am__append_11183) $(am__append_11190) $(am__append_11197) \
+ $(am__append_11204) $(am__append_11211) $(am__append_11218) \
+ $(am__append_11225) $(am__append_11232) $(am__append_11239) \
+ $(am__append_11246) $(am__append_11253) $(am__append_11260) \
+ $(am__append_11267) $(am__append_11274) $(am__append_11281) \
+ $(am__append_11288) $(am__append_11295) $(am__append_11302) \
+ $(am__append_11309) $(am__append_11316) $(am__append_11323) \
+ $(am__append_11330) $(am__append_11337) $(am__append_11344) \
+ $(am__append_11351) $(am__append_11358) $(am__append_11365) \
+ $(am__append_11372) $(am__append_11379) $(am__append_11386) \
+ $(am__append_11393) $(am__append_11400) $(am__append_11407) \
+ $(am__append_11414) $(am__append_11421) $(am__append_11428) \
+ $(am__append_11435) $(am__append_11442) $(am__append_11449) \
+ $(am__append_11456) $(am__append_11463) $(am__append_11470) \
+ $(am__append_11477) $(am__append_11484) $(am__append_11491) \
+ $(am__append_11498) $(am__append_11505) $(am__append_11512) \
+ $(am__append_11519) $(am__append_11526) $(am__append_11533) \
+ $(am__append_11540) $(am__append_11547) $(am__append_11554) \
+ $(am__append_11561) $(am__append_11568) $(am__append_11575) \
+ $(am__append_11582) $(am__append_11589) $(am__append_11596) \
+ $(am__append_11603) $(am__append_11610) $(am__append_11617) \
+ $(am__append_11624) $(am__append_11631) $(am__append_11638) \
+ $(am__append_11645) $(am__append_11652) $(am__append_11659) \
+ $(am__append_11666) $(am__append_11673) $(am__append_11680) \
+ $(am__append_11687) $(am__append_11694) $(am__append_11701) \
+ $(am__append_11708) $(am__append_11715) $(am__append_11722) \
+ $(am__append_11729) $(am__append_11736) $(am__append_11743) \
+ $(am__append_11750) $(am__append_11757) $(am__append_11764) \
+ $(am__append_11771) $(am__append_11778) $(am__append_11785) \
+ $(am__append_11792) $(am__append_11799) $(am__append_11806) \
+ $(am__append_11813) $(am__append_11820) $(am__append_11827) \
+ $(am__append_11834) $(am__append_11841) $(am__append_11848) \
+ $(am__append_11855) $(am__append_11862) $(am__append_11869) \
+ $(am__append_11876) $(am__append_11883) $(am__append_11890) \
+ $(am__append_11897) $(am__append_11904) $(am__append_11911) \
+ $(am__append_11918) $(am__append_11925) $(am__append_11932) \
+ $(am__append_11939) $(am__append_11946) $(am__append_11953) \
+ $(am__append_11960) $(am__append_11967) $(am__append_11974) \
+ $(am__append_11981) $(am__append_11988) $(am__append_11995) \
+ $(am__append_12002) $(am__append_12009) $(am__append_12016) \
+ $(am__append_12023) $(am__append_12030) $(am__append_12037) \
+ $(am__append_12044) $(am__append_12051) $(am__append_12058) \
+ $(am__append_12065) $(am__append_12072) $(am__append_12079) \
+ $(am__append_12086) $(am__append_12093) $(am__append_12100) \
+ $(am__append_12107) $(am__append_12114) $(am__append_12121) \
+ $(am__append_12128)
+MARKER_FILES = $(am__append_16) $(am__append_23) $(am__append_30) \
+ $(am__append_37) $(am__append_44) $(am__append_51) \
+ $(am__append_58) $(am__append_65) $(am__append_72) \
+ $(am__append_79) $(am__append_86) $(am__append_93) \
+ $(am__append_100) $(am__append_107) $(am__append_114) \
+ $(am__append_121) $(am__append_128) $(am__append_135) \
+ $(am__append_142) $(am__append_149) $(am__append_156) \
+ $(am__append_163) $(am__append_170) $(am__append_177) \
+ $(am__append_184) $(am__append_191) $(am__append_198) \
+ $(am__append_205) $(am__append_212) $(am__append_219) \
+ $(am__append_226) $(am__append_233) $(am__append_240) \
+ $(am__append_247) $(am__append_254) $(am__append_261) \
+ $(am__append_268) $(am__append_275) $(am__append_282) \
+ $(am__append_289) $(am__append_296) $(am__append_303) \
+ $(am__append_310) $(am__append_317) $(am__append_324) \
+ $(am__append_331) $(am__append_338) $(am__append_345) \
+ $(am__append_352) $(am__append_359) $(am__append_366) \
+ $(am__append_373) $(am__append_380) $(am__append_387) \
+ $(am__append_394) $(am__append_401) $(am__append_408) \
+ $(am__append_415) $(am__append_422) $(am__append_429) \
+ $(am__append_436) $(am__append_443) $(am__append_450) \
+ $(am__append_457) $(am__append_464) $(am__append_471) \
+ $(am__append_478) $(am__append_485) $(am__append_492) \
+ $(am__append_499) $(am__append_506) $(am__append_513) \
+ $(am__append_520) $(am__append_527) $(am__append_534) \
+ $(am__append_541) $(am__append_548) $(am__append_555) \
+ $(am__append_562) $(am__append_569) $(am__append_576) \
+ $(am__append_583) $(am__append_590) $(am__append_597) \
+ $(am__append_604) $(am__append_611) $(am__append_618) \
+ $(am__append_625) $(am__append_632) $(am__append_639) \
+ $(am__append_646) $(am__append_653) $(am__append_660) \
+ $(am__append_667) $(am__append_674) $(am__append_681) \
+ $(am__append_688) $(am__append_695) $(am__append_702) \
+ $(am__append_709) $(am__append_716) $(am__append_723) \
+ $(am__append_730) $(am__append_737) $(am__append_744) \
+ $(am__append_751) $(am__append_758) $(am__append_765) \
+ $(am__append_772) $(am__append_779) $(am__append_786) \
+ $(am__append_793) $(am__append_800) $(am__append_807) \
+ $(am__append_814) $(am__append_821) $(am__append_828) \
+ $(am__append_835) $(am__append_842) $(am__append_849) \
+ $(am__append_856) $(am__append_863) $(am__append_870) \
+ $(am__append_877) $(am__append_884) $(am__append_891) \
+ $(am__append_898) $(am__append_905) $(am__append_912) \
+ $(am__append_919) $(am__append_926) $(am__append_933) \
+ $(am__append_940) $(am__append_947) $(am__append_954) \
+ $(am__append_961) $(am__append_968) $(am__append_975) \
+ $(am__append_982) $(am__append_989) $(am__append_996) \
+ $(am__append_1003) $(am__append_1010) $(am__append_1017) \
+ $(am__append_1024) $(am__append_1031) $(am__append_1038) \
+ $(am__append_1045) $(am__append_1052) $(am__append_1059) \
+ $(am__append_1066) $(am__append_1073) $(am__append_1080) \
+ $(am__append_1087) $(am__append_1094) $(am__append_1101) \
+ $(am__append_1108) $(am__append_1115) $(am__append_1122) \
+ $(am__append_1129) $(am__append_1136) $(am__append_1143) \
+ $(am__append_1150) $(am__append_1157) $(am__append_1164) \
+ $(am__append_1171) $(am__append_1178) $(am__append_1185) \
+ $(am__append_1192) $(am__append_1199) $(am__append_1206) \
+ $(am__append_1213) $(am__append_1220) $(am__append_1227) \
+ $(am__append_1234) $(am__append_1241) $(am__append_1248) \
+ $(am__append_1255) $(am__append_1262) $(am__append_1269) \
+ $(am__append_1276) $(am__append_1283) $(am__append_1290) \
+ $(am__append_1297) $(am__append_1304) $(am__append_1311) \
+ $(am__append_1318) $(am__append_1325) $(am__append_1332) \
+ $(am__append_1339) $(am__append_1346) $(am__append_1353) \
+ $(am__append_1360) $(am__append_1367) $(am__append_1374) \
+ $(am__append_1381) $(am__append_1388) $(am__append_1395) \
+ $(am__append_1402) $(am__append_1409) $(am__append_1416) \
+ $(am__append_1423) $(am__append_1430) $(am__append_1437) \
+ $(am__append_1444) $(am__append_1451) $(am__append_1458) \
+ $(am__append_1465) $(am__append_1472) $(am__append_1479) \
+ $(am__append_1486) $(am__append_1493) $(am__append_1500) \
+ $(am__append_1507) $(am__append_1514) $(am__append_1521) \
+ $(am__append_1528) $(am__append_1535) $(am__append_1542) \
+ $(am__append_1549) $(am__append_1556) $(am__append_1563) \
+ $(am__append_1570) $(am__append_1577) $(am__append_1584) \
+ $(am__append_1591) $(am__append_1598) $(am__append_1605) \
+ $(am__append_1612) $(am__append_1619) $(am__append_1626) \
+ $(am__append_1633) $(am__append_1640) $(am__append_1647) \
+ $(am__append_1654) $(am__append_1661) $(am__append_1668) \
+ $(am__append_1675) $(am__append_1682) $(am__append_1689) \
+ $(am__append_1696) $(am__append_1703) $(am__append_1710) \
+ $(am__append_1717) $(am__append_1724) $(am__append_1731) \
+ $(am__append_1738) $(am__append_1745) $(am__append_1752) \
+ $(am__append_1759) $(am__append_1766) $(am__append_1773) \
+ $(am__append_1780) $(am__append_1787) $(am__append_1794) \
+ $(am__append_1801) $(am__append_1808) $(am__append_1815) \
+ $(am__append_1822) $(am__append_1829) $(am__append_1836) \
+ $(am__append_1843) $(am__append_1850) $(am__append_1857) \
+ $(am__append_1864) $(am__append_1871) $(am__append_1878) \
+ $(am__append_1885) $(am__append_1892) $(am__append_1899) \
+ $(am__append_1906) $(am__append_1913) $(am__append_1920) \
+ $(am__append_1927) $(am__append_1934) $(am__append_1941) \
+ $(am__append_1948) $(am__append_1955) $(am__append_1962) \
+ $(am__append_1969) $(am__append_1976) $(am__append_1983) \
+ $(am__append_1990) $(am__append_1997) $(am__append_2004) \
+ $(am__append_2011) $(am__append_2018) $(am__append_2025) \
+ $(am__append_2032) $(am__append_2039) $(am__append_2046) \
+ $(am__append_2053) $(am__append_2060) $(am__append_2067) \
+ $(am__append_2074) $(am__append_2081) $(am__append_2088) \
+ $(am__append_2095) $(am__append_2102) $(am__append_2109) \
+ $(am__append_2116) $(am__append_2123) $(am__append_2130) \
+ $(am__append_2137) $(am__append_2144) $(am__append_2151) \
+ $(am__append_2158) $(am__append_2165) $(am__append_2172) \
+ $(am__append_2179) $(am__append_2186) $(am__append_2193) \
+ $(am__append_2200) $(am__append_2207) $(am__append_2214) \
+ $(am__append_2221) $(am__append_2228) $(am__append_2235) \
+ $(am__append_2242) $(am__append_2249) $(am__append_2256) \
+ $(am__append_2263) $(am__append_2270) $(am__append_2277) \
+ $(am__append_2284) $(am__append_2291) $(am__append_2298) \
+ $(am__append_2305) $(am__append_2312) $(am__append_2319) \
+ $(am__append_2326) $(am__append_2333) $(am__append_2340) \
+ $(am__append_2347) $(am__append_2354) $(am__append_2361) \
+ $(am__append_2368) $(am__append_2375) $(am__append_2382) \
+ $(am__append_2389) $(am__append_2396) $(am__append_2403) \
+ $(am__append_2410) $(am__append_2417) $(am__append_2424) \
+ $(am__append_2431) $(am__append_2438) $(am__append_2445) \
+ $(am__append_2452) $(am__append_2459) $(am__append_2466) \
+ $(am__append_2473) $(am__append_2480) $(am__append_2487) \
+ $(am__append_2494) $(am__append_2501) $(am__append_2508) \
+ $(am__append_2515) $(am__append_2522) $(am__append_2529) \
+ $(am__append_2536) $(am__append_2543) $(am__append_2550) \
+ $(am__append_2557) $(am__append_2564) $(am__append_2571) \
+ $(am__append_2578) $(am__append_2585) $(am__append_2592) \
+ $(am__append_2599) $(am__append_2606) $(am__append_2613) \
+ $(am__append_2620) $(am__append_2627) $(am__append_2634) \
+ $(am__append_2641) $(am__append_2648) $(am__append_2655) \
+ $(am__append_2662) $(am__append_2669) $(am__append_2676) \
+ $(am__append_2683) $(am__append_2690) $(am__append_2697) \
+ $(am__append_2704) $(am__append_2711) $(am__append_2718) \
+ $(am__append_2725) $(am__append_2732) $(am__append_2739) \
+ $(am__append_2746) $(am__append_2753) $(am__append_2760) \
+ $(am__append_2767) $(am__append_2774) $(am__append_2781) \
+ $(am__append_2788) $(am__append_2795) $(am__append_2802) \
+ $(am__append_2809) $(am__append_2816) $(am__append_2823) \
+ $(am__append_2830) $(am__append_2837) $(am__append_2844) \
+ $(am__append_2851) $(am__append_2858) $(am__append_2865) \
+ $(am__append_2872) $(am__append_2879) $(am__append_2886) \
+ $(am__append_2893) $(am__append_2900) $(am__append_2907) \
+ $(am__append_2914) $(am__append_2921) $(am__append_2928) \
+ $(am__append_2935) $(am__append_2942) $(am__append_2949) \
+ $(am__append_2956) $(am__append_2963) $(am__append_2970) \
+ $(am__append_2977) $(am__append_2984) $(am__append_2991) \
+ $(am__append_2998) $(am__append_3005) $(am__append_3012) \
+ $(am__append_3019) $(am__append_3026) $(am__append_3033) \
+ $(am__append_3040) $(am__append_3047) $(am__append_3054) \
+ $(am__append_3061) $(am__append_3068) $(am__append_3075) \
+ $(am__append_3082) $(am__append_3089) $(am__append_3096) \
+ $(am__append_3103) $(am__append_3110) $(am__append_3117) \
+ $(am__append_3124) $(am__append_3131) $(am__append_3138) \
+ $(am__append_3145) $(am__append_3152) $(am__append_3159) \
+ $(am__append_3166) $(am__append_3173) $(am__append_3180) \
+ $(am__append_3187) $(am__append_3194) $(am__append_3201) \
+ $(am__append_3208) $(am__append_3215) $(am__append_3222) \
+ $(am__append_3229) $(am__append_3236) $(am__append_3243) \
+ $(am__append_3250) $(am__append_3257) $(am__append_3264) \
+ $(am__append_3271) $(am__append_3278) $(am__append_3285) \
+ $(am__append_3292) $(am__append_3299) $(am__append_3306) \
+ $(am__append_3313) $(am__append_3320) $(am__append_3327) \
+ $(am__append_3334) $(am__append_3341) $(am__append_3348) \
+ $(am__append_3355) $(am__append_3362) $(am__append_3369) \
+ $(am__append_3376) $(am__append_3383) $(am__append_3390) \
+ $(am__append_3397) $(am__append_3404) $(am__append_3411) \
+ $(am__append_3418) $(am__append_3425) $(am__append_3432) \
+ $(am__append_3439) $(am__append_3446) $(am__append_3453) \
+ $(am__append_3460) $(am__append_3467) $(am__append_3474) \
+ $(am__append_3481) $(am__append_3488) $(am__append_3495) \
+ $(am__append_3502) $(am__append_3509) $(am__append_3516) \
+ $(am__append_3523) $(am__append_3530) $(am__append_3537) \
+ $(am__append_3544) $(am__append_3551) $(am__append_3558) \
+ $(am__append_3565) $(am__append_3572) $(am__append_3579) \
+ $(am__append_3586) $(am__append_3593) $(am__append_3600) \
+ $(am__append_3607) $(am__append_3614) $(am__append_3621) \
+ $(am__append_3628) $(am__append_3635) $(am__append_3642) \
+ $(am__append_3649) $(am__append_3656) $(am__append_3663) \
+ $(am__append_3670) $(am__append_3677) $(am__append_3684) \
+ $(am__append_3691) $(am__append_3698) $(am__append_3705) \
+ $(am__append_3712) $(am__append_3719) $(am__append_3726) \
+ $(am__append_3733) $(am__append_3740) $(am__append_3747) \
+ $(am__append_3754) $(am__append_3761) $(am__append_3768) \
+ $(am__append_3775) $(am__append_3782) $(am__append_3789) \
+ $(am__append_3796) $(am__append_3803) $(am__append_3810) \
+ $(am__append_3817) $(am__append_3824) $(am__append_3831) \
+ $(am__append_3838) $(am__append_3845) $(am__append_3852) \
+ $(am__append_3859) $(am__append_3866) $(am__append_3873) \
+ $(am__append_3880) $(am__append_3887) $(am__append_3894) \
+ $(am__append_3901) $(am__append_3908) $(am__append_3915) \
+ $(am__append_3922) $(am__append_3929) $(am__append_3936) \
+ $(am__append_3943) $(am__append_3950) $(am__append_3957) \
+ $(am__append_3964) $(am__append_3971) $(am__append_3978) \
+ $(am__append_3985) $(am__append_3992) $(am__append_3999) \
+ $(am__append_4006) $(am__append_4013) $(am__append_4020) \
+ $(am__append_4027) $(am__append_4034) $(am__append_4041) \
+ $(am__append_4048) $(am__append_4055) $(am__append_4062) \
+ $(am__append_4069) $(am__append_4076) $(am__append_4083) \
+ $(am__append_4090) $(am__append_4097) $(am__append_4104) \
+ $(am__append_4111) $(am__append_4118) $(am__append_4125) \
+ $(am__append_4132) $(am__append_4139) $(am__append_4146) \
+ $(am__append_4153) $(am__append_4160) $(am__append_4167) \
+ $(am__append_4174) $(am__append_4181) $(am__append_4188) \
+ $(am__append_4195) $(am__append_4202) $(am__append_4209) \
+ $(am__append_4216) $(am__append_4223) $(am__append_4230) \
+ $(am__append_4237) $(am__append_4244) $(am__append_4251) \
+ $(am__append_4258) $(am__append_4265) $(am__append_4272) \
+ $(am__append_4279) $(am__append_4286) $(am__append_4293) \
+ $(am__append_4300) $(am__append_4307) $(am__append_4314) \
+ $(am__append_4321) $(am__append_4328) $(am__append_4335) \
+ $(am__append_4342) $(am__append_4349) $(am__append_4356) \
+ $(am__append_4363) $(am__append_4370) $(am__append_4377) \
+ $(am__append_4384) $(am__append_4391) $(am__append_4398) \
+ $(am__append_4405) $(am__append_4412) $(am__append_4419) \
+ $(am__append_4426) $(am__append_4433) $(am__append_4440) \
+ $(am__append_4447) $(am__append_4454) $(am__append_4461) \
+ $(am__append_4468) $(am__append_4475) $(am__append_4482) \
+ $(am__append_4489) $(am__append_4496) $(am__append_4503) \
+ $(am__append_4510) $(am__append_4517) $(am__append_4524) \
+ $(am__append_4531) $(am__append_4538) $(am__append_4545) \
+ $(am__append_4552) $(am__append_4559) $(am__append_4566) \
+ $(am__append_4573) $(am__append_4580) $(am__append_4587) \
+ $(am__append_4594) $(am__append_4601) $(am__append_4608) \
+ $(am__append_4615) $(am__append_4622) $(am__append_4629) \
+ $(am__append_4636) $(am__append_4643) $(am__append_4650) \
+ $(am__append_4657) $(am__append_4664) $(am__append_4671) \
+ $(am__append_4678) $(am__append_4685) $(am__append_4692) \
+ $(am__append_4699) $(am__append_4706) $(am__append_4713) \
+ $(am__append_4720) $(am__append_4727) $(am__append_4734) \
+ $(am__append_4741) $(am__append_4748) $(am__append_4755) \
+ $(am__append_4762) $(am__append_4769) $(am__append_4776) \
+ $(am__append_4783) $(am__append_4790) $(am__append_4797) \
+ $(am__append_4804) $(am__append_4811) $(am__append_4818) \
+ $(am__append_4825) $(am__append_4832) $(am__append_4839) \
+ $(am__append_4846) $(am__append_4853) $(am__append_4860) \
+ $(am__append_4867) $(am__append_4874) $(am__append_4881) \
+ $(am__append_4888) $(am__append_4895) $(am__append_4902) \
+ $(am__append_4909) $(am__append_4916) $(am__append_4923) \
+ $(am__append_4930) $(am__append_4937) $(am__append_4944) \
+ $(am__append_4951) $(am__append_4958) $(am__append_4965) \
+ $(am__append_4972) $(am__append_4979) $(am__append_4986) \
+ $(am__append_4993) $(am__append_5000) $(am__append_5007) \
+ $(am__append_5014) $(am__append_5021) $(am__append_5028) \
+ $(am__append_5035) $(am__append_5042) $(am__append_5049) \
+ $(am__append_5056) $(am__append_5063) $(am__append_5070) \
+ $(am__append_5077) $(am__append_5084) $(am__append_5091) \
+ $(am__append_5098) $(am__append_5105) $(am__append_5112) \
+ $(am__append_5119) $(am__append_5126) $(am__append_5133) \
+ $(am__append_5140) $(am__append_5147) $(am__append_5154) \
+ $(am__append_5161) $(am__append_5168) $(am__append_5175) \
+ $(am__append_5182) $(am__append_5189) $(am__append_5196) \
+ $(am__append_5203) $(am__append_5210) $(am__append_5217) \
+ $(am__append_5224) $(am__append_5231) $(am__append_5238) \
+ $(am__append_5245) $(am__append_5252) $(am__append_5259) \
+ $(am__append_5266) $(am__append_5273) $(am__append_5280) \
+ $(am__append_5287) $(am__append_5294) $(am__append_5301) \
+ $(am__append_5308) $(am__append_5315) $(am__append_5322) \
+ $(am__append_5329) $(am__append_5336) $(am__append_5343) \
+ $(am__append_5350) $(am__append_5357) $(am__append_5364) \
+ $(am__append_5371) $(am__append_5378) $(am__append_5385) \
+ $(am__append_5392) $(am__append_5399) $(am__append_5406) \
+ $(am__append_5413) $(am__append_5420) $(am__append_5427) \
+ $(am__append_5434) $(am__append_5441) $(am__append_5448) \
+ $(am__append_5455) $(am__append_5462) $(am__append_5469) \
+ $(am__append_5476) $(am__append_5483) $(am__append_5490) \
+ $(am__append_5497) $(am__append_5504) $(am__append_5511) \
+ $(am__append_5518) $(am__append_5525) $(am__append_5532) \
+ $(am__append_5539) $(am__append_5546) $(am__append_5553) \
+ $(am__append_5560) $(am__append_5567) $(am__append_5574) \
+ $(am__append_5581) $(am__append_5588) $(am__append_5595) \
+ $(am__append_5602) $(am__append_5609) $(am__append_5616) \
+ $(am__append_5623) $(am__append_5630) $(am__append_5637) \
+ $(am__append_5644) $(am__append_5651) $(am__append_5658) \
+ $(am__append_5665) $(am__append_5672) $(am__append_5679) \
+ $(am__append_5686) $(am__append_5693) $(am__append_5700) \
+ $(am__append_5707) $(am__append_5714) $(am__append_5721) \
+ $(am__append_5728) $(am__append_5735) $(am__append_5742) \
+ $(am__append_5749) $(am__append_5756) $(am__append_5763) \
+ $(am__append_5770) $(am__append_5777) $(am__append_5784) \
+ $(am__append_5791) $(am__append_5798) $(am__append_5805) \
+ $(am__append_5812) $(am__append_5819) $(am__append_5826) \
+ $(am__append_5833) $(am__append_5840) $(am__append_5847) \
+ $(am__append_5854) $(am__append_5861) $(am__append_5868) \
+ $(am__append_5875) $(am__append_5882) $(am__append_5889) \
+ $(am__append_5896) $(am__append_5903) $(am__append_5910) \
+ $(am__append_5917) $(am__append_5924) $(am__append_5931) \
+ $(am__append_5938) $(am__append_5945) $(am__append_5952) \
+ $(am__append_5959) $(am__append_5966) $(am__append_5973) \
+ $(am__append_5980) $(am__append_5987) $(am__append_5994) \
+ $(am__append_6001) $(am__append_6008) $(am__append_6015) \
+ $(am__append_6022) $(am__append_6029) $(am__append_6036) \
+ $(am__append_6043) $(am__append_6050) $(am__append_6057) \
+ $(am__append_6064) $(am__append_6071) $(am__append_6078) \
+ $(am__append_6085) $(am__append_6092) $(am__append_6099) \
+ $(am__append_6106) $(am__append_6113) $(am__append_6120) \
+ $(am__append_6127) $(am__append_6134) $(am__append_6141) \
+ $(am__append_6148) $(am__append_6155) $(am__append_6162) \
+ $(am__append_6169) $(am__append_6176) $(am__append_6183) \
+ $(am__append_6190) $(am__append_6197) $(am__append_6204) \
+ $(am__append_6211) $(am__append_6218) $(am__append_6225) \
+ $(am__append_6232) $(am__append_6239) $(am__append_6246) \
+ $(am__append_6253) $(am__append_6260) $(am__append_6267) \
+ $(am__append_6274) $(am__append_6281) $(am__append_6288) \
+ $(am__append_6295) $(am__append_6302) $(am__append_6309) \
+ $(am__append_6316) $(am__append_6323) $(am__append_6330) \
+ $(am__append_6337) $(am__append_6344) $(am__append_6351) \
+ $(am__append_6358) $(am__append_6365) $(am__append_6372) \
+ $(am__append_6379) $(am__append_6386) $(am__append_6393) \
+ $(am__append_6400) $(am__append_6407) $(am__append_6414) \
+ $(am__append_6421) $(am__append_6428) $(am__append_6435) \
+ $(am__append_6442) $(am__append_6449) $(am__append_6456) \
+ $(am__append_6463) $(am__append_6470) $(am__append_6477) \
+ $(am__append_6484) $(am__append_6491) $(am__append_6498) \
+ $(am__append_6505) $(am__append_6512) $(am__append_6519) \
+ $(am__append_6526) $(am__append_6533) $(am__append_6540) \
+ $(am__append_6547) $(am__append_6554) $(am__append_6561) \
+ $(am__append_6568) $(am__append_6575) $(am__append_6582) \
+ $(am__append_6589) $(am__append_6596) $(am__append_6603) \
+ $(am__append_6610) $(am__append_6617) $(am__append_6624) \
+ $(am__append_6631) $(am__append_6638) $(am__append_6645) \
+ $(am__append_6652) $(am__append_6659) $(am__append_6666) \
+ $(am__append_6673) $(am__append_6680) $(am__append_6687) \
+ $(am__append_6694) $(am__append_6701) $(am__append_6708) \
+ $(am__append_6715) $(am__append_6722) $(am__append_6729) \
+ $(am__append_6736) $(am__append_6743) $(am__append_6750) \
+ $(am__append_6757) $(am__append_6764) $(am__append_6771) \
+ $(am__append_6778) $(am__append_6785) $(am__append_6792) \
+ $(am__append_6799) $(am__append_6806) $(am__append_6813) \
+ $(am__append_6820) $(am__append_6827) $(am__append_6834) \
+ $(am__append_6841) $(am__append_6848) $(am__append_6855) \
+ $(am__append_6862) $(am__append_6869) $(am__append_6876) \
+ $(am__append_6883) $(am__append_6890) $(am__append_6897) \
+ $(am__append_6904) $(am__append_6911) $(am__append_6918) \
+ $(am__append_6925) $(am__append_6932) $(am__append_6939) \
+ $(am__append_6946) $(am__append_6953) $(am__append_6960) \
+ $(am__append_6967) $(am__append_6974) $(am__append_6981) \
+ $(am__append_6988) $(am__append_6995) $(am__append_7002) \
+ $(am__append_7009) $(am__append_7016) $(am__append_7023) \
+ $(am__append_7030) $(am__append_7037) $(am__append_7044) \
+ $(am__append_7051) $(am__append_7058) $(am__append_7065) \
+ $(am__append_7072) $(am__append_7079) $(am__append_7086) \
+ $(am__append_7093) $(am__append_7100) $(am__append_7107) \
+ $(am__append_7114) $(am__append_7121) $(am__append_7128) \
+ $(am__append_7135) $(am__append_7142) $(am__append_7149) \
+ $(am__append_7156) $(am__append_7163) $(am__append_7170) \
+ $(am__append_7177) $(am__append_7184) $(am__append_7191) \
+ $(am__append_7198) $(am__append_7205) $(am__append_7212) \
+ $(am__append_7219) $(am__append_7226) $(am__append_7233) \
+ $(am__append_7240) $(am__append_7247) $(am__append_7254) \
+ $(am__append_7261) $(am__append_7268) $(am__append_7275) \
+ $(am__append_7282) $(am__append_7289) $(am__append_7296) \
+ $(am__append_7303) $(am__append_7310) $(am__append_7317) \
+ $(am__append_7324) $(am__append_7331) $(am__append_7338) \
+ $(am__append_7345) $(am__append_7352) $(am__append_7359) \
+ $(am__append_7366) $(am__append_7373) $(am__append_7380) \
+ $(am__append_7387) $(am__append_7394) $(am__append_7401) \
+ $(am__append_7408) $(am__append_7415) $(am__append_7422) \
+ $(am__append_7429) $(am__append_7436) $(am__append_7443) \
+ $(am__append_7450) $(am__append_7457) $(am__append_7464) \
+ $(am__append_7471) $(am__append_7478) $(am__append_7485) \
+ $(am__append_7492) $(am__append_7499) $(am__append_7506) \
+ $(am__append_7513) $(am__append_7520) $(am__append_7527) \
+ $(am__append_7534) $(am__append_7541) $(am__append_7548) \
+ $(am__append_7555) $(am__append_7562) $(am__append_7569) \
+ $(am__append_7576) $(am__append_7583) $(am__append_7590) \
+ $(am__append_7597) $(am__append_7604) $(am__append_7611) \
+ $(am__append_7618) $(am__append_7625) $(am__append_7632) \
+ $(am__append_7639) $(am__append_7646) $(am__append_7653) \
+ $(am__append_7660) $(am__append_7667) $(am__append_7674) \
+ $(am__append_7681) $(am__append_7688) $(am__append_7695) \
+ $(am__append_7702) $(am__append_7709) $(am__append_7716) \
+ $(am__append_7723) $(am__append_7730) $(am__append_7737) \
+ $(am__append_7744) $(am__append_7751) $(am__append_7758) \
+ $(am__append_7765) $(am__append_7772) $(am__append_7779) \
+ $(am__append_7786) $(am__append_7793) $(am__append_7800) \
+ $(am__append_7807) $(am__append_7814) $(am__append_7821) \
+ $(am__append_7828) $(am__append_7835) $(am__append_7842) \
+ $(am__append_7849) $(am__append_7856) $(am__append_7863) \
+ $(am__append_7870) $(am__append_7877) $(am__append_7884) \
+ $(am__append_7891) $(am__append_7898) $(am__append_7905) \
+ $(am__append_7912) $(am__append_7919) $(am__append_7926) \
+ $(am__append_7933) $(am__append_7940) $(am__append_7947) \
+ $(am__append_7954) $(am__append_7961) $(am__append_7968) \
+ $(am__append_7975) $(am__append_7982) $(am__append_7989) \
+ $(am__append_7996) $(am__append_8003) $(am__append_8010) \
+ $(am__append_8017) $(am__append_8024) $(am__append_8031) \
+ $(am__append_8038) $(am__append_8045) $(am__append_8052) \
+ $(am__append_8059) $(am__append_8066) $(am__append_8073) \
+ $(am__append_8080) $(am__append_8087) $(am__append_8094) \
+ $(am__append_8101) $(am__append_8108) $(am__append_8115) \
+ $(am__append_8122) $(am__append_8129) $(am__append_8136) \
+ $(am__append_8143) $(am__append_8150) $(am__append_8157) \
+ $(am__append_8164) $(am__append_8171) $(am__append_8178) \
+ $(am__append_8185) $(am__append_8192) $(am__append_8199) \
+ $(am__append_8206) $(am__append_8213) $(am__append_8220) \
+ $(am__append_8227) $(am__append_8234) $(am__append_8241) \
+ $(am__append_8248) $(am__append_8255) $(am__append_8262) \
+ $(am__append_8269) $(am__append_8276) $(am__append_8283) \
+ $(am__append_8290) $(am__append_8297) $(am__append_8304) \
+ $(am__append_8311) $(am__append_8318) $(am__append_8325) \
+ $(am__append_8332) $(am__append_8339) $(am__append_8346) \
+ $(am__append_8353) $(am__append_8360) $(am__append_8367) \
+ $(am__append_8374) $(am__append_8381) $(am__append_8388) \
+ $(am__append_8395) $(am__append_8402) $(am__append_8409) \
+ $(am__append_8416) $(am__append_8423) $(am__append_8430) \
+ $(am__append_8437) $(am__append_8444) $(am__append_8451) \
+ $(am__append_8458) $(am__append_8465) $(am__append_8472) \
+ $(am__append_8479) $(am__append_8486) $(am__append_8493) \
+ $(am__append_8500) $(am__append_8507) $(am__append_8514) \
+ $(am__append_8521) $(am__append_8528) $(am__append_8535) \
+ $(am__append_8542) $(am__append_8549) $(am__append_8556) \
+ $(am__append_8563) $(am__append_8570) $(am__append_8577) \
+ $(am__append_8584) $(am__append_8591) $(am__append_8598) \
+ $(am__append_8605) $(am__append_8612) $(am__append_8619) \
+ $(am__append_8626) $(am__append_8633) $(am__append_8640) \
+ $(am__append_8647) $(am__append_8654) $(am__append_8661) \
+ $(am__append_8668) $(am__append_8675) $(am__append_8682) \
+ $(am__append_8689) $(am__append_8696) $(am__append_8703) \
+ $(am__append_8710) $(am__append_8717) $(am__append_8724) \
+ $(am__append_8731) $(am__append_8738) $(am__append_8745) \
+ $(am__append_8752) $(am__append_8759) $(am__append_8766) \
+ $(am__append_8773) $(am__append_8780) $(am__append_8787) \
+ $(am__append_8794) $(am__append_8801) $(am__append_8808) \
+ $(am__append_8815) $(am__append_8822) $(am__append_8829) \
+ $(am__append_8836) $(am__append_8843) $(am__append_8850) \
+ $(am__append_8857) $(am__append_8864) $(am__append_8871) \
+ $(am__append_8878) $(am__append_8885) $(am__append_8892) \
+ $(am__append_8899) $(am__append_8906) $(am__append_8913) \
+ $(am__append_8920) $(am__append_8927) $(am__append_8934) \
+ $(am__append_8941) $(am__append_8948) $(am__append_8955) \
+ $(am__append_8962) $(am__append_8969) $(am__append_8976) \
+ $(am__append_8983) $(am__append_8990) $(am__append_8997) \
+ $(am__append_9004) $(am__append_9011) $(am__append_9018) \
+ $(am__append_9025) $(am__append_9032) $(am__append_9039) \
+ $(am__append_9046) $(am__append_9053) $(am__append_9060) \
+ $(am__append_9067) $(am__append_9074) $(am__append_9081) \
+ $(am__append_9088) $(am__append_9095) $(am__append_9102) \
+ $(am__append_9109) $(am__append_9116) $(am__append_9123) \
+ $(am__append_9130) $(am__append_9137) $(am__append_9144) \
+ $(am__append_9151) $(am__append_9158) $(am__append_9165) \
+ $(am__append_9172) $(am__append_9179) $(am__append_9186) \
+ $(am__append_9193) $(am__append_9200) $(am__append_9207) \
+ $(am__append_9214) $(am__append_9221) $(am__append_9228) \
+ $(am__append_9235) $(am__append_9242) $(am__append_9249) \
+ $(am__append_9256) $(am__append_9263) $(am__append_9270) \
+ $(am__append_9277) $(am__append_9284) $(am__append_9291) \
+ $(am__append_9298) $(am__append_9305) $(am__append_9312) \
+ $(am__append_9319) $(am__append_9326) $(am__append_9333) \
+ $(am__append_9340) $(am__append_9347) $(am__append_9354) \
+ $(am__append_9361) $(am__append_9368) $(am__append_9375) \
+ $(am__append_9382) $(am__append_9389) $(am__append_9396) \
+ $(am__append_9403) $(am__append_9410) $(am__append_9417) \
+ $(am__append_9424) $(am__append_9431) $(am__append_9438) \
+ $(am__append_9445) $(am__append_9452) $(am__append_9459) \
+ $(am__append_9466) $(am__append_9473) $(am__append_9480) \
+ $(am__append_9487) $(am__append_9494) $(am__append_9501) \
+ $(am__append_9508) $(am__append_9515) $(am__append_9522) \
+ $(am__append_9529) $(am__append_9536) $(am__append_9543) \
+ $(am__append_9550) $(am__append_9557) $(am__append_9564) \
+ $(am__append_9571) $(am__append_9578) $(am__append_9585) \
+ $(am__append_9592) $(am__append_9599) $(am__append_9606) \
+ $(am__append_9613) $(am__append_9620) $(am__append_9627) \
+ $(am__append_9634) $(am__append_9641) $(am__append_9648) \
+ $(am__append_9655) $(am__append_9662) $(am__append_9669) \
+ $(am__append_9676) $(am__append_9683) $(am__append_9690) \
+ $(am__append_9697) $(am__append_9704) $(am__append_9711) \
+ $(am__append_9718) $(am__append_9725) $(am__append_9732) \
+ $(am__append_9739) $(am__append_9746) $(am__append_9753) \
+ $(am__append_9760) $(am__append_9767) $(am__append_9774) \
+ $(am__append_9781) $(am__append_9788) $(am__append_9795) \
+ $(am__append_9802) $(am__append_9809) $(am__append_9816) \
+ $(am__append_9823) $(am__append_9830) $(am__append_9837) \
+ $(am__append_9844) $(am__append_9851) $(am__append_9858) \
+ $(am__append_9865) $(am__append_9872) $(am__append_9879) \
+ $(am__append_9886) $(am__append_9893) $(am__append_9900) \
+ $(am__append_9907) $(am__append_9914) $(am__append_9921) \
+ $(am__append_9928) $(am__append_9935) $(am__append_9942) \
+ $(am__append_9949) $(am__append_9956) $(am__append_9963) \
+ $(am__append_9970) $(am__append_9977) $(am__append_9984) \
+ $(am__append_9991) $(am__append_9998) $(am__append_10005) \
+ $(am__append_10012) $(am__append_10019) $(am__append_10026) \
+ $(am__append_10033) $(am__append_10040) $(am__append_10047) \
+ $(am__append_10054) $(am__append_10061) $(am__append_10068) \
+ $(am__append_10075) $(am__append_10082) $(am__append_10089) \
+ $(am__append_10096) $(am__append_10103) $(am__append_10110) \
+ $(am__append_10117) $(am__append_10124) $(am__append_10131) \
+ $(am__append_10138) $(am__append_10145) $(am__append_10152) \
+ $(am__append_10159) $(am__append_10166) $(am__append_10173) \
+ $(am__append_10180) $(am__append_10187) $(am__append_10194) \
+ $(am__append_10201) $(am__append_10208) $(am__append_10215) \
+ $(am__append_10222) $(am__append_10229) $(am__append_10236) \
+ $(am__append_10243) $(am__append_10250) $(am__append_10257) \
+ $(am__append_10264) $(am__append_10271) $(am__append_10278) \
+ $(am__append_10285) $(am__append_10292) $(am__append_10299) \
+ $(am__append_10306) $(am__append_10313) $(am__append_10320) \
+ $(am__append_10327) $(am__append_10334) $(am__append_10341) \
+ $(am__append_10348) $(am__append_10355) $(am__append_10362) \
+ $(am__append_10369) $(am__append_10376) $(am__append_10383) \
+ $(am__append_10390) $(am__append_10397) $(am__append_10404) \
+ $(am__append_10411) $(am__append_10418) $(am__append_10425) \
+ $(am__append_10432) $(am__append_10439) $(am__append_10446) \
+ $(am__append_10453) $(am__append_10460) $(am__append_10467) \
+ $(am__append_10474) $(am__append_10481) $(am__append_10488) \
+ $(am__append_10495) $(am__append_10502) $(am__append_10509) \
+ $(am__append_10516) $(am__append_10523) $(am__append_10530) \
+ $(am__append_10537) $(am__append_10544) $(am__append_10551) \
+ $(am__append_10558) $(am__append_10565) $(am__append_10572) \
+ $(am__append_10579) $(am__append_10586) $(am__append_10593) \
+ $(am__append_10600) $(am__append_10607) $(am__append_10614) \
+ $(am__append_10621) $(am__append_10628) $(am__append_10635) \
+ $(am__append_10642) $(am__append_10649) $(am__append_10656) \
+ $(am__append_10663) $(am__append_10670) $(am__append_10677) \
+ $(am__append_10684) $(am__append_10691) $(am__append_10698) \
+ $(am__append_10705) $(am__append_10712) $(am__append_10719) \
+ $(am__append_10726) $(am__append_10733) $(am__append_10740) \
+ $(am__append_10747) $(am__append_10754) $(am__append_10761) \
+ $(am__append_10768) $(am__append_10775) $(am__append_10782) \
+ $(am__append_10789) $(am__append_10796) $(am__append_10803) \
+ $(am__append_10810) $(am__append_10817) $(am__append_10824) \
+ $(am__append_10831) $(am__append_10838) $(am__append_10845) \
+ $(am__append_10852) $(am__append_10859) $(am__append_10866) \
+ $(am__append_10873) $(am__append_10880) $(am__append_10887) \
+ $(am__append_10894) $(am__append_10901) $(am__append_10908) \
+ $(am__append_10915) $(am__append_10922) $(am__append_10929) \
+ $(am__append_10936) $(am__append_10943) $(am__append_10950) \
+ $(am__append_10957) $(am__append_10964) $(am__append_10971) \
+ $(am__append_10978) $(am__append_10985) $(am__append_10992) \
+ $(am__append_10999) $(am__append_11006) $(am__append_11013) \
+ $(am__append_11020) $(am__append_11027) $(am__append_11034) \
+ $(am__append_11041) $(am__append_11048) $(am__append_11055) \
+ $(am__append_11062) $(am__append_11069) $(am__append_11076) \
+ $(am__append_11083) $(am__append_11090) $(am__append_11097) \
+ $(am__append_11104) $(am__append_11111) $(am__append_11118) \
+ $(am__append_11125) $(am__append_11132) $(am__append_11139) \
+ $(am__append_11146) $(am__append_11153) $(am__append_11160) \
+ $(am__append_11167) $(am__append_11174) $(am__append_11181) \
+ $(am__append_11188) $(am__append_11195) $(am__append_11202) \
+ $(am__append_11209) $(am__append_11216) $(am__append_11223) \
+ $(am__append_11230) $(am__append_11237) $(am__append_11244) \
+ $(am__append_11251) $(am__append_11258) $(am__append_11265) \
+ $(am__append_11272) $(am__append_11279) $(am__append_11286) \
+ $(am__append_11293) $(am__append_11300) $(am__append_11307) \
+ $(am__append_11314) $(am__append_11321) $(am__append_11328) \
+ $(am__append_11335) $(am__append_11342) $(am__append_11349) \
+ $(am__append_11356) $(am__append_11363) $(am__append_11370) \
+ $(am__append_11377) $(am__append_11384) $(am__append_11391) \
+ $(am__append_11398) $(am__append_11405) $(am__append_11412) \
+ $(am__append_11419) $(am__append_11426) $(am__append_11433) \
+ $(am__append_11440) $(am__append_11447) $(am__append_11454) \
+ $(am__append_11461) $(am__append_11468) $(am__append_11475) \
+ $(am__append_11482) $(am__append_11489) $(am__append_11496) \
+ $(am__append_11503) $(am__append_11510) $(am__append_11517) \
+ $(am__append_11524) $(am__append_11531) $(am__append_11538) \
+ $(am__append_11545) $(am__append_11552) $(am__append_11559) \
+ $(am__append_11566) $(am__append_11573) $(am__append_11580) \
+ $(am__append_11587) $(am__append_11594) $(am__append_11601) \
+ $(am__append_11608) $(am__append_11615) $(am__append_11622) \
+ $(am__append_11629) $(am__append_11636) $(am__append_11643) \
+ $(am__append_11650) $(am__append_11657) $(am__append_11664) \
+ $(am__append_11671) $(am__append_11678) $(am__append_11685) \
+ $(am__append_11692) $(am__append_11699) $(am__append_11706) \
+ $(am__append_11713) $(am__append_11720) $(am__append_11727) \
+ $(am__append_11734) $(am__append_11741) $(am__append_11748) \
+ $(am__append_11755) $(am__append_11762) $(am__append_11769) \
+ $(am__append_11776) $(am__append_11783) $(am__append_11790) \
+ $(am__append_11797) $(am__append_11804) $(am__append_11811) \
+ $(am__append_11818) $(am__append_11825) $(am__append_11832) \
+ $(am__append_11839) $(am__append_11846) $(am__append_11853) \
+ $(am__append_11860) $(am__append_11867) $(am__append_11874) \
+ $(am__append_11881) $(am__append_11888) $(am__append_11895) \
+ $(am__append_11902) $(am__append_11909) $(am__append_11916) \
+ $(am__append_11923) $(am__append_11930) $(am__append_11937) \
+ $(am__append_11944) $(am__append_11951) $(am__append_11958) \
+ $(am__append_11965) $(am__append_11972) $(am__append_11979) \
+ $(am__append_11986) $(am__append_11993) $(am__append_12000) \
+ $(am__append_12007) $(am__append_12014) $(am__append_12021) \
+ $(am__append_12028) $(am__append_12035) $(am__append_12042) \
+ $(am__append_12049) $(am__append_12056) $(am__append_12063) \
+ $(am__append_12070) $(am__append_12077) $(am__append_12084) \
+ $(am__append_12091) $(am__append_12098) $(am__append_12105) \
+ $(am__append_12112) $(am__append_12119) $(am__append_12126) \
+ $(am__append_12133)
+KERNEL_HEADER_FILES = $(top_srcdir)/include/grub/cache.h \
+ $(top_srcdir)/include/grub/command.h \
+ $(top_srcdir)/include/grub/device.h \
+ $(top_srcdir)/include/grub/disk.h \
+ $(top_srcdir)/include/grub/dl.h \
+ $(top_srcdir)/include/grub/env.h \
+ $(top_srcdir)/include/grub/env_private.h \
+ $(top_srcdir)/include/grub/err.h \
+ $(top_srcdir)/include/grub/file.h \
+ $(top_srcdir)/include/grub/fs.h \
+ $(top_srcdir)/include/grub/i18n.h \
+ $(top_srcdir)/include/grub/kernel.h \
+ $(top_srcdir)/include/grub/list.h \
+ $(top_srcdir)/include/grub/misc.h \
+ $(top_srcdir)/include/grub/mm.h \
+ $(top_srcdir)/include/grub/parser.h \
+ $(top_srcdir)/include/grub/partition.h \
+ $(top_srcdir)/include/grub/term.h \
+ $(top_srcdir)/include/grub/time.h \
+ $(top_srcdir)/include/grub/mm_private.h \
+ $(top_srcdir)/include/grub/boot.h \
+ $(top_srcdir)/include/grub/libgcc.h \
+ $(top_srcdir)/include/grub/memory.h $(am__append_12394) \
+ $(am__append_12395) $(am__append_12396) $(am__append_12397) \
+ $(am__append_12398) $(am__append_12399) $(am__append_12400) \
+ $(am__append_12401) $(am__append_12402) $(am__append_12403) \
+ $(am__append_12404) $(am__append_12405) $(am__append_12406) \
+ $(am__append_12407)
+man_MANS = $(am__append_12324)
+noinst_DATA = kernel_syms.lst
+pkglib_DATA =
+bin_SCRIPTS =
+sbin_SCRIPTS =
+platform_DATA = $(am__append_12138) $(am__append_12143) \
+ $(am__append_12148) $(am__append_12153) $(am__append_12158) \
+ $(am__append_12163) $(am__append_12168) $(am__append_12173) \
+ $(am__append_12178) $(am__append_12183) $(am__append_12188) \
+ $(am__append_12193) $(am__append_12198) $(am__append_12203) \
+ $(am__append_12208) $(am__append_12213) $(am__append_12218) \
+ $(am__append_12223) fs.lst command.lst partmap.lst \
+ terminal.lst parttool.lst video.lst crypto.lst moddep.lst \
+ $(MOD_FILES) $(am__append_12409)
+check_SCRIPTS =
+grubconf_DATA =
+noinst_SCRIPTS = $(am__append_12329) $(am__append_12331) \
+ $(am__append_12334) $(am__append_12337) $(am__append_12340) \
+ $(am__append_12343) $(am__append_12346) $(am__append_12349) \
+ $(am__append_12352) $(am__append_12355) $(am__append_12358) \
+ $(am__append_12361) $(am__append_12364) $(am__append_12367) \
+ $(am__append_12370) $(am__append_12373) $(am__append_12376) \
+ $(am__append_12379) $(am__append_12382) $(am__append_12385) \
+ $(am__append_12388) $(am__append_12391)
+pkglib_SCRIPTS =
+grubconf_SCRIPTS =
+noinst_LIBRARIES = $(am__append_12224) $(am__append_12233) \
+ $(am__append_12242) $(am__append_12251) $(am__append_12260) \
+ $(am__append_12269) $(am__append_12278) $(am__append_12287) \
+ $(am__append_12296) $(am__append_12305) $(am__append_12314)
+dist_noinst_DATA = $(am__append_12330) $(am__append_12333) \
+ $(am__append_12336) $(am__append_12339) $(am__append_12342) \
+ $(am__append_12345) $(am__append_12348) $(am__append_12351) \
+ $(am__append_12354) $(am__append_12357) $(am__append_12360) \
+ $(am__append_12363) $(am__append_12366) $(am__append_12369) \
+ $(am__append_12372) $(am__append_12375) $(am__append_12378) \
+ $(am__append_12381) $(am__append_12384) $(am__append_12387) \
+ $(am__append_12390) $(am__append_12393)
+EXTRA_DIST = $(am__append_12) $(am__append_19) $(am__append_26) \
+ $(am__append_33) $(am__append_40) $(am__append_47) \
+ $(am__append_54) $(am__append_61) $(am__append_68) \
+ $(am__append_75) $(am__append_82) $(am__append_89) \
+ $(am__append_96) $(am__append_103) $(am__append_110) \
+ $(am__append_117) $(am__append_124) $(am__append_131) \
+ $(am__append_138) $(am__append_145) $(am__append_152) \
+ $(am__append_159) $(am__append_166) $(am__append_173) \
+ $(am__append_180) $(am__append_187) $(am__append_194) \
+ $(am__append_201) $(am__append_208) $(am__append_215) \
+ $(am__append_222) $(am__append_229) $(am__append_236) \
+ $(am__append_243) $(am__append_250) $(am__append_257) \
+ $(am__append_264) $(am__append_271) $(am__append_278) \
+ $(am__append_285) $(am__append_292) $(am__append_299) \
+ $(am__append_306) $(am__append_313) $(am__append_320) \
+ $(am__append_327) $(am__append_334) $(am__append_341) \
+ $(am__append_348) $(am__append_355) $(am__append_362) \
+ $(am__append_369) $(am__append_376) $(am__append_383) \
+ $(am__append_390) $(am__append_397) $(am__append_404) \
+ $(am__append_411) $(am__append_418) $(am__append_425) \
+ $(am__append_432) $(am__append_439) $(am__append_446) \
+ $(am__append_453) $(am__append_460) $(am__append_467) \
+ $(am__append_474) $(am__append_481) $(am__append_488) \
+ $(am__append_495) $(am__append_502) $(am__append_509) \
+ $(am__append_516) $(am__append_523) $(am__append_530) \
+ $(am__append_537) $(am__append_544) $(am__append_551) \
+ $(am__append_558) $(am__append_565) $(am__append_572) \
+ $(am__append_579) $(am__append_586) $(am__append_593) \
+ $(am__append_600) $(am__append_607) $(am__append_614) \
+ $(am__append_621) $(am__append_628) $(am__append_635) \
+ $(am__append_642) $(am__append_649) $(am__append_656) \
+ $(am__append_663) $(am__append_670) $(am__append_677) \
+ $(am__append_684) $(am__append_691) $(am__append_698) \
+ $(am__append_705) $(am__append_712) $(am__append_719) \
+ $(am__append_726) $(am__append_733) $(am__append_740) \
+ $(am__append_747) $(am__append_754) $(am__append_761) \
+ $(am__append_768) $(am__append_775) $(am__append_782) \
+ $(am__append_789) $(am__append_796) $(am__append_803) \
+ $(am__append_810) $(am__append_817) $(am__append_824) \
+ $(am__append_831) $(am__append_838) $(am__append_845) \
+ $(am__append_852) $(am__append_859) $(am__append_866) \
+ $(am__append_873) $(am__append_880) $(am__append_887) \
+ $(am__append_894) $(am__append_901) $(am__append_908) \
+ $(am__append_915) $(am__append_922) $(am__append_929) \
+ $(am__append_936) $(am__append_943) $(am__append_950) \
+ $(am__append_957) $(am__append_964) $(am__append_971) \
+ $(am__append_978) $(am__append_985) $(am__append_992) \
+ $(am__append_999) $(am__append_1006) $(am__append_1013) \
+ $(am__append_1020) $(am__append_1027) $(am__append_1034) \
+ $(am__append_1041) $(am__append_1048) $(am__append_1055) \
+ $(am__append_1062) $(am__append_1069) $(am__append_1076) \
+ $(am__append_1083) $(am__append_1090) $(am__append_1097) \
+ $(am__append_1104) $(am__append_1111) $(am__append_1118) \
+ $(am__append_1125) $(am__append_1132) $(am__append_1139) \
+ $(am__append_1146) $(am__append_1153) $(am__append_1160) \
+ $(am__append_1167) $(am__append_1174) $(am__append_1181) \
+ $(am__append_1188) $(am__append_1195) $(am__append_1202) \
+ $(am__append_1209) $(am__append_1216) $(am__append_1223) \
+ $(am__append_1230) $(am__append_1237) $(am__append_1244) \
+ $(am__append_1251) $(am__append_1258) $(am__append_1265) \
+ $(am__append_1272) $(am__append_1279) $(am__append_1286) \
+ $(am__append_1293) $(am__append_1300) $(am__append_1307) \
+ $(am__append_1314) $(am__append_1321) $(am__append_1328) \
+ $(am__append_1335) $(am__append_1342) $(am__append_1349) \
+ $(am__append_1356) $(am__append_1363) $(am__append_1370) \
+ $(am__append_1377) $(am__append_1384) $(am__append_1391) \
+ $(am__append_1398) $(am__append_1405) $(am__append_1412) \
+ $(am__append_1419) $(am__append_1426) $(am__append_1433) \
+ $(am__append_1440) $(am__append_1447) $(am__append_1454) \
+ $(am__append_1461) $(am__append_1468) $(am__append_1475) \
+ $(am__append_1482) $(am__append_1489) $(am__append_1496) \
+ $(am__append_1503) $(am__append_1510) $(am__append_1517) \
+ $(am__append_1524) $(am__append_1531) $(am__append_1538) \
+ $(am__append_1545) $(am__append_1552) $(am__append_1559) \
+ $(am__append_1566) $(am__append_1573) $(am__append_1580) \
+ $(am__append_1587) $(am__append_1594) $(am__append_1601) \
+ $(am__append_1608) $(am__append_1615) $(am__append_1622) \
+ $(am__append_1629) $(am__append_1636) $(am__append_1643) \
+ $(am__append_1650) $(am__append_1657) $(am__append_1664) \
+ $(am__append_1671) $(am__append_1678) $(am__append_1685) \
+ $(am__append_1692) $(am__append_1699) $(am__append_1706) \
+ $(am__append_1713) $(am__append_1720) $(am__append_1727) \
+ $(am__append_1734) $(am__append_1741) $(am__append_1748) \
+ $(am__append_1755) $(am__append_1762) $(am__append_1769) \
+ $(am__append_1776) $(am__append_1783) $(am__append_1790) \
+ $(am__append_1797) $(am__append_1804) $(am__append_1811) \
+ $(am__append_1818) $(am__append_1825) $(am__append_1832) \
+ $(am__append_1839) $(am__append_1846) $(am__append_1853) \
+ $(am__append_1860) $(am__append_1867) $(am__append_1874) \
+ $(am__append_1881) $(am__append_1888) $(am__append_1895) \
+ $(am__append_1902) $(am__append_1909) $(am__append_1916) \
+ $(am__append_1923) $(am__append_1930) $(am__append_1937) \
+ $(am__append_1944) $(am__append_1951) $(am__append_1958) \
+ $(am__append_1965) $(am__append_1972) $(am__append_1979) \
+ $(am__append_1986) $(am__append_1993) $(am__append_2000) \
+ $(am__append_2007) $(am__append_2014) $(am__append_2021) \
+ $(am__append_2028) $(am__append_2035) $(am__append_2042) \
+ $(am__append_2049) $(am__append_2056) $(am__append_2063) \
+ $(am__append_2070) $(am__append_2077) $(am__append_2084) \
+ $(am__append_2091) $(am__append_2098) $(am__append_2105) \
+ $(am__append_2112) $(am__append_2119) $(am__append_2126) \
+ $(am__append_2133) $(am__append_2140) $(am__append_2147) \
+ $(am__append_2154) $(am__append_2161) $(am__append_2168) \
+ $(am__append_2175) $(am__append_2182) $(am__append_2189) \
+ $(am__append_2196) $(am__append_2203) $(am__append_2210) \
+ $(am__append_2217) $(am__append_2224) $(am__append_2231) \
+ $(am__append_2238) $(am__append_2245) $(am__append_2252) \
+ $(am__append_2259) $(am__append_2266) $(am__append_2273) \
+ $(am__append_2280) $(am__append_2287) $(am__append_2294) \
+ $(am__append_2301) $(am__append_2308) $(am__append_2315) \
+ $(am__append_2322) $(am__append_2329) $(am__append_2336) \
+ $(am__append_2343) $(am__append_2350) $(am__append_2357) \
+ $(am__append_2364) $(am__append_2371) $(am__append_2378) \
+ $(am__append_2385) $(am__append_2392) $(am__append_2399) \
+ $(am__append_2406) $(am__append_2413) $(am__append_2420) \
+ $(am__append_2427) $(am__append_2434) $(am__append_2441) \
+ $(am__append_2448) $(am__append_2455) $(am__append_2462) \
+ $(am__append_2469) $(am__append_2476) $(am__append_2483) \
+ $(am__append_2490) $(am__append_2497) $(am__append_2504) \
+ $(am__append_2511) $(am__append_2518) $(am__append_2525) \
+ $(am__append_2532) $(am__append_2539) $(am__append_2546) \
+ $(am__append_2553) $(am__append_2560) $(am__append_2567) \
+ $(am__append_2574) $(am__append_2581) $(am__append_2588) \
+ $(am__append_2595) $(am__append_2602) $(am__append_2609) \
+ $(am__append_2616) $(am__append_2623) $(am__append_2630) \
+ $(am__append_2637) $(am__append_2644) $(am__append_2651) \
+ $(am__append_2658) $(am__append_2665) $(am__append_2672) \
+ $(am__append_2679) $(am__append_2686) $(am__append_2693) \
+ $(am__append_2700) $(am__append_2707) $(am__append_2714) \
+ $(am__append_2721) $(am__append_2728) $(am__append_2735) \
+ $(am__append_2742) $(am__append_2749) $(am__append_2756) \
+ $(am__append_2763) $(am__append_2770) $(am__append_2777) \
+ $(am__append_2784) $(am__append_2791) $(am__append_2798) \
+ $(am__append_2805) $(am__append_2812) $(am__append_2819) \
+ $(am__append_2826) $(am__append_2833) $(am__append_2840) \
+ $(am__append_2847) $(am__append_2854) $(am__append_2861) \
+ $(am__append_2868) $(am__append_2875) $(am__append_2882) \
+ $(am__append_2889) $(am__append_2896) $(am__append_2903) \
+ $(am__append_2910) $(am__append_2917) $(am__append_2924) \
+ $(am__append_2931) $(am__append_2938) $(am__append_2945) \
+ $(am__append_2952) $(am__append_2959) $(am__append_2966) \
+ $(am__append_2973) $(am__append_2980) $(am__append_2987) \
+ $(am__append_2994) $(am__append_3001) $(am__append_3008) \
+ $(am__append_3015) $(am__append_3022) $(am__append_3029) \
+ $(am__append_3036) $(am__append_3043) $(am__append_3050) \
+ $(am__append_3057) $(am__append_3064) $(am__append_3071) \
+ $(am__append_3078) $(am__append_3085) $(am__append_3092) \
+ $(am__append_3099) $(am__append_3106) $(am__append_3113) \
+ $(am__append_3120) $(am__append_3127) $(am__append_3134) \
+ $(am__append_3141) $(am__append_3148) $(am__append_3155) \
+ $(am__append_3162) $(am__append_3169) $(am__append_3176) \
+ $(am__append_3183) $(am__append_3190) $(am__append_3197) \
+ $(am__append_3204) $(am__append_3211) $(am__append_3218) \
+ $(am__append_3225) $(am__append_3232) $(am__append_3239) \
+ $(am__append_3246) $(am__append_3253) $(am__append_3260) \
+ $(am__append_3267) $(am__append_3274) $(am__append_3281) \
+ $(am__append_3288) $(am__append_3295) $(am__append_3302) \
+ $(am__append_3309) $(am__append_3316) $(am__append_3323) \
+ $(am__append_3330) $(am__append_3337) $(am__append_3344) \
+ $(am__append_3351) $(am__append_3358) $(am__append_3365) \
+ $(am__append_3372) $(am__append_3379) $(am__append_3386) \
+ $(am__append_3393) $(am__append_3400) $(am__append_3407) \
+ $(am__append_3414) $(am__append_3421) $(am__append_3428) \
+ $(am__append_3435) $(am__append_3442) $(am__append_3449) \
+ $(am__append_3456) $(am__append_3463) $(am__append_3470) \
+ $(am__append_3477) $(am__append_3484) $(am__append_3491) \
+ $(am__append_3498) $(am__append_3505) $(am__append_3512) \
+ $(am__append_3519) $(am__append_3526) $(am__append_3533) \
+ $(am__append_3540) $(am__append_3547) $(am__append_3554) \
+ $(am__append_3561) $(am__append_3568) $(am__append_3575) \
+ $(am__append_3582) $(am__append_3589) $(am__append_3596) \
+ $(am__append_3603) $(am__append_3610) $(am__append_3617) \
+ $(am__append_3624) $(am__append_3631) $(am__append_3638) \
+ $(am__append_3645) $(am__append_3652) $(am__append_3659) \
+ $(am__append_3666) $(am__append_3673) $(am__append_3680) \
+ $(am__append_3687) $(am__append_3694) $(am__append_3701) \
+ $(am__append_3708) $(am__append_3715) $(am__append_3722) \
+ $(am__append_3729) $(am__append_3736) $(am__append_3743) \
+ $(am__append_3750) $(am__append_3757) $(am__append_3764) \
+ $(am__append_3771) $(am__append_3778) $(am__append_3785) \
+ $(am__append_3792) $(am__append_3799) $(am__append_3806) \
+ $(am__append_3813) $(am__append_3820) $(am__append_3827) \
+ $(am__append_3834) $(am__append_3841) $(am__append_3848) \
+ $(am__append_3855) $(am__append_3862) $(am__append_3869) \
+ $(am__append_3876) $(am__append_3883) $(am__append_3890) \
+ $(am__append_3897) $(am__append_3904) $(am__append_3911) \
+ $(am__append_3918) $(am__append_3925) $(am__append_3932) \
+ $(am__append_3939) $(am__append_3946) $(am__append_3953) \
+ $(am__append_3960) $(am__append_3967) $(am__append_3974) \
+ $(am__append_3981) $(am__append_3988) $(am__append_3995) \
+ $(am__append_4002) $(am__append_4009) $(am__append_4016) \
+ $(am__append_4023) $(am__append_4030) $(am__append_4037) \
+ $(am__append_4044) $(am__append_4051) $(am__append_4058) \
+ $(am__append_4065) $(am__append_4072) $(am__append_4079) \
+ $(am__append_4086) $(am__append_4093) $(am__append_4100) \
+ $(am__append_4107) $(am__append_4114) $(am__append_4121) \
+ $(am__append_4128) $(am__append_4135) $(am__append_4142) \
+ $(am__append_4149) $(am__append_4156) $(am__append_4163) \
+ $(am__append_4170) $(am__append_4177) $(am__append_4184) \
+ $(am__append_4191) $(am__append_4198) $(am__append_4205) \
+ $(am__append_4212) $(am__append_4219) $(am__append_4226) \
+ $(am__append_4233) $(am__append_4240) $(am__append_4247) \
+ $(am__append_4254) $(am__append_4261) $(am__append_4268) \
+ $(am__append_4275) $(am__append_4282) $(am__append_4289) \
+ $(am__append_4296) $(am__append_4303) $(am__append_4310) \
+ $(am__append_4317) $(am__append_4324) $(am__append_4331) \
+ $(am__append_4338) $(am__append_4345) $(am__append_4352) \
+ $(am__append_4359) $(am__append_4366) $(am__append_4373) \
+ $(am__append_4380) $(am__append_4387) $(am__append_4394) \
+ $(am__append_4401) $(am__append_4408) $(am__append_4415) \
+ $(am__append_4422) $(am__append_4429) $(am__append_4436) \
+ $(am__append_4443) $(am__append_4450) $(am__append_4457) \
+ $(am__append_4464) $(am__append_4471) $(am__append_4478) \
+ $(am__append_4485) $(am__append_4492) $(am__append_4499) \
+ $(am__append_4506) $(am__append_4513) $(am__append_4520) \
+ $(am__append_4527) $(am__append_4534) $(am__append_4541) \
+ $(am__append_4548) $(am__append_4555) $(am__append_4562) \
+ $(am__append_4569) $(am__append_4576) $(am__append_4583) \
+ $(am__append_4590) $(am__append_4597) $(am__append_4604) \
+ $(am__append_4611) $(am__append_4618) $(am__append_4625) \
+ $(am__append_4632) $(am__append_4639) $(am__append_4646) \
+ $(am__append_4653) $(am__append_4660) $(am__append_4667) \
+ $(am__append_4674) $(am__append_4681) $(am__append_4688) \
+ $(am__append_4695) $(am__append_4702) $(am__append_4709) \
+ $(am__append_4716) $(am__append_4723) $(am__append_4730) \
+ $(am__append_4737) $(am__append_4744) $(am__append_4751) \
+ $(am__append_4758) $(am__append_4765) $(am__append_4772) \
+ $(am__append_4779) $(am__append_4786) $(am__append_4793) \
+ $(am__append_4800) $(am__append_4807) $(am__append_4814) \
+ $(am__append_4821) $(am__append_4828) $(am__append_4835) \
+ $(am__append_4842) $(am__append_4849) $(am__append_4856) \
+ $(am__append_4863) $(am__append_4870) $(am__append_4877) \
+ $(am__append_4884) $(am__append_4891) $(am__append_4898) \
+ $(am__append_4905) $(am__append_4912) $(am__append_4919) \
+ $(am__append_4926) $(am__append_4933) $(am__append_4940) \
+ $(am__append_4947) $(am__append_4954) $(am__append_4961) \
+ $(am__append_4968) $(am__append_4975) $(am__append_4982) \
+ $(am__append_4989) $(am__append_4996) $(am__append_5003) \
+ $(am__append_5010) $(am__append_5017) $(am__append_5024) \
+ $(am__append_5031) $(am__append_5038) $(am__append_5045) \
+ $(am__append_5052) $(am__append_5059) $(am__append_5066) \
+ $(am__append_5073) $(am__append_5080) $(am__append_5087) \
+ $(am__append_5094) $(am__append_5101) $(am__append_5108) \
+ $(am__append_5115) $(am__append_5122) $(am__append_5129) \
+ $(am__append_5136) $(am__append_5143) $(am__append_5150) \
+ $(am__append_5157) $(am__append_5164) $(am__append_5171) \
+ $(am__append_5178) $(am__append_5185) $(am__append_5192) \
+ $(am__append_5199) $(am__append_5206) $(am__append_5213) \
+ $(am__append_5220) $(am__append_5227) $(am__append_5234) \
+ $(am__append_5241) $(am__append_5248) $(am__append_5255) \
+ $(am__append_5262) $(am__append_5269) $(am__append_5276) \
+ $(am__append_5283) $(am__append_5290) $(am__append_5297) \
+ $(am__append_5304) $(am__append_5311) $(am__append_5318) \
+ $(am__append_5325) $(am__append_5332) $(am__append_5339) \
+ $(am__append_5346) $(am__append_5353) $(am__append_5360) \
+ $(am__append_5367) $(am__append_5374) $(am__append_5381) \
+ $(am__append_5388) $(am__append_5395) $(am__append_5402) \
+ $(am__append_5409) $(am__append_5416) $(am__append_5423) \
+ $(am__append_5430) $(am__append_5437) $(am__append_5444) \
+ $(am__append_5451) $(am__append_5458) $(am__append_5465) \
+ $(am__append_5472) $(am__append_5479) $(am__append_5486) \
+ $(am__append_5493) $(am__append_5500) $(am__append_5507) \
+ $(am__append_5514) $(am__append_5521) $(am__append_5528) \
+ $(am__append_5535) $(am__append_5542) $(am__append_5549) \
+ $(am__append_5556) $(am__append_5563) $(am__append_5570) \
+ $(am__append_5577) $(am__append_5584) $(am__append_5591) \
+ $(am__append_5598) $(am__append_5605) $(am__append_5612) \
+ $(am__append_5619) $(am__append_5626) $(am__append_5633) \
+ $(am__append_5640) $(am__append_5647) $(am__append_5654) \
+ $(am__append_5661) $(am__append_5668) $(am__append_5675) \
+ $(am__append_5682) $(am__append_5689) $(am__append_5696) \
+ $(am__append_5703) $(am__append_5710) $(am__append_5717) \
+ $(am__append_5724) $(am__append_5731) $(am__append_5738) \
+ $(am__append_5745) $(am__append_5752) $(am__append_5759) \
+ $(am__append_5766) $(am__append_5773) $(am__append_5780) \
+ $(am__append_5787) $(am__append_5794) $(am__append_5801) \
+ $(am__append_5808) $(am__append_5815) $(am__append_5822) \
+ $(am__append_5829) $(am__append_5836) $(am__append_5843) \
+ $(am__append_5850) $(am__append_5857) $(am__append_5864) \
+ $(am__append_5871) $(am__append_5878) $(am__append_5885) \
+ $(am__append_5892) $(am__append_5899) $(am__append_5906) \
+ $(am__append_5913) $(am__append_5920) $(am__append_5927) \
+ $(am__append_5934) $(am__append_5941) $(am__append_5948) \
+ $(am__append_5955) $(am__append_5962) $(am__append_5969) \
+ $(am__append_5976) $(am__append_5983) $(am__append_5990) \
+ $(am__append_5997) $(am__append_6004) $(am__append_6011) \
+ $(am__append_6018) $(am__append_6025) $(am__append_6032) \
+ $(am__append_6039) $(am__append_6046) $(am__append_6053) \
+ $(am__append_6060) $(am__append_6067) $(am__append_6074) \
+ $(am__append_6081) $(am__append_6088) $(am__append_6095) \
+ $(am__append_6102) $(am__append_6109) $(am__append_6116) \
+ $(am__append_6123) $(am__append_6130) $(am__append_6137) \
+ $(am__append_6144) $(am__append_6151) $(am__append_6158) \
+ $(am__append_6165) $(am__append_6172) $(am__append_6179) \
+ $(am__append_6186) $(am__append_6193) $(am__append_6200) \
+ $(am__append_6207) $(am__append_6214) $(am__append_6221) \
+ $(am__append_6228) $(am__append_6235) $(am__append_6242) \
+ $(am__append_6249) $(am__append_6256) $(am__append_6263) \
+ $(am__append_6270) $(am__append_6277) $(am__append_6284) \
+ $(am__append_6291) $(am__append_6298) $(am__append_6305) \
+ $(am__append_6312) $(am__append_6319) $(am__append_6326) \
+ $(am__append_6333) $(am__append_6340) $(am__append_6347) \
+ $(am__append_6354) $(am__append_6361) $(am__append_6368) \
+ $(am__append_6375) $(am__append_6382) $(am__append_6389) \
+ $(am__append_6396) $(am__append_6403) $(am__append_6410) \
+ $(am__append_6417) $(am__append_6424) $(am__append_6431) \
+ $(am__append_6438) $(am__append_6445) $(am__append_6452) \
+ $(am__append_6459) $(am__append_6466) $(am__append_6473) \
+ $(am__append_6480) $(am__append_6487) $(am__append_6494) \
+ $(am__append_6501) $(am__append_6508) $(am__append_6515) \
+ $(am__append_6522) $(am__append_6529) $(am__append_6536) \
+ $(am__append_6543) $(am__append_6550) $(am__append_6557) \
+ $(am__append_6564) $(am__append_6571) $(am__append_6578) \
+ $(am__append_6585) $(am__append_6592) $(am__append_6599) \
+ $(am__append_6606) $(am__append_6613) $(am__append_6620) \
+ $(am__append_6627) $(am__append_6634) $(am__append_6641) \
+ $(am__append_6648) $(am__append_6655) $(am__append_6662) \
+ $(am__append_6669) $(am__append_6676) $(am__append_6683) \
+ $(am__append_6690) $(am__append_6697) $(am__append_6704) \
+ $(am__append_6711) $(am__append_6718) $(am__append_6725) \
+ $(am__append_6732) $(am__append_6739) $(am__append_6746) \
+ $(am__append_6753) $(am__append_6760) $(am__append_6767) \
+ $(am__append_6774) $(am__append_6781) $(am__append_6788) \
+ $(am__append_6795) $(am__append_6802) $(am__append_6809) \
+ $(am__append_6816) $(am__append_6823) $(am__append_6830) \
+ $(am__append_6837) $(am__append_6844) $(am__append_6851) \
+ $(am__append_6858) $(am__append_6865) $(am__append_6872) \
+ $(am__append_6879) $(am__append_6886) $(am__append_6893) \
+ $(am__append_6900) $(am__append_6907) $(am__append_6914) \
+ $(am__append_6921) $(am__append_6928) $(am__append_6935) \
+ $(am__append_6942) $(am__append_6949) $(am__append_6956) \
+ $(am__append_6963) $(am__append_6970) $(am__append_6977) \
+ $(am__append_6984) $(am__append_6991) $(am__append_6998) \
+ $(am__append_7005) $(am__append_7012) $(am__append_7019) \
+ $(am__append_7026) $(am__append_7033) $(am__append_7040) \
+ $(am__append_7047) $(am__append_7054) $(am__append_7061) \
+ $(am__append_7068) $(am__append_7075) $(am__append_7082) \
+ $(am__append_7089) $(am__append_7096) $(am__append_7103) \
+ $(am__append_7110) $(am__append_7117) $(am__append_7124) \
+ $(am__append_7131) $(am__append_7138) $(am__append_7145) \
+ $(am__append_7152) $(am__append_7159) $(am__append_7166) \
+ $(am__append_7173) $(am__append_7180) $(am__append_7187) \
+ $(am__append_7194) $(am__append_7201) $(am__append_7208) \
+ $(am__append_7215) $(am__append_7222) $(am__append_7229) \
+ $(am__append_7236) $(am__append_7243) $(am__append_7250) \
+ $(am__append_7257) $(am__append_7264) $(am__append_7271) \
+ $(am__append_7278) $(am__append_7285) $(am__append_7292) \
+ $(am__append_7299) $(am__append_7306) $(am__append_7313) \
+ $(am__append_7320) $(am__append_7327) $(am__append_7334) \
+ $(am__append_7341) $(am__append_7348) $(am__append_7355) \
+ $(am__append_7362) $(am__append_7369) $(am__append_7376) \
+ $(am__append_7383) $(am__append_7390) $(am__append_7397) \
+ $(am__append_7404) $(am__append_7411) $(am__append_7418) \
+ $(am__append_7425) $(am__append_7432) $(am__append_7439) \
+ $(am__append_7446) $(am__append_7453) $(am__append_7460) \
+ $(am__append_7467) $(am__append_7474) $(am__append_7481) \
+ $(am__append_7488) $(am__append_7495) $(am__append_7502) \
+ $(am__append_7509) $(am__append_7516) $(am__append_7523) \
+ $(am__append_7530) $(am__append_7537) $(am__append_7544) \
+ $(am__append_7551) $(am__append_7558) $(am__append_7565) \
+ $(am__append_7572) $(am__append_7579) $(am__append_7586) \
+ $(am__append_7593) $(am__append_7600) $(am__append_7607) \
+ $(am__append_7614) $(am__append_7621) $(am__append_7628) \
+ $(am__append_7635) $(am__append_7642) $(am__append_7649) \
+ $(am__append_7656) $(am__append_7663) $(am__append_7670) \
+ $(am__append_7677) $(am__append_7684) $(am__append_7691) \
+ $(am__append_7698) $(am__append_7705) $(am__append_7712) \
+ $(am__append_7719) $(am__append_7726) $(am__append_7733) \
+ $(am__append_7740) $(am__append_7747) $(am__append_7754) \
+ $(am__append_7761) $(am__append_7768) $(am__append_7775) \
+ $(am__append_7782) $(am__append_7789) $(am__append_7796) \
+ $(am__append_7803) $(am__append_7810) $(am__append_7817) \
+ $(am__append_7824) $(am__append_7831) $(am__append_7838) \
+ $(am__append_7845) $(am__append_7852) $(am__append_7859) \
+ $(am__append_7866) $(am__append_7873) $(am__append_7880) \
+ $(am__append_7887) $(am__append_7894) $(am__append_7901) \
+ $(am__append_7908) $(am__append_7915) $(am__append_7922) \
+ $(am__append_7929) $(am__append_7936) $(am__append_7943) \
+ $(am__append_7950) $(am__append_7957) $(am__append_7964) \
+ $(am__append_7971) $(am__append_7978) $(am__append_7985) \
+ $(am__append_7992) $(am__append_7999) $(am__append_8006) \
+ $(am__append_8013) $(am__append_8020) $(am__append_8027) \
+ $(am__append_8034) $(am__append_8041) $(am__append_8048) \
+ $(am__append_8055) $(am__append_8062) $(am__append_8069) \
+ $(am__append_8076) $(am__append_8083) $(am__append_8090) \
+ $(am__append_8097) $(am__append_8104) $(am__append_8111) \
+ $(am__append_8118) $(am__append_8125) $(am__append_8132) \
+ $(am__append_8139) $(am__append_8146) $(am__append_8153) \
+ $(am__append_8160) $(am__append_8167) $(am__append_8174) \
+ $(am__append_8181) $(am__append_8188) $(am__append_8195) \
+ $(am__append_8202) $(am__append_8209) $(am__append_8216) \
+ $(am__append_8223) $(am__append_8230) $(am__append_8237) \
+ $(am__append_8244) $(am__append_8251) $(am__append_8258) \
+ $(am__append_8265) $(am__append_8272) $(am__append_8279) \
+ $(am__append_8286) $(am__append_8293) $(am__append_8300) \
+ $(am__append_8307) $(am__append_8314) $(am__append_8321) \
+ $(am__append_8328) $(am__append_8335) $(am__append_8342) \
+ $(am__append_8349) $(am__append_8356) $(am__append_8363) \
+ $(am__append_8370) $(am__append_8377) $(am__append_8384) \
+ $(am__append_8391) $(am__append_8398) $(am__append_8405) \
+ $(am__append_8412) $(am__append_8419) $(am__append_8426) \
+ $(am__append_8433) $(am__append_8440) $(am__append_8447) \
+ $(am__append_8454) $(am__append_8461) $(am__append_8468) \
+ $(am__append_8475) $(am__append_8482) $(am__append_8489) \
+ $(am__append_8496) $(am__append_8503) $(am__append_8510) \
+ $(am__append_8517) $(am__append_8524) $(am__append_8531) \
+ $(am__append_8538) $(am__append_8545) $(am__append_8552) \
+ $(am__append_8559) $(am__append_8566) $(am__append_8573) \
+ $(am__append_8580) $(am__append_8587) $(am__append_8594) \
+ $(am__append_8601) $(am__append_8608) $(am__append_8615) \
+ $(am__append_8622) $(am__append_8629) $(am__append_8636) \
+ $(am__append_8643) $(am__append_8650) $(am__append_8657) \
+ $(am__append_8664) $(am__append_8671) $(am__append_8678) \
+ $(am__append_8685) $(am__append_8692) $(am__append_8699) \
+ $(am__append_8706) $(am__append_8713) $(am__append_8720) \
+ $(am__append_8727) $(am__append_8734) $(am__append_8741) \
+ $(am__append_8748) $(am__append_8755) $(am__append_8762) \
+ $(am__append_8769) $(am__append_8776) $(am__append_8783) \
+ $(am__append_8790) $(am__append_8797) $(am__append_8804) \
+ $(am__append_8811) $(am__append_8818) $(am__append_8825) \
+ $(am__append_8832) $(am__append_8839) $(am__append_8846) \
+ $(am__append_8853) $(am__append_8860) $(am__append_8867) \
+ $(am__append_8874) $(am__append_8881) $(am__append_8888) \
+ $(am__append_8895) $(am__append_8902) $(am__append_8909) \
+ $(am__append_8916) $(am__append_8923) $(am__append_8930) \
+ $(am__append_8937) $(am__append_8944) $(am__append_8951) \
+ $(am__append_8958) $(am__append_8965) $(am__append_8972) \
+ $(am__append_8979) $(am__append_8986) $(am__append_8993) \
+ $(am__append_9000) $(am__append_9007) $(am__append_9014) \
+ $(am__append_9021) $(am__append_9028) $(am__append_9035) \
+ $(am__append_9042) $(am__append_9049) $(am__append_9056) \
+ $(am__append_9063) $(am__append_9070) $(am__append_9077) \
+ $(am__append_9084) $(am__append_9091) $(am__append_9098) \
+ $(am__append_9105) $(am__append_9112) $(am__append_9119) \
+ $(am__append_9126) $(am__append_9133) $(am__append_9140) \
+ $(am__append_9147) $(am__append_9154) $(am__append_9161) \
+ $(am__append_9168) $(am__append_9175) $(am__append_9182) \
+ $(am__append_9189) $(am__append_9196) $(am__append_9203) \
+ $(am__append_9210) $(am__append_9217) $(am__append_9224) \
+ $(am__append_9231) $(am__append_9238) $(am__append_9245) \
+ $(am__append_9252) $(am__append_9259) $(am__append_9266) \
+ $(am__append_9273) $(am__append_9280) $(am__append_9287) \
+ $(am__append_9294) $(am__append_9301) $(am__append_9308) \
+ $(am__append_9315) $(am__append_9322) $(am__append_9329) \
+ $(am__append_9336) $(am__append_9343) $(am__append_9350) \
+ $(am__append_9357) $(am__append_9364) $(am__append_9371) \
+ $(am__append_9378) $(am__append_9385) $(am__append_9392) \
+ $(am__append_9399) $(am__append_9406) $(am__append_9413) \
+ $(am__append_9420) $(am__append_9427) $(am__append_9434) \
+ $(am__append_9441) $(am__append_9448) $(am__append_9455) \
+ $(am__append_9462) $(am__append_9469) $(am__append_9476) \
+ $(am__append_9483) $(am__append_9490) $(am__append_9497) \
+ $(am__append_9504) $(am__append_9511) $(am__append_9518) \
+ $(am__append_9525) $(am__append_9532) $(am__append_9539) \
+ $(am__append_9546) $(am__append_9553) $(am__append_9560) \
+ $(am__append_9567) $(am__append_9574) $(am__append_9581) \
+ $(am__append_9588) $(am__append_9595) $(am__append_9602) \
+ $(am__append_9609) $(am__append_9616) $(am__append_9623) \
+ $(am__append_9630) $(am__append_9637) $(am__append_9644) \
+ $(am__append_9651) $(am__append_9658) $(am__append_9665) \
+ $(am__append_9672) $(am__append_9679) $(am__append_9686) \
+ $(am__append_9693) $(am__append_9700) $(am__append_9707) \
+ $(am__append_9714) $(am__append_9721) $(am__append_9728) \
+ $(am__append_9735) $(am__append_9742) $(am__append_9749) \
+ $(am__append_9756) $(am__append_9763) $(am__append_9770) \
+ $(am__append_9777) $(am__append_9784) $(am__append_9791) \
+ $(am__append_9798) $(am__append_9805) $(am__append_9812) \
+ $(am__append_9819) $(am__append_9826) $(am__append_9833) \
+ $(am__append_9840) $(am__append_9847) $(am__append_9854) \
+ $(am__append_9861) $(am__append_9868) $(am__append_9875) \
+ $(am__append_9882) $(am__append_9889) $(am__append_9896) \
+ $(am__append_9903) $(am__append_9910) $(am__append_9917) \
+ $(am__append_9924) $(am__append_9931) $(am__append_9938) \
+ $(am__append_9945) $(am__append_9952) $(am__append_9959) \
+ $(am__append_9966) $(am__append_9973) $(am__append_9980) \
+ $(am__append_9987) $(am__append_9994) $(am__append_10001) \
+ $(am__append_10008) $(am__append_10015) $(am__append_10022) \
+ $(am__append_10029) $(am__append_10036) $(am__append_10043) \
+ $(am__append_10050) $(am__append_10057) $(am__append_10064) \
+ $(am__append_10071) $(am__append_10078) $(am__append_10085) \
+ $(am__append_10092) $(am__append_10099) $(am__append_10106) \
+ $(am__append_10113) $(am__append_10120) $(am__append_10127) \
+ $(am__append_10134) $(am__append_10141) $(am__append_10148) \
+ $(am__append_10155) $(am__append_10162) $(am__append_10169) \
+ $(am__append_10176) $(am__append_10183) $(am__append_10190) \
+ $(am__append_10197) $(am__append_10204) $(am__append_10211) \
+ $(am__append_10218) $(am__append_10225) $(am__append_10232) \
+ $(am__append_10239) $(am__append_10246) $(am__append_10253) \
+ $(am__append_10260) $(am__append_10267) $(am__append_10274) \
+ $(am__append_10281) $(am__append_10288) $(am__append_10295) \
+ $(am__append_10302) $(am__append_10309) $(am__append_10316) \
+ $(am__append_10323) $(am__append_10330) $(am__append_10337) \
+ $(am__append_10344) $(am__append_10351) $(am__append_10358) \
+ $(am__append_10365) $(am__append_10372) $(am__append_10379) \
+ $(am__append_10386) $(am__append_10393) $(am__append_10400) \
+ $(am__append_10407) $(am__append_10414) $(am__append_10421) \
+ $(am__append_10428) $(am__append_10435) $(am__append_10442) \
+ $(am__append_10449) $(am__append_10456) $(am__append_10463) \
+ $(am__append_10470) $(am__append_10477) $(am__append_10484) \
+ $(am__append_10491) $(am__append_10498) $(am__append_10505) \
+ $(am__append_10512) $(am__append_10519) $(am__append_10526) \
+ $(am__append_10533) $(am__append_10540) $(am__append_10547) \
+ $(am__append_10554) $(am__append_10561) $(am__append_10568) \
+ $(am__append_10575) $(am__append_10582) $(am__append_10589) \
+ $(am__append_10596) $(am__append_10603) $(am__append_10610) \
+ $(am__append_10617) $(am__append_10624) $(am__append_10631) \
+ $(am__append_10638) $(am__append_10645) $(am__append_10652) \
+ $(am__append_10659) $(am__append_10666) $(am__append_10673) \
+ $(am__append_10680) $(am__append_10687) $(am__append_10694) \
+ $(am__append_10701) $(am__append_10708) $(am__append_10715) \
+ $(am__append_10722) $(am__append_10729) $(am__append_10736) \
+ $(am__append_10743) $(am__append_10750) $(am__append_10757) \
+ $(am__append_10764) $(am__append_10771) $(am__append_10778) \
+ $(am__append_10785) $(am__append_10792) $(am__append_10799) \
+ $(am__append_10806) $(am__append_10813) $(am__append_10820) \
+ $(am__append_10827) $(am__append_10834) $(am__append_10841) \
+ $(am__append_10848) $(am__append_10855) $(am__append_10862) \
+ $(am__append_10869) $(am__append_10876) $(am__append_10883) \
+ $(am__append_10890) $(am__append_10897) $(am__append_10904) \
+ $(am__append_10911) $(am__append_10918) $(am__append_10925) \
+ $(am__append_10932) $(am__append_10939) $(am__append_10946) \
+ $(am__append_10953) $(am__append_10960) $(am__append_10967) \
+ $(am__append_10974) $(am__append_10981) $(am__append_10988) \
+ $(am__append_10995) $(am__append_11002) $(am__append_11009) \
+ $(am__append_11016) $(am__append_11023) $(am__append_11030) \
+ $(am__append_11037) $(am__append_11044) $(am__append_11051) \
+ $(am__append_11058) $(am__append_11065) $(am__append_11072) \
+ $(am__append_11079) $(am__append_11086) $(am__append_11093) \
+ $(am__append_11100) $(am__append_11107) $(am__append_11114) \
+ $(am__append_11121) $(am__append_11128) $(am__append_11135) \
+ $(am__append_11142) $(am__append_11149) $(am__append_11156) \
+ $(am__append_11163) $(am__append_11170) $(am__append_11177) \
+ $(am__append_11184) $(am__append_11191) $(am__append_11198) \
+ $(am__append_11205) $(am__append_11212) $(am__append_11219) \
+ $(am__append_11226) $(am__append_11233) $(am__append_11240) \
+ $(am__append_11247) $(am__append_11254) $(am__append_11261) \
+ $(am__append_11268) $(am__append_11275) $(am__append_11282) \
+ $(am__append_11289) $(am__append_11296) $(am__append_11303) \
+ $(am__append_11310) $(am__append_11317) $(am__append_11324) \
+ $(am__append_11331) $(am__append_11338) $(am__append_11345) \
+ $(am__append_11352) $(am__append_11359) $(am__append_11366) \
+ $(am__append_11373) $(am__append_11380) $(am__append_11387) \
+ $(am__append_11394) $(am__append_11401) $(am__append_11408) \
+ $(am__append_11415) $(am__append_11422) $(am__append_11429) \
+ $(am__append_11436) $(am__append_11443) $(am__append_11450) \
+ $(am__append_11457) $(am__append_11464) $(am__append_11471) \
+ $(am__append_11478) $(am__append_11485) $(am__append_11492) \
+ $(am__append_11499) $(am__append_11506) $(am__append_11513) \
+ $(am__append_11520) $(am__append_11527) $(am__append_11534) \
+ $(am__append_11541) $(am__append_11548) $(am__append_11555) \
+ $(am__append_11562) $(am__append_11569) $(am__append_11576) \
+ $(am__append_11583) $(am__append_11590) $(am__append_11597) \
+ $(am__append_11604) $(am__append_11611) $(am__append_11618) \
+ $(am__append_11625) $(am__append_11632) $(am__append_11639) \
+ $(am__append_11646) $(am__append_11653) $(am__append_11660) \
+ $(am__append_11667) $(am__append_11674) $(am__append_11681) \
+ $(am__append_11688) $(am__append_11695) $(am__append_11702) \
+ $(am__append_11709) $(am__append_11716) $(am__append_11723) \
+ $(am__append_11730) $(am__append_11737) $(am__append_11744) \
+ $(am__append_11751) $(am__append_11758) $(am__append_11765) \
+ $(am__append_11772) $(am__append_11779) $(am__append_11786) \
+ $(am__append_11793) $(am__append_11800) $(am__append_11807) \
+ $(am__append_11814) $(am__append_11821) $(am__append_11828) \
+ $(am__append_11835) $(am__append_11842) $(am__append_11849) \
+ $(am__append_11856) $(am__append_11863) $(am__append_11870) \
+ $(am__append_11877) $(am__append_11884) $(am__append_11891) \
+ $(am__append_11898) $(am__append_11905) $(am__append_11912) \
+ $(am__append_11919) $(am__append_11926) $(am__append_11933) \
+ $(am__append_11940) $(am__append_11947) $(am__append_11954) \
+ $(am__append_11961) $(am__append_11968) $(am__append_11975) \
+ $(am__append_11982) $(am__append_11989) $(am__append_11996) \
+ $(am__append_12003) $(am__append_12010) $(am__append_12017) \
+ $(am__append_12024) $(am__append_12031) $(am__append_12038) \
+ $(am__append_12045) $(am__append_12052) $(am__append_12059) \
+ $(am__append_12066) $(am__append_12073) $(am__append_12080) \
+ $(am__append_12087) $(am__append_12094) $(am__append_12101) \
+ $(am__append_12108) $(am__append_12115) $(am__append_12122) \
+ $(am__append_12129) $(am__append_12135) $(am__append_12140) \
+ $(am__append_12145) $(am__append_12150) $(am__append_12155) \
+ $(am__append_12160) $(am__append_12165) $(am__append_12170) \
+ $(am__append_12175) $(am__append_12180) $(am__append_12185) \
+ $(am__append_12190) $(am__append_12195) $(am__append_12200) \
+ $(am__append_12205) $(am__append_12210) $(am__append_12215) \
+ $(am__append_12220) $(am__append_12230) $(am__append_12239) \
+ $(am__append_12248) $(am__append_12257) $(am__append_12266) \
+ $(am__append_12275) $(am__append_12284) $(am__append_12293) \
+ $(am__append_12302) $(am__append_12311) $(am__append_12320) \
+ $(am__append_12326)
+CLEANFILES = gentrigtables trigtables.c grub_script.tab.c \
+ grub_script.tab.h grub_script.yy.c grub_script.yy.h \
+ $(am__append_14) $(am__append_21) $(am__append_28) \
+ $(am__append_35) $(am__append_42) $(am__append_49) \
+ $(am__append_56) $(am__append_63) $(am__append_70) \
+ $(am__append_77) $(am__append_84) $(am__append_91) \
+ $(am__append_98) $(am__append_105) $(am__append_112) \
+ $(am__append_119) $(am__append_126) $(am__append_133) \
+ $(am__append_140) $(am__append_147) $(am__append_154) \
+ $(am__append_161) $(am__append_168) $(am__append_175) \
+ $(am__append_182) $(am__append_189) $(am__append_196) \
+ $(am__append_203) $(am__append_210) $(am__append_217) \
+ $(am__append_224) $(am__append_231) $(am__append_238) \
+ $(am__append_245) $(am__append_252) $(am__append_259) \
+ $(am__append_266) $(am__append_273) $(am__append_280) \
+ $(am__append_287) $(am__append_294) $(am__append_301) \
+ $(am__append_308) $(am__append_315) $(am__append_322) \
+ $(am__append_329) $(am__append_336) $(am__append_343) \
+ $(am__append_350) $(am__append_357) $(am__append_364) \
+ $(am__append_371) $(am__append_378) $(am__append_385) \
+ $(am__append_392) $(am__append_399) $(am__append_406) \
+ $(am__append_413) $(am__append_420) $(am__append_427) \
+ $(am__append_434) $(am__append_441) $(am__append_448) \
+ $(am__append_455) $(am__append_462) $(am__append_469) \
+ $(am__append_476) $(am__append_483) $(am__append_490) \
+ $(am__append_497) $(am__append_504) $(am__append_511) \
+ $(am__append_518) $(am__append_525) $(am__append_532) \
+ $(am__append_539) $(am__append_546) $(am__append_553) \
+ $(am__append_560) $(am__append_567) $(am__append_574) \
+ $(am__append_581) $(am__append_588) $(am__append_595) \
+ $(am__append_602) $(am__append_609) $(am__append_616) \
+ $(am__append_623) $(am__append_630) $(am__append_637) \
+ $(am__append_644) $(am__append_651) $(am__append_658) \
+ $(am__append_665) $(am__append_672) $(am__append_679) \
+ $(am__append_686) $(am__append_693) $(am__append_700) \
+ $(am__append_707) $(am__append_714) $(am__append_721) \
+ $(am__append_728) $(am__append_735) $(am__append_742) \
+ $(am__append_749) $(am__append_756) $(am__append_763) \
+ $(am__append_770) $(am__append_777) $(am__append_784) \
+ $(am__append_791) $(am__append_798) $(am__append_805) \
+ $(am__append_812) $(am__append_819) $(am__append_826) \
+ $(am__append_833) $(am__append_840) $(am__append_847) \
+ $(am__append_854) $(am__append_861) $(am__append_868) \
+ $(am__append_875) $(am__append_882) $(am__append_889) \
+ $(am__append_896) $(am__append_903) $(am__append_910) \
+ $(am__append_917) $(am__append_924) $(am__append_931) \
+ $(am__append_938) $(am__append_945) $(am__append_952) \
+ $(am__append_959) $(am__append_966) $(am__append_973) \
+ $(am__append_980) $(am__append_987) $(am__append_994) \
+ $(am__append_1001) $(am__append_1008) $(am__append_1015) \
+ $(am__append_1022) $(am__append_1029) $(am__append_1036) \
+ $(am__append_1043) $(am__append_1050) $(am__append_1057) \
+ $(am__append_1064) $(am__append_1071) $(am__append_1078) \
+ $(am__append_1085) $(am__append_1092) $(am__append_1099) \
+ $(am__append_1106) $(am__append_1113) $(am__append_1120) \
+ $(am__append_1127) $(am__append_1134) $(am__append_1141) \
+ $(am__append_1148) $(am__append_1155) $(am__append_1162) \
+ $(am__append_1169) $(am__append_1176) $(am__append_1183) \
+ $(am__append_1190) $(am__append_1197) $(am__append_1204) \
+ $(am__append_1211) $(am__append_1218) $(am__append_1225) \
+ $(am__append_1232) $(am__append_1239) $(am__append_1246) \
+ $(am__append_1253) $(am__append_1260) $(am__append_1267) \
+ $(am__append_1274) $(am__append_1281) $(am__append_1288) \
+ $(am__append_1295) $(am__append_1302) $(am__append_1309) \
+ $(am__append_1316) $(am__append_1323) $(am__append_1330) \
+ $(am__append_1337) $(am__append_1344) $(am__append_1351) \
+ $(am__append_1358) $(am__append_1365) $(am__append_1372) \
+ $(am__append_1379) $(am__append_1386) $(am__append_1393) \
+ $(am__append_1400) $(am__append_1407) $(am__append_1414) \
+ $(am__append_1421) $(am__append_1428) $(am__append_1435) \
+ $(am__append_1442) $(am__append_1449) $(am__append_1456) \
+ $(am__append_1463) $(am__append_1470) $(am__append_1477) \
+ $(am__append_1484) $(am__append_1491) $(am__append_1498) \
+ $(am__append_1505) $(am__append_1512) $(am__append_1519) \
+ $(am__append_1526) $(am__append_1533) $(am__append_1540) \
+ $(am__append_1547) $(am__append_1554) $(am__append_1561) \
+ $(am__append_1568) $(am__append_1575) $(am__append_1582) \
+ $(am__append_1589) $(am__append_1596) $(am__append_1603) \
+ $(am__append_1610) $(am__append_1617) $(am__append_1624) \
+ $(am__append_1631) $(am__append_1638) $(am__append_1645) \
+ $(am__append_1652) $(am__append_1659) $(am__append_1666) \
+ $(am__append_1673) $(am__append_1680) $(am__append_1687) \
+ $(am__append_1694) $(am__append_1701) $(am__append_1708) \
+ $(am__append_1715) $(am__append_1722) $(am__append_1729) \
+ $(am__append_1736) $(am__append_1743) $(am__append_1750) \
+ $(am__append_1757) $(am__append_1764) $(am__append_1771) \
+ $(am__append_1778) $(am__append_1785) $(am__append_1792) \
+ $(am__append_1799) $(am__append_1806) $(am__append_1813) \
+ $(am__append_1820) $(am__append_1827) $(am__append_1834) \
+ $(am__append_1841) $(am__append_1848) $(am__append_1855) \
+ $(am__append_1862) $(am__append_1869) $(am__append_1876) \
+ $(am__append_1883) $(am__append_1890) $(am__append_1897) \
+ $(am__append_1904) $(am__append_1911) $(am__append_1918) \
+ $(am__append_1925) $(am__append_1932) $(am__append_1939) \
+ $(am__append_1946) $(am__append_1953) $(am__append_1960) \
+ $(am__append_1967) $(am__append_1974) $(am__append_1981) \
+ $(am__append_1988) $(am__append_1995) $(am__append_2002) \
+ $(am__append_2009) $(am__append_2016) $(am__append_2023) \
+ $(am__append_2030) $(am__append_2037) $(am__append_2044) \
+ $(am__append_2051) $(am__append_2058) $(am__append_2065) \
+ $(am__append_2072) $(am__append_2079) $(am__append_2086) \
+ $(am__append_2093) $(am__append_2100) $(am__append_2107) \
+ $(am__append_2114) $(am__append_2121) $(am__append_2128) \
+ $(am__append_2135) $(am__append_2142) $(am__append_2149) \
+ $(am__append_2156) $(am__append_2163) $(am__append_2170) \
+ $(am__append_2177) $(am__append_2184) $(am__append_2191) \
+ $(am__append_2198) $(am__append_2205) $(am__append_2212) \
+ $(am__append_2219) $(am__append_2226) $(am__append_2233) \
+ $(am__append_2240) $(am__append_2247) $(am__append_2254) \
+ $(am__append_2261) $(am__append_2268) $(am__append_2275) \
+ $(am__append_2282) $(am__append_2289) $(am__append_2296) \
+ $(am__append_2303) $(am__append_2310) $(am__append_2317) \
+ $(am__append_2324) $(am__append_2331) $(am__append_2338) \
+ $(am__append_2345) $(am__append_2352) $(am__append_2359) \
+ $(am__append_2366) $(am__append_2373) $(am__append_2380) \
+ $(am__append_2387) $(am__append_2394) $(am__append_2401) \
+ $(am__append_2408) $(am__append_2415) $(am__append_2422) \
+ $(am__append_2429) $(am__append_2436) $(am__append_2443) \
+ $(am__append_2450) $(am__append_2457) $(am__append_2464) \
+ $(am__append_2471) $(am__append_2478) $(am__append_2485) \
+ $(am__append_2492) $(am__append_2499) $(am__append_2506) \
+ $(am__append_2513) $(am__append_2520) $(am__append_2527) \
+ $(am__append_2534) $(am__append_2541) $(am__append_2548) \
+ $(am__append_2555) $(am__append_2562) $(am__append_2569) \
+ $(am__append_2576) $(am__append_2583) $(am__append_2590) \
+ $(am__append_2597) $(am__append_2604) $(am__append_2611) \
+ $(am__append_2618) $(am__append_2625) $(am__append_2632) \
+ $(am__append_2639) $(am__append_2646) $(am__append_2653) \
+ $(am__append_2660) $(am__append_2667) $(am__append_2674) \
+ $(am__append_2681) $(am__append_2688) $(am__append_2695) \
+ $(am__append_2702) $(am__append_2709) $(am__append_2716) \
+ $(am__append_2723) $(am__append_2730) $(am__append_2737) \
+ $(am__append_2744) $(am__append_2751) $(am__append_2758) \
+ $(am__append_2765) $(am__append_2772) $(am__append_2779) \
+ $(am__append_2786) $(am__append_2793) $(am__append_2800) \
+ $(am__append_2807) $(am__append_2814) $(am__append_2821) \
+ $(am__append_2828) $(am__append_2835) $(am__append_2842) \
+ $(am__append_2849) $(am__append_2856) $(am__append_2863) \
+ $(am__append_2870) $(am__append_2877) $(am__append_2884) \
+ $(am__append_2891) $(am__append_2898) $(am__append_2905) \
+ $(am__append_2912) $(am__append_2919) $(am__append_2926) \
+ $(am__append_2933) $(am__append_2940) $(am__append_2947) \
+ $(am__append_2954) $(am__append_2961) $(am__append_2968) \
+ $(am__append_2975) $(am__append_2982) $(am__append_2989) \
+ $(am__append_2996) $(am__append_3003) $(am__append_3010) \
+ $(am__append_3017) $(am__append_3024) $(am__append_3031) \
+ $(am__append_3038) $(am__append_3045) $(am__append_3052) \
+ $(am__append_3059) $(am__append_3066) $(am__append_3073) \
+ $(am__append_3080) $(am__append_3087) $(am__append_3094) \
+ $(am__append_3101) $(am__append_3108) $(am__append_3115) \
+ $(am__append_3122) $(am__append_3129) $(am__append_3136) \
+ $(am__append_3143) $(am__append_3150) $(am__append_3157) \
+ $(am__append_3164) $(am__append_3171) $(am__append_3178) \
+ $(am__append_3185) $(am__append_3192) $(am__append_3199) \
+ $(am__append_3206) $(am__append_3213) $(am__append_3220) \
+ $(am__append_3227) $(am__append_3234) $(am__append_3241) \
+ $(am__append_3248) $(am__append_3255) $(am__append_3262) \
+ $(am__append_3269) $(am__append_3276) $(am__append_3283) \
+ $(am__append_3290) $(am__append_3297) $(am__append_3304) \
+ $(am__append_3311) $(am__append_3318) $(am__append_3325) \
+ $(am__append_3332) $(am__append_3339) $(am__append_3346) \
+ $(am__append_3353) $(am__append_3360) $(am__append_3367) \
+ $(am__append_3374) $(am__append_3381) $(am__append_3388) \
+ $(am__append_3395) $(am__append_3402) $(am__append_3409) \
+ $(am__append_3416) $(am__append_3423) $(am__append_3430) \
+ $(am__append_3437) $(am__append_3444) $(am__append_3451) \
+ $(am__append_3458) $(am__append_3465) $(am__append_3472) \
+ $(am__append_3479) $(am__append_3486) $(am__append_3493) \
+ $(am__append_3500) $(am__append_3507) $(am__append_3514) \
+ $(am__append_3521) $(am__append_3528) $(am__append_3535) \
+ $(am__append_3542) $(am__append_3549) $(am__append_3556) \
+ $(am__append_3563) $(am__append_3570) $(am__append_3577) \
+ $(am__append_3584) $(am__append_3591) $(am__append_3598) \
+ $(am__append_3605) $(am__append_3612) $(am__append_3619) \
+ $(am__append_3626) $(am__append_3633) $(am__append_3640) \
+ $(am__append_3647) $(am__append_3654) $(am__append_3661) \
+ $(am__append_3668) $(am__append_3675) $(am__append_3682) \
+ $(am__append_3689) $(am__append_3696) $(am__append_3703) \
+ $(am__append_3710) $(am__append_3717) $(am__append_3724) \
+ $(am__append_3731) $(am__append_3738) $(am__append_3745) \
+ $(am__append_3752) $(am__append_3759) $(am__append_3766) \
+ $(am__append_3773) $(am__append_3780) $(am__append_3787) \
+ $(am__append_3794) $(am__append_3801) $(am__append_3808) \
+ $(am__append_3815) $(am__append_3822) $(am__append_3829) \
+ $(am__append_3836) $(am__append_3843) $(am__append_3850) \
+ $(am__append_3857) $(am__append_3864) $(am__append_3871) \
+ $(am__append_3878) $(am__append_3885) $(am__append_3892) \
+ $(am__append_3899) $(am__append_3906) $(am__append_3913) \
+ $(am__append_3920) $(am__append_3927) $(am__append_3934) \
+ $(am__append_3941) $(am__append_3948) $(am__append_3955) \
+ $(am__append_3962) $(am__append_3969) $(am__append_3976) \
+ $(am__append_3983) $(am__append_3990) $(am__append_3997) \
+ $(am__append_4004) $(am__append_4011) $(am__append_4018) \
+ $(am__append_4025) $(am__append_4032) $(am__append_4039) \
+ $(am__append_4046) $(am__append_4053) $(am__append_4060) \
+ $(am__append_4067) $(am__append_4074) $(am__append_4081) \
+ $(am__append_4088) $(am__append_4095) $(am__append_4102) \
+ $(am__append_4109) $(am__append_4116) $(am__append_4123) \
+ $(am__append_4130) $(am__append_4137) $(am__append_4144) \
+ $(am__append_4151) $(am__append_4158) $(am__append_4165) \
+ $(am__append_4172) $(am__append_4179) $(am__append_4186) \
+ $(am__append_4193) $(am__append_4200) $(am__append_4207) \
+ $(am__append_4214) $(am__append_4221) $(am__append_4228) \
+ $(am__append_4235) $(am__append_4242) $(am__append_4249) \
+ $(am__append_4256) $(am__append_4263) $(am__append_4270) \
+ $(am__append_4277) $(am__append_4284) $(am__append_4291) \
+ $(am__append_4298) $(am__append_4305) $(am__append_4312) \
+ $(am__append_4319) $(am__append_4326) $(am__append_4333) \
+ $(am__append_4340) $(am__append_4347) $(am__append_4354) \
+ $(am__append_4361) $(am__append_4368) $(am__append_4375) \
+ $(am__append_4382) $(am__append_4389) $(am__append_4396) \
+ $(am__append_4403) $(am__append_4410) $(am__append_4417) \
+ $(am__append_4424) $(am__append_4431) $(am__append_4438) \
+ $(am__append_4445) $(am__append_4452) $(am__append_4459) \
+ $(am__append_4466) $(am__append_4473) $(am__append_4480) \
+ $(am__append_4487) $(am__append_4494) $(am__append_4501) \
+ $(am__append_4508) $(am__append_4515) $(am__append_4522) \
+ $(am__append_4529) $(am__append_4536) $(am__append_4543) \
+ $(am__append_4550) $(am__append_4557) $(am__append_4564) \
+ $(am__append_4571) $(am__append_4578) $(am__append_4585) \
+ $(am__append_4592) $(am__append_4599) $(am__append_4606) \
+ $(am__append_4613) $(am__append_4620) $(am__append_4627) \
+ $(am__append_4634) $(am__append_4641) $(am__append_4648) \
+ $(am__append_4655) $(am__append_4662) $(am__append_4669) \
+ $(am__append_4676) $(am__append_4683) $(am__append_4690) \
+ $(am__append_4697) $(am__append_4704) $(am__append_4711) \
+ $(am__append_4718) $(am__append_4725) $(am__append_4732) \
+ $(am__append_4739) $(am__append_4746) $(am__append_4753) \
+ $(am__append_4760) $(am__append_4767) $(am__append_4774) \
+ $(am__append_4781) $(am__append_4788) $(am__append_4795) \
+ $(am__append_4802) $(am__append_4809) $(am__append_4816) \
+ $(am__append_4823) $(am__append_4830) $(am__append_4837) \
+ $(am__append_4844) $(am__append_4851) $(am__append_4858) \
+ $(am__append_4865) $(am__append_4872) $(am__append_4879) \
+ $(am__append_4886) $(am__append_4893) $(am__append_4900) \
+ $(am__append_4907) $(am__append_4914) $(am__append_4921) \
+ $(am__append_4928) $(am__append_4935) $(am__append_4942) \
+ $(am__append_4949) $(am__append_4956) $(am__append_4963) \
+ $(am__append_4970) $(am__append_4977) $(am__append_4984) \
+ $(am__append_4991) $(am__append_4998) $(am__append_5005) \
+ $(am__append_5012) $(am__append_5019) $(am__append_5026) \
+ $(am__append_5033) $(am__append_5040) $(am__append_5047) \
+ $(am__append_5054) $(am__append_5061) $(am__append_5068) \
+ $(am__append_5075) $(am__append_5082) $(am__append_5089) \
+ $(am__append_5096) $(am__append_5103) $(am__append_5110) \
+ $(am__append_5117) $(am__append_5124) $(am__append_5131) \
+ $(am__append_5138) $(am__append_5145) $(am__append_5152) \
+ $(am__append_5159) $(am__append_5166) $(am__append_5173) \
+ $(am__append_5180) $(am__append_5187) $(am__append_5194) \
+ $(am__append_5201) $(am__append_5208) $(am__append_5215) \
+ $(am__append_5222) $(am__append_5229) $(am__append_5236) \
+ $(am__append_5243) $(am__append_5250) $(am__append_5257) \
+ $(am__append_5264) $(am__append_5271) $(am__append_5278) \
+ $(am__append_5285) $(am__append_5292) $(am__append_5299) \
+ $(am__append_5306) $(am__append_5313) $(am__append_5320) \
+ $(am__append_5327) $(am__append_5334) $(am__append_5341) \
+ $(am__append_5348) $(am__append_5355) $(am__append_5362) \
+ $(am__append_5369) $(am__append_5376) $(am__append_5383) \
+ $(am__append_5390) $(am__append_5397) $(am__append_5404) \
+ $(am__append_5411) $(am__append_5418) $(am__append_5425) \
+ $(am__append_5432) $(am__append_5439) $(am__append_5446) \
+ $(am__append_5453) $(am__append_5460) $(am__append_5467) \
+ $(am__append_5474) $(am__append_5481) $(am__append_5488) \
+ $(am__append_5495) $(am__append_5502) $(am__append_5509) \
+ $(am__append_5516) $(am__append_5523) $(am__append_5530) \
+ $(am__append_5537) $(am__append_5544) $(am__append_5551) \
+ $(am__append_5558) $(am__append_5565) $(am__append_5572) \
+ $(am__append_5579) $(am__append_5586) $(am__append_5593) \
+ $(am__append_5600) $(am__append_5607) $(am__append_5614) \
+ $(am__append_5621) $(am__append_5628) $(am__append_5635) \
+ $(am__append_5642) $(am__append_5649) $(am__append_5656) \
+ $(am__append_5663) $(am__append_5670) $(am__append_5677) \
+ $(am__append_5684) $(am__append_5691) $(am__append_5698) \
+ $(am__append_5705) $(am__append_5712) $(am__append_5719) \
+ $(am__append_5726) $(am__append_5733) $(am__append_5740) \
+ $(am__append_5747) $(am__append_5754) $(am__append_5761) \
+ $(am__append_5768) $(am__append_5775) $(am__append_5782) \
+ $(am__append_5789) $(am__append_5796) $(am__append_5803) \
+ $(am__append_5810) $(am__append_5817) $(am__append_5824) \
+ $(am__append_5831) $(am__append_5838) $(am__append_5845) \
+ $(am__append_5852) $(am__append_5859) $(am__append_5866) \
+ $(am__append_5873) $(am__append_5880) $(am__append_5887) \
+ $(am__append_5894) $(am__append_5901) $(am__append_5908) \
+ $(am__append_5915) $(am__append_5922) $(am__append_5929) \
+ $(am__append_5936) $(am__append_5943) $(am__append_5950) \
+ $(am__append_5957) $(am__append_5964) $(am__append_5971) \
+ $(am__append_5978) $(am__append_5985) $(am__append_5992) \
+ $(am__append_5999) $(am__append_6006) $(am__append_6013) \
+ $(am__append_6020) $(am__append_6027) $(am__append_6034) \
+ $(am__append_6041) $(am__append_6048) $(am__append_6055) \
+ $(am__append_6062) $(am__append_6069) $(am__append_6076) \
+ $(am__append_6083) $(am__append_6090) $(am__append_6097) \
+ $(am__append_6104) $(am__append_6111) $(am__append_6118) \
+ $(am__append_6125) $(am__append_6132) $(am__append_6139) \
+ $(am__append_6146) $(am__append_6153) $(am__append_6160) \
+ $(am__append_6167) $(am__append_6174) $(am__append_6181) \
+ $(am__append_6188) $(am__append_6195) $(am__append_6202) \
+ $(am__append_6209) $(am__append_6216) $(am__append_6223) \
+ $(am__append_6230) $(am__append_6237) $(am__append_6244) \
+ $(am__append_6251) $(am__append_6258) $(am__append_6265) \
+ $(am__append_6272) $(am__append_6279) $(am__append_6286) \
+ $(am__append_6293) $(am__append_6300) $(am__append_6307) \
+ $(am__append_6314) $(am__append_6321) $(am__append_6328) \
+ $(am__append_6335) $(am__append_6342) $(am__append_6349) \
+ $(am__append_6356) $(am__append_6363) $(am__append_6370) \
+ $(am__append_6377) $(am__append_6384) $(am__append_6391) \
+ $(am__append_6398) $(am__append_6405) $(am__append_6412) \
+ $(am__append_6419) $(am__append_6426) $(am__append_6433) \
+ $(am__append_6440) $(am__append_6447) $(am__append_6454) \
+ $(am__append_6461) $(am__append_6468) $(am__append_6475) \
+ $(am__append_6482) $(am__append_6489) $(am__append_6496) \
+ $(am__append_6503) $(am__append_6510) $(am__append_6517) \
+ $(am__append_6524) $(am__append_6531) $(am__append_6538) \
+ $(am__append_6545) $(am__append_6552) $(am__append_6559) \
+ $(am__append_6566) $(am__append_6573) $(am__append_6580) \
+ $(am__append_6587) $(am__append_6594) $(am__append_6601) \
+ $(am__append_6608) $(am__append_6615) $(am__append_6622) \
+ $(am__append_6629) $(am__append_6636) $(am__append_6643) \
+ $(am__append_6650) $(am__append_6657) $(am__append_6664) \
+ $(am__append_6671) $(am__append_6678) $(am__append_6685) \
+ $(am__append_6692) $(am__append_6699) $(am__append_6706) \
+ $(am__append_6713) $(am__append_6720) $(am__append_6727) \
+ $(am__append_6734) $(am__append_6741) $(am__append_6748) \
+ $(am__append_6755) $(am__append_6762) $(am__append_6769) \
+ $(am__append_6776) $(am__append_6783) $(am__append_6790) \
+ $(am__append_6797) $(am__append_6804) $(am__append_6811) \
+ $(am__append_6818) $(am__append_6825) $(am__append_6832) \
+ $(am__append_6839) $(am__append_6846) $(am__append_6853) \
+ $(am__append_6860) $(am__append_6867) $(am__append_6874) \
+ $(am__append_6881) $(am__append_6888) $(am__append_6895) \
+ $(am__append_6902) $(am__append_6909) $(am__append_6916) \
+ $(am__append_6923) $(am__append_6930) $(am__append_6937) \
+ $(am__append_6944) $(am__append_6951) $(am__append_6958) \
+ $(am__append_6965) $(am__append_6972) $(am__append_6979) \
+ $(am__append_6986) $(am__append_6993) $(am__append_7000) \
+ $(am__append_7007) $(am__append_7014) $(am__append_7021) \
+ $(am__append_7028) $(am__append_7035) $(am__append_7042) \
+ $(am__append_7049) $(am__append_7056) $(am__append_7063) \
+ $(am__append_7070) $(am__append_7077) $(am__append_7084) \
+ $(am__append_7091) $(am__append_7098) $(am__append_7105) \
+ $(am__append_7112) $(am__append_7119) $(am__append_7126) \
+ $(am__append_7133) $(am__append_7140) $(am__append_7147) \
+ $(am__append_7154) $(am__append_7161) $(am__append_7168) \
+ $(am__append_7175) $(am__append_7182) $(am__append_7189) \
+ $(am__append_7196) $(am__append_7203) $(am__append_7210) \
+ $(am__append_7217) $(am__append_7224) $(am__append_7231) \
+ $(am__append_7238) $(am__append_7245) $(am__append_7252) \
+ $(am__append_7259) $(am__append_7266) $(am__append_7273) \
+ $(am__append_7280) $(am__append_7287) $(am__append_7294) \
+ $(am__append_7301) $(am__append_7308) $(am__append_7315) \
+ $(am__append_7322) $(am__append_7329) $(am__append_7336) \
+ $(am__append_7343) $(am__append_7350) $(am__append_7357) \
+ $(am__append_7364) $(am__append_7371) $(am__append_7378) \
+ $(am__append_7385) $(am__append_7392) $(am__append_7399) \
+ $(am__append_7406) $(am__append_7413) $(am__append_7420) \
+ $(am__append_7427) $(am__append_7434) $(am__append_7441) \
+ $(am__append_7448) $(am__append_7455) $(am__append_7462) \
+ $(am__append_7469) $(am__append_7476) $(am__append_7483) \
+ $(am__append_7490) $(am__append_7497) $(am__append_7504) \
+ $(am__append_7511) $(am__append_7518) $(am__append_7525) \
+ $(am__append_7532) $(am__append_7539) $(am__append_7546) \
+ $(am__append_7553) $(am__append_7560) $(am__append_7567) \
+ $(am__append_7574) $(am__append_7581) $(am__append_7588) \
+ $(am__append_7595) $(am__append_7602) $(am__append_7609) \
+ $(am__append_7616) $(am__append_7623) $(am__append_7630) \
+ $(am__append_7637) $(am__append_7644) $(am__append_7651) \
+ $(am__append_7658) $(am__append_7665) $(am__append_7672) \
+ $(am__append_7679) $(am__append_7686) $(am__append_7693) \
+ $(am__append_7700) $(am__append_7707) $(am__append_7714) \
+ $(am__append_7721) $(am__append_7728) $(am__append_7735) \
+ $(am__append_7742) $(am__append_7749) $(am__append_7756) \
+ $(am__append_7763) $(am__append_7770) $(am__append_7777) \
+ $(am__append_7784) $(am__append_7791) $(am__append_7798) \
+ $(am__append_7805) $(am__append_7812) $(am__append_7819) \
+ $(am__append_7826) $(am__append_7833) $(am__append_7840) \
+ $(am__append_7847) $(am__append_7854) $(am__append_7861) \
+ $(am__append_7868) $(am__append_7875) $(am__append_7882) \
+ $(am__append_7889) $(am__append_7896) $(am__append_7903) \
+ $(am__append_7910) $(am__append_7917) $(am__append_7924) \
+ $(am__append_7931) $(am__append_7938) $(am__append_7945) \
+ $(am__append_7952) $(am__append_7959) $(am__append_7966) \
+ $(am__append_7973) $(am__append_7980) $(am__append_7987) \
+ $(am__append_7994) $(am__append_8001) $(am__append_8008) \
+ $(am__append_8015) $(am__append_8022) $(am__append_8029) \
+ $(am__append_8036) $(am__append_8043) $(am__append_8050) \
+ $(am__append_8057) $(am__append_8064) $(am__append_8071) \
+ $(am__append_8078) $(am__append_8085) $(am__append_8092) \
+ $(am__append_8099) $(am__append_8106) $(am__append_8113) \
+ $(am__append_8120) $(am__append_8127) $(am__append_8134) \
+ $(am__append_8141) $(am__append_8148) $(am__append_8155) \
+ $(am__append_8162) $(am__append_8169) $(am__append_8176) \
+ $(am__append_8183) $(am__append_8190) $(am__append_8197) \
+ $(am__append_8204) $(am__append_8211) $(am__append_8218) \
+ $(am__append_8225) $(am__append_8232) $(am__append_8239) \
+ $(am__append_8246) $(am__append_8253) $(am__append_8260) \
+ $(am__append_8267) $(am__append_8274) $(am__append_8281) \
+ $(am__append_8288) $(am__append_8295) $(am__append_8302) \
+ $(am__append_8309) $(am__append_8316) $(am__append_8323) \
+ $(am__append_8330) $(am__append_8337) $(am__append_8344) \
+ $(am__append_8351) $(am__append_8358) $(am__append_8365) \
+ $(am__append_8372) $(am__append_8379) $(am__append_8386) \
+ $(am__append_8393) $(am__append_8400) $(am__append_8407) \
+ $(am__append_8414) $(am__append_8421) $(am__append_8428) \
+ $(am__append_8435) $(am__append_8442) $(am__append_8449) \
+ $(am__append_8456) $(am__append_8463) $(am__append_8470) \
+ $(am__append_8477) $(am__append_8484) $(am__append_8491) \
+ $(am__append_8498) $(am__append_8505) $(am__append_8512) \
+ $(am__append_8519) $(am__append_8526) $(am__append_8533) \
+ $(am__append_8540) $(am__append_8547) $(am__append_8554) \
+ $(am__append_8561) $(am__append_8568) $(am__append_8575) \
+ $(am__append_8582) $(am__append_8589) $(am__append_8596) \
+ $(am__append_8603) $(am__append_8610) $(am__append_8617) \
+ $(am__append_8624) $(am__append_8631) $(am__append_8638) \
+ $(am__append_8645) $(am__append_8652) $(am__append_8659) \
+ $(am__append_8666) $(am__append_8673) $(am__append_8680) \
+ $(am__append_8687) $(am__append_8694) $(am__append_8701) \
+ $(am__append_8708) $(am__append_8715) $(am__append_8722) \
+ $(am__append_8729) $(am__append_8736) $(am__append_8743) \
+ $(am__append_8750) $(am__append_8757) $(am__append_8764) \
+ $(am__append_8771) $(am__append_8778) $(am__append_8785) \
+ $(am__append_8792) $(am__append_8799) $(am__append_8806) \
+ $(am__append_8813) $(am__append_8820) $(am__append_8827) \
+ $(am__append_8834) $(am__append_8841) $(am__append_8848) \
+ $(am__append_8855) $(am__append_8862) $(am__append_8869) \
+ $(am__append_8876) $(am__append_8883) $(am__append_8890) \
+ $(am__append_8897) $(am__append_8904) $(am__append_8911) \
+ $(am__append_8918) $(am__append_8925) $(am__append_8932) \
+ $(am__append_8939) $(am__append_8946) $(am__append_8953) \
+ $(am__append_8960) $(am__append_8967) $(am__append_8974) \
+ $(am__append_8981) $(am__append_8988) $(am__append_8995) \
+ $(am__append_9002) $(am__append_9009) $(am__append_9016) \
+ $(am__append_9023) $(am__append_9030) $(am__append_9037) \
+ $(am__append_9044) $(am__append_9051) $(am__append_9058) \
+ $(am__append_9065) $(am__append_9072) $(am__append_9079) \
+ $(am__append_9086) $(am__append_9093) $(am__append_9100) \
+ $(am__append_9107) $(am__append_9114) $(am__append_9121) \
+ $(am__append_9128) $(am__append_9135) $(am__append_9142) \
+ $(am__append_9149) $(am__append_9156) $(am__append_9163) \
+ $(am__append_9170) $(am__append_9177) $(am__append_9184) \
+ $(am__append_9191) $(am__append_9198) $(am__append_9205) \
+ $(am__append_9212) $(am__append_9219) $(am__append_9226) \
+ $(am__append_9233) $(am__append_9240) $(am__append_9247) \
+ $(am__append_9254) $(am__append_9261) $(am__append_9268) \
+ $(am__append_9275) $(am__append_9282) $(am__append_9289) \
+ $(am__append_9296) $(am__append_9303) $(am__append_9310) \
+ $(am__append_9317) $(am__append_9324) $(am__append_9331) \
+ $(am__append_9338) $(am__append_9345) $(am__append_9352) \
+ $(am__append_9359) $(am__append_9366) $(am__append_9373) \
+ $(am__append_9380) $(am__append_9387) $(am__append_9394) \
+ $(am__append_9401) $(am__append_9408) $(am__append_9415) \
+ $(am__append_9422) $(am__append_9429) $(am__append_9436) \
+ $(am__append_9443) $(am__append_9450) $(am__append_9457) \
+ $(am__append_9464) $(am__append_9471) $(am__append_9478) \
+ $(am__append_9485) $(am__append_9492) $(am__append_9499) \
+ $(am__append_9506) $(am__append_9513) $(am__append_9520) \
+ $(am__append_9527) $(am__append_9534) $(am__append_9541) \
+ $(am__append_9548) $(am__append_9555) $(am__append_9562) \
+ $(am__append_9569) $(am__append_9576) $(am__append_9583) \
+ $(am__append_9590) $(am__append_9597) $(am__append_9604) \
+ $(am__append_9611) $(am__append_9618) $(am__append_9625) \
+ $(am__append_9632) $(am__append_9639) $(am__append_9646) \
+ $(am__append_9653) $(am__append_9660) $(am__append_9667) \
+ $(am__append_9674) $(am__append_9681) $(am__append_9688) \
+ $(am__append_9695) $(am__append_9702) $(am__append_9709) \
+ $(am__append_9716) $(am__append_9723) $(am__append_9730) \
+ $(am__append_9737) $(am__append_9744) $(am__append_9751) \
+ $(am__append_9758) $(am__append_9765) $(am__append_9772) \
+ $(am__append_9779) $(am__append_9786) $(am__append_9793) \
+ $(am__append_9800) $(am__append_9807) $(am__append_9814) \
+ $(am__append_9821) $(am__append_9828) $(am__append_9835) \
+ $(am__append_9842) $(am__append_9849) $(am__append_9856) \
+ $(am__append_9863) $(am__append_9870) $(am__append_9877) \
+ $(am__append_9884) $(am__append_9891) $(am__append_9898) \
+ $(am__append_9905) $(am__append_9912) $(am__append_9919) \
+ $(am__append_9926) $(am__append_9933) $(am__append_9940) \
+ $(am__append_9947) $(am__append_9954) $(am__append_9961) \
+ $(am__append_9968) $(am__append_9975) $(am__append_9982) \
+ $(am__append_9989) $(am__append_9996) $(am__append_10003) \
+ $(am__append_10010) $(am__append_10017) $(am__append_10024) \
+ $(am__append_10031) $(am__append_10038) $(am__append_10045) \
+ $(am__append_10052) $(am__append_10059) $(am__append_10066) \
+ $(am__append_10073) $(am__append_10080) $(am__append_10087) \
+ $(am__append_10094) $(am__append_10101) $(am__append_10108) \
+ $(am__append_10115) $(am__append_10122) $(am__append_10129) \
+ $(am__append_10136) $(am__append_10143) $(am__append_10150) \
+ $(am__append_10157) $(am__append_10164) $(am__append_10171) \
+ $(am__append_10178) $(am__append_10185) $(am__append_10192) \
+ $(am__append_10199) $(am__append_10206) $(am__append_10213) \
+ $(am__append_10220) $(am__append_10227) $(am__append_10234) \
+ $(am__append_10241) $(am__append_10248) $(am__append_10255) \
+ $(am__append_10262) $(am__append_10269) $(am__append_10276) \
+ $(am__append_10283) $(am__append_10290) $(am__append_10297) \
+ $(am__append_10304) $(am__append_10311) $(am__append_10318) \
+ $(am__append_10325) $(am__append_10332) $(am__append_10339) \
+ $(am__append_10346) $(am__append_10353) $(am__append_10360) \
+ $(am__append_10367) $(am__append_10374) $(am__append_10381) \
+ $(am__append_10388) $(am__append_10395) $(am__append_10402) \
+ $(am__append_10409) $(am__append_10416) $(am__append_10423) \
+ $(am__append_10430) $(am__append_10437) $(am__append_10444) \
+ $(am__append_10451) $(am__append_10458) $(am__append_10465) \
+ $(am__append_10472) $(am__append_10479) $(am__append_10486) \
+ $(am__append_10493) $(am__append_10500) $(am__append_10507) \
+ $(am__append_10514) $(am__append_10521) $(am__append_10528) \
+ $(am__append_10535) $(am__append_10542) $(am__append_10549) \
+ $(am__append_10556) $(am__append_10563) $(am__append_10570) \
+ $(am__append_10577) $(am__append_10584) $(am__append_10591) \
+ $(am__append_10598) $(am__append_10605) $(am__append_10612) \
+ $(am__append_10619) $(am__append_10626) $(am__append_10633) \
+ $(am__append_10640) $(am__append_10647) $(am__append_10654) \
+ $(am__append_10661) $(am__append_10668) $(am__append_10675) \
+ $(am__append_10682) $(am__append_10689) $(am__append_10696) \
+ $(am__append_10703) $(am__append_10710) $(am__append_10717) \
+ $(am__append_10724) $(am__append_10731) $(am__append_10738) \
+ $(am__append_10745) $(am__append_10752) $(am__append_10759) \
+ $(am__append_10766) $(am__append_10773) $(am__append_10780) \
+ $(am__append_10787) $(am__append_10794) $(am__append_10801) \
+ $(am__append_10808) $(am__append_10815) $(am__append_10822) \
+ $(am__append_10829) $(am__append_10836) $(am__append_10843) \
+ $(am__append_10850) $(am__append_10857) $(am__append_10864) \
+ $(am__append_10871) $(am__append_10878) $(am__append_10885) \
+ $(am__append_10892) $(am__append_10899) $(am__append_10906) \
+ $(am__append_10913) $(am__append_10920) $(am__append_10927) \
+ $(am__append_10934) $(am__append_10941) $(am__append_10948) \
+ $(am__append_10955) $(am__append_10962) $(am__append_10969) \
+ $(am__append_10976) $(am__append_10983) $(am__append_10990) \
+ $(am__append_10997) $(am__append_11004) $(am__append_11011) \
+ $(am__append_11018) $(am__append_11025) $(am__append_11032) \
+ $(am__append_11039) $(am__append_11046) $(am__append_11053) \
+ $(am__append_11060) $(am__append_11067) $(am__append_11074) \
+ $(am__append_11081) $(am__append_11088) $(am__append_11095) \
+ $(am__append_11102) $(am__append_11109) $(am__append_11116) \
+ $(am__append_11123) $(am__append_11130) $(am__append_11137) \
+ $(am__append_11144) $(am__append_11151) $(am__append_11158) \
+ $(am__append_11165) $(am__append_11172) $(am__append_11179) \
+ $(am__append_11186) $(am__append_11193) $(am__append_11200) \
+ $(am__append_11207) $(am__append_11214) $(am__append_11221) \
+ $(am__append_11228) $(am__append_11235) $(am__append_11242) \
+ $(am__append_11249) $(am__append_11256) $(am__append_11263) \
+ $(am__append_11270) $(am__append_11277) $(am__append_11284) \
+ $(am__append_11291) $(am__append_11298) $(am__append_11305) \
+ $(am__append_11312) $(am__append_11319) $(am__append_11326) \
+ $(am__append_11333) $(am__append_11340) $(am__append_11347) \
+ $(am__append_11354) $(am__append_11361) $(am__append_11368) \
+ $(am__append_11375) $(am__append_11382) $(am__append_11389) \
+ $(am__append_11396) $(am__append_11403) $(am__append_11410) \
+ $(am__append_11417) $(am__append_11424) $(am__append_11431) \
+ $(am__append_11438) $(am__append_11445) $(am__append_11452) \
+ $(am__append_11459) $(am__append_11466) $(am__append_11473) \
+ $(am__append_11480) $(am__append_11487) $(am__append_11494) \
+ $(am__append_11501) $(am__append_11508) $(am__append_11515) \
+ $(am__append_11522) $(am__append_11529) $(am__append_11536) \
+ $(am__append_11543) $(am__append_11550) $(am__append_11557) \
+ $(am__append_11564) $(am__append_11571) $(am__append_11578) \
+ $(am__append_11585) $(am__append_11592) $(am__append_11599) \
+ $(am__append_11606) $(am__append_11613) $(am__append_11620) \
+ $(am__append_11627) $(am__append_11634) $(am__append_11641) \
+ $(am__append_11648) $(am__append_11655) $(am__append_11662) \
+ $(am__append_11669) $(am__append_11676) $(am__append_11683) \
+ $(am__append_11690) $(am__append_11697) $(am__append_11704) \
+ $(am__append_11711) $(am__append_11718) $(am__append_11725) \
+ $(am__append_11732) $(am__append_11739) $(am__append_11746) \
+ $(am__append_11753) $(am__append_11760) $(am__append_11767) \
+ $(am__append_11774) $(am__append_11781) $(am__append_11788) \
+ $(am__append_11795) $(am__append_11802) $(am__append_11809) \
+ $(am__append_11816) $(am__append_11823) $(am__append_11830) \
+ $(am__append_11837) $(am__append_11844) $(am__append_11851) \
+ $(am__append_11858) $(am__append_11865) $(am__append_11872) \
+ $(am__append_11879) $(am__append_11886) $(am__append_11893) \
+ $(am__append_11900) $(am__append_11907) $(am__append_11914) \
+ $(am__append_11921) $(am__append_11928) $(am__append_11935) \
+ $(am__append_11942) $(am__append_11949) $(am__append_11956) \
+ $(am__append_11963) $(am__append_11970) $(am__append_11977) \
+ $(am__append_11984) $(am__append_11991) $(am__append_11998) \
+ $(am__append_12005) $(am__append_12012) $(am__append_12019) \
+ $(am__append_12026) $(am__append_12033) $(am__append_12040) \
+ $(am__append_12047) $(am__append_12054) $(am__append_12061) \
+ $(am__append_12068) $(am__append_12075) $(am__append_12082) \
+ $(am__append_12089) $(am__append_12096) $(am__append_12103) \
+ $(am__append_12110) $(am__append_12117) $(am__append_12124) \
+ $(am__append_12131) $(am__append_12137) $(am__append_12142) \
+ $(am__append_12147) $(am__append_12152) $(am__append_12157) \
+ $(am__append_12162) $(am__append_12167) $(am__append_12172) \
+ $(am__append_12177) $(am__append_12182) $(am__append_12187) \
+ $(am__append_12192) $(am__append_12197) $(am__append_12202) \
+ $(am__append_12207) $(am__append_12212) $(am__append_12217) \
+ $(am__append_12222) $(am__append_12232) $(am__append_12241) \
+ $(am__append_12250) $(am__append_12259) $(am__append_12268) \
+ $(am__append_12277) $(am__append_12286) $(am__append_12295) \
+ $(am__append_12304) $(am__append_12313) $(am__append_12322) \
+ $(am__append_12325) $(am__append_12328) $(am__append_12332) \
+ $(am__append_12335) $(am__append_12338) $(am__append_12341) \
+ $(am__append_12344) $(am__append_12347) $(am__append_12350) \
+ $(am__append_12353) $(am__append_12356) $(am__append_12359) \
+ $(am__append_12362) $(am__append_12365) $(am__append_12368) \
+ $(am__append_12371) $(am__append_12374) $(am__append_12377) \
+ $(am__append_12380) $(am__append_12383) $(am__append_12386) \
+ $(am__append_12389) $(am__append_12392) symlist.h symlist.c \
+ kernel_syms.lst $(am__append_12408) fs.lst command.lst \
+ partmap.lst terminal.lst parttool.lst video.lst crypto.lst \
+ config.log syminfo.lst moddep.lst $(MOD_FILES) \
+ $(am__append_12410)
+BUILT_SOURCES = $(am__append_13) $(am__append_20) $(am__append_27) \
+ $(am__append_34) $(am__append_41) $(am__append_48) \
+ $(am__append_55) $(am__append_62) $(am__append_69) \
+ $(am__append_76) $(am__append_83) $(am__append_90) \
+ $(am__append_97) $(am__append_104) $(am__append_111) \
+ $(am__append_118) $(am__append_125) $(am__append_132) \
+ $(am__append_139) $(am__append_146) $(am__append_153) \
+ $(am__append_160) $(am__append_167) $(am__append_174) \
+ $(am__append_181) $(am__append_188) $(am__append_195) \
+ $(am__append_202) $(am__append_209) $(am__append_216) \
+ $(am__append_223) $(am__append_230) $(am__append_237) \
+ $(am__append_244) $(am__append_251) $(am__append_258) \
+ $(am__append_265) $(am__append_272) $(am__append_279) \
+ $(am__append_286) $(am__append_293) $(am__append_300) \
+ $(am__append_307) $(am__append_314) $(am__append_321) \
+ $(am__append_328) $(am__append_335) $(am__append_342) \
+ $(am__append_349) $(am__append_356) $(am__append_363) \
+ $(am__append_370) $(am__append_377) $(am__append_384) \
+ $(am__append_391) $(am__append_398) $(am__append_405) \
+ $(am__append_412) $(am__append_419) $(am__append_426) \
+ $(am__append_433) $(am__append_440) $(am__append_447) \
+ $(am__append_454) $(am__append_461) $(am__append_468) \
+ $(am__append_475) $(am__append_482) $(am__append_489) \
+ $(am__append_496) $(am__append_503) $(am__append_510) \
+ $(am__append_517) $(am__append_524) $(am__append_531) \
+ $(am__append_538) $(am__append_545) $(am__append_552) \
+ $(am__append_559) $(am__append_566) $(am__append_573) \
+ $(am__append_580) $(am__append_587) $(am__append_594) \
+ $(am__append_601) $(am__append_608) $(am__append_615) \
+ $(am__append_622) $(am__append_629) $(am__append_636) \
+ $(am__append_643) $(am__append_650) $(am__append_657) \
+ $(am__append_664) $(am__append_671) $(am__append_678) \
+ $(am__append_685) $(am__append_692) $(am__append_699) \
+ $(am__append_706) $(am__append_713) $(am__append_720) \
+ $(am__append_727) $(am__append_734) $(am__append_741) \
+ $(am__append_748) $(am__append_755) $(am__append_762) \
+ $(am__append_769) $(am__append_776) $(am__append_783) \
+ $(am__append_790) $(am__append_797) $(am__append_804) \
+ $(am__append_811) $(am__append_818) $(am__append_825) \
+ $(am__append_832) $(am__append_839) $(am__append_846) \
+ $(am__append_853) $(am__append_860) $(am__append_867) \
+ $(am__append_874) $(am__append_881) $(am__append_888) \
+ $(am__append_895) $(am__append_902) $(am__append_909) \
+ $(am__append_916) $(am__append_923) $(am__append_930) \
+ $(am__append_937) $(am__append_944) $(am__append_951) \
+ $(am__append_958) $(am__append_965) $(am__append_972) \
+ $(am__append_979) $(am__append_986) $(am__append_993) \
+ $(am__append_1000) $(am__append_1007) $(am__append_1014) \
+ $(am__append_1021) $(am__append_1028) $(am__append_1035) \
+ $(am__append_1042) $(am__append_1049) $(am__append_1056) \
+ $(am__append_1063) $(am__append_1070) $(am__append_1077) \
+ $(am__append_1084) $(am__append_1091) $(am__append_1098) \
+ $(am__append_1105) $(am__append_1112) $(am__append_1119) \
+ $(am__append_1126) $(am__append_1133) $(am__append_1140) \
+ $(am__append_1147) $(am__append_1154) $(am__append_1161) \
+ $(am__append_1168) $(am__append_1175) $(am__append_1182) \
+ $(am__append_1189) $(am__append_1196) $(am__append_1203) \
+ $(am__append_1210) $(am__append_1217) $(am__append_1224) \
+ $(am__append_1231) $(am__append_1238) $(am__append_1245) \
+ $(am__append_1252) $(am__append_1259) $(am__append_1266) \
+ $(am__append_1273) $(am__append_1280) $(am__append_1287) \
+ $(am__append_1294) $(am__append_1301) $(am__append_1308) \
+ $(am__append_1315) $(am__append_1322) $(am__append_1329) \
+ $(am__append_1336) $(am__append_1343) $(am__append_1350) \
+ $(am__append_1357) $(am__append_1364) $(am__append_1371) \
+ $(am__append_1378) $(am__append_1385) $(am__append_1392) \
+ $(am__append_1399) $(am__append_1406) $(am__append_1413) \
+ $(am__append_1420) $(am__append_1427) $(am__append_1434) \
+ $(am__append_1441) $(am__append_1448) $(am__append_1455) \
+ $(am__append_1462) $(am__append_1469) $(am__append_1476) \
+ $(am__append_1483) $(am__append_1490) $(am__append_1497) \
+ $(am__append_1504) $(am__append_1511) $(am__append_1518) \
+ $(am__append_1525) $(am__append_1532) $(am__append_1539) \
+ $(am__append_1546) $(am__append_1553) $(am__append_1560) \
+ $(am__append_1567) $(am__append_1574) $(am__append_1581) \
+ $(am__append_1588) $(am__append_1595) $(am__append_1602) \
+ $(am__append_1609) $(am__append_1616) $(am__append_1623) \
+ $(am__append_1630) $(am__append_1637) $(am__append_1644) \
+ $(am__append_1651) $(am__append_1658) $(am__append_1665) \
+ $(am__append_1672) $(am__append_1679) $(am__append_1686) \
+ $(am__append_1693) $(am__append_1700) $(am__append_1707) \
+ $(am__append_1714) $(am__append_1721) $(am__append_1728) \
+ $(am__append_1735) $(am__append_1742) $(am__append_1749) \
+ $(am__append_1756) $(am__append_1763) $(am__append_1770) \
+ $(am__append_1777) $(am__append_1784) $(am__append_1791) \
+ $(am__append_1798) $(am__append_1805) $(am__append_1812) \
+ $(am__append_1819) $(am__append_1826) $(am__append_1833) \
+ $(am__append_1840) $(am__append_1847) $(am__append_1854) \
+ $(am__append_1861) $(am__append_1868) $(am__append_1875) \
+ $(am__append_1882) $(am__append_1889) $(am__append_1896) \
+ $(am__append_1903) $(am__append_1910) $(am__append_1917) \
+ $(am__append_1924) $(am__append_1931) $(am__append_1938) \
+ $(am__append_1945) $(am__append_1952) $(am__append_1959) \
+ $(am__append_1966) $(am__append_1973) $(am__append_1980) \
+ $(am__append_1987) $(am__append_1994) $(am__append_2001) \
+ $(am__append_2008) $(am__append_2015) $(am__append_2022) \
+ $(am__append_2029) $(am__append_2036) $(am__append_2043) \
+ $(am__append_2050) $(am__append_2057) $(am__append_2064) \
+ $(am__append_2071) $(am__append_2078) $(am__append_2085) \
+ $(am__append_2092) $(am__append_2099) $(am__append_2106) \
+ $(am__append_2113) $(am__append_2120) $(am__append_2127) \
+ $(am__append_2134) $(am__append_2141) $(am__append_2148) \
+ $(am__append_2155) $(am__append_2162) $(am__append_2169) \
+ $(am__append_2176) $(am__append_2183) $(am__append_2190) \
+ $(am__append_2197) $(am__append_2204) $(am__append_2211) \
+ $(am__append_2218) $(am__append_2225) $(am__append_2232) \
+ $(am__append_2239) $(am__append_2246) $(am__append_2253) \
+ $(am__append_2260) $(am__append_2267) $(am__append_2274) \
+ $(am__append_2281) $(am__append_2288) $(am__append_2295) \
+ $(am__append_2302) $(am__append_2309) $(am__append_2316) \
+ $(am__append_2323) $(am__append_2330) $(am__append_2337) \
+ $(am__append_2344) $(am__append_2351) $(am__append_2358) \
+ $(am__append_2365) $(am__append_2372) $(am__append_2379) \
+ $(am__append_2386) $(am__append_2393) $(am__append_2400) \
+ $(am__append_2407) $(am__append_2414) $(am__append_2421) \
+ $(am__append_2428) $(am__append_2435) $(am__append_2442) \
+ $(am__append_2449) $(am__append_2456) $(am__append_2463) \
+ $(am__append_2470) $(am__append_2477) $(am__append_2484) \
+ $(am__append_2491) $(am__append_2498) $(am__append_2505) \
+ $(am__append_2512) $(am__append_2519) $(am__append_2526) \
+ $(am__append_2533) $(am__append_2540) $(am__append_2547) \
+ $(am__append_2554) $(am__append_2561) $(am__append_2568) \
+ $(am__append_2575) $(am__append_2582) $(am__append_2589) \
+ $(am__append_2596) $(am__append_2603) $(am__append_2610) \
+ $(am__append_2617) $(am__append_2624) $(am__append_2631) \
+ $(am__append_2638) $(am__append_2645) $(am__append_2652) \
+ $(am__append_2659) $(am__append_2666) $(am__append_2673) \
+ $(am__append_2680) $(am__append_2687) $(am__append_2694) \
+ $(am__append_2701) $(am__append_2708) $(am__append_2715) \
+ $(am__append_2722) $(am__append_2729) $(am__append_2736) \
+ $(am__append_2743) $(am__append_2750) $(am__append_2757) \
+ $(am__append_2764) $(am__append_2771) $(am__append_2778) \
+ $(am__append_2785) $(am__append_2792) $(am__append_2799) \
+ $(am__append_2806) $(am__append_2813) $(am__append_2820) \
+ $(am__append_2827) $(am__append_2834) $(am__append_2841) \
+ $(am__append_2848) $(am__append_2855) $(am__append_2862) \
+ $(am__append_2869) $(am__append_2876) $(am__append_2883) \
+ $(am__append_2890) $(am__append_2897) $(am__append_2904) \
+ $(am__append_2911) $(am__append_2918) $(am__append_2925) \
+ $(am__append_2932) $(am__append_2939) $(am__append_2946) \
+ $(am__append_2953) $(am__append_2960) $(am__append_2967) \
+ $(am__append_2974) $(am__append_2981) $(am__append_2988) \
+ $(am__append_2995) $(am__append_3002) $(am__append_3009) \
+ $(am__append_3016) $(am__append_3023) $(am__append_3030) \
+ $(am__append_3037) $(am__append_3044) $(am__append_3051) \
+ $(am__append_3058) $(am__append_3065) $(am__append_3072) \
+ $(am__append_3079) $(am__append_3086) $(am__append_3093) \
+ $(am__append_3100) $(am__append_3107) $(am__append_3114) \
+ $(am__append_3121) $(am__append_3128) $(am__append_3135) \
+ $(am__append_3142) $(am__append_3149) $(am__append_3156) \
+ $(am__append_3163) $(am__append_3170) $(am__append_3177) \
+ $(am__append_3184) $(am__append_3191) $(am__append_3198) \
+ $(am__append_3205) $(am__append_3212) $(am__append_3219) \
+ $(am__append_3226) $(am__append_3233) $(am__append_3240) \
+ $(am__append_3247) $(am__append_3254) $(am__append_3261) \
+ $(am__append_3268) $(am__append_3275) $(am__append_3282) \
+ $(am__append_3289) $(am__append_3296) $(am__append_3303) \
+ $(am__append_3310) $(am__append_3317) $(am__append_3324) \
+ $(am__append_3331) $(am__append_3338) $(am__append_3345) \
+ $(am__append_3352) $(am__append_3359) $(am__append_3366) \
+ $(am__append_3373) $(am__append_3380) $(am__append_3387) \
+ $(am__append_3394) $(am__append_3401) $(am__append_3408) \
+ $(am__append_3415) $(am__append_3422) $(am__append_3429) \
+ $(am__append_3436) $(am__append_3443) $(am__append_3450) \
+ $(am__append_3457) $(am__append_3464) $(am__append_3471) \
+ $(am__append_3478) $(am__append_3485) $(am__append_3492) \
+ $(am__append_3499) $(am__append_3506) $(am__append_3513) \
+ $(am__append_3520) $(am__append_3527) $(am__append_3534) \
+ $(am__append_3541) $(am__append_3548) $(am__append_3555) \
+ $(am__append_3562) $(am__append_3569) $(am__append_3576) \
+ $(am__append_3583) $(am__append_3590) $(am__append_3597) \
+ $(am__append_3604) $(am__append_3611) $(am__append_3618) \
+ $(am__append_3625) $(am__append_3632) $(am__append_3639) \
+ $(am__append_3646) $(am__append_3653) $(am__append_3660) \
+ $(am__append_3667) $(am__append_3674) $(am__append_3681) \
+ $(am__append_3688) $(am__append_3695) $(am__append_3702) \
+ $(am__append_3709) $(am__append_3716) $(am__append_3723) \
+ $(am__append_3730) $(am__append_3737) $(am__append_3744) \
+ $(am__append_3751) $(am__append_3758) $(am__append_3765) \
+ $(am__append_3772) $(am__append_3779) $(am__append_3786) \
+ $(am__append_3793) $(am__append_3800) $(am__append_3807) \
+ $(am__append_3814) $(am__append_3821) $(am__append_3828) \
+ $(am__append_3835) $(am__append_3842) $(am__append_3849) \
+ $(am__append_3856) $(am__append_3863) $(am__append_3870) \
+ $(am__append_3877) $(am__append_3884) $(am__append_3891) \
+ $(am__append_3898) $(am__append_3905) $(am__append_3912) \
+ $(am__append_3919) $(am__append_3926) $(am__append_3933) \
+ $(am__append_3940) $(am__append_3947) $(am__append_3954) \
+ $(am__append_3961) $(am__append_3968) $(am__append_3975) \
+ $(am__append_3982) $(am__append_3989) $(am__append_3996) \
+ $(am__append_4003) $(am__append_4010) $(am__append_4017) \
+ $(am__append_4024) $(am__append_4031) $(am__append_4038) \
+ $(am__append_4045) $(am__append_4052) $(am__append_4059) \
+ $(am__append_4066) $(am__append_4073) $(am__append_4080) \
+ $(am__append_4087) $(am__append_4094) $(am__append_4101) \
+ $(am__append_4108) $(am__append_4115) $(am__append_4122) \
+ $(am__append_4129) $(am__append_4136) $(am__append_4143) \
+ $(am__append_4150) $(am__append_4157) $(am__append_4164) \
+ $(am__append_4171) $(am__append_4178) $(am__append_4185) \
+ $(am__append_4192) $(am__append_4199) $(am__append_4206) \
+ $(am__append_4213) $(am__append_4220) $(am__append_4227) \
+ $(am__append_4234) $(am__append_4241) $(am__append_4248) \
+ $(am__append_4255) $(am__append_4262) $(am__append_4269) \
+ $(am__append_4276) $(am__append_4283) $(am__append_4290) \
+ $(am__append_4297) $(am__append_4304) $(am__append_4311) \
+ $(am__append_4318) $(am__append_4325) $(am__append_4332) \
+ $(am__append_4339) $(am__append_4346) $(am__append_4353) \
+ $(am__append_4360) $(am__append_4367) $(am__append_4374) \
+ $(am__append_4381) $(am__append_4388) $(am__append_4395) \
+ $(am__append_4402) $(am__append_4409) $(am__append_4416) \
+ $(am__append_4423) $(am__append_4430) $(am__append_4437) \
+ $(am__append_4444) $(am__append_4451) $(am__append_4458) \
+ $(am__append_4465) $(am__append_4472) $(am__append_4479) \
+ $(am__append_4486) $(am__append_4493) $(am__append_4500) \
+ $(am__append_4507) $(am__append_4514) $(am__append_4521) \
+ $(am__append_4528) $(am__append_4535) $(am__append_4542) \
+ $(am__append_4549) $(am__append_4556) $(am__append_4563) \
+ $(am__append_4570) $(am__append_4577) $(am__append_4584) \
+ $(am__append_4591) $(am__append_4598) $(am__append_4605) \
+ $(am__append_4612) $(am__append_4619) $(am__append_4626) \
+ $(am__append_4633) $(am__append_4640) $(am__append_4647) \
+ $(am__append_4654) $(am__append_4661) $(am__append_4668) \
+ $(am__append_4675) $(am__append_4682) $(am__append_4689) \
+ $(am__append_4696) $(am__append_4703) $(am__append_4710) \
+ $(am__append_4717) $(am__append_4724) $(am__append_4731) \
+ $(am__append_4738) $(am__append_4745) $(am__append_4752) \
+ $(am__append_4759) $(am__append_4766) $(am__append_4773) \
+ $(am__append_4780) $(am__append_4787) $(am__append_4794) \
+ $(am__append_4801) $(am__append_4808) $(am__append_4815) \
+ $(am__append_4822) $(am__append_4829) $(am__append_4836) \
+ $(am__append_4843) $(am__append_4850) $(am__append_4857) \
+ $(am__append_4864) $(am__append_4871) $(am__append_4878) \
+ $(am__append_4885) $(am__append_4892) $(am__append_4899) \
+ $(am__append_4906) $(am__append_4913) $(am__append_4920) \
+ $(am__append_4927) $(am__append_4934) $(am__append_4941) \
+ $(am__append_4948) $(am__append_4955) $(am__append_4962) \
+ $(am__append_4969) $(am__append_4976) $(am__append_4983) \
+ $(am__append_4990) $(am__append_4997) $(am__append_5004) \
+ $(am__append_5011) $(am__append_5018) $(am__append_5025) \
+ $(am__append_5032) $(am__append_5039) $(am__append_5046) \
+ $(am__append_5053) $(am__append_5060) $(am__append_5067) \
+ $(am__append_5074) $(am__append_5081) $(am__append_5088) \
+ $(am__append_5095) $(am__append_5102) $(am__append_5109) \
+ $(am__append_5116) $(am__append_5123) $(am__append_5130) \
+ $(am__append_5137) $(am__append_5144) $(am__append_5151) \
+ $(am__append_5158) $(am__append_5165) $(am__append_5172) \
+ $(am__append_5179) $(am__append_5186) $(am__append_5193) \
+ $(am__append_5200) $(am__append_5207) $(am__append_5214) \
+ $(am__append_5221) $(am__append_5228) $(am__append_5235) \
+ $(am__append_5242) $(am__append_5249) $(am__append_5256) \
+ $(am__append_5263) $(am__append_5270) $(am__append_5277) \
+ $(am__append_5284) $(am__append_5291) $(am__append_5298) \
+ $(am__append_5305) $(am__append_5312) $(am__append_5319) \
+ $(am__append_5326) $(am__append_5333) $(am__append_5340) \
+ $(am__append_5347) $(am__append_5354) $(am__append_5361) \
+ $(am__append_5368) $(am__append_5375) $(am__append_5382) \
+ $(am__append_5389) $(am__append_5396) $(am__append_5403) \
+ $(am__append_5410) $(am__append_5417) $(am__append_5424) \
+ $(am__append_5431) $(am__append_5438) $(am__append_5445) \
+ $(am__append_5452) $(am__append_5459) $(am__append_5466) \
+ $(am__append_5473) $(am__append_5480) $(am__append_5487) \
+ $(am__append_5494) $(am__append_5501) $(am__append_5508) \
+ $(am__append_5515) $(am__append_5522) $(am__append_5529) \
+ $(am__append_5536) $(am__append_5543) $(am__append_5550) \
+ $(am__append_5557) $(am__append_5564) $(am__append_5571) \
+ $(am__append_5578) $(am__append_5585) $(am__append_5592) \
+ $(am__append_5599) $(am__append_5606) $(am__append_5613) \
+ $(am__append_5620) $(am__append_5627) $(am__append_5634) \
+ $(am__append_5641) $(am__append_5648) $(am__append_5655) \
+ $(am__append_5662) $(am__append_5669) $(am__append_5676) \
+ $(am__append_5683) $(am__append_5690) $(am__append_5697) \
+ $(am__append_5704) $(am__append_5711) $(am__append_5718) \
+ $(am__append_5725) $(am__append_5732) $(am__append_5739) \
+ $(am__append_5746) $(am__append_5753) $(am__append_5760) \
+ $(am__append_5767) $(am__append_5774) $(am__append_5781) \
+ $(am__append_5788) $(am__append_5795) $(am__append_5802) \
+ $(am__append_5809) $(am__append_5816) $(am__append_5823) \
+ $(am__append_5830) $(am__append_5837) $(am__append_5844) \
+ $(am__append_5851) $(am__append_5858) $(am__append_5865) \
+ $(am__append_5872) $(am__append_5879) $(am__append_5886) \
+ $(am__append_5893) $(am__append_5900) $(am__append_5907) \
+ $(am__append_5914) $(am__append_5921) $(am__append_5928) \
+ $(am__append_5935) $(am__append_5942) $(am__append_5949) \
+ $(am__append_5956) $(am__append_5963) $(am__append_5970) \
+ $(am__append_5977) $(am__append_5984) $(am__append_5991) \
+ $(am__append_5998) $(am__append_6005) $(am__append_6012) \
+ $(am__append_6019) $(am__append_6026) $(am__append_6033) \
+ $(am__append_6040) $(am__append_6047) $(am__append_6054) \
+ $(am__append_6061) $(am__append_6068) $(am__append_6075) \
+ $(am__append_6082) $(am__append_6089) $(am__append_6096) \
+ $(am__append_6103) $(am__append_6110) $(am__append_6117) \
+ $(am__append_6124) $(am__append_6131) $(am__append_6138) \
+ $(am__append_6145) $(am__append_6152) $(am__append_6159) \
+ $(am__append_6166) $(am__append_6173) $(am__append_6180) \
+ $(am__append_6187) $(am__append_6194) $(am__append_6201) \
+ $(am__append_6208) $(am__append_6215) $(am__append_6222) \
+ $(am__append_6229) $(am__append_6236) $(am__append_6243) \
+ $(am__append_6250) $(am__append_6257) $(am__append_6264) \
+ $(am__append_6271) $(am__append_6278) $(am__append_6285) \
+ $(am__append_6292) $(am__append_6299) $(am__append_6306) \
+ $(am__append_6313) $(am__append_6320) $(am__append_6327) \
+ $(am__append_6334) $(am__append_6341) $(am__append_6348) \
+ $(am__append_6355) $(am__append_6362) $(am__append_6369) \
+ $(am__append_6376) $(am__append_6383) $(am__append_6390) \
+ $(am__append_6397) $(am__append_6404) $(am__append_6411) \
+ $(am__append_6418) $(am__append_6425) $(am__append_6432) \
+ $(am__append_6439) $(am__append_6446) $(am__append_6453) \
+ $(am__append_6460) $(am__append_6467) $(am__append_6474) \
+ $(am__append_6481) $(am__append_6488) $(am__append_6495) \
+ $(am__append_6502) $(am__append_6509) $(am__append_6516) \
+ $(am__append_6523) $(am__append_6530) $(am__append_6537) \
+ $(am__append_6544) $(am__append_6551) $(am__append_6558) \
+ $(am__append_6565) $(am__append_6572) $(am__append_6579) \
+ $(am__append_6586) $(am__append_6593) $(am__append_6600) \
+ $(am__append_6607) $(am__append_6614) $(am__append_6621) \
+ $(am__append_6628) $(am__append_6635) $(am__append_6642) \
+ $(am__append_6649) $(am__append_6656) $(am__append_6663) \
+ $(am__append_6670) $(am__append_6677) $(am__append_6684) \
+ $(am__append_6691) $(am__append_6698) $(am__append_6705) \
+ $(am__append_6712) $(am__append_6719) $(am__append_6726) \
+ $(am__append_6733) $(am__append_6740) $(am__append_6747) \
+ $(am__append_6754) $(am__append_6761) $(am__append_6768) \
+ $(am__append_6775) $(am__append_6782) $(am__append_6789) \
+ $(am__append_6796) $(am__append_6803) $(am__append_6810) \
+ $(am__append_6817) $(am__append_6824) $(am__append_6831) \
+ $(am__append_6838) $(am__append_6845) $(am__append_6852) \
+ $(am__append_6859) $(am__append_6866) $(am__append_6873) \
+ $(am__append_6880) $(am__append_6887) $(am__append_6894) \
+ $(am__append_6901) $(am__append_6908) $(am__append_6915) \
+ $(am__append_6922) $(am__append_6929) $(am__append_6936) \
+ $(am__append_6943) $(am__append_6950) $(am__append_6957) \
+ $(am__append_6964) $(am__append_6971) $(am__append_6978) \
+ $(am__append_6985) $(am__append_6992) $(am__append_6999) \
+ $(am__append_7006) $(am__append_7013) $(am__append_7020) \
+ $(am__append_7027) $(am__append_7034) $(am__append_7041) \
+ $(am__append_7048) $(am__append_7055) $(am__append_7062) \
+ $(am__append_7069) $(am__append_7076) $(am__append_7083) \
+ $(am__append_7090) $(am__append_7097) $(am__append_7104) \
+ $(am__append_7111) $(am__append_7118) $(am__append_7125) \
+ $(am__append_7132) $(am__append_7139) $(am__append_7146) \
+ $(am__append_7153) $(am__append_7160) $(am__append_7167) \
+ $(am__append_7174) $(am__append_7181) $(am__append_7188) \
+ $(am__append_7195) $(am__append_7202) $(am__append_7209) \
+ $(am__append_7216) $(am__append_7223) $(am__append_7230) \
+ $(am__append_7237) $(am__append_7244) $(am__append_7251) \
+ $(am__append_7258) $(am__append_7265) $(am__append_7272) \
+ $(am__append_7279) $(am__append_7286) $(am__append_7293) \
+ $(am__append_7300) $(am__append_7307) $(am__append_7314) \
+ $(am__append_7321) $(am__append_7328) $(am__append_7335) \
+ $(am__append_7342) $(am__append_7349) $(am__append_7356) \
+ $(am__append_7363) $(am__append_7370) $(am__append_7377) \
+ $(am__append_7384) $(am__append_7391) $(am__append_7398) \
+ $(am__append_7405) $(am__append_7412) $(am__append_7419) \
+ $(am__append_7426) $(am__append_7433) $(am__append_7440) \
+ $(am__append_7447) $(am__append_7454) $(am__append_7461) \
+ $(am__append_7468) $(am__append_7475) $(am__append_7482) \
+ $(am__append_7489) $(am__append_7496) $(am__append_7503) \
+ $(am__append_7510) $(am__append_7517) $(am__append_7524) \
+ $(am__append_7531) $(am__append_7538) $(am__append_7545) \
+ $(am__append_7552) $(am__append_7559) $(am__append_7566) \
+ $(am__append_7573) $(am__append_7580) $(am__append_7587) \
+ $(am__append_7594) $(am__append_7601) $(am__append_7608) \
+ $(am__append_7615) $(am__append_7622) $(am__append_7629) \
+ $(am__append_7636) $(am__append_7643) $(am__append_7650) \
+ $(am__append_7657) $(am__append_7664) $(am__append_7671) \
+ $(am__append_7678) $(am__append_7685) $(am__append_7692) \
+ $(am__append_7699) $(am__append_7706) $(am__append_7713) \
+ $(am__append_7720) $(am__append_7727) $(am__append_7734) \
+ $(am__append_7741) $(am__append_7748) $(am__append_7755) \
+ $(am__append_7762) $(am__append_7769) $(am__append_7776) \
+ $(am__append_7783) $(am__append_7790) $(am__append_7797) \
+ $(am__append_7804) $(am__append_7811) $(am__append_7818) \
+ $(am__append_7825) $(am__append_7832) $(am__append_7839) \
+ $(am__append_7846) $(am__append_7853) $(am__append_7860) \
+ $(am__append_7867) $(am__append_7874) $(am__append_7881) \
+ $(am__append_7888) $(am__append_7895) $(am__append_7902) \
+ $(am__append_7909) $(am__append_7916) $(am__append_7923) \
+ $(am__append_7930) $(am__append_7937) $(am__append_7944) \
+ $(am__append_7951) $(am__append_7958) $(am__append_7965) \
+ $(am__append_7972) $(am__append_7979) $(am__append_7986) \
+ $(am__append_7993) $(am__append_8000) $(am__append_8007) \
+ $(am__append_8014) $(am__append_8021) $(am__append_8028) \
+ $(am__append_8035) $(am__append_8042) $(am__append_8049) \
+ $(am__append_8056) $(am__append_8063) $(am__append_8070) \
+ $(am__append_8077) $(am__append_8084) $(am__append_8091) \
+ $(am__append_8098) $(am__append_8105) $(am__append_8112) \
+ $(am__append_8119) $(am__append_8126) $(am__append_8133) \
+ $(am__append_8140) $(am__append_8147) $(am__append_8154) \
+ $(am__append_8161) $(am__append_8168) $(am__append_8175) \
+ $(am__append_8182) $(am__append_8189) $(am__append_8196) \
+ $(am__append_8203) $(am__append_8210) $(am__append_8217) \
+ $(am__append_8224) $(am__append_8231) $(am__append_8238) \
+ $(am__append_8245) $(am__append_8252) $(am__append_8259) \
+ $(am__append_8266) $(am__append_8273) $(am__append_8280) \
+ $(am__append_8287) $(am__append_8294) $(am__append_8301) \
+ $(am__append_8308) $(am__append_8315) $(am__append_8322) \
+ $(am__append_8329) $(am__append_8336) $(am__append_8343) \
+ $(am__append_8350) $(am__append_8357) $(am__append_8364) \
+ $(am__append_8371) $(am__append_8378) $(am__append_8385) \
+ $(am__append_8392) $(am__append_8399) $(am__append_8406) \
+ $(am__append_8413) $(am__append_8420) $(am__append_8427) \
+ $(am__append_8434) $(am__append_8441) $(am__append_8448) \
+ $(am__append_8455) $(am__append_8462) $(am__append_8469) \
+ $(am__append_8476) $(am__append_8483) $(am__append_8490) \
+ $(am__append_8497) $(am__append_8504) $(am__append_8511) \
+ $(am__append_8518) $(am__append_8525) $(am__append_8532) \
+ $(am__append_8539) $(am__append_8546) $(am__append_8553) \
+ $(am__append_8560) $(am__append_8567) $(am__append_8574) \
+ $(am__append_8581) $(am__append_8588) $(am__append_8595) \
+ $(am__append_8602) $(am__append_8609) $(am__append_8616) \
+ $(am__append_8623) $(am__append_8630) $(am__append_8637) \
+ $(am__append_8644) $(am__append_8651) $(am__append_8658) \
+ $(am__append_8665) $(am__append_8672) $(am__append_8679) \
+ $(am__append_8686) $(am__append_8693) $(am__append_8700) \
+ $(am__append_8707) $(am__append_8714) $(am__append_8721) \
+ $(am__append_8728) $(am__append_8735) $(am__append_8742) \
+ $(am__append_8749) $(am__append_8756) $(am__append_8763) \
+ $(am__append_8770) $(am__append_8777) $(am__append_8784) \
+ $(am__append_8791) $(am__append_8798) $(am__append_8805) \
+ $(am__append_8812) $(am__append_8819) $(am__append_8826) \
+ $(am__append_8833) $(am__append_8840) $(am__append_8847) \
+ $(am__append_8854) $(am__append_8861) $(am__append_8868) \
+ $(am__append_8875) $(am__append_8882) $(am__append_8889) \
+ $(am__append_8896) $(am__append_8903) $(am__append_8910) \
+ $(am__append_8917) $(am__append_8924) $(am__append_8931) \
+ $(am__append_8938) $(am__append_8945) $(am__append_8952) \
+ $(am__append_8959) $(am__append_8966) $(am__append_8973) \
+ $(am__append_8980) $(am__append_8987) $(am__append_8994) \
+ $(am__append_9001) $(am__append_9008) $(am__append_9015) \
+ $(am__append_9022) $(am__append_9029) $(am__append_9036) \
+ $(am__append_9043) $(am__append_9050) $(am__append_9057) \
+ $(am__append_9064) $(am__append_9071) $(am__append_9078) \
+ $(am__append_9085) $(am__append_9092) $(am__append_9099) \
+ $(am__append_9106) $(am__append_9113) $(am__append_9120) \
+ $(am__append_9127) $(am__append_9134) $(am__append_9141) \
+ $(am__append_9148) $(am__append_9155) $(am__append_9162) \
+ $(am__append_9169) $(am__append_9176) $(am__append_9183) \
+ $(am__append_9190) $(am__append_9197) $(am__append_9204) \
+ $(am__append_9211) $(am__append_9218) $(am__append_9225) \
+ $(am__append_9232) $(am__append_9239) $(am__append_9246) \
+ $(am__append_9253) $(am__append_9260) $(am__append_9267) \
+ $(am__append_9274) $(am__append_9281) $(am__append_9288) \
+ $(am__append_9295) $(am__append_9302) $(am__append_9309) \
+ $(am__append_9316) $(am__append_9323) $(am__append_9330) \
+ $(am__append_9337) $(am__append_9344) $(am__append_9351) \
+ $(am__append_9358) $(am__append_9365) $(am__append_9372) \
+ $(am__append_9379) $(am__append_9386) $(am__append_9393) \
+ $(am__append_9400) $(am__append_9407) $(am__append_9414) \
+ $(am__append_9421) $(am__append_9428) $(am__append_9435) \
+ $(am__append_9442) $(am__append_9449) $(am__append_9456) \
+ $(am__append_9463) $(am__append_9470) $(am__append_9477) \
+ $(am__append_9484) $(am__append_9491) $(am__append_9498) \
+ $(am__append_9505) $(am__append_9512) $(am__append_9519) \
+ $(am__append_9526) $(am__append_9533) $(am__append_9540) \
+ $(am__append_9547) $(am__append_9554) $(am__append_9561) \
+ $(am__append_9568) $(am__append_9575) $(am__append_9582) \
+ $(am__append_9589) $(am__append_9596) $(am__append_9603) \
+ $(am__append_9610) $(am__append_9617) $(am__append_9624) \
+ $(am__append_9631) $(am__append_9638) $(am__append_9645) \
+ $(am__append_9652) $(am__append_9659) $(am__append_9666) \
+ $(am__append_9673) $(am__append_9680) $(am__append_9687) \
+ $(am__append_9694) $(am__append_9701) $(am__append_9708) \
+ $(am__append_9715) $(am__append_9722) $(am__append_9729) \
+ $(am__append_9736) $(am__append_9743) $(am__append_9750) \
+ $(am__append_9757) $(am__append_9764) $(am__append_9771) \
+ $(am__append_9778) $(am__append_9785) $(am__append_9792) \
+ $(am__append_9799) $(am__append_9806) $(am__append_9813) \
+ $(am__append_9820) $(am__append_9827) $(am__append_9834) \
+ $(am__append_9841) $(am__append_9848) $(am__append_9855) \
+ $(am__append_9862) $(am__append_9869) $(am__append_9876) \
+ $(am__append_9883) $(am__append_9890) $(am__append_9897) \
+ $(am__append_9904) $(am__append_9911) $(am__append_9918) \
+ $(am__append_9925) $(am__append_9932) $(am__append_9939) \
+ $(am__append_9946) $(am__append_9953) $(am__append_9960) \
+ $(am__append_9967) $(am__append_9974) $(am__append_9981) \
+ $(am__append_9988) $(am__append_9995) $(am__append_10002) \
+ $(am__append_10009) $(am__append_10016) $(am__append_10023) \
+ $(am__append_10030) $(am__append_10037) $(am__append_10044) \
+ $(am__append_10051) $(am__append_10058) $(am__append_10065) \
+ $(am__append_10072) $(am__append_10079) $(am__append_10086) \
+ $(am__append_10093) $(am__append_10100) $(am__append_10107) \
+ $(am__append_10114) $(am__append_10121) $(am__append_10128) \
+ $(am__append_10135) $(am__append_10142) $(am__append_10149) \
+ $(am__append_10156) $(am__append_10163) $(am__append_10170) \
+ $(am__append_10177) $(am__append_10184) $(am__append_10191) \
+ $(am__append_10198) $(am__append_10205) $(am__append_10212) \
+ $(am__append_10219) $(am__append_10226) $(am__append_10233) \
+ $(am__append_10240) $(am__append_10247) $(am__append_10254) \
+ $(am__append_10261) $(am__append_10268) $(am__append_10275) \
+ $(am__append_10282) $(am__append_10289) $(am__append_10296) \
+ $(am__append_10303) $(am__append_10310) $(am__append_10317) \
+ $(am__append_10324) $(am__append_10331) $(am__append_10338) \
+ $(am__append_10345) $(am__append_10352) $(am__append_10359) \
+ $(am__append_10366) $(am__append_10373) $(am__append_10380) \
+ $(am__append_10387) $(am__append_10394) $(am__append_10401) \
+ $(am__append_10408) $(am__append_10415) $(am__append_10422) \
+ $(am__append_10429) $(am__append_10436) $(am__append_10443) \
+ $(am__append_10450) $(am__append_10457) $(am__append_10464) \
+ $(am__append_10471) $(am__append_10478) $(am__append_10485) \
+ $(am__append_10492) $(am__append_10499) $(am__append_10506) \
+ $(am__append_10513) $(am__append_10520) $(am__append_10527) \
+ $(am__append_10534) $(am__append_10541) $(am__append_10548) \
+ $(am__append_10555) $(am__append_10562) $(am__append_10569) \
+ $(am__append_10576) $(am__append_10583) $(am__append_10590) \
+ $(am__append_10597) $(am__append_10604) $(am__append_10611) \
+ $(am__append_10618) $(am__append_10625) $(am__append_10632) \
+ $(am__append_10639) $(am__append_10646) $(am__append_10653) \
+ $(am__append_10660) $(am__append_10667) $(am__append_10674) \
+ $(am__append_10681) $(am__append_10688) $(am__append_10695) \
+ $(am__append_10702) $(am__append_10709) $(am__append_10716) \
+ $(am__append_10723) $(am__append_10730) $(am__append_10737) \
+ $(am__append_10744) $(am__append_10751) $(am__append_10758) \
+ $(am__append_10765) $(am__append_10772) $(am__append_10779) \
+ $(am__append_10786) $(am__append_10793) $(am__append_10800) \
+ $(am__append_10807) $(am__append_10814) $(am__append_10821) \
+ $(am__append_10828) $(am__append_10835) $(am__append_10842) \
+ $(am__append_10849) $(am__append_10856) $(am__append_10863) \
+ $(am__append_10870) $(am__append_10877) $(am__append_10884) \
+ $(am__append_10891) $(am__append_10898) $(am__append_10905) \
+ $(am__append_10912) $(am__append_10919) $(am__append_10926) \
+ $(am__append_10933) $(am__append_10940) $(am__append_10947) \
+ $(am__append_10954) $(am__append_10961) $(am__append_10968) \
+ $(am__append_10975) $(am__append_10982) $(am__append_10989) \
+ $(am__append_10996) $(am__append_11003) $(am__append_11010) \
+ $(am__append_11017) $(am__append_11024) $(am__append_11031) \
+ $(am__append_11038) $(am__append_11045) $(am__append_11052) \
+ $(am__append_11059) $(am__append_11066) $(am__append_11073) \
+ $(am__append_11080) $(am__append_11087) $(am__append_11094) \
+ $(am__append_11101) $(am__append_11108) $(am__append_11115) \
+ $(am__append_11122) $(am__append_11129) $(am__append_11136) \
+ $(am__append_11143) $(am__append_11150) $(am__append_11157) \
+ $(am__append_11164) $(am__append_11171) $(am__append_11178) \
+ $(am__append_11185) $(am__append_11192) $(am__append_11199) \
+ $(am__append_11206) $(am__append_11213) $(am__append_11220) \
+ $(am__append_11227) $(am__append_11234) $(am__append_11241) \
+ $(am__append_11248) $(am__append_11255) $(am__append_11262) \
+ $(am__append_11269) $(am__append_11276) $(am__append_11283) \
+ $(am__append_11290) $(am__append_11297) $(am__append_11304) \
+ $(am__append_11311) $(am__append_11318) $(am__append_11325) \
+ $(am__append_11332) $(am__append_11339) $(am__append_11346) \
+ $(am__append_11353) $(am__append_11360) $(am__append_11367) \
+ $(am__append_11374) $(am__append_11381) $(am__append_11388) \
+ $(am__append_11395) $(am__append_11402) $(am__append_11409) \
+ $(am__append_11416) $(am__append_11423) $(am__append_11430) \
+ $(am__append_11437) $(am__append_11444) $(am__append_11451) \
+ $(am__append_11458) $(am__append_11465) $(am__append_11472) \
+ $(am__append_11479) $(am__append_11486) $(am__append_11493) \
+ $(am__append_11500) $(am__append_11507) $(am__append_11514) \
+ $(am__append_11521) $(am__append_11528) $(am__append_11535) \
+ $(am__append_11542) $(am__append_11549) $(am__append_11556) \
+ $(am__append_11563) $(am__append_11570) $(am__append_11577) \
+ $(am__append_11584) $(am__append_11591) $(am__append_11598) \
+ $(am__append_11605) $(am__append_11612) $(am__append_11619) \
+ $(am__append_11626) $(am__append_11633) $(am__append_11640) \
+ $(am__append_11647) $(am__append_11654) $(am__append_11661) \
+ $(am__append_11668) $(am__append_11675) $(am__append_11682) \
+ $(am__append_11689) $(am__append_11696) $(am__append_11703) \
+ $(am__append_11710) $(am__append_11717) $(am__append_11724) \
+ $(am__append_11731) $(am__append_11738) $(am__append_11745) \
+ $(am__append_11752) $(am__append_11759) $(am__append_11766) \
+ $(am__append_11773) $(am__append_11780) $(am__append_11787) \
+ $(am__append_11794) $(am__append_11801) $(am__append_11808) \
+ $(am__append_11815) $(am__append_11822) $(am__append_11829) \
+ $(am__append_11836) $(am__append_11843) $(am__append_11850) \
+ $(am__append_11857) $(am__append_11864) $(am__append_11871) \
+ $(am__append_11878) $(am__append_11885) $(am__append_11892) \
+ $(am__append_11899) $(am__append_11906) $(am__append_11913) \
+ $(am__append_11920) $(am__append_11927) $(am__append_11934) \
+ $(am__append_11941) $(am__append_11948) $(am__append_11955) \
+ $(am__append_11962) $(am__append_11969) $(am__append_11976) \
+ $(am__append_11983) $(am__append_11990) $(am__append_11997) \
+ $(am__append_12004) $(am__append_12011) $(am__append_12018) \
+ $(am__append_12025) $(am__append_12032) $(am__append_12039) \
+ $(am__append_12046) $(am__append_12053) $(am__append_12060) \
+ $(am__append_12067) $(am__append_12074) $(am__append_12081) \
+ $(am__append_12088) $(am__append_12095) $(am__append_12102) \
+ $(am__append_12109) $(am__append_12116) $(am__append_12123) \
+ $(am__append_12130) $(am__append_12136) $(am__append_12141) \
+ $(am__append_12146) $(am__append_12151) $(am__append_12156) \
+ $(am__append_12161) $(am__append_12166) $(am__append_12171) \
+ $(am__append_12176) $(am__append_12181) $(am__append_12186) \
+ $(am__append_12191) $(am__append_12196) $(am__append_12201) \
+ $(am__append_12206) $(am__append_12211) $(am__append_12216) \
+ $(am__append_12221) $(am__append_12231) $(am__append_12240) \
+ $(am__append_12249) $(am__append_12258) $(am__append_12267) \
+ $(am__append_12276) $(am__append_12285) $(am__append_12294) \
+ $(am__append_12303) $(am__append_12312) $(am__append_12321) \
+ $(am__append_12327) symlist.h symlist.c
+AM_CFLAGS = $(TARGET_CFLAGS)
+AM_LDFLAGS = $(TARGET_LDFLAGS)
+AM_CPPFLAGS = $(TARGET_CPPFLAGS) $(CPPFLAGS_DEFAULT)
+AM_CCASFLAGS = $(TARGET_CCASFLAGS) $(CCASFLAGS_DEFAULT)
+@COND_emu_TRUE@trig_module_SOURCES = ## platform sources
+@COND_i386_coreboot_TRUE@trig_module_SOURCES = ## platform sources
+@COND_i386_efi_TRUE@trig_module_SOURCES = ## platform sources
+@COND_i386_ieee1275_TRUE@trig_module_SOURCES = ## platform sources
+@COND_i386_multiboot_TRUE@trig_module_SOURCES = ## platform sources
+@COND_i386_pc_TRUE@trig_module_SOURCES = ## platform sources
+@COND_i386_qemu_TRUE@trig_module_SOURCES = ## platform sources
+@COND_mips_yeeloong_TRUE@trig_module_SOURCES = ## platform sources
+@COND_powerpc_ieee1275_TRUE@trig_module_SOURCES = ## platform sources
+@COND_sparc64_ieee1275_TRUE@trig_module_SOURCES = ## platform sources
+@COND_x86_64_efi_TRUE@trig_module_SOURCES = ## platform sources
+@COND_emu_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_trig_module_SOURCES = trigtables.c ## platform nodist sources
+@COND_emu_TRUE@trig_module_LDADD =
+@COND_i386_coreboot_TRUE@trig_module_LDADD =
+@COND_i386_efi_TRUE@trig_module_LDADD =
+@COND_i386_ieee1275_TRUE@trig_module_LDADD =
+@COND_i386_multiboot_TRUE@trig_module_LDADD =
+@COND_i386_pc_TRUE@trig_module_LDADD =
+@COND_i386_qemu_TRUE@trig_module_LDADD =
+@COND_mips_yeeloong_TRUE@trig_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@trig_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@trig_module_LDADD =
+@COND_x86_64_efi_TRUE@trig_module_LDADD =
+@COND_emu_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@trig_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@trig_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@trig_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@trig_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+@COND_i386_efi_TRUE@cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+@COND_i386_ieee1275_TRUE@cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+@COND_i386_multiboot_TRUE@cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+@COND_i386_pc_TRUE@cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+@COND_i386_qemu_TRUE@cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+@COND_x86_64_efi_TRUE@cs5536_module_SOURCES = bus/cs5536.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_cs5536_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_cs5536_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_cs5536_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_cs5536_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_cs5536_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_cs5536_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_cs5536_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@cs5536_module_LDADD =
+@COND_i386_efi_TRUE@cs5536_module_LDADD =
+@COND_i386_ieee1275_TRUE@cs5536_module_LDADD =
+@COND_i386_multiboot_TRUE@cs5536_module_LDADD =
+@COND_i386_pc_TRUE@cs5536_module_LDADD =
+@COND_i386_qemu_TRUE@cs5536_module_LDADD =
+@COND_x86_64_efi_TRUE@cs5536_module_LDADD =
+@COND_i386_coreboot_TRUE@cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cs5536_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cs5536_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cs5536_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cs5536_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@libusb_module_SOURCES = bus/usb/emu/usb.c ## platform sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@nodist_libusb_module_SOURCES = ## platform nodist sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@libusb_module_LDADD =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@libusb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@libusb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@libusb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@libusb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsspd_module_SOURCES = commands/mips/yeeloong/lsspd.c ## platform sources
+@COND_mips_yeeloong_TRUE@nodist_lsspd_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@lsspd_module_LDADD =
+@COND_mips_yeeloong_TRUE@lsspd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsspd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsspd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsspd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usb_module_SOURCES = bus/usb/usb.c ## platform sources
+@COND_i386_coreboot_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_i386_efi_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_i386_ieee1275_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_i386_multiboot_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_i386_pc_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_i386_qemu_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_mips_yeeloong_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_x86_64_efi_TRUE@usb_module_SOURCES = bus/usb/usbtrans.c bus/usb/usbhub.c bus/usb/usb.c ## platform sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_usb_module_SOURCES = ## platform nodist sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usb_module_LDADD =
+@COND_i386_coreboot_TRUE@usb_module_LDADD =
+@COND_i386_efi_TRUE@usb_module_LDADD =
+@COND_i386_ieee1275_TRUE@usb_module_LDADD =
+@COND_i386_multiboot_TRUE@usb_module_LDADD =
+@COND_i386_pc_TRUE@usb_module_LDADD =
+@COND_i386_qemu_TRUE@usb_module_LDADD =
+@COND_mips_yeeloong_TRUE@usb_module_LDADD =
+@COND_x86_64_efi_TRUE@usb_module_LDADD =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_i386_efi_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_i386_ieee1275_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_i386_multiboot_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_i386_pc_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_i386_qemu_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_mips_yeeloong_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_x86_64_efi_TRUE@usbserial_common_module_SOURCES = bus/usb/serial/common.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_usbserial_common_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@usbserial_common_module_LDADD =
+@COND_i386_efi_TRUE@usbserial_common_module_LDADD =
+@COND_i386_ieee1275_TRUE@usbserial_common_module_LDADD =
+@COND_i386_multiboot_TRUE@usbserial_common_module_LDADD =
+@COND_i386_pc_TRUE@usbserial_common_module_LDADD =
+@COND_i386_qemu_TRUE@usbserial_common_module_LDADD =
+@COND_mips_yeeloong_TRUE@usbserial_common_module_LDADD =
+@COND_x86_64_efi_TRUE@usbserial_common_module_LDADD =
+@COND_i386_coreboot_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_common_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_common_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_common_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_common_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_i386_efi_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_i386_ieee1275_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_i386_multiboot_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_i386_pc_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_i386_qemu_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_mips_yeeloong_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_x86_64_efi_TRUE@usbserial_pl2303_module_SOURCES = bus/usb/serial/pl2303.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_usbserial_pl2303_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@usbserial_pl2303_module_LDADD =
+@COND_i386_efi_TRUE@usbserial_pl2303_module_LDADD =
+@COND_i386_ieee1275_TRUE@usbserial_pl2303_module_LDADD =
+@COND_i386_multiboot_TRUE@usbserial_pl2303_module_LDADD =
+@COND_i386_pc_TRUE@usbserial_pl2303_module_LDADD =
+@COND_i386_qemu_TRUE@usbserial_pl2303_module_LDADD =
+@COND_mips_yeeloong_TRUE@usbserial_pl2303_module_LDADD =
+@COND_x86_64_efi_TRUE@usbserial_pl2303_module_LDADD =
+@COND_i386_coreboot_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_pl2303_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_pl2303_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_pl2303_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_pl2303_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_i386_efi_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_i386_ieee1275_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_i386_multiboot_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_i386_pc_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_i386_qemu_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_mips_yeeloong_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_x86_64_efi_TRUE@usbserial_ftdi_module_SOURCES = bus/usb/serial/ftdi.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_usbserial_ftdi_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@usbserial_ftdi_module_LDADD =
+@COND_i386_efi_TRUE@usbserial_ftdi_module_LDADD =
+@COND_i386_ieee1275_TRUE@usbserial_ftdi_module_LDADD =
+@COND_i386_multiboot_TRUE@usbserial_ftdi_module_LDADD =
+@COND_i386_pc_TRUE@usbserial_ftdi_module_LDADD =
+@COND_i386_qemu_TRUE@usbserial_ftdi_module_LDADD =
+@COND_mips_yeeloong_TRUE@usbserial_ftdi_module_LDADD =
+@COND_x86_64_efi_TRUE@usbserial_ftdi_module_LDADD =
+@COND_i386_coreboot_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_ftdi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_ftdi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_ftdi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbserial_ftdi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+@COND_i386_efi_TRUE@uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+@COND_i386_ieee1275_TRUE@uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+@COND_i386_multiboot_TRUE@uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+@COND_i386_pc_TRUE@uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+@COND_i386_qemu_TRUE@uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+@COND_x86_64_efi_TRUE@uhci_module_SOURCES = bus/usb/uhci.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_uhci_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_uhci_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_uhci_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_uhci_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_uhci_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_uhci_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_uhci_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@uhci_module_LDADD =
+@COND_i386_efi_TRUE@uhci_module_LDADD =
+@COND_i386_ieee1275_TRUE@uhci_module_LDADD =
+@COND_i386_multiboot_TRUE@uhci_module_LDADD =
+@COND_i386_pc_TRUE@uhci_module_LDADD =
+@COND_i386_qemu_TRUE@uhci_module_LDADD =
+@COND_x86_64_efi_TRUE@uhci_module_LDADD =
+@COND_i386_coreboot_TRUE@uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@uhci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@uhci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@uhci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@uhci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_i386_efi_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_i386_ieee1275_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_i386_multiboot_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_i386_pc_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_i386_qemu_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_mips_yeeloong_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_x86_64_efi_TRUE@ohci_module_SOURCES = bus/usb/ohci.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ohci_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@ohci_module_LDADD =
+@COND_i386_efi_TRUE@ohci_module_LDADD =
+@COND_i386_ieee1275_TRUE@ohci_module_LDADD =
+@COND_i386_multiboot_TRUE@ohci_module_LDADD =
+@COND_i386_pc_TRUE@ohci_module_LDADD =
+@COND_i386_qemu_TRUE@ohci_module_LDADD =
+@COND_mips_yeeloong_TRUE@ohci_module_LDADD =
+@COND_x86_64_efi_TRUE@ohci_module_LDADD =
+@COND_i386_coreboot_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ohci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ohci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ohci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ohci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@pci_module_SOURCES = bus/emu/pci.c commands/lspci.c ## platform sources
+@COND_i386_coreboot_TRUE@pci_module_SOURCES = bus/pci.c ## platform sources
+@COND_i386_efi_TRUE@pci_module_SOURCES = bus/pci.c ## platform sources
+@COND_i386_ieee1275_TRUE@pci_module_SOURCES = bus/pci.c ## platform sources
+@COND_i386_multiboot_TRUE@pci_module_SOURCES = bus/pci.c ## platform sources
+@COND_i386_pc_TRUE@pci_module_SOURCES = bus/pci.c ## platform sources
+@COND_x86_64_efi_TRUE@pci_module_SOURCES = bus/pci.c ## platform sources
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@nodist_pci_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_pci_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_pci_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_pci_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_pci_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_pci_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_pci_module_SOURCES = ## platform nodist sources
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@pci_module_LDADD =
+@COND_i386_coreboot_TRUE@pci_module_LDADD =
+@COND_i386_efi_TRUE@pci_module_LDADD =
+@COND_i386_ieee1275_TRUE@pci_module_LDADD =
+@COND_i386_multiboot_TRUE@pci_module_LDADD =
+@COND_i386_pc_TRUE@pci_module_LDADD =
+@COND_x86_64_efi_TRUE@pci_module_LDADD =
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+@COND_i386_ieee1275_TRUE@cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+@COND_i386_multiboot_TRUE@cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+@COND_i386_pc_TRUE@cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+@COND_i386_qemu_TRUE@cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+@COND_mips_yeeloong_TRUE@cmostest_module_SOURCES = commands/i386/cmostest.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_cmostest_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_cmostest_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_cmostest_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_cmostest_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_cmostest_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_cmostest_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@cmostest_module_LDADD =
+@COND_i386_ieee1275_TRUE@cmostest_module_LDADD =
+@COND_i386_multiboot_TRUE@cmostest_module_LDADD =
+@COND_i386_pc_TRUE@cmostest_module_LDADD =
+@COND_i386_qemu_TRUE@cmostest_module_LDADD =
+@COND_mips_yeeloong_TRUE@cmostest_module_LDADD =
+@COND_i386_coreboot_TRUE@cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmostest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmostest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmostest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmostest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iorw_module_SOURCES = commands/iorw.c ## platform sources
+@COND_i386_efi_TRUE@iorw_module_SOURCES = commands/iorw.c ## platform sources
+@COND_i386_ieee1275_TRUE@iorw_module_SOURCES = commands/iorw.c ## platform sources
+@COND_i386_multiboot_TRUE@iorw_module_SOURCES = commands/iorw.c ## platform sources
+@COND_i386_pc_TRUE@iorw_module_SOURCES = commands/iorw.c ## platform sources
+@COND_i386_qemu_TRUE@iorw_module_SOURCES = commands/iorw.c ## platform sources
+@COND_x86_64_efi_TRUE@iorw_module_SOURCES = commands/iorw.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_iorw_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_iorw_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_iorw_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_iorw_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_iorw_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_iorw_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_iorw_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@iorw_module_LDADD =
+@COND_i386_efi_TRUE@iorw_module_LDADD =
+@COND_i386_ieee1275_TRUE@iorw_module_LDADD =
+@COND_i386_multiboot_TRUE@iorw_module_LDADD =
+@COND_i386_pc_TRUE@iorw_module_LDADD =
+@COND_i386_qemu_TRUE@iorw_module_LDADD =
+@COND_x86_64_efi_TRUE@iorw_module_LDADD =
+@COND_i386_coreboot_TRUE@iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iorw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iorw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iorw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iorw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_i386_coreboot_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_i386_efi_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_i386_ieee1275_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_i386_multiboot_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_i386_pc_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_i386_qemu_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_mips_yeeloong_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_x86_64_efi_TRUE@regexp_module_SOURCES = commands/regexp.c commands/wildcard.c ## platform sources
+@COND_emu_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_regexp_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_i386_coreboot_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_i386_efi_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_i386_ieee1275_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_i386_multiboot_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_i386_pc_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_i386_qemu_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_mips_yeeloong_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_powerpc_ieee1275_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_sparc64_ieee1275_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_x86_64_efi_TRUE@regexp_module_LDADD = libgnulib.a
+@COND_emu_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_coreboot_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_efi_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_ieee1275_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_multiboot_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_pc_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_i386_qemu_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_mips_yeeloong_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_powerpc_ieee1275_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_sparc64_ieee1275_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_x86_64_efi_TRUE@regexp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) $(CFLAGS_GNULIB)
+@COND_emu_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@regexp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_coreboot_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_efi_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_ieee1275_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_multiboot_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_pc_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_i386_qemu_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_mips_yeeloong_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_powerpc_ieee1275_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_sparc64_ieee1275_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_x86_64_efi_TRUE@regexp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)
+@COND_emu_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@regexp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@acpi_module_SOURCES = commands/i386/pc/acpi.c commands/acpi.c ## platform sources
+@COND_i386_efi_TRUE@acpi_module_SOURCES = commands/efi/acpi.c commands/acpi.c ## platform sources
+@COND_i386_multiboot_TRUE@acpi_module_SOURCES = commands/i386/pc/acpi.c commands/acpi.c ## platform sources
+@COND_i386_pc_TRUE@acpi_module_SOURCES = commands/i386/pc/acpi.c commands/acpi.c ## platform sources
+@COND_x86_64_efi_TRUE@acpi_module_SOURCES = commands/efi/acpi.c commands/acpi.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_acpi_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_acpi_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_acpi_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_acpi_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_acpi_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@acpi_module_LDADD =
+@COND_i386_efi_TRUE@acpi_module_LDADD =
+@COND_i386_multiboot_TRUE@acpi_module_LDADD =
+@COND_i386_pc_TRUE@acpi_module_LDADD =
+@COND_x86_64_efi_TRUE@acpi_module_LDADD =
+@COND_i386_coreboot_TRUE@acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@acpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@acpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@acpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@acpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+@COND_i386_efi_TRUE@lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+@COND_i386_multiboot_TRUE@lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+@COND_i386_pc_TRUE@lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+@COND_x86_64_efi_TRUE@lsacpi_module_SOURCES = commands/lsacpi.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_lsacpi_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_lsacpi_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_lsacpi_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_lsacpi_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_lsacpi_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@lsacpi_module_LDADD =
+@COND_i386_efi_TRUE@lsacpi_module_LDADD =
+@COND_i386_multiboot_TRUE@lsacpi_module_LDADD =
+@COND_i386_pc_TRUE@lsacpi_module_LDADD =
+@COND_x86_64_efi_TRUE@lsacpi_module_LDADD =
+@COND_i386_coreboot_TRUE@lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsacpi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsacpi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsacpi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsacpi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefisystab_module_SOURCES = commands/efi/lsefisystab.c ## platform sources
+@COND_x86_64_efi_TRUE@lsefisystab_module_SOURCES = commands/efi/lsefisystab.c ## platform sources
+@COND_i386_efi_TRUE@nodist_lsefisystab_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_lsefisystab_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@lsefisystab_module_LDADD =
+@COND_x86_64_efi_TRUE@lsefisystab_module_LDADD =
+@COND_i386_efi_TRUE@lsefisystab_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefisystab_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefisystab_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefisystab_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefisystab_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefisystab_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefisystab_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefisystab_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@lssal_module_SOURCES = commands/efi/lssal.c ## platform sources
+@COND_x86_64_efi_TRUE@lssal_module_SOURCES = commands/efi/lssal.c ## platform sources
+@COND_i386_efi_TRUE@nodist_lssal_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_lssal_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@lssal_module_LDADD =
+@COND_x86_64_efi_TRUE@lssal_module_LDADD =
+@COND_i386_efi_TRUE@lssal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lssal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@lssal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lssal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@lssal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lssal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@lssal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lssal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefimmap_module_SOURCES = commands/efi/lsefimmap.c ## platform sources
+@COND_x86_64_efi_TRUE@lsefimmap_module_SOURCES = commands/efi/lsefimmap.c ## platform sources
+@COND_i386_efi_TRUE@nodist_lsefimmap_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_lsefimmap_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@lsefimmap_module_LDADD =
+@COND_x86_64_efi_TRUE@lsefimmap_module_LDADD =
+@COND_i386_efi_TRUE@lsefimmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefimmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefimmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefimmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefimmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefimmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsefimmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsefimmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_i386_coreboot_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_i386_efi_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_i386_ieee1275_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_i386_multiboot_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_i386_pc_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_i386_qemu_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_mips_yeeloong_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_x86_64_efi_TRUE@blocklist_module_SOURCES = commands/blocklist.c ## platform sources
+@COND_emu_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_blocklist_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@blocklist_module_LDADD =
+@COND_i386_coreboot_TRUE@blocklist_module_LDADD =
+@COND_i386_efi_TRUE@blocklist_module_LDADD =
+@COND_i386_ieee1275_TRUE@blocklist_module_LDADD =
+@COND_i386_multiboot_TRUE@blocklist_module_LDADD =
+@COND_i386_pc_TRUE@blocklist_module_LDADD =
+@COND_i386_qemu_TRUE@blocklist_module_LDADD =
+@COND_mips_yeeloong_TRUE@blocklist_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@blocklist_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@blocklist_module_LDADD =
+@COND_x86_64_efi_TRUE@blocklist_module_LDADD =
+@COND_emu_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@blocklist_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@blocklist_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@blocklist_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@blocklist_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_i386_coreboot_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_i386_efi_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_i386_ieee1275_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_i386_multiboot_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_i386_pc_TRUE@boot_module_SOURCES = lib/i386/pc/biosnum.c commands/boot.c ## platform sources
+@COND_i386_qemu_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_x86_64_efi_TRUE@boot_module_SOURCES = commands/boot.c ## platform sources
+@COND_emu_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_boot_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@boot_module_LDADD =
+@COND_i386_coreboot_TRUE@boot_module_LDADD =
+@COND_i386_efi_TRUE@boot_module_LDADD =
+@COND_i386_ieee1275_TRUE@boot_module_LDADD =
+@COND_i386_multiboot_TRUE@boot_module_LDADD =
+@COND_i386_pc_TRUE@boot_module_LDADD =
+@COND_i386_qemu_TRUE@boot_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@boot_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@boot_module_LDADD =
+@COND_x86_64_efi_TRUE@boot_module_LDADD =
+@COND_emu_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@boot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@boot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@boot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@boot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_i386_coreboot_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_i386_efi_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_i386_ieee1275_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_i386_multiboot_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_i386_pc_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_i386_qemu_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_mips_yeeloong_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_x86_64_efi_TRUE@cat_module_SOURCES = commands/cat.c ## platform sources
+@COND_emu_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_cat_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@cat_module_LDADD =
+@COND_i386_coreboot_TRUE@cat_module_LDADD =
+@COND_i386_efi_TRUE@cat_module_LDADD =
+@COND_i386_ieee1275_TRUE@cat_module_LDADD =
+@COND_i386_multiboot_TRUE@cat_module_LDADD =
+@COND_i386_pc_TRUE@cat_module_LDADD =
+@COND_i386_qemu_TRUE@cat_module_LDADD =
+@COND_mips_yeeloong_TRUE@cat_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@cat_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@cat_module_LDADD =
+@COND_x86_64_efi_TRUE@cat_module_LDADD =
+@COND_emu_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_i386_coreboot_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_i386_efi_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_i386_ieee1275_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_i386_multiboot_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_i386_pc_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_i386_qemu_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_mips_yeeloong_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_x86_64_efi_TRUE@cmp_module_SOURCES = commands/cmp.c ## platform sources
+@COND_emu_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_cmp_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@cmp_module_LDADD =
+@COND_i386_coreboot_TRUE@cmp_module_LDADD =
+@COND_i386_efi_TRUE@cmp_module_LDADD =
+@COND_i386_ieee1275_TRUE@cmp_module_LDADD =
+@COND_i386_multiboot_TRUE@cmp_module_LDADD =
+@COND_i386_pc_TRUE@cmp_module_LDADD =
+@COND_i386_qemu_TRUE@cmp_module_LDADD =
+@COND_mips_yeeloong_TRUE@cmp_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@cmp_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@cmp_module_LDADD =
+@COND_x86_64_efi_TRUE@cmp_module_LDADD =
+@COND_emu_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_i386_coreboot_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_i386_efi_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_i386_ieee1275_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_i386_multiboot_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_i386_pc_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_i386_qemu_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_mips_yeeloong_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_x86_64_efi_TRUE@configfile_module_SOURCES = commands/configfile.c ## platform sources
+@COND_emu_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_configfile_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@configfile_module_LDADD =
+@COND_i386_coreboot_TRUE@configfile_module_LDADD =
+@COND_i386_efi_TRUE@configfile_module_LDADD =
+@COND_i386_ieee1275_TRUE@configfile_module_LDADD =
+@COND_i386_multiboot_TRUE@configfile_module_LDADD =
+@COND_i386_pc_TRUE@configfile_module_LDADD =
+@COND_i386_qemu_TRUE@configfile_module_LDADD =
+@COND_mips_yeeloong_TRUE@configfile_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@configfile_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@configfile_module_LDADD =
+@COND_x86_64_efi_TRUE@configfile_module_LDADD =
+@COND_emu_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@configfile_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@configfile_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@configfile_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@configfile_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+@COND_i386_efi_TRUE@cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+@COND_i386_ieee1275_TRUE@cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+@COND_i386_multiboot_TRUE@cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+@COND_i386_pc_TRUE@cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+@COND_i386_qemu_TRUE@cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+@COND_x86_64_efi_TRUE@cpuid_module_SOURCES = commands/i386/cpuid.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_cpuid_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_cpuid_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_cpuid_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_cpuid_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_cpuid_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_cpuid_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_cpuid_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@cpuid_module_LDADD =
+@COND_i386_efi_TRUE@cpuid_module_LDADD =
+@COND_i386_ieee1275_TRUE@cpuid_module_LDADD =
+@COND_i386_multiboot_TRUE@cpuid_module_LDADD =
+@COND_i386_pc_TRUE@cpuid_module_LDADD =
+@COND_i386_qemu_TRUE@cpuid_module_LDADD =
+@COND_x86_64_efi_TRUE@cpuid_module_LDADD =
+@COND_i386_coreboot_TRUE@cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_i386_coreboot_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_i386_efi_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_i386_ieee1275_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_i386_multiboot_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_i386_pc_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_i386_qemu_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_mips_yeeloong_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_x86_64_efi_TRUE@date_module_SOURCES = commands/date.c ## platform sources
+@COND_emu_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_date_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@date_module_LDADD =
+@COND_i386_coreboot_TRUE@date_module_LDADD =
+@COND_i386_efi_TRUE@date_module_LDADD =
+@COND_i386_ieee1275_TRUE@date_module_LDADD =
+@COND_i386_multiboot_TRUE@date_module_LDADD =
+@COND_i386_pc_TRUE@date_module_LDADD =
+@COND_i386_qemu_TRUE@date_module_LDADD =
+@COND_mips_yeeloong_TRUE@date_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@date_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@date_module_LDADD =
+@COND_x86_64_efi_TRUE@date_module_LDADD =
+@COND_emu_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@date_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@date_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@date_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@date_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@drivemap_module_SOURCES = commands/i386/pc/drivemap.c commands/i386/pc/drivemap_int13h.S ## platform sources
+@COND_i386_pc_TRUE@nodist_drivemap_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@drivemap_module_LDADD =
+@COND_i386_pc_TRUE@drivemap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@drivemap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@drivemap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@drivemap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_i386_coreboot_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_i386_efi_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_i386_ieee1275_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_i386_multiboot_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_i386_pc_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_i386_qemu_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_mips_yeeloong_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_x86_64_efi_TRUE@echo_module_SOURCES = commands/echo.c ## platform sources
+@COND_emu_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_echo_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@echo_module_LDADD =
+@COND_i386_coreboot_TRUE@echo_module_LDADD =
+@COND_i386_efi_TRUE@echo_module_LDADD =
+@COND_i386_ieee1275_TRUE@echo_module_LDADD =
+@COND_i386_multiboot_TRUE@echo_module_LDADD =
+@COND_i386_pc_TRUE@echo_module_LDADD =
+@COND_i386_qemu_TRUE@echo_module_LDADD =
+@COND_mips_yeeloong_TRUE@echo_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@echo_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@echo_module_LDADD =
+@COND_x86_64_efi_TRUE@echo_module_LDADD =
+@COND_emu_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@echo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@echo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@echo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@echo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+@COND_i386_coreboot_TRUE@extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+@COND_i386_efi_TRUE@extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+@COND_i386_multiboot_TRUE@extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+@COND_i386_pc_TRUE@extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+@COND_i386_qemu_TRUE@extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+@COND_x86_64_efi_TRUE@extcmd_module_SOURCES = commands/extcmd.c lib/arg.c ## platform sources
+@COND_emu_TRUE@nodist_extcmd_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_extcmd_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_extcmd_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_extcmd_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_extcmd_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_extcmd_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_extcmd_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@extcmd_module_LDADD =
+@COND_i386_coreboot_TRUE@extcmd_module_LDADD =
+@COND_i386_efi_TRUE@extcmd_module_LDADD =
+@COND_i386_multiboot_TRUE@extcmd_module_LDADD =
+@COND_i386_pc_TRUE@extcmd_module_LDADD =
+@COND_i386_qemu_TRUE@extcmd_module_LDADD =
+@COND_x86_64_efi_TRUE@extcmd_module_LDADD =
+@COND_emu_TRUE@extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@extcmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@extcmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@extcmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@extcmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@fixvideo_module_SOURCES = commands/efi/fixvideo.c ## platform sources
+@COND_x86_64_efi_TRUE@fixvideo_module_SOURCES = commands/efi/fixvideo.c ## platform sources
+@COND_i386_efi_TRUE@nodist_fixvideo_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_fixvideo_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@fixvideo_module_LDADD =
+@COND_x86_64_efi_TRUE@fixvideo_module_LDADD =
+@COND_i386_efi_TRUE@fixvideo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fixvideo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@fixvideo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fixvideo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@fixvideo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fixvideo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@fixvideo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fixvideo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_i386_coreboot_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_i386_efi_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_i386_ieee1275_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_i386_multiboot_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_i386_pc_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_i386_qemu_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_mips_yeeloong_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_x86_64_efi_TRUE@gptsync_module_SOURCES = commands/gptsync.c ## platform sources
+@COND_emu_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gptsync_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gptsync_module_LDADD =
+@COND_i386_coreboot_TRUE@gptsync_module_LDADD =
+@COND_i386_efi_TRUE@gptsync_module_LDADD =
+@COND_i386_ieee1275_TRUE@gptsync_module_LDADD =
+@COND_i386_multiboot_TRUE@gptsync_module_LDADD =
+@COND_i386_pc_TRUE@gptsync_module_LDADD =
+@COND_i386_qemu_TRUE@gptsync_module_LDADD =
+@COND_mips_yeeloong_TRUE@gptsync_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gptsync_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gptsync_module_LDADD =
+@COND_x86_64_efi_TRUE@gptsync_module_LDADD =
+@COND_emu_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gptsync_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gptsync_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gptsync_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gptsync_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@halt_module_SOURCES = lib/emu/halt.c commands/halt.c ## platform sources
+@COND_i386_coreboot_TRUE@halt_module_SOURCES = commands/acpihalt.c lib/i386/halt.c commands/halt.c ## platform sources
+@COND_i386_efi_TRUE@halt_module_SOURCES = commands/acpihalt.c lib/efi/halt.c commands/halt.c ## platform sources
+@COND_i386_ieee1275_TRUE@halt_module_SOURCES = lib/ieee1275/halt.c commands/halt.c ## platform sources
+@COND_i386_multiboot_TRUE@halt_module_SOURCES = commands/acpihalt.c lib/i386/halt.c commands/halt.c ## platform sources
+@COND_i386_pc_TRUE@halt_module_SOURCES = commands/i386/pc/halt.c commands/acpihalt.c ## platform sources
+@COND_i386_qemu_TRUE@halt_module_SOURCES = lib/i386/halt.c commands/halt.c ## platform sources
+@COND_mips_yeeloong_TRUE@halt_module_SOURCES = commands/halt.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@halt_module_SOURCES = lib/ieee1275/halt.c commands/halt.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@halt_module_SOURCES = lib/ieee1275/halt.c commands/halt.c ## platform sources
+@COND_x86_64_efi_TRUE@halt_module_SOURCES = commands/acpihalt.c lib/efi/halt.c commands/halt.c ## platform sources
+@COND_emu_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_halt_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@halt_module_LDADD =
+@COND_i386_coreboot_TRUE@halt_module_LDADD =
+@COND_i386_efi_TRUE@halt_module_LDADD =
+@COND_i386_ieee1275_TRUE@halt_module_LDADD =
+@COND_i386_multiboot_TRUE@halt_module_LDADD =
+@COND_i386_pc_TRUE@halt_module_LDADD =
+@COND_i386_qemu_TRUE@halt_module_LDADD =
+@COND_mips_yeeloong_TRUE@halt_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@halt_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@halt_module_LDADD =
+@COND_x86_64_efi_TRUE@halt_module_LDADD =
+@COND_emu_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@halt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@halt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@halt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@halt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_i386_coreboot_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_i386_efi_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_i386_ieee1275_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_i386_multiboot_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_i386_pc_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_i386_qemu_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_mips_yeeloong_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_x86_64_efi_TRUE@hashsum_module_SOURCES = commands/hashsum.c ## platform sources
+@COND_emu_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_hashsum_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@hashsum_module_LDADD =
+@COND_i386_coreboot_TRUE@hashsum_module_LDADD =
+@COND_i386_efi_TRUE@hashsum_module_LDADD =
+@COND_i386_ieee1275_TRUE@hashsum_module_LDADD =
+@COND_i386_multiboot_TRUE@hashsum_module_LDADD =
+@COND_i386_pc_TRUE@hashsum_module_LDADD =
+@COND_i386_qemu_TRUE@hashsum_module_LDADD =
+@COND_mips_yeeloong_TRUE@hashsum_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@hashsum_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@hashsum_module_LDADD =
+@COND_x86_64_efi_TRUE@hashsum_module_LDADD =
+@COND_emu_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hashsum_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hashsum_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hashsum_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hashsum_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_i386_efi_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_i386_ieee1275_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_i386_multiboot_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_i386_pc_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_i386_qemu_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_mips_yeeloong_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_x86_64_efi_TRUE@hdparm_module_SOURCES = commands/hdparm.c lib/hexdump.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_hdparm_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@hdparm_module_LDADD =
+@COND_i386_efi_TRUE@hdparm_module_LDADD =
+@COND_i386_ieee1275_TRUE@hdparm_module_LDADD =
+@COND_i386_multiboot_TRUE@hdparm_module_LDADD =
+@COND_i386_pc_TRUE@hdparm_module_LDADD =
+@COND_i386_qemu_TRUE@hdparm_module_LDADD =
+@COND_mips_yeeloong_TRUE@hdparm_module_LDADD =
+@COND_x86_64_efi_TRUE@hdparm_module_LDADD =
+@COND_i386_coreboot_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hdparm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hdparm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hdparm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hdparm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_i386_coreboot_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_i386_efi_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_i386_ieee1275_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_i386_multiboot_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_i386_pc_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_i386_qemu_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_mips_yeeloong_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_x86_64_efi_TRUE@help_module_SOURCES = commands/help.c ## platform sources
+@COND_emu_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_help_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@help_module_LDADD =
+@COND_i386_coreboot_TRUE@help_module_LDADD =
+@COND_i386_efi_TRUE@help_module_LDADD =
+@COND_i386_ieee1275_TRUE@help_module_LDADD =
+@COND_i386_multiboot_TRUE@help_module_LDADD =
+@COND_i386_pc_TRUE@help_module_LDADD =
+@COND_i386_qemu_TRUE@help_module_LDADD =
+@COND_mips_yeeloong_TRUE@help_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@help_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@help_module_LDADD =
+@COND_x86_64_efi_TRUE@help_module_LDADD =
+@COND_emu_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@help_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@help_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@help_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@help_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_i386_coreboot_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_i386_efi_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_i386_ieee1275_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_i386_multiboot_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_i386_pc_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_i386_qemu_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_mips_yeeloong_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_x86_64_efi_TRUE@hexdump_module_SOURCES = commands/hexdump.c lib/hexdump.c ## platform sources
+@COND_emu_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_hexdump_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@hexdump_module_LDADD =
+@COND_i386_coreboot_TRUE@hexdump_module_LDADD =
+@COND_i386_efi_TRUE@hexdump_module_LDADD =
+@COND_i386_ieee1275_TRUE@hexdump_module_LDADD =
+@COND_i386_multiboot_TRUE@hexdump_module_LDADD =
+@COND_i386_pc_TRUE@hexdump_module_LDADD =
+@COND_i386_qemu_TRUE@hexdump_module_LDADD =
+@COND_mips_yeeloong_TRUE@hexdump_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@hexdump_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@hexdump_module_LDADD =
+@COND_x86_64_efi_TRUE@hexdump_module_LDADD =
+@COND_emu_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hexdump_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hexdump_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hexdump_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hexdump_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_i386_coreboot_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_i386_efi_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_i386_ieee1275_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_i386_multiboot_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_i386_pc_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_i386_qemu_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_mips_yeeloong_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_x86_64_efi_TRUE@keystatus_module_SOURCES = commands/keystatus.c ## platform sources
+@COND_emu_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_keystatus_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@keystatus_module_LDADD =
+@COND_i386_coreboot_TRUE@keystatus_module_LDADD =
+@COND_i386_efi_TRUE@keystatus_module_LDADD =
+@COND_i386_ieee1275_TRUE@keystatus_module_LDADD =
+@COND_i386_multiboot_TRUE@keystatus_module_LDADD =
+@COND_i386_pc_TRUE@keystatus_module_LDADD =
+@COND_i386_qemu_TRUE@keystatus_module_LDADD =
+@COND_mips_yeeloong_TRUE@keystatus_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@keystatus_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@keystatus_module_LDADD =
+@COND_x86_64_efi_TRUE@keystatus_module_LDADD =
+@COND_emu_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keystatus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keystatus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keystatus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keystatus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadbios_module_SOURCES = commands/efi/loadbios.c ## platform sources
+@COND_x86_64_efi_TRUE@loadbios_module_SOURCES = commands/efi/loadbios.c ## platform sources
+@COND_i386_efi_TRUE@nodist_loadbios_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_loadbios_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@loadbios_module_LDADD =
+@COND_x86_64_efi_TRUE@loadbios_module_LDADD =
+@COND_i386_efi_TRUE@loadbios_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadbios_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadbios_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadbios_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadbios_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadbios_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadbios_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadbios_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_i386_coreboot_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_i386_efi_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_i386_ieee1275_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_i386_multiboot_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_i386_pc_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_i386_qemu_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_mips_yeeloong_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_x86_64_efi_TRUE@loadenv_module_SOURCES = commands/loadenv.c lib/envblk.c ## platform sources
+@COND_emu_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_loadenv_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@loadenv_module_LDADD =
+@COND_i386_coreboot_TRUE@loadenv_module_LDADD =
+@COND_i386_efi_TRUE@loadenv_module_LDADD =
+@COND_i386_ieee1275_TRUE@loadenv_module_LDADD =
+@COND_i386_multiboot_TRUE@loadenv_module_LDADD =
+@COND_i386_pc_TRUE@loadenv_module_LDADD =
+@COND_i386_qemu_TRUE@loadenv_module_LDADD =
+@COND_mips_yeeloong_TRUE@loadenv_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@loadenv_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@loadenv_module_LDADD =
+@COND_x86_64_efi_TRUE@loadenv_module_LDADD =
+@COND_emu_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadenv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadenv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadenv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loadenv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_i386_coreboot_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_i386_efi_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_i386_ieee1275_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_i386_multiboot_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_i386_pc_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_i386_qemu_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_mips_yeeloong_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_x86_64_efi_TRUE@ls_module_SOURCES = commands/ls.c ## platform sources
+@COND_emu_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ls_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@ls_module_LDADD =
+@COND_i386_coreboot_TRUE@ls_module_LDADD =
+@COND_i386_efi_TRUE@ls_module_LDADD =
+@COND_i386_ieee1275_TRUE@ls_module_LDADD =
+@COND_i386_multiboot_TRUE@ls_module_LDADD =
+@COND_i386_pc_TRUE@ls_module_LDADD =
+@COND_i386_qemu_TRUE@ls_module_LDADD =
+@COND_mips_yeeloong_TRUE@ls_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@ls_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@ls_module_LDADD =
+@COND_x86_64_efi_TRUE@ls_module_LDADD =
+@COND_emu_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ls_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ls_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ls_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ls_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_i386_coreboot_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_i386_efi_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_i386_ieee1275_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_i386_multiboot_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_i386_pc_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_i386_qemu_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_mips_yeeloong_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_x86_64_efi_TRUE@lsmmap_module_SOURCES = commands/lsmmap.c ## platform sources
+@COND_emu_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_lsmmap_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@lsmmap_module_LDADD =
+@COND_i386_coreboot_TRUE@lsmmap_module_LDADD =
+@COND_i386_efi_TRUE@lsmmap_module_LDADD =
+@COND_i386_ieee1275_TRUE@lsmmap_module_LDADD =
+@COND_i386_multiboot_TRUE@lsmmap_module_LDADD =
+@COND_i386_pc_TRUE@lsmmap_module_LDADD =
+@COND_i386_qemu_TRUE@lsmmap_module_LDADD =
+@COND_mips_yeeloong_TRUE@lsmmap_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@lsmmap_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@lsmmap_module_LDADD =
+@COND_x86_64_efi_TRUE@lsmmap_module_LDADD =
+@COND_emu_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsmmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsmmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsmmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lsmmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_i386_efi_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_i386_ieee1275_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_i386_multiboot_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_i386_pc_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_i386_qemu_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_mips_yeeloong_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_x86_64_efi_TRUE@lspci_module_SOURCES = commands/lspci.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_lspci_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@lspci_module_LDADD =
+@COND_i386_efi_TRUE@lspci_module_LDADD =
+@COND_i386_ieee1275_TRUE@lspci_module_LDADD =
+@COND_i386_multiboot_TRUE@lspci_module_LDADD =
+@COND_i386_pc_TRUE@lspci_module_LDADD =
+@COND_i386_qemu_TRUE@lspci_module_LDADD =
+@COND_mips_yeeloong_TRUE@lspci_module_LDADD =
+@COND_x86_64_efi_TRUE@lspci_module_LDADD =
+@COND_i386_coreboot_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lspci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lspci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lspci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lspci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_i386_coreboot_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_i386_efi_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_i386_ieee1275_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_i386_multiboot_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_i386_pc_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_i386_qemu_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_mips_yeeloong_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_x86_64_efi_TRUE@memrw_module_SOURCES = commands/memrw.c ## platform sources
+@COND_emu_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_memrw_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@memrw_module_LDADD =
+@COND_i386_coreboot_TRUE@memrw_module_LDADD =
+@COND_i386_efi_TRUE@memrw_module_LDADD =
+@COND_i386_ieee1275_TRUE@memrw_module_LDADD =
+@COND_i386_multiboot_TRUE@memrw_module_LDADD =
+@COND_i386_pc_TRUE@memrw_module_LDADD =
+@COND_i386_qemu_TRUE@memrw_module_LDADD =
+@COND_mips_yeeloong_TRUE@memrw_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@memrw_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@memrw_module_LDADD =
+@COND_x86_64_efi_TRUE@memrw_module_LDADD =
+@COND_emu_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memrw_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memrw_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memrw_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memrw_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_i386_coreboot_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_i386_efi_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_i386_ieee1275_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_i386_multiboot_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_i386_pc_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_i386_qemu_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_mips_yeeloong_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_x86_64_efi_TRUE@minicmd_module_SOURCES = commands/minicmd.c ## platform sources
+@COND_emu_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_minicmd_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@minicmd_module_LDADD =
+@COND_i386_coreboot_TRUE@minicmd_module_LDADD =
+@COND_i386_efi_TRUE@minicmd_module_LDADD =
+@COND_i386_ieee1275_TRUE@minicmd_module_LDADD =
+@COND_i386_multiboot_TRUE@minicmd_module_LDADD =
+@COND_i386_pc_TRUE@minicmd_module_LDADD =
+@COND_i386_qemu_TRUE@minicmd_module_LDADD =
+@COND_mips_yeeloong_TRUE@minicmd_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@minicmd_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@minicmd_module_LDADD =
+@COND_x86_64_efi_TRUE@minicmd_module_LDADD =
+@COND_emu_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minicmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minicmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minicmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minicmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_i386_coreboot_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_i386_efi_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_i386_ieee1275_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_i386_multiboot_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_i386_pc_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_i386_qemu_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_mips_yeeloong_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_x86_64_efi_TRUE@parttool_module_SOURCES = commands/parttool.c ## platform sources
+@COND_emu_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_parttool_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@parttool_module_LDADD =
+@COND_i386_coreboot_TRUE@parttool_module_LDADD =
+@COND_i386_efi_TRUE@parttool_module_LDADD =
+@COND_i386_ieee1275_TRUE@parttool_module_LDADD =
+@COND_i386_multiboot_TRUE@parttool_module_LDADD =
+@COND_i386_pc_TRUE@parttool_module_LDADD =
+@COND_i386_qemu_TRUE@parttool_module_LDADD =
+@COND_mips_yeeloong_TRUE@parttool_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@parttool_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@parttool_module_LDADD =
+@COND_x86_64_efi_TRUE@parttool_module_LDADD =
+@COND_emu_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@parttool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@parttool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@parttool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@parttool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_i386_coreboot_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_i386_efi_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_i386_ieee1275_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_i386_multiboot_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_i386_pc_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_i386_qemu_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_mips_yeeloong_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_x86_64_efi_TRUE@password_module_SOURCES = commands/password.c ## platform sources
+@COND_emu_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_password_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@password_module_LDADD =
+@COND_i386_coreboot_TRUE@password_module_LDADD =
+@COND_i386_efi_TRUE@password_module_LDADD =
+@COND_i386_ieee1275_TRUE@password_module_LDADD =
+@COND_i386_multiboot_TRUE@password_module_LDADD =
+@COND_i386_pc_TRUE@password_module_LDADD =
+@COND_i386_qemu_TRUE@password_module_LDADD =
+@COND_mips_yeeloong_TRUE@password_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@password_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@password_module_LDADD =
+@COND_x86_64_efi_TRUE@password_module_LDADD =
+@COND_emu_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_i386_coreboot_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_i386_efi_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_i386_ieee1275_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_i386_multiboot_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_i386_pc_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_i386_qemu_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_mips_yeeloong_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_x86_64_efi_TRUE@password_pbkdf2_module_SOURCES = commands/password_pbkdf2.c ## platform sources
+@COND_emu_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_password_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@password_pbkdf2_module_LDADD =
+@COND_i386_coreboot_TRUE@password_pbkdf2_module_LDADD =
+@COND_i386_efi_TRUE@password_pbkdf2_module_LDADD =
+@COND_i386_ieee1275_TRUE@password_pbkdf2_module_LDADD =
+@COND_i386_multiboot_TRUE@password_pbkdf2_module_LDADD =
+@COND_i386_pc_TRUE@password_pbkdf2_module_LDADD =
+@COND_i386_qemu_TRUE@password_pbkdf2_module_LDADD =
+@COND_mips_yeeloong_TRUE@password_pbkdf2_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@password_pbkdf2_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@password_pbkdf2_module_LDADD =
+@COND_x86_64_efi_TRUE@password_pbkdf2_module_LDADD =
+@COND_emu_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@password_pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+@COND_i386_efi_TRUE@play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+@COND_i386_ieee1275_TRUE@play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+@COND_i386_multiboot_TRUE@play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+@COND_i386_pc_TRUE@play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+@COND_i386_qemu_TRUE@play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+@COND_x86_64_efi_TRUE@play_module_SOURCES = commands/i386/pc/play.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_play_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_play_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_play_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_play_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_play_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_play_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_play_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@play_module_LDADD =
+@COND_i386_efi_TRUE@play_module_LDADD =
+@COND_i386_ieee1275_TRUE@play_module_LDADD =
+@COND_i386_multiboot_TRUE@play_module_LDADD =
+@COND_i386_pc_TRUE@play_module_LDADD =
+@COND_i386_qemu_TRUE@play_module_LDADD =
+@COND_x86_64_efi_TRUE@play_module_LDADD =
+@COND_i386_coreboot_TRUE@play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@play_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@play_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@play_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@play_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_i386_coreboot_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_i386_efi_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_i386_ieee1275_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_i386_multiboot_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_i386_pc_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_i386_qemu_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_mips_yeeloong_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_x86_64_efi_TRUE@probe_module_SOURCES = commands/probe.c ## platform sources
+@COND_emu_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_probe_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@probe_module_LDADD =
+@COND_i386_coreboot_TRUE@probe_module_LDADD =
+@COND_i386_efi_TRUE@probe_module_LDADD =
+@COND_i386_ieee1275_TRUE@probe_module_LDADD =
+@COND_i386_multiboot_TRUE@probe_module_LDADD =
+@COND_i386_pc_TRUE@probe_module_LDADD =
+@COND_i386_qemu_TRUE@probe_module_LDADD =
+@COND_mips_yeeloong_TRUE@probe_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@probe_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@probe_module_LDADD =
+@COND_x86_64_efi_TRUE@probe_module_LDADD =
+@COND_emu_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@probe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@probe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@probe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@probe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxecmd_module_SOURCES = commands/i386/pc/pxecmd.c ## platform sources
+@COND_i386_pc_TRUE@nodist_pxecmd_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@pxecmd_module_LDADD =
+@COND_i386_pc_TRUE@pxecmd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxecmd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxecmd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxecmd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_i386_coreboot_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_i386_efi_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_i386_ieee1275_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_i386_multiboot_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_i386_pc_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_i386_qemu_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_mips_yeeloong_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_x86_64_efi_TRUE@read_module_SOURCES = commands/read.c ## platform sources
+@COND_emu_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_read_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@read_module_LDADD =
+@COND_i386_coreboot_TRUE@read_module_LDADD =
+@COND_i386_efi_TRUE@read_module_LDADD =
+@COND_i386_ieee1275_TRUE@read_module_LDADD =
+@COND_i386_multiboot_TRUE@read_module_LDADD =
+@COND_i386_pc_TRUE@read_module_LDADD =
+@COND_i386_qemu_TRUE@read_module_LDADD =
+@COND_mips_yeeloong_TRUE@read_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@read_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@read_module_LDADD =
+@COND_x86_64_efi_TRUE@read_module_LDADD =
+@COND_emu_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@read_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@read_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@read_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@read_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_i386_coreboot_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_i386_efi_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_i386_ieee1275_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_i386_multiboot_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_i386_pc_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_i386_qemu_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_mips_yeeloong_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_x86_64_efi_TRUE@reboot_module_SOURCES = commands/reboot.c ## platform sources
+@COND_emu_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_reboot_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@reboot_module_LDADD =
+@COND_i386_coreboot_TRUE@reboot_module_LDADD =
+@COND_i386_efi_TRUE@reboot_module_LDADD =
+@COND_i386_ieee1275_TRUE@reboot_module_LDADD =
+@COND_i386_multiboot_TRUE@reboot_module_LDADD =
+@COND_i386_pc_TRUE@reboot_module_LDADD =
+@COND_i386_qemu_TRUE@reboot_module_LDADD =
+@COND_mips_yeeloong_TRUE@reboot_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@reboot_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@reboot_module_LDADD =
+@COND_x86_64_efi_TRUE@reboot_module_LDADD =
+@COND_emu_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_i386_coreboot_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_i386_efi_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_i386_ieee1275_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_i386_multiboot_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_i386_pc_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_i386_qemu_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_mips_yeeloong_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_x86_64_efi_TRUE@search_module_SOURCES = commands/search_wrap.c ## platform sources
+@COND_emu_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_search_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@search_module_LDADD =
+@COND_i386_coreboot_TRUE@search_module_LDADD =
+@COND_i386_efi_TRUE@search_module_LDADD =
+@COND_i386_ieee1275_TRUE@search_module_LDADD =
+@COND_i386_multiboot_TRUE@search_module_LDADD =
+@COND_i386_pc_TRUE@search_module_LDADD =
+@COND_i386_qemu_TRUE@search_module_LDADD =
+@COND_mips_yeeloong_TRUE@search_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@search_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@search_module_LDADD =
+@COND_x86_64_efi_TRUE@search_module_LDADD =
+@COND_emu_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_i386_coreboot_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_i386_efi_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_i386_ieee1275_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_i386_multiboot_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_i386_pc_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_i386_qemu_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_mips_yeeloong_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_x86_64_efi_TRUE@search_fs_file_module_SOURCES = commands/search_file.c ## platform sources
+@COND_emu_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_search_fs_file_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@search_fs_file_module_LDADD =
+@COND_i386_coreboot_TRUE@search_fs_file_module_LDADD =
+@COND_i386_efi_TRUE@search_fs_file_module_LDADD =
+@COND_i386_ieee1275_TRUE@search_fs_file_module_LDADD =
+@COND_i386_multiboot_TRUE@search_fs_file_module_LDADD =
+@COND_i386_pc_TRUE@search_fs_file_module_LDADD =
+@COND_i386_qemu_TRUE@search_fs_file_module_LDADD =
+@COND_mips_yeeloong_TRUE@search_fs_file_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@search_fs_file_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@search_fs_file_module_LDADD =
+@COND_x86_64_efi_TRUE@search_fs_file_module_LDADD =
+@COND_emu_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_file_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_file_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_file_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_file_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_i386_coreboot_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_i386_efi_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_i386_ieee1275_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_i386_multiboot_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_i386_pc_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_i386_qemu_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_mips_yeeloong_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_x86_64_efi_TRUE@search_fs_uuid_module_SOURCES = commands/search_uuid.c ## platform sources
+@COND_emu_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_search_fs_uuid_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@search_fs_uuid_module_LDADD =
+@COND_i386_coreboot_TRUE@search_fs_uuid_module_LDADD =
+@COND_i386_efi_TRUE@search_fs_uuid_module_LDADD =
+@COND_i386_ieee1275_TRUE@search_fs_uuid_module_LDADD =
+@COND_i386_multiboot_TRUE@search_fs_uuid_module_LDADD =
+@COND_i386_pc_TRUE@search_fs_uuid_module_LDADD =
+@COND_i386_qemu_TRUE@search_fs_uuid_module_LDADD =
+@COND_mips_yeeloong_TRUE@search_fs_uuid_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@search_fs_uuid_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@search_fs_uuid_module_LDADD =
+@COND_x86_64_efi_TRUE@search_fs_uuid_module_LDADD =
+@COND_emu_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_fs_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_i386_coreboot_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_i386_efi_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_i386_ieee1275_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_i386_multiboot_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_i386_pc_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_i386_qemu_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_mips_yeeloong_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_x86_64_efi_TRUE@search_label_module_SOURCES = commands/search_label.c ## platform sources
+@COND_emu_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_search_label_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@search_label_module_LDADD =
+@COND_i386_coreboot_TRUE@search_label_module_LDADD =
+@COND_i386_efi_TRUE@search_label_module_LDADD =
+@COND_i386_ieee1275_TRUE@search_label_module_LDADD =
+@COND_i386_multiboot_TRUE@search_label_module_LDADD =
+@COND_i386_pc_TRUE@search_label_module_LDADD =
+@COND_i386_qemu_TRUE@search_label_module_LDADD =
+@COND_mips_yeeloong_TRUE@search_label_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@search_label_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@search_label_module_LDADD =
+@COND_x86_64_efi_TRUE@search_label_module_LDADD =
+@COND_emu_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_label_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_label_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_label_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@search_label_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setpci_module_SOURCES = commands/setpci.c ## platform sources
+@COND_i386_efi_TRUE@setpci_module_SOURCES = commands/setpci.c ## platform sources
+@COND_i386_ieee1275_TRUE@setpci_module_SOURCES = commands/setpci.c ## platform sources
+@COND_i386_multiboot_TRUE@setpci_module_SOURCES = commands/setpci.c ## platform sources
+@COND_i386_pc_TRUE@setpci_module_SOURCES = commands/setpci.c ## platform sources
+@COND_i386_qemu_TRUE@setpci_module_SOURCES = commands/setpci.c ## platform sources
+@COND_x86_64_efi_TRUE@setpci_module_SOURCES = commands/setpci.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_setpci_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_setpci_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_setpci_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_setpci_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_setpci_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_setpci_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_setpci_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@setpci_module_LDADD =
+@COND_i386_efi_TRUE@setpci_module_LDADD =
+@COND_i386_ieee1275_TRUE@setpci_module_LDADD =
+@COND_i386_multiboot_TRUE@setpci_module_LDADD =
+@COND_i386_pc_TRUE@setpci_module_LDADD =
+@COND_i386_qemu_TRUE@setpci_module_LDADD =
+@COND_x86_64_efi_TRUE@setpci_module_LDADD =
+@COND_i386_coreboot_TRUE@setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setpci_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setpci_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setpci_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setpci_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_i386_coreboot_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_i386_efi_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_i386_ieee1275_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_i386_multiboot_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_i386_pc_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_i386_qemu_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_mips_yeeloong_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_x86_64_efi_TRUE@sleep_module_SOURCES = commands/sleep.c ## platform sources
+@COND_emu_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_sleep_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@sleep_module_LDADD =
+@COND_i386_coreboot_TRUE@sleep_module_LDADD =
+@COND_i386_efi_TRUE@sleep_module_LDADD =
+@COND_i386_ieee1275_TRUE@sleep_module_LDADD =
+@COND_i386_multiboot_TRUE@sleep_module_LDADD =
+@COND_i386_pc_TRUE@sleep_module_LDADD =
+@COND_i386_qemu_TRUE@sleep_module_LDADD =
+@COND_mips_yeeloong_TRUE@sleep_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@sleep_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@sleep_module_LDADD =
+@COND_x86_64_efi_TRUE@sleep_module_LDADD =
+@COND_emu_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sleep_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sleep_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sleep_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sleep_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@suspend_module_SOURCES = commands/ieee1275/suspend.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@suspend_module_SOURCES = commands/ieee1275/suspend.c ## platform sources
+@COND_i386_ieee1275_TRUE@nodist_suspend_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_suspend_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@suspend_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@suspend_module_LDADD =
+@COND_i386_ieee1275_TRUE@suspend_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@suspend_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@suspend_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@suspend_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@suspend_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@suspend_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@suspend_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@suspend_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_i386_coreboot_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_i386_efi_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_i386_ieee1275_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_i386_multiboot_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_i386_pc_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_i386_qemu_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_mips_yeeloong_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_x86_64_efi_TRUE@terminal_module_SOURCES = commands/terminal.c ## platform sources
+@COND_emu_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_terminal_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@terminal_module_LDADD =
+@COND_i386_coreboot_TRUE@terminal_module_LDADD =
+@COND_i386_efi_TRUE@terminal_module_LDADD =
+@COND_i386_ieee1275_TRUE@terminal_module_LDADD =
+@COND_i386_multiboot_TRUE@terminal_module_LDADD =
+@COND_i386_pc_TRUE@terminal_module_LDADD =
+@COND_i386_qemu_TRUE@terminal_module_LDADD =
+@COND_mips_yeeloong_TRUE@terminal_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@terminal_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@terminal_module_LDADD =
+@COND_x86_64_efi_TRUE@terminal_module_LDADD =
+@COND_emu_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_i386_coreboot_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_i386_efi_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_i386_ieee1275_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_i386_multiboot_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_i386_pc_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_i386_qemu_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_mips_yeeloong_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_x86_64_efi_TRUE@test_module_SOURCES = commands/test.c ## platform sources
+@COND_emu_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_test_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@test_module_LDADD =
+@COND_i386_coreboot_TRUE@test_module_LDADD =
+@COND_i386_efi_TRUE@test_module_LDADD =
+@COND_i386_ieee1275_TRUE@test_module_LDADD =
+@COND_i386_multiboot_TRUE@test_module_LDADD =
+@COND_i386_pc_TRUE@test_module_LDADD =
+@COND_i386_qemu_TRUE@test_module_LDADD =
+@COND_mips_yeeloong_TRUE@test_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@test_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@test_module_LDADD =
+@COND_x86_64_efi_TRUE@test_module_LDADD =
+@COND_emu_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_i386_coreboot_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_i386_efi_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_i386_ieee1275_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_i386_multiboot_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_i386_pc_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_i386_qemu_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_mips_yeeloong_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_x86_64_efi_TRUE@true_module_SOURCES = commands/true.c ## platform sources
+@COND_emu_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_true_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@true_module_LDADD =
+@COND_i386_coreboot_TRUE@true_module_LDADD =
+@COND_i386_efi_TRUE@true_module_LDADD =
+@COND_i386_ieee1275_TRUE@true_module_LDADD =
+@COND_i386_multiboot_TRUE@true_module_LDADD =
+@COND_i386_pc_TRUE@true_module_LDADD =
+@COND_i386_qemu_TRUE@true_module_LDADD =
+@COND_mips_yeeloong_TRUE@true_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@true_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@true_module_LDADD =
+@COND_x86_64_efi_TRUE@true_module_LDADD =
+@COND_emu_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@true_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@true_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@true_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@true_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_i386_coreboot_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_i386_efi_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_i386_ieee1275_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_i386_multiboot_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_i386_pc_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_i386_qemu_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_mips_yeeloong_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_x86_64_efi_TRUE@usbtest_module_SOURCES = commands/usbtest.c ## platform sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_usbtest_module_SOURCES = ## platform nodist sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbtest_module_LDADD =
+@COND_i386_coreboot_TRUE@usbtest_module_LDADD =
+@COND_i386_efi_TRUE@usbtest_module_LDADD =
+@COND_i386_ieee1275_TRUE@usbtest_module_LDADD =
+@COND_i386_multiboot_TRUE@usbtest_module_LDADD =
+@COND_i386_pc_TRUE@usbtest_module_LDADD =
+@COND_i386_qemu_TRUE@usbtest_module_LDADD =
+@COND_mips_yeeloong_TRUE@usbtest_module_LDADD =
+@COND_x86_64_efi_TRUE@usbtest_module_LDADD =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbtest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbtest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbtest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbtest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_i386_coreboot_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_i386_efi_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_i386_ieee1275_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_i386_multiboot_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_i386_pc_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_i386_qemu_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_mips_yeeloong_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_x86_64_efi_TRUE@videoinfo_module_SOURCES = commands/videoinfo.c ## platform sources
+@COND_emu_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_videoinfo_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@videoinfo_module_LDADD =
+@COND_i386_coreboot_TRUE@videoinfo_module_LDADD =
+@COND_i386_efi_TRUE@videoinfo_module_LDADD =
+@COND_i386_ieee1275_TRUE@videoinfo_module_LDADD =
+@COND_i386_multiboot_TRUE@videoinfo_module_LDADD =
+@COND_i386_pc_TRUE@videoinfo_module_LDADD =
+@COND_i386_qemu_TRUE@videoinfo_module_LDADD =
+@COND_mips_yeeloong_TRUE@videoinfo_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@videoinfo_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@videoinfo_module_LDADD =
+@COND_x86_64_efi_TRUE@videoinfo_module_LDADD =
+@COND_emu_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videoinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videoinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videoinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videoinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_i386_coreboot_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_i386_efi_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_i386_ieee1275_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_i386_multiboot_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_i386_pc_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_i386_qemu_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_mips_yeeloong_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_x86_64_efi_TRUE@videotest_module_SOURCES = commands/videotest.c ## platform sources
+@COND_emu_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_videotest_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@videotest_module_LDADD =
+@COND_i386_coreboot_TRUE@videotest_module_LDADD =
+@COND_i386_efi_TRUE@videotest_module_LDADD =
+@COND_i386_ieee1275_TRUE@videotest_module_LDADD =
+@COND_i386_multiboot_TRUE@videotest_module_LDADD =
+@COND_i386_pc_TRUE@videotest_module_LDADD =
+@COND_i386_qemu_TRUE@videotest_module_LDADD =
+@COND_mips_yeeloong_TRUE@videotest_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@videotest_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@videotest_module_LDADD =
+@COND_x86_64_efi_TRUE@videotest_module_LDADD =
+@COND_emu_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videotest_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videotest_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videotest_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@videotest_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_i386_coreboot_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_i386_efi_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_i386_ieee1275_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_i386_multiboot_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_i386_pc_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_i386_qemu_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_mips_yeeloong_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_x86_64_efi_TRUE@xnu_uuid_module_SOURCES = commands/xnu_uuid.c ## platform sources
+@COND_emu_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_xnu_uuid_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@xnu_uuid_module_LDADD =
+@COND_i386_coreboot_TRUE@xnu_uuid_module_LDADD =
+@COND_i386_efi_TRUE@xnu_uuid_module_LDADD =
+@COND_i386_ieee1275_TRUE@xnu_uuid_module_LDADD =
+@COND_i386_multiboot_TRUE@xnu_uuid_module_LDADD =
+@COND_i386_pc_TRUE@xnu_uuid_module_LDADD =
+@COND_i386_qemu_TRUE@xnu_uuid_module_LDADD =
+@COND_mips_yeeloong_TRUE@xnu_uuid_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@xnu_uuid_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@xnu_uuid_module_LDADD =
+@COND_x86_64_efi_TRUE@xnu_uuid_module_LDADD =
+@COND_emu_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_uuid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_uuid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_uuid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_uuid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_i386_coreboot_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_i386_efi_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_i386_ieee1275_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_i386_multiboot_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_i386_pc_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_i386_qemu_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_mips_yeeloong_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_x86_64_efi_TRUE@dm_nv_module_SOURCES = disk/dmraid_nvidia.c ## platform sources
+@COND_emu_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_dm_nv_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@dm_nv_module_LDADD =
+@COND_i386_coreboot_TRUE@dm_nv_module_LDADD =
+@COND_i386_efi_TRUE@dm_nv_module_LDADD =
+@COND_i386_ieee1275_TRUE@dm_nv_module_LDADD =
+@COND_i386_multiboot_TRUE@dm_nv_module_LDADD =
+@COND_i386_pc_TRUE@dm_nv_module_LDADD =
+@COND_i386_qemu_TRUE@dm_nv_module_LDADD =
+@COND_mips_yeeloong_TRUE@dm_nv_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@dm_nv_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@dm_nv_module_LDADD =
+@COND_x86_64_efi_TRUE@dm_nv_module_LDADD =
+@COND_emu_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@dm_nv_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@dm_nv_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@dm_nv_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@dm_nv_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_i386_coreboot_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_i386_efi_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_i386_ieee1275_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_i386_multiboot_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_i386_pc_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_i386_qemu_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_mips_yeeloong_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_x86_64_efi_TRUE@loopback_module_SOURCES = disk/loopback.c ## platform sources
+@COND_emu_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_loopback_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@loopback_module_LDADD =
+@COND_i386_coreboot_TRUE@loopback_module_LDADD =
+@COND_i386_efi_TRUE@loopback_module_LDADD =
+@COND_i386_ieee1275_TRUE@loopback_module_LDADD =
+@COND_i386_multiboot_TRUE@loopback_module_LDADD =
+@COND_i386_pc_TRUE@loopback_module_LDADD =
+@COND_i386_qemu_TRUE@loopback_module_LDADD =
+@COND_mips_yeeloong_TRUE@loopback_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@loopback_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@loopback_module_LDADD =
+@COND_x86_64_efi_TRUE@loopback_module_LDADD =
+@COND_emu_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loopback_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loopback_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loopback_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@loopback_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_i386_coreboot_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_i386_efi_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_i386_ieee1275_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_i386_multiboot_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_i386_pc_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_i386_qemu_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_mips_yeeloong_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_x86_64_efi_TRUE@lvm_module_SOURCES = disk/lvm.c ## platform sources
+@COND_emu_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_lvm_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@lvm_module_LDADD =
+@COND_i386_coreboot_TRUE@lvm_module_LDADD =
+@COND_i386_efi_TRUE@lvm_module_LDADD =
+@COND_i386_ieee1275_TRUE@lvm_module_LDADD =
+@COND_i386_multiboot_TRUE@lvm_module_LDADD =
+@COND_i386_pc_TRUE@lvm_module_LDADD =
+@COND_i386_qemu_TRUE@lvm_module_LDADD =
+@COND_mips_yeeloong_TRUE@lvm_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@lvm_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@lvm_module_LDADD =
+@COND_x86_64_efi_TRUE@lvm_module_LDADD =
+@COND_emu_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lvm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lvm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lvm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@lvm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_i386_coreboot_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_i386_efi_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_i386_ieee1275_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_i386_multiboot_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_i386_pc_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_i386_qemu_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_mips_yeeloong_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_x86_64_efi_TRUE@mdraid09_module_SOURCES = disk/mdraid_linux.c ## platform sources
+@COND_emu_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_mdraid09_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@mdraid09_module_LDADD =
+@COND_i386_coreboot_TRUE@mdraid09_module_LDADD =
+@COND_i386_efi_TRUE@mdraid09_module_LDADD =
+@COND_i386_ieee1275_TRUE@mdraid09_module_LDADD =
+@COND_i386_multiboot_TRUE@mdraid09_module_LDADD =
+@COND_i386_pc_TRUE@mdraid09_module_LDADD =
+@COND_i386_qemu_TRUE@mdraid09_module_LDADD =
+@COND_mips_yeeloong_TRUE@mdraid09_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@mdraid09_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@mdraid09_module_LDADD =
+@COND_x86_64_efi_TRUE@mdraid09_module_LDADD =
+@COND_emu_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid09_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid09_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid09_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid09_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_i386_coreboot_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_i386_efi_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_i386_ieee1275_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_i386_multiboot_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_i386_pc_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_i386_qemu_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_mips_yeeloong_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_x86_64_efi_TRUE@mdraid1x_module_SOURCES = disk/mdraid1x_linux.c ## platform sources
+@COND_emu_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_mdraid1x_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@mdraid1x_module_LDADD =
+@COND_i386_coreboot_TRUE@mdraid1x_module_LDADD =
+@COND_i386_efi_TRUE@mdraid1x_module_LDADD =
+@COND_i386_ieee1275_TRUE@mdraid1x_module_LDADD =
+@COND_i386_multiboot_TRUE@mdraid1x_module_LDADD =
+@COND_i386_pc_TRUE@mdraid1x_module_LDADD =
+@COND_i386_qemu_TRUE@mdraid1x_module_LDADD =
+@COND_mips_yeeloong_TRUE@mdraid1x_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@mdraid1x_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@mdraid1x_module_LDADD =
+@COND_x86_64_efi_TRUE@mdraid1x_module_LDADD =
+@COND_emu_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid1x_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid1x_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid1x_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mdraid1x_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_i386_coreboot_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_i386_efi_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_i386_ieee1275_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_i386_multiboot_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_i386_pc_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_i386_qemu_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_mips_yeeloong_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_x86_64_efi_TRUE@raid_module_SOURCES = disk/raid.c ## platform sources
+@COND_emu_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_raid_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@raid_module_LDADD =
+@COND_i386_coreboot_TRUE@raid_module_LDADD =
+@COND_i386_efi_TRUE@raid_module_LDADD =
+@COND_i386_ieee1275_TRUE@raid_module_LDADD =
+@COND_i386_multiboot_TRUE@raid_module_LDADD =
+@COND_i386_pc_TRUE@raid_module_LDADD =
+@COND_i386_qemu_TRUE@raid_module_LDADD =
+@COND_mips_yeeloong_TRUE@raid_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@raid_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@raid_module_LDADD =
+@COND_x86_64_efi_TRUE@raid_module_LDADD =
+@COND_emu_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_i386_coreboot_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_i386_efi_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_i386_ieee1275_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_i386_multiboot_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_i386_pc_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_i386_qemu_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_mips_yeeloong_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_x86_64_efi_TRUE@raid5rec_module_SOURCES = disk/raid5_recover.c ## platform sources
+@COND_emu_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_raid5rec_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@raid5rec_module_LDADD =
+@COND_i386_coreboot_TRUE@raid5rec_module_LDADD =
+@COND_i386_efi_TRUE@raid5rec_module_LDADD =
+@COND_i386_ieee1275_TRUE@raid5rec_module_LDADD =
+@COND_i386_multiboot_TRUE@raid5rec_module_LDADD =
+@COND_i386_pc_TRUE@raid5rec_module_LDADD =
+@COND_i386_qemu_TRUE@raid5rec_module_LDADD =
+@COND_mips_yeeloong_TRUE@raid5rec_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@raid5rec_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@raid5rec_module_LDADD =
+@COND_x86_64_efi_TRUE@raid5rec_module_LDADD =
+@COND_emu_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid5rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid5rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid5rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid5rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_i386_coreboot_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_i386_efi_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_i386_ieee1275_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_i386_multiboot_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_i386_pc_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_i386_qemu_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_mips_yeeloong_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_x86_64_efi_TRUE@raid6rec_module_SOURCES = disk/raid6_recover.c ## platform sources
+@COND_emu_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_raid6rec_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@raid6rec_module_LDADD =
+@COND_i386_coreboot_TRUE@raid6rec_module_LDADD =
+@COND_i386_efi_TRUE@raid6rec_module_LDADD =
+@COND_i386_ieee1275_TRUE@raid6rec_module_LDADD =
+@COND_i386_multiboot_TRUE@raid6rec_module_LDADD =
+@COND_i386_pc_TRUE@raid6rec_module_LDADD =
+@COND_i386_qemu_TRUE@raid6rec_module_LDADD =
+@COND_mips_yeeloong_TRUE@raid6rec_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@raid6rec_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@raid6rec_module_LDADD =
+@COND_x86_64_efi_TRUE@raid6rec_module_LDADD =
+@COND_emu_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid6rec_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid6rec_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid6rec_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@raid6rec_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_i386_coreboot_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_i386_efi_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_i386_ieee1275_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_i386_multiboot_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_i386_pc_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_i386_qemu_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_mips_yeeloong_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_x86_64_efi_TRUE@scsi_module_SOURCES = disk/scsi.c ## platform sources
+@COND_emu_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_scsi_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@scsi_module_LDADD =
+@COND_i386_coreboot_TRUE@scsi_module_LDADD =
+@COND_i386_efi_TRUE@scsi_module_LDADD =
+@COND_i386_ieee1275_TRUE@scsi_module_LDADD =
+@COND_i386_multiboot_TRUE@scsi_module_LDADD =
+@COND_i386_pc_TRUE@scsi_module_LDADD =
+@COND_i386_qemu_TRUE@scsi_module_LDADD =
+@COND_mips_yeeloong_TRUE@scsi_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@scsi_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@scsi_module_LDADD =
+@COND_x86_64_efi_TRUE@scsi_module_LDADD =
+@COND_emu_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@scsi_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@scsi_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@scsi_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@scsi_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_i386_coreboot_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_i386_efi_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_i386_ieee1275_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_i386_multiboot_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_i386_pc_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_i386_qemu_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_mips_yeeloong_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_x86_64_efi_TRUE@memdisk_module_SOURCES = disk/memdisk.c ## platform sources
+@COND_emu_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_memdisk_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@memdisk_module_LDADD =
+@COND_i386_coreboot_TRUE@memdisk_module_LDADD =
+@COND_i386_efi_TRUE@memdisk_module_LDADD =
+@COND_i386_ieee1275_TRUE@memdisk_module_LDADD =
+@COND_i386_multiboot_TRUE@memdisk_module_LDADD =
+@COND_i386_pc_TRUE@memdisk_module_LDADD =
+@COND_i386_qemu_TRUE@memdisk_module_LDADD =
+@COND_mips_yeeloong_TRUE@memdisk_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@memdisk_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@memdisk_module_LDADD =
+@COND_x86_64_efi_TRUE@memdisk_module_LDADD =
+@COND_emu_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@memdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_i386_efi_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_i386_ieee1275_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_i386_multiboot_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_i386_pc_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_i386_qemu_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_mips_yeeloong_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_x86_64_efi_TRUE@ata_module_SOURCES = disk/ata.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ata_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@ata_module_LDADD =
+@COND_i386_efi_TRUE@ata_module_LDADD =
+@COND_i386_ieee1275_TRUE@ata_module_LDADD =
+@COND_i386_multiboot_TRUE@ata_module_LDADD =
+@COND_i386_pc_TRUE@ata_module_LDADD =
+@COND_i386_qemu_TRUE@ata_module_LDADD =
+@COND_mips_yeeloong_TRUE@ata_module_LDADD =
+@COND_x86_64_efi_TRUE@ata_module_LDADD =
+@COND_i386_coreboot_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_i386_efi_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_i386_ieee1275_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_i386_multiboot_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_i386_pc_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_i386_qemu_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_mips_yeeloong_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_x86_64_efi_TRUE@ata_pthru_module_SOURCES = disk/ata_pthru.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ata_pthru_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@ata_pthru_module_LDADD =
+@COND_i386_efi_TRUE@ata_pthru_module_LDADD =
+@COND_i386_ieee1275_TRUE@ata_pthru_module_LDADD =
+@COND_i386_multiboot_TRUE@ata_pthru_module_LDADD =
+@COND_i386_pc_TRUE@ata_pthru_module_LDADD =
+@COND_i386_qemu_TRUE@ata_pthru_module_LDADD =
+@COND_mips_yeeloong_TRUE@ata_pthru_module_LDADD =
+@COND_x86_64_efi_TRUE@ata_pthru_module_LDADD =
+@COND_i386_coreboot_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_pthru_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_pthru_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_pthru_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ata_pthru_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@biosdisk_module_SOURCES = disk/i386/pc/biosdisk.c ## platform sources
+@COND_i386_pc_TRUE@nodist_biosdisk_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@biosdisk_module_LDADD =
+@COND_i386_pc_TRUE@biosdisk_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@biosdisk_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@biosdisk_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@biosdisk_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_i386_coreboot_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_i386_efi_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_i386_ieee1275_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_i386_multiboot_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_i386_pc_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_i386_qemu_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_mips_yeeloong_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_x86_64_efi_TRUE@usbms_module_SOURCES = disk/usbms.c ## platform sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_usbms_module_SOURCES = ## platform nodist sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbms_module_LDADD =
+@COND_i386_coreboot_TRUE@usbms_module_LDADD =
+@COND_i386_efi_TRUE@usbms_module_LDADD =
+@COND_i386_ieee1275_TRUE@usbms_module_LDADD =
+@COND_i386_multiboot_TRUE@usbms_module_LDADD =
+@COND_i386_pc_TRUE@usbms_module_LDADD =
+@COND_i386_qemu_TRUE@usbms_module_LDADD =
+@COND_mips_yeeloong_TRUE@usbms_module_LDADD =
+@COND_x86_64_efi_TRUE@usbms_module_LDADD =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbms_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbms_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbms_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usbms_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nand_module_SOURCES = disk/ieee1275/nand.c ## platform sources
+@COND_i386_ieee1275_TRUE@nodist_nand_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nand_module_LDADD =
+@COND_i386_ieee1275_TRUE@nand_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nand_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nand_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nand_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@efiemu_module_SOURCES = efiemu/i386/pc/cfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+@COND_i386_ieee1275_TRUE@efiemu_module_SOURCES = efiemu/i386/nocfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+@COND_i386_multiboot_TRUE@efiemu_module_SOURCES = efiemu/i386/pc/cfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+@COND_i386_pc_TRUE@efiemu_module_SOURCES = efiemu/i386/pc/cfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+@COND_i386_qemu_TRUE@efiemu_module_SOURCES = efiemu/i386/nocfgtables.c efiemu/main.c efiemu/i386/loadcore32.c efiemu/i386/loadcore64.c efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c efiemu/loadcore32.c efiemu/loadcore64.c efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c efiemu/i386/coredetect.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_efiemu_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_efiemu_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_efiemu_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_efiemu_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_efiemu_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@efiemu_module_LDADD =
+@COND_i386_ieee1275_TRUE@efiemu_module_LDADD =
+@COND_i386_multiboot_TRUE@efiemu_module_LDADD =
+@COND_i386_pc_TRUE@efiemu_module_LDADD =
+@COND_i386_qemu_TRUE@efiemu_module_LDADD =
+@COND_i386_coreboot_TRUE@efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@efiemu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@efiemu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@efiemu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@efiemu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_i386_coreboot_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_i386_efi_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_i386_ieee1275_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_i386_multiboot_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_i386_pc_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_i386_qemu_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_x86_64_efi_TRUE@font_module_SOURCES = font/font.c font/font_cmd.c ## platform sources
+@COND_emu_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_font_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@font_module_LDADD =
+@COND_i386_coreboot_TRUE@font_module_LDADD =
+@COND_i386_efi_TRUE@font_module_LDADD =
+@COND_i386_ieee1275_TRUE@font_module_LDADD =
+@COND_i386_multiboot_TRUE@font_module_LDADD =
+@COND_i386_pc_TRUE@font_module_LDADD =
+@COND_i386_qemu_TRUE@font_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@font_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@font_module_LDADD =
+@COND_x86_64_efi_TRUE@font_module_LDADD =
+@COND_emu_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@font_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@font_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@font_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@font_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_i386_coreboot_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_i386_efi_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_i386_ieee1275_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_i386_multiboot_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_i386_pc_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_i386_qemu_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_mips_yeeloong_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_x86_64_efi_TRUE@affs_module_SOURCES = fs/affs.c ## platform sources
+@COND_emu_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_affs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@affs_module_LDADD =
+@COND_i386_coreboot_TRUE@affs_module_LDADD =
+@COND_i386_efi_TRUE@affs_module_LDADD =
+@COND_i386_ieee1275_TRUE@affs_module_LDADD =
+@COND_i386_multiboot_TRUE@affs_module_LDADD =
+@COND_i386_pc_TRUE@affs_module_LDADD =
+@COND_i386_qemu_TRUE@affs_module_LDADD =
+@COND_mips_yeeloong_TRUE@affs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@affs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@affs_module_LDADD =
+@COND_x86_64_efi_TRUE@affs_module_LDADD =
+@COND_emu_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@affs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@affs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@affs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@affs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_i386_coreboot_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_i386_efi_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_i386_ieee1275_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_i386_multiboot_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_i386_pc_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_i386_qemu_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_mips_yeeloong_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_x86_64_efi_TRUE@afs_module_SOURCES = fs/afs.c ## platform sources
+@COND_emu_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_afs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@afs_module_LDADD =
+@COND_i386_coreboot_TRUE@afs_module_LDADD =
+@COND_i386_efi_TRUE@afs_module_LDADD =
+@COND_i386_ieee1275_TRUE@afs_module_LDADD =
+@COND_i386_multiboot_TRUE@afs_module_LDADD =
+@COND_i386_pc_TRUE@afs_module_LDADD =
+@COND_i386_qemu_TRUE@afs_module_LDADD =
+@COND_mips_yeeloong_TRUE@afs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@afs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@afs_module_LDADD =
+@COND_x86_64_efi_TRUE@afs_module_LDADD =
+@COND_emu_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_i386_coreboot_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_i386_efi_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_i386_ieee1275_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_i386_multiboot_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_i386_pc_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_i386_qemu_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_mips_yeeloong_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_x86_64_efi_TRUE@afs_be_module_SOURCES = fs/afs_be.c ## platform sources
+@COND_emu_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_afs_be_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@afs_be_module_LDADD =
+@COND_i386_coreboot_TRUE@afs_be_module_LDADD =
+@COND_i386_efi_TRUE@afs_be_module_LDADD =
+@COND_i386_ieee1275_TRUE@afs_be_module_LDADD =
+@COND_i386_multiboot_TRUE@afs_be_module_LDADD =
+@COND_i386_pc_TRUE@afs_be_module_LDADD =
+@COND_i386_qemu_TRUE@afs_be_module_LDADD =
+@COND_mips_yeeloong_TRUE@afs_be_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@afs_be_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@afs_be_module_LDADD =
+@COND_x86_64_efi_TRUE@afs_be_module_LDADD =
+@COND_emu_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@afs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_i386_coreboot_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_i386_efi_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_i386_ieee1275_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_i386_multiboot_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_i386_pc_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_i386_qemu_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_mips_yeeloong_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_x86_64_efi_TRUE@befs_module_SOURCES = fs/befs.c ## platform sources
+@COND_emu_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_befs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@befs_module_LDADD =
+@COND_i386_coreboot_TRUE@befs_module_LDADD =
+@COND_i386_efi_TRUE@befs_module_LDADD =
+@COND_i386_ieee1275_TRUE@befs_module_LDADD =
+@COND_i386_multiboot_TRUE@befs_module_LDADD =
+@COND_i386_pc_TRUE@befs_module_LDADD =
+@COND_i386_qemu_TRUE@befs_module_LDADD =
+@COND_mips_yeeloong_TRUE@befs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@befs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@befs_module_LDADD =
+@COND_x86_64_efi_TRUE@befs_module_LDADD =
+@COND_emu_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_i386_coreboot_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_i386_efi_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_i386_ieee1275_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_i386_multiboot_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_i386_pc_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_i386_qemu_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_mips_yeeloong_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_x86_64_efi_TRUE@befs_be_module_SOURCES = fs/befs_be.c ## platform sources
+@COND_emu_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_befs_be_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@befs_be_module_LDADD =
+@COND_i386_coreboot_TRUE@befs_be_module_LDADD =
+@COND_i386_efi_TRUE@befs_be_module_LDADD =
+@COND_i386_ieee1275_TRUE@befs_be_module_LDADD =
+@COND_i386_multiboot_TRUE@befs_be_module_LDADD =
+@COND_i386_pc_TRUE@befs_be_module_LDADD =
+@COND_i386_qemu_TRUE@befs_be_module_LDADD =
+@COND_mips_yeeloong_TRUE@befs_be_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@befs_be_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@befs_be_module_LDADD =
+@COND_x86_64_efi_TRUE@befs_be_module_LDADD =
+@COND_emu_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_be_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_be_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_be_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@befs_be_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_i386_coreboot_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_i386_efi_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_i386_ieee1275_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_i386_multiboot_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_i386_pc_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_i386_qemu_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_mips_yeeloong_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_x86_64_efi_TRUE@btrfs_module_SOURCES = fs/btrfs.c lib/crc.c ## platform sources
+@COND_emu_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_btrfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@btrfs_module_LDADD =
+@COND_i386_coreboot_TRUE@btrfs_module_LDADD =
+@COND_i386_efi_TRUE@btrfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@btrfs_module_LDADD =
+@COND_i386_multiboot_TRUE@btrfs_module_LDADD =
+@COND_i386_pc_TRUE@btrfs_module_LDADD =
+@COND_i386_qemu_TRUE@btrfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@btrfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@btrfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@btrfs_module_LDADD =
+@COND_x86_64_efi_TRUE@btrfs_module_LDADD =
+@COND_emu_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@btrfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@btrfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@btrfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@btrfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_i386_coreboot_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_i386_efi_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_i386_ieee1275_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_i386_multiboot_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_i386_pc_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_i386_qemu_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_mips_yeeloong_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_x86_64_efi_TRUE@cpio_module_SOURCES = fs/cpio.c ## platform sources
+@COND_emu_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_cpio_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@cpio_module_LDADD =
+@COND_i386_coreboot_TRUE@cpio_module_LDADD =
+@COND_i386_efi_TRUE@cpio_module_LDADD =
+@COND_i386_ieee1275_TRUE@cpio_module_LDADD =
+@COND_i386_multiboot_TRUE@cpio_module_LDADD =
+@COND_i386_pc_TRUE@cpio_module_LDADD =
+@COND_i386_qemu_TRUE@cpio_module_LDADD =
+@COND_mips_yeeloong_TRUE@cpio_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@cpio_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@cpio_module_LDADD =
+@COND_x86_64_efi_TRUE@cpio_module_LDADD =
+@COND_emu_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@cpio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_i386_coreboot_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_i386_efi_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_i386_ieee1275_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_i386_multiboot_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_i386_pc_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_i386_qemu_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_mips_yeeloong_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_x86_64_efi_TRUE@ext2_module_SOURCES = fs/ext2.c ## platform sources
+@COND_emu_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ext2_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@ext2_module_LDADD =
+@COND_i386_coreboot_TRUE@ext2_module_LDADD =
+@COND_i386_efi_TRUE@ext2_module_LDADD =
+@COND_i386_ieee1275_TRUE@ext2_module_LDADD =
+@COND_i386_multiboot_TRUE@ext2_module_LDADD =
+@COND_i386_pc_TRUE@ext2_module_LDADD =
+@COND_i386_qemu_TRUE@ext2_module_LDADD =
+@COND_mips_yeeloong_TRUE@ext2_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@ext2_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@ext2_module_LDADD =
+@COND_x86_64_efi_TRUE@ext2_module_LDADD =
+@COND_emu_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ext2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ext2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ext2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ext2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_i386_coreboot_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_i386_efi_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_i386_ieee1275_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_i386_multiboot_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_i386_pc_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_i386_qemu_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_mips_yeeloong_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_x86_64_efi_TRUE@fat_module_SOURCES = fs/fat.c ## platform sources
+@COND_emu_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_fat_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@fat_module_LDADD =
+@COND_i386_coreboot_TRUE@fat_module_LDADD =
+@COND_i386_efi_TRUE@fat_module_LDADD =
+@COND_i386_ieee1275_TRUE@fat_module_LDADD =
+@COND_i386_multiboot_TRUE@fat_module_LDADD =
+@COND_i386_pc_TRUE@fat_module_LDADD =
+@COND_i386_qemu_TRUE@fat_module_LDADD =
+@COND_mips_yeeloong_TRUE@fat_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@fat_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@fat_module_LDADD =
+@COND_x86_64_efi_TRUE@fat_module_LDADD =
+@COND_emu_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fat_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fat_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fat_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fat_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_i386_coreboot_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_i386_efi_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_i386_ieee1275_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_i386_multiboot_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_i386_pc_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_i386_qemu_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_mips_yeeloong_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_x86_64_efi_TRUE@fshelp_module_SOURCES = fs/fshelp.c ## platform sources
+@COND_emu_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_fshelp_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@fshelp_module_LDADD =
+@COND_i386_coreboot_TRUE@fshelp_module_LDADD =
+@COND_i386_efi_TRUE@fshelp_module_LDADD =
+@COND_i386_ieee1275_TRUE@fshelp_module_LDADD =
+@COND_i386_multiboot_TRUE@fshelp_module_LDADD =
+@COND_i386_pc_TRUE@fshelp_module_LDADD =
+@COND_i386_qemu_TRUE@fshelp_module_LDADD =
+@COND_mips_yeeloong_TRUE@fshelp_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@fshelp_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@fshelp_module_LDADD =
+@COND_x86_64_efi_TRUE@fshelp_module_LDADD =
+@COND_emu_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fshelp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fshelp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fshelp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@fshelp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_i386_coreboot_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_i386_efi_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_i386_ieee1275_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_i386_multiboot_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_i386_pc_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_i386_qemu_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_mips_yeeloong_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_x86_64_efi_TRUE@hfs_module_SOURCES = fs/hfs.c ## platform sources
+@COND_emu_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_hfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@hfs_module_LDADD =
+@COND_i386_coreboot_TRUE@hfs_module_LDADD =
+@COND_i386_efi_TRUE@hfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@hfs_module_LDADD =
+@COND_i386_multiboot_TRUE@hfs_module_LDADD =
+@COND_i386_pc_TRUE@hfs_module_LDADD =
+@COND_i386_qemu_TRUE@hfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@hfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@hfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@hfs_module_LDADD =
+@COND_x86_64_efi_TRUE@hfs_module_LDADD =
+@COND_emu_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_i386_coreboot_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_i386_efi_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_i386_ieee1275_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_i386_multiboot_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_i386_pc_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_i386_qemu_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_mips_yeeloong_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_x86_64_efi_TRUE@hfsplus_module_SOURCES = fs/hfsplus.c ## platform sources
+@COND_emu_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_hfsplus_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@hfsplus_module_LDADD =
+@COND_i386_coreboot_TRUE@hfsplus_module_LDADD =
+@COND_i386_efi_TRUE@hfsplus_module_LDADD =
+@COND_i386_ieee1275_TRUE@hfsplus_module_LDADD =
+@COND_i386_multiboot_TRUE@hfsplus_module_LDADD =
+@COND_i386_pc_TRUE@hfsplus_module_LDADD =
+@COND_i386_qemu_TRUE@hfsplus_module_LDADD =
+@COND_mips_yeeloong_TRUE@hfsplus_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@hfsplus_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@hfsplus_module_LDADD =
+@COND_x86_64_efi_TRUE@hfsplus_module_LDADD =
+@COND_emu_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfsplus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfsplus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfsplus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hfsplus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_i386_coreboot_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_i386_efi_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_i386_ieee1275_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_i386_multiboot_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_i386_pc_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_i386_qemu_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_mips_yeeloong_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_x86_64_efi_TRUE@iso9660_module_SOURCES = fs/iso9660.c ## platform sources
+@COND_emu_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_iso9660_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@iso9660_module_LDADD =
+@COND_i386_coreboot_TRUE@iso9660_module_LDADD =
+@COND_i386_efi_TRUE@iso9660_module_LDADD =
+@COND_i386_ieee1275_TRUE@iso9660_module_LDADD =
+@COND_i386_multiboot_TRUE@iso9660_module_LDADD =
+@COND_i386_pc_TRUE@iso9660_module_LDADD =
+@COND_i386_qemu_TRUE@iso9660_module_LDADD =
+@COND_mips_yeeloong_TRUE@iso9660_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@iso9660_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@iso9660_module_LDADD =
+@COND_x86_64_efi_TRUE@iso9660_module_LDADD =
+@COND_emu_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iso9660_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iso9660_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iso9660_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@iso9660_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_i386_coreboot_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_i386_efi_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_i386_ieee1275_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_i386_multiboot_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_i386_pc_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_i386_qemu_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_mips_yeeloong_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_x86_64_efi_TRUE@jfs_module_SOURCES = fs/jfs.c ## platform sources
+@COND_emu_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_jfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@jfs_module_LDADD =
+@COND_i386_coreboot_TRUE@jfs_module_LDADD =
+@COND_i386_efi_TRUE@jfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@jfs_module_LDADD =
+@COND_i386_multiboot_TRUE@jfs_module_LDADD =
+@COND_i386_pc_TRUE@jfs_module_LDADD =
+@COND_i386_qemu_TRUE@jfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@jfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@jfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@jfs_module_LDADD =
+@COND_x86_64_efi_TRUE@jfs_module_LDADD =
+@COND_emu_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_i386_coreboot_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_i386_efi_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_i386_ieee1275_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_i386_multiboot_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_i386_pc_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_i386_qemu_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_mips_yeeloong_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_x86_64_efi_TRUE@minix_module_SOURCES = fs/minix.c ## platform sources
+@COND_emu_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_minix_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@minix_module_LDADD =
+@COND_i386_coreboot_TRUE@minix_module_LDADD =
+@COND_i386_efi_TRUE@minix_module_LDADD =
+@COND_i386_ieee1275_TRUE@minix_module_LDADD =
+@COND_i386_multiboot_TRUE@minix_module_LDADD =
+@COND_i386_pc_TRUE@minix_module_LDADD =
+@COND_i386_qemu_TRUE@minix_module_LDADD =
+@COND_mips_yeeloong_TRUE@minix_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@minix_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@minix_module_LDADD =
+@COND_x86_64_efi_TRUE@minix_module_LDADD =
+@COND_emu_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_i386_coreboot_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_i386_efi_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_i386_ieee1275_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_i386_multiboot_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_i386_pc_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_i386_qemu_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_mips_yeeloong_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_x86_64_efi_TRUE@minix2_module_SOURCES = fs/minix2.c ## platform sources
+@COND_emu_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_minix2_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@minix2_module_LDADD =
+@COND_i386_coreboot_TRUE@minix2_module_LDADD =
+@COND_i386_efi_TRUE@minix2_module_LDADD =
+@COND_i386_ieee1275_TRUE@minix2_module_LDADD =
+@COND_i386_multiboot_TRUE@minix2_module_LDADD =
+@COND_i386_pc_TRUE@minix2_module_LDADD =
+@COND_i386_qemu_TRUE@minix2_module_LDADD =
+@COND_mips_yeeloong_TRUE@minix2_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@minix2_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@minix2_module_LDADD =
+@COND_x86_64_efi_TRUE@minix2_module_LDADD =
+@COND_emu_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@minix2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_i386_coreboot_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_i386_efi_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_i386_ieee1275_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_i386_multiboot_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_i386_pc_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_i386_qemu_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_mips_yeeloong_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_x86_64_efi_TRUE@nilfs2_module_SOURCES = fs/nilfs2.c ## platform sources
+@COND_emu_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_nilfs2_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@nilfs2_module_LDADD =
+@COND_i386_coreboot_TRUE@nilfs2_module_LDADD =
+@COND_i386_efi_TRUE@nilfs2_module_LDADD =
+@COND_i386_ieee1275_TRUE@nilfs2_module_LDADD =
+@COND_i386_multiboot_TRUE@nilfs2_module_LDADD =
+@COND_i386_pc_TRUE@nilfs2_module_LDADD =
+@COND_i386_qemu_TRUE@nilfs2_module_LDADD =
+@COND_mips_yeeloong_TRUE@nilfs2_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@nilfs2_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@nilfs2_module_LDADD =
+@COND_x86_64_efi_TRUE@nilfs2_module_LDADD =
+@COND_emu_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@nilfs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@nilfs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@nilfs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@nilfs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_i386_coreboot_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_i386_efi_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_i386_ieee1275_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_i386_multiboot_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_i386_pc_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_i386_qemu_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_mips_yeeloong_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_x86_64_efi_TRUE@ntfs_module_SOURCES = fs/ntfs.c ## platform sources
+@COND_emu_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ntfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@ntfs_module_LDADD =
+@COND_i386_coreboot_TRUE@ntfs_module_LDADD =
+@COND_i386_efi_TRUE@ntfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@ntfs_module_LDADD =
+@COND_i386_multiboot_TRUE@ntfs_module_LDADD =
+@COND_i386_pc_TRUE@ntfs_module_LDADD =
+@COND_i386_qemu_TRUE@ntfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@ntfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@ntfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@ntfs_module_LDADD =
+@COND_x86_64_efi_TRUE@ntfs_module_LDADD =
+@COND_emu_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_i386_coreboot_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_i386_efi_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_i386_ieee1275_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_i386_multiboot_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_i386_pc_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_i386_qemu_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_mips_yeeloong_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_x86_64_efi_TRUE@ntfscomp_module_SOURCES = fs/ntfscomp.c ## platform sources
+@COND_emu_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ntfscomp_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@ntfscomp_module_LDADD =
+@COND_i386_coreboot_TRUE@ntfscomp_module_LDADD =
+@COND_i386_efi_TRUE@ntfscomp_module_LDADD =
+@COND_i386_ieee1275_TRUE@ntfscomp_module_LDADD =
+@COND_i386_multiboot_TRUE@ntfscomp_module_LDADD =
+@COND_i386_pc_TRUE@ntfscomp_module_LDADD =
+@COND_i386_qemu_TRUE@ntfscomp_module_LDADD =
+@COND_mips_yeeloong_TRUE@ntfscomp_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@ntfscomp_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@ntfscomp_module_LDADD =
+@COND_x86_64_efi_TRUE@ntfscomp_module_LDADD =
+@COND_emu_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfscomp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfscomp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfscomp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ntfscomp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_i386_coreboot_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_i386_efi_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_i386_ieee1275_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_i386_multiboot_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_i386_pc_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_i386_qemu_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_mips_yeeloong_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_x86_64_efi_TRUE@reiserfs_module_SOURCES = fs/reiserfs.c ## platform sources
+@COND_emu_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_reiserfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@reiserfs_module_LDADD =
+@COND_i386_coreboot_TRUE@reiserfs_module_LDADD =
+@COND_i386_efi_TRUE@reiserfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@reiserfs_module_LDADD =
+@COND_i386_multiboot_TRUE@reiserfs_module_LDADD =
+@COND_i386_pc_TRUE@reiserfs_module_LDADD =
+@COND_i386_qemu_TRUE@reiserfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@reiserfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@reiserfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@reiserfs_module_LDADD =
+@COND_x86_64_efi_TRUE@reiserfs_module_LDADD =
+@COND_emu_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reiserfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reiserfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reiserfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@reiserfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_i386_coreboot_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_i386_efi_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_i386_ieee1275_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_i386_multiboot_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_i386_pc_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_i386_qemu_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_mips_yeeloong_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_x86_64_efi_TRUE@sfs_module_SOURCES = fs/sfs.c ## platform sources
+@COND_emu_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_sfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@sfs_module_LDADD =
+@COND_i386_coreboot_TRUE@sfs_module_LDADD =
+@COND_i386_efi_TRUE@sfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@sfs_module_LDADD =
+@COND_i386_multiboot_TRUE@sfs_module_LDADD =
+@COND_i386_pc_TRUE@sfs_module_LDADD =
+@COND_i386_qemu_TRUE@sfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@sfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@sfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@sfs_module_LDADD =
+@COND_x86_64_efi_TRUE@sfs_module_LDADD =
+@COND_emu_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@sfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_i386_coreboot_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_i386_efi_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_i386_ieee1275_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_i386_multiboot_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_i386_pc_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_i386_qemu_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_mips_yeeloong_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_x86_64_efi_TRUE@tar_module_SOURCES = fs/tar.c ## platform sources
+@COND_emu_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_tar_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@tar_module_LDADD =
+@COND_i386_coreboot_TRUE@tar_module_LDADD =
+@COND_i386_efi_TRUE@tar_module_LDADD =
+@COND_i386_ieee1275_TRUE@tar_module_LDADD =
+@COND_i386_multiboot_TRUE@tar_module_LDADD =
+@COND_i386_pc_TRUE@tar_module_LDADD =
+@COND_i386_qemu_TRUE@tar_module_LDADD =
+@COND_mips_yeeloong_TRUE@tar_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@tar_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@tar_module_LDADD =
+@COND_x86_64_efi_TRUE@tar_module_LDADD =
+@COND_emu_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tar_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tar_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tar_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tar_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_i386_coreboot_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_i386_efi_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_i386_ieee1275_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_i386_multiboot_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_i386_pc_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_i386_qemu_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_mips_yeeloong_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_x86_64_efi_TRUE@udf_module_SOURCES = fs/udf.c ## platform sources
+@COND_emu_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_udf_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@udf_module_LDADD =
+@COND_i386_coreboot_TRUE@udf_module_LDADD =
+@COND_i386_efi_TRUE@udf_module_LDADD =
+@COND_i386_ieee1275_TRUE@udf_module_LDADD =
+@COND_i386_multiboot_TRUE@udf_module_LDADD =
+@COND_i386_pc_TRUE@udf_module_LDADD =
+@COND_i386_qemu_TRUE@udf_module_LDADD =
+@COND_mips_yeeloong_TRUE@udf_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@udf_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@udf_module_LDADD =
+@COND_x86_64_efi_TRUE@udf_module_LDADD =
+@COND_emu_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@udf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@udf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@udf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@udf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_i386_coreboot_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_i386_efi_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_i386_ieee1275_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_i386_multiboot_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_i386_pc_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_i386_qemu_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_mips_yeeloong_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_x86_64_efi_TRUE@ufs1_module_SOURCES = fs/ufs.c ## platform sources
+@COND_emu_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ufs1_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@ufs1_module_LDADD =
+@COND_i386_coreboot_TRUE@ufs1_module_LDADD =
+@COND_i386_efi_TRUE@ufs1_module_LDADD =
+@COND_i386_ieee1275_TRUE@ufs1_module_LDADD =
+@COND_i386_multiboot_TRUE@ufs1_module_LDADD =
+@COND_i386_pc_TRUE@ufs1_module_LDADD =
+@COND_i386_qemu_TRUE@ufs1_module_LDADD =
+@COND_mips_yeeloong_TRUE@ufs1_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@ufs1_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@ufs1_module_LDADD =
+@COND_x86_64_efi_TRUE@ufs1_module_LDADD =
+@COND_emu_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_i386_coreboot_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_i386_efi_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_i386_ieee1275_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_i386_multiboot_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_i386_pc_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_i386_qemu_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_mips_yeeloong_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_x86_64_efi_TRUE@ufs2_module_SOURCES = fs/ufs2.c ## platform sources
+@COND_emu_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_ufs2_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@ufs2_module_LDADD =
+@COND_i386_coreboot_TRUE@ufs2_module_LDADD =
+@COND_i386_efi_TRUE@ufs2_module_LDADD =
+@COND_i386_ieee1275_TRUE@ufs2_module_LDADD =
+@COND_i386_multiboot_TRUE@ufs2_module_LDADD =
+@COND_i386_pc_TRUE@ufs2_module_LDADD =
+@COND_i386_qemu_TRUE@ufs2_module_LDADD =
+@COND_mips_yeeloong_TRUE@ufs2_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@ufs2_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@ufs2_module_LDADD =
+@COND_x86_64_efi_TRUE@ufs2_module_LDADD =
+@COND_emu_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@ufs2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_i386_coreboot_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_i386_efi_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_i386_ieee1275_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_i386_multiboot_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_i386_pc_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_i386_qemu_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_mips_yeeloong_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_x86_64_efi_TRUE@xfs_module_SOURCES = fs/xfs.c ## platform sources
+@COND_emu_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_xfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@xfs_module_LDADD =
+@COND_i386_coreboot_TRUE@xfs_module_LDADD =
+@COND_i386_efi_TRUE@xfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@xfs_module_LDADD =
+@COND_i386_multiboot_TRUE@xfs_module_LDADD =
+@COND_i386_pc_TRUE@xfs_module_LDADD =
+@COND_i386_qemu_TRUE@xfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@xfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@xfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@xfs_module_LDADD =
+@COND_x86_64_efi_TRUE@xfs_module_LDADD =
+@COND_emu_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_i386_coreboot_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_i386_efi_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_i386_ieee1275_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_i386_multiboot_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_i386_pc_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_i386_qemu_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_mips_yeeloong_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_x86_64_efi_TRUE@zfs_module_SOURCES = fs/zfs/zfs.c fs/zfs/zfs_lzjb.c fs/zfs/zfs_sha256.c fs/zfs/zfs_fletcher.c ## platform sources
+@COND_emu_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_zfs_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@zfs_module_LDADD =
+@COND_i386_coreboot_TRUE@zfs_module_LDADD =
+@COND_i386_efi_TRUE@zfs_module_LDADD =
+@COND_i386_ieee1275_TRUE@zfs_module_LDADD =
+@COND_i386_multiboot_TRUE@zfs_module_LDADD =
+@COND_i386_pc_TRUE@zfs_module_LDADD =
+@COND_i386_qemu_TRUE@zfs_module_LDADD =
+@COND_mips_yeeloong_TRUE@zfs_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@zfs_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@zfs_module_LDADD =
+@COND_x86_64_efi_TRUE@zfs_module_LDADD =
+@COND_emu_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_i386_coreboot_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_i386_efi_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_i386_ieee1275_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_i386_multiboot_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_i386_pc_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_i386_qemu_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_mips_yeeloong_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_x86_64_efi_TRUE@zfsinfo_module_SOURCES = fs/zfs/zfsinfo.c ## platform sources
+@COND_emu_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_zfsinfo_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@zfsinfo_module_LDADD =
+@COND_i386_coreboot_TRUE@zfsinfo_module_LDADD =
+@COND_i386_efi_TRUE@zfsinfo_module_LDADD =
+@COND_i386_ieee1275_TRUE@zfsinfo_module_LDADD =
+@COND_i386_multiboot_TRUE@zfsinfo_module_LDADD =
+@COND_i386_pc_TRUE@zfsinfo_module_LDADD =
+@COND_i386_qemu_TRUE@zfsinfo_module_LDADD =
+@COND_mips_yeeloong_TRUE@zfsinfo_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@zfsinfo_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@zfsinfo_module_LDADD =
+@COND_x86_64_efi_TRUE@zfsinfo_module_LDADD =
+@COND_emu_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfsinfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfsinfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfsinfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@zfsinfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxe_module_SOURCES = fs/i386/pc/pxe.c ## platform sources
+@COND_i386_pc_TRUE@nodist_pxe_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@pxe_module_LDADD =
+@COND_i386_pc_TRUE@pxe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@pxe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_i386_coreboot_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_i386_efi_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_i386_ieee1275_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_i386_multiboot_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_i386_pc_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_i386_qemu_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_mips_yeeloong_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_x86_64_efi_TRUE@gettext_module_SOURCES = gettext/gettext.c ## platform sources
+@COND_emu_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gettext_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gettext_module_LDADD =
+@COND_i386_coreboot_TRUE@gettext_module_LDADD =
+@COND_i386_efi_TRUE@gettext_module_LDADD =
+@COND_i386_ieee1275_TRUE@gettext_module_LDADD =
+@COND_i386_multiboot_TRUE@gettext_module_LDADD =
+@COND_i386_pc_TRUE@gettext_module_LDADD =
+@COND_i386_qemu_TRUE@gettext_module_LDADD =
+@COND_mips_yeeloong_TRUE@gettext_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gettext_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gettext_module_LDADD =
+@COND_x86_64_efi_TRUE@gettext_module_LDADD =
+@COND_emu_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gettext_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gettext_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gettext_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gettext_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_i386_coreboot_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_i386_efi_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_i386_ieee1275_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_i386_multiboot_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_i386_pc_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_i386_qemu_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_mips_yeeloong_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_x86_64_efi_TRUE@gfxmenu_module_SOURCES = gfxmenu/gfxmenu.c gfxmenu/model.c gfxmenu/view.c gfxmenu/font.c gfxmenu/icon_manager.c gfxmenu/theme_loader.c gfxmenu/widget-box.c gfxmenu/gui_canvas.c gfxmenu/gui_circular_progress.c gfxmenu/gui_box.c gfxmenu/gui_label.c gfxmenu/gui_list.c gfxmenu/gui_image.c gfxmenu/gui_progress_bar.c gfxmenu/gui_util.c gfxmenu/gui_string_util.c gfxmenu/named_colors.c ## platform sources
+@COND_emu_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gfxmenu_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gfxmenu_module_LDADD =
+@COND_i386_coreboot_TRUE@gfxmenu_module_LDADD =
+@COND_i386_efi_TRUE@gfxmenu_module_LDADD =
+@COND_i386_ieee1275_TRUE@gfxmenu_module_LDADD =
+@COND_i386_multiboot_TRUE@gfxmenu_module_LDADD =
+@COND_i386_pc_TRUE@gfxmenu_module_LDADD =
+@COND_i386_qemu_TRUE@gfxmenu_module_LDADD =
+@COND_mips_yeeloong_TRUE@gfxmenu_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gfxmenu_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gfxmenu_module_LDADD =
+@COND_x86_64_efi_TRUE@gfxmenu_module_LDADD =
+@COND_emu_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxmenu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxmenu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxmenu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxmenu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_i386_coreboot_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_i386_efi_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_i386_ieee1275_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_i386_multiboot_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_i386_pc_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_i386_qemu_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_mips_yeeloong_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_x86_64_efi_TRUE@hello_module_SOURCES = hello/hello.c ## platform sources
+@COND_emu_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_hello_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@hello_module_LDADD =
+@COND_i386_coreboot_TRUE@hello_module_LDADD =
+@COND_i386_efi_TRUE@hello_module_LDADD =
+@COND_i386_ieee1275_TRUE@hello_module_LDADD =
+@COND_i386_multiboot_TRUE@hello_module_LDADD =
+@COND_i386_pc_TRUE@hello_module_LDADD =
+@COND_i386_qemu_TRUE@hello_module_LDADD =
+@COND_mips_yeeloong_TRUE@hello_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@hello_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@hello_module_LDADD =
+@COND_x86_64_efi_TRUE@hello_module_LDADD =
+@COND_emu_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hello_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hello_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hello_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@hello_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_i386_coreboot_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_i386_efi_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_i386_ieee1275_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_i386_multiboot_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_i386_pc_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_i386_qemu_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_mips_yeeloong_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_x86_64_efi_TRUE@gzio_module_SOURCES = io/gzio.c ## platform sources
+@COND_emu_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gzio_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gzio_module_LDADD =
+@COND_i386_coreboot_TRUE@gzio_module_LDADD =
+@COND_i386_efi_TRUE@gzio_module_LDADD =
+@COND_i386_ieee1275_TRUE@gzio_module_LDADD =
+@COND_i386_multiboot_TRUE@gzio_module_LDADD =
+@COND_i386_pc_TRUE@gzio_module_LDADD =
+@COND_i386_qemu_TRUE@gzio_module_LDADD =
+@COND_mips_yeeloong_TRUE@gzio_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gzio_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gzio_module_LDADD =
+@COND_x86_64_efi_TRUE@gzio_module_LDADD =
+@COND_emu_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_i386_coreboot_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_i386_efi_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_i386_ieee1275_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_i386_multiboot_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_i386_pc_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_i386_qemu_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_x86_64_efi_TRUE@bufio_module_SOURCES = io/bufio.c ## platform sources
+@COND_emu_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_bufio_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@bufio_module_LDADD =
+@COND_i386_coreboot_TRUE@bufio_module_LDADD =
+@COND_i386_efi_TRUE@bufio_module_LDADD =
+@COND_i386_ieee1275_TRUE@bufio_module_LDADD =
+@COND_i386_multiboot_TRUE@bufio_module_LDADD =
+@COND_i386_pc_TRUE@bufio_module_LDADD =
+@COND_i386_qemu_TRUE@bufio_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@bufio_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@bufio_module_LDADD =
+@COND_x86_64_efi_TRUE@bufio_module_LDADD =
+@COND_emu_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bufio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bufio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bufio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bufio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_i386_coreboot_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_i386_efi_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_i386_ieee1275_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_i386_multiboot_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_i386_pc_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_i386_qemu_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_mips_yeeloong_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_x86_64_efi_TRUE@elf_module_SOURCES = kern/elf.c ## platform sources
+@COND_emu_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_elf_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@elf_module_LDADD =
+@COND_i386_coreboot_TRUE@elf_module_LDADD =
+@COND_i386_efi_TRUE@elf_module_LDADD =
+@COND_i386_ieee1275_TRUE@elf_module_LDADD =
+@COND_i386_multiboot_TRUE@elf_module_LDADD =
+@COND_i386_pc_TRUE@elf_module_LDADD =
+@COND_i386_qemu_TRUE@elf_module_LDADD =
+@COND_mips_yeeloong_TRUE@elf_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@elf_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@elf_module_LDADD =
+@COND_x86_64_efi_TRUE@elf_module_LDADD =
+@COND_emu_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@elf_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@elf_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@elf_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@elf_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_i386_coreboot_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_i386_efi_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_i386_ieee1275_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_i386_multiboot_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_i386_pc_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_i386_qemu_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_mips_yeeloong_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_x86_64_efi_TRUE@crypto_module_SOURCES = lib/crypto.c ## platform sources
+@COND_emu_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_crypto_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@crypto_module_LDADD =
+@COND_i386_coreboot_TRUE@crypto_module_LDADD =
+@COND_i386_efi_TRUE@crypto_module_LDADD =
+@COND_i386_ieee1275_TRUE@crypto_module_LDADD =
+@COND_i386_multiboot_TRUE@crypto_module_LDADD =
+@COND_i386_pc_TRUE@crypto_module_LDADD =
+@COND_i386_qemu_TRUE@crypto_module_LDADD =
+@COND_mips_yeeloong_TRUE@crypto_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@crypto_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@crypto_module_LDADD =
+@COND_x86_64_efi_TRUE@crypto_module_LDADD =
+@COND_emu_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@crypto_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@crypto_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@crypto_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@crypto_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_i386_coreboot_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_i386_efi_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_i386_ieee1275_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_i386_multiboot_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_i386_pc_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_i386_qemu_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_mips_yeeloong_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_x86_64_efi_TRUE@pbkdf2_module_SOURCES = lib/pbkdf2.c ## platform sources
+@COND_emu_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_pbkdf2_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@pbkdf2_module_LDADD =
+@COND_i386_coreboot_TRUE@pbkdf2_module_LDADD =
+@COND_i386_efi_TRUE@pbkdf2_module_LDADD =
+@COND_i386_ieee1275_TRUE@pbkdf2_module_LDADD =
+@COND_i386_multiboot_TRUE@pbkdf2_module_LDADD =
+@COND_i386_pc_TRUE@pbkdf2_module_LDADD =
+@COND_i386_qemu_TRUE@pbkdf2_module_LDADD =
+@COND_mips_yeeloong_TRUE@pbkdf2_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@pbkdf2_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@pbkdf2_module_LDADD =
+@COND_x86_64_efi_TRUE@pbkdf2_module_LDADD =
+@COND_emu_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pbkdf2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pbkdf2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pbkdf2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@pbkdf2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+@COND_i386_efi_TRUE@relocator_module_SOURCES = lib/efi/relocator.c lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+@COND_i386_ieee1275_TRUE@relocator_module_SOURCES = lib/ieee1275/relocator.c lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+@COND_i386_multiboot_TRUE@relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+@COND_i386_pc_TRUE@relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+@COND_i386_qemu_TRUE@relocator_module_SOURCES = lib/i386/relocator_asm.S lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+@COND_mips_yeeloong_TRUE@relocator_module_SOURCES = lib/mips/relocator_asm.S lib/mips/relocator.c lib/relocator.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@relocator_module_SOURCES = lib/powerpc/relocator_asm.S lib/powerpc/relocator.c lib/ieee1275/relocator.c lib/relocator.c ## platform sources
+@COND_x86_64_efi_TRUE@relocator_module_SOURCES = lib/x86_64/relocator_asm.S lib/efi/relocator.c lib/i386/relocator16.S lib/i386/relocator32.S lib/i386/relocator64.S lib/i386/relocator.c lib/relocator.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_relocator_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@relocator_module_LDADD =
+@COND_i386_efi_TRUE@relocator_module_LDADD =
+@COND_i386_ieee1275_TRUE@relocator_module_LDADD =
+@COND_i386_multiboot_TRUE@relocator_module_LDADD =
+@COND_i386_pc_TRUE@relocator_module_LDADD =
+@COND_i386_qemu_TRUE@relocator_module_LDADD =
+@COND_mips_yeeloong_TRUE@relocator_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@relocator_module_LDADD =
+@COND_x86_64_efi_TRUE@relocator_module_LDADD =
+@COND_i386_coreboot_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@relocator_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@relocator_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@relocator_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@relocator_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+@COND_i386_efi_TRUE@datetime_module_SOURCES = lib/efi/datetime.c ## platform sources
+@COND_i386_ieee1275_TRUE@datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+@COND_i386_multiboot_TRUE@datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+@COND_i386_pc_TRUE@datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+@COND_i386_qemu_TRUE@datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+@COND_mips_yeeloong_TRUE@datetime_module_SOURCES = lib/cmos_datetime.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@datetime_module_SOURCES = lib/ieee1275/datetime.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@datetime_module_SOURCES = lib/ieee1275/datetime.c ## platform sources
+@COND_x86_64_efi_TRUE@datetime_module_SOURCES = lib/efi/datetime.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_datetime_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@datetime_module_LDADD =
+@COND_i386_efi_TRUE@datetime_module_LDADD =
+@COND_i386_ieee1275_TRUE@datetime_module_LDADD =
+@COND_i386_multiboot_TRUE@datetime_module_LDADD =
+@COND_i386_pc_TRUE@datetime_module_LDADD =
+@COND_i386_qemu_TRUE@datetime_module_LDADD =
+@COND_mips_yeeloong_TRUE@datetime_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@datetime_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@datetime_module_LDADD =
+@COND_x86_64_efi_TRUE@datetime_module_LDADD =
+@COND_i386_coreboot_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datetime_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datetime_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datetime_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datetime_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_i386_coreboot_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_i386_efi_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_i386_ieee1275_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_i386_multiboot_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_i386_pc_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_i386_qemu_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_mips_yeeloong_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_powerpc_ieee1275_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_sparc64_ieee1275_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_x86_64_efi_TRUE@setjmp_module_SOURCES = lib/setjmp.S ## platform sources
+@COND_emu_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_setjmp_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@setjmp_module_LDADD =
+@COND_i386_coreboot_TRUE@setjmp_module_LDADD =
+@COND_i386_efi_TRUE@setjmp_module_LDADD =
+@COND_i386_ieee1275_TRUE@setjmp_module_LDADD =
+@COND_i386_multiboot_TRUE@setjmp_module_LDADD =
+@COND_i386_pc_TRUE@setjmp_module_LDADD =
+@COND_i386_qemu_TRUE@setjmp_module_LDADD =
+@COND_mips_yeeloong_TRUE@setjmp_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@setjmp_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@setjmp_module_LDADD =
+@COND_x86_64_efi_TRUE@setjmp_module_LDADD =
+@COND_emu_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setjmp_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setjmp_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setjmp_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@setjmp_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@aout_module_SOURCES = loader/aout.c ## platform sources
+@COND_i386_efi_TRUE@aout_module_SOURCES = loader/aout.c ## platform sources
+@COND_i386_ieee1275_TRUE@aout_module_SOURCES = loader/aout.c ## platform sources
+@COND_i386_multiboot_TRUE@aout_module_SOURCES = loader/aout.c ## platform sources
+@COND_i386_pc_TRUE@aout_module_SOURCES = loader/aout.c ## platform sources
+@COND_i386_qemu_TRUE@aout_module_SOURCES = loader/aout.c ## platform sources
+@COND_x86_64_efi_TRUE@aout_module_SOURCES = loader/aout.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_aout_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_aout_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_aout_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_aout_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_aout_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_aout_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_aout_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@aout_module_LDADD =
+@COND_i386_efi_TRUE@aout_module_LDADD =
+@COND_i386_ieee1275_TRUE@aout_module_LDADD =
+@COND_i386_multiboot_TRUE@aout_module_LDADD =
+@COND_i386_pc_TRUE@aout_module_LDADD =
+@COND_i386_qemu_TRUE@aout_module_LDADD =
+@COND_x86_64_efi_TRUE@aout_module_LDADD =
+@COND_i386_coreboot_TRUE@aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@aout_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@aout_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@aout_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@aout_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+@COND_i386_efi_TRUE@bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+@COND_i386_ieee1275_TRUE@bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+@COND_i386_multiboot_TRUE@bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+@COND_i386_pc_TRUE@bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+@COND_i386_qemu_TRUE@bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+@COND_x86_64_efi_TRUE@bsd_module_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_bsd_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@bsd_module_LDADD =
+@COND_i386_efi_TRUE@bsd_module_LDADD =
+@COND_i386_ieee1275_TRUE@bsd_module_LDADD =
+@COND_i386_multiboot_TRUE@bsd_module_LDADD =
+@COND_i386_pc_TRUE@bsd_module_LDADD =
+@COND_i386_qemu_TRUE@bsd_module_LDADD =
+@COND_x86_64_efi_TRUE@bsd_module_LDADD =
+@COND_i386_coreboot_TRUE@bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux16_module_SOURCES = loader/i386/pc/linux.c lib/cmdline.c ## platform sources
+@COND_i386_pc_TRUE@nodist_linux16_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@linux16_module_LDADD =
+@COND_i386_pc_TRUE@linux16_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux16_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux16_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux16_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntldr_module_SOURCES = loader/i386/pc/ntldr.c ## platform sources
+@COND_i386_pc_TRUE@nodist_ntldr_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@ntldr_module_LDADD =
+@COND_i386_pc_TRUE@ntldr_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntldr_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntldr_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@ntldr_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_i386_efi_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_i386_ieee1275_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_i386_multiboot_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_i386_pc_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_i386_qemu_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_mips_yeeloong_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_x86_64_efi_TRUE@multiboot2_module_SOURCES = loader/multiboot.c loader/multiboot_mbi2.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_multiboot2_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@multiboot2_module_LDADD =
+@COND_i386_efi_TRUE@multiboot2_module_LDADD =
+@COND_i386_ieee1275_TRUE@multiboot2_module_LDADD =
+@COND_i386_multiboot_TRUE@multiboot2_module_LDADD =
+@COND_i386_pc_TRUE@multiboot2_module_LDADD =
+@COND_i386_qemu_TRUE@multiboot2_module_LDADD =
+@COND_mips_yeeloong_TRUE@multiboot2_module_LDADD =
+@COND_x86_64_efi_TRUE@multiboot2_module_LDADD =
+@COND_i386_coreboot_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@multiboot2_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@multiboot2_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_i386_efi_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_i386_ieee1275_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_i386_multiboot_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_i386_pc_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_i386_qemu_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_mips_yeeloong_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_x86_64_efi_TRUE@multiboot2_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -DGRUB_USE_MULTIBOOT2
+@COND_i386_coreboot_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@multiboot2_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+@COND_i386_efi_TRUE@multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+@COND_i386_ieee1275_TRUE@multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+@COND_i386_multiboot_TRUE@multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+@COND_i386_pc_TRUE@multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+@COND_i386_qemu_TRUE@multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+@COND_x86_64_efi_TRUE@multiboot_module_SOURCES = loader/i386/multiboot_mbi.c loader/multiboot.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_multiboot_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_multiboot_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_multiboot_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_multiboot_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_multiboot_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_multiboot_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_multiboot_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@multiboot_module_LDADD =
+@COND_i386_efi_TRUE@multiboot_module_LDADD =
+@COND_i386_ieee1275_TRUE@multiboot_module_LDADD =
+@COND_i386_multiboot_TRUE@multiboot_module_LDADD =
+@COND_i386_pc_TRUE@multiboot_module_LDADD =
+@COND_i386_qemu_TRUE@multiboot_module_LDADD =
+@COND_x86_64_efi_TRUE@multiboot_module_LDADD =
+@COND_i386_coreboot_TRUE@multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@multiboot_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@multiboot_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@multiboot_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@multiboot_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+@COND_i386_efi_TRUE@linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+@COND_i386_ieee1275_TRUE@linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+@COND_i386_multiboot_TRUE@linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+@COND_i386_pc_TRUE@linux_module_SOURCES = lib/i386/pc/vesa_modes_table.c loader/i386/linux.c lib/cmdline.c ## platform sources
+@COND_i386_qemu_TRUE@linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+@COND_mips_yeeloong_TRUE@linux_module_SOURCES = loader/mips/linux.c lib/cmdline.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@linux_module_SOURCES = loader/powerpc/ieee1275/linux.c lib/cmdline.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@linux_module_SOURCES = loader/sparc64/ieee1275/linux.c lib/cmdline.c ## platform sources
+@COND_x86_64_efi_TRUE@linux_module_SOURCES = loader/i386/linux.c lib/cmdline.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_linux_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@linux_module_LDADD =
+@COND_i386_efi_TRUE@linux_module_LDADD =
+@COND_i386_ieee1275_TRUE@linux_module_LDADD =
+@COND_i386_multiboot_TRUE@linux_module_LDADD =
+@COND_i386_pc_TRUE@linux_module_LDADD =
+@COND_i386_qemu_TRUE@linux_module_LDADD =
+@COND_mips_yeeloong_TRUE@linux_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@linux_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@linux_module_LDADD =
+@COND_x86_64_efi_TRUE@linux_module_LDADD =
+@COND_i386_coreboot_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@linux_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@linux_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@linux_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@linux_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+@COND_i386_efi_TRUE@xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+@COND_i386_ieee1275_TRUE@xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+@COND_i386_multiboot_TRUE@xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+@COND_i386_pc_TRUE@xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+@COND_i386_qemu_TRUE@xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+@COND_x86_64_efi_TRUE@xnu_module_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/macho32.c loader/macho64.c loader/macho.c loader/xnu.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_xnu_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_xnu_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_xnu_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_xnu_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_xnu_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_xnu_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_xnu_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@xnu_module_LDADD =
+@COND_i386_efi_TRUE@xnu_module_LDADD =
+@COND_i386_ieee1275_TRUE@xnu_module_LDADD =
+@COND_i386_multiboot_TRUE@xnu_module_LDADD =
+@COND_i386_pc_TRUE@xnu_module_LDADD =
+@COND_i386_qemu_TRUE@xnu_module_LDADD =
+@COND_x86_64_efi_TRUE@xnu_module_LDADD =
+@COND_i386_coreboot_TRUE@xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xnu_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@appleldr_module_SOURCES = loader/efi/appleloader.c ## platform sources
+@COND_x86_64_efi_TRUE@appleldr_module_SOURCES = loader/efi/appleloader.c ## platform sources
+@COND_i386_efi_TRUE@nodist_appleldr_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_appleldr_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@appleldr_module_LDADD =
+@COND_x86_64_efi_TRUE@appleldr_module_LDADD =
+@COND_i386_efi_TRUE@appleldr_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@appleldr_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@appleldr_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@appleldr_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@appleldr_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@appleldr_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@appleldr_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@appleldr_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@chain_module_SOURCES = loader/efi/chainloader.c ## platform sources
+@COND_i386_pc_TRUE@chain_module_SOURCES = loader/i386/pc/chainloader.c ## platform sources
+@COND_x86_64_efi_TRUE@chain_module_SOURCES = loader/efi/chainloader.c ## platform sources
+@COND_i386_efi_TRUE@nodist_chain_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_chain_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_chain_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@chain_module_LDADD =
+@COND_i386_pc_TRUE@chain_module_LDADD =
+@COND_x86_64_efi_TRUE@chain_module_LDADD =
+@COND_i386_efi_TRUE@chain_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@chain_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@chain_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@chain_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@chain_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@chain_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@chain_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@chain_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@chain_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@chain_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@chain_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@chain_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+@COND_i386_efi_TRUE@mmap_module_SOURCES = mmap/efi/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+@COND_i386_ieee1275_TRUE@mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+@COND_i386_multiboot_TRUE@mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+@COND_i386_pc_TRUE@mmap_module_SOURCES = mmap/i386/pc/mmap.c mmap/i386/pc/mmap_helper.S mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+@COND_i386_qemu_TRUE@mmap_module_SOURCES = mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+@COND_mips_yeeloong_TRUE@mmap_module_SOURCES = mmap/mips/yeeloong/uppermem.c mmap/mmap.c ## platform sources
+@COND_x86_64_efi_TRUE@mmap_module_SOURCES = mmap/efi/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c mmap/mmap.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_mmap_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@mmap_module_LDADD =
+@COND_i386_efi_TRUE@mmap_module_LDADD =
+@COND_i386_ieee1275_TRUE@mmap_module_LDADD =
+@COND_i386_multiboot_TRUE@mmap_module_LDADD =
+@COND_i386_pc_TRUE@mmap_module_LDADD =
+@COND_i386_qemu_TRUE@mmap_module_LDADD =
+@COND_mips_yeeloong_TRUE@mmap_module_LDADD =
+@COND_x86_64_efi_TRUE@mmap_module_LDADD =
+@COND_i386_coreboot_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@mmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_i386_coreboot_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_i386_efi_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_i386_ieee1275_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_i386_multiboot_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_i386_pc_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_i386_qemu_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_mips_yeeloong_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_x86_64_efi_TRUE@normal_module_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c normal/auth.c normal/autofs.c normal/color.c normal/completion.c normal/datetime.c normal/menu.c normal/menu_entry.c normal/menu_text.c normal/misc.c normal/crypto.c normal/term.c normal/context.c normal/charset.c script/main.c script/script.c script/execute.c script/function.c script/lexer.c script/argv.c commands/menuentry.c unidata.c ## platform sources
+@COND_emu_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_normal_module_SOURCES = grub_script.tab.c grub_script.yy.c grub_script.tab.h grub_script.yy.h ## platform nodist sources
+@COND_emu_TRUE@normal_module_LDADD =
+@COND_i386_coreboot_TRUE@normal_module_LDADD =
+@COND_i386_efi_TRUE@normal_module_LDADD =
+@COND_i386_ieee1275_TRUE@normal_module_LDADD =
+@COND_i386_multiboot_TRUE@normal_module_LDADD =
+@COND_i386_pc_TRUE@normal_module_LDADD =
+@COND_i386_qemu_TRUE@normal_module_LDADD =
+@COND_mips_yeeloong_TRUE@normal_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@normal_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@normal_module_LDADD =
+@COND_x86_64_efi_TRUE@normal_module_LDADD =
+@COND_emu_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_i386_coreboot_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_i386_efi_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_i386_ieee1275_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_i386_multiboot_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_i386_pc_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_i386_qemu_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_mips_yeeloong_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_powerpc_ieee1275_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_sparc64_ieee1275_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_x86_64_efi_TRUE@normal_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_POSIX) -Wno-error
+@COND_emu_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@normal_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_i386_coreboot_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_i386_efi_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_i386_ieee1275_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_i386_multiboot_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_i386_pc_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_i386_qemu_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_mips_yeeloong_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_powerpc_ieee1275_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_sparc64_ieee1275_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_x86_64_efi_TRUE@normal_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_POSIX)
+@COND_emu_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@normal_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_i386_coreboot_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_i386_efi_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_i386_multiboot_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_i386_pc_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_i386_qemu_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_x86_64_efi_TRUE@part_acorn_module_SOURCES = partmap/acorn.c ## platform sources
+@COND_emu_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_acorn_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_acorn_module_LDADD =
+@COND_i386_coreboot_TRUE@part_acorn_module_LDADD =
+@COND_i386_efi_TRUE@part_acorn_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_acorn_module_LDADD =
+@COND_i386_multiboot_TRUE@part_acorn_module_LDADD =
+@COND_i386_pc_TRUE@part_acorn_module_LDADD =
+@COND_i386_qemu_TRUE@part_acorn_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_acorn_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_acorn_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_acorn_module_LDADD =
+@COND_x86_64_efi_TRUE@part_acorn_module_LDADD =
+@COND_emu_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_acorn_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_acorn_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_acorn_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_acorn_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_i386_coreboot_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_i386_efi_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_i386_multiboot_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_i386_pc_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_i386_qemu_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_x86_64_efi_TRUE@part_amiga_module_SOURCES = partmap/amiga.c ## platform sources
+@COND_emu_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_amiga_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_amiga_module_LDADD =
+@COND_i386_coreboot_TRUE@part_amiga_module_LDADD =
+@COND_i386_efi_TRUE@part_amiga_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_amiga_module_LDADD =
+@COND_i386_multiboot_TRUE@part_amiga_module_LDADD =
+@COND_i386_pc_TRUE@part_amiga_module_LDADD =
+@COND_i386_qemu_TRUE@part_amiga_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_amiga_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_amiga_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_amiga_module_LDADD =
+@COND_x86_64_efi_TRUE@part_amiga_module_LDADD =
+@COND_emu_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_amiga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_amiga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_amiga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_amiga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_i386_coreboot_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_i386_efi_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_i386_multiboot_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_i386_pc_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_i386_qemu_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_x86_64_efi_TRUE@part_apple_module_SOURCES = partmap/apple.c ## platform sources
+@COND_emu_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_apple_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_apple_module_LDADD =
+@COND_i386_coreboot_TRUE@part_apple_module_LDADD =
+@COND_i386_efi_TRUE@part_apple_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_apple_module_LDADD =
+@COND_i386_multiboot_TRUE@part_apple_module_LDADD =
+@COND_i386_pc_TRUE@part_apple_module_LDADD =
+@COND_i386_qemu_TRUE@part_apple_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_apple_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_apple_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_apple_module_LDADD =
+@COND_x86_64_efi_TRUE@part_apple_module_LDADD =
+@COND_emu_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_apple_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_apple_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_apple_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_apple_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_i386_coreboot_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_i386_efi_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_i386_multiboot_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_i386_pc_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_i386_qemu_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_x86_64_efi_TRUE@part_gpt_module_SOURCES = partmap/gpt.c ## platform sources
+@COND_emu_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_gpt_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_gpt_module_LDADD =
+@COND_i386_coreboot_TRUE@part_gpt_module_LDADD =
+@COND_i386_efi_TRUE@part_gpt_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_gpt_module_LDADD =
+@COND_i386_multiboot_TRUE@part_gpt_module_LDADD =
+@COND_i386_pc_TRUE@part_gpt_module_LDADD =
+@COND_i386_qemu_TRUE@part_gpt_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_gpt_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_gpt_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_gpt_module_LDADD =
+@COND_x86_64_efi_TRUE@part_gpt_module_LDADD =
+@COND_emu_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_gpt_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_gpt_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_gpt_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_gpt_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_i386_coreboot_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_i386_efi_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_i386_multiboot_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_i386_pc_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_i386_qemu_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_x86_64_efi_TRUE@part_msdos_module_SOURCES = partmap/msdos.c ## platform sources
+@COND_emu_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_msdos_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_msdos_module_LDADD =
+@COND_i386_coreboot_TRUE@part_msdos_module_LDADD =
+@COND_i386_efi_TRUE@part_msdos_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_msdos_module_LDADD =
+@COND_i386_multiboot_TRUE@part_msdos_module_LDADD =
+@COND_i386_pc_TRUE@part_msdos_module_LDADD =
+@COND_i386_qemu_TRUE@part_msdos_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_msdos_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_msdos_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_msdos_module_LDADD =
+@COND_x86_64_efi_TRUE@part_msdos_module_LDADD =
+@COND_emu_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_msdos_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_msdos_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_msdos_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_msdos_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_i386_coreboot_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_i386_efi_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_i386_multiboot_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_i386_pc_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_i386_qemu_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_x86_64_efi_TRUE@part_sun_module_SOURCES = partmap/sun.c ## platform sources
+@COND_emu_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_sun_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_sun_module_LDADD =
+@COND_i386_coreboot_TRUE@part_sun_module_LDADD =
+@COND_i386_efi_TRUE@part_sun_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_sun_module_LDADD =
+@COND_i386_multiboot_TRUE@part_sun_module_LDADD =
+@COND_i386_pc_TRUE@part_sun_module_LDADD =
+@COND_i386_qemu_TRUE@part_sun_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_sun_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_sun_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_sun_module_LDADD =
+@COND_x86_64_efi_TRUE@part_sun_module_LDADD =
+@COND_emu_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sun_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sun_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sun_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sun_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_i386_coreboot_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_i386_efi_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_i386_multiboot_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_i386_pc_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_i386_qemu_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_x86_64_efi_TRUE@part_bsd_module_SOURCES = partmap/bsdlabel.c ## platform sources
+@COND_emu_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_bsd_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_bsd_module_LDADD =
+@COND_i386_coreboot_TRUE@part_bsd_module_LDADD =
+@COND_i386_efi_TRUE@part_bsd_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_bsd_module_LDADD =
+@COND_i386_multiboot_TRUE@part_bsd_module_LDADD =
+@COND_i386_pc_TRUE@part_bsd_module_LDADD =
+@COND_i386_qemu_TRUE@part_bsd_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_bsd_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_bsd_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_bsd_module_LDADD =
+@COND_x86_64_efi_TRUE@part_bsd_module_LDADD =
+@COND_emu_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_bsd_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_bsd_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_bsd_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_bsd_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_i386_coreboot_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_i386_efi_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_i386_ieee1275_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_i386_multiboot_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_i386_pc_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_i386_qemu_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_mips_yeeloong_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_x86_64_efi_TRUE@part_sunpc_module_SOURCES = partmap/sunpc.c ## platform sources
+@COND_emu_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_part_sunpc_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@part_sunpc_module_LDADD =
+@COND_i386_coreboot_TRUE@part_sunpc_module_LDADD =
+@COND_i386_efi_TRUE@part_sunpc_module_LDADD =
+@COND_i386_ieee1275_TRUE@part_sunpc_module_LDADD =
+@COND_i386_multiboot_TRUE@part_sunpc_module_LDADD =
+@COND_i386_pc_TRUE@part_sunpc_module_LDADD =
+@COND_i386_qemu_TRUE@part_sunpc_module_LDADD =
+@COND_mips_yeeloong_TRUE@part_sunpc_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@part_sunpc_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@part_sunpc_module_LDADD =
+@COND_x86_64_efi_TRUE@part_sunpc_module_LDADD =
+@COND_emu_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sunpc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sunpc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sunpc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@part_sunpc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_i386_coreboot_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_i386_efi_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_i386_ieee1275_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_i386_multiboot_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_i386_pc_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_i386_qemu_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_mips_yeeloong_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_x86_64_efi_TRUE@msdospart_module_SOURCES = parttool/msdospart.c ## platform sources
+@COND_emu_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_msdospart_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@msdospart_module_LDADD =
+@COND_i386_coreboot_TRUE@msdospart_module_LDADD =
+@COND_i386_efi_TRUE@msdospart_module_LDADD =
+@COND_i386_ieee1275_TRUE@msdospart_module_LDADD =
+@COND_i386_multiboot_TRUE@msdospart_module_LDADD =
+@COND_i386_pc_TRUE@msdospart_module_LDADD =
+@COND_i386_qemu_TRUE@msdospart_module_LDADD =
+@COND_mips_yeeloong_TRUE@msdospart_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@msdospart_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@msdospart_module_LDADD =
+@COND_x86_64_efi_TRUE@msdospart_module_LDADD =
+@COND_emu_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@msdospart_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@msdospart_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@msdospart_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@msdospart_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+@COND_i386_efi_TRUE@at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+@COND_i386_ieee1275_TRUE@at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+@COND_i386_multiboot_TRUE@at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+@COND_i386_pc_TRUE@at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+@COND_i386_qemu_TRUE@at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+@COND_x86_64_efi_TRUE@at_keyboard_module_SOURCES = term/at_keyboard.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_at_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@at_keyboard_module_LDADD =
+@COND_i386_efi_TRUE@at_keyboard_module_LDADD =
+@COND_i386_ieee1275_TRUE@at_keyboard_module_LDADD =
+@COND_i386_multiboot_TRUE@at_keyboard_module_LDADD =
+@COND_i386_pc_TRUE@at_keyboard_module_LDADD =
+@COND_i386_qemu_TRUE@at_keyboard_module_LDADD =
+@COND_x86_64_efi_TRUE@at_keyboard_module_LDADD =
+@COND_i386_coreboot_TRUE@at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@at_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@at_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@at_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@at_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_i386_coreboot_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_i386_efi_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_i386_ieee1275_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_i386_multiboot_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_i386_pc_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_i386_qemu_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_x86_64_efi_TRUE@gfxterm_module_SOURCES = term/gfxterm.c ## platform sources
+@COND_emu_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gfxterm_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gfxterm_module_LDADD =
+@COND_i386_coreboot_TRUE@gfxterm_module_LDADD =
+@COND_i386_efi_TRUE@gfxterm_module_LDADD =
+@COND_i386_ieee1275_TRUE@gfxterm_module_LDADD =
+@COND_i386_multiboot_TRUE@gfxterm_module_LDADD =
+@COND_i386_pc_TRUE@gfxterm_module_LDADD =
+@COND_i386_qemu_TRUE@gfxterm_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gfxterm_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gfxterm_module_LDADD =
+@COND_x86_64_efi_TRUE@gfxterm_module_LDADD =
+@COND_emu_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxterm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxterm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxterm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gfxterm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@serial_module_SOURCES = term/serial.c ## platform sources
+@COND_i386_coreboot_TRUE@serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+@COND_i386_efi_TRUE@serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+@COND_i386_ieee1275_TRUE@serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+@COND_i386_multiboot_TRUE@serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+@COND_i386_pc_TRUE@serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+@COND_i386_qemu_TRUE@serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+@COND_x86_64_efi_TRUE@serial_module_SOURCES = term/ns8250.c term/serial.c ## platform sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_serial_module_SOURCES = ## platform nodist sources
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@serial_module_LDADD =
+@COND_i386_coreboot_TRUE@serial_module_LDADD =
+@COND_i386_efi_TRUE@serial_module_LDADD =
+@COND_i386_ieee1275_TRUE@serial_module_LDADD =
+@COND_i386_multiboot_TRUE@serial_module_LDADD =
+@COND_i386_pc_TRUE@serial_module_LDADD =
+@COND_i386_qemu_TRUE@serial_module_LDADD =
+@COND_x86_64_efi_TRUE@serial_module_LDADD =
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@serial_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@serial_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@serial_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@serial_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@sendkey_module_SOURCES = commands/i386/pc/sendkey.c ## platform sources
+@COND_i386_pc_TRUE@nodist_sendkey_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@sendkey_module_LDADD =
+@COND_i386_pc_TRUE@sendkey_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@sendkey_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@sendkey_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@sendkey_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+@COND_i386_coreboot_TRUE@terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+@COND_i386_efi_TRUE@terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+@COND_i386_multiboot_TRUE@terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+@COND_i386_pc_TRUE@terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+@COND_i386_qemu_TRUE@terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+@COND_x86_64_efi_TRUE@terminfo_module_SOURCES = term/terminfo.c term/tparm.c ## platform sources
+@COND_emu_TRUE@nodist_terminfo_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_terminfo_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_terminfo_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_terminfo_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_terminfo_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_terminfo_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_terminfo_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@terminfo_module_LDADD =
+@COND_i386_coreboot_TRUE@terminfo_module_LDADD =
+@COND_i386_efi_TRUE@terminfo_module_LDADD =
+@COND_i386_multiboot_TRUE@terminfo_module_LDADD =
+@COND_i386_pc_TRUE@terminfo_module_LDADD =
+@COND_i386_qemu_TRUE@terminfo_module_LDADD =
+@COND_x86_64_efi_TRUE@terminfo_module_LDADD =
+@COND_emu_TRUE@terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminfo_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminfo_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminfo_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@terminfo_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_i386_efi_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_i386_ieee1275_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_i386_multiboot_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_i386_pc_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_i386_qemu_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_mips_yeeloong_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_x86_64_efi_TRUE@usb_keyboard_module_SOURCES = term/usb_keyboard.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_usb_keyboard_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@usb_keyboard_module_LDADD =
+@COND_i386_efi_TRUE@usb_keyboard_module_LDADD =
+@COND_i386_ieee1275_TRUE@usb_keyboard_module_LDADD =
+@COND_i386_multiboot_TRUE@usb_keyboard_module_LDADD =
+@COND_i386_pc_TRUE@usb_keyboard_module_LDADD =
+@COND_i386_qemu_TRUE@usb_keyboard_module_LDADD =
+@COND_mips_yeeloong_TRUE@usb_keyboard_module_LDADD =
+@COND_x86_64_efi_TRUE@usb_keyboard_module_LDADD =
+@COND_i386_coreboot_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_keyboard_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_keyboard_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_keyboard_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@usb_keyboard_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_module_SOURCES = video/i386/pc/vga.c ## platform sources
+@COND_i386_pc_TRUE@nodist_vga_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@vga_module_LDADD =
+@COND_i386_pc_TRUE@vga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@vga_text_module_SOURCES = term/i386/pc/vga_text.c term/i386/vga_common.c ## platform sources
+@COND_i386_multiboot_TRUE@vga_text_module_SOURCES = term/i386/pc/vga_text.c term/i386/vga_common.c ## platform sources
+@COND_i386_pc_TRUE@vga_text_module_SOURCES = term/i386/pc/vga_text.c term/i386/vga_common.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_vga_text_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_vga_text_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_vga_text_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@vga_text_module_LDADD =
+@COND_i386_multiboot_TRUE@vga_text_module_LDADD =
+@COND_i386_pc_TRUE@vga_text_module_LDADD =
+@COND_i386_coreboot_TRUE@vga_text_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@vga_text_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_text_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@vga_text_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@vga_text_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_text_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@vga_text_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@vga_text_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_text_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@vga_text_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@vga_text_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@vga_text_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+@COND_i386_efi_TRUE@video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+@COND_i386_ieee1275_TRUE@video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+@COND_i386_multiboot_TRUE@video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+@COND_i386_pc_TRUE@video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+@COND_i386_qemu_TRUE@video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+@COND_x86_64_efi_TRUE@video_cirrus_module_SOURCES = video/cirrus.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_video_cirrus_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@video_cirrus_module_LDADD =
+@COND_i386_efi_TRUE@video_cirrus_module_LDADD =
+@COND_i386_ieee1275_TRUE@video_cirrus_module_LDADD =
+@COND_i386_multiboot_TRUE@video_cirrus_module_LDADD =
+@COND_i386_pc_TRUE@video_cirrus_module_LDADD =
+@COND_i386_qemu_TRUE@video_cirrus_module_LDADD =
+@COND_x86_64_efi_TRUE@video_cirrus_module_LDADD =
+@COND_i386_coreboot_TRUE@video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_cirrus_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_cirrus_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_cirrus_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_cirrus_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_bochs_module_SOURCES = video/bochs.c ## platform sources
+@COND_i386_efi_TRUE@video_bochs_module_SOURCES = video/bochs.c ## platform sources
+@COND_i386_ieee1275_TRUE@video_bochs_module_SOURCES = video/bochs.c ## platform sources
+@COND_i386_multiboot_TRUE@video_bochs_module_SOURCES = video/bochs.c ## platform sources
+@COND_i386_pc_TRUE@video_bochs_module_SOURCES = video/bochs.c ## platform sources
+@COND_i386_qemu_TRUE@video_bochs_module_SOURCES = video/bochs.c ## platform sources
+@COND_x86_64_efi_TRUE@video_bochs_module_SOURCES = video/bochs.c ## platform sources
+@COND_i386_coreboot_TRUE@nodist_video_bochs_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_video_bochs_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_video_bochs_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_video_bochs_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_video_bochs_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_video_bochs_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_video_bochs_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@video_bochs_module_LDADD =
+@COND_i386_efi_TRUE@video_bochs_module_LDADD =
+@COND_i386_ieee1275_TRUE@video_bochs_module_LDADD =
+@COND_i386_multiboot_TRUE@video_bochs_module_LDADD =
+@COND_i386_pc_TRUE@video_bochs_module_LDADD =
+@COND_i386_qemu_TRUE@video_bochs_module_LDADD =
+@COND_x86_64_efi_TRUE@video_bochs_module_LDADD =
+@COND_i386_coreboot_TRUE@video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_bochs_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_bochs_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_bochs_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_bochs_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_i386_coreboot_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_i386_efi_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_i386_ieee1275_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_i386_multiboot_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_i386_pc_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_i386_qemu_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_mips_yeeloong_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_x86_64_efi_TRUE@functional_test_module_SOURCES = tests/lib/functional_test.c tests/lib/test.c ## platform sources
+@COND_emu_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_functional_test_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@functional_test_module_LDADD =
+@COND_i386_coreboot_TRUE@functional_test_module_LDADD =
+@COND_i386_efi_TRUE@functional_test_module_LDADD =
+@COND_i386_ieee1275_TRUE@functional_test_module_LDADD =
+@COND_i386_multiboot_TRUE@functional_test_module_LDADD =
+@COND_i386_pc_TRUE@functional_test_module_LDADD =
+@COND_i386_qemu_TRUE@functional_test_module_LDADD =
+@COND_mips_yeeloong_TRUE@functional_test_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@functional_test_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@functional_test_module_LDADD =
+@COND_x86_64_efi_TRUE@functional_test_module_LDADD =
+@COND_emu_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_i386_coreboot_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_i386_efi_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_i386_ieee1275_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_i386_multiboot_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_i386_pc_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_i386_qemu_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_mips_yeeloong_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_x86_64_efi_TRUE@example_functional_test_module_SOURCES = tests/example_functional_test.c ## platform sources
+@COND_emu_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_example_functional_test_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@example_functional_test_module_LDADD =
+@COND_i386_coreboot_TRUE@example_functional_test_module_LDADD =
+@COND_i386_efi_TRUE@example_functional_test_module_LDADD =
+@COND_i386_ieee1275_TRUE@example_functional_test_module_LDADD =
+@COND_i386_multiboot_TRUE@example_functional_test_module_LDADD =
+@COND_i386_pc_TRUE@example_functional_test_module_LDADD =
+@COND_i386_qemu_TRUE@example_functional_test_module_LDADD =
+@COND_mips_yeeloong_TRUE@example_functional_test_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@example_functional_test_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@example_functional_test_module_LDADD =
+@COND_x86_64_efi_TRUE@example_functional_test_module_LDADD =
+@COND_emu_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_i386_coreboot_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_i386_efi_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_i386_ieee1275_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_i386_multiboot_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_i386_pc_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_i386_qemu_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_mips_yeeloong_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_powerpc_ieee1275_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_sparc64_ieee1275_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_x86_64_efi_TRUE@example_functional_test_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) -Wno-format
+@COND_emu_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@example_functional_test_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@example_functional_test_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@example_functional_test_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_i386_coreboot_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_i386_efi_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_i386_ieee1275_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_i386_multiboot_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_i386_pc_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_i386_qemu_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_x86_64_efi_TRUE@bitmap_module_SOURCES = video/bitmap.c ## platform sources
+@COND_emu_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_bitmap_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@bitmap_module_LDADD =
+@COND_i386_coreboot_TRUE@bitmap_module_LDADD =
+@COND_i386_efi_TRUE@bitmap_module_LDADD =
+@COND_i386_ieee1275_TRUE@bitmap_module_LDADD =
+@COND_i386_multiboot_TRUE@bitmap_module_LDADD =
+@COND_i386_pc_TRUE@bitmap_module_LDADD =
+@COND_i386_qemu_TRUE@bitmap_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@bitmap_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@bitmap_module_LDADD =
+@COND_x86_64_efi_TRUE@bitmap_module_LDADD =
+@COND_emu_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_i386_coreboot_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_i386_efi_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_i386_ieee1275_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_i386_multiboot_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_i386_pc_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_i386_qemu_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_x86_64_efi_TRUE@bitmap_scale_module_SOURCES = video/bitmap_scale.c ## platform sources
+@COND_emu_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_bitmap_scale_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@bitmap_scale_module_LDADD =
+@COND_i386_coreboot_TRUE@bitmap_scale_module_LDADD =
+@COND_i386_efi_TRUE@bitmap_scale_module_LDADD =
+@COND_i386_ieee1275_TRUE@bitmap_scale_module_LDADD =
+@COND_i386_multiboot_TRUE@bitmap_scale_module_LDADD =
+@COND_i386_pc_TRUE@bitmap_scale_module_LDADD =
+@COND_i386_qemu_TRUE@bitmap_scale_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@bitmap_scale_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@bitmap_scale_module_LDADD =
+@COND_x86_64_efi_TRUE@bitmap_scale_module_LDADD =
+@COND_emu_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_scale_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_scale_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_scale_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@bitmap_scale_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_gop_module_SOURCES = video/efi_gop.c ## platform sources
+@COND_x86_64_efi_TRUE@efi_gop_module_SOURCES = video/efi_gop.c ## platform sources
+@COND_i386_efi_TRUE@nodist_efi_gop_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_efi_gop_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@efi_gop_module_LDADD =
+@COND_x86_64_efi_TRUE@efi_gop_module_LDADD =
+@COND_i386_efi_TRUE@efi_gop_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_gop_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_gop_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_gop_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_gop_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_gop_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_gop_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_gop_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_uga_module_SOURCES = video/efi_uga.c ## platform sources
+@COND_x86_64_efi_TRUE@efi_uga_module_SOURCES = video/efi_uga.c ## platform sources
+@COND_i386_efi_TRUE@nodist_efi_uga_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_efi_uga_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@efi_uga_module_LDADD =
+@COND_x86_64_efi_TRUE@efi_uga_module_LDADD =
+@COND_i386_efi_TRUE@efi_uga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_uga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_uga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_uga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_uga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_uga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@efi_uga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@efi_uga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_i386_coreboot_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_i386_efi_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_i386_ieee1275_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_i386_multiboot_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_i386_pc_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_i386_qemu_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_mips_yeeloong_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_x86_64_efi_TRUE@jpeg_module_SOURCES = video/readers/jpeg.c ## platform sources
+@COND_emu_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_jpeg_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@jpeg_module_LDADD =
+@COND_i386_coreboot_TRUE@jpeg_module_LDADD =
+@COND_i386_efi_TRUE@jpeg_module_LDADD =
+@COND_i386_ieee1275_TRUE@jpeg_module_LDADD =
+@COND_i386_multiboot_TRUE@jpeg_module_LDADD =
+@COND_i386_pc_TRUE@jpeg_module_LDADD =
+@COND_i386_qemu_TRUE@jpeg_module_LDADD =
+@COND_mips_yeeloong_TRUE@jpeg_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@jpeg_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@jpeg_module_LDADD =
+@COND_x86_64_efi_TRUE@jpeg_module_LDADD =
+@COND_emu_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jpeg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jpeg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jpeg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@jpeg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_i386_coreboot_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_i386_efi_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_i386_ieee1275_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_i386_multiboot_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_i386_pc_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_i386_qemu_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_mips_yeeloong_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_x86_64_efi_TRUE@png_module_SOURCES = video/readers/png.c ## platform sources
+@COND_emu_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_png_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@png_module_LDADD =
+@COND_i386_coreboot_TRUE@png_module_LDADD =
+@COND_i386_efi_TRUE@png_module_LDADD =
+@COND_i386_ieee1275_TRUE@png_module_LDADD =
+@COND_i386_multiboot_TRUE@png_module_LDADD =
+@COND_i386_pc_TRUE@png_module_LDADD =
+@COND_i386_qemu_TRUE@png_module_LDADD =
+@COND_mips_yeeloong_TRUE@png_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@png_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@png_module_LDADD =
+@COND_x86_64_efi_TRUE@png_module_LDADD =
+@COND_emu_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@png_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@png_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@png_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@png_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_i386_coreboot_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_i386_efi_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_i386_ieee1275_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_i386_multiboot_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_i386_pc_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_i386_qemu_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_mips_yeeloong_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_x86_64_efi_TRUE@tga_module_SOURCES = video/readers/tga.c ## platform sources
+@COND_emu_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_tga_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@tga_module_LDADD =
+@COND_i386_coreboot_TRUE@tga_module_LDADD =
+@COND_i386_efi_TRUE@tga_module_LDADD =
+@COND_i386_ieee1275_TRUE@tga_module_LDADD =
+@COND_i386_multiboot_TRUE@tga_module_LDADD =
+@COND_i386_pc_TRUE@tga_module_LDADD =
+@COND_i386_qemu_TRUE@tga_module_LDADD =
+@COND_mips_yeeloong_TRUE@tga_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@tga_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@tga_module_LDADD =
+@COND_x86_64_efi_TRUE@tga_module_LDADD =
+@COND_emu_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tga_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tga_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tga_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@tga_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@vbe_module_SOURCES = video/i386/pc/vbe.c ## platform sources
+@COND_i386_pc_TRUE@nodist_vbe_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@vbe_module_LDADD =
+@COND_i386_pc_TRUE@vbe_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@vbe_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@vbe_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@vbe_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_i386_coreboot_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_i386_efi_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_i386_ieee1275_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_i386_multiboot_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_i386_pc_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_i386_qemu_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_x86_64_efi_TRUE@video_fb_module_SOURCES = video/fb/video_fb.c video/fb/fbblit.c video/fb/fbfill.c video/fb/fbutil.c ## platform sources
+@COND_emu_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_video_fb_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@video_fb_module_LDADD =
+@COND_i386_coreboot_TRUE@video_fb_module_LDADD =
+@COND_i386_efi_TRUE@video_fb_module_LDADD =
+@COND_i386_ieee1275_TRUE@video_fb_module_LDADD =
+@COND_i386_multiboot_TRUE@video_fb_module_LDADD =
+@COND_i386_pc_TRUE@video_fb_module_LDADD =
+@COND_i386_qemu_TRUE@video_fb_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@video_fb_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@video_fb_module_LDADD =
+@COND_x86_64_efi_TRUE@video_fb_module_LDADD =
+@COND_emu_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_i386_coreboot_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_i386_efi_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_i386_ieee1275_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_i386_multiboot_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_i386_pc_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_i386_qemu_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_x86_64_efi_TRUE@video_module_SOURCES = video/video.c ## platform sources
+@COND_emu_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_video_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@video_module_LDADD =
+@COND_i386_coreboot_TRUE@video_module_LDADD =
+@COND_i386_efi_TRUE@video_module_LDADD =
+@COND_i386_ieee1275_TRUE@video_module_LDADD =
+@COND_i386_multiboot_TRUE@video_module_LDADD =
+@COND_i386_pc_TRUE@video_module_LDADD =
+@COND_i386_qemu_TRUE@video_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@video_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@video_module_LDADD =
+@COND_x86_64_efi_TRUE@video_module_LDADD =
+@COND_emu_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@video_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ieee1275_fb_module_SOURCES = video/ieee1275.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@nodist_ieee1275_fb_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@ieee1275_fb_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@ieee1275_fb_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ieee1275_fb_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ieee1275_fb_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@ieee1275_fb_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@sdl_module_SOURCES = video/emu/sdl.c ## platform sources
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@nodist_sdl_module_SOURCES = ## platform nodist sources
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@sdl_module_LDADD =
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@sdl_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@sdl_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@sdl_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@sdl_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_i386_coreboot_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_i386_efi_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_i386_ieee1275_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_i386_multiboot_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_i386_pc_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_i386_qemu_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_mips_yeeloong_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_x86_64_efi_TRUE@datehook_module_SOURCES = hook/datehook.c ## platform sources
+@COND_emu_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_datehook_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@datehook_module_LDADD =
+@COND_i386_coreboot_TRUE@datehook_module_LDADD =
+@COND_i386_efi_TRUE@datehook_module_LDADD =
+@COND_i386_ieee1275_TRUE@datehook_module_LDADD =
+@COND_i386_multiboot_TRUE@datehook_module_LDADD =
+@COND_i386_pc_TRUE@datehook_module_LDADD =
+@COND_i386_qemu_TRUE@datehook_module_LDADD =
+@COND_mips_yeeloong_TRUE@datehook_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@datehook_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@datehook_module_LDADD =
+@COND_x86_64_efi_TRUE@datehook_module_LDADD =
+@COND_emu_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datehook_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datehook_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datehook_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@datehook_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@legacycfg_module_SOURCES = lib/i386/pc/vesa_modes_table.c commands/legacycfg.c lib/legacy_parse.c ## platform sources
+@COND_i386_pc_TRUE@legacycfg_module_SOURCES = commands/legacycfg.c lib/legacy_parse.c ## platform sources
+@COND_emu_TRUE@nodist_legacycfg_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_legacycfg_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@legacycfg_module_LDADD =
+@COND_i386_pc_TRUE@legacycfg_module_LDADD =
+@COND_emu_TRUE@legacycfg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@legacycfg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@legacycfg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@legacycfg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@legacycfg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@legacycfg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@legacycfg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@legacycfg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_i386_coreboot_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_i386_efi_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_i386_ieee1275_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_i386_multiboot_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_i386_pc_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_i386_qemu_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_mips_yeeloong_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_x86_64_efi_TRUE@test_blockarg_module_SOURCES = tests/test_blockarg.c ## platform sources
+@COND_emu_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_test_blockarg_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@test_blockarg_module_LDADD =
+@COND_i386_coreboot_TRUE@test_blockarg_module_LDADD =
+@COND_i386_efi_TRUE@test_blockarg_module_LDADD =
+@COND_i386_ieee1275_TRUE@test_blockarg_module_LDADD =
+@COND_i386_multiboot_TRUE@test_blockarg_module_LDADD =
+@COND_i386_pc_TRUE@test_blockarg_module_LDADD =
+@COND_i386_qemu_TRUE@test_blockarg_module_LDADD =
+@COND_mips_yeeloong_TRUE@test_blockarg_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@test_blockarg_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@test_blockarg_module_LDADD =
+@COND_x86_64_efi_TRUE@test_blockarg_module_LDADD =
+@COND_emu_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_blockarg_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_blockarg_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_blockarg_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@test_blockarg_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_i386_coreboot_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_i386_efi_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_i386_ieee1275_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_i386_multiboot_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_i386_pc_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_i386_qemu_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_mips_yeeloong_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_x86_64_efi_TRUE@xzio_module_SOURCES = io/xzio.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c ## platform sources
+@COND_emu_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_xzio_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@xzio_module_LDADD =
+@COND_i386_coreboot_TRUE@xzio_module_LDADD =
+@COND_i386_efi_TRUE@xzio_module_LDADD =
+@COND_i386_ieee1275_TRUE@xzio_module_LDADD =
+@COND_i386_multiboot_TRUE@xzio_module_LDADD =
+@COND_i386_pc_TRUE@xzio_module_LDADD =
+@COND_i386_qemu_TRUE@xzio_module_LDADD =
+@COND_mips_yeeloong_TRUE@xzio_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@xzio_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@xzio_module_LDADD =
+@COND_x86_64_efi_TRUE@xzio_module_LDADD =
+@COND_emu_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xzio_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xzio_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_i386_coreboot_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_i386_efi_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_i386_ieee1275_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_i386_multiboot_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_i386_pc_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_i386_qemu_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_mips_yeeloong_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_powerpc_ieee1275_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_sparc64_ieee1275_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_x86_64_efi_TRUE@xzio_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed
+@COND_emu_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@xzio_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_i386_coreboot_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_i386_efi_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_i386_ieee1275_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_i386_multiboot_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_i386_pc_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_i386_qemu_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_mips_yeeloong_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_x86_64_efi_TRUE@testload_module_SOURCES = commands/testload.c ## platform sources
+@COND_emu_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_testload_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@testload_module_LDADD =
+@COND_i386_coreboot_TRUE@testload_module_LDADD =
+@COND_i386_efi_TRUE@testload_module_LDADD =
+@COND_i386_ieee1275_TRUE@testload_module_LDADD =
+@COND_i386_multiboot_TRUE@testload_module_LDADD =
+@COND_i386_pc_TRUE@testload_module_LDADD =
+@COND_i386_qemu_TRUE@testload_module_LDADD =
+@COND_mips_yeeloong_TRUE@testload_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@testload_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@testload_module_LDADD =
+@COND_x86_64_efi_TRUE@testload_module_LDADD =
+@COND_emu_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@testload_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@testload_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@testload_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@testload_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsapm_module_SOURCES = commands/i386/pc/lsapm.c ## platform sources
+@COND_i386_pc_TRUE@nodist_lsapm_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@lsapm_module_LDADD =
+@COND_i386_pc_TRUE@lsapm_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsapm_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsapm_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@lsapm_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_i386_coreboot_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_i386_efi_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_i386_ieee1275_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_i386_multiboot_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_i386_pc_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_i386_qemu_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_x86_64_efi_TRUE@keylayouts_module_SOURCES = commands/keylayouts.c ## platform sources
+@COND_emu_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_keylayouts_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@keylayouts_module_LDADD =
+@COND_i386_coreboot_TRUE@keylayouts_module_LDADD =
+@COND_i386_efi_TRUE@keylayouts_module_LDADD =
+@COND_i386_ieee1275_TRUE@keylayouts_module_LDADD =
+@COND_i386_multiboot_TRUE@keylayouts_module_LDADD =
+@COND_i386_pc_TRUE@keylayouts_module_LDADD =
+@COND_i386_qemu_TRUE@keylayouts_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@keylayouts_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@keylayouts_module_LDADD =
+@COND_x86_64_efi_TRUE@keylayouts_module_LDADD =
+@COND_emu_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_efi_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_pc_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keylayouts_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE)
+@COND_emu_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keylayouts_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_efi_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_pc_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keylayouts_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE)
+@COND_emu_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@keylayouts_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_i386_efi_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_i386_pc_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_arcfour_module_SOURCES = lib/libgcrypt-grub/cipher/arcfour.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_arcfour_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_arcfour_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_arcfour_module_LDADD =
+@COND_i386_efi_TRUE@gcry_arcfour_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_arcfour_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_arcfour_module_LDADD =
+@COND_i386_pc_TRUE@gcry_arcfour_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_arcfour_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_arcfour_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_arcfour_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_arcfour_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_arcfour_module_LDADD =
+@COND_emu_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_arcfour_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_arcfour_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_arcfour_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_arcfour_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_i386_efi_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_i386_pc_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_blowfish_module_SOURCES = lib/libgcrypt-grub/cipher/blowfish.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_blowfish_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_blowfish_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_blowfish_module_LDADD =
+@COND_i386_efi_TRUE@gcry_blowfish_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_blowfish_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_blowfish_module_LDADD =
+@COND_i386_pc_TRUE@gcry_blowfish_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_blowfish_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_blowfish_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_blowfish_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_blowfish_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_blowfish_module_LDADD =
+@COND_emu_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_blowfish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_blowfish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_blowfish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_blowfish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_i386_efi_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_i386_pc_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_camellia_module_SOURCES = lib/libgcrypt-grub/cipher/camellia-glue.c lib/libgcrypt-grub/cipher/camellia.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_camellia_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_camellia_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_camellia_module_LDADD =
+@COND_i386_efi_TRUE@gcry_camellia_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_camellia_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_camellia_module_LDADD =
+@COND_i386_pc_TRUE@gcry_camellia_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_camellia_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_camellia_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_camellia_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_camellia_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_camellia_module_LDADD =
+@COND_emu_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_camellia_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_camellia_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_camellia_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_camellia_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_i386_efi_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_i386_pc_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_cast5_module_SOURCES = lib/libgcrypt-grub/cipher/cast5.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_cast5_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_cast5_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_cast5_module_LDADD =
+@COND_i386_efi_TRUE@gcry_cast5_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_cast5_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_cast5_module_LDADD =
+@COND_i386_pc_TRUE@gcry_cast5_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_cast5_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_cast5_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_cast5_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_cast5_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_cast5_module_LDADD =
+@COND_emu_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_cast5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_cast5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_cast5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_cast5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_i386_efi_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_i386_pc_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_crc_module_SOURCES = lib/libgcrypt-grub/cipher/crc.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_crc_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_crc_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_crc_module_LDADD =
+@COND_i386_efi_TRUE@gcry_crc_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_crc_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_crc_module_LDADD =
+@COND_i386_pc_TRUE@gcry_crc_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_crc_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_crc_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_crc_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_crc_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_crc_module_LDADD =
+@COND_emu_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_crc_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_crc_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_crc_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_crc_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_i386_efi_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_i386_pc_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_des_module_SOURCES = lib/libgcrypt-grub/cipher/des.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_des_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_des_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_des_module_LDADD =
+@COND_i386_efi_TRUE@gcry_des_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_des_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_des_module_LDADD =
+@COND_i386_pc_TRUE@gcry_des_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_des_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_des_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_des_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_des_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_des_module_LDADD =
+@COND_emu_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_des_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_des_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_des_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_des_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_i386_efi_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_i386_pc_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_md4_module_SOURCES = lib/libgcrypt-grub/cipher/md4.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_md4_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_md4_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_md4_module_LDADD =
+@COND_i386_efi_TRUE@gcry_md4_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_md4_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_md4_module_LDADD =
+@COND_i386_pc_TRUE@gcry_md4_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_md4_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_md4_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_md4_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_md4_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_md4_module_LDADD =
+@COND_emu_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_md4_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_md4_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_md4_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_md4_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_i386_efi_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_i386_pc_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_md5_module_SOURCES = lib/libgcrypt-grub/cipher/md5.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_md5_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_md5_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_md5_module_LDADD =
+@COND_i386_efi_TRUE@gcry_md5_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_md5_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_md5_module_LDADD =
+@COND_i386_pc_TRUE@gcry_md5_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_md5_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_md5_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_md5_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_md5_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_md5_module_LDADD =
+@COND_emu_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_md5_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_md5_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_md5_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_md5_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_i386_efi_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_i386_pc_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_rfc2268_module_SOURCES = lib/libgcrypt-grub/cipher/rfc2268.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_rfc2268_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_rfc2268_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_rfc2268_module_LDADD =
+@COND_i386_efi_TRUE@gcry_rfc2268_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_rfc2268_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_rfc2268_module_LDADD =
+@COND_i386_pc_TRUE@gcry_rfc2268_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_rfc2268_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_rfc2268_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_rfc2268_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_rfc2268_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_rfc2268_module_LDADD =
+@COND_emu_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_rfc2268_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_rfc2268_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_rfc2268_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_rfc2268_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_i386_efi_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_i386_pc_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_rijndael_module_SOURCES = lib/libgcrypt-grub/cipher/rijndael.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_rijndael_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_rijndael_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_rijndael_module_LDADD =
+@COND_i386_efi_TRUE@gcry_rijndael_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_rijndael_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_rijndael_module_LDADD =
+@COND_i386_pc_TRUE@gcry_rijndael_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_rijndael_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_rijndael_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_rijndael_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_rijndael_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_rijndael_module_LDADD =
+@COND_emu_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_rijndael_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_rijndael_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_rijndael_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_rijndael_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_i386_efi_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_i386_pc_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_rmd160_module_SOURCES = lib/libgcrypt-grub/cipher/rmd160.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_rmd160_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_rmd160_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_rmd160_module_LDADD =
+@COND_i386_efi_TRUE@gcry_rmd160_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_rmd160_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_rmd160_module_LDADD =
+@COND_i386_pc_TRUE@gcry_rmd160_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_rmd160_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_rmd160_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_rmd160_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_rmd160_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_rmd160_module_LDADD =
+@COND_emu_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_rmd160_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_rmd160_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_rmd160_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_rmd160_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_i386_efi_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_i386_pc_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_seed_module_SOURCES = lib/libgcrypt-grub/cipher/seed.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_seed_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_seed_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_seed_module_LDADD =
+@COND_i386_efi_TRUE@gcry_seed_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_seed_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_seed_module_LDADD =
+@COND_i386_pc_TRUE@gcry_seed_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_seed_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_seed_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_seed_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_seed_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_seed_module_LDADD =
+@COND_emu_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_seed_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_seed_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_seed_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_seed_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_i386_efi_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_i386_pc_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_serpent_module_SOURCES = lib/libgcrypt-grub/cipher/serpent.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_serpent_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_serpent_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_serpent_module_LDADD =
+@COND_i386_efi_TRUE@gcry_serpent_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_serpent_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_serpent_module_LDADD =
+@COND_i386_pc_TRUE@gcry_serpent_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_serpent_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_serpent_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_serpent_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_serpent_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_serpent_module_LDADD =
+@COND_emu_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_serpent_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_serpent_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_serpent_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_serpent_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_i386_efi_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_i386_pc_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_sha1_module_SOURCES = lib/libgcrypt-grub/cipher/sha1.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_sha1_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_sha1_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_sha1_module_LDADD =
+@COND_i386_efi_TRUE@gcry_sha1_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_sha1_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_sha1_module_LDADD =
+@COND_i386_pc_TRUE@gcry_sha1_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_sha1_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_sha1_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_sha1_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_sha1_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_sha1_module_LDADD =
+@COND_emu_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_sha1_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_sha1_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_sha1_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_sha1_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_i386_efi_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_i386_pc_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_sha256_module_SOURCES = lib/libgcrypt-grub/cipher/sha256.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_sha256_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_sha256_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_sha256_module_LDADD =
+@COND_i386_efi_TRUE@gcry_sha256_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_sha256_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_sha256_module_LDADD =
+@COND_i386_pc_TRUE@gcry_sha256_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_sha256_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_sha256_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_sha256_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_sha256_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_sha256_module_LDADD =
+@COND_emu_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_sha256_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_sha256_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_sha256_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_sha256_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_i386_efi_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_i386_pc_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_sha512_module_SOURCES = lib/libgcrypt-grub/cipher/sha512.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_sha512_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_sha512_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_sha512_module_LDADD =
+@COND_i386_efi_TRUE@gcry_sha512_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_sha512_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_sha512_module_LDADD =
+@COND_i386_pc_TRUE@gcry_sha512_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_sha512_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_sha512_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_sha512_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_sha512_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_sha512_module_LDADD =
+@COND_emu_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_sha512_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_sha512_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_sha512_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_sha512_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_i386_efi_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_i386_pc_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_tiger_module_SOURCES = lib/libgcrypt-grub/cipher/tiger.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_tiger_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_tiger_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_tiger_module_LDADD =
+@COND_i386_efi_TRUE@gcry_tiger_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_tiger_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_tiger_module_LDADD =
+@COND_i386_pc_TRUE@gcry_tiger_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_tiger_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_tiger_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_tiger_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_tiger_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_tiger_module_LDADD =
+@COND_emu_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_tiger_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_tiger_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_tiger_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_tiger_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_i386_efi_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_i386_pc_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_twofish_module_SOURCES = lib/libgcrypt-grub/cipher/twofish.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_twofish_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_twofish_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_twofish_module_LDADD =
+@COND_i386_efi_TRUE@gcry_twofish_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_twofish_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_twofish_module_LDADD =
+@COND_i386_pc_TRUE@gcry_twofish_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_twofish_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_twofish_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_twofish_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_twofish_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_twofish_module_LDADD =
+@COND_emu_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_twofish_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_twofish_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_twofish_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_twofish_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_i386_coreboot_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_i386_efi_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_i386_ieee1275_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_i386_multiboot_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_i386_pc_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_i386_qemu_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_mips_yeeloong_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_powerpc_ieee1275_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_sparc64_ieee1275_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_x86_64_efi_TRUE@gcry_whirlpool_module_SOURCES = lib/libgcrypt-grub/cipher/whirlpool.c ## platform sources
+@COND_emu_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_gcry_whirlpool_module_SOURCES = ## platform nodist sources
+@COND_emu_TRUE@gcry_whirlpool_module_LDADD =
+@COND_i386_coreboot_TRUE@gcry_whirlpool_module_LDADD =
+@COND_i386_efi_TRUE@gcry_whirlpool_module_LDADD =
+@COND_i386_ieee1275_TRUE@gcry_whirlpool_module_LDADD =
+@COND_i386_multiboot_TRUE@gcry_whirlpool_module_LDADD =
+@COND_i386_pc_TRUE@gcry_whirlpool_module_LDADD =
+@COND_i386_qemu_TRUE@gcry_whirlpool_module_LDADD =
+@COND_mips_yeeloong_TRUE@gcry_whirlpool_module_LDADD =
+@COND_powerpc_ieee1275_TRUE@gcry_whirlpool_module_LDADD =
+@COND_sparc64_ieee1275_TRUE@gcry_whirlpool_module_LDADD =
+@COND_x86_64_efi_TRUE@gcry_whirlpool_module_LDADD =
+@COND_emu_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_whirlpool_module_CFLAGS = $(AM_CFLAGS) $(CFLAGS_MODULE) $(CFLAGS_GCRY)
+@COND_emu_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_whirlpool_module_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_MODULE)
+@COND_emu_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_coreboot_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_efi_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_ieee1275_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_multiboot_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_pc_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_i386_qemu_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_mips_yeeloong_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_powerpc_ieee1275_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_sparc64_ieee1275_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_x86_64_efi_TRUE@gcry_whirlpool_module_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_MODULE) $(CPPFLAGS_GCRY)
+@COND_emu_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_coreboot_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_efi_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_ieee1275_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_multiboot_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_pc_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_i386_qemu_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_mips_yeeloong_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_powerpc_ieee1275_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_sparc64_ieee1275_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_x86_64_efi_TRUE@gcry_whirlpool_module_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_MODULE)
+@COND_emu_TRUE@kernel_exec_SOURCES = disk/host.c gnulib/progname.c \
+@COND_emu_TRUE@ gnulib/error.c kern/emu/cache.S \
+@COND_emu_TRUE@ kern/emu/console.c kern/emu/getroot.c \
+@COND_emu_TRUE@ kern/emu/hostdisk.c kern/emu/hostfs.c \
+@COND_emu_TRUE@ kern/emu/main.c kern/emu/misc.c kern/emu/mm.c \
+@COND_emu_TRUE@ kern/emu/time.c kern/command.c kern/corecmd.c \
+@COND_emu_TRUE@ kern/device.c kern/disk.c kern/dl.c kern/env.c \
+@COND_emu_TRUE@ kern/err.c kern/file.c kern/fs.c kern/list.c \
+@COND_emu_TRUE@ kern/main.c kern/misc.c kern/parser.c \
+@COND_emu_TRUE@ kern/partition.c kern/rescue_parser.c \
+@COND_emu_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_i386_coreboot_TRUE@kernel_exec_SOURCES = \
+@COND_i386_coreboot_TRUE@ kern/i386/coreboot/startup.S \
+@COND_i386_coreboot_TRUE@ kern/generic/rtc_get_time_ms.c \
+@COND_i386_coreboot_TRUE@ kern/i386/coreboot/mmap.c \
+@COND_i386_coreboot_TRUE@ kern/i386/tsc.c \
+@COND_i386_coreboot_TRUE@ kern/i386/coreboot/init.c \
+@COND_i386_coreboot_TRUE@ term/i386/pc/vga_text.c \
+@COND_i386_coreboot_TRUE@ term/i386/vga_common.c kern/i386/dl.c \
+@COND_i386_coreboot_TRUE@ kern/i386/pit.c kern/mm.c kern/time.c \
+@COND_i386_coreboot_TRUE@ kern/generic/millisleep.c \
+@COND_i386_coreboot_TRUE@ kern/command.c kern/corecmd.c \
+@COND_i386_coreboot_TRUE@ kern/device.c kern/disk.c kern/dl.c \
+@COND_i386_coreboot_TRUE@ kern/env.c kern/err.c kern/file.c \
+@COND_i386_coreboot_TRUE@ kern/fs.c kern/list.c kern/main.c \
+@COND_i386_coreboot_TRUE@ kern/misc.c kern/parser.c \
+@COND_i386_coreboot_TRUE@ kern/partition.c kern/rescue_parser.c \
+@COND_i386_coreboot_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_i386_efi_TRUE@kernel_exec_SOURCES = kern/i386/efi/startup.S \
+@COND_i386_efi_TRUE@ kern/i386/tsc.c \
+@COND_i386_efi_TRUE@ kern/generic/rtc_get_time_ms.c \
+@COND_i386_efi_TRUE@ disk/efi/efidisk.c kern/efi/efi.c \
+@COND_i386_efi_TRUE@ kern/efi/init.c kern/efi/mm.c \
+@COND_i386_efi_TRUE@ kern/i386/efi/init.c term/efi/console.c \
+@COND_i386_efi_TRUE@ kern/i386/dl.c kern/i386/pit.c kern/mm.c \
+@COND_i386_efi_TRUE@ kern/time.c kern/generic/millisleep.c \
+@COND_i386_efi_TRUE@ kern/command.c kern/corecmd.c \
+@COND_i386_efi_TRUE@ kern/device.c kern/disk.c kern/dl.c \
+@COND_i386_efi_TRUE@ kern/env.c kern/err.c kern/file.c \
+@COND_i386_efi_TRUE@ kern/fs.c kern/list.c kern/main.c \
+@COND_i386_efi_TRUE@ kern/misc.c kern/parser.c kern/partition.c \
+@COND_i386_efi_TRUE@ kern/rescue_parser.c kern/rescue_reader.c \
+@COND_i386_efi_TRUE@ kern/term.c
+@COND_i386_ieee1275_TRUE@kernel_exec_SOURCES = \
+@COND_i386_ieee1275_TRUE@ kern/i386/ieee1275/startup.S \
+@COND_i386_ieee1275_TRUE@ kern/ieee1275/init.c \
+@COND_i386_ieee1275_TRUE@ disk/ieee1275/ofdisk.c \
+@COND_i386_ieee1275_TRUE@ kern/ieee1275/cmain.c \
+@COND_i386_ieee1275_TRUE@ kern/ieee1275/ieee1275.c \
+@COND_i386_ieee1275_TRUE@ kern/ieee1275/mmap.c \
+@COND_i386_ieee1275_TRUE@ kern/ieee1275/openfw.c \
+@COND_i386_ieee1275_TRUE@ term/ieee1275/ofconsole.c \
+@COND_i386_ieee1275_TRUE@ term/terminfo.c term/tparm.c \
+@COND_i386_ieee1275_TRUE@ commands/extcmd.c lib/arg.c \
+@COND_i386_ieee1275_TRUE@ kern/i386/dl.c kern/i386/pit.c \
+@COND_i386_ieee1275_TRUE@ kern/mm.c kern/time.c \
+@COND_i386_ieee1275_TRUE@ kern/generic/millisleep.c \
+@COND_i386_ieee1275_TRUE@ kern/command.c kern/corecmd.c \
+@COND_i386_ieee1275_TRUE@ kern/device.c kern/disk.c kern/dl.c \
+@COND_i386_ieee1275_TRUE@ kern/env.c kern/err.c kern/file.c \
+@COND_i386_ieee1275_TRUE@ kern/fs.c kern/list.c kern/main.c \
+@COND_i386_ieee1275_TRUE@ kern/misc.c kern/parser.c \
+@COND_i386_ieee1275_TRUE@ kern/partition.c kern/rescue_parser.c \
+@COND_i386_ieee1275_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_i386_multiboot_TRUE@kernel_exec_SOURCES = \
+@COND_i386_multiboot_TRUE@ kern/i386/coreboot/startup.S \
+@COND_i386_multiboot_TRUE@ kern/generic/rtc_get_time_ms.c \
+@COND_i386_multiboot_TRUE@ kern/i386/multiboot_mmap.c \
+@COND_i386_multiboot_TRUE@ kern/i386/tsc.c \
+@COND_i386_multiboot_TRUE@ kern/i386/coreboot/init.c \
+@COND_i386_multiboot_TRUE@ term/i386/pc/vga_text.c \
+@COND_i386_multiboot_TRUE@ term/i386/vga_common.c \
+@COND_i386_multiboot_TRUE@ kern/i386/dl.c kern/i386/pit.c \
+@COND_i386_multiboot_TRUE@ kern/mm.c kern/time.c \
+@COND_i386_multiboot_TRUE@ kern/generic/millisleep.c \
+@COND_i386_multiboot_TRUE@ kern/command.c kern/corecmd.c \
+@COND_i386_multiboot_TRUE@ kern/device.c kern/disk.c kern/dl.c \
+@COND_i386_multiboot_TRUE@ kern/env.c kern/err.c kern/file.c \
+@COND_i386_multiboot_TRUE@ kern/fs.c kern/list.c kern/main.c \
+@COND_i386_multiboot_TRUE@ kern/misc.c kern/parser.c \
+@COND_i386_multiboot_TRUE@ kern/partition.c \
+@COND_i386_multiboot_TRUE@ kern/rescue_parser.c \
+@COND_i386_multiboot_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_i386_pc_TRUE@kernel_exec_SOURCES = kern/i386/pc/startup.S \
+@COND_i386_pc_TRUE@ kern/generic/rtc_get_time_ms.c \
+@COND_i386_pc_TRUE@ term/i386/vga_common.c kern/i386/pc/init.c \
+@COND_i386_pc_TRUE@ kern/i386/pc/mmap.c kern/i386/tsc.c \
+@COND_i386_pc_TRUE@ term/i386/pc/console.c kern/i386/dl.c \
+@COND_i386_pc_TRUE@ kern/i386/pit.c kern/mm.c kern/time.c \
+@COND_i386_pc_TRUE@ kern/generic/millisleep.c kern/command.c \
+@COND_i386_pc_TRUE@ kern/corecmd.c kern/device.c kern/disk.c \
+@COND_i386_pc_TRUE@ kern/dl.c kern/env.c kern/err.c kern/file.c \
+@COND_i386_pc_TRUE@ kern/fs.c kern/list.c kern/main.c \
+@COND_i386_pc_TRUE@ kern/misc.c kern/parser.c kern/partition.c \
+@COND_i386_pc_TRUE@ kern/rescue_parser.c kern/rescue_reader.c \
+@COND_i386_pc_TRUE@ kern/term.c
+@COND_i386_qemu_TRUE@kernel_exec_SOURCES = kern/i386/qemu/startup.S \
+@COND_i386_qemu_TRUE@ kern/generic/rtc_get_time_ms.c bus/pci.c \
+@COND_i386_qemu_TRUE@ kern/i386/qemu/init.c \
+@COND_i386_qemu_TRUE@ kern/i386/qemu/mmap.c kern/i386/tsc.c \
+@COND_i386_qemu_TRUE@ kern/i386/coreboot/init.c \
+@COND_i386_qemu_TRUE@ term/i386/pc/vga_text.c \
+@COND_i386_qemu_TRUE@ term/i386/vga_common.c kern/i386/dl.c \
+@COND_i386_qemu_TRUE@ kern/i386/pit.c kern/mm.c kern/time.c \
+@COND_i386_qemu_TRUE@ kern/generic/millisleep.c kern/command.c \
+@COND_i386_qemu_TRUE@ kern/corecmd.c kern/device.c kern/disk.c \
+@COND_i386_qemu_TRUE@ kern/dl.c kern/env.c kern/err.c \
+@COND_i386_qemu_TRUE@ kern/file.c kern/fs.c kern/list.c \
+@COND_i386_qemu_TRUE@ kern/main.c kern/misc.c kern/parser.c \
+@COND_i386_qemu_TRUE@ kern/partition.c kern/rescue_parser.c \
+@COND_i386_qemu_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_mips_yeeloong_TRUE@kernel_exec_SOURCES = kern/mips/startup.S \
+@COND_mips_yeeloong_TRUE@ kern/generic/rtc_get_time_ms.c \
+@COND_mips_yeeloong_TRUE@ term/ns8250.c bus/bonito.c \
+@COND_mips_yeeloong_TRUE@ bus/cs5536.c bus/pci.c \
+@COND_mips_yeeloong_TRUE@ kern/mips/cache.S kern/mips/dl.c \
+@COND_mips_yeeloong_TRUE@ kern/mips/init.c \
+@COND_mips_yeeloong_TRUE@ kern/mips/yeeloong/init.c \
+@COND_mips_yeeloong_TRUE@ term/at_keyboard.c term/serial.c \
+@COND_mips_yeeloong_TRUE@ video/sm712.c commands/keylayouts.c \
+@COND_mips_yeeloong_TRUE@ term/gfxterm.c font/font.c \
+@COND_mips_yeeloong_TRUE@ font/font_cmd.c io/bufio.c \
+@COND_mips_yeeloong_TRUE@ video/bitmap.c video/bitmap_scale.c \
+@COND_mips_yeeloong_TRUE@ video/fb/fbblit.c video/fb/fbfill.c \
+@COND_mips_yeeloong_TRUE@ video/fb/fbutil.c video/fb/video_fb.c \
+@COND_mips_yeeloong_TRUE@ video/video.c commands/boot.c \
+@COND_mips_yeeloong_TRUE@ term/terminfo.c term/tparm.c \
+@COND_mips_yeeloong_TRUE@ commands/extcmd.c lib/arg.c kern/mm.c \
+@COND_mips_yeeloong_TRUE@ kern/time.c kern/generic/millisleep.c \
+@COND_mips_yeeloong_TRUE@ kern/command.c kern/corecmd.c \
+@COND_mips_yeeloong_TRUE@ kern/device.c kern/disk.c kern/dl.c \
+@COND_mips_yeeloong_TRUE@ kern/env.c kern/err.c kern/file.c \
+@COND_mips_yeeloong_TRUE@ kern/fs.c kern/list.c kern/main.c \
+@COND_mips_yeeloong_TRUE@ kern/misc.c kern/parser.c \
+@COND_mips_yeeloong_TRUE@ kern/partition.c kern/rescue_parser.c \
+@COND_mips_yeeloong_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_powerpc_ieee1275_TRUE@kernel_exec_SOURCES = \
+@COND_powerpc_ieee1275_TRUE@ kern/powerpc/ieee1275/startup.S \
+@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/init.c \
+@COND_powerpc_ieee1275_TRUE@ kern/powerpc/cache.S \
+@COND_powerpc_ieee1275_TRUE@ kern/powerpc/dl.c \
+@COND_powerpc_ieee1275_TRUE@ disk/ieee1275/ofdisk.c \
+@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/cmain.c \
+@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/ieee1275.c \
+@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/mmap.c \
+@COND_powerpc_ieee1275_TRUE@ kern/ieee1275/openfw.c \
+@COND_powerpc_ieee1275_TRUE@ term/ieee1275/ofconsole.c \
+@COND_powerpc_ieee1275_TRUE@ term/terminfo.c term/tparm.c \
+@COND_powerpc_ieee1275_TRUE@ commands/extcmd.c lib/arg.c \
+@COND_powerpc_ieee1275_TRUE@ kern/mm.c kern/time.c \
+@COND_powerpc_ieee1275_TRUE@ kern/generic/millisleep.c \
+@COND_powerpc_ieee1275_TRUE@ kern/command.c kern/corecmd.c \
+@COND_powerpc_ieee1275_TRUE@ kern/device.c kern/disk.c \
+@COND_powerpc_ieee1275_TRUE@ kern/dl.c kern/env.c kern/err.c \
+@COND_powerpc_ieee1275_TRUE@ kern/file.c kern/fs.c kern/list.c \
+@COND_powerpc_ieee1275_TRUE@ kern/main.c kern/misc.c \
+@COND_powerpc_ieee1275_TRUE@ kern/parser.c kern/partition.c \
+@COND_powerpc_ieee1275_TRUE@ kern/rescue_parser.c \
+@COND_powerpc_ieee1275_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_sparc64_ieee1275_TRUE@kernel_exec_SOURCES = \
+@COND_sparc64_ieee1275_TRUE@ kern/sparc64/ieee1275/crt0.S \
+@COND_sparc64_ieee1275_TRUE@ kern/sparc64/cache.S \
+@COND_sparc64_ieee1275_TRUE@ kern/sparc64/dl.c \
+@COND_sparc64_ieee1275_TRUE@ kern/sparc64/ieee1275/ieee1275.c \
+@COND_sparc64_ieee1275_TRUE@ kern/sparc64/ieee1275/init.c \
+@COND_sparc64_ieee1275_TRUE@ disk/ieee1275/ofdisk.c \
+@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/cmain.c \
+@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/ieee1275.c \
+@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/mmap.c \
+@COND_sparc64_ieee1275_TRUE@ kern/ieee1275/openfw.c \
+@COND_sparc64_ieee1275_TRUE@ term/ieee1275/ofconsole.c \
+@COND_sparc64_ieee1275_TRUE@ term/terminfo.c term/tparm.c \
+@COND_sparc64_ieee1275_TRUE@ commands/extcmd.c lib/arg.c \
+@COND_sparc64_ieee1275_TRUE@ kern/mm.c kern/time.c \
+@COND_sparc64_ieee1275_TRUE@ kern/generic/millisleep.c \
+@COND_sparc64_ieee1275_TRUE@ kern/command.c kern/corecmd.c \
+@COND_sparc64_ieee1275_TRUE@ kern/device.c kern/disk.c \
+@COND_sparc64_ieee1275_TRUE@ kern/dl.c kern/env.c kern/err.c \
+@COND_sparc64_ieee1275_TRUE@ kern/file.c kern/fs.c kern/list.c \
+@COND_sparc64_ieee1275_TRUE@ kern/main.c kern/misc.c \
+@COND_sparc64_ieee1275_TRUE@ kern/parser.c kern/partition.c \
+@COND_sparc64_ieee1275_TRUE@ kern/rescue_parser.c \
+@COND_sparc64_ieee1275_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_x86_64_efi_TRUE@kernel_exec_SOURCES = kern/x86_64/efi/startup.S \
+@COND_x86_64_efi_TRUE@ kern/i386/tsc.c kern/x86_64/dl.c \
+@COND_x86_64_efi_TRUE@ kern/x86_64/efi/callwrap.S \
+@COND_x86_64_efi_TRUE@ kern/generic/rtc_get_time_ms.c \
+@COND_x86_64_efi_TRUE@ disk/efi/efidisk.c kern/efi/efi.c \
+@COND_x86_64_efi_TRUE@ kern/efi/init.c kern/efi/mm.c \
+@COND_x86_64_efi_TRUE@ kern/i386/efi/init.c term/efi/console.c \
+@COND_x86_64_efi_TRUE@ kern/i386/pit.c kern/mm.c kern/time.c \
+@COND_x86_64_efi_TRUE@ kern/generic/millisleep.c kern/command.c \
+@COND_x86_64_efi_TRUE@ kern/corecmd.c kern/device.c kern/disk.c \
+@COND_x86_64_efi_TRUE@ kern/dl.c kern/env.c kern/err.c \
+@COND_x86_64_efi_TRUE@ kern/file.c kern/fs.c kern/list.c \
+@COND_x86_64_efi_TRUE@ kern/main.c kern/misc.c kern/parser.c \
+@COND_x86_64_efi_TRUE@ kern/partition.c kern/rescue_parser.c \
+@COND_x86_64_efi_TRUE@ kern/rescue_reader.c kern/term.c
+@COND_emu_TRUE@nodist_kernel_exec_SOURCES = ## platform nodist sources
+@COND_i386_coreboot_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_i386_efi_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_i386_ieee1275_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_i386_multiboot_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_i386_pc_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_mips_yeeloong_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_powerpc_ieee1275_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_x86_64_efi_TRUE@nodist_kernel_exec_SOURCES = symlist.c ## platform nodist sources
+@COND_emu_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_i386_coreboot_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_i386_efi_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_i386_ieee1275_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_i386_multiboot_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_i386_pc_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_i386_qemu_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_mips_yeeloong_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_powerpc_ieee1275_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_sparc64_ieee1275_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_x86_64_efi_TRUE@kernel_exec_LDADD = $(LDADD_KERNEL)
+@COND_emu_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL) $(CFLAGS_GNULIB)
+@COND_i386_coreboot_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_i386_efi_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_i386_ieee1275_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_i386_multiboot_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_i386_pc_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_i386_qemu_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_mips_yeeloong_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_powerpc_ieee1275_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_sparc64_ieee1275_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_x86_64_efi_TRUE@kernel_exec_CFLAGS = $(AM_CFLAGS) $(CFLAGS_KERNEL)
+@COND_emu_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-r,-d
+@COND_i386_coreboot_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext=0x8200
+@COND_i386_efi_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-r,-d
+@COND_i386_ieee1275_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext=0x10000
+@COND_i386_multiboot_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext=0x8200
+@COND_i386_pc_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200
+@COND_i386_qemu_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200
+@COND_mips_yeeloong_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext,0x80200000
+@COND_powerpc_ieee1275_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext,0x200000
+@COND_sparc64_ieee1275_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-Ttext,0x4400
+@COND_x86_64_efi_TRUE@kernel_exec_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_KERNEL) -Wl,-r,-d
+@COND_emu_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS_GNULIB)
+@COND_i386_coreboot_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_i386_efi_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_i386_ieee1275_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_i386_multiboot_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_i386_pc_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_i386_qemu_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
+@COND_mips_yeeloong_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) -DUSE_ASCII_FAILBACK
+@COND_powerpc_ieee1275_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_sparc64_ieee1275_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_x86_64_efi_TRUE@kernel_exec_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL)
+@COND_emu_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_i386_coreboot_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_i386_efi_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_i386_ieee1275_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_i386_multiboot_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_i386_pc_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_i386_qemu_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_mips_yeeloong_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_powerpc_ieee1275_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_sparc64_ieee1275_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_x86_64_efi_TRUE@kernel_exec_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_KERNEL)
+@COND_emu_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_i386_coreboot_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_i386_efi_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL) --strip-unneeded -K start -R .note -R .comment
+@COND_i386_ieee1275_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_i386_multiboot_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_i386_pc_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_i386_qemu_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_mips_yeeloong_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_powerpc_ieee1275_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_sparc64_ieee1275_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL)
+@COND_x86_64_efi_TRUE@kernel_exec_STRIPFLAGS = $(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL) --strip-unneeded -K start -R .note -R .comment
+@COND_i386_pc_TRUE@boot_image_SOURCES = boot/i386/pc/boot.S
+@COND_i386_qemu_TRUE@boot_image_SOURCES = boot/i386/qemu/boot.S
+@COND_sparc64_ieee1275_TRUE@boot_image_SOURCES = boot/sparc64/ieee1275/boot.S
+@COND_i386_pc_TRUE@nodist_boot_image_SOURCES = ## platform nodist sources
+@COND_i386_qemu_TRUE@nodist_boot_image_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_boot_image_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@boot_image_LDADD =
+@COND_i386_qemu_TRUE@boot_image_LDADD =
+@COND_sparc64_ieee1275_TRUE@boot_image_LDADD =
+@COND_i386_pc_TRUE@boot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_i386_qemu_TRUE@boot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_sparc64_ieee1275_TRUE@boot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_i386_pc_TRUE@boot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x7C00
+@COND_i386_qemu_TRUE@boot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),$(GRUB_BOOT_MACHINE_LINK_ADDR)
+@COND_sparc64_ieee1275_TRUE@boot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -Wl,-Ttext=0x4000
+@COND_i386_pc_TRUE@boot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_i386_qemu_TRUE@boot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_sparc64_ieee1275_TRUE@boot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_i386_pc_TRUE@boot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_i386_qemu_TRUE@boot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
+@COND_sparc64_ieee1275_TRUE@boot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_i386_pc_TRUE@boot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_i386_qemu_TRUE@boot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_sparc64_ieee1275_TRUE@boot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O a.out-sunos-big
+@COND_i386_pc_TRUE@cdboot_image_SOURCES = boot/i386/pc/cdboot.S
+@COND_i386_pc_TRUE@nodist_cdboot_image_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@cdboot_image_LDADD =
+@COND_i386_pc_TRUE@cdboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_i386_pc_TRUE@cdboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x7C00
+@COND_i386_pc_TRUE@cdboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_i386_pc_TRUE@cdboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_i386_pc_TRUE@cdboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_i386_pc_TRUE@pxeboot_image_SOURCES = boot/i386/pc/pxeboot.S
+@COND_i386_pc_TRUE@nodist_pxeboot_image_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@pxeboot_image_LDADD =
+@COND_i386_pc_TRUE@pxeboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_i386_pc_TRUE@pxeboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x7C00
+@COND_i386_pc_TRUE@pxeboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_i386_pc_TRUE@pxeboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_i386_pc_TRUE@pxeboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_i386_pc_TRUE@diskboot_image_SOURCES = boot/i386/pc/diskboot.S
+@COND_sparc64_ieee1275_TRUE@diskboot_image_SOURCES = boot/sparc64/ieee1275/diskboot.S
+@COND_i386_pc_TRUE@nodist_diskboot_image_SOURCES = ## platform nodist sources
+@COND_sparc64_ieee1275_TRUE@nodist_diskboot_image_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@diskboot_image_LDADD =
+@COND_sparc64_ieee1275_TRUE@diskboot_image_LDADD =
+@COND_i386_pc_TRUE@diskboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_sparc64_ieee1275_TRUE@diskboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_i386_pc_TRUE@diskboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8000
+@COND_sparc64_ieee1275_TRUE@diskboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -Wl,-Ttext=0x4200
+@COND_i386_pc_TRUE@diskboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_sparc64_ieee1275_TRUE@diskboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_i386_pc_TRUE@diskboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_sparc64_ieee1275_TRUE@diskboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_i386_pc_TRUE@diskboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_sparc64_ieee1275_TRUE@diskboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_i386_pc_TRUE@lnxboot_image_SOURCES = boot/i386/pc/lnxboot.S
+@COND_i386_pc_TRUE@nodist_lnxboot_image_SOURCES = ## platform nodist sources
+@COND_i386_pc_TRUE@lnxboot_image_LDADD =
+@COND_i386_pc_TRUE@lnxboot_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_i386_pc_TRUE@lnxboot_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) $(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x6000
+@COND_i386_pc_TRUE@lnxboot_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_i386_pc_TRUE@lnxboot_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_i386_pc_TRUE@lnxboot_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_mips_yeeloong_TRUE@xz_decompress_image_SOURCES = boot/mips/startup_raw.S boot/decompressor/minilib.c boot/decompressor/xz.c lib/xzembed/xz_dec_bcj.c lib/xzembed/xz_dec_lzma2.c lib/xzembed/xz_dec_stream.c
+@COND_mips_yeeloong_TRUE@nodist_xz_decompress_image_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@xz_decompress_image_LDADD = -lgcc
+@COND_mips_yeeloong_TRUE@xz_decompress_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE) -static-libgcc
+@COND_mips_yeeloong_TRUE@xz_decompress_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -static-libgcc -Wl,-Ttext,0x80100000
+@COND_mips_yeeloong_TRUE@xz_decompress_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) -I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000
+@COND_mips_yeeloong_TRUE@xz_decompress_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_mips_yeeloong_TRUE@xz_decompress_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_mips_yeeloong_TRUE@none_decompress_image_SOURCES = boot/mips/startup_raw.S boot/decompressor/none.c
+@COND_mips_yeeloong_TRUE@nodist_none_decompress_image_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@none_decompress_image_LDADD = -lgcc
+@COND_mips_yeeloong_TRUE@none_decompress_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE) -static-libgcc
+@COND_mips_yeeloong_TRUE@none_decompress_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -static-libgcc -Wl,-Ttext,0x80100000
+@COND_mips_yeeloong_TRUE@none_decompress_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000
+@COND_mips_yeeloong_TRUE@none_decompress_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_mips_yeeloong_TRUE@none_decompress_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+@COND_mips_yeeloong_TRUE@fwstart_image_SOURCES = boot/mips/yeeloong/fwstart.S
+@COND_mips_yeeloong_TRUE@nodist_fwstart_image_SOURCES = ## platform nodist sources
+@COND_mips_yeeloong_TRUE@fwstart_image_LDADD =
+@COND_mips_yeeloong_TRUE@fwstart_image_CFLAGS = $(AM_CFLAGS) $(CFLAGS_IMAGE)
+@COND_mips_yeeloong_TRUE@fwstart_image_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_IMAGE) -static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic
+@COND_mips_yeeloong_TRUE@fwstart_image_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_IMAGE)
+@COND_mips_yeeloong_TRUE@fwstart_image_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_IMAGE)
+@COND_mips_yeeloong_TRUE@fwstart_image_OBJCOPYFLAGS = $(OBJCOPYFLAGS_IMAGE) -O binary
+libgnulib_a_SOURCES = $(am__append_12225) $(am__append_12234) \
+ $(am__append_12243) $(am__append_12252) $(am__append_12261) \
+ $(am__append_12270) $(am__append_12279) $(am__append_12288) \
+ $(am__append_12297) $(am__append_12306) $(am__append_12315)
+nodist_libgnulib_a_SOURCES = $(am__append_12226) $(am__append_12235) \
+ $(am__append_12244) $(am__append_12253) $(am__append_12262) \
+ $(am__append_12271) $(am__append_12280) $(am__append_12289) \
+ $(am__append_12298) $(am__append_12307) $(am__append_12316)
+libgnulib_a_CFLAGS = $(am__append_12227) $(am__append_12236) \
+ $(am__append_12245) $(am__append_12254) $(am__append_12263) \
+ $(am__append_12272) $(am__append_12281) $(am__append_12290) \
+ $(am__append_12299) $(am__append_12308) $(am__append_12317)
+libgnulib_a_CPPFLAGS = $(am__append_12228) $(am__append_12237) \
+ $(am__append_12246) $(am__append_12255) $(am__append_12264) \
+ $(am__append_12273) $(am__append_12282) $(am__append_12291) \
+ $(am__append_12300) $(am__append_12309) $(am__append_12318)
+libgnulib_a_CCASFLAGS = $(am__append_12229) $(am__append_12238) \
+ $(am__append_12247) $(am__append_12256) $(am__append_12265) \
+ $(am__append_12274) $(am__append_12283) $(am__append_12292) \
+ $(am__append_12301) $(am__append_12310) $(am__append_12319)
+@COND_emu_TRUE@grub_emu_SOURCES = kern/emu/full.c
+@COND_emu_TRUE@nodist_grub_emu_SOURCES = grub_emu_init.c
+@COND_emu_TRUE@grub_emu_LDADD = kernel.img$(EXEEXT) $(MODULE_FILES) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
+@COND_emu_TRUE@grub_emu_CFLAGS = $(AM_CFLAGS) $(CFLAGS_PROGRAM)
+@COND_emu_TRUE@grub_emu_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM)
+@COND_emu_TRUE@grub_emu_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM)
+@COND_emu_TRUE@grub_emu_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM)
+@COND_emu_TRUE@grub_emu_lite_SOURCES = kern/emu/lite.c
+@COND_emu_TRUE@nodist_grub_emu_lite_SOURCES = symlist.c
+@COND_emu_TRUE@grub_emu_lite_LDADD = kernel.img$(EXEEXT) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
+@COND_emu_TRUE@grub_emu_lite_CFLAGS = $(AM_CFLAGS) $(CFLAGS_PROGRAM)
+@COND_emu_TRUE@grub_emu_lite_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM)
+@COND_emu_TRUE@grub_emu_lite_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM)
+@COND_emu_TRUE@grub_emu_lite_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM)
+@COND_HAVE_ASM_USCORE_FALSE@ASM_PREFIX =
+@COND_HAVE_ASM_USCORE_TRUE@ASM_PREFIX = _
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/conf/Makefile.common $(srcdir)/Makefile.core.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu grub-core/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu grub-core/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+gnulib/$(am__dirstamp):
+ @$(MKDIR_P) gnulib
+ @: > gnulib/$(am__dirstamp)
+gnulib/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) gnulib/$(DEPDIR)
+ @: > gnulib/$(DEPDIR)/$(am__dirstamp)
+gnulib/libgnulib_a-regex.$(OBJEXT): gnulib/$(am__dirstamp) \
+ gnulib/$(DEPDIR)/$(am__dirstamp)
+libgnulib.a: $(libgnulib_a_OBJECTS) $(libgnulib_a_DEPENDENCIES)
+ -rm -f libgnulib.a
+ $(libgnulib_a_AR) libgnulib.a $(libgnulib_a_OBJECTS) $(libgnulib_a_LIBADD)
+ $(RANLIB) libgnulib.a
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+ -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+commands/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) commands/i386/pc
+ @: > commands/i386/pc/$(am__dirstamp)
+commands/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) commands/i386/pc/$(DEPDIR)
+ @: > commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+commands/i386/pc/acpi_module-acpi.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+commands/$(am__dirstamp):
+ @$(MKDIR_P) commands
+ @: > commands/$(am__dirstamp)
+commands/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) commands/$(DEPDIR)
+ @: > commands/$(DEPDIR)/$(am__dirstamp)
+commands/acpi_module-acpi.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+commands/efi/$(am__dirstamp):
+ @$(MKDIR_P) commands/efi
+ @: > commands/efi/$(am__dirstamp)
+commands/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) commands/efi/$(DEPDIR)
+ @: > commands/efi/$(DEPDIR)/$(am__dirstamp)
+commands/efi/acpi_module-acpi.$(OBJEXT): commands/efi/$(am__dirstamp) \
+ commands/efi/$(DEPDIR)/$(am__dirstamp)
+acpi.module$(EXEEXT): $(acpi_module_OBJECTS) $(acpi_module_DEPENDENCIES)
+ @rm -f acpi.module$(EXEEXT)
+ $(acpi_module_LINK) $(acpi_module_OBJECTS) $(acpi_module_LDADD) $(LIBS)
+fs/$(am__dirstamp):
+ @$(MKDIR_P) fs
+ @: > fs/$(am__dirstamp)
+fs/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) fs/$(DEPDIR)
+ @: > fs/$(DEPDIR)/$(am__dirstamp)
+fs/affs_module-affs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+affs.module$(EXEEXT): $(affs_module_OBJECTS) $(affs_module_DEPENDENCIES)
+ @rm -f affs.module$(EXEEXT)
+ $(affs_module_LINK) $(affs_module_OBJECTS) $(affs_module_LDADD) $(LIBS)
+fs/afs_module-afs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+afs.module$(EXEEXT): $(afs_module_OBJECTS) $(afs_module_DEPENDENCIES)
+ @rm -f afs.module$(EXEEXT)
+ $(afs_module_LINK) $(afs_module_OBJECTS) $(afs_module_LDADD) $(LIBS)
+fs/afs_be_module-afs_be.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+afs_be.module$(EXEEXT): $(afs_be_module_OBJECTS) $(afs_be_module_DEPENDENCIES)
+ @rm -f afs_be.module$(EXEEXT)
+ $(afs_be_module_LINK) $(afs_be_module_OBJECTS) $(afs_be_module_LDADD) $(LIBS)
+loader/$(am__dirstamp):
+ @$(MKDIR_P) loader
+ @: > loader/$(am__dirstamp)
+loader/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) loader/$(DEPDIR)
+ @: > loader/$(DEPDIR)/$(am__dirstamp)
+loader/aout_module-aout.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+aout.module$(EXEEXT): $(aout_module_OBJECTS) $(aout_module_DEPENDENCIES)
+ @rm -f aout.module$(EXEEXT)
+ $(aout_module_LINK) $(aout_module_OBJECTS) $(aout_module_LDADD) $(LIBS)
+loader/efi/$(am__dirstamp):
+ @$(MKDIR_P) loader/efi
+ @: > loader/efi/$(am__dirstamp)
+loader/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) loader/efi/$(DEPDIR)
+ @: > loader/efi/$(DEPDIR)/$(am__dirstamp)
+loader/efi/appleldr_module-appleloader.$(OBJEXT): \
+ loader/efi/$(am__dirstamp) \
+ loader/efi/$(DEPDIR)/$(am__dirstamp)
+appleldr.module$(EXEEXT): $(appleldr_module_OBJECTS) $(appleldr_module_DEPENDENCIES)
+ @rm -f appleldr.module$(EXEEXT)
+ $(appleldr_module_LINK) $(appleldr_module_OBJECTS) $(appleldr_module_LDADD) $(LIBS)
+term/$(am__dirstamp):
+ @$(MKDIR_P) term
+ @: > term/$(am__dirstamp)
+term/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) term/$(DEPDIR)
+ @: > term/$(DEPDIR)/$(am__dirstamp)
+term/at_keyboard_module-at_keyboard.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+at_keyboard.module$(EXEEXT): $(at_keyboard_module_OBJECTS) $(at_keyboard_module_DEPENDENCIES)
+ @rm -f at_keyboard.module$(EXEEXT)
+ $(at_keyboard_module_LINK) $(at_keyboard_module_OBJECTS) $(at_keyboard_module_LDADD) $(LIBS)
+disk/$(am__dirstamp):
+ @$(MKDIR_P) disk
+ @: > disk/$(am__dirstamp)
+disk/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) disk/$(DEPDIR)
+ @: > disk/$(DEPDIR)/$(am__dirstamp)
+disk/ata_module-ata.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+ata.module$(EXEEXT): $(ata_module_OBJECTS) $(ata_module_DEPENDENCIES)
+ @rm -f ata.module$(EXEEXT)
+ $(ata_module_LINK) $(ata_module_OBJECTS) $(ata_module_LDADD) $(LIBS)
+disk/ata_pthru_module-ata_pthru.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+ata_pthru.module$(EXEEXT): $(ata_pthru_module_OBJECTS) $(ata_pthru_module_DEPENDENCIES)
+ @rm -f ata_pthru.module$(EXEEXT)
+ $(ata_pthru_module_LINK) $(ata_pthru_module_OBJECTS) $(ata_pthru_module_LDADD) $(LIBS)
+fs/befs_module-befs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+befs.module$(EXEEXT): $(befs_module_OBJECTS) $(befs_module_DEPENDENCIES)
+ @rm -f befs.module$(EXEEXT)
+ $(befs_module_LINK) $(befs_module_OBJECTS) $(befs_module_LDADD) $(LIBS)
+fs/befs_be_module-befs_be.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+befs_be.module$(EXEEXT): $(befs_be_module_OBJECTS) $(befs_be_module_DEPENDENCIES)
+ @rm -f befs_be.module$(EXEEXT)
+ $(befs_be_module_LINK) $(befs_be_module_OBJECTS) $(befs_be_module_LDADD) $(LIBS)
+disk/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) disk/i386/pc
+ @: > disk/i386/pc/$(am__dirstamp)
+disk/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) disk/i386/pc/$(DEPDIR)
+ @: > disk/i386/pc/$(DEPDIR)/$(am__dirstamp)
+disk/i386/pc/biosdisk_module-biosdisk.$(OBJEXT): \
+ disk/i386/pc/$(am__dirstamp) \
+ disk/i386/pc/$(DEPDIR)/$(am__dirstamp)
+biosdisk.module$(EXEEXT): $(biosdisk_module_OBJECTS) $(biosdisk_module_DEPENDENCIES)
+ @rm -f biosdisk.module$(EXEEXT)
+ $(biosdisk_module_LINK) $(biosdisk_module_OBJECTS) $(biosdisk_module_LDADD) $(LIBS)
+video/$(am__dirstamp):
+ @$(MKDIR_P) video
+ @: > video/$(am__dirstamp)
+video/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) video/$(DEPDIR)
+ @: > video/$(DEPDIR)/$(am__dirstamp)
+video/bitmap_module-bitmap.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+bitmap.module$(EXEEXT): $(bitmap_module_OBJECTS) $(bitmap_module_DEPENDENCIES)
+ @rm -f bitmap.module$(EXEEXT)
+ $(bitmap_module_LINK) $(bitmap_module_OBJECTS) $(bitmap_module_LDADD) $(LIBS)
+video/bitmap_scale_module-bitmap_scale.$(OBJEXT): \
+ video/$(am__dirstamp) video/$(DEPDIR)/$(am__dirstamp)
+bitmap_scale.module$(EXEEXT): $(bitmap_scale_module_OBJECTS) $(bitmap_scale_module_DEPENDENCIES)
+ @rm -f bitmap_scale.module$(EXEEXT)
+ $(bitmap_scale_module_LINK) $(bitmap_scale_module_OBJECTS) $(bitmap_scale_module_LDADD) $(LIBS)
+commands/blocklist_module-blocklist.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+blocklist.module$(EXEEXT): $(blocklist_module_OBJECTS) $(blocklist_module_DEPENDENCIES)
+ @rm -f blocklist.module$(EXEEXT)
+ $(blocklist_module_LINK) $(blocklist_module_OBJECTS) $(blocklist_module_LDADD) $(LIBS)
+boot/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) boot/i386/pc
+ @: > boot/i386/pc/$(am__dirstamp)
+boot/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) boot/i386/pc/$(DEPDIR)
+ @: > boot/i386/pc/$(DEPDIR)/$(am__dirstamp)
+boot/i386/pc/boot_image-boot.$(OBJEXT): boot/i386/pc/$(am__dirstamp) \
+ boot/i386/pc/$(DEPDIR)/$(am__dirstamp)
+boot/i386/qemu/$(am__dirstamp):
+ @$(MKDIR_P) boot/i386/qemu
+ @: > boot/i386/qemu/$(am__dirstamp)
+boot/i386/qemu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) boot/i386/qemu/$(DEPDIR)
+ @: > boot/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+boot/i386/qemu/boot_image-boot.$(OBJEXT): \
+ boot/i386/qemu/$(am__dirstamp) \
+ boot/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+boot/sparc64/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) boot/sparc64/ieee1275
+ @: > boot/sparc64/ieee1275/$(am__dirstamp)
+boot/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) boot/sparc64/ieee1275/$(DEPDIR)
+ @: > boot/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+boot/sparc64/ieee1275/boot_image-boot.$(OBJEXT): \
+ boot/sparc64/ieee1275/$(am__dirstamp) \
+ boot/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+boot.image$(EXEEXT): $(boot_image_OBJECTS) $(boot_image_DEPENDENCIES)
+ @rm -f boot.image$(EXEEXT)
+ $(boot_image_LINK) $(boot_image_OBJECTS) $(boot_image_LDADD) $(LIBS)
+commands/boot_module-boot.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lib/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) lib/i386/pc
+ @: > lib/i386/pc/$(am__dirstamp)
+lib/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/i386/pc/$(DEPDIR)
+ @: > lib/i386/pc/$(DEPDIR)/$(am__dirstamp)
+lib/i386/pc/boot_module-biosnum.$(OBJEXT): \
+ lib/i386/pc/$(am__dirstamp) \
+ lib/i386/pc/$(DEPDIR)/$(am__dirstamp)
+boot.module$(EXEEXT): $(boot_module_OBJECTS) $(boot_module_DEPENDENCIES)
+ @rm -f boot.module$(EXEEXT)
+ $(boot_module_LINK) $(boot_module_OBJECTS) $(boot_module_LDADD) $(LIBS)
+loader/i386/$(am__dirstamp):
+ @$(MKDIR_P) loader/i386
+ @: > loader/i386/$(am__dirstamp)
+loader/i386/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) loader/i386/$(DEPDIR)
+ @: > loader/i386/$(DEPDIR)/$(am__dirstamp)
+loader/i386/bsd_module-bsd.$(OBJEXT): loader/i386/$(am__dirstamp) \
+ loader/i386/$(DEPDIR)/$(am__dirstamp)
+loader/i386/bsd_module-bsd32.$(OBJEXT): loader/i386/$(am__dirstamp) \
+ loader/i386/$(DEPDIR)/$(am__dirstamp)
+loader/i386/bsd_module-bsd64.$(OBJEXT): loader/i386/$(am__dirstamp) \
+ loader/i386/$(DEPDIR)/$(am__dirstamp)
+bsd.module$(EXEEXT): $(bsd_module_OBJECTS) $(bsd_module_DEPENDENCIES)
+ @rm -f bsd.module$(EXEEXT)
+ $(bsd_module_LINK) $(bsd_module_OBJECTS) $(bsd_module_LDADD) $(LIBS)
+fs/btrfs_module-btrfs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+lib/$(am__dirstamp):
+ @$(MKDIR_P) lib
+ @: > lib/$(am__dirstamp)
+lib/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/$(DEPDIR)
+ @: > lib/$(DEPDIR)/$(am__dirstamp)
+lib/btrfs_module-crc.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+btrfs.module$(EXEEXT): $(btrfs_module_OBJECTS) $(btrfs_module_DEPENDENCIES)
+ @rm -f btrfs.module$(EXEEXT)
+ $(btrfs_module_LINK) $(btrfs_module_OBJECTS) $(btrfs_module_LDADD) $(LIBS)
+io/$(am__dirstamp):
+ @$(MKDIR_P) io
+ @: > io/$(am__dirstamp)
+io/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) io/$(DEPDIR)
+ @: > io/$(DEPDIR)/$(am__dirstamp)
+io/bufio_module-bufio.$(OBJEXT): io/$(am__dirstamp) \
+ io/$(DEPDIR)/$(am__dirstamp)
+bufio.module$(EXEEXT): $(bufio_module_OBJECTS) $(bufio_module_DEPENDENCIES)
+ @rm -f bufio.module$(EXEEXT)
+ $(bufio_module_LINK) $(bufio_module_OBJECTS) $(bufio_module_LDADD) $(LIBS)
+commands/cat_module-cat.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+cat.module$(EXEEXT): $(cat_module_OBJECTS) $(cat_module_DEPENDENCIES)
+ @rm -f cat.module$(EXEEXT)
+ $(cat_module_LINK) $(cat_module_OBJECTS) $(cat_module_LDADD) $(LIBS)
+boot/i386/pc/cdboot_image-cdboot.$(OBJEXT): \
+ boot/i386/pc/$(am__dirstamp) \
+ boot/i386/pc/$(DEPDIR)/$(am__dirstamp)
+cdboot.image$(EXEEXT): $(cdboot_image_OBJECTS) $(cdboot_image_DEPENDENCIES)
+ @rm -f cdboot.image$(EXEEXT)
+ $(cdboot_image_LINK) $(cdboot_image_OBJECTS) $(cdboot_image_LDADD) $(LIBS)
+loader/efi/chain_module-chainloader.$(OBJEXT): \
+ loader/efi/$(am__dirstamp) \
+ loader/efi/$(DEPDIR)/$(am__dirstamp)
+loader/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) loader/i386/pc
+ @: > loader/i386/pc/$(am__dirstamp)
+loader/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) loader/i386/pc/$(DEPDIR)
+ @: > loader/i386/pc/$(DEPDIR)/$(am__dirstamp)
+loader/i386/pc/chain_module-chainloader.$(OBJEXT): \
+ loader/i386/pc/$(am__dirstamp) \
+ loader/i386/pc/$(DEPDIR)/$(am__dirstamp)
+chain.module$(EXEEXT): $(chain_module_OBJECTS) $(chain_module_DEPENDENCIES)
+ @rm -f chain.module$(EXEEXT)
+ $(chain_module_LINK) $(chain_module_OBJECTS) $(chain_module_LDADD) $(LIBS)
+commands/i386/$(am__dirstamp):
+ @$(MKDIR_P) commands/i386
+ @: > commands/i386/$(am__dirstamp)
+commands/i386/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) commands/i386/$(DEPDIR)
+ @: > commands/i386/$(DEPDIR)/$(am__dirstamp)
+commands/i386/cmostest_module-cmostest.$(OBJEXT): \
+ commands/i386/$(am__dirstamp) \
+ commands/i386/$(DEPDIR)/$(am__dirstamp)
+cmostest.module$(EXEEXT): $(cmostest_module_OBJECTS) $(cmostest_module_DEPENDENCIES)
+ @rm -f cmostest.module$(EXEEXT)
+ $(cmostest_module_LINK) $(cmostest_module_OBJECTS) $(cmostest_module_LDADD) $(LIBS)
+commands/cmp_module-cmp.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+cmp.module$(EXEEXT): $(cmp_module_OBJECTS) $(cmp_module_DEPENDENCIES)
+ @rm -f cmp.module$(EXEEXT)
+ $(cmp_module_LINK) $(cmp_module_OBJECTS) $(cmp_module_LDADD) $(LIBS)
+commands/configfile_module-configfile.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+configfile.module$(EXEEXT): $(configfile_module_OBJECTS) $(configfile_module_DEPENDENCIES)
+ @rm -f configfile.module$(EXEEXT)
+ $(configfile_module_LINK) $(configfile_module_OBJECTS) $(configfile_module_LDADD) $(LIBS)
+fs/cpio_module-cpio.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+cpio.module$(EXEEXT): $(cpio_module_OBJECTS) $(cpio_module_DEPENDENCIES)
+ @rm -f cpio.module$(EXEEXT)
+ $(cpio_module_LINK) $(cpio_module_OBJECTS) $(cpio_module_LDADD) $(LIBS)
+commands/i386/cpuid_module-cpuid.$(OBJEXT): \
+ commands/i386/$(am__dirstamp) \
+ commands/i386/$(DEPDIR)/$(am__dirstamp)
+cpuid.module$(EXEEXT): $(cpuid_module_OBJECTS) $(cpuid_module_DEPENDENCIES)
+ @rm -f cpuid.module$(EXEEXT)
+ $(cpuid_module_LINK) $(cpuid_module_OBJECTS) $(cpuid_module_LDADD) $(LIBS)
+lib/crypto_module-crypto.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+crypto.module$(EXEEXT): $(crypto_module_OBJECTS) $(crypto_module_DEPENDENCIES)
+ @rm -f crypto.module$(EXEEXT)
+ $(crypto_module_LINK) $(crypto_module_OBJECTS) $(crypto_module_LDADD) $(LIBS)
+bus/$(am__dirstamp):
+ @$(MKDIR_P) bus
+ @: > bus/$(am__dirstamp)
+bus/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) bus/$(DEPDIR)
+ @: > bus/$(DEPDIR)/$(am__dirstamp)
+bus/cs5536_module-cs5536.$(OBJEXT): bus/$(am__dirstamp) \
+ bus/$(DEPDIR)/$(am__dirstamp)
+cs5536.module$(EXEEXT): $(cs5536_module_OBJECTS) $(cs5536_module_DEPENDENCIES)
+ @rm -f cs5536.module$(EXEEXT)
+ $(cs5536_module_LINK) $(cs5536_module_OBJECTS) $(cs5536_module_LDADD) $(LIBS)
+commands/date_module-date.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+date.module$(EXEEXT): $(date_module_OBJECTS) $(date_module_DEPENDENCIES)
+ @rm -f date.module$(EXEEXT)
+ $(date_module_LINK) $(date_module_OBJECTS) $(date_module_LDADD) $(LIBS)
+hook/$(am__dirstamp):
+ @$(MKDIR_P) hook
+ @: > hook/$(am__dirstamp)
+hook/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) hook/$(DEPDIR)
+ @: > hook/$(DEPDIR)/$(am__dirstamp)
+hook/datehook_module-datehook.$(OBJEXT): hook/$(am__dirstamp) \
+ hook/$(DEPDIR)/$(am__dirstamp)
+datehook.module$(EXEEXT): $(datehook_module_OBJECTS) $(datehook_module_DEPENDENCIES)
+ @rm -f datehook.module$(EXEEXT)
+ $(datehook_module_LINK) $(datehook_module_OBJECTS) $(datehook_module_LDADD) $(LIBS)
+lib/datetime_module-cmos_datetime.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/efi/$(am__dirstamp):
+ @$(MKDIR_P) lib/efi
+ @: > lib/efi/$(am__dirstamp)
+lib/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/efi/$(DEPDIR)
+ @: > lib/efi/$(DEPDIR)/$(am__dirstamp)
+lib/efi/datetime_module-datetime.$(OBJEXT): lib/efi/$(am__dirstamp) \
+ lib/efi/$(DEPDIR)/$(am__dirstamp)
+lib/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) lib/ieee1275
+ @: > lib/ieee1275/$(am__dirstamp)
+lib/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/ieee1275/$(DEPDIR)
+ @: > lib/ieee1275/$(DEPDIR)/$(am__dirstamp)
+lib/ieee1275/datetime_module-datetime.$(OBJEXT): \
+ lib/ieee1275/$(am__dirstamp) \
+ lib/ieee1275/$(DEPDIR)/$(am__dirstamp)
+datetime.module$(EXEEXT): $(datetime_module_OBJECTS) $(datetime_module_DEPENDENCIES)
+ @rm -f datetime.module$(EXEEXT)
+ $(datetime_module_LINK) $(datetime_module_OBJECTS) $(datetime_module_LDADD) $(LIBS)
+boot/i386/pc/diskboot_image-diskboot.$(OBJEXT): \
+ boot/i386/pc/$(am__dirstamp) \
+ boot/i386/pc/$(DEPDIR)/$(am__dirstamp)
+boot/sparc64/ieee1275/diskboot_image-diskboot.$(OBJEXT): \
+ boot/sparc64/ieee1275/$(am__dirstamp) \
+ boot/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+diskboot.image$(EXEEXT): $(diskboot_image_OBJECTS) $(diskboot_image_DEPENDENCIES)
+ @rm -f diskboot.image$(EXEEXT)
+ $(diskboot_image_LINK) $(diskboot_image_OBJECTS) $(diskboot_image_LDADD) $(LIBS)
+disk/dm_nv_module-dmraid_nvidia.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+dm_nv.module$(EXEEXT): $(dm_nv_module_OBJECTS) $(dm_nv_module_DEPENDENCIES)
+ @rm -f dm_nv.module$(EXEEXT)
+ $(dm_nv_module_LINK) $(dm_nv_module_OBJECTS) $(dm_nv_module_LDADD) $(LIBS)
+commands/i386/pc/drivemap_module-drivemap.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+commands/i386/pc/drivemap_module-drivemap_int13h.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+drivemap.module$(EXEEXT): $(drivemap_module_OBJECTS) $(drivemap_module_DEPENDENCIES)
+ @rm -f drivemap.module$(EXEEXT)
+ $(drivemap_module_LINK) $(drivemap_module_OBJECTS) $(drivemap_module_LDADD) $(LIBS)
+commands/echo_module-echo.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+echo.module$(EXEEXT): $(echo_module_OBJECTS) $(echo_module_DEPENDENCIES)
+ @rm -f echo.module$(EXEEXT)
+ $(echo_module_LINK) $(echo_module_OBJECTS) $(echo_module_LDADD) $(LIBS)
+video/efi_gop_module-efi_gop.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+efi_gop.module$(EXEEXT): $(efi_gop_module_OBJECTS) $(efi_gop_module_DEPENDENCIES)
+ @rm -f efi_gop.module$(EXEEXT)
+ $(efi_gop_module_LINK) $(efi_gop_module_OBJECTS) $(efi_gop_module_LDADD) $(LIBS)
+video/efi_uga_module-efi_uga.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+efi_uga.module$(EXEEXT): $(efi_uga_module_OBJECTS) $(efi_uga_module_DEPENDENCIES)
+ @rm -f efi_uga.module$(EXEEXT)
+ $(efi_uga_module_LINK) $(efi_uga_module_OBJECTS) $(efi_uga_module_LDADD) $(LIBS)
+efiemu/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) efiemu/i386/pc
+ @: > efiemu/i386/pc/$(am__dirstamp)
+efiemu/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) efiemu/i386/pc/$(DEPDIR)
+ @: > efiemu/i386/pc/$(DEPDIR)/$(am__dirstamp)
+efiemu/i386/pc/efiemu_module-cfgtables.$(OBJEXT): \
+ efiemu/i386/pc/$(am__dirstamp) \
+ efiemu/i386/pc/$(DEPDIR)/$(am__dirstamp)
+efiemu/$(am__dirstamp):
+ @$(MKDIR_P) efiemu
+ @: > efiemu/$(am__dirstamp)
+efiemu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) efiemu/$(DEPDIR)
+ @: > efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-main.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/i386/$(am__dirstamp):
+ @$(MKDIR_P) efiemu/i386
+ @: > efiemu/i386/$(am__dirstamp)
+efiemu/i386/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) efiemu/i386/$(DEPDIR)
+ @: > efiemu/i386/$(DEPDIR)/$(am__dirstamp)
+efiemu/i386/efiemu_module-loadcore32.$(OBJEXT): \
+ efiemu/i386/$(am__dirstamp) \
+ efiemu/i386/$(DEPDIR)/$(am__dirstamp)
+efiemu/i386/efiemu_module-loadcore64.$(OBJEXT): \
+ efiemu/i386/$(am__dirstamp) \
+ efiemu/i386/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-mm.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-loadcore_common.$(OBJEXT): \
+ efiemu/$(am__dirstamp) efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-symbols.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-loadcore32.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-loadcore64.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-prepare32.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-prepare64.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/efiemu_module-pnvram.$(OBJEXT): efiemu/$(am__dirstamp) \
+ efiemu/$(DEPDIR)/$(am__dirstamp)
+efiemu/i386/efiemu_module-coredetect.$(OBJEXT): \
+ efiemu/i386/$(am__dirstamp) \
+ efiemu/i386/$(DEPDIR)/$(am__dirstamp)
+efiemu/i386/efiemu_module-nocfgtables.$(OBJEXT): \
+ efiemu/i386/$(am__dirstamp) \
+ efiemu/i386/$(DEPDIR)/$(am__dirstamp)
+efiemu.module$(EXEEXT): $(efiemu_module_OBJECTS) $(efiemu_module_DEPENDENCIES)
+ @rm -f efiemu.module$(EXEEXT)
+ $(efiemu_module_LINK) $(efiemu_module_OBJECTS) $(efiemu_module_LDADD) $(LIBS)
+kern/$(am__dirstamp):
+ @$(MKDIR_P) kern
+ @: > kern/$(am__dirstamp)
+kern/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/$(DEPDIR)
+ @: > kern/$(DEPDIR)/$(am__dirstamp)
+kern/elf_module-elf.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+elf.module$(EXEEXT): $(elf_module_OBJECTS) $(elf_module_DEPENDENCIES)
+ @rm -f elf.module$(EXEEXT)
+ $(elf_module_LINK) $(elf_module_OBJECTS) $(elf_module_LDADD) $(LIBS)
+tests/$(am__dirstamp):
+ @$(MKDIR_P) tests
+ @: > tests/$(am__dirstamp)
+tests/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tests/$(DEPDIR)
+ @: > tests/$(DEPDIR)/$(am__dirstamp)
+tests/example_functional_test_module-example_functional_test.$(OBJEXT): \
+ tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
+example_functional_test.module$(EXEEXT): $(example_functional_test_module_OBJECTS) $(example_functional_test_module_DEPENDENCIES)
+ @rm -f example_functional_test.module$(EXEEXT)
+ $(example_functional_test_module_LINK) $(example_functional_test_module_OBJECTS) $(example_functional_test_module_LDADD) $(LIBS)
+fs/ext2_module-ext2.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+ext2.module$(EXEEXT): $(ext2_module_OBJECTS) $(ext2_module_DEPENDENCIES)
+ @rm -f ext2.module$(EXEEXT)
+ $(ext2_module_LINK) $(ext2_module_OBJECTS) $(ext2_module_LDADD) $(LIBS)
+commands/extcmd_module-extcmd.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lib/extcmd_module-arg.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+extcmd.module$(EXEEXT): $(extcmd_module_OBJECTS) $(extcmd_module_DEPENDENCIES)
+ @rm -f extcmd.module$(EXEEXT)
+ $(extcmd_module_LINK) $(extcmd_module_OBJECTS) $(extcmd_module_LDADD) $(LIBS)
+fs/fat_module-fat.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+fat.module$(EXEEXT): $(fat_module_OBJECTS) $(fat_module_DEPENDENCIES)
+ @rm -f fat.module$(EXEEXT)
+ $(fat_module_LINK) $(fat_module_OBJECTS) $(fat_module_LDADD) $(LIBS)
+commands/efi/fixvideo_module-fixvideo.$(OBJEXT): \
+ commands/efi/$(am__dirstamp) \
+ commands/efi/$(DEPDIR)/$(am__dirstamp)
+fixvideo.module$(EXEEXT): $(fixvideo_module_OBJECTS) $(fixvideo_module_DEPENDENCIES)
+ @rm -f fixvideo.module$(EXEEXT)
+ $(fixvideo_module_LINK) $(fixvideo_module_OBJECTS) $(fixvideo_module_LDADD) $(LIBS)
+font/$(am__dirstamp):
+ @$(MKDIR_P) font
+ @: > font/$(am__dirstamp)
+font/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) font/$(DEPDIR)
+ @: > font/$(DEPDIR)/$(am__dirstamp)
+font/font_module-font.$(OBJEXT): font/$(am__dirstamp) \
+ font/$(DEPDIR)/$(am__dirstamp)
+font/font_module-font_cmd.$(OBJEXT): font/$(am__dirstamp) \
+ font/$(DEPDIR)/$(am__dirstamp)
+font.module$(EXEEXT): $(font_module_OBJECTS) $(font_module_DEPENDENCIES)
+ @rm -f font.module$(EXEEXT)
+ $(font_module_LINK) $(font_module_OBJECTS) $(font_module_LDADD) $(LIBS)
+fs/fshelp_module-fshelp.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+fshelp.module$(EXEEXT): $(fshelp_module_OBJECTS) $(fshelp_module_DEPENDENCIES)
+ @rm -f fshelp.module$(EXEEXT)
+ $(fshelp_module_LINK) $(fshelp_module_OBJECTS) $(fshelp_module_LDADD) $(LIBS)
+tests/lib/$(am__dirstamp):
+ @$(MKDIR_P) tests/lib
+ @: > tests/lib/$(am__dirstamp)
+tests/lib/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tests/lib/$(DEPDIR)
+ @: > tests/lib/$(DEPDIR)/$(am__dirstamp)
+tests/lib/functional_test_module-functional_test.$(OBJEXT): \
+ tests/lib/$(am__dirstamp) tests/lib/$(DEPDIR)/$(am__dirstamp)
+tests/lib/functional_test_module-test.$(OBJEXT): \
+ tests/lib/$(am__dirstamp) tests/lib/$(DEPDIR)/$(am__dirstamp)
+functional_test.module$(EXEEXT): $(functional_test_module_OBJECTS) $(functional_test_module_DEPENDENCIES)
+ @rm -f functional_test.module$(EXEEXT)
+ $(functional_test_module_LINK) $(functional_test_module_OBJECTS) $(functional_test_module_LDADD) $(LIBS)
+boot/mips/yeeloong/$(am__dirstamp):
+ @$(MKDIR_P) boot/mips/yeeloong
+ @: > boot/mips/yeeloong/$(am__dirstamp)
+boot/mips/yeeloong/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) boot/mips/yeeloong/$(DEPDIR)
+ @: > boot/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+boot/mips/yeeloong/fwstart_image-fwstart.$(OBJEXT): \
+ boot/mips/yeeloong/$(am__dirstamp) \
+ boot/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+fwstart.image$(EXEEXT): $(fwstart_image_OBJECTS) $(fwstart_image_DEPENDENCIES)
+ @rm -f fwstart.image$(EXEEXT)
+ $(fwstart_image_LINK) $(fwstart_image_OBJECTS) $(fwstart_image_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/$(am__dirstamp):
+ @$(MKDIR_P) lib/libgcrypt-grub/cipher
+ @: > lib/libgcrypt-grub/cipher/$(am__dirstamp)
+lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/libgcrypt-grub/cipher/$(DEPDIR)
+ @: > lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_arcfour.module$(EXEEXT): $(gcry_arcfour_module_OBJECTS) $(gcry_arcfour_module_DEPENDENCIES)
+ @rm -f gcry_arcfour.module$(EXEEXT)
+ $(gcry_arcfour_module_LINK) $(gcry_arcfour_module_OBJECTS) $(gcry_arcfour_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_blowfish.module$(EXEEXT): $(gcry_blowfish_module_OBJECTS) $(gcry_blowfish_module_DEPENDENCIES)
+ @rm -f gcry_blowfish.module$(EXEEXT)
+ $(gcry_blowfish_module_LINK) $(gcry_blowfish_module_OBJECTS) $(gcry_blowfish_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_camellia.module$(EXEEXT): $(gcry_camellia_module_OBJECTS) $(gcry_camellia_module_DEPENDENCIES)
+ @rm -f gcry_camellia.module$(EXEEXT)
+ $(gcry_camellia_module_LINK) $(gcry_camellia_module_OBJECTS) $(gcry_camellia_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_cast5.module$(EXEEXT): $(gcry_cast5_module_OBJECTS) $(gcry_cast5_module_DEPENDENCIES)
+ @rm -f gcry_cast5.module$(EXEEXT)
+ $(gcry_cast5_module_LINK) $(gcry_cast5_module_OBJECTS) $(gcry_cast5_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_crc.module$(EXEEXT): $(gcry_crc_module_OBJECTS) $(gcry_crc_module_DEPENDENCIES)
+ @rm -f gcry_crc.module$(EXEEXT)
+ $(gcry_crc_module_LINK) $(gcry_crc_module_OBJECTS) $(gcry_crc_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_des.module$(EXEEXT): $(gcry_des_module_OBJECTS) $(gcry_des_module_DEPENDENCIES)
+ @rm -f gcry_des.module$(EXEEXT)
+ $(gcry_des_module_LINK) $(gcry_des_module_OBJECTS) $(gcry_des_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_md4.module$(EXEEXT): $(gcry_md4_module_OBJECTS) $(gcry_md4_module_DEPENDENCIES)
+ @rm -f gcry_md4.module$(EXEEXT)
+ $(gcry_md4_module_LINK) $(gcry_md4_module_OBJECTS) $(gcry_md4_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_md5.module$(EXEEXT): $(gcry_md5_module_OBJECTS) $(gcry_md5_module_DEPENDENCIES)
+ @rm -f gcry_md5.module$(EXEEXT)
+ $(gcry_md5_module_LINK) $(gcry_md5_module_OBJECTS) $(gcry_md5_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_rfc2268.module$(EXEEXT): $(gcry_rfc2268_module_OBJECTS) $(gcry_rfc2268_module_DEPENDENCIES)
+ @rm -f gcry_rfc2268.module$(EXEEXT)
+ $(gcry_rfc2268_module_LINK) $(gcry_rfc2268_module_OBJECTS) $(gcry_rfc2268_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_rijndael.module$(EXEEXT): $(gcry_rijndael_module_OBJECTS) $(gcry_rijndael_module_DEPENDENCIES)
+ @rm -f gcry_rijndael.module$(EXEEXT)
+ $(gcry_rijndael_module_LINK) $(gcry_rijndael_module_OBJECTS) $(gcry_rijndael_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_rmd160.module$(EXEEXT): $(gcry_rmd160_module_OBJECTS) $(gcry_rmd160_module_DEPENDENCIES)
+ @rm -f gcry_rmd160.module$(EXEEXT)
+ $(gcry_rmd160_module_LINK) $(gcry_rmd160_module_OBJECTS) $(gcry_rmd160_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_seed.module$(EXEEXT): $(gcry_seed_module_OBJECTS) $(gcry_seed_module_DEPENDENCIES)
+ @rm -f gcry_seed.module$(EXEEXT)
+ $(gcry_seed_module_LINK) $(gcry_seed_module_OBJECTS) $(gcry_seed_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_serpent.module$(EXEEXT): $(gcry_serpent_module_OBJECTS) $(gcry_serpent_module_DEPENDENCIES)
+ @rm -f gcry_serpent.module$(EXEEXT)
+ $(gcry_serpent_module_LINK) $(gcry_serpent_module_OBJECTS) $(gcry_serpent_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_sha1.module$(EXEEXT): $(gcry_sha1_module_OBJECTS) $(gcry_sha1_module_DEPENDENCIES)
+ @rm -f gcry_sha1.module$(EXEEXT)
+ $(gcry_sha1_module_LINK) $(gcry_sha1_module_OBJECTS) $(gcry_sha1_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_sha256.module$(EXEEXT): $(gcry_sha256_module_OBJECTS) $(gcry_sha256_module_DEPENDENCIES)
+ @rm -f gcry_sha256.module$(EXEEXT)
+ $(gcry_sha256_module_LINK) $(gcry_sha256_module_OBJECTS) $(gcry_sha256_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_sha512.module$(EXEEXT): $(gcry_sha512_module_OBJECTS) $(gcry_sha512_module_DEPENDENCIES)
+ @rm -f gcry_sha512.module$(EXEEXT)
+ $(gcry_sha512_module_LINK) $(gcry_sha512_module_OBJECTS) $(gcry_sha512_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_tiger.module$(EXEEXT): $(gcry_tiger_module_OBJECTS) $(gcry_tiger_module_DEPENDENCIES)
+ @rm -f gcry_tiger.module$(EXEEXT)
+ $(gcry_tiger_module_LINK) $(gcry_tiger_module_OBJECTS) $(gcry_tiger_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_twofish.module$(EXEEXT): $(gcry_twofish_module_OBJECTS) $(gcry_twofish_module_DEPENDENCIES)
+ @rm -f gcry_twofish.module$(EXEEXT)
+ $(gcry_twofish_module_LINK) $(gcry_twofish_module_OBJECTS) $(gcry_twofish_module_LDADD) $(LIBS)
+lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT): \
+ lib/libgcrypt-grub/cipher/$(am__dirstamp) \
+ lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+gcry_whirlpool.module$(EXEEXT): $(gcry_whirlpool_module_OBJECTS) $(gcry_whirlpool_module_DEPENDENCIES)
+ @rm -f gcry_whirlpool.module$(EXEEXT)
+ $(gcry_whirlpool_module_LINK) $(gcry_whirlpool_module_OBJECTS) $(gcry_whirlpool_module_LDADD) $(LIBS)
+gettext/$(am__dirstamp):
+ @$(MKDIR_P) gettext
+ @: > gettext/$(am__dirstamp)
+gettext/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) gettext/$(DEPDIR)
+ @: > gettext/$(DEPDIR)/$(am__dirstamp)
+gettext/gettext_module-gettext.$(OBJEXT): gettext/$(am__dirstamp) \
+ gettext/$(DEPDIR)/$(am__dirstamp)
+gettext.module$(EXEEXT): $(gettext_module_OBJECTS) $(gettext_module_DEPENDENCIES)
+ @rm -f gettext.module$(EXEEXT)
+ $(gettext_module_LINK) $(gettext_module_OBJECTS) $(gettext_module_LDADD) $(LIBS)
+gfxmenu/$(am__dirstamp):
+ @$(MKDIR_P) gfxmenu
+ @: > gfxmenu/$(am__dirstamp)
+gfxmenu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) gfxmenu/$(DEPDIR)
+ @: > gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-model.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-view.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-font.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT): \
+ gfxmenu/$(am__dirstamp) gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT): \
+ gfxmenu/$(am__dirstamp) gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-widget-box.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT): \
+ gfxmenu/$(am__dirstamp) gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_box.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_label.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_list.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_image.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT): \
+ gfxmenu/$(am__dirstamp) gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_util.$(OBJEXT): gfxmenu/$(am__dirstamp) \
+ gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT): \
+ gfxmenu/$(am__dirstamp) gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu/gfxmenu_module-named_colors.$(OBJEXT): \
+ gfxmenu/$(am__dirstamp) gfxmenu/$(DEPDIR)/$(am__dirstamp)
+gfxmenu.module$(EXEEXT): $(gfxmenu_module_OBJECTS) $(gfxmenu_module_DEPENDENCIES)
+ @rm -f gfxmenu.module$(EXEEXT)
+ $(gfxmenu_module_LINK) $(gfxmenu_module_OBJECTS) $(gfxmenu_module_LDADD) $(LIBS)
+term/gfxterm_module-gfxterm.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+gfxterm.module$(EXEEXT): $(gfxterm_module_OBJECTS) $(gfxterm_module_DEPENDENCIES)
+ @rm -f gfxterm.module$(EXEEXT)
+ $(gfxterm_module_LINK) $(gfxterm_module_OBJECTS) $(gfxterm_module_LDADD) $(LIBS)
+commands/gptsync_module-gptsync.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+gptsync.module$(EXEEXT): $(gptsync_module_OBJECTS) $(gptsync_module_DEPENDENCIES)
+ @rm -f gptsync.module$(EXEEXT)
+ $(gptsync_module_LINK) $(gptsync_module_OBJECTS) $(gptsync_module_LDADD) $(LIBS)
+kern/emu/$(am__dirstamp):
+ @$(MKDIR_P) kern/emu
+ @: > kern/emu/$(am__dirstamp)
+kern/emu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/emu/$(DEPDIR)
+ @: > kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/grub_emu-full.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+grub-emu$(EXEEXT): $(grub_emu_OBJECTS) $(grub_emu_DEPENDENCIES)
+ @rm -f grub-emu$(EXEEXT)
+ $(grub_emu_LINK) $(grub_emu_OBJECTS) $(grub_emu_LDADD) $(LIBS)
+kern/emu/grub_emu_lite-lite.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+grub-emu-lite$(EXEEXT): $(grub_emu_lite_OBJECTS) $(grub_emu_lite_DEPENDENCIES)
+ @rm -f grub-emu-lite$(EXEEXT)
+ $(grub_emu_lite_LINK) $(grub_emu_lite_OBJECTS) $(grub_emu_lite_LDADD) $(LIBS)
+io/gzio_module-gzio.$(OBJEXT): io/$(am__dirstamp) \
+ io/$(DEPDIR)/$(am__dirstamp)
+gzio.module$(EXEEXT): $(gzio_module_OBJECTS) $(gzio_module_DEPENDENCIES)
+ @rm -f gzio.module$(EXEEXT)
+ $(gzio_module_LINK) $(gzio_module_OBJECTS) $(gzio_module_LDADD) $(LIBS)
+lib/emu/$(am__dirstamp):
+ @$(MKDIR_P) lib/emu
+ @: > lib/emu/$(am__dirstamp)
+lib/emu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/emu/$(DEPDIR)
+ @: > lib/emu/$(DEPDIR)/$(am__dirstamp)
+lib/emu/halt_module-halt.$(OBJEXT): lib/emu/$(am__dirstamp) \
+ lib/emu/$(DEPDIR)/$(am__dirstamp)
+commands/halt_module-halt.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+commands/halt_module-acpihalt.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lib/i386/$(am__dirstamp):
+ @$(MKDIR_P) lib/i386
+ @: > lib/i386/$(am__dirstamp)
+lib/i386/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/i386/$(DEPDIR)
+ @: > lib/i386/$(DEPDIR)/$(am__dirstamp)
+lib/i386/halt_module-halt.$(OBJEXT): lib/i386/$(am__dirstamp) \
+ lib/i386/$(DEPDIR)/$(am__dirstamp)
+lib/efi/halt_module-halt.$(OBJEXT): lib/efi/$(am__dirstamp) \
+ lib/efi/$(DEPDIR)/$(am__dirstamp)
+lib/ieee1275/halt_module-halt.$(OBJEXT): lib/ieee1275/$(am__dirstamp) \
+ lib/ieee1275/$(DEPDIR)/$(am__dirstamp)
+commands/i386/pc/halt_module-halt.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+halt.module$(EXEEXT): $(halt_module_OBJECTS) $(halt_module_DEPENDENCIES)
+ @rm -f halt.module$(EXEEXT)
+ $(halt_module_LINK) $(halt_module_OBJECTS) $(halt_module_LDADD) $(LIBS)
+commands/hashsum_module-hashsum.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+hashsum.module$(EXEEXT): $(hashsum_module_OBJECTS) $(hashsum_module_DEPENDENCIES)
+ @rm -f hashsum.module$(EXEEXT)
+ $(hashsum_module_LINK) $(hashsum_module_OBJECTS) $(hashsum_module_LDADD) $(LIBS)
+commands/hdparm_module-hdparm.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lib/hdparm_module-hexdump.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+hdparm.module$(EXEEXT): $(hdparm_module_OBJECTS) $(hdparm_module_DEPENDENCIES)
+ @rm -f hdparm.module$(EXEEXT)
+ $(hdparm_module_LINK) $(hdparm_module_OBJECTS) $(hdparm_module_LDADD) $(LIBS)
+hello/$(am__dirstamp):
+ @$(MKDIR_P) hello
+ @: > hello/$(am__dirstamp)
+hello/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) hello/$(DEPDIR)
+ @: > hello/$(DEPDIR)/$(am__dirstamp)
+hello/hello_module-hello.$(OBJEXT): hello/$(am__dirstamp) \
+ hello/$(DEPDIR)/$(am__dirstamp)
+hello.module$(EXEEXT): $(hello_module_OBJECTS) $(hello_module_DEPENDENCIES)
+ @rm -f hello.module$(EXEEXT)
+ $(hello_module_LINK) $(hello_module_OBJECTS) $(hello_module_LDADD) $(LIBS)
+commands/help_module-help.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+help.module$(EXEEXT): $(help_module_OBJECTS) $(help_module_DEPENDENCIES)
+ @rm -f help.module$(EXEEXT)
+ $(help_module_LINK) $(help_module_OBJECTS) $(help_module_LDADD) $(LIBS)
+commands/hexdump_module-hexdump.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lib/hexdump_module-hexdump.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+hexdump.module$(EXEEXT): $(hexdump_module_OBJECTS) $(hexdump_module_DEPENDENCIES)
+ @rm -f hexdump.module$(EXEEXT)
+ $(hexdump_module_LINK) $(hexdump_module_OBJECTS) $(hexdump_module_LDADD) $(LIBS)
+fs/hfs_module-hfs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+hfs.module$(EXEEXT): $(hfs_module_OBJECTS) $(hfs_module_DEPENDENCIES)
+ @rm -f hfs.module$(EXEEXT)
+ $(hfs_module_LINK) $(hfs_module_OBJECTS) $(hfs_module_LDADD) $(LIBS)
+fs/hfsplus_module-hfsplus.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+hfsplus.module$(EXEEXT): $(hfsplus_module_OBJECTS) $(hfsplus_module_DEPENDENCIES)
+ @rm -f hfsplus.module$(EXEEXT)
+ $(hfsplus_module_LINK) $(hfsplus_module_OBJECTS) $(hfsplus_module_LDADD) $(LIBS)
+video/ieee1275_fb_module-ieee1275.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+ieee1275_fb.module$(EXEEXT): $(ieee1275_fb_module_OBJECTS) $(ieee1275_fb_module_DEPENDENCIES)
+ @rm -f ieee1275_fb.module$(EXEEXT)
+ $(ieee1275_fb_module_LINK) $(ieee1275_fb_module_OBJECTS) $(ieee1275_fb_module_LDADD) $(LIBS)
+commands/iorw_module-iorw.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+iorw.module$(EXEEXT): $(iorw_module_OBJECTS) $(iorw_module_DEPENDENCIES)
+ @rm -f iorw.module$(EXEEXT)
+ $(iorw_module_LINK) $(iorw_module_OBJECTS) $(iorw_module_LDADD) $(LIBS)
+fs/iso9660_module-iso9660.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+iso9660.module$(EXEEXT): $(iso9660_module_OBJECTS) $(iso9660_module_DEPENDENCIES)
+ @rm -f iso9660.module$(EXEEXT)
+ $(iso9660_module_LINK) $(iso9660_module_OBJECTS) $(iso9660_module_LDADD) $(LIBS)
+fs/jfs_module-jfs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+jfs.module$(EXEEXT): $(jfs_module_OBJECTS) $(jfs_module_DEPENDENCIES)
+ @rm -f jfs.module$(EXEEXT)
+ $(jfs_module_LINK) $(jfs_module_OBJECTS) $(jfs_module_LDADD) $(LIBS)
+video/readers/$(am__dirstamp):
+ @$(MKDIR_P) video/readers
+ @: > video/readers/$(am__dirstamp)
+video/readers/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) video/readers/$(DEPDIR)
+ @: > video/readers/$(DEPDIR)/$(am__dirstamp)
+video/readers/jpeg_module-jpeg.$(OBJEXT): \
+ video/readers/$(am__dirstamp) \
+ video/readers/$(DEPDIR)/$(am__dirstamp)
+jpeg.module$(EXEEXT): $(jpeg_module_OBJECTS) $(jpeg_module_DEPENDENCIES)
+ @rm -f jpeg.module$(EXEEXT)
+ $(jpeg_module_LINK) $(jpeg_module_OBJECTS) $(jpeg_module_LDADD) $(LIBS)
+disk/kernel_exec-host.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+gnulib/kernel_exec-progname.$(OBJEXT): gnulib/$(am__dirstamp) \
+ gnulib/$(DEPDIR)/$(am__dirstamp)
+gnulib/kernel_exec-error.$(OBJEXT): gnulib/$(am__dirstamp) \
+ gnulib/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-cache.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-console.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-getroot.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-hostdisk.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-hostfs.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-main.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-misc.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-mm.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/emu/kernel_exec-time.$(OBJEXT): kern/emu/$(am__dirstamp) \
+ kern/emu/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-command.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-corecmd.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-device.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-disk.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-dl.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-env.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-err.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-file.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-fs.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-list.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-main.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-misc.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-parser.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-partition.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-rescue_parser.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-rescue_reader.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-term.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/i386/coreboot/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/coreboot
+ @: > kern/i386/coreboot/$(am__dirstamp)
+kern/i386/coreboot/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/coreboot/$(DEPDIR)
+ @: > kern/i386/coreboot/$(DEPDIR)/$(am__dirstamp)
+kern/i386/coreboot/kernel_exec-startup.$(OBJEXT): \
+ kern/i386/coreboot/$(am__dirstamp) \
+ kern/i386/coreboot/$(DEPDIR)/$(am__dirstamp)
+kern/generic/$(am__dirstamp):
+ @$(MKDIR_P) kern/generic
+ @: > kern/generic/$(am__dirstamp)
+kern/generic/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/generic/$(DEPDIR)
+ @: > kern/generic/$(DEPDIR)/$(am__dirstamp)
+kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT): \
+ kern/generic/$(am__dirstamp) \
+ kern/generic/$(DEPDIR)/$(am__dirstamp)
+kern/i386/coreboot/kernel_exec-mmap.$(OBJEXT): \
+ kern/i386/coreboot/$(am__dirstamp) \
+ kern/i386/coreboot/$(DEPDIR)/$(am__dirstamp)
+kern/i386/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386
+ @: > kern/i386/$(am__dirstamp)
+kern/i386/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/$(DEPDIR)
+ @: > kern/i386/$(DEPDIR)/$(am__dirstamp)
+kern/i386/kernel_exec-tsc.$(OBJEXT): kern/i386/$(am__dirstamp) \
+ kern/i386/$(DEPDIR)/$(am__dirstamp)
+kern/i386/coreboot/kernel_exec-init.$(OBJEXT): \
+ kern/i386/coreboot/$(am__dirstamp) \
+ kern/i386/coreboot/$(DEPDIR)/$(am__dirstamp)
+term/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) term/i386/pc
+ @: > term/i386/pc/$(am__dirstamp)
+term/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) term/i386/pc/$(DEPDIR)
+ @: > term/i386/pc/$(DEPDIR)/$(am__dirstamp)
+term/i386/pc/kernel_exec-vga_text.$(OBJEXT): \
+ term/i386/pc/$(am__dirstamp) \
+ term/i386/pc/$(DEPDIR)/$(am__dirstamp)
+term/i386/$(am__dirstamp):
+ @$(MKDIR_P) term/i386
+ @: > term/i386/$(am__dirstamp)
+term/i386/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) term/i386/$(DEPDIR)
+ @: > term/i386/$(DEPDIR)/$(am__dirstamp)
+term/i386/kernel_exec-vga_common.$(OBJEXT): term/i386/$(am__dirstamp) \
+ term/i386/$(DEPDIR)/$(am__dirstamp)
+kern/i386/kernel_exec-dl.$(OBJEXT): kern/i386/$(am__dirstamp) \
+ kern/i386/$(DEPDIR)/$(am__dirstamp)
+kern/i386/kernel_exec-pit.$(OBJEXT): kern/i386/$(am__dirstamp) \
+ kern/i386/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-mm.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/kernel_exec-time.$(OBJEXT): kern/$(am__dirstamp) \
+ kern/$(DEPDIR)/$(am__dirstamp)
+kern/generic/kernel_exec-millisleep.$(OBJEXT): \
+ kern/generic/$(am__dirstamp) \
+ kern/generic/$(DEPDIR)/$(am__dirstamp)
+kern/i386/efi/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/efi
+ @: > kern/i386/efi/$(am__dirstamp)
+kern/i386/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/efi/$(DEPDIR)
+ @: > kern/i386/efi/$(DEPDIR)/$(am__dirstamp)
+kern/i386/efi/kernel_exec-startup.$(OBJEXT): \
+ kern/i386/efi/$(am__dirstamp) \
+ kern/i386/efi/$(DEPDIR)/$(am__dirstamp)
+disk/efi/$(am__dirstamp):
+ @$(MKDIR_P) disk/efi
+ @: > disk/efi/$(am__dirstamp)
+disk/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) disk/efi/$(DEPDIR)
+ @: > disk/efi/$(DEPDIR)/$(am__dirstamp)
+disk/efi/kernel_exec-efidisk.$(OBJEXT): disk/efi/$(am__dirstamp) \
+ disk/efi/$(DEPDIR)/$(am__dirstamp)
+kern/efi/$(am__dirstamp):
+ @$(MKDIR_P) kern/efi
+ @: > kern/efi/$(am__dirstamp)
+kern/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/efi/$(DEPDIR)
+ @: > kern/efi/$(DEPDIR)/$(am__dirstamp)
+kern/efi/kernel_exec-efi.$(OBJEXT): kern/efi/$(am__dirstamp) \
+ kern/efi/$(DEPDIR)/$(am__dirstamp)
+kern/efi/kernel_exec-init.$(OBJEXT): kern/efi/$(am__dirstamp) \
+ kern/efi/$(DEPDIR)/$(am__dirstamp)
+kern/efi/kernel_exec-mm.$(OBJEXT): kern/efi/$(am__dirstamp) \
+ kern/efi/$(DEPDIR)/$(am__dirstamp)
+kern/i386/efi/kernel_exec-init.$(OBJEXT): \
+ kern/i386/efi/$(am__dirstamp) \
+ kern/i386/efi/$(DEPDIR)/$(am__dirstamp)
+term/efi/$(am__dirstamp):
+ @$(MKDIR_P) term/efi
+ @: > term/efi/$(am__dirstamp)
+term/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) term/efi/$(DEPDIR)
+ @: > term/efi/$(DEPDIR)/$(am__dirstamp)
+term/efi/kernel_exec-console.$(OBJEXT): term/efi/$(am__dirstamp) \
+ term/efi/$(DEPDIR)/$(am__dirstamp)
+kern/i386/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/ieee1275
+ @: > kern/i386/ieee1275/$(am__dirstamp)
+kern/i386/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/ieee1275/$(DEPDIR)
+ @: > kern/i386/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/i386/ieee1275/kernel_exec-startup.$(OBJEXT): \
+ kern/i386/ieee1275/$(am__dirstamp) \
+ kern/i386/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) kern/ieee1275
+ @: > kern/ieee1275/$(am__dirstamp)
+kern/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/ieee1275/$(DEPDIR)
+ @: > kern/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/ieee1275/kernel_exec-init.$(OBJEXT): \
+ kern/ieee1275/$(am__dirstamp) \
+ kern/ieee1275/$(DEPDIR)/$(am__dirstamp)
+disk/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) disk/ieee1275
+ @: > disk/ieee1275/$(am__dirstamp)
+disk/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) disk/ieee1275/$(DEPDIR)
+ @: > disk/ieee1275/$(DEPDIR)/$(am__dirstamp)
+disk/ieee1275/kernel_exec-ofdisk.$(OBJEXT): \
+ disk/ieee1275/$(am__dirstamp) \
+ disk/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/ieee1275/kernel_exec-cmain.$(OBJEXT): \
+ kern/ieee1275/$(am__dirstamp) \
+ kern/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/ieee1275/kernel_exec-ieee1275.$(OBJEXT): \
+ kern/ieee1275/$(am__dirstamp) \
+ kern/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/ieee1275/kernel_exec-mmap.$(OBJEXT): \
+ kern/ieee1275/$(am__dirstamp) \
+ kern/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/ieee1275/kernel_exec-openfw.$(OBJEXT): \
+ kern/ieee1275/$(am__dirstamp) \
+ kern/ieee1275/$(DEPDIR)/$(am__dirstamp)
+term/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) term/ieee1275
+ @: > term/ieee1275/$(am__dirstamp)
+term/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) term/ieee1275/$(DEPDIR)
+ @: > term/ieee1275/$(DEPDIR)/$(am__dirstamp)
+term/ieee1275/kernel_exec-ofconsole.$(OBJEXT): \
+ term/ieee1275/$(am__dirstamp) \
+ term/ieee1275/$(DEPDIR)/$(am__dirstamp)
+term/kernel_exec-terminfo.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+term/kernel_exec-tparm.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+commands/kernel_exec-extcmd.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lib/kernel_exec-arg.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+kern/i386/kernel_exec-multiboot_mmap.$(OBJEXT): \
+ kern/i386/$(am__dirstamp) kern/i386/$(DEPDIR)/$(am__dirstamp)
+kern/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/pc
+ @: > kern/i386/pc/$(am__dirstamp)
+kern/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/pc/$(DEPDIR)
+ @: > kern/i386/pc/$(DEPDIR)/$(am__dirstamp)
+kern/i386/pc/kernel_exec-startup.$(OBJEXT): \
+ kern/i386/pc/$(am__dirstamp) \
+ kern/i386/pc/$(DEPDIR)/$(am__dirstamp)
+kern/i386/pc/kernel_exec-init.$(OBJEXT): kern/i386/pc/$(am__dirstamp) \
+ kern/i386/pc/$(DEPDIR)/$(am__dirstamp)
+kern/i386/pc/kernel_exec-mmap.$(OBJEXT): kern/i386/pc/$(am__dirstamp) \
+ kern/i386/pc/$(DEPDIR)/$(am__dirstamp)
+term/i386/pc/kernel_exec-console.$(OBJEXT): \
+ term/i386/pc/$(am__dirstamp) \
+ term/i386/pc/$(DEPDIR)/$(am__dirstamp)
+kern/i386/qemu/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/qemu
+ @: > kern/i386/qemu/$(am__dirstamp)
+kern/i386/qemu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/i386/qemu/$(DEPDIR)
+ @: > kern/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+kern/i386/qemu/kernel_exec-startup.$(OBJEXT): \
+ kern/i386/qemu/$(am__dirstamp) \
+ kern/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+bus/kernel_exec-pci.$(OBJEXT): bus/$(am__dirstamp) \
+ bus/$(DEPDIR)/$(am__dirstamp)
+kern/i386/qemu/kernel_exec-init.$(OBJEXT): \
+ kern/i386/qemu/$(am__dirstamp) \
+ kern/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+kern/i386/qemu/kernel_exec-mmap.$(OBJEXT): \
+ kern/i386/qemu/$(am__dirstamp) \
+ kern/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+kern/mips/$(am__dirstamp):
+ @$(MKDIR_P) kern/mips
+ @: > kern/mips/$(am__dirstamp)
+kern/mips/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/mips/$(DEPDIR)
+ @: > kern/mips/$(DEPDIR)/$(am__dirstamp)
+kern/mips/kernel_exec-startup.$(OBJEXT): kern/mips/$(am__dirstamp) \
+ kern/mips/$(DEPDIR)/$(am__dirstamp)
+term/kernel_exec-ns8250.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+bus/kernel_exec-bonito.$(OBJEXT): bus/$(am__dirstamp) \
+ bus/$(DEPDIR)/$(am__dirstamp)
+bus/kernel_exec-cs5536.$(OBJEXT): bus/$(am__dirstamp) \
+ bus/$(DEPDIR)/$(am__dirstamp)
+kern/mips/kernel_exec-cache.$(OBJEXT): kern/mips/$(am__dirstamp) \
+ kern/mips/$(DEPDIR)/$(am__dirstamp)
+kern/mips/kernel_exec-dl.$(OBJEXT): kern/mips/$(am__dirstamp) \
+ kern/mips/$(DEPDIR)/$(am__dirstamp)
+kern/mips/kernel_exec-init.$(OBJEXT): kern/mips/$(am__dirstamp) \
+ kern/mips/$(DEPDIR)/$(am__dirstamp)
+kern/mips/yeeloong/$(am__dirstamp):
+ @$(MKDIR_P) kern/mips/yeeloong
+ @: > kern/mips/yeeloong/$(am__dirstamp)
+kern/mips/yeeloong/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/mips/yeeloong/$(DEPDIR)
+ @: > kern/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+kern/mips/yeeloong/kernel_exec-init.$(OBJEXT): \
+ kern/mips/yeeloong/$(am__dirstamp) \
+ kern/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+term/kernel_exec-at_keyboard.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+term/kernel_exec-serial.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+video/kernel_exec-sm712.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+commands/kernel_exec-keylayouts.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+term/kernel_exec-gfxterm.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+font/kernel_exec-font.$(OBJEXT): font/$(am__dirstamp) \
+ font/$(DEPDIR)/$(am__dirstamp)
+font/kernel_exec-font_cmd.$(OBJEXT): font/$(am__dirstamp) \
+ font/$(DEPDIR)/$(am__dirstamp)
+io/kernel_exec-bufio.$(OBJEXT): io/$(am__dirstamp) \
+ io/$(DEPDIR)/$(am__dirstamp)
+video/kernel_exec-bitmap.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+video/kernel_exec-bitmap_scale.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+video/fb/$(am__dirstamp):
+ @$(MKDIR_P) video/fb
+ @: > video/fb/$(am__dirstamp)
+video/fb/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) video/fb/$(DEPDIR)
+ @: > video/fb/$(DEPDIR)/$(am__dirstamp)
+video/fb/kernel_exec-fbblit.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video/fb/kernel_exec-fbfill.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video/fb/kernel_exec-fbutil.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video/fb/kernel_exec-video_fb.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video/kernel_exec-video.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+commands/kernel_exec-boot.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+kern/powerpc/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) kern/powerpc/ieee1275
+ @: > kern/powerpc/ieee1275/$(am__dirstamp)
+kern/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/powerpc/ieee1275/$(DEPDIR)
+ @: > kern/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/powerpc/ieee1275/kernel_exec-startup.$(OBJEXT): \
+ kern/powerpc/ieee1275/$(am__dirstamp) \
+ kern/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/powerpc/$(am__dirstamp):
+ @$(MKDIR_P) kern/powerpc
+ @: > kern/powerpc/$(am__dirstamp)
+kern/powerpc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/powerpc/$(DEPDIR)
+ @: > kern/powerpc/$(DEPDIR)/$(am__dirstamp)
+kern/powerpc/kernel_exec-cache.$(OBJEXT): \
+ kern/powerpc/$(am__dirstamp) \
+ kern/powerpc/$(DEPDIR)/$(am__dirstamp)
+kern/powerpc/kernel_exec-dl.$(OBJEXT): kern/powerpc/$(am__dirstamp) \
+ kern/powerpc/$(DEPDIR)/$(am__dirstamp)
+kern/sparc64/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) kern/sparc64/ieee1275
+ @: > kern/sparc64/ieee1275/$(am__dirstamp)
+kern/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/sparc64/ieee1275/$(DEPDIR)
+ @: > kern/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/sparc64/ieee1275/kernel_exec-crt0.$(OBJEXT): \
+ kern/sparc64/ieee1275/$(am__dirstamp) \
+ kern/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/sparc64/$(am__dirstamp):
+ @$(MKDIR_P) kern/sparc64
+ @: > kern/sparc64/$(am__dirstamp)
+kern/sparc64/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/sparc64/$(DEPDIR)
+ @: > kern/sparc64/$(DEPDIR)/$(am__dirstamp)
+kern/sparc64/kernel_exec-cache.$(OBJEXT): \
+ kern/sparc64/$(am__dirstamp) \
+ kern/sparc64/$(DEPDIR)/$(am__dirstamp)
+kern/sparc64/kernel_exec-dl.$(OBJEXT): kern/sparc64/$(am__dirstamp) \
+ kern/sparc64/$(DEPDIR)/$(am__dirstamp)
+kern/sparc64/ieee1275/kernel_exec-ieee1275.$(OBJEXT): \
+ kern/sparc64/ieee1275/$(am__dirstamp) \
+ kern/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/sparc64/ieee1275/kernel_exec-init.$(OBJEXT): \
+ kern/sparc64/ieee1275/$(am__dirstamp) \
+ kern/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+kern/x86_64/efi/$(am__dirstamp):
+ @$(MKDIR_P) kern/x86_64/efi
+ @: > kern/x86_64/efi/$(am__dirstamp)
+kern/x86_64/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/x86_64/efi/$(DEPDIR)
+ @: > kern/x86_64/efi/$(DEPDIR)/$(am__dirstamp)
+kern/x86_64/efi/kernel_exec-startup.$(OBJEXT): \
+ kern/x86_64/efi/$(am__dirstamp) \
+ kern/x86_64/efi/$(DEPDIR)/$(am__dirstamp)
+kern/x86_64/$(am__dirstamp):
+ @$(MKDIR_P) kern/x86_64
+ @: > kern/x86_64/$(am__dirstamp)
+kern/x86_64/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) kern/x86_64/$(DEPDIR)
+ @: > kern/x86_64/$(DEPDIR)/$(am__dirstamp)
+kern/x86_64/kernel_exec-dl.$(OBJEXT): kern/x86_64/$(am__dirstamp) \
+ kern/x86_64/$(DEPDIR)/$(am__dirstamp)
+kern/x86_64/efi/kernel_exec-callwrap.$(OBJEXT): \
+ kern/x86_64/efi/$(am__dirstamp) \
+ kern/x86_64/efi/$(DEPDIR)/$(am__dirstamp)
+kernel.exec$(EXEEXT): $(kernel_exec_OBJECTS) $(kernel_exec_DEPENDENCIES)
+ @rm -f kernel.exec$(EXEEXT)
+ $(kernel_exec_LINK) $(kernel_exec_OBJECTS) $(kernel_exec_LDADD) $(LIBS)
+commands/keylayouts_module-keylayouts.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+keylayouts.module$(EXEEXT): $(keylayouts_module_OBJECTS) $(keylayouts_module_DEPENDENCIES)
+ @rm -f keylayouts.module$(EXEEXT)
+ $(keylayouts_module_LINK) $(keylayouts_module_OBJECTS) $(keylayouts_module_LDADD) $(LIBS)
+commands/keystatus_module-keystatus.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+keystatus.module$(EXEEXT): $(keystatus_module_OBJECTS) $(keystatus_module_DEPENDENCIES)
+ @rm -f keystatus.module$(EXEEXT)
+ $(keystatus_module_LINK) $(keystatus_module_OBJECTS) $(keystatus_module_LDADD) $(LIBS)
+lib/i386/pc/legacycfg_module-vesa_modes_table.$(OBJEXT): \
+ lib/i386/pc/$(am__dirstamp) \
+ lib/i386/pc/$(DEPDIR)/$(am__dirstamp)
+commands/legacycfg_module-legacycfg.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+lib/legacycfg_module-legacy_parse.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+legacycfg.module$(EXEEXT): $(legacycfg_module_OBJECTS) $(legacycfg_module_DEPENDENCIES)
+ @rm -f legacycfg.module$(EXEEXT)
+ $(legacycfg_module_LINK) $(legacycfg_module_OBJECTS) $(legacycfg_module_LDADD) $(LIBS)
+bus/usb/emu/$(am__dirstamp):
+ @$(MKDIR_P) bus/usb/emu
+ @: > bus/usb/emu/$(am__dirstamp)
+bus/usb/emu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) bus/usb/emu/$(DEPDIR)
+ @: > bus/usb/emu/$(DEPDIR)/$(am__dirstamp)
+bus/usb/emu/libusb_module-usb.$(OBJEXT): bus/usb/emu/$(am__dirstamp) \
+ bus/usb/emu/$(DEPDIR)/$(am__dirstamp)
+libusb.module$(EXEEXT): $(libusb_module_OBJECTS) $(libusb_module_DEPENDENCIES)
+ @rm -f libusb.module$(EXEEXT)
+ $(libusb_module_LINK) $(libusb_module_OBJECTS) $(libusb_module_LDADD) $(LIBS)
+loader/i386/linux_module-linux.$(OBJEXT): loader/i386/$(am__dirstamp) \
+ loader/i386/$(DEPDIR)/$(am__dirstamp)
+lib/linux_module-cmdline.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/i386/pc/linux_module-vesa_modes_table.$(OBJEXT): \
+ lib/i386/pc/$(am__dirstamp) \
+ lib/i386/pc/$(DEPDIR)/$(am__dirstamp)
+loader/mips/$(am__dirstamp):
+ @$(MKDIR_P) loader/mips
+ @: > loader/mips/$(am__dirstamp)
+loader/mips/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) loader/mips/$(DEPDIR)
+ @: > loader/mips/$(DEPDIR)/$(am__dirstamp)
+loader/mips/linux_module-linux.$(OBJEXT): loader/mips/$(am__dirstamp) \
+ loader/mips/$(DEPDIR)/$(am__dirstamp)
+loader/powerpc/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) loader/powerpc/ieee1275
+ @: > loader/powerpc/ieee1275/$(am__dirstamp)
+loader/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) loader/powerpc/ieee1275/$(DEPDIR)
+ @: > loader/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp)
+loader/powerpc/ieee1275/linux_module-linux.$(OBJEXT): \
+ loader/powerpc/ieee1275/$(am__dirstamp) \
+ loader/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp)
+loader/sparc64/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) loader/sparc64/ieee1275
+ @: > loader/sparc64/ieee1275/$(am__dirstamp)
+loader/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) loader/sparc64/ieee1275/$(DEPDIR)
+ @: > loader/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+loader/sparc64/ieee1275/linux_module-linux.$(OBJEXT): \
+ loader/sparc64/ieee1275/$(am__dirstamp) \
+ loader/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+linux.module$(EXEEXT): $(linux_module_OBJECTS) $(linux_module_DEPENDENCIES)
+ @rm -f linux.module$(EXEEXT)
+ $(linux_module_LINK) $(linux_module_OBJECTS) $(linux_module_LDADD) $(LIBS)
+loader/i386/pc/linux16_module-linux.$(OBJEXT): \
+ loader/i386/pc/$(am__dirstamp) \
+ loader/i386/pc/$(DEPDIR)/$(am__dirstamp)
+lib/linux16_module-cmdline.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+linux16.module$(EXEEXT): $(linux16_module_OBJECTS) $(linux16_module_DEPENDENCIES)
+ @rm -f linux16.module$(EXEEXT)
+ $(linux16_module_LINK) $(linux16_module_OBJECTS) $(linux16_module_LDADD) $(LIBS)
+boot/i386/pc/lnxboot_image-lnxboot.$(OBJEXT): \
+ boot/i386/pc/$(am__dirstamp) \
+ boot/i386/pc/$(DEPDIR)/$(am__dirstamp)
+lnxboot.image$(EXEEXT): $(lnxboot_image_OBJECTS) $(lnxboot_image_DEPENDENCIES)
+ @rm -f lnxboot.image$(EXEEXT)
+ $(lnxboot_image_LINK) $(lnxboot_image_OBJECTS) $(lnxboot_image_LDADD) $(LIBS)
+commands/efi/loadbios_module-loadbios.$(OBJEXT): \
+ commands/efi/$(am__dirstamp) \
+ commands/efi/$(DEPDIR)/$(am__dirstamp)
+loadbios.module$(EXEEXT): $(loadbios_module_OBJECTS) $(loadbios_module_DEPENDENCIES)
+ @rm -f loadbios.module$(EXEEXT)
+ $(loadbios_module_LINK) $(loadbios_module_OBJECTS) $(loadbios_module_LDADD) $(LIBS)
+commands/loadenv_module-loadenv.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lib/loadenv_module-envblk.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+loadenv.module$(EXEEXT): $(loadenv_module_OBJECTS) $(loadenv_module_DEPENDENCIES)
+ @rm -f loadenv.module$(EXEEXT)
+ $(loadenv_module_LINK) $(loadenv_module_OBJECTS) $(loadenv_module_LDADD) $(LIBS)
+disk/loopback_module-loopback.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+loopback.module$(EXEEXT): $(loopback_module_OBJECTS) $(loopback_module_DEPENDENCIES)
+ @rm -f loopback.module$(EXEEXT)
+ $(loopback_module_LINK) $(loopback_module_OBJECTS) $(loopback_module_LDADD) $(LIBS)
+commands/ls_module-ls.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+ls.module$(EXEEXT): $(ls_module_OBJECTS) $(ls_module_DEPENDENCIES)
+ @rm -f ls.module$(EXEEXT)
+ $(ls_module_LINK) $(ls_module_OBJECTS) $(ls_module_LDADD) $(LIBS)
+commands/lsacpi_module-lsacpi.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lsacpi.module$(EXEEXT): $(lsacpi_module_OBJECTS) $(lsacpi_module_DEPENDENCIES)
+ @rm -f lsacpi.module$(EXEEXT)
+ $(lsacpi_module_LINK) $(lsacpi_module_OBJECTS) $(lsacpi_module_LDADD) $(LIBS)
+commands/i386/pc/lsapm_module-lsapm.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+lsapm.module$(EXEEXT): $(lsapm_module_OBJECTS) $(lsapm_module_DEPENDENCIES)
+ @rm -f lsapm.module$(EXEEXT)
+ $(lsapm_module_LINK) $(lsapm_module_OBJECTS) $(lsapm_module_LDADD) $(LIBS)
+commands/efi/lsefimmap_module-lsefimmap.$(OBJEXT): \
+ commands/efi/$(am__dirstamp) \
+ commands/efi/$(DEPDIR)/$(am__dirstamp)
+lsefimmap.module$(EXEEXT): $(lsefimmap_module_OBJECTS) $(lsefimmap_module_DEPENDENCIES)
+ @rm -f lsefimmap.module$(EXEEXT)
+ $(lsefimmap_module_LINK) $(lsefimmap_module_OBJECTS) $(lsefimmap_module_LDADD) $(LIBS)
+commands/efi/lsefisystab_module-lsefisystab.$(OBJEXT): \
+ commands/efi/$(am__dirstamp) \
+ commands/efi/$(DEPDIR)/$(am__dirstamp)
+lsefisystab.module$(EXEEXT): $(lsefisystab_module_OBJECTS) $(lsefisystab_module_DEPENDENCIES)
+ @rm -f lsefisystab.module$(EXEEXT)
+ $(lsefisystab_module_LINK) $(lsefisystab_module_OBJECTS) $(lsefisystab_module_LDADD) $(LIBS)
+commands/lsmmap_module-lsmmap.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lsmmap.module$(EXEEXT): $(lsmmap_module_OBJECTS) $(lsmmap_module_DEPENDENCIES)
+ @rm -f lsmmap.module$(EXEEXT)
+ $(lsmmap_module_LINK) $(lsmmap_module_OBJECTS) $(lsmmap_module_LDADD) $(LIBS)
+commands/lspci_module-lspci.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+lspci.module$(EXEEXT): $(lspci_module_OBJECTS) $(lspci_module_DEPENDENCIES)
+ @rm -f lspci.module$(EXEEXT)
+ $(lspci_module_LINK) $(lspci_module_OBJECTS) $(lspci_module_LDADD) $(LIBS)
+commands/efi/lssal_module-lssal.$(OBJEXT): \
+ commands/efi/$(am__dirstamp) \
+ commands/efi/$(DEPDIR)/$(am__dirstamp)
+lssal.module$(EXEEXT): $(lssal_module_OBJECTS) $(lssal_module_DEPENDENCIES)
+ @rm -f lssal.module$(EXEEXT)
+ $(lssal_module_LINK) $(lssal_module_OBJECTS) $(lssal_module_LDADD) $(LIBS)
+commands/mips/yeeloong/$(am__dirstamp):
+ @$(MKDIR_P) commands/mips/yeeloong
+ @: > commands/mips/yeeloong/$(am__dirstamp)
+commands/mips/yeeloong/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) commands/mips/yeeloong/$(DEPDIR)
+ @: > commands/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+commands/mips/yeeloong/lsspd_module-lsspd.$(OBJEXT): \
+ commands/mips/yeeloong/$(am__dirstamp) \
+ commands/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+lsspd.module$(EXEEXT): $(lsspd_module_OBJECTS) $(lsspd_module_DEPENDENCIES)
+ @rm -f lsspd.module$(EXEEXT)
+ $(lsspd_module_LINK) $(lsspd_module_OBJECTS) $(lsspd_module_LDADD) $(LIBS)
+disk/lvm_module-lvm.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+lvm.module$(EXEEXT): $(lvm_module_OBJECTS) $(lvm_module_DEPENDENCIES)
+ @rm -f lvm.module$(EXEEXT)
+ $(lvm_module_LINK) $(lvm_module_OBJECTS) $(lvm_module_LDADD) $(LIBS)
+disk/mdraid09_module-mdraid_linux.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+mdraid09.module$(EXEEXT): $(mdraid09_module_OBJECTS) $(mdraid09_module_DEPENDENCIES)
+ @rm -f mdraid09.module$(EXEEXT)
+ $(mdraid09_module_LINK) $(mdraid09_module_OBJECTS) $(mdraid09_module_LDADD) $(LIBS)
+disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+mdraid1x.module$(EXEEXT): $(mdraid1x_module_OBJECTS) $(mdraid1x_module_DEPENDENCIES)
+ @rm -f mdraid1x.module$(EXEEXT)
+ $(mdraid1x_module_LINK) $(mdraid1x_module_OBJECTS) $(mdraid1x_module_LDADD) $(LIBS)
+disk/memdisk_module-memdisk.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+memdisk.module$(EXEEXT): $(memdisk_module_OBJECTS) $(memdisk_module_DEPENDENCIES)
+ @rm -f memdisk.module$(EXEEXT)
+ $(memdisk_module_LINK) $(memdisk_module_OBJECTS) $(memdisk_module_LDADD) $(LIBS)
+commands/memrw_module-memrw.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+memrw.module$(EXEEXT): $(memrw_module_OBJECTS) $(memrw_module_DEPENDENCIES)
+ @rm -f memrw.module$(EXEEXT)
+ $(memrw_module_LINK) $(memrw_module_OBJECTS) $(memrw_module_LDADD) $(LIBS)
+commands/minicmd_module-minicmd.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+minicmd.module$(EXEEXT): $(minicmd_module_OBJECTS) $(minicmd_module_DEPENDENCIES)
+ @rm -f minicmd.module$(EXEEXT)
+ $(minicmd_module_LINK) $(minicmd_module_OBJECTS) $(minicmd_module_LDADD) $(LIBS)
+fs/minix_module-minix.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+minix.module$(EXEEXT): $(minix_module_OBJECTS) $(minix_module_DEPENDENCIES)
+ @rm -f minix.module$(EXEEXT)
+ $(minix_module_LINK) $(minix_module_OBJECTS) $(minix_module_LDADD) $(LIBS)
+fs/minix2_module-minix2.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+minix2.module$(EXEEXT): $(minix2_module_OBJECTS) $(minix2_module_DEPENDENCIES)
+ @rm -f minix2.module$(EXEEXT)
+ $(minix2_module_LINK) $(minix2_module_OBJECTS) $(minix2_module_LDADD) $(LIBS)
+mmap/i386/$(am__dirstamp):
+ @$(MKDIR_P) mmap/i386
+ @: > mmap/i386/$(am__dirstamp)
+mmap/i386/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) mmap/i386/$(DEPDIR)
+ @: > mmap/i386/$(DEPDIR)/$(am__dirstamp)
+mmap/i386/mmap_module-uppermem.$(OBJEXT): mmap/i386/$(am__dirstamp) \
+ mmap/i386/$(DEPDIR)/$(am__dirstamp)
+mmap/i386/mmap_module-mmap.$(OBJEXT): mmap/i386/$(am__dirstamp) \
+ mmap/i386/$(DEPDIR)/$(am__dirstamp)
+mmap/$(am__dirstamp):
+ @$(MKDIR_P) mmap
+ @: > mmap/$(am__dirstamp)
+mmap/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) mmap/$(DEPDIR)
+ @: > mmap/$(DEPDIR)/$(am__dirstamp)
+mmap/mmap_module-mmap.$(OBJEXT): mmap/$(am__dirstamp) \
+ mmap/$(DEPDIR)/$(am__dirstamp)
+mmap/efi/$(am__dirstamp):
+ @$(MKDIR_P) mmap/efi
+ @: > mmap/efi/$(am__dirstamp)
+mmap/efi/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) mmap/efi/$(DEPDIR)
+ @: > mmap/efi/$(DEPDIR)/$(am__dirstamp)
+mmap/efi/mmap_module-mmap.$(OBJEXT): mmap/efi/$(am__dirstamp) \
+ mmap/efi/$(DEPDIR)/$(am__dirstamp)
+mmap/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) mmap/i386/pc
+ @: > mmap/i386/pc/$(am__dirstamp)
+mmap/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) mmap/i386/pc/$(DEPDIR)
+ @: > mmap/i386/pc/$(DEPDIR)/$(am__dirstamp)
+mmap/i386/pc/mmap_module-mmap.$(OBJEXT): mmap/i386/pc/$(am__dirstamp) \
+ mmap/i386/pc/$(DEPDIR)/$(am__dirstamp)
+mmap/i386/pc/mmap_module-mmap_helper.$(OBJEXT): \
+ mmap/i386/pc/$(am__dirstamp) \
+ mmap/i386/pc/$(DEPDIR)/$(am__dirstamp)
+mmap/mips/yeeloong/$(am__dirstamp):
+ @$(MKDIR_P) mmap/mips/yeeloong
+ @: > mmap/mips/yeeloong/$(am__dirstamp)
+mmap/mips/yeeloong/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) mmap/mips/yeeloong/$(DEPDIR)
+ @: > mmap/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+mmap/mips/yeeloong/mmap_module-uppermem.$(OBJEXT): \
+ mmap/mips/yeeloong/$(am__dirstamp) \
+ mmap/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+mmap.module$(EXEEXT): $(mmap_module_OBJECTS) $(mmap_module_DEPENDENCIES)
+ @rm -f mmap.module$(EXEEXT)
+ $(mmap_module_LINK) $(mmap_module_OBJECTS) $(mmap_module_LDADD) $(LIBS)
+parttool/$(am__dirstamp):
+ @$(MKDIR_P) parttool
+ @: > parttool/$(am__dirstamp)
+parttool/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) parttool/$(DEPDIR)
+ @: > parttool/$(DEPDIR)/$(am__dirstamp)
+parttool/msdospart_module-msdospart.$(OBJEXT): \
+ parttool/$(am__dirstamp) parttool/$(DEPDIR)/$(am__dirstamp)
+msdospart.module$(EXEEXT): $(msdospart_module_OBJECTS) $(msdospart_module_DEPENDENCIES)
+ @rm -f msdospart.module$(EXEEXT)
+ $(msdospart_module_LINK) $(msdospart_module_OBJECTS) $(msdospart_module_LDADD) $(LIBS)
+loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT): \
+ loader/i386/$(am__dirstamp) \
+ loader/i386/$(DEPDIR)/$(am__dirstamp)
+loader/multiboot_module-multiboot.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+multiboot.module$(EXEEXT): $(multiboot_module_OBJECTS) $(multiboot_module_DEPENDENCIES)
+ @rm -f multiboot.module$(EXEEXT)
+ $(multiboot_module_LINK) $(multiboot_module_OBJECTS) $(multiboot_module_LDADD) $(LIBS)
+loader/multiboot2_module-multiboot.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+loader/multiboot2_module-multiboot_mbi2.$(OBJEXT): \
+ loader/$(am__dirstamp) loader/$(DEPDIR)/$(am__dirstamp)
+multiboot2.module$(EXEEXT): $(multiboot2_module_OBJECTS) $(multiboot2_module_DEPENDENCIES)
+ @rm -f multiboot2.module$(EXEEXT)
+ $(multiboot2_module_LINK) $(multiboot2_module_OBJECTS) $(multiboot2_module_LDADD) $(LIBS)
+disk/ieee1275/nand_module-nand.$(OBJEXT): \
+ disk/ieee1275/$(am__dirstamp) \
+ disk/ieee1275/$(DEPDIR)/$(am__dirstamp)
+nand.module$(EXEEXT): $(nand_module_OBJECTS) $(nand_module_DEPENDENCIES)
+ @rm -f nand.module$(EXEEXT)
+ $(nand_module_LINK) $(nand_module_OBJECTS) $(nand_module_LDADD) $(LIBS)
+fs/nilfs2_module-nilfs2.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+nilfs2.module$(EXEEXT): $(nilfs2_module_OBJECTS) $(nilfs2_module_DEPENDENCIES)
+ @rm -f nilfs2.module$(EXEEXT)
+ $(nilfs2_module_LINK) $(nilfs2_module_OBJECTS) $(nilfs2_module_LDADD) $(LIBS)
+boot/mips/$(am__dirstamp):
+ @$(MKDIR_P) boot/mips
+ @: > boot/mips/$(am__dirstamp)
+boot/mips/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) boot/mips/$(DEPDIR)
+ @: > boot/mips/$(DEPDIR)/$(am__dirstamp)
+boot/mips/none_decompress_image-startup_raw.$(OBJEXT): \
+ boot/mips/$(am__dirstamp) boot/mips/$(DEPDIR)/$(am__dirstamp)
+boot/decompressor/$(am__dirstamp):
+ @$(MKDIR_P) boot/decompressor
+ @: > boot/decompressor/$(am__dirstamp)
+boot/decompressor/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) boot/decompressor/$(DEPDIR)
+ @: > boot/decompressor/$(DEPDIR)/$(am__dirstamp)
+boot/decompressor/none_decompress_image-none.$(OBJEXT): \
+ boot/decompressor/$(am__dirstamp) \
+ boot/decompressor/$(DEPDIR)/$(am__dirstamp)
+none_decompress.image$(EXEEXT): $(none_decompress_image_OBJECTS) $(none_decompress_image_DEPENDENCIES)
+ @rm -f none_decompress.image$(EXEEXT)
+ $(none_decompress_image_LINK) $(none_decompress_image_OBJECTS) $(none_decompress_image_LDADD) $(LIBS)
+normal/$(am__dirstamp):
+ @$(MKDIR_P) normal
+ @: > normal/$(am__dirstamp)
+normal/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) normal/$(DEPDIR)
+ @: > normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-main.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-cmdline.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-dyncmd.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-auth.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-autofs.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-color.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-completion.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-datetime.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-menu.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-menu_entry.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-menu_text.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-misc.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-crypto.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-term.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-context.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+normal/normal_module-charset.$(OBJEXT): normal/$(am__dirstamp) \
+ normal/$(DEPDIR)/$(am__dirstamp)
+script/$(am__dirstamp):
+ @$(MKDIR_P) script
+ @: > script/$(am__dirstamp)
+script/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) script/$(DEPDIR)
+ @: > script/$(DEPDIR)/$(am__dirstamp)
+script/normal_module-main.$(OBJEXT): script/$(am__dirstamp) \
+ script/$(DEPDIR)/$(am__dirstamp)
+script/normal_module-script.$(OBJEXT): script/$(am__dirstamp) \
+ script/$(DEPDIR)/$(am__dirstamp)
+script/normal_module-execute.$(OBJEXT): script/$(am__dirstamp) \
+ script/$(DEPDIR)/$(am__dirstamp)
+script/normal_module-function.$(OBJEXT): script/$(am__dirstamp) \
+ script/$(DEPDIR)/$(am__dirstamp)
+script/normal_module-lexer.$(OBJEXT): script/$(am__dirstamp) \
+ script/$(DEPDIR)/$(am__dirstamp)
+script/normal_module-argv.$(OBJEXT): script/$(am__dirstamp) \
+ script/$(DEPDIR)/$(am__dirstamp)
+commands/normal_module-menuentry.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+normal.module$(EXEEXT): $(normal_module_OBJECTS) $(normal_module_DEPENDENCIES)
+ @rm -f normal.module$(EXEEXT)
+ $(normal_module_LINK) $(normal_module_OBJECTS) $(normal_module_LDADD) $(LIBS)
+fs/ntfs_module-ntfs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+ntfs.module$(EXEEXT): $(ntfs_module_OBJECTS) $(ntfs_module_DEPENDENCIES)
+ @rm -f ntfs.module$(EXEEXT)
+ $(ntfs_module_LINK) $(ntfs_module_OBJECTS) $(ntfs_module_LDADD) $(LIBS)
+fs/ntfscomp_module-ntfscomp.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+ntfscomp.module$(EXEEXT): $(ntfscomp_module_OBJECTS) $(ntfscomp_module_DEPENDENCIES)
+ @rm -f ntfscomp.module$(EXEEXT)
+ $(ntfscomp_module_LINK) $(ntfscomp_module_OBJECTS) $(ntfscomp_module_LDADD) $(LIBS)
+loader/i386/pc/ntldr_module-ntldr.$(OBJEXT): \
+ loader/i386/pc/$(am__dirstamp) \
+ loader/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ntldr.module$(EXEEXT): $(ntldr_module_OBJECTS) $(ntldr_module_DEPENDENCIES)
+ @rm -f ntldr.module$(EXEEXT)
+ $(ntldr_module_LINK) $(ntldr_module_OBJECTS) $(ntldr_module_LDADD) $(LIBS)
+bus/usb/$(am__dirstamp):
+ @$(MKDIR_P) bus/usb
+ @: > bus/usb/$(am__dirstamp)
+bus/usb/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) bus/usb/$(DEPDIR)
+ @: > bus/usb/$(DEPDIR)/$(am__dirstamp)
+bus/usb/ohci_module-ohci.$(OBJEXT): bus/usb/$(am__dirstamp) \
+ bus/usb/$(DEPDIR)/$(am__dirstamp)
+ohci.module$(EXEEXT): $(ohci_module_OBJECTS) $(ohci_module_DEPENDENCIES)
+ @rm -f ohci.module$(EXEEXT)
+ $(ohci_module_LINK) $(ohci_module_OBJECTS) $(ohci_module_LDADD) $(LIBS)
+partmap/$(am__dirstamp):
+ @$(MKDIR_P) partmap
+ @: > partmap/$(am__dirstamp)
+partmap/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) partmap/$(DEPDIR)
+ @: > partmap/$(DEPDIR)/$(am__dirstamp)
+partmap/part_acorn_module-acorn.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_acorn.module$(EXEEXT): $(part_acorn_module_OBJECTS) $(part_acorn_module_DEPENDENCIES)
+ @rm -f part_acorn.module$(EXEEXT)
+ $(part_acorn_module_LINK) $(part_acorn_module_OBJECTS) $(part_acorn_module_LDADD) $(LIBS)
+partmap/part_amiga_module-amiga.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_amiga.module$(EXEEXT): $(part_amiga_module_OBJECTS) $(part_amiga_module_DEPENDENCIES)
+ @rm -f part_amiga.module$(EXEEXT)
+ $(part_amiga_module_LINK) $(part_amiga_module_OBJECTS) $(part_amiga_module_LDADD) $(LIBS)
+partmap/part_apple_module-apple.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_apple.module$(EXEEXT): $(part_apple_module_OBJECTS) $(part_apple_module_DEPENDENCIES)
+ @rm -f part_apple.module$(EXEEXT)
+ $(part_apple_module_LINK) $(part_apple_module_OBJECTS) $(part_apple_module_LDADD) $(LIBS)
+partmap/part_bsd_module-bsdlabel.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_bsd.module$(EXEEXT): $(part_bsd_module_OBJECTS) $(part_bsd_module_DEPENDENCIES)
+ @rm -f part_bsd.module$(EXEEXT)
+ $(part_bsd_module_LINK) $(part_bsd_module_OBJECTS) $(part_bsd_module_LDADD) $(LIBS)
+partmap/part_gpt_module-gpt.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_gpt.module$(EXEEXT): $(part_gpt_module_OBJECTS) $(part_gpt_module_DEPENDENCIES)
+ @rm -f part_gpt.module$(EXEEXT)
+ $(part_gpt_module_LINK) $(part_gpt_module_OBJECTS) $(part_gpt_module_LDADD) $(LIBS)
+partmap/part_msdos_module-msdos.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_msdos.module$(EXEEXT): $(part_msdos_module_OBJECTS) $(part_msdos_module_DEPENDENCIES)
+ @rm -f part_msdos.module$(EXEEXT)
+ $(part_msdos_module_LINK) $(part_msdos_module_OBJECTS) $(part_msdos_module_LDADD) $(LIBS)
+partmap/part_sun_module-sun.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_sun.module$(EXEEXT): $(part_sun_module_OBJECTS) $(part_sun_module_DEPENDENCIES)
+ @rm -f part_sun.module$(EXEEXT)
+ $(part_sun_module_LINK) $(part_sun_module_OBJECTS) $(part_sun_module_LDADD) $(LIBS)
+partmap/part_sunpc_module-sunpc.$(OBJEXT): partmap/$(am__dirstamp) \
+ partmap/$(DEPDIR)/$(am__dirstamp)
+part_sunpc.module$(EXEEXT): $(part_sunpc_module_OBJECTS) $(part_sunpc_module_DEPENDENCIES)
+ @rm -f part_sunpc.module$(EXEEXT)
+ $(part_sunpc_module_LINK) $(part_sunpc_module_OBJECTS) $(part_sunpc_module_LDADD) $(LIBS)
+commands/parttool_module-parttool.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+parttool.module$(EXEEXT): $(parttool_module_OBJECTS) $(parttool_module_DEPENDENCIES)
+ @rm -f parttool.module$(EXEEXT)
+ $(parttool_module_LINK) $(parttool_module_OBJECTS) $(parttool_module_LDADD) $(LIBS)
+commands/password_module-password.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+password.module$(EXEEXT): $(password_module_OBJECTS) $(password_module_DEPENDENCIES)
+ @rm -f password.module$(EXEEXT)
+ $(password_module_LINK) $(password_module_OBJECTS) $(password_module_LDADD) $(LIBS)
+commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+password_pbkdf2.module$(EXEEXT): $(password_pbkdf2_module_OBJECTS) $(password_pbkdf2_module_DEPENDENCIES)
+ @rm -f password_pbkdf2.module$(EXEEXT)
+ $(password_pbkdf2_module_LINK) $(password_pbkdf2_module_OBJECTS) $(password_pbkdf2_module_LDADD) $(LIBS)
+lib/pbkdf2_module-pbkdf2.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+pbkdf2.module$(EXEEXT): $(pbkdf2_module_OBJECTS) $(pbkdf2_module_DEPENDENCIES)
+ @rm -f pbkdf2.module$(EXEEXT)
+ $(pbkdf2_module_LINK) $(pbkdf2_module_OBJECTS) $(pbkdf2_module_LDADD) $(LIBS)
+bus/emu/$(am__dirstamp):
+ @$(MKDIR_P) bus/emu
+ @: > bus/emu/$(am__dirstamp)
+bus/emu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) bus/emu/$(DEPDIR)
+ @: > bus/emu/$(DEPDIR)/$(am__dirstamp)
+bus/emu/pci_module-pci.$(OBJEXT): bus/emu/$(am__dirstamp) \
+ bus/emu/$(DEPDIR)/$(am__dirstamp)
+commands/pci_module-lspci.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+bus/pci_module-pci.$(OBJEXT): bus/$(am__dirstamp) \
+ bus/$(DEPDIR)/$(am__dirstamp)
+pci.module$(EXEEXT): $(pci_module_OBJECTS) $(pci_module_DEPENDENCIES)
+ @rm -f pci.module$(EXEEXT)
+ $(pci_module_LINK) $(pci_module_OBJECTS) $(pci_module_LDADD) $(LIBS)
+commands/i386/pc/play_module-play.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+play.module$(EXEEXT): $(play_module_OBJECTS) $(play_module_DEPENDENCIES)
+ @rm -f play.module$(EXEEXT)
+ $(play_module_LINK) $(play_module_OBJECTS) $(play_module_LDADD) $(LIBS)
+video/readers/png_module-png.$(OBJEXT): video/readers/$(am__dirstamp) \
+ video/readers/$(DEPDIR)/$(am__dirstamp)
+png.module$(EXEEXT): $(png_module_OBJECTS) $(png_module_DEPENDENCIES)
+ @rm -f png.module$(EXEEXT)
+ $(png_module_LINK) $(png_module_OBJECTS) $(png_module_LDADD) $(LIBS)
+commands/probe_module-probe.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+probe.module$(EXEEXT): $(probe_module_OBJECTS) $(probe_module_DEPENDENCIES)
+ @rm -f probe.module$(EXEEXT)
+ $(probe_module_LINK) $(probe_module_OBJECTS) $(probe_module_LDADD) $(LIBS)
+fs/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) fs/i386/pc
+ @: > fs/i386/pc/$(am__dirstamp)
+fs/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) fs/i386/pc/$(DEPDIR)
+ @: > fs/i386/pc/$(DEPDIR)/$(am__dirstamp)
+fs/i386/pc/pxe_module-pxe.$(OBJEXT): fs/i386/pc/$(am__dirstamp) \
+ fs/i386/pc/$(DEPDIR)/$(am__dirstamp)
+pxe.module$(EXEEXT): $(pxe_module_OBJECTS) $(pxe_module_DEPENDENCIES)
+ @rm -f pxe.module$(EXEEXT)
+ $(pxe_module_LINK) $(pxe_module_OBJECTS) $(pxe_module_LDADD) $(LIBS)
+boot/i386/pc/pxeboot_image-pxeboot.$(OBJEXT): \
+ boot/i386/pc/$(am__dirstamp) \
+ boot/i386/pc/$(DEPDIR)/$(am__dirstamp)
+pxeboot.image$(EXEEXT): $(pxeboot_image_OBJECTS) $(pxeboot_image_DEPENDENCIES)
+ @rm -f pxeboot.image$(EXEEXT)
+ $(pxeboot_image_LINK) $(pxeboot_image_OBJECTS) $(pxeboot_image_LDADD) $(LIBS)
+commands/i386/pc/pxecmd_module-pxecmd.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+pxecmd.module$(EXEEXT): $(pxecmd_module_OBJECTS) $(pxecmd_module_DEPENDENCIES)
+ @rm -f pxecmd.module$(EXEEXT)
+ $(pxecmd_module_LINK) $(pxecmd_module_OBJECTS) $(pxecmd_module_LDADD) $(LIBS)
+disk/raid_module-raid.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+raid.module$(EXEEXT): $(raid_module_OBJECTS) $(raid_module_DEPENDENCIES)
+ @rm -f raid.module$(EXEEXT)
+ $(raid_module_LINK) $(raid_module_OBJECTS) $(raid_module_LDADD) $(LIBS)
+disk/raid5rec_module-raid5_recover.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+raid5rec.module$(EXEEXT): $(raid5rec_module_OBJECTS) $(raid5rec_module_DEPENDENCIES)
+ @rm -f raid5rec.module$(EXEEXT)
+ $(raid5rec_module_LINK) $(raid5rec_module_OBJECTS) $(raid5rec_module_LDADD) $(LIBS)
+disk/raid6rec_module-raid6_recover.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+raid6rec.module$(EXEEXT): $(raid6rec_module_OBJECTS) $(raid6rec_module_DEPENDENCIES)
+ @rm -f raid6rec.module$(EXEEXT)
+ $(raid6rec_module_LINK) $(raid6rec_module_OBJECTS) $(raid6rec_module_LDADD) $(LIBS)
+commands/read_module-read.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+read.module$(EXEEXT): $(read_module_OBJECTS) $(read_module_DEPENDENCIES)
+ @rm -f read.module$(EXEEXT)
+ $(read_module_LINK) $(read_module_OBJECTS) $(read_module_LDADD) $(LIBS)
+commands/reboot_module-reboot.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+reboot.module$(EXEEXT): $(reboot_module_OBJECTS) $(reboot_module_DEPENDENCIES)
+ @rm -f reboot.module$(EXEEXT)
+ $(reboot_module_LINK) $(reboot_module_OBJECTS) $(reboot_module_LDADD) $(LIBS)
+commands/regexp_module-regexp.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+commands/regexp_module-wildcard.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+regexp.module$(EXEEXT): $(regexp_module_OBJECTS) $(regexp_module_DEPENDENCIES)
+ @rm -f regexp.module$(EXEEXT)
+ $(regexp_module_LINK) $(regexp_module_OBJECTS) $(regexp_module_LDADD) $(LIBS)
+fs/reiserfs_module-reiserfs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+reiserfs.module$(EXEEXT): $(reiserfs_module_OBJECTS) $(reiserfs_module_DEPENDENCIES)
+ @rm -f reiserfs.module$(EXEEXT)
+ $(reiserfs_module_LINK) $(reiserfs_module_OBJECTS) $(reiserfs_module_LDADD) $(LIBS)
+lib/i386/relocator_module-relocator_asm.$(OBJEXT): \
+ lib/i386/$(am__dirstamp) lib/i386/$(DEPDIR)/$(am__dirstamp)
+lib/i386/relocator_module-relocator16.$(OBJEXT): \
+ lib/i386/$(am__dirstamp) lib/i386/$(DEPDIR)/$(am__dirstamp)
+lib/i386/relocator_module-relocator32.$(OBJEXT): \
+ lib/i386/$(am__dirstamp) lib/i386/$(DEPDIR)/$(am__dirstamp)
+lib/i386/relocator_module-relocator64.$(OBJEXT): \
+ lib/i386/$(am__dirstamp) lib/i386/$(DEPDIR)/$(am__dirstamp)
+lib/i386/relocator_module-relocator.$(OBJEXT): \
+ lib/i386/$(am__dirstamp) lib/i386/$(DEPDIR)/$(am__dirstamp)
+lib/relocator_module-relocator.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/efi/relocator_module-relocator.$(OBJEXT): lib/efi/$(am__dirstamp) \
+ lib/efi/$(DEPDIR)/$(am__dirstamp)
+lib/ieee1275/relocator_module-relocator.$(OBJEXT): \
+ lib/ieee1275/$(am__dirstamp) \
+ lib/ieee1275/$(DEPDIR)/$(am__dirstamp)
+lib/mips/$(am__dirstamp):
+ @$(MKDIR_P) lib/mips
+ @: > lib/mips/$(am__dirstamp)
+lib/mips/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/mips/$(DEPDIR)
+ @: > lib/mips/$(DEPDIR)/$(am__dirstamp)
+lib/mips/relocator_module-relocator_asm.$(OBJEXT): \
+ lib/mips/$(am__dirstamp) lib/mips/$(DEPDIR)/$(am__dirstamp)
+lib/mips/relocator_module-relocator.$(OBJEXT): \
+ lib/mips/$(am__dirstamp) lib/mips/$(DEPDIR)/$(am__dirstamp)
+lib/powerpc/$(am__dirstamp):
+ @$(MKDIR_P) lib/powerpc
+ @: > lib/powerpc/$(am__dirstamp)
+lib/powerpc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/powerpc/$(DEPDIR)
+ @: > lib/powerpc/$(DEPDIR)/$(am__dirstamp)
+lib/powerpc/relocator_module-relocator_asm.$(OBJEXT): \
+ lib/powerpc/$(am__dirstamp) \
+ lib/powerpc/$(DEPDIR)/$(am__dirstamp)
+lib/powerpc/relocator_module-relocator.$(OBJEXT): \
+ lib/powerpc/$(am__dirstamp) \
+ lib/powerpc/$(DEPDIR)/$(am__dirstamp)
+lib/x86_64/$(am__dirstamp):
+ @$(MKDIR_P) lib/x86_64
+ @: > lib/x86_64/$(am__dirstamp)
+lib/x86_64/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/x86_64/$(DEPDIR)
+ @: > lib/x86_64/$(DEPDIR)/$(am__dirstamp)
+lib/x86_64/relocator_module-relocator_asm.$(OBJEXT): \
+ lib/x86_64/$(am__dirstamp) \
+ lib/x86_64/$(DEPDIR)/$(am__dirstamp)
+relocator.module$(EXEEXT): $(relocator_module_OBJECTS) $(relocator_module_DEPENDENCIES)
+ @rm -f relocator.module$(EXEEXT)
+ $(relocator_module_LINK) $(relocator_module_OBJECTS) $(relocator_module_LDADD) $(LIBS)
+disk/scsi_module-scsi.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+scsi.module$(EXEEXT): $(scsi_module_OBJECTS) $(scsi_module_DEPENDENCIES)
+ @rm -f scsi.module$(EXEEXT)
+ $(scsi_module_LINK) $(scsi_module_OBJECTS) $(scsi_module_LDADD) $(LIBS)
+video/emu/$(am__dirstamp):
+ @$(MKDIR_P) video/emu
+ @: > video/emu/$(am__dirstamp)
+video/emu/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) video/emu/$(DEPDIR)
+ @: > video/emu/$(DEPDIR)/$(am__dirstamp)
+video/emu/sdl_module-sdl.$(OBJEXT): video/emu/$(am__dirstamp) \
+ video/emu/$(DEPDIR)/$(am__dirstamp)
+sdl.module$(EXEEXT): $(sdl_module_OBJECTS) $(sdl_module_DEPENDENCIES)
+ @rm -f sdl.module$(EXEEXT)
+ $(sdl_module_LINK) $(sdl_module_OBJECTS) $(sdl_module_LDADD) $(LIBS)
+commands/search_module-search_wrap.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+search.module$(EXEEXT): $(search_module_OBJECTS) $(search_module_DEPENDENCIES)
+ @rm -f search.module$(EXEEXT)
+ $(search_module_LINK) $(search_module_OBJECTS) $(search_module_LDADD) $(LIBS)
+commands/search_fs_file_module-search_file.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+search_fs_file.module$(EXEEXT): $(search_fs_file_module_OBJECTS) $(search_fs_file_module_DEPENDENCIES)
+ @rm -f search_fs_file.module$(EXEEXT)
+ $(search_fs_file_module_LINK) $(search_fs_file_module_OBJECTS) $(search_fs_file_module_LDADD) $(LIBS)
+commands/search_fs_uuid_module-search_uuid.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+search_fs_uuid.module$(EXEEXT): $(search_fs_uuid_module_OBJECTS) $(search_fs_uuid_module_DEPENDENCIES)
+ @rm -f search_fs_uuid.module$(EXEEXT)
+ $(search_fs_uuid_module_LINK) $(search_fs_uuid_module_OBJECTS) $(search_fs_uuid_module_LDADD) $(LIBS)
+commands/search_label_module-search_label.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+search_label.module$(EXEEXT): $(search_label_module_OBJECTS) $(search_label_module_DEPENDENCIES)
+ @rm -f search_label.module$(EXEEXT)
+ $(search_label_module_LINK) $(search_label_module_OBJECTS) $(search_label_module_LDADD) $(LIBS)
+commands/i386/pc/sendkey_module-sendkey.$(OBJEXT): \
+ commands/i386/pc/$(am__dirstamp) \
+ commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+sendkey.module$(EXEEXT): $(sendkey_module_OBJECTS) $(sendkey_module_DEPENDENCIES)
+ @rm -f sendkey.module$(EXEEXT)
+ $(sendkey_module_LINK) $(sendkey_module_OBJECTS) $(sendkey_module_LDADD) $(LIBS)
+term/serial_module-serial.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+term/serial_module-ns8250.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+serial.module$(EXEEXT): $(serial_module_OBJECTS) $(serial_module_DEPENDENCIES)
+ @rm -f serial.module$(EXEEXT)
+ $(serial_module_LINK) $(serial_module_OBJECTS) $(serial_module_LDADD) $(LIBS)
+lib/setjmp_module-setjmp.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+setjmp.module$(EXEEXT): $(setjmp_module_OBJECTS) $(setjmp_module_DEPENDENCIES)
+ @rm -f setjmp.module$(EXEEXT)
+ $(setjmp_module_LINK) $(setjmp_module_OBJECTS) $(setjmp_module_LDADD) $(LIBS)
+commands/setpci_module-setpci.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+setpci.module$(EXEEXT): $(setpci_module_OBJECTS) $(setpci_module_DEPENDENCIES)
+ @rm -f setpci.module$(EXEEXT)
+ $(setpci_module_LINK) $(setpci_module_OBJECTS) $(setpci_module_LDADD) $(LIBS)
+fs/sfs_module-sfs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+sfs.module$(EXEEXT): $(sfs_module_OBJECTS) $(sfs_module_DEPENDENCIES)
+ @rm -f sfs.module$(EXEEXT)
+ $(sfs_module_LINK) $(sfs_module_OBJECTS) $(sfs_module_LDADD) $(LIBS)
+commands/sleep_module-sleep.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+sleep.module$(EXEEXT): $(sleep_module_OBJECTS) $(sleep_module_DEPENDENCIES)
+ @rm -f sleep.module$(EXEEXT)
+ $(sleep_module_LINK) $(sleep_module_OBJECTS) $(sleep_module_LDADD) $(LIBS)
+commands/ieee1275/$(am__dirstamp):
+ @$(MKDIR_P) commands/ieee1275
+ @: > commands/ieee1275/$(am__dirstamp)
+commands/ieee1275/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) commands/ieee1275/$(DEPDIR)
+ @: > commands/ieee1275/$(DEPDIR)/$(am__dirstamp)
+commands/ieee1275/suspend_module-suspend.$(OBJEXT): \
+ commands/ieee1275/$(am__dirstamp) \
+ commands/ieee1275/$(DEPDIR)/$(am__dirstamp)
+suspend.module$(EXEEXT): $(suspend_module_OBJECTS) $(suspend_module_DEPENDENCIES)
+ @rm -f suspend.module$(EXEEXT)
+ $(suspend_module_LINK) $(suspend_module_OBJECTS) $(suspend_module_LDADD) $(LIBS)
+fs/tar_module-tar.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+tar.module$(EXEEXT): $(tar_module_OBJECTS) $(tar_module_DEPENDENCIES)
+ @rm -f tar.module$(EXEEXT)
+ $(tar_module_LINK) $(tar_module_OBJECTS) $(tar_module_LDADD) $(LIBS)
+commands/terminal_module-terminal.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+terminal.module$(EXEEXT): $(terminal_module_OBJECTS) $(terminal_module_DEPENDENCIES)
+ @rm -f terminal.module$(EXEEXT)
+ $(terminal_module_LINK) $(terminal_module_OBJECTS) $(terminal_module_LDADD) $(LIBS)
+term/terminfo_module-terminfo.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+term/terminfo_module-tparm.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+terminfo.module$(EXEEXT): $(terminfo_module_OBJECTS) $(terminfo_module_DEPENDENCIES)
+ @rm -f terminfo.module$(EXEEXT)
+ $(terminfo_module_LINK) $(terminfo_module_OBJECTS) $(terminfo_module_LDADD) $(LIBS)
+commands/test_module-test.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+test.module$(EXEEXT): $(test_module_OBJECTS) $(test_module_DEPENDENCIES)
+ @rm -f test.module$(EXEEXT)
+ $(test_module_LINK) $(test_module_OBJECTS) $(test_module_LDADD) $(LIBS)
+tests/test_blockarg_module-test_blockarg.$(OBJEXT): \
+ tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
+test_blockarg.module$(EXEEXT): $(test_blockarg_module_OBJECTS) $(test_blockarg_module_DEPENDENCIES)
+ @rm -f test_blockarg.module$(EXEEXT)
+ $(test_blockarg_module_LINK) $(test_blockarg_module_OBJECTS) $(test_blockarg_module_LDADD) $(LIBS)
+commands/testload_module-testload.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+testload.module$(EXEEXT): $(testload_module_OBJECTS) $(testload_module_DEPENDENCIES)
+ @rm -f testload.module$(EXEEXT)
+ $(testload_module_LINK) $(testload_module_OBJECTS) $(testload_module_LDADD) $(LIBS)
+video/readers/tga_module-tga.$(OBJEXT): video/readers/$(am__dirstamp) \
+ video/readers/$(DEPDIR)/$(am__dirstamp)
+tga.module$(EXEEXT): $(tga_module_OBJECTS) $(tga_module_DEPENDENCIES)
+ @rm -f tga.module$(EXEEXT)
+ $(tga_module_LINK) $(tga_module_OBJECTS) $(tga_module_LDADD) $(LIBS)
+trig.module$(EXEEXT): $(trig_module_OBJECTS) $(trig_module_DEPENDENCIES)
+ @rm -f trig.module$(EXEEXT)
+ $(trig_module_LINK) $(trig_module_OBJECTS) $(trig_module_LDADD) $(LIBS)
+commands/true_module-true.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+true.module$(EXEEXT): $(true_module_OBJECTS) $(true_module_DEPENDENCIES)
+ @rm -f true.module$(EXEEXT)
+ $(true_module_LINK) $(true_module_OBJECTS) $(true_module_LDADD) $(LIBS)
+fs/udf_module-udf.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+udf.module$(EXEEXT): $(udf_module_OBJECTS) $(udf_module_DEPENDENCIES)
+ @rm -f udf.module$(EXEEXT)
+ $(udf_module_LINK) $(udf_module_OBJECTS) $(udf_module_LDADD) $(LIBS)
+fs/ufs1_module-ufs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+ufs1.module$(EXEEXT): $(ufs1_module_OBJECTS) $(ufs1_module_DEPENDENCIES)
+ @rm -f ufs1.module$(EXEEXT)
+ $(ufs1_module_LINK) $(ufs1_module_OBJECTS) $(ufs1_module_LDADD) $(LIBS)
+fs/ufs2_module-ufs2.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+ufs2.module$(EXEEXT): $(ufs2_module_OBJECTS) $(ufs2_module_DEPENDENCIES)
+ @rm -f ufs2.module$(EXEEXT)
+ $(ufs2_module_LINK) $(ufs2_module_OBJECTS) $(ufs2_module_LDADD) $(LIBS)
+bus/usb/uhci_module-uhci.$(OBJEXT): bus/usb/$(am__dirstamp) \
+ bus/usb/$(DEPDIR)/$(am__dirstamp)
+uhci.module$(EXEEXT): $(uhci_module_OBJECTS) $(uhci_module_DEPENDENCIES)
+ @rm -f uhci.module$(EXEEXT)
+ $(uhci_module_LINK) $(uhci_module_OBJECTS) $(uhci_module_LDADD) $(LIBS)
+bus/usb/usb_module-usb.$(OBJEXT): bus/usb/$(am__dirstamp) \
+ bus/usb/$(DEPDIR)/$(am__dirstamp)
+bus/usb/usb_module-usbtrans.$(OBJEXT): bus/usb/$(am__dirstamp) \
+ bus/usb/$(DEPDIR)/$(am__dirstamp)
+bus/usb/usb_module-usbhub.$(OBJEXT): bus/usb/$(am__dirstamp) \
+ bus/usb/$(DEPDIR)/$(am__dirstamp)
+usb.module$(EXEEXT): $(usb_module_OBJECTS) $(usb_module_DEPENDENCIES)
+ @rm -f usb.module$(EXEEXT)
+ $(usb_module_LINK) $(usb_module_OBJECTS) $(usb_module_LDADD) $(LIBS)
+term/usb_keyboard_module-usb_keyboard.$(OBJEXT): term/$(am__dirstamp) \
+ term/$(DEPDIR)/$(am__dirstamp)
+usb_keyboard.module$(EXEEXT): $(usb_keyboard_module_OBJECTS) $(usb_keyboard_module_DEPENDENCIES)
+ @rm -f usb_keyboard.module$(EXEEXT)
+ $(usb_keyboard_module_LINK) $(usb_keyboard_module_OBJECTS) $(usb_keyboard_module_LDADD) $(LIBS)
+disk/usbms_module-usbms.$(OBJEXT): disk/$(am__dirstamp) \
+ disk/$(DEPDIR)/$(am__dirstamp)
+usbms.module$(EXEEXT): $(usbms_module_OBJECTS) $(usbms_module_DEPENDENCIES)
+ @rm -f usbms.module$(EXEEXT)
+ $(usbms_module_LINK) $(usbms_module_OBJECTS) $(usbms_module_LDADD) $(LIBS)
+bus/usb/serial/$(am__dirstamp):
+ @$(MKDIR_P) bus/usb/serial
+ @: > bus/usb/serial/$(am__dirstamp)
+bus/usb/serial/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) bus/usb/serial/$(DEPDIR)
+ @: > bus/usb/serial/$(DEPDIR)/$(am__dirstamp)
+bus/usb/serial/usbserial_common_module-common.$(OBJEXT): \
+ bus/usb/serial/$(am__dirstamp) \
+ bus/usb/serial/$(DEPDIR)/$(am__dirstamp)
+usbserial_common.module$(EXEEXT): $(usbserial_common_module_OBJECTS) $(usbserial_common_module_DEPENDENCIES)
+ @rm -f usbserial_common.module$(EXEEXT)
+ $(usbserial_common_module_LINK) $(usbserial_common_module_OBJECTS) $(usbserial_common_module_LDADD) $(LIBS)
+bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT): \
+ bus/usb/serial/$(am__dirstamp) \
+ bus/usb/serial/$(DEPDIR)/$(am__dirstamp)
+usbserial_ftdi.module$(EXEEXT): $(usbserial_ftdi_module_OBJECTS) $(usbserial_ftdi_module_DEPENDENCIES)
+ @rm -f usbserial_ftdi.module$(EXEEXT)
+ $(usbserial_ftdi_module_LINK) $(usbserial_ftdi_module_OBJECTS) $(usbserial_ftdi_module_LDADD) $(LIBS)
+bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT): \
+ bus/usb/serial/$(am__dirstamp) \
+ bus/usb/serial/$(DEPDIR)/$(am__dirstamp)
+usbserial_pl2303.module$(EXEEXT): $(usbserial_pl2303_module_OBJECTS) $(usbserial_pl2303_module_DEPENDENCIES)
+ @rm -f usbserial_pl2303.module$(EXEEXT)
+ $(usbserial_pl2303_module_LINK) $(usbserial_pl2303_module_OBJECTS) $(usbserial_pl2303_module_LDADD) $(LIBS)
+commands/usbtest_module-usbtest.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+usbtest.module$(EXEEXT): $(usbtest_module_OBJECTS) $(usbtest_module_DEPENDENCIES)
+ @rm -f usbtest.module$(EXEEXT)
+ $(usbtest_module_LINK) $(usbtest_module_OBJECTS) $(usbtest_module_LDADD) $(LIBS)
+video/i386/pc/$(am__dirstamp):
+ @$(MKDIR_P) video/i386/pc
+ @: > video/i386/pc/$(am__dirstamp)
+video/i386/pc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) video/i386/pc/$(DEPDIR)
+ @: > video/i386/pc/$(DEPDIR)/$(am__dirstamp)
+video/i386/pc/vbe_module-vbe.$(OBJEXT): video/i386/pc/$(am__dirstamp) \
+ video/i386/pc/$(DEPDIR)/$(am__dirstamp)
+vbe.module$(EXEEXT): $(vbe_module_OBJECTS) $(vbe_module_DEPENDENCIES)
+ @rm -f vbe.module$(EXEEXT)
+ $(vbe_module_LINK) $(vbe_module_OBJECTS) $(vbe_module_LDADD) $(LIBS)
+video/i386/pc/vga_module-vga.$(OBJEXT): video/i386/pc/$(am__dirstamp) \
+ video/i386/pc/$(DEPDIR)/$(am__dirstamp)
+vga.module$(EXEEXT): $(vga_module_OBJECTS) $(vga_module_DEPENDENCIES)
+ @rm -f vga.module$(EXEEXT)
+ $(vga_module_LINK) $(vga_module_OBJECTS) $(vga_module_LDADD) $(LIBS)
+term/i386/pc/vga_text_module-vga_text.$(OBJEXT): \
+ term/i386/pc/$(am__dirstamp) \
+ term/i386/pc/$(DEPDIR)/$(am__dirstamp)
+term/i386/vga_text_module-vga_common.$(OBJEXT): \
+ term/i386/$(am__dirstamp) term/i386/$(DEPDIR)/$(am__dirstamp)
+vga_text.module$(EXEEXT): $(vga_text_module_OBJECTS) $(vga_text_module_DEPENDENCIES)
+ @rm -f vga_text.module$(EXEEXT)
+ $(vga_text_module_LINK) $(vga_text_module_OBJECTS) $(vga_text_module_LDADD) $(LIBS)
+video/video_module-video.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+video.module$(EXEEXT): $(video_module_OBJECTS) $(video_module_DEPENDENCIES)
+ @rm -f video.module$(EXEEXT)
+ $(video_module_LINK) $(video_module_OBJECTS) $(video_module_LDADD) $(LIBS)
+video/video_bochs_module-bochs.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+video_bochs.module$(EXEEXT): $(video_bochs_module_OBJECTS) $(video_bochs_module_DEPENDENCIES)
+ @rm -f video_bochs.module$(EXEEXT)
+ $(video_bochs_module_LINK) $(video_bochs_module_OBJECTS) $(video_bochs_module_LDADD) $(LIBS)
+video/video_cirrus_module-cirrus.$(OBJEXT): video/$(am__dirstamp) \
+ video/$(DEPDIR)/$(am__dirstamp)
+video_cirrus.module$(EXEEXT): $(video_cirrus_module_OBJECTS) $(video_cirrus_module_DEPENDENCIES)
+ @rm -f video_cirrus.module$(EXEEXT)
+ $(video_cirrus_module_LINK) $(video_cirrus_module_OBJECTS) $(video_cirrus_module_LDADD) $(LIBS)
+video/fb/video_fb_module-video_fb.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video/fb/video_fb_module-fbblit.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video/fb/video_fb_module-fbfill.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video/fb/video_fb_module-fbutil.$(OBJEXT): video/fb/$(am__dirstamp) \
+ video/fb/$(DEPDIR)/$(am__dirstamp)
+video_fb.module$(EXEEXT): $(video_fb_module_OBJECTS) $(video_fb_module_DEPENDENCIES)
+ @rm -f video_fb.module$(EXEEXT)
+ $(video_fb_module_LINK) $(video_fb_module_OBJECTS) $(video_fb_module_LDADD) $(LIBS)
+commands/videoinfo_module-videoinfo.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+videoinfo.module$(EXEEXT): $(videoinfo_module_OBJECTS) $(videoinfo_module_DEPENDENCIES)
+ @rm -f videoinfo.module$(EXEEXT)
+ $(videoinfo_module_LINK) $(videoinfo_module_OBJECTS) $(videoinfo_module_LDADD) $(LIBS)
+commands/videotest_module-videotest.$(OBJEXT): \
+ commands/$(am__dirstamp) commands/$(DEPDIR)/$(am__dirstamp)
+videotest.module$(EXEEXT): $(videotest_module_OBJECTS) $(videotest_module_DEPENDENCIES)
+ @rm -f videotest.module$(EXEEXT)
+ $(videotest_module_LINK) $(videotest_module_OBJECTS) $(videotest_module_LDADD) $(LIBS)
+fs/xfs_module-xfs.$(OBJEXT): fs/$(am__dirstamp) \
+ fs/$(DEPDIR)/$(am__dirstamp)
+xfs.module$(EXEEXT): $(xfs_module_OBJECTS) $(xfs_module_DEPENDENCIES)
+ @rm -f xfs.module$(EXEEXT)
+ $(xfs_module_LINK) $(xfs_module_OBJECTS) $(xfs_module_LDADD) $(LIBS)
+loader/xnu_module-xnu_resume.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+loader/i386/xnu_module-xnu.$(OBJEXT): loader/i386/$(am__dirstamp) \
+ loader/i386/$(DEPDIR)/$(am__dirstamp)
+loader/xnu_module-macho32.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+loader/xnu_module-macho64.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+loader/xnu_module-macho.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+loader/xnu_module-xnu.$(OBJEXT): loader/$(am__dirstamp) \
+ loader/$(DEPDIR)/$(am__dirstamp)
+xnu.module$(EXEEXT): $(xnu_module_OBJECTS) $(xnu_module_DEPENDENCIES)
+ @rm -f xnu.module$(EXEEXT)
+ $(xnu_module_LINK) $(xnu_module_OBJECTS) $(xnu_module_LDADD) $(LIBS)
+commands/xnu_uuid_module-xnu_uuid.$(OBJEXT): commands/$(am__dirstamp) \
+ commands/$(DEPDIR)/$(am__dirstamp)
+xnu_uuid.module$(EXEEXT): $(xnu_uuid_module_OBJECTS) $(xnu_uuid_module_DEPENDENCIES)
+ @rm -f xnu_uuid.module$(EXEEXT)
+ $(xnu_uuid_module_LINK) $(xnu_uuid_module_OBJECTS) $(xnu_uuid_module_LDADD) $(LIBS)
+boot/mips/xz_decompress_image-startup_raw.$(OBJEXT): \
+ boot/mips/$(am__dirstamp) boot/mips/$(DEPDIR)/$(am__dirstamp)
+boot/decompressor/xz_decompress_image-minilib.$(OBJEXT): \
+ boot/decompressor/$(am__dirstamp) \
+ boot/decompressor/$(DEPDIR)/$(am__dirstamp)
+boot/decompressor/xz_decompress_image-xz.$(OBJEXT): \
+ boot/decompressor/$(am__dirstamp) \
+ boot/decompressor/$(DEPDIR)/$(am__dirstamp)
+lib/xzembed/$(am__dirstamp):
+ @$(MKDIR_P) lib/xzembed
+ @: > lib/xzembed/$(am__dirstamp)
+lib/xzembed/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/xzembed/$(DEPDIR)
+ @: > lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+lib/xzembed/xz_decompress_image-xz_dec_bcj.$(OBJEXT): \
+ lib/xzembed/$(am__dirstamp) \
+ lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+lib/xzembed/xz_decompress_image-xz_dec_lzma2.$(OBJEXT): \
+ lib/xzembed/$(am__dirstamp) \
+ lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+lib/xzembed/xz_decompress_image-xz_dec_stream.$(OBJEXT): \
+ lib/xzembed/$(am__dirstamp) \
+ lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+xz_decompress.image$(EXEEXT): $(xz_decompress_image_OBJECTS) $(xz_decompress_image_DEPENDENCIES)
+ @rm -f xz_decompress.image$(EXEEXT)
+ $(xz_decompress_image_LINK) $(xz_decompress_image_OBJECTS) $(xz_decompress_image_LDADD) $(LIBS)
+io/xzio_module-xzio.$(OBJEXT): io/$(am__dirstamp) \
+ io/$(DEPDIR)/$(am__dirstamp)
+lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT): \
+ lib/xzembed/$(am__dirstamp) \
+ lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT): \
+ lib/xzembed/$(am__dirstamp) \
+ lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT): \
+ lib/xzembed/$(am__dirstamp) \
+ lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+xzio.module$(EXEEXT): $(xzio_module_OBJECTS) $(xzio_module_DEPENDENCIES)
+ @rm -f xzio.module$(EXEEXT)
+ $(xzio_module_LINK) $(xzio_module_OBJECTS) $(xzio_module_LDADD) $(LIBS)
+fs/zfs/$(am__dirstamp):
+ @$(MKDIR_P) fs/zfs
+ @: > fs/zfs/$(am__dirstamp)
+fs/zfs/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) fs/zfs/$(DEPDIR)
+ @: > fs/zfs/$(DEPDIR)/$(am__dirstamp)
+fs/zfs/zfs_module-zfs.$(OBJEXT): fs/zfs/$(am__dirstamp) \
+ fs/zfs/$(DEPDIR)/$(am__dirstamp)
+fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT): fs/zfs/$(am__dirstamp) \
+ fs/zfs/$(DEPDIR)/$(am__dirstamp)
+fs/zfs/zfs_module-zfs_sha256.$(OBJEXT): fs/zfs/$(am__dirstamp) \
+ fs/zfs/$(DEPDIR)/$(am__dirstamp)
+fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT): fs/zfs/$(am__dirstamp) \
+ fs/zfs/$(DEPDIR)/$(am__dirstamp)
+zfs.module$(EXEEXT): $(zfs_module_OBJECTS) $(zfs_module_DEPENDENCIES)
+ @rm -f zfs.module$(EXEEXT)
+ $(zfs_module_LINK) $(zfs_module_OBJECTS) $(zfs_module_LDADD) $(LIBS)
+fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT): fs/zfs/$(am__dirstamp) \
+ fs/zfs/$(DEPDIR)/$(am__dirstamp)
+zfsinfo.module$(EXEEXT): $(zfsinfo_module_OBJECTS) $(zfsinfo_module_DEPENDENCIES)
+ @rm -f zfsinfo.module$(EXEEXT)
+ $(zfsinfo_module_LINK) $(zfsinfo_module_OBJECTS) $(zfsinfo_module_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-grubconfSCRIPTS: $(grubconf_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(grubconfdir)" || $(MKDIR_P) "$(DESTDIR)$(grubconfdir)"
+ @list='$(grubconf_SCRIPTS)'; test -n "$(grubconfdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(grubconfdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(grubconfdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-grubconfSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(grubconf_SCRIPTS)'; test -n "$(grubconfdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(grubconfdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(grubconfdir)" && rm -f $$files
+install-pkglibSCRIPTS: $(pkglib_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_SCRIPTS)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-pkglibSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_SCRIPTS)'; test -n "$(pkglibdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f boot/decompressor/none_decompress_image-none.$(OBJEXT)
+ -rm -f boot/decompressor/xz_decompress_image-minilib.$(OBJEXT)
+ -rm -f boot/decompressor/xz_decompress_image-xz.$(OBJEXT)
+ -rm -f boot/i386/pc/boot_image-boot.$(OBJEXT)
+ -rm -f boot/i386/pc/cdboot_image-cdboot.$(OBJEXT)
+ -rm -f boot/i386/pc/diskboot_image-diskboot.$(OBJEXT)
+ -rm -f boot/i386/pc/lnxboot_image-lnxboot.$(OBJEXT)
+ -rm -f boot/i386/pc/pxeboot_image-pxeboot.$(OBJEXT)
+ -rm -f boot/i386/qemu/boot_image-boot.$(OBJEXT)
+ -rm -f boot/mips/none_decompress_image-startup_raw.$(OBJEXT)
+ -rm -f boot/mips/xz_decompress_image-startup_raw.$(OBJEXT)
+ -rm -f boot/mips/yeeloong/fwstart_image-fwstart.$(OBJEXT)
+ -rm -f boot/sparc64/ieee1275/boot_image-boot.$(OBJEXT)
+ -rm -f boot/sparc64/ieee1275/diskboot_image-diskboot.$(OBJEXT)
+ -rm -f bus/cs5536_module-cs5536.$(OBJEXT)
+ -rm -f bus/emu/pci_module-pci.$(OBJEXT)
+ -rm -f bus/kernel_exec-bonito.$(OBJEXT)
+ -rm -f bus/kernel_exec-cs5536.$(OBJEXT)
+ -rm -f bus/kernel_exec-pci.$(OBJEXT)
+ -rm -f bus/pci_module-pci.$(OBJEXT)
+ -rm -f bus/usb/emu/libusb_module-usb.$(OBJEXT)
+ -rm -f bus/usb/ohci_module-ohci.$(OBJEXT)
+ -rm -f bus/usb/serial/usbserial_common_module-common.$(OBJEXT)
+ -rm -f bus/usb/serial/usbserial_ftdi_module-ftdi.$(OBJEXT)
+ -rm -f bus/usb/serial/usbserial_pl2303_module-pl2303.$(OBJEXT)
+ -rm -f bus/usb/uhci_module-uhci.$(OBJEXT)
+ -rm -f bus/usb/usb_module-usb.$(OBJEXT)
+ -rm -f bus/usb/usb_module-usbhub.$(OBJEXT)
+ -rm -f bus/usb/usb_module-usbtrans.$(OBJEXT)
+ -rm -f commands/acpi_module-acpi.$(OBJEXT)
+ -rm -f commands/blocklist_module-blocklist.$(OBJEXT)
+ -rm -f commands/boot_module-boot.$(OBJEXT)
+ -rm -f commands/cat_module-cat.$(OBJEXT)
+ -rm -f commands/cmp_module-cmp.$(OBJEXT)
+ -rm -f commands/configfile_module-configfile.$(OBJEXT)
+ -rm -f commands/date_module-date.$(OBJEXT)
+ -rm -f commands/echo_module-echo.$(OBJEXT)
+ -rm -f commands/efi/acpi_module-acpi.$(OBJEXT)
+ -rm -f commands/efi/fixvideo_module-fixvideo.$(OBJEXT)
+ -rm -f commands/efi/loadbios_module-loadbios.$(OBJEXT)
+ -rm -f commands/efi/lsefimmap_module-lsefimmap.$(OBJEXT)
+ -rm -f commands/efi/lsefisystab_module-lsefisystab.$(OBJEXT)
+ -rm -f commands/efi/lssal_module-lssal.$(OBJEXT)
+ -rm -f commands/extcmd_module-extcmd.$(OBJEXT)
+ -rm -f commands/gptsync_module-gptsync.$(OBJEXT)
+ -rm -f commands/halt_module-acpihalt.$(OBJEXT)
+ -rm -f commands/halt_module-halt.$(OBJEXT)
+ -rm -f commands/hashsum_module-hashsum.$(OBJEXT)
+ -rm -f commands/hdparm_module-hdparm.$(OBJEXT)
+ -rm -f commands/help_module-help.$(OBJEXT)
+ -rm -f commands/hexdump_module-hexdump.$(OBJEXT)
+ -rm -f commands/i386/cmostest_module-cmostest.$(OBJEXT)
+ -rm -f commands/i386/cpuid_module-cpuid.$(OBJEXT)
+ -rm -f commands/i386/pc/acpi_module-acpi.$(OBJEXT)
+ -rm -f commands/i386/pc/drivemap_module-drivemap.$(OBJEXT)
+ -rm -f commands/i386/pc/drivemap_module-drivemap_int13h.$(OBJEXT)
+ -rm -f commands/i386/pc/halt_module-halt.$(OBJEXT)
+ -rm -f commands/i386/pc/lsapm_module-lsapm.$(OBJEXT)
+ -rm -f commands/i386/pc/play_module-play.$(OBJEXT)
+ -rm -f commands/i386/pc/pxecmd_module-pxecmd.$(OBJEXT)
+ -rm -f commands/i386/pc/sendkey_module-sendkey.$(OBJEXT)
+ -rm -f commands/ieee1275/suspend_module-suspend.$(OBJEXT)
+ -rm -f commands/iorw_module-iorw.$(OBJEXT)
+ -rm -f commands/kernel_exec-boot.$(OBJEXT)
+ -rm -f commands/kernel_exec-extcmd.$(OBJEXT)
+ -rm -f commands/kernel_exec-keylayouts.$(OBJEXT)
+ -rm -f commands/keylayouts_module-keylayouts.$(OBJEXT)
+ -rm -f commands/keystatus_module-keystatus.$(OBJEXT)
+ -rm -f commands/legacycfg_module-legacycfg.$(OBJEXT)
+ -rm -f commands/loadenv_module-loadenv.$(OBJEXT)
+ -rm -f commands/ls_module-ls.$(OBJEXT)
+ -rm -f commands/lsacpi_module-lsacpi.$(OBJEXT)
+ -rm -f commands/lsmmap_module-lsmmap.$(OBJEXT)
+ -rm -f commands/lspci_module-lspci.$(OBJEXT)
+ -rm -f commands/memrw_module-memrw.$(OBJEXT)
+ -rm -f commands/minicmd_module-minicmd.$(OBJEXT)
+ -rm -f commands/mips/yeeloong/lsspd_module-lsspd.$(OBJEXT)
+ -rm -f commands/normal_module-menuentry.$(OBJEXT)
+ -rm -f commands/parttool_module-parttool.$(OBJEXT)
+ -rm -f commands/password_module-password.$(OBJEXT)
+ -rm -f commands/password_pbkdf2_module-password_pbkdf2.$(OBJEXT)
+ -rm -f commands/pci_module-lspci.$(OBJEXT)
+ -rm -f commands/probe_module-probe.$(OBJEXT)
+ -rm -f commands/read_module-read.$(OBJEXT)
+ -rm -f commands/reboot_module-reboot.$(OBJEXT)
+ -rm -f commands/regexp_module-regexp.$(OBJEXT)
+ -rm -f commands/regexp_module-wildcard.$(OBJEXT)
+ -rm -f commands/search_fs_file_module-search_file.$(OBJEXT)
+ -rm -f commands/search_fs_uuid_module-search_uuid.$(OBJEXT)
+ -rm -f commands/search_label_module-search_label.$(OBJEXT)
+ -rm -f commands/search_module-search_wrap.$(OBJEXT)
+ -rm -f commands/setpci_module-setpci.$(OBJEXT)
+ -rm -f commands/sleep_module-sleep.$(OBJEXT)
+ -rm -f commands/terminal_module-terminal.$(OBJEXT)
+ -rm -f commands/test_module-test.$(OBJEXT)
+ -rm -f commands/testload_module-testload.$(OBJEXT)
+ -rm -f commands/true_module-true.$(OBJEXT)
+ -rm -f commands/usbtest_module-usbtest.$(OBJEXT)
+ -rm -f commands/videoinfo_module-videoinfo.$(OBJEXT)
+ -rm -f commands/videotest_module-videotest.$(OBJEXT)
+ -rm -f commands/xnu_uuid_module-xnu_uuid.$(OBJEXT)
+ -rm -f disk/ata_module-ata.$(OBJEXT)
+ -rm -f disk/ata_pthru_module-ata_pthru.$(OBJEXT)
+ -rm -f disk/dm_nv_module-dmraid_nvidia.$(OBJEXT)
+ -rm -f disk/efi/kernel_exec-efidisk.$(OBJEXT)
+ -rm -f disk/i386/pc/biosdisk_module-biosdisk.$(OBJEXT)
+ -rm -f disk/ieee1275/kernel_exec-ofdisk.$(OBJEXT)
+ -rm -f disk/ieee1275/nand_module-nand.$(OBJEXT)
+ -rm -f disk/kernel_exec-host.$(OBJEXT)
+ -rm -f disk/loopback_module-loopback.$(OBJEXT)
+ -rm -f disk/lvm_module-lvm.$(OBJEXT)
+ -rm -f disk/mdraid09_module-mdraid_linux.$(OBJEXT)
+ -rm -f disk/mdraid1x_module-mdraid1x_linux.$(OBJEXT)
+ -rm -f disk/memdisk_module-memdisk.$(OBJEXT)
+ -rm -f disk/raid5rec_module-raid5_recover.$(OBJEXT)
+ -rm -f disk/raid6rec_module-raid6_recover.$(OBJEXT)
+ -rm -f disk/raid_module-raid.$(OBJEXT)
+ -rm -f disk/scsi_module-scsi.$(OBJEXT)
+ -rm -f disk/usbms_module-usbms.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-loadcore32.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-loadcore64.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-loadcore_common.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-main.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-mm.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-pnvram.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-prepare32.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-prepare64.$(OBJEXT)
+ -rm -f efiemu/efiemu_module-symbols.$(OBJEXT)
+ -rm -f efiemu/i386/efiemu_module-coredetect.$(OBJEXT)
+ -rm -f efiemu/i386/efiemu_module-loadcore32.$(OBJEXT)
+ -rm -f efiemu/i386/efiemu_module-loadcore64.$(OBJEXT)
+ -rm -f efiemu/i386/efiemu_module-nocfgtables.$(OBJEXT)
+ -rm -f efiemu/i386/pc/efiemu_module-cfgtables.$(OBJEXT)
+ -rm -f font/font_module-font.$(OBJEXT)
+ -rm -f font/font_module-font_cmd.$(OBJEXT)
+ -rm -f font/kernel_exec-font.$(OBJEXT)
+ -rm -f font/kernel_exec-font_cmd.$(OBJEXT)
+ -rm -f fs/affs_module-affs.$(OBJEXT)
+ -rm -f fs/afs_be_module-afs_be.$(OBJEXT)
+ -rm -f fs/afs_module-afs.$(OBJEXT)
+ -rm -f fs/befs_be_module-befs_be.$(OBJEXT)
+ -rm -f fs/befs_module-befs.$(OBJEXT)
+ -rm -f fs/btrfs_module-btrfs.$(OBJEXT)
+ -rm -f fs/cpio_module-cpio.$(OBJEXT)
+ -rm -f fs/ext2_module-ext2.$(OBJEXT)
+ -rm -f fs/fat_module-fat.$(OBJEXT)
+ -rm -f fs/fshelp_module-fshelp.$(OBJEXT)
+ -rm -f fs/hfs_module-hfs.$(OBJEXT)
+ -rm -f fs/hfsplus_module-hfsplus.$(OBJEXT)
+ -rm -f fs/i386/pc/pxe_module-pxe.$(OBJEXT)
+ -rm -f fs/iso9660_module-iso9660.$(OBJEXT)
+ -rm -f fs/jfs_module-jfs.$(OBJEXT)
+ -rm -f fs/minix2_module-minix2.$(OBJEXT)
+ -rm -f fs/minix_module-minix.$(OBJEXT)
+ -rm -f fs/nilfs2_module-nilfs2.$(OBJEXT)
+ -rm -f fs/ntfs_module-ntfs.$(OBJEXT)
+ -rm -f fs/ntfscomp_module-ntfscomp.$(OBJEXT)
+ -rm -f fs/reiserfs_module-reiserfs.$(OBJEXT)
+ -rm -f fs/sfs_module-sfs.$(OBJEXT)
+ -rm -f fs/tar_module-tar.$(OBJEXT)
+ -rm -f fs/udf_module-udf.$(OBJEXT)
+ -rm -f fs/ufs1_module-ufs.$(OBJEXT)
+ -rm -f fs/ufs2_module-ufs2.$(OBJEXT)
+ -rm -f fs/xfs_module-xfs.$(OBJEXT)
+ -rm -f fs/zfs/zfs_module-zfs.$(OBJEXT)
+ -rm -f fs/zfs/zfs_module-zfs_fletcher.$(OBJEXT)
+ -rm -f fs/zfs/zfs_module-zfs_lzjb.$(OBJEXT)
+ -rm -f fs/zfs/zfs_module-zfs_sha256.$(OBJEXT)
+ -rm -f fs/zfs/zfsinfo_module-zfsinfo.$(OBJEXT)
+ -rm -f gettext/gettext_module-gettext.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-font.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gfxmenu.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_box.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_canvas.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_circular_progress.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_image.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_label.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_list.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_progress_bar.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_string_util.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-gui_util.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-icon_manager.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-model.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-named_colors.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-theme_loader.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-view.$(OBJEXT)
+ -rm -f gfxmenu/gfxmenu_module-widget-box.$(OBJEXT)
+ -rm -f gnulib/kernel_exec-error.$(OBJEXT)
+ -rm -f gnulib/kernel_exec-progname.$(OBJEXT)
+ -rm -f gnulib/libgnulib_a-regex.$(OBJEXT)
+ -rm -f hello/hello_module-hello.$(OBJEXT)
+ -rm -f hook/datehook_module-datehook.$(OBJEXT)
+ -rm -f io/bufio_module-bufio.$(OBJEXT)
+ -rm -f io/gzio_module-gzio.$(OBJEXT)
+ -rm -f io/kernel_exec-bufio.$(OBJEXT)
+ -rm -f io/xzio_module-xzio.$(OBJEXT)
+ -rm -f kern/efi/kernel_exec-efi.$(OBJEXT)
+ -rm -f kern/efi/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/efi/kernel_exec-mm.$(OBJEXT)
+ -rm -f kern/elf_module-elf.$(OBJEXT)
+ -rm -f kern/emu/grub_emu-full.$(OBJEXT)
+ -rm -f kern/emu/grub_emu_lite-lite.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-cache.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-console.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-getroot.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-hostdisk.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-hostfs.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-main.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-misc.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-mm.$(OBJEXT)
+ -rm -f kern/emu/kernel_exec-time.$(OBJEXT)
+ -rm -f kern/generic/kernel_exec-millisleep.$(OBJEXT)
+ -rm -f kern/generic/kernel_exec-rtc_get_time_ms.$(OBJEXT)
+ -rm -f kern/i386/coreboot/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/i386/coreboot/kernel_exec-mmap.$(OBJEXT)
+ -rm -f kern/i386/coreboot/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/i386/efi/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/i386/efi/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/i386/ieee1275/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/i386/kernel_exec-dl.$(OBJEXT)
+ -rm -f kern/i386/kernel_exec-multiboot_mmap.$(OBJEXT)
+ -rm -f kern/i386/kernel_exec-pit.$(OBJEXT)
+ -rm -f kern/i386/kernel_exec-tsc.$(OBJEXT)
+ -rm -f kern/i386/pc/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/i386/pc/kernel_exec-mmap.$(OBJEXT)
+ -rm -f kern/i386/pc/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/i386/qemu/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/i386/qemu/kernel_exec-mmap.$(OBJEXT)
+ -rm -f kern/i386/qemu/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/ieee1275/kernel_exec-cmain.$(OBJEXT)
+ -rm -f kern/ieee1275/kernel_exec-ieee1275.$(OBJEXT)
+ -rm -f kern/ieee1275/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/ieee1275/kernel_exec-mmap.$(OBJEXT)
+ -rm -f kern/ieee1275/kernel_exec-openfw.$(OBJEXT)
+ -rm -f kern/kernel_exec-command.$(OBJEXT)
+ -rm -f kern/kernel_exec-corecmd.$(OBJEXT)
+ -rm -f kern/kernel_exec-device.$(OBJEXT)
+ -rm -f kern/kernel_exec-disk.$(OBJEXT)
+ -rm -f kern/kernel_exec-dl.$(OBJEXT)
+ -rm -f kern/kernel_exec-env.$(OBJEXT)
+ -rm -f kern/kernel_exec-err.$(OBJEXT)
+ -rm -f kern/kernel_exec-file.$(OBJEXT)
+ -rm -f kern/kernel_exec-fs.$(OBJEXT)
+ -rm -f kern/kernel_exec-list.$(OBJEXT)
+ -rm -f kern/kernel_exec-main.$(OBJEXT)
+ -rm -f kern/kernel_exec-misc.$(OBJEXT)
+ -rm -f kern/kernel_exec-mm.$(OBJEXT)
+ -rm -f kern/kernel_exec-parser.$(OBJEXT)
+ -rm -f kern/kernel_exec-partition.$(OBJEXT)
+ -rm -f kern/kernel_exec-rescue_parser.$(OBJEXT)
+ -rm -f kern/kernel_exec-rescue_reader.$(OBJEXT)
+ -rm -f kern/kernel_exec-term.$(OBJEXT)
+ -rm -f kern/kernel_exec-time.$(OBJEXT)
+ -rm -f kern/mips/kernel_exec-cache.$(OBJEXT)
+ -rm -f kern/mips/kernel_exec-dl.$(OBJEXT)
+ -rm -f kern/mips/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/mips/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/mips/yeeloong/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/powerpc/ieee1275/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/powerpc/kernel_exec-cache.$(OBJEXT)
+ -rm -f kern/powerpc/kernel_exec-dl.$(OBJEXT)
+ -rm -f kern/sparc64/ieee1275/kernel_exec-crt0.$(OBJEXT)
+ -rm -f kern/sparc64/ieee1275/kernel_exec-ieee1275.$(OBJEXT)
+ -rm -f kern/sparc64/ieee1275/kernel_exec-init.$(OBJEXT)
+ -rm -f kern/sparc64/kernel_exec-cache.$(OBJEXT)
+ -rm -f kern/sparc64/kernel_exec-dl.$(OBJEXT)
+ -rm -f kern/x86_64/efi/kernel_exec-callwrap.$(OBJEXT)
+ -rm -f kern/x86_64/efi/kernel_exec-startup.$(OBJEXT)
+ -rm -f kern/x86_64/kernel_exec-dl.$(OBJEXT)
+ -rm -f lib/btrfs_module-crc.$(OBJEXT)
+ -rm -f lib/crypto_module-crypto.$(OBJEXT)
+ -rm -f lib/datetime_module-cmos_datetime.$(OBJEXT)
+ -rm -f lib/efi/datetime_module-datetime.$(OBJEXT)
+ -rm -f lib/efi/halt_module-halt.$(OBJEXT)
+ -rm -f lib/efi/relocator_module-relocator.$(OBJEXT)
+ -rm -f lib/emu/halt_module-halt.$(OBJEXT)
+ -rm -f lib/extcmd_module-arg.$(OBJEXT)
+ -rm -f lib/hdparm_module-hexdump.$(OBJEXT)
+ -rm -f lib/hexdump_module-hexdump.$(OBJEXT)
+ -rm -f lib/i386/halt_module-halt.$(OBJEXT)
+ -rm -f lib/i386/pc/boot_module-biosnum.$(OBJEXT)
+ -rm -f lib/i386/pc/legacycfg_module-vesa_modes_table.$(OBJEXT)
+ -rm -f lib/i386/pc/linux_module-vesa_modes_table.$(OBJEXT)
+ -rm -f lib/i386/relocator_module-relocator.$(OBJEXT)
+ -rm -f lib/i386/relocator_module-relocator16.$(OBJEXT)
+ -rm -f lib/i386/relocator_module-relocator32.$(OBJEXT)
+ -rm -f lib/i386/relocator_module-relocator64.$(OBJEXT)
+ -rm -f lib/i386/relocator_module-relocator_asm.$(OBJEXT)
+ -rm -f lib/ieee1275/datetime_module-datetime.$(OBJEXT)
+ -rm -f lib/ieee1275/halt_module-halt.$(OBJEXT)
+ -rm -f lib/ieee1275/relocator_module-relocator.$(OBJEXT)
+ -rm -f lib/kernel_exec-arg.$(OBJEXT)
+ -rm -f lib/legacycfg_module-legacy_parse.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_crc_module-crc.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_des_module-des.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_md4_module-md4.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_md5_module-md5.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_seed_module-seed.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.$(OBJEXT)
+ -rm -f lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.$(OBJEXT)
+ -rm -f lib/linux16_module-cmdline.$(OBJEXT)
+ -rm -f lib/linux_module-cmdline.$(OBJEXT)
+ -rm -f lib/loadenv_module-envblk.$(OBJEXT)
+ -rm -f lib/mips/relocator_module-relocator.$(OBJEXT)
+ -rm -f lib/mips/relocator_module-relocator_asm.$(OBJEXT)
+ -rm -f lib/pbkdf2_module-pbkdf2.$(OBJEXT)
+ -rm -f lib/powerpc/relocator_module-relocator.$(OBJEXT)
+ -rm -f lib/powerpc/relocator_module-relocator_asm.$(OBJEXT)
+ -rm -f lib/relocator_module-relocator.$(OBJEXT)
+ -rm -f lib/setjmp_module-setjmp.$(OBJEXT)
+ -rm -f lib/x86_64/relocator_module-relocator_asm.$(OBJEXT)
+ -rm -f lib/xzembed/xz_decompress_image-xz_dec_bcj.$(OBJEXT)
+ -rm -f lib/xzembed/xz_decompress_image-xz_dec_lzma2.$(OBJEXT)
+ -rm -f lib/xzembed/xz_decompress_image-xz_dec_stream.$(OBJEXT)
+ -rm -f lib/xzembed/xzio_module-xz_dec_bcj.$(OBJEXT)
+ -rm -f lib/xzembed/xzio_module-xz_dec_lzma2.$(OBJEXT)
+ -rm -f lib/xzembed/xzio_module-xz_dec_stream.$(OBJEXT)
+ -rm -f loader/aout_module-aout.$(OBJEXT)
+ -rm -f loader/efi/appleldr_module-appleloader.$(OBJEXT)
+ -rm -f loader/efi/chain_module-chainloader.$(OBJEXT)
+ -rm -f loader/i386/bsd_module-bsd.$(OBJEXT)
+ -rm -f loader/i386/bsd_module-bsd32.$(OBJEXT)
+ -rm -f loader/i386/bsd_module-bsd64.$(OBJEXT)
+ -rm -f loader/i386/linux_module-linux.$(OBJEXT)
+ -rm -f loader/i386/multiboot_module-multiboot_mbi.$(OBJEXT)
+ -rm -f loader/i386/pc/chain_module-chainloader.$(OBJEXT)
+ -rm -f loader/i386/pc/linux16_module-linux.$(OBJEXT)
+ -rm -f loader/i386/pc/ntldr_module-ntldr.$(OBJEXT)
+ -rm -f loader/i386/xnu_module-xnu.$(OBJEXT)
+ -rm -f loader/mips/linux_module-linux.$(OBJEXT)
+ -rm -f loader/multiboot2_module-multiboot.$(OBJEXT)
+ -rm -f loader/multiboot2_module-multiboot_mbi2.$(OBJEXT)
+ -rm -f loader/multiboot_module-multiboot.$(OBJEXT)
+ -rm -f loader/powerpc/ieee1275/linux_module-linux.$(OBJEXT)
+ -rm -f loader/sparc64/ieee1275/linux_module-linux.$(OBJEXT)
+ -rm -f loader/xnu_module-macho.$(OBJEXT)
+ -rm -f loader/xnu_module-macho32.$(OBJEXT)
+ -rm -f loader/xnu_module-macho64.$(OBJEXT)
+ -rm -f loader/xnu_module-xnu.$(OBJEXT)
+ -rm -f loader/xnu_module-xnu_resume.$(OBJEXT)
+ -rm -f mmap/efi/mmap_module-mmap.$(OBJEXT)
+ -rm -f mmap/i386/mmap_module-mmap.$(OBJEXT)
+ -rm -f mmap/i386/mmap_module-uppermem.$(OBJEXT)
+ -rm -f mmap/i386/pc/mmap_module-mmap.$(OBJEXT)
+ -rm -f mmap/i386/pc/mmap_module-mmap_helper.$(OBJEXT)
+ -rm -f mmap/mips/yeeloong/mmap_module-uppermem.$(OBJEXT)
+ -rm -f mmap/mmap_module-mmap.$(OBJEXT)
+ -rm -f normal/normal_module-auth.$(OBJEXT)
+ -rm -f normal/normal_module-autofs.$(OBJEXT)
+ -rm -f normal/normal_module-charset.$(OBJEXT)
+ -rm -f normal/normal_module-cmdline.$(OBJEXT)
+ -rm -f normal/normal_module-color.$(OBJEXT)
+ -rm -f normal/normal_module-completion.$(OBJEXT)
+ -rm -f normal/normal_module-context.$(OBJEXT)
+ -rm -f normal/normal_module-crypto.$(OBJEXT)
+ -rm -f normal/normal_module-datetime.$(OBJEXT)
+ -rm -f normal/normal_module-dyncmd.$(OBJEXT)
+ -rm -f normal/normal_module-main.$(OBJEXT)
+ -rm -f normal/normal_module-menu.$(OBJEXT)
+ -rm -f normal/normal_module-menu_entry.$(OBJEXT)
+ -rm -f normal/normal_module-menu_text.$(OBJEXT)
+ -rm -f normal/normal_module-misc.$(OBJEXT)
+ -rm -f normal/normal_module-term.$(OBJEXT)
+ -rm -f partmap/part_acorn_module-acorn.$(OBJEXT)
+ -rm -f partmap/part_amiga_module-amiga.$(OBJEXT)
+ -rm -f partmap/part_apple_module-apple.$(OBJEXT)
+ -rm -f partmap/part_bsd_module-bsdlabel.$(OBJEXT)
+ -rm -f partmap/part_gpt_module-gpt.$(OBJEXT)
+ -rm -f partmap/part_msdos_module-msdos.$(OBJEXT)
+ -rm -f partmap/part_sun_module-sun.$(OBJEXT)
+ -rm -f partmap/part_sunpc_module-sunpc.$(OBJEXT)
+ -rm -f parttool/msdospart_module-msdospart.$(OBJEXT)
+ -rm -f script/normal_module-argv.$(OBJEXT)
+ -rm -f script/normal_module-execute.$(OBJEXT)
+ -rm -f script/normal_module-function.$(OBJEXT)
+ -rm -f script/normal_module-lexer.$(OBJEXT)
+ -rm -f script/normal_module-main.$(OBJEXT)
+ -rm -f script/normal_module-script.$(OBJEXT)
+ -rm -f term/at_keyboard_module-at_keyboard.$(OBJEXT)
+ -rm -f term/efi/kernel_exec-console.$(OBJEXT)
+ -rm -f term/gfxterm_module-gfxterm.$(OBJEXT)
+ -rm -f term/i386/kernel_exec-vga_common.$(OBJEXT)
+ -rm -f term/i386/pc/kernel_exec-console.$(OBJEXT)
+ -rm -f term/i386/pc/kernel_exec-vga_text.$(OBJEXT)
+ -rm -f term/i386/pc/vga_text_module-vga_text.$(OBJEXT)
+ -rm -f term/i386/vga_text_module-vga_common.$(OBJEXT)
+ -rm -f term/ieee1275/kernel_exec-ofconsole.$(OBJEXT)
+ -rm -f term/kernel_exec-at_keyboard.$(OBJEXT)
+ -rm -f term/kernel_exec-gfxterm.$(OBJEXT)
+ -rm -f term/kernel_exec-ns8250.$(OBJEXT)
+ -rm -f term/kernel_exec-serial.$(OBJEXT)
+ -rm -f term/kernel_exec-terminfo.$(OBJEXT)
+ -rm -f term/kernel_exec-tparm.$(OBJEXT)
+ -rm -f term/serial_module-ns8250.$(OBJEXT)
+ -rm -f term/serial_module-serial.$(OBJEXT)
+ -rm -f term/terminfo_module-terminfo.$(OBJEXT)
+ -rm -f term/terminfo_module-tparm.$(OBJEXT)
+ -rm -f term/usb_keyboard_module-usb_keyboard.$(OBJEXT)
+ -rm -f tests/example_functional_test_module-example_functional_test.$(OBJEXT)
+ -rm -f tests/lib/functional_test_module-functional_test.$(OBJEXT)
+ -rm -f tests/lib/functional_test_module-test.$(OBJEXT)
+ -rm -f tests/test_blockarg_module-test_blockarg.$(OBJEXT)
+ -rm -f video/bitmap_module-bitmap.$(OBJEXT)
+ -rm -f video/bitmap_scale_module-bitmap_scale.$(OBJEXT)
+ -rm -f video/efi_gop_module-efi_gop.$(OBJEXT)
+ -rm -f video/efi_uga_module-efi_uga.$(OBJEXT)
+ -rm -f video/emu/sdl_module-sdl.$(OBJEXT)
+ -rm -f video/fb/kernel_exec-fbblit.$(OBJEXT)
+ -rm -f video/fb/kernel_exec-fbfill.$(OBJEXT)
+ -rm -f video/fb/kernel_exec-fbutil.$(OBJEXT)
+ -rm -f video/fb/kernel_exec-video_fb.$(OBJEXT)
+ -rm -f video/fb/video_fb_module-fbblit.$(OBJEXT)
+ -rm -f video/fb/video_fb_module-fbfill.$(OBJEXT)
+ -rm -f video/fb/video_fb_module-fbutil.$(OBJEXT)
+ -rm -f video/fb/video_fb_module-video_fb.$(OBJEXT)
+ -rm -f video/i386/pc/vbe_module-vbe.$(OBJEXT)
+ -rm -f video/i386/pc/vga_module-vga.$(OBJEXT)
+ -rm -f video/ieee1275_fb_module-ieee1275.$(OBJEXT)
+ -rm -f video/kernel_exec-bitmap.$(OBJEXT)
+ -rm -f video/kernel_exec-bitmap_scale.$(OBJEXT)
+ -rm -f video/kernel_exec-sm712.$(OBJEXT)
+ -rm -f video/kernel_exec-video.$(OBJEXT)
+ -rm -f video/readers/jpeg_module-jpeg.$(OBJEXT)
+ -rm -f video/readers/png_module-png.$(OBJEXT)
+ -rm -f video/readers/tga_module-tga.$(OBJEXT)
+ -rm -f video/video_bochs_module-bochs.$(OBJEXT)
+ -rm -f video/video_cirrus_module-cirrus.$(OBJEXT)
+ -rm -f video/video_module-video.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grub_emu-grub_emu_init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grub_emu_lite-symlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kernel_exec-symlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/normal_module-grub_script.tab.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/normal_module-grub_script.yy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/normal_module-unidata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trig_module-trigtables.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/decompressor/$(DEPDIR)/none_decompress_image-none.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/decompressor/$(DEPDIR)/xz_decompress_image-minilib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/decompressor/$(DEPDIR)/xz_decompress_image-xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/i386/pc/$(DEPDIR)/boot_image-boot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/i386/pc/$(DEPDIR)/cdboot_image-cdboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/i386/pc/$(DEPDIR)/diskboot_image-diskboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/i386/pc/$(DEPDIR)/lnxboot_image-lnxboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/i386/pc/$(DEPDIR)/pxeboot_image-pxeboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/i386/qemu/$(DEPDIR)/boot_image-boot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/mips/$(DEPDIR)/none_decompress_image-startup_raw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/mips/$(DEPDIR)/xz_decompress_image-startup_raw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/mips/yeeloong/$(DEPDIR)/fwstart_image-fwstart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/sparc64/ieee1275/$(DEPDIR)/boot_image-boot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@boot/sparc64/ieee1275/$(DEPDIR)/diskboot_image-diskboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/$(DEPDIR)/cs5536_module-cs5536.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/$(DEPDIR)/kernel_exec-bonito.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/$(DEPDIR)/kernel_exec-cs5536.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/$(DEPDIR)/kernel_exec-pci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/$(DEPDIR)/pci_module-pci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/emu/$(DEPDIR)/pci_module-pci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/$(DEPDIR)/ohci_module-ohci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/$(DEPDIR)/uhci_module-uhci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/$(DEPDIR)/usb_module-usb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/$(DEPDIR)/usb_module-usbhub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/$(DEPDIR)/usb_module-usbtrans.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/emu/$(DEPDIR)/libusb_module-usb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/serial/$(DEPDIR)/usbserial_common_module-common.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/serial/$(DEPDIR)/usbserial_ftdi_module-ftdi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@bus/usb/serial/$(DEPDIR)/usbserial_pl2303_module-pl2303.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/acpi_module-acpi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/blocklist_module-blocklist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/boot_module-boot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/cat_module-cat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/cmp_module-cmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/configfile_module-configfile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/date_module-date.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/echo_module-echo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/extcmd_module-extcmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/gptsync_module-gptsync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/halt_module-acpihalt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/halt_module-halt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/hashsum_module-hashsum.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/hdparm_module-hdparm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/help_module-help.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/hexdump_module-hexdump.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/iorw_module-iorw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/kernel_exec-boot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/kernel_exec-extcmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/kernel_exec-keylayouts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/keylayouts_module-keylayouts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/keystatus_module-keystatus.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/legacycfg_module-legacycfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/loadenv_module-loadenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/ls_module-ls.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/lsacpi_module-lsacpi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/lsmmap_module-lsmmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/lspci_module-lspci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/memrw_module-memrw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/minicmd_module-minicmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/normal_module-menuentry.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/parttool_module-parttool.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/password_module-password.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/password_pbkdf2_module-password_pbkdf2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/pci_module-lspci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/probe_module-probe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/read_module-read.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/reboot_module-reboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/regexp_module-regexp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/regexp_module-wildcard.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/search_fs_file_module-search_file.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/search_fs_uuid_module-search_uuid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/search_label_module-search_label.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/search_module-search_wrap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/setpci_module-setpci.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/sleep_module-sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/terminal_module-terminal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/test_module-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/testload_module-testload.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/true_module-true.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/usbtest_module-usbtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/videoinfo_module-videoinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/videotest_module-videotest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/$(DEPDIR)/xnu_uuid_module-xnu_uuid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/efi/$(DEPDIR)/acpi_module-acpi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/efi/$(DEPDIR)/fixvideo_module-fixvideo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/efi/$(DEPDIR)/loadbios_module-loadbios.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/efi/$(DEPDIR)/lsefimmap_module-lsefimmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/efi/$(DEPDIR)/lsefisystab_module-lsefisystab.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/efi/$(DEPDIR)/lssal_module-lssal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/$(DEPDIR)/cmostest_module-cmostest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/$(DEPDIR)/cpuid_module-cpuid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/acpi_module-acpi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap_int13h.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/halt_module-halt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/lsapm_module-lsapm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/play_module-play.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/pxecmd_module-pxecmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/i386/pc/$(DEPDIR)/sendkey_module-sendkey.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/ieee1275/$(DEPDIR)/suspend_module-suspend.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@commands/mips/yeeloong/$(DEPDIR)/lsspd_module-lsspd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/ata_module-ata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/ata_pthru_module-ata_pthru.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/dm_nv_module-dmraid_nvidia.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/kernel_exec-host.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/loopback_module-loopback.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/lvm_module-lvm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/mdraid09_module-mdraid_linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/mdraid1x_module-mdraid1x_linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/memdisk_module-memdisk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/raid5rec_module-raid5_recover.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/raid6rec_module-raid6_recover.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/raid_module-raid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/scsi_module-scsi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/$(DEPDIR)/usbms_module-usbms.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/efi/$(DEPDIR)/kernel_exec-efidisk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/i386/pc/$(DEPDIR)/biosdisk_module-biosdisk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/ieee1275/$(DEPDIR)/kernel_exec-ofdisk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@disk/ieee1275/$(DEPDIR)/nand_module-nand.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-loadcore32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-loadcore64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-loadcore_common.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-mm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-pnvram.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-prepare32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-prepare64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/$(DEPDIR)/efiemu_module-symbols.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/i386/$(DEPDIR)/efiemu_module-coredetect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/i386/$(DEPDIR)/efiemu_module-loadcore32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/i386/$(DEPDIR)/efiemu_module-loadcore64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/i386/$(DEPDIR)/efiemu_module-nocfgtables.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@efiemu/i386/pc/$(DEPDIR)/efiemu_module-cfgtables.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@font/$(DEPDIR)/font_module-font.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@font/$(DEPDIR)/font_module-font_cmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@font/$(DEPDIR)/kernel_exec-font.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@font/$(DEPDIR)/kernel_exec-font_cmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/affs_module-affs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/afs_be_module-afs_be.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/afs_module-afs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/befs_be_module-befs_be.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/befs_module-befs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/btrfs_module-btrfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/cpio_module-cpio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/ext2_module-ext2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/fat_module-fat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/fshelp_module-fshelp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/hfs_module-hfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/hfsplus_module-hfsplus.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/iso9660_module-iso9660.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/jfs_module-jfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/minix2_module-minix2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/minix_module-minix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/nilfs2_module-nilfs2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/ntfs_module-ntfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/ntfscomp_module-ntfscomp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/reiserfs_module-reiserfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/sfs_module-sfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/tar_module-tar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/udf_module-udf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/ufs1_module-ufs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/ufs2_module-ufs2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/$(DEPDIR)/xfs_module-xfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/i386/pc/$(DEPDIR)/pxe_module-pxe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/zfs/$(DEPDIR)/zfs_module-zfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/zfs/$(DEPDIR)/zfs_module-zfs_fletcher.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/zfs/$(DEPDIR)/zfs_module-zfs_lzjb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/zfs/$(DEPDIR)/zfs_module-zfs_sha256.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@fs/zfs/$(DEPDIR)/zfsinfo_module-zfsinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gettext/$(DEPDIR)/gettext_module-gettext.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-font.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gfxmenu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_box.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_canvas.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_circular_progress.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_image.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_label.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_progress_bar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_string_util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-gui_util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-icon_manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-model.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-named_colors.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-theme_loader.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-view.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gfxmenu/$(DEPDIR)/gfxmenu_module-widget-box.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnulib/$(DEPDIR)/kernel_exec-error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnulib/$(DEPDIR)/kernel_exec-progname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnulib/$(DEPDIR)/libgnulib_a-regex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@hello/$(DEPDIR)/hello_module-hello.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@hook/$(DEPDIR)/datehook_module-datehook.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/bufio_module-bufio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/gzio_module-gzio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/kernel_exec-bufio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@io/$(DEPDIR)/xzio_module-xzio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/elf_module-elf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-command.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-corecmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-device.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-disk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-dl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-env.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-err.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-file.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-fs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-misc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-mm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-partition.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-rescue_parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-rescue_reader.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-term.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/$(DEPDIR)/kernel_exec-time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/efi/$(DEPDIR)/kernel_exec-efi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/efi/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/efi/$(DEPDIR)/kernel_exec-mm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/grub_emu-full.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/grub_emu_lite-lite.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-cache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-console.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-getroot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-hostdisk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-hostfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-misc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-mm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/emu/$(DEPDIR)/kernel_exec-time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/generic/$(DEPDIR)/kernel_exec-millisleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/generic/$(DEPDIR)/kernel_exec-rtc_get_time_ms.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/$(DEPDIR)/kernel_exec-dl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/$(DEPDIR)/kernel_exec-multiboot_mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/$(DEPDIR)/kernel_exec-pit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/$(DEPDIR)/kernel_exec-tsc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/coreboot/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/coreboot/$(DEPDIR)/kernel_exec-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/coreboot/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/efi/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/efi/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/ieee1275/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/pc/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/pc/$(DEPDIR)/kernel_exec-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/pc/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/qemu/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/qemu/$(DEPDIR)/kernel_exec-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/i386/qemu/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/ieee1275/$(DEPDIR)/kernel_exec-cmain.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/ieee1275/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/ieee1275/$(DEPDIR)/kernel_exec-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/ieee1275/$(DEPDIR)/kernel_exec-openfw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/mips/$(DEPDIR)/kernel_exec-cache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/mips/$(DEPDIR)/kernel_exec-dl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/mips/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/mips/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/mips/yeeloong/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/powerpc/$(DEPDIR)/kernel_exec-cache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/powerpc/$(DEPDIR)/kernel_exec-dl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/powerpc/ieee1275/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/sparc64/$(DEPDIR)/kernel_exec-cache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/sparc64/$(DEPDIR)/kernel_exec-dl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-crt0.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/x86_64/$(DEPDIR)/kernel_exec-dl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/x86_64/efi/$(DEPDIR)/kernel_exec-callwrap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@kern/x86_64/efi/$(DEPDIR)/kernel_exec-startup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/btrfs_module-crc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/crypto_module-crypto.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/datetime_module-cmos_datetime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/extcmd_module-arg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/hdparm_module-hexdump.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/hexdump_module-hexdump.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/kernel_exec-arg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/legacycfg_module-legacy_parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/linux16_module-cmdline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/linux_module-cmdline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/loadenv_module-envblk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/pbkdf2_module-pbkdf2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/relocator_module-relocator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/setjmp_module-setjmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/efi/$(DEPDIR)/datetime_module-datetime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/efi/$(DEPDIR)/halt_module-halt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/efi/$(DEPDIR)/relocator_module-relocator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/emu/$(DEPDIR)/halt_module-halt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/$(DEPDIR)/halt_module-halt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/$(DEPDIR)/relocator_module-relocator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/$(DEPDIR)/relocator_module-relocator16.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/$(DEPDIR)/relocator_module-relocator32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/$(DEPDIR)/relocator_module-relocator64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/$(DEPDIR)/relocator_module-relocator_asm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/pc/$(DEPDIR)/boot_module-biosnum.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/pc/$(DEPDIR)/legacycfg_module-vesa_modes_table.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/i386/pc/$(DEPDIR)/linux_module-vesa_modes_table.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/ieee1275/$(DEPDIR)/datetime_module-datetime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/ieee1275/$(DEPDIR)/halt_module-halt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/ieee1275/$(DEPDIR)/relocator_module-relocator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_arcfour_module-arcfour.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_blowfish_module-blowfish.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia-glue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_cast5_module-cast5.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_crc_module-crc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_des_module-des.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md4_module-md4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md5_module-md5.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rfc2268_module-rfc2268.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rijndael_module-rijndael.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rmd160_module-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_seed_module-seed.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_serpent_module-serpent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha1_module-sha1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha256_module-sha256.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha512_module-sha512.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_tiger_module-tiger.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_twofish_module-twofish.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_whirlpool_module-whirlpool.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/mips/$(DEPDIR)/relocator_module-relocator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/mips/$(DEPDIR)/relocator_module-relocator_asm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/powerpc/$(DEPDIR)/relocator_module-relocator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/powerpc/$(DEPDIR)/relocator_module-relocator_asm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/x86_64/$(DEPDIR)/relocator_module-relocator_asm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_bcj.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_lzma2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_bcj.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_lzma2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/aout_module-aout.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/multiboot2_module-multiboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/multiboot2_module-multiboot_mbi2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/multiboot_module-multiboot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/xnu_module-macho.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/xnu_module-macho32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/xnu_module-macho64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/xnu_module-xnu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/$(DEPDIR)/xnu_module-xnu_resume.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/efi/$(DEPDIR)/appleldr_module-appleloader.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/efi/$(DEPDIR)/chain_module-chainloader.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/$(DEPDIR)/bsd_module-bsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/$(DEPDIR)/bsd_module-bsd32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/$(DEPDIR)/bsd_module-bsd64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/$(DEPDIR)/linux_module-linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/$(DEPDIR)/multiboot_module-multiboot_mbi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/$(DEPDIR)/xnu_module-xnu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/pc/$(DEPDIR)/chain_module-chainloader.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/pc/$(DEPDIR)/linux16_module-linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/i386/pc/$(DEPDIR)/ntldr_module-ntldr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/mips/$(DEPDIR)/linux_module-linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/powerpc/ieee1275/$(DEPDIR)/linux_module-linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@loader/sparc64/ieee1275/$(DEPDIR)/linux_module-linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@mmap/$(DEPDIR)/mmap_module-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@mmap/efi/$(DEPDIR)/mmap_module-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@mmap/i386/$(DEPDIR)/mmap_module-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@mmap/i386/$(DEPDIR)/mmap_module-uppermem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@mmap/i386/pc/$(DEPDIR)/mmap_module-mmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@mmap/i386/pc/$(DEPDIR)/mmap_module-mmap_helper.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@mmap/mips/yeeloong/$(DEPDIR)/mmap_module-uppermem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-auth.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-autofs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-charset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-cmdline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-color.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-completion.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-context.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-crypto.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-datetime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-dyncmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-menu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-menu_entry.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-menu_text.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-misc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@normal/$(DEPDIR)/normal_module-term.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_acorn_module-acorn.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_amiga_module-amiga.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_apple_module-apple.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_bsd_module-bsdlabel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_gpt_module-gpt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_msdos_module-msdos.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_sun_module-sun.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@partmap/$(DEPDIR)/part_sunpc_module-sunpc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@parttool/$(DEPDIR)/msdospart_module-msdospart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@script/$(DEPDIR)/normal_module-argv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@script/$(DEPDIR)/normal_module-execute.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@script/$(DEPDIR)/normal_module-function.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@script/$(DEPDIR)/normal_module-lexer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@script/$(DEPDIR)/normal_module-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@script/$(DEPDIR)/normal_module-script.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/at_keyboard_module-at_keyboard.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/gfxterm_module-gfxterm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/kernel_exec-at_keyboard.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/kernel_exec-gfxterm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/kernel_exec-ns8250.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/kernel_exec-serial.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/kernel_exec-terminfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/kernel_exec-tparm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/serial_module-ns8250.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/serial_module-serial.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/terminfo_module-terminfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/terminfo_module-tparm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/$(DEPDIR)/usb_keyboard_module-usb_keyboard.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/efi/$(DEPDIR)/kernel_exec-console.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/i386/$(DEPDIR)/kernel_exec-vga_common.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/i386/$(DEPDIR)/vga_text_module-vga_common.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/i386/pc/$(DEPDIR)/kernel_exec-console.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/i386/pc/$(DEPDIR)/kernel_exec-vga_text.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/i386/pc/$(DEPDIR)/vga_text_module-vga_text.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@term/ieee1275/$(DEPDIR)/kernel_exec-ofconsole.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/example_functional_test_module-example_functional_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test_blockarg_module-test_blockarg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tests/lib/$(DEPDIR)/functional_test_module-functional_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tests/lib/$(DEPDIR)/functional_test_module-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/bitmap_module-bitmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/bitmap_scale_module-bitmap_scale.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/efi_gop_module-efi_gop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/efi_uga_module-efi_uga.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/ieee1275_fb_module-ieee1275.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/kernel_exec-bitmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/kernel_exec-bitmap_scale.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/kernel_exec-sm712.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/kernel_exec-video.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/video_bochs_module-bochs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/video_cirrus_module-cirrus.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/video_module-video.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/emu/$(DEPDIR)/sdl_module-sdl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/kernel_exec-fbblit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/kernel_exec-fbfill.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/kernel_exec-fbutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/kernel_exec-video_fb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/video_fb_module-fbblit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/video_fb_module-fbfill.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/video_fb_module-fbutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/fb/$(DEPDIR)/video_fb_module-video_fb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/i386/pc/$(DEPDIR)/vbe_module-vbe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/i386/pc/$(DEPDIR)/vga_module-vga.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/readers/$(DEPDIR)/jpeg_module-jpeg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/readers/$(DEPDIR)/png_module-png.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@video/readers/$(DEPDIR)/tga_module-tga.Po@am__quote@
+
+.S.o:
+@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+boot/i386/pc/boot_image-boot.o: boot/i386/pc/boot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/boot_image-boot.o -MD -MP -MF boot/i386/pc/$(DEPDIR)/boot_image-boot.Tpo -c -o boot/i386/pc/boot_image-boot.o `test -f 'boot/i386/pc/boot.S' || echo '$(srcdir)/'`boot/i386/pc/boot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/boot_image-boot.Tpo boot/i386/pc/$(DEPDIR)/boot_image-boot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/boot.S' object='boot/i386/pc/boot_image-boot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/boot_image-boot.o `test -f 'boot/i386/pc/boot.S' || echo '$(srcdir)/'`boot/i386/pc/boot.S
+
+boot/i386/pc/boot_image-boot.obj: boot/i386/pc/boot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/boot_image-boot.obj -MD -MP -MF boot/i386/pc/$(DEPDIR)/boot_image-boot.Tpo -c -o boot/i386/pc/boot_image-boot.obj `if test -f 'boot/i386/pc/boot.S'; then $(CYGPATH_W) 'boot/i386/pc/boot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/boot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/boot_image-boot.Tpo boot/i386/pc/$(DEPDIR)/boot_image-boot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/boot.S' object='boot/i386/pc/boot_image-boot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/boot_image-boot.obj `if test -f 'boot/i386/pc/boot.S'; then $(CYGPATH_W) 'boot/i386/pc/boot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/boot.S'; fi`
+
+boot/i386/qemu/boot_image-boot.o: boot/i386/qemu/boot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/qemu/boot_image-boot.o -MD -MP -MF boot/i386/qemu/$(DEPDIR)/boot_image-boot.Tpo -c -o boot/i386/qemu/boot_image-boot.o `test -f 'boot/i386/qemu/boot.S' || echo '$(srcdir)/'`boot/i386/qemu/boot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/qemu/$(DEPDIR)/boot_image-boot.Tpo boot/i386/qemu/$(DEPDIR)/boot_image-boot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/qemu/boot.S' object='boot/i386/qemu/boot_image-boot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/qemu/boot_image-boot.o `test -f 'boot/i386/qemu/boot.S' || echo '$(srcdir)/'`boot/i386/qemu/boot.S
+
+boot/i386/qemu/boot_image-boot.obj: boot/i386/qemu/boot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/qemu/boot_image-boot.obj -MD -MP -MF boot/i386/qemu/$(DEPDIR)/boot_image-boot.Tpo -c -o boot/i386/qemu/boot_image-boot.obj `if test -f 'boot/i386/qemu/boot.S'; then $(CYGPATH_W) 'boot/i386/qemu/boot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/qemu/boot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/qemu/$(DEPDIR)/boot_image-boot.Tpo boot/i386/qemu/$(DEPDIR)/boot_image-boot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/qemu/boot.S' object='boot/i386/qemu/boot_image-boot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/qemu/boot_image-boot.obj `if test -f 'boot/i386/qemu/boot.S'; then $(CYGPATH_W) 'boot/i386/qemu/boot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/qemu/boot.S'; fi`
+
+boot/sparc64/ieee1275/boot_image-boot.o: boot/sparc64/ieee1275/boot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/sparc64/ieee1275/boot_image-boot.o -MD -MP -MF boot/sparc64/ieee1275/$(DEPDIR)/boot_image-boot.Tpo -c -o boot/sparc64/ieee1275/boot_image-boot.o `test -f 'boot/sparc64/ieee1275/boot.S' || echo '$(srcdir)/'`boot/sparc64/ieee1275/boot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/sparc64/ieee1275/$(DEPDIR)/boot_image-boot.Tpo boot/sparc64/ieee1275/$(DEPDIR)/boot_image-boot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/sparc64/ieee1275/boot.S' object='boot/sparc64/ieee1275/boot_image-boot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/sparc64/ieee1275/boot_image-boot.o `test -f 'boot/sparc64/ieee1275/boot.S' || echo '$(srcdir)/'`boot/sparc64/ieee1275/boot.S
+
+boot/sparc64/ieee1275/boot_image-boot.obj: boot/sparc64/ieee1275/boot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/sparc64/ieee1275/boot_image-boot.obj -MD -MP -MF boot/sparc64/ieee1275/$(DEPDIR)/boot_image-boot.Tpo -c -o boot/sparc64/ieee1275/boot_image-boot.obj `if test -f 'boot/sparc64/ieee1275/boot.S'; then $(CYGPATH_W) 'boot/sparc64/ieee1275/boot.S'; else $(CYGPATH_W) '$(srcdir)/boot/sparc64/ieee1275/boot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/sparc64/ieee1275/$(DEPDIR)/boot_image-boot.Tpo boot/sparc64/ieee1275/$(DEPDIR)/boot_image-boot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/sparc64/ieee1275/boot.S' object='boot/sparc64/ieee1275/boot_image-boot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_image_CPPFLAGS) $(CPPFLAGS) $(boot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/sparc64/ieee1275/boot_image-boot.obj `if test -f 'boot/sparc64/ieee1275/boot.S'; then $(CYGPATH_W) 'boot/sparc64/ieee1275/boot.S'; else $(CYGPATH_W) '$(srcdir)/boot/sparc64/ieee1275/boot.S'; fi`
+
+boot/i386/pc/cdboot_image-cdboot.o: boot/i386/pc/cdboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdboot_image_CPPFLAGS) $(CPPFLAGS) $(cdboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/cdboot_image-cdboot.o -MD -MP -MF boot/i386/pc/$(DEPDIR)/cdboot_image-cdboot.Tpo -c -o boot/i386/pc/cdboot_image-cdboot.o `test -f 'boot/i386/pc/cdboot.S' || echo '$(srcdir)/'`boot/i386/pc/cdboot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/cdboot_image-cdboot.Tpo boot/i386/pc/$(DEPDIR)/cdboot_image-cdboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/cdboot.S' object='boot/i386/pc/cdboot_image-cdboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdboot_image_CPPFLAGS) $(CPPFLAGS) $(cdboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/cdboot_image-cdboot.o `test -f 'boot/i386/pc/cdboot.S' || echo '$(srcdir)/'`boot/i386/pc/cdboot.S
+
+boot/i386/pc/cdboot_image-cdboot.obj: boot/i386/pc/cdboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdboot_image_CPPFLAGS) $(CPPFLAGS) $(cdboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/cdboot_image-cdboot.obj -MD -MP -MF boot/i386/pc/$(DEPDIR)/cdboot_image-cdboot.Tpo -c -o boot/i386/pc/cdboot_image-cdboot.obj `if test -f 'boot/i386/pc/cdboot.S'; then $(CYGPATH_W) 'boot/i386/pc/cdboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/cdboot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/cdboot_image-cdboot.Tpo boot/i386/pc/$(DEPDIR)/cdboot_image-cdboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/cdboot.S' object='boot/i386/pc/cdboot_image-cdboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cdboot_image_CPPFLAGS) $(CPPFLAGS) $(cdboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/cdboot_image-cdboot.obj `if test -f 'boot/i386/pc/cdboot.S'; then $(CYGPATH_W) 'boot/i386/pc/cdboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/cdboot.S'; fi`
+
+boot/i386/pc/diskboot_image-diskboot.o: boot/i386/pc/diskboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/diskboot_image-diskboot.o -MD -MP -MF boot/i386/pc/$(DEPDIR)/diskboot_image-diskboot.Tpo -c -o boot/i386/pc/diskboot_image-diskboot.o `test -f 'boot/i386/pc/diskboot.S' || echo '$(srcdir)/'`boot/i386/pc/diskboot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/diskboot_image-diskboot.Tpo boot/i386/pc/$(DEPDIR)/diskboot_image-diskboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/diskboot.S' object='boot/i386/pc/diskboot_image-diskboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/diskboot_image-diskboot.o `test -f 'boot/i386/pc/diskboot.S' || echo '$(srcdir)/'`boot/i386/pc/diskboot.S
+
+boot/i386/pc/diskboot_image-diskboot.obj: boot/i386/pc/diskboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/diskboot_image-diskboot.obj -MD -MP -MF boot/i386/pc/$(DEPDIR)/diskboot_image-diskboot.Tpo -c -o boot/i386/pc/diskboot_image-diskboot.obj `if test -f 'boot/i386/pc/diskboot.S'; then $(CYGPATH_W) 'boot/i386/pc/diskboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/diskboot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/diskboot_image-diskboot.Tpo boot/i386/pc/$(DEPDIR)/diskboot_image-diskboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/diskboot.S' object='boot/i386/pc/diskboot_image-diskboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/diskboot_image-diskboot.obj `if test -f 'boot/i386/pc/diskboot.S'; then $(CYGPATH_W) 'boot/i386/pc/diskboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/diskboot.S'; fi`
+
+boot/sparc64/ieee1275/diskboot_image-diskboot.o: boot/sparc64/ieee1275/diskboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/sparc64/ieee1275/diskboot_image-diskboot.o -MD -MP -MF boot/sparc64/ieee1275/$(DEPDIR)/diskboot_image-diskboot.Tpo -c -o boot/sparc64/ieee1275/diskboot_image-diskboot.o `test -f 'boot/sparc64/ieee1275/diskboot.S' || echo '$(srcdir)/'`boot/sparc64/ieee1275/diskboot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/sparc64/ieee1275/$(DEPDIR)/diskboot_image-diskboot.Tpo boot/sparc64/ieee1275/$(DEPDIR)/diskboot_image-diskboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/sparc64/ieee1275/diskboot.S' object='boot/sparc64/ieee1275/diskboot_image-diskboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/sparc64/ieee1275/diskboot_image-diskboot.o `test -f 'boot/sparc64/ieee1275/diskboot.S' || echo '$(srcdir)/'`boot/sparc64/ieee1275/diskboot.S
+
+boot/sparc64/ieee1275/diskboot_image-diskboot.obj: boot/sparc64/ieee1275/diskboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/sparc64/ieee1275/diskboot_image-diskboot.obj -MD -MP -MF boot/sparc64/ieee1275/$(DEPDIR)/diskboot_image-diskboot.Tpo -c -o boot/sparc64/ieee1275/diskboot_image-diskboot.obj `if test -f 'boot/sparc64/ieee1275/diskboot.S'; then $(CYGPATH_W) 'boot/sparc64/ieee1275/diskboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/sparc64/ieee1275/diskboot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/sparc64/ieee1275/$(DEPDIR)/diskboot_image-diskboot.Tpo boot/sparc64/ieee1275/$(DEPDIR)/diskboot_image-diskboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/sparc64/ieee1275/diskboot.S' object='boot/sparc64/ieee1275/diskboot_image-diskboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(diskboot_image_CPPFLAGS) $(CPPFLAGS) $(diskboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/sparc64/ieee1275/diskboot_image-diskboot.obj `if test -f 'boot/sparc64/ieee1275/diskboot.S'; then $(CYGPATH_W) 'boot/sparc64/ieee1275/diskboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/sparc64/ieee1275/diskboot.S'; fi`
+
+commands/i386/pc/drivemap_module-drivemap_int13h.o: commands/i386/pc/drivemap_int13h.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CCASFLAGS) $(CCASFLAGS) -MT commands/i386/pc/drivemap_module-drivemap_int13h.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap_int13h.Tpo -c -o commands/i386/pc/drivemap_module-drivemap_int13h.o `test -f 'commands/i386/pc/drivemap_int13h.S' || echo '$(srcdir)/'`commands/i386/pc/drivemap_int13h.S
+@am__fastdepCCAS_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap_int13h.Tpo commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap_int13h.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='commands/i386/pc/drivemap_int13h.S' object='commands/i386/pc/drivemap_module-drivemap_int13h.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CCASFLAGS) $(CCASFLAGS) -c -o commands/i386/pc/drivemap_module-drivemap_int13h.o `test -f 'commands/i386/pc/drivemap_int13h.S' || echo '$(srcdir)/'`commands/i386/pc/drivemap_int13h.S
+
+commands/i386/pc/drivemap_module-drivemap_int13h.obj: commands/i386/pc/drivemap_int13h.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CCASFLAGS) $(CCASFLAGS) -MT commands/i386/pc/drivemap_module-drivemap_int13h.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap_int13h.Tpo -c -o commands/i386/pc/drivemap_module-drivemap_int13h.obj `if test -f 'commands/i386/pc/drivemap_int13h.S'; then $(CYGPATH_W) 'commands/i386/pc/drivemap_int13h.S'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/drivemap_int13h.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap_int13h.Tpo commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap_int13h.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='commands/i386/pc/drivemap_int13h.S' object='commands/i386/pc/drivemap_module-drivemap_int13h.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CCASFLAGS) $(CCASFLAGS) -c -o commands/i386/pc/drivemap_module-drivemap_int13h.obj `if test -f 'commands/i386/pc/drivemap_int13h.S'; then $(CYGPATH_W) 'commands/i386/pc/drivemap_int13h.S'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/drivemap_int13h.S'; fi`
+
+boot/mips/yeeloong/fwstart_image-fwstart.o: boot/mips/yeeloong/fwstart.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fwstart_image_CPPFLAGS) $(CPPFLAGS) $(fwstart_image_CCASFLAGS) $(CCASFLAGS) -MT boot/mips/yeeloong/fwstart_image-fwstart.o -MD -MP -MF boot/mips/yeeloong/$(DEPDIR)/fwstart_image-fwstart.Tpo -c -o boot/mips/yeeloong/fwstart_image-fwstart.o `test -f 'boot/mips/yeeloong/fwstart.S' || echo '$(srcdir)/'`boot/mips/yeeloong/fwstart.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/mips/yeeloong/$(DEPDIR)/fwstart_image-fwstart.Tpo boot/mips/yeeloong/$(DEPDIR)/fwstart_image-fwstart.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/mips/yeeloong/fwstart.S' object='boot/mips/yeeloong/fwstart_image-fwstart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fwstart_image_CPPFLAGS) $(CPPFLAGS) $(fwstart_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/mips/yeeloong/fwstart_image-fwstart.o `test -f 'boot/mips/yeeloong/fwstart.S' || echo '$(srcdir)/'`boot/mips/yeeloong/fwstart.S
+
+boot/mips/yeeloong/fwstart_image-fwstart.obj: boot/mips/yeeloong/fwstart.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fwstart_image_CPPFLAGS) $(CPPFLAGS) $(fwstart_image_CCASFLAGS) $(CCASFLAGS) -MT boot/mips/yeeloong/fwstart_image-fwstart.obj -MD -MP -MF boot/mips/yeeloong/$(DEPDIR)/fwstart_image-fwstart.Tpo -c -o boot/mips/yeeloong/fwstart_image-fwstart.obj `if test -f 'boot/mips/yeeloong/fwstart.S'; then $(CYGPATH_W) 'boot/mips/yeeloong/fwstart.S'; else $(CYGPATH_W) '$(srcdir)/boot/mips/yeeloong/fwstart.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/mips/yeeloong/$(DEPDIR)/fwstart_image-fwstart.Tpo boot/mips/yeeloong/$(DEPDIR)/fwstart_image-fwstart.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/mips/yeeloong/fwstart.S' object='boot/mips/yeeloong/fwstart_image-fwstart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fwstart_image_CPPFLAGS) $(CPPFLAGS) $(fwstart_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/mips/yeeloong/fwstart_image-fwstart.obj `if test -f 'boot/mips/yeeloong/fwstart.S'; then $(CYGPATH_W) 'boot/mips/yeeloong/fwstart.S'; else $(CYGPATH_W) '$(srcdir)/boot/mips/yeeloong/fwstart.S'; fi`
+
+kern/emu/kernel_exec-cache.o: kern/emu/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/emu/kernel_exec-cache.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/emu/kernel_exec-cache.o `test -f 'kern/emu/cache.S' || echo '$(srcdir)/'`kern/emu/cache.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-cache.Tpo kern/emu/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/emu/cache.S' object='kern/emu/kernel_exec-cache.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/emu/kernel_exec-cache.o `test -f 'kern/emu/cache.S' || echo '$(srcdir)/'`kern/emu/cache.S
+
+kern/emu/kernel_exec-cache.obj: kern/emu/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/emu/kernel_exec-cache.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/emu/kernel_exec-cache.obj `if test -f 'kern/emu/cache.S'; then $(CYGPATH_W) 'kern/emu/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/emu/cache.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-cache.Tpo kern/emu/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/emu/cache.S' object='kern/emu/kernel_exec-cache.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/emu/kernel_exec-cache.obj `if test -f 'kern/emu/cache.S'; then $(CYGPATH_W) 'kern/emu/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/emu/cache.S'; fi`
+
+kern/i386/coreboot/kernel_exec-startup.o: kern/i386/coreboot/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/coreboot/kernel_exec-startup.o -MD -MP -MF kern/i386/coreboot/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/coreboot/kernel_exec-startup.o `test -f 'kern/i386/coreboot/startup.S' || echo '$(srcdir)/'`kern/i386/coreboot/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/coreboot/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/coreboot/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/coreboot/startup.S' object='kern/i386/coreboot/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/coreboot/kernel_exec-startup.o `test -f 'kern/i386/coreboot/startup.S' || echo '$(srcdir)/'`kern/i386/coreboot/startup.S
+
+kern/i386/coreboot/kernel_exec-startup.obj: kern/i386/coreboot/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/coreboot/kernel_exec-startup.obj -MD -MP -MF kern/i386/coreboot/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/coreboot/kernel_exec-startup.obj `if test -f 'kern/i386/coreboot/startup.S'; then $(CYGPATH_W) 'kern/i386/coreboot/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/coreboot/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/coreboot/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/coreboot/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/coreboot/startup.S' object='kern/i386/coreboot/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/coreboot/kernel_exec-startup.obj `if test -f 'kern/i386/coreboot/startup.S'; then $(CYGPATH_W) 'kern/i386/coreboot/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/coreboot/startup.S'; fi`
+
+kern/i386/efi/kernel_exec-startup.o: kern/i386/efi/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/efi/kernel_exec-startup.o -MD -MP -MF kern/i386/efi/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/efi/kernel_exec-startup.o `test -f 'kern/i386/efi/startup.S' || echo '$(srcdir)/'`kern/i386/efi/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/efi/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/efi/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/efi/startup.S' object='kern/i386/efi/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/efi/kernel_exec-startup.o `test -f 'kern/i386/efi/startup.S' || echo '$(srcdir)/'`kern/i386/efi/startup.S
+
+kern/i386/efi/kernel_exec-startup.obj: kern/i386/efi/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/efi/kernel_exec-startup.obj -MD -MP -MF kern/i386/efi/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/efi/kernel_exec-startup.obj `if test -f 'kern/i386/efi/startup.S'; then $(CYGPATH_W) 'kern/i386/efi/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/efi/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/efi/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/efi/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/efi/startup.S' object='kern/i386/efi/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/efi/kernel_exec-startup.obj `if test -f 'kern/i386/efi/startup.S'; then $(CYGPATH_W) 'kern/i386/efi/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/efi/startup.S'; fi`
+
+kern/i386/ieee1275/kernel_exec-startup.o: kern/i386/ieee1275/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/ieee1275/kernel_exec-startup.o -MD -MP -MF kern/i386/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/ieee1275/kernel_exec-startup.o `test -f 'kern/i386/ieee1275/startup.S' || echo '$(srcdir)/'`kern/i386/ieee1275/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/ieee1275/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/ieee1275/startup.S' object='kern/i386/ieee1275/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/ieee1275/kernel_exec-startup.o `test -f 'kern/i386/ieee1275/startup.S' || echo '$(srcdir)/'`kern/i386/ieee1275/startup.S
+
+kern/i386/ieee1275/kernel_exec-startup.obj: kern/i386/ieee1275/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/ieee1275/kernel_exec-startup.obj -MD -MP -MF kern/i386/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/ieee1275/kernel_exec-startup.obj `if test -f 'kern/i386/ieee1275/startup.S'; then $(CYGPATH_W) 'kern/i386/ieee1275/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/ieee1275/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/ieee1275/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/ieee1275/startup.S' object='kern/i386/ieee1275/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/ieee1275/kernel_exec-startup.obj `if test -f 'kern/i386/ieee1275/startup.S'; then $(CYGPATH_W) 'kern/i386/ieee1275/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/ieee1275/startup.S'; fi`
+
+kern/i386/pc/kernel_exec-startup.o: kern/i386/pc/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/pc/kernel_exec-startup.o -MD -MP -MF kern/i386/pc/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/pc/kernel_exec-startup.o `test -f 'kern/i386/pc/startup.S' || echo '$(srcdir)/'`kern/i386/pc/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/pc/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/pc/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/pc/startup.S' object='kern/i386/pc/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/pc/kernel_exec-startup.o `test -f 'kern/i386/pc/startup.S' || echo '$(srcdir)/'`kern/i386/pc/startup.S
+
+kern/i386/pc/kernel_exec-startup.obj: kern/i386/pc/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/pc/kernel_exec-startup.obj -MD -MP -MF kern/i386/pc/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/pc/kernel_exec-startup.obj `if test -f 'kern/i386/pc/startup.S'; then $(CYGPATH_W) 'kern/i386/pc/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pc/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/pc/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/pc/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/pc/startup.S' object='kern/i386/pc/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/pc/kernel_exec-startup.obj `if test -f 'kern/i386/pc/startup.S'; then $(CYGPATH_W) 'kern/i386/pc/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pc/startup.S'; fi`
+
+kern/i386/qemu/kernel_exec-startup.o: kern/i386/qemu/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/qemu/kernel_exec-startup.o -MD -MP -MF kern/i386/qemu/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/qemu/kernel_exec-startup.o `test -f 'kern/i386/qemu/startup.S' || echo '$(srcdir)/'`kern/i386/qemu/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/qemu/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/qemu/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/qemu/startup.S' object='kern/i386/qemu/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/qemu/kernel_exec-startup.o `test -f 'kern/i386/qemu/startup.S' || echo '$(srcdir)/'`kern/i386/qemu/startup.S
+
+kern/i386/qemu/kernel_exec-startup.obj: kern/i386/qemu/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/i386/qemu/kernel_exec-startup.obj -MD -MP -MF kern/i386/qemu/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/i386/qemu/kernel_exec-startup.obj `if test -f 'kern/i386/qemu/startup.S'; then $(CYGPATH_W) 'kern/i386/qemu/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/qemu/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/i386/qemu/$(DEPDIR)/kernel_exec-startup.Tpo kern/i386/qemu/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/i386/qemu/startup.S' object='kern/i386/qemu/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/i386/qemu/kernel_exec-startup.obj `if test -f 'kern/i386/qemu/startup.S'; then $(CYGPATH_W) 'kern/i386/qemu/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/i386/qemu/startup.S'; fi`
+
+kern/mips/kernel_exec-startup.o: kern/mips/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/mips/kernel_exec-startup.o -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/mips/kernel_exec-startup.o `test -f 'kern/mips/startup.S' || echo '$(srcdir)/'`kern/mips/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-startup.Tpo kern/mips/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/mips/startup.S' object='kern/mips/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/mips/kernel_exec-startup.o `test -f 'kern/mips/startup.S' || echo '$(srcdir)/'`kern/mips/startup.S
+
+kern/mips/kernel_exec-startup.obj: kern/mips/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/mips/kernel_exec-startup.obj -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/mips/kernel_exec-startup.obj `if test -f 'kern/mips/startup.S'; then $(CYGPATH_W) 'kern/mips/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/mips/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-startup.Tpo kern/mips/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/mips/startup.S' object='kern/mips/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/mips/kernel_exec-startup.obj `if test -f 'kern/mips/startup.S'; then $(CYGPATH_W) 'kern/mips/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/mips/startup.S'; fi`
+
+kern/mips/kernel_exec-cache.o: kern/mips/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/mips/kernel_exec-cache.o -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/mips/kernel_exec-cache.o `test -f 'kern/mips/cache.S' || echo '$(srcdir)/'`kern/mips/cache.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-cache.Tpo kern/mips/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/mips/cache.S' object='kern/mips/kernel_exec-cache.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/mips/kernel_exec-cache.o `test -f 'kern/mips/cache.S' || echo '$(srcdir)/'`kern/mips/cache.S
+
+kern/mips/kernel_exec-cache.obj: kern/mips/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/mips/kernel_exec-cache.obj -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/mips/kernel_exec-cache.obj `if test -f 'kern/mips/cache.S'; then $(CYGPATH_W) 'kern/mips/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/mips/cache.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-cache.Tpo kern/mips/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/mips/cache.S' object='kern/mips/kernel_exec-cache.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/mips/kernel_exec-cache.obj `if test -f 'kern/mips/cache.S'; then $(CYGPATH_W) 'kern/mips/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/mips/cache.S'; fi`
+
+kern/powerpc/ieee1275/kernel_exec-startup.o: kern/powerpc/ieee1275/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/powerpc/ieee1275/kernel_exec-startup.o -MD -MP -MF kern/powerpc/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/powerpc/ieee1275/kernel_exec-startup.o `test -f 'kern/powerpc/ieee1275/startup.S' || echo '$(srcdir)/'`kern/powerpc/ieee1275/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/powerpc/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo kern/powerpc/ieee1275/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/powerpc/ieee1275/startup.S' object='kern/powerpc/ieee1275/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/powerpc/ieee1275/kernel_exec-startup.o `test -f 'kern/powerpc/ieee1275/startup.S' || echo '$(srcdir)/'`kern/powerpc/ieee1275/startup.S
+
+kern/powerpc/ieee1275/kernel_exec-startup.obj: kern/powerpc/ieee1275/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/powerpc/ieee1275/kernel_exec-startup.obj -MD -MP -MF kern/powerpc/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/powerpc/ieee1275/kernel_exec-startup.obj `if test -f 'kern/powerpc/ieee1275/startup.S'; then $(CYGPATH_W) 'kern/powerpc/ieee1275/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/powerpc/ieee1275/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/powerpc/ieee1275/$(DEPDIR)/kernel_exec-startup.Tpo kern/powerpc/ieee1275/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/powerpc/ieee1275/startup.S' object='kern/powerpc/ieee1275/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/powerpc/ieee1275/kernel_exec-startup.obj `if test -f 'kern/powerpc/ieee1275/startup.S'; then $(CYGPATH_W) 'kern/powerpc/ieee1275/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/powerpc/ieee1275/startup.S'; fi`
+
+kern/powerpc/kernel_exec-cache.o: kern/powerpc/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/powerpc/kernel_exec-cache.o -MD -MP -MF kern/powerpc/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/powerpc/kernel_exec-cache.o `test -f 'kern/powerpc/cache.S' || echo '$(srcdir)/'`kern/powerpc/cache.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/powerpc/$(DEPDIR)/kernel_exec-cache.Tpo kern/powerpc/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/powerpc/cache.S' object='kern/powerpc/kernel_exec-cache.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/powerpc/kernel_exec-cache.o `test -f 'kern/powerpc/cache.S' || echo '$(srcdir)/'`kern/powerpc/cache.S
+
+kern/powerpc/kernel_exec-cache.obj: kern/powerpc/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/powerpc/kernel_exec-cache.obj -MD -MP -MF kern/powerpc/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/powerpc/kernel_exec-cache.obj `if test -f 'kern/powerpc/cache.S'; then $(CYGPATH_W) 'kern/powerpc/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/powerpc/cache.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/powerpc/$(DEPDIR)/kernel_exec-cache.Tpo kern/powerpc/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/powerpc/cache.S' object='kern/powerpc/kernel_exec-cache.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/powerpc/kernel_exec-cache.obj `if test -f 'kern/powerpc/cache.S'; then $(CYGPATH_W) 'kern/powerpc/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/powerpc/cache.S'; fi`
+
+kern/sparc64/ieee1275/kernel_exec-crt0.o: kern/sparc64/ieee1275/crt0.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/sparc64/ieee1275/kernel_exec-crt0.o -MD -MP -MF kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-crt0.Tpo -c -o kern/sparc64/ieee1275/kernel_exec-crt0.o `test -f 'kern/sparc64/ieee1275/crt0.S' || echo '$(srcdir)/'`kern/sparc64/ieee1275/crt0.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-crt0.Tpo kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-crt0.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/sparc64/ieee1275/crt0.S' object='kern/sparc64/ieee1275/kernel_exec-crt0.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/sparc64/ieee1275/kernel_exec-crt0.o `test -f 'kern/sparc64/ieee1275/crt0.S' || echo '$(srcdir)/'`kern/sparc64/ieee1275/crt0.S
+
+kern/sparc64/ieee1275/kernel_exec-crt0.obj: kern/sparc64/ieee1275/crt0.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/sparc64/ieee1275/kernel_exec-crt0.obj -MD -MP -MF kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-crt0.Tpo -c -o kern/sparc64/ieee1275/kernel_exec-crt0.obj `if test -f 'kern/sparc64/ieee1275/crt0.S'; then $(CYGPATH_W) 'kern/sparc64/ieee1275/crt0.S'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/ieee1275/crt0.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-crt0.Tpo kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-crt0.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/sparc64/ieee1275/crt0.S' object='kern/sparc64/ieee1275/kernel_exec-crt0.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/sparc64/ieee1275/kernel_exec-crt0.obj `if test -f 'kern/sparc64/ieee1275/crt0.S'; then $(CYGPATH_W) 'kern/sparc64/ieee1275/crt0.S'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/ieee1275/crt0.S'; fi`
+
+kern/sparc64/kernel_exec-cache.o: kern/sparc64/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/sparc64/kernel_exec-cache.o -MD -MP -MF kern/sparc64/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/sparc64/kernel_exec-cache.o `test -f 'kern/sparc64/cache.S' || echo '$(srcdir)/'`kern/sparc64/cache.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/sparc64/$(DEPDIR)/kernel_exec-cache.Tpo kern/sparc64/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/sparc64/cache.S' object='kern/sparc64/kernel_exec-cache.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/sparc64/kernel_exec-cache.o `test -f 'kern/sparc64/cache.S' || echo '$(srcdir)/'`kern/sparc64/cache.S
+
+kern/sparc64/kernel_exec-cache.obj: kern/sparc64/cache.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/sparc64/kernel_exec-cache.obj -MD -MP -MF kern/sparc64/$(DEPDIR)/kernel_exec-cache.Tpo -c -o kern/sparc64/kernel_exec-cache.obj `if test -f 'kern/sparc64/cache.S'; then $(CYGPATH_W) 'kern/sparc64/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/cache.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/sparc64/$(DEPDIR)/kernel_exec-cache.Tpo kern/sparc64/$(DEPDIR)/kernel_exec-cache.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/sparc64/cache.S' object='kern/sparc64/kernel_exec-cache.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/sparc64/kernel_exec-cache.obj `if test -f 'kern/sparc64/cache.S'; then $(CYGPATH_W) 'kern/sparc64/cache.S'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/cache.S'; fi`
+
+kern/x86_64/efi/kernel_exec-startup.o: kern/x86_64/efi/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/x86_64/efi/kernel_exec-startup.o -MD -MP -MF kern/x86_64/efi/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/x86_64/efi/kernel_exec-startup.o `test -f 'kern/x86_64/efi/startup.S' || echo '$(srcdir)/'`kern/x86_64/efi/startup.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/x86_64/efi/$(DEPDIR)/kernel_exec-startup.Tpo kern/x86_64/efi/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/x86_64/efi/startup.S' object='kern/x86_64/efi/kernel_exec-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/x86_64/efi/kernel_exec-startup.o `test -f 'kern/x86_64/efi/startup.S' || echo '$(srcdir)/'`kern/x86_64/efi/startup.S
+
+kern/x86_64/efi/kernel_exec-startup.obj: kern/x86_64/efi/startup.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/x86_64/efi/kernel_exec-startup.obj -MD -MP -MF kern/x86_64/efi/$(DEPDIR)/kernel_exec-startup.Tpo -c -o kern/x86_64/efi/kernel_exec-startup.obj `if test -f 'kern/x86_64/efi/startup.S'; then $(CYGPATH_W) 'kern/x86_64/efi/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/x86_64/efi/startup.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/x86_64/efi/$(DEPDIR)/kernel_exec-startup.Tpo kern/x86_64/efi/$(DEPDIR)/kernel_exec-startup.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/x86_64/efi/startup.S' object='kern/x86_64/efi/kernel_exec-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/x86_64/efi/kernel_exec-startup.obj `if test -f 'kern/x86_64/efi/startup.S'; then $(CYGPATH_W) 'kern/x86_64/efi/startup.S'; else $(CYGPATH_W) '$(srcdir)/kern/x86_64/efi/startup.S'; fi`
+
+kern/x86_64/efi/kernel_exec-callwrap.o: kern/x86_64/efi/callwrap.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/x86_64/efi/kernel_exec-callwrap.o -MD -MP -MF kern/x86_64/efi/$(DEPDIR)/kernel_exec-callwrap.Tpo -c -o kern/x86_64/efi/kernel_exec-callwrap.o `test -f 'kern/x86_64/efi/callwrap.S' || echo '$(srcdir)/'`kern/x86_64/efi/callwrap.S
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/x86_64/efi/$(DEPDIR)/kernel_exec-callwrap.Tpo kern/x86_64/efi/$(DEPDIR)/kernel_exec-callwrap.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/x86_64/efi/callwrap.S' object='kern/x86_64/efi/kernel_exec-callwrap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/x86_64/efi/kernel_exec-callwrap.o `test -f 'kern/x86_64/efi/callwrap.S' || echo '$(srcdir)/'`kern/x86_64/efi/callwrap.S
+
+kern/x86_64/efi/kernel_exec-callwrap.obj: kern/x86_64/efi/callwrap.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -MT kern/x86_64/efi/kernel_exec-callwrap.obj -MD -MP -MF kern/x86_64/efi/$(DEPDIR)/kernel_exec-callwrap.Tpo -c -o kern/x86_64/efi/kernel_exec-callwrap.obj `if test -f 'kern/x86_64/efi/callwrap.S'; then $(CYGPATH_W) 'kern/x86_64/efi/callwrap.S'; else $(CYGPATH_W) '$(srcdir)/kern/x86_64/efi/callwrap.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) kern/x86_64/efi/$(DEPDIR)/kernel_exec-callwrap.Tpo kern/x86_64/efi/$(DEPDIR)/kernel_exec-callwrap.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='kern/x86_64/efi/callwrap.S' object='kern/x86_64/efi/kernel_exec-callwrap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CCASFLAGS) $(CCASFLAGS) -c -o kern/x86_64/efi/kernel_exec-callwrap.obj `if test -f 'kern/x86_64/efi/callwrap.S'; then $(CYGPATH_W) 'kern/x86_64/efi/callwrap.S'; else $(CYGPATH_W) '$(srcdir)/kern/x86_64/efi/callwrap.S'; fi`
+
+boot/i386/pc/lnxboot_image-lnxboot.o: boot/i386/pc/lnxboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lnxboot_image_CPPFLAGS) $(CPPFLAGS) $(lnxboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/lnxboot_image-lnxboot.o -MD -MP -MF boot/i386/pc/$(DEPDIR)/lnxboot_image-lnxboot.Tpo -c -o boot/i386/pc/lnxboot_image-lnxboot.o `test -f 'boot/i386/pc/lnxboot.S' || echo '$(srcdir)/'`boot/i386/pc/lnxboot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/lnxboot_image-lnxboot.Tpo boot/i386/pc/$(DEPDIR)/lnxboot_image-lnxboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/lnxboot.S' object='boot/i386/pc/lnxboot_image-lnxboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lnxboot_image_CPPFLAGS) $(CPPFLAGS) $(lnxboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/lnxboot_image-lnxboot.o `test -f 'boot/i386/pc/lnxboot.S' || echo '$(srcdir)/'`boot/i386/pc/lnxboot.S
+
+boot/i386/pc/lnxboot_image-lnxboot.obj: boot/i386/pc/lnxboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lnxboot_image_CPPFLAGS) $(CPPFLAGS) $(lnxboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/lnxboot_image-lnxboot.obj -MD -MP -MF boot/i386/pc/$(DEPDIR)/lnxboot_image-lnxboot.Tpo -c -o boot/i386/pc/lnxboot_image-lnxboot.obj `if test -f 'boot/i386/pc/lnxboot.S'; then $(CYGPATH_W) 'boot/i386/pc/lnxboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/lnxboot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/lnxboot_image-lnxboot.Tpo boot/i386/pc/$(DEPDIR)/lnxboot_image-lnxboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/lnxboot.S' object='boot/i386/pc/lnxboot_image-lnxboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lnxboot_image_CPPFLAGS) $(CPPFLAGS) $(lnxboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/lnxboot_image-lnxboot.obj `if test -f 'boot/i386/pc/lnxboot.S'; then $(CYGPATH_W) 'boot/i386/pc/lnxboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/lnxboot.S'; fi`
+
+mmap/i386/pc/mmap_module-mmap_helper.o: mmap/i386/pc/mmap_helper.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CCASFLAGS) $(CCASFLAGS) -MT mmap/i386/pc/mmap_module-mmap_helper.o -MD -MP -MF mmap/i386/pc/$(DEPDIR)/mmap_module-mmap_helper.Tpo -c -o mmap/i386/pc/mmap_module-mmap_helper.o `test -f 'mmap/i386/pc/mmap_helper.S' || echo '$(srcdir)/'`mmap/i386/pc/mmap_helper.S
+@am__fastdepCCAS_TRUE@ $(am__mv) mmap/i386/pc/$(DEPDIR)/mmap_module-mmap_helper.Tpo mmap/i386/pc/$(DEPDIR)/mmap_module-mmap_helper.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='mmap/i386/pc/mmap_helper.S' object='mmap/i386/pc/mmap_module-mmap_helper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CCASFLAGS) $(CCASFLAGS) -c -o mmap/i386/pc/mmap_module-mmap_helper.o `test -f 'mmap/i386/pc/mmap_helper.S' || echo '$(srcdir)/'`mmap/i386/pc/mmap_helper.S
+
+mmap/i386/pc/mmap_module-mmap_helper.obj: mmap/i386/pc/mmap_helper.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CCASFLAGS) $(CCASFLAGS) -MT mmap/i386/pc/mmap_module-mmap_helper.obj -MD -MP -MF mmap/i386/pc/$(DEPDIR)/mmap_module-mmap_helper.Tpo -c -o mmap/i386/pc/mmap_module-mmap_helper.obj `if test -f 'mmap/i386/pc/mmap_helper.S'; then $(CYGPATH_W) 'mmap/i386/pc/mmap_helper.S'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/pc/mmap_helper.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) mmap/i386/pc/$(DEPDIR)/mmap_module-mmap_helper.Tpo mmap/i386/pc/$(DEPDIR)/mmap_module-mmap_helper.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='mmap/i386/pc/mmap_helper.S' object='mmap/i386/pc/mmap_module-mmap_helper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CCASFLAGS) $(CCASFLAGS) -c -o mmap/i386/pc/mmap_module-mmap_helper.obj `if test -f 'mmap/i386/pc/mmap_helper.S'; then $(CYGPATH_W) 'mmap/i386/pc/mmap_helper.S'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/pc/mmap_helper.S'; fi`
+
+boot/mips/none_decompress_image-startup_raw.o: boot/mips/startup_raw.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CCASFLAGS) $(CCASFLAGS) -MT boot/mips/none_decompress_image-startup_raw.o -MD -MP -MF boot/mips/$(DEPDIR)/none_decompress_image-startup_raw.Tpo -c -o boot/mips/none_decompress_image-startup_raw.o `test -f 'boot/mips/startup_raw.S' || echo '$(srcdir)/'`boot/mips/startup_raw.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/mips/$(DEPDIR)/none_decompress_image-startup_raw.Tpo boot/mips/$(DEPDIR)/none_decompress_image-startup_raw.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/mips/startup_raw.S' object='boot/mips/none_decompress_image-startup_raw.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/mips/none_decompress_image-startup_raw.o `test -f 'boot/mips/startup_raw.S' || echo '$(srcdir)/'`boot/mips/startup_raw.S
+
+boot/mips/none_decompress_image-startup_raw.obj: boot/mips/startup_raw.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CCASFLAGS) $(CCASFLAGS) -MT boot/mips/none_decompress_image-startup_raw.obj -MD -MP -MF boot/mips/$(DEPDIR)/none_decompress_image-startup_raw.Tpo -c -o boot/mips/none_decompress_image-startup_raw.obj `if test -f 'boot/mips/startup_raw.S'; then $(CYGPATH_W) 'boot/mips/startup_raw.S'; else $(CYGPATH_W) '$(srcdir)/boot/mips/startup_raw.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/mips/$(DEPDIR)/none_decompress_image-startup_raw.Tpo boot/mips/$(DEPDIR)/none_decompress_image-startup_raw.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/mips/startup_raw.S' object='boot/mips/none_decompress_image-startup_raw.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/mips/none_decompress_image-startup_raw.obj `if test -f 'boot/mips/startup_raw.S'; then $(CYGPATH_W) 'boot/mips/startup_raw.S'; else $(CYGPATH_W) '$(srcdir)/boot/mips/startup_raw.S'; fi`
+
+boot/i386/pc/pxeboot_image-pxeboot.o: boot/i386/pc/pxeboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxeboot_image_CPPFLAGS) $(CPPFLAGS) $(pxeboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/pxeboot_image-pxeboot.o -MD -MP -MF boot/i386/pc/$(DEPDIR)/pxeboot_image-pxeboot.Tpo -c -o boot/i386/pc/pxeboot_image-pxeboot.o `test -f 'boot/i386/pc/pxeboot.S' || echo '$(srcdir)/'`boot/i386/pc/pxeboot.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/pxeboot_image-pxeboot.Tpo boot/i386/pc/$(DEPDIR)/pxeboot_image-pxeboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/pxeboot.S' object='boot/i386/pc/pxeboot_image-pxeboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxeboot_image_CPPFLAGS) $(CPPFLAGS) $(pxeboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/pxeboot_image-pxeboot.o `test -f 'boot/i386/pc/pxeboot.S' || echo '$(srcdir)/'`boot/i386/pc/pxeboot.S
+
+boot/i386/pc/pxeboot_image-pxeboot.obj: boot/i386/pc/pxeboot.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxeboot_image_CPPFLAGS) $(CPPFLAGS) $(pxeboot_image_CCASFLAGS) $(CCASFLAGS) -MT boot/i386/pc/pxeboot_image-pxeboot.obj -MD -MP -MF boot/i386/pc/$(DEPDIR)/pxeboot_image-pxeboot.Tpo -c -o boot/i386/pc/pxeboot_image-pxeboot.obj `if test -f 'boot/i386/pc/pxeboot.S'; then $(CYGPATH_W) 'boot/i386/pc/pxeboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/pxeboot.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/i386/pc/$(DEPDIR)/pxeboot_image-pxeboot.Tpo boot/i386/pc/$(DEPDIR)/pxeboot_image-pxeboot.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/i386/pc/pxeboot.S' object='boot/i386/pc/pxeboot_image-pxeboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxeboot_image_CPPFLAGS) $(CPPFLAGS) $(pxeboot_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/i386/pc/pxeboot_image-pxeboot.obj `if test -f 'boot/i386/pc/pxeboot.S'; then $(CYGPATH_W) 'boot/i386/pc/pxeboot.S'; else $(CYGPATH_W) '$(srcdir)/boot/i386/pc/pxeboot.S'; fi`
+
+lib/i386/relocator_module-relocator_asm.o: lib/i386/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator_asm.o -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/i386/relocator_module-relocator_asm.o `test -f 'lib/i386/relocator_asm.S' || echo '$(srcdir)/'`lib/i386/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator_asm.S' object='lib/i386/relocator_module-relocator_asm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator_asm.o `test -f 'lib/i386/relocator_asm.S' || echo '$(srcdir)/'`lib/i386/relocator_asm.S
+
+lib/i386/relocator_module-relocator_asm.obj: lib/i386/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator_asm.obj -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/i386/relocator_module-relocator_asm.obj `if test -f 'lib/i386/relocator_asm.S'; then $(CYGPATH_W) 'lib/i386/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator_asm.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator_asm.S' object='lib/i386/relocator_module-relocator_asm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator_asm.obj `if test -f 'lib/i386/relocator_asm.S'; then $(CYGPATH_W) 'lib/i386/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator_asm.S'; fi`
+
+lib/i386/relocator_module-relocator16.o: lib/i386/relocator16.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator16.o -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator16.Tpo -c -o lib/i386/relocator_module-relocator16.o `test -f 'lib/i386/relocator16.S' || echo '$(srcdir)/'`lib/i386/relocator16.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator16.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator16.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator16.S' object='lib/i386/relocator_module-relocator16.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator16.o `test -f 'lib/i386/relocator16.S' || echo '$(srcdir)/'`lib/i386/relocator16.S
+
+lib/i386/relocator_module-relocator16.obj: lib/i386/relocator16.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator16.obj -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator16.Tpo -c -o lib/i386/relocator_module-relocator16.obj `if test -f 'lib/i386/relocator16.S'; then $(CYGPATH_W) 'lib/i386/relocator16.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator16.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator16.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator16.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator16.S' object='lib/i386/relocator_module-relocator16.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator16.obj `if test -f 'lib/i386/relocator16.S'; then $(CYGPATH_W) 'lib/i386/relocator16.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator16.S'; fi`
+
+lib/i386/relocator_module-relocator32.o: lib/i386/relocator32.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator32.o -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator32.Tpo -c -o lib/i386/relocator_module-relocator32.o `test -f 'lib/i386/relocator32.S' || echo '$(srcdir)/'`lib/i386/relocator32.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator32.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator32.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator32.S' object='lib/i386/relocator_module-relocator32.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator32.o `test -f 'lib/i386/relocator32.S' || echo '$(srcdir)/'`lib/i386/relocator32.S
+
+lib/i386/relocator_module-relocator32.obj: lib/i386/relocator32.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator32.obj -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator32.Tpo -c -o lib/i386/relocator_module-relocator32.obj `if test -f 'lib/i386/relocator32.S'; then $(CYGPATH_W) 'lib/i386/relocator32.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator32.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator32.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator32.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator32.S' object='lib/i386/relocator_module-relocator32.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator32.obj `if test -f 'lib/i386/relocator32.S'; then $(CYGPATH_W) 'lib/i386/relocator32.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator32.S'; fi`
+
+lib/i386/relocator_module-relocator64.o: lib/i386/relocator64.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator64.o -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator64.Tpo -c -o lib/i386/relocator_module-relocator64.o `test -f 'lib/i386/relocator64.S' || echo '$(srcdir)/'`lib/i386/relocator64.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator64.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator64.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator64.S' object='lib/i386/relocator_module-relocator64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator64.o `test -f 'lib/i386/relocator64.S' || echo '$(srcdir)/'`lib/i386/relocator64.S
+
+lib/i386/relocator_module-relocator64.obj: lib/i386/relocator64.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/i386/relocator_module-relocator64.obj -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator64.Tpo -c -o lib/i386/relocator_module-relocator64.obj `if test -f 'lib/i386/relocator64.S'; then $(CYGPATH_W) 'lib/i386/relocator64.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator64.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator64.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator64.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/i386/relocator64.S' object='lib/i386/relocator_module-relocator64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/i386/relocator_module-relocator64.obj `if test -f 'lib/i386/relocator64.S'; then $(CYGPATH_W) 'lib/i386/relocator64.S'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator64.S'; fi`
+
+lib/mips/relocator_module-relocator_asm.o: lib/mips/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/mips/relocator_module-relocator_asm.o -MD -MP -MF lib/mips/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/mips/relocator_module-relocator_asm.o `test -f 'lib/mips/relocator_asm.S' || echo '$(srcdir)/'`lib/mips/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/mips/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/mips/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/mips/relocator_asm.S' object='lib/mips/relocator_module-relocator_asm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/mips/relocator_module-relocator_asm.o `test -f 'lib/mips/relocator_asm.S' || echo '$(srcdir)/'`lib/mips/relocator_asm.S
+
+lib/mips/relocator_module-relocator_asm.obj: lib/mips/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/mips/relocator_module-relocator_asm.obj -MD -MP -MF lib/mips/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/mips/relocator_module-relocator_asm.obj `if test -f 'lib/mips/relocator_asm.S'; then $(CYGPATH_W) 'lib/mips/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/mips/relocator_asm.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/mips/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/mips/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/mips/relocator_asm.S' object='lib/mips/relocator_module-relocator_asm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/mips/relocator_module-relocator_asm.obj `if test -f 'lib/mips/relocator_asm.S'; then $(CYGPATH_W) 'lib/mips/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/mips/relocator_asm.S'; fi`
+
+lib/powerpc/relocator_module-relocator_asm.o: lib/powerpc/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/powerpc/relocator_module-relocator_asm.o -MD -MP -MF lib/powerpc/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/powerpc/relocator_module-relocator_asm.o `test -f 'lib/powerpc/relocator_asm.S' || echo '$(srcdir)/'`lib/powerpc/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/powerpc/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/powerpc/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/powerpc/relocator_asm.S' object='lib/powerpc/relocator_module-relocator_asm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/powerpc/relocator_module-relocator_asm.o `test -f 'lib/powerpc/relocator_asm.S' || echo '$(srcdir)/'`lib/powerpc/relocator_asm.S
+
+lib/powerpc/relocator_module-relocator_asm.obj: lib/powerpc/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/powerpc/relocator_module-relocator_asm.obj -MD -MP -MF lib/powerpc/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/powerpc/relocator_module-relocator_asm.obj `if test -f 'lib/powerpc/relocator_asm.S'; then $(CYGPATH_W) 'lib/powerpc/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/powerpc/relocator_asm.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/powerpc/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/powerpc/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/powerpc/relocator_asm.S' object='lib/powerpc/relocator_module-relocator_asm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/powerpc/relocator_module-relocator_asm.obj `if test -f 'lib/powerpc/relocator_asm.S'; then $(CYGPATH_W) 'lib/powerpc/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/powerpc/relocator_asm.S'; fi`
+
+lib/x86_64/relocator_module-relocator_asm.o: lib/x86_64/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/x86_64/relocator_module-relocator_asm.o -MD -MP -MF lib/x86_64/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/x86_64/relocator_module-relocator_asm.o `test -f 'lib/x86_64/relocator_asm.S' || echo '$(srcdir)/'`lib/x86_64/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/x86_64/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/x86_64/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/x86_64/relocator_asm.S' object='lib/x86_64/relocator_module-relocator_asm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/x86_64/relocator_module-relocator_asm.o `test -f 'lib/x86_64/relocator_asm.S' || echo '$(srcdir)/'`lib/x86_64/relocator_asm.S
+
+lib/x86_64/relocator_module-relocator_asm.obj: lib/x86_64/relocator_asm.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -MT lib/x86_64/relocator_module-relocator_asm.obj -MD -MP -MF lib/x86_64/$(DEPDIR)/relocator_module-relocator_asm.Tpo -c -o lib/x86_64/relocator_module-relocator_asm.obj `if test -f 'lib/x86_64/relocator_asm.S'; then $(CYGPATH_W) 'lib/x86_64/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/x86_64/relocator_asm.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/x86_64/$(DEPDIR)/relocator_module-relocator_asm.Tpo lib/x86_64/$(DEPDIR)/relocator_module-relocator_asm.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/x86_64/relocator_asm.S' object='lib/x86_64/relocator_module-relocator_asm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/x86_64/relocator_module-relocator_asm.obj `if test -f 'lib/x86_64/relocator_asm.S'; then $(CYGPATH_W) 'lib/x86_64/relocator_asm.S'; else $(CYGPATH_W) '$(srcdir)/lib/x86_64/relocator_asm.S'; fi`
+
+lib/setjmp_module-setjmp.o: lib/setjmp.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $(setjmp_module_CCASFLAGS) $(CCASFLAGS) -MT lib/setjmp_module-setjmp.o -MD -MP -MF lib/$(DEPDIR)/setjmp_module-setjmp.Tpo -c -o lib/setjmp_module-setjmp.o `test -f 'lib/setjmp.S' || echo '$(srcdir)/'`lib/setjmp.S
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/$(DEPDIR)/setjmp_module-setjmp.Tpo lib/$(DEPDIR)/setjmp_module-setjmp.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/setjmp.S' object='lib/setjmp_module-setjmp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $(setjmp_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/setjmp_module-setjmp.o `test -f 'lib/setjmp.S' || echo '$(srcdir)/'`lib/setjmp.S
+
+lib/setjmp_module-setjmp.obj: lib/setjmp.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $(setjmp_module_CCASFLAGS) $(CCASFLAGS) -MT lib/setjmp_module-setjmp.obj -MD -MP -MF lib/$(DEPDIR)/setjmp_module-setjmp.Tpo -c -o lib/setjmp_module-setjmp.obj `if test -f 'lib/setjmp.S'; then $(CYGPATH_W) 'lib/setjmp.S'; else $(CYGPATH_W) '$(srcdir)/lib/setjmp.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) lib/$(DEPDIR)/setjmp_module-setjmp.Tpo lib/$(DEPDIR)/setjmp_module-setjmp.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='lib/setjmp.S' object='lib/setjmp_module-setjmp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $(setjmp_module_CCASFLAGS) $(CCASFLAGS) -c -o lib/setjmp_module-setjmp.obj `if test -f 'lib/setjmp.S'; then $(CYGPATH_W) 'lib/setjmp.S'; else $(CYGPATH_W) '$(srcdir)/lib/setjmp.S'; fi`
+
+boot/mips/xz_decompress_image-startup_raw.o: boot/mips/startup_raw.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CCASFLAGS) $(CCASFLAGS) -MT boot/mips/xz_decompress_image-startup_raw.o -MD -MP -MF boot/mips/$(DEPDIR)/xz_decompress_image-startup_raw.Tpo -c -o boot/mips/xz_decompress_image-startup_raw.o `test -f 'boot/mips/startup_raw.S' || echo '$(srcdir)/'`boot/mips/startup_raw.S
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/mips/$(DEPDIR)/xz_decompress_image-startup_raw.Tpo boot/mips/$(DEPDIR)/xz_decompress_image-startup_raw.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/mips/startup_raw.S' object='boot/mips/xz_decompress_image-startup_raw.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/mips/xz_decompress_image-startup_raw.o `test -f 'boot/mips/startup_raw.S' || echo '$(srcdir)/'`boot/mips/startup_raw.S
+
+boot/mips/xz_decompress_image-startup_raw.obj: boot/mips/startup_raw.S
+@am__fastdepCCAS_TRUE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CCASFLAGS) $(CCASFLAGS) -MT boot/mips/xz_decompress_image-startup_raw.obj -MD -MP -MF boot/mips/$(DEPDIR)/xz_decompress_image-startup_raw.Tpo -c -o boot/mips/xz_decompress_image-startup_raw.obj `if test -f 'boot/mips/startup_raw.S'; then $(CYGPATH_W) 'boot/mips/startup_raw.S'; else $(CYGPATH_W) '$(srcdir)/boot/mips/startup_raw.S'; fi`
+@am__fastdepCCAS_TRUE@ $(am__mv) boot/mips/$(DEPDIR)/xz_decompress_image-startup_raw.Tpo boot/mips/$(DEPDIR)/xz_decompress_image-startup_raw.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='boot/mips/startup_raw.S' object='boot/mips/xz_decompress_image-startup_raw.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CCASFLAGS) $(CCASFLAGS) -c -o boot/mips/xz_decompress_image-startup_raw.obj `if test -f 'boot/mips/startup_raw.S'; then $(CYGPATH_W) 'boot/mips/startup_raw.S'; else $(CYGPATH_W) '$(srcdir)/boot/mips/startup_raw.S'; fi`
+
+.c.o:
+@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+gnulib/libgnulib_a-regex.o: gnulib/regex.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnulib_a_CPPFLAGS) $(CPPFLAGS) $(libgnulib_a_CFLAGS) $(CFLAGS) -MT gnulib/libgnulib_a-regex.o -MD -MP -MF gnulib/$(DEPDIR)/libgnulib_a-regex.Tpo -c -o gnulib/libgnulib_a-regex.o `test -f 'gnulib/regex.c' || echo '$(srcdir)/'`gnulib/regex.c
+@am__fastdepCC_TRUE@ $(am__mv) gnulib/$(DEPDIR)/libgnulib_a-regex.Tpo gnulib/$(DEPDIR)/libgnulib_a-regex.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnulib/regex.c' object='gnulib/libgnulib_a-regex.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnulib_a_CPPFLAGS) $(CPPFLAGS) $(libgnulib_a_CFLAGS) $(CFLAGS) -c -o gnulib/libgnulib_a-regex.o `test -f 'gnulib/regex.c' || echo '$(srcdir)/'`gnulib/regex.c
+
+gnulib/libgnulib_a-regex.obj: gnulib/regex.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnulib_a_CPPFLAGS) $(CPPFLAGS) $(libgnulib_a_CFLAGS) $(CFLAGS) -MT gnulib/libgnulib_a-regex.obj -MD -MP -MF gnulib/$(DEPDIR)/libgnulib_a-regex.Tpo -c -o gnulib/libgnulib_a-regex.obj `if test -f 'gnulib/regex.c'; then $(CYGPATH_W) 'gnulib/regex.c'; else $(CYGPATH_W) '$(srcdir)/gnulib/regex.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gnulib/$(DEPDIR)/libgnulib_a-regex.Tpo gnulib/$(DEPDIR)/libgnulib_a-regex.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnulib/regex.c' object='gnulib/libgnulib_a-regex.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgnulib_a_CPPFLAGS) $(CPPFLAGS) $(libgnulib_a_CFLAGS) $(CFLAGS) -c -o gnulib/libgnulib_a-regex.obj `if test -f 'gnulib/regex.c'; then $(CYGPATH_W) 'gnulib/regex.c'; else $(CYGPATH_W) '$(srcdir)/gnulib/regex.c'; fi`
+
+commands/i386/pc/acpi_module-acpi.o: commands/i386/pc/acpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/acpi_module-acpi.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/acpi_module-acpi.Tpo -c -o commands/i386/pc/acpi_module-acpi.o `test -f 'commands/i386/pc/acpi.c' || echo '$(srcdir)/'`commands/i386/pc/acpi.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/acpi_module-acpi.Tpo commands/i386/pc/$(DEPDIR)/acpi_module-acpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/acpi.c' object='commands/i386/pc/acpi_module-acpi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/acpi_module-acpi.o `test -f 'commands/i386/pc/acpi.c' || echo '$(srcdir)/'`commands/i386/pc/acpi.c
+
+commands/i386/pc/acpi_module-acpi.obj: commands/i386/pc/acpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/acpi_module-acpi.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/acpi_module-acpi.Tpo -c -o commands/i386/pc/acpi_module-acpi.obj `if test -f 'commands/i386/pc/acpi.c'; then $(CYGPATH_W) 'commands/i386/pc/acpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/acpi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/acpi_module-acpi.Tpo commands/i386/pc/$(DEPDIR)/acpi_module-acpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/acpi.c' object='commands/i386/pc/acpi_module-acpi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/acpi_module-acpi.obj `if test -f 'commands/i386/pc/acpi.c'; then $(CYGPATH_W) 'commands/i386/pc/acpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/acpi.c'; fi`
+
+commands/acpi_module-acpi.o: commands/acpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -MT commands/acpi_module-acpi.o -MD -MP -MF commands/$(DEPDIR)/acpi_module-acpi.Tpo -c -o commands/acpi_module-acpi.o `test -f 'commands/acpi.c' || echo '$(srcdir)/'`commands/acpi.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/acpi_module-acpi.Tpo commands/$(DEPDIR)/acpi_module-acpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/acpi.c' object='commands/acpi_module-acpi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -c -o commands/acpi_module-acpi.o `test -f 'commands/acpi.c' || echo '$(srcdir)/'`commands/acpi.c
+
+commands/acpi_module-acpi.obj: commands/acpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -MT commands/acpi_module-acpi.obj -MD -MP -MF commands/$(DEPDIR)/acpi_module-acpi.Tpo -c -o commands/acpi_module-acpi.obj `if test -f 'commands/acpi.c'; then $(CYGPATH_W) 'commands/acpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/acpi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/acpi_module-acpi.Tpo commands/$(DEPDIR)/acpi_module-acpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/acpi.c' object='commands/acpi_module-acpi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -c -o commands/acpi_module-acpi.obj `if test -f 'commands/acpi.c'; then $(CYGPATH_W) 'commands/acpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/acpi.c'; fi`
+
+commands/efi/acpi_module-acpi.o: commands/efi/acpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -MT commands/efi/acpi_module-acpi.o -MD -MP -MF commands/efi/$(DEPDIR)/acpi_module-acpi.Tpo -c -o commands/efi/acpi_module-acpi.o `test -f 'commands/efi/acpi.c' || echo '$(srcdir)/'`commands/efi/acpi.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/acpi_module-acpi.Tpo commands/efi/$(DEPDIR)/acpi_module-acpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/acpi.c' object='commands/efi/acpi_module-acpi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -c -o commands/efi/acpi_module-acpi.o `test -f 'commands/efi/acpi.c' || echo '$(srcdir)/'`commands/efi/acpi.c
+
+commands/efi/acpi_module-acpi.obj: commands/efi/acpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -MT commands/efi/acpi_module-acpi.obj -MD -MP -MF commands/efi/$(DEPDIR)/acpi_module-acpi.Tpo -c -o commands/efi/acpi_module-acpi.obj `if test -f 'commands/efi/acpi.c'; then $(CYGPATH_W) 'commands/efi/acpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/acpi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/acpi_module-acpi.Tpo commands/efi/$(DEPDIR)/acpi_module-acpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/acpi.c' object='commands/efi/acpi_module-acpi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $(acpi_module_CFLAGS) $(CFLAGS) -c -o commands/efi/acpi_module-acpi.obj `if test -f 'commands/efi/acpi.c'; then $(CYGPATH_W) 'commands/efi/acpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/acpi.c'; fi`
+
+fs/affs_module-affs.o: fs/affs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $(affs_module_CFLAGS) $(CFLAGS) -MT fs/affs_module-affs.o -MD -MP -MF fs/$(DEPDIR)/affs_module-affs.Tpo -c -o fs/affs_module-affs.o `test -f 'fs/affs.c' || echo '$(srcdir)/'`fs/affs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/affs_module-affs.Tpo fs/$(DEPDIR)/affs_module-affs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/affs.c' object='fs/affs_module-affs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $(affs_module_CFLAGS) $(CFLAGS) -c -o fs/affs_module-affs.o `test -f 'fs/affs.c' || echo '$(srcdir)/'`fs/affs.c
+
+fs/affs_module-affs.obj: fs/affs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $(affs_module_CFLAGS) $(CFLAGS) -MT fs/affs_module-affs.obj -MD -MP -MF fs/$(DEPDIR)/affs_module-affs.Tpo -c -o fs/affs_module-affs.obj `if test -f 'fs/affs.c'; then $(CYGPATH_W) 'fs/affs.c'; else $(CYGPATH_W) '$(srcdir)/fs/affs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/affs_module-affs.Tpo fs/$(DEPDIR)/affs_module-affs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/affs.c' object='fs/affs_module-affs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $(affs_module_CFLAGS) $(CFLAGS) -c -o fs/affs_module-affs.obj `if test -f 'fs/affs.c'; then $(CYGPATH_W) 'fs/affs.c'; else $(CYGPATH_W) '$(srcdir)/fs/affs.c'; fi`
+
+fs/afs_module-afs.o: fs/afs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $(afs_module_CFLAGS) $(CFLAGS) -MT fs/afs_module-afs.o -MD -MP -MF fs/$(DEPDIR)/afs_module-afs.Tpo -c -o fs/afs_module-afs.o `test -f 'fs/afs.c' || echo '$(srcdir)/'`fs/afs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/afs_module-afs.Tpo fs/$(DEPDIR)/afs_module-afs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/afs.c' object='fs/afs_module-afs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $(afs_module_CFLAGS) $(CFLAGS) -c -o fs/afs_module-afs.o `test -f 'fs/afs.c' || echo '$(srcdir)/'`fs/afs.c
+
+fs/afs_module-afs.obj: fs/afs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $(afs_module_CFLAGS) $(CFLAGS) -MT fs/afs_module-afs.obj -MD -MP -MF fs/$(DEPDIR)/afs_module-afs.Tpo -c -o fs/afs_module-afs.obj `if test -f 'fs/afs.c'; then $(CYGPATH_W) 'fs/afs.c'; else $(CYGPATH_W) '$(srcdir)/fs/afs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/afs_module-afs.Tpo fs/$(DEPDIR)/afs_module-afs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/afs.c' object='fs/afs_module-afs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $(afs_module_CFLAGS) $(CFLAGS) -c -o fs/afs_module-afs.obj `if test -f 'fs/afs.c'; then $(CYGPATH_W) 'fs/afs.c'; else $(CYGPATH_W) '$(srcdir)/fs/afs.c'; fi`
+
+fs/afs_be_module-afs_be.o: fs/afs_be.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $(afs_be_module_CFLAGS) $(CFLAGS) -MT fs/afs_be_module-afs_be.o -MD -MP -MF fs/$(DEPDIR)/afs_be_module-afs_be.Tpo -c -o fs/afs_be_module-afs_be.o `test -f 'fs/afs_be.c' || echo '$(srcdir)/'`fs/afs_be.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/afs_be_module-afs_be.Tpo fs/$(DEPDIR)/afs_be_module-afs_be.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/afs_be.c' object='fs/afs_be_module-afs_be.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $(afs_be_module_CFLAGS) $(CFLAGS) -c -o fs/afs_be_module-afs_be.o `test -f 'fs/afs_be.c' || echo '$(srcdir)/'`fs/afs_be.c
+
+fs/afs_be_module-afs_be.obj: fs/afs_be.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $(afs_be_module_CFLAGS) $(CFLAGS) -MT fs/afs_be_module-afs_be.obj -MD -MP -MF fs/$(DEPDIR)/afs_be_module-afs_be.Tpo -c -o fs/afs_be_module-afs_be.obj `if test -f 'fs/afs_be.c'; then $(CYGPATH_W) 'fs/afs_be.c'; else $(CYGPATH_W) '$(srcdir)/fs/afs_be.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/afs_be_module-afs_be.Tpo fs/$(DEPDIR)/afs_be_module-afs_be.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/afs_be.c' object='fs/afs_be_module-afs_be.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $(afs_be_module_CFLAGS) $(CFLAGS) -c -o fs/afs_be_module-afs_be.obj `if test -f 'fs/afs_be.c'; then $(CYGPATH_W) 'fs/afs_be.c'; else $(CYGPATH_W) '$(srcdir)/fs/afs_be.c'; fi`
+
+loader/aout_module-aout.o: loader/aout.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $(aout_module_CFLAGS) $(CFLAGS) -MT loader/aout_module-aout.o -MD -MP -MF loader/$(DEPDIR)/aout_module-aout.Tpo -c -o loader/aout_module-aout.o `test -f 'loader/aout.c' || echo '$(srcdir)/'`loader/aout.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/aout_module-aout.Tpo loader/$(DEPDIR)/aout_module-aout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/aout.c' object='loader/aout_module-aout.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $(aout_module_CFLAGS) $(CFLAGS) -c -o loader/aout_module-aout.o `test -f 'loader/aout.c' || echo '$(srcdir)/'`loader/aout.c
+
+loader/aout_module-aout.obj: loader/aout.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $(aout_module_CFLAGS) $(CFLAGS) -MT loader/aout_module-aout.obj -MD -MP -MF loader/$(DEPDIR)/aout_module-aout.Tpo -c -o loader/aout_module-aout.obj `if test -f 'loader/aout.c'; then $(CYGPATH_W) 'loader/aout.c'; else $(CYGPATH_W) '$(srcdir)/loader/aout.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/aout_module-aout.Tpo loader/$(DEPDIR)/aout_module-aout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/aout.c' object='loader/aout_module-aout.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $(aout_module_CFLAGS) $(CFLAGS) -c -o loader/aout_module-aout.obj `if test -f 'loader/aout.c'; then $(CYGPATH_W) 'loader/aout.c'; else $(CYGPATH_W) '$(srcdir)/loader/aout.c'; fi`
+
+loader/efi/appleldr_module-appleloader.o: loader/efi/appleloader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $(appleldr_module_CFLAGS) $(CFLAGS) -MT loader/efi/appleldr_module-appleloader.o -MD -MP -MF loader/efi/$(DEPDIR)/appleldr_module-appleloader.Tpo -c -o loader/efi/appleldr_module-appleloader.o `test -f 'loader/efi/appleloader.c' || echo '$(srcdir)/'`loader/efi/appleloader.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/efi/$(DEPDIR)/appleldr_module-appleloader.Tpo loader/efi/$(DEPDIR)/appleldr_module-appleloader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/efi/appleloader.c' object='loader/efi/appleldr_module-appleloader.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $(appleldr_module_CFLAGS) $(CFLAGS) -c -o loader/efi/appleldr_module-appleloader.o `test -f 'loader/efi/appleloader.c' || echo '$(srcdir)/'`loader/efi/appleloader.c
+
+loader/efi/appleldr_module-appleloader.obj: loader/efi/appleloader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $(appleldr_module_CFLAGS) $(CFLAGS) -MT loader/efi/appleldr_module-appleloader.obj -MD -MP -MF loader/efi/$(DEPDIR)/appleldr_module-appleloader.Tpo -c -o loader/efi/appleldr_module-appleloader.obj `if test -f 'loader/efi/appleloader.c'; then $(CYGPATH_W) 'loader/efi/appleloader.c'; else $(CYGPATH_W) '$(srcdir)/loader/efi/appleloader.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/efi/$(DEPDIR)/appleldr_module-appleloader.Tpo loader/efi/$(DEPDIR)/appleldr_module-appleloader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/efi/appleloader.c' object='loader/efi/appleldr_module-appleloader.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $(appleldr_module_CFLAGS) $(CFLAGS) -c -o loader/efi/appleldr_module-appleloader.obj `if test -f 'loader/efi/appleloader.c'; then $(CYGPATH_W) 'loader/efi/appleloader.c'; else $(CYGPATH_W) '$(srcdir)/loader/efi/appleloader.c'; fi`
+
+term/at_keyboard_module-at_keyboard.o: term/at_keyboard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(at_keyboard_module_CFLAGS) $(CFLAGS) -MT term/at_keyboard_module-at_keyboard.o -MD -MP -MF term/$(DEPDIR)/at_keyboard_module-at_keyboard.Tpo -c -o term/at_keyboard_module-at_keyboard.o `test -f 'term/at_keyboard.c' || echo '$(srcdir)/'`term/at_keyboard.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/at_keyboard_module-at_keyboard.Tpo term/$(DEPDIR)/at_keyboard_module-at_keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/at_keyboard.c' object='term/at_keyboard_module-at_keyboard.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(at_keyboard_module_CFLAGS) $(CFLAGS) -c -o term/at_keyboard_module-at_keyboard.o `test -f 'term/at_keyboard.c' || echo '$(srcdir)/'`term/at_keyboard.c
+
+term/at_keyboard_module-at_keyboard.obj: term/at_keyboard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(at_keyboard_module_CFLAGS) $(CFLAGS) -MT term/at_keyboard_module-at_keyboard.obj -MD -MP -MF term/$(DEPDIR)/at_keyboard_module-at_keyboard.Tpo -c -o term/at_keyboard_module-at_keyboard.obj `if test -f 'term/at_keyboard.c'; then $(CYGPATH_W) 'term/at_keyboard.c'; else $(CYGPATH_W) '$(srcdir)/term/at_keyboard.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/at_keyboard_module-at_keyboard.Tpo term/$(DEPDIR)/at_keyboard_module-at_keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/at_keyboard.c' object='term/at_keyboard_module-at_keyboard.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(at_keyboard_module_CFLAGS) $(CFLAGS) -c -o term/at_keyboard_module-at_keyboard.obj `if test -f 'term/at_keyboard.c'; then $(CYGPATH_W) 'term/at_keyboard.c'; else $(CYGPATH_W) '$(srcdir)/term/at_keyboard.c'; fi`
+
+disk/ata_module-ata.o: disk/ata.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $(ata_module_CFLAGS) $(CFLAGS) -MT disk/ata_module-ata.o -MD -MP -MF disk/$(DEPDIR)/ata_module-ata.Tpo -c -o disk/ata_module-ata.o `test -f 'disk/ata.c' || echo '$(srcdir)/'`disk/ata.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/ata_module-ata.Tpo disk/$(DEPDIR)/ata_module-ata.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ata.c' object='disk/ata_module-ata.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $(ata_module_CFLAGS) $(CFLAGS) -c -o disk/ata_module-ata.o `test -f 'disk/ata.c' || echo '$(srcdir)/'`disk/ata.c
+
+disk/ata_module-ata.obj: disk/ata.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $(ata_module_CFLAGS) $(CFLAGS) -MT disk/ata_module-ata.obj -MD -MP -MF disk/$(DEPDIR)/ata_module-ata.Tpo -c -o disk/ata_module-ata.obj `if test -f 'disk/ata.c'; then $(CYGPATH_W) 'disk/ata.c'; else $(CYGPATH_W) '$(srcdir)/disk/ata.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/ata_module-ata.Tpo disk/$(DEPDIR)/ata_module-ata.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ata.c' object='disk/ata_module-ata.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $(ata_module_CFLAGS) $(CFLAGS) -c -o disk/ata_module-ata.obj `if test -f 'disk/ata.c'; then $(CYGPATH_W) 'disk/ata.c'; else $(CYGPATH_W) '$(srcdir)/disk/ata.c'; fi`
+
+disk/ata_pthru_module-ata_pthru.o: disk/ata_pthru.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $(ata_pthru_module_CFLAGS) $(CFLAGS) -MT disk/ata_pthru_module-ata_pthru.o -MD -MP -MF disk/$(DEPDIR)/ata_pthru_module-ata_pthru.Tpo -c -o disk/ata_pthru_module-ata_pthru.o `test -f 'disk/ata_pthru.c' || echo '$(srcdir)/'`disk/ata_pthru.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/ata_pthru_module-ata_pthru.Tpo disk/$(DEPDIR)/ata_pthru_module-ata_pthru.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ata_pthru.c' object='disk/ata_pthru_module-ata_pthru.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $(ata_pthru_module_CFLAGS) $(CFLAGS) -c -o disk/ata_pthru_module-ata_pthru.o `test -f 'disk/ata_pthru.c' || echo '$(srcdir)/'`disk/ata_pthru.c
+
+disk/ata_pthru_module-ata_pthru.obj: disk/ata_pthru.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $(ata_pthru_module_CFLAGS) $(CFLAGS) -MT disk/ata_pthru_module-ata_pthru.obj -MD -MP -MF disk/$(DEPDIR)/ata_pthru_module-ata_pthru.Tpo -c -o disk/ata_pthru_module-ata_pthru.obj `if test -f 'disk/ata_pthru.c'; then $(CYGPATH_W) 'disk/ata_pthru.c'; else $(CYGPATH_W) '$(srcdir)/disk/ata_pthru.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/ata_pthru_module-ata_pthru.Tpo disk/$(DEPDIR)/ata_pthru_module-ata_pthru.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ata_pthru.c' object='disk/ata_pthru_module-ata_pthru.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $(ata_pthru_module_CFLAGS) $(CFLAGS) -c -o disk/ata_pthru_module-ata_pthru.obj `if test -f 'disk/ata_pthru.c'; then $(CYGPATH_W) 'disk/ata_pthru.c'; else $(CYGPATH_W) '$(srcdir)/disk/ata_pthru.c'; fi`
+
+fs/befs_module-befs.o: fs/befs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $(befs_module_CFLAGS) $(CFLAGS) -MT fs/befs_module-befs.o -MD -MP -MF fs/$(DEPDIR)/befs_module-befs.Tpo -c -o fs/befs_module-befs.o `test -f 'fs/befs.c' || echo '$(srcdir)/'`fs/befs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/befs_module-befs.Tpo fs/$(DEPDIR)/befs_module-befs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/befs.c' object='fs/befs_module-befs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $(befs_module_CFLAGS) $(CFLAGS) -c -o fs/befs_module-befs.o `test -f 'fs/befs.c' || echo '$(srcdir)/'`fs/befs.c
+
+fs/befs_module-befs.obj: fs/befs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $(befs_module_CFLAGS) $(CFLAGS) -MT fs/befs_module-befs.obj -MD -MP -MF fs/$(DEPDIR)/befs_module-befs.Tpo -c -o fs/befs_module-befs.obj `if test -f 'fs/befs.c'; then $(CYGPATH_W) 'fs/befs.c'; else $(CYGPATH_W) '$(srcdir)/fs/befs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/befs_module-befs.Tpo fs/$(DEPDIR)/befs_module-befs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/befs.c' object='fs/befs_module-befs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $(befs_module_CFLAGS) $(CFLAGS) -c -o fs/befs_module-befs.obj `if test -f 'fs/befs.c'; then $(CYGPATH_W) 'fs/befs.c'; else $(CYGPATH_W) '$(srcdir)/fs/befs.c'; fi`
+
+fs/befs_be_module-befs_be.o: fs/befs_be.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $(befs_be_module_CFLAGS) $(CFLAGS) -MT fs/befs_be_module-befs_be.o -MD -MP -MF fs/$(DEPDIR)/befs_be_module-befs_be.Tpo -c -o fs/befs_be_module-befs_be.o `test -f 'fs/befs_be.c' || echo '$(srcdir)/'`fs/befs_be.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/befs_be_module-befs_be.Tpo fs/$(DEPDIR)/befs_be_module-befs_be.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/befs_be.c' object='fs/befs_be_module-befs_be.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $(befs_be_module_CFLAGS) $(CFLAGS) -c -o fs/befs_be_module-befs_be.o `test -f 'fs/befs_be.c' || echo '$(srcdir)/'`fs/befs_be.c
+
+fs/befs_be_module-befs_be.obj: fs/befs_be.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $(befs_be_module_CFLAGS) $(CFLAGS) -MT fs/befs_be_module-befs_be.obj -MD -MP -MF fs/$(DEPDIR)/befs_be_module-befs_be.Tpo -c -o fs/befs_be_module-befs_be.obj `if test -f 'fs/befs_be.c'; then $(CYGPATH_W) 'fs/befs_be.c'; else $(CYGPATH_W) '$(srcdir)/fs/befs_be.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/befs_be_module-befs_be.Tpo fs/$(DEPDIR)/befs_be_module-befs_be.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/befs_be.c' object='fs/befs_be_module-befs_be.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $(befs_be_module_CFLAGS) $(CFLAGS) -c -o fs/befs_be_module-befs_be.obj `if test -f 'fs/befs_be.c'; then $(CYGPATH_W) 'fs/befs_be.c'; else $(CYGPATH_W) '$(srcdir)/fs/befs_be.c'; fi`
+
+disk/i386/pc/biosdisk_module-biosdisk.o: disk/i386/pc/biosdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(biosdisk_module_CPPFLAGS) $(CPPFLAGS) $(biosdisk_module_CFLAGS) $(CFLAGS) -MT disk/i386/pc/biosdisk_module-biosdisk.o -MD -MP -MF disk/i386/pc/$(DEPDIR)/biosdisk_module-biosdisk.Tpo -c -o disk/i386/pc/biosdisk_module-biosdisk.o `test -f 'disk/i386/pc/biosdisk.c' || echo '$(srcdir)/'`disk/i386/pc/biosdisk.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/i386/pc/$(DEPDIR)/biosdisk_module-biosdisk.Tpo disk/i386/pc/$(DEPDIR)/biosdisk_module-biosdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/i386/pc/biosdisk.c' object='disk/i386/pc/biosdisk_module-biosdisk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(biosdisk_module_CPPFLAGS) $(CPPFLAGS) $(biosdisk_module_CFLAGS) $(CFLAGS) -c -o disk/i386/pc/biosdisk_module-biosdisk.o `test -f 'disk/i386/pc/biosdisk.c' || echo '$(srcdir)/'`disk/i386/pc/biosdisk.c
+
+disk/i386/pc/biosdisk_module-biosdisk.obj: disk/i386/pc/biosdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(biosdisk_module_CPPFLAGS) $(CPPFLAGS) $(biosdisk_module_CFLAGS) $(CFLAGS) -MT disk/i386/pc/biosdisk_module-biosdisk.obj -MD -MP -MF disk/i386/pc/$(DEPDIR)/biosdisk_module-biosdisk.Tpo -c -o disk/i386/pc/biosdisk_module-biosdisk.obj `if test -f 'disk/i386/pc/biosdisk.c'; then $(CYGPATH_W) 'disk/i386/pc/biosdisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/i386/pc/biosdisk.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/i386/pc/$(DEPDIR)/biosdisk_module-biosdisk.Tpo disk/i386/pc/$(DEPDIR)/biosdisk_module-biosdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/i386/pc/biosdisk.c' object='disk/i386/pc/biosdisk_module-biosdisk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(biosdisk_module_CPPFLAGS) $(CPPFLAGS) $(biosdisk_module_CFLAGS) $(CFLAGS) -c -o disk/i386/pc/biosdisk_module-biosdisk.obj `if test -f 'disk/i386/pc/biosdisk.c'; then $(CYGPATH_W) 'disk/i386/pc/biosdisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/i386/pc/biosdisk.c'; fi`
+
+video/bitmap_module-bitmap.o: video/bitmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_module_CFLAGS) $(CFLAGS) -MT video/bitmap_module-bitmap.o -MD -MP -MF video/$(DEPDIR)/bitmap_module-bitmap.Tpo -c -o video/bitmap_module-bitmap.o `test -f 'video/bitmap.c' || echo '$(srcdir)/'`video/bitmap.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/bitmap_module-bitmap.Tpo video/$(DEPDIR)/bitmap_module-bitmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap.c' object='video/bitmap_module-bitmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_module_CFLAGS) $(CFLAGS) -c -o video/bitmap_module-bitmap.o `test -f 'video/bitmap.c' || echo '$(srcdir)/'`video/bitmap.c
+
+video/bitmap_module-bitmap.obj: video/bitmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_module_CFLAGS) $(CFLAGS) -MT video/bitmap_module-bitmap.obj -MD -MP -MF video/$(DEPDIR)/bitmap_module-bitmap.Tpo -c -o video/bitmap_module-bitmap.obj `if test -f 'video/bitmap.c'; then $(CYGPATH_W) 'video/bitmap.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/bitmap_module-bitmap.Tpo video/$(DEPDIR)/bitmap_module-bitmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap.c' object='video/bitmap_module-bitmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_module_CFLAGS) $(CFLAGS) -c -o video/bitmap_module-bitmap.obj `if test -f 'video/bitmap.c'; then $(CYGPATH_W) 'video/bitmap.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap.c'; fi`
+
+video/bitmap_scale_module-bitmap_scale.o: video/bitmap_scale.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_scale_module_CFLAGS) $(CFLAGS) -MT video/bitmap_scale_module-bitmap_scale.o -MD -MP -MF video/$(DEPDIR)/bitmap_scale_module-bitmap_scale.Tpo -c -o video/bitmap_scale_module-bitmap_scale.o `test -f 'video/bitmap_scale.c' || echo '$(srcdir)/'`video/bitmap_scale.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/bitmap_scale_module-bitmap_scale.Tpo video/$(DEPDIR)/bitmap_scale_module-bitmap_scale.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap_scale.c' object='video/bitmap_scale_module-bitmap_scale.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_scale_module_CFLAGS) $(CFLAGS) -c -o video/bitmap_scale_module-bitmap_scale.o `test -f 'video/bitmap_scale.c' || echo '$(srcdir)/'`video/bitmap_scale.c
+
+video/bitmap_scale_module-bitmap_scale.obj: video/bitmap_scale.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_scale_module_CFLAGS) $(CFLAGS) -MT video/bitmap_scale_module-bitmap_scale.obj -MD -MP -MF video/$(DEPDIR)/bitmap_scale_module-bitmap_scale.Tpo -c -o video/bitmap_scale_module-bitmap_scale.obj `if test -f 'video/bitmap_scale.c'; then $(CYGPATH_W) 'video/bitmap_scale.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap_scale.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/bitmap_scale_module-bitmap_scale.Tpo video/$(DEPDIR)/bitmap_scale_module-bitmap_scale.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap_scale.c' object='video/bitmap_scale_module-bitmap_scale.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $(bitmap_scale_module_CFLAGS) $(CFLAGS) -c -o video/bitmap_scale_module-bitmap_scale.obj `if test -f 'video/bitmap_scale.c'; then $(CYGPATH_W) 'video/bitmap_scale.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap_scale.c'; fi`
+
+commands/blocklist_module-blocklist.o: commands/blocklist.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $(blocklist_module_CFLAGS) $(CFLAGS) -MT commands/blocklist_module-blocklist.o -MD -MP -MF commands/$(DEPDIR)/blocklist_module-blocklist.Tpo -c -o commands/blocklist_module-blocklist.o `test -f 'commands/blocklist.c' || echo '$(srcdir)/'`commands/blocklist.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/blocklist_module-blocklist.Tpo commands/$(DEPDIR)/blocklist_module-blocklist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/blocklist.c' object='commands/blocklist_module-blocklist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $(blocklist_module_CFLAGS) $(CFLAGS) -c -o commands/blocklist_module-blocklist.o `test -f 'commands/blocklist.c' || echo '$(srcdir)/'`commands/blocklist.c
+
+commands/blocklist_module-blocklist.obj: commands/blocklist.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $(blocklist_module_CFLAGS) $(CFLAGS) -MT commands/blocklist_module-blocklist.obj -MD -MP -MF commands/$(DEPDIR)/blocklist_module-blocklist.Tpo -c -o commands/blocklist_module-blocklist.obj `if test -f 'commands/blocklist.c'; then $(CYGPATH_W) 'commands/blocklist.c'; else $(CYGPATH_W) '$(srcdir)/commands/blocklist.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/blocklist_module-blocklist.Tpo commands/$(DEPDIR)/blocklist_module-blocklist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/blocklist.c' object='commands/blocklist_module-blocklist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $(blocklist_module_CFLAGS) $(CFLAGS) -c -o commands/blocklist_module-blocklist.obj `if test -f 'commands/blocklist.c'; then $(CYGPATH_W) 'commands/blocklist.c'; else $(CYGPATH_W) '$(srcdir)/commands/blocklist.c'; fi`
+
+commands/boot_module-boot.o: commands/boot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -MT commands/boot_module-boot.o -MD -MP -MF commands/$(DEPDIR)/boot_module-boot.Tpo -c -o commands/boot_module-boot.o `test -f 'commands/boot.c' || echo '$(srcdir)/'`commands/boot.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/boot_module-boot.Tpo commands/$(DEPDIR)/boot_module-boot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/boot.c' object='commands/boot_module-boot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -c -o commands/boot_module-boot.o `test -f 'commands/boot.c' || echo '$(srcdir)/'`commands/boot.c
+
+commands/boot_module-boot.obj: commands/boot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -MT commands/boot_module-boot.obj -MD -MP -MF commands/$(DEPDIR)/boot_module-boot.Tpo -c -o commands/boot_module-boot.obj `if test -f 'commands/boot.c'; then $(CYGPATH_W) 'commands/boot.c'; else $(CYGPATH_W) '$(srcdir)/commands/boot.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/boot_module-boot.Tpo commands/$(DEPDIR)/boot_module-boot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/boot.c' object='commands/boot_module-boot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -c -o commands/boot_module-boot.obj `if test -f 'commands/boot.c'; then $(CYGPATH_W) 'commands/boot.c'; else $(CYGPATH_W) '$(srcdir)/commands/boot.c'; fi`
+
+lib/i386/pc/boot_module-biosnum.o: lib/i386/pc/biosnum.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -MT lib/i386/pc/boot_module-biosnum.o -MD -MP -MF lib/i386/pc/$(DEPDIR)/boot_module-biosnum.Tpo -c -o lib/i386/pc/boot_module-biosnum.o `test -f 'lib/i386/pc/biosnum.c' || echo '$(srcdir)/'`lib/i386/pc/biosnum.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/pc/$(DEPDIR)/boot_module-biosnum.Tpo lib/i386/pc/$(DEPDIR)/boot_module-biosnum.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/pc/biosnum.c' object='lib/i386/pc/boot_module-biosnum.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -c -o lib/i386/pc/boot_module-biosnum.o `test -f 'lib/i386/pc/biosnum.c' || echo '$(srcdir)/'`lib/i386/pc/biosnum.c
+
+lib/i386/pc/boot_module-biosnum.obj: lib/i386/pc/biosnum.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -MT lib/i386/pc/boot_module-biosnum.obj -MD -MP -MF lib/i386/pc/$(DEPDIR)/boot_module-biosnum.Tpo -c -o lib/i386/pc/boot_module-biosnum.obj `if test -f 'lib/i386/pc/biosnum.c'; then $(CYGPATH_W) 'lib/i386/pc/biosnum.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/pc/biosnum.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/pc/$(DEPDIR)/boot_module-biosnum.Tpo lib/i386/pc/$(DEPDIR)/boot_module-biosnum.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/pc/biosnum.c' object='lib/i386/pc/boot_module-biosnum.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $(boot_module_CFLAGS) $(CFLAGS) -c -o lib/i386/pc/boot_module-biosnum.obj `if test -f 'lib/i386/pc/biosnum.c'; then $(CYGPATH_W) 'lib/i386/pc/biosnum.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/pc/biosnum.c'; fi`
+
+loader/i386/bsd_module-bsd.o: loader/i386/bsd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -MT loader/i386/bsd_module-bsd.o -MD -MP -MF loader/i386/$(DEPDIR)/bsd_module-bsd.Tpo -c -o loader/i386/bsd_module-bsd.o `test -f 'loader/i386/bsd.c' || echo '$(srcdir)/'`loader/i386/bsd.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/bsd_module-bsd.Tpo loader/i386/$(DEPDIR)/bsd_module-bsd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/bsd.c' object='loader/i386/bsd_module-bsd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -c -o loader/i386/bsd_module-bsd.o `test -f 'loader/i386/bsd.c' || echo '$(srcdir)/'`loader/i386/bsd.c
+
+loader/i386/bsd_module-bsd.obj: loader/i386/bsd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -MT loader/i386/bsd_module-bsd.obj -MD -MP -MF loader/i386/$(DEPDIR)/bsd_module-bsd.Tpo -c -o loader/i386/bsd_module-bsd.obj `if test -f 'loader/i386/bsd.c'; then $(CYGPATH_W) 'loader/i386/bsd.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/bsd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/bsd_module-bsd.Tpo loader/i386/$(DEPDIR)/bsd_module-bsd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/bsd.c' object='loader/i386/bsd_module-bsd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -c -o loader/i386/bsd_module-bsd.obj `if test -f 'loader/i386/bsd.c'; then $(CYGPATH_W) 'loader/i386/bsd.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/bsd.c'; fi`
+
+loader/i386/bsd_module-bsd32.o: loader/i386/bsd32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -MT loader/i386/bsd_module-bsd32.o -MD -MP -MF loader/i386/$(DEPDIR)/bsd_module-bsd32.Tpo -c -o loader/i386/bsd_module-bsd32.o `test -f 'loader/i386/bsd32.c' || echo '$(srcdir)/'`loader/i386/bsd32.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/bsd_module-bsd32.Tpo loader/i386/$(DEPDIR)/bsd_module-bsd32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/bsd32.c' object='loader/i386/bsd_module-bsd32.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -c -o loader/i386/bsd_module-bsd32.o `test -f 'loader/i386/bsd32.c' || echo '$(srcdir)/'`loader/i386/bsd32.c
+
+loader/i386/bsd_module-bsd32.obj: loader/i386/bsd32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -MT loader/i386/bsd_module-bsd32.obj -MD -MP -MF loader/i386/$(DEPDIR)/bsd_module-bsd32.Tpo -c -o loader/i386/bsd_module-bsd32.obj `if test -f 'loader/i386/bsd32.c'; then $(CYGPATH_W) 'loader/i386/bsd32.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/bsd32.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/bsd_module-bsd32.Tpo loader/i386/$(DEPDIR)/bsd_module-bsd32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/bsd32.c' object='loader/i386/bsd_module-bsd32.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -c -o loader/i386/bsd_module-bsd32.obj `if test -f 'loader/i386/bsd32.c'; then $(CYGPATH_W) 'loader/i386/bsd32.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/bsd32.c'; fi`
+
+loader/i386/bsd_module-bsd64.o: loader/i386/bsd64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -MT loader/i386/bsd_module-bsd64.o -MD -MP -MF loader/i386/$(DEPDIR)/bsd_module-bsd64.Tpo -c -o loader/i386/bsd_module-bsd64.o `test -f 'loader/i386/bsd64.c' || echo '$(srcdir)/'`loader/i386/bsd64.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/bsd_module-bsd64.Tpo loader/i386/$(DEPDIR)/bsd_module-bsd64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/bsd64.c' object='loader/i386/bsd_module-bsd64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -c -o loader/i386/bsd_module-bsd64.o `test -f 'loader/i386/bsd64.c' || echo '$(srcdir)/'`loader/i386/bsd64.c
+
+loader/i386/bsd_module-bsd64.obj: loader/i386/bsd64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -MT loader/i386/bsd_module-bsd64.obj -MD -MP -MF loader/i386/$(DEPDIR)/bsd_module-bsd64.Tpo -c -o loader/i386/bsd_module-bsd64.obj `if test -f 'loader/i386/bsd64.c'; then $(CYGPATH_W) 'loader/i386/bsd64.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/bsd64.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/bsd_module-bsd64.Tpo loader/i386/$(DEPDIR)/bsd_module-bsd64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/bsd64.c' object='loader/i386/bsd_module-bsd64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $(bsd_module_CFLAGS) $(CFLAGS) -c -o loader/i386/bsd_module-bsd64.obj `if test -f 'loader/i386/bsd64.c'; then $(CYGPATH_W) 'loader/i386/bsd64.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/bsd64.c'; fi`
+
+fs/btrfs_module-btrfs.o: fs/btrfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -MT fs/btrfs_module-btrfs.o -MD -MP -MF fs/$(DEPDIR)/btrfs_module-btrfs.Tpo -c -o fs/btrfs_module-btrfs.o `test -f 'fs/btrfs.c' || echo '$(srcdir)/'`fs/btrfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/btrfs_module-btrfs.Tpo fs/$(DEPDIR)/btrfs_module-btrfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/btrfs.c' object='fs/btrfs_module-btrfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -c -o fs/btrfs_module-btrfs.o `test -f 'fs/btrfs.c' || echo '$(srcdir)/'`fs/btrfs.c
+
+fs/btrfs_module-btrfs.obj: fs/btrfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -MT fs/btrfs_module-btrfs.obj -MD -MP -MF fs/$(DEPDIR)/btrfs_module-btrfs.Tpo -c -o fs/btrfs_module-btrfs.obj `if test -f 'fs/btrfs.c'; then $(CYGPATH_W) 'fs/btrfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/btrfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/btrfs_module-btrfs.Tpo fs/$(DEPDIR)/btrfs_module-btrfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/btrfs.c' object='fs/btrfs_module-btrfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -c -o fs/btrfs_module-btrfs.obj `if test -f 'fs/btrfs.c'; then $(CYGPATH_W) 'fs/btrfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/btrfs.c'; fi`
+
+lib/btrfs_module-crc.o: lib/crc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -MT lib/btrfs_module-crc.o -MD -MP -MF lib/$(DEPDIR)/btrfs_module-crc.Tpo -c -o lib/btrfs_module-crc.o `test -f 'lib/crc.c' || echo '$(srcdir)/'`lib/crc.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/btrfs_module-crc.Tpo lib/$(DEPDIR)/btrfs_module-crc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/crc.c' object='lib/btrfs_module-crc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -c -o lib/btrfs_module-crc.o `test -f 'lib/crc.c' || echo '$(srcdir)/'`lib/crc.c
+
+lib/btrfs_module-crc.obj: lib/crc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -MT lib/btrfs_module-crc.obj -MD -MP -MF lib/$(DEPDIR)/btrfs_module-crc.Tpo -c -o lib/btrfs_module-crc.obj `if test -f 'lib/crc.c'; then $(CYGPATH_W) 'lib/crc.c'; else $(CYGPATH_W) '$(srcdir)/lib/crc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/btrfs_module-crc.Tpo lib/$(DEPDIR)/btrfs_module-crc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/crc.c' object='lib/btrfs_module-crc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $(btrfs_module_CFLAGS) $(CFLAGS) -c -o lib/btrfs_module-crc.obj `if test -f 'lib/crc.c'; then $(CYGPATH_W) 'lib/crc.c'; else $(CYGPATH_W) '$(srcdir)/lib/crc.c'; fi`
+
+io/bufio_module-bufio.o: io/bufio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $(bufio_module_CFLAGS) $(CFLAGS) -MT io/bufio_module-bufio.o -MD -MP -MF io/$(DEPDIR)/bufio_module-bufio.Tpo -c -o io/bufio_module-bufio.o `test -f 'io/bufio.c' || echo '$(srcdir)/'`io/bufio.c
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/bufio_module-bufio.Tpo io/$(DEPDIR)/bufio_module-bufio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/bufio.c' object='io/bufio_module-bufio.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $(bufio_module_CFLAGS) $(CFLAGS) -c -o io/bufio_module-bufio.o `test -f 'io/bufio.c' || echo '$(srcdir)/'`io/bufio.c
+
+io/bufio_module-bufio.obj: io/bufio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $(bufio_module_CFLAGS) $(CFLAGS) -MT io/bufio_module-bufio.obj -MD -MP -MF io/$(DEPDIR)/bufio_module-bufio.Tpo -c -o io/bufio_module-bufio.obj `if test -f 'io/bufio.c'; then $(CYGPATH_W) 'io/bufio.c'; else $(CYGPATH_W) '$(srcdir)/io/bufio.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/bufio_module-bufio.Tpo io/$(DEPDIR)/bufio_module-bufio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/bufio.c' object='io/bufio_module-bufio.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $(bufio_module_CFLAGS) $(CFLAGS) -c -o io/bufio_module-bufio.obj `if test -f 'io/bufio.c'; then $(CYGPATH_W) 'io/bufio.c'; else $(CYGPATH_W) '$(srcdir)/io/bufio.c'; fi`
+
+commands/cat_module-cat.o: commands/cat.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $(cat_module_CFLAGS) $(CFLAGS) -MT commands/cat_module-cat.o -MD -MP -MF commands/$(DEPDIR)/cat_module-cat.Tpo -c -o commands/cat_module-cat.o `test -f 'commands/cat.c' || echo '$(srcdir)/'`commands/cat.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/cat_module-cat.Tpo commands/$(DEPDIR)/cat_module-cat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/cat.c' object='commands/cat_module-cat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $(cat_module_CFLAGS) $(CFLAGS) -c -o commands/cat_module-cat.o `test -f 'commands/cat.c' || echo '$(srcdir)/'`commands/cat.c
+
+commands/cat_module-cat.obj: commands/cat.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $(cat_module_CFLAGS) $(CFLAGS) -MT commands/cat_module-cat.obj -MD -MP -MF commands/$(DEPDIR)/cat_module-cat.Tpo -c -o commands/cat_module-cat.obj `if test -f 'commands/cat.c'; then $(CYGPATH_W) 'commands/cat.c'; else $(CYGPATH_W) '$(srcdir)/commands/cat.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/cat_module-cat.Tpo commands/$(DEPDIR)/cat_module-cat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/cat.c' object='commands/cat_module-cat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $(cat_module_CFLAGS) $(CFLAGS) -c -o commands/cat_module-cat.obj `if test -f 'commands/cat.c'; then $(CYGPATH_W) 'commands/cat.c'; else $(CYGPATH_W) '$(srcdir)/commands/cat.c'; fi`
+
+loader/efi/chain_module-chainloader.o: loader/efi/chainloader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -MT loader/efi/chain_module-chainloader.o -MD -MP -MF loader/efi/$(DEPDIR)/chain_module-chainloader.Tpo -c -o loader/efi/chain_module-chainloader.o `test -f 'loader/efi/chainloader.c' || echo '$(srcdir)/'`loader/efi/chainloader.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/efi/$(DEPDIR)/chain_module-chainloader.Tpo loader/efi/$(DEPDIR)/chain_module-chainloader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/efi/chainloader.c' object='loader/efi/chain_module-chainloader.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -c -o loader/efi/chain_module-chainloader.o `test -f 'loader/efi/chainloader.c' || echo '$(srcdir)/'`loader/efi/chainloader.c
+
+loader/efi/chain_module-chainloader.obj: loader/efi/chainloader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -MT loader/efi/chain_module-chainloader.obj -MD -MP -MF loader/efi/$(DEPDIR)/chain_module-chainloader.Tpo -c -o loader/efi/chain_module-chainloader.obj `if test -f 'loader/efi/chainloader.c'; then $(CYGPATH_W) 'loader/efi/chainloader.c'; else $(CYGPATH_W) '$(srcdir)/loader/efi/chainloader.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/efi/$(DEPDIR)/chain_module-chainloader.Tpo loader/efi/$(DEPDIR)/chain_module-chainloader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/efi/chainloader.c' object='loader/efi/chain_module-chainloader.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -c -o loader/efi/chain_module-chainloader.obj `if test -f 'loader/efi/chainloader.c'; then $(CYGPATH_W) 'loader/efi/chainloader.c'; else $(CYGPATH_W) '$(srcdir)/loader/efi/chainloader.c'; fi`
+
+loader/i386/pc/chain_module-chainloader.o: loader/i386/pc/chainloader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -MT loader/i386/pc/chain_module-chainloader.o -MD -MP -MF loader/i386/pc/$(DEPDIR)/chain_module-chainloader.Tpo -c -o loader/i386/pc/chain_module-chainloader.o `test -f 'loader/i386/pc/chainloader.c' || echo '$(srcdir)/'`loader/i386/pc/chainloader.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/pc/$(DEPDIR)/chain_module-chainloader.Tpo loader/i386/pc/$(DEPDIR)/chain_module-chainloader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/pc/chainloader.c' object='loader/i386/pc/chain_module-chainloader.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -c -o loader/i386/pc/chain_module-chainloader.o `test -f 'loader/i386/pc/chainloader.c' || echo '$(srcdir)/'`loader/i386/pc/chainloader.c
+
+loader/i386/pc/chain_module-chainloader.obj: loader/i386/pc/chainloader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -MT loader/i386/pc/chain_module-chainloader.obj -MD -MP -MF loader/i386/pc/$(DEPDIR)/chain_module-chainloader.Tpo -c -o loader/i386/pc/chain_module-chainloader.obj `if test -f 'loader/i386/pc/chainloader.c'; then $(CYGPATH_W) 'loader/i386/pc/chainloader.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/pc/chainloader.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/pc/$(DEPDIR)/chain_module-chainloader.Tpo loader/i386/pc/$(DEPDIR)/chain_module-chainloader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/pc/chainloader.c' object='loader/i386/pc/chain_module-chainloader.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $(chain_module_CFLAGS) $(CFLAGS) -c -o loader/i386/pc/chain_module-chainloader.obj `if test -f 'loader/i386/pc/chainloader.c'; then $(CYGPATH_W) 'loader/i386/pc/chainloader.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/pc/chainloader.c'; fi`
+
+commands/i386/cmostest_module-cmostest.o: commands/i386/cmostest.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $(cmostest_module_CFLAGS) $(CFLAGS) -MT commands/i386/cmostest_module-cmostest.o -MD -MP -MF commands/i386/$(DEPDIR)/cmostest_module-cmostest.Tpo -c -o commands/i386/cmostest_module-cmostest.o `test -f 'commands/i386/cmostest.c' || echo '$(srcdir)/'`commands/i386/cmostest.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/$(DEPDIR)/cmostest_module-cmostest.Tpo commands/i386/$(DEPDIR)/cmostest_module-cmostest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/cmostest.c' object='commands/i386/cmostest_module-cmostest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $(cmostest_module_CFLAGS) $(CFLAGS) -c -o commands/i386/cmostest_module-cmostest.o `test -f 'commands/i386/cmostest.c' || echo '$(srcdir)/'`commands/i386/cmostest.c
+
+commands/i386/cmostest_module-cmostest.obj: commands/i386/cmostest.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $(cmostest_module_CFLAGS) $(CFLAGS) -MT commands/i386/cmostest_module-cmostest.obj -MD -MP -MF commands/i386/$(DEPDIR)/cmostest_module-cmostest.Tpo -c -o commands/i386/cmostest_module-cmostest.obj `if test -f 'commands/i386/cmostest.c'; then $(CYGPATH_W) 'commands/i386/cmostest.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/cmostest.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/$(DEPDIR)/cmostest_module-cmostest.Tpo commands/i386/$(DEPDIR)/cmostest_module-cmostest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/cmostest.c' object='commands/i386/cmostest_module-cmostest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $(cmostest_module_CFLAGS) $(CFLAGS) -c -o commands/i386/cmostest_module-cmostest.obj `if test -f 'commands/i386/cmostest.c'; then $(CYGPATH_W) 'commands/i386/cmostest.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/cmostest.c'; fi`
+
+commands/cmp_module-cmp.o: commands/cmp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $(cmp_module_CFLAGS) $(CFLAGS) -MT commands/cmp_module-cmp.o -MD -MP -MF commands/$(DEPDIR)/cmp_module-cmp.Tpo -c -o commands/cmp_module-cmp.o `test -f 'commands/cmp.c' || echo '$(srcdir)/'`commands/cmp.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/cmp_module-cmp.Tpo commands/$(DEPDIR)/cmp_module-cmp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/cmp.c' object='commands/cmp_module-cmp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $(cmp_module_CFLAGS) $(CFLAGS) -c -o commands/cmp_module-cmp.o `test -f 'commands/cmp.c' || echo '$(srcdir)/'`commands/cmp.c
+
+commands/cmp_module-cmp.obj: commands/cmp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $(cmp_module_CFLAGS) $(CFLAGS) -MT commands/cmp_module-cmp.obj -MD -MP -MF commands/$(DEPDIR)/cmp_module-cmp.Tpo -c -o commands/cmp_module-cmp.obj `if test -f 'commands/cmp.c'; then $(CYGPATH_W) 'commands/cmp.c'; else $(CYGPATH_W) '$(srcdir)/commands/cmp.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/cmp_module-cmp.Tpo commands/$(DEPDIR)/cmp_module-cmp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/cmp.c' object='commands/cmp_module-cmp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $(cmp_module_CFLAGS) $(CFLAGS) -c -o commands/cmp_module-cmp.obj `if test -f 'commands/cmp.c'; then $(CYGPATH_W) 'commands/cmp.c'; else $(CYGPATH_W) '$(srcdir)/commands/cmp.c'; fi`
+
+commands/configfile_module-configfile.o: commands/configfile.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $(configfile_module_CFLAGS) $(CFLAGS) -MT commands/configfile_module-configfile.o -MD -MP -MF commands/$(DEPDIR)/configfile_module-configfile.Tpo -c -o commands/configfile_module-configfile.o `test -f 'commands/configfile.c' || echo '$(srcdir)/'`commands/configfile.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/configfile_module-configfile.Tpo commands/$(DEPDIR)/configfile_module-configfile.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/configfile.c' object='commands/configfile_module-configfile.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $(configfile_module_CFLAGS) $(CFLAGS) -c -o commands/configfile_module-configfile.o `test -f 'commands/configfile.c' || echo '$(srcdir)/'`commands/configfile.c
+
+commands/configfile_module-configfile.obj: commands/configfile.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $(configfile_module_CFLAGS) $(CFLAGS) -MT commands/configfile_module-configfile.obj -MD -MP -MF commands/$(DEPDIR)/configfile_module-configfile.Tpo -c -o commands/configfile_module-configfile.obj `if test -f 'commands/configfile.c'; then $(CYGPATH_W) 'commands/configfile.c'; else $(CYGPATH_W) '$(srcdir)/commands/configfile.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/configfile_module-configfile.Tpo commands/$(DEPDIR)/configfile_module-configfile.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/configfile.c' object='commands/configfile_module-configfile.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $(configfile_module_CFLAGS) $(CFLAGS) -c -o commands/configfile_module-configfile.obj `if test -f 'commands/configfile.c'; then $(CYGPATH_W) 'commands/configfile.c'; else $(CYGPATH_W) '$(srcdir)/commands/configfile.c'; fi`
+
+fs/cpio_module-cpio.o: fs/cpio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $(cpio_module_CFLAGS) $(CFLAGS) -MT fs/cpio_module-cpio.o -MD -MP -MF fs/$(DEPDIR)/cpio_module-cpio.Tpo -c -o fs/cpio_module-cpio.o `test -f 'fs/cpio.c' || echo '$(srcdir)/'`fs/cpio.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/cpio_module-cpio.Tpo fs/$(DEPDIR)/cpio_module-cpio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/cpio.c' object='fs/cpio_module-cpio.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $(cpio_module_CFLAGS) $(CFLAGS) -c -o fs/cpio_module-cpio.o `test -f 'fs/cpio.c' || echo '$(srcdir)/'`fs/cpio.c
+
+fs/cpio_module-cpio.obj: fs/cpio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $(cpio_module_CFLAGS) $(CFLAGS) -MT fs/cpio_module-cpio.obj -MD -MP -MF fs/$(DEPDIR)/cpio_module-cpio.Tpo -c -o fs/cpio_module-cpio.obj `if test -f 'fs/cpio.c'; then $(CYGPATH_W) 'fs/cpio.c'; else $(CYGPATH_W) '$(srcdir)/fs/cpio.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/cpio_module-cpio.Tpo fs/$(DEPDIR)/cpio_module-cpio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/cpio.c' object='fs/cpio_module-cpio.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $(cpio_module_CFLAGS) $(CFLAGS) -c -o fs/cpio_module-cpio.obj `if test -f 'fs/cpio.c'; then $(CYGPATH_W) 'fs/cpio.c'; else $(CYGPATH_W) '$(srcdir)/fs/cpio.c'; fi`
+
+commands/i386/cpuid_module-cpuid.o: commands/i386/cpuid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $(cpuid_module_CFLAGS) $(CFLAGS) -MT commands/i386/cpuid_module-cpuid.o -MD -MP -MF commands/i386/$(DEPDIR)/cpuid_module-cpuid.Tpo -c -o commands/i386/cpuid_module-cpuid.o `test -f 'commands/i386/cpuid.c' || echo '$(srcdir)/'`commands/i386/cpuid.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/$(DEPDIR)/cpuid_module-cpuid.Tpo commands/i386/$(DEPDIR)/cpuid_module-cpuid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/cpuid.c' object='commands/i386/cpuid_module-cpuid.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $(cpuid_module_CFLAGS) $(CFLAGS) -c -o commands/i386/cpuid_module-cpuid.o `test -f 'commands/i386/cpuid.c' || echo '$(srcdir)/'`commands/i386/cpuid.c
+
+commands/i386/cpuid_module-cpuid.obj: commands/i386/cpuid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $(cpuid_module_CFLAGS) $(CFLAGS) -MT commands/i386/cpuid_module-cpuid.obj -MD -MP -MF commands/i386/$(DEPDIR)/cpuid_module-cpuid.Tpo -c -o commands/i386/cpuid_module-cpuid.obj `if test -f 'commands/i386/cpuid.c'; then $(CYGPATH_W) 'commands/i386/cpuid.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/cpuid.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/$(DEPDIR)/cpuid_module-cpuid.Tpo commands/i386/$(DEPDIR)/cpuid_module-cpuid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/cpuid.c' object='commands/i386/cpuid_module-cpuid.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $(cpuid_module_CFLAGS) $(CFLAGS) -c -o commands/i386/cpuid_module-cpuid.obj `if test -f 'commands/i386/cpuid.c'; then $(CYGPATH_W) 'commands/i386/cpuid.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/cpuid.c'; fi`
+
+lib/crypto_module-crypto.o: lib/crypto.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $(crypto_module_CFLAGS) $(CFLAGS) -MT lib/crypto_module-crypto.o -MD -MP -MF lib/$(DEPDIR)/crypto_module-crypto.Tpo -c -o lib/crypto_module-crypto.o `test -f 'lib/crypto.c' || echo '$(srcdir)/'`lib/crypto.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/crypto_module-crypto.Tpo lib/$(DEPDIR)/crypto_module-crypto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/crypto.c' object='lib/crypto_module-crypto.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $(crypto_module_CFLAGS) $(CFLAGS) -c -o lib/crypto_module-crypto.o `test -f 'lib/crypto.c' || echo '$(srcdir)/'`lib/crypto.c
+
+lib/crypto_module-crypto.obj: lib/crypto.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $(crypto_module_CFLAGS) $(CFLAGS) -MT lib/crypto_module-crypto.obj -MD -MP -MF lib/$(DEPDIR)/crypto_module-crypto.Tpo -c -o lib/crypto_module-crypto.obj `if test -f 'lib/crypto.c'; then $(CYGPATH_W) 'lib/crypto.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/crypto_module-crypto.Tpo lib/$(DEPDIR)/crypto_module-crypto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/crypto.c' object='lib/crypto_module-crypto.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $(crypto_module_CFLAGS) $(CFLAGS) -c -o lib/crypto_module-crypto.obj `if test -f 'lib/crypto.c'; then $(CYGPATH_W) 'lib/crypto.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto.c'; fi`
+
+bus/cs5536_module-cs5536.o: bus/cs5536.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $(cs5536_module_CFLAGS) $(CFLAGS) -MT bus/cs5536_module-cs5536.o -MD -MP -MF bus/$(DEPDIR)/cs5536_module-cs5536.Tpo -c -o bus/cs5536_module-cs5536.o `test -f 'bus/cs5536.c' || echo '$(srcdir)/'`bus/cs5536.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/cs5536_module-cs5536.Tpo bus/$(DEPDIR)/cs5536_module-cs5536.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/cs5536.c' object='bus/cs5536_module-cs5536.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $(cs5536_module_CFLAGS) $(CFLAGS) -c -o bus/cs5536_module-cs5536.o `test -f 'bus/cs5536.c' || echo '$(srcdir)/'`bus/cs5536.c
+
+bus/cs5536_module-cs5536.obj: bus/cs5536.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $(cs5536_module_CFLAGS) $(CFLAGS) -MT bus/cs5536_module-cs5536.obj -MD -MP -MF bus/$(DEPDIR)/cs5536_module-cs5536.Tpo -c -o bus/cs5536_module-cs5536.obj `if test -f 'bus/cs5536.c'; then $(CYGPATH_W) 'bus/cs5536.c'; else $(CYGPATH_W) '$(srcdir)/bus/cs5536.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/cs5536_module-cs5536.Tpo bus/$(DEPDIR)/cs5536_module-cs5536.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/cs5536.c' object='bus/cs5536_module-cs5536.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $(cs5536_module_CFLAGS) $(CFLAGS) -c -o bus/cs5536_module-cs5536.obj `if test -f 'bus/cs5536.c'; then $(CYGPATH_W) 'bus/cs5536.c'; else $(CYGPATH_W) '$(srcdir)/bus/cs5536.c'; fi`
+
+commands/date_module-date.o: commands/date.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $(date_module_CFLAGS) $(CFLAGS) -MT commands/date_module-date.o -MD -MP -MF commands/$(DEPDIR)/date_module-date.Tpo -c -o commands/date_module-date.o `test -f 'commands/date.c' || echo '$(srcdir)/'`commands/date.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/date_module-date.Tpo commands/$(DEPDIR)/date_module-date.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/date.c' object='commands/date_module-date.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $(date_module_CFLAGS) $(CFLAGS) -c -o commands/date_module-date.o `test -f 'commands/date.c' || echo '$(srcdir)/'`commands/date.c
+
+commands/date_module-date.obj: commands/date.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $(date_module_CFLAGS) $(CFLAGS) -MT commands/date_module-date.obj -MD -MP -MF commands/$(DEPDIR)/date_module-date.Tpo -c -o commands/date_module-date.obj `if test -f 'commands/date.c'; then $(CYGPATH_W) 'commands/date.c'; else $(CYGPATH_W) '$(srcdir)/commands/date.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/date_module-date.Tpo commands/$(DEPDIR)/date_module-date.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/date.c' object='commands/date_module-date.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $(date_module_CFLAGS) $(CFLAGS) -c -o commands/date_module-date.obj `if test -f 'commands/date.c'; then $(CYGPATH_W) 'commands/date.c'; else $(CYGPATH_W) '$(srcdir)/commands/date.c'; fi`
+
+hook/datehook_module-datehook.o: hook/datehook.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $(datehook_module_CFLAGS) $(CFLAGS) -MT hook/datehook_module-datehook.o -MD -MP -MF hook/$(DEPDIR)/datehook_module-datehook.Tpo -c -o hook/datehook_module-datehook.o `test -f 'hook/datehook.c' || echo '$(srcdir)/'`hook/datehook.c
+@am__fastdepCC_TRUE@ $(am__mv) hook/$(DEPDIR)/datehook_module-datehook.Tpo hook/$(DEPDIR)/datehook_module-datehook.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hook/datehook.c' object='hook/datehook_module-datehook.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $(datehook_module_CFLAGS) $(CFLAGS) -c -o hook/datehook_module-datehook.o `test -f 'hook/datehook.c' || echo '$(srcdir)/'`hook/datehook.c
+
+hook/datehook_module-datehook.obj: hook/datehook.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $(datehook_module_CFLAGS) $(CFLAGS) -MT hook/datehook_module-datehook.obj -MD -MP -MF hook/$(DEPDIR)/datehook_module-datehook.Tpo -c -o hook/datehook_module-datehook.obj `if test -f 'hook/datehook.c'; then $(CYGPATH_W) 'hook/datehook.c'; else $(CYGPATH_W) '$(srcdir)/hook/datehook.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) hook/$(DEPDIR)/datehook_module-datehook.Tpo hook/$(DEPDIR)/datehook_module-datehook.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hook/datehook.c' object='hook/datehook_module-datehook.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $(datehook_module_CFLAGS) $(CFLAGS) -c -o hook/datehook_module-datehook.obj `if test -f 'hook/datehook.c'; then $(CYGPATH_W) 'hook/datehook.c'; else $(CYGPATH_W) '$(srcdir)/hook/datehook.c'; fi`
+
+lib/datetime_module-cmos_datetime.o: lib/cmos_datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -MT lib/datetime_module-cmos_datetime.o -MD -MP -MF lib/$(DEPDIR)/datetime_module-cmos_datetime.Tpo -c -o lib/datetime_module-cmos_datetime.o `test -f 'lib/cmos_datetime.c' || echo '$(srcdir)/'`lib/cmos_datetime.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/datetime_module-cmos_datetime.Tpo lib/$(DEPDIR)/datetime_module-cmos_datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/cmos_datetime.c' object='lib/datetime_module-cmos_datetime.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -c -o lib/datetime_module-cmos_datetime.o `test -f 'lib/cmos_datetime.c' || echo '$(srcdir)/'`lib/cmos_datetime.c
+
+lib/datetime_module-cmos_datetime.obj: lib/cmos_datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -MT lib/datetime_module-cmos_datetime.obj -MD -MP -MF lib/$(DEPDIR)/datetime_module-cmos_datetime.Tpo -c -o lib/datetime_module-cmos_datetime.obj `if test -f 'lib/cmos_datetime.c'; then $(CYGPATH_W) 'lib/cmos_datetime.c'; else $(CYGPATH_W) '$(srcdir)/lib/cmos_datetime.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/datetime_module-cmos_datetime.Tpo lib/$(DEPDIR)/datetime_module-cmos_datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/cmos_datetime.c' object='lib/datetime_module-cmos_datetime.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -c -o lib/datetime_module-cmos_datetime.obj `if test -f 'lib/cmos_datetime.c'; then $(CYGPATH_W) 'lib/cmos_datetime.c'; else $(CYGPATH_W) '$(srcdir)/lib/cmos_datetime.c'; fi`
+
+lib/efi/datetime_module-datetime.o: lib/efi/datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -MT lib/efi/datetime_module-datetime.o -MD -MP -MF lib/efi/$(DEPDIR)/datetime_module-datetime.Tpo -c -o lib/efi/datetime_module-datetime.o `test -f 'lib/efi/datetime.c' || echo '$(srcdir)/'`lib/efi/datetime.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/efi/$(DEPDIR)/datetime_module-datetime.Tpo lib/efi/$(DEPDIR)/datetime_module-datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/efi/datetime.c' object='lib/efi/datetime_module-datetime.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -c -o lib/efi/datetime_module-datetime.o `test -f 'lib/efi/datetime.c' || echo '$(srcdir)/'`lib/efi/datetime.c
+
+lib/efi/datetime_module-datetime.obj: lib/efi/datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -MT lib/efi/datetime_module-datetime.obj -MD -MP -MF lib/efi/$(DEPDIR)/datetime_module-datetime.Tpo -c -o lib/efi/datetime_module-datetime.obj `if test -f 'lib/efi/datetime.c'; then $(CYGPATH_W) 'lib/efi/datetime.c'; else $(CYGPATH_W) '$(srcdir)/lib/efi/datetime.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/efi/$(DEPDIR)/datetime_module-datetime.Tpo lib/efi/$(DEPDIR)/datetime_module-datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/efi/datetime.c' object='lib/efi/datetime_module-datetime.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -c -o lib/efi/datetime_module-datetime.obj `if test -f 'lib/efi/datetime.c'; then $(CYGPATH_W) 'lib/efi/datetime.c'; else $(CYGPATH_W) '$(srcdir)/lib/efi/datetime.c'; fi`
+
+lib/ieee1275/datetime_module-datetime.o: lib/ieee1275/datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -MT lib/ieee1275/datetime_module-datetime.o -MD -MP -MF lib/ieee1275/$(DEPDIR)/datetime_module-datetime.Tpo -c -o lib/ieee1275/datetime_module-datetime.o `test -f 'lib/ieee1275/datetime.c' || echo '$(srcdir)/'`lib/ieee1275/datetime.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/ieee1275/$(DEPDIR)/datetime_module-datetime.Tpo lib/ieee1275/$(DEPDIR)/datetime_module-datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/ieee1275/datetime.c' object='lib/ieee1275/datetime_module-datetime.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -c -o lib/ieee1275/datetime_module-datetime.o `test -f 'lib/ieee1275/datetime.c' || echo '$(srcdir)/'`lib/ieee1275/datetime.c
+
+lib/ieee1275/datetime_module-datetime.obj: lib/ieee1275/datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -MT lib/ieee1275/datetime_module-datetime.obj -MD -MP -MF lib/ieee1275/$(DEPDIR)/datetime_module-datetime.Tpo -c -o lib/ieee1275/datetime_module-datetime.obj `if test -f 'lib/ieee1275/datetime.c'; then $(CYGPATH_W) 'lib/ieee1275/datetime.c'; else $(CYGPATH_W) '$(srcdir)/lib/ieee1275/datetime.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/ieee1275/$(DEPDIR)/datetime_module-datetime.Tpo lib/ieee1275/$(DEPDIR)/datetime_module-datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/ieee1275/datetime.c' object='lib/ieee1275/datetime_module-datetime.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $(datetime_module_CFLAGS) $(CFLAGS) -c -o lib/ieee1275/datetime_module-datetime.obj `if test -f 'lib/ieee1275/datetime.c'; then $(CYGPATH_W) 'lib/ieee1275/datetime.c'; else $(CYGPATH_W) '$(srcdir)/lib/ieee1275/datetime.c'; fi`
+
+disk/dm_nv_module-dmraid_nvidia.o: disk/dmraid_nvidia.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $(dm_nv_module_CFLAGS) $(CFLAGS) -MT disk/dm_nv_module-dmraid_nvidia.o -MD -MP -MF disk/$(DEPDIR)/dm_nv_module-dmraid_nvidia.Tpo -c -o disk/dm_nv_module-dmraid_nvidia.o `test -f 'disk/dmraid_nvidia.c' || echo '$(srcdir)/'`disk/dmraid_nvidia.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/dm_nv_module-dmraid_nvidia.Tpo disk/$(DEPDIR)/dm_nv_module-dmraid_nvidia.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/dmraid_nvidia.c' object='disk/dm_nv_module-dmraid_nvidia.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $(dm_nv_module_CFLAGS) $(CFLAGS) -c -o disk/dm_nv_module-dmraid_nvidia.o `test -f 'disk/dmraid_nvidia.c' || echo '$(srcdir)/'`disk/dmraid_nvidia.c
+
+disk/dm_nv_module-dmraid_nvidia.obj: disk/dmraid_nvidia.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $(dm_nv_module_CFLAGS) $(CFLAGS) -MT disk/dm_nv_module-dmraid_nvidia.obj -MD -MP -MF disk/$(DEPDIR)/dm_nv_module-dmraid_nvidia.Tpo -c -o disk/dm_nv_module-dmraid_nvidia.obj `if test -f 'disk/dmraid_nvidia.c'; then $(CYGPATH_W) 'disk/dmraid_nvidia.c'; else $(CYGPATH_W) '$(srcdir)/disk/dmraid_nvidia.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/dm_nv_module-dmraid_nvidia.Tpo disk/$(DEPDIR)/dm_nv_module-dmraid_nvidia.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/dmraid_nvidia.c' object='disk/dm_nv_module-dmraid_nvidia.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $(dm_nv_module_CFLAGS) $(CFLAGS) -c -o disk/dm_nv_module-dmraid_nvidia.obj `if test -f 'disk/dmraid_nvidia.c'; then $(CYGPATH_W) 'disk/dmraid_nvidia.c'; else $(CYGPATH_W) '$(srcdir)/disk/dmraid_nvidia.c'; fi`
+
+commands/i386/pc/drivemap_module-drivemap.o: commands/i386/pc/drivemap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/drivemap_module-drivemap.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap.Tpo -c -o commands/i386/pc/drivemap_module-drivemap.o `test -f 'commands/i386/pc/drivemap.c' || echo '$(srcdir)/'`commands/i386/pc/drivemap.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap.Tpo commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/drivemap.c' object='commands/i386/pc/drivemap_module-drivemap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/drivemap_module-drivemap.o `test -f 'commands/i386/pc/drivemap.c' || echo '$(srcdir)/'`commands/i386/pc/drivemap.c
+
+commands/i386/pc/drivemap_module-drivemap.obj: commands/i386/pc/drivemap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/drivemap_module-drivemap.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap.Tpo -c -o commands/i386/pc/drivemap_module-drivemap.obj `if test -f 'commands/i386/pc/drivemap.c'; then $(CYGPATH_W) 'commands/i386/pc/drivemap.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/drivemap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap.Tpo commands/i386/pc/$(DEPDIR)/drivemap_module-drivemap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/drivemap.c' object='commands/i386/pc/drivemap_module-drivemap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $(drivemap_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/drivemap_module-drivemap.obj `if test -f 'commands/i386/pc/drivemap.c'; then $(CYGPATH_W) 'commands/i386/pc/drivemap.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/drivemap.c'; fi`
+
+commands/echo_module-echo.o: commands/echo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $(echo_module_CFLAGS) $(CFLAGS) -MT commands/echo_module-echo.o -MD -MP -MF commands/$(DEPDIR)/echo_module-echo.Tpo -c -o commands/echo_module-echo.o `test -f 'commands/echo.c' || echo '$(srcdir)/'`commands/echo.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/echo_module-echo.Tpo commands/$(DEPDIR)/echo_module-echo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/echo.c' object='commands/echo_module-echo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $(echo_module_CFLAGS) $(CFLAGS) -c -o commands/echo_module-echo.o `test -f 'commands/echo.c' || echo '$(srcdir)/'`commands/echo.c
+
+commands/echo_module-echo.obj: commands/echo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $(echo_module_CFLAGS) $(CFLAGS) -MT commands/echo_module-echo.obj -MD -MP -MF commands/$(DEPDIR)/echo_module-echo.Tpo -c -o commands/echo_module-echo.obj `if test -f 'commands/echo.c'; then $(CYGPATH_W) 'commands/echo.c'; else $(CYGPATH_W) '$(srcdir)/commands/echo.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/echo_module-echo.Tpo commands/$(DEPDIR)/echo_module-echo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/echo.c' object='commands/echo_module-echo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $(echo_module_CFLAGS) $(CFLAGS) -c -o commands/echo_module-echo.obj `if test -f 'commands/echo.c'; then $(CYGPATH_W) 'commands/echo.c'; else $(CYGPATH_W) '$(srcdir)/commands/echo.c'; fi`
+
+video/efi_gop_module-efi_gop.o: video/efi_gop.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $(efi_gop_module_CFLAGS) $(CFLAGS) -MT video/efi_gop_module-efi_gop.o -MD -MP -MF video/$(DEPDIR)/efi_gop_module-efi_gop.Tpo -c -o video/efi_gop_module-efi_gop.o `test -f 'video/efi_gop.c' || echo '$(srcdir)/'`video/efi_gop.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/efi_gop_module-efi_gop.Tpo video/$(DEPDIR)/efi_gop_module-efi_gop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/efi_gop.c' object='video/efi_gop_module-efi_gop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $(efi_gop_module_CFLAGS) $(CFLAGS) -c -o video/efi_gop_module-efi_gop.o `test -f 'video/efi_gop.c' || echo '$(srcdir)/'`video/efi_gop.c
+
+video/efi_gop_module-efi_gop.obj: video/efi_gop.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $(efi_gop_module_CFLAGS) $(CFLAGS) -MT video/efi_gop_module-efi_gop.obj -MD -MP -MF video/$(DEPDIR)/efi_gop_module-efi_gop.Tpo -c -o video/efi_gop_module-efi_gop.obj `if test -f 'video/efi_gop.c'; then $(CYGPATH_W) 'video/efi_gop.c'; else $(CYGPATH_W) '$(srcdir)/video/efi_gop.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/efi_gop_module-efi_gop.Tpo video/$(DEPDIR)/efi_gop_module-efi_gop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/efi_gop.c' object='video/efi_gop_module-efi_gop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $(efi_gop_module_CFLAGS) $(CFLAGS) -c -o video/efi_gop_module-efi_gop.obj `if test -f 'video/efi_gop.c'; then $(CYGPATH_W) 'video/efi_gop.c'; else $(CYGPATH_W) '$(srcdir)/video/efi_gop.c'; fi`
+
+video/efi_uga_module-efi_uga.o: video/efi_uga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $(efi_uga_module_CFLAGS) $(CFLAGS) -MT video/efi_uga_module-efi_uga.o -MD -MP -MF video/$(DEPDIR)/efi_uga_module-efi_uga.Tpo -c -o video/efi_uga_module-efi_uga.o `test -f 'video/efi_uga.c' || echo '$(srcdir)/'`video/efi_uga.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/efi_uga_module-efi_uga.Tpo video/$(DEPDIR)/efi_uga_module-efi_uga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/efi_uga.c' object='video/efi_uga_module-efi_uga.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $(efi_uga_module_CFLAGS) $(CFLAGS) -c -o video/efi_uga_module-efi_uga.o `test -f 'video/efi_uga.c' || echo '$(srcdir)/'`video/efi_uga.c
+
+video/efi_uga_module-efi_uga.obj: video/efi_uga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $(efi_uga_module_CFLAGS) $(CFLAGS) -MT video/efi_uga_module-efi_uga.obj -MD -MP -MF video/$(DEPDIR)/efi_uga_module-efi_uga.Tpo -c -o video/efi_uga_module-efi_uga.obj `if test -f 'video/efi_uga.c'; then $(CYGPATH_W) 'video/efi_uga.c'; else $(CYGPATH_W) '$(srcdir)/video/efi_uga.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/efi_uga_module-efi_uga.Tpo video/$(DEPDIR)/efi_uga_module-efi_uga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/efi_uga.c' object='video/efi_uga_module-efi_uga.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $(efi_uga_module_CFLAGS) $(CFLAGS) -c -o video/efi_uga_module-efi_uga.obj `if test -f 'video/efi_uga.c'; then $(CYGPATH_W) 'video/efi_uga.c'; else $(CYGPATH_W) '$(srcdir)/video/efi_uga.c'; fi`
+
+efiemu/i386/pc/efiemu_module-cfgtables.o: efiemu/i386/pc/cfgtables.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/pc/efiemu_module-cfgtables.o -MD -MP -MF efiemu/i386/pc/$(DEPDIR)/efiemu_module-cfgtables.Tpo -c -o efiemu/i386/pc/efiemu_module-cfgtables.o `test -f 'efiemu/i386/pc/cfgtables.c' || echo '$(srcdir)/'`efiemu/i386/pc/cfgtables.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/pc/$(DEPDIR)/efiemu_module-cfgtables.Tpo efiemu/i386/pc/$(DEPDIR)/efiemu_module-cfgtables.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/pc/cfgtables.c' object='efiemu/i386/pc/efiemu_module-cfgtables.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/pc/efiemu_module-cfgtables.o `test -f 'efiemu/i386/pc/cfgtables.c' || echo '$(srcdir)/'`efiemu/i386/pc/cfgtables.c
+
+efiemu/i386/pc/efiemu_module-cfgtables.obj: efiemu/i386/pc/cfgtables.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/pc/efiemu_module-cfgtables.obj -MD -MP -MF efiemu/i386/pc/$(DEPDIR)/efiemu_module-cfgtables.Tpo -c -o efiemu/i386/pc/efiemu_module-cfgtables.obj `if test -f 'efiemu/i386/pc/cfgtables.c'; then $(CYGPATH_W) 'efiemu/i386/pc/cfgtables.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/pc/cfgtables.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/pc/$(DEPDIR)/efiemu_module-cfgtables.Tpo efiemu/i386/pc/$(DEPDIR)/efiemu_module-cfgtables.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/pc/cfgtables.c' object='efiemu/i386/pc/efiemu_module-cfgtables.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/pc/efiemu_module-cfgtables.obj `if test -f 'efiemu/i386/pc/cfgtables.c'; then $(CYGPATH_W) 'efiemu/i386/pc/cfgtables.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/pc/cfgtables.c'; fi`
+
+efiemu/efiemu_module-main.o: efiemu/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-main.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-main.Tpo -c -o efiemu/efiemu_module-main.o `test -f 'efiemu/main.c' || echo '$(srcdir)/'`efiemu/main.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-main.Tpo efiemu/$(DEPDIR)/efiemu_module-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/main.c' object='efiemu/efiemu_module-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-main.o `test -f 'efiemu/main.c' || echo '$(srcdir)/'`efiemu/main.c
+
+efiemu/efiemu_module-main.obj: efiemu/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-main.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-main.Tpo -c -o efiemu/efiemu_module-main.obj `if test -f 'efiemu/main.c'; then $(CYGPATH_W) 'efiemu/main.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/main.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-main.Tpo efiemu/$(DEPDIR)/efiemu_module-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/main.c' object='efiemu/efiemu_module-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-main.obj `if test -f 'efiemu/main.c'; then $(CYGPATH_W) 'efiemu/main.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/main.c'; fi`
+
+efiemu/i386/efiemu_module-loadcore32.o: efiemu/i386/loadcore32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-loadcore32.o -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-loadcore32.Tpo -c -o efiemu/i386/efiemu_module-loadcore32.o `test -f 'efiemu/i386/loadcore32.c' || echo '$(srcdir)/'`efiemu/i386/loadcore32.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-loadcore32.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-loadcore32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/loadcore32.c' object='efiemu/i386/efiemu_module-loadcore32.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-loadcore32.o `test -f 'efiemu/i386/loadcore32.c' || echo '$(srcdir)/'`efiemu/i386/loadcore32.c
+
+efiemu/i386/efiemu_module-loadcore32.obj: efiemu/i386/loadcore32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-loadcore32.obj -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-loadcore32.Tpo -c -o efiemu/i386/efiemu_module-loadcore32.obj `if test -f 'efiemu/i386/loadcore32.c'; then $(CYGPATH_W) 'efiemu/i386/loadcore32.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/loadcore32.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-loadcore32.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-loadcore32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/loadcore32.c' object='efiemu/i386/efiemu_module-loadcore32.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-loadcore32.obj `if test -f 'efiemu/i386/loadcore32.c'; then $(CYGPATH_W) 'efiemu/i386/loadcore32.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/loadcore32.c'; fi`
+
+efiemu/i386/efiemu_module-loadcore64.o: efiemu/i386/loadcore64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-loadcore64.o -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-loadcore64.Tpo -c -o efiemu/i386/efiemu_module-loadcore64.o `test -f 'efiemu/i386/loadcore64.c' || echo '$(srcdir)/'`efiemu/i386/loadcore64.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-loadcore64.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-loadcore64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/loadcore64.c' object='efiemu/i386/efiemu_module-loadcore64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-loadcore64.o `test -f 'efiemu/i386/loadcore64.c' || echo '$(srcdir)/'`efiemu/i386/loadcore64.c
+
+efiemu/i386/efiemu_module-loadcore64.obj: efiemu/i386/loadcore64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-loadcore64.obj -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-loadcore64.Tpo -c -o efiemu/i386/efiemu_module-loadcore64.obj `if test -f 'efiemu/i386/loadcore64.c'; then $(CYGPATH_W) 'efiemu/i386/loadcore64.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/loadcore64.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-loadcore64.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-loadcore64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/loadcore64.c' object='efiemu/i386/efiemu_module-loadcore64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-loadcore64.obj `if test -f 'efiemu/i386/loadcore64.c'; then $(CYGPATH_W) 'efiemu/i386/loadcore64.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/loadcore64.c'; fi`
+
+efiemu/efiemu_module-mm.o: efiemu/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-mm.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-mm.Tpo -c -o efiemu/efiemu_module-mm.o `test -f 'efiemu/mm.c' || echo '$(srcdir)/'`efiemu/mm.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-mm.Tpo efiemu/$(DEPDIR)/efiemu_module-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/mm.c' object='efiemu/efiemu_module-mm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-mm.o `test -f 'efiemu/mm.c' || echo '$(srcdir)/'`efiemu/mm.c
+
+efiemu/efiemu_module-mm.obj: efiemu/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-mm.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-mm.Tpo -c -o efiemu/efiemu_module-mm.obj `if test -f 'efiemu/mm.c'; then $(CYGPATH_W) 'efiemu/mm.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/mm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-mm.Tpo efiemu/$(DEPDIR)/efiemu_module-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/mm.c' object='efiemu/efiemu_module-mm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-mm.obj `if test -f 'efiemu/mm.c'; then $(CYGPATH_W) 'efiemu/mm.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/mm.c'; fi`
+
+efiemu/efiemu_module-loadcore_common.o: efiemu/loadcore_common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-loadcore_common.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-loadcore_common.Tpo -c -o efiemu/efiemu_module-loadcore_common.o `test -f 'efiemu/loadcore_common.c' || echo '$(srcdir)/'`efiemu/loadcore_common.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-loadcore_common.Tpo efiemu/$(DEPDIR)/efiemu_module-loadcore_common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/loadcore_common.c' object='efiemu/efiemu_module-loadcore_common.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-loadcore_common.o `test -f 'efiemu/loadcore_common.c' || echo '$(srcdir)/'`efiemu/loadcore_common.c
+
+efiemu/efiemu_module-loadcore_common.obj: efiemu/loadcore_common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-loadcore_common.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-loadcore_common.Tpo -c -o efiemu/efiemu_module-loadcore_common.obj `if test -f 'efiemu/loadcore_common.c'; then $(CYGPATH_W) 'efiemu/loadcore_common.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/loadcore_common.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-loadcore_common.Tpo efiemu/$(DEPDIR)/efiemu_module-loadcore_common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/loadcore_common.c' object='efiemu/efiemu_module-loadcore_common.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-loadcore_common.obj `if test -f 'efiemu/loadcore_common.c'; then $(CYGPATH_W) 'efiemu/loadcore_common.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/loadcore_common.c'; fi`
+
+efiemu/efiemu_module-symbols.o: efiemu/symbols.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-symbols.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-symbols.Tpo -c -o efiemu/efiemu_module-symbols.o `test -f 'efiemu/symbols.c' || echo '$(srcdir)/'`efiemu/symbols.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-symbols.Tpo efiemu/$(DEPDIR)/efiemu_module-symbols.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/symbols.c' object='efiemu/efiemu_module-symbols.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-symbols.o `test -f 'efiemu/symbols.c' || echo '$(srcdir)/'`efiemu/symbols.c
+
+efiemu/efiemu_module-symbols.obj: efiemu/symbols.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-symbols.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-symbols.Tpo -c -o efiemu/efiemu_module-symbols.obj `if test -f 'efiemu/symbols.c'; then $(CYGPATH_W) 'efiemu/symbols.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/symbols.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-symbols.Tpo efiemu/$(DEPDIR)/efiemu_module-symbols.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/symbols.c' object='efiemu/efiemu_module-symbols.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-symbols.obj `if test -f 'efiemu/symbols.c'; then $(CYGPATH_W) 'efiemu/symbols.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/symbols.c'; fi`
+
+efiemu/efiemu_module-loadcore32.o: efiemu/loadcore32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-loadcore32.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-loadcore32.Tpo -c -o efiemu/efiemu_module-loadcore32.o `test -f 'efiemu/loadcore32.c' || echo '$(srcdir)/'`efiemu/loadcore32.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-loadcore32.Tpo efiemu/$(DEPDIR)/efiemu_module-loadcore32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/loadcore32.c' object='efiemu/efiemu_module-loadcore32.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-loadcore32.o `test -f 'efiemu/loadcore32.c' || echo '$(srcdir)/'`efiemu/loadcore32.c
+
+efiemu/efiemu_module-loadcore32.obj: efiemu/loadcore32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-loadcore32.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-loadcore32.Tpo -c -o efiemu/efiemu_module-loadcore32.obj `if test -f 'efiemu/loadcore32.c'; then $(CYGPATH_W) 'efiemu/loadcore32.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/loadcore32.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-loadcore32.Tpo efiemu/$(DEPDIR)/efiemu_module-loadcore32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/loadcore32.c' object='efiemu/efiemu_module-loadcore32.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-loadcore32.obj `if test -f 'efiemu/loadcore32.c'; then $(CYGPATH_W) 'efiemu/loadcore32.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/loadcore32.c'; fi`
+
+efiemu/efiemu_module-loadcore64.o: efiemu/loadcore64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-loadcore64.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-loadcore64.Tpo -c -o efiemu/efiemu_module-loadcore64.o `test -f 'efiemu/loadcore64.c' || echo '$(srcdir)/'`efiemu/loadcore64.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-loadcore64.Tpo efiemu/$(DEPDIR)/efiemu_module-loadcore64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/loadcore64.c' object='efiemu/efiemu_module-loadcore64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-loadcore64.o `test -f 'efiemu/loadcore64.c' || echo '$(srcdir)/'`efiemu/loadcore64.c
+
+efiemu/efiemu_module-loadcore64.obj: efiemu/loadcore64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-loadcore64.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-loadcore64.Tpo -c -o efiemu/efiemu_module-loadcore64.obj `if test -f 'efiemu/loadcore64.c'; then $(CYGPATH_W) 'efiemu/loadcore64.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/loadcore64.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-loadcore64.Tpo efiemu/$(DEPDIR)/efiemu_module-loadcore64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/loadcore64.c' object='efiemu/efiemu_module-loadcore64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-loadcore64.obj `if test -f 'efiemu/loadcore64.c'; then $(CYGPATH_W) 'efiemu/loadcore64.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/loadcore64.c'; fi`
+
+efiemu/efiemu_module-prepare32.o: efiemu/prepare32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-prepare32.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-prepare32.Tpo -c -o efiemu/efiemu_module-prepare32.o `test -f 'efiemu/prepare32.c' || echo '$(srcdir)/'`efiemu/prepare32.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-prepare32.Tpo efiemu/$(DEPDIR)/efiemu_module-prepare32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/prepare32.c' object='efiemu/efiemu_module-prepare32.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-prepare32.o `test -f 'efiemu/prepare32.c' || echo '$(srcdir)/'`efiemu/prepare32.c
+
+efiemu/efiemu_module-prepare32.obj: efiemu/prepare32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-prepare32.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-prepare32.Tpo -c -o efiemu/efiemu_module-prepare32.obj `if test -f 'efiemu/prepare32.c'; then $(CYGPATH_W) 'efiemu/prepare32.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/prepare32.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-prepare32.Tpo efiemu/$(DEPDIR)/efiemu_module-prepare32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/prepare32.c' object='efiemu/efiemu_module-prepare32.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-prepare32.obj `if test -f 'efiemu/prepare32.c'; then $(CYGPATH_W) 'efiemu/prepare32.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/prepare32.c'; fi`
+
+efiemu/efiemu_module-prepare64.o: efiemu/prepare64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-prepare64.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-prepare64.Tpo -c -o efiemu/efiemu_module-prepare64.o `test -f 'efiemu/prepare64.c' || echo '$(srcdir)/'`efiemu/prepare64.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-prepare64.Tpo efiemu/$(DEPDIR)/efiemu_module-prepare64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/prepare64.c' object='efiemu/efiemu_module-prepare64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-prepare64.o `test -f 'efiemu/prepare64.c' || echo '$(srcdir)/'`efiemu/prepare64.c
+
+efiemu/efiemu_module-prepare64.obj: efiemu/prepare64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-prepare64.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-prepare64.Tpo -c -o efiemu/efiemu_module-prepare64.obj `if test -f 'efiemu/prepare64.c'; then $(CYGPATH_W) 'efiemu/prepare64.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/prepare64.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-prepare64.Tpo efiemu/$(DEPDIR)/efiemu_module-prepare64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/prepare64.c' object='efiemu/efiemu_module-prepare64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-prepare64.obj `if test -f 'efiemu/prepare64.c'; then $(CYGPATH_W) 'efiemu/prepare64.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/prepare64.c'; fi`
+
+efiemu/efiemu_module-pnvram.o: efiemu/pnvram.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-pnvram.o -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-pnvram.Tpo -c -o efiemu/efiemu_module-pnvram.o `test -f 'efiemu/pnvram.c' || echo '$(srcdir)/'`efiemu/pnvram.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-pnvram.Tpo efiemu/$(DEPDIR)/efiemu_module-pnvram.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/pnvram.c' object='efiemu/efiemu_module-pnvram.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-pnvram.o `test -f 'efiemu/pnvram.c' || echo '$(srcdir)/'`efiemu/pnvram.c
+
+efiemu/efiemu_module-pnvram.obj: efiemu/pnvram.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/efiemu_module-pnvram.obj -MD -MP -MF efiemu/$(DEPDIR)/efiemu_module-pnvram.Tpo -c -o efiemu/efiemu_module-pnvram.obj `if test -f 'efiemu/pnvram.c'; then $(CYGPATH_W) 'efiemu/pnvram.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/pnvram.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/$(DEPDIR)/efiemu_module-pnvram.Tpo efiemu/$(DEPDIR)/efiemu_module-pnvram.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/pnvram.c' object='efiemu/efiemu_module-pnvram.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/efiemu_module-pnvram.obj `if test -f 'efiemu/pnvram.c'; then $(CYGPATH_W) 'efiemu/pnvram.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/pnvram.c'; fi`
+
+efiemu/i386/efiemu_module-coredetect.o: efiemu/i386/coredetect.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-coredetect.o -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-coredetect.Tpo -c -o efiemu/i386/efiemu_module-coredetect.o `test -f 'efiemu/i386/coredetect.c' || echo '$(srcdir)/'`efiemu/i386/coredetect.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-coredetect.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-coredetect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/coredetect.c' object='efiemu/i386/efiemu_module-coredetect.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-coredetect.o `test -f 'efiemu/i386/coredetect.c' || echo '$(srcdir)/'`efiemu/i386/coredetect.c
+
+efiemu/i386/efiemu_module-coredetect.obj: efiemu/i386/coredetect.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-coredetect.obj -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-coredetect.Tpo -c -o efiemu/i386/efiemu_module-coredetect.obj `if test -f 'efiemu/i386/coredetect.c'; then $(CYGPATH_W) 'efiemu/i386/coredetect.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/coredetect.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-coredetect.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-coredetect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/coredetect.c' object='efiemu/i386/efiemu_module-coredetect.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-coredetect.obj `if test -f 'efiemu/i386/coredetect.c'; then $(CYGPATH_W) 'efiemu/i386/coredetect.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/coredetect.c'; fi`
+
+efiemu/i386/efiemu_module-nocfgtables.o: efiemu/i386/nocfgtables.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-nocfgtables.o -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-nocfgtables.Tpo -c -o efiemu/i386/efiemu_module-nocfgtables.o `test -f 'efiemu/i386/nocfgtables.c' || echo '$(srcdir)/'`efiemu/i386/nocfgtables.c
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-nocfgtables.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-nocfgtables.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/nocfgtables.c' object='efiemu/i386/efiemu_module-nocfgtables.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-nocfgtables.o `test -f 'efiemu/i386/nocfgtables.c' || echo '$(srcdir)/'`efiemu/i386/nocfgtables.c
+
+efiemu/i386/efiemu_module-nocfgtables.obj: efiemu/i386/nocfgtables.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -MT efiemu/i386/efiemu_module-nocfgtables.obj -MD -MP -MF efiemu/i386/$(DEPDIR)/efiemu_module-nocfgtables.Tpo -c -o efiemu/i386/efiemu_module-nocfgtables.obj `if test -f 'efiemu/i386/nocfgtables.c'; then $(CYGPATH_W) 'efiemu/i386/nocfgtables.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/nocfgtables.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) efiemu/i386/$(DEPDIR)/efiemu_module-nocfgtables.Tpo efiemu/i386/$(DEPDIR)/efiemu_module-nocfgtables.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='efiemu/i386/nocfgtables.c' object='efiemu/i386/efiemu_module-nocfgtables.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $(efiemu_module_CFLAGS) $(CFLAGS) -c -o efiemu/i386/efiemu_module-nocfgtables.obj `if test -f 'efiemu/i386/nocfgtables.c'; then $(CYGPATH_W) 'efiemu/i386/nocfgtables.c'; else $(CYGPATH_W) '$(srcdir)/efiemu/i386/nocfgtables.c'; fi`
+
+kern/elf_module-elf.o: kern/elf.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $(elf_module_CFLAGS) $(CFLAGS) -MT kern/elf_module-elf.o -MD -MP -MF kern/$(DEPDIR)/elf_module-elf.Tpo -c -o kern/elf_module-elf.o `test -f 'kern/elf.c' || echo '$(srcdir)/'`kern/elf.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/elf_module-elf.Tpo kern/$(DEPDIR)/elf_module-elf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/elf.c' object='kern/elf_module-elf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $(elf_module_CFLAGS) $(CFLAGS) -c -o kern/elf_module-elf.o `test -f 'kern/elf.c' || echo '$(srcdir)/'`kern/elf.c
+
+kern/elf_module-elf.obj: kern/elf.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $(elf_module_CFLAGS) $(CFLAGS) -MT kern/elf_module-elf.obj -MD -MP -MF kern/$(DEPDIR)/elf_module-elf.Tpo -c -o kern/elf_module-elf.obj `if test -f 'kern/elf.c'; then $(CYGPATH_W) 'kern/elf.c'; else $(CYGPATH_W) '$(srcdir)/kern/elf.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/elf_module-elf.Tpo kern/$(DEPDIR)/elf_module-elf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/elf.c' object='kern/elf_module-elf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $(elf_module_CFLAGS) $(CFLAGS) -c -o kern/elf_module-elf.obj `if test -f 'kern/elf.c'; then $(CYGPATH_W) 'kern/elf.c'; else $(CYGPATH_W) '$(srcdir)/kern/elf.c'; fi`
+
+tests/example_functional_test_module-example_functional_test.o: tests/example_functional_test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $(example_functional_test_module_CFLAGS) $(CFLAGS) -MT tests/example_functional_test_module-example_functional_test.o -MD -MP -MF tests/$(DEPDIR)/example_functional_test_module-example_functional_test.Tpo -c -o tests/example_functional_test_module-example_functional_test.o `test -f 'tests/example_functional_test.c' || echo '$(srcdir)/'`tests/example_functional_test.c
+@am__fastdepCC_TRUE@ $(am__mv) tests/$(DEPDIR)/example_functional_test_module-example_functional_test.Tpo tests/$(DEPDIR)/example_functional_test_module-example_functional_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/example_functional_test.c' object='tests/example_functional_test_module-example_functional_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $(example_functional_test_module_CFLAGS) $(CFLAGS) -c -o tests/example_functional_test_module-example_functional_test.o `test -f 'tests/example_functional_test.c' || echo '$(srcdir)/'`tests/example_functional_test.c
+
+tests/example_functional_test_module-example_functional_test.obj: tests/example_functional_test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $(example_functional_test_module_CFLAGS) $(CFLAGS) -MT tests/example_functional_test_module-example_functional_test.obj -MD -MP -MF tests/$(DEPDIR)/example_functional_test_module-example_functional_test.Tpo -c -o tests/example_functional_test_module-example_functional_test.obj `if test -f 'tests/example_functional_test.c'; then $(CYGPATH_W) 'tests/example_functional_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/example_functional_test.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) tests/$(DEPDIR)/example_functional_test_module-example_functional_test.Tpo tests/$(DEPDIR)/example_functional_test_module-example_functional_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/example_functional_test.c' object='tests/example_functional_test_module-example_functional_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $(example_functional_test_module_CFLAGS) $(CFLAGS) -c -o tests/example_functional_test_module-example_functional_test.obj `if test -f 'tests/example_functional_test.c'; then $(CYGPATH_W) 'tests/example_functional_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/example_functional_test.c'; fi`
+
+fs/ext2_module-ext2.o: fs/ext2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $(ext2_module_CFLAGS) $(CFLAGS) -MT fs/ext2_module-ext2.o -MD -MP -MF fs/$(DEPDIR)/ext2_module-ext2.Tpo -c -o fs/ext2_module-ext2.o `test -f 'fs/ext2.c' || echo '$(srcdir)/'`fs/ext2.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ext2_module-ext2.Tpo fs/$(DEPDIR)/ext2_module-ext2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ext2.c' object='fs/ext2_module-ext2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $(ext2_module_CFLAGS) $(CFLAGS) -c -o fs/ext2_module-ext2.o `test -f 'fs/ext2.c' || echo '$(srcdir)/'`fs/ext2.c
+
+fs/ext2_module-ext2.obj: fs/ext2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $(ext2_module_CFLAGS) $(CFLAGS) -MT fs/ext2_module-ext2.obj -MD -MP -MF fs/$(DEPDIR)/ext2_module-ext2.Tpo -c -o fs/ext2_module-ext2.obj `if test -f 'fs/ext2.c'; then $(CYGPATH_W) 'fs/ext2.c'; else $(CYGPATH_W) '$(srcdir)/fs/ext2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ext2_module-ext2.Tpo fs/$(DEPDIR)/ext2_module-ext2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ext2.c' object='fs/ext2_module-ext2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $(ext2_module_CFLAGS) $(CFLAGS) -c -o fs/ext2_module-ext2.obj `if test -f 'fs/ext2.c'; then $(CYGPATH_W) 'fs/ext2.c'; else $(CYGPATH_W) '$(srcdir)/fs/ext2.c'; fi`
+
+commands/extcmd_module-extcmd.o: commands/extcmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -MT commands/extcmd_module-extcmd.o -MD -MP -MF commands/$(DEPDIR)/extcmd_module-extcmd.Tpo -c -o commands/extcmd_module-extcmd.o `test -f 'commands/extcmd.c' || echo '$(srcdir)/'`commands/extcmd.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/extcmd_module-extcmd.Tpo commands/$(DEPDIR)/extcmd_module-extcmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/extcmd.c' object='commands/extcmd_module-extcmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -c -o commands/extcmd_module-extcmd.o `test -f 'commands/extcmd.c' || echo '$(srcdir)/'`commands/extcmd.c
+
+commands/extcmd_module-extcmd.obj: commands/extcmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -MT commands/extcmd_module-extcmd.obj -MD -MP -MF commands/$(DEPDIR)/extcmd_module-extcmd.Tpo -c -o commands/extcmd_module-extcmd.obj `if test -f 'commands/extcmd.c'; then $(CYGPATH_W) 'commands/extcmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/extcmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/extcmd_module-extcmd.Tpo commands/$(DEPDIR)/extcmd_module-extcmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/extcmd.c' object='commands/extcmd_module-extcmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -c -o commands/extcmd_module-extcmd.obj `if test -f 'commands/extcmd.c'; then $(CYGPATH_W) 'commands/extcmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/extcmd.c'; fi`
+
+lib/extcmd_module-arg.o: lib/arg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -MT lib/extcmd_module-arg.o -MD -MP -MF lib/$(DEPDIR)/extcmd_module-arg.Tpo -c -o lib/extcmd_module-arg.o `test -f 'lib/arg.c' || echo '$(srcdir)/'`lib/arg.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/extcmd_module-arg.Tpo lib/$(DEPDIR)/extcmd_module-arg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/arg.c' object='lib/extcmd_module-arg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -c -o lib/extcmd_module-arg.o `test -f 'lib/arg.c' || echo '$(srcdir)/'`lib/arg.c
+
+lib/extcmd_module-arg.obj: lib/arg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -MT lib/extcmd_module-arg.obj -MD -MP -MF lib/$(DEPDIR)/extcmd_module-arg.Tpo -c -o lib/extcmd_module-arg.obj `if test -f 'lib/arg.c'; then $(CYGPATH_W) 'lib/arg.c'; else $(CYGPATH_W) '$(srcdir)/lib/arg.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/extcmd_module-arg.Tpo lib/$(DEPDIR)/extcmd_module-arg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/arg.c' object='lib/extcmd_module-arg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $(extcmd_module_CFLAGS) $(CFLAGS) -c -o lib/extcmd_module-arg.obj `if test -f 'lib/arg.c'; then $(CYGPATH_W) 'lib/arg.c'; else $(CYGPATH_W) '$(srcdir)/lib/arg.c'; fi`
+
+fs/fat_module-fat.o: fs/fat.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $(fat_module_CFLAGS) $(CFLAGS) -MT fs/fat_module-fat.o -MD -MP -MF fs/$(DEPDIR)/fat_module-fat.Tpo -c -o fs/fat_module-fat.o `test -f 'fs/fat.c' || echo '$(srcdir)/'`fs/fat.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/fat_module-fat.Tpo fs/$(DEPDIR)/fat_module-fat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/fat.c' object='fs/fat_module-fat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $(fat_module_CFLAGS) $(CFLAGS) -c -o fs/fat_module-fat.o `test -f 'fs/fat.c' || echo '$(srcdir)/'`fs/fat.c
+
+fs/fat_module-fat.obj: fs/fat.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $(fat_module_CFLAGS) $(CFLAGS) -MT fs/fat_module-fat.obj -MD -MP -MF fs/$(DEPDIR)/fat_module-fat.Tpo -c -o fs/fat_module-fat.obj `if test -f 'fs/fat.c'; then $(CYGPATH_W) 'fs/fat.c'; else $(CYGPATH_W) '$(srcdir)/fs/fat.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/fat_module-fat.Tpo fs/$(DEPDIR)/fat_module-fat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/fat.c' object='fs/fat_module-fat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $(fat_module_CFLAGS) $(CFLAGS) -c -o fs/fat_module-fat.obj `if test -f 'fs/fat.c'; then $(CYGPATH_W) 'fs/fat.c'; else $(CYGPATH_W) '$(srcdir)/fs/fat.c'; fi`
+
+commands/efi/fixvideo_module-fixvideo.o: commands/efi/fixvideo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $(fixvideo_module_CFLAGS) $(CFLAGS) -MT commands/efi/fixvideo_module-fixvideo.o -MD -MP -MF commands/efi/$(DEPDIR)/fixvideo_module-fixvideo.Tpo -c -o commands/efi/fixvideo_module-fixvideo.o `test -f 'commands/efi/fixvideo.c' || echo '$(srcdir)/'`commands/efi/fixvideo.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/fixvideo_module-fixvideo.Tpo commands/efi/$(DEPDIR)/fixvideo_module-fixvideo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/fixvideo.c' object='commands/efi/fixvideo_module-fixvideo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $(fixvideo_module_CFLAGS) $(CFLAGS) -c -o commands/efi/fixvideo_module-fixvideo.o `test -f 'commands/efi/fixvideo.c' || echo '$(srcdir)/'`commands/efi/fixvideo.c
+
+commands/efi/fixvideo_module-fixvideo.obj: commands/efi/fixvideo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $(fixvideo_module_CFLAGS) $(CFLAGS) -MT commands/efi/fixvideo_module-fixvideo.obj -MD -MP -MF commands/efi/$(DEPDIR)/fixvideo_module-fixvideo.Tpo -c -o commands/efi/fixvideo_module-fixvideo.obj `if test -f 'commands/efi/fixvideo.c'; then $(CYGPATH_W) 'commands/efi/fixvideo.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/fixvideo.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/fixvideo_module-fixvideo.Tpo commands/efi/$(DEPDIR)/fixvideo_module-fixvideo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/fixvideo.c' object='commands/efi/fixvideo_module-fixvideo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $(fixvideo_module_CFLAGS) $(CFLAGS) -c -o commands/efi/fixvideo_module-fixvideo.obj `if test -f 'commands/efi/fixvideo.c'; then $(CYGPATH_W) 'commands/efi/fixvideo.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/fixvideo.c'; fi`
+
+font/font_module-font.o: font/font.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -MT font/font_module-font.o -MD -MP -MF font/$(DEPDIR)/font_module-font.Tpo -c -o font/font_module-font.o `test -f 'font/font.c' || echo '$(srcdir)/'`font/font.c
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/font_module-font.Tpo font/$(DEPDIR)/font_module-font.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font.c' object='font/font_module-font.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -c -o font/font_module-font.o `test -f 'font/font.c' || echo '$(srcdir)/'`font/font.c
+
+font/font_module-font.obj: font/font.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -MT font/font_module-font.obj -MD -MP -MF font/$(DEPDIR)/font_module-font.Tpo -c -o font/font_module-font.obj `if test -f 'font/font.c'; then $(CYGPATH_W) 'font/font.c'; else $(CYGPATH_W) '$(srcdir)/font/font.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/font_module-font.Tpo font/$(DEPDIR)/font_module-font.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font.c' object='font/font_module-font.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -c -o font/font_module-font.obj `if test -f 'font/font.c'; then $(CYGPATH_W) 'font/font.c'; else $(CYGPATH_W) '$(srcdir)/font/font.c'; fi`
+
+font/font_module-font_cmd.o: font/font_cmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -MT font/font_module-font_cmd.o -MD -MP -MF font/$(DEPDIR)/font_module-font_cmd.Tpo -c -o font/font_module-font_cmd.o `test -f 'font/font_cmd.c' || echo '$(srcdir)/'`font/font_cmd.c
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/font_module-font_cmd.Tpo font/$(DEPDIR)/font_module-font_cmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font_cmd.c' object='font/font_module-font_cmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -c -o font/font_module-font_cmd.o `test -f 'font/font_cmd.c' || echo '$(srcdir)/'`font/font_cmd.c
+
+font/font_module-font_cmd.obj: font/font_cmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -MT font/font_module-font_cmd.obj -MD -MP -MF font/$(DEPDIR)/font_module-font_cmd.Tpo -c -o font/font_module-font_cmd.obj `if test -f 'font/font_cmd.c'; then $(CYGPATH_W) 'font/font_cmd.c'; else $(CYGPATH_W) '$(srcdir)/font/font_cmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/font_module-font_cmd.Tpo font/$(DEPDIR)/font_module-font_cmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font_cmd.c' object='font/font_module-font_cmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $(font_module_CFLAGS) $(CFLAGS) -c -o font/font_module-font_cmd.obj `if test -f 'font/font_cmd.c'; then $(CYGPATH_W) 'font/font_cmd.c'; else $(CYGPATH_W) '$(srcdir)/font/font_cmd.c'; fi`
+
+fs/fshelp_module-fshelp.o: fs/fshelp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $(fshelp_module_CFLAGS) $(CFLAGS) -MT fs/fshelp_module-fshelp.o -MD -MP -MF fs/$(DEPDIR)/fshelp_module-fshelp.Tpo -c -o fs/fshelp_module-fshelp.o `test -f 'fs/fshelp.c' || echo '$(srcdir)/'`fs/fshelp.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/fshelp_module-fshelp.Tpo fs/$(DEPDIR)/fshelp_module-fshelp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/fshelp.c' object='fs/fshelp_module-fshelp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $(fshelp_module_CFLAGS) $(CFLAGS) -c -o fs/fshelp_module-fshelp.o `test -f 'fs/fshelp.c' || echo '$(srcdir)/'`fs/fshelp.c
+
+fs/fshelp_module-fshelp.obj: fs/fshelp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $(fshelp_module_CFLAGS) $(CFLAGS) -MT fs/fshelp_module-fshelp.obj -MD -MP -MF fs/$(DEPDIR)/fshelp_module-fshelp.Tpo -c -o fs/fshelp_module-fshelp.obj `if test -f 'fs/fshelp.c'; then $(CYGPATH_W) 'fs/fshelp.c'; else $(CYGPATH_W) '$(srcdir)/fs/fshelp.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/fshelp_module-fshelp.Tpo fs/$(DEPDIR)/fshelp_module-fshelp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/fshelp.c' object='fs/fshelp_module-fshelp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $(fshelp_module_CFLAGS) $(CFLAGS) -c -o fs/fshelp_module-fshelp.obj `if test -f 'fs/fshelp.c'; then $(CYGPATH_W) 'fs/fshelp.c'; else $(CYGPATH_W) '$(srcdir)/fs/fshelp.c'; fi`
+
+tests/lib/functional_test_module-functional_test.o: tests/lib/functional_test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -MT tests/lib/functional_test_module-functional_test.o -MD -MP -MF tests/lib/$(DEPDIR)/functional_test_module-functional_test.Tpo -c -o tests/lib/functional_test_module-functional_test.o `test -f 'tests/lib/functional_test.c' || echo '$(srcdir)/'`tests/lib/functional_test.c
+@am__fastdepCC_TRUE@ $(am__mv) tests/lib/$(DEPDIR)/functional_test_module-functional_test.Tpo tests/lib/$(DEPDIR)/functional_test_module-functional_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/lib/functional_test.c' object='tests/lib/functional_test_module-functional_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -c -o tests/lib/functional_test_module-functional_test.o `test -f 'tests/lib/functional_test.c' || echo '$(srcdir)/'`tests/lib/functional_test.c
+
+tests/lib/functional_test_module-functional_test.obj: tests/lib/functional_test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -MT tests/lib/functional_test_module-functional_test.obj -MD -MP -MF tests/lib/$(DEPDIR)/functional_test_module-functional_test.Tpo -c -o tests/lib/functional_test_module-functional_test.obj `if test -f 'tests/lib/functional_test.c'; then $(CYGPATH_W) 'tests/lib/functional_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/lib/functional_test.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) tests/lib/$(DEPDIR)/functional_test_module-functional_test.Tpo tests/lib/$(DEPDIR)/functional_test_module-functional_test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/lib/functional_test.c' object='tests/lib/functional_test_module-functional_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -c -o tests/lib/functional_test_module-functional_test.obj `if test -f 'tests/lib/functional_test.c'; then $(CYGPATH_W) 'tests/lib/functional_test.c'; else $(CYGPATH_W) '$(srcdir)/tests/lib/functional_test.c'; fi`
+
+tests/lib/functional_test_module-test.o: tests/lib/test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -MT tests/lib/functional_test_module-test.o -MD -MP -MF tests/lib/$(DEPDIR)/functional_test_module-test.Tpo -c -o tests/lib/functional_test_module-test.o `test -f 'tests/lib/test.c' || echo '$(srcdir)/'`tests/lib/test.c
+@am__fastdepCC_TRUE@ $(am__mv) tests/lib/$(DEPDIR)/functional_test_module-test.Tpo tests/lib/$(DEPDIR)/functional_test_module-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/lib/test.c' object='tests/lib/functional_test_module-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -c -o tests/lib/functional_test_module-test.o `test -f 'tests/lib/test.c' || echo '$(srcdir)/'`tests/lib/test.c
+
+tests/lib/functional_test_module-test.obj: tests/lib/test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -MT tests/lib/functional_test_module-test.obj -MD -MP -MF tests/lib/$(DEPDIR)/functional_test_module-test.Tpo -c -o tests/lib/functional_test_module-test.obj `if test -f 'tests/lib/test.c'; then $(CYGPATH_W) 'tests/lib/test.c'; else $(CYGPATH_W) '$(srcdir)/tests/lib/test.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) tests/lib/$(DEPDIR)/functional_test_module-test.Tpo tests/lib/$(DEPDIR)/functional_test_module-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/lib/test.c' object='tests/lib/functional_test_module-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $(functional_test_module_CFLAGS) $(CFLAGS) -c -o tests/lib/functional_test_module-test.obj `if test -f 'tests/lib/test.c'; then $(CYGPATH_W) 'tests/lib/test.c'; else $(CYGPATH_W) '$(srcdir)/tests/lib/test.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.o: lib/libgcrypt-grub/cipher/arcfour.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $(gcry_arcfour_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_arcfour_module-arcfour.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.o `test -f 'lib/libgcrypt-grub/cipher/arcfour.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/arcfour.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_arcfour_module-arcfour.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_arcfour_module-arcfour.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/arcfour.c' object='lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $(gcry_arcfour_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.o `test -f 'lib/libgcrypt-grub/cipher/arcfour.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/arcfour.c
+
+lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.obj: lib/libgcrypt-grub/cipher/arcfour.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $(gcry_arcfour_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_arcfour_module-arcfour.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.obj `if test -f 'lib/libgcrypt-grub/cipher/arcfour.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/arcfour.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/arcfour.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_arcfour_module-arcfour.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_arcfour_module-arcfour.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/arcfour.c' object='lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $(gcry_arcfour_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_arcfour_module-arcfour.obj `if test -f 'lib/libgcrypt-grub/cipher/arcfour.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/arcfour.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/arcfour.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.o: lib/libgcrypt-grub/cipher/blowfish.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_blowfish_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_blowfish_module-blowfish.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.o `test -f 'lib/libgcrypt-grub/cipher/blowfish.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/blowfish.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_blowfish_module-blowfish.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_blowfish_module-blowfish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/blowfish.c' object='lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_blowfish_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.o `test -f 'lib/libgcrypt-grub/cipher/blowfish.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/blowfish.c
+
+lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.obj: lib/libgcrypt-grub/cipher/blowfish.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_blowfish_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_blowfish_module-blowfish.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.obj `if test -f 'lib/libgcrypt-grub/cipher/blowfish.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/blowfish.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/blowfish.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_blowfish_module-blowfish.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_blowfish_module-blowfish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/blowfish.c' object='lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_blowfish_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_blowfish_module-blowfish.obj `if test -f 'lib/libgcrypt-grub/cipher/blowfish.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/blowfish.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/blowfish.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.o: lib/libgcrypt-grub/cipher/camellia-glue.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia-glue.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.o `test -f 'lib/libgcrypt-grub/cipher/camellia-glue.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/camellia-glue.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia-glue.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia-glue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/camellia-glue.c' object='lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.o `test -f 'lib/libgcrypt-grub/cipher/camellia-glue.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/camellia-glue.c
+
+lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.obj: lib/libgcrypt-grub/cipher/camellia-glue.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia-glue.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.obj `if test -f 'lib/libgcrypt-grub/cipher/camellia-glue.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/camellia-glue.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/camellia-glue.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia-glue.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia-glue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/camellia-glue.c' object='lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia-glue.obj `if test -f 'lib/libgcrypt-grub/cipher/camellia-glue.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/camellia-glue.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/camellia-glue.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.o: lib/libgcrypt-grub/cipher/camellia.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.o `test -f 'lib/libgcrypt-grub/cipher/camellia.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/camellia.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/camellia.c' object='lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.o `test -f 'lib/libgcrypt-grub/cipher/camellia.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/camellia.c
+
+lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.obj: lib/libgcrypt-grub/cipher/camellia.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.obj `if test -f 'lib/libgcrypt-grub/cipher/camellia.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/camellia.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/camellia.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_camellia_module-camellia.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/camellia.c' object='lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $(gcry_camellia_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_camellia_module-camellia.obj `if test -f 'lib/libgcrypt-grub/cipher/camellia.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/camellia.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/camellia.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.o: lib/libgcrypt-grub/cipher/cast5.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_cast5_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_cast5_module-cast5.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.o `test -f 'lib/libgcrypt-grub/cipher/cast5.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/cast5.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_cast5_module-cast5.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_cast5_module-cast5.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/cast5.c' object='lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_cast5_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.o `test -f 'lib/libgcrypt-grub/cipher/cast5.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/cast5.c
+
+lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.obj: lib/libgcrypt-grub/cipher/cast5.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_cast5_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_cast5_module-cast5.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.obj `if test -f 'lib/libgcrypt-grub/cipher/cast5.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/cast5.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/cast5.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_cast5_module-cast5.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_cast5_module-cast5.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/cast5.c' object='lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_cast5_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_cast5_module-cast5.obj `if test -f 'lib/libgcrypt-grub/cipher/cast5.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/cast5.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/cast5.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_crc_module-crc.o: lib/libgcrypt-grub/cipher/crc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $(gcry_crc_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_crc_module-crc.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_crc_module-crc.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_crc_module-crc.o `test -f 'lib/libgcrypt-grub/cipher/crc.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/crc.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_crc_module-crc.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_crc_module-crc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/crc.c' object='lib/libgcrypt-grub/cipher/gcry_crc_module-crc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $(gcry_crc_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_crc_module-crc.o `test -f 'lib/libgcrypt-grub/cipher/crc.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/crc.c
+
+lib/libgcrypt-grub/cipher/gcry_crc_module-crc.obj: lib/libgcrypt-grub/cipher/crc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $(gcry_crc_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_crc_module-crc.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_crc_module-crc.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_crc_module-crc.obj `if test -f 'lib/libgcrypt-grub/cipher/crc.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/crc.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/crc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_crc_module-crc.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_crc_module-crc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/crc.c' object='lib/libgcrypt-grub/cipher/gcry_crc_module-crc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $(gcry_crc_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_crc_module-crc.obj `if test -f 'lib/libgcrypt-grub/cipher/crc.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/crc.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/crc.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_des_module-des.o: lib/libgcrypt-grub/cipher/des.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $(gcry_des_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_des_module-des.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_des_module-des.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_des_module-des.o `test -f 'lib/libgcrypt-grub/cipher/des.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/des.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_des_module-des.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_des_module-des.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/des.c' object='lib/libgcrypt-grub/cipher/gcry_des_module-des.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $(gcry_des_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_des_module-des.o `test -f 'lib/libgcrypt-grub/cipher/des.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/des.c
+
+lib/libgcrypt-grub/cipher/gcry_des_module-des.obj: lib/libgcrypt-grub/cipher/des.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $(gcry_des_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_des_module-des.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_des_module-des.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_des_module-des.obj `if test -f 'lib/libgcrypt-grub/cipher/des.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/des.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/des.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_des_module-des.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_des_module-des.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/des.c' object='lib/libgcrypt-grub/cipher/gcry_des_module-des.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $(gcry_des_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_des_module-des.obj `if test -f 'lib/libgcrypt-grub/cipher/des.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/des.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/des.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_md4_module-md4.o: lib/libgcrypt-grub/cipher/md4.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md4_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_md4_module-md4.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md4_module-md4.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_md4_module-md4.o `test -f 'lib/libgcrypt-grub/cipher/md4.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/md4.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md4_module-md4.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md4_module-md4.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/md4.c' object='lib/libgcrypt-grub/cipher/gcry_md4_module-md4.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md4_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_md4_module-md4.o `test -f 'lib/libgcrypt-grub/cipher/md4.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/md4.c
+
+lib/libgcrypt-grub/cipher/gcry_md4_module-md4.obj: lib/libgcrypt-grub/cipher/md4.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md4_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_md4_module-md4.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md4_module-md4.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_md4_module-md4.obj `if test -f 'lib/libgcrypt-grub/cipher/md4.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/md4.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/md4.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md4_module-md4.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md4_module-md4.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/md4.c' object='lib/libgcrypt-grub/cipher/gcry_md4_module-md4.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md4_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_md4_module-md4.obj `if test -f 'lib/libgcrypt-grub/cipher/md4.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/md4.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/md4.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_md5_module-md5.o: lib/libgcrypt-grub/cipher/md5.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md5_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_md5_module-md5.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md5_module-md5.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_md5_module-md5.o `test -f 'lib/libgcrypt-grub/cipher/md5.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/md5.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md5_module-md5.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md5_module-md5.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/md5.c' object='lib/libgcrypt-grub/cipher/gcry_md5_module-md5.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md5_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_md5_module-md5.o `test -f 'lib/libgcrypt-grub/cipher/md5.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/md5.c
+
+lib/libgcrypt-grub/cipher/gcry_md5_module-md5.obj: lib/libgcrypt-grub/cipher/md5.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md5_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_md5_module-md5.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md5_module-md5.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_md5_module-md5.obj `if test -f 'lib/libgcrypt-grub/cipher/md5.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/md5.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/md5.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md5_module-md5.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_md5_module-md5.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/md5.c' object='lib/libgcrypt-grub/cipher/gcry_md5_module-md5.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $(gcry_md5_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_md5_module-md5.obj `if test -f 'lib/libgcrypt-grub/cipher/md5.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/md5.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/md5.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.o: lib/libgcrypt-grub/cipher/rfc2268.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rfc2268_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rfc2268_module-rfc2268.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.o `test -f 'lib/libgcrypt-grub/cipher/rfc2268.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/rfc2268.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rfc2268_module-rfc2268.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rfc2268_module-rfc2268.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/rfc2268.c' object='lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rfc2268_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.o `test -f 'lib/libgcrypt-grub/cipher/rfc2268.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/rfc2268.c
+
+lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.obj: lib/libgcrypt-grub/cipher/rfc2268.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rfc2268_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rfc2268_module-rfc2268.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.obj `if test -f 'lib/libgcrypt-grub/cipher/rfc2268.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/rfc2268.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/rfc2268.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rfc2268_module-rfc2268.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rfc2268_module-rfc2268.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/rfc2268.c' object='lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rfc2268_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_rfc2268_module-rfc2268.obj `if test -f 'lib/libgcrypt-grub/cipher/rfc2268.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/rfc2268.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/rfc2268.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.o: lib/libgcrypt-grub/cipher/rijndael.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rijndael_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rijndael_module-rijndael.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.o `test -f 'lib/libgcrypt-grub/cipher/rijndael.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/rijndael.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rijndael_module-rijndael.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rijndael_module-rijndael.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/rijndael.c' object='lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rijndael_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.o `test -f 'lib/libgcrypt-grub/cipher/rijndael.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/rijndael.c
+
+lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.obj: lib/libgcrypt-grub/cipher/rijndael.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rijndael_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rijndael_module-rijndael.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.obj `if test -f 'lib/libgcrypt-grub/cipher/rijndael.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/rijndael.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rijndael_module-rijndael.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rijndael_module-rijndael.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/rijndael.c' object='lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rijndael_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_rijndael_module-rijndael.obj `if test -f 'lib/libgcrypt-grub/cipher/rijndael.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/rijndael.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.o: lib/libgcrypt-grub/cipher/rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rmd160_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rmd160_module-rmd160.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.o `test -f 'lib/libgcrypt-grub/cipher/rmd160.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rmd160_module-rmd160.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rmd160_module-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/rmd160.c' object='lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rmd160_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.o `test -f 'lib/libgcrypt-grub/cipher/rmd160.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/rmd160.c
+
+lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.obj: lib/libgcrypt-grub/cipher/rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rmd160_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rmd160_module-rmd160.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.obj `if test -f 'lib/libgcrypt-grub/cipher/rmd160.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/rmd160.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rmd160_module-rmd160.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_rmd160_module-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/rmd160.c' object='lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $(gcry_rmd160_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_rmd160_module-rmd160.obj `if test -f 'lib/libgcrypt-grub/cipher/rmd160.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/rmd160.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/rmd160.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_seed_module-seed.o: lib/libgcrypt-grub/cipher/seed.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $(gcry_seed_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_seed_module-seed.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_seed_module-seed.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_seed_module-seed.o `test -f 'lib/libgcrypt-grub/cipher/seed.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/seed.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_seed_module-seed.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_seed_module-seed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/seed.c' object='lib/libgcrypt-grub/cipher/gcry_seed_module-seed.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $(gcry_seed_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_seed_module-seed.o `test -f 'lib/libgcrypt-grub/cipher/seed.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/seed.c
+
+lib/libgcrypt-grub/cipher/gcry_seed_module-seed.obj: lib/libgcrypt-grub/cipher/seed.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $(gcry_seed_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_seed_module-seed.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_seed_module-seed.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_seed_module-seed.obj `if test -f 'lib/libgcrypt-grub/cipher/seed.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/seed.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/seed.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_seed_module-seed.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_seed_module-seed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/seed.c' object='lib/libgcrypt-grub/cipher/gcry_seed_module-seed.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $(gcry_seed_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_seed_module-seed.obj `if test -f 'lib/libgcrypt-grub/cipher/seed.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/seed.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/seed.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.o: lib/libgcrypt-grub/cipher/serpent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $(gcry_serpent_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_serpent_module-serpent.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.o `test -f 'lib/libgcrypt-grub/cipher/serpent.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/serpent.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_serpent_module-serpent.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_serpent_module-serpent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/serpent.c' object='lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $(gcry_serpent_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.o `test -f 'lib/libgcrypt-grub/cipher/serpent.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/serpent.c
+
+lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.obj: lib/libgcrypt-grub/cipher/serpent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $(gcry_serpent_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_serpent_module-serpent.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.obj `if test -f 'lib/libgcrypt-grub/cipher/serpent.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/serpent.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/serpent.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_serpent_module-serpent.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_serpent_module-serpent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/serpent.c' object='lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $(gcry_serpent_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_serpent_module-serpent.obj `if test -f 'lib/libgcrypt-grub/cipher/serpent.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/serpent.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/serpent.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.o: lib/libgcrypt-grub/cipher/sha1.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha1_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha1_module-sha1.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.o `test -f 'lib/libgcrypt-grub/cipher/sha1.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/sha1.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha1_module-sha1.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha1_module-sha1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/sha1.c' object='lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha1_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.o `test -f 'lib/libgcrypt-grub/cipher/sha1.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/sha1.c
+
+lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.obj: lib/libgcrypt-grub/cipher/sha1.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha1_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha1_module-sha1.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.obj `if test -f 'lib/libgcrypt-grub/cipher/sha1.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/sha1.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/sha1.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha1_module-sha1.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha1_module-sha1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/sha1.c' object='lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha1_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_sha1_module-sha1.obj `if test -f 'lib/libgcrypt-grub/cipher/sha1.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/sha1.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/sha1.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.o: lib/libgcrypt-grub/cipher/sha256.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha256_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha256_module-sha256.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.o `test -f 'lib/libgcrypt-grub/cipher/sha256.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/sha256.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha256_module-sha256.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha256_module-sha256.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/sha256.c' object='lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha256_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.o `test -f 'lib/libgcrypt-grub/cipher/sha256.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/sha256.c
+
+lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.obj: lib/libgcrypt-grub/cipher/sha256.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha256_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha256_module-sha256.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.obj `if test -f 'lib/libgcrypt-grub/cipher/sha256.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/sha256.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/sha256.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha256_module-sha256.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha256_module-sha256.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/sha256.c' object='lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha256_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_sha256_module-sha256.obj `if test -f 'lib/libgcrypt-grub/cipher/sha256.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/sha256.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/sha256.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.o: lib/libgcrypt-grub/cipher/sha512.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha512_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha512_module-sha512.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.o `test -f 'lib/libgcrypt-grub/cipher/sha512.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/sha512.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha512_module-sha512.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha512_module-sha512.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/sha512.c' object='lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha512_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.o `test -f 'lib/libgcrypt-grub/cipher/sha512.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/sha512.c
+
+lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.obj: lib/libgcrypt-grub/cipher/sha512.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha512_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha512_module-sha512.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.obj `if test -f 'lib/libgcrypt-grub/cipher/sha512.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/sha512.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/sha512.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha512_module-sha512.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_sha512_module-sha512.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/sha512.c' object='lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $(gcry_sha512_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_sha512_module-sha512.obj `if test -f 'lib/libgcrypt-grub/cipher/sha512.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/sha512.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/sha512.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.o: lib/libgcrypt-grub/cipher/tiger.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $(gcry_tiger_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_tiger_module-tiger.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.o `test -f 'lib/libgcrypt-grub/cipher/tiger.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/tiger.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_tiger_module-tiger.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_tiger_module-tiger.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/tiger.c' object='lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $(gcry_tiger_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.o `test -f 'lib/libgcrypt-grub/cipher/tiger.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/tiger.c
+
+lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.obj: lib/libgcrypt-grub/cipher/tiger.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $(gcry_tiger_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_tiger_module-tiger.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.obj `if test -f 'lib/libgcrypt-grub/cipher/tiger.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/tiger.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/tiger.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_tiger_module-tiger.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_tiger_module-tiger.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/tiger.c' object='lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $(gcry_tiger_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_tiger_module-tiger.obj `if test -f 'lib/libgcrypt-grub/cipher/tiger.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/tiger.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/tiger.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.o: lib/libgcrypt-grub/cipher/twofish.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_twofish_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_twofish_module-twofish.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.o `test -f 'lib/libgcrypt-grub/cipher/twofish.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/twofish.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_twofish_module-twofish.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_twofish_module-twofish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/twofish.c' object='lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_twofish_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.o `test -f 'lib/libgcrypt-grub/cipher/twofish.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/twofish.c
+
+lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.obj: lib/libgcrypt-grub/cipher/twofish.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_twofish_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_twofish_module-twofish.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.obj `if test -f 'lib/libgcrypt-grub/cipher/twofish.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/twofish.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/twofish.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_twofish_module-twofish.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_twofish_module-twofish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/twofish.c' object='lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $(gcry_twofish_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_twofish_module-twofish.obj `if test -f 'lib/libgcrypt-grub/cipher/twofish.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/twofish.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/twofish.c'; fi`
+
+lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.o: lib/libgcrypt-grub/cipher/whirlpool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $(gcry_whirlpool_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.o -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_whirlpool_module-whirlpool.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.o `test -f 'lib/libgcrypt-grub/cipher/whirlpool.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/whirlpool.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_whirlpool_module-whirlpool.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_whirlpool_module-whirlpool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/whirlpool.c' object='lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $(gcry_whirlpool_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.o `test -f 'lib/libgcrypt-grub/cipher/whirlpool.c' || echo '$(srcdir)/'`lib/libgcrypt-grub/cipher/whirlpool.c
+
+lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.obj: lib/libgcrypt-grub/cipher/whirlpool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $(gcry_whirlpool_module_CFLAGS) $(CFLAGS) -MT lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.obj -MD -MP -MF lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_whirlpool_module-whirlpool.Tpo -c -o lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.obj `if test -f 'lib/libgcrypt-grub/cipher/whirlpool.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/whirlpool.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/whirlpool.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_whirlpool_module-whirlpool.Tpo lib/libgcrypt-grub/cipher/$(DEPDIR)/gcry_whirlpool_module-whirlpool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libgcrypt-grub/cipher/whirlpool.c' object='lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $(gcry_whirlpool_module_CFLAGS) $(CFLAGS) -c -o lib/libgcrypt-grub/cipher/gcry_whirlpool_module-whirlpool.obj `if test -f 'lib/libgcrypt-grub/cipher/whirlpool.c'; then $(CYGPATH_W) 'lib/libgcrypt-grub/cipher/whirlpool.c'; else $(CYGPATH_W) '$(srcdir)/lib/libgcrypt-grub/cipher/whirlpool.c'; fi`
+
+gettext/gettext_module-gettext.o: gettext/gettext.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $(gettext_module_CFLAGS) $(CFLAGS) -MT gettext/gettext_module-gettext.o -MD -MP -MF gettext/$(DEPDIR)/gettext_module-gettext.Tpo -c -o gettext/gettext_module-gettext.o `test -f 'gettext/gettext.c' || echo '$(srcdir)/'`gettext/gettext.c
+@am__fastdepCC_TRUE@ $(am__mv) gettext/$(DEPDIR)/gettext_module-gettext.Tpo gettext/$(DEPDIR)/gettext_module-gettext.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gettext/gettext.c' object='gettext/gettext_module-gettext.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $(gettext_module_CFLAGS) $(CFLAGS) -c -o gettext/gettext_module-gettext.o `test -f 'gettext/gettext.c' || echo '$(srcdir)/'`gettext/gettext.c
+
+gettext/gettext_module-gettext.obj: gettext/gettext.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $(gettext_module_CFLAGS) $(CFLAGS) -MT gettext/gettext_module-gettext.obj -MD -MP -MF gettext/$(DEPDIR)/gettext_module-gettext.Tpo -c -o gettext/gettext_module-gettext.obj `if test -f 'gettext/gettext.c'; then $(CYGPATH_W) 'gettext/gettext.c'; else $(CYGPATH_W) '$(srcdir)/gettext/gettext.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gettext/$(DEPDIR)/gettext_module-gettext.Tpo gettext/$(DEPDIR)/gettext_module-gettext.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gettext/gettext.c' object='gettext/gettext_module-gettext.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $(gettext_module_CFLAGS) $(CFLAGS) -c -o gettext/gettext_module-gettext.obj `if test -f 'gettext/gettext.c'; then $(CYGPATH_W) 'gettext/gettext.c'; else $(CYGPATH_W) '$(srcdir)/gettext/gettext.c'; fi`
+
+gfxmenu/gfxmenu_module-gfxmenu.o: gfxmenu/gfxmenu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gfxmenu.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gfxmenu.Tpo -c -o gfxmenu/gfxmenu_module-gfxmenu.o `test -f 'gfxmenu/gfxmenu.c' || echo '$(srcdir)/'`gfxmenu/gfxmenu.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gfxmenu.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gfxmenu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gfxmenu.c' object='gfxmenu/gfxmenu_module-gfxmenu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gfxmenu.o `test -f 'gfxmenu/gfxmenu.c' || echo '$(srcdir)/'`gfxmenu/gfxmenu.c
+
+gfxmenu/gfxmenu_module-gfxmenu.obj: gfxmenu/gfxmenu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gfxmenu.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gfxmenu.Tpo -c -o gfxmenu/gfxmenu_module-gfxmenu.obj `if test -f 'gfxmenu/gfxmenu.c'; then $(CYGPATH_W) 'gfxmenu/gfxmenu.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gfxmenu.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gfxmenu.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gfxmenu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gfxmenu.c' object='gfxmenu/gfxmenu_module-gfxmenu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gfxmenu.obj `if test -f 'gfxmenu/gfxmenu.c'; then $(CYGPATH_W) 'gfxmenu/gfxmenu.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gfxmenu.c'; fi`
+
+gfxmenu/gfxmenu_module-model.o: gfxmenu/model.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-model.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-model.Tpo -c -o gfxmenu/gfxmenu_module-model.o `test -f 'gfxmenu/model.c' || echo '$(srcdir)/'`gfxmenu/model.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-model.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-model.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/model.c' object='gfxmenu/gfxmenu_module-model.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-model.o `test -f 'gfxmenu/model.c' || echo '$(srcdir)/'`gfxmenu/model.c
+
+gfxmenu/gfxmenu_module-model.obj: gfxmenu/model.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-model.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-model.Tpo -c -o gfxmenu/gfxmenu_module-model.obj `if test -f 'gfxmenu/model.c'; then $(CYGPATH_W) 'gfxmenu/model.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/model.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-model.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-model.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/model.c' object='gfxmenu/gfxmenu_module-model.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-model.obj `if test -f 'gfxmenu/model.c'; then $(CYGPATH_W) 'gfxmenu/model.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/model.c'; fi`
+
+gfxmenu/gfxmenu_module-view.o: gfxmenu/view.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-view.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-view.Tpo -c -o gfxmenu/gfxmenu_module-view.o `test -f 'gfxmenu/view.c' || echo '$(srcdir)/'`gfxmenu/view.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-view.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-view.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/view.c' object='gfxmenu/gfxmenu_module-view.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-view.o `test -f 'gfxmenu/view.c' || echo '$(srcdir)/'`gfxmenu/view.c
+
+gfxmenu/gfxmenu_module-view.obj: gfxmenu/view.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-view.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-view.Tpo -c -o gfxmenu/gfxmenu_module-view.obj `if test -f 'gfxmenu/view.c'; then $(CYGPATH_W) 'gfxmenu/view.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/view.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-view.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-view.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/view.c' object='gfxmenu/gfxmenu_module-view.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-view.obj `if test -f 'gfxmenu/view.c'; then $(CYGPATH_W) 'gfxmenu/view.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/view.c'; fi`
+
+gfxmenu/gfxmenu_module-font.o: gfxmenu/font.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-font.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-font.Tpo -c -o gfxmenu/gfxmenu_module-font.o `test -f 'gfxmenu/font.c' || echo '$(srcdir)/'`gfxmenu/font.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-font.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-font.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/font.c' object='gfxmenu/gfxmenu_module-font.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-font.o `test -f 'gfxmenu/font.c' || echo '$(srcdir)/'`gfxmenu/font.c
+
+gfxmenu/gfxmenu_module-font.obj: gfxmenu/font.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-font.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-font.Tpo -c -o gfxmenu/gfxmenu_module-font.obj `if test -f 'gfxmenu/font.c'; then $(CYGPATH_W) 'gfxmenu/font.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/font.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-font.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-font.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/font.c' object='gfxmenu/gfxmenu_module-font.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-font.obj `if test -f 'gfxmenu/font.c'; then $(CYGPATH_W) 'gfxmenu/font.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/font.c'; fi`
+
+gfxmenu/gfxmenu_module-icon_manager.o: gfxmenu/icon_manager.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-icon_manager.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-icon_manager.Tpo -c -o gfxmenu/gfxmenu_module-icon_manager.o `test -f 'gfxmenu/icon_manager.c' || echo '$(srcdir)/'`gfxmenu/icon_manager.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-icon_manager.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-icon_manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/icon_manager.c' object='gfxmenu/gfxmenu_module-icon_manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-icon_manager.o `test -f 'gfxmenu/icon_manager.c' || echo '$(srcdir)/'`gfxmenu/icon_manager.c
+
+gfxmenu/gfxmenu_module-icon_manager.obj: gfxmenu/icon_manager.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-icon_manager.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-icon_manager.Tpo -c -o gfxmenu/gfxmenu_module-icon_manager.obj `if test -f 'gfxmenu/icon_manager.c'; then $(CYGPATH_W) 'gfxmenu/icon_manager.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/icon_manager.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-icon_manager.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-icon_manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/icon_manager.c' object='gfxmenu/gfxmenu_module-icon_manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-icon_manager.obj `if test -f 'gfxmenu/icon_manager.c'; then $(CYGPATH_W) 'gfxmenu/icon_manager.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/icon_manager.c'; fi`
+
+gfxmenu/gfxmenu_module-theme_loader.o: gfxmenu/theme_loader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-theme_loader.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-theme_loader.Tpo -c -o gfxmenu/gfxmenu_module-theme_loader.o `test -f 'gfxmenu/theme_loader.c' || echo '$(srcdir)/'`gfxmenu/theme_loader.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-theme_loader.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-theme_loader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/theme_loader.c' object='gfxmenu/gfxmenu_module-theme_loader.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-theme_loader.o `test -f 'gfxmenu/theme_loader.c' || echo '$(srcdir)/'`gfxmenu/theme_loader.c
+
+gfxmenu/gfxmenu_module-theme_loader.obj: gfxmenu/theme_loader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-theme_loader.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-theme_loader.Tpo -c -o gfxmenu/gfxmenu_module-theme_loader.obj `if test -f 'gfxmenu/theme_loader.c'; then $(CYGPATH_W) 'gfxmenu/theme_loader.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/theme_loader.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-theme_loader.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-theme_loader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/theme_loader.c' object='gfxmenu/gfxmenu_module-theme_loader.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-theme_loader.obj `if test -f 'gfxmenu/theme_loader.c'; then $(CYGPATH_W) 'gfxmenu/theme_loader.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/theme_loader.c'; fi`
+
+gfxmenu/gfxmenu_module-widget-box.o: gfxmenu/widget-box.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-widget-box.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-widget-box.Tpo -c -o gfxmenu/gfxmenu_module-widget-box.o `test -f 'gfxmenu/widget-box.c' || echo '$(srcdir)/'`gfxmenu/widget-box.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-widget-box.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-widget-box.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/widget-box.c' object='gfxmenu/gfxmenu_module-widget-box.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-widget-box.o `test -f 'gfxmenu/widget-box.c' || echo '$(srcdir)/'`gfxmenu/widget-box.c
+
+gfxmenu/gfxmenu_module-widget-box.obj: gfxmenu/widget-box.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-widget-box.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-widget-box.Tpo -c -o gfxmenu/gfxmenu_module-widget-box.obj `if test -f 'gfxmenu/widget-box.c'; then $(CYGPATH_W) 'gfxmenu/widget-box.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/widget-box.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-widget-box.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-widget-box.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/widget-box.c' object='gfxmenu/gfxmenu_module-widget-box.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-widget-box.obj `if test -f 'gfxmenu/widget-box.c'; then $(CYGPATH_W) 'gfxmenu/widget-box.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/widget-box.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_canvas.o: gfxmenu/gui_canvas.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_canvas.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_canvas.Tpo -c -o gfxmenu/gfxmenu_module-gui_canvas.o `test -f 'gfxmenu/gui_canvas.c' || echo '$(srcdir)/'`gfxmenu/gui_canvas.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_canvas.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_canvas.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_canvas.c' object='gfxmenu/gfxmenu_module-gui_canvas.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_canvas.o `test -f 'gfxmenu/gui_canvas.c' || echo '$(srcdir)/'`gfxmenu/gui_canvas.c
+
+gfxmenu/gfxmenu_module-gui_canvas.obj: gfxmenu/gui_canvas.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_canvas.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_canvas.Tpo -c -o gfxmenu/gfxmenu_module-gui_canvas.obj `if test -f 'gfxmenu/gui_canvas.c'; then $(CYGPATH_W) 'gfxmenu/gui_canvas.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_canvas.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_canvas.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_canvas.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_canvas.c' object='gfxmenu/gfxmenu_module-gui_canvas.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_canvas.obj `if test -f 'gfxmenu/gui_canvas.c'; then $(CYGPATH_W) 'gfxmenu/gui_canvas.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_canvas.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_circular_progress.o: gfxmenu/gui_circular_progress.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_circular_progress.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_circular_progress.Tpo -c -o gfxmenu/gfxmenu_module-gui_circular_progress.o `test -f 'gfxmenu/gui_circular_progress.c' || echo '$(srcdir)/'`gfxmenu/gui_circular_progress.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_circular_progress.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_circular_progress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_circular_progress.c' object='gfxmenu/gfxmenu_module-gui_circular_progress.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_circular_progress.o `test -f 'gfxmenu/gui_circular_progress.c' || echo '$(srcdir)/'`gfxmenu/gui_circular_progress.c
+
+gfxmenu/gfxmenu_module-gui_circular_progress.obj: gfxmenu/gui_circular_progress.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_circular_progress.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_circular_progress.Tpo -c -o gfxmenu/gfxmenu_module-gui_circular_progress.obj `if test -f 'gfxmenu/gui_circular_progress.c'; then $(CYGPATH_W) 'gfxmenu/gui_circular_progress.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_circular_progress.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_circular_progress.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_circular_progress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_circular_progress.c' object='gfxmenu/gfxmenu_module-gui_circular_progress.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_circular_progress.obj `if test -f 'gfxmenu/gui_circular_progress.c'; then $(CYGPATH_W) 'gfxmenu/gui_circular_progress.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_circular_progress.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_box.o: gfxmenu/gui_box.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_box.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_box.Tpo -c -o gfxmenu/gfxmenu_module-gui_box.o `test -f 'gfxmenu/gui_box.c' || echo '$(srcdir)/'`gfxmenu/gui_box.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_box.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_box.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_box.c' object='gfxmenu/gfxmenu_module-gui_box.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_box.o `test -f 'gfxmenu/gui_box.c' || echo '$(srcdir)/'`gfxmenu/gui_box.c
+
+gfxmenu/gfxmenu_module-gui_box.obj: gfxmenu/gui_box.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_box.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_box.Tpo -c -o gfxmenu/gfxmenu_module-gui_box.obj `if test -f 'gfxmenu/gui_box.c'; then $(CYGPATH_W) 'gfxmenu/gui_box.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_box.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_box.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_box.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_box.c' object='gfxmenu/gfxmenu_module-gui_box.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_box.obj `if test -f 'gfxmenu/gui_box.c'; then $(CYGPATH_W) 'gfxmenu/gui_box.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_box.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_label.o: gfxmenu/gui_label.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_label.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_label.Tpo -c -o gfxmenu/gfxmenu_module-gui_label.o `test -f 'gfxmenu/gui_label.c' || echo '$(srcdir)/'`gfxmenu/gui_label.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_label.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_label.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_label.c' object='gfxmenu/gfxmenu_module-gui_label.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_label.o `test -f 'gfxmenu/gui_label.c' || echo '$(srcdir)/'`gfxmenu/gui_label.c
+
+gfxmenu/gfxmenu_module-gui_label.obj: gfxmenu/gui_label.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_label.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_label.Tpo -c -o gfxmenu/gfxmenu_module-gui_label.obj `if test -f 'gfxmenu/gui_label.c'; then $(CYGPATH_W) 'gfxmenu/gui_label.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_label.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_label.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_label.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_label.c' object='gfxmenu/gfxmenu_module-gui_label.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_label.obj `if test -f 'gfxmenu/gui_label.c'; then $(CYGPATH_W) 'gfxmenu/gui_label.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_label.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_list.o: gfxmenu/gui_list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_list.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_list.Tpo -c -o gfxmenu/gfxmenu_module-gui_list.o `test -f 'gfxmenu/gui_list.c' || echo '$(srcdir)/'`gfxmenu/gui_list.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_list.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_list.c' object='gfxmenu/gfxmenu_module-gui_list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_list.o `test -f 'gfxmenu/gui_list.c' || echo '$(srcdir)/'`gfxmenu/gui_list.c
+
+gfxmenu/gfxmenu_module-gui_list.obj: gfxmenu/gui_list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_list.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_list.Tpo -c -o gfxmenu/gfxmenu_module-gui_list.obj `if test -f 'gfxmenu/gui_list.c'; then $(CYGPATH_W) 'gfxmenu/gui_list.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_list.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_list.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_list.c' object='gfxmenu/gfxmenu_module-gui_list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_list.obj `if test -f 'gfxmenu/gui_list.c'; then $(CYGPATH_W) 'gfxmenu/gui_list.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_list.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_image.o: gfxmenu/gui_image.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_image.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_image.Tpo -c -o gfxmenu/gfxmenu_module-gui_image.o `test -f 'gfxmenu/gui_image.c' || echo '$(srcdir)/'`gfxmenu/gui_image.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_image.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_image.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_image.c' object='gfxmenu/gfxmenu_module-gui_image.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_image.o `test -f 'gfxmenu/gui_image.c' || echo '$(srcdir)/'`gfxmenu/gui_image.c
+
+gfxmenu/gfxmenu_module-gui_image.obj: gfxmenu/gui_image.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_image.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_image.Tpo -c -o gfxmenu/gfxmenu_module-gui_image.obj `if test -f 'gfxmenu/gui_image.c'; then $(CYGPATH_W) 'gfxmenu/gui_image.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_image.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_image.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_image.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_image.c' object='gfxmenu/gfxmenu_module-gui_image.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_image.obj `if test -f 'gfxmenu/gui_image.c'; then $(CYGPATH_W) 'gfxmenu/gui_image.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_image.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_progress_bar.o: gfxmenu/gui_progress_bar.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_progress_bar.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_progress_bar.Tpo -c -o gfxmenu/gfxmenu_module-gui_progress_bar.o `test -f 'gfxmenu/gui_progress_bar.c' || echo '$(srcdir)/'`gfxmenu/gui_progress_bar.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_progress_bar.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_progress_bar.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_progress_bar.c' object='gfxmenu/gfxmenu_module-gui_progress_bar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_progress_bar.o `test -f 'gfxmenu/gui_progress_bar.c' || echo '$(srcdir)/'`gfxmenu/gui_progress_bar.c
+
+gfxmenu/gfxmenu_module-gui_progress_bar.obj: gfxmenu/gui_progress_bar.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_progress_bar.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_progress_bar.Tpo -c -o gfxmenu/gfxmenu_module-gui_progress_bar.obj `if test -f 'gfxmenu/gui_progress_bar.c'; then $(CYGPATH_W) 'gfxmenu/gui_progress_bar.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_progress_bar.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_progress_bar.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_progress_bar.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_progress_bar.c' object='gfxmenu/gfxmenu_module-gui_progress_bar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_progress_bar.obj `if test -f 'gfxmenu/gui_progress_bar.c'; then $(CYGPATH_W) 'gfxmenu/gui_progress_bar.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_progress_bar.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_util.o: gfxmenu/gui_util.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_util.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_util.Tpo -c -o gfxmenu/gfxmenu_module-gui_util.o `test -f 'gfxmenu/gui_util.c' || echo '$(srcdir)/'`gfxmenu/gui_util.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_util.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_util.c' object='gfxmenu/gfxmenu_module-gui_util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_util.o `test -f 'gfxmenu/gui_util.c' || echo '$(srcdir)/'`gfxmenu/gui_util.c
+
+gfxmenu/gfxmenu_module-gui_util.obj: gfxmenu/gui_util.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_util.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_util.Tpo -c -o gfxmenu/gfxmenu_module-gui_util.obj `if test -f 'gfxmenu/gui_util.c'; then $(CYGPATH_W) 'gfxmenu/gui_util.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_util.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_util.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_util.c' object='gfxmenu/gfxmenu_module-gui_util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_util.obj `if test -f 'gfxmenu/gui_util.c'; then $(CYGPATH_W) 'gfxmenu/gui_util.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_util.c'; fi`
+
+gfxmenu/gfxmenu_module-gui_string_util.o: gfxmenu/gui_string_util.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_string_util.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_string_util.Tpo -c -o gfxmenu/gfxmenu_module-gui_string_util.o `test -f 'gfxmenu/gui_string_util.c' || echo '$(srcdir)/'`gfxmenu/gui_string_util.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_string_util.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_string_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_string_util.c' object='gfxmenu/gfxmenu_module-gui_string_util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_string_util.o `test -f 'gfxmenu/gui_string_util.c' || echo '$(srcdir)/'`gfxmenu/gui_string_util.c
+
+gfxmenu/gfxmenu_module-gui_string_util.obj: gfxmenu/gui_string_util.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-gui_string_util.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-gui_string_util.Tpo -c -o gfxmenu/gfxmenu_module-gui_string_util.obj `if test -f 'gfxmenu/gui_string_util.c'; then $(CYGPATH_W) 'gfxmenu/gui_string_util.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_string_util.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-gui_string_util.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-gui_string_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/gui_string_util.c' object='gfxmenu/gfxmenu_module-gui_string_util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-gui_string_util.obj `if test -f 'gfxmenu/gui_string_util.c'; then $(CYGPATH_W) 'gfxmenu/gui_string_util.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/gui_string_util.c'; fi`
+
+gfxmenu/gfxmenu_module-named_colors.o: gfxmenu/named_colors.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-named_colors.o -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-named_colors.Tpo -c -o gfxmenu/gfxmenu_module-named_colors.o `test -f 'gfxmenu/named_colors.c' || echo '$(srcdir)/'`gfxmenu/named_colors.c
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-named_colors.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-named_colors.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/named_colors.c' object='gfxmenu/gfxmenu_module-named_colors.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-named_colors.o `test -f 'gfxmenu/named_colors.c' || echo '$(srcdir)/'`gfxmenu/named_colors.c
+
+gfxmenu/gfxmenu_module-named_colors.obj: gfxmenu/named_colors.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -MT gfxmenu/gfxmenu_module-named_colors.obj -MD -MP -MF gfxmenu/$(DEPDIR)/gfxmenu_module-named_colors.Tpo -c -o gfxmenu/gfxmenu_module-named_colors.obj `if test -f 'gfxmenu/named_colors.c'; then $(CYGPATH_W) 'gfxmenu/named_colors.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/named_colors.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gfxmenu/$(DEPDIR)/gfxmenu_module-named_colors.Tpo gfxmenu/$(DEPDIR)/gfxmenu_module-named_colors.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gfxmenu/named_colors.c' object='gfxmenu/gfxmenu_module-named_colors.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $(gfxmenu_module_CFLAGS) $(CFLAGS) -c -o gfxmenu/gfxmenu_module-named_colors.obj `if test -f 'gfxmenu/named_colors.c'; then $(CYGPATH_W) 'gfxmenu/named_colors.c'; else $(CYGPATH_W) '$(srcdir)/gfxmenu/named_colors.c'; fi`
+
+term/gfxterm_module-gfxterm.o: term/gfxterm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $(gfxterm_module_CFLAGS) $(CFLAGS) -MT term/gfxterm_module-gfxterm.o -MD -MP -MF term/$(DEPDIR)/gfxterm_module-gfxterm.Tpo -c -o term/gfxterm_module-gfxterm.o `test -f 'term/gfxterm.c' || echo '$(srcdir)/'`term/gfxterm.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/gfxterm_module-gfxterm.Tpo term/$(DEPDIR)/gfxterm_module-gfxterm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/gfxterm.c' object='term/gfxterm_module-gfxterm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $(gfxterm_module_CFLAGS) $(CFLAGS) -c -o term/gfxterm_module-gfxterm.o `test -f 'term/gfxterm.c' || echo '$(srcdir)/'`term/gfxterm.c
+
+term/gfxterm_module-gfxterm.obj: term/gfxterm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $(gfxterm_module_CFLAGS) $(CFLAGS) -MT term/gfxterm_module-gfxterm.obj -MD -MP -MF term/$(DEPDIR)/gfxterm_module-gfxterm.Tpo -c -o term/gfxterm_module-gfxterm.obj `if test -f 'term/gfxterm.c'; then $(CYGPATH_W) 'term/gfxterm.c'; else $(CYGPATH_W) '$(srcdir)/term/gfxterm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/gfxterm_module-gfxterm.Tpo term/$(DEPDIR)/gfxterm_module-gfxterm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/gfxterm.c' object='term/gfxterm_module-gfxterm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $(gfxterm_module_CFLAGS) $(CFLAGS) -c -o term/gfxterm_module-gfxterm.obj `if test -f 'term/gfxterm.c'; then $(CYGPATH_W) 'term/gfxterm.c'; else $(CYGPATH_W) '$(srcdir)/term/gfxterm.c'; fi`
+
+commands/gptsync_module-gptsync.o: commands/gptsync.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $(gptsync_module_CFLAGS) $(CFLAGS) -MT commands/gptsync_module-gptsync.o -MD -MP -MF commands/$(DEPDIR)/gptsync_module-gptsync.Tpo -c -o commands/gptsync_module-gptsync.o `test -f 'commands/gptsync.c' || echo '$(srcdir)/'`commands/gptsync.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/gptsync_module-gptsync.Tpo commands/$(DEPDIR)/gptsync_module-gptsync.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/gptsync.c' object='commands/gptsync_module-gptsync.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $(gptsync_module_CFLAGS) $(CFLAGS) -c -o commands/gptsync_module-gptsync.o `test -f 'commands/gptsync.c' || echo '$(srcdir)/'`commands/gptsync.c
+
+commands/gptsync_module-gptsync.obj: commands/gptsync.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $(gptsync_module_CFLAGS) $(CFLAGS) -MT commands/gptsync_module-gptsync.obj -MD -MP -MF commands/$(DEPDIR)/gptsync_module-gptsync.Tpo -c -o commands/gptsync_module-gptsync.obj `if test -f 'commands/gptsync.c'; then $(CYGPATH_W) 'commands/gptsync.c'; else $(CYGPATH_W) '$(srcdir)/commands/gptsync.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/gptsync_module-gptsync.Tpo commands/$(DEPDIR)/gptsync_module-gptsync.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/gptsync.c' object='commands/gptsync_module-gptsync.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $(gptsync_module_CFLAGS) $(CFLAGS) -c -o commands/gptsync_module-gptsync.obj `if test -f 'commands/gptsync.c'; then $(CYGPATH_W) 'commands/gptsync.c'; else $(CYGPATH_W) '$(srcdir)/commands/gptsync.c'; fi`
+
+kern/emu/grub_emu-full.o: kern/emu/full.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -MT kern/emu/grub_emu-full.o -MD -MP -MF kern/emu/$(DEPDIR)/grub_emu-full.Tpo -c -o kern/emu/grub_emu-full.o `test -f 'kern/emu/full.c' || echo '$(srcdir)/'`kern/emu/full.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/grub_emu-full.Tpo kern/emu/$(DEPDIR)/grub_emu-full.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/full.c' object='kern/emu/grub_emu-full.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -c -o kern/emu/grub_emu-full.o `test -f 'kern/emu/full.c' || echo '$(srcdir)/'`kern/emu/full.c
+
+kern/emu/grub_emu-full.obj: kern/emu/full.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -MT kern/emu/grub_emu-full.obj -MD -MP -MF kern/emu/$(DEPDIR)/grub_emu-full.Tpo -c -o kern/emu/grub_emu-full.obj `if test -f 'kern/emu/full.c'; then $(CYGPATH_W) 'kern/emu/full.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/full.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/grub_emu-full.Tpo kern/emu/$(DEPDIR)/grub_emu-full.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/full.c' object='kern/emu/grub_emu-full.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -c -o kern/emu/grub_emu-full.obj `if test -f 'kern/emu/full.c'; then $(CYGPATH_W) 'kern/emu/full.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/full.c'; fi`
+
+grub_emu-grub_emu_init.o: grub_emu_init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -MT grub_emu-grub_emu_init.o -MD -MP -MF $(DEPDIR)/grub_emu-grub_emu_init.Tpo -c -o grub_emu-grub_emu_init.o `test -f 'grub_emu_init.c' || echo '$(srcdir)/'`grub_emu_init.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/grub_emu-grub_emu_init.Tpo $(DEPDIR)/grub_emu-grub_emu_init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grub_emu_init.c' object='grub_emu-grub_emu_init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -c -o grub_emu-grub_emu_init.o `test -f 'grub_emu_init.c' || echo '$(srcdir)/'`grub_emu_init.c
+
+grub_emu-grub_emu_init.obj: grub_emu_init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -MT grub_emu-grub_emu_init.obj -MD -MP -MF $(DEPDIR)/grub_emu-grub_emu_init.Tpo -c -o grub_emu-grub_emu_init.obj `if test -f 'grub_emu_init.c'; then $(CYGPATH_W) 'grub_emu_init.c'; else $(CYGPATH_W) '$(srcdir)/grub_emu_init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/grub_emu-grub_emu_init.Tpo $(DEPDIR)/grub_emu-grub_emu_init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grub_emu_init.c' object='grub_emu-grub_emu_init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_CPPFLAGS) $(CPPFLAGS) $(grub_emu_CFLAGS) $(CFLAGS) -c -o grub_emu-grub_emu_init.obj `if test -f 'grub_emu_init.c'; then $(CYGPATH_W) 'grub_emu_init.c'; else $(CYGPATH_W) '$(srcdir)/grub_emu_init.c'; fi`
+
+kern/emu/grub_emu_lite-lite.o: kern/emu/lite.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -MT kern/emu/grub_emu_lite-lite.o -MD -MP -MF kern/emu/$(DEPDIR)/grub_emu_lite-lite.Tpo -c -o kern/emu/grub_emu_lite-lite.o `test -f 'kern/emu/lite.c' || echo '$(srcdir)/'`kern/emu/lite.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/grub_emu_lite-lite.Tpo kern/emu/$(DEPDIR)/grub_emu_lite-lite.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/lite.c' object='kern/emu/grub_emu_lite-lite.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -c -o kern/emu/grub_emu_lite-lite.o `test -f 'kern/emu/lite.c' || echo '$(srcdir)/'`kern/emu/lite.c
+
+kern/emu/grub_emu_lite-lite.obj: kern/emu/lite.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -MT kern/emu/grub_emu_lite-lite.obj -MD -MP -MF kern/emu/$(DEPDIR)/grub_emu_lite-lite.Tpo -c -o kern/emu/grub_emu_lite-lite.obj `if test -f 'kern/emu/lite.c'; then $(CYGPATH_W) 'kern/emu/lite.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/lite.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/grub_emu_lite-lite.Tpo kern/emu/$(DEPDIR)/grub_emu_lite-lite.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/lite.c' object='kern/emu/grub_emu_lite-lite.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -c -o kern/emu/grub_emu_lite-lite.obj `if test -f 'kern/emu/lite.c'; then $(CYGPATH_W) 'kern/emu/lite.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/lite.c'; fi`
+
+grub_emu_lite-symlist.o: symlist.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -MT grub_emu_lite-symlist.o -MD -MP -MF $(DEPDIR)/grub_emu_lite-symlist.Tpo -c -o grub_emu_lite-symlist.o `test -f 'symlist.c' || echo '$(srcdir)/'`symlist.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/grub_emu_lite-symlist.Tpo $(DEPDIR)/grub_emu_lite-symlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='symlist.c' object='grub_emu_lite-symlist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -c -o grub_emu_lite-symlist.o `test -f 'symlist.c' || echo '$(srcdir)/'`symlist.c
+
+grub_emu_lite-symlist.obj: symlist.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -MT grub_emu_lite-symlist.obj -MD -MP -MF $(DEPDIR)/grub_emu_lite-symlist.Tpo -c -o grub_emu_lite-symlist.obj `if test -f 'symlist.c'; then $(CYGPATH_W) 'symlist.c'; else $(CYGPATH_W) '$(srcdir)/symlist.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/grub_emu_lite-symlist.Tpo $(DEPDIR)/grub_emu_lite-symlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='symlist.c' object='grub_emu_lite-symlist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_emu_lite_CPPFLAGS) $(CPPFLAGS) $(grub_emu_lite_CFLAGS) $(CFLAGS) -c -o grub_emu_lite-symlist.obj `if test -f 'symlist.c'; then $(CYGPATH_W) 'symlist.c'; else $(CYGPATH_W) '$(srcdir)/symlist.c'; fi`
+
+io/gzio_module-gzio.o: io/gzio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $(gzio_module_CFLAGS) $(CFLAGS) -MT io/gzio_module-gzio.o -MD -MP -MF io/$(DEPDIR)/gzio_module-gzio.Tpo -c -o io/gzio_module-gzio.o `test -f 'io/gzio.c' || echo '$(srcdir)/'`io/gzio.c
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/gzio_module-gzio.Tpo io/$(DEPDIR)/gzio_module-gzio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/gzio.c' object='io/gzio_module-gzio.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $(gzio_module_CFLAGS) $(CFLAGS) -c -o io/gzio_module-gzio.o `test -f 'io/gzio.c' || echo '$(srcdir)/'`io/gzio.c
+
+io/gzio_module-gzio.obj: io/gzio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $(gzio_module_CFLAGS) $(CFLAGS) -MT io/gzio_module-gzio.obj -MD -MP -MF io/$(DEPDIR)/gzio_module-gzio.Tpo -c -o io/gzio_module-gzio.obj `if test -f 'io/gzio.c'; then $(CYGPATH_W) 'io/gzio.c'; else $(CYGPATH_W) '$(srcdir)/io/gzio.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/gzio_module-gzio.Tpo io/$(DEPDIR)/gzio_module-gzio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/gzio.c' object='io/gzio_module-gzio.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $(gzio_module_CFLAGS) $(CFLAGS) -c -o io/gzio_module-gzio.obj `if test -f 'io/gzio.c'; then $(CYGPATH_W) 'io/gzio.c'; else $(CYGPATH_W) '$(srcdir)/io/gzio.c'; fi`
+
+lib/emu/halt_module-halt.o: lib/emu/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/emu/halt_module-halt.o -MD -MP -MF lib/emu/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/emu/halt_module-halt.o `test -f 'lib/emu/halt.c' || echo '$(srcdir)/'`lib/emu/halt.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/emu/$(DEPDIR)/halt_module-halt.Tpo lib/emu/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/emu/halt.c' object='lib/emu/halt_module-halt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/emu/halt_module-halt.o `test -f 'lib/emu/halt.c' || echo '$(srcdir)/'`lib/emu/halt.c
+
+lib/emu/halt_module-halt.obj: lib/emu/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/emu/halt_module-halt.obj -MD -MP -MF lib/emu/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/emu/halt_module-halt.obj `if test -f 'lib/emu/halt.c'; then $(CYGPATH_W) 'lib/emu/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/emu/halt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/emu/$(DEPDIR)/halt_module-halt.Tpo lib/emu/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/emu/halt.c' object='lib/emu/halt_module-halt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/emu/halt_module-halt.obj `if test -f 'lib/emu/halt.c'; then $(CYGPATH_W) 'lib/emu/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/emu/halt.c'; fi`
+
+commands/halt_module-halt.o: commands/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT commands/halt_module-halt.o -MD -MP -MF commands/$(DEPDIR)/halt_module-halt.Tpo -c -o commands/halt_module-halt.o `test -f 'commands/halt.c' || echo '$(srcdir)/'`commands/halt.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/halt_module-halt.Tpo commands/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/halt.c' object='commands/halt_module-halt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o commands/halt_module-halt.o `test -f 'commands/halt.c' || echo '$(srcdir)/'`commands/halt.c
+
+commands/halt_module-halt.obj: commands/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT commands/halt_module-halt.obj -MD -MP -MF commands/$(DEPDIR)/halt_module-halt.Tpo -c -o commands/halt_module-halt.obj `if test -f 'commands/halt.c'; then $(CYGPATH_W) 'commands/halt.c'; else $(CYGPATH_W) '$(srcdir)/commands/halt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/halt_module-halt.Tpo commands/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/halt.c' object='commands/halt_module-halt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o commands/halt_module-halt.obj `if test -f 'commands/halt.c'; then $(CYGPATH_W) 'commands/halt.c'; else $(CYGPATH_W) '$(srcdir)/commands/halt.c'; fi`
+
+commands/halt_module-acpihalt.o: commands/acpihalt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT commands/halt_module-acpihalt.o -MD -MP -MF commands/$(DEPDIR)/halt_module-acpihalt.Tpo -c -o commands/halt_module-acpihalt.o `test -f 'commands/acpihalt.c' || echo '$(srcdir)/'`commands/acpihalt.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/halt_module-acpihalt.Tpo commands/$(DEPDIR)/halt_module-acpihalt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/acpihalt.c' object='commands/halt_module-acpihalt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o commands/halt_module-acpihalt.o `test -f 'commands/acpihalt.c' || echo '$(srcdir)/'`commands/acpihalt.c
+
+commands/halt_module-acpihalt.obj: commands/acpihalt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT commands/halt_module-acpihalt.obj -MD -MP -MF commands/$(DEPDIR)/halt_module-acpihalt.Tpo -c -o commands/halt_module-acpihalt.obj `if test -f 'commands/acpihalt.c'; then $(CYGPATH_W) 'commands/acpihalt.c'; else $(CYGPATH_W) '$(srcdir)/commands/acpihalt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/halt_module-acpihalt.Tpo commands/$(DEPDIR)/halt_module-acpihalt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/acpihalt.c' object='commands/halt_module-acpihalt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o commands/halt_module-acpihalt.obj `if test -f 'commands/acpihalt.c'; then $(CYGPATH_W) 'commands/acpihalt.c'; else $(CYGPATH_W) '$(srcdir)/commands/acpihalt.c'; fi`
+
+lib/i386/halt_module-halt.o: lib/i386/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/i386/halt_module-halt.o -MD -MP -MF lib/i386/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/i386/halt_module-halt.o `test -f 'lib/i386/halt.c' || echo '$(srcdir)/'`lib/i386/halt.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/halt_module-halt.Tpo lib/i386/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/halt.c' object='lib/i386/halt_module-halt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/i386/halt_module-halt.o `test -f 'lib/i386/halt.c' || echo '$(srcdir)/'`lib/i386/halt.c
+
+lib/i386/halt_module-halt.obj: lib/i386/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/i386/halt_module-halt.obj -MD -MP -MF lib/i386/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/i386/halt_module-halt.obj `if test -f 'lib/i386/halt.c'; then $(CYGPATH_W) 'lib/i386/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/halt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/halt_module-halt.Tpo lib/i386/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/halt.c' object='lib/i386/halt_module-halt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/i386/halt_module-halt.obj `if test -f 'lib/i386/halt.c'; then $(CYGPATH_W) 'lib/i386/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/halt.c'; fi`
+
+lib/efi/halt_module-halt.o: lib/efi/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/efi/halt_module-halt.o -MD -MP -MF lib/efi/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/efi/halt_module-halt.o `test -f 'lib/efi/halt.c' || echo '$(srcdir)/'`lib/efi/halt.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/efi/$(DEPDIR)/halt_module-halt.Tpo lib/efi/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/efi/halt.c' object='lib/efi/halt_module-halt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/efi/halt_module-halt.o `test -f 'lib/efi/halt.c' || echo '$(srcdir)/'`lib/efi/halt.c
+
+lib/efi/halt_module-halt.obj: lib/efi/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/efi/halt_module-halt.obj -MD -MP -MF lib/efi/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/efi/halt_module-halt.obj `if test -f 'lib/efi/halt.c'; then $(CYGPATH_W) 'lib/efi/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/efi/halt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/efi/$(DEPDIR)/halt_module-halt.Tpo lib/efi/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/efi/halt.c' object='lib/efi/halt_module-halt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/efi/halt_module-halt.obj `if test -f 'lib/efi/halt.c'; then $(CYGPATH_W) 'lib/efi/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/efi/halt.c'; fi`
+
+lib/ieee1275/halt_module-halt.o: lib/ieee1275/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/ieee1275/halt_module-halt.o -MD -MP -MF lib/ieee1275/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/ieee1275/halt_module-halt.o `test -f 'lib/ieee1275/halt.c' || echo '$(srcdir)/'`lib/ieee1275/halt.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/ieee1275/$(DEPDIR)/halt_module-halt.Tpo lib/ieee1275/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/ieee1275/halt.c' object='lib/ieee1275/halt_module-halt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/ieee1275/halt_module-halt.o `test -f 'lib/ieee1275/halt.c' || echo '$(srcdir)/'`lib/ieee1275/halt.c
+
+lib/ieee1275/halt_module-halt.obj: lib/ieee1275/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT lib/ieee1275/halt_module-halt.obj -MD -MP -MF lib/ieee1275/$(DEPDIR)/halt_module-halt.Tpo -c -o lib/ieee1275/halt_module-halt.obj `if test -f 'lib/ieee1275/halt.c'; then $(CYGPATH_W) 'lib/ieee1275/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/ieee1275/halt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/ieee1275/$(DEPDIR)/halt_module-halt.Tpo lib/ieee1275/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/ieee1275/halt.c' object='lib/ieee1275/halt_module-halt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o lib/ieee1275/halt_module-halt.obj `if test -f 'lib/ieee1275/halt.c'; then $(CYGPATH_W) 'lib/ieee1275/halt.c'; else $(CYGPATH_W) '$(srcdir)/lib/ieee1275/halt.c'; fi`
+
+commands/i386/pc/halt_module-halt.o: commands/i386/pc/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/halt_module-halt.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/halt_module-halt.Tpo -c -o commands/i386/pc/halt_module-halt.o `test -f 'commands/i386/pc/halt.c' || echo '$(srcdir)/'`commands/i386/pc/halt.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/halt_module-halt.Tpo commands/i386/pc/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/halt.c' object='commands/i386/pc/halt_module-halt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/halt_module-halt.o `test -f 'commands/i386/pc/halt.c' || echo '$(srcdir)/'`commands/i386/pc/halt.c
+
+commands/i386/pc/halt_module-halt.obj: commands/i386/pc/halt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/halt_module-halt.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/halt_module-halt.Tpo -c -o commands/i386/pc/halt_module-halt.obj `if test -f 'commands/i386/pc/halt.c'; then $(CYGPATH_W) 'commands/i386/pc/halt.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/halt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/halt_module-halt.Tpo commands/i386/pc/$(DEPDIR)/halt_module-halt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/halt.c' object='commands/i386/pc/halt_module-halt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $(halt_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/halt_module-halt.obj `if test -f 'commands/i386/pc/halt.c'; then $(CYGPATH_W) 'commands/i386/pc/halt.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/halt.c'; fi`
+
+commands/hashsum_module-hashsum.o: commands/hashsum.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $(hashsum_module_CFLAGS) $(CFLAGS) -MT commands/hashsum_module-hashsum.o -MD -MP -MF commands/$(DEPDIR)/hashsum_module-hashsum.Tpo -c -o commands/hashsum_module-hashsum.o `test -f 'commands/hashsum.c' || echo '$(srcdir)/'`commands/hashsum.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/hashsum_module-hashsum.Tpo commands/$(DEPDIR)/hashsum_module-hashsum.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/hashsum.c' object='commands/hashsum_module-hashsum.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $(hashsum_module_CFLAGS) $(CFLAGS) -c -o commands/hashsum_module-hashsum.o `test -f 'commands/hashsum.c' || echo '$(srcdir)/'`commands/hashsum.c
+
+commands/hashsum_module-hashsum.obj: commands/hashsum.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $(hashsum_module_CFLAGS) $(CFLAGS) -MT commands/hashsum_module-hashsum.obj -MD -MP -MF commands/$(DEPDIR)/hashsum_module-hashsum.Tpo -c -o commands/hashsum_module-hashsum.obj `if test -f 'commands/hashsum.c'; then $(CYGPATH_W) 'commands/hashsum.c'; else $(CYGPATH_W) '$(srcdir)/commands/hashsum.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/hashsum_module-hashsum.Tpo commands/$(DEPDIR)/hashsum_module-hashsum.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/hashsum.c' object='commands/hashsum_module-hashsum.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $(hashsum_module_CFLAGS) $(CFLAGS) -c -o commands/hashsum_module-hashsum.obj `if test -f 'commands/hashsum.c'; then $(CYGPATH_W) 'commands/hashsum.c'; else $(CYGPATH_W) '$(srcdir)/commands/hashsum.c'; fi`
+
+commands/hdparm_module-hdparm.o: commands/hdparm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -MT commands/hdparm_module-hdparm.o -MD -MP -MF commands/$(DEPDIR)/hdparm_module-hdparm.Tpo -c -o commands/hdparm_module-hdparm.o `test -f 'commands/hdparm.c' || echo '$(srcdir)/'`commands/hdparm.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/hdparm_module-hdparm.Tpo commands/$(DEPDIR)/hdparm_module-hdparm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/hdparm.c' object='commands/hdparm_module-hdparm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -c -o commands/hdparm_module-hdparm.o `test -f 'commands/hdparm.c' || echo '$(srcdir)/'`commands/hdparm.c
+
+commands/hdparm_module-hdparm.obj: commands/hdparm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -MT commands/hdparm_module-hdparm.obj -MD -MP -MF commands/$(DEPDIR)/hdparm_module-hdparm.Tpo -c -o commands/hdparm_module-hdparm.obj `if test -f 'commands/hdparm.c'; then $(CYGPATH_W) 'commands/hdparm.c'; else $(CYGPATH_W) '$(srcdir)/commands/hdparm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/hdparm_module-hdparm.Tpo commands/$(DEPDIR)/hdparm_module-hdparm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/hdparm.c' object='commands/hdparm_module-hdparm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -c -o commands/hdparm_module-hdparm.obj `if test -f 'commands/hdparm.c'; then $(CYGPATH_W) 'commands/hdparm.c'; else $(CYGPATH_W) '$(srcdir)/commands/hdparm.c'; fi`
+
+lib/hdparm_module-hexdump.o: lib/hexdump.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -MT lib/hdparm_module-hexdump.o -MD -MP -MF lib/$(DEPDIR)/hdparm_module-hexdump.Tpo -c -o lib/hdparm_module-hexdump.o `test -f 'lib/hexdump.c' || echo '$(srcdir)/'`lib/hexdump.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/hdparm_module-hexdump.Tpo lib/$(DEPDIR)/hdparm_module-hexdump.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/hexdump.c' object='lib/hdparm_module-hexdump.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -c -o lib/hdparm_module-hexdump.o `test -f 'lib/hexdump.c' || echo '$(srcdir)/'`lib/hexdump.c
+
+lib/hdparm_module-hexdump.obj: lib/hexdump.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -MT lib/hdparm_module-hexdump.obj -MD -MP -MF lib/$(DEPDIR)/hdparm_module-hexdump.Tpo -c -o lib/hdparm_module-hexdump.obj `if test -f 'lib/hexdump.c'; then $(CYGPATH_W) 'lib/hexdump.c'; else $(CYGPATH_W) '$(srcdir)/lib/hexdump.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/hdparm_module-hexdump.Tpo lib/$(DEPDIR)/hdparm_module-hexdump.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/hexdump.c' object='lib/hdparm_module-hexdump.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $(hdparm_module_CFLAGS) $(CFLAGS) -c -o lib/hdparm_module-hexdump.obj `if test -f 'lib/hexdump.c'; then $(CYGPATH_W) 'lib/hexdump.c'; else $(CYGPATH_W) '$(srcdir)/lib/hexdump.c'; fi`
+
+hello/hello_module-hello.o: hello/hello.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $(hello_module_CFLAGS) $(CFLAGS) -MT hello/hello_module-hello.o -MD -MP -MF hello/$(DEPDIR)/hello_module-hello.Tpo -c -o hello/hello_module-hello.o `test -f 'hello/hello.c' || echo '$(srcdir)/'`hello/hello.c
+@am__fastdepCC_TRUE@ $(am__mv) hello/$(DEPDIR)/hello_module-hello.Tpo hello/$(DEPDIR)/hello_module-hello.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hello/hello.c' object='hello/hello_module-hello.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $(hello_module_CFLAGS) $(CFLAGS) -c -o hello/hello_module-hello.o `test -f 'hello/hello.c' || echo '$(srcdir)/'`hello/hello.c
+
+hello/hello_module-hello.obj: hello/hello.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $(hello_module_CFLAGS) $(CFLAGS) -MT hello/hello_module-hello.obj -MD -MP -MF hello/$(DEPDIR)/hello_module-hello.Tpo -c -o hello/hello_module-hello.obj `if test -f 'hello/hello.c'; then $(CYGPATH_W) 'hello/hello.c'; else $(CYGPATH_W) '$(srcdir)/hello/hello.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) hello/$(DEPDIR)/hello_module-hello.Tpo hello/$(DEPDIR)/hello_module-hello.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hello/hello.c' object='hello/hello_module-hello.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $(hello_module_CFLAGS) $(CFLAGS) -c -o hello/hello_module-hello.obj `if test -f 'hello/hello.c'; then $(CYGPATH_W) 'hello/hello.c'; else $(CYGPATH_W) '$(srcdir)/hello/hello.c'; fi`
+
+commands/help_module-help.o: commands/help.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $(help_module_CFLAGS) $(CFLAGS) -MT commands/help_module-help.o -MD -MP -MF commands/$(DEPDIR)/help_module-help.Tpo -c -o commands/help_module-help.o `test -f 'commands/help.c' || echo '$(srcdir)/'`commands/help.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/help_module-help.Tpo commands/$(DEPDIR)/help_module-help.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/help.c' object='commands/help_module-help.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $(help_module_CFLAGS) $(CFLAGS) -c -o commands/help_module-help.o `test -f 'commands/help.c' || echo '$(srcdir)/'`commands/help.c
+
+commands/help_module-help.obj: commands/help.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $(help_module_CFLAGS) $(CFLAGS) -MT commands/help_module-help.obj -MD -MP -MF commands/$(DEPDIR)/help_module-help.Tpo -c -o commands/help_module-help.obj `if test -f 'commands/help.c'; then $(CYGPATH_W) 'commands/help.c'; else $(CYGPATH_W) '$(srcdir)/commands/help.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/help_module-help.Tpo commands/$(DEPDIR)/help_module-help.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/help.c' object='commands/help_module-help.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $(help_module_CFLAGS) $(CFLAGS) -c -o commands/help_module-help.obj `if test -f 'commands/help.c'; then $(CYGPATH_W) 'commands/help.c'; else $(CYGPATH_W) '$(srcdir)/commands/help.c'; fi`
+
+commands/hexdump_module-hexdump.o: commands/hexdump.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -MT commands/hexdump_module-hexdump.o -MD -MP -MF commands/$(DEPDIR)/hexdump_module-hexdump.Tpo -c -o commands/hexdump_module-hexdump.o `test -f 'commands/hexdump.c' || echo '$(srcdir)/'`commands/hexdump.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/hexdump_module-hexdump.Tpo commands/$(DEPDIR)/hexdump_module-hexdump.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/hexdump.c' object='commands/hexdump_module-hexdump.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -c -o commands/hexdump_module-hexdump.o `test -f 'commands/hexdump.c' || echo '$(srcdir)/'`commands/hexdump.c
+
+commands/hexdump_module-hexdump.obj: commands/hexdump.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -MT commands/hexdump_module-hexdump.obj -MD -MP -MF commands/$(DEPDIR)/hexdump_module-hexdump.Tpo -c -o commands/hexdump_module-hexdump.obj `if test -f 'commands/hexdump.c'; then $(CYGPATH_W) 'commands/hexdump.c'; else $(CYGPATH_W) '$(srcdir)/commands/hexdump.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/hexdump_module-hexdump.Tpo commands/$(DEPDIR)/hexdump_module-hexdump.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/hexdump.c' object='commands/hexdump_module-hexdump.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -c -o commands/hexdump_module-hexdump.obj `if test -f 'commands/hexdump.c'; then $(CYGPATH_W) 'commands/hexdump.c'; else $(CYGPATH_W) '$(srcdir)/commands/hexdump.c'; fi`
+
+lib/hexdump_module-hexdump.o: lib/hexdump.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -MT lib/hexdump_module-hexdump.o -MD -MP -MF lib/$(DEPDIR)/hexdump_module-hexdump.Tpo -c -o lib/hexdump_module-hexdump.o `test -f 'lib/hexdump.c' || echo '$(srcdir)/'`lib/hexdump.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/hexdump_module-hexdump.Tpo lib/$(DEPDIR)/hexdump_module-hexdump.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/hexdump.c' object='lib/hexdump_module-hexdump.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -c -o lib/hexdump_module-hexdump.o `test -f 'lib/hexdump.c' || echo '$(srcdir)/'`lib/hexdump.c
+
+lib/hexdump_module-hexdump.obj: lib/hexdump.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -MT lib/hexdump_module-hexdump.obj -MD -MP -MF lib/$(DEPDIR)/hexdump_module-hexdump.Tpo -c -o lib/hexdump_module-hexdump.obj `if test -f 'lib/hexdump.c'; then $(CYGPATH_W) 'lib/hexdump.c'; else $(CYGPATH_W) '$(srcdir)/lib/hexdump.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/hexdump_module-hexdump.Tpo lib/$(DEPDIR)/hexdump_module-hexdump.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/hexdump.c' object='lib/hexdump_module-hexdump.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $(hexdump_module_CFLAGS) $(CFLAGS) -c -o lib/hexdump_module-hexdump.obj `if test -f 'lib/hexdump.c'; then $(CYGPATH_W) 'lib/hexdump.c'; else $(CYGPATH_W) '$(srcdir)/lib/hexdump.c'; fi`
+
+fs/hfs_module-hfs.o: fs/hfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $(hfs_module_CFLAGS) $(CFLAGS) -MT fs/hfs_module-hfs.o -MD -MP -MF fs/$(DEPDIR)/hfs_module-hfs.Tpo -c -o fs/hfs_module-hfs.o `test -f 'fs/hfs.c' || echo '$(srcdir)/'`fs/hfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/hfs_module-hfs.Tpo fs/$(DEPDIR)/hfs_module-hfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/hfs.c' object='fs/hfs_module-hfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $(hfs_module_CFLAGS) $(CFLAGS) -c -o fs/hfs_module-hfs.o `test -f 'fs/hfs.c' || echo '$(srcdir)/'`fs/hfs.c
+
+fs/hfs_module-hfs.obj: fs/hfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $(hfs_module_CFLAGS) $(CFLAGS) -MT fs/hfs_module-hfs.obj -MD -MP -MF fs/$(DEPDIR)/hfs_module-hfs.Tpo -c -o fs/hfs_module-hfs.obj `if test -f 'fs/hfs.c'; then $(CYGPATH_W) 'fs/hfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/hfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/hfs_module-hfs.Tpo fs/$(DEPDIR)/hfs_module-hfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/hfs.c' object='fs/hfs_module-hfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $(hfs_module_CFLAGS) $(CFLAGS) -c -o fs/hfs_module-hfs.obj `if test -f 'fs/hfs.c'; then $(CYGPATH_W) 'fs/hfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/hfs.c'; fi`
+
+fs/hfsplus_module-hfsplus.o: fs/hfsplus.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $(hfsplus_module_CFLAGS) $(CFLAGS) -MT fs/hfsplus_module-hfsplus.o -MD -MP -MF fs/$(DEPDIR)/hfsplus_module-hfsplus.Tpo -c -o fs/hfsplus_module-hfsplus.o `test -f 'fs/hfsplus.c' || echo '$(srcdir)/'`fs/hfsplus.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/hfsplus_module-hfsplus.Tpo fs/$(DEPDIR)/hfsplus_module-hfsplus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/hfsplus.c' object='fs/hfsplus_module-hfsplus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $(hfsplus_module_CFLAGS) $(CFLAGS) -c -o fs/hfsplus_module-hfsplus.o `test -f 'fs/hfsplus.c' || echo '$(srcdir)/'`fs/hfsplus.c
+
+fs/hfsplus_module-hfsplus.obj: fs/hfsplus.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $(hfsplus_module_CFLAGS) $(CFLAGS) -MT fs/hfsplus_module-hfsplus.obj -MD -MP -MF fs/$(DEPDIR)/hfsplus_module-hfsplus.Tpo -c -o fs/hfsplus_module-hfsplus.obj `if test -f 'fs/hfsplus.c'; then $(CYGPATH_W) 'fs/hfsplus.c'; else $(CYGPATH_W) '$(srcdir)/fs/hfsplus.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/hfsplus_module-hfsplus.Tpo fs/$(DEPDIR)/hfsplus_module-hfsplus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/hfsplus.c' object='fs/hfsplus_module-hfsplus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $(hfsplus_module_CFLAGS) $(CFLAGS) -c -o fs/hfsplus_module-hfsplus.obj `if test -f 'fs/hfsplus.c'; then $(CYGPATH_W) 'fs/hfsplus.c'; else $(CYGPATH_W) '$(srcdir)/fs/hfsplus.c'; fi`
+
+video/ieee1275_fb_module-ieee1275.o: video/ieee1275.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ieee1275_fb_module_CPPFLAGS) $(CPPFLAGS) $(ieee1275_fb_module_CFLAGS) $(CFLAGS) -MT video/ieee1275_fb_module-ieee1275.o -MD -MP -MF video/$(DEPDIR)/ieee1275_fb_module-ieee1275.Tpo -c -o video/ieee1275_fb_module-ieee1275.o `test -f 'video/ieee1275.c' || echo '$(srcdir)/'`video/ieee1275.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/ieee1275_fb_module-ieee1275.Tpo video/$(DEPDIR)/ieee1275_fb_module-ieee1275.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/ieee1275.c' object='video/ieee1275_fb_module-ieee1275.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ieee1275_fb_module_CPPFLAGS) $(CPPFLAGS) $(ieee1275_fb_module_CFLAGS) $(CFLAGS) -c -o video/ieee1275_fb_module-ieee1275.o `test -f 'video/ieee1275.c' || echo '$(srcdir)/'`video/ieee1275.c
+
+video/ieee1275_fb_module-ieee1275.obj: video/ieee1275.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ieee1275_fb_module_CPPFLAGS) $(CPPFLAGS) $(ieee1275_fb_module_CFLAGS) $(CFLAGS) -MT video/ieee1275_fb_module-ieee1275.obj -MD -MP -MF video/$(DEPDIR)/ieee1275_fb_module-ieee1275.Tpo -c -o video/ieee1275_fb_module-ieee1275.obj `if test -f 'video/ieee1275.c'; then $(CYGPATH_W) 'video/ieee1275.c'; else $(CYGPATH_W) '$(srcdir)/video/ieee1275.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/ieee1275_fb_module-ieee1275.Tpo video/$(DEPDIR)/ieee1275_fb_module-ieee1275.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/ieee1275.c' object='video/ieee1275_fb_module-ieee1275.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ieee1275_fb_module_CPPFLAGS) $(CPPFLAGS) $(ieee1275_fb_module_CFLAGS) $(CFLAGS) -c -o video/ieee1275_fb_module-ieee1275.obj `if test -f 'video/ieee1275.c'; then $(CYGPATH_W) 'video/ieee1275.c'; else $(CYGPATH_W) '$(srcdir)/video/ieee1275.c'; fi`
+
+commands/iorw_module-iorw.o: commands/iorw.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $(iorw_module_CFLAGS) $(CFLAGS) -MT commands/iorw_module-iorw.o -MD -MP -MF commands/$(DEPDIR)/iorw_module-iorw.Tpo -c -o commands/iorw_module-iorw.o `test -f 'commands/iorw.c' || echo '$(srcdir)/'`commands/iorw.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/iorw_module-iorw.Tpo commands/$(DEPDIR)/iorw_module-iorw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/iorw.c' object='commands/iorw_module-iorw.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $(iorw_module_CFLAGS) $(CFLAGS) -c -o commands/iorw_module-iorw.o `test -f 'commands/iorw.c' || echo '$(srcdir)/'`commands/iorw.c
+
+commands/iorw_module-iorw.obj: commands/iorw.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $(iorw_module_CFLAGS) $(CFLAGS) -MT commands/iorw_module-iorw.obj -MD -MP -MF commands/$(DEPDIR)/iorw_module-iorw.Tpo -c -o commands/iorw_module-iorw.obj `if test -f 'commands/iorw.c'; then $(CYGPATH_W) 'commands/iorw.c'; else $(CYGPATH_W) '$(srcdir)/commands/iorw.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/iorw_module-iorw.Tpo commands/$(DEPDIR)/iorw_module-iorw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/iorw.c' object='commands/iorw_module-iorw.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $(iorw_module_CFLAGS) $(CFLAGS) -c -o commands/iorw_module-iorw.obj `if test -f 'commands/iorw.c'; then $(CYGPATH_W) 'commands/iorw.c'; else $(CYGPATH_W) '$(srcdir)/commands/iorw.c'; fi`
+
+fs/iso9660_module-iso9660.o: fs/iso9660.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $(iso9660_module_CFLAGS) $(CFLAGS) -MT fs/iso9660_module-iso9660.o -MD -MP -MF fs/$(DEPDIR)/iso9660_module-iso9660.Tpo -c -o fs/iso9660_module-iso9660.o `test -f 'fs/iso9660.c' || echo '$(srcdir)/'`fs/iso9660.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/iso9660_module-iso9660.Tpo fs/$(DEPDIR)/iso9660_module-iso9660.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/iso9660.c' object='fs/iso9660_module-iso9660.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $(iso9660_module_CFLAGS) $(CFLAGS) -c -o fs/iso9660_module-iso9660.o `test -f 'fs/iso9660.c' || echo '$(srcdir)/'`fs/iso9660.c
+
+fs/iso9660_module-iso9660.obj: fs/iso9660.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $(iso9660_module_CFLAGS) $(CFLAGS) -MT fs/iso9660_module-iso9660.obj -MD -MP -MF fs/$(DEPDIR)/iso9660_module-iso9660.Tpo -c -o fs/iso9660_module-iso9660.obj `if test -f 'fs/iso9660.c'; then $(CYGPATH_W) 'fs/iso9660.c'; else $(CYGPATH_W) '$(srcdir)/fs/iso9660.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/iso9660_module-iso9660.Tpo fs/$(DEPDIR)/iso9660_module-iso9660.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/iso9660.c' object='fs/iso9660_module-iso9660.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $(iso9660_module_CFLAGS) $(CFLAGS) -c -o fs/iso9660_module-iso9660.obj `if test -f 'fs/iso9660.c'; then $(CYGPATH_W) 'fs/iso9660.c'; else $(CYGPATH_W) '$(srcdir)/fs/iso9660.c'; fi`
+
+fs/jfs_module-jfs.o: fs/jfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $(jfs_module_CFLAGS) $(CFLAGS) -MT fs/jfs_module-jfs.o -MD -MP -MF fs/$(DEPDIR)/jfs_module-jfs.Tpo -c -o fs/jfs_module-jfs.o `test -f 'fs/jfs.c' || echo '$(srcdir)/'`fs/jfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/jfs_module-jfs.Tpo fs/$(DEPDIR)/jfs_module-jfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/jfs.c' object='fs/jfs_module-jfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $(jfs_module_CFLAGS) $(CFLAGS) -c -o fs/jfs_module-jfs.o `test -f 'fs/jfs.c' || echo '$(srcdir)/'`fs/jfs.c
+
+fs/jfs_module-jfs.obj: fs/jfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $(jfs_module_CFLAGS) $(CFLAGS) -MT fs/jfs_module-jfs.obj -MD -MP -MF fs/$(DEPDIR)/jfs_module-jfs.Tpo -c -o fs/jfs_module-jfs.obj `if test -f 'fs/jfs.c'; then $(CYGPATH_W) 'fs/jfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/jfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/jfs_module-jfs.Tpo fs/$(DEPDIR)/jfs_module-jfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/jfs.c' object='fs/jfs_module-jfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $(jfs_module_CFLAGS) $(CFLAGS) -c -o fs/jfs_module-jfs.obj `if test -f 'fs/jfs.c'; then $(CYGPATH_W) 'fs/jfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/jfs.c'; fi`
+
+video/readers/jpeg_module-jpeg.o: video/readers/jpeg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $(jpeg_module_CFLAGS) $(CFLAGS) -MT video/readers/jpeg_module-jpeg.o -MD -MP -MF video/readers/$(DEPDIR)/jpeg_module-jpeg.Tpo -c -o video/readers/jpeg_module-jpeg.o `test -f 'video/readers/jpeg.c' || echo '$(srcdir)/'`video/readers/jpeg.c
+@am__fastdepCC_TRUE@ $(am__mv) video/readers/$(DEPDIR)/jpeg_module-jpeg.Tpo video/readers/$(DEPDIR)/jpeg_module-jpeg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/readers/jpeg.c' object='video/readers/jpeg_module-jpeg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $(jpeg_module_CFLAGS) $(CFLAGS) -c -o video/readers/jpeg_module-jpeg.o `test -f 'video/readers/jpeg.c' || echo '$(srcdir)/'`video/readers/jpeg.c
+
+video/readers/jpeg_module-jpeg.obj: video/readers/jpeg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $(jpeg_module_CFLAGS) $(CFLAGS) -MT video/readers/jpeg_module-jpeg.obj -MD -MP -MF video/readers/$(DEPDIR)/jpeg_module-jpeg.Tpo -c -o video/readers/jpeg_module-jpeg.obj `if test -f 'video/readers/jpeg.c'; then $(CYGPATH_W) 'video/readers/jpeg.c'; else $(CYGPATH_W) '$(srcdir)/video/readers/jpeg.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/readers/$(DEPDIR)/jpeg_module-jpeg.Tpo video/readers/$(DEPDIR)/jpeg_module-jpeg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/readers/jpeg.c' object='video/readers/jpeg_module-jpeg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $(jpeg_module_CFLAGS) $(CFLAGS) -c -o video/readers/jpeg_module-jpeg.obj `if test -f 'video/readers/jpeg.c'; then $(CYGPATH_W) 'video/readers/jpeg.c'; else $(CYGPATH_W) '$(srcdir)/video/readers/jpeg.c'; fi`
+
+disk/kernel_exec-host.o: disk/host.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT disk/kernel_exec-host.o -MD -MP -MF disk/$(DEPDIR)/kernel_exec-host.Tpo -c -o disk/kernel_exec-host.o `test -f 'disk/host.c' || echo '$(srcdir)/'`disk/host.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/kernel_exec-host.Tpo disk/$(DEPDIR)/kernel_exec-host.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/host.c' object='disk/kernel_exec-host.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o disk/kernel_exec-host.o `test -f 'disk/host.c' || echo '$(srcdir)/'`disk/host.c
+
+disk/kernel_exec-host.obj: disk/host.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT disk/kernel_exec-host.obj -MD -MP -MF disk/$(DEPDIR)/kernel_exec-host.Tpo -c -o disk/kernel_exec-host.obj `if test -f 'disk/host.c'; then $(CYGPATH_W) 'disk/host.c'; else $(CYGPATH_W) '$(srcdir)/disk/host.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/kernel_exec-host.Tpo disk/$(DEPDIR)/kernel_exec-host.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/host.c' object='disk/kernel_exec-host.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o disk/kernel_exec-host.obj `if test -f 'disk/host.c'; then $(CYGPATH_W) 'disk/host.c'; else $(CYGPATH_W) '$(srcdir)/disk/host.c'; fi`
+
+gnulib/kernel_exec-progname.o: gnulib/progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT gnulib/kernel_exec-progname.o -MD -MP -MF gnulib/$(DEPDIR)/kernel_exec-progname.Tpo -c -o gnulib/kernel_exec-progname.o `test -f 'gnulib/progname.c' || echo '$(srcdir)/'`gnulib/progname.c
+@am__fastdepCC_TRUE@ $(am__mv) gnulib/$(DEPDIR)/kernel_exec-progname.Tpo gnulib/$(DEPDIR)/kernel_exec-progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnulib/progname.c' object='gnulib/kernel_exec-progname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o gnulib/kernel_exec-progname.o `test -f 'gnulib/progname.c' || echo '$(srcdir)/'`gnulib/progname.c
+
+gnulib/kernel_exec-progname.obj: gnulib/progname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT gnulib/kernel_exec-progname.obj -MD -MP -MF gnulib/$(DEPDIR)/kernel_exec-progname.Tpo -c -o gnulib/kernel_exec-progname.obj `if test -f 'gnulib/progname.c'; then $(CYGPATH_W) 'gnulib/progname.c'; else $(CYGPATH_W) '$(srcdir)/gnulib/progname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gnulib/$(DEPDIR)/kernel_exec-progname.Tpo gnulib/$(DEPDIR)/kernel_exec-progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnulib/progname.c' object='gnulib/kernel_exec-progname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o gnulib/kernel_exec-progname.obj `if test -f 'gnulib/progname.c'; then $(CYGPATH_W) 'gnulib/progname.c'; else $(CYGPATH_W) '$(srcdir)/gnulib/progname.c'; fi`
+
+gnulib/kernel_exec-error.o: gnulib/error.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT gnulib/kernel_exec-error.o -MD -MP -MF gnulib/$(DEPDIR)/kernel_exec-error.Tpo -c -o gnulib/kernel_exec-error.o `test -f 'gnulib/error.c' || echo '$(srcdir)/'`gnulib/error.c
+@am__fastdepCC_TRUE@ $(am__mv) gnulib/$(DEPDIR)/kernel_exec-error.Tpo gnulib/$(DEPDIR)/kernel_exec-error.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnulib/error.c' object='gnulib/kernel_exec-error.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o gnulib/kernel_exec-error.o `test -f 'gnulib/error.c' || echo '$(srcdir)/'`gnulib/error.c
+
+gnulib/kernel_exec-error.obj: gnulib/error.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT gnulib/kernel_exec-error.obj -MD -MP -MF gnulib/$(DEPDIR)/kernel_exec-error.Tpo -c -o gnulib/kernel_exec-error.obj `if test -f 'gnulib/error.c'; then $(CYGPATH_W) 'gnulib/error.c'; else $(CYGPATH_W) '$(srcdir)/gnulib/error.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) gnulib/$(DEPDIR)/kernel_exec-error.Tpo gnulib/$(DEPDIR)/kernel_exec-error.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gnulib/error.c' object='gnulib/kernel_exec-error.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o gnulib/kernel_exec-error.obj `if test -f 'gnulib/error.c'; then $(CYGPATH_W) 'gnulib/error.c'; else $(CYGPATH_W) '$(srcdir)/gnulib/error.c'; fi`
+
+kern/emu/kernel_exec-console.o: kern/emu/console.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-console.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-console.Tpo -c -o kern/emu/kernel_exec-console.o `test -f 'kern/emu/console.c' || echo '$(srcdir)/'`kern/emu/console.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-console.Tpo kern/emu/$(DEPDIR)/kernel_exec-console.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/console.c' object='kern/emu/kernel_exec-console.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-console.o `test -f 'kern/emu/console.c' || echo '$(srcdir)/'`kern/emu/console.c
+
+kern/emu/kernel_exec-console.obj: kern/emu/console.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-console.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-console.Tpo -c -o kern/emu/kernel_exec-console.obj `if test -f 'kern/emu/console.c'; then $(CYGPATH_W) 'kern/emu/console.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/console.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-console.Tpo kern/emu/$(DEPDIR)/kernel_exec-console.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/console.c' object='kern/emu/kernel_exec-console.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-console.obj `if test -f 'kern/emu/console.c'; then $(CYGPATH_W) 'kern/emu/console.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/console.c'; fi`
+
+kern/emu/kernel_exec-getroot.o: kern/emu/getroot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-getroot.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-getroot.Tpo -c -o kern/emu/kernel_exec-getroot.o `test -f 'kern/emu/getroot.c' || echo '$(srcdir)/'`kern/emu/getroot.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-getroot.Tpo kern/emu/$(DEPDIR)/kernel_exec-getroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/getroot.c' object='kern/emu/kernel_exec-getroot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-getroot.o `test -f 'kern/emu/getroot.c' || echo '$(srcdir)/'`kern/emu/getroot.c
+
+kern/emu/kernel_exec-getroot.obj: kern/emu/getroot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-getroot.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-getroot.Tpo -c -o kern/emu/kernel_exec-getroot.obj `if test -f 'kern/emu/getroot.c'; then $(CYGPATH_W) 'kern/emu/getroot.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/getroot.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-getroot.Tpo kern/emu/$(DEPDIR)/kernel_exec-getroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/getroot.c' object='kern/emu/kernel_exec-getroot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-getroot.obj `if test -f 'kern/emu/getroot.c'; then $(CYGPATH_W) 'kern/emu/getroot.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/getroot.c'; fi`
+
+kern/emu/kernel_exec-hostdisk.o: kern/emu/hostdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-hostdisk.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-hostdisk.Tpo -c -o kern/emu/kernel_exec-hostdisk.o `test -f 'kern/emu/hostdisk.c' || echo '$(srcdir)/'`kern/emu/hostdisk.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-hostdisk.Tpo kern/emu/$(DEPDIR)/kernel_exec-hostdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/hostdisk.c' object='kern/emu/kernel_exec-hostdisk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-hostdisk.o `test -f 'kern/emu/hostdisk.c' || echo '$(srcdir)/'`kern/emu/hostdisk.c
+
+kern/emu/kernel_exec-hostdisk.obj: kern/emu/hostdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-hostdisk.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-hostdisk.Tpo -c -o kern/emu/kernel_exec-hostdisk.obj `if test -f 'kern/emu/hostdisk.c'; then $(CYGPATH_W) 'kern/emu/hostdisk.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/hostdisk.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-hostdisk.Tpo kern/emu/$(DEPDIR)/kernel_exec-hostdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/hostdisk.c' object='kern/emu/kernel_exec-hostdisk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-hostdisk.obj `if test -f 'kern/emu/hostdisk.c'; then $(CYGPATH_W) 'kern/emu/hostdisk.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/hostdisk.c'; fi`
+
+kern/emu/kernel_exec-hostfs.o: kern/emu/hostfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-hostfs.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-hostfs.Tpo -c -o kern/emu/kernel_exec-hostfs.o `test -f 'kern/emu/hostfs.c' || echo '$(srcdir)/'`kern/emu/hostfs.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-hostfs.Tpo kern/emu/$(DEPDIR)/kernel_exec-hostfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/hostfs.c' object='kern/emu/kernel_exec-hostfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-hostfs.o `test -f 'kern/emu/hostfs.c' || echo '$(srcdir)/'`kern/emu/hostfs.c
+
+kern/emu/kernel_exec-hostfs.obj: kern/emu/hostfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-hostfs.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-hostfs.Tpo -c -o kern/emu/kernel_exec-hostfs.obj `if test -f 'kern/emu/hostfs.c'; then $(CYGPATH_W) 'kern/emu/hostfs.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/hostfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-hostfs.Tpo kern/emu/$(DEPDIR)/kernel_exec-hostfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/hostfs.c' object='kern/emu/kernel_exec-hostfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-hostfs.obj `if test -f 'kern/emu/hostfs.c'; then $(CYGPATH_W) 'kern/emu/hostfs.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/hostfs.c'; fi`
+
+kern/emu/kernel_exec-main.o: kern/emu/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-main.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-main.Tpo -c -o kern/emu/kernel_exec-main.o `test -f 'kern/emu/main.c' || echo '$(srcdir)/'`kern/emu/main.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-main.Tpo kern/emu/$(DEPDIR)/kernel_exec-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/main.c' object='kern/emu/kernel_exec-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-main.o `test -f 'kern/emu/main.c' || echo '$(srcdir)/'`kern/emu/main.c
+
+kern/emu/kernel_exec-main.obj: kern/emu/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-main.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-main.Tpo -c -o kern/emu/kernel_exec-main.obj `if test -f 'kern/emu/main.c'; then $(CYGPATH_W) 'kern/emu/main.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/main.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-main.Tpo kern/emu/$(DEPDIR)/kernel_exec-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/main.c' object='kern/emu/kernel_exec-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-main.obj `if test -f 'kern/emu/main.c'; then $(CYGPATH_W) 'kern/emu/main.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/main.c'; fi`
+
+kern/emu/kernel_exec-misc.o: kern/emu/misc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-misc.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-misc.Tpo -c -o kern/emu/kernel_exec-misc.o `test -f 'kern/emu/misc.c' || echo '$(srcdir)/'`kern/emu/misc.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-misc.Tpo kern/emu/$(DEPDIR)/kernel_exec-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/misc.c' object='kern/emu/kernel_exec-misc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-misc.o `test -f 'kern/emu/misc.c' || echo '$(srcdir)/'`kern/emu/misc.c
+
+kern/emu/kernel_exec-misc.obj: kern/emu/misc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-misc.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-misc.Tpo -c -o kern/emu/kernel_exec-misc.obj `if test -f 'kern/emu/misc.c'; then $(CYGPATH_W) 'kern/emu/misc.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/misc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-misc.Tpo kern/emu/$(DEPDIR)/kernel_exec-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/misc.c' object='kern/emu/kernel_exec-misc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-misc.obj `if test -f 'kern/emu/misc.c'; then $(CYGPATH_W) 'kern/emu/misc.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/misc.c'; fi`
+
+kern/emu/kernel_exec-mm.o: kern/emu/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-mm.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-mm.Tpo -c -o kern/emu/kernel_exec-mm.o `test -f 'kern/emu/mm.c' || echo '$(srcdir)/'`kern/emu/mm.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-mm.Tpo kern/emu/$(DEPDIR)/kernel_exec-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/mm.c' object='kern/emu/kernel_exec-mm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-mm.o `test -f 'kern/emu/mm.c' || echo '$(srcdir)/'`kern/emu/mm.c
+
+kern/emu/kernel_exec-mm.obj: kern/emu/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-mm.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-mm.Tpo -c -o kern/emu/kernel_exec-mm.obj `if test -f 'kern/emu/mm.c'; then $(CYGPATH_W) 'kern/emu/mm.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/mm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-mm.Tpo kern/emu/$(DEPDIR)/kernel_exec-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/mm.c' object='kern/emu/kernel_exec-mm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-mm.obj `if test -f 'kern/emu/mm.c'; then $(CYGPATH_W) 'kern/emu/mm.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/mm.c'; fi`
+
+kern/emu/kernel_exec-time.o: kern/emu/time.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-time.o -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-time.Tpo -c -o kern/emu/kernel_exec-time.o `test -f 'kern/emu/time.c' || echo '$(srcdir)/'`kern/emu/time.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-time.Tpo kern/emu/$(DEPDIR)/kernel_exec-time.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/time.c' object='kern/emu/kernel_exec-time.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-time.o `test -f 'kern/emu/time.c' || echo '$(srcdir)/'`kern/emu/time.c
+
+kern/emu/kernel_exec-time.obj: kern/emu/time.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/emu/kernel_exec-time.obj -MD -MP -MF kern/emu/$(DEPDIR)/kernel_exec-time.Tpo -c -o kern/emu/kernel_exec-time.obj `if test -f 'kern/emu/time.c'; then $(CYGPATH_W) 'kern/emu/time.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/time.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/emu/$(DEPDIR)/kernel_exec-time.Tpo kern/emu/$(DEPDIR)/kernel_exec-time.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/emu/time.c' object='kern/emu/kernel_exec-time.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/emu/kernel_exec-time.obj `if test -f 'kern/emu/time.c'; then $(CYGPATH_W) 'kern/emu/time.c'; else $(CYGPATH_W) '$(srcdir)/kern/emu/time.c'; fi`
+
+kern/kernel_exec-command.o: kern/command.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-command.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-command.Tpo -c -o kern/kernel_exec-command.o `test -f 'kern/command.c' || echo '$(srcdir)/'`kern/command.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-command.Tpo kern/$(DEPDIR)/kernel_exec-command.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/command.c' object='kern/kernel_exec-command.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-command.o `test -f 'kern/command.c' || echo '$(srcdir)/'`kern/command.c
+
+kern/kernel_exec-command.obj: kern/command.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-command.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-command.Tpo -c -o kern/kernel_exec-command.obj `if test -f 'kern/command.c'; then $(CYGPATH_W) 'kern/command.c'; else $(CYGPATH_W) '$(srcdir)/kern/command.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-command.Tpo kern/$(DEPDIR)/kernel_exec-command.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/command.c' object='kern/kernel_exec-command.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-command.obj `if test -f 'kern/command.c'; then $(CYGPATH_W) 'kern/command.c'; else $(CYGPATH_W) '$(srcdir)/kern/command.c'; fi`
+
+kern/kernel_exec-corecmd.o: kern/corecmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-corecmd.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-corecmd.Tpo -c -o kern/kernel_exec-corecmd.o `test -f 'kern/corecmd.c' || echo '$(srcdir)/'`kern/corecmd.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-corecmd.Tpo kern/$(DEPDIR)/kernel_exec-corecmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/corecmd.c' object='kern/kernel_exec-corecmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-corecmd.o `test -f 'kern/corecmd.c' || echo '$(srcdir)/'`kern/corecmd.c
+
+kern/kernel_exec-corecmd.obj: kern/corecmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-corecmd.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-corecmd.Tpo -c -o kern/kernel_exec-corecmd.obj `if test -f 'kern/corecmd.c'; then $(CYGPATH_W) 'kern/corecmd.c'; else $(CYGPATH_W) '$(srcdir)/kern/corecmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-corecmd.Tpo kern/$(DEPDIR)/kernel_exec-corecmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/corecmd.c' object='kern/kernel_exec-corecmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-corecmd.obj `if test -f 'kern/corecmd.c'; then $(CYGPATH_W) 'kern/corecmd.c'; else $(CYGPATH_W) '$(srcdir)/kern/corecmd.c'; fi`
+
+kern/kernel_exec-device.o: kern/device.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-device.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-device.Tpo -c -o kern/kernel_exec-device.o `test -f 'kern/device.c' || echo '$(srcdir)/'`kern/device.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-device.Tpo kern/$(DEPDIR)/kernel_exec-device.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/device.c' object='kern/kernel_exec-device.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-device.o `test -f 'kern/device.c' || echo '$(srcdir)/'`kern/device.c
+
+kern/kernel_exec-device.obj: kern/device.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-device.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-device.Tpo -c -o kern/kernel_exec-device.obj `if test -f 'kern/device.c'; then $(CYGPATH_W) 'kern/device.c'; else $(CYGPATH_W) '$(srcdir)/kern/device.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-device.Tpo kern/$(DEPDIR)/kernel_exec-device.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/device.c' object='kern/kernel_exec-device.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-device.obj `if test -f 'kern/device.c'; then $(CYGPATH_W) 'kern/device.c'; else $(CYGPATH_W) '$(srcdir)/kern/device.c'; fi`
+
+kern/kernel_exec-disk.o: kern/disk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-disk.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-disk.Tpo -c -o kern/kernel_exec-disk.o `test -f 'kern/disk.c' || echo '$(srcdir)/'`kern/disk.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-disk.Tpo kern/$(DEPDIR)/kernel_exec-disk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/disk.c' object='kern/kernel_exec-disk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-disk.o `test -f 'kern/disk.c' || echo '$(srcdir)/'`kern/disk.c
+
+kern/kernel_exec-disk.obj: kern/disk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-disk.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-disk.Tpo -c -o kern/kernel_exec-disk.obj `if test -f 'kern/disk.c'; then $(CYGPATH_W) 'kern/disk.c'; else $(CYGPATH_W) '$(srcdir)/kern/disk.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-disk.Tpo kern/$(DEPDIR)/kernel_exec-disk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/disk.c' object='kern/kernel_exec-disk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-disk.obj `if test -f 'kern/disk.c'; then $(CYGPATH_W) 'kern/disk.c'; else $(CYGPATH_W) '$(srcdir)/kern/disk.c'; fi`
+
+kern/kernel_exec-dl.o: kern/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-dl.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/kernel_exec-dl.o `test -f 'kern/dl.c' || echo '$(srcdir)/'`kern/dl.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-dl.Tpo kern/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/dl.c' object='kern/kernel_exec-dl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-dl.o `test -f 'kern/dl.c' || echo '$(srcdir)/'`kern/dl.c
+
+kern/kernel_exec-dl.obj: kern/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-dl.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/kernel_exec-dl.obj `if test -f 'kern/dl.c'; then $(CYGPATH_W) 'kern/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/dl.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-dl.Tpo kern/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/dl.c' object='kern/kernel_exec-dl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-dl.obj `if test -f 'kern/dl.c'; then $(CYGPATH_W) 'kern/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/dl.c'; fi`
+
+kern/kernel_exec-env.o: kern/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-env.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-env.Tpo -c -o kern/kernel_exec-env.o `test -f 'kern/env.c' || echo '$(srcdir)/'`kern/env.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-env.Tpo kern/$(DEPDIR)/kernel_exec-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/env.c' object='kern/kernel_exec-env.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-env.o `test -f 'kern/env.c' || echo '$(srcdir)/'`kern/env.c
+
+kern/kernel_exec-env.obj: kern/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-env.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-env.Tpo -c -o kern/kernel_exec-env.obj `if test -f 'kern/env.c'; then $(CYGPATH_W) 'kern/env.c'; else $(CYGPATH_W) '$(srcdir)/kern/env.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-env.Tpo kern/$(DEPDIR)/kernel_exec-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/env.c' object='kern/kernel_exec-env.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-env.obj `if test -f 'kern/env.c'; then $(CYGPATH_W) 'kern/env.c'; else $(CYGPATH_W) '$(srcdir)/kern/env.c'; fi`
+
+kern/kernel_exec-err.o: kern/err.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-err.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-err.Tpo -c -o kern/kernel_exec-err.o `test -f 'kern/err.c' || echo '$(srcdir)/'`kern/err.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-err.Tpo kern/$(DEPDIR)/kernel_exec-err.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/err.c' object='kern/kernel_exec-err.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-err.o `test -f 'kern/err.c' || echo '$(srcdir)/'`kern/err.c
+
+kern/kernel_exec-err.obj: kern/err.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-err.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-err.Tpo -c -o kern/kernel_exec-err.obj `if test -f 'kern/err.c'; then $(CYGPATH_W) 'kern/err.c'; else $(CYGPATH_W) '$(srcdir)/kern/err.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-err.Tpo kern/$(DEPDIR)/kernel_exec-err.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/err.c' object='kern/kernel_exec-err.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-err.obj `if test -f 'kern/err.c'; then $(CYGPATH_W) 'kern/err.c'; else $(CYGPATH_W) '$(srcdir)/kern/err.c'; fi`
+
+kern/kernel_exec-file.o: kern/file.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-file.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-file.Tpo -c -o kern/kernel_exec-file.o `test -f 'kern/file.c' || echo '$(srcdir)/'`kern/file.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-file.Tpo kern/$(DEPDIR)/kernel_exec-file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/file.c' object='kern/kernel_exec-file.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-file.o `test -f 'kern/file.c' || echo '$(srcdir)/'`kern/file.c
+
+kern/kernel_exec-file.obj: kern/file.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-file.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-file.Tpo -c -o kern/kernel_exec-file.obj `if test -f 'kern/file.c'; then $(CYGPATH_W) 'kern/file.c'; else $(CYGPATH_W) '$(srcdir)/kern/file.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-file.Tpo kern/$(DEPDIR)/kernel_exec-file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/file.c' object='kern/kernel_exec-file.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-file.obj `if test -f 'kern/file.c'; then $(CYGPATH_W) 'kern/file.c'; else $(CYGPATH_W) '$(srcdir)/kern/file.c'; fi`
+
+kern/kernel_exec-fs.o: kern/fs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-fs.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-fs.Tpo -c -o kern/kernel_exec-fs.o `test -f 'kern/fs.c' || echo '$(srcdir)/'`kern/fs.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-fs.Tpo kern/$(DEPDIR)/kernel_exec-fs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/fs.c' object='kern/kernel_exec-fs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-fs.o `test -f 'kern/fs.c' || echo '$(srcdir)/'`kern/fs.c
+
+kern/kernel_exec-fs.obj: kern/fs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-fs.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-fs.Tpo -c -o kern/kernel_exec-fs.obj `if test -f 'kern/fs.c'; then $(CYGPATH_W) 'kern/fs.c'; else $(CYGPATH_W) '$(srcdir)/kern/fs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-fs.Tpo kern/$(DEPDIR)/kernel_exec-fs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/fs.c' object='kern/kernel_exec-fs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-fs.obj `if test -f 'kern/fs.c'; then $(CYGPATH_W) 'kern/fs.c'; else $(CYGPATH_W) '$(srcdir)/kern/fs.c'; fi`
+
+kern/kernel_exec-list.o: kern/list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-list.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-list.Tpo -c -o kern/kernel_exec-list.o `test -f 'kern/list.c' || echo '$(srcdir)/'`kern/list.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-list.Tpo kern/$(DEPDIR)/kernel_exec-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/list.c' object='kern/kernel_exec-list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-list.o `test -f 'kern/list.c' || echo '$(srcdir)/'`kern/list.c
+
+kern/kernel_exec-list.obj: kern/list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-list.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-list.Tpo -c -o kern/kernel_exec-list.obj `if test -f 'kern/list.c'; then $(CYGPATH_W) 'kern/list.c'; else $(CYGPATH_W) '$(srcdir)/kern/list.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-list.Tpo kern/$(DEPDIR)/kernel_exec-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/list.c' object='kern/kernel_exec-list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-list.obj `if test -f 'kern/list.c'; then $(CYGPATH_W) 'kern/list.c'; else $(CYGPATH_W) '$(srcdir)/kern/list.c'; fi`
+
+kern/kernel_exec-main.o: kern/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-main.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-main.Tpo -c -o kern/kernel_exec-main.o `test -f 'kern/main.c' || echo '$(srcdir)/'`kern/main.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-main.Tpo kern/$(DEPDIR)/kernel_exec-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/main.c' object='kern/kernel_exec-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-main.o `test -f 'kern/main.c' || echo '$(srcdir)/'`kern/main.c
+
+kern/kernel_exec-main.obj: kern/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-main.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-main.Tpo -c -o kern/kernel_exec-main.obj `if test -f 'kern/main.c'; then $(CYGPATH_W) 'kern/main.c'; else $(CYGPATH_W) '$(srcdir)/kern/main.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-main.Tpo kern/$(DEPDIR)/kernel_exec-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/main.c' object='kern/kernel_exec-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-main.obj `if test -f 'kern/main.c'; then $(CYGPATH_W) 'kern/main.c'; else $(CYGPATH_W) '$(srcdir)/kern/main.c'; fi`
+
+kern/kernel_exec-misc.o: kern/misc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-misc.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-misc.Tpo -c -o kern/kernel_exec-misc.o `test -f 'kern/misc.c' || echo '$(srcdir)/'`kern/misc.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-misc.Tpo kern/$(DEPDIR)/kernel_exec-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/misc.c' object='kern/kernel_exec-misc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-misc.o `test -f 'kern/misc.c' || echo '$(srcdir)/'`kern/misc.c
+
+kern/kernel_exec-misc.obj: kern/misc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-misc.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-misc.Tpo -c -o kern/kernel_exec-misc.obj `if test -f 'kern/misc.c'; then $(CYGPATH_W) 'kern/misc.c'; else $(CYGPATH_W) '$(srcdir)/kern/misc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-misc.Tpo kern/$(DEPDIR)/kernel_exec-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/misc.c' object='kern/kernel_exec-misc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-misc.obj `if test -f 'kern/misc.c'; then $(CYGPATH_W) 'kern/misc.c'; else $(CYGPATH_W) '$(srcdir)/kern/misc.c'; fi`
+
+kern/kernel_exec-parser.o: kern/parser.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-parser.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-parser.Tpo -c -o kern/kernel_exec-parser.o `test -f 'kern/parser.c' || echo '$(srcdir)/'`kern/parser.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-parser.Tpo kern/$(DEPDIR)/kernel_exec-parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/parser.c' object='kern/kernel_exec-parser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-parser.o `test -f 'kern/parser.c' || echo '$(srcdir)/'`kern/parser.c
+
+kern/kernel_exec-parser.obj: kern/parser.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-parser.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-parser.Tpo -c -o kern/kernel_exec-parser.obj `if test -f 'kern/parser.c'; then $(CYGPATH_W) 'kern/parser.c'; else $(CYGPATH_W) '$(srcdir)/kern/parser.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-parser.Tpo kern/$(DEPDIR)/kernel_exec-parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/parser.c' object='kern/kernel_exec-parser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-parser.obj `if test -f 'kern/parser.c'; then $(CYGPATH_W) 'kern/parser.c'; else $(CYGPATH_W) '$(srcdir)/kern/parser.c'; fi`
+
+kern/kernel_exec-partition.o: kern/partition.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-partition.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-partition.Tpo -c -o kern/kernel_exec-partition.o `test -f 'kern/partition.c' || echo '$(srcdir)/'`kern/partition.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-partition.Tpo kern/$(DEPDIR)/kernel_exec-partition.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/partition.c' object='kern/kernel_exec-partition.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-partition.o `test -f 'kern/partition.c' || echo '$(srcdir)/'`kern/partition.c
+
+kern/kernel_exec-partition.obj: kern/partition.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-partition.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-partition.Tpo -c -o kern/kernel_exec-partition.obj `if test -f 'kern/partition.c'; then $(CYGPATH_W) 'kern/partition.c'; else $(CYGPATH_W) '$(srcdir)/kern/partition.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-partition.Tpo kern/$(DEPDIR)/kernel_exec-partition.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/partition.c' object='kern/kernel_exec-partition.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-partition.obj `if test -f 'kern/partition.c'; then $(CYGPATH_W) 'kern/partition.c'; else $(CYGPATH_W) '$(srcdir)/kern/partition.c'; fi`
+
+kern/kernel_exec-rescue_parser.o: kern/rescue_parser.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-rescue_parser.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-rescue_parser.Tpo -c -o kern/kernel_exec-rescue_parser.o `test -f 'kern/rescue_parser.c' || echo '$(srcdir)/'`kern/rescue_parser.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-rescue_parser.Tpo kern/$(DEPDIR)/kernel_exec-rescue_parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/rescue_parser.c' object='kern/kernel_exec-rescue_parser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-rescue_parser.o `test -f 'kern/rescue_parser.c' || echo '$(srcdir)/'`kern/rescue_parser.c
+
+kern/kernel_exec-rescue_parser.obj: kern/rescue_parser.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-rescue_parser.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-rescue_parser.Tpo -c -o kern/kernel_exec-rescue_parser.obj `if test -f 'kern/rescue_parser.c'; then $(CYGPATH_W) 'kern/rescue_parser.c'; else $(CYGPATH_W) '$(srcdir)/kern/rescue_parser.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-rescue_parser.Tpo kern/$(DEPDIR)/kernel_exec-rescue_parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/rescue_parser.c' object='kern/kernel_exec-rescue_parser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-rescue_parser.obj `if test -f 'kern/rescue_parser.c'; then $(CYGPATH_W) 'kern/rescue_parser.c'; else $(CYGPATH_W) '$(srcdir)/kern/rescue_parser.c'; fi`
+
+kern/kernel_exec-rescue_reader.o: kern/rescue_reader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-rescue_reader.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-rescue_reader.Tpo -c -o kern/kernel_exec-rescue_reader.o `test -f 'kern/rescue_reader.c' || echo '$(srcdir)/'`kern/rescue_reader.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-rescue_reader.Tpo kern/$(DEPDIR)/kernel_exec-rescue_reader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/rescue_reader.c' object='kern/kernel_exec-rescue_reader.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-rescue_reader.o `test -f 'kern/rescue_reader.c' || echo '$(srcdir)/'`kern/rescue_reader.c
+
+kern/kernel_exec-rescue_reader.obj: kern/rescue_reader.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-rescue_reader.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-rescue_reader.Tpo -c -o kern/kernel_exec-rescue_reader.obj `if test -f 'kern/rescue_reader.c'; then $(CYGPATH_W) 'kern/rescue_reader.c'; else $(CYGPATH_W) '$(srcdir)/kern/rescue_reader.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-rescue_reader.Tpo kern/$(DEPDIR)/kernel_exec-rescue_reader.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/rescue_reader.c' object='kern/kernel_exec-rescue_reader.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-rescue_reader.obj `if test -f 'kern/rescue_reader.c'; then $(CYGPATH_W) 'kern/rescue_reader.c'; else $(CYGPATH_W) '$(srcdir)/kern/rescue_reader.c'; fi`
+
+kern/kernel_exec-term.o: kern/term.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-term.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-term.Tpo -c -o kern/kernel_exec-term.o `test -f 'kern/term.c' || echo '$(srcdir)/'`kern/term.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-term.Tpo kern/$(DEPDIR)/kernel_exec-term.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/term.c' object='kern/kernel_exec-term.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-term.o `test -f 'kern/term.c' || echo '$(srcdir)/'`kern/term.c
+
+kern/kernel_exec-term.obj: kern/term.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-term.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-term.Tpo -c -o kern/kernel_exec-term.obj `if test -f 'kern/term.c'; then $(CYGPATH_W) 'kern/term.c'; else $(CYGPATH_W) '$(srcdir)/kern/term.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-term.Tpo kern/$(DEPDIR)/kernel_exec-term.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/term.c' object='kern/kernel_exec-term.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-term.obj `if test -f 'kern/term.c'; then $(CYGPATH_W) 'kern/term.c'; else $(CYGPATH_W) '$(srcdir)/kern/term.c'; fi`
+
+kern/generic/kernel_exec-rtc_get_time_ms.o: kern/generic/rtc_get_time_ms.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/generic/kernel_exec-rtc_get_time_ms.o -MD -MP -MF kern/generic/$(DEPDIR)/kernel_exec-rtc_get_time_ms.Tpo -c -o kern/generic/kernel_exec-rtc_get_time_ms.o `test -f 'kern/generic/rtc_get_time_ms.c' || echo '$(srcdir)/'`kern/generic/rtc_get_time_ms.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/generic/$(DEPDIR)/kernel_exec-rtc_get_time_ms.Tpo kern/generic/$(DEPDIR)/kernel_exec-rtc_get_time_ms.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/generic/rtc_get_time_ms.c' object='kern/generic/kernel_exec-rtc_get_time_ms.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/generic/kernel_exec-rtc_get_time_ms.o `test -f 'kern/generic/rtc_get_time_ms.c' || echo '$(srcdir)/'`kern/generic/rtc_get_time_ms.c
+
+kern/generic/kernel_exec-rtc_get_time_ms.obj: kern/generic/rtc_get_time_ms.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/generic/kernel_exec-rtc_get_time_ms.obj -MD -MP -MF kern/generic/$(DEPDIR)/kernel_exec-rtc_get_time_ms.Tpo -c -o kern/generic/kernel_exec-rtc_get_time_ms.obj `if test -f 'kern/generic/rtc_get_time_ms.c'; then $(CYGPATH_W) 'kern/generic/rtc_get_time_ms.c'; else $(CYGPATH_W) '$(srcdir)/kern/generic/rtc_get_time_ms.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/generic/$(DEPDIR)/kernel_exec-rtc_get_time_ms.Tpo kern/generic/$(DEPDIR)/kernel_exec-rtc_get_time_ms.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/generic/rtc_get_time_ms.c' object='kern/generic/kernel_exec-rtc_get_time_ms.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/generic/kernel_exec-rtc_get_time_ms.obj `if test -f 'kern/generic/rtc_get_time_ms.c'; then $(CYGPATH_W) 'kern/generic/rtc_get_time_ms.c'; else $(CYGPATH_W) '$(srcdir)/kern/generic/rtc_get_time_ms.c'; fi`
+
+kern/i386/coreboot/kernel_exec-mmap.o: kern/i386/coreboot/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/coreboot/kernel_exec-mmap.o -MD -MP -MF kern/i386/coreboot/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/i386/coreboot/kernel_exec-mmap.o `test -f 'kern/i386/coreboot/mmap.c' || echo '$(srcdir)/'`kern/i386/coreboot/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/coreboot/$(DEPDIR)/kernel_exec-mmap.Tpo kern/i386/coreboot/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/coreboot/mmap.c' object='kern/i386/coreboot/kernel_exec-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/coreboot/kernel_exec-mmap.o `test -f 'kern/i386/coreboot/mmap.c' || echo '$(srcdir)/'`kern/i386/coreboot/mmap.c
+
+kern/i386/coreboot/kernel_exec-mmap.obj: kern/i386/coreboot/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/coreboot/kernel_exec-mmap.obj -MD -MP -MF kern/i386/coreboot/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/i386/coreboot/kernel_exec-mmap.obj `if test -f 'kern/i386/coreboot/mmap.c'; then $(CYGPATH_W) 'kern/i386/coreboot/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/coreboot/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/coreboot/$(DEPDIR)/kernel_exec-mmap.Tpo kern/i386/coreboot/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/coreboot/mmap.c' object='kern/i386/coreboot/kernel_exec-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/coreboot/kernel_exec-mmap.obj `if test -f 'kern/i386/coreboot/mmap.c'; then $(CYGPATH_W) 'kern/i386/coreboot/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/coreboot/mmap.c'; fi`
+
+kern/i386/kernel_exec-tsc.o: kern/i386/tsc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-tsc.o -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-tsc.Tpo -c -o kern/i386/kernel_exec-tsc.o `test -f 'kern/i386/tsc.c' || echo '$(srcdir)/'`kern/i386/tsc.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-tsc.Tpo kern/i386/$(DEPDIR)/kernel_exec-tsc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/tsc.c' object='kern/i386/kernel_exec-tsc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-tsc.o `test -f 'kern/i386/tsc.c' || echo '$(srcdir)/'`kern/i386/tsc.c
+
+kern/i386/kernel_exec-tsc.obj: kern/i386/tsc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-tsc.obj -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-tsc.Tpo -c -o kern/i386/kernel_exec-tsc.obj `if test -f 'kern/i386/tsc.c'; then $(CYGPATH_W) 'kern/i386/tsc.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/tsc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-tsc.Tpo kern/i386/$(DEPDIR)/kernel_exec-tsc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/tsc.c' object='kern/i386/kernel_exec-tsc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-tsc.obj `if test -f 'kern/i386/tsc.c'; then $(CYGPATH_W) 'kern/i386/tsc.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/tsc.c'; fi`
+
+kern/i386/coreboot/kernel_exec-init.o: kern/i386/coreboot/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/coreboot/kernel_exec-init.o -MD -MP -MF kern/i386/coreboot/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/coreboot/kernel_exec-init.o `test -f 'kern/i386/coreboot/init.c' || echo '$(srcdir)/'`kern/i386/coreboot/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/coreboot/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/coreboot/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/coreboot/init.c' object='kern/i386/coreboot/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/coreboot/kernel_exec-init.o `test -f 'kern/i386/coreboot/init.c' || echo '$(srcdir)/'`kern/i386/coreboot/init.c
+
+kern/i386/coreboot/kernel_exec-init.obj: kern/i386/coreboot/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/coreboot/kernel_exec-init.obj -MD -MP -MF kern/i386/coreboot/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/coreboot/kernel_exec-init.obj `if test -f 'kern/i386/coreboot/init.c'; then $(CYGPATH_W) 'kern/i386/coreboot/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/coreboot/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/coreboot/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/coreboot/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/coreboot/init.c' object='kern/i386/coreboot/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/coreboot/kernel_exec-init.obj `if test -f 'kern/i386/coreboot/init.c'; then $(CYGPATH_W) 'kern/i386/coreboot/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/coreboot/init.c'; fi`
+
+term/i386/pc/kernel_exec-vga_text.o: term/i386/pc/vga_text.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/i386/pc/kernel_exec-vga_text.o -MD -MP -MF term/i386/pc/$(DEPDIR)/kernel_exec-vga_text.Tpo -c -o term/i386/pc/kernel_exec-vga_text.o `test -f 'term/i386/pc/vga_text.c' || echo '$(srcdir)/'`term/i386/pc/vga_text.c
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/pc/$(DEPDIR)/kernel_exec-vga_text.Tpo term/i386/pc/$(DEPDIR)/kernel_exec-vga_text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/pc/vga_text.c' object='term/i386/pc/kernel_exec-vga_text.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/i386/pc/kernel_exec-vga_text.o `test -f 'term/i386/pc/vga_text.c' || echo '$(srcdir)/'`term/i386/pc/vga_text.c
+
+term/i386/pc/kernel_exec-vga_text.obj: term/i386/pc/vga_text.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/i386/pc/kernel_exec-vga_text.obj -MD -MP -MF term/i386/pc/$(DEPDIR)/kernel_exec-vga_text.Tpo -c -o term/i386/pc/kernel_exec-vga_text.obj `if test -f 'term/i386/pc/vga_text.c'; then $(CYGPATH_W) 'term/i386/pc/vga_text.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/pc/vga_text.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/pc/$(DEPDIR)/kernel_exec-vga_text.Tpo term/i386/pc/$(DEPDIR)/kernel_exec-vga_text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/pc/vga_text.c' object='term/i386/pc/kernel_exec-vga_text.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/i386/pc/kernel_exec-vga_text.obj `if test -f 'term/i386/pc/vga_text.c'; then $(CYGPATH_W) 'term/i386/pc/vga_text.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/pc/vga_text.c'; fi`
+
+term/i386/kernel_exec-vga_common.o: term/i386/vga_common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/i386/kernel_exec-vga_common.o -MD -MP -MF term/i386/$(DEPDIR)/kernel_exec-vga_common.Tpo -c -o term/i386/kernel_exec-vga_common.o `test -f 'term/i386/vga_common.c' || echo '$(srcdir)/'`term/i386/vga_common.c
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/$(DEPDIR)/kernel_exec-vga_common.Tpo term/i386/$(DEPDIR)/kernel_exec-vga_common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/vga_common.c' object='term/i386/kernel_exec-vga_common.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/i386/kernel_exec-vga_common.o `test -f 'term/i386/vga_common.c' || echo '$(srcdir)/'`term/i386/vga_common.c
+
+term/i386/kernel_exec-vga_common.obj: term/i386/vga_common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/i386/kernel_exec-vga_common.obj -MD -MP -MF term/i386/$(DEPDIR)/kernel_exec-vga_common.Tpo -c -o term/i386/kernel_exec-vga_common.obj `if test -f 'term/i386/vga_common.c'; then $(CYGPATH_W) 'term/i386/vga_common.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/vga_common.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/$(DEPDIR)/kernel_exec-vga_common.Tpo term/i386/$(DEPDIR)/kernel_exec-vga_common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/vga_common.c' object='term/i386/kernel_exec-vga_common.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/i386/kernel_exec-vga_common.obj `if test -f 'term/i386/vga_common.c'; then $(CYGPATH_W) 'term/i386/vga_common.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/vga_common.c'; fi`
+
+kern/i386/kernel_exec-dl.o: kern/i386/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-dl.o -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/i386/kernel_exec-dl.o `test -f 'kern/i386/dl.c' || echo '$(srcdir)/'`kern/i386/dl.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-dl.Tpo kern/i386/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/dl.c' object='kern/i386/kernel_exec-dl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-dl.o `test -f 'kern/i386/dl.c' || echo '$(srcdir)/'`kern/i386/dl.c
+
+kern/i386/kernel_exec-dl.obj: kern/i386/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-dl.obj -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/i386/kernel_exec-dl.obj `if test -f 'kern/i386/dl.c'; then $(CYGPATH_W) 'kern/i386/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/dl.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-dl.Tpo kern/i386/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/dl.c' object='kern/i386/kernel_exec-dl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-dl.obj `if test -f 'kern/i386/dl.c'; then $(CYGPATH_W) 'kern/i386/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/dl.c'; fi`
+
+kern/i386/kernel_exec-pit.o: kern/i386/pit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-pit.o -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-pit.Tpo -c -o kern/i386/kernel_exec-pit.o `test -f 'kern/i386/pit.c' || echo '$(srcdir)/'`kern/i386/pit.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-pit.Tpo kern/i386/$(DEPDIR)/kernel_exec-pit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/pit.c' object='kern/i386/kernel_exec-pit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-pit.o `test -f 'kern/i386/pit.c' || echo '$(srcdir)/'`kern/i386/pit.c
+
+kern/i386/kernel_exec-pit.obj: kern/i386/pit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-pit.obj -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-pit.Tpo -c -o kern/i386/kernel_exec-pit.obj `if test -f 'kern/i386/pit.c'; then $(CYGPATH_W) 'kern/i386/pit.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pit.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-pit.Tpo kern/i386/$(DEPDIR)/kernel_exec-pit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/pit.c' object='kern/i386/kernel_exec-pit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-pit.obj `if test -f 'kern/i386/pit.c'; then $(CYGPATH_W) 'kern/i386/pit.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pit.c'; fi`
+
+kern/kernel_exec-mm.o: kern/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-mm.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-mm.Tpo -c -o kern/kernel_exec-mm.o `test -f 'kern/mm.c' || echo '$(srcdir)/'`kern/mm.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-mm.Tpo kern/$(DEPDIR)/kernel_exec-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mm.c' object='kern/kernel_exec-mm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-mm.o `test -f 'kern/mm.c' || echo '$(srcdir)/'`kern/mm.c
+
+kern/kernel_exec-mm.obj: kern/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-mm.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-mm.Tpo -c -o kern/kernel_exec-mm.obj `if test -f 'kern/mm.c'; then $(CYGPATH_W) 'kern/mm.c'; else $(CYGPATH_W) '$(srcdir)/kern/mm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-mm.Tpo kern/$(DEPDIR)/kernel_exec-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mm.c' object='kern/kernel_exec-mm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-mm.obj `if test -f 'kern/mm.c'; then $(CYGPATH_W) 'kern/mm.c'; else $(CYGPATH_W) '$(srcdir)/kern/mm.c'; fi`
+
+kern/kernel_exec-time.o: kern/time.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-time.o -MD -MP -MF kern/$(DEPDIR)/kernel_exec-time.Tpo -c -o kern/kernel_exec-time.o `test -f 'kern/time.c' || echo '$(srcdir)/'`kern/time.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-time.Tpo kern/$(DEPDIR)/kernel_exec-time.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/time.c' object='kern/kernel_exec-time.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-time.o `test -f 'kern/time.c' || echo '$(srcdir)/'`kern/time.c
+
+kern/kernel_exec-time.obj: kern/time.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/kernel_exec-time.obj -MD -MP -MF kern/$(DEPDIR)/kernel_exec-time.Tpo -c -o kern/kernel_exec-time.obj `if test -f 'kern/time.c'; then $(CYGPATH_W) 'kern/time.c'; else $(CYGPATH_W) '$(srcdir)/kern/time.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/$(DEPDIR)/kernel_exec-time.Tpo kern/$(DEPDIR)/kernel_exec-time.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/time.c' object='kern/kernel_exec-time.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/kernel_exec-time.obj `if test -f 'kern/time.c'; then $(CYGPATH_W) 'kern/time.c'; else $(CYGPATH_W) '$(srcdir)/kern/time.c'; fi`
+
+kern/generic/kernel_exec-millisleep.o: kern/generic/millisleep.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/generic/kernel_exec-millisleep.o -MD -MP -MF kern/generic/$(DEPDIR)/kernel_exec-millisleep.Tpo -c -o kern/generic/kernel_exec-millisleep.o `test -f 'kern/generic/millisleep.c' || echo '$(srcdir)/'`kern/generic/millisleep.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/generic/$(DEPDIR)/kernel_exec-millisleep.Tpo kern/generic/$(DEPDIR)/kernel_exec-millisleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/generic/millisleep.c' object='kern/generic/kernel_exec-millisleep.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/generic/kernel_exec-millisleep.o `test -f 'kern/generic/millisleep.c' || echo '$(srcdir)/'`kern/generic/millisleep.c
+
+kern/generic/kernel_exec-millisleep.obj: kern/generic/millisleep.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/generic/kernel_exec-millisleep.obj -MD -MP -MF kern/generic/$(DEPDIR)/kernel_exec-millisleep.Tpo -c -o kern/generic/kernel_exec-millisleep.obj `if test -f 'kern/generic/millisleep.c'; then $(CYGPATH_W) 'kern/generic/millisleep.c'; else $(CYGPATH_W) '$(srcdir)/kern/generic/millisleep.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/generic/$(DEPDIR)/kernel_exec-millisleep.Tpo kern/generic/$(DEPDIR)/kernel_exec-millisleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/generic/millisleep.c' object='kern/generic/kernel_exec-millisleep.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/generic/kernel_exec-millisleep.obj `if test -f 'kern/generic/millisleep.c'; then $(CYGPATH_W) 'kern/generic/millisleep.c'; else $(CYGPATH_W) '$(srcdir)/kern/generic/millisleep.c'; fi`
+
+disk/efi/kernel_exec-efidisk.o: disk/efi/efidisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT disk/efi/kernel_exec-efidisk.o -MD -MP -MF disk/efi/$(DEPDIR)/kernel_exec-efidisk.Tpo -c -o disk/efi/kernel_exec-efidisk.o `test -f 'disk/efi/efidisk.c' || echo '$(srcdir)/'`disk/efi/efidisk.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/efi/$(DEPDIR)/kernel_exec-efidisk.Tpo disk/efi/$(DEPDIR)/kernel_exec-efidisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/efi/efidisk.c' object='disk/efi/kernel_exec-efidisk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o disk/efi/kernel_exec-efidisk.o `test -f 'disk/efi/efidisk.c' || echo '$(srcdir)/'`disk/efi/efidisk.c
+
+disk/efi/kernel_exec-efidisk.obj: disk/efi/efidisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT disk/efi/kernel_exec-efidisk.obj -MD -MP -MF disk/efi/$(DEPDIR)/kernel_exec-efidisk.Tpo -c -o disk/efi/kernel_exec-efidisk.obj `if test -f 'disk/efi/efidisk.c'; then $(CYGPATH_W) 'disk/efi/efidisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/efi/efidisk.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/efi/$(DEPDIR)/kernel_exec-efidisk.Tpo disk/efi/$(DEPDIR)/kernel_exec-efidisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/efi/efidisk.c' object='disk/efi/kernel_exec-efidisk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o disk/efi/kernel_exec-efidisk.obj `if test -f 'disk/efi/efidisk.c'; then $(CYGPATH_W) 'disk/efi/efidisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/efi/efidisk.c'; fi`
+
+kern/efi/kernel_exec-efi.o: kern/efi/efi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/efi/kernel_exec-efi.o -MD -MP -MF kern/efi/$(DEPDIR)/kernel_exec-efi.Tpo -c -o kern/efi/kernel_exec-efi.o `test -f 'kern/efi/efi.c' || echo '$(srcdir)/'`kern/efi/efi.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/efi/$(DEPDIR)/kernel_exec-efi.Tpo kern/efi/$(DEPDIR)/kernel_exec-efi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/efi/efi.c' object='kern/efi/kernel_exec-efi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/efi/kernel_exec-efi.o `test -f 'kern/efi/efi.c' || echo '$(srcdir)/'`kern/efi/efi.c
+
+kern/efi/kernel_exec-efi.obj: kern/efi/efi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/efi/kernel_exec-efi.obj -MD -MP -MF kern/efi/$(DEPDIR)/kernel_exec-efi.Tpo -c -o kern/efi/kernel_exec-efi.obj `if test -f 'kern/efi/efi.c'; then $(CYGPATH_W) 'kern/efi/efi.c'; else $(CYGPATH_W) '$(srcdir)/kern/efi/efi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/efi/$(DEPDIR)/kernel_exec-efi.Tpo kern/efi/$(DEPDIR)/kernel_exec-efi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/efi/efi.c' object='kern/efi/kernel_exec-efi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/efi/kernel_exec-efi.obj `if test -f 'kern/efi/efi.c'; then $(CYGPATH_W) 'kern/efi/efi.c'; else $(CYGPATH_W) '$(srcdir)/kern/efi/efi.c'; fi`
+
+kern/efi/kernel_exec-init.o: kern/efi/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/efi/kernel_exec-init.o -MD -MP -MF kern/efi/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/efi/kernel_exec-init.o `test -f 'kern/efi/init.c' || echo '$(srcdir)/'`kern/efi/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/efi/$(DEPDIR)/kernel_exec-init.Tpo kern/efi/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/efi/init.c' object='kern/efi/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/efi/kernel_exec-init.o `test -f 'kern/efi/init.c' || echo '$(srcdir)/'`kern/efi/init.c
+
+kern/efi/kernel_exec-init.obj: kern/efi/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/efi/kernel_exec-init.obj -MD -MP -MF kern/efi/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/efi/kernel_exec-init.obj `if test -f 'kern/efi/init.c'; then $(CYGPATH_W) 'kern/efi/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/efi/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/efi/$(DEPDIR)/kernel_exec-init.Tpo kern/efi/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/efi/init.c' object='kern/efi/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/efi/kernel_exec-init.obj `if test -f 'kern/efi/init.c'; then $(CYGPATH_W) 'kern/efi/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/efi/init.c'; fi`
+
+kern/efi/kernel_exec-mm.o: kern/efi/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/efi/kernel_exec-mm.o -MD -MP -MF kern/efi/$(DEPDIR)/kernel_exec-mm.Tpo -c -o kern/efi/kernel_exec-mm.o `test -f 'kern/efi/mm.c' || echo '$(srcdir)/'`kern/efi/mm.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/efi/$(DEPDIR)/kernel_exec-mm.Tpo kern/efi/$(DEPDIR)/kernel_exec-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/efi/mm.c' object='kern/efi/kernel_exec-mm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/efi/kernel_exec-mm.o `test -f 'kern/efi/mm.c' || echo '$(srcdir)/'`kern/efi/mm.c
+
+kern/efi/kernel_exec-mm.obj: kern/efi/mm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/efi/kernel_exec-mm.obj -MD -MP -MF kern/efi/$(DEPDIR)/kernel_exec-mm.Tpo -c -o kern/efi/kernel_exec-mm.obj `if test -f 'kern/efi/mm.c'; then $(CYGPATH_W) 'kern/efi/mm.c'; else $(CYGPATH_W) '$(srcdir)/kern/efi/mm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/efi/$(DEPDIR)/kernel_exec-mm.Tpo kern/efi/$(DEPDIR)/kernel_exec-mm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/efi/mm.c' object='kern/efi/kernel_exec-mm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/efi/kernel_exec-mm.obj `if test -f 'kern/efi/mm.c'; then $(CYGPATH_W) 'kern/efi/mm.c'; else $(CYGPATH_W) '$(srcdir)/kern/efi/mm.c'; fi`
+
+kern/i386/efi/kernel_exec-init.o: kern/i386/efi/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/efi/kernel_exec-init.o -MD -MP -MF kern/i386/efi/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/efi/kernel_exec-init.o `test -f 'kern/i386/efi/init.c' || echo '$(srcdir)/'`kern/i386/efi/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/efi/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/efi/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/efi/init.c' object='kern/i386/efi/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/efi/kernel_exec-init.o `test -f 'kern/i386/efi/init.c' || echo '$(srcdir)/'`kern/i386/efi/init.c
+
+kern/i386/efi/kernel_exec-init.obj: kern/i386/efi/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/efi/kernel_exec-init.obj -MD -MP -MF kern/i386/efi/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/efi/kernel_exec-init.obj `if test -f 'kern/i386/efi/init.c'; then $(CYGPATH_W) 'kern/i386/efi/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/efi/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/efi/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/efi/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/efi/init.c' object='kern/i386/efi/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/efi/kernel_exec-init.obj `if test -f 'kern/i386/efi/init.c'; then $(CYGPATH_W) 'kern/i386/efi/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/efi/init.c'; fi`
+
+term/efi/kernel_exec-console.o: term/efi/console.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/efi/kernel_exec-console.o -MD -MP -MF term/efi/$(DEPDIR)/kernel_exec-console.Tpo -c -o term/efi/kernel_exec-console.o `test -f 'term/efi/console.c' || echo '$(srcdir)/'`term/efi/console.c
+@am__fastdepCC_TRUE@ $(am__mv) term/efi/$(DEPDIR)/kernel_exec-console.Tpo term/efi/$(DEPDIR)/kernel_exec-console.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/efi/console.c' object='term/efi/kernel_exec-console.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/efi/kernel_exec-console.o `test -f 'term/efi/console.c' || echo '$(srcdir)/'`term/efi/console.c
+
+term/efi/kernel_exec-console.obj: term/efi/console.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/efi/kernel_exec-console.obj -MD -MP -MF term/efi/$(DEPDIR)/kernel_exec-console.Tpo -c -o term/efi/kernel_exec-console.obj `if test -f 'term/efi/console.c'; then $(CYGPATH_W) 'term/efi/console.c'; else $(CYGPATH_W) '$(srcdir)/term/efi/console.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/efi/$(DEPDIR)/kernel_exec-console.Tpo term/efi/$(DEPDIR)/kernel_exec-console.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/efi/console.c' object='term/efi/kernel_exec-console.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/efi/kernel_exec-console.obj `if test -f 'term/efi/console.c'; then $(CYGPATH_W) 'term/efi/console.c'; else $(CYGPATH_W) '$(srcdir)/term/efi/console.c'; fi`
+
+kern/ieee1275/kernel_exec-init.o: kern/ieee1275/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-init.o -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/ieee1275/kernel_exec-init.o `test -f 'kern/ieee1275/init.c' || echo '$(srcdir)/'`kern/ieee1275/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/init.c' object='kern/ieee1275/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-init.o `test -f 'kern/ieee1275/init.c' || echo '$(srcdir)/'`kern/ieee1275/init.c
+
+kern/ieee1275/kernel_exec-init.obj: kern/ieee1275/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-init.obj -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/ieee1275/kernel_exec-init.obj `if test -f 'kern/ieee1275/init.c'; then $(CYGPATH_W) 'kern/ieee1275/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/init.c' object='kern/ieee1275/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-init.obj `if test -f 'kern/ieee1275/init.c'; then $(CYGPATH_W) 'kern/ieee1275/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/init.c'; fi`
+
+disk/ieee1275/kernel_exec-ofdisk.o: disk/ieee1275/ofdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT disk/ieee1275/kernel_exec-ofdisk.o -MD -MP -MF disk/ieee1275/$(DEPDIR)/kernel_exec-ofdisk.Tpo -c -o disk/ieee1275/kernel_exec-ofdisk.o `test -f 'disk/ieee1275/ofdisk.c' || echo '$(srcdir)/'`disk/ieee1275/ofdisk.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/ieee1275/$(DEPDIR)/kernel_exec-ofdisk.Tpo disk/ieee1275/$(DEPDIR)/kernel_exec-ofdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ieee1275/ofdisk.c' object='disk/ieee1275/kernel_exec-ofdisk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o disk/ieee1275/kernel_exec-ofdisk.o `test -f 'disk/ieee1275/ofdisk.c' || echo '$(srcdir)/'`disk/ieee1275/ofdisk.c
+
+disk/ieee1275/kernel_exec-ofdisk.obj: disk/ieee1275/ofdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT disk/ieee1275/kernel_exec-ofdisk.obj -MD -MP -MF disk/ieee1275/$(DEPDIR)/kernel_exec-ofdisk.Tpo -c -o disk/ieee1275/kernel_exec-ofdisk.obj `if test -f 'disk/ieee1275/ofdisk.c'; then $(CYGPATH_W) 'disk/ieee1275/ofdisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/ieee1275/ofdisk.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/ieee1275/$(DEPDIR)/kernel_exec-ofdisk.Tpo disk/ieee1275/$(DEPDIR)/kernel_exec-ofdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ieee1275/ofdisk.c' object='disk/ieee1275/kernel_exec-ofdisk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o disk/ieee1275/kernel_exec-ofdisk.obj `if test -f 'disk/ieee1275/ofdisk.c'; then $(CYGPATH_W) 'disk/ieee1275/ofdisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/ieee1275/ofdisk.c'; fi`
+
+kern/ieee1275/kernel_exec-cmain.o: kern/ieee1275/cmain.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-cmain.o -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-cmain.Tpo -c -o kern/ieee1275/kernel_exec-cmain.o `test -f 'kern/ieee1275/cmain.c' || echo '$(srcdir)/'`kern/ieee1275/cmain.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-cmain.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-cmain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/cmain.c' object='kern/ieee1275/kernel_exec-cmain.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-cmain.o `test -f 'kern/ieee1275/cmain.c' || echo '$(srcdir)/'`kern/ieee1275/cmain.c
+
+kern/ieee1275/kernel_exec-cmain.obj: kern/ieee1275/cmain.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-cmain.obj -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-cmain.Tpo -c -o kern/ieee1275/kernel_exec-cmain.obj `if test -f 'kern/ieee1275/cmain.c'; then $(CYGPATH_W) 'kern/ieee1275/cmain.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/cmain.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-cmain.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-cmain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/cmain.c' object='kern/ieee1275/kernel_exec-cmain.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-cmain.obj `if test -f 'kern/ieee1275/cmain.c'; then $(CYGPATH_W) 'kern/ieee1275/cmain.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/cmain.c'; fi`
+
+kern/ieee1275/kernel_exec-ieee1275.o: kern/ieee1275/ieee1275.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-ieee1275.o -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo -c -o kern/ieee1275/kernel_exec-ieee1275.o `test -f 'kern/ieee1275/ieee1275.c' || echo '$(srcdir)/'`kern/ieee1275/ieee1275.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/ieee1275.c' object='kern/ieee1275/kernel_exec-ieee1275.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-ieee1275.o `test -f 'kern/ieee1275/ieee1275.c' || echo '$(srcdir)/'`kern/ieee1275/ieee1275.c
+
+kern/ieee1275/kernel_exec-ieee1275.obj: kern/ieee1275/ieee1275.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-ieee1275.obj -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo -c -o kern/ieee1275/kernel_exec-ieee1275.obj `if test -f 'kern/ieee1275/ieee1275.c'; then $(CYGPATH_W) 'kern/ieee1275/ieee1275.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/ieee1275.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/ieee1275.c' object='kern/ieee1275/kernel_exec-ieee1275.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-ieee1275.obj `if test -f 'kern/ieee1275/ieee1275.c'; then $(CYGPATH_W) 'kern/ieee1275/ieee1275.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/ieee1275.c'; fi`
+
+kern/ieee1275/kernel_exec-mmap.o: kern/ieee1275/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-mmap.o -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/ieee1275/kernel_exec-mmap.o `test -f 'kern/ieee1275/mmap.c' || echo '$(srcdir)/'`kern/ieee1275/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-mmap.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/mmap.c' object='kern/ieee1275/kernel_exec-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-mmap.o `test -f 'kern/ieee1275/mmap.c' || echo '$(srcdir)/'`kern/ieee1275/mmap.c
+
+kern/ieee1275/kernel_exec-mmap.obj: kern/ieee1275/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-mmap.obj -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/ieee1275/kernel_exec-mmap.obj `if test -f 'kern/ieee1275/mmap.c'; then $(CYGPATH_W) 'kern/ieee1275/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-mmap.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/mmap.c' object='kern/ieee1275/kernel_exec-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-mmap.obj `if test -f 'kern/ieee1275/mmap.c'; then $(CYGPATH_W) 'kern/ieee1275/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/mmap.c'; fi`
+
+kern/ieee1275/kernel_exec-openfw.o: kern/ieee1275/openfw.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-openfw.o -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-openfw.Tpo -c -o kern/ieee1275/kernel_exec-openfw.o `test -f 'kern/ieee1275/openfw.c' || echo '$(srcdir)/'`kern/ieee1275/openfw.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-openfw.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-openfw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/openfw.c' object='kern/ieee1275/kernel_exec-openfw.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-openfw.o `test -f 'kern/ieee1275/openfw.c' || echo '$(srcdir)/'`kern/ieee1275/openfw.c
+
+kern/ieee1275/kernel_exec-openfw.obj: kern/ieee1275/openfw.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/ieee1275/kernel_exec-openfw.obj -MD -MP -MF kern/ieee1275/$(DEPDIR)/kernel_exec-openfw.Tpo -c -o kern/ieee1275/kernel_exec-openfw.obj `if test -f 'kern/ieee1275/openfw.c'; then $(CYGPATH_W) 'kern/ieee1275/openfw.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/openfw.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/ieee1275/$(DEPDIR)/kernel_exec-openfw.Tpo kern/ieee1275/$(DEPDIR)/kernel_exec-openfw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/ieee1275/openfw.c' object='kern/ieee1275/kernel_exec-openfw.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/ieee1275/kernel_exec-openfw.obj `if test -f 'kern/ieee1275/openfw.c'; then $(CYGPATH_W) 'kern/ieee1275/openfw.c'; else $(CYGPATH_W) '$(srcdir)/kern/ieee1275/openfw.c'; fi`
+
+term/ieee1275/kernel_exec-ofconsole.o: term/ieee1275/ofconsole.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/ieee1275/kernel_exec-ofconsole.o -MD -MP -MF term/ieee1275/$(DEPDIR)/kernel_exec-ofconsole.Tpo -c -o term/ieee1275/kernel_exec-ofconsole.o `test -f 'term/ieee1275/ofconsole.c' || echo '$(srcdir)/'`term/ieee1275/ofconsole.c
+@am__fastdepCC_TRUE@ $(am__mv) term/ieee1275/$(DEPDIR)/kernel_exec-ofconsole.Tpo term/ieee1275/$(DEPDIR)/kernel_exec-ofconsole.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/ieee1275/ofconsole.c' object='term/ieee1275/kernel_exec-ofconsole.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/ieee1275/kernel_exec-ofconsole.o `test -f 'term/ieee1275/ofconsole.c' || echo '$(srcdir)/'`term/ieee1275/ofconsole.c
+
+term/ieee1275/kernel_exec-ofconsole.obj: term/ieee1275/ofconsole.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/ieee1275/kernel_exec-ofconsole.obj -MD -MP -MF term/ieee1275/$(DEPDIR)/kernel_exec-ofconsole.Tpo -c -o term/ieee1275/kernel_exec-ofconsole.obj `if test -f 'term/ieee1275/ofconsole.c'; then $(CYGPATH_W) 'term/ieee1275/ofconsole.c'; else $(CYGPATH_W) '$(srcdir)/term/ieee1275/ofconsole.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/ieee1275/$(DEPDIR)/kernel_exec-ofconsole.Tpo term/ieee1275/$(DEPDIR)/kernel_exec-ofconsole.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/ieee1275/ofconsole.c' object='term/ieee1275/kernel_exec-ofconsole.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/ieee1275/kernel_exec-ofconsole.obj `if test -f 'term/ieee1275/ofconsole.c'; then $(CYGPATH_W) 'term/ieee1275/ofconsole.c'; else $(CYGPATH_W) '$(srcdir)/term/ieee1275/ofconsole.c'; fi`
+
+term/kernel_exec-terminfo.o: term/terminfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-terminfo.o -MD -MP -MF term/$(DEPDIR)/kernel_exec-terminfo.Tpo -c -o term/kernel_exec-terminfo.o `test -f 'term/terminfo.c' || echo '$(srcdir)/'`term/terminfo.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-terminfo.Tpo term/$(DEPDIR)/kernel_exec-terminfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/terminfo.c' object='term/kernel_exec-terminfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-terminfo.o `test -f 'term/terminfo.c' || echo '$(srcdir)/'`term/terminfo.c
+
+term/kernel_exec-terminfo.obj: term/terminfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-terminfo.obj -MD -MP -MF term/$(DEPDIR)/kernel_exec-terminfo.Tpo -c -o term/kernel_exec-terminfo.obj `if test -f 'term/terminfo.c'; then $(CYGPATH_W) 'term/terminfo.c'; else $(CYGPATH_W) '$(srcdir)/term/terminfo.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-terminfo.Tpo term/$(DEPDIR)/kernel_exec-terminfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/terminfo.c' object='term/kernel_exec-terminfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-terminfo.obj `if test -f 'term/terminfo.c'; then $(CYGPATH_W) 'term/terminfo.c'; else $(CYGPATH_W) '$(srcdir)/term/terminfo.c'; fi`
+
+term/kernel_exec-tparm.o: term/tparm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-tparm.o -MD -MP -MF term/$(DEPDIR)/kernel_exec-tparm.Tpo -c -o term/kernel_exec-tparm.o `test -f 'term/tparm.c' || echo '$(srcdir)/'`term/tparm.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-tparm.Tpo term/$(DEPDIR)/kernel_exec-tparm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/tparm.c' object='term/kernel_exec-tparm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-tparm.o `test -f 'term/tparm.c' || echo '$(srcdir)/'`term/tparm.c
+
+term/kernel_exec-tparm.obj: term/tparm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-tparm.obj -MD -MP -MF term/$(DEPDIR)/kernel_exec-tparm.Tpo -c -o term/kernel_exec-tparm.obj `if test -f 'term/tparm.c'; then $(CYGPATH_W) 'term/tparm.c'; else $(CYGPATH_W) '$(srcdir)/term/tparm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-tparm.Tpo term/$(DEPDIR)/kernel_exec-tparm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/tparm.c' object='term/kernel_exec-tparm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-tparm.obj `if test -f 'term/tparm.c'; then $(CYGPATH_W) 'term/tparm.c'; else $(CYGPATH_W) '$(srcdir)/term/tparm.c'; fi`
+
+commands/kernel_exec-extcmd.o: commands/extcmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT commands/kernel_exec-extcmd.o -MD -MP -MF commands/$(DEPDIR)/kernel_exec-extcmd.Tpo -c -o commands/kernel_exec-extcmd.o `test -f 'commands/extcmd.c' || echo '$(srcdir)/'`commands/extcmd.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/kernel_exec-extcmd.Tpo commands/$(DEPDIR)/kernel_exec-extcmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/extcmd.c' object='commands/kernel_exec-extcmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o commands/kernel_exec-extcmd.o `test -f 'commands/extcmd.c' || echo '$(srcdir)/'`commands/extcmd.c
+
+commands/kernel_exec-extcmd.obj: commands/extcmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT commands/kernel_exec-extcmd.obj -MD -MP -MF commands/$(DEPDIR)/kernel_exec-extcmd.Tpo -c -o commands/kernel_exec-extcmd.obj `if test -f 'commands/extcmd.c'; then $(CYGPATH_W) 'commands/extcmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/extcmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/kernel_exec-extcmd.Tpo commands/$(DEPDIR)/kernel_exec-extcmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/extcmd.c' object='commands/kernel_exec-extcmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o commands/kernel_exec-extcmd.obj `if test -f 'commands/extcmd.c'; then $(CYGPATH_W) 'commands/extcmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/extcmd.c'; fi`
+
+lib/kernel_exec-arg.o: lib/arg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT lib/kernel_exec-arg.o -MD -MP -MF lib/$(DEPDIR)/kernel_exec-arg.Tpo -c -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '$(srcdir)/'`lib/arg.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/kernel_exec-arg.Tpo lib/$(DEPDIR)/kernel_exec-arg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/arg.c' object='lib/kernel_exec-arg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '$(srcdir)/'`lib/arg.c
+
+lib/kernel_exec-arg.obj: lib/arg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT lib/kernel_exec-arg.obj -MD -MP -MF lib/$(DEPDIR)/kernel_exec-arg.Tpo -c -o lib/kernel_exec-arg.obj `if test -f 'lib/arg.c'; then $(CYGPATH_W) 'lib/arg.c'; else $(CYGPATH_W) '$(srcdir)/lib/arg.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/kernel_exec-arg.Tpo lib/$(DEPDIR)/kernel_exec-arg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/arg.c' object='lib/kernel_exec-arg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o lib/kernel_exec-arg.obj `if test -f 'lib/arg.c'; then $(CYGPATH_W) 'lib/arg.c'; else $(CYGPATH_W) '$(srcdir)/lib/arg.c'; fi`
+
+kern/i386/kernel_exec-multiboot_mmap.o: kern/i386/multiboot_mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-multiboot_mmap.o -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-multiboot_mmap.Tpo -c -o kern/i386/kernel_exec-multiboot_mmap.o `test -f 'kern/i386/multiboot_mmap.c' || echo '$(srcdir)/'`kern/i386/multiboot_mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-multiboot_mmap.Tpo kern/i386/$(DEPDIR)/kernel_exec-multiboot_mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/multiboot_mmap.c' object='kern/i386/kernel_exec-multiboot_mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-multiboot_mmap.o `test -f 'kern/i386/multiboot_mmap.c' || echo '$(srcdir)/'`kern/i386/multiboot_mmap.c
+
+kern/i386/kernel_exec-multiboot_mmap.obj: kern/i386/multiboot_mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/kernel_exec-multiboot_mmap.obj -MD -MP -MF kern/i386/$(DEPDIR)/kernel_exec-multiboot_mmap.Tpo -c -o kern/i386/kernel_exec-multiboot_mmap.obj `if test -f 'kern/i386/multiboot_mmap.c'; then $(CYGPATH_W) 'kern/i386/multiboot_mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/multiboot_mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/$(DEPDIR)/kernel_exec-multiboot_mmap.Tpo kern/i386/$(DEPDIR)/kernel_exec-multiboot_mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/multiboot_mmap.c' object='kern/i386/kernel_exec-multiboot_mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/kernel_exec-multiboot_mmap.obj `if test -f 'kern/i386/multiboot_mmap.c'; then $(CYGPATH_W) 'kern/i386/multiboot_mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/multiboot_mmap.c'; fi`
+
+kern/i386/pc/kernel_exec-init.o: kern/i386/pc/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/pc/kernel_exec-init.o -MD -MP -MF kern/i386/pc/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/pc/kernel_exec-init.o `test -f 'kern/i386/pc/init.c' || echo '$(srcdir)/'`kern/i386/pc/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/pc/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/pc/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/pc/init.c' object='kern/i386/pc/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/pc/kernel_exec-init.o `test -f 'kern/i386/pc/init.c' || echo '$(srcdir)/'`kern/i386/pc/init.c
+
+kern/i386/pc/kernel_exec-init.obj: kern/i386/pc/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/pc/kernel_exec-init.obj -MD -MP -MF kern/i386/pc/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/pc/kernel_exec-init.obj `if test -f 'kern/i386/pc/init.c'; then $(CYGPATH_W) 'kern/i386/pc/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pc/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/pc/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/pc/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/pc/init.c' object='kern/i386/pc/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/pc/kernel_exec-init.obj `if test -f 'kern/i386/pc/init.c'; then $(CYGPATH_W) 'kern/i386/pc/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pc/init.c'; fi`
+
+kern/i386/pc/kernel_exec-mmap.o: kern/i386/pc/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/pc/kernel_exec-mmap.o -MD -MP -MF kern/i386/pc/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/i386/pc/kernel_exec-mmap.o `test -f 'kern/i386/pc/mmap.c' || echo '$(srcdir)/'`kern/i386/pc/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/pc/$(DEPDIR)/kernel_exec-mmap.Tpo kern/i386/pc/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/pc/mmap.c' object='kern/i386/pc/kernel_exec-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/pc/kernel_exec-mmap.o `test -f 'kern/i386/pc/mmap.c' || echo '$(srcdir)/'`kern/i386/pc/mmap.c
+
+kern/i386/pc/kernel_exec-mmap.obj: kern/i386/pc/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/pc/kernel_exec-mmap.obj -MD -MP -MF kern/i386/pc/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/i386/pc/kernel_exec-mmap.obj `if test -f 'kern/i386/pc/mmap.c'; then $(CYGPATH_W) 'kern/i386/pc/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pc/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/pc/$(DEPDIR)/kernel_exec-mmap.Tpo kern/i386/pc/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/pc/mmap.c' object='kern/i386/pc/kernel_exec-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/pc/kernel_exec-mmap.obj `if test -f 'kern/i386/pc/mmap.c'; then $(CYGPATH_W) 'kern/i386/pc/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/pc/mmap.c'; fi`
+
+term/i386/pc/kernel_exec-console.o: term/i386/pc/console.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/i386/pc/kernel_exec-console.o -MD -MP -MF term/i386/pc/$(DEPDIR)/kernel_exec-console.Tpo -c -o term/i386/pc/kernel_exec-console.o `test -f 'term/i386/pc/console.c' || echo '$(srcdir)/'`term/i386/pc/console.c
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/pc/$(DEPDIR)/kernel_exec-console.Tpo term/i386/pc/$(DEPDIR)/kernel_exec-console.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/pc/console.c' object='term/i386/pc/kernel_exec-console.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/i386/pc/kernel_exec-console.o `test -f 'term/i386/pc/console.c' || echo '$(srcdir)/'`term/i386/pc/console.c
+
+term/i386/pc/kernel_exec-console.obj: term/i386/pc/console.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/i386/pc/kernel_exec-console.obj -MD -MP -MF term/i386/pc/$(DEPDIR)/kernel_exec-console.Tpo -c -o term/i386/pc/kernel_exec-console.obj `if test -f 'term/i386/pc/console.c'; then $(CYGPATH_W) 'term/i386/pc/console.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/pc/console.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/pc/$(DEPDIR)/kernel_exec-console.Tpo term/i386/pc/$(DEPDIR)/kernel_exec-console.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/pc/console.c' object='term/i386/pc/kernel_exec-console.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/i386/pc/kernel_exec-console.obj `if test -f 'term/i386/pc/console.c'; then $(CYGPATH_W) 'term/i386/pc/console.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/pc/console.c'; fi`
+
+bus/kernel_exec-pci.o: bus/pci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT bus/kernel_exec-pci.o -MD -MP -MF bus/$(DEPDIR)/kernel_exec-pci.Tpo -c -o bus/kernel_exec-pci.o `test -f 'bus/pci.c' || echo '$(srcdir)/'`bus/pci.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/kernel_exec-pci.Tpo bus/$(DEPDIR)/kernel_exec-pci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/pci.c' object='bus/kernel_exec-pci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o bus/kernel_exec-pci.o `test -f 'bus/pci.c' || echo '$(srcdir)/'`bus/pci.c
+
+bus/kernel_exec-pci.obj: bus/pci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT bus/kernel_exec-pci.obj -MD -MP -MF bus/$(DEPDIR)/kernel_exec-pci.Tpo -c -o bus/kernel_exec-pci.obj `if test -f 'bus/pci.c'; then $(CYGPATH_W) 'bus/pci.c'; else $(CYGPATH_W) '$(srcdir)/bus/pci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/kernel_exec-pci.Tpo bus/$(DEPDIR)/kernel_exec-pci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/pci.c' object='bus/kernel_exec-pci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o bus/kernel_exec-pci.obj `if test -f 'bus/pci.c'; then $(CYGPATH_W) 'bus/pci.c'; else $(CYGPATH_W) '$(srcdir)/bus/pci.c'; fi`
+
+kern/i386/qemu/kernel_exec-init.o: kern/i386/qemu/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/qemu/kernel_exec-init.o -MD -MP -MF kern/i386/qemu/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/qemu/kernel_exec-init.o `test -f 'kern/i386/qemu/init.c' || echo '$(srcdir)/'`kern/i386/qemu/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/qemu/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/qemu/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/qemu/init.c' object='kern/i386/qemu/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/qemu/kernel_exec-init.o `test -f 'kern/i386/qemu/init.c' || echo '$(srcdir)/'`kern/i386/qemu/init.c
+
+kern/i386/qemu/kernel_exec-init.obj: kern/i386/qemu/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/qemu/kernel_exec-init.obj -MD -MP -MF kern/i386/qemu/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/i386/qemu/kernel_exec-init.obj `if test -f 'kern/i386/qemu/init.c'; then $(CYGPATH_W) 'kern/i386/qemu/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/qemu/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/qemu/$(DEPDIR)/kernel_exec-init.Tpo kern/i386/qemu/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/qemu/init.c' object='kern/i386/qemu/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/qemu/kernel_exec-init.obj `if test -f 'kern/i386/qemu/init.c'; then $(CYGPATH_W) 'kern/i386/qemu/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/qemu/init.c'; fi`
+
+kern/i386/qemu/kernel_exec-mmap.o: kern/i386/qemu/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/qemu/kernel_exec-mmap.o -MD -MP -MF kern/i386/qemu/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/i386/qemu/kernel_exec-mmap.o `test -f 'kern/i386/qemu/mmap.c' || echo '$(srcdir)/'`kern/i386/qemu/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/qemu/$(DEPDIR)/kernel_exec-mmap.Tpo kern/i386/qemu/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/qemu/mmap.c' object='kern/i386/qemu/kernel_exec-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/qemu/kernel_exec-mmap.o `test -f 'kern/i386/qemu/mmap.c' || echo '$(srcdir)/'`kern/i386/qemu/mmap.c
+
+kern/i386/qemu/kernel_exec-mmap.obj: kern/i386/qemu/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/i386/qemu/kernel_exec-mmap.obj -MD -MP -MF kern/i386/qemu/$(DEPDIR)/kernel_exec-mmap.Tpo -c -o kern/i386/qemu/kernel_exec-mmap.obj `if test -f 'kern/i386/qemu/mmap.c'; then $(CYGPATH_W) 'kern/i386/qemu/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/qemu/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/i386/qemu/$(DEPDIR)/kernel_exec-mmap.Tpo kern/i386/qemu/$(DEPDIR)/kernel_exec-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/i386/qemu/mmap.c' object='kern/i386/qemu/kernel_exec-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/i386/qemu/kernel_exec-mmap.obj `if test -f 'kern/i386/qemu/mmap.c'; then $(CYGPATH_W) 'kern/i386/qemu/mmap.c'; else $(CYGPATH_W) '$(srcdir)/kern/i386/qemu/mmap.c'; fi`
+
+term/kernel_exec-ns8250.o: term/ns8250.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-ns8250.o -MD -MP -MF term/$(DEPDIR)/kernel_exec-ns8250.Tpo -c -o term/kernel_exec-ns8250.o `test -f 'term/ns8250.c' || echo '$(srcdir)/'`term/ns8250.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-ns8250.Tpo term/$(DEPDIR)/kernel_exec-ns8250.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/ns8250.c' object='term/kernel_exec-ns8250.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-ns8250.o `test -f 'term/ns8250.c' || echo '$(srcdir)/'`term/ns8250.c
+
+term/kernel_exec-ns8250.obj: term/ns8250.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-ns8250.obj -MD -MP -MF term/$(DEPDIR)/kernel_exec-ns8250.Tpo -c -o term/kernel_exec-ns8250.obj `if test -f 'term/ns8250.c'; then $(CYGPATH_W) 'term/ns8250.c'; else $(CYGPATH_W) '$(srcdir)/term/ns8250.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-ns8250.Tpo term/$(DEPDIR)/kernel_exec-ns8250.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/ns8250.c' object='term/kernel_exec-ns8250.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-ns8250.obj `if test -f 'term/ns8250.c'; then $(CYGPATH_W) 'term/ns8250.c'; else $(CYGPATH_W) '$(srcdir)/term/ns8250.c'; fi`
+
+bus/kernel_exec-bonito.o: bus/bonito.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT bus/kernel_exec-bonito.o -MD -MP -MF bus/$(DEPDIR)/kernel_exec-bonito.Tpo -c -o bus/kernel_exec-bonito.o `test -f 'bus/bonito.c' || echo '$(srcdir)/'`bus/bonito.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/kernel_exec-bonito.Tpo bus/$(DEPDIR)/kernel_exec-bonito.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/bonito.c' object='bus/kernel_exec-bonito.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o bus/kernel_exec-bonito.o `test -f 'bus/bonito.c' || echo '$(srcdir)/'`bus/bonito.c
+
+bus/kernel_exec-bonito.obj: bus/bonito.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT bus/kernel_exec-bonito.obj -MD -MP -MF bus/$(DEPDIR)/kernel_exec-bonito.Tpo -c -o bus/kernel_exec-bonito.obj `if test -f 'bus/bonito.c'; then $(CYGPATH_W) 'bus/bonito.c'; else $(CYGPATH_W) '$(srcdir)/bus/bonito.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/kernel_exec-bonito.Tpo bus/$(DEPDIR)/kernel_exec-bonito.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/bonito.c' object='bus/kernel_exec-bonito.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o bus/kernel_exec-bonito.obj `if test -f 'bus/bonito.c'; then $(CYGPATH_W) 'bus/bonito.c'; else $(CYGPATH_W) '$(srcdir)/bus/bonito.c'; fi`
+
+bus/kernel_exec-cs5536.o: bus/cs5536.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT bus/kernel_exec-cs5536.o -MD -MP -MF bus/$(DEPDIR)/kernel_exec-cs5536.Tpo -c -o bus/kernel_exec-cs5536.o `test -f 'bus/cs5536.c' || echo '$(srcdir)/'`bus/cs5536.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/kernel_exec-cs5536.Tpo bus/$(DEPDIR)/kernel_exec-cs5536.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/cs5536.c' object='bus/kernel_exec-cs5536.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o bus/kernel_exec-cs5536.o `test -f 'bus/cs5536.c' || echo '$(srcdir)/'`bus/cs5536.c
+
+bus/kernel_exec-cs5536.obj: bus/cs5536.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT bus/kernel_exec-cs5536.obj -MD -MP -MF bus/$(DEPDIR)/kernel_exec-cs5536.Tpo -c -o bus/kernel_exec-cs5536.obj `if test -f 'bus/cs5536.c'; then $(CYGPATH_W) 'bus/cs5536.c'; else $(CYGPATH_W) '$(srcdir)/bus/cs5536.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/kernel_exec-cs5536.Tpo bus/$(DEPDIR)/kernel_exec-cs5536.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/cs5536.c' object='bus/kernel_exec-cs5536.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o bus/kernel_exec-cs5536.obj `if test -f 'bus/cs5536.c'; then $(CYGPATH_W) 'bus/cs5536.c'; else $(CYGPATH_W) '$(srcdir)/bus/cs5536.c'; fi`
+
+kern/mips/kernel_exec-dl.o: kern/mips/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/mips/kernel_exec-dl.o -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/mips/kernel_exec-dl.o `test -f 'kern/mips/dl.c' || echo '$(srcdir)/'`kern/mips/dl.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-dl.Tpo kern/mips/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mips/dl.c' object='kern/mips/kernel_exec-dl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/mips/kernel_exec-dl.o `test -f 'kern/mips/dl.c' || echo '$(srcdir)/'`kern/mips/dl.c
+
+kern/mips/kernel_exec-dl.obj: kern/mips/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/mips/kernel_exec-dl.obj -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/mips/kernel_exec-dl.obj `if test -f 'kern/mips/dl.c'; then $(CYGPATH_W) 'kern/mips/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/mips/dl.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-dl.Tpo kern/mips/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mips/dl.c' object='kern/mips/kernel_exec-dl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/mips/kernel_exec-dl.obj `if test -f 'kern/mips/dl.c'; then $(CYGPATH_W) 'kern/mips/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/mips/dl.c'; fi`
+
+kern/mips/kernel_exec-init.o: kern/mips/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/mips/kernel_exec-init.o -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/mips/kernel_exec-init.o `test -f 'kern/mips/init.c' || echo '$(srcdir)/'`kern/mips/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-init.Tpo kern/mips/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mips/init.c' object='kern/mips/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/mips/kernel_exec-init.o `test -f 'kern/mips/init.c' || echo '$(srcdir)/'`kern/mips/init.c
+
+kern/mips/kernel_exec-init.obj: kern/mips/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/mips/kernel_exec-init.obj -MD -MP -MF kern/mips/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/mips/kernel_exec-init.obj `if test -f 'kern/mips/init.c'; then $(CYGPATH_W) 'kern/mips/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/mips/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/mips/$(DEPDIR)/kernel_exec-init.Tpo kern/mips/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mips/init.c' object='kern/mips/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/mips/kernel_exec-init.obj `if test -f 'kern/mips/init.c'; then $(CYGPATH_W) 'kern/mips/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/mips/init.c'; fi`
+
+kern/mips/yeeloong/kernel_exec-init.o: kern/mips/yeeloong/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/mips/yeeloong/kernel_exec-init.o -MD -MP -MF kern/mips/yeeloong/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/mips/yeeloong/kernel_exec-init.o `test -f 'kern/mips/yeeloong/init.c' || echo '$(srcdir)/'`kern/mips/yeeloong/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/mips/yeeloong/$(DEPDIR)/kernel_exec-init.Tpo kern/mips/yeeloong/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mips/yeeloong/init.c' object='kern/mips/yeeloong/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/mips/yeeloong/kernel_exec-init.o `test -f 'kern/mips/yeeloong/init.c' || echo '$(srcdir)/'`kern/mips/yeeloong/init.c
+
+kern/mips/yeeloong/kernel_exec-init.obj: kern/mips/yeeloong/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/mips/yeeloong/kernel_exec-init.obj -MD -MP -MF kern/mips/yeeloong/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/mips/yeeloong/kernel_exec-init.obj `if test -f 'kern/mips/yeeloong/init.c'; then $(CYGPATH_W) 'kern/mips/yeeloong/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/mips/yeeloong/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/mips/yeeloong/$(DEPDIR)/kernel_exec-init.Tpo kern/mips/yeeloong/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/mips/yeeloong/init.c' object='kern/mips/yeeloong/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/mips/yeeloong/kernel_exec-init.obj `if test -f 'kern/mips/yeeloong/init.c'; then $(CYGPATH_W) 'kern/mips/yeeloong/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/mips/yeeloong/init.c'; fi`
+
+term/kernel_exec-at_keyboard.o: term/at_keyboard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-at_keyboard.o -MD -MP -MF term/$(DEPDIR)/kernel_exec-at_keyboard.Tpo -c -o term/kernel_exec-at_keyboard.o `test -f 'term/at_keyboard.c' || echo '$(srcdir)/'`term/at_keyboard.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-at_keyboard.Tpo term/$(DEPDIR)/kernel_exec-at_keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/at_keyboard.c' object='term/kernel_exec-at_keyboard.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-at_keyboard.o `test -f 'term/at_keyboard.c' || echo '$(srcdir)/'`term/at_keyboard.c
+
+term/kernel_exec-at_keyboard.obj: term/at_keyboard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-at_keyboard.obj -MD -MP -MF term/$(DEPDIR)/kernel_exec-at_keyboard.Tpo -c -o term/kernel_exec-at_keyboard.obj `if test -f 'term/at_keyboard.c'; then $(CYGPATH_W) 'term/at_keyboard.c'; else $(CYGPATH_W) '$(srcdir)/term/at_keyboard.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-at_keyboard.Tpo term/$(DEPDIR)/kernel_exec-at_keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/at_keyboard.c' object='term/kernel_exec-at_keyboard.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-at_keyboard.obj `if test -f 'term/at_keyboard.c'; then $(CYGPATH_W) 'term/at_keyboard.c'; else $(CYGPATH_W) '$(srcdir)/term/at_keyboard.c'; fi`
+
+term/kernel_exec-serial.o: term/serial.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-serial.o -MD -MP -MF term/$(DEPDIR)/kernel_exec-serial.Tpo -c -o term/kernel_exec-serial.o `test -f 'term/serial.c' || echo '$(srcdir)/'`term/serial.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-serial.Tpo term/$(DEPDIR)/kernel_exec-serial.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/serial.c' object='term/kernel_exec-serial.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-serial.o `test -f 'term/serial.c' || echo '$(srcdir)/'`term/serial.c
+
+term/kernel_exec-serial.obj: term/serial.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-serial.obj -MD -MP -MF term/$(DEPDIR)/kernel_exec-serial.Tpo -c -o term/kernel_exec-serial.obj `if test -f 'term/serial.c'; then $(CYGPATH_W) 'term/serial.c'; else $(CYGPATH_W) '$(srcdir)/term/serial.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-serial.Tpo term/$(DEPDIR)/kernel_exec-serial.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/serial.c' object='term/kernel_exec-serial.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-serial.obj `if test -f 'term/serial.c'; then $(CYGPATH_W) 'term/serial.c'; else $(CYGPATH_W) '$(srcdir)/term/serial.c'; fi`
+
+video/kernel_exec-sm712.o: video/sm712.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-sm712.o -MD -MP -MF video/$(DEPDIR)/kernel_exec-sm712.Tpo -c -o video/kernel_exec-sm712.o `test -f 'video/sm712.c' || echo '$(srcdir)/'`video/sm712.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-sm712.Tpo video/$(DEPDIR)/kernel_exec-sm712.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/sm712.c' object='video/kernel_exec-sm712.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-sm712.o `test -f 'video/sm712.c' || echo '$(srcdir)/'`video/sm712.c
+
+video/kernel_exec-sm712.obj: video/sm712.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-sm712.obj -MD -MP -MF video/$(DEPDIR)/kernel_exec-sm712.Tpo -c -o video/kernel_exec-sm712.obj `if test -f 'video/sm712.c'; then $(CYGPATH_W) 'video/sm712.c'; else $(CYGPATH_W) '$(srcdir)/video/sm712.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-sm712.Tpo video/$(DEPDIR)/kernel_exec-sm712.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/sm712.c' object='video/kernel_exec-sm712.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-sm712.obj `if test -f 'video/sm712.c'; then $(CYGPATH_W) 'video/sm712.c'; else $(CYGPATH_W) '$(srcdir)/video/sm712.c'; fi`
+
+commands/kernel_exec-keylayouts.o: commands/keylayouts.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT commands/kernel_exec-keylayouts.o -MD -MP -MF commands/$(DEPDIR)/kernel_exec-keylayouts.Tpo -c -o commands/kernel_exec-keylayouts.o `test -f 'commands/keylayouts.c' || echo '$(srcdir)/'`commands/keylayouts.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/kernel_exec-keylayouts.Tpo commands/$(DEPDIR)/kernel_exec-keylayouts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/keylayouts.c' object='commands/kernel_exec-keylayouts.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o commands/kernel_exec-keylayouts.o `test -f 'commands/keylayouts.c' || echo '$(srcdir)/'`commands/keylayouts.c
+
+commands/kernel_exec-keylayouts.obj: commands/keylayouts.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT commands/kernel_exec-keylayouts.obj -MD -MP -MF commands/$(DEPDIR)/kernel_exec-keylayouts.Tpo -c -o commands/kernel_exec-keylayouts.obj `if test -f 'commands/keylayouts.c'; then $(CYGPATH_W) 'commands/keylayouts.c'; else $(CYGPATH_W) '$(srcdir)/commands/keylayouts.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/kernel_exec-keylayouts.Tpo commands/$(DEPDIR)/kernel_exec-keylayouts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/keylayouts.c' object='commands/kernel_exec-keylayouts.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o commands/kernel_exec-keylayouts.obj `if test -f 'commands/keylayouts.c'; then $(CYGPATH_W) 'commands/keylayouts.c'; else $(CYGPATH_W) '$(srcdir)/commands/keylayouts.c'; fi`
+
+term/kernel_exec-gfxterm.o: term/gfxterm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-gfxterm.o -MD -MP -MF term/$(DEPDIR)/kernel_exec-gfxterm.Tpo -c -o term/kernel_exec-gfxterm.o `test -f 'term/gfxterm.c' || echo '$(srcdir)/'`term/gfxterm.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-gfxterm.Tpo term/$(DEPDIR)/kernel_exec-gfxterm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/gfxterm.c' object='term/kernel_exec-gfxterm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-gfxterm.o `test -f 'term/gfxterm.c' || echo '$(srcdir)/'`term/gfxterm.c
+
+term/kernel_exec-gfxterm.obj: term/gfxterm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT term/kernel_exec-gfxterm.obj -MD -MP -MF term/$(DEPDIR)/kernel_exec-gfxterm.Tpo -c -o term/kernel_exec-gfxterm.obj `if test -f 'term/gfxterm.c'; then $(CYGPATH_W) 'term/gfxterm.c'; else $(CYGPATH_W) '$(srcdir)/term/gfxterm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/kernel_exec-gfxterm.Tpo term/$(DEPDIR)/kernel_exec-gfxterm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/gfxterm.c' object='term/kernel_exec-gfxterm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o term/kernel_exec-gfxterm.obj `if test -f 'term/gfxterm.c'; then $(CYGPATH_W) 'term/gfxterm.c'; else $(CYGPATH_W) '$(srcdir)/term/gfxterm.c'; fi`
+
+font/kernel_exec-font.o: font/font.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT font/kernel_exec-font.o -MD -MP -MF font/$(DEPDIR)/kernel_exec-font.Tpo -c -o font/kernel_exec-font.o `test -f 'font/font.c' || echo '$(srcdir)/'`font/font.c
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/kernel_exec-font.Tpo font/$(DEPDIR)/kernel_exec-font.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font.c' object='font/kernel_exec-font.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o font/kernel_exec-font.o `test -f 'font/font.c' || echo '$(srcdir)/'`font/font.c
+
+font/kernel_exec-font.obj: font/font.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT font/kernel_exec-font.obj -MD -MP -MF font/$(DEPDIR)/kernel_exec-font.Tpo -c -o font/kernel_exec-font.obj `if test -f 'font/font.c'; then $(CYGPATH_W) 'font/font.c'; else $(CYGPATH_W) '$(srcdir)/font/font.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/kernel_exec-font.Tpo font/$(DEPDIR)/kernel_exec-font.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font.c' object='font/kernel_exec-font.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o font/kernel_exec-font.obj `if test -f 'font/font.c'; then $(CYGPATH_W) 'font/font.c'; else $(CYGPATH_W) '$(srcdir)/font/font.c'; fi`
+
+font/kernel_exec-font_cmd.o: font/font_cmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT font/kernel_exec-font_cmd.o -MD -MP -MF font/$(DEPDIR)/kernel_exec-font_cmd.Tpo -c -o font/kernel_exec-font_cmd.o `test -f 'font/font_cmd.c' || echo '$(srcdir)/'`font/font_cmd.c
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/kernel_exec-font_cmd.Tpo font/$(DEPDIR)/kernel_exec-font_cmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font_cmd.c' object='font/kernel_exec-font_cmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o font/kernel_exec-font_cmd.o `test -f 'font/font_cmd.c' || echo '$(srcdir)/'`font/font_cmd.c
+
+font/kernel_exec-font_cmd.obj: font/font_cmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT font/kernel_exec-font_cmd.obj -MD -MP -MF font/$(DEPDIR)/kernel_exec-font_cmd.Tpo -c -o font/kernel_exec-font_cmd.obj `if test -f 'font/font_cmd.c'; then $(CYGPATH_W) 'font/font_cmd.c'; else $(CYGPATH_W) '$(srcdir)/font/font_cmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) font/$(DEPDIR)/kernel_exec-font_cmd.Tpo font/$(DEPDIR)/kernel_exec-font_cmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='font/font_cmd.c' object='font/kernel_exec-font_cmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o font/kernel_exec-font_cmd.obj `if test -f 'font/font_cmd.c'; then $(CYGPATH_W) 'font/font_cmd.c'; else $(CYGPATH_W) '$(srcdir)/font/font_cmd.c'; fi`
+
+io/kernel_exec-bufio.o: io/bufio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT io/kernel_exec-bufio.o -MD -MP -MF io/$(DEPDIR)/kernel_exec-bufio.Tpo -c -o io/kernel_exec-bufio.o `test -f 'io/bufio.c' || echo '$(srcdir)/'`io/bufio.c
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/kernel_exec-bufio.Tpo io/$(DEPDIR)/kernel_exec-bufio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/bufio.c' object='io/kernel_exec-bufio.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o io/kernel_exec-bufio.o `test -f 'io/bufio.c' || echo '$(srcdir)/'`io/bufio.c
+
+io/kernel_exec-bufio.obj: io/bufio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT io/kernel_exec-bufio.obj -MD -MP -MF io/$(DEPDIR)/kernel_exec-bufio.Tpo -c -o io/kernel_exec-bufio.obj `if test -f 'io/bufio.c'; then $(CYGPATH_W) 'io/bufio.c'; else $(CYGPATH_W) '$(srcdir)/io/bufio.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/kernel_exec-bufio.Tpo io/$(DEPDIR)/kernel_exec-bufio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/bufio.c' object='io/kernel_exec-bufio.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o io/kernel_exec-bufio.obj `if test -f 'io/bufio.c'; then $(CYGPATH_W) 'io/bufio.c'; else $(CYGPATH_W) '$(srcdir)/io/bufio.c'; fi`
+
+video/kernel_exec-bitmap.o: video/bitmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-bitmap.o -MD -MP -MF video/$(DEPDIR)/kernel_exec-bitmap.Tpo -c -o video/kernel_exec-bitmap.o `test -f 'video/bitmap.c' || echo '$(srcdir)/'`video/bitmap.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-bitmap.Tpo video/$(DEPDIR)/kernel_exec-bitmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap.c' object='video/kernel_exec-bitmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-bitmap.o `test -f 'video/bitmap.c' || echo '$(srcdir)/'`video/bitmap.c
+
+video/kernel_exec-bitmap.obj: video/bitmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-bitmap.obj -MD -MP -MF video/$(DEPDIR)/kernel_exec-bitmap.Tpo -c -o video/kernel_exec-bitmap.obj `if test -f 'video/bitmap.c'; then $(CYGPATH_W) 'video/bitmap.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-bitmap.Tpo video/$(DEPDIR)/kernel_exec-bitmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap.c' object='video/kernel_exec-bitmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-bitmap.obj `if test -f 'video/bitmap.c'; then $(CYGPATH_W) 'video/bitmap.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap.c'; fi`
+
+video/kernel_exec-bitmap_scale.o: video/bitmap_scale.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-bitmap_scale.o -MD -MP -MF video/$(DEPDIR)/kernel_exec-bitmap_scale.Tpo -c -o video/kernel_exec-bitmap_scale.o `test -f 'video/bitmap_scale.c' || echo '$(srcdir)/'`video/bitmap_scale.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-bitmap_scale.Tpo video/$(DEPDIR)/kernel_exec-bitmap_scale.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap_scale.c' object='video/kernel_exec-bitmap_scale.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-bitmap_scale.o `test -f 'video/bitmap_scale.c' || echo '$(srcdir)/'`video/bitmap_scale.c
+
+video/kernel_exec-bitmap_scale.obj: video/bitmap_scale.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-bitmap_scale.obj -MD -MP -MF video/$(DEPDIR)/kernel_exec-bitmap_scale.Tpo -c -o video/kernel_exec-bitmap_scale.obj `if test -f 'video/bitmap_scale.c'; then $(CYGPATH_W) 'video/bitmap_scale.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap_scale.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-bitmap_scale.Tpo video/$(DEPDIR)/kernel_exec-bitmap_scale.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bitmap_scale.c' object='video/kernel_exec-bitmap_scale.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-bitmap_scale.obj `if test -f 'video/bitmap_scale.c'; then $(CYGPATH_W) 'video/bitmap_scale.c'; else $(CYGPATH_W) '$(srcdir)/video/bitmap_scale.c'; fi`
+
+video/fb/kernel_exec-fbblit.o: video/fb/fbblit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-fbblit.o -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-fbblit.Tpo -c -o video/fb/kernel_exec-fbblit.o `test -f 'video/fb/fbblit.c' || echo '$(srcdir)/'`video/fb/fbblit.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-fbblit.Tpo video/fb/$(DEPDIR)/kernel_exec-fbblit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbblit.c' object='video/fb/kernel_exec-fbblit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-fbblit.o `test -f 'video/fb/fbblit.c' || echo '$(srcdir)/'`video/fb/fbblit.c
+
+video/fb/kernel_exec-fbblit.obj: video/fb/fbblit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-fbblit.obj -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-fbblit.Tpo -c -o video/fb/kernel_exec-fbblit.obj `if test -f 'video/fb/fbblit.c'; then $(CYGPATH_W) 'video/fb/fbblit.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbblit.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-fbblit.Tpo video/fb/$(DEPDIR)/kernel_exec-fbblit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbblit.c' object='video/fb/kernel_exec-fbblit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-fbblit.obj `if test -f 'video/fb/fbblit.c'; then $(CYGPATH_W) 'video/fb/fbblit.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbblit.c'; fi`
+
+video/fb/kernel_exec-fbfill.o: video/fb/fbfill.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-fbfill.o -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-fbfill.Tpo -c -o video/fb/kernel_exec-fbfill.o `test -f 'video/fb/fbfill.c' || echo '$(srcdir)/'`video/fb/fbfill.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-fbfill.Tpo video/fb/$(DEPDIR)/kernel_exec-fbfill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbfill.c' object='video/fb/kernel_exec-fbfill.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-fbfill.o `test -f 'video/fb/fbfill.c' || echo '$(srcdir)/'`video/fb/fbfill.c
+
+video/fb/kernel_exec-fbfill.obj: video/fb/fbfill.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-fbfill.obj -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-fbfill.Tpo -c -o video/fb/kernel_exec-fbfill.obj `if test -f 'video/fb/fbfill.c'; then $(CYGPATH_W) 'video/fb/fbfill.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbfill.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-fbfill.Tpo video/fb/$(DEPDIR)/kernel_exec-fbfill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbfill.c' object='video/fb/kernel_exec-fbfill.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-fbfill.obj `if test -f 'video/fb/fbfill.c'; then $(CYGPATH_W) 'video/fb/fbfill.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbfill.c'; fi`
+
+video/fb/kernel_exec-fbutil.o: video/fb/fbutil.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-fbutil.o -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-fbutil.Tpo -c -o video/fb/kernel_exec-fbutil.o `test -f 'video/fb/fbutil.c' || echo '$(srcdir)/'`video/fb/fbutil.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-fbutil.Tpo video/fb/$(DEPDIR)/kernel_exec-fbutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbutil.c' object='video/fb/kernel_exec-fbutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-fbutil.o `test -f 'video/fb/fbutil.c' || echo '$(srcdir)/'`video/fb/fbutil.c
+
+video/fb/kernel_exec-fbutil.obj: video/fb/fbutil.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-fbutil.obj -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-fbutil.Tpo -c -o video/fb/kernel_exec-fbutil.obj `if test -f 'video/fb/fbutil.c'; then $(CYGPATH_W) 'video/fb/fbutil.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbutil.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-fbutil.Tpo video/fb/$(DEPDIR)/kernel_exec-fbutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbutil.c' object='video/fb/kernel_exec-fbutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-fbutil.obj `if test -f 'video/fb/fbutil.c'; then $(CYGPATH_W) 'video/fb/fbutil.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbutil.c'; fi`
+
+video/fb/kernel_exec-video_fb.o: video/fb/video_fb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-video_fb.o -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-video_fb.Tpo -c -o video/fb/kernel_exec-video_fb.o `test -f 'video/fb/video_fb.c' || echo '$(srcdir)/'`video/fb/video_fb.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-video_fb.Tpo video/fb/$(DEPDIR)/kernel_exec-video_fb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/video_fb.c' object='video/fb/kernel_exec-video_fb.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-video_fb.o `test -f 'video/fb/video_fb.c' || echo '$(srcdir)/'`video/fb/video_fb.c
+
+video/fb/kernel_exec-video_fb.obj: video/fb/video_fb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/fb/kernel_exec-video_fb.obj -MD -MP -MF video/fb/$(DEPDIR)/kernel_exec-video_fb.Tpo -c -o video/fb/kernel_exec-video_fb.obj `if test -f 'video/fb/video_fb.c'; then $(CYGPATH_W) 'video/fb/video_fb.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/video_fb.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/kernel_exec-video_fb.Tpo video/fb/$(DEPDIR)/kernel_exec-video_fb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/video_fb.c' object='video/fb/kernel_exec-video_fb.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/fb/kernel_exec-video_fb.obj `if test -f 'video/fb/video_fb.c'; then $(CYGPATH_W) 'video/fb/video_fb.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/video_fb.c'; fi`
+
+video/kernel_exec-video.o: video/video.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-video.o -MD -MP -MF video/$(DEPDIR)/kernel_exec-video.Tpo -c -o video/kernel_exec-video.o `test -f 'video/video.c' || echo '$(srcdir)/'`video/video.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-video.Tpo video/$(DEPDIR)/kernel_exec-video.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/video.c' object='video/kernel_exec-video.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-video.o `test -f 'video/video.c' || echo '$(srcdir)/'`video/video.c
+
+video/kernel_exec-video.obj: video/video.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT video/kernel_exec-video.obj -MD -MP -MF video/$(DEPDIR)/kernel_exec-video.Tpo -c -o video/kernel_exec-video.obj `if test -f 'video/video.c'; then $(CYGPATH_W) 'video/video.c'; else $(CYGPATH_W) '$(srcdir)/video/video.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/kernel_exec-video.Tpo video/$(DEPDIR)/kernel_exec-video.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/video.c' object='video/kernel_exec-video.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o video/kernel_exec-video.obj `if test -f 'video/video.c'; then $(CYGPATH_W) 'video/video.c'; else $(CYGPATH_W) '$(srcdir)/video/video.c'; fi`
+
+commands/kernel_exec-boot.o: commands/boot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT commands/kernel_exec-boot.o -MD -MP -MF commands/$(DEPDIR)/kernel_exec-boot.Tpo -c -o commands/kernel_exec-boot.o `test -f 'commands/boot.c' || echo '$(srcdir)/'`commands/boot.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/kernel_exec-boot.Tpo commands/$(DEPDIR)/kernel_exec-boot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/boot.c' object='commands/kernel_exec-boot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o commands/kernel_exec-boot.o `test -f 'commands/boot.c' || echo '$(srcdir)/'`commands/boot.c
+
+commands/kernel_exec-boot.obj: commands/boot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT commands/kernel_exec-boot.obj -MD -MP -MF commands/$(DEPDIR)/kernel_exec-boot.Tpo -c -o commands/kernel_exec-boot.obj `if test -f 'commands/boot.c'; then $(CYGPATH_W) 'commands/boot.c'; else $(CYGPATH_W) '$(srcdir)/commands/boot.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/kernel_exec-boot.Tpo commands/$(DEPDIR)/kernel_exec-boot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/boot.c' object='commands/kernel_exec-boot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o commands/kernel_exec-boot.obj `if test -f 'commands/boot.c'; then $(CYGPATH_W) 'commands/boot.c'; else $(CYGPATH_W) '$(srcdir)/commands/boot.c'; fi`
+
+kern/powerpc/kernel_exec-dl.o: kern/powerpc/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/powerpc/kernel_exec-dl.o -MD -MP -MF kern/powerpc/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/powerpc/kernel_exec-dl.o `test -f 'kern/powerpc/dl.c' || echo '$(srcdir)/'`kern/powerpc/dl.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/powerpc/$(DEPDIR)/kernel_exec-dl.Tpo kern/powerpc/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/powerpc/dl.c' object='kern/powerpc/kernel_exec-dl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/powerpc/kernel_exec-dl.o `test -f 'kern/powerpc/dl.c' || echo '$(srcdir)/'`kern/powerpc/dl.c
+
+kern/powerpc/kernel_exec-dl.obj: kern/powerpc/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/powerpc/kernel_exec-dl.obj -MD -MP -MF kern/powerpc/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/powerpc/kernel_exec-dl.obj `if test -f 'kern/powerpc/dl.c'; then $(CYGPATH_W) 'kern/powerpc/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/powerpc/dl.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/powerpc/$(DEPDIR)/kernel_exec-dl.Tpo kern/powerpc/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/powerpc/dl.c' object='kern/powerpc/kernel_exec-dl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/powerpc/kernel_exec-dl.obj `if test -f 'kern/powerpc/dl.c'; then $(CYGPATH_W) 'kern/powerpc/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/powerpc/dl.c'; fi`
+
+kern/sparc64/kernel_exec-dl.o: kern/sparc64/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/sparc64/kernel_exec-dl.o -MD -MP -MF kern/sparc64/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/sparc64/kernel_exec-dl.o `test -f 'kern/sparc64/dl.c' || echo '$(srcdir)/'`kern/sparc64/dl.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/sparc64/$(DEPDIR)/kernel_exec-dl.Tpo kern/sparc64/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/sparc64/dl.c' object='kern/sparc64/kernel_exec-dl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/sparc64/kernel_exec-dl.o `test -f 'kern/sparc64/dl.c' || echo '$(srcdir)/'`kern/sparc64/dl.c
+
+kern/sparc64/kernel_exec-dl.obj: kern/sparc64/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/sparc64/kernel_exec-dl.obj -MD -MP -MF kern/sparc64/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/sparc64/kernel_exec-dl.obj `if test -f 'kern/sparc64/dl.c'; then $(CYGPATH_W) 'kern/sparc64/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/dl.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/sparc64/$(DEPDIR)/kernel_exec-dl.Tpo kern/sparc64/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/sparc64/dl.c' object='kern/sparc64/kernel_exec-dl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/sparc64/kernel_exec-dl.obj `if test -f 'kern/sparc64/dl.c'; then $(CYGPATH_W) 'kern/sparc64/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/dl.c'; fi`
+
+kern/sparc64/ieee1275/kernel_exec-ieee1275.o: kern/sparc64/ieee1275/ieee1275.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/sparc64/ieee1275/kernel_exec-ieee1275.o -MD -MP -MF kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo -c -o kern/sparc64/ieee1275/kernel_exec-ieee1275.o `test -f 'kern/sparc64/ieee1275/ieee1275.c' || echo '$(srcdir)/'`kern/sparc64/ieee1275/ieee1275.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/sparc64/ieee1275/ieee1275.c' object='kern/sparc64/ieee1275/kernel_exec-ieee1275.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/sparc64/ieee1275/kernel_exec-ieee1275.o `test -f 'kern/sparc64/ieee1275/ieee1275.c' || echo '$(srcdir)/'`kern/sparc64/ieee1275/ieee1275.c
+
+kern/sparc64/ieee1275/kernel_exec-ieee1275.obj: kern/sparc64/ieee1275/ieee1275.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/sparc64/ieee1275/kernel_exec-ieee1275.obj -MD -MP -MF kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo -c -o kern/sparc64/ieee1275/kernel_exec-ieee1275.obj `if test -f 'kern/sparc64/ieee1275/ieee1275.c'; then $(CYGPATH_W) 'kern/sparc64/ieee1275/ieee1275.c'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/ieee1275/ieee1275.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Tpo kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-ieee1275.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/sparc64/ieee1275/ieee1275.c' object='kern/sparc64/ieee1275/kernel_exec-ieee1275.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/sparc64/ieee1275/kernel_exec-ieee1275.obj `if test -f 'kern/sparc64/ieee1275/ieee1275.c'; then $(CYGPATH_W) 'kern/sparc64/ieee1275/ieee1275.c'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/ieee1275/ieee1275.c'; fi`
+
+kern/sparc64/ieee1275/kernel_exec-init.o: kern/sparc64/ieee1275/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/sparc64/ieee1275/kernel_exec-init.o -MD -MP -MF kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/sparc64/ieee1275/kernel_exec-init.o `test -f 'kern/sparc64/ieee1275/init.c' || echo '$(srcdir)/'`kern/sparc64/ieee1275/init.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/sparc64/ieee1275/init.c' object='kern/sparc64/ieee1275/kernel_exec-init.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/sparc64/ieee1275/kernel_exec-init.o `test -f 'kern/sparc64/ieee1275/init.c' || echo '$(srcdir)/'`kern/sparc64/ieee1275/init.c
+
+kern/sparc64/ieee1275/kernel_exec-init.obj: kern/sparc64/ieee1275/init.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/sparc64/ieee1275/kernel_exec-init.obj -MD -MP -MF kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo -c -o kern/sparc64/ieee1275/kernel_exec-init.obj `if test -f 'kern/sparc64/ieee1275/init.c'; then $(CYGPATH_W) 'kern/sparc64/ieee1275/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/ieee1275/init.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-init.Tpo kern/sparc64/ieee1275/$(DEPDIR)/kernel_exec-init.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/sparc64/ieee1275/init.c' object='kern/sparc64/ieee1275/kernel_exec-init.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/sparc64/ieee1275/kernel_exec-init.obj `if test -f 'kern/sparc64/ieee1275/init.c'; then $(CYGPATH_W) 'kern/sparc64/ieee1275/init.c'; else $(CYGPATH_W) '$(srcdir)/kern/sparc64/ieee1275/init.c'; fi`
+
+kern/x86_64/kernel_exec-dl.o: kern/x86_64/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/x86_64/kernel_exec-dl.o -MD -MP -MF kern/x86_64/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/x86_64/kernel_exec-dl.o `test -f 'kern/x86_64/dl.c' || echo '$(srcdir)/'`kern/x86_64/dl.c
+@am__fastdepCC_TRUE@ $(am__mv) kern/x86_64/$(DEPDIR)/kernel_exec-dl.Tpo kern/x86_64/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/x86_64/dl.c' object='kern/x86_64/kernel_exec-dl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/x86_64/kernel_exec-dl.o `test -f 'kern/x86_64/dl.c' || echo '$(srcdir)/'`kern/x86_64/dl.c
+
+kern/x86_64/kernel_exec-dl.obj: kern/x86_64/dl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kern/x86_64/kernel_exec-dl.obj -MD -MP -MF kern/x86_64/$(DEPDIR)/kernel_exec-dl.Tpo -c -o kern/x86_64/kernel_exec-dl.obj `if test -f 'kern/x86_64/dl.c'; then $(CYGPATH_W) 'kern/x86_64/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/x86_64/dl.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) kern/x86_64/$(DEPDIR)/kernel_exec-dl.Tpo kern/x86_64/$(DEPDIR)/kernel_exec-dl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kern/x86_64/dl.c' object='kern/x86_64/kernel_exec-dl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kern/x86_64/kernel_exec-dl.obj `if test -f 'kern/x86_64/dl.c'; then $(CYGPATH_W) 'kern/x86_64/dl.c'; else $(CYGPATH_W) '$(srcdir)/kern/x86_64/dl.c'; fi`
+
+kernel_exec-symlist.o: symlist.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kernel_exec-symlist.o -MD -MP -MF $(DEPDIR)/kernel_exec-symlist.Tpo -c -o kernel_exec-symlist.o `test -f 'symlist.c' || echo '$(srcdir)/'`symlist.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/kernel_exec-symlist.Tpo $(DEPDIR)/kernel_exec-symlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='symlist.c' object='kernel_exec-symlist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kernel_exec-symlist.o `test -f 'symlist.c' || echo '$(srcdir)/'`symlist.c
+
+kernel_exec-symlist.obj: symlist.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -MT kernel_exec-symlist.obj -MD -MP -MF $(DEPDIR)/kernel_exec-symlist.Tpo -c -o kernel_exec-symlist.obj `if test -f 'symlist.c'; then $(CYGPATH_W) 'symlist.c'; else $(CYGPATH_W) '$(srcdir)/symlist.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/kernel_exec-symlist.Tpo $(DEPDIR)/kernel_exec-symlist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='symlist.c' object='kernel_exec-symlist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(kernel_exec_CPPFLAGS) $(CPPFLAGS) $(kernel_exec_CFLAGS) $(CFLAGS) -c -o kernel_exec-symlist.obj `if test -f 'symlist.c'; then $(CYGPATH_W) 'symlist.c'; else $(CYGPATH_W) '$(srcdir)/symlist.c'; fi`
+
+commands/keylayouts_module-keylayouts.o: commands/keylayouts.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $(keylayouts_module_CFLAGS) $(CFLAGS) -MT commands/keylayouts_module-keylayouts.o -MD -MP -MF commands/$(DEPDIR)/keylayouts_module-keylayouts.Tpo -c -o commands/keylayouts_module-keylayouts.o `test -f 'commands/keylayouts.c' || echo '$(srcdir)/'`commands/keylayouts.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/keylayouts_module-keylayouts.Tpo commands/$(DEPDIR)/keylayouts_module-keylayouts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/keylayouts.c' object='commands/keylayouts_module-keylayouts.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $(keylayouts_module_CFLAGS) $(CFLAGS) -c -o commands/keylayouts_module-keylayouts.o `test -f 'commands/keylayouts.c' || echo '$(srcdir)/'`commands/keylayouts.c
+
+commands/keylayouts_module-keylayouts.obj: commands/keylayouts.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $(keylayouts_module_CFLAGS) $(CFLAGS) -MT commands/keylayouts_module-keylayouts.obj -MD -MP -MF commands/$(DEPDIR)/keylayouts_module-keylayouts.Tpo -c -o commands/keylayouts_module-keylayouts.obj `if test -f 'commands/keylayouts.c'; then $(CYGPATH_W) 'commands/keylayouts.c'; else $(CYGPATH_W) '$(srcdir)/commands/keylayouts.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/keylayouts_module-keylayouts.Tpo commands/$(DEPDIR)/keylayouts_module-keylayouts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/keylayouts.c' object='commands/keylayouts_module-keylayouts.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $(keylayouts_module_CFLAGS) $(CFLAGS) -c -o commands/keylayouts_module-keylayouts.obj `if test -f 'commands/keylayouts.c'; then $(CYGPATH_W) 'commands/keylayouts.c'; else $(CYGPATH_W) '$(srcdir)/commands/keylayouts.c'; fi`
+
+commands/keystatus_module-keystatus.o: commands/keystatus.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $(keystatus_module_CFLAGS) $(CFLAGS) -MT commands/keystatus_module-keystatus.o -MD -MP -MF commands/$(DEPDIR)/keystatus_module-keystatus.Tpo -c -o commands/keystatus_module-keystatus.o `test -f 'commands/keystatus.c' || echo '$(srcdir)/'`commands/keystatus.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/keystatus_module-keystatus.Tpo commands/$(DEPDIR)/keystatus_module-keystatus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/keystatus.c' object='commands/keystatus_module-keystatus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $(keystatus_module_CFLAGS) $(CFLAGS) -c -o commands/keystatus_module-keystatus.o `test -f 'commands/keystatus.c' || echo '$(srcdir)/'`commands/keystatus.c
+
+commands/keystatus_module-keystatus.obj: commands/keystatus.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $(keystatus_module_CFLAGS) $(CFLAGS) -MT commands/keystatus_module-keystatus.obj -MD -MP -MF commands/$(DEPDIR)/keystatus_module-keystatus.Tpo -c -o commands/keystatus_module-keystatus.obj `if test -f 'commands/keystatus.c'; then $(CYGPATH_W) 'commands/keystatus.c'; else $(CYGPATH_W) '$(srcdir)/commands/keystatus.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/keystatus_module-keystatus.Tpo commands/$(DEPDIR)/keystatus_module-keystatus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/keystatus.c' object='commands/keystatus_module-keystatus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $(keystatus_module_CFLAGS) $(CFLAGS) -c -o commands/keystatus_module-keystatus.obj `if test -f 'commands/keystatus.c'; then $(CYGPATH_W) 'commands/keystatus.c'; else $(CYGPATH_W) '$(srcdir)/commands/keystatus.c'; fi`
+
+lib/i386/pc/legacycfg_module-vesa_modes_table.o: lib/i386/pc/vesa_modes_table.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -MT lib/i386/pc/legacycfg_module-vesa_modes_table.o -MD -MP -MF lib/i386/pc/$(DEPDIR)/legacycfg_module-vesa_modes_table.Tpo -c -o lib/i386/pc/legacycfg_module-vesa_modes_table.o `test -f 'lib/i386/pc/vesa_modes_table.c' || echo '$(srcdir)/'`lib/i386/pc/vesa_modes_table.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/pc/$(DEPDIR)/legacycfg_module-vesa_modes_table.Tpo lib/i386/pc/$(DEPDIR)/legacycfg_module-vesa_modes_table.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/pc/vesa_modes_table.c' object='lib/i386/pc/legacycfg_module-vesa_modes_table.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -c -o lib/i386/pc/legacycfg_module-vesa_modes_table.o `test -f 'lib/i386/pc/vesa_modes_table.c' || echo '$(srcdir)/'`lib/i386/pc/vesa_modes_table.c
+
+lib/i386/pc/legacycfg_module-vesa_modes_table.obj: lib/i386/pc/vesa_modes_table.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -MT lib/i386/pc/legacycfg_module-vesa_modes_table.obj -MD -MP -MF lib/i386/pc/$(DEPDIR)/legacycfg_module-vesa_modes_table.Tpo -c -o lib/i386/pc/legacycfg_module-vesa_modes_table.obj `if test -f 'lib/i386/pc/vesa_modes_table.c'; then $(CYGPATH_W) 'lib/i386/pc/vesa_modes_table.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/pc/vesa_modes_table.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/pc/$(DEPDIR)/legacycfg_module-vesa_modes_table.Tpo lib/i386/pc/$(DEPDIR)/legacycfg_module-vesa_modes_table.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/pc/vesa_modes_table.c' object='lib/i386/pc/legacycfg_module-vesa_modes_table.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -c -o lib/i386/pc/legacycfg_module-vesa_modes_table.obj `if test -f 'lib/i386/pc/vesa_modes_table.c'; then $(CYGPATH_W) 'lib/i386/pc/vesa_modes_table.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/pc/vesa_modes_table.c'; fi`
+
+commands/legacycfg_module-legacycfg.o: commands/legacycfg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -MT commands/legacycfg_module-legacycfg.o -MD -MP -MF commands/$(DEPDIR)/legacycfg_module-legacycfg.Tpo -c -o commands/legacycfg_module-legacycfg.o `test -f 'commands/legacycfg.c' || echo '$(srcdir)/'`commands/legacycfg.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/legacycfg_module-legacycfg.Tpo commands/$(DEPDIR)/legacycfg_module-legacycfg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/legacycfg.c' object='commands/legacycfg_module-legacycfg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -c -o commands/legacycfg_module-legacycfg.o `test -f 'commands/legacycfg.c' || echo '$(srcdir)/'`commands/legacycfg.c
+
+commands/legacycfg_module-legacycfg.obj: commands/legacycfg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -MT commands/legacycfg_module-legacycfg.obj -MD -MP -MF commands/$(DEPDIR)/legacycfg_module-legacycfg.Tpo -c -o commands/legacycfg_module-legacycfg.obj `if test -f 'commands/legacycfg.c'; then $(CYGPATH_W) 'commands/legacycfg.c'; else $(CYGPATH_W) '$(srcdir)/commands/legacycfg.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/legacycfg_module-legacycfg.Tpo commands/$(DEPDIR)/legacycfg_module-legacycfg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/legacycfg.c' object='commands/legacycfg_module-legacycfg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -c -o commands/legacycfg_module-legacycfg.obj `if test -f 'commands/legacycfg.c'; then $(CYGPATH_W) 'commands/legacycfg.c'; else $(CYGPATH_W) '$(srcdir)/commands/legacycfg.c'; fi`
+
+lib/legacycfg_module-legacy_parse.o: lib/legacy_parse.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -MT lib/legacycfg_module-legacy_parse.o -MD -MP -MF lib/$(DEPDIR)/legacycfg_module-legacy_parse.Tpo -c -o lib/legacycfg_module-legacy_parse.o `test -f 'lib/legacy_parse.c' || echo '$(srcdir)/'`lib/legacy_parse.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/legacycfg_module-legacy_parse.Tpo lib/$(DEPDIR)/legacycfg_module-legacy_parse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/legacy_parse.c' object='lib/legacycfg_module-legacy_parse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -c -o lib/legacycfg_module-legacy_parse.o `test -f 'lib/legacy_parse.c' || echo '$(srcdir)/'`lib/legacy_parse.c
+
+lib/legacycfg_module-legacy_parse.obj: lib/legacy_parse.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -MT lib/legacycfg_module-legacy_parse.obj -MD -MP -MF lib/$(DEPDIR)/legacycfg_module-legacy_parse.Tpo -c -o lib/legacycfg_module-legacy_parse.obj `if test -f 'lib/legacy_parse.c'; then $(CYGPATH_W) 'lib/legacy_parse.c'; else $(CYGPATH_W) '$(srcdir)/lib/legacy_parse.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/legacycfg_module-legacy_parse.Tpo lib/$(DEPDIR)/legacycfg_module-legacy_parse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/legacy_parse.c' object='lib/legacycfg_module-legacy_parse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $(legacycfg_module_CFLAGS) $(CFLAGS) -c -o lib/legacycfg_module-legacy_parse.obj `if test -f 'lib/legacy_parse.c'; then $(CYGPATH_W) 'lib/legacy_parse.c'; else $(CYGPATH_W) '$(srcdir)/lib/legacy_parse.c'; fi`
+
+bus/usb/emu/libusb_module-usb.o: bus/usb/emu/usb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libusb_module_CPPFLAGS) $(CPPFLAGS) $(libusb_module_CFLAGS) $(CFLAGS) -MT bus/usb/emu/libusb_module-usb.o -MD -MP -MF bus/usb/emu/$(DEPDIR)/libusb_module-usb.Tpo -c -o bus/usb/emu/libusb_module-usb.o `test -f 'bus/usb/emu/usb.c' || echo '$(srcdir)/'`bus/usb/emu/usb.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/emu/$(DEPDIR)/libusb_module-usb.Tpo bus/usb/emu/$(DEPDIR)/libusb_module-usb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/emu/usb.c' object='bus/usb/emu/libusb_module-usb.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libusb_module_CPPFLAGS) $(CPPFLAGS) $(libusb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/emu/libusb_module-usb.o `test -f 'bus/usb/emu/usb.c' || echo '$(srcdir)/'`bus/usb/emu/usb.c
+
+bus/usb/emu/libusb_module-usb.obj: bus/usb/emu/usb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libusb_module_CPPFLAGS) $(CPPFLAGS) $(libusb_module_CFLAGS) $(CFLAGS) -MT bus/usb/emu/libusb_module-usb.obj -MD -MP -MF bus/usb/emu/$(DEPDIR)/libusb_module-usb.Tpo -c -o bus/usb/emu/libusb_module-usb.obj `if test -f 'bus/usb/emu/usb.c'; then $(CYGPATH_W) 'bus/usb/emu/usb.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/emu/usb.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/emu/$(DEPDIR)/libusb_module-usb.Tpo bus/usb/emu/$(DEPDIR)/libusb_module-usb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/emu/usb.c' object='bus/usb/emu/libusb_module-usb.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libusb_module_CPPFLAGS) $(CPPFLAGS) $(libusb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/emu/libusb_module-usb.obj `if test -f 'bus/usb/emu/usb.c'; then $(CYGPATH_W) 'bus/usb/emu/usb.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/emu/usb.c'; fi`
+
+loader/i386/linux_module-linux.o: loader/i386/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/i386/linux_module-linux.o -MD -MP -MF loader/i386/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/i386/linux_module-linux.o `test -f 'loader/i386/linux.c' || echo '$(srcdir)/'`loader/i386/linux.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/linux_module-linux.Tpo loader/i386/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/linux.c' object='loader/i386/linux_module-linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/i386/linux_module-linux.o `test -f 'loader/i386/linux.c' || echo '$(srcdir)/'`loader/i386/linux.c
+
+loader/i386/linux_module-linux.obj: loader/i386/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/i386/linux_module-linux.obj -MD -MP -MF loader/i386/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/i386/linux_module-linux.obj `if test -f 'loader/i386/linux.c'; then $(CYGPATH_W) 'loader/i386/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/linux.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/linux_module-linux.Tpo loader/i386/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/linux.c' object='loader/i386/linux_module-linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/i386/linux_module-linux.obj `if test -f 'loader/i386/linux.c'; then $(CYGPATH_W) 'loader/i386/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/linux.c'; fi`
+
+lib/linux_module-cmdline.o: lib/cmdline.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT lib/linux_module-cmdline.o -MD -MP -MF lib/$(DEPDIR)/linux_module-cmdline.Tpo -c -o lib/linux_module-cmdline.o `test -f 'lib/cmdline.c' || echo '$(srcdir)/'`lib/cmdline.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/linux_module-cmdline.Tpo lib/$(DEPDIR)/linux_module-cmdline.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/cmdline.c' object='lib/linux_module-cmdline.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o lib/linux_module-cmdline.o `test -f 'lib/cmdline.c' || echo '$(srcdir)/'`lib/cmdline.c
+
+lib/linux_module-cmdline.obj: lib/cmdline.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT lib/linux_module-cmdline.obj -MD -MP -MF lib/$(DEPDIR)/linux_module-cmdline.Tpo -c -o lib/linux_module-cmdline.obj `if test -f 'lib/cmdline.c'; then $(CYGPATH_W) 'lib/cmdline.c'; else $(CYGPATH_W) '$(srcdir)/lib/cmdline.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/linux_module-cmdline.Tpo lib/$(DEPDIR)/linux_module-cmdline.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/cmdline.c' object='lib/linux_module-cmdline.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o lib/linux_module-cmdline.obj `if test -f 'lib/cmdline.c'; then $(CYGPATH_W) 'lib/cmdline.c'; else $(CYGPATH_W) '$(srcdir)/lib/cmdline.c'; fi`
+
+lib/i386/pc/linux_module-vesa_modes_table.o: lib/i386/pc/vesa_modes_table.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT lib/i386/pc/linux_module-vesa_modes_table.o -MD -MP -MF lib/i386/pc/$(DEPDIR)/linux_module-vesa_modes_table.Tpo -c -o lib/i386/pc/linux_module-vesa_modes_table.o `test -f 'lib/i386/pc/vesa_modes_table.c' || echo '$(srcdir)/'`lib/i386/pc/vesa_modes_table.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/pc/$(DEPDIR)/linux_module-vesa_modes_table.Tpo lib/i386/pc/$(DEPDIR)/linux_module-vesa_modes_table.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/pc/vesa_modes_table.c' object='lib/i386/pc/linux_module-vesa_modes_table.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o lib/i386/pc/linux_module-vesa_modes_table.o `test -f 'lib/i386/pc/vesa_modes_table.c' || echo '$(srcdir)/'`lib/i386/pc/vesa_modes_table.c
+
+lib/i386/pc/linux_module-vesa_modes_table.obj: lib/i386/pc/vesa_modes_table.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT lib/i386/pc/linux_module-vesa_modes_table.obj -MD -MP -MF lib/i386/pc/$(DEPDIR)/linux_module-vesa_modes_table.Tpo -c -o lib/i386/pc/linux_module-vesa_modes_table.obj `if test -f 'lib/i386/pc/vesa_modes_table.c'; then $(CYGPATH_W) 'lib/i386/pc/vesa_modes_table.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/pc/vesa_modes_table.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/pc/$(DEPDIR)/linux_module-vesa_modes_table.Tpo lib/i386/pc/$(DEPDIR)/linux_module-vesa_modes_table.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/pc/vesa_modes_table.c' object='lib/i386/pc/linux_module-vesa_modes_table.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o lib/i386/pc/linux_module-vesa_modes_table.obj `if test -f 'lib/i386/pc/vesa_modes_table.c'; then $(CYGPATH_W) 'lib/i386/pc/vesa_modes_table.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/pc/vesa_modes_table.c'; fi`
+
+loader/mips/linux_module-linux.o: loader/mips/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/mips/linux_module-linux.o -MD -MP -MF loader/mips/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/mips/linux_module-linux.o `test -f 'loader/mips/linux.c' || echo '$(srcdir)/'`loader/mips/linux.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/mips/$(DEPDIR)/linux_module-linux.Tpo loader/mips/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/mips/linux.c' object='loader/mips/linux_module-linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/mips/linux_module-linux.o `test -f 'loader/mips/linux.c' || echo '$(srcdir)/'`loader/mips/linux.c
+
+loader/mips/linux_module-linux.obj: loader/mips/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/mips/linux_module-linux.obj -MD -MP -MF loader/mips/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/mips/linux_module-linux.obj `if test -f 'loader/mips/linux.c'; then $(CYGPATH_W) 'loader/mips/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/mips/linux.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/mips/$(DEPDIR)/linux_module-linux.Tpo loader/mips/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/mips/linux.c' object='loader/mips/linux_module-linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/mips/linux_module-linux.obj `if test -f 'loader/mips/linux.c'; then $(CYGPATH_W) 'loader/mips/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/mips/linux.c'; fi`
+
+loader/powerpc/ieee1275/linux_module-linux.o: loader/powerpc/ieee1275/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/powerpc/ieee1275/linux_module-linux.o -MD -MP -MF loader/powerpc/ieee1275/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/powerpc/ieee1275/linux_module-linux.o `test -f 'loader/powerpc/ieee1275/linux.c' || echo '$(srcdir)/'`loader/powerpc/ieee1275/linux.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/powerpc/ieee1275/$(DEPDIR)/linux_module-linux.Tpo loader/powerpc/ieee1275/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/powerpc/ieee1275/linux.c' object='loader/powerpc/ieee1275/linux_module-linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/powerpc/ieee1275/linux_module-linux.o `test -f 'loader/powerpc/ieee1275/linux.c' || echo '$(srcdir)/'`loader/powerpc/ieee1275/linux.c
+
+loader/powerpc/ieee1275/linux_module-linux.obj: loader/powerpc/ieee1275/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/powerpc/ieee1275/linux_module-linux.obj -MD -MP -MF loader/powerpc/ieee1275/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/powerpc/ieee1275/linux_module-linux.obj `if test -f 'loader/powerpc/ieee1275/linux.c'; then $(CYGPATH_W) 'loader/powerpc/ieee1275/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/powerpc/ieee1275/linux.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/powerpc/ieee1275/$(DEPDIR)/linux_module-linux.Tpo loader/powerpc/ieee1275/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/powerpc/ieee1275/linux.c' object='loader/powerpc/ieee1275/linux_module-linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/powerpc/ieee1275/linux_module-linux.obj `if test -f 'loader/powerpc/ieee1275/linux.c'; then $(CYGPATH_W) 'loader/powerpc/ieee1275/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/powerpc/ieee1275/linux.c'; fi`
+
+loader/sparc64/ieee1275/linux_module-linux.o: loader/sparc64/ieee1275/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/sparc64/ieee1275/linux_module-linux.o -MD -MP -MF loader/sparc64/ieee1275/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/sparc64/ieee1275/linux_module-linux.o `test -f 'loader/sparc64/ieee1275/linux.c' || echo '$(srcdir)/'`loader/sparc64/ieee1275/linux.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/sparc64/ieee1275/$(DEPDIR)/linux_module-linux.Tpo loader/sparc64/ieee1275/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/sparc64/ieee1275/linux.c' object='loader/sparc64/ieee1275/linux_module-linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/sparc64/ieee1275/linux_module-linux.o `test -f 'loader/sparc64/ieee1275/linux.c' || echo '$(srcdir)/'`loader/sparc64/ieee1275/linux.c
+
+loader/sparc64/ieee1275/linux_module-linux.obj: loader/sparc64/ieee1275/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -MT loader/sparc64/ieee1275/linux_module-linux.obj -MD -MP -MF loader/sparc64/ieee1275/$(DEPDIR)/linux_module-linux.Tpo -c -o loader/sparc64/ieee1275/linux_module-linux.obj `if test -f 'loader/sparc64/ieee1275/linux.c'; then $(CYGPATH_W) 'loader/sparc64/ieee1275/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/sparc64/ieee1275/linux.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/sparc64/ieee1275/$(DEPDIR)/linux_module-linux.Tpo loader/sparc64/ieee1275/$(DEPDIR)/linux_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/sparc64/ieee1275/linux.c' object='loader/sparc64/ieee1275/linux_module-linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $(linux_module_CFLAGS) $(CFLAGS) -c -o loader/sparc64/ieee1275/linux_module-linux.obj `if test -f 'loader/sparc64/ieee1275/linux.c'; then $(CYGPATH_W) 'loader/sparc64/ieee1275/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/sparc64/ieee1275/linux.c'; fi`
+
+loader/i386/pc/linux16_module-linux.o: loader/i386/pc/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -MT loader/i386/pc/linux16_module-linux.o -MD -MP -MF loader/i386/pc/$(DEPDIR)/linux16_module-linux.Tpo -c -o loader/i386/pc/linux16_module-linux.o `test -f 'loader/i386/pc/linux.c' || echo '$(srcdir)/'`loader/i386/pc/linux.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/pc/$(DEPDIR)/linux16_module-linux.Tpo loader/i386/pc/$(DEPDIR)/linux16_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/pc/linux.c' object='loader/i386/pc/linux16_module-linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -c -o loader/i386/pc/linux16_module-linux.o `test -f 'loader/i386/pc/linux.c' || echo '$(srcdir)/'`loader/i386/pc/linux.c
+
+loader/i386/pc/linux16_module-linux.obj: loader/i386/pc/linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -MT loader/i386/pc/linux16_module-linux.obj -MD -MP -MF loader/i386/pc/$(DEPDIR)/linux16_module-linux.Tpo -c -o loader/i386/pc/linux16_module-linux.obj `if test -f 'loader/i386/pc/linux.c'; then $(CYGPATH_W) 'loader/i386/pc/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/pc/linux.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/pc/$(DEPDIR)/linux16_module-linux.Tpo loader/i386/pc/$(DEPDIR)/linux16_module-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/pc/linux.c' object='loader/i386/pc/linux16_module-linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -c -o loader/i386/pc/linux16_module-linux.obj `if test -f 'loader/i386/pc/linux.c'; then $(CYGPATH_W) 'loader/i386/pc/linux.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/pc/linux.c'; fi`
+
+lib/linux16_module-cmdline.o: lib/cmdline.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -MT lib/linux16_module-cmdline.o -MD -MP -MF lib/$(DEPDIR)/linux16_module-cmdline.Tpo -c -o lib/linux16_module-cmdline.o `test -f 'lib/cmdline.c' || echo '$(srcdir)/'`lib/cmdline.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/linux16_module-cmdline.Tpo lib/$(DEPDIR)/linux16_module-cmdline.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/cmdline.c' object='lib/linux16_module-cmdline.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -c -o lib/linux16_module-cmdline.o `test -f 'lib/cmdline.c' || echo '$(srcdir)/'`lib/cmdline.c
+
+lib/linux16_module-cmdline.obj: lib/cmdline.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -MT lib/linux16_module-cmdline.obj -MD -MP -MF lib/$(DEPDIR)/linux16_module-cmdline.Tpo -c -o lib/linux16_module-cmdline.obj `if test -f 'lib/cmdline.c'; then $(CYGPATH_W) 'lib/cmdline.c'; else $(CYGPATH_W) '$(srcdir)/lib/cmdline.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/linux16_module-cmdline.Tpo lib/$(DEPDIR)/linux16_module-cmdline.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/cmdline.c' object='lib/linux16_module-cmdline.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $(linux16_module_CFLAGS) $(CFLAGS) -c -o lib/linux16_module-cmdline.obj `if test -f 'lib/cmdline.c'; then $(CYGPATH_W) 'lib/cmdline.c'; else $(CYGPATH_W) '$(srcdir)/lib/cmdline.c'; fi`
+
+commands/efi/loadbios_module-loadbios.o: commands/efi/loadbios.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $(loadbios_module_CFLAGS) $(CFLAGS) -MT commands/efi/loadbios_module-loadbios.o -MD -MP -MF commands/efi/$(DEPDIR)/loadbios_module-loadbios.Tpo -c -o commands/efi/loadbios_module-loadbios.o `test -f 'commands/efi/loadbios.c' || echo '$(srcdir)/'`commands/efi/loadbios.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/loadbios_module-loadbios.Tpo commands/efi/$(DEPDIR)/loadbios_module-loadbios.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/loadbios.c' object='commands/efi/loadbios_module-loadbios.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $(loadbios_module_CFLAGS) $(CFLAGS) -c -o commands/efi/loadbios_module-loadbios.o `test -f 'commands/efi/loadbios.c' || echo '$(srcdir)/'`commands/efi/loadbios.c
+
+commands/efi/loadbios_module-loadbios.obj: commands/efi/loadbios.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $(loadbios_module_CFLAGS) $(CFLAGS) -MT commands/efi/loadbios_module-loadbios.obj -MD -MP -MF commands/efi/$(DEPDIR)/loadbios_module-loadbios.Tpo -c -o commands/efi/loadbios_module-loadbios.obj `if test -f 'commands/efi/loadbios.c'; then $(CYGPATH_W) 'commands/efi/loadbios.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/loadbios.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/loadbios_module-loadbios.Tpo commands/efi/$(DEPDIR)/loadbios_module-loadbios.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/loadbios.c' object='commands/efi/loadbios_module-loadbios.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $(loadbios_module_CFLAGS) $(CFLAGS) -c -o commands/efi/loadbios_module-loadbios.obj `if test -f 'commands/efi/loadbios.c'; then $(CYGPATH_W) 'commands/efi/loadbios.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/loadbios.c'; fi`
+
+commands/loadenv_module-loadenv.o: commands/loadenv.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -MT commands/loadenv_module-loadenv.o -MD -MP -MF commands/$(DEPDIR)/loadenv_module-loadenv.Tpo -c -o commands/loadenv_module-loadenv.o `test -f 'commands/loadenv.c' || echo '$(srcdir)/'`commands/loadenv.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/loadenv_module-loadenv.Tpo commands/$(DEPDIR)/loadenv_module-loadenv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/loadenv.c' object='commands/loadenv_module-loadenv.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -c -o commands/loadenv_module-loadenv.o `test -f 'commands/loadenv.c' || echo '$(srcdir)/'`commands/loadenv.c
+
+commands/loadenv_module-loadenv.obj: commands/loadenv.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -MT commands/loadenv_module-loadenv.obj -MD -MP -MF commands/$(DEPDIR)/loadenv_module-loadenv.Tpo -c -o commands/loadenv_module-loadenv.obj `if test -f 'commands/loadenv.c'; then $(CYGPATH_W) 'commands/loadenv.c'; else $(CYGPATH_W) '$(srcdir)/commands/loadenv.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/loadenv_module-loadenv.Tpo commands/$(DEPDIR)/loadenv_module-loadenv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/loadenv.c' object='commands/loadenv_module-loadenv.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -c -o commands/loadenv_module-loadenv.obj `if test -f 'commands/loadenv.c'; then $(CYGPATH_W) 'commands/loadenv.c'; else $(CYGPATH_W) '$(srcdir)/commands/loadenv.c'; fi`
+
+lib/loadenv_module-envblk.o: lib/envblk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -MT lib/loadenv_module-envblk.o -MD -MP -MF lib/$(DEPDIR)/loadenv_module-envblk.Tpo -c -o lib/loadenv_module-envblk.o `test -f 'lib/envblk.c' || echo '$(srcdir)/'`lib/envblk.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/loadenv_module-envblk.Tpo lib/$(DEPDIR)/loadenv_module-envblk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/envblk.c' object='lib/loadenv_module-envblk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -c -o lib/loadenv_module-envblk.o `test -f 'lib/envblk.c' || echo '$(srcdir)/'`lib/envblk.c
+
+lib/loadenv_module-envblk.obj: lib/envblk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -MT lib/loadenv_module-envblk.obj -MD -MP -MF lib/$(DEPDIR)/loadenv_module-envblk.Tpo -c -o lib/loadenv_module-envblk.obj `if test -f 'lib/envblk.c'; then $(CYGPATH_W) 'lib/envblk.c'; else $(CYGPATH_W) '$(srcdir)/lib/envblk.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/loadenv_module-envblk.Tpo lib/$(DEPDIR)/loadenv_module-envblk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/envblk.c' object='lib/loadenv_module-envblk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $(loadenv_module_CFLAGS) $(CFLAGS) -c -o lib/loadenv_module-envblk.obj `if test -f 'lib/envblk.c'; then $(CYGPATH_W) 'lib/envblk.c'; else $(CYGPATH_W) '$(srcdir)/lib/envblk.c'; fi`
+
+disk/loopback_module-loopback.o: disk/loopback.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $(loopback_module_CFLAGS) $(CFLAGS) -MT disk/loopback_module-loopback.o -MD -MP -MF disk/$(DEPDIR)/loopback_module-loopback.Tpo -c -o disk/loopback_module-loopback.o `test -f 'disk/loopback.c' || echo '$(srcdir)/'`disk/loopback.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/loopback_module-loopback.Tpo disk/$(DEPDIR)/loopback_module-loopback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/loopback.c' object='disk/loopback_module-loopback.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $(loopback_module_CFLAGS) $(CFLAGS) -c -o disk/loopback_module-loopback.o `test -f 'disk/loopback.c' || echo '$(srcdir)/'`disk/loopback.c
+
+disk/loopback_module-loopback.obj: disk/loopback.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $(loopback_module_CFLAGS) $(CFLAGS) -MT disk/loopback_module-loopback.obj -MD -MP -MF disk/$(DEPDIR)/loopback_module-loopback.Tpo -c -o disk/loopback_module-loopback.obj `if test -f 'disk/loopback.c'; then $(CYGPATH_W) 'disk/loopback.c'; else $(CYGPATH_W) '$(srcdir)/disk/loopback.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/loopback_module-loopback.Tpo disk/$(DEPDIR)/loopback_module-loopback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/loopback.c' object='disk/loopback_module-loopback.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $(loopback_module_CFLAGS) $(CFLAGS) -c -o disk/loopback_module-loopback.obj `if test -f 'disk/loopback.c'; then $(CYGPATH_W) 'disk/loopback.c'; else $(CYGPATH_W) '$(srcdir)/disk/loopback.c'; fi`
+
+commands/ls_module-ls.o: commands/ls.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $(ls_module_CFLAGS) $(CFLAGS) -MT commands/ls_module-ls.o -MD -MP -MF commands/$(DEPDIR)/ls_module-ls.Tpo -c -o commands/ls_module-ls.o `test -f 'commands/ls.c' || echo '$(srcdir)/'`commands/ls.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/ls_module-ls.Tpo commands/$(DEPDIR)/ls_module-ls.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/ls.c' object='commands/ls_module-ls.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $(ls_module_CFLAGS) $(CFLAGS) -c -o commands/ls_module-ls.o `test -f 'commands/ls.c' || echo '$(srcdir)/'`commands/ls.c
+
+commands/ls_module-ls.obj: commands/ls.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $(ls_module_CFLAGS) $(CFLAGS) -MT commands/ls_module-ls.obj -MD -MP -MF commands/$(DEPDIR)/ls_module-ls.Tpo -c -o commands/ls_module-ls.obj `if test -f 'commands/ls.c'; then $(CYGPATH_W) 'commands/ls.c'; else $(CYGPATH_W) '$(srcdir)/commands/ls.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/ls_module-ls.Tpo commands/$(DEPDIR)/ls_module-ls.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/ls.c' object='commands/ls_module-ls.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $(ls_module_CFLAGS) $(CFLAGS) -c -o commands/ls_module-ls.obj `if test -f 'commands/ls.c'; then $(CYGPATH_W) 'commands/ls.c'; else $(CYGPATH_W) '$(srcdir)/commands/ls.c'; fi`
+
+commands/lsacpi_module-lsacpi.o: commands/lsacpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $(lsacpi_module_CFLAGS) $(CFLAGS) -MT commands/lsacpi_module-lsacpi.o -MD -MP -MF commands/$(DEPDIR)/lsacpi_module-lsacpi.Tpo -c -o commands/lsacpi_module-lsacpi.o `test -f 'commands/lsacpi.c' || echo '$(srcdir)/'`commands/lsacpi.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/lsacpi_module-lsacpi.Tpo commands/$(DEPDIR)/lsacpi_module-lsacpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lsacpi.c' object='commands/lsacpi_module-lsacpi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $(lsacpi_module_CFLAGS) $(CFLAGS) -c -o commands/lsacpi_module-lsacpi.o `test -f 'commands/lsacpi.c' || echo '$(srcdir)/'`commands/lsacpi.c
+
+commands/lsacpi_module-lsacpi.obj: commands/lsacpi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $(lsacpi_module_CFLAGS) $(CFLAGS) -MT commands/lsacpi_module-lsacpi.obj -MD -MP -MF commands/$(DEPDIR)/lsacpi_module-lsacpi.Tpo -c -o commands/lsacpi_module-lsacpi.obj `if test -f 'commands/lsacpi.c'; then $(CYGPATH_W) 'commands/lsacpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/lsacpi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/lsacpi_module-lsacpi.Tpo commands/$(DEPDIR)/lsacpi_module-lsacpi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lsacpi.c' object='commands/lsacpi_module-lsacpi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $(lsacpi_module_CFLAGS) $(CFLAGS) -c -o commands/lsacpi_module-lsacpi.obj `if test -f 'commands/lsacpi.c'; then $(CYGPATH_W) 'commands/lsacpi.c'; else $(CYGPATH_W) '$(srcdir)/commands/lsacpi.c'; fi`
+
+commands/i386/pc/lsapm_module-lsapm.o: commands/i386/pc/lsapm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsapm_module_CPPFLAGS) $(CPPFLAGS) $(lsapm_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/lsapm_module-lsapm.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/lsapm_module-lsapm.Tpo -c -o commands/i386/pc/lsapm_module-lsapm.o `test -f 'commands/i386/pc/lsapm.c' || echo '$(srcdir)/'`commands/i386/pc/lsapm.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/lsapm_module-lsapm.Tpo commands/i386/pc/$(DEPDIR)/lsapm_module-lsapm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/lsapm.c' object='commands/i386/pc/lsapm_module-lsapm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsapm_module_CPPFLAGS) $(CPPFLAGS) $(lsapm_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/lsapm_module-lsapm.o `test -f 'commands/i386/pc/lsapm.c' || echo '$(srcdir)/'`commands/i386/pc/lsapm.c
+
+commands/i386/pc/lsapm_module-lsapm.obj: commands/i386/pc/lsapm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsapm_module_CPPFLAGS) $(CPPFLAGS) $(lsapm_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/lsapm_module-lsapm.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/lsapm_module-lsapm.Tpo -c -o commands/i386/pc/lsapm_module-lsapm.obj `if test -f 'commands/i386/pc/lsapm.c'; then $(CYGPATH_W) 'commands/i386/pc/lsapm.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/lsapm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/lsapm_module-lsapm.Tpo commands/i386/pc/$(DEPDIR)/lsapm_module-lsapm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/lsapm.c' object='commands/i386/pc/lsapm_module-lsapm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsapm_module_CPPFLAGS) $(CPPFLAGS) $(lsapm_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/lsapm_module-lsapm.obj `if test -f 'commands/i386/pc/lsapm.c'; then $(CYGPATH_W) 'commands/i386/pc/lsapm.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/lsapm.c'; fi`
+
+commands/efi/lsefimmap_module-lsefimmap.o: commands/efi/lsefimmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $(lsefimmap_module_CFLAGS) $(CFLAGS) -MT commands/efi/lsefimmap_module-lsefimmap.o -MD -MP -MF commands/efi/$(DEPDIR)/lsefimmap_module-lsefimmap.Tpo -c -o commands/efi/lsefimmap_module-lsefimmap.o `test -f 'commands/efi/lsefimmap.c' || echo '$(srcdir)/'`commands/efi/lsefimmap.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/lsefimmap_module-lsefimmap.Tpo commands/efi/$(DEPDIR)/lsefimmap_module-lsefimmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/lsefimmap.c' object='commands/efi/lsefimmap_module-lsefimmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $(lsefimmap_module_CFLAGS) $(CFLAGS) -c -o commands/efi/lsefimmap_module-lsefimmap.o `test -f 'commands/efi/lsefimmap.c' || echo '$(srcdir)/'`commands/efi/lsefimmap.c
+
+commands/efi/lsefimmap_module-lsefimmap.obj: commands/efi/lsefimmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $(lsefimmap_module_CFLAGS) $(CFLAGS) -MT commands/efi/lsefimmap_module-lsefimmap.obj -MD -MP -MF commands/efi/$(DEPDIR)/lsefimmap_module-lsefimmap.Tpo -c -o commands/efi/lsefimmap_module-lsefimmap.obj `if test -f 'commands/efi/lsefimmap.c'; then $(CYGPATH_W) 'commands/efi/lsefimmap.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/lsefimmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/lsefimmap_module-lsefimmap.Tpo commands/efi/$(DEPDIR)/lsefimmap_module-lsefimmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/lsefimmap.c' object='commands/efi/lsefimmap_module-lsefimmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $(lsefimmap_module_CFLAGS) $(CFLAGS) -c -o commands/efi/lsefimmap_module-lsefimmap.obj `if test -f 'commands/efi/lsefimmap.c'; then $(CYGPATH_W) 'commands/efi/lsefimmap.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/lsefimmap.c'; fi`
+
+commands/efi/lsefisystab_module-lsefisystab.o: commands/efi/lsefisystab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $(lsefisystab_module_CFLAGS) $(CFLAGS) -MT commands/efi/lsefisystab_module-lsefisystab.o -MD -MP -MF commands/efi/$(DEPDIR)/lsefisystab_module-lsefisystab.Tpo -c -o commands/efi/lsefisystab_module-lsefisystab.o `test -f 'commands/efi/lsefisystab.c' || echo '$(srcdir)/'`commands/efi/lsefisystab.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/lsefisystab_module-lsefisystab.Tpo commands/efi/$(DEPDIR)/lsefisystab_module-lsefisystab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/lsefisystab.c' object='commands/efi/lsefisystab_module-lsefisystab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $(lsefisystab_module_CFLAGS) $(CFLAGS) -c -o commands/efi/lsefisystab_module-lsefisystab.o `test -f 'commands/efi/lsefisystab.c' || echo '$(srcdir)/'`commands/efi/lsefisystab.c
+
+commands/efi/lsefisystab_module-lsefisystab.obj: commands/efi/lsefisystab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $(lsefisystab_module_CFLAGS) $(CFLAGS) -MT commands/efi/lsefisystab_module-lsefisystab.obj -MD -MP -MF commands/efi/$(DEPDIR)/lsefisystab_module-lsefisystab.Tpo -c -o commands/efi/lsefisystab_module-lsefisystab.obj `if test -f 'commands/efi/lsefisystab.c'; then $(CYGPATH_W) 'commands/efi/lsefisystab.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/lsefisystab.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/lsefisystab_module-lsefisystab.Tpo commands/efi/$(DEPDIR)/lsefisystab_module-lsefisystab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/lsefisystab.c' object='commands/efi/lsefisystab_module-lsefisystab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $(lsefisystab_module_CFLAGS) $(CFLAGS) -c -o commands/efi/lsefisystab_module-lsefisystab.obj `if test -f 'commands/efi/lsefisystab.c'; then $(CYGPATH_W) 'commands/efi/lsefisystab.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/lsefisystab.c'; fi`
+
+commands/lsmmap_module-lsmmap.o: commands/lsmmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $(lsmmap_module_CFLAGS) $(CFLAGS) -MT commands/lsmmap_module-lsmmap.o -MD -MP -MF commands/$(DEPDIR)/lsmmap_module-lsmmap.Tpo -c -o commands/lsmmap_module-lsmmap.o `test -f 'commands/lsmmap.c' || echo '$(srcdir)/'`commands/lsmmap.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/lsmmap_module-lsmmap.Tpo commands/$(DEPDIR)/lsmmap_module-lsmmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lsmmap.c' object='commands/lsmmap_module-lsmmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $(lsmmap_module_CFLAGS) $(CFLAGS) -c -o commands/lsmmap_module-lsmmap.o `test -f 'commands/lsmmap.c' || echo '$(srcdir)/'`commands/lsmmap.c
+
+commands/lsmmap_module-lsmmap.obj: commands/lsmmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $(lsmmap_module_CFLAGS) $(CFLAGS) -MT commands/lsmmap_module-lsmmap.obj -MD -MP -MF commands/$(DEPDIR)/lsmmap_module-lsmmap.Tpo -c -o commands/lsmmap_module-lsmmap.obj `if test -f 'commands/lsmmap.c'; then $(CYGPATH_W) 'commands/lsmmap.c'; else $(CYGPATH_W) '$(srcdir)/commands/lsmmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/lsmmap_module-lsmmap.Tpo commands/$(DEPDIR)/lsmmap_module-lsmmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lsmmap.c' object='commands/lsmmap_module-lsmmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $(lsmmap_module_CFLAGS) $(CFLAGS) -c -o commands/lsmmap_module-lsmmap.obj `if test -f 'commands/lsmmap.c'; then $(CYGPATH_W) 'commands/lsmmap.c'; else $(CYGPATH_W) '$(srcdir)/commands/lsmmap.c'; fi`
+
+commands/lspci_module-lspci.o: commands/lspci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $(lspci_module_CFLAGS) $(CFLAGS) -MT commands/lspci_module-lspci.o -MD -MP -MF commands/$(DEPDIR)/lspci_module-lspci.Tpo -c -o commands/lspci_module-lspci.o `test -f 'commands/lspci.c' || echo '$(srcdir)/'`commands/lspci.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/lspci_module-lspci.Tpo commands/$(DEPDIR)/lspci_module-lspci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lspci.c' object='commands/lspci_module-lspci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $(lspci_module_CFLAGS) $(CFLAGS) -c -o commands/lspci_module-lspci.o `test -f 'commands/lspci.c' || echo '$(srcdir)/'`commands/lspci.c
+
+commands/lspci_module-lspci.obj: commands/lspci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $(lspci_module_CFLAGS) $(CFLAGS) -MT commands/lspci_module-lspci.obj -MD -MP -MF commands/$(DEPDIR)/lspci_module-lspci.Tpo -c -o commands/lspci_module-lspci.obj `if test -f 'commands/lspci.c'; then $(CYGPATH_W) 'commands/lspci.c'; else $(CYGPATH_W) '$(srcdir)/commands/lspci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/lspci_module-lspci.Tpo commands/$(DEPDIR)/lspci_module-lspci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lspci.c' object='commands/lspci_module-lspci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $(lspci_module_CFLAGS) $(CFLAGS) -c -o commands/lspci_module-lspci.obj `if test -f 'commands/lspci.c'; then $(CYGPATH_W) 'commands/lspci.c'; else $(CYGPATH_W) '$(srcdir)/commands/lspci.c'; fi`
+
+commands/efi/lssal_module-lssal.o: commands/efi/lssal.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $(lssal_module_CFLAGS) $(CFLAGS) -MT commands/efi/lssal_module-lssal.o -MD -MP -MF commands/efi/$(DEPDIR)/lssal_module-lssal.Tpo -c -o commands/efi/lssal_module-lssal.o `test -f 'commands/efi/lssal.c' || echo '$(srcdir)/'`commands/efi/lssal.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/lssal_module-lssal.Tpo commands/efi/$(DEPDIR)/lssal_module-lssal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/lssal.c' object='commands/efi/lssal_module-lssal.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $(lssal_module_CFLAGS) $(CFLAGS) -c -o commands/efi/lssal_module-lssal.o `test -f 'commands/efi/lssal.c' || echo '$(srcdir)/'`commands/efi/lssal.c
+
+commands/efi/lssal_module-lssal.obj: commands/efi/lssal.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $(lssal_module_CFLAGS) $(CFLAGS) -MT commands/efi/lssal_module-lssal.obj -MD -MP -MF commands/efi/$(DEPDIR)/lssal_module-lssal.Tpo -c -o commands/efi/lssal_module-lssal.obj `if test -f 'commands/efi/lssal.c'; then $(CYGPATH_W) 'commands/efi/lssal.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/lssal.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/efi/$(DEPDIR)/lssal_module-lssal.Tpo commands/efi/$(DEPDIR)/lssal_module-lssal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/efi/lssal.c' object='commands/efi/lssal_module-lssal.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $(lssal_module_CFLAGS) $(CFLAGS) -c -o commands/efi/lssal_module-lssal.obj `if test -f 'commands/efi/lssal.c'; then $(CYGPATH_W) 'commands/efi/lssal.c'; else $(CYGPATH_W) '$(srcdir)/commands/efi/lssal.c'; fi`
+
+commands/mips/yeeloong/lsspd_module-lsspd.o: commands/mips/yeeloong/lsspd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsspd_module_CPPFLAGS) $(CPPFLAGS) $(lsspd_module_CFLAGS) $(CFLAGS) -MT commands/mips/yeeloong/lsspd_module-lsspd.o -MD -MP -MF commands/mips/yeeloong/$(DEPDIR)/lsspd_module-lsspd.Tpo -c -o commands/mips/yeeloong/lsspd_module-lsspd.o `test -f 'commands/mips/yeeloong/lsspd.c' || echo '$(srcdir)/'`commands/mips/yeeloong/lsspd.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/mips/yeeloong/$(DEPDIR)/lsspd_module-lsspd.Tpo commands/mips/yeeloong/$(DEPDIR)/lsspd_module-lsspd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/mips/yeeloong/lsspd.c' object='commands/mips/yeeloong/lsspd_module-lsspd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsspd_module_CPPFLAGS) $(CPPFLAGS) $(lsspd_module_CFLAGS) $(CFLAGS) -c -o commands/mips/yeeloong/lsspd_module-lsspd.o `test -f 'commands/mips/yeeloong/lsspd.c' || echo '$(srcdir)/'`commands/mips/yeeloong/lsspd.c
+
+commands/mips/yeeloong/lsspd_module-lsspd.obj: commands/mips/yeeloong/lsspd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsspd_module_CPPFLAGS) $(CPPFLAGS) $(lsspd_module_CFLAGS) $(CFLAGS) -MT commands/mips/yeeloong/lsspd_module-lsspd.obj -MD -MP -MF commands/mips/yeeloong/$(DEPDIR)/lsspd_module-lsspd.Tpo -c -o commands/mips/yeeloong/lsspd_module-lsspd.obj `if test -f 'commands/mips/yeeloong/lsspd.c'; then $(CYGPATH_W) 'commands/mips/yeeloong/lsspd.c'; else $(CYGPATH_W) '$(srcdir)/commands/mips/yeeloong/lsspd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/mips/yeeloong/$(DEPDIR)/lsspd_module-lsspd.Tpo commands/mips/yeeloong/$(DEPDIR)/lsspd_module-lsspd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/mips/yeeloong/lsspd.c' object='commands/mips/yeeloong/lsspd_module-lsspd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsspd_module_CPPFLAGS) $(CPPFLAGS) $(lsspd_module_CFLAGS) $(CFLAGS) -c -o commands/mips/yeeloong/lsspd_module-lsspd.obj `if test -f 'commands/mips/yeeloong/lsspd.c'; then $(CYGPATH_W) 'commands/mips/yeeloong/lsspd.c'; else $(CYGPATH_W) '$(srcdir)/commands/mips/yeeloong/lsspd.c'; fi`
+
+disk/lvm_module-lvm.o: disk/lvm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $(lvm_module_CFLAGS) $(CFLAGS) -MT disk/lvm_module-lvm.o -MD -MP -MF disk/$(DEPDIR)/lvm_module-lvm.Tpo -c -o disk/lvm_module-lvm.o `test -f 'disk/lvm.c' || echo '$(srcdir)/'`disk/lvm.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/lvm_module-lvm.Tpo disk/$(DEPDIR)/lvm_module-lvm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/lvm.c' object='disk/lvm_module-lvm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $(lvm_module_CFLAGS) $(CFLAGS) -c -o disk/lvm_module-lvm.o `test -f 'disk/lvm.c' || echo '$(srcdir)/'`disk/lvm.c
+
+disk/lvm_module-lvm.obj: disk/lvm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $(lvm_module_CFLAGS) $(CFLAGS) -MT disk/lvm_module-lvm.obj -MD -MP -MF disk/$(DEPDIR)/lvm_module-lvm.Tpo -c -o disk/lvm_module-lvm.obj `if test -f 'disk/lvm.c'; then $(CYGPATH_W) 'disk/lvm.c'; else $(CYGPATH_W) '$(srcdir)/disk/lvm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/lvm_module-lvm.Tpo disk/$(DEPDIR)/lvm_module-lvm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/lvm.c' object='disk/lvm_module-lvm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $(lvm_module_CFLAGS) $(CFLAGS) -c -o disk/lvm_module-lvm.obj `if test -f 'disk/lvm.c'; then $(CYGPATH_W) 'disk/lvm.c'; else $(CYGPATH_W) '$(srcdir)/disk/lvm.c'; fi`
+
+disk/mdraid09_module-mdraid_linux.o: disk/mdraid_linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $(mdraid09_module_CFLAGS) $(CFLAGS) -MT disk/mdraid09_module-mdraid_linux.o -MD -MP -MF disk/$(DEPDIR)/mdraid09_module-mdraid_linux.Tpo -c -o disk/mdraid09_module-mdraid_linux.o `test -f 'disk/mdraid_linux.c' || echo '$(srcdir)/'`disk/mdraid_linux.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/mdraid09_module-mdraid_linux.Tpo disk/$(DEPDIR)/mdraid09_module-mdraid_linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/mdraid_linux.c' object='disk/mdraid09_module-mdraid_linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $(mdraid09_module_CFLAGS) $(CFLAGS) -c -o disk/mdraid09_module-mdraid_linux.o `test -f 'disk/mdraid_linux.c' || echo '$(srcdir)/'`disk/mdraid_linux.c
+
+disk/mdraid09_module-mdraid_linux.obj: disk/mdraid_linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $(mdraid09_module_CFLAGS) $(CFLAGS) -MT disk/mdraid09_module-mdraid_linux.obj -MD -MP -MF disk/$(DEPDIR)/mdraid09_module-mdraid_linux.Tpo -c -o disk/mdraid09_module-mdraid_linux.obj `if test -f 'disk/mdraid_linux.c'; then $(CYGPATH_W) 'disk/mdraid_linux.c'; else $(CYGPATH_W) '$(srcdir)/disk/mdraid_linux.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/mdraid09_module-mdraid_linux.Tpo disk/$(DEPDIR)/mdraid09_module-mdraid_linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/mdraid_linux.c' object='disk/mdraid09_module-mdraid_linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $(mdraid09_module_CFLAGS) $(CFLAGS) -c -o disk/mdraid09_module-mdraid_linux.obj `if test -f 'disk/mdraid_linux.c'; then $(CYGPATH_W) 'disk/mdraid_linux.c'; else $(CYGPATH_W) '$(srcdir)/disk/mdraid_linux.c'; fi`
+
+disk/mdraid1x_module-mdraid1x_linux.o: disk/mdraid1x_linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $(mdraid1x_module_CFLAGS) $(CFLAGS) -MT disk/mdraid1x_module-mdraid1x_linux.o -MD -MP -MF disk/$(DEPDIR)/mdraid1x_module-mdraid1x_linux.Tpo -c -o disk/mdraid1x_module-mdraid1x_linux.o `test -f 'disk/mdraid1x_linux.c' || echo '$(srcdir)/'`disk/mdraid1x_linux.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/mdraid1x_module-mdraid1x_linux.Tpo disk/$(DEPDIR)/mdraid1x_module-mdraid1x_linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/mdraid1x_linux.c' object='disk/mdraid1x_module-mdraid1x_linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $(mdraid1x_module_CFLAGS) $(CFLAGS) -c -o disk/mdraid1x_module-mdraid1x_linux.o `test -f 'disk/mdraid1x_linux.c' || echo '$(srcdir)/'`disk/mdraid1x_linux.c
+
+disk/mdraid1x_module-mdraid1x_linux.obj: disk/mdraid1x_linux.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $(mdraid1x_module_CFLAGS) $(CFLAGS) -MT disk/mdraid1x_module-mdraid1x_linux.obj -MD -MP -MF disk/$(DEPDIR)/mdraid1x_module-mdraid1x_linux.Tpo -c -o disk/mdraid1x_module-mdraid1x_linux.obj `if test -f 'disk/mdraid1x_linux.c'; then $(CYGPATH_W) 'disk/mdraid1x_linux.c'; else $(CYGPATH_W) '$(srcdir)/disk/mdraid1x_linux.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/mdraid1x_module-mdraid1x_linux.Tpo disk/$(DEPDIR)/mdraid1x_module-mdraid1x_linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/mdraid1x_linux.c' object='disk/mdraid1x_module-mdraid1x_linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $(mdraid1x_module_CFLAGS) $(CFLAGS) -c -o disk/mdraid1x_module-mdraid1x_linux.obj `if test -f 'disk/mdraid1x_linux.c'; then $(CYGPATH_W) 'disk/mdraid1x_linux.c'; else $(CYGPATH_W) '$(srcdir)/disk/mdraid1x_linux.c'; fi`
+
+disk/memdisk_module-memdisk.o: disk/memdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $(memdisk_module_CFLAGS) $(CFLAGS) -MT disk/memdisk_module-memdisk.o -MD -MP -MF disk/$(DEPDIR)/memdisk_module-memdisk.Tpo -c -o disk/memdisk_module-memdisk.o `test -f 'disk/memdisk.c' || echo '$(srcdir)/'`disk/memdisk.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/memdisk_module-memdisk.Tpo disk/$(DEPDIR)/memdisk_module-memdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/memdisk.c' object='disk/memdisk_module-memdisk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $(memdisk_module_CFLAGS) $(CFLAGS) -c -o disk/memdisk_module-memdisk.o `test -f 'disk/memdisk.c' || echo '$(srcdir)/'`disk/memdisk.c
+
+disk/memdisk_module-memdisk.obj: disk/memdisk.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $(memdisk_module_CFLAGS) $(CFLAGS) -MT disk/memdisk_module-memdisk.obj -MD -MP -MF disk/$(DEPDIR)/memdisk_module-memdisk.Tpo -c -o disk/memdisk_module-memdisk.obj `if test -f 'disk/memdisk.c'; then $(CYGPATH_W) 'disk/memdisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/memdisk.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/memdisk_module-memdisk.Tpo disk/$(DEPDIR)/memdisk_module-memdisk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/memdisk.c' object='disk/memdisk_module-memdisk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $(memdisk_module_CFLAGS) $(CFLAGS) -c -o disk/memdisk_module-memdisk.obj `if test -f 'disk/memdisk.c'; then $(CYGPATH_W) 'disk/memdisk.c'; else $(CYGPATH_W) '$(srcdir)/disk/memdisk.c'; fi`
+
+commands/memrw_module-memrw.o: commands/memrw.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $(memrw_module_CFLAGS) $(CFLAGS) -MT commands/memrw_module-memrw.o -MD -MP -MF commands/$(DEPDIR)/memrw_module-memrw.Tpo -c -o commands/memrw_module-memrw.o `test -f 'commands/memrw.c' || echo '$(srcdir)/'`commands/memrw.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/memrw_module-memrw.Tpo commands/$(DEPDIR)/memrw_module-memrw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/memrw.c' object='commands/memrw_module-memrw.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $(memrw_module_CFLAGS) $(CFLAGS) -c -o commands/memrw_module-memrw.o `test -f 'commands/memrw.c' || echo '$(srcdir)/'`commands/memrw.c
+
+commands/memrw_module-memrw.obj: commands/memrw.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $(memrw_module_CFLAGS) $(CFLAGS) -MT commands/memrw_module-memrw.obj -MD -MP -MF commands/$(DEPDIR)/memrw_module-memrw.Tpo -c -o commands/memrw_module-memrw.obj `if test -f 'commands/memrw.c'; then $(CYGPATH_W) 'commands/memrw.c'; else $(CYGPATH_W) '$(srcdir)/commands/memrw.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/memrw_module-memrw.Tpo commands/$(DEPDIR)/memrw_module-memrw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/memrw.c' object='commands/memrw_module-memrw.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $(memrw_module_CFLAGS) $(CFLAGS) -c -o commands/memrw_module-memrw.obj `if test -f 'commands/memrw.c'; then $(CYGPATH_W) 'commands/memrw.c'; else $(CYGPATH_W) '$(srcdir)/commands/memrw.c'; fi`
+
+commands/minicmd_module-minicmd.o: commands/minicmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $(minicmd_module_CFLAGS) $(CFLAGS) -MT commands/minicmd_module-minicmd.o -MD -MP -MF commands/$(DEPDIR)/minicmd_module-minicmd.Tpo -c -o commands/minicmd_module-minicmd.o `test -f 'commands/minicmd.c' || echo '$(srcdir)/'`commands/minicmd.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/minicmd_module-minicmd.Tpo commands/$(DEPDIR)/minicmd_module-minicmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/minicmd.c' object='commands/minicmd_module-minicmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $(minicmd_module_CFLAGS) $(CFLAGS) -c -o commands/minicmd_module-minicmd.o `test -f 'commands/minicmd.c' || echo '$(srcdir)/'`commands/minicmd.c
+
+commands/minicmd_module-minicmd.obj: commands/minicmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $(minicmd_module_CFLAGS) $(CFLAGS) -MT commands/minicmd_module-minicmd.obj -MD -MP -MF commands/$(DEPDIR)/minicmd_module-minicmd.Tpo -c -o commands/minicmd_module-minicmd.obj `if test -f 'commands/minicmd.c'; then $(CYGPATH_W) 'commands/minicmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/minicmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/minicmd_module-minicmd.Tpo commands/$(DEPDIR)/minicmd_module-minicmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/minicmd.c' object='commands/minicmd_module-minicmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $(minicmd_module_CFLAGS) $(CFLAGS) -c -o commands/minicmd_module-minicmd.obj `if test -f 'commands/minicmd.c'; then $(CYGPATH_W) 'commands/minicmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/minicmd.c'; fi`
+
+fs/minix_module-minix.o: fs/minix.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $(minix_module_CFLAGS) $(CFLAGS) -MT fs/minix_module-minix.o -MD -MP -MF fs/$(DEPDIR)/minix_module-minix.Tpo -c -o fs/minix_module-minix.o `test -f 'fs/minix.c' || echo '$(srcdir)/'`fs/minix.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/minix_module-minix.Tpo fs/$(DEPDIR)/minix_module-minix.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/minix.c' object='fs/minix_module-minix.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $(minix_module_CFLAGS) $(CFLAGS) -c -o fs/minix_module-minix.o `test -f 'fs/minix.c' || echo '$(srcdir)/'`fs/minix.c
+
+fs/minix_module-minix.obj: fs/minix.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $(minix_module_CFLAGS) $(CFLAGS) -MT fs/minix_module-minix.obj -MD -MP -MF fs/$(DEPDIR)/minix_module-minix.Tpo -c -o fs/minix_module-minix.obj `if test -f 'fs/minix.c'; then $(CYGPATH_W) 'fs/minix.c'; else $(CYGPATH_W) '$(srcdir)/fs/minix.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/minix_module-minix.Tpo fs/$(DEPDIR)/minix_module-minix.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/minix.c' object='fs/minix_module-minix.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $(minix_module_CFLAGS) $(CFLAGS) -c -o fs/minix_module-minix.obj `if test -f 'fs/minix.c'; then $(CYGPATH_W) 'fs/minix.c'; else $(CYGPATH_W) '$(srcdir)/fs/minix.c'; fi`
+
+fs/minix2_module-minix2.o: fs/minix2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $(minix2_module_CFLAGS) $(CFLAGS) -MT fs/minix2_module-minix2.o -MD -MP -MF fs/$(DEPDIR)/minix2_module-minix2.Tpo -c -o fs/minix2_module-minix2.o `test -f 'fs/minix2.c' || echo '$(srcdir)/'`fs/minix2.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/minix2_module-minix2.Tpo fs/$(DEPDIR)/minix2_module-minix2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/minix2.c' object='fs/minix2_module-minix2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $(minix2_module_CFLAGS) $(CFLAGS) -c -o fs/minix2_module-minix2.o `test -f 'fs/minix2.c' || echo '$(srcdir)/'`fs/minix2.c
+
+fs/minix2_module-minix2.obj: fs/minix2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $(minix2_module_CFLAGS) $(CFLAGS) -MT fs/minix2_module-minix2.obj -MD -MP -MF fs/$(DEPDIR)/minix2_module-minix2.Tpo -c -o fs/minix2_module-minix2.obj `if test -f 'fs/minix2.c'; then $(CYGPATH_W) 'fs/minix2.c'; else $(CYGPATH_W) '$(srcdir)/fs/minix2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/minix2_module-minix2.Tpo fs/$(DEPDIR)/minix2_module-minix2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/minix2.c' object='fs/minix2_module-minix2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $(minix2_module_CFLAGS) $(CFLAGS) -c -o fs/minix2_module-minix2.obj `if test -f 'fs/minix2.c'; then $(CYGPATH_W) 'fs/minix2.c'; else $(CYGPATH_W) '$(srcdir)/fs/minix2.c'; fi`
+
+mmap/i386/mmap_module-uppermem.o: mmap/i386/uppermem.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/i386/mmap_module-uppermem.o -MD -MP -MF mmap/i386/$(DEPDIR)/mmap_module-uppermem.Tpo -c -o mmap/i386/mmap_module-uppermem.o `test -f 'mmap/i386/uppermem.c' || echo '$(srcdir)/'`mmap/i386/uppermem.c
+@am__fastdepCC_TRUE@ $(am__mv) mmap/i386/$(DEPDIR)/mmap_module-uppermem.Tpo mmap/i386/$(DEPDIR)/mmap_module-uppermem.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/i386/uppermem.c' object='mmap/i386/mmap_module-uppermem.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/i386/mmap_module-uppermem.o `test -f 'mmap/i386/uppermem.c' || echo '$(srcdir)/'`mmap/i386/uppermem.c
+
+mmap/i386/mmap_module-uppermem.obj: mmap/i386/uppermem.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/i386/mmap_module-uppermem.obj -MD -MP -MF mmap/i386/$(DEPDIR)/mmap_module-uppermem.Tpo -c -o mmap/i386/mmap_module-uppermem.obj `if test -f 'mmap/i386/uppermem.c'; then $(CYGPATH_W) 'mmap/i386/uppermem.c'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/uppermem.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) mmap/i386/$(DEPDIR)/mmap_module-uppermem.Tpo mmap/i386/$(DEPDIR)/mmap_module-uppermem.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/i386/uppermem.c' object='mmap/i386/mmap_module-uppermem.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/i386/mmap_module-uppermem.obj `if test -f 'mmap/i386/uppermem.c'; then $(CYGPATH_W) 'mmap/i386/uppermem.c'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/uppermem.c'; fi`
+
+mmap/i386/mmap_module-mmap.o: mmap/i386/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/i386/mmap_module-mmap.o -MD -MP -MF mmap/i386/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/i386/mmap_module-mmap.o `test -f 'mmap/i386/mmap.c' || echo '$(srcdir)/'`mmap/i386/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) mmap/i386/$(DEPDIR)/mmap_module-mmap.Tpo mmap/i386/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/i386/mmap.c' object='mmap/i386/mmap_module-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/i386/mmap_module-mmap.o `test -f 'mmap/i386/mmap.c' || echo '$(srcdir)/'`mmap/i386/mmap.c
+
+mmap/i386/mmap_module-mmap.obj: mmap/i386/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/i386/mmap_module-mmap.obj -MD -MP -MF mmap/i386/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/i386/mmap_module-mmap.obj `if test -f 'mmap/i386/mmap.c'; then $(CYGPATH_W) 'mmap/i386/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) mmap/i386/$(DEPDIR)/mmap_module-mmap.Tpo mmap/i386/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/i386/mmap.c' object='mmap/i386/mmap_module-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/i386/mmap_module-mmap.obj `if test -f 'mmap/i386/mmap.c'; then $(CYGPATH_W) 'mmap/i386/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/mmap.c'; fi`
+
+mmap/mmap_module-mmap.o: mmap/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/mmap_module-mmap.o -MD -MP -MF mmap/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/mmap_module-mmap.o `test -f 'mmap/mmap.c' || echo '$(srcdir)/'`mmap/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) mmap/$(DEPDIR)/mmap_module-mmap.Tpo mmap/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/mmap.c' object='mmap/mmap_module-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/mmap_module-mmap.o `test -f 'mmap/mmap.c' || echo '$(srcdir)/'`mmap/mmap.c
+
+mmap/mmap_module-mmap.obj: mmap/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/mmap_module-mmap.obj -MD -MP -MF mmap/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/mmap_module-mmap.obj `if test -f 'mmap/mmap.c'; then $(CYGPATH_W) 'mmap/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) mmap/$(DEPDIR)/mmap_module-mmap.Tpo mmap/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/mmap.c' object='mmap/mmap_module-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/mmap_module-mmap.obj `if test -f 'mmap/mmap.c'; then $(CYGPATH_W) 'mmap/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/mmap.c'; fi`
+
+mmap/efi/mmap_module-mmap.o: mmap/efi/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/efi/mmap_module-mmap.o -MD -MP -MF mmap/efi/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/efi/mmap_module-mmap.o `test -f 'mmap/efi/mmap.c' || echo '$(srcdir)/'`mmap/efi/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) mmap/efi/$(DEPDIR)/mmap_module-mmap.Tpo mmap/efi/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/efi/mmap.c' object='mmap/efi/mmap_module-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/efi/mmap_module-mmap.o `test -f 'mmap/efi/mmap.c' || echo '$(srcdir)/'`mmap/efi/mmap.c
+
+mmap/efi/mmap_module-mmap.obj: mmap/efi/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/efi/mmap_module-mmap.obj -MD -MP -MF mmap/efi/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/efi/mmap_module-mmap.obj `if test -f 'mmap/efi/mmap.c'; then $(CYGPATH_W) 'mmap/efi/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/efi/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) mmap/efi/$(DEPDIR)/mmap_module-mmap.Tpo mmap/efi/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/efi/mmap.c' object='mmap/efi/mmap_module-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/efi/mmap_module-mmap.obj `if test -f 'mmap/efi/mmap.c'; then $(CYGPATH_W) 'mmap/efi/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/efi/mmap.c'; fi`
+
+mmap/i386/pc/mmap_module-mmap.o: mmap/i386/pc/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/i386/pc/mmap_module-mmap.o -MD -MP -MF mmap/i386/pc/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/i386/pc/mmap_module-mmap.o `test -f 'mmap/i386/pc/mmap.c' || echo '$(srcdir)/'`mmap/i386/pc/mmap.c
+@am__fastdepCC_TRUE@ $(am__mv) mmap/i386/pc/$(DEPDIR)/mmap_module-mmap.Tpo mmap/i386/pc/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/i386/pc/mmap.c' object='mmap/i386/pc/mmap_module-mmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/i386/pc/mmap_module-mmap.o `test -f 'mmap/i386/pc/mmap.c' || echo '$(srcdir)/'`mmap/i386/pc/mmap.c
+
+mmap/i386/pc/mmap_module-mmap.obj: mmap/i386/pc/mmap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/i386/pc/mmap_module-mmap.obj -MD -MP -MF mmap/i386/pc/$(DEPDIR)/mmap_module-mmap.Tpo -c -o mmap/i386/pc/mmap_module-mmap.obj `if test -f 'mmap/i386/pc/mmap.c'; then $(CYGPATH_W) 'mmap/i386/pc/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/pc/mmap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) mmap/i386/pc/$(DEPDIR)/mmap_module-mmap.Tpo mmap/i386/pc/$(DEPDIR)/mmap_module-mmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/i386/pc/mmap.c' object='mmap/i386/pc/mmap_module-mmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/i386/pc/mmap_module-mmap.obj `if test -f 'mmap/i386/pc/mmap.c'; then $(CYGPATH_W) 'mmap/i386/pc/mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap/i386/pc/mmap.c'; fi`
+
+mmap/mips/yeeloong/mmap_module-uppermem.o: mmap/mips/yeeloong/uppermem.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/mips/yeeloong/mmap_module-uppermem.o -MD -MP -MF mmap/mips/yeeloong/$(DEPDIR)/mmap_module-uppermem.Tpo -c -o mmap/mips/yeeloong/mmap_module-uppermem.o `test -f 'mmap/mips/yeeloong/uppermem.c' || echo '$(srcdir)/'`mmap/mips/yeeloong/uppermem.c
+@am__fastdepCC_TRUE@ $(am__mv) mmap/mips/yeeloong/$(DEPDIR)/mmap_module-uppermem.Tpo mmap/mips/yeeloong/$(DEPDIR)/mmap_module-uppermem.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/mips/yeeloong/uppermem.c' object='mmap/mips/yeeloong/mmap_module-uppermem.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/mips/yeeloong/mmap_module-uppermem.o `test -f 'mmap/mips/yeeloong/uppermem.c' || echo '$(srcdir)/'`mmap/mips/yeeloong/uppermem.c
+
+mmap/mips/yeeloong/mmap_module-uppermem.obj: mmap/mips/yeeloong/uppermem.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -MT mmap/mips/yeeloong/mmap_module-uppermem.obj -MD -MP -MF mmap/mips/yeeloong/$(DEPDIR)/mmap_module-uppermem.Tpo -c -o mmap/mips/yeeloong/mmap_module-uppermem.obj `if test -f 'mmap/mips/yeeloong/uppermem.c'; then $(CYGPATH_W) 'mmap/mips/yeeloong/uppermem.c'; else $(CYGPATH_W) '$(srcdir)/mmap/mips/yeeloong/uppermem.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) mmap/mips/yeeloong/$(DEPDIR)/mmap_module-uppermem.Tpo mmap/mips/yeeloong/$(DEPDIR)/mmap_module-uppermem.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mmap/mips/yeeloong/uppermem.c' object='mmap/mips/yeeloong/mmap_module-uppermem.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $(mmap_module_CFLAGS) $(CFLAGS) -c -o mmap/mips/yeeloong/mmap_module-uppermem.obj `if test -f 'mmap/mips/yeeloong/uppermem.c'; then $(CYGPATH_W) 'mmap/mips/yeeloong/uppermem.c'; else $(CYGPATH_W) '$(srcdir)/mmap/mips/yeeloong/uppermem.c'; fi`
+
+parttool/msdospart_module-msdospart.o: parttool/msdospart.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $(msdospart_module_CFLAGS) $(CFLAGS) -MT parttool/msdospart_module-msdospart.o -MD -MP -MF parttool/$(DEPDIR)/msdospart_module-msdospart.Tpo -c -o parttool/msdospart_module-msdospart.o `test -f 'parttool/msdospart.c' || echo '$(srcdir)/'`parttool/msdospart.c
+@am__fastdepCC_TRUE@ $(am__mv) parttool/$(DEPDIR)/msdospart_module-msdospart.Tpo parttool/$(DEPDIR)/msdospart_module-msdospart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parttool/msdospart.c' object='parttool/msdospart_module-msdospart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $(msdospart_module_CFLAGS) $(CFLAGS) -c -o parttool/msdospart_module-msdospart.o `test -f 'parttool/msdospart.c' || echo '$(srcdir)/'`parttool/msdospart.c
+
+parttool/msdospart_module-msdospart.obj: parttool/msdospart.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $(msdospart_module_CFLAGS) $(CFLAGS) -MT parttool/msdospart_module-msdospart.obj -MD -MP -MF parttool/$(DEPDIR)/msdospart_module-msdospart.Tpo -c -o parttool/msdospart_module-msdospart.obj `if test -f 'parttool/msdospart.c'; then $(CYGPATH_W) 'parttool/msdospart.c'; else $(CYGPATH_W) '$(srcdir)/parttool/msdospart.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) parttool/$(DEPDIR)/msdospart_module-msdospart.Tpo parttool/$(DEPDIR)/msdospart_module-msdospart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parttool/msdospart.c' object='parttool/msdospart_module-msdospart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $(msdospart_module_CFLAGS) $(CFLAGS) -c -o parttool/msdospart_module-msdospart.obj `if test -f 'parttool/msdospart.c'; then $(CYGPATH_W) 'parttool/msdospart.c'; else $(CYGPATH_W) '$(srcdir)/parttool/msdospart.c'; fi`
+
+loader/i386/multiboot_module-multiboot_mbi.o: loader/i386/multiboot_mbi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -MT loader/i386/multiboot_module-multiboot_mbi.o -MD -MP -MF loader/i386/$(DEPDIR)/multiboot_module-multiboot_mbi.Tpo -c -o loader/i386/multiboot_module-multiboot_mbi.o `test -f 'loader/i386/multiboot_mbi.c' || echo '$(srcdir)/'`loader/i386/multiboot_mbi.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/multiboot_module-multiboot_mbi.Tpo loader/i386/$(DEPDIR)/multiboot_module-multiboot_mbi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/multiboot_mbi.c' object='loader/i386/multiboot_module-multiboot_mbi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -c -o loader/i386/multiboot_module-multiboot_mbi.o `test -f 'loader/i386/multiboot_mbi.c' || echo '$(srcdir)/'`loader/i386/multiboot_mbi.c
+
+loader/i386/multiboot_module-multiboot_mbi.obj: loader/i386/multiboot_mbi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -MT loader/i386/multiboot_module-multiboot_mbi.obj -MD -MP -MF loader/i386/$(DEPDIR)/multiboot_module-multiboot_mbi.Tpo -c -o loader/i386/multiboot_module-multiboot_mbi.obj `if test -f 'loader/i386/multiboot_mbi.c'; then $(CYGPATH_W) 'loader/i386/multiboot_mbi.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/multiboot_mbi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/multiboot_module-multiboot_mbi.Tpo loader/i386/$(DEPDIR)/multiboot_module-multiboot_mbi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/multiboot_mbi.c' object='loader/i386/multiboot_module-multiboot_mbi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -c -o loader/i386/multiboot_module-multiboot_mbi.obj `if test -f 'loader/i386/multiboot_mbi.c'; then $(CYGPATH_W) 'loader/i386/multiboot_mbi.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/multiboot_mbi.c'; fi`
+
+loader/multiboot_module-multiboot.o: loader/multiboot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -MT loader/multiboot_module-multiboot.o -MD -MP -MF loader/$(DEPDIR)/multiboot_module-multiboot.Tpo -c -o loader/multiboot_module-multiboot.o `test -f 'loader/multiboot.c' || echo '$(srcdir)/'`loader/multiboot.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/multiboot_module-multiboot.Tpo loader/$(DEPDIR)/multiboot_module-multiboot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/multiboot.c' object='loader/multiboot_module-multiboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -c -o loader/multiboot_module-multiboot.o `test -f 'loader/multiboot.c' || echo '$(srcdir)/'`loader/multiboot.c
+
+loader/multiboot_module-multiboot.obj: loader/multiboot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -MT loader/multiboot_module-multiboot.obj -MD -MP -MF loader/$(DEPDIR)/multiboot_module-multiboot.Tpo -c -o loader/multiboot_module-multiboot.obj `if test -f 'loader/multiboot.c'; then $(CYGPATH_W) 'loader/multiboot.c'; else $(CYGPATH_W) '$(srcdir)/loader/multiboot.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/multiboot_module-multiboot.Tpo loader/$(DEPDIR)/multiboot_module-multiboot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/multiboot.c' object='loader/multiboot_module-multiboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $(multiboot_module_CFLAGS) $(CFLAGS) -c -o loader/multiboot_module-multiboot.obj `if test -f 'loader/multiboot.c'; then $(CYGPATH_W) 'loader/multiboot.c'; else $(CYGPATH_W) '$(srcdir)/loader/multiboot.c'; fi`
+
+loader/multiboot2_module-multiboot.o: loader/multiboot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -MT loader/multiboot2_module-multiboot.o -MD -MP -MF loader/$(DEPDIR)/multiboot2_module-multiboot.Tpo -c -o loader/multiboot2_module-multiboot.o `test -f 'loader/multiboot.c' || echo '$(srcdir)/'`loader/multiboot.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/multiboot2_module-multiboot.Tpo loader/$(DEPDIR)/multiboot2_module-multiboot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/multiboot.c' object='loader/multiboot2_module-multiboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -c -o loader/multiboot2_module-multiboot.o `test -f 'loader/multiboot.c' || echo '$(srcdir)/'`loader/multiboot.c
+
+loader/multiboot2_module-multiboot.obj: loader/multiboot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -MT loader/multiboot2_module-multiboot.obj -MD -MP -MF loader/$(DEPDIR)/multiboot2_module-multiboot.Tpo -c -o loader/multiboot2_module-multiboot.obj `if test -f 'loader/multiboot.c'; then $(CYGPATH_W) 'loader/multiboot.c'; else $(CYGPATH_W) '$(srcdir)/loader/multiboot.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/multiboot2_module-multiboot.Tpo loader/$(DEPDIR)/multiboot2_module-multiboot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/multiboot.c' object='loader/multiboot2_module-multiboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -c -o loader/multiboot2_module-multiboot.obj `if test -f 'loader/multiboot.c'; then $(CYGPATH_W) 'loader/multiboot.c'; else $(CYGPATH_W) '$(srcdir)/loader/multiboot.c'; fi`
+
+loader/multiboot2_module-multiboot_mbi2.o: loader/multiboot_mbi2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -MT loader/multiboot2_module-multiboot_mbi2.o -MD -MP -MF loader/$(DEPDIR)/multiboot2_module-multiboot_mbi2.Tpo -c -o loader/multiboot2_module-multiboot_mbi2.o `test -f 'loader/multiboot_mbi2.c' || echo '$(srcdir)/'`loader/multiboot_mbi2.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/multiboot2_module-multiboot_mbi2.Tpo loader/$(DEPDIR)/multiboot2_module-multiboot_mbi2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/multiboot_mbi2.c' object='loader/multiboot2_module-multiboot_mbi2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -c -o loader/multiboot2_module-multiboot_mbi2.o `test -f 'loader/multiboot_mbi2.c' || echo '$(srcdir)/'`loader/multiboot_mbi2.c
+
+loader/multiboot2_module-multiboot_mbi2.obj: loader/multiboot_mbi2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -MT loader/multiboot2_module-multiboot_mbi2.obj -MD -MP -MF loader/$(DEPDIR)/multiboot2_module-multiboot_mbi2.Tpo -c -o loader/multiboot2_module-multiboot_mbi2.obj `if test -f 'loader/multiboot_mbi2.c'; then $(CYGPATH_W) 'loader/multiboot_mbi2.c'; else $(CYGPATH_W) '$(srcdir)/loader/multiboot_mbi2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/multiboot2_module-multiboot_mbi2.Tpo loader/$(DEPDIR)/multiboot2_module-multiboot_mbi2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/multiboot_mbi2.c' object='loader/multiboot2_module-multiboot_mbi2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $(multiboot2_module_CFLAGS) $(CFLAGS) -c -o loader/multiboot2_module-multiboot_mbi2.obj `if test -f 'loader/multiboot_mbi2.c'; then $(CYGPATH_W) 'loader/multiboot_mbi2.c'; else $(CYGPATH_W) '$(srcdir)/loader/multiboot_mbi2.c'; fi`
+
+disk/ieee1275/nand_module-nand.o: disk/ieee1275/nand.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nand_module_CPPFLAGS) $(CPPFLAGS) $(nand_module_CFLAGS) $(CFLAGS) -MT disk/ieee1275/nand_module-nand.o -MD -MP -MF disk/ieee1275/$(DEPDIR)/nand_module-nand.Tpo -c -o disk/ieee1275/nand_module-nand.o `test -f 'disk/ieee1275/nand.c' || echo '$(srcdir)/'`disk/ieee1275/nand.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/ieee1275/$(DEPDIR)/nand_module-nand.Tpo disk/ieee1275/$(DEPDIR)/nand_module-nand.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ieee1275/nand.c' object='disk/ieee1275/nand_module-nand.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nand_module_CPPFLAGS) $(CPPFLAGS) $(nand_module_CFLAGS) $(CFLAGS) -c -o disk/ieee1275/nand_module-nand.o `test -f 'disk/ieee1275/nand.c' || echo '$(srcdir)/'`disk/ieee1275/nand.c
+
+disk/ieee1275/nand_module-nand.obj: disk/ieee1275/nand.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nand_module_CPPFLAGS) $(CPPFLAGS) $(nand_module_CFLAGS) $(CFLAGS) -MT disk/ieee1275/nand_module-nand.obj -MD -MP -MF disk/ieee1275/$(DEPDIR)/nand_module-nand.Tpo -c -o disk/ieee1275/nand_module-nand.obj `if test -f 'disk/ieee1275/nand.c'; then $(CYGPATH_W) 'disk/ieee1275/nand.c'; else $(CYGPATH_W) '$(srcdir)/disk/ieee1275/nand.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/ieee1275/$(DEPDIR)/nand_module-nand.Tpo disk/ieee1275/$(DEPDIR)/nand_module-nand.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/ieee1275/nand.c' object='disk/ieee1275/nand_module-nand.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nand_module_CPPFLAGS) $(CPPFLAGS) $(nand_module_CFLAGS) $(CFLAGS) -c -o disk/ieee1275/nand_module-nand.obj `if test -f 'disk/ieee1275/nand.c'; then $(CYGPATH_W) 'disk/ieee1275/nand.c'; else $(CYGPATH_W) '$(srcdir)/disk/ieee1275/nand.c'; fi`
+
+fs/nilfs2_module-nilfs2.o: fs/nilfs2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $(nilfs2_module_CFLAGS) $(CFLAGS) -MT fs/nilfs2_module-nilfs2.o -MD -MP -MF fs/$(DEPDIR)/nilfs2_module-nilfs2.Tpo -c -o fs/nilfs2_module-nilfs2.o `test -f 'fs/nilfs2.c' || echo '$(srcdir)/'`fs/nilfs2.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/nilfs2_module-nilfs2.Tpo fs/$(DEPDIR)/nilfs2_module-nilfs2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/nilfs2.c' object='fs/nilfs2_module-nilfs2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $(nilfs2_module_CFLAGS) $(CFLAGS) -c -o fs/nilfs2_module-nilfs2.o `test -f 'fs/nilfs2.c' || echo '$(srcdir)/'`fs/nilfs2.c
+
+fs/nilfs2_module-nilfs2.obj: fs/nilfs2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $(nilfs2_module_CFLAGS) $(CFLAGS) -MT fs/nilfs2_module-nilfs2.obj -MD -MP -MF fs/$(DEPDIR)/nilfs2_module-nilfs2.Tpo -c -o fs/nilfs2_module-nilfs2.obj `if test -f 'fs/nilfs2.c'; then $(CYGPATH_W) 'fs/nilfs2.c'; else $(CYGPATH_W) '$(srcdir)/fs/nilfs2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/nilfs2_module-nilfs2.Tpo fs/$(DEPDIR)/nilfs2_module-nilfs2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/nilfs2.c' object='fs/nilfs2_module-nilfs2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $(nilfs2_module_CFLAGS) $(CFLAGS) -c -o fs/nilfs2_module-nilfs2.obj `if test -f 'fs/nilfs2.c'; then $(CYGPATH_W) 'fs/nilfs2.c'; else $(CYGPATH_W) '$(srcdir)/fs/nilfs2.c'; fi`
+
+boot/decompressor/none_decompress_image-none.o: boot/decompressor/none.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CFLAGS) $(CFLAGS) -MT boot/decompressor/none_decompress_image-none.o -MD -MP -MF boot/decompressor/$(DEPDIR)/none_decompress_image-none.Tpo -c -o boot/decompressor/none_decompress_image-none.o `test -f 'boot/decompressor/none.c' || echo '$(srcdir)/'`boot/decompressor/none.c
+@am__fastdepCC_TRUE@ $(am__mv) boot/decompressor/$(DEPDIR)/none_decompress_image-none.Tpo boot/decompressor/$(DEPDIR)/none_decompress_image-none.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='boot/decompressor/none.c' object='boot/decompressor/none_decompress_image-none.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CFLAGS) $(CFLAGS) -c -o boot/decompressor/none_decompress_image-none.o `test -f 'boot/decompressor/none.c' || echo '$(srcdir)/'`boot/decompressor/none.c
+
+boot/decompressor/none_decompress_image-none.obj: boot/decompressor/none.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CFLAGS) $(CFLAGS) -MT boot/decompressor/none_decompress_image-none.obj -MD -MP -MF boot/decompressor/$(DEPDIR)/none_decompress_image-none.Tpo -c -o boot/decompressor/none_decompress_image-none.obj `if test -f 'boot/decompressor/none.c'; then $(CYGPATH_W) 'boot/decompressor/none.c'; else $(CYGPATH_W) '$(srcdir)/boot/decompressor/none.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) boot/decompressor/$(DEPDIR)/none_decompress_image-none.Tpo boot/decompressor/$(DEPDIR)/none_decompress_image-none.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='boot/decompressor/none.c' object='boot/decompressor/none_decompress_image-none.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(none_decompress_image_CPPFLAGS) $(CPPFLAGS) $(none_decompress_image_CFLAGS) $(CFLAGS) -c -o boot/decompressor/none_decompress_image-none.obj `if test -f 'boot/decompressor/none.c'; then $(CYGPATH_W) 'boot/decompressor/none.c'; else $(CYGPATH_W) '$(srcdir)/boot/decompressor/none.c'; fi`
+
+normal/normal_module-main.o: normal/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-main.o -MD -MP -MF normal/$(DEPDIR)/normal_module-main.Tpo -c -o normal/normal_module-main.o `test -f 'normal/main.c' || echo '$(srcdir)/'`normal/main.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-main.Tpo normal/$(DEPDIR)/normal_module-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/main.c' object='normal/normal_module-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-main.o `test -f 'normal/main.c' || echo '$(srcdir)/'`normal/main.c
+
+normal/normal_module-main.obj: normal/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-main.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-main.Tpo -c -o normal/normal_module-main.obj `if test -f 'normal/main.c'; then $(CYGPATH_W) 'normal/main.c'; else $(CYGPATH_W) '$(srcdir)/normal/main.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-main.Tpo normal/$(DEPDIR)/normal_module-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/main.c' object='normal/normal_module-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-main.obj `if test -f 'normal/main.c'; then $(CYGPATH_W) 'normal/main.c'; else $(CYGPATH_W) '$(srcdir)/normal/main.c'; fi`
+
+normal/normal_module-cmdline.o: normal/cmdline.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-cmdline.o -MD -MP -MF normal/$(DEPDIR)/normal_module-cmdline.Tpo -c -o normal/normal_module-cmdline.o `test -f 'normal/cmdline.c' || echo '$(srcdir)/'`normal/cmdline.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-cmdline.Tpo normal/$(DEPDIR)/normal_module-cmdline.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/cmdline.c' object='normal/normal_module-cmdline.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-cmdline.o `test -f 'normal/cmdline.c' || echo '$(srcdir)/'`normal/cmdline.c
+
+normal/normal_module-cmdline.obj: normal/cmdline.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-cmdline.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-cmdline.Tpo -c -o normal/normal_module-cmdline.obj `if test -f 'normal/cmdline.c'; then $(CYGPATH_W) 'normal/cmdline.c'; else $(CYGPATH_W) '$(srcdir)/normal/cmdline.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-cmdline.Tpo normal/$(DEPDIR)/normal_module-cmdline.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/cmdline.c' object='normal/normal_module-cmdline.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-cmdline.obj `if test -f 'normal/cmdline.c'; then $(CYGPATH_W) 'normal/cmdline.c'; else $(CYGPATH_W) '$(srcdir)/normal/cmdline.c'; fi`
+
+normal/normal_module-dyncmd.o: normal/dyncmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-dyncmd.o -MD -MP -MF normal/$(DEPDIR)/normal_module-dyncmd.Tpo -c -o normal/normal_module-dyncmd.o `test -f 'normal/dyncmd.c' || echo '$(srcdir)/'`normal/dyncmd.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-dyncmd.Tpo normal/$(DEPDIR)/normal_module-dyncmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/dyncmd.c' object='normal/normal_module-dyncmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-dyncmd.o `test -f 'normal/dyncmd.c' || echo '$(srcdir)/'`normal/dyncmd.c
+
+normal/normal_module-dyncmd.obj: normal/dyncmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-dyncmd.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-dyncmd.Tpo -c -o normal/normal_module-dyncmd.obj `if test -f 'normal/dyncmd.c'; then $(CYGPATH_W) 'normal/dyncmd.c'; else $(CYGPATH_W) '$(srcdir)/normal/dyncmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-dyncmd.Tpo normal/$(DEPDIR)/normal_module-dyncmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/dyncmd.c' object='normal/normal_module-dyncmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-dyncmd.obj `if test -f 'normal/dyncmd.c'; then $(CYGPATH_W) 'normal/dyncmd.c'; else $(CYGPATH_W) '$(srcdir)/normal/dyncmd.c'; fi`
+
+normal/normal_module-auth.o: normal/auth.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-auth.o -MD -MP -MF normal/$(DEPDIR)/normal_module-auth.Tpo -c -o normal/normal_module-auth.o `test -f 'normal/auth.c' || echo '$(srcdir)/'`normal/auth.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-auth.Tpo normal/$(DEPDIR)/normal_module-auth.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/auth.c' object='normal/normal_module-auth.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-auth.o `test -f 'normal/auth.c' || echo '$(srcdir)/'`normal/auth.c
+
+normal/normal_module-auth.obj: normal/auth.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-auth.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-auth.Tpo -c -o normal/normal_module-auth.obj `if test -f 'normal/auth.c'; then $(CYGPATH_W) 'normal/auth.c'; else $(CYGPATH_W) '$(srcdir)/normal/auth.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-auth.Tpo normal/$(DEPDIR)/normal_module-auth.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/auth.c' object='normal/normal_module-auth.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-auth.obj `if test -f 'normal/auth.c'; then $(CYGPATH_W) 'normal/auth.c'; else $(CYGPATH_W) '$(srcdir)/normal/auth.c'; fi`
+
+normal/normal_module-autofs.o: normal/autofs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-autofs.o -MD -MP -MF normal/$(DEPDIR)/normal_module-autofs.Tpo -c -o normal/normal_module-autofs.o `test -f 'normal/autofs.c' || echo '$(srcdir)/'`normal/autofs.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-autofs.Tpo normal/$(DEPDIR)/normal_module-autofs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/autofs.c' object='normal/normal_module-autofs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-autofs.o `test -f 'normal/autofs.c' || echo '$(srcdir)/'`normal/autofs.c
+
+normal/normal_module-autofs.obj: normal/autofs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-autofs.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-autofs.Tpo -c -o normal/normal_module-autofs.obj `if test -f 'normal/autofs.c'; then $(CYGPATH_W) 'normal/autofs.c'; else $(CYGPATH_W) '$(srcdir)/normal/autofs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-autofs.Tpo normal/$(DEPDIR)/normal_module-autofs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/autofs.c' object='normal/normal_module-autofs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-autofs.obj `if test -f 'normal/autofs.c'; then $(CYGPATH_W) 'normal/autofs.c'; else $(CYGPATH_W) '$(srcdir)/normal/autofs.c'; fi`
+
+normal/normal_module-color.o: normal/color.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-color.o -MD -MP -MF normal/$(DEPDIR)/normal_module-color.Tpo -c -o normal/normal_module-color.o `test -f 'normal/color.c' || echo '$(srcdir)/'`normal/color.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-color.Tpo normal/$(DEPDIR)/normal_module-color.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/color.c' object='normal/normal_module-color.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-color.o `test -f 'normal/color.c' || echo '$(srcdir)/'`normal/color.c
+
+normal/normal_module-color.obj: normal/color.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-color.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-color.Tpo -c -o normal/normal_module-color.obj `if test -f 'normal/color.c'; then $(CYGPATH_W) 'normal/color.c'; else $(CYGPATH_W) '$(srcdir)/normal/color.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-color.Tpo normal/$(DEPDIR)/normal_module-color.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/color.c' object='normal/normal_module-color.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-color.obj `if test -f 'normal/color.c'; then $(CYGPATH_W) 'normal/color.c'; else $(CYGPATH_W) '$(srcdir)/normal/color.c'; fi`
+
+normal/normal_module-completion.o: normal/completion.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-completion.o -MD -MP -MF normal/$(DEPDIR)/normal_module-completion.Tpo -c -o normal/normal_module-completion.o `test -f 'normal/completion.c' || echo '$(srcdir)/'`normal/completion.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-completion.Tpo normal/$(DEPDIR)/normal_module-completion.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/completion.c' object='normal/normal_module-completion.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-completion.o `test -f 'normal/completion.c' || echo '$(srcdir)/'`normal/completion.c
+
+normal/normal_module-completion.obj: normal/completion.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-completion.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-completion.Tpo -c -o normal/normal_module-completion.obj `if test -f 'normal/completion.c'; then $(CYGPATH_W) 'normal/completion.c'; else $(CYGPATH_W) '$(srcdir)/normal/completion.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-completion.Tpo normal/$(DEPDIR)/normal_module-completion.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/completion.c' object='normal/normal_module-completion.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-completion.obj `if test -f 'normal/completion.c'; then $(CYGPATH_W) 'normal/completion.c'; else $(CYGPATH_W) '$(srcdir)/normal/completion.c'; fi`
+
+normal/normal_module-datetime.o: normal/datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-datetime.o -MD -MP -MF normal/$(DEPDIR)/normal_module-datetime.Tpo -c -o normal/normal_module-datetime.o `test -f 'normal/datetime.c' || echo '$(srcdir)/'`normal/datetime.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-datetime.Tpo normal/$(DEPDIR)/normal_module-datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/datetime.c' object='normal/normal_module-datetime.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-datetime.o `test -f 'normal/datetime.c' || echo '$(srcdir)/'`normal/datetime.c
+
+normal/normal_module-datetime.obj: normal/datetime.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-datetime.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-datetime.Tpo -c -o normal/normal_module-datetime.obj `if test -f 'normal/datetime.c'; then $(CYGPATH_W) 'normal/datetime.c'; else $(CYGPATH_W) '$(srcdir)/normal/datetime.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-datetime.Tpo normal/$(DEPDIR)/normal_module-datetime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/datetime.c' object='normal/normal_module-datetime.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-datetime.obj `if test -f 'normal/datetime.c'; then $(CYGPATH_W) 'normal/datetime.c'; else $(CYGPATH_W) '$(srcdir)/normal/datetime.c'; fi`
+
+normal/normal_module-menu.o: normal/menu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-menu.o -MD -MP -MF normal/$(DEPDIR)/normal_module-menu.Tpo -c -o normal/normal_module-menu.o `test -f 'normal/menu.c' || echo '$(srcdir)/'`normal/menu.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-menu.Tpo normal/$(DEPDIR)/normal_module-menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/menu.c' object='normal/normal_module-menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-menu.o `test -f 'normal/menu.c' || echo '$(srcdir)/'`normal/menu.c
+
+normal/normal_module-menu.obj: normal/menu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-menu.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-menu.Tpo -c -o normal/normal_module-menu.obj `if test -f 'normal/menu.c'; then $(CYGPATH_W) 'normal/menu.c'; else $(CYGPATH_W) '$(srcdir)/normal/menu.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-menu.Tpo normal/$(DEPDIR)/normal_module-menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/menu.c' object='normal/normal_module-menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-menu.obj `if test -f 'normal/menu.c'; then $(CYGPATH_W) 'normal/menu.c'; else $(CYGPATH_W) '$(srcdir)/normal/menu.c'; fi`
+
+normal/normal_module-menu_entry.o: normal/menu_entry.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-menu_entry.o -MD -MP -MF normal/$(DEPDIR)/normal_module-menu_entry.Tpo -c -o normal/normal_module-menu_entry.o `test -f 'normal/menu_entry.c' || echo '$(srcdir)/'`normal/menu_entry.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-menu_entry.Tpo normal/$(DEPDIR)/normal_module-menu_entry.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/menu_entry.c' object='normal/normal_module-menu_entry.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-menu_entry.o `test -f 'normal/menu_entry.c' || echo '$(srcdir)/'`normal/menu_entry.c
+
+normal/normal_module-menu_entry.obj: normal/menu_entry.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-menu_entry.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-menu_entry.Tpo -c -o normal/normal_module-menu_entry.obj `if test -f 'normal/menu_entry.c'; then $(CYGPATH_W) 'normal/menu_entry.c'; else $(CYGPATH_W) '$(srcdir)/normal/menu_entry.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-menu_entry.Tpo normal/$(DEPDIR)/normal_module-menu_entry.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/menu_entry.c' object='normal/normal_module-menu_entry.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-menu_entry.obj `if test -f 'normal/menu_entry.c'; then $(CYGPATH_W) 'normal/menu_entry.c'; else $(CYGPATH_W) '$(srcdir)/normal/menu_entry.c'; fi`
+
+normal/normal_module-menu_text.o: normal/menu_text.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-menu_text.o -MD -MP -MF normal/$(DEPDIR)/normal_module-menu_text.Tpo -c -o normal/normal_module-menu_text.o `test -f 'normal/menu_text.c' || echo '$(srcdir)/'`normal/menu_text.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-menu_text.Tpo normal/$(DEPDIR)/normal_module-menu_text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/menu_text.c' object='normal/normal_module-menu_text.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-menu_text.o `test -f 'normal/menu_text.c' || echo '$(srcdir)/'`normal/menu_text.c
+
+normal/normal_module-menu_text.obj: normal/menu_text.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-menu_text.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-menu_text.Tpo -c -o normal/normal_module-menu_text.obj `if test -f 'normal/menu_text.c'; then $(CYGPATH_W) 'normal/menu_text.c'; else $(CYGPATH_W) '$(srcdir)/normal/menu_text.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-menu_text.Tpo normal/$(DEPDIR)/normal_module-menu_text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/menu_text.c' object='normal/normal_module-menu_text.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-menu_text.obj `if test -f 'normal/menu_text.c'; then $(CYGPATH_W) 'normal/menu_text.c'; else $(CYGPATH_W) '$(srcdir)/normal/menu_text.c'; fi`
+
+normal/normal_module-misc.o: normal/misc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-misc.o -MD -MP -MF normal/$(DEPDIR)/normal_module-misc.Tpo -c -o normal/normal_module-misc.o `test -f 'normal/misc.c' || echo '$(srcdir)/'`normal/misc.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-misc.Tpo normal/$(DEPDIR)/normal_module-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/misc.c' object='normal/normal_module-misc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-misc.o `test -f 'normal/misc.c' || echo '$(srcdir)/'`normal/misc.c
+
+normal/normal_module-misc.obj: normal/misc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-misc.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-misc.Tpo -c -o normal/normal_module-misc.obj `if test -f 'normal/misc.c'; then $(CYGPATH_W) 'normal/misc.c'; else $(CYGPATH_W) '$(srcdir)/normal/misc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-misc.Tpo normal/$(DEPDIR)/normal_module-misc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/misc.c' object='normal/normal_module-misc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-misc.obj `if test -f 'normal/misc.c'; then $(CYGPATH_W) 'normal/misc.c'; else $(CYGPATH_W) '$(srcdir)/normal/misc.c'; fi`
+
+normal/normal_module-crypto.o: normal/crypto.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-crypto.o -MD -MP -MF normal/$(DEPDIR)/normal_module-crypto.Tpo -c -o normal/normal_module-crypto.o `test -f 'normal/crypto.c' || echo '$(srcdir)/'`normal/crypto.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-crypto.Tpo normal/$(DEPDIR)/normal_module-crypto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/crypto.c' object='normal/normal_module-crypto.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-crypto.o `test -f 'normal/crypto.c' || echo '$(srcdir)/'`normal/crypto.c
+
+normal/normal_module-crypto.obj: normal/crypto.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-crypto.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-crypto.Tpo -c -o normal/normal_module-crypto.obj `if test -f 'normal/crypto.c'; then $(CYGPATH_W) 'normal/crypto.c'; else $(CYGPATH_W) '$(srcdir)/normal/crypto.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-crypto.Tpo normal/$(DEPDIR)/normal_module-crypto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/crypto.c' object='normal/normal_module-crypto.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-crypto.obj `if test -f 'normal/crypto.c'; then $(CYGPATH_W) 'normal/crypto.c'; else $(CYGPATH_W) '$(srcdir)/normal/crypto.c'; fi`
+
+normal/normal_module-term.o: normal/term.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-term.o -MD -MP -MF normal/$(DEPDIR)/normal_module-term.Tpo -c -o normal/normal_module-term.o `test -f 'normal/term.c' || echo '$(srcdir)/'`normal/term.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-term.Tpo normal/$(DEPDIR)/normal_module-term.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/term.c' object='normal/normal_module-term.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-term.o `test -f 'normal/term.c' || echo '$(srcdir)/'`normal/term.c
+
+normal/normal_module-term.obj: normal/term.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-term.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-term.Tpo -c -o normal/normal_module-term.obj `if test -f 'normal/term.c'; then $(CYGPATH_W) 'normal/term.c'; else $(CYGPATH_W) '$(srcdir)/normal/term.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-term.Tpo normal/$(DEPDIR)/normal_module-term.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/term.c' object='normal/normal_module-term.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-term.obj `if test -f 'normal/term.c'; then $(CYGPATH_W) 'normal/term.c'; else $(CYGPATH_W) '$(srcdir)/normal/term.c'; fi`
+
+normal/normal_module-context.o: normal/context.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-context.o -MD -MP -MF normal/$(DEPDIR)/normal_module-context.Tpo -c -o normal/normal_module-context.o `test -f 'normal/context.c' || echo '$(srcdir)/'`normal/context.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-context.Tpo normal/$(DEPDIR)/normal_module-context.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/context.c' object='normal/normal_module-context.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-context.o `test -f 'normal/context.c' || echo '$(srcdir)/'`normal/context.c
+
+normal/normal_module-context.obj: normal/context.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-context.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-context.Tpo -c -o normal/normal_module-context.obj `if test -f 'normal/context.c'; then $(CYGPATH_W) 'normal/context.c'; else $(CYGPATH_W) '$(srcdir)/normal/context.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-context.Tpo normal/$(DEPDIR)/normal_module-context.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/context.c' object='normal/normal_module-context.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-context.obj `if test -f 'normal/context.c'; then $(CYGPATH_W) 'normal/context.c'; else $(CYGPATH_W) '$(srcdir)/normal/context.c'; fi`
+
+normal/normal_module-charset.o: normal/charset.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-charset.o -MD -MP -MF normal/$(DEPDIR)/normal_module-charset.Tpo -c -o normal/normal_module-charset.o `test -f 'normal/charset.c' || echo '$(srcdir)/'`normal/charset.c
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-charset.Tpo normal/$(DEPDIR)/normal_module-charset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/charset.c' object='normal/normal_module-charset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-charset.o `test -f 'normal/charset.c' || echo '$(srcdir)/'`normal/charset.c
+
+normal/normal_module-charset.obj: normal/charset.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal/normal_module-charset.obj -MD -MP -MF normal/$(DEPDIR)/normal_module-charset.Tpo -c -o normal/normal_module-charset.obj `if test -f 'normal/charset.c'; then $(CYGPATH_W) 'normal/charset.c'; else $(CYGPATH_W) '$(srcdir)/normal/charset.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) normal/$(DEPDIR)/normal_module-charset.Tpo normal/$(DEPDIR)/normal_module-charset.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='normal/charset.c' object='normal/normal_module-charset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal/normal_module-charset.obj `if test -f 'normal/charset.c'; then $(CYGPATH_W) 'normal/charset.c'; else $(CYGPATH_W) '$(srcdir)/normal/charset.c'; fi`
+
+script/normal_module-main.o: script/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-main.o -MD -MP -MF script/$(DEPDIR)/normal_module-main.Tpo -c -o script/normal_module-main.o `test -f 'script/main.c' || echo '$(srcdir)/'`script/main.c
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-main.Tpo script/$(DEPDIR)/normal_module-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/main.c' object='script/normal_module-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-main.o `test -f 'script/main.c' || echo '$(srcdir)/'`script/main.c
+
+script/normal_module-main.obj: script/main.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-main.obj -MD -MP -MF script/$(DEPDIR)/normal_module-main.Tpo -c -o script/normal_module-main.obj `if test -f 'script/main.c'; then $(CYGPATH_W) 'script/main.c'; else $(CYGPATH_W) '$(srcdir)/script/main.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-main.Tpo script/$(DEPDIR)/normal_module-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/main.c' object='script/normal_module-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-main.obj `if test -f 'script/main.c'; then $(CYGPATH_W) 'script/main.c'; else $(CYGPATH_W) '$(srcdir)/script/main.c'; fi`
+
+script/normal_module-script.o: script/script.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-script.o -MD -MP -MF script/$(DEPDIR)/normal_module-script.Tpo -c -o script/normal_module-script.o `test -f 'script/script.c' || echo '$(srcdir)/'`script/script.c
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-script.Tpo script/$(DEPDIR)/normal_module-script.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/script.c' object='script/normal_module-script.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-script.o `test -f 'script/script.c' || echo '$(srcdir)/'`script/script.c
+
+script/normal_module-script.obj: script/script.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-script.obj -MD -MP -MF script/$(DEPDIR)/normal_module-script.Tpo -c -o script/normal_module-script.obj `if test -f 'script/script.c'; then $(CYGPATH_W) 'script/script.c'; else $(CYGPATH_W) '$(srcdir)/script/script.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-script.Tpo script/$(DEPDIR)/normal_module-script.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/script.c' object='script/normal_module-script.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-script.obj `if test -f 'script/script.c'; then $(CYGPATH_W) 'script/script.c'; else $(CYGPATH_W) '$(srcdir)/script/script.c'; fi`
+
+script/normal_module-execute.o: script/execute.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-execute.o -MD -MP -MF script/$(DEPDIR)/normal_module-execute.Tpo -c -o script/normal_module-execute.o `test -f 'script/execute.c' || echo '$(srcdir)/'`script/execute.c
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-execute.Tpo script/$(DEPDIR)/normal_module-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/execute.c' object='script/normal_module-execute.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-execute.o `test -f 'script/execute.c' || echo '$(srcdir)/'`script/execute.c
+
+script/normal_module-execute.obj: script/execute.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-execute.obj -MD -MP -MF script/$(DEPDIR)/normal_module-execute.Tpo -c -o script/normal_module-execute.obj `if test -f 'script/execute.c'; then $(CYGPATH_W) 'script/execute.c'; else $(CYGPATH_W) '$(srcdir)/script/execute.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-execute.Tpo script/$(DEPDIR)/normal_module-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/execute.c' object='script/normal_module-execute.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-execute.obj `if test -f 'script/execute.c'; then $(CYGPATH_W) 'script/execute.c'; else $(CYGPATH_W) '$(srcdir)/script/execute.c'; fi`
+
+script/normal_module-function.o: script/function.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-function.o -MD -MP -MF script/$(DEPDIR)/normal_module-function.Tpo -c -o script/normal_module-function.o `test -f 'script/function.c' || echo '$(srcdir)/'`script/function.c
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-function.Tpo script/$(DEPDIR)/normal_module-function.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/function.c' object='script/normal_module-function.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-function.o `test -f 'script/function.c' || echo '$(srcdir)/'`script/function.c
+
+script/normal_module-function.obj: script/function.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-function.obj -MD -MP -MF script/$(DEPDIR)/normal_module-function.Tpo -c -o script/normal_module-function.obj `if test -f 'script/function.c'; then $(CYGPATH_W) 'script/function.c'; else $(CYGPATH_W) '$(srcdir)/script/function.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-function.Tpo script/$(DEPDIR)/normal_module-function.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/function.c' object='script/normal_module-function.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-function.obj `if test -f 'script/function.c'; then $(CYGPATH_W) 'script/function.c'; else $(CYGPATH_W) '$(srcdir)/script/function.c'; fi`
+
+script/normal_module-lexer.o: script/lexer.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-lexer.o -MD -MP -MF script/$(DEPDIR)/normal_module-lexer.Tpo -c -o script/normal_module-lexer.o `test -f 'script/lexer.c' || echo '$(srcdir)/'`script/lexer.c
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-lexer.Tpo script/$(DEPDIR)/normal_module-lexer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/lexer.c' object='script/normal_module-lexer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-lexer.o `test -f 'script/lexer.c' || echo '$(srcdir)/'`script/lexer.c
+
+script/normal_module-lexer.obj: script/lexer.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-lexer.obj -MD -MP -MF script/$(DEPDIR)/normal_module-lexer.Tpo -c -o script/normal_module-lexer.obj `if test -f 'script/lexer.c'; then $(CYGPATH_W) 'script/lexer.c'; else $(CYGPATH_W) '$(srcdir)/script/lexer.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-lexer.Tpo script/$(DEPDIR)/normal_module-lexer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/lexer.c' object='script/normal_module-lexer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-lexer.obj `if test -f 'script/lexer.c'; then $(CYGPATH_W) 'script/lexer.c'; else $(CYGPATH_W) '$(srcdir)/script/lexer.c'; fi`
+
+script/normal_module-argv.o: script/argv.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-argv.o -MD -MP -MF script/$(DEPDIR)/normal_module-argv.Tpo -c -o script/normal_module-argv.o `test -f 'script/argv.c' || echo '$(srcdir)/'`script/argv.c
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-argv.Tpo script/$(DEPDIR)/normal_module-argv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/argv.c' object='script/normal_module-argv.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-argv.o `test -f 'script/argv.c' || echo '$(srcdir)/'`script/argv.c
+
+script/normal_module-argv.obj: script/argv.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT script/normal_module-argv.obj -MD -MP -MF script/$(DEPDIR)/normal_module-argv.Tpo -c -o script/normal_module-argv.obj `if test -f 'script/argv.c'; then $(CYGPATH_W) 'script/argv.c'; else $(CYGPATH_W) '$(srcdir)/script/argv.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) script/$(DEPDIR)/normal_module-argv.Tpo script/$(DEPDIR)/normal_module-argv.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='script/argv.c' object='script/normal_module-argv.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o script/normal_module-argv.obj `if test -f 'script/argv.c'; then $(CYGPATH_W) 'script/argv.c'; else $(CYGPATH_W) '$(srcdir)/script/argv.c'; fi`
+
+commands/normal_module-menuentry.o: commands/menuentry.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT commands/normal_module-menuentry.o -MD -MP -MF commands/$(DEPDIR)/normal_module-menuentry.Tpo -c -o commands/normal_module-menuentry.o `test -f 'commands/menuentry.c' || echo '$(srcdir)/'`commands/menuentry.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/normal_module-menuentry.Tpo commands/$(DEPDIR)/normal_module-menuentry.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/menuentry.c' object='commands/normal_module-menuentry.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o commands/normal_module-menuentry.o `test -f 'commands/menuentry.c' || echo '$(srcdir)/'`commands/menuentry.c
+
+commands/normal_module-menuentry.obj: commands/menuentry.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT commands/normal_module-menuentry.obj -MD -MP -MF commands/$(DEPDIR)/normal_module-menuentry.Tpo -c -o commands/normal_module-menuentry.obj `if test -f 'commands/menuentry.c'; then $(CYGPATH_W) 'commands/menuentry.c'; else $(CYGPATH_W) '$(srcdir)/commands/menuentry.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/normal_module-menuentry.Tpo commands/$(DEPDIR)/normal_module-menuentry.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/menuentry.c' object='commands/normal_module-menuentry.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o commands/normal_module-menuentry.obj `if test -f 'commands/menuentry.c'; then $(CYGPATH_W) 'commands/menuentry.c'; else $(CYGPATH_W) '$(srcdir)/commands/menuentry.c'; fi`
+
+normal_module-unidata.o: unidata.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal_module-unidata.o -MD -MP -MF $(DEPDIR)/normal_module-unidata.Tpo -c -o normal_module-unidata.o `test -f 'unidata.c' || echo '$(srcdir)/'`unidata.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/normal_module-unidata.Tpo $(DEPDIR)/normal_module-unidata.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unidata.c' object='normal_module-unidata.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal_module-unidata.o `test -f 'unidata.c' || echo '$(srcdir)/'`unidata.c
+
+normal_module-unidata.obj: unidata.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal_module-unidata.obj -MD -MP -MF $(DEPDIR)/normal_module-unidata.Tpo -c -o normal_module-unidata.obj `if test -f 'unidata.c'; then $(CYGPATH_W) 'unidata.c'; else $(CYGPATH_W) '$(srcdir)/unidata.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/normal_module-unidata.Tpo $(DEPDIR)/normal_module-unidata.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unidata.c' object='normal_module-unidata.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal_module-unidata.obj `if test -f 'unidata.c'; then $(CYGPATH_W) 'unidata.c'; else $(CYGPATH_W) '$(srcdir)/unidata.c'; fi`
+
+normal_module-grub_script.tab.o: grub_script.tab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal_module-grub_script.tab.o -MD -MP -MF $(DEPDIR)/normal_module-grub_script.tab.Tpo -c -o normal_module-grub_script.tab.o `test -f 'grub_script.tab.c' || echo '$(srcdir)/'`grub_script.tab.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/normal_module-grub_script.tab.Tpo $(DEPDIR)/normal_module-grub_script.tab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grub_script.tab.c' object='normal_module-grub_script.tab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal_module-grub_script.tab.o `test -f 'grub_script.tab.c' || echo '$(srcdir)/'`grub_script.tab.c
+
+normal_module-grub_script.tab.obj: grub_script.tab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal_module-grub_script.tab.obj -MD -MP -MF $(DEPDIR)/normal_module-grub_script.tab.Tpo -c -o normal_module-grub_script.tab.obj `if test -f 'grub_script.tab.c'; then $(CYGPATH_W) 'grub_script.tab.c'; else $(CYGPATH_W) '$(srcdir)/grub_script.tab.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/normal_module-grub_script.tab.Tpo $(DEPDIR)/normal_module-grub_script.tab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grub_script.tab.c' object='normal_module-grub_script.tab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal_module-grub_script.tab.obj `if test -f 'grub_script.tab.c'; then $(CYGPATH_W) 'grub_script.tab.c'; else $(CYGPATH_W) '$(srcdir)/grub_script.tab.c'; fi`
+
+normal_module-grub_script.yy.o: grub_script.yy.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal_module-grub_script.yy.o -MD -MP -MF $(DEPDIR)/normal_module-grub_script.yy.Tpo -c -o normal_module-grub_script.yy.o `test -f 'grub_script.yy.c' || echo '$(srcdir)/'`grub_script.yy.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/normal_module-grub_script.yy.Tpo $(DEPDIR)/normal_module-grub_script.yy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grub_script.yy.c' object='normal_module-grub_script.yy.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal_module-grub_script.yy.o `test -f 'grub_script.yy.c' || echo '$(srcdir)/'`grub_script.yy.c
+
+normal_module-grub_script.yy.obj: grub_script.yy.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -MT normal_module-grub_script.yy.obj -MD -MP -MF $(DEPDIR)/normal_module-grub_script.yy.Tpo -c -o normal_module-grub_script.yy.obj `if test -f 'grub_script.yy.c'; then $(CYGPATH_W) 'grub_script.yy.c'; else $(CYGPATH_W) '$(srcdir)/grub_script.yy.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/normal_module-grub_script.yy.Tpo $(DEPDIR)/normal_module-grub_script.yy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grub_script.yy.c' object='normal_module-grub_script.yy.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $(normal_module_CFLAGS) $(CFLAGS) -c -o normal_module-grub_script.yy.obj `if test -f 'grub_script.yy.c'; then $(CYGPATH_W) 'grub_script.yy.c'; else $(CYGPATH_W) '$(srcdir)/grub_script.yy.c'; fi`
+
+fs/ntfs_module-ntfs.o: fs/ntfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $(ntfs_module_CFLAGS) $(CFLAGS) -MT fs/ntfs_module-ntfs.o -MD -MP -MF fs/$(DEPDIR)/ntfs_module-ntfs.Tpo -c -o fs/ntfs_module-ntfs.o `test -f 'fs/ntfs.c' || echo '$(srcdir)/'`fs/ntfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ntfs_module-ntfs.Tpo fs/$(DEPDIR)/ntfs_module-ntfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ntfs.c' object='fs/ntfs_module-ntfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $(ntfs_module_CFLAGS) $(CFLAGS) -c -o fs/ntfs_module-ntfs.o `test -f 'fs/ntfs.c' || echo '$(srcdir)/'`fs/ntfs.c
+
+fs/ntfs_module-ntfs.obj: fs/ntfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $(ntfs_module_CFLAGS) $(CFLAGS) -MT fs/ntfs_module-ntfs.obj -MD -MP -MF fs/$(DEPDIR)/ntfs_module-ntfs.Tpo -c -o fs/ntfs_module-ntfs.obj `if test -f 'fs/ntfs.c'; then $(CYGPATH_W) 'fs/ntfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/ntfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ntfs_module-ntfs.Tpo fs/$(DEPDIR)/ntfs_module-ntfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ntfs.c' object='fs/ntfs_module-ntfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $(ntfs_module_CFLAGS) $(CFLAGS) -c -o fs/ntfs_module-ntfs.obj `if test -f 'fs/ntfs.c'; then $(CYGPATH_W) 'fs/ntfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/ntfs.c'; fi`
+
+fs/ntfscomp_module-ntfscomp.o: fs/ntfscomp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $(ntfscomp_module_CFLAGS) $(CFLAGS) -MT fs/ntfscomp_module-ntfscomp.o -MD -MP -MF fs/$(DEPDIR)/ntfscomp_module-ntfscomp.Tpo -c -o fs/ntfscomp_module-ntfscomp.o `test -f 'fs/ntfscomp.c' || echo '$(srcdir)/'`fs/ntfscomp.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ntfscomp_module-ntfscomp.Tpo fs/$(DEPDIR)/ntfscomp_module-ntfscomp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ntfscomp.c' object='fs/ntfscomp_module-ntfscomp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $(ntfscomp_module_CFLAGS) $(CFLAGS) -c -o fs/ntfscomp_module-ntfscomp.o `test -f 'fs/ntfscomp.c' || echo '$(srcdir)/'`fs/ntfscomp.c
+
+fs/ntfscomp_module-ntfscomp.obj: fs/ntfscomp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $(ntfscomp_module_CFLAGS) $(CFLAGS) -MT fs/ntfscomp_module-ntfscomp.obj -MD -MP -MF fs/$(DEPDIR)/ntfscomp_module-ntfscomp.Tpo -c -o fs/ntfscomp_module-ntfscomp.obj `if test -f 'fs/ntfscomp.c'; then $(CYGPATH_W) 'fs/ntfscomp.c'; else $(CYGPATH_W) '$(srcdir)/fs/ntfscomp.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ntfscomp_module-ntfscomp.Tpo fs/$(DEPDIR)/ntfscomp_module-ntfscomp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ntfscomp.c' object='fs/ntfscomp_module-ntfscomp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $(ntfscomp_module_CFLAGS) $(CFLAGS) -c -o fs/ntfscomp_module-ntfscomp.obj `if test -f 'fs/ntfscomp.c'; then $(CYGPATH_W) 'fs/ntfscomp.c'; else $(CYGPATH_W) '$(srcdir)/fs/ntfscomp.c'; fi`
+
+loader/i386/pc/ntldr_module-ntldr.o: loader/i386/pc/ntldr.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntldr_module_CPPFLAGS) $(CPPFLAGS) $(ntldr_module_CFLAGS) $(CFLAGS) -MT loader/i386/pc/ntldr_module-ntldr.o -MD -MP -MF loader/i386/pc/$(DEPDIR)/ntldr_module-ntldr.Tpo -c -o loader/i386/pc/ntldr_module-ntldr.o `test -f 'loader/i386/pc/ntldr.c' || echo '$(srcdir)/'`loader/i386/pc/ntldr.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/pc/$(DEPDIR)/ntldr_module-ntldr.Tpo loader/i386/pc/$(DEPDIR)/ntldr_module-ntldr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/pc/ntldr.c' object='loader/i386/pc/ntldr_module-ntldr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntldr_module_CPPFLAGS) $(CPPFLAGS) $(ntldr_module_CFLAGS) $(CFLAGS) -c -o loader/i386/pc/ntldr_module-ntldr.o `test -f 'loader/i386/pc/ntldr.c' || echo '$(srcdir)/'`loader/i386/pc/ntldr.c
+
+loader/i386/pc/ntldr_module-ntldr.obj: loader/i386/pc/ntldr.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntldr_module_CPPFLAGS) $(CPPFLAGS) $(ntldr_module_CFLAGS) $(CFLAGS) -MT loader/i386/pc/ntldr_module-ntldr.obj -MD -MP -MF loader/i386/pc/$(DEPDIR)/ntldr_module-ntldr.Tpo -c -o loader/i386/pc/ntldr_module-ntldr.obj `if test -f 'loader/i386/pc/ntldr.c'; then $(CYGPATH_W) 'loader/i386/pc/ntldr.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/pc/ntldr.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/pc/$(DEPDIR)/ntldr_module-ntldr.Tpo loader/i386/pc/$(DEPDIR)/ntldr_module-ntldr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/pc/ntldr.c' object='loader/i386/pc/ntldr_module-ntldr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntldr_module_CPPFLAGS) $(CPPFLAGS) $(ntldr_module_CFLAGS) $(CFLAGS) -c -o loader/i386/pc/ntldr_module-ntldr.obj `if test -f 'loader/i386/pc/ntldr.c'; then $(CYGPATH_W) 'loader/i386/pc/ntldr.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/pc/ntldr.c'; fi`
+
+bus/usb/ohci_module-ohci.o: bus/usb/ohci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $(ohci_module_CFLAGS) $(CFLAGS) -MT bus/usb/ohci_module-ohci.o -MD -MP -MF bus/usb/$(DEPDIR)/ohci_module-ohci.Tpo -c -o bus/usb/ohci_module-ohci.o `test -f 'bus/usb/ohci.c' || echo '$(srcdir)/'`bus/usb/ohci.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/ohci_module-ohci.Tpo bus/usb/$(DEPDIR)/ohci_module-ohci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/ohci.c' object='bus/usb/ohci_module-ohci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $(ohci_module_CFLAGS) $(CFLAGS) -c -o bus/usb/ohci_module-ohci.o `test -f 'bus/usb/ohci.c' || echo '$(srcdir)/'`bus/usb/ohci.c
+
+bus/usb/ohci_module-ohci.obj: bus/usb/ohci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $(ohci_module_CFLAGS) $(CFLAGS) -MT bus/usb/ohci_module-ohci.obj -MD -MP -MF bus/usb/$(DEPDIR)/ohci_module-ohci.Tpo -c -o bus/usb/ohci_module-ohci.obj `if test -f 'bus/usb/ohci.c'; then $(CYGPATH_W) 'bus/usb/ohci.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/ohci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/ohci_module-ohci.Tpo bus/usb/$(DEPDIR)/ohci_module-ohci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/ohci.c' object='bus/usb/ohci_module-ohci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $(ohci_module_CFLAGS) $(CFLAGS) -c -o bus/usb/ohci_module-ohci.obj `if test -f 'bus/usb/ohci.c'; then $(CYGPATH_W) 'bus/usb/ohci.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/ohci.c'; fi`
+
+partmap/part_acorn_module-acorn.o: partmap/acorn.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $(part_acorn_module_CFLAGS) $(CFLAGS) -MT partmap/part_acorn_module-acorn.o -MD -MP -MF partmap/$(DEPDIR)/part_acorn_module-acorn.Tpo -c -o partmap/part_acorn_module-acorn.o `test -f 'partmap/acorn.c' || echo '$(srcdir)/'`partmap/acorn.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_acorn_module-acorn.Tpo partmap/$(DEPDIR)/part_acorn_module-acorn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/acorn.c' object='partmap/part_acorn_module-acorn.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $(part_acorn_module_CFLAGS) $(CFLAGS) -c -o partmap/part_acorn_module-acorn.o `test -f 'partmap/acorn.c' || echo '$(srcdir)/'`partmap/acorn.c
+
+partmap/part_acorn_module-acorn.obj: partmap/acorn.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $(part_acorn_module_CFLAGS) $(CFLAGS) -MT partmap/part_acorn_module-acorn.obj -MD -MP -MF partmap/$(DEPDIR)/part_acorn_module-acorn.Tpo -c -o partmap/part_acorn_module-acorn.obj `if test -f 'partmap/acorn.c'; then $(CYGPATH_W) 'partmap/acorn.c'; else $(CYGPATH_W) '$(srcdir)/partmap/acorn.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_acorn_module-acorn.Tpo partmap/$(DEPDIR)/part_acorn_module-acorn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/acorn.c' object='partmap/part_acorn_module-acorn.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $(part_acorn_module_CFLAGS) $(CFLAGS) -c -o partmap/part_acorn_module-acorn.obj `if test -f 'partmap/acorn.c'; then $(CYGPATH_W) 'partmap/acorn.c'; else $(CYGPATH_W) '$(srcdir)/partmap/acorn.c'; fi`
+
+partmap/part_amiga_module-amiga.o: partmap/amiga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $(part_amiga_module_CFLAGS) $(CFLAGS) -MT partmap/part_amiga_module-amiga.o -MD -MP -MF partmap/$(DEPDIR)/part_amiga_module-amiga.Tpo -c -o partmap/part_amiga_module-amiga.o `test -f 'partmap/amiga.c' || echo '$(srcdir)/'`partmap/amiga.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_amiga_module-amiga.Tpo partmap/$(DEPDIR)/part_amiga_module-amiga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/amiga.c' object='partmap/part_amiga_module-amiga.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $(part_amiga_module_CFLAGS) $(CFLAGS) -c -o partmap/part_amiga_module-amiga.o `test -f 'partmap/amiga.c' || echo '$(srcdir)/'`partmap/amiga.c
+
+partmap/part_amiga_module-amiga.obj: partmap/amiga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $(part_amiga_module_CFLAGS) $(CFLAGS) -MT partmap/part_amiga_module-amiga.obj -MD -MP -MF partmap/$(DEPDIR)/part_amiga_module-amiga.Tpo -c -o partmap/part_amiga_module-amiga.obj `if test -f 'partmap/amiga.c'; then $(CYGPATH_W) 'partmap/amiga.c'; else $(CYGPATH_W) '$(srcdir)/partmap/amiga.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_amiga_module-amiga.Tpo partmap/$(DEPDIR)/part_amiga_module-amiga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/amiga.c' object='partmap/part_amiga_module-amiga.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $(part_amiga_module_CFLAGS) $(CFLAGS) -c -o partmap/part_amiga_module-amiga.obj `if test -f 'partmap/amiga.c'; then $(CYGPATH_W) 'partmap/amiga.c'; else $(CYGPATH_W) '$(srcdir)/partmap/amiga.c'; fi`
+
+partmap/part_apple_module-apple.o: partmap/apple.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $(part_apple_module_CFLAGS) $(CFLAGS) -MT partmap/part_apple_module-apple.o -MD -MP -MF partmap/$(DEPDIR)/part_apple_module-apple.Tpo -c -o partmap/part_apple_module-apple.o `test -f 'partmap/apple.c' || echo '$(srcdir)/'`partmap/apple.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_apple_module-apple.Tpo partmap/$(DEPDIR)/part_apple_module-apple.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/apple.c' object='partmap/part_apple_module-apple.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $(part_apple_module_CFLAGS) $(CFLAGS) -c -o partmap/part_apple_module-apple.o `test -f 'partmap/apple.c' || echo '$(srcdir)/'`partmap/apple.c
+
+partmap/part_apple_module-apple.obj: partmap/apple.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $(part_apple_module_CFLAGS) $(CFLAGS) -MT partmap/part_apple_module-apple.obj -MD -MP -MF partmap/$(DEPDIR)/part_apple_module-apple.Tpo -c -o partmap/part_apple_module-apple.obj `if test -f 'partmap/apple.c'; then $(CYGPATH_W) 'partmap/apple.c'; else $(CYGPATH_W) '$(srcdir)/partmap/apple.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_apple_module-apple.Tpo partmap/$(DEPDIR)/part_apple_module-apple.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/apple.c' object='partmap/part_apple_module-apple.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $(part_apple_module_CFLAGS) $(CFLAGS) -c -o partmap/part_apple_module-apple.obj `if test -f 'partmap/apple.c'; then $(CYGPATH_W) 'partmap/apple.c'; else $(CYGPATH_W) '$(srcdir)/partmap/apple.c'; fi`
+
+partmap/part_bsd_module-bsdlabel.o: partmap/bsdlabel.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $(part_bsd_module_CFLAGS) $(CFLAGS) -MT partmap/part_bsd_module-bsdlabel.o -MD -MP -MF partmap/$(DEPDIR)/part_bsd_module-bsdlabel.Tpo -c -o partmap/part_bsd_module-bsdlabel.o `test -f 'partmap/bsdlabel.c' || echo '$(srcdir)/'`partmap/bsdlabel.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_bsd_module-bsdlabel.Tpo partmap/$(DEPDIR)/part_bsd_module-bsdlabel.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/bsdlabel.c' object='partmap/part_bsd_module-bsdlabel.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $(part_bsd_module_CFLAGS) $(CFLAGS) -c -o partmap/part_bsd_module-bsdlabel.o `test -f 'partmap/bsdlabel.c' || echo '$(srcdir)/'`partmap/bsdlabel.c
+
+partmap/part_bsd_module-bsdlabel.obj: partmap/bsdlabel.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $(part_bsd_module_CFLAGS) $(CFLAGS) -MT partmap/part_bsd_module-bsdlabel.obj -MD -MP -MF partmap/$(DEPDIR)/part_bsd_module-bsdlabel.Tpo -c -o partmap/part_bsd_module-bsdlabel.obj `if test -f 'partmap/bsdlabel.c'; then $(CYGPATH_W) 'partmap/bsdlabel.c'; else $(CYGPATH_W) '$(srcdir)/partmap/bsdlabel.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_bsd_module-bsdlabel.Tpo partmap/$(DEPDIR)/part_bsd_module-bsdlabel.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/bsdlabel.c' object='partmap/part_bsd_module-bsdlabel.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $(part_bsd_module_CFLAGS) $(CFLAGS) -c -o partmap/part_bsd_module-bsdlabel.obj `if test -f 'partmap/bsdlabel.c'; then $(CYGPATH_W) 'partmap/bsdlabel.c'; else $(CYGPATH_W) '$(srcdir)/partmap/bsdlabel.c'; fi`
+
+partmap/part_gpt_module-gpt.o: partmap/gpt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $(part_gpt_module_CFLAGS) $(CFLAGS) -MT partmap/part_gpt_module-gpt.o -MD -MP -MF partmap/$(DEPDIR)/part_gpt_module-gpt.Tpo -c -o partmap/part_gpt_module-gpt.o `test -f 'partmap/gpt.c' || echo '$(srcdir)/'`partmap/gpt.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_gpt_module-gpt.Tpo partmap/$(DEPDIR)/part_gpt_module-gpt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/gpt.c' object='partmap/part_gpt_module-gpt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $(part_gpt_module_CFLAGS) $(CFLAGS) -c -o partmap/part_gpt_module-gpt.o `test -f 'partmap/gpt.c' || echo '$(srcdir)/'`partmap/gpt.c
+
+partmap/part_gpt_module-gpt.obj: partmap/gpt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $(part_gpt_module_CFLAGS) $(CFLAGS) -MT partmap/part_gpt_module-gpt.obj -MD -MP -MF partmap/$(DEPDIR)/part_gpt_module-gpt.Tpo -c -o partmap/part_gpt_module-gpt.obj `if test -f 'partmap/gpt.c'; then $(CYGPATH_W) 'partmap/gpt.c'; else $(CYGPATH_W) '$(srcdir)/partmap/gpt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_gpt_module-gpt.Tpo partmap/$(DEPDIR)/part_gpt_module-gpt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/gpt.c' object='partmap/part_gpt_module-gpt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $(part_gpt_module_CFLAGS) $(CFLAGS) -c -o partmap/part_gpt_module-gpt.obj `if test -f 'partmap/gpt.c'; then $(CYGPATH_W) 'partmap/gpt.c'; else $(CYGPATH_W) '$(srcdir)/partmap/gpt.c'; fi`
+
+partmap/part_msdos_module-msdos.o: partmap/msdos.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $(part_msdos_module_CFLAGS) $(CFLAGS) -MT partmap/part_msdos_module-msdos.o -MD -MP -MF partmap/$(DEPDIR)/part_msdos_module-msdos.Tpo -c -o partmap/part_msdos_module-msdos.o `test -f 'partmap/msdos.c' || echo '$(srcdir)/'`partmap/msdos.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_msdos_module-msdos.Tpo partmap/$(DEPDIR)/part_msdos_module-msdos.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/msdos.c' object='partmap/part_msdos_module-msdos.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $(part_msdos_module_CFLAGS) $(CFLAGS) -c -o partmap/part_msdos_module-msdos.o `test -f 'partmap/msdos.c' || echo '$(srcdir)/'`partmap/msdos.c
+
+partmap/part_msdos_module-msdos.obj: partmap/msdos.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $(part_msdos_module_CFLAGS) $(CFLAGS) -MT partmap/part_msdos_module-msdos.obj -MD -MP -MF partmap/$(DEPDIR)/part_msdos_module-msdos.Tpo -c -o partmap/part_msdos_module-msdos.obj `if test -f 'partmap/msdos.c'; then $(CYGPATH_W) 'partmap/msdos.c'; else $(CYGPATH_W) '$(srcdir)/partmap/msdos.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_msdos_module-msdos.Tpo partmap/$(DEPDIR)/part_msdos_module-msdos.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/msdos.c' object='partmap/part_msdos_module-msdos.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $(part_msdos_module_CFLAGS) $(CFLAGS) -c -o partmap/part_msdos_module-msdos.obj `if test -f 'partmap/msdos.c'; then $(CYGPATH_W) 'partmap/msdos.c'; else $(CYGPATH_W) '$(srcdir)/partmap/msdos.c'; fi`
+
+partmap/part_sun_module-sun.o: partmap/sun.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $(part_sun_module_CFLAGS) $(CFLAGS) -MT partmap/part_sun_module-sun.o -MD -MP -MF partmap/$(DEPDIR)/part_sun_module-sun.Tpo -c -o partmap/part_sun_module-sun.o `test -f 'partmap/sun.c' || echo '$(srcdir)/'`partmap/sun.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_sun_module-sun.Tpo partmap/$(DEPDIR)/part_sun_module-sun.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/sun.c' object='partmap/part_sun_module-sun.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $(part_sun_module_CFLAGS) $(CFLAGS) -c -o partmap/part_sun_module-sun.o `test -f 'partmap/sun.c' || echo '$(srcdir)/'`partmap/sun.c
+
+partmap/part_sun_module-sun.obj: partmap/sun.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $(part_sun_module_CFLAGS) $(CFLAGS) -MT partmap/part_sun_module-sun.obj -MD -MP -MF partmap/$(DEPDIR)/part_sun_module-sun.Tpo -c -o partmap/part_sun_module-sun.obj `if test -f 'partmap/sun.c'; then $(CYGPATH_W) 'partmap/sun.c'; else $(CYGPATH_W) '$(srcdir)/partmap/sun.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_sun_module-sun.Tpo partmap/$(DEPDIR)/part_sun_module-sun.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/sun.c' object='partmap/part_sun_module-sun.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $(part_sun_module_CFLAGS) $(CFLAGS) -c -o partmap/part_sun_module-sun.obj `if test -f 'partmap/sun.c'; then $(CYGPATH_W) 'partmap/sun.c'; else $(CYGPATH_W) '$(srcdir)/partmap/sun.c'; fi`
+
+partmap/part_sunpc_module-sunpc.o: partmap/sunpc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $(part_sunpc_module_CFLAGS) $(CFLAGS) -MT partmap/part_sunpc_module-sunpc.o -MD -MP -MF partmap/$(DEPDIR)/part_sunpc_module-sunpc.Tpo -c -o partmap/part_sunpc_module-sunpc.o `test -f 'partmap/sunpc.c' || echo '$(srcdir)/'`partmap/sunpc.c
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_sunpc_module-sunpc.Tpo partmap/$(DEPDIR)/part_sunpc_module-sunpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/sunpc.c' object='partmap/part_sunpc_module-sunpc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $(part_sunpc_module_CFLAGS) $(CFLAGS) -c -o partmap/part_sunpc_module-sunpc.o `test -f 'partmap/sunpc.c' || echo '$(srcdir)/'`partmap/sunpc.c
+
+partmap/part_sunpc_module-sunpc.obj: partmap/sunpc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $(part_sunpc_module_CFLAGS) $(CFLAGS) -MT partmap/part_sunpc_module-sunpc.obj -MD -MP -MF partmap/$(DEPDIR)/part_sunpc_module-sunpc.Tpo -c -o partmap/part_sunpc_module-sunpc.obj `if test -f 'partmap/sunpc.c'; then $(CYGPATH_W) 'partmap/sunpc.c'; else $(CYGPATH_W) '$(srcdir)/partmap/sunpc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) partmap/$(DEPDIR)/part_sunpc_module-sunpc.Tpo partmap/$(DEPDIR)/part_sunpc_module-sunpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partmap/sunpc.c' object='partmap/part_sunpc_module-sunpc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $(part_sunpc_module_CFLAGS) $(CFLAGS) -c -o partmap/part_sunpc_module-sunpc.obj `if test -f 'partmap/sunpc.c'; then $(CYGPATH_W) 'partmap/sunpc.c'; else $(CYGPATH_W) '$(srcdir)/partmap/sunpc.c'; fi`
+
+commands/parttool_module-parttool.o: commands/parttool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $(parttool_module_CFLAGS) $(CFLAGS) -MT commands/parttool_module-parttool.o -MD -MP -MF commands/$(DEPDIR)/parttool_module-parttool.Tpo -c -o commands/parttool_module-parttool.o `test -f 'commands/parttool.c' || echo '$(srcdir)/'`commands/parttool.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/parttool_module-parttool.Tpo commands/$(DEPDIR)/parttool_module-parttool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/parttool.c' object='commands/parttool_module-parttool.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $(parttool_module_CFLAGS) $(CFLAGS) -c -o commands/parttool_module-parttool.o `test -f 'commands/parttool.c' || echo '$(srcdir)/'`commands/parttool.c
+
+commands/parttool_module-parttool.obj: commands/parttool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $(parttool_module_CFLAGS) $(CFLAGS) -MT commands/parttool_module-parttool.obj -MD -MP -MF commands/$(DEPDIR)/parttool_module-parttool.Tpo -c -o commands/parttool_module-parttool.obj `if test -f 'commands/parttool.c'; then $(CYGPATH_W) 'commands/parttool.c'; else $(CYGPATH_W) '$(srcdir)/commands/parttool.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/parttool_module-parttool.Tpo commands/$(DEPDIR)/parttool_module-parttool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/parttool.c' object='commands/parttool_module-parttool.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $(parttool_module_CFLAGS) $(CFLAGS) -c -o commands/parttool_module-parttool.obj `if test -f 'commands/parttool.c'; then $(CYGPATH_W) 'commands/parttool.c'; else $(CYGPATH_W) '$(srcdir)/commands/parttool.c'; fi`
+
+commands/password_module-password.o: commands/password.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $(password_module_CFLAGS) $(CFLAGS) -MT commands/password_module-password.o -MD -MP -MF commands/$(DEPDIR)/password_module-password.Tpo -c -o commands/password_module-password.o `test -f 'commands/password.c' || echo '$(srcdir)/'`commands/password.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/password_module-password.Tpo commands/$(DEPDIR)/password_module-password.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/password.c' object='commands/password_module-password.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $(password_module_CFLAGS) $(CFLAGS) -c -o commands/password_module-password.o `test -f 'commands/password.c' || echo '$(srcdir)/'`commands/password.c
+
+commands/password_module-password.obj: commands/password.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $(password_module_CFLAGS) $(CFLAGS) -MT commands/password_module-password.obj -MD -MP -MF commands/$(DEPDIR)/password_module-password.Tpo -c -o commands/password_module-password.obj `if test -f 'commands/password.c'; then $(CYGPATH_W) 'commands/password.c'; else $(CYGPATH_W) '$(srcdir)/commands/password.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/password_module-password.Tpo commands/$(DEPDIR)/password_module-password.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/password.c' object='commands/password_module-password.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $(password_module_CFLAGS) $(CFLAGS) -c -o commands/password_module-password.obj `if test -f 'commands/password.c'; then $(CYGPATH_W) 'commands/password.c'; else $(CYGPATH_W) '$(srcdir)/commands/password.c'; fi`
+
+commands/password_pbkdf2_module-password_pbkdf2.o: commands/password_pbkdf2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(password_pbkdf2_module_CFLAGS) $(CFLAGS) -MT commands/password_pbkdf2_module-password_pbkdf2.o -MD -MP -MF commands/$(DEPDIR)/password_pbkdf2_module-password_pbkdf2.Tpo -c -o commands/password_pbkdf2_module-password_pbkdf2.o `test -f 'commands/password_pbkdf2.c' || echo '$(srcdir)/'`commands/password_pbkdf2.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/password_pbkdf2_module-password_pbkdf2.Tpo commands/$(DEPDIR)/password_pbkdf2_module-password_pbkdf2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/password_pbkdf2.c' object='commands/password_pbkdf2_module-password_pbkdf2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(password_pbkdf2_module_CFLAGS) $(CFLAGS) -c -o commands/password_pbkdf2_module-password_pbkdf2.o `test -f 'commands/password_pbkdf2.c' || echo '$(srcdir)/'`commands/password_pbkdf2.c
+
+commands/password_pbkdf2_module-password_pbkdf2.obj: commands/password_pbkdf2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(password_pbkdf2_module_CFLAGS) $(CFLAGS) -MT commands/password_pbkdf2_module-password_pbkdf2.obj -MD -MP -MF commands/$(DEPDIR)/password_pbkdf2_module-password_pbkdf2.Tpo -c -o commands/password_pbkdf2_module-password_pbkdf2.obj `if test -f 'commands/password_pbkdf2.c'; then $(CYGPATH_W) 'commands/password_pbkdf2.c'; else $(CYGPATH_W) '$(srcdir)/commands/password_pbkdf2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/password_pbkdf2_module-password_pbkdf2.Tpo commands/$(DEPDIR)/password_pbkdf2_module-password_pbkdf2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/password_pbkdf2.c' object='commands/password_pbkdf2_module-password_pbkdf2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(password_pbkdf2_module_CFLAGS) $(CFLAGS) -c -o commands/password_pbkdf2_module-password_pbkdf2.obj `if test -f 'commands/password_pbkdf2.c'; then $(CYGPATH_W) 'commands/password_pbkdf2.c'; else $(CYGPATH_W) '$(srcdir)/commands/password_pbkdf2.c'; fi`
+
+lib/pbkdf2_module-pbkdf2.o: lib/pbkdf2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(pbkdf2_module_CFLAGS) $(CFLAGS) -MT lib/pbkdf2_module-pbkdf2.o -MD -MP -MF lib/$(DEPDIR)/pbkdf2_module-pbkdf2.Tpo -c -o lib/pbkdf2_module-pbkdf2.o `test -f 'lib/pbkdf2.c' || echo '$(srcdir)/'`lib/pbkdf2.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/pbkdf2_module-pbkdf2.Tpo lib/$(DEPDIR)/pbkdf2_module-pbkdf2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/pbkdf2.c' object='lib/pbkdf2_module-pbkdf2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(pbkdf2_module_CFLAGS) $(CFLAGS) -c -o lib/pbkdf2_module-pbkdf2.o `test -f 'lib/pbkdf2.c' || echo '$(srcdir)/'`lib/pbkdf2.c
+
+lib/pbkdf2_module-pbkdf2.obj: lib/pbkdf2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(pbkdf2_module_CFLAGS) $(CFLAGS) -MT lib/pbkdf2_module-pbkdf2.obj -MD -MP -MF lib/$(DEPDIR)/pbkdf2_module-pbkdf2.Tpo -c -o lib/pbkdf2_module-pbkdf2.obj `if test -f 'lib/pbkdf2.c'; then $(CYGPATH_W) 'lib/pbkdf2.c'; else $(CYGPATH_W) '$(srcdir)/lib/pbkdf2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/pbkdf2_module-pbkdf2.Tpo lib/$(DEPDIR)/pbkdf2_module-pbkdf2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/pbkdf2.c' object='lib/pbkdf2_module-pbkdf2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $(pbkdf2_module_CFLAGS) $(CFLAGS) -c -o lib/pbkdf2_module-pbkdf2.obj `if test -f 'lib/pbkdf2.c'; then $(CYGPATH_W) 'lib/pbkdf2.c'; else $(CYGPATH_W) '$(srcdir)/lib/pbkdf2.c'; fi`
+
+bus/emu/pci_module-pci.o: bus/emu/pci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -MT bus/emu/pci_module-pci.o -MD -MP -MF bus/emu/$(DEPDIR)/pci_module-pci.Tpo -c -o bus/emu/pci_module-pci.o `test -f 'bus/emu/pci.c' || echo '$(srcdir)/'`bus/emu/pci.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/emu/$(DEPDIR)/pci_module-pci.Tpo bus/emu/$(DEPDIR)/pci_module-pci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/emu/pci.c' object='bus/emu/pci_module-pci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -c -o bus/emu/pci_module-pci.o `test -f 'bus/emu/pci.c' || echo '$(srcdir)/'`bus/emu/pci.c
+
+bus/emu/pci_module-pci.obj: bus/emu/pci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -MT bus/emu/pci_module-pci.obj -MD -MP -MF bus/emu/$(DEPDIR)/pci_module-pci.Tpo -c -o bus/emu/pci_module-pci.obj `if test -f 'bus/emu/pci.c'; then $(CYGPATH_W) 'bus/emu/pci.c'; else $(CYGPATH_W) '$(srcdir)/bus/emu/pci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/emu/$(DEPDIR)/pci_module-pci.Tpo bus/emu/$(DEPDIR)/pci_module-pci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/emu/pci.c' object='bus/emu/pci_module-pci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -c -o bus/emu/pci_module-pci.obj `if test -f 'bus/emu/pci.c'; then $(CYGPATH_W) 'bus/emu/pci.c'; else $(CYGPATH_W) '$(srcdir)/bus/emu/pci.c'; fi`
+
+commands/pci_module-lspci.o: commands/lspci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -MT commands/pci_module-lspci.o -MD -MP -MF commands/$(DEPDIR)/pci_module-lspci.Tpo -c -o commands/pci_module-lspci.o `test -f 'commands/lspci.c' || echo '$(srcdir)/'`commands/lspci.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/pci_module-lspci.Tpo commands/$(DEPDIR)/pci_module-lspci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lspci.c' object='commands/pci_module-lspci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -c -o commands/pci_module-lspci.o `test -f 'commands/lspci.c' || echo '$(srcdir)/'`commands/lspci.c
+
+commands/pci_module-lspci.obj: commands/lspci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -MT commands/pci_module-lspci.obj -MD -MP -MF commands/$(DEPDIR)/pci_module-lspci.Tpo -c -o commands/pci_module-lspci.obj `if test -f 'commands/lspci.c'; then $(CYGPATH_W) 'commands/lspci.c'; else $(CYGPATH_W) '$(srcdir)/commands/lspci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/pci_module-lspci.Tpo commands/$(DEPDIR)/pci_module-lspci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/lspci.c' object='commands/pci_module-lspci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -c -o commands/pci_module-lspci.obj `if test -f 'commands/lspci.c'; then $(CYGPATH_W) 'commands/lspci.c'; else $(CYGPATH_W) '$(srcdir)/commands/lspci.c'; fi`
+
+bus/pci_module-pci.o: bus/pci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -MT bus/pci_module-pci.o -MD -MP -MF bus/$(DEPDIR)/pci_module-pci.Tpo -c -o bus/pci_module-pci.o `test -f 'bus/pci.c' || echo '$(srcdir)/'`bus/pci.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/pci_module-pci.Tpo bus/$(DEPDIR)/pci_module-pci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/pci.c' object='bus/pci_module-pci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -c -o bus/pci_module-pci.o `test -f 'bus/pci.c' || echo '$(srcdir)/'`bus/pci.c
+
+bus/pci_module-pci.obj: bus/pci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -MT bus/pci_module-pci.obj -MD -MP -MF bus/$(DEPDIR)/pci_module-pci.Tpo -c -o bus/pci_module-pci.obj `if test -f 'bus/pci.c'; then $(CYGPATH_W) 'bus/pci.c'; else $(CYGPATH_W) '$(srcdir)/bus/pci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/$(DEPDIR)/pci_module-pci.Tpo bus/$(DEPDIR)/pci_module-pci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/pci.c' object='bus/pci_module-pci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $(pci_module_CFLAGS) $(CFLAGS) -c -o bus/pci_module-pci.obj `if test -f 'bus/pci.c'; then $(CYGPATH_W) 'bus/pci.c'; else $(CYGPATH_W) '$(srcdir)/bus/pci.c'; fi`
+
+commands/i386/pc/play_module-play.o: commands/i386/pc/play.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $(play_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/play_module-play.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/play_module-play.Tpo -c -o commands/i386/pc/play_module-play.o `test -f 'commands/i386/pc/play.c' || echo '$(srcdir)/'`commands/i386/pc/play.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/play_module-play.Tpo commands/i386/pc/$(DEPDIR)/play_module-play.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/play.c' object='commands/i386/pc/play_module-play.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $(play_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/play_module-play.o `test -f 'commands/i386/pc/play.c' || echo '$(srcdir)/'`commands/i386/pc/play.c
+
+commands/i386/pc/play_module-play.obj: commands/i386/pc/play.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $(play_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/play_module-play.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/play_module-play.Tpo -c -o commands/i386/pc/play_module-play.obj `if test -f 'commands/i386/pc/play.c'; then $(CYGPATH_W) 'commands/i386/pc/play.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/play.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/play_module-play.Tpo commands/i386/pc/$(DEPDIR)/play_module-play.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/play.c' object='commands/i386/pc/play_module-play.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $(play_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/play_module-play.obj `if test -f 'commands/i386/pc/play.c'; then $(CYGPATH_W) 'commands/i386/pc/play.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/play.c'; fi`
+
+video/readers/png_module-png.o: video/readers/png.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $(png_module_CFLAGS) $(CFLAGS) -MT video/readers/png_module-png.o -MD -MP -MF video/readers/$(DEPDIR)/png_module-png.Tpo -c -o video/readers/png_module-png.o `test -f 'video/readers/png.c' || echo '$(srcdir)/'`video/readers/png.c
+@am__fastdepCC_TRUE@ $(am__mv) video/readers/$(DEPDIR)/png_module-png.Tpo video/readers/$(DEPDIR)/png_module-png.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/readers/png.c' object='video/readers/png_module-png.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $(png_module_CFLAGS) $(CFLAGS) -c -o video/readers/png_module-png.o `test -f 'video/readers/png.c' || echo '$(srcdir)/'`video/readers/png.c
+
+video/readers/png_module-png.obj: video/readers/png.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $(png_module_CFLAGS) $(CFLAGS) -MT video/readers/png_module-png.obj -MD -MP -MF video/readers/$(DEPDIR)/png_module-png.Tpo -c -o video/readers/png_module-png.obj `if test -f 'video/readers/png.c'; then $(CYGPATH_W) 'video/readers/png.c'; else $(CYGPATH_W) '$(srcdir)/video/readers/png.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/readers/$(DEPDIR)/png_module-png.Tpo video/readers/$(DEPDIR)/png_module-png.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/readers/png.c' object='video/readers/png_module-png.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $(png_module_CFLAGS) $(CFLAGS) -c -o video/readers/png_module-png.obj `if test -f 'video/readers/png.c'; then $(CYGPATH_W) 'video/readers/png.c'; else $(CYGPATH_W) '$(srcdir)/video/readers/png.c'; fi`
+
+commands/probe_module-probe.o: commands/probe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $(probe_module_CFLAGS) $(CFLAGS) -MT commands/probe_module-probe.o -MD -MP -MF commands/$(DEPDIR)/probe_module-probe.Tpo -c -o commands/probe_module-probe.o `test -f 'commands/probe.c' || echo '$(srcdir)/'`commands/probe.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/probe_module-probe.Tpo commands/$(DEPDIR)/probe_module-probe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/probe.c' object='commands/probe_module-probe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $(probe_module_CFLAGS) $(CFLAGS) -c -o commands/probe_module-probe.o `test -f 'commands/probe.c' || echo '$(srcdir)/'`commands/probe.c
+
+commands/probe_module-probe.obj: commands/probe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $(probe_module_CFLAGS) $(CFLAGS) -MT commands/probe_module-probe.obj -MD -MP -MF commands/$(DEPDIR)/probe_module-probe.Tpo -c -o commands/probe_module-probe.obj `if test -f 'commands/probe.c'; then $(CYGPATH_W) 'commands/probe.c'; else $(CYGPATH_W) '$(srcdir)/commands/probe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/probe_module-probe.Tpo commands/$(DEPDIR)/probe_module-probe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/probe.c' object='commands/probe_module-probe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $(probe_module_CFLAGS) $(CFLAGS) -c -o commands/probe_module-probe.obj `if test -f 'commands/probe.c'; then $(CYGPATH_W) 'commands/probe.c'; else $(CYGPATH_W) '$(srcdir)/commands/probe.c'; fi`
+
+fs/i386/pc/pxe_module-pxe.o: fs/i386/pc/pxe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxe_module_CPPFLAGS) $(CPPFLAGS) $(pxe_module_CFLAGS) $(CFLAGS) -MT fs/i386/pc/pxe_module-pxe.o -MD -MP -MF fs/i386/pc/$(DEPDIR)/pxe_module-pxe.Tpo -c -o fs/i386/pc/pxe_module-pxe.o `test -f 'fs/i386/pc/pxe.c' || echo '$(srcdir)/'`fs/i386/pc/pxe.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/i386/pc/$(DEPDIR)/pxe_module-pxe.Tpo fs/i386/pc/$(DEPDIR)/pxe_module-pxe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/i386/pc/pxe.c' object='fs/i386/pc/pxe_module-pxe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxe_module_CPPFLAGS) $(CPPFLAGS) $(pxe_module_CFLAGS) $(CFLAGS) -c -o fs/i386/pc/pxe_module-pxe.o `test -f 'fs/i386/pc/pxe.c' || echo '$(srcdir)/'`fs/i386/pc/pxe.c
+
+fs/i386/pc/pxe_module-pxe.obj: fs/i386/pc/pxe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxe_module_CPPFLAGS) $(CPPFLAGS) $(pxe_module_CFLAGS) $(CFLAGS) -MT fs/i386/pc/pxe_module-pxe.obj -MD -MP -MF fs/i386/pc/$(DEPDIR)/pxe_module-pxe.Tpo -c -o fs/i386/pc/pxe_module-pxe.obj `if test -f 'fs/i386/pc/pxe.c'; then $(CYGPATH_W) 'fs/i386/pc/pxe.c'; else $(CYGPATH_W) '$(srcdir)/fs/i386/pc/pxe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/i386/pc/$(DEPDIR)/pxe_module-pxe.Tpo fs/i386/pc/$(DEPDIR)/pxe_module-pxe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/i386/pc/pxe.c' object='fs/i386/pc/pxe_module-pxe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxe_module_CPPFLAGS) $(CPPFLAGS) $(pxe_module_CFLAGS) $(CFLAGS) -c -o fs/i386/pc/pxe_module-pxe.obj `if test -f 'fs/i386/pc/pxe.c'; then $(CYGPATH_W) 'fs/i386/pc/pxe.c'; else $(CYGPATH_W) '$(srcdir)/fs/i386/pc/pxe.c'; fi`
+
+commands/i386/pc/pxecmd_module-pxecmd.o: commands/i386/pc/pxecmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxecmd_module_CPPFLAGS) $(CPPFLAGS) $(pxecmd_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/pxecmd_module-pxecmd.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/pxecmd_module-pxecmd.Tpo -c -o commands/i386/pc/pxecmd_module-pxecmd.o `test -f 'commands/i386/pc/pxecmd.c' || echo '$(srcdir)/'`commands/i386/pc/pxecmd.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/pxecmd_module-pxecmd.Tpo commands/i386/pc/$(DEPDIR)/pxecmd_module-pxecmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/pxecmd.c' object='commands/i386/pc/pxecmd_module-pxecmd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxecmd_module_CPPFLAGS) $(CPPFLAGS) $(pxecmd_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/pxecmd_module-pxecmd.o `test -f 'commands/i386/pc/pxecmd.c' || echo '$(srcdir)/'`commands/i386/pc/pxecmd.c
+
+commands/i386/pc/pxecmd_module-pxecmd.obj: commands/i386/pc/pxecmd.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxecmd_module_CPPFLAGS) $(CPPFLAGS) $(pxecmd_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/pxecmd_module-pxecmd.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/pxecmd_module-pxecmd.Tpo -c -o commands/i386/pc/pxecmd_module-pxecmd.obj `if test -f 'commands/i386/pc/pxecmd.c'; then $(CYGPATH_W) 'commands/i386/pc/pxecmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/pxecmd.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/pxecmd_module-pxecmd.Tpo commands/i386/pc/$(DEPDIR)/pxecmd_module-pxecmd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/pxecmd.c' object='commands/i386/pc/pxecmd_module-pxecmd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxecmd_module_CPPFLAGS) $(CPPFLAGS) $(pxecmd_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/pxecmd_module-pxecmd.obj `if test -f 'commands/i386/pc/pxecmd.c'; then $(CYGPATH_W) 'commands/i386/pc/pxecmd.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/pxecmd.c'; fi`
+
+disk/raid_module-raid.o: disk/raid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $(raid_module_CFLAGS) $(CFLAGS) -MT disk/raid_module-raid.o -MD -MP -MF disk/$(DEPDIR)/raid_module-raid.Tpo -c -o disk/raid_module-raid.o `test -f 'disk/raid.c' || echo '$(srcdir)/'`disk/raid.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/raid_module-raid.Tpo disk/$(DEPDIR)/raid_module-raid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/raid.c' object='disk/raid_module-raid.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $(raid_module_CFLAGS) $(CFLAGS) -c -o disk/raid_module-raid.o `test -f 'disk/raid.c' || echo '$(srcdir)/'`disk/raid.c
+
+disk/raid_module-raid.obj: disk/raid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $(raid_module_CFLAGS) $(CFLAGS) -MT disk/raid_module-raid.obj -MD -MP -MF disk/$(DEPDIR)/raid_module-raid.Tpo -c -o disk/raid_module-raid.obj `if test -f 'disk/raid.c'; then $(CYGPATH_W) 'disk/raid.c'; else $(CYGPATH_W) '$(srcdir)/disk/raid.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/raid_module-raid.Tpo disk/$(DEPDIR)/raid_module-raid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/raid.c' object='disk/raid_module-raid.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $(raid_module_CFLAGS) $(CFLAGS) -c -o disk/raid_module-raid.obj `if test -f 'disk/raid.c'; then $(CYGPATH_W) 'disk/raid.c'; else $(CYGPATH_W) '$(srcdir)/disk/raid.c'; fi`
+
+disk/raid5rec_module-raid5_recover.o: disk/raid5_recover.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $(raid5rec_module_CFLAGS) $(CFLAGS) -MT disk/raid5rec_module-raid5_recover.o -MD -MP -MF disk/$(DEPDIR)/raid5rec_module-raid5_recover.Tpo -c -o disk/raid5rec_module-raid5_recover.o `test -f 'disk/raid5_recover.c' || echo '$(srcdir)/'`disk/raid5_recover.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/raid5rec_module-raid5_recover.Tpo disk/$(DEPDIR)/raid5rec_module-raid5_recover.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/raid5_recover.c' object='disk/raid5rec_module-raid5_recover.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $(raid5rec_module_CFLAGS) $(CFLAGS) -c -o disk/raid5rec_module-raid5_recover.o `test -f 'disk/raid5_recover.c' || echo '$(srcdir)/'`disk/raid5_recover.c
+
+disk/raid5rec_module-raid5_recover.obj: disk/raid5_recover.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $(raid5rec_module_CFLAGS) $(CFLAGS) -MT disk/raid5rec_module-raid5_recover.obj -MD -MP -MF disk/$(DEPDIR)/raid5rec_module-raid5_recover.Tpo -c -o disk/raid5rec_module-raid5_recover.obj `if test -f 'disk/raid5_recover.c'; then $(CYGPATH_W) 'disk/raid5_recover.c'; else $(CYGPATH_W) '$(srcdir)/disk/raid5_recover.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/raid5rec_module-raid5_recover.Tpo disk/$(DEPDIR)/raid5rec_module-raid5_recover.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/raid5_recover.c' object='disk/raid5rec_module-raid5_recover.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $(raid5rec_module_CFLAGS) $(CFLAGS) -c -o disk/raid5rec_module-raid5_recover.obj `if test -f 'disk/raid5_recover.c'; then $(CYGPATH_W) 'disk/raid5_recover.c'; else $(CYGPATH_W) '$(srcdir)/disk/raid5_recover.c'; fi`
+
+disk/raid6rec_module-raid6_recover.o: disk/raid6_recover.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $(raid6rec_module_CFLAGS) $(CFLAGS) -MT disk/raid6rec_module-raid6_recover.o -MD -MP -MF disk/$(DEPDIR)/raid6rec_module-raid6_recover.Tpo -c -o disk/raid6rec_module-raid6_recover.o `test -f 'disk/raid6_recover.c' || echo '$(srcdir)/'`disk/raid6_recover.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/raid6rec_module-raid6_recover.Tpo disk/$(DEPDIR)/raid6rec_module-raid6_recover.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/raid6_recover.c' object='disk/raid6rec_module-raid6_recover.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $(raid6rec_module_CFLAGS) $(CFLAGS) -c -o disk/raid6rec_module-raid6_recover.o `test -f 'disk/raid6_recover.c' || echo '$(srcdir)/'`disk/raid6_recover.c
+
+disk/raid6rec_module-raid6_recover.obj: disk/raid6_recover.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $(raid6rec_module_CFLAGS) $(CFLAGS) -MT disk/raid6rec_module-raid6_recover.obj -MD -MP -MF disk/$(DEPDIR)/raid6rec_module-raid6_recover.Tpo -c -o disk/raid6rec_module-raid6_recover.obj `if test -f 'disk/raid6_recover.c'; then $(CYGPATH_W) 'disk/raid6_recover.c'; else $(CYGPATH_W) '$(srcdir)/disk/raid6_recover.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/raid6rec_module-raid6_recover.Tpo disk/$(DEPDIR)/raid6rec_module-raid6_recover.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/raid6_recover.c' object='disk/raid6rec_module-raid6_recover.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $(raid6rec_module_CFLAGS) $(CFLAGS) -c -o disk/raid6rec_module-raid6_recover.obj `if test -f 'disk/raid6_recover.c'; then $(CYGPATH_W) 'disk/raid6_recover.c'; else $(CYGPATH_W) '$(srcdir)/disk/raid6_recover.c'; fi`
+
+commands/read_module-read.o: commands/read.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $(read_module_CFLAGS) $(CFLAGS) -MT commands/read_module-read.o -MD -MP -MF commands/$(DEPDIR)/read_module-read.Tpo -c -o commands/read_module-read.o `test -f 'commands/read.c' || echo '$(srcdir)/'`commands/read.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/read_module-read.Tpo commands/$(DEPDIR)/read_module-read.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/read.c' object='commands/read_module-read.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $(read_module_CFLAGS) $(CFLAGS) -c -o commands/read_module-read.o `test -f 'commands/read.c' || echo '$(srcdir)/'`commands/read.c
+
+commands/read_module-read.obj: commands/read.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $(read_module_CFLAGS) $(CFLAGS) -MT commands/read_module-read.obj -MD -MP -MF commands/$(DEPDIR)/read_module-read.Tpo -c -o commands/read_module-read.obj `if test -f 'commands/read.c'; then $(CYGPATH_W) 'commands/read.c'; else $(CYGPATH_W) '$(srcdir)/commands/read.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/read_module-read.Tpo commands/$(DEPDIR)/read_module-read.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/read.c' object='commands/read_module-read.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $(read_module_CFLAGS) $(CFLAGS) -c -o commands/read_module-read.obj `if test -f 'commands/read.c'; then $(CYGPATH_W) 'commands/read.c'; else $(CYGPATH_W) '$(srcdir)/commands/read.c'; fi`
+
+commands/reboot_module-reboot.o: commands/reboot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $(reboot_module_CFLAGS) $(CFLAGS) -MT commands/reboot_module-reboot.o -MD -MP -MF commands/$(DEPDIR)/reboot_module-reboot.Tpo -c -o commands/reboot_module-reboot.o `test -f 'commands/reboot.c' || echo '$(srcdir)/'`commands/reboot.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/reboot_module-reboot.Tpo commands/$(DEPDIR)/reboot_module-reboot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/reboot.c' object='commands/reboot_module-reboot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $(reboot_module_CFLAGS) $(CFLAGS) -c -o commands/reboot_module-reboot.o `test -f 'commands/reboot.c' || echo '$(srcdir)/'`commands/reboot.c
+
+commands/reboot_module-reboot.obj: commands/reboot.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $(reboot_module_CFLAGS) $(CFLAGS) -MT commands/reboot_module-reboot.obj -MD -MP -MF commands/$(DEPDIR)/reboot_module-reboot.Tpo -c -o commands/reboot_module-reboot.obj `if test -f 'commands/reboot.c'; then $(CYGPATH_W) 'commands/reboot.c'; else $(CYGPATH_W) '$(srcdir)/commands/reboot.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/reboot_module-reboot.Tpo commands/$(DEPDIR)/reboot_module-reboot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/reboot.c' object='commands/reboot_module-reboot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $(reboot_module_CFLAGS) $(CFLAGS) -c -o commands/reboot_module-reboot.obj `if test -f 'commands/reboot.c'; then $(CYGPATH_W) 'commands/reboot.c'; else $(CYGPATH_W) '$(srcdir)/commands/reboot.c'; fi`
+
+commands/regexp_module-regexp.o: commands/regexp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -MT commands/regexp_module-regexp.o -MD -MP -MF commands/$(DEPDIR)/regexp_module-regexp.Tpo -c -o commands/regexp_module-regexp.o `test -f 'commands/regexp.c' || echo '$(srcdir)/'`commands/regexp.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/regexp_module-regexp.Tpo commands/$(DEPDIR)/regexp_module-regexp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/regexp.c' object='commands/regexp_module-regexp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -c -o commands/regexp_module-regexp.o `test -f 'commands/regexp.c' || echo '$(srcdir)/'`commands/regexp.c
+
+commands/regexp_module-regexp.obj: commands/regexp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -MT commands/regexp_module-regexp.obj -MD -MP -MF commands/$(DEPDIR)/regexp_module-regexp.Tpo -c -o commands/regexp_module-regexp.obj `if test -f 'commands/regexp.c'; then $(CYGPATH_W) 'commands/regexp.c'; else $(CYGPATH_W) '$(srcdir)/commands/regexp.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/regexp_module-regexp.Tpo commands/$(DEPDIR)/regexp_module-regexp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/regexp.c' object='commands/regexp_module-regexp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -c -o commands/regexp_module-regexp.obj `if test -f 'commands/regexp.c'; then $(CYGPATH_W) 'commands/regexp.c'; else $(CYGPATH_W) '$(srcdir)/commands/regexp.c'; fi`
+
+commands/regexp_module-wildcard.o: commands/wildcard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -MT commands/regexp_module-wildcard.o -MD -MP -MF commands/$(DEPDIR)/regexp_module-wildcard.Tpo -c -o commands/regexp_module-wildcard.o `test -f 'commands/wildcard.c' || echo '$(srcdir)/'`commands/wildcard.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/regexp_module-wildcard.Tpo commands/$(DEPDIR)/regexp_module-wildcard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/wildcard.c' object='commands/regexp_module-wildcard.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -c -o commands/regexp_module-wildcard.o `test -f 'commands/wildcard.c' || echo '$(srcdir)/'`commands/wildcard.c
+
+commands/regexp_module-wildcard.obj: commands/wildcard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -MT commands/regexp_module-wildcard.obj -MD -MP -MF commands/$(DEPDIR)/regexp_module-wildcard.Tpo -c -o commands/regexp_module-wildcard.obj `if test -f 'commands/wildcard.c'; then $(CYGPATH_W) 'commands/wildcard.c'; else $(CYGPATH_W) '$(srcdir)/commands/wildcard.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/regexp_module-wildcard.Tpo commands/$(DEPDIR)/regexp_module-wildcard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/wildcard.c' object='commands/regexp_module-wildcard.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $(regexp_module_CFLAGS) $(CFLAGS) -c -o commands/regexp_module-wildcard.obj `if test -f 'commands/wildcard.c'; then $(CYGPATH_W) 'commands/wildcard.c'; else $(CYGPATH_W) '$(srcdir)/commands/wildcard.c'; fi`
+
+fs/reiserfs_module-reiserfs.o: fs/reiserfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $(reiserfs_module_CFLAGS) $(CFLAGS) -MT fs/reiserfs_module-reiserfs.o -MD -MP -MF fs/$(DEPDIR)/reiserfs_module-reiserfs.Tpo -c -o fs/reiserfs_module-reiserfs.o `test -f 'fs/reiserfs.c' || echo '$(srcdir)/'`fs/reiserfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/reiserfs_module-reiserfs.Tpo fs/$(DEPDIR)/reiserfs_module-reiserfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/reiserfs.c' object='fs/reiserfs_module-reiserfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $(reiserfs_module_CFLAGS) $(CFLAGS) -c -o fs/reiserfs_module-reiserfs.o `test -f 'fs/reiserfs.c' || echo '$(srcdir)/'`fs/reiserfs.c
+
+fs/reiserfs_module-reiserfs.obj: fs/reiserfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $(reiserfs_module_CFLAGS) $(CFLAGS) -MT fs/reiserfs_module-reiserfs.obj -MD -MP -MF fs/$(DEPDIR)/reiserfs_module-reiserfs.Tpo -c -o fs/reiserfs_module-reiserfs.obj `if test -f 'fs/reiserfs.c'; then $(CYGPATH_W) 'fs/reiserfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/reiserfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/reiserfs_module-reiserfs.Tpo fs/$(DEPDIR)/reiserfs_module-reiserfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/reiserfs.c' object='fs/reiserfs_module-reiserfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $(reiserfs_module_CFLAGS) $(CFLAGS) -c -o fs/reiserfs_module-reiserfs.obj `if test -f 'fs/reiserfs.c'; then $(CYGPATH_W) 'fs/reiserfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/reiserfs.c'; fi`
+
+lib/i386/relocator_module-relocator.o: lib/i386/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/i386/relocator_module-relocator.o -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/i386/relocator_module-relocator.o `test -f 'lib/i386/relocator.c' || echo '$(srcdir)/'`lib/i386/relocator.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/relocator.c' object='lib/i386/relocator_module-relocator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/i386/relocator_module-relocator.o `test -f 'lib/i386/relocator.c' || echo '$(srcdir)/'`lib/i386/relocator.c
+
+lib/i386/relocator_module-relocator.obj: lib/i386/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/i386/relocator_module-relocator.obj -MD -MP -MF lib/i386/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/i386/relocator_module-relocator.obj `if test -f 'lib/i386/relocator.c'; then $(CYGPATH_W) 'lib/i386/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/i386/$(DEPDIR)/relocator_module-relocator.Tpo lib/i386/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/i386/relocator.c' object='lib/i386/relocator_module-relocator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/i386/relocator_module-relocator.obj `if test -f 'lib/i386/relocator.c'; then $(CYGPATH_W) 'lib/i386/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/i386/relocator.c'; fi`
+
+lib/relocator_module-relocator.o: lib/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/relocator_module-relocator.o -MD -MP -MF lib/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/relocator_module-relocator.o `test -f 'lib/relocator.c' || echo '$(srcdir)/'`lib/relocator.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/relocator_module-relocator.Tpo lib/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/relocator.c' object='lib/relocator_module-relocator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/relocator_module-relocator.o `test -f 'lib/relocator.c' || echo '$(srcdir)/'`lib/relocator.c
+
+lib/relocator_module-relocator.obj: lib/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/relocator_module-relocator.obj -MD -MP -MF lib/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/relocator_module-relocator.obj `if test -f 'lib/relocator.c'; then $(CYGPATH_W) 'lib/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/relocator.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/$(DEPDIR)/relocator_module-relocator.Tpo lib/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/relocator.c' object='lib/relocator_module-relocator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/relocator_module-relocator.obj `if test -f 'lib/relocator.c'; then $(CYGPATH_W) 'lib/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/relocator.c'; fi`
+
+lib/efi/relocator_module-relocator.o: lib/efi/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/efi/relocator_module-relocator.o -MD -MP -MF lib/efi/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/efi/relocator_module-relocator.o `test -f 'lib/efi/relocator.c' || echo '$(srcdir)/'`lib/efi/relocator.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/efi/$(DEPDIR)/relocator_module-relocator.Tpo lib/efi/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/efi/relocator.c' object='lib/efi/relocator_module-relocator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/efi/relocator_module-relocator.o `test -f 'lib/efi/relocator.c' || echo '$(srcdir)/'`lib/efi/relocator.c
+
+lib/efi/relocator_module-relocator.obj: lib/efi/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/efi/relocator_module-relocator.obj -MD -MP -MF lib/efi/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/efi/relocator_module-relocator.obj `if test -f 'lib/efi/relocator.c'; then $(CYGPATH_W) 'lib/efi/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/efi/relocator.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/efi/$(DEPDIR)/relocator_module-relocator.Tpo lib/efi/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/efi/relocator.c' object='lib/efi/relocator_module-relocator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/efi/relocator_module-relocator.obj `if test -f 'lib/efi/relocator.c'; then $(CYGPATH_W) 'lib/efi/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/efi/relocator.c'; fi`
+
+lib/ieee1275/relocator_module-relocator.o: lib/ieee1275/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/ieee1275/relocator_module-relocator.o -MD -MP -MF lib/ieee1275/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/ieee1275/relocator_module-relocator.o `test -f 'lib/ieee1275/relocator.c' || echo '$(srcdir)/'`lib/ieee1275/relocator.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/ieee1275/$(DEPDIR)/relocator_module-relocator.Tpo lib/ieee1275/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/ieee1275/relocator.c' object='lib/ieee1275/relocator_module-relocator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/ieee1275/relocator_module-relocator.o `test -f 'lib/ieee1275/relocator.c' || echo '$(srcdir)/'`lib/ieee1275/relocator.c
+
+lib/ieee1275/relocator_module-relocator.obj: lib/ieee1275/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/ieee1275/relocator_module-relocator.obj -MD -MP -MF lib/ieee1275/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/ieee1275/relocator_module-relocator.obj `if test -f 'lib/ieee1275/relocator.c'; then $(CYGPATH_W) 'lib/ieee1275/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/ieee1275/relocator.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/ieee1275/$(DEPDIR)/relocator_module-relocator.Tpo lib/ieee1275/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/ieee1275/relocator.c' object='lib/ieee1275/relocator_module-relocator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/ieee1275/relocator_module-relocator.obj `if test -f 'lib/ieee1275/relocator.c'; then $(CYGPATH_W) 'lib/ieee1275/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/ieee1275/relocator.c'; fi`
+
+lib/mips/relocator_module-relocator.o: lib/mips/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/mips/relocator_module-relocator.o -MD -MP -MF lib/mips/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/mips/relocator_module-relocator.o `test -f 'lib/mips/relocator.c' || echo '$(srcdir)/'`lib/mips/relocator.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/mips/$(DEPDIR)/relocator_module-relocator.Tpo lib/mips/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/mips/relocator.c' object='lib/mips/relocator_module-relocator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/mips/relocator_module-relocator.o `test -f 'lib/mips/relocator.c' || echo '$(srcdir)/'`lib/mips/relocator.c
+
+lib/mips/relocator_module-relocator.obj: lib/mips/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/mips/relocator_module-relocator.obj -MD -MP -MF lib/mips/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/mips/relocator_module-relocator.obj `if test -f 'lib/mips/relocator.c'; then $(CYGPATH_W) 'lib/mips/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/mips/relocator.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/mips/$(DEPDIR)/relocator_module-relocator.Tpo lib/mips/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/mips/relocator.c' object='lib/mips/relocator_module-relocator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/mips/relocator_module-relocator.obj `if test -f 'lib/mips/relocator.c'; then $(CYGPATH_W) 'lib/mips/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/mips/relocator.c'; fi`
+
+lib/powerpc/relocator_module-relocator.o: lib/powerpc/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/powerpc/relocator_module-relocator.o -MD -MP -MF lib/powerpc/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/powerpc/relocator_module-relocator.o `test -f 'lib/powerpc/relocator.c' || echo '$(srcdir)/'`lib/powerpc/relocator.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/powerpc/$(DEPDIR)/relocator_module-relocator.Tpo lib/powerpc/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/powerpc/relocator.c' object='lib/powerpc/relocator_module-relocator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/powerpc/relocator_module-relocator.o `test -f 'lib/powerpc/relocator.c' || echo '$(srcdir)/'`lib/powerpc/relocator.c
+
+lib/powerpc/relocator_module-relocator.obj: lib/powerpc/relocator.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -MT lib/powerpc/relocator_module-relocator.obj -MD -MP -MF lib/powerpc/$(DEPDIR)/relocator_module-relocator.Tpo -c -o lib/powerpc/relocator_module-relocator.obj `if test -f 'lib/powerpc/relocator.c'; then $(CYGPATH_W) 'lib/powerpc/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/powerpc/relocator.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/powerpc/$(DEPDIR)/relocator_module-relocator.Tpo lib/powerpc/$(DEPDIR)/relocator_module-relocator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/powerpc/relocator.c' object='lib/powerpc/relocator_module-relocator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $(relocator_module_CFLAGS) $(CFLAGS) -c -o lib/powerpc/relocator_module-relocator.obj `if test -f 'lib/powerpc/relocator.c'; then $(CYGPATH_W) 'lib/powerpc/relocator.c'; else $(CYGPATH_W) '$(srcdir)/lib/powerpc/relocator.c'; fi`
+
+disk/scsi_module-scsi.o: disk/scsi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $(scsi_module_CFLAGS) $(CFLAGS) -MT disk/scsi_module-scsi.o -MD -MP -MF disk/$(DEPDIR)/scsi_module-scsi.Tpo -c -o disk/scsi_module-scsi.o `test -f 'disk/scsi.c' || echo '$(srcdir)/'`disk/scsi.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/scsi_module-scsi.Tpo disk/$(DEPDIR)/scsi_module-scsi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/scsi.c' object='disk/scsi_module-scsi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $(scsi_module_CFLAGS) $(CFLAGS) -c -o disk/scsi_module-scsi.o `test -f 'disk/scsi.c' || echo '$(srcdir)/'`disk/scsi.c
+
+disk/scsi_module-scsi.obj: disk/scsi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $(scsi_module_CFLAGS) $(CFLAGS) -MT disk/scsi_module-scsi.obj -MD -MP -MF disk/$(DEPDIR)/scsi_module-scsi.Tpo -c -o disk/scsi_module-scsi.obj `if test -f 'disk/scsi.c'; then $(CYGPATH_W) 'disk/scsi.c'; else $(CYGPATH_W) '$(srcdir)/disk/scsi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/scsi_module-scsi.Tpo disk/$(DEPDIR)/scsi_module-scsi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/scsi.c' object='disk/scsi_module-scsi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $(scsi_module_CFLAGS) $(CFLAGS) -c -o disk/scsi_module-scsi.obj `if test -f 'disk/scsi.c'; then $(CYGPATH_W) 'disk/scsi.c'; else $(CYGPATH_W) '$(srcdir)/disk/scsi.c'; fi`
+
+video/emu/sdl_module-sdl.o: video/emu/sdl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sdl_module_CPPFLAGS) $(CPPFLAGS) $(sdl_module_CFLAGS) $(CFLAGS) -MT video/emu/sdl_module-sdl.o -MD -MP -MF video/emu/$(DEPDIR)/sdl_module-sdl.Tpo -c -o video/emu/sdl_module-sdl.o `test -f 'video/emu/sdl.c' || echo '$(srcdir)/'`video/emu/sdl.c
+@am__fastdepCC_TRUE@ $(am__mv) video/emu/$(DEPDIR)/sdl_module-sdl.Tpo video/emu/$(DEPDIR)/sdl_module-sdl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/emu/sdl.c' object='video/emu/sdl_module-sdl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sdl_module_CPPFLAGS) $(CPPFLAGS) $(sdl_module_CFLAGS) $(CFLAGS) -c -o video/emu/sdl_module-sdl.o `test -f 'video/emu/sdl.c' || echo '$(srcdir)/'`video/emu/sdl.c
+
+video/emu/sdl_module-sdl.obj: video/emu/sdl.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sdl_module_CPPFLAGS) $(CPPFLAGS) $(sdl_module_CFLAGS) $(CFLAGS) -MT video/emu/sdl_module-sdl.obj -MD -MP -MF video/emu/$(DEPDIR)/sdl_module-sdl.Tpo -c -o video/emu/sdl_module-sdl.obj `if test -f 'video/emu/sdl.c'; then $(CYGPATH_W) 'video/emu/sdl.c'; else $(CYGPATH_W) '$(srcdir)/video/emu/sdl.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/emu/$(DEPDIR)/sdl_module-sdl.Tpo video/emu/$(DEPDIR)/sdl_module-sdl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/emu/sdl.c' object='video/emu/sdl_module-sdl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sdl_module_CPPFLAGS) $(CPPFLAGS) $(sdl_module_CFLAGS) $(CFLAGS) -c -o video/emu/sdl_module-sdl.obj `if test -f 'video/emu/sdl.c'; then $(CYGPATH_W) 'video/emu/sdl.c'; else $(CYGPATH_W) '$(srcdir)/video/emu/sdl.c'; fi`
+
+commands/search_module-search_wrap.o: commands/search_wrap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $(search_module_CFLAGS) $(CFLAGS) -MT commands/search_module-search_wrap.o -MD -MP -MF commands/$(DEPDIR)/search_module-search_wrap.Tpo -c -o commands/search_module-search_wrap.o `test -f 'commands/search_wrap.c' || echo '$(srcdir)/'`commands/search_wrap.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_module-search_wrap.Tpo commands/$(DEPDIR)/search_module-search_wrap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_wrap.c' object='commands/search_module-search_wrap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $(search_module_CFLAGS) $(CFLAGS) -c -o commands/search_module-search_wrap.o `test -f 'commands/search_wrap.c' || echo '$(srcdir)/'`commands/search_wrap.c
+
+commands/search_module-search_wrap.obj: commands/search_wrap.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $(search_module_CFLAGS) $(CFLAGS) -MT commands/search_module-search_wrap.obj -MD -MP -MF commands/$(DEPDIR)/search_module-search_wrap.Tpo -c -o commands/search_module-search_wrap.obj `if test -f 'commands/search_wrap.c'; then $(CYGPATH_W) 'commands/search_wrap.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_wrap.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_module-search_wrap.Tpo commands/$(DEPDIR)/search_module-search_wrap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_wrap.c' object='commands/search_module-search_wrap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $(search_module_CFLAGS) $(CFLAGS) -c -o commands/search_module-search_wrap.obj `if test -f 'commands/search_wrap.c'; then $(CYGPATH_W) 'commands/search_wrap.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_wrap.c'; fi`
+
+commands/search_fs_file_module-search_file.o: commands/search_file.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_file_module_CFLAGS) $(CFLAGS) -MT commands/search_fs_file_module-search_file.o -MD -MP -MF commands/$(DEPDIR)/search_fs_file_module-search_file.Tpo -c -o commands/search_fs_file_module-search_file.o `test -f 'commands/search_file.c' || echo '$(srcdir)/'`commands/search_file.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_fs_file_module-search_file.Tpo commands/$(DEPDIR)/search_fs_file_module-search_file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_file.c' object='commands/search_fs_file_module-search_file.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_file_module_CFLAGS) $(CFLAGS) -c -o commands/search_fs_file_module-search_file.o `test -f 'commands/search_file.c' || echo '$(srcdir)/'`commands/search_file.c
+
+commands/search_fs_file_module-search_file.obj: commands/search_file.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_file_module_CFLAGS) $(CFLAGS) -MT commands/search_fs_file_module-search_file.obj -MD -MP -MF commands/$(DEPDIR)/search_fs_file_module-search_file.Tpo -c -o commands/search_fs_file_module-search_file.obj `if test -f 'commands/search_file.c'; then $(CYGPATH_W) 'commands/search_file.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_file.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_fs_file_module-search_file.Tpo commands/$(DEPDIR)/search_fs_file_module-search_file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_file.c' object='commands/search_fs_file_module-search_file.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_file_module_CFLAGS) $(CFLAGS) -c -o commands/search_fs_file_module-search_file.obj `if test -f 'commands/search_file.c'; then $(CYGPATH_W) 'commands/search_file.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_file.c'; fi`
+
+commands/search_fs_uuid_module-search_uuid.o: commands/search_uuid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_uuid_module_CFLAGS) $(CFLAGS) -MT commands/search_fs_uuid_module-search_uuid.o -MD -MP -MF commands/$(DEPDIR)/search_fs_uuid_module-search_uuid.Tpo -c -o commands/search_fs_uuid_module-search_uuid.o `test -f 'commands/search_uuid.c' || echo '$(srcdir)/'`commands/search_uuid.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_fs_uuid_module-search_uuid.Tpo commands/$(DEPDIR)/search_fs_uuid_module-search_uuid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_uuid.c' object='commands/search_fs_uuid_module-search_uuid.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_uuid_module_CFLAGS) $(CFLAGS) -c -o commands/search_fs_uuid_module-search_uuid.o `test -f 'commands/search_uuid.c' || echo '$(srcdir)/'`commands/search_uuid.c
+
+commands/search_fs_uuid_module-search_uuid.obj: commands/search_uuid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_uuid_module_CFLAGS) $(CFLAGS) -MT commands/search_fs_uuid_module-search_uuid.obj -MD -MP -MF commands/$(DEPDIR)/search_fs_uuid_module-search_uuid.Tpo -c -o commands/search_fs_uuid_module-search_uuid.obj `if test -f 'commands/search_uuid.c'; then $(CYGPATH_W) 'commands/search_uuid.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_uuid.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_fs_uuid_module-search_uuid.Tpo commands/$(DEPDIR)/search_fs_uuid_module-search_uuid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_uuid.c' object='commands/search_fs_uuid_module-search_uuid.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $(search_fs_uuid_module_CFLAGS) $(CFLAGS) -c -o commands/search_fs_uuid_module-search_uuid.obj `if test -f 'commands/search_uuid.c'; then $(CYGPATH_W) 'commands/search_uuid.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_uuid.c'; fi`
+
+commands/search_label_module-search_label.o: commands/search_label.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $(search_label_module_CFLAGS) $(CFLAGS) -MT commands/search_label_module-search_label.o -MD -MP -MF commands/$(DEPDIR)/search_label_module-search_label.Tpo -c -o commands/search_label_module-search_label.o `test -f 'commands/search_label.c' || echo '$(srcdir)/'`commands/search_label.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_label_module-search_label.Tpo commands/$(DEPDIR)/search_label_module-search_label.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_label.c' object='commands/search_label_module-search_label.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $(search_label_module_CFLAGS) $(CFLAGS) -c -o commands/search_label_module-search_label.o `test -f 'commands/search_label.c' || echo '$(srcdir)/'`commands/search_label.c
+
+commands/search_label_module-search_label.obj: commands/search_label.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $(search_label_module_CFLAGS) $(CFLAGS) -MT commands/search_label_module-search_label.obj -MD -MP -MF commands/$(DEPDIR)/search_label_module-search_label.Tpo -c -o commands/search_label_module-search_label.obj `if test -f 'commands/search_label.c'; then $(CYGPATH_W) 'commands/search_label.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_label.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/search_label_module-search_label.Tpo commands/$(DEPDIR)/search_label_module-search_label.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/search_label.c' object='commands/search_label_module-search_label.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $(search_label_module_CFLAGS) $(CFLAGS) -c -o commands/search_label_module-search_label.obj `if test -f 'commands/search_label.c'; then $(CYGPATH_W) 'commands/search_label.c'; else $(CYGPATH_W) '$(srcdir)/commands/search_label.c'; fi`
+
+commands/i386/pc/sendkey_module-sendkey.o: commands/i386/pc/sendkey.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sendkey_module_CPPFLAGS) $(CPPFLAGS) $(sendkey_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/sendkey_module-sendkey.o -MD -MP -MF commands/i386/pc/$(DEPDIR)/sendkey_module-sendkey.Tpo -c -o commands/i386/pc/sendkey_module-sendkey.o `test -f 'commands/i386/pc/sendkey.c' || echo '$(srcdir)/'`commands/i386/pc/sendkey.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/sendkey_module-sendkey.Tpo commands/i386/pc/$(DEPDIR)/sendkey_module-sendkey.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/sendkey.c' object='commands/i386/pc/sendkey_module-sendkey.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sendkey_module_CPPFLAGS) $(CPPFLAGS) $(sendkey_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/sendkey_module-sendkey.o `test -f 'commands/i386/pc/sendkey.c' || echo '$(srcdir)/'`commands/i386/pc/sendkey.c
+
+commands/i386/pc/sendkey_module-sendkey.obj: commands/i386/pc/sendkey.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sendkey_module_CPPFLAGS) $(CPPFLAGS) $(sendkey_module_CFLAGS) $(CFLAGS) -MT commands/i386/pc/sendkey_module-sendkey.obj -MD -MP -MF commands/i386/pc/$(DEPDIR)/sendkey_module-sendkey.Tpo -c -o commands/i386/pc/sendkey_module-sendkey.obj `if test -f 'commands/i386/pc/sendkey.c'; then $(CYGPATH_W) 'commands/i386/pc/sendkey.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/sendkey.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/i386/pc/$(DEPDIR)/sendkey_module-sendkey.Tpo commands/i386/pc/$(DEPDIR)/sendkey_module-sendkey.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/i386/pc/sendkey.c' object='commands/i386/pc/sendkey_module-sendkey.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sendkey_module_CPPFLAGS) $(CPPFLAGS) $(sendkey_module_CFLAGS) $(CFLAGS) -c -o commands/i386/pc/sendkey_module-sendkey.obj `if test -f 'commands/i386/pc/sendkey.c'; then $(CYGPATH_W) 'commands/i386/pc/sendkey.c'; else $(CYGPATH_W) '$(srcdir)/commands/i386/pc/sendkey.c'; fi`
+
+term/serial_module-serial.o: term/serial.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -MT term/serial_module-serial.o -MD -MP -MF term/$(DEPDIR)/serial_module-serial.Tpo -c -o term/serial_module-serial.o `test -f 'term/serial.c' || echo '$(srcdir)/'`term/serial.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/serial_module-serial.Tpo term/$(DEPDIR)/serial_module-serial.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/serial.c' object='term/serial_module-serial.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -c -o term/serial_module-serial.o `test -f 'term/serial.c' || echo '$(srcdir)/'`term/serial.c
+
+term/serial_module-serial.obj: term/serial.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -MT term/serial_module-serial.obj -MD -MP -MF term/$(DEPDIR)/serial_module-serial.Tpo -c -o term/serial_module-serial.obj `if test -f 'term/serial.c'; then $(CYGPATH_W) 'term/serial.c'; else $(CYGPATH_W) '$(srcdir)/term/serial.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/serial_module-serial.Tpo term/$(DEPDIR)/serial_module-serial.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/serial.c' object='term/serial_module-serial.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -c -o term/serial_module-serial.obj `if test -f 'term/serial.c'; then $(CYGPATH_W) 'term/serial.c'; else $(CYGPATH_W) '$(srcdir)/term/serial.c'; fi`
+
+term/serial_module-ns8250.o: term/ns8250.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -MT term/serial_module-ns8250.o -MD -MP -MF term/$(DEPDIR)/serial_module-ns8250.Tpo -c -o term/serial_module-ns8250.o `test -f 'term/ns8250.c' || echo '$(srcdir)/'`term/ns8250.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/serial_module-ns8250.Tpo term/$(DEPDIR)/serial_module-ns8250.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/ns8250.c' object='term/serial_module-ns8250.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -c -o term/serial_module-ns8250.o `test -f 'term/ns8250.c' || echo '$(srcdir)/'`term/ns8250.c
+
+term/serial_module-ns8250.obj: term/ns8250.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -MT term/serial_module-ns8250.obj -MD -MP -MF term/$(DEPDIR)/serial_module-ns8250.Tpo -c -o term/serial_module-ns8250.obj `if test -f 'term/ns8250.c'; then $(CYGPATH_W) 'term/ns8250.c'; else $(CYGPATH_W) '$(srcdir)/term/ns8250.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/serial_module-ns8250.Tpo term/$(DEPDIR)/serial_module-ns8250.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/ns8250.c' object='term/serial_module-ns8250.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $(serial_module_CFLAGS) $(CFLAGS) -c -o term/serial_module-ns8250.obj `if test -f 'term/ns8250.c'; then $(CYGPATH_W) 'term/ns8250.c'; else $(CYGPATH_W) '$(srcdir)/term/ns8250.c'; fi`
+
+commands/setpci_module-setpci.o: commands/setpci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $(setpci_module_CFLAGS) $(CFLAGS) -MT commands/setpci_module-setpci.o -MD -MP -MF commands/$(DEPDIR)/setpci_module-setpci.Tpo -c -o commands/setpci_module-setpci.o `test -f 'commands/setpci.c' || echo '$(srcdir)/'`commands/setpci.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/setpci_module-setpci.Tpo commands/$(DEPDIR)/setpci_module-setpci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/setpci.c' object='commands/setpci_module-setpci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $(setpci_module_CFLAGS) $(CFLAGS) -c -o commands/setpci_module-setpci.o `test -f 'commands/setpci.c' || echo '$(srcdir)/'`commands/setpci.c
+
+commands/setpci_module-setpci.obj: commands/setpci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $(setpci_module_CFLAGS) $(CFLAGS) -MT commands/setpci_module-setpci.obj -MD -MP -MF commands/$(DEPDIR)/setpci_module-setpci.Tpo -c -o commands/setpci_module-setpci.obj `if test -f 'commands/setpci.c'; then $(CYGPATH_W) 'commands/setpci.c'; else $(CYGPATH_W) '$(srcdir)/commands/setpci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/setpci_module-setpci.Tpo commands/$(DEPDIR)/setpci_module-setpci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/setpci.c' object='commands/setpci_module-setpci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $(setpci_module_CFLAGS) $(CFLAGS) -c -o commands/setpci_module-setpci.obj `if test -f 'commands/setpci.c'; then $(CYGPATH_W) 'commands/setpci.c'; else $(CYGPATH_W) '$(srcdir)/commands/setpci.c'; fi`
+
+fs/sfs_module-sfs.o: fs/sfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $(sfs_module_CFLAGS) $(CFLAGS) -MT fs/sfs_module-sfs.o -MD -MP -MF fs/$(DEPDIR)/sfs_module-sfs.Tpo -c -o fs/sfs_module-sfs.o `test -f 'fs/sfs.c' || echo '$(srcdir)/'`fs/sfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/sfs_module-sfs.Tpo fs/$(DEPDIR)/sfs_module-sfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/sfs.c' object='fs/sfs_module-sfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $(sfs_module_CFLAGS) $(CFLAGS) -c -o fs/sfs_module-sfs.o `test -f 'fs/sfs.c' || echo '$(srcdir)/'`fs/sfs.c
+
+fs/sfs_module-sfs.obj: fs/sfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $(sfs_module_CFLAGS) $(CFLAGS) -MT fs/sfs_module-sfs.obj -MD -MP -MF fs/$(DEPDIR)/sfs_module-sfs.Tpo -c -o fs/sfs_module-sfs.obj `if test -f 'fs/sfs.c'; then $(CYGPATH_W) 'fs/sfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/sfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/sfs_module-sfs.Tpo fs/$(DEPDIR)/sfs_module-sfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/sfs.c' object='fs/sfs_module-sfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $(sfs_module_CFLAGS) $(CFLAGS) -c -o fs/sfs_module-sfs.obj `if test -f 'fs/sfs.c'; then $(CYGPATH_W) 'fs/sfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/sfs.c'; fi`
+
+commands/sleep_module-sleep.o: commands/sleep.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $(sleep_module_CFLAGS) $(CFLAGS) -MT commands/sleep_module-sleep.o -MD -MP -MF commands/$(DEPDIR)/sleep_module-sleep.Tpo -c -o commands/sleep_module-sleep.o `test -f 'commands/sleep.c' || echo '$(srcdir)/'`commands/sleep.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/sleep_module-sleep.Tpo commands/$(DEPDIR)/sleep_module-sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/sleep.c' object='commands/sleep_module-sleep.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $(sleep_module_CFLAGS) $(CFLAGS) -c -o commands/sleep_module-sleep.o `test -f 'commands/sleep.c' || echo '$(srcdir)/'`commands/sleep.c
+
+commands/sleep_module-sleep.obj: commands/sleep.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $(sleep_module_CFLAGS) $(CFLAGS) -MT commands/sleep_module-sleep.obj -MD -MP -MF commands/$(DEPDIR)/sleep_module-sleep.Tpo -c -o commands/sleep_module-sleep.obj `if test -f 'commands/sleep.c'; then $(CYGPATH_W) 'commands/sleep.c'; else $(CYGPATH_W) '$(srcdir)/commands/sleep.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/sleep_module-sleep.Tpo commands/$(DEPDIR)/sleep_module-sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/sleep.c' object='commands/sleep_module-sleep.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $(sleep_module_CFLAGS) $(CFLAGS) -c -o commands/sleep_module-sleep.obj `if test -f 'commands/sleep.c'; then $(CYGPATH_W) 'commands/sleep.c'; else $(CYGPATH_W) '$(srcdir)/commands/sleep.c'; fi`
+
+commands/ieee1275/suspend_module-suspend.o: commands/ieee1275/suspend.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $(suspend_module_CFLAGS) $(CFLAGS) -MT commands/ieee1275/suspend_module-suspend.o -MD -MP -MF commands/ieee1275/$(DEPDIR)/suspend_module-suspend.Tpo -c -o commands/ieee1275/suspend_module-suspend.o `test -f 'commands/ieee1275/suspend.c' || echo '$(srcdir)/'`commands/ieee1275/suspend.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/ieee1275/$(DEPDIR)/suspend_module-suspend.Tpo commands/ieee1275/$(DEPDIR)/suspend_module-suspend.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/ieee1275/suspend.c' object='commands/ieee1275/suspend_module-suspend.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $(suspend_module_CFLAGS) $(CFLAGS) -c -o commands/ieee1275/suspend_module-suspend.o `test -f 'commands/ieee1275/suspend.c' || echo '$(srcdir)/'`commands/ieee1275/suspend.c
+
+commands/ieee1275/suspend_module-suspend.obj: commands/ieee1275/suspend.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $(suspend_module_CFLAGS) $(CFLAGS) -MT commands/ieee1275/suspend_module-suspend.obj -MD -MP -MF commands/ieee1275/$(DEPDIR)/suspend_module-suspend.Tpo -c -o commands/ieee1275/suspend_module-suspend.obj `if test -f 'commands/ieee1275/suspend.c'; then $(CYGPATH_W) 'commands/ieee1275/suspend.c'; else $(CYGPATH_W) '$(srcdir)/commands/ieee1275/suspend.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/ieee1275/$(DEPDIR)/suspend_module-suspend.Tpo commands/ieee1275/$(DEPDIR)/suspend_module-suspend.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/ieee1275/suspend.c' object='commands/ieee1275/suspend_module-suspend.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $(suspend_module_CFLAGS) $(CFLAGS) -c -o commands/ieee1275/suspend_module-suspend.obj `if test -f 'commands/ieee1275/suspend.c'; then $(CYGPATH_W) 'commands/ieee1275/suspend.c'; else $(CYGPATH_W) '$(srcdir)/commands/ieee1275/suspend.c'; fi`
+
+fs/tar_module-tar.o: fs/tar.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $(tar_module_CFLAGS) $(CFLAGS) -MT fs/tar_module-tar.o -MD -MP -MF fs/$(DEPDIR)/tar_module-tar.Tpo -c -o fs/tar_module-tar.o `test -f 'fs/tar.c' || echo '$(srcdir)/'`fs/tar.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/tar_module-tar.Tpo fs/$(DEPDIR)/tar_module-tar.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/tar.c' object='fs/tar_module-tar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $(tar_module_CFLAGS) $(CFLAGS) -c -o fs/tar_module-tar.o `test -f 'fs/tar.c' || echo '$(srcdir)/'`fs/tar.c
+
+fs/tar_module-tar.obj: fs/tar.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $(tar_module_CFLAGS) $(CFLAGS) -MT fs/tar_module-tar.obj -MD -MP -MF fs/$(DEPDIR)/tar_module-tar.Tpo -c -o fs/tar_module-tar.obj `if test -f 'fs/tar.c'; then $(CYGPATH_W) 'fs/tar.c'; else $(CYGPATH_W) '$(srcdir)/fs/tar.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/tar_module-tar.Tpo fs/$(DEPDIR)/tar_module-tar.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/tar.c' object='fs/tar_module-tar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $(tar_module_CFLAGS) $(CFLAGS) -c -o fs/tar_module-tar.obj `if test -f 'fs/tar.c'; then $(CYGPATH_W) 'fs/tar.c'; else $(CYGPATH_W) '$(srcdir)/fs/tar.c'; fi`
+
+commands/terminal_module-terminal.o: commands/terminal.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $(terminal_module_CFLAGS) $(CFLAGS) -MT commands/terminal_module-terminal.o -MD -MP -MF commands/$(DEPDIR)/terminal_module-terminal.Tpo -c -o commands/terminal_module-terminal.o `test -f 'commands/terminal.c' || echo '$(srcdir)/'`commands/terminal.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/terminal_module-terminal.Tpo commands/$(DEPDIR)/terminal_module-terminal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/terminal.c' object='commands/terminal_module-terminal.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $(terminal_module_CFLAGS) $(CFLAGS) -c -o commands/terminal_module-terminal.o `test -f 'commands/terminal.c' || echo '$(srcdir)/'`commands/terminal.c
+
+commands/terminal_module-terminal.obj: commands/terminal.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $(terminal_module_CFLAGS) $(CFLAGS) -MT commands/terminal_module-terminal.obj -MD -MP -MF commands/$(DEPDIR)/terminal_module-terminal.Tpo -c -o commands/terminal_module-terminal.obj `if test -f 'commands/terminal.c'; then $(CYGPATH_W) 'commands/terminal.c'; else $(CYGPATH_W) '$(srcdir)/commands/terminal.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/terminal_module-terminal.Tpo commands/$(DEPDIR)/terminal_module-terminal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/terminal.c' object='commands/terminal_module-terminal.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $(terminal_module_CFLAGS) $(CFLAGS) -c -o commands/terminal_module-terminal.obj `if test -f 'commands/terminal.c'; then $(CYGPATH_W) 'commands/terminal.c'; else $(CYGPATH_W) '$(srcdir)/commands/terminal.c'; fi`
+
+term/terminfo_module-terminfo.o: term/terminfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -MT term/terminfo_module-terminfo.o -MD -MP -MF term/$(DEPDIR)/terminfo_module-terminfo.Tpo -c -o term/terminfo_module-terminfo.o `test -f 'term/terminfo.c' || echo '$(srcdir)/'`term/terminfo.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/terminfo_module-terminfo.Tpo term/$(DEPDIR)/terminfo_module-terminfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/terminfo.c' object='term/terminfo_module-terminfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -c -o term/terminfo_module-terminfo.o `test -f 'term/terminfo.c' || echo '$(srcdir)/'`term/terminfo.c
+
+term/terminfo_module-terminfo.obj: term/terminfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -MT term/terminfo_module-terminfo.obj -MD -MP -MF term/$(DEPDIR)/terminfo_module-terminfo.Tpo -c -o term/terminfo_module-terminfo.obj `if test -f 'term/terminfo.c'; then $(CYGPATH_W) 'term/terminfo.c'; else $(CYGPATH_W) '$(srcdir)/term/terminfo.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/terminfo_module-terminfo.Tpo term/$(DEPDIR)/terminfo_module-terminfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/terminfo.c' object='term/terminfo_module-terminfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -c -o term/terminfo_module-terminfo.obj `if test -f 'term/terminfo.c'; then $(CYGPATH_W) 'term/terminfo.c'; else $(CYGPATH_W) '$(srcdir)/term/terminfo.c'; fi`
+
+term/terminfo_module-tparm.o: term/tparm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -MT term/terminfo_module-tparm.o -MD -MP -MF term/$(DEPDIR)/terminfo_module-tparm.Tpo -c -o term/terminfo_module-tparm.o `test -f 'term/tparm.c' || echo '$(srcdir)/'`term/tparm.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/terminfo_module-tparm.Tpo term/$(DEPDIR)/terminfo_module-tparm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/tparm.c' object='term/terminfo_module-tparm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -c -o term/terminfo_module-tparm.o `test -f 'term/tparm.c' || echo '$(srcdir)/'`term/tparm.c
+
+term/terminfo_module-tparm.obj: term/tparm.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -MT term/terminfo_module-tparm.obj -MD -MP -MF term/$(DEPDIR)/terminfo_module-tparm.Tpo -c -o term/terminfo_module-tparm.obj `if test -f 'term/tparm.c'; then $(CYGPATH_W) 'term/tparm.c'; else $(CYGPATH_W) '$(srcdir)/term/tparm.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/terminfo_module-tparm.Tpo term/$(DEPDIR)/terminfo_module-tparm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/tparm.c' object='term/terminfo_module-tparm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $(terminfo_module_CFLAGS) $(CFLAGS) -c -o term/terminfo_module-tparm.obj `if test -f 'term/tparm.c'; then $(CYGPATH_W) 'term/tparm.c'; else $(CYGPATH_W) '$(srcdir)/term/tparm.c'; fi`
+
+commands/test_module-test.o: commands/test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $(test_module_CFLAGS) $(CFLAGS) -MT commands/test_module-test.o -MD -MP -MF commands/$(DEPDIR)/test_module-test.Tpo -c -o commands/test_module-test.o `test -f 'commands/test.c' || echo '$(srcdir)/'`commands/test.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/test_module-test.Tpo commands/$(DEPDIR)/test_module-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/test.c' object='commands/test_module-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $(test_module_CFLAGS) $(CFLAGS) -c -o commands/test_module-test.o `test -f 'commands/test.c' || echo '$(srcdir)/'`commands/test.c
+
+commands/test_module-test.obj: commands/test.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $(test_module_CFLAGS) $(CFLAGS) -MT commands/test_module-test.obj -MD -MP -MF commands/$(DEPDIR)/test_module-test.Tpo -c -o commands/test_module-test.obj `if test -f 'commands/test.c'; then $(CYGPATH_W) 'commands/test.c'; else $(CYGPATH_W) '$(srcdir)/commands/test.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/test_module-test.Tpo commands/$(DEPDIR)/test_module-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/test.c' object='commands/test_module-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $(test_module_CFLAGS) $(CFLAGS) -c -o commands/test_module-test.obj `if test -f 'commands/test.c'; then $(CYGPATH_W) 'commands/test.c'; else $(CYGPATH_W) '$(srcdir)/commands/test.c'; fi`
+
+tests/test_blockarg_module-test_blockarg.o: tests/test_blockarg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $(test_blockarg_module_CFLAGS) $(CFLAGS) -MT tests/test_blockarg_module-test_blockarg.o -MD -MP -MF tests/$(DEPDIR)/test_blockarg_module-test_blockarg.Tpo -c -o tests/test_blockarg_module-test_blockarg.o `test -f 'tests/test_blockarg.c' || echo '$(srcdir)/'`tests/test_blockarg.c
+@am__fastdepCC_TRUE@ $(am__mv) tests/$(DEPDIR)/test_blockarg_module-test_blockarg.Tpo tests/$(DEPDIR)/test_blockarg_module-test_blockarg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/test_blockarg.c' object='tests/test_blockarg_module-test_blockarg.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $(test_blockarg_module_CFLAGS) $(CFLAGS) -c -o tests/test_blockarg_module-test_blockarg.o `test -f 'tests/test_blockarg.c' || echo '$(srcdir)/'`tests/test_blockarg.c
+
+tests/test_blockarg_module-test_blockarg.obj: tests/test_blockarg.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $(test_blockarg_module_CFLAGS) $(CFLAGS) -MT tests/test_blockarg_module-test_blockarg.obj -MD -MP -MF tests/$(DEPDIR)/test_blockarg_module-test_blockarg.Tpo -c -o tests/test_blockarg_module-test_blockarg.obj `if test -f 'tests/test_blockarg.c'; then $(CYGPATH_W) 'tests/test_blockarg.c'; else $(CYGPATH_W) '$(srcdir)/tests/test_blockarg.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) tests/$(DEPDIR)/test_blockarg_module-test_blockarg.Tpo tests/$(DEPDIR)/test_blockarg_module-test_blockarg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/test_blockarg.c' object='tests/test_blockarg_module-test_blockarg.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $(test_blockarg_module_CFLAGS) $(CFLAGS) -c -o tests/test_blockarg_module-test_blockarg.obj `if test -f 'tests/test_blockarg.c'; then $(CYGPATH_W) 'tests/test_blockarg.c'; else $(CYGPATH_W) '$(srcdir)/tests/test_blockarg.c'; fi`
+
+commands/testload_module-testload.o: commands/testload.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $(testload_module_CFLAGS) $(CFLAGS) -MT commands/testload_module-testload.o -MD -MP -MF commands/$(DEPDIR)/testload_module-testload.Tpo -c -o commands/testload_module-testload.o `test -f 'commands/testload.c' || echo '$(srcdir)/'`commands/testload.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/testload_module-testload.Tpo commands/$(DEPDIR)/testload_module-testload.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/testload.c' object='commands/testload_module-testload.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $(testload_module_CFLAGS) $(CFLAGS) -c -o commands/testload_module-testload.o `test -f 'commands/testload.c' || echo '$(srcdir)/'`commands/testload.c
+
+commands/testload_module-testload.obj: commands/testload.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $(testload_module_CFLAGS) $(CFLAGS) -MT commands/testload_module-testload.obj -MD -MP -MF commands/$(DEPDIR)/testload_module-testload.Tpo -c -o commands/testload_module-testload.obj `if test -f 'commands/testload.c'; then $(CYGPATH_W) 'commands/testload.c'; else $(CYGPATH_W) '$(srcdir)/commands/testload.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/testload_module-testload.Tpo commands/$(DEPDIR)/testload_module-testload.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/testload.c' object='commands/testload_module-testload.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $(testload_module_CFLAGS) $(CFLAGS) -c -o commands/testload_module-testload.obj `if test -f 'commands/testload.c'; then $(CYGPATH_W) 'commands/testload.c'; else $(CYGPATH_W) '$(srcdir)/commands/testload.c'; fi`
+
+video/readers/tga_module-tga.o: video/readers/tga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $(tga_module_CFLAGS) $(CFLAGS) -MT video/readers/tga_module-tga.o -MD -MP -MF video/readers/$(DEPDIR)/tga_module-tga.Tpo -c -o video/readers/tga_module-tga.o `test -f 'video/readers/tga.c' || echo '$(srcdir)/'`video/readers/tga.c
+@am__fastdepCC_TRUE@ $(am__mv) video/readers/$(DEPDIR)/tga_module-tga.Tpo video/readers/$(DEPDIR)/tga_module-tga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/readers/tga.c' object='video/readers/tga_module-tga.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $(tga_module_CFLAGS) $(CFLAGS) -c -o video/readers/tga_module-tga.o `test -f 'video/readers/tga.c' || echo '$(srcdir)/'`video/readers/tga.c
+
+video/readers/tga_module-tga.obj: video/readers/tga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $(tga_module_CFLAGS) $(CFLAGS) -MT video/readers/tga_module-tga.obj -MD -MP -MF video/readers/$(DEPDIR)/tga_module-tga.Tpo -c -o video/readers/tga_module-tga.obj `if test -f 'video/readers/tga.c'; then $(CYGPATH_W) 'video/readers/tga.c'; else $(CYGPATH_W) '$(srcdir)/video/readers/tga.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/readers/$(DEPDIR)/tga_module-tga.Tpo video/readers/$(DEPDIR)/tga_module-tga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/readers/tga.c' object='video/readers/tga_module-tga.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $(tga_module_CFLAGS) $(CFLAGS) -c -o video/readers/tga_module-tga.obj `if test -f 'video/readers/tga.c'; then $(CYGPATH_W) 'video/readers/tga.c'; else $(CYGPATH_W) '$(srcdir)/video/readers/tga.c'; fi`
+
+trig_module-trigtables.o: trigtables.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $(trig_module_CFLAGS) $(CFLAGS) -MT trig_module-trigtables.o -MD -MP -MF $(DEPDIR)/trig_module-trigtables.Tpo -c -o trig_module-trigtables.o `test -f 'trigtables.c' || echo '$(srcdir)/'`trigtables.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/trig_module-trigtables.Tpo $(DEPDIR)/trig_module-trigtables.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trigtables.c' object='trig_module-trigtables.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $(trig_module_CFLAGS) $(CFLAGS) -c -o trig_module-trigtables.o `test -f 'trigtables.c' || echo '$(srcdir)/'`trigtables.c
+
+trig_module-trigtables.obj: trigtables.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $(trig_module_CFLAGS) $(CFLAGS) -MT trig_module-trigtables.obj -MD -MP -MF $(DEPDIR)/trig_module-trigtables.Tpo -c -o trig_module-trigtables.obj `if test -f 'trigtables.c'; then $(CYGPATH_W) 'trigtables.c'; else $(CYGPATH_W) '$(srcdir)/trigtables.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/trig_module-trigtables.Tpo $(DEPDIR)/trig_module-trigtables.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trigtables.c' object='trig_module-trigtables.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $(trig_module_CFLAGS) $(CFLAGS) -c -o trig_module-trigtables.obj `if test -f 'trigtables.c'; then $(CYGPATH_W) 'trigtables.c'; else $(CYGPATH_W) '$(srcdir)/trigtables.c'; fi`
+
+commands/true_module-true.o: commands/true.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $(true_module_CFLAGS) $(CFLAGS) -MT commands/true_module-true.o -MD -MP -MF commands/$(DEPDIR)/true_module-true.Tpo -c -o commands/true_module-true.o `test -f 'commands/true.c' || echo '$(srcdir)/'`commands/true.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/true_module-true.Tpo commands/$(DEPDIR)/true_module-true.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/true.c' object='commands/true_module-true.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $(true_module_CFLAGS) $(CFLAGS) -c -o commands/true_module-true.o `test -f 'commands/true.c' || echo '$(srcdir)/'`commands/true.c
+
+commands/true_module-true.obj: commands/true.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $(true_module_CFLAGS) $(CFLAGS) -MT commands/true_module-true.obj -MD -MP -MF commands/$(DEPDIR)/true_module-true.Tpo -c -o commands/true_module-true.obj `if test -f 'commands/true.c'; then $(CYGPATH_W) 'commands/true.c'; else $(CYGPATH_W) '$(srcdir)/commands/true.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/true_module-true.Tpo commands/$(DEPDIR)/true_module-true.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/true.c' object='commands/true_module-true.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $(true_module_CFLAGS) $(CFLAGS) -c -o commands/true_module-true.obj `if test -f 'commands/true.c'; then $(CYGPATH_W) 'commands/true.c'; else $(CYGPATH_W) '$(srcdir)/commands/true.c'; fi`
+
+fs/udf_module-udf.o: fs/udf.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $(udf_module_CFLAGS) $(CFLAGS) -MT fs/udf_module-udf.o -MD -MP -MF fs/$(DEPDIR)/udf_module-udf.Tpo -c -o fs/udf_module-udf.o `test -f 'fs/udf.c' || echo '$(srcdir)/'`fs/udf.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/udf_module-udf.Tpo fs/$(DEPDIR)/udf_module-udf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/udf.c' object='fs/udf_module-udf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $(udf_module_CFLAGS) $(CFLAGS) -c -o fs/udf_module-udf.o `test -f 'fs/udf.c' || echo '$(srcdir)/'`fs/udf.c
+
+fs/udf_module-udf.obj: fs/udf.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $(udf_module_CFLAGS) $(CFLAGS) -MT fs/udf_module-udf.obj -MD -MP -MF fs/$(DEPDIR)/udf_module-udf.Tpo -c -o fs/udf_module-udf.obj `if test -f 'fs/udf.c'; then $(CYGPATH_W) 'fs/udf.c'; else $(CYGPATH_W) '$(srcdir)/fs/udf.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/udf_module-udf.Tpo fs/$(DEPDIR)/udf_module-udf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/udf.c' object='fs/udf_module-udf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $(udf_module_CFLAGS) $(CFLAGS) -c -o fs/udf_module-udf.obj `if test -f 'fs/udf.c'; then $(CYGPATH_W) 'fs/udf.c'; else $(CYGPATH_W) '$(srcdir)/fs/udf.c'; fi`
+
+fs/ufs1_module-ufs.o: fs/ufs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $(ufs1_module_CFLAGS) $(CFLAGS) -MT fs/ufs1_module-ufs.o -MD -MP -MF fs/$(DEPDIR)/ufs1_module-ufs.Tpo -c -o fs/ufs1_module-ufs.o `test -f 'fs/ufs.c' || echo '$(srcdir)/'`fs/ufs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ufs1_module-ufs.Tpo fs/$(DEPDIR)/ufs1_module-ufs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ufs.c' object='fs/ufs1_module-ufs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $(ufs1_module_CFLAGS) $(CFLAGS) -c -o fs/ufs1_module-ufs.o `test -f 'fs/ufs.c' || echo '$(srcdir)/'`fs/ufs.c
+
+fs/ufs1_module-ufs.obj: fs/ufs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $(ufs1_module_CFLAGS) $(CFLAGS) -MT fs/ufs1_module-ufs.obj -MD -MP -MF fs/$(DEPDIR)/ufs1_module-ufs.Tpo -c -o fs/ufs1_module-ufs.obj `if test -f 'fs/ufs.c'; then $(CYGPATH_W) 'fs/ufs.c'; else $(CYGPATH_W) '$(srcdir)/fs/ufs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ufs1_module-ufs.Tpo fs/$(DEPDIR)/ufs1_module-ufs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ufs.c' object='fs/ufs1_module-ufs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $(ufs1_module_CFLAGS) $(CFLAGS) -c -o fs/ufs1_module-ufs.obj `if test -f 'fs/ufs.c'; then $(CYGPATH_W) 'fs/ufs.c'; else $(CYGPATH_W) '$(srcdir)/fs/ufs.c'; fi`
+
+fs/ufs2_module-ufs2.o: fs/ufs2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $(ufs2_module_CFLAGS) $(CFLAGS) -MT fs/ufs2_module-ufs2.o -MD -MP -MF fs/$(DEPDIR)/ufs2_module-ufs2.Tpo -c -o fs/ufs2_module-ufs2.o `test -f 'fs/ufs2.c' || echo '$(srcdir)/'`fs/ufs2.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ufs2_module-ufs2.Tpo fs/$(DEPDIR)/ufs2_module-ufs2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ufs2.c' object='fs/ufs2_module-ufs2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $(ufs2_module_CFLAGS) $(CFLAGS) -c -o fs/ufs2_module-ufs2.o `test -f 'fs/ufs2.c' || echo '$(srcdir)/'`fs/ufs2.c
+
+fs/ufs2_module-ufs2.obj: fs/ufs2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $(ufs2_module_CFLAGS) $(CFLAGS) -MT fs/ufs2_module-ufs2.obj -MD -MP -MF fs/$(DEPDIR)/ufs2_module-ufs2.Tpo -c -o fs/ufs2_module-ufs2.obj `if test -f 'fs/ufs2.c'; then $(CYGPATH_W) 'fs/ufs2.c'; else $(CYGPATH_W) '$(srcdir)/fs/ufs2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/ufs2_module-ufs2.Tpo fs/$(DEPDIR)/ufs2_module-ufs2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/ufs2.c' object='fs/ufs2_module-ufs2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $(ufs2_module_CFLAGS) $(CFLAGS) -c -o fs/ufs2_module-ufs2.obj `if test -f 'fs/ufs2.c'; then $(CYGPATH_W) 'fs/ufs2.c'; else $(CYGPATH_W) '$(srcdir)/fs/ufs2.c'; fi`
+
+bus/usb/uhci_module-uhci.o: bus/usb/uhci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $(uhci_module_CFLAGS) $(CFLAGS) -MT bus/usb/uhci_module-uhci.o -MD -MP -MF bus/usb/$(DEPDIR)/uhci_module-uhci.Tpo -c -o bus/usb/uhci_module-uhci.o `test -f 'bus/usb/uhci.c' || echo '$(srcdir)/'`bus/usb/uhci.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/uhci_module-uhci.Tpo bus/usb/$(DEPDIR)/uhci_module-uhci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/uhci.c' object='bus/usb/uhci_module-uhci.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $(uhci_module_CFLAGS) $(CFLAGS) -c -o bus/usb/uhci_module-uhci.o `test -f 'bus/usb/uhci.c' || echo '$(srcdir)/'`bus/usb/uhci.c
+
+bus/usb/uhci_module-uhci.obj: bus/usb/uhci.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $(uhci_module_CFLAGS) $(CFLAGS) -MT bus/usb/uhci_module-uhci.obj -MD -MP -MF bus/usb/$(DEPDIR)/uhci_module-uhci.Tpo -c -o bus/usb/uhci_module-uhci.obj `if test -f 'bus/usb/uhci.c'; then $(CYGPATH_W) 'bus/usb/uhci.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/uhci.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/uhci_module-uhci.Tpo bus/usb/$(DEPDIR)/uhci_module-uhci.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/uhci.c' object='bus/usb/uhci_module-uhci.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $(uhci_module_CFLAGS) $(CFLAGS) -c -o bus/usb/uhci_module-uhci.obj `if test -f 'bus/usb/uhci.c'; then $(CYGPATH_W) 'bus/usb/uhci.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/uhci.c'; fi`
+
+bus/usb/usb_module-usb.o: bus/usb/usb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -MT bus/usb/usb_module-usb.o -MD -MP -MF bus/usb/$(DEPDIR)/usb_module-usb.Tpo -c -o bus/usb/usb_module-usb.o `test -f 'bus/usb/usb.c' || echo '$(srcdir)/'`bus/usb/usb.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/usb_module-usb.Tpo bus/usb/$(DEPDIR)/usb_module-usb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/usb.c' object='bus/usb/usb_module-usb.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/usb_module-usb.o `test -f 'bus/usb/usb.c' || echo '$(srcdir)/'`bus/usb/usb.c
+
+bus/usb/usb_module-usb.obj: bus/usb/usb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -MT bus/usb/usb_module-usb.obj -MD -MP -MF bus/usb/$(DEPDIR)/usb_module-usb.Tpo -c -o bus/usb/usb_module-usb.obj `if test -f 'bus/usb/usb.c'; then $(CYGPATH_W) 'bus/usb/usb.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/usb.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/usb_module-usb.Tpo bus/usb/$(DEPDIR)/usb_module-usb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/usb.c' object='bus/usb/usb_module-usb.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/usb_module-usb.obj `if test -f 'bus/usb/usb.c'; then $(CYGPATH_W) 'bus/usb/usb.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/usb.c'; fi`
+
+bus/usb/usb_module-usbtrans.o: bus/usb/usbtrans.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -MT bus/usb/usb_module-usbtrans.o -MD -MP -MF bus/usb/$(DEPDIR)/usb_module-usbtrans.Tpo -c -o bus/usb/usb_module-usbtrans.o `test -f 'bus/usb/usbtrans.c' || echo '$(srcdir)/'`bus/usb/usbtrans.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/usb_module-usbtrans.Tpo bus/usb/$(DEPDIR)/usb_module-usbtrans.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/usbtrans.c' object='bus/usb/usb_module-usbtrans.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/usb_module-usbtrans.o `test -f 'bus/usb/usbtrans.c' || echo '$(srcdir)/'`bus/usb/usbtrans.c
+
+bus/usb/usb_module-usbtrans.obj: bus/usb/usbtrans.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -MT bus/usb/usb_module-usbtrans.obj -MD -MP -MF bus/usb/$(DEPDIR)/usb_module-usbtrans.Tpo -c -o bus/usb/usb_module-usbtrans.obj `if test -f 'bus/usb/usbtrans.c'; then $(CYGPATH_W) 'bus/usb/usbtrans.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/usbtrans.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/usb_module-usbtrans.Tpo bus/usb/$(DEPDIR)/usb_module-usbtrans.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/usbtrans.c' object='bus/usb/usb_module-usbtrans.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/usb_module-usbtrans.obj `if test -f 'bus/usb/usbtrans.c'; then $(CYGPATH_W) 'bus/usb/usbtrans.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/usbtrans.c'; fi`
+
+bus/usb/usb_module-usbhub.o: bus/usb/usbhub.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -MT bus/usb/usb_module-usbhub.o -MD -MP -MF bus/usb/$(DEPDIR)/usb_module-usbhub.Tpo -c -o bus/usb/usb_module-usbhub.o `test -f 'bus/usb/usbhub.c' || echo '$(srcdir)/'`bus/usb/usbhub.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/usb_module-usbhub.Tpo bus/usb/$(DEPDIR)/usb_module-usbhub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/usbhub.c' object='bus/usb/usb_module-usbhub.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/usb_module-usbhub.o `test -f 'bus/usb/usbhub.c' || echo '$(srcdir)/'`bus/usb/usbhub.c
+
+bus/usb/usb_module-usbhub.obj: bus/usb/usbhub.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -MT bus/usb/usb_module-usbhub.obj -MD -MP -MF bus/usb/$(DEPDIR)/usb_module-usbhub.Tpo -c -o bus/usb/usb_module-usbhub.obj `if test -f 'bus/usb/usbhub.c'; then $(CYGPATH_W) 'bus/usb/usbhub.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/usbhub.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/$(DEPDIR)/usb_module-usbhub.Tpo bus/usb/$(DEPDIR)/usb_module-usbhub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/usbhub.c' object='bus/usb/usb_module-usbhub.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $(usb_module_CFLAGS) $(CFLAGS) -c -o bus/usb/usb_module-usbhub.obj `if test -f 'bus/usb/usbhub.c'; then $(CYGPATH_W) 'bus/usb/usbhub.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/usbhub.c'; fi`
+
+term/usb_keyboard_module-usb_keyboard.o: term/usb_keyboard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(usb_keyboard_module_CFLAGS) $(CFLAGS) -MT term/usb_keyboard_module-usb_keyboard.o -MD -MP -MF term/$(DEPDIR)/usb_keyboard_module-usb_keyboard.Tpo -c -o term/usb_keyboard_module-usb_keyboard.o `test -f 'term/usb_keyboard.c' || echo '$(srcdir)/'`term/usb_keyboard.c
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/usb_keyboard_module-usb_keyboard.Tpo term/$(DEPDIR)/usb_keyboard_module-usb_keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/usb_keyboard.c' object='term/usb_keyboard_module-usb_keyboard.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(usb_keyboard_module_CFLAGS) $(CFLAGS) -c -o term/usb_keyboard_module-usb_keyboard.o `test -f 'term/usb_keyboard.c' || echo '$(srcdir)/'`term/usb_keyboard.c
+
+term/usb_keyboard_module-usb_keyboard.obj: term/usb_keyboard.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(usb_keyboard_module_CFLAGS) $(CFLAGS) -MT term/usb_keyboard_module-usb_keyboard.obj -MD -MP -MF term/$(DEPDIR)/usb_keyboard_module-usb_keyboard.Tpo -c -o term/usb_keyboard_module-usb_keyboard.obj `if test -f 'term/usb_keyboard.c'; then $(CYGPATH_W) 'term/usb_keyboard.c'; else $(CYGPATH_W) '$(srcdir)/term/usb_keyboard.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/$(DEPDIR)/usb_keyboard_module-usb_keyboard.Tpo term/$(DEPDIR)/usb_keyboard_module-usb_keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/usb_keyboard.c' object='term/usb_keyboard_module-usb_keyboard.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $(usb_keyboard_module_CFLAGS) $(CFLAGS) -c -o term/usb_keyboard_module-usb_keyboard.obj `if test -f 'term/usb_keyboard.c'; then $(CYGPATH_W) 'term/usb_keyboard.c'; else $(CYGPATH_W) '$(srcdir)/term/usb_keyboard.c'; fi`
+
+disk/usbms_module-usbms.o: disk/usbms.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $(usbms_module_CFLAGS) $(CFLAGS) -MT disk/usbms_module-usbms.o -MD -MP -MF disk/$(DEPDIR)/usbms_module-usbms.Tpo -c -o disk/usbms_module-usbms.o `test -f 'disk/usbms.c' || echo '$(srcdir)/'`disk/usbms.c
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/usbms_module-usbms.Tpo disk/$(DEPDIR)/usbms_module-usbms.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/usbms.c' object='disk/usbms_module-usbms.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $(usbms_module_CFLAGS) $(CFLAGS) -c -o disk/usbms_module-usbms.o `test -f 'disk/usbms.c' || echo '$(srcdir)/'`disk/usbms.c
+
+disk/usbms_module-usbms.obj: disk/usbms.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $(usbms_module_CFLAGS) $(CFLAGS) -MT disk/usbms_module-usbms.obj -MD -MP -MF disk/$(DEPDIR)/usbms_module-usbms.Tpo -c -o disk/usbms_module-usbms.obj `if test -f 'disk/usbms.c'; then $(CYGPATH_W) 'disk/usbms.c'; else $(CYGPATH_W) '$(srcdir)/disk/usbms.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) disk/$(DEPDIR)/usbms_module-usbms.Tpo disk/$(DEPDIR)/usbms_module-usbms.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disk/usbms.c' object='disk/usbms_module-usbms.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $(usbms_module_CFLAGS) $(CFLAGS) -c -o disk/usbms_module-usbms.obj `if test -f 'disk/usbms.c'; then $(CYGPATH_W) 'disk/usbms.c'; else $(CYGPATH_W) '$(srcdir)/disk/usbms.c'; fi`
+
+bus/usb/serial/usbserial_common_module-common.o: bus/usb/serial/common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_common_module_CFLAGS) $(CFLAGS) -MT bus/usb/serial/usbserial_common_module-common.o -MD -MP -MF bus/usb/serial/$(DEPDIR)/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-common.o `test -f 'bus/usb/serial/common.c' || echo '$(srcdir)/'`bus/usb/serial/common.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/serial/$(DEPDIR)/usbserial_common_module-common.Tpo bus/usb/serial/$(DEPDIR)/usbserial_common_module-common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/serial/common.c' object='bus/usb/serial/usbserial_common_module-common.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_common_module_CFLAGS) $(CFLAGS) -c -o bus/usb/serial/usbserial_common_module-common.o `test -f 'bus/usb/serial/common.c' || echo '$(srcdir)/'`bus/usb/serial/common.c
+
+bus/usb/serial/usbserial_common_module-common.obj: bus/usb/serial/common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_common_module_CFLAGS) $(CFLAGS) -MT bus/usb/serial/usbserial_common_module-common.obj -MD -MP -MF bus/usb/serial/$(DEPDIR)/usbserial_common_module-common.Tpo -c -o bus/usb/serial/usbserial_common_module-common.obj `if test -f 'bus/usb/serial/common.c'; then $(CYGPATH_W) 'bus/usb/serial/common.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/serial/common.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/serial/$(DEPDIR)/usbserial_common_module-common.Tpo bus/usb/serial/$(DEPDIR)/usbserial_common_module-common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/serial/common.c' object='bus/usb/serial/usbserial_common_module-common.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_common_module_CFLAGS) $(CFLAGS) -c -o bus/usb/serial/usbserial_common_module-common.obj `if test -f 'bus/usb/serial/common.c'; then $(CYGPATH_W) 'bus/usb/serial/common.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/serial/common.c'; fi`
+
+bus/usb/serial/usbserial_ftdi_module-ftdi.o: bus/usb/serial/ftdi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_ftdi_module_CFLAGS) $(CFLAGS) -MT bus/usb/serial/usbserial_ftdi_module-ftdi.o -MD -MP -MF bus/usb/serial/$(DEPDIR)/usbserial_ftdi_module-ftdi.Tpo -c -o bus/usb/serial/usbserial_ftdi_module-ftdi.o `test -f 'bus/usb/serial/ftdi.c' || echo '$(srcdir)/'`bus/usb/serial/ftdi.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/serial/$(DEPDIR)/usbserial_ftdi_module-ftdi.Tpo bus/usb/serial/$(DEPDIR)/usbserial_ftdi_module-ftdi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/serial/ftdi.c' object='bus/usb/serial/usbserial_ftdi_module-ftdi.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_ftdi_module_CFLAGS) $(CFLAGS) -c -o bus/usb/serial/usbserial_ftdi_module-ftdi.o `test -f 'bus/usb/serial/ftdi.c' || echo '$(srcdir)/'`bus/usb/serial/ftdi.c
+
+bus/usb/serial/usbserial_ftdi_module-ftdi.obj: bus/usb/serial/ftdi.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_ftdi_module_CFLAGS) $(CFLAGS) -MT bus/usb/serial/usbserial_ftdi_module-ftdi.obj -MD -MP -MF bus/usb/serial/$(DEPDIR)/usbserial_ftdi_module-ftdi.Tpo -c -o bus/usb/serial/usbserial_ftdi_module-ftdi.obj `if test -f 'bus/usb/serial/ftdi.c'; then $(CYGPATH_W) 'bus/usb/serial/ftdi.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/serial/ftdi.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/serial/$(DEPDIR)/usbserial_ftdi_module-ftdi.Tpo bus/usb/serial/$(DEPDIR)/usbserial_ftdi_module-ftdi.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/serial/ftdi.c' object='bus/usb/serial/usbserial_ftdi_module-ftdi.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_ftdi_module_CFLAGS) $(CFLAGS) -c -o bus/usb/serial/usbserial_ftdi_module-ftdi.obj `if test -f 'bus/usb/serial/ftdi.c'; then $(CYGPATH_W) 'bus/usb/serial/ftdi.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/serial/ftdi.c'; fi`
+
+bus/usb/serial/usbserial_pl2303_module-pl2303.o: bus/usb/serial/pl2303.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_pl2303_module_CFLAGS) $(CFLAGS) -MT bus/usb/serial/usbserial_pl2303_module-pl2303.o -MD -MP -MF bus/usb/serial/$(DEPDIR)/usbserial_pl2303_module-pl2303.Tpo -c -o bus/usb/serial/usbserial_pl2303_module-pl2303.o `test -f 'bus/usb/serial/pl2303.c' || echo '$(srcdir)/'`bus/usb/serial/pl2303.c
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/serial/$(DEPDIR)/usbserial_pl2303_module-pl2303.Tpo bus/usb/serial/$(DEPDIR)/usbserial_pl2303_module-pl2303.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/serial/pl2303.c' object='bus/usb/serial/usbserial_pl2303_module-pl2303.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_pl2303_module_CFLAGS) $(CFLAGS) -c -o bus/usb/serial/usbserial_pl2303_module-pl2303.o `test -f 'bus/usb/serial/pl2303.c' || echo '$(srcdir)/'`bus/usb/serial/pl2303.c
+
+bus/usb/serial/usbserial_pl2303_module-pl2303.obj: bus/usb/serial/pl2303.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_pl2303_module_CFLAGS) $(CFLAGS) -MT bus/usb/serial/usbserial_pl2303_module-pl2303.obj -MD -MP -MF bus/usb/serial/$(DEPDIR)/usbserial_pl2303_module-pl2303.Tpo -c -o bus/usb/serial/usbserial_pl2303_module-pl2303.obj `if test -f 'bus/usb/serial/pl2303.c'; then $(CYGPATH_W) 'bus/usb/serial/pl2303.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/serial/pl2303.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) bus/usb/serial/$(DEPDIR)/usbserial_pl2303_module-pl2303.Tpo bus/usb/serial/$(DEPDIR)/usbserial_pl2303_module-pl2303.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus/usb/serial/pl2303.c' object='bus/usb/serial/usbserial_pl2303_module-pl2303.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $(usbserial_pl2303_module_CFLAGS) $(CFLAGS) -c -o bus/usb/serial/usbserial_pl2303_module-pl2303.obj `if test -f 'bus/usb/serial/pl2303.c'; then $(CYGPATH_W) 'bus/usb/serial/pl2303.c'; else $(CYGPATH_W) '$(srcdir)/bus/usb/serial/pl2303.c'; fi`
+
+commands/usbtest_module-usbtest.o: commands/usbtest.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $(usbtest_module_CFLAGS) $(CFLAGS) -MT commands/usbtest_module-usbtest.o -MD -MP -MF commands/$(DEPDIR)/usbtest_module-usbtest.Tpo -c -o commands/usbtest_module-usbtest.o `test -f 'commands/usbtest.c' || echo '$(srcdir)/'`commands/usbtest.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/usbtest_module-usbtest.Tpo commands/$(DEPDIR)/usbtest_module-usbtest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/usbtest.c' object='commands/usbtest_module-usbtest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $(usbtest_module_CFLAGS) $(CFLAGS) -c -o commands/usbtest_module-usbtest.o `test -f 'commands/usbtest.c' || echo '$(srcdir)/'`commands/usbtest.c
+
+commands/usbtest_module-usbtest.obj: commands/usbtest.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $(usbtest_module_CFLAGS) $(CFLAGS) -MT commands/usbtest_module-usbtest.obj -MD -MP -MF commands/$(DEPDIR)/usbtest_module-usbtest.Tpo -c -o commands/usbtest_module-usbtest.obj `if test -f 'commands/usbtest.c'; then $(CYGPATH_W) 'commands/usbtest.c'; else $(CYGPATH_W) '$(srcdir)/commands/usbtest.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/usbtest_module-usbtest.Tpo commands/$(DEPDIR)/usbtest_module-usbtest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/usbtest.c' object='commands/usbtest_module-usbtest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $(usbtest_module_CFLAGS) $(CFLAGS) -c -o commands/usbtest_module-usbtest.obj `if test -f 'commands/usbtest.c'; then $(CYGPATH_W) 'commands/usbtest.c'; else $(CYGPATH_W) '$(srcdir)/commands/usbtest.c'; fi`
+
+video/i386/pc/vbe_module-vbe.o: video/i386/pc/vbe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vbe_module_CPPFLAGS) $(CPPFLAGS) $(vbe_module_CFLAGS) $(CFLAGS) -MT video/i386/pc/vbe_module-vbe.o -MD -MP -MF video/i386/pc/$(DEPDIR)/vbe_module-vbe.Tpo -c -o video/i386/pc/vbe_module-vbe.o `test -f 'video/i386/pc/vbe.c' || echo '$(srcdir)/'`video/i386/pc/vbe.c
+@am__fastdepCC_TRUE@ $(am__mv) video/i386/pc/$(DEPDIR)/vbe_module-vbe.Tpo video/i386/pc/$(DEPDIR)/vbe_module-vbe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/i386/pc/vbe.c' object='video/i386/pc/vbe_module-vbe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vbe_module_CPPFLAGS) $(CPPFLAGS) $(vbe_module_CFLAGS) $(CFLAGS) -c -o video/i386/pc/vbe_module-vbe.o `test -f 'video/i386/pc/vbe.c' || echo '$(srcdir)/'`video/i386/pc/vbe.c
+
+video/i386/pc/vbe_module-vbe.obj: video/i386/pc/vbe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vbe_module_CPPFLAGS) $(CPPFLAGS) $(vbe_module_CFLAGS) $(CFLAGS) -MT video/i386/pc/vbe_module-vbe.obj -MD -MP -MF video/i386/pc/$(DEPDIR)/vbe_module-vbe.Tpo -c -o video/i386/pc/vbe_module-vbe.obj `if test -f 'video/i386/pc/vbe.c'; then $(CYGPATH_W) 'video/i386/pc/vbe.c'; else $(CYGPATH_W) '$(srcdir)/video/i386/pc/vbe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/i386/pc/$(DEPDIR)/vbe_module-vbe.Tpo video/i386/pc/$(DEPDIR)/vbe_module-vbe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/i386/pc/vbe.c' object='video/i386/pc/vbe_module-vbe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vbe_module_CPPFLAGS) $(CPPFLAGS) $(vbe_module_CFLAGS) $(CFLAGS) -c -o video/i386/pc/vbe_module-vbe.obj `if test -f 'video/i386/pc/vbe.c'; then $(CYGPATH_W) 'video/i386/pc/vbe.c'; else $(CYGPATH_W) '$(srcdir)/video/i386/pc/vbe.c'; fi`
+
+video/i386/pc/vga_module-vga.o: video/i386/pc/vga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_module_CPPFLAGS) $(CPPFLAGS) $(vga_module_CFLAGS) $(CFLAGS) -MT video/i386/pc/vga_module-vga.o -MD -MP -MF video/i386/pc/$(DEPDIR)/vga_module-vga.Tpo -c -o video/i386/pc/vga_module-vga.o `test -f 'video/i386/pc/vga.c' || echo '$(srcdir)/'`video/i386/pc/vga.c
+@am__fastdepCC_TRUE@ $(am__mv) video/i386/pc/$(DEPDIR)/vga_module-vga.Tpo video/i386/pc/$(DEPDIR)/vga_module-vga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/i386/pc/vga.c' object='video/i386/pc/vga_module-vga.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_module_CPPFLAGS) $(CPPFLAGS) $(vga_module_CFLAGS) $(CFLAGS) -c -o video/i386/pc/vga_module-vga.o `test -f 'video/i386/pc/vga.c' || echo '$(srcdir)/'`video/i386/pc/vga.c
+
+video/i386/pc/vga_module-vga.obj: video/i386/pc/vga.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_module_CPPFLAGS) $(CPPFLAGS) $(vga_module_CFLAGS) $(CFLAGS) -MT video/i386/pc/vga_module-vga.obj -MD -MP -MF video/i386/pc/$(DEPDIR)/vga_module-vga.Tpo -c -o video/i386/pc/vga_module-vga.obj `if test -f 'video/i386/pc/vga.c'; then $(CYGPATH_W) 'video/i386/pc/vga.c'; else $(CYGPATH_W) '$(srcdir)/video/i386/pc/vga.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/i386/pc/$(DEPDIR)/vga_module-vga.Tpo video/i386/pc/$(DEPDIR)/vga_module-vga.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/i386/pc/vga.c' object='video/i386/pc/vga_module-vga.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_module_CPPFLAGS) $(CPPFLAGS) $(vga_module_CFLAGS) $(CFLAGS) -c -o video/i386/pc/vga_module-vga.obj `if test -f 'video/i386/pc/vga.c'; then $(CYGPATH_W) 'video/i386/pc/vga.c'; else $(CYGPATH_W) '$(srcdir)/video/i386/pc/vga.c'; fi`
+
+term/i386/pc/vga_text_module-vga_text.o: term/i386/pc/vga_text.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -MT term/i386/pc/vga_text_module-vga_text.o -MD -MP -MF term/i386/pc/$(DEPDIR)/vga_text_module-vga_text.Tpo -c -o term/i386/pc/vga_text_module-vga_text.o `test -f 'term/i386/pc/vga_text.c' || echo '$(srcdir)/'`term/i386/pc/vga_text.c
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/pc/$(DEPDIR)/vga_text_module-vga_text.Tpo term/i386/pc/$(DEPDIR)/vga_text_module-vga_text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/pc/vga_text.c' object='term/i386/pc/vga_text_module-vga_text.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -c -o term/i386/pc/vga_text_module-vga_text.o `test -f 'term/i386/pc/vga_text.c' || echo '$(srcdir)/'`term/i386/pc/vga_text.c
+
+term/i386/pc/vga_text_module-vga_text.obj: term/i386/pc/vga_text.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -MT term/i386/pc/vga_text_module-vga_text.obj -MD -MP -MF term/i386/pc/$(DEPDIR)/vga_text_module-vga_text.Tpo -c -o term/i386/pc/vga_text_module-vga_text.obj `if test -f 'term/i386/pc/vga_text.c'; then $(CYGPATH_W) 'term/i386/pc/vga_text.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/pc/vga_text.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/pc/$(DEPDIR)/vga_text_module-vga_text.Tpo term/i386/pc/$(DEPDIR)/vga_text_module-vga_text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/pc/vga_text.c' object='term/i386/pc/vga_text_module-vga_text.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -c -o term/i386/pc/vga_text_module-vga_text.obj `if test -f 'term/i386/pc/vga_text.c'; then $(CYGPATH_W) 'term/i386/pc/vga_text.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/pc/vga_text.c'; fi`
+
+term/i386/vga_text_module-vga_common.o: term/i386/vga_common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -MT term/i386/vga_text_module-vga_common.o -MD -MP -MF term/i386/$(DEPDIR)/vga_text_module-vga_common.Tpo -c -o term/i386/vga_text_module-vga_common.o `test -f 'term/i386/vga_common.c' || echo '$(srcdir)/'`term/i386/vga_common.c
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/$(DEPDIR)/vga_text_module-vga_common.Tpo term/i386/$(DEPDIR)/vga_text_module-vga_common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/vga_common.c' object='term/i386/vga_text_module-vga_common.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -c -o term/i386/vga_text_module-vga_common.o `test -f 'term/i386/vga_common.c' || echo '$(srcdir)/'`term/i386/vga_common.c
+
+term/i386/vga_text_module-vga_common.obj: term/i386/vga_common.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -MT term/i386/vga_text_module-vga_common.obj -MD -MP -MF term/i386/$(DEPDIR)/vga_text_module-vga_common.Tpo -c -o term/i386/vga_text_module-vga_common.obj `if test -f 'term/i386/vga_common.c'; then $(CYGPATH_W) 'term/i386/vga_common.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/vga_common.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) term/i386/$(DEPDIR)/vga_text_module-vga_common.Tpo term/i386/$(DEPDIR)/vga_text_module-vga_common.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='term/i386/vga_common.c' object='term/i386/vga_text_module-vga_common.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $(vga_text_module_CFLAGS) $(CFLAGS) -c -o term/i386/vga_text_module-vga_common.obj `if test -f 'term/i386/vga_common.c'; then $(CYGPATH_W) 'term/i386/vga_common.c'; else $(CYGPATH_W) '$(srcdir)/term/i386/vga_common.c'; fi`
+
+video/video_module-video.o: video/video.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $(video_module_CFLAGS) $(CFLAGS) -MT video/video_module-video.o -MD -MP -MF video/$(DEPDIR)/video_module-video.Tpo -c -o video/video_module-video.o `test -f 'video/video.c' || echo '$(srcdir)/'`video/video.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/video_module-video.Tpo video/$(DEPDIR)/video_module-video.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/video.c' object='video/video_module-video.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $(video_module_CFLAGS) $(CFLAGS) -c -o video/video_module-video.o `test -f 'video/video.c' || echo '$(srcdir)/'`video/video.c
+
+video/video_module-video.obj: video/video.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $(video_module_CFLAGS) $(CFLAGS) -MT video/video_module-video.obj -MD -MP -MF video/$(DEPDIR)/video_module-video.Tpo -c -o video/video_module-video.obj `if test -f 'video/video.c'; then $(CYGPATH_W) 'video/video.c'; else $(CYGPATH_W) '$(srcdir)/video/video.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/video_module-video.Tpo video/$(DEPDIR)/video_module-video.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/video.c' object='video/video_module-video.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $(video_module_CFLAGS) $(CFLAGS) -c -o video/video_module-video.obj `if test -f 'video/video.c'; then $(CYGPATH_W) 'video/video.c'; else $(CYGPATH_W) '$(srcdir)/video/video.c'; fi`
+
+video/video_bochs_module-bochs.o: video/bochs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $(video_bochs_module_CFLAGS) $(CFLAGS) -MT video/video_bochs_module-bochs.o -MD -MP -MF video/$(DEPDIR)/video_bochs_module-bochs.Tpo -c -o video/video_bochs_module-bochs.o `test -f 'video/bochs.c' || echo '$(srcdir)/'`video/bochs.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/video_bochs_module-bochs.Tpo video/$(DEPDIR)/video_bochs_module-bochs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bochs.c' object='video/video_bochs_module-bochs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $(video_bochs_module_CFLAGS) $(CFLAGS) -c -o video/video_bochs_module-bochs.o `test -f 'video/bochs.c' || echo '$(srcdir)/'`video/bochs.c
+
+video/video_bochs_module-bochs.obj: video/bochs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $(video_bochs_module_CFLAGS) $(CFLAGS) -MT video/video_bochs_module-bochs.obj -MD -MP -MF video/$(DEPDIR)/video_bochs_module-bochs.Tpo -c -o video/video_bochs_module-bochs.obj `if test -f 'video/bochs.c'; then $(CYGPATH_W) 'video/bochs.c'; else $(CYGPATH_W) '$(srcdir)/video/bochs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/video_bochs_module-bochs.Tpo video/$(DEPDIR)/video_bochs_module-bochs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/bochs.c' object='video/video_bochs_module-bochs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $(video_bochs_module_CFLAGS) $(CFLAGS) -c -o video/video_bochs_module-bochs.obj `if test -f 'video/bochs.c'; then $(CYGPATH_W) 'video/bochs.c'; else $(CYGPATH_W) '$(srcdir)/video/bochs.c'; fi`
+
+video/video_cirrus_module-cirrus.o: video/cirrus.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $(video_cirrus_module_CFLAGS) $(CFLAGS) -MT video/video_cirrus_module-cirrus.o -MD -MP -MF video/$(DEPDIR)/video_cirrus_module-cirrus.Tpo -c -o video/video_cirrus_module-cirrus.o `test -f 'video/cirrus.c' || echo '$(srcdir)/'`video/cirrus.c
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/video_cirrus_module-cirrus.Tpo video/$(DEPDIR)/video_cirrus_module-cirrus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/cirrus.c' object='video/video_cirrus_module-cirrus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $(video_cirrus_module_CFLAGS) $(CFLAGS) -c -o video/video_cirrus_module-cirrus.o `test -f 'video/cirrus.c' || echo '$(srcdir)/'`video/cirrus.c
+
+video/video_cirrus_module-cirrus.obj: video/cirrus.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $(video_cirrus_module_CFLAGS) $(CFLAGS) -MT video/video_cirrus_module-cirrus.obj -MD -MP -MF video/$(DEPDIR)/video_cirrus_module-cirrus.Tpo -c -o video/video_cirrus_module-cirrus.obj `if test -f 'video/cirrus.c'; then $(CYGPATH_W) 'video/cirrus.c'; else $(CYGPATH_W) '$(srcdir)/video/cirrus.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/$(DEPDIR)/video_cirrus_module-cirrus.Tpo video/$(DEPDIR)/video_cirrus_module-cirrus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/cirrus.c' object='video/video_cirrus_module-cirrus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $(video_cirrus_module_CFLAGS) $(CFLAGS) -c -o video/video_cirrus_module-cirrus.obj `if test -f 'video/cirrus.c'; then $(CYGPATH_W) 'video/cirrus.c'; else $(CYGPATH_W) '$(srcdir)/video/cirrus.c'; fi`
+
+video/fb/video_fb_module-video_fb.o: video/fb/video_fb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-video_fb.o -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-video_fb.Tpo -c -o video/fb/video_fb_module-video_fb.o `test -f 'video/fb/video_fb.c' || echo '$(srcdir)/'`video/fb/video_fb.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-video_fb.Tpo video/fb/$(DEPDIR)/video_fb_module-video_fb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/video_fb.c' object='video/fb/video_fb_module-video_fb.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-video_fb.o `test -f 'video/fb/video_fb.c' || echo '$(srcdir)/'`video/fb/video_fb.c
+
+video/fb/video_fb_module-video_fb.obj: video/fb/video_fb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-video_fb.obj -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-video_fb.Tpo -c -o video/fb/video_fb_module-video_fb.obj `if test -f 'video/fb/video_fb.c'; then $(CYGPATH_W) 'video/fb/video_fb.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/video_fb.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-video_fb.Tpo video/fb/$(DEPDIR)/video_fb_module-video_fb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/video_fb.c' object='video/fb/video_fb_module-video_fb.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-video_fb.obj `if test -f 'video/fb/video_fb.c'; then $(CYGPATH_W) 'video/fb/video_fb.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/video_fb.c'; fi`
+
+video/fb/video_fb_module-fbblit.o: video/fb/fbblit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-fbblit.o -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-fbblit.Tpo -c -o video/fb/video_fb_module-fbblit.o `test -f 'video/fb/fbblit.c' || echo '$(srcdir)/'`video/fb/fbblit.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-fbblit.Tpo video/fb/$(DEPDIR)/video_fb_module-fbblit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbblit.c' object='video/fb/video_fb_module-fbblit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-fbblit.o `test -f 'video/fb/fbblit.c' || echo '$(srcdir)/'`video/fb/fbblit.c
+
+video/fb/video_fb_module-fbblit.obj: video/fb/fbblit.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-fbblit.obj -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-fbblit.Tpo -c -o video/fb/video_fb_module-fbblit.obj `if test -f 'video/fb/fbblit.c'; then $(CYGPATH_W) 'video/fb/fbblit.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbblit.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-fbblit.Tpo video/fb/$(DEPDIR)/video_fb_module-fbblit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbblit.c' object='video/fb/video_fb_module-fbblit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-fbblit.obj `if test -f 'video/fb/fbblit.c'; then $(CYGPATH_W) 'video/fb/fbblit.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbblit.c'; fi`
+
+video/fb/video_fb_module-fbfill.o: video/fb/fbfill.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-fbfill.o -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-fbfill.Tpo -c -o video/fb/video_fb_module-fbfill.o `test -f 'video/fb/fbfill.c' || echo '$(srcdir)/'`video/fb/fbfill.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-fbfill.Tpo video/fb/$(DEPDIR)/video_fb_module-fbfill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbfill.c' object='video/fb/video_fb_module-fbfill.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-fbfill.o `test -f 'video/fb/fbfill.c' || echo '$(srcdir)/'`video/fb/fbfill.c
+
+video/fb/video_fb_module-fbfill.obj: video/fb/fbfill.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-fbfill.obj -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-fbfill.Tpo -c -o video/fb/video_fb_module-fbfill.obj `if test -f 'video/fb/fbfill.c'; then $(CYGPATH_W) 'video/fb/fbfill.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbfill.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-fbfill.Tpo video/fb/$(DEPDIR)/video_fb_module-fbfill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbfill.c' object='video/fb/video_fb_module-fbfill.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-fbfill.obj `if test -f 'video/fb/fbfill.c'; then $(CYGPATH_W) 'video/fb/fbfill.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbfill.c'; fi`
+
+video/fb/video_fb_module-fbutil.o: video/fb/fbutil.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-fbutil.o -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-fbutil.Tpo -c -o video/fb/video_fb_module-fbutil.o `test -f 'video/fb/fbutil.c' || echo '$(srcdir)/'`video/fb/fbutil.c
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-fbutil.Tpo video/fb/$(DEPDIR)/video_fb_module-fbutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbutil.c' object='video/fb/video_fb_module-fbutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-fbutil.o `test -f 'video/fb/fbutil.c' || echo '$(srcdir)/'`video/fb/fbutil.c
+
+video/fb/video_fb_module-fbutil.obj: video/fb/fbutil.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -MT video/fb/video_fb_module-fbutil.obj -MD -MP -MF video/fb/$(DEPDIR)/video_fb_module-fbutil.Tpo -c -o video/fb/video_fb_module-fbutil.obj `if test -f 'video/fb/fbutil.c'; then $(CYGPATH_W) 'video/fb/fbutil.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbutil.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) video/fb/$(DEPDIR)/video_fb_module-fbutil.Tpo video/fb/$(DEPDIR)/video_fb_module-fbutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='video/fb/fbutil.c' object='video/fb/video_fb_module-fbutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $(video_fb_module_CFLAGS) $(CFLAGS) -c -o video/fb/video_fb_module-fbutil.obj `if test -f 'video/fb/fbutil.c'; then $(CYGPATH_W) 'video/fb/fbutil.c'; else $(CYGPATH_W) '$(srcdir)/video/fb/fbutil.c'; fi`
+
+commands/videoinfo_module-videoinfo.o: commands/videoinfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $(videoinfo_module_CFLAGS) $(CFLAGS) -MT commands/videoinfo_module-videoinfo.o -MD -MP -MF commands/$(DEPDIR)/videoinfo_module-videoinfo.Tpo -c -o commands/videoinfo_module-videoinfo.o `test -f 'commands/videoinfo.c' || echo '$(srcdir)/'`commands/videoinfo.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/videoinfo_module-videoinfo.Tpo commands/$(DEPDIR)/videoinfo_module-videoinfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/videoinfo.c' object='commands/videoinfo_module-videoinfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $(videoinfo_module_CFLAGS) $(CFLAGS) -c -o commands/videoinfo_module-videoinfo.o `test -f 'commands/videoinfo.c' || echo '$(srcdir)/'`commands/videoinfo.c
+
+commands/videoinfo_module-videoinfo.obj: commands/videoinfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $(videoinfo_module_CFLAGS) $(CFLAGS) -MT commands/videoinfo_module-videoinfo.obj -MD -MP -MF commands/$(DEPDIR)/videoinfo_module-videoinfo.Tpo -c -o commands/videoinfo_module-videoinfo.obj `if test -f 'commands/videoinfo.c'; then $(CYGPATH_W) 'commands/videoinfo.c'; else $(CYGPATH_W) '$(srcdir)/commands/videoinfo.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/videoinfo_module-videoinfo.Tpo commands/$(DEPDIR)/videoinfo_module-videoinfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/videoinfo.c' object='commands/videoinfo_module-videoinfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $(videoinfo_module_CFLAGS) $(CFLAGS) -c -o commands/videoinfo_module-videoinfo.obj `if test -f 'commands/videoinfo.c'; then $(CYGPATH_W) 'commands/videoinfo.c'; else $(CYGPATH_W) '$(srcdir)/commands/videoinfo.c'; fi`
+
+commands/videotest_module-videotest.o: commands/videotest.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $(videotest_module_CFLAGS) $(CFLAGS) -MT commands/videotest_module-videotest.o -MD -MP -MF commands/$(DEPDIR)/videotest_module-videotest.Tpo -c -o commands/videotest_module-videotest.o `test -f 'commands/videotest.c' || echo '$(srcdir)/'`commands/videotest.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/videotest_module-videotest.Tpo commands/$(DEPDIR)/videotest_module-videotest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/videotest.c' object='commands/videotest_module-videotest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $(videotest_module_CFLAGS) $(CFLAGS) -c -o commands/videotest_module-videotest.o `test -f 'commands/videotest.c' || echo '$(srcdir)/'`commands/videotest.c
+
+commands/videotest_module-videotest.obj: commands/videotest.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $(videotest_module_CFLAGS) $(CFLAGS) -MT commands/videotest_module-videotest.obj -MD -MP -MF commands/$(DEPDIR)/videotest_module-videotest.Tpo -c -o commands/videotest_module-videotest.obj `if test -f 'commands/videotest.c'; then $(CYGPATH_W) 'commands/videotest.c'; else $(CYGPATH_W) '$(srcdir)/commands/videotest.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/videotest_module-videotest.Tpo commands/$(DEPDIR)/videotest_module-videotest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/videotest.c' object='commands/videotest_module-videotest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $(videotest_module_CFLAGS) $(CFLAGS) -c -o commands/videotest_module-videotest.obj `if test -f 'commands/videotest.c'; then $(CYGPATH_W) 'commands/videotest.c'; else $(CYGPATH_W) '$(srcdir)/commands/videotest.c'; fi`
+
+fs/xfs_module-xfs.o: fs/xfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $(xfs_module_CFLAGS) $(CFLAGS) -MT fs/xfs_module-xfs.o -MD -MP -MF fs/$(DEPDIR)/xfs_module-xfs.Tpo -c -o fs/xfs_module-xfs.o `test -f 'fs/xfs.c' || echo '$(srcdir)/'`fs/xfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/xfs_module-xfs.Tpo fs/$(DEPDIR)/xfs_module-xfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/xfs.c' object='fs/xfs_module-xfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $(xfs_module_CFLAGS) $(CFLAGS) -c -o fs/xfs_module-xfs.o `test -f 'fs/xfs.c' || echo '$(srcdir)/'`fs/xfs.c
+
+fs/xfs_module-xfs.obj: fs/xfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $(xfs_module_CFLAGS) $(CFLAGS) -MT fs/xfs_module-xfs.obj -MD -MP -MF fs/$(DEPDIR)/xfs_module-xfs.Tpo -c -o fs/xfs_module-xfs.obj `if test -f 'fs/xfs.c'; then $(CYGPATH_W) 'fs/xfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/xfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/$(DEPDIR)/xfs_module-xfs.Tpo fs/$(DEPDIR)/xfs_module-xfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/xfs.c' object='fs/xfs_module-xfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $(xfs_module_CFLAGS) $(CFLAGS) -c -o fs/xfs_module-xfs.obj `if test -f 'fs/xfs.c'; then $(CYGPATH_W) 'fs/xfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/xfs.c'; fi`
+
+loader/xnu_module-xnu_resume.o: loader/xnu_resume.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-xnu_resume.o -MD -MP -MF loader/$(DEPDIR)/xnu_module-xnu_resume.Tpo -c -o loader/xnu_module-xnu_resume.o `test -f 'loader/xnu_resume.c' || echo '$(srcdir)/'`loader/xnu_resume.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-xnu_resume.Tpo loader/$(DEPDIR)/xnu_module-xnu_resume.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/xnu_resume.c' object='loader/xnu_module-xnu_resume.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-xnu_resume.o `test -f 'loader/xnu_resume.c' || echo '$(srcdir)/'`loader/xnu_resume.c
+
+loader/xnu_module-xnu_resume.obj: loader/xnu_resume.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-xnu_resume.obj -MD -MP -MF loader/$(DEPDIR)/xnu_module-xnu_resume.Tpo -c -o loader/xnu_module-xnu_resume.obj `if test -f 'loader/xnu_resume.c'; then $(CYGPATH_W) 'loader/xnu_resume.c'; else $(CYGPATH_W) '$(srcdir)/loader/xnu_resume.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-xnu_resume.Tpo loader/$(DEPDIR)/xnu_module-xnu_resume.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/xnu_resume.c' object='loader/xnu_module-xnu_resume.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-xnu_resume.obj `if test -f 'loader/xnu_resume.c'; then $(CYGPATH_W) 'loader/xnu_resume.c'; else $(CYGPATH_W) '$(srcdir)/loader/xnu_resume.c'; fi`
+
+loader/i386/xnu_module-xnu.o: loader/i386/xnu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/i386/xnu_module-xnu.o -MD -MP -MF loader/i386/$(DEPDIR)/xnu_module-xnu.Tpo -c -o loader/i386/xnu_module-xnu.o `test -f 'loader/i386/xnu.c' || echo '$(srcdir)/'`loader/i386/xnu.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/xnu_module-xnu.Tpo loader/i386/$(DEPDIR)/xnu_module-xnu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/xnu.c' object='loader/i386/xnu_module-xnu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/i386/xnu_module-xnu.o `test -f 'loader/i386/xnu.c' || echo '$(srcdir)/'`loader/i386/xnu.c
+
+loader/i386/xnu_module-xnu.obj: loader/i386/xnu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/i386/xnu_module-xnu.obj -MD -MP -MF loader/i386/$(DEPDIR)/xnu_module-xnu.Tpo -c -o loader/i386/xnu_module-xnu.obj `if test -f 'loader/i386/xnu.c'; then $(CYGPATH_W) 'loader/i386/xnu.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/xnu.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/i386/$(DEPDIR)/xnu_module-xnu.Tpo loader/i386/$(DEPDIR)/xnu_module-xnu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/i386/xnu.c' object='loader/i386/xnu_module-xnu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/i386/xnu_module-xnu.obj `if test -f 'loader/i386/xnu.c'; then $(CYGPATH_W) 'loader/i386/xnu.c'; else $(CYGPATH_W) '$(srcdir)/loader/i386/xnu.c'; fi`
+
+loader/xnu_module-macho32.o: loader/macho32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-macho32.o -MD -MP -MF loader/$(DEPDIR)/xnu_module-macho32.Tpo -c -o loader/xnu_module-macho32.o `test -f 'loader/macho32.c' || echo '$(srcdir)/'`loader/macho32.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-macho32.Tpo loader/$(DEPDIR)/xnu_module-macho32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/macho32.c' object='loader/xnu_module-macho32.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-macho32.o `test -f 'loader/macho32.c' || echo '$(srcdir)/'`loader/macho32.c
+
+loader/xnu_module-macho32.obj: loader/macho32.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-macho32.obj -MD -MP -MF loader/$(DEPDIR)/xnu_module-macho32.Tpo -c -o loader/xnu_module-macho32.obj `if test -f 'loader/macho32.c'; then $(CYGPATH_W) 'loader/macho32.c'; else $(CYGPATH_W) '$(srcdir)/loader/macho32.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-macho32.Tpo loader/$(DEPDIR)/xnu_module-macho32.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/macho32.c' object='loader/xnu_module-macho32.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-macho32.obj `if test -f 'loader/macho32.c'; then $(CYGPATH_W) 'loader/macho32.c'; else $(CYGPATH_W) '$(srcdir)/loader/macho32.c'; fi`
+
+loader/xnu_module-macho64.o: loader/macho64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-macho64.o -MD -MP -MF loader/$(DEPDIR)/xnu_module-macho64.Tpo -c -o loader/xnu_module-macho64.o `test -f 'loader/macho64.c' || echo '$(srcdir)/'`loader/macho64.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-macho64.Tpo loader/$(DEPDIR)/xnu_module-macho64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/macho64.c' object='loader/xnu_module-macho64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-macho64.o `test -f 'loader/macho64.c' || echo '$(srcdir)/'`loader/macho64.c
+
+loader/xnu_module-macho64.obj: loader/macho64.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-macho64.obj -MD -MP -MF loader/$(DEPDIR)/xnu_module-macho64.Tpo -c -o loader/xnu_module-macho64.obj `if test -f 'loader/macho64.c'; then $(CYGPATH_W) 'loader/macho64.c'; else $(CYGPATH_W) '$(srcdir)/loader/macho64.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-macho64.Tpo loader/$(DEPDIR)/xnu_module-macho64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/macho64.c' object='loader/xnu_module-macho64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-macho64.obj `if test -f 'loader/macho64.c'; then $(CYGPATH_W) 'loader/macho64.c'; else $(CYGPATH_W) '$(srcdir)/loader/macho64.c'; fi`
+
+loader/xnu_module-macho.o: loader/macho.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-macho.o -MD -MP -MF loader/$(DEPDIR)/xnu_module-macho.Tpo -c -o loader/xnu_module-macho.o `test -f 'loader/macho.c' || echo '$(srcdir)/'`loader/macho.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-macho.Tpo loader/$(DEPDIR)/xnu_module-macho.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/macho.c' object='loader/xnu_module-macho.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-macho.o `test -f 'loader/macho.c' || echo '$(srcdir)/'`loader/macho.c
+
+loader/xnu_module-macho.obj: loader/macho.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-macho.obj -MD -MP -MF loader/$(DEPDIR)/xnu_module-macho.Tpo -c -o loader/xnu_module-macho.obj `if test -f 'loader/macho.c'; then $(CYGPATH_W) 'loader/macho.c'; else $(CYGPATH_W) '$(srcdir)/loader/macho.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-macho.Tpo loader/$(DEPDIR)/xnu_module-macho.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/macho.c' object='loader/xnu_module-macho.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-macho.obj `if test -f 'loader/macho.c'; then $(CYGPATH_W) 'loader/macho.c'; else $(CYGPATH_W) '$(srcdir)/loader/macho.c'; fi`
+
+loader/xnu_module-xnu.o: loader/xnu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-xnu.o -MD -MP -MF loader/$(DEPDIR)/xnu_module-xnu.Tpo -c -o loader/xnu_module-xnu.o `test -f 'loader/xnu.c' || echo '$(srcdir)/'`loader/xnu.c
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-xnu.Tpo loader/$(DEPDIR)/xnu_module-xnu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/xnu.c' object='loader/xnu_module-xnu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-xnu.o `test -f 'loader/xnu.c' || echo '$(srcdir)/'`loader/xnu.c
+
+loader/xnu_module-xnu.obj: loader/xnu.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -MT loader/xnu_module-xnu.obj -MD -MP -MF loader/$(DEPDIR)/xnu_module-xnu.Tpo -c -o loader/xnu_module-xnu.obj `if test -f 'loader/xnu.c'; then $(CYGPATH_W) 'loader/xnu.c'; else $(CYGPATH_W) '$(srcdir)/loader/xnu.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) loader/$(DEPDIR)/xnu_module-xnu.Tpo loader/$(DEPDIR)/xnu_module-xnu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader/xnu.c' object='loader/xnu_module-xnu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $(xnu_module_CFLAGS) $(CFLAGS) -c -o loader/xnu_module-xnu.obj `if test -f 'loader/xnu.c'; then $(CYGPATH_W) 'loader/xnu.c'; else $(CYGPATH_W) '$(srcdir)/loader/xnu.c'; fi`
+
+commands/xnu_uuid_module-xnu_uuid.o: commands/xnu_uuid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $(xnu_uuid_module_CFLAGS) $(CFLAGS) -MT commands/xnu_uuid_module-xnu_uuid.o -MD -MP -MF commands/$(DEPDIR)/xnu_uuid_module-xnu_uuid.Tpo -c -o commands/xnu_uuid_module-xnu_uuid.o `test -f 'commands/xnu_uuid.c' || echo '$(srcdir)/'`commands/xnu_uuid.c
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/xnu_uuid_module-xnu_uuid.Tpo commands/$(DEPDIR)/xnu_uuid_module-xnu_uuid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/xnu_uuid.c' object='commands/xnu_uuid_module-xnu_uuid.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $(xnu_uuid_module_CFLAGS) $(CFLAGS) -c -o commands/xnu_uuid_module-xnu_uuid.o `test -f 'commands/xnu_uuid.c' || echo '$(srcdir)/'`commands/xnu_uuid.c
+
+commands/xnu_uuid_module-xnu_uuid.obj: commands/xnu_uuid.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $(xnu_uuid_module_CFLAGS) $(CFLAGS) -MT commands/xnu_uuid_module-xnu_uuid.obj -MD -MP -MF commands/$(DEPDIR)/xnu_uuid_module-xnu_uuid.Tpo -c -o commands/xnu_uuid_module-xnu_uuid.obj `if test -f 'commands/xnu_uuid.c'; then $(CYGPATH_W) 'commands/xnu_uuid.c'; else $(CYGPATH_W) '$(srcdir)/commands/xnu_uuid.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) commands/$(DEPDIR)/xnu_uuid_module-xnu_uuid.Tpo commands/$(DEPDIR)/xnu_uuid_module-xnu_uuid.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='commands/xnu_uuid.c' object='commands/xnu_uuid_module-xnu_uuid.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $(xnu_uuid_module_CFLAGS) $(CFLAGS) -c -o commands/xnu_uuid_module-xnu_uuid.obj `if test -f 'commands/xnu_uuid.c'; then $(CYGPATH_W) 'commands/xnu_uuid.c'; else $(CYGPATH_W) '$(srcdir)/commands/xnu_uuid.c'; fi`
+
+boot/decompressor/xz_decompress_image-minilib.o: boot/decompressor/minilib.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT boot/decompressor/xz_decompress_image-minilib.o -MD -MP -MF boot/decompressor/$(DEPDIR)/xz_decompress_image-minilib.Tpo -c -o boot/decompressor/xz_decompress_image-minilib.o `test -f 'boot/decompressor/minilib.c' || echo '$(srcdir)/'`boot/decompressor/minilib.c
+@am__fastdepCC_TRUE@ $(am__mv) boot/decompressor/$(DEPDIR)/xz_decompress_image-minilib.Tpo boot/decompressor/$(DEPDIR)/xz_decompress_image-minilib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='boot/decompressor/minilib.c' object='boot/decompressor/xz_decompress_image-minilib.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o boot/decompressor/xz_decompress_image-minilib.o `test -f 'boot/decompressor/minilib.c' || echo '$(srcdir)/'`boot/decompressor/minilib.c
+
+boot/decompressor/xz_decompress_image-minilib.obj: boot/decompressor/minilib.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT boot/decompressor/xz_decompress_image-minilib.obj -MD -MP -MF boot/decompressor/$(DEPDIR)/xz_decompress_image-minilib.Tpo -c -o boot/decompressor/xz_decompress_image-minilib.obj `if test -f 'boot/decompressor/minilib.c'; then $(CYGPATH_W) 'boot/decompressor/minilib.c'; else $(CYGPATH_W) '$(srcdir)/boot/decompressor/minilib.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) boot/decompressor/$(DEPDIR)/xz_decompress_image-minilib.Tpo boot/decompressor/$(DEPDIR)/xz_decompress_image-minilib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='boot/decompressor/minilib.c' object='boot/decompressor/xz_decompress_image-minilib.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o boot/decompressor/xz_decompress_image-minilib.obj `if test -f 'boot/decompressor/minilib.c'; then $(CYGPATH_W) 'boot/decompressor/minilib.c'; else $(CYGPATH_W) '$(srcdir)/boot/decompressor/minilib.c'; fi`
+
+boot/decompressor/xz_decompress_image-xz.o: boot/decompressor/xz.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT boot/decompressor/xz_decompress_image-xz.o -MD -MP -MF boot/decompressor/$(DEPDIR)/xz_decompress_image-xz.Tpo -c -o boot/decompressor/xz_decompress_image-xz.o `test -f 'boot/decompressor/xz.c' || echo '$(srcdir)/'`boot/decompressor/xz.c
+@am__fastdepCC_TRUE@ $(am__mv) boot/decompressor/$(DEPDIR)/xz_decompress_image-xz.Tpo boot/decompressor/$(DEPDIR)/xz_decompress_image-xz.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='boot/decompressor/xz.c' object='boot/decompressor/xz_decompress_image-xz.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o boot/decompressor/xz_decompress_image-xz.o `test -f 'boot/decompressor/xz.c' || echo '$(srcdir)/'`boot/decompressor/xz.c
+
+boot/decompressor/xz_decompress_image-xz.obj: boot/decompressor/xz.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT boot/decompressor/xz_decompress_image-xz.obj -MD -MP -MF boot/decompressor/$(DEPDIR)/xz_decompress_image-xz.Tpo -c -o boot/decompressor/xz_decompress_image-xz.obj `if test -f 'boot/decompressor/xz.c'; then $(CYGPATH_W) 'boot/decompressor/xz.c'; else $(CYGPATH_W) '$(srcdir)/boot/decompressor/xz.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) boot/decompressor/$(DEPDIR)/xz_decompress_image-xz.Tpo boot/decompressor/$(DEPDIR)/xz_decompress_image-xz.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='boot/decompressor/xz.c' object='boot/decompressor/xz_decompress_image-xz.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o boot/decompressor/xz_decompress_image-xz.obj `if test -f 'boot/decompressor/xz.c'; then $(CYGPATH_W) 'boot/decompressor/xz.c'; else $(CYGPATH_W) '$(srcdir)/boot/decompressor/xz.c'; fi`
+
+lib/xzembed/xz_decompress_image-xz_dec_bcj.o: lib/xzembed/xz_dec_bcj.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT lib/xzembed/xz_decompress_image-xz_dec_bcj.o -MD -MP -MF lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_bcj.Tpo -c -o lib/xzembed/xz_decompress_image-xz_dec_bcj.o `test -f 'lib/xzembed/xz_dec_bcj.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_bcj.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_bcj.Tpo lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_bcj.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_bcj.c' object='lib/xzembed/xz_decompress_image-xz_dec_bcj.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xz_decompress_image-xz_dec_bcj.o `test -f 'lib/xzembed/xz_dec_bcj.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_bcj.c
+
+lib/xzembed/xz_decompress_image-xz_dec_bcj.obj: lib/xzembed/xz_dec_bcj.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT lib/xzembed/xz_decompress_image-xz_dec_bcj.obj -MD -MP -MF lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_bcj.Tpo -c -o lib/xzembed/xz_decompress_image-xz_dec_bcj.obj `if test -f 'lib/xzembed/xz_dec_bcj.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_bcj.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_bcj.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_bcj.Tpo lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_bcj.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_bcj.c' object='lib/xzembed/xz_decompress_image-xz_dec_bcj.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xz_decompress_image-xz_dec_bcj.obj `if test -f 'lib/xzembed/xz_dec_bcj.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_bcj.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_bcj.c'; fi`
+
+lib/xzembed/xz_decompress_image-xz_dec_lzma2.o: lib/xzembed/xz_dec_lzma2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT lib/xzembed/xz_decompress_image-xz_dec_lzma2.o -MD -MP -MF lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_lzma2.Tpo -c -o lib/xzembed/xz_decompress_image-xz_dec_lzma2.o `test -f 'lib/xzembed/xz_dec_lzma2.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_lzma2.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_lzma2.Tpo lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_lzma2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_lzma2.c' object='lib/xzembed/xz_decompress_image-xz_dec_lzma2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xz_decompress_image-xz_dec_lzma2.o `test -f 'lib/xzembed/xz_dec_lzma2.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_lzma2.c
+
+lib/xzembed/xz_decompress_image-xz_dec_lzma2.obj: lib/xzembed/xz_dec_lzma2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT lib/xzembed/xz_decompress_image-xz_dec_lzma2.obj -MD -MP -MF lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_lzma2.Tpo -c -o lib/xzembed/xz_decompress_image-xz_dec_lzma2.obj `if test -f 'lib/xzembed/xz_dec_lzma2.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_lzma2.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_lzma2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_lzma2.Tpo lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_lzma2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_lzma2.c' object='lib/xzembed/xz_decompress_image-xz_dec_lzma2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xz_decompress_image-xz_dec_lzma2.obj `if test -f 'lib/xzembed/xz_dec_lzma2.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_lzma2.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_lzma2.c'; fi`
+
+lib/xzembed/xz_decompress_image-xz_dec_stream.o: lib/xzembed/xz_dec_stream.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT lib/xzembed/xz_decompress_image-xz_dec_stream.o -MD -MP -MF lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_stream.Tpo -c -o lib/xzembed/xz_decompress_image-xz_dec_stream.o `test -f 'lib/xzembed/xz_dec_stream.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_stream.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_stream.Tpo lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_stream.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_stream.c' object='lib/xzembed/xz_decompress_image-xz_dec_stream.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xz_decompress_image-xz_dec_stream.o `test -f 'lib/xzembed/xz_dec_stream.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_stream.c
+
+lib/xzembed/xz_decompress_image-xz_dec_stream.obj: lib/xzembed/xz_dec_stream.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -MT lib/xzembed/xz_decompress_image-xz_dec_stream.obj -MD -MP -MF lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_stream.Tpo -c -o lib/xzembed/xz_decompress_image-xz_dec_stream.obj `if test -f 'lib/xzembed/xz_dec_stream.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_stream.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_stream.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_stream.Tpo lib/xzembed/$(DEPDIR)/xz_decompress_image-xz_dec_stream.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_stream.c' object='lib/xzembed/xz_decompress_image-xz_dec_stream.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_decompress_image_CPPFLAGS) $(CPPFLAGS) $(xz_decompress_image_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xz_decompress_image-xz_dec_stream.obj `if test -f 'lib/xzembed/xz_dec_stream.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_stream.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_stream.c'; fi`
+
+io/xzio_module-xzio.o: io/xzio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT io/xzio_module-xzio.o -MD -MP -MF io/$(DEPDIR)/xzio_module-xzio.Tpo -c -o io/xzio_module-xzio.o `test -f 'io/xzio.c' || echo '$(srcdir)/'`io/xzio.c
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/xzio_module-xzio.Tpo io/$(DEPDIR)/xzio_module-xzio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/xzio.c' object='io/xzio_module-xzio.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o io/xzio_module-xzio.o `test -f 'io/xzio.c' || echo '$(srcdir)/'`io/xzio.c
+
+io/xzio_module-xzio.obj: io/xzio.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT io/xzio_module-xzio.obj -MD -MP -MF io/$(DEPDIR)/xzio_module-xzio.Tpo -c -o io/xzio_module-xzio.obj `if test -f 'io/xzio.c'; then $(CYGPATH_W) 'io/xzio.c'; else $(CYGPATH_W) '$(srcdir)/io/xzio.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) io/$(DEPDIR)/xzio_module-xzio.Tpo io/$(DEPDIR)/xzio_module-xzio.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='io/xzio.c' object='io/xzio_module-xzio.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o io/xzio_module-xzio.obj `if test -f 'io/xzio.c'; then $(CYGPATH_W) 'io/xzio.c'; else $(CYGPATH_W) '$(srcdir)/io/xzio.c'; fi`
+
+lib/xzembed/xzio_module-xz_dec_bcj.o: lib/xzembed/xz_dec_bcj.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT lib/xzembed/xzio_module-xz_dec_bcj.o -MD -MP -MF lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_bcj.Tpo -c -o lib/xzembed/xzio_module-xz_dec_bcj.o `test -f 'lib/xzembed/xz_dec_bcj.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_bcj.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_bcj.Tpo lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_bcj.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_bcj.c' object='lib/xzembed/xzio_module-xz_dec_bcj.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xzio_module-xz_dec_bcj.o `test -f 'lib/xzembed/xz_dec_bcj.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_bcj.c
+
+lib/xzembed/xzio_module-xz_dec_bcj.obj: lib/xzembed/xz_dec_bcj.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT lib/xzembed/xzio_module-xz_dec_bcj.obj -MD -MP -MF lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_bcj.Tpo -c -o lib/xzembed/xzio_module-xz_dec_bcj.obj `if test -f 'lib/xzembed/xz_dec_bcj.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_bcj.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_bcj.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_bcj.Tpo lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_bcj.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_bcj.c' object='lib/xzembed/xzio_module-xz_dec_bcj.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xzio_module-xz_dec_bcj.obj `if test -f 'lib/xzembed/xz_dec_bcj.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_bcj.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_bcj.c'; fi`
+
+lib/xzembed/xzio_module-xz_dec_lzma2.o: lib/xzembed/xz_dec_lzma2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT lib/xzembed/xzio_module-xz_dec_lzma2.o -MD -MP -MF lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_lzma2.Tpo -c -o lib/xzembed/xzio_module-xz_dec_lzma2.o `test -f 'lib/xzembed/xz_dec_lzma2.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_lzma2.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_lzma2.Tpo lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_lzma2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_lzma2.c' object='lib/xzembed/xzio_module-xz_dec_lzma2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xzio_module-xz_dec_lzma2.o `test -f 'lib/xzembed/xz_dec_lzma2.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_lzma2.c
+
+lib/xzembed/xzio_module-xz_dec_lzma2.obj: lib/xzembed/xz_dec_lzma2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT lib/xzembed/xzio_module-xz_dec_lzma2.obj -MD -MP -MF lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_lzma2.Tpo -c -o lib/xzembed/xzio_module-xz_dec_lzma2.obj `if test -f 'lib/xzembed/xz_dec_lzma2.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_lzma2.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_lzma2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_lzma2.Tpo lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_lzma2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_lzma2.c' object='lib/xzembed/xzio_module-xz_dec_lzma2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xzio_module-xz_dec_lzma2.obj `if test -f 'lib/xzembed/xz_dec_lzma2.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_lzma2.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_lzma2.c'; fi`
+
+lib/xzembed/xzio_module-xz_dec_stream.o: lib/xzembed/xz_dec_stream.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT lib/xzembed/xzio_module-xz_dec_stream.o -MD -MP -MF lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_stream.Tpo -c -o lib/xzembed/xzio_module-xz_dec_stream.o `test -f 'lib/xzembed/xz_dec_stream.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_stream.c
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_stream.Tpo lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_stream.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_stream.c' object='lib/xzembed/xzio_module-xz_dec_stream.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xzio_module-xz_dec_stream.o `test -f 'lib/xzembed/xz_dec_stream.c' || echo '$(srcdir)/'`lib/xzembed/xz_dec_stream.c
+
+lib/xzembed/xzio_module-xz_dec_stream.obj: lib/xzembed/xz_dec_stream.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -MT lib/xzembed/xzio_module-xz_dec_stream.obj -MD -MP -MF lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_stream.Tpo -c -o lib/xzembed/xzio_module-xz_dec_stream.obj `if test -f 'lib/xzembed/xz_dec_stream.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_stream.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_stream.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_stream.Tpo lib/xzembed/$(DEPDIR)/xzio_module-xz_dec_stream.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/xzembed/xz_dec_stream.c' object='lib/xzembed/xzio_module-xz_dec_stream.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $(xzio_module_CFLAGS) $(CFLAGS) -c -o lib/xzembed/xzio_module-xz_dec_stream.obj `if test -f 'lib/xzembed/xz_dec_stream.c'; then $(CYGPATH_W) 'lib/xzembed/xz_dec_stream.c'; else $(CYGPATH_W) '$(srcdir)/lib/xzembed/xz_dec_stream.c'; fi`
+
+fs/zfs/zfs_module-zfs.o: fs/zfs/zfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs.o -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs.Tpo -c -o fs/zfs/zfs_module-zfs.o `test -f 'fs/zfs/zfs.c' || echo '$(srcdir)/'`fs/zfs/zfs.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs.c' object='fs/zfs/zfs_module-zfs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs.o `test -f 'fs/zfs/zfs.c' || echo '$(srcdir)/'`fs/zfs/zfs.c
+
+fs/zfs/zfs_module-zfs.obj: fs/zfs/zfs.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs.obj -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs.Tpo -c -o fs/zfs/zfs_module-zfs.obj `if test -f 'fs/zfs/zfs.c'; then $(CYGPATH_W) 'fs/zfs/zfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs.c' object='fs/zfs/zfs_module-zfs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs.obj `if test -f 'fs/zfs/zfs.c'; then $(CYGPATH_W) 'fs/zfs/zfs.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs.c'; fi`
+
+fs/zfs/zfs_module-zfs_lzjb.o: fs/zfs/zfs_lzjb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs_lzjb.o -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs_lzjb.Tpo -c -o fs/zfs/zfs_module-zfs_lzjb.o `test -f 'fs/zfs/zfs_lzjb.c' || echo '$(srcdir)/'`fs/zfs/zfs_lzjb.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs_lzjb.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs_lzjb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs_lzjb.c' object='fs/zfs/zfs_module-zfs_lzjb.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs_lzjb.o `test -f 'fs/zfs/zfs_lzjb.c' || echo '$(srcdir)/'`fs/zfs/zfs_lzjb.c
+
+fs/zfs/zfs_module-zfs_lzjb.obj: fs/zfs/zfs_lzjb.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs_lzjb.obj -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs_lzjb.Tpo -c -o fs/zfs/zfs_module-zfs_lzjb.obj `if test -f 'fs/zfs/zfs_lzjb.c'; then $(CYGPATH_W) 'fs/zfs/zfs_lzjb.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs_lzjb.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs_lzjb.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs_lzjb.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs_lzjb.c' object='fs/zfs/zfs_module-zfs_lzjb.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs_lzjb.obj `if test -f 'fs/zfs/zfs_lzjb.c'; then $(CYGPATH_W) 'fs/zfs/zfs_lzjb.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs_lzjb.c'; fi`
+
+fs/zfs/zfs_module-zfs_sha256.o: fs/zfs/zfs_sha256.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs_sha256.o -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs_sha256.Tpo -c -o fs/zfs/zfs_module-zfs_sha256.o `test -f 'fs/zfs/zfs_sha256.c' || echo '$(srcdir)/'`fs/zfs/zfs_sha256.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs_sha256.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs_sha256.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs_sha256.c' object='fs/zfs/zfs_module-zfs_sha256.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs_sha256.o `test -f 'fs/zfs/zfs_sha256.c' || echo '$(srcdir)/'`fs/zfs/zfs_sha256.c
+
+fs/zfs/zfs_module-zfs_sha256.obj: fs/zfs/zfs_sha256.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs_sha256.obj -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs_sha256.Tpo -c -o fs/zfs/zfs_module-zfs_sha256.obj `if test -f 'fs/zfs/zfs_sha256.c'; then $(CYGPATH_W) 'fs/zfs/zfs_sha256.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs_sha256.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs_sha256.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs_sha256.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs_sha256.c' object='fs/zfs/zfs_module-zfs_sha256.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs_sha256.obj `if test -f 'fs/zfs/zfs_sha256.c'; then $(CYGPATH_W) 'fs/zfs/zfs_sha256.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs_sha256.c'; fi`
+
+fs/zfs/zfs_module-zfs_fletcher.o: fs/zfs/zfs_fletcher.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs_fletcher.o -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs_fletcher.Tpo -c -o fs/zfs/zfs_module-zfs_fletcher.o `test -f 'fs/zfs/zfs_fletcher.c' || echo '$(srcdir)/'`fs/zfs/zfs_fletcher.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs_fletcher.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs_fletcher.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs_fletcher.c' object='fs/zfs/zfs_module-zfs_fletcher.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs_fletcher.o `test -f 'fs/zfs/zfs_fletcher.c' || echo '$(srcdir)/'`fs/zfs/zfs_fletcher.c
+
+fs/zfs/zfs_module-zfs_fletcher.obj: fs/zfs/zfs_fletcher.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfs_module-zfs_fletcher.obj -MD -MP -MF fs/zfs/$(DEPDIR)/zfs_module-zfs_fletcher.Tpo -c -o fs/zfs/zfs_module-zfs_fletcher.obj `if test -f 'fs/zfs/zfs_fletcher.c'; then $(CYGPATH_W) 'fs/zfs/zfs_fletcher.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs_fletcher.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfs_module-zfs_fletcher.Tpo fs/zfs/$(DEPDIR)/zfs_module-zfs_fletcher.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfs_fletcher.c' object='fs/zfs/zfs_module-zfs_fletcher.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $(zfs_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfs_module-zfs_fletcher.obj `if test -f 'fs/zfs/zfs_fletcher.c'; then $(CYGPATH_W) 'fs/zfs/zfs_fletcher.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfs_fletcher.c'; fi`
+
+fs/zfs/zfsinfo_module-zfsinfo.o: fs/zfs/zfsinfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $(zfsinfo_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfsinfo_module-zfsinfo.o -MD -MP -MF fs/zfs/$(DEPDIR)/zfsinfo_module-zfsinfo.Tpo -c -o fs/zfs/zfsinfo_module-zfsinfo.o `test -f 'fs/zfs/zfsinfo.c' || echo '$(srcdir)/'`fs/zfs/zfsinfo.c
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfsinfo_module-zfsinfo.Tpo fs/zfs/$(DEPDIR)/zfsinfo_module-zfsinfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfsinfo.c' object='fs/zfs/zfsinfo_module-zfsinfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $(zfsinfo_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfsinfo_module-zfsinfo.o `test -f 'fs/zfs/zfsinfo.c' || echo '$(srcdir)/'`fs/zfs/zfsinfo.c
+
+fs/zfs/zfsinfo_module-zfsinfo.obj: fs/zfs/zfsinfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $(zfsinfo_module_CFLAGS) $(CFLAGS) -MT fs/zfs/zfsinfo_module-zfsinfo.obj -MD -MP -MF fs/zfs/$(DEPDIR)/zfsinfo_module-zfsinfo.Tpo -c -o fs/zfs/zfsinfo_module-zfsinfo.obj `if test -f 'fs/zfs/zfsinfo.c'; then $(CYGPATH_W) 'fs/zfs/zfsinfo.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfsinfo.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) fs/zfs/$(DEPDIR)/zfsinfo_module-zfsinfo.Tpo fs/zfs/$(DEPDIR)/zfsinfo_module-zfsinfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs/zfs/zfsinfo.c' object='fs/zfs/zfsinfo_module-zfsinfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $(zfsinfo_module_CFLAGS) $(CFLAGS) -c -o fs/zfs/zfsinfo_module-zfsinfo.obj `if test -f 'fs/zfs/zfsinfo.c'; then $(CYGPATH_W) 'fs/zfs/zfsinfo.c'; else $(CYGPATH_W) '$(srcdir)/fs/zfs/zfsinfo.c'; fi`
+install-man1: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-grubconfDATA: $(grubconf_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(grubconfdir)" || $(MKDIR_P) "$(DESTDIR)$(grubconfdir)"
+ @list='$(grubconf_DATA)'; test -n "$(grubconfdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(grubconfdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(grubconfdir)" || exit $$?; \
+ done
+
+uninstall-grubconfDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(grubconf_DATA)'; test -n "$(grubconfdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(grubconfdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(grubconfdir)" && rm -f $$files
+install-pkglibDATA: $(pkglib_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkglibdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkglibdir)" || exit $$?; \
+ done
+
+uninstall-pkglibDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
+install-platformDATA: $(platform_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(platformdir)" || $(MKDIR_P) "$(DESTDIR)$(platformdir)"
+ @list='$(platform_DATA)'; test -n "$(platformdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(platformdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(platformdir)" || exit $$?; \
+ done
+
+uninstall-platformDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(platform_DATA)'; test -n "$(platformdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(platformdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(platformdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(grubconfdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(grubconfdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(platformdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f boot/decompressor/$(DEPDIR)/$(am__dirstamp)
+ -rm -f boot/decompressor/$(am__dirstamp)
+ -rm -f boot/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f boot/i386/pc/$(am__dirstamp)
+ -rm -f boot/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f boot/i386/qemu/$(am__dirstamp)
+ -rm -f boot/mips/$(DEPDIR)/$(am__dirstamp)
+ -rm -f boot/mips/$(am__dirstamp)
+ -rm -f boot/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+ -rm -f boot/mips/yeeloong/$(am__dirstamp)
+ -rm -f boot/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f boot/sparc64/ieee1275/$(am__dirstamp)
+ -rm -f bus/$(DEPDIR)/$(am__dirstamp)
+ -rm -f bus/$(am__dirstamp)
+ -rm -f bus/emu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f bus/emu/$(am__dirstamp)
+ -rm -f bus/usb/$(DEPDIR)/$(am__dirstamp)
+ -rm -f bus/usb/$(am__dirstamp)
+ -rm -f bus/usb/emu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f bus/usb/emu/$(am__dirstamp)
+ -rm -f bus/usb/serial/$(DEPDIR)/$(am__dirstamp)
+ -rm -f bus/usb/serial/$(am__dirstamp)
+ -rm -f commands/$(DEPDIR)/$(am__dirstamp)
+ -rm -f commands/$(am__dirstamp)
+ -rm -f commands/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f commands/efi/$(am__dirstamp)
+ -rm -f commands/i386/$(DEPDIR)/$(am__dirstamp)
+ -rm -f commands/i386/$(am__dirstamp)
+ -rm -f commands/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f commands/i386/pc/$(am__dirstamp)
+ -rm -f commands/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f commands/ieee1275/$(am__dirstamp)
+ -rm -f commands/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+ -rm -f commands/mips/yeeloong/$(am__dirstamp)
+ -rm -f disk/$(DEPDIR)/$(am__dirstamp)
+ -rm -f disk/$(am__dirstamp)
+ -rm -f disk/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f disk/efi/$(am__dirstamp)
+ -rm -f disk/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f disk/i386/pc/$(am__dirstamp)
+ -rm -f disk/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f disk/ieee1275/$(am__dirstamp)
+ -rm -f efiemu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f efiemu/$(am__dirstamp)
+ -rm -f efiemu/i386/$(DEPDIR)/$(am__dirstamp)
+ -rm -f efiemu/i386/$(am__dirstamp)
+ -rm -f efiemu/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f efiemu/i386/pc/$(am__dirstamp)
+ -rm -f font/$(DEPDIR)/$(am__dirstamp)
+ -rm -f font/$(am__dirstamp)
+ -rm -f fs/$(DEPDIR)/$(am__dirstamp)
+ -rm -f fs/$(am__dirstamp)
+ -rm -f fs/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f fs/i386/pc/$(am__dirstamp)
+ -rm -f fs/zfs/$(DEPDIR)/$(am__dirstamp)
+ -rm -f fs/zfs/$(am__dirstamp)
+ -rm -f gettext/$(DEPDIR)/$(am__dirstamp)
+ -rm -f gettext/$(am__dirstamp)
+ -rm -f gfxmenu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f gfxmenu/$(am__dirstamp)
+ -rm -f gnulib/$(DEPDIR)/$(am__dirstamp)
+ -rm -f gnulib/$(am__dirstamp)
+ -rm -f hello/$(DEPDIR)/$(am__dirstamp)
+ -rm -f hello/$(am__dirstamp)
+ -rm -f hook/$(DEPDIR)/$(am__dirstamp)
+ -rm -f hook/$(am__dirstamp)
+ -rm -f io/$(DEPDIR)/$(am__dirstamp)
+ -rm -f io/$(am__dirstamp)
+ -rm -f kern/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/$(am__dirstamp)
+ -rm -f kern/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/efi/$(am__dirstamp)
+ -rm -f kern/emu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/emu/$(am__dirstamp)
+ -rm -f kern/generic/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/generic/$(am__dirstamp)
+ -rm -f kern/i386/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/i386/$(am__dirstamp)
+ -rm -f kern/i386/coreboot/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/i386/coreboot/$(am__dirstamp)
+ -rm -f kern/i386/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/i386/efi/$(am__dirstamp)
+ -rm -f kern/i386/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/i386/ieee1275/$(am__dirstamp)
+ -rm -f kern/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/i386/pc/$(am__dirstamp)
+ -rm -f kern/i386/qemu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/i386/qemu/$(am__dirstamp)
+ -rm -f kern/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/ieee1275/$(am__dirstamp)
+ -rm -f kern/mips/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/mips/$(am__dirstamp)
+ -rm -f kern/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/mips/yeeloong/$(am__dirstamp)
+ -rm -f kern/powerpc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/powerpc/$(am__dirstamp)
+ -rm -f kern/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/powerpc/ieee1275/$(am__dirstamp)
+ -rm -f kern/sparc64/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/sparc64/$(am__dirstamp)
+ -rm -f kern/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/sparc64/ieee1275/$(am__dirstamp)
+ -rm -f kern/x86_64/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/x86_64/$(am__dirstamp)
+ -rm -f kern/x86_64/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f kern/x86_64/efi/$(am__dirstamp)
+ -rm -f lib/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/$(am__dirstamp)
+ -rm -f lib/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/efi/$(am__dirstamp)
+ -rm -f lib/emu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/emu/$(am__dirstamp)
+ -rm -f lib/i386/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/i386/$(am__dirstamp)
+ -rm -f lib/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/i386/pc/$(am__dirstamp)
+ -rm -f lib/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/ieee1275/$(am__dirstamp)
+ -rm -f lib/libgcrypt-grub/cipher/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/libgcrypt-grub/cipher/$(am__dirstamp)
+ -rm -f lib/mips/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/mips/$(am__dirstamp)
+ -rm -f lib/powerpc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/powerpc/$(am__dirstamp)
+ -rm -f lib/x86_64/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/x86_64/$(am__dirstamp)
+ -rm -f lib/xzembed/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/xzembed/$(am__dirstamp)
+ -rm -f loader/$(DEPDIR)/$(am__dirstamp)
+ -rm -f loader/$(am__dirstamp)
+ -rm -f loader/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f loader/efi/$(am__dirstamp)
+ -rm -f loader/i386/$(DEPDIR)/$(am__dirstamp)
+ -rm -f loader/i386/$(am__dirstamp)
+ -rm -f loader/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f loader/i386/pc/$(am__dirstamp)
+ -rm -f loader/mips/$(DEPDIR)/$(am__dirstamp)
+ -rm -f loader/mips/$(am__dirstamp)
+ -rm -f loader/powerpc/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f loader/powerpc/ieee1275/$(am__dirstamp)
+ -rm -f loader/sparc64/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f loader/sparc64/ieee1275/$(am__dirstamp)
+ -rm -f mmap/$(DEPDIR)/$(am__dirstamp)
+ -rm -f mmap/$(am__dirstamp)
+ -rm -f mmap/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f mmap/efi/$(am__dirstamp)
+ -rm -f mmap/i386/$(DEPDIR)/$(am__dirstamp)
+ -rm -f mmap/i386/$(am__dirstamp)
+ -rm -f mmap/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f mmap/i386/pc/$(am__dirstamp)
+ -rm -f mmap/mips/yeeloong/$(DEPDIR)/$(am__dirstamp)
+ -rm -f mmap/mips/yeeloong/$(am__dirstamp)
+ -rm -f normal/$(DEPDIR)/$(am__dirstamp)
+ -rm -f normal/$(am__dirstamp)
+ -rm -f partmap/$(DEPDIR)/$(am__dirstamp)
+ -rm -f partmap/$(am__dirstamp)
+ -rm -f parttool/$(DEPDIR)/$(am__dirstamp)
+ -rm -f parttool/$(am__dirstamp)
+ -rm -f script/$(DEPDIR)/$(am__dirstamp)
+ -rm -f script/$(am__dirstamp)
+ -rm -f term/$(DEPDIR)/$(am__dirstamp)
+ -rm -f term/$(am__dirstamp)
+ -rm -f term/efi/$(DEPDIR)/$(am__dirstamp)
+ -rm -f term/efi/$(am__dirstamp)
+ -rm -f term/i386/$(DEPDIR)/$(am__dirstamp)
+ -rm -f term/i386/$(am__dirstamp)
+ -rm -f term/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f term/i386/pc/$(am__dirstamp)
+ -rm -f term/ieee1275/$(DEPDIR)/$(am__dirstamp)
+ -rm -f term/ieee1275/$(am__dirstamp)
+ -rm -f tests/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tests/$(am__dirstamp)
+ -rm -f tests/lib/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tests/lib/$(am__dirstamp)
+ -rm -f video/$(DEPDIR)/$(am__dirstamp)
+ -rm -f video/$(am__dirstamp)
+ -rm -f video/emu/$(DEPDIR)/$(am__dirstamp)
+ -rm -f video/emu/$(am__dirstamp)
+ -rm -f video/fb/$(DEPDIR)/$(am__dirstamp)
+ -rm -f video/fb/$(am__dirstamp)
+ -rm -f video/i386/pc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f video/i386/pc/$(am__dirstamp)
+ -rm -f video/readers/$(DEPDIR)/$(am__dirstamp)
+ -rm -f video/readers/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+ clean-noinstLIBRARIES clean-noinstPROGRAMS clean-sbinPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR) boot/decompressor/$(DEPDIR) boot/i386/pc/$(DEPDIR) boot/i386/qemu/$(DEPDIR) boot/mips/$(DEPDIR) boot/mips/yeeloong/$(DEPDIR) boot/sparc64/ieee1275/$(DEPDIR) bus/$(DEPDIR) bus/emu/$(DEPDIR) bus/usb/$(DEPDIR) bus/usb/emu/$(DEPDIR) bus/usb/serial/$(DEPDIR) commands/$(DEPDIR) commands/efi/$(DEPDIR) commands/i386/$(DEPDIR) commands/i386/pc/$(DEPDIR) commands/ieee1275/$(DEPDIR) commands/mips/yeeloong/$(DEPDIR) disk/$(DEPDIR) disk/efi/$(DEPDIR) disk/i386/pc/$(DEPDIR) disk/ieee1275/$(DEPDIR) efiemu/$(DEPDIR) efiemu/i386/$(DEPDIR) efiemu/i386/pc/$(DEPDIR) font/$(DEPDIR) fs/$(DEPDIR) fs/i386/pc/$(DEPDIR) fs/zfs/$(DEPDIR) gettext/$(DEPDIR) gfxmenu/$(DEPDIR) gnulib/$(DEPDIR) hello/$(DEPDIR) hook/$(DEPDIR) io/$(DEPDIR) kern/$(DEPDIR) kern/efi/$(DEPDIR) kern/emu/$(DEPDIR) kern/generic/$(DEPDIR) kern/i386/$(DEPDIR) kern/i386/coreboot/$(DEPDIR) kern/i386/efi/$(DEPDIR) kern/i386/ieee1275/$(DEPDIR) kern/i386/pc/$(DEPDIR) kern/i386/qemu/$(DEPDIR) kern/ieee1275/$(DEPDIR) kern/mips/$(DEPDIR) kern/mips/yeeloong/$(DEPDIR) kern/powerpc/$(DEPDIR) kern/powerpc/ieee1275/$(DEPDIR) kern/sparc64/$(DEPDIR) kern/sparc64/ieee1275/$(DEPDIR) kern/x86_64/$(DEPDIR) kern/x86_64/efi/$(DEPDIR) lib/$(DEPDIR) lib/efi/$(DEPDIR) lib/emu/$(DEPDIR) lib/i386/$(DEPDIR) lib/i386/pc/$(DEPDIR) lib/ieee1275/$(DEPDIR) lib/libgcrypt-grub/cipher/$(DEPDIR) lib/mips/$(DEPDIR) lib/powerpc/$(DEPDIR) lib/x86_64/$(DEPDIR) lib/xzembed/$(DEPDIR) loader/$(DEPDIR) loader/efi/$(DEPDIR) loader/i386/$(DEPDIR) loader/i386/pc/$(DEPDIR) loader/mips/$(DEPDIR) loader/powerpc/ieee1275/$(DEPDIR) loader/sparc64/ieee1275/$(DEPDIR) mmap/$(DEPDIR) mmap/efi/$(DEPDIR) mmap/i386/$(DEPDIR) mmap/i386/pc/$(DEPDIR) mmap/mips/yeeloong/$(DEPDIR) normal/$(DEPDIR) partmap/$(DEPDIR) parttool/$(DEPDIR) script/$(DEPDIR) term/$(DEPDIR) term/efi/$(DEPDIR) term/i386/$(DEPDIR) term/i386/pc/$(DEPDIR) term/ieee1275/$(DEPDIR) tests/$(DEPDIR) tests/lib/$(DEPDIR) video/$(DEPDIR) video/emu/$(DEPDIR) video/fb/$(DEPDIR) video/i386/pc/$(DEPDIR) video/readers/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-grubconfDATA install-grubconfSCRIPTS \
+ install-man install-platformDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+ install-pkglibDATA install-pkglibSCRIPTS install-sbinPROGRAMS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR) boot/decompressor/$(DEPDIR) boot/i386/pc/$(DEPDIR) boot/i386/qemu/$(DEPDIR) boot/mips/$(DEPDIR) boot/mips/yeeloong/$(DEPDIR) boot/sparc64/ieee1275/$(DEPDIR) bus/$(DEPDIR) bus/emu/$(DEPDIR) bus/usb/$(DEPDIR) bus/usb/emu/$(DEPDIR) bus/usb/serial/$(DEPDIR) commands/$(DEPDIR) commands/efi/$(DEPDIR) commands/i386/$(DEPDIR) commands/i386/pc/$(DEPDIR) commands/ieee1275/$(DEPDIR) commands/mips/yeeloong/$(DEPDIR) disk/$(DEPDIR) disk/efi/$(DEPDIR) disk/i386/pc/$(DEPDIR) disk/ieee1275/$(DEPDIR) efiemu/$(DEPDIR) efiemu/i386/$(DEPDIR) efiemu/i386/pc/$(DEPDIR) font/$(DEPDIR) fs/$(DEPDIR) fs/i386/pc/$(DEPDIR) fs/zfs/$(DEPDIR) gettext/$(DEPDIR) gfxmenu/$(DEPDIR) gnulib/$(DEPDIR) hello/$(DEPDIR) hook/$(DEPDIR) io/$(DEPDIR) kern/$(DEPDIR) kern/efi/$(DEPDIR) kern/emu/$(DEPDIR) kern/generic/$(DEPDIR) kern/i386/$(DEPDIR) kern/i386/coreboot/$(DEPDIR) kern/i386/efi/$(DEPDIR) kern/i386/ieee1275/$(DEPDIR) kern/i386/pc/$(DEPDIR) kern/i386/qemu/$(DEPDIR) kern/ieee1275/$(DEPDIR) kern/mips/$(DEPDIR) kern/mips/yeeloong/$(DEPDIR) kern/powerpc/$(DEPDIR) kern/powerpc/ieee1275/$(DEPDIR) kern/sparc64/$(DEPDIR) kern/sparc64/ieee1275/$(DEPDIR) kern/x86_64/$(DEPDIR) kern/x86_64/efi/$(DEPDIR) lib/$(DEPDIR) lib/efi/$(DEPDIR) lib/emu/$(DEPDIR) lib/i386/$(DEPDIR) lib/i386/pc/$(DEPDIR) lib/ieee1275/$(DEPDIR) lib/libgcrypt-grub/cipher/$(DEPDIR) lib/mips/$(DEPDIR) lib/powerpc/$(DEPDIR) lib/x86_64/$(DEPDIR) lib/xzembed/$(DEPDIR) loader/$(DEPDIR) loader/efi/$(DEPDIR) loader/i386/$(DEPDIR) loader/i386/pc/$(DEPDIR) loader/mips/$(DEPDIR) loader/powerpc/ieee1275/$(DEPDIR) loader/sparc64/ieee1275/$(DEPDIR) mmap/$(DEPDIR) mmap/efi/$(DEPDIR) mmap/i386/$(DEPDIR) mmap/i386/pc/$(DEPDIR) mmap/mips/yeeloong/$(DEPDIR) normal/$(DEPDIR) partmap/$(DEPDIR) parttool/$(DEPDIR) script/$(DEPDIR) term/$(DEPDIR) term/efi/$(DEPDIR) term/i386/$(DEPDIR) term/i386/pc/$(DEPDIR) term/ieee1275/$(DEPDIR) tests/$(DEPDIR) tests/lib/$(DEPDIR) video/$(DEPDIR) video/emu/$(DEPDIR) video/fb/$(DEPDIR) video/i386/pc/$(DEPDIR) video/readers/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-grubconfDATA uninstall-grubconfSCRIPTS uninstall-man \
+ uninstall-pkglibDATA uninstall-pkglibSCRIPTS \
+ uninstall-platformDATA uninstall-sbinPROGRAMS \
+ uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+ clean-noinstLIBRARIES clean-noinstPROGRAMS clean-sbinPROGRAMS \
+ ctags distclean distclean-compile distclean-generic \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-binSCRIPTS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-grubconfDATA \
+ install-grubconfSCRIPTS install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-pdf install-pdf-am install-pkglibDATA \
+ install-pkglibSCRIPTS install-platformDATA install-ps \
+ install-ps-am install-sbinPROGRAMS install-sbinSCRIPTS \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-binSCRIPTS uninstall-grubconfDATA \
+ uninstall-grubconfSCRIPTS uninstall-man uninstall-man1 \
+ uninstall-pkglibDATA uninstall-pkglibSCRIPTS \
+ uninstall-platformDATA uninstall-sbinPROGRAMS \
+ uninstall-sbinSCRIPTS
+
+
+export LC_COLLATE := C
+export LC_CTYPE := C
+unexport LC_ALL
+
+# Rules for autogen definition files
+
+.PRECIOUS: $(top_srcdir)/Makefile.tpl
+$(top_srcdir)/Makefile.tpl: $(top_srcdir)/gentpl.py
+ python $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
+ mv $@.new $@
+
+.PRECIOUS: $(top_srcdir)/Makefile.util.am
+$(top_srcdir)/Makefile.util.am: $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.tpl
+ autogen -T $(top_srcdir)/Makefile.tpl $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
+ mv $@.new $@
+
+.PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
+$(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
+ if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
+ 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)
+ mv $@.new $@
+
+# gentrigtables
+gentrigtables: gentrigtables.c
+ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(CPPFLAGS) $< -lm
+
+# trigtables.c
+trigtables.c: gentrigtables gentrigtables.c $(top_srcdir)/configure.ac
+ $(builddir)/gentrigtables > $@
+
+# XXX Use Automake's LEX & YACC support
+grub_script.tab.h: script/parser.y
+ $(YACC) -d -p grub_script_yy -b grub_script $<
+grub_script.tab.c: grub_script.tab.h
+
+# For the lexer.
+grub_script.yy.h: script/yylex.l
+ $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $<
+grub_script.yy.c: grub_script.yy.h
+
+rs_decoder.S: $(srcdir)/lib/reed_solomon.c
+ $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3
+
+kern/i386/pc/startup.S: $(builddir)/rs_decoder.S
+
+@COND_emu_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@trig.marker: $(trig_module_SOURCES) $(nodist_trig_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(trig_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@cs5536.marker: $(cs5536_module_SOURCES) $(nodist_cs5536_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cs5536_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@libusb.marker: $(libusb_module_SOURCES) $(nodist_libusb_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libusb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@lsspd.marker: $(lsspd_module_SOURCES) $(nodist_lsspd_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsspd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@usb.marker: $(usb_module_SOURCES) $(nodist_usb_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@usbserial_common.marker: $(usbserial_common_module_SOURCES) $(nodist_usbserial_common_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_common_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@usbserial_pl2303.marker: $(usbserial_pl2303_module_SOURCES) $(nodist_usbserial_pl2303_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_pl2303_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@usbserial_ftdi.marker: $(usbserial_ftdi_module_SOURCES) $(nodist_usbserial_ftdi_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbserial_ftdi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@uhci.marker: $(uhci_module_SOURCES) $(nodist_uhci_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uhci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ohci.marker: $(ohci_module_SOURCES) $(nodist_ohci_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ohci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_GRUB_EMU_PCI_TRUE@@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@pci.marker: $(pci_module_SOURCES) $(nodist_pci_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@cmostest.marker: $(cmostest_module_SOURCES) $(nodist_cmostest_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmostest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@iorw.marker: $(iorw_module_SOURCES) $(nodist_iorw_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iorw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@regexp.marker: $(regexp_module_SOURCES) $(nodist_regexp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(regexp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@acpi.marker: $(acpi_module_SOURCES) $(nodist_acpi_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(acpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@lsacpi.marker: $(lsacpi_module_SOURCES) $(nodist_lsacpi_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsacpi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@lsefisystab.marker: $(lsefisystab_module_SOURCES) $(nodist_lsefisystab_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@lsefisystab.marker: $(lsefisystab_module_SOURCES) $(nodist_lsefisystab_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefisystab_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@lssal.marker: $(lssal_module_SOURCES) $(nodist_lssal_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@lssal.marker: $(lssal_module_SOURCES) $(nodist_lssal_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lssal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@lsefimmap.marker: $(lsefimmap_module_SOURCES) $(nodist_lsefimmap_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@lsefimmap.marker: $(lsefimmap_module_SOURCES) $(nodist_lsefimmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsefimmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@blocklist.marker: $(blocklist_module_SOURCES) $(nodist_blocklist_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(blocklist_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@boot.marker: $(boot_module_SOURCES) $(nodist_boot_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(boot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@cat.marker: $(cat_module_SOURCES) $(nodist_cat_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@cmp.marker: $(cmp_module_SOURCES) $(nodist_cmp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@configfile.marker: $(configfile_module_SOURCES) $(nodist_configfile_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(configfile_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@cpuid.marker: $(cpuid_module_SOURCES) $(nodist_cpuid_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@date.marker: $(date_module_SOURCES) $(nodist_date_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(date_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@drivemap.marker: $(drivemap_module_SOURCES) $(nodist_drivemap_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(drivemap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@echo.marker: $(echo_module_SOURCES) $(nodist_echo_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(echo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@extcmd.marker: $(extcmd_module_SOURCES) $(nodist_extcmd_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(extcmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@fixvideo.marker: $(fixvideo_module_SOURCES) $(nodist_fixvideo_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@fixvideo.marker: $(fixvideo_module_SOURCES) $(nodist_fixvideo_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fixvideo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gptsync.marker: $(gptsync_module_SOURCES) $(nodist_gptsync_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gptsync_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@halt.marker: $(halt_module_SOURCES) $(nodist_halt_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(halt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@hashsum.marker: $(hashsum_module_SOURCES) $(nodist_hashsum_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hashsum_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@hdparm.marker: $(hdparm_module_SOURCES) $(nodist_hdparm_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hdparm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@help.marker: $(help_module_SOURCES) $(nodist_help_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(help_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@hexdump.marker: $(hexdump_module_SOURCES) $(nodist_hexdump_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hexdump_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@keystatus.marker: $(keystatus_module_SOURCES) $(nodist_keystatus_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keystatus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@loadbios.marker: $(loadbios_module_SOURCES) $(nodist_loadbios_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@loadbios.marker: $(loadbios_module_SOURCES) $(nodist_loadbios_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadbios_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@loadenv.marker: $(loadenv_module_SOURCES) $(nodist_loadenv_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loadenv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@ls.marker: $(ls_module_SOURCES) $(nodist_ls_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ls_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@lsmmap.marker: $(lsmmap_module_SOURCES) $(nodist_lsmmap_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsmmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@lspci.marker: $(lspci_module_SOURCES) $(nodist_lspci_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lspci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@memrw.marker: $(memrw_module_SOURCES) $(nodist_memrw_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memrw_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@minicmd.marker: $(minicmd_module_SOURCES) $(nodist_minicmd_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minicmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@parttool.marker: $(parttool_module_SOURCES) $(nodist_parttool_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(parttool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@password.marker: $(password_module_SOURCES) $(nodist_password_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@password_pbkdf2.marker: $(password_pbkdf2_module_SOURCES) $(nodist_password_pbkdf2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(password_pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@play.marker: $(play_module_SOURCES) $(nodist_play_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(play_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@probe.marker: $(probe_module_SOURCES) $(nodist_probe_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(probe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@pxecmd.marker: $(pxecmd_module_SOURCES) $(nodist_pxecmd_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxecmd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@read.marker: $(read_module_SOURCES) $(nodist_read_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@reboot.marker: $(reboot_module_SOURCES) $(nodist_reboot_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@search.marker: $(search_module_SOURCES) $(nodist_search_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@search_fs_file.marker: $(search_fs_file_module_SOURCES) $(nodist_search_fs_file_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_file_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@search_fs_uuid.marker: $(search_fs_uuid_module_SOURCES) $(nodist_search_fs_uuid_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_fs_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@search_label.marker: $(search_label_module_SOURCES) $(nodist_search_label_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(search_label_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@setpci.marker: $(setpci_module_SOURCES) $(nodist_setpci_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setpci_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@sleep.marker: $(sleep_module_SOURCES) $(nodist_sleep_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sleep_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@suspend.marker: $(suspend_module_SOURCES) $(nodist_suspend_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@suspend.marker: $(suspend_module_SOURCES) $(nodist_suspend_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(suspend_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@terminal.marker: $(terminal_module_SOURCES) $(nodist_terminal_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@test.marker: $(test_module_SOURCES) $(nodist_test_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@true.marker: $(true_module_SOURCES) $(nodist_true_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(true_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@usbtest.marker: $(usbtest_module_SOURCES) $(nodist_usbtest_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbtest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@videoinfo.marker: $(videoinfo_module_SOURCES) $(nodist_videoinfo_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videoinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@videotest.marker: $(videotest_module_SOURCES) $(nodist_videotest_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(videotest_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@xnu_uuid.marker: $(xnu_uuid_module_SOURCES) $(nodist_xnu_uuid_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_uuid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@dm_nv.marker: $(dm_nv_module_SOURCES) $(nodist_dm_nv_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dm_nv_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@loopback.marker: $(loopback_module_SOURCES) $(nodist_loopback_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(loopback_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@lvm.marker: $(lvm_module_SOURCES) $(nodist_lvm_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lvm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@mdraid09.marker: $(mdraid09_module_SOURCES) $(nodist_mdraid09_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid09_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@mdraid1x.marker: $(mdraid1x_module_SOURCES) $(nodist_mdraid1x_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mdraid1x_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@raid.marker: $(raid_module_SOURCES) $(nodist_raid_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@raid5rec.marker: $(raid5rec_module_SOURCES) $(nodist_raid5rec_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid5rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@raid6rec.marker: $(raid6rec_module_SOURCES) $(nodist_raid6rec_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(raid6rec_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@scsi.marker: $(scsi_module_SOURCES) $(nodist_scsi_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(scsi_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@memdisk.marker: $(memdisk_module_SOURCES) $(nodist_memdisk_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(memdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ata.marker: $(ata_module_SOURCES) $(nodist_ata_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ata_pthru.marker: $(ata_pthru_module_SOURCES) $(nodist_ata_pthru_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ata_pthru_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@biosdisk.marker: $(biosdisk_module_SOURCES) $(nodist_biosdisk_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(biosdisk_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@usbms.marker: $(usbms_module_SOURCES) $(nodist_usbms_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usbms_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@nand.marker: $(nand_module_SOURCES) $(nodist_nand_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nand_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@efiemu.marker: $(efiemu_module_SOURCES) $(nodist_efiemu_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efiemu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@font.marker: $(font_module_SOURCES) $(nodist_font_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(font_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@affs.marker: $(affs_module_SOURCES) $(nodist_affs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(affs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@afs.marker: $(afs_module_SOURCES) $(nodist_afs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@afs_be.marker: $(afs_be_module_SOURCES) $(nodist_afs_be_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(afs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@befs.marker: $(befs_module_SOURCES) $(nodist_befs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@befs_be.marker: $(befs_be_module_SOURCES) $(nodist_befs_be_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(befs_be_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@btrfs.marker: $(btrfs_module_SOURCES) $(nodist_btrfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(btrfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@cpio.marker: $(cpio_module_SOURCES) $(nodist_cpio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cpio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@ext2.marker: $(ext2_module_SOURCES) $(nodist_ext2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ext2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@fat.marker: $(fat_module_SOURCES) $(nodist_fat_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fat_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@fshelp.marker: $(fshelp_module_SOURCES) $(nodist_fshelp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fshelp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@hfs.marker: $(hfs_module_SOURCES) $(nodist_hfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@hfsplus.marker: $(hfsplus_module_SOURCES) $(nodist_hfsplus_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hfsplus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@iso9660.marker: $(iso9660_module_SOURCES) $(nodist_iso9660_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(iso9660_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@jfs.marker: $(jfs_module_SOURCES) $(nodist_jfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@minix.marker: $(minix_module_SOURCES) $(nodist_minix_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@minix2.marker: $(minix2_module_SOURCES) $(nodist_minix2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(minix2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@nilfs2.marker: $(nilfs2_module_SOURCES) $(nodist_nilfs2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nilfs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@ntfs.marker: $(ntfs_module_SOURCES) $(nodist_ntfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@ntfscomp.marker: $(ntfscomp_module_SOURCES) $(nodist_ntfscomp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntfscomp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@reiserfs.marker: $(reiserfs_module_SOURCES) $(nodist_reiserfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(reiserfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@sfs.marker: $(sfs_module_SOURCES) $(nodist_sfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@tar.marker: $(tar_module_SOURCES) $(nodist_tar_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tar_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@udf.marker: $(udf_module_SOURCES) $(nodist_udf_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(udf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@ufs1.marker: $(ufs1_module_SOURCES) $(nodist_ufs1_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@ufs2.marker: $(ufs2_module_SOURCES) $(nodist_ufs2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ufs2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@xfs.marker: $(xfs_module_SOURCES) $(nodist_xfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@zfs.marker: $(zfs_module_SOURCES) $(nodist_zfs_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@zfsinfo.marker: $(zfsinfo_module_SOURCES) $(nodist_zfsinfo_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zfsinfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@pxe.marker: $(pxe_module_SOURCES) $(nodist_pxe_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pxe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gettext.marker: $(gettext_module_SOURCES) $(nodist_gettext_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gettext_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gfxmenu.marker: $(gfxmenu_module_SOURCES) $(nodist_gfxmenu_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxmenu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@hello.marker: $(hello_module_SOURCES) $(nodist_hello_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(hello_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gzio.marker: $(gzio_module_SOURCES) $(nodist_gzio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@bufio.marker: $(bufio_module_SOURCES) $(nodist_bufio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bufio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@elf.marker: $(elf_module_SOURCES) $(nodist_elf_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(elf_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@crypto.marker: $(crypto_module_SOURCES) $(nodist_crypto_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(crypto_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@pbkdf2.marker: $(pbkdf2_module_SOURCES) $(nodist_pbkdf2_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pbkdf2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@relocator.marker: $(relocator_module_SOURCES) $(nodist_relocator_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(relocator_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@datetime.marker: $(datetime_module_SOURCES) $(nodist_datetime_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datetime_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@setjmp.marker: $(setjmp_module_SOURCES) $(nodist_setjmp_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(setjmp_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@aout.marker: $(aout_module_SOURCES) $(nodist_aout_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(aout_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@bsd.marker: $(bsd_module_SOURCES) $(nodist_bsd_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@linux16.marker: $(linux16_module_SOURCES) $(nodist_linux16_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux16_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@ntldr.marker: $(ntldr_module_SOURCES) $(nodist_ntldr_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntldr_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@multiboot2.marker: $(multiboot2_module_SOURCES) $(nodist_multiboot2_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot2_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@multiboot.marker: $(multiboot_module_SOURCES) $(nodist_multiboot_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(multiboot_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@linux.marker: $(linux_module_SOURCES) $(nodist_linux_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(linux_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@xnu.marker: $(xnu_module_SOURCES) $(nodist_xnu_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xnu_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@appleldr.marker: $(appleldr_module_SOURCES) $(nodist_appleldr_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@appleldr.marker: $(appleldr_module_SOURCES) $(nodist_appleldr_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appleldr_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@chain.marker: $(chain_module_SOURCES) $(nodist_chain_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@chain.marker: $(chain_module_SOURCES) $(nodist_chain_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@chain.marker: $(chain_module_SOURCES) $(nodist_chain_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(chain_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@mmap.marker: $(mmap_module_SOURCES) $(nodist_mmap_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@normal.marker: $(normal_module_SOURCES) $(nodist_normal_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(normal_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_acorn.marker: $(part_acorn_module_SOURCES) $(nodist_part_acorn_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_acorn_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_amiga.marker: $(part_amiga_module_SOURCES) $(nodist_part_amiga_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_amiga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_apple.marker: $(part_apple_module_SOURCES) $(nodist_part_apple_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_apple_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_gpt.marker: $(part_gpt_module_SOURCES) $(nodist_part_gpt_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_gpt_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_msdos.marker: $(part_msdos_module_SOURCES) $(nodist_part_msdos_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_msdos_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_sun.marker: $(part_sun_module_SOURCES) $(nodist_part_sun_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sun_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_bsd.marker: $(part_bsd_module_SOURCES) $(nodist_part_bsd_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_bsd_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@part_sunpc.marker: $(part_sunpc_module_SOURCES) $(nodist_part_sunpc_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(part_sunpc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@msdospart.marker: $(msdospart_module_SOURCES) $(nodist_msdospart_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(msdospart_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@at_keyboard.marker: $(at_keyboard_module_SOURCES) $(nodist_at_keyboard_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(at_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gfxterm.marker: $(gfxterm_module_SOURCES) $(nodist_gfxterm_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gfxterm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_GRUB_EMU_USB_TRUE@@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@serial.marker: $(serial_module_SOURCES) $(nodist_serial_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(serial_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@sendkey.marker: $(sendkey_module_SOURCES) $(nodist_sendkey_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sendkey_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@terminfo.marker: $(terminfo_module_SOURCES) $(nodist_terminfo_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(terminfo_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@usb_keyboard.marker: $(usb_keyboard_module_SOURCES) $(nodist_usb_keyboard_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(usb_keyboard_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@vga.marker: $(vga_module_SOURCES) $(nodist_vga_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@vga_text.marker: $(vga_text_module_SOURCES) $(nodist_vga_text_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@vga_text.marker: $(vga_text_module_SOURCES) $(nodist_vga_text_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@vga_text.marker: $(vga_text_module_SOURCES) $(nodist_vga_text_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vga_text_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@video_cirrus.marker: $(video_cirrus_module_SOURCES) $(nodist_video_cirrus_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_cirrus_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@video_bochs.marker: $(video_bochs_module_SOURCES) $(nodist_video_bochs_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_bochs_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@functional_test.marker: $(functional_test_module_SOURCES) $(nodist_functional_test_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@example_functional_test.marker: $(example_functional_test_module_SOURCES) $(nodist_example_functional_test_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(example_functional_test_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@bitmap.marker: $(bitmap_module_SOURCES) $(nodist_bitmap_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@bitmap_scale.marker: $(bitmap_scale_module_SOURCES) $(nodist_bitmap_scale_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bitmap_scale_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@efi_gop.marker: $(efi_gop_module_SOURCES) $(nodist_efi_gop_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@efi_gop.marker: $(efi_gop_module_SOURCES) $(nodist_efi_gop_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_gop_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@efi_uga.marker: $(efi_uga_module_SOURCES) $(nodist_efi_uga_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@efi_uga.marker: $(efi_uga_module_SOURCES) $(nodist_efi_uga_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(efi_uga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@jpeg.marker: $(jpeg_module_SOURCES) $(nodist_jpeg_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jpeg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@png.marker: $(png_module_SOURCES) $(nodist_png_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(png_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@tga.marker: $(tga_module_SOURCES) $(nodist_tga_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tga_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@vbe.marker: $(vbe_module_SOURCES) $(nodist_vbe_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vbe_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@video_fb.marker: $(video_fb_module_SOURCES) $(nodist_video_fb_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@video.marker: $(video_module_SOURCES) $(nodist_video_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(video_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@ieee1275_fb.marker: $(ieee1275_fb_module_SOURCES) $(nodist_ieee1275_fb_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ieee1275_fb_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@sdl.marker: $(sdl_module_SOURCES) $(nodist_sdl_module_SOURCES)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sdl_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_GRUB_EMU_SDL_TRUE@@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@datehook.marker: $(datehook_module_SOURCES) $(nodist_datehook_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(datehook_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@legacycfg.marker: $(legacycfg_module_SOURCES) $(nodist_legacycfg_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@legacycfg.marker: $(legacycfg_module_SOURCES) $(nodist_legacycfg_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(legacycfg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@test_blockarg.marker: $(test_blockarg_module_SOURCES) $(nodist_test_blockarg_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_blockarg_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@xzio.marker: $(xzio_module_SOURCES) $(nodist_xzio_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xzio_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@testload.marker: $(testload_module_SOURCES) $(nodist_testload_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testload_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@lsapm.marker: $(lsapm_module_SOURCES) $(nodist_lsapm_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lsapm_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@keylayouts.marker: $(keylayouts_module_SOURCES) $(nodist_keylayouts_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(keylayouts_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_arcfour.marker: $(gcry_arcfour_module_SOURCES) $(nodist_gcry_arcfour_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_arcfour_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_blowfish.marker: $(gcry_blowfish_module_SOURCES) $(nodist_gcry_blowfish_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_blowfish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_camellia.marker: $(gcry_camellia_module_SOURCES) $(nodist_gcry_camellia_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_camellia_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_cast5.marker: $(gcry_cast5_module_SOURCES) $(nodist_gcry_cast5_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_cast5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_crc.marker: $(gcry_crc_module_SOURCES) $(nodist_gcry_crc_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_crc_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_des.marker: $(gcry_des_module_SOURCES) $(nodist_gcry_des_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_des_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_md4.marker: $(gcry_md4_module_SOURCES) $(nodist_gcry_md4_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md4_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_md5.marker: $(gcry_md5_module_SOURCES) $(nodist_gcry_md5_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_md5_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_rfc2268.marker: $(gcry_rfc2268_module_SOURCES) $(nodist_gcry_rfc2268_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rfc2268_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_rijndael.marker: $(gcry_rijndael_module_SOURCES) $(nodist_gcry_rijndael_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rijndael_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_rmd160.marker: $(gcry_rmd160_module_SOURCES) $(nodist_gcry_rmd160_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_rmd160_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_seed.marker: $(gcry_seed_module_SOURCES) $(nodist_gcry_seed_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_seed_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_serpent.marker: $(gcry_serpent_module_SOURCES) $(nodist_gcry_serpent_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_serpent_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_sha1.marker: $(gcry_sha1_module_SOURCES) $(nodist_gcry_sha1_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha1_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_sha256.marker: $(gcry_sha256_module_SOURCES) $(nodist_gcry_sha256_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha256_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_sha512.marker: $(gcry_sha512_module_SOURCES) $(nodist_gcry_sha512_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_sha512_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_tiger.marker: $(gcry_tiger_module_SOURCES) $(nodist_gcry_tiger_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_tiger_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_twofish.marker: $(gcry_twofish_module_SOURCES) $(nodist_gcry_twofish_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_twofish_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_emu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_emu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_pc_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_pc_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_pc_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_efi_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_qemu_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_qemu_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_qemu_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_coreboot_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_coreboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_coreboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_multiboot_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_multiboot_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_multiboot_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_i386_ieee1275_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_i386_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_i386_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_x86_64_efi_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_x86_64_efi_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_x86_64_efi_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_mips_yeeloong_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_mips_yeeloong_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_mips_yeeloong_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_sparc64_ieee1275_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_sparc64_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_sparc64_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_powerpc_ieee1275_TRUE@gcry_whirlpool.marker: $(gcry_whirlpool_module_SOURCES) $(nodist_gcry_whirlpool_module_SOURCES)
+@COND_powerpc_ieee1275_TRUE@ $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gcry_whirlpool_module_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
+@COND_powerpc_ieee1275_TRUE@ grep 'MARKER' $@.new > $@; rm -f $@.new
+
+@COND_emu_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_emu_TRUE@ cp $< $@
+
+@COND_i386_pc_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_i386_pc_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_i386_efi_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_i386_efi_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_i386_qemu_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_i386_qemu_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_i386_coreboot_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_i386_coreboot_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_i386_multiboot_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_i386_multiboot_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_i386_ieee1275_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_i386_ieee1275_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_x86_64_efi_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_x86_64_efi_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_mips_yeeloong_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_mips_yeeloong_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_sparc64_ieee1275_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_powerpc_ieee1275_TRUE@kernel.img: kernel.exec$(EXEEXT)
+@COND_powerpc_ieee1275_TRUE@ $(STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<
+
+@COND_i386_pc_TRUE@boot.img: boot.image$(EXEEXT)
+@COND_i386_pc_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_i386_qemu_TRUE@boot.img: boot.image$(EXEEXT)
+@COND_i386_qemu_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_sparc64_ieee1275_TRUE@boot.img: boot.image$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_i386_pc_TRUE@cdboot.img: cdboot.image$(EXEEXT)
+@COND_i386_pc_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_i386_pc_TRUE@pxeboot.img: pxeboot.image$(EXEEXT)
+@COND_i386_pc_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_i386_pc_TRUE@diskboot.img: diskboot.image$(EXEEXT)
+@COND_i386_pc_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_sparc64_ieee1275_TRUE@diskboot.img: diskboot.image$(EXEEXT)
+@COND_sparc64_ieee1275_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_i386_pc_TRUE@lnxboot.img: lnxboot.image$(EXEEXT)
+@COND_i386_pc_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_mips_yeeloong_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT)
+@COND_mips_yeeloong_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_mips_yeeloong_TRUE@none_decompress.img: none_decompress.image$(EXEEXT)
+@COND_mips_yeeloong_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_mips_yeeloong_TRUE@fwstart.img: fwstart.image$(EXEEXT)
+@COND_mips_yeeloong_TRUE@ if test x$(USE_APPLE_CC_FIXES) = xyes; then $(MACHO2IMG) $< $@; else $(OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; fi
+
+@COND_MAN_PAGES_TRUE@@COND_emu_TRUE@grub-emu.1: grub-emu
+@COND_MAN_PAGES_TRUE@@COND_emu_TRUE@ chmod a+x grub-emu
+@COND_MAN_PAGES_TRUE@@COND_emu_TRUE@ PATH=$(builddir):$$PATH $(HELP2MAN) --section=1 -i $(top_srcdir)/docs/man/grub-emu.h2m -o $@ grub-emu
+
+@COND_emu_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_emu_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_emu_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_i386_pc_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_i386_pc_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_pc_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_i386_efi_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_i386_efi_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_efi_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_i386_qemu_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_i386_qemu_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_qemu_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_i386_coreboot_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_i386_coreboot_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_coreboot_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_i386_multiboot_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_i386_multiboot_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_multiboot_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_i386_ieee1275_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_i386_ieee1275_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_ieee1275_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_x86_64_efi_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_x86_64_efi_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_x86_64_efi_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_mips_yeeloong_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_mips_yeeloong_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_mips_yeeloong_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_sparc64_ieee1275_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_sparc64_ieee1275_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_sparc64_ieee1275_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_powerpc_ieee1275_TRUE@gensyminfo.sh: gensyminfo.sh.in $(top_builddir)/config.status
+@COND_powerpc_ieee1275_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_powerpc_ieee1275_TRUE@ chmod a+x gensyminfo.sh
+
+@COND_emu_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_emu_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_emu_TRUE@ chmod a+x genmod.sh
+
+@COND_i386_pc_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_i386_pc_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_pc_TRUE@ chmod a+x genmod.sh
+
+@COND_i386_efi_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_i386_efi_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_efi_TRUE@ chmod a+x genmod.sh
+
+@COND_i386_qemu_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_i386_qemu_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_qemu_TRUE@ chmod a+x genmod.sh
+
+@COND_i386_coreboot_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_i386_coreboot_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_coreboot_TRUE@ chmod a+x genmod.sh
+
+@COND_i386_multiboot_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_i386_multiboot_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_multiboot_TRUE@ chmod a+x genmod.sh
+
+@COND_i386_ieee1275_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_i386_ieee1275_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_i386_ieee1275_TRUE@ chmod a+x genmod.sh
+
+@COND_x86_64_efi_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_x86_64_efi_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_x86_64_efi_TRUE@ chmod a+x genmod.sh
+
+@COND_mips_yeeloong_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_mips_yeeloong_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_mips_yeeloong_TRUE@ chmod a+x genmod.sh
+
+@COND_sparc64_ieee1275_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_sparc64_ieee1275_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_sparc64_ieee1275_TRUE@ chmod a+x genmod.sh
+
+@COND_powerpc_ieee1275_TRUE@genmod.sh: genmod.sh.in $(top_builddir)/config.status
+@COND_powerpc_ieee1275_TRUE@ $(top_builddir)/config.status --file=-:$< | sed -e 's,@pkglib_DATA@,$(pkglib_DATA),g' > $@
+@COND_powerpc_ieee1275_TRUE@ chmod a+x genmod.sh
+
+symlist.h: $(top_builddir)/config.h $(KERNEL_HEADER_FILES)
+ @list='$^'; \
+ for p in $$list; do \
+ echo "#include <$$p>" >> $@ || (rm -f $@; exit 1); \
+ done
+
+symlist.c: symlist.h gensymlist.sh
+ $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DGRUB_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1)
+ cat symlist.p | /bin/sh $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
+ rm -f symlist.p
+
+kernel_syms.lst: $(KERNEL_HEADER_FILES) $(top_builddir)/config.h
+ $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DGRUB_SYMBOL_GENERATOR=1 $^ >kernel_syms.input
+ cat kernel_syms.input | grep -v '^#' | sed -n \
+ -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
+ -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
+ | sort -u >$@
+ rm -f kernel_syms.input
+
+@COND_emu_TRUE@kern/emu/grub_emu-main.$(OBJEXT):grub_emu_init.h
+@COND_emu_TRUE@grub_emu-grub_emu_init.$(OBJEXT):grub_emu_init.h
+@COND_emu_TRUE@kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h
+@COND_emu_TRUE@grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h
+
+@COND_emu_TRUE@grub_emu_init.h: genemuinitheader.sh $(MOD_FILES)
+@COND_emu_TRUE@ rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@
+
+@COND_emu_TRUE@grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES)
+@COND_emu_TRUE@ rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinit.sh $(NM) > $@
+
+# List files
+
+fs.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ if grep 'FS_LIST_MARKER' $$pp >/dev/null 2>&1; then \
+ echo $$b; \
+ fi; \
+ done) | sort -u > $@
+
+command.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ sed -n \
+ -e "/EXTCOMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
+ -e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
+ -e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
+ done) | sort -u > $@
+
+partmap.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ if grep 'PARTMAP_LIST_MARKER' $$pp >/dev/null 2>&1; then \
+ echo $$b; \
+ fi; \
+ done) | sort -u > $@
+
+terminal.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ sed -n \
+ -e "/INPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
+ -e "/OUTPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
+ done) | sort -u > $@
+
+parttool.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ sed -n \
+ -e "/PARTTOOL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
+ done) | sort -u > $@
+
+video.lst: $(MARKER_FILES)
+ (for pp in $^; do \
+ b=`basename $$pp .marker`; \
+ if grep 'VIDEO_LIST_MARKER' $$pp >/dev/null 2>&1; then \
+ echo $$b; \
+ fi; \
+ done) | sort -u > $@
+
+# but, crypto.lst is simply copied
+crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
+ cp $^ $@
+
+syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
+ cat kernel_syms.lst > $@.new
+ for m in $(MODULE_FILES); do \
+ sh $< $$m >> $@.new || exit 1; \
+ done
+ mv $@.new $@
+
+# generate global module dependencies list
+moddep.lst: syminfo.lst genmoddep.awk
+ cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
+
+$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
+ TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
+
+@COND_ENABLE_EFIEMU_TRUE@efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
+@COND_ENABLE_EFIEMU_TRUE@ -rm -f $@; \
+@COND_ENABLE_EFIEMU_TRUE@ if test "x$(TARGET_APPLE_CC)" = x1; then \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -DAPPLE_CC -m32 -Wall -Werror -nostdlib -O2 -c -o $@.bin $< || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ $(OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ rm -f $@.bin; \
+@COND_ENABLE_EFIEMU_TRUE@ else \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -m32 -Wall -Werror -nostdlib -O2 -c -o $@ $< || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
+@COND_ENABLE_EFIEMU_TRUE@ fi
+
+@COND_ENABLE_EFIEMU_TRUE@efiemu64_c.o: efiemu/runtime/efiemu.c
+@COND_ENABLE_EFIEMU_TRUE@ if test "x$(TARGET_APPLE_CC)" = x1; then \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -nostdlib -Wall -Werror -mno-red-zone -c -o $@ $< || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ else \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ fi
+
+@COND_ENABLE_EFIEMU_TRUE@efiemu64_s.o: efiemu/runtime/efiemu.S
+@COND_ENABLE_EFIEMU_TRUE@ -rm -f $@
+@COND_ENABLE_EFIEMU_TRUE@ if test "x$(TARGET_APPLE_CC)" = x1; then \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -Wall -Werror -nostdlib -O2 -mno-red-zone -c -o $@ $< || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ else \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ fi
+
+@COND_ENABLE_EFIEMU_TRUE@efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
+@COND_ENABLE_EFIEMU_TRUE@ -rm -f $@; \
+@COND_ENABLE_EFIEMU_TRUE@ if test "x$(TARGET_APPLE_CC)" = x1; then \
+@COND_ENABLE_EFIEMU_TRUE@ rm -f $@.bin; \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) -m64 -Wl,-r -nostdlib -o $@.bin $^ || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ $(OBJCONV) -felf64 -nu -nd $@.bin $@ || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ rm -f $@.bin; \
+@COND_ENABLE_EFIEMU_TRUE@ else \
+@COND_ENABLE_EFIEMU_TRUE@ $(TARGET_CC) -m64 -nostdlib -Wl,-r -o $@ $^ || exit 1; \
+@COND_ENABLE_EFIEMU_TRUE@ if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
+@COND_ENABLE_EFIEMU_TRUE@ fi
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/grub-core/boot/decompressor/minilib.c b/grub-core/boot/decompressor/minilib.c
new file mode 100644
index 0000000..f2a2ef7
--- /dev/null
+++ b/grub-core/boot/decompressor/minilib.c
@@ -0,0 +1,102 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/decompressor.h>
+
+void *
+memset (void *s, int c, grub_size_t len)
+{
+ grub_uint8_t *ptr;
+ for (ptr = s; len; ptr++, len--)
+ *ptr = c;
+ return s;
+}
+
+void *
+grub_memmove (void *dest, const void *src, grub_size_t n)
+{
+ char *d = (char *) dest;
+ const char *s = (const char *) src;
+
+ if (d < s)
+ while (n--)
+ *d++ = *s++;
+ else
+ {
+ d += n;
+ s += n;
+
+ while (n--)
+ *--d = *--s;
+ }
+
+ return dest;
+}
+
+int
+grub_memcmp (const void *s1, const void *s2, grub_size_t n)
+{
+ const char *t1 = s1;
+ const char *t2 = s2;
+
+ while (n--)
+ {
+ if (*t1 != *t2)
+ return (int) *t1 - (int) *t2;
+
+ t1++;
+ t2++;
+ }
+
+ return 0;
+}
+
+int memcmp (const void *s1, const void *s2, grub_size_t n)
+ __attribute__ ((alias ("grub_memcmp")));
+
+void *memmove (void *dest, const void *src, grub_size_t n)
+ __attribute__ ((alias ("grub_memmove")));
+
+void *memcpy (void *dest, const void *src, grub_size_t n)
+ __attribute__ ((alias ("grub_memmove")));
+
+void *grub_decompressor_scratch;
+
+void
+find_scratch (void *src, void *dst, unsigned long srcsize,
+ unsigned long dstsize)
+{
+#ifdef _mips
+ /* Decoding from ROM. */
+ if (((grub_addr_t) src & 0x10000000))
+ {
+ grub_decompressor_scratch = (void *) ALIGN_UP((grub_addr_t) dst + dstsize,
+ 256);
+ return;
+ }
+#endif
+ if ((char *) src + srcsize > (char *) dst + dstsize)
+ grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) src + srcsize,
+ 256);
+ else
+ grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) dst + dstsize,
+ 256);
+ return;
+}
diff --git a/grub-core/boot/decompressor/none.c b/grub-core/boot/decompressor/none.c
new file mode 100644
index 0000000..44f56ce
--- /dev/null
+++ b/grub-core/boot/decompressor/none.c
@@ -0,0 +1,39 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/decompressor.h>
+
+void
+grub_decompress_core (void *src, void *dest, unsigned long n,
+ unsigned long dstsize __attribute__ ((unused)))
+{
+ char *d = (char *) dest;
+ const char *s = (const char *) src;
+
+ if (d < s)
+ while (n--)
+ *d++ = *s++;
+ else
+ {
+ d += n;
+ s += n;
+
+ while (n--)
+ *--d = *--s;
+ }
+}
diff --git a/grub-core/boot/decompressor/xz.c b/grub-core/boot/decompressor/xz.c
new file mode 100644
index 0000000..2279118
--- /dev/null
+++ b/grub-core/boot/decompressor/xz.c
@@ -0,0 +1,60 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/decompressor.h>
+
+#include "xz.h"
+#include "xz_stream.h"
+
+void
+grub_decompress_core (void *src, void *dst, unsigned long srcsize,
+ unsigned long dstsize)
+{
+ struct xz_dec *dec;
+ struct xz_buf buf;
+
+ find_scratch (src, dst, srcsize, dstsize);
+
+ dec = xz_dec_init (GRUB_DECOMPRESSOR_DICT_SIZE);
+
+ buf.in = src;
+ buf.in_pos = 0;
+ buf.in_size = srcsize;
+ buf.out = dst;
+ buf.out_pos = 0;
+ buf.out_size = dstsize;
+
+ while (buf.in_pos != buf.in_size)
+ {
+ enum xz_ret xzret;
+ xzret = xz_dec_run (dec, &buf);
+ switch (xzret)
+ {
+ case XZ_MEMLIMIT_ERROR:
+ case XZ_FORMAT_ERROR:
+ case XZ_OPTIONS_ERROR:
+ case XZ_DATA_ERROR:
+ case XZ_BUF_ERROR:
+ return;
+ default:
+ break;
+ }
+ }
+}
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
new file mode 100644
index 0000000..635599a
--- /dev/null
+++ b/grub-core/boot/i386/pc/boot.S
@@ -0,0 +1,481 @@
+/* -*-Asm-*- */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/boot.h>
+#include <grub/machine/boot.h>
+
+/*
+ * defines for the code go here
+ */
+
+ /* Print message string */
+#define MSG(x) movw $x, %si; call LOCAL(message)
+#define ERR(x) movw $x, %si; jmp LOCAL(error_message)
+
+ .file "boot.S"
+
+ .text
+
+ /* Tell GAS to generate 16-bit instructions so that this code works
+ in real mode. */
+ .code16
+
+.globl _start, start;
+_start:
+start:
+ /*
+ * _start is loaded at 0x7c00 and is jumped to with CS:IP 0:0x7c00
+ */
+
+ /*
+ * Beginning of the sector is compatible with the FAT/HPFS BIOS
+ * parameter block.
+ */
+
+ jmp LOCAL(after_BPB)
+ nop /* do I care about this ??? */
+
+ /*
+ * This space is for the BIOS parameter block!!!! Don't change
+ * the first jump, nor start the code anywhere but right after
+ * this area.
+ */
+
+ . = _start + GRUB_BOOT_MACHINE_BPB_START
+ . = _start + 4
+
+ /* scratch space */
+mode:
+ .byte 0
+disk_address_packet:
+sectors:
+ .long 0
+heads:
+ .long 0
+cylinders:
+ .word 0
+sector_start:
+ .byte 0
+head_start:
+ .byte 0
+cylinder_start:
+ .word 0
+ /* more space... */
+
+ . = _start + GRUB_BOOT_MACHINE_BPB_END
+
+ /*
+ * End of BIOS parameter block.
+ */
+
+kernel_address:
+ .word GRUB_BOOT_MACHINE_KERNEL_ADDR
+
+ . = _start + GRUB_BOOT_MACHINE_KERNEL_SECTOR
+kernel_sector:
+ .long 1, 0
+
+ . = _start + GRUB_BOOT_MACHINE_BOOT_DRIVE
+boot_drive:
+ .byte 0xff /* the disk to load kernel from */
+ /* 0xff means use the boot drive */
+
+LOCAL(after_BPB):
+
+/* general setup */
+ cli /* we're not safe here! */
+
+ /*
+ * This is a workaround for buggy BIOSes which don't pass boot
+ * drive correctly. If GRUB is installed into a HDD, check if
+ * DL is masked correctly. If not, assume that the BIOS passed
+ * a bogus value and set DL to 0x80, since this is the only
+ * possible boot drive. If GRUB is installed into a floppy,
+ * this does nothing (only jump).
+ */
+ . = _start + GRUB_BOOT_MACHINE_DRIVE_CHECK
+boot_drive_check:
+ jmp 3f /* grub-setup may overwrite this jump */
+ testb $0x80, %dl
+ jz 2f
+3:
+ /* Ignore %dl different from 0-0x0f and 0x80-0x8f. */
+ testb $0x70, %dl
+ jz 1f
+2:
+ movb $0x80, %dl
+1:
+ /*
+ * ljmp to the next instruction because some bogus BIOSes
+ * jump to 07C0:0000 instead of 0000:7C00.
+ */
+ ljmp $0, $real_start
+
+real_start:
+
+ /* set up %ds and %ss as offset from 0 */
+ xorw %ax, %ax
+ movw %ax, %ds
+ movw %ax, %ss
+
+ /* set up the REAL stack */
+ movw $GRUB_BOOT_MACHINE_STACK_SEG, %sp
+
+ sti /* we're safe again */
+
+ /*
+ * Check if we have a forced disk reference here
+ */
+ movb boot_drive, %al
+ cmpb $0xff, %al
+ je 1f
+ movb %al, %dl
+1:
+ /* save drive reference first thing! */
+ pushw %dx
+
+ /* print a notification message on the screen */
+ MSG(notification_string)
+
+ /* set %si to the disk address packet */
+ movw $disk_address_packet, %si
+
+ /* check if LBA is supported */
+ movb $0x41, %ah
+ movw $0x55aa, %bx
+ int $0x13
+
+ /*
+ * %dl may have been clobbered by INT 13, AH=41H.
+ * This happens, for example, with AST BIOS 1.04.
+ */
+ popw %dx
+ pushw %dx
+
+ /* use CHS if fails */
+ jc LOCAL(chs_mode)
+ cmpw $0xaa55, %bx
+ jne LOCAL(chs_mode)
+
+ andw $1, %cx
+ jz LOCAL(chs_mode)
+
+lba_mode:
+ xorw %ax, %ax
+ movw %ax, 4(%si)
+
+ incw %ax
+ /* set the mode to non-zero */
+ movb %al, -1(%si)
+
+ /* the blocks */
+ movw %ax, 2(%si)
+
+ /* the size and the reserved byte */
+ movw $0x0010, (%si)
+
+ /* the absolute address */
+ movl kernel_sector, %ebx
+ movl %ebx, 8(%si)
+ movl kernel_sector + 4, %ebx
+ movl %ebx, 12(%si)
+
+ /* the segment of buffer address */
+ movw $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
+
+/*
+ * BIOS call "INT 0x13 Function 0x42" to read sectors from disk into memory
+ * Call with %ah = 0x42
+ * %dl = drive number
+ * %ds:%si = segment:offset of disk address packet
+ * Return:
+ * %al = 0x0 on success; err code on failure
+ */
+
+ movb $0x42, %ah
+ int $0x13
+
+ /* LBA read is not supported, so fallback to CHS. */
+ jc LOCAL(chs_mode)
+
+ movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
+ jmp LOCAL(copy_buffer)
+
+LOCAL(chs_mode):
+ /*
+ * Determine the hard disk geometry from the BIOS!
+ * We do this first, so that LS-120 IDE floppies work correctly.
+ */
+ movb $8, %ah
+ int $0x13
+ jnc LOCAL(final_init)
+
+ /*
+ * The call failed, so maybe use the floppy probe instead.
+ */
+ testb $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
+ jz LOCAL(floppy_probe)
+
+ /* Nope, we definitely have a hard disk, and we're screwed. */
+ ERR(hd_probe_error_string)
+
+LOCAL(final_init):
+ /* set the mode to zero */
+ movzbl %dh, %eax
+ movb %ah, -1(%si)
+
+ /* save number of heads */
+ incw %ax
+ movl %eax, 4(%si)
+
+ movzbw %cl, %dx
+ shlw $2, %dx
+ movb %ch, %al
+ movb %dh, %ah
+
+ /* save number of cylinders */
+ incw %ax
+ movw %ax, 8(%si)
+
+ movzbw %dl, %ax
+ shrb $2, %al
+
+ /* save number of sectors */
+ movl %eax, (%si)
+
+setup_sectors:
+ /* load logical sector start (top half) */
+ movl kernel_sector + 4, %eax
+
+ orl %eax, %eax
+ jnz LOCAL(geometry_error)
+
+ /* load logical sector start (bottom half) */
+ movl kernel_sector, %eax
+
+ /* zero %edx */
+ xorl %edx, %edx
+
+ /* divide by number of sectors */
+ divl (%si)
+
+ /* save sector start */
+ movb %dl, %cl
+
+ xorw %dx, %dx /* zero %edx */
+ divl 4(%si) /* divide by number of heads */
+
+ /* do we need too many cylinders? */
+ cmpw 8(%si), %ax
+ jge LOCAL(geometry_error)
+
+ /* normalize sector start (1-based) */
+ incb %cl
+
+ /* low bits of cylinder start */
+ movb %al, %ch
+
+ /* high bits of cylinder start */
+ xorb %al, %al
+ shrw $2, %ax
+ orb %al, %cl
+
+ /* save head start */
+ movb %dl, %al
+
+ /* restore %dl */
+ popw %dx
+
+ /* head start */
+ movb %al, %dh
+
+/*
+ * BIOS call "INT 0x13 Function 0x2" to read sectors from disk into memory
+ * Call with %ah = 0x2
+ * %al = number of sectors
+ * %ch = cylinder
+ * %cl = sector (bits 6-7 are high bits of "cylinder")
+ * %dh = head
+ * %dl = drive (0x80 for hard disk, 0x0 for floppy disk)
+ * %es:%bx = segment:offset of buffer
+ * Return:
+ * %al = 0x0 on success; err code on failure
+ */
+
+ movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
+ movw %bx, %es /* load %es segment with disk buffer */
+
+ xorw %bx, %bx /* %bx = 0, put it at 0 in the segment */
+ movw $0x0201, %ax /* function 2 */
+ int $0x13
+
+ jc LOCAL(read_error)
+
+ movw %es, %bx
+
+LOCAL(copy_buffer):
+ /*
+ * We need to save %cx and %si because the startup code in
+ * kernel uses them without initializing them.
+ */
+ pusha
+ pushw %ds
+
+ movw $0x100, %cx
+ movw %bx, %ds
+ xorw %si, %si
+ movw $GRUB_BOOT_MACHINE_KERNEL_ADDR, %di
+ movw %si, %es
+
+ cld
+
+ rep
+ movsw
+
+ popw %ds
+ popa
+
+ /* boot kernel */
+ jmp *(kernel_address)
+
+/* END OF MAIN LOOP */
+
+/*
+ * BIOS Geometry translation error (past the end of the disk geometry!).
+ */
+LOCAL(geometry_error):
+ ERR(geometry_error_string)
+
+/*
+ * Read error on the disk.
+ */
+LOCAL(read_error):
+ movw $read_error_string, %si
+LOCAL(error_message):
+ call LOCAL(message)
+LOCAL(general_error):
+ MSG(general_error_string)
+
+/* go here when you need to stop the machine hard after an error condition */
+ /* tell the BIOS a boot failure, which may result in no effect */
+ int $0x18
+LOCAL(stop):
+ jmp LOCAL(stop)
+
+notification_string: .asciz "GRUB "
+geometry_error_string: .asciz "Geom"
+hd_probe_error_string: .asciz "Hard Disk"
+read_error_string: .asciz "Read"
+general_error_string: .asciz " Error\r\n"
+
+/*
+ * message: write the string pointed to by %si
+ *
+ * WARNING: trashes %si, %ax, and %bx
+ */
+
+ /*
+ * Use BIOS "int 10H Function 0Eh" to write character in teletype mode
+ * %ah = 0xe %al = character
+ * %bh = page %bl = foreground color (graphics modes)
+ */
+1:
+ movw $0x0001, %bx
+ movb $0xe, %ah
+ int $0x10 /* display a byte */
+LOCAL(message):
+ lodsb
+ cmpb $0, %al
+ jne 1b /* if not end of string, jmp to display */
+ ret
+
+ /*
+ * Windows NT breaks compatibility by embedding a magic
+ * number here.
+ */
+
+ . = _start + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
+nt_magic:
+ .long 0
+ .word 0
+
+ /*
+ * This is where an MBR would go if on a hard disk. The code
+ * here isn't even referenced unless we're on a floppy. Kinda
+ * sneaky, huh?
+ */
+
+ . = _start + GRUB_BOOT_MACHINE_PART_START
+part_start:
+
+probe_values:
+ .byte 36, 18, 15, 9, 0
+
+LOCAL(floppy_probe):
+/*
+ * Perform floppy probe.
+ */
+
+ movw $probe_values - 1, %si
+
+LOCAL(probe_loop):
+ /* reset floppy controller INT 13h AH=0 */
+ xorw %ax, %ax
+ int $0x13
+
+ incw %si
+ movb (%si), %cl
+
+ /* if number of sectors is 0, display error and die */
+ cmpb $0, %cl
+ jne 1f
+
+/*
+ * Floppy disk probe failure.
+ */
+ MSG(fd_probe_error_string)
+ jmp LOCAL(general_error)
+
+/* "Floppy" */
+fd_probe_error_string: .asciz "Floppy"
+
+1:
+ /* perform read */
+ movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
+ movw %bx, %es
+ xorw %bx, %bx
+ movw $0x201, %ax
+ movb $0, %ch
+ movb $0, %dh
+ int $0x13
+
+ /* if error, jump to "LOCAL(probe_loop)" */
+ jc LOCAL(probe_loop)
+
+ /* %cl is already the correct value! */
+ movb $1, %dh
+ movb $79, %ch
+
+ jmp LOCAL(final_init)
+
+ . = _start + GRUB_BOOT_MACHINE_PART_END
+
+/* the last 2 bytes in the sector 0 contain the signature */
+ .word GRUB_BOOT_MACHINE_SIGNATURE
diff --git a/grub-core/boot/i386/pc/cdboot.S b/grub-core/boot/i386/pc/cdboot.S
new file mode 100644
index 0000000..33569ce
--- /dev/null
+++ b/grub-core/boot/i386/pc/cdboot.S
@@ -0,0 +1,173 @@
+/* -*-Asm-*- */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/boot.h>
+#include <grub/machine/boot.h>
+#include <grub/machine/kernel.h>
+#include <multiboot.h>
+
+ .file "cdboot.S"
+
+#define CODE_ADDR 0x6000
+#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
+
+#define CDSEC_SHIFT 11
+#define CDBLK_LENG 16
+
+ .text
+
+ .code16
+
+ .globl start, _start
+
+start:
+_start:
+ call LOCAL(next)
+
+LOCAL(next):
+ jmp 1f
+
+ . = start + 8
+
+bi_pvd:
+ .long 0 /* LBA of primary volume descriptor. */
+bi_file:
+ .long 0 /* LBA of boot file. */
+bi_length:
+ .long 0 /* Length of boot file. */
+bi_csum:
+ .long 0 /* Checksum of boot file */
+bi_reserved:
+ .space (10*4) /* Reserved */
+
+1:
+ popw %bx
+
+ /* Boot from CDROM. */
+
+ xorw %ax, %ax
+ movw %ax, %ss
+ movw $(CODE_ADDR), %sp
+ movw %ax, %ds
+ movw %ax, %es
+
+ movw $(0x7C00 + err_noboot_msg - start), %si
+ movl %cs: bi_length - LOCAL(next)(%bx), %ecx
+ orl %ecx, %ecx
+ jz LOCAL(fail)
+
+ addl $((1 << CDSEC_SHIFT) - 1), %ecx
+ shrl $CDSEC_SHIFT, %ecx
+
+ movl %cs: bi_file - LOCAL(next)(%bx), %esi
+
+ call LOCAL(read_cdrom)
+
+ ljmp $(DATA_ADDR >> 4), $0
+
+/*
+ * Parameters:
+ * esi: start sector
+ * ecx: number of sectors
+ */
+LOCAL(read_cdrom):
+ xorl %eax, %eax
+
+ /* Number of blocks to read. */
+ pushw $CDBLK_LENG
+
+ /* Block number. */
+ pushl %eax
+ pushl %esi
+
+ /* Buffer address. */
+ pushw $((DATA_ADDR - 0x400)>> 4)
+ pushl %eax
+ pushw $0x10
+
+ xorl %edi, %edi
+ movw %sp, %si
+
+1:
+ movw 0x10(%si), %di
+ cmpl %ecx, %edi
+ jbe 2f
+ movl %ecx, %edi
+
+2:
+ mov %di, 2(%si)
+
+ pushl %ecx
+
+ movb $0x42, %ah
+ int $0x13
+
+ jnc 3f
+
+ movb $0x42, %ah /* Try again. */
+ int $0x13
+
+ jnc 3f
+
+2:
+ shrw $1, %di /* Reduce transfer size. */
+ jz LOCAL(cdrom_fail)
+ movw %di, 0x10(%si)
+ movw %di, 2(%si)
+ movb $0x42, %ah
+ int $0x13
+ jc 2b
+
+3:
+
+ movw %di, %ax
+ shlw $(CDSEC_SHIFT - 4), %ax
+ addw %ax, 6(%si)
+ addl %edi, 8(%si)
+
+ popl %ecx
+ subl %edi, %ecx
+ jnz 1b
+
+ addw $0x12, %sp
+ ret
+
+LOCAL(cdrom_fail):
+ movw $(0x7C00 + err_cdfail_msg - start), %si
+
+LOCAL(fail):
+ movb $0x0e, %ah
+ xorw %bx, %bx
+1:
+ lodsb (%si), %al
+ int $0x10
+ cmpb $0, %al
+ jne 1b
+1: jmp 1b
+
+err_noboot_msg:
+ .ascii "no boot info\0"
+
+err_cdfail_msg:
+ .ascii "cdrom read fails\0"
+
+ . = start + 0x1FF
+
+ .byte 0
diff --git a/grub-core/boot/i386/pc/diskboot.S b/grub-core/boot/i386/pc/diskboot.S
new file mode 100644
index 0000000..92f223f
--- /dev/null
+++ b/grub-core/boot/i386/pc/diskboot.S
@@ -0,0 +1,380 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2006,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/machine/boot.h>
+
+/*
+ * defines for the code go here
+ */
+
+#define MSG(x) movw $x, %si; call LOCAL(message)
+
+ .file "diskboot.S"
+
+ .text
+
+ /* Tell GAS to generate 16-bit instructions so that this code works
+ in real mode. */
+ .code16
+
+ .globl start, _start
+start:
+_start:
+ /*
+ * _start is loaded at 0x2000 and is jumped to with
+ * CS:IP 0:0x2000 in kernel.
+ */
+
+ /*
+ * we continue to use the stack for boot.img and assume that
+ * some registers are set to correct values. See boot.S
+ * for more information.
+ */
+
+ /* save drive reference first thing! */
+ pushw %dx
+
+ /* print a notification message on the screen */
+ pushw %si
+ MSG(notification_string)
+ popw %si
+
+ /* this sets up for the first run through "bootloop" */
+ movw $(firstlist - GRUB_BOOT_MACHINE_LIST_SIZE), %di
+
+ /* save the sector number of the second sector in %ebp */
+ movl (%di), %ebp
+
+ /* this is the loop for reading the rest of the kernel in */
+LOCAL(bootloop):
+
+ /* check the number of sectors to read */
+ cmpw $0, 8(%di)
+
+ /* if zero, go to the start function */
+ je LOCAL(bootit)
+
+LOCAL(setup_sectors):
+ /* check if we use LBA or CHS */
+ cmpb $0, -1(%si)
+
+ /* use CHS if zero, LBA otherwise */
+ je LOCAL(chs_mode)
+
+ /* load logical sector start */
+ movl (%di), %ebx
+ movl 4(%di), %ecx
+
+ /* the maximum is limited to 0x7f because of Phoenix EDD */
+ xorl %eax, %eax
+ movb $0x7f, %al
+
+ /* how many do we really want to read? */
+ cmpw %ax, 8(%di) /* compare against total number of sectors */
+
+ /* which is greater? */
+ jg 1f
+
+ /* if less than, set to total */
+ movw 8(%di), %ax
+
+1:
+ /* subtract from total */
+ subw %ax, 8(%di)
+
+ /* add into logical sector start */
+ addl %eax, (%di)
+ adcl $0, 4(%di)
+
+ /* set up disk address packet */
+
+ /* the size and the reserved byte */
+ movw $0x0010, (%si)
+
+ /* the number of sectors */
+ movw %ax, 2(%si)
+
+ /* the absolute address */
+ movl %ebx, 8(%si)
+ movl %ecx, 12(%si)
+
+ /* the segment of buffer address */
+ movw $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
+
+ /* save %ax from destruction! */
+ pushw %ax
+
+ /* the offset of buffer address */
+ movw $0, 4(%si)
+
+/*
+ * BIOS call "INT 0x13 Function 0x42" to read sectors from disk into memory
+ * Call with %ah = 0x42
+ * %dl = drive number
+ * %ds:%si = segment:offset of disk address packet
+ * Return:
+ * %al = 0x0 on success; err code on failure
+ */
+
+ movb $0x42, %ah
+ int $0x13
+
+ jc LOCAL(read_error)
+
+ movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
+ jmp LOCAL(copy_buffer)
+
+LOCAL(chs_mode):
+ /* load logical sector start (top half) */
+ movl 4(%di), %eax
+ orl %eax, %eax
+ jnz LOCAL(geometry_error)
+
+ /* load logical sector start (bottom half) */
+ movl (%di), %eax
+
+ /* zero %edx */
+ xorl %edx, %edx
+
+ /* divide by number of sectors */
+ divl (%si)
+
+ /* save sector start */
+ movb %dl, 10(%si)
+
+ xorl %edx, %edx /* zero %edx */
+ divl 4(%si) /* divide by number of heads */
+
+ /* save head start */
+ movb %dl, 11(%si)
+
+ /* save cylinder start */
+ movw %ax, 12(%si)
+
+ /* do we need too many cylinders? */
+ cmpw 8(%si), %ax
+ jge LOCAL(geometry_error)
+
+ /* determine the maximum sector length of this read */
+ movw (%si), %ax /* get number of sectors per track/head */
+
+ /* subtract sector start */
+ subb 10(%si), %al
+
+ /* how many do we really want to read? */
+ cmpw %ax, 8(%di) /* compare against total number of sectors */
+
+
+ /* which is greater? */
+ jg 2f
+
+ /* if less than, set to total */
+ movw 8(%di), %ax
+
+2:
+ /* subtract from total */
+ subw %ax, 8(%di)
+
+ /* add into logical sector start */
+ addl %eax, (%di)
+ adcl $0, 4(%di)
+
+/*
+ * This is the loop for taking care of BIOS geometry translation (ugh!)
+ */
+
+ /* get high bits of cylinder */
+ movb 13(%si), %dl
+
+ shlb $6, %dl /* shift left by 6 bits */
+ movb 10(%si), %cl /* get sector */
+
+ incb %cl /* normalize sector (sectors go
+ from 1-N, not 0-(N-1) ) */
+ orb %dl, %cl /* composite together */
+ movb 12(%si), %ch /* sector+hcyl in cl, cylinder in ch */
+
+ /* restore %dx */
+ popw %dx
+ pushw %dx
+
+ /* head number */
+ movb 11(%si), %dh
+
+ pushw %ax /* save %ax from destruction! */
+
+/*
+ * BIOS call "INT 0x13 Function 0x2" to read sectors from disk into memory
+ * Call with %ah = 0x2
+ * %al = number of sectors
+ * %ch = cylinder
+ * %cl = sector (bits 6-7 are high bits of "cylinder")
+ * %dh = head
+ * %dl = drive (0x80 for hard disk, 0x0 for floppy disk)
+ * %es:%bx = segment:offset of buffer
+ * Return:
+ * %al = 0x0 on success; err code on failure
+ */
+
+ movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
+ movw %bx, %es /* load %es segment with disk buffer */
+
+ xorw %bx, %bx /* %bx = 0, put it at 0 in the segment */
+ movb $0x2, %ah /* function 2 */
+ int $0x13
+
+ jc LOCAL(read_error)
+
+ /* save source segment */
+ movw %es, %bx
+
+LOCAL(copy_buffer):
+
+ /* load addresses for copy from disk buffer to destination */
+ movw 10(%di), %es /* load destination segment */
+
+ /* restore %ax */
+ popw %ax
+
+ /* determine the next possible destination address (presuming
+ 512 byte sectors!) */
+ shlw $5, %ax /* shift %ax five bits to the left */
+ addw %ax, 10(%di) /* add the corrected value to the destination
+ address for next time */
+
+ /* save addressing regs */
+ pusha
+ pushw %ds
+
+ /* get the copy length */
+ shlw $3, %ax
+ movw %ax, %cx
+
+ xorw %di, %di /* zero offset of destination addresses */
+ xorw %si, %si /* zero offset of source addresses */
+ movw %bx, %ds /* restore the source segment */
+
+ cld /* sets the copy direction to forward */
+
+ /* perform copy */
+ rep /* sets a repeat */
+ movsw /* this runs the actual copy */
+
+ /* restore addressing regs and print a dot with correct DS
+ (MSG modifies SI, which is saved, and unused AX and BX) */
+ popw %ds
+ MSG(notification_step)
+ popa
+
+ /* check if finished with this dataset */
+ cmpw $0, 8(%di)
+ jne LOCAL(setup_sectors)
+
+ /* update position to load from */
+ subw $GRUB_BOOT_MACHINE_LIST_SIZE, %di
+
+ /* jump to bootloop */
+ jmp LOCAL(bootloop)
+
+/* END OF MAIN LOOP */
+
+LOCAL(bootit):
+ /* print a newline */
+ MSG(notification_done)
+ popw %dx /* this makes sure %dl is our "boot" drive */
+ ljmp $0, $(GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
+
+
+/*
+ * BIOS Geometry translation error (past the end of the disk geometry!).
+ */
+LOCAL(geometry_error):
+ MSG(geometry_error_string)
+ jmp LOCAL(general_error)
+
+/*
+ * Read error on the disk.
+ */
+LOCAL(read_error):
+ MSG(read_error_string)
+
+LOCAL(general_error):
+ MSG(general_error_string)
+
+/* go here when you need to stop the machine hard after an error condition */
+LOCAL(stop): jmp LOCAL(stop)
+
+notification_string: .asciz "loading"
+
+notification_step: .asciz "."
+notification_done: .asciz "\r\n"
+
+geometry_error_string: .asciz "Geom"
+read_error_string: .asciz "Read"
+general_error_string: .asciz " Error"
+
+/*
+ * message: write the string pointed to by %si
+ *
+ * WARNING: trashes %si, %ax, and %bx
+ */
+
+ /*
+ * Use BIOS "int 10H Function 0Eh" to write character in teletype mode
+ * %ah = 0xe %al = character
+ * %bh = page %bl = foreground color (graphics modes)
+ */
+1:
+ movw $0x0001, %bx
+ movb $0xe, %ah
+ int $0x10 /* display a byte */
+
+ incw %si
+LOCAL(message):
+ movb (%si), %al
+ cmpb $0, %al
+ jne 1b /* if not end of string, jmp to display */
+ ret
+
+/*
+ * This area is an empty space between the main body of code below which
+ * grows up (fixed after compilation, but between releases it may change
+ * in size easily), and the lists of sectors to read, which grows down
+ * from a fixed top location.
+ */
+
+ .word 0
+ .word 0
+
+ . = _start + 0x200 - GRUB_BOOT_MACHINE_LIST_SIZE
+
+ /* fill the first data listing with the default */
+blocklist_default_start:
+ /* this is the sector start parameter, in logical sectors from
+ the start of the disk, sector 0 */
+ .long 2, 0
+blocklist_default_len:
+ /* this is the number of sectors to read. grub-mkimage
+ will fill this up */
+ .word 0
+blocklist_default_seg:
+ /* this is the segment of the starting address to load the data into */
+ .word (GRUB_BOOT_MACHINE_KERNEL_SEG + 0x20)
+
+firstlist: /* this label has to be after the list data!!! */
diff --git a/grub-core/boot/i386/pc/lnxboot.S b/grub-core/boot/i386/pc/lnxboot.S
new file mode 100644
index 0000000..2c75960
--- /dev/null
+++ b/grub-core/boot/i386/pc/lnxboot.S
@@ -0,0 +1,299 @@
+/* -*-Asm-*- */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/symbol.h>
+#include <grub/boot.h>
+#include <grub/machine/boot.h>
+#include <grub/machine/kernel.h>
+#include <multiboot.h>
+
+ .file "lnxboot.S"
+
+#define CODE_ADDR 0x6000
+#define CODE_SECTORS 1
+#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
+
+#define BLCK_LENG 0x4000
+
+ .text
+
+ .code16
+
+ .globl start, _start
+
+data_start:
+ xorl %ebp, %ebp
+ jmp LOCAL(linux_next)
+
+ . = data_start + 0x1F1
+
+setup_sects:
+ .byte CODE_SECTORS
+root_flags:
+ .word 0
+syssize:
+ .word 0
+swap_dev:
+ .word 0
+ram_size:
+ .word 0
+vid_mode:
+ .word 0
+root_dev:
+ .word 0
+boot_flag:
+ .word 0xAA55
+
+start:
+_start:
+
+ jmp LOCAL(linux_init)
+
+ .ascii "HdrS" /* Header signature. */
+ .word 0x0203 /* Header version number. */
+
+realmode_swtch:
+ .word 0, 0 /* default_switch, SETUPSEG. */
+start_sys_seg:
+ .word 0x1000 /* Obsolete. */
+version_ptr:
+ .word 0 /* Version string ptr. */
+type_of_loader:
+ .byte 0 /* Filled in by boot loader. */
+loadflags:
+ .byte 1 /* Please load high. */
+setup_move_size:
+ .word 0 /* Unused. */
+code32_start:
+ .long 0x100000 /* 32-bit start address. */
+ramdisk_image:
+ .long 0 /* Loaded ramdisk image address. */
+ramdisk_size:
+ .long 0 /* Size of loaded ramdisk. */
+bootsect_kludge:
+ .word 0, 0
+heap_end_ptr:
+ .word 0
+pad1:
+ .word 0
+cmd_line_ptr:
+ .long 0 /* Command line. */
+ramdisk_max:
+ .long 0xffffffff /* Highest allowed ramdisk address. */
+
+gdt:
+ .long 0, 0, 0, 0 /* Must be zero. */
+ .word 0xffff /* 64 K segment size. */
+gdt_src1:
+ .byte 0, 0 ,0 /* Low 24 bits of source address. */
+ .byte 0x93 /* Access rights. */
+ .byte 0 /* Extended access rights. */
+gdt_src2:
+ .byte 0 /* High 8 bits of source address. */
+ .word 0xffff /* 64 K segment size. */
+gdt_dst1:
+ .byte 0, 0, 0 /* Low 24 bits of target address. */
+ .byte 0x93 /* Access rights. */
+ .byte 0 /* Extended access rights. */
+gdt_dst2:
+ .byte 0 /* High 8 bits of source address. */
+ .long 0, 0, 0, 0 /* More space for the BIOS. */
+
+reg_edx:
+ .byte 0x80, 0, 0xFF, 0xFF
+
+data_leng:
+ .long 0
+
+LOCAL(linux_init):
+ movw %cs:(reg_edx - start), %dx
+ movl %cs:(code32_start - start), %ebp
+
+LOCAL(linux_next):
+
+ call LOCAL(normalize)
+
+LOCAL(normalize):
+ popw %bx
+ subw $(LOCAL(normalize) - start), %bx
+ shrw $4, %bx
+ movw %cs, %ax
+ addw %bx, %ax
+ pushw %ax
+ pushw $(real_code - start)
+ lret /* Jump to real_code. */
+
+real_code:
+ subw $0x20, %ax
+ movw %ax, %ds
+ movw (setup_sects - data_start), %cx
+ shlw $7, %cx
+
+ /* Setup stack. */
+
+ xorw %si, %si
+ movw %si, %ss
+ movw $(CODE_ADDR), %sp
+
+ /* Move itself to 0:CODE_ADDR. */
+
+ cld
+ movw %cs, %ax
+ movw %ax, %ds
+ movw $(CODE_ADDR >> 4), %ax
+ movw %ax, %es
+ movw %si, %di
+
+ rep
+ movsl
+ ljmp $(CODE_ADDR >> 4), $(real_code_2 - start)
+
+real_code_2:
+
+ xchgl %ebp, %esi
+ orl %esi, %esi
+ jnz 1f
+ movw %ds, %si
+ shll $4, %esi
+ addl %ebp, %esi
+1:
+
+ pushw %es
+ popw %ds
+
+#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
+ movl $0x200, %ecx
+ addl %ecx, %esi
+#else
+ movl $(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4), %ecx
+ addl $0x200, %esi
+#endif
+ movl $DATA_ADDR, %edi
+
+ call LOCAL(move_memory)
+
+ /* Check for multiboot signature. */
+ cmpl $MULTIBOOT_HEADER_MAGIC, %ss:(DATA_ADDR + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART)
+ jz 1f
+
+ movl (ramdisk_image - start), %esi
+ movl (ramdisk_size - start), %ecx
+ movl $(DATA_ADDR - 0x200), %edi
+ jmp 2f
+
+1:
+
+ movl %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE), %ecx
+#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
+ addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - 0x200), %ecx
+#else
+ addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4)), %ecx
+#endif
+
+2:
+ call LOCAL(move_memory)
+
+ movsbl %dh, %eax
+ movl %eax, %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_INSTALL_DOS_PART)
+ movsbl (reg_edx + 2 - start), %eax
+ movl %eax, %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_INSTALL_BSD_PART)
+
+ movb $0xFF, %dh
+
+ ljmp $(DATA_ADDR >> 4), $0
+
+/*
+ * Parameters:
+ * esi: source address
+ * edi: target address
+ * ecx: number of bytes
+ */
+
+LOCAL(move_memory):
+ incl %ecx
+ andb $0xFE, %cl
+ pushw %dx
+1:
+ pushl %esi
+ pushl %edi
+ pushl %ecx
+ cmpl $BLCK_LENG, %ecx
+ jbe 2f
+ movl $BLCK_LENG, %ecx
+2:
+ pushl %ecx
+
+ movl %esi, %eax
+ movw %si, (gdt_src1 - start)
+ shrl $16, %eax
+ movb %al, (gdt_src1 + 2 - start)
+ movb %ah, (gdt_src2 - start)
+
+ movl %edi, %eax
+ movw %di, (gdt_dst1 - start)
+ shrl $16, %eax
+ movb %al, (gdt_dst1 + 2 - start)
+ movb %ah, (gdt_dst2 - start)
+
+ movw $(gdt - start), %si
+ movb $0x87, %ah
+ shrw $1, %cx
+
+ int $0x15
+
+ popl %eax
+ popl %ecx
+ popl %edi
+ popl %esi
+
+ jnc 2f
+ movw $(err_int15_msg - start), %si
+ jmp LOCAL(fail)
+
+2:
+
+ addl %eax, %esi
+ addl %eax, %edi
+ subl %eax, %ecx
+ jnz 1b
+
+
+ popw %dx
+ ret
+
+/*
+ * Parameters:
+ * si: message
+ */
+
+LOCAL(fail):
+ movb $0x0e, %ah
+ xorw %bx, %bx
+1:
+ lodsb (%si), %al
+ int $0x10
+ cmpb $0, %al
+ jne 1b
+1: jmp 1b
+
+err_int15_msg:
+ .ascii "move memory fails\0"
+
+ . = _start + CODE_SECTORS * 512
diff --git a/grub-core/boot/i386/pc/pxeboot.S b/grub-core/boot/i386/pc/pxeboot.S
new file mode 100644
index 0000000..446bfc7
--- /dev/null
+++ b/grub-core/boot/i386/pc/pxeboot.S
@@ -0,0 +1,42 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/boot.h>
+
+ .file "pxeboot.S"
+ .text
+
+ /* Start with the prehistoric environment... */
+ .code16
+
+ /* Let's go */
+.globl start, _start;
+_start:
+start:
+
+ /* Use drive number 0x7F for PXE */
+ movb $GRUB_BOOT_MACHINE_PXE_DL, %dl
+
+ /* Jump to the real world */
+ ljmp $0, $0x8200
+
+ /* This region is a junk. Do you say that this is wasteful?
+ But I like that the memory layout of the body is consistent
+ among different kernels rather than scamping just for 1.5KB. */
+ . = _start + 0x8200 - 0x7C00 - 0x200 - 1
+ .byte 0
diff --git a/grub-core/boot/i386/qemu/boot.S b/grub-core/boot/i386/qemu/boot.S
new file mode 100644
index 0000000..97aeab9
--- /dev/null
+++ b/grub-core/boot/i386/qemu/boot.S
@@ -0,0 +1,68 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/symbol.h>
+#include <grub/i386/pc/memory.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/boot.h>
+#include <grub/machine/kernel.h>
+
+ .text
+ .code16
+ .globl _start
+_start:
+ /* Disable interrupts. */
+ cli
+
+ jmp 1f
+
+ . = _start + GRUB_BOOT_I386_QEMU_CORE_ENTRY_ADDR
+VARIABLE(grub_core_entry_addr)
+ .long 0
+1:
+
+ /* Set up %ds, %ss, and %es. */
+ xorw %ax, %ax
+ movw %ax, %ds
+ movw %ax, %ss
+ movw %ax, %es
+
+ /* Set up the real mode stack. */
+ movl $GRUB_MEMORY_MACHINE_REAL_STACK, %esp
+
+ /* Transition to protected mode. We use pushl to force generation
+ of a flat return address. */
+ pushl $1f
+ DATA32 jmp real_to_prot
+ .code32
+1:
+ movl grub_core_entry_addr, %edx
+ jmp *%edx
+
+#include "../../../kern/i386/realmode.S"
+
+ /* Intel, in its infinite wisdom, decided to put the i8086 entry point
+ *right here* and this is why we need this kludge. */
+
+ . = GRUB_BOOT_MACHINE_SIZE - 16
+
+ .code16
+
+ jmp _start
+ . = GRUB_BOOT_MACHINE_SIZE
diff --git a/grub-core/boot/mips/startup_raw.S b/grub-core/boot/mips/startup_raw.S
new file mode 100644
index 0000000..6ba04c1
--- /dev/null
+++ b/grub-core/boot/mips/startup_raw.S
@@ -0,0 +1,196 @@
+/* startup.S - Startup code for the MIPS. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/offsets.h>
+#include <grub/machine/memory.h>
+#include <grub/offsets.h>
+
+#define BASE_ADDR 8
+
+.extern __bss_start
+.extern _end
+
+ .globl __start, _start, start
+ .set noreorder
+ .set nomacro
+__start:
+_start:
+start:
+
+ bal codestart
+ nop
+base:
+ . = _start + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE
+compressed_size:
+ .long 0
+ . = _start + GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE
+uncompressed_size:
+ .long 0
+codestart:
+ /* Save our base. */
+ move $s0, $ra
+
+ /* Parse arguments. Has to be done before relocation.
+ So need to do it in asm. */
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+ move $s2, $zero
+ move $s3, $zero
+ move $s4, $zero
+ move $s5, $zero
+
+ /* $a2 has the environment. */
+ addiu $t0, $a2, 1
+ beq $t0, $zero, argdone
+ nop
+ move $t0, $a2
+argcont:
+ lw $t1, 0($t0)
+ beq $t1, $zero, argdone
+ nop
+#define DO_PARSE(str, reg) \
+ addiu $t2, $s0, (str-base);\
+ bal parsestr;\
+ nop ;\
+ beq $v0, $zero, 1f;\
+ nop ;\
+ b 2f;\
+ move reg, $v0; \
+1:
+ DO_PARSE (busclockstr, $s2)
+ DO_PARSE (cpuclockstr, $s3)
+ DO_PARSE (memsizestr, $s4)
+ DO_PARSE (highmemsizestr, $s5)
+2:
+ b argcont
+ addiu $t0, $t0, 4
+parsestr:
+ move $v0, $zero
+ move $t3, $t1
+3:
+ lb $t4, 0($t2)
+ lb $t5, 0($t3)
+ addiu $t2, $t2, 1
+ addiu $t3, $t3, 1
+ beq $t5, $zero, 1f
+ nop
+ beq $t5, $t4, 3b
+ nop
+ bne $t4, $zero, 1f
+ nop
+
+ addiu $t3, $t3, 0xffff
+digcont:
+ lb $t5, 0($t3)
+ /* Substract '0' from digit. */
+ addiu $t5, $t5, 0xffd0
+ bltz $t5, 1f
+ nop
+ addiu $t4, $t5, 0xfff7
+ bgtz $t4, 1f
+ nop
+ /* Multiply $v0 by 10 with bitshifts. */
+ sll $v0, $v0, 1
+ sll $t4, $v0, 2
+ addu $v0, $v0, $t4
+ addu $v0, $v0, $t5
+ addiu $t3, $t3, 1
+ b digcont
+ nop
+1:
+ jr $ra
+ nop
+busclockstr: .asciiz "busclock="
+cpuclockstr: .asciiz "cpuclock="
+memsizestr: .asciiz "memsize="
+highmemsizestr: .asciiz "highmemsize="
+ .p2align 2
+argdone:
+#endif
+ /* Copy the decompressor. */
+ lui $t1, %hi(base)
+ addiu $t1, $t1, %lo(base)
+ lui $t3, %hi(__bss_start)
+ addiu $t3, $t3, %lo(__bss_start)
+ move $t2, $s0
+
+1:
+ beq $t1, $t3, 2f
+ lb $t4, 0($t2)
+ sb $t4, 0($t1)
+ addiu $t1, $t1, 1
+ b 1b
+ addiu $t2, $t2, 1
+2:
+ /* Clean out its BSS. */
+ lui $t1, %hi(__bss_start)
+ addiu $t1, $t1, %lo(__bss_start)
+ lui $t2, %hi(_end)
+ addiu $t2, $t2, %lo(_end)
+1:
+ beq $t1, $t2, 2f
+ nop
+ sb $zero, 0($t1)
+ b 1b
+ addiu $t1, $t1, 1
+2:
+ lui $a0, %hi(base)
+ addiu $a0, $a0, %lo(base)
+ lui $a1, %hi(_end)
+ addiu $a1, %lo(_end)
+ subu $a1,$a1,$a0
+
+#include "../../kern/mips/cache_flush.S"
+
+ /* Decompress the payload. */
+ lui $a0, %hi(__bss_start)
+ addiu $a0, $a0, %lo(__bss_start)
+ lui $t0, %hi(base)
+ addiu $t0, $t0, %lo(base)
+ subu $a0, $a0, $t0
+ addu $a0, $a0, $s0
+
+ lui $a1, %hi(GRUB_MACHINE_LINK_ADDR)
+ addiu $a1, %lo(GRUB_MACHINE_LINK_ADDR)
+ lw $a2, (GRUB_KERNEL_MACHINE_COMPRESSED_SIZE - BASE_ADDR)($s0)
+ lw $a3, (GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE - BASE_ADDR)($s0)
+ move $s1, $a1
+
+ /* $a0 contains source compressed address, $a1 is destination,
+ $a2 is compressed size, $a3 is uncompressed size.
+ */
+ move $s6, $a3
+
+ lui $t0, %hi(EXT_C(grub_decompress_core))
+ addiu $t0, $t0, %lo(EXT_C(grub_decompress_core))
+
+ lui $sp, %hi(_start - 256)
+ jalr $t0
+ addiu $sp, $sp, %lo(_start - 256)
+
+ move $a0, $s1
+ move $a1, $s6
+
+#include "../../kern/mips/cache_flush.S"
+
+ lui $t1, %hi(GRUB_MACHINE_LINK_ADDR)
+ addiu $t1, %lo(GRUB_MACHINE_LINK_ADDR)
+
+ jr $t1
+ nop
diff --git a/grub-core/boot/mips/yeeloong/fwstart.S b/grub-core/boot/mips/yeeloong/fwstart.S
new file mode 100644
index 0000000..2eec876
--- /dev/null
+++ b/grub-core/boot/mips/yeeloong/fwstart.S
@@ -0,0 +1,632 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mips/yeeloong/serial.h>
+#include <grub/mips/yeeloong/pci.h>
+#include <grub/mips/loongson.h>
+#include <grub/pci.h>
+#include <grub/machine/serial.h>
+#include <grub/ns8250.h>
+#include <grub/cs5536.h>
+#include <grub/smbus.h>
+
+ .set noreorder
+ .set noat
+ .set nomacro
+ .set mips3
+
+ .global start,_start,__start
+start:
+_start:
+__start:
+ bal serial_hw_init
+ nop
+ /* Find CS5536 controller. */
+ /* $t4 chooses device in priority encoding. */
+ /* Resulting value is kept in GRUB_MACHINE_PCI_CONF_CTRL_REG.
+ This way we don't need to sacrifice a register for it. */
+ /* We have only one bus (0). Function is 0. */
+ lui $t0, %hi(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR)
+ lui $t1, %hi(GRUB_MACHINE_PCI_CONFSPACE)
+ lui $t3, %hi(GRUB_CS5536_PCIID)
+ addiu $t3, $t3, %lo(GRUB_CS5536_PCIID)
+ ori $t4, $zero, 1
+ lui $a0, %hi(no_cs5536)
+1:
+ andi $t4, $t4, ((1 << GRUB_PCI_NUM_DEVICES) - 1)
+ beql $t4, $zero, fatal
+ addiu $a0, $a0, %lo(no_cs5536)
+ sw $t4, %lo(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR) ($t0)
+ lw $t2, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_PCI_REG_PCI_ID) ($t1)
+ bnel $t2, $t3, 1b
+ sll $t4, $t4, 1
+
+ bal message
+ addiu $a0, $a0, %lo(cs5536_found)
+ bal printhex
+ move $a0, $t4
+
+ /* Initialise SMBus controller. */
+ /* Set GPIO LBAR. */
+ lui $a0, %hi(GRUB_CS5536_MSR_GPIO_BAR)
+ addiu $a0, $a0, %lo(GRUB_CS5536_MSR_GPIO_BAR)
+ ori $a1, $zero, GRUB_CS5536_LBAR_GPIO
+ /* Set mask to 0xf and enabled bit to 1. */
+ bal wrmsr
+ ori $a2, $zero, ((GRUB_CS5536_LBAR_MASK_MASK \
+ | GRUB_CS5536_LBAR_ENABLE) >> 32)
+
+ /* Set SMBUS LBAR. */
+ lui $a0, %hi(GRUB_CS5536_MSR_SMB_BAR)
+ addiu $a0, $a0, %lo(GRUB_CS5536_MSR_SMB_BAR)
+ ori $a1, $zero, GRUB_CS5536_LBAR_SMBUS
+ /* Set mask to 0xf and enabled bit to 1. */
+ bal wrmsr
+ ori $a2, $zero, ((GRUB_CS5536_LBAR_MASK_MASK \
+ | GRUB_CS5536_LBAR_ENABLE) >> 32)
+
+ lui $a0, %hi(smbus_enabled)
+ bal message
+ addiu $a0, $a0, %lo(smbus_enabled)
+
+ /* Enable SMBus controller pins. */
+ lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO)
+ ori $t1, $zero, GRUB_GPIO_SMBUS_PINS
+ sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_OUT_EN) ($t0)
+ sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_OUT_AUX1) ($t0)
+ sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_IN_EN) ($t0)
+ sw $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_GPIO + GRUB_GPIO_REG_IN_AUX1) ($t0)
+
+ lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS)
+
+ /* Disable SMB. */
+ sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
+
+ /* Disable interrupts. */
+ sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1) ($t0)
+
+ /* Set as master. */
+ sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_ADDR) ($t0)
+
+ /* Launch SMBus controller at slowest speed possible. */
+ ori $t1, $zero, 0xff
+ sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL3) ($t0)
+ sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
+
+ /* Yeeloong has only one memory slot. */
+ /* Output first byte on serial for debugging. */
+ ori $a1, $zero, GRUB_SMB_RAM_START_ADDR
+ bal read_spd
+ move $a0, $zero
+ bal printhex
+ move $a0, $v0
+
+ bal read_spd
+ ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_ADDR
+ ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2
+ lui $a0, %hi(unimplemented_memory_type)
+ bne $t0, $v0, fatal
+ addiu $a0, $a0, %lo(unimplemented_memory_type)
+
+ /* And here is our goal: DDR2 controller initialisation. */
+ lui $t0, %hi(GRUB_CPU_LOONGSON_CORECFG)
+ ld $t1, %lo(GRUB_CPU_LOONGSON_CORECFG) ($t0)
+ /* Use addiu for sign-extension. */
+ addiu $t2, $zero, ~(GRUB_CPU_LOONGSON_CORECFG_DISABLE_DDR2_SPACE|GRUB_CPU_LOONGSON_CORECFG_BUFFER_CPU)
+ and $t1, $t1, $t2
+ sd $t1, %lo (GRUB_CPU_LOONGSON_CORECFG) ($t0)
+
+ b continue
+
+ . = start + GRUB_CPU_LOONGSON_FLASH_TLB_REFILL - GRUB_CPU_LOONGSON_FLASH_START
+tlb_refill:
+ mfc0 $s1, GRUB_CPU_LOONGSON_COP0_EPC
+ mfc0 $s2, GRUB_CPU_LOONGSON_COP0_BADVADDR
+ move $s3, $ra
+ lui $a0, %hi(epc)
+ bal message
+ addiu $a0, $a0, %lo(epc)
+
+ bal printhex
+ move $a0, $s1
+
+ lui $a0, %hi(badvaddr)
+ bal message
+ addiu $a0, $a0, %lo(badvaddr)
+
+ bal printhex
+ move $a0, $s2
+
+ lui $a0, %hi(return_msg)
+ bal message
+ addiu $a0, $a0, %lo(return_msg)
+
+ bal printhex
+ move $a0, $s3
+
+ lui $a0, %hi(newline)
+ bal message
+ addiu $a0, $a0, %lo(newline)
+
+ lui $a0, %hi(unhandled_tlb_refill)
+ b fatal
+ addiu $a0, $a0, %lo(unhandled_tlb_refill)
+
+ . = start + GRUB_CPU_LOONGSON_FLASH_CACHE_ERROR - GRUB_CPU_LOONGSON_FLASH_START
+cache_error:
+ lui $a0, %hi(unhandled_cache_error)
+ b fatal
+ addiu $a0, $a0, %lo(unhandled_cache_error)
+
+ . = start + GRUB_CPU_LOONGSON_FLASH_OTHER_EXCEPTION - GRUB_CPU_LOONGSON_FLASH_START
+other_exception:
+ mfc0 $s0, GRUB_CPU_LOONGSON_COP0_CAUSE
+ mfc0 $s1, GRUB_CPU_LOONGSON_COP0_EPC
+ mfc0 $s2, GRUB_CPU_LOONGSON_COP0_BADVADDR
+ lui $a0, %hi(cause)
+ bal message
+ addiu $a0, $a0, %lo(cause)
+
+ bal printhex
+ move $a0, $s0
+
+ lui $a0, %hi(epc)
+ bal message
+ addiu $a0, $a0, %lo(epc)
+
+ bal printhex
+ move $a0, $s1
+
+ lui $a0, %hi(badvaddr)
+ bal message
+ addiu $a0, $a0, %lo(badvaddr)
+
+ bal printhex
+ move $a0, $s2
+
+ lui $a0, %hi(newline)
+ bal message
+ addiu $a0, $a0, %lo(newline)
+
+ lui $a0, %hi(unhandled_exception)
+ b fatal
+ addiu $a0, $a0, %lo(unhandled_exception)
+
+ /* Same as similarly named C function but in asm since
+ we need it early. */
+ /* In: none. Out: none. Clobbered: $t0, $t1, $a0. */
+serial_hw_init:
+ lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
+
+ /* Turn off the interrupt. */
+ sb $zero, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_IER)($t0)
+
+ /* Set DLAB. */
+ ori $t1, $zero, UART_DLAB
+ sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LCR)($t0)
+
+ /* Set the baud rate 115200. */
+ ori $t1, $zero, GRUB_MACHINE_SERIAL_DIVISOR_115200
+ sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_DLL)($t0)
+ sb $zero, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_DLH)($t0)
+
+ /* Set the line status. */
+ ori $t1, $zero, (UART_NO_PARITY | UART_8BITS_WORD | UART_1_STOP_BIT)
+ sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LCR)($t0)
+
+ /* Enable the FIFO. */
+ ori $t1, $zero, UART_ENABLE_FIFO_TRIGGER1
+ sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_FCR)($t0)
+
+ /* Turn on DTR and RTS. */
+ ori $t1, $zero, UART_ENABLE_DTRRTS
+ sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_MCR)($t0)
+
+ /* Let message return to original caller. */
+ lui $a0, %hi(notification_string)
+ addiu $a0, $a0, %lo(notification_string)
+
+ /* Print message on serial console. */
+ /* In: $a0 = asciiz message. Out: none. Clobbered: $t0, $t1, $a0. */
+message:
+ lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
+1:
+ lb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LSR)($t0)
+ andi $t1, $t1, UART_EMPTY_TRANSMITTER
+ beq $t1, $zero, 1b
+ nop
+ lb $t1, 0($a0)
+ sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_TX)($t0)
+ bne $t1, $zero, 1b
+ addiu $a0, $a0, 1
+ jr $ra
+ nop
+
+ /* Print 32-bit hexadecimal on serial.
+ In: $a0. Out: None. Clobbered: $a0, $t0, $t1, $t2
+ */
+printhex:
+ lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
+ ori $t2, $zero, 8
+1:
+ lb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LSR)($t0)
+ andi $t1, $t1, UART_EMPTY_TRANSMITTER
+ beq $t1, $zero, 1b
+ nop
+ srl $t1, $a0, 28
+ addiu $t1, $t1, -10
+ blt $t1, $zero, 2f
+ sll $a0, $a0, 4
+ addiu $t1, $t1, 'A'-10-'0'
+2: addiu $t1, $t1, '0'+10
+ sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_TX)($t0)
+ addiu $t2, $t2, -1
+ bne $t2, $zero, 1b
+ nop
+ jr $ra
+ nop
+
+fatal:
+ bal message
+ nop
+self:
+ b self
+ nop
+
+ /* Write CS5536 MSR.
+ In: $a0 address, $a1 lower word, $a2 upper word.
+ Out: None
+ Clobbered: $t0
+ */
+wrmsr:
+ lui $t0, %hi(GRUB_MACHINE_PCI_CONFSPACE)
+ sw $a0, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_CS5536_MSR_MAILBOX_ADDR) ($t0)
+ sw $a1, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_CS5536_MSR_MAILBOX_DATA0) ($t0)
+ jr $ra
+ sw $a2, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_CS5536_MSR_MAILBOX_DATA1) ($t0)
+
+ /* Wait for SMBus data or empty transmitter. */
+ /* In: $a0 = exception handler. Out: none. Clobbered: $t0, $t1 */
+smbus_wait:
+1:
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_STATUS + GRUB_MACHINE_PCI_IO_BASE)
+ lb $t0, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_STATUS + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+ andi $t1, $t0, GRUB_CS5536_SMB_REG_STATUS_SDAST
+ bne $t1, $zero, return
+ nop
+ andi $t1, $t0, (GRUB_CS5536_SMB_REG_STATUS_BER | GRUB_CS5536_SMB_REG_STATUS_NACK)
+ beq $t1, $zero, 1b
+ nop
+ jr $a0
+ nop
+return:
+ jr $ra
+ nop
+
+ /* Read SPD byte. In: $a0 byte, $a1 device. Out: $v0 read byte (0x100 on failure).
+ Clobbered: $t0, $t1, $t2, $t3, $a0. */
+read_spd:
+ move $t2, $a0
+ move $t3, $ra
+ lui $a0, %hi(read_spd_fail)
+ addiu $a0, $a0, %hi(read_spd_fail)
+
+ /* Send START. */
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
+ lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+ ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_START
+ bal smbus_wait
+ sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+
+ /* Send device address. */
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
+ sll $t1, $a1, 1
+ bal smbus_wait
+ sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+
+ /* Send ACK. */
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
+ lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+ ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_ACK
+ sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+
+ /* Send byte address. */
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
+ bal smbus_wait
+ sb $t2, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+
+ /* Send START. */
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
+ lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+ ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_START
+ bal smbus_wait
+ sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+
+ /* Send device address. */
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
+ sll $t1, $a1, 1
+ ori $t1, $t1, 1
+ bal smbus_wait
+ sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+
+ /* Send STOP. */
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
+ lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+ ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_STOP
+ bal smbus_wait
+ sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+
+ lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
+ lb $v0, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE) ($t0)
+ jr $t3
+ andi $v0, $v0, 0xff
+read_spd_fail:
+ jr $t3
+ ori $v0, $v0, 0x100
+
+notification_string: .asciz "GRUB "
+no_cs5536: .asciz "No CS5536 found.\n\r"
+cs5536_found: .asciz "CS5536 at "
+sm_failed: .asciz "SM transaction failed.\n\r"
+unhandled_tlb_refill: .asciz "Unhandled TLB refill.\n\r"
+unhandled_cache_error: .asciz "Unhandled cache error.\n\r"
+unhandled_exception: .asciz "Unhandled exception.\n\r"
+smbus_enabled: .asciz "SMBus controller enabled.\n\r"
+unimplemented_memory_type: .asciz "non-DDR2 memory isn't supported.\n\r"
+no_cas_latency: .asciz "Couldn't determine CAS latency.\n\r"
+cause: .asciz "Cause: "
+epc: .asciz "\n\rEPC: "
+badvaddr: .asciz "\n\rBadVaddr: "
+newline: .asciz "\n\r"
+return_msg: .asciz "\n\rReturn address: "
+caches_enabled: .asciz "Caches enabled\n\r"
+
+ .p2align 3
+
+regdump:
+ .quad 0x0100010000000101 /* 0 */
+ .quad 0x0100010100000000 /* 2 */
+ .quad 0x0101000001000000 /* 3 */
+ .quad 0x0100020200010101 /* 4 */
+ .quad 0x0a04030603050203 /* 6 */
+ .quad 0x0f0e040000010a0b /* 7 */
+ .quad 0x0000010200000102 /* 8 */
+ .quad 0x0000060c00000000 /* 9 */
+ .quad 0x2323233f3f1f0200 /* a */
+ .quad 0x5f7f232323232323 /* b */
+ .quad 0x002a3c0615000000 /* c */
+ .quad 0x002a002a002a002a /* d */
+ .quad 0x002a002a002a002a /* e */
+ .quad 0x00b40020006d0004 /* f */
+ .quad 0x070007ff00000087 /* 10 */
+ .quad 0x000000000016101f /* 11 */
+ .quad 0x001c000000000000 /* 12 */
+ .quad 0x28e1000200c8006b /* 13 */
+ .quad 0x0000204200c8002f /* 14 */
+ .quad 0x0000000000030d40 /* 15 */
+ .quad 0 /* 16 */
+ .quad 0 /* 17 */
+ .quad 0 /* 18 */
+ .quad 0 /* 19 */
+ .quad 0 /* 1a */
+ .quad 0 /* 1b */
+ .quad 0 /* 1c */
+
+ .p2align
+
+write_dumpreg:
+ ld $t2, 0($t6)
+ sd $t2, 0($t4)
+ addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
+ jr $ra
+ addiu $t6, $t6, GRUB_CPU_LOONGSON_DDR2_REG_SIZE
+
+continue:
+ lui $t4, %hi(GRUB_CPU_LOONGSON_DDR2_BASE)
+ addiu $t4, $t4, %lo(GRUB_CPU_LOONGSON_DDR2_BASE)
+ lui $t6, %hi(regdump)
+
+ /* 0 */
+ bal write_dumpreg
+ addiu $t6, $t6, %lo(regdump)
+
+ /* 1 */
+ ori $a1, $a1, GRUB_SMB_RAM_START_ADDR
+ move $t8, $zero
+ lui $t5, 0x0001
+ bal read_spd
+ ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_NUM_BANKS_ADDR
+ ori $t7, $zero, 8
+ bne $v0, $t7, 1f
+ ori $t5, $t5, 0x0001
+ ori $t8, $t8, GRUB_CPU_LOONGSON_DDR2_REG1_HI_8BANKS
+1:
+ dsll $t8, $t8, 32
+ or $t5, $t5, $t8
+ sd $t5, 0 ($t4)
+ addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
+
+ /* 2 */
+ bal write_dumpreg
+ nop
+
+ /* 3 */
+ bal write_dumpreg
+ nop
+
+ /* 4 */
+ bal write_dumpreg
+ nop
+
+ /* 5 */
+ /* FIXME: figure termination resistance. */
+ ori $t5, $zero, 0x2
+ bal read_spd
+ ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_NUM_ROWS_ADDR
+ /* $v0 = 15 - $v0. */
+ xori $v0, $v0, 0xf
+ andi $v0, $v0, 0x7
+ sll $v0, $v0, 8
+ or $t5, $t5, $v0
+
+ /* Find the fastest supported CAS latency. */
+ bal read_spd
+ ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_ADDR
+ ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_MIN_VALUE
+ ori $t1, $zero, (1 << GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_MIN_VALUE)
+2:
+ and $t2, $t1, $v0
+ bne $t2, $zero, 1f
+ ori $t3, $zero, 8
+ lui $a0, %hi(no_cas_latency)
+ beq $t0, $t3, fatal
+ addiu $a0, $a0, %lo(no_cas_latency)
+ addiu $t0, $t0, 1
+ b 2b
+ sll $t1, $t1, 1
+1:
+ sll $t0, $t0, 16
+ or $t5, $t5, $t0
+
+ bal read_spd
+ ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_NUM_COLUMNS_ADDR
+ /* $v0 = 15 - ($v0 + 1) = 14 - $v0. */
+ addiu $v0, $v0, 1
+ xori $v0, $v0, 0xf
+ andi $v0, $v0, 0x7
+ sll $v0, 24
+ or $t5, $t5, $v0
+ sd $t5, 0 ($t4)
+
+ addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
+
+ ori $t7, $zero, 0x16
+
+1:
+ ld $t2, 0($t6)
+ sd $t2, 0($t4)
+ addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
+ addiu $t7, $t7, -1
+ bne $t7, $zero, 1b
+ addiu $t6, $t6, GRUB_CPU_LOONGSON_DDR2_REG_SIZE
+
+ lui $t4, %hi(GRUB_CPU_LOONGSON_DDR2_BASE)
+ ld $t5, (%lo(GRUB_CPU_LOONGSON_DDR2_BASE) + 0x30) ($t4)
+ ori $t0, $zero, 1
+ dsll $t0, $t0, 40
+ or $t5, $t5, $t0
+ sd $t5, (%lo(GRUB_CPU_LOONGSON_DDR2_BASE) + 0x30) ($t4)
+
+ /* Desactivate DDR2 registers. */
+ lui $t0, %hi (GRUB_CPU_LOONGSON_CORECFG)
+ ld $t1, %lo (GRUB_CPU_LOONGSON_CORECFG) ($t0)
+ ori $t1, $t1, GRUB_CPU_LOONGSON_CORECFG_DISABLE_DDR2_SPACE
+ sd $t1, %lo (GRUB_CPU_LOONGSON_CORECFG) ($t0)
+
+ /* Enable cache. */
+ mfc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
+ addiu $t1, $zero, ~GRUB_CPU_LOONGSON_CACHE_TYPE_MASK
+ and $t0, $t1, $t1
+ /* Set line size to 32 bytes and disabled cache. */
+ ori $t0, $t0, (GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG_ILINESIZE \
+ | GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG_DLINESIZE \
+ | GRUB_CPU_LOONGSON_CACHE_ACCELERATED)
+ mtc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
+
+ /* Invalidate all I-cache entries. */
+ srl $t1, $t0, GRUB_CPU_LOONGSON_COP0_CACHE_ISIZE_SHIFT
+ andi $t1, $t1, GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_MASK
+ ori $t2, $zero, (1 << (GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_OFFSET \
+ - GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_BIG \
+ - GRUB_CPU_LOONGSON_I_CACHE_LOG_WAYS))
+ sll $t1, $t2, $t1
+ lui $t2, 0x8000
+
+1:
+ cache GRUB_CPU_LOONGSON_COP0_I_INDEX_INVALIDATE, 0($t2)
+ addiu $t1, $t1, -1
+ bne $t1, $zero, 1b
+ addiu $t2, $t2, (1 << GRUB_CPU_LOONGSON_COP0_I_INDEX_BIT_OFFSET)
+
+ /* Invalidate all D-cache entries. */
+ srl $t1, $t0, GRUB_CPU_LOONGSON_COP0_CACHE_DSIZE_SHIFT
+ andi $t1, $t1, GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_MASK
+ ori $t2, $zero, (1 << (GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_OFFSET \
+ - GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_BIG \
+ - GRUB_CPU_LOONGSON_D_CACHE_LOG_WAYS))
+ sll $t1, $t2, $t1
+ lui $t2, 0x8000
+ mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGLO
+ mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGHI
+1:
+ /* All four ways. */
+ cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 0($t2)
+ cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 1($t2)
+ cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 2($t2)
+ cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 3($t2)
+ addiu $t1, $t1, -1
+ bne $t1, $zero, 1b
+ addiu $t2, $t2, (1 << GRUB_CPU_LOONGSON_COP0_D_INDEX_BIT_OFFSET)
+
+ /* Invalidate all S-cache entries. */
+ ori $t1, $zero, (1 << (GRUB_CPU_LOONGSON_SECONDARY_CACHE_LOG_SIZE \
+ - GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_BIG \
+ - GRUB_CPU_LOONGSON_S_CACHE_LOG_WAYS))
+ lui $t2, 0x8000
+ mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGLO
+ mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGHI
+1:
+ /* All four ways. */
+ cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 0($t2)
+ cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 1($t2)
+ cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 2($t2)
+ cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 3($t2)
+ addiu $t1, $t1, -1
+ bne $t1, $zero, 1b
+ addiu $t2, $t2, (1 << GRUB_CPU_LOONGSON_COP0_D_INDEX_BIT_OFFSET)
+
+ /* Finally enable cache. */
+ mfc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
+ addiu $t1, $zero, ~GRUB_CPU_LOONGSON_CACHE_TYPE_MASK
+ and $t0, $t1, $t1
+ ori $t0, $t0, GRUB_CPU_LOONGSON_CACHE_CACHED
+ mtc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
+
+ lui $a0, %hi(caches_enabled)
+ bal message
+ addiu $a0, $a0, %lo(caches_enabled)
+
+ /* Set ROM delay cycles to 1. */
+ lui $t0, %hi(GRUB_CPU_LOONGSON_LIOCFG)
+ lw $t1, %lo(GRUB_CPU_LOONGSON_LIOCFG) ($t0)
+ addiu $t2, $zero, ~(GRUB_CPU_LOONGSON_ROM_DELAY_MASK \
+ << GRUB_CPU_LOONGSON_ROM_DELAY_OFFSET)
+ and $t1, $t1, $t2
+ ori $t1, $t1, (1 << GRUB_CPU_LOONGSON_ROM_DELAY_OFFSET)
+ sw $t1, %lo(GRUB_CPU_LOONGSON_LIOCFG) ($t0)
+
+ addiu $a0, $zero, -1
+ addiu $a1, $zero, -1
+
+ /* Take advantage of cache. */
+ lui $t0, %hi(cached_continue - 0x20000000)
+ addiu $t0, $t0, %lo(cached_continue - 0x20000000)
+ jr $t0
+ addiu $a2, $zero, -1
+
+cached_continue: \ No newline at end of file
diff --git a/grub-core/boot/sparc64/ieee1275/boot.S b/grub-core/boot/sparc64/ieee1275/boot.S
new file mode 100644
index 0000000..f08258f
--- /dev/null
+++ b/grub-core/boot/sparc64/ieee1275/boot.S
@@ -0,0 +1,209 @@
+/* -*-Asm-*- */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/boot.h>
+#include <grub/machine/boot.h>
+
+ .text
+ .align 4
+ .globl _start
+_start:
+ /* OF CIF entry point arrives in %o4 */
+pic_base:
+ call boot_continue
+ mov %o4, CIF_REG
+
+ . = _start + GRUB_BOOT_MACHINE_VER_MAJ
+boot_version: .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
+
+ /* The offsets to these locations are defined by the
+ * GRUB_BOOT_MACHINE_foo macros in include/grub/sparc/ieee1275/boot.h,
+ * and grub-setup uses this to patch these next three values as needed.
+ *
+ * The boot_path will be the OF device path of the partition where the
+ * rest of the GRUB kernel image resides. kernel_sector will be set to
+ * the location of the first block of the GRUB kernel, and
+ * kernel_address is the location where we should load that first block.
+ *
+ * After loading in that block we will execute it by jumping to the
+ * load address plus the size of the prepended A.OUT header (32 bytes).
+ */
+boot_path:
+ . = _start + GRUB_BOOT_MACHINE_KERNEL_BYTE
+boot_path_end:
+kernel_byte: .xword (2 << 9)
+kernel_address: .word GRUB_BOOT_MACHINE_KERNEL_ADDR
+
+prom_finddev_name: .asciz "finddevice"
+prom_chosen_path: .asciz "/chosen"
+prom_getprop_name: .asciz "getprop"
+prom_stdout_name: .asciz "stdout"
+prom_write_name: .asciz "write"
+prom_bootpath_name: .asciz "bootpath"
+prom_open_name: .asciz "open"
+prom_seek_name: .asciz "seek"
+prom_read_name: .asciz "read"
+prom_exit_name: .asciz "exit"
+grub_name: .asciz "GRUB "
+#define GRUB_NAME_LEN 5
+
+ .align 4
+
+prom_open_error:
+ GET_ABS(prom_open_name, %o2)
+ call console_write
+ mov 4, %o3
+ /* fallthru */
+
+prom_error:
+ GET_ABS(prom_exit_name, %o0)
+ /* fallthru */
+
+ /* %o0: OF call name
+ * %o1: input arg 1
+ */
+prom_call_1_1_o2:
+ clr %o2
+ ba prom_call_x_1
+ mov 1, %g1
+
+prom_call_getprop:
+ mov 4, %g1
+ stx %g1, [%l1 + 256]
+ mov CHOSEN_NODE_REG, %o1
+ ba prom_call_x_1
+ GET_ABS(prom_getprop_name, %o0)
+
+prom_call_3_1_o1:
+ ba prom_call_3_1
+ mov BOOTDEV_REG, %o1
+
+
+ /* %o2: message string
+ * %o3: message length
+ */
+console_write:
+ GET_ABS(prom_write_name, %o0)
+ mov STDOUT_NODE_REG, %o1
+ /* fallthru */
+
+ /* %o0: OF call name
+ * %o1: input arg 1
+ * %o2: input arg 2
+ * %o3: input arg 3
+ */
+prom_call_3_1:
+ mov 3, %g1
+prom_call_x_1:
+ mov 1, %o5
+ /* fallthru */
+
+ /* %o0: OF call name
+ * %g1: num inputs
+ * %o5: num outputs
+ * %o1-%o4: inputs
+ */
+prom_call:
+ stx %o0, [%l1 + 0x00]
+ stx %g1, [%l1 + 0x08]
+ stx %o5, [%l1 + 0x10]
+ stx %o1, [%l1 + 0x18]
+ stx %o2, [%l1 + 0x20]
+ stx %o3, [%l1 + 0x28]
+ stx %o4, [%l1 + 0x30]
+ jmpl CIF_REG, %g0
+ mov %l1, %o0
+
+boot_continue:
+ mov %o7, PIC_REG /* PIC base */
+ sethi %hi(SCRATCH_PAD_BOOT), %l1 /* OF argument slots */
+
+ /* Find the /chosen node so we can fetch the stdout handle,
+ * and thus perform console output.
+ *
+ * chosen_node = prom_finddevice("/chosen")
+ */
+ GET_ABS(prom_finddev_name, %o0)
+ call prom_call_1_1_o2
+ GET_ABS(prom_chosen_path, %o1)
+
+ ldx [%l1 + 0x20], CHOSEN_NODE_REG
+ brz CHOSEN_NODE_REG, prom_error
+
+ /* getprop(chosen_node, "stdout", &buffer, buffer_size) */
+ GET_ABS(prom_stdout_name, %o2)
+ add %l1, 256, %o3
+ call prom_call_getprop
+ mov 1024, %o4
+
+ lduw [%l1 + 256], STDOUT_NODE_REG
+ brz,pn STDOUT_NODE_REG, prom_error
+
+ /* write(stdout_node, "GRUB ", strlen("GRUB ")) */
+ GET_ABS(grub_name, %o2)
+ call console_write
+ mov GRUB_NAME_LEN, %o3
+
+ GET_ABS(boot_path, %o3)
+ ldub [%o3], %o1
+ brnz,pn %o1, bootpath_known
+
+ /* getprop(chosen_node, "bootpath", &buffer, buffer_size) */
+ GET_ABS(prom_bootpath_name, %o2)
+ call prom_call_getprop
+ mov (boot_path_end - boot_path), %o4
+
+bootpath_known:
+
+ /* Open up the boot_path, and use that handle to read the
+ * first block of the GRUB kernel image.
+ *
+ * bootdev_handle = open(boot_path)
+ */
+ GET_ABS(prom_open_name, %o0)
+ call prom_call_1_1_o2
+ GET_ABS(boot_path, %o1)
+
+ ldx [%l1 + 0x20], BOOTDEV_REG
+ brz,pn BOOTDEV_REG, prom_open_error
+
+ /* Since we have 64-bit cells, the high cell of the seek offset
+ * is zero and the low cell is the entire value.
+ *
+ * seek(bootdev, 0, *kernel_byte)
+ */
+ GET_ABS(prom_seek_name, %o0)
+ clr %o2
+ call prom_call_3_1_o1
+ LDX_ABS(kernel_byte, 0x00, %o3)
+
+ /* read(bootdev, *kernel_address, 512) */
+ GET_ABS(prom_read_name, %o0)
+ LDUW_ABS(kernel_address, 0x00, %o2)
+ call prom_call_3_1_o1
+ mov 512, %o3
+
+ LDUW_ABS(kernel_address, 0x00, %o2)
+ jmpl %o2, %o7
+ nop
+
+ . = _start + GRUB_BOOT_MACHINE_CODE_END
+
+/* the last 4 bytes in the sector 0 contain the signature */
+ .word GRUB_BOOT_MACHINE_SIGNATURE
diff --git a/grub-core/boot/sparc64/ieee1275/diskboot.S b/grub-core/boot/sparc64/ieee1275/diskboot.S
new file mode 100644
index 0000000..83dfee0
--- /dev/null
+++ b/grub-core/boot/sparc64/ieee1275/diskboot.S
@@ -0,0 +1,146 @@
+/* -*-Asm-*- */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/boot.h>
+#include <grub/machine/boot.h>
+#include <grub/offsets.h>
+
+ .text
+ .align 4
+ .globl _start
+_start:
+ /* First stage boot block jumps to us here. */
+pic_base:
+ call after_info_block
+ mov %o7, PIC_REG
+
+prom_write_name: .asciz "write"
+prom_seek_name: .asciz "seek"
+prom_read_name: .asciz "read"
+prom_close_name: .asciz "close"
+
+notification_string: .asciz "Loading kernel"
+#define NOTIFICATION_STRING_LEN 14
+
+notification_step: .asciz "."
+#define NOTIFICATION_STEP_LEN 1
+
+notification_done: .asciz "\r\n"
+#define NOTIFICATION_DONE_LEN 2
+
+ .align 4
+
+ /* %o2: message string
+ * %o3: message length
+ */
+console_write:
+ GET_ABS(prom_write_name, %o0)
+ mov STDOUT_NODE_REG, %o1
+ /* fallthru */
+
+ /* %o0: OF call name
+ * %o1: input arg 1
+ * %o2: input arg 2
+ * %o3: input arg 3
+ */
+prom_call_3_1:
+ mov 3, %g1
+ mov 1, %o5
+ /* fallthru */
+
+ /* %o0: OF call name
+ * %g1: num inputs
+ * %o5: num outputs
+ * %o1-%o4: inputs
+ */
+prom_call:
+ stx %o0, [%l1 + 0x00]
+ stx %g1, [%l1 + 0x08]
+ stx %o5, [%l1 + 0x10]
+ stx %o1, [%l1 + 0x18]
+ stx %o2, [%l1 + 0x20]
+ stx %o3, [%l1 + 0x28]
+ stx %o4, [%l1 + 0x30]
+ jmpl CIF_REG, %g0
+ mov %l1, %o0
+
+
+after_info_block:
+ sethi %hi(SCRATCH_PAD_DISKBOOT), %l1 /* OF argument slots */
+
+ GET_ABS(notification_string, %o2)
+ call console_write
+ mov NOTIFICATION_STRING_LEN, %o3
+
+ GET_ABS(firstlist - GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE, %l2)
+ set GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS, %l3
+bootloop:
+ lduw [%l2 + 0x08], %o0
+ brz %o0, bootit
+ lduw [%l2 + 0x00], %o3
+ sllx %o3, 32, %o3
+ lduw [%l2 + 0x04], %o4
+ or %o3, %o4, %o3
+ GET_ABS(prom_seek_name, %o0)
+ mov BOOTDEV_REG, %o1
+ clr %o2
+ call prom_call_3_1
+ sllx %o3, 9, %o3
+
+ GET_ABS(prom_read_name, %o0)
+ mov BOOTDEV_REG, %o1
+ lduw [%l2 + 0x08], %o3
+ sllx %o3, 9, %o3
+ mov %l3, %o2
+ call prom_call_3_1
+ add %l3, %o3, %l3
+
+ GET_ABS(notification_step, %o2)
+ call console_write
+ mov NOTIFICATION_STEP_LEN, %o3
+
+ ba bootloop
+ sub %l2, GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE, %l2
+
+bootit:
+ GET_ABS(prom_close_name, %o0)
+ mov 1, %g1
+ mov 0, %o5
+ call prom_call
+ mov BOOTDEV_REG, %o1
+
+ GET_ABS(notification_done, %o2)
+ call console_write
+ mov NOTIFICATION_DONE_LEN, %o3
+ sethi %hi(GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS), %o2
+ jmpl %o2 + %lo(GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS), %o7
+ mov CIF_REG, %o4
+1: ba,a 1b
+
+lastlist:
+ .word 0
+ .word 0
+
+ . = _start + (0x200 - GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE)
+blocklist_default_start:
+ .word 0
+ .word 2
+blocklist_default_len:
+ .word 0
+firstlist:
diff --git a/grub-core/bus/bonito.c b/grub-core/bus/bonito.c
new file mode 100644
index 0000000..c2e0cd6
--- /dev/null
+++ b/grub-core/bus/bonito.c
@@ -0,0 +1,90 @@
+/* bonito.c - PCI bonito interface. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/pci.h>
+#include <grub/misc.h>
+
+static grub_uint32_t base_win[GRUB_MACHINE_PCI_NUM_WIN];
+static const grub_size_t sizes_win[GRUB_MACHINE_PCI_NUM_WIN] =
+ {GRUB_MACHINE_PCI_WIN1_SIZE, GRUB_MACHINE_PCI_WIN_SIZE,
+ GRUB_MACHINE_PCI_WIN_SIZE};
+/* Usage counters. */
+static int usage_win[GRUB_MACHINE_PCI_NUM_WIN];
+static grub_addr_t addr_win[GRUB_MACHINE_PCI_NUM_WIN] =
+ {GRUB_MACHINE_PCI_WIN1_ADDR, GRUB_MACHINE_PCI_WIN2_ADDR,
+ GRUB_MACHINE_PCI_WIN3_ADDR};
+
+static inline void
+write_bases (void)
+{
+ int i;
+ grub_uint32_t reg = 0;
+ for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
+ reg |= (((base_win[i] >> GRUB_MACHINE_PCI_WIN_SHIFT)
+ & GRUB_MACHINE_PCI_WIN_MASK)
+ << (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE));
+ GRUB_MACHINE_PCI_IO_CTRL_REG = reg;
+}
+
+volatile void *
+grub_pci_device_map_range (grub_pci_device_t dev __attribute__ ((unused)),
+ grub_addr_t base, grub_size_t size)
+{
+ int i;
+ grub_addr_t newbase;
+
+ /* First try already used registers. */
+ for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
+ if (usage_win[i] && base_win[i] <= base
+ && base_win[i] + sizes_win[i] > base + size)
+ {
+ usage_win[i]++;
+ return (void *)
+ (addr_win[i] | (base & GRUB_MACHINE_PCI_WIN_OFFSET_MASK));
+ }
+ /* Map new register. */
+ newbase = base & ~GRUB_MACHINE_PCI_WIN_OFFSET_MASK;
+ for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
+ if (!usage_win[i] && newbase <= base
+ && newbase + sizes_win[i] > base + size)
+ {
+ usage_win[i]++;
+ base_win[i] = newbase;
+ write_bases ();
+ return (void *)
+ (addr_win[i] | (base & GRUB_MACHINE_PCI_WIN_OFFSET_MASK));
+ }
+ grub_fatal ("Out of PCI windows.");
+}
+
+void
+grub_pci_device_unmap_range (grub_pci_device_t dev __attribute__ ((unused)),
+ volatile void *mem __attribute__ ((unused)),
+ grub_size_t size __attribute__ ((unused)))
+{
+ int i;
+ for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
+ if (usage_win[i] && addr_win[i]
+ == (((grub_addr_t) mem) & ~GRUB_MACHINE_PCI_WIN_OFFSET_MASK))
+ {
+ usage_win[i]--;
+ return;
+ }
+ grub_fatal ("Tried to unmap not mapped region");
+}
diff --git a/grub-core/bus/cs5536.c b/grub-core/bus/cs5536.c
new file mode 100644
index 0000000..fbcb83c
--- /dev/null
+++ b/grub-core/bus/cs5536.c
@@ -0,0 +1,384 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/cs5536.h>
+#include <grub/pci.h>
+#include <grub/time.h>
+#include <grub/ata.h>
+
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+int
+grub_cs5536_find (grub_pci_device_t *devp)
+{
+ int found = 0;
+ auto int NESTED_FUNC_ATTR hook (grub_pci_device_t dev,
+ grub_pci_id_t pciid);
+
+ int NESTED_FUNC_ATTR hook (grub_pci_device_t dev,
+ grub_pci_id_t pciid)
+ {
+ if (pciid == GRUB_CS5536_PCIID)
+ {
+ *devp = dev;
+ found = 1;
+ return 1;
+ }
+ return 0;
+ }
+
+ grub_pci_iterate (hook);
+
+ return found;
+}
+
+grub_uint64_t
+grub_cs5536_read_msr (grub_pci_device_t dev, grub_uint32_t addr)
+{
+ grub_uint64_t ret = 0;
+ grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_ADDR),
+ addr);
+ ret = (grub_uint64_t)
+ grub_pci_read (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_DATA0));
+ ret |= (((grub_uint64_t)
+ grub_pci_read (grub_pci_make_address (dev,
+ GRUB_CS5536_MSR_MAILBOX_DATA1)))
+ << 32);
+ return ret;
+}
+
+void
+grub_cs5536_write_msr (grub_pci_device_t dev, grub_uint32_t addr,
+ grub_uint64_t val)
+{
+ grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_ADDR),
+ addr);
+ grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_DATA0),
+ val & 0xffffffff);
+ grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_DATA1),
+ val >> 32);
+}
+
+grub_err_t
+grub_cs5536_smbus_wait (grub_port_t smbbase)
+{
+ grub_uint64_t start = grub_get_time_ms ();
+ while (1)
+ {
+ grub_uint8_t status;
+ status = grub_inb (smbbase + GRUB_CS5536_SMB_REG_STATUS);
+ if (status & GRUB_CS5536_SMB_REG_STATUS_SDAST)
+ return GRUB_ERR_NONE;
+ if (status & GRUB_CS5536_SMB_REG_STATUS_BER)
+ return grub_error (GRUB_ERR_IO, "SM bus error");
+ if (status & GRUB_CS5536_SMB_REG_STATUS_NACK)
+ return grub_error (GRUB_ERR_IO, "NACK received");
+ if (grub_get_time_ms () > start + 40)
+ return grub_error (GRUB_ERR_IO, "SM stalled");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_cs5536_read_spd_byte (grub_port_t smbbase, grub_uint8_t dev,
+ grub_uint8_t addr, grub_uint8_t *res)
+{
+ grub_err_t err;
+
+ /* Send START. */
+ grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
+ | GRUB_CS5536_SMB_REG_CTRL1_START,
+ smbbase + GRUB_CS5536_SMB_REG_CTRL1);
+
+ /* Send device address. */
+ err = grub_cs5536_smbus_wait (smbbase);
+ if (err)
+ return err;
+ grub_outb (dev << 1, smbbase + GRUB_CS5536_SMB_REG_DATA);
+
+ /* Send ACK. */
+ err = grub_cs5536_smbus_wait (smbbase);
+ if (err)
+ return err;
+ grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
+ | GRUB_CS5536_SMB_REG_CTRL1_ACK,
+ smbbase + GRUB_CS5536_SMB_REG_CTRL1);
+
+ /* Send byte address. */
+ grub_outb (addr, smbbase + GRUB_CS5536_SMB_REG_DATA);
+
+ /* Send START. */
+ err = grub_cs5536_smbus_wait (smbbase);
+ if (err)
+ return err;
+ grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
+ | GRUB_CS5536_SMB_REG_CTRL1_START,
+ smbbase + GRUB_CS5536_SMB_REG_CTRL1);
+
+ /* Send device address. */
+ err = grub_cs5536_smbus_wait (smbbase);
+ if (err)
+ return err;
+ grub_outb ((dev << 1) | 1, smbbase + GRUB_CS5536_SMB_REG_DATA);
+
+ /* Send STOP. */
+ err = grub_cs5536_smbus_wait (smbbase);
+ if (err)
+ return err;
+ grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
+ | GRUB_CS5536_SMB_REG_CTRL1_STOP,
+ smbbase + GRUB_CS5536_SMB_REG_CTRL1);
+
+ err = grub_cs5536_smbus_wait (smbbase);
+ if (err)
+ return err;
+ *res = grub_inb (smbbase + GRUB_CS5536_SMB_REG_DATA);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_cs5536_init_smbus (grub_pci_device_t dev, grub_uint16_t divisor,
+ grub_port_t *smbbase)
+{
+ grub_uint64_t smbbar;
+
+ smbbar = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_SMB_BAR);
+
+ /* FIXME */
+ if (!(smbbar & GRUB_CS5536_LBAR_ENABLE))
+ return grub_error(GRUB_ERR_IO, "SMB controller not enabled\n");
+ *smbbase = (smbbar & GRUB_CS5536_LBAR_ADDR_MASK) + GRUB_MACHINE_PCI_IO_BASE;
+
+ if (divisor < 8)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid divisor");
+
+ /* Disable SMB. */
+ grub_outb (0, *smbbase + GRUB_CS5536_SMB_REG_CTRL2);
+
+ /* Disable interrupts. */
+ grub_outb (0, *smbbase + GRUB_CS5536_SMB_REG_CTRL1);
+
+ /* Set as master. */
+ grub_outb (GRUB_CS5536_SMB_REG_ADDR_MASTER,
+ *smbbase + GRUB_CS5536_SMB_REG_ADDR);
+
+ /* Launch. */
+ grub_outb (((divisor >> 7) & 0xff), *smbbase + GRUB_CS5536_SMB_REG_CTRL3);
+ grub_outb (((divisor << 1) & 0xfe) | GRUB_CS5536_SMB_REG_CTRL2_ENABLE,
+ *smbbase + GRUB_CS5536_SMB_REG_CTRL2);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_cs5536_read_spd (grub_port_t smbbase, grub_uint8_t dev,
+ struct grub_smbus_spd *res)
+{
+ grub_err_t err;
+ grub_size_t size;
+ grub_uint8_t b;
+ grub_size_t ptr;
+
+ err = grub_cs5536_read_spd_byte (smbbase, dev, 0, &b);
+ if (err)
+ return err;
+ if (b == 0)
+ return grub_error (GRUB_ERR_IO, "no SPD found");
+ size = b;
+
+ ((grub_uint8_t *) res)[0] = b;
+ for (ptr = 1; ptr < size; ptr++)
+ {
+ err = grub_cs5536_read_spd_byte (smbbase, dev, ptr,
+ &((grub_uint8_t *) res)[ptr]);
+ if (err)
+ return err;
+ }
+ return GRUB_ERR_NONE;
+}
+
+/* Dump of GPIO connections. FIXME: Remove useless and macroify. */
+static grub_uint32_t gpiodump[] = {
+ 0xffff0000, 0x2ffdd002, 0xffff0000, 0xffff0000,
+ 0x2fffd000, 0xffff0000, 0x1000efff, 0xefff1000,
+ 0x3ffbc004, 0xffff0000, 0xffff0000, 0xffff0000,
+ 0x3ffbc004, 0x3ffbc004, 0xffff0000, 0x00000000,
+ 0xffff0000, 0xffff0000, 0x3ffbc004, 0x3f9bc064,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000,
+ 0xffff0000, 0xffff0000, 0x0000ffff, 0xffff0000,
+ 0xefff1000, 0xffff0000, 0xffff0000, 0xffff0000,
+ 0xefff1000, 0xefff1000, 0xffff0000, 0x00000000,
+ 0xffff0000, 0xffff0000, 0xefff1000, 0xffff0000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x50000000, 0x00000000, 0x00000000,
+};
+
+static inline void
+set_io_space (grub_pci_device_t dev, int num, grub_uint16_t start,
+ grub_uint16_t len)
+{
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_REGIONS_START + num,
+ ((((grub_uint64_t) start + len - 4)
+ << GRUB_CS5536_MSR_GL_REGION_IO_TOP_SHIFT)
+ & GRUB_CS5536_MSR_GL_REGION_TOP_MASK)
+ | (((grub_uint64_t) start
+ << GRUB_CS5536_MSR_GL_REGION_IO_BASE_SHIFT)
+ & GRUB_CS5536_MSR_GL_REGION_BASE_MASK)
+ | GRUB_CS5536_MSR_GL_REGION_IO
+ | GRUB_CS5536_MSR_GL_REGION_ENABLE);
+}
+
+static inline void
+set_iod (grub_pci_device_t dev, int num, int dest, int start, int mask)
+{
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_IOD_START + num,
+ ((grub_uint64_t) dest << GRUB_CS5536_IOD_DEST_SHIFT)
+ | (((grub_uint64_t) start & GRUB_CS5536_IOD_ADDR_MASK)
+ << GRUB_CS5536_IOD_BASE_SHIFT)
+ | ((mask & GRUB_CS5536_IOD_ADDR_MASK)
+ << GRUB_CS5536_IOD_MASK_SHIFT));
+}
+
+static inline void
+set_p2d (grub_pci_device_t dev, int num, int dest, grub_uint32_t start)
+{
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_P2D_START + num,
+ (((grub_uint64_t) dest) << GRUB_CS5536_P2D_DEST_SHIFT)
+ | ((grub_uint64_t) (start >> GRUB_CS5536_P2D_LOG_ALIGN)
+ << GRUB_CS5536_P2D_BASE_SHIFT)
+ | (((1 << (32 - GRUB_CS5536_P2D_LOG_ALIGN)) - 1)
+ << GRUB_CS5536_P2D_MASK_SHIFT));
+}
+
+void
+grub_cs5536_init_geode (grub_pci_device_t dev)
+{
+ int i;
+
+ /* Make sure GPIO is where we expect it to be. */
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GPIO_BAR,
+ GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_GPIO);
+
+ /* Setup GPIO. */
+ for (i = 0; i < (int) ARRAY_SIZE (gpiodump); i++)
+ ((volatile grub_uint32_t *) (GRUB_MACHINE_PCI_IO_BASE
+ + GRUB_CS5536_LBAR_GPIO)) [i] = gpiodump[i];
+
+ /* Enable more BARs. */
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IRQ_MAP_BAR,
+ GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_IRQ_MAP);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_MFGPT_BAR,
+ GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_MFGPT);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_ACPI_BAR,
+ GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_ACPI);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_PM_BAR,
+ GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_PM);
+
+ /* Setup DIVIL. */
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LEG_IO,
+ GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86
+ | GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP
+ | GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0
+ | GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_PRIMARY_MASK,
+ (~GRUB_CS5536_DIVIL_LPC_INTERRUPTS) & 0xffff);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_LPC_MASK,
+ GRUB_CS5536_DIVIL_LPC_INTERRUPTS);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LPC_SERIAL_IRQ_CONTROL,
+ GRUB_CS5536_MSR_DIVIL_LPC_SERIAL_IRQ_CONTROL_ENABLE);
+
+ /* Initialise USB controller. */
+ /* FIXME: assign adresses dynamically. */
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_OHCI_BASE,
+ GRUB_CS5536_MSR_USB_BASE_BUS_MASTER
+ | GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE
+ | 0x05024000);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE,
+ GRUB_CS5536_MSR_USB_BASE_BUS_MASTER
+ | GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE
+ | (0x20ULL << GRUB_CS5536_MSR_USB_EHCI_BASE_FLDJ_SHIFT)
+ | 0x05023000);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_CONTROLLER_BASE,
+ GRUB_CS5536_MSR_USB_BASE_BUS_MASTER
+ | GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE | 0x05020000);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_OPTION_CONTROLLER_BASE,
+ GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE | 0x05022000);
+ set_p2d (dev, 0, GRUB_CS5536_DESTINATION_USB, 0x05020000);
+ set_p2d (dev, 1, GRUB_CS5536_DESTINATION_USB, 0x05022000);
+ set_p2d (dev, 5, GRUB_CS5536_DESTINATION_USB, 0x05024000);
+ set_p2d (dev, 6, GRUB_CS5536_DESTINATION_USB, 0x05023000);
+
+ {
+ volatile grub_uint32_t *oc;
+ oc = grub_pci_device_map_range (dev, 0x05022000,
+ GRUB_CS5536_USB_OPTION_REGS_SIZE);
+
+ oc[GRUB_CS5536_USB_OPTION_REG_UOCMUX] =
+ (oc[GRUB_CS5536_USB_OPTION_REG_UOCMUX]
+ & ~GRUB_CS5536_USB_OPTION_REG_UOCMUX_PMUX_MASK)
+ | GRUB_CS5536_USB_OPTION_REG_UOCMUX_PMUX_HC;
+ grub_pci_device_unmap_range (dev, oc, GRUB_CS5536_USB_OPTION_REGS_SIZE);
+ }
+
+ /* Setup IDE controller. */
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_IO_BAR,
+ GRUB_CS5536_LBAR_IDE
+ | GRUB_CS5536_MSR_IDE_IO_BAR_UNITS);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_CFG,
+ GRUB_CS5536_MSR_IDE_CFG_CHANNEL_ENABLE);
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_TIMING,
+ (GRUB_CS5536_MSR_IDE_TIMING_PIO0
+ << GRUB_CS5536_MSR_IDE_TIMING_DRIVE0_SHIFT)
+ | (GRUB_CS5536_MSR_IDE_TIMING_PIO0
+ << GRUB_CS5536_MSR_IDE_TIMING_DRIVE1_SHIFT));
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_CAS_TIMING,
+ (GRUB_CS5536_MSR_IDE_CAS_TIMING_CMD_PIO0
+ << GRUB_CS5536_MSR_IDE_CAS_TIMING_CMD_SHIFT)
+ | (GRUB_CS5536_MSR_IDE_CAS_TIMING_PIO0
+ << GRUB_CS5536_MSR_IDE_CAS_TIMING_DRIVE0_SHIFT)
+ | (GRUB_CS5536_MSR_IDE_CAS_TIMING_PIO0
+ << GRUB_CS5536_MSR_IDE_CAS_TIMING_DRIVE1_SHIFT));
+
+ /* Setup Geodelink PCI. */
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_PCI_CTRL,
+ (4ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_OUT_THR_SHIFT)
+ | (4ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_IN_THR_SHIFT)
+ | (8ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_LATENCY_SHIFT)
+ | GRUB_CS5536_MSR_GL_PCI_CTRL_IO_ENABLE
+ | GRUB_CS5536_MSR_GL_PCI_CTRL_MEMORY_ENABLE);
+
+ /* Setup windows. */
+ set_io_space (dev, 0, GRUB_CS5536_LBAR_SMBUS, GRUB_CS5536_SMBUS_REGS_SIZE);
+ set_io_space (dev, 1, GRUB_CS5536_LBAR_GPIO, GRUB_CS5536_GPIO_REGS_SIZE);
+ set_io_space (dev, 2, GRUB_CS5536_LBAR_MFGPT, GRUB_CS5536_MFGPT_REGS_SIZE);
+ set_io_space (dev, 3, GRUB_CS5536_LBAR_IRQ_MAP, GRUB_CS5536_IRQ_MAP_REGS_SIZE);
+ set_io_space (dev, 4, GRUB_CS5536_LBAR_PM, GRUB_CS5536_PM_REGS_SIZE);
+ set_io_space (dev, 5, GRUB_CS5536_LBAR_ACPI, GRUB_CS5536_ACPI_REGS_SIZE);
+ set_iod (dev, 0, GRUB_CS5536_DESTINATION_IDE, GRUB_ATA_CH0_PORT1, 0xffff8);
+ set_iod (dev, 1, GRUB_CS5536_DESTINATION_ACC, GRUB_CS5536_LBAR_ACC, 0xfff80);
+ set_iod (dev, 2, GRUB_CS5536_DESTINATION_IDE, GRUB_CS5536_LBAR_IDE, 0xffff0);
+}
diff --git a/grub-core/bus/emu/pci.c b/grub-core/bus/emu/pci.c
new file mode 100644
index 0000000..d1beb56
--- /dev/null
+++ b/grub-core/bus/emu/pci.c
@@ -0,0 +1,77 @@
+/* pci.c - Generic PCI interfaces. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/pci.h>
+#include <grub/dl.h>
+#include <grub/emu/misc.h>
+#include <grub/util/misc.h>
+
+grub_pci_address_t
+grub_pci_make_address (grub_pci_device_t dev, int reg)
+{
+ grub_pci_address_t ret;
+ ret.dev = dev;
+ ret.pos = reg;
+ return ret;
+}
+
+void
+grub_pci_iterate (grub_pci_iteratefunc_t hook)
+{
+ struct pci_device_iterator *iter;
+ struct pci_slot_match slot;
+ struct pci_device *dev;
+ slot.domain = PCI_MATCH_ANY;
+ slot.bus = PCI_MATCH_ANY;
+ slot.dev = PCI_MATCH_ANY;
+ slot.func = PCI_MATCH_ANY;
+ iter = pci_slot_match_iterator_create (&slot);
+ while ((dev = pci_device_next (iter)))
+ hook (dev, dev->vendor_id | (dev->device_id << 16));
+ pci_iterator_destroy (iter);
+}
+
+void *
+grub_pci_device_map_range (grub_pci_device_t dev, grub_addr_t base,
+ grub_size_t size)
+{
+ void *addr;
+ int err;
+ err = pci_device_map_range (dev, base, size, PCI_DEV_MAP_FLAG_WRITABLE, &addr);
+ if (err)
+ grub_util_error ("mapping 0x%x failed (error %d)\n", base, err);
+ return addr;
+}
+
+void
+grub_pci_device_unmap_range (grub_pci_device_t dev, void *mem,
+ grub_size_t size)
+{
+ pci_device_unmap_range (dev, mem, size);
+}
+
+GRUB_MOD_INIT (pci)
+{
+ pci_system_init ();
+}
+
+GRUB_MOD_FINI (pci)
+{
+ pci_system_cleanup ();
+}
diff --git a/grub-core/bus/pci.c b/grub-core/bus/pci.c
new file mode 100644
index 0000000..766b6d7
--- /dev/null
+++ b/grub-core/bus/pci.c
@@ -0,0 +1,137 @@
+/* pci.c - Generic PCI interfaces. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/pci.h>
+#include <grub/mm.h>
+#include <grub/mm_private.h>
+#include <grub/cache.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* FIXME: correctly support 64-bit architectures. */
+/* #if GRUB_TARGET_SIZEOF_VOID_P == 4 */
+struct grub_pci_dma_chunk *
+grub_memalign_dma32 (grub_size_t align, grub_size_t size)
+{
+ void *ret = grub_memalign (align, size);
+ if (!ret)
+ return 0;
+ grub_arch_sync_dma_caches (ret, size);
+ return ret;
+}
+
+/* FIXME: evil. */
+void
+grub_dma_free (struct grub_pci_dma_chunk *ch)
+{
+ grub_size_t size = (((struct grub_mm_header *) ch) - 1)->size * GRUB_MM_ALIGN;
+ grub_arch_sync_dma_caches (ch, size);
+ grub_free (ch);
+}
+/* #endif */
+
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+volatile void *
+grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
+{
+ return (void *) ((((grub_uint32_t) ch) & 0x1fffffff) | 0xa0000000);
+}
+
+grub_uint32_t
+grub_dma_get_phys (struct grub_pci_dma_chunk *ch)
+{
+ return (((grub_uint32_t) ch) & 0x1fffffff) | 0x80000000;
+}
+#else
+
+volatile void *
+grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
+{
+ return (void *) ch;
+}
+
+grub_uint32_t
+grub_dma_get_phys (struct grub_pci_dma_chunk *ch)
+{
+ return (grub_uint32_t) (grub_addr_t) ch;
+}
+
+#endif
+
+grub_pci_address_t
+grub_pci_make_address (grub_pci_device_t dev, int reg)
+{
+ return (1 << 31) | (dev.bus << 16) | (dev.device << 11)
+ | (dev.function << 8) | reg;
+}
+
+void
+grub_pci_iterate (grub_pci_iteratefunc_t hook)
+{
+ grub_pci_device_t dev;
+ grub_pci_address_t addr;
+ grub_pci_id_t id;
+ grub_uint32_t hdr;
+
+ for (dev.bus = 0; dev.bus < GRUB_PCI_NUM_BUS; dev.bus++)
+ {
+ for (dev.device = 0; dev.device < GRUB_PCI_NUM_DEVICES; dev.device++)
+ {
+ for (dev.function = 0; dev.function < 8; dev.function++)
+ {
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_PCI_ID);
+ id = grub_pci_read (addr);
+
+ /* Check if there is a device present. */
+ if (id >> 16 == 0xFFFF)
+ {
+ if (dev.function == 0)
+ /* Devices are required to implement function 0, so if
+ it's missing then there is no device here. */
+ break;
+ else
+ continue;
+ }
+
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+ /* Skip ghosts. */
+ if (id == GRUB_YEELOONG_OHCI_PCIID
+ && dev.function == GRUB_YEELOONG_OHCI_GHOST_FUNCTION)
+ continue;
+ if (id == GRUB_YEELOONG_EHCI_PCIID
+ && dev.function == GRUB_YEELOONG_EHCI_GHOST_FUNCTION)
+ continue;
+#endif
+
+ if (hook (dev, id))
+ return;
+
+ /* Probe only func = 0 if the device if not multifunction */
+ if (dev.function == 0)
+ {
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CACHELINE);
+ hdr = grub_pci_read (addr);
+ if (!(hdr & 0x800000))
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/grub-core/bus/usb/emu/usb.c b/grub-core/bus/usb/emu/usb.c
new file mode 100644
index 0000000..38c5f01
--- /dev/null
+++ b/grub-core/bus/usb/emu/usb.c
@@ -0,0 +1,203 @@
+/* usb.c -- libusb USB support for GRUB. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <usb.h>
+#include <grub/usb.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+
+static struct grub_usb_controller_dev usb_controller =
+{
+ .name = "libusb"
+};
+
+static struct grub_usb_device *grub_usb_devs[128];
+
+struct usb_bus *busses;
+
+static grub_err_t
+grub_libusb_devices (void)
+
+{
+ struct usb_bus *bus;
+ int last = 0;
+
+ busses = usb_get_busses();
+
+ for (bus = busses; bus; bus = bus->next)
+ {
+ struct usb_device *usbdev;
+ struct grub_usb_device *dev;
+
+ for (usbdev = bus->devices; usbdev; usbdev = usbdev->next)
+ {
+ struct usb_device_descriptor *desc = &usbdev->descriptor;
+ grub_err_t err;
+
+ if (! desc->bcdUSB)
+ continue;
+
+ dev = grub_malloc (sizeof (*dev));
+ if (! dev)
+ return grub_errno;
+
+ dev->data = usbdev;
+
+ /* Fill in all descriptors. */
+ err = grub_usb_device_initialize (dev);
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ /* Register the device. */
+ grub_usb_devs[last++] = dev;
+ }
+ }
+
+ return GRUB_USB_ERR_NONE;
+}
+
+void
+grub_usb_poll_devices (void)
+{
+ /* TODO: recheck grub_usb_devs */
+}
+
+
+int
+grub_usb_iterate (int (*hook) (grub_usb_device_t dev))
+{
+ int i;
+
+ for (i = 0; i < 128; i++)
+ {
+ if (grub_usb_devs[i])
+ {
+ if (hook (grub_usb_devs[i]))
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+grub_usb_err_t
+grub_usb_root_hub (grub_usb_controller_t controller __attribute__((unused)))
+{
+ return GRUB_USB_ERR_NONE;
+}
+
+grub_usb_err_t
+grub_usb_control_msg (grub_usb_device_t dev, grub_uint8_t reqtype,
+ grub_uint8_t request, grub_uint16_t value,
+ grub_uint16_t idx, grub_size_t size, char *data)
+{
+ usb_dev_handle *devh;
+ struct usb_device *d = dev->data;
+
+ devh = usb_open (d);
+ if (usb_control_msg (devh, reqtype, request,
+ value, idx, data, size, 20) < 0)
+ {
+ usb_close (devh);
+ return GRUB_USB_ERR_STALL;
+ }
+
+ usb_close (devh);
+
+ return GRUB_USB_ERR_NONE;
+}
+
+grub_usb_err_t
+grub_usb_bulk_read (grub_usb_device_t dev,
+ int endpoint, grub_size_t size, char *data)
+{
+ usb_dev_handle *devh;
+ struct usb_device *d = dev->data;
+
+ devh = usb_open (d);
+ if (usb_claim_interface (devh, 0) < 1)
+ {
+ usb_close (devh);
+ return GRUB_USB_ERR_STALL;
+ }
+
+ if (usb_bulk_read (devh, endpoint, data, size, 20) < 1)
+ {
+ usb_close (devh);
+ return GRUB_USB_ERR_STALL;
+ }
+
+ usb_release_interface (devh, 0);
+ usb_close (devh);
+
+ return GRUB_USB_ERR_NONE;
+}
+
+grub_usb_err_t
+grub_usb_bulk_write (grub_usb_device_t dev,
+ int endpoint, grub_size_t size, char *data)
+{
+ usb_dev_handle *devh;
+ struct usb_device *d = dev->data;
+
+ devh = usb_open (d);
+ if (usb_claim_interface (devh, 0) < 0)
+ goto fail;
+
+ if (usb_bulk_write (devh, endpoint, data, size, 20) < 0)
+ goto fail;
+
+ if (usb_release_interface (devh, 0) < 0)
+ goto fail;
+
+ usb_close (devh);
+
+ return GRUB_USB_ERR_NONE;
+
+ fail:
+ usb_close (devh);
+ return GRUB_USB_ERR_STALL;
+}
+
+GRUB_MOD_INIT (libusb)
+{
+ usb_init();
+ usb_find_busses();
+ usb_find_devices();
+
+ if (grub_libusb_devices ())
+ return;
+
+ grub_usb_controller_dev_register (&usb_controller);
+
+ return;
+}
+
+GRUB_MOD_FINI (libusb)
+{
+ return;
+}
diff --git a/grub-core/bus/usb/ohci.c b/grub-core/bus/usb/ohci.c
new file mode 100644
index 0000000..df0d0f4
--- /dev/null
+++ b/grub-core/bus/usb/ohci.c
@@ -0,0 +1,1441 @@
+/* ohci.c - OHCI Support. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/usb.h>
+#include <grub/usbtrans.h>
+#include <grub/misc.h>
+#include <grub/pci.h>
+#include <grub/cpu/pci.h>
+#include <grub/cpu/io.h>
+#include <grub/time.h>
+#include <grub/cs5536.h>
+#include <grub/loader.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_ohci_hcca
+{
+ /* Pointers to Interrupt Endpoint Descriptors. Not used by
+ GRUB. */
+ grub_uint32_t inttable[32];
+
+ /* Current frame number. */
+ grub_uint16_t framenumber;
+
+ grub_uint16_t pad;
+
+ /* List of completed TDs. */
+ grub_uint32_t donehead;
+
+ grub_uint8_t reserved[116];
+} __attribute__((packed));
+
+/* OHCI General Transfer Descriptor */
+struct grub_ohci_td
+{
+ /* Information used to construct the TOKEN packet. */
+ grub_uint32_t token;
+ grub_uint32_t buffer; /* LittleEndian physical address */
+ grub_uint32_t next_td; /* LittleEndian physical address */
+ grub_uint32_t buffer_end; /* LittleEndian physical address */
+ /* next values are not for OHCI HW */
+ volatile struct grub_ohci_td *link_td; /* pointer to next free/chained TD
+ * pointer as uint32 */
+ grub_uint32_t prev_td_phys; /* we need it to find previous TD
+ * physical address in CPU endian */
+ grub_uint32_t tr_index; /* index of TD in transfer */
+ grub_uint8_t pad[8 - sizeof (volatile struct grub_ohci_td *)]; /* padding to 32 bytes */
+} __attribute__((packed));
+
+/* OHCI Endpoint Descriptor. */
+struct grub_ohci_ed
+{
+ grub_uint32_t target;
+ grub_uint32_t td_tail;
+ grub_uint32_t td_head;
+ grub_uint32_t next_ed;
+} __attribute__((packed));
+
+typedef volatile struct grub_ohci_td *grub_ohci_td_t;
+typedef volatile struct grub_ohci_ed *grub_ohci_ed_t;
+
+/* Experimental change of ED/TD allocation */
+/* Little bit similar as in UHCI */
+/* Implementation assumes:
+ * 32-bits architecture - XXX: fix for 64-bits
+ * memory allocated by grub_memalign_dma32 must be continuous
+ * in virtual and also in physical memory */
+struct grub_ohci
+{
+ volatile grub_uint32_t *iobase;
+ volatile struct grub_ohci_hcca *hcca;
+ grub_uint32_t hcca_addr;
+ struct grub_pci_dma_chunk *hcca_chunk;
+ grub_ohci_ed_t ed_ctrl; /* EDs for CONTROL */
+ grub_uint32_t ed_ctrl_addr;
+ struct grub_pci_dma_chunk *ed_ctrl_chunk;
+ grub_ohci_ed_t ed_bulk; /* EDs for BULK */
+ grub_uint32_t ed_bulk_addr;
+ struct grub_pci_dma_chunk *ed_bulk_chunk;
+ grub_ohci_td_t td; /* TDs */
+ grub_uint32_t td_addr;
+ struct grub_pci_dma_chunk *td_chunk;
+ struct grub_ohci *next;
+ grub_ohci_td_t td_free; /* Pointer to first free TD */
+};
+
+static struct grub_ohci *ohci;
+
+typedef enum
+{
+ GRUB_OHCI_REG_REVISION = 0x00,
+ GRUB_OHCI_REG_CONTROL,
+ GRUB_OHCI_REG_CMDSTATUS,
+ GRUB_OHCI_REG_INTSTATUS,
+ GRUB_OHCI_REG_INTENA,
+ GRUB_OHCI_REG_INTDIS,
+ GRUB_OHCI_REG_HCCA,
+ GRUB_OHCI_REG_PERIODIC,
+ GRUB_OHCI_REG_CONTROLHEAD,
+ GRUB_OHCI_REG_CONTROLCURR,
+ GRUB_OHCI_REG_BULKHEAD,
+ GRUB_OHCI_REG_BULKCURR,
+ GRUB_OHCI_REG_DONEHEAD,
+ GRUB_OHCI_REG_FRAME_INTERVAL,
+ GRUB_OHCI_REG_PERIODIC_START = 16,
+ GRUB_OHCI_REG_RHUBA = 18,
+ GRUB_OHCI_REG_RHUBPORT = 21,
+ GRUB_OHCI_REG_LEGACY_CONTROL = 0x100,
+ GRUB_OHCI_REG_LEGACY_INPUT = 0x104,
+ GRUB_OHCI_REG_LEGACY_OUTPUT = 0x108,
+ GRUB_OHCI_REG_LEGACY_STATUS = 0x10c
+} grub_ohci_reg_t;
+
+#define GRUB_OHCI_RHUB_PORT_POWER_MASK 0x300
+#define GRUB_OHCI_RHUB_PORT_ALL_POWERED 0x200
+
+#define GRUB_OHCI_REG_FRAME_INTERVAL_FSMPS_MASK 0x8fff0000
+#define GRUB_OHCI_REG_FRAME_INTERVAL_FSMPS_SHIFT 16
+#define GRUB_OHCI_REG_FRAME_INTERVAL_FI_SHIFT 0
+
+/* XXX: Is this choice of timings sane? */
+#define GRUB_OHCI_FSMPS 0x2778
+#define GRUB_OHCI_PERIODIC_START 0x257f
+#define GRUB_OHCI_FRAME_INTERVAL 0x2edf
+
+#define GRUB_OHCI_SET_PORT_ENABLE (1 << 1)
+#define GRUB_OHCI_CLEAR_PORT_ENABLE (1 << 0)
+#define GRUB_OHCI_SET_PORT_RESET (1 << 4)
+#define GRUB_OHCI_SET_PORT_RESET_STATUS_CHANGE (1 << 20)
+
+#define GRUB_OHCI_REG_CONTROL_BULK_ENABLE (1 << 5)
+#define GRUB_OHCI_REG_CONTROL_CONTROL_ENABLE (1 << 4)
+
+#define GRUB_OHCI_RESET_CONNECT_CHANGE (1 << 16)
+#define GRUB_OHCI_CTRL_EDS 256
+#define GRUB_OHCI_BULK_EDS 510
+#define GRUB_OHCI_TDS 640
+
+#define GRUB_OHCI_ED_ADDR_MASK 0x7ff
+
+static inline grub_ohci_ed_t
+grub_ohci_ed_phys2virt (struct grub_ohci *o, int bulk, grub_uint32_t x)
+{
+ if (!x)
+ return NULL;
+ if (bulk)
+ return (grub_ohci_ed_t) (x - o->ed_bulk_addr
+ + (grub_uint8_t *) o->ed_bulk);
+ return (grub_ohci_ed_t) (x - o->ed_ctrl_addr
+ + (grub_uint8_t *) o->ed_ctrl);
+}
+
+static grub_uint32_t
+grub_ohci_virt_to_phys (struct grub_ohci *o, int bulk, grub_ohci_ed_t x)
+{
+ if (!x)
+ return 0;
+
+ if (bulk)
+ return (grub_uint8_t *) x - (grub_uint8_t *) o->ed_bulk + o->ed_bulk_addr;
+ return (grub_uint8_t *) x - (grub_uint8_t *) o->ed_ctrl + o->ed_ctrl_addr;
+}
+
+static inline grub_ohci_td_t
+grub_ohci_td_phys2virt (struct grub_ohci *o, grub_uint32_t x)
+{
+ if (!x)
+ return NULL;
+ return (grub_ohci_td_t) (x - o->td_addr + (grub_uint8_t *) o->td);
+}
+
+static grub_uint32_t
+grub_ohci_td_virt2phys (struct grub_ohci *o, grub_ohci_td_t x)
+{
+ if (!x)
+ return 0;
+ return (grub_uint8_t *)x - (grub_uint8_t *)o->td + o->td_addr;
+}
+
+
+static grub_uint32_t
+grub_ohci_readreg32 (struct grub_ohci *o, grub_ohci_reg_t reg)
+{
+ return grub_le_to_cpu32 (*(o->iobase + reg));
+}
+
+static void
+grub_ohci_writereg32 (struct grub_ohci *o,
+ grub_ohci_reg_t reg, grub_uint32_t val)
+{
+ *(o->iobase + reg) = grub_cpu_to_le32 (val);
+}
+
+
+
+/* Iterate over all PCI devices. Determine if a device is an OHCI
+ controller. If this is the case, initialize it. */
+static int NESTED_FUNC_ATTR
+grub_ohci_pci_iter (grub_pci_device_t dev,
+ grub_pci_id_t pciid)
+{
+ grub_uint32_t interf;
+ grub_uint32_t base;
+ grub_pci_address_t addr;
+ struct grub_ohci *o;
+ grub_uint32_t revision;
+ int j;
+
+ /* Determine IO base address. */
+ grub_dprintf ("ohci", "pciid = %x\n", pciid);
+
+ if (pciid == GRUB_CS5536_PCIID)
+ {
+ grub_uint64_t basereg;
+
+ basereg = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_USB_OHCI_BASE);
+ if (!(basereg & GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE))
+ {
+ /* Shouldn't happen. */
+ grub_dprintf ("ohci", "No OHCI address is assigned\n");
+ return 0;
+ }
+ base = (basereg & GRUB_CS5536_MSR_USB_BASE_ADDR_MASK);
+ basereg |= GRUB_CS5536_MSR_USB_BASE_BUS_MASTER;
+ basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_ENABLED;
+ basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_STATUS;
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_OHCI_BASE, basereg);
+ }
+ else
+ {
+ grub_uint32_t class_code;
+ grub_uint32_t class;
+ grub_uint32_t subclass;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class_code = grub_pci_read (addr) >> 8;
+
+ interf = class_code & 0xFF;
+ subclass = (class_code >> 8) & 0xFF;
+ class = class_code >> 16;
+
+ /* If this is not an OHCI controller, just return. */
+ if (class != 0x0c || subclass != 0x03 || interf != 0x10)
+ return 0;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
+ base = grub_pci_read (addr);
+
+#if 0
+ /* Stop if there is no IO space base address defined. */
+ if (! (base & 1))
+ return 0;
+#endif
+
+ grub_dprintf ("ohci", "class=0x%02x 0x%02x interface 0x%02x\n",
+ class, subclass, interf);
+ }
+
+ /* Allocate memory for the controller and register it. */
+ o = grub_malloc (sizeof (*o));
+ if (! o)
+ return 1;
+ grub_memset ((void*)o, 0, sizeof (*o));
+ o->iobase = grub_pci_device_map_range (dev, base, 0x800);
+
+ grub_dprintf ("ohci", "base=%p\n", o->iobase);
+
+ /* Reserve memory for the HCCA. */
+ o->hcca_chunk = grub_memalign_dma32 (256, 256);
+ if (! o->hcca_chunk)
+ goto fail;
+ o->hcca = grub_dma_get_virt (o->hcca_chunk);
+ o->hcca_addr = grub_dma_get_phys (o->hcca_chunk);
+ grub_memset ((void*)o->hcca, 0, sizeof(*o->hcca));
+ grub_dprintf ("ohci", "hcca: chunk=%p, virt=%p, phys=0x%02x\n",
+ o->hcca_chunk, o->hcca, o->hcca_addr);
+
+ /* Reserve memory for ctrl EDs. */
+ o->ed_ctrl_chunk = grub_memalign_dma32 (16, sizeof(struct grub_ohci_ed)*GRUB_OHCI_CTRL_EDS);
+ if (! o->ed_ctrl_chunk)
+ goto fail;
+ o->ed_ctrl = grub_dma_get_virt (o->ed_ctrl_chunk);
+ o->ed_ctrl_addr = grub_dma_get_phys (o->ed_ctrl_chunk);
+ /* Preset EDs */
+ grub_memset ((void*)o->ed_ctrl, 0, sizeof(struct grub_ohci_ed) * GRUB_OHCI_CTRL_EDS);
+ for (j=0; j < GRUB_OHCI_CTRL_EDS; j++)
+ o->ed_ctrl[j].target = grub_cpu_to_le32 (1 << 14); /* skip */
+
+ grub_dprintf ("ohci", "EDs-C: chunk=%p, virt=%p, phys=0x%02x\n",
+ o->ed_ctrl_chunk, o->ed_ctrl, o->ed_ctrl_addr);
+
+ /* Reserve memory for bulk EDs. */
+ o->ed_bulk_chunk = grub_memalign_dma32 (16, sizeof(struct grub_ohci_ed)*GRUB_OHCI_BULK_EDS);
+ if (! o->ed_bulk_chunk)
+ goto fail;
+ o->ed_bulk = grub_dma_get_virt (o->ed_bulk_chunk);
+ o->ed_bulk_addr = grub_dma_get_phys (o->ed_bulk_chunk);
+ /* Preset EDs */
+ grub_memset ((void*)o->ed_bulk, 0, sizeof(struct grub_ohci_ed) * GRUB_OHCI_BULK_EDS);
+ for (j=0; j < GRUB_OHCI_BULK_EDS; j++)
+ o->ed_bulk[j].target = grub_cpu_to_le32 (1 << 14); /* skip */
+
+ grub_dprintf ("ohci", "EDs-B: chunk=%p, virt=%p, phys=0x%02x\n",
+ o->ed_bulk_chunk, o->ed_bulk, o->ed_bulk_addr);
+
+ /* Reserve memory for TDs. */
+ o->td_chunk = grub_memalign_dma32 (32, sizeof(struct grub_ohci_td)*GRUB_OHCI_TDS);
+ /* Why is it aligned on 32 boundary if spec. says 16 ?
+ * We have structure 32 bytes long and we don't want cross
+ * 4K boundary inside structure. */
+ if (! o->td_chunk)
+ goto fail;
+ o->td_free = o->td = grub_dma_get_virt (o->td_chunk);
+ o->td_addr = grub_dma_get_phys (o->td_chunk);
+ /* Preset free TDs chain in TDs */
+ grub_memset ((void*)o->td, 0, sizeof(struct grub_ohci_td) * GRUB_OHCI_TDS);
+ for (j=0; j < (GRUB_OHCI_TDS-1); j++)
+ o->td[j].link_td = &o->td[j+1];
+
+ grub_dprintf ("ohci", "TDs: chunk=%p, virt=%p, phys=0x%02x\n",
+ o->td_chunk, o->td, o->td_addr);
+
+ /* Check if the OHCI revision is actually 1.0 as supported. */
+ revision = grub_ohci_readreg32 (o, GRUB_OHCI_REG_REVISION);
+ grub_dprintf ("ohci", "OHCI revision=0x%02x\n", revision & 0xFF);
+ if ((revision & 0xFF) != 0x10)
+ goto fail;
+
+ {
+ grub_uint32_t control;
+ /* Check SMM/BIOS ownership of OHCI (SMM = USB Legacy Support driver for BIOS) */
+ control = grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL);
+ if ((control & 0x100) != 0)
+ {
+ unsigned i;
+ grub_dprintf("ohci", "OHCI is owned by SMM\n");
+ /* Do change of ownership */
+ /* Ownership change request */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CMDSTATUS, (1<<3)); /* XXX: Magic. */
+ /* Waiting for SMM deactivation */
+ for (i=0; i < 10; i++)
+ {
+ if ((grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL) & 0x100) == 0)
+ {
+ grub_dprintf("ohci", "Ownership changed normally.\n");
+ break;
+ }
+ grub_millisleep (100);
+ }
+ if (i >= 10)
+ {
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROL,
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL) & ~0x100);
+ grub_dprintf("ohci", "Ownership changing timeout, change forced !\n");
+ }
+ }
+ else if (((control & 0x100) == 0) &&
+ ((control & 0xc0) != 0)) /* Not owned by SMM nor reset */
+ {
+ grub_dprintf("ohci", "OHCI is owned by BIOS\n");
+ /* Do change of ownership - not implemented yet... */
+ /* In fact we probably need to do nothing ...? */
+ }
+ else
+ {
+ grub_dprintf("ohci", "OHCI is not owned by SMM nor BIOS\n");
+ /* We can setup OHCI. */
+ }
+ }
+
+ /* Suspend the OHCI by issuing a reset. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CMDSTATUS, 1); /* XXX: Magic. */
+ grub_millisleep (1);
+ grub_dprintf ("ohci", "OHCI reset\n");
+
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_FRAME_INTERVAL,
+ (GRUB_OHCI_FSMPS
+ << GRUB_OHCI_REG_FRAME_INTERVAL_FSMPS_SHIFT)
+ | (GRUB_OHCI_FRAME_INTERVAL
+ << GRUB_OHCI_REG_FRAME_INTERVAL_FI_SHIFT));
+
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_PERIODIC_START,
+ GRUB_OHCI_PERIODIC_START);
+
+ /* Setup the HCCA. */
+ o->hcca->donehead = 0;
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_HCCA, o->hcca_addr);
+ grub_dprintf ("ohci", "OHCI HCCA\n");
+
+ /* Misc. pre-sets. */
+ o->hcca->donehead = 0;
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_INTSTATUS, 0x7f); /* Clears everything */
+ /* We don't want modify CONTROL/BULK HEAD registers.
+ * So we assign to HEAD registers zero ED from related array
+ * and we will not use this ED, it will be always skipped.
+ * It should not produce notable performance penalty (I hope). */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLHEAD, o->ed_ctrl_addr);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLCURR, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKHEAD, o->ed_bulk_addr);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKCURR, 0);
+
+ /* Check OHCI Legacy Support */
+ if ((revision & 0x100) != 0)
+ {
+ grub_dprintf ("ohci", "Legacy Support registers detected\n");
+ grub_dprintf ("ohci", "Current state of legacy control reg.: 0x%04x\n",
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_LEGACY_CONTROL));
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_LEGACY_CONTROL,
+ (grub_ohci_readreg32 (o, GRUB_OHCI_REG_LEGACY_CONTROL)) & ~1);
+ grub_dprintf ("ohci", "OHCI Legacy Support disabled.\n");
+ }
+
+ /* Enable the OHCI + enable CONTROL and BULK LIST. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROL,
+ (2 << 6)
+ | GRUB_OHCI_REG_CONTROL_CONTROL_ENABLE
+ | GRUB_OHCI_REG_CONTROL_BULK_ENABLE );
+ grub_dprintf ("ohci", "OHCI enable: 0x%02x\n",
+ (grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL) >> 6) & 3);
+
+ /* Power on all ports */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBA,
+ (grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBA)
+ & ~GRUB_OHCI_RHUB_PORT_POWER_MASK)
+ | GRUB_OHCI_RHUB_PORT_ALL_POWERED);
+#if 0 /* We don't need it at all, handled via hotplugging */
+ /* Now we have hot-plugging, we need to wait for stable power only */
+ grub_millisleep (100);
+#endif
+
+ /* Link to ohci now that initialisation is successful. */
+ o->next = ohci;
+ ohci = o;
+
+ return 0;
+
+ fail:
+ if (o)
+ grub_dma_free (o->td_chunk);
+ grub_dma_free (o->ed_bulk_chunk);
+ grub_dma_free (o->ed_ctrl_chunk);
+ grub_dma_free (o->hcca_chunk);
+ grub_free (o);
+
+ return 0;
+}
+
+
+static void
+grub_ohci_inithw (void)
+{
+ grub_pci_iterate (grub_ohci_pci_iter);
+}
+
+
+
+static int
+grub_ohci_iterate (int (*hook) (grub_usb_controller_t dev))
+{
+ struct grub_ohci *o;
+ struct grub_usb_controller dev;
+
+ for (o = ohci; o; o = o->next)
+ {
+ dev.data = o;
+ if (hook (&dev))
+ return 1;
+ }
+
+ return 0;
+}
+
+static grub_ohci_ed_t
+grub_ohci_find_ed (struct grub_ohci *o, int bulk, grub_uint32_t target)
+{
+ grub_ohci_ed_t ed, ed_next;
+ grub_uint32_t target_addr = target & GRUB_OHCI_ED_ADDR_MASK;
+ int count;
+ int i;
+
+ /* Use proper values and structures. */
+ if (bulk)
+ {
+ count = GRUB_OHCI_BULK_EDS;
+ ed = o->ed_bulk;
+ ed_next = grub_ohci_ed_phys2virt(o, bulk,
+ grub_le_to_cpu32 (ed->next_ed) );
+ }
+ else
+ {
+ count = GRUB_OHCI_CTRL_EDS;
+ ed = o->ed_ctrl;
+ ed_next = grub_ohci_ed_phys2virt(o, bulk,
+ grub_le_to_cpu32 (ed->next_ed) );
+ }
+
+ /* First try to find existing ED with proper target address */
+ for (i = 0; ; )
+ {
+ if (i && /* We ignore zero ED */
+ ((ed->target & GRUB_OHCI_ED_ADDR_MASK) == target_addr))
+ return ed; /* Found proper existing ED */
+ i++;
+ if (ed_next && (i < count))
+ {
+ ed = ed_next;
+ ed_next = grub_ohci_ed_phys2virt(o, bulk,
+ grub_le_to_cpu32 (ed->next_ed) );
+ continue;
+ }
+ break;
+ }
+ /* ED with target_addr does not exist, we have to add it */
+ /* Have we any free ED in array ? */
+ if (i >= count) /* No. */
+ return NULL;
+ /* Currently we simply take next ED in array, no allocation
+ * function is used. It should be no problem until hot-plugging
+ * will be implemented, i.e. until we will need to de-allocate EDs
+ * of unplugged devices. */
+ /* We can link new ED to previous ED safely as the new ED should
+ * still have set skip bit. */
+ ed->next_ed = grub_cpu_to_le32 ( grub_ohci_virt_to_phys (o,
+ bulk, &ed[1]));
+ return &ed[1];
+}
+
+static grub_ohci_td_t
+grub_ohci_alloc_td (struct grub_ohci *o)
+{
+ grub_ohci_td_t ret;
+
+ /* Check if there is a Transfer Descriptor available. */
+ if (! o->td_free)
+ return NULL;
+
+ ret = o->td_free; /* Take current free TD */
+ o->td_free = (grub_ohci_td_t)ret->link_td; /* Advance to next free TD in chain */
+ ret->link_td = 0; /* Reset link_td in allocated TD */
+ return ret;
+}
+
+static void
+grub_ohci_free_td (struct grub_ohci *o, grub_ohci_td_t td)
+{
+ grub_memset ( (void*)td, 0, sizeof(struct grub_ohci_td) );
+ td->link_td = o->td_free; /* Cahin new free TD & rest */
+ o->td_free = td; /* Change address of first free TD */
+}
+
+static void
+grub_ohci_free_tds (struct grub_ohci *o, grub_ohci_td_t td)
+{
+ if (!td)
+ return;
+
+ /* Unchain first TD from previous TD if it is chained */
+ if (td->prev_td_phys)
+ {
+ grub_ohci_td_t td_prev_virt = grub_ohci_td_phys2virt(o,
+ td->prev_td_phys);
+
+ if (td == (grub_ohci_td_t) td_prev_virt->link_td)
+ td_prev_virt->link_td = 0;
+ }
+
+ /* Free all TDs from td (chained by link_td) */
+ while (td)
+ {
+ grub_ohci_td_t tdprev;
+
+ /* Unlink the queue. */
+ tdprev = td;
+ td = (grub_ohci_td_t) td->link_td;
+
+ /* Free the TD. */
+ grub_ohci_free_td (o, tdprev);
+ }
+}
+
+static void
+grub_ohci_transaction (grub_ohci_td_t td,
+ grub_transfer_type_t type, unsigned int toggle,
+ grub_size_t size, grub_uint32_t data)
+{
+ grub_uint32_t token;
+ grub_uint32_t buffer;
+ grub_uint32_t buffer_end;
+
+ grub_dprintf ("ohci", "OHCI transaction td=%p type=%d, toggle=%d, size=%lu\n",
+ td, type, toggle, (unsigned long) size);
+
+ switch (type)
+ {
+ case GRUB_USB_TRANSFER_TYPE_SETUP:
+ token = 0 << 19;
+ break;
+ case GRUB_USB_TRANSFER_TYPE_IN:
+ token = 2 << 19;
+ break;
+ case GRUB_USB_TRANSFER_TYPE_OUT:
+ token = 1 << 19;
+ break;
+ default:
+ token = 0;
+ break;
+ }
+
+ /* Set the token */
+ token |= ( 7 << 21); /* Never generate interrupt */
+ token |= toggle << 24;
+ token |= 1 << 25;
+
+ /* Set "Not accessed" error code */
+ token |= 15 << 28;
+
+ buffer = data;
+ buffer_end = buffer + size - 1;
+
+ /* Set correct buffer values in TD if zero transfer occurs */
+ if (size)
+ {
+ buffer = (grub_uint32_t) data;
+ buffer_end = buffer + size - 1;
+ td->buffer = grub_cpu_to_le32 (buffer);
+ td->buffer_end = grub_cpu_to_le32 (buffer_end);
+ }
+ else
+ {
+ td->buffer = 0;
+ td->buffer_end = 0;
+ }
+
+ /* Set the rest of TD */
+ td->token = grub_cpu_to_le32 (token);
+ td->next_td = 0;
+}
+
+struct grub_ohci_transfer_controller_data
+{
+ grub_uint32_t tderr_phys;
+ grub_uint32_t td_last_phys;
+ grub_ohci_ed_t ed_virt;
+ grub_ohci_td_t td_current_virt;
+ grub_ohci_td_t td_head_virt;
+};
+
+static grub_usb_err_t
+grub_ohci_setup_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer)
+{
+ struct grub_ohci *o = (struct grub_ohci *) dev->data;
+ int bulk = 0;
+ grub_ohci_td_t td_next_virt;
+ grub_uint32_t target;
+ grub_uint32_t td_head_phys;
+ grub_uint32_t td_tail_phys;
+ int i;
+ struct grub_ohci_transfer_controller_data *cdata;
+
+ cdata = grub_zalloc (sizeof (*cdata));
+ if (!cdata)
+ return GRUB_USB_ERR_INTERNAL;
+
+ /* Pre-set target for ED - we need it to find proper ED */
+ /* Set the device address. */
+ target = transfer->devaddr;
+ /* Set the endpoint. It should be masked, we need 4 bits only. */
+ target |= (transfer->endpoint & 15) << 7;
+ /* Set the device speed. */
+ target |= (transfer->dev->speed == GRUB_USB_SPEED_LOW) << 13;
+ /* Set the maximum packet size. */
+ target |= transfer->max << 16;
+
+ /* Determine if transfer type is bulk - we need to select proper ED */
+ switch (transfer->type)
+ {
+ case GRUB_USB_TRANSACTION_TYPE_BULK:
+ bulk = 1;
+ break;
+
+ case GRUB_USB_TRANSACTION_TYPE_CONTROL:
+ break;
+
+ default:
+ grub_free (cdata);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ /* Find proper ED or add new ED */
+ cdata->ed_virt = grub_ohci_find_ed (o, bulk, target);
+ if (!cdata->ed_virt)
+ {
+ grub_dprintf ("ohci","Fatal: No free ED !\n");
+ grub_free (cdata);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ /* Take pointer to first TD from ED */
+ td_head_phys = grub_le_to_cpu32 (cdata->ed_virt->td_head) & ~0xf;
+ td_tail_phys = grub_le_to_cpu32 (cdata->ed_virt->td_tail) & ~0xf;
+
+ /* Sanity check - td_head should be equal to td_tail */
+ if (td_head_phys != td_tail_phys) /* Should never happen ! */
+ {
+ grub_dprintf ("ohci", "Fatal: HEAD is not equal to TAIL !\n");
+ grub_dprintf ("ohci", "HEAD = 0x%02x, TAIL = 0x%02x\n",
+ td_head_phys, td_tail_phys);
+ /* XXX: Fix: What to do ? */
+ grub_free (cdata);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ /* Now we should handle first TD. If ED is newly allocated,
+ * we must allocate the first TD. */
+ if (!td_head_phys)
+ {
+ cdata->td_head_virt = grub_ohci_alloc_td (o);
+ if (!cdata->td_head_virt)
+ return GRUB_USB_ERR_INTERNAL; /* We don't need de-allocate ED */
+ /* We can set td_head only when ED is not active, i.e.
+ * when it is newly allocated. */
+ cdata->ed_virt->td_head
+ = grub_cpu_to_le32 (grub_ohci_td_virt2phys (o, cdata->td_head_virt));
+ cdata->ed_virt->td_tail = cdata->ed_virt->td_head;
+ }
+ else
+ cdata->td_head_virt = grub_ohci_td_phys2virt ( o, td_head_phys );
+
+ /* Set TDs */
+ cdata->td_last_phys = td_head_phys; /* initial value to make compiler happy... */
+ for (i = 0, cdata->td_current_virt = cdata->td_head_virt;
+ i < transfer->transcnt; i++)
+ {
+ grub_usb_transaction_t tr = &transfer->transactions[i];
+
+ grub_ohci_transaction (cdata->td_current_virt, tr->pid, tr->toggle,
+ tr->size, tr->data);
+
+ /* Set index of TD in transfer */
+ cdata->td_current_virt->tr_index = (grub_uint32_t) i;
+
+ /* Remember last used (processed) TD phys. addr. */
+ cdata->td_last_phys = grub_ohci_td_virt2phys (o, cdata->td_current_virt);
+
+ /* Allocate next TD */
+ td_next_virt = grub_ohci_alloc_td (o);
+ if (!td_next_virt) /* No free TD, cancel transfer and free TDs except head TD */
+ {
+ if (i) /* if i==0 we have nothing to free... */
+ grub_ohci_free_tds (o, grub_ohci_td_phys2virt(o,
+ grub_le_to_cpu32 (cdata->td_head_virt->next_td)));
+ /* Reset head TD */
+ grub_memset ( (void*)cdata->td_head_virt, 0,
+ sizeof(struct grub_ohci_td) );
+ grub_dprintf ("ohci", "Fatal: No free TD !");
+ grub_free (cdata);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ /* Chain TDs */
+
+ cdata->td_current_virt->link_td = td_next_virt;
+ cdata->td_current_virt->next_td = grub_cpu_to_le32 (
+ grub_ohci_td_virt2phys (o,
+ td_next_virt) );
+ td_next_virt->prev_td_phys = grub_ohci_td_virt2phys (o,
+ cdata->td_current_virt);
+ cdata->td_current_virt = td_next_virt;
+ }
+
+ grub_dprintf ("ohci", "Tail TD (not processed) = %p\n",
+ cdata->td_current_virt);
+
+ /* Setup the Endpoint Descriptor for transfer. */
+ /* First set necessary fields in TARGET but keep (or set) skip bit */
+ /* Note: It could be simpler if speed, format and max. packet
+ * size never change after first allocation of ED.
+ * But unfortunately max. packet size may change during initial
+ * setup sequence and we must handle it. */
+ cdata->ed_virt->target = grub_cpu_to_le32 (target | (1 << 14));
+ /* Set td_tail */
+ cdata->ed_virt->td_tail
+ = grub_cpu_to_le32 (grub_ohci_td_virt2phys (o, cdata->td_current_virt));
+ /* Now reset skip bit */
+ cdata->ed_virt->target = grub_cpu_to_le32 (target);
+ /* ed_virt->td_head = grub_cpu_to_le32 (td_head); Must not be changed, it is maintained by OHCI */
+ /* ed_virt->next_ed = grub_cpu_to_le32 (0); Handled by grub_ohci_find_ed, do not change ! */
+
+ grub_dprintf ("ohci", "program OHCI\n");
+
+ /* Program the OHCI to actually transfer. */
+ switch (transfer->type)
+ {
+ case GRUB_USB_TRANSACTION_TYPE_BULK:
+ {
+ grub_dprintf ("ohci", "BULK list filled\n");
+ /* Set BulkListFilled. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CMDSTATUS, 1 << 2);
+ /* Read back of register should ensure it is really written */
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_CMDSTATUS);
+ break;
+ }
+
+ case GRUB_USB_TRANSACTION_TYPE_CONTROL:
+ {
+ grub_dprintf ("ohci", "CONTROL list filled\n");
+ /* Set ControlListFilled. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CMDSTATUS, 1 << 1);
+ /* Read back of register should ensure it is really written */
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_CMDSTATUS);
+ break;
+ }
+ }
+
+ transfer->controller_data = cdata;
+
+ return GRUB_USB_ERR_NONE;
+}
+
+static void
+pre_finish_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer)
+{
+ struct grub_ohci *o = dev->data;
+ struct grub_ohci_transfer_controller_data *cdata = transfer->controller_data;
+ grub_uint32_t target;
+ grub_uint32_t status;
+ grub_uint32_t control;
+ grub_uint32_t intstatus;
+
+ /* There are many ways how the loop above can finish:
+ * - normally without any error via INTSTATUS WDH bit
+ * : tderr_phys == td_last_phys, td_head == td_tail
+ * - normally with error via HALT bit in ED TD HEAD
+ * : td_head = next TD after TD with error
+ * : tderr_phys = last processed and retired TD with error,
+ * i.e. should be != 0
+ * : if bad_OHCI == TRUE, tderr_phys will be probably invalid
+ * - unrecoverable error - I never seen it but it could be
+ * : err_unrec == TRUE, other values can contain anything...
+ * - timeout, it can be caused by:
+ * -- bad USB device - some devices have some bugs, see Linux source
+ * and related links
+ * -- bad OHCI controller - e.g. lost interrupts or does not set
+ * proper bits in INTSTATUS when real IRQ not enabled etc.,
+ * see Linux source and related links
+ * One known bug is handled - if transfer finished
+ * successfully (i.e. HEAD==TAIL, last transfer TD is retired,
+ * HALT bit is not set) and WDH bit is not set in INTSTATUS - in
+ * this case we set o->bad_OHCI=TRUE and do alternate loop
+ * and error handling - but there is problem how to find retired
+ * TD with error code if HALT occurs and if DONEHEAD is not
+ * working - we need to find TD previous to current ED HEAD
+ * -- bad code of this driver or some unknown reasons - :-(
+ * it can be e.g. bad handling of EDs/TDs/toggle bit...
+ */
+
+ /* Remember target for debug and set skip flag in ED */
+ /* It should be normaly not necessary but we need it at least
+ * in case of timeout */
+ target = grub_le_to_cpu32 ( cdata->ed_virt->target );
+ cdata->ed_virt->target = grub_cpu_to_le32 (target | (1 << 14));
+ /* Read registers for debug - they should be read now because
+ * debug prints case unwanted delays, so something can happen
+ * in the meantime... */
+ control = grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL);
+ status = grub_ohci_readreg32 (o, GRUB_OHCI_REG_CMDSTATUS);
+ intstatus = grub_ohci_readreg32 (o, GRUB_OHCI_REG_INTSTATUS);
+ /* Now print debug values - to have full info what happened */
+ grub_dprintf ("ohci", "loop finished: control=0x%02x status=0x%02x\n",
+ control, status);
+ grub_dprintf ("ohci", "intstatus=0x%02x, td_last_phys=0x%02x\n",
+ intstatus, cdata->td_last_phys);
+ grub_dprintf ("ohci", "TARGET=0x%02x, HEAD=0x%02x, TAIL=0x%02x\n",
+ target,
+ grub_le_to_cpu32 (cdata->ed_virt->td_head),
+ grub_le_to_cpu32 (cdata->ed_virt->td_tail) );
+
+}
+
+static void
+finish_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer)
+{
+ struct grub_ohci *o = dev->data;
+ struct grub_ohci_transfer_controller_data *cdata = transfer->controller_data;
+
+ /* Set empty ED - set HEAD = TAIL = last (not processed) TD */
+ cdata->ed_virt->td_head = grub_cpu_to_le32 (grub_le_to_cpu32 (cdata->ed_virt->td_tail) & ~0xf);
+
+ /* At this point always should be:
+ * ED has skip bit set and halted or empty or after next SOF,
+ * i.e. it is safe to free all TDs except last not processed
+ * ED HEAD == TAIL == phys. addr. of td_current_virt */
+
+ /* Un-chainig of last TD */
+ if (cdata->td_current_virt->prev_td_phys)
+ {
+ grub_ohci_td_t td_prev_virt
+ = grub_ohci_td_phys2virt (o, cdata->td_current_virt->prev_td_phys);
+
+ if (cdata->td_current_virt == (grub_ohci_td_t) td_prev_virt->link_td)
+ td_prev_virt->link_td = 0;
+
+ cdata->td_current_virt->prev_td_phys = 0;
+ }
+
+ grub_dprintf ("ohci", "OHCI finished, freeing\n");
+ grub_ohci_free_tds (o, cdata->td_head_virt);
+ grub_free (cdata);
+}
+
+static grub_usb_err_t
+parse_halt (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer,
+ grub_size_t *actual)
+{
+ struct grub_ohci *o = dev->data;
+ struct grub_ohci_transfer_controller_data *cdata = transfer->controller_data;
+ grub_uint8_t errcode = 0;
+ grub_usb_err_t err = GRUB_USB_ERR_NAK;
+ grub_ohci_td_t tderr_virt = NULL;
+
+ *actual = 0;
+
+ pre_finish_transfer (dev, transfer);
+
+ /* First we must get proper tderr_phys value */
+ /* Retired TD with error should be previous TD to ED->td_head */
+ cdata->tderr_phys = grub_ohci_td_phys2virt (o,
+ grub_le_to_cpu32 (cdata->ed_virt->td_head) & ~0xf )
+ ->prev_td_phys;
+
+ /* Prepare pointer to last processed TD and get error code */
+ tderr_virt = grub_ohci_td_phys2virt (o, cdata->tderr_phys);
+ /* Set index of last processed TD */
+ if (tderr_virt)
+ {
+ errcode = grub_le_to_cpu32 (tderr_virt->token) >> 28;
+ transfer->last_trans = tderr_virt->tr_index;
+ }
+ else
+ transfer->last_trans = -1;
+
+ /* Evaluation of error code */
+ grub_dprintf ("ohci", "OHCI tderr_phys=0x%02x, errcode=0x%02x\n",
+ cdata->tderr_phys, errcode);
+ switch (errcode)
+ {
+ case 0:
+ /* XXX: Should not happen! */
+ grub_error (GRUB_ERR_IO, "OHCI failed without reporting the reason");
+ err = GRUB_USB_ERR_INTERNAL;
+ break;
+
+ case 1:
+ /* XXX: CRC error. */
+ err = GRUB_USB_ERR_TIMEOUT;
+ break;
+
+ case 2:
+ err = GRUB_USB_ERR_BITSTUFF;
+ break;
+
+ case 3:
+ /* XXX: Data Toggle error. */
+ err = GRUB_USB_ERR_DATA;
+ break;
+
+ case 4:
+ err = GRUB_USB_ERR_STALL;
+ break;
+
+ case 5:
+ /* XXX: Not responding. */
+ err = GRUB_USB_ERR_TIMEOUT;
+ break;
+
+ case 6:
+ /* XXX: PID Check bits failed. */
+ err = GRUB_USB_ERR_BABBLE;
+ break;
+
+ case 7:
+ /* XXX: PID unexpected failed. */
+ err = GRUB_USB_ERR_BABBLE;
+ break;
+
+ case 8:
+ /* XXX: Data overrun error. */
+ err = GRUB_USB_ERR_DATA;
+ grub_dprintf ("ohci", "Overrun, failed TD address: %p, index: %d\n",
+ tderr_virt, tderr_virt->tr_index);
+ break;
+
+ case 9:
+ /* XXX: Data underrun error. */
+ grub_dprintf ("ohci", "Underrun, failed TD address: %p, index: %d\n",
+ tderr_virt, tderr_virt->tr_index);
+ if (transfer->last_trans == -1)
+ break;
+ *actual = transfer->transactions[transfer->last_trans].size
+ - (grub_le_to_cpu32 (tderr_virt->buffer_end)
+ - grub_le_to_cpu32 (tderr_virt->buffer))
+ + transfer->transactions[transfer->last_trans].preceding;
+ err = GRUB_USB_ERR_NONE;
+ break;
+
+ case 10:
+ /* XXX: Reserved. */
+ err = GRUB_USB_ERR_NAK;
+ break;
+
+ case 11:
+ /* XXX: Reserved. */
+ err = GRUB_USB_ERR_NAK;
+ break;
+
+ case 12:
+ /* XXX: Buffer overrun. */
+ err = GRUB_USB_ERR_DATA;
+ break;
+
+ case 13:
+ /* XXX: Buffer underrun. */
+ err = GRUB_USB_ERR_DATA;
+ break;
+
+ default:
+ err = GRUB_USB_ERR_NAK;
+ break;
+ }
+
+ finish_transfer (dev, transfer);
+
+ return err;
+}
+
+static grub_usb_err_t
+parse_success (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer,
+ grub_size_t *actual)
+{
+ struct grub_ohci *o = dev->data;
+ struct grub_ohci_transfer_controller_data *cdata = transfer->controller_data;
+ grub_ohci_td_t tderr_virt = NULL;
+
+ pre_finish_transfer (dev, transfer);
+
+ /* I hope we can do it as transfer (most probably) finished OK */
+ cdata->tderr_phys = cdata->td_last_phys;
+
+ /* Prepare pointer to last processed TD */
+ tderr_virt = grub_ohci_td_phys2virt (o, cdata->tderr_phys);
+
+ /* Set index of last processed TD */
+ if (tderr_virt)
+ transfer->last_trans = tderr_virt->tr_index;
+ else
+ transfer->last_trans = -1;
+ *actual = transfer->size + 1;
+
+ finish_transfer (dev, transfer);
+
+ return GRUB_USB_ERR_NONE;
+}
+
+static grub_usb_err_t
+parse_unrec (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer,
+ grub_size_t *actual)
+{
+ struct grub_ohci *o = dev->data;
+
+ *actual = 0;
+
+ pre_finish_transfer (dev, transfer);
+
+ /* Don't try to get error code and last processed TD for proper
+ * toggle bit value - anything can be invalid */
+ grub_dprintf("ohci", "Unrecoverable error!");
+
+ /* Do OHCI reset in case of unrecoverable error - maybe we will need
+ * do more - re-enumerate bus etc. (?) */
+
+ /* Suspend the OHCI by issuing a reset. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CMDSTATUS, 1); /* XXX: Magic. */
+ /* Read back of register should ensure it is really written */
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_CMDSTATUS);
+ grub_millisleep (1);
+ grub_dprintf ("ohci", "Unrecoverable error - OHCI reset\n");
+
+ /* Misc. resets. */
+ o->hcca->donehead = 0;
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_INTSTATUS, 0x7f); /* Clears everything */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLHEAD, o->ed_ctrl_addr);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLCURR, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKHEAD, o->ed_bulk_addr);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKCURR, 0);
+ /* Read back of register should ensure it is really written */
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_INTSTATUS);
+
+ /* Enable the OHCI. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROL,
+ (2 << 6)
+ | GRUB_OHCI_REG_CONTROL_CONTROL_ENABLE
+ | GRUB_OHCI_REG_CONTROL_BULK_ENABLE );
+ finish_transfer (dev, transfer);
+
+ return GRUB_USB_ERR_UNRECOVERABLE;
+}
+
+static grub_usb_err_t
+grub_ohci_check_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer,
+ grub_size_t *actual)
+{
+ struct grub_ohci *o = dev->data;
+ struct grub_ohci_transfer_controller_data *cdata = transfer->controller_data;
+ grub_uint32_t intstatus;
+
+ /* Check transfer status */
+ intstatus = grub_ohci_readreg32 (o, GRUB_OHCI_REG_INTSTATUS);
+
+ if ((intstatus & 0x10) != 0)
+ /* Unrecoverable error - only reset can help...! */
+ return parse_unrec (dev, transfer, actual);
+
+ /* Detected a HALT. */
+ if ((grub_le_to_cpu32 (cdata->ed_virt->td_head) & 1))
+ return parse_halt (dev, transfer, actual);
+
+ /* Finished ED detection */
+ if ( (grub_le_to_cpu32 (cdata->ed_virt->td_head) & ~0xf) ==
+ (grub_le_to_cpu32 (cdata->ed_virt->td_tail) & ~0xf) ) /* Empty ED */
+ {
+ /* Check the HALT bit */
+ /* It looks like nonsense - it was tested previously...
+ * but it can change because OHCI is working
+ * simultaneously via DMA... */
+ if (grub_le_to_cpu32 (cdata->ed_virt->td_head) & 1)
+ return parse_halt (dev, transfer, actual);
+ else
+ return parse_success (dev, transfer, actual);
+ }
+
+ return GRUB_USB_ERR_WAIT;
+}
+
+static grub_usb_err_t
+grub_ohci_cancel_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer)
+{
+ struct grub_ohci *o = dev->data;
+ struct grub_ohci_transfer_controller_data *cdata = transfer->controller_data;
+ grub_ohci_td_t tderr_virt = NULL;
+
+ pre_finish_transfer (dev, transfer);
+
+ grub_dprintf("ohci", "Timeout !\n");
+
+ /* We should wait for next SOF to be sure that ED is unaccessed
+ * by OHCI */
+ /* SF bit reset. (SF bit indicates Start Of Frame (SOF) packet) */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_INTSTATUS, (1<<2));
+ /* Wait for new SOF */
+ while ((grub_ohci_readreg32 (o, GRUB_OHCI_REG_INTSTATUS) & 0x4) == 0);
+
+ /* Possible retired TD with error should be previous TD to ED->td_head */
+ cdata->tderr_phys
+ = grub_ohci_td_phys2virt (o, grub_le_to_cpu32 (cdata->ed_virt->td_head)
+ & ~0xf)->prev_td_phys;
+
+ tderr_virt = grub_ohci_td_phys2virt (o,cdata-> tderr_phys);
+
+ grub_dprintf ("ohci", "Cancel: tderr_phys=0x%x, tderr_virt=%p\n",
+ cdata->tderr_phys, tderr_virt);
+
+ if (tderr_virt)
+ transfer->last_trans = tderr_virt->tr_index;
+ else
+ transfer->last_trans = -1;
+
+ finish_transfer (dev, transfer);
+
+ return GRUB_USB_ERR_NONE;
+}
+
+static grub_err_t
+grub_ohci_portstatus (grub_usb_controller_t dev,
+ unsigned int port, unsigned int enable)
+{
+ struct grub_ohci *o = (struct grub_ohci *) dev->data;
+ grub_uint64_t endtime;
+ int i;
+
+ grub_dprintf ("ohci", "begin of portstatus=0x%02x\n",
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port));
+
+ if (!enable) /* We don't need reset port */
+ {
+ /* Disable the port and wait for it. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBPORT + port,
+ GRUB_OHCI_CLEAR_PORT_ENABLE);
+ endtime = grub_get_time_ms () + 1000;
+ while ((grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port)
+ & (1 << 1)))
+ if (grub_get_time_ms () > endtime)
+ return grub_error (GRUB_ERR_IO, "OHCI Timed out - disable");
+
+ grub_dprintf ("ohci", "end of portstatus=0x%02x\n",
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port));
+ return GRUB_ERR_NONE;
+ }
+
+ /* OHCI does one reset signal 10ms long but USB spec.
+ * requests 50ms for root hub (no need to be continuous).
+ * So, we do reset 5 times... */
+ for (i = 0; i < 5; i++)
+ {
+ /* Reset the port - timing of reset is done by OHCI */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBPORT + port,
+ GRUB_OHCI_SET_PORT_RESET);
+
+ /* Wait for reset completion */
+ endtime = grub_get_time_ms () + 1000;
+ while (! (grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port)
+ & GRUB_OHCI_SET_PORT_RESET_STATUS_CHANGE))
+ if (grub_get_time_ms () > endtime)
+ return grub_error (GRUB_ERR_IO, "OHCI Timed out - reset");
+
+ /* End the reset signaling - reset the reset status change */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBPORT + port,
+ GRUB_OHCI_SET_PORT_RESET_STATUS_CHANGE);
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port);
+ }
+
+ /* Enable port */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBPORT + port,
+ GRUB_OHCI_SET_PORT_ENABLE);
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port);
+
+ /* Wait for signal enabled */
+ endtime = grub_get_time_ms () + 1000;
+ while (! (grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port)
+ & (1 << 1)))
+ if (grub_get_time_ms () > endtime)
+ return grub_error (GRUB_ERR_IO, "OHCI Timed out - enable");
+
+ /* Reset bit Connect Status Change */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBPORT + port,
+ GRUB_OHCI_RESET_CONNECT_CHANGE);
+
+ /* "Reset recovery time" (USB spec.) */
+ grub_millisleep (10);
+
+ grub_dprintf ("ohci", "end of portstatus=0x%02x\n",
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port));
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_usb_speed_t
+grub_ohci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
+{
+ struct grub_ohci *o = (struct grub_ohci *) dev->data;
+ grub_uint32_t status;
+
+ status = grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBPORT + port);
+
+ grub_dprintf ("ohci", "detect_dev status=0x%02x\n", status);
+
+ /* Connect Status Change bit - it detects change of connection */
+ if (status & GRUB_OHCI_RESET_CONNECT_CHANGE)
+ {
+ *changed = 1;
+ /* Reset bit Connect Status Change */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBPORT + port,
+ GRUB_OHCI_RESET_CONNECT_CHANGE);
+ }
+ else
+ *changed = 0;
+
+ if (! (status & 1))
+ return GRUB_USB_SPEED_NONE;
+ else if (status & (1 << 9))
+ return GRUB_USB_SPEED_LOW;
+ else
+ return GRUB_USB_SPEED_FULL;
+}
+
+static int
+grub_ohci_hubports (grub_usb_controller_t dev)
+{
+ struct grub_ohci *o = (struct grub_ohci *) dev->data;
+ grub_uint32_t portinfo;
+
+ portinfo = grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBA);
+
+ grub_dprintf ("ohci", "root hub ports=%d\n", portinfo & 0xFF);
+
+ return portinfo & 0xFF;
+}
+
+static grub_err_t
+grub_ohci_fini_hw (int noreturn __attribute__ ((unused)))
+{
+ struct grub_ohci *o;
+
+ for (o = ohci; o; o = o->next)
+ {
+ int i, nports = grub_ohci_readreg32 (o, GRUB_OHCI_REG_RHUBA) & 0xff;
+ grub_uint64_t maxtime;
+
+ /* Set skip in all EDs */
+ if (o->ed_bulk)
+ for (i=0; i < GRUB_OHCI_BULK_EDS; i++)
+ o->ed_bulk[i].target |= grub_cpu_to_le32 (1 << 14); /* skip */
+ if (o->ed_ctrl)
+ for (i=0; i < GRUB_OHCI_CTRL_EDS; i++)
+ o->ed_ctrl[i].target |= grub_cpu_to_le32 (1 << 14); /* skip */
+
+ /* We should wait for next SOF to be sure that all EDs are
+ * unaccessed by OHCI. But OHCI can be non-functional, so
+ * more than 1ms timeout have to be applied. */
+ /* SF bit reset. (SF bit indicates Start Of Frame (SOF) packet) */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_INTSTATUS, (1<<2));
+ maxtime = grub_get_time_ms () + 2;
+ /* Wait for new SOF or timeout */
+ while ( ((grub_ohci_readreg32 (o, GRUB_OHCI_REG_INTSTATUS) & 0x4)
+ == 0) || (grub_get_time_ms () >= maxtime) );
+
+ for (i = 0; i < nports; i++)
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_RHUBPORT + i,
+ GRUB_OHCI_CLEAR_PORT_ENABLE);
+
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CMDSTATUS, 1);
+ grub_millisleep (1);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_HCCA, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLHEAD, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLCURR, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKHEAD, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKCURR, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_DONEHEAD, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROL, 0);
+ /* Read back of register should ensure it is really written */
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_INTSTATUS);
+
+#if 0 /* Is this necessary before booting? Probably not .(?)
+ * But it must be done if module is removed ! (Or not ?)
+ * How to do it ? - Probably grub_ohci_restore_hw should be more
+ * complicated. (?)
+ * (If we do it, we need to reallocate EDs and TDs in function
+ * grub_ohci_restore_hw ! */
+
+ /* Free allocated EDs and TDs */
+ grub_dma_free (o->td_chunk);
+ grub_dma_free (o->ed_bulk_chunk);
+ grub_dma_free (o->ed_ctrl_chunk);
+ grub_dma_free (o->hcca_chunk);
+#endif
+ }
+ grub_millisleep (10);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_ohci_restore_hw (void)
+{
+ struct grub_ohci *o;
+
+ for (o = ohci; o; o = o->next)
+ {
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_HCCA, o->hcca_addr);
+ o->hcca->donehead = 0;
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_INTSTATUS, 0x7f); /* Clears everything */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLHEAD, o->ed_ctrl_addr);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROLCURR, 0);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKHEAD, o->ed_bulk_addr);
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_BULKCURR, 0);
+ /* Read back of register should ensure it is really written */
+ grub_ohci_readreg32 (o, GRUB_OHCI_REG_INTSTATUS);
+
+ /* Enable the OHCI. */
+ grub_ohci_writereg32 (o, GRUB_OHCI_REG_CONTROL,
+ (2 << 6)
+ | GRUB_OHCI_REG_CONTROL_CONTROL_ENABLE
+ | GRUB_OHCI_REG_CONTROL_BULK_ENABLE );
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+
+static struct grub_usb_controller_dev usb_controller =
+{
+ .name = "ohci",
+ .iterate = grub_ohci_iterate,
+ .setup_transfer = grub_ohci_setup_transfer,
+ .check_transfer = grub_ohci_check_transfer,
+ .cancel_transfer = grub_ohci_cancel_transfer,
+ .hubports = grub_ohci_hubports,
+ .portstatus = grub_ohci_portstatus,
+ .detect_dev = grub_ohci_detect_dev
+};
+
+GRUB_MOD_INIT(ohci)
+{
+ COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_td) == 32);
+ COMPILE_TIME_ASSERT (sizeof (struct grub_ohci_ed) == 16);
+ grub_ohci_inithw ();
+ grub_usb_controller_dev_register (&usb_controller);
+ grub_loader_register_preboot_hook (grub_ohci_fini_hw, grub_ohci_restore_hw,
+ GRUB_LOADER_PREBOOT_HOOK_PRIO_DISK);
+}
+
+GRUB_MOD_FINI(ohci)
+{
+ grub_ohci_fini_hw (0);
+ grub_usb_controller_dev_unregister (&usb_controller);
+}
diff --git a/grub-core/bus/usb/serial/common.c b/grub-core/bus/usb/serial/common.c
new file mode 100644
index 0000000..55d1884
--- /dev/null
+++ b/grub-core/bus/usb/serial/common.c
@@ -0,0 +1,134 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/serial.h>
+#include <grub/usbserial.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+void
+grub_usbserial_fini (struct grub_serial_port *port)
+{
+ port->usbdev->config[port->configno].interf[port->interfno].detach_hook = 0;
+ port->usbdev->config[port->configno].interf[port->interfno].attached = 0;
+}
+
+void
+grub_usbserial_detach (grub_usb_device_t usbdev, int configno, int interfno)
+{
+ static struct grub_serial_port *port;
+ port = usbdev->config[configno].interf[interfno].detach_data;
+
+ grub_serial_unregister (port);
+}
+
+static int usbnum = 0;
+
+int
+grub_usbserial_attach (grub_usb_device_t usbdev, int configno, int interfno,
+ struct grub_serial_driver *driver)
+{
+ struct grub_serial_port *port;
+ int j;
+ struct grub_usb_desc_if *interf;
+ grub_usb_err_t err = GRUB_USB_ERR_NONE;
+
+ interf = usbdev->config[configno].interf[interfno].descif;
+
+ port = grub_malloc (sizeof (*port));
+ if (!port)
+ {
+ grub_print_error ();
+ return 0;
+ }
+
+ port->name = grub_xasprintf ("usb%d", usbnum++);
+ if (!port->name)
+ {
+ grub_free (port);
+ grub_print_error ();
+ return 0;
+ }
+
+ port->usbdev = usbdev;
+ port->driver = driver;
+ for (j = 0; j < interf->endpointcnt; j++)
+ {
+ struct grub_usb_desc_endp *endp;
+ endp = &usbdev->config[0].interf[interfno].descendp[j];
+
+ if ((endp->endp_addr & 128) && (endp->attrib & 3) == 2)
+ {
+ /* Bulk IN endpoint. */
+ port->in_endp = endp;
+ }
+ else if (!(endp->endp_addr & 128) && (endp->attrib & 3) == 2)
+ {
+ /* Bulk OUT endpoint. */
+ port->out_endp = endp;
+ }
+ }
+
+ /* Configure device */
+ if (port->out_endp && port->in_endp)
+ err = grub_usb_set_configuration (usbdev, configno + 1);
+
+ if (!port->out_endp || !port->in_endp || err)
+ {
+ grub_free (port->name);
+ grub_free (port);
+ return 0;
+ }
+
+ port->configno = configno;
+ port->interfno = interfno;
+
+ grub_serial_config_defaults (port);
+ grub_serial_register (port);
+
+ port->usbdev->config[port->configno].interf[port->interfno].detach_hook
+ = grub_usbserial_detach;
+ port->usbdev->config[port->configno].interf[port->interfno].detach_data
+ = port;
+
+ return 1;
+}
+
+int
+grub_usbserial_fetch (struct grub_serial_port *port, grub_size_t header_size)
+{
+ grub_usb_err_t err;
+ grub_size_t actual;
+
+ if (port->bufstart < port->bufend)
+ return port->buf[port->bufstart++];
+
+ err = grub_usb_bulk_read_extended (port->usbdev, port->in_endp->endp_addr,
+ sizeof (port->buf), port->buf, 10,
+ &actual);
+ if (err != GRUB_USB_ERR_NONE)
+ return -1;
+
+ port->bufstart = header_size;
+ port->bufend = actual;
+ if (port->bufstart >= port->bufend)
+ return -1;
+
+ return port->buf[port->bufstart++];
+}
diff --git a/grub-core/bus/usb/serial/ftdi.c b/grub-core/bus/usb/serial/ftdi.c
new file mode 100644
index 0000000..07ac7ac
--- /dev/null
+++ b/grub-core/bus/usb/serial/ftdi.c
@@ -0,0 +1,207 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/serial.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/usb.h>
+#include <grub/usbserial.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+enum
+ {
+ GRUB_FTDI_MODEM_CTRL = 0x01,
+ GRUB_FTDI_FLOW_CTRL = 0x02,
+ GRUB_FTDI_SPEED_CTRL = 0x03,
+ GRUB_FTDI_DATA_CTRL = 0x04
+ };
+
+#define GRUB_FTDI_MODEM_CTRL_DTRRTS 3
+#define GRUB_FTDI_FLOW_CTRL_DTRRTS 3
+
+/* Convert speed to divisor. */
+static grub_uint32_t
+get_divisor (unsigned int speed)
+{
+ unsigned int i;
+
+ /* The structure for speed vs. divisor. */
+ struct divisor
+ {
+ unsigned int speed;
+ grub_uint32_t div;
+ };
+
+ /* The table which lists common configurations. */
+ /* Computed with a division formula with 3MHz as base frequency. */
+ static struct divisor divisor_tab[] =
+ {
+ { 2400, 0x04e2 },
+ { 4800, 0x0271 },
+ { 9600, 0x4138 },
+ { 19200, 0x809c },
+ { 38400, 0xc04e },
+ { 57600, 0xc034 },
+ { 115200, 0x001a }
+ };
+
+ /* Set the baud rate. */
+ for (i = 0; i < ARRAY_SIZE (divisor_tab); i++)
+ if (divisor_tab[i].speed == speed)
+ return divisor_tab[i].div;
+ return 0;
+}
+
+static void
+real_config (struct grub_serial_port *port)
+{
+ grub_uint32_t divisor;
+ const grub_uint16_t parities[] = {
+ [GRUB_SERIAL_PARITY_NONE] = 0x0000,
+ [GRUB_SERIAL_PARITY_ODD] = 0x0100,
+ [GRUB_SERIAL_PARITY_EVEN] = 0x0200
+ };
+ const grub_uint16_t stop_bits[] = {
+ [GRUB_SERIAL_STOP_BITS_1] = 0x0000,
+ [GRUB_SERIAL_STOP_BITS_2] = 0x1000,
+ };
+
+ if (port->configured)
+ return;
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ GRUB_FTDI_MODEM_CTRL,
+ GRUB_FTDI_MODEM_CTRL_DTRRTS, 0, 0, 0);
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ GRUB_FTDI_FLOW_CTRL,
+ GRUB_FTDI_FLOW_CTRL_DTRRTS, 0, 0, 0);
+
+ divisor = get_divisor (port->config.speed);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ GRUB_FTDI_SPEED_CTRL,
+ divisor & 0xffff, divisor >> 16, 0, 0);
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ GRUB_FTDI_DATA_CTRL,
+ parities[port->config.parity]
+ | stop_bits[port->config.stop_bits]
+ | port->config.word_len, 0, 0, 0);
+
+ port->configured = 1;
+}
+
+/* Fetch a key. */
+static int
+ftdi_hw_fetch (struct grub_serial_port *port)
+{
+ real_config (port);
+
+ return grub_usbserial_fetch (port, 2);
+}
+
+/* Put a character. */
+static void
+ftdi_hw_put (struct grub_serial_port *port, const int c)
+{
+ char cc = c;
+
+ real_config (port);
+
+ grub_usb_bulk_write (port->usbdev, port->out_endp->endp_addr, 1, &cc);
+}
+
+static grub_err_t
+ftdi_hw_configure (struct grub_serial_port *port,
+ struct grub_serial_config *config)
+{
+ grub_uint16_t divisor;
+
+ divisor = get_divisor (config->speed);
+ if (divisor == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
+
+ if (config->parity != GRUB_SERIAL_PARITY_NONE
+ && config->parity != GRUB_SERIAL_PARITY_ODD
+ && config->parity != GRUB_SERIAL_PARITY_EVEN)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported parity");
+
+ if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
+ && config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported stop bits");
+
+ if (config->word_len < 5 || config->word_len > 8)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported word length");
+
+ port->config = *config;
+ port->configured = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_serial_driver grub_ftdi_driver =
+ {
+ .configure = ftdi_hw_configure,
+ .fetch = ftdi_hw_fetch,
+ .put = ftdi_hw_put,
+ .fini = grub_usbserial_fini
+ };
+
+static const struct
+{
+ grub_uint16_t vendor, product;
+} products[] =
+ {
+ {0x0403, 0x6001} /* QEMU virtual USBserial. */
+ };
+
+static int
+grub_ftdi_attach (grub_usb_device_t usbdev, int configno, int interfno)
+{
+ unsigned j;
+
+ for (j = 0; j < ARRAY_SIZE (products); j++)
+ if (usbdev->descdev.vendorid == products[j].vendor
+ && usbdev->descdev.prodid == products[j].product)
+ break;
+ if (j == ARRAY_SIZE (products))
+ return 0;
+
+ return grub_usbserial_attach (usbdev, configno, interfno,
+ &grub_ftdi_driver);
+}
+
+static struct grub_usb_attach_desc attach_hook =
+{
+ .class = 0xff,
+ .hook = grub_ftdi_attach
+};
+
+GRUB_MOD_INIT(usbserial_ftdi)
+{
+ grub_usb_register_attach_hook_class (&attach_hook);
+}
+
+GRUB_MOD_FINI(usbserial_ftdi)
+{
+ grub_serial_unregister_driver (&grub_ftdi_driver);
+ grub_usb_unregister_attach_hook_class (&attach_hook);
+}
diff --git a/grub-core/bus/usb/serial/pl2303.c b/grub-core/bus/usb/serial/pl2303.c
new file mode 100644
index 0000000..b995411
--- /dev/null
+++ b/grub-core/bus/usb/serial/pl2303.c
@@ -0,0 +1,220 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/serial.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/usb.h>
+#include <grub/usbserial.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Convert speed to divisor. */
+static grub_uint32_t
+is_speed_supported (unsigned int speed)
+{
+ unsigned int i;
+ unsigned int supported[] = { 2400, 4800, 9600, 19200, 38400, 57600, 115200};
+
+ for (i = 0; i < ARRAY_SIZE (supported); i++)
+ if (supported[i] == speed)
+ return 1;
+ return 0;
+}
+
+#define GRUB_PL2303_REQUEST_SET_CONFIG 0x20
+#define GRUB_PL2303_STOP_BITS_1 0x0
+#define GRUB_PL2303_STOP_BITS_2 0x2
+
+#define GRUB_PL2303_PARITY_NONE 0
+#define GRUB_PL2303_PARITY_ODD 1
+#define GRUB_PL2303_PARITY_EVEN 2
+
+struct grub_pl2303_config
+{
+ grub_uint32_t speed;
+ grub_uint8_t stop_bits;
+ grub_uint8_t parity;
+ grub_uint8_t word_len;
+} __attribute__ ((packed));
+
+static void
+real_config (struct grub_serial_port *port)
+{
+ struct grub_pl2303_config config_pl2303;
+ char xx;
+
+ if (port->configured)
+ return;
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_IN,
+ 1, 0x8484, 0, 1, &xx);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 0x0404, 0, 0, 0);
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_IN,
+ 1, 0x8484, 0, 1, &xx);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_IN,
+ 1, 0x8383, 0, 1, &xx);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_IN,
+ 1, 0x8484, 0, 1, &xx);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 0x0404, 1, 0, 0);
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_IN,
+ 1, 0x8484, 0, 1, &xx);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_IN,
+ 1, 0x8383, 0, 1, &xx);
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 0, 1, 0, 0);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 1, 0, 0, 0);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 2, 0x44, 0, 0);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 8, 0, 0, 0);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 9, 0, 0, 0);
+
+ if (port->config.stop_bits == GRUB_SERIAL_STOP_BITS_2)
+ config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_2;
+ else
+ config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_1;
+
+ switch (port->config.parity)
+ {
+ case GRUB_SERIAL_PARITY_NONE:
+ config_pl2303.parity = GRUB_PL2303_PARITY_NONE;
+ break;
+ case GRUB_SERIAL_PARITY_ODD:
+ config_pl2303.parity = GRUB_PL2303_PARITY_ODD;
+ break;
+ case GRUB_SERIAL_PARITY_EVEN:
+ config_pl2303.parity = GRUB_PL2303_PARITY_EVEN;
+ break;
+ }
+
+ config_pl2303.word_len = port->config.word_len;
+ config_pl2303.speed = port->config.speed;
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT,
+ GRUB_PL2303_REQUEST_SET_CONFIG, 0, 0,
+ sizeof (config_pl2303), (char *) &config_pl2303);
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT,
+ 0x22, 3, 0, 0, 0);
+
+ grub_usb_control_msg (port->usbdev, GRUB_USB_REQTYPE_VENDOR_OUT,
+ 1, 0, 0x61, 0, 0);
+ port->configured = 1;
+}
+
+/* Fetch a key. */
+static int
+pl2303_hw_fetch (struct grub_serial_port *port)
+{
+ real_config (port);
+
+ return grub_usbserial_fetch (port, 0);
+}
+
+/* Put a character. */
+static void
+pl2303_hw_put (struct grub_serial_port *port, const int c)
+{
+ char cc = c;
+
+ real_config (port);
+
+ grub_usb_bulk_write (port->usbdev, port->out_endp->endp_addr, 1, &cc);
+}
+
+static grub_err_t
+pl2303_hw_configure (struct grub_serial_port *port,
+ struct grub_serial_config *config)
+{
+ if (!is_speed_supported (config->speed))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
+
+ if (config->parity != GRUB_SERIAL_PARITY_NONE
+ && config->parity != GRUB_SERIAL_PARITY_ODD
+ && config->parity != GRUB_SERIAL_PARITY_EVEN)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported parity");
+
+ if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
+ && config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported stop bits");
+
+ if (config->word_len < 5 || config->word_len > 8)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported word length");
+
+ port->config = *config;
+ port->configured = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_serial_driver grub_pl2303_driver =
+ {
+ .configure = pl2303_hw_configure,
+ .fetch = pl2303_hw_fetch,
+ .put = pl2303_hw_put,
+ .fini = grub_usbserial_fini
+ };
+
+static const struct
+{
+ grub_uint16_t vendor, product;
+} products[] =
+ {
+ {0x067b, 0x2303}
+ };
+
+static int
+grub_pl2303_attach (grub_usb_device_t usbdev, int configno, int interfno)
+{
+ unsigned j;
+
+ for (j = 0; j < ARRAY_SIZE (products); j++)
+ if (usbdev->descdev.vendorid == products[j].vendor
+ && usbdev->descdev.prodid == products[j].product)
+ break;
+ if (j == ARRAY_SIZE (products))
+ return 0;
+
+ return grub_usbserial_attach (usbdev, configno, interfno,
+ &grub_pl2303_driver);
+}
+
+static struct grub_usb_attach_desc attach_hook =
+{
+ .class = 0xff,
+ .hook = grub_pl2303_attach
+};
+
+GRUB_MOD_INIT(usbserial_pl2303)
+{
+ grub_usb_register_attach_hook_class (&attach_hook);
+}
+
+GRUB_MOD_FINI(usbserial_pl2303)
+{
+ grub_serial_unregister_driver (&grub_pl2303_driver);
+ grub_usb_unregister_attach_hook_class (&attach_hook);
+}
diff --git a/grub-core/bus/usb/uhci.c b/grub-core/bus/usb/uhci.c
new file mode 100644
index 0000000..99e597f
--- /dev/null
+++ b/grub-core/bus/usb/uhci.c
@@ -0,0 +1,816 @@
+/* uhci.c - UHCI Support. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/usb.h>
+#include <grub/usbtrans.h>
+#include <grub/pci.h>
+#include <grub/i386/io.h>
+#include <grub/time.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_UHCI_IOMASK (0x7FF << 5)
+
+#define N_QH 256
+#define N_TD 640
+
+typedef enum
+ {
+ GRUB_UHCI_REG_USBCMD = 0x00,
+ GRUB_UHCI_REG_FLBASEADD = 0x08,
+ GRUB_UHCI_REG_PORTSC1 = 0x10,
+ GRUB_UHCI_REG_PORTSC2 = 0x12
+ } grub_uhci_reg_t;
+
+#define GRUB_UHCI_LINK_TERMINATE 1
+#define GRUB_UHCI_LINK_QUEUE_HEAD 2
+
+enum
+ {
+ GRUB_UHCI_REG_PORTSC_CONNECT_CHANGED = 0x0002,
+ GRUB_UHCI_REG_PORTSC_PORT_ENABLED = 0x0004,
+ GRUB_UHCI_REG_PORTSC_RESUME = 0x0040,
+ GRUB_UHCI_REG_PORTSC_RESET = 0x0200,
+ GRUB_UHCI_REG_PORTSC_SUSPEND = 0x1000,
+ GRUB_UHCI_REG_PORTSC_RW = GRUB_UHCI_REG_PORTSC_PORT_ENABLED
+ | GRUB_UHCI_REG_PORTSC_RESUME | GRUB_UHCI_REG_PORTSC_RESET
+ | GRUB_UHCI_REG_PORTSC_SUSPEND,
+ /* These bits should not be written as 1 unless we really need it */
+ GRUB_UHCI_PORTSC_RWC = ((1 << 1) | (1 << 3) | (1 << 11) | (3 << 13))
+ };
+
+/* UHCI Queue Head. */
+struct grub_uhci_qh
+{
+ /* Queue head link pointer which points to the next queue head. */
+ grub_uint32_t linkptr;
+
+ /* Queue element link pointer which points to the first data object
+ within the queue. */
+ grub_uint32_t elinkptr;
+
+ /* Queue heads are aligned on 16 bytes, pad so a queue head is 16
+ bytes so we can store many in a 4K page. */
+ grub_uint8_t pad[8];
+} __attribute__ ((packed));
+
+/* UHCI Transfer Descriptor. */
+struct grub_uhci_td
+{
+ /* Pointer to the next TD in the list. */
+ grub_uint32_t linkptr;
+
+ /* Control and status bits. */
+ grub_uint32_t ctrl_status;
+
+ /* All information required to transfer the Token packet. */
+ grub_uint32_t token;
+
+ /* A pointer to the data buffer, UHCI requires this pointer to be 32
+ bits. */
+ grub_uint32_t buffer;
+
+ /* Another linkptr that is not overwritten by the Host Controller.
+ This is GRUB specific. */
+ grub_uint32_t linkptr2;
+
+ /* 3 additional 32 bits words reserved for the Host Controller Driver. */
+ grub_uint32_t data[3];
+} __attribute__ ((packed));
+
+typedef volatile struct grub_uhci_td *grub_uhci_td_t;
+typedef volatile struct grub_uhci_qh *grub_uhci_qh_t;
+
+struct grub_uhci
+{
+ int iobase;
+ grub_uint32_t *framelist;
+
+ /* N_QH Queue Heads. */
+ grub_uhci_qh_t qh;
+
+ /* N_TD Transfer Descriptors. */
+ grub_uhci_td_t td;
+
+ /* Free Transfer Descriptors. */
+ grub_uhci_td_t tdfree;
+
+ int qh_busy[N_QH];
+
+ struct grub_uhci *next;
+};
+
+static struct grub_uhci *uhci;
+
+static grub_uint16_t
+grub_uhci_readreg16 (struct grub_uhci *u, grub_uhci_reg_t reg)
+{
+ return grub_inw (u->iobase + reg);
+}
+
+#if 0
+static grub_uint32_t
+grub_uhci_readreg32 (struct grub_uhci *u, grub_uhci_reg_t reg)
+{
+ return grub_inl (u->iobase + reg);
+}
+#endif
+
+static void
+grub_uhci_writereg16 (struct grub_uhci *u,
+ grub_uhci_reg_t reg, grub_uint16_t val)
+{
+ grub_outw (val, u->iobase + reg);
+}
+
+static void
+grub_uhci_writereg32 (struct grub_uhci *u,
+ grub_uhci_reg_t reg, grub_uint32_t val)
+{
+ grub_outl (val, u->iobase + reg);
+}
+
+static grub_err_t
+grub_uhci_portstatus (grub_usb_controller_t dev,
+ unsigned int port, unsigned int enable);
+
+
+/* Iterate over all PCI devices. Determine if a device is an UHCI
+ controller. If this is the case, initialize it. */
+static int NESTED_FUNC_ATTR
+grub_uhci_pci_iter (grub_pci_device_t dev,
+ grub_pci_id_t pciid __attribute__((unused)))
+{
+ grub_uint32_t class_code;
+ grub_uint32_t class;
+ grub_uint32_t subclass;
+ grub_uint32_t interf;
+ grub_uint32_t base;
+ grub_uint32_t fp;
+ grub_pci_address_t addr;
+ struct grub_uhci *u;
+ int i;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class_code = grub_pci_read (addr) >> 8;
+
+ interf = class_code & 0xFF;
+ subclass = (class_code >> 8) & 0xFF;
+ class = class_code >> 16;
+
+ /* If this is not an UHCI controller, just return. */
+ if (class != 0x0c || subclass != 0x03 || interf != 0x00)
+ return 0;
+
+ /* Determine IO base address. */
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG4);
+ base = grub_pci_read (addr);
+ /* Stop if there is no IO space base address defined. */
+ if (! (base & 1))
+ return 0;
+
+ /* Allocate memory for the controller and register it. */
+ u = grub_zalloc (sizeof (*u));
+ if (! u)
+ return 1;
+
+ u->iobase = base & GRUB_UHCI_IOMASK;
+
+ /* Reserve a page for the frame list. */
+ u->framelist = grub_memalign (4096, 4096);
+ if (! u->framelist)
+ goto fail;
+
+ grub_dprintf ("uhci", "class=0x%02x 0x%02x interface 0x%02x base=0x%x framelist=%p\n",
+ class, subclass, interf, u->iobase, u->framelist);
+
+ /* The framelist pointer of UHCI is only 32 bits, make sure this
+ code works on on 64 bits architectures. */
+#if GRUB_CPU_SIZEOF_VOID_P == 8
+ if ((grub_uint64_t) u->framelist >> 32)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "allocated frame list memory not <4GB");
+ goto fail;
+ }
+#endif
+
+ /* The QH pointer of UHCI is only 32 bits, make sure this
+ code works on on 64 bits architectures. */
+ u->qh = (grub_uhci_qh_t) grub_memalign (4096, sizeof(struct grub_uhci_qh)*N_QH);
+ if (! u->qh)
+ goto fail;
+
+#if GRUB_CPU_SIZEOF_VOID_P == 8
+ if ((grub_uint64_t) u->qh >> 32)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "allocated QH memory not <4GB");
+ goto fail;
+ }
+#endif
+
+ /* The TD pointer of UHCI is only 32 bits, make sure this
+ code works on on 64 bits architectures. */
+ u->td = (grub_uhci_td_t) grub_memalign (4096, sizeof(struct grub_uhci_td)*N_TD);
+ if (! u->td)
+ goto fail;
+
+#if GRUB_CPU_SIZEOF_VOID_P == 8
+ if ((grub_uint64_t) u->td >> 32)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "allocated TD memory not <4GB");
+ goto fail;
+ }
+#endif
+
+ grub_dprintf ("uhci", "QH=%p, TD=%p\n",
+ u->qh, u->td);
+
+ /* Link all Transfer Descriptors in a list of available Transfer
+ Descriptors. */
+ for (i = 0; i < N_TD; i++)
+ u->td[i].linkptr = (grub_uint32_t) (grub_addr_t) &u->td[i + 1];
+ u->td[N_TD - 2].linkptr = 0;
+ u->tdfree = u->td;
+
+ /* Make sure UHCI is disabled! */
+ grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0);
+
+ /* Setup the frame list pointers. Since no isochronous transfers
+ are and will be supported, they all point to the (same!) queue
+ head. */
+ fp = (grub_uint32_t) (grub_addr_t) u->qh & (~15);
+ /* Mark this as a queue head. */
+ fp |= 2;
+ for (i = 0; i < 1024; i++)
+ u->framelist[i] = fp;
+ /* Program the framelist address into the UHCI controller. */
+ grub_uhci_writereg32 (u, GRUB_UHCI_REG_FLBASEADD,
+ (grub_uint32_t) (grub_addr_t) u->framelist);
+
+ /* Make the Queue Heads point to each other. */
+ for (i = 0; i < N_QH; i++)
+ {
+ /* Point to the next QH. */
+ u->qh[i].linkptr = (grub_uint32_t) (grub_addr_t) (&u->qh[i + 1]) & (~15);
+
+ /* This is a QH. */
+ u->qh[i].linkptr |= GRUB_UHCI_LINK_QUEUE_HEAD;
+
+ /* For the moment, do not point to a Transfer Descriptor. These
+ are set at transfer time, so just terminate it. */
+ u->qh[i].elinkptr = 1;
+ }
+
+ /* The last Queue Head should terminate. */
+ u->qh[N_QH - 1].linkptr = 1;
+
+ /* Enable UHCI again. */
+ grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 1 | (1 << 7));
+
+ /* UHCI is initialized and ready for transfers. */
+ grub_dprintf ("uhci", "UHCI initialized\n");
+
+
+#if 0
+ {
+ int i;
+ for (i = 0; i < 10; i++)
+ {
+ grub_uint16_t frnum;
+
+ frnum = grub_uhci_readreg16 (u, 6);
+ grub_dprintf ("uhci", "Framenum=%d\n", frnum);
+ grub_millisleep (100);
+ }
+ }
+#endif
+
+ /* Link to uhci now that initialisation is successful. */
+ u->next = uhci;
+ uhci = u;
+
+ return 0;
+
+ fail:
+ if (u)
+ {
+ grub_free ((void *) u->qh);
+ grub_free (u->framelist);
+ }
+ grub_free (u);
+
+ return 1;
+}
+
+static void
+grub_uhci_inithw (void)
+{
+ grub_pci_iterate (grub_uhci_pci_iter);
+}
+
+static grub_uhci_td_t
+grub_alloc_td (struct grub_uhci *u)
+{
+ grub_uhci_td_t ret;
+
+ /* Check if there is a Transfer Descriptor available. */
+ if (! u->tdfree)
+ return NULL;
+
+ ret = u->tdfree;
+ u->tdfree = (grub_uhci_td_t) (grub_addr_t) u->tdfree->linkptr;
+
+ return ret;
+}
+
+static void
+grub_free_td (struct grub_uhci *u, grub_uhci_td_t td)
+{
+ td->linkptr = (grub_uint32_t) (grub_addr_t) u->tdfree;
+ u->tdfree = td;
+}
+
+static void
+grub_free_queue (struct grub_uhci *u, grub_uhci_qh_t qh, grub_uhci_td_t td,
+ grub_usb_transfer_t transfer, grub_size_t *actual)
+{
+ int i; /* Index of TD in transfer */
+
+ u->qh_busy[qh - u->qh] = 0;
+
+ *actual = 0;
+
+ /* Free the TDs in this queue and set last_trans. */
+ for (i=0; td; i++)
+ {
+ grub_uhci_td_t tdprev;
+
+ /* Check state of TD and possibly set last_trans */
+ if (transfer && (td->linkptr & 1))
+ transfer->last_trans = i;
+
+ *actual += (td->ctrl_status + 1) & 0x7ff;
+
+ /* Unlink the queue. */
+ tdprev = td;
+ td = (grub_uhci_td_t) (grub_addr_t) td->linkptr2;
+
+ /* Free the TD. */
+ grub_free_td (u, tdprev);
+ }
+}
+
+static grub_uhci_qh_t
+grub_alloc_qh (struct grub_uhci *u,
+ grub_transaction_type_t tr __attribute__((unused)))
+{
+ int i;
+ grub_uhci_qh_t qh;
+
+ /* Look for a Queue Head for this transfer. Skip the first QH if
+ this is a Interrupt Transfer. */
+#if 0
+ if (tr == GRUB_USB_TRANSACTION_TYPE_INTERRUPT)
+ i = 0;
+ else
+#endif
+ i = 1;
+
+ for (; i < N_QH; i++)
+ {
+ if (!u->qh_busy[i])
+ break;
+ }
+ qh = &u->qh[i];
+ if (i == N_QH)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "no free queue heads available");
+ return NULL;
+ }
+
+ u->qh_busy[qh - u->qh] = 1;
+
+ return qh;
+}
+
+static grub_uhci_td_t
+grub_uhci_transaction (struct grub_uhci *u, unsigned int endp,
+ grub_transfer_type_t type, unsigned int addr,
+ unsigned int toggle, grub_size_t size,
+ grub_uint32_t data, grub_usb_speed_t speed)
+{
+ grub_uhci_td_t td;
+ static const unsigned int tf[] = { 0x69, 0xE1, 0x2D };
+
+ /* XXX: Check if data is <4GB. If it isn't, just copy stuff around.
+ This is only relevant for 64 bits architectures. */
+
+ /* Grab a free Transfer Descriptor and initialize it. */
+ td = grub_alloc_td (u);
+ if (! td)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "no transfer descriptors available for UHCI transfer");
+ return 0;
+ }
+
+ grub_dprintf ("uhci",
+ "transaction: endp=%d, type=%d, addr=%d, toggle=%d, size=%lu data=0x%x td=%p\n",
+ endp, type, addr, toggle, (unsigned long) size, data, td);
+
+ /* Don't point to any TD, just terminate. */
+ td->linkptr = 1;
+
+ /* Active! Only retry a transfer 3 times. */
+ td->ctrl_status = (1 << 23) | (3 << 27) |
+ ((speed == GRUB_USB_SPEED_LOW) ? (1 << 26) : 0);
+
+ /* If zero bytes are transmitted, size is 0x7FF. Otherwise size is
+ size-1. */
+ if (size == 0)
+ size = 0x7FF;
+ else
+ size = size - 1;
+
+ /* Setup whatever is required for the token packet. */
+ td->token = ((size << 21) | (toggle << 19) | (endp << 15)
+ | (addr << 8) | tf[type]);
+
+ td->buffer = data;
+
+ return td;
+}
+
+struct grub_uhci_transfer_controller_data
+{
+ grub_uhci_qh_t qh;
+ grub_uhci_td_t td_first;
+};
+
+static grub_usb_err_t
+grub_uhci_setup_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer)
+{
+ struct grub_uhci *u = (struct grub_uhci *) dev->data;
+ grub_uhci_td_t td;
+ grub_uhci_td_t td_prev = NULL;
+ int i;
+ struct grub_uhci_transfer_controller_data *cdata;
+
+ cdata = grub_malloc (sizeof (*cdata));
+ if (!cdata)
+ return GRUB_USB_ERR_INTERNAL;
+
+ cdata->td_first = NULL;
+
+ /* Allocate a queue head for the transfer queue. */
+ cdata->qh = grub_alloc_qh (u, GRUB_USB_TRANSACTION_TYPE_CONTROL);
+ if (! cdata->qh)
+ {
+ grub_free (cdata);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ grub_dprintf ("uhci", "transfer, iobase:%08x\n", u->iobase);
+
+ for (i = 0; i < transfer->transcnt; i++)
+ {
+ grub_usb_transaction_t tr = &transfer->transactions[i];
+
+ td = grub_uhci_transaction (u, transfer->endpoint & 15, tr->pid,
+ transfer->devaddr, tr->toggle,
+ tr->size, tr->data,
+ transfer->dev->speed);
+ if (! td)
+ {
+ grub_size_t actual = 0;
+ /* Terminate and free. */
+ td_prev->linkptr2 = 0;
+ td_prev->linkptr = 1;
+
+ if (cdata->td_first)
+ grub_free_queue (u, cdata->qh, cdata->td_first, NULL, &actual);
+
+ grub_free (cdata);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ if (! cdata->td_first)
+ cdata->td_first = td;
+ else
+ {
+ td_prev->linkptr2 = (grub_uint32_t) (grub_addr_t) td;
+ td_prev->linkptr = (grub_uint32_t) (grub_addr_t) td;
+ td_prev->linkptr |= 4;
+ }
+ td_prev = td;
+ }
+ td_prev->linkptr2 = 0;
+ td_prev->linkptr = 1;
+
+ grub_dprintf ("uhci", "setup transaction %d\n", transfer->type);
+
+ /* Link it into the queue and terminate. Now the transaction can
+ take place. */
+ cdata->qh->elinkptr = (grub_uint32_t) (grub_addr_t) cdata->td_first;
+
+ grub_dprintf ("uhci", "initiate transaction\n");
+
+ transfer->controller_data = cdata;
+
+ return GRUB_USB_ERR_NONE;
+}
+
+static grub_usb_err_t
+grub_uhci_check_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer,
+ grub_size_t *actual)
+{
+ struct grub_uhci *u = (struct grub_uhci *) dev->data;
+ grub_uhci_td_t errtd;
+ struct grub_uhci_transfer_controller_data *cdata = transfer->controller_data;
+
+ *actual = 0;
+
+ errtd = (grub_uhci_td_t) (grub_addr_t) (cdata->qh->elinkptr & ~0x0f);
+
+ grub_dprintf ("uhci", ">t status=0x%02x data=0x%02x td=%p\n",
+ errtd->ctrl_status, errtd->buffer & (~15), errtd);
+
+ /* Check if the transaction completed. */
+ if (cdata->qh->elinkptr & 1)
+ {
+ grub_dprintf ("uhci", "transaction complete\n");
+
+ /* Place the QH back in the free list and deallocate the associated
+ TDs. */
+ cdata->qh->elinkptr = 1;
+ grub_free_queue (u, cdata->qh, cdata->td_first, transfer, actual);
+ grub_free (cdata);
+ return GRUB_USB_ERR_NONE;
+ }
+
+ grub_dprintf ("uhci", "t status=0x%02x\n", errtd->ctrl_status);
+
+ if (!(errtd->ctrl_status & (1 << 23)))
+ {
+ grub_usb_err_t err = GRUB_USB_ERR_NONE;
+
+ /* Check if the endpoint is stalled. */
+ if (errtd->ctrl_status & (1 << 22))
+ err = GRUB_USB_ERR_STALL;
+
+ /* Check if an error related to the data buffer occurred. */
+ else if (errtd->ctrl_status & (1 << 21))
+ err = GRUB_USB_ERR_DATA;
+
+ /* Check if a babble error occurred. */
+ else if (errtd->ctrl_status & (1 << 20))
+ err = GRUB_USB_ERR_BABBLE;
+
+ /* Check if a NAK occurred. */
+ else if (errtd->ctrl_status & (1 << 19))
+ err = GRUB_USB_ERR_NAK;
+
+ /* Check if a timeout occurred. */
+ else if (errtd->ctrl_status & (1 << 18))
+ err = GRUB_USB_ERR_TIMEOUT;
+
+ /* Check if a bitstuff error occurred. */
+ else if (errtd->ctrl_status & (1 << 17))
+ err = GRUB_USB_ERR_BITSTUFF;
+
+ if (err)
+ {
+ grub_dprintf ("uhci", "transaction failed\n");
+
+ /* Place the QH back in the free list and deallocate the associated
+ TDs. */
+ cdata->qh->elinkptr = 1;
+ grub_free_queue (u, cdata->qh, cdata->td_first, transfer, actual);
+ grub_free (cdata);
+
+ return err;
+ }
+ }
+
+ /* Fall through, no errors occurred, so the QH might be
+ updated. */
+ grub_dprintf ("uhci", "transaction fallthrough\n");
+
+ return GRUB_USB_ERR_WAIT;
+}
+
+static grub_usb_err_t
+grub_uhci_cancel_transfer (grub_usb_controller_t dev,
+ grub_usb_transfer_t transfer)
+{
+ struct grub_uhci *u = (struct grub_uhci *) dev->data;
+ grub_size_t actual;
+ struct grub_uhci_transfer_controller_data *cdata = transfer->controller_data;
+
+ grub_dprintf ("uhci", "transaction cancel\n");
+
+ /* Place the QH back in the free list and deallocate the associated
+ TDs. */
+ cdata->qh->elinkptr = 1;
+ grub_free_queue (u, cdata->qh, cdata->td_first, transfer, &actual);
+ grub_free (cdata);
+
+ return GRUB_USB_ERR_NONE;
+}
+
+static int
+grub_uhci_iterate (int (*hook) (grub_usb_controller_t dev))
+{
+ struct grub_uhci *u;
+ struct grub_usb_controller dev;
+
+ for (u = uhci; u; u = u->next)
+ {
+ dev.data = u;
+ if (hook (&dev))
+ return 1;
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_uhci_portstatus (grub_usb_controller_t dev,
+ unsigned int port, unsigned int enable)
+{
+ struct grub_uhci *u = (struct grub_uhci *) dev->data;
+ int reg;
+ unsigned int status;
+ grub_uint64_t endtime;
+
+ grub_dprintf ("uhci", "portstatus, iobase:%08x\n", u->iobase);
+
+ grub_dprintf ("uhci", "enable=%d port=%d\n", enable, port);
+
+ if (port == 0)
+ reg = GRUB_UHCI_REG_PORTSC1;
+ else if (port == 1)
+ reg = GRUB_UHCI_REG_PORTSC2;
+ else
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "UHCI Root Hub port does not exist");
+
+ status = grub_uhci_readreg16 (u, reg);
+ grub_dprintf ("uhci", "detect=0x%02x\n", status);
+
+ if (!enable) /* We don't need reset port */
+ {
+ /* Disable the port. */
+ grub_uhci_writereg16 (u, reg, 0 << 2);
+ grub_dprintf ("uhci", "waiting for the port to be disabled\n");
+ endtime = grub_get_time_ms () + 1000;
+ while ((grub_uhci_readreg16 (u, reg) & (1 << 2)))
+ if (grub_get_time_ms () > endtime)
+ return grub_error (GRUB_ERR_IO, "UHCI Timed out - disable");
+
+ status = grub_uhci_readreg16 (u, reg);
+ grub_dprintf ("uhci", ">3detect=0x%02x\n", status);
+ return GRUB_ERR_NONE;
+ }
+
+ /* Reset the port. */
+ status = grub_uhci_readreg16 (u, reg) & ~GRUB_UHCI_PORTSC_RWC;
+ grub_uhci_writereg16 (u, reg, status | (1 << 9));
+ grub_uhci_readreg16 (u, reg); /* Ensure it is writen... */
+
+ /* Wait for the reset to complete. XXX: How long exactly? */
+ grub_millisleep (50); /* For root hub should be nominaly 50ms */
+ status = grub_uhci_readreg16 (u, reg) & ~GRUB_UHCI_PORTSC_RWC;
+ grub_uhci_writereg16 (u, reg, status & ~(1 << 9));
+ grub_uhci_readreg16 (u, reg); /* Ensure it is writen... */
+
+ /* Note: some debug prints were removed because they affected reset/enable timing. */
+
+ grub_millisleep (1); /* Probably not needed at all or only few microsecs. */
+
+ /* Reset bits Connect & Enable Status Change */
+ status = grub_uhci_readreg16 (u, reg) & ~GRUB_UHCI_PORTSC_RWC;
+ grub_uhci_writereg16 (u, reg, status | (1 << 3) | GRUB_UHCI_REG_PORTSC_CONNECT_CHANGED);
+ grub_uhci_readreg16 (u, reg); /* Ensure it is writen... */
+
+ /* Enable the port. */
+ status = grub_uhci_readreg16 (u, reg) & ~GRUB_UHCI_PORTSC_RWC;
+ grub_uhci_writereg16 (u, reg, status | (1 << 2));
+ grub_uhci_readreg16 (u, reg); /* Ensure it is writen... */
+
+ endtime = grub_get_time_ms () + 1000;
+ while (! ((status = grub_uhci_readreg16 (u, reg)) & (1 << 2)))
+ if (grub_get_time_ms () > endtime)
+ return grub_error (GRUB_ERR_IO, "UHCI Timed out - enable");
+
+ /* Reset recovery time */
+ grub_millisleep (10);
+
+ /* Read final port status */
+ status = grub_uhci_readreg16 (u, reg);
+ grub_dprintf ("uhci", ">3detect=0x%02x\n", status);
+
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_usb_speed_t
+grub_uhci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
+{
+ struct grub_uhci *u = (struct grub_uhci *) dev->data;
+ int reg;
+ unsigned int status;
+
+ grub_dprintf ("uhci", "detect_dev, iobase:%08x\n", u->iobase);
+
+ if (port == 0)
+ reg = GRUB_UHCI_REG_PORTSC1;
+ else if (port == 1)
+ reg = GRUB_UHCI_REG_PORTSC2;
+ else
+ return GRUB_USB_SPEED_NONE;
+
+ status = grub_uhci_readreg16 (u, reg);
+
+ grub_dprintf ("uhci", "detect=0x%02x port=%d\n", status, port);
+
+ /* Connect Status Change bit - it detects change of connection */
+ if (status & (1 << 1))
+ {
+ *changed = 1;
+ /* Reset bit Connect Status Change */
+ grub_uhci_writereg16 (u, reg, (status & GRUB_UHCI_REG_PORTSC_RW)
+ | GRUB_UHCI_REG_PORTSC_CONNECT_CHANGED);
+ }
+ else
+ *changed = 0;
+
+ if (! (status & 1))
+ return GRUB_USB_SPEED_NONE;
+ else if (status & (1 << 8))
+ return GRUB_USB_SPEED_LOW;
+ else
+ return GRUB_USB_SPEED_FULL;
+}
+
+static int
+grub_uhci_hubports (grub_usb_controller_t dev __attribute__((unused)))
+{
+ /* The root hub has exactly two ports. */
+ return 2;
+}
+
+
+static struct grub_usb_controller_dev usb_controller =
+{
+ .name = "uhci",
+ .iterate = grub_uhci_iterate,
+ .setup_transfer = grub_uhci_setup_transfer,
+ .check_transfer = grub_uhci_check_transfer,
+ .cancel_transfer = grub_uhci_cancel_transfer,
+ .hubports = grub_uhci_hubports,
+ .portstatus = grub_uhci_portstatus,
+ .detect_dev = grub_uhci_detect_dev
+};
+
+GRUB_MOD_INIT(uhci)
+{
+ grub_uhci_inithw ();
+ grub_usb_controller_dev_register (&usb_controller);
+ grub_dprintf ("uhci", "registered\n");
+}
+
+GRUB_MOD_FINI(uhci)
+{
+ struct grub_uhci *u;
+
+ /* Disable all UHCI controllers. */
+ for (u = uhci; u; u = u->next)
+ grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0);
+
+ /* Unregister the controller. */
+ grub_usb_controller_dev_unregister (&usb_controller);
+}
diff --git a/grub-core/bus/usb/usb.c b/grub-core/bus/usb/usb.c
new file mode 100644
index 0000000..005d3bc
--- /dev/null
+++ b/grub-core/bus/usb/usb.c
@@ -0,0 +1,349 @@
+/* usb.c - Generic USB interfaces. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/usb.h>
+#include <grub/misc.h>
+#include <grub/list.h>
+#include <grub/term.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_usb_controller_dev_t grub_usb_list;
+static struct grub_usb_attach_desc *attach_hooks;
+
+void
+grub_usb_controller_dev_register (grub_usb_controller_dev_t usb)
+{
+ auto int iterate_hook (grub_usb_controller_t dev);
+
+ /* Iterate over all controllers found by the driver. */
+ int iterate_hook (grub_usb_controller_t dev)
+ {
+ dev->dev = usb;
+
+ /* Enable the ports of the USB Root Hub. */
+ grub_usb_root_hub (dev);
+
+ return 0;
+ }
+
+ usb->next = grub_usb_list;
+ grub_usb_list = usb;
+
+ if (usb->iterate)
+ usb->iterate (iterate_hook);
+}
+
+void
+grub_usb_controller_dev_unregister (grub_usb_controller_dev_t usb)
+{
+ grub_usb_controller_dev_t *p, q;
+
+ for (p = &grub_usb_list, q = *p; q; p = &(q->next), q = q->next)
+ if (q == usb)
+ {
+ *p = q->next;
+ break;
+ }
+}
+
+#if 0
+int
+grub_usb_controller_iterate (int (*hook) (grub_usb_controller_t dev))
+{
+ grub_usb_controller_dev_t p;
+
+ auto int iterate_hook (grub_usb_controller_t dev);
+
+ int iterate_hook (grub_usb_controller_t dev)
+ {
+ dev->dev = p;
+ if (hook (dev))
+ return 1;
+ return 0;
+ }
+
+ /* Iterate over all controller drivers. */
+ for (p = grub_usb_list; p; p = p->next)
+ {
+ /* Iterate over the busses of the controllers. XXX: Actually, a
+ hub driver should do this. */
+ if (p->iterate (iterate_hook))
+ return 1;
+ }
+
+ return 0;
+}
+#endif
+
+
+grub_usb_err_t
+grub_usb_clear_halt (grub_usb_device_t dev, int endpoint)
+{
+ dev->toggle[endpoint] = 0;
+ return grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_STANDARD
+ | GRUB_USB_REQTYPE_TARGET_ENDP),
+ GRUB_USB_REQ_CLEAR_FEATURE,
+ GRUB_USB_FEATURE_ENDP_HALT,
+ endpoint, 0, 0);
+}
+
+grub_usb_err_t
+grub_usb_set_configuration (grub_usb_device_t dev, int configuration)
+{
+ grub_memset (dev->toggle, 0, sizeof (dev->toggle));
+
+ return grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_STANDARD
+ | GRUB_USB_REQTYPE_TARGET_DEV),
+ GRUB_USB_REQ_SET_CONFIGURATION, configuration,
+ 0, 0, NULL);
+}
+
+grub_usb_err_t
+grub_usb_get_descriptor (grub_usb_device_t dev,
+ grub_uint8_t type, grub_uint8_t index,
+ grub_size_t size, char *data)
+{
+ return grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN
+ | GRUB_USB_REQTYPE_STANDARD
+ | GRUB_USB_REQTYPE_TARGET_DEV),
+ GRUB_USB_REQ_GET_DESCRIPTOR,
+ (type << 8) | index,
+ 0, size, data);
+}
+
+struct grub_usb_desc_endp *
+grub_usb_get_endpdescriptor (grub_usb_device_t usbdev, int addr)
+{
+ int i;
+
+ for (i = 0; i < usbdev->config[0].descconf->numif; i++)
+ {
+ struct grub_usb_desc_if *interf;
+ int j;
+
+ interf = usbdev->config[0].interf[i].descif;
+
+ for (j = 0; j < interf->endpointcnt; j++)
+ {
+ struct grub_usb_desc_endp *endp;
+ endp = &usbdev->config[0].interf[i].descendp[j];
+
+ if (endp->endp_addr == addr)
+ return endp;
+ }
+ }
+
+ return NULL;
+}
+
+grub_usb_err_t
+grub_usb_device_initialize (grub_usb_device_t dev)
+{
+ struct grub_usb_desc_device *descdev;
+ struct grub_usb_desc_config config;
+ grub_usb_err_t err;
+ int i;
+
+ /* First we have to read first 8 bytes only and determine
+ * max. size of packet */
+ dev->descdev.maxsize0 = 0; /* invalidating, for safety only, can be removed if it is sure it is zero here */
+ err = grub_usb_get_descriptor (dev, GRUB_USB_DESCRIPTOR_DEVICE,
+ 0, 8, (char *) &dev->descdev);
+ if (err)
+ return err;
+
+ /* Now we have valid value in dev->descdev.maxsize0,
+ * so we can read whole device descriptor */
+ err = grub_usb_get_descriptor (dev, GRUB_USB_DESCRIPTOR_DEVICE,
+ 0, sizeof (struct grub_usb_desc_device),
+ (char *) &dev->descdev);
+ if (err)
+ return err;
+ descdev = &dev->descdev;
+
+ for (i = 0; i < 8; i++)
+ dev->config[i].descconf = NULL;
+
+ for (i = 0; i < descdev->configcnt; i++)
+ {
+ int pos;
+ int currif;
+ char *data;
+
+ /* First just read the first 4 bytes of the configuration
+ descriptor, after that it is known how many bytes really have
+ to be read. */
+ err = grub_usb_get_descriptor (dev, GRUB_USB_DESCRIPTOR_CONFIG, i, 4,
+ (char *) &config);
+
+ data = grub_malloc (config.totallen);
+ if (! data)
+ {
+ err = GRUB_USB_ERR_INTERNAL;
+ goto fail;
+ }
+
+ dev->config[i].descconf = (struct grub_usb_desc_config *) data;
+ err = grub_usb_get_descriptor (dev, GRUB_USB_DESCRIPTOR_CONFIG, i,
+ config.totallen, data);
+ if (err)
+ goto fail;
+
+ /* Skip the configuration descriptor. */
+ pos = dev->config[i].descconf->length;
+
+ /* Read all interfaces. */
+ for (currif = 0; currif < dev->config[i].descconf->numif; currif++)
+ {
+ while (pos < config.totallen
+ && ((struct grub_usb_desc *)&data[pos])->type
+ != GRUB_USB_DESCRIPTOR_INTERFACE)
+ pos += ((struct grub_usb_desc *)&data[pos])->length;
+ dev->config[i].interf[currif].descif
+ = (struct grub_usb_desc_if *) &data[pos];
+ pos += dev->config[i].interf[currif].descif->length;
+
+ while (pos < config.totallen
+ && ((struct grub_usb_desc *)&data[pos])->type
+ != GRUB_USB_DESCRIPTOR_ENDPOINT)
+ pos += ((struct grub_usb_desc *)&data[pos])->length;
+
+ /* Point to the first endpoint. */
+ dev->config[i].interf[currif].descendp
+ = (struct grub_usb_desc_endp *) &data[pos];
+ pos += (sizeof (struct grub_usb_desc_endp)
+ * dev->config[i].interf[currif].descif->endpointcnt);
+ }
+ }
+
+ return GRUB_USB_ERR_NONE;
+
+ fail:
+
+ for (i = 0; i < 8; i++)
+ grub_free (dev->config[i].descconf);
+
+ return err;
+}
+
+void grub_usb_device_attach (grub_usb_device_t dev)
+{
+ int i;
+
+ /* XXX: Just check configuration 0 for now. */
+ for (i = 0; i < dev->config[0].descconf->numif; i++)
+ {
+ struct grub_usb_desc_if *interf;
+ struct grub_usb_attach_desc *desc;
+
+ interf = dev->config[0].interf[i].descif;
+
+ grub_dprintf ("usb", "iterate: interf=%d, class=%d, subclass=%d, protocol=%d\n",
+ i, interf->class, interf->subclass, interf->protocol);
+
+ if (dev->config[0].interf[i].attached)
+ continue;
+
+ for (desc = attach_hooks; desc; desc = desc->next)
+ if (interf->class == desc->class && desc->hook (dev, 0, i))
+ dev->config[0].interf[i].attached = 1;
+
+ if (dev->config[0].interf[i].attached)
+ continue;
+
+ switch (interf->class)
+ {
+ case GRUB_USB_CLASS_MASS_STORAGE:
+ grub_dl_load ("usbms");
+ break;
+ case GRUB_USB_CLASS_HID:
+ grub_dl_load ("usb_keyboard");
+ break;
+ case 0xff:
+ /* FIXME: don't load useless modules. */
+ grub_dl_load ("usbserial_ftdi");
+ grub_dl_load ("usbserial_pl2303");
+ break;
+ }
+ }
+}
+
+void
+grub_usb_register_attach_hook_class (struct grub_usb_attach_desc *desc)
+{
+ auto int usb_iterate (grub_usb_device_t dev);
+
+ int usb_iterate (grub_usb_device_t usbdev)
+ {
+ struct grub_usb_desc_device *descdev = &usbdev->descdev;
+ int i;
+
+ if (descdev->class != 0 || descdev->subclass || descdev->protocol != 0
+ || descdev->configcnt == 0)
+ return 0;
+
+ /* XXX: Just check configuration 0 for now. */
+ for (i = 0; i < usbdev->config[0].descconf->numif; i++)
+ {
+ struct grub_usb_desc_if *interf;
+
+ interf = usbdev->config[0].interf[i].descif;
+
+ grub_dprintf ("usb", "iterate: interf=%d, class=%d, subclass=%d, protocol=%d\n",
+ i, interf->class, interf->subclass, interf->protocol);
+
+ if (usbdev->config[0].interf[i].attached)
+ continue;
+
+ if (interf->class != desc->class)
+ continue;
+ if (desc->hook (usbdev, 0, i))
+ usbdev->config[0].interf[i].attached = 1;
+ }
+
+ return 0;
+ }
+
+ desc->next = attach_hooks;
+ attach_hooks = desc;
+
+ grub_usb_iterate (usb_iterate);
+}
+
+void
+grub_usb_unregister_attach_hook_class (struct grub_usb_attach_desc *desc)
+{
+ grub_list_remove (GRUB_AS_LIST_P (&attach_hooks), GRUB_AS_LIST (desc));
+}
+
+
+GRUB_MOD_INIT(usb)
+{
+ grub_term_poll_usb = grub_usb_poll_devices;
+}
+
+GRUB_MOD_FINI(usb)
+{
+ grub_term_poll_usb = NULL;
+}
diff --git a/grub-core/bus/usb/usbhub.c b/grub-core/bus/usb/usbhub.c
new file mode 100644
index 0000000..82bb2da
--- /dev/null
+++ b/grub-core/bus/usb/usbhub.c
@@ -0,0 +1,559 @@
+/* usb.c - USB Hub Support. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/usb.h>
+#include <grub/misc.h>
+#include <grub/time.h>
+
+#define GRUB_USBHUB_MAX_DEVICES 128
+
+/* USB Supports 127 devices, with device 0 as special case. */
+static struct grub_usb_device *grub_usb_devs[GRUB_USBHUB_MAX_DEVICES];
+
+static int rescan = 0;
+
+struct grub_usb_hub
+{
+ struct grub_usb_hub *next;
+ grub_usb_controller_t controller;
+ int nports;
+ struct grub_usb_device **devices;
+ grub_usb_device_t dev;
+};
+
+static struct grub_usb_hub *hubs;
+
+/* Add a device that currently has device number 0 and resides on
+ CONTROLLER, the Hub reported that the device speed is SPEED. */
+static grub_usb_device_t
+grub_usb_hub_add_dev (grub_usb_controller_t controller, grub_usb_speed_t speed)
+{
+ grub_usb_device_t dev;
+ int i;
+ grub_usb_err_t err;
+
+ dev = grub_zalloc (sizeof (struct grub_usb_device));
+ if (! dev)
+ return NULL;
+
+ dev->controller = *controller;
+ dev->speed = speed;
+
+ err = grub_usb_device_initialize (dev);
+ if (err)
+ {
+ grub_free (dev);
+ return NULL;
+ }
+
+ /* Assign a new address to the device. */
+ for (i = 1; i < GRUB_USBHUB_MAX_DEVICES; i++)
+ {
+ if (! grub_usb_devs[i])
+ break;
+ }
+ if (i == GRUB_USBHUB_MAX_DEVICES)
+ {
+ grub_error (GRUB_ERR_IO, "can't assign address to USB device");
+ for (i = 0; i < 8; i++)
+ grub_free (dev->config[i].descconf);
+ grub_free (dev);
+ return NULL;
+ }
+
+ err = grub_usb_control_msg (dev,
+ (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_STANDARD
+ | GRUB_USB_REQTYPE_TARGET_DEV),
+ GRUB_USB_REQ_SET_ADDRESS,
+ i, 0, 0, NULL);
+ if (err)
+ {
+ for (i = 0; i < 8; i++)
+ grub_free (dev->config[i].descconf);
+ grub_free (dev);
+ return NULL;
+ }
+
+ dev->addr = i;
+ dev->initialized = 1;
+ grub_usb_devs[i] = dev;
+
+ /* Wait "recovery interval", spec. says 2ms */
+ grub_millisleep (2);
+
+ grub_usb_device_attach (dev);
+
+ return dev;
+}
+
+
+static grub_usb_err_t
+grub_usb_add_hub (grub_usb_device_t dev)
+{
+ struct grub_usb_usb_hubdesc hubdesc;
+ grub_usb_err_t err;
+ int i;
+
+ err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_DEV),
+ GRUB_USB_REQ_GET_DESCRIPTOR,
+ (GRUB_USB_DESCRIPTOR_HUB << 8) | 0,
+ 0, sizeof (hubdesc), (char *) &hubdesc);
+ if (err)
+ return err;
+ grub_dprintf ("usb", "Hub descriptor:\n\t\t len:%d, typ:0x%02x, cnt:%d, char:0x%02x, pwg:%d, curr:%d\n",
+ hubdesc.length, hubdesc.type, hubdesc.portcnt,
+ hubdesc.characteristics, hubdesc.pwdgood,
+ hubdesc.current);
+
+ /* Activate the first configuration. Hubs should have only one conf. */
+ grub_dprintf ("usb", "Hub set configuration\n");
+ grub_usb_set_configuration (dev, 1);
+
+ dev->children = grub_zalloc (hubdesc.portcnt * sizeof (dev->children[0]));
+ if (!dev->children)
+ return GRUB_USB_ERR_INTERNAL;
+ dev->nports = hubdesc.portcnt;
+
+ /* Power on all Hub ports. */
+ for (i = 1; i <= hubdesc.portcnt; i++)
+ {
+ grub_dprintf ("usb", "Power on - port %d\n", i);
+ /* Power on the port and wait for possible device connect */
+ grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_SET_FEATURE,
+ GRUB_USB_HUB_FEATURE_PORT_POWER,
+ i, 0, NULL);
+ }
+
+ /* Rest will be done on next usb poll. */
+ for (i = 0; i < dev->config[0].interf[0].descif->endpointcnt;
+ i++)
+ {
+ struct grub_usb_desc_endp *endp = NULL;
+ endp = &dev->config[0].interf[0].descendp[i];
+
+ if ((endp->endp_addr & 128) && grub_usb_get_ep_type(endp)
+ == GRUB_USB_EP_INTERRUPT)
+ {
+ dev->hub_endpoint = endp;
+ dev->hub_transfer
+ = grub_usb_bulk_read_background (dev, endp->endp_addr,
+ grub_min (endp->maxpacket,
+ sizeof (dev->statuschange)),
+ (char *) &dev->statuschange);
+ break;
+ }
+ }
+
+ rescan = 1;
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+attach_root_port (struct grub_usb_hub *hub, int portno,
+ grub_usb_speed_t speed)
+{
+ grub_usb_device_t dev;
+ grub_err_t err;
+ int total, i;
+ grub_usb_speed_t current_speed = GRUB_USB_SPEED_NONE;
+ int changed=0;
+
+#if 0
+/* Specification does not say about disabling of port when device
+ * connected. If disabling is really necessary for some devices,
+ * delete this #if 0 and related #endif */
+ /* Disable the port. XXX: Why? */
+ err = hub->controller->dev->portstatus (hub->controller, portno, 0);
+ if (err)
+ return;
+#endif
+ /* Wait for completion of insertion and stable power (USB spec.)
+ * Should be at least 100ms, some devices requires more...
+ * There is also another thing - some devices have worse contacts
+ * and connected signal is unstable for some time - we should handle
+ * it - but prevent deadlock in case when device is too faulty... */
+ for (total = i = 0; (i < 250) && (total < 2000); i++, total++)
+ {
+ grub_millisleep (1);
+ current_speed = hub->controller->dev->detect_dev
+ (hub->controller, portno, &changed);
+ if (current_speed == GRUB_USB_SPEED_NONE)
+ i = 0;
+ }
+ grub_dprintf ("usb", "total=%d\n", total);
+ if (total >= 2000)
+ return;
+
+ /* Enable the port. */
+ err = hub->controller->dev->portstatus (hub->controller, portno, 1);
+ if (err)
+ return;
+ hub->controller->dev->pending_reset = grub_get_time_ms () + 5000;
+
+ /* Enable the port and create a device. */
+ dev = grub_usb_hub_add_dev (hub->controller, speed);
+ hub->controller->dev->pending_reset = 0;
+ if (! dev)
+ return;
+
+ hub->devices[portno] = dev;
+
+ /* If the device is a Hub, scan it for more devices. */
+ if (dev->descdev.class == 0x09)
+ grub_usb_add_hub (dev);
+}
+
+grub_usb_err_t
+grub_usb_root_hub (grub_usb_controller_t controller)
+{
+ int i;
+ struct grub_usb_hub *hub;
+ int changed=0;
+
+ hub = grub_malloc (sizeof (*hub));
+ if (!hub)
+ return GRUB_USB_ERR_INTERNAL;
+
+ hub->next = hubs;
+ hubs = hub;
+ hub->controller = grub_malloc (sizeof (*controller));
+ if (!hub->controller)
+ {
+ grub_free (hub);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ grub_memcpy (hub->controller, controller, sizeof (*controller));
+ hub->dev = 0;
+
+ /* Query the number of ports the root Hub has. */
+ hub->nports = controller->dev->hubports (controller);
+ hub->devices = grub_zalloc (sizeof (hub->devices[0]) * hub->nports);
+ if (!hub->devices)
+ {
+ grub_free (hub->controller);
+ grub_free (hub);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ for (i = 0; i < hub->nports; i++)
+ {
+ grub_usb_speed_t speed;
+ if (!controller->dev->pending_reset)
+ {
+ speed = controller->dev->detect_dev (hub->controller, i,
+ &changed);
+
+ if (speed != GRUB_USB_SPEED_NONE)
+ attach_root_port (hub, i, speed);
+ }
+ }
+
+ return GRUB_USB_ERR_NONE;
+}
+
+static void detach_device (grub_usb_device_t dev);
+
+static void
+detach_device (grub_usb_device_t dev)
+{
+ unsigned i;
+ int k;
+ if (!dev)
+ return;
+ if (dev->descdev.class == GRUB_USB_CLASS_HUB)
+ {
+ if (dev->hub_transfer)
+ grub_usb_cancel_transfer (dev->hub_transfer);
+
+ for (i = 0; i < dev->nports; i++)
+ detach_device (dev->children[i]);
+ grub_free (dev->children);
+ }
+ for (i = 0; i < ARRAY_SIZE (dev->config); i++)
+ if (dev->config[i].descconf)
+ for (k = 0; k < dev->config[i].descconf->numif; k++)
+ {
+ struct grub_usb_interface *inter = &dev->config[i].interf[k];
+ if (inter && inter->detach_hook)
+ inter->detach_hook (dev, i, k);
+ }
+ grub_usb_devs[dev->addr] = 0;
+}
+
+static void
+poll_nonroot_hub (grub_usb_device_t dev)
+{
+ grub_usb_err_t err;
+ unsigned i;
+ grub_uint8_t changed;
+ grub_size_t actual;
+ int j, total;
+
+ if (!dev->hub_transfer)
+ return;
+
+ err = grub_usb_check_transfer (dev->hub_transfer, &actual);
+
+ if (err == GRUB_USB_ERR_WAIT)
+ return;
+
+ changed = dev->statuschange;
+
+ dev->hub_transfer
+ = grub_usb_bulk_read_background (dev, dev->hub_endpoint->endp_addr,
+ grub_min (dev->hub_endpoint->maxpacket,
+ sizeof (dev->statuschange)),
+ (char *) &dev->statuschange);
+
+ if (err || actual == 0 || changed == 0)
+ return;
+
+ /* Iterate over the Hub ports. */
+ for (i = 1; i <= dev->nports; i++)
+ {
+ grub_uint32_t status;
+ grub_uint32_t current_status = 0;
+
+ if (!(changed & (1 << i)))
+ continue;
+
+ /* Get the port status. */
+ err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_GET_STATUS,
+ 0, i, sizeof (status), (char *) &status);
+
+ grub_printf ("dev = %p, i = %d, status = %08x\n",
+ dev, i, status);
+
+ if (err)
+ continue;
+
+ /* FIXME: properly handle these conditions. */
+ if (status & GRUB_USB_HUB_STATUS_C_PORT_ENABLED)
+ grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_CLEAR_FEATURE,
+ GRUB_USB_HUB_FEATURE_C_PORT_ENABLED, i, 0, 0);
+
+ if (status & GRUB_USB_HUB_STATUS_C_PORT_SUSPEND)
+ grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_CLEAR_FEATURE,
+ GRUB_USB_HUB_FEATURE_C_PORT_SUSPEND, i, 0, 0);
+
+ if (status & GRUB_USB_HUB_STATUS_C_PORT_OVERCURRENT)
+ grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_CLEAR_FEATURE,
+ GRUB_USB_HUB_FEATURE_C_PORT_OVERCURRENT, i, 0, 0);
+
+ if (!dev->controller.dev->pending_reset &&
+ (status & GRUB_USB_HUB_STATUS_C_PORT_CONNECTED))
+ {
+ grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_CLEAR_FEATURE,
+ GRUB_USB_HUB_FEATURE_C_PORT_CONNECTED, i, 0, 0);
+
+ detach_device (dev->children[i - 1]);
+ dev->children[i - 1] = NULL;
+
+ /* Connected and status of connection changed ? */
+ if (status & GRUB_USB_HUB_STATUS_PORT_CONNECTED)
+ {
+ /* A device is actually connected to this port. */
+ /* Wait for completion of insertion and stable power (USB spec.)
+ * Should be at least 100ms, some devices requires more...
+ * There is also another thing - some devices have worse contacts
+ * and connected signal is unstable for some time - we should handle
+ * it - but prevent deadlock in case when device is too faulty... */
+ for (total = j = 0; (j < 250) && (total < 2000); j++, total++)
+ {
+ grub_millisleep (1);
+ /* Get the port status. */
+ err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_GET_STATUS,
+ 0, i,
+ sizeof (current_status),
+ (char *) &current_status);
+ if (err)
+ {
+ total = 2000;
+ break;
+ }
+ if (!(current_status & GRUB_USB_HUB_STATUS_PORT_CONNECTED))
+ j = 0;
+ }
+ grub_dprintf ("usb", "(non-root) total=%d\n", total);
+ if (total >= 2000)
+ continue;
+
+ /* Now do reset of port. */
+ grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_SET_FEATURE,
+ GRUB_USB_HUB_FEATURE_PORT_RESET,
+ i, 0, 0);
+ rescan = 1;
+ /* We cannot reset more than one device at the same time !
+ * Resetting more devices together results in very bad
+ * situation: more than one device has default address 0
+ * at the same time !!!
+ * Additionaly, we cannot perform another reset
+ * anywhere on the same OHCI controller until
+ * we will finish addressing of reseted device ! */
+ dev->controller.dev->pending_reset = grub_get_time_ms () + 5000;
+ return;
+ }
+ }
+
+ if (status & GRUB_USB_HUB_STATUS_C_PORT_RESET)
+ {
+ grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_OUT
+ | GRUB_USB_REQTYPE_CLASS
+ | GRUB_USB_REQTYPE_TARGET_OTHER),
+ GRUB_USB_REQ_CLEAR_FEATURE,
+ GRUB_USB_HUB_FEATURE_C_PORT_RESET, i, 0, 0);
+
+ if (status & GRUB_USB_HUB_STATUS_PORT_CONNECTED)
+ {
+ grub_usb_speed_t speed;
+ grub_usb_device_t next_dev;
+
+ /* Determine the device speed. */
+ if (status & GRUB_USB_HUB_STATUS_PORT_LOWSPEED)
+ speed = GRUB_USB_SPEED_LOW;
+ else
+ {
+ if (status & GRUB_USB_HUB_STATUS_PORT_HIGHSPEED)
+ speed = GRUB_USB_SPEED_HIGH;
+ else
+ speed = GRUB_USB_SPEED_FULL;
+ }
+
+ /* Wait a recovery time after reset, spec. says 10ms */
+ grub_millisleep (10);
+
+ /* Add the device and assign a device address to it. */
+ next_dev = grub_usb_hub_add_dev (&dev->controller, speed);
+ dev->controller.dev->pending_reset = 0;
+ if (! next_dev)
+ continue;
+
+ dev->children[i - 1] = next_dev;
+
+ /* If the device is a Hub, scan it for more devices. */
+ if (next_dev->descdev.class == 0x09)
+ grub_usb_add_hub (next_dev);
+ }
+ }
+ }
+}
+
+void
+grub_usb_poll_devices (void)
+{
+ struct grub_usb_hub *hub;
+ int i;
+
+ for (hub = hubs; hub; hub = hub->next)
+ {
+ /* Do we have to recheck number of ports? */
+ /* No, it should be never changed, it should be constant. */
+ for (i = 0; i < hub->nports; i++)
+ {
+ grub_usb_speed_t speed = GRUB_USB_SPEED_NONE;
+ int changed = 0;
+
+ if (!hub->controller->dev->pending_reset)
+ {
+ /* Check for possible timeout */
+ if (grub_get_time_ms () > hub->controller->dev->pending_reset)
+ {
+ /* Something went wrong, reset device was not
+ * addressed properly, timeout happened */
+ hub->controller->dev->pending_reset = 0;
+ speed = hub->controller->dev->detect_dev (hub->controller,
+ i, &changed);
+ }
+ }
+ if (changed)
+ {
+ detach_device (hub->devices[i]);
+ hub->devices[i] = NULL;
+ if (speed != GRUB_USB_SPEED_NONE)
+ attach_root_port (hub, i, speed);
+ }
+ }
+ }
+
+ while (1)
+ {
+ rescan = 0;
+
+ /* We should check changes of non-root hubs too. */
+ for (i = 0; i < GRUB_USBHUB_MAX_DEVICES; i++)
+ {
+ grub_usb_device_t dev = grub_usb_devs[i];
+
+ if (dev && dev->descdev.class == 0x09)
+ poll_nonroot_hub (dev);
+ }
+ if (!rescan)
+ break;
+ grub_millisleep (50);
+ }
+
+}
+
+int
+grub_usb_iterate (int (*hook) (grub_usb_device_t dev))
+{
+ int i;
+
+ for (i = 0; i < GRUB_USBHUB_MAX_DEVICES; i++)
+ {
+ if (grub_usb_devs[i])
+ {
+ if (hook (grub_usb_devs[i]))
+ return 1;
+ }
+ }
+
+ return 0;
+}
diff --git a/grub-core/bus/usb/usbtrans.c b/grub-core/bus/usb/usbtrans.c
new file mode 100644
index 0000000..167fae5
--- /dev/null
+++ b/grub-core/bus/usb/usbtrans.c
@@ -0,0 +1,413 @@
+/* usbtrans.c - USB Transfers and Transactions. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/pci.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/usb.h>
+#include <grub/usbtrans.h>
+#include <grub/time.h>
+
+static grub_usb_err_t
+grub_usb_execute_and_wait_transfer (grub_usb_device_t dev,
+ grub_usb_transfer_t transfer,
+ int timeout, grub_size_t *actual)
+{
+ grub_usb_err_t err;
+ grub_uint64_t endtime;
+
+ err = dev->controller.dev->setup_transfer (&dev->controller, transfer);
+ if (err)
+ return err;
+ /* endtime moved behind setup transfer to prevent false timeouts
+ * while debugging... */
+ endtime = grub_get_time_ms () + timeout;
+ while (1)
+ {
+ err = dev->controller.dev->check_transfer (&dev->controller, transfer,
+ actual);
+ if (!err)
+ return GRUB_USB_ERR_NONE;
+ if (err != GRUB_USB_ERR_WAIT)
+ return err;
+ if (grub_get_time_ms () > endtime)
+ {
+ err = dev->controller.dev->cancel_transfer (&dev->controller,
+ transfer);
+ if (err)
+ return err;
+ return GRUB_USB_ERR_TIMEOUT;
+ }
+ grub_cpu_idle ();
+ }
+}
+
+grub_usb_err_t
+grub_usb_control_msg (grub_usb_device_t dev,
+ grub_uint8_t reqtype,
+ grub_uint8_t request,
+ grub_uint16_t value,
+ grub_uint16_t index,
+ grub_size_t size0, char *data_in)
+{
+ int i;
+ grub_usb_transfer_t transfer;
+ int datablocks;
+ volatile struct grub_usb_packet_setup *setupdata;
+ grub_uint32_t setupdata_addr;
+ grub_usb_err_t err;
+ unsigned int max;
+ struct grub_pci_dma_chunk *data_chunk, *setupdata_chunk;
+ volatile char *data;
+ grub_uint32_t data_addr;
+ grub_size_t size = size0;
+ grub_size_t actual;
+
+ /* FIXME: avoid allocation any kind of buffer in a first place. */
+ data_chunk = grub_memalign_dma32 (128, size ? : 16);
+ if (!data_chunk)
+ return GRUB_USB_ERR_INTERNAL;
+ data = grub_dma_get_virt (data_chunk);
+ data_addr = grub_dma_get_phys (data_chunk);
+ grub_memcpy ((char *) data, data_in, size);
+
+ grub_dprintf ("usb",
+ "control: reqtype=0x%02x req=0x%02x val=0x%02x idx=0x%02x size=%lu\n",
+ reqtype, request, value, index, (unsigned long)size);
+
+ /* Create a transfer. */
+ transfer = grub_malloc (sizeof (*transfer));
+ if (! transfer)
+ {
+ grub_dma_free (data_chunk);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ setupdata_chunk = grub_memalign_dma32 (32, sizeof (*setupdata));
+ if (! setupdata_chunk)
+ {
+ grub_free (transfer);
+ grub_dma_free (data_chunk);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ setupdata = grub_dma_get_virt (setupdata_chunk);
+ setupdata_addr = grub_dma_get_phys (setupdata_chunk);
+
+ /* Determine the maximum packet size. */
+ if (dev->descdev.maxsize0)
+ max = dev->descdev.maxsize0;
+ else
+ max = 64;
+
+ grub_dprintf ("usb", "control: transfer = %p, dev = %p\n", transfer, dev);
+
+ datablocks = (size + max - 1) / max;
+
+ /* XXX: Discriminate between different types of control
+ messages. */
+ transfer->transcnt = datablocks + 2;
+ transfer->size = size; /* XXX ? */
+ transfer->endpoint = 0;
+ transfer->devaddr = dev->addr;
+ transfer->type = GRUB_USB_TRANSACTION_TYPE_CONTROL;
+ transfer->max = max;
+ transfer->dev = dev;
+
+ /* Allocate an array of transfer data structures. */
+ transfer->transactions = grub_malloc (transfer->transcnt
+ * sizeof (struct grub_usb_transfer));
+ if (! transfer->transactions)
+ {
+ grub_free (transfer);
+ grub_dma_free (setupdata_chunk);
+ grub_dma_free (data_chunk);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ /* Build a Setup packet. XXX: Endianness. */
+ setupdata->reqtype = reqtype;
+ setupdata->request = request;
+ setupdata->value = value;
+ setupdata->index = index;
+ setupdata->length = size;
+ transfer->transactions[0].size = sizeof (*setupdata);
+ transfer->transactions[0].pid = GRUB_USB_TRANSFER_TYPE_SETUP;
+ transfer->transactions[0].data = setupdata_addr;
+ transfer->transactions[0].toggle = 0;
+
+ /* Now the data... XXX: Is this the right way to transfer control
+ transfers? */
+ for (i = 0; i < datablocks; i++)
+ {
+ grub_usb_transaction_t tr = &transfer->transactions[i + 1];
+
+ tr->size = (size > max) ? max : size;
+ /* Use the right most bit as the data toggle. Simple and
+ effective. */
+ tr->toggle = !(i & 1);
+ if (reqtype & 128)
+ tr->pid = GRUB_USB_TRANSFER_TYPE_IN;
+ else
+ tr->pid = GRUB_USB_TRANSFER_TYPE_OUT;
+ tr->data = data_addr + i * max;
+ tr->preceding = i * max;
+ size -= max;
+ }
+
+ /* End with an empty OUT transaction. */
+ transfer->transactions[datablocks + 1].size = 0;
+ transfer->transactions[datablocks + 1].data = 0;
+ if ((reqtype & 128) && datablocks)
+ transfer->transactions[datablocks + 1].pid = GRUB_USB_TRANSFER_TYPE_OUT;
+ else
+ transfer->transactions[datablocks + 1].pid = GRUB_USB_TRANSFER_TYPE_IN;
+
+ transfer->transactions[datablocks + 1].toggle = 1;
+
+ err = grub_usb_execute_and_wait_transfer (dev, transfer, 1000, &actual);
+
+ grub_dprintf ("usb", "control: err=%d\n", err);
+
+ grub_free (transfer->transactions);
+
+ grub_free (transfer);
+ grub_dma_free (data_chunk);
+ grub_dma_free (setupdata_chunk);
+
+ grub_memcpy (data_in, (char *) data, size0);
+
+ return err;
+}
+
+static grub_usb_transfer_t
+grub_usb_bulk_setup_readwrite (grub_usb_device_t dev,
+ int endpoint, grub_size_t size0, char *data_in,
+ grub_transfer_type_t type)
+{
+ int i;
+ grub_usb_transfer_t transfer;
+ int datablocks;
+ unsigned int max;
+ volatile char *data;
+ grub_uint32_t data_addr;
+ struct grub_pci_dma_chunk *data_chunk;
+ grub_size_t size = size0;
+ int toggle = dev->toggle[endpoint];
+
+ grub_dprintf ("usb", "bulk: size=0x%02lx type=%d\n", (unsigned long) size,
+ type);
+
+ /* FIXME: avoid allocation any kind of buffer in a first place. */
+ data_chunk = grub_memalign_dma32 (128, size);
+ if (!data_chunk)
+ return NULL;
+ data = grub_dma_get_virt (data_chunk);
+ data_addr = grub_dma_get_phys (data_chunk);
+ if (type == GRUB_USB_TRANSFER_TYPE_OUT)
+ grub_memcpy ((char *) data, data_in, size);
+
+ /* Use the maximum packet size given in the endpoint descriptor. */
+ if (dev->initialized)
+ {
+ struct grub_usb_desc_endp *endpdesc;
+ endpdesc = grub_usb_get_endpdescriptor (dev, endpoint);
+
+ if (endpdesc)
+ max = endpdesc->maxpacket;
+ else
+ max = 64;
+ }
+ else
+ max = 64;
+
+ /* Create a transfer. */
+ transfer = grub_malloc (sizeof (struct grub_usb_transfer));
+ if (! transfer)
+ {
+ grub_dma_free (data_chunk);
+ return NULL;
+ }
+
+ datablocks = ((size + max - 1) / max);
+ transfer->transcnt = datablocks;
+ transfer->size = size - 1;
+ transfer->endpoint = endpoint;
+ transfer->devaddr = dev->addr;
+ transfer->type = GRUB_USB_TRANSACTION_TYPE_BULK;
+ transfer->dir = type;
+ transfer->max = max;
+ transfer->dev = dev;
+ transfer->last_trans = -1; /* Reset index of last processed transaction (TD) */
+ transfer->data_chunk = data_chunk;
+ transfer->data = data_in;
+
+ /* Allocate an array of transfer data structures. */
+ transfer->transactions = grub_malloc (transfer->transcnt
+ * sizeof (struct grub_usb_transfer));
+ if (! transfer->transactions)
+ {
+ grub_free (transfer);
+ grub_dma_free (data_chunk);
+ return NULL;
+ }
+
+ /* Set up all transfers. */
+ for (i = 0; i < datablocks; i++)
+ {
+ grub_usb_transaction_t tr = &transfer->transactions[i];
+
+ tr->size = (size > max) ? max : size;
+ /* XXX: Use the right most bit as the data toggle. Simple and
+ effective. */
+ tr->toggle = toggle;
+ toggle = toggle ? 0 : 1;
+ tr->pid = type;
+ tr->data = data_addr + i * max;
+ tr->preceding = i * max;
+ size -= tr->size;
+ }
+ return transfer;
+}
+
+static void
+grub_usb_bulk_finish_readwrite (grub_usb_transfer_t transfer)
+{
+ grub_usb_device_t dev = transfer->dev;
+ int toggle = dev->toggle[transfer->endpoint];
+
+ /* We must remember proper toggle value even if some transactions
+ * were not processed - correct value should be inversion of last
+ * processed transaction (TD). */
+ if (transfer->last_trans >= 0)
+ toggle = transfer->transactions[transfer->last_trans].toggle ? 0 : 1;
+ else
+ toggle = dev->toggle[transfer->endpoint]; /* Nothing done, take original */
+ grub_dprintf ("usb", "bulk: toggle=%d\n", toggle);
+ dev->toggle[transfer->endpoint] = toggle;
+
+ if (transfer->dir == GRUB_USB_TRANSFER_TYPE_IN)
+ grub_memcpy (transfer->data, (void *)
+ grub_dma_get_virt (transfer->data_chunk),
+ transfer->size + 1);
+
+ grub_free (transfer->transactions);
+ grub_free (transfer);
+ grub_dma_free (transfer->data_chunk);
+}
+
+static grub_usb_err_t
+grub_usb_bulk_readwrite (grub_usb_device_t dev,
+ int endpoint, grub_size_t size0, char *data_in,
+ grub_transfer_type_t type, int timeout,
+ grub_size_t *actual)
+{
+ grub_usb_err_t err;
+ grub_usb_transfer_t transfer;
+
+ transfer = grub_usb_bulk_setup_readwrite (dev, endpoint, size0,
+ data_in, type);
+ if (!transfer)
+ return GRUB_USB_ERR_INTERNAL;
+ err = grub_usb_execute_and_wait_transfer (dev, transfer, timeout, actual);
+
+ grub_usb_bulk_finish_readwrite (transfer);
+
+ return err;
+}
+
+grub_usb_err_t
+grub_usb_bulk_write (grub_usb_device_t dev,
+ int endpoint, grub_size_t size, char *data)
+{
+ grub_size_t actual;
+ grub_usb_err_t err;
+
+ err = grub_usb_bulk_readwrite (dev, endpoint, size, data,
+ GRUB_USB_TRANSFER_TYPE_OUT, 1000, &actual);
+ if (!err && actual != size)
+ err = GRUB_USB_ERR_DATA;
+ return err;
+}
+
+grub_usb_err_t
+grub_usb_bulk_read (grub_usb_device_t dev,
+ int endpoint, grub_size_t size, char *data)
+{
+ grub_size_t actual;
+ grub_usb_err_t err;
+ err = grub_usb_bulk_readwrite (dev, endpoint, size, data,
+ GRUB_USB_TRANSFER_TYPE_IN, 1000, &actual);
+ if (!err && actual != size)
+ err = GRUB_USB_ERR_DATA;
+ return err;
+}
+
+grub_usb_err_t
+grub_usb_check_transfer (grub_usb_transfer_t transfer, grub_size_t *actual)
+{
+ grub_usb_err_t err;
+ grub_usb_device_t dev = transfer->dev;
+
+ err = dev->controller.dev->check_transfer (&dev->controller, transfer,
+ actual);
+ if (err == GRUB_USB_ERR_WAIT)
+ return err;
+
+ grub_usb_bulk_finish_readwrite (transfer);
+
+ return err;
+}
+
+grub_usb_transfer_t
+grub_usb_bulk_read_background (grub_usb_device_t dev,
+ int endpoint, grub_size_t size, void *data)
+{
+ grub_usb_err_t err;
+ grub_usb_transfer_t transfer;
+
+ transfer = grub_usb_bulk_setup_readwrite (dev, endpoint, size,
+ data, GRUB_USB_TRANSFER_TYPE_IN);
+ if (!transfer)
+ return NULL;
+
+ err = dev->controller.dev->setup_transfer (&dev->controller, transfer);
+ if (err)
+ return NULL;
+
+ return transfer;
+}
+
+void
+grub_usb_cancel_transfer (grub_usb_transfer_t transfer)
+{
+ grub_usb_device_t dev = transfer->dev;
+ dev->controller.dev->cancel_transfer (&dev->controller, transfer);
+ grub_errno = GRUB_ERR_NONE;
+}
+
+grub_usb_err_t
+grub_usb_bulk_read_extended (grub_usb_device_t dev,
+ int endpoint, grub_size_t size, char *data,
+ int timeout, grub_size_t *actual)
+{
+ return grub_usb_bulk_readwrite (dev, endpoint, size, data,
+ GRUB_USB_TRANSFER_TYPE_IN, timeout, actual);
+}
diff --git a/grub-core/commands/acpi.c b/grub-core/commands/acpi.c
new file mode 100644
index 0000000..8f44296
--- /dev/null
+++ b/grub-core/commands/acpi.c
@@ -0,0 +1,774 @@
+/* acpi.c - modify acpi tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/extcmd.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/acpi.h>
+#include <grub/mm.h>
+#include <grub/memory.h>
+#include <grub/i18n.h>
+
+#ifdef GRUB_MACHINE_EFI
+#include <grub/efi/efi.h>
+#include <grub/efi/api.h>
+#endif
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] = {
+ {"exclude", 'x', 0,
+ N_("Don't load host tables specified by comma-separated list."),
+ 0, ARG_TYPE_STRING},
+ {"load-only", 'n', 0,
+ N_("Load only tables specified by comma-separated list."), 0, ARG_TYPE_STRING},
+ {"v1", '1', 0, N_("Expose v1 tables."), 0, ARG_TYPE_NONE},
+ {"v2", '2', 0, N_("Expose v2 and v3 tables."), 0, ARG_TYPE_NONE},
+ {"oemid", 'o', 0, N_("Set OEMID of RSDP, XSDT and RSDT."), 0, ARG_TYPE_STRING},
+ {"oemtable", 't', 0,
+ N_("Set OEMTABLE ID of RSDP, XSDT and RSDT."), 0, ARG_TYPE_STRING},
+ {"oemtablerev", 'r', 0,
+ N_("Set OEMTABLE revision of RSDP, XSDT and RSDT."), 0, ARG_TYPE_INT},
+ {"oemtablecreator", 'c', 0,
+ N_("Set creator field of RSDP, XSDT and RSDT."), 0, ARG_TYPE_STRING},
+ {"oemtablecreatorrev", 'd', 0,
+ N_("Set creator revision of RSDP, XSDT and RSDT."), 0, ARG_TYPE_INT},
+ {"no-ebda", 'e', 0, N_("Don't update EBDA. May fix failures or hangs on some."
+ " BIOSes but makes it ineffective with OS not receiving RSDP from GRUB."),
+ 0, ARG_TYPE_NONE},
+ {0, 0, 0, 0, 0, 0}
+};
+
+/* Simple checksum by summing all bytes. Used by ACPI and SMBIOS. */
+grub_uint8_t
+grub_byte_checksum (void *base, grub_size_t size)
+{
+ grub_uint8_t *ptr;
+ grub_uint8_t ret = 0;
+ for (ptr = (grub_uint8_t *) base; ptr < ((grub_uint8_t *) base) + size;
+ ptr++)
+ ret += *ptr;
+ return ret;
+}
+
+/* rev1 is 1 if ACPIv1 is to be generated, 0 otherwise.
+ rev2 contains the revision of ACPIv2+ to generate or 0 if none. */
+static int rev1, rev2;
+/* OEMID of RSDP, RSDT and XSDT. */
+static char root_oemid[6];
+/* OEMTABLE of the same tables. */
+static char root_oemtable[8];
+/* OEMREVISION of the same tables. */
+static grub_uint32_t root_oemrev;
+/* CreatorID of the same tables. */
+static char root_creator_id[4];
+/* CreatorRevision of the same tables. */
+static grub_uint32_t root_creator_rev;
+static struct grub_acpi_rsdp_v10 *rsdpv1_new = 0;
+static struct grub_acpi_rsdp_v20 *rsdpv2_new = 0;
+static char *playground = 0, *playground_ptr = 0;
+static int playground_size = 0;
+
+/* Linked list of ACPI tables. */
+struct efiemu_acpi_table
+{
+ void *addr;
+ grub_size_t size;
+ struct efiemu_acpi_table *next;
+};
+static struct efiemu_acpi_table *acpi_tables = 0;
+
+/* DSDT isn't in RSDT. So treat it specially. */
+static void *table_dsdt = 0;
+/* Pointer to recreated RSDT. */
+static void *rsdt_addr = 0;
+
+/* Allocation handles for different tables. */
+static grub_size_t dsdt_size = 0;
+
+/* Address of original FACS. */
+static grub_uint32_t facs_addr = 0;
+
+struct grub_acpi_rsdp_v20 *
+grub_acpi_get_rsdpv2 (void)
+{
+ if (rsdpv2_new)
+ return rsdpv2_new;
+ if (rsdpv1_new)
+ return 0;
+ return grub_machine_acpi_get_rsdpv2 ();
+}
+
+struct grub_acpi_rsdp_v10 *
+grub_acpi_get_rsdpv1 (void)
+{
+ if (rsdpv1_new)
+ return rsdpv1_new;
+ if (rsdpv2_new)
+ return 0;
+ return grub_machine_acpi_get_rsdpv1 ();
+}
+
+static inline int
+iszero (grub_uint8_t *reg, int size)
+{
+ int i;
+ for (i = 0; i < size; i++)
+ if (reg[i])
+ return 0;
+ return 1;
+}
+
+grub_err_t
+grub_acpi_create_ebda (void)
+{
+ int ebda_kb_len;
+ int ebda_len;
+ int mmapregion = 0;
+ grub_uint8_t *ebda, *v1inebda = 0, *v2inebda = 0;
+ grub_uint64_t highestlow = 0;
+ grub_uint8_t *targetebda, *target;
+ struct grub_acpi_rsdp_v10 *v1;
+ struct grub_acpi_rsdp_v20 *v2;
+ auto int NESTED_FUNC_ATTR find_hook (grub_uint64_t, grub_uint64_t,
+ grub_uint32_t);
+ int NESTED_FUNC_ATTR find_hook (grub_uint64_t start, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ grub_uint64_t end = start + size;
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ if (end > 0x100000)
+ end = 0x100000;
+ if (end > start + ebda_len
+ && highestlow < ((end - ebda_len) & (~0xf)) )
+ highestlow = (end - ebda_len) & (~0xf);
+ return 0;
+ }
+
+ ebda = (grub_uint8_t *) UINT_TO_PTR ((*((grub_uint16_t *)0x40e)) << 4);
+ ebda_kb_len = *(grub_uint16_t *) ebda;
+ if (! ebda || ebda_kb_len > 16)
+ ebda_kb_len = 0;
+ ebda_len = (ebda_kb_len + 1) << 10;
+
+ /* FIXME: use low-memory mm allocation once it's available. */
+ grub_mmap_iterate (find_hook);
+ targetebda = (grub_uint8_t *) UINT_TO_PTR (highestlow);
+ grub_dprintf ("acpi", "creating ebda @%llx\n",
+ (unsigned long long) highestlow);
+ if (! highestlow)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't find space for the new EBDA");
+
+ mmapregion = grub_mmap_register (PTR_TO_UINT64 (targetebda), ebda_len,
+ GRUB_MEMORY_RESERVED);
+ if (! mmapregion)
+ return grub_errno;
+
+ /* XXX: EBDA is unstandardized, so this implementation is heuristical. */
+ if (ebda_kb_len)
+ grub_memcpy (targetebda, ebda, 0x400);
+ else
+ grub_memset (targetebda, 0, 0x400);
+ *((grub_uint16_t *) targetebda) = ebda_kb_len + 1;
+ target = targetebda;
+
+ v1 = grub_acpi_get_rsdpv1 ();
+ v2 = grub_acpi_get_rsdpv2 ();
+ if (v2 && v2->length > 40)
+ v2 = 0;
+
+ /* First try to replace already existing rsdp. */
+ if (v2)
+ {
+ grub_dprintf ("acpi", "Scanning EBDA for old rsdpv2\n");
+ for (; target < targetebda + 0x400 - v2->length; target += 0x10)
+ if (grub_memcmp (target, "RSD PTR ", 8) == 0
+ && grub_byte_checksum (target,
+ sizeof (struct grub_acpi_rsdp_v10)) == 0
+ && ((struct grub_acpi_rsdp_v10 *) target)->revision != 0
+ && ((struct grub_acpi_rsdp_v20 *) target)->length <= v2->length)
+ {
+ grub_memcpy (target, v2, v2->length);
+ grub_dprintf ("acpi", "Copying rsdpv2 to %p\n", target);
+ v2inebda = target;
+ target += v2->length;
+ target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+ v2 = 0;
+ break;
+ }
+ }
+
+ if (v1)
+ {
+ grub_dprintf ("acpi", "Scanning EBDA for old rsdpv1\n");
+ for (; target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10);
+ target += 0x10)
+ if (grub_memcmp (target, "RSD PTR ", 8) == 0
+ && grub_byte_checksum (target,
+ sizeof (struct grub_acpi_rsdp_v10)) == 0)
+ {
+ grub_memcpy (target, v1, sizeof (struct grub_acpi_rsdp_v10));
+ grub_dprintf ("acpi", "Copying rsdpv1 to %p\n", target);
+ v1inebda = target;
+ target += sizeof (struct grub_acpi_rsdp_v10);
+ target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+ v1 = 0;
+ break;
+ }
+ }
+
+ target = targetebda + 0x100;
+
+ /* Try contiguous zeros. */
+ if (v2)
+ {
+ grub_dprintf ("acpi", "Scanning EBDA for block of zeros\n");
+ for (; target < targetebda + 0x400 - v2->length; target += 0x10)
+ if (iszero (target, v2->length))
+ {
+ grub_dprintf ("acpi", "Copying rsdpv2 to %p\n", target);
+ grub_memcpy (target, v2, v2->length);
+ v2inebda = target;
+ target += v2->length;
+ target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+ v2 = 0;
+ break;
+ }
+ }
+
+ if (v1)
+ {
+ grub_dprintf ("acpi", "Scanning EBDA for block of zeros\n");
+ for (; target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10);
+ target += 0x10)
+ if (iszero (target, sizeof (struct grub_acpi_rsdp_v10)))
+ {
+ grub_dprintf ("acpi", "Copying rsdpv1 to %p\n", target);
+ grub_memcpy (target, v1, sizeof (struct grub_acpi_rsdp_v10));
+ v1inebda = target;
+ target += sizeof (struct grub_acpi_rsdp_v10);
+ target = (grub_uint8_t *) ((((long) target - 1) | 0xf) + 1);
+ v1 = 0;
+ break;
+ }
+ }
+
+ if (v1 || v2)
+ {
+ grub_mmap_unregister (mmapregion);
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't find suitable spot in EBDA");
+ }
+
+ /* Remove any other RSDT. */
+ for (target = targetebda;
+ target < targetebda + 0x400 - sizeof (struct grub_acpi_rsdp_v10);
+ target += 0x10)
+ if (grub_memcmp (target, "RSD PTR ", 8) == 0
+ && grub_byte_checksum (target,
+ sizeof (struct grub_acpi_rsdp_v10)) == 0
+ && target != v1inebda && target != v2inebda)
+ *target = 0;
+
+ grub_dprintf ("acpi", "Switching EBDA\n");
+ (*((grub_uint16_t *) 0x40e)) = ((long)targetebda) >> 4;
+ grub_dprintf ("acpi", "EBDA switched\n");
+
+ return GRUB_ERR_NONE;
+}
+
+/* Create tables common to ACPIv1 and ACPIv2+ */
+static void
+setup_common_tables (void)
+{
+ struct efiemu_acpi_table *cur;
+ struct grub_acpi_table_header *rsdt;
+ grub_uint32_t *rsdt_entry;
+ int numoftables;
+
+ /* Treat DSDT. */
+ grub_memcpy (playground_ptr, table_dsdt, dsdt_size);
+ grub_free (table_dsdt);
+ table_dsdt = playground_ptr;
+ playground_ptr += dsdt_size;
+
+ /* Treat other tables. */
+ for (cur = acpi_tables; cur; cur = cur->next)
+ {
+ struct grub_acpi_fadt *fadt;
+
+ grub_memcpy (playground_ptr, cur->addr, cur->size);
+ grub_free (cur->addr);
+ cur->addr = playground_ptr;
+ playground_ptr += cur->size;
+
+ /* If it's FADT correct DSDT and FACS addresses. */
+ fadt = (struct grub_acpi_fadt *) cur->addr;
+ if (grub_memcmp (fadt->hdr.signature, GRUB_ACPI_FADT_SIGNATURE,
+ sizeof (fadt->hdr.signature)) == 0)
+ {
+ fadt->dsdt_addr = PTR_TO_UINT32 (table_dsdt);
+ fadt->facs_addr = facs_addr;
+
+ /* Does a revision 2 exist at all? */
+ if (fadt->hdr.revision >= 3)
+ {
+ fadt->dsdt_xaddr = PTR_TO_UINT64 (table_dsdt);
+ fadt->facs_xaddr = facs_addr;
+ }
+
+ /* Recompute checksum. */
+ fadt->hdr.checksum = 0;
+ fadt->hdr.checksum = 1 + ~grub_byte_checksum (fadt, fadt->hdr.length);
+ }
+ }
+
+ /* Fill RSDT entries. */
+ numoftables = 0;
+ for (cur = acpi_tables; cur; cur = cur->next)
+ numoftables++;
+
+ rsdt_addr = rsdt = (struct grub_acpi_table_header *) playground_ptr;
+ playground_ptr += sizeof (struct grub_acpi_table_header) + 4 * numoftables;
+
+ rsdt_entry = (grub_uint32_t *) (rsdt + 1);
+
+ /* Fill RSDT header. */
+ grub_memcpy (&(rsdt->signature), "RSDT", 4);
+ rsdt->length = sizeof (struct grub_acpi_table_header) + 4 * numoftables;
+ rsdt->revision = 1;
+ grub_memcpy (&(rsdt->oemid), root_oemid, sizeof (rsdt->oemid));
+ grub_memcpy (&(rsdt->oemtable), root_oemtable, sizeof (rsdt->oemtable));
+ rsdt->oemrev = root_oemrev;
+ grub_memcpy (&(rsdt->creator_id), root_creator_id, sizeof (rsdt->creator_id));
+ rsdt->creator_rev = root_creator_rev;
+
+ for (cur = acpi_tables; cur; cur = cur->next)
+ *(rsdt_entry++) = PTR_TO_UINT32 (cur->addr);
+
+ /* Recompute checksum. */
+ rsdt->checksum = 0;
+ rsdt->checksum = 1 + ~grub_byte_checksum (rsdt, rsdt->length);
+}
+
+/* Regenerate ACPIv1 RSDP */
+static void
+setv1table (void)
+{
+ /* Create RSDP. */
+ rsdpv1_new = (struct grub_acpi_rsdp_v10 *) playground_ptr;
+ playground_ptr += sizeof (struct grub_acpi_rsdp_v10);
+ grub_memcpy (&(rsdpv1_new->signature), "RSD PTR ",
+ sizeof (rsdpv1_new->signature));
+ grub_memcpy (&(rsdpv1_new->oemid), root_oemid, sizeof (rsdpv1_new->oemid));
+ rsdpv1_new->revision = 0;
+ rsdpv1_new->rsdt_addr = PTR_TO_UINT32 (rsdt_addr);
+ rsdpv1_new->checksum = 0;
+ rsdpv1_new->checksum = 1 + ~grub_byte_checksum (rsdpv1_new,
+ sizeof (*rsdpv1_new));
+ grub_dprintf ("acpi", "Generated ACPIv1 tables\n");
+}
+
+static void
+setv2table (void)
+{
+ struct grub_acpi_table_header *xsdt;
+ struct efiemu_acpi_table *cur;
+ grub_uint64_t *xsdt_entry;
+ int numoftables;
+
+ numoftables = 0;
+ for (cur = acpi_tables; cur; cur = cur->next)
+ numoftables++;
+
+ /* Create XSDT. */
+ xsdt = (struct grub_acpi_table_header *) playground_ptr;
+ playground_ptr += sizeof (struct grub_acpi_table_header) + 8 * numoftables;
+
+ xsdt_entry = (grub_uint64_t *)(xsdt + 1);
+ for (cur = acpi_tables; cur; cur = cur->next)
+ *(xsdt_entry++) = PTR_TO_UINT64 (cur->addr);
+ grub_memcpy (&(xsdt->signature), "XSDT", 4);
+ xsdt->length = sizeof (struct grub_acpi_table_header) + 8 * numoftables;
+ xsdt->revision = 1;
+ grub_memcpy (&(xsdt->oemid), root_oemid, sizeof (xsdt->oemid));
+ grub_memcpy (&(xsdt->oemtable), root_oemtable, sizeof (xsdt->oemtable));
+ xsdt->oemrev = root_oemrev;
+ grub_memcpy (&(xsdt->creator_id), root_creator_id, sizeof (xsdt->creator_id));
+ xsdt->creator_rev = root_creator_rev;
+ xsdt->checksum = 0;
+ xsdt->checksum = 1 + ~grub_byte_checksum (xsdt, xsdt->length);
+
+ /* Create RSDPv2. */
+ rsdpv2_new = (struct grub_acpi_rsdp_v20 *) playground_ptr;
+ playground_ptr += sizeof (struct grub_acpi_rsdp_v20);
+ grub_memcpy (&(rsdpv2_new->rsdpv1.signature), "RSD PTR ",
+ sizeof (rsdpv2_new->rsdpv1.signature));
+ grub_memcpy (&(rsdpv2_new->rsdpv1.oemid), root_oemid,
+ sizeof (rsdpv2_new->rsdpv1.oemid));
+ rsdpv2_new->rsdpv1.revision = rev2;
+ rsdpv2_new->rsdpv1.rsdt_addr = PTR_TO_UINT32 (rsdt_addr);
+ rsdpv2_new->rsdpv1.checksum = 0;
+ rsdpv2_new->rsdpv1.checksum = 1 + ~grub_byte_checksum
+ (&(rsdpv2_new->rsdpv1), sizeof (rsdpv2_new->rsdpv1));
+ rsdpv2_new->length = sizeof (*rsdpv2_new);
+ rsdpv2_new->xsdt_addr = PTR_TO_UINT64 (xsdt);
+ rsdpv2_new->checksum = 0;
+ rsdpv2_new->checksum = 1 + ~grub_byte_checksum (rsdpv2_new,
+ rsdpv2_new->length);
+ grub_dprintf ("acpi", "Generated ACPIv2 tables\n");
+}
+
+static void
+free_tables (void)
+{
+ struct efiemu_acpi_table *cur, *t;
+ if (table_dsdt)
+ grub_free (table_dsdt);
+ for (cur = acpi_tables; cur;)
+ {
+ t = cur;
+ grub_free (cur->addr);
+ cur = cur->next;
+ grub_free (t);
+ }
+ acpi_tables = 0;
+ table_dsdt = 0;
+}
+
+static grub_err_t
+grub_cmd_acpi (struct grub_extcmd_context *ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ struct grub_acpi_rsdp_v10 *rsdp;
+ struct efiemu_acpi_table *cur, *t;
+ grub_err_t err;
+ int i, mmapregion;
+ int numoftables;
+
+ /* Default values if no RSDP is found. */
+ rev1 = 1;
+ rev2 = 3;
+
+ facs_addr = 0;
+ playground = playground_ptr = 0;
+ playground_size = 0;
+
+ rsdp = (struct grub_acpi_rsdp_v10 *) grub_machine_acpi_get_rsdpv2 ();
+
+ if (! rsdp)
+ rsdp = grub_machine_acpi_get_rsdpv1 ();
+
+ if (rsdp)
+ {
+ grub_uint32_t *entry_ptr;
+ char *exclude = 0;
+ char *load_only = 0;
+ char *ptr;
+ /* RSDT consists of header and an array of 32-bit pointers. */
+ struct grub_acpi_table_header *rsdt;
+
+ exclude = state[0].set ? grub_strdup (state[0].arg) : 0;
+ if (exclude)
+ {
+ for (ptr = exclude; *ptr; ptr++)
+ *ptr = grub_tolower (*ptr);
+ }
+
+ load_only = state[1].set ? grub_strdup (state[1].arg) : 0;
+ if (load_only)
+ {
+ for (ptr = load_only; *ptr; ptr++)
+ *ptr = grub_tolower (*ptr);
+ }
+
+ /* Set revision variables to replicate the same version as host. */
+ rev1 = ! rsdp->revision;
+ rev2 = rsdp->revision;
+ rsdt = (struct grub_acpi_table_header *) UINT_TO_PTR (rsdp->rsdt_addr);
+ /* Load host tables. */
+ for (entry_ptr = (grub_uint32_t *) (rsdt + 1);
+ entry_ptr < (grub_uint32_t *) (((grub_uint8_t *) rsdt)
+ + rsdt->length);
+ entry_ptr++)
+ {
+ char signature[5];
+ struct efiemu_acpi_table *table;
+ struct grub_acpi_table_header *curtable
+ = (struct grub_acpi_table_header *) UINT_TO_PTR (*entry_ptr);
+ signature[4] = 0;
+ for (i = 0; i < 4;i++)
+ signature[i] = grub_tolower (curtable->signature[i]);
+
+ /* If it's FADT it contains addresses of DSDT and FACS. */
+ if (grub_strcmp (signature, "facp") == 0)
+ {
+ struct grub_acpi_table_header *dsdt;
+ struct grub_acpi_fadt *fadt = (struct grub_acpi_fadt *) curtable;
+
+ /* Set root header variables to the same values
+ as FADT by default. */
+ grub_memcpy (&root_oemid, &(fadt->hdr.oemid),
+ sizeof (root_oemid));
+ grub_memcpy (&root_oemtable, &(fadt->hdr.oemtable),
+ sizeof (root_oemtable));
+ root_oemrev = fadt->hdr.oemrev;
+ grub_memcpy (&root_creator_id, &(fadt->hdr.creator_id),
+ sizeof (root_creator_id));
+ root_creator_rev = fadt->hdr.creator_rev;
+
+ /* Load DSDT if not excluded. */
+ dsdt = (struct grub_acpi_table_header *)
+ UINT_TO_PTR (fadt->dsdt_addr);
+ if (dsdt && (! exclude || ! grub_strword (exclude, "dsdt"))
+ && (! load_only || grub_strword (load_only, "dsdt"))
+ && dsdt->length >= sizeof (*dsdt))
+ {
+ dsdt_size = dsdt->length;
+ table_dsdt = grub_malloc (dsdt->length);
+ if (! table_dsdt)
+ {
+ free_tables ();
+ grub_free (exclude);
+ grub_free (load_only);
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate table");
+ }
+ grub_memcpy (table_dsdt, dsdt, dsdt->length);
+ }
+
+ /* Save FACS address. FACS shouldn't be overridden. */
+ facs_addr = fadt->facs_addr;
+ }
+
+ /* Skip excluded tables. */
+ if (exclude && grub_strword (exclude, signature))
+ continue;
+ if (load_only && ! grub_strword (load_only, signature))
+ continue;
+
+ /* Sanity check. */
+ if (curtable->length < sizeof (*curtable))
+ continue;
+
+ table = (struct efiemu_acpi_table *) grub_malloc
+ (sizeof (struct efiemu_acpi_table));
+ if (! table)
+ {
+ free_tables ();
+ grub_free (exclude);
+ grub_free (load_only);
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate table structure");
+ }
+ table->size = curtable->length;
+ table->addr = grub_malloc (table->size);
+ playground_size += table->size;
+ if (! table->addr)
+ {
+ free_tables ();
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate table");
+ }
+ table->next = acpi_tables;
+ acpi_tables = table;
+ grub_memcpy (table->addr, curtable, table->size);
+ }
+ grub_free (exclude);
+ grub_free (load_only);
+ }
+
+ /* Does user specify versions to generate? */
+ if (state[2].set || state[3].set)
+ {
+ rev1 = state[2].set;
+ if (state[3].set)
+ rev2 = rev2 ? : 2;
+ else
+ rev2 = 0;
+ }
+
+ /* Does user override root header information? */
+ if (state[4].set)
+ grub_strncpy (root_oemid, state[4].arg, sizeof (root_oemid));
+ if (state[5].set)
+ grub_strncpy (root_oemtable, state[5].arg, sizeof (root_oemtable));
+ if (state[6].set)
+ root_oemrev = grub_strtoul (state[6].arg, 0, 0);
+ if (state[7].set)
+ grub_strncpy (root_creator_id, state[7].arg, sizeof (root_creator_id));
+ if (state[8].set)
+ root_creator_rev = grub_strtoul (state[8].arg, 0, 0);
+
+ /* Load user tables */
+ for (i = 0; i < argc; i++)
+ {
+ grub_file_t file;
+ grub_size_t size;
+ char *buf;
+
+ file = grub_file_open (args[i]);
+ if (! file)
+ {
+ free_tables ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't open file %s", args[i]);
+ }
+
+ size = grub_file_size (file);
+ if (size < sizeof (struct grub_acpi_table_header))
+ {
+ grub_file_close (file);
+ free_tables ();
+ return grub_error (GRUB_ERR_BAD_OS, "file %s is too small", args[i]);
+ }
+
+ buf = (char *) grub_malloc (size);
+ if (! buf)
+ {
+ grub_file_close (file);
+ free_tables ();
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't read file %s", args[i]);
+ }
+
+ if (grub_file_read (file, buf, size) != (int) size)
+ {
+ grub_file_close (file);
+ free_tables ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[i]);
+ }
+ grub_file_close (file);
+
+ if (grub_memcmp (((struct grub_acpi_table_header *) buf)->signature,
+ "DSDT", 4) == 0)
+ {
+ grub_free (table_dsdt);
+ table_dsdt = buf;
+ dsdt_size = size;
+ }
+ else
+ {
+ struct efiemu_acpi_table *table;
+ table = (struct efiemu_acpi_table *) grub_malloc
+ (sizeof (struct efiemu_acpi_table));
+ if (! table)
+ {
+ free_tables ();
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate table structure");
+ }
+
+ table->size = size;
+ table->addr = buf;
+ playground_size += table->size;
+
+ table->next = acpi_tables;
+ acpi_tables = table;
+ }
+ }
+
+ numoftables = 0;
+ for (cur = acpi_tables; cur; cur = cur->next)
+ numoftables++;
+
+ /* DSDT. */
+ playground_size += dsdt_size;
+ /* RSDT. */
+ playground_size += sizeof (struct grub_acpi_table_header) + 4 * numoftables;
+ /* RSDPv1. */
+ playground_size += sizeof (struct grub_acpi_rsdp_v10);
+ /* XSDT. */
+ playground_size += sizeof (struct grub_acpi_table_header) + 8 * numoftables;
+ /* RSDPv2. */
+ playground_size += sizeof (struct grub_acpi_rsdp_v20);
+
+ playground = playground_ptr
+ = grub_mmap_malign_and_register (1, playground_size, &mmapregion,
+ GRUB_MEMORY_ACPI, 0);
+
+ if (! playground)
+ {
+ free_tables ();
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate space for ACPI tables");
+ }
+
+ setup_common_tables ();
+
+ /* Request space for RSDPv1. */
+ if (rev1)
+ setv1table ();
+
+ /* Request space for RSDPv2+ and XSDT. */
+ if (rev2)
+ setv2table ();
+
+ for (cur = acpi_tables; cur;)
+ {
+ t = cur;
+ cur = cur->next;
+ grub_free (t);
+ }
+ acpi_tables = 0;
+
+ if (! state[9].set && (err = grub_acpi_create_ebda ()))
+ {
+ rsdpv1_new = 0;
+ rsdpv2_new = 0;
+ grub_mmap_free_and_unregister (mmapregion);
+ return err;
+ }
+
+#ifdef GRUB_MACHINE_EFI
+ {
+ struct grub_efi_guid acpi = GRUB_EFI_ACPI_TABLE_GUID;
+ struct grub_efi_guid acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
+
+ grub_efi_system_table->boot_services->install_configuration_table
+ (&acpi20, grub_acpi_get_rsdpv2 ());
+ grub_efi_system_table->boot_services->install_configuration_table
+ (&acpi, grub_acpi_get_rsdpv1 ());
+ }
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(acpi)
+{
+ cmd = grub_register_extcmd ("acpi", grub_cmd_acpi, 0,
+ N_("[-1|-2] [--exclude=TABLE1,TABLE2|"
+ "--load-only=table1,table2] FILE1"
+ " [FILE2] [...]"),
+ N_("Load host ACPI tables and tables "
+ "specified by arguments."),
+ options);
+}
+
+GRUB_MOD_FINI(acpi)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/acpihalt.c b/grub-core/commands/acpihalt.c
new file mode 100644
index 0000000..9a4cda5
--- /dev/null
+++ b/grub-core/commands/acpihalt.c
@@ -0,0 +1,332 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef GRUB_DSDT_TEST
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+
+#define grub_dprintf(cond, args...) printf ( args )
+#define grub_printf printf
+typedef uint64_t grub_uint64_t;
+typedef uint32_t grub_uint32_t;
+typedef uint16_t grub_uint16_t;
+typedef uint8_t grub_uint8_t;
+
+#endif
+
+#include <grub/acpi.h>
+
+#ifndef GRUB_DSDT_TEST
+#include <grub/misc.h>
+#include <grub/time.h>
+#include <grub/cpu/io.h>
+#endif
+
+static inline grub_uint32_t
+decode_length (const grub_uint8_t *ptr, int *numlen)
+{
+ int num_bytes, i;
+ grub_uint32_t ret;
+ if (*ptr < 64)
+ {
+ if (numlen)
+ *numlen = 1;
+ return *ptr;
+ }
+ num_bytes = *ptr >> 6;
+ if (numlen)
+ *numlen = num_bytes + 1;
+ ret = *ptr & 0xf;
+ ptr++;
+ for (i = 0; i < num_bytes; i++)
+ {
+ ret |= *ptr << (8 * i + 4);
+ ptr++;
+ }
+ return ret;
+}
+
+static inline grub_uint32_t
+skip_name_string (const grub_uint8_t *ptr, const grub_uint8_t *end)
+{
+ const grub_uint8_t *ptr0 = ptr;
+
+ while (ptr < end && (*ptr == '^' || *ptr == '\\'))
+ ptr++;
+ switch (*ptr)
+ {
+ case '.':
+ ptr++;
+ ptr += 8;
+ break;
+ case '/':
+ ptr++;
+ ptr += 1 + (*ptr) * 4;
+ break;
+ case 0:
+ ptr++;
+ break;
+ default:
+ ptr += 4;
+ break;
+ }
+ return ptr - ptr0;
+}
+
+static inline grub_uint32_t
+skip_data_ref_object (const grub_uint8_t *ptr, const grub_uint8_t *end)
+{
+ grub_dprintf ("acpi", "data type = 0x%x\n", *ptr);
+ switch (*ptr)
+ {
+ case GRUB_ACPI_OPCODE_PACKAGE:
+ return 1 + decode_length (ptr + 1, 0);
+ case GRUB_ACPI_OPCODE_ZERO:
+ case GRUB_ACPI_OPCODE_ONES:
+ case GRUB_ACPI_OPCODE_ONE:
+ return 1;
+ case GRUB_ACPI_OPCODE_BYTE_CONST:
+ return 2;
+ case GRUB_ACPI_OPCODE_WORD_CONST:
+ return 3;
+ case GRUB_ACPI_OPCODE_DWORD_CONST:
+ return 5;
+ default:
+ if (*ptr == '^' || *ptr == '\\' || *ptr == '_'
+ || (*ptr >= 'A' && *ptr <= 'Z'))
+ return skip_name_string (ptr, end);
+ grub_printf ("Unknown opcode 0x%x\n", *ptr);
+ return 0;
+ }
+}
+
+static inline grub_uint32_t
+skip_ext_op (const grub_uint8_t *ptr, const grub_uint8_t *end)
+{
+ const grub_uint8_t *ptr0 = ptr;
+ int add;
+ grub_dprintf ("acpi", "Extended opcode: 0x%x\n", *ptr);
+ switch (*ptr)
+ {
+ case GRUB_ACPI_EXTOPCODE_MUTEX:
+ ptr++;
+ ptr += skip_name_string (ptr, end);
+ ptr++;
+ break;
+ case GRUB_ACPI_EXTOPCODE_OPERATION_REGION:
+ ptr++;
+ ptr += skip_name_string (ptr, end);
+ ptr++;
+ ptr += add = skip_data_ref_object (ptr, end);
+ if (!add)
+ return 0;
+ ptr += add = skip_data_ref_object (ptr, end);
+ if (!add)
+ return 0;
+ break;
+ case GRUB_ACPI_EXTOPCODE_FIELD_OP:
+ case GRUB_ACPI_EXTOPCODE_INDEX_FIELD_OP:
+ ptr++;
+ ptr += decode_length (ptr, 0);
+ break;
+ default:
+ grub_printf ("Unexpected extended opcode: 0x%x\n", *ptr);
+ return 0;
+ }
+ return ptr - ptr0;
+}
+
+static int
+get_sleep_type (grub_uint8_t *table, grub_uint8_t *end)
+{
+ grub_uint8_t *ptr, *prev = table;
+ int sleep_type = -1;
+
+ ptr = table + sizeof (struct grub_acpi_table_header);
+ while (ptr < end && prev < ptr)
+ {
+ int add;
+ prev = ptr;
+ grub_dprintf ("acpi", "Opcode 0x%x\n", *ptr);
+ grub_dprintf ("acpi", "Tell %x\n", (unsigned) (ptr - table));
+ switch (*ptr)
+ {
+ case GRUB_ACPI_OPCODE_EXTOP:
+ ptr++;
+ ptr += add = skip_ext_op (ptr, end);
+ if (!add)
+ return -1;
+ break;
+ case GRUB_ACPI_OPCODE_NAME:
+ ptr++;
+ if (memcmp (ptr, "_S5_", 4) == 0 || memcmp (ptr, "\\_S5_", 4) == 0)
+ {
+ int ll;
+ grub_uint8_t *ptr2 = ptr;
+ grub_dprintf ("acpi", "S5 found\n");
+ ptr2 += skip_name_string (ptr, end);
+ if (*ptr2 != 0x12)
+ {
+ grub_printf ("Unknown opcode in _S5: 0x%x\n", *ptr2);
+ return -1;
+ }
+ ptr2++;
+ decode_length (ptr2, &ll);
+ ptr2 += ll;
+ ptr2++;
+ switch (*ptr2)
+ {
+ case GRUB_ACPI_OPCODE_ZERO:
+ sleep_type = 0;
+ break;
+ case GRUB_ACPI_OPCODE_ONE:
+ sleep_type = 1;
+ break;
+ case GRUB_ACPI_OPCODE_BYTE_CONST:
+ sleep_type = ptr2[1];
+ break;
+ default:
+ grub_printf ("Unknown data type in _S5: 0x%x\n", *ptr2);
+ return -1;
+ }
+ }
+ ptr += add = skip_name_string (ptr, end);
+ if (!add)
+ return -1;
+ ptr += add = skip_data_ref_object (ptr, end);
+ if (!add)
+ return -1;
+ break;
+ case GRUB_ACPI_OPCODE_SCOPE:
+ case GRUB_ACPI_OPCODE_IF:
+ case GRUB_ACPI_OPCODE_METHOD:
+ {
+ ptr++;
+ ptr += decode_length (ptr, 0);
+ break;
+ }
+ }
+ }
+
+ grub_dprintf ("acpi", "TYP = %d\n", sleep_type);
+ return sleep_type;
+}
+
+#ifdef GRUB_DSDT_TEST
+int
+main (int argc, char **argv)
+{
+ FILE *f;
+ size_t len;
+ unsigned char *buf;
+ if (argc < 2)
+ printf ("Usage: %s FILE\n", argv[0]);
+ f = fopen (argv[1], "rb");
+ if (!f)
+ {
+ printf ("Couldn't open file\n");
+ return 1;
+ }
+ fseek (f, 0, SEEK_END);
+ len = ftell (f);
+ fseek (f, 0, SEEK_SET);
+ buf = malloc (len);
+ if (!buf)
+ {
+ printf ("Couldn't malloc buffer\n");
+ fclose (f);
+ return 2;
+ }
+ if (fread (buf, 1, len, f) != len)
+ {
+ printf ("Read failed\n");
+ free (buf);
+ fclose (f);
+ return 2;
+ }
+
+ printf ("Sleep type = %d\n", get_sleep_type (buf, buf + len));
+ free (buf);
+ fclose (f);
+ return 0;
+}
+
+#else
+
+void
+grub_acpi_halt (void)
+{
+ struct grub_acpi_rsdp_v20 *rsdp2;
+ struct grub_acpi_rsdp_v10 *rsdp1;
+ struct grub_acpi_table_header *rsdt;
+ grub_uint32_t *entry_ptr;
+
+ rsdp2 = grub_acpi_get_rsdpv2 ();
+ if (rsdp2)
+ rsdp1 = &(rsdp2->rsdpv1);
+ else
+ rsdp1 = grub_acpi_get_rsdpv1 ();
+ grub_dprintf ("acpi", "rsdp1=%p\n", rsdp1);
+ if (!rsdp1)
+ return;
+
+ rsdt = (struct grub_acpi_table_header *) (grub_addr_t) rsdp1->rsdt_addr;
+ for (entry_ptr = (grub_uint32_t *) (rsdt + 1);
+ entry_ptr < (grub_uint32_t *) (((grub_uint8_t *) rsdt)
+ + rsdt->length);
+ entry_ptr++)
+ {
+ if (grub_memcmp ((void *) (grub_addr_t) *entry_ptr, "FACP", 4) == 0)
+ {
+ grub_uint32_t port;
+ struct grub_acpi_fadt *fadt
+ = ((struct grub_acpi_fadt *) (grub_addr_t) *entry_ptr);
+ struct grub_acpi_table_header *dsdt
+ = (struct grub_acpi_table_header *) (grub_addr_t) fadt->dsdt_addr;
+ int sleep_type = -1;
+
+ port = fadt->pm1a;
+
+ grub_dprintf ("acpi", "PM1a port=%x\n", port);
+
+ if (grub_memcmp (dsdt->signature, "DSDT",
+ sizeof (dsdt->signature)) != 0)
+ break;
+
+ sleep_type = get_sleep_type ((grub_uint8_t *) dsdt,
+ (grub_uint8_t *) dsdt + dsdt->length);
+
+ if (sleep_type < 0 || sleep_type >= 8)
+ break;
+
+ grub_dprintf ("acpi", "SLP_TYP = %d, port = 0x%x\n",
+ sleep_type, port);
+
+ grub_outw (GRUB_ACPI_SLP_EN
+ | (sleep_type << GRUB_ACPI_SLP_TYP_OFFSET), port & 0xffff);
+ }
+ }
+
+ grub_millisleep (1500);
+
+ grub_printf ("ACPI shutdown failed\n");
+}
+#endif
diff --git a/grub-core/commands/blocklist.c b/grub-core/commands/blocklist.c
new file mode 100644
index 0000000..5eb12e4
--- /dev/null
+++ b/grub-core/commands/blocklist.c
@@ -0,0 +1,122 @@
+/* blocklist.c - print the block list of a file */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_file_t file;
+ char buf[GRUB_DISK_SECTOR_SIZE];
+ unsigned long start_sector = 0;
+ unsigned num_sectors = 0;
+ int num_entries = 0;
+ grub_disk_addr_t part_start = 0;
+ auto void NESTED_FUNC_ATTR read_blocklist (grub_disk_addr_t sector, unsigned offset,
+ unsigned length);
+ auto void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, unsigned num,
+ unsigned offset, unsigned length);
+
+ void NESTED_FUNC_ATTR read_blocklist (grub_disk_addr_t sector, unsigned offset,
+ unsigned length)
+ {
+ if (num_sectors > 0)
+ {
+ if (start_sector + num_sectors == sector
+ && offset == 0 && length == GRUB_DISK_SECTOR_SIZE)
+ {
+ num_sectors++;
+ return;
+ }
+
+ print_blocklist (start_sector, num_sectors, 0, 0);
+ num_sectors = 0;
+ }
+
+ if (offset == 0 && length == GRUB_DISK_SECTOR_SIZE)
+ {
+ start_sector = sector;
+ num_sectors++;
+ }
+ else
+ print_blocklist (sector, 0, offset, length);
+ }
+
+ void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, unsigned num,
+ unsigned offset, unsigned length)
+ {
+ if (num_entries++)
+ grub_printf (",");
+
+ grub_printf ("%llu", (unsigned long long) (sector - part_start));
+ if (num > 0)
+ grub_printf ("+%u", num);
+ if (offset != 0 || length != 0)
+ grub_printf ("[%u-%u]", offset, offset + length);
+ }
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (args[0]);
+ if (! file)
+ return grub_errno;
+
+ if (! file->device->disk)
+ return grub_error (GRUB_ERR_BAD_DEVICE,
+ "this command is available only for disk devices");
+
+ part_start = grub_partition_get_start (file->device->disk->partition);
+
+ file->read_hook = read_blocklist;
+
+ while (grub_file_read (file, buf, sizeof (buf)) > 0)
+ ;
+
+ if (num_sectors > 0)
+ print_blocklist (start_sector, num_sectors, 0, 0);
+
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(blocklist)
+{
+ cmd = grub_register_command ("blocklist", grub_cmd_blocklist,
+ N_("FILE"), N_("Print a block list."));
+}
+
+GRUB_MOD_FINI(blocklist)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/boot.c b/grub-core/commands/boot.c
new file mode 100644
index 0000000..7714011
--- /dev/null
+++ b/grub-core/commands/boot.c
@@ -0,0 +1,198 @@
+/* boot.c - command to boot an operating system */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/loader.h>
+#include <grub/kernel.h>
+#include <grub/mm.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t (*grub_loader_boot_func) (void);
+static grub_err_t (*grub_loader_unload_func) (void);
+static int grub_loader_noreturn;
+
+struct grub_preboot_t
+{
+ grub_err_t (*preboot_func) (int);
+ grub_err_t (*preboot_rest_func) (void);
+ grub_loader_preboot_hook_prio_t prio;
+ struct grub_preboot_t *next;
+ struct grub_preboot_t *prev;
+};
+
+static int grub_loader_loaded;
+static struct grub_preboot_t *preboots_head = 0,
+ *preboots_tail = 0;
+
+int
+grub_loader_is_loaded (void)
+{
+ return grub_loader_loaded;
+}
+
+/* Register a preboot hook. */
+void *
+grub_loader_register_preboot_hook (grub_err_t (*preboot_func) (int noreturn),
+ grub_err_t (*preboot_rest_func) (void),
+ grub_loader_preboot_hook_prio_t prio)
+{
+ struct grub_preboot_t *cur, *new_preboot;
+
+ if (! preboot_func && ! preboot_rest_func)
+ return 0;
+
+ new_preboot = (struct grub_preboot_t *)
+ grub_malloc (sizeof (struct grub_preboot_t));
+ if (! new_preboot)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "hook not added");
+ return 0;
+ }
+
+ new_preboot->preboot_func = preboot_func;
+ new_preboot->preboot_rest_func = preboot_rest_func;
+ new_preboot->prio = prio;
+
+ for (cur = preboots_head; cur && cur->prio > prio; cur = cur->next);
+
+ if (cur)
+ {
+ new_preboot->next = cur;
+ new_preboot->prev = cur->prev;
+ cur->prev = new_preboot;
+ }
+ else
+ {
+ new_preboot->next = 0;
+ new_preboot->prev = preboots_tail;
+ preboots_tail = new_preboot;
+ }
+ if (new_preboot->prev)
+ new_preboot->prev->next = new_preboot;
+ else
+ preboots_head = new_preboot;
+
+ return new_preboot;
+}
+
+void
+grub_loader_unregister_preboot_hook (void *hnd)
+{
+ struct grub_preboot_t *preb = hnd;
+
+ if (preb->next)
+ preb->next->prev = preb->prev;
+ else
+ preboots_tail = preb->prev;
+ if (preb->prev)
+ preb->prev->next = preb->next;
+ else
+ preboots_head = preb->next;
+
+ grub_free (preb);
+}
+
+void
+grub_loader_set (grub_err_t (*boot) (void),
+ grub_err_t (*unload) (void),
+ int noreturn)
+{
+ if (grub_loader_loaded && grub_loader_unload_func)
+ grub_loader_unload_func ();
+
+ grub_loader_boot_func = boot;
+ grub_loader_unload_func = unload;
+ grub_loader_noreturn = noreturn;
+
+ grub_loader_loaded = 1;
+}
+
+void
+grub_loader_unset(void)
+{
+ if (grub_loader_loaded && grub_loader_unload_func)
+ grub_loader_unload_func ();
+
+ grub_loader_boot_func = 0;
+ grub_loader_unload_func = 0;
+
+ grub_loader_loaded = 0;
+}
+
+grub_err_t
+grub_loader_boot (void)
+{
+ grub_err_t err = GRUB_ERR_NONE;
+ struct grub_preboot_t *cur;
+
+ if (! grub_loader_loaded)
+ return grub_error (GRUB_ERR_NO_KERNEL, "no loaded kernel");
+
+ if (grub_loader_noreturn)
+ grub_machine_fini ();
+
+ for (cur = preboots_head; cur; cur = cur->next)
+ {
+ err = cur->preboot_func (grub_loader_noreturn);
+ if (err)
+ {
+ for (cur = cur->prev; cur; cur = cur->prev)
+ cur->preboot_rest_func ();
+ return err;
+ }
+ }
+ err = (grub_loader_boot_func) ();
+
+ for (cur = preboots_tail; cur; cur = cur->prev)
+ if (! err)
+ err = cur->preboot_rest_func ();
+ else
+ cur->preboot_rest_func ();
+
+ return err;
+}
+
+/* boot */
+static grub_err_t
+grub_cmd_boot (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ return grub_loader_boot ();
+}
+
+
+
+static grub_command_t cmd_boot;
+
+GRUB_MOD_INIT(boot)
+{
+ cmd_boot =
+ grub_register_command ("boot", grub_cmd_boot,
+ 0, N_("Boot an operating system."));
+}
+
+GRUB_MOD_FINI(boot)
+{
+ grub_unregister_command (cmd_boot);
+}
diff --git a/grub-core/commands/cat.c b/grub-core/commands/cat.c
new file mode 100644
index 0000000..9be6cbc
--- /dev/null
+++ b/grub-core/commands/cat.c
@@ -0,0 +1,104 @@
+/* cat.c - command to show the contents of a file */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_err_t
+grub_cmd_cat (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ int dos = 0;
+ grub_file_t file;
+ char buf[GRUB_DISK_SECTOR_SIZE];
+ grub_ssize_t size;
+ int key = 0;
+
+ if (state[0].set)
+ dos = 1;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ file = grub_file_open (args[0]);
+ if (! file)
+ return grub_errno;
+
+ while ((size = grub_file_read (file, buf, sizeof (buf))) > 0
+ && key != GRUB_TERM_ESC)
+ {
+ int i;
+
+ for (i = 0; i < size; i++)
+ {
+ unsigned char c = buf[i];
+
+ if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
+ grub_printf ("%c", c);
+ else if (dos && c == '\r' && i + 1 < size && buf[i + 1] == '\n')
+ {
+ grub_printf ("\n");
+ i++;
+ }
+ else
+ {
+ grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
+ grub_printf ("<%x>", (int) c);
+ grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
+ }
+ }
+
+ while (grub_checkkey () >= 0 &&
+ (key = grub_getkey ()) != GRUB_TERM_ESC)
+ ;
+ }
+
+ grub_xputs ("\n");
+ grub_refresh ();
+ grub_file_close (file);
+
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(cat)
+{
+ cmd = grub_register_extcmd ("cat", grub_cmd_cat, 0,
+ N_("FILE"), N_("Show the contents of a file."),
+ options);
+}
+
+GRUB_MOD_FINI(cat)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/cmp.c b/grub-core/commands/cmp.c
new file mode 100644
index 0000000..0222927
--- /dev/null
+++ b/grub-core/commands/cmp.c
@@ -0,0 +1,120 @@
+/* cmd.c - command to cmp an operating system */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define BUFFER_SIZE 512
+
+static grub_err_t
+grub_cmd_cmp (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_ssize_t rd1, rd2;
+ grub_off_t pos;
+ grub_file_t file1 = 0;
+ grub_file_t file2 = 0;
+ char *buf1 = 0;
+ char *buf2 = 0;
+
+ if (argc != 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments required");
+
+ grub_printf ("Compare file `%s' with `%s':\n", args[0],
+ args[1]);
+
+ file1 = grub_file_open (args[0]);
+ file2 = grub_file_open (args[1]);
+ if (! file1 || ! file2)
+ goto cleanup;
+
+ if (grub_file_size (file1) != grub_file_size (file2))
+ grub_printf ("Files differ in size: %llu [%s], %llu [%s]\n",
+ (unsigned long long) grub_file_size (file1), args[0],
+ (unsigned long long) grub_file_size (file2), args[1]);
+ else
+ {
+ pos = 0;
+
+ buf1 = grub_malloc (BUFFER_SIZE);
+ buf2 = grub_malloc (BUFFER_SIZE);
+
+ if (! buf1 || ! buf2)
+ goto cleanup;
+
+ do
+ {
+ int i;
+
+ rd1 = grub_file_read (file1, buf1, BUFFER_SIZE);
+ rd2 = grub_file_read (file2, buf2, BUFFER_SIZE);
+
+ if (rd1 != rd2)
+ goto cleanup;
+
+ for (i = 0; i < rd2; i++)
+ {
+ if (buf1[i] != buf2[i])
+ {
+ grub_printf ("Files differ at the offset %llu: 0x%x [%s], 0x%x [%s]\n",
+ (unsigned long long) (i + pos), buf1[i], args[0],
+ buf2[i], args[1]);
+ goto cleanup;
+ }
+ }
+ pos += BUFFER_SIZE;
+
+ }
+ while (rd2);
+
+ grub_printf ("The files are identical.\n");
+ }
+
+cleanup:
+
+ if (buf1)
+ grub_free (buf1);
+ if (buf2)
+ grub_free (buf2);
+ if (file1)
+ grub_file_close (file1);
+ if (file2)
+ grub_file_close (file2);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(cmp)
+{
+ cmd = grub_register_command ("cmp", grub_cmd_cmp,
+ N_("FILE1 FILE2"), N_("Compare two files."));
+}
+
+GRUB_MOD_FINI(cmp)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/configfile.c b/grub-core/commands/configfile.c
new file mode 100644
index 0000000..124a09a
--- /dev/null
+++ b/grub-core/commands/configfile.c
@@ -0,0 +1,98 @@
+/* configfile.c - command to manually load config file */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/term.h>
+#include <grub/env.h>
+#include <grub/normal.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_source (grub_command_t cmd, int argc, char **args)
+{
+ int new_env, extractor;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ extractor = (cmd->name[0] == 'e');
+ new_env = (cmd->name[extractor ? sizeof ("extract_entries_") - 1 : 0] == 'c');
+
+ if (new_env)
+ grub_cls ();
+
+ if (new_env && !extractor)
+ grub_env_context_open ();
+ if (extractor)
+ grub_env_extractor_open (!new_env);
+
+ grub_normal_execute (args[0], 1, ! new_env);
+
+ if (new_env && !extractor)
+ grub_env_context_close ();
+ if (extractor)
+ grub_env_extractor_close (!new_env);
+
+ return 0;
+}
+
+static grub_command_t cmd_configfile, cmd_source, cmd_dot;
+static grub_command_t cmd_extractor_source, cmd_extractor_configfile;
+
+GRUB_MOD_INIT(configfile)
+{
+ cmd_configfile =
+ grub_register_command ("configfile", grub_cmd_source,
+ N_("FILE"), N_("Load another config file."));
+ cmd_source =
+ grub_register_command ("source", grub_cmd_source,
+ N_("FILE"),
+ N_("Load another config file without changing context.")
+ );
+
+ cmd_extractor_source =
+ grub_register_command ("extract_entries_source", grub_cmd_source,
+ N_("FILE"),
+ N_("Load another config file without changing context but take only menuentries.")
+ );
+
+ cmd_extractor_configfile =
+ grub_register_command ("extract_entries_configfile", grub_cmd_source,
+ N_("FILE"),
+ N_("Load another config file without changing context but take only menuentries.")
+ );
+
+ cmd_dot =
+ grub_register_command (".", grub_cmd_source,
+ N_("FILE"),
+ N_("Load another config file without changing context.")
+ );
+}
+
+GRUB_MOD_FINI(configfile)
+{
+ grub_unregister_command (cmd_configfile);
+ grub_unregister_command (cmd_source);
+ grub_unregister_command (cmd_extractor_configfile);
+ grub_unregister_command (cmd_extractor_source);
+ grub_unregister_command (cmd_dot);
+}
diff --git a/grub-core/commands/date.c b/grub-core/commands/date.c
new file mode 100644
index 0000000..d271620
--- /dev/null
+++ b/grub-core/commands/date.c
@@ -0,0 +1,148 @@
+/* date.c - command to display/set current datetime. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/datetime.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_DATETIME_SET_YEAR 1
+#define GRUB_DATETIME_SET_MONTH 2
+#define GRUB_DATETIME_SET_DAY 4
+#define GRUB_DATETIME_SET_HOUR 8
+#define GRUB_DATETIME_SET_MINUTE 16
+#define GRUB_DATETIME_SET_SECOND 32
+
+static grub_err_t
+grub_cmd_date (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct grub_datetime datetime;
+ int limit[6][2] = {{1980, 2079}, {1, 12}, {1, 31}, {0, 23}, {0, 59}, {0, 59}};
+ int value[6], mask;
+
+ if (argc == 0)
+ {
+ if (grub_get_datetime (&datetime))
+ return grub_errno;
+
+ grub_printf ("%d-%02d-%02d %02d:%02d:%02d %s\n",
+ datetime.year, datetime.month, datetime.day,
+ datetime.hour, datetime.minute, datetime.second,
+ grub_get_weekday_name (&datetime));
+
+ return 0;
+ }
+
+ grub_memset (&value, 0, sizeof (value));
+ mask = 0;
+
+ for (; argc; argc--, args++)
+ {
+ char *p, c;
+ int m1, ofs, n, cur_mask;
+
+ p = args[0];
+ m1 = grub_strtoul (p, &p, 10);
+
+ c = *p;
+ if (c == '-')
+ ofs = 0;
+ else if (c == ':')
+ ofs = 3;
+ else
+ goto fail;
+
+ value[ofs] = m1;
+ cur_mask = (1 << ofs);
+ mask &= ~(cur_mask * (1 + 2 + 4));
+
+ for (n = 1; (n < 3) && (*p); n++)
+ {
+ if (*p != c)
+ goto fail;
+
+ value[ofs + n] = grub_strtoul (p + 1, &p, 10);
+ cur_mask |= (1 << (ofs + n));
+ }
+
+ if (*p)
+ goto fail;
+
+ if ((ofs == 0) && (n == 2))
+ {
+ value[ofs + 2] = value[ofs + 1];
+ value[ofs + 1] = value[ofs];
+ ofs++;
+ cur_mask <<= 1;
+ }
+
+ for (; n; n--, ofs++)
+ if ((value [ofs] < limit[ofs][0]) ||
+ (value [ofs] > limit[ofs][1]))
+ goto fail;
+
+ mask |= cur_mask;
+ }
+
+ if (grub_get_datetime (&datetime))
+ return grub_errno;
+
+ if (mask & GRUB_DATETIME_SET_YEAR)
+ datetime.year = value[0];
+
+ if (mask & GRUB_DATETIME_SET_MONTH)
+ datetime.month = value[1];
+
+ if (mask & GRUB_DATETIME_SET_DAY)
+ datetime.day = value[2];
+
+ if (mask & GRUB_DATETIME_SET_HOUR)
+ datetime.hour = value[3];
+
+ if (mask & GRUB_DATETIME_SET_MINUTE)
+ datetime.minute = value[4];
+
+ if (mask & GRUB_DATETIME_SET_SECOND)
+ datetime.second = value[5];
+
+ return grub_set_datetime (&datetime);
+
+fail:
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid datetime");
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(date)
+{
+ cmd =
+ grub_register_command ("date", grub_cmd_date,
+ N_("[[year-]month-day] [hour:minute[:second]]"),
+ N_("Command to display/set current datetime."));
+}
+
+GRUB_MOD_FINI(date)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/echo.c b/grub-core/commands/echo.c
new file mode 100644
index 0000000..81ba50d
--- /dev/null
+++ b/grub-core/commands/echo.c
@@ -0,0 +1,141 @@
+/* echo.c - Command to display a line of text */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/term.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {0, 'n', 0, N_("Do not output the trailing newline."), 0, 0},
+ {0, 'e', 0, N_("Enable interpretation of backslash escapes."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_err_t
+grub_cmd_echo (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ int newline = 1;
+ int i;
+
+ /* Check if `-n' was used. */
+ if (state[0].set)
+ newline = 0;
+
+ for (i = 0; i < argc; i++)
+ {
+ char *arg = *args;
+ /* Unescaping results in a string no longer than the original. */
+ char *unescaped = grub_malloc (grub_strlen (arg) + 1);
+ char *p = unescaped;
+ args++;
+
+ if (!unescaped)
+ return grub_errno;
+
+ while (*arg)
+ {
+ /* In case `-e' is used, parse backslashes. */
+ if (*arg == '\\' && state[1].set)
+ {
+ arg++;
+ if (*arg == '\0')
+ break;
+
+ switch (*arg)
+ {
+ case '\\':
+ *p++ = '\\';
+ break;
+
+ case 'a':
+ *p++ = '\a';
+ break;
+
+ case 'c':
+ newline = 0;
+ break;
+
+ case 'f':
+ *p++ = '\f';
+ break;
+
+ case 'n':
+ *p++ = '\n';
+ break;
+
+ case 'r':
+ *p++ = '\r';
+ break;
+
+ case 't':
+ *p++ = '\t';
+ break;
+
+ case 'v':
+ *p++ = '\v';
+ break;
+ }
+ arg++;
+ continue;
+ }
+
+ /* This was not an escaped character, or escaping is not
+ enabled. */
+ *p++ = *arg;
+ arg++;
+ }
+
+ *p = '\0';
+ grub_xputs (unescaped);
+ grub_free (unescaped);
+
+ /* If another argument follows, insert a space. */
+ if (i != argc - 1)
+ grub_printf (" " );
+ }
+
+ if (newline)
+ grub_printf ("\n");
+
+ grub_refresh ();
+
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(echo)
+{
+ cmd = grub_register_extcmd ("echo", grub_cmd_echo,
+ GRUB_COMMAND_ACCEPT_DASH
+ | GRUB_COMMAND_OPTIONS_AT_START,
+ N_("[-e|-n] STRING"), N_("Display a line of text."),
+ options);
+}
+
+GRUB_MOD_FINI(echo)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/efi/acpi.c b/grub-core/commands/efi/acpi.c
new file mode 100644
index 0000000..93a560d
--- /dev/null
+++ b/grub-core/commands/efi/acpi.c
@@ -0,0 +1,59 @@
+/* acpi.c - get acpi tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/acpi.h>
+#include <grub/misc.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/api.h>
+
+struct grub_acpi_rsdp_v10 *
+grub_machine_acpi_get_rsdpv1 (void)
+{
+ unsigned i;
+ static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
+
+ for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
+ {
+ grub_efi_guid_t *guid =
+ &grub_efi_system_table->configuration_table[i].vendor_guid;
+
+ if (! grub_memcmp (guid, &acpi_guid, sizeof (grub_efi_guid_t)))
+ return (struct grub_acpi_rsdp_v10 *)
+ grub_efi_system_table->configuration_table[i].vendor_table;
+ }
+ return 0;
+}
+
+struct grub_acpi_rsdp_v20 *
+grub_machine_acpi_get_rsdpv2 (void)
+{
+ unsigned i;
+ static grub_efi_guid_t acpi20_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
+
+ for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
+ {
+ grub_efi_guid_t *guid =
+ &grub_efi_system_table->configuration_table[i].vendor_guid;
+
+ if (! grub_memcmp (guid, &acpi20_guid, sizeof (grub_efi_guid_t)))
+ return (struct grub_acpi_rsdp_v20 *)
+ grub_efi_system_table->configuration_table[i].vendor_table;
+ }
+ return 0;
+}
diff --git a/grub-core/commands/efi/fixvideo.c b/grub-core/commands/efi/fixvideo.c
new file mode 100644
index 0000000..c53e47d
--- /dev/null
+++ b/grub-core/commands/efi/fixvideo.c
@@ -0,0 +1,112 @@
+/* fixvideo.c - fix video problem in efi */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/pci.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct grub_video_patch
+{
+ const char *name;
+ grub_uint32_t pci_id;
+ grub_uint32_t mmio_bar;
+ grub_uint32_t mmio_reg;
+ grub_uint32_t mmio_old;
+} video_patches[] =
+ {
+ {"Intel 945GM", 0x27a28086, 0, 0x71184, 0x1000000}, /* DSPBBASE */
+ {"Intel 965GM", 0x2a028086, 0, 0x7119C, 0x1000000}, /* DSPBSURF */
+ {0, 0, 0, 0, 0}
+ };
+
+static int NESTED_FUNC_ATTR
+scan_card (grub_pci_device_t dev, grub_pci_id_t pciid)
+{
+ grub_pci_address_t addr;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ if (grub_pci_read_byte (addr + 3) == 0x3)
+ {
+ struct grub_video_patch *p = video_patches;
+
+ while (p->name)
+ {
+ if (p->pci_id == pciid)
+ {
+ grub_target_addr_t base;
+
+ grub_printf ("Found graphic card: %s\n", p->name);
+ addr += 8 + p->mmio_bar * 4;
+ base = grub_pci_read (addr);
+ if ((! base) || (base & GRUB_PCI_ADDR_SPACE_IO) ||
+ (base & GRUB_PCI_ADDR_MEM_PREFETCH))
+ grub_printf ("Invalid MMIO bar %d\n", p->mmio_bar);
+ else
+ {
+ base &= GRUB_PCI_ADDR_MEM_MASK;
+ base += p->mmio_reg;
+
+ if (*((volatile grub_uint32_t *) base) != p->mmio_old)
+ grub_printf ("Old value don't match\n");
+ else
+ {
+ *((volatile grub_uint32_t *) base) = 0;
+ if (*((volatile grub_uint32_t *) base))
+ grub_printf ("Set MMIO fails\n");
+ }
+ }
+
+ return 1;
+ }
+ p++;
+ }
+
+ grub_printf ("Unknown graphic card: %x\n", pciid);
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_fixvideo (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ grub_pci_iterate (scan_card);
+ return 0;
+}
+
+static grub_command_t cmd_fixvideo;
+
+GRUB_MOD_INIT(fixvideo)
+{
+ cmd_fixvideo = grub_register_command ("fix_video", grub_cmd_fixvideo,
+ 0, N_("Fix video problem."));
+
+}
+
+GRUB_MOD_FINI(fixvideo)
+{
+ grub_unregister_command (cmd_fixvideo);
+}
diff --git a/grub-core/commands/efi/loadbios.c b/grub-core/commands/efi/loadbios.c
new file mode 100644
index 0000000..1383112
--- /dev/null
+++ b/grub-core/commands/efi/loadbios.c
@@ -0,0 +1,220 @@
+/* loadbios.c - command to load a bios dump */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/efi/efi.h>
+#include <grub/pci.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
+static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
+static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;
+
+#define EBDA_SEG_ADDR 0x40e
+#define LOW_MEM_ADDR 0x413
+#define FAKE_EBDA_SEG 0x9fc0
+
+#define BLANK_MEM 0xffffffff
+#define VBIOS_ADDR 0xc0000
+#define SBIOS_ADDR 0xf0000
+
+static int
+enable_rom_area (void)
+{
+ grub_pci_address_t addr;
+ grub_uint32_t *rom_ptr;
+ grub_pci_device_t dev = { .bus = 0, .device = 0, .function = 0};
+
+ rom_ptr = (grub_uint32_t *) VBIOS_ADDR;
+ if (*rom_ptr != BLANK_MEM)
+ {
+ grub_printf ("ROM image is present.\n");
+ return 0;
+ }
+
+ /* FIXME: should be macroified. */
+ addr = grub_pci_make_address (dev, 144);
+ grub_pci_write_byte (addr++, 0x30);
+ grub_pci_write_byte (addr++, 0x33);
+ grub_pci_write_byte (addr++, 0x33);
+ grub_pci_write_byte (addr++, 0x33);
+ grub_pci_write_byte (addr++, 0x33);
+ grub_pci_write_byte (addr++, 0x33);
+ grub_pci_write_byte (addr++, 0x33);
+ grub_pci_write_byte (addr, 0);
+
+ *rom_ptr = 0;
+ if (*rom_ptr != 0)
+ {
+ grub_printf ("Can\'t enable ROM area.\n");
+ return 0;
+ }
+
+ return 1;
+}
+
+static void
+lock_rom_area (void)
+{
+ grub_pci_address_t addr;
+ grub_pci_device_t dev = { .bus = 0, .device = 0, .function = 0};
+
+ /* FIXME: should be macroified. */
+ addr = grub_pci_make_address (dev, 144);
+ grub_pci_write_byte (addr++, 0x10);
+ grub_pci_write_byte (addr++, 0x11);
+ grub_pci_write_byte (addr++, 0x11);
+ grub_pci_write_byte (addr++, 0x11);
+ grub_pci_write_byte (addr, 0x11);
+}
+
+static void
+fake_bios_data (int use_rom)
+{
+ unsigned i;
+ void *acpi, *smbios;
+ grub_uint16_t *ebda_seg_ptr, *low_mem_ptr;
+
+ ebda_seg_ptr = (grub_uint16_t *) EBDA_SEG_ADDR;
+ low_mem_ptr = (grub_uint16_t *) LOW_MEM_ADDR;
+ if ((*ebda_seg_ptr) || (*low_mem_ptr))
+ return;
+
+ acpi = 0;
+ smbios = 0;
+ for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
+ {
+ grub_efi_guid_t *guid =
+ &grub_efi_system_table->configuration_table[i].vendor_guid;
+
+ if (! grub_memcmp (guid, &acpi2_guid, sizeof (grub_efi_guid_t)))
+ {
+ acpi = grub_efi_system_table->configuration_table[i].vendor_table;
+ grub_dprintf ("efi", "ACPI2: %p\n", acpi);
+ }
+ else if (! grub_memcmp (guid, &acpi_guid, sizeof (grub_efi_guid_t)))
+ {
+ void *t;
+
+ t = grub_efi_system_table->configuration_table[i].vendor_table;
+ if (! acpi)
+ acpi = t;
+ grub_dprintf ("efi", "ACPI: %p\n", t);
+ }
+ else if (! grub_memcmp (guid, &smbios_guid, sizeof (grub_efi_guid_t)))
+ {
+ smbios = grub_efi_system_table->configuration_table[i].vendor_table;
+ grub_dprintf ("efi", "SMBIOS: %p\n", smbios);
+ }
+ }
+
+ *ebda_seg_ptr = FAKE_EBDA_SEG;
+ *low_mem_ptr = (FAKE_EBDA_SEG >> 6);
+
+ *((grub_uint16_t *) (FAKE_EBDA_SEG << 4)) = 640 - *low_mem_ptr;
+
+ if (acpi)
+ grub_memcpy ((char *) ((FAKE_EBDA_SEG << 4) + 16), acpi, 1024 - 16);
+
+ if ((use_rom) && (smbios))
+ grub_memcpy ((char *) SBIOS_ADDR, (char *) smbios + 16, 16);
+}
+
+static grub_err_t
+grub_cmd_fakebios (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ if (enable_rom_area ())
+ {
+ fake_bios_data (1);
+ lock_rom_area ();
+ }
+ else
+ fake_bios_data (0);
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_loadbios (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file;
+ int size;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no ROM image specified");
+
+ if (argc > 1)
+ {
+ file = grub_file_open (argv[1]);
+ if (! file)
+ return grub_errno;
+
+ if (file->size != 4)
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid int10 dump size");
+ else
+ grub_file_read (file, (void *) 0x40, 4);
+
+ grub_file_close (file);
+ if (grub_errno)
+ return grub_errno;
+ }
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_errno;
+
+ size = file->size;
+ if ((size < 0x10000) || (size > 0x40000))
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid bios dump size");
+ else if (enable_rom_area ())
+ {
+ grub_file_read (file, (void *) VBIOS_ADDR, size);
+ fake_bios_data (size <= 0x40000);
+ lock_rom_area ();
+ }
+
+ grub_file_close (file);
+ return grub_errno;
+}
+
+static grub_command_t cmd_fakebios, cmd_loadbios;
+
+GRUB_MOD_INIT(loadbios)
+{
+ cmd_fakebios = grub_register_command ("fakebios", grub_cmd_fakebios,
+ 0, N_("Fake BIOS."));
+
+ cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios,
+ "BIOS_DUMP [INT10_DUMP]",
+ N_("Load BIOS dump."));
+}
+
+GRUB_MOD_FINI(loadbios)
+{
+ grub_unregister_command (cmd_fakebios);
+ grub_unregister_command (cmd_loadbios);
+}
diff --git a/grub-core/commands/efi/lsefimmap.c b/grub-core/commands/efi/lsefimmap.c
new file mode 100644
index 0000000..215b45b
--- /dev/null
+++ b/grub-core/commands/efi/lsefimmap.c
@@ -0,0 +1,145 @@
+/* lsefimemmap.c - Display memory map. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/command.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define ADD_MEMORY_DESCRIPTOR(desc, size) \
+ ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
+
+static grub_err_t
+grub_cmd_lsefimmap (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_efi_uintn_t map_size;
+ grub_efi_memory_descriptor_t *memory_map;
+ grub_efi_memory_descriptor_t *memory_map_end;
+ grub_efi_memory_descriptor_t *desc;
+ grub_efi_uintn_t desc_size;
+
+ map_size = 0;
+ if (grub_efi_get_memory_map (&map_size, NULL, NULL, &desc_size, 0) < 0)
+ return 0;
+
+ memory_map = grub_malloc (map_size);
+ if (memory_map == NULL)
+ return grub_errno;
+ if (grub_efi_get_memory_map (&map_size, memory_map, NULL, &desc_size, 0) <= 0)
+ goto fail;
+
+ grub_printf
+ ("Type Physical start - end #Pages "
+ " Size Attributes\n");
+ memory_map_end = ADD_MEMORY_DESCRIPTOR (memory_map, map_size);
+ for (desc = memory_map;
+ desc < memory_map_end;
+ desc = ADD_MEMORY_DESCRIPTOR (desc, desc_size))
+ {
+ grub_efi_uint64_t size;
+ grub_efi_uint64_t attr;
+ static const char types_str[][9] =
+ {
+ "reserved",
+ "ldr-code",
+ "ldr-data",
+ "BS-code ",
+ "BS-data ",
+ "RT-code ",
+ "RT-data ",
+ "conv-mem",
+ "unusable",
+ "ACPI-rec",
+ "ACPI-nvs",
+ "MMIO ",
+ "IO-ports",
+ "PAL-code"
+ };
+ if (desc->type < ARRAY_SIZE (types_str))
+ grub_printf ("%s ", types_str[desc->type]);
+ else
+ grub_printf ("Unk %02x ", desc->type);
+
+ grub_printf (" %016" PRIxGRUB_UINT64_T "-%016" PRIxGRUB_UINT64_T
+ " %08" PRIxGRUB_UINT64_T,
+ desc->physical_start,
+ desc->physical_start + (desc->num_pages << 12) - 1,
+ desc->num_pages);
+
+ size = desc->num_pages;
+ size <<= (12 - 10);
+ if (size < 1024)
+ grub_printf (" %4" PRIuGRUB_UINT64_T "KB", size);
+ else
+ {
+ size /= 1024;
+ if (size < 1024)
+ grub_printf (" %4" PRIuGRUB_UINT64_T "MB", size);
+ else
+ {
+ size /= 1024;
+ grub_printf (" %4" PRIuGRUB_UINT64_T "GB", size);
+ }
+ }
+
+ attr = desc->attribute;
+ if (attr & GRUB_EFI_MEMORY_RUNTIME)
+ grub_printf (" RT");
+ if (attr & GRUB_EFI_MEMORY_UC)
+ grub_printf (" UC");
+ if (attr & GRUB_EFI_MEMORY_WC)
+ grub_printf (" WC");
+ if (attr & GRUB_EFI_MEMORY_WT)
+ grub_printf (" WT");
+ if (attr & GRUB_EFI_MEMORY_WB)
+ grub_printf (" WB");
+ if (attr & GRUB_EFI_MEMORY_UCE)
+ grub_printf (" UCE");
+ if (attr & GRUB_EFI_MEMORY_WP)
+ grub_printf (" WP");
+ if (attr & GRUB_EFI_MEMORY_RP)
+ grub_printf (" RP");
+ if (attr & GRUB_EFI_MEMORY_XP)
+ grub_printf (" XP");
+
+ grub_printf ("\n");
+ }
+
+ fail:
+ grub_free (memory_map);
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(lsefimmap)
+{
+ cmd = grub_register_command ("lsefimmap", grub_cmd_lsefimmap,
+ "", "Display EFI memory map.");
+}
+
+GRUB_MOD_FINI(lsefimmap)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c
new file mode 100644
index 0000000..b235925
--- /dev/null
+++ b/grub-core/commands/efi/lsefisystab.c
@@ -0,0 +1,110 @@
+/* lsefisystab.c - Display EFI systab. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/normal.h>
+#include <grub/charset.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct guid_mapping
+{
+ grub_efi_guid_t guid;
+ const char *name;
+};
+
+static const struct guid_mapping guid_mappings[] =
+ {
+ { GRUB_EFI_ACPI_20_TABLE_GUID, "ACPI-2.0"},
+ { GRUB_EFI_ACPI_TABLE_GUID, "ACPI-1.0"},
+ { GRUB_EFI_SAL_TABLE_GUID, "SAL"},
+ { GRUB_EFI_SMBIOS_TABLE_GUID, "SMBIOS"},
+ { GRUB_EFI_MPS_TABLE_GUID, "MPS"},
+ { GRUB_EFI_HCDP_TABLE_GUID, "HCDP"}
+ };
+
+static grub_err_t
+grub_cmd_lsefisystab (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ const grub_efi_system_table_t *st = grub_efi_system_table;
+ grub_efi_configuration_table_t *t;
+ unsigned int i;
+
+ grub_printf ("Signature: %016" PRIxGRUB_UINT64_T " revision: %08x\n",
+ st->hdr.signature, st->hdr.revision);
+ {
+ char *vendor;
+ grub_uint16_t *vendor_utf16;
+ grub_printf ("Vendor: ");
+
+ for (vendor_utf16 = st->firmware_vendor; *vendor_utf16; vendor_utf16++);
+ vendor = grub_malloc (4 * (vendor_utf16 - st->firmware_vendor) + 1);
+ if (!vendor)
+ return grub_errno;
+ *grub_utf16_to_utf8 ((grub_uint8_t *) vendor, st->firmware_vendor,
+ vendor_utf16 - st->firmware_vendor) = 0;
+ grub_printf ("%s", vendor);
+ grub_free (vendor);
+ }
+
+ grub_printf (", Version=%x\n", st->firmware_revision);
+
+ grub_printf ("%ld tables:\n", st->num_table_entries);
+ t = st->configuration_table;
+ for (i = 0; i < st->num_table_entries; i++)
+ {
+ unsigned int j;
+
+ grub_printf ("%p ", t->vendor_table);
+
+ grub_printf ("%08x-%04x-%04x-",
+ t->vendor_guid.data1, t->vendor_guid.data2,
+ t->vendor_guid.data3);
+ for (j = 0; j < 8; j++)
+ grub_printf ("%02x", t->vendor_guid.data4[j]);
+
+ for (j = 0; j < ARRAY_SIZE (guid_mappings); j++)
+ if (grub_memcmp (&guid_mappings[j].guid, &t->vendor_guid,
+ sizeof (grub_efi_guid_t)) == 0)
+ grub_printf (" %s", guid_mappings[j].name);
+
+ grub_printf ("\n");
+ t++;
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(lsefisystab)
+{
+ cmd = grub_register_command ("lsefisystab", grub_cmd_lsefisystab,
+ "", "Display EFI system tables.");
+}
+
+GRUB_MOD_FINI(lsefisystab)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/efi/lssal.c b/grub-core/commands/efi/lssal.c
new file mode 100644
index 0000000..fa8005b
--- /dev/null
+++ b/grub-core/commands/efi/lssal.c
@@ -0,0 +1,165 @@
+/* lssal.c - Display EFI SAL systab. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/normal.h>
+#include <grub/charset.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static void
+disp_sal (void *table)
+{
+ struct grub_efi_sal_system_table *t = table;
+ void *desc;
+ grub_uint32_t len, l;
+
+ grub_printf ("SAL rev: %02x, signature: %x, len:%x\n",
+ t->sal_rev, t->signature, t->total_table_len);
+ grub_printf ("nbr entry: %d, chksum: %02x, SAL version A: %02x B: %02x\n",
+ t->entry_count, t->checksum,
+ t->sal_a_version, t->sal_b_version);
+ grub_printf ("OEM-ID: %-32s\n", t->oem_id);
+ grub_printf ("Product-ID: %-32s\n", t->product_id);
+
+ desc = t->entries;
+ len = t->total_table_len - sizeof (struct grub_efi_sal_system_table);
+ while (len > 0)
+ {
+ switch (*(grub_uint8_t *) desc)
+ {
+ case GRUB_EFI_SAL_SYSTEM_TABLE_TYPE_ENTRYPOINT_DESCRIPTOR:
+ {
+ struct grub_efi_sal_system_table_entrypoint_descriptor *c = desc;
+ l = sizeof (*c);
+ grub_printf (" Entry point: PAL=%016" PRIxGRUB_UINT64_T
+ " SAL=%016" PRIxGRUB_UINT64_T " GP=%016"
+ PRIxGRUB_UINT64_T "\n",
+ c->pal_proc_addr, c->sal_proc_addr,
+ c->global_data_ptr);
+ }
+ break;
+ case GRUB_EFI_SAL_SYSTEM_TABLE_TYPE_MEMORY_DESCRIPTOR:
+ {
+ struct grub_efi_sal_system_table_memory_descriptor *c = desc;
+ l = sizeof (*c);
+ grub_printf (" Memory descriptor entry addr=%016" PRIxGRUB_UINT64_T
+ " len=%" PRIuGRUB_UINT64_T "KB\n",
+ c->addr, c->len * 4);
+ grub_printf (" sal_used=%d attr=%x AR=%x attr_mask=%x "
+ "type=%x usage=%x\n",
+ c->sal_used, c->attr, c->ar, c->attr_mask, c->mem_type,
+ c->usage);
+ }
+ break;
+ case GRUB_EFI_SAL_SYSTEM_TABLE_TYPE_PLATFORM_FEATURES:
+ {
+ struct grub_efi_sal_system_table_platform_features *c = desc;
+ l = sizeof (*c);
+ grub_printf (" Platform features: %02x", c->flags);
+ if (c->flags & GRUB_EFI_SAL_SYSTEM_TABLE_PLATFORM_FEATURE_BUSLOCK)
+ grub_printf (" BusLock");
+ if (c->flags & GRUB_EFI_SAL_SYSTEM_TABLE_PLATFORM_FEATURE_IRQREDIRECT)
+ grub_printf (" IrqRedirect");
+ if (c->flags & GRUB_EFI_SAL_SYSTEM_TABLE_PLATFORM_FEATURE_IPIREDIRECT)
+
+ grub_printf (" IPIRedirect");
+ if (c->flags & GRUB_EFI_SAL_SYSTEM_TABLE_PLATFORM_FEATURE_ITCDRIFT)
+
+ grub_printf (" ITCDrift");
+ grub_printf ("\n");
+ }
+ break;
+ case GRUB_EFI_SAL_SYSTEM_TABLE_TYPE_TRANSLATION_REGISTER_DESCRIPTOR:
+ {
+ struct grub_efi_sal_system_table_translation_register_descriptor *c
+ = desc;
+ l = sizeof (*c);
+ grub_printf (" TR type=%d num=%d va=%016" PRIxGRUB_UINT64_T
+ " pte=%016" PRIxGRUB_UINT64_T "\n",
+ c->register_type, c->register_number,
+ c->addr, c->page_size);
+ }
+ break;
+ case GRUB_EFI_SAL_SYSTEM_TABLE_TYPE_PURGE_TRANSLATION_COHERENCE:
+ {
+ struct grub_efi_sal_system_table_purge_translation_coherence *c
+ = desc;
+ l = sizeof (*c);
+ grub_printf (" PTC coherence nbr=%d addr=%016" PRIxGRUB_UINT64_T "\n",
+ c->ndomains, c->coherence);
+ }
+ break;
+ case GRUB_EFI_SAL_SYSTEM_TABLE_TYPE_AP_WAKEUP:
+ {
+ struct grub_efi_sal_system_table_ap_wakeup *c = desc;
+ l = sizeof (*c);
+ grub_printf (" AP wake-up: mec=%d vect=%" PRIxGRUB_UINT64_T "\n",
+ c->mechanism, c->vector);
+ }
+ break;
+ default:
+ grub_printf (" unknown entry 0x%x\n", *(grub_uint8_t *)desc);
+ return;
+ }
+ desc = (grub_uint8_t *)desc + l;
+ len -= l;
+ }
+}
+
+static grub_err_t
+grub_cmd_lssal (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ const grub_efi_system_table_t *st = grub_efi_system_table;
+ grub_efi_configuration_table_t *t = st->configuration_table;
+ unsigned int i;
+ grub_efi_guid_t guid = GRUB_EFI_SAL_TABLE_GUID;
+
+ for (i = 0; i < st->num_table_entries; i++)
+ {
+ if (grub_memcmp (&guid, &t->vendor_guid,
+ sizeof (grub_efi_guid_t)) == 0)
+ {
+ disp_sal (t->vendor_table);
+ return GRUB_ERR_NONE;
+ }
+ t++;
+ }
+ grub_printf ("SAL not found\n");
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(lssal)
+{
+ cmd = grub_register_command ("lssal", grub_cmd_lssal, "",
+ "Display SAL system table.");
+}
+
+GRUB_MOD_FINI(lssal)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/extcmd.c b/grub-core/commands/extcmd.c
new file mode 100644
index 0000000..69574e2
--- /dev/null
+++ b/grub-core/commands/extcmd.c
@@ -0,0 +1,118 @@
+/* extcmd.c - support extended command */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/list.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/script_sh.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+grub_err_t
+grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
+ struct grub_script *script)
+{
+ int new_argc;
+ char **new_args;
+ struct grub_arg_list *state;
+ struct grub_extcmd_context context;
+ grub_err_t ret;
+ grub_extcmd_t ext = cmd->data;
+
+ context.state = 0;
+ context.extcmd = ext;
+ context.script = script;
+
+ if (! ext->options)
+ {
+ ret = (ext->func) (&context, argc, args);
+ return ret;
+ }
+
+ state = grub_arg_list_alloc (ext, argc, args);
+ if (grub_arg_parse (ext, argc, args, state, &new_args, &new_argc))
+ {
+ context.state = state;
+ ret = (ext->func) (&context, new_argc, new_args);
+ grub_free (new_args);
+ grub_free (state);
+ return ret;
+ }
+
+ grub_free (state);
+ return grub_errno;
+}
+
+static grub_err_t
+grub_extcmd_dispatch (struct grub_command *cmd, int argc, char **args)
+{
+ return grub_extcmd_dispatcher (cmd, argc, args, 0);
+}
+
+grub_extcmd_t
+grub_register_extcmd_prio (const char *name, grub_extcmd_func_t func,
+ grub_command_flags_t flags, const char *summary,
+ const char *description,
+ const struct grub_arg_option *parser,
+ int prio)
+{
+ grub_extcmd_t ext;
+ grub_command_t cmd;
+
+ ext = (grub_extcmd_t) grub_malloc (sizeof (*ext));
+ if (! ext)
+ return 0;
+
+ cmd = grub_register_command_prio (name, grub_extcmd_dispatch,
+ summary, description, prio);
+ if (! cmd)
+ {
+ grub_free (ext);
+ return 0;
+ }
+
+ cmd->flags = (flags | GRUB_COMMAND_FLAG_EXTCMD);
+ cmd->data = ext;
+
+ ext->cmd = cmd;
+ ext->func = func;
+ ext->options = parser;
+ ext->data = 0;
+
+ return ext;
+}
+
+grub_extcmd_t
+grub_register_extcmd (const char *name, grub_extcmd_func_t func,
+ grub_command_flags_t flags, const char *summary,
+ const char *description,
+ const struct grub_arg_option *parser)
+{
+ return grub_register_extcmd_prio (name, func, flags,
+ summary, description, parser, 1);
+}
+
+void
+grub_unregister_extcmd (grub_extcmd_t ext)
+{
+ grub_unregister_command (ext->cmd);
+ grub_free (ext);
+}
diff --git a/grub-core/commands/gptsync.c b/grub-core/commands/gptsync.c
new file mode 100644
index 0000000..e92dc20
--- /dev/null
+++ b/grub-core/commands/gptsync.c
@@ -0,0 +1,258 @@
+/* gptsync.c - fill the mbr based on gpt entries */
+/* XXX: I don't know what to do if sector size isn't 512 bytes */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/command.h>
+#include <grub/dl.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/msdos_partition.h>
+#include <grub/partition.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/fs.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Convert a LBA address to a CHS address in the INT 13 format. */
+/* Taken from grub1. */
+/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.
+ Is it a problem?
+*/
+static void
+lba_to_chs (int lba, grub_uint8_t *cl, grub_uint8_t *ch,
+ grub_uint8_t *dh)
+{
+ int cylinder, head, sector;
+ int sectors = 63, heads = 255, cylinders = 1024;
+
+ sector = lba % sectors + 1;
+ head = (lba / sectors) % heads;
+ cylinder = lba / (sectors * heads);
+
+ if (cylinder >= cylinders)
+ {
+ *cl = *ch = *dh = 0xff;
+ return;
+ }
+
+ *cl = sector | ((cylinder & 0x300) >> 2);
+ *ch = cylinder & 0xFF;
+ *dh = head;
+}
+
+static grub_err_t
+grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_device_t dev;
+ struct grub_msdos_partition_mbr mbr;
+ struct grub_partition *partition;
+ grub_disk_addr_t first_sector;
+ int numactive = 0;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
+ if (argc > 4)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "only 3 partitions can be "
+ "in hybrid MBR");
+
+ if (args[0][0] == '(' && args[0][grub_strlen (args[0]) - 1] == ')')
+ {
+ args[0][grub_strlen (args[0]) - 1] = 0;
+ dev = grub_device_open (args[0] + 1);
+ args[0][grub_strlen (args[0])] = ')';
+ }
+ else
+ dev = grub_device_open (args[0]);
+
+ if (! dev)
+ return grub_errno;
+
+ if (! dev->disk)
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "not a disk");
+ }
+
+ /* Read the protective MBR. */
+ if (grub_disk_read (dev->disk, 0, 0, sizeof (mbr), &mbr))
+ {
+ grub_device_close (dev);
+ return grub_errno;
+ }
+
+ /* Check if it is valid. */
+ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE))
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature");
+ }
+
+ /* Make sure the MBR is a protective MBR and not a normal MBR. */
+ if (mbr.entries[0].type != GRUB_PC_PARTITION_TYPE_GPT_DISK)
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map found");
+ }
+
+ int i;
+ first_sector = dev->disk->total_sectors;
+ for (i = 1; i < argc; i++)
+ {
+ char *separator, csep = 0;
+ grub_uint8_t type;
+ separator = grub_strchr (args[i], '+');
+ if (! separator)
+ separator = grub_strchr (args[i], '-');
+ if (separator)
+ {
+ csep = *separator;
+ *separator = 0;
+ }
+ partition = grub_partition_probe (dev->disk, args[i]);
+ if (separator)
+ *separator = csep;
+ if (! partition)
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such partition");
+ }
+
+ if (partition->start + partition->len > 0xffffffff)
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "only partitions residing in the first 2TB "
+ "can be present in hybrid MBR");
+ }
+
+
+ if (first_sector > partition->start)
+ first_sector = partition->start;
+
+ if (separator && *(separator + 1))
+ type = grub_strtoul (separator + 1, 0, 0);
+ else
+ {
+ grub_fs_t fs = 0;
+ dev->disk->partition = partition;
+ fs = grub_fs_probe (dev);
+
+ /* Unknown filesystem isn't fatal. */
+ if (grub_errno == GRUB_ERR_UNKNOWN_FS)
+ {
+ fs = 0;
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if (fs && grub_strcmp (fs->name, "ntfs") == 0)
+ type = GRUB_PC_PARTITION_TYPE_NTFS;
+ else if (fs && grub_strcmp (fs->name, "fat") == 0)
+ /* FIXME: detect FAT16. */
+ type = GRUB_PC_PARTITION_TYPE_FAT32_LBA;
+ else if (fs && (grub_strcmp (fs->name, "hfsplus") == 0
+ || grub_strcmp (fs->name, "hfs") == 0))
+ type = GRUB_PC_PARTITION_TYPE_HFS;
+ else
+ /* FIXME: detect more types. */
+ type = GRUB_PC_PARTITION_TYPE_EXT2FS;
+
+ dev->disk->partition = 0;
+ }
+
+ mbr.entries[i].flag = (csep == '+') ? 0x80 : 0;
+ if (csep == '+')
+ {
+ numactive++;
+ if (numactive == 2)
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only one partition can be active");
+ }
+ }
+ mbr.entries[i].type = type;
+ mbr.entries[i].start = grub_cpu_to_le32 (partition->start);
+ lba_to_chs (partition->start,
+ &(mbr.entries[i].start_sector),
+ &(mbr.entries[i].start_cylinder),
+ &(mbr.entries[i].start_head));
+ lba_to_chs (partition->start + partition->len - 1,
+ &(mbr.entries[i].end_sector),
+ &(mbr.entries[i].end_cylinder),
+ &(mbr.entries[i].end_head));
+ mbr.entries[i].length = grub_cpu_to_le32 (partition->len);
+ grub_free (partition);
+ }
+ for (; i < 4; i++)
+ grub_memset (&(mbr.entries[i]), 0, sizeof (mbr.entries[i]));
+
+ /* The protective partition. */
+ if (first_sector > 0xffffffff)
+ first_sector = 0xffffffff;
+ else
+ first_sector--;
+ mbr.entries[0].flag = 0;
+ mbr.entries[0].type = GRUB_PC_PARTITION_TYPE_GPT_DISK;
+ mbr.entries[0].start = grub_cpu_to_le32 (1);
+ lba_to_chs (1,
+ &(mbr.entries[0].start_sector),
+ &(mbr.entries[0].start_cylinder),
+ &(mbr.entries[0].start_head));
+ lba_to_chs (first_sector,
+ &(mbr.entries[0].end_sector),
+ &(mbr.entries[0].end_cylinder),
+ &(mbr.entries[0].end_head));
+ mbr.entries[0].length = grub_cpu_to_le32 (first_sector);
+
+ mbr.signature = grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE);
+
+ if (grub_disk_write (dev->disk, 0, 0, sizeof (mbr), &mbr))
+ {
+ grub_device_close (dev);
+ return grub_errno;
+ }
+
+ grub_printf ("New MBR is written to '%s'\n", args[0]);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(gptsync)
+{
+ (void) mod; /* To stop warning. */
+ cmd = grub_register_command ("gptsync", grub_cmd_gptsync,
+ N_("DEVICE [PARTITION[+/-[TYPE]]] ..."),
+ N_("Fill hybrid MBR of GPT drive DEVICE. "
+ "Specified partitions will be a part "
+ "of hybrid MBR. Up to 3 partitions are "
+ "allowed. TYPE is an MBR type. "
+ "+ means that partition is active. "
+ "Only one partition can be active."));
+}
+
+GRUB_MOD_FINI(gptsync)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/halt.c b/grub-core/commands/halt.c
new file mode 100644
index 0000000..317f775
--- /dev/null
+++ b/grub-core/commands/halt.c
@@ -0,0 +1,48 @@
+/* halt.c - command to halt the computer. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/misc.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_halt ();
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(halt)
+{
+ cmd = grub_register_command ("halt", grub_cmd_halt,
+ 0, N_("Halts the computer. This command does"
+ " not work on all firmware implementations."));
+}
+
+GRUB_MOD_FINI(halt)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/hashsum.c b/grub-core/commands/hashsum.c
new file mode 100644
index 0000000..6825d48
--- /dev/null
+++ b/grub-core/commands/hashsum.c
@@ -0,0 +1,300 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/extcmd.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/crypto.h>
+#include <grub/normal.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] = {
+ {"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
+ {"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},
+ {"prefix", 'p', 0, N_("Base directory for hash list."), N_("DIRECTORY"),
+ ARG_TYPE_STRING},
+ {"keep-going", 'k', 0, N_("Don't stop after first error."), 0, 0},
+ {"uncompress", 'u', 0, N_("Uncompress file before checksumming."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+};
+
+static struct { const char *name; const char *hashname; } aliases[] =
+ {
+ {"sha256sum", "sha256"},
+ {"sha512sum", "sha512"},
+ {"sha1sum", "sha1"},
+ {"md5sum", "md5"},
+ {"crc", "crc32"},
+ };
+
+static inline int
+hextoval (char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ if (c >= 'a' && c <= 'f')
+ return c - 'a' + 10;
+ if (c >= 'A' && c <= 'F')
+ return c - 'A' + 10;
+ return -1;
+}
+
+static grub_err_t
+hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result)
+{
+ grub_uint8_t context[hash->contextsize];
+ grub_uint8_t readbuf[4096];
+
+ grub_memset (context, 0, sizeof (context));
+ hash->init (context);
+ while (1)
+ {
+ grub_ssize_t r;
+ r = grub_file_read (file, readbuf, sizeof (readbuf));
+ if (r < 0)
+ return grub_errno;
+ if (r == 0)
+ break;
+ hash->write (context, readbuf, r);
+ }
+ hash->final (context);
+ grub_memcpy (result, hash->read (context), hash->mdlen);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+check_list (const gcry_md_spec_t *hash, const char *hashfilename,
+ const char *prefix, int keep, int uncompress)
+{
+ grub_file_t hashlist, file;
+ char *buf = NULL;
+ grub_uint8_t expected[hash->mdlen];
+ grub_uint8_t actual[hash->mdlen];
+ grub_err_t err;
+ unsigned i;
+ unsigned unread = 0, mismatch = 0;
+
+ hashlist = grub_file_open (hashfilename);
+ if (!hashlist)
+ return grub_errno;
+
+ while (grub_free (buf), (buf = grub_file_getline (hashlist)))
+ {
+ const char *p = buf;
+ for (i = 0; i < hash->mdlen; i++)
+ {
+ int high, low;
+ high = hextoval (*p++);
+ low = hextoval (*p++);
+ if (high < 0 || low < 0)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "invalid hash list");
+ expected[i] = (high << 4) | low;
+ }
+ if (*p++ != ' ' || *p++ != ' ')
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "invalid hash list");
+ if (prefix)
+ {
+ char *filename;
+
+ filename = grub_xasprintf ("%s/%s", prefix, p);
+ if (!filename)
+ return grub_errno;
+ if (!uncompress)
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (filename);
+ grub_free (filename);
+ }
+ else
+ {
+ if (!uncompress)
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (p);
+ }
+ if (!file)
+ {
+ grub_file_close (hashlist);
+ grub_free (buf);
+ return grub_errno;
+ }
+ err = hash_file (file, hash, actual);
+ grub_file_close (file);
+ if (err)
+ {
+ grub_printf ("%s: READ ERROR\n", p);
+ if (!keep)
+ {
+ grub_file_close (hashlist);
+ grub_free (buf);
+ return err;
+ }
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ unread++;
+ continue;
+ }
+ if (grub_crypto_memcmp (expected, actual, hash->mdlen) != 0)
+ {
+ grub_printf ("%s: HASH MISMATCH\n", p);
+ if (!keep)
+ {
+ grub_file_close (hashlist);
+ grub_free (buf);
+ return grub_error (GRUB_ERR_TEST_FAILURE,
+ "hash of '%s' mismatches", p);
+ }
+ mismatch++;
+ continue;
+ }
+ grub_printf ("%s: OK\n", p);
+ }
+ if (mismatch || unread)
+ return grub_error (GRUB_ERR_TEST_FAILURE,
+ "%d files couldn't be read and hash "
+ "of %d files mismatches", unread, mismatch);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
+ int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ const char *hashname = NULL;
+ const char *prefix = NULL;
+ const gcry_md_spec_t *hash;
+ unsigned i;
+ int keep = state[3].set;
+ int uncompress = state[4].set;
+ unsigned unread = 0;
+
+ for (i = 0; i < ARRAY_SIZE (aliases); i++)
+ if (grub_strcmp (ctxt->extcmd->cmd->name, aliases[i].name) == 0)
+ hashname = aliases[i].hashname;
+ if (state[0].set)
+ hashname = state[0].arg;
+
+ if (!hashname)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no hash specified");
+
+ hash = grub_crypto_lookup_md_by_name (hashname);
+ if (!hash)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown hash");
+
+ if (state[2].set)
+ prefix = state[2].arg;
+
+ if (state[1].set)
+ {
+ if (argc != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "--check is incompatible with file list");
+ return check_list (hash, state[1].arg, prefix, keep, uncompress);
+ }
+
+ for (i = 0; i < (unsigned) argc; i++)
+ {
+ grub_uint8_t result[hash->mdlen];
+ grub_file_t file;
+ grub_err_t err;
+ unsigned j;
+ if (!uncompress)
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (args[i]);
+ if (!file)
+ {
+ if (!keep)
+ return grub_errno;
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ unread++;
+ continue;
+ }
+ err = hash_file (file, hash, result);
+ grub_file_close (file);
+ if (err)
+ {
+ if (!keep)
+ return err;
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ unread++;
+ continue;
+ }
+ for (j = 0; j < hash->mdlen; j++)
+ grub_printf ("%02x", result[j]);
+ grub_printf (" %s\n", args[i]);
+ }
+
+ if (unread)
+ return grub_error (GRUB_ERR_TEST_FAILURE, "%d files couldn't be read.",
+ unread);
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd, cmd_md5, cmd_sha1, cmd_sha256, cmd_sha512, cmd_crc;
+
+GRUB_MOD_INIT(hashsum)
+{
+ cmd = grub_register_extcmd ("hashsum", grub_cmd_hashsum, 0,
+ "hashsum -h HASH [-c FILE [-p PREFIX]] "
+ "[FILE1 [FILE2 ...]]",
+ N_("Compute or check hash checksum."),
+ options);
+ cmd_md5 = grub_register_extcmd ("md5sum", grub_cmd_hashsum, 0,
+ N_("[-c FILE [-p PREFIX]] "
+ "[FILE1 [FILE2 ...]]"),
+ N_("Compute or check hash checksum."),
+ options);
+ cmd_sha1 = grub_register_extcmd ("sha1sum", grub_cmd_hashsum, 0,
+ N_("[-c FILE [-p PREFIX]] "
+ "[FILE1 [FILE2 ...]]"),
+ N_("Compute or check hash checksum."),
+ options);
+ cmd_sha256 = grub_register_extcmd ("sha256sum", grub_cmd_hashsum, 0,
+ N_("[-c FILE [-p PREFIX]] "
+ "[FILE1 [FILE2 ...]]"),
+ N_("Compute or check hash checksum."),
+ options);
+ cmd_sha512 = grub_register_extcmd ("sha512sum", grub_cmd_hashsum, 0,
+ N_("[-c FILE [-p PREFIX]] "
+ "[FILE1 [FILE2 ...]]"),
+ N_("Compute or check hash checksum."),
+ options);
+
+ cmd_crc = grub_register_extcmd ("crc", grub_cmd_hashsum, 0,
+ N_("[-c FILE [-p PREFIX]] "
+ "[FILE1 [FILE2 ...]]"),
+ N_("Compute or check hash checksum."),
+ options);
+}
+
+GRUB_MOD_FINI(hashsum)
+{
+ grub_unregister_extcmd (cmd);
+ grub_unregister_extcmd (cmd_md5);
+ grub_unregister_extcmd (cmd_sha1);
+ grub_unregister_extcmd (cmd_sha256);
+ grub_unregister_extcmd (cmd_sha512);
+ grub_unregister_extcmd (cmd_crc);
+}
diff --git a/grub-core/commands/hdparm.c b/grub-core/commands/hdparm.c
new file mode 100644
index 0000000..0c12b88
--- /dev/null
+++ b/grub-core/commands/hdparm.c
@@ -0,0 +1,422 @@
+/* hdparm.c - command to get/set ATA disk parameters. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/ata.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/lib/hexdump.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] = {
+ {"apm", 'B', 0, N_("Set Advanced Power Management\n"
+ "(1=low, ..., 254=high, 255=off)."),
+ 0, ARG_TYPE_INT},
+ {"power", 'C', 0, N_("Check power mode."), 0, ARG_TYPE_NONE},
+ {"security-freeze", 'F', 0, N_("Freeze ATA security settings until reset."),
+ 0, ARG_TYPE_NONE},
+ {"health", 'H', 0, N_("Check SMART health status."), 0, ARG_TYPE_NONE},
+ {"aam", 'M', 0, N_("Set Automatic Acoustic Management\n"
+ "(0=off, 128=quiet, ..., 254=fast)."),
+ 0, ARG_TYPE_INT},
+ {"standby-timeout", 'S', 0, N_("Set standby timeout\n"
+ "(0=off, 1=5s, 2=10s, ..., 240=20m, 241=30m, ...)."),
+ 0, ARG_TYPE_INT},
+ {"standby", 'y', 0, N_("Set drive to standby mode."), 0, ARG_TYPE_NONE},
+ {"sleep", 'Y', 0, N_("Set drive to sleep mode."), 0, ARG_TYPE_NONE},
+ {"identify", 'i', 0, N_("Print drive identity and settings."),
+ 0, ARG_TYPE_NONE},
+ {"dumpid", 'I', 0, N_("Dump contents of ATA IDENTIFY sector."),
+ 0, ARG_TYPE_NONE},
+ {"smart", -1, 0, N_("Disable/enable SMART (0/1)."), 0, ARG_TYPE_INT},
+ {"quiet", 'q', 0, N_("Do not print messages."), 0, ARG_TYPE_NONE},
+ {0, 0, 0, 0, 0, 0}
+};
+
+enum grub_ata_smart_commands
+ {
+ GRUB_ATA_FEAT_SMART_ENABLE = 0xd8,
+ GRUB_ATA_FEAT_SMART_DISABLE = 0xd9,
+ GRUB_ATA_FEAT_SMART_STATUS = 0xda,
+ };
+
+static int quiet = 0;
+
+static grub_err_t
+grub_hdparm_do_ata_cmd (grub_disk_t disk, grub_uint8_t cmd,
+ grub_uint8_t features, grub_uint8_t sectors,
+ void * buffer, int size)
+{
+ struct grub_disk_ata_pass_through_parms apt;
+ grub_memset (&apt, 0, sizeof (apt));
+
+ apt.taskfile[GRUB_ATA_REG_CMD] = cmd;
+ apt.taskfile[GRUB_ATA_REG_FEATURES] = features;
+ apt.taskfile[GRUB_ATA_REG_SECTORS] = sectors;
+ apt.buffer = buffer;
+ apt.size = size;
+
+ if (grub_disk_ata_pass_through (disk, &apt))
+ return grub_errno;
+
+ return GRUB_ERR_NONE;
+}
+
+static int
+grub_hdparm_do_check_powermode_cmd (grub_disk_t disk)
+{
+ struct grub_disk_ata_pass_through_parms apt;
+ grub_memset (&apt, 0, sizeof (apt));
+
+ apt.taskfile[GRUB_ATA_REG_CMD] = GRUB_ATA_CMD_CHECK_POWER_MODE;
+
+ if (grub_disk_ata_pass_through (disk, &apt))
+ return -1;
+
+ return apt.taskfile[GRUB_ATA_REG_SECTORS];
+}
+
+static int
+grub_hdparm_do_smart_cmd (grub_disk_t disk, grub_uint8_t features)
+{
+ struct grub_disk_ata_pass_through_parms apt;
+ grub_memset (&apt, 0, sizeof (apt));
+
+ apt.taskfile[GRUB_ATA_REG_CMD] = GRUB_ATA_CMD_SMART;
+ apt.taskfile[GRUB_ATA_REG_FEATURES] = features;
+ apt.taskfile[GRUB_ATA_REG_LBAMID] = 0x4f;
+ apt.taskfile[GRUB_ATA_REG_LBAHIGH] = 0xc2;
+
+ if (grub_disk_ata_pass_through (disk, &apt))
+ return -1;
+
+ if (features == GRUB_ATA_FEAT_SMART_STATUS)
+ {
+ if ( apt.taskfile[GRUB_ATA_REG_LBAMID] == 0x4f
+ && apt.taskfile[GRUB_ATA_REG_LBAHIGH] == 0xc2)
+ return 0; /* Good SMART status. */
+ else if ( apt.taskfile[GRUB_ATA_REG_LBAMID] == 0xf4
+ && apt.taskfile[GRUB_ATA_REG_LBAHIGH] == 0x2c)
+ return 1; /* Bad SMART status. */
+ else
+ return -1;
+ }
+ return 0;
+}
+
+static grub_err_t
+grub_hdparm_simple_cmd (const char * msg,
+ grub_disk_t disk, grub_uint8_t cmd)
+{
+ if (! quiet && msg)
+ grub_printf ("%s", msg);
+
+ grub_err_t err = grub_hdparm_do_ata_cmd (disk, cmd, 0, 0, NULL, 0);
+
+ if (! quiet && msg)
+ grub_printf ("%s\n", ! err ? "" : ": not supported");
+ return err;
+}
+
+static grub_err_t
+grub_hdparm_set_val_cmd (const char * msg, int val,
+ grub_disk_t disk, grub_uint8_t cmd,
+ grub_uint8_t features, grub_uint8_t sectors)
+{
+ if (! quiet && msg && *msg)
+ {
+ if (val >= 0)
+ grub_printf ("Set %s to %d", msg, val);
+ else
+ grub_printf ("Disable %s", msg);
+ }
+
+ grub_err_t err = grub_hdparm_do_ata_cmd (disk, cmd, features, sectors,
+ NULL, 0);
+
+ if (! quiet && msg)
+ grub_printf ("%s\n", ! err ? "" : ": not supported");
+ return err;
+}
+
+static const char *
+le16_to_char (char *dest, const grub_uint16_t * src16, unsigned bytes)
+{
+ grub_uint16_t * dest16 = (grub_uint16_t *) dest;
+ unsigned i;
+ for (i = 0; i < bytes / 2; i++)
+ dest16[i] = grub_be_to_cpu16 (src16[i]);
+ return dest;
+}
+
+static void
+grub_hdparm_print_identify (const char * idbuf)
+{
+ const grub_uint16_t * idw = (const grub_uint16_t *) idbuf;
+
+ /* Print identity strings. */
+ char tmp[40];
+ grub_printf ("Model: \"%.40s\"\n", le16_to_char (tmp, &idw[27], 40));
+ grub_printf ("Firmware: \"%.8s\"\n", le16_to_char (tmp, &idw[23], 8));
+ grub_printf ("Serial: \"%.20s\"\n", le16_to_char (tmp, &idw[10], 20));
+
+ /* Print AAM, APM and SMART settings. */
+ grub_uint16_t features1 = grub_le_to_cpu16 (idw[82]);
+ grub_uint16_t features2 = grub_le_to_cpu16 (idw[83]);
+ grub_uint16_t enabled1 = grub_le_to_cpu16 (idw[85]);
+ grub_uint16_t enabled2 = grub_le_to_cpu16 (idw[86]);
+
+ grub_printf ("Automatic Acoustic Management: ");
+ if (features2 & 0x0200)
+ {
+ if (enabled2 & 0x0200)
+ {
+ grub_uint16_t aam = grub_le_to_cpu16 (idw[94]);
+ grub_printf ("%u (128=quiet, ..., 254=fast, recommended=%u)\n",
+ aam & 0xff, (aam >> 8) & 0xff);
+ }
+ else
+ grub_printf ("disabled\n");
+ }
+ else
+ grub_printf ("not supported\n");
+
+ grub_printf ("Advanced Power Management: ");
+ if (features2 & 0x0008)
+ {
+ if (enabled2 & 0x0008)
+ grub_printf ("%u (1=low, ..., 254=high)\n",
+ grub_le_to_cpu16 (idw[91]) & 0xff);
+ else
+ grub_printf ("disabled\n");
+ }
+ else
+ grub_printf ("not supported\n");
+
+ grub_printf ("SMART Feature Set: ");
+ if (features1 & 0x0001)
+ grub_printf ("%sabled\n", (enabled1 & 0x0001 ? "en" : "dis"));
+ else
+ grub_printf ("not supported\n");
+
+ /* Print security settings. */
+ grub_uint16_t security = grub_le_to_cpu16 (idw[128]);
+
+ grub_printf ("ATA Security: ");
+ if (security & 0x0001)
+ grub_printf ("%s, %s, %s, %s\n",
+ (security & 0x0002 ? "ENABLED" : "disabled"),
+ (security & 0x0004 ? "**LOCKED**" : "not locked"),
+ (security & 0x0008 ? "frozen" : "NOT FROZEN"),
+ (security & 0x0010 ? "COUNT EXPIRED" : "count not expired"));
+ else
+ grub_printf ("not supported\n");
+}
+
+static void
+grub_hdparm_print_standby_tout (int timeout)
+{
+ if (timeout == 0)
+ grub_printf ("off");
+ else if (timeout <= 252 || timeout == 255)
+ {
+ int h = 0, m = 0 , s = 0;
+ if (timeout == 255)
+ {
+ m = 21;
+ s = 15;
+ }
+ else if (timeout == 252)
+ m = 21;
+ else if (timeout <= 240)
+ {
+ s = timeout * 5;
+ m = s / 60;
+ s %= 60;
+ }
+ else
+ {
+ m = (timeout - 240) * 30;
+ h = m / 60;
+ m %= 60;
+ }
+ grub_printf ("%02d:%02d:%02d", h, m, s);
+ }
+ else
+ grub_printf ("invalid or vendor-specific");
+}
+
+static int get_int_arg (const struct grub_arg_list *state)
+{
+ return (state->set ? (int)grub_strtoul (state->arg, 0, 0) : -1);
+}
+
+static grub_err_t
+grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args) // state????
+{
+ struct grub_arg_list *state = ctxt->state;
+
+ /* Check command line. */
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "missing device name argument");
+
+ grub_size_t len = grub_strlen (args[0]);
+ if (! (args[0][0] == '(' && args[0][len - 1] == ')'))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "argument is not a device name");
+ args[0][len - 1] = 0;
+
+ if (! grub_disk_ata_pass_through)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "ATA pass through not available");
+
+ int i = 0;
+ int apm = get_int_arg (&state[i++]);
+ int power = state[i++].set;
+ int sec_freeze = state[i++].set;
+ int health = state[i++].set;
+ int aam = get_int_arg (&state[i++]);
+ int standby_tout = get_int_arg (&state[i++]);
+ int standby_now = state[i++].set;
+ int sleep_now = state[i++].set;
+ int ident = state[i++].set;
+ int dumpid = state[i++].set;
+ int enable_smart = get_int_arg (&state[i++]);
+ quiet = state[i++].set;
+
+ /* Open disk. */
+ grub_disk_t disk = grub_disk_open (&args[0][1]);
+ if (! disk)
+ return grub_errno;
+
+ if (disk->partition)
+ {
+ grub_disk_close (disk);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "partition not allowed");
+ }
+
+ /* Change settings. */
+ if (aam >= 0)
+ grub_hdparm_set_val_cmd ("Automatic Acoustic Management", (aam ? aam : -1),
+ disk, GRUB_ATA_CMD_SET_FEATURES, (aam ? 0x42 : 0xc2), aam);
+
+ if (apm >= 0)
+ grub_hdparm_set_val_cmd ("Advanced Power Management",
+ (apm != 255 ? apm : -1), disk, GRUB_ATA_CMD_SET_FEATURES,
+ (apm != 255 ? 0x05 : 0x85), (apm != 255 ? apm : 0));
+
+ if (standby_tout >= 0)
+ {
+ if (! quiet)
+ {
+ grub_printf ("Set standby timeout to %d (", standby_tout);
+ grub_hdparm_print_standby_tout (standby_tout);
+ grub_printf (")");
+ }
+ /* The IDLE cmd sets disk to idle mode and configures standby timer. */
+ grub_hdparm_set_val_cmd ("", -1, disk, GRUB_ATA_CMD_IDLE, 0, standby_tout);
+ }
+
+ if (enable_smart >= 0)
+ {
+ if (! quiet)
+ grub_printf ("%sable SMART operations", (enable_smart ? "En" : "Dis"));
+ int err = grub_hdparm_do_smart_cmd (disk, (enable_smart ?
+ GRUB_ATA_FEAT_SMART_ENABLE : GRUB_ATA_FEAT_SMART_DISABLE));
+ if (! quiet)
+ grub_printf ("%s\n", err ? ": not supported" : "");
+ }
+
+ if (sec_freeze)
+ grub_hdparm_simple_cmd ("Freeze security settings", disk,
+ GRUB_ATA_CMD_SECURITY_FREEZE_LOCK);
+
+ /* Print/dump IDENTIFY. */
+ if (ident || dumpid)
+ {
+ char buf[GRUB_DISK_SECTOR_SIZE];
+ if (grub_hdparm_do_ata_cmd (disk, GRUB_ATA_CMD_IDENTIFY_DEVICE,
+ 0, 0, buf, sizeof (buf)))
+ grub_printf ("Cannot read ATA IDENTIFY data\n");
+ else
+ {
+ if (ident)
+ grub_hdparm_print_identify (buf);
+ if (dumpid)
+ hexdump (0, buf, sizeof (buf));
+ }
+ }
+
+ /* Check power mode. */
+ if (power)
+ {
+ grub_printf ("Disk power mode is: ");
+ int mode = grub_hdparm_do_check_powermode_cmd (disk);
+ if (mode < 0)
+ grub_printf ("unknown\n");
+ else
+ grub_printf ("%s (0x%02x)\n",
+ (mode == 0xff ? "active/idle" :
+ mode == 0x80 ? "idle" :
+ mode == 0x00 ? "standby" : "unknown"), mode);
+ }
+
+ /* Check health. */
+ int status = 0;
+ if (health)
+ {
+ if (! quiet)
+ grub_printf ("SMART status is: ");
+ int err = grub_hdparm_do_smart_cmd (disk, GRUB_ATA_FEAT_SMART_STATUS);
+ if (! quiet)
+ grub_printf ("%s\n", (err < 0 ? "unknown" :
+ err == 0 ? "OK" : "*BAD*"));
+ status = (err > 0);
+ }
+
+ /* Change power mode. */
+ if (standby_now)
+ grub_hdparm_simple_cmd ("Set disk to standby mode", disk,
+ GRUB_ATA_CMD_STANDBY_IMMEDIATE);
+
+ if (sleep_now)
+ grub_hdparm_simple_cmd ("Set disk to sleep mode", disk,
+ GRUB_ATA_CMD_SLEEP);
+
+ grub_disk_close (disk);
+
+ grub_errno = GRUB_ERR_NONE;
+ return status;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(hdparm)
+{
+ cmd = grub_register_extcmd ("hdparm", grub_cmd_hdparm, 0,
+ N_("[OPTIONS] DISK"),
+ N_("Get/set ATA disk parameters."), options);
+}
+
+GRUB_MOD_FINI(hdparm)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/help.c b/grub-core/commands/help.c
new file mode 100644
index 0000000..82f3200
--- /dev/null
+++ b/grub-core/commands/help.c
@@ -0,0 +1,143 @@
+/* help.c - command to show a help text. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/mm.h>
+#include <grub/normal.h>
+#include <grub/charset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
+ char **args)
+{
+ int cnt = 0;
+ char *currarg;
+
+ if (argc == 0)
+ {
+ grub_command_t cmd;
+ FOR_COMMANDS(cmd)
+ {
+ if ((cmd->prio & GRUB_PRIO_LIST_FLAG_ACTIVE))
+ {
+ struct grub_term_output *term;
+ const char *summary_translated = _(cmd->summary);
+ char *command_help;
+ grub_uint32_t *unicode_command_help;
+ grub_uint32_t *unicode_last_position;
+
+ command_help = grub_xasprintf ("%s %s", cmd->name, summary_translated);
+ if (!command_help)
+ break;
+
+ grub_utf8_to_ucs4_alloc (command_help, &unicode_command_help,
+ &unicode_last_position);
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ unsigned stringwidth;
+ grub_uint32_t *unicode_last_screen_position;
+
+ unicode_last_screen_position = unicode_command_help;
+
+ stringwidth = 0;
+
+ while (unicode_last_screen_position < unicode_last_position &&
+ stringwidth < ((grub_term_width (term) / 2) - 2))
+ {
+ struct grub_unicode_glyph glyph;
+ unicode_last_screen_position
+ += grub_unicode_aglomerate_comb (unicode_last_screen_position,
+ unicode_last_position
+ - unicode_last_screen_position,
+ &glyph);
+
+ stringwidth
+ += grub_term_getcharwidth (term, &glyph);
+ }
+
+ grub_print_ucs4 (unicode_command_help,
+ unicode_last_screen_position, 0, 0, term);
+ if (!(cnt % 2))
+ grub_print_spaces (term, grub_term_width (term) / 2
+ - stringwidth);
+ }
+
+ if (cnt % 2)
+ grub_printf ("\n");
+ cnt++;
+
+ grub_free (command_help);
+ grub_free (unicode_command_help);
+ }
+ }
+ if (!(cnt % 2))
+ grub_printf ("\n");
+ }
+ else
+ {
+ int i;
+ grub_command_t cmd;
+
+ for (i = 0; i < argc; i++)
+ {
+ currarg = args[i];
+ FOR_COMMANDS(cmd)
+ {
+ if (cmd->prio & GRUB_PRIO_LIST_FLAG_ACTIVE)
+ {
+ if (! grub_strncmp (cmd->name, currarg, grub_strlen (currarg)))
+ {
+ if (cnt++ > 0)
+ grub_printf ("\n\n");
+
+ if ((cmd->flags & GRUB_COMMAND_FLAG_EXTCMD) &&
+ ! (cmd->flags & GRUB_COMMAND_FLAG_DYNCMD))
+ grub_arg_show_help ((grub_extcmd_t) cmd->data);
+ else
+ grub_printf ("%s %s %s\n%s\n", _("Usage:"), cmd->name, _(cmd->summary),
+ _(cmd->description));
+ }
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(help)
+{
+ cmd = grub_register_extcmd ("help", grub_cmd_help, 0,
+ N_("[PATTERN ...]"),
+ N_("Show a help message."), 0);
+}
+
+GRUB_MOD_FINI(help)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/hexdump.c b/grub-core/commands/hexdump.c
new file mode 100644
index 0000000..9ba8359
--- /dev/null
+++ b/grub-core/commands/hexdump.c
@@ -0,0 +1,133 @@
+/* hexdump.c - command to dump the contents of a file or memory */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/lib/hexdump.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] = {
+ {"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0,
+ ARG_TYPE_INT},
+ {"length", 'n', 0, N_("Read only LENGTH bytes."), 0, ARG_TYPE_INT},
+ {0, 0, 0, 0, 0, 0}
+};
+
+static grub_err_t
+grub_cmd_hexdump (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ char buf[GRUB_DISK_SECTOR_SIZE * 4];
+ grub_ssize_t size, length;
+ grub_disk_addr_t skip;
+ int namelen;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ namelen = grub_strlen (args[0]);
+ skip = (state[0].set) ? grub_strtoull (state[0].arg, 0, 0) : 0;
+ length = (state[1].set) ? grub_strtoul (state[1].arg, 0, 0) : 256;
+
+ if (!grub_strcmp (args[0], "(mem)"))
+ hexdump (skip, (char *) (grub_addr_t) skip, length);
+ else if ((args[0][0] == '(') && (args[0][namelen - 1] == ')'))
+ {
+ grub_disk_t disk;
+ grub_disk_addr_t sector;
+ grub_size_t ofs;
+
+ args[0][namelen - 1] = 0;
+ disk = grub_disk_open (&args[0][1]);
+ if (! disk)
+ return 0;
+
+ sector = (skip >> (GRUB_DISK_SECTOR_BITS + 2)) * 4;
+ ofs = skip & (GRUB_DISK_SECTOR_SIZE * 4 - 1);
+ while (length)
+ {
+ grub_size_t len;
+
+ len = length;
+ if (len > sizeof (buf))
+ len = sizeof (buf);
+
+ if (grub_disk_read (disk, sector, ofs, len, buf))
+ break;
+
+ hexdump (skip, buf, len);
+
+ ofs = 0;
+ skip += len;
+ length -= len;
+ sector += 4;
+ }
+
+ grub_disk_close (disk);
+ }
+ else
+ {
+ grub_file_t file;
+
+ file = grub_file_open (args[0]);
+ if (! file)
+ return 0;
+
+ file->offset = skip;
+
+ while ((size = grub_file_read (file, buf, sizeof (buf))) > 0)
+ {
+ unsigned long len;
+
+ len = ((length) && (size > length)) ? length : size;
+ hexdump (skip, buf, len);
+ skip += len;
+ if (length)
+ {
+ length -= len;
+ if (!length)
+ break;
+ }
+ }
+
+ grub_file_close (file);
+ }
+
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT (hexdump)
+{
+ cmd = grub_register_extcmd ("hexdump", grub_cmd_hexdump, 0,
+ N_("[OPTIONS] FILE_OR_DEVICE"),
+ N_("Dump the contents of a file or memory."),
+ options);
+}
+
+GRUB_MOD_FINI (hexdump)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/i386/cmostest.c b/grub-core/commands/i386/cmostest.c
new file mode 100644
index 0000000..c79bd03
--- /dev/null
+++ b/grub-core/commands/i386/cmostest.c
@@ -0,0 +1,92 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/misc.h>
+#include <grub/cmos.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+parse_args (int argc, char *argv[], int *byte, int *bit)
+{
+ char *rest;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Address required.");
+
+ *byte = grub_strtoul (argv[0], &rest, 0);
+ if (*rest != ':')
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Address required.");
+
+ *bit = grub_strtoul (rest + 1, 0, 0);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_cmostest (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ int byte, bit;
+ grub_err_t err;
+
+ err = parse_args (argc, argv, &byte, &bit);
+ if (err)
+ return err;
+
+ if (grub_cmos_read (byte) & (1 << bit))
+ return GRUB_ERR_NONE;
+
+ return grub_error (GRUB_ERR_TEST_FAILURE, "false");
+}
+
+static grub_err_t
+grub_cmd_cmosclean (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ int byte, bit;
+ grub_err_t err;
+
+ err = parse_args (argc, argv, &byte, &bit);
+ if (err)
+ return err;
+
+ grub_cmos_write (byte, grub_cmos_read (byte) & (~(1 << bit)));
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd, cmd_clean;
+
+
+GRUB_MOD_INIT(cmostest)
+{
+ cmd = grub_register_command ("cmostest", grub_cmd_cmostest,
+ "cmostest BYTE:BIT",
+ "Test bit at BYTE:BIT in CMOS.");
+ cmd_clean = grub_register_command ("cmosclean", grub_cmd_cmosclean,
+ "cmosclean BYTE:BIT",
+ "Clean bit at BYTE:BIT in CMOS.");
+}
+
+GRUB_MOD_FINI(cmostest)
+{
+ grub_unregister_command (cmd);
+ grub_unregister_command (cmd_clean);
+}
diff --git a/grub-core/commands/i386/cpuid.c b/grub-core/commands/i386/cpuid.c
new file mode 100644
index 0000000..6a771ba
--- /dev/null
+++ b/grub-core/commands/i386/cpuid.c
@@ -0,0 +1,100 @@
+/* cpuid.c - test for CPU features */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+ * Based on gcc/gcc/config/i386/driver-i386.c
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/command.h>
+#include <grub/extcmd.h>
+#include <grub/i386/cpuid.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define cpuid(num,a,b,c,d) \
+ asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
+ : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \
+ : "0" (num))
+
+static const struct grub_arg_option options[] =
+ {
+ {"long-mode", 'l', 0, N_("Check for long mode flag (default)."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+#define bit_LM (1 << 29)
+
+unsigned char grub_cpuid_has_longmode = 0;
+
+static grub_err_t
+grub_cmd_cpuid (grub_extcmd_context_t ctxt __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ return grub_cpuid_has_longmode ? GRUB_ERR_NONE
+ : grub_error (GRUB_ERR_TEST_FAILURE, "false");
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(cpuid)
+{
+#ifdef __x86_64__
+ /* grub-emu */
+ grub_cpuid_has_longmode = 1;
+#else
+ unsigned int eax, ebx, ecx, edx;
+ unsigned int max_level;
+ unsigned int ext_level;
+
+ /* See if we can use cpuid. */
+ asm volatile ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
+ "pushl %0; popfl; pushfl; popl %0; popfl"
+ : "=&r" (eax), "=&r" (ebx)
+ : "i" (0x00200000));
+ if (((eax ^ ebx) & 0x00200000) == 0)
+ goto done;
+
+ /* Check the highest input value for eax. */
+ cpuid (0, eax, ebx, ecx, edx);
+ /* We only look at the first four characters. */
+ max_level = eax;
+ if (max_level == 0)
+ goto done;
+
+ cpuid (0x80000000, eax, ebx, ecx, edx);
+ ext_level = eax;
+ if (ext_level < 0x80000000)
+ goto done;
+
+ cpuid (0x80000001, eax, ebx, ecx, edx);
+ grub_cpuid_has_longmode = !!(edx & bit_LM);
+done:
+#endif
+
+ cmd = grub_register_extcmd ("cpuid", grub_cmd_cpuid, 0,
+ "[-l]", N_("Check for CPU features."), options);
+}
+
+GRUB_MOD_FINI(cpuid)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/i386/pc/acpi.c b/grub-core/commands/i386/pc/acpi.c
new file mode 100644
index 0000000..88e4f55
--- /dev/null
+++ b/grub-core/commands/i386/pc/acpi.c
@@ -0,0 +1,81 @@
+/* acpi.c - get acpi tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/acpi.h>
+#include <grub/misc.h>
+
+struct grub_acpi_rsdp_v10 *
+grub_machine_acpi_get_rsdpv1 (void)
+{
+ int ebda_len;
+ grub_uint8_t *ebda, *ptr;
+
+ grub_dprintf ("acpi", "Looking for RSDP. Scanning EBDA\n");
+ ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) 0x40e)) << 4);
+ ebda_len = * (grub_uint16_t *) ebda;
+ if (! ebda_len)
+ return 0;
+ for (ptr = ebda; ptr < ebda + 0x400; ptr += 16)
+ if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
+ && grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
+ && ((struct grub_acpi_rsdp_v10 *) ptr)->revision == 0)
+ return (struct grub_acpi_rsdp_v10 *) ptr;
+
+ grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");
+ for (ptr = (grub_uint8_t *) 0xe0000; ptr < (grub_uint8_t *) 0x100000;
+ ptr += 16)
+ if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
+ && grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
+ && ((struct grub_acpi_rsdp_v10 *) ptr)->revision == 0)
+ return (struct grub_acpi_rsdp_v10 *) ptr;
+ return 0;
+}
+
+struct grub_acpi_rsdp_v20 *
+grub_machine_acpi_get_rsdpv2 (void)
+{
+ int ebda_len;
+ grub_uint8_t *ebda, *ptr;
+
+ grub_dprintf ("acpi", "Looking for RSDP. Scanning EBDA\n");
+ ebda = (grub_uint8_t *) ((* ((grub_uint16_t *) 0x40e)) << 4);
+ ebda_len = * (grub_uint16_t *) ebda;
+ if (! ebda_len)
+ return 0;
+ for (ptr = ebda; ptr < ebda + 0x400; ptr += 16)
+ if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
+ && grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
+ && ((struct grub_acpi_rsdp_v10 *) ptr)->revision != 0
+ && ((struct grub_acpi_rsdp_v20 *) ptr)->length < 1024
+ && grub_byte_checksum (ptr, ((struct grub_acpi_rsdp_v20 *) ptr)->length)
+ == 0)
+ return (struct grub_acpi_rsdp_v20 *) ptr;
+
+ grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");
+ for (ptr = (grub_uint8_t *) 0xe0000; ptr < (grub_uint8_t *) 0x100000;
+ ptr += 16)
+ if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
+ && grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
+ && ((struct grub_acpi_rsdp_v10 *) ptr)->revision != 0
+ && ((struct grub_acpi_rsdp_v20 *) ptr)->length < 1024
+ && grub_byte_checksum (ptr, ((struct grub_acpi_rsdp_v20 *) ptr)->length)
+ == 0)
+ return (struct grub_acpi_rsdp_v20 *) ptr;
+ return 0;
+}
diff --git a/grub-core/commands/i386/pc/drivemap.c b/grub-core/commands/i386/pc/drivemap.c
new file mode 100644
index 0000000..c9c8881
--- /dev/null
+++ b/grub-core/commands/i386/pc/drivemap.c
@@ -0,0 +1,422 @@
+/* drivemap.c - command to manage the BIOS drive mappings. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/extcmd.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/loader.h>
+#include <grub/env.h>
+#include <grub/machine/biosnum.h>
+#include <grub/i18n.h>
+#include <grub/memory.h>
+#include <grub/machine/memory.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */
+static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13);
+
+/* Remember to update enum opt_idxs accordingly. */
+static const struct grub_arg_option options[] = {
+ {"list", 'l', 0, N_("Show the current mappings."), 0, 0},
+ {"reset", 'r', 0, N_("Reset all mappings to the default values."), 0, 0},
+ {"swap", 's', 0, N_("Perform both direct and reverse mappings."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+};
+
+/* Remember to update options[] accordingly. */
+enum opt_idxs
+{
+ OPTIDX_LIST = 0,
+ OPTIDX_RESET,
+ OPTIDX_SWAP,
+};
+
+/* Realmode far ptr (2 * 16b) to the previous INT13h handler. */
+extern grub_uint32_t grub_drivemap_oldhandler;
+
+/* The type "void" is used for imported assembly labels, takes no storage and
+ serves just to take the address with &label. */
+
+/* The assembly function to replace the old INT13h handler. It does not follow
+ any C callspecs and returns with IRET. */
+extern const void grub_drivemap_handler;
+
+/* Start of the drive mappings area (space reserved at runtime). */
+extern const void grub_drivemap_mapstart;
+
+typedef struct drivemap_node
+{
+ struct drivemap_node *next;
+ grub_uint8_t newdrive;
+ grub_uint8_t redirto;
+} drivemap_node_t;
+
+typedef struct __attribute__ ((packed)) int13map_node
+{
+ grub_uint8_t disknum;
+ grub_uint8_t mapto;
+} int13map_node_t;
+
+#define INT13H_OFFSET(x) \
+ (((grub_uint8_t *)(x)) - ((grub_uint8_t *)&grub_drivemap_handler))
+
+static drivemap_node_t *map_head;
+static void *drivemap_hook;
+static int drivemap_mmap;
+
+/* Puts the specified mapping into the table, replacing an existing mapping
+ for newdrive or adding a new one if required. */
+static grub_err_t
+drivemap_set (grub_uint8_t newdrive, grub_uint8_t redirto)
+{
+ drivemap_node_t *mapping = 0;
+ drivemap_node_t *search = map_head;
+ while (search)
+ {
+ if (search->newdrive == newdrive)
+ {
+ mapping = search;
+ break;
+ }
+ search = search->next;
+ }
+
+ /* Check for pre-existing mappings to modify before creating a new one. */
+ if (mapping)
+ mapping->redirto = redirto;
+ else
+ {
+ mapping = grub_malloc (sizeof (drivemap_node_t));
+ if (! mapping)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "cannot allocate map entry, not enough memory");
+ mapping->newdrive = newdrive;
+ mapping->redirto = redirto;
+ mapping->next = map_head;
+ map_head = mapping;
+ }
+ return GRUB_ERR_NONE;
+}
+
+/* Removes the mapping for newdrive from the table. If there is no mapping,
+ then this function behaves like a no-op on the map. */
+static void
+drivemap_remove (grub_uint8_t newdrive)
+{
+ drivemap_node_t *mapping = 0;
+ drivemap_node_t *search = map_head;
+ drivemap_node_t *previous = 0;
+
+ while (search)
+ {
+ if (search->newdrive == newdrive)
+ {
+ mapping = search;
+ break;
+ }
+ previous = search;
+ search = search->next;
+ }
+
+ if (mapping)
+ {
+ if (previous)
+ previous->next = mapping->next;
+ else
+ map_head = mapping->next;
+ grub_free (mapping);
+ }
+}
+
+/* Given a GRUB-like device name and a convenient location, stores the
+ related BIOS disk number. Accepts devices like \((f|h)dN\), with
+ 0 <= N < 128. */
+static grub_err_t
+tryparse_diskstring (const char *str, grub_uint8_t *output)
+{
+ /* Skip opening paren in order to allow both (hd0) and hd0. */
+ if (*str == '(')
+ str++;
+ if ((str[0] == 'f' || str[0] == 'h') && str[1] == 'd')
+ {
+ grub_uint8_t bios_num = (str[0] == 'h') ? 0x80 : 0x00;
+ unsigned long drivenum = grub_strtoul (str + 2, 0, 0);
+ if (grub_errno == GRUB_ERR_NONE && drivenum < 128)
+ {
+ bios_num |= drivenum;
+ if (output)
+ *output = bios_num;
+ return GRUB_ERR_NONE;
+ }
+ }
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "device format \"%s\" "
+ "invalid: must be (f|h)dN, with 0 <= N < 128", str);
+}
+
+static grub_err_t
+list_mappings (void)
+{
+ /* Show: list mappings. */
+ if (! map_head)
+ {
+ grub_printf ("No drives have been remapped\n");
+ return GRUB_ERR_NONE;
+ }
+
+ grub_printf ("OS disk #num ------> GRUB/BIOS device\n");
+ drivemap_node_t *curnode = map_head;
+ while (curnode)
+ {
+ grub_printf ("%cD #%-3u (0x%02x) %cd%d\n",
+ (curnode->newdrive & 0x80) ? 'H' : 'F',
+ curnode->newdrive & 0x7F, curnode->newdrive,
+ (curnode->redirto & 0x80) ? 'h' : 'f',
+ curnode->redirto & 0x7F
+ );
+ curnode = curnode->next;
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_drivemap (struct grub_extcmd_context *ctxt, int argc, char **args)
+{
+ if (ctxt->state[OPTIDX_LIST].set)
+ {
+ return list_mappings ();
+ }
+ else if (ctxt->state[OPTIDX_RESET].set)
+ {
+ /* Reset: just delete all mappings, freeing their memory. */
+ drivemap_node_t *curnode = map_head;
+ drivemap_node_t *prevnode = 0;
+ while (curnode)
+ {
+ prevnode = curnode;
+ curnode = curnode->next;
+ grub_free (prevnode);
+ }
+ map_head = 0;
+ return GRUB_ERR_NONE;
+ }
+ else if (!ctxt->state[OPTIDX_SWAP].set && argc == 0)
+ {
+ /* No arguments */
+ return list_mappings ();
+ }
+
+ /* Neither flag: put mapping. */
+ grub_uint8_t mapfrom = 0;
+ grub_uint8_t mapto = 0xFF;
+ grub_err_t err;
+
+ if (argc != 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments required");
+
+ err = tryparse_diskstring (args[0], &mapfrom);
+ if (err != GRUB_ERR_NONE)
+ return err;
+
+ err = tryparse_diskstring (args[1], &mapto);
+ if (err != GRUB_ERR_NONE)
+ return err;
+
+ if (mapto == mapfrom)
+ {
+ /* Reset to default. */
+ grub_dprintf ("drivemap", "Removing mapping for %s (%02x)\n",
+ args[0], mapfrom);
+ drivemap_remove (mapfrom);
+ return GRUB_ERR_NONE;
+ }
+ /* Set the mapping for the disk (overwrites any existing mapping). */
+ grub_dprintf ("drivemap", "%s %s (%02x) = %s (%02x)\n",
+ ctxt->state[OPTIDX_SWAP].set ? "Swapping" : "Mapping",
+ args[1], mapto, args[0], mapfrom);
+ err = drivemap_set (mapto, mapfrom);
+ /* If -s, perform the reverse mapping too (only if the first was OK). */
+ if (ctxt->state[OPTIDX_SWAP].set && err == GRUB_ERR_NONE)
+ err = drivemap_set (mapfrom, mapto);
+ return err;
+}
+
+/* Int13h handler installer - reserves conventional memory for the handler,
+ copies it over and sets the IVT entry for int13h.
+ This code rests on the assumption that GRUB does not activate any kind
+ of memory mapping apart from identity paging, since it accesses
+ realmode structures by their absolute addresses, like the IVT at 0;
+ and transforms a pmode pointer into a rmode seg:off far ptr. */
+static grub_err_t
+install_int13_handler (int noret __attribute__ ((unused)))
+{
+ /* Size of the full int13 handler "bundle", including code and map. */
+ grub_uint32_t total_size;
+ /* Base address of the space reserved for the handler bundle. */
+ grub_uint8_t *handler_base = 0;
+ /* Address of the map within the deployed bundle. */
+ int13map_node_t *handler_map;
+
+ int i;
+ int entries = 0;
+ drivemap_node_t *curentry = map_head;
+
+ /* Count entries to prepare a contiguous map block. */
+ while (curentry)
+ {
+ entries++;
+ curentry = curentry->next;
+ }
+ if (entries == 0)
+ {
+ /* No need to install the int13h handler. */
+ grub_dprintf ("drivemap", "No drives marked as remapped, not installing "
+ "our int13h handler.\n");
+ return GRUB_ERR_NONE;
+ }
+
+ grub_dprintf ("drivemap", "Installing our int13h handler\n");
+
+ /* Save the pointer to the old handler. */
+ grub_drivemap_oldhandler = *int13slot;
+ grub_dprintf ("drivemap", "Original int13 handler: %04x:%04x\n",
+ (grub_drivemap_oldhandler >> 16) & 0x0ffff,
+ grub_drivemap_oldhandler & 0x0ffff);
+
+ /* Find a rmode-segment-aligned zone in conventional memory big
+ enough to hold the handler and its data. */
+ total_size = INT13H_OFFSET (&grub_drivemap_mapstart)
+ + (entries + 1) * sizeof (int13map_node_t);
+ grub_dprintf ("drivemap", "Payload is %u bytes long\n", total_size);
+ handler_base = grub_mmap_malign_and_register (16, total_size,
+ &drivemap_mmap,
+ GRUB_MEMORY_RESERVED,
+ GRUB_MMAP_MALLOC_LOW);
+ if (! handler_base)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't reserve "
+ "memory for the int13h handler");
+
+ /* Copy int13h handler bundle to reserved area. */
+ grub_dprintf ("drivemap", "Reserved memory at %p, copying handler\n",
+ handler_base);
+ grub_memcpy (handler_base, &grub_drivemap_handler,
+ INT13H_OFFSET (&grub_drivemap_mapstart));
+
+ /* Copy the mappings to the reserved area. */
+ curentry = map_head;
+ handler_map = (int13map_node_t *) (handler_base +
+ INT13H_OFFSET (&grub_drivemap_mapstart));
+ grub_dprintf ("drivemap", "Target map at %p, copying mappings\n", handler_map);
+ for (i = 0; i < entries; ++i, curentry = curentry->next)
+ {
+ handler_map[i].disknum = curentry->newdrive;
+ handler_map[i].mapto = curentry->redirto;
+ grub_dprintf ("drivemap", "\t#%d: 0x%02x <- 0x%02x\n", i,
+ handler_map[i].disknum, handler_map[i].mapto);
+ }
+ /* Signal end-of-map. */
+ handler_map[i].disknum = 0;
+ handler_map[i].mapto = 0;
+ grub_dprintf ("drivemap", "\t#%d: 0x00 <- 0x00 (end)\n", i);
+
+ /* Install our function as the int13h handler in the IVT. */
+ *int13slot = ((grub_uint32_t) handler_base) << 12; /* Segment address. */
+ grub_dprintf ("drivemap", "New int13 handler: %04x:%04x\n",
+ (*int13slot >> 16) & 0x0ffff, *int13slot & 0x0ffff);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+uninstall_int13_handler (void)
+{
+ if (! grub_drivemap_oldhandler)
+ return GRUB_ERR_NONE;
+
+ *int13slot = grub_drivemap_oldhandler;
+ grub_mmap_free_and_unregister (drivemap_mmap);
+ grub_drivemap_oldhandler = 0;
+ grub_dprintf ("drivemap", "Restored int13 handler: %04x:%04x\n",
+ (*int13slot >> 16) & 0x0ffff, *int13slot & 0x0ffff);
+
+ return GRUB_ERR_NONE;
+}
+
+static int
+grub_get_root_biosnumber_drivemap (void)
+{
+ char *biosnum;
+ int ret = -1;
+ grub_device_t dev;
+
+ biosnum = grub_env_get ("biosnum");
+
+ if (biosnum)
+ return grub_strtoul (biosnum, 0, 0);
+
+ dev = grub_device_open (0);
+ if (dev && dev->disk && dev->disk->dev
+ && dev->disk->dev->id == GRUB_DISK_DEVICE_BIOSDISK_ID)
+ {
+ drivemap_node_t *curnode = map_head;
+ ret = (int) dev->disk->id;
+ while (curnode)
+ {
+ if (curnode->redirto == ret)
+ {
+ ret = curnode->newdrive;
+ break;
+ }
+ curnode = curnode->next;
+ }
+
+ }
+
+ if (dev)
+ grub_device_close (dev);
+
+ return ret;
+}
+
+static grub_extcmd_t cmd;
+static int (*grub_get_root_biosnumber_saved) (void);
+
+GRUB_MOD_INIT (drivemap)
+{
+ grub_get_root_biosnumber_saved = grub_get_root_biosnumber;
+ grub_get_root_biosnumber = grub_get_root_biosnumber_drivemap;
+ cmd = grub_register_extcmd ("drivemap", grub_cmd_drivemap, 0,
+ N_("-l | -r | [-s] grubdev osdisk."),
+ N_("Manage the BIOS drive mappings."),
+ options);
+ drivemap_hook =
+ grub_loader_register_preboot_hook (&install_int13_handler,
+ &uninstall_int13_handler,
+ GRUB_LOADER_PREBOOT_HOOK_PRIO_NORMAL);
+}
+
+GRUB_MOD_FINI (drivemap)
+{
+ grub_get_root_biosnumber = grub_get_root_biosnumber_saved;
+ grub_loader_unregister_preboot_hook (drivemap_hook);
+ drivemap_hook = 0;
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/i386/pc/drivemap_int13h.S b/grub-core/commands/i386/pc/drivemap_int13h.S
new file mode 100644
index 0000000..b460cd7
--- /dev/null
+++ b/grub-core/commands/i386/pc/drivemap_int13h.S
@@ -0,0 +1,110 @@
+/* drivemap_int13h.S - interrupt handler for the BIOS drive remapper */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+
+#define INT13H_OFFSET(x) ((x) - LOCAL (base))
+
+.code16
+
+/* Copy starts here. When deployed, this code must be segment-aligned. */
+
+/* The replacement int13 handler. Preserve all registers. */
+FUNCTION(grub_drivemap_handler)
+LOCAL (base):
+ /* Save %dx for future restore. */
+ push %dx
+ /* Push flags. Used to simulate interrupt with original flags. */
+ pushf
+
+ /* Map the drive number (always in DL). */
+ push %ax
+ push %bx
+ movw $INT13H_OFFSET(LOCAL (mapstart)), %bx
+
+more_remaining:
+ movw %cs:(%bx), %ax
+ cmpb %ah, %al
+ jz not_found /* DRV=DST => map end - drive not remapped, keep DL. */
+ inc %bx
+ inc %bx
+ cmpb %dl, %al
+ jnz more_remaining /* Not found, but more remaining, loop. */
+ movb %ah, %dl /* Found - drive remapped, modify DL. */
+
+not_found:
+ pop %bx
+ pop %ax
+
+ /* If the call isn't ah=0x8 or ah=0x15 we must restore %dx. */
+ cmpb $0x8, %ah
+ jz norestore
+ cmpb $0x15, %ah
+ jz norestore
+
+ /* Restore flags. */
+ popf
+ pushf
+
+ lcall *%cs:INT13H_OFFSET (LOCAL (oldhandler))
+
+ push %bp
+ mov %sp, %bp
+
+tail:
+ /* Save new flags below %esp so the caller will recieve new flags. */
+ pushf
+ pop %dx
+ mov %dx, 8(%bp)
+
+ pop %bp
+
+ /* Restore %dx. */
+ pop %dx
+ iret
+
+norestore:
+
+ /* Restore flags. */
+ popf
+ pushf
+
+ lcall *%cs:INT13H_OFFSET (LOCAL (oldhandler))
+
+ push %bp
+ mov %sp, %bp
+
+ /* Save %dx. So it won't be restored to original value. */
+ mov %dx, 2(%bp)
+
+ jmp tail
+
+/* Far pointer to the old handler. Stored as a CS:IP in the style of real-mode
+ IVT entries (thus PI:SC in mem). */
+VARIABLE(grub_drivemap_oldhandler)
+LOCAL (oldhandler):
+ .word 0x0, 0x0
+
+/* This label MUST be at the end of the copied block, since the installer code
+ reserves additional space for mappings at runtime and copies them over it. */
+ .align 2
+
+VARIABLE(grub_drivemap_mapstart)
+LOCAL (mapstart):
+ .byte 0
diff --git a/grub-core/commands/i386/pc/halt.c b/grub-core/commands/i386/pc/halt.c
new file mode 100644
index 0000000..e7c191d
--- /dev/null
+++ b/grub-core/commands/i386/pc/halt.c
@@ -0,0 +1,127 @@
+/* halt.c - command to halt the computer. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/machine/int.h>
+#include <grub/acpi.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static inline void __attribute__ ((noreturn))
+stop (void)
+{
+ while (1)
+ {
+ asm volatile ("hlt");
+ }
+}
+/*
+ * Halt the system, using APM if possible. If NO_APM is true, don't use
+ * APM even if it is available.
+ */
+void
+grub_halt (int no_apm)
+{
+ struct grub_bios_int_registers regs;
+
+ grub_acpi_halt ();
+
+ if (no_apm)
+ stop ();
+
+ /* detect APM */
+ regs.eax = 0x5300;
+ regs.ebx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+
+ if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
+ stop ();
+
+ /* disconnect APM first */
+ regs.eax = 0x5304;
+ regs.ebx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+
+ /* connect APM */
+ regs.eax = 0x5301;
+ regs.ebx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+ if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
+ stop ();
+
+ /* set APM protocol level - 1.1 or bust. (this covers APM 1.2 also) */
+ regs.eax = 0x530E;
+ regs.ebx = 0;
+ regs.ecx = 0x0101;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+ if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
+ stop ();
+
+ /* set the power state to off */
+ regs.eax = 0x5307;
+ regs.ebx = 1;
+ regs.ecx = 3;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+
+ /* shouldn't reach here */
+ stop ();
+}
+
+static grub_err_t
+grub_cmd_halt (grub_extcmd_context_t ctxt,
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+
+{
+ struct grub_arg_list *state = ctxt->state;
+ int no_apm = 0;
+
+ if (state[0].set)
+ no_apm = 1;
+ grub_halt (no_apm);
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(halt)
+{
+ cmd = grub_register_extcmd ("halt", grub_cmd_halt, 0, "[-n]",
+ N_("Halt the system, if possible using APM."),
+ options);
+}
+
+GRUB_MOD_FINI(halt)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/i386/pc/lsapm.c b/grub-core/commands/i386/pc/lsapm.c
new file mode 100644
index 0000000..17bcfd6
--- /dev/null
+++ b/grub-core/commands/i386/pc/lsapm.c
@@ -0,0 +1,115 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/int.h>
+#include <grub/machine/apm.h>
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+int
+grub_apm_get_info (struct grub_apm_info *info)
+{
+ struct grub_bios_int_registers regs;
+
+ /* detect APM */
+ regs.eax = 0x5300;
+ regs.ebx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+
+ if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
+ return 0;
+ info->version = regs.eax & 0xffff;
+ info->flags = regs.ecx & 0xffff;
+
+ /* disconnect APM first */
+ regs.eax = 0x5304;
+ regs.ebx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+
+ /* connect APM */
+ regs.eax = 0x5303;
+ regs.ebx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+
+ if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
+ return 0;
+
+ info->cseg = regs.eax & 0xffff;
+ info->offset = regs.ebx;
+ info->cseg_16 = regs.ecx & 0xffff;
+ info->dseg = regs.edx & 0xffff;
+ info->cseg_len = regs.esi >> 16;
+ info->cseg_16_len = regs.esi & 0xffff;
+ info->dseg_len = regs.edi;
+
+ return 1;
+}
+
+static grub_err_t
+grub_cmd_lsapm (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)), char **args __attribute__ ((unused)))
+{
+ struct grub_apm_info info;
+ if (!grub_apm_get_info (&info))
+ return grub_error (GRUB_ERR_IO, "no APM found");
+
+ grub_printf ("Vesion %u.%u\n"
+ "32-bit CS = 0x%x, len = 0x%x, offset = 0x%x\n"
+ "16-bit CS = 0x%x, len = 0x%x\n"
+ "DS = 0x%x, len = 0x%x\n",
+ info.version >> 8, info.version & 0xff,
+ info.cseg, info.cseg_len, info.offset,
+ info.cseg_16, info.cseg_16_len,
+ info.dseg, info.dseg_len);
+ grub_xputs (info.flags & GRUB_APM_FLAGS_16BITPROTECTED_SUPPORTED
+ ? "16-bit protected interface supported\n"
+ : "16-bit protected interface unsupported\n");
+ grub_xputs (info.flags & GRUB_APM_FLAGS_32BITPROTECTED_SUPPORTED
+ ? "32-bit protected interface supported\n"
+ : "32-bit protected interface unsupported\n");
+ grub_xputs (info.flags & GRUB_APM_FLAGS_CPUIDLE_SLOWS_DOWN
+ ? "CPU Idle slows down processor\n"
+ : "CPU Idle doesn't slow down processor\n");
+ grub_xputs (info.flags & GRUB_APM_FLAGS_DISABLED
+ ? "APM disabled\n" : "APM enabled\n");
+ grub_xputs (info.flags & GRUB_APM_FLAGS_DISENGAGED
+ ? "APM disengaged\n" : "APM engaged\n");
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(lsapm)
+{
+ cmd = grub_register_command ("lsapm", grub_cmd_lsapm, 0,
+ N_("Show APM information."));
+}
+
+GRUB_MOD_FINI(lsapm)
+{
+ grub_unregister_command (cmd);
+}
+
+
diff --git a/grub-core/commands/i386/pc/play.c b/grub-core/commands/i386/pc/play.c
new file mode 100644
index 0000000..57980eb
--- /dev/null
+++ b/grub-core/commands/i386/pc/play.c
@@ -0,0 +1,275 @@
+/* play.c - command to play a tune */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Lots of this file is borrowed from GNU/Hurd generic-speaker driver. */
+
+#include <grub/dl.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/machine/time.h>
+#include <grub/cpu/io.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
+
+/* The speaker port. */
+#define SPEAKER 0x61
+
+/* If 0, follow state of SPEAKER_DATA bit, otherwise enable output
+ from timer 2. */
+#define SPEAKER_TMR2 0x01
+
+/* If SPEAKER_TMR2 is not set, this provides direct input into the
+ speaker. Otherwise, this enables or disables the output from the
+ timer. */
+#define SPEAKER_DATA 0x02
+
+/* The PIT channel value ports. You can write to and read from them.
+ Do not mess with timer 0 or 1. */
+#define PIT_COUNTER_0 0x40
+#define PIT_COUNTER_1 0x41
+#define PIT_COUNTER_2 0x42
+
+/* The frequency of the PIT clock. */
+#define PIT_FREQUENCY 0x1234dd
+
+/* The PIT control port. You can only write to it. Do not mess with
+ timer 0 or 1. */
+#define PIT_CTRL 0x43
+#define PIT_CTRL_SELECT_MASK 0xc0
+#define PIT_CTRL_SELECT_0 0x00
+#define PIT_CTRL_SELECT_1 0x40
+#define PIT_CTRL_SELECT_2 0x80
+
+/* Read and load control. */
+#define PIT_CTRL_READLOAD_MASK 0x30
+#define PIT_CTRL_COUNTER_LATCH 0x00 /* Hold timer value until read. */
+#define PIT_CTRL_READLOAD_LSB 0x10 /* Read/load the LSB. */
+#define PIT_CTRL_READLOAD_MSB 0x20 /* Read/load the MSB. */
+#define PIT_CTRL_READLOAD_WORD 0x30 /* Read/load the LSB then the MSB. */
+
+/* Mode control. */
+#define PIT_CTRL_MODE_MASK 0x0e
+
+/* Interrupt on terminal count. Setting the mode sets output to low.
+ When counter is set and terminated, output is set to high. */
+#define PIT_CTRL_INTR_ON_TERM 0x00
+
+/* Programmable one-shot. When loading counter, output is set to
+ high. When counter terminated, output is set to low. Can be
+ triggered again from that point on by setting the gate pin to
+ high. */
+#define PIT_CTRL_PROGR_ONE_SHOT 0x02
+
+/* Rate generator. Output is low for one period of the counter, and
+ high for the other. */
+#define PIT_CTRL_RATE_GEN 0x04
+
+/* Square wave generator. Output is low for one half of the period,
+ and high for the other half. */
+#define PIT_CTRL_SQUAREWAVE_GEN 0x06
+
+/* Software triggered strobe. Setting the mode sets output to high.
+ When counter is set and terminated, output is set to low. */
+#define PIT_CTRL_SOFTSTROBE 0x08
+
+/* Hardware triggered strobe. Like software triggered strobe, but
+ only starts the counter when the gate pin is set to high. */
+#define PIT_CTRL_HARDSTROBE 0x0a
+
+/* Count mode. */
+#define PIT_CTRL_COUNT_MASK 0x01
+#define PIT_CTRL_COUNT_BINARY 0x00 /* 16-bit binary counter. */
+#define PIT_CTRL_COUNT_BCD 0x01 /* 4-decade BCD counter. */
+
+#define T_REST ((grub_uint16_t) 0)
+#define T_FINE ((grub_uint16_t) -1)
+
+struct note
+{
+ grub_uint16_t pitch;
+ grub_uint16_t duration;
+};
+
+static void
+beep_off (void)
+{
+ unsigned char status;
+
+ status = grub_inb (SPEAKER);
+ grub_outb (status & ~(SPEAKER_TMR2 | SPEAKER_DATA), SPEAKER);
+}
+
+static void
+beep_on (grub_uint16_t pitch)
+{
+ unsigned char status;
+ unsigned int counter;
+
+ if (pitch < 20)
+ pitch = 20;
+ else if (pitch > 20000)
+ pitch = 20000;
+
+ counter = PIT_FREQUENCY / pitch;
+
+ /* Program timer 2. */
+ grub_outb (PIT_CTRL_SELECT_2 | PIT_CTRL_READLOAD_WORD
+ | PIT_CTRL_SQUAREWAVE_GEN | PIT_CTRL_COUNT_BINARY, PIT_CTRL);
+ grub_outb (counter & 0xff, PIT_COUNTER_2); /* LSB */
+ grub_outb ((counter >> 8) & 0xff, PIT_COUNTER_2); /* MSB */
+
+ /* Start speaker. */
+ status = grub_inb (SPEAKER);
+ grub_outb (status | SPEAKER_TMR2 | SPEAKER_DATA, SPEAKER);
+}
+
+/* Returns whether playing should continue. */
+static int
+play (unsigned tempo, struct note *note)
+{
+ unsigned int to;
+
+ if (note->pitch == T_FINE || grub_checkkey () >= 0)
+ return 1;
+
+ grub_dprintf ("play", "pitch = %d, duration = %d\n", note->pitch,
+ note->duration);
+
+ switch (note->pitch)
+ {
+ case T_REST:
+ beep_off ();
+ break;
+
+ default:
+ beep_on (note->pitch);
+ break;
+ }
+
+ to = grub_get_rtc () + BASE_TEMPO * note->duration / tempo;
+ while (((unsigned int) grub_get_rtc () <= to) && (grub_checkkey () < 0))
+ ;
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_play (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name or tempo and notes required");
+
+ if (argc == 1)
+ {
+ struct note buf;
+ grub_uint32_t tempo;
+ grub_file_t file;
+
+ file = grub_file_open (args[0]);
+
+ if (! file)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+
+ if (grub_file_read (file, &tempo, sizeof (tempo)) != sizeof (tempo))
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_FILE_READ_ERROR,
+ "file doesn't even contains a full tempo record");
+ }
+
+ tempo = grub_le_to_cpu32 (tempo);
+ grub_dprintf ("play","tempo = %d\n", tempo);
+
+ while (grub_file_read (file, &buf,
+ sizeof (struct note)) == sizeof (struct note))
+ {
+ buf.pitch = grub_le_to_cpu16 (buf.pitch);
+ buf.duration = grub_le_to_cpu16 (buf.duration);
+
+ if (play (tempo, &buf))
+ break;
+ }
+
+ grub_file_close (file);
+ }
+ else
+ {
+ char *end;
+ unsigned tempo;
+ struct note note;
+ int i;
+
+ tempo = grub_strtoul (args[0], &end, 0);
+
+ if (*end)
+ /* Was not a number either, assume it was supposed to be a file name. */
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+
+ grub_dprintf ("play","tempo = %d\n", tempo);
+
+ for (i = 1; i + 1 < argc; i += 2)
+ {
+ note.pitch = grub_strtoul (args[i], &end, 0);
+ if (*end)
+ {
+ grub_error (GRUB_ERR_BAD_NUMBER, "bogus pitch number");
+ break;
+ }
+
+ note.duration = grub_strtoul (args[i + 1], &end, 0);
+ if (*end)
+ {
+ grub_error (GRUB_ERR_BAD_NUMBER, "bogus duration number");
+ break;
+ }
+
+ if (play (tempo, &note))
+ break;
+ }
+ }
+
+ beep_off ();
+
+ while (grub_checkkey () > 0)
+ grub_getkey ();
+
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(play)
+{
+ cmd = grub_register_command ("play", grub_cmd_play,
+ N_("FILE | TEMPO [PITCH1 DURATION1] [PITCH2 DURATION2] ... "),
+ N_("Play a tune."));
+}
+
+GRUB_MOD_FINI(play)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/i386/pc/pxecmd.c b/grub-core/commands/i386/pc/pxecmd.c
new file mode 100644
index 0000000..dffa15a
--- /dev/null
+++ b/grub-core/commands/i386/pc/pxecmd.c
@@ -0,0 +1,54 @@
+/* pxe.c - command to control the pxe driver */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/machine/pxe.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ if (! grub_pxe_pxenv)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "no pxe environment");
+
+ grub_pxe_unload ();
+
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(pxecmd)
+{
+ cmd = grub_register_command ("pxe_unload", grub_cmd_pxe_unload,
+ 0,
+ N_("Unload PXE environment."));
+}
+
+GRUB_MOD_FINI(pxecmd)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/i386/pc/sendkey.c b/grub-core/commands/i386/pc/sendkey.c
new file mode 100644
index 0000000..a55d17b
--- /dev/null
+++ b/grub-core/commands/i386/pc/sendkey.c
@@ -0,0 +1,385 @@
+/* sendkey.c - fake keystroke. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/extcmd.h>
+#include <grub/cpu/io.h>
+#include <grub/loader.h>
+
+GRUB_MOD_LICENSE ("GPLv2+");
+
+static char sendkey[0x20];
+/* Length of sendkey. */
+static int keylen = 0;
+static int noled = 0;
+static const struct grub_arg_option options[] =
+ {
+ {"num", 'n', 0, "set numlock mode", "[on|off]", ARG_TYPE_STRING},
+ {"caps", 'c', 0, "set capslock mode", "[on|off]", ARG_TYPE_STRING},
+ {"scroll", 's', 0, "set scrolllock mode", "[on|off]", ARG_TYPE_STRING},
+ {"insert", 0, 0, "set insert mode", "[on|off]", ARG_TYPE_STRING},
+ {"pause", 0, 0, "set pause mode", "[on|off]", ARG_TYPE_STRING},
+ {"left-shift", 0, 0, "press left shift", "[on|off]", ARG_TYPE_STRING},
+ {"right-shift", 0, 0, "press right shift", "[on|off]", ARG_TYPE_STRING},
+ {"sysrq", 0, 0, "press SysRq", "[on|off]", ARG_TYPE_STRING},
+ {"numkey", 0, 0, "press NumLock key", "[on|off]", ARG_TYPE_STRING},
+ {"capskey", 0, 0, "press CapsLock key", "[on|off]", ARG_TYPE_STRING},
+ {"scrollkey", 0, 0, "press ScrollLock key", "[on|off]", ARG_TYPE_STRING},
+ {"insertkey", 0, 0, "press Insert key", "[on|off]", ARG_TYPE_STRING},
+ {"left-alt", 0, 0, "press left alt", "[on|off]", ARG_TYPE_STRING},
+ {"right-alt", 0, 0, "press right alt", "[on|off]", ARG_TYPE_STRING},
+ {"left-ctrl", 0, 0, "press left ctrl", "[on|off]", ARG_TYPE_STRING},
+ {"right-ctrl", 0, 0, "press right ctrl", "[on|off]", ARG_TYPE_STRING},
+ {"no-led", 0, 0, "don't update LED state", 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+static int simple_flag_offsets[]
+= {5, 6, 4, 7, 11, 1, 0, 10, 13, 14, 12, 15, 9, 3, 8, 2};
+
+static grub_uint32_t andmask = 0xffffffff, ormask = 0;
+
+struct
+keysym
+{
+ char *unshifted_name; /* the name in unshifted state */
+ char *shifted_name; /* the name in shifted state */
+ unsigned char unshifted_ascii; /* the ascii code in unshifted state */
+ unsigned char shifted_ascii; /* the ascii code in shifted state */
+ unsigned char keycode; /* keyboard scancode */
+};
+
+/* The table for key symbols. If the "shifted" member of an entry is
+ NULL, the entry does not have shifted state. Copied from GRUB Legacy setkey fuction */
+static struct keysym keysym_table[] =
+{
+ {"escape", 0, 0x1b, 0, 0x01},
+ {"1", "exclam", '1', '!', 0x02},
+ {"2", "at", '2', '@', 0x03},
+ {"3", "numbersign", '3', '#', 0x04},
+ {"4", "dollar", '4', '$', 0x05},
+ {"5", "percent", '5', '%', 0x06},
+ {"6", "caret", '6', '^', 0x07},
+ {"7", "ampersand", '7', '&', 0x08},
+ {"8", "asterisk", '8', '*', 0x09},
+ {"9", "parenleft", '9', '(', 0x0a},
+ {"0", "parenright", '0', ')', 0x0b},
+ {"minus", "underscore", '-', '_', 0x0c},
+ {"equal", "plus", '=', '+', 0x0d},
+ {"backspace", 0, '\b', 0, 0x0e},
+ {"tab", 0, '\t', 0, 0x0f},
+ {"q", "Q", 'q', 'Q', 0x10},
+ {"w", "W", 'w', 'W', 0x11},
+ {"e", "E", 'e', 'E', 0x12},
+ {"r", "R", 'r', 'R', 0x13},
+ {"t", "T", 't', 'T', 0x14},
+ {"y", "Y", 'y', 'Y', 0x15},
+ {"u", "U", 'u', 'U', 0x16},
+ {"i", "I", 'i', 'I', 0x17},
+ {"o", "O", 'o', 'O', 0x18},
+ {"p", "P", 'p', 'P', 0x19},
+ {"bracketleft", "braceleft", '[', '{', 0x1a},
+ {"bracketright", "braceright", ']', '}', 0x1b},
+ {"enter", 0, '\r', 0, 0x1c},
+ {"control", 0, 0, 0, 0x1d},
+ {"a", "A", 'a', 'A', 0x1e},
+ {"s", "S", 's', 'S', 0x1f},
+ {"d", "D", 'd', 'D', 0x20},
+ {"f", "F", 'f', 'F', 0x21},
+ {"g", "G", 'g', 'G', 0x22},
+ {"h", "H", 'h', 'H', 0x23},
+ {"j", "J", 'j', 'J', 0x24},
+ {"k", "K", 'k', 'K', 0x25},
+ {"l", "L", 'l', 'L', 0x26},
+ {"semicolon", "colon", ';', ':', 0x27},
+ {"quote", "doublequote", '\'', '"', 0x28},
+ {"backquote", "tilde", '`', '~', 0x29},
+ {"shift", 0, 0, 0, 0x2a},
+ {"backslash", "bar", '\\', '|', 0x2b},
+ {"z", "Z", 'z', 'Z', 0x2c},
+ {"x", "X", 'x', 'X', 0x2d},
+ {"c", "C", 'c', 'C', 0x2e},
+ {"v", "V", 'v', 'V', 0x2f},
+ {"b", "B", 'b', 'B', 0x30},
+ {"n", "N", 'n', 'N', 0x31},
+ {"m", "M", 'm', 'M', 0x32},
+ {"comma", "less", ',', '<', 0x33},
+ {"period", "greater", '.', '>', 0x34},
+ {"slash", "question", '/', '?', 0x35},
+ {"rshift", 0, 0, 0, 0x36},
+ {"numasterisk", 0, '*', 0, 0x37},
+ {"alt", 0, 0, 0, 0x38},
+ {"space", 0, ' ', 0, 0x39},
+ {"capslock", 0, 0, 0, 0x3a},
+ {"F1", 0, 0, 0, 0x3b},
+ {"F2", 0, 0, 0, 0x3c},
+ {"F3", 0, 0, 0, 0x3d},
+ {"F4", 0, 0, 0, 0x3e},
+ {"F5", 0, 0, 0, 0x3f},
+ {"F6", 0, 0, 0, 0x40},
+ {"F7", 0, 0, 0, 0x41},
+ {"F8", 0, 0, 0, 0x42},
+ {"F9", 0, 0, 0, 0x43},
+ {"F10", 0, 0, 0, 0x44},
+ {"num7", "numhome", '7', 0, 0x47},
+ {"num8", "numup", '8', 0, 0x48},
+ {"num9", "numpgup", '9', 0, 0x49},
+ {"numminus", 0, '-', 0, 0x4a},
+ {"num4", "numleft", '4', 0, 0x4b},
+ {"num5", "numcenter", '5', 0, 0x4c},
+ {"num6", "numright", '6', 0, 0x4d},
+ {"numplus", 0, '-', 0, 0x4e},
+ {"num1", "numend", '1', 0, 0x4f},
+ {"num2", "numdown", '2', 0, 0x50},
+ {"num3", "numpgdown", '3', 0, 0x51},
+ {"num0", "numinsert", '0', 0, 0x52},
+ {"numperiod", "numdelete", 0, 0x7f, 0x53},
+ {"F11", 0, 0, 0, 0x57},
+ {"F12", 0, 0, 0, 0x58},
+ {"numenter", 0, '\r', 0, 0xe0},
+ {"numslash", 0, '/', 0, 0xe0},
+ {"delete", 0, 0x7f, 0, 0xe0},
+ {"insert", 0, 0xe0, 0, 0x52},
+ {"home", 0, 0xe0, 0, 0x47},
+ {"end", 0, 0xe0, 0, 0x4f},
+ {"pgdown", 0, 0xe0, 0, 0x51},
+ {"pgup", 0, 0xe0, 0, 0x49},
+ {"down", 0, 0xe0, 0, 0x50},
+ {"up", 0, 0xe0, 0, 0x48},
+ {"left", 0, 0xe0, 0, 0x4b},
+ {"right", 0, 0xe0, 0, 0x4d}
+};
+
+/* Set a simple flag in flags variable
+ OUTOFFSET - offset of flag in FLAGS,
+ OP - action id
+*/
+static void
+grub_sendkey_set_simple_flag (int outoffset, int op)
+{
+ if (op == 2)
+ {
+ andmask |= (1 << outoffset);
+ ormask &= ~(1 << outoffset);
+ }
+ else
+ {
+ andmask &= (~(1 << outoffset));
+ if (op == 1)
+ ormask |= (1 << outoffset);
+ else
+ ormask &= ~(1 << outoffset);
+ }
+}
+
+static int
+grub_sendkey_parse_op (struct grub_arg_list state)
+{
+ if (! state.set)
+ return 2;
+
+ if (grub_strcmp (state.arg, "off") == 0 || grub_strcmp (state.arg, "0") == 0
+ || grub_strcmp (state.arg, "unpress") == 0)
+ return 0;
+
+ if (grub_strcmp (state.arg, "on") == 0 || grub_strcmp (state.arg, "1") == 0
+ || grub_strcmp (state.arg, "press") == 0)
+ return 1;
+
+ return 2;
+}
+
+static grub_uint32_t oldflags;
+
+static grub_err_t
+grub_sendkey_postboot (void)
+{
+ /* For convention: pointer to flags. */
+ grub_uint32_t *flags = (grub_uint32_t *) 0x417;
+
+ *flags = oldflags;
+
+ *((char *) 0x41a) = 0x1e;
+ *((char *) 0x41c) = 0x1e;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Set keyboard buffer to our sendkey */
+static grub_err_t
+grub_sendkey_preboot (int noret __attribute__ ((unused)))
+{
+ /* For convention: pointer to flags. */
+ grub_uint32_t *flags = (grub_uint32_t *) 0x417;
+
+ oldflags = *flags;
+
+ /* Set the sendkey. */
+ *((char *) 0x41a) = 0x1e;
+ *((char *) 0x41c) = keylen + 0x1e;
+ grub_memcpy ((char *) 0x41e, sendkey, 0x20);
+
+ /* Transform "any ctrl" to "right ctrl" flag. */
+ if (*flags & (1 << 8))
+ *flags &= ~(1 << 2);
+
+ /* Transform "any alt" to "right alt" flag. */
+ if (*flags & (1 << 9))
+ *flags &= ~(1 << 3);
+
+ *flags = (*flags & andmask) | ormask;
+
+ /* Transform "right ctrl" to "any ctrl" flag. */
+ if (*flags & (1 << 8))
+ *flags |= (1 << 2);
+
+ /* Transform "right alt" to "any alt" flag. */
+ if (*flags & (1 << 9))
+ *flags |= (1 << 3);
+
+ /* Write new LED state */
+ if (!noled)
+ {
+ int value = 0;
+ int failed;
+ /* Try 5 times */
+ for (failed = 0; failed < 5; failed++)
+ {
+ value = 0;
+ /* Send command change LEDs */
+ grub_outb (0xed, 0x60);
+
+ /* Wait */
+ do
+ value = grub_inb (0x60);
+ while ((value != 0xfa) && (value != 0xfe));
+
+ if (value == 0xfa)
+ {
+ /* Set new LEDs*/
+ grub_outb ((*flags >> 4) & 7, 0x60);
+ break;
+ }
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_sendkey (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+
+ auto int find_key_code (char *key);
+ auto int find_ascii_code (char *key);
+
+ int find_key_code (char *key)
+ {
+ unsigned i;
+
+ for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
+ {
+ if (keysym_table[i].unshifted_name
+ && grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
+ return keysym_table[i].keycode;
+ else if (keysym_table[i].shifted_name
+ && grub_strcmp (key, keysym_table[i].shifted_name) == 0)
+ return keysym_table[i].keycode;
+ }
+
+ return 0;
+ }
+
+ int find_ascii_code (char *key)
+ {
+ unsigned i;
+
+ for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
+ {
+ if (keysym_table[i].unshifted_name
+ && grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
+ return keysym_table[i].unshifted_ascii;
+ else if (keysym_table[i].shifted_name
+ && grub_strcmp (key, keysym_table[i].shifted_name) == 0)
+ return keysym_table[i].shifted_ascii;
+ }
+
+ return 0;
+ }
+
+ andmask = 0xffffffff;
+ ormask = 0;
+
+ {
+ int i;
+
+ keylen = 0;
+
+ for (i = 0; i < argc && keylen < 0x20; i++)
+ {
+ int key_code;
+
+ key_code = find_key_code (args[i]);
+ if (key_code)
+ {
+ sendkey[keylen++] = find_ascii_code (args[i]);
+ sendkey[keylen++] = key_code;
+ }
+ }
+ }
+
+ {
+ unsigned i;
+ for (i = 0; i < sizeof (simple_flag_offsets)
+ / sizeof (simple_flag_offsets[0]); i++)
+ grub_sendkey_set_simple_flag (simple_flag_offsets[i],
+ grub_sendkey_parse_op(state[i]));
+ }
+
+ /* Set noled. */
+ noled = (state[sizeof (simple_flag_offsets)
+ / sizeof (simple_flag_offsets[0])].set);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd;
+static void *preboot_hook;
+
+GRUB_MOD_INIT (sendkey)
+{
+ cmd = grub_register_extcmd ("sendkey", grub_cmd_sendkey, 0,
+ "sendkey [KEYSTROKE1] [KEYSTROKE2] ...",
+ "Emulate a keystroke", options);
+
+ preboot_hook
+ = grub_loader_register_preboot_hook (grub_sendkey_preboot,
+ grub_sendkey_postboot,
+ GRUB_LOADER_PREBOOT_HOOK_PRIO_CONSOLE);
+}
+
+GRUB_MOD_FINI (sendkey)
+{
+ grub_unregister_extcmd (cmd);
+ grub_loader_unregister_preboot_hook (preboot_hook);
+}
diff --git a/grub-core/commands/ieee1275/suspend.c b/grub-core/commands/ieee1275/suspend.c
new file mode 100644
index 0000000..de06895
--- /dev/null
+++ b/grub-core/commands/ieee1275/suspend.c
@@ -0,0 +1,51 @@
+/* suspend.c - command to suspend GRUB and return to Open Firmware */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_printf ("Run 'go' to resume GRUB.\n");
+ grub_ieee1275_enter ();
+ grub_cls ();
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(ieee1275_suspend)
+{
+ cmd = grub_register_command ("suspend", grub_cmd_suspend,
+ 0, N_("Return to Open Firmware prompt."));
+}
+
+GRUB_MOD_FINI(ieee1275_suspend)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/iorw.c b/grub-core/commands/iorw.c
new file mode 100644
index 0000000..e7035b5
--- /dev/null
+++ b/grub-core/commands/iorw.c
@@ -0,0 +1,152 @@
+/* memrw.c - command to read / write physical memory */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/env.h>
+#include <grub/cpu/io.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
+static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
+
+static const struct grub_arg_option options[] =
+ {
+ {0, 'v', 0, N_("Save read value into variable VARNAME."),
+ N_("VARNAME"), ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+
+static grub_err_t
+grub_cmd_read (grub_extcmd_context_t ctxt, int argc, char **argv)
+{
+ grub_target_addr_t addr;
+ grub_uint32_t value = 0;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid number of arguments");
+
+ addr = grub_strtoul (argv[0], 0, 0);
+ switch (ctxt->extcmd->cmd->name[sizeof ("in") - 1])
+ {
+ case 'l':
+ value = grub_inl (addr);
+ break;
+
+ case 'w':
+ value = grub_inw (addr);
+ break;
+
+ case 'b':
+ value = grub_inb (addr);
+ break;
+ }
+
+ if (ctxt->state[0].set)
+ {
+ char buf[sizeof ("XXXXXXXX")];
+ grub_snprintf (buf, sizeof (buf), "%x", value);
+ grub_env_set (ctxt->state[0].arg, buf);
+ }
+ else
+ grub_printf ("0x%x\n", value);
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_write (grub_command_t cmd, int argc, char **argv)
+{
+ grub_target_addr_t addr;
+ grub_uint32_t value;
+ grub_uint32_t mask = 0xffffffff;
+
+ if (argc != 2 && argc != 3)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid number of arguments");
+
+ addr = grub_strtoul (argv[0], 0, 0);
+ value = grub_strtoul (argv[1], 0, 0);
+ if (argc == 3)
+ mask = grub_strtoul (argv[2], 0, 0);
+ value &= mask;
+ switch (cmd->name[sizeof ("out") - 1])
+ {
+ case 'l':
+ if (mask != 0xffffffff)
+ grub_outl ((grub_inl (addr) & ~mask) | value, addr);
+ else
+ grub_outl (value, addr);
+ break;
+
+ case 'w':
+ if ((mask & 0xffff) != 0xffff)
+ grub_outw ((grub_inw (addr) & ~mask) | value, addr);
+ else
+ grub_outw (value, addr);
+ break;
+
+ case 'b':
+ if ((mask & 0xff) != 0xff)
+ grub_outb ((grub_inb (addr) & ~mask) | value, addr);
+ else
+ grub_outb (value, addr);
+ break;
+ }
+
+ return 0;
+}
+
+GRUB_MOD_INIT(memrw)
+{
+ cmd_read_byte =
+ grub_register_extcmd ("inb", grub_cmd_read, 0,
+ N_("PORT"), N_("Read byte from PORT."), options);
+ cmd_read_word =
+ grub_register_extcmd ("inw", grub_cmd_read, 0,
+ N_("PORT"), N_("Read word from PORT."), options);
+ cmd_read_dword =
+ grub_register_extcmd ("inl", grub_cmd_read, 0,
+ N_("PORT"), N_("Read dword from PORT."), options);
+ cmd_write_byte =
+ grub_register_command ("outb", grub_cmd_write,
+ N_("PORT VALUE [MASK]"),
+ N_("Write byte VALUE to PORT."));
+ cmd_write_word =
+ grub_register_command ("outw", grub_cmd_write,
+ N_("PORT VALUE [MASK]"),
+ N_("Write word VALUE to PORT."));
+ cmd_write_dword =
+ grub_register_command ("outl", grub_cmd_write,
+ N_("ADDR VALUE [MASK]"),
+ N_("Write dword VALUE to PORT."));
+}
+
+GRUB_MOD_FINI(memrw)
+{
+ grub_unregister_extcmd (cmd_read_byte);
+ grub_unregister_extcmd (cmd_read_word);
+ grub_unregister_extcmd (cmd_read_dword);
+ grub_unregister_command (cmd_write_byte);
+ grub_unregister_command (cmd_write_word);
+ grub_unregister_command (cmd_write_dword);
+}
diff --git a/grub-core/commands/keylayouts.c b/grub-core/commands/keylayouts.c
new file mode 100644
index 0000000..6c5913a
--- /dev/null
+++ b/grub-core/commands/keylayouts.c
@@ -0,0 +1,299 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/term.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/time.h>
+#include <grub/dl.h>
+#include <grub/keyboard_layouts.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/file.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct grub_keyboard_layout layout_us = {
+ .keyboard_map = {
+ /* Keyboard errors. Handled by driver. */
+ /* 0x00 */ 0, 0, 0, 0,
+
+ /* 0x04 */ 'a', 'b', 'c', 'd',
+ /* 0x08 */ 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
+ /* 0x10 */ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
+ /* 0x18 */ 'u', 'v', 'w', 'x', 'y', 'z', '1', '2',
+ /* 0x20 */ '3', '4', '5', '6', '7', '8', '9', '0',
+ /* 0x28 */ '\n', '\e', '\b', '\t', ' ', '-', '=', '[',
+ /* According to usage table 0x31 should be mapped to '/'
+ but testing with real keyboard shows that 0x32 is remapped to '/'.
+ Map 0x31 to 0.
+ */
+ /* 0x30 */ ']', 0, '\\', ';', '\'', '`', ',', '.',
+ /* 0x39 is CapsLock. Handled by driver. */
+ /* 0x38 */ '/', 0, GRUB_TERM_KEY_F1, GRUB_TERM_KEY_F2,
+ /* 0x3c */ GRUB_TERM_KEY_F3, GRUB_TERM_KEY_F4,
+ /* 0x3e */ GRUB_TERM_KEY_F5, GRUB_TERM_KEY_F6,
+ /* 0x40 */ GRUB_TERM_KEY_F7, GRUB_TERM_KEY_F8,
+ /* 0x42 */ GRUB_TERM_KEY_F9, GRUB_TERM_KEY_F10,
+ /* 0x44 */ GRUB_TERM_KEY_F11, GRUB_TERM_KEY_F12,
+ /* PrtScr and ScrollLock. Not handled yet. */
+ /* 0x46 */ 0, 0,
+ /* 0x48 is Pause. Not handled yet. */
+ /* 0x48 */ 0, GRUB_TERM_KEY_INSERT,
+ /* 0x4a */ GRUB_TERM_KEY_HOME, GRUB_TERM_KEY_PPAGE,
+ /* 0x4c */ GRUB_TERM_KEY_DC, GRUB_TERM_KEY_END,
+ /* 0x4e */ GRUB_TERM_KEY_NPAGE, GRUB_TERM_KEY_RIGHT,
+ /* 0x50 */ GRUB_TERM_KEY_LEFT, GRUB_TERM_KEY_DOWN,
+ /* 0x53 is NumLock. Handled by driver. */
+ /* 0x52 */ GRUB_TERM_KEY_UP, 0,
+ /* 0x54 */ '/', '*',
+ /* 0x56 */ '-', '+',
+ /* 0x58 */ '\n', GRUB_TERM_KEY_END,
+ /* 0x5a */ GRUB_TERM_KEY_DOWN, GRUB_TERM_KEY_NPAGE,
+ /* 0x5c */ GRUB_TERM_KEY_LEFT, GRUB_TERM_KEY_CENTER,
+ /* 0x5e */ GRUB_TERM_KEY_RIGHT, GRUB_TERM_KEY_HOME,
+ /* 0x60 */ GRUB_TERM_KEY_UP, GRUB_TERM_KEY_PPAGE,
+ /* 0x62 */ GRUB_TERM_KEY_INSERT, GRUB_TERM_KEY_DC,
+ /* 0x64 */ '\\'
+ },
+ .keyboard_map_shift = {
+ /* Keyboard errors. Handled by driver. */
+ /* 0x00 */ 0, 0, 0, 0,
+
+ /* 0x04 */ 'A', 'B', 'C', 'D',
+ /* 0x08 */ 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
+ /* 0x10 */ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
+ /* 0x18 */ 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '@',
+ /* 0x20 */ '#', '$', '%', '^', '&', '*', '(', ')',
+ /* 0x28 */ '\n' | GRUB_TERM_SHIFT, '\e' | GRUB_TERM_SHIFT,
+ /* 0x2a */ '\b' | GRUB_TERM_SHIFT, '\t' | GRUB_TERM_SHIFT,
+ /* 0x2c */ ' ' | GRUB_TERM_SHIFT, '_', '+', '{',
+ /* According to usage table 0x31 should be mapped to '/'
+ but testing with real keyboard shows that 0x32 is remapped to '/'.
+ Map 0x31 to 0.
+ */
+ /* 0x30 */ '}', 0, '|', ':', '"', '~', '<', '>',
+ /* 0x39 is CapsLock. Handled by driver. */
+ /* 0x38 */ '?', 0,
+ /* 0x3a */ GRUB_TERM_KEY_F1 | GRUB_TERM_SHIFT,
+ /* 0x3b */ GRUB_TERM_KEY_F2 | GRUB_TERM_SHIFT,
+ /* 0x3c */ GRUB_TERM_KEY_F3 | GRUB_TERM_SHIFT,
+ /* 0x3d */ GRUB_TERM_KEY_F4 | GRUB_TERM_SHIFT,
+ /* 0x3e */ GRUB_TERM_KEY_F5 | GRUB_TERM_SHIFT,
+ /* 0x3f */ GRUB_TERM_KEY_F6 | GRUB_TERM_SHIFT,
+ /* 0x40 */ GRUB_TERM_KEY_F7 | GRUB_TERM_SHIFT,
+ /* 0x41 */ GRUB_TERM_KEY_F8 | GRUB_TERM_SHIFT,
+ /* 0x42 */ GRUB_TERM_KEY_F9 | GRUB_TERM_SHIFT,
+ /* 0x43 */ GRUB_TERM_KEY_F10 | GRUB_TERM_SHIFT,
+ /* 0x44 */ GRUB_TERM_KEY_F11 | GRUB_TERM_SHIFT,
+ /* 0x45 */ GRUB_TERM_KEY_F12 | GRUB_TERM_SHIFT,
+ /* PrtScr and ScrollLock. Not handled yet. */
+ /* 0x46 */ 0, 0,
+ /* 0x48 is Pause. Not handled yet. */
+ /* 0x48 */ 0, GRUB_TERM_KEY_INSERT | GRUB_TERM_SHIFT,
+ /* 0x4a */ GRUB_TERM_KEY_HOME | GRUB_TERM_SHIFT,
+ /* 0x4b */ GRUB_TERM_KEY_PPAGE | GRUB_TERM_SHIFT,
+ /* 0x4c */ GRUB_TERM_KEY_DC | GRUB_TERM_SHIFT,
+ /* 0x4d */ GRUB_TERM_KEY_END | GRUB_TERM_SHIFT,
+ /* 0x4e */ GRUB_TERM_KEY_NPAGE | GRUB_TERM_SHIFT,
+ /* 0x4f */ GRUB_TERM_KEY_RIGHT | GRUB_TERM_SHIFT,
+ /* 0x50 */ GRUB_TERM_KEY_LEFT | GRUB_TERM_SHIFT,
+ /* 0x51 */ GRUB_TERM_KEY_DOWN | GRUB_TERM_SHIFT,
+ /* 0x53 is NumLock. Handled by driver. */
+ /* 0x52 */ GRUB_TERM_KEY_UP | GRUB_TERM_SHIFT, 0,
+ /* 0x54 */ '/', '*',
+ /* 0x56 */ '-', '+',
+ /* 0x58 */ '\n' | GRUB_TERM_SHIFT, '1', '2', '3', '4', '5','6', '7',
+ /* 0x60 */ '8', '9', '0', '.', '|'
+ }
+};
+
+static struct grub_keyboard_layout *grub_current_layout = &layout_us;
+
+static int
+map_key_core (int code, int status, int *alt_gr_consumed)
+{
+ *alt_gr_consumed = 0;
+
+ if (status & GRUB_TERM_STATUS_RALT)
+ {
+ if (status & (GRUB_TERM_STATUS_LSHIFT | GRUB_TERM_STATUS_RSHIFT))
+ {
+ if (grub_current_layout->keyboard_map_shift_l3[code])
+ {
+ *alt_gr_consumed = 1;
+ return grub_current_layout->keyboard_map_shift_l3[code];
+ }
+ }
+ else if (grub_current_layout->keyboard_map_l3[code])
+ {
+ *alt_gr_consumed = 1;
+ return grub_current_layout->keyboard_map_l3[code];
+ }
+ }
+ if (status & (GRUB_TERM_STATUS_LSHIFT | GRUB_TERM_STATUS_RSHIFT))
+ return grub_current_layout->keyboard_map_shift[code];
+ else
+ return grub_current_layout->keyboard_map[code];
+}
+
+unsigned
+grub_term_map_key (grub_keyboard_key_t code, int status)
+{
+ int alt_gr_consumed = 0;
+ int key;
+
+ if (code >= 0x59 && code <= 0x63 && (status & GRUB_TERM_STATUS_NUM))
+ {
+ if (status & (GRUB_TERM_STATUS_RSHIFT | GRUB_TERM_STATUS_LSHIFT))
+ status &= ~(GRUB_TERM_STATUS_RSHIFT | GRUB_TERM_STATUS_LSHIFT);
+ else
+ status |= GRUB_TERM_STATUS_RSHIFT;
+ }
+
+ key = map_key_core (code, status, &alt_gr_consumed);
+
+ if (key == 0 || key == GRUB_TERM_SHIFT)
+ grub_printf ("Unknown key 0x%x detected\n", code);
+
+ if (status & GRUB_TERM_STATUS_CAPS)
+ {
+ if ((key >= 'a') && (key <= 'z'))
+ key += 'A' - 'a';
+ else if ((key >= 'A') && (key <= 'Z'))
+ key += 'a' - 'A';
+ }
+
+ if ((status & GRUB_TERM_STATUS_LALT) ||
+ ((status & GRUB_TERM_STATUS_RALT) && !alt_gr_consumed))
+ key |= GRUB_TERM_ALT;
+ if (status & (GRUB_TERM_STATUS_LCTRL | GRUB_TERM_STATUS_RCTRL))
+ key |= GRUB_TERM_CTRL;
+
+ return key;
+}
+
+static grub_err_t
+grub_cmd_keymap (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ char *filename;
+ grub_file_t file;
+ grub_uint32_t version;
+ grub_uint8_t magic[GRUB_KEYBOARD_LAYOUTS_FILEMAGIC_SIZE];
+ struct grub_keyboard_layout *newmap = NULL;
+ unsigned i;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file or layout name required");
+ if (argv[0][0] != '(' && argv[0][0] != '/' && argv[0][0] != '+')
+ {
+ const char *prefix = grub_env_get ("prefix");
+ if (!prefix)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "No prefix set");
+ filename = grub_xasprintf ("%s/layouts/%s.gkb", prefix, argv[0]);
+ if (!filename)
+ return grub_errno;
+ }
+ else
+ filename = argv[0];
+
+ file = grub_file_open (filename);
+ if (! file)
+ goto fail;
+
+ if (grub_file_read (file, magic, sizeof (magic)) != sizeof (magic))
+ {
+ if (!grub_errno)
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "file is too short");
+ goto fail;
+ }
+
+ if (grub_memcmp (magic, GRUB_KEYBOARD_LAYOUTS_FILEMAGIC,
+ GRUB_KEYBOARD_LAYOUTS_FILEMAGIC_SIZE) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid magic");
+ goto fail;
+ }
+
+ if (grub_file_read (file, &version, sizeof (version)) != sizeof (version))
+ {
+ if (!grub_errno)
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "file is too short");
+ goto fail;
+ }
+
+ if (grub_le_to_cpu32 (version) != GRUB_KEYBOARD_LAYOUTS_VERSION)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid version");
+ goto fail;
+ }
+
+ newmap = grub_malloc (sizeof (*newmap));
+ if (!newmap)
+ goto fail;
+
+ if (grub_file_read (file, newmap, sizeof (*newmap)) != sizeof (*newmap))
+ {
+ if (!grub_errno)
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "file is too short");
+ goto fail;
+ }
+
+ for (i = 0; i < ARRAY_SIZE (newmap->keyboard_map); i++)
+ newmap->keyboard_map[i] = grub_le_to_cpu32(newmap->keyboard_map[i]);
+
+ for (i = 0; i < ARRAY_SIZE (newmap->keyboard_map_shift); i++)
+ newmap->keyboard_map_shift[i]
+ = grub_le_to_cpu32(newmap->keyboard_map_shift[i]);
+
+ for (i = 0; i < ARRAY_SIZE (newmap->keyboard_map_l3); i++)
+ newmap->keyboard_map_l3[i]
+ = grub_le_to_cpu32(newmap->keyboard_map_l3[i]);
+
+ for (i = 0; i < ARRAY_SIZE (newmap->keyboard_map_shift_l3); i++)
+ newmap->keyboard_map_shift_l3[i]
+ = grub_le_to_cpu32(newmap->keyboard_map_shift_l3[i]);
+
+ grub_current_layout = newmap;
+
+ return GRUB_ERR_NONE;
+
+ fail:
+ if (filename != argv[0])
+ grub_free (filename);
+ grub_free (newmap);
+ if (file)
+ grub_file_close (file);
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(keylayouts)
+{
+ cmd = grub_register_command ("keymap", grub_cmd_keymap,
+ 0, N_("Load a keyboard layout."));
+}
+
+GRUB_MOD_FINI(keylayouts)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/keystatus.c b/grub-core/commands/keystatus.c
new file mode 100644
index 0000000..f3a6699
--- /dev/null
+++ b/grub-core/commands/keystatus.c
@@ -0,0 +1,110 @@
+/* keystatus.c - Command to check key modifier status. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/term.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"shift", 's', 0, N_("Check Shift key."), 0, 0},
+ {"ctrl", 'c', 0, N_("Check Control key."), 0, 0},
+ {"alt", 'a', 0, N_("Check Alt key."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static int
+grub_getkeystatus (void)
+{
+ int status = 0;
+ grub_term_input_t term;
+
+ if (grub_term_poll_usb)
+ grub_term_poll_usb ();
+
+ FOR_ACTIVE_TERM_INPUTS(term)
+ {
+ if (term->getkeystatus)
+ status |= term->getkeystatus (term);
+ }
+
+ return status;
+}
+
+static grub_err_t
+grub_cmd_keystatus (grub_extcmd_context_t ctxt,
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ struct grub_arg_list *state = ctxt->state;
+ int expect_mods = 0;
+ int mods;
+
+ if (state[0].set)
+ expect_mods |= (GRUB_TERM_STATUS_LSHIFT | GRUB_TERM_STATUS_RSHIFT);
+ if (state[1].set)
+ expect_mods |= (GRUB_TERM_STATUS_LCTRL | GRUB_TERM_STATUS_RCTRL);
+ if (state[2].set)
+ expect_mods |= (GRUB_TERM_STATUS_LALT | GRUB_TERM_STATUS_RALT);
+
+ grub_dprintf ("keystatus", "expect_mods: %d\n", expect_mods);
+
+ /* Without arguments, just check whether getkeystatus is supported at
+ all. */
+ if (expect_mods == 0)
+ {
+ grub_term_input_t term;
+ int nterms = 0;
+
+ FOR_ACTIVE_TERM_INPUTS (term)
+ if (!term->getkeystatus)
+ return grub_error (GRUB_ERR_TEST_FAILURE, "false");
+ else
+ nterms++;
+ if (!nterms)
+ return grub_error (GRUB_ERR_TEST_FAILURE, "false");
+ return 0;
+ }
+
+ mods = grub_getkeystatus ();
+ grub_dprintf ("keystatus", "mods: %d\n", mods);
+ if (mods >= 0 && (mods & expect_mods) != 0)
+ return 0;
+ else
+ return grub_error (GRUB_ERR_TEST_FAILURE, "false");
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(keystatus)
+{
+ cmd = grub_register_extcmd ("keystatus", grub_cmd_keystatus, 0,
+ N_("[--shift] [--ctrl] [--alt]"),
+ N_("Check key modifier status."),
+ options);
+}
+
+GRUB_MOD_FINI(keystatus)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c
new file mode 100644
index 0000000..e68b331
--- /dev/null
+++ b/grub-core/commands/legacycfg.c
@@ -0,0 +1,820 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000, 2001, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/command.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/file.h>
+#include <grub/normal.h>
+#include <grub/script_sh.h>
+#include <grub/i18n.h>
+#include <grub/term.h>
+#include <grub/legacy_parse.h>
+#include <grub/crypto.h>
+#include <grub/auth.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+legacy_file (const char *filename)
+{
+ grub_file_t file;
+ char *entryname = NULL, *entrysrc = NULL;
+ grub_menu_t menu;
+ char *suffix = grub_strdup ("");
+
+ auto grub_err_t getline (char **line, int cont);
+ grub_err_t getline (char **line,
+ int cont __attribute__ ((unused)))
+ {
+ *line = 0;
+ return GRUB_ERR_NONE;
+ }
+
+ if (!suffix)
+ return grub_errno;
+
+ file = grub_file_open (filename);
+ if (! file)
+ return grub_errno;
+
+ menu = grub_env_get_menu ();
+ if (! menu)
+ {
+ menu = grub_zalloc (sizeof (*menu));
+ if (! menu)
+ return grub_errno;
+
+ grub_env_set_menu (menu);
+ }
+
+ while (1)
+ {
+ char *buf = grub_file_getline (file);
+ char *parsed = NULL;
+
+ if (!buf && grub_errno)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+
+ if (!buf)
+ break;
+
+ {
+ char *oldname = NULL;
+ char *newsuffix;
+ char *ptr;
+
+ for (ptr = buf; *ptr && grub_isspace (*ptr); ptr++);
+
+ oldname = entryname;
+ parsed = grub_legacy_parse (ptr, &entryname, &newsuffix);
+ grub_free (buf);
+ buf = NULL;
+ if (newsuffix)
+ {
+ char *t;
+
+ t = suffix;
+ suffix = grub_realloc (suffix, grub_strlen (suffix)
+ + grub_strlen (newsuffix) + 1);
+ if (!suffix)
+ {
+ grub_free (t);
+ grub_free (entrysrc);
+ grub_free (parsed);
+ grub_free (newsuffix);
+ grub_free (suffix);
+ return grub_errno;
+ }
+ grub_memcpy (suffix + grub_strlen (suffix), newsuffix,
+ grub_strlen (newsuffix) + 1);
+ grub_free (newsuffix);
+ newsuffix = NULL;
+ }
+ if (oldname != entryname && oldname)
+ {
+ const char **args = grub_malloc (sizeof (args[0]));
+ if (!args)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+ args[0] = oldname;
+ grub_normal_add_menu_entry (1, args, NULL, NULL, NULL, NULL,
+ entrysrc, 0);
+ grub_free (args);
+ entrysrc[0] = 0;
+ grub_free (oldname);
+ }
+ }
+
+ if (parsed && !entryname)
+ {
+ grub_normal_parse_line (parsed, getline);
+ grub_print_error ();
+ grub_free (parsed);
+ parsed = NULL;
+ }
+ else if (parsed)
+ {
+ if (!entrysrc)
+ entrysrc = parsed;
+ else
+ {
+ char *t;
+
+ t = entrysrc;
+ entrysrc = grub_realloc (entrysrc, grub_strlen (entrysrc)
+ + grub_strlen (parsed) + 1);
+ if (!entrysrc)
+ {
+ grub_free (t);
+ grub_free (parsed);
+ grub_free (suffix);
+ return grub_errno;
+ }
+ grub_memcpy (entrysrc + grub_strlen (entrysrc), parsed,
+ grub_strlen (parsed) + 1);
+ grub_free (parsed);
+ parsed = NULL;
+ }
+ }
+ }
+ grub_file_close (file);
+
+ if (entryname)
+ {
+ const char **args = grub_malloc (sizeof (args[0]));
+ if (!args)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+ args[0] = entryname;
+ grub_normal_add_menu_entry (1, args, NULL, NULL, NULL, NULL, entrysrc, 0);
+ grub_free (args);
+ }
+
+ grub_normal_parse_line (suffix, getline);
+ grub_print_error ();
+ grub_free (suffix);
+ grub_free (entrysrc);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_legacy_source (struct grub_command *cmd,
+ int argc, char **args)
+{
+ int new_env, extractor;
+ grub_err_t ret;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ extractor = (cmd->name[0] == 'e');
+ new_env = (cmd->name[extractor ? (sizeof ("extract_legacy_entries_") - 1)
+ : (sizeof ("legacy_") - 1)] == 'c');
+
+ if (new_env)
+ grub_cls ();
+
+ if (new_env && !extractor)
+ grub_env_context_open ();
+ if (extractor)
+ grub_env_extractor_open (!new_env);
+
+ ret = legacy_file (args[0]);
+
+ if (new_env)
+ {
+ grub_menu_t menu;
+ menu = grub_env_get_menu ();
+ if (menu && menu->size)
+ grub_show_menu (menu, 1, 0);
+ if (!extractor)
+ grub_env_context_close ();
+ }
+ if (extractor)
+ grub_env_extractor_close (!new_env);
+
+ return ret;
+}
+
+static enum
+ {
+ GUESS_IT, LINUX, MULTIBOOT, KFREEBSD, KNETBSD, KOPENBSD
+ } kernel_type;
+
+static grub_err_t
+grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ int i;
+#ifdef TODO
+ int no_mem_option = 0;
+#endif
+ struct grub_command *cmd;
+ char **cutargs;
+ int cutargc;
+
+ for (i = 0; i < 2; i++)
+ {
+ /* FIXME: really support this. */
+ if (argc >= 1 && grub_strcmp (args[0], "--no-mem-option") == 0)
+ {
+#ifdef TODO
+ no_mem_option = 1;
+#endif
+ argc--;
+ args++;
+ continue;
+ }
+
+ /* linux16 handles both zImages and bzImages. */
+ if (argc >= 1 && (grub_strcmp (args[0], "--type=linux") == 0
+ || grub_strcmp (args[0], "--type=biglinux") == 0))
+ {
+ kernel_type = LINUX;
+ argc--;
+ args++;
+ continue;
+ }
+
+ if (argc >= 1 && grub_strcmp (args[0], "--type=multiboot") == 0)
+ {
+ kernel_type = MULTIBOOT;
+ argc--;
+ args++;
+ continue;
+ }
+
+ if (argc >= 1 && grub_strcmp (args[0], "--type=freebsd") == 0)
+ {
+ kernel_type = KFREEBSD;
+ argc--;
+ args++;
+ continue;
+ }
+
+ if (argc >= 1 && grub_strcmp (args[0], "--type=openbsd") == 0)
+ {
+ kernel_type = KOPENBSD;
+ argc--;
+ args++;
+ continue;
+ }
+
+ if (argc >= 1 && grub_strcmp (args[0], "--type=netbsd") == 0)
+ {
+ kernel_type = KNETBSD;
+ argc--;
+ args++;
+ continue;
+ }
+ }
+
+ if (argc < 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "filename required");
+
+ cutargs = grub_malloc (sizeof (cutargs[0]) * (argc - 1));
+ cutargc = argc - 1;
+ grub_memcpy (cutargs + 1, args + 2, sizeof (cutargs[0]) * (argc - 2));
+ cutargs[0] = args[0];
+
+ do
+ {
+ /* First try Linux. */
+ if (kernel_type == GUESS_IT || kernel_type == LINUX)
+ {
+ cmd = grub_command_find ("linux16");
+ if (cmd)
+ {
+ if (!(cmd->func) (cmd, cutargc, cutargs))
+ {
+ kernel_type = LINUX;
+ return GRUB_ERR_NONE;
+ }
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ /* Then multiboot. */
+ if (kernel_type == GUESS_IT || kernel_type == MULTIBOOT)
+ {
+ cmd = grub_command_find ("multiboot");
+ if (cmd)
+ {
+ if (!(cmd->func) (cmd, argc, args))
+ {
+ kernel_type = MULTIBOOT;
+ return GRUB_ERR_NONE;
+ }
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ {
+ int bsd_device = -1;
+ int bsd_slice = -1;
+ int bsd_part = -1;
+ {
+ grub_device_t dev;
+ char *hdbiasstr;
+ int hdbias = 0;
+ hdbiasstr = grub_env_get ("legacy_hdbias");
+ if (hdbiasstr)
+ {
+ hdbias = grub_strtoul (hdbiasstr, 0, 0);
+ grub_errno = GRUB_ERR_NONE;
+ }
+ dev = grub_device_open (0);
+ if (dev && dev->disk
+ && dev->disk->dev->id == GRUB_DISK_DEVICE_BIOSDISK_ID
+ && dev->disk->dev->id >= 0x80 && dev->disk->dev->id <= 0x90)
+ {
+ struct grub_partition *part = dev->disk->partition;
+ bsd_device = dev->disk->id - 0x80 - hdbias;
+ if (part && (grub_strcmp (part->partmap->name, "netbsd") == 0
+ || grub_strcmp (part->partmap->name, "openbsd") == 0
+ || grub_strcmp (part->partmap->name, "bsd") == 0))
+ {
+ bsd_part = part->number;
+ part = part->parent;
+ }
+ if (part && grub_strcmp (part->partmap->name, "msdos") == 0)
+ bsd_slice = part->number;
+ }
+ }
+
+ /* k*BSD didn't really work well with grub-legacy. */
+ if (kernel_type == GUESS_IT || kernel_type == KFREEBSD)
+ {
+ char buf[sizeof("adXXXXXXXXXXXXsXXXXXXXXXXXXYYY")];
+ if (bsd_device != -1)
+ {
+ if (bsd_slice != -1 && bsd_part != -1)
+ grub_snprintf(buf, sizeof(buf), "ad%ds%d%c", bsd_device,
+ bsd_slice, 'a' + bsd_part);
+ else if (bsd_slice != -1)
+ grub_snprintf(buf, sizeof(buf), "ad%ds%d", bsd_device,
+ bsd_slice);
+ else
+ grub_snprintf(buf, sizeof(buf), "ad%d", bsd_device);
+ grub_env_set ("kFreeBSD.vfs.root.mountfrom", buf);
+ }
+ else
+ grub_env_unset ("kFreeBSD.vfs.root.mountfrom");
+ cmd = grub_command_find ("kfreebsd");
+ if (cmd)
+ {
+ if (!(cmd->func) (cmd, cutargc, cutargs))
+ {
+ kernel_type = KFREEBSD;
+ return GRUB_ERR_NONE;
+ }
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+ {
+ char **bsdargs;
+ int bsdargc;
+ char bsddevname[sizeof ("wdXXXXXXXXXXXXY")];
+ if (bsd_device == -1)
+ {
+ bsdargs = cutargs;
+ bsdargc = cutargc;
+ }
+ else
+ {
+ bsdargc = cutargc + 2;
+ bsdargs = grub_malloc (sizeof (bsdargs[0]) * bsdargc);
+ grub_memcpy (bsdargs, args, argc * sizeof (bsdargs[0]));
+ bsdargs[argc] = "-r";
+ bsdargs[argc + 1] = bsddevname;
+ grub_snprintf (bsddevname, sizeof (bsddevname),
+ "wd%d%c", bsd_device,
+ bsd_part != -1 ? bsd_part + 'a' : 'c');
+ }
+ if (kernel_type == GUESS_IT || kernel_type == KNETBSD)
+ {
+ cmd = grub_command_find ("knetbsd");
+ if (cmd)
+ {
+ if (!(cmd->func) (cmd, bsdargc, bsdargs))
+ {
+ kernel_type = KNETBSD;
+ return GRUB_ERR_NONE;
+ }
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (kernel_type == GUESS_IT || kernel_type == KOPENBSD)
+ {
+ cmd = grub_command_find ("kopenbsd");
+ if (cmd)
+ {
+ if (!(cmd->func) (cmd, bsdargc, bsdargs))
+ {
+ kernel_type = KOPENBSD;
+ return GRUB_ERR_NONE;
+ }
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (bsdargs != cutargs)
+ grub_free (bsdargs);
+ }
+ }
+ }
+ while (0);
+
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't load file %s\n",
+ args[0]);
+}
+
+static grub_err_t
+grub_cmd_legacy_initrd (struct grub_command *mycmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct grub_command *cmd;
+
+ if (kernel_type == LINUX)
+ {
+ cmd = grub_command_find ("initrd16");
+ if (!cmd)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "command initrd16 not found");
+
+ return cmd->func (cmd, argc, args);
+ }
+ if (kernel_type == MULTIBOOT)
+ {
+ cmd = grub_command_find ("module");
+ if (!cmd)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "command module not found");
+
+ return cmd->func (cmd, argc, args);
+ }
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "no kernel with module support is loaded in legacy way");
+}
+
+static grub_err_t
+grub_cmd_legacy_initrdnounzip (struct grub_command *mycmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct grub_command *cmd;
+
+ if (kernel_type == LINUX)
+ {
+ cmd = grub_command_find ("initrd16");
+ if (!cmd)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "command initrd16 not found");
+
+ return cmd->func (cmd, argc, args);
+ }
+ if (kernel_type == MULTIBOOT)
+ {
+ char **newargs;
+ grub_err_t err;
+ newargs = grub_malloc ((argc + 1) * sizeof (newargs[0]));
+ if (!newargs)
+ return grub_errno;
+ grub_memcpy (newargs + 1, args, argc * sizeof (newargs[0]));
+ newargs[0] = "--nounzip";
+ cmd = grub_command_find ("module");
+ if (!cmd)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "command module not found");
+
+ err = cmd->func (cmd, argc + 1, newargs);
+ grub_free (newargs);
+ return err;
+ }
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "no kernel with module support is loaded in legacy way");
+}
+
+static grub_err_t
+check_password_deny (const char *user __attribute__ ((unused)),
+ const char *entered __attribute__ ((unused)),
+ void *password __attribute__ ((unused)))
+{
+ return GRUB_ACCESS_DENIED;
+}
+
+#define MD5_HASHLEN 16
+
+struct legacy_md5_password
+{
+ grub_uint8_t *salt;
+ int saltlen;
+ grub_uint8_t hash[MD5_HASHLEN];
+};
+
+static int
+check_password_md5_real (const char *entered,
+ struct legacy_md5_password *pw)
+{
+ int enteredlen = grub_strlen (entered);
+ unsigned char alt_result[MD5_HASHLEN];
+ unsigned char *digest;
+ grub_uint8_t ctx[GRUB_MD_MD5->contextsize];
+ int i;
+
+ GRUB_MD_MD5->init (ctx);
+ GRUB_MD_MD5->write (ctx, entered, enteredlen);
+ GRUB_MD_MD5->write (ctx, pw->salt + 3, pw->saltlen - 3);
+ GRUB_MD_MD5->write (ctx, entered, enteredlen);
+ digest = GRUB_MD_MD5->read (ctx);
+ GRUB_MD_MD5->final (ctx);
+ memcpy (alt_result, digest, MD5_HASHLEN);
+
+ GRUB_MD_MD5->init (ctx);
+ GRUB_MD_MD5->write (ctx, entered, enteredlen);
+ GRUB_MD_MD5->write (ctx, pw->salt, pw->saltlen); /* include the $1$ header */
+ for (i = enteredlen; i > 16; i -= 16)
+ GRUB_MD_MD5->write (ctx, alt_result, 16);
+ GRUB_MD_MD5->write (ctx, alt_result, i);
+
+ for (i = enteredlen; i > 0; i >>= 1)
+ GRUB_MD_MD5->write (ctx, entered + ((i & 1) ? enteredlen : 0), 1);
+ digest = GRUB_MD_MD5->read (ctx);
+ GRUB_MD_MD5->final (ctx);
+
+ for (i = 0; i < 1000; i++)
+ {
+ memcpy (alt_result, digest, 16);
+
+ GRUB_MD_MD5->init (ctx);
+ if ((i & 1) != 0)
+ GRUB_MD_MD5->write (ctx, entered, enteredlen);
+ else
+ GRUB_MD_MD5->write (ctx, alt_result, 16);
+
+ if (i % 3 != 0)
+ GRUB_MD_MD5->write (ctx, pw->salt + 3, pw->saltlen - 3);
+
+ if (i % 7 != 0)
+ GRUB_MD_MD5->write (ctx, entered, enteredlen);
+
+ if ((i & 1) != 0)
+ GRUB_MD_MD5->write (ctx, alt_result, 16);
+ else
+ GRUB_MD_MD5->write (ctx, entered, enteredlen);
+ digest = GRUB_MD_MD5->read (ctx);
+ GRUB_MD_MD5->final (ctx);
+ }
+
+ return (grub_crypto_memcmp (digest, pw->hash, MD5_HASHLEN) == 0);
+}
+
+static grub_err_t
+check_password_md5 (const char *user,
+ const char *entered,
+ void *password)
+{
+ if (!check_password_md5_real (entered, password))
+ return GRUB_ACCESS_DENIED;
+
+ grub_auth_authenticate (user);
+
+ return GRUB_ERR_NONE;
+}
+
+static inline int
+ib64t (char c)
+{
+ if (c == '.')
+ return 0;
+ if (c == '/')
+ return 1;
+ if (c >= '0' && c <= '9')
+ return c - '0' + 2;
+ if (c >= 'A' && c <= 'Z')
+ return c - 'A' + 12;
+ if (c >= 'a' && c <= 'z')
+ return c - 'a' + 38;
+ return -1;
+}
+
+static struct legacy_md5_password *
+parse_legacy_md5 (int argc, char **args)
+{
+ const char *salt, *saltend;
+ struct legacy_md5_password *pw = NULL;
+ int i;
+ const char *p;
+
+ if (grub_memcmp (args[0], "--md5", sizeof ("--md5")) != 0)
+ goto fail;
+ if (argc == 1)
+ goto fail;
+ if (grub_strlen(args[1]) <= 3)
+ goto fail;
+ salt = args[1];
+ saltend = grub_strchr (salt + 3, '$');
+ if (!saltend)
+ goto fail;
+ pw = grub_malloc (sizeof (*pw));
+ if (!pw)
+ goto fail;
+
+ p = saltend + 1;
+ for (i = 0; i < 5; i++)
+ {
+ int n;
+ grub_uint32_t w = 0;
+
+ for (n = 0; n < 4; n++)
+ {
+ int ww = ib64t(*p++);
+ if (ww == -1)
+ goto fail;
+ w |= ww << (n * 6);
+ }
+ pw->hash[i == 4 ? 5 : 12+i] = w & 0xff;
+ pw->hash[6+i] = (w >> 8) & 0xff;
+ pw->hash[i] = (w >> 16) & 0xff;
+ }
+ {
+ int n;
+ grub_uint32_t w = 0;
+ for (n = 0; n < 2; n++)
+ {
+ int ww = ib64t(*p++);
+ if (ww == -1)
+ goto fail;
+ w |= ww << (6 * n);
+ }
+ if (w >= 0x100)
+ goto fail;
+ pw->hash[11] = w;
+ }
+
+ pw->saltlen = saltend - salt;
+ pw->salt = (grub_uint8_t *) grub_strndup (salt, pw->saltlen);
+ if (!pw->salt)
+ goto fail;
+
+ return pw;
+
+ fail:
+ grub_free (pw);
+ return NULL;
+}
+
+static grub_err_t
+grub_cmd_legacy_password (struct grub_command *mycmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct legacy_md5_password *pw = NULL;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "arguments expected");
+ if (args[0][0] != '-' || args[0][1] != '-')
+ return grub_normal_set_password ("legacy", args[0]);
+
+ pw = parse_legacy_md5 (argc, args);
+
+ if (pw)
+ return grub_auth_register_authentication ("legacy", check_password_md5, pw);
+ else
+ /* This is to imitate minor difference between grub-legacy in GRUB2.
+ If 2 password commands are executed in a row and second one fails
+ on GRUB2 the password of first one is used, whereas in grub-legacy
+ authenthication is denied. In case of no password command was executed
+ early both versions deny any access. */
+ return grub_auth_register_authentication ("legacy", check_password_deny,
+ NULL);
+}
+
+static grub_err_t
+grub_cmd_legacy_check_password (struct grub_command *mycmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct legacy_md5_password *pw = NULL;
+ char entered[GRUB_AUTH_MAX_PASSLEN];
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "arguments expected");
+ grub_printf ("Enter password:");
+ if (!grub_password_get (entered, GRUB_AUTH_MAX_PASSLEN))
+ return GRUB_ACCESS_DENIED;
+
+ if (args[0][0] != '-' || args[0][1] != '-')
+ {
+ char correct[GRUB_AUTH_MAX_PASSLEN];
+
+ grub_memset (correct, 0, sizeof (correct));
+ grub_strncpy (correct, args[0], sizeof (correct));
+
+ if (grub_crypto_memcmp (entered, correct, GRUB_AUTH_MAX_PASSLEN) != 0)
+ return GRUB_ACCESS_DENIED;
+ return GRUB_ERR_NONE;
+ }
+
+ pw = parse_legacy_md5 (argc, args);
+
+ if (!pw)
+ return GRUB_ACCESS_DENIED;
+
+ if (!check_password_md5_real (entered, pw))
+ return GRUB_ACCESS_DENIED;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd_source, cmd_configfile;
+static grub_command_t cmd_source_extract, cmd_configfile_extract;
+static grub_command_t cmd_kernel, cmd_initrd, cmd_initrdnounzip;
+static grub_command_t cmd_password, cmd_check_password;
+
+GRUB_MOD_INIT(legacycfg)
+{
+ cmd_source
+ = grub_register_command ("legacy_source",
+ grub_cmd_legacy_source,
+ N_("FILE"),
+ N_("Parse legacy config in same context"));
+ cmd_configfile
+ = grub_register_command ("legacy_configfile",
+ grub_cmd_legacy_source,
+ N_("FILE"),
+ N_("Parse legacy config in new context"));
+ cmd_source_extract
+ = grub_register_command ("extract_legacy_entries_source",
+ grub_cmd_legacy_source,
+ N_("FILE"),
+ N_("Parse legacy config in same context taking only menu entries"));
+ cmd_configfile_extract
+ = grub_register_command ("extract_legacy_entries_configfile",
+ grub_cmd_legacy_source,
+ N_("FILE"),
+ N_("Parse legacy config in new context taking only menu entries"));
+
+ cmd_kernel = grub_register_command ("legacy_kernel",
+ grub_cmd_legacy_kernel,
+ N_("[--no-mem-option] [--type=TYPE] FILE [ARG ...]"),
+ N_("Simulate grub-legacy kernel command"));
+
+ cmd_initrd = grub_register_command ("legacy_initrd",
+ grub_cmd_legacy_initrd,
+ N_("FILE [ARG ...]"),
+ N_("Simulate grub-legacy initrd command"));
+ cmd_initrdnounzip = grub_register_command ("legacy_initrd_nounzip",
+ grub_cmd_legacy_initrdnounzip,
+ N_("FILE [ARG ...]"),
+ N_("Simulate grub-legacy modulenounzip command"));
+
+ cmd_password = grub_register_command ("legacy_password",
+ grub_cmd_legacy_password,
+ N_("[--md5] PASSWD [FILE]"),
+ N_("Simulate grub-legacy password command"));
+
+ cmd_check_password = grub_register_command ("legacy_check_password",
+ grub_cmd_legacy_check_password,
+ N_("[--md5] PASSWD [FILE]"),
+ N_("Simulate grub-legacy password command in menuentry mode"));
+
+}
+
+GRUB_MOD_FINI(legacycfg)
+{
+ grub_unregister_command (cmd_source);
+ grub_unregister_command (cmd_configfile);
+ grub_unregister_command (cmd_source_extract);
+ grub_unregister_command (cmd_configfile_extract);
+
+ grub_unregister_command (cmd_kernel);
+ grub_unregister_command (cmd_initrd);
+ grub_unregister_command (cmd_initrdnounzip);
+
+ grub_unregister_command (cmd_password);
+ grub_unregister_command (cmd_check_password);
+}
diff --git a/grub-core/commands/loadenv.c b/grub-core/commands/loadenv.c
new file mode 100644
index 0000000..5d53a8e
--- /dev/null
+++ b/grub-core/commands/loadenv.c
@@ -0,0 +1,399 @@
+/* loadenv.c - command to load/save environment variable. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/partition.h>
+#include <grub/lib/envblk.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_file_t
+open_envblk_file (char *filename)
+{
+ grub_file_t file;
+
+ if (! filename)
+ {
+ char *prefix;
+
+ prefix = grub_env_get ("prefix");
+ if (prefix)
+ {
+ int len;
+
+ len = grub_strlen (prefix);
+ filename = grub_malloc (len + 1 + sizeof (GRUB_ENVBLK_DEFCFG));
+ if (! filename)
+ return 0;
+
+ grub_strcpy (filename, prefix);
+ filename[len] = '/';
+ grub_strcpy (filename + len + 1, GRUB_ENVBLK_DEFCFG);
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (filename);
+ grub_free (filename);
+ return file;
+ }
+ else
+ {
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "prefix is not found");
+ return 0;
+ }
+ }
+
+ grub_file_filter_disable_compression ();
+ return grub_file_open (filename);
+}
+
+static grub_envblk_t
+read_envblk_file (grub_file_t file)
+{
+ grub_off_t offset = 0;
+ char *buf;
+ grub_size_t size = grub_file_size (file);
+ grub_envblk_t envblk;
+
+ buf = grub_malloc (size);
+ if (! buf)
+ return 0;
+
+ while (size > 0)
+ {
+ grub_ssize_t ret;
+
+ ret = grub_file_read (file, buf + offset, size);
+ if (ret <= 0)
+ {
+ if (grub_errno == GRUB_ERR_NONE)
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "cannot read");
+ grub_free (buf);
+ return 0;
+ }
+
+ size -= ret;
+ offset += ret;
+ }
+
+ envblk = grub_envblk_open (buf, offset);
+ if (! envblk)
+ {
+ grub_free (buf);
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "invalid environment block");
+ return 0;
+ }
+
+ return envblk;
+}
+
+static grub_err_t
+grub_cmd_load_env (grub_extcmd_context_t ctxt,
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ struct grub_arg_list *state = ctxt->state;
+ grub_file_t file;
+ grub_envblk_t envblk;
+
+ auto int set_var (const char *name, const char *value);
+ int set_var (const char *name, const char *value)
+ {
+ grub_env_set (name, value);
+ return 0;
+ }
+
+ file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
+ if (! file)
+ return grub_errno;
+
+ envblk = read_envblk_file (file);
+ if (! envblk)
+ goto fail;
+
+ grub_envblk_iterate (envblk, set_var);
+ grub_envblk_close (envblk);
+
+ fail:
+ grub_file_close (file);
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_list_env (grub_extcmd_context_t ctxt,
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ struct grub_arg_list *state = ctxt->state;
+ grub_file_t file;
+ grub_envblk_t envblk;
+
+ /* Print all variables in current context. */
+ auto int print_var (const char *name, const char *value);
+ int print_var (const char *name, const char *value)
+ {
+ grub_printf ("%s=%s\n", name, value);
+ return 0;
+ }
+
+ file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
+ if (! file)
+ return grub_errno;
+
+ envblk = read_envblk_file (file);
+ if (! envblk)
+ goto fail;
+
+ grub_envblk_iterate (envblk, print_var);
+ grub_envblk_close (envblk);
+
+ fail:
+ grub_file_close (file);
+ return grub_errno;
+}
+
+/* Used to maintain a variable length of blocklists internally. */
+struct blocklist
+{
+ grub_disk_addr_t sector;
+ unsigned offset;
+ unsigned length;
+ struct blocklist *next;
+};
+
+static void
+free_blocklists (struct blocklist *p)
+{
+ struct blocklist *q;
+
+ for (; p; p = q)
+ {
+ q = p->next;
+ grub_free (p);
+ }
+}
+
+static grub_err_t
+check_blocklists (grub_envblk_t envblk, struct blocklist *blocklists,
+ grub_file_t file)
+{
+ grub_size_t total_length;
+ grub_size_t index;
+ grub_disk_t disk;
+ grub_disk_addr_t part_start;
+ struct blocklist *p;
+ char *buf;
+
+ /* Sanity checks. */
+ total_length = 0;
+ for (p = blocklists; p; p = p->next)
+ {
+ struct blocklist *q;
+ for (q = p->next; q; q = q->next)
+ {
+ /* Check if any pair of blocks overlap. */
+ if (p->sector == q->sector)
+ {
+ /* This might be actually valid, but it is unbelievable that
+ any filesystem makes such a silly allocation. */
+ return grub_error (GRUB_ERR_BAD_FS, "malformed file");
+ }
+ }
+
+ total_length += p->length;
+ }
+
+ if (total_length != grub_file_size (file))
+ {
+ /* Maybe sparse, unallocated sectors. No way in GRUB. */
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "sparse file not allowed");
+ }
+
+ /* One more sanity check. Re-read all sectors by blocklists, and compare
+ those with the data read via a file. */
+ disk = file->device->disk;
+
+ part_start = grub_partition_get_start (disk->partition);
+
+ buf = grub_envblk_buffer (envblk);
+ for (p = blocklists, index = 0; p; index += p->length, p = p->next)
+ {
+ char blockbuf[GRUB_DISK_SECTOR_SIZE];
+
+ if (grub_disk_read (disk, p->sector - part_start,
+ p->offset, p->length, blockbuf))
+ return grub_errno;
+
+ if (grub_memcmp (buf + index, blockbuf, p->length) != 0)
+ return grub_error (GRUB_ERR_FILE_READ_ERROR, "invalid blocklist");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static int
+write_blocklists (grub_envblk_t envblk, struct blocklist *blocklists,
+ grub_file_t file)
+{
+ char *buf;
+ grub_disk_t disk;
+ grub_disk_addr_t part_start;
+ struct blocklist *p;
+ grub_size_t index;
+
+ buf = grub_envblk_buffer (envblk);
+ disk = file->device->disk;
+ part_start = grub_partition_get_start (disk->partition);
+
+ index = 0;
+ for (p = blocklists; p; index += p->length, p = p->next)
+ {
+ if (grub_disk_write (disk, p->sector - part_start,
+ p->offset, p->length, buf + index))
+ return 0;
+ }
+
+ return 1;
+}
+
+static grub_err_t
+grub_cmd_save_env (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ grub_file_t file;
+ grub_envblk_t envblk;
+ struct blocklist *head = 0;
+ struct blocklist *tail = 0;
+
+ /* Store blocklists in a linked list. */
+ auto void NESTED_FUNC_ATTR read_hook (grub_disk_addr_t sector,
+ unsigned offset,
+ unsigned length);
+ void NESTED_FUNC_ATTR read_hook (grub_disk_addr_t sector,
+ unsigned offset, unsigned length)
+ {
+ struct blocklist *block;
+
+ if (offset + length > GRUB_DISK_SECTOR_SIZE)
+ /* Seemingly a bug. */
+ return;
+
+ block = grub_malloc (sizeof (*block));
+ if (! block)
+ return;
+
+ block->sector = sector;
+ block->offset = offset;
+ block->length = length;
+
+ /* Slightly complicated, because the list should be FIFO. */
+ block->next = 0;
+ if (tail)
+ tail->next = block;
+ tail = block;
+ if (! head)
+ head = block;
+ }
+
+ if (! argc)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no variable is specified");
+
+ file = open_envblk_file ((state[0].set) ? state[0].arg : 0);
+ if (! file)
+ return grub_errno;
+
+ if (! file->device->disk)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_BAD_DEVICE, "disk device required");
+ }
+
+ file->read_hook = read_hook;
+ envblk = read_envblk_file (file);
+ file->read_hook = 0;
+ if (! envblk)
+ goto fail;
+
+ if (check_blocklists (envblk, head, file))
+ goto fail;
+
+ while (argc)
+ {
+ char *value;
+
+ value = grub_env_get (args[0]);
+ if (value)
+ {
+ if (! grub_envblk_set (envblk, args[0], value))
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "environment block too small");
+ goto fail;
+ }
+ }
+
+ argc--;
+ args++;
+ }
+
+ write_blocklists (envblk, head, file);
+
+ fail:
+ if (envblk)
+ grub_envblk_close (envblk);
+ free_blocklists (head);
+ grub_file_close (file);
+ return grub_errno;
+}
+
+static grub_extcmd_t cmd_load, cmd_list, cmd_save;
+
+GRUB_MOD_INIT(loadenv)
+{
+ cmd_load =
+ grub_register_extcmd ("load_env", grub_cmd_load_env, 0, N_("[-f FILE]"),
+ N_("Load variables from environment block file."),
+ options);
+ cmd_list =
+ grub_register_extcmd ("list_env", grub_cmd_list_env, 0, N_("[-f FILE]"),
+ N_("List variables from environment block file."),
+ options);
+ cmd_save =
+ grub_register_extcmd ("save_env", grub_cmd_save_env, 0,
+ N_("[-f FILE] variable_name [...]"),
+ N_("Save variables to environment block file."),
+ options);
+}
+
+GRUB_MOD_FINI(loadenv)
+{
+ grub_unregister_extcmd (cmd_load);
+ grub_unregister_extcmd (cmd_list);
+ grub_unregister_extcmd (cmd_save);
+}
diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c
new file mode 100644
index 0000000..5fc648a
--- /dev/null
+++ b/grub-core/commands/ls.c
@@ -0,0 +1,282 @@
+/* ls.c - command to list files and devices */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/device.h>
+#include <grub/term.h>
+#include <grub/partition.h>
+#include <grub/file.h>
+#include <grub/normal.h>
+#include <grub/extcmd.h>
+#include <grub/datetime.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"long", 'l', 0, N_("Show a long list with more detailed information."), 0, 0},
+ {"human-readable", 'h', 0, N_("Print sizes in a human readable format."), 0, 0},
+ {"all", 'a', 0, N_("List all files."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static const char grub_human_sizes[] = {' ', 'K', 'M', 'G', 'T'};
+
+static grub_err_t
+grub_ls_list_devices (int longlist)
+{
+ auto int grub_ls_print_devices (const char *name);
+ int grub_ls_print_devices (const char *name)
+ {
+ if (longlist)
+ grub_normal_print_device_info (name);
+ else
+ grub_printf ("(%s) ", name);
+
+ return 0;
+ }
+
+ grub_device_iterate (grub_ls_print_devices);
+ grub_xputs ("\n");
+ grub_refresh ();
+
+ return 0;
+}
+
+static grub_err_t
+grub_ls_list_files (char *dirname, int longlist, int all, int human)
+{
+ char *device_name;
+ grub_fs_t fs;
+ const char *path;
+ grub_device_t dev;
+
+ auto int print_files (const char *filename,
+ const struct grub_dirhook_info *info);
+ auto int print_files_long (const char *filename,
+ const struct grub_dirhook_info *info);
+
+ int print_files (const char *filename, const struct grub_dirhook_info *info)
+ {
+ if (all || filename[0] != '.')
+ grub_printf ("%s%s ", filename, info->dir ? "/" : "");
+
+ return 0;
+ }
+
+ int print_files_long (const char *filename,
+ const struct grub_dirhook_info *info)
+ {
+ if ((! all) && (filename[0] == '.'))
+ return 0;
+
+ if (! info->dir)
+ {
+ grub_file_t file;
+ char *pathname;
+
+ if (dirname[grub_strlen (dirname) - 1] == '/')
+ pathname = grub_xasprintf ("%s%s", dirname, filename);
+ else
+ pathname = grub_xasprintf ("%s/%s", dirname, filename);
+
+ if (!pathname)
+ return 1;
+
+ /* XXX: For ext2fs symlinks are detected as files while they
+ should be reported as directories. */
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (pathname);
+ if (! file)
+ {
+ grub_errno = 0;
+ grub_free (pathname);
+ return 0;
+ }
+
+ if (! human)
+ grub_printf ("%-12llu", (unsigned long long) file->size);
+ else
+ {
+ grub_uint64_t fsize = file->size * 100ULL;
+ int fsz = file->size;
+ int units = 0;
+ char buf[20];
+
+ while (fsz / 1024)
+ {
+ fsize = (fsize + 512) / 1024;
+ fsz /= 1024;
+ units++;
+ }
+
+ if (units)
+ {
+ grub_uint32_t whole, fraction;
+
+ whole = grub_divmod64 (fsize, 100, &fraction);
+ grub_snprintf (buf, sizeof (buf),
+ "%u.%02u%c", whole, fraction,
+ grub_human_sizes[units]);
+ grub_printf ("%-12s", buf);
+ }
+ else
+ grub_printf ("%-12llu", (unsigned long long) file->size);
+
+ }
+ grub_file_close (file);
+ grub_free (pathname);
+ }
+ else
+ grub_printf ("%-12s", "DIR");
+
+ if (info->mtimeset)
+ {
+ struct grub_datetime datetime;
+ grub_unixtime2datetime (info->mtime, &datetime);
+ if (human)
+ grub_printf (" %d-%02d-%02d %02d:%02d:%02d %-11s ",
+ datetime.year, datetime.month, datetime.day,
+ datetime.hour, datetime.minute,
+ datetime.second,
+ grub_get_weekday_name (&datetime));
+ else
+ grub_printf (" %04d%02d%02d%02d%02d%02d ",
+ datetime.year, datetime.month,
+ datetime.day, datetime.hour,
+ datetime.minute, datetime.second);
+ }
+ grub_printf ("%s%s\n", filename, info->dir ? "/" : "");
+
+ return 0;
+ }
+
+ device_name = grub_file_get_device_name (dirname);
+ dev = grub_device_open (device_name);
+ if (! dev)
+ goto fail;
+
+ fs = grub_fs_probe (dev);
+ path = grub_strchr (dirname, ')');
+ if (! path)
+ path = dirname;
+ else
+ path++;
+
+ if (! path && ! device_name)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
+ goto fail;
+ }
+
+ if (! *path)
+ {
+ if (grub_errno == GRUB_ERR_UNKNOWN_FS)
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_normal_print_device_info (device_name);
+ }
+ else if (fs)
+ {
+ if (longlist)
+ (fs->dir) (dev, path, print_files_long);
+ else
+ (fs->dir) (dev, path, print_files);
+
+ if (grub_errno == GRUB_ERR_BAD_FILE_TYPE
+ && path[grub_strlen (path) - 1] != '/')
+ {
+ /* PATH might be a regular file. */
+ char *p;
+ grub_file_t file;
+ struct grub_dirhook_info info;
+ grub_errno = 0;
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (dirname);
+ if (! file)
+ goto fail;
+
+ grub_file_close (file);
+
+ p = grub_strrchr (dirname, '/') + 1;
+ dirname = grub_strndup (dirname, p - dirname);
+ if (! dirname)
+ goto fail;
+
+ all = 1;
+ grub_memset (&info, 0, sizeof (info));
+ if (longlist)
+ print_files_long (p, &info);
+ else
+ print_files (p, &info);
+
+ grub_free (dirname);
+ }
+
+ if (grub_errno == GRUB_ERR_NONE)
+ grub_xputs ("\n");
+
+ grub_refresh ();
+ }
+
+ fail:
+ if (dev)
+ grub_device_close (dev);
+
+ grub_free (device_name);
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_ls (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ int i;
+
+ if (argc == 0)
+ grub_ls_list_devices (state[0].set);
+ else
+ for (i = 0; i < argc; i++)
+ grub_ls_list_files (args[i], state[0].set, state[2].set,
+ state[1].set);
+
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(ls)
+{
+ cmd = grub_register_extcmd ("ls", grub_cmd_ls, 0,
+ N_("[-l|-h|-a] [FILE ...]"),
+ N_("List devices and files."), options);
+}
+
+GRUB_MOD_FINI(ls)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/lsacpi.c b/grub-core/commands/lsacpi.c
new file mode 100644
index 0000000..fd19e38
--- /dev/null
+++ b/grub-core/commands/lsacpi.c
@@ -0,0 +1,252 @@
+/* acpi.c - Display acpi tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/normal.h>
+#include <grub/acpi.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static void
+print_strn (grub_uint8_t *str, grub_size_t len)
+{
+ for (; *str && len; str++, len--)
+ grub_printf ("%c", *str);
+ for (len++; len; len--)
+ grub_printf (" ");
+}
+
+#define print_field(x) print_strn(x, sizeof (x))
+
+static void
+disp_acpi_table (struct grub_acpi_table_header *t)
+{
+ print_field (t->signature);
+ grub_printf ("%4" PRIuGRUB_UINT32_T "B rev=%u OEM=", t->length, t->revision);
+ print_field (t->oemid);
+ print_field (t->oemtable);
+ grub_printf ("OEMrev=%08" PRIxGRUB_UINT32_T " ", t->oemrev);
+ print_field (t->creator_id);
+ grub_printf (" %08" PRIxGRUB_UINT32_T "\n", t->creator_rev);
+}
+
+static void
+disp_madt_table (struct grub_acpi_madt *t)
+{
+ struct grub_acpi_madt_entry_header *d;
+ grub_uint32_t len;
+
+ disp_acpi_table (&t->hdr);
+ grub_printf ("Local APIC=%08" PRIxGRUB_UINT32_T " Flags=%08"
+ PRIxGRUB_UINT32_T "\n",
+ t->lapic_addr, t->flags);
+ len = t->hdr.length - sizeof (struct grub_acpi_madt);
+ d = t->entries;
+ for (;len > 0; len -= d->len, d = (void *) ((grub_uint8_t *) d + d->len))
+ {
+ grub_printf (" type=%x l=%u ", d->type, d->len);
+
+ switch (d->type)
+ {
+ case GRUB_ACPI_MADT_ENTRY_TYPE_INTERRUPT_OVERRIDE:
+ {
+ struct grub_acpi_madt_entry_interrupt_override *dt = (void *) d;
+ grub_printf ("Int Override bus=%x src=%x GSI=%08x Flags=%04x\n",
+ dt->bus, dt->source, dt->global_sys_interrupt,
+ dt->flags);
+ }
+ break;
+ case GRUB_ACPI_MADT_ENTRY_TYPE_SAPIC:
+ {
+ struct grub_acpi_madt_entry_sapic *dt = (void *) d;
+ grub_printf ("IOSAPIC Id=%02x GSI=%08x Addr=%016" PRIxGRUB_UINT64_T
+ "\n",
+ dt->id, dt->global_sys_interrupt_base,
+ dt->addr);
+ }
+ break;
+ case GRUB_ACPI_MADT_ENTRY_TYPE_LSAPIC:
+ {
+ struct grub_acpi_madt_entry_lsapic *dt = (void *) d;
+ grub_printf ("LSAPIC ProcId=%02x ID=%02x EID=%02x Flags=%x",
+ dt->cpu_id, dt->id, dt->eid, dt->flags);
+ if (dt->flags & GRUB_ACPI_MADT_ENTRY_SAPIC_FLAGS_ENABLED)
+ grub_printf (" Enabled\n");
+ else
+ grub_printf (" Disabled\n");
+ if (d->len > sizeof (struct grub_acpi_madt_entry_sapic))
+ grub_printf (" UID val=%08x, Str=%s\n", dt->cpu_uid,
+ dt->cpu_uid_str);
+ }
+ break;
+ case GRUB_ACPI_MADT_ENTRY_TYPE_PLATFORM_INT_SOURCE:
+ {
+ struct grub_acpi_madt_entry_platform_int_source *dt = (void *) d;
+ static const char * const platint_type[] =
+ {"Nul", "PMI", "INIT", "CPEI"};
+
+ grub_printf ("Platform INT flags=%04x type=%02x (%s)"
+ " ID=%02x EID=%02x\n",
+ dt->flags, dt->inttype,
+ (dt->inttype < ARRAY_SIZE (platint_type))
+ ? platint_type[dt->inttype] : "??", dt->cpu_id,
+ dt->cpu_eid);
+ grub_printf (" IOSAPIC Vec=%02x GSI=%08x source flags=%08x\n",
+ dt->sapic_vector, dt->global_sys_int, dt->src_flags);
+ }
+ break;
+ default:
+ grub_printf (" ??\n");
+ }
+ }
+}
+
+static void
+disp_acpi_xsdt_table (struct grub_acpi_table_header *t)
+{
+ grub_uint32_t len;
+ grub_uint64_t *desc;
+
+ disp_acpi_table (t);
+ len = t->length - sizeof (*t);
+ desc = (grub_uint64_t *) (t + 1);
+ for (; len > 0; desc++, len -= sizeof (*desc))
+ {
+ if (sizeof (grub_addr_t) == 4 && *desc >= (1ULL << 32))
+ {
+ grub_printf ("Unreachable table\n");
+ continue;
+ }
+ t = (struct grub_acpi_table_header *) (grub_addr_t) *desc;
+
+ if (t == NULL)
+ continue;
+
+ if (grub_memcmp (t->signature, GRUB_ACPI_MADT_SIGNATURE,
+ sizeof (t->signature)) == 0)
+ disp_madt_table ((struct grub_acpi_madt *) t);
+ else
+ disp_acpi_table (t);
+ }
+}
+
+static void
+disp_acpi_rsdt_table (struct grub_acpi_table_header *t)
+{
+ grub_uint32_t len;
+ grub_uint32_t *desc;
+
+ disp_acpi_table (t);
+ len = t->length - sizeof (*t);
+ desc = (grub_uint32_t *) (t + 1);
+ for (; len > 0; desc++, len -= sizeof (*desc))
+ {
+ t = (struct grub_acpi_table_header *) (grub_addr_t) *desc;
+
+ if (t == NULL)
+ continue;
+
+ if (grub_memcmp (t->signature, GRUB_ACPI_MADT_SIGNATURE,
+ sizeof (t->signature)) == 0)
+ disp_madt_table ((struct grub_acpi_madt *) t);
+ else
+ disp_acpi_table (t);
+ }
+}
+
+static void
+disp_acpi_rsdpv1 (struct grub_acpi_rsdp_v10 *rsdp)
+{
+ print_field (rsdp->signature);
+ grub_printf ("chksum:%02x, OEM-ID: ", rsdp->checksum);
+ print_field (rsdp->oemid);
+ grub_printf ("rev=%d\n", rsdp->revision);
+ grub_printf ("RSDT=%08" PRIxGRUB_UINT32_T "\n", rsdp->rsdt_addr);
+}
+
+static void
+disp_acpi_rsdpv2 (struct grub_acpi_rsdp_v20 *rsdp)
+{
+ disp_acpi_rsdpv1 (&rsdp->rsdpv1);
+ grub_printf ("len=%d XSDT=%016" PRIxGRUB_UINT64_T "\n", rsdp->length,
+ rsdp->xsdt_addr);
+}
+
+static const struct grub_arg_option options[] = {
+ {"v1", '1', 0, N_("Show v1 tables only."), 0, ARG_TYPE_NONE},
+ {"v2", '2', 0, N_("Show v2 and v3 tablesv only."), 0, ARG_TYPE_NONE}
+};
+
+static grub_err_t
+grub_cmd_lsacpi (struct grub_extcmd_context *ctxt,
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ if (!ctxt->state[1].set)
+ {
+ struct grub_acpi_rsdp_v10 *rsdp1 = grub_acpi_get_rsdpv1 ();
+ if (!rsdp1)
+ grub_printf ("No RSDPv1\n");
+ else
+ {
+ grub_printf ("RSDPv1 signature:");
+ disp_acpi_rsdpv1 (rsdp1);
+ disp_acpi_rsdt_table ((void *) (grub_addr_t) rsdp1->rsdt_addr);
+ }
+ }
+
+ if (!ctxt->state[0].set)
+ {
+ struct grub_acpi_rsdp_v20 *rsdp2 = grub_acpi_get_rsdpv2 ();
+ if (!rsdp2)
+ grub_printf ("No RSDPv2\n");
+ else
+ {
+ if (sizeof (grub_addr_t) == 4 && rsdp2->xsdt_addr >= (1ULL << 32))
+ grub_printf ("Unreachable RSDPv2\n");
+ else
+ {
+ grub_printf ("RSDPv2 signature:");
+ disp_acpi_rsdpv2 (rsdp2);
+ disp_acpi_xsdt_table ((void *) (grub_addr_t) rsdp2->xsdt_addr);
+ grub_printf ("\n");
+ }
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(lsapi)
+{
+ cmd = grub_register_extcmd ("lsacpi", grub_cmd_lsacpi, 0, N_("[-1|-2]"),
+ N_("Show ACPI information."), options);
+}
+
+GRUB_MOD_FINI(lsacpi)
+{
+ grub_unregister_extcmd (cmd);
+}
+
+
diff --git a/grub-core/commands/lsmmap.c b/grub-core/commands/lsmmap.c
new file mode 100644
index 0000000..44598f0
--- /dev/null
+++ b/grub-core/commands/lsmmap.c
@@ -0,0 +1,74 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/memory.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const char *names[] =
+ {
+ [GRUB_MEMORY_AVAILABLE] = "available",
+ [GRUB_MEMORY_RESERVED] = "reserved",
+ [GRUB_MEMORY_ACPI] = "ACPI reclamaible",
+ [GRUB_MEMORY_NVS] = "NVS",
+ [GRUB_MEMORY_BADRAM] = "BadRAM",
+ [GRUB_MEMORY_CODE] = "firmware code",
+ [GRUB_MEMORY_HOLE] = "hole"
+ };
+
+static grub_err_t
+grub_cmd_lsmmap (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+
+{
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ if (type < ARRAY_SIZE (names) && names[type])
+ grub_printf ("base_addr = 0x%llx, length = 0x%llx, %s\n",
+ (long long) addr, (long long) size, names[type]);
+ else
+ grub_printf ("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n",
+ (long long) addr, (long long) size, type);
+ return 0;
+ }
+#ifndef GRUB_MACHINE_EMU
+ grub_machine_mmap_iterate (hook);
+#endif
+
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(lsmmap)
+{
+ cmd = grub_register_command ("lsmmap", grub_cmd_lsmmap,
+ 0, N_("List memory map provided by firmware."));
+}
+
+GRUB_MOD_FINI(lsmmap)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/lspci.c b/grub-core/commands/lspci.c
new file mode 100644
index 0000000..03541df
--- /dev/null
+++ b/grub-core/commands/lspci.c
@@ -0,0 +1,236 @@
+/* lspci.c - List PCI devices. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/pci.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_pci_classname
+{
+ int class;
+ int subclass;
+ char *desc;
+};
+
+static const struct grub_pci_classname grub_pci_classes[] =
+ {
+ { 0, 0, "" },
+ { 1, 0, "SCSI Controller" },
+ { 1, 1, "IDE Controller" },
+ { 1, 2, "Floppy Controller" },
+ { 1, 3, "IPI Controller" },
+ { 1, 4, "RAID Controller" },
+ { 1, 6, "SATA Controller" },
+ { 1, 0x80, "Mass storage Controller" },
+ { 2, 0, "Ethernet Controller" },
+ { 2, 1, "Token Ring Controller" },
+ { 2, 2, "FDDI Controller" },
+ { 2, 3, "ATM Controller" },
+ { 2, 4, "ISDN Controller" },
+ { 2, 0x80, "Network controller" },
+ { 3, 0, "VGA Controller" },
+ { 3, 1, "XGA Controller" },
+ { 3, 2, "3D Controller" },
+ { 3, 0x80, "Display Controller" },
+ { 4, 0, "Multimedia Video Device" },
+ { 4, 1, "Multimedia Audio Device" },
+ { 4, 2, "Multimedia Telephony Device" },
+ { 4, 0x80, "Multimedia device" },
+ { 5, 0, "RAM Controller" },
+ { 5, 1, "Flash Memory Controller" },
+ { 5, 0x80, "Memory Controller" },
+ { 6, 0, "Host Bridge" },
+ { 6, 1, "ISA Bridge" },
+ { 6, 2, "EISA Bride" },
+ { 6, 3, "MCA Bridge" },
+ { 6, 4, "PCI-PCI Bridge" },
+ { 6, 5, "PCMCIA Bridge" },
+ { 6, 6, "NuBus Bridge" },
+ { 6, 7, "CardBus Bridge" },
+ { 6, 8, "Raceway Bridge" },
+ { 6, 0x80, "Unknown Bridge" },
+ { 7, 0x80, "Communication controller" },
+ { 8, 0x80, "System hardware" },
+ { 9, 0, "Keyboard Controller" },
+ { 9, 1, "Digitizer" },
+ { 9, 2, "Mouse Controller" },
+ { 9, 3, "Scanner Controller" },
+ { 9, 4, "Gameport Controller" },
+ { 9, 0x80, "Unknown Input Device" },
+ { 10, 0, "Generic Docking Station" },
+ { 10, 0x80, "Unknown Docking Station" },
+ { 11, 0, "80386 Processor" },
+ { 11, 1, "80486 Processor" },
+ { 11, 2, "Pentium Processor" },
+ { 11, 0x10, "Alpha Processor" },
+ { 11, 0x20, "PowerPC Processor" },
+ { 11, 0x30, "MIPS Processor" },
+ { 11, 0x40, "Co-Processor" },
+ { 11, 0x80, "Unknown Processor" },
+ { 12, 3, "USB Controller" },
+ { 12, 0x80, "Serial Bus Controller" },
+ { 13, 0x80, "Wireless Controller" },
+ { 14, 0, "I2O" },
+ { 15, 0, "IrDA Controller" },
+ { 15, 1, "Consumer IR" },
+ { 15, 0x10, "RF-Controller" },
+ { 15, 0x80, "Satellite Communication Controller" },
+ { 16, 0, "Network Decryption" },
+ { 16, 1, "Entertainment Decryption" },
+ { 16, 0x80, "Unknown Decryption Controller" },
+ { 17, 0, "Digital IO Module" },
+ { 17, 0x80, "Unknown Data Input System" },
+ { 0, 0, 0 },
+ };
+
+static const char *
+grub_pci_get_class (int class, int subclass)
+{
+ const struct grub_pci_classname *curr = grub_pci_classes;
+
+ while (curr->desc)
+ {
+ if (curr->class == class && curr->subclass == subclass)
+ return curr->desc;
+ curr++;
+ }
+
+ return 0;
+}
+
+static const struct grub_arg_option options[] =
+ {
+ {"iospace", 'i', 0, "show I/O spaces", 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static int iospace;
+
+static int NESTED_FUNC_ATTR
+grub_lspci_iter (grub_pci_device_t dev, grub_pci_id_t pciid)
+{
+ grub_uint32_t class;
+ const char *sclass;
+ grub_pci_address_t addr;
+ int reg;
+
+ grub_printf ("%02x:%02x.%x %04x:%04x", grub_pci_get_bus (dev),
+ grub_pci_get_device (dev), grub_pci_get_function (dev),
+ pciid & 0xFFFF, pciid >> 16);
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class = grub_pci_read (addr);
+
+ /* Lookup the class name, if there isn't a specific one,
+ retry with 0x80 to get the generic class name. */
+ sclass = grub_pci_get_class (class >> 24, (class >> 16) & 0xFF);
+ if (! sclass)
+ sclass = grub_pci_get_class (class >> 24, 0x80);
+ if (! sclass)
+ sclass = "";
+
+ grub_printf (" [%04x] %s", (class >> 16) & 0xffff, sclass);
+
+ grub_uint8_t pi = (class >> 8) & 0xff;
+ if (pi)
+ grub_printf (" [PI %02x]", pi);
+
+ grub_printf ("\n");
+
+ if (iospace)
+ {
+ reg = GRUB_PCI_REG_ADDRESSES;
+ while (reg < GRUB_PCI_REG_CIS_POINTER)
+ {
+ grub_uint64_t space;
+ addr = grub_pci_make_address (dev, reg);
+ space = grub_pci_read (addr);
+
+ reg += sizeof (grub_uint32_t);
+
+ if (space == 0)
+ continue;
+
+ switch (space & GRUB_PCI_ADDR_SPACE_MASK)
+ {
+ case GRUB_PCI_ADDR_SPACE_IO:
+ grub_printf ("\tIO space %d at 0x%llx\n",
+ (unsigned) ((reg - GRUB_PCI_REG_ADDRESSES)
+ / sizeof (grub_uint32_t)) - 1,
+ (unsigned long long)
+ (space & GRUB_PCI_ADDR_IO_MASK));
+ break;
+ case GRUB_PCI_ADDR_SPACE_MEMORY:
+ if ((space & GRUB_PCI_ADDR_MEM_TYPE_MASK)
+ == GRUB_PCI_ADDR_MEM_TYPE_64)
+ {
+ addr = grub_pci_make_address (dev, reg);
+ space |= ((grub_uint64_t) grub_pci_read (addr)) << 32;
+ reg += sizeof (grub_uint32_t);
+ grub_printf ("\t64-bit memory space %d at 0x%016llx [%s]\n",
+ (unsigned) ((reg - GRUB_PCI_REG_ADDRESSES)
+ / sizeof (grub_uint32_t)) - 2,
+ (unsigned long long)
+ (space & GRUB_PCI_ADDR_MEM_MASK),
+ space & GRUB_PCI_ADDR_MEM_PREFETCH
+ ? "prefetchable" : "non-prefetchable");
+
+ }
+ else
+ grub_printf ("\t32-bit memory space %d at 0x%016llx [%s]\n",
+ (unsigned) ((reg - GRUB_PCI_REG_ADDRESSES)
+ / sizeof (grub_uint32_t)) - 1,
+ (unsigned long long)
+ (space & GRUB_PCI_ADDR_MEM_MASK),
+ space & GRUB_PCI_ADDR_MEM_PREFETCH
+ ? "prefetchable" : "non-prefetchable");
+ break;
+ }
+ }
+ }
+
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_lspci (grub_extcmd_context_t ctxt,
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ iospace = ctxt->state[0].set;
+ grub_pci_iterate (grub_lspci_iter);
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(lspci)
+{
+ cmd = grub_register_extcmd ("lspci", grub_cmd_lspci, 0, "[-i]",
+ N_("List PCI devices."), options);
+}
+
+GRUB_MOD_FINI(lspci)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/memrw.c b/grub-core/commands/memrw.c
new file mode 100644
index 0000000..3b51189
--- /dev/null
+++ b/grub-core/commands/memrw.c
@@ -0,0 +1,151 @@
+/* memrw.c - command to read / write physical memory */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/env.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
+static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
+
+static const struct grub_arg_option options[] =
+ {
+ {0, 'v', 0, N_("Save read value into variable VARNAME."),
+ "VARNAME", ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+
+static grub_err_t
+grub_cmd_read (grub_extcmd_context_t ctxt, int argc, char **argv)
+{
+ grub_target_addr_t addr;
+ grub_uint32_t value = 0;
+ char buf[sizeof ("XXXXXXXX")];
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid number of arguments");
+
+ addr = grub_strtoul (argv[0], 0, 0);
+ switch (ctxt->extcmd->cmd->name[sizeof ("read_") - 1])
+ {
+ case 'd':
+ value = *((volatile grub_uint32_t *) addr);
+ break;
+
+ case 'w':
+ value = *((volatile grub_uint16_t *) addr);
+ break;
+
+ case 'b':
+ value = *((volatile grub_uint8_t *) addr);
+ break;
+ }
+
+ if (ctxt->state[0].set)
+ {
+ grub_snprintf (buf, sizeof (buf), "%x", value);
+ grub_env_set (ctxt->state[0].arg, buf);
+ }
+ else
+ grub_printf ("0x%x\n", value);
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_write (grub_command_t cmd, int argc, char **argv)
+{
+ grub_target_addr_t addr;
+ grub_uint32_t value;
+ grub_uint32_t mask = 0xffffffff;
+
+ if (argc != 2 && argc != 3)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid number of arguments");
+
+ addr = grub_strtoul (argv[0], 0, 0);
+ value = grub_strtoul (argv[1], 0, 0);
+ if (argc == 3)
+ mask = grub_strtoul (argv[2], 0, 0);
+ value &= mask;
+ switch (cmd->name[sizeof ("write_") - 1])
+ {
+ case 'd':
+ if (mask != 0xffffffff)
+ *((volatile grub_uint32_t *) addr)
+ = (*((volatile grub_uint32_t *) addr) & ~mask) | value;
+ else
+ *((volatile grub_uint32_t *) addr) = value;
+ break;
+
+ case 'w':
+ if ((mask & 0xffff) != 0xffff)
+ *((volatile grub_uint16_t *) addr)
+ = (*((volatile grub_uint16_t *) addr) & ~mask) | value;
+ else
+ *((volatile grub_uint16_t *) addr) = value;
+ break;
+
+ case 'b':
+ if ((mask & 0xff) != 0xff)
+ *((volatile grub_uint8_t *) addr)
+ = (*((volatile grub_uint8_t *) addr) & ~mask) | value;
+ else
+ *((volatile grub_uint8_t *) addr) = value;
+ break;
+ }
+
+ return 0;
+}
+
+GRUB_MOD_INIT(memrw)
+{
+ cmd_read_byte =
+ grub_register_extcmd ("read_byte", grub_cmd_read, 0,
+ N_("ADDR"), N_("Read byte from ADDR."), options);
+ cmd_read_word =
+ grub_register_extcmd ("read_word", grub_cmd_read, 0,
+ N_("ADDR"), N_("Read word from ADDR."), options);
+ cmd_read_dword =
+ grub_register_extcmd ("read_dword", grub_cmd_read, 0,
+ N_("ADDR"), N_("Read dword from ADDR."), options);
+ cmd_write_byte =
+ grub_register_command ("write_byte", grub_cmd_write,
+ N_("ADDR VALUE [MASK]"), N_("Write byte VALUE to ADDR."));
+ cmd_write_word =
+ grub_register_command ("write_word", grub_cmd_write,
+ N_("ADDR VALUE [MASK]"), N_("Write word VALUE to ADDR."));
+ cmd_write_dword =
+ grub_register_command ("write_dword", grub_cmd_write,
+ N_("ADDR VALUE [MASK]"), N_("Write dword VALUE to ADDR."));
+}
+
+GRUB_MOD_FINI(memrw)
+{
+ grub_unregister_extcmd (cmd_read_byte);
+ grub_unregister_extcmd (cmd_read_word);
+ grub_unregister_extcmd (cmd_read_dword);
+ grub_unregister_command (cmd_write_byte);
+ grub_unregister_command (cmd_write_word);
+ grub_unregister_command (cmd_write_dword);
+}
diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c
new file mode 100644
index 0000000..4849f8b
--- /dev/null
+++ b/grub-core/commands/menuentry.c
@@ -0,0 +1,307 @@
+/* menuentry.c - menuentry command */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/normal.h>
+
+static const struct grub_arg_option options[] =
+ {
+ {"class", 1, GRUB_ARG_OPTION_REPEATABLE,
+ N_("Menu entry type."), "STRING", ARG_TYPE_STRING},
+ {"users", 2, 0,
+ N_("Users allowed to boot this entry."), "USERNAME", ARG_TYPE_STRING},
+ {"hotkey", 3, 0,
+ N_("Keyboard key for this entry."), "KEY", ARG_TYPE_STRING},
+ {"source", 4, 0,
+ N_("Menu entry definition as a string."), "STRING", ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static struct
+{
+ char *name;
+ int key;
+} hotkey_aliases[] =
+ {
+ {"backspace", '\b'},
+ {"tab", '\t'},
+ {"delete", GRUB_TERM_KEY_DC},
+ {"insert", GRUB_TERM_KEY_INSERT},
+ {"f1", GRUB_TERM_KEY_F1},
+ {"f2", GRUB_TERM_KEY_F2},
+ {"f3", GRUB_TERM_KEY_F3},
+ {"f4", GRUB_TERM_KEY_F4},
+ {"f5", GRUB_TERM_KEY_F5},
+ {"f6", GRUB_TERM_KEY_F6},
+ {"f7", GRUB_TERM_KEY_F7},
+ {"f8", GRUB_TERM_KEY_F8},
+ {"f9", GRUB_TERM_KEY_F9},
+ {"f10", GRUB_TERM_KEY_F10},
+ {"f11", GRUB_TERM_KEY_F11},
+ {"f12", GRUB_TERM_KEY_F12},
+ };
+
+/* Add a menu entry to the current menu context (as given by the environment
+ variable data slot `menu'). As the configuration file is read, the script
+ parser calls this when a menu entry is to be created. */
+grub_err_t
+grub_normal_add_menu_entry (int argc, const char **args, char **classes,
+ const char *users, const char *hotkey,
+ const char *prefix, const char *sourcecode,
+ int submenu)
+{
+ int menu_hotkey = 0;
+ char **menu_args = NULL;
+ char *menu_users = NULL;
+ char *menu_title = NULL;
+ char *menu_sourcecode = NULL;
+ struct grub_menu_entry_class *menu_classes = NULL;
+
+ grub_menu_t menu;
+ grub_menu_entry_t *last;
+
+ menu = grub_env_get_menu ();
+ if (! menu)
+ return grub_error (GRUB_ERR_MENU, "no menu context");
+
+ last = &menu->entry_list;
+
+ menu_sourcecode = grub_xasprintf ("%s%s", prefix ?: "", sourcecode);
+ if (! menu_sourcecode)
+ return grub_errno;
+
+ if (classes && classes[0])
+ {
+ int i;
+ for (i = 0; classes[i]; i++); /* count # of menuentry classes */
+ menu_classes = grub_zalloc (sizeof (struct grub_menu_entry_class) * i);
+ if (! menu_classes)
+ goto fail;
+
+ for (i = 0; classes[i]; i++)
+ {
+ menu_classes[i].name = grub_strdup (classes[i]);
+ if (! menu_classes[i].name)
+ goto fail;
+ menu_classes[i].next = classes[i + 1] ? &menu_classes[i + 1] : NULL;
+ }
+ }
+
+ if (users)
+ {
+ menu_users = grub_strdup (users);
+ if (! menu_users)
+ goto fail;
+ }
+
+ if (hotkey)
+ {
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (hotkey_aliases); i++)
+ if (grub_strcmp (hotkey, hotkey_aliases[i].name) == 0)
+ {
+ menu_hotkey = hotkey_aliases[i].key;
+ break;
+ }
+ if (i == ARRAY_SIZE (hotkey_aliases))
+ menu_hotkey = hotkey[0];
+ }
+
+ if (! argc)
+ {
+ grub_error (GRUB_ERR_MENU, "menuentry is missing title");
+ goto fail;
+ }
+
+ menu_title = grub_strdup (args[0]);
+ if (! menu_title)
+ goto fail;
+
+ /* Save argc, args to pass as parameters to block arg later. */
+ menu_args = grub_malloc (sizeof (char*) * (argc + 1));
+ if (! menu_args)
+ goto fail;
+
+ {
+ int i;
+ for (i = 0; i < argc; i++)
+ {
+ menu_args[i] = grub_strdup (args[i]);
+ if (! menu_args[i])
+ goto fail;
+ }
+ menu_args[argc] = NULL;
+ }
+
+ /* Add the menu entry at the end of the list. */
+ while (*last)
+ last = &(*last)->next;
+
+ *last = grub_zalloc (sizeof (**last));
+ if (! *last)
+ goto fail;
+
+ (*last)->title = menu_title;
+ (*last)->hotkey = menu_hotkey;
+ (*last)->classes = menu_classes;
+ if (menu_users)
+ (*last)->restricted = 1;
+ (*last)->users = menu_users;
+ (*last)->argc = argc;
+ (*last)->args = menu_args;
+ (*last)->sourcecode = menu_sourcecode;
+ (*last)->submenu = submenu;
+
+ menu->size++;
+ return GRUB_ERR_NONE;
+
+ fail:
+
+ grub_free (menu_sourcecode);
+ {
+ int i;
+ for (i = 0; menu_classes && menu_classes[i].name; i++)
+ grub_free (menu_classes[i].name);
+ grub_free (menu_classes);
+ }
+
+ {
+ int i;
+ for (i = 0; menu_args && menu_args[i]; i++)
+ grub_free (menu_args[i]);
+ grub_free (menu_args);
+ }
+
+ grub_free (menu_users);
+ grub_free (menu_title);
+ return grub_errno;
+}
+
+static char *
+setparams_prefix (int argc, char **args)
+{
+ int i;
+ int j;
+ char *p;
+ char *result;
+ grub_size_t len = 10;
+
+ /* Count resulting string length */
+ for (i = 0; i < argc; i++)
+ {
+ len += 3; /* 3 = 1 space + 2 quotes */
+ p = args[i];
+ while (*p)
+ len += (*p++ == '\'' ? 3 : 1);
+ }
+
+ result = grub_malloc (len + 2);
+ if (! result)
+ return 0;
+
+ grub_strcpy (result, "setparams");
+ p = result + 9;
+
+ for (j = 0; j < argc; j++)
+ {
+ *p++ = ' ';
+ *p++ = '\'';
+ p = grub_strchrsub (p, args[j], '\'', "'\\''");
+ *p++ = '\'';
+ }
+ *p++ = '\n';
+ *p = '\0';
+ return result;
+}
+
+static grub_err_t
+grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ char ch;
+ char *src;
+ char *prefix;
+ unsigned len;
+ grub_err_t r;
+
+ if (! argc)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "missing arguments");
+
+ if (ctxt->state[3].set && ctxt->script)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "multiple menuentry definitions");
+
+ if (! ctxt->state[3].set && ! ctxt->script)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no menuentry definition");
+
+ if (! ctxt->script)
+ return grub_normal_add_menu_entry (argc, (const char **) args,
+ (ctxt->state[0].set ? ctxt->state[0].args
+ : NULL), ctxt->state[1].arg,
+ ctxt->state[2].arg, 0,
+ ctxt->state[3].arg,
+ ctxt->extcmd->cmd->name[0] == 's');
+
+ src = args[argc - 1];
+ args[argc - 1] = NULL;
+
+ len = grub_strlen(src);
+ ch = src[len - 1];
+ src[len - 1] = '\0';
+
+ prefix = setparams_prefix (argc - 1, args);
+ if (! prefix)
+ return grub_errno;
+
+ r = grub_normal_add_menu_entry (argc - 1, (const char **) args,
+ ctxt->state[0].args, ctxt->state[1].arg,
+ ctxt->state[2].arg, prefix, src + 1,
+ ctxt->extcmd->cmd->name[0] == 's');
+
+ src[len - 1] = ch;
+ args[argc - 1] = src;
+ grub_free (prefix);
+ return r;
+}
+
+static grub_extcmd_t cmd, cmd_sub;
+
+void
+grub_menu_init (void)
+{
+ cmd = grub_register_extcmd ("menuentry", grub_cmd_menuentry,
+ GRUB_COMMAND_FLAG_BLOCKS
+ | GRUB_COMMAND_FLAG_EXTRACTOR,
+ N_("BLOCK"), N_("Define a menuentry."), options);
+ cmd_sub = grub_register_extcmd ("submenu", grub_cmd_menuentry,
+ GRUB_COMMAND_FLAG_BLOCKS
+ | GRUB_COMMAND_FLAG_EXTRACTOR,
+ N_("BLOCK"), N_("Define a submenu."),
+ options);
+}
+
+void
+grub_menu_fini (void)
+{
+ grub_unregister_extcmd (cmd);
+ grub_unregister_extcmd (cmd_sub);
+}
diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c
new file mode 100644
index 0000000..c7d1ec4
--- /dev/null
+++ b/grub-core/commands/minicmd.c
@@ -0,0 +1,230 @@
+/* minicmd.c - commands for the rescue mode */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/term.h>
+#include <grub/loader.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* cat FILE */
+static grub_err_t
+grub_mini_cmd_cat (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file;
+ char buf[GRUB_DISK_SECTOR_SIZE];
+ grub_ssize_t size;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_errno;
+
+ while ((size = grub_file_read (file, buf, sizeof (buf))) > 0)
+ {
+ int i;
+
+ for (i = 0; i < size; i++)
+ {
+ unsigned char c = buf[i];
+
+ if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
+ grub_printf ("%c", c);
+ else
+ {
+ grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
+ grub_printf ("<%x>", (int) c);
+ grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
+ }
+ }
+ }
+
+ grub_xputs ("\n");
+ grub_refresh ();
+ grub_file_close (file);
+
+ return 0;
+}
+
+/* help */
+static grub_err_t
+grub_mini_cmd_help (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ grub_command_t p;
+
+ for (p = grub_command_list; p; p = p->next)
+ grub_printf ("%s (%d%c)\t%s\n", p->name,
+ p->prio & GRUB_PRIO_LIST_PRIO_MASK,
+ (p->prio & GRUB_PRIO_LIST_FLAG_ACTIVE) ? '+' : '-',
+ p->description);
+
+ return 0;
+}
+
+#if 0
+static void
+grub_rescue_cmd_info (void)
+{
+ extern void grub_disk_cache_get_performance (unsigned long *,
+ unsigned long *);
+ unsigned long hits, misses;
+
+ grub_disk_cache_get_performance (&hits, &misses);
+ grub_printf ("Disk cache: hits = %u, misses = %u ", hits, misses);
+ if (hits + misses)
+ {
+ unsigned long ratio = hits * 10000 / (hits + misses);
+ grub_printf ("(%u.%u%%)\n", ratio / 100, ratio % 100);
+ }
+ else
+ grub_printf ("(N/A)\n");
+}
+#endif
+
+/* dump ADDRESS [SIZE] */
+static grub_err_t
+grub_mini_cmd_dump (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_uint8_t *addr;
+ grub_size_t size = 4;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no address specified");
+
+ addr = (grub_uint8_t *) grub_strtoul (argv[0], 0, 0);
+ if (grub_errno)
+ return grub_errno;
+
+ if (argc > 1)
+ size = (grub_size_t) grub_strtoul (argv[1], 0, 0);
+
+ while (size--)
+ {
+ grub_printf ("%x%x ", *addr >> 4, *addr & 0xf);
+ addr++;
+ }
+
+ return 0;
+}
+
+/* rmmod MODULE */
+static grub_err_t
+grub_mini_cmd_rmmod (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_dl_t mod;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
+
+ mod = grub_dl_get (argv[0]);
+ if (! mod)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no such module");
+
+ if (grub_dl_unref (mod) <= 0)
+ grub_dl_unload (mod);
+
+ return 0;
+}
+
+/* lsmod */
+static grub_err_t
+grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ grub_dl_t mod;
+
+ grub_printf ("Name\tRef Count\tDependencies\n");
+ FOR_DL_MODULES (mod)
+ {
+ grub_dl_dep_t dep;
+
+ grub_printf ("%s\t%d\t\t", mod->name, mod->ref_count);
+ for (dep = mod->dep; dep; dep = dep->next)
+ {
+ if (dep != mod->dep)
+ grub_xputs (",");
+
+ grub_printf ("%s", dep->mod->name);
+ }
+ grub_xputs ("\n");
+ }
+
+ return 0;
+}
+
+/* exit */
+static grub_err_t
+grub_mini_cmd_exit (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ grub_exit ();
+ return 0;
+}
+
+static grub_command_t cmd_cat, cmd_help;
+static grub_command_t cmd_dump, cmd_rmmod, cmd_lsmod, cmd_exit;
+
+GRUB_MOD_INIT(minicmd)
+{
+ cmd_cat =
+ grub_register_command ("cat", grub_mini_cmd_cat,
+ N_("FILE"), N_("Show the contents of a file."));
+ cmd_help =
+ grub_register_command ("help", grub_mini_cmd_help,
+ 0, N_("Show this message."));
+ cmd_dump =
+ grub_register_command ("dump", grub_mini_cmd_dump,
+ N_("ADDR"), N_("Dump memory."));
+ cmd_rmmod =
+ grub_register_command ("rmmod", grub_mini_cmd_rmmod,
+ N_("MODULE"), N_("Remove a module."));
+ cmd_lsmod =
+ grub_register_command ("lsmod", grub_mini_cmd_lsmod,
+ 0, N_("Show loaded modules."));
+ cmd_exit =
+ grub_register_command ("exit", grub_mini_cmd_exit,
+ 0, N_("Exit from GRUB."));
+}
+
+GRUB_MOD_FINI(minicmd)
+{
+ grub_unregister_command (cmd_cat);
+ grub_unregister_command (cmd_help);
+ grub_unregister_command (cmd_dump);
+ grub_unregister_command (cmd_rmmod);
+ grub_unregister_command (cmd_lsmod);
+ grub_unregister_command (cmd_exit);
+}
diff --git a/grub-core/commands/mips/yeeloong/lsspd.c b/grub-core/commands/mips/yeeloong/lsspd.c
new file mode 100644
index 0000000..c1c5e2e
--- /dev/null
+++ b/grub-core/commands/mips/yeeloong/lsspd.c
@@ -0,0 +1,94 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/cs5536.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_lsspd (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_pci_device_t dev;
+ grub_port_t smbbase;
+ int i;
+ grub_err_t err;
+
+ if (!grub_cs5536_find (&dev))
+ {
+ grub_printf ("No CS5536 found\n");
+ return GRUB_ERR_NONE;
+ }
+ grub_printf ("CS5536 at %d:%d.%d\n", grub_pci_get_bus (dev),
+ grub_pci_get_device (dev), grub_pci_get_function (dev));
+
+ err = grub_cs5536_init_smbus (dev, 0x7fff, &smbbase);
+ if (err)
+ return err;
+
+ grub_printf ("SMB base = 0x%x\n", smbbase);
+
+ for (i = GRUB_SMB_RAM_START_ADDR;
+ i < GRUB_SMB_RAM_START_ADDR + GRUB_SMB_RAM_NUM_MAX; i++)
+ {
+ struct grub_smbus_spd spd;
+ grub_memset (&spd, 0, sizeof (spd));
+ grub_printf ("Device %d\n", i);
+ err = grub_cs5536_read_spd (smbbase, i, &spd);
+ if (err)
+ {
+ grub_print_error ();
+ continue;
+ }
+ grub_printf ("Written SPD bytes: %d B.\n", spd.written_size);
+ grub_printf ("Total flash size: %d B.\n", 1 << spd.log_total_flash_size);
+ if (spd.memory_type == GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2)
+ {
+ char str[sizeof (spd.ddr2.part_number) + 1];
+ grub_printf ("Memory type: DDR2.\n");
+ grub_memcpy (str, spd.ddr2.part_number,
+ sizeof (spd.ddr2.part_number));
+ str[sizeof (spd.ddr2.part_number)] = 0;
+ grub_printf ("Part no: %s.\n", str);
+ }
+ else
+ grub_printf ("Memory type: Unknown.\n");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(lsspd)
+{
+ cmd = grub_register_command ("lsspd", grub_cmd_lsspd, 0,
+ "Print Memory information.");
+}
+
+GRUB_MOD_FINI(lsspd)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/parttool.c b/grub-core/commands/parttool.c
new file mode 100644
index 0000000..a542861
--- /dev/null
+++ b/grub-core/commands/parttool.c
@@ -0,0 +1,333 @@
+/* parttool.c - common dispatcher and parser for partition operations */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/normal.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/parttool.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv2+");
+
+static struct grub_parttool *parts = 0;
+static int curhandle = 0;
+static grub_dl_t mymod;
+static char helpmsg[] =
+ "Perform COMMANDS on partition.\n"
+ "Use \"parttool PARTITION help\" for the list "
+ "of available commands.";
+
+int
+grub_parttool_register(const char *part_name,
+ const grub_parttool_function_t func,
+ const struct grub_parttool_argdesc *args)
+{
+ struct grub_parttool *cur;
+ int nargs = 0;
+
+ if (! parts)
+ grub_dl_ref (mymod);
+
+ cur = (struct grub_parttool *) grub_malloc (sizeof (struct grub_parttool));
+ cur->next = parts;
+ cur->name = grub_strdup (part_name);
+ cur->handle = curhandle++;
+ for (nargs = 0; args[nargs].name != 0; nargs++);
+ cur->nargs = nargs;
+ cur->args = (struct grub_parttool_argdesc *)
+ grub_malloc ((nargs + 1) * sizeof (struct grub_parttool_argdesc));
+ grub_memcpy (cur->args, args,
+ (nargs + 1) * sizeof (struct grub_parttool_argdesc));
+
+ cur->func = func;
+ parts = cur;
+ return cur->handle;
+}
+
+void
+grub_parttool_unregister (int handle)
+{
+ struct grub_parttool *prev = 0, *cur, *t;
+ for (cur = parts; cur; )
+ if (cur->handle == handle)
+ {
+ grub_free (cur->args);
+ grub_free (cur->name);
+ if (prev)
+ prev->next = cur->next;
+ else
+ parts = cur->next;
+ t = cur;
+ cur = cur->next;
+ grub_free (t);
+ }
+ else
+ {
+ prev = cur;
+ cur = cur->next;
+ }
+ if (! parts)
+ grub_dl_unref (mymod);
+}
+
+static grub_err_t
+grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_device_t dev;
+ struct grub_parttool *cur, *ptool;
+ int *parsed;
+ int i, j;
+ grub_err_t err = GRUB_ERR_NONE;
+
+ auto grub_err_t show_help (void);
+ grub_err_t show_help (void)
+ {
+ int found = 0;
+ for (cur = parts; cur; cur = cur->next)
+ if (grub_strcmp (dev->disk->partition->partmap->name, cur->name) == 0)
+ {
+ struct grub_parttool_argdesc *curarg;
+ found = 1;
+ for (curarg = cur->args; curarg->name; curarg++)
+ {
+ int spacing = 20;
+
+ spacing -= grub_strlen (curarg->name);
+ grub_printf ("%s", curarg->name);
+
+ switch (curarg->type)
+ {
+ case GRUB_PARTTOOL_ARG_BOOL:
+ grub_printf ("+/-");
+ spacing -= 3;
+ break;
+
+ case GRUB_PARTTOOL_ARG_VAL:
+ grub_printf ("=VAL");
+ spacing -= 4;
+ break;
+
+ case GRUB_PARTTOOL_ARG_END:
+ break;
+ }
+ while (spacing-- > 0)
+ grub_printf (" ");
+ grub_printf ("%s\n", curarg->desc);
+ }
+ }
+ if (! found)
+ grub_printf ("Sorry no parttool is available for %s\n",
+ dev->disk->partition->partmap->name);
+ return GRUB_ERR_NONE;
+ }
+
+ if (argc < 1)
+ {
+ grub_printf ("%s\n", helpmsg);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "too few arguments");
+ }
+
+ if (args[0][0] == '(' && args[0][grub_strlen (args[0]) - 1] == ')')
+ {
+ args[0][grub_strlen (args[0]) - 1] = 0;
+ dev = grub_device_open (args[0] + 1);
+ args[0][grub_strlen (args[0]) - 1] = ')';
+ }
+ else
+ dev = grub_device_open (args[0]);
+
+ if (! dev)
+ return grub_errno;
+
+ if (! dev->disk)
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "not a disk");
+ }
+
+ if (! dev->disk->partition)
+ {
+ grub_device_close (dev);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "not a partition");
+ }
+
+ /* Load modules. */
+ if (! grub_no_autoload)
+ {
+ const char *prefix;
+ prefix = grub_env_get ("prefix");
+ if (prefix)
+ {
+ char *filename;
+
+ filename = grub_xasprintf ("%s/parttool.lst", prefix);
+ if (filename)
+ {
+ grub_file_t file;
+
+ file = grub_file_open (filename);
+ if (file)
+ {
+ char *buf = 0;
+ for (;; grub_free(buf))
+ {
+ char *p, *name;
+
+ buf = grub_file_getline (file);
+
+ if (! buf)
+ break;
+
+ name = buf;
+
+ if (! grub_isgraph (name[0]))
+ continue;
+
+ p = grub_strchr (name, ':');
+ if (! p)
+ continue;
+
+ *p = '\0';
+ while (*++p == ' ')
+ ;
+
+ if (! grub_isgraph (*p))
+ continue;
+
+ if (grub_strcmp (name, dev->disk->partition->partmap->name)
+ != 0)
+ continue;
+
+ grub_dl_load (p);
+ }
+
+ grub_file_close (file);
+ }
+
+ grub_free (filename);
+ }
+ }
+ /* Ignore errors. */
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if (argc == 1)
+ return show_help ();
+
+ for (i = 1; i < argc; i++)
+ if (grub_strcmp (args[i], "help") == 0)
+ return show_help ();
+
+ parsed = (int *) grub_zalloc (argc * sizeof (int));
+
+ for (i = 1; i < argc; i++)
+ if (! parsed[i])
+ {
+ struct grub_parttool_argdesc *curarg;
+ struct grub_parttool_args *pargs;
+ for (cur = parts; cur; cur = cur->next)
+ if (grub_strcmp (dev->disk->partition->partmap->name, cur->name) == 0)
+ {
+ for (curarg = cur->args; curarg->name; curarg++)
+ if (grub_strncmp (curarg->name, args[i],
+ grub_strlen (curarg->name)) == 0
+ && ((curarg->type == GRUB_PARTTOOL_ARG_BOOL
+ && (args[i][grub_strlen (curarg->name)] == '+'
+ || args[i][grub_strlen (curarg->name)] == '-'
+ || args[i][grub_strlen (curarg->name)] == 0))
+ || (curarg->type == GRUB_PARTTOOL_ARG_VAL
+ && args[i][grub_strlen (curarg->name)] == '=')))
+
+ break;
+ if (curarg->name)
+ break;
+ }
+ if (! cur)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unrecognised argument %s",
+ args[i]);
+ ptool = cur;
+ pargs = (struct grub_parttool_args *)
+ grub_zalloc (ptool->nargs * sizeof (struct grub_parttool_args));
+ for (j = i; j < argc; j++)
+ if (! parsed[j])
+ {
+ for (curarg = ptool->args; curarg->name; curarg++)
+ if (grub_strncmp (curarg->name, args[j],
+ grub_strlen (curarg->name)) == 0
+ && ((curarg->type == GRUB_PARTTOOL_ARG_BOOL
+ && (args[j][grub_strlen (curarg->name)] == '+'
+ || args[j][grub_strlen (curarg->name)] == '-'
+ || args[j][grub_strlen (curarg->name)] == 0))
+ || (curarg->type == GRUB_PARTTOOL_ARG_VAL
+ && args[j][grub_strlen (curarg->name)] == '=')))
+ {
+ parsed[j] = 1;
+ pargs[curarg - ptool->args].set = 1;
+ switch (curarg->type)
+ {
+ case GRUB_PARTTOOL_ARG_BOOL:
+ pargs[curarg - ptool->args].bool
+ = (args[j][grub_strlen (curarg->name)] != '-');
+ break;
+
+ case GRUB_PARTTOOL_ARG_VAL:
+ pargs[curarg - ptool->args].str
+ = (args[j] + grub_strlen (curarg->name) + 1);
+ break;
+
+ case GRUB_PARTTOOL_ARG_END:
+ break;
+ }
+ }
+ }
+
+ err = ptool->func (dev, pargs);
+ grub_free (pargs);
+ if (err)
+ break;
+ }
+
+ grub_free (parsed);
+ grub_device_close (dev);
+ return err;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(parttool)
+{
+ mymod = mod;
+ cmd = grub_register_command ("parttool", grub_cmd_parttool,
+ N_("PARTITION COMMANDS"),
+ helpmsg);
+}
+
+GRUB_MOD_FINI(parttool)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/password.c b/grub-core/commands/password.c
new file mode 100644
index 0000000..8821607
--- /dev/null
+++ b/grub-core/commands/password.c
@@ -0,0 +1,93 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/auth.h>
+#include <grub/crypto.h>
+#include <grub/list.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+
+static grub_err_t
+check_password (const char *user, const char *entered,
+ void *password)
+{
+ if (grub_crypto_memcmp (entered, password, GRUB_AUTH_MAX_PASSLEN) != 0)
+ return GRUB_ACCESS_DENIED;
+
+ grub_auth_authenticate (user);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_normal_set_password (const char *user, const char *password)
+{
+ grub_err_t err;
+ char *pass;
+ int copylen;
+
+ pass = grub_zalloc (GRUB_AUTH_MAX_PASSLEN);
+ if (!pass)
+ return grub_errno;
+ copylen = grub_strlen (password);
+ if (copylen >= GRUB_AUTH_MAX_PASSLEN)
+ copylen = GRUB_AUTH_MAX_PASSLEN - 1;
+ grub_memcpy (pass, password, copylen);
+
+ err = grub_auth_register_authentication (user, check_password, pass);
+ if (err)
+ {
+ grub_free (pass);
+ return err;
+ }
+ grub_dl_ref (my_mod);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ if (argc != 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "two arguments expected");
+ return grub_normal_set_password (args[0], args[1]);
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(password)
+{
+ my_mod = mod;
+ cmd = grub_register_command ("password", grub_cmd_password,
+ N_("USER PASSWORD"),
+ N_("Set user password (plaintext). "
+ "Unrecommended and insecure."));
+}
+
+GRUB_MOD_FINI(password)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/password_pbkdf2.c b/grub-core/commands/password_pbkdf2.c
new file mode 100644
index 0000000..05a6272
--- /dev/null
+++ b/grub-core/commands/password_pbkdf2.c
@@ -0,0 +1,199 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/auth.h>
+#include <grub/crypto.h>
+#include <grub/list.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+
+struct pbkdf2_password
+{
+ grub_uint8_t *salt;
+ grub_size_t saltlen;
+ unsigned int c;
+ grub_uint8_t *expected;
+ grub_size_t buflen;
+};
+
+static grub_err_t
+check_password (const char *user, const char *entered, void *pin)
+{
+ grub_uint8_t *buf;
+ struct pbkdf2_password *pass = pin;
+ gcry_err_code_t err;
+
+ buf = grub_malloc (pass->buflen);
+ if (!buf)
+ return grub_crypto_gcry_error (GPG_ERR_OUT_OF_MEMORY);
+
+ err = grub_crypto_pbkdf2 (GRUB_MD_SHA512, (grub_uint8_t *) entered,
+ grub_strlen (entered),
+ pass->salt, pass->saltlen, pass->c,
+ buf, pass->buflen);
+ if (err)
+ {
+ grub_free (buf);
+ return grub_crypto_gcry_error (err);
+ }
+
+ if (grub_crypto_memcmp (buf, pass->expected, pass->buflen) != 0)
+ return GRUB_ACCESS_DENIED;
+
+ grub_auth_authenticate (user);
+
+ return GRUB_ERR_NONE;
+}
+
+static inline int
+hex2val (char hex)
+{
+ if ('0' <= hex && hex <= '9')
+ return hex - '0';
+ if ('a' <= hex && hex <= 'f')
+ return hex - 'a' + 10;
+ if ('A' <= hex && hex <= 'F')
+ return hex - 'A' + 10;
+ return -1;
+}
+
+static grub_err_t
+grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_err_t err;
+ char *ptr, *ptr2;
+ grub_uint8_t *ptro;
+ struct pbkdf2_password *pass;
+
+ if (argc != 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Two arguments expected.");
+
+ if (grub_memcmp (args[1], "grub.pbkdf2.sha512.",
+ sizeof ("grub.pbkdf2.sha512.") - 1) != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Incorrect PBKDF2 password.");
+
+ ptr = args[1] + sizeof ("grub.pbkdf2.sha512.") - 1;
+
+ pass = grub_malloc (sizeof (*pass));
+ if (!pass)
+ return grub_errno;
+
+ pass->c = grub_strtoul (ptr, &ptr, 0);
+ if (*ptr != '.')
+ {
+ grub_free (pass);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Incorrect PBKDF2 password.");
+ }
+ ptr++;
+
+ ptr2 = grub_strchr (ptr, '.');
+ if (!ptr2 || ((ptr2 - ptr) & 1) || grub_strlen (ptr2 + 1) & 1)
+ {
+ grub_free (pass);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Incorrect PBKDF2 password.");
+ }
+
+ pass->saltlen = (ptr2 - ptr) >> 1;
+ pass->buflen = grub_strlen (ptr2 + 1) >> 1;
+ ptro = pass->salt = grub_malloc (pass->saltlen);
+ if (!ptro)
+ {
+ grub_free (pass);
+ return grub_errno;
+ }
+ while (ptr < ptr2)
+ {
+ int hex1, hex2;
+ hex1 = hex2val (*ptr);
+ ptr++;
+ hex2 = hex2val (*ptr);
+ ptr++;
+ if (hex1 < 0 || hex2 < 0)
+ {
+ grub_free (pass->salt);
+ grub_free (pass);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Incorrect PBKDF2 password.");
+ }
+
+ *ptro = (hex1 << 4) | hex2;
+ ptro++;
+ }
+
+ ptro = pass->expected = grub_malloc (pass->buflen);
+ if (!ptro)
+ {
+ grub_free (pass->salt);
+ grub_free (pass);
+ return grub_errno;
+ }
+ ptr = ptr2 + 1;
+ ptr2 += grub_strlen (ptr2);
+ while (ptr < ptr2)
+ {
+ int hex1, hex2;
+ hex1 = hex2val (*ptr);
+ ptr++;
+ hex2 = hex2val (*ptr);
+ ptr++;
+ if (hex1 < 0 || hex2 < 0)
+ {
+ grub_free (pass->expected);
+ grub_free (pass->salt);
+ grub_free (pass);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Incorrect PBKDF2 password.");
+ }
+
+ *ptro = (hex1 << 4) | hex2;
+ ptro++;
+ }
+
+ err = grub_auth_register_authentication (args[0], check_password, pass);
+ if (err)
+ {
+ grub_free (pass);
+ return err;
+ }
+ grub_dl_ref (my_mod);
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(password_pbkdf2)
+{
+ my_mod = mod;
+ cmd = grub_register_command ("password_pbkdf2", grub_cmd_password,
+ N_("USER PBKDF2_PASSWORD"),
+ N_("Set user password (PBKDF2). "));
+}
+
+GRUB_MOD_FINI(password_pbkdf2)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/probe.c b/grub-core/commands/probe.c
new file mode 100644
index 0000000..c5f9463
--- /dev/null
+++ b/grub-core/commands/probe.c
@@ -0,0 +1,162 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/net.h>
+#include <grub/fs.h>
+#include <grub/file.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"set", 's', 0,
+ N_("Set a variable to return value."), "VAR", ARG_TYPE_STRING},
+ {"driver", 'd', 0, N_("Determine driver."), 0, 0},
+ {"partmap", 'p', 0, N_("Determine partition map type."), 0, 0},
+ {"fs", 'f', 0, N_("Determine filesystem type."), 0, 0},
+ {"fs-uuid", 'u', 0, N_("Determine filesystem UUID."), 0, 0},
+ {"label", 'l', 0, N_("Determine filesystem label."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_err_t
+grub_cmd_probe (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ grub_device_t dev;
+ grub_fs_t fs;
+ char *ptr;
+ grub_err_t err;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
+
+ ptr = args[0] + grub_strlen (args[0]) - 1;
+ if (args[0][0] == '(' && *ptr == ')')
+ {
+ *ptr = 0;
+ dev = grub_device_open (args[0] + 1);
+ *ptr = ')';
+ }
+ else
+ dev = grub_device_open (args[0]);
+ if (! dev)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "couldn't open device");
+
+ if (state[1].set)
+ {
+ const char *val = "none";
+ if (dev->net)
+ val = dev->net->dev->name;
+ if (dev->disk)
+ val = dev->disk->dev->name;
+ if (state[0].set)
+ grub_env_set (state[0].arg, val);
+ else
+ grub_printf ("%s", val);
+ return GRUB_ERR_NONE;
+ }
+ if (state[2].set)
+ {
+ const char *val = "none";
+ if (dev->disk && dev->disk->partition)
+ val = dev->disk->partition->partmap->name;
+ if (state[0].set)
+ grub_env_set (state[0].arg, val);
+ else
+ grub_printf ("%s", val);
+ return GRUB_ERR_NONE;
+ }
+ fs = grub_fs_probe (dev);
+ if (! fs)
+ return grub_error (GRUB_ERR_UNKNOWN_FS, "unrecognised fs");
+ if (state[3].set)
+ {
+ if (state[0].set)
+ grub_env_set (state[0].arg, fs->name);
+ else
+ grub_printf ("%s", fs->name);
+ return GRUB_ERR_NONE;
+ }
+ if (state[4].set)
+ {
+ char *uuid;
+ if (! fs->uuid)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "uuid for this FS isn't supported yet");
+ err = fs->uuid (dev, &uuid);
+ if (err)
+ return err;
+ if (! uuid)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "uuid for this FS isn't supported yet");
+
+ if (state[0].set)
+ grub_env_set (state[0].arg, uuid);
+ else
+ grub_printf ("%s", uuid);
+ grub_free (uuid);
+ return GRUB_ERR_NONE;
+ }
+ if (state[5].set)
+ {
+ char *label;
+ if (! fs->label)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "label for this FS isn't supported yet");
+ err = fs->label (dev, &label);
+ if (err)
+ return err;
+ if (! label)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "uuid for this FS isn't supported yet");
+
+ if (state[0].set)
+ grub_env_set (state[0].arg, label);
+ else
+ grub_printf ("%s", label);
+ grub_free (label);
+ return GRUB_ERR_NONE;
+ }
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unrecognised target");
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT (probe)
+{
+ cmd = grub_register_extcmd ("probe", grub_cmd_probe, 0, N_("DEVICE"),
+ N_("Retrieve device info."), options);
+}
+
+GRUB_MOD_FINI (probe)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/read.c b/grub-core/commands/read.c
new file mode 100644
index 0000000..fe3e88b
--- /dev/null
+++ b/grub-core/commands/read.c
@@ -0,0 +1,92 @@
+/* read.c - Command to read variables from user. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/term.h>
+#include <grub/types.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static char *
+grub_getline (void)
+{
+ int i;
+ char *line;
+ char *tmp;
+ char c;
+
+ i = 0;
+ line = grub_malloc (1 + i + sizeof('\0'));
+ if (! line)
+ return NULL;
+
+ while (1)
+ {
+ c = grub_getkey ();
+ if ((c == '\n') || (c == '\r'))
+ break;
+
+ line[i] = c;
+ if (grub_isprint (c))
+ grub_printf ("%c", c);
+ i++;
+ tmp = grub_realloc (line, 1 + i + sizeof('\0'));
+ if (! tmp)
+ {
+ grub_free (line);
+ return NULL;
+ }
+ line = tmp;
+ }
+ line[i] = '\0';
+
+ return line;
+}
+
+static grub_err_t
+grub_cmd_read (grub_command_t cmd __attribute__ ((unused)), int argc, char **args)
+{
+ char *line = grub_getline ();
+ if (! line)
+ return grub_errno;
+ if (argc > 0)
+ grub_env_set (args[0], line);
+
+ grub_free (line);
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(read)
+{
+ cmd = grub_register_command ("read", grub_cmd_read,
+ N_("[ENVVAR]"),
+ N_("Set variable with user input."));
+}
+
+GRUB_MOD_FINI(read)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/reboot.c b/grub-core/commands/reboot.c
new file mode 100644
index 0000000..8e18083
--- /dev/null
+++ b/grub-core/commands/reboot.c
@@ -0,0 +1,47 @@
+/* reboot.c - command to reboot the computer. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/misc.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_reboot ();
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(reboot)
+{
+ cmd = grub_register_command ("reboot", grub_cmd_reboot,
+ 0, N_("Reboot the computer."));
+}
+
+GRUB_MOD_FINI(reboot)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/regexp.c b/grub-core/commands/regexp.c
new file mode 100644
index 0000000..1e8a6f3
--- /dev/null
+++ b/grub-core/commands/regexp.c
@@ -0,0 +1,151 @@
+/* regexp.c -- The regexp command. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/env.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/script_sh.h>
+#include <regex.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ { "set", 's', GRUB_ARG_OPTION_REPEATABLE,
+ N_("Variable names to update with matches."),
+ N_("[NUMBER:]VARNAME"), ARG_TYPE_STRING },
+ { 0, 0, 0, 0, 0, 0 }
+ };
+
+static grub_err_t
+set_matches (char **varnames, char *str, grub_size_t nmatches,
+ regmatch_t *matches)
+{
+ int i;
+ char ch;
+ char *p;
+ char *q;
+ grub_err_t err;
+ unsigned long j;
+
+ auto void setvar (char *v, regmatch_t *m);
+ void setvar (char *v, regmatch_t *m)
+ {
+ ch = str[m->rm_eo];
+ str[m->rm_eo] = '\0';
+ err = grub_env_set (v, str + m->rm_so);
+ str[m->rm_eo] = ch;
+ }
+
+ for (i = 0; varnames && varnames[i]; i++)
+ {
+ if (! (p = grub_strchr (varnames[i], ':')))
+ {
+ /* varname w/o index defaults to 1 */
+ if (nmatches < 2 || matches[1].rm_so == -1)
+ grub_env_unset (varnames[i]);
+ else
+ setvar (varnames[i], &matches[1]);
+ }
+ else
+ {
+ j = grub_strtoul (varnames[i], &q, 10);
+ if (q != p)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "invalid variable name format %s", varnames[i]);
+
+ if (nmatches <= j || matches[j].rm_so == -1)
+ grub_env_unset (p + 1);
+ else
+ setvar (p + 1, &matches[j]);
+ }
+
+ if (err != GRUB_ERR_NONE)
+ return err;
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_regexp (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ regex_t regex;
+ int ret;
+ grub_size_t s;
+ char *comperr;
+ grub_err_t err;
+ regmatch_t *matches = 0;
+
+ if (argc != 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "2 arguments expected");
+
+ ret = regcomp (&regex, args[0], REG_EXTENDED);
+ if (ret)
+ goto fail;
+
+ matches = grub_zalloc (sizeof (*matches) * (regex.re_nsub + 1));
+ if (! matches)
+ goto fail;
+
+ ret = regexec (&regex, args[1], regex.re_nsub + 1, matches, 0);
+ if (!ret)
+ {
+ err = set_matches (ctxt->state[0].args, args[1],
+ regex.re_nsub + 1, matches);
+ regfree (&regex);
+ grub_free (matches);
+ return err;
+ }
+
+ fail:
+ grub_free (matches);
+ s = regerror (ret, &regex, 0, 0);
+ comperr = grub_malloc (s);
+ if (!comperr)
+ {
+ regfree (&regex);
+ return grub_errno;
+ }
+ regerror (ret, &regex, comperr, s);
+ err = grub_error (GRUB_ERR_TEST_FAILURE, "%s", comperr);
+ regfree (&regex);
+ grub_free (comperr);
+ return err;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(regexp)
+{
+ cmd = grub_register_extcmd ("regexp", grub_cmd_regexp, 0, N_("REGEXP STRING"),
+ N_("Test if REGEXP matches STRING."), options);
+
+ /* Setup GRUB script wildcard translator. */
+ grub_wildcard_translator = &grub_filename_translator;
+}
+
+GRUB_MOD_FINI(regexp)
+{
+ grub_unregister_extcmd (cmd);
+ grub_wildcard_translator = 0;
+}
diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c
new file mode 100644
index 0000000..ba80d80
--- /dev/null
+++ b/grub-core/commands/search.c
@@ -0,0 +1,245 @@
+/* search.c - search devices based on a file or a filesystem label */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/device.h>
+#include <grub/file.h>
+#include <grub/env.h>
+#include <grub/command.h>
+#include <grub/search.h>
+#include <grub/i18n.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+void
+FUNC_NAME (const char *key, const char *var, int no_floppy,
+ char **hints, unsigned nhints)
+{
+ int count = 0;
+ grub_fs_autoload_hook_t saved_autoload;
+
+ auto int iterate_device (const char *name);
+ int iterate_device (const char *name)
+ {
+ int found = 0;
+
+ /* Skip floppy drives when requested. */
+ if (no_floppy &&
+ name[0] == 'f' && name[1] == 'd' && name[2] >= '0' && name[2] <= '9')
+ return 0;
+
+#ifdef DO_SEARCH_FILE
+ {
+ char *buf;
+ grub_file_t file;
+
+ buf = grub_xasprintf ("(%s)%s", name, key);
+ if (! buf)
+ return 1;
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (buf);
+ if (file)
+ {
+ found = 1;
+ grub_file_close (file);
+ }
+ grub_free (buf);
+ }
+#else
+ {
+ /* SEARCH_FS_UUID or SEARCH_LABEL */
+ grub_device_t dev;
+ grub_fs_t fs;
+ char *quid;
+
+ dev = grub_device_open (name);
+ if (dev)
+ {
+ fs = grub_fs_probe (dev);
+
+#ifdef DO_SEARCH_FS_UUID
+#define compare_fn grub_strcasecmp
+#define read_fn uuid
+#else
+#define compare_fn grub_strcmp
+#define read_fn label
+#endif
+
+ if (fs && fs->read_fn)
+ {
+ fs->read_fn (dev, &quid);
+
+ if (grub_errno == GRUB_ERR_NONE && quid)
+ {
+ if (compare_fn (quid, key) == 0)
+ found = 1;
+
+ grub_free (quid);
+ }
+ }
+
+ grub_device_close (dev);
+ }
+ }
+#endif
+
+ if (found)
+ {
+ count++;
+ if (var)
+ grub_env_set (var, name);
+ else
+ grub_printf (" %s", name);
+ }
+
+ grub_errno = GRUB_ERR_NONE;
+ return (found && var);
+ }
+
+ auto int part_hook (grub_disk_t disk, const grub_partition_t partition);
+ int part_hook (grub_disk_t disk, const grub_partition_t partition)
+ {
+ char *partition_name, *devname;
+ int ret;
+
+ partition_name = grub_partition_get_name (partition);
+ if (! partition_name)
+ return 1;
+
+ devname = grub_xasprintf ("%s,%s", disk->name, partition_name);
+ grub_free (partition_name);
+ if (!devname)
+ return 1;
+ ret = iterate_device (devname);
+ grub_free (devname);
+
+ return ret;
+ }
+
+ auto void try (void);
+ void try (void)
+ {
+ unsigned i;
+ for (i = 0; i < nhints; i++)
+ {
+ char *end;
+ if (!hints[i][0])
+ continue;
+ end = hints[i] + grub_strlen (hints[i]) - 1;
+ if (*end == ',')
+ *end = 0;
+ if (iterate_device (hints[i]))
+ {
+ if (!*end)
+ *end = ',';
+ return;
+ }
+ if (!*end)
+ {
+ grub_device_t dev;
+ int ret;
+ dev = grub_device_open (hints[i]);
+ if (!dev)
+ {
+ *end = ',';
+ continue;
+ }
+ if (!dev->disk)
+ {
+ grub_device_close (dev);
+ *end = ',';
+ continue;
+ }
+ ret = grub_partition_iterate (dev->disk, part_hook);
+ *end = ',';
+ grub_device_close (dev);
+ if (ret)
+ return;
+ }
+ }
+ grub_device_iterate (iterate_device);
+ }
+
+ /* First try without autoloading if we're setting variable. */
+ if (var)
+ {
+ saved_autoload = grub_fs_autoload_hook;
+ grub_fs_autoload_hook = 0;
+ try ();
+
+ /* Restore autoload hook. */
+ grub_fs_autoload_hook = saved_autoload;
+
+ /* Retry with autoload if nothing found. */
+ if (grub_errno == GRUB_ERR_NONE && count == 0)
+ try ();
+ }
+ else
+ try ();
+
+ if (grub_errno == GRUB_ERR_NONE && count == 0)
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "no such device: %s", key);
+}
+
+static grub_err_t
+grub_cmd_do_search (grub_command_t cmd __attribute__ ((unused)), int argc,
+ char **args)
+{
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no argument specified");
+
+ FUNC_NAME (args[0], argc == 1 ? 0 : args[1], 0, (args + 2),
+ argc > 2 ? argc - 2 : 0);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+#ifdef DO_SEARCH_FILE
+GRUB_MOD_INIT(search_fs_file)
+#elif defined (DO_SEARCH_FS_UUID)
+GRUB_MOD_INIT(search_fs_uuid)
+#else
+GRUB_MOD_INIT(search_label)
+#endif
+{
+ cmd =
+ grub_register_command (COMMAND_NAME, grub_cmd_do_search,
+ N_("NAME [VARIABLE] [HINTS]"),
+ HELP_MESSAGE);
+}
+
+#ifdef DO_SEARCH_FILE
+GRUB_MOD_FINI(search_fs_file)
+#elif defined (DO_SEARCH_FS_UUID)
+GRUB_MOD_FINI(search_fs_uuid)
+#else
+GRUB_MOD_FINI(search_label)
+#endif
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/search_file.c b/grub-core/commands/search_file.c
new file mode 100644
index 0000000..73ce89c
--- /dev/null
+++ b/grub-core/commands/search_file.c
@@ -0,0 +1,6 @@
+#define DO_SEARCH_FILE 1
+#define FUNC_NAME grub_search_fs_file
+#define COMMAND_NAME "search.file"
+#define SEARCH_TARGET "file"
+#define HELP_MESSAGE N_("Search devices by file. If VARIABLE is specified, the first device found is set to a variable.")
+#include "search.c"
diff --git a/grub-core/commands/search_label.c b/grub-core/commands/search_label.c
new file mode 100644
index 0000000..ee9c792
--- /dev/null
+++ b/grub-core/commands/search_label.c
@@ -0,0 +1,6 @@
+#define DO_SEARCH_FS_LABEL 1
+#define FUNC_NAME grub_search_label
+#define COMMAND_NAME "search.fs_label"
+#define SEARCH_TARGET "filesystem label"
+#define HELP_MESSAGE N_("Search devices by label. If VARIABLE is specified, the first device found is set to a variable.")
+#include "search.c"
diff --git a/grub-core/commands/search_uuid.c b/grub-core/commands/search_uuid.c
new file mode 100644
index 0000000..52f8381
--- /dev/null
+++ b/grub-core/commands/search_uuid.c
@@ -0,0 +1,6 @@
+#define DO_SEARCH_FS_UUID 1
+#define FUNC_NAME grub_search_fs_uuid
+#define COMMAND_NAME "search.fs_uuid"
+#define SEARCH_TARGET "filesystem UUID"
+#define HELP_MESSAGE N_("Search devices by UUID. If VARIABLE is specified, the first device found is set to a variable.")
+#include "search.c"
diff --git a/grub-core/commands/search_wrap.c b/grub-core/commands/search_wrap.c
new file mode 100644
index 0000000..7b0a995
--- /dev/null
+++ b/grub-core/commands/search_wrap.c
@@ -0,0 +1,109 @@
+/* search.c - search devices based on a file or a filesystem label */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+#include <grub/extcmd.h>
+#include <grub/search.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"file", 'f', 0, N_("Search devices by a file."), 0, 0},
+ {"label", 'l', 0, N_("Search devices by a filesystem label."),
+ 0, 0},
+ {"fs-uuid", 'u', 0, N_("Search devices by a filesystem UUID."),
+ 0, 0},
+ {"set", 's', GRUB_ARG_OPTION_OPTIONAL,
+ N_("Set a variable to the first device found."), "VAR", ARG_TYPE_STRING},
+ {"no-floppy", 'n', 0, N_("Do not probe any floppy drive."), 0, 0},
+ {"hint", 'h', GRUB_ARG_OPTION_REPEATABLE,
+ N_("First try the device HINT. If HINT ends in comma, "
+ "also try subpartitions"), N_("HINT"), ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+enum options
+ {
+ SEARCH_FILE,
+ SEARCH_LABEL,
+ SEARCH_FS_UUID,
+ SEARCH_SET,
+ SEARCH_NO_FLOPPY,
+ SEARCH_HINT
+ };
+
+static grub_err_t
+grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ const char *var = 0;
+ int nhints = 0;
+
+ if (state[SEARCH_HINT].set)
+ while (state[SEARCH_HINT].args[nhints])
+ nhints++;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no argument specified");
+
+ if (state[SEARCH_SET].set)
+ var = state[SEARCH_SET].arg ? state[SEARCH_SET].arg : "root";
+
+ if (state[SEARCH_LABEL].set)
+ grub_search_label (args[0], var, state[SEARCH_NO_FLOPPY].set,
+ state[SEARCH_HINT].args, nhints);
+ else if (state[SEARCH_FS_UUID].set)
+ grub_search_fs_uuid (args[0], var, state[SEARCH_NO_FLOPPY].set,
+ state[SEARCH_HINT].args, nhints);
+ else if (state[SEARCH_FILE].set)
+ grub_search_fs_file (args[0], var, state[SEARCH_NO_FLOPPY].set,
+ state[SEARCH_HINT].args, nhints);
+ else
+ return grub_error (GRUB_ERR_INVALID_COMMAND, "unspecified search type");
+
+ return grub_errno;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(search)
+{
+ cmd =
+ grub_register_extcmd ("search", grub_cmd_search, GRUB_COMMAND_FLAG_EXTRACTOR,
+ N_("[-f|-l|-u|-s|-n] [--hint HINT [--hint HINT] ...]"
+ " NAME"),
+ N_("Search devices by file, filesystem label"
+ " or filesystem UUID."
+ " If --set is specified, the first device found is"
+ " set to a variable. If no variable name is"
+ " specified, \"root\" is used."),
+ options);
+}
+
+GRUB_MOD_FINI(search)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/setpci.c b/grub-core/commands/setpci.c
new file mode 100644
index 0000000..70f5bcd
--- /dev/null
+++ b/grub-core/commands/setpci.c
@@ -0,0 +1,343 @@
+/* lspci.c - List PCI devices. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/pci.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/env.h>
+#include <grub/mm.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct pci_register
+{
+ const char *name;
+ grub_uint16_t addr;
+ unsigned size;
+};
+
+static struct pci_register pci_registers[] =
+ {
+ {"VENDOR_ID", GRUB_PCI_REG_VENDOR , 2},
+ {"DEVICE_ID", GRUB_PCI_REG_DEVICE , 2},
+ {"COMMAND", GRUB_PCI_REG_COMMAND , 2},
+ {"STATUS", GRUB_PCI_REG_STATUS , 2},
+ {"REVISION", GRUB_PCI_REG_REVISION , 1},
+ {"CLASS_PROG", GRUB_PCI_REG_CLASS + 1 , 1},
+ {"CLASS_DEVICE", GRUB_PCI_REG_CLASS + 2 , 2},
+ {"CACHE_LINE_SIZE", GRUB_PCI_REG_CACHELINE , 1},
+ {"LATENCY_TIMER", GRUB_PCI_REG_LAT_TIMER , 1},
+ {"HEADER_TYPE", GRUB_PCI_REG_HEADER_TYPE , 1},
+ {"BIST", GRUB_PCI_REG_BIST , 1},
+ {"BASE_ADDRESS_0", GRUB_PCI_REG_ADDRESS_REG0, 4},
+ {"BASE_ADDRESS_1", GRUB_PCI_REG_ADDRESS_REG1, 4},
+ {"BASE_ADDRESS_2", GRUB_PCI_REG_ADDRESS_REG2, 4},
+ {"BASE_ADDRESS_3", GRUB_PCI_REG_ADDRESS_REG3, 4},
+ {"BASE_ADDRESS_4", GRUB_PCI_REG_ADDRESS_REG4, 4},
+ {"BASE_ADDRESS_5", GRUB_PCI_REG_ADDRESS_REG5, 4},
+ {"CARDBUS_CIS", GRUB_PCI_REG_CIS_POINTER , 4},
+ {"SUBVENDOR_ID", GRUB_PCI_REG_SUBVENDOR , 2},
+ {"SUBSYSTEM_ID", GRUB_PCI_REG_SUBSYSTEM , 2},
+ {"ROM_ADDRESS", GRUB_PCI_REG_ROM_ADDRESS , 4},
+ {"CAP_POINTER", GRUB_PCI_REG_CAP_POINTER , 1},
+ {"INTERRUPT_LINE", GRUB_PCI_REG_IRQ_LINE , 1},
+ {"INTERRUPT_PIN", GRUB_PCI_REG_IRQ_PIN , 1},
+ {"MIN_GNT", GRUB_PCI_REG_MIN_GNT , 1},
+ {"MAX_LAT", GRUB_PCI_REG_MIN_GNT , 1},
+ };
+
+static const struct grub_arg_option options[] =
+ {
+ {0, 'd', 0, "Select device by vendor and device IDs.",
+ "[vendor]:[device]", ARG_TYPE_STRING},
+ {0, 's', 0, "Select device by its position on the bus.",
+ "[bus]:[slot][.func]", ARG_TYPE_STRING},
+ {0, 'v', 0, "Save read value into variable VARNAME.",
+ "VARNAME", ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_uint32_t pciid_check_mask, pciid_check_value;
+static int bus, device, function;
+static int check_bus, check_device, check_function;
+static grub_uint32_t write_mask, regwrite;
+static int regsize;
+static grub_uint16_t regaddr;
+static const char *varname;
+
+static int NESTED_FUNC_ATTR
+grub_setpci_iter (grub_pci_device_t dev, grub_pci_id_t pciid)
+{
+ grub_uint32_t regval = 0;
+ grub_pci_address_t addr;
+
+ if ((pciid & pciid_check_mask) != pciid_check_value)
+ return 0;
+
+ if (check_bus && grub_pci_get_bus (dev) != bus)
+ return 0;
+
+ if (check_device && grub_pci_get_device (dev) != device)
+ return 0;
+
+ if (check_function && grub_pci_get_function (dev) != function)
+ return 0;
+
+ addr = grub_pci_make_address (dev, regaddr);
+
+ switch (regsize)
+ {
+ case 1:
+ regval = grub_pci_read_byte (addr);
+ break;
+
+ case 2:
+ regval = grub_pci_read_word (addr);
+ break;
+
+ case 4:
+ regval = grub_pci_read (addr);
+ break;
+ }
+
+ if (varname)
+ {
+ char buf[sizeof ("XXXXXXXX")];
+ grub_snprintf (buf, sizeof (buf), "%x", regval);
+ grub_env_set (varname, buf);
+ return 1;
+ }
+
+ if (!write_mask)
+ {
+ grub_printf ("Register %x of %d:%d.%d is %x\n", regaddr,
+ grub_pci_get_bus (dev),
+ grub_pci_get_device (dev),
+ grub_pci_get_function (dev),
+ regval);
+ return 0;
+ }
+
+ regval = (regval & ~write_mask) | regwrite;
+
+ switch (regsize)
+ {
+ case 1:
+ grub_pci_write_byte (addr, regval);
+ break;
+
+ case 2:
+ grub_pci_write_word (addr, regval);
+ break;
+
+ case 4:
+ grub_pci_write (addr, regval);
+ break;
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_setpci (grub_extcmd_context_t ctxt, int argc, char **argv)
+{
+ const char *ptr;
+ unsigned i;
+
+ pciid_check_value = 0;
+ pciid_check_mask = 0;
+
+ if (ctxt->state[0].set)
+ {
+ ptr = ctxt->state[0].arg;
+ pciid_check_value |= (grub_strtoul (ptr, (char **) &ptr, 16) & 0xffff);
+ if (grub_errno == GRUB_ERR_BAD_NUMBER)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ ptr = ctxt->state[0].arg;
+ }
+ else
+ pciid_check_mask |= 0xffff;
+ if (grub_errno)
+ return grub_errno;
+ if (*ptr != ':')
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Colon expected.");
+ ptr++;
+ pciid_check_value |= (grub_strtoul (ptr, (char **) &ptr, 16) & 0xffff)
+ << 16;
+ if (grub_errno == GRUB_ERR_BAD_NUMBER)
+ grub_errno = GRUB_ERR_NONE;
+ else
+ pciid_check_mask |= 0xffff0000;
+ }
+
+ pciid_check_value &= pciid_check_mask;
+
+ check_bus = check_device = check_function = 0;
+
+ if (ctxt->state[1].set)
+ {
+ const char *optr;
+
+ ptr = ctxt->state[1].arg;
+ optr = ptr;
+ bus = grub_strtoul (ptr, (char **) &ptr, 16);
+ if (grub_errno == GRUB_ERR_BAD_NUMBER)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ ptr = optr;
+ }
+ else
+ check_bus = 1;
+ if (grub_errno)
+ return grub_errno;
+ if (*ptr != ':')
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Colon expected.");
+ ptr++;
+ optr = ptr;
+ device = grub_strtoul (ptr, (char **) &ptr, 16);
+ if (grub_errno == GRUB_ERR_BAD_NUMBER)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ ptr = optr;
+ }
+ else
+ check_device = 1;
+ if (*ptr == '.')
+ {
+ ptr++;
+ function = grub_strtoul (ptr, (char **) &ptr, 16);
+ if (grub_errno)
+ return grub_errno;
+ check_function = 1;
+ }
+ }
+
+ if (ctxt->state[2].set)
+ varname = ctxt->state[2].arg;
+ else
+ varname = NULL;
+
+ write_mask = 0;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Command expected.");
+
+ if (argc > 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Only one command is supported.");
+
+ ptr = argv[0];
+
+ for (i = 0; i < ARRAY_SIZE (pci_registers); i++)
+ {
+ if (grub_strncmp (ptr, pci_registers[i].name,
+ grub_strlen (pci_registers[i].name)) == 0)
+ break;
+ }
+ if (i == ARRAY_SIZE (pci_registers))
+ {
+ regsize = 0;
+ regaddr = grub_strtoul (ptr, (char **) &ptr, 16);
+ if (grub_errno)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Unknown register");
+ }
+ else
+ {
+ regaddr = pci_registers[i].addr;
+ regsize = pci_registers[i].size;
+ ptr += grub_strlen (pci_registers[i].name);
+ }
+
+ if (grub_errno)
+ return grub_errno;
+
+ if (*ptr == '+')
+ {
+ ptr++;
+ regaddr += grub_strtoul (ptr, (char **) &ptr, 16);
+ if (grub_errno)
+ return grub_errno;
+ }
+
+ if (grub_memcmp (ptr, ".L", sizeof (".L") - 1) == 0
+ || grub_memcmp (ptr, ".l", sizeof (".l") - 1) == 0)
+ {
+ regsize = 4;
+ ptr += sizeof (".l") - 1;
+ }
+ else if (grub_memcmp (ptr, ".W", sizeof (".W") - 1) == 0
+ || grub_memcmp (ptr, ".w", sizeof (".w") - 1) == 0)
+ {
+ regsize = 2;
+ ptr += sizeof (".w") - 1;
+ }
+ else if (grub_memcmp (ptr, ".B", sizeof (".B") - 1) == 0
+ || grub_memcmp (ptr, ".b", sizeof (".b") - 1) == 0)
+ {
+ regsize = 1;
+ ptr += sizeof (".b") - 1;
+ }
+
+ if (!regsize)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Unknown register size.");
+
+ write_mask = 0;
+ if (*ptr == '=')
+ {
+ ptr++;
+ regwrite = grub_strtoul (ptr, (char **) &ptr, 16);
+ if (grub_errno)
+ return grub_errno;
+ write_mask = 0xffffffff;
+ if (*ptr == ':')
+ {
+ ptr++;
+ write_mask = grub_strtoul (ptr, (char **) &ptr, 16);
+ if (grub_errno)
+ return grub_errno;
+ write_mask = 0xffffffff;
+ }
+ regwrite &= write_mask;
+ }
+
+ if (write_mask && varname)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Option -v isn't valid for writes.");
+
+ grub_pci_iterate (grub_setpci_iter);
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(setpci)
+{
+ cmd = grub_register_extcmd ("setpci", grub_cmd_setpci, 0,
+ N_("[-s POSITION] [-d DEVICE] [-v VAR] "
+ "[REGISTER][=VALUE[:MASK]]"),
+ N_("Manipulate PCI devices."), options);
+}
+
+GRUB_MOD_FINI(setpci)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/sleep.c b/grub-core/commands/sleep.c
new file mode 100644
index 0000000..97e7a40
--- /dev/null
+++ b/grub-core/commands/sleep.c
@@ -0,0 +1,114 @@
+/* sleep.c - Command to wait a specified number of seconds. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/term.h>
+#include <grub/time.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const struct grub_arg_option options[] =
+ {
+ {"verbose", 'v', 0, N_("Verbose countdown."), 0, 0},
+ {"interruptible", 'i', 0, N_("Interruptible with ESC."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_uint16_t *pos;
+
+static void
+do_print (int n)
+{
+ grub_term_restore_pos (pos);
+ /* NOTE: Do not remove the trailing space characters.
+ They are required to clear the line. */
+ grub_printf ("%d ", n);
+}
+
+/* Based on grub_millisleep() from kern/generic/millisleep.c. */
+static int
+grub_interruptible_millisleep (grub_uint32_t ms)
+{
+ grub_uint64_t start;
+
+ start = grub_get_time_ms ();
+
+ while (grub_get_time_ms () - start < ms)
+ if (grub_checkkey () >= 0 && grub_getkey () == GRUB_TERM_ESC)
+ return 1;
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_sleep (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ int n;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "missing operand");
+
+ n = grub_strtoul (args[0], 0, 10);
+
+ if (n == 0)
+ {
+ /* Either `0' or broken input. */
+ return 0;
+ }
+
+ pos = grub_term_save_pos ();
+
+ for (; n; n--)
+ {
+ if (state[0].set)
+ do_print (n);
+
+ if (state[1].set)
+ {
+ if (grub_interruptible_millisleep (1000))
+ return 1;
+ }
+ else
+ grub_millisleep (1000);
+ }
+ if (state[0].set)
+ do_print (0);
+
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(sleep)
+{
+ cmd = grub_register_extcmd ("sleep", grub_cmd_sleep, 0,
+ N_("NUMBER_OF_SECONDS"),
+ N_("Wait for a specified number of seconds."),
+ options);
+}
+
+GRUB_MOD_FINI(sleep)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/commands/terminal.c b/grub-core/commands/terminal.c
new file mode 100644
index 0000000..0adfd3d
--- /dev/null
+++ b/grub-core/commands/terminal.c
@@ -0,0 +1,258 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/term.h>
+#include <grub/i18n.h>
+#include <grub/misc.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_term_autoload *grub_term_input_autoload = NULL;
+struct grub_term_autoload *grub_term_output_autoload = NULL;
+
+struct abstract_terminal
+{
+ struct abstract_terminal *next;
+ const char *name;
+ grub_err_t (*init) (struct abstract_terminal *term);
+ grub_err_t (*fini) (struct abstract_terminal *term);
+};
+
+static grub_err_t
+handle_command (int argc, char **args, struct abstract_terminal **enabled,
+ struct abstract_terminal **disabled,
+ struct grub_term_autoload *autoloads,
+ const char *active_str,
+ const char *available_str)
+{
+ int i;
+ struct abstract_terminal *term;
+ struct grub_term_autoload *aut;
+
+ if (argc == 0)
+ {
+ grub_puts_ (active_str);
+ for (term = *enabled; term; term = term->next)
+ grub_printf ("%s ", term->name);
+ grub_printf ("\n");
+ grub_puts_ (available_str);
+ for (term = *disabled; term; term = term->next)
+ grub_printf ("%s ", term->name);
+ /* This is quadratic but we don't expect mode than 30 terminal
+ modules ever. */
+ for (aut = autoloads; aut; aut = aut->next)
+ {
+ for (term = *disabled; term; term = term->next)
+ if (grub_strcmp (term->name, aut->name) == 0
+ || (aut->name[0] && aut->name[grub_strlen (aut->name) - 1] == '*'
+ && grub_memcmp (term->name, aut->name,
+ grub_strlen (aut->name) - 1) == 0))
+ break;
+ if (!term)
+ for (term = *enabled; term; term = term->next)
+ if (grub_strcmp (term->name, aut->name) == 0
+ || (aut->name[0] && aut->name[grub_strlen (aut->name) - 1] == '*'
+ && grub_memcmp (term->name, aut->name,
+ grub_strlen (aut->name) - 1) == 0))
+ break;
+ if (!term)
+ grub_printf ("%s ", aut->name);
+ }
+ grub_printf ("\n");
+ return GRUB_ERR_NONE;
+ }
+ i = 0;
+
+ if (grub_strcmp (args[0], "--append") == 0
+ || grub_strcmp (args[0], "--remove") == 0)
+ i++;
+
+ if (i == argc)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_ ("no terminal specified"));
+
+ for (; i < argc; i++)
+ {
+ int again = 0;
+ while (1)
+ {
+ for (term = *disabled; term; term = term->next)
+ if (grub_strcmp (args[i], term->name) == 0)
+ break;
+ if (term == 0)
+ for (term = *enabled; term; term = term->next)
+ if (grub_strcmp (args[i], term->name) == 0)
+ break;
+ if (term)
+ break;
+ if (again)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminal '%s'\n",
+ args[i]);
+ for (aut = autoloads; aut; aut = aut->next)
+ if (grub_strcmp (args[i], aut->name) == 0
+ || (aut->name[0] && aut->name[grub_strlen (aut->name) - 1] == '*'
+ && grub_memcmp (args[i], aut->name,
+ grub_strlen (aut->name) - 1) == 0))
+ {
+ grub_dl_t mod;
+ mod = grub_dl_load (aut->modname);
+ if (mod)
+ grub_dl_ref (mod);
+ grub_errno = GRUB_ERR_NONE;
+ break;
+ }
+ if (!aut)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminal '%s'\n",
+ args[i]);
+ again = 1;
+ }
+ }
+
+ if (grub_strcmp (args[0], "--append") == 0)
+ {
+ for (i = 1; i < argc; i++)
+ {
+ for (term = *disabled; term; term = term->next)
+ if (grub_strcmp (args[i], term->name) == 0)
+ break;
+ if (term)
+ {
+ if (term->init && term->init (term) != GRUB_ERR_NONE)
+ return grub_errno;
+
+ grub_list_remove (GRUB_AS_LIST_P (disabled), GRUB_AS_LIST (term));
+ grub_list_push (GRUB_AS_LIST_P (enabled), GRUB_AS_LIST (term));
+ }
+ }
+ return GRUB_ERR_NONE;
+ }
+
+ if (grub_strcmp (args[0], "--remove") == 0)
+ {
+ for (i = 1; i < argc; i++)
+ {
+ for (term = *enabled; term; term = term->next)
+ if (grub_strcmp (args[i], term->name) == 0)
+ break;
+ if (term)
+ {
+ if (!term->next && term == *enabled)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "can't remove the last terminal");
+ grub_list_remove (GRUB_AS_LIST_P (enabled), GRUB_AS_LIST (term));
+ if (term->fini)
+ term->fini (term);
+ grub_list_push (GRUB_AS_LIST_P (disabled), GRUB_AS_LIST (term));
+ }
+ }
+ return GRUB_ERR_NONE;
+ }
+ for (i = 0; i < argc; i++)
+ {
+ for (term = *disabled; term; term = term->next)
+ if (grub_strcmp (args[i], term->name) == 0)
+ break;
+ if (term)
+ {
+ if (term->init && term->init (term) != GRUB_ERR_NONE)
+ return grub_errno;
+
+ grub_list_remove (GRUB_AS_LIST_P (disabled), GRUB_AS_LIST (term));
+ grub_list_push (GRUB_AS_LIST_P (enabled), GRUB_AS_LIST (term));
+ }
+ }
+
+ {
+ struct abstract_terminal *next;
+ for (term = *enabled; term; term = next)
+ {
+ next = term->next;
+ for (i = 0; i < argc; i++)
+ if (grub_strcmp (args[i], term->name) == 0)
+ break;
+ if (i == argc)
+ {
+ if (!term->next && term == *enabled)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "can't remove the last terminal");
+ grub_list_remove (GRUB_AS_LIST_P (enabled), GRUB_AS_LIST (term));
+ if (term->fini)
+ term->fini (term);
+ grub_list_push (GRUB_AS_LIST_P (disabled), GRUB_AS_LIST (term));
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_terminal_input (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ (void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, next);
+ (void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, name);
+ (void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, init);
+ (void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, fini);
+ return handle_command (argc, args,
+ (struct abstract_terminal **) (void *) &grub_term_inputs,
+ (struct abstract_terminal **) (void *) &grub_term_inputs_disabled,
+ grub_term_input_autoload,
+ N_ ("Active input terminals:"),
+ N_ ("Available input terminals:"));
+}
+
+static grub_err_t
+grub_cmd_terminal_output (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ (void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, next);
+ (void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, name);
+ (void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, init);
+ (void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, fini);
+ return handle_command (argc, args,
+ (struct abstract_terminal **) (void *) &grub_term_outputs,
+ (struct abstract_terminal **) (void *) &grub_term_outputs_disabled,
+ grub_term_output_autoload,
+ N_ ("Active output terminals:"),
+ N_ ("Available output terminals:"));
+}
+
+static grub_command_t cmd_terminal_input, cmd_terminal_output;
+
+GRUB_MOD_INIT(terminal)
+{
+ cmd_terminal_input =
+ grub_register_command ("terminal_input", grub_cmd_terminal_input,
+ N_("[--append|--remove] "
+ "[TERMINAL1] [TERMINAL2] ..."),
+ N_("List or select an input terminal."));
+ cmd_terminal_output =
+ grub_register_command ("terminal_output", grub_cmd_terminal_output,
+ N_("[--append|--remove] "
+ "[TERMINAL1] [TERMINAL2] ..."),
+ N_("List or select an output terminal."));
+}
+
+GRUB_MOD_FINI(terminal)
+{
+ grub_unregister_command (cmd_terminal_input);
+ grub_unregister_command (cmd_terminal_output);
+}
diff --git a/grub-core/commands/test.c b/grub-core/commands/test.c
new file mode 100644
index 0000000..50d5aba
--- /dev/null
+++ b/grub-core/commands/test.c
@@ -0,0 +1,438 @@
+/* test.c -- The test command.. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/fs.h>
+#include <grub/device.h>
+#include <grub/file.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* A simple implementation for signed numbers. */
+static int
+grub_strtosl (char *arg, char **end, int base)
+{
+ if (arg[0] == '-')
+ return -grub_strtoul (arg + 1, end, base);
+ return grub_strtoul (arg, end, base);
+}
+
+/* Parse a test expression starting from *argn. */
+static int
+test_parse (char **args, int *argn, int argc)
+{
+ int ret = 0, discard = 0, invert = 0;
+ int file_exists;
+ struct grub_dirhook_info file_info;
+
+ auto void update_val (int val);
+ auto void get_fileinfo (char *pathname);
+
+ /* Take care of discarding and inverting. */
+ void update_val (int val)
+ {
+ if (! discard)
+ ret = invert ? ! val : val;
+ invert = discard = 0;
+ }
+
+ /* Check if file exists and fetch its information. */
+ void get_fileinfo (char *path)
+ {
+ char *filename, *pathname;
+ char *device_name;
+ grub_fs_t fs;
+ grub_device_t dev;
+
+ /* A hook for iterating directories. */
+ auto int find_file (const char *cur_filename,
+ const struct grub_dirhook_info *info);
+ int find_file (const char *cur_filename,
+ const struct grub_dirhook_info *info)
+ {
+ if ((info->case_insensitive ? grub_strcasecmp (cur_filename, filename)
+ : grub_strcmp (cur_filename, filename)) == 0)
+ {
+ file_info = *info;
+ file_exists = 1;
+ return 1;
+ }
+ return 0;
+ }
+
+ file_exists = 0;
+ device_name = grub_file_get_device_name (path);
+ dev = grub_device_open (device_name);
+ if (! dev)
+ {
+ grub_free (device_name);
+ return;
+ }
+
+ fs = grub_fs_probe (dev);
+ if (! fs)
+ {
+ grub_free (device_name);
+ grub_device_close (dev);
+ return;
+ }
+
+ pathname = grub_strchr (path, ')');
+ if (! pathname)
+ pathname = path;
+ else
+ pathname++;
+
+ /* Remove trailing '/'. */
+ while (*pathname && pathname[grub_strlen (pathname) - 1] == '/')
+ pathname[grub_strlen (pathname) - 1] = 0;
+
+ /* Split into path and filename. */
+ filename = grub_strrchr (pathname, '/');
+ if (! filename)
+ {
+ path = grub_strdup ("/");
+ filename = pathname;
+ }
+ else
+ {
+ filename++;
+ path = grub_strdup (pathname);
+ path[filename - pathname] = 0;
+ }
+
+ /* It's the whole device. */
+ if (! *pathname)
+ {
+ file_exists = 1;
+ grub_memset (&file_info, 0, sizeof (file_info));
+ /* Root is always a directory. */
+ file_info.dir = 1;
+
+ /* Fetch writing time. */
+ file_info.mtimeset = 0;
+ if (fs->mtime)
+ {
+ if (! fs->mtime (dev, &file_info.mtime))
+ file_info.mtimeset = 1;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+ else
+ (fs->dir) (dev, path, find_file);
+
+ grub_device_close (dev);
+ grub_free (path);
+ grub_free (device_name);
+ }
+
+ /* Here we have the real parsing. */
+ while (*argn < argc)
+ {
+ /* First try 3 argument tests. */
+ if (*argn + 2 < argc)
+ {
+ /* String tests. */
+ if (grub_strcmp (args[*argn + 1], "=") == 0
+ || grub_strcmp (args[*argn + 1], "==") == 0)
+ {
+ update_val (grub_strcmp (args[*argn], args[*argn + 2]) == 0);
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], "!=") == 0)
+ {
+ update_val (grub_strcmp (args[*argn], args[*argn + 2]) != 0);
+ (*argn) += 3;
+ continue;
+ }
+
+ /* GRUB extension: lexicographical sorting. */
+ if (grub_strcmp (args[*argn + 1], "<") == 0)
+ {
+ update_val (grub_strcmp (args[*argn], args[*argn + 2]) < 0);
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], "<=") == 0)
+ {
+ update_val (grub_strcmp (args[*argn], args[*argn + 2]) <= 0);
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], ">") == 0)
+ {
+ update_val (grub_strcmp (args[*argn], args[*argn + 2]) > 0);
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], ">=") == 0)
+ {
+ update_val (grub_strcmp (args[*argn], args[*argn + 2]) >= 0);
+ (*argn) += 3;
+ continue;
+ }
+
+ /* Number tests. */
+ if (grub_strcmp (args[*argn + 1], "-eq") == 0)
+ {
+ update_val (grub_strtosl (args[*argn], 0, 0)
+ == grub_strtosl (args[*argn + 2], 0, 0));
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], "-ge") == 0)
+ {
+ update_val (grub_strtosl (args[*argn], 0, 0)
+ >= grub_strtosl (args[*argn + 2], 0, 0));
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], "-gt") == 0)
+ {
+ update_val (grub_strtosl (args[*argn], 0, 0)
+ > grub_strtosl (args[*argn + 2], 0, 0));
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], "-le") == 0)
+ {
+ update_val (grub_strtosl (args[*argn], 0, 0)
+ <= grub_strtosl (args[*argn + 2], 0, 0));
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], "-lt") == 0)
+ {
+ update_val (grub_strtosl (args[*argn], 0, 0)
+ < grub_strtosl (args[*argn + 2], 0, 0));
+ (*argn) += 3;
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn + 1], "-ne") == 0)
+ {
+ update_val (grub_strtosl (args[*argn], 0, 0)
+ != grub_strtosl (args[*argn + 2], 0, 0));
+ (*argn) += 3;
+ continue;
+ }
+
+ /* GRUB extension: compare numbers skipping prefixes.
+ Useful for comparing versions. E.g. vmlinuz-2 -plt vmlinuz-11. */
+ if (grub_strcmp (args[*argn + 1], "-pgt") == 0
+ || grub_strcmp (args[*argn + 1], "-plt") == 0)
+ {
+ int i;
+ /* Skip common prefix. */
+ for (i = 0; args[*argn][i] == args[*argn + 2][i]
+ && args[*argn][i]; i++);
+
+ /* Go the digits back. */
+ i--;
+ while (grub_isdigit (args[*argn][i]) && i > 0)
+ i--;
+ i++;
+
+ if (grub_strcmp (args[*argn + 1], "-pgt") == 0)
+ update_val (grub_strtoul (args[*argn] + i, 0, 0)
+ > grub_strtoul (args[*argn + 2] + i, 0, 0));
+ else
+ update_val (grub_strtoul (args[*argn] + i, 0, 0)
+ < grub_strtoul (args[*argn + 2] + i, 0, 0));
+ (*argn) += 3;
+ continue;
+ }
+
+ /* -nt and -ot tests. GRUB extension: when doing -?t<bias> bias
+ will be added to the first mtime. */
+ if (grub_memcmp (args[*argn + 1], "-nt", 3) == 0
+ || grub_memcmp (args[*argn + 1], "-ot", 3) == 0)
+ {
+ struct grub_dirhook_info file1;
+ int file1exists;
+ int bias = 0;
+
+ /* Fetch fileinfo. */
+ get_fileinfo (args[*argn]);
+ file1 = file_info;
+ file1exists = file_exists;
+ get_fileinfo (args[*argn + 2]);
+
+ if (args[*argn + 1][3])
+ bias = grub_strtosl (args[*argn + 1] + 3, 0, 0);
+
+ if (grub_memcmp (args[*argn + 1], "-nt", 3) == 0)
+ update_val ((file1exists && ! file_exists)
+ || (file1.mtimeset && file_info.mtimeset
+ && file1.mtime + bias > file_info.mtime));
+ else
+ update_val ((! file1exists && file_exists)
+ || (file1.mtimeset && file_info.mtimeset
+ && file1.mtime + bias < file_info.mtime));
+ (*argn) += 3;
+ continue;
+ }
+ }
+
+ /* Two-argument tests. */
+ if (*argn + 1 < argc)
+ {
+ /* File tests. */
+ if (grub_strcmp (args[*argn], "-d") == 0)
+ {
+ get_fileinfo (args[*argn + 1]);
+ update_val (file_exists && file_info.dir);
+ (*argn) += 2;
+ return ret;
+ }
+
+ if (grub_strcmp (args[*argn], "-e") == 0)
+ {
+ get_fileinfo (args[*argn + 1]);
+ update_val (file_exists);
+ (*argn) += 2;
+ return ret;
+ }
+
+ if (grub_strcmp (args[*argn], "-f") == 0)
+ {
+ get_fileinfo (args[*argn + 1]);
+ /* FIXME: check for other types. */
+ update_val (file_exists && ! file_info.dir);
+ (*argn) += 2;
+ return ret;
+ }
+
+ if (grub_strcmp (args[*argn], "-s") == 0)
+ {
+ grub_file_t file;
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (args[*argn + 1]);
+ update_val (file && (grub_file_size (file) != 0));
+ if (file)
+ grub_file_close (file);
+ grub_errno = GRUB_ERR_NONE;
+ (*argn) += 2;
+ return ret;
+ }
+
+ /* String tests. */
+ if (grub_strcmp (args[*argn], "-n") == 0)
+ {
+ update_val (args[*argn + 1][0]);
+
+ (*argn) += 2;
+ continue;
+ }
+ if (grub_strcmp (args[*argn], "-z") == 0)
+ {
+ update_val (! args[*argn + 1][0]);
+ (*argn) += 2;
+ continue;
+ }
+ }
+
+ /* Special modifiers. */
+
+ /* End of expression. return to parent. */
+ if (grub_strcmp (args[*argn], ")") == 0)
+ {
+ (*argn)++;
+ return ret;
+ }
+ /* Recursively invoke if parenthesis. */
+ if (grub_strcmp (args[*argn], "(") == 0)
+ {
+ (*argn)++;
+ update_val (test_parse (args, argn, argc));
+ continue;
+ }
+
+ if (grub_strcmp (args[*argn], "!") == 0)
+ {
+ invert = ! invert;
+ (*argn)++;
+ continue;
+ }
+ if (grub_strcmp (args[*argn], "-a") == 0)
+ {
+ /* If current value is 0 second value is to be discarded. */
+ discard = ! ret;
+ (*argn)++;
+ continue;
+ }
+ if (grub_strcmp (args[*argn], "-o") == 0)
+ {
+ /* If current value is 1 second value is to be discarded. */
+ discard = ret;
+ (*argn)++;
+ continue;
+ }
+
+ /* No test found. Interpret if as just a string. */
+ update_val (args[*argn][0]);
+ (*argn)++;
+ }
+ return ret;
+}
+
+static grub_err_t
+grub_cmd_test (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ int argn = 0;
+
+ if (argc >= 1 && grub_strcmp (args[argc - 1], "]") == 0)
+ argc--;
+
+ return test_parse (args, &argn, argc) ? GRUB_ERR_NONE
+ : grub_error (GRUB_ERR_TEST_FAILURE, "false");
+}
+
+static grub_command_t cmd_1, cmd_2;
+
+GRUB_MOD_INIT(test)
+{
+ cmd_1 = grub_register_command ("[", grub_cmd_test,
+ N_("EXPRESSION ]"), N_("Evaluate an expression."));
+ cmd_1->flags |= GRUB_COMMAND_FLAG_EXTRACTOR;
+ cmd_2 = grub_register_command ("test", grub_cmd_test,
+ N_("EXPRESSION"), N_("Evaluate an expression."));
+ cmd_2->flags |= GRUB_COMMAND_FLAG_EXTRACTOR;
+}
+
+GRUB_MOD_FINI(test)
+{
+ grub_unregister_command (cmd_1);
+ grub_unregister_command (cmd_2);
+}
diff --git a/grub-core/commands/testload.c b/grub-core/commands/testload.c
new file mode 100644
index 0000000..fe06f3d
--- /dev/null
+++ b/grub-core/commands/testload.c
@@ -0,0 +1,157 @@
+/* testload.c - load the same file in multiple ways */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/term.h>
+#include <grub/loader.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_testload (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file;
+ char *buf;
+ grub_size_t size;
+ grub_off_t pos;
+ auto void NESTED_FUNC_ATTR read_func (grub_disk_addr_t sector, unsigned offset, unsigned len);
+
+ void NESTED_FUNC_ATTR read_func (grub_disk_addr_t sector __attribute__ ((unused)),
+ unsigned offset __attribute__ ((unused)),
+ unsigned len __attribute__ ((unused)))
+ {
+ grub_xputs (".");
+ grub_refresh ();
+ }
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_errno;
+
+ size = grub_file_size (file) & ~(GRUB_DISK_SECTOR_SIZE - 1);
+ if (size == 0)
+ {
+ grub_file_close (file);
+ return GRUB_ERR_NONE;
+ }
+
+ buf = grub_malloc (size);
+ if (! buf)
+ goto fail;
+
+ grub_printf ("Reading %s sequentially", argv[0]);
+ file->read_hook = read_func;
+ if (grub_file_read (file, buf, size) != (grub_ssize_t) size)
+ goto fail;
+ grub_printf (" Done.\n");
+
+ /* Read sequentially again. */
+ grub_printf ("Reading %s sequentially again", argv[0]);
+ grub_file_seek (file, 0);
+
+ for (pos = 0; pos < size; pos += GRUB_DISK_SECTOR_SIZE)
+ {
+ char sector[GRUB_DISK_SECTOR_SIZE];
+
+ if (grub_file_read (file, sector, GRUB_DISK_SECTOR_SIZE)
+ != GRUB_DISK_SECTOR_SIZE)
+ goto fail;
+
+ if (grub_memcmp (sector, buf + pos, GRUB_DISK_SECTOR_SIZE) != 0)
+ {
+ grub_printf ("\nDiffers in %lld\n", (unsigned long long) pos);
+ goto fail;
+ }
+ }
+ grub_printf (" Done.\n");
+
+ /* Read backwards and compare. */
+ grub_printf ("Reading %s backwards", argv[0]);
+ pos = size;
+ while (pos > 0)
+ {
+ char sector[GRUB_DISK_SECTOR_SIZE];
+
+ pos -= GRUB_DISK_SECTOR_SIZE;
+
+ grub_file_seek (file, pos);
+
+ if (grub_file_read (file, sector, GRUB_DISK_SECTOR_SIZE)
+ != GRUB_DISK_SECTOR_SIZE)
+ goto fail;
+
+ if (grub_memcmp (sector, buf + pos, GRUB_DISK_SECTOR_SIZE) != 0)
+ {
+ int i;
+
+ grub_printf ("\nDiffers in %lld\n", (unsigned long long) pos);
+
+ for (i = 0; i < GRUB_DISK_SECTOR_SIZE; i++)
+ {
+ grub_printf ("%02x ", buf[pos + i]);
+ if ((i & 15) == 15)
+ grub_printf ("\n");
+ }
+
+ if (i)
+ grub_refresh ();
+
+ goto fail;
+ }
+ }
+ grub_printf (" Done.\n");
+
+ return GRUB_ERR_NONE;
+
+ fail:
+
+ grub_file_close (file);
+ grub_free (buf);
+
+ if (!grub_errno)
+ grub_error (GRUB_ERR_IO, "bad read");
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(testload)
+{
+ cmd =
+ grub_register_command ("testload", grub_cmd_testload,
+ N_("FILE"),
+ N_("Load the same file in multiple ways."));
+}
+
+GRUB_MOD_FINI(testload)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/true.c b/grub-core/commands/true.c
new file mode 100644
index 0000000..82775e7
--- /dev/null
+++ b/grub-core/commands/true.c
@@ -0,0 +1,59 @@
+/* true.c - true and false commands. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_true (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_false (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ return grub_error (GRUB_ERR_TEST_FAILURE, "false");
+}
+
+static grub_command_t cmd_true, cmd_false;
+
+
+GRUB_MOD_INIT(true)
+{
+ cmd_true =
+ grub_register_command ("true", grub_cmd_true,
+ 0, N_("Do nothing, successfully."));
+ cmd_false =
+ grub_register_command ("false", grub_cmd_false,
+ 0, N_("Do nothing, unsuccessfully."));
+}
+
+GRUB_MOD_FINI(true)
+{
+ grub_unregister_command (cmd_true);
+ grub_unregister_command (cmd_false);
+}
diff --git a/grub-core/commands/usbtest.c b/grub-core/commands/usbtest.c
new file mode 100644
index 0000000..4a051ad
--- /dev/null
+++ b/grub-core/commands/usbtest.c
@@ -0,0 +1,218 @@
+/* usbtest.c - test module for USB */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/charset.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/usb.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static const char *usb_classes[] =
+ {
+ "Unknown",
+ "Audio",
+ "Communication Interface",
+ "HID",
+ "Unknown",
+ "Physical",
+ "Image",
+ "Printer",
+ "Mass Storage",
+ "Hub",
+ "Data Interface",
+ "Smart Card",
+ "Content Security",
+ "Video"
+ };
+
+static const char *usb_endp_type[] =
+ {
+ "Control",
+ "Isochronous",
+ "Bulk",
+ "Interrupt"
+ };
+
+static const char *usb_devspeed[] =
+ {
+ "",
+ "Low",
+ "Full",
+ "High"
+ };
+
+static grub_usb_err_t
+grub_usb_get_string (grub_usb_device_t dev, grub_uint8_t index, int langid,
+ char **string)
+{
+ struct grub_usb_desc_str descstr;
+ struct grub_usb_desc_str *descstrp;
+ grub_usb_err_t err;
+
+ /* Only get the length. */
+ err = grub_usb_control_msg (dev, 1 << 7,
+ 0x06, (3 << 8) | index,
+ langid, 1, (char *) &descstr);
+ if (err)
+ return err;
+
+ descstrp = grub_malloc (descstr.length);
+ if (! descstrp)
+ return GRUB_USB_ERR_INTERNAL;
+ err = grub_usb_control_msg (dev, 1 << 7,
+ 0x06, (3 << 8) | index,
+ langid, descstr.length, (char *) descstrp);
+
+ if (descstrp->length == 0)
+ {
+ grub_free (descstrp);
+ *string = grub_strdup ("");
+ if (! *string)
+ return GRUB_USB_ERR_INTERNAL;
+ return GRUB_USB_ERR_NONE;
+ }
+
+ *string = grub_malloc (descstr.length * 2 + 1);
+ if (! *string)
+ {
+ grub_free (descstrp);
+ return GRUB_USB_ERR_INTERNAL;
+ }
+
+ *grub_utf16_to_utf8 ((grub_uint8_t *) *string, descstrp->str,
+ descstrp->length / 2 - 1) = 0;
+ grub_free (descstrp);
+
+ return GRUB_USB_ERR_NONE;
+}
+
+static void
+usb_print_str (const char *description, grub_usb_device_t dev, int idx)
+{
+ char *name;
+ grub_usb_err_t err;
+ /* XXX: LANGID */
+
+ if (! idx)
+ return;
+
+ err = grub_usb_get_string (dev, idx, 0x0409, &name);
+ if (err)
+ grub_printf ("Error %d retrieving %s\n", err, description);
+ else
+ {
+ grub_printf ("%s: `%s'\n", description, name);
+ grub_free (name);
+ }
+}
+
+static int
+usb_iterate (grub_usb_device_t dev)
+{
+ struct grub_usb_desc_device *descdev;
+ int i;
+
+ descdev = &dev->descdev;
+
+ usb_print_str ("Product", dev, descdev->strprod);
+ usb_print_str ("Vendor", dev, descdev->strvendor);
+ usb_print_str ("Serial", dev, descdev->strserial);
+
+ grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
+ descdev->class, descdev->class < ARRAY_SIZE (usb_classes)
+ ? usb_classes[descdev->class] : "Unknown",
+ descdev->subclass, descdev->protocol);
+ grub_printf ("USB version %d.%d, VendorID: 0x%02x, ProductID: 0x%02x, #conf: %d\n",
+ descdev->usbrel >> 8, (descdev->usbrel >> 4) & 0x0F,
+ descdev->vendorid, descdev->prodid, descdev->configcnt);
+
+ grub_printf ("%s speed device\n", usb_devspeed[dev->speed]);
+
+ for (i = 0; i < descdev->configcnt; i++)
+ {
+ struct grub_usb_desc_config *config;
+
+ config = dev->config[i].descconf;
+ usb_print_str ("Configuration:", dev, config->strconfig);
+ }
+
+ for (i = 0; i < dev->config[0].descconf->numif; i++)
+ {
+ int j;
+ struct grub_usb_desc_if *interf;
+ interf = dev->config[0].interf[i].descif;
+
+ grub_printf ("Interface #%d: #Endpoints: %d ",
+ i, interf->endpointcnt);
+ grub_printf ("Class: (0x%02x) %s, Subclass: 0x%02x, Protocol: 0x%02x\n",
+ interf->class, interf->class < ARRAY_SIZE (usb_classes)
+ ? usb_classes[interf->class] : "Unknown",
+ interf->subclass, interf->protocol);
+
+ usb_print_str ("Interface", dev, interf->strif);
+
+ for (j = 0; j < interf->endpointcnt; j++)
+ {
+ struct grub_usb_desc_endp *endp;
+ endp = &dev->config[0].interf[i].descendp[j];
+
+ grub_printf ("Endpoint #%d: %s, max packed size: %d, transfer type: %s, latency: %d\n",
+ endp->endp_addr & 15,
+ (endp->endp_addr & 128) ? "IN" : "OUT",
+ endp->maxpacket, usb_endp_type[endp->attrib & 3],
+ endp->interval);
+ }
+ }
+
+ grub_printf("\n");
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_usbtest (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_usb_poll_devices ();
+
+ grub_printf ("USB devices:\n\n");
+ grub_usb_iterate (usb_iterate);
+
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(usbtest)
+{
+ cmd = grub_register_command ("usb", grub_cmd_usbtest,
+ 0, N_("Test USB support."));
+}
+
+GRUB_MOD_FINI(usbtest)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/commands/videoinfo.c b/grub-core/commands/videoinfo.c
new file mode 100644
index 0000000..3e0c1a1
--- /dev/null
+++ b/grub-core/commands/videoinfo.c
@@ -0,0 +1,186 @@
+/* videoinfo.c - command to list video modes. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/video.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static unsigned height, width, depth;
+
+static int
+hook (const struct grub_video_mode_info *info)
+{
+ if (height && width && (info->width != width || info->height != height))
+ return 0;
+
+ if (depth && info->bpp != depth)
+ return 0;
+
+ if (info->mode_number == GRUB_VIDEO_MODE_NUMBER_INVALID)
+ grub_printf (" ");
+ else
+ grub_printf (" 0x%03x ", info->mode_number);
+ grub_printf ("%4d x %4d x %2d ", info->width, info->height, info->bpp);
+
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_PURE_TEXT)
+ grub_printf ("Text-only ");
+ /* Show mask and position details for direct color modes. */
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_RGB)
+ grub_printf ("Direct, mask: %d/%d/%d/%d pos: %d/%d/%d/%d",
+ info->red_mask_size,
+ info->green_mask_size,
+ info->blue_mask_size,
+ info->reserved_mask_size,
+ info->red_field_pos,
+ info->green_field_pos,
+ info->blue_field_pos,
+ info->reserved_field_pos);
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)
+ grub_printf ("Packed ");
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_YUV)
+ grub_printf ("YUV ");
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_PLANAR)
+ grub_printf ("Planar ");
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_HERCULES)
+ grub_printf ("Hercules ");
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_CGA)
+ grub_printf ("CGA ");
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_NONCHAIN4)
+ grub_printf ("Non-chain 4 ");
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP)
+ grub_printf ("Monochrome ");
+ if (info->mode_type & GRUB_VIDEO_MODE_TYPE_UNKNOWN)
+ grub_printf ("Unknown ");
+
+ grub_printf ("\n");
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_videoinfo (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_video_adapter_t adapter;
+ grub_video_driver_id_t id;
+
+ height = width = depth = 0;
+ if (argc)
+ {
+ char *ptr;
+ ptr = args[0];
+ width = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ if (*ptr != 'x')
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid mode specification");
+ ptr++;
+ height = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ if (*ptr == 'x')
+ {
+ ptr++;
+ depth = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ }
+ }
+
+#ifdef GRUB_MACHINE_PCBIOS
+ if (grub_strcmp (cmd->name, "vbeinfo") == 0)
+ grub_dl_load ("vbe");
+#endif
+
+ id = grub_video_get_driver_id ();
+
+ grub_printf ("List of supported video modes:\n");
+ grub_printf ("Legend: P=Packed pixel, D=Direct color, "
+ "mask/pos=R/G/B/reserved\n");
+
+ FOR_VIDEO_ADAPTERS (adapter)
+ {
+ grub_printf ("Adapter '%s':\n", adapter->name);
+
+ if (!adapter->iterate)
+ {
+ grub_printf (" No info available\n");
+ continue;
+ }
+
+ if (adapter->id != id)
+ {
+ if (adapter->init ())
+ {
+ grub_printf (" Failed\n");
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+ }
+
+ if (adapter->print_adapter_specific_info)
+ adapter->print_adapter_specific_info ();
+
+ adapter->iterate (hook);
+
+ if (adapter->id != id)
+ {
+ if (adapter->fini ())
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd;
+#ifdef GRUB_MACHINE_PCBIOS
+static grub_command_t cmd_vbe;
+#endif
+
+GRUB_MOD_INIT(videoinfo)
+{
+ cmd = grub_register_command ("videoinfo", grub_cmd_videoinfo, "[WxH[xD]]",
+ N_("List available video modes. If "
+ "resolution is given show only modes"
+ " matching it."));
+#ifdef GRUB_MACHINE_PCBIOS
+ cmd_vbe = grub_register_command ("vbeinfo", grub_cmd_videoinfo, "[WxH[xD]]",
+ N_("List available video modes. If "
+ "resolution is given show only modes"
+ " matching it."));
+#endif
+}
+
+GRUB_MOD_FINI(videoinfo)
+{
+ grub_unregister_command (cmd);
+#ifdef GRUB_MACHINE_PCBIOS
+ grub_unregister_command (cmd_vbe);
+#endif
+}
+
diff --git a/grub-core/commands/videotest.c b/grub-core/commands/videotest.c
new file mode 100644
index 0000000..dc7a648
--- /dev/null
+++ b/grub-core/commands/videotest.c
@@ -0,0 +1,218 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/video.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/font.h>
+#include <grub/term.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/gfxmenu_view.h>
+#include <grub/env.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_err_t err;
+ grub_video_color_t color;
+ unsigned int x;
+ unsigned int y;
+ unsigned int width;
+ unsigned int height;
+ int i;
+ struct grub_video_render_target *text_layer;
+ grub_video_color_t palette[16];
+ const char *mode = NULL;
+
+#ifdef GRUB_MACHINE_PCBIOS
+ if (grub_strcmp (cmd->name, "vbetest") == 0)
+ grub_dl_load ("vbe");
+#endif
+
+ mode = grub_env_get ("gfxmode");
+ if (argc)
+ mode = args[0];
+ if (!mode)
+ mode = "auto";
+
+ err = grub_video_set_mode (mode, GRUB_VIDEO_MODE_TYPE_PURE_TEXT, 0);
+ if (err)
+ return err;
+
+ grub_video_get_viewport (&x, &y, &width, &height);
+
+ {
+ const char *str;
+ int texty;
+ grub_font_t sansbig;
+ grub_font_t sans;
+ grub_font_t sanssmall;
+ grub_font_t fixed;
+ struct grub_font_glyph *glyph;
+
+ grub_video_create_render_target (&text_layer, width, height,
+ GRUB_VIDEO_MODE_TYPE_RGB
+ | GRUB_VIDEO_MODE_TYPE_ALPHA);
+
+ grub_video_set_active_render_target (text_layer);
+
+ color = grub_video_map_rgb (0, 255, 255);
+ sansbig = grub_font_get ("Unknown Regular 16");
+ sans = grub_font_get ("Unknown Regular 16");
+ sanssmall = grub_font_get ("Unknown Regular 16");
+ fixed = grub_font_get ("Fixed 20");
+ if (! sansbig || ! sans || ! sanssmall || ! fixed)
+ return grub_error (GRUB_ERR_BAD_FONT, "no font loaded");
+
+ glyph = grub_font_get_glyph (fixed, '*');
+ grub_font_draw_glyph (glyph, color, 200 ,0);
+
+ color = grub_video_map_rgb (255, 255, 255);
+
+ texty = 32;
+ grub_font_draw_string ("The quick brown fox jumped over the lazy dog.",
+ sans, color, 16, texty);
+ texty += grub_font_get_descent (sans) + grub_font_get_leading (sans);
+
+ texty += grub_font_get_ascent (fixed);
+ grub_font_draw_string ("The quick brown fox jumped over the lazy dog.",
+ fixed, color, 16, texty);
+ texty += grub_font_get_descent (fixed) + grub_font_get_leading (fixed);
+
+ /* To convert Unicode characters into UTF-8 for this test, the following
+ command is useful:
+ echo -ne '\x00\x00\x26\x3A' | iconv -f UTF-32BE -t UTF-8 | od -t x1
+ This converts the Unicode character U+263A to UTF-8. */
+
+ /* Characters used:
+ Code point Description UTF-8 encoding
+ ----------- ------------------------------ --------------
+ U+263A unfilled smiley face E2 98 BA
+ U+00A1 inverted exclamation point C2 A1
+ U+00A3 British pound currency symbol C2 A3
+ U+03C4 Greek tau CF 84
+ U+00E4 lowercase letter a with umlaut C3 A4
+ U+2124 set 'Z' symbol (integers) E2 84 A4
+ U+2287 subset symbol E2 8A 87
+ U+211D set 'R' symbol (real numbers) E2 84 9D */
+
+ str =
+ "Unicode test: happy\xE2\x98\xBA \xC2\xA3 5.00"
+ " \xC2\xA1\xCF\x84\xC3\xA4u! "
+ " \xE2\x84\xA4\xE2\x8A\x87\xE2\x84\x9D";
+ color = grub_video_map_rgb (128, 128, 255);
+
+ /* All characters in the string exist in the 'Fixed 20' (10x20) font. */
+ texty += grub_font_get_ascent(fixed);
+ grub_font_draw_string (str, fixed, color, 16, texty);
+ texty += grub_font_get_descent (fixed) + grub_font_get_leading (fixed);
+
+ texty += grub_font_get_ascent(sansbig);
+ grub_font_draw_string (str, sansbig, color, 16, texty);
+ texty += grub_font_get_descent (sansbig) + grub_font_get_leading (sansbig);
+
+ texty += grub_font_get_ascent(sans);
+ grub_font_draw_string (str, sans, color, 16, texty);
+ texty += grub_font_get_descent (sans) + grub_font_get_leading (sans);
+
+ texty += grub_font_get_ascent(sanssmall);
+ grub_font_draw_string (str, sanssmall, color, 16, texty);
+ texty += (grub_font_get_descent (sanssmall)
+ + grub_font_get_leading (sanssmall));
+
+ glyph = grub_font_get_glyph (fixed, '*');
+
+ for (i = 0; i < 16; i++)
+ {
+ color = grub_video_map_color (i);
+ palette[i] = color;
+ grub_font_draw_glyph (glyph, color, 16 + i * 16, 220);
+ }
+ }
+
+ grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
+
+ for (i = 0; i < 2; i++)
+ {
+ color = grub_video_map_rgb (0, 0, 0);
+ grub_video_fill_rect (color, 0, 0, width, height);
+
+ color = grub_video_map_rgb (255, 0, 0);
+ grub_video_fill_rect (color, 0, 0, 100, 100);
+
+ color = grub_video_map_rgb (0, 255, 255);
+ grub_video_fill_rect (color, 100, 100, 100, 100);
+
+ grub_video_set_viewport (x + 150, y + 150,
+ width - 150 * 2, height - 150 * 2);
+ color = grub_video_map_rgb (77, 33, 77);
+ grub_video_fill_rect (color, 0, 0, width, height);
+ grub_video_swap_buffers ();
+ }
+
+ for (i = 0; i < 5; i++)
+ {
+ color = grub_video_map_rgb (i, 33, 77);
+ grub_video_fill_rect (color, 0, 0, width, height);
+ grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_BLEND, 0, 0,
+ 0, 0, width, height);
+ grub_video_swap_buffers ();
+ }
+
+ grub_getkey ();
+
+ grub_video_delete_render_target (text_layer);
+
+ grub_video_restore ();
+
+ for (i = 0; i < 16; i++)
+ grub_printf("color %d: %08x\n", i, palette[i]);
+
+ grub_errno = GRUB_ERR_NONE;
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+#ifdef GRUB_MACHINE_PCBIOS
+static grub_command_t cmd_vbe;
+#endif
+
+GRUB_MOD_INIT(videotest)
+{
+ cmd = grub_register_command ("videotest", grub_cmd_videotest,
+ "[WxH]",
+ N_("Test video subsystem in mode WxH."));
+#ifdef GRUB_MACHINE_PCBIOS
+ cmd_vbe = grub_register_command ("vbetest", grub_cmd_videotest,
+ 0, N_("Test video subsystem."));
+#endif
+}
+
+GRUB_MOD_FINI(videotest)
+{
+ grub_unregister_command (cmd);
+#ifdef GRUB_MACHINE_PCBIOS
+ grub_unregister_command (cmd_vbe);
+#endif
+}
diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c
new file mode 100644
index 0000000..32561ab
--- /dev/null
+++ b/grub-core/commands/wildcard.c
@@ -0,0 +1,495 @@
+/* wildcard.c - Wildcard character expansion for GRUB script. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/fs.h>
+#include <grub/env.h>
+#include <grub/file.h>
+#include <grub/device.h>
+#include <grub/script_sh.h>
+
+#include <regex.h>
+
+static inline int isregexop (char ch);
+static char ** merge (char **lhs, char **rhs);
+static char *make_dir (const char *prefix, const char *start, const char *end);
+static int make_regex (const char *regex_start, const char *regex_end,
+ regex_t *regexp);
+static void split_path (const char *path, const char **suffix_end, const char **regex_end);
+static char ** match_devices (const regex_t *regexp, int noparts);
+static char ** match_files (const char *prefix, const char *suffix_start,
+ const char *suffix_end, const regex_t *regexp);
+
+static char* wildcard_escape (const char *s);
+static char* wildcard_unescape (const char *s);
+static grub_err_t wildcard_expand (const char *s, char ***strs);
+
+struct grub_script_wildcard_translator grub_filename_translator = {
+ .expand = wildcard_expand,
+ .escape = wildcard_escape,
+ .unescape = wildcard_unescape
+};
+
+static char **
+merge (char **dest, char **ps)
+{
+ int i;
+ int j;
+ char **p;
+
+ if (! dest)
+ return ps;
+
+ if (! ps)
+ return dest;
+
+ for (i = 0; dest[i]; i++)
+ ;
+ for (j = 0; ps[j]; j++)
+ ;
+
+ p = grub_realloc (dest, sizeof (char*) * (i + j + 1));
+ if (! p)
+ {
+ grub_free (dest);
+ grub_free (ps);
+ return 0;
+ }
+
+ dest = p;
+ for (j = 0; ps[j]; j++)
+ dest[i++] = ps[j];
+ dest[i] = 0;
+
+ grub_free (ps);
+ return dest;
+}
+
+static inline int
+isregexop (char ch)
+{
+ return grub_strchr ("*.\\", ch) ? 1 : 0;
+}
+
+static char *
+make_dir (const char *prefix, const char *start, const char *end)
+{
+ char ch;
+ unsigned i;
+ unsigned n;
+ char *result;
+
+ i = grub_strlen (prefix);
+ n = i + end - start;
+
+ result = grub_malloc (n + 1);
+ if (! result)
+ return 0;
+
+ grub_strcpy (result, prefix);
+ while (start < end && (ch = *start++))
+ if (ch == '\\' && isregexop (*start))
+ result[i++] = *start++;
+ else
+ result[i++] = ch;
+
+ result[i] = '\0';
+ return result;
+}
+
+static int
+make_regex (const char *start, const char *end, regex_t *regexp)
+{
+ char ch;
+ int i = 0;
+ unsigned len = end - start;
+ char *buffer = grub_malloc (len * 2 + 2 + 1); /* worst case size. */
+
+ if (! buffer)
+ return 1;
+
+ buffer[i++] = '^';
+ while (start < end)
+ {
+ /* XXX Only * expansion for now. */
+ switch ((ch = *start++))
+ {
+ case '\\':
+ buffer[i++] = ch;
+ if (*start != '\0')
+ buffer[i++] = *start++;
+ break;
+
+ case '.':
+ case '(':
+ case ')':
+ buffer[i++] = '\\';
+ buffer[i++] = ch;
+ break;
+
+ case '*':
+ buffer[i++] = '.';
+ buffer[i++] = '*';
+ break;
+
+ default:
+ buffer[i++] = ch;
+ }
+ }
+ buffer[i++] = '$';
+ buffer[i] = '\0';
+ grub_dprintf ("expand", "Regexp is %s\n", buffer);
+
+ if (regcomp (regexp, buffer, RE_SYNTAX_GNU_AWK))
+ {
+ grub_free (buffer);
+ return 1;
+ }
+
+ grub_free (buffer);
+ return 0;
+}
+
+/* Split `str' into two parts: (1) dirname that is regexop free (2)
+ dirname that has a regexop. */
+static void
+split_path (const char *str, const char **noregexop, const char **regexop)
+{
+ char ch = 0;
+ int regex = 0;
+
+ const char *end;
+ const char *split; /* points till the end of dirnaname that doesn't
+ need expansion. */
+
+ split = end = str;
+ while ((ch = *end))
+ {
+ if (ch == '\\' && end[1])
+ end++;
+
+ else if (isregexop (ch))
+ regex = 1;
+
+ else if (ch == '/' && ! regex)
+ split = end + 1; /* forward to next regexop-free dirname */
+
+ else if (ch == '/' && regex)
+ break; /* stop at the first dirname with a regexop */
+
+ end++;
+ }
+
+ *regexop = end;
+ if (! regex)
+ *noregexop = end;
+ else
+ *noregexop = split;
+}
+
+static char **
+match_devices (const regex_t *regexp, int noparts)
+{
+ int i;
+ int ndev;
+ char **devs;
+
+ auto int match (const char *name);
+ int match (const char *name)
+ {
+ char **t;
+ char *buffer;
+
+ /* skip partitions if asked to. */
+ if (noparts && grub_strchr(name, ','))
+ return 0;
+
+ buffer = grub_xasprintf ("(%s)", name);
+ if (! buffer)
+ return 1;
+
+ grub_dprintf ("expand", "matching: %s\n", buffer);
+ if (regexec (regexp, buffer, 0, 0, 0))
+ {
+ grub_dprintf ("expand", "not matched\n");
+ grub_free (buffer);
+ return 0;
+ }
+
+ t = grub_realloc (devs, sizeof (char*) * (ndev + 2));
+ if (! t)
+ return 1;
+
+ devs = t;
+ devs[ndev++] = buffer;
+ devs[ndev] = 0;
+ return 0;
+ }
+
+ ndev = 0;
+ devs = 0;
+
+ if (grub_device_iterate (match))
+ goto fail;
+
+ return devs;
+
+ fail:
+
+ for (i = 0; devs && devs[i]; i++)
+ grub_free (devs[i]);
+
+ if (devs)
+ grub_free (devs);
+
+ return 0;
+}
+
+static char **
+match_files (const char *prefix, const char *suffix, const char *end,
+ const regex_t *regexp)
+{
+ int i;
+ char **files;
+ unsigned nfile;
+ char *dir;
+ const char *path;
+ char *device_name;
+ grub_fs_t fs;
+ grub_device_t dev;
+
+ auto int match (const char *name, const struct grub_dirhook_info *info);
+ int match (const char *name, const struct grub_dirhook_info *info)
+ {
+ char **t;
+ char *buffer;
+
+ /* skip . and .. names */
+ if (grub_strcmp(".", name) == 0 || grub_strcmp("..", name) == 0)
+ return 0;
+
+ grub_dprintf ("expand", "matching: %s in %s\n", name, dir);
+ if (regexec (regexp, name, 0, 0, 0))
+ return 0;
+
+ buffer = grub_xasprintf ("%s%s", dir, name);
+ if (! buffer)
+ return 1;
+
+ t = grub_realloc (files, sizeof (char*) * (nfile + 2));
+ if (! t)
+ {
+ grub_free (buffer);
+ return 1;
+ }
+
+ files = t;
+ files[nfile++] = buffer;
+ files[nfile] = 0;
+ return 0;
+ }
+
+ nfile = 0;
+ files = 0;
+ dev = 0;
+ device_name = 0;
+ grub_error_push ();
+
+ dir = make_dir (prefix, suffix, end);
+ if (! dir)
+ goto fail;
+
+ device_name = grub_file_get_device_name (dir);
+ dev = grub_device_open (device_name);
+ if (! dev)
+ goto fail;
+
+ fs = grub_fs_probe (dev);
+ if (! fs)
+ goto fail;
+
+ path = grub_strchr (dir, ')');
+ if (! path)
+ goto fail;
+ path++;
+
+ if (fs->dir (dev, path, match))
+ goto fail;
+
+ grub_free (dir);
+ grub_device_close (dev);
+ grub_free (device_name);
+ grub_error_pop ();
+ return files;
+
+ fail:
+
+ if (dir)
+ grub_free (dir);
+
+ for (i = 0; files && files[i]; i++)
+ grub_free (files[i]);
+
+ if (files)
+ grub_free (files);
+
+ if (dev)
+ grub_device_close (dev);
+
+ if (device_name)
+ grub_free (device_name);
+
+ grub_error_pop ();
+ return 0;
+}
+
+static char*
+wildcard_escape (const char *s)
+{
+ int i;
+ int len;
+ char ch;
+ char *p;
+
+ len = grub_strlen (s);
+ p = grub_malloc (len * 2 + 1);
+ if (! p)
+ return NULL;
+
+ i = 0;
+ while ((ch = *s++))
+ {
+ if (isregexop (ch))
+ p[i++] = '\\';
+ p[i++] = ch;
+ }
+ p[i] = '\0';
+ return p;
+}
+
+static char*
+wildcard_unescape (const char *s)
+{
+ int i;
+ int len;
+ char ch;
+ char *p;
+
+ len = grub_strlen (s);
+ p = grub_malloc (len + 1);
+ if (! p)
+ return NULL;
+
+ i = 0;
+ while ((ch = *s++))
+ {
+ if (ch == '\\' && isregexop (*s))
+ p[i++] = *s++;
+ else
+ p[i++] = ch;
+ }
+ p[i] = '\0';
+ return p;
+}
+
+static grub_err_t
+wildcard_expand (const char *s, char ***strs)
+{
+ const char *start;
+ const char *regexop;
+ const char *noregexop;
+ char **paths = 0;
+
+ unsigned i;
+ regex_t regexp;
+
+ start = s;
+ while (*start)
+ {
+ split_path (start, &noregexop, &regexop);
+ if (noregexop >= regexop) /* no more wildcards */
+ break;
+
+ if (make_regex (noregexop, regexop, &regexp))
+ goto fail;
+
+ if (paths == 0)
+ {
+ if (start == noregexop) /* device part has regexop */
+ paths = match_devices (&regexp, *start != '(');
+
+ else if (*start == '(') /* device part explicit wo regexop */
+ paths = match_files ("", start, noregexop, &regexp);
+
+ else if (*start == '/') /* no device part */
+ {
+ char *root;
+ char *prefix;
+
+ root = grub_env_get ("root");
+ if (! root)
+ goto fail;
+
+ prefix = grub_xasprintf ("(%s)", root);
+ if (! prefix)
+ goto fail;
+
+ paths = match_files (prefix, start, noregexop, &regexp);
+ grub_free (prefix);
+ }
+ }
+ else
+ {
+ char **r = 0;
+
+ for (i = 0; paths[i]; i++)
+ {
+ char **p;
+
+ p = match_files (paths[i], start, noregexop, &regexp);
+ if (! p)
+ continue;
+
+ r = merge (r, p);
+ if (! r)
+ goto fail;
+ }
+ paths = r;
+ }
+
+ regfree (&regexp);
+ if (! paths)
+ goto done;
+
+ start = regexop;
+ }
+
+ done:
+
+ *strs = paths;
+ return 0;
+
+ fail:
+
+ for (i = 0; paths && paths[i]; i++)
+ grub_free (paths[i]);
+ grub_free (paths);
+ regfree (&regexp);
+ return grub_errno;
+}
diff --git a/grub-core/commands/xnu_uuid.c b/grub-core/commands/xnu_uuid.c
new file mode 100644
index 0000000..f618b4e
--- /dev/null
+++ b/grub-core/commands/xnu_uuid.c
@@ -0,0 +1,102 @@
+/* xnu_uuid.c - transform 64-bit serial number
+ to 128-bit uuid suitable for xnu. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1995,1996,1998,1999,2001,2002,
+ * 2003, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/fs.h>
+#include <grub/file.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/crypto.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* This prefix is used by xnu and boot-132 to hash
+ together with volume serial. */
+static grub_uint8_t hash_prefix[16]
+ = {0xB3, 0xE2, 0x0F, 0x39, 0xF2, 0x92, 0x11, 0xD6,
+ 0x97, 0xA4, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC};
+
+static grub_err_t
+grub_cmd_xnu_uuid (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_uint64_t serial;
+ grub_uint8_t *xnu_uuid;
+ char uuid_string[sizeof ("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")];
+ char *ptr;
+ grub_uint8_t ctx[GRUB_MD_MD5->contextsize];
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "UUID required");
+
+ serial = grub_cpu_to_be64 (grub_strtoull (args[0], 0, 16));
+
+ GRUB_MD_MD5->init (&ctx);
+ GRUB_MD_MD5->write (&ctx, hash_prefix, sizeof (hash_prefix));
+ GRUB_MD_MD5->write (&ctx, &serial, sizeof (serial));
+ GRUB_MD_MD5->final (&ctx);
+ xnu_uuid = GRUB_MD_MD5->read (&ctx);
+
+ grub_snprintf (uuid_string, sizeof (uuid_string),
+ "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ (unsigned int) xnu_uuid[0], (unsigned int) xnu_uuid[1],
+ (unsigned int) xnu_uuid[2], (unsigned int) xnu_uuid[3],
+ (unsigned int) xnu_uuid[4], (unsigned int) xnu_uuid[5],
+ (unsigned int) ((xnu_uuid[6] & 0xf) | 0x30),
+ (unsigned int) xnu_uuid[7],
+ (unsigned int) ((xnu_uuid[8] & 0x3f) | 0x80),
+ (unsigned int) xnu_uuid[9],
+ (unsigned int) xnu_uuid[10], (unsigned int) xnu_uuid[11],
+ (unsigned int) xnu_uuid[12], (unsigned int) xnu_uuid[13],
+ (unsigned int) xnu_uuid[14], (unsigned int) xnu_uuid[15]);
+ for (ptr = uuid_string; *ptr; ptr++)
+ *ptr = grub_toupper (*ptr);
+ if (argc == 1)
+ grub_printf ("%s", uuid_string);
+ if (argc > 1)
+ grub_env_set (args[1], uuid_string);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd;
+
+
+GRUB_MOD_INIT (xnu_uuid)
+{
+ cmd = grub_register_command ("xnu_uuid", grub_cmd_xnu_uuid,
+ N_("GRUBUUID [VARNAME]"),
+ N_("Transform 64-bit UUID to format "
+ "suitable for XNU."));
+}
+
+GRUB_MOD_FINI (xnu_uuid)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/disk/ata.c b/grub-core/disk/ata.c
new file mode 100644
index 0000000..391ccb9
--- /dev/null
+++ b/grub-core/disk/ata.c
@@ -0,0 +1,933 @@
+/* ata.c - ATA disk access. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/ata.h>
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/time.h>
+#include <grub/pci.h>
+#include <grub/scsi.h>
+#include <grub/cs5536.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* At the moment, only two IDE ports are supported. */
+static const grub_port_t grub_ata_ioaddress[] = { GRUB_ATA_CH0_PORT1,
+ GRUB_ATA_CH1_PORT1 };
+static const grub_port_t grub_ata_ioaddress2[] = { GRUB_ATA_CH0_PORT2,
+ GRUB_ATA_CH1_PORT2 };
+
+static struct grub_ata_device *grub_ata_devices;
+
+/* Wait for !BSY. */
+grub_err_t
+grub_ata_wait_not_busy (struct grub_ata_device *dev, int milliseconds)
+{
+ /* ATA requires 400ns (after a write to CMD register) or
+ 1 PIO cycle (after a DRQ block transfer) before
+ first check of BSY. */
+ grub_millisleep (1);
+
+ int i = 1;
+ grub_uint8_t sts;
+ while ((sts = grub_ata_regget (dev, GRUB_ATA_REG_STATUS))
+ & GRUB_ATA_STATUS_BUSY)
+ {
+ if (i >= milliseconds)
+ {
+ grub_dprintf ("ata", "timeout: %dms, status=0x%x\n",
+ milliseconds, sts);
+ return grub_error (GRUB_ERR_TIMEOUT, "ATA timeout");
+ }
+
+ grub_millisleep (1);
+ i++;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static inline void
+grub_ata_wait (void)
+{
+ grub_millisleep (50);
+}
+
+/* Wait for !BSY, DRQ. */
+grub_err_t
+grub_ata_wait_drq (struct grub_ata_device *dev, int rw,
+ int milliseconds)
+{
+ if (grub_ata_wait_not_busy (dev, milliseconds))
+ return grub_errno;
+
+ /* !DRQ implies error condition. */
+ grub_uint8_t sts = grub_ata_regget (dev, GRUB_ATA_REG_STATUS);
+ if ((sts & (GRUB_ATA_STATUS_DRQ | GRUB_ATA_STATUS_ERR))
+ != GRUB_ATA_STATUS_DRQ)
+ {
+ grub_dprintf ("ata", "ata error: status=0x%x, error=0x%x\n",
+ sts, grub_ata_regget (dev, GRUB_ATA_REG_ERROR));
+ if (! rw)
+ return grub_error (GRUB_ERR_READ_ERROR, "ATA read error");
+ else
+ return grub_error (GRUB_ERR_WRITE_ERROR, "ATA write error");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* Byteorder has to be changed before strings can be read. */
+static void
+grub_ata_strncpy (char *dst, char *src, grub_size_t len)
+{
+ grub_uint16_t *src16 = (grub_uint16_t *) src;
+ grub_uint16_t *dst16 = (grub_uint16_t *) dst;
+ unsigned int i;
+
+ for (i = 0; i < len / 2; i++)
+ *(dst16++) = grub_be_to_cpu16 (*(src16++));
+ dst[len] = '\0';
+}
+
+void
+grub_ata_pio_read (struct grub_ata_device *dev, char *buf, grub_size_t size)
+{
+ grub_uint16_t *buf16 = (grub_uint16_t *) buf;
+ unsigned int i;
+
+ /* Read in the data, word by word. */
+ for (i = 0; i < size / 2; i++)
+ buf16[i] = grub_le_to_cpu16 (grub_inw(dev->ioaddress + GRUB_ATA_REG_DATA));
+}
+
+static void
+grub_ata_pio_write (struct grub_ata_device *dev, char *buf, grub_size_t size)
+{
+ grub_uint16_t *buf16 = (grub_uint16_t *) buf;
+ unsigned int i;
+
+ /* Write the data, word by word. */
+ for (i = 0; i < size / 2; i++)
+ grub_outw(grub_cpu_to_le16 (buf16[i]), dev->ioaddress + GRUB_ATA_REG_DATA);
+}
+
+static void
+grub_ata_dumpinfo (struct grub_ata_device *dev, char *info)
+{
+ char text[41];
+
+ /* The device information was read, dump it for debugging. */
+ grub_ata_strncpy (text, info + 20, 20);
+ grub_dprintf ("ata", "Serial: %s\n", text);
+ grub_ata_strncpy (text, info + 46, 8);
+ grub_dprintf ("ata", "Firmware: %s\n", text);
+ grub_ata_strncpy (text, info + 54, 40);
+ grub_dprintf ("ata", "Model: %s\n", text);
+
+ if (! dev->atapi)
+ {
+ grub_dprintf ("ata", "Addressing: %d\n", dev->addr);
+ grub_dprintf ("ata", "Sectors: %lld\n", (unsigned long long) dev->size);
+ }
+}
+
+static grub_err_t
+grub_atapi_identify (struct grub_ata_device *dev)
+{
+ char *info;
+
+ info = grub_malloc (GRUB_DISK_SECTOR_SIZE);
+ if (! info)
+ return grub_errno;
+
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK, 0xE0 | dev->device << 4);
+ grub_ata_wait ();
+ if ((grub_ata_regget (dev, GRUB_ATA_REG_STATUS) & GRUB_ATA_STATUS_BUSY)
+ && grub_ata_wait_not_busy (dev, dev->present ? GRUB_ATA_TOUT_DEV_INIT
+ : GRUB_ATA_TOUT_STD))
+ {
+ grub_free (info);
+ dev->present = 0;
+ return grub_errno;
+ }
+
+ grub_ata_regset (dev, GRUB_ATA_REG_CMD, GRUB_ATA_CMD_IDENTIFY_PACKET_DEVICE);
+ grub_ata_wait ();
+
+ if (grub_ata_wait_drq (dev, 0, dev->present ? GRUB_ATA_TOUT_DEV_INIT
+ : GRUB_ATA_TOUT_STD))
+ {
+ grub_free (info);
+ dev->present = 0;
+ return grub_errno;
+ }
+ grub_ata_pio_read (dev, info, GRUB_DISK_SECTOR_SIZE);
+
+ dev->atapi = 1;
+
+ grub_ata_dumpinfo (dev, info);
+
+ grub_free (info);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_atapi_wait_drq (struct grub_ata_device *dev,
+ grub_uint8_t ireason,
+ int milliseconds)
+{
+ /* Wait for !BSY, DRQ, ireason */
+ if (grub_ata_wait_not_busy (dev, milliseconds))
+ return grub_errno;
+
+ grub_uint8_t sts = grub_ata_regget (dev, GRUB_ATA_REG_STATUS);
+ grub_uint8_t irs = grub_ata_regget (dev, GRUB_ATAPI_REG_IREASON);
+
+ /* OK if DRQ is asserted and interrupt reason is as expected. */
+ if ((sts & GRUB_ATA_STATUS_DRQ)
+ && (irs & GRUB_ATAPI_IREASON_MASK) == ireason)
+ return GRUB_ERR_NONE;
+
+ /* !DRQ implies error condition. */
+ grub_dprintf ("ata", "atapi error: status=0x%x, ireason=0x%x, error=0x%x\n",
+ sts, irs, grub_ata_regget (dev, GRUB_ATA_REG_ERROR));
+
+ if (! (sts & GRUB_ATA_STATUS_DRQ)
+ && (irs & GRUB_ATAPI_IREASON_MASK) == GRUB_ATAPI_IREASON_ERROR)
+ {
+ if (ireason == GRUB_ATAPI_IREASON_CMD_OUT)
+ return grub_error (GRUB_ERR_READ_ERROR, "ATA PACKET command error");
+ else
+ return grub_error (GRUB_ERR_READ_ERROR, "ATAPI read error");
+ }
+
+ return grub_error (GRUB_ERR_READ_ERROR, "ATAPI protocol error");
+}
+
+static grub_err_t
+grub_atapi_packet (struct grub_ata_device *dev, char *packet,
+ grub_size_t size)
+{
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK, dev->device << 4);
+ if (grub_ata_check_ready (dev))
+ return grub_errno;
+
+ /* Send ATA PACKET command. */
+ grub_ata_regset (dev, GRUB_ATA_REG_FEATURES, 0);
+ grub_ata_regset (dev, GRUB_ATAPI_REG_IREASON, 0);
+ grub_ata_regset (dev, GRUB_ATAPI_REG_CNTHIGH, size >> 8);
+ grub_ata_regset (dev, GRUB_ATAPI_REG_CNTLOW, size & 0xFF);
+
+ grub_ata_regset (dev, GRUB_ATA_REG_CMD, GRUB_ATA_CMD_PACKET);
+
+ /* Wait for !BSY, DRQ, !I/O, C/D. */
+ if (grub_atapi_wait_drq (dev, GRUB_ATAPI_IREASON_CMD_OUT, GRUB_ATA_TOUT_STD))
+ return grub_errno;
+
+ /* Write the packet. */
+ grub_ata_pio_write (dev, packet, 12);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_ata_identify (struct grub_ata_device *dev)
+{
+ char *info;
+ grub_uint16_t *info16;
+
+ info = grub_malloc (GRUB_DISK_SECTOR_SIZE);
+ if (! info)
+ return grub_errno;
+
+ info16 = (grub_uint16_t *) info;
+
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK, 0xE0 | dev->device << 4);
+ grub_ata_wait ();
+ if ((grub_ata_regget (dev, GRUB_ATA_REG_STATUS) & GRUB_ATA_STATUS_BUSY)
+ && grub_ata_wait_not_busy (dev, dev->present ? GRUB_ATA_TOUT_DEV_INIT
+ : GRUB_ATA_TOUT_STD))
+ {
+ dev->present = 0;
+ grub_free (info);
+ return grub_errno;
+ }
+
+ grub_ata_regset (dev, GRUB_ATA_REG_CMD, GRUB_ATA_CMD_IDENTIFY_DEVICE);
+ grub_ata_wait ();
+
+ if (grub_ata_wait_drq (dev, 0, dev->present ? GRUB_ATA_TOUT_DEV_INIT
+ : GRUB_ATA_TOUT_STD))
+ {
+ grub_free (info);
+ grub_errno = GRUB_ERR_NONE;
+ grub_uint8_t sts = grub_ata_regget (dev, GRUB_ATA_REG_STATUS);
+
+ if ((sts & (GRUB_ATA_STATUS_BUSY | GRUB_ATA_STATUS_DRQ
+ | GRUB_ATA_STATUS_ERR)) == GRUB_ATA_STATUS_ERR
+ && (grub_ata_regget (dev, GRUB_ATA_REG_ERROR) & 0x04 /* ABRT */))
+ /* Device without ATA IDENTIFY, try ATAPI. */
+ return grub_atapi_identify (dev);
+
+ else if (sts == 0x00)
+ {
+ dev->present = 0;
+ /* No device, return error but don't print message. */
+ return GRUB_ERR_UNKNOWN_DEVICE;
+ }
+ else
+ {
+ dev->present = 0;
+ /* Other Error. */
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "device cannot be identified");
+ }
+ }
+
+ grub_ata_pio_read (dev, info, GRUB_DISK_SECTOR_SIZE);
+
+ /* Re-check status to avoid bogus identify data due to stuck DRQ. */
+ grub_uint8_t sts = grub_ata_regget (dev, GRUB_ATA_REG_STATUS);
+ if (sts & (GRUB_ATA_STATUS_BUSY | GRUB_ATA_STATUS_DRQ | GRUB_ATA_STATUS_ERR))
+ {
+ grub_dprintf ("ata", "bad status=0x%x\n", sts);
+ grub_free (info);
+ /* No device, return error but don't print message. */
+ grub_errno = GRUB_ERR_NONE;
+ return GRUB_ERR_UNKNOWN_DEVICE;
+ }
+
+ /* Now it is certain that this is not an ATAPI device. */
+ dev->atapi = 0;
+
+ /* CHS is always supported. */
+ dev->addr = GRUB_ATA_CHS;
+
+ /* Check if LBA is supported. */
+ if (info16[49] & (1 << 9))
+ {
+ /* Check if LBA48 is supported. */
+ if (info16[83] & (1 << 10))
+ dev->addr = GRUB_ATA_LBA48;
+ else
+ dev->addr = GRUB_ATA_LBA;
+ }
+
+ /* Determine the amount of sectors. */
+ if (dev->addr != GRUB_ATA_LBA48)
+ dev->size = grub_le_to_cpu32(*((grub_uint32_t *) &info16[60]));
+ else
+ dev->size = grub_le_to_cpu64(*((grub_uint64_t *) &info16[100]));
+
+ /* Read CHS information. */
+ dev->cylinders = info16[1];
+ dev->heads = info16[3];
+ dev->sectors_per_track = info16[6];
+
+ grub_ata_dumpinfo (dev, info);
+
+ grub_free(info);
+
+ return 0;
+}
+
+static grub_err_t
+check_device (struct grub_ata_device *dev)
+{
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK, dev->device << 4);
+ grub_ata_wait ();
+
+ /* Try to detect if the port is in use by writing to it,
+ waiting for a while and reading it again. If the value
+ was preserved, there is a device connected. */
+ grub_ata_regset (dev, GRUB_ATA_REG_SECTORS, 0x5A);
+ grub_ata_wait ();
+ grub_uint8_t sec = grub_ata_regget (dev, GRUB_ATA_REG_SECTORS);
+ grub_dprintf ("ata", "sectors=0x%x\n", sec);
+ if (sec != 0x5A)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no device connected");
+
+ /* The above test may detect a second (slave) device
+ connected to a SATA controller which supports only one
+ (master) device. It is not safe to use the status register
+ READY bit to check for controller channel existence. Some
+ ATAPI commands (RESET, DIAGNOSTIC) may clear this bit. */
+
+ /* Use the IDENTIFY DEVICE command to query the device. */
+ return grub_ata_identify (dev);
+}
+
+static grub_err_t
+grub_ata_device_initialize (int port, int device, int addr, int addr2)
+{
+ struct grub_ata_device *dev;
+ struct grub_ata_device **devp;
+ grub_err_t err;
+
+ grub_dprintf ("ata", "detecting device %d,%d (0x%x, 0x%x)\n",
+ port, device, addr, addr2);
+
+ dev = grub_malloc (sizeof(*dev));
+ if (! dev)
+ return grub_errno;
+
+ /* Setup the device information. */
+ dev->port = port;
+ dev->device = device;
+ dev->ioaddress = addr + GRUB_MACHINE_PCI_IO_BASE;
+ dev->ioaddress2 = addr2 + GRUB_MACHINE_PCI_IO_BASE;
+ dev->present = 1;
+ dev->next = NULL;
+
+ /* Register the device. */
+ for (devp = &grub_ata_devices; *devp; devp = &(*devp)->next);
+ *devp = dev;
+
+ err = check_device (dev);
+ if (err)
+ grub_print_error ();
+
+ return 0;
+}
+
+static int NESTED_FUNC_ATTR
+grub_ata_pciinit (grub_pci_device_t dev,
+ grub_pci_id_t pciid)
+{
+ static int compat_use[2] = { 0 };
+ grub_pci_address_t addr;
+ grub_uint32_t class;
+ grub_uint32_t bar1;
+ grub_uint32_t bar2;
+ int rega;
+ int regb;
+ int i;
+ static int controller = 0;
+ int cs5536 = 0;
+ int nports = 2;
+
+ /* Read class. */
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class = grub_pci_read (addr);
+
+ /* AMD CS5536 Southbridge. */
+ if (pciid == GRUB_CS5536_PCIID)
+ {
+ cs5536 = 1;
+ nports = 1;
+ }
+
+ /* Check if this class ID matches that of a PCI IDE Controller. */
+ if (!cs5536 && (class >> 16 != 0x0101))
+ return 0;
+
+ for (i = 0; i < nports; i++)
+ {
+ /* Set to 0 when the channel operated in compatibility mode. */
+ int compat;
+
+ /* We don't support non-compatibility mode for CS5536. */
+ if (cs5536)
+ compat = 0;
+ else
+ compat = (class >> (8 + 2 * i)) & 1;
+
+ rega = 0;
+ regb = 0;
+
+ /* If the channel is in compatibility mode, just assign the
+ default registers. */
+ if (compat == 0 && !compat_use[i])
+ {
+ rega = grub_ata_ioaddress[i];
+ regb = grub_ata_ioaddress2[i];
+ compat_use[i] = 1;
+ }
+ else if (compat)
+ {
+ /* Read the BARs, which either contain a mmapped IO address
+ or the IO port address. */
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESSES
+ + sizeof (grub_uint64_t) * i);
+ bar1 = grub_pci_read (addr);
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESSES
+ + sizeof (grub_uint64_t) * i
+ + sizeof (grub_uint32_t));
+ bar2 = grub_pci_read (addr);
+
+ /* Check if the BARs describe an IO region. */
+ if ((bar1 & 1) && (bar2 & 1))
+ {
+ rega = bar1 & ~3;
+ regb = bar2 & ~3;
+ }
+ }
+
+ grub_dprintf ("ata",
+ "PCI dev (%d,%d,%d) compat=%d rega=0x%x regb=0x%x\n",
+ grub_pci_get_bus (dev), grub_pci_get_device (dev),
+ grub_pci_get_function (dev), compat, rega, regb);
+
+ if (rega && regb)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ grub_ata_device_initialize (controller * 2 + i, 0, rega, regb);
+
+ /* Most errors raised by grub_ata_device_initialize() are harmless.
+ They just indicate this particular drive is not responding, most
+ likely because it doesn't exist. We might want to ignore specific
+ error types here, instead of printing them. */
+ if (grub_errno)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ grub_ata_device_initialize (controller * 2 + i, 1, rega, regb);
+
+ /* Likewise. */
+ if (grub_errno)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+ }
+
+ controller++;
+
+ return 0;
+}
+
+static grub_err_t
+grub_ata_initialize (void)
+{
+ grub_pci_iterate (grub_ata_pciinit);
+ return 0;
+}
+
+static void
+grub_ata_setlba (struct grub_ata_device *dev, grub_disk_addr_t sector,
+ grub_size_t size)
+{
+ grub_ata_regset (dev, GRUB_ATA_REG_SECTORS, size);
+ grub_ata_regset (dev, GRUB_ATA_REG_LBALOW, sector & 0xFF);
+ grub_ata_regset (dev, GRUB_ATA_REG_LBAMID, (sector >> 8) & 0xFF);
+ grub_ata_regset (dev, GRUB_ATA_REG_LBAHIGH, (sector >> 16) & 0xFF);
+}
+
+static grub_err_t
+grub_ata_setaddress (struct grub_ata_device *dev,
+ grub_ata_addressing_t addressing,
+ grub_disk_addr_t sector,
+ grub_size_t size)
+{
+ switch (addressing)
+ {
+ case GRUB_ATA_CHS:
+ {
+ unsigned int cylinder;
+ unsigned int head;
+ unsigned int sect;
+
+ /* Calculate the sector, cylinder and head to use. */
+ sect = ((grub_uint32_t) sector % dev->sectors_per_track) + 1;
+ cylinder = (((grub_uint32_t) sector / dev->sectors_per_track)
+ / dev->heads);
+ head = ((grub_uint32_t) sector / dev->sectors_per_track) % dev->heads;
+
+ if (sect > dev->sectors_per_track
+ || cylinder > dev->cylinders
+ || head > dev->heads)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "sector %d cannot be addressed "
+ "using CHS addressing", sector);
+
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK, (dev->device << 4) | head);
+ if (grub_ata_check_ready (dev))
+ return grub_errno;
+
+ grub_ata_regset (dev, GRUB_ATA_REG_SECTNUM, sect);
+ grub_ata_regset (dev, GRUB_ATA_REG_CYLLSB, cylinder & 0xFF);
+ grub_ata_regset (dev, GRUB_ATA_REG_CYLMSB, cylinder >> 8);
+
+ break;
+ }
+
+ case GRUB_ATA_LBA:
+ if (size == 256)
+ size = 0;
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK,
+ 0xE0 | (dev->device << 4) | ((sector >> 24) & 0x0F));
+ if (grub_ata_check_ready (dev))
+ return grub_errno;
+
+ grub_ata_setlba (dev, sector, size);
+ break;
+
+ case GRUB_ATA_LBA48:
+ if (size == 65536)
+ size = 0;
+
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK, 0xE0 | (dev->device << 4));
+ if (grub_ata_check_ready (dev))
+ return grub_errno;
+
+ /* Set "Previous". */
+ grub_ata_setlba (dev, sector >> 24, size >> 8);
+ /* Set "Current". */
+ grub_ata_setlba (dev, sector, size);
+
+ break;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_ata_readwrite (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf, int rw)
+{
+ struct grub_ata_device *dev = (struct grub_ata_device *) disk->data;
+
+ grub_dprintf("ata", "grub_ata_readwrite (size=%llu, rw=%d)\n", (unsigned long long) size, rw);
+
+ grub_ata_addressing_t addressing = dev->addr;
+ grub_size_t batch;
+ int cmd, cmd_write;
+
+ if (addressing == GRUB_ATA_LBA48 && ((sector + size) >> 28) != 0)
+ {
+ batch = 65536;
+ cmd = GRUB_ATA_CMD_READ_SECTORS_EXT;
+ cmd_write = GRUB_ATA_CMD_WRITE_SECTORS_EXT;
+ }
+ else
+ {
+ if (addressing == GRUB_ATA_LBA48)
+ addressing = GRUB_ATA_LBA;
+ batch = 256;
+ cmd = GRUB_ATA_CMD_READ_SECTORS;
+ cmd_write = GRUB_ATA_CMD_WRITE_SECTORS;
+ }
+
+ grub_size_t nsectors = 0;
+ while (nsectors < size)
+ {
+ if (size - nsectors < batch)
+ batch = size - nsectors;
+
+ grub_dprintf("ata", "rw=%d, sector=%llu, batch=%llu\n", rw, (unsigned long long) sector, (unsigned long long) batch);
+
+ /* Send read/write command. */
+ if (grub_ata_setaddress (dev, addressing, sector, batch))
+ return grub_errno;
+
+ grub_ata_regset (dev, GRUB_ATA_REG_CMD, (! rw ? cmd : cmd_write));
+
+ unsigned sect;
+ for (sect = 0; sect < batch; sect++)
+ {
+ /* Wait for !BSY, DRQ. */
+ if (grub_ata_wait_drq (dev, rw, GRUB_ATA_TOUT_DATA))
+ return grub_errno;
+
+ /* Transfer data. */
+ if (! rw)
+ grub_ata_pio_read (dev, buf, GRUB_DISK_SECTOR_SIZE);
+ else
+ grub_ata_pio_write (dev, buf, GRUB_DISK_SECTOR_SIZE);
+
+ buf += GRUB_DISK_SECTOR_SIZE;
+ }
+
+ if (rw)
+ {
+ /* Check for write error. */
+ if (grub_ata_wait_not_busy (dev, GRUB_ATA_TOUT_DATA))
+ return grub_errno;
+
+ if (grub_ata_regget (dev, GRUB_ATA_REG_STATUS)
+ & (GRUB_ATA_STATUS_DRQ | GRUB_ATA_STATUS_ERR))
+ return grub_error (GRUB_ERR_WRITE_ERROR, "ATA write error");
+ }
+
+ sector += batch;
+ nsectors += batch;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+
+
+static int
+grub_ata_iterate (int (*hook) (const char *name))
+{
+ struct grub_ata_device *dev;
+
+ for (dev = grub_ata_devices; dev; dev = dev->next)
+ {
+ char devname[10];
+ grub_err_t err;
+
+ err = check_device (dev);
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ if (dev->atapi)
+ continue;
+
+ grub_snprintf (devname, sizeof (devname),
+ "ata%d", dev->port * 2 + dev->device);
+
+ if (hook (devname))
+ return 1;
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_ata_open (const char *name, grub_disk_t disk)
+{
+ struct grub_ata_device *dev;
+ grub_err_t err;
+
+ for (dev = grub_ata_devices; dev; dev = dev->next)
+ {
+ char devname[10];
+ grub_snprintf (devname, sizeof (devname),
+ "ata%d", dev->port * 2 + dev->device);
+ if (grub_strcmp (name, devname) == 0)
+ break;
+ }
+
+ if (! dev)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
+
+ if (dev->atapi)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not an ATA harddisk");
+
+ err = check_device (dev);
+
+ if (err)
+ return err;
+
+ disk->total_sectors = dev->size;
+
+ disk->id = (unsigned long) dev;
+
+ disk->data = dev;
+
+ return 0;
+}
+
+static void
+grub_ata_close (grub_disk_t disk __attribute__((unused)))
+{
+
+}
+
+static grub_err_t
+grub_ata_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ return grub_ata_readwrite (disk, sector, size, buf, 0);
+}
+
+static grub_err_t
+grub_ata_write (grub_disk_t disk,
+ grub_disk_addr_t sector,
+ grub_size_t size,
+ const char *buf)
+{
+ return grub_ata_readwrite (disk, sector, size, (char *) buf, 1);
+}
+
+static struct grub_disk_dev grub_atadisk_dev =
+ {
+ .name = "ATA",
+ .id = GRUB_DISK_DEVICE_ATA_ID,
+ .iterate = grub_ata_iterate,
+ .open = grub_ata_open,
+ .close = grub_ata_close,
+ .read = grub_ata_read,
+ .write = grub_ata_write,
+ .next = 0
+ };
+
+
+
+/* ATAPI code. */
+
+static int
+grub_atapi_iterate (int (*hook) (int bus, int luns))
+{
+ struct grub_ata_device *dev;
+
+ for (dev = grub_ata_devices; dev; dev = dev->next)
+ {
+ grub_err_t err;
+
+ err = check_device (dev);
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ if (! dev->atapi)
+ continue;
+
+ if (hook (dev->port * 2 + dev->device, 1))
+ return 1;
+ }
+
+ return 0;
+
+}
+
+static grub_err_t
+grub_atapi_read (struct grub_scsi *scsi,
+ grub_size_t cmdsize __attribute__((unused)),
+ char *cmd, grub_size_t size, char *buf)
+{
+ struct grub_ata_device *dev = (struct grub_ata_device *) scsi->data;
+
+ grub_dprintf("ata", "grub_atapi_read (size=%llu)\n", (unsigned long long) size);
+
+ if (grub_atapi_packet (dev, cmd, size))
+ return grub_errno;
+
+ grub_size_t nread = 0;
+ while (nread < size)
+ {
+ /* Wait for !BSY, DRQ, I/O, !C/D. */
+ if (grub_atapi_wait_drq (dev, GRUB_ATAPI_IREASON_DATA_IN, GRUB_ATA_TOUT_DATA))
+ return grub_errno;
+
+ /* Get byte count for this DRQ assertion. */
+ unsigned cnt = grub_ata_regget (dev, GRUB_ATAPI_REG_CNTHIGH) << 8
+ | grub_ata_regget (dev, GRUB_ATAPI_REG_CNTLOW);
+ grub_dprintf("ata", "DRQ count=%u\n", cnt);
+
+ /* Count of last transfer may be uneven. */
+ if (! (0 < cnt && cnt <= size - nread && (! (cnt & 1) || cnt == size - nread)))
+ return grub_error (GRUB_ERR_READ_ERROR, "invalid ATAPI transfer count");
+
+ /* Read the data. */
+ grub_ata_pio_read (dev, buf + nread, cnt);
+
+ if (cnt & 1)
+ buf[nread + cnt - 1] = (char) grub_le_to_cpu16 (grub_inw (dev->ioaddress + GRUB_ATA_REG_DATA));
+
+ nread += cnt;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_atapi_write (struct grub_scsi *scsi __attribute__((unused)),
+ grub_size_t cmdsize __attribute__((unused)),
+ char *cmd __attribute__((unused)),
+ grub_size_t size __attribute__((unused)),
+ char *buf __attribute__((unused)))
+{
+ // XXX: scsi.mod does not use write yet.
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "ATAPI write not implemented");
+}
+
+static grub_err_t
+grub_atapi_open (int devnum, struct grub_scsi *scsi)
+{
+ struct grub_ata_device *dev;
+ struct grub_ata_device *devfnd = 0;
+ grub_err_t err;
+
+ for (dev = grub_ata_devices; dev; dev = dev->next)
+ {
+ if (dev->port * 2 + dev->device == devnum)
+ {
+ devfnd = dev;
+ break;
+ }
+ }
+
+ grub_dprintf ("ata", "opening ATAPI dev `ata%d'\n", devnum);
+
+ if (! devfnd)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such ATAPI device");
+
+ err = check_device (devfnd);
+ if (err)
+ return err;
+
+ if (! devfnd->atapi)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such ATAPI device");
+
+ scsi->data = devfnd;
+
+ return GRUB_ERR_NONE;
+}
+
+
+static struct grub_scsi_dev grub_atapi_dev =
+ {
+ .name = "ata",
+ .id = GRUB_SCSI_SUBSYSTEM_ATAPI,
+ .iterate = grub_atapi_iterate,
+ .open = grub_atapi_open,
+ .read = grub_atapi_read,
+ .write = grub_atapi_write
+ };
+
+
+
+GRUB_MOD_INIT(ata)
+{
+ /* To prevent two drivers operating on the same disks. */
+ grub_disk_firmware_is_tainted = 1;
+ if (grub_disk_firmware_fini)
+ {
+ grub_disk_firmware_fini ();
+ grub_disk_firmware_fini = NULL;
+ }
+
+ /* ATA initialization. */
+ grub_ata_initialize ();
+
+ grub_disk_dev_register (&grub_atadisk_dev);
+
+ /* ATAPI devices are handled by scsi.mod. */
+ grub_scsi_dev_register (&grub_atapi_dev);
+}
+
+GRUB_MOD_FINI(ata)
+{
+ grub_scsi_dev_unregister (&grub_atapi_dev);
+ grub_disk_dev_unregister (&grub_atadisk_dev);
+}
diff --git a/grub-core/disk/ata_pthru.c b/grub-core/disk/ata_pthru.c
new file mode 100644
index 0000000..eb9cb5f
--- /dev/null
+++ b/grub-core/disk/ata_pthru.c
@@ -0,0 +1,108 @@
+/* ata_pthru.c - ATA pass through for ata.mod. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/ata.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* ATA pass through support, used by hdparm.mod. */
+static grub_err_t
+grub_ata_pass_through (grub_disk_t disk,
+ struct grub_disk_ata_pass_through_parms *parms)
+{
+ if (disk->dev->id != GRUB_DISK_DEVICE_ATA_ID)
+ return grub_error (GRUB_ERR_BAD_DEVICE,
+ "device not accessed via ata.mod");
+
+ struct grub_ata_device *dev = (struct grub_ata_device *) disk->data;
+
+ if (! (parms->size == 0 || parms->size == GRUB_DISK_SECTOR_SIZE))
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "ATA multi-sector read and DATA OUT not implemented");
+
+ grub_dprintf ("ata", "ata_pass_through: cmd=0x%x, features=0x%x, sectors=0x%x\n",
+ parms->taskfile[GRUB_ATA_REG_CMD],
+ parms->taskfile[GRUB_ATA_REG_FEATURES],
+ parms->taskfile[GRUB_ATA_REG_SECTORS]);
+ grub_dprintf ("ata", "lba_high=0x%x, lba_mid=0x%x, lba_low=0x%x, size=%d\n",
+ parms->taskfile[GRUB_ATA_REG_LBAHIGH],
+ parms->taskfile[GRUB_ATA_REG_LBAMID],
+ parms->taskfile[GRUB_ATA_REG_LBALOW], parms->size);
+
+ /* Set registers. */
+ grub_ata_regset (dev, GRUB_ATA_REG_DISK, 0xE0 | dev->device << 4
+ | (parms->taskfile[GRUB_ATA_REG_DISK] & 0xf));
+ if (grub_ata_check_ready (dev))
+ return grub_errno;
+
+ int i;
+ for (i = GRUB_ATA_REG_FEATURES; i <= GRUB_ATA_REG_LBAHIGH; i++)
+ grub_ata_regset (dev, i, parms->taskfile[i]);
+
+ /* Start command. */
+ grub_ata_regset (dev, GRUB_ATA_REG_CMD, parms->taskfile[GRUB_ATA_REG_CMD]);
+
+ /* Wait for !BSY. */
+ if (grub_ata_wait_not_busy (dev, GRUB_ATA_TOUT_DATA))
+ return grub_errno;
+
+ /* Check status. */
+ grub_int8_t sts = grub_ata_regget (dev, GRUB_ATA_REG_STATUS);
+ grub_dprintf ("ata", "status=0x%x\n", sts);
+
+ /* Transfer data. */
+ if ((sts & (GRUB_ATA_STATUS_DRQ | GRUB_ATA_STATUS_ERR)) == GRUB_ATA_STATUS_DRQ)
+ {
+ if (parms->size != GRUB_DISK_SECTOR_SIZE)
+ return grub_error (GRUB_ERR_READ_ERROR, "DRQ unexpected");
+ grub_ata_pio_read (dev, parms->buffer, GRUB_DISK_SECTOR_SIZE);
+ }
+
+ /* Return registers. */
+ for (i = GRUB_ATA_REG_ERROR; i <= GRUB_ATA_REG_STATUS; i++)
+ parms->taskfile[i] = grub_ata_regget (dev, i);
+
+ grub_dprintf ("ata", "status=0x%x, error=0x%x, sectors=0x%x\n",
+ parms->taskfile[GRUB_ATA_REG_STATUS],
+ parms->taskfile[GRUB_ATA_REG_ERROR],
+ parms->taskfile[GRUB_ATA_REG_SECTORS]);
+
+ if (parms->taskfile[GRUB_ATA_REG_STATUS]
+ & (GRUB_ATA_STATUS_DRQ | GRUB_ATA_STATUS_ERR))
+ return grub_error (GRUB_ERR_READ_ERROR, "ATA passthrough failed");
+
+ return GRUB_ERR_NONE;
+}
+
+
+
+GRUB_MOD_INIT(ata_pthru)
+{
+ /* Register ATA pass through function. */
+ grub_disk_ata_pass_through = grub_ata_pass_through;
+}
+
+GRUB_MOD_FINI(ata_pthru)
+{
+ if (grub_disk_ata_pass_through == grub_ata_pass_through)
+ grub_disk_ata_pass_through = NULL;
+}
diff --git a/grub-core/disk/dmraid_nvidia.c b/grub-core/disk/dmraid_nvidia.c
new file mode 100644
index 0000000..154193e
--- /dev/null
+++ b/grub-core/disk/dmraid_nvidia.c
@@ -0,0 +1,171 @@
+/* dmraid_nvidia.c - module to handle Nvidia fakeraid. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/raid.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define NV_SIGNATURES 4
+
+#define NV_IDLE 0
+#define NV_SCDB_INIT_RAID 2
+#define NV_SCDB_REBUILD_RAID 3
+#define NV_SCDB_UPGRADE_RAID 4
+#define NV_SCDB_SYNC_RAID 5
+
+#define NV_LEVEL_UNKNOWN 0x00
+#define NV_LEVEL_JBOD 0xFF
+#define NV_LEVEL_0 0x80
+#define NV_LEVEL_1 0x81
+#define NV_LEVEL_3 0x83
+#define NV_LEVEL_5 0x85
+#define NV_LEVEL_10 0x8a
+#define NV_LEVEL_1_0 0x8180
+
+#define NV_ARRAY_FLAG_BOOT 1 /* BIOS use only. */
+#define NV_ARRAY_FLAG_ERROR 2 /* Degraded or offline. */
+#define NV_ARRAY_FLAG_PARITY_VALID 4 /* RAID-3/5 parity valid. */
+
+struct grub_nv_array
+{
+ grub_uint32_t version;
+ grub_uint32_t signature[NV_SIGNATURES];
+ grub_uint8_t raid_job_code;
+ grub_uint8_t stripe_width;
+ grub_uint8_t total_volumes;
+ grub_uint8_t original_width;
+ grub_uint32_t raid_level;
+ grub_uint32_t stripe_block_size;
+ grub_uint32_t stripe_block_size_bytes;
+ grub_uint32_t stripe_block_size_log2;
+ grub_uint32_t stripe_mask;
+ grub_uint32_t stripe_size;
+ grub_uint32_t stripe_size_bytes;
+ grub_uint32_t raid_job_mask;
+ grub_uint32_t original_capacity;
+ grub_uint32_t flags;
+};
+
+#define NV_ID_LEN 8
+#define NV_ID_STRING "NVIDIA"
+#define NV_VERSION 100
+
+#define NV_PRODID_LEN 16
+#define NV_PRODREV_LEN 4
+
+struct grub_nv_super
+{
+ char vendor[NV_ID_LEN]; /* 0x00 - 0x07 ID string. */
+ grub_uint32_t size; /* 0x08 - 0x0B Size of metadata in dwords. */
+ grub_uint32_t chksum; /* 0x0C - 0x0F Checksum of this struct. */
+ grub_uint16_t version; /* 0x10 - 0x11 NV version. */
+ grub_uint8_t unit_number; /* 0x12 Disk index in array. */
+ grub_uint8_t reserved; /* 0x13. */
+ grub_uint32_t capacity; /* 0x14 - 0x17 Array capacity in sectors. */
+ grub_uint32_t sector_size; /* 0x18 - 0x1B Sector size. */
+ char prodid[NV_PRODID_LEN]; /* 0x1C - 0x2B Array product ID. */
+ char prodrev[NV_PRODREV_LEN]; /* 0x2C - 0x2F Array product revision */
+ grub_uint32_t unit_flags; /* 0x30 - 0x33 Flags for this disk */
+ struct grub_nv_array array; /* Array information */
+} __attribute__ ((packed));
+
+static grub_err_t
+grub_dmraid_nv_detect (grub_disk_t disk, struct grub_raid_array *array,
+ grub_disk_addr_t *start_sector)
+{
+ grub_disk_addr_t sector;
+ struct grub_nv_super sb;
+
+ if (disk->partition)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "skip partition");
+
+ sector = grub_disk_get_size (disk) - 2;
+
+ if (grub_disk_read (disk, sector, 0, sizeof (sb), &sb))
+ return grub_errno;
+
+ if (grub_memcmp (sb.vendor, NV_ID_STRING, 6))
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "not raid");
+
+ if (sb.version != NV_VERSION)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unknown version: %d.%d", sb.version);
+
+ switch (sb.array.raid_level)
+ {
+ case NV_LEVEL_0:
+ array->level = 0;
+ array->disk_size = sb.capacity / sb.array.total_volumes;
+ break;
+
+ case NV_LEVEL_1:
+ array->level = 1;
+ array->disk_size = sb.capacity;
+ break;
+
+ case NV_LEVEL_5:
+ array->level = 5;
+ array->layout = GRUB_RAID_LAYOUT_LEFT_ASYMMETRIC;
+ array->disk_size = sb.capacity / (sb.array.total_volumes - 1);
+ break;
+
+ default:
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unsupported RAID level: %d", sb.array.raid_level);
+ }
+
+ array->name = NULL;
+ array->number = 0;
+ array->total_devs = sb.array.total_volumes;
+ array->chunk_size = sb.array.stripe_block_size;
+ array->index = sb.unit_number;
+ array->uuid_len = sizeof (sb.array.signature);
+ array->uuid = grub_malloc (sizeof (sb.array.signature));
+ if (! array->uuid)
+ return grub_errno;
+
+ grub_memcpy (array->uuid, (char *) &sb.array.signature,
+ sizeof (sb.array.signature));
+
+ *start_sector = 0;
+
+ return 0;
+}
+
+static struct grub_raid grub_dmraid_nv_dev =
+{
+ .name = "dmraid_nv",
+ .detect = grub_dmraid_nv_detect,
+ .next = 0
+};
+
+GRUB_MOD_INIT(dm_nv)
+{
+ grub_raid_register (&grub_dmraid_nv_dev);
+}
+
+GRUB_MOD_FINI(dm_nv)
+{
+ grub_raid_unregister (&grub_dmraid_nv_dev);
+}
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
new file mode 100644
index 0000000..08094fa
--- /dev/null
+++ b/grub-core/disk/efi/efidisk.c
@@ -0,0 +1,850 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/term.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/disk.h>
+
+struct grub_efidisk_data
+{
+ grub_efi_handle_t handle;
+ grub_efi_device_path_t *device_path;
+ grub_efi_device_path_t *last_device_path;
+ grub_efi_block_io_t *block_io;
+ grub_efi_disk_io_t *disk_io;
+ struct grub_efidisk_data *next;
+};
+
+/* GUIDs. */
+static grub_efi_guid_t disk_io_guid = GRUB_EFI_DISK_IO_GUID;
+static grub_efi_guid_t block_io_guid = GRUB_EFI_BLOCK_IO_GUID;
+
+static struct grub_efidisk_data *fd_devices;
+static struct grub_efidisk_data *hd_devices;
+static struct grub_efidisk_data *cd_devices;
+
+/* Duplicate a device path. */
+static grub_efi_device_path_t *
+duplicate_device_path (const grub_efi_device_path_t *dp)
+{
+ grub_efi_device_path_t *p;
+ grub_size_t total_size = 0;
+
+ for (p = (grub_efi_device_path_t *) dp;
+ ;
+ p = GRUB_EFI_NEXT_DEVICE_PATH (p))
+ {
+ total_size += GRUB_EFI_DEVICE_PATH_LENGTH (p);
+ if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (p))
+ break;
+ }
+
+ p = grub_malloc (total_size);
+ if (! p)
+ return 0;
+
+ grub_memcpy (p, dp, total_size);
+ return p;
+}
+
+/* Return the device path node right before the end node. */
+static grub_efi_device_path_t *
+find_last_device_path (const grub_efi_device_path_t *dp)
+{
+ grub_efi_device_path_t *next, *p;
+
+ if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp))
+ return 0;
+
+ for (p = (grub_efi_device_path_t *) dp, next = GRUB_EFI_NEXT_DEVICE_PATH (p);
+ ! GRUB_EFI_END_ENTIRE_DEVICE_PATH (next);
+ p = next, next = GRUB_EFI_NEXT_DEVICE_PATH (next))
+ ;
+
+ return p;
+}
+
+/* Compare device paths. */
+static int
+compare_device_paths (const grub_efi_device_path_t *dp1,
+ const grub_efi_device_path_t *dp2)
+{
+ if (! dp1 || ! dp2)
+ /* Return non-zero. */
+ return 1;
+
+ while (1)
+ {
+ grub_efi_uint8_t type1, type2;
+ grub_efi_uint8_t subtype1, subtype2;
+ grub_efi_uint16_t len1, len2;
+ int ret;
+
+ type1 = GRUB_EFI_DEVICE_PATH_TYPE (dp1);
+ type2 = GRUB_EFI_DEVICE_PATH_TYPE (dp2);
+
+ if (type1 != type2)
+ return (int) type2 - (int) type1;
+
+ subtype1 = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp1);
+ subtype2 = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp2);
+
+ if (subtype1 != subtype2)
+ return (int) subtype1 - (int) subtype2;
+
+ len1 = GRUB_EFI_DEVICE_PATH_LENGTH (dp1);
+ len2 = GRUB_EFI_DEVICE_PATH_LENGTH (dp2);
+
+ if (len1 != len2)
+ return (int) len1 - (int) len2;
+
+ ret = grub_memcmp (dp1, dp2, len1);
+ if (ret != 0)
+ return ret;
+
+ if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp1))
+ break;
+
+ dp1 = (grub_efi_device_path_t *) ((char *) dp1 + len1);
+ dp2 = (grub_efi_device_path_t *) ((char *) dp2 + len2);
+ }
+
+ return 0;
+}
+
+static struct grub_efidisk_data *
+make_devices (void)
+{
+ grub_efi_uintn_t num_handles;
+ grub_efi_handle_t *handles;
+ grub_efi_handle_t *handle;
+ struct grub_efidisk_data *devices = 0;
+
+ /* Find handles which support the disk io interface. */
+ handles = grub_efi_locate_handle (GRUB_EFI_BY_PROTOCOL, &disk_io_guid,
+ 0, &num_handles);
+ if (! handles)
+ return 0;
+
+ /* Make a linked list of devices. */
+ for (handle = handles; num_handles--; handle++)
+ {
+ grub_efi_device_path_t *dp;
+ grub_efi_device_path_t *ldp;
+ struct grub_efidisk_data *d;
+ grub_efi_block_io_t *bio;
+ grub_efi_disk_io_t *dio;
+
+ dp = grub_efi_get_device_path (*handle);
+ if (! dp)
+ continue;
+
+ ldp = find_last_device_path (dp);
+ if (! ldp)
+ /* This is empty. Why? */
+ continue;
+
+ bio = grub_efi_open_protocol (*handle, &block_io_guid,
+ GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+ dio = grub_efi_open_protocol (*handle, &disk_io_guid,
+ GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+ if (! bio || ! dio)
+ /* This should not happen... Why? */
+ continue;
+
+ d = grub_malloc (sizeof (*d));
+ if (! d)
+ {
+ /* Uggh. */
+ grub_free (handles);
+ return 0;
+ }
+
+ d->handle = *handle;
+ d->device_path = dp;
+ d->last_device_path = ldp;
+ d->block_io = bio;
+ d->disk_io = dio;
+ d->next = devices;
+ devices = d;
+ }
+
+ grub_free (handles);
+
+ return devices;
+}
+
+/* Find the parent device. */
+static struct grub_efidisk_data *
+find_parent_device (struct grub_efidisk_data *devices,
+ struct grub_efidisk_data *d)
+{
+ grub_efi_device_path_t *dp, *ldp;
+ struct grub_efidisk_data *parent;
+
+ dp = duplicate_device_path (d->device_path);
+ if (! dp)
+ return 0;
+
+ ldp = find_last_device_path (dp);
+ ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
+ ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
+ ldp->length[0] = sizeof (*ldp);
+ ldp->length[1] = 0;
+
+ for (parent = devices; parent; parent = parent->next)
+ {
+ /* Ignore itself. */
+ if (parent == d)
+ continue;
+
+ if (compare_device_paths (parent->device_path, dp) == 0)
+ {
+ /* Found. */
+ if (! parent->last_device_path)
+ parent = 0;
+
+ break;
+ }
+ }
+
+ grub_free (dp);
+ return parent;
+}
+
+static int
+iterate_child_devices (struct grub_efidisk_data *devices,
+ struct grub_efidisk_data *d,
+ int (*hook) (struct grub_efidisk_data *child))
+{
+ struct grub_efidisk_data *p;
+
+ for (p = devices; p; p = p->next)
+ {
+ grub_efi_device_path_t *dp, *ldp;
+
+ dp = duplicate_device_path (p->device_path);
+ if (! dp)
+ return 0;
+
+ ldp = find_last_device_path (dp);
+ ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
+ ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
+ ldp->length[0] = sizeof (*ldp);
+ ldp->length[1] = 0;
+
+ if (compare_device_paths (dp, d->device_path) == 0)
+ if (hook (p))
+ {
+ grub_free (dp);
+ return 1;
+ }
+
+ grub_free (dp);
+ }
+
+ return 0;
+}
+
+/* Add a device into a list of devices in an ascending order. */
+static void
+add_device (struct grub_efidisk_data **devices, struct grub_efidisk_data *d)
+{
+ struct grub_efidisk_data **p;
+ struct grub_efidisk_data *n;
+
+ for (p = devices; *p; p = &((*p)->next))
+ {
+ int ret;
+
+ ret = compare_device_paths (find_last_device_path ((*p)->device_path),
+ find_last_device_path (d->device_path));
+ if (ret == 0)
+ ret = compare_device_paths ((*p)->device_path,
+ d->device_path);
+ if (ret == 0)
+ return;
+ else if (ret > 0)
+ break;
+ }
+
+ n = grub_malloc (sizeof (*n));
+ if (! n)
+ return;
+
+ grub_memcpy (n, d, sizeof (*n));
+ n->next = (*p);
+ (*p) = n;
+}
+
+/* Name the devices. */
+static void
+name_devices (struct grub_efidisk_data *devices)
+{
+ struct grub_efidisk_data *d;
+
+ /* First, identify devices by media device paths. */
+ for (d = devices; d; d = d->next)
+ {
+ grub_efi_device_path_t *dp;
+
+ dp = d->last_device_path;
+ if (! dp)
+ continue;
+
+ if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE)
+ {
+ int is_hard_drive = 0;
+
+ switch (GRUB_EFI_DEVICE_PATH_SUBTYPE (dp))
+ {
+ case GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE:
+ is_hard_drive = 1;
+ /* Fall through by intention. */
+ case GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE:
+ {
+ struct grub_efidisk_data *parent;
+
+ parent = find_parent_device (devices, d);
+ if (parent)
+ {
+ if (is_hard_drive)
+ {
+#if 0
+ grub_printf ("adding a hard drive by a partition: ");
+ grub_print_device_path (parent->device_path);
+#endif
+ add_device (&hd_devices, parent);
+ }
+ else
+ {
+#if 0
+ grub_printf ("adding a cdrom by a partition: ");
+ grub_print_device_path (parent->device_path);
+#endif
+ add_device (&cd_devices, parent);
+ }
+
+ /* Mark the parent as used. */
+ parent->last_device_path = 0;
+ }
+ }
+ /* Mark itself as used. */
+ d->last_device_path = 0;
+ break;
+
+ default:
+ /* For now, ignore the others. */
+ break;
+ }
+ }
+ }
+
+ /* Let's see what can be added more. */
+ for (d = devices; d; d = d->next)
+ {
+ grub_efi_device_path_t *dp;
+ grub_efi_block_io_media_t *m;
+
+ dp = d->last_device_path;
+ if (! dp)
+ continue;
+
+ m = d->block_io->media;
+ if (m->logical_partition)
+ {
+ /* Only one partition in a non-media device. Assume that this
+ is a floppy drive. */
+#if 0
+ grub_printf ("adding a floppy by guessing: ");
+ grub_print_device_path (d->device_path);
+#endif
+ add_device (&fd_devices, d);
+ }
+ else if (m->read_only && m->block_size > GRUB_DISK_SECTOR_SIZE)
+ {
+ /* This check is too heuristic, but assume that this is a
+ CDROM drive. */
+#if 0
+ grub_printf ("adding a cdrom by guessing: ");
+ grub_print_device_path (d->device_path);
+#endif
+ add_device (&cd_devices, d);
+ }
+ else
+ {
+ /* The default is a hard drive. */
+#if 0
+ grub_printf ("adding a hard drive by guessing: ");
+ grub_print_device_path (d->device_path);
+#endif
+ add_device (&hd_devices, d);
+ }
+ }
+}
+
+static void
+free_devices (struct grub_efidisk_data *devices)
+{
+ struct grub_efidisk_data *p, *q;
+
+ for (p = devices; p; p = q)
+ {
+ q = p->next;
+ grub_free (p);
+ }
+}
+
+/* Enumerate all disks to name devices. */
+static void
+enumerate_disks (void)
+{
+ struct grub_efidisk_data *devices;
+
+ devices = make_devices ();
+ if (! devices)
+ return;
+
+ name_devices (devices);
+ free_devices (devices);
+}
+
+static int
+grub_efidisk_iterate (int (*hook) (const char *name))
+{
+ struct grub_efidisk_data *d;
+ char buf[16];
+ int count;
+
+ for (d = fd_devices, count = 0; d; d = d->next, count++)
+ {
+ grub_snprintf (buf, sizeof (buf), "fd%d", count);
+ grub_dprintf ("efidisk", "iterating %s\n", buf);
+ if (hook (buf))
+ return 1;
+ }
+
+ for (d = hd_devices, count = 0; d; d = d->next, count++)
+ {
+ grub_snprintf (buf, sizeof (buf), "hd%d", count);
+ grub_dprintf ("efidisk", "iterating %s\n", buf);
+ if (hook (buf))
+ return 1;
+ }
+
+ for (d = cd_devices, count = 0; d; d = d->next, count++)
+ {
+ grub_snprintf (buf, sizeof (buf), "cd%d", count);
+ grub_dprintf ("efidisk", "iterating %s\n", buf);
+ if (hook (buf))
+ return 1;
+ }
+
+ return 0;
+}
+
+static int
+get_drive_number (const char *name)
+{
+ unsigned long drive;
+
+ if ((name[0] != 'f' && name[0] != 'h' && name[0] != 'c') || name[1] != 'd')
+ goto fail;
+
+ drive = grub_strtoul (name + 2, 0, 10);
+ if (grub_errno != GRUB_ERR_NONE)
+ goto fail;
+
+ return (int) drive ;
+
+ fail:
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a efidisk");
+ return -1;
+}
+
+static struct grub_efidisk_data *
+get_device (struct grub_efidisk_data *devices, int num)
+{
+ struct grub_efidisk_data *d;
+
+ for (d = devices; d && num; d = d->next, num--)
+ ;
+
+ if (num == 0)
+ return d;
+
+ return 0;
+}
+
+static grub_err_t
+grub_efidisk_open (const char *name, struct grub_disk *disk)
+{
+ int num;
+ struct grub_efidisk_data *d = 0;
+ grub_efi_block_io_media_t *m;
+
+ grub_dprintf ("efidisk", "opening %s\n", name);
+
+ num = get_drive_number (name);
+ if (num < 0)
+ return grub_errno;
+
+ switch (name[0])
+ {
+ case 'f':
+ d = get_device (fd_devices, num);
+ break;
+ case 'c':
+ d = get_device (cd_devices, num);
+ break;
+ case 'h':
+ d = get_device (hd_devices, num);
+ break;
+ default:
+ /* Never reach here. */
+ break;
+ }
+
+ if (! d)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such device");
+
+ disk->id = ((num << 8) | name[0]);
+ m = d->block_io->media;
+ /* FIXME: Probably it is better to store the block size in the disk,
+ and total sectors should be replaced with total blocks. */
+ grub_dprintf ("efidisk", "m = %p, last block = %llx, block size = %x\n",
+ m, (unsigned long long) m->last_block, m->block_size);
+ disk->total_sectors = (m->last_block
+ * (m->block_size >> GRUB_DISK_SECTOR_BITS));
+ disk->data = d;
+
+ grub_dprintf ("efidisk", "opening %s succeeded\n", name);
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_efidisk_close (struct grub_disk *disk __attribute__ ((unused)))
+{
+ /* EFI disks do not allocate extra memory, so nothing to do here. */
+ grub_dprintf ("efidisk", "closing %s\n", disk->name);
+}
+
+static grub_err_t
+grub_efidisk_read (struct grub_disk *disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ /* For now, use the disk io interface rather than the block io's. */
+ struct grub_efidisk_data *d;
+ grub_efi_disk_io_t *dio;
+ grub_efi_block_io_t *bio;
+ grub_efi_status_t status;
+
+ d = disk->data;
+ dio = d->disk_io;
+ bio = d->block_io;
+
+ grub_dprintf ("efidisk",
+ "reading 0x%lx sectors at the sector 0x%llx from %s\n",
+ (unsigned long) size, (unsigned long long) sector, disk->name);
+
+ status = efi_call_5 (dio->read, dio, bio->media->media_id,
+ (grub_efi_uint64_t) sector << GRUB_DISK_SECTOR_BITS,
+ (grub_efi_uintn_t) size << GRUB_DISK_SECTOR_BITS,
+ buf);
+ if (status != GRUB_EFI_SUCCESS)
+ return grub_error (GRUB_ERR_READ_ERROR, "efidisk read error");
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_efidisk_write (struct grub_disk *disk, grub_disk_addr_t sector,
+ grub_size_t size, const char *buf)
+{
+ /* For now, use the disk io interface rather than the block io's. */
+ struct grub_efidisk_data *d;
+ grub_efi_disk_io_t *dio;
+ grub_efi_block_io_t *bio;
+ grub_efi_status_t status;
+
+ d = disk->data;
+ dio = d->disk_io;
+ bio = d->block_io;
+
+ grub_dprintf ("efidisk",
+ "writing 0x%lx sectors at the sector 0x%llx to %s\n",
+ (unsigned long) size, (unsigned long long) sector, disk->name);
+
+ status = efi_call_5 (dio->write, dio, bio->media->media_id,
+ (grub_efi_uint64_t) sector << GRUB_DISK_SECTOR_BITS,
+ (grub_efi_uintn_t) size << GRUB_DISK_SECTOR_BITS,
+ (void *) buf);
+ if (status != GRUB_EFI_SUCCESS)
+ return grub_error (GRUB_ERR_WRITE_ERROR, "efidisk write error");
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_disk_dev grub_efidisk_dev =
+ {
+ .name = "efidisk",
+ .id = GRUB_DISK_DEVICE_EFIDISK_ID,
+ .iterate = grub_efidisk_iterate,
+ .open = grub_efidisk_open,
+ .close = grub_efidisk_close,
+ .read = grub_efidisk_read,
+ .write = grub_efidisk_write,
+ .next = 0
+ };
+
+void
+grub_efidisk_init (void)
+{
+ enumerate_disks ();
+ grub_disk_dev_register (&grub_efidisk_dev);
+}
+
+void
+grub_efidisk_fini (void)
+{
+ free_devices (fd_devices);
+ free_devices (hd_devices);
+ free_devices (cd_devices);
+ grub_disk_dev_unregister (&grub_efidisk_dev);
+}
+
+/* Some utility functions to map GRUB devices with EFI devices. */
+grub_efi_handle_t
+grub_efidisk_get_device_handle (grub_disk_t disk)
+{
+ struct grub_efidisk_data *d;
+ char type;
+
+ if (disk->dev->id != GRUB_DISK_DEVICE_EFIDISK_ID)
+ return 0;
+
+ d = disk->data;
+ type = disk->name[0];
+
+ switch (type)
+ {
+ case 'f':
+ /* This is the simplest case. */
+ return d->handle;
+
+ case 'c':
+ /* FIXME: probably this is not correct. */
+ return d->handle;
+
+ case 'h':
+ /* If this is the whole disk, just return its own data. */
+ if (! disk->partition)
+ return d->handle;
+
+ /* Otherwise, we must query the corresponding device to the firmware. */
+ {
+ struct grub_efidisk_data *devices;
+ grub_efi_handle_t handle = 0;
+ auto int find_partition (struct grub_efidisk_data *c);
+
+ int find_partition (struct grub_efidisk_data *c)
+ {
+ grub_efi_hard_drive_device_path_t hd;
+
+ grub_memcpy (&hd, c->last_device_path, sizeof (hd));
+
+ if ((GRUB_EFI_DEVICE_PATH_TYPE (c->last_device_path)
+ == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE)
+ && (GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path)
+ == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)
+ && (grub_partition_get_start (disk->partition)
+ == hd.partition_start)
+ && (grub_partition_get_len (disk->partition)
+ == hd.partition_size))
+ {
+ handle = c->handle;
+ return 1;
+ }
+
+ return 0;
+ }
+
+ devices = make_devices ();
+ iterate_child_devices (devices, d, find_partition);
+ free_devices (devices);
+
+ if (handle != 0)
+ return handle;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+char *
+grub_efidisk_get_device_name (grub_efi_handle_t *handle)
+{
+ grub_efi_device_path_t *dp, *ldp;
+
+ dp = grub_efi_get_device_path (handle);
+ if (! dp)
+ return 0;
+
+ ldp = find_last_device_path (dp);
+ if (! ldp)
+ return 0;
+
+ if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE
+ && (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp)
+ == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE))
+ {
+ /* This is a hard disk partition. */
+ grub_disk_t parent = 0;
+ grub_partition_t tpart = NULL;
+ char *device_name;
+ grub_efi_device_path_t *dup_dp, *dup_ldp;
+ grub_efi_hard_drive_device_path_t hd;
+ auto int find_parent_disk (const char *name);
+ auto int find_partition (grub_disk_t disk, const grub_partition_t part);
+
+ /* Find the disk which is the parent of a given hard disk partition. */
+ int find_parent_disk (const char *name)
+ {
+ grub_disk_t disk;
+
+ disk = grub_disk_open (name);
+ if (! disk)
+ return 1;
+
+ if (disk->dev->id == GRUB_DISK_DEVICE_EFIDISK_ID)
+ {
+ struct grub_efidisk_data *d;
+
+ d = disk->data;
+ if (compare_device_paths (d->device_path, dup_dp) == 0)
+ {
+ parent = disk;
+ return 1;
+ }
+ }
+
+ grub_disk_close (disk);
+ return 0;
+ }
+
+ /* Find the identical partition. */
+ int find_partition (grub_disk_t disk __attribute__ ((unused)),
+ const grub_partition_t part)
+ {
+ if (grub_partition_get_start (part) == hd.partition_start
+ && grub_partition_get_len (part) == hd.partition_size)
+ {
+ tpart = part;
+ return 1;
+ }
+
+ return 0;
+ }
+
+ /* It is necessary to duplicate the device path so that GRUB
+ can overwrite it. */
+ dup_dp = duplicate_device_path (dp);
+ if (! dup_dp)
+ return 0;
+
+ dup_ldp = find_last_device_path (dup_dp);
+ dup_ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
+ dup_ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
+ dup_ldp->length[0] = sizeof (*dup_ldp);
+ dup_ldp->length[1] = 0;
+
+ grub_efidisk_iterate (find_parent_disk);
+ grub_free (dup_dp);
+
+ if (! parent)
+ return 0;
+
+ /* Find a partition which matches the hard drive device path. */
+ grub_memcpy (&hd, ldp, sizeof (hd));
+ grub_partition_iterate (parent, find_partition);
+
+ if (! tpart)
+ {
+ grub_disk_close (parent);
+ return 0;
+ }
+
+ {
+ char *partition_name = grub_partition_get_name (tpart);
+ device_name = grub_xasprintf ("%s,%s", parent->name, partition_name);
+ grub_free (partition_name);
+ }
+ grub_disk_close (parent);
+
+ return device_name;
+ }
+ else
+ {
+ /* This should be an entire disk. */
+ auto int find_disk (const char *name);
+ char *device_name = 0;
+
+ int find_disk (const char *name)
+ {
+ grub_disk_t disk;
+
+ disk = grub_disk_open (name);
+ if (! disk)
+ return 1;
+
+ if (disk->dev->id == GRUB_DISK_DEVICE_EFIDISK_ID)
+ {
+ struct grub_efidisk_data *d;
+
+ d = disk->data;
+ if (compare_device_paths (d->device_path, dp) == 0)
+ {
+ device_name = grub_strdup (disk->name);
+ grub_disk_close (disk);
+ return 1;
+ }
+ }
+
+ grub_disk_close (disk);
+ return 0;
+
+ }
+
+ grub_efidisk_iterate (find_disk);
+ return device_name;
+ }
+
+ return 0;
+}
diff --git a/grub-core/disk/host.c b/grub-core/disk/host.c
new file mode 100644
index 0000000..c519662
--- /dev/null
+++ b/grub-core/disk/host.c
@@ -0,0 +1,95 @@
+/* host.c - Dummy disk driver to provide access to the hosts filesystem */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* When using the disk, make a reference to this module. Otherwise
+ the user will end up with a useless module :-). */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+
+int grub_disk_host_i_want_a_reference;
+
+static int
+grub_host_iterate (int (*hook) (const char *name))
+{
+ if (hook ("host"))
+ return 1;
+ return 0;
+}
+
+static grub_err_t
+grub_host_open (const char *name, grub_disk_t disk)
+{
+ if (grub_strcmp (name, "host"))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a host disk");
+
+ disk->total_sectors = 0;
+ disk->id = (unsigned long) "host";
+
+ disk->data = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_host_close (grub_disk_t disk __attribute((unused)))
+{
+}
+
+static grub_err_t
+grub_host_read (grub_disk_t disk __attribute((unused)),
+ grub_disk_addr_t sector __attribute((unused)),
+ grub_size_t size __attribute((unused)),
+ char *buf __attribute((unused)))
+{
+ return GRUB_ERR_OUT_OF_RANGE;
+}
+
+static grub_err_t
+grub_host_write (grub_disk_t disk __attribute ((unused)),
+ grub_disk_addr_t sector __attribute ((unused)),
+ grub_size_t size __attribute ((unused)),
+ const char *buf __attribute ((unused)))
+{
+ return GRUB_ERR_OUT_OF_RANGE;
+}
+
+static struct grub_disk_dev grub_host_dev =
+ {
+ /* The only important line in this file :-) */
+ .name = "host",
+ .id = GRUB_DISK_DEVICE_HOST_ID,
+ .iterate = grub_host_iterate,
+ .open = grub_host_open,
+ .close = grub_host_close,
+ .read = grub_host_read,
+ .write = grub_host_write,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(host)
+{
+ grub_disk_dev_register (&grub_host_dev);
+}
+
+GRUB_MOD_FINI(host)
+{
+ grub_disk_dev_unregister (&grub_host_dev);
+}
diff --git a/grub-core/disk/i386/pc/biosdisk.c b/grub-core/disk/i386/pc/biosdisk.c
new file mode 100644
index 0000000..1d47dc7
--- /dev/null
+++ b/grub-core/disk/i386/pc/biosdisk.c
@@ -0,0 +1,641 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/biosdisk.h>
+#include <grub/machine/kernel.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/int.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/term.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static int cd_drive = 0;
+static int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap);
+
+static int grub_biosdisk_get_num_floppies (void)
+{
+ struct grub_bios_int_registers regs;
+ int drive;
+
+ /* reset the disk system first */
+ regs.eax = 0;
+ regs.edx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+
+ grub_bios_interrupt (0x13, &regs);
+
+ for (drive = 0; drive < 2; drive++)
+ {
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT | GRUB_CPU_INT_FLAGS_CARRY;
+ regs.edx = drive;
+
+ /* call GET DISK TYPE */
+ regs.eax = 0x1500;
+ grub_bios_interrupt (0x13, &regs);
+ if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
+ break;
+
+ /* check if this drive exists */
+ if (!(regs.eax & 0x300))
+ break;
+ }
+
+ return drive;
+}
+
+/*
+ * Call IBM/MS INT13 Extensions (int 13 %ah=AH) for DRIVE. DAP
+ * is passed for disk address packet. If an error occurs, return
+ * non-zero, otherwise zero.
+ */
+
+static int
+grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap)
+{
+ struct grub_bios_int_registers regs;
+ regs.eax = ah << 8;
+ /* compute the address of disk_address_packet */
+ regs.ds = (((grub_addr_t) dap) & 0xffff0000) >> 4;
+ regs.esi = (((grub_addr_t) dap) & 0xffff);
+ regs.edx = drive;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+
+ grub_bios_interrupt (0x13, &regs);
+ return (regs.eax >> 8) & 0xff;
+}
+
+/*
+ * Call standard and old INT13 (int 13 %ah=AH) for DRIVE. Read/write
+ * NSEC sectors from COFF/HOFF/SOFF into SEGMENT. If an error occurs,
+ * return non-zero, otherwise zero.
+ */
+static int
+grub_biosdisk_rw_standard (int ah, int drive, int coff, int hoff,
+ int soff, int nsec, int segment)
+{
+ int ret, i;
+
+ /* Try 3 times. */
+ for (i = 0; i < 3; i++)
+ {
+ struct grub_bios_int_registers regs;
+
+ /* set up CHS information */
+ /* set %ch to low eight bits of cylinder */
+ regs.ecx = (coff << 8) & 0xff00;
+ /* set bits 6-7 of %cl to high two bits of cylinder */
+ regs.ecx |= (coff >> 2) & 0xc0;
+ /* set bits 0-5 of %cl to sector */
+ regs.ecx |= soff & 0x3f;
+
+ /* set %dh to head and %dl to drive */
+ regs.edx = (drive & 0xff) | ((hoff << 8) & 0xff00);
+ /* set %ah to AH */
+ regs.eax = (ah << 8) & 0xff00;
+ /* set %al to NSEC */
+ regs.eax |= nsec & 0xff;
+
+ regs.ebx = 0;
+ regs.es = segment;
+
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+
+ grub_bios_interrupt (0x13, &regs);
+ /* check if successful */
+ if (!(regs.flags & GRUB_CPU_INT_FLAGS_CARRY))
+ return 0;
+
+ /* save return value */
+ ret = regs.eax >> 8;
+
+ /* if fail, reset the disk system */
+ regs.eax = 0;
+ regs.edx = (drive & 0xff);
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x13, &regs);
+ }
+ return ret;
+}
+
+/*
+ * Check if LBA is supported for DRIVE. If it is supported, then return
+ * the major version of extensions, otherwise zero.
+ */
+static int
+grub_biosdisk_check_int13_extensions (int drive)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.edx = drive & 0xff;
+ regs.eax = 0x4100;
+ regs.ebx = 0x55aa;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x13, &regs);
+
+ if (regs.flags & GRUB_CPU_INT_FLAGS_CARRY)
+ return 0;
+
+ if ((regs.ebx & 0xffff) != 0xaa55)
+ return 0;
+
+ /* check if AH=0x42 is supported */
+ if (!(regs.ecx & 1))
+ return 0;
+
+ return (regs.eax >> 8) & 0xff;
+}
+
+/*
+ * Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an
+ * error occurs, then return non-zero, otherwise zero.
+ */
+static int
+grub_biosdisk_get_diskinfo_standard (int drive,
+ unsigned long *cylinders,
+ unsigned long *heads,
+ unsigned long *sectors)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x0800;
+ regs.edx = drive & 0xff;
+
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x13, &regs);
+
+ /* Check if unsuccessful. Ignore return value if carry isn't set to
+ workaround some buggy BIOSes. */
+ if ((regs.flags & GRUB_CPU_INT_FLAGS_CARRY) && ((regs.eax & 0xff00) != 0))
+ return (regs.eax & 0xff00) >> 8;
+
+ /* bogus BIOSes may not return an error number */
+ /* 0 sectors means no disk */
+ if (!(regs.ecx & 0x3f))
+ /* XXX 0x60 is one of the unused error numbers */
+ return 0x60;
+
+ /* the number of heads is counted from zero */
+ *heads = ((regs.edx >> 8) & 0xff) + 1;
+ *cylinders = (((regs.ecx >> 8) & 0xff) | ((regs.ecx << 2) & 0x0300)) + 1;
+ *sectors = regs.ecx & 0x3f;
+ return 0;
+}
+
+static int
+grub_biosdisk_get_diskinfo_real (int drive, void *drp, grub_uint16_t ax)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = ax;
+
+ /* compute the address of drive parameters */
+ regs.esi = ((grub_addr_t) drp) & 0xf;
+ regs.ds = ((grub_addr_t) drp) >> 4;
+ regs.edx = drive & 0xff;
+
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x13, &regs);
+
+ /* Check if unsuccessful. Ignore return value if carry isn't set to
+ workaround some buggy BIOSes. */
+ if ((regs.flags & GRUB_CPU_INT_FLAGS_CARRY) && ((regs.eax & 0xff00) != 0))
+ return (regs.eax & 0xff00) >> 8;
+
+ return 0;
+}
+
+/*
+ * Return the cdrom information of DRIVE in CDRP. If an error occurs,
+ * then return non-zero, otherwise zero.
+ */
+static int
+grub_biosdisk_get_cdinfo_int13_extensions (int drive, void *cdrp)
+{
+ return grub_biosdisk_get_diskinfo_real (drive, cdrp, 0x4b01);
+}
+
+/*
+ * Return the geometry of DRIVE in a drive parameters, DRP. If an error
+ * occurs, then return non-zero, otherwise zero.
+ */
+static int
+grub_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp)
+{
+ return grub_biosdisk_get_diskinfo_real (drive, drp, 0x4800);
+}
+
+static int
+grub_biosdisk_get_drive (const char *name)
+{
+ unsigned long drive;
+
+ if (name[0] == 'c' && name[1] == 'd' && name[2] == 0 && cd_drive)
+ return cd_drive;
+
+ if ((name[0] != 'f' && name[0] != 'h') || name[1] != 'd')
+ goto fail;
+
+ drive = grub_strtoul (name + 2, 0, 10);
+ if (grub_errno != GRUB_ERR_NONE)
+ goto fail;
+
+ if (name[0] == 'h')
+ drive += 0x80;
+
+ return (int) drive ;
+
+ fail:
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a biosdisk");
+ return -1;
+}
+
+static int
+grub_biosdisk_call_hook (int (*hook) (const char *name), int drive)
+{
+ char name[10];
+
+ if (cd_drive && drive == cd_drive)
+ return hook ("cd");
+
+ grub_snprintf (name, sizeof (name),
+ (drive & 0x80) ? "hd%d" : "fd%d", drive & (~0x80));
+ return hook (name);
+}
+
+static int
+grub_biosdisk_iterate (int (*hook) (const char *name))
+{
+ int drive;
+ int num_floppies;
+
+ /* For hard disks, attempt to read the MBR. */
+ for (drive = 0x80; drive < 0x90; drive++)
+ {
+ if (grub_biosdisk_rw_standard (0x02, drive, 0, 0, 1, 1,
+ GRUB_MEMORY_MACHINE_SCRATCH_SEG) != 0)
+ {
+ grub_dprintf ("disk", "Read error when probing drive 0x%2x\n", drive);
+ break;
+ }
+
+ if (grub_biosdisk_call_hook (hook, drive))
+ return 1;
+ }
+
+ if (cd_drive)
+ {
+ if (grub_biosdisk_call_hook (hook, cd_drive))
+ return 1;
+ }
+
+ /* For floppy disks, we can get the number safely. */
+ num_floppies = grub_biosdisk_get_num_floppies ();
+ for (drive = 0; drive < num_floppies; drive++)
+ if (grub_biosdisk_call_hook (hook, drive))
+ return 1;
+
+ return 0;
+}
+
+static grub_err_t
+grub_biosdisk_open (const char *name, grub_disk_t disk)
+{
+ grub_uint64_t total_sectors = 0;
+ int drive;
+ struct grub_biosdisk_data *data;
+
+ drive = grub_biosdisk_get_drive (name);
+ if (drive < 0)
+ return grub_errno;
+
+ disk->id = drive;
+
+ data = (struct grub_biosdisk_data *) grub_zalloc (sizeof (*data));
+ if (! data)
+ return grub_errno;
+
+ data->drive = drive;
+
+ if ((cd_drive) && (drive == cd_drive))
+ {
+ data->flags = GRUB_BIOSDISK_FLAG_LBA | GRUB_BIOSDISK_FLAG_CDROM;
+ data->sectors = 32;
+ /* TODO: get the correct size. */
+ total_sectors = GRUB_DISK_SIZE_UNKNOWN;
+ }
+ else
+ {
+ /* HDD */
+ int version;
+
+ version = grub_biosdisk_check_int13_extensions (drive);
+ if (version)
+ {
+ struct grub_biosdisk_drp *drp
+ = (struct grub_biosdisk_drp *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+
+ /* Clear out the DRP. */
+ grub_memset (drp, 0, sizeof (*drp));
+ drp->size = sizeof (*drp);
+ if (! grub_biosdisk_get_diskinfo_int13_extensions (drive, drp))
+ {
+ data->flags = GRUB_BIOSDISK_FLAG_LBA;
+
+ if (drp->total_sectors)
+ total_sectors = drp->total_sectors;
+ else
+ /* Some buggy BIOSes doesn't return the total sectors
+ correctly but returns zero. So if it is zero, compute
+ it by C/H/S returned by the LBA BIOS call. */
+ total_sectors = drp->cylinders * drp->heads * drp->sectors;
+ }
+ }
+ }
+
+ if (! (data->flags & GRUB_BIOSDISK_FLAG_CDROM))
+ {
+ if (grub_biosdisk_get_diskinfo_standard (drive,
+ &data->cylinders,
+ &data->heads,
+ &data->sectors) != 0)
+ {
+ if (total_sectors && (data->flags & GRUB_BIOSDISK_FLAG_LBA))
+ {
+ data->sectors = 63;
+ data->heads = 255;
+ data->cylinders
+ = grub_divmod64 (total_sectors
+ + data->heads * data->sectors - 1,
+ data->heads * data->sectors, 0);
+ }
+ else
+ {
+ grub_free (data);
+ return grub_error (GRUB_ERR_BAD_DEVICE, "%s cannot get C/H/S values", disk->name);
+ }
+ }
+
+ if (! total_sectors)
+ total_sectors = data->cylinders * data->heads * data->sectors;
+ }
+
+ disk->total_sectors = total_sectors;
+ disk->data = data;
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_biosdisk_close (grub_disk_t disk)
+{
+ grub_free (disk->data);
+}
+
+/* For readability. */
+#define GRUB_BIOSDISK_READ 0
+#define GRUB_BIOSDISK_WRITE 1
+
+#define GRUB_BIOSDISK_CDROM_RETRY_COUNT 3
+
+static grub_err_t
+grub_biosdisk_rw (int cmd, grub_disk_t disk,
+ grub_disk_addr_t sector, grub_size_t size,
+ unsigned segment)
+{
+ struct grub_biosdisk_data *data = disk->data;
+
+ if (data->flags & GRUB_BIOSDISK_FLAG_LBA)
+ {
+ struct grub_biosdisk_dap *dap;
+
+ dap = (struct grub_biosdisk_dap *) (GRUB_MEMORY_MACHINE_SCRATCH_ADDR
+ + (data->sectors
+ << GRUB_DISK_SECTOR_BITS));
+ dap->length = sizeof (*dap);
+ dap->reserved = 0;
+ dap->blocks = size;
+ dap->buffer = segment << 16; /* The format SEGMENT:ADDRESS. */
+ dap->block = sector;
+
+ if (data->flags & GRUB_BIOSDISK_FLAG_CDROM)
+ {
+ int i;
+
+ if (cmd)
+ return grub_error (GRUB_ERR_WRITE_ERROR, "can\'t write to cdrom");
+
+ dap->blocks = ALIGN_UP (dap->blocks, 4) >> 2;
+ dap->block >>= 2;
+
+ for (i = 0; i < GRUB_BIOSDISK_CDROM_RETRY_COUNT; i++)
+ if (! grub_biosdisk_rw_int13_extensions (0x42, data->drive, dap))
+ break;
+
+ if (i == GRUB_BIOSDISK_CDROM_RETRY_COUNT)
+ return grub_error (GRUB_ERR_READ_ERROR, "cdrom read error");
+ }
+ else
+ if (grub_biosdisk_rw_int13_extensions (cmd + 0x42, data->drive, dap))
+ {
+ /* Fall back to the CHS mode. */
+ data->flags &= ~GRUB_BIOSDISK_FLAG_LBA;
+ disk->total_sectors = data->cylinders * data->heads * data->sectors;
+ return grub_biosdisk_rw (cmd, disk, sector, size, segment);
+ }
+ }
+ else
+ {
+ unsigned coff, hoff, soff;
+ unsigned head;
+
+ /* It is impossible to reach over 8064 MiB (a bit less than LBA24) with
+ the traditional CHS access. */
+ if (sector >
+ 1024 /* cylinders */ *
+ 256 /* heads */ *
+ 63 /* spt */)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "%s out of disk", disk->name);
+
+ soff = ((grub_uint32_t) sector) % data->sectors + 1;
+ head = ((grub_uint32_t) sector) / data->sectors;
+ hoff = head % data->heads;
+ coff = head / data->heads;
+
+ if (coff >= data->cylinders)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "%s out of disk", disk->name);
+
+ if (grub_biosdisk_rw_standard (cmd + 0x02, data->drive,
+ coff, hoff, soff, size, segment))
+ {
+ switch (cmd)
+ {
+ case GRUB_BIOSDISK_READ:
+ return grub_error (GRUB_ERR_READ_ERROR, "%s read error", disk->name);
+ case GRUB_BIOSDISK_WRITE:
+ return grub_error (GRUB_ERR_WRITE_ERROR, "%s write error", disk->name);
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* Return the number of sectors which can be read safely at a time. */
+static grub_size_t
+get_safe_sectors (grub_disk_addr_t sector, grub_uint32_t sectors)
+{
+ grub_size_t size;
+ grub_uint32_t offset;
+
+ /* OFFSET = SECTOR % SECTORS */
+ grub_divmod64 (sector, sectors, &offset);
+
+ size = sectors - offset;
+
+ /* Limit the max to 0x7f because of Phoenix EDD. */
+ if (size > 0x7f)
+ size = 0x7f;
+
+ return size;
+}
+
+static grub_err_t
+grub_biosdisk_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ struct grub_biosdisk_data *data = disk->data;
+
+ while (size)
+ {
+ grub_size_t len;
+ grub_size_t cdoff = 0;
+
+ len = get_safe_sectors (sector, data->sectors);
+
+ if (data->flags & GRUB_BIOSDISK_FLAG_CDROM)
+ {
+ cdoff = (sector & 3) << GRUB_DISK_SECTOR_BITS;
+ len = ALIGN_UP (sector + len, 4) - (sector & ~3);
+ sector &= ~3;
+ }
+
+ if (len > size)
+ len = size;
+
+ if (grub_biosdisk_rw (GRUB_BIOSDISK_READ, disk, sector, len,
+ GRUB_MEMORY_MACHINE_SCRATCH_SEG))
+ return grub_errno;
+
+ grub_memcpy (buf, (void *) (GRUB_MEMORY_MACHINE_SCRATCH_ADDR + cdoff),
+ len << GRUB_DISK_SECTOR_BITS);
+ buf += len << GRUB_DISK_SECTOR_BITS;
+ sector += len;
+ size -= len;
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_biosdisk_write (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, const char *buf)
+{
+ struct grub_biosdisk_data *data = disk->data;
+
+ if (data->flags & GRUB_BIOSDISK_FLAG_CDROM)
+ return grub_error (GRUB_ERR_IO, "can't write to CDROM");
+
+ while (size)
+ {
+ grub_size_t len;
+
+ len = get_safe_sectors (sector, data->sectors);
+ if (len > size)
+ len = size;
+
+ grub_memcpy ((void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR, buf,
+ len << GRUB_DISK_SECTOR_BITS);
+
+ if (grub_biosdisk_rw (GRUB_BIOSDISK_WRITE, disk, sector, len,
+ GRUB_MEMORY_MACHINE_SCRATCH_SEG))
+ return grub_errno;
+
+ buf += len << GRUB_DISK_SECTOR_BITS;
+ sector += len;
+ size -= len;
+ }
+
+ return grub_errno;
+}
+
+static struct grub_disk_dev grub_biosdisk_dev =
+ {
+ .name = "biosdisk",
+ .id = GRUB_DISK_DEVICE_BIOSDISK_ID,
+ .iterate = grub_biosdisk_iterate,
+ .open = grub_biosdisk_open,
+ .close = grub_biosdisk_close,
+ .read = grub_biosdisk_read,
+ .write = grub_biosdisk_write,
+ .next = 0
+ };
+
+static void
+grub_disk_biosdisk_fini (void)
+{
+ grub_disk_dev_unregister (&grub_biosdisk_dev);
+}
+
+GRUB_MOD_INIT(biosdisk)
+{
+ struct grub_biosdisk_cdrp *cdrp
+ = (struct grub_biosdisk_cdrp *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+
+ if (grub_disk_firmware_is_tainted)
+ {
+ grub_printf ("Firmware is marked as tainted, refusing to initialize.\n");
+ return;
+ }
+ grub_disk_firmware_fini = grub_disk_biosdisk_fini;
+
+ grub_memset (cdrp, 0, sizeof (*cdrp));
+ cdrp->size = sizeof (*cdrp);
+ cdrp->media_type = 0xFF;
+ if ((! grub_biosdisk_get_cdinfo_int13_extensions (grub_boot_drive, cdrp)) &&
+ ((cdrp->media_type & GRUB_BIOSDISK_CDTYPE_MASK)
+ == GRUB_BIOSDISK_CDTYPE_NO_EMUL))
+ cd_drive = cdrp->drive_no;
+ /* Since diskboot.S rejects devices over 0x90 it must be a CD booted with
+ cdboot.S
+ */
+ if (grub_boot_drive >= 0x90)
+ cd_drive = grub_boot_drive;
+
+ grub_disk_dev_register (&grub_biosdisk_dev);
+}
+
+GRUB_MOD_FINI(biosdisk)
+{
+ grub_disk_biosdisk_fini ();
+}
diff --git a/grub-core/disk/ieee1275/nand.c b/grub-core/disk/ieee1275/nand.c
new file mode 100644
index 0000000..e945016
--- /dev/null
+++ b/grub-core/disk/ieee1275/nand.c
@@ -0,0 +1,216 @@
+/* nand.c - NAND flash disk access. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/ieee1275/ieee1275.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_nand_data
+{
+ grub_ieee1275_ihandle_t handle;
+ grub_uint32_t block_size;
+};
+
+static int
+grub_nand_iterate (int (*hook) (const char *name))
+{
+ auto int dev_iterate (struct grub_ieee1275_devalias *alias);
+ int dev_iterate (struct grub_ieee1275_devalias *alias)
+ {
+ if (! grub_strcmp (alias->name, "nand"))
+ {
+ hook (alias->name);
+ return 1;
+ }
+
+ return 0;
+ }
+
+ return grub_devalias_iterate (dev_iterate);
+}
+
+static grub_err_t
+grub_nand_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf);
+
+static grub_err_t
+grub_nand_open (const char *name, grub_disk_t disk)
+{
+ grub_ieee1275_ihandle_t dev_ihandle = 0;
+ struct grub_nand_data *data = 0;
+ struct size_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t result;
+ grub_ieee1275_cell_t size1;
+ grub_ieee1275_cell_t size2;
+ } args;
+
+ if (! grub_strstr (name, "nand"))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a NAND device");
+
+ data = grub_malloc (sizeof (*data));
+ if (! data)
+ goto fail;
+
+ grub_ieee1275_open (name, &dev_ihandle);
+ if (! dev_ihandle)
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
+ goto fail;
+ }
+
+ data->handle = dev_ihandle;
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 2, 2);
+ args.method = (grub_ieee1275_cell_t) "block-size";
+ args.ihandle = dev_ihandle;
+ args.result = 1;
+
+ if ((IEEE1275_CALL_ENTRY_FN (&args) == -1) || (args.result))
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't get block size");
+ goto fail;
+ }
+
+ data->block_size = (args.size1 >> GRUB_DISK_SECTOR_BITS);
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 2, 3);
+ args.method = (grub_ieee1275_cell_t) "size";
+ args.ihandle = dev_ihandle;
+ args.result = 1;
+
+ if ((IEEE1275_CALL_ENTRY_FN (&args) == -1) || (args.result))
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't get disk size");
+ goto fail;
+ }
+
+ disk->total_sectors = args.size1;
+ disk->total_sectors <<= 32;
+ disk->total_sectors += args.size2;
+ disk->total_sectors >>= GRUB_DISK_SECTOR_BITS;
+
+ disk->id = dev_ihandle;
+
+ disk->data = data;
+
+ return 0;
+
+fail:
+ if (dev_ihandle)
+ grub_ieee1275_close (dev_ihandle);
+ grub_free (data);
+ return grub_errno;
+}
+
+static void
+grub_nand_close (grub_disk_t disk)
+{
+ grub_ieee1275_close (((struct grub_nand_data *) disk->data)->handle);
+ grub_free (disk->data);
+}
+
+static grub_err_t
+grub_nand_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ struct grub_nand_data *data = disk->data;
+ grub_size_t bsize, ofs;
+
+ struct read_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t ofs;
+ grub_ieee1275_cell_t page;
+ grub_ieee1275_cell_t len;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t result;
+ } args;
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 6, 1);
+ args.method = (grub_ieee1275_cell_t) "pio-read";
+ args.ihandle = data->handle;
+ args.buf = (grub_ieee1275_cell_t) buf;
+ args.page = (grub_ieee1275_cell_t) ((grub_size_t) sector / data->block_size);
+
+ ofs = ((grub_size_t) sector % data->block_size) << GRUB_DISK_SECTOR_BITS;
+ size <<= GRUB_DISK_SECTOR_BITS;
+ bsize = (data->block_size << GRUB_DISK_SECTOR_BITS);
+
+ do
+ {
+ grub_size_t len;
+
+ len = (ofs + size > bsize) ? (bsize - ofs) : size;
+
+ args.len = (grub_ieee1275_cell_t) len;
+ args.ofs = (grub_ieee1275_cell_t) ofs;
+ args.result = 1;
+
+ if ((IEEE1275_CALL_ENTRY_FN (&args) == -1) || (args.result))
+ return grub_error (GRUB_ERR_READ_ERROR, "read error");
+
+ ofs = 0;
+ size -= len;
+ args.buf += len;
+ args.page++;
+ } while (size);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_nand_write (grub_disk_t disk __attribute ((unused)),
+ grub_disk_addr_t sector __attribute ((unused)),
+ grub_size_t size __attribute ((unused)),
+ const char *buf __attribute ((unused)))
+{
+ return GRUB_ERR_NOT_IMPLEMENTED_YET;
+}
+
+static struct grub_disk_dev grub_nand_dev =
+ {
+ .name = "nand",
+ .id = GRUB_DISK_DEVICE_NAND_ID,
+ .iterate = grub_nand_iterate,
+ .open = grub_nand_open,
+ .close = grub_nand_close,
+ .read = grub_nand_read,
+ .write = grub_nand_write,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(nand)
+{
+ grub_disk_dev_register (&grub_nand_dev);
+}
+
+GRUB_MOD_FINI(nand)
+{
+ grub_disk_dev_unregister (&grub_nand_dev);
+}
diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c
new file mode 100644
index 0000000..0a935d5
--- /dev/null
+++ b/grub-core/disk/ieee1275/ofdisk.c
@@ -0,0 +1,373 @@
+/* ofdisk.c - Open Firmware disk access. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/ieee1275/ofdisk.h>
+
+static char *last_devpath;
+static grub_ieee1275_ihandle_t last_ihandle;
+
+struct ofdisk_hash_ent
+{
+ char *devpath;
+ /* Pointer to shortest available name on nodes representing canonical names,
+ otherwise NULL. */
+ const char *shortest;
+ struct ofdisk_hash_ent *next;
+};
+
+#define OFDISK_HASH_SZ 8
+static struct ofdisk_hash_ent *ofdisk_hash[OFDISK_HASH_SZ];
+
+static int
+ofdisk_hash_fn (const char *devpath)
+{
+ int hash = 0;
+ while (*devpath)
+ hash ^= *devpath++;
+ return (hash & (OFDISK_HASH_SZ - 1));
+}
+
+static struct ofdisk_hash_ent *
+ofdisk_hash_find (const char *devpath)
+{
+ struct ofdisk_hash_ent *p = ofdisk_hash[ofdisk_hash_fn(devpath)];
+
+ while (p)
+ {
+ if (!grub_strcmp (p->devpath, devpath))
+ break;
+ p = p->next;
+ }
+ return p;
+}
+
+static struct ofdisk_hash_ent *
+ofdisk_hash_add_real (char *devpath)
+{
+ struct ofdisk_hash_ent *p;
+ struct ofdisk_hash_ent **head = &ofdisk_hash[ofdisk_hash_fn(devpath)];
+
+ p = grub_malloc(sizeof (*p));
+ if (!p)
+ return NULL;
+
+ p->devpath = devpath;
+ p->next = *head;
+ p->shortest = 0;
+ *head = p;
+ return p;
+}
+
+static struct ofdisk_hash_ent *
+ofdisk_hash_add (char *devpath, char *curcan)
+{
+ struct ofdisk_hash_ent *p, *pcan;
+
+ p = ofdisk_hash_add_real (devpath);
+
+ grub_dprintf ("disk", "devpath = %s, canonical = %s\n", devpath, curcan);
+
+ if (!curcan)
+ {
+ p->shortest = devpath;
+ return p;
+ }
+
+ pcan = ofdisk_hash_find (curcan);
+ if (!pcan)
+ pcan = ofdisk_hash_add_real (curcan);
+ else
+ grub_free (curcan);
+
+ if (!pcan)
+ grub_errno = GRUB_ERR_NONE;
+ else
+ {
+ if (!pcan->shortest
+ || grub_strlen (pcan->shortest) > grub_strlen (devpath))
+ pcan->shortest = devpath;
+ }
+
+ return p;
+}
+
+static void
+scan (void)
+{
+ auto int dev_iterate (struct grub_ieee1275_devalias *alias);
+
+ int dev_iterate (struct grub_ieee1275_devalias *alias)
+ {
+ struct ofdisk_hash_ent *op;
+
+ grub_dprintf ("disk", "device name = %s type = %s\n", alias->name,
+ alias->type);
+
+ if (grub_strcmp (alias->type, "block") != 0)
+ return 0;
+
+ grub_dprintf ("disk", "disk name = %s\n", alias->name);
+ grub_dprintf ("disk", "disk name = %s, path = %s\n", alias->name,
+ alias->path);
+
+ op = ofdisk_hash_find (alias->name);
+ if (!op)
+ {
+ char *name = grub_strdup (alias->name);
+ char *can = grub_strdup (alias->path);
+ if (!name || !can)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ grub_free (name);
+ grub_free (can);
+ return 0;
+ }
+ op = ofdisk_hash_add (name, can);
+ }
+ return 0;
+ }
+
+ grub_devalias_iterate (dev_iterate);
+ grub_ieee1275_devices_iterate (dev_iterate);
+}
+
+static int
+grub_ofdisk_iterate (int (*hook) (const char *name))
+{
+ unsigned i;
+ scan ();
+
+ for (i = 0; i < ARRAY_SIZE (ofdisk_hash); i++)
+ {
+ static struct ofdisk_hash_ent *ent;
+ for (ent = ofdisk_hash[i]; ent; ent = ent->next)
+ {
+ if (!ent->shortest)
+ continue;
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY))
+ {
+ grub_ieee1275_phandle_t dev;
+ char tmp[8];
+
+ if (grub_ieee1275_finddevice (ent->devpath, &dev))
+ {
+ grub_dprintf ("disk", "finddevice (%s) failed\n",
+ ent->devpath);
+ continue;
+ }
+
+ if (grub_ieee1275_get_property (dev, "iconname", tmp,
+ sizeof tmp, 0))
+ {
+ grub_dprintf ("disk", "get iconname failed\n");
+ continue;
+ }
+
+ if (grub_strcmp (tmp, "sdmmc") != 0)
+ {
+ grub_dprintf ("disk", "device is not an SD card\n");
+ continue;
+ }
+ }
+
+ if (grub_strncmp (ent->shortest, "cdrom", 5) == 0)
+ continue;
+
+ if (hook (ent->shortest))
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static char *
+compute_dev_path (const char *name)
+{
+ char *devpath = grub_malloc (grub_strlen (name) + 3);
+ char *p, c;
+
+ if (!devpath)
+ return NULL;
+
+ /* Un-escape commas. */
+ p = devpath;
+ while ((c = *name++) != '\0')
+ {
+ if (c == '\\' && *name == ',')
+ {
+ *p++ = ',';
+ name++;
+ }
+ else
+ *p++ = c;
+ }
+
+ *p++ = '\0';
+
+ return devpath;
+}
+
+static grub_err_t
+grub_ofdisk_open (const char *name, grub_disk_t disk)
+{
+ grub_ieee1275_phandle_t dev;
+ char *devpath;
+ /* XXX: This should be large enough for any possible case. */
+ char prop[64];
+ grub_ssize_t actual;
+
+ devpath = compute_dev_path (name);
+ if (! devpath)
+ return grub_errno;
+
+ grub_dprintf ("disk", "Opening `%s'.\n", devpath);
+
+ if (grub_ieee1275_finddevice (devpath, &dev))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read device properties");
+
+ if (grub_ieee1275_get_property (dev, "device_type", prop, sizeof (prop),
+ &actual))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't read the device type");
+
+ if (grub_strcmp (prop, "block"))
+ return grub_error (GRUB_ERR_BAD_DEVICE, "not a block device");
+
+ /* XXX: There is no property to read the number of blocks. There
+ should be a property `#blocks', but it is not there. Perhaps it
+ is possible to use seek for this. */
+ disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
+
+ {
+ struct ofdisk_hash_ent *op;
+ op = ofdisk_hash_find (devpath);
+ if (!op)
+ op = ofdisk_hash_add (devpath, NULL);
+ else
+ grub_free (devpath);
+ if (!op)
+ return grub_errno;
+ disk->id = (unsigned long) op;
+ disk->data = op->devpath;
+ }
+
+ return 0;
+}
+
+static void
+grub_ofdisk_close (grub_disk_t disk)
+{
+ if (disk->data == last_devpath)
+ {
+ if (last_ihandle)
+ grub_ieee1275_close (last_ihandle);
+ last_ihandle = 0;
+ last_devpath = NULL;
+ }
+ disk->data = 0;
+}
+
+static grub_err_t
+grub_ofdisk_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_ssize_t status, actual;
+ unsigned long long pos;
+
+ if (disk->data != last_devpath)
+ {
+ if (last_ihandle)
+ grub_ieee1275_close (last_ihandle);
+ last_ihandle = 0;
+ last_devpath = NULL;
+
+ if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PARTITION_0))
+ {
+ char name2[grub_strlen (disk->data) + 3];
+ char *p;
+
+ grub_strcpy (name2, disk->data);
+ p = name2 + grub_strlen (name2);
+ *p++ = ':';
+ *p++ = '0';
+ *p = 0;
+ grub_ieee1275_open (name2, &last_ihandle);
+ }
+ else
+ grub_ieee1275_open (disk->data, &last_ihandle);
+ if (! last_ihandle)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
+ last_devpath = disk->data;
+ }
+
+ pos = sector * 512UL;
+
+ grub_ieee1275_seek (last_ihandle, pos, &status);
+ if (status < 0)
+ return grub_error (GRUB_ERR_READ_ERROR,
+ "seek error, can't seek block %llu",
+ (long long) sector);
+ grub_ieee1275_read (last_ihandle, buf, size * 512UL, &actual);
+ if (actual != (grub_ssize_t) (size * 512UL))
+ return grub_error (GRUB_ERR_READ_ERROR, "read error on block: %llu",
+ (long long) sector);
+
+ return 0;
+}
+
+static grub_err_t
+grub_ofdisk_write (grub_disk_t disk __attribute ((unused)),
+ grub_disk_addr_t sector __attribute ((unused)),
+ grub_size_t size __attribute ((unused)),
+ const char *buf __attribute ((unused)))
+{
+ return GRUB_ERR_NOT_IMPLEMENTED_YET;
+}
+
+static struct grub_disk_dev grub_ofdisk_dev =
+ {
+ .name = "ofdisk",
+ .id = GRUB_DISK_DEVICE_OFDISK_ID,
+ .iterate = grub_ofdisk_iterate,
+ .open = grub_ofdisk_open,
+ .close = grub_ofdisk_close,
+ .read = grub_ofdisk_read,
+ .write = grub_ofdisk_write,
+ .next = 0
+ };
+
+void
+grub_ofdisk_init (void)
+{
+ grub_disk_dev_register (&grub_ofdisk_dev);
+}
+
+void
+grub_ofdisk_fini (void)
+{
+ if (last_ihandle)
+ grub_ieee1275_close (last_ihandle);
+ last_ihandle = 0;
+ last_devpath = NULL;
+
+ grub_disk_dev_unregister (&grub_ofdisk_dev);
+}
diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c
new file mode 100644
index 0000000..d50f353
--- /dev/null
+++ b/grub-core/disk/loopback.c
@@ -0,0 +1,232 @@
+/* loopback.c - command to add loopback devices. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_loopback
+{
+ char *devname;
+ grub_file_t file;
+ struct grub_loopback *next;
+};
+
+static struct grub_loopback *loopback_list;
+
+static const struct grub_arg_option options[] =
+ {
+ {"delete", 'd', 0, N_("Delete the loopback device entry."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+/* Delete the loopback device NAME. */
+static grub_err_t
+delete_loopback (const char *name)
+{
+ struct grub_loopback *dev;
+ struct grub_loopback **prev;
+
+ /* Search for the device. */
+ for (dev = loopback_list, prev = &loopback_list;
+ dev;
+ prev = &dev->next, dev = dev->next)
+ if (grub_strcmp (dev->devname, name) == 0)
+ break;
+
+ if (! dev)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "device not found");
+
+ /* Remove the device from the list. */
+ *prev = dev->next;
+
+ grub_free (dev->devname);
+ grub_file_close (dev->file);
+ grub_free (dev);
+
+ return 0;
+}
+
+/* The command to add and remove loopback devices. */
+static grub_err_t
+grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ grub_file_t file;
+ struct grub_loopback *newdev;
+ grub_err_t ret;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
+
+ /* Check if `-d' was used. */
+ if (state[0].set)
+ return delete_loopback (args[0]);
+
+ if (argc < 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ file = grub_file_open (args[1]);
+ if (! file)
+ return grub_errno;
+
+ /* First try to replace the old device. */
+ for (newdev = loopback_list; newdev; newdev = newdev->next)
+ if (grub_strcmp (newdev->devname, args[0]) == 0)
+ break;
+
+ if (newdev)
+ {
+ grub_file_close (newdev->file);
+ newdev->file = file;
+
+ return 0;
+ }
+
+ /* Unable to replace it, make a new entry. */
+ newdev = grub_malloc (sizeof (struct grub_loopback));
+ if (! newdev)
+ goto fail;
+
+ newdev->devname = grub_strdup (args[0]);
+ if (! newdev->devname)
+ {
+ grub_free (newdev);
+ goto fail;
+ }
+
+ newdev->file = file;
+
+ /* Add the new entry to the list. */
+ newdev->next = loopback_list;
+ loopback_list = newdev;
+
+ return 0;
+
+fail:
+ ret = grub_errno;
+ grub_file_close (file);
+ return ret;
+}
+
+
+static int
+grub_loopback_iterate (int (*hook) (const char *name))
+{
+ struct grub_loopback *d;
+ for (d = loopback_list; d; d = d->next)
+ {
+ if (hook (d->devname))
+ return 1;
+ }
+ return 0;
+}
+
+static grub_err_t
+grub_loopback_open (const char *name, grub_disk_t disk)
+{
+ struct grub_loopback *dev;
+
+ for (dev = loopback_list; dev; dev = dev->next)
+ if (grub_strcmp (dev->devname, name) == 0)
+ break;
+
+ if (! dev)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't open device");
+
+ /* Use the filesize for the disk size, round up to a complete sector. */
+ if (dev->file->size != GRUB_FILE_SIZE_UNKNOWN)
+ disk->total_sectors = ((dev->file->size + GRUB_DISK_SECTOR_SIZE - 1)
+ / GRUB_DISK_SECTOR_SIZE);
+ else
+ disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
+ disk->id = (unsigned long) dev;
+
+ disk->data = dev;
+
+ return 0;
+}
+
+static grub_err_t
+grub_loopback_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_file_t file = ((struct grub_loopback *) disk->data)->file;
+ grub_off_t pos;
+
+ grub_file_seek (file, sector << GRUB_DISK_SECTOR_BITS);
+
+ grub_file_read (file, buf, size << GRUB_DISK_SECTOR_BITS);
+ if (grub_errno)
+ return grub_errno;
+
+ /* In case there is more data read than there is available, in case
+ of files that are not a multiple of GRUB_DISK_SECTOR_SIZE, fill
+ the rest with zeros. */
+ pos = (sector + size) << GRUB_DISK_SECTOR_BITS;
+ if (pos > file->size)
+ {
+ grub_size_t amount = pos - file->size;
+ grub_memset (buf + (size << GRUB_DISK_SECTOR_BITS) - amount, 0, amount);
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_loopback_write (grub_disk_t disk __attribute ((unused)),
+ grub_disk_addr_t sector __attribute ((unused)),
+ grub_size_t size __attribute ((unused)),
+ const char *buf __attribute ((unused)))
+{
+ return GRUB_ERR_NOT_IMPLEMENTED_YET;
+}
+
+static struct grub_disk_dev grub_loopback_dev =
+ {
+ .name = "loopback",
+ .id = GRUB_DISK_DEVICE_LOOPBACK_ID,
+ .iterate = grub_loopback_iterate,
+ .open = grub_loopback_open,
+ .read = grub_loopback_read,
+ .write = grub_loopback_write,
+ .next = 0
+ };
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(loopback)
+{
+ cmd = grub_register_extcmd ("loopback", grub_cmd_loopback, 0,
+ N_("[-d] DEVICENAME FILE."),
+ N_("Make a device of a file."), options);
+ grub_disk_dev_register (&grub_loopback_dev);
+}
+
+GRUB_MOD_FINI(loopback)
+{
+ grub_unregister_extcmd (cmd);
+ grub_disk_dev_unregister (&grub_loopback_dev);
+}
diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
new file mode 100644
index 0000000..206e3e2
--- /dev/null
+++ b/grub-core/disk/lvm.c
@@ -0,0 +1,896 @@
+/* lvm.c - module to read Logical Volumes. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/lvm.h>
+
+#ifdef GRUB_UTIL
+#include <grub/emu/misc.h>
+#endif
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct grub_lvm_vg *vg_list;
+static int lv_count;
+
+
+/* Go the string STR and return the number after STR. *P will point
+ at the number. In case STR is not found, *P will be NULL and the
+ return value will be 0. */
+static int
+grub_lvm_getvalue (char **p, char *str)
+{
+ *p = grub_strstr (*p, str);
+ if (! *p)
+ return 0;
+ *p += grub_strlen (str);
+ return grub_strtoul (*p, NULL, 10);
+}
+
+#if 0
+static int
+grub_lvm_checkvalue (char **p, char *str, char *tmpl)
+{
+ int tmpllen = grub_strlen (tmpl);
+ *p = grub_strstr (*p, str);
+ if (! *p)
+ return 0;
+ *p += grub_strlen (str);
+ if (**p != '"')
+ return 0;
+ return (grub_memcmp (*p + 1, tmpl, tmpllen) == 0 && (*p)[tmpllen + 1] == '"');
+}
+#endif
+
+static int
+grub_lvm_check_flag (char *p, char *str, char *flag)
+{
+ int len_str = grub_strlen (str), len_flag = grub_strlen (flag);
+ while (1)
+ {
+ char *q;
+ p = grub_strstr (p, str);
+ if (! p)
+ return 0;
+ p += len_str;
+ if (grub_memcmp (p, " = [", sizeof (" = [") - 1) != 0)
+ continue;
+ q = p + sizeof (" = [") - 1;
+ while (1)
+ {
+ while (grub_isspace (*q))
+ q++;
+ if (*q != '"')
+ return 0;
+ q++;
+ if (grub_memcmp (q, flag, len_flag) == 0 && q[len_flag] == '"')
+ return 1;
+ while (*q != '"')
+ q++;
+ q++;
+ if (*q == ']')
+ return 0;
+ q++;
+ }
+ }
+}
+
+static int
+grub_lvm_iterate (int (*hook) (const char *name))
+{
+ struct grub_lvm_vg *vg;
+ for (vg = vg_list; vg; vg = vg->next)
+ {
+ struct grub_lvm_lv *lv;
+ if (vg->lvs)
+ for (lv = vg->lvs; lv; lv = lv->next)
+ if (lv->visible && hook (lv->name))
+ return 1;
+ }
+
+ return 0;
+}
+
+#ifdef GRUB_UTIL
+static grub_disk_memberlist_t
+grub_lvm_memberlist (grub_disk_t disk)
+{
+ struct grub_lvm_lv *lv = disk->data;
+ grub_disk_memberlist_t list = NULL, tmp;
+ struct grub_lvm_pv *pv;
+
+ if (lv->vg->pvs)
+ for (pv = lv->vg->pvs; pv; pv = pv->next)
+ {
+ if (!pv->disk)
+ grub_util_error ("Couldn't find PV %s. Check your device.map",
+ pv->name);
+ tmp = grub_malloc (sizeof (*tmp));
+ tmp->disk = pv->disk;
+ tmp->next = list;
+ list = tmp;
+ }
+
+ return list;
+}
+#endif
+
+static grub_err_t
+grub_lvm_open (const char *name, grub_disk_t disk)
+{
+ struct grub_lvm_vg *vg;
+ struct grub_lvm_lv *lv = NULL;
+ for (vg = vg_list; vg; vg = vg->next)
+ {
+ if (vg->lvs)
+ for (lv = vg->lvs; lv; lv = lv->next)
+ if (! grub_strcmp (lv->name, name))
+ break;
+
+ if (lv)
+ break;
+ }
+
+ if (! lv)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "unknown LVM device %s", name);
+
+ disk->id = lv->number;
+ disk->data = lv;
+ disk->total_sectors = lv->size;
+
+ return 0;
+}
+
+static void
+grub_lvm_close (grub_disk_t disk __attribute ((unused)))
+{
+ return;
+}
+
+static grub_err_t
+read_lv (struct grub_lvm_lv *lv, grub_disk_addr_t sector,
+ grub_size_t size, char *buf);
+
+static grub_err_t
+read_node (const struct grub_lvm_node *node, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ /* Check whether we actually know the physical volume we want to
+ read from. */
+ if (node->pv)
+ {
+ if (node->pv->disk)
+ return grub_disk_read (node->pv->disk, sector + node->pv->start, 0,
+ size << GRUB_DISK_SECTOR_BITS, buf);
+ else
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "physical volume %s not found", node->pv->name);
+
+ }
+ if (node->lv)
+ return read_lv (node->lv, sector, size, buf);
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "unknown node '%s'", node->name);
+}
+
+static grub_err_t
+read_lv (struct grub_lvm_lv *lv, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_err_t err = 0;
+ struct grub_lvm_vg *vg = lv->vg;
+ struct grub_lvm_segment *seg = lv->segments;
+ struct grub_lvm_node *node;
+ grub_uint64_t offset;
+ grub_uint64_t extent;
+ unsigned int i;
+
+ if (!lv)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "unknown volume");
+
+ extent = grub_divmod64 (sector, vg->extent_size, NULL);
+
+ /* Find the right segment. */
+ for (i = 0; i < lv->segment_count; i++)
+ {
+ if ((seg->start_extent <= extent)
+ && ((seg->start_extent + seg->extent_count) > extent))
+ {
+ break;
+ }
+
+ seg++;
+ }
+
+ if (i == lv->segment_count)
+ return grub_error (GRUB_ERR_READ_ERROR, "incorrect segment");
+
+ switch (seg->type)
+ {
+ case GRUB_LVM_STRIPED:
+ if (seg->node_count == 1)
+ {
+ /* This segment is linear, so that's easy. We just need to find
+ out the offset in the physical volume and read SIZE bytes
+ from that. */
+ struct grub_lvm_node *stripe = seg->nodes;
+ grub_uint64_t seg_offset; /* Offset of the segment in PV device. */
+
+ node = stripe;
+ seg_offset = ((grub_uint64_t) stripe->start
+ * (grub_uint64_t) vg->extent_size);
+
+ offset = sector - ((grub_uint64_t) seg->start_extent
+ * (grub_uint64_t) vg->extent_size) + seg_offset;
+ }
+ else
+ {
+ /* This is a striped segment. We have to find the right PV
+ similar to RAID0. */
+ struct grub_lvm_node *stripe = seg->nodes;
+ grub_uint32_t a, b;
+ grub_uint64_t seg_offset; /* Offset of the segment in PV device. */
+ unsigned int stripenr;
+
+ offset = sector - ((grub_uint64_t) seg->start_extent
+ * (grub_uint64_t) vg->extent_size);
+
+ a = grub_divmod64 (offset, seg->stripe_size, NULL);
+ grub_divmod64 (a, seg->node_count, &stripenr);
+
+ a = grub_divmod64 (offset, seg->stripe_size * seg->node_count, NULL);
+ grub_divmod64 (offset, seg->stripe_size, &b);
+ offset = a * seg->stripe_size + b;
+
+ stripe += stripenr;
+ node = stripe;
+
+ seg_offset = ((grub_uint64_t) stripe->start
+ * (grub_uint64_t) vg->extent_size);
+
+ offset += seg_offset;
+ }
+ return read_node (node, offset, size, buf);
+ case GRUB_LVM_MIRROR:
+ i = 0;
+ while (1)
+ {
+ err = read_node (&seg->nodes[i], sector, size, buf);
+ if (!err)
+ return err;
+ if (++i >= seg->node_count)
+ return err;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+ return grub_error (GRUB_ERR_IO, "unknown LVM segment");
+}
+
+static grub_err_t
+grub_lvm_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ return read_lv (disk->data, sector, size, buf);
+}
+
+static grub_err_t
+grub_lvm_write (grub_disk_t disk __attribute ((unused)),
+ grub_disk_addr_t sector __attribute ((unused)),
+ grub_size_t size __attribute ((unused)),
+ const char *buf __attribute ((unused)))
+{
+ return GRUB_ERR_NOT_IMPLEMENTED_YET;
+}
+
+static int
+grub_lvm_scan_device (const char *name)
+{
+ grub_err_t err;
+ grub_disk_t disk;
+ grub_uint64_t mda_offset, mda_size;
+ char buf[GRUB_LVM_LABEL_SIZE];
+ char vg_id[GRUB_LVM_ID_STRLEN+1];
+ char pv_id[GRUB_LVM_ID_STRLEN+1];
+ char *metadatabuf, *p, *q, *vgname;
+ struct grub_lvm_label_header *lh = (struct grub_lvm_label_header *) buf;
+ struct grub_lvm_pv_header *pvh;
+ struct grub_lvm_disk_locn *dlocn;
+ struct grub_lvm_mda_header *mdah;
+ struct grub_lvm_raw_locn *rlocn;
+ unsigned int i, j, vgname_len;
+ struct grub_lvm_vg *vg;
+ struct grub_lvm_pv *pv;
+
+#ifdef GRUB_UTIL
+ grub_util_info ("scanning %s for LVM", name);
+#endif
+
+ disk = grub_disk_open (name);
+ if (!disk)
+ {
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_errno = GRUB_ERR_NONE;
+ return 0;
+ }
+
+ /* Search for label. */
+ for (i = 0; i < GRUB_LVM_LABEL_SCAN_SECTORS; i++)
+ {
+ err = grub_disk_read (disk, i, 0, sizeof(buf), buf);
+ if (err)
+ goto fail;
+
+ if ((! grub_strncmp ((char *)lh->id, GRUB_LVM_LABEL_ID,
+ sizeof (lh->id)))
+ && (! grub_strncmp ((char *)lh->type, GRUB_LVM_LVM2_LABEL,
+ sizeof (lh->type))))
+ break;
+ }
+
+ /* Return if we didn't find a label. */
+ if (i == GRUB_LVM_LABEL_SCAN_SECTORS)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("no LVM signature found");
+#endif
+ goto fail;
+ }
+
+ pvh = (struct grub_lvm_pv_header *) (buf + grub_le_to_cpu32(lh->offset_xl));
+
+ for (i = 0, j = 0; i < GRUB_LVM_ID_LEN; i++)
+ {
+ pv_id[j++] = pvh->pv_uuid[i];
+ if ((i != 1) && (i != 29) && (i % 4 == 1))
+ pv_id[j++] = '-';
+ }
+ pv_id[j] = '\0';
+
+ dlocn = pvh->disk_areas_xl;
+
+ dlocn++;
+ /* Is it possible to have multiple data/metadata areas? I haven't
+ seen devices that have it. */
+ if (dlocn->offset)
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "we don't support multiple LVM data areas");
+
+#ifdef GRUB_UTIL
+ grub_util_info ("we don't support multiple LVM data areas\n");
+#endif
+ goto fail;
+ }
+
+ dlocn++;
+ mda_offset = grub_le_to_cpu64 (dlocn->offset);
+ mda_size = grub_le_to_cpu64 (dlocn->size);
+
+ /* It's possible to have multiple copies of metadata areas, we just use the
+ first one. */
+
+ /* Allocate buffer space for the circular worst-case scenario. */
+ metadatabuf = grub_malloc (2 * mda_size);
+ if (! metadatabuf)
+ goto fail;
+
+ err = grub_disk_read (disk, 0, mda_offset, mda_size, metadatabuf);
+ if (err)
+ goto fail2;
+
+ mdah = (struct grub_lvm_mda_header *) metadatabuf;
+ if ((grub_strncmp ((char *)mdah->magic, GRUB_LVM_FMTT_MAGIC,
+ sizeof (mdah->magic)))
+ || (grub_le_to_cpu32 (mdah->version) != GRUB_LVM_FMTT_VERSION))
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unknown LVM metadata header");
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown LVM metadata header\n");
+#endif
+ goto fail2;
+ }
+
+ rlocn = mdah->raw_locns;
+ if (grub_le_to_cpu64 (rlocn->offset) + grub_le_to_cpu64 (rlocn->size) >
+ grub_le_to_cpu64 (mdah->size))
+ {
+ /* Metadata is circular. Copy the wrap in place. */
+ grub_memcpy (metadatabuf + mda_size,
+ metadatabuf + GRUB_LVM_MDA_HEADER_SIZE,
+ grub_le_to_cpu64 (rlocn->offset) +
+ grub_le_to_cpu64 (rlocn->size) -
+ grub_le_to_cpu64 (mdah->size));
+ }
+ p = q = metadatabuf + grub_le_to_cpu64 (rlocn->offset);
+
+ while (*q != ' ' && q < metadatabuf + mda_size)
+ q++;
+
+ if (q == metadatabuf + mda_size)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("error parsing metadata\n");
+#endif
+ goto fail2;
+ }
+
+ vgname_len = q - p;
+ vgname = grub_malloc (vgname_len + 1);
+ if (!vgname)
+ goto fail2;
+
+ grub_memcpy (vgname, p, vgname_len);
+ vgname[vgname_len] = '\0';
+
+ p = grub_strstr (q, "id = \"");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("couldn't find ID\n");
+#endif
+ goto fail3;
+ }
+ p += sizeof ("id = \"") - 1;
+ grub_memcpy (vg_id, p, GRUB_LVM_ID_STRLEN);
+ vg_id[GRUB_LVM_ID_STRLEN] = '\0';
+
+ for (vg = vg_list; vg; vg = vg->next)
+ {
+ if (! grub_memcmp(vg_id, vg->id, GRUB_LVM_ID_STRLEN))
+ break;
+ }
+
+ if (! vg)
+ {
+ /* First time we see this volume group. We've to create the
+ whole volume group structure. */
+ vg = grub_malloc (sizeof (*vg));
+ if (! vg)
+ goto fail3;
+ vg->name = vgname;
+ grub_memcpy (vg->id, vg_id, GRUB_LVM_ID_STRLEN+1);
+
+ vg->extent_size = grub_lvm_getvalue (&p, "extent_size = ");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown extent size\n");
+#endif
+ goto fail4;
+ }
+
+ vg->lvs = NULL;
+ vg->pvs = NULL;
+
+ p = grub_strstr (p, "physical_volumes {");
+ if (p)
+ {
+ p += sizeof ("physical_volumes {") - 1;
+
+ /* Add all the pvs to the volume group. */
+ while (1)
+ {
+ int s;
+ while (grub_isspace (*p))
+ p++;
+
+ if (*p == '}')
+ break;
+
+ pv = grub_malloc (sizeof (*pv));
+ q = p;
+ while (*q != ' ')
+ q++;
+
+ s = q - p;
+ pv->name = grub_malloc (s + 1);
+ grub_memcpy (pv->name, p, s);
+ pv->name[s] = '\0';
+
+ p = grub_strstr (p, "id = \"");
+ if (p == NULL)
+ goto pvs_fail;
+ p += sizeof("id = \"") - 1;
+
+ grub_memcpy (pv->id, p, GRUB_LVM_ID_STRLEN);
+ pv->id[GRUB_LVM_ID_STRLEN] = '\0';
+
+ pv->start = grub_lvm_getvalue (&p, "pe_start = ");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown pe_start\n");
+#endif
+ goto pvs_fail;
+ }
+
+ p = grub_strchr (p, '}');
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("error parsing pe_start\n");
+#endif
+ goto pvs_fail;
+ }
+ p++;
+
+ pv->disk = NULL;
+ pv->next = vg->pvs;
+ vg->pvs = pv;
+
+ continue;
+ pvs_fail:
+ grub_free (pv->name);
+ grub_free (pv);
+ goto fail4;
+ }
+ }
+
+ p = grub_strstr (p, "logical_volumes");
+ if (p)
+ {
+ p += 18;
+
+ /* And add all the lvs to the volume group. */
+ while (1)
+ {
+ int s;
+ int skip_lv = 0;
+ struct grub_lvm_lv *lv;
+ struct grub_lvm_segment *seg;
+ int is_pvmove;
+
+ while (grub_isspace (*p))
+ p++;
+
+ if (*p == '}')
+ break;
+
+ lv = grub_malloc (sizeof (*lv));
+
+ q = p;
+ while (*q != ' ')
+ q++;
+
+ s = q - p;
+ lv->name = grub_malloc (vgname_len + 1 + s + 1);
+ grub_memcpy (lv->name, vgname, vgname_len);
+ lv->name[vgname_len] = '-';
+ grub_memcpy (lv->name + vgname_len + 1, p, s);
+ lv->name[vgname_len + 1 + s] = '\0';
+
+ lv->size = 0;
+
+ lv->visible = grub_lvm_check_flag (p, "status", "VISIBLE");
+ is_pvmove = grub_lvm_check_flag (p, "status", "PVMOVE");
+
+ lv->segment_count = grub_lvm_getvalue (&p, "segment_count = ");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown segment_count\n");
+#endif
+ goto lvs_fail;
+ }
+ lv->segments = grub_malloc (sizeof (*seg) * lv->segment_count);
+ seg = lv->segments;
+
+ for (i = 0; i < lv->segment_count; i++)
+ {
+
+ p = grub_strstr (p, "segment");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown segment\n");
+#endif
+ goto lvs_segment_fail;
+ }
+
+ seg->start_extent = grub_lvm_getvalue (&p, "start_extent = ");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown start_extent\n");
+#endif
+ goto lvs_segment_fail;
+ }
+ seg->extent_count = grub_lvm_getvalue (&p, "extent_count = ");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown extent_count\n");
+#endif
+ goto lvs_segment_fail;
+ }
+
+ p = grub_strstr (p, "type = \"");
+ if (p == NULL)
+ goto lvs_segment_fail;
+ p += sizeof("type = \"") - 1;
+
+ lv->size += seg->extent_count * vg->extent_size;
+
+ if (grub_memcmp (p, "striped\"",
+ sizeof ("striped\"") - 1) == 0)
+ {
+ struct grub_lvm_node *stripe;
+
+ seg->type = GRUB_LVM_STRIPED;
+ seg->node_count = grub_lvm_getvalue (&p, "stripe_count = ");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown stripe_count\n");
+#endif
+ goto lvs_segment_fail;
+ }
+
+ if (seg->node_count != 1)
+ seg->stripe_size = grub_lvm_getvalue (&p, "stripe_size = ");
+
+ seg->nodes = grub_zalloc (sizeof (*stripe)
+ * seg->node_count);
+ stripe = seg->nodes;
+
+ p = grub_strstr (p, "stripes = [");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown stripes\n");
+#endif
+ goto lvs_segment_fail2;
+ }
+ p += sizeof("stripes = [") - 1;
+
+ for (j = 0; j < seg->node_count; j++)
+ {
+ p = grub_strchr (p, '"');
+ if (p == NULL)
+ continue;
+ q = ++p;
+ while (*q != '"')
+ q++;
+
+ s = q - p;
+
+ stripe->name = grub_malloc (s + 1);
+ if (stripe->name == NULL)
+ goto lvs_segment_fail2;
+
+ grub_memcpy (stripe->name, p, s);
+ stripe->name[s] = '\0';
+
+ stripe->start = grub_lvm_getvalue (&p, ",");
+ if (p == NULL)
+ continue;
+
+ stripe++;
+ }
+ }
+ else if (grub_memcmp (p, "mirror\"", sizeof ("mirror\"") - 1)
+ == 0)
+ {
+ seg->type = GRUB_LVM_MIRROR;
+ seg->node_count = grub_lvm_getvalue (&p, "mirror_count = ");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown mirror_count\n");
+#endif
+ goto lvs_segment_fail;
+ }
+
+ seg->nodes = grub_zalloc (sizeof (seg->nodes[0])
+ * seg->node_count);
+
+ p = grub_strstr (p, "mirrors = [");
+ if (p == NULL)
+ {
+#ifdef GRUB_UTIL
+ grub_util_info ("unknown mirrors\n");
+#endif
+ goto lvs_segment_fail2;
+ }
+ p += sizeof("mirrors = [") - 1;
+
+ for (j = 0; j < seg->node_count; j++)
+ {
+ char *lvname;
+
+ p = grub_strchr (p, '"');
+ if (p == NULL)
+ continue;
+ q = ++p;
+ while (*q != '"')
+ q++;
+
+ s = q - p;
+
+ lvname = grub_malloc (s + 1);
+ if (lvname == NULL)
+ goto lvs_segment_fail2;
+
+ grub_memcpy (lvname, p, s);
+ lvname[s] = '\0';
+ seg->nodes[j].name = lvname;
+ p = q + 1;
+ }
+ /* Only first (original) is ok with in progress pvmove. */
+ if (is_pvmove)
+ seg->node_count = 1;
+ }
+ else
+ {
+#ifdef GRUB_UTIL
+ char *p2;
+ p2 = grub_strchr (p, '"');
+ if (p2)
+ *p2 = 0;
+ grub_util_info ("unknown LVM type %s\n", p);
+ if (p2)
+ *p2 ='"';
+#endif
+ /* Found a non-supported type, give up and move on. */
+ skip_lv = 1;
+ break;
+ }
+
+ seg++;
+
+ continue;
+ lvs_segment_fail2:
+ grub_free (seg->nodes);
+ lvs_segment_fail:
+ goto fail4;
+ }
+
+ if (p != NULL)
+ p = grub_strchr (p, '}');
+ if (p == NULL)
+ goto lvs_fail;
+ p += 3;
+
+ if (skip_lv)
+ {
+ grub_free (lv->name);
+ grub_free (lv);
+ continue;
+ }
+
+ lv->number = lv_count++;
+ lv->vg = vg;
+ lv->next = vg->lvs;
+ vg->lvs = lv;
+
+ continue;
+ lvs_fail:
+ grub_free (lv->name);
+ grub_free (lv);
+ goto fail4;
+ }
+ }
+
+ /* Match lvs. */
+ {
+ struct grub_lvm_lv *lv1;
+ struct grub_lvm_lv *lv2;
+ for (lv1 = vg->lvs; lv1; lv1 = lv1->next)
+ for (i = 0; i < lv1->segment_count; i++)
+ for (j = 0; j < lv1->segments[i].node_count; j++)
+ {
+ if (vg->pvs)
+ for (pv = vg->pvs; pv; pv = pv->next)
+ {
+ if (! grub_strcmp (pv->name,
+ lv1->segments[i].nodes[j].name))
+ {
+ lv1->segments[i].nodes[j].pv = pv;
+ break;
+ }
+ }
+ if (lv1->segments[i].nodes[j].pv == NULL)
+ for (lv2 = vg->lvs; lv2; lv2 = lv2->next)
+ if (grub_strcmp (lv2->name + grub_strlen (vg->name) + 1,
+ lv1->segments[i].nodes[j].name) == 0)
+ lv1->segments[i].nodes[j].lv = lv2;
+ }
+
+ }
+
+ vg->next = vg_list;
+ vg_list = vg;
+ }
+ else
+ {
+ grub_free (vgname);
+ }
+
+ /* Match the device we are currently reading from with the right
+ PV. */
+ if (vg->pvs)
+ for (pv = vg->pvs; pv; pv = pv->next)
+ {
+ if (! grub_memcmp (pv->id, pv_id, GRUB_LVM_ID_STRLEN))
+ {
+ /* This could happen to LVM on RAID, pv->disk points to the
+ raid device, we shouldn't change it. */
+ if (! pv->disk)
+ pv->disk = grub_disk_open (name);
+ break;
+ }
+ }
+
+ goto fail2;
+
+ /* Failure path. */
+ fail4:
+ grub_free (vg);
+ fail3:
+ grub_free (vgname);
+
+ /* Normal exit path. */
+ fail2:
+ grub_free (metadatabuf);
+ fail:
+ grub_disk_close (disk);
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_errno = GRUB_ERR_NONE;
+ grub_print_error ();
+ return 0;
+}
+
+static struct grub_disk_dev grub_lvm_dev =
+ {
+ .name = "lvm",
+ .id = GRUB_DISK_DEVICE_LVM_ID,
+ .iterate = grub_lvm_iterate,
+ .open = grub_lvm_open,
+ .close = grub_lvm_close,
+ .read = grub_lvm_read,
+ .write = grub_lvm_write,
+#ifdef GRUB_UTIL
+ .memberlist = grub_lvm_memberlist,
+#endif
+ .next = 0
+ };
+
+
+GRUB_MOD_INIT(lvm)
+{
+ grub_device_iterate (&grub_lvm_scan_device);
+ if (grub_errno)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ grub_disk_dev_register (&grub_lvm_dev);
+}
+
+GRUB_MOD_FINI(lvm)
+{
+ grub_disk_dev_unregister (&grub_lvm_dev);
+ vg_list = NULL;
+ /* FIXME: free the lvm list. */
+}
diff --git a/grub-core/disk/mdraid1x_linux.c b/grub-core/disk/mdraid1x_linux.c
new file mode 100644
index 0000000..19c43f4
--- /dev/null
+++ b/grub-core/disk/mdraid1x_linux.c
@@ -0,0 +1,247 @@
+/* mdraid_linux.c - module to handle Linux Software RAID. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/raid.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Linux RAID on disk structures and constants,
+ copied from include/linux/raid/md_p.h. */
+
+#define SB_MAGIC 0xa92b4efc
+
+/*
+ * The version-1 superblock :
+ * All numeric fields are little-endian.
+ *
+ * Total size: 256 bytes plus 2 per device.
+ * 1K allows 384 devices.
+ */
+
+struct grub_raid_super_1x
+{
+ /* Constant array information - 128 bytes. */
+ grub_uint32_t magic; /* MD_SB_MAGIC: 0xa92b4efc - little endian. */
+ grub_uint32_t major_version; /* 1. */
+ grub_uint32_t feature_map; /* Bit 0 set if 'bitmap_offset' is meaningful. */
+ grub_uint32_t pad0; /* Always set to 0 when writing. */
+
+ grub_uint8_t set_uuid[16]; /* User-space generated. */
+ char set_name[32]; /* Set and interpreted by user-space. */
+
+ grub_uint64_t ctime; /* Lo 40 bits are seconds, top 24 are microseconds or 0. */
+ grub_uint32_t level; /* -4 (multipath), -1 (linear), 0,1,4,5. */
+ grub_uint32_t layout; /* only for raid5 and raid10 currently. */
+ grub_uint64_t size; /* Used size of component devices, in 512byte sectors. */
+
+ grub_uint32_t chunksize; /* In 512byte sectors. */
+ grub_uint32_t raid_disks;
+ grub_uint32_t bitmap_offset; /* Sectors after start of superblock that bitmap starts
+ * NOTE: signed, so bitmap can be before superblock
+ * only meaningful of feature_map[0] is set.
+ */
+
+ /* These are only valid with feature bit '4'. */
+ grub_uint32_t new_level; /* New level we are reshaping to. */
+ grub_uint64_t reshape_position; /* Next address in array-space for reshape. */
+ grub_uint32_t delta_disks; /* Change in number of raid_disks. */
+ grub_uint32_t new_layout; /* New layout. */
+ grub_uint32_t new_chunk; /* New chunk size (512byte sectors). */
+ grub_uint8_t pad1[128 - 124]; /* Set to 0 when written. */
+
+ /* Constant this-device information - 64 bytes. */
+ grub_uint64_t data_offset; /* Sector start of data, often 0. */
+ grub_uint64_t data_size; /* Sectors in this device that can be used for data. */
+ grub_uint64_t super_offset; /* Sector start of this superblock. */
+ grub_uint64_t recovery_offset; /* Sectors before this offset (from data_offset) have been recovered. */
+ grub_uint32_t dev_number; /* Permanent identifier of this device - not role in raid. */
+ grub_uint32_t cnt_corrected_read; /* Number of read errors that were corrected by re-writing. */
+ grub_uint8_t device_uuid[16]; /* User-space setable, ignored by kernel. */
+ grub_uint8_t devflags; /* Per-device flags. Only one defined... */
+ grub_uint8_t pad2[64 - 57]; /* Set to 0 when writing. */
+
+ /* Array state information - 64 bytes. */
+ grub_uint64_t utime; /* 40 bits second, 24 btes microseconds. */
+ grub_uint64_t events; /* Incremented when superblock updated. */
+ grub_uint64_t resync_offset; /* Data before this offset (from data_offset) known to be in sync. */
+ grub_uint32_t sb_csum; /* Checksum upto devs[max_dev]. */
+ grub_uint32_t max_dev; /* Size of devs[] array to consider. */
+ grub_uint8_t pad3[64 - 32]; /* Set to 0 when writing. */
+
+ /* Device state information. Indexed by dev_number.
+ * 2 bytes per device.
+ * Note there are no per-device state flags. State information is rolled
+ * into the 'roles' value. If a device is spare or faulty, then it doesn't
+ * have a meaningful role.
+ */
+ grub_uint16_t dev_roles[0]; /* Role in array, or 0xffff for a spare, or 0xfffe for faulty. */
+};
+/* Could be __attribute__ ((packed)), but since all members in this struct
+ are already appropriately aligned, we can omit this and avoid suboptimal
+ assembly in some cases. */
+
+#define WriteMostly1 1 /* Mask for writemostly flag in above devflags. */
+
+static grub_err_t
+grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
+ grub_disk_addr_t *start_sector)
+{
+ grub_disk_addr_t sector = 0;
+ grub_uint64_t size;
+ struct grub_raid_super_1x sb;
+ grub_uint8_t minor_version;
+
+ size = grub_disk_get_size (disk);
+
+ /* Check for an 1.x superblock.
+ * It's always aligned to a 4K boundary
+ * and depending on the minor version it can be:
+ * 0: At least 8K, but less than 12K, from end of device
+ * 1: At start of device
+ * 2: 4K from start of device.
+ */
+
+ for (minor_version = 0; minor_version < 3; ++minor_version)
+ {
+ if (size == GRUB_DISK_SIZE_UNKNOWN && minor_version == 0)
+ continue;
+
+ switch (minor_version)
+ {
+ case 0:
+ sector = (size - 8 * 2) & ~(4 * 2 - 1);
+ break;
+ case 1:
+ sector = 0;
+ break;
+ case 2:
+ sector = 4 * 2;
+ break;
+ }
+
+ if (grub_disk_read (disk, sector, 0, sizeof (struct grub_raid_super_1x),
+ &sb))
+ return grub_errno;
+
+ if (grub_le_to_cpu32 (sb.magic) != SB_MAGIC
+ || grub_le_to_cpu64 (sb.super_offset) != sector)
+ continue;
+
+ {
+ grub_uint64_t sb_size;
+ struct grub_raid_super_1x *real_sb;
+ grub_uint32_t level;
+
+ if (grub_le_to_cpu32 (sb.major_version) != 1)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "Unsupported RAID version: %d",
+ grub_le_to_cpu32 (sb.major_version));
+
+ level = grub_le_to_cpu32 (sb.level);
+
+ /* Multipath. */
+ if ((int) level == -4)
+ level = 1;
+
+ if (level != 0 && level != 1 && level != 4 &&
+ level != 5 && level != 6 && level != 10)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "Unsupported RAID level: %d", sb.level);
+
+ /* 1.x superblocks don't have a fixed size on disk. So we have to
+ read it again now that we now the max device count. */
+ sb_size = sizeof (struct grub_raid_super_1x)
+ + 2 * grub_le_to_cpu32 (sb.max_dev);
+ real_sb = grub_malloc (sb_size);
+ if (! real_sb)
+ return grub_errno;
+
+ if (grub_disk_read (disk, sector, 0, sb_size, real_sb))
+ {
+ grub_free (real_sb);
+ return grub_errno;
+ }
+
+ array->name = grub_strdup (real_sb->set_name);
+ if (! array->name)
+ {
+ grub_free (real_sb);
+ return grub_errno;
+ }
+
+ array->number = 0;
+ array->level = grub_le_to_cpu32 (real_sb->level);
+ array->layout = grub_le_to_cpu32 (real_sb->layout);
+ array->total_devs = grub_le_to_cpu32 (real_sb->raid_disks);
+ if (real_sb->size)
+ array->disk_size = grub_le_to_cpu64 (real_sb->size);
+ else
+ array->disk_size = grub_le_to_cpu64 (real_sb->data_size);
+ array->chunk_size = grub_le_to_cpu32 (real_sb->chunksize);
+
+ if (grub_le_to_cpu32 (real_sb->dev_number) >=
+ grub_le_to_cpu32 (real_sb->max_dev))
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "spares aren't implemented");
+
+ array->index = grub_le_to_cpu16
+ (real_sb->dev_roles[grub_le_to_cpu32 (real_sb->dev_number)]);
+ if (array->index >= array->total_devs)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "spares aren't implemented");
+ array->uuid_len = 16;
+ array->uuid = grub_malloc (16);
+ if (!array->uuid)
+ {
+ grub_free (real_sb);
+ return grub_errno;
+ }
+
+ grub_memcpy (array->uuid, real_sb->set_uuid, 16);
+
+ *start_sector = grub_le_to_cpu64 (real_sb->data_offset);
+
+ grub_free (real_sb);
+ return 0;
+ }
+ }
+
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "not 1.x raid");
+}
+
+static struct grub_raid grub_mdraid_dev = {
+ .name = "mdraid1x",
+ .detect = grub_mdraid_detect,
+ .next = 0
+};
+
+GRUB_MOD_INIT (mdraid1x)
+{
+ grub_raid_register (&grub_mdraid_dev);
+}
+
+GRUB_MOD_FINI (mdraid1x)
+{
+ grub_raid_unregister (&grub_mdraid_dev);
+}
diff --git a/grub-core/disk/mdraid_linux.c b/grub-core/disk/mdraid_linux.c
new file mode 100644
index 0000000..0e2d850
--- /dev/null
+++ b/grub-core/disk/mdraid_linux.c
@@ -0,0 +1,248 @@
+/* mdraid_linux.c - module to handle Linux Software RAID. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/raid.h>
+
+/* Linux RAID on disk structures and constants,
+ copied from include/linux/raid/md_p.h. */
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define RESERVED_BYTES (64 * 1024)
+#define RESERVED_SECTORS (RESERVED_BYTES / 512)
+
+#define NEW_SIZE_SECTORS(x) ((x & ~(RESERVED_SECTORS - 1)) \
+ - RESERVED_SECTORS)
+
+#define SB_BYTES 4096
+#define SB_WORDS (SB_BYTES / 4)
+#define SB_SECTORS (SB_BYTES / 512)
+
+/*
+ * The following are counted in 32-bit words
+ */
+#define SB_GENERIC_OFFSET 0
+
+#define SB_PERSONALITY_OFFSET 64
+#define SB_DISKS_OFFSET 128
+#define SB_DESCRIPTOR_OFFSET 992
+
+#define SB_GENERIC_CONSTANT_WORDS 32
+#define SB_GENERIC_STATE_WORDS 32
+#define SB_GENERIC_WORDS (SB_GENERIC_CONSTANT_WORDS + \
+ SB_GENERIC_STATE_WORDS)
+
+#define SB_PERSONALITY_WORDS 64
+#define SB_DESCRIPTOR_WORDS 32
+#define SB_DISKS 27
+#define SB_DISKS_WORDS (SB_DISKS * SB_DESCRIPTOR_WORDS)
+
+#define SB_RESERVED_WORDS (1024 \
+ - SB_GENERIC_WORDS \
+ - SB_PERSONALITY_WORDS \
+ - SB_DISKS_WORDS \
+ - SB_DESCRIPTOR_WORDS)
+
+#define SB_EQUAL_WORDS (SB_GENERIC_WORDS \
+ + SB_PERSONALITY_WORDS \
+ + SB_DISKS_WORDS)
+
+/*
+ * Device "operational" state bits
+ */
+#define DISK_FAULTY 0
+#define DISK_ACTIVE 1
+#define DISK_SYNC 2
+#define DISK_REMOVED 3
+
+#define DISK_WRITEMOSTLY 9
+
+#define SB_MAGIC 0xa92b4efc
+
+/*
+ * Superblock state bits
+ */
+#define SB_CLEAN 0
+#define SB_ERRORS 1
+
+#define SB_BITMAP_PRESENT 8
+
+struct grub_raid_disk_09
+{
+ grub_uint32_t number; /* Device number in the entire set. */
+ grub_uint32_t major; /* Device major number. */
+ grub_uint32_t minor; /* Device minor number. */
+ grub_uint32_t raid_disk; /* The role of the device in the raid set. */
+ grub_uint32_t state; /* Operational state. */
+ grub_uint32_t reserved[SB_DESCRIPTOR_WORDS - 5];
+};
+
+struct grub_raid_super_09
+{
+ /*
+ * Constant generic information
+ */
+ grub_uint32_t md_magic; /* MD identifier. */
+ grub_uint32_t major_version; /* Major version. */
+ grub_uint32_t minor_version; /* Minor version. */
+ grub_uint32_t patch_version; /* Patchlevel version. */
+ grub_uint32_t gvalid_words; /* Number of used words in this section. */
+ grub_uint32_t set_uuid0; /* Raid set identifier. */
+ grub_uint32_t ctime; /* Creation time. */
+ grub_uint32_t level; /* Raid personality. */
+ grub_uint32_t size; /* Apparent size of each individual disk. */
+ grub_uint32_t nr_disks; /* Total disks in the raid set. */
+ grub_uint32_t raid_disks; /* Disks in a fully functional raid set. */
+ grub_uint32_t md_minor; /* Preferred MD minor device number. */
+ grub_uint32_t not_persistent; /* Does it have a persistent superblock. */
+ grub_uint32_t set_uuid1; /* Raid set identifier #2. */
+ grub_uint32_t set_uuid2; /* Raid set identifier #3. */
+ grub_uint32_t set_uuid3; /* Raid set identifier #4. */
+ grub_uint32_t gstate_creserved[SB_GENERIC_CONSTANT_WORDS - 16];
+
+ /*
+ * Generic state information
+ */
+ grub_uint32_t utime; /* Superblock update time. */
+ grub_uint32_t state; /* State bits (clean, ...). */
+ grub_uint32_t active_disks; /* Number of currently active disks. */
+ grub_uint32_t working_disks; /* Number of working disks. */
+ grub_uint32_t failed_disks; /* Number of failed disks. */
+ grub_uint32_t spare_disks; /* Number of spare disks. */
+ grub_uint32_t sb_csum; /* Checksum of the whole superblock. */
+ grub_uint64_t events; /* Superblock update count. */
+ grub_uint64_t cp_events; /* Checkpoint update count. */
+ grub_uint32_t recovery_cp; /* Recovery checkpoint sector count. */
+ grub_uint32_t gstate_sreserved[SB_GENERIC_STATE_WORDS - 12];
+
+ /*
+ * Personality information
+ */
+ grub_uint32_t layout; /* The array's physical layout. */
+ grub_uint32_t chunk_size; /* Chunk size in bytes. */
+ grub_uint32_t root_pv; /* LV root PV. */
+ grub_uint32_t root_block; /* LV root block. */
+ grub_uint32_t pstate_reserved[SB_PERSONALITY_WORDS - 4];
+
+ /*
+ * Disks information
+ */
+ struct grub_raid_disk_09 disks[SB_DISKS];
+
+ /*
+ * Reserved
+ */
+ grub_uint32_t reserved[SB_RESERVED_WORDS];
+
+ /*
+ * Active descriptor
+ */
+ struct grub_raid_disk_09 this_disk;
+} __attribute__ ((packed));
+
+static grub_err_t
+grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
+ grub_disk_addr_t *start_sector)
+{
+ grub_disk_addr_t sector;
+ grub_uint64_t size;
+ struct grub_raid_super_09 sb;
+ grub_uint32_t *uuid;
+ grub_uint32_t level;
+
+ /* The sector where the mdraid 0.90 superblock is stored, if available. */
+ size = grub_disk_get_size (disk);
+ if (size == GRUB_DISK_SIZE_UNKNOWN)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "not 0.9x raid");
+ sector = NEW_SIZE_SECTORS (size);
+
+ if (grub_disk_read (disk, sector, 0, SB_BYTES, &sb))
+ return grub_errno;
+
+ /* Look whether there is a mdraid 0.90 superblock. */
+ if (grub_le_to_cpu32 (sb.md_magic) != SB_MAGIC)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "not 0.9x raid");
+
+ if (grub_le_to_cpu32 (sb.major_version) != 0
+ || grub_le_to_cpu32 (sb.minor_version) != 90)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unsupported RAID version: %d.%d",
+ grub_le_to_cpu32 (sb.major_version),
+ grub_le_to_cpu32 (sb.minor_version));
+
+ /* FIXME: Check the checksum. */
+
+ level = grub_le_to_cpu32 (sb.level);
+ /* Multipath. */
+ if ((int) level == -4)
+ level = 1;
+
+ if (level != 0 && level != 1 && level != 4 &&
+ level != 5 && level != 6 && level != 10)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unsupported RAID level: %d", level);
+ if (grub_le_to_cpu32 (sb.this_disk.number) == 0xffff
+ || grub_le_to_cpu32 (sb.this_disk.number) == 0xfffe)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "spares aren't implemented");
+
+ array->name = NULL;
+ array->number = grub_le_to_cpu32 (sb.md_minor);
+ array->level = level;
+ array->layout = grub_le_to_cpu32 (sb.layout);
+ array->total_devs = grub_le_to_cpu32 (sb.raid_disks);
+ array->disk_size = (sb.size) ? grub_le_to_cpu32 (sb.size) * 2 : sector;
+ array->chunk_size = grub_le_to_cpu32 (sb.chunk_size) >> 9;
+ array->index = grub_le_to_cpu32 (sb.this_disk.number);
+ array->uuid_len = 16;
+ array->uuid = grub_malloc (16);
+ if (!array->uuid)
+ return grub_errno;
+
+ uuid = (grub_uint32_t *) array->uuid;
+ uuid[0] = grub_swap_bytes32 (sb.set_uuid0);
+ uuid[1] = grub_swap_bytes32 (sb.set_uuid1);
+ uuid[2] = grub_swap_bytes32 (sb.set_uuid2);
+ uuid[3] = grub_swap_bytes32 (sb.set_uuid3);
+
+ *start_sector = 0;
+
+ return 0;
+}
+
+static struct grub_raid grub_mdraid_dev = {
+ .name = "mdraid09",
+ .detect = grub_mdraid_detect,
+ .next = 0
+};
+
+GRUB_MOD_INIT (mdraid09)
+{
+ grub_raid_register (&grub_mdraid_dev);
+}
+
+GRUB_MOD_FINI (mdraid09)
+{
+ grub_raid_unregister (&grub_mdraid_dev);
+}
diff --git a/grub-core/disk/memdisk.c b/grub-core/disk/memdisk.c
new file mode 100644
index 0000000..114ac0d
--- /dev/null
+++ b/grub-core/disk/memdisk.c
@@ -0,0 +1,117 @@
+/* memdisk.c - Access embedded memory disk. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/kernel.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static char *memdisk_addr;
+static grub_off_t memdisk_size = 0;
+
+static int
+grub_memdisk_iterate (int (*hook) (const char *name))
+{
+ return hook ("memdisk");
+}
+
+static grub_err_t
+grub_memdisk_open (const char *name, grub_disk_t disk)
+{
+ if (grub_strcmp (name, "memdisk"))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a memdisk");
+
+ disk->total_sectors = memdisk_size / GRUB_DISK_SECTOR_SIZE;
+ disk->id = (unsigned long) "mdsk";
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_memdisk_close (grub_disk_t disk __attribute((unused)))
+{
+}
+
+static grub_err_t
+grub_memdisk_read (grub_disk_t disk __attribute((unused)), grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_memcpy (buf, memdisk_addr + (sector << GRUB_DISK_SECTOR_BITS), size << GRUB_DISK_SECTOR_BITS);
+ return 0;
+}
+
+static grub_err_t
+grub_memdisk_write (grub_disk_t disk __attribute((unused)), grub_disk_addr_t sector,
+ grub_size_t size, const char *buf)
+{
+ grub_memcpy (memdisk_addr + (sector << GRUB_DISK_SECTOR_BITS), buf, size << GRUB_DISK_SECTOR_BITS);
+ return 0;
+}
+
+static struct grub_disk_dev grub_memdisk_dev =
+ {
+ .name = "memdisk",
+ .id = GRUB_DISK_DEVICE_MEMDISK_ID,
+ .iterate = grub_memdisk_iterate,
+ .open = grub_memdisk_open,
+ .close = grub_memdisk_close,
+ .read = grub_memdisk_read,
+ .write = grub_memdisk_write,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(memdisk)
+{
+ auto int hook (struct grub_module_header *);
+ int hook (struct grub_module_header *header)
+ {
+ if (header->type == OBJ_TYPE_MEMDISK)
+ {
+ char *memdisk_orig_addr;
+ memdisk_orig_addr = (char *) header + sizeof (struct grub_module_header);
+
+ grub_dprintf ("memdisk", "Found memdisk image at %p\n", memdisk_orig_addr);
+
+ memdisk_size = header->size - sizeof (struct grub_module_header);
+ memdisk_addr = grub_malloc (memdisk_size);
+
+ grub_dprintf ("memdisk", "Copying memdisk image to dynamic memory\n");
+ grub_memmove (memdisk_addr, memdisk_orig_addr, memdisk_size);
+
+ grub_disk_dev_register (&grub_memdisk_dev);
+ return 1;
+ }
+
+ return 0;
+ }
+
+ grub_module_iterate (hook);
+}
+
+GRUB_MOD_FINI(memdisk)
+{
+ if (! memdisk_size)
+ return;
+ grub_free (memdisk_addr);
+ grub_disk_dev_unregister (&grub_memdisk_dev);
+}
diff --git a/grub-core/disk/raid.c b/grub-core/disk/raid.c
new file mode 100644
index 0000000..946e6d2
--- /dev/null
+++ b/grub-core/disk/raid.c
@@ -0,0 +1,812 @@
+/* raid.c - module to read RAID arrays. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/raid.h>
+#ifdef GRUB_UTIL
+#include <grub/util/misc.h>
+#endif
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Linked list of RAID arrays. */
+static struct grub_raid_array *array_list;
+grub_raid5_recover_func_t grub_raid5_recover_func;
+grub_raid6_recover_func_t grub_raid6_recover_func;
+
+
+static char
+grub_is_array_readable (struct grub_raid_array *array)
+{
+ switch (array->level)
+ {
+ case 0:
+ if (array->nr_devs == array->total_devs)
+ return 1;
+ break;
+
+ case 1:
+ if (array->nr_devs >= 1)
+ return 1;
+ break;
+
+ case 4:
+ case 5:
+ case 6:
+ case 10:
+ {
+ unsigned int n;
+
+ if (array->level == 10)
+ {
+ n = array->layout & 0xFF;
+ if (n == 1)
+ n = (array->layout >> 8) & 0xFF;
+
+ n--;
+ }
+ else
+ n = array->level / 3;
+
+ if (array->nr_devs >= array->total_devs - n)
+ return 1;
+
+ break;
+ }
+ }
+
+ return 0;
+}
+
+static int
+grub_raid_iterate (int (*hook) (const char *name))
+{
+ struct grub_raid_array *array;
+
+ for (array = array_list; array != NULL; array = array->next)
+ {
+ if (grub_is_array_readable (array))
+ if (hook (array->name))
+ return 1;
+ }
+
+ return 0;
+}
+
+#ifdef GRUB_UTIL
+static grub_disk_memberlist_t
+grub_raid_memberlist (grub_disk_t disk)
+{
+ struct grub_raid_array *array = disk->data;
+ grub_disk_memberlist_t list = NULL, tmp;
+ unsigned int i;
+
+ for (i = 0; i < array->total_devs; i++)
+ if (array->members[i].device)
+ {
+ tmp = grub_malloc (sizeof (*tmp));
+ tmp->disk = array->members[i].device;
+ tmp->next = list;
+ list = tmp;
+ }
+
+ return list;
+}
+
+static const char *
+grub_raid_getname (struct grub_disk *disk)
+{
+ struct grub_raid_array *array = disk->data;
+
+ return array->driver->name;
+}
+#endif
+
+static inline int
+ascii2hex (char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ if (c >= 'a' && c <= 'f')
+ return c - 'a' + 10;
+ if (c >= 'A' && c <= 'F')
+ return c - 'A' + 10;
+ return 0;
+}
+
+static grub_err_t
+grub_raid_open (const char *name, grub_disk_t disk)
+{
+ struct grub_raid_array *array;
+ unsigned n;
+
+ if (grub_memcmp (name, "mduuid/", sizeof ("mduuid/") - 1) == 0)
+ {
+ const char *uuidstr = name + sizeof ("mduuid/") - 1;
+ grub_size_t uuid_len = grub_strlen (uuidstr) / 2;
+ grub_uint8_t uuidbin[uuid_len];
+ unsigned i;
+ for (i = 0; i < uuid_len; i++)
+ uuidbin[i] = ascii2hex (uuidstr[2 * i + 1])
+ | (ascii2hex (uuidstr[2 * i]) << 4);
+
+ for (array = array_list; array != NULL; array = array->next)
+ {
+ if (uuid_len == (unsigned) array->uuid_len
+ && grub_memcmp (uuidbin, array->uuid, uuid_len) == 0)
+ if (grub_is_array_readable (array))
+ break;
+ }
+ }
+ else
+ for (array = array_list; array != NULL; array = array->next)
+ {
+ if (!grub_strcmp (array->name, name))
+ if (grub_is_array_readable (array))
+ break;
+ }
+
+ if (!array)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "unknown RAID device %s",
+ name);
+
+ disk->id = array->number;
+ disk->data = array;
+
+ grub_dprintf ("raid", "%s: total_devs=%d, disk_size=%lld\n", name,
+ array->total_devs, (unsigned long long) array->disk_size);
+
+ switch (array->level)
+ {
+ case 1:
+ disk->total_sectors = array->disk_size;
+ break;
+
+ case 10:
+ n = array->layout & 0xFF;
+ if (n == 1)
+ n = (array->layout >> 8) & 0xFF;
+
+ disk->total_sectors = grub_divmod64 (array->total_devs *
+ array->disk_size,
+ n, 0);
+ break;
+
+ case 0:
+ case 4:
+ case 5:
+ case 6:
+ n = array->level / 3;
+
+ disk->total_sectors = (array->total_devs - n) * array->disk_size;
+ break;
+ }
+
+ grub_dprintf ("raid", "%s: level=%d, total_sectors=%lld\n", name,
+ array->level, (unsigned long long) disk->total_sectors);
+
+ return 0;
+}
+
+static void
+grub_raid_close (grub_disk_t disk __attribute ((unused)))
+{
+ return;
+}
+
+void
+grub_raid_block_xor (char *buf1, const char *buf2, int size)
+{
+ grub_size_t *p1;
+ const grub_size_t *p2;
+
+ p1 = (grub_size_t *) buf1;
+ p2 = (const grub_size_t *) buf2;
+ size /= GRUB_CPU_SIZEOF_VOID_P;
+
+ while (size)
+ {
+ *(p1++) ^= *(p2++);
+ size--;
+ }
+}
+
+static grub_err_t
+grub_raid_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ struct grub_raid_array *array = disk->data;
+ grub_err_t err = 0;
+
+ switch (array->level)
+ {
+ case 0:
+ case 1:
+ case 10:
+ {
+ grub_disk_addr_t read_sector, far_ofs;
+ grub_uint32_t disknr, b, near, far, ofs;
+
+ read_sector = grub_divmod64 (sector, array->chunk_size, &b);
+ far = ofs = near = 1;
+ far_ofs = 0;
+
+ if (array->level == 1)
+ near = array->total_devs;
+ else if (array->level == 10)
+ {
+ near = array->layout & 0xFF;
+ far = (array->layout >> 8) & 0xFF;
+ if (array->layout >> 16)
+ {
+ ofs = far;
+ far_ofs = 1;
+ }
+ else
+ far_ofs = grub_divmod64 (array->disk_size,
+ far * array->chunk_size, 0);
+
+ far_ofs *= array->chunk_size;
+ }
+
+ read_sector = grub_divmod64 (read_sector * near, array->total_devs,
+ &disknr);
+
+ ofs *= array->chunk_size;
+ read_sector *= ofs;
+
+ while (1)
+ {
+ grub_size_t read_size;
+ unsigned int i, j;
+
+ read_size = array->chunk_size - b;
+ if (read_size > size)
+ read_size = size;
+
+ for (i = 0; i < near; i++)
+ {
+ unsigned int k;
+
+ k = disknr;
+ for (j = 0; j < far; j++)
+ {
+ if (array->members[k].device)
+ {
+ if (grub_errno == GRUB_ERR_READ_ERROR)
+ grub_errno = GRUB_ERR_NONE;
+
+ err = grub_disk_read (array->members[k].device,
+ array->members[k].start_sector +
+ read_sector + j * far_ofs + b,
+ 0,
+ read_size << GRUB_DISK_SECTOR_BITS,
+ buf);
+ if (! err)
+ break;
+ else if (err != GRUB_ERR_READ_ERROR)
+ return err;
+ }
+ else
+ err = grub_error (GRUB_ERR_READ_ERROR,
+ "disk missing");
+
+ k++;
+ if (k == array->total_devs)
+ k = 0;
+ }
+
+ if (! err)
+ break;
+
+ disknr++;
+ if (disknr == array->total_devs)
+ {
+ disknr = 0;
+ read_sector += ofs;
+ }
+ }
+
+ if (err)
+ return err;
+
+ buf += read_size << GRUB_DISK_SECTOR_BITS;
+ size -= read_size;
+ if (! size)
+ break;
+
+ b = 0;
+ disknr += (near - i);
+ while (disknr >= array->total_devs)
+ {
+ disknr -= array->total_devs;
+ read_sector += ofs;
+ }
+ }
+ break;
+ }
+
+ case 4:
+ case 5:
+ case 6:
+ {
+ grub_disk_addr_t read_sector;
+ grub_uint32_t b, p, n, disknr, e;
+
+ /* n = 1 for level 4 and 5, 2 for level 6. */
+ n = array->level / 3;
+
+ /* Find the first sector to read. */
+ read_sector = grub_divmod64 (sector, array->chunk_size, &b);
+ read_sector = grub_divmod64 (read_sector, array->total_devs - n,
+ &disknr);
+ if (array->level >= 5)
+ {
+ grub_divmod64 (read_sector, array->total_devs, &p);
+
+ if (! (array->layout & GRUB_RAID_LAYOUT_RIGHT_MASK))
+ p = array->total_devs - 1 - p;
+
+ if (array->layout & GRUB_RAID_LAYOUT_SYMMETRIC_MASK)
+ {
+ disknr += p + n;
+ }
+ else
+ {
+ grub_uint32_t q;
+
+ q = p + (n - 1);
+ if (q >= array->total_devs)
+ q -= array->total_devs;
+
+ if (disknr >= p)
+ disknr += n;
+ else if (disknr >= q)
+ disknr += q + 1;
+ }
+
+ if (disknr >= array->total_devs)
+ disknr -= array->total_devs;
+ }
+ else
+ p = array->total_devs - n;
+
+ read_sector *= array->chunk_size;
+
+ while (1)
+ {
+ grub_size_t read_size;
+ int next_level;
+
+ read_size = array->chunk_size - b;
+ if (read_size > size)
+ read_size = size;
+
+ e = 0;
+ if (array->members[disknr].device)
+ {
+ /* Reset read error. */
+ if (grub_errno == GRUB_ERR_READ_ERROR)
+ grub_errno = GRUB_ERR_NONE;
+
+ err = grub_disk_read (array->members[disknr].device,
+ array->members[disknr].start_sector +
+ read_sector + b, 0,
+ read_size << GRUB_DISK_SECTOR_BITS,
+ buf);
+
+ if ((err) && (err != GRUB_ERR_READ_ERROR))
+ break;
+ e++;
+ }
+ else
+ err = GRUB_ERR_READ_ERROR;
+
+ if (err)
+ {
+ if (array->nr_devs < array->total_devs - n + e)
+ break;
+
+ grub_errno = GRUB_ERR_NONE;
+ if (array->level == 6)
+ {
+ err = ((grub_raid6_recover_func) ?
+ (*grub_raid6_recover_func) (array, disknr, p,
+ buf, read_sector + b,
+ read_size) :
+ grub_error (GRUB_ERR_BAD_DEVICE,
+ "raid6rec is not loaded"));
+ }
+ else
+ {
+ err = ((grub_raid5_recover_func) ?
+ (*grub_raid5_recover_func) (array, disknr,
+ buf, read_sector + b,
+ read_size) :
+ grub_error (GRUB_ERR_BAD_DEVICE,
+ "raid5rec is not loaded"));
+ }
+
+ if (err)
+ break;
+ }
+
+ buf += read_size << GRUB_DISK_SECTOR_BITS;
+ size -= read_size;
+ if (! size)
+ break;
+
+ b = 0;
+ disknr++;
+
+ if (array->layout & GRUB_RAID_LAYOUT_SYMMETRIC_MASK)
+ {
+ if (disknr == array->total_devs)
+ disknr = 0;
+
+ next_level = (disknr == p);
+ }
+ else
+ {
+ if (disknr == p)
+ disknr += n;
+
+ next_level = (disknr >= array->total_devs);
+ }
+
+ if (next_level)
+ {
+ read_sector += array->chunk_size;
+
+ if (array->level >= 5)
+ {
+ if (array->layout & GRUB_RAID_LAYOUT_RIGHT_MASK)
+ p = (p == array->total_devs - 1) ? 0 : p + 1;
+ else
+ p = (p == 0) ? array->total_devs - 1 : p - 1;
+
+ if (array->layout & GRUB_RAID_LAYOUT_SYMMETRIC_MASK)
+ {
+ disknr = p + n;
+ if (disknr >= array->total_devs)
+ disknr -= array->total_devs;
+ }
+ else
+ {
+ disknr -= array->total_devs;
+ if (disknr == p)
+ disknr += n;
+ }
+ }
+ else
+ disknr = 0;
+ }
+ }
+ }
+ break;
+ }
+
+ return err;
+}
+
+static grub_err_t
+grub_raid_write (grub_disk_t disk __attribute ((unused)),
+ grub_disk_addr_t sector __attribute ((unused)),
+ grub_size_t size __attribute ((unused)),
+ const char *buf __attribute ((unused)))
+{
+ return GRUB_ERR_NOT_IMPLEMENTED_YET;
+}
+
+static grub_err_t
+insert_array (grub_disk_t disk, struct grub_raid_array *new_array,
+ grub_disk_addr_t start_sector, const char *scanner_name,
+ grub_raid_t raid __attribute__ ((unused)))
+{
+ struct grub_raid_array *array = 0, *p;
+
+ /* See whether the device is part of an array we have already seen a
+ device from. */
+ for (p = array_list; p != NULL; p = p->next)
+ if ((p->uuid_len == new_array->uuid_len) &&
+ (! grub_memcmp (p->uuid, new_array->uuid, p->uuid_len)))
+ {
+ grub_free (new_array->uuid);
+ array = p;
+
+ /* Do some checks before adding the device to the array. */
+
+ if (new_array->index >= array->allocated_devs)
+ {
+ void *tmp;
+ unsigned int newnum = 2 * (new_array->index + 1);
+ tmp = grub_realloc (array->members, newnum
+ * sizeof (array->members[0]));
+ if (!tmp)
+ return grub_errno;
+ array->members = tmp;
+ grub_memset (array->members + array->allocated_devs,
+ 0, (newnum - array->allocated_devs)
+ * sizeof (array->members[0]));
+ array->allocated_devs = newnum;
+ }
+
+ /* FIXME: Check whether the update time of the superblocks are
+ the same. */
+
+ if (array->total_devs == array->nr_devs)
+ /* We found more members of the array than the array
+ actually has according to its superblock. This shouldn't
+ happen normally. */
+ return grub_error (GRUB_ERR_BAD_DEVICE,
+ "superfluous RAID member (%d found)",
+ array->total_devs);
+
+ if (array->members[new_array->index].device != NULL)
+ /* We found multiple devices with the same number. Again,
+ this shouldn't happen. */
+ return grub_error (GRUB_ERR_BAD_DEVICE,
+ "found two disks with the index %d for RAID %s",
+ new_array->index, array->name);
+
+ if (new_array->disk_size < array->disk_size)
+ array->disk_size = new_array->disk_size;
+ break;
+ }
+
+ /* Add an array to the list if we didn't find any. */
+ if (!array)
+ {
+ array = grub_malloc (sizeof (*array));
+ if (!array)
+ {
+ grub_free (new_array->uuid);
+ return grub_errno;
+ }
+
+ *array = *new_array;
+ array->nr_devs = 0;
+#ifdef GRUB_UTIL
+ array->driver = raid;
+#endif
+ array->allocated_devs = 32;
+ if (new_array->index >= array->allocated_devs)
+ array->allocated_devs = 2 * (new_array->index + 1);
+
+ array->members = grub_zalloc (array->allocated_devs
+ * sizeof (array->members[0]));
+
+ if (!array->members)
+ {
+ grub_free (new_array->uuid);
+ return grub_errno;
+ }
+
+ if (! array->name)
+ {
+ for (p = array_list; p != NULL; p = p->next)
+ {
+ if (p->number == array->number)
+ break;
+ }
+ }
+
+ if (array->name || p)
+ {
+ /* The number is already in use, so we need to find a new one.
+ (Or, in the case of named arrays, the array doesn't have its
+ own number, but we need one that doesn't clash for use as a key
+ in the disk cache. */
+ int i = array->name ? 0x40000000 : 0;
+
+ while (1)
+ {
+ for (p = array_list; p != NULL; p = p->next)
+ {
+ if (p->number == i)
+ break;
+ }
+
+ if (! p)
+ {
+ /* We found an unused number. */
+ array->number = i;
+ break;
+ }
+
+ i++;
+ }
+ }
+
+ /* mdraid 1.x superblocks have only a name stored not a number.
+ Use it directly as GRUB device. */
+ if (! array->name)
+ {
+ array->name = grub_xasprintf ("md%d", array->number);
+ if (! array->name)
+ {
+ grub_free (array->members);
+ grub_free (array->uuid);
+ grub_free (array);
+
+ return grub_errno;
+ }
+ }
+ else
+ {
+ /* Strip off the homehost if present. */
+ char *colon = grub_strchr (array->name, ':');
+ char *new_name = grub_xasprintf ("md/%s",
+ colon ? colon + 1 : array->name);
+
+ if (! new_name)
+ {
+ grub_free (array->members);
+ grub_free (array->uuid);
+ grub_free (array);
+
+ return grub_errno;
+ }
+
+ grub_free (array->name);
+ array->name = new_name;
+ }
+
+ grub_dprintf ("raid", "Found array %s (%s)\n", array->name,
+ scanner_name);
+#ifdef GRUB_UTIL
+ grub_util_info ("Found array %s (%s)", array->name,
+ scanner_name);
+#endif
+
+ /* Add our new array to the list. */
+ array->next = array_list;
+ array_list = array;
+
+ /* RAID 1 doesn't use a chunksize but code assumes one so set
+ one. */
+ if (array->level == 1)
+ array->chunk_size = 64;
+ }
+
+ /* Add the device to the array. */
+ array->members[new_array->index].device = disk;
+ array->members[new_array->index].start_sector = start_sector;
+ array->nr_devs++;
+
+ return 0;
+}
+
+static grub_raid_t grub_raid_list;
+
+static void
+free_array (void)
+{
+ struct grub_raid_array *array;
+
+ array = array_list;
+ while (array)
+ {
+ struct grub_raid_array *p;
+ unsigned int i;
+
+ p = array;
+ array = array->next;
+
+ for (i = 0; i < p->allocated_devs; i++)
+ if (p->members[i].device)
+ grub_disk_close (p->members[i].device);
+ grub_free (p->members);
+
+ grub_free (p->uuid);
+ grub_free (p->name);
+ grub_free (p);
+ }
+
+ array_list = 0;
+}
+
+void
+grub_raid_register (grub_raid_t raid)
+{
+ auto int hook (const char *name);
+ int hook (const char *name)
+ {
+ grub_disk_t disk;
+ struct grub_raid_array array;
+ grub_disk_addr_t start_sector;
+
+ grub_dprintf ("raid", "Scanning for %s RAID devices on disk %s\n",
+ grub_raid_list->name, name);
+#ifdef GRUB_UTIL
+ grub_util_info ("Scanning for %s RAID devices on disk %s",
+ grub_raid_list->name, name);
+#endif
+
+ disk = grub_disk_open (name);
+ if (!disk)
+ return 0;
+
+ if ((disk->total_sectors != GRUB_ULONG_MAX) &&
+ (! grub_raid_list->detect (disk, &array, &start_sector)) &&
+ (! insert_array (disk, &array, start_sector, grub_raid_list->name,
+ grub_raid_list)))
+ return 0;
+
+ /* This error usually means it's not raid, no need to display
+ it. */
+ if (grub_errno != GRUB_ERR_OUT_OF_RANGE)
+ grub_print_error ();
+
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_disk_close (disk);
+
+ return 0;
+ }
+
+ raid->next = grub_raid_list;
+ grub_raid_list = raid;
+ grub_device_iterate (&hook);
+}
+
+void
+grub_raid_unregister (grub_raid_t raid)
+{
+ grub_raid_t *p, q;
+
+ for (p = &grub_raid_list, q = *p; q; p = &(q->next), q = q->next)
+ if (q == raid)
+ {
+ *p = q->next;
+ break;
+ }
+}
+
+static struct grub_disk_dev grub_raid_dev =
+ {
+ .name = "raid",
+ .id = GRUB_DISK_DEVICE_RAID_ID,
+ .iterate = grub_raid_iterate,
+ .open = grub_raid_open,
+ .close = grub_raid_close,
+ .read = grub_raid_read,
+ .write = grub_raid_write,
+#ifdef GRUB_UTIL
+ .memberlist = grub_raid_memberlist,
+ .raidname = grub_raid_getname,
+#endif
+ .next = 0
+ };
+
+
+GRUB_MOD_INIT(raid)
+{
+ grub_disk_dev_register (&grub_raid_dev);
+}
+
+GRUB_MOD_FINI(raid)
+{
+ grub_disk_dev_unregister (&grub_raid_dev);
+ free_array ();
+}
diff --git a/grub-core/disk/raid5_recover.c b/grub-core/disk/raid5_recover.c
new file mode 100644
index 0000000..c26d05e
--- /dev/null
+++ b/grub-core/disk/raid5_recover.c
@@ -0,0 +1,76 @@
+/* raid5_recover.c - module to recover from faulty RAID4/5 arrays. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/raid.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_raid5_recover (struct grub_raid_array *array, int disknr,
+ char *buf, grub_disk_addr_t sector, int size)
+{
+ char *buf2;
+ int i;
+
+ size <<= GRUB_DISK_SECTOR_BITS;
+ buf2 = grub_malloc (size);
+ if (!buf2)
+ return grub_errno;
+
+ grub_memset (buf, 0, size);
+
+ for (i = 0; i < (int) array->total_devs; i++)
+ {
+ grub_err_t err;
+
+ if (i == disknr)
+ continue;
+
+ err = grub_disk_read (array->members[i].device,
+ array->members[i].start_sector + sector,
+ 0, size, buf2);
+
+ if (err)
+ {
+ grub_free (buf2);
+ return err;
+ }
+
+ grub_raid_block_xor (buf, buf2, size);
+ }
+
+ grub_free (buf2);
+
+ return GRUB_ERR_NONE;
+}
+
+GRUB_MOD_INIT(raid5rec)
+{
+ grub_raid5_recover_func = grub_raid5_recover;
+}
+
+GRUB_MOD_FINI(raid5rec)
+{
+ grub_raid5_recover_func = 0;
+}
diff --git a/grub-core/disk/raid6_recover.c b/grub-core/disk/raid6_recover.c
new file mode 100644
index 0000000..25b50eb
--- /dev/null
+++ b/grub-core/disk/raid6_recover.c
@@ -0,0 +1,230 @@
+/* raid6_recover.c - module to recover from faulty RAID6 arrays. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/raid.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_uint8_t raid6_table1[256][256];
+static grub_uint8_t raid6_table2[256][256];
+
+static void
+grub_raid_block_mul (grub_uint8_t mul, char *buf, int size)
+{
+ int i;
+ grub_uint8_t *p;
+
+ p = (grub_uint8_t *) buf;
+ for (i = 0; i < size; i++, p++)
+ *p = raid6_table1[mul][*p];
+}
+
+static void
+grub_raid6_init_table (void)
+{
+ int i, j;
+
+ for (i = 0; i < 256; i++)
+ raid6_table1[i][1] = raid6_table1[1][i] = i;
+
+ for (i = 2; i < 256; i++)
+ for (j = i; j < 256; j++)
+ {
+ int n;
+ grub_uint8_t c;
+
+ n = i >> 1;
+
+ c = raid6_table1[n][j];
+ c = (c << 1) ^ ((c & 0x80) ? 0x1d : 0);
+ if (i & 1)
+ c ^= j;
+
+ raid6_table1[j][i] = raid6_table1[i][j] = c;
+ }
+
+ raid6_table2[0][0] = 1;
+ for (i = 1; i < 256; i++)
+ raid6_table2[i][i] = raid6_table1[raid6_table2[i - 1][i - 1]][2];
+
+ for (i = 0; i < 254; i++)
+ for (j = 0; j < 254; j++)
+ {
+ grub_uint8_t c, n;
+ int k;
+
+ if (i == j)
+ continue;
+
+ k = i - j;
+ if (k < 0)
+ k += 255;
+
+ c = n = raid6_table2[k][k] ^ 1;
+ for (k = 0; k < 253; k++)
+ c = raid6_table1[c][n];
+
+ raid6_table2[i][j] = raid6_table1[raid6_table2[255 - j][255 - j]][c];
+ }
+}
+
+static grub_err_t
+grub_raid6_recover (struct grub_raid_array *array, int disknr, int p,
+ char *buf, grub_disk_addr_t sector, int size)
+{
+ int i, q, pos;
+ int bad1 = -1, bad2 = -1;
+ char *pbuf = 0, *qbuf = 0;
+
+ size <<= GRUB_DISK_SECTOR_BITS;
+ pbuf = grub_zalloc (size);
+ if (!pbuf)
+ goto quit;
+
+ qbuf = grub_zalloc (size);
+ if (!qbuf)
+ goto quit;
+
+ q = p + 1;
+ if (q == (int) array->total_devs)
+ q = 0;
+
+ pos = q + 1;
+ if (pos == (int) array->total_devs)
+ pos = 0;
+
+ for (i = 0; i < (int) array->total_devs - 2; i++)
+ {
+ if (pos == disknr)
+ bad1 = i;
+ else
+ {
+ if ((array->members[pos].device) &&
+ (! grub_disk_read (array->members[pos].device,
+ array->members[i].start_sector + sector,
+ 0, size, buf)))
+ {
+ grub_raid_block_xor (pbuf, buf, size);
+ grub_raid_block_mul (raid6_table2[i][i], buf, size);
+ grub_raid_block_xor (qbuf, buf, size);
+ }
+ else
+ {
+ /* Too many bad devices */
+ if (bad2 >= 0)
+ goto quit;
+
+ bad2 = i;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+
+ pos++;
+ if (pos == (int) array->total_devs)
+ pos = 0;
+ }
+
+ /* Invalid disknr or p */
+ if (bad1 < 0)
+ goto quit;
+
+ if (bad2 < 0)
+ {
+ /* One bad device */
+ if ((array->members[p].device) &&
+ (! grub_disk_read (array->members[p].device,
+ array->members[i].start_sector + sector,
+ 0, size, buf)))
+ {
+ grub_raid_block_xor (buf, pbuf, size);
+ goto quit;
+ }
+
+ if (! array->members[q].device)
+ {
+ grub_error (GRUB_ERR_READ_ERROR, "not enough disk to restore");
+ goto quit;
+ }
+
+ grub_errno = GRUB_ERR_NONE;
+ if (grub_disk_read (array->members[q].device,
+ array->members[i].start_sector + sector, 0, size, buf))
+ goto quit;
+
+ grub_raid_block_xor (buf, qbuf, size);
+ grub_raid_block_mul (raid6_table2[255 - bad1][255 - bad1], buf,
+ size);
+ }
+ else
+ {
+ /* Two bad devices */
+ grub_uint8_t c;
+
+ if ((! array->members[p].device) || (! array->members[q].device))
+ {
+ grub_error (GRUB_ERR_READ_ERROR, "not enough disk to restore");
+ goto quit;
+ }
+
+ if (grub_disk_read (array->members[p].device,
+ array->members[i].start_sector + sector,
+ 0, size, buf))
+ goto quit;
+
+ grub_raid_block_xor (pbuf, buf, size);
+
+ if (grub_disk_read (array->members[q].device,
+ array->members[i].start_sector + sector,
+ 0, size, buf))
+ goto quit;
+
+ grub_raid_block_xor (qbuf, buf, size);
+
+ c = raid6_table2[bad2][bad1];
+ grub_raid_block_mul (c, qbuf, size);
+
+ c = raid6_table1[raid6_table2[bad2][bad2]][c];
+ grub_raid_block_mul (c, pbuf, size);
+
+ grub_raid_block_xor (pbuf, qbuf, size);
+ grub_memcpy (buf, pbuf, size);
+ }
+
+quit:
+ grub_free (pbuf);
+ grub_free (qbuf);
+
+ return grub_errno;
+}
+
+GRUB_MOD_INIT(raid6rec)
+{
+ grub_raid6_init_table ();
+ grub_raid6_recover_func = grub_raid6_recover;
+}
+
+GRUB_MOD_FINI(raid6rec)
+{
+ grub_raid6_recover_func = 0;
+}
diff --git a/grub-core/disk/scsi.c b/grub-core/disk/scsi.c
new file mode 100644
index 0000000..25f0e3a
--- /dev/null
+++ b/grub-core/disk/scsi.c
@@ -0,0 +1,606 @@
+/* scsi.c - scsi support. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/kernel.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/scsi.h>
+#include <grub/scsicmd.h>
+#include <grub/time.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+
+static grub_scsi_dev_t grub_scsi_dev_list;
+
+void
+grub_scsi_dev_register (grub_scsi_dev_t dev)
+{
+ dev->next = grub_scsi_dev_list;
+ grub_scsi_dev_list = dev;
+}
+
+void
+grub_scsi_dev_unregister (grub_scsi_dev_t dev)
+{
+ grub_scsi_dev_t *p, q;
+
+ for (p = &grub_scsi_dev_list, q = *p; q; p = &(q->next), q = q->next)
+ if (q == dev)
+ {
+ *p = q->next;
+ break;
+ }
+}
+
+
+/* Check result of previous operation. */
+static grub_err_t
+grub_scsi_request_sense (grub_scsi_t scsi)
+{
+ struct grub_scsi_request_sense rs;
+ struct grub_scsi_request_sense_data rsd;
+ grub_err_t err;
+
+ rs.opcode = grub_scsi_cmd_request_sense;
+ rs.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ rs.reserved1 = 0;
+ rs.reserved2 = 0;
+ rs.alloc_length = 0x12; /* XXX: Hardcoded for now */
+ rs.control = 0;
+ grub_memset (rs.pad, 0, sizeof(rs.pad));
+
+ err = scsi->dev->read (scsi, sizeof (rs), (char *) &rs,
+ sizeof (rsd), (char *) &rsd);
+ if (err)
+ return err;
+
+ return GRUB_ERR_NONE;
+}
+/* Self commenting... */
+static grub_err_t
+grub_scsi_test_unit_ready (grub_scsi_t scsi)
+{
+ struct grub_scsi_test_unit_ready tur;
+ grub_err_t err;
+ grub_err_t err_sense;
+
+ tur.opcode = grub_scsi_cmd_test_unit_ready;
+ tur.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ tur.reserved1 = 0;
+ tur.reserved2 = 0;
+ tur.reserved3 = 0;
+ tur.control = 0;
+ grub_memset (tur.pad, 0, sizeof(tur.pad));
+
+ err = scsi->dev->read (scsi, sizeof (tur), (char *) &tur,
+ 0, NULL);
+
+ /* Each SCSI command should be followed by Request Sense.
+ If not so, many devices STALLs or definitely freezes. */
+ err_sense = grub_scsi_request_sense (scsi);
+ if (err_sense != GRUB_ERR_NONE)
+ grub_errno = err;
+ /* err_sense is ignored for now and Request Sense Data also... */
+
+ if (err)
+ return err;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Determine if the device is removable and the type of the device
+ SCSI. */
+static grub_err_t
+grub_scsi_inquiry (grub_scsi_t scsi)
+{
+ struct grub_scsi_inquiry iq;
+ struct grub_scsi_inquiry_data iqd;
+ grub_err_t err;
+ grub_err_t err_sense;
+
+ iq.opcode = grub_scsi_cmd_inquiry;
+ iq.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ iq.page = 0;
+ iq.reserved = 0;
+ iq.alloc_length = 0x24; /* XXX: Hardcoded for now */
+ iq.control = 0;
+ grub_memset (iq.pad, 0, sizeof(iq.pad));
+
+ err = scsi->dev->read (scsi, sizeof (iq), (char *) &iq,
+ sizeof (iqd), (char *) &iqd);
+
+ /* Each SCSI command should be followed by Request Sense.
+ If not so, many devices STALLs or definitely freezes. */
+ err_sense = grub_scsi_request_sense (scsi);
+ if (err_sense != GRUB_ERR_NONE)
+ grub_errno = err;
+ /* err_sense is ignored for now and Request Sense Data also... */
+
+ if (err)
+ return err;
+
+ scsi->devtype = iqd.devtype & GRUB_SCSI_DEVTYPE_MASK;
+ scsi->removable = iqd.rmb >> GRUB_SCSI_REMOVABLE_BIT;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Read the capacity and block size of SCSI. */
+static grub_err_t
+grub_scsi_read_capacity (grub_scsi_t scsi)
+{
+ struct grub_scsi_read_capacity rc;
+ struct grub_scsi_read_capacity_data rcd;
+ grub_err_t err;
+ grub_err_t err_sense;
+
+ rc.opcode = grub_scsi_cmd_read_capacity;
+ rc.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ rc.logical_block_addr = 0;
+ rc.reserved1 = 0;
+ rc.reserved2 = 0;
+ rc.PMI = 0;
+ rc.control = 0;
+ rc.pad = 0;
+
+ err = scsi->dev->read (scsi, sizeof (rc), (char *) &rc,
+ sizeof (rcd), (char *) &rcd);
+
+ /* Each SCSI command should be followed by Request Sense.
+ If not so, many devices STALLs or definitely freezes. */
+ err_sense = grub_scsi_request_sense (scsi);
+ if (err_sense != GRUB_ERR_NONE)
+ grub_errno = err;
+/* err_sense is ignored for now and Request Sense Data also... */
+
+ if (err)
+ return err;
+
+ scsi->size = grub_be_to_cpu32 (rcd.size);
+ scsi->blocksize = grub_be_to_cpu32 (rcd.blocksize);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Send a SCSI request for DISK: read SIZE sectors starting with
+ sector SECTOR to BUF. */
+static grub_err_t
+grub_scsi_read10 (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_scsi_t scsi;
+ struct grub_scsi_read10 rd;
+ grub_err_t err;
+ grub_err_t err_sense;
+
+ scsi = disk->data;
+
+ rd.opcode = grub_scsi_cmd_read10;
+ rd.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ rd.lba = grub_cpu_to_be32 (sector);
+ rd.reserved = 0;
+ rd.size = grub_cpu_to_be16 (size);
+ rd.reserved2 = 0;
+ rd.pad = 0;
+
+ err = scsi->dev->read (scsi, sizeof (rd), (char *) &rd, size * scsi->blocksize, buf);
+
+ /* Each SCSI command should be followed by Request Sense.
+ If not so, many devices STALLs or definitely freezes. */
+ err_sense = grub_scsi_request_sense (scsi);
+ if (err_sense != GRUB_ERR_NONE)
+ grub_errno = err;
+ /* err_sense is ignored for now and Request Sense Data also... */
+
+ return err;
+}
+
+/* Send a SCSI request for DISK: read SIZE sectors starting with
+ sector SECTOR to BUF. */
+static grub_err_t
+grub_scsi_read12 (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_scsi_t scsi;
+ struct grub_scsi_read12 rd;
+ grub_err_t err;
+ grub_err_t err_sense;
+
+ scsi = disk->data;
+
+ rd.opcode = grub_scsi_cmd_read12;
+ rd.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ rd.lba = grub_cpu_to_be32 (sector);
+ rd.size = grub_cpu_to_be32 (size);
+ rd.reserved = 0;
+ rd.control = 0;
+
+ err = scsi->dev->read (scsi, sizeof (rd), (char *) &rd, size * scsi->blocksize, buf);
+
+ /* Each SCSI command should be followed by Request Sense.
+ If not so, many devices STALLs or definitely freezes. */
+ err_sense = grub_scsi_request_sense (scsi);
+ if (err_sense != GRUB_ERR_NONE)
+ grub_errno = err;
+ /* err_sense is ignored for now and Request Sense Data also... */
+
+ return err;
+}
+
+#if 0
+/* Send a SCSI request for DISK: write the data stored in BUF to SIZE
+ sectors starting with SECTOR. */
+static grub_err_t
+grub_scsi_write10 (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_scsi_t scsi;
+ struct grub_scsi_write10 wr;
+ grub_err_t err;
+ grub_err_t err_sense;
+
+ scsi = disk->data;
+
+ wr.opcode = grub_scsi_cmd_write10;
+ wr.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ wr.lba = grub_cpu_to_be32 (sector);
+ wr.reserved = 0;
+ wr.size = grub_cpu_to_be16 (size);
+ wr.reserved2 = 0;
+ wr.pad = 0;
+
+ err = scsi->dev->write (scsi, sizeof (wr), (char *) &wr, size * scsi->blocksize, buf);
+
+ /* Each SCSI command should be followed by Request Sense.
+ If not so, many devices STALLs or definitely freezes. */
+ err_sense = grub_scsi_request_sense (scsi);
+ if (err_sense != GRUB_ERR_NONE)
+ grub_errno = err;
+ /* err_sense is ignored for now and Request Sense Data also... */
+
+ return err;
+}
+
+/* Send a SCSI request for DISK: write the data stored in BUF to SIZE
+ sectors starting with SECTOR. */
+static grub_err_t
+grub_scsi_write12 (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_scsi_t scsi;
+ struct grub_scsi_write12 wr;
+ grub_err_t err;
+ grub_err_t err_sense;
+
+ scsi = disk->data;
+
+ wr.opcode = grub_scsi_cmd_write12;
+ wr.lun = scsi->lun << GRUB_SCSI_LUN_SHIFT;
+ wr.lba = grub_cpu_to_be32 (sector);
+ wr.size = grub_cpu_to_be32 (size);
+ wr.reserved = 0;
+ wr.control = 0;
+
+ err = scsi->dev->write (scsi, sizeof (wr), (char *) &wr, size * scsi->blocksize, buf);
+
+ /* Each SCSI command should be followed by Request Sense.
+ If not so, many devices STALLs or definitely freezes. */
+ err_sense = grub_scsi_request_sense (scsi);
+ if (err_sense != GRUB_ERR_NONE)
+ grub_errno = err;
+ /* err_sense is ignored for now and Request Sense Data also... */
+
+ return err;
+}
+#endif
+
+
+static int
+grub_scsi_iterate (int (*hook) (const char *name))
+{
+ grub_scsi_dev_t p;
+
+ auto int scsi_iterate (int bus, int luns);
+
+ int scsi_iterate (int bus, int luns)
+ {
+ int i;
+
+ /* In case of a single LUN, just return `usbX'. */
+ if (luns == 1)
+ {
+ char *sname;
+ int ret;
+ sname = grub_xasprintf ("%s%d", p->name, bus);
+ if (!sname)
+ return 1;
+ ret = hook (sname);
+ grub_free (sname);
+ return ret;
+ }
+
+ /* In case of multiple LUNs, every LUN will get a prefix to
+ distinguish it. */
+ for (i = 0; i < luns; i++)
+ {
+ char *sname;
+ int ret;
+ sname = grub_xasprintf ("%s%d%c", p->name, bus, 'a' + i);
+ if (!sname)
+ return 1;
+ ret = hook (sname);
+ grub_free (sname);
+ if (ret)
+ return 1;
+ }
+ return 0;
+ }
+
+ for (p = grub_scsi_dev_list; p; p = p->next)
+ if (p->iterate && (p->iterate) (scsi_iterate))
+ return 1;
+
+ return 0;
+}
+
+static grub_err_t
+grub_scsi_open (const char *name, grub_disk_t disk)
+{
+ grub_scsi_dev_t p;
+ grub_scsi_t scsi;
+ grub_err_t err;
+ int lun, bus;
+ grub_uint64_t maxtime;
+ const char *nameend;
+
+ nameend = name + grub_strlen (name) - 1;
+ /* Try to detect a LUN ('a'-'z'), otherwise just use the first
+ LUN. */
+ if (nameend >= name && *nameend >= 'a' && *nameend <= 'z')
+ {
+ lun = *nameend - 'a';
+ nameend--;
+ }
+ else
+ lun = 0;
+
+ while (nameend >= name && grub_isdigit (*nameend))
+ nameend--;
+
+ if (!nameend[1] || !grub_isdigit (nameend[1]))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a SCSI disk");
+
+ bus = grub_strtoul (nameend + 1, 0, 0);
+
+ scsi = grub_malloc (sizeof (*scsi));
+ if (! scsi)
+ return grub_errno;
+
+ for (p = grub_scsi_dev_list; p; p = p->next)
+ {
+ if (grub_strncmp (p->name, name, nameend - name) != 0)
+ continue;
+
+ if (p->open (bus, scsi))
+ continue;
+
+ disk->id = grub_make_scsi_id (p->id, bus, lun);
+ disk->data = scsi;
+ scsi->dev = p;
+ scsi->lun = lun;
+ scsi->bus = bus;
+
+ grub_dprintf ("scsi", "dev opened\n");
+
+ err = grub_scsi_inquiry (scsi);
+ if (err)
+ {
+ grub_free (scsi);
+ grub_dprintf ("scsi", "inquiry failed\n");
+ return err;
+ }
+
+ grub_dprintf ("scsi", "inquiry: devtype=0x%02x removable=%d\n",
+ scsi->devtype, scsi->removable);
+
+ /* Try to be conservative about the device types
+ supported. */
+ if (scsi->devtype != grub_scsi_devtype_direct
+ && scsi->devtype != grub_scsi_devtype_cdrom)
+ {
+ grub_free (scsi);
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "unknown SCSI device");
+ }
+
+ /* According to USB MS tests specification, issue Test Unit Ready
+ * until OK */
+ maxtime = grub_get_time_ms () + 5000; /* It is safer value */
+ do
+ {
+ /* Timeout is necessary - for example in case when we have
+ * universal card reader with more LUNs and we have only
+ * one card inserted (or none), so only one LUN (or none)
+ * will be ready - and we want not to hang... */
+ if (grub_get_time_ms () > maxtime)
+ {
+ err = GRUB_ERR_READ_ERROR;
+ grub_free (scsi);
+ grub_dprintf ("scsi", "LUN is not ready - timeout\n");
+ return err;
+ }
+ err = grub_scsi_test_unit_ready (scsi);
+ }
+ while (err == GRUB_ERR_READ_ERROR);
+ /* Reset grub_errno !
+ * It is set to some error code in loop before... */
+ grub_errno = GRUB_ERR_NONE;
+
+ /* Read capacity of media */
+ err = grub_scsi_read_capacity (scsi);
+ if (err)
+ {
+ grub_free (scsi);
+ grub_dprintf ("scsi", "READ CAPACITY failed\n");
+ return err;
+ }
+
+ /* SCSI blocks can be something else than 512, although GRUB
+ wants 512 byte blocks. */
+ disk->total_sectors = ((grub_uint64_t)scsi->size
+ * (grub_uint64_t)scsi->blocksize)
+ >> GRUB_DISK_SECTOR_BITS;
+
+ grub_dprintf ("scsi", "blocks=%u, blocksize=%u\n",
+ scsi->size, scsi->blocksize);
+ grub_dprintf ("scsi", "Disk total 512 sectors = %llu\n",
+ (unsigned long long) disk->total_sectors);
+
+ return GRUB_ERR_NONE;
+ }
+
+ grub_free (scsi);
+
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a SCSI disk");
+}
+
+static void
+grub_scsi_close (grub_disk_t disk)
+{
+ grub_scsi_t scsi;
+
+ scsi = disk->data;
+ if (scsi->dev->close)
+ scsi->dev->close (scsi);
+ grub_free (scsi);
+}
+
+static grub_err_t
+grub_scsi_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ grub_scsi_t scsi;
+
+ scsi = disk->data;
+
+ /* SCSI sectors are variable in size. GRUB uses 512 byte
+ sectors. */
+ if (scsi->blocksize != GRUB_DISK_SECTOR_SIZE)
+ {
+ unsigned spb = scsi->blocksize >> GRUB_DISK_SECTOR_BITS;
+ if (spb == 0 || (scsi->blocksize & (GRUB_DISK_SECTOR_SIZE - 1)) != 0)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unsupported SCSI block size");
+
+ grub_uint32_t sector_mod = 0;
+ sector = grub_divmod64 (sector, spb, &sector_mod);
+
+ if (! (sector_mod == 0 && size % spb == 0))
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unaligned SCSI read not supported");
+
+ size /= spb;
+ }
+
+ /* Depending on the type, select a read function. */
+ switch (scsi->devtype)
+ {
+ case grub_scsi_devtype_direct:
+ return grub_scsi_read10 (disk, sector, size, buf);
+
+ case grub_scsi_devtype_cdrom:
+ return grub_scsi_read12 (disk, sector, size, buf);
+ }
+
+ /* XXX: Never reached. */
+ return GRUB_ERR_NONE;
+
+#if 0 /* Workaround - it works - but very slowly, from some reason
+ * unknown to me (specially on OHCI). Do not use it. */
+ /* Split transfer requests to device sector size because */
+ /* some devices are not able to transfer more than 512-1024 bytes */
+ grub_err_t err = GRUB_ERR_NONE;
+
+ for ( ; size; size--)
+ {
+ /* Depending on the type, select a read function. */
+ switch (scsi->devtype)
+ {
+ case grub_scsi_devtype_direct:
+ err = grub_scsi_read10 (disk, sector, 1, buf);
+ break;
+
+ case grub_scsi_devtype_cdrom:
+ err = grub_scsi_read12 (disk, sector, 1, buf);
+ break;
+
+ default: /* This should not happen */
+ return GRUB_ERR_READ_ERROR;
+ }
+ if (err)
+ return err;
+ sector++;
+ buf += scsi->blocksize;
+ }
+
+ return err;
+#endif
+}
+
+static grub_err_t
+grub_scsi_write (grub_disk_t disk __attribute((unused)),
+ grub_disk_addr_t sector __attribute((unused)),
+ grub_size_t size __attribute((unused)),
+ const char *buf __attribute((unused)))
+{
+#if 0
+ /* XXX: Not tested yet! */
+
+ /* XXX: This should depend on the device type? */
+ return grub_scsi_write10 (disk, sector, size, buf);
+#endif
+ return GRUB_ERR_NOT_IMPLEMENTED_YET;
+}
+
+
+static struct grub_disk_dev grub_scsi_dev =
+ {
+ .name = "scsi",
+ .id = GRUB_DISK_DEVICE_SCSI_ID,
+ .iterate = grub_scsi_iterate,
+ .open = grub_scsi_open,
+ .close = grub_scsi_close,
+ .read = grub_scsi_read,
+ .write = grub_scsi_write,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(scsi)
+{
+ grub_disk_dev_register (&grub_scsi_dev);
+}
+
+GRUB_MOD_FINI(scsi)
+{
+ grub_disk_dev_unregister (&grub_scsi_dev);
+}
diff --git a/grub-core/disk/usbms.c b/grub-core/disk/usbms.c
new file mode 100644
index 0000000..2f1dbd4
--- /dev/null
+++ b/grub-core/disk/usbms.c
@@ -0,0 +1,441 @@
+/* usbms.c - USB Mass Storage Support. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/usb.h>
+#include <grub/scsi.h>
+#include <grub/scsicmd.h>
+#include <grub/misc.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_USBMS_DIRECTION_BIT 7
+
+/* The USB Mass Storage Command Block Wrapper. */
+struct grub_usbms_cbw
+{
+ grub_uint32_t signature;
+ grub_uint32_t tag;
+ grub_uint32_t transfer_length;
+ grub_uint8_t flags;
+ grub_uint8_t lun;
+ grub_uint8_t length;
+ grub_uint8_t cbwcb[16];
+} __attribute__ ((packed));
+
+struct grub_usbms_csw
+{
+ grub_uint32_t signature;
+ grub_uint32_t tag;
+ grub_uint32_t residue;
+ grub_uint8_t status;
+} __attribute__ ((packed));
+
+struct grub_usbms_dev
+{
+ struct grub_usb_device *dev;
+
+ int luns;
+
+ int config;
+ int interface;
+ struct grub_usb_desc_endp *in;
+ struct grub_usb_desc_endp *out;
+
+ int in_maxsz;
+ int out_maxsz;
+};
+typedef struct grub_usbms_dev *grub_usbms_dev_t;
+
+/* FIXME: remove limit. */
+#define MAX_USBMS_DEVICES 128
+static grub_usbms_dev_t grub_usbms_devices[MAX_USBMS_DEVICES];
+static int first_available_slot = 0;
+
+static grub_err_t
+grub_usbms_reset (grub_usb_device_t dev, int interface)
+{
+ grub_usb_err_t u;
+ u = grub_usb_control_msg (dev, 0x21, 255, 0, interface, 0, 0);
+ if (u)
+ return grub_error (GRUB_ERR_IO, "USB error %d", u);
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_usbms_detach (grub_usb_device_t usbdev, int config, int interface)
+{
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (grub_usbms_devices); i++)
+ if (grub_usbms_devices[i] && grub_usbms_devices[i]->dev == usbdev
+ && grub_usbms_devices[i]->interface == interface
+ && grub_usbms_devices[i]->config == config)
+ {
+ grub_free (grub_usbms_devices[i]);
+ grub_usbms_devices[i] = 0;
+ }
+}
+
+static int
+grub_usbms_attach (grub_usb_device_t usbdev, int configno, int interfno)
+{
+ struct grub_usb_desc_if *interf
+ = usbdev->config[configno].interf[interfno].descif;
+ int j;
+ grub_uint8_t luns = 0;
+ unsigned curnum;
+ grub_usb_err_t err;
+
+ if (first_available_slot == ARRAY_SIZE (grub_usbms_devices))
+ return 0;
+
+ curnum = first_available_slot;
+ first_available_slot++;
+
+ interf = usbdev->config[configno].interf[interfno].descif;
+
+ if ((interf->subclass != GRUB_USBMS_SUBCLASS_BULK
+ /* Experimental support of RBC, MMC-2, UFI, SFF-8070i devices */
+ && interf->subclass != GRUB_USBMS_SUBCLASS_RBC
+ && interf->subclass != GRUB_USBMS_SUBCLASS_MMC2
+ && interf->subclass != GRUB_USBMS_SUBCLASS_UFI
+ && interf->subclass != GRUB_USBMS_SUBCLASS_SFF8070 )
+ || interf->protocol != GRUB_USBMS_PROTOCOL_BULK)
+ return 0;
+
+ grub_usbms_devices[curnum] = grub_zalloc (sizeof (struct grub_usbms_dev));
+ if (! grub_usbms_devices[curnum])
+ return 0;
+
+ grub_usbms_devices[curnum]->dev = usbdev;
+ grub_usbms_devices[curnum]->interface = interfno;
+
+ grub_dprintf ("usbms", "alive\n");
+
+ /* Iterate over all endpoints of this interface, at least a
+ IN and OUT bulk endpoint are required. */
+ for (j = 0; j < interf->endpointcnt; j++)
+ {
+ struct grub_usb_desc_endp *endp;
+ endp = &usbdev->config[0].interf[interfno].descendp[j];
+
+ if ((endp->endp_addr & 128) && (endp->attrib & 3) == 2)
+ {
+ /* Bulk IN endpoint. */
+ grub_usbms_devices[curnum]->in = endp;
+ /* Clear Halt is not possible yet! */
+ /* grub_usb_clear_halt (usbdev, endp->endp_addr); */
+ grub_usbms_devices[curnum]->in_maxsz = endp->maxpacket;
+ }
+ else if (!(endp->endp_addr & 128) && (endp->attrib & 3) == 2)
+ {
+ /* Bulk OUT endpoint. */
+ grub_usbms_devices[curnum]->out = endp;
+ /* Clear Halt is not possible yet! */
+ /* grub_usb_clear_halt (usbdev, endp->endp_addr); */
+ grub_usbms_devices[curnum]->out_maxsz = endp->maxpacket;
+ }
+ }
+
+ if (!grub_usbms_devices[curnum]->in || !grub_usbms_devices[curnum]->out)
+ {
+ grub_free (grub_usbms_devices[curnum]);
+ grub_usbms_devices[curnum] = 0;
+ return 0;
+ }
+
+ grub_dprintf ("usbms", "alive\n");
+
+ /* XXX: Activate the first configuration. */
+ grub_usb_set_configuration (usbdev, 1);
+
+ /* Query the amount of LUNs. */
+ err = grub_usb_control_msg (usbdev, 0xA1, 254, 0, interfno, 1, (char *) &luns);
+
+ if (err)
+ {
+ /* In case of a stall, clear the stall. */
+ if (err == GRUB_USB_ERR_STALL)
+ {
+ grub_usb_clear_halt (usbdev, grub_usbms_devices[curnum]->in->endp_addr);
+ grub_usb_clear_halt (usbdev, grub_usbms_devices[curnum]->out->endp_addr);
+ }
+ /* Just set the amount of LUNs to one. */
+ grub_errno = GRUB_ERR_NONE;
+ grub_usbms_devices[curnum]->luns = 1;
+ }
+ else
+ /* luns = 0 means one LUN with ID 0 present ! */
+ /* We get from device not number of LUNs but highest
+ * LUN number. LUNs are numbered from 0,
+ * i.e. number of LUNs is luns+1 ! */
+ grub_usbms_devices[curnum]->luns = luns + 1;
+
+ grub_dprintf ("usbms", "alive\n");
+
+ usbdev->config[configno].interf[interfno].detach_hook = grub_usbms_detach;
+
+#if 0 /* All this part should be probably deleted.
+ * This make trouble on some devices if they are not in
+ * Phase Error state - and there they should be not in such state...
+ * Bulk only mass storage reset procedure should be used only
+ * on place and in time when it is really necessary. */
+ /* Reset recovery procedure */
+ /* Bulk-Only Mass Storage Reset, after the reset commands
+ will be accepted. */
+ grub_usbms_reset (usbdev, i);
+ grub_usb_clear_halt (usbdev, usbms->in->endp_addr);
+ grub_usb_clear_halt (usbdev, usbms->out->endp_addr);
+#endif
+
+ return 1;
+}
+
+
+
+static int
+grub_usbms_iterate (int (*hook) (int bus, int luns))
+{
+ unsigned i;
+
+ grub_usb_poll_devices ();
+
+ for (i = 0; i < ARRAY_SIZE (grub_usbms_devices); i++)
+ if (grub_usbms_devices[i])
+ {
+ if (hook (i, grub_usbms_devices[i]->luns))
+ return 1;
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_usbms_transfer (struct grub_scsi *scsi, grub_size_t cmdsize, char *cmd,
+ grub_size_t size, char *buf, int read_write)
+{
+ struct grub_usbms_cbw cbw;
+ grub_usbms_dev_t dev = (grub_usbms_dev_t) scsi->data;
+ struct grub_usbms_csw status;
+ static grub_uint32_t tag = 0;
+ grub_usb_err_t err = GRUB_USB_ERR_NONE;
+ grub_usb_err_t errCSW = GRUB_USB_ERR_NONE;
+ int retrycnt = 3 + 1;
+
+ retry:
+ retrycnt--;
+ if (retrycnt == 0)
+ return grub_error (GRUB_ERR_IO, "USB Mass Storage stalled");
+
+ /* Setup the request. */
+ grub_memset (&cbw, 0, sizeof (cbw));
+ cbw.signature = grub_cpu_to_le32 (0x43425355);
+ cbw.tag = tag++;
+ cbw.transfer_length = grub_cpu_to_le32 (size);
+ cbw.flags = (!read_write) << GRUB_USBMS_DIRECTION_BIT;
+ cbw.lun = scsi->lun; /* In USB MS CBW are LUN bits on another place than in SCSI CDB, both should be set correctly. */
+ cbw.length = cmdsize;
+ grub_memcpy (cbw.cbwcb, cmd, cmdsize);
+
+ /* Debug print of CBW content. */
+ grub_dprintf ("usb", "CBW: sign=0x%08x tag=0x%08x len=0x%08x\n",
+ cbw.signature, cbw.tag, cbw.transfer_length);
+ grub_dprintf ("usb", "CBW: flags=0x%02x lun=0x%02x CB_len=0x%02x\n",
+ cbw.flags, cbw.lun, cbw.length);
+ grub_dprintf ("usb", "CBW: cmd:\n %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ cbw.cbwcb[ 0], cbw.cbwcb[ 1], cbw.cbwcb[ 2], cbw.cbwcb[ 3],
+ cbw.cbwcb[ 4], cbw.cbwcb[ 5], cbw.cbwcb[ 6], cbw.cbwcb[ 7],
+ cbw.cbwcb[ 8], cbw.cbwcb[ 9], cbw.cbwcb[10], cbw.cbwcb[11],
+ cbw.cbwcb[12], cbw.cbwcb[13], cbw.cbwcb[14], cbw.cbwcb[15]);
+
+ /* Write the request.
+ * XXX: Error recovery is maybe still not fully correct. */
+ err = grub_usb_bulk_write (dev->dev, dev->out->endp_addr,
+ sizeof (cbw), (char *) &cbw);
+ if (err)
+ {
+ if (err == GRUB_USB_ERR_STALL)
+ {
+ grub_usb_clear_halt (dev->dev, dev->out->endp_addr);
+ goto CheckCSW;
+ }
+ return grub_error (GRUB_ERR_IO, "USB Mass Storage request failed");
+ }
+
+ /* Read/write the data, (maybe) according to specification. */
+ if (size && (read_write == 0))
+ {
+ err = grub_usb_bulk_read (dev->dev, dev->in->endp_addr, size, buf);
+ grub_dprintf ("usb", "read: %d %d\n", err, GRUB_USB_ERR_STALL);
+ if (err)
+ {
+ if (err == GRUB_USB_ERR_STALL)
+ grub_usb_clear_halt (dev->dev, dev->in->endp_addr);
+ goto CheckCSW;
+ }
+ /* Debug print of received data. */
+ grub_dprintf ("usb", "buf:\n");
+ if (size <= 64)
+ {
+ unsigned i;
+ for (i = 0; i < size; i++)
+ grub_dprintf ("usb", "0x%02x: 0x%02x\n", i, buf[i]);
+ }
+ else
+ grub_dprintf ("usb", "Too much data for debug print...\n");
+ }
+ else if (size)
+ {
+ err = grub_usb_bulk_write (dev->dev, dev->out->endp_addr, size, buf);
+ grub_dprintf ("usb", "write: %d %d\n", err, GRUB_USB_ERR_STALL);
+ grub_dprintf ("usb", "First 16 bytes of sent data:\n %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ buf[ 0], buf[ 1], buf[ 2], buf[ 3],
+ buf[ 4], buf[ 5], buf[ 6], buf[ 7],
+ buf[ 8], buf[ 9], buf[10], buf[11],
+ buf[12], buf[13], buf[14], buf[15]);
+ if (err)
+ {
+ if (err == GRUB_USB_ERR_STALL)
+ grub_usb_clear_halt (dev->dev, dev->out->endp_addr);
+ goto CheckCSW;
+ }
+ /* Debug print of sent data. */
+ if (size <= 256)
+ {
+ unsigned i;
+ for (i=0; i<size; i++)
+ grub_dprintf ("usb", "0x%02x: 0x%02x\n", i, buf[i]);
+ }
+ else
+ grub_dprintf ("usb", "Too much data for debug print...\n");
+ }
+
+ /* Read the status - (maybe) according to specification. */
+CheckCSW:
+ errCSW = grub_usb_bulk_read (dev->dev, dev->in->endp_addr,
+ sizeof (status), (char *) &status);
+ if (errCSW)
+ {
+ grub_usb_clear_halt (dev->dev, dev->in->endp_addr);
+ errCSW = grub_usb_bulk_read (dev->dev, dev->in->endp_addr,
+ sizeof (status), (char *) &status);
+ if (errCSW)
+ { /* Bulk-only reset device. */
+ grub_dprintf ("usb", "Bulk-only reset device - errCSW\n");
+ grub_usbms_reset (dev->dev, dev->interface);
+ grub_usb_clear_halt (dev->dev, dev->in->endp_addr);
+ grub_usb_clear_halt (dev->dev, dev->out->endp_addr);
+ goto retry;
+ }
+ }
+
+ /* Debug print of CSW content. */
+ grub_dprintf ("usb", "CSW: sign=0x%08x tag=0x%08x resid=0x%08x\n",
+ status.signature, status.tag, status.residue);
+ grub_dprintf ("usb", "CSW: status=0x%02x\n", status.status);
+
+ /* If phase error or not valid signature, do bulk-only reset device. */
+ if ((status.status == 2) ||
+ (status.signature != grub_cpu_to_le32(0x53425355)))
+ { /* Bulk-only reset device. */
+ grub_dprintf ("usb", "Bulk-only reset device - bad status\n");
+ grub_usbms_reset (dev->dev, dev->interface);
+ grub_usb_clear_halt (dev->dev, dev->in->endp_addr);
+ grub_usb_clear_halt (dev->dev, dev->out->endp_addr);
+
+ goto retry;
+ }
+
+ /* If "command failed" status or data transfer failed -> error */
+ if ((status.status || err) && !read_write)
+ return grub_error (GRUB_ERR_READ_ERROR,
+ "error communication with USB Mass Storage device");
+ else if ((status.status || err) && read_write)
+ return grub_error (GRUB_ERR_WRITE_ERROR,
+ "error communication with USB Mass Storage device");
+
+ return GRUB_ERR_NONE;
+}
+
+
+static grub_err_t
+grub_usbms_read (struct grub_scsi *scsi, grub_size_t cmdsize, char *cmd,
+ grub_size_t size, char *buf)
+{
+ return grub_usbms_transfer (scsi, cmdsize, cmd, size, buf, 0);
+}
+
+static grub_err_t
+grub_usbms_write (struct grub_scsi *scsi, grub_size_t cmdsize, char *cmd,
+ grub_size_t size, char *buf)
+{
+ return grub_usbms_transfer (scsi, cmdsize, cmd, size, buf, 1);
+}
+
+static grub_err_t
+grub_usbms_open (int devnum, struct grub_scsi *scsi)
+{
+ grub_usb_poll_devices ();
+
+ if (!grub_usbms_devices[devnum])
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "unknown USB Mass Storage device");
+
+ scsi->data = grub_usbms_devices[devnum];
+ scsi->luns = grub_usbms_devices[devnum]->luns;
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_scsi_dev grub_usbms_dev =
+ {
+ .name = "usb",
+ .id = GRUB_SCSI_SUBSYSTEM_USBMS,
+ .iterate = grub_usbms_iterate,
+ .open = grub_usbms_open,
+ .read = grub_usbms_read,
+ .write = grub_usbms_write
+ };
+
+static struct grub_usb_attach_desc attach_hook =
+{
+ .class = GRUB_USB_CLASS_MASS_STORAGE,
+ .hook = grub_usbms_attach
+};
+
+GRUB_MOD_INIT(usbms)
+{
+ grub_usb_register_attach_hook_class (&attach_hook);
+ grub_scsi_dev_register (&grub_usbms_dev);
+}
+
+GRUB_MOD_FINI(usbms)
+{
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (grub_usbms_devices); i++)
+ {
+ grub_usbms_devices[i]->dev->config[grub_usbms_devices[i]->config]
+ .interf[grub_usbms_devices[i]->interface].detach_hook = 0;
+ grub_usbms_devices[i]->dev->config[grub_usbms_devices[i]->config]
+ .interf[grub_usbms_devices[i]->interface].attached = 0;
+ }
+ grub_usb_unregister_attach_hook_class (&attach_hook);
+ grub_scsi_dev_unregister (&grub_usbms_dev);
+}
diff --git a/grub-core/efiemu/i386/coredetect.c b/grub-core/efiemu/i386/coredetect.c
new file mode 100644
index 0000000..975c4aa
--- /dev/null
+++ b/grub-core/efiemu/i386/coredetect.c
@@ -0,0 +1,59 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/efiemu/efiemu.h>
+#include <grub/command.h>
+
+#define cpuid(num,a,b,c,d) \
+ asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
+ : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \
+ : "0" (num))
+
+#define bit_LM (1 << 29)
+
+char *
+grub_efiemu_get_default_core_name (void)
+{
+
+ unsigned int eax, ebx, ecx, edx;
+ unsigned int max_level;
+ unsigned int ext_level;
+
+ /* See if we can use cpuid. */
+ asm volatile ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;"
+ "pushl %0; popfl; pushfl; popl %0; popfl"
+ : "=&r" (eax), "=&r" (ebx)
+ : "i" (0x00200000));
+ if (((eax ^ ebx) & 0x00200000) == 0)
+ return "efiemu32.o";
+
+ /* Check the highest input value for eax. */
+ cpuid (0, eax, ebx, ecx, edx);
+ /* We only look at the first four characters. */
+ max_level = eax;
+ if (max_level == 0)
+ return "efiemu32.o";
+
+ cpuid (0x80000000, eax, ebx, ecx, edx);
+ ext_level = eax;
+ if (ext_level < 0x80000000)
+ return "efiemu32.o";
+
+ cpuid (0x80000001, eax, ebx, ecx, edx);
+ return (edx & bit_LM) ? "efiemu64.o" : "efiemu32.o";
+}
diff --git a/grub-core/efiemu/i386/loadcore32.c b/grub-core/efiemu/i386/loadcore32.c
new file mode 100644
index 0000000..24b63ec
--- /dev/null
+++ b/grub-core/efiemu/i386/loadcore32.c
@@ -0,0 +1,114 @@
+/* i386 CPU-specific part of loadcore.c for 32-bit mode */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/cpu/efiemu.h>
+#include <grub/elf.h>
+
+/* Check if EHDR is a valid ELF header. */
+int
+grub_arch_efiemu_check_header32 (void *ehdr)
+{
+ Elf32_Ehdr *e = ehdr;
+
+ /* Check the magic numbers. */
+ return (e->e_ident[EI_CLASS] == ELFCLASS32
+ && e->e_ident[EI_DATA] == ELFDATA2LSB
+ && e->e_machine == EM_386);
+}
+
+/* Relocate symbols. */
+grub_err_t
+grub_arch_efiemu_relocate_symbols32 (grub_efiemu_segment_t segs,
+ struct grub_efiemu_elf_sym *elfsyms,
+ void *ehdr)
+{
+ unsigned i;
+ Elf32_Ehdr *e = ehdr;
+ Elf32_Shdr *s;
+ grub_err_t err;
+
+ grub_dprintf ("efiemu", "relocating symbols %d %d\n",
+ e->e_shoff, e->e_shnum);
+
+ for (i = 0, s = (Elf32_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf32_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_REL)
+ {
+ grub_efiemu_segment_t seg;
+ grub_dprintf ("efiemu", "shtrel\n");
+
+ /* Find the target segment. */
+ for (seg = segs; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf32_Rel *rel, *max;
+
+ for (rel = (Elf32_Rel *) ((char *) e + s->sh_offset),
+ max = rel + s->sh_size / s->sh_entsize;
+ rel < max;
+ rel++)
+ {
+ Elf32_Word *addr;
+ struct grub_efiemu_elf_sym sym;
+ if (seg->size < rel->r_offset)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "reloc offset is out of the segment");
+
+ addr = (Elf32_Word *)
+ ((char *) grub_efiemu_mm_obtain_request (seg->handle)
+ + seg->off + rel->r_offset);
+ sym = elfsyms[ELF32_R_SYM (rel->r_info)];
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_386_32:
+ if ((err = grub_efiemu_write_value
+ (addr, sym.off + *addr, sym.handle, 0,
+ seg->ptv_rel_needed, sizeof (grub_uint32_t))))
+ return err;
+
+ break;
+
+ case R_386_PC32:
+ if ((err = grub_efiemu_write_value
+ (addr, sym.off + *addr - rel->r_offset
+ - seg->off, sym.handle, seg->handle,
+ seg->ptv_rel_needed, sizeof (grub_uint32_t))))
+ return err;
+ break;
+ default:
+ return grub_error (GRUB_ERR_BAD_OS,
+ "unrecognised relocation");
+ }
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+
diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c
new file mode 100644
index 0000000..a692790
--- /dev/null
+++ b/grub-core/efiemu/i386/loadcore64.c
@@ -0,0 +1,120 @@
+/* i386 CPU-specific part of loadcore.c for 32-bit mode */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/cpu/efiemu.h>
+#include <grub/elf.h>
+
+/* Check if EHDR is a valid ELF header. */
+int
+grub_arch_efiemu_check_header64 (void *ehdr)
+{
+ Elf64_Ehdr *e = ehdr;
+
+ return (e->e_ident[EI_CLASS] == ELFCLASS64
+ && e->e_ident[EI_DATA] == ELFDATA2LSB
+ && e->e_machine == EM_X86_64);
+}
+
+/* Relocate symbols. */
+grub_err_t
+grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
+ struct grub_efiemu_elf_sym *elfsyms,
+ void *ehdr)
+{
+ unsigned i;
+ Elf64_Ehdr *e = ehdr;
+ Elf64_Shdr *s;
+ grub_err_t err;
+
+ for (i = 0, s = (Elf64_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf64_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_RELA)
+ {
+ grub_efiemu_segment_t seg;
+ grub_dprintf ("efiemu", "shtrel\n");
+
+ /* Find the target segment. */
+ for (seg = segs; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf64_Rela *rel, *max;
+
+ for (rel = (Elf64_Rela *) ((char *) e + s->sh_offset),
+ max = rel + (unsigned long) s->sh_size
+ / (unsigned long)s->sh_entsize;
+ rel < max;
+ rel++)
+ {
+ void *addr;
+ grub_uint32_t *addr32;
+ grub_uint64_t *addr64;
+ struct grub_efiemu_elf_sym sym;
+ if (seg->size < rel->r_offset)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "reloc offset is out of the segment");
+
+ addr =
+ ((char *) grub_efiemu_mm_obtain_request (seg->handle)
+ + seg->off + rel->r_offset);
+ addr32 = (grub_uint32_t *) addr;
+ addr64 = (grub_uint64_t *) addr;
+ sym = elfsyms[ELF64_R_SYM (rel->r_info)];
+
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_X86_64_64:
+ if ((err = grub_efiemu_write_value
+ (addr, *addr64 + rel->r_addend + sym.off, sym.handle,
+ 0, seg->ptv_rel_needed, sizeof (grub_uint64_t))))
+ return err;
+ break;
+
+ case R_X86_64_PC32:
+ if ((err = grub_efiemu_write_value
+ (addr, *addr32 + rel->r_addend + sym.off
+ - rel->r_offset - seg->off, sym.handle, seg->handle,
+ seg->ptv_rel_needed, sizeof (grub_uint32_t))))
+ return err;
+ break;
+
+ case R_X86_64_32:
+ case R_X86_64_32S:
+ if ((err = grub_efiemu_write_value
+ (addr, *addr32 + rel->r_addend + sym.off, sym.handle,
+ 0, seg->ptv_rel_needed, sizeof (grub_uint32_t))))
+ return err;
+ break;
+ default:
+ return grub_error (GRUB_ERR_BAD_OS,
+ "unrecognised relocation");
+ }
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/efiemu/i386/nocfgtables.c b/grub-core/efiemu/i386/nocfgtables.c
new file mode 100644
index 0000000..775f1d0
--- /dev/null
+++ b/grub-core/efiemu/i386/nocfgtables.c
@@ -0,0 +1,30 @@
+/* Register SMBIOS and ACPI tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/acpi.h>
+
+grub_err_t
+grub_machine_efiemu_init_tables (void)
+{
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/efiemu/i386/pc/cfgtables.c b/grub-core/efiemu/i386/pc/cfgtables.c
new file mode 100644
index 0000000..7b6a40c
--- /dev/null
+++ b/grub-core/efiemu/i386/pc/cfgtables.c
@@ -0,0 +1,75 @@
+/* Register SMBIOS and ACPI tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/acpi.h>
+
+grub_err_t
+grub_machine_efiemu_init_tables (void)
+{
+ grub_uint8_t *ptr;
+ void *table;
+ grub_err_t err;
+ grub_efi_guid_t smbios = GRUB_EFI_SMBIOS_TABLE_GUID;
+ grub_efi_guid_t acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
+ grub_efi_guid_t acpi = GRUB_EFI_ACPI_TABLE_GUID;
+
+ err = grub_efiemu_unregister_configuration_table (smbios);
+ if (err)
+ return err;
+ err = grub_efiemu_unregister_configuration_table (acpi);
+ if (err)
+ return err;
+ err = grub_efiemu_unregister_configuration_table (acpi20);
+ if (err)
+ return err;
+
+ table = grub_acpi_get_rsdpv1 ();
+ if (table)
+ {
+ err = grub_efiemu_register_configuration_table (acpi, 0, 0, table);
+ if (err)
+ return err;
+ }
+ table = grub_acpi_get_rsdpv2 ();
+ if (table)
+ {
+ err = grub_efiemu_register_configuration_table (acpi20, 0, 0, table);
+ if (err)
+ return err;
+ }
+
+ for (ptr = (grub_uint8_t *) 0xf0000; ptr < (grub_uint8_t *) 0x100000;
+ ptr += 16)
+ if (grub_memcmp (ptr, "_SM_", 4) == 0
+ && grub_byte_checksum (ptr, *(ptr + 5)) == 0)
+ break;
+
+ if (ptr < (grub_uint8_t *) 0x100000)
+ {
+ grub_dprintf ("efiemu", "Registering SMBIOS\n");
+ if ((err = grub_efiemu_register_configuration_table (smbios, 0, 0, ptr)))
+ return err;
+ }
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/efiemu/loadcore.c b/grub-core/efiemu/loadcore.c
new file mode 100644
index 0000000..edadd45
--- /dev/null
+++ b/grub-core/efiemu/loadcore.c
@@ -0,0 +1,369 @@
+/* Load runtime image of EFIemu. Functions specific to 32/64-bit mode */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/cpu/efiemu.h>
+#include <grub/elf.h>
+
+/* ELF symbols and their values */
+static struct grub_efiemu_elf_sym *grub_efiemu_elfsyms = 0;
+static int grub_efiemu_nelfsyms = 0;
+
+/* Return the address of a section whose index is N. */
+static grub_err_t
+grub_efiemu_get_section_addr (grub_efiemu_segment_t segs, unsigned n,
+ int *handle, grub_off_t *off)
+{
+ grub_efiemu_segment_t seg;
+
+ for (seg = segs; seg; seg = seg->next)
+ if (seg->section == n)
+ {
+ *handle = seg->handle;
+ *off = seg->off;
+ return GRUB_ERR_NONE;
+ }
+
+ return grub_error (GRUB_ERR_BAD_OS, "section %d not found", n);
+}
+
+grub_err_t
+SUFFIX (grub_efiemu_loadcore_unload) (void)
+{
+ grub_free (grub_efiemu_elfsyms);
+ grub_efiemu_elfsyms = 0;
+ return GRUB_ERR_NONE;
+}
+
+/* Check if EHDR is a valid ELF header. */
+int
+SUFFIX (grub_efiemu_check_header) (void *ehdr, grub_size_t size)
+{
+ Elf_Ehdr *e = ehdr;
+
+ /* Check the header size. */
+ if (size < sizeof (Elf_Ehdr))
+ return 0;
+
+ /* Check the magic numbers. */
+ if (!SUFFIX (grub_arch_efiemu_check_header) (ehdr)
+ || e->e_ident[EI_MAG0] != ELFMAG0
+ || e->e_ident[EI_MAG1] != ELFMAG1
+ || e->e_ident[EI_MAG2] != ELFMAG2
+ || e->e_ident[EI_MAG3] != ELFMAG3
+ || e->e_ident[EI_VERSION] != EV_CURRENT
+ || e->e_version != EV_CURRENT)
+ return 0;
+
+ return 1;
+}
+
+/* Load all segments from memory specified by E. */
+static grub_err_t
+grub_efiemu_load_segments (grub_efiemu_segment_t segs, const Elf_Ehdr *e)
+{
+ Elf_Shdr *s;
+ grub_efiemu_segment_t cur;
+
+ grub_dprintf ("efiemu", "loading segments\n");
+
+ for (cur=segs; cur; cur = cur->next)
+ {
+ s = (Elf_Shdr *)cur->srcptr;
+
+ if ((s->sh_flags & SHF_ALLOC) && s->sh_size)
+ {
+ void *addr;
+
+ addr = (grub_uint8_t *) grub_efiemu_mm_obtain_request (cur->handle)
+ + cur->off;
+
+ switch (s->sh_type)
+ {
+ case SHT_PROGBITS:
+ grub_memcpy (addr, (char *) e + s->sh_offset, s->sh_size);
+ break;
+ case SHT_NOBITS:
+ grub_memset (addr, 0, s->sh_size);
+ break;
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* Get a string at offset OFFSET from strtab */
+static char *
+grub_efiemu_get_string (unsigned offset, const Elf_Ehdr *e)
+{
+ unsigned i;
+ Elf_Shdr *s;
+
+ for (i = 0, s = (Elf_Shdr *)((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *)((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_STRTAB && offset < s->sh_size)
+ return (char *) e + s->sh_offset + offset;
+ return 0;
+}
+
+/* Request memory for segments and fill segments info */
+static grub_err_t
+grub_efiemu_init_segments (grub_efiemu_segment_t *segs, const Elf_Ehdr *e)
+{
+ unsigned i;
+ Elf_Shdr *s;
+
+ for (i = 0, s = (Elf_Shdr *)((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *)((char *) s + e->e_shentsize))
+ {
+ if (s->sh_flags & SHF_ALLOC)
+ {
+ grub_efiemu_segment_t seg;
+ seg = (grub_efiemu_segment_t) grub_malloc (sizeof (*seg));
+ if (! seg)
+ return grub_errno;
+
+ if (s->sh_size)
+ {
+ seg->handle
+ = grub_efiemu_request_memalign
+ (s->sh_addralign, s->sh_size,
+ s->sh_flags & SHF_EXECINSTR ? GRUB_EFI_RUNTIME_SERVICES_CODE
+ : GRUB_EFI_RUNTIME_SERVICES_DATA);
+ if (seg->handle < 0)
+ return grub_errno;
+ seg->off = 0;
+ }
+
+ /*
+ .text-physical doesn't need to be relocated when switching to
+ virtual mode
+ */
+ if (!grub_strcmp (grub_efiemu_get_string (s->sh_name, e),
+ ".text-physical"))
+ seg->ptv_rel_needed = 0;
+ else
+ seg->ptv_rel_needed = 1;
+ seg->size = s->sh_size;
+ seg->section = i;
+ seg->next = *segs;
+ seg->srcptr = s;
+ *segs = seg;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* Count symbols and relocators and allocate/request memory for them */
+static grub_err_t
+grub_efiemu_count_symbols (const Elf_Ehdr *e)
+{
+ unsigned i;
+ Elf_Shdr *s;
+ int num = 0;
+
+ /* Symbols */
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_OS, "no symbol table");
+
+ grub_efiemu_nelfsyms = (unsigned) s->sh_size / (unsigned) s->sh_entsize;
+ grub_efiemu_elfsyms = (struct grub_efiemu_elf_sym *)
+ grub_malloc (sizeof (struct grub_efiemu_elf_sym) * grub_efiemu_nelfsyms);
+
+ /* Relocators */
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_REL || s->sh_type == SHT_RELA)
+ num += ((unsigned) s->sh_size) / ((unsigned) s->sh_entsize);
+
+ grub_efiemu_request_symbols (num);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Fill grub_efiemu_elfsyms with symbol values */
+static grub_err_t
+grub_efiemu_resolve_symbols (grub_efiemu_segment_t segs, Elf_Ehdr *e)
+{
+ unsigned i;
+ Elf_Shdr *s;
+ Elf_Sym *sym;
+ const char *str;
+ Elf_Word size, entsize;
+
+ grub_dprintf ("efiemu", "resolving symbols\n");
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_OS, "no symbol table");
+
+ sym = (Elf_Sym *) ((char *) e + s->sh_offset);
+ size = s->sh_size;
+ entsize = s->sh_entsize;
+
+ s = (Elf_Shdr *) ((char *) e + e->e_shoff + e->e_shentsize * s->sh_link);
+ str = (char *) e + s->sh_offset;
+
+ for (i = 0;
+ i < size / entsize;
+ i++, sym = (Elf_Sym *) ((char *) sym + entsize))
+ {
+ unsigned char type = ELF_ST_TYPE (sym->st_info);
+ unsigned char bind = ELF_ST_BIND (sym->st_info);
+ int handle;
+ grub_off_t off;
+ grub_err_t err;
+ const char *name = str + sym->st_name;
+ grub_efiemu_elfsyms[i].section = sym->st_shndx;
+ switch (type)
+ {
+ case STT_NOTYPE:
+ /* Resolve a global symbol. */
+ if (sym->st_name != 0 && sym->st_shndx == 0)
+ {
+ if ((err = grub_efiemu_resolve_symbol (name, &handle, &off)))
+ return err;
+ grub_efiemu_elfsyms[i].handle = handle;
+ grub_efiemu_elfsyms[i].off = off;
+ }
+ else
+ sym->st_value = 0;
+ break;
+
+ case STT_OBJECT:
+ if ((err = grub_efiemu_get_section_addr
+ (segs, sym->st_shndx, &handle, &off)))
+ return err;
+
+ off += sym->st_value;
+ if (bind != STB_LOCAL)
+ if ((err = grub_efiemu_register_symbol (name, handle, off)))
+ return err;
+ grub_efiemu_elfsyms[i].handle = handle;
+ grub_efiemu_elfsyms[i].off = off;
+ break;
+
+ case STT_FUNC:
+ if ((err = grub_efiemu_get_section_addr
+ (segs, sym->st_shndx, &handle, &off)))
+ return err;
+
+ off += sym->st_value;
+ if (bind != STB_LOCAL)
+ if ((err = grub_efiemu_register_symbol (name, handle, off)))
+ return err;
+ grub_efiemu_elfsyms[i].handle = handle;
+ grub_efiemu_elfsyms[i].off = off;
+ break;
+
+ case STT_SECTION:
+ if ((err = grub_efiemu_get_section_addr
+ (segs, sym->st_shndx, &handle, &off)))
+ {
+ grub_efiemu_elfsyms[i].handle = 0;
+ grub_efiemu_elfsyms[i].off = 0;
+ grub_errno = GRUB_ERR_NONE;
+ break;
+ }
+
+ grub_efiemu_elfsyms[i].handle = handle;
+ grub_efiemu_elfsyms[i].off = off;
+ break;
+
+ case STT_FILE:
+ grub_efiemu_elfsyms[i].handle = 0;
+ grub_efiemu_elfsyms[i].off = 0;
+ break;
+
+ default:
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "unknown symbol type `%d'", (int) type);
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* Load runtime to the memory and request memory for definitive location*/
+grub_err_t
+SUFFIX (grub_efiemu_loadcore_init) (void *core, grub_size_t core_size,
+ grub_efiemu_segment_t *segments)
+{
+ Elf_Ehdr *e = (Elf_Ehdr *) core;
+ grub_err_t err;
+
+ if (e->e_type != ET_REL)
+ return grub_error (GRUB_ERR_BAD_MODULE, "invalid ELF file type");
+
+ /* Make sure that every section is within the core. */
+ if ((grub_size_t) core_size < e->e_shoff + e->e_shentsize * e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_OS, "ELF sections outside core");
+
+ if ((err = grub_efiemu_init_segments (segments, core)))
+ return err;
+ if ((err = grub_efiemu_count_symbols (core)))
+ return err;
+
+ grub_efiemu_request_symbols (1);
+ return GRUB_ERR_NONE;
+}
+
+/* Load runtime definitively */
+grub_err_t
+SUFFIX (grub_efiemu_loadcore_load) (void *core,
+ grub_size_t core_size
+ __attribute__ ((unused)),
+ grub_efiemu_segment_t segments)
+{
+ grub_err_t err;
+ err = grub_efiemu_load_segments (segments, core);
+ if (err)
+ return err;
+
+ err = grub_efiemu_resolve_symbols (segments, core);
+ if (err)
+ return err;
+
+ err = SUFFIX (grub_arch_efiemu_relocate_symbols) (segments,
+ grub_efiemu_elfsyms,
+ core);
+ if (err)
+ return err;
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/efiemu/loadcore32.c b/grub-core/efiemu/loadcore32.c
new file mode 100644
index 0000000..c1e033b
--- /dev/null
+++ b/grub-core/efiemu/loadcore32.c
@@ -0,0 +1,22 @@
+/* This file contains definitions so that loadcore.c compiles for 32-bit */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define SUFFIX(x) x ## 32
+#define GRUB_TARGET_WORDSIZE 32
+#include "loadcore.c"
diff --git a/grub-core/efiemu/loadcore64.c b/grub-core/efiemu/loadcore64.c
new file mode 100644
index 0000000..ce7284f
--- /dev/null
+++ b/grub-core/efiemu/loadcore64.c
@@ -0,0 +1,22 @@
+/* This file contains definitions so that loadcore.c compiles for 64-bit */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define SUFFIX(x) x ## 64
+#define GRUB_TARGET_WORDSIZE 64
+#include "loadcore.c"
diff --git a/grub-core/efiemu/loadcore_common.c b/grub-core/efiemu/loadcore_common.c
new file mode 100644
index 0000000..a4db0ee
--- /dev/null
+++ b/grub-core/efiemu/loadcore_common.c
@@ -0,0 +1,189 @@
+/* Load runtime image of EFIemu. Functions common to 32/64-bit mode */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/cpu/efiemu.h>
+
+/* Are we in 32 or 64-bit mode?*/
+static grub_efiemu_mode_t grub_efiemu_mode = GRUB_EFIEMU_NOTLOADED;
+/* Runtime ELF file */
+static grub_ssize_t efiemu_core_size;
+static void *efiemu_core = 0;
+/* Linked list of segments */
+static grub_efiemu_segment_t efiemu_segments = 0;
+
+/* equivalent to sizeof (grub_efi_uintn_t) but taking the mode into account*/
+int
+grub_efiemu_sizeof_uintn_t (void)
+{
+ if (grub_efiemu_mode == GRUB_EFIEMU32)
+ return 4;
+ if (grub_efiemu_mode == GRUB_EFIEMU64)
+ return 8;
+ return 0;
+}
+
+/* Check the header and set mode */
+static grub_err_t
+grub_efiemu_check_header (void *ehdr, grub_size_t size,
+ grub_efiemu_mode_t *mode)
+{
+ /* Check the magic numbers. */
+ if ((*mode == GRUB_EFIEMU_NOTLOADED || *mode == GRUB_EFIEMU32)
+ && grub_efiemu_check_header32 (ehdr,size))
+ {
+ *mode = GRUB_EFIEMU32;
+ return GRUB_ERR_NONE;
+ }
+ if ((*mode == GRUB_EFIEMU_NOTLOADED || *mode == GRUB_EFIEMU64)
+ && grub_efiemu_check_header64 (ehdr,size))
+ {
+ *mode = GRUB_EFIEMU64;
+ return GRUB_ERR_NONE;
+ }
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF magic");
+}
+
+/* Unload segments */
+static int
+grub_efiemu_unload_segs (grub_efiemu_segment_t seg)
+{
+ grub_efiemu_segment_t segn;
+ for (; seg; seg = segn)
+ {
+ segn = seg->next;
+ grub_efiemu_mm_return_request (seg->handle);
+ grub_free (seg);
+ }
+ return 1;
+}
+
+
+grub_err_t
+grub_efiemu_loadcore_unload(void)
+{
+ switch (grub_efiemu_mode)
+ {
+ case GRUB_EFIEMU32:
+ grub_efiemu_loadcore_unload32 ();
+ break;
+
+ case GRUB_EFIEMU64:
+ grub_efiemu_loadcore_unload64 ();
+ break;
+
+ default:
+ break;
+ }
+
+ grub_efiemu_mode = GRUB_EFIEMU_NOTLOADED;
+
+ grub_free (efiemu_core);
+ efiemu_core = 0;
+
+ grub_efiemu_unload_segs (efiemu_segments);
+ efiemu_segments = 0;
+
+ grub_efiemu_free_syms ();
+
+ return GRUB_ERR_NONE;
+}
+
+/* Load runtime file and do some initial preparations */
+grub_err_t
+grub_efiemu_loadcore_init (grub_file_t file)
+{
+ grub_err_t err;
+
+ efiemu_core_size = grub_file_size (file);
+ efiemu_core = 0;
+ efiemu_core = grub_malloc (efiemu_core_size);
+ if (! efiemu_core)
+ return grub_errno;
+
+ if (grub_file_read (file, efiemu_core, efiemu_core_size)
+ != (int) efiemu_core_size)
+ {
+ grub_free (efiemu_core);
+ efiemu_core = 0;
+ return grub_errno;
+ }
+
+ if (grub_efiemu_check_header (efiemu_core, efiemu_core_size,
+ &grub_efiemu_mode))
+ {
+ grub_free (efiemu_core);
+ efiemu_core = 0;
+ return GRUB_ERR_BAD_MODULE;
+ }
+
+ switch (grub_efiemu_mode)
+ {
+ case GRUB_EFIEMU32:
+ if ((err = grub_efiemu_loadcore_init32 (efiemu_core, efiemu_core_size,
+ &efiemu_segments)))
+ {
+ grub_free (efiemu_core);
+ efiemu_core = 0;
+ grub_efiemu_mode = GRUB_EFIEMU_NOTLOADED;
+ return err;
+ }
+ break;
+
+ case GRUB_EFIEMU64:
+ if ((err = grub_efiemu_loadcore_init64 (efiemu_core, efiemu_core_size,
+ &efiemu_segments)))
+ {
+ grub_free (efiemu_core);
+ efiemu_core = 0;
+ grub_efiemu_mode = GRUB_EFIEMU_NOTLOADED;
+ return err;
+ }
+ break;
+
+ default:
+ return grub_error (GRUB_ERR_BAD_OS, "unknown EFI runtime");
+ }
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_efiemu_loadcore_load (void)
+{
+ grub_err_t err;
+ switch (grub_efiemu_mode)
+ {
+ case GRUB_EFIEMU32:
+ if ((err = grub_efiemu_loadcore_load32 (efiemu_core, efiemu_core_size,
+ efiemu_segments)))
+ grub_efiemu_loadcore_unload ();
+ return err;
+ case GRUB_EFIEMU64:
+ if ((err = grub_efiemu_loadcore_load64 (efiemu_core, efiemu_core_size,
+ efiemu_segments)))
+ grub_efiemu_loadcore_unload ();
+ return err;
+ default:
+ return grub_error (GRUB_ERR_BAD_OS, "unknown EFI runtime");
+ }
+}
diff --git a/grub-core/efiemu/main.c b/grub-core/efiemu/main.c
new file mode 100644
index 0000000..7ad3abb
--- /dev/null
+++ b/grub-core/efiemu/main.c
@@ -0,0 +1,334 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* This is an emulation of EFI runtime services.
+ This allows a more uniform boot on i386 machines.
+ As it emulates only runtime service it isn't able
+ to chainload EFI bootloader on non-EFI system. */
+
+
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/normal.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* System table. Two version depending on mode */
+grub_efi_system_table32_t *grub_efiemu_system_table32 = 0;
+grub_efi_system_table64_t *grub_efiemu_system_table64 = 0;
+/* Modules may need to execute some actions after memory allocation happens */
+static struct grub_efiemu_prepare_hook *efiemu_prepare_hooks = 0;
+/* Linked list of configuration tables */
+static struct grub_efiemu_configuration_table *efiemu_config_tables = 0;
+static int prepared = 0;
+
+/* Free all allocated space */
+grub_err_t
+grub_efiemu_unload (void)
+{
+ struct grub_efiemu_configuration_table *cur, *d;
+ struct grub_efiemu_prepare_hook *curhook, *d2;
+ grub_efiemu_loadcore_unload ();
+
+ grub_efiemu_mm_unload ();
+
+ for (cur = efiemu_config_tables; cur;)
+ {
+ d = cur->next;
+ if (cur->unload)
+ cur->unload (cur->data);
+ grub_free (cur);
+ cur = d;
+ }
+ efiemu_config_tables = 0;
+
+ for (curhook = efiemu_prepare_hooks; curhook;)
+ {
+ d2 = curhook->next;
+ if (curhook->unload)
+ curhook->unload (curhook->data);
+ grub_free (curhook);
+ curhook = d2;
+ }
+ efiemu_prepare_hooks = 0;
+
+ prepared = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Remove previously registered table from the list */
+grub_err_t
+grub_efiemu_unregister_configuration_table (grub_efi_guid_t guid)
+{
+ struct grub_efiemu_configuration_table *cur, *prev;
+
+ /* Special treating if head is to remove */
+ while (efiemu_config_tables
+ && !grub_memcmp (&(efiemu_config_tables->guid), &guid, sizeof (guid)))
+ {
+ if (efiemu_config_tables->unload)
+ efiemu_config_tables->unload (efiemu_config_tables->data);
+ cur = efiemu_config_tables->next;
+ grub_free (efiemu_config_tables);
+ efiemu_config_tables = cur;
+ }
+ if (!efiemu_config_tables)
+ return GRUB_ERR_NONE;
+
+ /* Remove from chain */
+ for (prev = efiemu_config_tables, cur = prev->next; cur;)
+ if (grub_memcmp (&(cur->guid), &guid, sizeof (guid)) == 0)
+ {
+ if (cur->unload)
+ cur->unload (cur->data);
+ prev->next = cur->next;
+ grub_free (cur);
+ cur = prev->next;
+ }
+ else
+ {
+ prev = cur;
+ cur = cur->next;
+ }
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_efiemu_register_prepare_hook (grub_err_t (*hook) (void *data),
+ void (*unload) (void *data),
+ void *data)
+{
+ struct grub_efiemu_prepare_hook *nhook;
+ if (! hook)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "you must supply the hook");
+ nhook = (struct grub_efiemu_prepare_hook *) grub_malloc (sizeof (*nhook));
+ if (! nhook)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't prepare hook");
+ nhook->hook = hook;
+ nhook->unload = unload;
+ nhook->data = data;
+ nhook->next = efiemu_prepare_hooks;
+ efiemu_prepare_hooks = nhook;
+ return GRUB_ERR_NONE;
+}
+
+/* Register a configuration table either supplying the address directly
+ or with a hook
+*/
+grub_err_t
+grub_efiemu_register_configuration_table (grub_efi_guid_t guid,
+ void * (*get_table) (void *data),
+ void (*unload) (void *data),
+ void *data)
+{
+ struct grub_efiemu_configuration_table *tbl;
+ grub_err_t err;
+
+ if (! get_table && ! data)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "you must set at least get_table or data");
+ if ((err = grub_efiemu_unregister_configuration_table (guid)))
+ return err;
+
+ tbl = (struct grub_efiemu_configuration_table *) grub_malloc (sizeof (*tbl));
+ if (! tbl)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't register table");
+
+ tbl->guid = guid;
+ tbl->get_table = get_table;
+ tbl->unload = unload;
+ tbl->data = data;
+ tbl->next = efiemu_config_tables;
+ efiemu_config_tables = tbl;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_efiemu_unload (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *args[] __attribute__ ((unused)))
+{
+ return grub_efiemu_unload ();
+}
+
+static grub_err_t
+grub_cmd_efiemu_prepare (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *args[] __attribute__ ((unused)))
+{
+ return grub_efiemu_prepare ();
+}
+
+
+
+/* Load the runtime from the file FILENAME. */
+static grub_err_t
+grub_efiemu_load_file (const char *filename)
+{
+ grub_file_t file;
+ grub_err_t err;
+
+ file = grub_file_open (filename);
+ if (! file)
+ return grub_errno;
+
+ err = grub_efiemu_mm_init ();
+ if (err)
+ {
+ grub_file_close (file);
+ grub_efiemu_unload ();
+ return grub_error (grub_errno, "couldn't init memory management");
+ }
+
+ grub_dprintf ("efiemu", "mm initialized\n");
+
+ err = grub_efiemu_loadcore_init (file);
+ if (err)
+ {
+ grub_file_close (file);
+ grub_efiemu_unload ();
+ return err;
+ }
+
+ grub_file_close (file);
+
+ /* For configuration tables entry in system table. */
+ grub_efiemu_request_symbols (1);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_efiemu_autocore (void)
+{
+ const char *prefix;
+ char *filename;
+ char *suffix;
+ grub_err_t err;
+
+ if (grub_efiemu_sizeof_uintn_t () != 0)
+ return GRUB_ERR_NONE;
+
+ prefix = grub_env_get ("prefix");
+
+ if (! prefix)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "couldn't find efiemu core because prefix "
+ "isn't set");
+
+ suffix = grub_efiemu_get_default_core_name ();
+
+ filename = grub_xasprintf ("%s/%s", prefix, suffix);
+ if (! filename)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate temporary space");
+
+
+ err = grub_efiemu_load_file (filename);
+ grub_free (filename);
+ if (err)
+ return err;
+#ifndef GRUB_MACHINE_EMU
+ err = grub_machine_efiemu_init_tables ();
+ if (err)
+ return err;
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_efiemu_prepare (void)
+{
+ grub_err_t err;
+
+ if (prepared)
+ return GRUB_ERR_NONE;
+
+ err = grub_efiemu_autocore ();
+ if (err)
+ return err;
+
+ grub_dprintf ("efiemu", "Preparing %d-bit efiemu\n",
+ 8 * grub_efiemu_sizeof_uintn_t ());
+
+ /* Create NVRAM. */
+ grub_efiemu_pnvram ();
+
+ prepared = 1;
+
+ if (grub_efiemu_sizeof_uintn_t () == 4)
+ return grub_efiemu_prepare32 (efiemu_prepare_hooks, efiemu_config_tables);
+ else
+ return grub_efiemu_prepare64 (efiemu_prepare_hooks, efiemu_config_tables);
+}
+
+
+static grub_err_t
+grub_cmd_efiemu_load (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_err_t err;
+
+ grub_efiemu_unload ();
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "filename required");
+
+ err = grub_efiemu_load_file (args[0]);
+ if (err)
+ return err;
+#ifndef GRUB_MACHINE_EMU
+ err = grub_machine_efiemu_init_tables ();
+ if (err)
+ return err;
+#endif
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd_loadcore, cmd_prepare, cmd_unload;
+
+GRUB_MOD_INIT(efiemu)
+{
+ cmd_loadcore = grub_register_command ("efiemu_loadcore",
+ grub_cmd_efiemu_load,
+ N_("FILE"),
+ N_("Load and initialize EFI emulator."));
+ cmd_prepare = grub_register_command ("efiemu_prepare",
+ grub_cmd_efiemu_prepare,
+ 0,
+ N_("Finalize loading of EFI emulator."));
+ cmd_unload = grub_register_command ("efiemu_unload", grub_cmd_efiemu_unload,
+ 0,
+ N_("Unload EFI emulator."));
+}
+
+GRUB_MOD_FINI(efiemu)
+{
+ grub_unregister_command (cmd_loadcore);
+ grub_unregister_command (cmd_prepare);
+ grub_unregister_command (cmd_unload);
+}
diff --git a/grub-core/efiemu/mm.c b/grub-core/efiemu/mm.c
new file mode 100644
index 0000000..3c1dc29
--- /dev/null
+++ b/grub-core/efiemu/mm.c
@@ -0,0 +1,652 @@
+/* Memory management for efiemu */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ To keep efiemu runtime contiguous this mm is special.
+ It uses deferred allocation.
+ In the first stage you may request memory with grub_efiemu_request_memalign
+ It will give you a handle with which in the second phase you can access your
+ memory with grub_efiemu_mm_obtain_request (handle). It's guaranteed that
+ subsequent calls with the same handle return the same result. You can't request any additional memory once you're in the second phase
+*/
+
+#include <grub/err.h>
+#include <grub/normal.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/memory.h>
+
+struct grub_efiemu_memrequest
+{
+ struct grub_efiemu_memrequest *next;
+ grub_efi_memory_type_t type;
+ grub_size_t size;
+ grub_size_t align_overhead;
+ int handle;
+ void *val;
+};
+/* Linked list of requested memory. */
+static struct grub_efiemu_memrequest *memrequests = 0;
+/* Memory map. */
+static grub_efi_memory_descriptor_t *efiemu_mmap = 0;
+/* Pointer to allocated memory */
+static void *resident_memory = 0;
+/* Size of requested memory per type */
+static grub_size_t requested_memory[GRUB_EFI_MAX_MEMORY_TYPE];
+/* How many slots is allocated for memory_map and how many are already used */
+static int mmap_reserved_size = 0, mmap_num = 0;
+
+/* Add a memory region to map*/
+static grub_err_t
+grub_efiemu_add_to_mmap (grub_uint64_t start, grub_uint64_t size,
+ grub_efi_memory_type_t type)
+{
+ grub_uint64_t page_start, npages;
+
+ /* Extend map if necessary*/
+ if (mmap_num >= mmap_reserved_size)
+ {
+ efiemu_mmap = (grub_efi_memory_descriptor_t *)
+ grub_realloc (efiemu_mmap, (++mmap_reserved_size)
+ * sizeof (grub_efi_memory_descriptor_t));
+ if (!efiemu_mmap)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "not enough space for memory map");
+ }
+
+ /* Fill slot*/
+ page_start = start - (start % GRUB_EFIEMU_PAGESIZE);
+ npages = (size + (start % GRUB_EFIEMU_PAGESIZE) + GRUB_EFIEMU_PAGESIZE - 1)
+ / GRUB_EFIEMU_PAGESIZE;
+ efiemu_mmap[mmap_num].physical_start = page_start;
+ efiemu_mmap[mmap_num].virtual_start = page_start;
+ efiemu_mmap[mmap_num].num_pages = npages;
+ efiemu_mmap[mmap_num].type = type;
+ mmap_num++;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Request a resident memory of type TYPE of size SIZE aligned at ALIGN
+ ALIGN must be a divisor of page size (if it's a divisor of 4096
+ it should be ok on all platforms)
+ */
+int
+grub_efiemu_request_memalign (grub_size_t align, grub_size_t size,
+ grub_efi_memory_type_t type)
+{
+ grub_size_t align_overhead;
+ struct grub_efiemu_memrequest *ret, *cur, *prev;
+ /* Check that the request is correct */
+ if (type >= GRUB_EFI_MAX_MEMORY_TYPE || type <= GRUB_EFI_LOADER_CODE)
+ return -2;
+
+ /* Add new size to requested size */
+ align_overhead = align - (requested_memory[type]%align);
+ if (align_overhead == align)
+ align_overhead = 0;
+ requested_memory[type] += align_overhead + size;
+
+ /* Remember the request */
+ ret = grub_zalloc (sizeof (*ret));
+ if (!ret)
+ return -1;
+ ret->type = type;
+ ret->size = size;
+ ret->align_overhead = align_overhead;
+ prev = 0;
+
+ /* Add request to the end of the chain.
+ It should be at the end because otherwise alignment isn't guaranteed */
+ for (cur = memrequests; cur; prev = cur, cur = cur->next);
+ if (prev)
+ {
+ ret->handle = prev->handle + 1;
+ prev->next = ret;
+ }
+ else
+ {
+ ret->handle = 1; /* Avoid 0 handle*/
+ memrequests = ret;
+ }
+ return ret->handle;
+}
+
+/* Really allocate the memory */
+static grub_err_t
+efiemu_alloc_requests (void)
+{
+ grub_size_t align_overhead = 0;
+ grub_uint8_t *curptr, *typestart;
+ struct grub_efiemu_memrequest *cur;
+ grub_size_t total_alloc = 0;
+ unsigned i;
+ /* Order of memory regions */
+ grub_efi_memory_type_t reqorder[] =
+ {
+ /* First come regions usable by OS*/
+ GRUB_EFI_LOADER_CODE,
+ GRUB_EFI_LOADER_DATA,
+ GRUB_EFI_BOOT_SERVICES_CODE,
+ GRUB_EFI_BOOT_SERVICES_DATA,
+ GRUB_EFI_CONVENTIONAL_MEMORY,
+ GRUB_EFI_ACPI_RECLAIM_MEMORY,
+
+ /* Then memory used by runtime */
+ /* This way all our regions are in a single block */
+ GRUB_EFI_RUNTIME_SERVICES_CODE,
+ GRUB_EFI_RUNTIME_SERVICES_DATA,
+ GRUB_EFI_ACPI_MEMORY_NVS,
+
+ /* And then unavailable memory types. This is more for a completeness.
+ You should double think before allocating memory of any of these types
+ */
+ GRUB_EFI_UNUSABLE_MEMORY,
+ GRUB_EFI_MEMORY_MAPPED_IO,
+ GRUB_EFI_MEMORY_MAPPED_IO_PORT_SPACE,
+ GRUB_EFI_PAL_CODE
+ };
+
+ /* Compute total memory needed */
+ for (i = 0; i < sizeof (reqorder) / sizeof (reqorder[0]); i++)
+ {
+ align_overhead = GRUB_EFIEMU_PAGESIZE
+ - (requested_memory[reqorder[i]] % GRUB_EFIEMU_PAGESIZE);
+ if (align_overhead == GRUB_EFIEMU_PAGESIZE)
+ align_overhead = 0;
+ total_alloc += requested_memory[reqorder[i]] + align_overhead;
+ }
+
+ /* Allocate the whole memory in one block */
+ resident_memory = grub_memalign (GRUB_EFIEMU_PAGESIZE, total_alloc);
+ if (!resident_memory)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate resident memory");
+
+ /* Split the memory into blocks by type */
+ curptr = resident_memory;
+ for (i = 0; i < sizeof (reqorder) / sizeof (reqorder[0]); i++)
+ {
+ if (!requested_memory[reqorder[i]])
+ continue;
+ typestart = curptr;
+
+ /* Write pointers to requests */
+ for (cur = memrequests; cur; cur = cur->next)
+ if (cur->type == reqorder[i])
+ {
+ curptr = ((grub_uint8_t *)curptr) + cur->align_overhead;
+ cur->val = curptr;
+ curptr = ((grub_uint8_t *)curptr) + cur->size;
+ }
+
+ /* Ensure that the regions are page-aligned */
+ align_overhead = GRUB_EFIEMU_PAGESIZE
+ - (requested_memory[reqorder[i]] % GRUB_EFIEMU_PAGESIZE);
+ if (align_overhead == GRUB_EFIEMU_PAGESIZE)
+ align_overhead = 0;
+ curptr = ((grub_uint8_t *)curptr) + align_overhead;
+
+ /* Add the region to memory map */
+ grub_efiemu_add_to_mmap (PTR_TO_UINT64 (typestart),
+ curptr - typestart, reqorder[i]);
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* Get a pointer to requested memory from handle */
+void *
+grub_efiemu_mm_obtain_request (int handle)
+{
+ struct grub_efiemu_memrequest *cur;
+ for (cur = memrequests; cur; cur = cur->next)
+ if (cur->handle == handle)
+ return cur->val;
+ return 0;
+}
+
+/* Get type of requested memory by handle */
+grub_efi_memory_type_t
+grub_efiemu_mm_get_type (int handle)
+{
+ struct grub_efiemu_memrequest *cur;
+ for (cur = memrequests; cur; cur = cur->next)
+ if (cur->handle == handle)
+ return cur->type;
+ return 0;
+}
+
+/* Free a request */
+void
+grub_efiemu_mm_return_request (int handle)
+{
+ struct grub_efiemu_memrequest *cur, *prev;
+
+ /* Remove head if necessary */
+ while (memrequests && memrequests->handle == handle)
+ {
+ cur = memrequests->next;
+ grub_free (memrequests);
+ memrequests = cur;
+ }
+ if (!memrequests)
+ return;
+
+ /* Remove request from a middle of chain*/
+ for (prev = memrequests, cur = prev->next; cur;)
+ if (cur->handle == handle)
+ {
+ prev->next = cur->next;
+ grub_free (cur);
+ cur = prev->next;
+ }
+ else
+ {
+ prev = cur;
+ cur = prev->next;
+ }
+}
+
+/* Reserve space for memory map */
+static grub_err_t
+grub_efiemu_mmap_init (void)
+{
+ auto int NESTED_FUNC_ATTR bounds_hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR bounds_hook (grub_uint64_t addr __attribute__ ((unused)),
+ grub_uint64_t size __attribute__ ((unused)),
+ grub_memory_type_t type
+ __attribute__ ((unused)))
+ {
+ mmap_reserved_size++;
+ return 0;
+ }
+
+ // the place for memory used by efiemu itself
+ mmap_reserved_size = GRUB_EFI_MAX_MEMORY_TYPE + 1;
+
+#ifndef GRUB_MACHINE_EMU
+ grub_machine_mmap_iterate (bounds_hook);
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+/* This is a drop-in replacement of grub_efi_get_memory_map */
+/* Get the memory map as defined in the EFI spec. Return 1 if successful,
+ return 0 if partial, or return -1 if an error occurs. */
+int
+grub_efiemu_get_memory_map (grub_efi_uintn_t *memory_map_size,
+ grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_uintn_t *map_key,
+ grub_efi_uintn_t *descriptor_size,
+ grub_efi_uint32_t *descriptor_version)
+{
+ if (!efiemu_mmap)
+ {
+ grub_error (GRUB_ERR_INVALID_COMMAND,
+ "you need to first launch efiemu_prepare");
+ return -1;
+ }
+
+ if (*memory_map_size < mmap_num * sizeof (grub_efi_memory_descriptor_t))
+ {
+ *memory_map_size = mmap_num * sizeof (grub_efi_memory_descriptor_t);
+ return 0;
+ }
+
+ *memory_map_size = mmap_num * sizeof (grub_efi_memory_descriptor_t);
+ grub_memcpy (memory_map, efiemu_mmap, *memory_map_size);
+ if (descriptor_size)
+ *descriptor_size = sizeof (grub_efi_memory_descriptor_t);
+ if (descriptor_version)
+ *descriptor_version = 1;
+ if (map_key)
+ *map_key = 0;
+
+ return 1;
+}
+
+grub_err_t
+grub_efiemu_finish_boot_services (grub_efi_uintn_t *memory_map_size,
+ grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_uintn_t *map_key,
+ grub_efi_uintn_t *descriptor_size,
+ grub_efi_uint32_t *descriptor_version)
+{
+ int val = grub_efiemu_get_memory_map (memory_map_size,
+ memory_map, map_key,
+ descriptor_size,
+ descriptor_version);
+ if (val == 1)
+ return GRUB_ERR_NONE;
+ if (val == -1)
+ return grub_errno;
+ return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
+}
+
+
+/* Free everything */
+grub_err_t
+grub_efiemu_mm_unload (void)
+{
+ struct grub_efiemu_memrequest *cur, *d;
+ for (cur = memrequests; cur;)
+ {
+ d = cur->next;
+ grub_free (cur);
+ cur = d;
+ }
+ memrequests = 0;
+ grub_memset (&requested_memory, 0, sizeof (requested_memory));
+ grub_free (resident_memory);
+ resident_memory = 0;
+ grub_free (efiemu_mmap);
+ efiemu_mmap = 0;
+ mmap_reserved_size = mmap_num = 0;
+ return GRUB_ERR_NONE;
+}
+
+/* This function should be called before doing any requests */
+grub_err_t
+grub_efiemu_mm_init (void)
+{
+ grub_err_t err;
+
+ err = grub_efiemu_mm_unload ();
+ if (err)
+ return err;
+
+ grub_efiemu_mmap_init ();
+
+ return GRUB_ERR_NONE;
+}
+
+/* Copy host memory map */
+static grub_err_t
+grub_efiemu_mmap_fill (void)
+{
+ auto int NESTED_FUNC_ATTR fill_hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR fill_hook (grub_uint64_t addr,
+ grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ switch (type)
+ {
+ case GRUB_MEMORY_AVAILABLE:
+ return grub_efiemu_add_to_mmap (addr, size,
+ GRUB_EFI_CONVENTIONAL_MEMORY);
+
+ case GRUB_MEMORY_ACPI:
+ return grub_efiemu_add_to_mmap (addr, size,
+ GRUB_EFI_ACPI_RECLAIM_MEMORY);
+
+ case GRUB_MEMORY_NVS:
+ return grub_efiemu_add_to_mmap (addr, size,
+ GRUB_EFI_ACPI_MEMORY_NVS);
+
+ default:
+ grub_printf ("Unknown memory type %d. Assuming unusable\n", type);
+ case GRUB_MEMORY_RESERVED:
+ return grub_efiemu_add_to_mmap (addr, size,
+ GRUB_EFI_UNUSABLE_MEMORY);
+ }
+ }
+
+#ifndef GRUB_MACHINE_EMU
+ grub_machine_mmap_iterate (fill_hook);
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_efiemu_mmap_iterate (grub_memory_hook_t hook)
+{
+ unsigned i;
+
+ for (i = 0; i < (unsigned) mmap_num; i++)
+ switch (efiemu_mmap[i].type)
+ {
+ case GRUB_EFI_RUNTIME_SERVICES_CODE:
+ hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
+ GRUB_MEMORY_CODE);
+ break;
+
+ case GRUB_EFI_UNUSABLE_MEMORY:
+ hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
+ GRUB_MEMORY_BADRAM);
+ break;
+
+ case GRUB_EFI_RESERVED_MEMORY_TYPE:
+ case GRUB_EFI_RUNTIME_SERVICES_DATA:
+ case GRUB_EFI_MEMORY_MAPPED_IO:
+ case GRUB_EFI_MEMORY_MAPPED_IO_PORT_SPACE:
+ case GRUB_EFI_PAL_CODE:
+ case GRUB_EFI_MAX_MEMORY_TYPE:
+ hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
+ GRUB_MEMORY_RESERVED);
+ break;
+
+ case GRUB_EFI_LOADER_CODE:
+ case GRUB_EFI_LOADER_DATA:
+ case GRUB_EFI_BOOT_SERVICES_CODE:
+ case GRUB_EFI_BOOT_SERVICES_DATA:
+ case GRUB_EFI_CONVENTIONAL_MEMORY:
+ hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
+ GRUB_MEMORY_AVAILABLE);
+ break;
+
+ case GRUB_EFI_ACPI_RECLAIM_MEMORY:
+ hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
+ GRUB_MEMORY_ACPI);
+ break;
+
+ case GRUB_EFI_ACPI_MEMORY_NVS:
+ hook (efiemu_mmap[i].physical_start, efiemu_mmap[i].num_pages * 4096,
+ GRUB_MEMORY_NVS);
+ break;
+ }
+
+ return 0;
+}
+
+
+/* This function resolves overlapping regions and sorts the memory map
+ It uses scanline (sweeping) algorithm
+ */
+static grub_err_t
+grub_efiemu_mmap_sort_and_uniq (void)
+{
+ /* If same page is used by multiple types it's resolved
+ according to priority
+ 0 - free memory
+ 1 - memory immediately usable after ExitBootServices
+ 2 - memory usable after loading ACPI tables
+ 3 - efiemu memory
+ 4 - unusable memory
+ */
+ int priority[GRUB_EFI_MAX_MEMORY_TYPE] =
+ {
+ [GRUB_EFI_RESERVED_MEMORY_TYPE] = 4,
+ [GRUB_EFI_LOADER_CODE] = 1,
+ [GRUB_EFI_LOADER_DATA] = 1,
+ [GRUB_EFI_BOOT_SERVICES_CODE] = 1,
+ [GRUB_EFI_BOOT_SERVICES_DATA] = 1,
+ [GRUB_EFI_RUNTIME_SERVICES_CODE] = 3,
+ [GRUB_EFI_RUNTIME_SERVICES_DATA] = 3,
+ [GRUB_EFI_CONVENTIONAL_MEMORY] = 0,
+ [GRUB_EFI_UNUSABLE_MEMORY] = 4,
+ [GRUB_EFI_ACPI_RECLAIM_MEMORY] = 2,
+ [GRUB_EFI_ACPI_MEMORY_NVS] = 3,
+ [GRUB_EFI_MEMORY_MAPPED_IO] = 4,
+ [GRUB_EFI_MEMORY_MAPPED_IO_PORT_SPACE] = 4,
+ [GRUB_EFI_PAL_CODE] = 4
+ };
+
+ int i, j, k, done;
+
+ /* Scanline events */
+ struct grub_efiemu_mmap_scan
+ {
+ /* At which memory address*/
+ grub_uint64_t pos;
+ /* 0 = region starts, 1 = region ends */
+ int type;
+ /* Which type of memory region */
+ grub_efi_memory_type_t memtype;
+ };
+ struct grub_efiemu_mmap_scan *scanline_events;
+ struct grub_efiemu_mmap_scan t;
+
+ /* Previous scanline event */
+ grub_uint64_t lastaddr;
+ int lasttype;
+ /* Current scanline event */
+ int curtype;
+ /* how many regions of given type overlap at current location */
+ int present[GRUB_EFI_MAX_MEMORY_TYPE];
+ /* Here is stored the resulting memory map*/
+ grub_efi_memory_descriptor_t *result;
+
+ /* Initialize variables*/
+ grub_memset (present, 0, sizeof (int) * GRUB_EFI_MAX_MEMORY_TYPE);
+ scanline_events = (struct grub_efiemu_mmap_scan *)
+ grub_malloc (sizeof (struct grub_efiemu_mmap_scan) * 2 * mmap_num);
+
+ /* Number of chunks can't increase more than by factor of 2 */
+ result = (grub_efi_memory_descriptor_t *)
+ grub_malloc (sizeof (grub_efi_memory_descriptor_t) * 2 * mmap_num);
+ if (!result || !scanline_events)
+ {
+ grub_free (result);
+ grub_free (scanline_events);
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate space for new memory map");
+ }
+
+ /* Register scanline events */
+ for (i = 0; i < mmap_num; i++)
+ {
+ scanline_events[2 * i].pos = efiemu_mmap[i].physical_start;
+ scanline_events[2 * i].type = 0;
+ scanline_events[2 * i].memtype = efiemu_mmap[i].type;
+ scanline_events[2 * i + 1].pos = efiemu_mmap[i].physical_start
+ + efiemu_mmap[i].num_pages * GRUB_EFIEMU_PAGESIZE;
+ scanline_events[2 * i + 1].type = 1;
+ scanline_events[2 * i + 1].memtype = efiemu_mmap[i].type;
+ }
+
+ /* Primitive bubble sort. It has complexity O(n^2) but since we're
+ unlikely to have more than 100 chunks it's probably one of the
+ fastest for one purpose */
+ done = 1;
+ while (done)
+ {
+ done = 0;
+ for (i = 0; i < 2 * mmap_num - 1; i++)
+ if (scanline_events[i + 1].pos < scanline_events[i].pos)
+ {
+ t = scanline_events[i + 1];
+ scanline_events[i + 1] = scanline_events[i];
+ scanline_events[i] = t;
+ done = 1;
+ }
+ }
+
+ /* Pointer in resulting memory map */
+ j = 0;
+ lastaddr = scanline_events[0].pos;
+ lasttype = scanline_events[0].memtype;
+ for (i = 0; i < 2 * mmap_num; i++)
+ {
+ /* Process event */
+ if (scanline_events[i].type)
+ present[scanline_events[i].memtype]--;
+ else
+ present[scanline_events[i].memtype]++;
+
+ /* Determine current region type */
+ curtype = -1;
+ for (k = 0; k < GRUB_EFI_MAX_MEMORY_TYPE; k++)
+ if (present[k] && (curtype == -1 || priority[k] > priority[curtype]))
+ curtype = k;
+
+ /* Add memory region to resulting map if necessary */
+ if ((curtype == -1 || curtype != lasttype)
+ && lastaddr != scanline_events[i].pos
+ && lasttype != -1)
+ {
+ result[j].virtual_start = result[j].physical_start = lastaddr;
+ result[j].num_pages = (scanline_events[i].pos - lastaddr)
+ / GRUB_EFIEMU_PAGESIZE;
+ result[j].type = lasttype;
+
+ /* We set runtime attribute on pages we need to be mapped */
+ result[j].attribute
+ = (lasttype == GRUB_EFI_RUNTIME_SERVICES_CODE
+ || lasttype == GRUB_EFI_RUNTIME_SERVICES_DATA)
+ ? GRUB_EFI_MEMORY_RUNTIME : 0;
+ grub_dprintf ("efiemu",
+ "mmap entry: type %d start 0x%llx 0x%llx pages\n",
+ result[j].type,
+ result[j].physical_start, result[j].num_pages);
+ j++;
+ }
+
+ /* Update last values if necessary */
+ if (curtype == -1 || curtype != lasttype)
+ {
+ lasttype = curtype;
+ lastaddr = scanline_events[i].pos;
+ }
+ }
+
+ grub_free (scanline_events);
+
+ /* Shrink resulting memory map to really used size and replace efiemu_mmap
+ by new value */
+ grub_free (efiemu_mmap);
+ efiemu_mmap = grub_realloc (result, j * sizeof (*result));
+ return GRUB_ERR_NONE;
+}
+
+/* This function is called to switch from first to second phase */
+grub_err_t
+grub_efiemu_mm_do_alloc (void)
+{
+ grub_err_t err;
+
+ /* Preallocate mmap */
+ efiemu_mmap = (grub_efi_memory_descriptor_t *)
+ grub_malloc (mmap_reserved_size * sizeof (grub_efi_memory_descriptor_t));
+ if (!efiemu_mmap)
+ {
+ grub_efiemu_unload ();
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't initialize mmap");
+ }
+
+ if ((err = efiemu_alloc_requests ()))
+ return err;
+ if ((err = grub_efiemu_mmap_fill ()))
+ return err;
+ return grub_efiemu_mmap_sort_and_uniq ();
+}
diff --git a/grub-core/efiemu/pnvram.c b/grub-core/efiemu/pnvram.c
new file mode 100644
index 0000000..e58fce8
--- /dev/null
+++ b/grub-core/efiemu/pnvram.c
@@ -0,0 +1,280 @@
+/* Export pnvram and some variables for runtime */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/normal.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/charset.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/efiemu/runtime.h>
+#include <grub/extcmd.h>
+
+/* Place for final location of variables */
+static int nvram_handle = 0;
+static int nvramsize_handle = 0;
+static int high_monotonic_count_handle = 0;
+static int timezone_handle = 0;
+static int accuracy_handle = 0;
+static int daylight_handle = 0;
+
+static grub_size_t nvramsize;
+
+/* Parse signed value */
+static int
+grub_strtosl (const char *arg, char **end, int base)
+{
+ if (arg[0] == '-')
+ return -grub_strtoul (arg + 1, end, base);
+ return grub_strtoul (arg, end, base);
+}
+
+static inline int
+hextoval (char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ if (c >= 'a' && c <= 'z')
+ return c - 'a' + 10;
+ if (c >= 'A' && c <= 'Z')
+ return c - 'A' + 10;
+ return 0;
+}
+
+static inline grub_err_t
+unescape (char *in, char *out, char *outmax, int *len)
+{
+ char *ptr, *dptr;
+ dptr = out;
+ for (ptr = in; *ptr && dptr < outmax; )
+ if (*ptr == '%' && ptr[1] && ptr[2])
+ {
+ *dptr = (hextoval (ptr[1]) << 4) | (hextoval (ptr[2]));
+ ptr += 3;
+ dptr++;
+ }
+ else
+ {
+ *dptr = *ptr;
+ ptr++;
+ dptr++;
+ }
+ if (dptr == outmax)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "too many NVRAM variables for reserved variable space."
+ " Try increasing EfiEmu.pnvram.size");
+ *len = dptr - out;
+ return 0;
+}
+
+/* Export stuff for efiemu */
+static grub_err_t
+nvram_set (void * data __attribute__ ((unused)))
+{
+ const char *env;
+ /* Take definitive pointers */
+ char *nvram = grub_efiemu_mm_obtain_request (nvram_handle);
+ grub_uint32_t *nvramsize_def
+ = grub_efiemu_mm_obtain_request (nvramsize_handle);
+ grub_uint32_t *high_monotonic_count
+ = grub_efiemu_mm_obtain_request (high_monotonic_count_handle);
+ grub_int16_t *timezone
+ = grub_efiemu_mm_obtain_request (timezone_handle);
+ grub_uint8_t *daylight
+ = grub_efiemu_mm_obtain_request (daylight_handle);
+ grub_uint32_t *accuracy
+ = grub_efiemu_mm_obtain_request (accuracy_handle);
+ char *nvramptr;
+
+ auto int iterate_env (struct grub_env_var *var);
+ int iterate_env (struct grub_env_var *var)
+ {
+ char *guid, *attr, *name, *varname;
+ struct efi_variable *efivar;
+ int len = 0;
+ int i;
+ grub_uint64_t guidcomp;
+
+ if (grub_memcmp (var->name, "EfiEmu.pnvram.",
+ sizeof ("EfiEmu.pnvram.") - 1) != 0)
+ return 0;
+
+ guid = var->name + sizeof ("EfiEmu.pnvram.") - 1;
+
+ attr = grub_strchr (guid, '.');
+ if (!attr)
+ return 0;
+ attr++;
+
+ name = grub_strchr (attr, '.');
+ if (!name)
+ return 0;
+ name++;
+
+ efivar = (struct efi_variable *) nvramptr;
+ if (nvramptr - nvram + sizeof (struct efi_variable) > nvramsize)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "too many NVRAM variables for reserved variable space."
+ " Try increasing EfiEmu.pnvram.size");
+ return 1;
+ }
+
+ nvramptr += sizeof (struct efi_variable);
+
+ efivar->guid.data1 = grub_cpu_to_le32 (grub_strtoul (guid, &guid, 16));
+ if (*guid != '-')
+ return 0;
+ guid++;
+
+ efivar->guid.data2 = grub_cpu_to_le16 (grub_strtoul (guid, &guid, 16));
+ if (*guid != '-')
+ return 0;
+ guid++;
+
+ efivar->guid.data3 = grub_cpu_to_le16 (grub_strtoul (guid, &guid, 16));
+ if (*guid != '-')
+ return 0;
+ guid++;
+
+ guidcomp = grub_strtoull (guid, 0, 16);
+ for (i = 0; i < 8; i++)
+ efivar->guid.data4[i] = (guidcomp >> (56 - 8 * i)) & 0xff;
+
+ efivar->attributes = grub_strtoull (attr, 0, 16);
+
+ varname = grub_malloc (grub_strlen (name) + 1);
+ if (! varname)
+ return 1;
+
+ if (unescape (name, varname, varname + grub_strlen (name) + 1, &len))
+ return 1;
+
+ len = grub_utf8_to_utf16 ((grub_uint16_t *) nvramptr,
+ (nvramsize - (nvramptr - nvram)) / 2,
+ (grub_uint8_t *) varname, len, NULL);
+
+ if (len < 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "broken UTF-8 in variable name");
+ return 1;
+ }
+
+ nvramptr += 2 * len;
+ *((grub_uint16_t *) nvramptr) = 0;
+ nvramptr += 2;
+ efivar->namelen = 2 * len + 2;
+
+ if (unescape (var->value, nvramptr, nvram + nvramsize, &len))
+ {
+ efivar->namelen = 0;
+ return 1;
+ }
+
+ nvramptr += len;
+
+ efivar->size = len;
+
+ return 0;
+ }
+
+ /* Copy to definitive loaction */
+ grub_dprintf ("efiemu", "preparing pnvram\n");
+
+ env = grub_env_get ("EfiEmu.pnvram.high_monotonic_count");
+ *high_monotonic_count = env ? grub_strtoul (env, 0, 0) : 1;
+ env = grub_env_get ("EfiEmu.pnvram.timezone");
+ *timezone = env ? grub_strtosl (env, 0, 0) : GRUB_EFI_UNSPECIFIED_TIMEZONE;
+ env = grub_env_get ("EfiEmu.pnvram.accuracy");
+ *accuracy = env ? grub_strtoul (env, 0, 0) : 50000000;
+ env = grub_env_get ("EfiEmu.pnvram.daylight");
+ *daylight = env ? grub_strtoul (env, 0, 0) : 0;
+
+ nvramptr = nvram;
+ grub_memset (nvram, 0, nvramsize);
+ grub_env_iterate (iterate_env);
+ if (grub_errno)
+ return grub_errno;
+ *nvramsize_def = nvramsize;
+
+ /* Register symbols */
+ grub_efiemu_register_symbol ("efiemu_variables", nvram_handle, 0);
+ grub_efiemu_register_symbol ("efiemu_varsize", nvramsize_handle, 0);
+ grub_efiemu_register_symbol ("efiemu_high_monotonic_count",
+ high_monotonic_count_handle, 0);
+ grub_efiemu_register_symbol ("efiemu_time_zone", timezone_handle, 0);
+ grub_efiemu_register_symbol ("efiemu_time_daylight", daylight_handle, 0);
+ grub_efiemu_register_symbol ("efiemu_time_accuracy",
+ accuracy_handle, 0);
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+nvram_unload (void * data __attribute__ ((unused)))
+{
+ grub_efiemu_mm_return_request (nvram_handle);
+ grub_efiemu_mm_return_request (nvramsize_handle);
+ grub_efiemu_mm_return_request (high_monotonic_count_handle);
+ grub_efiemu_mm_return_request (timezone_handle);
+ grub_efiemu_mm_return_request (accuracy_handle);
+ grub_efiemu_mm_return_request (daylight_handle);
+}
+
+grub_err_t
+grub_efiemu_pnvram (void)
+{
+ const char *size;
+ grub_err_t err;
+
+ nvramsize = 0;
+
+ size = grub_env_get ("EfiEmu.pnvram.size");
+ if (size)
+ nvramsize = grub_strtoul (size, 0, 0);
+
+ if (!nvramsize)
+ nvramsize = 2048;
+
+ err = grub_efiemu_register_prepare_hook (nvram_set, nvram_unload, 0);
+ if (err)
+ return err;
+
+ nvram_handle
+ = grub_efiemu_request_memalign (1, nvramsize,
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+ nvramsize_handle
+ = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t),
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+ high_monotonic_count_handle
+ = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t),
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+ timezone_handle
+ = grub_efiemu_request_memalign (1, sizeof (grub_uint16_t),
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+ daylight_handle
+ = grub_efiemu_request_memalign (1, sizeof (grub_uint8_t),
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+ accuracy_handle
+ = grub_efiemu_request_memalign (1, sizeof (grub_uint32_t),
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/efiemu/prepare.c b/grub-core/efiemu/prepare.c
new file mode 100644
index 0000000..171e092
--- /dev/null
+++ b/grub-core/efiemu/prepare.c
@@ -0,0 +1,160 @@
+/* Prepare efiemu. E.g. allocate memory, load the runtime
+ to appropriate place, etc */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/crypto.h>
+
+grub_err_t
+SUFFIX (grub_efiemu_prepare) (struct grub_efiemu_prepare_hook *prepare_hooks,
+ struct grub_efiemu_configuration_table
+ *config_tables)
+{
+ grub_err_t err;
+ int conftable_handle;
+ struct grub_efiemu_configuration_table *cur;
+ struct grub_efiemu_prepare_hook *curhook;
+
+ int cntconftables = 0;
+ struct SUFFIX (grub_efiemu_configuration_table) *conftables = 0;
+ int i;
+ int handle;
+ grub_off_t off;
+
+ grub_dprintf ("efiemu", "Preparing EfiEmu\n");
+
+ /* Request space for the list of configuration tables */
+ for (cur = config_tables; cur; cur = cur->next)
+ cntconftables++;
+ conftable_handle
+ = grub_efiemu_request_memalign (GRUB_EFIEMU_PAGESIZE,
+ cntconftables * sizeof (*conftables),
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+
+ /* Switch from phase 1 (counting) to phase 2 (real job) */
+ grub_efiemu_alloc_syms ();
+ grub_efiemu_mm_do_alloc ();
+ grub_efiemu_write_sym_markers ();
+
+ grub_efiemu_system_table32 = 0;
+ grub_efiemu_system_table64 = 0;
+
+ /* Execute hooks */
+ for (curhook = prepare_hooks; curhook; curhook = curhook->next)
+ curhook->hook (curhook->data);
+
+ /* Move runtime to its due place */
+ err = grub_efiemu_loadcore_load ();
+ if (err)
+ {
+ grub_efiemu_unload ();
+ return err;
+ }
+
+ err = grub_efiemu_resolve_symbol ("efiemu_system_table", &handle, &off);
+ if (err)
+ {
+ grub_efiemu_unload ();
+ return err;
+ }
+
+ SUFFIX (grub_efiemu_system_table)
+ = (struct SUFFIX (grub_efi_system_table) *)
+ ((grub_uint8_t *) grub_efiemu_mm_obtain_request (handle) + off);
+
+ /* Put pointer to the list of configuration tables in system table */
+ grub_efiemu_write_value
+ (&(SUFFIX (grub_efiemu_system_table)->configuration_table), 0,
+ conftable_handle, 0, 1,
+ sizeof (SUFFIX (grub_efiemu_system_table)->configuration_table));
+ SUFFIX(grub_efiemu_system_table)->num_table_entries = cntconftables;
+
+ /* Fill the list of configuration tables */
+ conftables = (struct SUFFIX (grub_efiemu_configuration_table) *)
+ grub_efiemu_mm_obtain_request (conftable_handle);
+ i = 0;
+ for (cur = config_tables; cur; cur = cur->next, i++)
+ {
+ grub_memcpy (&(conftables[i].vendor_guid), &(cur->guid),
+ sizeof (cur->guid));
+ if (cur->get_table)
+ conftables[i].vendor_table
+ = PTR_TO_UINT64 (cur->get_table (cur->data));
+ else
+ conftables[i].vendor_table = PTR_TO_UINT64 (cur->data);
+ }
+
+ err = SUFFIX (grub_efiemu_crc) ();
+ if (err)
+ {
+ grub_efiemu_unload ();
+ return err;
+ }
+
+ grub_dprintf ("efiemu","system_table = %p, conftables = %p (%d entries)\n",
+ SUFFIX (grub_efiemu_system_table), conftables, cntconftables);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+SUFFIX (grub_efiemu_crc) (void)
+{
+ grub_err_t err;
+ int handle;
+ grub_off_t off;
+ struct SUFFIX (grub_efiemu_runtime_services) *runtime_services;
+ grub_uint8_t crc32_context[GRUB_MD_CRC32->contextsize];
+
+ /* compute CRC32 of runtime_services */
+ err = grub_efiemu_resolve_symbol ("efiemu_runtime_services",
+ &handle, &off);
+ if (err)
+ return err;
+
+ runtime_services = (struct SUFFIX (grub_efiemu_runtime_services) *)
+ ((grub_uint8_t *) grub_efiemu_mm_obtain_request (handle) + off);
+
+ GRUB_MD_CRC32->init(crc32_context);
+ GRUB_MD_CRC32->write(crc32_context, runtime_services, runtime_services->hdr.header_size);
+ GRUB_MD_CRC32->final(crc32_context);
+
+ runtime_services->hdr.crc32 =
+ grub_be_to_cpu32(*(grub_uint32_t*)GRUB_MD_CRC32->read(crc32_context));
+
+ err = grub_efiemu_resolve_symbol ("efiemu_system_table", &handle, &off);
+ if (err)
+ return err;
+
+ /* compute CRC32 of system table */
+ GRUB_MD_CRC32->init(crc32_context);
+ GRUB_MD_CRC32->write(crc32_context, SUFFIX (grub_efiemu_system_table),
+ SUFFIX (grub_efiemu_system_table)->hdr.header_size);
+ GRUB_MD_CRC32->final(crc32_context);
+ SUFFIX (grub_efiemu_system_table)->hdr.crc32 =
+ grub_be_to_cpu32(*(grub_uint32_t*)GRUB_MD_CRC32->read(crc32_context));
+
+ grub_dprintf ("efiemu","system_table = %p, runtime_services = %p\n",
+ SUFFIX (grub_efiemu_system_table), runtime_services);
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/efiemu/prepare32.c b/grub-core/efiemu/prepare32.c
new file mode 100644
index 0000000..fd6109e
--- /dev/null
+++ b/grub-core/efiemu/prepare32.c
@@ -0,0 +1,22 @@
+/* This file contains definitions so that prepare.c compiles for 32-bit */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define SUFFIX(x) x ## 32
+
+#include "prepare.c"
diff --git a/grub-core/efiemu/prepare64.c b/grub-core/efiemu/prepare64.c
new file mode 100644
index 0000000..811f558
--- /dev/null
+++ b/grub-core/efiemu/prepare64.c
@@ -0,0 +1,22 @@
+/* This file contains definitions so that prepare.c compiles for 64-bit */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define SUFFIX(x) x ## 64
+
+#include "prepare.c"
diff --git a/grub-core/efiemu/runtime/config.h b/grub-core/efiemu/runtime/config.h
new file mode 100644
index 0000000..26fb2ff
--- /dev/null
+++ b/grub-core/efiemu/runtime/config.h
@@ -0,0 +1,34 @@
+/* This is a pseudo config.h so that types.h compiles nicely */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define GRUB_TYPES_CPU_HEADER 1
+
+#ifdef ELF32
+# define SIZEOF_VOID_P 4
+# define SIZEOF_LONG 4
+# define GRUB_TARGET_SIZEOF_VOID_P 4
+# define GRUB_TARGET_SIZEOF_LONG 4
+# define EFI_FUNC(x) x
+#else
+# define SIZEOF_VOID_P 8
+# define SIZEOF_LONG 8
+# define GRUB_TARGET_SIZEOF_VOID_P 8
+# define GRUB_TARGET_SIZEOF_LONG 8
+# define EFI_FUNC(x) x ## _real
+#endif
diff --git a/grub-core/efiemu/runtime/efiemu.S b/grub-core/efiemu/runtime/efiemu.S
new file mode 100644
index 0000000..b502314
--- /dev/null
+++ b/grub-core/efiemu/runtime/efiemu.S
@@ -0,0 +1,159 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+
+/*
+ * x86_64 uses registry to pass parameters. Unfortunately, gcc and efi use
+ * different call conversion, so we need to do some conversion.
+ *
+ * gcc:
+ * %rdi, %rsi, %rdx, %rcx, %r8, %r9, 8(%rsp), 16(%rsp), ...
+ *
+ * efi:
+ * %rcx, %rdx, %r8, %r9, 32(%rsp), 40(%rsp), 48(%rsp), ...
+ *
+ */
+
+ .file "efiemu.S"
+ .text
+
+FUNCTION (efiemu_get_time)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ call efiemu_get_time_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_set_time)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ call efiemu_set_time_real
+ pop %rsi
+ pop %rdi
+ ret
+
+
+FUNCTION (efiemu_get_wakeup_time)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+ call efiemu_get_wakeup_time_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_set_wakeup_time)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ call efiemu_set_wakeup_time_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_get_variable)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+ mov %r9, %rcx
+ mov 56(%rsp), %r8
+ call efiemu_get_variable_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_get_next_variable_name)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+ call efiemu_get_next_variable_name_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_set_variable)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+ mov %r9, %rcx
+ mov 56(%rsp), %r8
+ call efiemu_set_variable_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_get_next_high_monotonic_count)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ call efiemu_get_next_high_monotonic_count_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_reset_system)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+ mov %r9, %rcx
+ call efiemu_reset_system_real
+ pop %rsi
+ pop %rdi
+ ret
+
+ /* The following functions are always called in physical mode */
+ .section ".text-physical", "ax"
+
+FUNCTION (efiemu_set_virtual_address_map)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+ mov %r9, %rcx
+ call efiemu_set_virtual_address_map_real
+ pop %rsi
+ pop %rdi
+ ret
+
+FUNCTION (efiemu_convert_pointer)
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ call efiemu_convert_pointer_real
+ pop %rsi
+ pop %rdi
+ ret
+
diff --git a/grub-core/efiemu/runtime/efiemu.c b/grub-core/efiemu/runtime/efiemu.c
new file mode 100644
index 0000000..7389341
--- /dev/null
+++ b/grub-core/efiemu/runtime/efiemu.c
@@ -0,0 +1,630 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* This is an emulation of EFI runtime services.
+ This allows a more uniform boot on i386 machines.
+ As it emulates only runtime serviceit isn't able
+ to chainload EFI bootloader on non-EFI system (TODO) */
+
+#include <grub/symbol.h>
+#include <grub/types.h>
+#include <grub/efi/api.h>
+#include <grub/efiemu/runtime.h>
+
+grub_efi_status_t
+efiemu_get_time (grub_efi_time_t *time,
+ grub_efi_time_capabilities_t *capabilities);
+grub_efi_status_t
+efiemu_set_time (grub_efi_time_t *time);
+
+grub_efi_status_t
+efiemu_get_wakeup_time (grub_efi_boolean_t *enabled,
+ grub_efi_boolean_t *pending,
+ grub_efi_time_t *time);
+grub_efi_status_t
+efiemu_set_wakeup_time (grub_efi_boolean_t enabled,
+ grub_efi_time_t *time);
+
+#ifdef APPLE_CC
+#define PHYSICAL_ATTRIBUTE __attribute__ ((section("_text-physical, _text-physical")));
+#else
+#define PHYSICAL_ATTRIBUTE __attribute__ ((section(".text-physical")));
+#endif
+
+grub_efi_status_t
+efiemu_set_virtual_address_map (grub_efi_uintn_t memory_map_size,
+ grub_efi_uintn_t descriptor_size,
+ grub_efi_uint32_t descriptor_version,
+ grub_efi_memory_descriptor_t *virtual_map)
+ PHYSICAL_ATTRIBUTE;
+
+grub_efi_status_t
+efiemu_convert_pointer (grub_efi_uintn_t debug_disposition,
+ void **address)
+ PHYSICAL_ATTRIBUTE;
+
+grub_efi_status_t
+efiemu_get_variable (grub_efi_char16_t *variable_name,
+ grub_efi_guid_t *vendor_guid,
+ grub_efi_uint32_t *attributes,
+ grub_efi_uintn_t *data_size,
+ void *data);
+
+grub_efi_status_t
+efiemu_get_next_variable_name (grub_efi_uintn_t *variable_name_size,
+ grub_efi_char16_t *variable_name,
+ grub_efi_guid_t *vendor_guid);
+
+grub_efi_status_t
+efiemu_set_variable (grub_efi_char16_t *variable_name,
+ grub_efi_guid_t *vendor_guid,
+ grub_efi_uint32_t attributes,
+ grub_efi_uintn_t data_size,
+ void *data);
+grub_efi_status_t
+efiemu_get_next_high_monotonic_count (grub_efi_uint32_t *high_count);
+void
+efiemu_reset_system (grub_efi_reset_type_t reset_type,
+ grub_efi_status_t reset_status,
+ grub_efi_uintn_t data_size,
+ grub_efi_char16_t *reset_data);
+
+grub_efi_status_t
+EFI_FUNC (efiemu_set_virtual_address_map) (grub_efi_uintn_t,
+ grub_efi_uintn_t,
+ grub_efi_uint32_t,
+ grub_efi_memory_descriptor_t *)
+ PHYSICAL_ATTRIBUTE;
+grub_efi_status_t
+EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t debug_disposition,
+ void **address)
+ PHYSICAL_ATTRIBUTE;
+static grub_uint32_t
+efiemu_getcrc32 (grub_uint32_t crc, void *buf, int size)
+ PHYSICAL_ATTRIBUTE;
+static void
+init_crc32_table (void)
+ PHYSICAL_ATTRIBUTE;
+static grub_uint32_t
+reflect (grub_uint32_t ref, int len)
+ PHYSICAL_ATTRIBUTE;
+
+/*
+ The log. It's used when examining memory dump
+*/
+static grub_uint8_t loge[1000] = "EFIEMULOG";
+static int logn = 9;
+#define LOG(x) { if (logn<900) loge[logn++]=x; }
+
+/* Interface with grub */
+extern grub_uint8_t efiemu_ptv_relocated;
+struct grub_efi_runtime_services efiemu_runtime_services;
+struct grub_efi_system_table efiemu_system_table;
+extern struct grub_efiemu_ptv_rel efiemu_ptv_relloc[];
+extern grub_uint8_t efiemu_variables[];
+extern grub_uint32_t efiemu_varsize;
+extern grub_uint32_t efiemu_high_monotonic_count;
+extern grub_int16_t efiemu_time_zone;
+extern grub_uint8_t efiemu_time_daylight;
+extern grub_uint32_t efiemu_time_accuracy;
+
+/* Some standard functions because we need to be standalone */
+static void
+efiemu_memcpy (void *to, void *from, int count)
+{
+ int i;
+ for (i = 0; i < count; i++)
+ ((grub_uint8_t *) to)[i] = ((grub_uint8_t *) from)[i];
+}
+
+static int
+efiemu_str16equal (grub_uint16_t *a, grub_uint16_t *b)
+{
+ grub_uint16_t *ptr1, *ptr2;
+ for (ptr1=a,ptr2=b; *ptr1 && *ptr2 == *ptr1; ptr1++, ptr2++);
+ return *ptr2 == *ptr1;
+}
+
+static grub_size_t
+efiemu_str16len (grub_uint16_t *a)
+{
+ grub_uint16_t *ptr1;
+ for (ptr1 = a; *ptr1; ptr1++);
+ return ptr1 - a;
+}
+
+static int
+efiemu_memequal (void *a, void *b, grub_size_t n)
+{
+ grub_uint8_t *ptr1, *ptr2;
+ for (ptr1 = (grub_uint8_t *) a, ptr2 = (grub_uint8_t *)b;
+ ptr1 < (grub_uint8_t *)a + n && *ptr2 == *ptr1; ptr1++, ptr2++);
+ return ptr1 == a + n;
+}
+
+static void
+efiemu_memset (grub_uint8_t *a, grub_uint8_t b, grub_size_t n)
+{
+ grub_uint8_t *ptr1;
+ for (ptr1=a; ptr1 < a + n; ptr1++)
+ *ptr1 = b;
+}
+
+static inline void
+write_cmos (grub_uint8_t addr, grub_uint8_t val)
+{
+ __asm__ __volatile__ ("outb %%al,$0x70\n"
+ "mov %%cl, %%al\n"
+ "outb %%al,$0x71": :"a" (addr), "c" (val));
+}
+
+static inline grub_uint8_t
+read_cmos (grub_uint8_t addr)
+{
+ grub_uint8_t ret;
+ __asm__ __volatile__ ("outb %%al, $0x70\n"
+ "inb $0x71, %%al": "=a"(ret) :"a" (addr));
+ return ret;
+}
+
+/* Needed by some gcc versions */
+int __stack_chk_fail ()
+{
+ return 0;
+}
+
+/* The function that implement runtime services as specified in
+ EFI specification */
+static inline grub_uint8_t
+bcd_to_hex (grub_uint8_t in)
+{
+ return 10 * ((in & 0xf0) >> 4) + (in & 0x0f);
+}
+
+grub_efi_status_t
+EFI_FUNC (efiemu_get_time) (grub_efi_time_t *time,
+ grub_efi_time_capabilities_t *capabilities)
+{
+ LOG ('a');
+ grub_uint8_t state;
+ state = read_cmos (0xb);
+ if (!(state & (1 << 2)))
+ {
+ time->year = 2000 + bcd_to_hex (read_cmos (0x9));
+ time->month = bcd_to_hex (read_cmos (0x8));
+ time->day = bcd_to_hex (read_cmos (0x7));
+ time->hour = bcd_to_hex (read_cmos (0x4));
+ if (time->hour >= 81)
+ time->hour -= 80 - 12;
+ if (time->hour == 24)
+ time->hour = 0;
+ time->minute = bcd_to_hex (read_cmos (0x2));
+ time->second = bcd_to_hex (read_cmos (0x0));
+ }
+ else
+ {
+ time->year = 2000 + read_cmos (0x9);
+ time->month = read_cmos (0x8);
+ time->day = read_cmos (0x7);
+ time->hour = read_cmos (0x4);
+ if (time->hour >= 0x81)
+ time->hour -= 0x80 - 12;
+ if (time->hour == 24)
+ time->hour = 0;
+ time->minute = read_cmos (0x2);
+ time->second = read_cmos (0x0);
+ }
+ time->nanosecond = 0;
+ time->pad1 = 0;
+ time->pad2 = 0;
+ time->time_zone = efiemu_time_zone;
+ time->daylight = efiemu_time_daylight;
+ capabilities->resolution = 1;
+ capabilities->accuracy = efiemu_time_accuracy;
+ capabilities->sets_to_zero = 0;
+ return GRUB_EFI_SUCCESS;
+}
+
+grub_efi_status_t
+EFI_FUNC (efiemu_set_time) (grub_efi_time_t *time)
+{
+ LOG ('b');
+ grub_uint8_t state;
+ state = read_cmos (0xb);
+ write_cmos (0xb, state | 0x6);
+ write_cmos (0x9, time->year - 2000);
+ write_cmos (0x8, time->month);
+ write_cmos (0x7, time->day);
+ write_cmos (0x4, time->hour);
+ write_cmos (0x2, time->minute);
+ write_cmos (0x0, time->second);
+ efiemu_time_zone = time->time_zone;
+ efiemu_time_daylight = time->daylight;
+ return GRUB_EFI_SUCCESS;
+}
+
+/* Following 2 functions are vendor specific. So announce it as unsupported */
+grub_efi_status_t
+EFI_FUNC (efiemu_get_wakeup_time) (grub_efi_boolean_t *enabled,
+ grub_efi_boolean_t *pending,
+ grub_efi_time_t *time)
+{
+ LOG ('c');
+ return GRUB_EFI_UNSUPPORTED;
+}
+
+grub_efi_status_t
+EFI_FUNC (efiemu_set_wakeup_time) (grub_efi_boolean_t enabled,
+ grub_efi_time_t *time)
+{
+ LOG ('d');
+ return GRUB_EFI_UNSUPPORTED;
+}
+
+static grub_uint32_t crc32_table [256];
+
+static grub_uint32_t
+reflect (grub_uint32_t ref, int len)
+{
+ grub_uint32_t result = 0;
+ int i;
+
+ for (i = 1; i <= len; i++)
+ {
+ if (ref & 1)
+ result |= 1 << (len - i);
+ ref >>= 1;
+ }
+
+ return result;
+}
+
+static void
+init_crc32_table (void)
+{
+ grub_uint32_t polynomial = 0x04c11db7;
+ int i, j;
+
+ for(i = 0; i < 256; i++)
+ {
+ crc32_table[i] = reflect(i, 8) << 24;
+ for (j = 0; j < 8; j++)
+ crc32_table[i] = (crc32_table[i] << 1) ^
+ (crc32_table[i] & (1 << 31) ? polynomial : 0);
+ crc32_table[i] = reflect(crc32_table[i], 32);
+ }
+}
+
+static grub_uint32_t
+efiemu_getcrc32 (grub_uint32_t crc, void *buf, int size)
+{
+ int i;
+ grub_uint8_t *data = buf;
+
+ if (! crc32_table[1])
+ init_crc32_table ();
+
+ crc^= 0xffffffff;
+
+ for (i = 0; i < size; i++)
+ {
+ crc = (crc >> 8) ^ crc32_table[(crc & 0xFF) ^ *data];
+ data++;
+ }
+
+ return crc ^ 0xffffffff;
+}
+
+
+grub_efi_status_t EFI_FUNC
+(efiemu_set_virtual_address_map) (grub_efi_uintn_t memory_map_size,
+ grub_efi_uintn_t descriptor_size,
+ grub_efi_uint32_t descriptor_version,
+ grub_efi_memory_descriptor_t *virtual_map)
+{
+ struct grub_efiemu_ptv_rel *cur_relloc;
+
+ LOG ('e');
+
+ /* Ensure that we are called only once */
+ if (efiemu_ptv_relocated)
+ return GRUB_EFI_UNSUPPORTED;
+ efiemu_ptv_relocated = 1;
+
+ /* Correct addresses using information supplied by grub */
+ for (cur_relloc = efiemu_ptv_relloc; cur_relloc->size;cur_relloc++)
+ {
+ grub_int64_t corr = 0;
+ grub_efi_memory_descriptor_t *descptr;
+
+ /* Compute correction */
+ for (descptr = virtual_map;
+ ((grub_uint8_t *) descptr - (grub_uint8_t *) virtual_map)
+ < memory_map_size;
+ descptr = (grub_efi_memory_descriptor_t *)
+ ((grub_uint8_t *) descptr + descriptor_size))
+ {
+ if (descptr->type == cur_relloc->plustype)
+ corr += descptr->virtual_start - descptr->physical_start;
+ if (descptr->type == cur_relloc->minustype)
+ corr -= descptr->virtual_start - descptr->physical_start;
+ }
+
+ /* Apply correction */
+ switch (cur_relloc->size)
+ {
+ case 8:
+ *((grub_uint64_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ case 4:
+ *((grub_uint32_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ case 2:
+ *((grub_uint16_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ case 1:
+ *((grub_uint8_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ }
+ }
+
+ /* Recompute crc32 of system table and runtime services */
+ efiemu_system_table.hdr.crc32 = 0;
+ efiemu_system_table.hdr.crc32 = efiemu_getcrc32
+ (0, &efiemu_system_table, sizeof (efiemu_system_table));
+
+ efiemu_runtime_services.hdr.crc32 = 0;
+ efiemu_runtime_services.hdr.crc32 = efiemu_getcrc32
+ (0, &efiemu_runtime_services, sizeof (efiemu_runtime_services));
+
+ return GRUB_EFI_SUCCESS;
+}
+
+/* since efiemu_set_virtual_address_map corrects all the pointers
+ we don't need efiemu_convert_pointer */
+grub_efi_status_t
+EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t debug_disposition,
+ void **address)
+{
+ LOG ('f');
+ return GRUB_EFI_UNSUPPORTED;
+}
+
+/* Next comes variable services. Because we have no vendor-independent
+ way to store these variables we have no non-volatility */
+
+/* Find variable by name and GUID. */
+static struct efi_variable *
+find_variable (grub_efi_guid_t *vendor_guid,
+ grub_efi_char16_t *variable_name)
+{
+ grub_uint8_t *ptr;
+ struct efi_variable *efivar;
+
+ for (ptr = efiemu_variables; ptr < efiemu_variables + efiemu_varsize; )
+ {
+ efivar = (struct efi_variable *) ptr;
+ if (!efivar->namelen)
+ return 0;
+ if (efiemu_str16equal((grub_efi_char16_t *)(efivar + 1), variable_name)
+ && efiemu_memequal (&(efivar->guid), vendor_guid,
+ sizeof (efivar->guid)))
+ return efivar;
+ ptr += efivar->namelen + efivar->size + sizeof (*efivar);
+ }
+ return 0;
+}
+
+grub_efi_status_t
+EFI_FUNC (efiemu_get_variable) (grub_efi_char16_t *variable_name,
+ grub_efi_guid_t *vendor_guid,
+ grub_efi_uint32_t *attributes,
+ grub_efi_uintn_t *data_size,
+ void *data)
+{
+ struct efi_variable *efivar;
+ LOG ('g');
+ efivar = find_variable (vendor_guid, variable_name);
+ if (!efivar)
+ return GRUB_EFI_NOT_FOUND;
+ if (*data_size < efivar->size)
+ {
+ *data_size = efivar->size;
+ return GRUB_EFI_BUFFER_TOO_SMALL;
+ }
+ *data_size = efivar->size;
+ efiemu_memcpy (data, (grub_uint8_t *)(efivar + 1) + efivar->namelen,
+ efivar->size);
+ *attributes = efivar->attributes;
+
+ return GRUB_EFI_SUCCESS;
+}
+
+grub_efi_status_t EFI_FUNC
+(efiemu_get_next_variable_name) (grub_efi_uintn_t *variable_name_size,
+ grub_efi_char16_t *variable_name,
+ grub_efi_guid_t *vendor_guid)
+{
+ struct efi_variable *efivar;
+ LOG ('l');
+
+ if (!variable_name_size || !variable_name || !vendor_guid)
+ return GRUB_EFI_INVALID_PARAMETER;
+ if (variable_name[0])
+ {
+ efivar = find_variable (vendor_guid, variable_name);
+ if (!efivar)
+ return GRUB_EFI_NOT_FOUND;
+ efivar = (struct efi_variable *)((grub_uint8_t *)efivar
+ + efivar->namelen
+ + efivar->size + sizeof (*efivar));
+ }
+ else
+ efivar = (struct efi_variable *) (efiemu_variables);
+
+ LOG ('m');
+ if ((grub_uint8_t *)efivar >= efiemu_variables + efiemu_varsize
+ || !efivar->namelen)
+ return GRUB_EFI_NOT_FOUND;
+ if (*variable_name_size < efivar->namelen)
+ {
+ *variable_name_size = efivar->namelen;
+ return GRUB_EFI_BUFFER_TOO_SMALL;
+ }
+
+ efiemu_memcpy (variable_name, efivar + 1, efivar->namelen);
+ efiemu_memcpy (vendor_guid, &(efivar->guid),
+ sizeof (efivar->guid));
+
+ LOG('h');
+ return GRUB_EFI_SUCCESS;
+}
+
+grub_efi_status_t
+EFI_FUNC (efiemu_set_variable) (grub_efi_char16_t *variable_name,
+ grub_efi_guid_t *vendor_guid,
+ grub_efi_uint32_t attributes,
+ grub_efi_uintn_t data_size,
+ void *data)
+{
+ struct efi_variable *efivar;
+ grub_uint8_t *ptr;
+ LOG('i');
+ if (!variable_name[0])
+ return GRUB_EFI_INVALID_PARAMETER;
+ efivar = find_variable (vendor_guid, variable_name);
+
+ /* Delete variable if any */
+ if (efivar)
+ {
+ efiemu_memcpy (efivar, (grub_uint8_t *)(efivar + 1)
+ + efivar->namelen + efivar->size,
+ (efiemu_variables + efiemu_varsize)
+ - ((grub_uint8_t *)(efivar + 1)
+ + efivar->namelen + efivar->size));
+ efiemu_memset (efiemu_variables + efiemu_varsize
+ - (sizeof (*efivar) + efivar->namelen + efivar->size),
+ 0, (sizeof (*efivar) + efivar->namelen + efivar->size));
+ }
+
+ if (!data_size)
+ return GRUB_EFI_SUCCESS;
+
+ for (ptr = efiemu_variables; ptr < efiemu_variables + efiemu_varsize; )
+ {
+ efivar = (struct efi_variable *) ptr;
+ ptr += efivar->namelen + efivar->size + sizeof (*efivar);
+ if (!efivar->namelen)
+ break;
+ }
+ if ((grub_uint8_t *)(efivar + 1) + data_size
+ + 2 * (efiemu_str16len (variable_name) + 1)
+ >= efiemu_variables + efiemu_varsize)
+ return GRUB_EFI_OUT_OF_RESOURCES;
+
+ efiemu_memcpy (&(efivar->guid), vendor_guid, sizeof (efivar->guid));
+ efivar->namelen = 2 * (efiemu_str16len (variable_name) + 1);
+ efivar->size = data_size;
+ efivar->attributes = attributes;
+ efiemu_memcpy (efivar + 1, variable_name,
+ 2 * (efiemu_str16len (variable_name) + 1));
+ efiemu_memcpy ((grub_uint8_t *)(efivar + 1)
+ + 2 * (efiemu_str16len (variable_name) + 1),
+ data, data_size);
+
+ return GRUB_EFI_SUCCESS;
+}
+
+grub_efi_status_t EFI_FUNC
+(efiemu_get_next_high_monotonic_count) (grub_efi_uint32_t *high_count)
+{
+ LOG ('j');
+ if (!high_count)
+ return GRUB_EFI_INVALID_PARAMETER;
+ *high_count = ++efiemu_high_monotonic_count;
+ return GRUB_EFI_SUCCESS;
+}
+
+/* To implement it with APM we need to go to real mode. It's too much hassle
+ Besides EFI specification says that this function shouldn't be used
+ on systems supporting ACPI
+ */
+void
+EFI_FUNC (efiemu_reset_system) (grub_efi_reset_type_t reset_type,
+ grub_efi_status_t reset_status,
+ grub_efi_uintn_t data_size,
+ grub_efi_char16_t *reset_data)
+{
+ LOG ('k');
+}
+
+struct grub_efi_runtime_services efiemu_runtime_services =
+{
+ .hdr =
+ {
+ .signature = GRUB_EFIEMU_RUNTIME_SERVICES_SIGNATURE,
+ .revision = 0x0001000a,
+ .header_size = sizeof (struct grub_efi_runtime_services),
+ .crc32 = 0, /* filled later*/
+ .reserved = 0
+ },
+ .get_time = efiemu_get_time,
+ .set_time = efiemu_set_time,
+ .get_wakeup_time = efiemu_get_wakeup_time,
+ .set_wakeup_time = efiemu_set_wakeup_time,
+
+ .set_virtual_address_map = efiemu_set_virtual_address_map,
+ .convert_pointer = efiemu_convert_pointer,
+
+ .get_variable = efiemu_get_variable,
+ .get_next_variable_name = efiemu_get_next_variable_name,
+ .set_variable = efiemu_set_variable,
+ .get_next_high_monotonic_count = efiemu_get_next_high_monotonic_count,
+
+ .reset_system = efiemu_reset_system
+};
+
+
+static grub_uint16_t efiemu_vendor[] =
+ {'G', 'R', 'U', 'B', ' ', 'E', 'F', 'I', ' ',
+ 'R', 'U', 'N', 'T', 'I', 'M', 'E', 0};
+
+struct grub_efi_system_table efiemu_system_table =
+{
+ .hdr =
+ {
+ .signature = GRUB_EFIEMU_SYSTEM_TABLE_SIGNATURE,
+ .revision = 0x0001000a,
+ .header_size = sizeof (struct grub_efi_system_table),
+ .crc32 = 0, /* filled later*/
+ .reserved = 0
+ },
+ .firmware_vendor = efiemu_vendor,
+ .firmware_revision = 0x0001000a,
+ .console_in_handler = 0,
+ .con_in = 0,
+ .console_out_handler = 0,
+ .con_out = 0,
+ .standard_error_handle = 0,
+ .std_err = 0,
+ .runtime_services = &efiemu_runtime_services,
+ .boot_services = 0,
+ .num_table_entries = 0,
+ .configuration_table = 0
+};
+
diff --git a/grub-core/efiemu/symbols.c b/grub-core/efiemu/symbols.c
new file mode 100644
index 0000000..4fc546b
--- /dev/null
+++ b/grub-core/efiemu/symbols.c
@@ -0,0 +1,271 @@
+/* Code for managing symbols and pointers in efiemu */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efiemu/efiemu.h>
+#include <grub/efiemu/runtime.h>
+
+static int ptv_written = 0;
+static int ptv_alloc = 0;
+static int ptv_handle = 0;
+static int relocated_handle = 0;
+static int ptv_requested = 0;
+static struct grub_efiemu_sym *efiemu_syms = 0;
+
+struct grub_efiemu_sym
+{
+ struct grub_efiemu_sym *next;
+ char *name;
+ int handle;
+ grub_off_t off;
+};
+
+void
+grub_efiemu_free_syms (void)
+{
+ struct grub_efiemu_sym *cur, *d;
+ for (cur = efiemu_syms; cur;)
+ {
+ d = cur->next;
+ grub_free (cur->name);
+ grub_free (cur);
+ cur = d;
+ }
+ efiemu_syms = 0;
+ ptv_written = 0;
+ ptv_alloc = 0;
+ ptv_requested = 0;
+ grub_efiemu_mm_return_request (ptv_handle);
+ ptv_handle = 0;
+ grub_efiemu_mm_return_request (relocated_handle);
+ relocated_handle = 0;
+}
+
+/* Announce that the module will need NUM allocators */
+/* Because of deferred memory allocation all the relocators have to be
+ announced during phase 1*/
+grub_err_t
+grub_efiemu_request_symbols (int num)
+{
+ if (ptv_alloc)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "symbols have already been allocated");
+ if (num < 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "can't request negative symbols");
+ ptv_requested += num;
+ return GRUB_ERR_NONE;
+}
+
+/* Resolve the symbol name NAME and set HANDLE and OFF accordingly */
+grub_err_t
+grub_efiemu_resolve_symbol (const char *name, int *handle, grub_off_t *off)
+{
+ struct grub_efiemu_sym *cur;
+ for (cur = efiemu_syms; cur; cur = cur->next)
+ if (!grub_strcmp (name, cur->name))
+ {
+ *handle = cur->handle;
+ *off = cur->off;
+ return GRUB_ERR_NONE;
+ }
+ grub_dprintf ("efiemu", "%s not found\n", name);
+ return grub_error (GRUB_ERR_BAD_OS, "symbol %s isn't found", name);
+}
+
+/* Register symbol named NAME in memory handle HANDLE at offset OFF */
+grub_err_t
+grub_efiemu_register_symbol (const char *name, int handle, grub_off_t off)
+{
+ struct grub_efiemu_sym *cur;
+ cur = (struct grub_efiemu_sym *) grub_malloc (sizeof (*cur));
+ grub_dprintf ("efiemu", "registering symbol '%s'\n", name);
+ if (!cur)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't register symbol");
+ cur->name = grub_strdup (name);
+ cur->next = efiemu_syms;
+ cur->handle = handle;
+ cur->off = off;
+ efiemu_syms = cur;
+
+ return 0;
+}
+
+/* Go from phase 1 to phase 2. Must be called before similar function in mm.c */
+grub_err_t
+grub_efiemu_alloc_syms (void)
+{
+ ptv_alloc = ptv_requested;
+ ptv_handle = grub_efiemu_request_memalign
+ (1, (ptv_requested + 1) * sizeof (struct grub_efiemu_ptv_rel),
+ GRUB_EFI_RUNTIME_SERVICES_DATA);
+ relocated_handle = grub_efiemu_request_memalign
+ (1, sizeof (grub_uint8_t), GRUB_EFI_RUNTIME_SERVICES_DATA);
+
+ grub_efiemu_register_symbol ("efiemu_ptv_relocated", relocated_handle, 0);
+ grub_efiemu_register_symbol ("efiemu_ptv_relloc", ptv_handle, 0);
+ return grub_errno;
+}
+
+grub_err_t
+grub_efiemu_write_sym_markers (void)
+{
+ struct grub_efiemu_ptv_rel *ptv_rels
+ = grub_efiemu_mm_obtain_request (ptv_handle);
+ grub_uint8_t *relocated = grub_efiemu_mm_obtain_request (relocated_handle);
+ grub_memset (ptv_rels, 0, (ptv_requested + 1)
+ * sizeof (struct grub_efiemu_ptv_rel));
+ *relocated = 0;
+ return GRUB_ERR_NONE;
+}
+
+/* Write value (pointer to memory PLUS_HANDLE)
+ - (pointer to memory MINUS_HANDLE) + VALUE to ADDR assuming that the
+ size SIZE bytes. If PTV_NEEDED is 1 then announce it to runtime that this
+ value needs to be recomputed before going to virtual mode
+*/
+grub_err_t
+grub_efiemu_write_value (void *addr, grub_uint32_t value, int plus_handle,
+ int minus_handle, int ptv_needed, int size)
+{
+ /* Announce relocator to runtime */
+ if (ptv_needed)
+ {
+ struct grub_efiemu_ptv_rel *ptv_rels
+ = grub_efiemu_mm_obtain_request (ptv_handle);
+
+ if (ptv_needed && ptv_written >= ptv_alloc)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "your module didn't declare efiemu "
+ " relocators correctly");
+
+ if (minus_handle)
+ ptv_rels[ptv_written].minustype
+ = grub_efiemu_mm_get_type (minus_handle);
+ else
+ ptv_rels[ptv_written].minustype = 0;
+
+ if (plus_handle)
+ ptv_rels[ptv_written].plustype
+ = grub_efiemu_mm_get_type (plus_handle);
+ else
+ ptv_rels[ptv_written].plustype = 0;
+
+ ptv_rels[ptv_written].addr = PTR_TO_UINT64 (addr);
+ ptv_rels[ptv_written].size = size;
+ ptv_written++;
+
+ /* memset next value to zero to mark the end */
+ grub_memset (&ptv_rels[ptv_written], 0, sizeof (ptv_rels[ptv_written]));
+ }
+
+ /* Compute the value */
+ if (minus_handle)
+ value -= PTR_TO_UINT32 (grub_efiemu_mm_obtain_request (minus_handle));
+
+ if (plus_handle)
+ value += PTR_TO_UINT32 (grub_efiemu_mm_obtain_request (plus_handle));
+
+ /* Write the value */
+ switch (size)
+ {
+ case 8:
+ *((grub_uint64_t *) addr) = value;
+ break;
+ case 4:
+ *((grub_uint32_t *) addr) = value;
+ break;
+ case 2:
+ *((grub_uint16_t *) addr) = value;
+ break;
+ case 1:
+ *((grub_uint8_t *) addr) = value;
+ break;
+ default:
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "wrong symbol size");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_efiemu_set_virtual_address_map (grub_efi_uintn_t memory_map_size,
+ grub_efi_uintn_t descriptor_size,
+ grub_efi_uint32_t descriptor_version
+ __attribute__ ((unused)),
+ grub_efi_memory_descriptor_t *virtual_map)
+{
+ grub_uint8_t *ptv_relocated;
+ struct grub_efiemu_ptv_rel *cur_relloc;
+ struct grub_efiemu_ptv_rel *ptv_rels;
+
+ ptv_relocated = grub_efiemu_mm_obtain_request (relocated_handle);
+ ptv_rels = grub_efiemu_mm_obtain_request (ptv_handle);
+
+ /* Ensure that we are called only once */
+ if (*ptv_relocated)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "EfiEmu is already relocated");
+ *ptv_relocated = 1;
+
+ /* Correct addresses using information supplied by grub */
+ for (cur_relloc = ptv_rels; cur_relloc->size; cur_relloc++)
+ {
+ grub_int64_t corr = 0;
+ grub_efi_memory_descriptor_t *descptr;
+
+ /* Compute correction */
+ for (descptr = virtual_map;
+ (grub_size_t) ((grub_uint8_t *) descptr
+ - (grub_uint8_t *) virtual_map) < memory_map_size;
+ descptr = (grub_efi_memory_descriptor_t *)
+ ((grub_uint8_t *) descptr + descriptor_size))
+ {
+ if (descptr->type == cur_relloc->plustype)
+ corr += descptr->virtual_start - descptr->physical_start;
+ if (descptr->type == cur_relloc->minustype)
+ corr -= descptr->virtual_start - descptr->physical_start;
+ }
+
+ /* Apply correction */
+ switch (cur_relloc->size)
+ {
+ case 8:
+ *((grub_uint64_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ case 4:
+ *((grub_uint32_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ case 2:
+ *((grub_uint16_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ case 1:
+ *((grub_uint8_t *) UINT_TO_PTR (cur_relloc->addr)) += corr;
+ break;
+ }
+ }
+
+ /* Recompute crc32 of system table and runtime services */
+
+ if (grub_efiemu_sizeof_uintn_t () == 4)
+ return grub_efiemu_crc32 ();
+ else
+ return grub_efiemu_crc64 ();
+}
diff --git a/grub-core/font/font.c b/grub-core/font/font.c
new file mode 100644
index 0000000..26eac4c
--- /dev/null
+++ b/grub-core/font/font.c
@@ -0,0 +1,1538 @@
+/* font.c - Font API and font file loader. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/bufio.h>
+#include <grub/dl.h>
+#include <grub/file.h>
+#include <grub/font.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/video.h>
+#include <grub/bitmap.h>
+#include <grub/charset.h>
+#include <grub/unicode.h>
+#include <grub/fontformat.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifdef USE_ASCII_FAILBACK
+#include "ascii.h"
+#endif
+
+#ifndef FONT_DEBUG
+#define FONT_DEBUG 0
+#endif
+
+struct char_index_entry
+{
+ grub_uint32_t code;
+ grub_uint8_t storage_flags;
+ grub_uint32_t offset;
+
+ /* Glyph if loaded, or NULL otherwise. */
+ struct grub_font_glyph *glyph;
+};
+
+#define FONT_WEIGHT_NORMAL 100
+#define FONT_WEIGHT_BOLD 200
+#define ASCII_BITMAP_SIZE 16
+
+struct grub_font
+{
+ char *name;
+ grub_file_t file;
+ char *family;
+ short point_size;
+ short weight;
+ short max_char_width;
+ short max_char_height;
+ short ascent;
+ short descent;
+ short leading;
+ grub_uint32_t num_chars;
+ struct char_index_entry *char_index;
+ grub_uint16_t *bmp_idx;
+};
+
+/* Definition of font registry. */
+struct grub_font_node *grub_font_list;
+
+static int register_font (grub_font_t font);
+static void font_init (grub_font_t font);
+static void free_font (grub_font_t font);
+static void remove_font (grub_font_t font);
+
+struct font_file_section
+{
+ /* The file this section is in. */
+ grub_file_t file;
+
+ /* FOURCC name of the section. */
+ char name[4];
+
+ /* Length of the section contents. */
+ grub_uint32_t length;
+
+ /* Set by open_section() on EOF. */
+ int eof;
+};
+
+/* Replace unknown glyphs with a rounded question mark. */
+static grub_uint8_t unknown_glyph_bitmap[] = {
+ /* 76543210 */
+ 0x7C, /* ooooo */
+ 0x82, /* o o */
+ 0xBA, /* o ooo o */
+ 0xAA, /* o o o o */
+ 0xAA, /* o o o o */
+ 0x8A, /* o o o */
+ 0x9A, /* o oo o */
+ 0x92, /* o o o */
+ 0x92, /* o o o */
+ 0x92, /* o o o */
+ 0x92, /* o o o */
+ 0x82, /* o o */
+ 0x92, /* o o o */
+ 0x82, /* o o */
+ 0x7C, /* ooooo */
+ 0x00 /* */
+};
+
+/* The "unknown glyph" glyph, used as a last resort. */
+static struct grub_font_glyph *unknown_glyph;
+
+/* The font structure used when no other font is loaded. This functions
+ as a "Null Object" pattern, so that code everywhere does not have to
+ check for a NULL grub_font_t to avoid dereferencing a null pointer. */
+static struct grub_font null_font;
+
+/* Flag to ensure module is initialized only once. */
+static grub_uint8_t font_loader_initialized;
+
+#ifdef USE_ASCII_FAILBACK
+static struct grub_font_glyph *ascii_font_glyph[0x80];
+#endif
+
+static struct grub_font_glyph *
+ascii_glyph_lookup (grub_uint32_t code)
+{
+#ifdef USE_ASCII_FAILBACK
+ static int ascii_failback_initialized = 0;
+
+ if (code >= 0x80)
+ return NULL;
+
+ if (ascii_failback_initialized == 0)
+ {
+ int current;
+ for (current = 0; current < 0x80; current++)
+ {
+ ascii_font_glyph[current] =
+ grub_malloc (sizeof (struct grub_font_glyph) + ASCII_BITMAP_SIZE);
+
+ ascii_font_glyph[current]->width = 8;
+ ascii_font_glyph[current]->height = 16;
+ ascii_font_glyph[current]->offset_x = 0;
+ ascii_font_glyph[current]->offset_y = -2;
+ ascii_font_glyph[current]->device_width = 8;
+ ascii_font_glyph[current]->font = NULL;
+
+ grub_memcpy (ascii_font_glyph[current]->bitmap,
+ &ascii_bitmaps[current * ASCII_BITMAP_SIZE],
+ ASCII_BITMAP_SIZE);
+ }
+
+ ascii_failback_initialized = 1;
+ }
+
+ return ascii_font_glyph[code];
+#else
+ (void) code;
+ return NULL;
+#endif
+}
+
+void
+grub_font_loader_init (void)
+{
+ /* Only initialize font loader once. */
+ if (font_loader_initialized)
+ return;
+
+ /* Make glyph for unknown glyph. */
+ unknown_glyph = grub_malloc (sizeof (struct grub_font_glyph)
+ + sizeof (unknown_glyph_bitmap));
+ if (!unknown_glyph)
+ return;
+
+ unknown_glyph->width = 8;
+ unknown_glyph->height = 16;
+ unknown_glyph->offset_x = 0;
+ unknown_glyph->offset_y = -3;
+ unknown_glyph->device_width = 8;
+ grub_memcpy (unknown_glyph->bitmap,
+ unknown_glyph_bitmap, sizeof (unknown_glyph_bitmap));
+
+ /* Initialize the null font. */
+ font_init (&null_font);
+ null_font.name = "<No Font>";
+ null_font.ascent = unknown_glyph->height - 3;
+ null_font.descent = 3;
+ null_font.max_char_width = unknown_glyph->width;
+ null_font.max_char_height = unknown_glyph->height;
+
+ font_loader_initialized = 1;
+}
+
+/* Initialize the font object with initial default values. */
+static void
+font_init (grub_font_t font)
+{
+ font->name = 0;
+ font->file = 0;
+ font->family = 0;
+ font->point_size = 0;
+ font->weight = 0;
+
+ /* Default leading value, not in font file yet. */
+ font->leading = 1;
+
+ font->max_char_width = 0;
+ font->max_char_height = 0;
+ font->ascent = 0;
+ font->descent = 0;
+ font->num_chars = 0;
+ font->char_index = 0;
+ font->bmp_idx = 0;
+}
+
+/* Open the next section in the file.
+
+ On success, the section name is stored in section->name and the length in
+ section->length, and 0 is returned. On failure, 1 is returned and
+ grub_errno is set appropriately with an error message.
+
+ If 1 is returned due to being at the end of the file, then section->eof is
+ set to 1; otherwise, section->eof is set to 0. */
+static int
+open_section (grub_file_t file, struct font_file_section *section)
+{
+ grub_ssize_t retval;
+ grub_uint32_t raw_length;
+
+ section->file = file;
+ section->eof = 0;
+
+ /* Read the FOURCC section name. */
+ retval = grub_file_read (file, section->name, 4);
+ if (retval >= 0 && retval < 4)
+ {
+ /* EOF encountered. */
+ section->eof = 1;
+ return 1;
+ }
+ else if (retval < 0)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "font format error: can't read section name");
+ return 1;
+ }
+
+ /* Read the big-endian 32-bit section length. */
+ retval = grub_file_read (file, &raw_length, 4);
+ if (retval >= 0 && retval < 4)
+ {
+ /* EOF encountered. */
+ section->eof = 1;
+ return 1;
+ }
+ else if (retval < 0)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "font format error: can't read section length");
+ return 1;
+ }
+
+ /* Convert byte-order and store in *length. */
+ section->length = grub_be_to_cpu32 (raw_length);
+
+ return 0;
+}
+
+/* Size in bytes of each character index (CHIX section)
+ entry in the font file. */
+#define FONT_CHAR_INDEX_ENTRY_SIZE (4 + 1 + 4)
+
+/* Load the character index (CHIX) section contents from the font file. This
+ presumes that the position of FILE is positioned immediately after the
+ section length for the CHIX section (i.e., at the start of the section
+ contents). Returns 0 upon success, nonzero for failure (in which case
+ grub_errno is set appropriately). */
+static int
+load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
+ grub_font *font)
+{
+ unsigned i;
+ grub_uint32_t last_code;
+
+#if FONT_DEBUG >= 2
+ grub_printf ("load_font_index(sect_length=%d)\n", sect_length);
+#endif
+
+ /* Sanity check: ensure section length is divisible by the entry size. */
+ if ((sect_length % FONT_CHAR_INDEX_ENTRY_SIZE) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "font file format error: character index length %d "
+ "is not a multiple of the entry size %d",
+ sect_length, FONT_CHAR_INDEX_ENTRY_SIZE);
+ return 1;
+ }
+
+ /* Calculate the number of characters. */
+ font->num_chars = sect_length / FONT_CHAR_INDEX_ENTRY_SIZE;
+
+ /* Allocate the character index array. */
+ font->char_index = grub_malloc (font->num_chars
+ * sizeof (struct char_index_entry));
+ if (!font->char_index)
+ return 1;
+ font->bmp_idx = grub_malloc (0x10000 * sizeof (grub_uint16_t));
+ if (!font->bmp_idx)
+ return 1;
+ grub_memset (font->bmp_idx, 0xff, 0x10000 * sizeof (grub_uint16_t));
+
+
+#if FONT_DEBUG >= 2
+ grub_printf ("num_chars=%d)\n", font->num_chars);
+#endif
+
+ last_code = 0;
+
+ /* Load the character index data from the file. */
+ for (i = 0; i < font->num_chars; i++)
+ {
+ struct char_index_entry *entry = &font->char_index[i];
+
+ /* Read code point value; convert to native byte order. */
+ if (grub_file_read (file, &entry->code, 4) != 4)
+ return 1;
+ entry->code = grub_be_to_cpu32 (entry->code);
+
+ /* Verify that characters are in ascending order. */
+ if (i != 0 && entry->code <= last_code)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "font characters not in ascending order: %u <= %u",
+ entry->code, last_code);
+ return 1;
+ }
+
+ if (entry->code < 0x10000)
+ font->bmp_idx[entry->code] = i;
+
+ last_code = entry->code;
+
+ /* Read storage flags byte. */
+ if (grub_file_read (file, &entry->storage_flags, 1) != 1)
+ return 1;
+
+ /* Read glyph data offset; convert to native byte order. */
+ if (grub_file_read (file, &entry->offset, 4) != 4)
+ return 1;
+ entry->offset = grub_be_to_cpu32 (entry->offset);
+
+ /* No glyph loaded. Will be loaded on demand and cached thereafter. */
+ entry->glyph = 0;
+
+#if FONT_DEBUG >= 5
+ /* Print the 1st 10 characters. */
+ if (i < 10)
+ grub_printf ("c=%d o=%d\n", entry->code, entry->offset);
+#endif
+ }
+
+ return 0;
+}
+
+/* Read the contents of the specified section as a string, which is
+ allocated on the heap. Returns 0 if there is an error. */
+static char *
+read_section_as_string (struct font_file_section *section)
+{
+ char *str;
+ grub_ssize_t ret;
+
+ str = grub_malloc (section->length + 1);
+ if (!str)
+ return 0;
+
+ ret = grub_file_read (section->file, str, section->length);
+ if (ret < 0 || ret != (grub_ssize_t) section->length)
+ {
+ grub_free (str);
+ return 0;
+ }
+
+ str[section->length] = '\0';
+ return str;
+}
+
+/* Read the contents of the current section as a 16-bit integer value,
+ which is stored into *VALUE.
+ Returns 0 upon success, nonzero upon failure. */
+static int
+read_section_as_short (struct font_file_section *section,
+ grub_int16_t * value)
+{
+ grub_uint16_t raw_value;
+
+ if (section->length != 2)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "font file format error: section %c%c%c%c length "
+ "is %d but should be 2",
+ section->name[0], section->name[1],
+ section->name[2], section->name[3], section->length);
+ return 1;
+ }
+ if (grub_file_read (section->file, &raw_value, 2) != 2)
+ return 1;
+
+ *value = grub_be_to_cpu16 (raw_value);
+ return 0;
+}
+
+/* Load a font and add it to the beginning of the global font list.
+ Returns 0 upon success, nonzero upon failure. */
+int
+grub_font_load (const char *filename)
+{
+ grub_file_t file = 0;
+ struct font_file_section section;
+ char magic[4];
+ grub_font_t font = 0;
+
+#if FONT_DEBUG >= 1
+ grub_printf ("add_font(%s)\n", filename);
+#endif
+
+ file = grub_buffile_open (filename, 1024);
+ if (!file)
+ goto fail;
+
+#if FONT_DEBUG >= 3
+ grub_printf ("file opened\n");
+#endif
+
+ /* Read the FILE section. It indicates the file format. */
+ if (open_section (file, &section) != 0)
+ goto fail;
+
+#if FONT_DEBUG >= 3
+ grub_printf ("opened FILE section\n");
+#endif
+ if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_FILE,
+ sizeof (FONT_FORMAT_SECTION_NAMES_FILE) - 1) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "font file format error: 1st section must be FILE");
+ goto fail;
+ }
+
+#if FONT_DEBUG >= 3
+ grub_printf ("section name ok\n");
+#endif
+ if (section.length != 4)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "font file format error (file type ID length is %d "
+ "but should be 4)", section.length);
+ goto fail;
+ }
+
+#if FONT_DEBUG >= 3
+ grub_printf ("section length ok\n");
+#endif
+ /* Check the file format type code. */
+ if (grub_file_read (file, magic, 4) != 4)
+ goto fail;
+
+#if FONT_DEBUG >= 3
+ grub_printf ("read magic ok\n");
+#endif
+
+ if (grub_memcmp (magic, FONT_FORMAT_PFF2_MAGIC, 4) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_FONT, "invalid font magic %x %x %x %x",
+ magic[0], magic[1], magic[2], magic[3]);
+ goto fail;
+ }
+
+#if FONT_DEBUG >= 3
+ grub_printf ("compare magic ok\n");
+#endif
+
+ /* Allocate the font object. */
+ font = (grub_font_t) grub_zalloc (sizeof (struct grub_font));
+ if (!font)
+ goto fail;
+
+ font_init (font);
+ font->file = file;
+
+#if FONT_DEBUG >= 3
+ grub_printf ("allocate font ok; loading font info\n");
+#endif
+
+ /* Load the font information. */
+ while (1)
+ {
+ if (open_section (file, &section) != 0)
+ {
+ if (section.eof)
+ break; /* Done reading the font file. */
+ else
+ goto fail;
+ }
+
+#if FONT_DEBUG >= 2
+ grub_printf ("opened section %c%c%c%c ok\n",
+ section.name[0], section.name[1],
+ section.name[2], section.name[3]);
+#endif
+
+ if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_FONT_NAME,
+ sizeof (FONT_FORMAT_SECTION_NAMES_FONT_NAME) - 1) == 0)
+ {
+ font->name = read_section_as_string (&section);
+ if (!font->name)
+ goto fail;
+ }
+ else if (grub_memcmp (section.name,
+ FONT_FORMAT_SECTION_NAMES_POINT_SIZE,
+ sizeof (FONT_FORMAT_SECTION_NAMES_POINT_SIZE) -
+ 1) == 0)
+ {
+ if (read_section_as_short (&section, &font->point_size) != 0)
+ goto fail;
+ }
+ else if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_WEIGHT,
+ sizeof (FONT_FORMAT_SECTION_NAMES_WEIGHT) - 1)
+ == 0)
+ {
+ char *wt;
+ wt = read_section_as_string (&section);
+ if (!wt)
+ continue;
+ /* Convert the weight string 'normal' or 'bold' into a number. */
+ if (grub_strcmp (wt, "normal") == 0)
+ font->weight = FONT_WEIGHT_NORMAL;
+ else if (grub_strcmp (wt, "bold") == 0)
+ font->weight = FONT_WEIGHT_BOLD;
+ grub_free (wt);
+ }
+ else if (grub_memcmp (section.name,
+ FONT_FORMAT_SECTION_NAMES_MAX_CHAR_WIDTH,
+ sizeof (FONT_FORMAT_SECTION_NAMES_MAX_CHAR_WIDTH)
+ - 1) == 0)
+ {
+ if (read_section_as_short (&section, &font->max_char_width) != 0)
+ goto fail;
+ }
+ else if (grub_memcmp (section.name,
+ FONT_FORMAT_SECTION_NAMES_MAX_CHAR_HEIGHT,
+ sizeof (FONT_FORMAT_SECTION_NAMES_MAX_CHAR_HEIGHT)
+ - 1) == 0)
+ {
+ if (read_section_as_short (&section, &font->max_char_height) != 0)
+ goto fail;
+ }
+ else if (grub_memcmp (section.name,
+ FONT_FORMAT_SECTION_NAMES_ASCENT,
+ sizeof (FONT_FORMAT_SECTION_NAMES_ASCENT) - 1)
+ == 0)
+ {
+ if (read_section_as_short (&section, &font->ascent) != 0)
+ goto fail;
+ }
+ else if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_DESCENT,
+ sizeof (FONT_FORMAT_SECTION_NAMES_DESCENT) - 1)
+ == 0)
+ {
+ if (read_section_as_short (&section, &font->descent) != 0)
+ goto fail;
+ }
+ else if (grub_memcmp (section.name,
+ FONT_FORMAT_SECTION_NAMES_CHAR_INDEX,
+ sizeof (FONT_FORMAT_SECTION_NAMES_CHAR_INDEX) -
+ 1) == 0)
+ {
+ if (load_font_index (file, section.length, font) != 0)
+ goto fail;
+ }
+ else if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_DATA,
+ sizeof (FONT_FORMAT_SECTION_NAMES_DATA) - 1) == 0)
+ {
+ /* When the DATA section marker is reached, we stop reading. */
+ break;
+ }
+ else
+ {
+ /* Unhandled section type, simply skip past it. */
+#if FONT_DEBUG >= 3
+ grub_printf ("Unhandled section type, skipping.\n");
+#endif
+ grub_off_t section_end = grub_file_tell (file) + section.length;
+ if ((int) grub_file_seek (file, section_end) == -1)
+ goto fail;
+ }
+ }
+
+ if (!font->name)
+ {
+ grub_printf ("Note: Font has no name.\n");
+ font->name = grub_strdup ("Unknown");
+ }
+
+#if FONT_DEBUG >= 1
+ grub_printf ("Loaded font `%s'.\n"
+ "Ascent=%d Descent=%d MaxW=%d MaxH=%d Number of characters=%d.\n",
+ font->name,
+ font->ascent, font->descent,
+ font->max_char_width, font->max_char_height, font->num_chars);
+#endif
+
+ if (font->max_char_width == 0
+ || font->max_char_height == 0
+ || font->num_chars == 0
+ || font->char_index == 0 || font->ascent == 0 || font->descent == 0)
+ {
+ grub_error (GRUB_ERR_BAD_FONT,
+ "invalid font file: missing some required data");
+ goto fail;
+ }
+
+ /* Add the font to the global font registry. */
+ if (register_font (font) != 0)
+ goto fail;
+
+ return 0;
+
+fail:
+ if (file)
+ grub_file_close (file);
+ if (font)
+ font->file = 0;
+
+ free_font (font);
+ return 1;
+}
+
+/* Read a 16-bit big-endian integer from FILE, convert it to native byte
+ order, and store it in *VALUE.
+ Returns 0 on success, 1 on failure. */
+static int
+read_be_uint16 (grub_file_t file, grub_uint16_t * value)
+{
+ if (grub_file_read (file, value, 2) != 2)
+ return 1;
+ *value = grub_be_to_cpu16 (*value);
+ return 0;
+}
+
+static int
+read_be_int16 (grub_file_t file, grub_int16_t * value)
+{
+ /* For the signed integer version, use the same code as for unsigned. */
+ return read_be_uint16 (file, (grub_uint16_t *) value);
+}
+
+/* Return a pointer to the character index entry for the glyph corresponding to
+ the codepoint CODE in the font FONT. If not found, return zero. */
+static inline struct char_index_entry *
+find_glyph (const grub_font_t font, grub_uint32_t code)
+{
+ struct char_index_entry *table;
+ grub_size_t lo;
+ grub_size_t hi;
+ grub_size_t mid;
+
+ table = font->char_index;
+
+ /* Use BMP index if possible. */
+ if (code < 0x10000 && font->bmp_idx)
+ {
+ if (font->bmp_idx[code] == 0xffff)
+ return 0;
+ return &table[font->bmp_idx[code]];
+ }
+
+ /* Do a binary search in `char_index', which is ordered by code point. */
+ lo = 0;
+ hi = font->num_chars - 1;
+
+ if (!table)
+ return 0;
+
+ while (lo <= hi)
+ {
+ mid = lo + (hi - lo) / 2;
+ if (code < table[mid].code)
+ hi = mid - 1;
+ else if (code > table[mid].code)
+ lo = mid + 1;
+ else
+ return &table[mid];
+ }
+
+ return 0;
+}
+
+/* Get a glyph for the Unicode character CODE in FONT. The glyph is loaded
+ from the font file if has not been loaded yet.
+ Returns a pointer to the glyph if found, or 0 if it is not found. */
+static struct grub_font_glyph *
+grub_font_get_glyph_internal (grub_font_t font, grub_uint32_t code)
+{
+ struct char_index_entry *index_entry;
+
+ index_entry = find_glyph (font, code);
+ if (index_entry)
+ {
+ struct grub_font_glyph *glyph = 0;
+ grub_uint16_t width;
+ grub_uint16_t height;
+ grub_int16_t xoff;
+ grub_int16_t yoff;
+ grub_int16_t dwidth;
+ int len;
+
+ if (index_entry->glyph)
+ /* Return cached glyph. */
+ return index_entry->glyph;
+
+ if (!font->file)
+ /* No open file, can't load any glyphs. */
+ return 0;
+
+ /* Make sure we can find glyphs for error messages. Push active
+ error message to error stack and reset error message. */
+ grub_error_push ();
+
+ grub_file_seek (font->file, index_entry->offset);
+
+ /* Read the glyph width, height, and baseline. */
+ if (read_be_uint16 (font->file, &width) != 0
+ || read_be_uint16 (font->file, &height) != 0
+ || read_be_int16 (font->file, &xoff) != 0
+ || read_be_int16 (font->file, &yoff) != 0
+ || read_be_int16 (font->file, &dwidth) != 0)
+ {
+ remove_font (font);
+ return 0;
+ }
+
+ len = (width * height + 7) / 8;
+ glyph = grub_malloc (sizeof (struct grub_font_glyph) + len);
+ if (!glyph)
+ {
+ remove_font (font);
+ return 0;
+ }
+
+ glyph->font = font;
+ glyph->width = width;
+ glyph->height = height;
+ glyph->offset_x = xoff;
+ glyph->offset_y = yoff;
+ glyph->device_width = dwidth;
+
+ /* Don't try to read empty bitmaps (e.g., space characters). */
+ if (len != 0)
+ {
+ if (grub_file_read (font->file, glyph->bitmap, len) != len)
+ {
+ remove_font (font);
+ return 0;
+ }
+ }
+
+ /* Restore old error message. */
+ grub_error_pop ();
+
+ /* Cache the glyph. */
+ index_entry->glyph = glyph;
+
+ return glyph;
+ }
+
+ return 0;
+}
+
+/* Free the memory used by FONT.
+ This should not be called if the font has been made available to
+ users (once it is added to the global font list), since there would
+ be the possibility of a dangling pointer. */
+static void
+free_font (grub_font_t font)
+{
+ if (font)
+ {
+ if (font->file)
+ grub_file_close (font->file);
+ grub_free (font->name);
+ grub_free (font->family);
+ grub_free (font->char_index);
+ grub_free (font->bmp_idx);
+ grub_free (font);
+ }
+}
+
+/* Add FONT to the global font registry.
+ Returns 0 upon success, nonzero on failure
+ (the font was not registered). */
+static int
+register_font (grub_font_t font)
+{
+ struct grub_font_node *node = 0;
+
+ node = grub_malloc (sizeof (struct grub_font_node));
+ if (!node)
+ return 1;
+
+ node->value = font;
+ node->next = grub_font_list;
+ grub_font_list = node;
+
+ return 0;
+}
+
+/* Remove the font from the global font list. We don't actually free the
+ font's memory since users could be holding references to the font. */
+static void
+remove_font (grub_font_t font)
+{
+ struct grub_font_node **nextp, *cur;
+
+ for (nextp = &grub_font_list, cur = *nextp;
+ cur; nextp = &cur->next, cur = cur->next)
+ {
+ if (cur->value == font)
+ {
+ *nextp = cur->next;
+
+ /* Free the node, but not the font itself. */
+ grub_free (cur);
+
+ return;
+ }
+ }
+}
+
+/* Get a font from the list of loaded fonts. This function will return
+ another font if the requested font is not available. If no fonts are
+ loaded, then a special 'null font' is returned, which contains no glyphs,
+ but is not a null pointer so the caller may omit checks for NULL. */
+grub_font_t
+grub_font_get (const char *font_name)
+{
+ struct grub_font_node *node;
+
+ for (node = grub_font_list; node; node = node->next)
+ {
+ grub_font_t font = node->value;
+ if (grub_strcmp (font->name, font_name) == 0)
+ return font;
+ }
+
+ /* If no font by that name is found, return the first font in the list
+ as a fallback. */
+ if (grub_font_list && grub_font_list->value)
+ return grub_font_list->value;
+ else
+ /* The null_font is a last resort. */
+ return &null_font;
+}
+
+/* Get the full name of the font. */
+const char *
+grub_font_get_name (grub_font_t font)
+{
+ return font->name;
+}
+
+/* Get the maximum width of any character in the font in pixels. */
+int
+grub_font_get_max_char_width (grub_font_t font)
+{
+ return font->max_char_width;
+}
+
+/* Get the maximum height of any character in the font in pixels. */
+int
+grub_font_get_max_char_height (grub_font_t font)
+{
+ return font->max_char_height;
+}
+
+/* Get the distance in pixels from the top of characters to the baseline. */
+int
+grub_font_get_ascent (grub_font_t font)
+{
+ return font->ascent;
+}
+
+/* Get the distance in pixels from the baseline to the lowest descenders
+ (for instance, in a lowercase 'y', 'g', etc.). */
+int
+grub_font_get_descent (grub_font_t font)
+{
+ return font->descent;
+}
+
+/* FIXME: not correct for all fonts. */
+int
+grub_font_get_xheight (grub_font_t font)
+{
+ return font->ascent / 2;
+}
+
+/* Get the *standard leading* of the font in pixel, which is the spacing
+ between two lines of text. Specifically, it is the space between the
+ descent of one line and the ascent of the next line. This is included
+ in the *height* metric. */
+int
+grub_font_get_leading (grub_font_t font)
+{
+ return font->leading;
+}
+
+/* Get the distance in pixels between baselines of adjacent lines of text. */
+int
+grub_font_get_height (grub_font_t font)
+{
+ return font->ascent + font->descent + font->leading;
+}
+
+/* Get the glyph for FONT corresponding to the Unicode code point CODE.
+ Returns the ASCII glyph for the code if no other fonts are available.
+ The glyphs are cached once loaded. */
+struct grub_font_glyph *
+grub_font_get_glyph (grub_font_t font, grub_uint32_t code)
+{
+ struct grub_font_glyph *glyph = 0;
+ if (font)
+ glyph = grub_font_get_glyph_internal (font, code);
+ if (glyph == 0)
+ {
+ glyph = ascii_glyph_lookup (code);
+ }
+ return glyph;
+}
+
+
+/* Calculate a subject value representing "how similar" two fonts are.
+ This is used to prioritize the order that fonts are scanned for missing
+ glyphs. The object is to select glyphs from the most similar font
+ possible, for the best appearance.
+ The heuristic is crude, but it helps greatly when fonts of similar
+ sizes are used so that tiny 8 point glyphs are not mixed into a string
+ of 24 point text unless there is no other choice. */
+static int
+get_font_diversity (grub_font_t a, grub_font_t b)
+{
+ int d;
+
+ d = 0;
+
+ if (a->ascent && b->ascent)
+ d += grub_abs (a->ascent - b->ascent) * 8;
+ else
+ /* Penalty for missing attributes. */
+ d += 50;
+
+ if (a->max_char_height && b->max_char_height)
+ d += grub_abs (a->max_char_height - b->max_char_height) * 8;
+ else
+ /* Penalty for missing attributes. */
+ d += 50;
+
+ /* Weight is a minor factor. */
+ d += (a->weight != b->weight) ? 5 : 0;
+
+ return d;
+}
+
+/* Get a glyph corresponding to the codepoint CODE. If FONT contains the
+ specified glyph, then it is returned. Otherwise, all other loaded fonts
+ are searched until one is found that contains a glyph for CODE.
+ If no glyph is available for CODE in the loaded fonts, then a glyph
+ representing an unknown character is returned.
+ This function never returns NULL.
+ The returned glyph is owned by the font manager and should not be freed
+ by the caller. The glyphs are cached. */
+struct grub_font_glyph *
+grub_font_get_glyph_with_fallback (grub_font_t font, grub_uint32_t code)
+{
+ struct grub_font_glyph *glyph;
+ struct grub_font_node *node;
+ /* Keep track of next node, in case there's an I/O error in
+ grub_font_get_glyph_internal() and the font is removed from the list. */
+ struct grub_font_node *next;
+ /* Information on the best glyph found so far, to help find the glyph in
+ the best matching to the requested one. */
+ int best_diversity;
+ struct grub_font_glyph *best_glyph;
+
+ if (font)
+ {
+ /* First try to get the glyph from the specified font. */
+ glyph = grub_font_get_glyph_internal (font, code);
+ if (glyph)
+ return glyph;
+ }
+
+ /* Otherwise, search all loaded fonts for the glyph and use the one from
+ the font that best matches the requested font. */
+ best_diversity = 10000;
+ best_glyph = 0;
+
+ for (node = grub_font_list; node; node = next)
+ {
+ grub_font_t curfont;
+
+ curfont = node->value;
+ next = node->next;
+
+ glyph = grub_font_get_glyph_internal (curfont, code);
+ if (glyph && !font)
+ return glyph;
+ if (glyph)
+ {
+ int d;
+
+ d = get_font_diversity (curfont, font);
+ if (d < best_diversity)
+ {
+ best_diversity = d;
+ best_glyph = glyph;
+ }
+ }
+ }
+
+ return best_glyph;
+}
+
+static struct grub_font_glyph *
+grub_font_dup_glyph (struct grub_font_glyph *glyph)
+{
+ static struct grub_font_glyph *ret;
+ ret = grub_malloc (sizeof (*ret) + (glyph->width * glyph->height + 7) / 8);
+ if (!ret)
+ return NULL;
+ grub_memcpy (ret, glyph, sizeof (*ret)
+ + (glyph->width * glyph->height + 7) / 8);
+ return ret;
+}
+
+/* FIXME: suboptimal. */
+static void
+grub_font_blit_glyph (struct grub_font_glyph *target,
+ struct grub_font_glyph *src, unsigned dx, unsigned dy)
+{
+ unsigned src_bit, tgt_bit, src_byte, tgt_byte;
+ unsigned i, j;
+ for (i = 0; i < src->height; i++)
+ {
+ src_bit = (src->width * i) % 8;
+ src_byte = (src->width * i) / 8;
+ tgt_bit = (target->width * (dy + i) + dx) % 8;
+ tgt_byte = (target->width * (dy + i) + dx) / 8;
+ for (j = 0; j < src->width; j++)
+ {
+ target->bitmap[tgt_byte] |= ((src->bitmap[src_byte] << src_bit)
+ & 0x80) >> tgt_bit;
+ src_bit++;
+ tgt_bit++;
+ if (src_bit == 8)
+ {
+ src_byte++;
+ src_bit = 0;
+ }
+ if (tgt_bit == 8)
+ {
+ tgt_byte++;
+ tgt_bit = 0;
+ }
+ }
+ }
+}
+
+static void
+grub_font_blit_glyph_mirror (struct grub_font_glyph *target,
+ struct grub_font_glyph *src,
+ unsigned dx, unsigned dy)
+{
+ unsigned tgt_bit, src_byte, tgt_byte;
+ signed src_bit;
+ unsigned i, j;
+ for (i = 0; i < src->height; i++)
+ {
+ src_bit = (src->width * i + src->width - 1) % 8;
+ src_byte = (src->width * i + src->width - 1) / 8;
+ tgt_bit = (target->width * (dy + i) + dx) % 8;
+ tgt_byte = (target->width * (dy + i) + dx) / 8;
+ for (j = 0; j < src->width; j++)
+ {
+ target->bitmap[tgt_byte] |= ((src->bitmap[src_byte] << src_bit)
+ & 0x80) >> tgt_bit;
+ src_bit--;
+ tgt_bit++;
+ if (src_bit == -1)
+ {
+ src_byte--;
+ src_bit = 7;
+ }
+ if (tgt_bit == 8)
+ {
+ tgt_byte++;
+ tgt_bit = 0;
+ }
+ }
+ }
+}
+
+static void
+blit_comb (const struct grub_unicode_glyph *glyph_id,
+ struct grub_font_glyph *glyph,
+ struct grub_video_signed_rect *bounds_out,
+ struct grub_font_glyph *main_glyph,
+ struct grub_font_glyph **combining_glyphs, int *device_width)
+{
+ struct grub_video_signed_rect bounds;
+ unsigned i;
+ signed above_rightx, above_righty;
+ signed above_leftx, above_lefty;
+ signed below_rightx, below_righty;
+ signed min_devwidth = 0;
+ auto void NESTED_FUNC_ATTR do_blit (struct grub_font_glyph *src,
+ signed dx, signed dy);
+ void NESTED_FUNC_ATTR do_blit (struct grub_font_glyph *src,
+ signed dx, signed dy)
+ {
+ if (glyph)
+ grub_font_blit_glyph (glyph, src, dx - glyph->offset_x,
+ (glyph->height + glyph->offset_y) + dy);
+ if (dx < bounds.x)
+ {
+ bounds.width += bounds.x - dx;
+ bounds.x = dx;
+ }
+ if (bounds.y > -src->height - dy)
+ {
+ bounds.height += bounds.y - (-src->height - dy);
+ bounds.y = (-src->height - dy);
+ }
+ if (dx + src->width - bounds.x >= (signed) bounds.width)
+ bounds.width = dx + src->width - bounds.x + 1;
+ if ((signed) bounds.height < src->height + (-src->height - dy) - bounds.y)
+ bounds.height = src->height + (-src->height - dy) - bounds.y;
+ }
+
+ auto void add_device_width (int val);
+ void add_device_width (int val)
+ {
+ if (glyph)
+ glyph->device_width += val;
+ if (device_width)
+ *device_width += val;
+ }
+
+ if (glyph)
+ glyph->device_width = main_glyph->device_width;
+ if (device_width)
+ *device_width = main_glyph->device_width;
+
+ bounds.x = main_glyph->offset_x;
+ bounds.y = main_glyph->offset_y;
+ bounds.width = main_glyph->width;
+ bounds.height = main_glyph->height;
+
+ above_rightx = main_glyph->offset_x + main_glyph->width;
+ above_righty = bounds.y + bounds.height;
+
+ above_leftx = main_glyph->offset_x;
+ above_lefty = bounds.y + bounds.height;
+
+ below_rightx = bounds.x + bounds.width;
+ below_righty = bounds.y;
+
+ for (i = 0; i < glyph_id->ncomb; i++)
+ {
+ grub_int16_t space = 0;
+ /* Center by default. */
+ grub_int16_t targetx;
+
+ if (!combining_glyphs[i])
+ continue;
+ targetx = (bounds.width - combining_glyphs[i]->width) / 2 + bounds.x;
+ /* CGJ is to avoid diacritics reordering. */
+ if (glyph_id->combining[i].code
+ == GRUB_UNICODE_COMBINING_GRAPHEME_JOINER)
+ continue;
+ switch (glyph_id->combining[i].type)
+ {
+ case GRUB_UNICODE_COMB_OVERLAY:
+ do_blit (combining_glyphs[i],
+ targetx,
+ (bounds.height - combining_glyphs[i]->height) / 2
+ - (bounds.height + bounds.y));
+ if (min_devwidth < combining_glyphs[i]->width)
+ min_devwidth = combining_glyphs[i]->width;
+ break;
+
+ case GRUB_UNICODE_COMB_ATTACHED_ABOVE_RIGHT:
+ do_blit (combining_glyphs[i], above_rightx, -above_righty);
+ above_rightx += combining_glyphs[i]->width;
+ break;
+
+ case GRUB_UNICODE_COMB_ABOVE_RIGHT:
+ do_blit (combining_glyphs[i], above_rightx,
+ -(above_righty + combining_glyphs[i]->height));
+ above_rightx += combining_glyphs[i]->width;
+ break;
+
+ case GRUB_UNICODE_COMB_ABOVE_LEFT:
+ above_leftx -= combining_glyphs[i]->width;
+ do_blit (combining_glyphs[i], above_leftx,
+ -(above_lefty + combining_glyphs[i]->height));
+ break;
+
+ case GRUB_UNICODE_COMB_BELOW_RIGHT:
+ do_blit (combining_glyphs[i], below_rightx, below_righty);
+ below_rightx += combining_glyphs[i]->width;
+ break;
+
+ case GRUB_UNICODE_COMB_HEBREW_HOLAM:
+ if (glyph_id->base != GRUB_UNICODE_HEBREW_WAW)
+ targetx =
+ main_glyph->offset_x - combining_glyphs[i]->width -
+ (combining_glyphs[i]->width + 3) / 4;
+ goto above_on_main;
+
+ case GRUB_UNICODE_COMB_HEBREW_SIN_DOT:
+ targetx = main_glyph->offset_x + combining_glyphs[i]->width / 4;
+ goto above_on_main;
+
+ case GRUB_UNICODE_COMB_HEBREW_SHIN_DOT:
+ targetx =
+ main_glyph->width + main_glyph->offset_x -
+ combining_glyphs[i]->width;
+ above_on_main:
+ space = combining_glyphs[i]->offset_y
+ - grub_font_get_xheight (combining_glyphs[i]->font) - 1;
+ if (space <= 0)
+ space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
+ do_blit (combining_glyphs[i], targetx,
+ -(main_glyph->height + main_glyph->offset_y + space
+ + combining_glyphs[i]->height));
+ if (min_devwidth < combining_glyphs[i]->width)
+ min_devwidth = combining_glyphs[i]->width;
+ break;
+
+ /* TODO: Put dammah, fathah and alif nearer to shadda. */
+ case GRUB_UNICODE_COMB_SYRIAC_SUPERSCRIPT_ALAPH:
+ case GRUB_UNICODE_COMB_ARABIC_DAMMAH:
+ case GRUB_UNICODE_COMB_ARABIC_DAMMATAN:
+ case GRUB_UNICODE_COMB_ARABIC_FATHATAN:
+ case GRUB_UNICODE_COMB_ARABIC_FATHAH:
+ case GRUB_UNICODE_COMB_ARABIC_SUPERSCRIPT_ALIF:
+ case GRUB_UNICODE_COMB_ARABIC_SUKUN:
+ case GRUB_UNICODE_COMB_ARABIC_SHADDA:
+ case GRUB_UNICODE_COMB_HEBREW_RAFE:
+ case GRUB_UNICODE_STACK_ABOVE:
+ stacked_above:
+ space = combining_glyphs[i]->offset_y
+ - grub_font_get_xheight (combining_glyphs[i]->font) - 1;
+ if (space <= 0)
+ space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
+
+ case GRUB_UNICODE_STACK_ATTACHED_ABOVE:
+ do_blit (combining_glyphs[i], targetx,
+ -(bounds.height + bounds.y + space
+ + combining_glyphs[i]->height));
+ if (min_devwidth < combining_glyphs[i]->width)
+ min_devwidth = combining_glyphs[i]->width;
+ break;
+
+ case GRUB_UNICODE_COMB_HEBREW_SHEVA:
+ case GRUB_UNICODE_COMB_HEBREW_HIRIQ:
+ case GRUB_UNICODE_COMB_HEBREW_QAMATS:
+ case GRUB_UNICODE_COMB_HEBREW_TSERE:
+ case GRUB_UNICODE_COMB_HEBREW_SEGOL:
+ /* TODO: placement in final kaf and under reish. */
+
+ case GRUB_UNICODE_COMB_HEBREW_HATAF_SEGOL:
+ case GRUB_UNICODE_COMB_HEBREW_HATAF_PATAH:
+ case GRUB_UNICODE_COMB_HEBREW_HATAF_QAMATS:
+ case GRUB_UNICODE_COMB_HEBREW_PATAH:
+ case GRUB_UNICODE_COMB_HEBREW_QUBUTS:
+ case GRUB_UNICODE_COMB_HEBREW_METEG:
+ /* TODO: Put kasra and kasratan under shadda. */
+ case GRUB_UNICODE_COMB_ARABIC_KASRA:
+ case GRUB_UNICODE_COMB_ARABIC_KASRATAN:
+ /* I don't know how ypogegrammeni differs from subscript. */
+ case GRUB_UNICODE_COMB_YPOGEGRAMMENI:
+ case GRUB_UNICODE_STACK_BELOW:
+ stacked_below:
+ space = -(combining_glyphs[i]->offset_y
+ + combining_glyphs[i]->height);
+ if (space <= 0)
+ space = 1 + (grub_font_get_xheight (main_glyph->font)) / 8;
+
+ case GRUB_UNICODE_STACK_ATTACHED_BELOW:
+ do_blit (combining_glyphs[i], targetx, -(bounds.y - space));
+ if (min_devwidth < combining_glyphs[i]->width)
+ min_devwidth = combining_glyphs[i]->width;
+ break;
+
+ case GRUB_UNICODE_COMB_MN:
+ switch (glyph_id->combining[i].code)
+ {
+ case GRUB_UNICODE_THAANA_ABAFILI:
+ case GRUB_UNICODE_THAANA_AABAAFILI:
+ case GRUB_UNICODE_THAANA_UBUFILI:
+ case GRUB_UNICODE_THAANA_OOBOOFILI:
+ case GRUB_UNICODE_THAANA_EBEFILI:
+ case GRUB_UNICODE_THAANA_EYBEYFILI:
+ case GRUB_UNICODE_THAANA_OBOFILI:
+ case GRUB_UNICODE_THAANA_OABOAFILI:
+ case GRUB_UNICODE_THAANA_SUKUN:
+ goto stacked_above;
+ case GRUB_UNICODE_THAANA_IBIFILI:
+ case GRUB_UNICODE_THAANA_EEBEEFILI:
+ goto stacked_below;
+ }
+ /* Fall through. */
+ default:
+ {
+ /* Default handling. Just draw combining character on top
+ of base character.
+ FIXME: support more unicode types correctly.
+ */
+ do_blit (combining_glyphs[i],
+ main_glyph->device_width
+ + combining_glyphs[i]->offset_x,
+ -(combining_glyphs[i]->height
+ + combining_glyphs[i]->offset_y));
+ add_device_width (combining_glyphs[i]->device_width);
+ }
+ }
+ }
+ add_device_width ((above_rightx >
+ below_rightx ? above_rightx : below_rightx) -
+ (main_glyph->offset_x + main_glyph->width));
+ add_device_width (above_leftx - main_glyph->offset_x);
+ if (glyph && glyph->device_width < min_devwidth)
+ glyph->device_width = min_devwidth;
+ if (device_width && *device_width < min_devwidth)
+ *device_width = min_devwidth;
+
+ if (bounds_out)
+ *bounds_out = bounds;
+}
+
+static struct grub_font_glyph *
+grub_font_construct_dry_run (grub_font_t hinted_font,
+ const struct grub_unicode_glyph *glyph_id,
+ struct grub_video_signed_rect *bounds,
+ struct grub_font_glyph ***combining_glyphs_out,
+ int *device_width)
+{
+ struct grub_font_glyph *main_glyph = NULL;
+ struct grub_font_glyph **combining_glyphs;
+ grub_uint32_t desired_attributes = 0;
+
+ if (combining_glyphs_out)
+ *combining_glyphs_out = NULL;
+
+ if (glyph_id->attributes & GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED)
+ desired_attributes |= GRUB_FONT_CODE_RIGHT_JOINED;
+
+ if (glyph_id->attributes & GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED)
+ desired_attributes |= GRUB_FONT_CODE_LEFT_JOINED;
+
+ main_glyph = grub_font_get_glyph_with_fallback (hinted_font, glyph_id->base
+ | desired_attributes);
+
+ if (!main_glyph)
+ main_glyph = grub_font_get_glyph_with_fallback (hinted_font,
+ glyph_id->base);
+
+ /* Glyph not available in any font. Use ASCII fallback. */
+ if (!main_glyph)
+ main_glyph = ascii_glyph_lookup (glyph_id->base);
+
+ /* Glyph not available in any font. Return unknown glyph. */
+ if (!main_glyph)
+ return NULL;
+
+ if (device_width)
+ *device_width = main_glyph->device_width;
+
+ if (!glyph_id->ncomb && !glyph_id->attributes)
+ return main_glyph;
+
+ combining_glyphs = grub_malloc (sizeof (combining_glyphs[0])
+ * glyph_id->ncomb);
+ if (glyph_id->ncomb && !combining_glyphs)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return main_glyph;
+ }
+
+ {
+ unsigned i;
+ for (i = 0; i < glyph_id->ncomb; i++)
+ combining_glyphs[i]
+ = grub_font_get_glyph_with_fallback (main_glyph->font,
+ glyph_id->combining[i].code);
+ }
+
+ blit_comb (glyph_id, NULL, bounds, main_glyph, combining_glyphs,
+ device_width);
+ if (combining_glyphs_out)
+ *combining_glyphs_out = combining_glyphs;
+ else
+ grub_free (combining_glyphs);
+
+ return main_glyph;
+}
+
+int
+grub_font_get_constructed_device_width (grub_font_t hinted_font,
+ const struct grub_unicode_glyph
+ *glyph_id)
+{
+ int ret;
+ struct grub_font_glyph *main_glyph;
+ main_glyph = grub_font_construct_dry_run (hinted_font, glyph_id, NULL,
+ NULL, &ret);
+ if (!main_glyph)
+ return unknown_glyph->device_width;
+ return ret;
+}
+
+struct grub_font_glyph *
+grub_font_construct_glyph (grub_font_t hinted_font,
+ const struct grub_unicode_glyph *glyph_id)
+{
+ struct grub_font_glyph *main_glyph;
+ struct grub_video_signed_rect bounds;
+ struct grub_font_glyph *glyph;
+ struct grub_font_glyph **combining_glyphs;
+
+ main_glyph = grub_font_construct_dry_run (hinted_font, glyph_id,
+ &bounds, &combining_glyphs, NULL);
+
+ if (!main_glyph)
+ return grub_font_dup_glyph (unknown_glyph);
+
+ if (!combining_glyphs)
+ return grub_font_dup_glyph (main_glyph);
+
+ glyph =
+ grub_zalloc (sizeof (*glyph) + (bounds.width * bounds.height + 7) / 8);
+ if (!glyph)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return grub_font_dup_glyph (main_glyph);
+ }
+
+ glyph->font = main_glyph->font;
+ glyph->width = bounds.width;
+ glyph->height = bounds.height;
+ glyph->offset_x = bounds.x;
+ glyph->offset_y = bounds.y;
+
+ if (glyph_id->attributes & GRUB_UNICODE_GLYPH_ATTRIBUTE_MIRROR)
+ grub_font_blit_glyph_mirror (glyph, main_glyph,
+ main_glyph->offset_x - glyph->offset_x,
+ (glyph->height + glyph->offset_y)
+ - (main_glyph->height +
+ main_glyph->offset_y));
+ else
+ grub_font_blit_glyph (glyph, main_glyph,
+ main_glyph->offset_x - glyph->offset_x,
+ (glyph->height + glyph->offset_y)
+ - (main_glyph->height + main_glyph->offset_y));
+
+ blit_comb (glyph_id, glyph, NULL, main_glyph, combining_glyphs, NULL);
+
+ return glyph;
+}
+
+/* Draw the specified glyph at (x, y). The y coordinate designates the
+ baseline of the character, while the x coordinate designates the left
+ side location of the character. */
+grub_err_t
+grub_font_draw_glyph (struct grub_font_glyph * glyph,
+ grub_video_color_t color, int left_x, int baseline_y)
+{
+ struct grub_video_bitmap glyph_bitmap;
+
+ /* Don't try to draw empty glyphs (U+0020, etc.). */
+ if (glyph->width == 0 || glyph->height == 0)
+ return GRUB_ERR_NONE;
+
+ glyph_bitmap.mode_info.width = glyph->width;
+ glyph_bitmap.mode_info.height = glyph->height;
+ glyph_bitmap.mode_info.mode_type
+ = (1 << GRUB_VIDEO_MODE_TYPE_DEPTH_POS) | GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP;
+ glyph_bitmap.mode_info.blit_format = GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED;
+ glyph_bitmap.mode_info.bpp = 1;
+
+ /* Really 1 bit per pixel. */
+ glyph_bitmap.mode_info.bytes_per_pixel = 0;
+
+ /* Packed densely as bits. */
+ glyph_bitmap.mode_info.pitch = glyph->width;
+
+ glyph_bitmap.mode_info.number_of_colors = 2;
+ glyph_bitmap.mode_info.bg_red = 0;
+ glyph_bitmap.mode_info.bg_green = 0;
+ glyph_bitmap.mode_info.bg_blue = 0;
+ glyph_bitmap.mode_info.bg_alpha = 0;
+ grub_video_unmap_color (color,
+ &glyph_bitmap.mode_info.fg_red,
+ &glyph_bitmap.mode_info.fg_green,
+ &glyph_bitmap.mode_info.fg_blue,
+ &glyph_bitmap.mode_info.fg_alpha);
+ glyph_bitmap.data = glyph->bitmap;
+
+ int bitmap_left = left_x + glyph->offset_x;
+ int bitmap_bottom = baseline_y - glyph->offset_y;
+ int bitmap_top = bitmap_bottom - glyph->height;
+
+ return grub_video_blit_bitmap (&glyph_bitmap, GRUB_VIDEO_BLIT_BLEND,
+ bitmap_left, bitmap_top,
+ 0, 0, glyph->width, glyph->height);
+}
diff --git a/grub-core/font/font_cmd.c b/grub-core/font/font_cmd.c
new file mode 100644
index 0000000..98f0b88
--- /dev/null
+++ b/grub-core/font/font_cmd.c
@@ -0,0 +1,84 @@
+/* font_cmd.c - Font command definition. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/font.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+static grub_err_t
+loadfont_command (grub_command_t cmd __attribute__ ((unused)),
+ int argc,
+ char **args)
+{
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no font specified");
+
+ while (argc--)
+ if (grub_font_load (*args++) != 0)
+ {
+ if (!grub_errno)
+ return grub_error (GRUB_ERR_BAD_FONT, "invalid font");
+ return grub_errno;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+lsfonts_command (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ struct grub_font_node *node;
+
+ grub_printf ("Loaded fonts:\n");
+ for (node = grub_font_list; node; node = node->next)
+ {
+ grub_font_t font = node->value;
+ grub_printf ("%s\n", grub_font_get_name (font));
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd_loadfont, cmd_lsfonts;
+
+GRUB_MOD_INIT(font)
+{
+ grub_font_loader_init ();
+
+ cmd_loadfont =
+ grub_register_command ("loadfont", loadfont_command,
+ N_("FILE..."),
+ N_("Specify one or more font files to load."));
+ cmd_lsfonts =
+ grub_register_command ("lsfonts", lsfonts_command,
+ 0, N_("List the loaded fonts."));
+}
+
+GRUB_MOD_FINI(font)
+{
+ /* TODO: Determine way to free allocated resources.
+ Warning: possible pointer references could be in use. */
+
+ grub_unregister_command (cmd_loadfont);
+ grub_unregister_command (cmd_lsfonts);
+}
diff --git a/grub-core/fs/affs.c b/grub-core/fs/affs.c
new file mode 100644
index 0000000..1c4f80e
--- /dev/null
+++ b/grub-core/fs/affs.c
@@ -0,0 +1,555 @@
+/* affs.c - Amiga Fast FileSystem. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* The affs bootblock. */
+struct grub_affs_bblock
+{
+ grub_uint8_t type[3];
+ grub_uint8_t flags;
+ grub_uint32_t checksum;
+ grub_uint32_t rootblock;
+} __attribute__ ((packed));
+
+/* Set if the filesystem is a AFFS filesystem. Otherwise this is an
+ OFS filesystem. */
+#define GRUB_AFFS_FLAG_FFS 1
+
+/* The affs rootblock. */
+struct grub_affs_rblock
+{
+ grub_uint8_t type[4];
+ grub_uint8_t unused1[8];
+ grub_uint32_t htsize;
+ grub_uint32_t unused2;
+ grub_uint32_t checksum;
+ grub_uint32_t hashtable[1];
+} __attribute__ ((packed));
+
+/* The second part of a file header block. */
+struct grub_affs_file
+{
+ grub_uint8_t unused1[12];
+ grub_uint32_t size;
+ grub_uint8_t unused2[104];
+ grub_uint8_t namelen;
+ grub_uint8_t name[30];
+ grub_uint8_t unused3[33];
+ grub_uint32_t next;
+ grub_uint32_t parent;
+ grub_uint32_t extension;
+ grub_int32_t type;
+} __attribute__ ((packed));
+
+/* The location of `struct grub_affs_file' relative to the end of a
+ file header block. */
+#define GRUB_AFFS_FILE_LOCATION 200
+
+/* The offset in both the rootblock and the file header block for the
+ hashtable, symlink and block pointers (all synonyms). */
+#define GRUB_AFFS_HASHTABLE_OFFSET 24
+#define GRUB_AFFS_BLOCKPTR_OFFSET 24
+#define GRUB_AFFS_SYMLINK_OFFSET 24
+
+#define GRUB_AFFS_SYMLINK_SIZE(blocksize) ((blocksize) - 225)
+
+#define GRUB_AFFS_FILETYPE_DIR -3
+#define GRUB_AFFS_FILETYPE_REG 2
+#define GRUB_AFFS_FILETYPE_SYMLINK 3
+
+
+struct grub_fshelp_node
+{
+ struct grub_affs_data *data;
+ int block;
+ int size;
+ int parent;
+};
+
+/* Information about a "mounted" affs filesystem. */
+struct grub_affs_data
+{
+ struct grub_affs_bblock bblock;
+ struct grub_fshelp_node diropen;
+ grub_disk_t disk;
+
+ /* Blocksize in sectors. */
+ int blocksize;
+
+ /* The number of entries in the hashtable. */
+ int htsize;
+};
+
+static grub_dl_t my_mod;
+
+
+static grub_disk_addr_t
+grub_affs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ int links;
+ grub_uint32_t pos;
+ int block = node->block;
+ struct grub_affs_file file;
+ struct grub_affs_data *data = node->data;
+ grub_uint32_t mod;
+
+ /* Find the block that points to the fileblock we are looking up by
+ following the chain until the right table is reached. */
+ for (links = grub_divmod64 (fileblock, data->htsize, &mod); links; links--)
+ {
+ grub_disk_read (data->disk, block + data->blocksize - 1,
+ data->blocksize * (GRUB_DISK_SECTOR_SIZE
+ - GRUB_AFFS_FILE_LOCATION),
+ sizeof (file), &file);
+ if (grub_errno)
+ return 0;
+
+ block = grub_be_to_cpu32 (file.extension);
+ }
+
+ /* Translate the fileblock to the block within the right table. */
+ fileblock = mod;
+ grub_disk_read (data->disk, block,
+ GRUB_AFFS_BLOCKPTR_OFFSET
+ + (data->htsize - fileblock - 1) * sizeof (pos),
+ sizeof (pos), &pos);
+ if (grub_errno)
+ return 0;
+
+ return grub_be_to_cpu32 (pos);
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_affs_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_affs_read_block,
+ node->size, 0);
+}
+
+
+static struct grub_affs_data *
+grub_affs_mount (grub_disk_t disk)
+{
+ struct grub_affs_data *data;
+ grub_uint32_t *rootblock = 0;
+ struct grub_affs_rblock *rblock;
+
+ int checksum = 0;
+ int checksumr = 0;
+ int blocksize = 0;
+
+ data = grub_malloc (sizeof (struct grub_affs_data));
+ if (!data)
+ return 0;
+
+ /* Read the bootblock. */
+ grub_disk_read (disk, 0, 0, sizeof (struct grub_affs_bblock),
+ &data->bblock);
+ if (grub_errno)
+ goto fail;
+
+ /* Make sure this is an affs filesystem. */
+ if (grub_strncmp ((char *) (data->bblock.type), "DOS", 3))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an AFFS filesystem");
+ goto fail;
+ }
+
+ /* Test if the filesystem is a OFS filesystem. */
+ if (! (data->bblock.flags & GRUB_AFFS_FLAG_FFS))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "OFS not yet supported");
+ goto fail;
+ }
+
+ /* Read the bootblock. */
+ grub_disk_read (disk, 0, 0, sizeof (struct grub_affs_bblock),
+ &data->bblock);
+ if (grub_errno)
+ goto fail;
+
+ /* No sane person uses more than 8KB for a block. At least I hope
+ for that person because in that case this won't work. */
+ rootblock = grub_malloc (GRUB_DISK_SECTOR_SIZE * 16);
+ if (!rootblock)
+ goto fail;
+
+ rblock = (struct grub_affs_rblock *) rootblock;
+
+ /* Read the rootblock. */
+ grub_disk_read (disk, grub_be_to_cpu32 (data->bblock.rootblock), 0,
+ GRUB_DISK_SECTOR_SIZE * 16, rootblock);
+ if (grub_errno)
+ goto fail;
+
+ /* The filesystem blocksize is not stored anywhere in the filesystem
+ itself. One way to determine it is reading blocks for the
+ rootblock until the checksum is correct. */
+ checksumr = grub_be_to_cpu32 (rblock->checksum);
+ rblock->checksum = 0;
+ for (blocksize = 0; blocksize < 8; blocksize++)
+ {
+ grub_uint32_t *currblock = rootblock + GRUB_DISK_SECTOR_SIZE * blocksize;
+ unsigned int i;
+
+ for (i = 0; i < GRUB_DISK_SECTOR_SIZE / sizeof (*currblock); i++)
+ checksum += grub_be_to_cpu32 (currblock[i]);
+
+ if (checksumr == -checksum)
+ break;
+ }
+ if (-checksum != checksumr)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "AFFS blocksize couldn't be determined");
+ goto fail;
+ }
+ blocksize++;
+
+ data->blocksize = blocksize;
+ data->disk = disk;
+ data->htsize = grub_be_to_cpu32 (rblock->htsize);
+ data->diropen.data = data;
+ data->diropen.block = grub_be_to_cpu32 (data->bblock.rootblock);
+
+ grub_free (rootblock);
+
+ return data;
+
+ fail:
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not an AFFS filesystem");
+
+ grub_free (data);
+ grub_free (rootblock);
+ return 0;
+}
+
+
+static char *
+grub_affs_read_symlink (grub_fshelp_node_t node)
+{
+ struct grub_affs_data *data = node->data;
+ char *symlink;
+
+ symlink = grub_malloc (GRUB_AFFS_SYMLINK_SIZE (data->blocksize));
+ if (!symlink)
+ return 0;
+
+ grub_disk_read (data->disk, node->block, GRUB_AFFS_SYMLINK_OFFSET,
+ GRUB_AFFS_SYMLINK_SIZE (data->blocksize), symlink);
+ if (grub_errno)
+ {
+ grub_free (symlink);
+ return 0;
+ }
+ grub_dprintf ("affs", "Symlink: `%s'\n", symlink);
+ return symlink;
+}
+
+
+static int
+grub_affs_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ int i;
+ struct grub_affs_file file;
+ struct grub_fshelp_node *node = 0;
+ struct grub_affs_data *data = dir->data;
+ grub_uint32_t *hashtable;
+
+ auto int NESTED_FUNC_ATTR grub_affs_create_node (const char *name, int block,
+ int size, int type);
+
+ int NESTED_FUNC_ATTR grub_affs_create_node (const char *name, int block,
+ int size, int type)
+ {
+ node = grub_malloc (sizeof (*node));
+ if (!node)
+ {
+ grub_free (hashtable);
+ return 1;
+ }
+
+ node->data = data;
+ node->size = size;
+ node->block = block;
+ node->parent = grub_be_to_cpu32 (file.parent);
+
+ if (hook (name, type, node))
+ {
+ grub_free (hashtable);
+ return 1;
+ }
+ return 0;
+ }
+
+ hashtable = grub_malloc (data->htsize * sizeof (*hashtable));
+ if (!hashtable)
+ return 1;
+
+ grub_disk_read (data->disk, dir->block, GRUB_AFFS_HASHTABLE_OFFSET,
+ data->htsize * sizeof (*hashtable), (char *) hashtable);
+ if (grub_errno)
+ goto fail;
+
+ /* Create the directory entries for `.' and `..'. */
+ if (grub_affs_create_node (".", dir->block, dir->size, GRUB_FSHELP_DIR))
+ return 1;
+ if (grub_affs_create_node ("..", dir->parent ? dir->parent : dir->block,
+ dir->size, GRUB_FSHELP_DIR))
+ return 1;
+
+ for (i = 0; i < data->htsize; i++)
+ {
+ enum grub_fshelp_filetype type;
+ grub_uint64_t next;
+
+ if (!hashtable[i])
+ continue;
+
+ /* Every entry in the hashtable can be chained. Read the entire
+ chain. */
+ next = grub_be_to_cpu32 (hashtable[i]);
+
+ while (next)
+ {
+ grub_disk_read (data->disk, next + data->blocksize - 1,
+ data->blocksize * GRUB_DISK_SECTOR_SIZE
+ - GRUB_AFFS_FILE_LOCATION,
+ sizeof (file), (char *) &file);
+ if (grub_errno)
+ goto fail;
+
+ file.name[file.namelen] = '\0';
+
+ if ((int) grub_be_to_cpu32 (file.type) == GRUB_AFFS_FILETYPE_DIR)
+ type = GRUB_FSHELP_REG;
+ else if (grub_be_to_cpu32 (file.type) == GRUB_AFFS_FILETYPE_REG)
+ type = GRUB_FSHELP_DIR;
+ else if (grub_be_to_cpu32 (file.type) == GRUB_AFFS_FILETYPE_SYMLINK)
+ type = GRUB_FSHELP_SYMLINK;
+ else
+ type = GRUB_FSHELP_UNKNOWN;
+
+ if (grub_affs_create_node ((char *) (file.name), next,
+ grub_be_to_cpu32 (file.size), type))
+ return 1;
+
+ next = grub_be_to_cpu32 (file.next);
+ }
+ }
+
+ grub_free (hashtable);
+ return 0;
+
+ fail:
+ grub_free (node);
+ grub_free (hashtable);
+ return 0;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_affs_open (struct grub_file *file, const char *name)
+{
+ struct grub_affs_data *data;
+ struct grub_fshelp_node *fdiro = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_affs_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (name, &data->diropen, &fdiro, grub_affs_iterate_dir,
+ grub_affs_read_symlink, GRUB_FSHELP_REG);
+ if (grub_errno)
+ goto fail;
+
+ file->size = fdiro->size;
+ data->diropen = *fdiro;
+ grub_free (fdiro);
+
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+ fail:
+ if (data && fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_affs_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+
+/* Read LEN bytes data from FILE into BUF. */
+static grub_ssize_t
+grub_affs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_affs_data *data =
+ (struct grub_affs_data *) file->data;
+
+ int size = grub_affs_read_file (&data->diropen, file->read_hook,
+ file->offset, len, buf);
+
+ return size;
+}
+
+
+static grub_err_t
+grub_affs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_affs_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_affs_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (path, &data->diropen, &fdiro, grub_affs_iterate_dir,
+ grub_affs_read_symlink, GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+
+ grub_affs_iterate_dir (fdiro, iterate);
+
+ fail:
+ if (data && fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_affs_label (grub_device_t device, char **label)
+{
+ struct grub_affs_data *data;
+ struct grub_affs_file file;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_affs_mount (disk);
+ if (data)
+ {
+ /* The rootblock maps quite well on a file header block, it's
+ something we can use here. */
+ grub_disk_read (data->disk, grub_be_to_cpu32 (data->bblock.rootblock),
+ data->blocksize * (GRUB_DISK_SECTOR_SIZE
+ - GRUB_AFFS_FILE_LOCATION),
+ sizeof (file), &file);
+ if (grub_errno)
+ return 0;
+
+ *label = grub_strndup ((char *) (file.name), file.namelen);
+ }
+ else
+ *label = 0;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+static struct grub_fs grub_affs_fs =
+ {
+ .name = "affs",
+ .dir = grub_affs_dir,
+ .open = grub_affs_open,
+ .read = grub_affs_read,
+ .close = grub_affs_close,
+ .label = grub_affs_label,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 0,
+#endif
+ .next = 0
+ };
+
+GRUB_MOD_INIT(affs)
+{
+ grub_fs_register (&grub_affs_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(affs)
+{
+ grub_fs_unregister (&grub_affs_fs);
+}
diff --git a/grub-core/fs/afs.c b/grub-core/fs/afs.c
new file mode 100644
index 0000000..35ef499
--- /dev/null
+++ b/grub-core/fs/afs.c
@@ -0,0 +1,720 @@
+/* afs.c - The native AtheOS file-system. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifdef MODE_BIGENDIAN
+#define GRUB_AFS_FSNAME_SUFFIX "_be"
+#else
+#define GRUB_AFS_FSNAME_SUFFIX ""
+#endif
+
+#ifdef MODE_BFS
+#define GRUB_AFS_FSNAME "befs" GRUB_AFS_FSNAME_SUFFIX
+#else
+#define GRUB_AFS_FSNAME "afs" GRUB_AFS_FSNAME_SUFFIX
+#endif
+
+#define GRUB_AFS_DIRECT_BLOCK_COUNT 12
+#define GRUB_AFS_BLOCKS_PER_DI_RUN 4
+
+#ifdef MODE_BFS
+#define GRUB_AFS_SBLOCK_SECTOR 1
+#define GRUB_AFS_SBLOCK_MAGIC1 0x42465331 /* BFS1. */
+#else
+#define GRUB_AFS_SBLOCK_SECTOR 2
+#define GRUB_AFS_SBLOCK_MAGIC1 0x41465331 /* AFS1. */
+#endif
+
+#define GRUB_AFS_SBLOCK_MAGIC2 0xdd121031
+#define GRUB_AFS_SBLOCK_MAGIC3 0x15b6830e
+
+#define GRUB_AFS_INODE_MAGIC 0x64358428
+
+#ifdef MODE_BFS
+#define GRUB_AFS_BTREE_MAGIC 0x69f6c2e8
+#else
+#define GRUB_AFS_BTREE_MAGIC 0x65768995
+#endif
+
+#define GRUB_AFS_BNODE_SIZE 1024
+
+#define GRUB_AFS_S_IFMT 00170000
+#define GRUB_AFS_S_IFLNK 0120000
+
+#define GRUB_AFS_S_IFREG 0100000
+#define GRUB_AFS_S_IFDIR 0040000
+#define GRUB_AFS_S_IFIFO 0010000
+
+#define GRUB_AFS_NULL_VAL ((grub_afs_bvalue_t)-1)
+
+#ifdef MODE_BIGENDIAN
+#define grub_afs_to_cpu16(x) grub_be_to_cpu16 (x)
+#define grub_afs_to_cpu32(x) grub_be_to_cpu32 (x)
+#define grub_afs_to_cpu64(x) grub_be_to_cpu64 (x)
+#else
+#define grub_afs_to_cpu16(x) grub_le_to_cpu16 (x)
+#define grub_afs_to_cpu32(x) grub_le_to_cpu32 (x)
+#define grub_afs_to_cpu64(x) grub_le_to_cpu64 (x)
+#endif
+
+#ifdef MODE_BFS
+#define B_KEY_INDEX_ALIGN 8
+#else
+#define B_KEY_INDEX_ALIGN 4
+#endif
+
+#define B_KEY_INDEX_OFFSET(node) ((grub_uint16_t *) \
+ ((char *) (node) \
+ + ALIGN_UP (sizeof (struct grub_afs_bnode) \
+ + node->key_size, \
+ B_KEY_INDEX_ALIGN)))
+
+#define B_KEY_VALUE_OFFSET(node) ((grub_afs_bvalue_t *) \
+ ((char *) B_KEY_INDEX_OFFSET (node) + \
+ node->key_count * 2))
+
+typedef grub_uint64_t grub_afs_off_t;
+typedef grub_uint64_t grub_afs_bigtime;
+typedef grub_uint64_t grub_afs_bvalue_t;
+
+struct grub_afs_blockrun
+{
+ grub_uint32_t group;
+ grub_uint16_t start;
+ grub_uint16_t len;
+} __attribute__ ((packed));
+
+struct grub_afs_datastream
+{
+ struct grub_afs_blockrun direct[GRUB_AFS_DIRECT_BLOCK_COUNT];
+ grub_afs_off_t max_direct_range;
+ struct grub_afs_blockrun indirect;
+ grub_afs_off_t max_indirect_range;
+ struct grub_afs_blockrun double_indirect;
+ grub_afs_off_t max_double_indirect_range;
+ grub_afs_off_t size;
+} __attribute__ ((packed));
+
+struct grub_afs_bnode
+{
+ grub_afs_bvalue_t left;
+ grub_afs_bvalue_t right;
+ grub_afs_bvalue_t overflow;
+#ifdef MODE_BFS
+ grub_uint16_t key_count;
+ grub_uint16_t key_size;
+#else
+ grub_uint32_t key_count;
+ grub_uint32_t key_size;
+#endif
+ char key_data[0];
+} __attribute__ ((packed));
+
+#ifdef MODE_BFS
+struct grub_afs_btree
+{
+ grub_uint32_t magic;
+ grub_uint32_t unused1;
+ grub_uint32_t tree_depth;
+ grub_uint32_t unused2;
+ grub_afs_bvalue_t root;
+ grub_uint32_t unused3[4];
+} __attribute__ ((packed));
+#else
+struct grub_afs_btree
+{
+ grub_uint32_t magic;
+ grub_afs_bvalue_t root;
+ grub_uint32_t tree_depth;
+ grub_afs_bvalue_t last_node;
+ grub_afs_bvalue_t first_free;
+} __attribute__ ((packed));
+#endif
+
+/* Beware that following structure describes AtheFS and if you write code
+ which uses currently unused fields check it with both AtheFS and BeFS.
+ */
+struct grub_afs_sblock
+{
+ char name[32];
+ grub_uint32_t magic1;
+ grub_uint32_t byte_order;
+ grub_uint32_t block_size;
+ grub_uint32_t block_shift;
+ grub_afs_off_t num_blocks;
+ grub_afs_off_t used_blocks;
+ grub_uint32_t inode_size;
+ grub_uint32_t magic2;
+ grub_uint32_t block_per_group; /* Number of blocks per allocation
+ group. (Max 65536) */
+ grub_uint32_t alloc_group_shift; /* Number of bits to shift a group
+ number to get a byte address. */
+ grub_uint32_t alloc_group_count;
+ grub_uint32_t flags;
+ struct grub_afs_blockrun log_block;
+ grub_afs_off_t log_start;
+ grub_uint32_t valid_log_blocks;
+ grub_uint32_t log_size;
+ grub_uint32_t magic3;
+ struct grub_afs_blockrun root_dir; /* Root dir inode. */
+ struct grub_afs_blockrun deleted_files; /* Directory containing files
+ scheduled for deletion. */
+ struct grub_afs_blockrun index_dir; /* Directory of index files. */
+ grub_uint32_t boot_loader_size;
+ grub_uint32_t pad[7];
+} __attribute__ ((packed));
+
+struct grub_afs_inode
+{
+ grub_uint32_t magic1;
+ struct grub_afs_blockrun inode_num;
+ grub_uint32_t uid;
+ grub_uint32_t gid;
+ grub_uint32_t mode;
+ grub_uint32_t flags;
+#ifndef MODE_BFS
+ grub_uint32_t link_count;
+#endif
+ grub_afs_bigtime create_time;
+ grub_afs_bigtime modified_time;
+ struct grub_afs_blockrun parent;
+ struct grub_afs_blockrun attrib_dir;
+ grub_uint32_t index_type; /* Key data-key only used for index files. */
+ grub_uint32_t inode_size;
+ grub_uint32_t unused;
+ struct grub_afs_datastream stream;
+ grub_uint32_t pad[4];
+ grub_uint32_t small_data[1];
+} __attribute__ ((packed));
+
+struct grub_fshelp_node
+{
+ struct grub_afs_data *data;
+ struct grub_afs_inode inode;
+};
+
+struct grub_afs_data
+{
+ grub_disk_t disk;
+ struct grub_afs_sblock sblock;
+ struct grub_afs_inode *inode;
+ struct grub_fshelp_node diropen;
+};
+
+static grub_dl_t my_mod;
+
+static grub_afs_off_t
+grub_afs_run_to_num (struct grub_afs_sblock *sb,
+ struct grub_afs_blockrun *run)
+{
+ return ((grub_afs_off_t) grub_afs_to_cpu32 (run->group)
+ * sb->block_per_group + grub_afs_to_cpu16 (run->start));
+}
+
+static grub_err_t
+grub_afs_read_inode (struct grub_afs_data *data,
+ grub_uint32_t ino, struct grub_afs_inode *inode)
+{
+ return grub_disk_read (data->disk,
+ ino *
+ (data->sblock.block_size >> GRUB_DISK_SECTOR_BITS),
+ 0, sizeof (struct grub_afs_inode),
+ inode);
+}
+
+static grub_disk_addr_t
+grub_afs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ struct grub_afs_sblock *sb = &node->data->sblock;
+ struct grub_afs_datastream *ds = &node->inode.stream;
+
+ if (fileblock < grub_afs_to_cpu64 (ds->max_direct_range))
+ {
+ int i;
+
+ for (i = 0; i < GRUB_AFS_DIRECT_BLOCK_COUNT; i++)
+ {
+ if (fileblock < grub_afs_to_cpu16 (ds->direct[i].len))
+ return grub_afs_run_to_num (sb, &ds->direct[i]) + fileblock;
+ fileblock -= grub_afs_to_cpu16 (ds->direct[i].len);
+ }
+ }
+ else if (fileblock < grub_afs_to_cpu64 (ds->max_indirect_range))
+ {
+ int ptrs_per_blk = sb->block_size / sizeof (struct grub_afs_blockrun);
+ struct grub_afs_blockrun indir[ptrs_per_blk];
+ grub_afs_off_t blk = grub_afs_run_to_num (sb, &ds->indirect);
+ int i;
+
+ fileblock -= grub_afs_to_cpu64 (ds->max_direct_range);
+ for (i = 0; i < ds->indirect.len; i++, blk++)
+ {
+ int j;
+
+ if (grub_disk_read (node->data->disk,
+ blk * (sb->block_size >> GRUB_DISK_SECTOR_BITS),
+ 0, sizeof (indir),
+ indir))
+ return 0;
+
+ for (j = 0; j < ptrs_per_blk; j++)
+ {
+ if (fileblock < grub_afs_to_cpu16 (indir[j].len))
+ return grub_afs_run_to_num (sb, &indir[j]) + fileblock;
+
+ fileblock -= grub_afs_to_cpu16 (indir[j].len);
+ }
+ }
+ }
+ else
+ {
+ int ptrs_per_blk = sb->block_size / sizeof (struct grub_afs_blockrun);
+ struct grub_afs_blockrun indir[ptrs_per_blk];
+
+ /* ([idblk][idptr]) ([dblk][dptr]) [blk] */
+ int cur_pos = fileblock - grub_afs_to_cpu64 (ds->max_indirect_range);
+
+ int dptr_size = GRUB_AFS_BLOCKS_PER_DI_RUN;
+ int dblk_size = dptr_size * ptrs_per_blk;
+ int idptr_size = dblk_size * GRUB_AFS_BLOCKS_PER_DI_RUN;
+ int idblk_size = idptr_size * ptrs_per_blk;
+
+ int off = cur_pos % GRUB_AFS_BLOCKS_PER_DI_RUN;
+ int dptr = (cur_pos / dptr_size) % ptrs_per_blk;
+ int dblk = (cur_pos / dblk_size) % GRUB_AFS_BLOCKS_PER_DI_RUN;
+ int idptr = (cur_pos / idptr_size) % ptrs_per_blk;
+ int idblk = (cur_pos / idblk_size);
+
+ if (grub_disk_read (node->data->disk,
+ (grub_afs_run_to_num (sb, &ds->double_indirect)
+ + idblk) *
+ (sb->block_size >> GRUB_DISK_SECTOR_BITS),
+ 0, sizeof (indir),
+ indir))
+ return 0;
+
+ if (grub_disk_read (node->data->disk,
+ (grub_afs_run_to_num (sb, &indir[idptr]) + dblk) *
+ (sb->block_size >> GRUB_DISK_SECTOR_BITS),
+ 0, sizeof (indir),
+ indir))
+ return 0;
+
+ return grub_afs_run_to_num (sb, &indir[dptr]) + off;
+ }
+
+ return 0;
+}
+
+static grub_ssize_t
+grub_afs_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_afs_read_block,
+ grub_afs_to_cpu64 (node->inode.stream.size),
+ node->data->sblock.block_shift
+ - GRUB_DISK_SECTOR_BITS);
+}
+
+static char *
+grub_afs_read_symlink (grub_fshelp_node_t node)
+{
+ char *ret;
+ grub_afs_off_t size = grub_afs_to_cpu64 (node->inode.stream.size);
+
+ if (size == 0)
+ {
+ size = sizeof (node->inode.stream);
+ ret = grub_zalloc (size + 1);
+ if (! ret)
+ return 0;
+ grub_memcpy (ret, (char *) &(node->inode.stream),
+ sizeof (node->inode.stream));
+ return ret;
+ }
+ ret = grub_zalloc (size + 1);
+ if (! ret)
+ return 0;
+ grub_afs_read_file (node, 0, 0, size, ret);
+ return ret;
+}
+
+static int
+grub_afs_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ struct grub_afs_btree head;
+ char node_data [GRUB_AFS_BNODE_SIZE];
+ struct grub_afs_bnode *node = (struct grub_afs_bnode *) node_data;
+ int i;
+
+ if ((dir->inode.stream.size == 0)
+ || ((grub_afs_to_cpu32 (dir->inode.mode) & GRUB_AFS_S_IFMT)
+ != GRUB_AFS_S_IFDIR))
+ return 0;
+
+ grub_afs_read_file (dir, 0, 0, sizeof (head), (char *) &head);
+ if (grub_errno)
+ return 0;
+
+ grub_afs_read_file (dir, 0, grub_afs_to_cpu64 (head.root),
+ GRUB_AFS_BNODE_SIZE, (char *) node);
+ if (grub_errno)
+ return 0;
+
+ for (i = 0; i < (int) grub_afs_to_cpu32 (head.tree_depth) - 1; i++)
+ {
+ grub_afs_bvalue_t blk;
+
+ blk = grub_afs_to_cpu64(B_KEY_VALUE_OFFSET (node) [0]);
+ grub_afs_read_file (dir, 0, blk, GRUB_AFS_BNODE_SIZE, (char *) node);
+ if (grub_errno)
+ return 0;
+ }
+
+ if (node->key_count)
+ {
+ grub_uint32_t cur_key = 0;
+
+ while (1)
+ {
+ int key_start, key_size;
+ grub_uint16_t *index;
+
+ index = B_KEY_INDEX_OFFSET (node);
+
+ key_start = (cur_key > 0)
+ ? grub_afs_to_cpu16 (index[cur_key - 1]) : 0;
+ key_size = grub_afs_to_cpu16 (index[cur_key]) - key_start;
+ if (key_size > 0)
+ {
+ char filename [key_size + 1];
+ struct grub_fshelp_node *fdiro;
+ int mode, type;
+
+ fdiro = grub_malloc (sizeof (struct grub_fshelp_node));
+ if (! fdiro)
+ return 0;
+
+ fdiro->data = dir->data;
+ if (grub_afs_read_inode (dir->data,
+ grub_afs_to_cpu64
+ (B_KEY_VALUE_OFFSET (node) [cur_key]),
+ &fdiro->inode))
+ return 0;
+
+ grub_memcpy (filename, &node->key_data[key_start], key_size);
+ filename [key_size] = 0;
+
+ mode = (grub_afs_to_cpu32 (fdiro->inode.mode) & GRUB_AFS_S_IFMT);
+ if (mode == GRUB_AFS_S_IFDIR)
+ type = GRUB_FSHELP_DIR;
+ else if (mode == GRUB_AFS_S_IFREG)
+ type = GRUB_FSHELP_REG;
+ else if (mode == GRUB_AFS_S_IFLNK)
+ type = GRUB_FSHELP_SYMLINK;
+ else
+ type = GRUB_FSHELP_UNKNOWN;
+
+ if (hook (filename, type, fdiro))
+ return 1;
+ }
+
+ cur_key++;
+ if (cur_key >= grub_afs_to_cpu32 (node->key_count))
+ {
+ if (node->right == GRUB_AFS_NULL_VAL)
+ break;
+
+ grub_afs_read_file (dir, 0, grub_afs_to_cpu64 (node->right),
+ GRUB_AFS_BNODE_SIZE, (char *) node);
+ if (grub_errno)
+ return 0;
+
+ cur_key = 0;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int
+grub_afs_validate_sblock (struct grub_afs_sblock *sb)
+{
+ if (grub_afs_to_cpu32 (sb->magic1) == GRUB_AFS_SBLOCK_MAGIC1)
+ {
+ sb->magic2 = grub_afs_to_cpu32 (sb->magic2);
+ sb->magic3 = grub_afs_to_cpu32 (sb->magic3);
+ sb->block_shift = grub_afs_to_cpu32 (sb->block_shift);
+ sb->block_size = grub_afs_to_cpu32 (sb->block_size);
+ sb->used_blocks = grub_afs_to_cpu64 (sb->used_blocks);
+ sb->num_blocks = grub_afs_to_cpu64 (sb->num_blocks);
+ sb->inode_size = grub_afs_to_cpu32 (sb->inode_size);
+ sb->alloc_group_count = grub_afs_to_cpu32 (sb->alloc_group_count);
+ sb->alloc_group_shift = grub_afs_to_cpu32 (sb->alloc_group_shift);
+ sb->block_per_group = grub_afs_to_cpu32 (sb->block_per_group);
+ sb->alloc_group_count = grub_afs_to_cpu32 (sb->alloc_group_count);
+ sb->log_size = grub_afs_to_cpu32 (sb->log_size);
+ }
+ else
+ return 0;
+
+ if ((sb->magic2 != GRUB_AFS_SBLOCK_MAGIC2) ||
+ (sb->magic3 != GRUB_AFS_SBLOCK_MAGIC3))
+ return 0;
+
+#ifdef MODE_BFS
+ sb->block_per_group = 1 << (sb->alloc_group_shift);
+#endif
+
+ if (((grub_uint32_t) (1 << sb->block_shift) != sb->block_size)
+ || (sb->used_blocks > sb->num_blocks )
+ || (sb->inode_size != sb->block_size)
+ || (0 == sb->block_size)
+#ifndef MODE_BFS
+ || ((grub_uint32_t) (1 << sb->alloc_group_shift) !=
+ sb->block_per_group * sb->block_size)
+ || (sb->alloc_group_count * sb->block_per_group < sb->num_blocks)
+ || (grub_afs_to_cpu16 (sb->log_block.len) != sb->log_size)
+ || (grub_afs_to_cpu32 (sb->valid_log_blocks) > sb->log_size)
+#endif
+ )
+ return 0;
+
+ return 1;
+}
+
+static struct grub_afs_data *
+grub_afs_mount (grub_disk_t disk)
+{
+ struct grub_afs_data *data = 0;
+
+ data = grub_malloc (sizeof (struct grub_afs_data));
+ if (!data)
+ return 0;
+
+ /* Read the superblock. */
+ if (grub_disk_read (disk, GRUB_AFS_SBLOCK_SECTOR, 0,
+ sizeof (struct grub_afs_sblock), &data->sblock))
+ goto fail;
+
+ if (! grub_afs_validate_sblock (&data->sblock))
+ goto fail;
+
+ data->diropen.data = data;
+ data->inode = &data->diropen.inode;
+ data->disk = disk;
+
+ if (grub_afs_read_inode (data,
+ grub_afs_run_to_num (&data->sblock,
+ &data->sblock.root_dir),
+ data->inode))
+ goto fail;
+
+ return data;
+
+fail:
+ grub_error (GRUB_ERR_BAD_FS, "not an " GRUB_AFS_FSNAME " filesystem");
+
+ grub_free (data);
+ return 0;
+}
+
+static grub_err_t
+grub_afs_open (struct grub_file *file, const char *name)
+{
+ struct grub_afs_data *data;
+ struct grub_fshelp_node *fdiro = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_afs_mount (file->device->disk);
+ if (! data)
+ goto fail;
+
+ grub_fshelp_find_file (name, &data->diropen, &fdiro, grub_afs_iterate_dir,
+ grub_afs_read_symlink, GRUB_FSHELP_REG);
+ if (grub_errno)
+ goto fail;
+
+ grub_memcpy (data->inode, &fdiro->inode, sizeof (struct grub_afs_inode));
+ grub_free (fdiro);
+
+ file->size = grub_afs_to_cpu64 (data->inode->stream.size);
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+fail:
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_ssize_t
+grub_afs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_afs_data *data = (struct grub_afs_data *) file->data;
+
+ return grub_afs_read_file (&data->diropen, file->read_hook,
+ file->offset, len, buf);
+}
+
+static grub_err_t
+grub_afs_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_afs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_afs_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ info.mtimeset = 1;
+#ifdef MODE_BFS
+ info.mtime = grub_afs_to_cpu64 (node->inode.modified_time) >> 16;
+#else
+ info.mtime = grub_divmod64 (grub_afs_to_cpu64 (node->inode.modified_time),
+ 1000000, 0);
+#endif
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_afs_mount (device->disk);
+ if (! data)
+ goto fail;
+
+ grub_fshelp_find_file (path, &data->diropen, &fdiro, grub_afs_iterate_dir,
+ grub_afs_read_symlink, GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+
+ grub_afs_iterate_dir (fdiro, iterate);
+
+ if (fdiro != &data->diropen)
+ grub_free (fdiro);
+
+ fail:
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_afs_label (grub_device_t device, char **label)
+{
+ struct grub_afs_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_afs_mount (disk);
+ if (data)
+ *label = grub_strndup (data->sblock.name, sizeof (data->sblock.name));
+ else
+ *label = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+static struct grub_fs grub_afs_fs = {
+ .name = GRUB_AFS_FSNAME,
+ .dir = grub_afs_dir,
+ .open = grub_afs_open,
+ .read = grub_afs_read,
+ .close = grub_afs_close,
+ .label = grub_afs_label,
+ .next = 0
+};
+
+#if defined (MODE_BIGENDIAN) && defined (MODE_BFS)
+GRUB_MOD_INIT (befs_be)
+#elif defined (MODE_BFS)
+GRUB_MOD_INIT (befs)
+#elif defined (MODE_BIGENDIAN)
+GRUB_MOD_INIT (afs_be)
+#else
+GRUB_MOD_INIT (afs)
+#endif
+{
+ grub_fs_register (&grub_afs_fs);
+ my_mod = mod;
+}
+
+#if defined (MODE_BIGENDIAN) && defined (MODE_BFS)
+GRUB_MOD_FINI (befs_be)
+#elif defined (MODE_BFS)
+GRUB_MOD_FINI (befs)
+#elif defined (MODE_BIGENDIAN)
+GRUB_MOD_FINI (afs_be)
+#else
+GRUB_MOD_FINI (afs)
+#endif
+{
+ grub_fs_unregister (&grub_afs_fs);
+}
diff --git a/grub-core/fs/afs_be.c b/grub-core/fs/afs_be.c
new file mode 100644
index 0000000..1f1f48f
--- /dev/null
+++ b/grub-core/fs/afs_be.c
@@ -0,0 +1,2 @@
+#define MODE_BIGENDIAN 1
+#include "afs.c"
diff --git a/grub-core/fs/befs.c b/grub-core/fs/befs.c
new file mode 100644
index 0000000..c54d8e1
--- /dev/null
+++ b/grub-core/fs/befs.c
@@ -0,0 +1,3 @@
+/* befs.c - The native BeOS/Haiku file-system. */
+#define MODE_BFS 1
+#include "afs.c"
diff --git a/grub-core/fs/befs_be.c b/grub-core/fs/befs_be.c
new file mode 100644
index 0000000..f6e8179
--- /dev/null
+++ b/grub-core/fs/befs_be.c
@@ -0,0 +1,4 @@
+/* befs.c - The native BeOS/Haiku file-system. */
+#define MODE_BFS 1
+#define MODE_BIGENDIAN 1
+#include "afs.c"
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
new file mode 100644
index 0000000..42aa257
--- /dev/null
+++ b/grub-core/fs/btrfs.c
@@ -0,0 +1,1491 @@
+/* btrfs.c - B-tree file system. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/lib/crc.h>
+#include <grub/deflate.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_BTRFS_SIGNATURE "_BHRfS_M"
+
+typedef grub_uint8_t grub_btrfs_checksum_t[0x20];
+typedef grub_uint16_t grub_btrfs_uuid_t[8];
+
+struct grub_btrfs_device
+{
+ grub_uint64_t device_id;
+ grub_uint8_t dummy[0x62 - 8];
+} __attribute__ ((packed));
+
+struct grub_btrfs_superblock
+{
+ grub_btrfs_checksum_t checksum;
+ grub_btrfs_uuid_t uuid;
+ grub_uint8_t dummy[0x10];
+ grub_uint8_t signature[sizeof (GRUB_BTRFS_SIGNATURE) - 1];
+ grub_uint64_t generation;
+ grub_uint64_t root_tree;
+ grub_uint64_t chunk_tree;
+ grub_uint8_t dummy2[0x20];
+ grub_uint64_t root_dir_objectid;
+ grub_uint8_t dummy3[0x41];
+ struct grub_btrfs_device this_device;
+ char label[0x100];
+ grub_uint8_t dummy4[0x100];
+ grub_uint8_t bootstrap_mapping[0x800];
+} __attribute__ ((packed));
+
+struct btrfs_header
+{
+ grub_btrfs_checksum_t checksum;
+ grub_btrfs_uuid_t uuid;
+ grub_uint8_t dummy[0x30];
+ grub_uint32_t nitems;
+ grub_uint8_t level;
+} __attribute__ ((packed));
+
+struct grub_btrfs_device_desc
+{
+ grub_device_t dev;
+ grub_uint64_t id;
+};
+
+struct grub_btrfs_data
+{
+ struct grub_btrfs_superblock sblock;
+ grub_uint64_t tree;
+ grub_uint64_t inode;
+
+ struct grub_btrfs_device_desc *devices_attached;
+ unsigned n_devices_attached;
+ unsigned n_devices_allocated;
+
+ /* Cached extent data. */
+ grub_uint64_t extstart;
+ grub_uint64_t extend;
+ grub_uint64_t extino;
+ grub_uint64_t exttree;
+ grub_size_t extsize;
+ struct grub_btrfs_extent_data *extent;
+};
+
+struct grub_btrfs_key
+{
+ grub_uint64_t object_id;
+#define GRUB_BTRFS_ITEM_TYPE_INODE_ITEM 0x01
+#define GRUB_BTRFS_ITEM_TYPE_DIR_ITEM 0x54
+#define GRUB_BTRFS_ITEM_TYPE_EXTENT_ITEM 0x6c
+#define GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM 0x84
+#define GRUB_BTRFS_ITEM_TYPE_DEVICE 0xd8
+#define GRUB_BTRFS_ITEM_TYPE_CHUNK 0xe4
+ grub_uint8_t type;
+ grub_uint64_t offset;
+} __attribute__ ((packed));
+
+struct grub_btrfs_chunk_item
+{
+ grub_uint64_t size;
+ grub_uint64_t dummy;
+ grub_uint64_t stripe_length;
+ grub_uint64_t type;
+#define GRUB_BTRFS_CHUNK_TYPE_BITS_DONTCARE 0x07
+#define GRUB_BTRFS_CHUNK_TYPE_SINGLE 0x00
+#define GRUB_BTRFS_CHUNK_TYPE_RAID0 0x08
+#define GRUB_BTRFS_CHUNK_TYPE_RAID1 0x10
+#define GRUB_BTRFS_CHUNK_TYPE_DUPLICATED 0x20
+#define GRUB_BTRFS_CHUNK_TYPE_RAID10 0x40
+ grub_uint8_t dummy2[0xc];
+ grub_uint16_t nstripes;
+ grub_uint16_t nsubstripes;
+} __attribute__ ((packed));
+
+struct grub_btrfs_chunk_stripe
+{
+ grub_uint64_t device_id;
+ grub_uint64_t offset;
+ grub_btrfs_uuid_t device_uuid;
+} __attribute__ ((packed));
+
+struct grub_btrfs_leaf_node
+{
+ struct grub_btrfs_key key;
+ grub_uint32_t offset;
+ grub_uint32_t size;
+} __attribute__ ((packed));
+
+struct grub_btrfs_internal_node
+{
+ struct grub_btrfs_key key;
+ grub_uint64_t addr;
+ grub_uint64_t dummy;
+} __attribute__ ((packed));
+
+struct grub_btrfs_dir_item
+{
+ struct grub_btrfs_key key;
+ grub_uint8_t dummy[8];
+ grub_uint16_t m;
+ grub_uint16_t n;
+#define GRUB_BTRFS_DIR_ITEM_TYPE_REGULAR 1
+#define GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY 2
+#define GRUB_BTRFS_DIR_ITEM_TYPE_SYMLINK 7
+ grub_uint8_t type;
+ char name[0];
+} __attribute__ ((packed));
+
+struct grub_btrfs_leaf_descriptor
+{
+ unsigned depth;
+ unsigned allocated;
+ struct {
+ grub_disk_addr_t addr;
+ unsigned iter;
+ unsigned maxiter;
+ int leaf;
+ } *data;
+};
+
+struct grub_btrfs_root_item
+{
+ grub_uint8_t dummy[0xb0];
+ grub_uint64_t tree;
+ grub_uint64_t inode;
+};
+
+struct grub_btrfs_time
+{
+ grub_int64_t sec;
+ grub_uint32_t nanosec;
+} __attribute__ ((aligned(4)));
+
+struct grub_btrfs_inode
+{
+ grub_uint8_t dummy1[0x10];
+ grub_uint64_t size;
+ grub_uint8_t dummy2[0x70];
+ struct grub_btrfs_time mtime;
+} __attribute__ ((packed));
+
+struct grub_btrfs_extent_data
+{
+ grub_uint64_t dummy;
+ grub_uint64_t size;
+ grub_uint8_t compression;
+ grub_uint8_t encryption;
+ grub_uint16_t encoding;
+ grub_uint8_t type;
+ union
+ {
+ char inl[0];
+ struct
+ {
+ grub_uint64_t laddr;
+ grub_uint64_t compressed_size;
+ grub_uint64_t offset;
+ grub_uint64_t filled;
+ };
+ };
+} __attribute__ ((packed));
+
+#define GRUB_BTRFS_EXTENT_INLINE 0
+#define GRUB_BTRFS_EXTENT_REGULAR 1
+
+#define GRUB_BTRFS_COMPRESSION_NONE 0
+#define GRUB_BTRFS_COMPRESSION_ZLIB 1
+
+#define GRUB_BTRFS_OBJECT_ID_CHUNK 0x100
+
+static grub_disk_addr_t superblock_sectors[] = { 64 * 2, 64 * 1024 * 2,
+ 256 * 1048576 * 2,
+ 1048576ULL * 1048576ULL * 2 };
+
+static grub_err_t
+grub_btrfs_read_logical (struct grub_btrfs_data *data,
+ grub_disk_addr_t addr, void *buf, grub_size_t size);
+
+static grub_err_t
+read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb)
+{
+ unsigned i;
+ grub_err_t err = GRUB_ERR_NONE;
+ for (i = 0; i < ARRAY_SIZE (superblock_sectors); i++)
+ {
+ struct grub_btrfs_superblock sblock;
+ err = grub_disk_read (disk, superblock_sectors[i], 0,
+ sizeof (sblock), &sblock);
+ if (err == GRUB_ERR_OUT_OF_RANGE)
+ break;
+
+ if (grub_memcmp ((char *) sblock.signature, GRUB_BTRFS_SIGNATURE,
+ sizeof (GRUB_BTRFS_SIGNATURE) - 1) != 0)
+ break;
+ if (i == 0 || grub_le_to_cpu64 (sblock.generation)
+ > grub_le_to_cpu64 (sb->generation))
+ grub_memcpy (sb, &sblock, sizeof (sblock));
+ }
+
+ if ((err == GRUB_ERR_OUT_OF_RANGE || !err) && i == 0)
+ return grub_error (GRUB_ERR_BAD_FS, "not a Btrfs filesystem");
+
+ if (err == GRUB_ERR_OUT_OF_RANGE)
+ grub_errno = err = GRUB_ERR_NONE;
+
+ return err;
+}
+
+static int
+key_cmp (const struct grub_btrfs_key *a, const struct grub_btrfs_key *b)
+{
+ if (grub_cpu_to_le64 (a->object_id) < grub_cpu_to_le64 (b->object_id))
+ return -1;
+ if (grub_cpu_to_le64 (a->object_id) > grub_cpu_to_le64 (b->object_id))
+ return +1;
+
+ if (a->type < b->type)
+ return -1;
+ if (a->type > b->type)
+ return +1;
+
+ if (grub_cpu_to_le64 (a->offset) < grub_cpu_to_le64 (b->offset))
+ return -1;
+ if (grub_cpu_to_le64 (a->offset) > grub_cpu_to_le64 (b->offset))
+ return +1;
+ return 0;
+}
+
+static void
+free_iterator (struct grub_btrfs_leaf_descriptor *desc)
+{
+ grub_free (desc->data);
+}
+
+static grub_err_t
+save_ref (struct grub_btrfs_leaf_descriptor *desc,
+ grub_disk_addr_t addr, unsigned i, unsigned m, int l)
+{
+ desc->depth++;
+ if (desc->allocated < desc->depth)
+ {
+ void *newdata;
+ desc->allocated *= 2;
+ newdata = grub_realloc (desc->data, sizeof (desc->data[0])
+ * desc->allocated);
+ if (!newdata)
+ return grub_errno;
+ desc->data = newdata;
+ }
+ desc->data[desc->depth - 1].addr = addr;
+ desc->data[desc->depth - 1].iter = i;
+ desc->data[desc->depth - 1].maxiter = m;
+ desc->data[desc->depth - 1].leaf = l;
+ return GRUB_ERR_NONE;
+}
+
+static int
+next (struct grub_btrfs_data *data,
+ struct grub_btrfs_leaf_descriptor *desc,
+ grub_disk_addr_t *outaddr, grub_size_t *outsize,
+ struct grub_btrfs_key *key_out)
+{
+ grub_err_t err;
+ struct grub_btrfs_leaf_node leaf;
+
+ for (; desc->depth > 0; desc->depth--)
+ {
+ desc->data[desc->depth - 1].iter++;
+ if (desc->data[desc->depth - 1].iter
+ < desc->data[desc->depth - 1].maxiter)
+ break;
+ }
+ if (desc->depth == 0)
+ return 0;
+ while (!desc->data[desc->depth - 1].leaf)
+ {
+ struct grub_btrfs_internal_node node;
+ struct btrfs_header head;
+
+ err = grub_btrfs_read_logical (data, desc->data[desc->depth - 1].iter
+ * sizeof (node)
+ + sizeof (struct btrfs_header)
+ + desc->data[desc->depth - 1].addr, &node,
+ sizeof (node));
+ if (err)
+ return -err;
+
+ err = grub_btrfs_read_logical (data, grub_le_to_cpu64 (node.addr), &head,
+ sizeof (head));
+ if (err)
+ return -err;
+
+ save_ref (desc, grub_le_to_cpu64 (node.addr), 0,
+ grub_le_to_cpu32 (head.nitems), !head.level);
+ }
+ err = grub_btrfs_read_logical (data, desc->data[desc->depth - 1].iter
+ * sizeof (leaf)
+ + sizeof (struct btrfs_header)
+ + desc->data[desc->depth - 1].addr, &leaf,
+ sizeof (leaf));
+ if (err)
+ return -err;
+ *outsize = grub_le_to_cpu32 (leaf.size);
+ *outaddr = desc->data[desc->depth - 1].addr + sizeof (struct btrfs_header)
+ + grub_le_to_cpu32 (leaf.offset);
+ *key_out = leaf.key;
+ return 1;
+}
+
+static grub_err_t
+lower_bound (struct grub_btrfs_data *data,
+ const struct grub_btrfs_key *key_in,
+ struct grub_btrfs_key *key_out,
+ grub_disk_addr_t root,
+ grub_disk_addr_t *outaddr, grub_size_t *outsize,
+ struct grub_btrfs_leaf_descriptor *desc)
+{
+ grub_disk_addr_t addr = root;
+ int depth = -1;
+
+ if (desc)
+ {
+ desc->allocated = 16;
+ desc->depth = 0;
+ desc->data = grub_malloc (sizeof (desc->data[0]) * desc->allocated);
+ if (!desc->data)
+ return grub_errno;
+ }
+
+ grub_dprintf ("btrfs",
+ "retrieving %" PRIxGRUB_UINT64_T
+ " %x %" PRIxGRUB_UINT64_T "\n",
+ key_in->object_id, key_in->type, key_in->offset);
+
+ while (1)
+ {
+ grub_err_t err;
+ struct btrfs_header head;
+
+ reiter:
+ depth++;
+ /* FIXME: preread few nodes into buffer. */
+ err = grub_btrfs_read_logical (data, addr, &head, sizeof (head));
+ if (err)
+ return err;
+ addr += sizeof (head);
+ if (head.level)
+ {
+ unsigned i;
+ struct grub_btrfs_internal_node node, node_last;
+ int have_last = 0;
+ grub_memset (&node_last, 0, sizeof (node_last));
+ for (i = 0; i < grub_le_to_cpu32 (head.nitems); i++)
+ {
+ err = grub_btrfs_read_logical (data, addr + i * sizeof (node),
+ &node, sizeof (node));
+ if (err)
+ return err;
+
+ grub_dprintf ("btrfs",
+ "internal node (depth %d) %" PRIxGRUB_UINT64_T
+ " %x %" PRIxGRUB_UINT64_T "\n", depth,
+ node.key.object_id, node.key.type, node.key.offset);
+
+ if (key_cmp (&node.key, key_in) == 0)
+ {
+ err = GRUB_ERR_NONE;
+ if (desc)
+ err = save_ref (desc, addr - sizeof (head), i,
+ grub_le_to_cpu32 (head.nitems), 0);
+ if (err)
+ return err;
+ addr = grub_le_to_cpu64 (node.addr);
+ goto reiter;
+ }
+ if (key_cmp (&node.key, key_in) > 0)
+ break;
+ node_last = node;
+ have_last = 1;
+ }
+ if (have_last)
+ {
+ err = GRUB_ERR_NONE;
+ if (desc)
+ err = save_ref (desc, addr - sizeof (head), i - 1,
+ grub_le_to_cpu32 (head.nitems), 0);
+ if (err)
+ return err;
+ addr = grub_le_to_cpu64 (node_last.addr);
+ goto reiter;
+ }
+ *outsize = 0;
+ *outaddr = 0;
+ grub_memset (key_out, 0, sizeof (*key_out));
+ if (desc)
+ return save_ref (desc, addr - sizeof (head), -1,
+ grub_le_to_cpu32 (head.nitems), 0);
+ return GRUB_ERR_NONE;
+ }
+ {
+ unsigned i;
+ struct grub_btrfs_leaf_node leaf, leaf_last;
+ int have_last = 0;
+ for (i = 0; i < grub_le_to_cpu32 (head.nitems); i++)
+ {
+ err = grub_btrfs_read_logical (data, addr + i * sizeof (leaf),
+ &leaf, sizeof (leaf));
+ if (err)
+ return err;
+
+ grub_dprintf ("btrfs",
+ "leaf (depth %d) %" PRIxGRUB_UINT64_T
+ " %x %" PRIxGRUB_UINT64_T "\n", depth,
+ leaf.key.object_id, leaf.key.type, leaf.key.offset);
+
+ if (key_cmp (&leaf.key, key_in) == 0)
+ {
+ grub_memcpy (key_out, &leaf.key, sizeof(*key_out));
+ *outsize = grub_le_to_cpu32 (leaf.size);
+ *outaddr = addr + grub_le_to_cpu32 (leaf.offset);
+ if (desc)
+ return save_ref (desc, addr - sizeof (head), i,
+ grub_le_to_cpu32 (head.nitems), 1);
+ return GRUB_ERR_NONE;
+ }
+
+ if (key_cmp (&leaf.key, key_in) > 0)
+ break;
+
+ have_last = 1;
+ leaf_last = leaf;
+ }
+
+ if (have_last)
+ {
+ grub_memcpy (key_out, &leaf_last.key, sizeof(*key_out));
+ *outsize = grub_le_to_cpu32 (leaf_last.size);
+ *outaddr = addr + grub_le_to_cpu32 (leaf_last.offset);
+ if (desc)
+ return save_ref (desc, addr - sizeof (head), i - 1,
+ grub_le_to_cpu32 (head.nitems), 1);
+ return GRUB_ERR_NONE;
+ }
+ *outsize = 0;
+ *outaddr = 0;
+ grub_memset (key_out, 0, sizeof (*key_out));
+ if (desc)
+ return save_ref (desc, addr - sizeof (head), -1,
+ grub_le_to_cpu32 (head.nitems), 1);
+ return GRUB_ERR_NONE;
+ }
+ }
+}
+
+static grub_device_t
+find_device (struct grub_btrfs_data *data, grub_uint64_t id,
+ int do_rescan)
+{
+ grub_device_t dev_found = NULL;
+ auto int hook (const char *name);
+ int hook (const char *name)
+ {
+ grub_device_t dev;
+ grub_err_t err;
+ struct grub_btrfs_superblock sb;
+ dev = grub_device_open (name);
+ if (!dev)
+ return 0;
+ if (!dev->disk)
+ {
+ grub_device_close (dev);
+ return 0;
+ }
+ err = read_sblock (dev->disk, &sb);
+ if (err == GRUB_ERR_BAD_FS)
+ {
+ grub_device_close (dev);
+ grub_errno = GRUB_ERR_NONE;
+ return 0;
+ }
+ if (err)
+ {
+ grub_device_close (dev);
+ grub_print_error ();
+ return 0;
+ }
+ if (grub_memcmp (data->sblock.uuid, sb.uuid, sizeof (sb.uuid)) != 0
+ || sb.this_device.device_id != id)
+ {
+ grub_device_close (dev);
+ return 0;
+ }
+
+ dev_found = dev;
+ return 1;
+ }
+
+ unsigned i;
+
+ for (i = 0; i < data->n_devices_attached; i++)
+ if (id == data->devices_attached[i].id)
+ return data->devices_attached[i].dev;
+ if (do_rescan)
+ grub_device_iterate (hook);
+ if (!dev_found)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "couldn't find a member device");
+ return NULL;
+ }
+ data->n_devices_attached++;
+ if (data->n_devices_attached > data->n_devices_allocated)
+ {
+ void *tmp;
+ data->n_devices_allocated = 2 * data->n_devices_attached + 1;
+ data->devices_attached
+ = grub_realloc (tmp = data->devices_attached,
+ data->n_devices_allocated
+ * sizeof (data->devices_attached[0]));
+ if (!data->devices_attached)
+ {
+ grub_device_close (dev_found);
+ data->devices_attached = tmp;
+ return NULL;
+ }
+ }
+ data->devices_attached[data->n_devices_attached - 1].id = id;
+ data->devices_attached[data->n_devices_attached - 1].dev = dev_found;
+ return dev_found;
+}
+
+static grub_err_t
+grub_btrfs_read_logical (struct grub_btrfs_data *data,
+ grub_disk_addr_t addr,
+ void *buf, grub_size_t size)
+{
+ while (size > 0)
+ {
+ grub_uint8_t *ptr;
+ struct grub_btrfs_key *key;
+ struct grub_btrfs_chunk_item *chunk;
+ grub_uint64_t csize;
+ grub_err_t err;
+ struct grub_btrfs_key key_out;
+ int challoc = 0;
+ grub_device_t dev;
+ grub_dprintf ("btrfs", "searching for laddr %" PRIxGRUB_UINT64_T "\n",
+ addr);
+ for (ptr = data->sblock.bootstrap_mapping;
+ ptr < data->sblock.bootstrap_mapping
+ + sizeof (data->sblock.bootstrap_mapping)
+ - sizeof (struct grub_btrfs_key);
+ )
+ {
+ key = (struct grub_btrfs_key *) ptr;
+ if (key->type != GRUB_BTRFS_ITEM_TYPE_CHUNK)
+ break;
+ chunk = (struct grub_btrfs_chunk_item *) (key + 1);
+ grub_dprintf ("btrfs", "%" PRIxGRUB_UINT64_T " %" PRIxGRUB_UINT64_T " \n",
+ grub_le_to_cpu64 (key->offset),
+ grub_le_to_cpu64 (chunk->size));
+ if (grub_le_to_cpu64 (key->offset) <= addr
+ && addr < grub_le_to_cpu64 (key->offset)
+ + grub_le_to_cpu64 (chunk->size))
+ goto chunk_found;
+ ptr += sizeof (*key) + sizeof (*chunk)
+ + sizeof (struct grub_btrfs_chunk_stripe)
+ * grub_le_to_cpu16 (chunk->nstripes);
+ }
+ struct grub_btrfs_key key_in;
+ grub_size_t chsize;
+ grub_disk_addr_t chaddr;
+ key_in.object_id = GRUB_BTRFS_OBJECT_ID_CHUNK;
+ key_in.type = GRUB_BTRFS_ITEM_TYPE_CHUNK;
+ key_in.offset = addr;
+ err = lower_bound (data, &key_in, &key_out,
+ grub_le_to_cpu64 (data->sblock.chunk_tree),
+ &chaddr, &chsize, NULL);
+ if (err)
+ return err;
+ key = &key_out;
+ if (key->type != GRUB_BTRFS_ITEM_TYPE_CHUNK
+ || !(grub_le_to_cpu64 (key->offset) <= addr))
+ return grub_error (GRUB_ERR_BAD_FS,
+ "couldn't find the chunk descriptor");
+
+ chunk = grub_malloc (chsize);
+ if (!chunk)
+ return grub_errno;
+
+ challoc = 1;
+ err = grub_btrfs_read_logical (data, chaddr, chunk, chsize);
+ if (err)
+ {
+ grub_free (chunk);
+ return err;
+ }
+
+ chunk_found:
+ {
+ grub_uint32_t stripen;
+ grub_uint64_t stripe_offset;
+ grub_uint64_t off = addr - grub_le_to_cpu64 (key->offset);
+ unsigned redundancy = 1;
+ unsigned i, j;
+
+ if (grub_le_to_cpu64 (chunk->size) <= off)
+ {
+ grub_dprintf ("btrfs", "no chunk\n");
+ return grub_error (GRUB_ERR_BAD_FS,
+ "couldn't find the chunk descriptor");
+ }
+
+ grub_dprintf ("btrfs", "chunk 0x%" PRIxGRUB_UINT64_T
+ "+0x%" PRIxGRUB_UINT64_T
+ " (%d stripes (%d substripes) of %"
+ PRIxGRUB_UINT64_T ")\n",
+ grub_le_to_cpu64 (key->offset),
+ grub_le_to_cpu64 (chunk->size),
+ grub_le_to_cpu16 (chunk->nstripes),
+ grub_le_to_cpu16 (chunk->nsubstripes),
+ grub_le_to_cpu64 (chunk->stripe_length));
+
+ switch (grub_le_to_cpu64 (chunk->type)
+ & ~GRUB_BTRFS_CHUNK_TYPE_BITS_DONTCARE)
+ {
+ case GRUB_BTRFS_CHUNK_TYPE_SINGLE:
+ {
+ grub_uint64_t stripe_length;
+ grub_dprintf ("btrfs", "single\n");
+ stripe_length = grub_divmod64_full (grub_le_to_cpu64 (chunk->size),
+ grub_le_to_cpu16 (chunk->nstripes),
+ NULL);
+ stripen = grub_divmod64_full (off, stripe_length, &stripe_offset);
+ csize = (stripen + 1) * stripe_length - off;
+ break;
+ }
+ case GRUB_BTRFS_CHUNK_TYPE_DUPLICATED:
+ case GRUB_BTRFS_CHUNK_TYPE_RAID1:
+ {
+ grub_dprintf ("btrfs", "RAID1\n");
+ stripen = 0;
+ stripe_offset = off;
+ csize = grub_le_to_cpu64 (chunk->size) - off;
+ redundancy = 2;
+ break;
+ }
+ case GRUB_BTRFS_CHUNK_TYPE_RAID0:
+ {
+ grub_uint64_t middle, high;
+ grub_uint32_t low;
+ grub_dprintf ("btrfs", "RAID0\n");
+ middle = grub_divmod64 (off,
+ grub_le_to_cpu64 (chunk->stripe_length),
+ &low);
+
+ high = grub_divmod64 (middle, grub_le_to_cpu16 (chunk->nstripes),
+ &stripen);
+ stripe_offset = low + grub_le_to_cpu64 (chunk->stripe_length)
+ * high;
+ csize = grub_le_to_cpu64 (chunk->stripe_length) - low;
+ break;
+ }
+ case GRUB_BTRFS_CHUNK_TYPE_RAID10:
+ {
+ grub_uint64_t middle, high;
+ grub_uint32_t low;
+ middle = grub_divmod64 (off,
+ grub_le_to_cpu64 (chunk->stripe_length),
+ &low);
+
+ high = grub_divmod64 (middle,
+ grub_le_to_cpu16 (chunk->nsubstripes),
+ &stripen);
+ stripen *= grub_le_to_cpu16 (chunk->nstripes)
+ / grub_le_to_cpu16 (chunk->nsubstripes);
+ redundancy = grub_le_to_cpu16 (chunk->nstripes)
+ / grub_le_to_cpu16 (chunk->nsubstripes);
+ stripe_offset = low + grub_le_to_cpu64 (chunk->stripe_length)
+ * high;
+ csize = grub_le_to_cpu64 (chunk->stripe_length) - low;
+ break;
+ }
+ default:
+ grub_dprintf ("btrfs", "unsupported RAID\n");
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unsupported RAID flags %" PRIxGRUB_UINT64_T,
+ grub_le_to_cpu64 (chunk->type));
+ }
+ if (csize == 0)
+ return grub_error (GRUB_ERR_BUG,
+ "couldn't find the chunk descriptor");
+ if ((grub_size_t) csize > size)
+ csize = size;
+
+ for (j = 0; j < 2; j++)
+ {
+ for (i = 0; i < redundancy; i++)
+ {
+ struct grub_btrfs_chunk_stripe *stripe;
+ grub_disk_addr_t paddr;
+
+ stripe = (struct grub_btrfs_chunk_stripe *) (chunk + 1);
+ /* Right now the redundancy handling is easy.
+ With RAID5-like it will be more difficult. */
+ stripe += stripen + i;
+
+ paddr = stripe->offset + stripe_offset;
+
+ grub_dprintf ("btrfs", "chunk 0x%" PRIxGRUB_UINT64_T
+ "+0x%" PRIxGRUB_UINT64_T " (%d stripes (%d substripes) of %"
+ PRIxGRUB_UINT64_T ") stripe %" PRIxGRUB_UINT32_T
+ " maps to 0x%" PRIxGRUB_UINT64_T "\n",
+ grub_le_to_cpu64 (key->offset),
+ grub_le_to_cpu64 (chunk->size),
+ grub_le_to_cpu16 (chunk->nstripes),
+ grub_le_to_cpu16 (chunk->nsubstripes),
+ grub_le_to_cpu64 (chunk->stripe_length),
+ stripen, stripe->offset);
+ grub_dprintf ("btrfs", "reading paddr 0x%" PRIxGRUB_UINT64_T
+ " for laddr 0x%" PRIxGRUB_UINT64_T"\n", paddr,
+ addr);
+
+ dev = find_device (data, stripe->device_id, j);
+ if (!dev)
+ {
+ err = grub_errno;
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ err = grub_disk_read (dev->disk, paddr >> GRUB_DISK_SECTOR_BITS,
+ paddr & (GRUB_DISK_SECTOR_SIZE - 1),
+ csize, buf);
+ if (!err)
+ break;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (i != redundancy)
+ break;
+ }
+ if (err)
+ return grub_errno = err;
+ }
+ size -= csize;
+ buf = (grub_uint8_t *) buf + csize;
+ addr += csize;
+ if (challoc)
+ grub_free (chunk);
+ }
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_btrfs_data *
+grub_btrfs_mount (grub_device_t dev)
+{
+ struct grub_btrfs_data *data;
+ grub_err_t err;
+
+ if (!dev->disk)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not BtrFS");
+ return NULL;
+ }
+
+ data = grub_zalloc (sizeof (*data));
+ if (! data)
+ return NULL;
+
+ err = read_sblock (dev->disk, &data->sblock);
+ if (err)
+ {
+ grub_free (data);
+ return NULL;
+ }
+
+ data->n_devices_allocated = 16;
+ data->devices_attached = grub_malloc (sizeof (data->devices_attached[0])
+ * data->n_devices_allocated);
+ if (!data->devices_attached)
+ {
+ grub_free (data);
+ return NULL;
+ }
+ data->n_devices_attached = 1;
+ data->devices_attached[0].dev = dev;
+ data->devices_attached[0].id = data->sblock.this_device.device_id;
+
+ return data;
+}
+
+static void
+grub_btrfs_unmount (struct grub_btrfs_data *data)
+{
+ unsigned i;
+ /* The device 0 is closed one layer upper. */
+ for (i = 1; i < data->n_devices_attached; i++)
+ grub_device_close (data->devices_attached[i].dev);
+ grub_free (data->devices_attached);
+ grub_free (data->extent);
+ grub_free (data);
+}
+
+static grub_err_t
+grub_btrfs_read_inode (struct grub_btrfs_data *data,
+ struct grub_btrfs_inode *inode, grub_uint64_t num,
+ grub_uint64_t tree)
+{
+ struct grub_btrfs_key key_in, key_out;
+ grub_disk_addr_t elemaddr;
+ grub_size_t elemsize;
+ grub_err_t err;
+
+ key_in.object_id = num;
+ key_in.type = GRUB_BTRFS_ITEM_TYPE_INODE_ITEM;
+ key_in.offset = 0;
+
+ err = lower_bound (data, &key_in, &key_out, tree,
+ &elemaddr, &elemsize, NULL);
+ if (err)
+ return err;
+ if (num != key_out.object_id
+ || key_out.type != GRUB_BTRFS_ITEM_TYPE_INODE_ITEM)
+ return grub_error (GRUB_ERR_BAD_FS, "inode not found");
+
+ return grub_btrfs_read_logical (data, elemaddr, inode, sizeof (*inode));
+}
+
+static grub_ssize_t
+grub_btrfs_extent_read (struct grub_btrfs_data *data,
+ grub_uint64_t ino, grub_uint64_t tree,
+ grub_off_t pos0, char *buf, grub_size_t len)
+{
+ grub_off_t pos = pos0;
+ while (len)
+ {
+ grub_size_t csize;
+ grub_err_t err;
+ grub_off_t extoff;
+ if (!data->extent || data->extstart > pos || data->extino != ino
+ || data->exttree != tree || data->extend <= pos)
+ {
+ struct grub_btrfs_key key_in, key_out;
+ grub_disk_addr_t elemaddr;
+ grub_size_t elemsize;
+
+ grub_free (data->extent);
+ key_in.object_id = ino;
+ key_in.type = GRUB_BTRFS_ITEM_TYPE_EXTENT_ITEM;
+ key_in.offset = grub_cpu_to_le64 (pos);
+ err = lower_bound (data, &key_in, &key_out, tree,
+ &elemaddr, &elemsize, NULL);
+ if (err)
+ return -1;
+ if (key_out.object_id != ino
+ || key_out.type != GRUB_BTRFS_ITEM_TYPE_EXTENT_ITEM)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "extent not found");
+ return -1;
+ }
+ data->extstart = grub_le_to_cpu64 (key_out.offset);
+ data->extsize = elemsize;
+ data->extent = grub_malloc (elemsize);
+ data->extino = ino;
+ data->exttree = tree;
+ if (!data->extent)
+ return grub_errno;
+
+ err = grub_btrfs_read_logical (data, elemaddr,
+ data->extent, elemsize);
+ if (err)
+ return err;
+
+ data->extend = data->extstart
+ + grub_le_to_cpu64 (data->extent->size);
+ if (data->extent->type == GRUB_BTRFS_EXTENT_REGULAR
+ && (char *) &data->extent + elemsize
+ >= (char *) &data->extent->filled
+ + sizeof (data->extent->filled))
+ data->extend = data->extstart
+ + grub_le_to_cpu64 (data->extent->filled);
+
+ grub_dprintf ("btrfs", "extent 0x%" PRIxGRUB_UINT64_T "+0x%"
+ PRIxGRUB_UINT64_T " (0x%"
+ PRIxGRUB_UINT64_T ")\n",
+ grub_le_to_cpu64 (key_out.offset),
+ grub_le_to_cpu64 (data->extent->size),
+ grub_le_to_cpu64 (data->extent->filled));
+ if (data->extend <= pos)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "extent not found");
+ return -1;
+ }
+ }
+ csize = data->extend - pos;
+ extoff = pos - data->extstart;
+ if (csize > len)
+ csize = len;
+
+ if (data->extent->encryption)
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "encryption not supported");
+ return -1;
+ }
+
+ if (data->extent->compression != GRUB_BTRFS_COMPRESSION_NONE
+ && data->extent->compression != GRUB_BTRFS_COMPRESSION_ZLIB)
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "compression type 0x%x not supported",
+ data->extent->compression);
+ return -1;
+ }
+
+ if (data->extent->encoding)
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "encoding not supported");
+ return -1;
+ }
+
+ switch (data->extent->type)
+ {
+ case GRUB_BTRFS_EXTENT_INLINE:
+ if (data->extent->compression == GRUB_BTRFS_COMPRESSION_ZLIB)
+ {
+ if (grub_zlib_decompress (data->extent->inl, data->extsize -
+ ((grub_uint8_t *) data->extent->inl
+ - (grub_uint8_t *) data->extent),
+ extoff, buf, csize)
+ != (grub_ssize_t) csize)
+ return -1;
+ }
+ else
+ grub_memcpy (buf, data->extent->inl + extoff, csize);
+ break;
+ case GRUB_BTRFS_EXTENT_REGULAR:
+ if (!data->extent->laddr)
+ {
+ grub_memset (buf, 0, csize);
+ break;
+ }
+ if (data->extent->compression == GRUB_BTRFS_COMPRESSION_ZLIB)
+ {
+ char *tmp;
+ grub_uint64_t zsize;
+ zsize = grub_le_to_cpu64 (data->extent->compressed_size);
+ tmp = grub_malloc (zsize);
+ if (!tmp)
+ return -1;
+ err = grub_btrfs_read_logical (data,
+ grub_le_to_cpu64 (data->extent->laddr),
+ tmp, zsize);
+ if (err)
+ {
+ grub_free (tmp);
+ return -1;
+ }
+ if (grub_zlib_decompress (tmp, zsize, extoff
+ + grub_le_to_cpu64 (data->extent->offset),
+ buf, csize) != (grub_ssize_t) csize)
+ {
+ grub_free (tmp);
+ return -1;
+ }
+ grub_free (tmp);
+ break;
+ }
+ err = grub_btrfs_read_logical (data,
+ grub_le_to_cpu64 (data->extent->laddr)
+ + grub_le_to_cpu64 (data->extent->offset)
+ + extoff,
+ buf, csize);
+ if (err)
+ return -1;
+ break;
+ default:
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unsupported extent type 0x%x", data->extent->type);
+ return -1;
+ }
+ buf += csize;
+ pos += csize;
+ len -= csize;
+ }
+ return pos - pos0;
+}
+
+static grub_err_t
+find_path (struct grub_btrfs_data *data,
+ const char *path, struct grub_btrfs_key *key,
+ grub_uint64_t *tree, grub_uint8_t *type)
+{
+ const char *slash = path;
+ grub_err_t err;
+ grub_disk_addr_t elemaddr;
+ grub_size_t elemsize;
+ grub_size_t allocated = 0;
+ struct grub_btrfs_dir_item *direl = NULL;
+ struct grub_btrfs_key key_out;
+ int skip_default;
+ const char *ctoken;
+ grub_size_t ctokenlen;
+ char *path_alloc = NULL;
+ unsigned symlinks_max = 32;
+
+ *type = GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY;
+ *tree = data->sblock.root_tree;
+ key->object_id = data->sblock.root_dir_objectid;
+ key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
+ key->offset = 0;
+ skip_default = 1;
+
+ while (1)
+ {
+ if (!skip_default)
+ {
+ while (path[0] == '/')
+ path++;
+ if (!path[0])
+ break;
+ slash = grub_strchr (path, '/');
+ if (!slash)
+ slash = path + grub_strlen (path);
+ ctoken = path;
+ ctokenlen = slash - path;
+ }
+ else
+ {
+ ctoken = "default";
+ ctokenlen = sizeof ("default") - 1;
+ }
+
+ if (*type != GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY)
+ {
+ grub_free (path_alloc);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ }
+
+ key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
+ key->offset = grub_cpu_to_le64 (~grub_getcrc32c (1, ctoken, ctokenlen));
+
+ err = lower_bound (data, key, &key_out, *tree,
+ &elemaddr, &elemsize, NULL);
+ if (err)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return err;
+ }
+ if (key_cmp (key, &key_out) != 0)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ }
+
+ struct grub_btrfs_dir_item *cdirel;
+ if (elemsize > allocated)
+ {
+ allocated = 2 * elemsize;
+ grub_free (direl);
+ direl = grub_malloc (allocated + 1);
+ if (!direl)
+ {
+ grub_free (path_alloc);
+ return grub_errno;
+ }
+ }
+
+ err = grub_btrfs_read_logical (data, elemaddr, direl, elemsize);
+ if (err)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return err;
+ }
+
+ for (cdirel = direl;
+ (grub_uint8_t *) cdirel - (grub_uint8_t *) direl
+ < (grub_ssize_t) elemsize;
+ cdirel = (void *) ((grub_uint8_t *) (direl + 1)
+ + grub_le_to_cpu16 (cdirel->n)
+ + grub_le_to_cpu16 (cdirel->m)))
+ {
+ if (ctokenlen == grub_le_to_cpu16 (cdirel->n)
+ && grub_memcmp (cdirel->name, ctoken, ctokenlen) == 0)
+ break;
+ }
+ if ((grub_uint8_t *) cdirel - (grub_uint8_t *) direl
+ >= (grub_ssize_t) elemsize)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ }
+
+ if (!skip_default)
+ path = slash;
+ skip_default = 0;
+ if (cdirel->type == GRUB_BTRFS_DIR_ITEM_TYPE_SYMLINK)
+ {
+ struct grub_btrfs_inode inode;
+ char *tmp;
+ if (--symlinks_max == 0)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return grub_error (GRUB_ERR_SYMLINK_LOOP,
+ "too deep nesting of symlinks");
+ }
+
+ err = grub_btrfs_read_inode (data, &inode,
+ cdirel->key.object_id, *tree);
+ if (err)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return err;
+ }
+ tmp = grub_malloc (grub_le_to_cpu64 (inode.size)
+ + grub_strlen (path) + 1);
+ if (!tmp)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return grub_errno;
+ }
+
+ if (grub_btrfs_extent_read (data, cdirel->key.object_id,
+ *tree, 0, tmp,
+ grub_le_to_cpu64 (inode.size))
+ != (grub_ssize_t) grub_le_to_cpu64 (inode.size))
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ grub_free (tmp);
+ return grub_errno;
+ }
+ grub_memcpy (tmp + grub_le_to_cpu64 (inode.size), path,
+ grub_strlen (path) + 1);
+ grub_free (path_alloc);
+ path = path_alloc = tmp;
+ if (path[0] == '/')
+ {
+ *type = GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY;
+ *tree = data->sblock.root_tree;
+ key->object_id = data->sblock.root_dir_objectid;
+ key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
+ key->offset = 0;
+ skip_default = 1;
+ }
+ continue;
+ }
+ *type = cdirel->type;
+
+ switch (cdirel->key.type)
+ {
+ case GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM:
+ {
+ struct grub_btrfs_root_item ri;
+ err = lower_bound (data, &cdirel->key, &key_out,
+ data->sblock.root_tree,
+ &elemaddr, &elemsize, NULL);
+ if (err)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return err;
+ }
+ if (cdirel->key.object_id != key_out.object_id
+ || cdirel->key.type != key_out.type)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ }
+ err = grub_btrfs_read_logical (data, elemaddr,
+ &ri, sizeof (ri));
+ if (err)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return err;
+ }
+ key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
+ key->offset = 0;
+ key->object_id = GRUB_BTRFS_OBJECT_ID_CHUNK;
+ *tree = grub_le_to_cpu64 (ri.tree);
+ break;
+ }
+ case GRUB_BTRFS_ITEM_TYPE_INODE_ITEM:
+ if (*slash && *type == GRUB_BTRFS_DIR_ITEM_TYPE_REGULAR)
+ {
+ grub_free (direl);
+ grub_free (path_alloc);
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ }
+ *key = cdirel->key;
+ if (*type == GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY)
+ key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
+ break;
+ default:
+ grub_free (path_alloc);
+ grub_free (direl);
+ return grub_error (GRUB_ERR_BAD_FS, "unrecognised object type 0x%x",
+ cdirel->key.type);
+ }
+ }
+
+ grub_free (direl);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_btrfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_btrfs_data *data = grub_btrfs_mount (device);
+ struct grub_btrfs_key key_in, key_out;
+ grub_err_t err;
+ grub_disk_addr_t elemaddr;
+ grub_size_t elemsize;
+ grub_size_t allocated = 0;
+ struct grub_btrfs_dir_item *direl = NULL;
+ struct grub_btrfs_leaf_descriptor desc;
+ int r = 0;
+ grub_uint64_t tree;
+ grub_uint8_t type;
+
+ if (!data)
+ return grub_errno;
+
+ err = find_path (data, path, &key_in, &tree, &type);
+ if (err)
+ return err;
+ if (type != GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+
+ err = lower_bound (data, &key_in, &key_out, tree,
+ &elemaddr, &elemsize, &desc);
+ if (err)
+ return err;
+ if (key_out.type != GRUB_BTRFS_ITEM_TYPE_DIR_ITEM
+ || key_out.object_id != key_in.object_id)
+ {
+ r = next (data, &desc, &elemaddr, &elemsize, &key_out);
+ if (r <= 0)
+ {
+ free_iterator (&desc);
+ return -r;
+ }
+ }
+ do
+ {
+ struct grub_btrfs_dir_item *cdirel;
+ if (key_out.type != GRUB_BTRFS_ITEM_TYPE_DIR_ITEM
+ || key_out.object_id != key_in.object_id)
+ {
+ r = 0;
+ break;
+ }
+ if (elemsize > allocated)
+ {
+ allocated = 2 * elemsize;
+ grub_free (direl);
+ direl = grub_malloc (allocated + 1);
+ if (!direl)
+ {
+ free_iterator (&desc);
+ return grub_errno;
+ }
+ }
+
+ err = grub_btrfs_read_logical (data, elemaddr, direl, elemsize);
+ if (err)
+ return err;
+
+ for (cdirel = direl;
+ (grub_uint8_t *) cdirel - (grub_uint8_t *) direl
+ < (grub_ssize_t) elemsize;
+ cdirel = (void *) ((grub_uint8_t *) (direl + 1)
+ + grub_le_to_cpu16 (cdirel->n)
+ + grub_le_to_cpu16 (cdirel->m)))
+ {
+ char c;
+ struct grub_btrfs_inode inode;
+ struct grub_dirhook_info info;
+ err = grub_btrfs_read_inode (data, &inode, cdirel->key.object_id,
+ tree);
+ grub_memset (&info, 0, sizeof (info));
+ if (err)
+ grub_errno = GRUB_ERR_NONE;
+ else
+ {
+ info.mtime = inode.mtime.sec;
+ info.mtimeset = 1;
+ }
+ c = cdirel->name[grub_le_to_cpu16 (cdirel->n)];
+ cdirel->name[grub_le_to_cpu16 (cdirel->n)] = 0;
+ info.dir = (cdirel->type == GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY);
+ if (hook (cdirel->name, &info))
+ goto out;
+ cdirel->name[grub_le_to_cpu16 (cdirel->n)] = c;
+ }
+ r = next (data, &desc, &elemaddr, &elemsize, &key_out);
+ }
+ while (r > 0);
+
+ out:
+ grub_free (direl);
+
+ free_iterator (&desc);
+ grub_btrfs_unmount (data);
+
+ return -r;
+}
+
+static grub_err_t
+grub_btrfs_open (struct grub_file *file, const char *name)
+{
+ struct grub_btrfs_data *data = grub_btrfs_mount (file->device);
+ grub_err_t err;
+ struct grub_btrfs_inode inode;
+ grub_uint8_t type;
+ struct grub_btrfs_key key_in;
+
+ if (!data)
+ return grub_errno;
+
+ err = find_path (data, name, &key_in, &data->tree, &type);
+ if (err)
+ {
+ grub_btrfs_unmount (data);
+ return err;
+ }
+ if (type != GRUB_BTRFS_DIR_ITEM_TYPE_REGULAR)
+ {
+ grub_btrfs_unmount (data);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a regular file");
+ }
+
+ data->inode = key_in.object_id;
+ err = grub_btrfs_read_inode (data, &inode, data->inode, data->tree);
+ if (err)
+ {
+ grub_btrfs_unmount (data);
+ return err;
+ }
+
+ file->data = data;
+ file->size = grub_le_to_cpu64 (inode.size);
+
+ return err;
+}
+
+static grub_err_t
+grub_btrfs_close (grub_file_t file)
+{
+ grub_btrfs_unmount (file->data);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_ssize_t
+grub_btrfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_btrfs_data *data = file->data;
+
+ return grub_btrfs_extent_read (data, data->inode,
+ data->tree, file->offset, buf, len);
+}
+
+static grub_err_t
+grub_btrfs_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_btrfs_data *data;
+
+ *uuid = NULL;
+
+ data = grub_btrfs_mount (device);
+ if (! data)
+ return grub_errno;
+
+ *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+ grub_be_to_cpu16 (data->sblock.uuid[0]),
+ grub_be_to_cpu16 (data->sblock.uuid[1]),
+ grub_be_to_cpu16 (data->sblock.uuid[2]),
+ grub_be_to_cpu16 (data->sblock.uuid[3]),
+ grub_be_to_cpu16 (data->sblock.uuid[4]),
+ grub_be_to_cpu16 (data->sblock.uuid[5]),
+ grub_be_to_cpu16 (data->sblock.uuid[6]),
+ grub_be_to_cpu16 (data->sblock.uuid[7]));
+
+ grub_btrfs_unmount (data);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_btrfs_label (grub_device_t device, char **label)
+{
+ struct grub_btrfs_data *data;
+
+ *label = NULL;
+
+ data = grub_btrfs_mount (device);
+ if (! data)
+ return grub_errno;
+
+ *label = grub_strndup (data->sblock.label, sizeof (data->sblock.label));
+
+ grub_btrfs_unmount (data);
+
+ return grub_errno;
+}
+
+static struct grub_fs grub_btrfs_fs =
+ {
+ .name = "btrfs",
+ .dir = grub_btrfs_dir,
+ .open = grub_btrfs_open,
+ .read = grub_btrfs_read,
+ .close = grub_btrfs_close,
+ .uuid = grub_btrfs_uuid,
+ .label = grub_btrfs_label,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 1,
+#endif
+ };
+
+GRUB_MOD_INIT(btrfs)
+{
+ grub_fs_register (&grub_btrfs_fs);
+}
+
+GRUB_MOD_FINI(btrfs)
+{
+ grub_fs_unregister (&grub_btrfs_fs);
+}
diff --git a/grub-core/fs/cpio.c b/grub-core/fs/cpio.c
new file mode 100644
index 0000000..a7ccfbd
--- /dev/null
+++ b/grub-core/fs/cpio.c
@@ -0,0 +1,381 @@
+/* cpio.c - cpio and tar filesystem. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifndef MODE_USTAR
+/* cpio support */
+#define MAGIC_BCPIO 070707
+struct head
+{
+ grub_uint16_t magic;
+ grub_uint16_t dev;
+ grub_uint16_t ino;
+ grub_uint16_t mode;
+ grub_uint16_t uid;
+ grub_uint16_t gid;
+ grub_uint16_t nlink;
+ grub_uint16_t rdev;
+ grub_uint16_t mtime_1;
+ grub_uint16_t mtime_2;
+ grub_uint16_t namesize;
+ grub_uint16_t filesize_1;
+ grub_uint16_t filesize_2;
+} __attribute__ ((packed));
+#else
+/* tar support */
+#define MAGIC_USTAR "ustar"
+struct head
+{
+ char name[100];
+ char mode[8];
+ char uid[8];
+ char gid[8];
+ char size[12];
+ char mtime[12];
+ char chksum[8];
+ char typeflag;
+ char linkname[100];
+ char magic[6];
+ char version[2];
+ char uname[32];
+ char gname[32];
+ char devmajor[8];
+ char devminor[8];
+ char prefix[155];
+} __attribute__ ((packed));
+#endif
+
+struct grub_cpio_data
+{
+ grub_disk_t disk;
+ grub_uint32_t hofs;
+ grub_uint32_t dofs;
+ grub_uint32_t size;
+};
+
+static grub_dl_t my_mod;
+
+static grub_err_t
+grub_cpio_find_file (struct grub_cpio_data *data, char **name,
+ grub_uint32_t * ofs)
+{
+#ifndef MODE_USTAR
+ struct head hd;
+
+ if (grub_disk_read
+ (data->disk, 0, data->hofs, sizeof (hd), &hd))
+ return grub_errno;
+
+ if (hd.magic != MAGIC_BCPIO)
+ return grub_error (GRUB_ERR_BAD_FS, "invalid cpio archive");
+
+ data->size = (((grub_uint32_t) hd.filesize_1) << 16) + hd.filesize_2;
+
+ if (hd.namesize & 1)
+ hd.namesize++;
+
+ if ((*name = grub_malloc (hd.namesize)) == NULL)
+ return grub_errno;
+
+ if (grub_disk_read (data->disk, 0, data->hofs + sizeof (hd),
+ hd.namesize, *name))
+ {
+ grub_free (*name);
+ return grub_errno;
+ }
+
+ if (data->size == 0 && hd.mode == 0 && hd.namesize == 11 + 1
+ && ! grub_memcmp(*name, "TRAILER!!!", 11))
+ {
+ *ofs = 0;
+ return GRUB_ERR_NONE;
+ }
+
+ data->dofs = data->hofs + sizeof (hd) + hd.namesize;
+ *ofs = data->dofs + data->size;
+ if (data->size & 1)
+ (*ofs)++;
+#else
+ struct head hd;
+
+ if (grub_disk_read
+ (data->disk, 0, data->hofs, sizeof (hd), &hd))
+ return grub_errno;
+
+ if (!hd.name[0])
+ {
+ *ofs = 0;
+ return GRUB_ERR_NONE;
+ }
+
+ if (grub_memcmp (hd.magic, MAGIC_USTAR, sizeof (MAGIC_USTAR) - 1))
+ return grub_error (GRUB_ERR_BAD_FS, "invalid tar archive");
+
+ if ((*name = grub_strdup (hd.name)) == NULL)
+ return grub_errno;
+
+ data->size = grub_strtoul (hd.size, NULL, 8);
+ data->dofs = data->hofs + GRUB_DISK_SECTOR_SIZE;
+ *ofs = data->dofs + ((data->size + GRUB_DISK_SECTOR_SIZE - 1) &
+ ~(GRUB_DISK_SECTOR_SIZE - 1));
+#endif
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_cpio_data *
+grub_cpio_mount (grub_disk_t disk)
+{
+ struct head hd;
+ struct grub_cpio_data *data;
+
+ if (grub_disk_read (disk, 0, 0, sizeof (hd), &hd))
+ goto fail;
+
+#ifndef MODE_USTAR
+ if (hd.magic != MAGIC_BCPIO)
+#else
+ if (grub_memcmp (hd.magic, MAGIC_USTAR,
+ sizeof (MAGIC_USTAR) - 1))
+#endif
+ goto fail;
+
+ data = (struct grub_cpio_data *) grub_malloc (sizeof (*data));
+ if (!data)
+ goto fail;
+
+ data->disk = disk;
+
+ return data;
+
+fail:
+ grub_error (GRUB_ERR_BAD_FS, "not a "
+#ifdef MODE_USTAR
+ "tar"
+#else
+ "cpio"
+#endif
+ " filesystem");
+ return 0;
+}
+
+static grub_err_t
+grub_cpio_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_cpio_data *data;
+ grub_uint32_t ofs;
+ char *prev, *name;
+ const char *np;
+ int len;
+
+ grub_dl_ref (my_mod);
+
+ prev = 0;
+
+ data = grub_cpio_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ np = path + 1;
+ len = grub_strlen (path) - 1;
+
+ data->hofs = 0;
+ while (1)
+ {
+ if (grub_cpio_find_file (data, &name, &ofs))
+ goto fail;
+
+ if (!ofs)
+ break;
+
+ if (grub_memcmp (np, name, len) == 0)
+ {
+ char *p, *n;
+
+ n = name + len;
+ if (*n == '/')
+ n++;
+
+ p = grub_strchr (name + len, '/');
+ if (p)
+ *p = 0;
+
+ if ((!prev) || (grub_strcmp (prev, name) != 0))
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = (p != NULL);
+
+ hook (name + len, &info);
+ if (prev)
+ grub_free (prev);
+ prev = name;
+ }
+ else
+ grub_free (name);
+ }
+ data->hofs = ofs;
+ }
+
+fail:
+
+ if (prev)
+ grub_free (prev);
+
+ if (data)
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cpio_open (grub_file_t file, const char *name)
+{
+ struct grub_cpio_data *data;
+ grub_uint32_t ofs;
+ char *fn;
+ int i, j;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_cpio_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ data->hofs = 0;
+ while (1)
+ {
+ if (grub_cpio_find_file (data, &fn, &ofs))
+ goto fail;
+
+ if (!ofs)
+ {
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ break;
+ }
+
+ /* Compare NAME and FN by hand in order to cope with duplicate
+ slashes. */
+ i = 0;
+ j = 0;
+ while (name[i] == '/')
+ i++;
+ while (1)
+ {
+ if (name[i] != fn[j])
+ goto no_match;
+
+ if (name[i] == '\0')
+ break;
+
+ while (name[i] == '/' && name[i+1] == '/')
+ i++;
+
+ i++;
+ j++;
+ }
+
+ if (name[i] != fn[j])
+ goto no_match;
+
+ file->data = data;
+ file->size = data->size;
+ grub_free (fn);
+
+ return GRUB_ERR_NONE;
+
+ no_match:
+
+ grub_free (fn);
+ data->hofs = ofs;
+ }
+
+fail:
+
+ if (data)
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_ssize_t
+grub_cpio_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_cpio_data *data;
+
+ data = file->data;
+ return (grub_disk_read (data->disk, 0, data->dofs + file->offset,
+ len, buf)) ? -1 : (grub_ssize_t) len;
+}
+
+static grub_err_t
+grub_cpio_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static struct grub_fs grub_cpio_fs = {
+#ifdef MODE_USTAR
+ .name = "tarfs",
+#else
+ .name = "cpiofs",
+#endif
+ .dir = grub_cpio_dir,
+ .open = grub_cpio_open,
+ .read = grub_cpio_read,
+ .close = grub_cpio_close,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 0,
+#endif
+};
+
+#ifdef MODE_USTAR
+GRUB_MOD_INIT (tar)
+#else
+GRUB_MOD_INIT (cpio)
+#endif
+{
+ grub_fs_register (&grub_cpio_fs);
+ my_mod = mod;
+}
+
+#ifdef MODE_USTAR
+GRUB_MOD_FINI (tar)
+#else
+GRUB_MOD_FINI (cpio)
+#endif
+{
+ grub_fs_unregister (&grub_cpio_fs);
+}
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
new file mode 100644
index 0000000..0fdf151
--- /dev/null
+++ b/grub-core/fs/ext2.c
@@ -0,0 +1,991 @@
+/* ext2.c - Second Extended filesystem */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Magic value used to identify an ext2 filesystem. */
+#define EXT2_MAGIC 0xEF53
+/* Amount of indirect blocks in an inode. */
+#define INDIRECT_BLOCKS 12
+/* Maximum length of a pathname. */
+#define EXT2_PATH_MAX 4096
+/* Maximum nesting of symlinks, used to prevent a loop. */
+#define EXT2_MAX_SYMLINKCNT 8
+
+/* The good old revision and the default inode size. */
+#define EXT2_GOOD_OLD_REVISION 0
+#define EXT2_GOOD_OLD_INODE_SIZE 128
+
+/* Filetype used in directory entry. */
+#define FILETYPE_UNKNOWN 0
+#define FILETYPE_REG 1
+#define FILETYPE_DIRECTORY 2
+#define FILETYPE_SYMLINK 7
+
+/* Filetype information as used in inodes. */
+#define FILETYPE_INO_MASK 0170000
+#define FILETYPE_INO_REG 0100000
+#define FILETYPE_INO_DIRECTORY 0040000
+#define FILETYPE_INO_SYMLINK 0120000
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Log2 size of ext2 block in 512 blocks. */
+#define LOG2_EXT2_BLOCK_SIZE(data) \
+ (grub_le_to_cpu32 (data->sblock.log2_block_size) + 1)
+
+/* Log2 size of ext2 block in bytes. */
+#define LOG2_BLOCK_SIZE(data) \
+ (grub_le_to_cpu32 (data->sblock.log2_block_size) + 10)
+
+/* The size of an ext2 block in bytes. */
+#define EXT2_BLOCK_SIZE(data) (1 << LOG2_BLOCK_SIZE (data))
+
+/* The revision level. */
+#define EXT2_REVISION(data) grub_le_to_cpu32 (data->sblock.revision_level)
+
+/* The inode size. */
+#define EXT2_INODE_SIZE(data) \
+ (EXT2_REVISION (data) == EXT2_GOOD_OLD_REVISION \
+ ? EXT2_GOOD_OLD_INODE_SIZE \
+ : grub_le_to_cpu16 (data->sblock.inode_size))
+
+/* Superblock filesystem feature flags (RW compatible)
+ * A filesystem with any of these enabled can be read and written by a driver
+ * that does not understand them without causing metadata/data corruption. */
+#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
+#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
+#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
+#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010
+#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
+/* Superblock filesystem feature flags (RO compatible)
+ * A filesystem with any of these enabled can be safely read by a driver that
+ * does not understand them, but should not be written to, usually because
+ * additional metadata is required. */
+#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020
+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
+/* Superblock filesystem feature flags (back-incompatible)
+ * A filesystem with any of these enabled should not be attempted to be read
+ * by a driver that does not understand them, since they usually indicate
+ * metadata format changes that might confuse the reader. */
+#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
+#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */
+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Volume is journal device */
+#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
+#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 /* Extents used */
+#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
+#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
+
+/* The set of back-incompatible features this driver DOES support. Add (OR)
+ * flags here as the related features are implemented into the driver. */
+#define EXT2_DRIVER_SUPPORTED_INCOMPAT ( EXT2_FEATURE_INCOMPAT_FILETYPE \
+ | EXT4_FEATURE_INCOMPAT_EXTENTS \
+ | EXT4_FEATURE_INCOMPAT_FLEX_BG )
+/* List of rationales for the ignored "incompatible" features:
+ * needs_recovery: Not really back-incompatible - was added as such to forbid
+ * ext2 drivers from mounting an ext3 volume with a dirty
+ * journal because they will ignore the journal, but the next
+ * ext3 driver to mount the volume will find the journal and
+ * replay it, potentially corrupting the metadata written by
+ * the ext2 drivers. Safe to ignore for this RO driver. */
+#define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER )
+
+
+#define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
+
+#define EXT3_JOURNAL_DESCRIPTOR_BLOCK 1
+#define EXT3_JOURNAL_COMMIT_BLOCK 2
+#define EXT3_JOURNAL_SUPERBLOCK_V1 3
+#define EXT3_JOURNAL_SUPERBLOCK_V2 4
+#define EXT3_JOURNAL_REVOKE_BLOCK 5
+
+#define EXT3_JOURNAL_FLAG_ESCAPE 1
+#define EXT3_JOURNAL_FLAG_SAME_UUID 2
+#define EXT3_JOURNAL_FLAG_DELETED 4
+#define EXT3_JOURNAL_FLAG_LAST_TAG 8
+
+#define EXT4_EXTENTS_FLAG 0x80000
+
+/* The ext2 superblock. */
+struct grub_ext2_sblock
+{
+ grub_uint32_t total_inodes;
+ grub_uint32_t total_blocks;
+ grub_uint32_t reserved_blocks;
+ grub_uint32_t free_blocks;
+ grub_uint32_t free_inodes;
+ grub_uint32_t first_data_block;
+ grub_uint32_t log2_block_size;
+ grub_uint32_t log2_fragment_size;
+ grub_uint32_t blocks_per_group;
+ grub_uint32_t fragments_per_group;
+ grub_uint32_t inodes_per_group;
+ grub_uint32_t mtime;
+ grub_uint32_t utime;
+ grub_uint16_t mnt_count;
+ grub_uint16_t max_mnt_count;
+ grub_uint16_t magic;
+ grub_uint16_t fs_state;
+ grub_uint16_t error_handling;
+ grub_uint16_t minor_revision_level;
+ grub_uint32_t lastcheck;
+ grub_uint32_t checkinterval;
+ grub_uint32_t creator_os;
+ grub_uint32_t revision_level;
+ grub_uint16_t uid_reserved;
+ grub_uint16_t gid_reserved;
+ grub_uint32_t first_inode;
+ grub_uint16_t inode_size;
+ grub_uint16_t block_group_number;
+ grub_uint32_t feature_compatibility;
+ grub_uint32_t feature_incompat;
+ grub_uint32_t feature_ro_compat;
+ grub_uint16_t uuid[8];
+ char volume_name[16];
+ char last_mounted_on[64];
+ grub_uint32_t compression_info;
+ grub_uint8_t prealloc_blocks;
+ grub_uint8_t prealloc_dir_blocks;
+ grub_uint16_t reserved_gdt_blocks;
+ grub_uint8_t journal_uuid[16];
+ grub_uint32_t journal_inum;
+ grub_uint32_t journal_dev;
+ grub_uint32_t last_orphan;
+ grub_uint32_t hash_seed[4];
+ grub_uint8_t def_hash_version;
+ grub_uint8_t jnl_backup_type;
+ grub_uint16_t reserved_word_pad;
+ grub_uint32_t default_mount_opts;
+ grub_uint32_t first_meta_bg;
+ grub_uint32_t mkfs_time;
+ grub_uint32_t jnl_blocks[17];
+};
+
+/* The ext2 blockgroup. */
+struct grub_ext2_block_group
+{
+ grub_uint32_t block_id;
+ grub_uint32_t inode_id;
+ grub_uint32_t inode_table_id;
+ grub_uint16_t free_blocks;
+ grub_uint16_t free_inodes;
+ grub_uint16_t used_dirs;
+ grub_uint16_t pad;
+ grub_uint32_t reserved[3];
+};
+
+/* The ext2 inode. */
+struct grub_ext2_inode
+{
+ grub_uint16_t mode;
+ grub_uint16_t uid;
+ grub_uint32_t size;
+ grub_uint32_t atime;
+ grub_uint32_t ctime;
+ grub_uint32_t mtime;
+ grub_uint32_t dtime;
+ grub_uint16_t gid;
+ grub_uint16_t nlinks;
+ grub_uint32_t blockcnt; /* Blocks of 512 bytes!! */
+ grub_uint32_t flags;
+ grub_uint32_t osd1;
+ union
+ {
+ struct datablocks
+ {
+ grub_uint32_t dir_blocks[INDIRECT_BLOCKS];
+ grub_uint32_t indir_block;
+ grub_uint32_t double_indir_block;
+ grub_uint32_t triple_indir_block;
+ } blocks;
+ char symlink[60];
+ };
+ grub_uint32_t version;
+ grub_uint32_t acl;
+ grub_uint32_t size_high;
+ grub_uint32_t fragment_addr;
+ grub_uint32_t osd2[3];
+};
+
+/* The header of an ext2 directory entry. */
+struct ext2_dirent
+{
+ grub_uint32_t inode;
+ grub_uint16_t direntlen;
+ grub_uint8_t namelen;
+ grub_uint8_t filetype;
+};
+
+struct grub_ext3_journal_header
+{
+ grub_uint32_t magic;
+ grub_uint32_t block_type;
+ grub_uint32_t sequence;
+};
+
+struct grub_ext3_journal_revoke_header
+{
+ struct grub_ext3_journal_header header;
+ grub_uint32_t count;
+ grub_uint32_t data[0];
+};
+
+struct grub_ext3_journal_block_tag
+{
+ grub_uint32_t block;
+ grub_uint32_t flags;
+};
+
+struct grub_ext3_journal_sblock
+{
+ struct grub_ext3_journal_header header;
+ grub_uint32_t block_size;
+ grub_uint32_t maxlen;
+ grub_uint32_t first;
+ grub_uint32_t sequence;
+ grub_uint32_t start;
+};
+
+#define EXT4_EXT_MAGIC 0xf30a
+
+struct grub_ext4_extent_header
+{
+ grub_uint16_t magic;
+ grub_uint16_t entries;
+ grub_uint16_t max;
+ grub_uint16_t depth;
+ grub_uint32_t generation;
+};
+
+struct grub_ext4_extent
+{
+ grub_uint32_t block;
+ grub_uint16_t len;
+ grub_uint16_t start_hi;
+ grub_uint32_t start;
+};
+
+struct grub_ext4_extent_idx
+{
+ grub_uint32_t block;
+ grub_uint32_t leaf;
+ grub_uint16_t leaf_hi;
+ grub_uint16_t unused;
+};
+
+struct grub_fshelp_node
+{
+ struct grub_ext2_data *data;
+ struct grub_ext2_inode inode;
+ int ino;
+ int inode_read;
+};
+
+/* Information about a "mounted" ext2 filesystem. */
+struct grub_ext2_data
+{
+ struct grub_ext2_sblock sblock;
+ grub_disk_t disk;
+ struct grub_ext2_inode *inode;
+ struct grub_fshelp_node diropen;
+};
+
+static grub_dl_t my_mod;
+
+
+
+/* Read into BLKGRP the blockgroup descriptor of blockgroup GROUP of
+ the mounted filesystem DATA. */
+inline static grub_err_t
+grub_ext2_blockgroup (struct grub_ext2_data *data, int group,
+ struct grub_ext2_block_group *blkgrp)
+{
+ return grub_disk_read (data->disk,
+ ((grub_le_to_cpu32 (data->sblock.first_data_block) + 1)
+ << LOG2_EXT2_BLOCK_SIZE (data)),
+ group * sizeof (struct grub_ext2_block_group),
+ sizeof (struct grub_ext2_block_group), blkgrp);
+}
+
+static struct grub_ext4_extent_header *
+grub_ext4_find_leaf (struct grub_ext2_data *data, char *buf,
+ struct grub_ext4_extent_header *ext_block,
+ grub_uint32_t fileblock)
+{
+ struct grub_ext4_extent_idx *index;
+
+ while (1)
+ {
+ int i;
+ grub_disk_addr_t block;
+
+ index = (struct grub_ext4_extent_idx *) (ext_block + 1);
+
+ if (grub_le_to_cpu16(ext_block->magic) != EXT4_EXT_MAGIC)
+ return 0;
+
+ if (ext_block->depth == 0)
+ return ext_block;
+
+ for (i = 0; i < grub_le_to_cpu16 (ext_block->entries); i++)
+ {
+ if (fileblock < grub_le_to_cpu32(index[i].block))
+ break;
+ }
+
+ if (--i < 0)
+ return 0;
+
+ block = grub_le_to_cpu16 (index[i].leaf_hi);
+ block = (block << 32) + grub_le_to_cpu32 (index[i].leaf);
+ if (grub_disk_read (data->disk,
+ block << LOG2_EXT2_BLOCK_SIZE (data),
+ 0, EXT2_BLOCK_SIZE(data), buf))
+ return 0;
+
+ ext_block = (struct grub_ext4_extent_header *) buf;
+ }
+}
+
+static grub_disk_addr_t
+grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ struct grub_ext2_data *data = node->data;
+ struct grub_ext2_inode *inode = &node->inode;
+ int blknr = -1;
+ unsigned int blksz = EXT2_BLOCK_SIZE (data);
+ int log2_blksz = LOG2_EXT2_BLOCK_SIZE (data);
+
+ if (grub_le_to_cpu32(inode->flags) & EXT4_EXTENTS_FLAG)
+ {
+ char buf[EXT2_BLOCK_SIZE(data)];
+ struct grub_ext4_extent_header *leaf;
+ struct grub_ext4_extent *ext;
+ int i;
+
+ leaf = grub_ext4_find_leaf (data, buf,
+ (struct grub_ext4_extent_header *) inode->blocks.dir_blocks,
+ fileblock);
+ if (! leaf)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid extent");
+ return -1;
+ }
+
+ ext = (struct grub_ext4_extent *) (leaf + 1);
+ for (i = 0; i < grub_le_to_cpu16 (leaf->entries); i++)
+ {
+ if (fileblock < grub_le_to_cpu32 (ext[i].block))
+ break;
+ }
+
+ if (--i >= 0)
+ {
+ fileblock -= grub_le_to_cpu32 (ext[i].block);
+ if (fileblock >= grub_le_to_cpu16 (ext[i].len))
+ return 0;
+ else
+ {
+ grub_disk_addr_t start;
+
+ start = grub_le_to_cpu16 (ext[i].start_hi);
+ start = (start << 32) + grub_le_to_cpu32 (ext[i].start);
+
+ return fileblock + start;
+ }
+ }
+ else
+ {
+ grub_error (GRUB_ERR_BAD_FS, "something wrong with extent");
+ return -1;
+ }
+ }
+ /* Direct blocks. */
+ if (fileblock < INDIRECT_BLOCKS)
+ blknr = grub_le_to_cpu32 (inode->blocks.dir_blocks[fileblock]);
+ /* Indirect. */
+ else if (fileblock < INDIRECT_BLOCKS + blksz / 4)
+ {
+ grub_uint32_t indir[blksz / 4];
+
+ if (grub_disk_read (data->disk,
+ ((grub_disk_addr_t)
+ grub_le_to_cpu32 (inode->blocks.indir_block))
+ << log2_blksz,
+ 0, blksz, indir))
+ return grub_errno;
+
+ blknr = grub_le_to_cpu32 (indir[fileblock - INDIRECT_BLOCKS]);
+ }
+ /* Double indirect. */
+ else if (fileblock < INDIRECT_BLOCKS + blksz / 4 * (blksz / 4 + 1))
+ {
+ unsigned int perblock = blksz / 4;
+ unsigned int rblock = fileblock - (INDIRECT_BLOCKS
+ + blksz / 4);
+ grub_uint32_t indir[blksz / 4];
+
+ if (grub_disk_read (data->disk,
+ ((grub_disk_addr_t)
+ grub_le_to_cpu32 (inode->blocks.double_indir_block))
+ << log2_blksz,
+ 0, blksz, indir))
+ return grub_errno;
+
+ if (grub_disk_read (data->disk,
+ ((grub_disk_addr_t)
+ grub_le_to_cpu32 (indir[rblock / perblock]))
+ << log2_blksz,
+ 0, blksz, indir))
+ return grub_errno;
+
+
+ blknr = grub_le_to_cpu32 (indir[rblock % perblock]);
+ }
+ /* triple indirect. */
+ else if (fileblock < INDIRECT_BLOCKS + blksz / 4 * (blksz / 4 + 1)
+ + (blksz / 4) * (blksz / 4) * (blksz / 4 + 1))
+ {
+ unsigned int perblock = blksz / 4;
+ unsigned int rblock = fileblock - (INDIRECT_BLOCKS + blksz / 4
+ * (blksz / 4 + 1));
+ grub_uint32_t indir[blksz / 4];
+
+ if (grub_disk_read (data->disk,
+ ((grub_disk_addr_t)
+ grub_le_to_cpu32 (inode->blocks.triple_indir_block))
+ << log2_blksz,
+ 0, blksz, indir))
+ return grub_errno;
+
+ if (grub_disk_read (data->disk,
+ ((grub_disk_addr_t)
+ grub_le_to_cpu32 (indir[(rblock / perblock) / perblock]))
+ << log2_blksz,
+ 0, blksz, indir))
+ return grub_errno;
+
+ if (grub_disk_read (data->disk,
+ ((grub_disk_addr_t)
+ grub_le_to_cpu32 (indir[(rblock / perblock) % perblock]))
+ << log2_blksz,
+ 0, blksz, indir))
+ return grub_errno;
+
+ blknr = grub_le_to_cpu32 (indir[rblock % perblock]);
+ }
+ else
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "ext2fs doesn't support quadruple indirect blocks");
+ }
+
+ return blknr;
+}
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_ext2_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ grub_off_t pos, grub_size_t len, char *buf)
+{
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_ext2_read_block,
+ grub_cpu_to_le32 (node->inode.size)
+ | (((grub_off_t) grub_cpu_to_le32 (node->inode.size_high)) << 32),
+ LOG2_EXT2_BLOCK_SIZE (node->data));
+
+}
+
+
+/* Read the inode INO for the file described by DATA into INODE. */
+static grub_err_t
+grub_ext2_read_inode (struct grub_ext2_data *data,
+ int ino, struct grub_ext2_inode *inode)
+{
+ struct grub_ext2_block_group blkgrp;
+ struct grub_ext2_sblock *sblock = &data->sblock;
+ int inodes_per_block;
+ unsigned int blkno;
+ unsigned int blkoff;
+
+ /* It is easier to calculate if the first inode is 0. */
+ ino--;
+
+ grub_ext2_blockgroup (data,
+ ino / grub_le_to_cpu32 (sblock->inodes_per_group),
+ &blkgrp);
+ if (grub_errno)
+ return grub_errno;
+
+ inodes_per_block = EXT2_BLOCK_SIZE (data) / EXT2_INODE_SIZE (data);
+ blkno = (ino % grub_le_to_cpu32 (sblock->inodes_per_group))
+ / inodes_per_block;
+ blkoff = (ino % grub_le_to_cpu32 (sblock->inodes_per_group))
+ % inodes_per_block;
+
+ /* Read the inode. */
+ if (grub_disk_read (data->disk,
+ (((grub_disk_addr_t) grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno)
+ << LOG2_EXT2_BLOCK_SIZE (data)),
+ EXT2_INODE_SIZE (data) * blkoff,
+ sizeof (struct grub_ext2_inode), inode))
+ return grub_errno;
+
+ return 0;
+}
+
+static struct grub_ext2_data *
+grub_ext2_mount (grub_disk_t disk)
+{
+ struct grub_ext2_data *data;
+
+ data = grub_malloc (sizeof (struct grub_ext2_data));
+ if (!data)
+ return 0;
+
+ /* Read the superblock. */
+ grub_disk_read (disk, 1 * 2, 0, sizeof (struct grub_ext2_sblock),
+ &data->sblock);
+ if (grub_errno)
+ goto fail;
+
+ /* Make sure this is an ext2 filesystem. */
+ if (grub_le_to_cpu16 (data->sblock.magic) != EXT2_MAGIC)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an ext2 filesystem");
+ goto fail;
+ }
+
+ /* Check the FS doesn't have feature bits enabled that we don't support. */
+ if (grub_le_to_cpu32 (data->sblock.feature_incompat)
+ & ~(EXT2_DRIVER_SUPPORTED_INCOMPAT | EXT2_DRIVER_IGNORED_INCOMPAT))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "filesystem has unsupported incompatible features");
+ goto fail;
+ }
+
+
+ data->disk = disk;
+
+ data->diropen.data = data;
+ data->diropen.ino = 2;
+ data->diropen.inode_read = 1;
+
+ data->inode = &data->diropen.inode;
+
+ grub_ext2_read_inode (data, 2, data->inode);
+ if (grub_errno)
+ goto fail;
+
+ return data;
+
+ fail:
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not an ext2 filesystem");
+
+ grub_free (data);
+ return 0;
+}
+
+static char *
+grub_ext2_read_symlink (grub_fshelp_node_t node)
+{
+ char *symlink;
+ struct grub_fshelp_node *diro = node;
+
+ if (! diro->inode_read)
+ {
+ grub_ext2_read_inode (diro->data, diro->ino, &diro->inode);
+ if (grub_errno)
+ return 0;
+ }
+
+ symlink = grub_malloc (grub_le_to_cpu32 (diro->inode.size) + 1);
+ if (! symlink)
+ return 0;
+
+ /* If the filesize of the symlink is bigger than
+ 60 the symlink is stored in a separate block,
+ otherwise it is stored in the inode. */
+ if (grub_le_to_cpu32 (diro->inode.size) <= 60)
+ grub_strncpy (symlink,
+ diro->inode.symlink,
+ grub_le_to_cpu32 (diro->inode.size));
+ else
+ {
+ grub_ext2_read_file (diro, 0, 0,
+ grub_le_to_cpu32 (diro->inode.size),
+ symlink);
+ if (grub_errno)
+ {
+ grub_free (symlink);
+ return 0;
+ }
+ }
+
+ symlink[grub_le_to_cpu32 (diro->inode.size)] = '\0';
+ return symlink;
+}
+
+static int
+grub_ext2_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ unsigned int fpos = 0;
+ struct grub_fshelp_node *diro = (struct grub_fshelp_node *) dir;
+
+ if (! diro->inode_read)
+ {
+ grub_ext2_read_inode (diro->data, diro->ino, &diro->inode);
+ if (grub_errno)
+ return 0;
+ }
+
+ /* Search the file. */
+ while (fpos < grub_le_to_cpu32 (diro->inode.size))
+ {
+ struct ext2_dirent dirent;
+
+ grub_ext2_read_file (diro, 0, fpos, sizeof (struct ext2_dirent),
+ (char *) &dirent);
+ if (grub_errno)
+ return 0;
+
+ if (dirent.direntlen == 0)
+ return 0;
+
+ if (dirent.namelen != 0)
+ {
+ char filename[dirent.namelen + 1];
+ struct grub_fshelp_node *fdiro;
+ enum grub_fshelp_filetype type = GRUB_FSHELP_UNKNOWN;
+
+ grub_ext2_read_file (diro, 0, fpos + sizeof (struct ext2_dirent),
+ dirent.namelen, filename);
+ if (grub_errno)
+ return 0;
+
+ fdiro = grub_malloc (sizeof (struct grub_fshelp_node));
+ if (! fdiro)
+ return 0;
+
+ fdiro->data = diro->data;
+ fdiro->ino = grub_le_to_cpu32 (dirent.inode);
+
+ filename[dirent.namelen] = '\0';
+
+ if (dirent.filetype != FILETYPE_UNKNOWN)
+ {
+ fdiro->inode_read = 0;
+
+ if (dirent.filetype == FILETYPE_DIRECTORY)
+ type = GRUB_FSHELP_DIR;
+ else if (dirent.filetype == FILETYPE_SYMLINK)
+ type = GRUB_FSHELP_SYMLINK;
+ else if (dirent.filetype == FILETYPE_REG)
+ type = GRUB_FSHELP_REG;
+ }
+ else
+ {
+ /* The filetype can not be read from the dirent, read
+ the inode to get more information. */
+ grub_ext2_read_inode (diro->data,
+ grub_le_to_cpu32 (dirent.inode),
+ &fdiro->inode);
+ if (grub_errno)
+ {
+ grub_free (fdiro);
+ return 0;
+ }
+
+ fdiro->inode_read = 1;
+
+ if ((grub_le_to_cpu16 (fdiro->inode.mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_DIRECTORY)
+ type = GRUB_FSHELP_DIR;
+ else if ((grub_le_to_cpu16 (fdiro->inode.mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_SYMLINK)
+ type = GRUB_FSHELP_SYMLINK;
+ else if ((grub_le_to_cpu16 (fdiro->inode.mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_REG)
+ type = GRUB_FSHELP_REG;
+ }
+
+ if (hook (filename, type, fdiro))
+ return 1;
+ }
+
+ fpos += grub_le_to_cpu16 (dirent.direntlen);
+ }
+
+ return 0;
+}
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_ext2_open (struct grub_file *file, const char *name)
+{
+ struct grub_ext2_data *data;
+ struct grub_fshelp_node *fdiro = 0;
+ grub_err_t err;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ext2_mount (file->device->disk);
+ if (! data)
+ {
+ err = grub_errno;
+ goto fail;
+ }
+
+ err = grub_fshelp_find_file (name, &data->diropen, &fdiro,
+ grub_ext2_iterate_dir,
+ grub_ext2_read_symlink, GRUB_FSHELP_REG);
+ if (err)
+ goto fail;
+
+ if (! fdiro->inode_read)
+ {
+ err = grub_ext2_read_inode (data, fdiro->ino, &fdiro->inode);
+ if (err)
+ goto fail;
+ }
+
+ grub_memcpy (data->inode, &fdiro->inode, sizeof (struct grub_ext2_inode));
+ grub_free (fdiro);
+
+ file->size = grub_le_to_cpu32 (data->inode->size);
+ file->size |= ((grub_off_t) grub_le_to_cpu32 (data->inode->size_high)) << 32;
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+ fail:
+ if (fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return err;
+}
+
+static grub_err_t
+grub_ext2_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Read LEN bytes data from FILE into BUF. */
+static grub_ssize_t
+grub_ext2_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_ext2_data *data = (struct grub_ext2_data *) file->data;
+
+ return grub_ext2_read_file (&data->diropen, file->read_hook,
+ file->offset, len, buf);
+}
+
+
+static grub_err_t
+grub_ext2_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_ext2_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ if (! node->inode_read)
+ {
+ grub_ext2_read_inode (data, node->ino, &node->inode);
+ if (!grub_errno)
+ node->inode_read = 1;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (node->inode_read)
+ {
+ info.mtimeset = 1;
+ info.mtime = grub_le_to_cpu32 (node->inode.mtime);
+ }
+
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ext2_mount (device->disk);
+ if (! data)
+ goto fail;
+
+ grub_fshelp_find_file (path, &data->diropen, &fdiro, grub_ext2_iterate_dir,
+ grub_ext2_read_symlink, GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+
+ grub_ext2_iterate_dir (fdiro, iterate);
+
+ fail:
+ if (fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_ext2_label (grub_device_t device, char **label)
+{
+ struct grub_ext2_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ext2_mount (disk);
+ if (data)
+ *label = grub_strndup (data->sblock.volume_name, 14);
+ else
+ *label = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_ext2_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_ext2_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ext2_mount (disk);
+ if (data)
+ {
+ *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+ grub_be_to_cpu16 (data->sblock.uuid[0]),
+ grub_be_to_cpu16 (data->sblock.uuid[1]),
+ grub_be_to_cpu16 (data->sblock.uuid[2]),
+ grub_be_to_cpu16 (data->sblock.uuid[3]),
+ grub_be_to_cpu16 (data->sblock.uuid[4]),
+ grub_be_to_cpu16 (data->sblock.uuid[5]),
+ grub_be_to_cpu16 (data->sblock.uuid[6]),
+ grub_be_to_cpu16 (data->sblock.uuid[7]));
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+/* Get mtime. */
+static grub_err_t
+grub_ext2_mtime (grub_device_t device, grub_int32_t *tm)
+{
+ struct grub_ext2_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ext2_mount (disk);
+ if (!data)
+ *tm = 0;
+ else
+ *tm = grub_le_to_cpu32 (data->sblock.utime);
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+
+}
+
+
+
+static struct grub_fs grub_ext2_fs =
+ {
+ .name = "ext2",
+ .dir = grub_ext2_dir,
+ .open = grub_ext2_open,
+ .read = grub_ext2_read,
+ .close = grub_ext2_close,
+ .label = grub_ext2_label,
+ .uuid = grub_ext2_uuid,
+ .mtime = grub_ext2_mtime,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 1,
+#endif
+ .next = 0
+ };
+
+GRUB_MOD_INIT(ext2)
+{
+ grub_fs_register (&grub_ext2_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(ext2)
+{
+ grub_fs_unregister (&grub_ext2_fs);
+}
diff --git a/grub-core/fs/fat.c b/grub-core/fs/fat.c
new file mode 100644
index 0000000..76b9c52
--- /dev/null
+++ b/grub-core/fs/fat.c
@@ -0,0 +1,878 @@
+/* fat.c - FAT filesystem */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/fs.h>
+#include <grub/disk.h>
+#include <grub/file.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/charset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_FAT_DIR_ENTRY_SIZE 32
+
+#define GRUB_FAT_ATTR_READ_ONLY 0x01
+#define GRUB_FAT_ATTR_HIDDEN 0x02
+#define GRUB_FAT_ATTR_SYSTEM 0x04
+#define GRUB_FAT_ATTR_VOLUME_ID 0x08
+#define GRUB_FAT_ATTR_DIRECTORY 0x10
+#define GRUB_FAT_ATTR_ARCHIVE 0x20
+
+#define GRUB_FAT_MAXFILE 256
+
+#define GRUB_FAT_ATTR_LONG_NAME (GRUB_FAT_ATTR_READ_ONLY \
+ | GRUB_FAT_ATTR_HIDDEN \
+ | GRUB_FAT_ATTR_SYSTEM \
+ | GRUB_FAT_ATTR_VOLUME_ID)
+#define GRUB_FAT_ATTR_VALID (GRUB_FAT_ATTR_READ_ONLY \
+ | GRUB_FAT_ATTR_HIDDEN \
+ | GRUB_FAT_ATTR_SYSTEM \
+ | GRUB_FAT_ATTR_DIRECTORY \
+ | GRUB_FAT_ATTR_ARCHIVE \
+ | GRUB_FAT_ATTR_VOLUME_ID)
+
+struct grub_fat_bpb
+{
+ grub_uint8_t jmp_boot[3];
+ grub_uint8_t oem_name[8];
+ grub_uint16_t bytes_per_sector;
+ grub_uint8_t sectors_per_cluster;
+ grub_uint16_t num_reserved_sectors;
+ grub_uint8_t num_fats;
+ grub_uint16_t num_root_entries;
+ grub_uint16_t num_total_sectors_16;
+ grub_uint8_t media;
+ grub_uint16_t sectors_per_fat_16;
+ grub_uint16_t sectors_per_track;
+ grub_uint16_t num_heads;
+ grub_uint32_t num_hidden_sectors;
+ grub_uint32_t num_total_sectors_32;
+ union
+ {
+ struct
+ {
+ grub_uint8_t num_ph_drive;
+ grub_uint8_t reserved;
+ grub_uint8_t boot_sig;
+ grub_uint32_t num_serial;
+ grub_uint8_t label[11];
+ grub_uint8_t fstype[8];
+ } __attribute__ ((packed)) fat12_or_fat16;
+ struct
+ {
+ grub_uint32_t sectors_per_fat_32;
+ grub_uint16_t extended_flags;
+ grub_uint16_t fs_version;
+ grub_uint32_t root_cluster;
+ grub_uint16_t fs_info;
+ grub_uint16_t backup_boot_sector;
+ grub_uint8_t reserved[12];
+ grub_uint8_t num_ph_drive;
+ grub_uint8_t reserved1;
+ grub_uint8_t boot_sig;
+ grub_uint32_t num_serial;
+ grub_uint8_t label[11];
+ grub_uint8_t fstype[8];
+ } __attribute__ ((packed)) fat32;
+ } __attribute__ ((packed)) version_specific;
+} __attribute__ ((packed));
+
+struct grub_fat_dir_entry
+{
+ grub_uint8_t name[11];
+ grub_uint8_t attr;
+ grub_uint8_t nt_reserved;
+ grub_uint8_t c_time_tenth;
+ grub_uint16_t c_time;
+ grub_uint16_t c_date;
+ grub_uint16_t a_date;
+ grub_uint16_t first_cluster_high;
+ grub_uint16_t w_time;
+ grub_uint16_t w_date;
+ grub_uint16_t first_cluster_low;
+ grub_uint32_t file_size;
+} __attribute__ ((packed));
+
+struct grub_fat_long_name_entry
+{
+ grub_uint8_t id;
+ grub_uint16_t name1[5];
+ grub_uint8_t attr;
+ grub_uint8_t reserved;
+ grub_uint8_t checksum;
+ grub_uint16_t name2[6];
+ grub_uint16_t first_cluster;
+ grub_uint16_t name3[2];
+} __attribute__ ((packed));
+
+struct grub_fat_data
+{
+ int logical_sector_bits;
+ grub_uint32_t num_sectors;
+
+ grub_uint16_t fat_sector;
+ grub_uint32_t sectors_per_fat;
+ int fat_size;
+
+ grub_uint32_t root_cluster;
+ grub_uint32_t root_sector;
+ grub_uint32_t num_root_sectors;
+
+ int cluster_bits;
+ grub_uint32_t cluster_eof_mark;
+ grub_uint32_t cluster_sector;
+ grub_uint32_t num_clusters;
+
+ grub_uint8_t attr;
+ grub_ssize_t file_size;
+ grub_uint32_t file_cluster;
+ grub_uint32_t cur_cluster_num;
+ grub_uint32_t cur_cluster;
+
+ grub_uint32_t uuid;
+};
+
+static grub_dl_t my_mod;
+
+static int
+fat_log2 (unsigned x)
+{
+ int i;
+
+ if (x == 0)
+ return -1;
+
+ for (i = 0; (x & 1) == 0; i++)
+ x >>= 1;
+
+ if (x != 1)
+ return -1;
+
+ return i;
+}
+
+static struct grub_fat_data *
+grub_fat_mount (grub_disk_t disk)
+{
+ struct grub_fat_bpb bpb;
+ struct grub_fat_data *data = 0;
+ grub_uint32_t first_fat, magic;
+
+ if (! disk)
+ goto fail;
+
+ data = (struct grub_fat_data *) grub_malloc (sizeof (*data));
+ if (! data)
+ goto fail;
+
+ /* Read the BPB. */
+ if (grub_disk_read (disk, 0, 0, sizeof (bpb), &bpb))
+ goto fail;
+
+ if (grub_strncmp((const char *) bpb.version_specific.fat12_or_fat16.fstype, "FAT12", 5)
+ && grub_strncmp((const char *) bpb.version_specific.fat12_or_fat16.fstype, "FAT16", 5)
+ && grub_strncmp((const char *) bpb.version_specific.fat32.fstype, "FAT32", 5))
+ goto fail;
+
+ /* Get the sizes of logical sectors and clusters. */
+ data->logical_sector_bits =
+ fat_log2 (grub_le_to_cpu16 (bpb.bytes_per_sector));
+ if (data->logical_sector_bits < GRUB_DISK_SECTOR_BITS)
+ goto fail;
+ data->logical_sector_bits -= GRUB_DISK_SECTOR_BITS;
+
+ data->cluster_bits = fat_log2 (bpb.sectors_per_cluster);
+ if (data->cluster_bits < 0)
+ goto fail;
+ data->cluster_bits += data->logical_sector_bits;
+
+ /* Get information about FATs. */
+ data->fat_sector = (grub_le_to_cpu16 (bpb.num_reserved_sectors)
+ << data->logical_sector_bits);
+ if (data->fat_sector == 0)
+ goto fail;
+
+ data->sectors_per_fat = ((bpb.sectors_per_fat_16
+ ? grub_le_to_cpu16 (bpb.sectors_per_fat_16)
+ : grub_le_to_cpu32 (bpb.version_specific.fat32.sectors_per_fat_32))
+ << data->logical_sector_bits);
+ if (data->sectors_per_fat == 0)
+ goto fail;
+
+ /* Get the number of sectors in this volume. */
+ data->num_sectors = ((bpb.num_total_sectors_16
+ ? grub_le_to_cpu16 (bpb.num_total_sectors_16)
+ : grub_le_to_cpu32 (bpb.num_total_sectors_32))
+ << data->logical_sector_bits);
+ if (data->num_sectors == 0)
+ goto fail;
+
+ /* Get information about the root directory. */
+ if (bpb.num_fats == 0)
+ goto fail;
+
+ data->root_sector = data->fat_sector + bpb.num_fats * data->sectors_per_fat;
+ data->num_root_sectors
+ = ((((grub_uint32_t) grub_le_to_cpu16 (bpb.num_root_entries)
+ * GRUB_FAT_DIR_ENTRY_SIZE
+ + grub_le_to_cpu16 (bpb.bytes_per_sector) - 1)
+ >> (data->logical_sector_bits + GRUB_DISK_SECTOR_BITS))
+ << (data->logical_sector_bits));
+
+ data->cluster_sector = data->root_sector + data->num_root_sectors;
+ data->num_clusters = (((data->num_sectors - data->cluster_sector)
+ >> (data->cluster_bits + data->logical_sector_bits))
+ + 2);
+
+ if (data->num_clusters <= 2)
+ goto fail;
+
+ if (! bpb.sectors_per_fat_16)
+ {
+ /* FAT32. */
+ grub_uint16_t flags = grub_le_to_cpu16 (bpb.version_specific.fat32.extended_flags);
+
+ data->root_cluster = grub_le_to_cpu32 (bpb.version_specific.fat32.root_cluster);
+ data->fat_size = 32;
+ data->cluster_eof_mark = 0x0ffffff8;
+
+ if (flags & 0x80)
+ {
+ /* Get an active FAT. */
+ unsigned active_fat = flags & 0xf;
+
+ if (active_fat > bpb.num_fats)
+ goto fail;
+
+ data->fat_sector += active_fat * data->sectors_per_fat;
+ }
+
+ if (bpb.num_root_entries != 0 || bpb.version_specific.fat32.fs_version != 0)
+ goto fail;
+ }
+ else
+ {
+ /* FAT12 or FAT16. */
+ data->root_cluster = ~0U;
+
+ if (data->num_clusters <= 4085 + 2)
+ {
+ /* FAT12. */
+ data->fat_size = 12;
+ data->cluster_eof_mark = 0x0ff8;
+ }
+ else
+ {
+ /* FAT16. */
+ data->fat_size = 16;
+ data->cluster_eof_mark = 0xfff8;
+ }
+ }
+
+ /* More sanity checks. */
+ if (data->num_sectors <= data->fat_sector)
+ goto fail;
+
+ if (grub_disk_read (disk,
+ data->fat_sector,
+ 0,
+ sizeof (first_fat),
+ &first_fat))
+ goto fail;
+
+ first_fat = grub_le_to_cpu32 (first_fat);
+
+ if (data->fat_size == 32)
+ {
+ first_fat &= 0x0fffffff;
+ magic = 0x0fffff00;
+ }
+ else if (data->fat_size == 16)
+ {
+ first_fat &= 0x0000ffff;
+ magic = 0xff00;
+ }
+ else
+ {
+ first_fat &= 0x00000fff;
+ magic = 0x0f00;
+ }
+
+ /* Serial number. */
+ if (bpb.sectors_per_fat_16)
+ data->uuid = grub_le_to_cpu32 (bpb.version_specific.fat12_or_fat16.num_serial);
+ else
+ data->uuid = grub_le_to_cpu32 (bpb.version_specific.fat32.num_serial);
+
+ /* Ignore the 3rd bit, because some BIOSes assigns 0xF0 to the media
+ descriptor, even if it is a so-called superfloppy (e.g. an USB key).
+ The check may be too strict for this kind of stupid BIOSes, as
+ they overwrite the media descriptor. */
+ if ((first_fat | 0x8) != (magic | bpb.media | 0x8))
+ goto fail;
+
+ /* Start from the root directory. */
+ data->file_cluster = data->root_cluster;
+ data->cur_cluster_num = ~0U;
+ data->attr = GRUB_FAT_ATTR_DIRECTORY;
+ return data;
+
+ fail:
+
+ grub_free (data);
+ grub_error (GRUB_ERR_BAD_FS, "not a FAT filesystem");
+ return 0;
+}
+
+static grub_ssize_t
+grub_fat_read_data (grub_disk_t disk, struct grub_fat_data *data,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ grub_off_t offset, grub_size_t len, char *buf)
+{
+ grub_size_t size;
+ grub_uint32_t logical_cluster;
+ unsigned logical_cluster_bits;
+ grub_ssize_t ret = 0;
+ unsigned long sector;
+
+ /* This is a special case. FAT12 and FAT16 doesn't have the root directory
+ in clusters. */
+ if (data->file_cluster == ~0U)
+ {
+ size = (data->num_root_sectors << GRUB_DISK_SECTOR_BITS) - offset;
+ if (size > len)
+ size = len;
+
+ if (grub_disk_read (disk, data->root_sector, offset, size, buf))
+ return -1;
+
+ return size;
+ }
+
+ /* Calculate the logical cluster number and offset. */
+ logical_cluster_bits = (data->cluster_bits
+ + data->logical_sector_bits
+ + GRUB_DISK_SECTOR_BITS);
+ logical_cluster = offset >> logical_cluster_bits;
+ offset &= (1 << logical_cluster_bits) - 1;
+
+ if (logical_cluster < data->cur_cluster_num)
+ {
+ data->cur_cluster_num = 0;
+ data->cur_cluster = data->file_cluster;
+ }
+
+ while (len)
+ {
+ while (logical_cluster > data->cur_cluster_num)
+ {
+ /* Find next cluster. */
+ grub_uint32_t next_cluster;
+ unsigned long fat_offset;
+
+ switch (data->fat_size)
+ {
+ case 32:
+ fat_offset = data->cur_cluster << 2;
+ break;
+ case 16:
+ fat_offset = data->cur_cluster << 1;
+ break;
+ default:
+ /* case 12: */
+ fat_offset = data->cur_cluster + (data->cur_cluster >> 1);
+ break;
+ }
+
+ /* Read the FAT. */
+ if (grub_disk_read (disk, data->fat_sector, fat_offset,
+ (data->fat_size + 7) >> 3,
+ (char *) &next_cluster))
+ return -1;
+
+ next_cluster = grub_le_to_cpu32 (next_cluster);
+ switch (data->fat_size)
+ {
+ case 16:
+ next_cluster &= 0xFFFF;
+ break;
+ case 12:
+ if (data->cur_cluster & 1)
+ next_cluster >>= 4;
+
+ next_cluster &= 0x0FFF;
+ break;
+ }
+
+ grub_dprintf ("fat", "fat_size=%d, next_cluster=%u\n",
+ data->fat_size, next_cluster);
+
+ /* Check the end. */
+ if (next_cluster >= data->cluster_eof_mark)
+ return ret;
+
+ if (next_cluster < 2 || next_cluster >= data->num_clusters)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid cluster %u",
+ next_cluster);
+ return -1;
+ }
+
+ data->cur_cluster = next_cluster;
+ data->cur_cluster_num++;
+ }
+
+ /* Read the data here. */
+ sector = (data->cluster_sector
+ + ((data->cur_cluster - 2)
+ << (data->cluster_bits + data->logical_sector_bits)));
+ size = (1 << logical_cluster_bits) - offset;
+ if (size > len)
+ size = len;
+
+ disk->read_hook = read_hook;
+ grub_disk_read (disk, sector, offset, size, buf);
+ disk->read_hook = 0;
+ if (grub_errno)
+ return -1;
+
+ len -= size;
+ buf += size;
+ ret += size;
+ logical_cluster++;
+ offset = 0;
+ }
+
+ return ret;
+}
+
+static grub_err_t
+grub_fat_iterate_dir (grub_disk_t disk, struct grub_fat_data *data,
+ int (*hook) (const char *filename,
+ struct grub_fat_dir_entry *dir))
+{
+ struct grub_fat_dir_entry dir;
+ char *filename, *filep = 0;
+ grub_uint16_t *unibuf;
+ int slot = -1, slots = -1;
+ int checksum = -1;
+ grub_ssize_t offset = -sizeof(dir);
+
+ if (! (data->attr & GRUB_FAT_ATTR_DIRECTORY))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+
+ /* Allocate space enough to hold a long name. */
+ filename = grub_malloc (0x40 * 13 * 4 + 1);
+ unibuf = (grub_uint16_t *) grub_malloc (0x40 * 13 * 2);
+ if (! filename || ! unibuf)
+ {
+ grub_free (filename);
+ grub_free (unibuf);
+ return 0;
+ }
+
+ while (1)
+ {
+ unsigned i;
+
+ /* Adjust the offset. */
+ offset += sizeof (dir);
+
+ /* Read a directory entry. */
+ if ((grub_fat_read_data (disk, data, 0,
+ offset, sizeof (dir), (char *) &dir)
+ != sizeof (dir) || dir.name[0] == 0))
+ break;
+ /* Handle long name entries. */
+ if (dir.attr == GRUB_FAT_ATTR_LONG_NAME)
+ {
+ struct grub_fat_long_name_entry *long_name
+ = (struct grub_fat_long_name_entry *) &dir;
+ grub_uint8_t id = long_name->id;
+
+ if (id & 0x40)
+ {
+ id &= 0x3f;
+ slots = slot = id;
+ checksum = long_name->checksum;
+ }
+
+ if (id != slot || slot == 0 || checksum != long_name->checksum)
+ {
+ checksum = -1;
+ continue;
+ }
+
+ slot--;
+ grub_memcpy (unibuf + slot * 13, long_name->name1, 5 * 2);
+ grub_memcpy (unibuf + slot * 13 + 5, long_name->name2, 6 * 2);
+ grub_memcpy (unibuf + slot * 13 + 11, long_name->name3, 2 * 2);
+ continue;
+ }
+
+ /* Check if this entry is valid. */
+ if (dir.name[0] == 0xe5 || (dir.attr & ~GRUB_FAT_ATTR_VALID))
+ continue;
+
+ /* This is a workaround for Japanese. */
+ if (dir.name[0] == 0x05)
+ dir.name[0] = 0xe5;
+
+ if (checksum != -1 && slot == 0)
+ {
+ grub_uint8_t sum;
+
+ for (sum = 0, i = 0; i < sizeof (dir.name); i++)
+ sum = ((sum >> 1) | (sum << 7)) + dir.name[i];
+
+ if (sum == checksum)
+ {
+ int u;
+
+ for (u = 0; u < slots * 13; u++)
+ unibuf[u] = grub_le_to_cpu16 (unibuf[u]);
+
+ *grub_utf16_to_utf8 ((grub_uint8_t *) filename, unibuf,
+ slots * 13) = '\0';
+
+ if (hook (filename, &dir))
+ break;
+
+ checksum = -1;
+ continue;
+ }
+
+ checksum = -1;
+ }
+
+ /* Convert the 8.3 file name. */
+ filep = filename;
+ if (dir.attr & GRUB_FAT_ATTR_VOLUME_ID)
+ {
+ for (i = 0; i < sizeof (dir.name) && dir.name[i]
+ && ! grub_isspace (dir.name[i]); i++)
+ *filep++ = dir.name[i];
+ }
+ else
+ {
+ for (i = 0; i < 8 && dir.name[i] && ! grub_isspace (dir.name[i]); i++)
+ *filep++ = grub_tolower (dir.name[i]);
+
+ *filep = '.';
+
+ for (i = 8; i < 11 && dir.name[i] && ! grub_isspace (dir.name[i]); i++)
+ *++filep = grub_tolower (dir.name[i]);
+
+ if (*filep != '.')
+ filep++;
+ }
+ *filep = '\0';
+
+ if (hook (filename, &dir))
+ break;
+ }
+
+ grub_free (filename);
+ grub_free (unibuf);
+
+ return grub_errno;
+}
+
+
+/* Find the underlying directory or file in PATH and return the
+ next path. If there is no next path or an error occurs, return NULL.
+ If HOOK is specified, call it with each file name. */
+static char *
+grub_fat_find_dir (grub_disk_t disk, struct grub_fat_data *data,
+ const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ char *dirname, *dirp;
+ int call_hook;
+ int found = 0;
+
+ auto int iter_hook (const char *filename, struct grub_fat_dir_entry *dir);
+ int iter_hook (const char *filename, struct grub_fat_dir_entry *dir)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+
+ info.dir = !! (dir->attr & GRUB_FAT_ATTR_DIRECTORY);
+ info.case_insensitive = 1;
+
+ if (dir->attr & GRUB_FAT_ATTR_VOLUME_ID)
+ return 0;
+ if (*dirname == '\0' && call_hook)
+ return hook (filename, &info);
+
+ if (grub_strcasecmp (dirname, filename) == 0)
+ {
+ found = 1;
+ data->attr = dir->attr;
+ data->file_size = grub_le_to_cpu32 (dir->file_size);
+ data->file_cluster = ((grub_le_to_cpu16 (dir->first_cluster_high) << 16)
+ | grub_le_to_cpu16 (dir->first_cluster_low));
+ data->cur_cluster_num = ~0U;
+
+ if (call_hook)
+ hook (filename, &info);
+
+ return 1;
+ }
+ return 0;
+ }
+
+ if (! (data->attr & GRUB_FAT_ATTR_DIRECTORY))
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ return 0;
+ }
+
+ /* Extract a directory name. */
+ while (*path == '/')
+ path++;
+
+ dirp = grub_strchr (path, '/');
+ if (dirp)
+ {
+ unsigned len = dirp - path;
+
+ dirname = grub_malloc (len + 1);
+ if (! dirname)
+ return 0;
+
+ grub_memcpy (dirname, path, len);
+ dirname[len] = '\0';
+ }
+ else
+ /* This is actually a file. */
+ dirname = grub_strdup (path);
+
+ call_hook = (! dirp && hook);
+
+ grub_fat_iterate_dir (disk, data, iter_hook);
+ if (grub_errno == GRUB_ERR_NONE && ! found && !call_hook)
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+
+ grub_free (dirname);
+
+ return found ? dirp : 0;
+}
+
+static grub_err_t
+grub_fat_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_fat_data *data = 0;
+ grub_disk_t disk = device->disk;
+ grub_size_t len;
+ char *dirname = 0;
+ char *p;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_fat_mount (disk);
+ if (! data)
+ goto fail;
+
+ /* Make sure that DIRNAME terminates with '/'. */
+ len = grub_strlen (path);
+ dirname = grub_malloc (len + 1 + 1);
+ if (! dirname)
+ goto fail;
+ grub_memcpy (dirname, path, len);
+ p = dirname + len;
+ if (path[len - 1] != '/')
+ *p++ = '/';
+ *p = '\0';
+ p = dirname;
+
+ do
+ {
+ p = grub_fat_find_dir (disk, data, p, hook);
+ }
+ while (p && grub_errno == GRUB_ERR_NONE);
+
+ fail:
+
+ grub_free (dirname);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_fat_open (grub_file_t file, const char *name)
+{
+ struct grub_fat_data *data = 0;
+ char *p = (char *) name;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_fat_mount (file->device->disk);
+ if (! data)
+ goto fail;
+
+ do
+ {
+ p = grub_fat_find_dir (file->device->disk, data, p, 0);
+ if (grub_errno != GRUB_ERR_NONE)
+ goto fail;
+ }
+ while (p);
+
+ if (data->attr & GRUB_FAT_ATTR_DIRECTORY)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a file");
+ goto fail;
+ }
+
+ file->data = data;
+ file->size = data->file_size;
+
+ return GRUB_ERR_NONE;
+
+ fail:
+
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_ssize_t
+grub_fat_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ return grub_fat_read_data (file->device->disk, file->data, file->read_hook,
+ file->offset, len, buf);
+}
+
+static grub_err_t
+grub_fat_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_fat_label (grub_device_t device, char **label)
+{
+ struct grub_fat_data *data;
+ grub_disk_t disk = device->disk;
+
+ auto int iter_hook (const char *filename, struct grub_fat_dir_entry *dir);
+ int iter_hook (const char *filename, struct grub_fat_dir_entry *dir)
+ {
+ if (dir->attr == GRUB_FAT_ATTR_VOLUME_ID)
+ {
+ *label = grub_strdup (filename);
+ return 1;
+ }
+ return 0;
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_fat_mount (disk);
+ if (! data)
+ goto fail;
+
+ if (! (data->attr & GRUB_FAT_ATTR_DIRECTORY))
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ return 0;
+ }
+
+ *label = 0;
+
+ grub_fat_iterate_dir (disk, data, iter_hook);
+
+ fail:
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_fat_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_fat_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_fat_mount (disk);
+ if (data)
+ {
+ *uuid = grub_xasprintf ("%04x-%04x",
+ (grub_uint16_t) (data->uuid >> 16),
+ (grub_uint16_t) data->uuid);
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static struct grub_fs grub_fat_fs =
+ {
+ .name = "fat",
+ .dir = grub_fat_dir,
+ .open = grub_fat_open,
+ .read = grub_fat_read,
+ .close = grub_fat_close,
+ .label = grub_fat_label,
+ .uuid = grub_fat_uuid,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 1,
+#endif
+ .next = 0
+ };
+
+GRUB_MOD_INIT(fat)
+{
+ grub_fs_register (&grub_fat_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(fat)
+{
+ grub_fs_unregister (&grub_fat_fs);
+}
+
diff --git a/grub-core/fs/fshelp.c b/grub-core/fs/fshelp.c
new file mode 100644
index 0000000..f879885
--- /dev/null
+++ b/grub-core/fs/fshelp.c
@@ -0,0 +1,317 @@
+/* fshelp.c -- Filesystem helper functions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/fshelp.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Lookup the node PATH. The node ROOTNODE describes the root of the
+ directory tree. The node found is returned in FOUNDNODE, which is
+ either a ROOTNODE or a new malloc'ed node. ITERATE_DIR is used to
+ iterate over all directory entries in the current node.
+ READ_SYMLINK is used to read the symlink if a node is a symlink.
+ EXPECTTYPE is the type node that is expected by the called, an
+ error is generated if the node is not of the expected type. Make
+ sure you use the NESTED_FUNC_ATTR macro for HOOK, this is required
+ because GCC has a nasty bug when using regparm=3. */
+grub_err_t
+grub_fshelp_find_file (const char *path, grub_fshelp_node_t rootnode,
+ grub_fshelp_node_t *foundnode,
+ int (*iterate_dir) (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR (*hook)
+ (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)),
+ char *(*read_symlink) (grub_fshelp_node_t node),
+ enum grub_fshelp_filetype expecttype)
+{
+ grub_err_t err;
+ enum grub_fshelp_filetype foundtype = GRUB_FSHELP_DIR;
+ int symlinknest = 0;
+
+ auto grub_err_t NESTED_FUNC_ATTR find_file (const char *currpath,
+ grub_fshelp_node_t currroot,
+ grub_fshelp_node_t *currfound);
+
+ grub_err_t NESTED_FUNC_ATTR find_file (const char *currpath,
+ grub_fshelp_node_t currroot,
+ grub_fshelp_node_t *currfound)
+ {
+ char fpath[grub_strlen (currpath) + 1];
+ char *name = fpath;
+ char *next;
+ // unsigned int pos = 0;
+ enum grub_fshelp_filetype type = GRUB_FSHELP_DIR;
+ grub_fshelp_node_t currnode = currroot;
+ grub_fshelp_node_t oldnode = currroot;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ auto void free_node (grub_fshelp_node_t node);
+
+ void free_node (grub_fshelp_node_t node)
+ {
+ if (node != rootnode && node != currroot)
+ grub_free (node);
+ }
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ if (filetype == GRUB_FSHELP_UNKNOWN ||
+ (grub_strcmp (name, filename) &&
+ (! (filetype & GRUB_FSHELP_CASE_INSENSITIVE) ||
+ grub_strncasecmp (name, filename, GRUB_LONG_MAX))))
+ {
+ grub_free (node);
+ return 0;
+ }
+
+ /* The node is found, stop iterating over the nodes. */
+ type = filetype & ~GRUB_FSHELP_CASE_INSENSITIVE;
+ oldnode = currnode;
+ currnode = node;
+
+ return 1;
+ }
+
+ grub_strncpy (fpath, currpath, grub_strlen (currpath) + 1);
+
+ /* Remove all leading slashes. */
+ while (*name == '/')
+ name++;
+
+ if (! *name)
+ {
+ *currfound = currnode;
+ return 0;
+ }
+
+ for (;;)
+ {
+ int found;
+
+ /* Extract the actual part from the pathname. */
+ next = grub_strchr (name, '/');
+ if (next)
+ {
+ /* Remove all leading slashes. */
+ while (*next == '/')
+ *(next++) = '\0';
+ }
+
+ /* At this point it is expected that the current node is a
+ directory, check if this is true. */
+ if (type != GRUB_FSHELP_DIR)
+ {
+ free_node (currnode);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ }
+
+ /* Iterate over the directory. */
+ found = iterate_dir (currnode, iterate);
+ if (! found)
+ {
+ if (grub_errno)
+ return grub_errno;
+
+ break;
+ }
+
+ /* Read in the symlink and follow it. */
+ if (type == GRUB_FSHELP_SYMLINK)
+ {
+ char *symlink;
+
+ /* Test if the symlink does not loop. */
+ if (++symlinknest == 8)
+ {
+ free_node (currnode);
+ free_node (oldnode);
+ return grub_error (GRUB_ERR_SYMLINK_LOOP,
+ "too deep nesting of symlinks");
+ }
+
+ symlink = read_symlink (currnode);
+ free_node (currnode);
+
+ if (!symlink)
+ {
+ free_node (oldnode);
+ return grub_errno;
+ }
+
+ /* The symlink is an absolute path, go back to the root inode. */
+ if (symlink[0] == '/')
+ {
+ free_node (oldnode);
+ oldnode = rootnode;
+ }
+
+ /* Lookup the node the symlink points to. */
+ find_file (symlink, oldnode, &currnode);
+ type = foundtype;
+ grub_free (symlink);
+
+ if (grub_errno)
+ {
+ free_node (oldnode);
+ return grub_errno;
+ }
+ }
+
+ free_node (oldnode);
+
+ /* Found the node! */
+ if (! next || *next == '\0')
+ {
+ *currfound = currnode;
+ foundtype = type;
+ return 0;
+ }
+
+ name = next;
+ }
+
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ }
+
+ if (!path || path[0] != '/')
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "bad filename");
+ return grub_errno;
+ }
+
+ err = find_file (path, rootnode, foundnode);
+ if (err)
+ return err;
+
+ /* Check if the node that was found was of the expected type. */
+ if (expecttype == GRUB_FSHELP_REG && foundtype != expecttype)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a regular file");
+ else if (expecttype == GRUB_FSHELP_DIR && foundtype != expecttype)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+
+ return 0;
+}
+
+/* Read LEN bytes from the file NODE on disk DISK into the buffer BUF,
+ beginning with the block POS. READ_HOOK should be set before
+ reading a block from the file. GET_BLOCK is used to translate file
+ blocks to disk blocks. The file is FILESIZE bytes big and the
+ blocks have a size of LOG2BLOCKSIZE (in log2). */
+grub_ssize_t
+grub_fshelp_read_file (grub_disk_t disk, grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset,
+ unsigned length),
+ grub_off_t pos, grub_size_t len, char *buf,
+ grub_disk_addr_t (*get_block) (grub_fshelp_node_t node,
+ grub_disk_addr_t block),
+ grub_off_t filesize, int log2blocksize)
+{
+ grub_disk_addr_t i, blockcnt;
+ int blocksize = 1 << (log2blocksize + GRUB_DISK_SECTOR_BITS);
+
+ /* Adjust LEN so it we can't read past the end of the file. */
+ if (pos + len > filesize)
+ len = filesize - pos;
+
+ blockcnt = ((len + pos) + blocksize - 1) >> (log2blocksize + GRUB_DISK_SECTOR_BITS);
+
+ for (i = pos >> (log2blocksize + GRUB_DISK_SECTOR_BITS); i < blockcnt; i++)
+ {
+ grub_disk_addr_t blknr;
+ int blockoff = pos & (blocksize - 1);
+ int blockend = blocksize;
+
+ int skipfirst = 0;
+
+ blknr = get_block (node, i);
+ if (grub_errno)
+ return -1;
+
+ blknr = blknr << log2blocksize;
+
+ /* Last block. */
+ if (i == blockcnt - 1)
+ {
+ blockend = (len + pos) & (blocksize - 1);
+
+ /* The last portion is exactly blocksize. */
+ if (! blockend)
+ blockend = blocksize;
+ }
+
+ /* First block. */
+ if (i == (pos >> (log2blocksize + GRUB_DISK_SECTOR_BITS)))
+ {
+ skipfirst = blockoff;
+ blockend -= skipfirst;
+ }
+
+ /* If the block number is 0 this block is not stored on disk but
+ is zero filled instead. */
+ if (blknr)
+ {
+ disk->read_hook = read_hook;
+
+ grub_disk_read (disk, blknr, skipfirst,
+ blockend, buf);
+ disk->read_hook = 0;
+ if (grub_errno)
+ return -1;
+ }
+ else
+ grub_memset (buf, 0, blockend);
+
+ buf += blocksize - skipfirst;
+ }
+
+ return len;
+}
+
+unsigned int
+grub_fshelp_log2blksize (unsigned int blksize, unsigned int *pow)
+{
+ int mod;
+
+ *pow = 0;
+ while (blksize > 1)
+ {
+ mod = blksize - ((blksize >> 1) << 1);
+ blksize >>= 1;
+
+ /* Check if it really is a power of two. */
+ if (mod)
+ return grub_error (GRUB_ERR_BAD_NUMBER,
+ "the blocksize is not a power of two");
+ (*pow)++;
+ }
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c
new file mode 100644
index 0000000..1f67ea1
--- /dev/null
+++ b/grub-core/fs/hfs.c
@@ -0,0 +1,1124 @@
+/* hfs.c - HFS. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* HFS is documented at
+ http://developer.apple.com/documentation/mac/Files/Files-2.html */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/hfs.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_HFS_SBLOCK 2
+#define GRUB_HFS_EMBED_HFSPLUS_SIG 0x482B
+
+#define GRUB_HFS_BLKS (data->blksz >> 9)
+
+#define GRUB_HFS_NODE_LEAF 0xFF
+
+/* The two supported filesystems a record can have. */
+enum
+ {
+ GRUB_HFS_FILETYPE_DIR = 1,
+ GRUB_HFS_FILETYPE_FILE = 2
+ };
+
+/* Catalog node ID (CNID). */
+enum grub_hfs_cnid_type
+ {
+ GRUB_HFS_CNID_ROOT_PARENT = 1,
+ GRUB_HFS_CNID_ROOT = 2,
+ GRUB_HFS_CNID_EXT = 3,
+ GRUB_HFS_CNID_CAT = 4,
+ GRUB_HFS_CNID_BAD = 5
+ };
+
+/* A node descriptor. This is the header of every node. */
+struct grub_hfs_node
+{
+ grub_uint32_t next;
+ grub_uint32_t prev;
+ grub_uint8_t type;
+ grub_uint8_t level;
+ grub_uint16_t reccnt;
+ grub_uint16_t unused;
+} __attribute__ ((packed));
+
+/* The head of the B*-Tree. */
+struct grub_hfs_treeheader
+{
+ grub_uint16_t tree_depth;
+ /* The number of the first node. */
+ grub_uint32_t root_node;
+ grub_uint32_t leaves;
+ grub_uint32_t first_leaf;
+ grub_uint32_t last_leaf;
+ grub_uint16_t node_size;
+ grub_uint16_t key_size;
+ grub_uint32_t nodes;
+ grub_uint32_t free_nodes;
+ grub_uint8_t unused[76];
+} __attribute__ ((packed));
+
+/* The state of a mounted HFS filesystem. */
+struct grub_hfs_data
+{
+ struct grub_hfs_sblock sblock;
+ grub_disk_t disk;
+ grub_hfs_datarecord_t extents;
+ int fileid;
+ int size;
+ int ext_root;
+ int ext_size;
+ int cat_root;
+ int cat_size;
+ int blksz;
+ int log2_blksz;
+ int rootdir;
+};
+
+/* The key as used on disk in a catalog tree. This is used to lookup
+ file/directory nodes by parent directory ID and filename. */
+struct grub_hfs_catalog_key
+{
+ grub_uint8_t unused;
+ grub_uint32_t parent_dir;
+
+ /* Filename length. */
+ grub_uint8_t strlen;
+
+ /* Filename. */
+ grub_uint8_t str[31];
+} __attribute__ ((packed));
+
+/* The key as used on disk in a extent overflow tree. Using this key
+ the extents can be looked up using a fileid and logical start block
+ as index. */
+struct grub_hfs_extent_key
+{
+ /* The kind of fork. This is used to store meta information like
+ icons, attributes, etc. We will only use the datafork, which is
+ 0. */
+ grub_uint8_t forktype;
+ grub_uint32_t fileid;
+ grub_uint16_t first_block;
+} __attribute__ ((packed));
+
+/* A directory record. This is used to find out the directory ID. */
+struct grub_hfs_dirrec
+{
+ /* For a directory, type == 1. */
+ grub_uint8_t type;
+ grub_uint8_t unused[5];
+ grub_uint32_t dirid;
+} __attribute__ ((packed));
+
+/* Information about a file. */
+struct grub_hfs_filerec
+{
+ /* For a file, type == 2. */
+ grub_uint8_t type;
+ grub_uint8_t unused[19];
+ grub_uint32_t fileid;
+ grub_uint8_t unused2[2];
+ grub_uint32_t size;
+ grub_uint8_t unused3[44];
+
+ /* The first 3 extents of the file. The other extents can be found
+ in the extent overflow file. */
+ grub_hfs_datarecord_t extents;
+} __attribute__ ((packed));
+
+/* A record descriptor, both key and data, used to pass to call back
+ functions. */
+struct grub_hfs_record
+{
+ void *key;
+ int keylen;
+ void *data;
+ int datalen;
+};
+
+static grub_dl_t my_mod;
+
+static int grub_hfs_find_node (struct grub_hfs_data *, char *,
+ grub_uint32_t, int, char *, int);
+
+/* Find block BLOCK of the file FILE in the mounted UFS filesystem
+ DATA. The first 3 extents are described by DAT. If cache is set,
+ using caching to improve non-random reads. */
+static unsigned int
+grub_hfs_block (struct grub_hfs_data *data, grub_hfs_datarecord_t dat,
+ int file, int block, int cache)
+{
+ grub_hfs_datarecord_t dr;
+ int pos = 0;
+ struct grub_hfs_extent_key key;
+
+ int tree = 0;
+ static int cache_file = 0;
+ static int cache_pos = 0;
+ static grub_hfs_datarecord_t cache_dr;
+
+ grub_memcpy (dr, dat, sizeof (dr));
+
+ key.forktype = 0;
+ key.fileid = grub_cpu_to_be32 (file);
+
+ if (cache && cache_file == file && block > cache_pos)
+ {
+ pos = cache_pos;
+ key.first_block = grub_cpu_to_be16 (pos);
+ grub_memcpy (dr, cache_dr, sizeof (cache_dr));
+ }
+
+ for (;;)
+ {
+ int i;
+
+ /* Try all 3 extents. */
+ for (i = 0; i < 3; i++)
+ {
+ /* Check if the block is stored in this extent. */
+ if (grub_be_to_cpu16 (dr[i].count) + pos > block)
+ {
+ int first = grub_be_to_cpu16 (dr[i].first_block);
+
+ /* If the cache is enabled, store the current position
+ in the tree. */
+ if (tree && cache)
+ {
+ cache_file = file;
+ cache_pos = pos;
+ grub_memcpy (cache_dr, dr, sizeof (cache_dr));
+ }
+
+ return (grub_be_to_cpu16 (data->sblock.first_block)
+ + (first + block - pos) * GRUB_HFS_BLKS);
+ }
+
+ /* Try the next extent. */
+ pos += grub_be_to_cpu16 (dr[i].count);
+ }
+
+ /* Lookup the block in the extent overflow file. */
+ key.first_block = grub_cpu_to_be16 (pos);
+ tree = 1;
+ grub_hfs_find_node (data, (char *) &key, data->ext_root,
+ 1, (char *) &dr, sizeof (dr));
+ if (grub_errno)
+ return 0;
+ }
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_hfs_read_file (struct grub_hfs_data *data,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ int i;
+ int blockcnt;
+
+ blockcnt = ((len + pos)
+ + data->blksz - 1) / data->blksz;
+
+ for (i = pos / data->blksz; i < blockcnt; i++)
+ {
+ int blknr;
+ int blockoff = pos % data->blksz;
+ int blockend = data->blksz;
+
+ int skipfirst = 0;
+
+ blknr = grub_hfs_block (data, data->extents, data->fileid, i, 1);
+ if (grub_errno)
+ return -1;
+
+ /* Last block. */
+ if (i == blockcnt - 1)
+ {
+ blockend = (len + pos) % data->blksz;
+
+ /* The last portion is exactly EXT2_BLOCK_SIZE (data). */
+ if (! blockend)
+ blockend = data->blksz;
+ }
+
+ /* First block. */
+ if (i == pos / data->blksz)
+ {
+ skipfirst = blockoff;
+ blockend -= skipfirst;
+ }
+
+ /* If the block number is 0 this block is not stored on disk but
+ is zero filled instead. */
+ if (blknr)
+ {
+ data->disk->read_hook = read_hook;
+ grub_disk_read (data->disk, blknr, skipfirst,
+ blockend, buf);
+ data->disk->read_hook = 0;
+ if (grub_errno)
+ return -1;
+ }
+
+ buf += data->blksz - skipfirst;
+ }
+
+ return len;
+}
+
+
+/* Mount the filesystem on the disk DISK. */
+static struct grub_hfs_data *
+grub_hfs_mount (grub_disk_t disk)
+{
+ struct grub_hfs_data *data;
+ struct grub_hfs_catalog_key key;
+ struct grub_hfs_dirrec dir;
+ int first_block;
+
+ struct
+ {
+ struct grub_hfs_node node;
+ struct grub_hfs_treeheader head;
+ } treehead;
+
+ data = grub_malloc (sizeof (struct grub_hfs_data));
+ if (!data)
+ return 0;
+
+ /* Read the superblock. */
+ if (grub_disk_read (disk, GRUB_HFS_SBLOCK, 0,
+ sizeof (struct grub_hfs_sblock), &data->sblock))
+ goto fail;
+
+ /* Check if this is a HFS filesystem. */
+ if (grub_be_to_cpu16 (data->sblock.magic) != GRUB_HFS_MAGIC)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an HFS filesystem");
+ goto fail;
+ }
+
+ /* Check if this is an embedded HFS+ filesystem. */
+ if (grub_be_to_cpu16 (data->sblock.embed_sig) == GRUB_HFS_EMBED_HFSPLUS_SIG)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "embedded HFS+ filesystem");
+ goto fail;
+ }
+
+ data->blksz = grub_be_to_cpu32 (data->sblock.blksz);
+ data->disk = disk;
+
+ /* Lookup the root node of the extent overflow tree. */
+ first_block = ((grub_be_to_cpu16 (data->sblock.extent_recs[0].first_block)
+ * GRUB_HFS_BLKS)
+ + grub_be_to_cpu16 (data->sblock.first_block));
+
+ if (grub_disk_read (data->disk, first_block, 0,
+ sizeof (treehead), &treehead))
+ goto fail;
+ data->ext_root = grub_be_to_cpu32 (treehead.head.root_node);
+ data->ext_size = grub_be_to_cpu16 (treehead.head.node_size);
+
+ /* Lookup the root node of the catalog tree. */
+ first_block = ((grub_be_to_cpu16 (data->sblock.catalog_recs[0].first_block)
+ * GRUB_HFS_BLKS)
+ + grub_be_to_cpu16 (data->sblock.first_block));
+ if (grub_disk_read (data->disk, first_block, 0,
+ sizeof (treehead), &treehead))
+ goto fail;
+ data->cat_root = grub_be_to_cpu32 (treehead.head.root_node);
+ data->cat_size = grub_be_to_cpu16 (treehead.head.node_size);
+
+ /* Lookup the root directory node in the catalog tree using the
+ volume name. */
+ key.parent_dir = grub_cpu_to_be32 (1);
+ key.strlen = data->sblock.volname[0];
+ grub_strcpy ((char *) key.str, (char *) (data->sblock.volname + 1));
+
+ if (grub_hfs_find_node (data, (char *) &key, data->cat_root,
+ 0, (char *) &dir, sizeof (dir)) == 0)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "cannot find the HFS root directory");
+ goto fail;
+ }
+
+ if (grub_errno)
+ goto fail;
+
+ data->rootdir = grub_be_to_cpu32 (dir.dirid);
+
+ return data;
+ fail:
+ grub_free (data);
+
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not a HFS filesystem");
+
+ return 0;
+}
+
+/* Compare the K1 and K2 catalog file keys using HFS character ordering. */
+static int
+grub_hfs_cmp_catkeys (struct grub_hfs_catalog_key *k1,
+ struct grub_hfs_catalog_key *k2)
+{
+ /* Taken from hfsutils 3.2.6 and converted to a readable form */
+ static const unsigned char hfs_charorder[256] = {
+ [0x00] = 0,
+ [0x01] = 1,
+ [0x02] = 2,
+ [0x03] = 3,
+ [0x04] = 4,
+ [0x05] = 5,
+ [0x06] = 6,
+ [0x07] = 7,
+ [0x08] = 8,
+ [0x09] = 9,
+ [0x0A] = 10,
+ [0x0B] = 11,
+ [0x0C] = 12,
+ [0x0D] = 13,
+ [0x0E] = 14,
+ [0x0F] = 15,
+ [0x10] = 16,
+ [0x11] = 17,
+ [0x12] = 18,
+ [0x13] = 19,
+ [0x14] = 20,
+ [0x15] = 21,
+ [0x16] = 22,
+ [0x17] = 23,
+ [0x18] = 24,
+ [0x19] = 25,
+ [0x1A] = 26,
+ [0x1B] = 27,
+ [0x1C] = 28,
+ [0x1D] = 29,
+ [0x1E] = 30,
+ [0x1F] = 31,
+ [' '] = 32, [0xCA] = 32,
+ ['!'] = 33,
+ ['"'] = 34,
+ [0xD2] = 35,
+ [0xD3] = 36,
+ [0xC7] = 37,
+ [0xC8] = 38,
+ ['#'] = 39,
+ ['$'] = 40,
+ ['%'] = 41,
+ ['&'] = 42,
+ ['\''] = 43,
+ [0xD4] = 44,
+ [0xD5] = 45,
+ ['('] = 46,
+ [')'] = 47,
+ ['*'] = 48,
+ ['+'] = 49,
+ [','] = 50,
+ ['-'] = 51,
+ ['.'] = 52,
+ ['/'] = 53,
+ ['0'] = 54,
+ ['1'] = 55,
+ ['2'] = 56,
+ ['3'] = 57,
+ ['4'] = 58,
+ ['5'] = 59,
+ ['6'] = 60,
+ ['7'] = 61,
+ ['8'] = 62,
+ ['9'] = 63,
+ [':'] = 64,
+ [';'] = 65,
+ ['<'] = 66,
+ ['='] = 67,
+ ['>'] = 68,
+ ['?'] = 69,
+ ['@'] = 70,
+ ['A'] = 71, ['a'] = 71,
+ [0x88] = 72, [0xCB] = 72,
+ [0x80] = 73, [0x8A] = 73,
+ [0x8B] = 74, [0xCC] = 74,
+ [0x81] = 75, [0x8C] = 75,
+ [0xAE] = 76, [0xBE] = 76,
+ ['`'] = 77,
+ [0x87] = 78,
+ [0x89] = 79,
+ [0xBB] = 80,
+ ['B'] = 81, ['b'] = 81,
+ ['C'] = 82, ['c'] = 82,
+ [0x82] = 83, [0x8D] = 83,
+ ['D'] = 84, ['d'] = 84,
+ ['E'] = 85, ['e'] = 85,
+ [0x83] = 86, [0x8E] = 86,
+ [0x8F] = 87,
+ [0x90] = 88,
+ [0x91] = 89,
+ ['F'] = 90, ['f'] = 90,
+ ['G'] = 91, ['g'] = 91,
+ ['H'] = 92, ['h'] = 92,
+ ['I'] = 93, ['i'] = 93,
+ [0x92] = 94,
+ [0x93] = 95,
+ [0x94] = 96,
+ [0x95] = 97,
+ ['J'] = 98, ['j'] = 98,
+ ['K'] = 99, ['k'] = 99,
+ ['L'] = 100, ['l'] = 100,
+ ['M'] = 101, ['m'] = 101,
+ ['N'] = 102, ['n'] = 102,
+ [0x84] = 103, [0x96] = 103,
+ ['O'] = 104, ['o'] = 104,
+ [0x85] = 105, [0x9A] = 105,
+ [0x9B] = 106, [0xCD] = 106,
+ [0xAF] = 107, [0xBF] = 107,
+ [0xCE] = 108, [0xCF] = 108,
+ [0x97] = 109,
+ [0x98] = 110,
+ [0x99] = 111,
+ [0xBC] = 112,
+ ['P'] = 113, ['p'] = 113,
+ ['Q'] = 114, ['q'] = 114,
+ ['R'] = 115, ['r'] = 115,
+ ['S'] = 116, ['s'] = 116,
+ [0xA7] = 117,
+ ['T'] = 118, ['t'] = 118,
+ ['U'] = 119, ['u'] = 119,
+ [0x86] = 120, [0x9F] = 120,
+ [0x9C] = 121,
+ [0x9D] = 122,
+ [0x9E] = 123,
+ ['V'] = 124, ['v'] = 124,
+ ['W'] = 125, ['w'] = 125,
+ ['X'] = 126, ['x'] = 126,
+ ['Y'] = 127, ['y'] = 127,
+ [0xD8] = 128,
+ ['Z'] = 129, ['z'] = 129,
+ ['['] = 130,
+ ['\\'] = 131,
+ [']'] = 132,
+ ['^'] = 133,
+ ['_'] = 134,
+ ['{'] = 135,
+ ['|'] = 136,
+ ['}'] = 137,
+ ['~'] = 138,
+ [0x7F] = 139,
+ [0xA0] = 140,
+ [0xA1] = 141,
+ [0xA2] = 142,
+ [0xA3] = 143,
+ [0xA4] = 144,
+ [0xA5] = 145,
+ [0xA6] = 146,
+ [0xA8] = 147,
+ [0xA9] = 148,
+ [0xAA] = 149,
+ [0xAB] = 150,
+ [0xAC] = 151,
+ [0xAD] = 152,
+ [0xB0] = 153,
+ [0xB1] = 154,
+ [0xB2] = 155,
+ [0xB3] = 156,
+ [0xB4] = 157,
+ [0xB5] = 158,
+ [0xB6] = 159,
+ [0xB7] = 160,
+ [0xB8] = 161,
+ [0xB9] = 162,
+ [0xBA] = 163,
+ [0xBD] = 164,
+ [0xC0] = 165,
+ [0xC1] = 166,
+ [0xC2] = 167,
+ [0xC3] = 168,
+ [0xC4] = 169,
+ [0xC5] = 170,
+ [0xC6] = 171,
+ [0xC9] = 172,
+ [0xD0] = 173,
+ [0xD1] = 174,
+ [0xD6] = 175,
+ [0xD7] = 176,
+ [0xD9] = 177,
+ [0xDA] = 178,
+ [0xDB] = 179,
+ [0xDC] = 180,
+ [0xDD] = 181,
+ [0xDE] = 182,
+ [0xDF] = 183,
+ [0xE0] = 184,
+ [0xE1] = 185,
+ [0xE2] = 186,
+ [0xE3] = 187,
+ [0xE4] = 188,
+ [0xE5] = 189,
+ [0xE6] = 190,
+ [0xE7] = 191,
+ [0xE8] = 192,
+ [0xE9] = 193,
+ [0xEA] = 194,
+ [0xEB] = 195,
+ [0xEC] = 196,
+ [0xED] = 197,
+ [0xEE] = 198,
+ [0xEF] = 199,
+ [0xF0] = 200,
+ [0xF1] = 201,
+ [0xF2] = 202,
+ [0xF3] = 203,
+ [0xF4] = 204,
+ [0xF5] = 205,
+ [0xF6] = 206,
+ [0xF7] = 207,
+ [0xF8] = 208,
+ [0xF9] = 209,
+ [0xFA] = 210,
+ [0xFB] = 211,
+ [0xFC] = 212,
+ [0xFD] = 213,
+ [0xFE] = 214,
+ [0xFF] = 215,
+ };
+ int i;
+ int cmp;
+ int minlen = (k1->strlen < k2->strlen) ? k1->strlen : k2->strlen;
+
+ cmp = (grub_be_to_cpu32 (k1->parent_dir) - grub_be_to_cpu32 (k2->parent_dir));
+ if (cmp != 0)
+ return cmp;
+
+ for (i = 0; i < minlen; i++)
+ {
+ cmp = (hfs_charorder[k1->str[i]] - hfs_charorder[k2->str[i]]);
+ if (cmp != 0)
+ return cmp;
+ }
+
+ /* Shorter strings precede long ones. */
+ return (k1->strlen - k2->strlen);
+}
+
+
+/* Compare the K1 and K2 extent overflow file keys. */
+static int
+grub_hfs_cmp_extkeys (struct grub_hfs_extent_key *k1,
+ struct grub_hfs_extent_key *k2)
+{
+ int cmp = k1->forktype - k2->forktype;
+ if (cmp == 0)
+ cmp = grub_be_to_cpu32 (k1->fileid) - grub_be_to_cpu32 (k2->fileid);
+ if (cmp == 0)
+ cmp = (grub_be_to_cpu16 (k1->first_block)
+ - grub_be_to_cpu16 (k2->first_block));
+ return cmp;
+}
+
+
+/* Iterate the records in the node with index IDX in the mounted HFS
+ filesystem DATA. This node holds data of the type TYPE (0 =
+ catalog node, 1 = extent overflow node). If this is set, continue
+ iterating to the next node. For every records, call NODE_HOOK. */
+static grub_err_t
+grub_hfs_iterate_records (struct grub_hfs_data *data, int type, int idx,
+ int this, int (*node_hook) (struct grub_hfs_node *hnd,
+ struct grub_hfs_record *))
+{
+ int nodesize = type == 0 ? data->cat_size : data->ext_size;
+
+ union
+ {
+ struct grub_hfs_node node;
+ char rawnode[nodesize];
+ grub_uint16_t offsets[nodesize / 2];
+ } node;
+
+ do
+ {
+ int i;
+ struct grub_hfs_extent *dat;
+ int blk;
+
+ dat = (struct grub_hfs_extent *) (type == 0
+ ? (&data->sblock.catalog_recs)
+ : (&data->sblock.extent_recs));
+
+ /* Read the node into memory. */
+ blk = grub_hfs_block (data, dat,
+ (type == 0) ? GRUB_HFS_CNID_CAT : GRUB_HFS_CNID_EXT,
+ idx / (data->blksz / nodesize), 0);
+ blk += (idx % (data->blksz / nodesize));
+ if (grub_errno)
+ return grub_errno;
+
+ if (grub_disk_read (data->disk, blk, 0,
+ sizeof (node), &node))
+ return grub_errno;
+
+ /* Iterate over all records in this node. */
+ for (i = 0; i < grub_be_to_cpu16 (node.node.reccnt); i++)
+ {
+ int pos = (nodesize >> 1) - 1 - i;
+ struct pointer
+ {
+ grub_uint8_t keylen;
+ grub_uint8_t key;
+ } __attribute__ ((packed)) *pnt;
+ pnt = (struct pointer *) (grub_be_to_cpu16 (node.offsets[pos])
+ + node.rawnode);
+
+ struct grub_hfs_record rec =
+ {
+ &pnt->key,
+ pnt->keylen,
+ &pnt->key + pnt->keylen +(pnt->keylen + 1) % 2,
+ nodesize - grub_be_to_cpu16 (node.offsets[pos])
+ - pnt->keylen - 1
+ };
+
+ if (node_hook (&node.node, &rec))
+ return 0;
+ }
+
+ idx = grub_be_to_cpu32 (node.node.next);
+ } while (idx && this);
+
+ return 0;
+}
+
+
+/* Lookup a record in the mounted filesystem DATA using the key KEY.
+ The index of the node on top of the tree is IDX. The tree is of
+ the type TYPE (0 = catalog node, 1 = extent overflow node). Return
+ the data in DATAR with a maximum length of DATALEN. */
+static int
+grub_hfs_find_node (struct grub_hfs_data *data, char *key,
+ grub_uint32_t idx, int type, char *datar, int datalen)
+{
+ int found = -1;
+ int isleaf = 0;
+ int done = 0;
+
+ auto int node_found (struct grub_hfs_node *, struct grub_hfs_record *);
+
+ int node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec)
+ {
+ int cmp = 1;
+
+ if (type == 0)
+ cmp = grub_hfs_cmp_catkeys (rec->key, (void *) key);
+ else
+ cmp = grub_hfs_cmp_extkeys (rec->key, (void *) key);
+
+ /* If the key is smaller or equal to the current node, mark the
+ entry. In case of a non-leaf mode it will be used to lookup
+ the rest of the tree. */
+ if (cmp <= 0)
+ {
+ grub_uint32_t *node = (grub_uint32_t *) rec->data;
+ found = grub_be_to_cpu32 (*node);
+ }
+ else /* The key can not be found in the tree. */
+ return 1;
+
+ /* Check if this node is a leaf node. */
+ if (hnd->type == GRUB_HFS_NODE_LEAF)
+ {
+ isleaf = 1;
+
+ /* Found it!!!! */
+ if (cmp == 0)
+ {
+ done = 1;
+
+ grub_memcpy (datar, rec->data,
+ rec->datalen < datalen ? rec->datalen : datalen);
+ return 1;
+ }
+ }
+
+ return 0;
+ }
+
+ do
+ {
+ found = -1;
+
+ if (grub_hfs_iterate_records (data, type, idx, 0, node_found))
+ return 0;
+
+ if (found == -1)
+ return 0;
+
+ idx = found;
+ } while (! isleaf);
+
+ return done;
+}
+
+
+/* Iterate over the directory with the id DIR. The tree is searched
+ starting with the node ROOT_IDX. For every entry in this directory
+ call HOOK. */
+static grub_err_t
+grub_hfs_iterate_dir (struct grub_hfs_data *data, grub_uint32_t root_idx,
+ unsigned int dir, int (*hook) (struct grub_hfs_record *))
+{
+ int found = -1;
+ int isleaf = 0;
+ int next = 0;
+
+ /* The lowest key possible with DIR as root directory. */
+ struct grub_hfs_catalog_key key = {0, grub_cpu_to_be32 (dir), 0, ""};
+
+ auto int node_found (struct grub_hfs_node *, struct grub_hfs_record *);
+ auto int it_dir (struct grub_hfs_node * __attribute ((unused)),
+ struct grub_hfs_record *);
+
+
+ int node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec)
+ {
+ struct grub_hfs_catalog_key *ckey = rec->key;
+
+ if (grub_hfs_cmp_catkeys (rec->key, (void *) &key) <= 0)
+ found = grub_be_to_cpu32 (*(grub_uint32_t *) rec->data);
+
+ if (hnd->type == 0xFF && ckey->strlen > 0)
+ {
+ isleaf = 1;
+ next = grub_be_to_cpu32 (hnd->next);
+
+ /* An entry was found. */
+ if (grub_be_to_cpu32 (ckey->parent_dir) == dir)
+ return hook (rec);
+ }
+
+ return 0;
+ }
+
+ int it_dir (struct grub_hfs_node *hnd __attribute ((unused)),
+ struct grub_hfs_record *rec)
+ {
+ struct grub_hfs_catalog_key *ckey = rec->key;
+ struct grub_hfs_catalog_key *origkey = &key;
+
+ /* Stop when the entries do not match anymore. */
+ if (grub_be_to_cpu32 (ckey->parent_dir)
+ != grub_be_to_cpu32 ((origkey)->parent_dir))
+ return 1;
+
+ return hook (rec);
+ }
+
+ do
+ {
+ found = -1;
+
+ if (grub_hfs_iterate_records (data, 0, root_idx, 0, node_found))
+ return grub_errno;
+
+ if (found == -1)
+ return 0;
+
+ root_idx = found;
+ } while (! isleaf);
+
+ /* If there was a matching record in this leaf node, continue the
+ iteration until the last record was found. */
+ grub_hfs_iterate_records (data, 0, next, 1, it_dir);
+ return grub_errno;
+}
+
+
+/* Find a file or directory with the pathname PATH in the filesystem
+ DATA. Return the file record in RETDATA when it is non-zero.
+ Return the directory number in RETINODE when it is non-zero. */
+static grub_err_t
+grub_hfs_find_dir (struct grub_hfs_data *data, const char *path,
+ struct grub_hfs_filerec *retdata, int *retinode)
+{
+ int inode = data->rootdir;
+ char *next;
+ char *origpath;
+ union {
+ struct grub_hfs_filerec frec;
+ struct grub_hfs_dirrec dir;
+ } fdrec;
+
+ fdrec.frec.type = GRUB_HFS_FILETYPE_DIR;
+
+ if (path[0] != '/')
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "bad filename");
+ return 0;
+ }
+
+ origpath = grub_strdup (path);
+ if (!origpath)
+ return grub_errno;
+
+ path = origpath;
+ while (*path == '/')
+ path++;
+
+ while (path && grub_strlen (path))
+ {
+ if (fdrec.frec.type != GRUB_HFS_FILETYPE_DIR)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ goto fail;
+ }
+
+ /* Isolate a part of the path. */
+ next = grub_strchr (path, '/');
+ if (next)
+ {
+ while (*next == '/')
+ *(next++) = '\0';
+ }
+
+ struct grub_hfs_catalog_key key;
+
+ key.parent_dir = grub_cpu_to_be32 (inode);
+ key.strlen = grub_strlen (path);
+ grub_strcpy ((char *) (key.str), path);
+
+ /* Lookup this node. */
+ if (! grub_hfs_find_node (data, (char *) &key, data->cat_root,
+ 0, (char *) &fdrec.frec, sizeof (fdrec.frec)))
+ {
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ goto fail;
+ }
+
+ if (grub_errno)
+ goto fail;
+
+ inode = grub_be_to_cpu32 (fdrec.dir.dirid);
+ path = next;
+ }
+
+ if (retdata)
+ grub_memcpy (retdata, &fdrec.frec, sizeof (fdrec.frec));
+
+ if (retinode)
+ *retinode = inode;
+
+ fail:
+ grub_free (origpath);
+ return grub_errno;
+}
+
+
+
+static grub_err_t
+grub_hfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ int inode;
+
+ auto int dir_hook (struct grub_hfs_record *rec);
+
+ int dir_hook (struct grub_hfs_record *rec)
+ {
+ char fname[32] = { 0 };
+ char *filetype = rec->data;
+ struct grub_hfs_catalog_key *ckey = rec->key;
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+
+ grub_strncpy (fname, (char *) (ckey->str), ckey->strlen);
+
+ if (*filetype == GRUB_HFS_FILETYPE_DIR
+ || *filetype == GRUB_HFS_FILETYPE_FILE)
+ {
+ info.dir = (*filetype == GRUB_HFS_FILETYPE_DIR);
+ return hook (fname, &info);
+ }
+ return 0;
+ }
+
+ struct grub_hfs_data *data;
+ struct grub_hfs_filerec frec;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_hfs_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ /* First the directory ID for the directory. */
+ if (grub_hfs_find_dir (data, path, &frec, &inode))
+ goto fail;
+
+ if (frec.type != GRUB_HFS_FILETYPE_DIR)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ goto fail;
+ }
+
+ grub_hfs_iterate_dir (data, data->cat_root, inode, dir_hook);
+
+ fail:
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_hfs_open (struct grub_file *file, const char *name)
+{
+ struct grub_hfs_data *data;
+ struct grub_hfs_filerec frec;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_hfs_mount (file->device->disk);
+
+ if (grub_hfs_find_dir (data, name, &frec, 0))
+ {
+ grub_free (data);
+ grub_dl_unref (my_mod);
+ return grub_errno;
+ }
+
+ if (frec.type != GRUB_HFS_FILETYPE_FILE)
+ {
+ grub_free (data);
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a file");
+ grub_dl_unref (my_mod);
+ return grub_errno;
+ }
+
+ grub_memcpy (data->extents, frec.extents, sizeof (grub_hfs_datarecord_t));
+ file->size = grub_be_to_cpu32 (frec.size);
+ data->size = grub_be_to_cpu32 (frec.size);
+ data->fileid = grub_be_to_cpu32 (frec.fileid);
+ file->offset = 0;
+
+ file->data = data;
+
+ return 0;
+}
+
+static grub_ssize_t
+grub_hfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_hfs_data *data =
+ (struct grub_hfs_data *) file->data;
+
+ return grub_hfs_read_file (data, file->read_hook, file->offset, len, buf);
+}
+
+
+static grub_err_t
+grub_hfs_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return 0;
+}
+
+
+static grub_err_t
+grub_hfs_label (grub_device_t device, char **label)
+{
+ struct grub_hfs_data *data;
+
+ data = grub_hfs_mount (device->disk);
+
+ if (data)
+ *label = grub_strndup ((char *) (data->sblock.volname + 1),
+ *data->sblock.volname);
+ else
+ *label = 0;
+
+ grub_free (data);
+ return grub_errno;
+}
+
+static grub_err_t
+grub_hfs_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_hfs_data *data;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_hfs_mount (device->disk);
+ if (data && data->sblock.num_serial != 0)
+ {
+ *uuid = grub_xasprintf ("%016llx",
+ (unsigned long long)
+ grub_be_to_cpu64 (data->sblock.num_serial));
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+
+static struct grub_fs grub_hfs_fs =
+ {
+ .name = "hfs",
+ .dir = grub_hfs_dir,
+ .open = grub_hfs_open,
+ .read = grub_hfs_read,
+ .close = grub_hfs_close,
+ .label = grub_hfs_label,
+ .uuid = grub_hfs_uuid,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(hfs)
+{
+ grub_fs_register (&grub_hfs_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(hfs)
+{
+ grub_fs_unregister (&grub_hfs_fs);
+}
diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
new file mode 100644
index 0000000..304b321
--- /dev/null
+++ b/grub-core/fs/hfsplus.c
@@ -0,0 +1,1050 @@
+/* hfsplus.c - HFS+ Filesystem. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* HFS+ is documented at http://developer.apple.com/technotes/tn/tn1150.html */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+#include <grub/hfs.h>
+#include <grub/charset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_HFSPLUS_MAGIC 0x482B
+#define GRUB_HFSPLUSX_MAGIC 0x4858
+#define GRUB_HFSPLUS_SBLOCK 2
+
+/* A HFS+ extent. */
+struct grub_hfsplus_extent
+{
+ /* The first block of a file on disk. */
+ grub_uint32_t start;
+ /* The amount of blocks described by this extent. */
+ grub_uint32_t count;
+} __attribute__ ((packed));
+
+/* The descriptor of a fork. */
+struct grub_hfsplus_forkdata
+{
+ grub_uint64_t size;
+ grub_uint32_t clumpsize;
+ grub_uint32_t blocks;
+ struct grub_hfsplus_extent extents[8];
+} __attribute__ ((packed));
+
+/* The HFS+ Volume Header. */
+struct grub_hfsplus_volheader
+{
+ grub_uint16_t magic;
+ grub_uint16_t version;
+ grub_uint32_t attributes;
+ grub_uint8_t unused1[12];
+ grub_uint32_t utime;
+ grub_uint8_t unused2[16];
+ grub_uint32_t blksize;
+ grub_uint8_t unused3[60];
+ grub_uint64_t num_serial;
+ struct grub_hfsplus_forkdata allocations_file;
+ struct grub_hfsplus_forkdata extents_file;
+ struct grub_hfsplus_forkdata catalog_file;
+ struct grub_hfsplus_forkdata attrib_file;
+ struct grub_hfsplus_forkdata startup_file;
+} __attribute__ ((packed));
+
+/* The type of node. */
+enum grub_hfsplus_btnode_type
+ {
+ GRUB_HFSPLUS_BTNODE_TYPE_LEAF = -1,
+ GRUB_HFSPLUS_BTNODE_TYPE_INDEX = 0,
+ GRUB_HFSPLUS_BTNODE_TYPE_HEADER = 1,
+ GRUB_HFSPLUS_BTNODE_TYPE_MAP = 2,
+ };
+
+struct grub_hfsplus_btnode
+{
+ grub_uint32_t next;
+ grub_uint32_t prev;
+ grub_int8_t type;
+ grub_uint8_t height;
+ grub_uint16_t count;
+ grub_uint16_t unused;
+} __attribute__ ((packed));
+
+/* The header of a HFS+ B+ Tree. */
+struct grub_hfsplus_btheader
+{
+ grub_uint16_t depth;
+ grub_uint32_t root;
+ grub_uint32_t leaf_records;
+ grub_uint32_t first_leaf_node;
+ grub_uint32_t last_leaf_node;
+ grub_uint16_t nodesize;
+ grub_uint16_t keysize;
+ grub_uint32_t total_nodes;
+ grub_uint32_t free_nodes;
+ grub_uint16_t reserved1;
+ grub_uint32_t clump_size; /* ignored */
+ grub_uint8_t btree_type;
+ grub_uint8_t key_compare;
+ grub_uint32_t attributes;
+} __attribute__ ((packed));
+
+/* The on disk layout of a catalog key. */
+struct grub_hfsplus_catkey
+{
+ grub_uint16_t keylen;
+ grub_uint32_t parent;
+ grub_uint16_t namelen;
+ grub_uint16_t name[30];
+} __attribute__ ((packed));
+
+/* The on disk layout of an extent overflow file key. */
+struct grub_hfsplus_extkey
+{
+ grub_uint16_t keylen;
+ grub_uint8_t type;
+ grub_uint8_t unused;
+ grub_uint32_t fileid;
+ grub_uint32_t start;
+} __attribute__ ((packed));
+
+struct grub_hfsplus_key
+{
+ union
+ {
+ struct grub_hfsplus_extkey extkey;
+ struct grub_hfsplus_catkey catkey;
+ grub_uint16_t keylen;
+ };
+} __attribute__ ((packed));
+
+struct grub_hfsplus_catfile
+{
+ grub_uint16_t type;
+ grub_uint16_t flags;
+ grub_uint32_t reserved;
+ grub_uint32_t fileid;
+ grub_uint8_t unused1[4];
+ grub_uint32_t mtime;
+ grub_uint8_t unused2[22];
+ grub_uint16_t mode;
+ grub_uint8_t unused3[44];
+ struct grub_hfsplus_forkdata data;
+ struct grub_hfsplus_forkdata resource;
+} __attribute__ ((packed));
+
+/* Filetype information as used in inodes. */
+#define GRUB_HFSPLUS_FILEMODE_MASK 0170000
+#define GRUB_HFSPLUS_FILEMODE_REG 0100000
+#define GRUB_HFSPLUS_FILEMODE_DIRECTORY 0040000
+#define GRUB_HFSPLUS_FILEMODE_SYMLINK 0120000
+
+/* Some pre-defined file IDs. */
+#define GRUB_HFSPLUS_FILEID_ROOTDIR 2
+#define GRUB_HFSPLUS_FILEID_OVERFLOW 3
+#define GRUB_HFSPLUS_FILEID_CATALOG 4
+
+enum grub_hfsplus_filetype
+ {
+ GRUB_HFSPLUS_FILETYPE_DIR = 1,
+ GRUB_HFSPLUS_FILETYPE_REG = 2,
+ GRUB_HFSPLUS_FILETYPE_DIR_THREAD = 3,
+ GRUB_HFSPLUS_FILETYPE_REG_THREAD = 4
+ };
+
+#define GRUB_HFSPLUSX_BINARYCOMPARE 0xBC
+#define GRUB_HFSPLUSX_CASEFOLDING 0xCF
+
+/* Internal representation of a catalog key. */
+struct grub_hfsplus_catkey_internal
+{
+ grub_uint32_t parent;
+ char *name;
+};
+
+/* Internal representation of an extent overflow key. */
+struct grub_hfsplus_extkey_internal
+{
+ grub_uint32_t fileid;
+ grub_uint32_t start;
+};
+
+struct grub_hfsplus_key_internal
+{
+ union
+ {
+ struct grub_hfsplus_extkey_internal extkey;
+ struct grub_hfsplus_catkey_internal catkey;
+ };
+};
+
+
+
+struct grub_fshelp_node
+{
+ struct grub_hfsplus_data *data;
+ struct grub_hfsplus_extent extents[8];
+ grub_uint64_t size;
+ grub_uint32_t fileid;
+ grub_int32_t mtime;
+};
+
+struct grub_hfsplus_btree
+{
+ grub_uint32_t root;
+ int nodesize;
+
+ /* Catalog file node. */
+ struct grub_fshelp_node file;
+};
+
+/* Information about a "mounted" HFS+ filesystem. */
+struct grub_hfsplus_data
+{
+ struct grub_hfsplus_volheader volheader;
+ grub_disk_t disk;
+
+ unsigned int log2blksize;
+
+ struct grub_hfsplus_btree catalog_tree;
+ struct grub_hfsplus_btree extoverflow_tree;
+
+ struct grub_fshelp_node dirroot;
+ struct grub_fshelp_node opened_file;
+
+ /* This is the offset into the physical disk for an embedded HFS+
+ filesystem (one inside a plain HFS wrapper). */
+ int embedded_offset;
+ int case_sensitive;
+};
+
+static grub_dl_t my_mod;
+
+
+/* Return the offset of the record with the index INDEX, in the node
+ NODE which is part of the B+ tree BTREE. */
+static inline unsigned int
+grub_hfsplus_btree_recoffset (struct grub_hfsplus_btree *btree,
+ struct grub_hfsplus_btnode *node, int index)
+{
+ char *cnode = (char *) node;
+ grub_uint16_t *recptr;
+ recptr = (grub_uint16_t *) (&cnode[btree->nodesize
+ - index * sizeof (grub_uint16_t) - 2]);
+ return grub_be_to_cpu16 (*recptr);
+}
+
+/* Return a pointer to the record with the index INDEX, in the node
+ NODE which is part of the B+ tree BTREE. */
+static inline struct grub_hfsplus_key *
+grub_hfsplus_btree_recptr (struct grub_hfsplus_btree *btree,
+ struct grub_hfsplus_btnode *node, int index)
+{
+ char *cnode = (char *) node;
+ unsigned int offset;
+ offset = grub_hfsplus_btree_recoffset (btree, node, index);
+ return (struct grub_hfsplus_key *) &cnode[offset];
+}
+
+
+/* Find the extent that points to FILEBLOCK. If it is not in one of
+ the 8 extents described by EXTENT, return -1. In that case set
+ FILEBLOCK to the next block. */
+static int
+grub_hfsplus_find_block (struct grub_hfsplus_extent *extent,
+ int *fileblock)
+{
+ int i;
+ grub_size_t blksleft = *fileblock;
+
+ /* First lookup the file in the given extents. */
+ for (i = 0; i < 8; i++)
+ {
+ if (blksleft < grub_be_to_cpu32 (extent[i].count))
+ return grub_be_to_cpu32 (extent[i].start) + blksleft;
+ blksleft -= grub_be_to_cpu32 (extent[i].count);
+ }
+
+ *fileblock = blksleft;
+ return -1;
+}
+
+static grub_err_t
+grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
+ struct grub_hfsplus_key_internal *key,
+ int (*compare_keys) (struct grub_hfsplus_key *keya,
+ struct grub_hfsplus_key_internal *keyb),
+ struct grub_hfsplus_btnode **matchnode, int *keyoffset);
+
+static int grub_hfsplus_cmp_extkey (struct grub_hfsplus_key *keya,
+ struct grub_hfsplus_key_internal *keyb);
+
+/* Search for the block FILEBLOCK inside the file NODE. Return the
+ blocknumber of this block on disk. */
+static grub_disk_addr_t
+grub_hfsplus_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ struct grub_hfsplus_btnode *nnode = 0;
+ int blksleft = fileblock;
+ struct grub_hfsplus_extent *extents = &node->extents[0];
+
+ while (1)
+ {
+ struct grub_hfsplus_extkey *key;
+ struct grub_hfsplus_extkey_internal extoverflow;
+ int blk;
+ int ptr;
+
+ /* Try to find this block in the current set of extents. */
+ blk = grub_hfsplus_find_block (extents, &blksleft);
+
+ /* The previous iteration of this loop allocated memory. The
+ code above used this memory, it can be freed now. */
+ grub_free (nnode);
+ nnode = 0;
+
+ if (blk != -1)
+ return (blk
+ + (node->data->embedded_offset >> (node->data->log2blksize
+ - GRUB_DISK_SECTOR_BITS)));
+
+ /* For the extent overflow file, extra extents can't be found in
+ the extent overflow file. If this happens, you found a
+ bug... */
+ if (node->fileid == GRUB_HFSPLUS_FILEID_OVERFLOW)
+ {
+ grub_error (GRUB_ERR_READ_ERROR,
+ "extra extents found in an extend overflow file");
+ break;
+ }
+
+ /* Set up the key to look for in the extent overflow file. */
+ extoverflow.fileid = node->fileid;
+ extoverflow.start = fileblock - blksleft;
+
+ if (grub_hfsplus_btree_search (&node->data->extoverflow_tree,
+ (struct grub_hfsplus_key_internal *) &extoverflow,
+ grub_hfsplus_cmp_extkey, &nnode, &ptr))
+ {
+ grub_error (GRUB_ERR_READ_ERROR,
+ "no block found for the file id 0x%x and the block offset 0x%x",
+ node->fileid, fileblock);
+ break;
+ }
+
+ /* The extent overflow file has 8 extents right after the key. */
+ key = (struct grub_hfsplus_extkey *)
+ grub_hfsplus_btree_recptr (&node->data->extoverflow_tree, nnode, ptr);
+ extents = (struct grub_hfsplus_extent *) (key + 1);
+
+ /* The block wasn't found. Perhaps the next iteration will find
+ it. The last block we found is stored in BLKSLEFT now. */
+ }
+
+ grub_free (nnode);
+
+ /* Too bad, you lose. */
+ return -1;
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_hfsplus_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_hfsplus_read_block,
+ node->size,
+ node->data->log2blksize - GRUB_DISK_SECTOR_BITS);
+}
+
+static struct grub_hfsplus_data *
+grub_hfsplus_mount (grub_disk_t disk)
+{
+ struct grub_hfsplus_data *data;
+ struct grub_hfsplus_btheader header;
+ struct grub_hfsplus_btnode node;
+ grub_uint16_t magic;
+ union {
+ struct grub_hfs_sblock hfs;
+ struct grub_hfsplus_volheader hfsplus;
+ } volheader;
+
+ data = grub_malloc (sizeof (*data));
+ if (!data)
+ return 0;
+
+ data->disk = disk;
+
+ /* Read the bootblock. */
+ grub_disk_read (disk, GRUB_HFSPLUS_SBLOCK, 0, sizeof (volheader),
+ &volheader);
+ if (grub_errno)
+ goto fail;
+
+ data->embedded_offset = 0;
+ if (grub_be_to_cpu16 (volheader.hfs.magic) == GRUB_HFS_MAGIC)
+ {
+ int extent_start;
+ int ablk_size;
+ int ablk_start;
+
+ /* See if there's an embedded HFS+ filesystem. */
+ if (grub_be_to_cpu16 (volheader.hfs.embed_sig) != GRUB_HFSPLUS_MAGIC)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
+ goto fail;
+ }
+
+ /* Calculate the offset needed to translate HFS+ sector numbers. */
+ extent_start = grub_be_to_cpu16 (volheader.hfs.embed_extent.first_block);
+ ablk_size = grub_be_to_cpu32 (volheader.hfs.blksz);
+ ablk_start = grub_be_to_cpu16 (volheader.hfs.first_block);
+ data->embedded_offset = (ablk_start
+ + extent_start
+ * (ablk_size >> GRUB_DISK_SECTOR_BITS));
+
+ grub_disk_read (disk, data->embedded_offset + GRUB_HFSPLUS_SBLOCK, 0,
+ sizeof (volheader), &volheader);
+ if (grub_errno)
+ goto fail;
+ }
+
+ /* Make sure this is an HFS+ filesystem. XXX: Do we really support
+ HFX? */
+ magic = grub_be_to_cpu16 (volheader.hfsplus.magic);
+ if ((magic != GRUB_HFSPLUS_MAGIC) && (magic != GRUB_HFSPLUSX_MAGIC))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
+ goto fail;
+ }
+
+ grub_memcpy (&data->volheader, &volheader.hfsplus,
+ sizeof (volheader.hfsplus));
+
+ if (grub_fshelp_log2blksize (grub_be_to_cpu32 (data->volheader.blksize),
+ &data->log2blksize))
+ goto fail;
+
+ /* Make a new node for the catalog tree. */
+ data->catalog_tree.file.data = data;
+ data->catalog_tree.file.fileid = GRUB_HFSPLUS_FILEID_CATALOG;
+ grub_memcpy (&data->catalog_tree.file.extents,
+ data->volheader.catalog_file.extents,
+ sizeof data->volheader.catalog_file.extents);
+ data->catalog_tree.file.size =
+ grub_be_to_cpu64 (data->volheader.catalog_file.size);
+
+ /* Make a new node for the extent overflow file. */
+ data->extoverflow_tree.file.data = data;
+ data->extoverflow_tree.file.fileid = GRUB_HFSPLUS_FILEID_OVERFLOW;
+ grub_memcpy (&data->extoverflow_tree.file.extents,
+ data->volheader.extents_file.extents,
+ sizeof data->volheader.catalog_file.extents);
+
+ data->extoverflow_tree.file.size =
+ grub_be_to_cpu64 (data->volheader.extents_file.size);
+
+ /* Read the essential information about the trees. */
+ if (grub_hfsplus_read_file (&data->catalog_tree.file, 0,
+ sizeof (struct grub_hfsplus_btnode),
+ sizeof (header), (char *) &header) <= 0)
+ goto fail;
+
+ data->catalog_tree.root = grub_be_to_cpu32 (header.root);
+ data->catalog_tree.nodesize = grub_be_to_cpu16 (header.nodesize);
+ data->case_sensitive = ((magic == GRUB_HFSPLUSX_MAGIC) &&
+ (header.key_compare == GRUB_HFSPLUSX_BINARYCOMPARE));
+
+ if (grub_hfsplus_read_file (&data->extoverflow_tree.file, 0,
+ sizeof (struct grub_hfsplus_btnode),
+ sizeof (header), (char *) &header) <= 0)
+ goto fail;
+
+ data->extoverflow_tree.root = grub_be_to_cpu32 (header.root);
+
+ if (grub_hfsplus_read_file (&data->extoverflow_tree.file, 0, 0,
+ sizeof (node), (char *) &node) <= 0)
+ goto fail;
+
+ data->extoverflow_tree.root = grub_be_to_cpu32 (header.root);
+ data->extoverflow_tree.nodesize = grub_be_to_cpu16 (header.nodesize);
+
+ data->dirroot.data = data;
+ data->dirroot.fileid = GRUB_HFSPLUS_FILEID_ROOTDIR;
+
+ return data;
+
+ fail:
+
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
+
+ grub_free (data);
+ return 0;
+}
+
+/* Compare the on disk catalog key KEYA with the catalog key we are
+ looking for (KEYB). */
+static int
+grub_hfsplus_cmp_catkey (struct grub_hfsplus_key *keya,
+ struct grub_hfsplus_key_internal *keyb)
+{
+ struct grub_hfsplus_catkey *catkey_a = &keya->catkey;
+ struct grub_hfsplus_catkey_internal *catkey_b = &keyb->catkey;
+ char *filename;
+ int i;
+ int diff;
+
+ /* Safe unsigned comparison */
+ grub_uint32_t aparent = grub_be_to_cpu32 (catkey_a->parent);
+ if (aparent > catkey_b->parent)
+ return 1;
+ if (aparent < catkey_b->parent)
+ return -1;
+
+ /* Change the filename in keya so the endianness is correct. */
+ for (i = 0; i < grub_be_to_cpu16 (catkey_a->namelen); i++)
+ catkey_a->name[i] = grub_be_to_cpu16 (catkey_a->name[i]);
+
+ filename = grub_malloc (grub_be_to_cpu16 (catkey_a->namelen) + 1);
+
+ if (! grub_utf16_to_utf8 ((grub_uint8_t *) filename, catkey_a->name,
+ grub_be_to_cpu16 (catkey_a->namelen)))
+ return -1; /* XXX: This error never occurs, but in case it happens
+ just skip this entry. */
+
+ diff = grub_strncmp (filename, catkey_b->name,
+ grub_be_to_cpu16 (catkey_a->namelen));
+
+ grub_free (filename);
+
+ /* The endianness was changed to host format, change it back to
+ whatever it was. */
+ for (i = 0; i < grub_be_to_cpu16 (catkey_a->namelen); i++)
+ catkey_a->name[i] = grub_cpu_to_be16 (catkey_a->name[i]);
+ return diff;
+}
+
+/* Compare the on disk extent overflow key KEYA with the extent
+ overflow key we are looking for (KEYB). */
+static int
+grub_hfsplus_cmp_extkey (struct grub_hfsplus_key *keya,
+ struct grub_hfsplus_key_internal *keyb)
+{
+ struct grub_hfsplus_extkey *extkey_a = &keya->extkey;
+ struct grub_hfsplus_extkey_internal *extkey_b = &keyb->extkey;
+ grub_uint32_t akey;
+
+ /* Safe unsigned comparison */
+ akey = grub_be_to_cpu32 (extkey_a->fileid);
+ if (akey > extkey_b->fileid)
+ return 1;
+ if (akey < extkey_b->fileid)
+ return -1;
+
+ akey = grub_be_to_cpu32 (extkey_a->start);
+ if (akey > extkey_b->start)
+ return 1;
+ if (akey < extkey_b->start)
+ return -1;
+ return 0;
+}
+
+static char *
+grub_hfsplus_read_symlink (grub_fshelp_node_t node)
+{
+ char *symlink;
+ grub_ssize_t numread;
+
+ symlink = grub_malloc (node->size + 1);
+ if (!symlink)
+ return 0;
+
+ numread = grub_hfsplus_read_file (node, 0, 0, node->size, symlink);
+ if (numread != (grub_ssize_t) node->size)
+ {
+ grub_free (symlink);
+ return 0;
+ }
+ symlink[node->size] = '\0';
+
+ return symlink;
+}
+
+static int
+grub_hfsplus_btree_iterate_node (struct grub_hfsplus_btree *btree,
+ struct grub_hfsplus_btnode *first_node,
+ int first_rec,
+ int (*hook) (void *record))
+{
+ int rec;
+
+ for (;;)
+ {
+ char *cnode = (char *) first_node;
+
+ /* Iterate over all records in this node. */
+ for (rec = first_rec; rec < grub_be_to_cpu16 (first_node->count); rec++)
+ {
+ if (hook (grub_hfsplus_btree_recptr (btree, first_node, rec)))
+ return 1;
+ }
+
+ if (! first_node->next)
+ break;
+
+ if (grub_hfsplus_read_file (&btree->file, 0,
+ (grub_be_to_cpu32 (first_node->next)
+ * btree->nodesize),
+ btree->nodesize, cnode) <= 0)
+ return 1;
+
+ /* Don't skip any record in the next iteration. */
+ first_rec = 0;
+ }
+
+ return 0;
+}
+
+/* Lookup the node described by KEY in the B+ Tree BTREE. Compare
+ keys using the function COMPARE_KEYS. When a match is found,
+ return the node in MATCHNODE and a pointer to the data in this node
+ in KEYOFFSET. MATCHNODE should be freed by the caller. */
+static grub_err_t
+grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
+ struct grub_hfsplus_key_internal *key,
+ int (*compare_keys) (struct grub_hfsplus_key *keya,
+ struct grub_hfsplus_key_internal *keyb),
+ struct grub_hfsplus_btnode **matchnode, int *keyoffset)
+{
+ grub_uint64_t currnode;
+ char *node;
+ struct grub_hfsplus_btnode *nodedesc;
+ int rec;
+
+ node = grub_malloc (btree->nodesize);
+ if (! node)
+ return grub_errno;
+
+ currnode = btree->root;
+ while (1)
+ {
+ int match = 0;
+
+ /* Read a node. */
+ if (grub_hfsplus_read_file (&btree->file, 0,
+ (long)currnode * (long)btree->nodesize,
+ btree->nodesize, (char *) node) <= 0)
+ {
+ grub_free (node);
+ return grub_error (GRUB_ERR_BAD_FS, "couldn't read i-node");
+ }
+
+ nodedesc = (struct grub_hfsplus_btnode *) node;
+
+ /* Find the record in this tree. */
+ for (rec = 0; rec < grub_be_to_cpu16 (nodedesc->count); rec++)
+ {
+ struct grub_hfsplus_key *currkey;
+ currkey = grub_hfsplus_btree_recptr (btree, nodedesc, rec);
+
+ /* The action that has to be taken depend on the type of
+ record. */
+ if (nodedesc->type == GRUB_HFSPLUS_BTNODE_TYPE_LEAF
+ && compare_keys (currkey, key) == 0)
+ {
+ /* An exact match was found! */
+
+ *matchnode = nodedesc;
+ *keyoffset = rec;
+
+ return 0;
+ }
+ else if (nodedesc->type == GRUB_HFSPLUS_BTNODE_TYPE_INDEX)
+ {
+ grub_uint32_t *pointer;
+
+ /* The place where the key could have been found didn't
+ contain the key. This means that the previous match
+ is the one that should be followed. */
+ if (compare_keys (currkey, key) > 0)
+ break;
+
+ /* Mark the last key which is lower or equal to the key
+ that we are looking for. The last match that is
+ found will be used to locate the child which can
+ contain the record. */
+ pointer = (grub_uint32_t *) ((char *) currkey
+ + grub_be_to_cpu16 (currkey->keylen)
+ + 2);
+ currnode = grub_be_to_cpu32 (*pointer);
+ match = 1;
+ }
+ }
+
+ /* No match is found, no record with this key exists in the
+ tree. */
+ if (! match)
+ {
+ *matchnode = 0;
+ grub_free (node);
+ return 1;
+ }
+ }
+}
+
+static int
+grub_hfsplus_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ int ret = 0;
+
+ auto int list_nodes (void *record);
+ int list_nodes (void *record)
+ {
+ struct grub_hfsplus_catkey *catkey;
+ char *filename;
+ int i;
+ struct grub_fshelp_node *node;
+ struct grub_hfsplus_catfile *fileinfo;
+ enum grub_fshelp_filetype type = GRUB_FSHELP_UNKNOWN;
+
+ catkey = (struct grub_hfsplus_catkey *) record;
+
+ fileinfo =
+ (struct grub_hfsplus_catfile *) ((char *) record
+ + grub_be_to_cpu16 (catkey->keylen)
+ + 2 + (grub_be_to_cpu16(catkey->keylen)
+ % 2));
+
+ /* Stop iterating when the last directory entry is found. */
+ if (grub_be_to_cpu32 (catkey->parent) != dir->fileid)
+ return 1;
+
+ /* Determine the type of the node that is found. */
+ if (grub_be_to_cpu16 (fileinfo->type) == GRUB_HFSPLUS_FILETYPE_REG)
+ {
+ int mode = (grub_be_to_cpu16 (fileinfo->mode)
+ & GRUB_HFSPLUS_FILEMODE_MASK);
+
+ if (mode == GRUB_HFSPLUS_FILEMODE_REG)
+ type = GRUB_FSHELP_REG;
+ else if (mode == GRUB_HFSPLUS_FILEMODE_SYMLINK)
+ type = GRUB_FSHELP_SYMLINK;
+ else
+ type = GRUB_FSHELP_UNKNOWN;
+ }
+ else if (grub_be_to_cpu16 (fileinfo->type) == GRUB_HFSPLUS_FILETYPE_DIR)
+ type = GRUB_FSHELP_DIR;
+
+ if (type == GRUB_FSHELP_UNKNOWN)
+ return 0;
+
+ /* Make sure the byte order of the UTF16 string is correct. */
+ for (i = 0; i < grub_be_to_cpu16 (catkey->namelen); i++)
+ {
+ catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
+
+ /* If the name is obviously invalid, skip this node. */
+ if (catkey->name[i] == 0)
+ return 0;
+ }
+
+ filename = grub_malloc (grub_be_to_cpu16 (catkey->namelen) + 1);
+ if (! filename)
+ return 0;
+
+ if (! grub_utf16_to_utf8 ((grub_uint8_t *) filename, catkey->name,
+ grub_be_to_cpu16 (catkey->namelen)))
+ {
+ grub_free (filename);
+ return 0;
+ }
+
+ filename[grub_be_to_cpu16 (catkey->namelen)] = '\0';
+
+ /* Restore the byte order to what it was previously. */
+ for (i = 0; i < grub_be_to_cpu16 (catkey->namelen); i++)
+ catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
+
+ /* hfs+ is case insensitive. */
+ if (! dir->data->case_sensitive)
+ type |= GRUB_FSHELP_CASE_INSENSITIVE;
+
+ /* Only accept valid nodes. */
+ if (grub_strlen (filename) == grub_be_to_cpu16 (catkey->namelen))
+ {
+ /* A valid node is found; setup the node and call the
+ callback function. */
+ node = grub_malloc (sizeof (*node));
+ node->data = dir->data;
+
+ grub_memcpy (node->extents, fileinfo->data.extents,
+ sizeof (node->extents));
+ node->mtime = grub_be_to_cpu32 (fileinfo->mtime) - 2082844800;
+ node->size = grub_be_to_cpu64 (fileinfo->data.size);
+ node->fileid = grub_be_to_cpu32 (fileinfo->fileid);
+
+ ret = hook (filename, type, node);
+ }
+
+ grub_free (filename);
+
+ return ret;
+ }
+
+ struct grub_hfsplus_key_internal intern;
+ struct grub_hfsplus_btnode *node;
+ int ptr;
+
+ /* Create a key that points to the first entry in the directory. */
+ intern.catkey.parent = dir->fileid;
+ intern.catkey.name = "";
+
+ /* First lookup the first entry. */
+ if (grub_hfsplus_btree_search (&dir->data->catalog_tree, &intern,
+ grub_hfsplus_cmp_catkey, &node, &ptr))
+ return 0;
+
+ /* Iterate over all entries in this directory. */
+ grub_hfsplus_btree_iterate_node (&dir->data->catalog_tree, node, ptr,
+ list_nodes);
+
+ grub_free (node);
+
+ return ret;
+}
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_hfsplus_open (struct grub_file *file, const char *name)
+{
+ struct grub_hfsplus_data *data;
+ struct grub_fshelp_node *fdiro = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_hfsplus_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (name, &data->dirroot, &fdiro,
+ grub_hfsplus_iterate_dir,
+ grub_hfsplus_read_symlink, GRUB_FSHELP_REG);
+ if (grub_errno)
+ goto fail;
+
+ file->size = fdiro->size;
+ data->opened_file = *fdiro;
+ grub_free (fdiro);
+
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+ fail:
+ if (data && fdiro != &data->dirroot)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_hfsplus_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+
+/* Read LEN bytes data from FILE into BUF. */
+static grub_ssize_t
+grub_hfsplus_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_hfsplus_data *data =
+ (struct grub_hfsplus_data *) file->data;
+
+ int size = grub_hfsplus_read_file (&data->opened_file, file->read_hook,
+ file->offset, len, buf);
+
+ return size;
+}
+
+
+static grub_err_t
+grub_hfsplus_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_hfsplus_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ info.mtimeset = 1;
+ info.mtime = node->mtime;
+ info.case_insensitive = !! (filetype & GRUB_FSHELP_CASE_INSENSITIVE);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_hfsplus_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ /* Find the directory that should be opened. */
+ grub_fshelp_find_file (path, &data->dirroot, &fdiro,
+ grub_hfsplus_iterate_dir,
+ grub_hfsplus_read_symlink, GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+
+ /* Iterate over all entries in this directory. */
+ grub_hfsplus_iterate_dir (fdiro, iterate);
+
+ fail:
+ if (data && fdiro != &data->dirroot)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_hfsplus_label (grub_device_t device __attribute__((unused))
+ , char **label __attribute__((unused)))
+{
+ /* XXX: It's not documented how to read a label. */
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "reading the label of a HFS+ "
+ "partition is not implemented");
+}
+
+/* Get mtime. */
+static grub_err_t
+grub_hfsplus_mtime (grub_device_t device, grub_int32_t *tm)
+{
+ struct grub_hfsplus_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_hfsplus_mount (disk);
+ if (!data)
+ *tm = 0;
+ else
+ *tm = grub_be_to_cpu32 (data->volheader.utime) - 2082844800;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+
+}
+
+static grub_err_t
+grub_hfsplus_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_hfsplus_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_hfsplus_mount (disk);
+ if (data)
+ {
+ *uuid = grub_xasprintf ("%016llx",
+ (unsigned long long)
+ grub_be_to_cpu64 (data->volheader.num_serial));
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+
+static struct grub_fs grub_hfsplus_fs =
+ {
+ .name = "hfsplus",
+ .dir = grub_hfsplus_dir,
+ .open = grub_hfsplus_open,
+ .read = grub_hfsplus_read,
+ .close = grub_hfsplus_close,
+ .label = grub_hfsplus_label,
+ .mtime = grub_hfsplus_mtime,
+ .uuid = grub_hfsplus_uuid,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 1,
+#endif
+ .next = 0
+ };
+
+GRUB_MOD_INIT(hfsplus)
+{
+ grub_fs_register (&grub_hfsplus_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(hfsplus)
+{
+ grub_fs_unregister (&grub_hfsplus_fs);
+}
diff --git a/grub-core/fs/i386/pc/pxe.c b/grub-core/fs/i386/pc/pxe.c
new file mode 100644
index 0000000..4304881
--- /dev/null
+++ b/grub-core/fs/i386/pc/pxe.c
@@ -0,0 +1,652 @@
+/* pxe.c - Driver to provide access to the pxe filesystem */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/fs.h>
+#include <grub/mm.h>
+#include <grub/disk.h>
+#include <grub/file.h>
+#include <grub/misc.h>
+#include <grub/bufio.h>
+#include <grub/env.h>
+
+#include <grub/machine/pxe.h>
+#include <grub/machine/int.h>
+#include <grub/machine/memory.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define SEGMENT(x) ((x) >> 4)
+#define OFFSET(x) ((x) & 0xF)
+#define SEGOFS(x) ((SEGMENT(x) << 16) + OFFSET(x))
+#define LINEAR(x) (void *) (((x >> 16) <<4) + (x & 0xFFFF))
+
+struct grub_pxe_disk_data
+{
+ grub_uint32_t server_ip;
+ grub_uint32_t gateway_ip;
+};
+
+struct grub_pxe_bangpxe *grub_pxe_pxenv;
+static grub_uint32_t grub_pxe_your_ip;
+static grub_uint32_t grub_pxe_default_server_ip;
+static grub_uint32_t grub_pxe_default_gateway_ip;
+static unsigned grub_pxe_blksize = GRUB_PXE_MIN_BLKSIZE;
+
+static grub_file_t curr_file = 0;
+
+struct grub_pxe_data
+{
+ grub_uint32_t packet_number;
+ grub_uint32_t block_size;
+ char filename[0];
+};
+
+static grub_uint32_t pxe_rm_entry = 0;
+
+static struct grub_pxe_bangpxe *
+grub_pxe_scan (void)
+{
+ struct grub_bios_int_registers regs;
+ struct grub_pxenv *pxenv;
+ struct grub_pxe_bangpxe *bangpxe;
+
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+
+ regs.ebx = 0;
+ regs.ecx = 0;
+ regs.eax = 0x5650;
+ regs.es = 0;
+
+ grub_bios_interrupt (0x1a, &regs);
+
+ if ((regs.eax & 0xffff) != 0x564e)
+ return NULL;
+
+ pxenv = (struct grub_pxenv *) ((regs.es << 4) + (regs.ebx & 0xffff));
+ if (grub_memcmp (pxenv->signature, GRUB_PXE_SIGNATURE,
+ sizeof (pxenv->signature))
+ != 0)
+ return NULL;
+
+ if (pxenv->version < 0x201)
+ return NULL;
+
+ bangpxe = (void *) ((((pxenv->pxe_ptr & 0xffff0000) >> 16) << 4)
+ + (pxenv->pxe_ptr & 0xffff));
+
+ if (!bangpxe)
+ return NULL;
+
+ if (grub_memcmp (bangpxe->signature, GRUB_PXE_BANGPXE_SIGNATURE,
+ sizeof (bangpxe->signature)) != 0)
+ return NULL;
+
+ pxe_rm_entry = bangpxe->rm_entry;
+
+ return bangpxe;
+}
+
+static int
+grub_pxe_iterate (int (*hook) (const char *name))
+{
+ if (hook ("pxe"))
+ return 1;
+ return 0;
+}
+
+static grub_err_t
+parse_ip (const char *val, grub_uint32_t *ip, const char **rest)
+{
+ grub_uint32_t newip = 0;
+ unsigned long t;
+ int i;
+ const char *ptr = val;
+
+ for (i = 0; i < 4; i++)
+ {
+ t = grub_strtoul (ptr, (char **) &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ if (t & ~0xff)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "Invalid IP.");
+ newip >>= 8;
+ newip |= (t << 24);
+ if (i != 3 && *ptr != '.')
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "Invalid IP.");
+ ptr++;
+ }
+ *ip = newip;
+ if (rest)
+ *rest = ptr - 1;
+ return 0;
+}
+
+static grub_err_t
+grub_pxe_open (const char *name, grub_disk_t disk)
+{
+ struct grub_pxe_disk_data *data;
+
+ if (grub_strcmp (name, "pxe") != 0
+ && grub_strncmp (name, "pxe:", sizeof ("pxe:") - 1) != 0)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a pxe disk");
+
+ data = grub_malloc (sizeof (*data));
+ if (!data)
+ return grub_errno;
+
+ if (grub_strncmp (name, "pxe:", sizeof ("pxe:") - 1) == 0)
+ {
+ const char *ptr;
+ grub_err_t err;
+
+ ptr = name + sizeof ("pxe:") - 1;
+ err = parse_ip (ptr, &(data->server_ip), &ptr);
+ if (err)
+ return err;
+ if (*ptr == ':')
+ {
+ err = parse_ip (ptr + 1, &(data->gateway_ip), 0);
+ if (err)
+ return err;
+ }
+ else
+ data->gateway_ip = grub_pxe_default_gateway_ip;
+ }
+ else
+ {
+ data->server_ip = grub_pxe_default_server_ip;
+ data->gateway_ip = grub_pxe_default_gateway_ip;
+ }
+
+ disk->total_sectors = 0;
+ disk->id = (unsigned long) data;
+
+ disk->data = data;
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_pxe_close (grub_disk_t disk)
+{
+ grub_free (disk->data);
+}
+
+static grub_err_t
+grub_pxe_read (grub_disk_t disk __attribute((unused)),
+ grub_disk_addr_t sector __attribute((unused)),
+ grub_size_t size __attribute((unused)),
+ char *buf __attribute((unused)))
+{
+ return GRUB_ERR_OUT_OF_RANGE;
+}
+
+static grub_err_t
+grub_pxe_write (grub_disk_t disk __attribute((unused)),
+ grub_disk_addr_t sector __attribute((unused)),
+ grub_size_t size __attribute((unused)),
+ const char *buf __attribute((unused)))
+{
+ return GRUB_ERR_OUT_OF_RANGE;
+}
+
+static struct grub_disk_dev grub_pxe_dev =
+ {
+ .name = "pxe",
+ .id = GRUB_DISK_DEVICE_PXE_ID,
+ .iterate = grub_pxe_iterate,
+ .open = grub_pxe_open,
+ .close = grub_pxe_close,
+ .read = grub_pxe_read,
+ .write = grub_pxe_write,
+ .next = 0
+ };
+
+static grub_err_t
+grub_pxefs_dir (grub_device_t device,
+ const char *path __attribute__ ((unused)),
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info)
+ __attribute__ ((unused)))
+{
+ if (device->disk->dev->id != GRUB_DISK_DEVICE_PXE_ID)
+ return grub_error (GRUB_ERR_BAD_FS, "not a pxe disk");
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_pxefs_open (struct grub_file *file, const char *name)
+{
+ union
+ {
+ struct grub_pxenv_tftp_get_fsize c1;
+ struct grub_pxenv_tftp_open c2;
+ } c;
+ struct grub_pxe_data *data;
+ struct grub_pxe_disk_data *disk_data = file->device->disk->data;
+ grub_file_t file_int, bufio;
+
+ if (file->device->disk->dev->id != GRUB_DISK_DEVICE_PXE_ID)
+ return grub_error (GRUB_ERR_BAD_FS, "not a pxe disk");
+
+ if (curr_file != 0)
+ {
+ grub_pxe_call (GRUB_PXENV_TFTP_CLOSE, &c.c2, pxe_rm_entry);
+ curr_file = 0;
+ }
+
+ c.c1.server_ip = disk_data->server_ip;
+ c.c1.gateway_ip = disk_data->gateway_ip;
+ grub_strcpy ((char *)&c.c1.filename[0], name);
+ grub_pxe_call (GRUB_PXENV_TFTP_GET_FSIZE, &c.c1, pxe_rm_entry);
+ if (c.c1.status)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+
+ file->size = c.c1.file_size;
+
+ c.c2.tftp_port = grub_cpu_to_be16 (GRUB_PXE_TFTP_PORT);
+ c.c2.packet_size = grub_pxe_blksize;
+ grub_pxe_call (GRUB_PXENV_TFTP_OPEN, &c.c2, pxe_rm_entry);
+ if (c.c2.status)
+ return grub_error (GRUB_ERR_BAD_FS, "open fails");
+
+ data = grub_zalloc (sizeof (struct grub_pxe_data) + grub_strlen (name) + 1);
+ if (! data)
+ return grub_errno;
+
+ data->block_size = c.c2.packet_size;
+ grub_strcpy (data->filename, name);
+
+ file_int = grub_malloc (sizeof (*file_int));
+ if (! file_int)
+ {
+ grub_free (data);
+ return grub_errno;
+ }
+
+ file->data = data;
+ file->not_easily_seekable = 1;
+ grub_memcpy (file_int, file, sizeof (struct grub_file));
+ curr_file = file_int;
+
+ bufio = grub_bufio_open (file_int, data->block_size);
+ if (! bufio)
+ {
+ grub_free (file_int);
+ grub_free (data);
+ return grub_errno;
+ }
+
+ grub_memcpy (file, bufio, sizeof (struct grub_file));
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_ssize_t
+grub_pxefs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_pxenv_tftp_read c;
+ struct grub_pxe_data *data;
+ struct grub_pxe_disk_data *disk_data = file->device->disk->data;
+ grub_uint32_t pn, r;
+
+ data = file->data;
+
+ pn = grub_divmod64 (file->offset, data->block_size, &r);
+ if (r)
+ {
+ grub_error (GRUB_ERR_BAD_FS,
+ "read access must be aligned to packet size");
+ return -1;
+ }
+
+ if ((curr_file != file) || (data->packet_number > pn))
+ {
+ struct grub_pxenv_tftp_open o;
+
+ if (curr_file != 0)
+ grub_pxe_call (GRUB_PXENV_TFTP_CLOSE, &o, pxe_rm_entry);
+
+ o.server_ip = disk_data->server_ip;
+ o.gateway_ip = disk_data->gateway_ip;
+ grub_strcpy ((char *)&o.filename[0], data->filename);
+ o.tftp_port = grub_cpu_to_be16 (GRUB_PXE_TFTP_PORT);
+ o.packet_size = data->block_size;
+ grub_pxe_call (GRUB_PXENV_TFTP_OPEN, &o, pxe_rm_entry);
+ if (o.status)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "open fails");
+ return -1;
+ }
+ data->block_size = o.packet_size;
+ data->packet_number = 0;
+ curr_file = file;
+ }
+
+ c.buffer = SEGOFS (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);
+ while (pn >= data->packet_number)
+ {
+ c.buffer_size = data->block_size;
+ grub_pxe_call (GRUB_PXENV_TFTP_READ, &c, pxe_rm_entry);
+ if (c.status)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "read fails");
+ return -1;
+ }
+ data->packet_number++;
+ }
+
+ grub_memcpy (buf, (char *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR, len);
+
+ return len;
+}
+
+static grub_err_t
+grub_pxefs_close (grub_file_t file)
+{
+ struct grub_pxenv_tftp_close c;
+
+ if (curr_file == file)
+ {
+ grub_pxe_call (GRUB_PXENV_TFTP_CLOSE, &c, pxe_rm_entry);
+ curr_file = 0;
+ }
+
+ grub_free (file->data);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_pxefs_label (grub_device_t device __attribute ((unused)),
+ char **label __attribute ((unused)))
+{
+ *label = 0;
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_fs grub_pxefs_fs =
+ {
+ .name = "pxefs",
+ .dir = grub_pxefs_dir,
+ .open = grub_pxefs_open,
+ .read = grub_pxefs_read,
+ .close = grub_pxefs_close,
+ .label = grub_pxefs_label,
+ .next = 0
+ };
+
+static char *
+grub_env_write_readonly (struct grub_env_var *var __attribute__ ((unused)),
+ const char *val __attribute__ ((unused)))
+{
+ return NULL;
+}
+
+static void
+set_mac_env (grub_uint8_t *mac_addr, grub_size_t mac_len)
+{
+ char buf[(sizeof ("XX:") - 1) * mac_len + 1];
+ char *ptr = buf;
+ unsigned i;
+
+ for (i = 0; i < mac_len; i++)
+ {
+ grub_snprintf (ptr, sizeof (buf) - (ptr - buf),
+ "%02x:", mac_addr[i] & 0xff);
+ ptr += (sizeof ("XX:") - 1);
+ }
+ if (mac_len)
+ *(ptr - 1) = 0;
+ else
+ buf[0] = 0;
+
+ grub_env_set ("net_pxe_mac", buf);
+ /* XXX: Is it possible to change MAC in PXE? */
+ grub_register_variable_hook ("net_pxe_mac", 0, grub_env_write_readonly);
+ grub_env_export ("net_pxe_mac");
+}
+
+static void
+set_env_limn_ro (const char *varname, char *value, grub_size_t len)
+{
+ char c;
+ c = value[len];
+ value[len] = 0;
+ grub_env_set (varname, value);
+ value[len] = c;
+ grub_register_variable_hook (varname, 0, grub_env_write_readonly);
+ grub_env_export (varname);
+}
+
+static void
+parse_dhcp_vendor (void *vend, int limit)
+{
+ grub_uint8_t *ptr, *ptr0;
+
+ ptr = ptr0 = vend;
+
+ if (grub_be_to_cpu32 (*(grub_uint32_t *) ptr) != 0x63825363)
+ return;
+ ptr = ptr + sizeof (grub_uint32_t);
+ while (ptr - ptr0 < limit)
+ {
+ grub_uint8_t tagtype;
+ grub_uint8_t taglength;
+
+ tagtype = *ptr++;
+
+ /* Pad tag. */
+ if (tagtype == 0)
+ continue;
+
+ /* End tag. */
+ if (tagtype == 0xff)
+ return;
+
+ taglength = *ptr++;
+
+ switch (tagtype)
+ {
+ case 12:
+ set_env_limn_ro ("net_pxe_hostname", (char *) ptr, taglength);
+ break;
+
+ case 15:
+ set_env_limn_ro ("net_pxe_domain", (char *) ptr, taglength);
+ break;
+
+ case 17:
+ set_env_limn_ro ("net_pxe_rootpath", (char *) ptr, taglength);
+ break;
+
+ case 18:
+ set_env_limn_ro ("net_pxe_extensionspath", (char *) ptr, taglength);
+ break;
+
+ /* If you need any other options please contact GRUB
+ development team. */
+ }
+
+ ptr += taglength;
+ }
+}
+
+static void
+grub_pxe_detect (void)
+{
+ struct grub_pxe_bangpxe *pxenv;
+ struct grub_pxenv_get_cached_info ci;
+ struct grub_pxenv_boot_player *bp;
+
+ pxenv = grub_pxe_scan ();
+ if (! pxenv)
+ return;
+
+ ci.packet_type = GRUB_PXENV_PACKET_TYPE_DHCP_ACK;
+ ci.buffer = 0;
+ ci.buffer_size = 0;
+ grub_pxe_call (GRUB_PXENV_GET_CACHED_INFO, &ci, pxe_rm_entry);
+ if (ci.status)
+ return;
+
+ bp = LINEAR (ci.buffer);
+
+ grub_pxe_your_ip = bp->your_ip;
+ grub_pxe_default_server_ip = bp->server_ip;
+ grub_pxe_default_gateway_ip = bp->gateway_ip;
+ set_mac_env (bp->mac_addr, bp->hw_len < sizeof (bp->mac_addr) ? bp->hw_len
+ : sizeof (bp->mac_addr));
+ set_env_limn_ro ("net_pxe_boot_file", (char *) bp->boot_file,
+ sizeof (bp->boot_file));
+ set_env_limn_ro ("net_pxe_dhcp_server_name", (char *) bp->server_name,
+ sizeof (bp->server_name));
+ parse_dhcp_vendor (&bp->vendor, sizeof (bp->vendor));
+ grub_pxe_pxenv = pxenv;
+}
+
+void
+grub_pxe_unload (void)
+{
+ if (grub_pxe_pxenv)
+ {
+ grub_fs_unregister (&grub_pxefs_fs);
+ grub_disk_dev_unregister (&grub_pxe_dev);
+
+ grub_pxe_pxenv = 0;
+ }
+}
+
+static void
+set_ip_env (char *varname, grub_uint32_t ip)
+{
+ char buf[sizeof ("XXX.XXX.XXX.XXX")];
+
+ grub_snprintf (buf, sizeof (buf), "%d.%d.%d.%d", (ip & 0xff),
+ (ip >> 8) & 0xff, (ip >> 16) & 0xff, (ip >> 24) & 0xff);
+ grub_env_set (varname, buf);
+}
+
+static char *
+write_ip_env (grub_uint32_t *ip, const char *val)
+{
+ char *buf;
+ grub_err_t err;
+ grub_uint32_t newip;
+
+ err = parse_ip (val, &newip, 0);
+ if (err)
+ return 0;
+
+ /* Normalize the IP. */
+ buf = grub_xasprintf ("%d.%d.%d.%d", (newip & 0xff), (newip >> 8) & 0xff,
+ (newip >> 16) & 0xff, (newip >> 24) & 0xff);
+ if (!buf)
+ return 0;
+
+ *ip = newip;
+
+ return buf;
+}
+
+static char *
+grub_env_write_pxe_default_server (struct grub_env_var *var
+ __attribute__ ((unused)),
+ const char *val)
+{
+ return write_ip_env (&grub_pxe_default_server_ip, val);
+}
+
+static char *
+grub_env_write_pxe_default_gateway (struct grub_env_var *var
+ __attribute__ ((unused)),
+ const char *val)
+{
+ return write_ip_env (&grub_pxe_default_gateway_ip, val);
+}
+
+static char *
+grub_env_write_pxe_blocksize (struct grub_env_var *var __attribute__ ((unused)),
+ const char *val)
+{
+ unsigned size;
+ char *buf;
+
+ size = grub_strtoul (val, 0, 0);
+ if (grub_errno)
+ return 0;
+
+ if (size < GRUB_PXE_MIN_BLKSIZE)
+ size = GRUB_PXE_MIN_BLKSIZE;
+ else if (size > GRUB_PXE_MAX_BLKSIZE)
+ size = GRUB_PXE_MAX_BLKSIZE;
+
+ buf = grub_xasprintf ("%d", size);
+ if (!buf)
+ return 0;
+
+ grub_pxe_blksize = size;
+
+ return buf;
+}
+
+
+GRUB_MOD_INIT(pxe)
+{
+ grub_pxe_detect ();
+ if (grub_pxe_pxenv)
+ {
+ char *buf;
+
+ buf = grub_xasprintf ("%d", grub_pxe_blksize);
+ if (buf)
+ grub_env_set ("pxe_blksize", buf);
+ grub_free (buf);
+
+ set_ip_env ("pxe_default_server", grub_pxe_default_server_ip);
+ set_ip_env ("pxe_default_gateway", grub_pxe_default_gateway_ip);
+ set_ip_env ("net_pxe_ip", grub_pxe_your_ip);
+ grub_register_variable_hook ("pxe_default_server", 0,
+ grub_env_write_pxe_default_server);
+ grub_register_variable_hook ("pxe_default_gateway", 0,
+ grub_env_write_pxe_default_gateway);
+
+
+ /* XXX: Is it possible to change IP in PXE? */
+ grub_register_variable_hook ("net_pxe_ip", 0,
+ grub_env_write_readonly);
+ grub_register_variable_hook ("pxe_blksize", 0,
+ grub_env_write_pxe_blocksize);
+
+ grub_env_export ("pxe_default_server");
+ grub_env_export ("pxe_default_gateway");
+ grub_env_export ("net_pxe_ip");
+ grub_env_export ("pxe_blksize");
+
+ grub_disk_dev_register (&grub_pxe_dev);
+ grub_fs_register (&grub_pxefs_fs);
+ }
+}
+
+GRUB_MOD_FINI(pxe)
+{
+ grub_pxe_unload ();
+}
diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c
new file mode 100644
index 0000000..a9a17fe
--- /dev/null
+++ b/grub-core/fs/iso9660.c
@@ -0,0 +1,908 @@
+/* iso9660.c - iso9660 implementation with extensions:
+ SUSP, Rock Ridge. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+#include <grub/charset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_ISO9660_FSTYPE_DIR 0040000
+#define GRUB_ISO9660_FSTYPE_REG 0100000
+#define GRUB_ISO9660_FSTYPE_SYMLINK 0120000
+#define GRUB_ISO9660_FSTYPE_MASK 0170000
+
+#define GRUB_ISO9660_LOG2_BLKSZ 2
+#define GRUB_ISO9660_BLKSZ 2048
+
+#define GRUB_ISO9660_RR_DOT 2
+#define GRUB_ISO9660_RR_DOTDOT 4
+
+#define GRUB_ISO9660_VOLDESC_BOOT 0
+#define GRUB_ISO9660_VOLDESC_PRIMARY 1
+#define GRUB_ISO9660_VOLDESC_SUPP 2
+#define GRUB_ISO9660_VOLDESC_PART 3
+#define GRUB_ISO9660_VOLDESC_END 255
+
+/* The head of a volume descriptor. */
+struct grub_iso9660_voldesc
+{
+ grub_uint8_t type;
+ grub_uint8_t magic[5];
+ grub_uint8_t version;
+} __attribute__ ((packed));
+
+/* A directory entry. */
+struct grub_iso9660_dir
+{
+ grub_uint8_t len;
+ grub_uint8_t ext_sectors;
+ grub_uint32_t first_sector;
+ grub_uint32_t first_sector_be;
+ grub_uint32_t size;
+ grub_uint32_t size_be;
+ grub_uint8_t unused1[7];
+ grub_uint8_t flags;
+ grub_uint8_t unused2[6];
+ grub_uint8_t namelen;
+} __attribute__ ((packed));
+
+struct grub_iso9660_date
+{
+ grub_uint8_t year[4];
+ grub_uint8_t month[2];
+ grub_uint8_t day[2];
+ grub_uint8_t hour[2];
+ grub_uint8_t minute[2];
+ grub_uint8_t second[2];
+ grub_uint8_t hundredth[2];
+ grub_uint8_t offset;
+} __attribute__ ((packed));
+
+/* The primary volume descriptor. Only little endian is used. */
+struct grub_iso9660_primary_voldesc
+{
+ struct grub_iso9660_voldesc voldesc;
+ grub_uint8_t unused1[33];
+ grub_uint8_t volname[32];
+ grub_uint8_t unused2[16];
+ grub_uint8_t escape[32];
+ grub_uint8_t unused3[12];
+ grub_uint32_t path_table_size;
+ grub_uint8_t unused4[4];
+ grub_uint32_t path_table;
+ grub_uint8_t unused5[12];
+ struct grub_iso9660_dir rootdir;
+ grub_uint8_t unused6[624];
+ struct grub_iso9660_date created;
+ struct grub_iso9660_date modified;
+} __attribute__ ((packed));
+
+/* A single entry in the path table. */
+struct grub_iso9660_path
+{
+ grub_uint8_t len;
+ grub_uint8_t sectors;
+ grub_uint32_t first_sector;
+ grub_uint16_t parentdir;
+ grub_uint8_t name[0];
+} __attribute__ ((packed));
+
+/* An entry in the System Usage area of the directory entry. */
+struct grub_iso9660_susp_entry
+{
+ grub_uint8_t sig[2];
+ grub_uint8_t len;
+ grub_uint8_t version;
+ grub_uint8_t data[0];
+} __attribute__ ((packed));
+
+/* The CE entry. This is used to describe the next block where data
+ can be found. */
+struct grub_iso9660_susp_ce
+{
+ struct grub_iso9660_susp_entry entry;
+ grub_uint32_t blk;
+ grub_uint32_t blk_be;
+ grub_uint32_t off;
+ grub_uint32_t off_be;
+ grub_uint32_t len;
+ grub_uint32_t len_be;
+} __attribute__ ((packed));
+
+struct grub_iso9660_data
+{
+ struct grub_iso9660_primary_voldesc voldesc;
+ grub_disk_t disk;
+ unsigned int first_sector;
+ int rockridge;
+ int susp_skip;
+ int joliet;
+};
+
+struct grub_fshelp_node
+{
+ struct grub_iso9660_data *data;
+ unsigned int size;
+ unsigned int blk;
+ unsigned int dir_blk;
+ unsigned int dir_off;
+};
+
+static grub_dl_t my_mod;
+
+
+/* Iterate over the susp entries, starting with block SUA_BLOCK on the
+ offset SUA_POS with a size of SUA_SIZE bytes. Hook is called for
+ every entry. */
+static grub_err_t
+grub_iso9660_susp_iterate (struct grub_iso9660_data *data,
+ int sua_block, int sua_pos, int sua_size,
+ grub_err_t (*hook)
+ (struct grub_iso9660_susp_entry *entry))
+{
+ char *sua;
+ struct grub_iso9660_susp_entry *entry;
+
+ auto grub_err_t load_sua (void);
+
+ /* Load a part of the System Usage Area. */
+ grub_err_t load_sua (void)
+ {
+ sua = grub_malloc (sua_size);
+ if (!sua)
+ return grub_errno;
+
+ if (grub_disk_read (data->disk, sua_block, sua_pos,
+ sua_size, sua))
+ return grub_errno;
+
+ entry = (struct grub_iso9660_susp_entry *) sua;
+ return 0;
+ }
+
+ if (load_sua ())
+ return grub_errno;
+
+ for (; (char *) entry < (char *) sua + sua_size - 1;
+ entry = (struct grub_iso9660_susp_entry *)
+ ((char *) entry + entry->len))
+ {
+ /* The last entry. */
+ if (grub_strncmp ((char *) entry->sig, "ST", 2) == 0)
+ break;
+
+ /* Additional entries are stored elsewhere. */
+ if (grub_strncmp ((char *) entry->sig, "CE", 2) == 0)
+ {
+ struct grub_iso9660_susp_ce *ce;
+
+ ce = (struct grub_iso9660_susp_ce *) entry;
+ sua_size = grub_le_to_cpu32 (ce->len);
+ sua_pos = grub_le_to_cpu32 (ce->off);
+ sua_block = grub_le_to_cpu32 (ce->blk) << GRUB_ISO9660_LOG2_BLKSZ;
+
+ grub_free (sua);
+ if (load_sua ())
+ return grub_errno;
+ }
+
+ if (hook (entry))
+ {
+ grub_free (sua);
+ return 0;
+ }
+ }
+
+ grub_free (sua);
+ return 0;
+}
+
+static char *
+grub_iso9660_convert_string (grub_uint16_t *us, int len)
+{
+ char *p;
+ int i;
+
+ p = grub_malloc (len * 4 + 1);
+ if (! p)
+ return p;
+
+ for (i=0; i<len; i++)
+ us[i] = grub_be_to_cpu16 (us[i]);
+
+ *grub_utf16_to_utf8 ((grub_uint8_t *) p, us, len) = '\0';
+
+ return p;
+}
+
+static struct grub_iso9660_data *
+grub_iso9660_mount (grub_disk_t disk)
+{
+ struct grub_iso9660_data *data = 0;
+ struct grub_iso9660_dir rootdir;
+ int sua_pos;
+ int sua_size;
+ char *sua;
+ struct grub_iso9660_susp_entry *entry;
+ struct grub_iso9660_primary_voldesc voldesc;
+ int block;
+
+ auto grub_err_t susp_iterate (struct grub_iso9660_susp_entry *);
+
+ grub_err_t susp_iterate (struct grub_iso9660_susp_entry *susp_entry)
+ {
+ /* The "ER" entry is used to detect extensions. The
+ `IEEE_P1285' extension means Rock ridge. */
+ if (grub_strncmp ((char *) susp_entry->sig, "ER", 2) == 0)
+ {
+ data->rockridge = 1;
+ return 1;
+ }
+ return 0;
+ }
+
+ data = grub_zalloc (sizeof (struct grub_iso9660_data));
+ if (! data)
+ return 0;
+
+ data->disk = disk;
+
+ block = 16;
+ do
+ {
+ int copy_voldesc = 0;
+
+ /* Read the superblock. */
+ if (grub_disk_read (disk, block << GRUB_ISO9660_LOG2_BLKSZ, 0,
+ sizeof (struct grub_iso9660_primary_voldesc),
+ (char *) &voldesc))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
+ goto fail;
+ }
+
+ if (grub_strncmp ((char *) voldesc.voldesc.magic, "CD001", 5) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
+ goto fail;
+ }
+
+ if (voldesc.voldesc.type == GRUB_ISO9660_VOLDESC_PRIMARY)
+ copy_voldesc = 1;
+ else if ((voldesc.voldesc.type == GRUB_ISO9660_VOLDESC_SUPP) &&
+ (voldesc.escape[0] == 0x25) && (voldesc.escape[1] == 0x2f) &&
+ ((voldesc.escape[2] == 0x40) || /* UCS-2 Level 1. */
+ (voldesc.escape[2] == 0x43) || /* UCS-2 Level 2. */
+ (voldesc.escape[2] == 0x45))) /* UCS-2 Level 3. */
+ {
+ copy_voldesc = 1;
+ data->joliet = 1;
+ }
+
+ if (copy_voldesc)
+ grub_memcpy((char *) &data->voldesc, (char *) &voldesc,
+ sizeof (struct grub_iso9660_primary_voldesc));
+
+ block++;
+ } while (voldesc.voldesc.type != GRUB_ISO9660_VOLDESC_END);
+
+ /* Read the system use area and test it to see if SUSP is
+ supported. */
+ if (grub_disk_read (disk, (grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
+ << GRUB_ISO9660_LOG2_BLKSZ), 0,
+ sizeof (rootdir), (char *) &rootdir))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
+ goto fail;
+ }
+
+ sua_pos = (sizeof (rootdir) + rootdir.namelen
+ + (rootdir.namelen % 2) - 1);
+ sua_size = rootdir.len - sua_pos;
+
+ sua = grub_malloc (sua_size);
+ if (! sua)
+ goto fail;
+
+ if (grub_disk_read (disk, (grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
+ << GRUB_ISO9660_LOG2_BLKSZ), sua_pos,
+ sua_size, sua))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem");
+ goto fail;
+ }
+
+ entry = (struct grub_iso9660_susp_entry *) sua;
+
+ /* Test if the SUSP protocol is used on this filesystem. */
+ if (grub_strncmp ((char *) entry->sig, "SP", 2) == 0)
+ {
+ /* The 2nd data byte stored how many bytes are skipped every time
+ to get to the SUA (System Usage Area). */
+ data->susp_skip = entry->data[2];
+ entry = (struct grub_iso9660_susp_entry *) ((char *) entry + entry->len);
+
+ /* Iterate over the entries in the SUA area to detect
+ extensions. */
+ if (grub_iso9660_susp_iterate (data,
+ (grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
+ << GRUB_ISO9660_LOG2_BLKSZ),
+ sua_pos, sua_size, susp_iterate))
+ goto fail;
+ }
+
+ return data;
+
+ fail:
+ grub_free (data);
+ return 0;
+}
+
+
+static char *
+grub_iso9660_read_symlink (grub_fshelp_node_t node)
+{
+ struct grub_iso9660_dir dirent;
+ int sua_off;
+ int sua_size;
+ char *symlink = 0;
+ int addslash = 0;
+
+ auto void add_part (const char *part, int len);
+ auto grub_err_t susp_iterate_sl (struct grub_iso9660_susp_entry *);
+
+ /* Extend the symlink. */
+ void add_part (const char *part, int len)
+ {
+ int size = grub_strlen (symlink);
+
+ symlink = grub_realloc (symlink, size + len + 1);
+ if (! symlink)
+ return;
+
+ grub_strncat (symlink, part, len);
+ }
+
+ /* Read in a symlink. */
+ grub_err_t susp_iterate_sl (struct grub_iso9660_susp_entry *entry)
+ {
+ if (grub_strncmp ("SL", (char *) entry->sig, 2) == 0)
+ {
+ unsigned int pos = 1;
+
+ /* The symlink is not stored as a POSIX symlink, translate it. */
+ while (pos < grub_le_to_cpu32 (entry->len))
+ {
+ if (addslash)
+ {
+ add_part ("/", 1);
+ addslash = 0;
+ }
+
+ /* The current position is the `Component Flag'. */
+ switch (entry->data[pos] & 30)
+ {
+ case 0:
+ {
+ /* The data on pos + 2 is the actual data, pos + 1
+ is the length. Both are part of the `Component
+ Record'. */
+ add_part ((char *) &entry->data[pos + 2],
+ entry->data[pos + 1]);
+ if ((entry->data[pos] & 1))
+ addslash = 1;
+
+ break;
+ }
+
+ case 2:
+ add_part ("./", 2);
+ break;
+
+ case 4:
+ add_part ("../", 3);
+ break;
+
+ case 8:
+ add_part ("/", 1);
+ break;
+ }
+ /* In pos + 1 the length of the `Component Record' is
+ stored. */
+ pos += entry->data[pos + 1] + 2;
+ }
+
+ /* Check if `grub_realloc' failed. */
+ if (grub_errno)
+ return grub_errno;
+ }
+
+ return 0;
+ }
+
+ if (grub_disk_read (node->data->disk, node->dir_blk, node->dir_off,
+ sizeof (dirent), (char *) &dirent))
+ return 0;
+
+ sua_off = (sizeof (dirent) + dirent.namelen + 1 - (dirent.namelen % 2)
+ + node->data->susp_skip);
+ sua_size = dirent.len - sua_off;
+
+ symlink = grub_malloc (1);
+ if (!symlink)
+ return 0;
+
+ *symlink = '\0';
+
+ if (grub_iso9660_susp_iterate (node->data, node->dir_blk,
+ node->dir_off + sua_off,
+ sua_size, susp_iterate_sl))
+ {
+ grub_free (symlink);
+ return 0;
+ }
+
+ return symlink;
+}
+
+
+static int
+grub_iso9660_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ struct grub_iso9660_dir dirent;
+ unsigned int offset = 0;
+ char *filename;
+ int filename_alloc = 0;
+ enum grub_fshelp_filetype type;
+
+ auto grub_err_t susp_iterate_dir (struct grub_iso9660_susp_entry *);
+
+ grub_err_t susp_iterate_dir (struct grub_iso9660_susp_entry *entry)
+ {
+ /* The filename in the rock ridge entry. */
+ if (grub_strncmp ("NM", (char *) entry->sig, 2) == 0)
+ {
+ /* The flags are stored at the data position 0, here the
+ filename type is stored. */
+ if (entry->data[0] & GRUB_ISO9660_RR_DOT)
+ filename = ".";
+ else if (entry->data[0] & GRUB_ISO9660_RR_DOTDOT)
+ filename = "..";
+ else
+ {
+ int size = 1;
+ if (filename)
+ {
+ size += grub_strlen (filename);
+ grub_realloc (filename,
+ grub_strlen (filename)
+ + entry->len);
+ }
+ else
+ {
+ size = entry->len - 5;
+ filename = grub_zalloc (size + 1);
+ }
+ filename_alloc = 1;
+ grub_strncpy (filename, (char *) &entry->data[1], size);
+ filename[size] = '\0';
+ }
+ }
+ /* The mode information (st_mode). */
+ else if (grub_strncmp ((char *) entry->sig, "PX", 2) == 0)
+ {
+ /* At position 0 of the PX record the st_mode information is
+ stored (little-endian). */
+ grub_uint32_t mode = ((entry->data[0] + (entry->data[1] << 8))
+ & GRUB_ISO9660_FSTYPE_MASK);
+
+ switch (mode)
+ {
+ case GRUB_ISO9660_FSTYPE_DIR:
+ type = GRUB_FSHELP_DIR;
+ break;
+ case GRUB_ISO9660_FSTYPE_REG:
+ type = GRUB_FSHELP_REG;
+ break;
+ case GRUB_ISO9660_FSTYPE_SYMLINK:
+ type = GRUB_FSHELP_SYMLINK;
+ break;
+ default:
+ type = GRUB_FSHELP_UNKNOWN;
+ }
+ }
+
+ return 0;
+ }
+
+ while (offset < dir->size)
+ {
+ if (grub_disk_read (dir->data->disk,
+ (dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
+ + offset / GRUB_DISK_SECTOR_SIZE,
+ offset % GRUB_DISK_SECTOR_SIZE,
+ sizeof (dirent), (char *) &dirent))
+ return 0;
+
+ /* The end of the block, skip to the next one. */
+ if (!dirent.len)
+ {
+ offset = (offset / GRUB_ISO9660_BLKSZ + 1) * GRUB_ISO9660_BLKSZ;
+ continue;
+ }
+
+ {
+ char name[dirent.namelen + 1];
+ int nameoffset = offset + sizeof (dirent);
+ struct grub_fshelp_node *node;
+ int sua_off = (sizeof (dirent) + dirent.namelen + 1
+ - (dirent.namelen % 2));
+ int sua_size = dirent.len - sua_off;
+
+ sua_off += offset + dir->data->susp_skip;
+
+ filename = 0;
+ filename_alloc = 0;
+ type = GRUB_FSHELP_UNKNOWN;
+
+ if (dir->data->rockridge
+ && grub_iso9660_susp_iterate (dir->data,
+ (dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
+ + (sua_off
+ / GRUB_DISK_SECTOR_SIZE),
+ sua_off % GRUB_DISK_SECTOR_SIZE,
+ sua_size, susp_iterate_dir))
+ return 0;
+
+ /* Read the name. */
+ if (grub_disk_read (dir->data->disk,
+ (dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
+ + nameoffset / GRUB_DISK_SECTOR_SIZE,
+ nameoffset % GRUB_DISK_SECTOR_SIZE,
+ dirent.namelen, (char *) name))
+ return 0;
+
+ node = grub_malloc (sizeof (struct grub_fshelp_node));
+ if (!node)
+ return 0;
+
+ /* Setup a new node. */
+ node->data = dir->data;
+ node->size = grub_le_to_cpu32 (dirent.size);
+ node->blk = grub_le_to_cpu32 (dirent.first_sector);
+ node->dir_blk = ((dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
+ + offset / GRUB_DISK_SECTOR_SIZE);
+ node->dir_off = offset % GRUB_DISK_SECTOR_SIZE;
+
+ /* If the filetype was not stored using rockridge, use
+ whatever is stored in the iso9660 filesystem. */
+ if (type == GRUB_FSHELP_UNKNOWN)
+ {
+ if ((dirent.flags & 3) == 2)
+ type = GRUB_FSHELP_DIR;
+ else
+ type = GRUB_FSHELP_REG;
+ }
+
+ /* The filename was not stored in a rock ridge entry. Read it
+ from the iso9660 filesystem. */
+ if (!filename)
+ {
+ name[dirent.namelen] = '\0';
+ filename = grub_strrchr (name, ';');
+ if (filename)
+ *filename = '\0';
+
+ if (dirent.namelen == 1 && name[0] == 0)
+ filename = ".";
+ else if (dirent.namelen == 1 && name[0] == 1)
+ filename = "..";
+ else
+ filename = name;
+ }
+
+ if (dir->data->joliet)
+ {
+ char *oldname, *semicolon;
+
+ oldname = filename;
+ filename = grub_iso9660_convert_string
+ ((grub_uint16_t *) oldname, dirent.namelen >> 1);
+
+ semicolon = grub_strrchr (filename, ';');
+ if (semicolon)
+ *semicolon = '\0';
+
+ if (filename_alloc)
+ grub_free (oldname);
+
+ filename_alloc = 1;
+ }
+
+ if (hook (filename, type, node))
+ {
+ if (filename_alloc)
+ grub_free (filename);
+ return 1;
+ }
+ if (filename_alloc)
+ grub_free (filename);
+ }
+
+ offset += dirent.len;
+ }
+
+ return 0;
+}
+
+
+
+static grub_err_t
+grub_iso9660_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_iso9660_data *data = 0;
+ struct grub_fshelp_node rootnode;
+ struct grub_fshelp_node *foundnode;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_iso9660_mount (device->disk);
+ if (! data)
+ goto fail;
+
+ rootnode.data = data;
+ rootnode.blk = grub_le_to_cpu32 (data->voldesc.rootdir.first_sector);
+ rootnode.size = grub_le_to_cpu32 (data->voldesc.rootdir.size);
+
+ /* Use the fshelp function to traverse the path. */
+ if (grub_fshelp_find_file (path, &rootnode,
+ &foundnode,
+ grub_iso9660_iterate_dir,
+ grub_iso9660_read_symlink,
+ GRUB_FSHELP_DIR))
+ goto fail;
+
+ /* List the files in the directory. */
+ grub_iso9660_iterate_dir (foundnode, iterate);
+
+ if (foundnode != &rootnode)
+ grub_free (foundnode);
+
+ fail:
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_iso9660_open (struct grub_file *file, const char *name)
+{
+ struct grub_iso9660_data *data;
+ struct grub_fshelp_node rootnode;
+ struct grub_fshelp_node *foundnode;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_iso9660_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ rootnode.data = data;
+ rootnode.blk = grub_le_to_cpu32 (data->voldesc.rootdir.first_sector);
+ rootnode.size = grub_le_to_cpu32 (data->voldesc.rootdir.size);
+
+ /* Use the fshelp function to traverse the path. */
+ if (grub_fshelp_find_file (name, &rootnode,
+ &foundnode,
+ grub_iso9660_iterate_dir,
+ grub_iso9660_read_symlink,
+ GRUB_FSHELP_REG))
+ goto fail;
+
+ data->first_sector = foundnode->blk;
+
+ file->data = data;
+ file->size = foundnode->size;
+ file->offset = 0;
+
+ return 0;
+
+ fail:
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+static grub_ssize_t
+grub_iso9660_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_iso9660_data *data =
+ (struct grub_iso9660_data *) file->data;
+
+ /* XXX: The file is stored in as a single extent. */
+ data->disk->read_hook = file->read_hook;
+ grub_disk_read (data->disk,
+ data->first_sector << GRUB_ISO9660_LOG2_BLKSZ,
+ file->offset,
+ len, buf);
+ data->disk->read_hook = NULL;
+
+ if (grub_errno)
+ return -1;
+
+ return len;
+}
+
+
+static grub_err_t
+grub_iso9660_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static grub_err_t
+grub_iso9660_label (grub_device_t device, char **label)
+{
+ struct grub_iso9660_data *data;
+ data = grub_iso9660_mount (device->disk);
+
+ if (data)
+ {
+ if (data->joliet)
+ *label = grub_iso9660_convert_string
+ ((grub_uint16_t *) &data->voldesc.volname, 16);
+ else
+ *label = grub_strndup ((char *) data->voldesc.volname, 32);
+ if (*label)
+ {
+ char *ptr;
+ for (ptr = *label; *ptr;ptr++);
+ ptr--;
+ while (ptr >= *label && *ptr == ' ')
+ *ptr-- = 0;
+ }
+
+ grub_free (data);
+ }
+ else
+ *label = 0;
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_iso9660_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_iso9660_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_iso9660_mount (disk);
+ if (data)
+ {
+ if (! data->voldesc.modified.year[0] && ! data->voldesc.modified.year[1]
+ && ! data->voldesc.modified.year[2] && ! data->voldesc.modified.year[3]
+ && ! data->voldesc.modified.month[0] && ! data->voldesc.modified.month[1]
+ && ! data->voldesc.modified.day[0] && ! data->voldesc.modified.day[1]
+ && ! data->voldesc.modified.hour[0] && ! data->voldesc.modified.hour[1]
+ && ! data->voldesc.modified.minute[0] && ! data->voldesc.modified.minute[1]
+ && ! data->voldesc.modified.second[0] && ! data->voldesc.modified.second[1]
+ && ! data->voldesc.modified.hundredth[0] && ! data->voldesc.modified.hundredth[1])
+ {
+ grub_error (GRUB_ERR_BAD_NUMBER, "no creation date in filesystem to generate UUID");
+ *uuid = NULL;
+ }
+ else
+ {
+ *uuid = grub_xasprintf ("%c%c%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c",
+ data->voldesc.modified.year[0],
+ data->voldesc.modified.year[1],
+ data->voldesc.modified.year[2],
+ data->voldesc.modified.year[3],
+ data->voldesc.modified.month[0],
+ data->voldesc.modified.month[1],
+ data->voldesc.modified.day[0],
+ data->voldesc.modified.day[1],
+ data->voldesc.modified.hour[0],
+ data->voldesc.modified.hour[1],
+ data->voldesc.modified.minute[0],
+ data->voldesc.modified.minute[1],
+ data->voldesc.modified.second[0],
+ data->voldesc.modified.second[1],
+ data->voldesc.modified.hundredth[0],
+ data->voldesc.modified.hundredth[1]);
+ }
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+
+static struct grub_fs grub_iso9660_fs =
+ {
+ .name = "iso9660",
+ .dir = grub_iso9660_dir,
+ .open = grub_iso9660_open,
+ .read = grub_iso9660_read,
+ .close = grub_iso9660_close,
+ .label = grub_iso9660_label,
+ .uuid = grub_iso9660_uuid,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(iso9660)
+{
+ grub_fs_register (&grub_iso9660_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(iso9660)
+{
+ grub_fs_unregister (&grub_iso9660_fs);
+}
diff --git a/grub-core/fs/jfs.c b/grub-core/fs/jfs.c
new file mode 100644
index 0000000..72e6adc
--- /dev/null
+++ b/grub-core/fs/jfs.c
@@ -0,0 +1,908 @@
+/* jfs.c - JFS. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/charset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_JFS_MAX_SYMLNK_CNT 8
+#define GRUB_JFS_FILETYPE_MASK 0170000
+#define GRUB_JFS_FILETYPE_REG 0100000
+#define GRUB_JFS_FILETYPE_LNK 0120000
+#define GRUB_JFS_FILETYPE_DIR 0040000
+
+#define GRUB_JFS_SBLOCK 64
+#define GRUB_JFS_AGGR_INODE 2
+#define GRUB_JFS_FS1_INODE_BLK 104
+
+#define GRUB_JFS_TREE_LEAF 2
+
+struct grub_jfs_sblock
+{
+ /* The magic for JFS. It should contain the string "JFS1". */
+ grub_uint8_t magic[4];
+ grub_uint32_t version;
+ grub_uint64_t ag_size;
+
+ /* The size of a filesystem block in bytes. XXX: currently only
+ 4096 was tested. */
+ grub_uint32_t blksz;
+ grub_uint16_t log2_blksz;
+
+ grub_uint8_t unused[71];
+ grub_uint8_t volname[11];
+ grub_uint8_t unused2[32];
+ grub_uint8_t uuid[16];
+};
+
+struct grub_jfs_extent
+{
+ /* The length of the extent in filesystem blocks. */
+ grub_uint16_t length;
+ grub_uint8_t length2;
+
+ /* The physical offset of the first block on the disk. */
+ grub_uint8_t blk1;
+ grub_uint32_t blk2;
+} __attribute__ ((packed));
+
+struct grub_jfs_iag
+{
+ grub_uint8_t unused[3072];
+ struct grub_jfs_extent inodes[128];
+} __attribute__ ((packed));
+
+
+/* The head of the tree used to find extents. */
+struct grub_jfs_treehead
+{
+ grub_uint64_t next;
+ grub_uint64_t prev;
+
+ grub_uint8_t flags;
+ grub_uint8_t unused;
+
+ grub_uint16_t count;
+ grub_uint16_t max;
+ grub_uint8_t unused2[10];
+} __attribute__ ((packed));
+
+/* A node in the extent tree. */
+struct grub_jfs_tree_extent
+{
+ grub_uint8_t flags;
+ grub_uint16_t unused;
+
+ /* The offset is the key used to lookup an extent. */
+ grub_uint8_t offset1;
+ grub_uint32_t offset2;
+
+ struct grub_jfs_extent extent;
+} __attribute__ ((packed));
+
+/* The tree of directory entries. */
+struct grub_jfs_tree_dir
+{
+ /* Pointers to the previous and next tree headers of other nodes on
+ this level. */
+ grub_uint64_t nextb;
+ grub_uint64_t prevb;
+
+ grub_uint8_t flags;
+
+ /* The amount of dirents in this node. */
+ grub_uint8_t count;
+ grub_uint8_t freecnt;
+ grub_uint8_t freelist;
+ grub_uint8_t maxslot;
+
+ /* The location of the sorted array of pointers to dirents. */
+ grub_uint8_t sindex;
+ grub_uint8_t unused[10];
+} __attribute__ ((packed));
+
+/* An internal node in the dirents tree. */
+struct grub_jfs_internal_dirent
+{
+ struct grub_jfs_extent ex;
+ grub_uint8_t next;
+ grub_uint8_t len;
+ grub_uint16_t namepart[11];
+} __attribute__ ((packed));
+
+/* A leaf node in the dirents tree. */
+struct grub_jfs_leaf_dirent
+{
+ /* The inode for this dirent. */
+ grub_uint32_t inode;
+ grub_uint8_t next;
+
+ /* The size of the name. */
+ grub_uint8_t len;
+ grub_uint16_t namepart[11];
+ grub_uint32_t index;
+} __attribute__ ((packed));
+
+/* A leaf in the dirents tree. This one is used if the previously
+ dirent was not big enough to store the name. */
+struct grub_jfs_leaf_next_dirent
+{
+ grub_uint8_t next;
+ grub_uint8_t len;
+ grub_uint16_t namepart[15];
+} __attribute__ ((packed));
+
+struct grub_jfs_inode
+{
+ grub_uint32_t stamp;
+ grub_uint32_t fileset;
+ grub_uint32_t inode;
+ grub_uint8_t unused[12];
+ grub_uint64_t size;
+ grub_uint8_t unused2[20];
+ grub_uint32_t mode;
+ grub_uint8_t unused3[72];
+ grub_uint8_t unused4[96];
+
+ union
+ {
+ /* The tree describing the extents of the file. */
+ struct __attribute__ ((packed))
+ {
+ struct grub_jfs_treehead tree;
+ struct grub_jfs_tree_extent extents[16];
+ } file;
+ union
+ {
+ /* The tree describing the dirents. */
+ struct
+ {
+ grub_uint8_t unused[16];
+ grub_uint8_t flags;
+
+ /* Amount of dirents in this node. */
+ grub_uint8_t count;
+ grub_uint8_t freecnt;
+ grub_uint8_t freelist;
+ grub_uint32_t idotdot;
+ grub_uint8_t sorted[8];
+ } header;
+ struct grub_jfs_leaf_dirent dirents[8];
+ } dir __attribute__ ((packed));
+ /* Fast symlink. */
+ struct
+ {
+ grub_uint8_t unused[32];
+ grub_uint8_t path[128];
+ } symlink;
+ } __attribute__ ((packed));
+} __attribute__ ((packed));
+
+struct grub_jfs_data
+{
+ struct grub_jfs_sblock sblock;
+ grub_disk_t disk;
+ struct grub_jfs_inode fileset;
+ struct grub_jfs_inode currinode;
+ int pos;
+ int linknest;
+} __attribute__ ((packed));
+
+struct grub_jfs_diropen
+{
+ int index;
+ union
+ {
+ struct grub_jfs_tree_dir header;
+ struct grub_jfs_leaf_dirent dirent[0];
+ struct grub_jfs_leaf_next_dirent next_dirent[0];
+ grub_uint8_t sorted[0];
+ } *dirpage __attribute__ ((packed));
+ struct grub_jfs_data *data;
+ struct grub_jfs_inode *inode;
+ int count;
+ grub_uint8_t *sorted;
+ struct grub_jfs_leaf_dirent *leaf;
+ struct grub_jfs_leaf_next_dirent *next_leaf;
+
+ /* The filename and inode of the last read dirent. */
+ char name[255];
+ grub_uint32_t ino;
+} __attribute__ ((packed));
+
+
+static grub_dl_t my_mod;
+
+static grub_err_t grub_jfs_lookup_symlink (struct grub_jfs_data *data, grub_uint32_t ino);
+
+/* Get the block number for the block BLK in the node INODE in the
+ mounted filesystem DATA. */
+static grub_int64_t
+grub_jfs_blkno (struct grub_jfs_data *data, struct grub_jfs_inode *inode,
+ grub_uint64_t blk)
+{
+ auto int getblk (struct grub_jfs_treehead *treehead,
+ struct grub_jfs_tree_extent *extents);
+
+ int getblk (struct grub_jfs_treehead *treehead,
+ struct grub_jfs_tree_extent *extents)
+ {
+ int found = -1;
+ int i;
+
+ for (i = 0; i < grub_le_to_cpu16 (treehead->count) - 2; i++)
+ {
+ if (treehead->flags & GRUB_JFS_TREE_LEAF)
+ {
+ /* Read the leafnode. */
+ if (grub_le_to_cpu32 (extents[i].offset2) <= blk
+ && ((grub_le_to_cpu16 (extents[i].extent.length))
+ + (extents[i].extent.length2 << 8)
+ + grub_le_to_cpu32 (extents[i].offset2)) > blk)
+ return (blk - grub_le_to_cpu32 (extents[i].offset2)
+ + grub_le_to_cpu32 (extents[i].extent.blk2));
+ }
+ else
+ if (blk >= grub_le_to_cpu32 (extents[i].offset2))
+ found = i;
+ }
+
+ if (found != -1)
+ {
+ struct
+ {
+ struct grub_jfs_treehead treehead;
+ struct grub_jfs_tree_extent extents[254];
+ } tree;
+
+ if (grub_disk_read (data->disk,
+ grub_le_to_cpu32 (extents[found].extent.blk2)
+ << (grub_le_to_cpu16 (data->sblock.log2_blksz)
+ - GRUB_DISK_SECTOR_BITS), 0,
+ sizeof (tree), (char *) &tree))
+ return -1;
+
+ return getblk (&tree.treehead, &tree.extents[0]);
+ }
+
+ return -1;
+ }
+
+ return getblk (&inode->file.tree, &inode->file.extents[0]);
+}
+
+
+static grub_err_t
+grub_jfs_read_inode (struct grub_jfs_data *data, grub_uint32_t ino,
+ struct grub_jfs_inode *inode)
+{
+ struct grub_jfs_iag iag;
+ grub_uint32_t iagnum = ino / 4096;
+ unsigned inoext = (ino % 4096) / 32;
+ unsigned inonum = (ino % 4096) % 32;
+ grub_uint64_t iagblk;
+ grub_uint64_t inoblk;
+
+ iagblk = grub_jfs_blkno (data, &data->fileset, iagnum + 1);
+ if (grub_errno)
+ return grub_errno;
+
+ /* Read in the IAG. */
+ if (grub_disk_read (data->disk,
+ iagblk << (grub_le_to_cpu16 (data->sblock.log2_blksz)
+ - GRUB_DISK_SECTOR_BITS), 0,
+ sizeof (struct grub_jfs_iag), &iag))
+ return grub_errno;
+
+ inoblk = grub_le_to_cpu32 (iag.inodes[inoext].blk2);
+ inoblk <<= (grub_le_to_cpu16 (data->sblock.log2_blksz)
+ - GRUB_DISK_SECTOR_BITS);
+ inoblk += inonum;
+
+ if (grub_disk_read (data->disk, inoblk, 0,
+ sizeof (struct grub_jfs_inode), inode))
+ return grub_errno;
+
+ return 0;
+}
+
+
+static struct grub_jfs_data *
+grub_jfs_mount (grub_disk_t disk)
+{
+ struct grub_jfs_data *data = 0;
+
+ data = grub_malloc (sizeof (struct grub_jfs_data));
+ if (!data)
+ return 0;
+
+ /* Read the superblock. */
+ if (grub_disk_read (disk, GRUB_JFS_SBLOCK, 0,
+ sizeof (struct grub_jfs_sblock), &data->sblock))
+ goto fail;
+
+ if (grub_strncmp ((char *) (data->sblock.magic), "JFS1", 4))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a JFS filesystem");
+ goto fail;
+ }
+
+ if (grub_le_to_cpu32 (data->sblock.blksz)
+ != (1U << grub_le_to_cpu16 (data->sblock.log2_blksz)))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a JFS filesystem");
+ goto fail;
+ }
+
+ data->disk = disk;
+ data->pos = 0;
+ data->linknest = 0;
+
+ /* Read the inode of the first fileset. */
+ if (grub_disk_read (data->disk, GRUB_JFS_FS1_INODE_BLK, 0,
+ sizeof (struct grub_jfs_inode), &data->fileset))
+ goto fail;
+
+ return data;
+
+ fail:
+ grub_free (data);
+
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not a JFS filesystem");
+
+ return 0;
+}
+
+
+static struct grub_jfs_diropen *
+grub_jfs_opendir (struct grub_jfs_data *data, struct grub_jfs_inode *inode)
+{
+ struct grub_jfs_internal_dirent *de;
+ struct grub_jfs_diropen *diro;
+ grub_disk_addr_t blk;
+
+ de = (struct grub_jfs_internal_dirent *) inode->dir.dirents;
+
+ if (!((grub_le_to_cpu32 (inode->mode)
+ & GRUB_JFS_FILETYPE_MASK) == GRUB_JFS_FILETYPE_DIR))
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ return 0;
+ }
+
+ diro = grub_zalloc (sizeof (struct grub_jfs_diropen));
+ if (!diro)
+ return 0;
+
+ diro->data = data;
+ diro->inode = inode;
+
+ /* Check if the entire tree is contained within the inode. */
+ if (inode->file.tree.flags & GRUB_JFS_TREE_LEAF)
+ {
+ diro->leaf = inode->dir.dirents;
+ diro->next_leaf = (struct grub_jfs_leaf_next_dirent *) de;
+ diro->sorted = inode->dir.header.sorted;
+ diro->count = inode->dir.header.count;
+
+ return diro;
+ }
+
+ diro->dirpage = grub_malloc (grub_le_to_cpu32 (data->sblock.blksz));
+ if (!diro->dirpage)
+ {
+ grub_free (diro);
+ return 0;
+ }
+
+ blk = grub_le_to_cpu32 (de[inode->dir.header.sorted[0]].ex.blk2);
+ blk <<= (grub_le_to_cpu16 (data->sblock.log2_blksz) - GRUB_DISK_SECTOR_BITS);
+
+ /* Read in the nodes until we are on the leaf node level. */
+ do
+ {
+ int index;
+ if (grub_disk_read (data->disk, blk, 0,
+ grub_le_to_cpu32 (data->sblock.blksz),
+ diro->dirpage->sorted))
+ {
+ grub_free (diro->dirpage);
+ grub_free (diro);
+ return 0;
+ }
+
+ de = (struct grub_jfs_internal_dirent *) diro->dirpage->dirent;
+ index = diro->dirpage->sorted[diro->dirpage->header.sindex * 32];
+ blk = (grub_le_to_cpu32 (de[index].ex.blk2)
+ << (grub_le_to_cpu16 (data->sblock.log2_blksz)
+ - GRUB_DISK_SECTOR_BITS));
+ } while (!(diro->dirpage->header.flags & GRUB_JFS_TREE_LEAF));
+
+ diro->leaf = diro->dirpage->dirent;
+ diro->next_leaf = diro->dirpage->next_dirent;
+ diro->sorted = &diro->dirpage->sorted[diro->dirpage->header.sindex * 32];
+ diro->count = diro->dirpage->header.count;
+
+ return diro;
+}
+
+
+static void
+grub_jfs_closedir (struct grub_jfs_diropen *diro)
+{
+ if (!diro)
+ return;
+ grub_free (diro->dirpage);
+ grub_free (diro);
+}
+
+
+/* Read in the next dirent from the directory described by DIRO. */
+static grub_err_t
+grub_jfs_getent (struct grub_jfs_diropen *diro)
+{
+ int strpos = 0;
+ struct grub_jfs_leaf_dirent *leaf;
+ struct grub_jfs_leaf_next_dirent *next_leaf;
+ int len;
+ int nextent;
+ grub_uint16_t filename[255];
+
+ auto void addstr (grub_uint16_t *uname, int ulen);
+
+ /* Add the unicode string to the utf16 filename buffer. */
+ void addstr (grub_uint16_t *name, int ulen)
+ {
+ while (ulen--)
+ filename[strpos++] = *(name++);
+ }
+
+ /* The last node, read in more. */
+ if (diro->index == diro->count)
+ {
+ grub_disk_addr_t next;
+
+ /* If the inode contains the entry tree or if this was the last
+ node, there is nothing to read. */
+ if ((diro->inode->file.tree.flags & GRUB_JFS_TREE_LEAF)
+ || !grub_le_to_cpu64 (diro->dirpage->header.nextb))
+ return GRUB_ERR_OUT_OF_RANGE;
+
+ next = grub_le_to_cpu64 (diro->dirpage->header.nextb);
+ next <<= (grub_le_to_cpu16 (diro->data->sblock.log2_blksz)
+ - GRUB_DISK_SECTOR_BITS);
+
+ if (grub_disk_read (diro->data->disk, next, 0,
+ grub_le_to_cpu32 (diro->data->sblock.blksz),
+ diro->dirpage->sorted))
+ return grub_errno;
+
+ diro->leaf = diro->dirpage->dirent;
+ diro->next_leaf = diro->dirpage->next_dirent;
+ diro->sorted = &diro->dirpage->sorted[diro->dirpage->header.sindex * 32];
+ diro->count = diro->dirpage->header.count;
+ diro->index = 0;
+ }
+
+ leaf = &diro->leaf[diro->sorted[diro->index]];
+ next_leaf = &diro->next_leaf[diro->index];
+
+ len = leaf->len;
+ if (!len)
+ {
+ diro->index++;
+ return grub_jfs_getent (diro);
+ }
+
+ addstr (leaf->namepart, len < 11 ? len : 11);
+ diro->ino = grub_le_to_cpu32 (leaf->inode);
+ len -= 11;
+
+ /* Move down to the leaf level. */
+ nextent = leaf->next;
+ if (leaf->next != 255)
+ do
+ {
+ next_leaf = &diro->next_leaf[nextent];
+ addstr (next_leaf->namepart, len < 15 ? len : 15 );
+
+ len -= 15;
+ nextent = next_leaf->next;
+ } while (next_leaf->next != 255 && len > 0);
+
+ diro->index++;
+
+ /* Convert the temporary UTF16 filename to UTF8. */
+ *grub_utf16_to_utf8 ((grub_uint8_t *) (diro->name), filename, strpos) = '\0';
+
+ return 0;
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_jfs_read_file (struct grub_jfs_data *data,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ grub_uint64_t pos, grub_size_t len, char *buf)
+{
+ grub_uint64_t i;
+ grub_uint64_t blockcnt;
+
+ blockcnt = (len + pos + grub_le_to_cpu32 (data->sblock.blksz) - 1)
+ >> grub_le_to_cpu16 (data->sblock.log2_blksz);
+
+ for (i = pos >> grub_le_to_cpu16 (data->sblock.log2_blksz); i < blockcnt; i++)
+ {
+ grub_disk_addr_t blknr;
+ grub_uint32_t blockoff = pos & (grub_le_to_cpu32 (data->sblock.blksz) - 1);
+ grub_uint32_t blockend = grub_le_to_cpu32 (data->sblock.blksz);
+
+ grub_uint64_t skipfirst = 0;
+
+ blknr = grub_jfs_blkno (data, &data->currinode, i);
+ if (grub_errno)
+ return -1;
+
+ /* Last block. */
+ if (i == blockcnt - 1)
+ {
+ blockend = (len + pos) & (grub_le_to_cpu32 (data->sblock.blksz) - 1);
+
+ if (!blockend)
+ blockend = grub_le_to_cpu32 (data->sblock.blksz);
+ }
+
+ /* First block. */
+ if (i == (pos >> grub_le_to_cpu16 (data->sblock.log2_blksz)))
+ {
+ skipfirst = blockoff;
+ blockend -= skipfirst;
+ }
+
+ data->disk->read_hook = read_hook;
+ grub_disk_read (data->disk,
+ blknr << (grub_le_to_cpu16 (data->sblock.log2_blksz)
+ - GRUB_DISK_SECTOR_BITS),
+ skipfirst, blockend, buf);
+
+ data->disk->read_hook = 0;
+ if (grub_errno)
+ return -1;
+
+ buf += grub_le_to_cpu32 (data->sblock.blksz) - skipfirst;
+ }
+
+ return len;
+}
+
+
+/* Find the file with the pathname PATH on the filesystem described by
+ DATA. */
+static grub_err_t
+grub_jfs_find_file (struct grub_jfs_data *data, const char *path)
+{
+ char fpath[grub_strlen (path)];
+ char *name = fpath;
+ char *next;
+ struct grub_jfs_diropen *diro;
+
+ grub_strncpy (fpath, path, grub_strlen (path) + 1);
+
+ if (grub_jfs_read_inode (data, GRUB_JFS_AGGR_INODE, &data->currinode))
+ return grub_errno;
+
+ /* Skip the first slashes. */
+ while (*name == '/')
+ {
+ name++;
+ if (!*name)
+ return 0;
+ }
+
+ /* Extract the actual part from the pathname. */
+ next = grub_strchr (name, '/');
+ if (next)
+ {
+ while (*next == '/')
+ {
+ next[0] = '\0';
+ next++;
+ }
+ }
+ diro = grub_jfs_opendir (data, &data->currinode);
+ if (!diro)
+ return grub_errno;
+
+ for (;;)
+ {
+ if (grub_strlen (name) == 0)
+ return GRUB_ERR_NONE;
+
+ if (grub_jfs_getent (diro) == GRUB_ERR_OUT_OF_RANGE)
+ break;
+
+ /* Check if the current direntry matches the current part of the
+ pathname. */
+ if (!grub_strcmp (name, diro->name))
+ {
+ grub_uint32_t ino = diro->ino;
+ grub_uint32_t dirino = grub_le_to_cpu32 (data->currinode.inode);
+
+ grub_jfs_closedir (diro);
+ diro = 0;
+
+ if (grub_jfs_read_inode (data, ino, &data->currinode))
+ break;
+
+ /* Check if this is a symlink. */
+ if ((grub_le_to_cpu32 (data->currinode.mode)
+ & GRUB_JFS_FILETYPE_MASK) == GRUB_JFS_FILETYPE_LNK)
+ {
+ grub_jfs_lookup_symlink (data, dirino);
+ if (grub_errno)
+ return grub_errno;
+ }
+
+ if (!next)
+ return 0;
+
+ name = next;
+ next = grub_strchr (name, '/');
+ if (next)
+ {
+ next[0] = '\0';
+ next++;
+ }
+
+ /* Open this directory for reading dirents. */
+ diro = grub_jfs_opendir (data, &data->currinode);
+ if (!diro)
+ return grub_errno;
+
+ continue;
+ }
+ }
+
+ grub_jfs_closedir (diro);
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_jfs_lookup_symlink (struct grub_jfs_data *data, grub_uint32_t ino)
+{
+ grub_uint64_t size = grub_le_to_cpu64 (data->currinode.size);
+ char symlink[size + 1];
+
+ if (++data->linknest > GRUB_JFS_MAX_SYMLNK_CNT)
+ return grub_error (GRUB_ERR_SYMLINK_LOOP, "too deep nesting of symlinks");
+
+ if (size <= 128)
+ grub_strncpy (symlink, (char *) (data->currinode.symlink.path), 128);
+ else if (grub_jfs_read_file (data, 0, 0, size, symlink) < 0)
+ return grub_errno;
+
+ symlink[size] = '\0';
+
+ /* The symlink is an absolute path, go back to the root inode. */
+ if (symlink[0] == '/')
+ ino = 2;
+
+ /* Now load in the old inode. */
+ if (grub_jfs_read_inode (data, ino, &data->currinode))
+ return grub_errno;
+
+ grub_jfs_find_file (data, symlink);
+ if (grub_errno)
+ grub_error (grub_errno, "cannot follow symlink `%s'", symlink);
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_jfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_jfs_data *data = 0;
+ struct grub_jfs_diropen *diro = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_jfs_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ if (grub_jfs_find_file (data, path))
+ goto fail;
+
+ diro = grub_jfs_opendir (data, &data->currinode);
+ if (!diro)
+ goto fail;
+
+ /* Iterate over the dirents in the directory that was found. */
+ while (grub_jfs_getent (diro) != GRUB_ERR_OUT_OF_RANGE)
+ {
+ struct grub_jfs_inode inode;
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+
+ if (grub_jfs_read_inode (data, diro->ino, &inode))
+ goto fail;
+
+ info.dir = (grub_le_to_cpu32 (inode.mode)
+ & GRUB_JFS_FILETYPE_MASK) == GRUB_JFS_FILETYPE_DIR;
+ if (hook (diro->name, &info))
+ goto fail;
+ }
+
+ /* XXX: GRUB_ERR_OUT_OF_RANGE is used for the last dirent. */
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_errno = 0;
+
+ fail:
+ grub_jfs_closedir (diro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_jfs_open (struct grub_file *file, const char *name)
+{
+ struct grub_jfs_data *data;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_jfs_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ grub_jfs_find_file (data, name);
+ if (grub_errno)
+ goto fail;
+
+ /* It is only possible for open regular files. */
+ if (! ((grub_le_to_cpu32 (data->currinode.mode)
+ & GRUB_JFS_FILETYPE_MASK) == GRUB_JFS_FILETYPE_REG))
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a regular file");
+ goto fail;
+ }
+
+ file->data = data;
+ file->size = grub_le_to_cpu64 (data->currinode.size);
+
+ return 0;
+
+ fail:
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+static grub_ssize_t
+grub_jfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_jfs_data *data =
+ (struct grub_jfs_data *) file->data;
+
+ return grub_jfs_read_file (data, file->read_hook, file->offset, len, buf);
+}
+
+
+static grub_err_t
+grub_jfs_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_jfs_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_jfs_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_jfs_mount (disk);
+ if (data)
+ {
+ *uuid = grub_xasprintf ("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-"
+ "%02x%02x%02x%02x%02x%02x",
+ data->sblock.uuid[0], data->sblock.uuid[1],
+ data->sblock.uuid[2], data->sblock.uuid[3],
+ data->sblock.uuid[4], data->sblock.uuid[5],
+ data->sblock.uuid[6], data->sblock.uuid[7],
+ data->sblock.uuid[8], data->sblock.uuid[9],
+ data->sblock.uuid[10], data->sblock.uuid[11],
+ data->sblock.uuid[12], data->sblock.uuid[13],
+ data->sblock.uuid[14], data->sblock.uuid[15]);
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_jfs_label (grub_device_t device, char **label)
+{
+ struct grub_jfs_data *data;
+ data = grub_jfs_mount (device->disk);
+
+ if (data)
+ *label = grub_strndup ((char *) (data->sblock.volname), 11);
+ else
+ *label = 0;
+
+ return grub_errno;
+}
+
+
+static struct grub_fs grub_jfs_fs =
+ {
+ .name = "jfs",
+ .dir = grub_jfs_dir,
+ .open = grub_jfs_open,
+ .read = grub_jfs_read,
+ .close = grub_jfs_close,
+ .label = grub_jfs_label,
+ .uuid = grub_jfs_uuid,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(jfs)
+{
+ grub_fs_register (&grub_jfs_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(jfs)
+{
+ grub_fs_unregister (&grub_jfs_fs);
+}
diff --git a/grub-core/fs/minix.c b/grub-core/fs/minix.c
new file mode 100644
index 0000000..523e6e6
--- /dev/null
+++ b/grub-core/fs/minix.c
@@ -0,0 +1,590 @@
+/* minix.c - The minix filesystem, version 1 and 2. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifdef MODE_MINIX2
+#define GRUB_MINIX_MAGIC 0x2468
+#define GRUB_MINIX_MAGIC_30 0x2478
+#else
+#define GRUB_MINIX_MAGIC 0x137F
+#define GRUB_MINIX_MAGIC_30 0x138F
+#endif
+#define GRUB_MINIX_BSIZE 1024U
+#define GRUB_MINIX_LOG2_BSIZE 1
+#define GRUB_MINIX_ROOT_INODE 1
+#define GRUB_MINIX_MAX_SYMLNK_CNT 8
+#define GRUB_MINIX_SBLOCK 2
+
+#define GRUB_MINIX_IFDIR 0040000U
+#define GRUB_MINIX_IFLNK 0120000U
+
+#ifdef MODE_MINIX2
+typedef grub_uint32_t grub_minix_uintn_t;
+#define grub_minix_le_to_cpu_n grub_le_to_cpu32
+#else
+typedef grub_uint16_t grub_minix_uintn_t;
+#define grub_minix_le_to_cpu_n grub_le_to_cpu16
+#endif
+
+#define GRUB_MINIX_INODE_BLKSZ(data) sizeof (grub_minix_uintn_t)
+
+#define GRUB_MINIX_INODE_SIZE(data) (grub_minix_le_to_cpu_n (data->inode.size))
+#define GRUB_MINIX_INODE_MODE(data) (grub_le_to_cpu16 (data->inode.mode))
+#define GRUB_MINIX_INODE_DIR_ZONES(data,blk) (grub_minix_le_to_cpu_n \
+ (data->inode.dir_zones[blk]))
+#define GRUB_MINIX_INODE_INDIR_ZONE(data) (grub_minix_le_to_cpu_n \
+ (data->inode.indir_zone))
+#define GRUB_MINIX_INODE_DINDIR_ZONE(data) (grub_minix_le_to_cpu_n \
+ (data->inode.double_indir_zone))
+
+#define GRUB_MINIX_LOG2_ZONESZ (GRUB_MINIX_LOG2_BSIZE \
+ + grub_le_to_cpu16 (sblock->log2_zone_size))
+#define GRUB_MINIX_ZONESZ (GRUB_MINIX_BSIZE \
+ << grub_le_to_cpu16 (sblock->log2_zone_size))
+
+struct grub_minix_sblock
+{
+ grub_uint16_t inode_cnt;
+ grub_uint16_t zone_cnt;
+ grub_uint16_t inode_bmap_size;
+ grub_uint16_t zone_bmap_size;
+ grub_uint16_t first_data_zone;
+ grub_uint16_t log2_zone_size;
+ grub_uint32_t max_file_size;
+ grub_uint16_t magic;
+};
+
+#ifndef MODE_MINIX2
+struct grub_minix_inode
+{
+ grub_uint16_t mode;
+ grub_uint16_t uid;
+ grub_uint16_t size;
+ grub_uint32_t ctime;
+ grub_uint8_t gid;
+ grub_uint8_t nlinks;
+ grub_uint16_t dir_zones[7];
+ grub_uint16_t indir_zone;
+ grub_uint16_t double_indir_zone;
+};
+
+#else
+
+struct grub_minix_inode
+{
+ grub_uint16_t mode;
+ grub_uint16_t nlinks;
+ grub_uint16_t uid;
+ grub_uint16_t gid;
+ grub_uint32_t size;
+ grub_uint32_t atime;
+ grub_uint32_t mtime;
+ grub_uint32_t ctime;
+ grub_uint32_t dir_zones[7];
+ grub_uint32_t indir_zone;
+ grub_uint32_t double_indir_zone;
+ grub_uint32_t unused;
+
+};
+
+#endif
+
+/* Information about a "mounted" minix filesystem. */
+struct grub_minix_data
+{
+ struct grub_minix_sblock sblock;
+ struct grub_minix_inode inode;
+ int ino;
+ int linknest;
+ grub_disk_t disk;
+ int filename_size;
+};
+
+static grub_dl_t my_mod;
+
+static grub_err_t grub_minix_find_file (struct grub_minix_data *data,
+ const char *path);
+
+static int
+grub_minix_get_file_block (struct grub_minix_data *data, unsigned int blk)
+{
+ struct grub_minix_sblock *sblock = &data->sblock;
+ int indir;
+
+ auto int grub_get_indir (int, int);
+
+ /* Read the block pointer in ZONE, on the offset NUM. */
+ int grub_get_indir (int zone, int num)
+ {
+ grub_minix_uintn_t indirn;
+ grub_disk_read (data->disk,
+ zone << GRUB_MINIX_LOG2_ZONESZ,
+ sizeof (grub_minix_uintn_t) * num,
+ sizeof (grub_minix_uintn_t), (char *) &indirn);
+ return grub_minix_le_to_cpu_n (indirn);
+ }
+
+ /* Direct block. */
+ if (blk < 7)
+ return GRUB_MINIX_INODE_DIR_ZONES (data, blk);
+
+ /* Indirect block. */
+ blk -= 7;
+ if (blk < GRUB_MINIX_ZONESZ / GRUB_MINIX_INODE_BLKSZ (data))
+ {
+ indir = grub_get_indir (GRUB_MINIX_INODE_INDIR_ZONE (data), blk);
+ return indir;
+ }
+
+ /* Double indirect block. */
+ blk -= GRUB_MINIX_ZONESZ / GRUB_MINIX_INODE_BLKSZ (data);
+ if (blk < (GRUB_MINIX_ZONESZ / GRUB_MINIX_INODE_BLKSZ (data))
+ * (GRUB_MINIX_ZONESZ / GRUB_MINIX_INODE_BLKSZ (data)))
+ {
+ indir = grub_get_indir (GRUB_MINIX_INODE_DINDIR_ZONE (data),
+ blk / GRUB_MINIX_ZONESZ);
+
+ indir = grub_get_indir (indir, blk % GRUB_MINIX_ZONESZ);
+
+ return indir;
+ }
+
+ /* This should never happen. */
+ grub_error (GRUB_ERR_OUT_OF_RANGE, "file bigger than maximum size");
+
+ return 0;
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_minix_read_file (struct grub_minix_data *data,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_disk_addr_t len, char *buf)
+{
+ struct grub_minix_sblock *sblock = &data->sblock;
+ int i;
+ int blockcnt;
+
+ /* Adjust len so it we can't read past the end of the file. */
+ if (len + pos > GRUB_MINIX_INODE_SIZE (data))
+ len = GRUB_MINIX_INODE_SIZE (data) - pos;
+
+ blockcnt = (len + pos + GRUB_MINIX_BSIZE - 1) / GRUB_MINIX_BSIZE;
+
+ for (i = pos / GRUB_MINIX_BSIZE; i < blockcnt; i++)
+ {
+ int blknr;
+ int blockoff = pos % GRUB_MINIX_BSIZE;
+ int blockend = GRUB_MINIX_BSIZE;
+
+ int skipfirst = 0;
+
+ blknr = grub_minix_get_file_block (data, i);
+ if (grub_errno)
+ return -1;
+
+ /* Last block. */
+ if (i == blockcnt - 1)
+ {
+ blockend = (len + pos) % GRUB_MINIX_BSIZE;
+
+ if (!blockend)
+ blockend = GRUB_MINIX_BSIZE;
+ }
+
+ /* First block. */
+ if (i == (pos / (int) GRUB_MINIX_BSIZE))
+ {
+ skipfirst = blockoff;
+ blockend -= skipfirst;
+ }
+
+ data->disk->read_hook = read_hook;
+ grub_disk_read (data->disk, blknr << GRUB_MINIX_LOG2_ZONESZ,
+ skipfirst, blockend, buf);
+
+ data->disk->read_hook = 0;
+ if (grub_errno)
+ return -1;
+
+ buf += GRUB_MINIX_BSIZE - skipfirst;
+ }
+
+ return len;
+}
+
+
+/* Read inode INO from the mounted filesystem described by DATA. This
+ inode is used by default now. */
+static grub_err_t
+grub_minix_read_inode (struct grub_minix_data *data, int ino)
+{
+ struct grub_minix_sblock *sblock = &data->sblock;
+
+ /* Block in which the inode is stored. */
+ int block;
+ data->ino = ino;
+
+ /* The first inode in minix is inode 1. */
+ ino--;
+
+ block = ((2 + grub_le_to_cpu16 (sblock->inode_bmap_size)
+ + grub_le_to_cpu16 (sblock->zone_bmap_size))
+ << GRUB_MINIX_LOG2_BSIZE);
+
+ block += ino / (GRUB_DISK_SECTOR_SIZE / sizeof (struct grub_minix_inode));
+ int offs = (ino % (GRUB_DISK_SECTOR_SIZE
+ / sizeof (struct grub_minix_inode))
+ * sizeof (struct grub_minix_inode));
+
+ grub_disk_read (data->disk, block, offs,
+ sizeof (struct grub_minix_inode), &data->inode);
+
+ return GRUB_ERR_NONE;
+}
+
+
+/* Lookup the symlink the current inode points to. INO is the inode
+ number of the directory the symlink is relative to. */
+static grub_err_t
+grub_minix_lookup_symlink (struct grub_minix_data *data, int ino)
+{
+ char symlink[GRUB_MINIX_INODE_SIZE (data) + 1];
+
+ if (++data->linknest > GRUB_MINIX_MAX_SYMLNK_CNT)
+ return grub_error (GRUB_ERR_SYMLINK_LOOP, "too deep nesting of symlinks");
+
+ if (grub_minix_read_file (data, 0, 0,
+ GRUB_MINIX_INODE_SIZE (data), symlink) < 0)
+ return grub_errno;
+
+ symlink[GRUB_MINIX_INODE_SIZE (data)] = '\0';
+
+ /* The symlink is an absolute path, go back to the root inode. */
+ if (symlink[0] == '/')
+ ino = GRUB_MINIX_ROOT_INODE;
+
+ /* Now load in the old inode. */
+ if (grub_minix_read_inode (data, ino))
+ return grub_errno;
+
+ grub_minix_find_file (data, symlink);
+ if (grub_errno)
+ grub_error (grub_errno, "cannot follow symlink `%s'", symlink);
+
+ return grub_errno;
+}
+
+
+/* Find the file with the pathname PATH on the filesystem described by
+ DATA. */
+static grub_err_t
+grub_minix_find_file (struct grub_minix_data *data, const char *path)
+{
+ char fpath[grub_strlen (path) + 1];
+ char *name = fpath;
+ char *next;
+ unsigned int pos = 0;
+ int dirino;
+
+ grub_strcpy (fpath, path);
+
+ /* Skip the first slash. */
+ if (name[0] == '/')
+ {
+ name++;
+ if (!*name)
+ return 0;
+ }
+
+ /* Extract the actual part from the pathname. */
+ next = grub_strchr (name, '/');
+ if (next)
+ {
+ next[0] = '\0';
+ next++;
+ }
+
+ do
+ {
+ grub_uint16_t ino;
+ char filename[data->filename_size + 1];
+
+ if (grub_strlen (name) == 0)
+ return GRUB_ERR_NONE;
+
+ if (grub_minix_read_file (data, 0, pos, sizeof (ino),
+ (char *) &ino) < 0)
+ return grub_errno;
+ if (grub_minix_read_file (data, 0, pos + sizeof (ino),
+ data->filename_size, (char *) filename)< 0)
+ return grub_errno;
+
+ filename[data->filename_size] = '\0';
+
+ /* Check if the current direntry matches the current part of the
+ pathname. */
+ if (!grub_strcmp (name, filename))
+ {
+ dirino = data->ino;
+ grub_minix_read_inode (data, grub_le_to_cpu16 (ino));
+
+ /* Follow the symlink. */
+ if ((GRUB_MINIX_INODE_MODE (data)
+ & GRUB_MINIX_IFLNK) == GRUB_MINIX_IFLNK)
+ {
+ grub_minix_lookup_symlink (data, dirino);
+ if (grub_errno)
+ return grub_errno;
+ }
+
+ if (!next)
+ return 0;
+
+ pos = 0;
+
+ name = next;
+ next = grub_strchr (name, '/');
+ if (next)
+ {
+ next[0] = '\0';
+ next++;
+ }
+
+ if ((GRUB_MINIX_INODE_MODE (data)
+ & GRUB_MINIX_IFDIR) != GRUB_MINIX_IFDIR)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+
+ continue;
+ }
+
+ pos += sizeof (ino) + data->filename_size;
+ } while (pos < GRUB_MINIX_INODE_SIZE (data));
+
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ return grub_errno;
+}
+
+
+/* Mount the filesystem on the disk DISK. */
+static struct grub_minix_data *
+grub_minix_mount (grub_disk_t disk)
+{
+ struct grub_minix_data *data;
+
+ data = grub_malloc (sizeof (struct grub_minix_data));
+ if (!data)
+ return 0;
+
+ /* Read the superblock. */
+ grub_disk_read (disk, GRUB_MINIX_SBLOCK, 0,
+ sizeof (struct grub_minix_sblock),&data->sblock);
+ if (grub_errno)
+ goto fail;
+
+ if (grub_le_to_cpu16 (data->sblock.magic) == GRUB_MINIX_MAGIC)
+ data->filename_size = 14;
+ else if (grub_le_to_cpu16 (data->sblock.magic) == GRUB_MINIX_MAGIC_30)
+ data->filename_size = 30;
+ else
+ goto fail;
+
+ data->disk = disk;
+ data->linknest = 0;
+
+ return data;
+
+ fail:
+ grub_free (data);
+#ifdef MODE_MINIX2
+ grub_error (GRUB_ERR_BAD_FS, "not a minix2 filesystem");
+#else
+ grub_error (GRUB_ERR_BAD_FS, "not a minix filesystem");
+#endif
+ return 0;
+}
+
+static grub_err_t
+grub_minix_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_minix_data *data = 0;
+ unsigned int pos = 0;
+
+ data = grub_minix_mount (device->disk);
+ if (!data)
+ return grub_errno;
+
+ grub_minix_read_inode (data, GRUB_MINIX_ROOT_INODE);
+ if (grub_errno)
+ goto fail;
+
+ grub_minix_find_file (data, path);
+ if (grub_errno)
+ goto fail;
+
+ if ((GRUB_MINIX_INODE_MODE (data) & GRUB_MINIX_IFDIR) != GRUB_MINIX_IFDIR)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ goto fail;
+ }
+
+ while (pos < GRUB_MINIX_INODE_SIZE (data))
+ {
+ grub_uint16_t ino;
+ char filename[data->filename_size + 1];
+ int dirino = data->ino;
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+
+
+ if (grub_minix_read_file (data, 0, pos, sizeof (ino),
+ (char *) &ino) < 0)
+ return grub_errno;
+
+ if (grub_minix_read_file (data, 0, pos + sizeof (ino),
+ data->filename_size,
+ (char *) filename) < 0)
+ return grub_errno;
+ filename[data->filename_size] = '\0';
+
+ /* The filetype is not stored in the dirent. Read the inode to
+ find out the filetype. This *REALLY* sucks. */
+ grub_minix_read_inode (data, grub_le_to_cpu16 (ino));
+ info.dir = ((GRUB_MINIX_INODE_MODE (data)
+ & GRUB_MINIX_IFDIR) == GRUB_MINIX_IFDIR);
+ if (hook (filename, &info) ? 1 : 0)
+ break;
+
+ /* Load the old inode back in. */
+ grub_minix_read_inode (data, dirino);
+
+ pos += sizeof (ino) + data->filename_size;
+ }
+
+ fail:
+ grub_free (data);
+ return grub_errno;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_minix_open (struct grub_file *file, const char *name)
+{
+ struct grub_minix_data *data;
+ data = grub_minix_mount (file->device->disk);
+ if (!data)
+ return grub_errno;
+
+ /* Open the inode op the root directory. */
+ grub_minix_read_inode (data, GRUB_MINIX_ROOT_INODE);
+ if (grub_errno)
+ {
+ grub_free (data);
+ return grub_errno;
+ }
+
+ if (!name || name[0] != '/')
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "bad filename");
+ return grub_errno;
+ }
+
+ /* Traverse the directory tree to the node that should be
+ opened. */
+ grub_minix_find_file (data, name);
+ if (grub_errno)
+ {
+ grub_free (data);
+ return grub_errno;
+ }
+
+ file->data = data;
+ file->size = GRUB_MINIX_INODE_SIZE (data);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static grub_ssize_t
+grub_minix_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_minix_data *data =
+ (struct grub_minix_data *) file->data;
+
+ return grub_minix_read_file (data, file->read_hook, file->offset, len, buf);
+}
+
+
+static grub_err_t
+grub_minix_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ return GRUB_ERR_NONE;
+}
+
+
+
+static struct grub_fs grub_minix_fs =
+ {
+#ifdef MODE_MINIX2
+ .name = "minix2",
+#else
+ .name = "minix",
+#endif
+ .dir = grub_minix_dir,
+ .open = grub_minix_open,
+ .read = grub_minix_read,
+ .close = grub_minix_close,
+ .next = 0
+ };
+
+#ifdef MODE_MINIX2
+GRUB_MOD_INIT(minix2)
+#else
+GRUB_MOD_INIT(minix)
+#endif
+{
+ grub_fs_register (&grub_minix_fs);
+ my_mod = mod;
+}
+
+#ifdef MODE_MINIX2
+GRUB_MOD_FINI(minix2)
+#else
+GRUB_MOD_FINI(minix)
+#endif
+{
+ grub_fs_unregister (&grub_minix_fs);
+}
diff --git a/grub-core/fs/minix2.c b/grub-core/fs/minix2.c
new file mode 100644
index 0000000..0fcd4b1
--- /dev/null
+++ b/grub-core/fs/minix2.c
@@ -0,0 +1,2 @@
+#define MODE_MINIX2 1
+#include "minix.c"
diff --git a/grub-core/fs/nilfs2.c b/grub-core/fs/nilfs2.c
new file mode 100644
index 0000000..4c8d763
--- /dev/null
+++ b/grub-core/fs/nilfs2.c
@@ -0,0 +1,1186 @@
+/*
+ * nilfs2.c - New Implementation of Log filesystem
+ *
+ * Written by Jiro SEKIBA <jir@unicus.jp>
+ *
+ * Copyright (C) 2003,2004,2005,2007,2008,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* Filetype information as used in inodes. */
+#define FILETYPE_INO_MASK 0170000
+#define FILETYPE_INO_REG 0100000
+#define FILETYPE_INO_DIRECTORY 0040000
+#define FILETYPE_INO_SYMLINK 0120000
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define NILFS_INODE_BMAP_SIZE 7
+
+#define NILFS_SUPORT_REV 2
+
+/* Magic value used to identify an nilfs2 filesystem. */
+#define NILFS2_SUPER_MAGIC 0x3434
+/* nilfs btree node flag. */
+#define NILFS_BTREE_NODE_ROOT 0x01
+
+/* nilfs btree node level. */
+#define NILFS_BTREE_LEVEL_DATA 0
+#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
+#define NILFS_BTREE_LEVEL_MAX 14
+
+/* nilfs 1st super block posission from beginning of the partition
+ in 512 block size */
+#define NILFS_1ST_SUPER_BLOCK 2
+/* nilfs 2nd super block posission from beginning of the partition
+ in 512 block size */
+#define NILFS_2ND_SUPER_BLOCK(devsize) (((devsize >> 3) - 1) << 3)
+
+struct grub_nilfs2_inode
+{
+ grub_uint64_t i_blocks;
+ grub_uint64_t i_size;
+ grub_uint64_t i_ctime;
+ grub_uint64_t i_mtime;
+ grub_uint32_t i_ctime_nsec;
+ grub_uint32_t i_mtime_nsec;
+ grub_uint32_t i_uid;
+ grub_uint32_t i_gid;
+ grub_uint16_t i_mode;
+ grub_uint16_t i_links_count;
+ grub_uint32_t i_flags;
+ grub_uint64_t i_bmap[NILFS_INODE_BMAP_SIZE];
+#define i_device_code i_bmap[0]
+ grub_uint64_t i_xattr;
+ grub_uint32_t i_generation;
+ grub_uint32_t i_pad;
+};
+
+struct grub_nilfs2_super_root
+{
+ grub_uint32_t sr_sum;
+ grub_uint16_t sr_bytes;
+ grub_uint16_t sr_flags;
+ grub_uint64_t sr_nongc_ctime;
+ struct grub_nilfs2_inode sr_dat;
+ struct grub_nilfs2_inode sr_cpfile;
+ struct grub_nilfs2_inode sr_sufile;
+};
+
+struct grub_nilfs2_super_block
+{
+ grub_uint32_t s_rev_level;
+ grub_uint16_t s_minor_rev_level;
+ grub_uint16_t s_magic;
+ grub_uint16_t s_bytes;
+ grub_uint16_t s_flags;
+ grub_uint32_t s_crc_seed;
+ grub_uint32_t s_sum;
+ grub_uint32_t s_log_block_size;
+ grub_uint64_t s_nsegments;
+ grub_uint64_t s_dev_size;
+ grub_uint64_t s_first_data_block;
+ grub_uint32_t s_blocks_per_segment;
+ grub_uint32_t s_r_segments_percentage;
+ grub_uint64_t s_last_cno;
+ grub_uint64_t s_last_pseg;
+ grub_uint64_t s_last_seq;
+ grub_uint64_t s_free_blocks_count;
+ grub_uint64_t s_ctime;
+ grub_uint64_t s_mtime;
+ grub_uint64_t s_wtime;
+ grub_uint16_t s_mnt_count;
+ grub_uint16_t s_max_mnt_count;
+ grub_uint16_t s_state;
+ grub_uint16_t s_errors;
+ grub_uint64_t s_lastcheck;
+ grub_uint32_t s_checkinterval;
+ grub_uint32_t s_creator_os;
+ grub_uint16_t s_def_resuid;
+ grub_uint16_t s_def_resgid;
+ grub_uint32_t s_first_ino;
+ grub_uint16_t s_inode_size;
+ grub_uint16_t s_dat_entry_size;
+ grub_uint16_t s_checkpoint_size;
+ grub_uint16_t s_segment_usage_size;
+ grub_uint8_t s_uuid[16];
+ char s_volume_name[16];
+ char s_last_mounted[64];
+ grub_uint32_t s_c_interval;
+ grub_uint32_t s_c_block_max;
+ grub_uint32_t s_reserved[192];
+};
+
+struct grub_nilfs2_dir_entry
+{
+ grub_uint64_t inode;
+ grub_uint16_t rec_len;
+ grub_uint8_t name_len;
+ grub_uint8_t file_type;
+#if 0 /* followed by file name. */
+ char name[NILFS_NAME_LEN];
+ char pad;
+#endif
+} __attribute__ ((packed));
+
+enum
+{
+ NILFS_FT_UNKNOWN,
+ NILFS_FT_REG_FILE,
+ NILFS_FT_DIR,
+ NILFS_FT_CHRDEV,
+ NILFS_FT_BLKDEV,
+ NILFS_FT_FIFO,
+ NILFS_FT_SOCK,
+ NILFS_FT_SYMLINK,
+ NILFS_FT_MAX
+};
+
+struct grub_nilfs2_finfo
+{
+ grub_uint64_t fi_ino;
+ grub_uint64_t fi_cno;
+ grub_uint32_t fi_nblocks;
+ grub_uint32_t fi_ndatablk;
+};
+
+struct grub_nilfs2_binfo_v
+{
+ grub_uint64_t bi_vblocknr;
+ grub_uint64_t bi_blkoff;
+};
+
+struct grub_nilfs2_binfo_dat
+{
+ grub_uint64_t bi_blkoff;
+ grub_uint8_t bi_level;
+ grub_uint8_t bi_pad[7];
+};
+
+union grub_nilfs2_binfo
+{
+ struct grub_nilfs2_binfo_v bi_v;
+ struct grub_nilfs2_binfo_dat bi_dat;
+};
+
+struct grub_nilfs2_segment_summary
+{
+ grub_uint32_t ss_datasum;
+ grub_uint32_t ss_sumsum;
+ grub_uint32_t ss_magic;
+ grub_uint16_t ss_bytes;
+ grub_uint16_t ss_flags;
+ grub_uint64_t ss_seq;
+ grub_uint64_t ss_create;
+ grub_uint64_t ss_next;
+ grub_uint32_t ss_nblocks;
+ grub_uint32_t ss_nfinfo;
+ grub_uint32_t ss_sumbytes;
+ grub_uint32_t ss_pad;
+};
+
+struct grub_nilfs2_btree_node
+{
+ grub_uint8_t bn_flags;
+ grub_uint8_t bn_level;
+ grub_uint16_t bn_nchildren;
+ grub_uint32_t bn_pad;
+};
+
+struct grub_nilfs2_palloc_group_desc
+{
+ grub_uint32_t pg_nfrees;
+};
+
+struct grub_nilfs2_dat_entry
+{
+ grub_uint64_t de_blocknr;
+ grub_uint64_t de_start;
+ grub_uint64_t de_end;
+ grub_uint64_t de_rsv;
+};
+
+struct grub_nilfs2_snapshot_list
+{
+ grub_uint64_t ssl_next;
+ grub_uint64_t ssl_prev;
+};
+
+struct grub_nilfs2_cpfile_header
+{
+ grub_uint64_t ch_ncheckpoints;
+ grub_uint64_t ch_nsnapshots;
+ struct grub_nilfs2_snapshot_list ch_snapshot_list;
+};
+
+struct grub_nilfs2_checkpoint
+{
+ grub_uint32_t cp_flags;
+ grub_uint32_t cp_checkpoints_count;
+ struct grub_nilfs2_snapshot_list cp_snapshot_list;
+ grub_uint64_t cp_cno;
+ grub_uint64_t cp_create;
+ grub_uint64_t cp_nblk_inc;
+ grub_uint64_t cp_inodes_count;
+ grub_uint64_t cp_blocks_count;
+ struct grub_nilfs2_inode cp_ifile_inode;
+};
+
+
+#define NILFS_BMAP_LARGE 0x1
+#define NILFS_BMAP_SIZE (NILFS_INODE_BMAP_SIZE * sizeof(grub_uint64_t))
+
+/* nilfs extra padding for nonroot btree node. */
+#define NILFS_BTREE_NODE_EXTRA_PAD_SIZE (sizeof(grub_uint64_t))
+#define NILFS_BTREE_ROOT_SIZE NILFS_BMAP_SIZE
+#define NILFS_BTREE_ROOT_NCHILDREN_MAX \
+ ((NILFS_BTREE_ROOT_SIZE - sizeof(struct nilfs_btree_node)) / \
+ (sizeof(grub_uint64_t) + sizeof(grub_uint64_t)) )
+
+
+struct grub_fshelp_node
+{
+ struct grub_nilfs2_data *data;
+ struct grub_nilfs2_inode inode;
+ grub_uint64_t ino;
+ int inode_read;
+};
+
+struct grub_nilfs2_data
+{
+ struct grub_nilfs2_super_block sblock;
+ struct grub_nilfs2_super_root sroot;
+ struct grub_nilfs2_inode ifile;
+ grub_disk_t disk;
+ struct grub_nilfs2_inode *inode;
+ struct grub_fshelp_node diropen;
+};
+
+/* Log2 size of nilfs2 block in 512 blocks. */
+#define LOG2_NILFS2_BLOCK_SIZE(data) \
+ (grub_le_to_cpu32 (data->sblock.s_log_block_size) + 1)
+
+/* Log2 size of nilfs2 block in bytes. */
+#define LOG2_BLOCK_SIZE(data) \
+ (grub_le_to_cpu32 (data->sblock.s_log_block_size) + 10)
+
+/* The size of an nilfs2 block in bytes. */
+#define NILFS2_BLOCK_SIZE(data) (1 << LOG2_BLOCK_SIZE (data))
+
+static grub_uint64_t
+grub_nilfs2_dat_translate (struct grub_nilfs2_data *data, grub_uint64_t key);
+static grub_dl_t my_mod;
+
+
+
+static inline unsigned long
+grub_nilfs2_palloc_entries_per_group (struct grub_nilfs2_data *data)
+{
+ return 1UL << (LOG2_BLOCK_SIZE (data) + 3);
+}
+
+static inline grub_uint64_t
+grub_nilfs2_palloc_group (struct grub_nilfs2_data *data,
+ grub_uint64_t nr, grub_uint32_t * offset)
+{
+ return grub_divmod64 (nr, grub_nilfs2_palloc_entries_per_group (data),
+ offset);
+}
+
+static inline grub_uint32_t
+grub_nilfs2_palloc_groups_per_desc_block (struct grub_nilfs2_data *data)
+{
+ return NILFS2_BLOCK_SIZE (data) /
+ sizeof (struct grub_nilfs2_palloc_group_desc);
+}
+
+static inline grub_uint32_t
+grub_nilfs2_entries_per_block (struct grub_nilfs2_data *data,
+ unsigned long entry_size)
+{
+ return NILFS2_BLOCK_SIZE (data) / entry_size;
+}
+
+
+static inline grub_uint32_t
+grub_nilfs2_blocks_per_group (struct grub_nilfs2_data *data,
+ unsigned long entry_size)
+{
+ return grub_div_roundup (grub_nilfs2_palloc_entries_per_group (data),
+ grub_nilfs2_entries_per_block (data,
+ entry_size)) + 1;
+}
+
+static inline grub_uint32_t
+grub_nilfs2_blocks_per_desc_block (struct grub_nilfs2_data *data,
+ unsigned long entry_size)
+{
+ return grub_nilfs2_palloc_groups_per_desc_block (data) *
+ grub_nilfs2_blocks_per_group (data, entry_size) + 1;
+}
+
+static inline grub_uint32_t
+grub_nilfs2_palloc_desc_block_offset (struct grub_nilfs2_data *data,
+ unsigned long group,
+ unsigned long entry_size)
+{
+ grub_uint32_t desc_block =
+ group / grub_nilfs2_palloc_groups_per_desc_block (data);
+ return desc_block * grub_nilfs2_blocks_per_desc_block (data, entry_size);
+}
+
+static inline grub_uint32_t
+grub_nilfs2_palloc_bitmap_block_offset (struct grub_nilfs2_data *data,
+ unsigned long group,
+ unsigned long entry_size)
+{
+ unsigned long desc_offset = group %
+ grub_nilfs2_palloc_groups_per_desc_block (data);
+
+ return grub_nilfs2_palloc_desc_block_offset (data, group, entry_size) + 1 +
+ desc_offset * grub_nilfs2_blocks_per_group (data, entry_size);
+}
+
+static inline grub_uint32_t
+grub_nilfs2_palloc_entry_offset (struct grub_nilfs2_data *data,
+ grub_uint64_t nr, unsigned long entry_size)
+{
+ unsigned long group;
+ grub_uint32_t group_offset;
+
+ group = grub_nilfs2_palloc_group (data, nr, &group_offset);
+
+ return grub_nilfs2_palloc_bitmap_block_offset (data, group,
+ entry_size) + 1 +
+ group_offset / grub_nilfs2_entries_per_block (data, entry_size);
+
+}
+
+static inline struct grub_nilfs2_btree_node *
+grub_nilfs2_btree_get_root (struct grub_nilfs2_inode *inode)
+{
+ return (struct grub_nilfs2_btree_node *) &inode->i_bmap[0];
+}
+
+static inline int
+grub_nilfs2_btree_get_level (struct grub_nilfs2_btree_node *node)
+{
+ return node->bn_level;
+}
+
+static inline grub_uint64_t *
+grub_nilfs2_btree_node_dkeys (struct grub_nilfs2_btree_node *node)
+{
+ return (grub_uint64_t *) ((char *) (node + 1) +
+ ((node->bn_flags & NILFS_BTREE_NODE_ROOT) ?
+ 0 : NILFS_BTREE_NODE_EXTRA_PAD_SIZE));
+}
+
+static inline grub_uint64_t
+grub_nilfs2_btree_node_get_key (struct grub_nilfs2_btree_node *node,
+ int index)
+{
+ return grub_le_to_cpu64 (*(grub_nilfs2_btree_node_dkeys (node) + index));
+}
+
+static inline int
+grub_nilfs2_btree_node_lookup (struct grub_nilfs2_btree_node *node,
+ grub_uint64_t key, int *indexp)
+{
+ grub_uint64_t nkey;
+ int index, low, high, s;
+
+ low = 0;
+ high = grub_le_to_cpu16 (node->bn_nchildren) - 1;
+ index = 0;
+ s = 0;
+ while (low <= high)
+ {
+ index = (low + high) / 2;
+ nkey = grub_nilfs2_btree_node_get_key (node, index);
+ if (nkey == key)
+ {
+ *indexp = index;
+ return 1;
+ }
+ else if (nkey < key)
+ {
+ low = index + 1;
+ s = -1;
+ }
+ else
+ {
+ high = index - 1;
+ s = 1;
+ }
+ }
+
+ if (node->bn_level > NILFS_BTREE_LEVEL_NODE_MIN)
+ {
+ if (s > 0 && index > 0)
+ index--;
+ }
+ else if (s < 0)
+ index++;
+
+ *indexp = index;
+ return s == 0;
+}
+
+static inline int
+grub_nilfs2_btree_node_nchildren_max (struct grub_nilfs2_data *data,
+ struct grub_nilfs2_btree_node *node)
+{
+ int node_children_max = ((NILFS2_BLOCK_SIZE (data) -
+ sizeof (struct grub_nilfs2_btree_node) -
+ NILFS_BTREE_NODE_EXTRA_PAD_SIZE) /
+ (sizeof (grub_uint64_t) + sizeof (grub_uint64_t)));
+
+ return (node->bn_flags & NILFS_BTREE_NODE_ROOT) ? 3 : node_children_max;
+}
+
+static inline grub_uint64_t *
+grub_nilfs2_btree_node_dptrs (struct grub_nilfs2_data *data,
+ struct grub_nilfs2_btree_node *node)
+{
+ return (grub_uint64_t *) (grub_nilfs2_btree_node_dkeys (node) +
+ grub_nilfs2_btree_node_nchildren_max (data,
+ node));
+}
+
+static inline grub_uint64_t
+grub_nilfs2_btree_node_get_ptr (struct grub_nilfs2_data *data,
+ struct grub_nilfs2_btree_node *node,
+ int index)
+{
+ return
+ grub_le_to_cpu64 (*(grub_nilfs2_btree_node_dptrs (data, node) + index));
+}
+
+static inline int
+grub_nilfs2_btree_get_nonroot_node (struct grub_nilfs2_data *data,
+ grub_uint64_t ptr, void *block)
+{
+ grub_disk_t disk = data->disk;
+ unsigned int nilfs2_block_count = (1 << LOG2_NILFS2_BLOCK_SIZE (data));
+
+ return grub_disk_read (disk, ptr * nilfs2_block_count, 0,
+ NILFS2_BLOCK_SIZE (data), block);
+}
+
+static grub_uint64_t
+grub_nilfs2_btree_lookup (struct grub_nilfs2_data *data,
+ struct grub_nilfs2_inode *inode,
+ grub_uint64_t key, int need_translate)
+{
+ struct grub_nilfs2_btree_node *node;
+ unsigned char block[NILFS2_BLOCK_SIZE (data)];
+ grub_uint64_t ptr;
+ int level, found, index;
+
+ node = grub_nilfs2_btree_get_root (inode);
+ level = grub_nilfs2_btree_get_level (node);
+
+ found = grub_nilfs2_btree_node_lookup (node, key, &index);
+ ptr = grub_nilfs2_btree_node_get_ptr (data, node, index);
+ if (need_translate)
+ ptr = grub_nilfs2_dat_translate (data, ptr);
+
+ for (level--; level >= NILFS_BTREE_LEVEL_NODE_MIN; level--)
+ {
+ grub_nilfs2_btree_get_nonroot_node (data, ptr, block);
+ if (grub_errno)
+ {
+ return -1;
+ }
+ node = (struct grub_nilfs2_btree_node *) block;
+
+ if (node->bn_level != level)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "btree level mismatch\n");
+ return -1;
+ }
+
+ if (!found)
+ found = grub_nilfs2_btree_node_lookup (node, key, &index);
+ else
+ index = 0;
+
+ if (index < grub_nilfs2_btree_node_nchildren_max (data, node))
+ {
+ ptr = grub_nilfs2_btree_node_get_ptr (data, node, index);
+ if (need_translate)
+ ptr = grub_nilfs2_dat_translate (data, ptr);
+ }
+ else
+ {
+ grub_error (GRUB_ERR_BAD_FS, "btree corruption\n");
+ return -1;
+ }
+ }
+
+ if (!found)
+ return -1;
+
+ return ptr;
+}
+
+static inline grub_uint64_t
+grub_nilfs2_direct_lookup (struct grub_nilfs2_inode *inode, grub_uint64_t key)
+{
+ return grub_le_to_cpu64 (inode->i_bmap[1 + key]);
+}
+
+static inline grub_uint64_t
+grub_nilfs2_bmap_lookup (struct grub_nilfs2_data *data,
+ struct grub_nilfs2_inode *inode,
+ grub_uint64_t key, int need_translate)
+{
+ struct grub_nilfs2_btree_node *root = grub_nilfs2_btree_get_root (inode);
+ if (root->bn_flags & NILFS_BMAP_LARGE)
+ return grub_nilfs2_btree_lookup (data, inode, key, need_translate);
+ else
+ {
+ grub_uint64_t ptr;
+ ptr = grub_nilfs2_direct_lookup (inode, key);
+ if (need_translate)
+ ptr = grub_nilfs2_dat_translate (data, ptr);
+ return ptr;
+ }
+}
+
+static grub_uint64_t
+grub_nilfs2_dat_translate (struct grub_nilfs2_data *data, grub_uint64_t key)
+{
+ struct grub_nilfs2_dat_entry entry;
+ grub_disk_t disk = data->disk;
+ grub_uint64_t pptr;
+ grub_uint32_t blockno, offset;
+ unsigned int nilfs2_block_count = (1 << LOG2_NILFS2_BLOCK_SIZE (data));
+
+ blockno = grub_nilfs2_palloc_entry_offset (data, key,
+ sizeof (struct
+ grub_nilfs2_dat_entry));
+
+ grub_divmod64 (key * sizeof (struct grub_nilfs2_dat_entry),
+ NILFS2_BLOCK_SIZE (data), &offset);
+
+ pptr = grub_nilfs2_bmap_lookup (data, &data->sroot.sr_dat, blockno, 0);
+ if (pptr == (grub_uint64_t) - 1)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "btree lookup failure");
+ return -1;
+ }
+
+ grub_disk_read (disk, pptr * nilfs2_block_count, offset,
+ sizeof (struct grub_nilfs2_dat_entry), &entry);
+
+ return grub_le_to_cpu64 (entry.de_blocknr);
+}
+
+
+static grub_disk_addr_t
+grub_nilfs2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ struct grub_nilfs2_data *data = node->data;
+ struct grub_nilfs2_inode *inode = &node->inode;
+ grub_uint64_t pptr = -1;
+
+ pptr = grub_nilfs2_bmap_lookup (data, inode, fileblock, 1);
+ if (pptr == (grub_uint64_t) - 1)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "btree lookup failure");
+ return -1;
+ }
+
+ return pptr;
+}
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_nilfs2_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t
+ sector,
+ unsigned offset,
+ unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_nilfs2_read_block,
+ grub_le_to_cpu64 (node->inode.i_size),
+ LOG2_NILFS2_BLOCK_SIZE (node->data));
+
+}
+
+static grub_err_t
+grub_nilfs2_read_checkpoint (struct grub_nilfs2_data *data,
+ grub_uint64_t cpno,
+ struct grub_nilfs2_checkpoint *cpp)
+{
+ grub_uint64_t blockno;
+ grub_uint32_t offset;
+ grub_uint64_t pptr;
+ grub_disk_t disk = data->disk;
+ unsigned int nilfs2_block_count = (1 << LOG2_NILFS2_BLOCK_SIZE (data));
+
+ /* Assume sizeof(struct grub_nilfs2_cpfile_header) <
+ sizeof(struct grub_nilfs2_checkpoint).
+ */
+ blockno = grub_divmod64 (cpno, NILFS2_BLOCK_SIZE (data) /
+ sizeof (struct grub_nilfs2_checkpoint), &offset);
+
+ pptr = grub_nilfs2_bmap_lookup (data, &data->sroot.sr_cpfile, blockno, 1);
+ if (pptr == (grub_uint64_t) - 1)
+ {
+ return grub_error (GRUB_ERR_BAD_FS, "btree lookup failure");
+ }
+
+ return grub_disk_read (disk, pptr * nilfs2_block_count,
+ offset * sizeof (struct grub_nilfs2_checkpoint),
+ sizeof (struct grub_nilfs2_checkpoint), cpp);
+}
+
+static inline grub_err_t
+grub_nilfs2_read_last_checkpoint (struct grub_nilfs2_data *data,
+ struct grub_nilfs2_checkpoint *cpp)
+{
+ return grub_nilfs2_read_checkpoint (data,
+ grub_le_to_cpu64 (data->
+ sblock.s_last_cno),
+ cpp);
+}
+
+/* Read the inode INO for the file described by DATA into INODE. */
+static grub_err_t
+grub_nilfs2_read_inode (struct grub_nilfs2_data *data,
+ grub_uint64_t ino, struct grub_nilfs2_inode *inodep)
+{
+ grub_uint64_t blockno;
+ unsigned int offset;
+ grub_uint64_t pptr;
+ grub_disk_t disk = data->disk;
+ unsigned int nilfs2_block_count = (1 << LOG2_NILFS2_BLOCK_SIZE (data));
+
+ blockno = grub_nilfs2_palloc_entry_offset (data, ino,
+ sizeof (struct
+ grub_nilfs2_inode));
+
+ grub_divmod64 (sizeof (struct grub_nilfs2_inode) * ino,
+ NILFS2_BLOCK_SIZE (data), &offset);
+ pptr = grub_nilfs2_bmap_lookup (data, &data->ifile, blockno, 1);
+ if (pptr == (grub_uint64_t) - 1)
+ {
+ return grub_error (GRUB_ERR_BAD_FS, "btree lookup failure");
+ }
+
+ return grub_disk_read (disk, pptr * nilfs2_block_count, offset,
+ sizeof (struct grub_nilfs2_inode), inodep);
+}
+
+static int
+grub_nilfs2_valid_sb (struct grub_nilfs2_super_block *sbp)
+{
+ if (grub_le_to_cpu16 (sbp->s_magic) != NILFS2_SUPER_MAGIC)
+ return 0;
+
+ if (grub_le_to_cpu32 (sbp->s_rev_level) != NILFS_SUPORT_REV)
+ return 0;
+
+ return 1;
+}
+
+static grub_err_t
+grub_nilfs2_load_sb (struct grub_nilfs2_data *data)
+{
+ grub_disk_t disk = data->disk;
+ struct grub_nilfs2_super_block sb2;
+ grub_uint64_t partition_size;
+ int valid[2];
+ int swp = 0;
+ grub_err_t err;
+
+ /* Read first super block. */
+ err = grub_disk_read (disk, NILFS_1ST_SUPER_BLOCK, 0,
+ sizeof (struct grub_nilfs2_super_block), &data->sblock);
+ if (err)
+ return err;
+ /* Make sure if 1st super block is valid. */
+ valid[0] = grub_nilfs2_valid_sb (&data->sblock);
+
+ partition_size = grub_disk_get_size (disk);
+ if (partition_size != GRUB_DISK_SIZE_UNKNOWN)
+ {
+ /* Read second super block. */
+ err = grub_disk_read (disk, NILFS_2ND_SUPER_BLOCK (partition_size), 0,
+ sizeof (struct grub_nilfs2_super_block), &sb2);
+ if (err)
+ {
+ valid[1] = 0;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ else
+ /* Make sure if 2nd super block is valid. */
+ valid[1] = grub_nilfs2_valid_sb (&sb2);
+ }
+ else
+ /* 2nd super block may not exist, so it's invalid. */
+ valid[1] = 0;
+
+ if (!valid[0] && !valid[1])
+ return grub_error (GRUB_ERR_BAD_FS, "not a nilfs2 filesystem");
+
+ swp = valid[1] && (!valid[0] ||
+ grub_le_to_cpu64 (data->sblock.s_last_cno) <
+ grub_le_to_cpu64 (sb2.s_last_cno));
+
+ /* swap if first super block is invalid or older than second one. */
+ if (swp)
+ grub_memcpy (&data->sblock, &sb2,
+ sizeof (struct grub_nilfs2_super_block));
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_nilfs2_data *
+grub_nilfs2_mount (grub_disk_t disk)
+{
+ struct grub_nilfs2_data *data;
+ struct grub_nilfs2_segment_summary ss;
+ struct grub_nilfs2_checkpoint last_checkpoint;
+ grub_uint64_t last_pseg;
+ grub_uint32_t nblocks;
+ unsigned int nilfs2_block_count;
+
+ data = grub_malloc (sizeof (struct grub_nilfs2_data));
+ if (!data)
+ return 0;
+
+ data->disk = disk;
+
+ /* Read the superblock. */
+ grub_nilfs2_load_sb (data);
+ if (grub_errno)
+ goto fail;
+
+ nilfs2_block_count = (1 << LOG2_NILFS2_BLOCK_SIZE (data));
+
+ /* Read the last segment summary. */
+ last_pseg = grub_le_to_cpu64 (data->sblock.s_last_pseg);
+ grub_disk_read (disk, last_pseg * nilfs2_block_count, 0,
+ sizeof (struct grub_nilfs2_segment_summary), &ss);
+
+ if (grub_errno)
+ goto fail;
+
+ /* Read the super root block. */
+ nblocks = grub_le_to_cpu32 (ss.ss_nblocks);
+ grub_disk_read (disk, (last_pseg + (nblocks - 1)) * nilfs2_block_count, 0,
+ sizeof (struct grub_nilfs2_super_root), &data->sroot);
+
+ if (grub_errno)
+ goto fail;
+
+ grub_nilfs2_read_last_checkpoint (data, &last_checkpoint);
+
+ if (grub_errno)
+ goto fail;
+
+ grub_memcpy (&data->ifile, &last_checkpoint.cp_ifile_inode,
+ sizeof (struct grub_nilfs2_inode));
+
+ data->diropen.data = data;
+ data->diropen.ino = 2;
+ data->diropen.inode_read = 1;
+ data->inode = &data->diropen.inode;
+
+ grub_nilfs2_read_inode (data, 2, data->inode);
+
+ return data;
+
+fail:
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not a nilfs2 filesystem");
+
+ grub_free (data);
+ return 0;
+}
+
+static char *
+grub_nilfs2_read_symlink (grub_fshelp_node_t node)
+{
+ char *symlink;
+ struct grub_fshelp_node *diro = node;
+
+ if (!diro->inode_read)
+ {
+ grub_nilfs2_read_inode (diro->data, diro->ino, &diro->inode);
+ if (grub_errno)
+ return 0;
+ }
+
+ symlink = grub_malloc (grub_le_to_cpu64 (diro->inode.i_size) + 1);
+ if (!symlink)
+ return 0;
+
+ grub_nilfs2_read_file (diro, 0, 0,
+ grub_le_to_cpu64 (diro->inode.i_size), symlink);
+ if (grub_errno)
+ {
+ grub_free (symlink);
+ return 0;
+ }
+
+ symlink[grub_le_to_cpu64 (diro->inode.i_size)] = '\0';
+ return symlink;
+}
+
+static int
+grub_nilfs2_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ unsigned int fpos = 0;
+ struct grub_fshelp_node *diro = (struct grub_fshelp_node *) dir;
+
+ if (!diro->inode_read)
+ {
+ grub_nilfs2_read_inode (diro->data, diro->ino, &diro->inode);
+ if (grub_errno)
+ return 0;
+ }
+
+ /* Iterate files. */
+ while (fpos < grub_le_to_cpu64 (diro->inode.i_size))
+ {
+ struct grub_nilfs2_dir_entry dirent;
+
+ grub_nilfs2_read_file (diro, 0, fpos,
+ sizeof (struct grub_nilfs2_dir_entry),
+ (char *) &dirent);
+ if (grub_errno)
+ return 0;
+
+ if (dirent.rec_len == 0)
+ return 0;
+
+ if (dirent.name_len != 0)
+ {
+ char filename[dirent.name_len + 1];
+ struct grub_fshelp_node *fdiro;
+ enum grub_fshelp_filetype type = GRUB_FSHELP_UNKNOWN;
+
+ grub_nilfs2_read_file (diro, 0,
+ fpos + sizeof (struct grub_nilfs2_dir_entry),
+ dirent.name_len, filename);
+ if (grub_errno)
+ return 0;
+
+ fdiro = grub_malloc (sizeof (struct grub_fshelp_node));
+ if (!fdiro)
+ return 0;
+
+ fdiro->data = diro->data;
+ fdiro->ino = grub_le_to_cpu64 (dirent.inode);
+
+ filename[dirent.name_len] = '\0';
+
+ if (dirent.file_type != NILFS_FT_UNKNOWN)
+ {
+ fdiro->inode_read = 0;
+
+ if (dirent.file_type == NILFS_FT_DIR)
+ type = GRUB_FSHELP_DIR;
+ else if (dirent.file_type == NILFS_FT_SYMLINK)
+ type = GRUB_FSHELP_SYMLINK;
+ else if (dirent.file_type == NILFS_FT_REG_FILE)
+ type = GRUB_FSHELP_REG;
+ }
+ else
+ {
+ /* The filetype can not be read from the dirent, read
+ the inode to get more information. */
+ grub_nilfs2_read_inode (diro->data,
+ grub_le_to_cpu64 (dirent.inode),
+ &fdiro->inode);
+ if (grub_errno)
+ {
+ grub_free (fdiro);
+ return 0;
+ }
+
+ fdiro->inode_read = 1;
+
+ if ((grub_le_to_cpu16 (fdiro->inode.i_mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_DIRECTORY)
+ type = GRUB_FSHELP_DIR;
+ else if ((grub_le_to_cpu16 (fdiro->inode.i_mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_SYMLINK)
+ type = GRUB_FSHELP_SYMLINK;
+ else if ((grub_le_to_cpu16 (fdiro->inode.i_mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_REG)
+ type = GRUB_FSHELP_REG;
+ }
+
+ if (hook (filename, type, fdiro))
+ return 1;
+ }
+
+ fpos += grub_le_to_cpu16 (dirent.rec_len);
+ }
+
+ return 0;
+}
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_nilfs2_open (struct grub_file *file, const char *name)
+{
+ struct grub_nilfs2_data *data = NULL;
+ struct grub_fshelp_node *fdiro = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_nilfs2_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (name, &data->diropen, &fdiro,
+ grub_nilfs2_iterate_dir, grub_nilfs2_read_symlink,
+ GRUB_FSHELP_REG);
+ if (grub_errno)
+ goto fail;
+
+ if (!fdiro->inode_read)
+ {
+ grub_nilfs2_read_inode (data, fdiro->ino, &fdiro->inode);
+ if (grub_errno)
+ goto fail;
+ }
+
+ grub_memcpy (data->inode, &fdiro->inode, sizeof (struct grub_nilfs2_inode));
+ grub_free (fdiro);
+
+ file->size = grub_le_to_cpu64 (data->inode->i_size);
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+fail:
+ if (fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_nilfs2_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Read LEN bytes data from FILE into BUF. */
+static grub_ssize_t
+grub_nilfs2_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_nilfs2_data *data = (struct grub_nilfs2_data *) file->data;
+
+ return grub_nilfs2_read_file (&data->diropen, file->read_hook,
+ file->offset, len, buf);
+}
+
+static grub_err_t
+grub_nilfs2_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info * info))
+{
+ struct grub_nilfs2_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ if (!node->inode_read)
+ {
+ grub_nilfs2_read_inode (data, node->ino, &node->inode);
+ if (!grub_errno)
+ node->inode_read = 1;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (node->inode_read)
+ {
+ info.mtimeset = 1;
+ info.mtime = grub_le_to_cpu64 (node->inode.i_mtime);
+ }
+
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_nilfs2_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (path, &data->diropen, &fdiro,
+ grub_nilfs2_iterate_dir, grub_nilfs2_read_symlink,
+ GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+
+ grub_nilfs2_iterate_dir (fdiro, iterate);
+
+fail:
+ if (fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_nilfs2_label (grub_device_t device, char **label)
+{
+ struct grub_nilfs2_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_nilfs2_mount (disk);
+ if (data)
+ *label = grub_strndup (data->sblock.s_volume_name, 14);
+ else
+ *label = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_nilfs2_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_nilfs2_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_nilfs2_mount (disk);
+ if (data)
+ {
+ *uuid =
+ grub_xasprintf
+ ("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%0x-%02x%02x%02x%02x%02x%02x",
+ data->sblock.s_uuid[0], data->sblock.s_uuid[1],
+ data->sblock.s_uuid[2], data->sblock.s_uuid[3],
+ data->sblock.s_uuid[4], data->sblock.s_uuid[5],
+ data->sblock.s_uuid[6], data->sblock.s_uuid[7],
+ data->sblock.s_uuid[8], data->sblock.s_uuid[9],
+ data->sblock.s_uuid[10], data->sblock.s_uuid[11],
+ data->sblock.s_uuid[12], data->sblock.s_uuid[13],
+ data->sblock.s_uuid[14], data->sblock.s_uuid[15]);
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+/* Get mtime. */
+static grub_err_t
+grub_nilfs2_mtime (grub_device_t device, grub_int32_t * tm)
+{
+ struct grub_nilfs2_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_nilfs2_mount (disk);
+ if (!data)
+ *tm = 0;
+ else
+ *tm = (grub_int32_t) grub_le_to_cpu64 (data->sblock.s_mtime);
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+
+static struct grub_fs grub_nilfs2_fs = {
+ .name = "nilfs2",
+ .dir = grub_nilfs2_dir,
+ .open = grub_nilfs2_open,
+ .read = grub_nilfs2_read,
+ .close = grub_nilfs2_close,
+ .label = grub_nilfs2_label,
+ .uuid = grub_nilfs2_uuid,
+ .mtime = grub_nilfs2_mtime,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 1,
+#endif
+ .next = 0
+};
+
+GRUB_MOD_INIT (nilfs2)
+{
+ grub_fs_register (&grub_nilfs2_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI (nilfs2)
+{
+ grub_fs_unregister (&grub_nilfs2_fs);
+}
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
new file mode 100644
index 0000000..e01ce34
--- /dev/null
+++ b/grub-core/fs/ntfs.c
@@ -0,0 +1,1117 @@
+/* ntfs.c - NTFS filesystem */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/fshelp.h>
+#include <grub/ntfs.h>
+#include <grub/charset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+
+ntfscomp_func_t grub_ntfscomp_func;
+
+static grub_err_t
+fixup (struct grub_ntfs_data *data, char *buf, int len, char *magic)
+{
+ int ss;
+ char *pu;
+ grub_uint16_t us;
+
+ if (grub_memcmp (buf, magic, 4))
+ return grub_error (GRUB_ERR_BAD_FS, "%s label not found", magic);
+
+ ss = u16at (buf, 6) - 1;
+ if (ss * (int) data->blocksize != len * GRUB_DISK_SECTOR_SIZE)
+ return grub_error (GRUB_ERR_BAD_FS, "size not match",
+ ss * (int) data->blocksize,
+ len * GRUB_DISK_SECTOR_SIZE);
+ pu = buf + u16at (buf, 4);
+ us = u16at (pu, 0);
+ buf -= 2;
+ while (ss > 0)
+ {
+ buf += data->blocksize;
+ pu += 2;
+ if (u16at (buf, 0) != us)
+ return grub_error (GRUB_ERR_BAD_FS, "fixup signature not match");
+ v16at (buf, 0) = v16at (pu, 0);
+ ss--;
+ }
+
+ return 0;
+}
+
+static grub_err_t read_mft (struct grub_ntfs_data *data, char *buf,
+ grub_uint32_t mftno);
+static grub_err_t read_attr (struct grub_ntfs_attr *at, char *dest,
+ grub_disk_addr_t ofs, grub_size_t len,
+ int cached,
+ void
+ NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t
+ sector,
+ unsigned offset,
+ unsigned length));
+
+static grub_err_t read_data (struct grub_ntfs_attr *at, char *pa, char *dest,
+ grub_disk_addr_t ofs, grub_size_t len,
+ int cached,
+ void
+ NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t
+ sector,
+ unsigned offset,
+ unsigned length));
+
+static void
+init_attr (struct grub_ntfs_attr *at, struct grub_ntfs_file *mft)
+{
+ at->mft = mft;
+ at->flags = (mft == &mft->data->mmft) ? AF_MMFT : 0;
+ at->attr_nxt = mft->buf + u16at (mft->buf, 0x14);
+ at->attr_end = at->emft_buf = at->edat_buf = at->sbuf = NULL;
+}
+
+static void
+free_attr (struct grub_ntfs_attr *at)
+{
+ grub_free (at->emft_buf);
+ grub_free (at->edat_buf);
+ grub_free (at->sbuf);
+}
+
+static char *
+find_attr (struct grub_ntfs_attr *at, unsigned char attr)
+{
+ if (at->flags & AF_ALST)
+ {
+ retry:
+ while (at->attr_nxt < at->attr_end)
+ {
+ at->attr_cur = at->attr_nxt;
+ at->attr_nxt += u16at (at->attr_cur, 4);
+ if (((unsigned char) *at->attr_cur == attr) || (attr == 0))
+ {
+ char *new_pos;
+
+ if (at->flags & AF_MMFT)
+ {
+ if ((grub_disk_read
+ (at->mft->data->disk, v32at (at->attr_cur, 0x10), 0,
+ 512, at->emft_buf))
+ ||
+ (grub_disk_read
+ (at->mft->data->disk, v32at (at->attr_cur, 0x14), 0,
+ 512, at->emft_buf + 512)))
+ return NULL;
+
+ if (fixup
+ (at->mft->data, at->emft_buf, at->mft->data->mft_size,
+ "FILE"))
+ return NULL;
+ }
+ else
+ {
+ if (read_mft (at->mft->data, at->emft_buf,
+ u32at (at->attr_cur, 0x10)))
+ return NULL;
+ }
+
+ new_pos = &at->emft_buf[u16at (at->emft_buf, 0x14)];
+ while ((unsigned char) *new_pos != 0xFF)
+ {
+ if (((unsigned char) *new_pos ==
+ (unsigned char) *at->attr_cur)
+ && (u16at (new_pos, 0xE) == u16at (at->attr_cur, 0x18)))
+ {
+ return new_pos;
+ }
+ new_pos += u16at (new_pos, 4);
+ }
+ grub_error (GRUB_ERR_BAD_FS,
+ "can\'t find 0x%X in attribute list",
+ (unsigned char) *at->attr_cur);
+ return NULL;
+ }
+ }
+ return NULL;
+ }
+ at->attr_cur = at->attr_nxt;
+ while ((unsigned char) *at->attr_cur != 0xFF)
+ {
+ at->attr_nxt += u16at (at->attr_cur, 4);
+ if ((unsigned char) *at->attr_cur == AT_ATTRIBUTE_LIST)
+ at->attr_end = at->attr_cur;
+ if (((unsigned char) *at->attr_cur == attr) || (attr == 0))
+ return at->attr_cur;
+ at->attr_cur = at->attr_nxt;
+ }
+ if (at->attr_end)
+ {
+ char *pa;
+
+ at->emft_buf = grub_malloc (at->mft->data->mft_size << BLK_SHR);
+ if (at->emft_buf == NULL)
+ return NULL;
+
+ pa = at->attr_end;
+ if (pa[8])
+ {
+ int n;
+
+ n = ((u32at (pa, 0x30) + GRUB_DISK_SECTOR_SIZE - 1)
+ & (~(GRUB_DISK_SECTOR_SIZE - 1)));
+ at->attr_cur = at->attr_end;
+ at->edat_buf = grub_malloc (n);
+ if (!at->edat_buf)
+ return NULL;
+ if (read_data (at, pa, at->edat_buf, 0, n, 0, 0))
+ {
+ grub_error (GRUB_ERR_BAD_FS,
+ "fail to read non-resident attribute list");
+ return NULL;
+ }
+ at->attr_nxt = at->edat_buf;
+ at->attr_end = at->edat_buf + u32at (pa, 0x30);
+ }
+ else
+ {
+ at->attr_nxt = at->attr_end + u16at (pa, 0x14);
+ at->attr_end = at->attr_end + u32at (pa, 4);
+ }
+ at->flags |= AF_ALST;
+ while (at->attr_nxt < at->attr_end)
+ {
+ if (((unsigned char) *at->attr_nxt == attr) || (attr == 0))
+ break;
+ at->attr_nxt += u16at (at->attr_nxt, 4);
+ }
+ if (at->attr_nxt >= at->attr_end)
+ return NULL;
+
+ if ((at->flags & AF_MMFT) && (attr == AT_DATA))
+ {
+ at->flags |= AF_GPOS;
+ at->attr_cur = at->attr_nxt;
+ pa = at->attr_cur;
+ v32at (pa, 0x10) = at->mft->data->mft_start;
+ v32at (pa, 0x14) = at->mft->data->mft_start + 1;
+ pa = at->attr_nxt + u16at (pa, 4);
+ while (pa < at->attr_end)
+ {
+ if ((unsigned char) *pa != attr)
+ break;
+ if (read_attr
+ (at, pa + 0x10,
+ u32at (pa, 0x10) * (at->mft->data->mft_size << BLK_SHR),
+ at->mft->data->mft_size << BLK_SHR, 0, 0))
+ return NULL;
+ pa += u16at (pa, 4);
+ }
+ at->attr_nxt = at->attr_cur;
+ at->flags &= ~AF_GPOS;
+ }
+ goto retry;
+ }
+ return NULL;
+}
+
+static char *
+locate_attr (struct grub_ntfs_attr *at, struct grub_ntfs_file *mft,
+ unsigned char attr)
+{
+ char *pa;
+
+ init_attr (at, mft);
+ if ((pa = find_attr (at, attr)) == NULL)
+ return NULL;
+ if ((at->flags & AF_ALST) == 0)
+ {
+ while (1)
+ {
+ if ((pa = find_attr (at, attr)) == NULL)
+ break;
+ if (at->flags & AF_ALST)
+ return pa;
+ }
+ grub_errno = GRUB_ERR_NONE;
+ free_attr (at);
+ init_attr (at, mft);
+ pa = find_attr (at, attr);
+ }
+ return pa;
+}
+
+static char *
+read_run_data (char *run, int nn, grub_disk_addr_t * val, int sig)
+{
+ grub_disk_addr_t r, v;
+
+ r = 0;
+ v = 1;
+
+ while (nn--)
+ {
+ r += v * (*(unsigned char *) (run++));
+ v <<= 8;
+ }
+
+ if ((sig) && (r & (v >> 1)))
+ r -= v;
+
+ *val = r;
+ return run;
+}
+
+grub_err_t
+grub_ntfs_read_run_list (struct grub_ntfs_rlst * ctx)
+{
+ int c1, c2;
+ grub_disk_addr_t val;
+ char *run;
+
+ run = ctx->cur_run;
+retry:
+ c1 = ((unsigned char) (*run) & 0xF);
+ c2 = ((unsigned char) (*run) >> 4);
+ if (!c1)
+ {
+ if ((ctx->attr) && (ctx->attr->flags & AF_ALST))
+ {
+ void NESTED_FUNC_ATTR (*save_hook) (grub_disk_addr_t sector,
+ unsigned offset,
+ unsigned length);
+
+ save_hook = ctx->comp.disk->read_hook;
+ ctx->comp.disk->read_hook = 0;
+ run = find_attr (ctx->attr, (unsigned char) *ctx->attr->attr_cur);
+ ctx->comp.disk->read_hook = save_hook;
+ if (run)
+ {
+ if (run[8] == 0)
+ return grub_error (GRUB_ERR_BAD_FS,
+ "$DATA should be non-resident");
+
+ run += u16at (run, 0x20);
+ ctx->curr_lcn = 0;
+ goto retry;
+ }
+ }
+ return grub_error (GRUB_ERR_BAD_FS, "run list overflown");
+ }
+ run = read_run_data (run + 1, c1, &val, 0); /* length of current VCN */
+ ctx->curr_vcn = ctx->next_vcn;
+ ctx->next_vcn += val;
+ run = read_run_data (run, c2, &val, 1); /* offset to previous LCN */
+ ctx->curr_lcn += val;
+ if (val == 0)
+ ctx->flags |= RF_BLNK;
+ else
+ ctx->flags &= ~RF_BLNK;
+ ctx->cur_run = run;
+ return 0;
+}
+
+static grub_disk_addr_t
+grub_ntfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t block)
+{
+ struct grub_ntfs_rlst *ctx;
+
+ ctx = (struct grub_ntfs_rlst *) node;
+ if (block >= ctx->next_vcn)
+ {
+ if (grub_ntfs_read_run_list (ctx))
+ return -1;
+ return ctx->curr_lcn;
+ }
+ else
+ return (ctx->flags & RF_BLNK) ? 0 : (block -
+ ctx->curr_vcn + ctx->curr_lcn);
+}
+
+static grub_err_t
+read_data (struct grub_ntfs_attr *at, char *pa, char *dest,
+ grub_disk_addr_t ofs, grub_size_t len, int cached,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset,
+ unsigned length))
+{
+ grub_disk_addr_t vcn;
+ struct grub_ntfs_rlst cc, *ctx;
+
+ if (len == 0)
+ return 0;
+
+ grub_memset (&cc, 0, sizeof (cc));
+ ctx = &cc;
+ ctx->attr = at;
+ ctx->comp.spc = at->mft->data->spc;
+ ctx->comp.disk = at->mft->data->disk;
+
+ if (pa[8] == 0)
+ {
+ if (ofs + len > u32at (pa, 0x10))
+ return grub_error (GRUB_ERR_BAD_FS, "read out of range");
+ grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
+ return 0;
+ }
+
+ if (u16at (pa, 0xC) & FLAG_COMPRESSED)
+ ctx->flags |= RF_COMP;
+ else
+ ctx->flags &= ~RF_COMP;
+ ctx->cur_run = pa + u16at (pa, 0x20);
+
+ if (ctx->flags & RF_COMP)
+ {
+ if (!cached)
+ return grub_error (GRUB_ERR_BAD_FS, "attribute can\'t be compressed");
+
+ if (at->sbuf)
+ {
+ if ((ofs & (~(COM_LEN - 1))) == at->save_pos)
+ {
+ grub_disk_addr_t n;
+
+ n = COM_LEN - (ofs - at->save_pos);
+ if (n > len)
+ n = len;
+
+ grub_memcpy (dest, at->sbuf + ofs - at->save_pos, n);
+ if (n == len)
+ return 0;
+
+ dest += n;
+ len -= n;
+ ofs += n;
+ }
+ }
+ else
+ {
+ at->sbuf = grub_malloc (COM_LEN);
+ if (at->sbuf == NULL)
+ return grub_errno;
+ at->save_pos = 1;
+ }
+
+ vcn = ctx->target_vcn = (ofs >> COM_LOG_LEN) * (COM_SEC / ctx->comp.spc);
+ ctx->target_vcn &= ~0xF;
+ }
+ else
+ vcn = ctx->target_vcn = grub_divmod64 (ofs >> BLK_SHR, ctx->comp.spc, 0);
+
+ ctx->next_vcn = u32at (pa, 0x10);
+ ctx->curr_lcn = 0;
+ while (ctx->next_vcn <= ctx->target_vcn)
+ {
+ if (grub_ntfs_read_run_list (ctx))
+ return grub_errno;
+ }
+
+ if (at->flags & AF_GPOS)
+ {
+ grub_disk_addr_t st0, st1;
+ grub_uint32_t m;
+
+ grub_divmod64 (ofs >> BLK_SHR, ctx->comp.spc, &m);
+
+ st0 =
+ (ctx->target_vcn - ctx->curr_vcn + ctx->curr_lcn) * ctx->comp.spc + m;
+ st1 = st0 + 1;
+ if (st1 ==
+ (ctx->next_vcn - ctx->curr_vcn + ctx->curr_lcn) * ctx->comp.spc)
+ {
+ if (grub_ntfs_read_run_list (ctx))
+ return grub_errno;
+ st1 = ctx->curr_lcn * ctx->comp.spc;
+ }
+ v32at (dest, 0) = st0;
+ v32at (dest, 4) = st1;
+ return 0;
+ }
+
+ if (!(ctx->flags & RF_COMP))
+ {
+ unsigned int pow;
+
+ if (!grub_fshelp_log2blksize (ctx->comp.spc, &pow))
+ grub_fshelp_read_file (ctx->comp.disk, (grub_fshelp_node_t) ctx,
+ read_hook, ofs, len, dest,
+ grub_ntfs_read_block, ofs + len, pow);
+ return grub_errno;
+ }
+
+ return (grub_ntfscomp_func) ? grub_ntfscomp_func (at, dest, ofs, len, ctx,
+ vcn) :
+ grub_error (GRUB_ERR_BAD_FS, "ntfscomp module not loaded");
+}
+
+static grub_err_t
+read_attr (struct grub_ntfs_attr *at, char *dest, grub_disk_addr_t ofs,
+ grub_size_t len, int cached,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset,
+ unsigned length))
+{
+ char *save_cur;
+ unsigned char attr;
+ char *pp;
+ grub_err_t ret;
+
+ save_cur = at->attr_cur;
+ at->attr_nxt = at->attr_cur;
+ attr = (unsigned char) *at->attr_nxt;
+ if (at->flags & AF_ALST)
+ {
+ char *pa;
+ grub_disk_addr_t vcn;
+
+ vcn = grub_divmod64 (ofs, at->mft->data->spc << BLK_SHR, 0);
+ pa = at->attr_nxt + u16at (at->attr_nxt, 4);
+ while (pa < at->attr_end)
+ {
+ if ((unsigned char) *pa != attr)
+ break;
+ if (u32at (pa, 8) > vcn)
+ break;
+ at->attr_nxt = pa;
+ pa += u16at (pa, 4);
+ }
+ }
+ pp = find_attr (at, attr);
+ if (pp)
+ ret = read_data (at, pp, dest, ofs, len, cached, read_hook);
+ else
+ ret =
+ (grub_errno) ? grub_errno : grub_error (GRUB_ERR_BAD_FS,
+ "attribute not found");
+ at->attr_cur = save_cur;
+ return ret;
+}
+
+static grub_err_t
+read_mft (struct grub_ntfs_data *data, char *buf, grub_uint32_t mftno)
+{
+ if (read_attr
+ (&data->mmft.attr, buf, mftno * ((grub_disk_addr_t) data->mft_size << BLK_SHR),
+ data->mft_size << BLK_SHR, 0, 0))
+ return grub_error (GRUB_ERR_BAD_FS, "read MFT 0x%X fails", mftno);
+ return fixup (data, buf, data->mft_size, "FILE");
+}
+
+static grub_err_t
+init_file (struct grub_ntfs_file *mft, grub_uint32_t mftno)
+{
+ unsigned short flag;
+
+ mft->inode_read = 1;
+
+ mft->buf = grub_malloc (mft->data->mft_size << BLK_SHR);
+ if (mft->buf == NULL)
+ return grub_errno;
+
+ if (read_mft (mft->data, mft->buf, mftno))
+ return grub_errno;
+
+ flag = u16at (mft->buf, 0x16);
+ if ((flag & 1) == 0)
+ return grub_error (GRUB_ERR_BAD_FS, "MFT 0x%X is not in use", mftno);
+
+ if ((flag & 2) == 0)
+ {
+ char *pa;
+
+ pa = locate_attr (&mft->attr, mft, AT_DATA);
+ if (pa == NULL)
+ return grub_error (GRUB_ERR_BAD_FS, "no $DATA in MFT 0x%X", mftno);
+
+ if (!pa[8])
+ mft->size = u32at (pa, 0x10);
+ else
+ mft->size = u64at (pa, 0x30);
+
+ if ((mft->attr.flags & AF_ALST) == 0)
+ mft->attr.attr_end = 0; /* Don't jump to attribute list */
+ }
+ else
+ init_attr (&mft->attr, mft);
+
+ return 0;
+}
+
+static void
+free_file (struct grub_ntfs_file *mft)
+{
+ free_attr (&mft->attr);
+ grub_free (mft->buf);
+}
+
+static int
+list_file (struct grub_ntfs_file *diro, char *pos,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ char *np;
+ int ns;
+
+ while (1)
+ {
+ char *ustr, namespace;
+
+ if (pos[0xC] & 2) /* end signature */
+ break;
+
+ np = pos + 0x50;
+ ns = (unsigned char) *(np++);
+ namespace = *(np++);
+
+ /*
+ * Ignore files in DOS namespace, as they will reappear as Win32
+ * names.
+ */
+ if ((ns) && (namespace != 2))
+ {
+ enum grub_fshelp_filetype type;
+ struct grub_ntfs_file *fdiro;
+
+ if (u16at (pos, 4))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "64-bit MFT number");
+ return 0;
+ }
+
+ type =
+ (u32at (pos, 0x48) & ATTR_DIRECTORY) ? GRUB_FSHELP_DIR :
+ GRUB_FSHELP_REG;
+
+ fdiro = grub_zalloc (sizeof (struct grub_ntfs_file));
+ if (!fdiro)
+ return 0;
+
+ fdiro->data = diro->data;
+ fdiro->ino = u32at (pos, 0);
+
+ ustr = grub_malloc (ns * 4 + 1);
+ if (ustr == NULL)
+ return 0;
+ *grub_utf16_to_utf8 ((grub_uint8_t *) ustr, (grub_uint16_t *) np,
+ ns) = '\0';
+
+ if (namespace)
+ type |= GRUB_FSHELP_CASE_INSENSITIVE;
+
+ if (hook (ustr, type, fdiro))
+ {
+ grub_free (ustr);
+ return 1;
+ }
+
+ grub_free (ustr);
+ }
+ pos += u16at (pos, 8);
+ }
+ return 0;
+}
+
+static int
+grub_ntfs_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ unsigned char *bitmap;
+ struct grub_ntfs_attr attr, *at;
+ char *cur_pos, *indx, *bmp;
+ int ret = 0;
+ grub_size_t bitmap_len;
+ struct grub_ntfs_file *mft;
+
+ mft = (struct grub_ntfs_file *) dir;
+
+ if (!mft->inode_read)
+ {
+ if (init_file (mft, mft->ino))
+ return 0;
+ }
+
+ indx = NULL;
+ bmp = NULL;
+
+ at = &attr;
+ init_attr (at, mft);
+ while (1)
+ {
+ if ((cur_pos = find_attr (at, AT_INDEX_ROOT)) == NULL)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "no $INDEX_ROOT");
+ goto done;
+ }
+
+ /* Resident, Namelen=4, Offset=0x18, Flags=0x00, Name="$I30" */
+ if ((u32at (cur_pos, 8) != 0x180400) ||
+ (u32at (cur_pos, 0x18) != 0x490024) ||
+ (u32at (cur_pos, 0x1C) != 0x300033))
+ continue;
+ cur_pos += u16at (cur_pos, 0x14);
+ if (*cur_pos != 0x30) /* Not filename index */
+ continue;
+ break;
+ }
+
+ cur_pos += 0x10; /* Skip index root */
+ ret = list_file (mft, cur_pos + u16at (cur_pos, 0), hook);
+ if (ret)
+ goto done;
+
+ bitmap = NULL;
+ bitmap_len = 0;
+ free_attr (at);
+ init_attr (at, mft);
+ while ((cur_pos = find_attr (at, AT_BITMAP)) != NULL)
+ {
+ int ofs;
+
+ ofs = (unsigned char) cur_pos[0xA];
+ /* Namelen=4, Name="$I30" */
+ if ((cur_pos[9] == 4) &&
+ (u32at (cur_pos, ofs) == 0x490024) &&
+ (u32at (cur_pos, ofs + 4) == 0x300033))
+ {
+ int is_resident = (cur_pos[8] == 0);
+
+ bitmap_len = ((is_resident) ? u32at (cur_pos, 0x10) :
+ u32at (cur_pos, 0x28));
+
+ bmp = grub_malloc (bitmap_len);
+ if (bmp == NULL)
+ goto done;
+
+ if (is_resident)
+ {
+ grub_memcpy (bmp, (char *) (cur_pos + u16at (cur_pos, 0x14)),
+ bitmap_len);
+ }
+ else
+ {
+ if (read_data (at, cur_pos, bmp, 0, bitmap_len, 0, 0))
+ {
+ grub_error (GRUB_ERR_BAD_FS,
+ "fails to read non-resident $BITMAP");
+ goto done;
+ }
+ bitmap_len = u32at (cur_pos, 0x30);
+ }
+
+ bitmap = (unsigned char *) bmp;
+ break;
+ }
+ }
+
+ free_attr (at);
+ cur_pos = locate_attr (at, mft, AT_INDEX_ALLOCATION);
+ while (cur_pos != NULL)
+ {
+ /* Non-resident, Namelen=4, Offset=0x40, Flags=0, Name="$I30" */
+ if ((u32at (cur_pos, 8) == 0x400401) &&
+ (u32at (cur_pos, 0x40) == 0x490024) &&
+ (u32at (cur_pos, 0x44) == 0x300033))
+ break;
+ cur_pos = find_attr (at, AT_INDEX_ALLOCATION);
+ }
+
+ if ((!cur_pos) && (bitmap))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "$BITMAP without $INDEX_ALLOCATION");
+ goto done;
+ }
+
+ if (bitmap)
+ {
+ grub_disk_addr_t v, i;
+
+ indx = grub_malloc (mft->data->idx_size << BLK_SHR);
+ if (indx == NULL)
+ goto done;
+
+ v = 1;
+ for (i = 0; i < (grub_disk_addr_t)bitmap_len * 8; i++)
+ {
+ if (*bitmap & v)
+ {
+ if ((read_attr
+ (at, indx, i * (mft->data->idx_size << BLK_SHR),
+ (mft->data->idx_size << BLK_SHR), 0, 0))
+ || (fixup (mft->data, indx, mft->data->idx_size, "INDX")))
+ goto done;
+ ret = list_file (mft, &indx[0x18 + u16at (indx, 0x18)], hook);
+ if (ret)
+ goto done;
+ }
+ v <<= 1;
+ if (v >= 0x100)
+ {
+ v = 1;
+ bitmap++;
+ }
+ }
+ }
+
+done:
+ free_attr (at);
+ grub_free (indx);
+ grub_free (bmp);
+
+ return ret;
+}
+
+static struct grub_ntfs_data *
+grub_ntfs_mount (grub_disk_t disk)
+{
+ struct grub_ntfs_bpb bpb;
+ struct grub_ntfs_data *data = 0;
+
+ if (!disk)
+ goto fail;
+
+ data = (struct grub_ntfs_data *) grub_zalloc (sizeof (*data));
+ if (!data)
+ goto fail;
+
+ data->disk = disk;
+
+ /* Read the BPB. */
+ if (grub_disk_read (disk, 0, 0, sizeof (bpb), &bpb))
+ goto fail;
+
+ if (grub_memcmp ((char *) &bpb.oem_name, "NTFS", 4))
+ goto fail;
+
+ data->blocksize = grub_le_to_cpu16 (bpb.bytes_per_sector);
+ data->spc = bpb.sectors_per_cluster * (data->blocksize >> BLK_SHR);
+
+ if (bpb.clusters_per_mft > 0)
+ data->mft_size = data->spc * bpb.clusters_per_mft;
+ else
+ data->mft_size = 1 << (-bpb.clusters_per_mft - BLK_SHR);
+
+ if (bpb.clusters_per_index > 0)
+ data->idx_size = data->spc * bpb.clusters_per_index;
+ else
+ data->idx_size = 1 << (-bpb.clusters_per_index - BLK_SHR);
+
+ data->mft_start = grub_le_to_cpu64 (bpb.mft_lcn) * data->spc;
+
+ if ((data->mft_size > MAX_MFT) || (data->idx_size > MAX_IDX))
+ goto fail;
+
+ data->mmft.data = data;
+ data->cmft.data = data;
+
+ data->mmft.buf = grub_malloc (data->mft_size << BLK_SHR);
+ if (!data->mmft.buf)
+ goto fail;
+
+ if (grub_disk_read
+ (disk, data->mft_start, 0, data->mft_size << BLK_SHR, data->mmft.buf))
+ goto fail;
+
+ data->uuid = grub_le_to_cpu64 (bpb.num_serial);
+
+ if (fixup (data, data->mmft.buf, data->mft_size, "FILE"))
+ goto fail;
+
+ if (!locate_attr (&data->mmft.attr, &data->mmft, AT_DATA))
+ goto fail;
+
+ if (init_file (&data->cmft, FILE_ROOT))
+ goto fail;
+
+ return data;
+
+fail:
+ grub_error (GRUB_ERR_BAD_FS, "not an ntfs filesystem");
+
+ if (data)
+ {
+ free_file (&data->mmft);
+ free_file (&data->cmft);
+ grub_free (data);
+ }
+ return 0;
+}
+
+static grub_err_t
+grub_ntfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_ntfs_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ntfs_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (path, &data->cmft, &fdiro, grub_ntfs_iterate_dir,
+ 0, GRUB_FSHELP_DIR);
+
+ if (grub_errno)
+ goto fail;
+
+ grub_ntfs_iterate_dir (fdiro, iterate);
+
+fail:
+ if ((fdiro) && (fdiro != &data->cmft))
+ {
+ free_file (fdiro);
+ grub_free (fdiro);
+ }
+ if (data)
+ {
+ free_file (&data->mmft);
+ free_file (&data->cmft);
+ grub_free (data);
+ }
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_ntfs_open (grub_file_t file, const char *name)
+{
+ struct grub_ntfs_data *data = 0;
+ struct grub_fshelp_node *mft = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ntfs_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (name, &data->cmft, &mft, grub_ntfs_iterate_dir,
+ 0, GRUB_FSHELP_REG);
+
+ if (grub_errno)
+ goto fail;
+
+ if (mft != &data->cmft)
+ {
+ free_file (&data->cmft);
+ grub_memcpy (&data->cmft, mft, sizeof (*mft));
+ grub_free (mft);
+ if (!data->cmft.inode_read)
+ {
+ if (init_file (&data->cmft, data->cmft.ino))
+ goto fail;
+ }
+ }
+
+ file->size = data->cmft.size;
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+fail:
+ if (data)
+ {
+ free_file (&data->mmft);
+ free_file (&data->cmft);
+ grub_free (data);
+ }
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_ssize_t
+grub_ntfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_ntfs_file *mft;
+
+ mft = &((struct grub_ntfs_data *) file->data)->cmft;
+ if (file->read_hook)
+ mft->attr.save_pos = 1;
+
+ read_attr (&mft->attr, buf, file->offset, len, 1, file->read_hook);
+ return (grub_errno) ? 0 : len;
+}
+
+static grub_err_t
+grub_ntfs_close (grub_file_t file)
+{
+ struct grub_ntfs_data *data;
+
+ data = file->data;
+
+ if (data)
+ {
+ free_file (&data->mmft);
+ free_file (&data->cmft);
+ grub_free (data);
+ }
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_ntfs_label (grub_device_t device, char **label)
+{
+ struct grub_ntfs_data *data = 0;
+ struct grub_fshelp_node *mft = 0;
+ char *pa;
+
+ grub_dl_ref (my_mod);
+
+ *label = 0;
+
+ data = grub_ntfs_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file ("/$Volume", &data->cmft, &mft, grub_ntfs_iterate_dir,
+ 0, GRUB_FSHELP_REG);
+
+ if (grub_errno)
+ goto fail;
+
+ if (!mft->inode_read)
+ {
+ mft->buf = grub_malloc (mft->data->mft_size << BLK_SHR);
+ if (mft->buf == NULL)
+ goto fail;
+
+ if (read_mft (mft->data, mft->buf, mft->ino))
+ goto fail;
+ }
+
+ init_attr (&mft->attr, mft);
+ pa = find_attr (&mft->attr, AT_VOLUME_NAME);
+ if ((pa) && (pa[8] == 0) && (u32at (pa, 0x10)))
+ {
+ char *buf;
+ int len;
+
+ len = u32at (pa, 0x10) / 2;
+ buf = grub_malloc (len * 4 + 1);
+ pa += u16at (pa, 0x14);
+ *grub_utf16_to_utf8 ((grub_uint8_t *) buf, (grub_uint16_t *) pa, len) =
+ '\0';
+ *label = buf;
+ }
+
+fail:
+ if ((mft) && (mft != &data->cmft))
+ {
+ free_file (mft);
+ grub_free (mft);
+ }
+ if (data)
+ {
+ free_file (&data->mmft);
+ free_file (&data->cmft);
+ grub_free (data);
+ }
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_ntfs_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_ntfs_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ntfs_mount (disk);
+ if (data)
+ {
+ char *ptr;
+ *uuid = grub_xasprintf ("%016llx", (unsigned long long) data->uuid);
+ if (*uuid)
+ for (ptr = *uuid; *ptr; ptr++)
+ *ptr = grub_toupper (*ptr);
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static struct grub_fs grub_ntfs_fs =
+ {
+ .name = "ntfs",
+ .dir = grub_ntfs_dir,
+ .open = grub_ntfs_open,
+ .read = grub_ntfs_read,
+ .close = grub_ntfs_close,
+ .label = grub_ntfs_label,
+ .uuid = grub_ntfs_uuid,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 1,
+#endif
+ .next = 0
+};
+
+GRUB_MOD_INIT (ntfs)
+{
+ grub_fs_register (&grub_ntfs_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI (ntfs)
+{
+ grub_fs_unregister (&grub_ntfs_fs);
+}
diff --git a/grub-core/fs/ntfscomp.c b/grub-core/fs/ntfscomp.c
new file mode 100644
index 0000000..d2893cb
--- /dev/null
+++ b/grub-core/fs/ntfscomp.c
@@ -0,0 +1,376 @@
+/* ntfscomp.c - compression support for the NTFS filesystem */
+/*
+ * Copyright (C) 2007 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/fshelp.h>
+#include <grub/ntfs.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+decomp_nextvcn (struct grub_ntfs_comp *cc)
+{
+ if (cc->comp_head >= cc->comp_tail)
+ return grub_error (GRUB_ERR_BAD_FS, "compression block overflown");
+ if (grub_disk_read
+ (cc->disk,
+ (cc->comp_table[cc->comp_head][1] -
+ (cc->comp_table[cc->comp_head][0] - cc->cbuf_vcn)) * cc->spc, 0,
+ cc->spc << BLK_SHR, cc->cbuf))
+ return grub_errno;
+ cc->cbuf_vcn++;
+ if ((cc->cbuf_vcn >= cc->comp_table[cc->comp_head][0]))
+ cc->comp_head++;
+ cc->cbuf_ofs = 0;
+ return 0;
+}
+
+static grub_err_t
+decomp_getch (struct grub_ntfs_comp *cc, unsigned char *res)
+{
+ if (cc->cbuf_ofs >= (cc->spc << BLK_SHR))
+ {
+ if (decomp_nextvcn (cc))
+ return grub_errno;
+ }
+ *res = (unsigned char) cc->cbuf[cc->cbuf_ofs++];
+ return 0;
+}
+
+static grub_err_t
+decomp_get16 (struct grub_ntfs_comp *cc, grub_uint16_t * res)
+{
+ unsigned char c1 = 0, c2 = 0;
+
+ if ((decomp_getch (cc, &c1)) || (decomp_getch (cc, &c2)))
+ return grub_errno;
+ *res = ((grub_uint16_t) c2) * 256 + ((grub_uint16_t) c1);
+ return 0;
+}
+
+/* Decompress a block (4096 bytes) */
+static grub_err_t
+decomp_block (struct grub_ntfs_comp *cc, char *dest)
+{
+ grub_uint16_t flg, cnt;
+
+ if (decomp_get16 (cc, &flg))
+ return grub_errno;
+ cnt = (flg & 0xFFF) + 1;
+
+ if (dest)
+ {
+ if (flg & 0x8000)
+ {
+ unsigned char tag;
+ grub_uint32_t bits, copied;
+
+ bits = copied = tag = 0;
+ while (cnt > 0)
+ {
+ if (copied > COM_LEN)
+ return grub_error (GRUB_ERR_BAD_FS,
+ "compression block too large");
+
+ if (!bits)
+ {
+ if (decomp_getch (cc, &tag))
+ return grub_errno;
+
+ bits = 8;
+ cnt--;
+ if (cnt <= 0)
+ break;
+ }
+ if (tag & 1)
+ {
+ grub_uint32_t i, len, delta, code, lmask, dshift;
+ grub_uint16_t word;
+
+ if (decomp_get16 (cc, &word))
+ return grub_errno;
+
+ code = word;
+ cnt -= 2;
+
+ if (!copied)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "nontext window empty");
+ return 0;
+ }
+
+ for (i = copied - 1, lmask = 0xFFF, dshift = 12; i >= 0x10;
+ i >>= 1)
+ {
+ lmask >>= 1;
+ dshift--;
+ }
+
+ delta = code >> dshift;
+ len = (code & lmask) + 3;
+
+ for (i = 0; i < len; i++)
+ {
+ dest[copied] = dest[copied - delta - 1];
+ copied++;
+ }
+ }
+ else
+ {
+ unsigned char ch = 0;
+
+ if (decomp_getch (cc, &ch))
+ return grub_errno;
+ dest[copied++] = ch;
+ cnt--;
+ }
+ tag >>= 1;
+ bits--;
+ }
+ return 0;
+ }
+ else
+ {
+ if (cnt != COM_LEN)
+ return grub_error (GRUB_ERR_BAD_FS,
+ "invalid compression block size");
+ }
+ }
+
+ while (cnt > 0)
+ {
+ int n;
+
+ n = (cc->spc << BLK_SHR) - cc->cbuf_ofs;
+ if (n > cnt)
+ n = cnt;
+ if ((dest) && (n))
+ {
+ grub_memcpy (dest, &cc->cbuf[cc->cbuf_ofs], n);
+ dest += n;
+ }
+ cnt -= n;
+ cc->cbuf_ofs += n;
+ if ((cnt) && (decomp_nextvcn (cc)))
+ return grub_errno;
+ }
+ return 0;
+}
+
+static grub_err_t
+read_block (struct grub_ntfs_rlst *ctx, char *buf, int num)
+{
+ int cpb = COM_SEC / ctx->comp.spc;
+
+ while (num)
+ {
+ int nn;
+
+ if ((ctx->target_vcn & 0xF) == 0)
+ {
+
+ if (ctx->comp.comp_head != ctx->comp.comp_tail)
+ return grub_error (GRUB_ERR_BAD_FS, "invalid compression block");
+ ctx->comp.comp_head = ctx->comp.comp_tail = 0;
+ ctx->comp.cbuf_vcn = ctx->target_vcn;
+ ctx->comp.cbuf_ofs = (ctx->comp.spc << BLK_SHR);
+ if (ctx->target_vcn >= ctx->next_vcn)
+ {
+ if (grub_ntfs_read_run_list (ctx))
+ return grub_errno;
+ }
+ while (ctx->target_vcn + 16 > ctx->next_vcn)
+ {
+ if (ctx->flags & RF_BLNK)
+ break;
+ ctx->comp.comp_table[ctx->comp.comp_tail][0] = ctx->next_vcn;
+ ctx->comp.comp_table[ctx->comp.comp_tail][1] =
+ ctx->curr_lcn + ctx->next_vcn - ctx->curr_vcn;
+ ctx->comp.comp_tail++;
+ if (grub_ntfs_read_run_list (ctx))
+ return grub_errno;
+ }
+ }
+
+ nn = (16 - (unsigned) (ctx->target_vcn & 0xF)) / cpb;
+ if (nn > num)
+ nn = num;
+ num -= nn;
+
+ if (ctx->flags & RF_BLNK)
+ {
+ ctx->target_vcn += nn * cpb;
+ if (ctx->comp.comp_tail == 0)
+ {
+ if (buf)
+ {
+ grub_memset (buf, 0, nn * COM_LEN);
+ buf += nn * COM_LEN;
+ }
+ }
+ else
+ {
+ while (nn)
+ {
+ if (decomp_block (&ctx->comp, buf))
+ return grub_errno;
+ if (buf)
+ buf += COM_LEN;
+ nn--;
+ }
+ }
+ }
+ else
+ {
+ nn *= cpb;
+ while ((ctx->comp.comp_head < ctx->comp.comp_tail) && (nn))
+ {
+ int tt;
+
+ tt =
+ ctx->comp.comp_table[ctx->comp.comp_head][0] -
+ ctx->target_vcn;
+ if (tt > nn)
+ tt = nn;
+ ctx->target_vcn += tt;
+ if (buf)
+ {
+ if (grub_disk_read
+ (ctx->comp.disk,
+ (ctx->comp.comp_table[ctx->comp.comp_head][1] -
+ (ctx->comp.comp_table[ctx->comp.comp_head][0] -
+ ctx->target_vcn)) * ctx->comp.spc, 0,
+ tt * (ctx->comp.spc << BLK_SHR), buf))
+ return grub_errno;
+ buf += tt * (ctx->comp.spc << BLK_SHR);
+ }
+ nn -= tt;
+ if (ctx->target_vcn >=
+ ctx->comp.comp_table[ctx->comp.comp_head][0])
+ ctx->comp.comp_head++;
+ }
+ if (nn)
+ {
+ if (buf)
+ {
+ if (grub_disk_read
+ (ctx->comp.disk,
+ (ctx->target_vcn - ctx->curr_vcn +
+ ctx->curr_lcn) * ctx->comp.spc, 0,
+ nn * (ctx->comp.spc << BLK_SHR), buf))
+ return grub_errno;
+ buf += nn * (ctx->comp.spc << BLK_SHR);
+ }
+ ctx->target_vcn += nn;
+ }
+ }
+ }
+ return 0;
+}
+
+static grub_err_t
+ntfscomp (struct grub_ntfs_attr *at, char *dest, grub_uint32_t ofs,
+ grub_uint32_t len, struct grub_ntfs_rlst *ctx, grub_uint32_t vcn)
+{
+ grub_err_t ret;
+
+ ctx->comp.comp_head = ctx->comp.comp_tail = 0;
+ ctx->comp.cbuf = grub_malloc ((ctx->comp.spc) << BLK_SHR);
+ if (!ctx->comp.cbuf)
+ return 0;
+
+ ret = 0;
+
+ //ctx->comp.disk->read_hook = read_hook;
+
+ if ((vcn > ctx->target_vcn) &&
+ (read_block
+ (ctx, NULL, ((vcn - ctx->target_vcn) * ctx->comp.spc) / COM_SEC)))
+ {
+ ret = grub_errno;
+ goto quit;
+ }
+
+ if (ofs % COM_LEN)
+ {
+ grub_uint32_t t, n, o;
+
+ t = ctx->target_vcn * (ctx->comp.spc << BLK_SHR);
+ if (read_block (ctx, at->sbuf, 1))
+ {
+ ret = grub_errno;
+ goto quit;
+ }
+
+ at->save_pos = t;
+
+ o = ofs % COM_LEN;
+ n = COM_LEN - o;
+ if (n > len)
+ n = len;
+ grub_memcpy (dest, &at->sbuf[o], n);
+ if (n == len)
+ goto quit;
+ dest += n;
+ len -= n;
+ }
+
+ if (read_block (ctx, dest, len / COM_LEN))
+ {
+ ret = grub_errno;
+ goto quit;
+ }
+
+ dest += (len / COM_LEN) * COM_LEN;
+ len = len % COM_LEN;
+ if (len)
+ {
+ grub_uint32_t t;
+
+ t = ctx->target_vcn * (ctx->comp.spc << BLK_SHR);
+ if (read_block (ctx, at->sbuf, 1))
+ {
+ ret = grub_errno;
+ goto quit;
+ }
+
+ at->save_pos = t;
+
+ grub_memcpy (dest, at->sbuf, len);
+ }
+
+quit:
+ //ctx->comp.disk->read_hook = 0;
+ if (ctx->comp.cbuf)
+ grub_free (ctx->comp.cbuf);
+ return ret;
+}
+
+GRUB_MOD_INIT (ntfscomp)
+{
+ grub_ntfscomp_func = ntfscomp;
+}
+
+GRUB_MOD_FINI (ntfscomp)
+{
+ grub_ntfscomp_func = NULL;
+}
diff --git a/grub-core/fs/reiserfs.c b/grub-core/fs/reiserfs.c
new file mode 100644
index 0000000..f2984f8
--- /dev/null
+++ b/grub-core/fs/reiserfs.c
@@ -0,0 +1,1384 @@
+/* reiserfs.c - ReiserFS versions up to 3.6 */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ TODO:
+ implement journal handling (ram replay)
+ test tail packing & direct files
+ validate partition label position
+*/
+
+#if 0
+# define GRUB_REISERFS_DEBUG
+# define GRUB_REISERFS_JOURNALING
+# define GRUB_HEXDUMP
+#endif
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define MIN(a, b) \
+ ({ typeof (a) _a = (a); \
+ typeof (b) _b = (b); \
+ _a < _b ? _a : _b; })
+
+#define MAX(a, b) \
+ ({ typeof (a) _a = (a); \
+ typeof (b) _b = (b); \
+ _a > _b ? _a : _b; })
+
+#define REISERFS_SUPER_BLOCK_OFFSET 0x10000
+#define REISERFS_MAGIC_LEN 12
+#define REISERFS_MAGIC_STRING "ReIsEr"
+#define REISERFS_MAGIC_DESC_BLOCK "ReIsErLB"
+/* If the 3rd bit of an item state is set, then it's visible. */
+#define GRUB_REISERFS_VISIBLE_MASK ((grub_uint16_t) 0x04)
+#define REISERFS_MAX_LABEL_LENGTH 16
+#define REISERFS_LABEL_OFFSET 0x64
+
+#define S_IFLNK 0xA000
+
+static grub_dl_t my_mod;
+
+#define assert(boolean) real_assert (boolean, GRUB_FILE, __LINE__)
+static inline void
+real_assert (int boolean, const char *file, const int line)
+{
+ if (! boolean)
+ grub_printf ("Assertion failed at %s:%d\n", file, line);
+}
+
+enum grub_reiserfs_item_type
+ {
+ GRUB_REISERFS_STAT,
+ GRUB_REISERFS_DIRECTORY,
+ GRUB_REISERFS_DIRECT,
+ GRUB_REISERFS_INDIRECT,
+ /* Matches both _DIRECT and _INDIRECT when searching. */
+ GRUB_REISERFS_ANY,
+ GRUB_REISERFS_UNKNOWN
+ };
+
+struct grub_reiserfs_superblock
+{
+ grub_uint32_t block_count;
+ grub_uint32_t block_free_count;
+ grub_uint32_t root_block;
+ grub_uint32_t journal_block;
+ grub_uint32_t journal_device;
+ grub_uint32_t journal_original_size;
+ grub_uint32_t journal_max_transaction_size;
+ grub_uint32_t journal_block_count;
+ grub_uint32_t journal_max_batch;
+ grub_uint32_t journal_max_commit_age;
+ grub_uint32_t journal_max_transaction_age;
+ grub_uint16_t block_size;
+ grub_uint16_t oid_max_size;
+ grub_uint16_t oid_current_size;
+ grub_uint16_t state;
+ grub_uint8_t magic_string[REISERFS_MAGIC_LEN];
+ grub_uint32_t function_hash_code;
+ grub_uint16_t tree_height;
+ grub_uint16_t bitmap_number;
+ grub_uint16_t version;
+ grub_uint16_t reserved;
+ grub_uint32_t inode_generation;
+ grub_uint8_t unused[4];
+ grub_uint16_t uuid[8];
+} __attribute__ ((packed));
+
+struct grub_reiserfs_journal_header
+{
+ grub_uint32_t last_flush_uid;
+ grub_uint32_t unflushed_offset;
+ grub_uint32_t mount_id;
+} __attribute__ ((packed));
+
+struct grub_reiserfs_description_block
+{
+ grub_uint32_t id;
+ grub_uint32_t len;
+ grub_uint32_t mount_id;
+ grub_uint32_t real_blocks[0];
+} __attribute__ ((packed));
+
+struct grub_reiserfs_commit_block
+{
+ grub_uint32_t id;
+ grub_uint32_t len;
+ grub_uint32_t real_blocks[0];
+} __attribute__ ((packed));
+
+struct grub_reiserfs_stat_item_v1
+{
+ grub_uint16_t mode;
+ grub_uint16_t hardlink_count;
+ grub_uint16_t uid;
+ grub_uint16_t gid;
+ grub_uint32_t size;
+ grub_uint32_t atime;
+ grub_uint32_t mtime;
+ grub_uint32_t ctime;
+ grub_uint32_t rdev;
+ grub_uint32_t first_direct_byte;
+} __attribute__ ((packed));
+
+struct grub_reiserfs_stat_item_v2
+{
+ grub_uint16_t mode;
+ grub_uint16_t reserved;
+ grub_uint32_t hardlink_count;
+ grub_uint64_t size;
+ grub_uint32_t uid;
+ grub_uint32_t gid;
+ grub_uint32_t atime;
+ grub_uint32_t mtime;
+ grub_uint32_t ctime;
+ grub_uint32_t blocks;
+ grub_uint32_t first_direct_byte;
+} __attribute__ ((packed));
+
+struct grub_reiserfs_key
+{
+ grub_uint32_t directory_id;
+ grub_uint32_t object_id;
+ union
+ {
+ struct
+ {
+ grub_uint32_t offset;
+ grub_uint32_t type;
+ } v1 __attribute__ ((packed));
+ struct
+ {
+ grub_uint64_t offset_type;
+ } v2 __attribute__ ((packed));
+ } u;
+} __attribute__ ((packed));
+
+struct grub_reiserfs_item_header
+{
+ struct grub_reiserfs_key key;
+ union
+ {
+ grub_uint16_t free_space;
+ grub_uint16_t entry_count;
+ } u __attribute__ ((packed));
+ grub_uint16_t item_size;
+ grub_uint16_t item_location;
+ grub_uint16_t version;
+} __attribute__ ((packed));
+
+struct grub_reiserfs_block_header
+{
+ grub_uint16_t level;
+ grub_uint16_t item_count;
+ grub_uint16_t free_space;
+ grub_uint16_t reserved;
+ struct grub_reiserfs_key block_right_delimiting_key;
+} __attribute__ ((packed));
+
+struct grub_reiserfs_disk_child
+{
+ grub_uint32_t block_number;
+ grub_uint16_t size;
+ grub_uint16_t reserved;
+} __attribute__ ((packed));
+
+struct grub_reiserfs_directory_header
+{
+ grub_uint32_t offset;
+ grub_uint32_t directory_id;
+ grub_uint32_t object_id;
+ grub_uint16_t location;
+ grub_uint16_t state;
+} __attribute__ ((packed));
+
+struct grub_fshelp_node
+{
+ struct grub_reiserfs_data *data;
+ grub_uint32_t block_number; /* 0 if node is not found. */
+ grub_uint16_t block_position;
+ grub_uint64_t next_offset;
+ enum grub_reiserfs_item_type type; /* To know how to read the header. */
+ struct grub_reiserfs_item_header header;
+};
+
+/* Returned when opening a file. */
+struct grub_reiserfs_data
+{
+ struct grub_reiserfs_superblock superblock;
+ grub_disk_t disk;
+};
+
+/* Internal-only functions. Not to be used outside of this file. */
+
+/* Return the type of given v2 key. */
+static enum grub_reiserfs_item_type
+grub_reiserfs_get_key_v2_type (const struct grub_reiserfs_key *key)
+{
+ switch (grub_le_to_cpu64 (key->u.v2.offset_type) >> 60)
+ {
+ case 0:
+ return GRUB_REISERFS_STAT;
+ case 15:
+ return GRUB_REISERFS_ANY;
+ case 3:
+ return GRUB_REISERFS_DIRECTORY;
+ case 2:
+ return GRUB_REISERFS_DIRECT;
+ case 1:
+ return GRUB_REISERFS_INDIRECT;
+ }
+ return GRUB_REISERFS_UNKNOWN;
+}
+
+/* Return the type of given v1 key. */
+static enum grub_reiserfs_item_type
+grub_reiserfs_get_key_v1_type (const struct grub_reiserfs_key *key)
+{
+ switch (grub_le_to_cpu32 (key->u.v1.type))
+ {
+ case 0:
+ return GRUB_REISERFS_STAT;
+ case 555:
+ return GRUB_REISERFS_ANY;
+ case 500:
+ return GRUB_REISERFS_DIRECTORY;
+ case 0x20000000:
+ case 0xFFFFFFFF:
+ return GRUB_REISERFS_DIRECT;
+ case 0x10000000:
+ case 0xFFFFFFFE:
+ return GRUB_REISERFS_INDIRECT;
+ }
+ return GRUB_REISERFS_UNKNOWN;
+}
+
+/* Return 1 if the given key is version 1 key, 2 otherwise. */
+static int
+grub_reiserfs_get_key_version (const struct grub_reiserfs_key *key)
+{
+ return grub_reiserfs_get_key_v1_type (key) == GRUB_REISERFS_UNKNOWN ? 2 : 1;
+}
+
+#ifdef GRUB_HEXDUMP
+static void
+grub_hexdump (char *buffer, grub_size_t len)
+{
+ grub_size_t a;
+ for (a = 0; a < len; a++)
+ {
+ if (! (a & 0x0F))
+ grub_printf ("\n%08x ", a);
+ grub_printf ("%02x ",
+ ((unsigned int) ((unsigned char *) buffer)[a]) & 0xFF);
+ }
+ grub_printf ("\n");
+}
+#endif
+
+#ifdef GRUB_REISERFS_DEBUG
+static grub_uint64_t
+grub_reiserfs_get_key_offset (const struct grub_reiserfs_key *key);
+
+static enum grub_reiserfs_item_type
+grub_reiserfs_get_key_type (const struct grub_reiserfs_key *key);
+
+static void
+grub_reiserfs_print_key (const struct grub_reiserfs_key *key)
+{
+ unsigned int a;
+ char *reiserfs_type_strings[] = {
+ "stat ",
+ "directory",
+ "direct ",
+ "indirect ",
+ "any ",
+ "unknown "
+ };
+
+ for (a = 0; a < sizeof (struct grub_reiserfs_key); a++)
+ grub_printf ("%02x ", ((unsigned int) ((unsigned char *) key)[a]) & 0xFF);
+ grub_printf ("parent id = 0x%08x, self id = 0x%08x, type = %s, offset = ",
+ grub_le_to_cpu32 (key->directory_id),
+ grub_le_to_cpu32 (key->object_id),
+ reiserfs_type_strings [grub_reiserfs_get_key_type (key)]);
+ if (grub_reiserfs_get_key_version (key) == 1)
+ grub_printf("%08x", (unsigned int) grub_reiserfs_get_key_offset (key));
+ else
+ grub_printf("0x%07x%08x",
+ (unsigned) (grub_reiserfs_get_key_offset (key) >> 32),
+ (unsigned) (grub_reiserfs_get_key_offset (key) & 0xFFFFFFFF));
+ grub_printf ("\n");
+}
+#endif
+
+/* Return the offset of given key. */
+static grub_uint64_t
+grub_reiserfs_get_key_offset (const struct grub_reiserfs_key *key)
+{
+ if (grub_reiserfs_get_key_version (key) == 1)
+ return grub_le_to_cpu32 (key->u.v1.offset);
+ else
+ return grub_le_to_cpu64 (key->u.v2.offset_type) & (~0ULL >> 4);
+}
+
+/* Set the offset of given key. */
+static void
+grub_reiserfs_set_key_offset (struct grub_reiserfs_key *key,
+ grub_uint64_t value)
+{
+ if (grub_reiserfs_get_key_version (key) == 1)
+ key->u.v1.offset = grub_cpu_to_le32 (value);
+ else
+ key->u.v2.offset_type \
+ = ((key->u.v2.offset_type & grub_cpu_to_le64 (15ULL << 60))
+ | grub_cpu_to_le64 (value & (~0ULL >> 4)));
+}
+
+/* Return the type of given key. */
+static enum grub_reiserfs_item_type
+grub_reiserfs_get_key_type (const struct grub_reiserfs_key *key)
+{
+ if (grub_reiserfs_get_key_version (key) == 1)
+ return grub_reiserfs_get_key_v1_type (key);
+ else
+ return grub_reiserfs_get_key_v2_type (key);
+}
+
+/* Set the type of given key, with given version number. */
+static void
+grub_reiserfs_set_key_type (struct grub_reiserfs_key *key,
+ enum grub_reiserfs_item_type grub_type,
+ int version)
+{
+ grub_uint32_t type;
+
+ switch (grub_type)
+ {
+ case GRUB_REISERFS_STAT:
+ type = 0;
+ break;
+ case GRUB_REISERFS_ANY:
+ type = (version == 1) ? 555 : 15;
+ break;
+ case GRUB_REISERFS_DIRECTORY:
+ type = (version == 1) ? 500 : 3;
+ break;
+ case GRUB_REISERFS_DIRECT:
+ type = (version == 1) ? 0xFFFFFFFF : 2;
+ break;
+ case GRUB_REISERFS_INDIRECT:
+ type = (version == 1) ? 0xFFFFFFFE : 1;
+ break;
+ default:
+ return;
+ }
+
+ if (version == 1)
+ key->u.v1.type = grub_cpu_to_le32 (type);
+ else
+ key->u.v2.offset_type
+ = ((key->u.v2.offset_type & grub_cpu_to_le64 (~0ULL >> 4))
+ | grub_cpu_to_le64 ((grub_uint64_t) type << 60));
+
+ assert (grub_reiserfs_get_key_type (key) == grub_type);
+}
+
+/* -1 if key 1 if lower than key 2.
+ 0 if key 1 is equal to key 2.
+ 1 if key 1 is higher than key 2. */
+static int
+grub_reiserfs_compare_keys (const struct grub_reiserfs_key *key1,
+ const struct grub_reiserfs_key *key2)
+{
+ grub_uint64_t offset1, offset2;
+ enum grub_reiserfs_item_type type1, type2;
+ grub_uint32_t id1, id2;
+
+ if (! key1 || ! key2)
+ return -2;
+
+ id1 = grub_le_to_cpu32 (key1->directory_id);
+ id2 = grub_le_to_cpu32 (key2->directory_id);
+ if (id1 < id2)
+ return -1;
+ if (id1 > id2)
+ return 1;
+
+ id1 = grub_le_to_cpu32 (key1->object_id);
+ id2 = grub_le_to_cpu32 (key2->object_id);
+ if (id1 < id2)
+ return -1;
+ if (id1 > id2)
+ return 1;
+
+ offset1 = grub_reiserfs_get_key_offset (key1);
+ offset2 = grub_reiserfs_get_key_offset (key2);
+ if (offset1 < offset2)
+ return -1;
+ if (offset1 > offset2)
+ return 1;
+
+ type1 = grub_reiserfs_get_key_type (key1);
+ type2 = grub_reiserfs_get_key_type (key2);
+ if ((type1 == GRUB_REISERFS_ANY
+ && (type2 == GRUB_REISERFS_DIRECT
+ || type2 == GRUB_REISERFS_INDIRECT))
+ || (type2 == GRUB_REISERFS_ANY
+ && (type1 == GRUB_REISERFS_DIRECT
+ || type1 == GRUB_REISERFS_INDIRECT)))
+ return 0;
+ if (type1 < type2)
+ return -1;
+ if (type1 > type2)
+ return 1;
+
+ return 0;
+}
+
+/* Find the item identified by KEY in mounted filesystem DATA, and fill ITEM
+ accordingly to what was found. */
+static grub_err_t
+grub_reiserfs_get_item (struct grub_reiserfs_data *data,
+ const struct grub_reiserfs_key *key,
+ struct grub_fshelp_node *item)
+{
+ grub_uint32_t block_number;
+ struct grub_reiserfs_block_header *block_header = 0;
+ struct grub_reiserfs_key *block_key = 0;
+ grub_uint16_t block_size, item_count, current_level;
+ grub_uint16_t i;
+ grub_uint16_t previous_level = ~0;
+ struct grub_reiserfs_item_header *item_headers = 0;
+
+ if (! data)
+ {
+ grub_error (GRUB_ERR_TEST_FAILURE, "data is NULL");
+ goto fail;
+ }
+
+ if (! key)
+ {
+ grub_error (GRUB_ERR_TEST_FAILURE, "key is NULL");
+ goto fail;
+ }
+
+ if (! item)
+ {
+ grub_error (GRUB_ERR_TEST_FAILURE, "item is NULL");
+ goto fail;
+ }
+
+ block_size = grub_le_to_cpu16 (data->superblock.block_size);
+ block_number = grub_le_to_cpu32 (data->superblock.root_block);
+#ifdef GRUB_REISERFS_DEBUG
+ grub_printf("Searching for ");
+ grub_reiserfs_print_key (key);
+#endif
+ block_header = grub_malloc (block_size);
+ if (! block_header)
+ goto fail;
+
+ item->next_offset = 0;
+ do
+ {
+ grub_disk_read (data->disk,
+ block_number * (block_size >> GRUB_DISK_SECTOR_BITS),
+ (((grub_off_t) block_number * block_size)
+ & (GRUB_DISK_SECTOR_SIZE - 1)),
+ block_size, block_header);
+ if (grub_errno)
+ goto fail;
+ current_level = grub_le_to_cpu16 (block_header->level);
+ grub_dprintf ("reiserfs_tree", " at level %d\n", current_level);
+ if (current_level >= previous_level)
+ {
+ grub_dprintf ("reiserfs_tree", "level loop detected, aborting\n");
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "level loop");
+ goto fail;
+ }
+ previous_level = current_level;
+ item_count = grub_le_to_cpu16 (block_header->item_count);
+ grub_dprintf ("reiserfs_tree", " number of contained items : %d\n",
+ item_count);
+ if (current_level > 1)
+ {
+ /* Internal node. Navigate to the child that should contain
+ the searched key. */
+ struct grub_reiserfs_key *keys
+ = (struct grub_reiserfs_key *) (block_header + 1);
+ struct grub_reiserfs_disk_child *children
+ = ((struct grub_reiserfs_disk_child *)
+ (keys + item_count));
+
+ for (i = 0;
+ i < item_count
+ && grub_reiserfs_compare_keys (key, &(keys[i])) >= 0;
+ i++)
+ {
+#ifdef GRUB_REISERFS_DEBUG
+ grub_printf("i %03d/%03d ", i + 1, item_count + 1);
+ grub_reiserfs_print_key (&(keys[i]));
+#endif
+ }
+ block_number = grub_le_to_cpu32 (children[i].block_number);
+ if ((i < item_count) && (key->directory_id == keys[i].directory_id)
+ && (key->object_id == keys[i].object_id))
+ item->next_offset = grub_reiserfs_get_key_offset(&(keys[i]));
+#ifdef GRUB_REISERFS_DEBUG
+ if (i == item_count
+ || grub_reiserfs_compare_keys (key, &(keys[i])) == 0)
+ grub_printf(">");
+ else
+ grub_printf("<");
+ if (i < item_count)
+ {
+ grub_printf (" %03d/%03d ", i + 1, item_count + 1);
+ grub_reiserfs_print_key (&(keys[i]));
+ if (i + 1 < item_count)
+ {
+ grub_printf ("+ %03d/%03d ", i + 2, item_count);
+ grub_reiserfs_print_key (&(keys[i + 1]));
+ }
+ }
+ else
+ grub_printf ("Accessing rightmost child at block %d.\n",
+ block_number);
+#endif
+ }
+ else
+ {
+ /* Leaf node. Check that the key is actually present. */
+ item_headers
+ = (struct grub_reiserfs_item_header *) (block_header + 1);
+ for (i = 0;
+ i < item_count
+ && (grub_reiserfs_compare_keys (key, &(item_headers[i].key))
+ != 0);
+ i++)
+ {
+#ifdef GRUB_REISERFS_DEBUG
+ if (key->directory_id == item_headers[i].key.directory_id && \
+ key->object_id == item_headers[i].key.object_id)
+ grub_printf("C");
+ else
+ grub_printf(" ");
+ grub_printf(" %03d/%03d ", i + 1, item_count);
+ grub_reiserfs_print_key (&(item_headers[i].key));
+#endif
+ }
+ if (i < item_count)
+ block_key = &(item_headers[i].key);
+ }
+ }
+ while (current_level > 1);
+
+ item->data = data;
+
+ if (i == item_count || grub_reiserfs_compare_keys (key, block_key))
+ {
+ item->block_number = 0;
+ item->block_position = 0;
+ item->type = GRUB_REISERFS_UNKNOWN;
+#ifdef GRUB_REISERFS_DEBUG
+ grub_printf("Not found.\n");
+#endif
+ }
+ else
+ {
+ item->block_number = block_number;
+ item->block_position = i;
+ item->type = grub_reiserfs_get_key_type (block_key);
+ grub_memcpy (&(item->header), &(item_headers[i]),
+ sizeof (struct grub_reiserfs_item_header));
+#ifdef GRUB_REISERFS_DEBUG
+ grub_printf ("F %03d/%03d ", i + 1, item_count);
+ grub_reiserfs_print_key (block_key);
+#endif
+ }
+
+ assert (grub_errno == GRUB_ERR_NONE);
+ grub_free (block_header);
+ return GRUB_ERR_NONE;
+
+ fail:
+ assert (grub_errno != GRUB_ERR_NONE);
+ grub_free (block_header);
+ assert (grub_errno != GRUB_ERR_NONE);
+ return grub_errno;
+}
+
+/* Return the path of the file which is pointed at by symlink NODE. */
+static char *
+grub_reiserfs_read_symlink (grub_fshelp_node_t node)
+{
+ char *symlink_buffer = 0;
+ grub_uint16_t block_size;
+ grub_disk_addr_t block;
+ grub_off_t offset;
+ grub_size_t len;
+ struct grub_fshelp_node found;
+ struct grub_reiserfs_key key;
+
+ grub_memcpy (&key, &(node->header.key), sizeof (key));
+ grub_reiserfs_set_key_offset (&key, 1);
+ grub_reiserfs_set_key_type (&key, GRUB_REISERFS_DIRECT,
+ grub_reiserfs_get_key_version (&key));
+
+ if (grub_reiserfs_get_item (node->data, &key, &found) != GRUB_ERR_NONE)
+ goto fail;
+
+ if (found.block_number == 0)
+ goto fail;
+
+ block_size = grub_le_to_cpu16 (node->data->superblock.block_size);
+ len = grub_le_to_cpu16 (found.header.item_size);
+ block = found.block_number * (block_size >> GRUB_DISK_SECTOR_BITS);
+ offset = grub_le_to_cpu16 (found.header.item_location);
+
+ symlink_buffer = grub_malloc (len + 1);
+ if (! symlink_buffer)
+ goto fail;
+
+ grub_disk_read (node->data->disk, block, offset, len, symlink_buffer);
+ if (grub_errno)
+ goto fail;
+
+ symlink_buffer[len] = 0;
+ return symlink_buffer;
+
+ fail:
+ grub_free (symlink_buffer);
+ return 0;
+}
+
+/* Fill the mounted filesystem structure and return it. */
+static struct grub_reiserfs_data *
+grub_reiserfs_mount (grub_disk_t disk)
+{
+ struct grub_reiserfs_data *data = 0;
+ data = grub_malloc (sizeof (*data));
+ if (! data)
+ goto fail;
+ grub_disk_read (disk, REISERFS_SUPER_BLOCK_OFFSET / GRUB_DISK_SECTOR_SIZE,
+ 0, sizeof (data->superblock), &(data->superblock));
+ if (grub_errno)
+ goto fail;
+ if (grub_memcmp (data->superblock.magic_string,
+ REISERFS_MAGIC_STRING, sizeof (REISERFS_MAGIC_STRING) - 1))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a ReiserFS filesystem");
+ goto fail;
+ }
+ data->disk = disk;
+ return data;
+
+ fail:
+ /* Disk is too small to contain a ReiserFS. */
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not a ReiserFS filesystem");
+
+ grub_free (data);
+ return 0;
+}
+
+/* Call HOOK for each file in directory ITEM. */
+static int
+grub_reiserfs_iterate_dir (grub_fshelp_node_t item,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ struct grub_reiserfs_data *data = item->data;
+ struct grub_reiserfs_block_header *block_header = 0;
+ grub_uint16_t block_size, block_position;
+ grub_uint32_t block_number;
+ grub_uint64_t next_offset = item->next_offset;
+ int ret = 0;
+
+ if (item->type != GRUB_REISERFS_DIRECTORY)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "grub_reiserfs_iterate_dir called on a non-directory item");
+ goto fail;
+ }
+ block_size = grub_le_to_cpu16 (data->superblock.block_size);
+ block_header = grub_malloc (block_size);
+ if (! block_header)
+ goto fail;
+ block_number = item->block_number;
+ block_position = item->block_position;
+ grub_dprintf ("reiserfs", "Iterating directory...\n");
+ do
+ {
+ struct grub_reiserfs_directory_header *directory_headers;
+ struct grub_fshelp_node directory_item;
+ grub_uint16_t entry_count, entry_number;
+ struct grub_reiserfs_item_header *item_headers;
+
+ grub_disk_read (data->disk,
+ block_number * (block_size >> GRUB_DISK_SECTOR_BITS),
+ (((grub_off_t) block_number * block_size)
+ & (GRUB_DISK_SECTOR_SIZE - 1)),
+ block_size, (char *) block_header);
+ if (grub_errno)
+ goto fail;
+
+#if 0
+ if (grub_le_to_cpu16 (block_header->level) != 1)
+ {
+ grub_error (GRUB_ERR_TEST_FAILURE,
+ "reiserfs: block %d is not a leaf block",
+ block_number);
+ goto fail;
+ }
+#endif
+
+ item_headers = (struct grub_reiserfs_item_header *) (block_header + 1);
+ directory_headers
+ = ((struct grub_reiserfs_directory_header *)
+ ((char *) block_header
+ + grub_le_to_cpu16 (item_headers[block_position].item_location)));
+ entry_count
+ = grub_le_to_cpu16 (item_headers[block_position].u.entry_count);
+ for (entry_number = 0; entry_number < entry_count; entry_number++)
+ {
+ struct grub_reiserfs_directory_header *directory_header
+ = &directory_headers[entry_number];
+ grub_uint16_t entry_state
+ = grub_le_to_cpu16 (directory_header->state);
+
+ if (entry_state & GRUB_REISERFS_VISIBLE_MASK)
+ {
+ grub_fshelp_node_t entry_item;
+ struct grub_reiserfs_key entry_key;
+ enum grub_reiserfs_item_type entry_type;
+ char *entry_name;
+
+ entry_name = (((char *) directory_headers)
+ + grub_le_to_cpu16 (directory_header->location));
+ entry_key.directory_id = directory_header->directory_id;
+ entry_key.object_id = directory_header->object_id;
+ entry_key.u.v2.offset_type = 0;
+ grub_reiserfs_set_key_type (&entry_key, GRUB_REISERFS_DIRECTORY,
+ 2);
+ grub_reiserfs_set_key_offset (&entry_key, 1);
+
+ entry_item = grub_malloc (sizeof (*entry_item));
+ if (! entry_item)
+ goto fail;
+
+ if (grub_reiserfs_get_item (data, &entry_key, entry_item)
+ != GRUB_ERR_NONE)
+ {
+ grub_free (entry_item);
+ goto fail;
+ }
+
+ if (entry_item->type == GRUB_REISERFS_DIRECTORY)
+ entry_type = GRUB_FSHELP_DIR;
+ else
+ {
+ grub_uint32_t entry_block_number;
+ /* Order is very important here.
+ First set the offset to 0 using current key version.
+ Then change the key type, which affects key version
+ detection. */
+ grub_reiserfs_set_key_offset (&entry_key, 0);
+ grub_reiserfs_set_key_type (&entry_key, GRUB_REISERFS_STAT,
+ 2);
+ if (grub_reiserfs_get_item (data, &entry_key, entry_item)
+ != GRUB_ERR_NONE)
+ {
+ grub_free (entry_item);
+ goto fail;
+ }
+
+ if (entry_item->block_number != 0)
+ {
+ grub_uint16_t entry_version;
+ entry_version
+ = grub_le_to_cpu16 (entry_item->header.version);
+ entry_block_number = entry_item->block_number;
+#if 0
+ grub_dprintf ("reiserfs",
+ "version %04x block %08x (%08x) position %08x\n",
+ entry_version, entry_block_number,
+ ((grub_disk_addr_t) entry_block_number * block_size) / GRUB_DISK_SECTOR_SIZE,
+ grub_le_to_cpu16 (entry_item->header.item_location));
+#endif
+ if (entry_version == 0) /* Version 1 stat item. */
+ {
+ struct grub_reiserfs_stat_item_v1 entry_v1_stat;
+ grub_disk_read (data->disk,
+ entry_block_number * (block_size >> GRUB_DISK_SECTOR_BITS),
+ grub_le_to_cpu16 (entry_item->header.item_location),
+ sizeof (entry_v1_stat),
+ (char *) &entry_v1_stat);
+ if (grub_errno)
+ goto fail;
+#if 0
+ grub_dprintf ("reiserfs",
+ "%04x %04x %04x %04x %08x %08x | %08x %08x %08x %08x\n",
+ grub_le_to_cpu16 (entry_v1_stat.mode),
+ grub_le_to_cpu16 (entry_v1_stat.hardlink_count),
+ grub_le_to_cpu16 (entry_v1_stat.uid),
+ grub_le_to_cpu16 (entry_v1_stat.gid),
+ grub_le_to_cpu32 (entry_v1_stat.size),
+ grub_le_to_cpu32 (entry_v1_stat.atime),
+ grub_le_to_cpu32 (entry_v1_stat.mtime),
+ grub_le_to_cpu32 (entry_v1_stat.ctime),
+ grub_le_to_cpu32 (entry_v1_stat.rdev),
+ grub_le_to_cpu32 (entry_v1_stat.first_direct_byte));
+ grub_dprintf ("reiserfs",
+ "%04x %04x %04x %04x %08x %08x | %08x %08x %08x %08x\n",
+ entry_v1_stat.mode,
+ entry_v1_stat.hardlink_count,
+ entry_v1_stat.uid,
+ entry_v1_stat.gid,
+ entry_v1_stat.size,
+ entry_v1_stat.atime,
+ entry_v1_stat.mtime,
+ entry_v1_stat.ctime,
+ entry_v1_stat.rdev,
+ entry_v1_stat.first_direct_byte);
+#endif
+ if ((grub_le_to_cpu16 (entry_v1_stat.mode) & S_IFLNK)
+ == S_IFLNK)
+ entry_type = GRUB_FSHELP_SYMLINK;
+ else
+ entry_type = GRUB_FSHELP_REG;
+ }
+ else
+ {
+ struct grub_reiserfs_stat_item_v2 entry_v2_stat;
+ grub_disk_read (data->disk,
+ entry_block_number * (block_size >> GRUB_DISK_SECTOR_BITS),
+ grub_le_to_cpu16 (entry_item->header.item_location),
+ sizeof (entry_v2_stat),
+ (char *) &entry_v2_stat);
+ if (grub_errno)
+ goto fail;
+#if 0
+ grub_dprintf ("reiserfs",
+ "%04x %04x %08x %08x%08x | %08x %08x %08x %08x | %08x %08x %08x\n",
+ grub_le_to_cpu16 (entry_v2_stat.mode),
+ grub_le_to_cpu16 (entry_v2_stat.reserved),
+ grub_le_to_cpu32 (entry_v2_stat.hardlink_count),
+ (unsigned int) (grub_le_to_cpu64 (entry_v2_stat.size) >> 32),
+ (unsigned int) (grub_le_to_cpu64 (entry_v2_stat.size) && 0xFFFFFFFF),
+ grub_le_to_cpu32 (entry_v2_stat.uid),
+ grub_le_to_cpu32 (entry_v2_stat.gid),
+ grub_le_to_cpu32 (entry_v2_stat.atime),
+ grub_le_to_cpu32 (entry_v2_stat.mtime),
+ grub_le_to_cpu32 (entry_v2_stat.ctime),
+ grub_le_to_cpu32 (entry_v2_stat.blocks),
+ grub_le_to_cpu32 (entry_v2_stat.first_direct_byte));
+ grub_dprintf ("reiserfs",
+ "%04x %04x %08x %08x%08x | %08x %08x %08x %08x | %08x %08x %08x\n",
+ entry_v2_stat.mode,
+ entry_v2_stat.reserved,
+ entry_v2_stat.hardlink_count,
+ (unsigned int) (entry_v2_stat.size >> 32),
+ (unsigned int) (entry_v2_stat.size && 0xFFFFFFFF),
+ entry_v2_stat.uid,
+ entry_v2_stat.gid,
+ entry_v2_stat.atime,
+ entry_v2_stat.mtime,
+ entry_v2_stat.ctime,
+ entry_v2_stat.blocks,
+ entry_v2_stat.first_direct_byte);
+#endif
+ if ((grub_le_to_cpu16 (entry_v2_stat.mode) & S_IFLNK)
+ == S_IFLNK)
+ entry_type = GRUB_FSHELP_SYMLINK;
+ else
+ entry_type = GRUB_FSHELP_REG;
+ }
+ }
+ else
+ {
+ /* Pseudo file ".." never has stat block. */
+ if (grub_strcmp (entry_name, ".."))
+ grub_dprintf ("reiserfs",
+ "Warning : %s has no stat block !\n",
+ entry_name);
+ grub_free (entry_item);
+ goto next;
+ }
+ }
+ if (hook (entry_name, entry_type, entry_item))
+ {
+ grub_dprintf ("reiserfs", "Found : %s, type=%d\n",
+ entry_name, entry_type);
+ ret = 1;
+ goto found;
+ }
+
+next:
+ *entry_name = 0; /* Make sure next entry name (which is just
+ before this one in disk order) stops before
+ the current one. */
+ }
+ }
+
+ if (next_offset == 0)
+ break;
+
+ grub_reiserfs_set_key_offset (&(item_headers[block_position].key),
+ next_offset);
+ if (grub_reiserfs_get_item (data, &(item_headers[block_position].key),
+ &directory_item) != GRUB_ERR_NONE)
+ goto fail;
+ block_number = directory_item.block_number;
+ block_position = directory_item.block_position;
+ next_offset = directory_item.next_offset;
+ }
+ while (block_number);
+
+ found:
+ assert (grub_errno == GRUB_ERR_NONE);
+ grub_free (block_header);
+ return ret;
+ fail:
+ assert (grub_errno != GRUB_ERR_NONE);
+ grub_free (block_header);
+ return 0;
+}
+
+/****************************************************************************/
+/* grub api functions */
+/****************************************************************************/
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_reiserfs_open (struct grub_file *file, const char *name)
+{
+ struct grub_reiserfs_data *data = 0;
+ struct grub_fshelp_node root, *found = 0, info;
+ struct grub_reiserfs_key key;
+ grub_uint32_t block_number;
+ grub_uint16_t entry_version, block_size, entry_location;
+
+ grub_dl_ref (my_mod);
+ data = grub_reiserfs_mount (file->device->disk);
+ if (! data)
+ goto fail;
+ block_size = grub_le_to_cpu16 (data->superblock.block_size);
+ key.directory_id = grub_cpu_to_le32 (1);
+ key.object_id = grub_cpu_to_le32 (2);
+ key.u.v2.offset_type = 0;
+ grub_reiserfs_set_key_type (&key, GRUB_REISERFS_DIRECTORY, 2);
+ grub_reiserfs_set_key_offset (&key, 1);
+ if (grub_reiserfs_get_item (data, &key, &root) != GRUB_ERR_NONE)
+ goto fail;
+ if (root.block_number == 0)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "unable to find root item");
+ goto fail; /* Should never happen since checked at mount. */
+ }
+ grub_fshelp_find_file (name, &root, &found,
+ grub_reiserfs_iterate_dir,
+ grub_reiserfs_read_symlink, GRUB_FSHELP_REG);
+ if (grub_errno)
+ goto fail;
+ key.directory_id = found->header.key.directory_id;
+ key.object_id = found->header.key.object_id;
+ grub_reiserfs_set_key_type (&key, GRUB_REISERFS_STAT, 2);
+ grub_reiserfs_set_key_offset (&key, 0);
+ if (grub_reiserfs_get_item (data, &key, &info) != GRUB_ERR_NONE)
+ goto fail;
+ if (info.block_number == 0)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "unable to find searched item");
+ goto fail;
+ }
+ entry_version = grub_le_to_cpu16 (info.header.version);
+ entry_location = grub_le_to_cpu16 (info.header.item_location);
+ block_number = info.block_number;
+ if (entry_version == 0) /* Version 1 stat item. */
+ {
+ struct grub_reiserfs_stat_item_v1 entry_v1_stat;
+ grub_disk_read (data->disk,
+ block_number * (block_size >> GRUB_DISK_SECTOR_BITS),
+ entry_location
+ + (((grub_off_t) block_number * block_size)
+ & (GRUB_DISK_SECTOR_SIZE - 1)),
+ sizeof (entry_v1_stat), &entry_v1_stat);
+ if (grub_errno)
+ goto fail;
+ file->size = (grub_off_t) grub_le_to_cpu64 (entry_v1_stat.size);
+ }
+ else
+ {
+ struct grub_reiserfs_stat_item_v2 entry_v2_stat;
+ grub_disk_read (data->disk,
+ block_number * (block_size >> GRUB_DISK_SECTOR_BITS),
+ entry_location
+ + (((grub_off_t) block_number * block_size)
+ & (GRUB_DISK_SECTOR_SIZE - 1)),
+ sizeof (entry_v2_stat), &entry_v2_stat);
+ if (grub_errno)
+ goto fail;
+ file->size = (grub_off_t) grub_le_to_cpu64 (entry_v2_stat.size);
+ }
+ grub_dprintf ("reiserfs", "file size : %d (%08x%08x)\n",
+ (unsigned int) file->size,
+ (unsigned int) (file->size >> 32), (unsigned int) file->size);
+ file->offset = 0;
+ file->data = found;
+ return GRUB_ERR_NONE;
+
+ fail:
+ assert (grub_errno != GRUB_ERR_NONE);
+ grub_free (found);
+ grub_free (data);
+ grub_dl_unref (my_mod);
+ return grub_errno;
+}
+
+static grub_ssize_t
+grub_reiserfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ unsigned int indirect_block, indirect_block_count;
+ struct grub_reiserfs_key key;
+ struct grub_fshelp_node *node = file->data;
+ struct grub_reiserfs_data *data = node->data;
+ struct grub_fshelp_node found;
+ grub_uint16_t block_size = grub_le_to_cpu16 (data->superblock.block_size);
+ grub_uint16_t item_size;
+ grub_uint32_t *indirect_block_ptr = 0;
+ grub_uint64_t current_key_offset = 1;
+ grub_off_t initial_position, current_position, final_position, length;
+ grub_disk_addr_t block;
+ grub_off_t offset;
+
+ key.directory_id = node->header.key.directory_id;
+ key.object_id = node->header.key.object_id;
+ key.u.v2.offset_type = 0;
+ grub_reiserfs_set_key_type (&key, GRUB_REISERFS_ANY, 2);
+ initial_position = file->offset;
+ current_position = 0;
+ final_position = MIN (len + initial_position, file->size);
+ grub_dprintf ("reiserfs",
+ "Reading from %lld to %lld (%lld instead of requested %ld)\n",
+ (unsigned long long) initial_position,
+ (unsigned long long) final_position,
+ (unsigned long long) (final_position - initial_position),
+ (unsigned long) len);
+ while (current_position < final_position)
+ {
+ grub_reiserfs_set_key_offset (&key, current_key_offset);
+
+ if (grub_reiserfs_get_item (data, &key, &found) != GRUB_ERR_NONE)
+ goto fail;
+ if (found.block_number == 0)
+ goto fail;
+ item_size = grub_le_to_cpu16 (found.header.item_size);
+ switch (found.type)
+ {
+ case GRUB_REISERFS_DIRECT:
+ block = found.block_number * (block_size >> GRUB_DISK_SECTOR_BITS);
+ grub_dprintf ("reiserfs_blocktype", "D: %u\n", (unsigned) block);
+ if (initial_position < current_position + item_size)
+ {
+ offset = MAX ((signed) (initial_position - current_position), 0);
+ length = (MIN (item_size, final_position - current_position)
+ - offset);
+ grub_dprintf ("reiserfs",
+ "Reading direct block %u from %u to %u...\n",
+ (unsigned) block, (unsigned) offset,
+ (unsigned) (offset + length));
+ found.data->disk->read_hook = file->read_hook;
+ grub_disk_read (found.data->disk,
+ block,
+ offset
+ + grub_le_to_cpu16 (found.header.item_location),
+ length, buf);
+ found.data->disk->read_hook = 0;
+ if (grub_errno)
+ goto fail;
+ buf += length;
+ current_position += offset + length;
+ }
+ else
+ current_position += item_size;
+ break;
+ case GRUB_REISERFS_INDIRECT:
+ indirect_block_count = item_size / sizeof (*indirect_block_ptr);
+ indirect_block_ptr = grub_malloc (item_size);
+ if (! indirect_block_ptr)
+ goto fail;
+ grub_disk_read (found.data->disk,
+ found.block_number * (block_size >> GRUB_DISK_SECTOR_BITS),
+ grub_le_to_cpu16 (found.header.item_location),
+ item_size, indirect_block_ptr);
+ if (grub_errno)
+ goto fail;
+ found.data->disk->read_hook = file->read_hook;
+ for (indirect_block = 0;
+ indirect_block < indirect_block_count
+ && current_position < final_position;
+ indirect_block++)
+ {
+ block = grub_le_to_cpu32 (indirect_block_ptr[indirect_block]) *
+ (block_size >> GRUB_DISK_SECTOR_BITS);
+ grub_dprintf ("reiserfs_blocktype", "I: %u\n", (unsigned) block);
+ if (current_position + block_size >= initial_position)
+ {
+ offset = MAX ((signed) (initial_position - current_position),
+ 0);
+ length = (MIN (block_size, final_position - current_position)
+ - offset);
+ grub_dprintf ("reiserfs",
+ "Reading indirect block %u from %u to %u...\n",
+ (unsigned) block, (unsigned) offset,
+ (unsigned) (offset + length));
+#if 0
+ grub_dprintf ("reiserfs",
+ "\nib=%04d/%04d, ip=%d, cp=%d, fp=%d, off=%d, l=%d, tl=%d\n",
+ indirect_block + 1, indirect_block_count,
+ initial_position, current_position,
+ final_position, offset, length, len);
+#endif
+ grub_disk_read (found.data->disk, block, offset, length, buf);
+ if (grub_errno)
+ goto fail;
+ buf += length;
+ current_position += offset + length;
+ }
+ else
+ current_position += block_size;
+ }
+ found.data->disk->read_hook = 0;
+ grub_free (indirect_block_ptr);
+ indirect_block_ptr = 0;
+ break;
+ default:
+ goto fail;
+ }
+ current_key_offset = current_position + 1;
+ }
+
+ grub_dprintf ("reiserfs",
+ "Have successfully read %lld bytes (%ld requested)\n",
+ (unsigned long long) (current_position - initial_position),
+ (unsigned long) len);
+ return current_position - initial_position;
+
+#if 0
+ switch (found.type)
+ {
+ case GRUB_REISERFS_DIRECT:
+ read_length = MIN (len, item_size - file->offset);
+ grub_disk_read (found.data->disk,
+ (found.block_number * block_size) / GRUB_DISK_SECTOR_SIZE,
+ grub_le_to_cpu16 (found.header.item_location) + file->offset,
+ read_length, buf);
+ if (grub_errno)
+ goto fail;
+ break;
+ case GRUB_REISERFS_INDIRECT:
+ indirect_block_count = item_size / sizeof (*indirect_block_ptr);
+ indirect_block_ptr = grub_malloc (item_size);
+ if (!indirect_block_ptr)
+ goto fail;
+ grub_disk_read (found.data->disk,
+ (found.block_number * block_size) / GRUB_DISK_SECTOR_SIZE,
+ grub_le_to_cpu16 (found.header.item_location),
+ item_size, (char *) indirect_block_ptr);
+ if (grub_errno)
+ goto fail;
+ len = MIN (len, file->size - file->offset);
+ for (indirect_block = file->offset / block_size;
+ indirect_block < indirect_block_count && read_length < len;
+ indirect_block++)
+ {
+ read = MIN (block_size, len - read_length);
+ grub_disk_read (found.data->disk,
+ (grub_le_to_cpu32 (indirect_block_ptr[indirect_block]) * block_size) / GRUB_DISK_SECTOR_SIZE,
+ file->offset % block_size, read,
+ ((void *) buf) + read_length);
+ if (grub_errno)
+ goto fail;
+ read_length += read;
+ }
+ grub_free (indirect_block_ptr);
+ break;
+ default:
+ goto fail;
+ }
+
+ return read_length;
+#endif
+
+ fail:
+ grub_free (indirect_block_ptr);
+ return 0;
+}
+
+/* Close the file FILE. */
+static grub_err_t
+grub_reiserfs_close (grub_file_t file)
+{
+ struct grub_fshelp_node *node = file->data;
+ struct grub_reiserfs_data *data = node->data;
+
+ grub_free (data);
+ grub_free (node);
+ grub_dl_unref (my_mod);
+ return GRUB_ERR_NONE;
+}
+
+/* Call HOOK with each file under DIR. */
+static grub_err_t
+grub_reiserfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_reiserfs_data *data = 0;
+ struct grub_fshelp_node root, *found;
+ struct grub_reiserfs_key root_key;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+ grub_dl_ref (my_mod);
+ data = grub_reiserfs_mount (device->disk);
+ if (! data)
+ goto fail;
+ root_key.directory_id = grub_cpu_to_le32 (1);
+ root_key.object_id = grub_cpu_to_le32 (2);
+ root_key.u.v2.offset_type = 0;
+ grub_reiserfs_set_key_type (&root_key, GRUB_REISERFS_DIRECTORY, 2);
+ grub_reiserfs_set_key_offset (&root_key, 1);
+ if (grub_reiserfs_get_item (data, &root_key, &root) != GRUB_ERR_NONE)
+ goto fail;
+ if (root.block_number == 0)
+ {
+ grub_error(GRUB_ERR_BAD_FS, "root not found");
+ goto fail;
+ }
+ grub_fshelp_find_file (path, &root, &found, grub_reiserfs_iterate_dir,
+ grub_reiserfs_read_symlink, GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+ grub_reiserfs_iterate_dir (found, iterate);
+ grub_free (data);
+ grub_dl_unref (my_mod);
+ return GRUB_ERR_NONE;
+
+ fail:
+ grub_free (data);
+ grub_dl_unref (my_mod);
+ return grub_errno;
+}
+
+/* Return the label of the device DEVICE in LABEL. The label is
+ returned in a grub_malloc'ed buffer and should be freed by the
+ caller. */
+static grub_err_t
+grub_reiserfs_label (grub_device_t device, char **label)
+{
+ *label = grub_malloc (REISERFS_MAX_LABEL_LENGTH);
+ if (*label)
+ {
+ grub_disk_read (device->disk,
+ REISERFS_SUPER_BLOCK_OFFSET / GRUB_DISK_SECTOR_SIZE,
+ REISERFS_LABEL_OFFSET, REISERFS_MAX_LABEL_LENGTH,
+ *label);
+ }
+ return grub_errno;
+}
+
+static grub_err_t
+grub_reiserfs_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_reiserfs_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_reiserfs_mount (disk);
+ if (data)
+ {
+ *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+ grub_be_to_cpu16 (data->superblock.uuid[0]),
+ grub_be_to_cpu16 (data->superblock.uuid[1]),
+ grub_be_to_cpu16 (data->superblock.uuid[2]),
+ grub_be_to_cpu16 (data->superblock.uuid[3]),
+ grub_be_to_cpu16 (data->superblock.uuid[4]),
+ grub_be_to_cpu16 (data->superblock.uuid[5]),
+ grub_be_to_cpu16 (data->superblock.uuid[6]),
+ grub_be_to_cpu16 (data->superblock.uuid[7]));
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static struct grub_fs grub_reiserfs_fs =
+ {
+ .name = "reiserfs",
+ .dir = grub_reiserfs_dir,
+ .open = grub_reiserfs_open,
+ .read = grub_reiserfs_read,
+ .close = grub_reiserfs_close,
+ .label = grub_reiserfs_label,
+ .uuid = grub_reiserfs_uuid,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(reiserfs)
+{
+ grub_fs_register (&grub_reiserfs_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(reiserfs)
+{
+ grub_fs_unregister (&grub_reiserfs_fs);
+}
diff --git a/grub-core/fs/sfs.c b/grub-core/fs/sfs.c
new file mode 100644
index 0000000..4557431
--- /dev/null
+++ b/grub-core/fs/sfs.c
@@ -0,0 +1,599 @@
+/* sfs.c - Amiga Smart FileSystem. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* The common header for a block. */
+struct grub_sfs_bheader
+{
+ grub_uint8_t magic[4];
+ grub_uint32_t chksum;
+ grub_uint32_t ipointtomyself;
+} __attribute__ ((packed));
+
+/* The sfs rootblock. */
+struct grub_sfs_rblock
+{
+ struct grub_sfs_bheader header;
+ grub_uint32_t version;
+ grub_uint8_t unused1[36];
+ grub_uint32_t blocksize;
+ grub_uint8_t unused2[40];
+ grub_uint8_t unused3[8];
+ grub_uint32_t rootobject;
+ grub_uint32_t btree;
+} __attribute__ ((packed));
+
+/* A SFS object container. */
+struct grub_sfs_obj
+{
+ grub_uint8_t unused1[4];
+ grub_uint32_t nodeid;
+ grub_uint8_t unused2[4];
+ union
+ {
+ struct
+ {
+ grub_uint32_t first_block;
+ grub_uint32_t size;
+ } file __attribute__ ((packed));
+ struct
+ {
+ grub_uint32_t hashtable;
+ grub_uint32_t dir_objc;
+ } dir __attribute__ ((packed));
+ } file_dir;
+ grub_uint8_t unused3[4];
+ grub_uint8_t type;
+ grub_uint8_t filename[1];
+ grub_uint8_t comment[1];
+} __attribute__ ((packed));
+
+#define GRUB_SFS_TYPE_DELETED 32
+#define GRUB_SFS_TYPE_SYMLINK 64
+#define GRUB_SFS_TYPE_DIR 128
+
+/* A SFS object container. */
+struct grub_sfs_objc
+{
+ struct grub_sfs_bheader header;
+ grub_uint32_t parent;
+ grub_uint32_t next;
+ grub_uint32_t prev;
+ /* The amount of objects depends on the blocksize. */
+ struct grub_sfs_obj objects[1];
+} __attribute__ ((packed));
+
+struct grub_sfs_btree_node
+{
+ grub_uint32_t key;
+ grub_uint32_t data;
+} __attribute__ ((packed));
+
+struct grub_sfs_btree_extent
+{
+ grub_uint32_t key;
+ grub_uint32_t next;
+ grub_uint32_t prev;
+ grub_uint16_t size;
+} __attribute__ ((packed));
+
+struct grub_sfs_btree
+{
+ struct grub_sfs_bheader header;
+ grub_uint16_t nodes;
+ grub_uint8_t leaf;
+ grub_uint8_t nodesize;
+ /* Normally this can be kind of node, but just extents are
+ supported. */
+ struct grub_sfs_btree_node node[1];
+} __attribute__ ((packed));
+
+
+
+struct grub_fshelp_node
+{
+ struct grub_sfs_data *data;
+ int block;
+ int size;
+};
+
+/* Information about a "mounted" sfs filesystem. */
+struct grub_sfs_data
+{
+ struct grub_sfs_rblock rblock;
+ struct grub_fshelp_node diropen;
+ grub_disk_t disk;
+
+ /* Blocksize in sectors. */
+ unsigned int blocksize;
+
+ /* Label of the filesystem. */
+ char *label;
+};
+
+static grub_dl_t my_mod;
+
+
+/* Lookup the extent starting with BLOCK in the filesystem described
+ by DATA. Return the extent size in SIZE and the following extent
+ in NEXTEXT. */
+static grub_err_t
+grub_sfs_read_extent (struct grub_sfs_data *data, unsigned int block,
+ int *size, int *nextext)
+{
+ char *treeblock;
+ struct grub_sfs_btree *tree;
+ int i;
+ int next;
+
+ treeblock = grub_malloc (data->blocksize);
+ if (!block)
+ return 0;
+
+ next = grub_be_to_cpu32 (data->rblock.btree);
+ tree = (struct grub_sfs_btree *) treeblock;
+
+ /* Handle this level in the btree. */
+ do
+ {
+ grub_disk_read (data->disk, next, 0, data->blocksize, treeblock);
+ if (grub_errno)
+ {
+ grub_free (treeblock);
+ return grub_errno;
+ }
+
+ for (i = grub_be_to_cpu16 (tree->nodes) - 1; i >= 0; i--)
+ {
+
+#define EXTNODE(tree, index) \
+ ((struct grub_sfs_btree_node *) (((char *) &(tree)->node[0]) \
+ + (index) * (tree)->nodesize))
+
+ /* Follow the tree down to the leaf level. */
+ if ((grub_be_to_cpu32 (EXTNODE(tree, i)->key) <= block)
+ && !tree->leaf)
+ {
+ next = grub_be_to_cpu32 (EXTNODE (tree, i)->data);
+ break;
+ }
+
+ /* If the leaf level is reached, just find the correct extent. */
+ if (grub_be_to_cpu32 (EXTNODE (tree, i)->key) == block && tree->leaf)
+ {
+ struct grub_sfs_btree_extent *extent;
+ extent = (struct grub_sfs_btree_extent *) EXTNODE (tree, i);
+
+ /* We found a correct leaf. */
+ *size = grub_be_to_cpu16 (extent->size);
+ *nextext = grub_be_to_cpu32 (extent->next);
+
+ grub_free (treeblock);
+ return 0;
+ }
+
+#undef EXTNODE
+
+ }
+ } while (!tree->leaf);
+
+ grub_free (treeblock);
+
+ return grub_error (GRUB_ERR_FILE_READ_ERROR, "SFS extent not found");
+}
+
+static grub_disk_addr_t
+grub_sfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ int blk = node->block;
+ int size = 0;
+ int next = 0;
+
+ while (blk)
+ {
+ grub_err_t err;
+
+ /* In case of the first block we don't have to lookup the
+ extent, the minimum size is always 1. */
+ if (fileblock == 0)
+ return blk;
+
+ err = grub_sfs_read_extent (node->data, blk, &size, &next);
+ if (err)
+ return 0;
+
+ if (fileblock < (unsigned int) size)
+ return fileblock + blk;
+
+ fileblock -= size;
+
+ blk = next;
+ }
+
+ grub_error (GRUB_ERR_FILE_READ_ERROR,
+ "reading a SFS block outside the extent");
+
+ return 0;
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_sfs_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_sfs_read_block,
+ node->size, 0);
+}
+
+
+static struct grub_sfs_data *
+grub_sfs_mount (grub_disk_t disk)
+{
+ struct grub_sfs_data *data;
+ struct grub_sfs_objc *rootobjc;
+ char *rootobjc_data = 0;
+ unsigned int blk;
+
+ data = grub_malloc (sizeof (*data));
+ if (!data)
+ return 0;
+
+ /* Read the rootblock. */
+ grub_disk_read (disk, 0, 0, sizeof (struct grub_sfs_rblock),
+ &data->rblock);
+ if (grub_errno)
+ goto fail;
+
+ /* Make sure this is a sfs filesystem. */
+ if (grub_strncmp ((char *) (data->rblock.header.magic), "SFS", 4))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a SFS filesystem");
+ goto fail;
+ }
+
+ data->blocksize = grub_be_to_cpu32 (data->rblock.blocksize);
+ rootobjc_data = grub_malloc (data->blocksize);
+ if (! rootobjc_data)
+ goto fail;
+
+ /* Read the root object container. */
+ grub_disk_read (disk, grub_be_to_cpu32 (data->rblock.rootobject), 0,
+ data->blocksize, rootobjc_data);
+ if (grub_errno)
+ goto fail;
+
+ rootobjc = (struct grub_sfs_objc *) rootobjc_data;
+
+ blk = grub_be_to_cpu32 (rootobjc->objects[0].file_dir.dir.dir_objc);
+ data->diropen.size = 0;
+ data->diropen.block = blk;
+ data->diropen.data = data;
+ data->disk = disk;
+ data->label = grub_strdup ((char *) (rootobjc->objects[0].filename));
+
+ return data;
+
+ fail:
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not an SFS filesystem");
+
+ grub_free (data);
+ grub_free (rootobjc_data);
+ return 0;
+}
+
+
+static char *
+grub_sfs_read_symlink (grub_fshelp_node_t node)
+{
+ struct grub_sfs_data *data = node->data;
+ char *symlink;
+ char *block;
+
+ block = grub_malloc (data->blocksize);
+ if (!block)
+ return 0;
+
+ grub_disk_read (data->disk, node->block, 0, data->blocksize, block);
+ if (grub_errno)
+ {
+ grub_free (block);
+ return 0;
+ }
+
+ /* This is just a wild guess, but it always worked for me. How the
+ SLNK block looks like is not documented in the SFS docs. */
+ symlink = grub_strdup (&block[24]);
+ grub_free (block);
+ if (!symlink)
+ return 0;
+
+ return symlink;
+}
+
+static int
+grub_sfs_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ struct grub_fshelp_node *node = 0;
+ struct grub_sfs_data *data = dir->data;
+ char *objc_data;
+ struct grub_sfs_objc *objc;
+ unsigned int next = dir->block;
+ int pos;
+
+ auto int NESTED_FUNC_ATTR grub_sfs_create_node (const char *name, int block,
+ int size, int type);
+
+ int NESTED_FUNC_ATTR grub_sfs_create_node (const char *name, int block,
+ int size, int type)
+ {
+ node = grub_malloc (sizeof (*node));
+ if (!node)
+ return 1;
+
+ node->data = data;
+ node->size = size;
+ node->block = block;
+
+ return hook (name, type, node);
+ }
+
+ objc_data = grub_malloc (data->blocksize);
+ if (!objc_data)
+ goto fail;
+
+ /* The Object container can consist of multiple blocks, iterate over
+ every block. */
+ while (next)
+ {
+ grub_disk_read (data->disk, next, 0, data->blocksize, objc_data);
+ if (grub_errno)
+ goto fail;
+
+ objc = (struct grub_sfs_objc *) objc_data;
+
+ pos = (char *) &objc->objects[0] - (char *) objc;
+
+ /* Iterate over all entries in this block. */
+ while (pos + sizeof (struct grub_sfs_obj) < data->blocksize)
+ {
+ struct grub_sfs_obj *obj;
+ obj = (struct grub_sfs_obj *) ((char *) objc + pos);
+ char *filename = (char *) (obj->filename);
+ int len;
+ enum grub_fshelp_filetype type;
+ unsigned int block;
+
+ /* The filename and comment dynamically increase the size of
+ the object. */
+ len = grub_strlen (filename);
+ len += grub_strlen (filename + len + 1);
+
+ pos += sizeof (*obj) + len;
+ /* Round up to a multiple of two bytes. */
+ pos = ((pos + 1) >> 1) << 1;
+
+ if (grub_strlen (filename) == 0)
+ continue;
+
+ /* First check if the file was not deleted. */
+ if (obj->type & GRUB_SFS_TYPE_DELETED)
+ continue;
+ else if (obj->type & GRUB_SFS_TYPE_SYMLINK)
+ type = GRUB_FSHELP_SYMLINK;
+ else if (obj->type & GRUB_SFS_TYPE_DIR)
+ type = GRUB_FSHELP_DIR;
+ else
+ type = GRUB_FSHELP_REG;
+
+ if (type == GRUB_FSHELP_DIR)
+ block = grub_be_to_cpu32 (obj->file_dir.dir.dir_objc);
+ else
+ block = grub_be_to_cpu32 (obj->file_dir.file.first_block);
+
+ if (grub_sfs_create_node (filename, block,
+ grub_be_to_cpu32 (obj->file_dir.file.size),
+ type))
+ {
+ grub_free (objc_data);
+ return 1;
+ }
+ }
+
+ next = grub_be_to_cpu32 (objc->next);
+ }
+
+ fail:
+ grub_free (objc_data);
+ return 0;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_sfs_open (struct grub_file *file, const char *name)
+{
+ struct grub_sfs_data *data;
+ struct grub_fshelp_node *fdiro = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_sfs_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (name, &data->diropen, &fdiro, grub_sfs_iterate_dir,
+ grub_sfs_read_symlink, GRUB_FSHELP_REG);
+ if (grub_errno)
+ goto fail;
+
+ file->size = fdiro->size;
+ data->diropen = *fdiro;
+ grub_free (fdiro);
+
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+ fail:
+ if (data && fdiro != &data->diropen)
+ grub_free (fdiro);
+ if (data)
+ grub_free (data->label);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_sfs_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+
+/* Read LEN bytes data from FILE into BUF. */
+static grub_ssize_t
+grub_sfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_sfs_data *data = (struct grub_sfs_data *) file->data;
+
+ int size = grub_sfs_read_file (&data->diropen, file->read_hook,
+ file->offset, len, buf);
+
+ return size;
+}
+
+
+static grub_err_t
+grub_sfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_sfs_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_sfs_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ grub_fshelp_find_file (path, &data->diropen, &fdiro, grub_sfs_iterate_dir,
+ grub_sfs_read_symlink, GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+
+ grub_sfs_iterate_dir (fdiro, iterate);
+
+ fail:
+ if (data && fdiro != &data->diropen)
+ grub_free (fdiro);
+ if (data)
+ grub_free (data->label);
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+static grub_err_t
+grub_sfs_label (grub_device_t device, char **label)
+{
+ struct grub_sfs_data *data;
+ grub_disk_t disk = device->disk;
+
+ data = grub_sfs_mount (disk);
+ if (data)
+ *label = data->label;
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+static struct grub_fs grub_sfs_fs =
+ {
+ .name = "sfs",
+ .dir = grub_sfs_dir,
+ .open = grub_sfs_open,
+ .read = grub_sfs_read,
+ .close = grub_sfs_close,
+ .label = grub_sfs_label,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 0,
+#endif
+ .next = 0
+ };
+
+GRUB_MOD_INIT(sfs)
+{
+ grub_fs_register (&grub_sfs_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(sfs)
+{
+ grub_fs_unregister (&grub_sfs_fs);
+}
diff --git a/grub-core/fs/tar.c b/grub-core/fs/tar.c
new file mode 100644
index 0000000..6ab62bc
--- /dev/null
+++ b/grub-core/fs/tar.c
@@ -0,0 +1,2 @@
+#define MODE_USTAR 1
+#include "cpio.c"
diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c
new file mode 100644
index 0000000..5842d5d
--- /dev/null
+++ b/grub-core/fs/udf.c
@@ -0,0 +1,1061 @@
+/* udf.c - Universal Disk Format filesystem. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+#include <grub/charset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_UDF_MAX_PDS 2
+#define GRUB_UDF_MAX_PMS 6
+
+#define U16 grub_le_to_cpu16
+#define U32 grub_le_to_cpu32
+#define U64 grub_le_to_cpu64
+
+#define GRUB_UDF_TAG_IDENT_PVD 0x0001
+#define GRUB_UDF_TAG_IDENT_AVDP 0x0002
+#define GRUB_UDF_TAG_IDENT_VDP 0x0003
+#define GRUB_UDF_TAG_IDENT_IUVD 0x0004
+#define GRUB_UDF_TAG_IDENT_PD 0x0005
+#define GRUB_UDF_TAG_IDENT_LVD 0x0006
+#define GRUB_UDF_TAG_IDENT_USD 0x0007
+#define GRUB_UDF_TAG_IDENT_TD 0x0008
+#define GRUB_UDF_TAG_IDENT_LVID 0x0009
+
+#define GRUB_UDF_TAG_IDENT_FSD 0x0100
+#define GRUB_UDF_TAG_IDENT_FID 0x0101
+#define GRUB_UDF_TAG_IDENT_AED 0x0102
+#define GRUB_UDF_TAG_IDENT_IE 0x0103
+#define GRUB_UDF_TAG_IDENT_TE 0x0104
+#define GRUB_UDF_TAG_IDENT_FE 0x0105
+#define GRUB_UDF_TAG_IDENT_EAHD 0x0106
+#define GRUB_UDF_TAG_IDENT_USE 0x0107
+#define GRUB_UDF_TAG_IDENT_SBD 0x0108
+#define GRUB_UDF_TAG_IDENT_PIE 0x0109
+#define GRUB_UDF_TAG_IDENT_EFE 0x010A
+
+#define GRUB_UDF_ICBTAG_TYPE_UNDEF 0x00
+#define GRUB_UDF_ICBTAG_TYPE_USE 0x01
+#define GRUB_UDF_ICBTAG_TYPE_PIE 0x02
+#define GRUB_UDF_ICBTAG_TYPE_IE 0x03
+#define GRUB_UDF_ICBTAG_TYPE_DIRECTORY 0x04
+#define GRUB_UDF_ICBTAG_TYPE_REGULAR 0x05
+#define GRUB_UDF_ICBTAG_TYPE_BLOCK 0x06
+#define GRUB_UDF_ICBTAG_TYPE_CHAR 0x07
+#define GRUB_UDF_ICBTAG_TYPE_EA 0x08
+#define GRUB_UDF_ICBTAG_TYPE_FIFO 0x09
+#define GRUB_UDF_ICBTAG_TYPE_SOCKET 0x0A
+#define GRUB_UDF_ICBTAG_TYPE_TE 0x0B
+#define GRUB_UDF_ICBTAG_TYPE_SYMLINK 0x0C
+#define GRUB_UDF_ICBTAG_TYPE_STREAMDIR 0x0D
+
+#define GRUB_UDF_ICBTAG_FLAG_AD_MASK 0x0007
+#define GRUB_UDF_ICBTAG_FLAG_AD_SHORT 0x0000
+#define GRUB_UDF_ICBTAG_FLAG_AD_LONG 0x0001
+#define GRUB_UDF_ICBTAG_FLAG_AD_EXT 0x0002
+#define GRUB_UDF_ICBTAG_FLAG_AD_IN_ICB 0x0003
+
+#define GRUB_UDF_EXT_NORMAL 0x00000000
+#define GRUB_UDF_EXT_NREC_ALLOC 0x40000000
+#define GRUB_UDF_EXT_NREC_NALLOC 0x80000000
+#define GRUB_UDF_EXT_MASK 0xC0000000
+
+#define GRUB_UDF_FID_CHAR_HIDDEN 0x01
+#define GRUB_UDF_FID_CHAR_DIRECTORY 0x02
+#define GRUB_UDF_FID_CHAR_DELETED 0x04
+#define GRUB_UDF_FID_CHAR_PARENT 0x08
+#define GRUB_UDF_FID_CHAR_METADATA 0x10
+
+#define GRUB_UDF_STD_IDENT_BEA01 "BEA01"
+#define GRUB_UDF_STD_IDENT_BOOT2 "BOOT2"
+#define GRUB_UDF_STD_IDENT_CD001 "CD001"
+#define GRUB_UDF_STD_IDENT_CDW02 "CDW02"
+#define GRUB_UDF_STD_IDENT_NSR02 "NSR02"
+#define GRUB_UDF_STD_IDENT_NSR03 "NSR03"
+#define GRUB_UDF_STD_IDENT_TEA01 "TEA01"
+
+#define GRUB_UDF_CHARSPEC_TYPE_CS0 0x00
+#define GRUB_UDF_CHARSPEC_TYPE_CS1 0x01
+#define GRUB_UDF_CHARSPEC_TYPE_CS2 0x02
+#define GRUB_UDF_CHARSPEC_TYPE_CS3 0x03
+#define GRUB_UDF_CHARSPEC_TYPE_CS4 0x04
+#define GRUB_UDF_CHARSPEC_TYPE_CS5 0x05
+#define GRUB_UDF_CHARSPEC_TYPE_CS6 0x06
+#define GRUB_UDF_CHARSPEC_TYPE_CS7 0x07
+#define GRUB_UDF_CHARSPEC_TYPE_CS8 0x08
+
+#define GRUB_UDF_PARTMAP_TYPE_1 1
+#define GRUB_UDF_PARTMAP_TYPE_2 2
+
+struct grub_udf_lb_addr
+{
+ grub_uint32_t block_num;
+ grub_uint16_t part_ref;
+} __attribute__ ((packed));
+
+struct grub_udf_short_ad
+{
+ grub_uint32_t length;
+ grub_uint32_t position;
+} __attribute__ ((packed));
+
+struct grub_udf_long_ad
+{
+ grub_uint32_t length;
+ struct grub_udf_lb_addr block;
+ grub_uint8_t imp_use[6];
+} __attribute__ ((packed));
+
+struct grub_udf_extent_ad
+{
+ grub_uint32_t length;
+ grub_uint32_t start;
+} __attribute__ ((packed));
+
+struct grub_udf_charspec
+{
+ grub_uint8_t charset_type;
+ grub_uint8_t charset_info[63];
+} __attribute__ ((packed));
+
+struct grub_udf_timestamp
+{
+ grub_uint16_t type_and_timezone;
+ grub_uint16_t year;
+ grub_uint8_t month;
+ grub_uint8_t day;
+ grub_uint8_t hour;
+ grub_uint8_t minute;
+ grub_uint8_t second;
+ grub_uint8_t centi_seconds;
+ grub_uint8_t hundreds_of_micro_seconds;
+ grub_uint8_t micro_seconds;
+} __attribute__ ((packed));
+
+struct grub_udf_regid
+{
+ grub_uint8_t flags;
+ grub_uint8_t ident[23];
+ grub_uint8_t ident_suffix[8];
+} __attribute__ ((packed));
+
+struct grub_udf_tag
+{
+ grub_uint16_t tag_ident;
+ grub_uint16_t desc_version;
+ grub_uint8_t tag_checksum;
+ grub_uint8_t reserved;
+ grub_uint16_t tag_serial_number;
+ grub_uint16_t desc_crc;
+ grub_uint16_t desc_crc_length;
+ grub_uint32_t tag_location;
+} __attribute__ ((packed));
+
+struct grub_udf_fileset
+{
+ struct grub_udf_tag tag;
+ struct grub_udf_timestamp datetime;
+ grub_uint16_t interchange_level;
+ grub_uint16_t max_interchange_level;
+ grub_uint32_t charset_list;
+ grub_uint32_t max_charset_list;
+ grub_uint32_t fileset_num;
+ grub_uint32_t fileset_desc_num;
+ struct grub_udf_charspec vol_charset;
+ grub_uint8_t vol_ident[128];
+ struct grub_udf_charspec fileset_charset;
+ grub_uint8_t fileset_ident[32];
+ grub_uint8_t copyright_file_ident[32];
+ grub_uint8_t abstract_file_ident[32];
+ struct grub_udf_long_ad root_icb;
+ struct grub_udf_regid domain_ident;
+ struct grub_udf_long_ad next_ext;
+ struct grub_udf_long_ad streamdir_icb;
+} __attribute__ ((packed));
+
+struct grub_udf_icbtag
+{
+ grub_uint32_t prior_recorded_num_direct_entries;
+ grub_uint16_t strategy_type;
+ grub_uint16_t strategy_parameter;
+ grub_uint16_t num_entries;
+ grub_uint8_t reserved;
+ grub_uint8_t file_type;
+ struct grub_udf_lb_addr parent_idb;
+ grub_uint16_t flags;
+} __attribute__ ((packed));
+
+struct grub_udf_file_ident
+{
+ struct grub_udf_tag tag;
+ grub_uint16_t version_num;
+ grub_uint8_t characteristics;
+ grub_uint8_t file_ident_length;
+ struct grub_udf_long_ad icb;
+ grub_uint16_t imp_use_length;
+} __attribute__ ((packed));
+
+struct grub_udf_file_entry
+{
+ struct grub_udf_tag tag;
+ struct grub_udf_icbtag icbtag;
+ grub_uint32_t uid;
+ grub_uint32_t gid;
+ grub_uint32_t permissions;
+ grub_uint16_t link_count;
+ grub_uint8_t record_format;
+ grub_uint8_t record_display_attr;
+ grub_uint32_t record_length;
+ grub_uint64_t file_size;
+ grub_uint64_t blocks_recorded;
+ struct grub_udf_timestamp access_time;
+ struct grub_udf_timestamp modification_time;
+ struct grub_udf_timestamp attr_time;
+ grub_uint32_t checkpoint;
+ struct grub_udf_long_ad extended_attr_idb;
+ struct grub_udf_regid imp_ident;
+ grub_uint64_t unique_id;
+ grub_uint32_t ext_attr_length;
+ grub_uint32_t alloc_descs_length;
+ grub_uint8_t ext_attr[1872];
+} __attribute__ ((packed));
+
+struct grub_udf_extended_file_entry
+{
+ struct grub_udf_tag tag;
+ struct grub_udf_icbtag icbtag;
+ grub_uint32_t uid;
+ grub_uint32_t gid;
+ grub_uint32_t permissions;
+ grub_uint16_t link_count;
+ grub_uint8_t record_format;
+ grub_uint8_t record_display_attr;
+ grub_uint32_t record_length;
+ grub_uint64_t file_size;
+ grub_uint64_t object_size;
+ grub_uint64_t blocks_recorded;
+ struct grub_udf_timestamp access_time;
+ struct grub_udf_timestamp modification_time;
+ struct grub_udf_timestamp create_time;
+ struct grub_udf_timestamp attr_time;
+ grub_uint32_t checkpoint;
+ grub_uint32_t reserved;
+ struct grub_udf_long_ad extended_attr_icb;
+ struct grub_udf_long_ad streamdir_icb;
+ struct grub_udf_regid imp_ident;
+ grub_uint64_t unique_id;
+ grub_uint32_t ext_attr_length;
+ grub_uint32_t alloc_descs_length;
+ grub_uint8_t ext_attr[1832];
+} __attribute__ ((packed));
+
+struct grub_udf_vrs
+{
+ grub_uint8_t type;
+ grub_uint8_t magic[5];
+ grub_uint8_t version;
+} __attribute__ ((packed));
+
+struct grub_udf_avdp
+{
+ struct grub_udf_tag tag;
+ struct grub_udf_extent_ad vds;
+} __attribute__ ((packed));
+
+struct grub_udf_pd
+{
+ struct grub_udf_tag tag;
+ grub_uint32_t seq_num;
+ grub_uint16_t flags;
+ grub_uint16_t part_num;
+ struct grub_udf_regid contents;
+ grub_uint8_t contents_use[128];
+ grub_uint32_t access_type;
+ grub_uint32_t start;
+ grub_uint32_t length;
+} __attribute__ ((packed));
+
+struct grub_udf_partmap
+{
+ grub_uint8_t type;
+ grub_uint8_t length;
+ union
+ {
+ struct
+ {
+ grub_uint16_t seq_num;
+ grub_uint16_t part_num;
+ } type1;
+
+ struct
+ {
+ grub_uint8_t ident[62];
+ } type2;
+ };
+};
+
+struct grub_udf_lvd
+{
+ struct grub_udf_tag tag;
+ grub_uint32_t seq_num;
+ struct grub_udf_charspec charset;
+ grub_uint8_t ident[128];
+ grub_uint32_t bsize;
+ struct grub_udf_regid domain_ident;
+ struct grub_udf_long_ad root_fileset;
+ grub_uint32_t map_table_length;
+ grub_uint32_t num_part_maps;
+ struct grub_udf_regid imp_ident;
+ grub_uint8_t imp_use[128];
+ struct grub_udf_extent_ad integrity_seq_ext;
+ grub_uint8_t part_maps[1608];
+} __attribute__ ((packed));
+
+struct grub_udf_aed
+{
+ struct grub_udf_tag tag;
+ grub_uint32_t prev_ae;
+ grub_uint32_t ae_len;
+} __attribute__ ((packed));
+
+struct grub_udf_data
+{
+ grub_disk_t disk;
+ struct grub_udf_lvd lvd;
+ struct grub_udf_pd pds[GRUB_UDF_MAX_PDS];
+ struct grub_udf_partmap *pms[GRUB_UDF_MAX_PMS];
+ struct grub_udf_long_ad root_icb;
+ int npd, npm, lbshift;
+};
+
+struct grub_fshelp_node
+{
+ struct grub_udf_data *data;
+ union
+ {
+ struct grub_udf_file_entry fe;
+ struct grub_udf_extended_file_entry efe;
+ };
+ int part_ref;
+};
+
+static grub_dl_t my_mod;
+
+static grub_uint32_t
+grub_udf_get_block (struct grub_udf_data *data,
+ grub_uint16_t part_ref, grub_uint32_t block)
+{
+ part_ref = U16 (part_ref);
+
+ if (part_ref >= data->npm)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid part ref");
+ return 0;
+ }
+
+ return (U32 (data->pds[data->pms[part_ref]->type1.part_num].start)
+ + U32 (block));
+}
+
+static grub_err_t
+grub_udf_read_icb (struct grub_udf_data *data,
+ struct grub_udf_long_ad *icb,
+ struct grub_fshelp_node *node)
+{
+ grub_uint32_t block;
+
+ block = grub_udf_get_block (data,
+ icb->block.part_ref,
+ icb->block.block_num);
+
+ if (grub_errno)
+ return grub_errno;
+
+ if (grub_disk_read (data->disk, block << data->lbshift, 0,
+ sizeof (struct grub_udf_file_entry),
+ &node->fe))
+ return grub_errno;
+
+ if ((U16 (node->fe.tag.tag_ident) != GRUB_UDF_TAG_IDENT_FE) &&
+ (U16 (node->fe.tag.tag_ident) != GRUB_UDF_TAG_IDENT_EFE))
+ return grub_error (GRUB_ERR_BAD_FS, "invalid fe/efe descriptor");
+
+ node->part_ref = icb->block.part_ref;
+ node->data = data;
+ return 0;
+}
+
+static grub_disk_addr_t
+grub_udf_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ char *buf = NULL;
+ char *ptr;
+ grub_ssize_t len;
+ grub_disk_addr_t filebytes;
+
+ switch (U16 (node->fe.tag.tag_ident))
+ {
+ case GRUB_UDF_TAG_IDENT_FE:
+ ptr = (char *) &node->fe.ext_attr[0] + U32 (node->fe.ext_attr_length);
+ len = U32 (node->fe.alloc_descs_length);
+ break;
+
+ case GRUB_UDF_TAG_IDENT_EFE:
+ ptr = (char *) &node->efe.ext_attr[0] + U32 (node->efe.ext_attr_length);
+ len = U32 (node->efe.alloc_descs_length);
+ break;
+
+ default:
+ grub_error (GRUB_ERR_BAD_FS, "invalid file entry");
+ return 0;
+ }
+
+ if ((U16 (node->fe.icbtag.flags) & GRUB_UDF_ICBTAG_FLAG_AD_MASK)
+ == GRUB_UDF_ICBTAG_FLAG_AD_SHORT)
+ {
+ struct grub_udf_short_ad *ad = (struct grub_udf_short_ad *) ptr;
+
+ filebytes = fileblock * U32 (node->data->lvd.bsize);
+ while (len >= (grub_ssize_t) sizeof (struct grub_udf_short_ad))
+ {
+ grub_uint32_t adlen = U32 (ad->length) & 0x3fffffff;
+ grub_uint32_t adtype = U32 (ad->length) >> 30;
+ if (adtype == 3)
+ {
+ struct grub_udf_aed *extension;
+ grub_disk_addr_t sec = grub_udf_get_block(node->data,
+ node->part_ref,
+ ad->position);
+ if (!buf)
+ {
+ buf = grub_malloc (U32 (node->data->lvd.bsize));
+ if (!buf)
+ return 0;
+ }
+ if (grub_disk_read (node->data->disk, sec << node->data->lbshift,
+ 0, adlen, buf))
+ goto fail;
+
+ extension = (struct grub_udf_aed *) buf;
+ if (U16 (extension->tag.tag_ident) != GRUB_UDF_TAG_IDENT_AED)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid aed tag");
+ goto fail;
+ }
+
+ len = U32 (extension->ae_len);
+ ad = (struct grub_udf_short_ad *)
+ (buf + sizeof (struct grub_udf_aed));
+ continue;
+ }
+
+ if (filebytes < adlen)
+ {
+ grub_uint32_t ad_pos = ad->position;
+ grub_free (buf);
+ return ((U32 (ad_pos) & GRUB_UDF_EXT_MASK) ? 0 :
+ (grub_udf_get_block (node->data, node->part_ref, ad_pos)
+ + (filebytes >> (GRUB_DISK_SECTOR_BITS
+ + node->data->lbshift))));
+ }
+
+ filebytes -= adlen;
+ ad++;
+ len -= sizeof (struct grub_udf_short_ad);
+ }
+ }
+ else
+ {
+ struct grub_udf_long_ad *ad = (struct grub_udf_long_ad *) ptr;
+
+ filebytes = fileblock * U32 (node->data->lvd.bsize);
+ while (len >= (grub_ssize_t) sizeof (struct grub_udf_long_ad))
+ {
+ grub_uint32_t adlen = U32 (ad->length) & 0x3fffffff;
+ grub_uint32_t adtype = U32 (ad->length) >> 30;
+ if (adtype == 3)
+ {
+ struct grub_udf_aed *extension;
+ grub_disk_addr_t sec = grub_udf_get_block(node->data,
+ ad->block.part_ref,
+ ad->block.block_num);
+ if (!buf)
+ {
+ buf = grub_malloc (U32 (node->data->lvd.bsize));
+ if (!buf)
+ return 0;
+ }
+ if (grub_disk_read (node->data->disk, sec << node->data->lbshift,
+ 0, adlen, buf))
+ goto fail;
+
+ extension = (struct grub_udf_aed *) buf;
+ if (U16 (extension->tag.tag_ident) != GRUB_UDF_TAG_IDENT_AED)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid aed tag");
+ goto fail;
+ }
+
+ len = U32 (extension->ae_len);
+ ad = (struct grub_udf_long_ad *)
+ (buf + sizeof (struct grub_udf_aed));
+ continue;
+ }
+
+ if (filebytes < adlen)
+ {
+ grub_uint32_t ad_block_num = ad->block.block_num;
+ grub_uint32_t ad_part_ref = ad->block.part_ref;
+ grub_free (buf);
+ return ((U32 (ad_block_num) & GRUB_UDF_EXT_MASK) ? 0 :
+ (grub_udf_get_block (node->data, ad_part_ref,
+ ad_block_num)
+ + (filebytes >> (GRUB_DISK_SECTOR_BITS
+ + node->data->lbshift))));
+ }
+
+ filebytes -= adlen;
+ ad++;
+ len -= sizeof (struct grub_udf_long_ad);
+ }
+ }
+
+fail:
+ if (buf)
+ grub_free (buf);
+
+ return 0;
+}
+
+static grub_ssize_t
+grub_udf_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR
+ (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ grub_off_t pos, grub_size_t len, char *buf)
+{
+ switch (U16 (node->fe.icbtag.flags) & GRUB_UDF_ICBTAG_FLAG_AD_MASK)
+ {
+ case GRUB_UDF_ICBTAG_FLAG_AD_IN_ICB:
+ {
+ char *ptr;
+
+ ptr = ((U16 (node->fe.tag.tag_ident) == GRUB_UDF_TAG_IDENT_FE) ?
+ ((char *) &node->fe.ext_attr[0]
+ + U32 (node->fe.ext_attr_length)) :
+ ((char *) &node->efe.ext_attr[0]
+ + U32 (node->efe.ext_attr_length)));
+
+ grub_memcpy (buf, ptr + pos, len);
+
+ return len;
+ }
+
+ case GRUB_UDF_ICBTAG_FLAG_AD_EXT:
+ grub_error (GRUB_ERR_BAD_FS, "invalid extent type");
+ return 0;
+ }
+
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_udf_read_block,
+ U64 (node->fe.file_size),
+ node->data->lbshift);
+}
+
+static unsigned sblocklist[] = { 256, 512, 0 };
+
+static struct grub_udf_data *
+grub_udf_mount (grub_disk_t disk)
+{
+ struct grub_udf_data *data = 0;
+ struct grub_udf_fileset root_fs;
+ unsigned *sblklist;
+ grub_uint32_t block, vblock;
+ int i, lbshift;
+
+ data = grub_malloc (sizeof (struct grub_udf_data));
+ if (!data)
+ return 0;
+
+ data->disk = disk;
+
+ /* Search for Anchor Volume Descriptor Pointer (AVDP)
+ * and determine logical block size. */
+ block = 0;
+ for (lbshift = 0; lbshift < 4; lbshift++)
+ {
+ for (sblklist = sblocklist; *sblklist; sblklist++)
+ {
+ struct grub_udf_avdp avdp;
+
+ if (grub_disk_read (disk, *sblklist << lbshift, 0,
+ sizeof (struct grub_udf_avdp), &avdp))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+
+ if (U16 (avdp.tag.tag_ident) == GRUB_UDF_TAG_IDENT_AVDP &&
+ U32 (avdp.tag.tag_location) == *sblklist)
+ {
+ block = U32 (avdp.vds.start);
+ break;
+ }
+ }
+
+ if (block)
+ break;
+ }
+
+ if (!block)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+ data->lbshift = lbshift;
+
+ /* Search for Volume Recognition Sequence (VRS). */
+ for (vblock = (32767 >> (lbshift + GRUB_DISK_SECTOR_BITS)) + 1;;
+ vblock += (2047 >> (lbshift + GRUB_DISK_SECTOR_BITS)) + 1)
+ {
+ struct grub_udf_vrs vrs;
+
+ if (grub_disk_read (disk, vblock << lbshift, 0,
+ sizeof (struct grub_udf_vrs), &vrs))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+
+ if ((!grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_NSR03, 5)) ||
+ (!grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_NSR02, 5)))
+ break;
+
+ if ((grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_BEA01, 5)) &&
+ (grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_BOOT2, 5)) &&
+ (grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_CD001, 5)) &&
+ (grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_CDW02, 5)) &&
+ (grub_memcmp (vrs.magic, GRUB_UDF_STD_IDENT_TEA01, 5)))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+ }
+
+ data->npd = data->npm = 0;
+ /* Locate Partition Descriptor (PD) and Logical Volume Descriptor (LVD). */
+ while (1)
+ {
+ struct grub_udf_tag tag;
+
+ if (grub_disk_read (disk, block << lbshift, 0,
+ sizeof (struct grub_udf_tag), &tag))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+
+ tag.tag_ident = U16 (tag.tag_ident);
+ if (tag.tag_ident == GRUB_UDF_TAG_IDENT_PD)
+ {
+ if (data->npd >= GRUB_UDF_MAX_PDS)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "too many PDs");
+ goto fail;
+ }
+
+ if (grub_disk_read (disk, block << lbshift, 0,
+ sizeof (struct grub_udf_pd),
+ &data->pds[data->npd]))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+
+ data->npd++;
+ }
+ else if (tag.tag_ident == GRUB_UDF_TAG_IDENT_LVD)
+ {
+ int k;
+
+ struct grub_udf_partmap *ppm;
+
+ if (grub_disk_read (disk, block << lbshift, 0,
+ sizeof (struct grub_udf_lvd),
+ &data->lvd))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+
+ if (data->npm + U32 (data->lvd.num_part_maps) > GRUB_UDF_MAX_PMS)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "too many partition maps");
+ goto fail;
+ }
+
+ ppm = (struct grub_udf_partmap *) &data->lvd.part_maps;
+ for (k = U32 (data->lvd.num_part_maps); k > 0; k--)
+ {
+ if (ppm->type != GRUB_UDF_PARTMAP_TYPE_1)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "partmap type not supported");
+ goto fail;
+ }
+
+ data->pms[data->npm++] = ppm;
+ ppm = (struct grub_udf_partmap *) ((char *) ppm +
+ U32 (ppm->length));
+ }
+ }
+ else if (tag.tag_ident > GRUB_UDF_TAG_IDENT_TD)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid tag ident");
+ goto fail;
+ }
+ else if (tag.tag_ident == GRUB_UDF_TAG_IDENT_TD)
+ break;
+
+ block++;
+ }
+
+ for (i = 0; i < data->npm; i++)
+ {
+ int j;
+
+ for (j = 0; j < data->npd; j++)
+ if (data->pms[i]->type1.part_num == data->pds[j].part_num)
+ {
+ data->pms[i]->type1.part_num = j;
+ break;
+ }
+
+ if (j == data->npd)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "can\'t find PD");
+ goto fail;
+ }
+ }
+
+ block = grub_udf_get_block (data,
+ data->lvd.root_fileset.block.part_ref,
+ data->lvd.root_fileset.block.block_num);
+
+ if (grub_errno)
+ goto fail;
+
+ if (grub_disk_read (disk, block << lbshift, 0,
+ sizeof (struct grub_udf_fileset), &root_fs))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not an UDF filesystem");
+ goto fail;
+ }
+
+ if (U16 (root_fs.tag.tag_ident) != GRUB_UDF_TAG_IDENT_FSD)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid fileset descriptor");
+ goto fail;
+ }
+
+ data->root_icb = root_fs.root_icb;
+
+ return data;
+
+fail:
+ grub_free (data);
+ return 0;
+}
+
+static char *
+read_string (grub_uint8_t *raw, grub_size_t sz)
+{
+ grub_uint16_t *utf16 = NULL;
+ char *ret;
+ grub_size_t utf16len = 0;
+
+ if (raw[0] != 8 && raw[0] != 16)
+ return NULL;
+
+ if (raw[0] == 8)
+ {
+ unsigned i;
+ utf16len = sz - 1;
+ utf16 = grub_malloc (utf16len * sizeof (utf16[0]));
+ if (!utf16)
+ return NULL;
+ for (i = 0; i < utf16len; i++)
+ utf16[i] = raw[i + 1];
+ }
+ if (raw[0] == 16)
+ {
+ unsigned i;
+ utf16len = (sz - 1) / 2;
+ utf16 = grub_malloc (utf16len * sizeof (utf16[0]));
+ if (!utf16)
+ return NULL;
+ for (i = 0; i < utf16len; i++)
+ utf16[i] = (raw[2 * i + 1] << 8) | raw[2*i + 2];
+ }
+ ret = grub_malloc (utf16len * 3 + 1);
+ if (ret)
+ *grub_utf16_to_utf8 ((grub_uint8_t *) ret, utf16, utf16len) = '\0';
+ grub_free (utf16);
+ return ret;
+}
+
+static int
+grub_udf_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ grub_fshelp_node_t child;
+ struct grub_udf_file_ident dirent;
+ grub_off_t offset = 0;
+
+ child = grub_malloc (sizeof (struct grub_fshelp_node));
+ if (!child)
+ return 0;
+
+ /* The current directory is not stored. */
+ grub_memcpy ((char *) child, (char *) dir,
+ sizeof (struct grub_fshelp_node));
+
+ if (hook (".", GRUB_FSHELP_DIR, child))
+ return 1;
+
+ while (offset < U64 (dir->fe.file_size))
+ {
+ if (grub_udf_read_file (dir, 0, offset, sizeof (dirent),
+ (char *) &dirent) != sizeof (dirent))
+ return 0;
+
+ if (U16 (dirent.tag.tag_ident) != GRUB_UDF_TAG_IDENT_FID)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid fid tag");
+ return 0;
+ }
+
+ offset += sizeof (dirent) + U16 (dirent.imp_use_length);
+ if (!(dirent.characteristics & GRUB_UDF_FID_CHAR_DELETED))
+ {
+ child = grub_malloc (sizeof (struct grub_fshelp_node));
+ if (!child)
+ return 0;
+
+ if (grub_udf_read_icb (dir->data, &dirent.icb, child))
+ return 0;
+
+ if (dirent.characteristics & GRUB_UDF_FID_CHAR_PARENT)
+ {
+ /* This is the parent directory. */
+ if (hook ("..", GRUB_FSHELP_DIR, child))
+ return 1;
+ }
+ else
+ {
+ enum grub_fshelp_filetype type;
+ char *filename;
+ grub_uint8_t raw[dirent.file_ident_length];
+
+ type = ((dirent.characteristics & GRUB_UDF_FID_CHAR_DIRECTORY) ?
+ (GRUB_FSHELP_DIR) : (GRUB_FSHELP_REG));
+
+ if ((grub_udf_read_file (dir, 0, offset,
+ dirent.file_ident_length,
+ (char *) raw))
+ != dirent.file_ident_length)
+ return 0;
+
+ filename = read_string (raw, dirent.file_ident_length);
+ if (!filename)
+ grub_print_error ();
+
+ if (filename && hook (filename, type, child))
+ {
+ grub_free (filename);
+ return 1;
+ }
+ grub_free (filename);
+ }
+ }
+
+ /* Align to dword boundary. */
+ offset = (offset + dirent.file_ident_length + 3) & (~3);
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_udf_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_udf_data *data = 0;
+ struct grub_fshelp_node rootnode;
+ struct grub_fshelp_node *foundnode;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_udf_mount (device->disk);
+ if (!data)
+ goto fail;
+
+ if (grub_udf_read_icb (data, &data->root_icb, &rootnode))
+ goto fail;
+
+ if (grub_fshelp_find_file (path, &rootnode,
+ &foundnode,
+ grub_udf_iterate_dir, 0, GRUB_FSHELP_DIR))
+ goto fail;
+
+ grub_udf_iterate_dir (foundnode, iterate);
+
+ if (foundnode != &rootnode)
+ grub_free (foundnode);
+
+fail:
+ grub_free (data);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_udf_open (struct grub_file *file, const char *name)
+{
+ struct grub_udf_data *data;
+ struct grub_fshelp_node rootnode;
+ struct grub_fshelp_node *foundnode;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_udf_mount (file->device->disk);
+ if (!data)
+ goto fail;
+
+ if (grub_udf_read_icb (data, &data->root_icb, &rootnode))
+ goto fail;
+
+ if (grub_fshelp_find_file (name, &rootnode,
+ &foundnode,
+ grub_udf_iterate_dir, 0, GRUB_FSHELP_REG))
+ goto fail;
+
+ file->data = foundnode;
+ file->offset = 0;
+ file->size = U64 (foundnode->fe.file_size);
+
+ return 0;
+
+fail:
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static grub_ssize_t
+grub_udf_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_fshelp_node *node = (struct grub_fshelp_node *) file->data;
+
+ return grub_udf_read_file (node, file->read_hook, file->offset, len, buf);
+}
+
+static grub_err_t
+grub_udf_close (grub_file_t file)
+{
+ if (file->data)
+ {
+ struct grub_fshelp_node *node = (struct grub_fshelp_node *) file->data;
+
+ grub_free (node->data);
+ grub_free (node);
+ }
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_udf_label (grub_device_t device, char **label)
+{
+ struct grub_udf_data *data;
+ data = grub_udf_mount (device->disk);
+
+ if (data)
+ {
+ *label = read_string (data->lvd.ident, sizeof (data->lvd.ident));
+ grub_free (data);
+ }
+ else
+ *label = 0;
+
+ return grub_errno;
+}
+
+static struct grub_fs grub_udf_fs = {
+ .name = "udf",
+ .dir = grub_udf_dir,
+ .open = grub_udf_open,
+ .read = grub_udf_read,
+ .close = grub_udf_close,
+ .label = grub_udf_label,
+ .next = 0
+};
+
+GRUB_MOD_INIT (udf)
+{
+ grub_fs_register (&grub_udf_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI (udf)
+{
+ grub_fs_unregister (&grub_udf_fs);
+}
diff --git a/grub-core/fs/ufs.c b/grub-core/fs/ufs.c
new file mode 100644
index 0000000..86fe8af
--- /dev/null
+++ b/grub-core/fs/ufs.c
@@ -0,0 +1,812 @@
+/* ufs.c - Unix File System */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifdef MODE_UFS2
+#define GRUB_UFS_MAGIC 0x19540119
+#else
+#define GRUB_UFS_MAGIC 0x11954
+#endif
+
+#define GRUB_UFS_INODE 2
+#define GRUB_UFS_FILETYPE_DIR 4
+#define GRUB_UFS_FILETYPE_LNK 10
+#define GRUB_UFS_MAX_SYMLNK_CNT 8
+
+#define GRUB_UFS_DIRBLKS 12
+#define GRUB_UFS_INDIRBLKS 3
+
+#define GRUB_UFS_ATTR_TYPE 0160000
+#define GRUB_UFS_ATTR_FILE 0100000
+#define GRUB_UFS_ATTR_DIR 0040000
+#define GRUB_UFS_ATTR_LNK 0120000
+
+#define GRUB_UFS_VOLNAME_LEN 32
+
+/* Calculate in which group the inode can be found. */
+#define UFS_BLKSZ(sblock) (grub_le_to_cpu32 (sblock->bsize))
+
+#define INODE(data,field) data->inode. field
+#ifdef MODE_UFS2
+#define INODE_ENDIAN(data,field,bits1,bits2) grub_le_to_cpu##bits2 (data->inode.field)
+#else
+#define INODE_ENDIAN(data,field,bits1,bits2) grub_le_to_cpu##bits1 (data->inode.field)
+#endif
+
+#define INODE_SIZE(data) INODE_ENDIAN (data,size,32,64)
+#define INODE_NBLOCKS(data) INODE_ENDIAN (data,nblocks,32,64)
+
+#define INODE_MODE(data) INODE_ENDIAN (data,mode,16,16)
+#ifdef MODE_UFS2
+#define INODE_BLKSZ 8
+#else
+#define INODE_BLKSZ 4
+#endif
+#ifdef MODE_UFS2
+#define UFS_INODE_PER_BLOCK 2
+#else
+#define UFS_INODE_PER_BLOCK 4
+#endif
+#define INODE_DIRBLOCKS(data,blk) INODE_ENDIAN \
+ (data,blocks.dir_blocks[blk],32,64)
+#define INODE_INDIRBLOCKS(data,blk) INODE_ENDIAN \
+ (data,blocks.indir_blocks[blk],32,64)
+
+/* The blocks on which the superblock can be found. */
+static int sblocklist[] = { 128, 16, 0, 512, -1 };
+
+struct grub_ufs_sblock
+{
+ grub_uint8_t unused[16];
+ /* The offset of the inodes in the cylinder group. */
+ grub_uint32_t inoblk_offs;
+
+ grub_uint8_t unused2[4];
+
+ /* The start of the cylinder group. */
+ grub_uint32_t cylg_offset;
+ grub_uint32_t cylg_mask;
+
+ grub_uint32_t mtime;
+ grub_uint8_t unused4[12];
+
+ /* The size of a block in bytes. */
+ grub_int32_t bsize;
+ grub_uint8_t unused5[48];
+
+ /* The size of filesystem blocks to disk blocks. */
+ grub_uint32_t log2_blksz;
+ grub_uint8_t unused6[40];
+ grub_uint32_t uuidhi;
+ grub_uint32_t uuidlow;
+ grub_uint8_t unused7[32];
+
+ /* Inodes stored per cylinder group. */
+ grub_uint32_t ino_per_group;
+
+ /* The frags per cylinder group. */
+ grub_uint32_t frags_per_group;
+
+ grub_uint8_t unused8[488];
+
+ /* Volume name for UFS2. */
+ grub_uint8_t volume_name[GRUB_UFS_VOLNAME_LEN];
+ grub_uint8_t unused9[360];
+
+ grub_uint64_t mtime2;
+ grub_uint8_t unused10[292];
+
+ /* Magic value to check if this is really a UFS filesystem. */
+ grub_uint32_t magic;
+};
+
+#ifdef MODE_UFS2
+/* UFS inode. */
+struct grub_ufs_inode
+{
+ grub_uint16_t mode;
+ grub_uint16_t nlinks;
+ grub_uint32_t uid;
+ grub_uint32_t gid;
+ grub_uint32_t blocksize;
+ grub_int64_t size;
+ grub_int64_t nblocks;
+ grub_uint64_t atime;
+ grub_uint64_t mtime;
+ grub_uint64_t ctime;
+ grub_uint64_t create_time;
+ grub_uint32_t atime_sec;
+ grub_uint32_t mtime_sec;
+ grub_uint32_t ctime_sec;
+ grub_uint32_t create_time_sec;
+ grub_uint32_t gen;
+ grub_uint32_t kernel_flags;
+ grub_uint32_t flags;
+ grub_uint32_t extsz;
+ grub_uint64_t ext[2];
+ union
+ {
+ struct
+ {
+ grub_uint64_t dir_blocks[GRUB_UFS_DIRBLKS];
+ grub_uint64_t indir_blocks[GRUB_UFS_INDIRBLKS];
+ } blocks;
+ grub_uint8_t symlink[(GRUB_UFS_DIRBLKS + GRUB_UFS_INDIRBLKS) * 8];
+ };
+
+ grub_uint8_t unused[24];
+} __attribute__ ((packed));
+#else
+/* UFS inode. */
+struct grub_ufs_inode
+{
+ grub_uint16_t mode;
+ grub_uint16_t nlinks;
+ grub_uint16_t uid;
+ grub_uint16_t gid;
+ grub_int64_t size;
+ grub_uint64_t atime;
+ grub_uint64_t mtime;
+ grub_uint64_t ctime;
+ union
+ {
+ struct
+ {
+ grub_uint32_t dir_blocks[GRUB_UFS_DIRBLKS];
+ grub_uint32_t indir_blocks[GRUB_UFS_INDIRBLKS];
+ } blocks;
+ grub_uint8_t symlink[(GRUB_UFS_DIRBLKS + GRUB_UFS_INDIRBLKS) * 4];
+ };
+ grub_uint32_t flags;
+ grub_uint32_t nblocks;
+ grub_uint32_t gen;
+ grub_uint32_t unused;
+ grub_uint8_t pad[12];
+} __attribute__ ((packed));
+#endif
+
+/* Directory entry. */
+struct grub_ufs_dirent
+{
+ grub_uint32_t ino;
+ grub_uint16_t direntlen;
+ union
+ {
+ grub_uint16_t namelen;
+ struct
+ {
+ grub_uint8_t filetype_bsd;
+ grub_uint8_t namelen_bsd;
+ };
+ };
+} __attribute__ ((packed));
+
+/* Information about a "mounted" ufs filesystem. */
+struct grub_ufs_data
+{
+ struct grub_ufs_sblock sblock;
+ grub_disk_t disk;
+ struct grub_ufs_inode inode;
+ int ino;
+ int linknest;
+};
+
+static grub_dl_t my_mod;
+
+/* Forward declaration. */
+static grub_err_t grub_ufs_find_file (struct grub_ufs_data *data,
+ const char *path);
+
+
+static grub_disk_addr_t
+grub_ufs_get_file_block (struct grub_ufs_data *data, unsigned int blk)
+{
+ struct grub_ufs_sblock *sblock = &data->sblock;
+ unsigned int indirsz;
+ int log2_blksz;
+
+ /* Direct. */
+ if (blk < GRUB_UFS_DIRBLKS)
+ return INODE_DIRBLOCKS (data, blk);
+
+ log2_blksz = grub_le_to_cpu32 (data->sblock.log2_blksz);
+
+ blk -= GRUB_UFS_DIRBLKS;
+
+ indirsz = UFS_BLKSZ (sblock) / INODE_BLKSZ;
+ /* Single indirect block. */
+ if (blk < indirsz)
+ {
+#ifdef MODE_UFS2
+ grub_uint64_t indir[UFS_BLKSZ (sblock) / sizeof (grub_uint64_t)];
+#else
+ grub_uint32_t indir[UFS_BLKSZ (sblock) / sizeof (grub_uint32_t)];
+#endif
+ grub_disk_read (data->disk, INODE_INDIRBLOCKS (data, 0) << log2_blksz,
+ 0, sizeof (indir), indir);
+ return indir[blk];
+ }
+ blk -= indirsz;
+
+ /* Double indirect block. */
+ if (blk < indirsz * indirsz)
+ {
+#ifdef MODE_UFS2
+ grub_uint64_t indir[UFS_BLKSZ (sblock) / sizeof (grub_uint64_t)];
+#else
+ grub_uint32_t indir[UFS_BLKSZ (sblock) / sizeof (grub_uint32_t)];
+#endif
+
+ grub_disk_read (data->disk, INODE_INDIRBLOCKS (data, 1) << log2_blksz,
+ 0, sizeof (indir), indir);
+ grub_disk_read (data->disk,
+ (indir [blk / indirsz])
+ << log2_blksz,
+ 0, sizeof (indir), indir);
+
+ return indir[blk % indirsz];
+ }
+
+
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "ufs does not support triple indirect blocks");
+ return 0;
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_ufs_read_file (struct grub_ufs_data *data,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ struct grub_ufs_sblock *sblock = &data->sblock;
+ int i;
+ int blockcnt;
+
+ /* Adjust len so it we can't read past the end of the file. */
+ if (len + pos > INODE_SIZE (data))
+ len = INODE_SIZE (data) - pos;
+
+ blockcnt = (len + pos + UFS_BLKSZ (sblock) - 1) / UFS_BLKSZ (sblock);
+
+ for (i = pos / UFS_BLKSZ (sblock); i < blockcnt; i++)
+ {
+ int blknr;
+ int blockoff = pos % UFS_BLKSZ (sblock);
+ int blockend = UFS_BLKSZ (sblock);
+
+ int skipfirst = 0;
+
+ blknr = grub_ufs_get_file_block (data, i);
+ if (grub_errno)
+ return -1;
+
+ /* Last block. */
+ if (i == blockcnt - 1)
+ {
+ blockend = (len + pos) % UFS_BLKSZ (sblock);
+
+ if (!blockend)
+ blockend = UFS_BLKSZ (sblock);
+ }
+
+ /* First block. */
+ if (i == (pos / (int) UFS_BLKSZ (sblock)))
+ {
+ skipfirst = blockoff;
+ blockend -= skipfirst;
+ }
+
+ /* XXX: If the block number is 0 this block is not stored on
+ disk but is zero filled instead. */
+ if (blknr)
+ {
+ data->disk->read_hook = read_hook;
+ grub_disk_read (data->disk,
+ blknr << grub_le_to_cpu32 (data->sblock.log2_blksz),
+ skipfirst, blockend, buf);
+ data->disk->read_hook = 0;
+ if (grub_errno)
+ return -1;
+ }
+ else
+ grub_memset (buf, UFS_BLKSZ (sblock) - skipfirst, 0);
+
+ buf += UFS_BLKSZ (sblock) - skipfirst;
+ }
+
+ return len;
+}
+
+/* Read inode INO from the mounted filesystem described by DATA. This
+ inode is used by default now. */
+static grub_err_t
+grub_ufs_read_inode (struct grub_ufs_data *data, int ino, char *inode)
+{
+ struct grub_ufs_sblock *sblock = &data->sblock;
+
+ /* Determine the group the inode is in. */
+ int group = ino / grub_le_to_cpu32 (sblock->ino_per_group);
+
+ /* Determine the inode within the group. */
+ int grpino = ino % grub_le_to_cpu32 (sblock->ino_per_group);
+
+ /* The first block of the group. */
+ int grpblk = group * (grub_le_to_cpu32 (sblock->frags_per_group));
+
+#ifndef MODE_UFS2
+ grpblk += grub_le_to_cpu32 (sblock->cylg_offset)
+ * (group & (~grub_le_to_cpu32 (sblock->cylg_mask)));
+#endif
+
+ if (!inode)
+ {
+ inode = (char *) &data->inode;
+ data->ino = ino;
+ }
+
+ grub_disk_read (data->disk,
+ ((grub_le_to_cpu32 (sblock->inoblk_offs) + grpblk)
+ << grub_le_to_cpu32 (data->sblock.log2_blksz))
+ + grpino / UFS_INODE_PER_BLOCK,
+ (grpino % UFS_INODE_PER_BLOCK)
+ * sizeof (struct grub_ufs_inode),
+ sizeof (struct grub_ufs_inode),
+ inode);
+
+ return grub_errno;
+}
+
+
+/* Lookup the symlink the current inode points to. INO is the inode
+ number of the directory the symlink is relative to. */
+static grub_err_t
+grub_ufs_lookup_symlink (struct grub_ufs_data *data, int ino)
+{
+ char symlink[INODE_SIZE (data)];
+
+ if (++data->linknest > GRUB_UFS_MAX_SYMLNK_CNT)
+ return grub_error (GRUB_ERR_SYMLINK_LOOP, "too deep nesting of symlinks");
+
+ if (INODE_NBLOCKS (data) == 0)
+ grub_strcpy (symlink, (char *) INODE (data, symlink));
+ else
+ {
+ grub_disk_read (data->disk,
+ (INODE_DIRBLOCKS (data, 0)
+ << grub_le_to_cpu32 (data->sblock.log2_blksz)),
+ 0, INODE_SIZE (data), symlink);
+ symlink[INODE_SIZE (data)] = '\0';
+ }
+
+ /* The symlink is an absolute path, go back to the root inode. */
+ if (symlink[0] == '/')
+ ino = GRUB_UFS_INODE;
+
+ /* Now load in the old inode. */
+ if (grub_ufs_read_inode (data, ino, 0))
+ return grub_errno;
+
+ grub_ufs_find_file (data, symlink);
+ if (grub_errno)
+ grub_error (grub_errno, "cannot follow symlink `%s'", symlink);
+
+ return grub_errno;
+}
+
+
+/* Find the file with the pathname PATH on the filesystem described by
+ DATA. */
+static grub_err_t
+grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
+{
+ char fpath[grub_strlen (path) + 1];
+ char *name = fpath;
+ char *next;
+ unsigned int pos = 0;
+ int dirino;
+
+ grub_strcpy (fpath, path);
+
+ /* Skip the first slash. */
+ if (name[0] == '/')
+ {
+ name++;
+ if (!*name)
+ return 0;
+ }
+
+ /* Extract the actual part from the pathname. */
+ next = grub_strchr (name, '/');
+ if (next)
+ {
+ next[0] = '\0';
+ next++;
+ }
+
+ do
+ {
+ struct grub_ufs_dirent dirent;
+ int namelen;
+
+ if (grub_strlen (name) == 0)
+ return GRUB_ERR_NONE;
+
+ if (grub_ufs_read_file (data, 0, pos, sizeof (dirent),
+ (char *) &dirent) < 0)
+ return grub_errno;
+
+#ifdef MODE_UFS2
+ namelen = dirent.namelen_bsd;
+#else
+ namelen = grub_le_to_cpu16 (dirent.namelen);
+#endif
+ {
+ char filename[namelen + 1];
+
+ if (grub_ufs_read_file (data, 0, pos + sizeof (dirent),
+ namelen, filename) < 0)
+ return grub_errno;
+
+ filename[namelen] = '\0';
+
+ if (!grub_strcmp (name, filename))
+ {
+ dirino = data->ino;
+ grub_ufs_read_inode (data, grub_le_to_cpu32 (dirent.ino), 0);
+
+ if ((INODE_MODE(data) & GRUB_UFS_ATTR_TYPE)
+ == GRUB_UFS_ATTR_LNK)
+ {
+ grub_ufs_lookup_symlink (data, dirino);
+ if (grub_errno)
+ return grub_errno;
+ }
+
+ if (!next)
+ return 0;
+
+ pos = 0;
+
+ name = next;
+ next = grub_strchr (name, '/');
+ if (next)
+ {
+ next[0] = '\0';
+ next++;
+ }
+
+ if ((INODE_MODE(data) & GRUB_UFS_ATTR_TYPE) != GRUB_UFS_ATTR_DIR)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+
+ continue;
+ }
+ }
+
+ pos += grub_le_to_cpu16 (dirent.direntlen);
+ } while (pos < INODE_SIZE (data));
+
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+ return grub_errno;
+}
+
+
+/* Mount the filesystem on the disk DISK. */
+static struct grub_ufs_data *
+grub_ufs_mount (grub_disk_t disk)
+{
+ struct grub_ufs_data *data;
+ int *sblklist = sblocklist;
+
+ data = grub_malloc (sizeof (struct grub_ufs_data));
+ if (!data)
+ return 0;
+
+ /* Find a UFS sblock. */
+ while (*sblklist != -1)
+ {
+ grub_disk_read (disk, *sblklist, 0, sizeof (struct grub_ufs_sblock),
+ &data->sblock);
+ if (grub_errno)
+ goto fail;
+
+ if (grub_le_to_cpu32 (data->sblock.magic) == GRUB_UFS_MAGIC)
+ {
+ data->disk = disk;
+ data->linknest = 0;
+ return data;
+ }
+ sblklist++;
+ }
+
+ fail:
+
+ if (grub_errno == GRUB_ERR_NONE || grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ {
+#ifdef MODE_UFS2
+ grub_error (GRUB_ERR_BAD_FS, "not an ufs2 filesystem");
+#else
+ grub_error (GRUB_ERR_BAD_FS, "not an ufs1 filesystem");
+#endif
+ }
+
+ grub_free (data);
+
+ return 0;
+}
+
+
+static grub_err_t
+grub_ufs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_ufs_data *data;
+ unsigned int pos = 0;
+
+ data = grub_ufs_mount (device->disk);
+ if (!data)
+ return grub_errno;
+
+ grub_ufs_read_inode (data, GRUB_UFS_INODE, 0);
+ if (grub_errno)
+ return grub_errno;
+
+ if (!path || path[0] != '/')
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "bad filename");
+ return grub_errno;
+ }
+
+ grub_ufs_find_file (data, path);
+ if (grub_errno)
+ goto fail;
+
+ if ((INODE_MODE (data) & GRUB_UFS_ATTR_TYPE) != GRUB_UFS_ATTR_DIR)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ goto fail;
+ }
+
+ while (pos < INODE_SIZE (data))
+ {
+ struct grub_ufs_dirent dirent;
+ int namelen;
+
+ if (grub_ufs_read_file (data, 0, pos, sizeof (dirent),
+ (char *) &dirent) < 0)
+ break;
+
+#ifdef MODE_UFS2
+ namelen = dirent.namelen_bsd;
+#else
+ namelen = grub_le_to_cpu16 (dirent.namelen);
+#endif
+
+ {
+ char filename[namelen + 1];
+ struct grub_dirhook_info info;
+ struct grub_ufs_inode inode;
+
+ grub_memset (&info, 0, sizeof (info));
+
+ if (grub_ufs_read_file (data, 0, pos + sizeof (dirent),
+ namelen, filename) < 0)
+ break;
+
+ filename[namelen] = '\0';
+ grub_ufs_read_inode (data, dirent.ino, (char *) &inode);
+
+ info.dir = ((grub_le_to_cpu16 (inode.mode) & GRUB_UFS_ATTR_TYPE)
+ == GRUB_UFS_ATTR_DIR);
+ info.mtime = grub_le_to_cpu64 (inode.mtime);
+ info.mtimeset = 1;
+
+ if (hook (filename, &info))
+ break;
+ }
+
+ pos += grub_le_to_cpu16 (dirent.direntlen);
+ }
+
+ fail:
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_ufs_open (struct grub_file *file, const char *name)
+{
+ struct grub_ufs_data *data;
+ data = grub_ufs_mount (file->device->disk);
+ if (!data)
+ return grub_errno;
+
+ grub_ufs_read_inode (data, 2, 0);
+ if (grub_errno)
+ {
+ grub_free (data);
+ return grub_errno;
+ }
+
+ if (!name || name[0] != '/')
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "bad filename");
+ return grub_errno;
+ }
+
+ grub_ufs_find_file (data, name);
+ if (grub_errno)
+ {
+ grub_free (data);
+ return grub_errno;
+ }
+
+ file->data = data;
+ file->size = INODE_SIZE (data);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static grub_ssize_t
+grub_ufs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_ufs_data *data =
+ (struct grub_ufs_data *) file->data;
+
+ return grub_ufs_read_file (data, file->read_hook, file->offset, len, buf);
+}
+
+
+static grub_err_t
+grub_ufs_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ return GRUB_ERR_NONE;
+}
+
+
+#ifdef MODE_UFS2
+static grub_err_t
+grub_ufs_label (grub_device_t device, char **label)
+{
+ struct grub_ufs_data *data = 0;
+
+ grub_dl_ref (my_mod);
+
+ *label = 0;
+
+ data = grub_ufs_mount (device->disk);
+ if (data)
+ *label = grub_strdup ((char *) data->sblock.volume_name);
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+#endif
+
+static grub_err_t
+grub_ufs_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_ufs_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ufs_mount (disk);
+ if (data && (data->sblock.uuidhi != 0 || data->sblock.uuidlow != 0))
+ *uuid = grub_xasprintf ("%08x%08x",
+ (unsigned) grub_le_to_cpu32 (data->sblock.uuidhi),
+ (unsigned) grub_le_to_cpu32 (data->sblock.uuidlow));
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+/* Get mtime. */
+static grub_err_t
+grub_ufs_mtime (grub_device_t device, grub_int32_t *tm)
+{
+ struct grub_ufs_data *data = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_ufs_mount (device->disk);
+ if (!data)
+ *tm = 0;
+ else
+#ifdef MODE_UFS2
+ *tm = grub_le_to_cpu64 (data->sblock.mtime2);
+#else
+ *tm = grub_le_to_cpu32 (data->sblock.mtime);
+#endif
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+
+static struct grub_fs grub_ufs_fs =
+ {
+#ifdef MODE_UFS2
+ .name = "ufs2",
+#else
+ .name = "ufs1",
+#endif
+ .dir = grub_ufs_dir,
+ .open = grub_ufs_open,
+ .read = grub_ufs_read,
+ .close = grub_ufs_close,
+#ifdef MODE_UFS2
+ .label = grub_ufs_label,
+#endif
+ .uuid = grub_ufs_uuid,
+ .mtime = grub_ufs_mtime,
+ .next = 0
+ };
+
+#ifdef MODE_UFS2
+GRUB_MOD_INIT(ufs2)
+#else
+GRUB_MOD_INIT(ufs1)
+#endif
+{
+ grub_fs_register (&grub_ufs_fs);
+ my_mod = mod;
+}
+
+#ifdef MODE_UFS2
+GRUB_MOD_FINI(ufs2)
+#else
+GRUB_MOD_FINI(ufs1)
+#endif
+{
+ grub_fs_unregister (&grub_ufs_fs);
+}
+
diff --git a/grub-core/fs/ufs2.c b/grub-core/fs/ufs2.c
new file mode 100644
index 0000000..7f4eb95
--- /dev/null
+++ b/grub-core/fs/ufs2.c
@@ -0,0 +1,3 @@
+/* ufs2.c - Unix File System 2 */
+#define MODE_UFS2 1
+#include "ufs.c"
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
new file mode 100644
index 0000000..2eadc37
--- /dev/null
+++ b/grub-core/fs/xfs.c
@@ -0,0 +1,837 @@
+/* xfs.c - XFS. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/fshelp.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define XFS_INODE_EXTENTS 9
+
+#define XFS_INODE_FORMAT_INO 1
+#define XFS_INODE_FORMAT_EXT 2
+#define XFS_INODE_FORMAT_BTREE 3
+
+
+struct grub_xfs_sblock
+{
+ grub_uint8_t magic[4];
+ grub_uint32_t bsize;
+ grub_uint8_t unused1[24];
+ grub_uint16_t uuid[8];
+ grub_uint8_t unused2[8];
+ grub_uint64_t rootino;
+ grub_uint8_t unused3[20];
+ grub_uint32_t agsize;
+ grub_uint8_t unused4[20];
+ grub_uint8_t label[12];
+ grub_uint8_t log2_bsize;
+ grub_uint8_t log2_sect;
+ grub_uint8_t log2_inode;
+ grub_uint8_t log2_inop;
+ grub_uint8_t log2_agblk;
+ grub_uint8_t unused6[67];
+ grub_uint8_t log2_dirblk;
+} __attribute__ ((packed));
+
+struct grub_xfs_dir_header
+{
+ grub_uint8_t count;
+ grub_uint8_t smallino;
+ union
+ {
+ grub_uint32_t i4;
+ grub_uint64_t i8;
+ } parent __attribute__ ((packed));
+} __attribute__ ((packed));
+
+struct grub_xfs_dir_entry
+{
+ grub_uint8_t len;
+ grub_uint16_t offset;
+ char name[1];
+ /* Inode number follows, 32 bits. */
+} __attribute__ ((packed));
+
+struct grub_xfs_dir2_entry
+{
+ grub_uint64_t inode;
+ grub_uint8_t len;
+} __attribute__ ((packed));
+
+typedef grub_uint32_t grub_xfs_extent[4];
+
+struct grub_xfs_btree_node
+{
+ grub_uint8_t magic[4];
+ grub_uint16_t level;
+ grub_uint16_t numrecs;
+ grub_uint64_t left;
+ grub_uint64_t right;
+ grub_uint64_t keys[1];
+} __attribute__ ((packed));
+
+struct grub_xfs_btree_root
+{
+ grub_uint16_t level;
+ grub_uint16_t numrecs;
+ grub_uint64_t keys[1];
+} __attribute__ ((packed));
+
+struct grub_xfs_inode
+{
+ grub_uint8_t magic[2];
+ grub_uint16_t mode;
+ grub_uint8_t version;
+ grub_uint8_t format;
+ grub_uint8_t unused2[50];
+ grub_uint64_t size;
+ grub_uint64_t nblocks;
+ grub_uint32_t extsize;
+ grub_uint32_t nextents;
+ grub_uint8_t unused3[20];
+ union
+ {
+ char raw[156];
+ struct dir
+ {
+ struct grub_xfs_dir_header dirhead;
+ struct grub_xfs_dir_entry direntry[1];
+ } dir;
+ grub_xfs_extent extents[XFS_INODE_EXTENTS];
+ struct grub_xfs_btree_root btree;
+ } data __attribute__ ((packed));
+} __attribute__ ((packed));
+
+struct grub_xfs_dirblock_tail
+{
+ grub_uint32_t leaf_count;
+ grub_uint32_t leaf_stale;
+} __attribute__ ((packed));
+
+struct grub_fshelp_node
+{
+ struct grub_xfs_data *data;
+ grub_uint64_t ino;
+ int inode_read;
+ struct grub_xfs_inode inode;
+};
+
+struct grub_xfs_data
+{
+ struct grub_xfs_sblock sblock;
+ grub_disk_t disk;
+ int pos;
+ int bsize;
+ int agsize;
+ struct grub_fshelp_node diropen;
+};
+
+static grub_dl_t my_mod;
+
+
+
+/* Filetype information as used in inodes. */
+#define FILETYPE_INO_MASK 0170000
+#define FILETYPE_INO_REG 0100000
+#define FILETYPE_INO_DIRECTORY 0040000
+#define FILETYPE_INO_SYMLINK 0120000
+
+#define GRUB_XFS_INO_AGBITS(data) \
+ ((data)->sblock.log2_agblk + (data)->sblock.log2_inop)
+#define GRUB_XFS_INO_INOINAG(data, ino) \
+ (grub_be_to_cpu64 (ino) & ((1LL << GRUB_XFS_INO_AGBITS (data)) - 1))
+#define GRUB_XFS_INO_AG(data,ino) \
+ (grub_be_to_cpu64 (ino) >> GRUB_XFS_INO_AGBITS (data))
+
+#define GRUB_XFS_FSB_TO_BLOCK(data, fsb) \
+ (((fsb) >> (data)->sblock.log2_agblk) * (data)->agsize \
+ + ((fsb) & ((1LL << (data)->sblock.log2_agblk) - 1)))
+
+#define GRUB_XFS_EXTENT_OFFSET(exts,ex) \
+ ((grub_be_to_cpu32 (exts[ex][0]) & ~(1 << 31)) << 23 \
+ | grub_be_to_cpu32 (exts[ex][1]) >> 9)
+
+#define GRUB_XFS_EXTENT_BLOCK(exts,ex) \
+ ((grub_uint64_t) (grub_be_to_cpu32 (exts[ex][1]) \
+ & (0x1ff)) << 43 \
+ | (grub_uint64_t) grub_be_to_cpu32 (exts[ex][2]) << 11 \
+ | grub_be_to_cpu32 (exts[ex][3]) >> 21)
+
+#define GRUB_XFS_EXTENT_SIZE(exts,ex) \
+ (grub_be_to_cpu32 (exts[ex][3]) & ((1 << 20) - 1))
+
+#define GRUB_XFS_ROUND_TO_DIRENT(pos) ((((pos) + 8 - 1) / 8) * 8)
+#define GRUB_XFS_NEXT_DIRENT(pos,len) \
+ (pos) + GRUB_XFS_ROUND_TO_DIRENT (8 + 1 + len + 2)
+
+static inline grub_uint64_t
+grub_xfs_inode_block (struct grub_xfs_data *data,
+ grub_uint64_t ino)
+{
+ long long int inoinag = GRUB_XFS_INO_INOINAG (data, ino);
+ long long ag = GRUB_XFS_INO_AG (data, ino);
+ long long block;
+
+ block = (inoinag >> data->sblock.log2_inop) + ag * data->agsize;
+ block <<= (data->sblock.log2_bsize - GRUB_DISK_SECTOR_BITS);
+ return block;
+}
+
+
+static inline int
+grub_xfs_inode_offset (struct grub_xfs_data *data,
+ grub_uint64_t ino)
+{
+ int inoag = GRUB_XFS_INO_INOINAG (data, ino);
+ return ((inoag & ((1 << data->sblock.log2_inop) - 1)) <<
+ data->sblock.log2_inode);
+}
+
+
+static grub_err_t
+grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
+ struct grub_xfs_inode *inode)
+{
+ grub_uint64_t block = grub_xfs_inode_block (data, ino);
+ int offset = grub_xfs_inode_offset (data, ino);
+
+ /* Read the inode. */
+ if (grub_disk_read (data->disk, block, offset,
+ 1 << data->sblock.log2_inode, inode))
+ return grub_errno;
+
+ if (grub_strncmp ((char *) inode->magic, "IN", 2))
+ return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode");
+
+ return 0;
+}
+
+
+static grub_disk_addr_t
+grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
+{
+ struct grub_xfs_btree_node *leaf = 0;
+ int ex, nrec;
+ grub_xfs_extent *exts;
+ grub_uint64_t ret = 0;
+
+ if (node->inode.format == XFS_INODE_FORMAT_BTREE)
+ {
+ grub_uint64_t *keys;
+
+ leaf = grub_malloc (node->data->sblock.bsize);
+ if (leaf == 0)
+ return 0;
+
+ nrec = grub_be_to_cpu16 (node->inode.data.btree.numrecs);
+ keys = &node->inode.data.btree.keys[0];
+ do
+ {
+ int i;
+
+ for (i = 0; i < nrec; i++)
+ {
+ if (fileblock < grub_be_to_cpu64 (keys[i]))
+ break;
+ }
+
+ /* Sparse block. */
+ if (i == 0)
+ {
+ grub_free (leaf);
+ return 0;
+ }
+
+ if (grub_disk_read (node->data->disk,
+ grub_be_to_cpu64 (keys[i - 1 + nrec])
+ << (node->data->sblock.log2_bsize
+ - GRUB_DISK_SECTOR_BITS),
+ 0, node->data->sblock.bsize, leaf))
+ return 0;
+
+ if (grub_strncmp ((char *) leaf->magic, "BMAP", 4))
+ {
+ grub_free (leaf);
+ grub_error (GRUB_ERR_BAD_FS, "not a correct XFS BMAP node");
+ return 0;
+ }
+
+ nrec = grub_be_to_cpu16 (leaf->numrecs);
+ keys = &leaf->keys[0];
+ } while (leaf->level);
+ exts = (grub_xfs_extent *) keys;
+ }
+ else if (node->inode.format == XFS_INODE_FORMAT_EXT)
+ {
+ nrec = grub_be_to_cpu32 (node->inode.nextents);
+ exts = &node->inode.data.extents[0];
+ }
+ else
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "XFS does not support inode format %d yet",
+ node->inode.format);
+ return 0;
+ }
+
+ /* Iterate over each extent to figure out which extent has
+ the block we are looking for. */
+ for (ex = 0; ex < nrec; ex++)
+ {
+ grub_uint64_t start = GRUB_XFS_EXTENT_BLOCK (exts, ex);
+ grub_uint64_t offset = GRUB_XFS_EXTENT_OFFSET (exts, ex);
+ grub_uint64_t size = GRUB_XFS_EXTENT_SIZE (exts, ex);
+
+ /* Sparse block. */
+ if (fileblock < offset)
+ break;
+ else if (fileblock < offset + size)
+ {
+ ret = (fileblock - offset + start);
+ break;
+ }
+ }
+
+ if (leaf)
+ grub_free (leaf);
+
+ return GRUB_XFS_FSB_TO_BLOCK(node->data, ret);
+}
+
+
+/* Read LEN bytes from the file described by DATA starting with byte
+ POS. Return the amount of read bytes in READ. */
+static grub_ssize_t
+grub_xfs_read_file (grub_fshelp_node_t node,
+ void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
+ unsigned offset, unsigned length),
+ int pos, grub_size_t len, char *buf)
+{
+ return grub_fshelp_read_file (node->data->disk, node, read_hook,
+ pos, len, buf, grub_xfs_read_block,
+ grub_be_to_cpu64 (node->inode.size),
+ node->data->sblock.log2_bsize
+ - GRUB_DISK_SECTOR_BITS);
+}
+
+
+static char *
+grub_xfs_read_symlink (grub_fshelp_node_t node)
+{
+ int size = grub_be_to_cpu64 (node->inode.size);
+
+ switch (node->inode.format)
+ {
+ case XFS_INODE_FORMAT_INO:
+ return grub_strndup (node->inode.data.raw, size);
+
+ case XFS_INODE_FORMAT_EXT:
+ {
+ char *symlink;
+ grub_ssize_t numread;
+
+ symlink = grub_malloc (size + 1);
+ if (!symlink)
+ return 0;
+
+ numread = grub_xfs_read_file (node, 0, 0, size, symlink);
+ if (numread != size)
+ {
+ grub_free (symlink);
+ return 0;
+ }
+ symlink[size] = '\0';
+ return symlink;
+ }
+ }
+
+ return 0;
+}
+
+
+static enum grub_fshelp_filetype
+grub_xfs_mode_to_filetype (grub_uint16_t mode)
+{
+ if ((grub_be_to_cpu16 (mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_DIRECTORY)
+ return GRUB_FSHELP_DIR;
+ else if ((grub_be_to_cpu16 (mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_SYMLINK)
+ return GRUB_FSHELP_SYMLINK;
+ else if ((grub_be_to_cpu16 (mode)
+ & FILETYPE_INO_MASK) == FILETYPE_INO_REG)
+ return GRUB_FSHELP_REG;
+ return GRUB_FSHELP_UNKNOWN;
+}
+
+
+static int
+grub_xfs_iterate_dir (grub_fshelp_node_t dir,
+ int NESTED_FUNC_ATTR
+ (*hook) (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node))
+{
+ struct grub_fshelp_node *diro = (struct grub_fshelp_node *) dir;
+ auto int NESTED_FUNC_ATTR call_hook (grub_uint64_t ino, char *filename);
+
+ int NESTED_FUNC_ATTR call_hook (grub_uint64_t ino, char *filename)
+ {
+ struct grub_fshelp_node *fdiro;
+
+ fdiro = grub_malloc (sizeof (struct grub_fshelp_node)
+ - sizeof (struct grub_xfs_inode)
+ + (1 << diro->data->sblock.log2_inode));
+ if (!fdiro)
+ return 0;
+
+ /* The inode should be read, otherwise the filetype can
+ not be determined. */
+ fdiro->ino = ino;
+ fdiro->inode_read = 1;
+ fdiro->data = diro->data;
+ grub_xfs_read_inode (diro->data, ino, &fdiro->inode);
+
+ return hook (filename,
+ grub_xfs_mode_to_filetype (fdiro->inode.mode),
+ fdiro);
+ }
+
+ switch (diro->inode.format)
+ {
+ case XFS_INODE_FORMAT_INO:
+ {
+ struct grub_xfs_dir_entry *de = &diro->inode.data.dir.direntry[0];
+ int smallino = !diro->inode.data.dir.dirhead.smallino;
+ int i;
+ grub_uint64_t parent;
+
+ /* If small inode numbers are used to pack the direntry, the
+ parent inode number is small too. */
+ if (smallino)
+ {
+ parent = grub_be_to_cpu32 (diro->inode.data.dir.dirhead.parent.i4);
+ parent = grub_cpu_to_be64 (parent);
+ /* The header is a bit smaller than usual. */
+ de = (struct grub_xfs_dir_entry *) ((char *) de - 4);
+ }
+ else
+ {
+ parent = diro->inode.data.dir.dirhead.parent.i8;
+ }
+
+ /* Synthesize the direntries for `.' and `..'. */
+ if (call_hook (diro->ino, "."))
+ return 1;
+
+ if (call_hook (parent, ".."))
+ return 1;
+
+ for (i = 0; i < diro->inode.data.dir.dirhead.count; i++)
+ {
+ grub_uint64_t ino;
+ grub_uint8_t *inopos = (((grub_uint8_t *) de)
+ + sizeof (struct grub_xfs_dir_entry)
+ + de->len - 1);
+ char name[de->len + 1];
+
+ /* inopos might be unaligned. */
+ if (smallino)
+ ino = (((grub_uint32_t) inopos[0]) << 24)
+ | (((grub_uint32_t) inopos[1]) << 16)
+ | (((grub_uint32_t) inopos[2]) << 8)
+ | (((grub_uint32_t) inopos[3]) << 0);
+ else
+ ino = (((grub_uint64_t) inopos[0]) << 56)
+ | (((grub_uint64_t) inopos[1]) << 48)
+ | (((grub_uint64_t) inopos[2]) << 40)
+ | (((grub_uint64_t) inopos[3]) << 32)
+ | (((grub_uint64_t) inopos[4]) << 24)
+ | (((grub_uint64_t) inopos[5]) << 16)
+ | (((grub_uint64_t) inopos[6]) << 8)
+ | (((grub_uint64_t) inopos[7]) << 0);
+ ino = grub_cpu_to_be64 (ino);
+
+ grub_memcpy (name, de->name, de->len);
+ name[de->len] = '\0';
+ if (call_hook (ino, name))
+ return 1;
+
+ de = ((struct grub_xfs_dir_entry *)
+ (((char *) de)+ sizeof (struct grub_xfs_dir_entry) + de->len
+ + ((smallino ? sizeof (grub_uint32_t)
+ : sizeof (grub_uint64_t))) - 1));
+ }
+ break;
+ }
+
+ case XFS_INODE_FORMAT_BTREE:
+ case XFS_INODE_FORMAT_EXT:
+ {
+ grub_ssize_t numread;
+ char *dirblock;
+ grub_uint64_t blk;
+ int dirblk_size, dirblk_log2;
+
+ dirblk_log2 = (dir->data->sblock.log2_bsize
+ + dir->data->sblock.log2_dirblk);
+ dirblk_size = 1 << dirblk_log2;
+
+ dirblock = grub_malloc (dirblk_size);
+ if (! dirblock)
+ return 0;
+
+ /* Iterate over every block the directory has. */
+ for (blk = 0;
+ blk < (grub_be_to_cpu64 (dir->inode.size)
+ >> dirblk_log2);
+ blk++)
+ {
+ /* The header is skipped, the first direntry is stored
+ from byte 16. */
+ int pos = 16;
+ int entries;
+ int tail_start = (dirblk_size
+ - sizeof (struct grub_xfs_dirblock_tail));
+
+ struct grub_xfs_dirblock_tail *tail;
+ tail = (struct grub_xfs_dirblock_tail *) &dirblock[tail_start];
+
+ numread = grub_xfs_read_file (dir, 0,
+ blk << dirblk_log2,
+ dirblk_size, dirblock);
+ if (numread != dirblk_size)
+ return 0;
+
+ entries = (grub_be_to_cpu32 (tail->leaf_count)
+ - grub_be_to_cpu32 (tail->leaf_stale));
+
+ /* Iterate over all entries within this block. */
+ while (pos < (dirblk_size
+ - (int) sizeof (struct grub_xfs_dir2_entry)))
+ {
+ struct grub_xfs_dir2_entry *direntry;
+ grub_uint16_t *freetag;
+ char *filename;
+
+ direntry = (struct grub_xfs_dir2_entry *) &dirblock[pos];
+ freetag = (grub_uint16_t *) direntry;
+
+ if (*freetag == 0XFFFF)
+ {
+ grub_uint16_t *skip = (grub_uint16_t *) (freetag + 1);
+
+ /* This entry is not used, go to the next one. */
+ pos += grub_be_to_cpu16 (*skip);
+
+ continue;
+ }
+
+ filename = &dirblock[pos + sizeof (*direntry)];
+ /* The byte after the filename is for the tag, which
+ is not used by GRUB. So it can be overwritten. */
+ filename[direntry->len] = '\0';
+
+ if (call_hook (direntry->inode, filename))
+ {
+ grub_free (dirblock);
+ return 1;
+ }
+
+ /* Check if last direntry in this block is
+ reached. */
+ entries--;
+ if (!entries)
+ break;
+
+ /* Select the next directory entry. */
+ pos = GRUB_XFS_NEXT_DIRENT (pos, direntry->len);
+ pos = GRUB_XFS_ROUND_TO_DIRENT (pos);
+ }
+ }
+ grub_free (dirblock);
+ break;
+ }
+
+ default:
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "XFS does not support inode format %d yet",
+ diro->inode.format);
+ }
+ return 0;
+}
+
+
+static struct grub_xfs_data *
+grub_xfs_mount (grub_disk_t disk)
+{
+ struct grub_xfs_data *data = 0;
+
+ data = grub_zalloc (sizeof (struct grub_xfs_data));
+ if (!data)
+ return 0;
+
+ /* Read the superblock. */
+ if (grub_disk_read (disk, 0, 0,
+ sizeof (struct grub_xfs_sblock), &data->sblock))
+ goto fail;
+
+ if (grub_strncmp ((char *) (data->sblock.magic), "XFSB", 4))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "not a XFS filesystem");
+ goto fail;
+ }
+
+ data = grub_realloc (data,
+ sizeof (struct grub_xfs_data)
+ - sizeof (struct grub_xfs_inode)
+ + (1 << data->sblock.log2_inode));
+
+ if (! data)
+ goto fail;
+
+ data->diropen.data = data;
+ data->diropen.ino = data->sblock.rootino;
+ data->diropen.inode_read = 1;
+ data->bsize = grub_be_to_cpu32 (data->sblock.bsize);
+ data->agsize = grub_be_to_cpu32 (data->sblock.agsize);
+
+ data->disk = disk;
+ data->pos = 0;
+
+ grub_xfs_read_inode (data, data->diropen.ino, &data->diropen.inode);
+
+ return data;
+ fail:
+
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ grub_error (GRUB_ERR_BAD_FS, "not an XFS filesystem");
+
+ grub_free (data);
+
+ return 0;
+}
+
+
+static grub_err_t
+grub_xfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ struct grub_xfs_data *data = 0;
+ struct grub_fshelp_node *fdiro = 0;
+
+ auto int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node);
+
+ int NESTED_FUNC_ATTR iterate (const char *filename,
+ enum grub_fshelp_filetype filetype,
+ grub_fshelp_node_t node)
+ {
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+ info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
+ grub_free (node);
+ return hook (filename, &info);
+ }
+
+ grub_dl_ref (my_mod);
+
+ data = grub_xfs_mount (device->disk);
+ if (!data)
+ goto mount_fail;
+
+ grub_fshelp_find_file (path, &data->diropen, &fdiro, grub_xfs_iterate_dir,
+ grub_xfs_read_symlink, GRUB_FSHELP_DIR);
+ if (grub_errno)
+ goto fail;
+
+ grub_xfs_iterate_dir (fdiro, iterate);
+
+ fail:
+ if (fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ mount_fail:
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_xfs_open (struct grub_file *file, const char *name)
+{
+ struct grub_xfs_data *data;
+ struct grub_fshelp_node *fdiro = 0;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_xfs_mount (file->device->disk);
+ if (!data)
+ goto mount_fail;
+
+ grub_fshelp_find_file (name, &data->diropen, &fdiro, grub_xfs_iterate_dir,
+ grub_xfs_read_symlink, GRUB_FSHELP_REG);
+ if (grub_errno)
+ goto fail;
+
+ if (!fdiro->inode_read)
+ {
+ grub_xfs_read_inode (data, fdiro->ino, &fdiro->inode);
+ if (grub_errno)
+ goto fail;
+ }
+
+ if (fdiro != &data->diropen)
+ grub_memcpy (&data->diropen, fdiro,
+ sizeof (struct grub_fshelp_node)
+ - sizeof (struct grub_xfs_inode)
+ + (1 << data->sblock.log2_inode));
+
+ file->size = grub_be_to_cpu64 (data->diropen.inode.size);
+ file->data = data;
+ file->offset = 0;
+
+ return 0;
+
+ fail:
+ if (fdiro != &data->diropen)
+ grub_free (fdiro);
+ grub_free (data);
+
+ mount_fail:
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+
+static grub_ssize_t
+grub_xfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_xfs_data *data =
+ (struct grub_xfs_data *) file->data;
+
+ return grub_xfs_read_file (&data->diropen, file->read_hook,
+ file->offset, len, buf);
+}
+
+
+static grub_err_t
+grub_xfs_close (grub_file_t file)
+{
+ grub_free (file->data);
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static grub_err_t
+grub_xfs_label (grub_device_t device, char **label)
+{
+ struct grub_xfs_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_xfs_mount (disk);
+ if (data)
+ *label = grub_strndup ((char *) (data->sblock.label), 12);
+ else
+ *label = 0;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_xfs_uuid (grub_device_t device, char **uuid)
+{
+ struct grub_xfs_data *data;
+ grub_disk_t disk = device->disk;
+
+ grub_dl_ref (my_mod);
+
+ data = grub_xfs_mount (disk);
+ if (data)
+ {
+ *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+ grub_be_to_cpu16 (data->sblock.uuid[0]),
+ grub_be_to_cpu16 (data->sblock.uuid[1]),
+ grub_be_to_cpu16 (data->sblock.uuid[2]),
+ grub_be_to_cpu16 (data->sblock.uuid[3]),
+ grub_be_to_cpu16 (data->sblock.uuid[4]),
+ grub_be_to_cpu16 (data->sblock.uuid[5]),
+ grub_be_to_cpu16 (data->sblock.uuid[6]),
+ grub_be_to_cpu16 (data->sblock.uuid[7]));
+ }
+ else
+ *uuid = NULL;
+
+ grub_dl_unref (my_mod);
+
+ grub_free (data);
+
+ return grub_errno;
+}
+
+
+
+static struct grub_fs grub_xfs_fs =
+ {
+ .name = "xfs",
+ .dir = grub_xfs_dir,
+ .open = grub_xfs_open,
+ .read = grub_xfs_read,
+ .close = grub_xfs_close,
+ .label = grub_xfs_label,
+ .uuid = grub_xfs_uuid,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 0,
+#endif
+ .next = 0
+ };
+
+GRUB_MOD_INIT(xfs)
+{
+ grub_fs_register (&grub_xfs_fs);
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(xfs)
+{
+ grub_fs_unregister (&grub_xfs_fs);
+}
diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
new file mode 100644
index 0000000..8d86cf9
--- /dev/null
+++ b/grub-core/fs/zfs/zfs.c
@@ -0,0 +1,2550 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2009,2010 Free Software Foundation, Inc.
+ * Copyright 2010 Sun Microsystems, Inc.
+ *
+ * GRUB is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * The zfs plug-in routines for GRUB are:
+ *
+ * zfs_mount() - locates a valid uberblock of the root pool and reads
+ * in its MOS at the memory address MOS.
+ *
+ * zfs_open() - locates a plain file object by following the MOS
+ * and places its dnode at the memory address DNODE.
+ *
+ * zfs_read() - read in the data blocks pointed by the DNODE.
+ *
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/sa_impl.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define ZPOOL_PROP_BOOTFS "bootfs"
+
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+
+/*
+ * For nvlist manipulation. (from nvpair.h)
+ */
+#define NV_ENCODE_NATIVE 0
+#define NV_ENCODE_XDR 1
+#define NV_BIG_ENDIAN 0
+#define NV_LITTLE_ENDIAN 1
+#define DATA_TYPE_UINT64 8
+#define DATA_TYPE_STRING 9
+#define DATA_TYPE_NVLIST 19
+#define DATA_TYPE_NVLIST_ARRAY 20
+
+#ifndef GRUB_UTIL
+static grub_dl_t my_mod;
+#endif
+
+#define P2PHASE(x, align) ((x) & ((align) - 1))
+#define DVA_OFFSET_TO_PHYS_SECTOR(offset) \
+ ((offset + VDEV_LABEL_START_SIZE) >> SPA_MINBLOCKSHIFT)
+
+/*
+ * FAT ZAP data structures
+ */
+#define ZFS_CRC64_POLY 0xC96C5795D7870F42ULL /* ECMA-182, reflected form */
+#define ZAP_HASH_IDX(hash, n) (((n) == 0) ? 0 : ((hash) >> (64 - (n))))
+#define CHAIN_END 0xffff /* end of the chunk chain */
+
+/*
+ * The amount of space within the chunk available for the array is:
+ * chunk size - space for type (1) - space for next pointer (2)
+ */
+#define ZAP_LEAF_ARRAY_BYTES (ZAP_LEAF_CHUNKSIZE - 3)
+
+#define ZAP_LEAF_HASH_SHIFT(bs) (bs - 5)
+#define ZAP_LEAF_HASH_NUMENTRIES(bs) (1 << ZAP_LEAF_HASH_SHIFT(bs))
+#define LEAF_HASH(bs, h) \
+ ((ZAP_LEAF_HASH_NUMENTRIES(bs)-1) & \
+ ((h) >> (64 - ZAP_LEAF_HASH_SHIFT(bs)-l->l_hdr.lh_prefix_len)))
+
+/*
+ * The amount of space available for chunks is:
+ * block size shift - hash entry size (2) * number of hash
+ * entries - header space (2*chunksize)
+ */
+#define ZAP_LEAF_NUMCHUNKS(bs) \
+ (((1<<bs) - 2*ZAP_LEAF_HASH_NUMENTRIES(bs)) / \
+ ZAP_LEAF_CHUNKSIZE - 2)
+
+/*
+ * The chunks start immediately after the hash table. The end of the
+ * hash table is at l_hash + HASH_NUMENTRIES, which we simply cast to a
+ * chunk_t.
+ */
+#define ZAP_LEAF_CHUNK(l, bs, idx) \
+ ((zap_leaf_chunk_t *)(l->l_hash + ZAP_LEAF_HASH_NUMENTRIES(bs)))[idx]
+#define ZAP_LEAF_ENTRY(l, bs, idx) (&ZAP_LEAF_CHUNK(l, bs, idx).l_entry)
+
+
+/*
+ * Decompression Entry - lzjb
+ */
+#ifndef NBBY
+#define NBBY 8
+#endif
+
+extern grub_err_t lzjb_decompress (void *, void *, grub_size_t, grub_size_t);
+
+typedef grub_err_t zfs_decomp_func_t (void *s_start, void *d_start,
+ grub_size_t s_len, grub_size_t d_len);
+typedef struct decomp_entry
+{
+ char *name;
+ zfs_decomp_func_t *decomp_func;
+} decomp_entry_t;
+
+typedef struct dnode_end
+{
+ dnode_phys_t dn;
+ grub_zfs_endian_t endian;
+} dnode_end_t;
+
+struct grub_zfs_data
+{
+ /* cache for a file block of the currently zfs_open()-ed file */
+ char *file_buf;
+ grub_uint64_t file_start;
+ grub_uint64_t file_end;
+
+ /* cache for a dnode block */
+ dnode_phys_t *dnode_buf;
+ dnode_phys_t *dnode_mdn;
+ grub_uint64_t dnode_start;
+ grub_uint64_t dnode_end;
+ grub_zfs_endian_t dnode_endian;
+
+ uberblock_t current_uberblock;
+ grub_disk_t disk;
+
+ dnode_end_t mos;
+ dnode_end_t mdn;
+ dnode_end_t dnode;
+
+ grub_disk_addr_t vdev_phys_sector;
+};
+
+static decomp_entry_t decomp_table[ZIO_COMPRESS_FUNCTIONS] = {
+ {"inherit", NULL}, /* ZIO_COMPRESS_INHERIT */
+ {"on", lzjb_decompress}, /* ZIO_COMPRESS_ON */
+ {"off", NULL}, /* ZIO_COMPRESS_OFF */
+ {"lzjb", lzjb_decompress}, /* ZIO_COMPRESS_LZJB */
+ {"empty", NULL}, /* ZIO_COMPRESS_EMPTY */
+ {"gzip", NULL}, /* ZIO_COMPRESS_GZIP */
+};
+
+static grub_err_t zio_read_data (blkptr_t * bp, grub_zfs_endian_t endian,
+ void *buf, struct grub_zfs_data *data);
+
+/*
+ * Our own version of log2(). Same thing as highbit()-1.
+ */
+static int
+zfs_log2 (grub_uint64_t num)
+{
+ int i = 0;
+
+ while (num > 1)
+ {
+ i++;
+ num = num >> 1;
+ }
+
+ return (i);
+}
+
+/* Checksum Functions */
+static void
+zio_checksum_off (const void *buf __attribute__ ((unused)),
+ grub_uint64_t size __attribute__ ((unused)),
+ grub_zfs_endian_t endian __attribute__ ((unused)),
+ zio_cksum_t * zcp)
+{
+ ZIO_SET_CHECKSUM (zcp, 0, 0, 0, 0);
+}
+
+/* Checksum Table and Values */
+static zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = {
+ {NULL, 0, 0, "inherit"},
+ {NULL, 0, 0, "on"},
+ {zio_checksum_off, 0, 0, "off"},
+ {zio_checksum_SHA256, 1, 1, "label"},
+ {zio_checksum_SHA256, 1, 1, "gang_header"},
+ {NULL, 0, 0, "zilog"},
+ {fletcher_2, 0, 0, "fletcher2"},
+ {fletcher_4, 1, 0, "fletcher4"},
+ {zio_checksum_SHA256, 1, 0, "SHA256"},
+ {NULL, 0, 0, "zilog2"},
+};
+
+/*
+ * zio_checksum_verify: Provides support for checksum verification.
+ *
+ * Fletcher2, Fletcher4, and SHA256 are supported.
+ *
+ */
+static grub_err_t
+zio_checksum_verify (zio_cksum_t zc, grub_uint32_t checksum,
+ grub_zfs_endian_t endian, char *buf, int size)
+{
+ zio_eck_t *zec = (zio_eck_t *) (buf + size) - 1;
+ zio_checksum_info_t *ci = &zio_checksum_table[checksum];
+ zio_cksum_t actual_cksum, expected_cksum;
+
+ if (checksum >= ZIO_CHECKSUM_FUNCTIONS || ci->ci_func == NULL)
+ {
+ grub_dprintf ("zfs", "unknown checksum function %d\n", checksum);
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unknown checksum function %d", checksum);
+ }
+
+ if (ci->ci_eck)
+ {
+ expected_cksum = zec->zec_cksum;
+ zec->zec_cksum = zc;
+ ci->ci_func (buf, size, endian, &actual_cksum);
+ zec->zec_cksum = expected_cksum;
+ zc = expected_cksum;
+ }
+ else
+ ci->ci_func (buf, size, endian, &actual_cksum);
+
+ if ((actual_cksum.zc_word[0] != zc.zc_word[0])
+ || (actual_cksum.zc_word[1] != zc.zc_word[1])
+ || (actual_cksum.zc_word[2] != zc.zc_word[2])
+ || (actual_cksum.zc_word[3] != zc.zc_word[3]))
+ {
+ grub_dprintf ("zfs", "checksum %d verification failed\n", checksum);
+ grub_dprintf ("zfs", "actual checksum %16llx %16llx %16llx %16llx\n",
+ (unsigned long long) actual_cksum.zc_word[0],
+ (unsigned long long) actual_cksum.zc_word[1],
+ (unsigned long long) actual_cksum.zc_word[2],
+ (unsigned long long) actual_cksum.zc_word[3]);
+ grub_dprintf ("zfs", "expected checksum %16llx %16llx %16llx %16llx\n",
+ (unsigned long long) zc.zc_word[0],
+ (unsigned long long) zc.zc_word[1],
+ (unsigned long long) zc.zc_word[2],
+ (unsigned long long) zc.zc_word[3]);
+ return grub_error (GRUB_ERR_BAD_FS, "checksum verification failed");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/*
+ * vdev_uberblock_compare takes two uberblock structures and returns an integer
+ * indicating the more recent of the two.
+ * Return Value = 1 if ub2 is more recent
+ * Return Value = -1 if ub1 is more recent
+ * The most recent uberblock is determined using its transaction number and
+ * timestamp. The uberblock with the highest transaction number is
+ * considered "newer". If the transaction numbers of the two blocks match, the
+ * timestamps are compared to determine the "newer" of the two.
+ */
+static int
+vdev_uberblock_compare (uberblock_t * ub1, uberblock_t * ub2)
+{
+ grub_zfs_endian_t ub1_endian, ub2_endian;
+ if (grub_zfs_to_cpu64 (ub1->ub_magic, LITTLE_ENDIAN) == UBERBLOCK_MAGIC)
+ ub1_endian = LITTLE_ENDIAN;
+ else
+ ub1_endian = BIG_ENDIAN;
+ if (grub_zfs_to_cpu64 (ub2->ub_magic, LITTLE_ENDIAN) == UBERBLOCK_MAGIC)
+ ub2_endian = LITTLE_ENDIAN;
+ else
+ ub2_endian = BIG_ENDIAN;
+
+ if (grub_zfs_to_cpu64 (ub1->ub_txg, ub1_endian)
+ < grub_zfs_to_cpu64 (ub2->ub_txg, ub2_endian))
+ return (-1);
+ if (grub_zfs_to_cpu64 (ub1->ub_txg, ub1_endian)
+ > grub_zfs_to_cpu64 (ub2->ub_txg, ub2_endian))
+ return (1);
+
+ if (grub_zfs_to_cpu64 (ub1->ub_timestamp, ub1_endian)
+ < grub_zfs_to_cpu64 (ub2->ub_timestamp, ub2_endian))
+ return (-1);
+ if (grub_zfs_to_cpu64 (ub1->ub_timestamp, ub1_endian)
+ > grub_zfs_to_cpu64 (ub2->ub_timestamp, ub2_endian))
+ return (1);
+
+ return (0);
+}
+
+/*
+ * Three pieces of information are needed to verify an uberblock: the magic
+ * number, the version number, and the checksum.
+ *
+ * Currently Implemented: version number, magic number
+ * Need to Implement: checksum
+ *
+ */
+static grub_err_t
+uberblock_verify (uberblock_phys_t * ub, int offset)
+{
+ uberblock_t *uber = &ub->ubp_uberblock;
+ grub_err_t err;
+ grub_zfs_endian_t endian = UNKNOWN_ENDIAN;
+ zio_cksum_t zc;
+
+ if (grub_zfs_to_cpu64 (uber->ub_magic, LITTLE_ENDIAN) == UBERBLOCK_MAGIC
+ && grub_zfs_to_cpu64 (uber->ub_version, LITTLE_ENDIAN) > 0
+ && grub_zfs_to_cpu64 (uber->ub_version, LITTLE_ENDIAN) <= SPA_VERSION)
+ endian = LITTLE_ENDIAN;
+
+ if (grub_zfs_to_cpu64 (uber->ub_magic, BIG_ENDIAN) == UBERBLOCK_MAGIC
+ && grub_zfs_to_cpu64 (uber->ub_version, BIG_ENDIAN) > 0
+ && grub_zfs_to_cpu64 (uber->ub_version, BIG_ENDIAN) <= SPA_VERSION)
+ endian = BIG_ENDIAN;
+
+ if (endian == UNKNOWN_ENDIAN)
+ return grub_error (GRUB_ERR_BAD_FS, "invalid uberblock magic");
+
+ grub_memset (&zc, 0, sizeof (zc));
+
+ zc.zc_word[0] = grub_cpu_to_zfs64 (offset, endian);
+ err = zio_checksum_verify (zc, ZIO_CHECKSUM_LABEL, endian,
+ (char *) ub, UBERBLOCK_SIZE);
+
+ return err;
+}
+
+/*
+ * Find the best uberblock.
+ * Return:
+ * Success - Pointer to the best uberblock.
+ * Failure - NULL
+ */
+static uberblock_phys_t *
+find_bestub (uberblock_phys_t * ub_array, grub_disk_addr_t sector)
+{
+ uberblock_phys_t *ubbest = NULL;
+ int i;
+ grub_disk_addr_t offset;
+ grub_err_t err = GRUB_ERR_NONE;
+
+ for (i = 0; i < (VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT); i++)
+ {
+ offset = (sector << SPA_MINBLOCKSHIFT) + VDEV_PHYS_SIZE
+ + (i << VDEV_UBERBLOCK_SHIFT);
+
+ err = uberblock_verify (&ub_array[i], offset);
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+ if (ubbest == NULL
+ || vdev_uberblock_compare (&(ub_array[i].ubp_uberblock),
+ &(ubbest->ubp_uberblock)) > 0)
+ ubbest = &ub_array[i];
+ }
+ if (!ubbest)
+ grub_errno = err;
+
+ return (ubbest);
+}
+
+static inline grub_size_t
+get_psize (blkptr_t * bp, grub_zfs_endian_t endian)
+{
+ return ((((grub_zfs_to_cpu64 ((bp)->blk_prop, endian) >> 16) & 0xffff) + 1)
+ << SPA_MINBLOCKSHIFT);
+}
+
+static grub_uint64_t
+dva_get_offset (dva_t * dva, grub_zfs_endian_t endian)
+{
+ grub_dprintf ("zfs", "dva=%llx, %llx\n",
+ (unsigned long long) dva->dva_word[0],
+ (unsigned long long) dva->dva_word[1]);
+ return grub_zfs_to_cpu64 ((dva)->dva_word[1],
+ endian) << SPA_MINBLOCKSHIFT;
+}
+
+
+/*
+ * Read a block of data based on the gang block address dva,
+ * and put its data in buf.
+ *
+ */
+static grub_err_t
+zio_read_gang (blkptr_t * bp, grub_zfs_endian_t endian, dva_t * dva, void *buf,
+ struct grub_zfs_data *data)
+{
+ zio_gbh_phys_t *zio_gb;
+ grub_uint64_t offset, sector;
+ unsigned i;
+ grub_err_t err;
+ zio_cksum_t zc;
+
+ grub_memset (&zc, 0, sizeof (zc));
+
+ zio_gb = grub_malloc (SPA_GANGBLOCKSIZE);
+ if (!zio_gb)
+ return grub_errno;
+ grub_dprintf ("zfs", endian == LITTLE_ENDIAN ? "little-endian gang\n"
+ :"big-endian gang\n");
+ offset = dva_get_offset (dva, endian);
+ sector = DVA_OFFSET_TO_PHYS_SECTOR (offset);
+ grub_dprintf ("zfs", "offset=%llx\n", (unsigned long long) offset);
+
+ /* read in the gang block header */
+ err = grub_disk_read (data->disk, sector, 0, SPA_GANGBLOCKSIZE,
+ (char *) zio_gb);
+ if (err)
+ {
+ grub_free (zio_gb);
+ return err;
+ }
+
+ /* XXX */
+ /* self checksuming the gang block header */
+ ZIO_SET_CHECKSUM (&zc, DVA_GET_VDEV (dva),
+ dva_get_offset (dva, endian), bp->blk_birth, 0);
+ err = zio_checksum_verify (zc, ZIO_CHECKSUM_GANG_HEADER, endian,
+ (char *) zio_gb, SPA_GANGBLOCKSIZE);
+ if (err)
+ {
+ grub_free (zio_gb);
+ return err;
+ }
+
+ endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+
+ for (i = 0; i < SPA_GBH_NBLKPTRS; i++)
+ {
+ if (zio_gb->zg_blkptr[i].blk_birth == 0)
+ continue;
+
+ err = zio_read_data (&zio_gb->zg_blkptr[i], endian, buf, data);
+ if (err)
+ {
+ grub_free (zio_gb);
+ return err;
+ }
+ buf = (char *) buf + get_psize (&zio_gb->zg_blkptr[i], endian);
+ }
+ grub_free (zio_gb);
+ return GRUB_ERR_NONE;
+}
+
+/*
+ * Read in a block of raw data to buf.
+ */
+static grub_err_t
+zio_read_data (blkptr_t * bp, grub_zfs_endian_t endian, void *buf,
+ struct grub_zfs_data *data)
+{
+ int i, psize;
+ grub_err_t err = GRUB_ERR_NONE;
+
+ psize = get_psize (bp, endian);
+
+ /* pick a good dva from the block pointer */
+ for (i = 0; i < SPA_DVAS_PER_BP; i++)
+ {
+ grub_uint64_t offset, sector;
+
+ if (bp->blk_dva[i].dva_word[0] == 0 && bp->blk_dva[i].dva_word[1] == 0)
+ continue;
+
+ if ((grub_zfs_to_cpu64 (bp->blk_dva[i].dva_word[1], endian)>>63) & 1)
+ err = zio_read_gang (bp, endian, &bp->blk_dva[i], buf, data);
+ else
+ {
+ /* read in a data block */
+ offset = dva_get_offset (&bp->blk_dva[i], endian);
+ sector = DVA_OFFSET_TO_PHYS_SECTOR (offset);
+ err = grub_disk_read (data->disk, sector, 0, psize, buf);
+ }
+ if (!err)
+ return GRUB_ERR_NONE;
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if (!err)
+ err = grub_error (GRUB_ERR_BAD_FS, "couldn't find a valid DVA");
+ grub_errno = err;
+
+ return err;
+}
+
+/*
+ * Read in a block of data, verify its checksum, decompress if needed,
+ * and put the uncompressed data in buf.
+ */
+static grub_err_t
+zio_read (blkptr_t * bp, grub_zfs_endian_t endian, void **buf,
+ grub_size_t *size, struct grub_zfs_data *data)
+{
+ grub_size_t lsize, psize;
+ unsigned int comp;
+ char *compbuf = NULL;
+ grub_err_t err;
+ zio_cksum_t zc = bp->blk_cksum;
+ grub_uint32_t checksum;
+
+ *buf = NULL;
+
+ checksum = (grub_zfs_to_cpu64((bp)->blk_prop, endian) >> 40) & 0xff;
+ comp = (grub_zfs_to_cpu64((bp)->blk_prop, endian)>>32) & 0x7;
+ lsize = (BP_IS_HOLE(bp) ? 0 :
+ (((grub_zfs_to_cpu64 ((bp)->blk_prop, endian) & 0xffff) + 1)
+ << SPA_MINBLOCKSHIFT));
+ psize = get_psize (bp, endian);
+
+ if (size)
+ *size = lsize;
+
+ if (comp >= ZIO_COMPRESS_FUNCTIONS)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "compression algorithm %u not supported\n", (unsigned int) comp);
+
+ if (comp != ZIO_COMPRESS_OFF && decomp_table[comp].decomp_func == NULL)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "compression algorithm %s not supported\n", decomp_table[comp].name);
+
+ if (comp != ZIO_COMPRESS_OFF)
+ {
+ compbuf = grub_malloc (psize);
+ if (! compbuf)
+ return grub_errno;
+ }
+ else
+ compbuf = *buf = grub_malloc (lsize);
+
+ grub_dprintf ("zfs", "endian = %d\n", endian);
+ err = zio_read_data (bp, endian, compbuf, data);
+ if (err)
+ {
+ grub_free (compbuf);
+ *buf = NULL;
+ return err;
+ }
+
+ err = zio_checksum_verify (zc, checksum, endian, compbuf, psize);
+ if (err)
+ {
+ grub_dprintf ("zfs", "incorrect checksum\n");
+ grub_free (compbuf);
+ *buf = NULL;
+ return err;
+ }
+
+ if (comp != ZIO_COMPRESS_OFF)
+ {
+ *buf = grub_malloc (lsize);
+ if (!*buf)
+ {
+ grub_free (compbuf);
+ return grub_errno;
+ }
+
+ err = decomp_table[comp].decomp_func (compbuf, *buf, psize, lsize);
+ grub_free (compbuf);
+ if (err)
+ {
+ grub_free (*buf);
+ *buf = NULL;
+ return err;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/*
+ * Get the block from a block id.
+ * push the block onto the stack.
+ *
+ */
+static grub_err_t
+dmu_read (dnode_end_t * dn, grub_uint64_t blkid, void **buf,
+ grub_zfs_endian_t *endian_out, struct grub_zfs_data *data)
+{
+ int idx, level;
+ blkptr_t *bp_array = dn->dn.dn_blkptr;
+ int epbs = dn->dn.dn_indblkshift - SPA_BLKPTRSHIFT;
+ blkptr_t *bp;
+ void *tmpbuf = 0;
+ grub_zfs_endian_t endian;
+ grub_err_t err = GRUB_ERR_NONE;
+
+ bp = grub_malloc (sizeof (blkptr_t));
+ if (!bp)
+ return grub_errno;
+
+ endian = dn->endian;
+ for (level = dn->dn.dn_nlevels - 1; level >= 0; level--)
+ {
+ grub_dprintf ("zfs", "endian = %d\n", endian);
+ idx = (blkid >> (epbs * level)) & ((1 << epbs) - 1);
+ *bp = bp_array[idx];
+ if (bp_array != dn->dn.dn_blkptr)
+ {
+ grub_free (bp_array);
+ bp_array = 0;
+ }
+
+ if (BP_IS_HOLE (bp))
+ {
+ grub_size_t size = grub_zfs_to_cpu16 (dn->dn.dn_datablkszsec,
+ dn->endian)
+ << SPA_MINBLOCKSHIFT;
+ *buf = grub_malloc (size);
+ if (*buf)
+ {
+ err = grub_errno;
+ break;
+ }
+ grub_memset (*buf, 0, size);
+ endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+ break;
+ }
+ if (level == 0)
+ {
+ grub_dprintf ("zfs", "endian = %d\n", endian);
+ err = zio_read (bp, endian, buf, 0, data);
+ endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+ break;
+ }
+ grub_dprintf ("zfs", "endian = %d\n", endian);
+ err = zio_read (bp, endian, &tmpbuf, 0, data);
+ endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+ if (err)
+ break;
+ bp_array = tmpbuf;
+ }
+ if (bp_array != dn->dn.dn_blkptr)
+ grub_free (bp_array);
+ if (endian_out)
+ *endian_out = endian;
+
+ grub_free (bp);
+ return err;
+}
+
+/*
+ * mzap_lookup: Looks up property described by "name" and returns the value
+ * in "value".
+ */
+static grub_err_t
+mzap_lookup (mzap_phys_t * zapobj, grub_zfs_endian_t endian,
+ int objsize, char *name, grub_uint64_t * value)
+{
+ int i, chunks;
+ mzap_ent_phys_t *mzap_ent = zapobj->mz_chunk;
+
+ chunks = objsize / MZAP_ENT_LEN - 1;
+ for (i = 0; i < chunks; i++)
+ {
+ if (grub_strcmp (mzap_ent[i].mze_name, name) == 0)
+ {
+ *value = grub_zfs_to_cpu64 (mzap_ent[i].mze_value, endian);
+ return GRUB_ERR_NONE;
+ }
+ }
+
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't find %s", name);
+}
+
+static int
+mzap_iterate (mzap_phys_t * zapobj, grub_zfs_endian_t endian, int objsize,
+ int NESTED_FUNC_ATTR (*hook) (const char *name,
+ grub_uint64_t val))
+{
+ int i, chunks;
+ mzap_ent_phys_t *mzap_ent = zapobj->mz_chunk;
+
+ chunks = objsize / MZAP_ENT_LEN - 1;
+ for (i = 0; i < chunks; i++)
+ {
+ grub_dprintf ("zfs", "zap: name = %s, value = %llx, cd = %x\n",
+ mzap_ent[i].mze_name, (long long)mzap_ent[i].mze_value,
+ (int)mzap_ent[i].mze_cd);
+ if (hook (mzap_ent[i].mze_name,
+ grub_zfs_to_cpu64 (mzap_ent[i].mze_value, endian)))
+ return 1;
+ }
+
+ return 0;
+}
+
+static grub_uint64_t
+zap_hash (grub_uint64_t salt, const char *name)
+{
+ static grub_uint64_t table[256];
+ const grub_uint8_t *cp;
+ grub_uint8_t c;
+ grub_uint64_t crc = salt;
+
+ if (table[128] == 0)
+ {
+ grub_uint64_t *ct;
+ int i, j;
+ for (i = 0; i < 256; i++)
+ {
+ for (ct = table + i, *ct = i, j = 8; j > 0; j--)
+ *ct = (*ct >> 1) ^ (-(*ct & 1) & ZFS_CRC64_POLY);
+ }
+ }
+
+ for (cp = (const grub_uint8_t *) name; (c = *cp) != '\0'; cp++)
+ crc = (crc >> 8) ^ table[(crc ^ c) & 0xFF];
+
+ /*
+ * Only use 28 bits, since we need 4 bits in the cookie for the
+ * collision differentiator. We MUST use the high bits, since
+ * those are the onces that we first pay attention to when
+ * chosing the bucket.
+ */
+ crc &= ~((1ULL << (64 - ZAP_HASHBITS)) - 1);
+
+ return (crc);
+}
+
+/*
+ * Only to be used on 8-bit arrays.
+ * array_len is actual len in bytes (not encoded le_value_length).
+ * buf is null-terminated.
+ */
+/* XXX */
+static int
+zap_leaf_array_equal (zap_leaf_phys_t * l, grub_zfs_endian_t endian,
+ int blksft, int chunk, int array_len, const char *buf)
+{
+ int bseen = 0;
+
+ while (bseen < array_len)
+ {
+ struct zap_leaf_array *la = &ZAP_LEAF_CHUNK (l, blksft, chunk).l_array;
+ int toread = MIN (array_len - bseen, ZAP_LEAF_ARRAY_BYTES);
+
+ if (chunk >= ZAP_LEAF_NUMCHUNKS (blksft))
+ return (0);
+
+ if (grub_memcmp (la->la_array, buf + bseen, toread) != 0)
+ break;
+ chunk = grub_zfs_to_cpu16 (la->la_next, endian);
+ bseen += toread;
+ }
+ return (bseen == array_len);
+}
+
+/* XXX */
+static grub_err_t
+zap_leaf_array_get (zap_leaf_phys_t * l, grub_zfs_endian_t endian, int blksft,
+ int chunk, int array_len, char *buf)
+{
+ int bseen = 0;
+
+ while (bseen < array_len)
+ {
+ struct zap_leaf_array *la = &ZAP_LEAF_CHUNK (l, blksft, chunk).l_array;
+ int toread = MIN (array_len - bseen, ZAP_LEAF_ARRAY_BYTES);
+
+ if (chunk >= ZAP_LEAF_NUMCHUNKS (blksft))
+ /* Don't use grub_error because this error is to be ignored. */
+ return GRUB_ERR_BAD_FS;
+
+ grub_memcpy (buf + bseen,la->la_array, toread);
+ chunk = grub_zfs_to_cpu16 (la->la_next, endian);
+ bseen += toread;
+ }
+ return GRUB_ERR_NONE;
+}
+
+
+/*
+ * Given a zap_leaf_phys_t, walk thru the zap leaf chunks to get the
+ * value for the property "name".
+ *
+ */
+/* XXX */
+static grub_err_t
+zap_leaf_lookup (zap_leaf_phys_t * l, grub_zfs_endian_t endian,
+ int blksft, grub_uint64_t h,
+ const char *name, grub_uint64_t * value)
+{
+ grub_uint16_t chunk;
+ struct zap_leaf_entry *le;
+
+ /* Verify if this is a valid leaf block */
+ if (grub_zfs_to_cpu64 (l->l_hdr.lh_block_type, endian) != ZBT_LEAF)
+ return grub_error (GRUB_ERR_BAD_FS, "invalid leaf type");
+ if (grub_zfs_to_cpu32 (l->l_hdr.lh_magic, endian) != ZAP_LEAF_MAGIC)
+ return grub_error (GRUB_ERR_BAD_FS, "invalid leaf magic");
+
+ for (chunk = grub_zfs_to_cpu16 (l->l_hash[LEAF_HASH (blksft, h)], endian);
+ chunk != CHAIN_END; chunk = le->le_next)
+ {
+
+ if (chunk >= ZAP_LEAF_NUMCHUNKS (blksft))
+ return grub_error (GRUB_ERR_BAD_FS, "invalid chunk number");
+
+ le = ZAP_LEAF_ENTRY (l, blksft, chunk);
+
+ /* Verify the chunk entry */
+ if (le->le_type != ZAP_CHUNK_ENTRY)
+ return grub_error (GRUB_ERR_BAD_FS, "invalid chunk entry");
+
+ if (grub_zfs_to_cpu64 (le->le_hash,endian) != h)
+ continue;
+
+ grub_dprintf ("zfs", "fzap: length %d\n", (int) le->le_name_length);
+
+ if (zap_leaf_array_equal (l, endian, blksft,
+ grub_zfs_to_cpu16 (le->le_name_chunk,endian),
+ grub_zfs_to_cpu16 (le->le_name_length, endian),
+ name))
+ {
+ struct zap_leaf_array *la;
+
+ if (le->le_int_size != 8 || le->le_value_length != 1)
+ return grub_error (GRUB_ERR_BAD_FS, "invalid leaf chunk entry");
+
+ /* get the uint64_t property value */
+ la = &ZAP_LEAF_CHUNK (l, blksft, le->le_value_chunk).l_array;
+
+ *value = grub_be_to_cpu64 (la->la_array64);
+
+ return GRUB_ERR_NONE;
+ }
+ }
+
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't find %s", name);
+}
+
+
+/* Verify if this is a fat zap header block */
+static grub_err_t
+zap_verify (zap_phys_t *zap)
+{
+ if (zap->zap_magic != (grub_uint64_t) ZAP_MAGIC)
+ return grub_error (GRUB_ERR_BAD_FS, "bad ZAP magic");
+
+ if (zap->zap_flags != 0)
+ return grub_error (GRUB_ERR_BAD_FS, "bad ZAP flags");
+
+ if (zap->zap_salt == 0)
+ return grub_error (GRUB_ERR_BAD_FS, "bad ZAP salt");
+
+ return GRUB_ERR_NONE;
+}
+
+/*
+ * Fat ZAP lookup
+ *
+ */
+/* XXX */
+static grub_err_t
+fzap_lookup (dnode_end_t * zap_dnode, zap_phys_t * zap,
+ char *name, grub_uint64_t * value, struct grub_zfs_data *data)
+{
+ void *l;
+ grub_uint64_t hash, idx, blkid;
+ int blksft = zfs_log2 (grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec,
+ zap_dnode->endian) << DNODE_SHIFT);
+ grub_err_t err;
+ grub_zfs_endian_t leafendian;
+
+ err = zap_verify (zap);
+ if (err)
+ return err;
+
+ hash = zap_hash (zap->zap_salt, name);
+
+ /* get block id from index */
+ if (zap->zap_ptrtbl.zt_numblks != 0)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "external pointer tables not supported");
+ idx = ZAP_HASH_IDX (hash, zap->zap_ptrtbl.zt_shift);
+ blkid = ((grub_uint64_t *) zap)[idx + (1 << (blksft - 3 - 1))];
+
+ /* Get the leaf block */
+ if ((1U << blksft) < sizeof (zap_leaf_phys_t))
+ return grub_error (GRUB_ERR_BAD_FS, "ZAP leaf is too small");
+ err = dmu_read (zap_dnode, blkid, &l, &leafendian, data);
+ if (err)
+ return err;
+
+ err = zap_leaf_lookup (l, leafendian, blksft, hash, name, value);
+ grub_free (l);
+ return err;
+}
+
+/* XXX */
+static int
+fzap_iterate (dnode_end_t * zap_dnode, zap_phys_t * zap,
+ int NESTED_FUNC_ATTR (*hook) (const char *name,
+ grub_uint64_t val),
+ struct grub_zfs_data *data)
+{
+ zap_leaf_phys_t *l;
+ void *l_in;
+ grub_uint64_t idx, blkid;
+ grub_uint16_t chunk;
+ int blksft = zfs_log2 (grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec,
+ zap_dnode->endian) << DNODE_SHIFT);
+ grub_err_t err;
+ grub_zfs_endian_t endian;
+
+ if (zap_verify (zap))
+ return 0;
+
+ /* get block id from index */
+ if (zap->zap_ptrtbl.zt_numblks != 0)
+ {
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "external pointer tables not supported");
+ return 0;
+ }
+ /* Get the leaf block */
+ if ((1U << blksft) < sizeof (zap_leaf_phys_t))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "ZAP leaf is too small");
+ return 0;
+ }
+ for (idx = 0; idx < zap->zap_ptrtbl.zt_numblks; idx++)
+ {
+ blkid = ((grub_uint64_t *) zap)[idx + (1 << (blksft - 3 - 1))];
+
+ err = dmu_read (zap_dnode, blkid, &l_in, &endian, data);
+ l = l_in;
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ /* Verify if this is a valid leaf block */
+ if (grub_zfs_to_cpu64 (l->l_hdr.lh_block_type, endian) != ZBT_LEAF)
+ {
+ grub_free (l);
+ continue;
+ }
+ if (grub_zfs_to_cpu32 (l->l_hdr.lh_magic, endian) != ZAP_LEAF_MAGIC)
+ {
+ grub_free (l);
+ continue;
+ }
+
+ for (chunk = 0; chunk < ZAP_LEAF_NUMCHUNKS (blksft); chunk++)
+ {
+ char *buf;
+ struct zap_leaf_array *la;
+ struct zap_leaf_entry *le;
+ grub_uint64_t val;
+ le = ZAP_LEAF_ENTRY (l, blksft, chunk);
+
+ /* Verify the chunk entry */
+ if (le->le_type != ZAP_CHUNK_ENTRY)
+ continue;
+
+ buf = grub_malloc (grub_zfs_to_cpu16 (le->le_name_length, endian)
+ + 1);
+ if (zap_leaf_array_get (l, endian, blksft, le->le_name_chunk,
+ le->le_name_length, buf))
+ {
+ grub_free (buf);
+ continue;
+ }
+ buf[le->le_name_length] = 0;
+
+ if (le->le_int_size != 8
+ || grub_zfs_to_cpu16 (le->le_value_length, endian) != 1)
+ continue;
+
+ /* get the uint64_t property value */
+ la = &ZAP_LEAF_CHUNK (l, blksft, le->le_value_chunk).l_array;
+ val = grub_be_to_cpu64 (la->la_array64);
+ if (hook (buf, val))
+ return 1;
+ grub_free (buf);
+ }
+ }
+ return 0;
+}
+
+
+/*
+ * Read in the data of a zap object and find the value for a matching
+ * property name.
+ *
+ */
+static grub_err_t
+zap_lookup (dnode_end_t * zap_dnode, char *name, grub_uint64_t * val,
+ struct grub_zfs_data *data)
+{
+ grub_uint64_t block_type;
+ int size;
+ void *zapbuf;
+ grub_err_t err;
+ grub_zfs_endian_t endian;
+
+ grub_dprintf ("zfs", "looking for '%s'\n", name);
+
+ /* Read in the first block of the zap object data. */
+ size = grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec,
+ zap_dnode->endian) << SPA_MINBLOCKSHIFT;
+ err = dmu_read (zap_dnode, 0, &zapbuf, &endian, data);
+ if (err)
+ return err;
+ block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian);
+
+ grub_dprintf ("zfs", "zap read\n");
+
+ if (block_type == ZBT_MICRO)
+ {
+ grub_dprintf ("zfs", "micro zap\n");
+ err = (mzap_lookup (zapbuf, endian, size, name, val));
+ grub_dprintf ("zfs", "returned %d\n", err);
+ grub_free (zapbuf);
+ return err;
+ }
+ else if (block_type == ZBT_HEADER)
+ {
+ grub_dprintf ("zfs", "fat zap\n");
+ /* this is a fat zap */
+ err = (fzap_lookup (zap_dnode, zapbuf, name, val, data));
+ grub_dprintf ("zfs", "returned %d\n", err);
+ grub_free (zapbuf);
+ return err;
+ }
+
+ return grub_error (GRUB_ERR_BAD_FS, "unknown ZAP type");
+}
+
+static int
+zap_iterate (dnode_end_t * zap_dnode,
+ int NESTED_FUNC_ATTR (*hook) (const char *name, grub_uint64_t val),
+ struct grub_zfs_data *data)
+{
+ grub_uint64_t block_type;
+ int size;
+ void *zapbuf;
+ grub_err_t err;
+ int ret;
+ grub_zfs_endian_t endian;
+
+ /* Read in the first block of the zap object data. */
+ size = grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec, zap_dnode->endian) << SPA_MINBLOCKSHIFT;
+ err = dmu_read (zap_dnode, 0, &zapbuf, &endian, data);
+ if (err)
+ return 0;
+ block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian);
+
+ grub_dprintf ("zfs", "zap read\n");
+
+ if (block_type == ZBT_MICRO)
+ {
+ grub_dprintf ("zfs", "micro zap\n");
+ ret = mzap_iterate (zapbuf, endian, size, hook);
+ grub_free (zapbuf);
+ return ret;
+ }
+ else if (block_type == ZBT_HEADER)
+ {
+ grub_dprintf ("zfs", "fat zap\n");
+ /* this is a fat zap */
+ ret = fzap_iterate (zap_dnode, zapbuf, hook, data);
+ grub_free (zapbuf);
+ return ret;
+ }
+ grub_error (GRUB_ERR_BAD_FS, "unknown ZAP type");
+ return 0;
+}
+
+
+/*
+ * Get the dnode of an object number from the metadnode of an object set.
+ *
+ * Input
+ * mdn - metadnode to get the object dnode
+ * objnum - object number for the object dnode
+ * buf - data buffer that holds the returning dnode
+ */
+static grub_err_t
+dnode_get (dnode_end_t * mdn, grub_uint64_t objnum, grub_uint8_t type,
+ dnode_end_t * buf, struct grub_zfs_data *data)
+{
+ grub_uint64_t blkid, blksz; /* the block id this object dnode is in */
+ int epbs; /* shift of number of dnodes in a block */
+ int idx; /* index within a block */
+ void *dnbuf;
+ grub_err_t err;
+ grub_zfs_endian_t endian;
+
+ blksz = grub_zfs_to_cpu16 (mdn->dn.dn_datablkszsec,
+ mdn->endian) << SPA_MINBLOCKSHIFT;
+ epbs = zfs_log2 (blksz) - DNODE_SHIFT;
+ blkid = objnum >> epbs;
+ idx = objnum & ((1 << epbs) - 1);
+
+ if (data->dnode_buf != NULL && grub_memcmp (data->dnode_mdn, mdn,
+ sizeof (*mdn)) == 0
+ && objnum >= data->dnode_start && objnum < data->dnode_end)
+ {
+ grub_memmove (&(buf->dn), &(data->dnode_buf)[idx], DNODE_SIZE);
+ buf->endian = data->dnode_endian;
+ if (type && buf->dn.dn_type != type)
+ return grub_error(GRUB_ERR_BAD_FS, "incorrect dnode type");
+ return GRUB_ERR_NONE;
+ }
+
+ grub_dprintf ("zfs", "endian = %d, blkid=%llx\n", mdn->endian,
+ (unsigned long long) blkid);
+ err = dmu_read (mdn, blkid, &dnbuf, &endian, data);
+ if (err)
+ return err;
+ grub_dprintf ("zfs", "alive\n");
+
+ grub_free (data->dnode_buf);
+ grub_free (data->dnode_mdn);
+ data->dnode_mdn = grub_malloc (sizeof (*mdn));
+ if (! data->dnode_mdn)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ data->dnode_buf = 0;
+ }
+ else
+ {
+ grub_memcpy (data->dnode_mdn, mdn, sizeof (*mdn));
+ data->dnode_buf = dnbuf;
+ data->dnode_start = blkid << epbs;
+ data->dnode_end = (blkid + 1) << epbs;
+ data->dnode_endian = endian;
+ }
+
+ grub_memmove (&(buf->dn), (dnode_phys_t *) dnbuf + idx, DNODE_SIZE);
+ buf->endian = endian;
+ if (type && buf->dn.dn_type != type)
+ return grub_error(GRUB_ERR_BAD_FS, "incorrect dnode type");
+
+ return GRUB_ERR_NONE;
+}
+
+/*
+ * Get the file dnode for a given file name where mdn is the meta dnode
+ * for this ZFS object set. When found, place the file dnode in dn.
+ * The 'path' argument will be mangled.
+ *
+ */
+static grub_err_t
+dnode_get_path (dnode_end_t * mdn, const char *path_in, dnode_end_t * dn,
+ struct grub_zfs_data *data)
+{
+ grub_uint64_t objnum, version;
+ char *cname, ch;
+ grub_err_t err = GRUB_ERR_NONE;
+ char *path, *path_buf;
+ struct dnode_chain
+ {
+ struct dnode_chain *next;
+ dnode_end_t dn;
+ };
+ struct dnode_chain *dnode_path = 0, *dn_new, *root;
+
+ dn_new = grub_malloc (sizeof (*dn_new));
+ if (! dn_new)
+ return grub_errno;
+ dn_new->next = 0;
+ dnode_path = root = dn_new;
+
+ err = dnode_get (mdn, MASTER_NODE_OBJ, DMU_OT_MASTER_NODE,
+ &(dnode_path->dn), data);
+ if (err)
+ {
+ grub_free (dn_new);
+ return err;
+ }
+
+ err = zap_lookup (&(dnode_path->dn), ZPL_VERSION_STR, &version, data);
+ if (err)
+ {
+ grub_free (dn_new);
+ return err;
+ }
+ if (version > ZPL_VERSION)
+ {
+ grub_free (dn_new);
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "too new ZPL version");
+ }
+
+ err = zap_lookup (&(dnode_path->dn), ZFS_ROOT_OBJ, &objnum, data);
+ if (err)
+ {
+ grub_free (dn_new);
+ return err;
+ }
+
+ err = dnode_get (mdn, objnum, 0, &(dnode_path->dn), data);
+ if (err)
+ {
+ grub_free (dn_new);
+ return err;
+ }
+
+ path = path_buf = grub_strdup (path_in);
+ if (!path_buf)
+ {
+ grub_free (dn_new);
+ return grub_errno;
+ }
+
+ while (1)
+ {
+ /* skip leading slashes */
+ while (*path == '/')
+ path++;
+ if (!*path)
+ break;
+ /* get the next component name */
+ cname = path;
+ while (*path && *path != '/')
+ path++;
+ /* Skip dot. */
+ if (cname + 1 == path && cname[0] == '.')
+ continue;
+ /* Handle double dot. */
+ if (cname + 2 == path && cname[0] == '.' && cname[1] == '.')
+ {
+ if (dn_new->next)
+ {
+ dn_new = dnode_path;
+ dnode_path = dn_new->next;
+ grub_free (dn_new);
+ }
+ else
+ {
+ err = grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "can't resolve ..");
+ break;
+ }
+ continue;
+ }
+
+ ch = *path;
+ *path = 0; /* ensure null termination */
+
+ if (dnode_path->dn.dn.dn_type != DMU_OT_DIRECTORY_CONTENTS)
+ {
+ grub_free (path_buf);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ }
+ err = zap_lookup (&(dnode_path->dn), cname, &objnum, data);
+ if (err)
+ break;
+
+ dn_new = grub_malloc (sizeof (*dn_new));
+ if (! dn_new)
+ {
+ err = grub_errno;
+ break;
+ }
+ dn_new->next = dnode_path;
+ dnode_path = dn_new;
+
+ objnum = ZFS_DIRENT_OBJ (objnum);
+ err = dnode_get (mdn, objnum, 0, &(dnode_path->dn), data);
+ if (err)
+ break;
+
+ *path = ch;
+#if 0
+ if (((grub_zfs_to_cpu64(((znode_phys_t *) DN_BONUS (&dnode_path->dn.dn))->zp_mode, dnode_path->dn.endian) >> 12) & 0xf) == 0xa && ch)
+ {
+ char *oldpath = path, *oldpathbuf = path_buf;
+ path = path_buf
+ = grub_malloc (sizeof (dnode_path->dn.dn.dn_bonus)
+ - sizeof (znode_phys_t) + grub_strlen (oldpath) + 1);
+ if (!path_buf)
+ {
+ grub_free (oldpathbuf);
+ return grub_errno;
+ }
+ grub_memcpy (path,
+ (char *) DN_BONUS(&dnode_path->dn.dn) + sizeof (znode_phys_t),
+ sizeof (dnode_path->dn.dn.dn_bonus) - sizeof (znode_phys_t));
+ path [sizeof (dnode_path->dn.dn.dn_bonus) - sizeof (znode_phys_t)] = 0;
+ grub_memcpy (path + grub_strlen (path), oldpath,
+ grub_strlen (oldpath) + 1);
+
+ grub_free (oldpathbuf);
+ if (path[0] != '/')
+ {
+ dn_new = dnode_path;
+ dnode_path = dn_new->next;
+ grub_free (dn_new);
+ }
+ else while (dnode_path != root)
+ {
+ dn_new = dnode_path;
+ dnode_path = dn_new->next;
+ grub_free (dn_new);
+ }
+ }
+#endif
+ }
+
+ if (!err)
+ grub_memcpy (dn, &(dnode_path->dn), sizeof (*dn));
+
+ while (dnode_path)
+ {
+ dn_new = dnode_path->next;
+ grub_free (dnode_path);
+ dnode_path = dn_new;
+ }
+ grub_free (path_buf);
+ return err;
+}
+
+#if 0
+/*
+ * Get the default 'bootfs' property value from the rootpool.
+ *
+ */
+static grub_err_t
+get_default_bootfsobj (dnode_phys_t * mosmdn, grub_uint64_t * obj,
+ struct grub_zfs_data *data)
+{
+ grub_uint64_t objnum = 0;
+ dnode_phys_t *dn;
+ if (!dn)
+ return grub_errno;
+
+ if ((grub_errno = dnode_get (mosmdn, DMU_POOL_DIRECTORY_OBJECT,
+ DMU_OT_OBJECT_DIRECTORY, dn, data)))
+ {
+ grub_free (dn);
+ return (grub_errno);
+ }
+
+ /*
+ * find the object number for 'pool_props', and get the dnode
+ * of the 'pool_props'.
+ */
+ if (zap_lookup (dn, DMU_POOL_PROPS, &objnum, data))
+ {
+ grub_free (dn);
+ return (GRUB_ERR_BAD_FS);
+ }
+ if ((grub_errno = dnode_get (mosmdn, objnum, DMU_OT_POOL_PROPS, dn, data)))
+ {
+ grub_free (dn);
+ return (grub_errno);
+ }
+ if (zap_lookup (dn, ZPOOL_PROP_BOOTFS, &objnum, data))
+ {
+ grub_free (dn);
+ return (GRUB_ERR_BAD_FS);
+ }
+
+ if (!objnum)
+ {
+ grub_free (dn);
+ return (GRUB_ERR_BAD_FS);
+ }
+
+ *obj = objnum;
+ return (0);
+}
+#endif
+/*
+ * Given a MOS metadnode, get the metadnode of a given filesystem name (fsname),
+ * e.g. pool/rootfs, or a given object number (obj), e.g. the object number
+ * of pool/rootfs.
+ *
+ * If no fsname and no obj are given, return the DSL_DIR metadnode.
+ * If fsname is given, return its metadnode and its matching object number.
+ * If only obj is given, return the metadnode for this object number.
+ *
+ */
+static grub_err_t
+get_filesystem_dnode (dnode_end_t * mosmdn, char *fsname,
+ dnode_end_t * mdn, struct grub_zfs_data *data)
+{
+ grub_uint64_t objnum;
+ grub_err_t err;
+
+ grub_dprintf ("zfs", "endian = %d\n", mosmdn->endian);
+
+ err = dnode_get (mosmdn, DMU_POOL_DIRECTORY_OBJECT,
+ DMU_OT_OBJECT_DIRECTORY, mdn, data);
+ if (err)
+ return err;
+
+ grub_dprintf ("zfs", "alive\n");
+
+ err = zap_lookup (mdn, DMU_POOL_ROOT_DATASET, &objnum, data);
+ if (err)
+ return err;
+
+ grub_dprintf ("zfs", "alive\n");
+
+ err = dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data);
+ if (err)
+ return err;
+
+ grub_dprintf ("zfs", "alive\n");
+
+ while (*fsname)
+ {
+ grub_uint64_t childobj;
+ char *cname, ch;
+
+ while (*fsname == '/')
+ fsname++;
+
+ if (! *fsname || *fsname == '@')
+ break;
+
+ cname = fsname;
+ while (*fsname && !grub_isspace (*fsname) && *fsname != '/')
+ fsname++;
+ ch = *fsname;
+ *fsname = 0;
+
+ childobj = grub_zfs_to_cpu64 ((((dsl_dir_phys_t *) DN_BONUS (&mdn->dn)))->dd_child_dir_zapobj, mdn->endian);
+ err = dnode_get (mosmdn, childobj,
+ DMU_OT_DSL_DIR_CHILD_MAP, mdn, data);
+ if (err)
+ return err;
+
+ err = zap_lookup (mdn, cname, &objnum, data);
+ if (err)
+ return err;
+
+ err = dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data);
+ if (err)
+ return err;
+
+ *fsname = ch;
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+make_mdn (dnode_end_t * mdn, struct grub_zfs_data *data)
+{
+ void *osp;
+ blkptr_t *bp;
+ grub_size_t ospsize;
+ grub_err_t err;
+
+ grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+ bp = &(((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_bp);
+ err = zio_read (bp, mdn->endian, &osp, &ospsize, data);
+ if (err)
+ return err;
+ if (ospsize < OBJSET_PHYS_SIZE_V14)
+ {
+ grub_free (osp);
+ return grub_error (GRUB_ERR_BAD_FS, "too small osp");
+ }
+
+ mdn->endian = (grub_zfs_to_cpu64 (bp->blk_prop, mdn->endian)>>63) & 1;
+ grub_memmove ((char *) &(mdn->dn),
+ (char *) &((objset_phys_t *) osp)->os_meta_dnode, DNODE_SIZE);
+ grub_free (osp);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+dnode_get_fullpath (const char *fullpath, dnode_end_t * mdn,
+ grub_uint64_t *mdnobj, dnode_end_t * dn, int *isfs,
+ struct grub_zfs_data *data)
+{
+ char *fsname, *snapname;
+ const char *ptr_at, *filename;
+ grub_uint64_t headobj;
+ grub_err_t err;
+
+ ptr_at = grub_strchr (fullpath, '@');
+ if (! ptr_at)
+ {
+ *isfs = 1;
+ filename = 0;
+ snapname = 0;
+ fsname = grub_strdup (fullpath);
+ }
+ else
+ {
+ const char *ptr_slash = grub_strchr (ptr_at, '/');
+
+ *isfs = 0;
+ fsname = grub_malloc (ptr_at - fullpath + 1);
+ if (!fsname)
+ return grub_errno;
+ grub_memcpy (fsname, fullpath, ptr_at - fullpath);
+ fsname[ptr_at - fullpath] = 0;
+ if (ptr_at[1] && ptr_at[1] != '/')
+ {
+ snapname = grub_malloc (ptr_slash - ptr_at);
+ if (!snapname)
+ {
+ grub_free (fsname);
+ return grub_errno;
+ }
+ grub_memcpy (snapname, ptr_at + 1, ptr_slash - ptr_at - 1);
+ snapname[ptr_slash - ptr_at - 1] = 0;
+ }
+ else
+ snapname = 0;
+ if (ptr_slash)
+ filename = ptr_slash;
+ else
+ filename = "/";
+ grub_dprintf ("zfs", "fsname = '%s' snapname='%s' filename = '%s'\n",
+ fsname, snapname, filename);
+ }
+ grub_dprintf ("zfs", "alive\n");
+ err = get_filesystem_dnode (&(data->mos), fsname, dn, data);
+ if (err)
+ {
+ grub_free (fsname);
+ grub_free (snapname);
+ return err;
+ }
+
+ grub_dprintf ("zfs", "alive\n");
+
+ headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&dn->dn))->dd_head_dataset_obj, dn->endian);
+
+ grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+ err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, mdn, data);
+ if (err)
+ {
+ grub_free (fsname);
+ grub_free (snapname);
+ return err;
+ }
+ grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+ if (snapname)
+ {
+ grub_uint64_t snapobj;
+
+ snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_snapnames_zapobj, mdn->endian);
+
+ err = dnode_get (&(data->mos), snapobj,
+ DMU_OT_DSL_DS_SNAP_MAP, mdn, data);
+ if (!err)
+ err = zap_lookup (mdn, snapname, &headobj, data);
+ if (!err)
+ err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, mdn, data);
+ if (err)
+ {
+ grub_free (fsname);
+ grub_free (snapname);
+ return err;
+ }
+ }
+
+ if (mdnobj)
+ *mdnobj = headobj;
+
+ make_mdn (mdn, data);
+
+ grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+ if (*isfs)
+ {
+ grub_free (fsname);
+ grub_free (snapname);
+ return GRUB_ERR_NONE;
+ }
+ err = dnode_get_path (mdn, filename, dn, data);
+ grub_free (fsname);
+ grub_free (snapname);
+ return err;
+}
+
+/*
+ * For a given XDR packed nvlist, verify the first 4 bytes and move on.
+ *
+ * An XDR packed nvlist is encoded as (comments from nvs_xdr_create) :
+ *
+ * encoding method/host endian (4 bytes)
+ * nvl_version (4 bytes)
+ * nvl_nvflag (4 bytes)
+ * encoded nvpairs:
+ * encoded size of the nvpair (4 bytes)
+ * decoded size of the nvpair (4 bytes)
+ * name string size (4 bytes)
+ * name string data (sizeof(NV_ALIGN4(string))
+ * data type (4 bytes)
+ * # of elements in the nvpair (4 bytes)
+ * data
+ * 2 zero's for the last nvpair
+ * (end of the entire list) (8 bytes)
+ *
+ */
+
+static int
+nvlist_find_value (char *nvlist, char *name, int valtype, char **val,
+ grub_size_t *size_out, grub_size_t *nelm_out)
+{
+ int name_len, type, encode_size;
+ char *nvpair, *nvp_name;
+
+ /* Verify if the 1st and 2nd byte in the nvlist are valid. */
+ /* NOTE: independently of what endianness header announces all
+ subsequent values are big-endian. */
+ if (nvlist[0] != NV_ENCODE_XDR || (nvlist[1] != NV_LITTLE_ENDIAN
+ && nvlist[1] != NV_BIG_ENDIAN))
+ {
+ grub_dprintf ("zfs", "incorrect nvlist header\n");
+ grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist");
+ return 0;
+ }
+
+ /* skip the header, nvl_version, and nvl_nvflag */
+ nvlist = nvlist + 4 * 3;
+ /*
+ * Loop thru the nvpair list
+ * The XDR representation of an integer is in big-endian byte order.
+ */
+ while ((encode_size = grub_be_to_cpu32 (*(grub_uint32_t *) nvlist)))
+ {
+ int nelm;
+
+ nvpair = nvlist + 4 * 2; /* skip the encode/decode size */
+
+ name_len = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+ nvpair += 4;
+
+ nvp_name = nvpair;
+ nvpair = nvpair + ((name_len + 3) & ~3); /* align */
+
+ type = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+ nvpair += 4;
+
+ nelm = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+ if (nelm < 1)
+ return grub_error (GRUB_ERR_BAD_FS, "empty nvpair");
+
+ nvpair += 4;
+
+ if ((grub_strncmp (nvp_name, name, name_len) == 0) && type == valtype)
+ {
+ *val = nvpair;
+ *size_out = encode_size;
+ if (nelm_out)
+ *nelm_out = nelm;
+ return 1;
+ }
+
+ nvlist += encode_size; /* goto the next nvpair */
+ }
+ return 0;
+}
+
+int
+grub_zfs_nvlist_lookup_uint64 (char *nvlist, char *name, grub_uint64_t * out)
+{
+ char *nvpair;
+ grub_size_t size;
+ int found;
+
+ found = nvlist_find_value (nvlist, name, DATA_TYPE_UINT64, &nvpair, &size, 0);
+ if (!found)
+ return 0;
+ if (size < sizeof (grub_uint64_t))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid uint64");
+ return 0;
+ }
+
+ *out = grub_be_to_cpu64 (*(grub_uint64_t *) nvpair);
+ return 1;
+}
+
+char *
+grub_zfs_nvlist_lookup_string (char *nvlist, char *name)
+{
+ char *nvpair;
+ char *ret;
+ grub_size_t slen;
+ grub_size_t size;
+ int found;
+
+ found = nvlist_find_value (nvlist, name, DATA_TYPE_STRING, &nvpair, &size, 0);
+ if (!found)
+ return 0;
+ if (size < 4)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "invalid string");
+ return 0;
+ }
+ slen = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+ if (slen > size - 4)
+ slen = size - 4;
+ ret = grub_malloc (slen + 1);
+ if (!ret)
+ return 0;
+ grub_memcpy (ret, nvpair + 4, slen);
+ ret[slen] = 0;
+ return ret;
+}
+
+char *
+grub_zfs_nvlist_lookup_nvlist (char *nvlist, char *name)
+{
+ char *nvpair;
+ char *ret;
+ grub_size_t size;
+ int found;
+
+ found = nvlist_find_value (nvlist, name, DATA_TYPE_NVLIST, &nvpair,
+ &size, 0);
+ if (!found)
+ return 0;
+ ret = grub_zalloc (size + 3 * sizeof (grub_uint32_t));
+ if (!ret)
+ return 0;
+ grub_memcpy (ret, nvlist, sizeof (grub_uint32_t));
+
+ grub_memcpy (ret + sizeof (grub_uint32_t), nvpair, size);
+ return ret;
+}
+
+int
+grub_zfs_nvlist_lookup_nvlist_array_get_nelm (char *nvlist, char *name)
+{
+ char *nvpair;
+ grub_size_t nelm, size;
+ int found;
+
+ found = nvlist_find_value (nvlist, name, DATA_TYPE_NVLIST, &nvpair,
+ &size, &nelm);
+ if (! found)
+ return -1;
+ return nelm;
+}
+
+char *
+grub_zfs_nvlist_lookup_nvlist_array (char *nvlist, char *name,
+ grub_size_t index)
+{
+ char *nvpair, *nvpairptr;
+ int found;
+ char *ret;
+ grub_size_t size;
+ unsigned i;
+ grub_size_t nelm;
+
+ found = nvlist_find_value (nvlist, name, DATA_TYPE_NVLIST, &nvpair,
+ &size, &nelm);
+ if (!found)
+ return 0;
+ if (index >= nelm)
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, "trying to lookup past nvlist array");
+ return 0;
+ }
+
+ nvpairptr = nvpair;
+
+ for (i = 0; i < index; i++)
+ {
+ grub_uint32_t encode_size;
+
+ /* skip the header, nvl_version, and nvl_nvflag */
+ nvpairptr = nvpairptr + 4 * 2;
+
+ while (nvpairptr < nvpair + size
+ && (encode_size = grub_be_to_cpu32 (*(grub_uint32_t *) nvpairptr)))
+ nvlist += encode_size; /* goto the next nvpair */
+
+ nvlist = nvlist + 4 * 2; /* skip the ending 2 zeros - 8 bytes */
+ }
+
+ if (nvpairptr >= nvpair + size
+ || nvpairptr + grub_be_to_cpu32 (*(grub_uint32_t *) (nvpairptr + 4 * 2))
+ >= nvpair + size)
+ {
+ grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist array");
+ return 0;
+ }
+
+ ret = grub_zalloc (grub_be_to_cpu32 (*(grub_uint32_t *) (nvpairptr + 4 * 2))
+ + 3 * sizeof (grub_uint32_t));
+ if (!ret)
+ return 0;
+ grub_memcpy (ret, nvlist, sizeof (grub_uint32_t));
+
+ grub_memcpy (ret + sizeof (grub_uint32_t), nvpairptr, size);
+ return ret;
+}
+
+static grub_err_t
+zfs_fetch_nvlist (struct grub_zfs_data * data, char **nvlist)
+{
+ grub_err_t err;
+
+ *nvlist = grub_malloc (VDEV_PHYS_SIZE);
+ /* Read in the vdev name-value pair list (112K). */
+ err = grub_disk_read (data->disk, data->vdev_phys_sector, 0,
+ VDEV_PHYS_SIZE, *nvlist);
+ if (err)
+ {
+ grub_free (*nvlist);
+ *nvlist = 0;
+ return err;
+ }
+ return GRUB_ERR_NONE;
+}
+
+/*
+ * Check the disk label information and retrieve needed vdev name-value pairs.
+ *
+ */
+static grub_err_t
+check_pool_label (struct grub_zfs_data *data)
+{
+ grub_uint64_t pool_state, txg = 0;
+ char *nvlist;
+#if 0
+ char *nv;
+#endif
+ grub_uint64_t diskguid;
+ grub_uint64_t version;
+ int found;
+ grub_err_t err;
+
+ err = zfs_fetch_nvlist (data, &nvlist);
+ if (err)
+ return err;
+
+ grub_dprintf ("zfs", "check 2 passed\n");
+
+ found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_STATE,
+ &pool_state);
+ if (! found)
+ {
+ grub_free (nvlist);
+ if (! grub_errno)
+ grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_POOL_STATE " not found");
+ return grub_errno;
+ }
+ grub_dprintf ("zfs", "check 3 passed\n");
+
+ if (pool_state == POOL_STATE_DESTROYED)
+ {
+ grub_free (nvlist);
+ return grub_error (GRUB_ERR_BAD_FS, "zpool is marked as destroyed");
+ }
+ grub_dprintf ("zfs", "check 4 passed\n");
+
+ found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_TXG, &txg);
+ if (!found)
+ {
+ grub_free (nvlist);
+ if (! grub_errno)
+ grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_POOL_TXG " not found");
+ return grub_errno;
+ }
+ grub_dprintf ("zfs", "check 6 passed\n");
+
+ /* not an active device */
+ if (txg == 0)
+ {
+ grub_free (nvlist);
+ return grub_error (GRUB_ERR_BAD_FS, "zpool isn't active");
+ }
+ grub_dprintf ("zfs", "check 7 passed\n");
+
+ found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_VERSION,
+ &version);
+ if (! found)
+ {
+ grub_free (nvlist);
+ if (! grub_errno)
+ grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_VERSION " not found");
+ return grub_errno;
+ }
+ grub_dprintf ("zfs", "check 8 passed\n");
+
+ if (version > SPA_VERSION)
+ {
+ grub_free (nvlist);
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "too new version %llu > %llu",
+ (unsigned long long) version,
+ (unsigned long long) SPA_VERSION);
+ }
+ grub_dprintf ("zfs", "check 9 passed\n");
+#if 0
+ if (nvlist_lookup_value (nvlist, ZPOOL_CONFIG_VDEV_TREE, &nv,
+ DATA_TYPE_NVLIST, NULL))
+ {
+ grub_free (vdev);
+ return (GRUB_ERR_BAD_FS);
+ }
+ grub_dprintf ("zfs", "check 10 passed\n");
+#endif
+
+ found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_GUID, &diskguid);
+ if (! found)
+ {
+ grub_free (nvlist);
+ if (! grub_errno)
+ grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_GUID " not found");
+ return grub_errno;
+ }
+ grub_dprintf ("zfs", "check 11 passed\n");
+
+ grub_free (nvlist);
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+zfs_unmount (struct grub_zfs_data *data)
+{
+ grub_free (data->dnode_buf);
+ grub_free (data->dnode_mdn);
+ grub_free (data->file_buf);
+ grub_free (data);
+}
+
+/*
+ * zfs_mount() locates a valid uberblock of the root pool and read in its MOS
+ * to the memory address MOS.
+ *
+ */
+static struct grub_zfs_data *
+zfs_mount (grub_device_t dev)
+{
+ struct grub_zfs_data *data = 0;
+ int label = 0;
+ uberblock_phys_t *ub_array, *ubbest = NULL;
+ vdev_boot_header_t *bh;
+ void *osp = 0;
+ grub_size_t ospsize;
+ grub_err_t err;
+ int vdevnum;
+
+ if (! dev->disk)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "not a disk");
+ return 0;
+ }
+
+ data = grub_malloc (sizeof (*data));
+ if (!data)
+ return 0;
+ grub_memset (data, 0, sizeof (*data));
+#if 0
+ /* if it's our first time here, zero the best uberblock out */
+ if (data->best_drive == 0 && data->best_part == 0 && find_best_root)
+ grub_memset (&current_uberblock, 0, sizeof (uberblock_t));
+#endif
+
+ data->disk = dev->disk;
+
+ ub_array = grub_malloc (VDEV_UBERBLOCK_RING);
+ if (!ub_array)
+ {
+ zfs_unmount (data);
+ return 0;
+ }
+
+ bh = grub_malloc (VDEV_BOOT_HEADER_SIZE);
+ if (!bh)
+ {
+ zfs_unmount (data);
+ grub_free (ub_array);
+ return 0;
+ }
+
+ vdevnum = VDEV_LABELS;
+
+ /* Don't check back labels on CDROM. */
+ if (grub_disk_get_size (dev->disk) == GRUB_DISK_SIZE_UNKNOWN)
+ vdevnum = VDEV_LABELS / 2;
+
+ for (label = 0; ubbest == NULL && label < vdevnum; label++)
+ {
+ grub_zfs_endian_t ub_endian = UNKNOWN_ENDIAN;
+ grub_dprintf ("zfs", "label %d\n", label);
+
+ data->vdev_phys_sector
+ = label * (sizeof (vdev_label_t) >> SPA_MINBLOCKSHIFT)
+ + ((VDEV_SKIP_SIZE + VDEV_BOOT_HEADER_SIZE) >> SPA_MINBLOCKSHIFT)
+ + (label < VDEV_LABELS / 2 ? 0 : grub_disk_get_size (dev->disk)
+ - VDEV_LABELS * (sizeof (vdev_label_t) >> SPA_MINBLOCKSHIFT));
+
+ /* Read in the uberblock ring (128K). */
+ err = grub_disk_read (data->disk, data->vdev_phys_sector
+ + (VDEV_PHYS_SIZE >> SPA_MINBLOCKSHIFT),
+ 0, VDEV_UBERBLOCK_RING, (char *) ub_array);
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+ grub_dprintf ("zfs", "label ok %d\n", label);
+
+ ubbest = find_bestub (ub_array, data->vdev_phys_sector);
+ if (!ubbest)
+ {
+ grub_dprintf ("zfs", "No uberblock found\n");
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+ ub_endian = (grub_zfs_to_cpu64 (ubbest->ubp_uberblock.ub_magic,
+ LITTLE_ENDIAN) == UBERBLOCK_MAGIC
+ ? LITTLE_ENDIAN : BIG_ENDIAN);
+ err = zio_read (&ubbest->ubp_uberblock.ub_rootbp,
+ ub_endian,
+ &osp, &ospsize, data);
+ if (err)
+ {
+ grub_dprintf ("zfs", "couldn't zio_read\n");
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ if (ospsize < OBJSET_PHYS_SIZE_V14)
+ {
+ grub_dprintf ("zfs", "osp too small\n");
+ grub_free (osp);
+ continue;
+ }
+ grub_dprintf ("zfs", "ubbest %p\n", ubbest);
+
+ err = check_pool_label (data);
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+#if 0
+ if (find_best_root &&
+ vdev_uberblock_compare (&ubbest->ubp_uberblock,
+ &(current_uberblock)) <= 0)
+ continue;
+#endif
+ /* Got the MOS. Save it at the memory addr MOS. */
+ grub_memmove (&(data->mos.dn), &((objset_phys_t *) osp)->os_meta_dnode,
+ DNODE_SIZE);
+ data->mos.endian = (grub_zfs_to_cpu64 (ubbest->ubp_uberblock.ub_rootbp.blk_prop, ub_endian) >> 63) & 1;
+ grub_memmove (&(data->current_uberblock),
+ &ubbest->ubp_uberblock, sizeof (uberblock_t));
+ grub_free (ub_array);
+ grub_free (bh);
+ grub_free (osp);
+ return data;
+ }
+ grub_error (GRUB_ERR_BAD_FS, "couldn't find a valid label");
+ zfs_unmount (data);
+ grub_free (ub_array);
+ grub_free (bh);
+ grub_free (osp);
+
+ return 0;
+}
+
+grub_err_t
+grub_zfs_fetch_nvlist (grub_device_t dev, char **nvlist)
+{
+ struct grub_zfs_data *zfs;
+ grub_err_t err;
+
+ zfs = zfs_mount (dev);
+ if (!zfs)
+ return grub_errno;
+ err = zfs_fetch_nvlist (zfs, nvlist);
+ zfs_unmount (zfs);
+ return err;
+}
+
+static grub_err_t
+zfs_label (grub_device_t device, char **label)
+{
+ char *nvlist;
+ grub_err_t err;
+ struct grub_zfs_data *data;
+
+ data = zfs_mount (device);
+ if (! data)
+ return grub_errno;
+
+ err = zfs_fetch_nvlist (data, &nvlist);
+ if (err)
+ {
+ zfs_unmount (data);
+ return err;
+ }
+
+ *label = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_POOL_NAME);
+ grub_free (nvlist);
+ zfs_unmount (data);
+ return grub_errno;
+}
+
+static grub_err_t
+zfs_uuid (grub_device_t device, char **uuid)
+{
+ char *nvlist;
+ int found;
+ struct grub_zfs_data *data;
+ grub_uint64_t guid;
+ grub_err_t err;
+
+ *uuid = 0;
+
+ data = zfs_mount (device);
+ if (! data)
+ return grub_errno;
+
+ err = zfs_fetch_nvlist (data, &nvlist);
+ if (err)
+ {
+ zfs_unmount (data);
+ return err;
+ }
+
+ found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_GUID, &guid);
+ if (! found)
+ return grub_errno;
+ grub_free (nvlist);
+ *uuid = grub_xasprintf ("%016llx", (long long unsigned) guid);
+ zfs_unmount (data);
+ if (! *uuid)
+ return grub_errno;
+ return GRUB_ERR_NONE;
+}
+
+/*
+ * zfs_open() locates a file in the rootpool by following the
+ * MOS and places the dnode of the file in the memory address DNODE.
+ */
+static grub_err_t
+grub_zfs_open (struct grub_file *file, const char *fsfilename)
+{
+ struct grub_zfs_data *data;
+ grub_err_t err;
+ int isfs;
+
+ data = zfs_mount (file->device);
+ if (! data)
+ return grub_errno;
+
+ err = dnode_get_fullpath (fsfilename, &(data->mdn), 0,
+ &(data->dnode), &isfs, data);
+ if (err)
+ {
+ zfs_unmount (data);
+ return err;
+ }
+
+ if (isfs)
+ {
+ zfs_unmount (data);
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "Missing @ or / separator");
+ }
+
+ /* We found the dnode for this file. Verify if it is a plain file. */
+ if (data->dnode.dn.dn_type != DMU_OT_PLAIN_FILE_CONTENTS)
+ {
+ zfs_unmount (data);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a file");
+ }
+
+ /* get the file size and set the file position to 0 */
+
+ /*
+ * For DMU_OT_SA we will need to locate the SIZE attribute
+ * attribute, which could be either in the bonus buffer
+ * or the "spill" block.
+ */
+ if (data->dnode.dn.dn_bonustype == DMU_OT_SA)
+ {
+ void *sahdrp;
+ int hdrsize;
+
+ if (data->dnode.dn.dn_bonuslen != 0)
+ {
+ sahdrp = (sa_hdr_phys_t *) DN_BONUS (&data->dnode.dn);
+ }
+ else if (data->dnode.dn.dn_flags & DNODE_FLAG_SPILL_BLKPTR)
+ {
+ blkptr_t *bp = &data->dnode.dn.dn_spill;
+
+ err = zio_read (bp, data->dnode.endian, &sahdrp, NULL, data);
+ if (err)
+ return err;
+ }
+ else
+ {
+ return grub_error (GRUB_ERR_BAD_FS, "filesystem is corrupt");
+ }
+
+ hdrsize = SA_HDR_SIZE (((sa_hdr_phys_t *) sahdrp));
+ file->size = *(grub_uint64_t *) ((char *) sahdrp + hdrsize + SA_SIZE_OFFSET);
+ }
+ else
+ {
+ file->size = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&data->dnode.dn))->zp_size, data->dnode.endian);
+ }
+
+ file->data = data;
+ file->offset = 0;
+
+#ifndef GRUB_UTIL
+ grub_dl_ref (my_mod);
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_ssize_t
+grub_zfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_zfs_data *data = (struct grub_zfs_data *) file->data;
+ int blksz, movesize;
+ grub_size_t length;
+ grub_size_t read;
+ grub_err_t err;
+
+ if (data->file_buf == NULL)
+ {
+ data->file_buf = grub_malloc (SPA_MAXBLOCKSIZE);
+ if (!data->file_buf)
+ return -1;
+ data->file_start = data->file_end = 0;
+ }
+
+ /*
+ * If offset is in memory, move it into the buffer provided and return.
+ */
+ if (file->offset >= data->file_start
+ && file->offset + len <= data->file_end)
+ {
+ grub_memmove (buf, data->file_buf + file->offset - data->file_start,
+ len);
+ return len;
+ }
+
+ blksz = grub_zfs_to_cpu16 (data->dnode.dn.dn_datablkszsec,
+ data->dnode.endian) << SPA_MINBLOCKSHIFT;
+
+ /*
+ * Entire Dnode is too big to fit into the space available. We
+ * will need to read it in chunks. This could be optimized to
+ * read in as large a chunk as there is space available, but for
+ * now, this only reads in one data block at a time.
+ */
+ length = len;
+ read = 0;
+ while (length)
+ {
+ void *t;
+ /*
+ * Find requested blkid and the offset within that block.
+ */
+ grub_uint64_t blkid = grub_divmod64 (file->offset + read, blksz, 0);
+ grub_free (data->file_buf);
+ data->file_buf = 0;
+
+ err = dmu_read (&(data->dnode), blkid, &t,
+ 0, data);
+ data->file_buf = t;
+ if (err)
+ return -1;
+
+ data->file_start = blkid * blksz;
+ data->file_end = data->file_start + blksz;
+
+ movesize = MIN (length, data->file_end - (int) file->offset - read);
+
+ grub_memmove (buf, data->file_buf + file->offset + read
+ - data->file_start, movesize);
+ buf += movesize;
+ length -= movesize;
+ read += movesize;
+ }
+
+ return len;
+}
+
+static grub_err_t
+grub_zfs_close (grub_file_t file)
+{
+ zfs_unmount ((struct grub_zfs_data *) file->data);
+
+#ifndef GRUB_UTIL
+ grub_dl_unref (my_mod);
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_zfs_getmdnobj (grub_device_t dev, const char *fsfilename,
+ grub_uint64_t *mdnobj)
+{
+ struct grub_zfs_data *data;
+ grub_err_t err;
+ int isfs;
+
+ data = zfs_mount (dev);
+ if (! data)
+ return grub_errno;
+
+ err = dnode_get_fullpath (fsfilename, &(data->mdn), mdnobj,
+ &(data->dnode), &isfs, data);
+ zfs_unmount (data);
+ return err;
+}
+
+static void
+fill_fs_info (struct grub_dirhook_info *info,
+ dnode_end_t mdn, struct grub_zfs_data *data)
+{
+ grub_err_t err;
+ dnode_end_t dn;
+ grub_uint64_t objnum;
+ grub_uint64_t headobj;
+
+ grub_memset (info, 0, sizeof (*info));
+
+ info->dir = 1;
+
+ if (mdn.dn.dn_type == DMU_OT_DSL_DIR)
+ {
+ headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&mdn.dn))->dd_head_dataset_obj, mdn.endian);
+
+ err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &mdn, data);
+ if (err)
+ {
+ grub_dprintf ("zfs", "failed here\n");
+ return;
+ }
+ }
+ make_mdn (&mdn, data);
+ err = dnode_get (&mdn, MASTER_NODE_OBJ, DMU_OT_MASTER_NODE,
+ &dn, data);
+ if (err)
+ {
+ grub_dprintf ("zfs", "failed here\n");
+ return;
+ }
+
+ err = zap_lookup (&dn, ZFS_ROOT_OBJ, &objnum, data);
+ if (err)
+ {
+ grub_dprintf ("zfs", "failed here\n");
+ return;
+ }
+
+ err = dnode_get (&mdn, objnum, 0, &dn, data);
+ if (err)
+ {
+ grub_dprintf ("zfs", "failed here\n");
+ return;
+ }
+
+ info->mtimeset = 1;
+ info->mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
+ return;
+}
+
+static grub_err_t
+grub_zfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *, const struct grub_dirhook_info *))
+{
+ struct grub_zfs_data *data;
+ grub_err_t err;
+ int isfs;
+ auto int NESTED_FUNC_ATTR iterate_zap (const char *name, grub_uint64_t val);
+ auto int NESTED_FUNC_ATTR iterate_zap_fs (const char *name,
+ grub_uint64_t val);
+ auto int NESTED_FUNC_ATTR iterate_zap_snap (const char *name,
+ grub_uint64_t val);
+
+ int NESTED_FUNC_ATTR iterate_zap (const char *name, grub_uint64_t val)
+ {
+ struct grub_dirhook_info info;
+ dnode_end_t dn;
+ grub_memset (&info, 0, sizeof (info));
+
+ dnode_get (&(data->mdn), val, 0, &dn, data);
+ info.mtimeset = 1;
+ info.mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
+ info.dir = (dn.dn.dn_type == DMU_OT_DIRECTORY_CONTENTS);
+ grub_dprintf ("zfs", "type=%d, name=%s\n",
+ (int)dn.dn.dn_type, (char *)name);
+ return hook (name, &info);
+ }
+
+ int NESTED_FUNC_ATTR iterate_zap_fs (const char *name, grub_uint64_t val)
+ {
+ struct grub_dirhook_info info;
+ dnode_end_t mdn;
+ err = dnode_get (&(data->mos), val, 0, &mdn, data);
+ if (err)
+ return 0;
+ if (mdn.dn.dn_type != DMU_OT_DSL_DIR)
+ return 0;
+
+ fill_fs_info (&info, mdn, data);
+ return hook (name, &info);
+ }
+ int NESTED_FUNC_ATTR iterate_zap_snap (const char *name, grub_uint64_t val)
+ {
+ struct grub_dirhook_info info;
+ char *name2;
+ int ret;
+ dnode_end_t mdn;
+
+ err = dnode_get (&(data->mos), val, 0, &mdn, data);
+ if (err)
+ return 0;
+
+ if (mdn.dn.dn_type != DMU_OT_DSL_DATASET)
+ return 0;
+
+ fill_fs_info (&info, mdn, data);
+
+ name2 = grub_malloc (grub_strlen (name) + 2);
+ name2[0] = '@';
+ grub_memcpy (name2 + 1, name, grub_strlen (name) + 1);
+ ret = hook (name2, &info);
+ grub_free (name2);
+ return ret;
+ }
+
+ data = zfs_mount (device);
+ if (! data)
+ return grub_errno;
+ err = dnode_get_fullpath (path, &(data->mdn), 0, &(data->dnode), &isfs, data);
+ if (err)
+ {
+ zfs_unmount (data);
+ return err;
+ }
+ if (isfs)
+ {
+ grub_uint64_t childobj, headobj;
+ grub_uint64_t snapobj;
+ dnode_end_t dn;
+ struct grub_dirhook_info info;
+
+ fill_fs_info (&info, data->dnode, data);
+ hook ("@", &info);
+
+ childobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_child_dir_zapobj, data->dnode.endian);
+ headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_head_dataset_obj, data->dnode.endian);
+ err = dnode_get (&(data->mos), childobj,
+ DMU_OT_DSL_DIR_CHILD_MAP, &dn, data);
+ if (err)
+ {
+ zfs_unmount (data);
+ return err;
+ }
+
+ zap_iterate (&dn, iterate_zap_fs, data);
+
+ err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &dn, data);
+ if (err)
+ {
+ zfs_unmount (data);
+ return err;
+ }
+
+ snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&dn.dn))->ds_snapnames_zapobj, dn.endian);
+
+ err = dnode_get (&(data->mos), snapobj,
+ DMU_OT_DSL_DS_SNAP_MAP, &dn, data);
+ if (err)
+ {
+ zfs_unmount (data);
+ return err;
+ }
+
+ zap_iterate (&dn, iterate_zap_snap, data);
+ }
+ else
+ {
+ if (data->dnode.dn.dn_type != DMU_OT_DIRECTORY_CONTENTS)
+ {
+ zfs_unmount (data);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+ }
+ zap_iterate (&(data->dnode), iterate_zap, data);
+ }
+ zfs_unmount (data);
+ return grub_errno;
+}
+
+static struct grub_fs grub_zfs_fs = {
+ .name = "zfs",
+ .dir = grub_zfs_dir,
+ .open = grub_zfs_open,
+ .read = grub_zfs_read,
+ .close = grub_zfs_close,
+ .label = zfs_label,
+ .uuid = zfs_uuid,
+ .mtime = 0,
+ .next = 0
+};
+
+GRUB_MOD_INIT (zfs)
+{
+ grub_fs_register (&grub_zfs_fs);
+#ifndef GRUB_UTIL
+ my_mod = mod;
+#endif
+}
+
+GRUB_MOD_FINI (zfs)
+{
+ grub_fs_unregister (&grub_zfs_fs);
+}
diff --git a/grub-core/fs/zfs/zfs_fletcher.c b/grub-core/fs/zfs/zfs_fletcher.c
new file mode 100644
index 0000000..7d27b05
--- /dev/null
+++ b/grub-core/fs/zfs/zfs_fletcher.c
@@ -0,0 +1,84 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2009 Free Software Foundation, Inc.
+ * Copyright 2007 Sun Microsystems, Inc.
+ *
+ * GRUB is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+void
+fletcher_2(const void *buf, grub_uint64_t size, grub_zfs_endian_t endian,
+ zio_cksum_t *zcp)
+{
+ const grub_uint64_t *ip = buf;
+ const grub_uint64_t *ipend = ip + (size / sizeof (grub_uint64_t));
+ grub_uint64_t a0, b0, a1, b1;
+
+ for (a0 = b0 = a1 = b1 = 0; ip < ipend; ip += 2)
+ {
+ a0 += grub_zfs_to_cpu64 (ip[0], endian);
+ a1 += grub_zfs_to_cpu64 (ip[1], endian);
+ b0 += a0;
+ b1 += a1;
+ }
+
+ zcp->zc_word[0] = grub_cpu_to_zfs64 (a0, endian);
+ zcp->zc_word[1] = grub_cpu_to_zfs64 (a1, endian);
+ zcp->zc_word[2] = grub_cpu_to_zfs64 (b0, endian);
+ zcp->zc_word[3] = grub_cpu_to_zfs64 (b1, endian);
+}
+
+void
+fletcher_4 (const void *buf, grub_uint64_t size, grub_zfs_endian_t endian,
+ zio_cksum_t *zcp)
+{
+ const grub_uint32_t *ip = buf;
+ const grub_uint32_t *ipend = ip + (size / sizeof (grub_uint32_t));
+ grub_uint64_t a, b, c, d;
+
+ for (a = b = c = d = 0; ip < ipend; ip++)
+ {
+ a += grub_zfs_to_cpu32 (ip[0], endian);;
+ b += a;
+ c += b;
+ d += c;
+ }
+
+ zcp->zc_word[0] = grub_cpu_to_zfs64 (a, endian);
+ zcp->zc_word[1] = grub_cpu_to_zfs64 (b, endian);
+ zcp->zc_word[2] = grub_cpu_to_zfs64 (c, endian);
+ zcp->zc_word[3] = grub_cpu_to_zfs64 (d, endian);
+}
+
diff --git a/grub-core/fs/zfs/zfs_lzjb.c b/grub-core/fs/zfs/zfs_lzjb.c
new file mode 100644
index 0000000..62b5ea6
--- /dev/null
+++ b/grub-core/fs/zfs/zfs_lzjb.c
@@ -0,0 +1,93 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2009 Free Software Foundation, Inc.
+ * Copyright 2007 Sun Microsystems, Inc.
+ *
+ * GRUB is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+#define MATCH_BITS 6
+#define MATCH_MIN 3
+#define OFFSET_MASK ((1 << (16 - MATCH_BITS)) - 1)
+
+/*
+ * Decompression Entry - lzjb
+ */
+#ifndef NBBY
+#define NBBY 8
+#endif
+
+grub_err_t
+lzjb_decompress (void *s_start, void *d_start, grub_size_t s_len,
+ grub_size_t d_len);
+
+grub_err_t
+lzjb_decompress (void *s_start, void *d_start, grub_size_t s_len,
+ grub_size_t d_len)
+{
+ grub_uint8_t *src = s_start;
+ grub_uint8_t *dst = d_start;
+ grub_uint8_t *d_end = (grub_uint8_t *) d_start + d_len;
+ grub_uint8_t *s_end = (grub_uint8_t *) s_start + s_len;
+ grub_uint8_t *cpy, copymap = 0;
+ int copymask = 1 << (NBBY - 1);
+
+ while (dst < d_end && src < s_end)
+ {
+ if ((copymask <<= 1) == (1 << NBBY))
+ {
+ copymask = 1;
+ copymap = *src++;
+ }
+ if (src >= s_end)
+ return grub_error (GRUB_ERR_BAD_FS, "lzjb decompression failed");
+ if (copymap & copymask)
+ {
+ int mlen = (src[0] >> (NBBY - MATCH_BITS)) + MATCH_MIN;
+ int offset = ((src[0] << NBBY) | src[1]) & OFFSET_MASK;
+ src += 2;
+ cpy = dst - offset;
+ if (src > s_end || cpy < (grub_uint8_t *) d_start)
+ return grub_error (GRUB_ERR_BAD_FS, "lzjb decompression failed");
+ while (--mlen >= 0 && dst < d_end)
+ *dst++ = *cpy++;
+ }
+ else
+ *dst++ = *src++;
+ }
+ if (dst < d_end)
+ return grub_error (GRUB_ERR_BAD_FS, "lzjb decompression failed");
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/fs/zfs/zfs_sha256.c b/grub-core/fs/zfs/zfs_sha256.c
new file mode 100644
index 0000000..ba510cf
--- /dev/null
+++ b/grub-core/fs/zfs/zfs_sha256.c
@@ -0,0 +1,143 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2009 Free Software Foundation, Inc.
+ * Copyright 2007 Sun Microsystems, Inc.
+ *
+ * GRUB is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+/*
+ * SHA-256 checksum, as specified in FIPS 180-2, available at:
+ * http://csrc.nist.gov/cryptval
+ *
+ * This is a very compact implementation of SHA-256.
+ * It is designed to be simple and portable, not to be fast.
+ */
+
+/*
+ * The literal definitions according to FIPS180-2 would be:
+ *
+ * Ch(x, y, z) (((x) & (y)) ^ ((~(x)) & (z)))
+ * Maj(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
+ *
+ * We use logical equivalents which require one less op.
+ */
+#define Ch(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
+#define Maj(x, y, z) (((x) & (y)) ^ ((z) & ((x) ^ (y))))
+#define Rot32(x, s) (((x) >> s) | ((x) << (32 - s)))
+#define SIGMA0(x) (Rot32(x, 2) ^ Rot32(x, 13) ^ Rot32(x, 22))
+#define SIGMA1(x) (Rot32(x, 6) ^ Rot32(x, 11) ^ Rot32(x, 25))
+#define sigma0(x) (Rot32(x, 7) ^ Rot32(x, 18) ^ ((x) >> 3))
+#define sigma1(x) (Rot32(x, 17) ^ Rot32(x, 19) ^ ((x) >> 10))
+
+static const grub_uint32_t SHA256_K[64] = {
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+ 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+ 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+ 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+ 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+ 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+ 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+ 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+ 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+ 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+};
+
+static void
+SHA256Transform(grub_uint32_t *H, const grub_uint8_t *cp)
+{
+ grub_uint32_t a, b, c, d, e, f, g, h, t, T1, T2, W[64];
+
+ for (t = 0; t < 16; t++, cp += 4)
+ W[t] = (cp[0] << 24) | (cp[1] << 16) | (cp[2] << 8) | cp[3];
+
+ for (t = 16; t < 64; t++)
+ W[t] = sigma1(W[t - 2]) + W[t - 7] +
+ sigma0(W[t - 15]) + W[t - 16];
+
+ a = H[0]; b = H[1]; c = H[2]; d = H[3];
+ e = H[4]; f = H[5]; g = H[6]; h = H[7];
+
+ for (t = 0; t < 64; t++) {
+ T1 = h + SIGMA1(e) + Ch(e, f, g) + SHA256_K[t] + W[t];
+ T2 = SIGMA0(a) + Maj(a, b, c);
+ h = g; g = f; f = e; e = d + T1;
+ d = c; c = b; b = a; a = T1 + T2;
+ }
+
+ H[0] += a; H[1] += b; H[2] += c; H[3] += d;
+ H[4] += e; H[5] += f; H[6] += g; H[7] += h;
+}
+
+void
+zio_checksum_SHA256(const void *buf, grub_uint64_t size,
+ grub_zfs_endian_t endian, zio_cksum_t *zcp)
+{
+ grub_uint32_t H[8] = { 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
+ 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 };
+ grub_uint8_t pad[128];
+ unsigned padsize = size & 63;
+ unsigned i;
+
+ for (i = 0; i < size - padsize; i += 64)
+ SHA256Transform(H, (grub_uint8_t *)buf + i);
+
+ for (i = 0; i < padsize; i++)
+ pad[i] = ((grub_uint8_t *)buf)[i];
+
+ for (pad[padsize++] = 0x80; (padsize & 63) != 56; padsize++)
+ pad[padsize] = 0;
+
+ for (i = 0; i < 8; i++)
+ pad[padsize++] = (size << 3) >> (56 - 8 * i);
+
+ for (i = 0; i < padsize; i += 64)
+ SHA256Transform(H, pad + i);
+
+ zcp->zc_word[0] = grub_cpu_to_zfs64 ((grub_uint64_t)H[0] << 32 | H[1],
+ endian);
+ zcp->zc_word[1] = grub_cpu_to_zfs64 ((grub_uint64_t)H[2] << 32 | H[3],
+ endian);
+ zcp->zc_word[2] = grub_cpu_to_zfs64 ((grub_uint64_t)H[4] << 32 | H[5],
+ endian);
+ zcp->zc_word[3] = grub_cpu_to_zfs64 ((grub_uint64_t)H[6] << 32 | H[7],
+ endian);
+}
diff --git a/grub-core/fs/zfs/zfsinfo.c b/grub-core/fs/zfs/zfsinfo.c
new file mode 100644
index 0000000..1968ed5
--- /dev/null
+++ b/grub-core/fs/zfs/zfsinfo.c
@@ -0,0 +1,409 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2009 Free Software Foundation, Inc.
+ * Copyright 2008 Sun Microsystems, Inc.
+ *
+ * GRUB is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/zfs/zfs.h>
+#include <grub/device.h>
+#include <grub/file.h>
+#include <grub/command.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static inline void
+print_tabs (int n)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ grub_printf (" ");
+}
+
+static grub_err_t
+print_state (char *nvlist, int tab)
+{
+ grub_uint64_t ival;
+ int isok = 1;
+
+ print_tabs (tab);
+ grub_printf ("State: ");
+
+ if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_REMOVED, &ival))
+ {
+ grub_printf ("removed ");
+ isok = 0;
+ }
+
+ if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_FAULTED, &ival))
+ {
+ grub_printf ("faulted ");
+ isok = 0;
+ }
+
+ if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_OFFLINE, &ival))
+ {
+ grub_printf ("offline ");
+ isok = 0;
+ }
+
+ if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_FAULTED, &ival))
+ grub_printf ("degraded ");
+
+ if (isok)
+ grub_printf ("online");
+ grub_printf ("\n");
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+print_vdev_info (char *nvlist, int tab)
+{
+ char *type = 0;
+
+ type = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_TYPE);
+
+ if (!type)
+ {
+ print_tabs (tab);
+ grub_printf ("Incorrect VDEV: no type available\n");
+ return grub_errno;
+ }
+
+ if (grub_strcmp (type, VDEV_TYPE_DISK) == 0)
+ {
+ char *bootpath = 0;
+ char *path = 0;
+ char *devid = 0;
+
+ print_tabs (tab);
+ grub_printf ("Leaf VDEV\n");
+
+ print_state (nvlist, tab);
+
+ bootpath =
+ grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_PHYS_PATH);
+ print_tabs (tab);
+ if (!bootpath)
+ grub_printf ("Bootpath: unavailable\n");
+ else
+ grub_printf ("Bootpath: %s\n", bootpath);
+
+ path = grub_zfs_nvlist_lookup_string (nvlist, "path");
+ print_tabs (tab);
+ if (!path)
+ grub_printf ("Path: unavailable\n");
+ else
+ grub_printf ("Path: %s\n", path);
+
+ devid = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_DEVID);
+ print_tabs (tab);
+ if (!devid)
+ grub_printf ("Devid: unavailable\n");
+ else
+ grub_printf ("Devid: %s\n", devid);
+ grub_free (bootpath);
+ grub_free (devid);
+ grub_free (path);
+ return GRUB_ERR_NONE;
+ }
+
+ if (grub_strcmp (type, VDEV_TYPE_MIRROR) == 0)
+ {
+ int nelm, i;
+
+ nelm = grub_zfs_nvlist_lookup_nvlist_array_get_nelm
+ (nvlist, ZPOOL_CONFIG_CHILDREN);
+
+ print_tabs (tab);
+ if (nelm <= 0)
+ {
+ grub_printf ("Incorrect mirror VDEV\n");
+ return GRUB_ERR_NONE;
+ }
+ grub_printf ("Mirror VDEV with %d children\n", nelm);
+ print_state (nvlist, tab);
+
+ for (i = 0; i < nelm; i++)
+ {
+ char *child;
+
+ child = grub_zfs_nvlist_lookup_nvlist_array
+ (nvlist, ZPOOL_CONFIG_CHILDREN, i);
+
+ print_tabs (tab);
+ if (!child)
+ {
+ grub_printf ("Mirror VDEV element %d isn't correct\n", i);
+ continue;
+ }
+
+ grub_printf ("Mirror VDEV element %d:\n", i);
+ print_vdev_info (child, tab + 1);
+
+ grub_free (child);
+ }
+ }
+
+ print_tabs (tab);
+ grub_printf ("Unknown VDEV type: %s\n", type);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+get_bootpath (char *nvlist, char **bootpath, char **devid)
+{
+ char *type = 0;
+
+ type = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_TYPE);
+
+ if (!type)
+ return grub_errno;
+
+ if (grub_strcmp (type, VDEV_TYPE_DISK) == 0)
+ {
+ *bootpath = grub_zfs_nvlist_lookup_string (nvlist,
+ ZPOOL_CONFIG_PHYS_PATH);
+ *devid = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_DEVID);
+ if (!*bootpath || !*devid)
+ {
+ grub_free (*bootpath);
+ grub_free (*devid);
+ *bootpath = 0;
+ *devid = 0;
+ }
+ return GRUB_ERR_NONE;
+ }
+
+ if (grub_strcmp (type, VDEV_TYPE_MIRROR) == 0)
+ {
+ int nelm, i;
+
+ nelm = grub_zfs_nvlist_lookup_nvlist_array_get_nelm
+ (nvlist, ZPOOL_CONFIG_CHILDREN);
+
+ for (i = 0; i < nelm; i++)
+ {
+ char *child;
+
+ child = grub_zfs_nvlist_lookup_nvlist_array (nvlist,
+ ZPOOL_CONFIG_CHILDREN,
+ i);
+
+ get_bootpath (child, bootpath, devid);
+
+ grub_free (child);
+
+ if (*bootpath && *devid)
+ return GRUB_ERR_NONE;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static char *poolstates[] = {
+ [POOL_STATE_ACTIVE] = "active",
+ [POOL_STATE_EXPORTED] = "exported",
+ [POOL_STATE_DESTROYED] = "destroyed",
+ [POOL_STATE_SPARE] = "reserved for hot spare",
+ [POOL_STATE_L2CACHE] = "level 2 ARC device",
+ [POOL_STATE_UNINITIALIZED] = "uninitialized",
+ [POOL_STATE_UNAVAIL] = "unavailable",
+ [POOL_STATE_POTENTIALLY_ACTIVE] = "potentially active"
+};
+
+static grub_err_t
+grub_cmd_zfsinfo (grub_command_t cmd __attribute__ ((unused)), int argc,
+ char **args)
+{
+ grub_device_t dev;
+ char *devname;
+ grub_err_t err;
+ char *nvlist = 0;
+ char *nv = 0;
+ char *poolname;
+ grub_uint64_t guid;
+ grub_uint64_t pool_state;
+ int found;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
+
+ if (args[0][0] == '(' && args[0][grub_strlen (args[0]) - 1] == ')')
+ {
+ devname = grub_strdup (args[0] + 1);
+ if (devname)
+ devname[grub_strlen (devname) - 1] = 0;
+ }
+ else
+ devname = grub_strdup (args[0]);
+ if (!devname)
+ return grub_errno;
+
+ dev = grub_device_open (devname);
+ grub_free (devname);
+ if (!dev)
+ return grub_errno;
+
+ err = grub_zfs_fetch_nvlist (dev, &nvlist);
+
+ grub_device_close (dev);
+
+ if (err)
+ return err;
+
+ poolname = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_POOL_NAME);
+ if (!poolname)
+ grub_printf ("Pool name: unavailable\n");
+ else
+ grub_printf ("Pool name: %s\n", poolname);
+
+ found =
+ grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_GUID, &guid);
+ if (!found)
+ grub_printf ("Pool GUID: unavailable\n");
+ else
+ grub_printf ("Pool GUID: %016llx\n", (long long unsigned) guid);
+
+ found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_STATE,
+ &pool_state);
+ if (!found)
+ grub_printf ("Unable to retrieve pool state\n");
+ else if (pool_state >= ARRAY_SIZE (poolstates))
+ grub_printf ("Unrecognized pool state\n");
+ else
+ grub_printf ("Pool state: %s\n", poolstates[pool_state]);
+
+ nv = grub_zfs_nvlist_lookup_nvlist (nvlist, ZPOOL_CONFIG_VDEV_TREE);
+
+ if (!nv)
+ grub_printf ("No vdev tree available\n");
+ else
+ print_vdev_info (nv, 1);
+
+ grub_free (nv);
+ grub_free (nvlist);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_zfs_bootfs (grub_command_t cmd __attribute__ ((unused)), int argc,
+ char **args)
+{
+ grub_device_t dev;
+ char *devname;
+ grub_err_t err;
+ char *nvlist = 0;
+ char *nv = 0;
+ char *bootpath = 0, *devid = 0;
+ char *fsname;
+ char *bootfs;
+ char *poolname;
+ grub_uint64_t mdnobj;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "filesystem name required");
+
+ devname = grub_file_get_device_name (args[0]);
+ if (grub_errno)
+ return grub_errno;
+
+ dev = grub_device_open (devname);
+ grub_free (devname);
+ if (!dev)
+ return grub_errno;
+
+ err = grub_zfs_fetch_nvlist (dev, &nvlist);
+
+ fsname = grub_strchr (args[0], ')');
+ if (fsname)
+ fsname++;
+ else
+ fsname = args[0];
+
+ if (!err)
+ err = grub_zfs_getmdnobj (dev, fsname, &mdnobj);
+
+ grub_device_close (dev);
+
+ if (err)
+ return err;
+
+ poolname = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_POOL_NAME);
+ if (!poolname)
+ {
+ if (!grub_errno)
+ grub_error (GRUB_ERR_BAD_FS, "No poolname found");
+ return grub_errno;
+ }
+
+ nv = grub_zfs_nvlist_lookup_nvlist (nvlist, ZPOOL_CONFIG_VDEV_TREE);
+
+ if (nv)
+ get_bootpath (nv, &bootpath, &devid);
+
+ grub_free (nv);
+ grub_free (nvlist);
+
+ bootfs = grub_xasprintf ("zfs-bootfs=%s/%llu%s%s%s%s%s%s",
+ poolname, (unsigned long long) mdnobj,
+ bootpath ? ",bootpath=\"" : "",
+ bootpath ? : "",
+ bootpath ? "\"" : "",
+ devid ? ",diskdevid=\"" : "",
+ devid ? : "",
+ devid ? "\"" : "");
+ if (!bootfs)
+ return grub_errno;
+ if (argc >= 2)
+ grub_env_set (args[1], bootfs);
+ else
+ grub_printf ("%s\n", bootfs);
+
+ grub_free (bootfs);
+ grub_free (poolname);
+ grub_free (bootpath);
+ grub_free (devid);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static grub_command_t cmd_info, cmd_bootfs;
+
+GRUB_MOD_INIT (zfsinfo)
+{
+ cmd_info = grub_register_command ("zfsinfo", grub_cmd_zfsinfo,
+ "zfsinfo DEVICE",
+ "Print ZFS info about DEVICE.");
+ cmd_bootfs = grub_register_command ("zfs-bootfs", grub_cmd_zfs_bootfs,
+ "zfs-bootfs FILESYSTEM [VARIABLE]",
+ "Print ZFS-BOOTFSOBJ or set it to VARIABLE");
+}
+
+GRUB_MOD_FINI (zfsinfo)
+{
+ grub_unregister_command (cmd_info);
+ grub_unregister_command (cmd_bootfs);
+}
diff --git a/grub-core/genemuinit.sh b/grub-core/genemuinit.sh
new file mode 100644
index 0000000..45c15ec
--- /dev/null
+++ b/grub-core/genemuinit.sh
@@ -0,0 +1,72 @@
+#! /bin/sh
+#
+# Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
+#
+# This gensymlist.sh is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+nm="$1"
+shift
+
+cat <<EOF
+/* This file is automatically generated by geninit.sh. DO NOT EDIT! */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "grub_emu_init.h"
+
+EOF
+
+cat <<EOF
+void
+grub_init_all (void)
+{
+EOF
+
+read mods
+for line in $mods; do
+ if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then
+ echo "grub_${line}_init ();" | sed 's,\.mod,,g;'
+ fi
+done
+
+cat <<EOF
+}
+EOF
+
+cat <<EOF
+void
+grub_fini_all (void)
+{
+EOF
+
+for line in $mods; do
+ if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then
+ echo "grub_${line}_fini ();" | sed 's,\.mod,,g;'
+ fi
+done
+
+cat <<EOF
+}
+EOF
diff --git a/grub-core/genemuinitheader.sh b/grub-core/genemuinitheader.sh
new file mode 100644
index 0000000..6b83f59
--- /dev/null
+++ b/grub-core/genemuinitheader.sh
@@ -0,0 +1,52 @@
+#! /bin/sh
+#
+# Copyright (C) 2005,2007 Free Software Foundation, Inc.
+#
+# This gensymlist.sh is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+nm="$1"
+shift
+
+cat <<EOF
+/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+EOF
+
+cat <<EOF
+void grub_init_all (void);
+void grub_fini_all (void);
+EOF
+
+read mods
+for line in $mods; do
+ if ${nm} --defined-only -P -p ${line} | grep grub_mod_init > /dev/null; then
+ echo "void grub_${line}_init (void);" | sed 's,\.mod,,g;'
+ fi
+ if ${nm} --defined-only -P -p ${line} | grep grub_mod_fini > /dev/null; then
+ echo "void grub_${line}_fini (void);" | sed 's,\.mod,,g;'
+ fi
+done
diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
new file mode 100644
index 0000000..023cd10
--- /dev/null
+++ b/grub-core/genmod.sh.in
@@ -0,0 +1,73 @@
+#! /bin/sh -e
+#
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This gensymlist.sh is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#
+# Example:
+#
+# genmod.sh moddep.lst normal.module normal.mod
+#
+
+moddep=$1
+infile=$2
+outfile=$3
+
+tmpfile=${outfile}.tmp
+modname=`echo $infile | sed -e 's@\.module.*$@@'`
+
+if ! grep ^$modname: $moddep >/dev/null; then
+ echo "warning: moddep.lst has no dependencies for $modname" >&2
+ exit 0
+fi
+
+deps=`grep ^$modname: $moddep | sed s@^.*:@@`
+
+# remove old files if any
+rm -f $tmpfile $outfile
+
+# stripout .modname and .moddeps sections from input module
+@OBJCOPY@ -R .modname -R .moddeps $infile $tmpfile
+
+# Attach .modname and .moddeps sections
+t1=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
+printf "$modname\0" >$t1
+
+t2=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
+for dep in $deps; do printf "$dep\0" >> $t2; done
+
+if test -n "$deps"; then
+ @OBJCOPY@ --add-section .modname=$t1 --add-section .moddeps=$t2 $tmpfile
+else
+ @OBJCOPY@ --add-section .modname=$t1 $tmpfile
+fi
+rm -f $t1 $t2
+
+if test x@TARGET_APPLE_CC@ != x1; then
+ if ! test -z "${TARGET_OBJ2ELF}"; then
+ ./${TARGET_OBJ2ELF} $tmpfile || exit 1
+ fi
+ if test x@platform@ != xemu; then
+ @STRIP@ --strip-unneeded \
+ -K grub_mod_init -K grub_mod_fini \
+ -K _grub_mod_init -K _grub_mod_fini \
+ -R .note -R .comment $tmpfile || exit 1
+ fi
+else
+# XXX Test these Apple CC fixes
+ cp $tmpfile $tmpfile.bin
+ @OBJCONV@ -f@TARGET_MODULE_FORMAT@ \
+ -nr:_grub_mod_init:grub_mod_init \
+ -nr:_grub_mod_fini:grub_mod_fini \
+ -wd1106 -ew2030 -ew2050 -nu -nd $tmpfile.bin $tmpfile || exit 1
+ rm -f $name.bin
+fi
+mv $tmpfile $outfile
diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk
new file mode 100644
index 0000000..e412d43
--- /dev/null
+++ b/grub-core/genmoddep.awk
@@ -0,0 +1,62 @@
+#! /usr/bin/awk -f
+#
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This genmoddep.awk is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Read symbols' info from stdin.
+BEGIN {
+ error = 0
+ lineno = 0;
+ while (getline <"/dev/stdin") {
+ lineno++;
+ if ($1 == "defined") {
+ symtab[$3] = $2;
+ modtab[$2] = "" modtab[$2]
+ } else if ($1 == "undefined") {
+ if ($3 in symtab)
+ modtab[$2] = modtab[$2] " " symtab[$3];
+ else if ($3 != "__gnu_local_gp") {
+ printf "%s in %s is not defined\n", $3, $2 >"/dev/stderr";
+ error++;
+ }
+ }
+ else {
+ printf "error: %u: unrecognized input format\n", lineno;
+ error++;
+ break;
+ }
+ }
+}
+
+# Output the result.
+END {
+ if (error >= 1)
+ exit 1;
+
+ for (mod in modtab) {
+ # Remove duplications.
+ split(modtab[mod], depmods, " ");
+ for (depmod in uniqmods) {
+ delete uniqmods[depmod];
+ }
+ for (i in depmods) {
+ depmod = depmods[i];
+ # Ignore kernel, as always loaded.
+ if (depmod != "kernel" && depmod != mod)
+ uniqmods[depmod] = 1;
+ }
+ modlist = ""
+ for (depmod in uniqmods) {
+ modlist = modlist " " depmod;
+ }
+ printf "%s:%s\n", mod, modlist;
+ }
+}
diff --git a/grub-core/gensyminfo.sh.in b/grub-core/gensyminfo.sh.in
new file mode 100644
index 0000000..4f51849
--- /dev/null
+++ b/grub-core/gensyminfo.sh.in
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+#
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This gensymlist.sh is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#
+# Example:
+#
+# gensyms.sh normal.module
+#
+
+module=$1
+modname=`echo $module | sed -e 's@\.module.*$@@'`
+
+# Print all symbols defined by module
+if test x@TARGET_APPLE_CC@ = x1; then
+ @NM@ -g -P -p $module | \
+ grep -E '^[a-zA-Z0-9_]* [TDS]' | \
+ sed "s@^\([^ ]*\).*@defined $modname \1@g"
+else
+ @NM@ -g --defined-only -P -p $module | \
+ sed "s@^\([^ ]*\).*@defined $modname \1@g"
+fi
+
+# Print all undefined symbols used by module
+@NM@ -u -P -p $module | sed "s@^\([^ ]*\).*@undefined $modname \1@g"
diff --git a/grub-core/gensymlist.sh b/grub-core/gensymlist.sh
new file mode 100644
index 0000000..0ab56e9
--- /dev/null
+++ b/grub-core/gensymlist.sh
@@ -0,0 +1,71 @@
+#! /bin/sh
+#
+# Copyright (C) 2002,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+#
+# This gensymlist.sh.in is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+cat <<EOF
+/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+EOF
+
+for i in $*; do
+ echo "#include <$i>"
+done
+
+cat <<EOF
+
+#define COMPILE_TIME_ASSERT(cond) switch (0) { case 1: case !(cond): ; }
+
+void
+grub_register_exported_symbols (void)
+{
+EOF
+
+cat <<EOF
+ struct symtab { const char *name; void *addr; };
+ struct symtab *p;
+ static struct symtab tab[] =
+ {
+EOF
+
+(while read LINE; do echo $LINE; done) \
+ | grep -v '^#' \
+ | sed -n \
+ -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/ {"\1", \1},/;p;}' \
+ -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/ {"\1", \&\1},/;p;}' \
+ | sort -u
+
+cat <<EOF
+ {0, 0}
+ };
+
+ COMPILE_TIME_ASSERT (sizeof (tab) > sizeof (tab[0]));
+ for (p = tab; p->name; p++)
+ grub_dl_register_symbol (p->name, p->addr, 0);
+}
+EOF
diff --git a/grub-core/gentrigtables.c b/grub-core/gentrigtables.c
new file mode 100644
index 0000000..8c03957
--- /dev/null
+++ b/grub-core/gentrigtables.c
@@ -0,0 +1,57 @@
+/* Generate trigonometric function tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define _GNU_SOURCE 1
+
+#include <grub/trig.h>
+#include <math.h>
+#include <stdio.h>
+
+int
+main (int argc __attribute__ ((unused)),
+ char **argv __attribute__ ((unused)))
+{
+ int i;
+
+ printf ("#include <grub/types.h>\n");
+ printf ("#include <grub/dl.h>\n");
+ printf ("\n");
+
+ printf ("/* Under copyright legislature such automated output isn't\n");
+ printf ("covered by any copyright. Hence it's public domain. Public\n");
+ printf ("domain works can be dual-licenced with any license. */\n");
+ printf ("GRUB_MOD_LICENSE (\"GPLv3+\");");
+ printf ("GRUB_MOD_DUAL_LICENSE (\"Public Domain\");");
+
+#define TAB(op) \
+ printf ("grub_int16_t grub_trig_" #op "tab[] =\n{"); \
+ for (i = 0; i < GRUB_TRIG_ANGLE_MAX; i++) \
+ { \
+ double x = i * 2 * M_PI / GRUB_TRIG_ANGLE_MAX; \
+ if (i % 10 == 0) \
+ printf ("\n "); \
+ printf ("%d,", (int) (round (op (x) * GRUB_TRIG_FRACTION_SCALE))); \
+ } \
+ printf ("\n};\n")
+
+ TAB(sin);
+ TAB(cos);
+
+ return 0;
+}
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
new file mode 100644
index 0000000..cca8b90
--- /dev/null
+++ b/grub-core/gettext/gettext.c
@@ -0,0 +1,400 @@
+/* gettext.c - gettext module */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/list.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/normal.h>
+#include <grub/file.h>
+#include <grub/kernel.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/*
+ .mo file information from:
+ http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
+*/
+
+
+static grub_file_t fd_mo;
+
+static int grub_gettext_offsetoriginal;
+static int grub_gettext_max;
+
+static const char *(*grub_gettext_original) (const char *s);
+
+struct grub_gettext_msg
+{
+ struct grub_gettext_msg *next;
+ const char *name;
+
+ const char *translated;
+};
+
+static struct grub_gettext_msg *grub_gettext_msg_list = NULL;
+
+#define GETTEXT_MAGIC_NUMBER 0
+#define GETTEXT_FILE_FORMAT 4
+#define GETTEXT_NUMBER_OF_STRINGS 8
+#define GETTEXT_OFFSET_ORIGINAL 12
+#define GETTEXT_OFFSET_TRANSLATION 16
+
+#define MO_MAGIC_NUMBER 0x950412de
+
+static grub_ssize_t
+grub_gettext_pread (grub_file_t file, void *buf, grub_size_t len,
+ grub_off_t offset)
+{
+ if (grub_file_seek (file, offset) == (grub_off_t) - 1)
+ {
+ return -1;
+ }
+ return grub_file_read (file, buf, len);
+}
+
+static grub_uint32_t
+grub_gettext_get_info (int offset)
+{
+ grub_uint32_t value;
+
+ grub_gettext_pread (fd_mo, (char *) &value, 4, offset);
+
+ value = grub_cpu_to_le32 (value);
+ return value;
+}
+
+static void
+grub_gettext_getstring_from_offset (grub_uint32_t offset,
+ grub_uint32_t length, char *translation)
+{
+ grub_gettext_pread (fd_mo, translation, length, offset);
+ translation[length] = '\0';
+}
+
+static const char *
+grub_gettext_gettranslation_from_position (int position)
+{
+ int offsettranslation;
+ int internal_position;
+ grub_uint32_t length, offset;
+ char *translation;
+
+ offsettranslation = grub_gettext_get_info (GETTEXT_OFFSET_TRANSLATION);
+
+ internal_position = offsettranslation + position * 8;
+
+ grub_gettext_pread (fd_mo, (char *) &length, 4, internal_position);
+ length = grub_cpu_to_le32 (length);
+
+ grub_gettext_pread (fd_mo, (char *) &offset, 4, internal_position + 4);
+ offset = grub_cpu_to_le32 (offset);
+
+ translation = grub_malloc (length + 1);
+ grub_gettext_getstring_from_offset (offset, length, translation);
+
+ return translation;
+}
+
+static char *
+grub_gettext_getstring_from_position (int position)
+{
+ int internal_position;
+ int length, offset;
+ char *original;
+
+ /* Get position for string i. */
+ internal_position = grub_gettext_offsetoriginal + (position * 8);
+
+ /* Get the length of the string i. */
+ grub_gettext_pread (fd_mo, (char *) &length, 4, internal_position);
+
+ /* Get the offset of the string i. */
+ grub_gettext_pread (fd_mo, (char *) &offset, 4, internal_position + 4);
+
+ /* Get the string i. */
+ original = grub_malloc (length + 1);
+ grub_gettext_getstring_from_offset (offset, length, original);
+
+ return original;
+}
+
+static const char *
+grub_gettext_translate (const char *orig)
+{
+ char *current_string;
+ const char *ret;
+
+ int min, max, current;
+ int found = 0;
+
+ struct grub_gettext_msg *cur;
+
+ /* Make sure we can use grub_gettext_translate for error messages. Push
+ active error message to error stack and reset error message. */
+ grub_error_push ();
+
+ cur = grub_named_list_find (GRUB_AS_NAMED_LIST (grub_gettext_msg_list),
+ orig);
+
+ if (cur)
+ {
+ grub_error_pop ();
+ return cur->translated;
+ }
+
+ if (fd_mo == 0)
+ {
+ grub_error_pop ();
+ return orig;
+ }
+
+ min = 0;
+ max = grub_gettext_max;
+
+ current = (max + min) / 2;
+
+ while (current != min && current != max && found == 0)
+ {
+ current_string = grub_gettext_getstring_from_position (current);
+
+ /* Search by bisection. */
+ if (grub_strcmp (current_string, orig) < 0)
+ {
+ grub_free (current_string);
+ min = current;
+ }
+ else if (grub_strcmp (current_string, orig) > 0)
+ {
+ grub_free (current_string);
+ max = current;
+ }
+ else if (grub_strcmp (current_string, orig) == 0)
+ {
+ grub_free (current_string);
+ found = 1;
+ }
+ current = (max + min) / 2;
+ }
+
+ ret = found ? grub_gettext_gettranslation_from_position (current) : orig;
+
+ if (found)
+ {
+ cur = grub_zalloc (sizeof (*cur));
+
+ if (cur)
+ {
+ cur->name = grub_strdup (orig);
+ if (cur->name)
+ {
+ cur->translated = ret;
+ grub_list_push (GRUB_AS_LIST_P (&grub_gettext_msg_list),
+ GRUB_AS_LIST (cur));
+ }
+ }
+ else
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ grub_error_pop ();
+ return ret;
+}
+
+/* This is similar to grub_file_open. */
+static grub_file_t
+grub_mofile_open (const char *filename)
+{
+ int unsigned magic;
+ int version;
+
+ /* Using fd_mo and not another variable because
+ it's needed for grub_gettext_get_info. */
+
+ fd_mo = grub_file_open (filename);
+ grub_errno = GRUB_ERR_NONE;
+
+ if (!fd_mo)
+ {
+ grub_dprintf ("gettext", "Cannot read %s\n", filename);
+ return 0;
+ }
+
+ magic = grub_gettext_get_info (GETTEXT_MAGIC_NUMBER);
+
+ if (magic != MO_MAGIC_NUMBER)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "mo: invalid mo file: %s",
+ filename);
+ grub_file_close (fd_mo);
+ fd_mo = 0;
+ return 0;
+ }
+
+ version = grub_gettext_get_info (GETTEXT_FILE_FORMAT);
+
+ if (version != 0)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "mo: invalid mo version in file: %s", filename);
+ fd_mo = 0;
+ return 0;
+ }
+
+ return fd_mo;
+}
+
+/* Returning grub_file_t would be more natural, but grub_mofile_open assigns
+ to fd_mo anyway ... */
+static void
+grub_mofile_open_lang (const char *locale_dir, const char *locale)
+{
+ char *mo_file;
+
+ /* mo_file e.g.: /boot/grub/locale/ca.mo */
+
+ mo_file = grub_xasprintf ("%s/%s.mo", locale_dir, locale);
+ if (!mo_file)
+ return;
+
+ fd_mo = grub_mofile_open (mo_file);
+
+ /* Will try adding .gz as well. */
+ if (fd_mo == NULL)
+ {
+ char *mo_file_old;
+ mo_file_old = mo_file;
+ mo_file = grub_xasprintf ("%s.gz", mo_file);
+ grub_free (mo_file_old);
+ if (!mo_file)
+ return;
+ fd_mo = grub_mofile_open (mo_file);
+ }
+}
+
+static void
+grub_gettext_init_ext (const char *locale)
+{
+ char *locale_dir;
+
+ locale_dir = grub_env_get ("locale_dir");
+ if (locale_dir == NULL)
+ {
+ grub_dprintf ("gettext", "locale_dir variable is not set up.\n");
+ return;
+ }
+
+ fd_mo = NULL;
+
+ grub_mofile_open_lang (locale_dir, locale);
+
+ /* ll_CC didn't work, so try ll. */
+ if (fd_mo == NULL)
+ {
+ char *lang = grub_strdup (locale);
+ char *underscore = grub_strchr (lang, '_');
+
+ if (underscore)
+ {
+ *underscore = '\0';
+ grub_mofile_open_lang (locale_dir, lang);
+ }
+
+ grub_free (lang);
+ }
+
+ if (fd_mo)
+ {
+ grub_gettext_offsetoriginal =
+ grub_gettext_get_info (GETTEXT_OFFSET_ORIGINAL);
+ grub_gettext_max = grub_gettext_get_info (GETTEXT_NUMBER_OF_STRINGS);
+
+ grub_gettext_original = grub_gettext;
+ grub_gettext = grub_gettext_translate;
+ }
+}
+
+static void
+grub_gettext_delete_list (void)
+{
+ while (grub_gettext_msg_list)
+ {
+ grub_free ((char *) grub_gettext_msg_list->name);
+ grub_gettext_msg_list = grub_gettext_msg_list->next;
+ /* Don't delete the translated message because could be in use. */
+ }
+}
+
+static char *
+grub_gettext_env_write_lang (struct grub_env_var *var
+ __attribute__ ((unused)), const char *val)
+{
+ grub_gettext_init_ext (val);
+
+ grub_gettext_delete_list ();
+
+ return grub_strdup (val);
+}
+
+static grub_err_t
+grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "text to translate required");
+
+ const char *translation;
+ translation = grub_gettext_translate (args[0]);
+ grub_printf ("%s\n", translation);
+ return 0;
+}
+
+GRUB_MOD_INIT (gettext)
+{
+ (void) mod; /* To stop warning. */
+
+ const char *lang;
+
+ lang = grub_env_get ("lang");
+
+ grub_gettext_init_ext (lang);
+
+ grub_register_command_p1 ("gettext", grub_cmd_translate,
+ N_("STRING"),
+ N_("Translates the string with the current settings."));
+
+ /* Reload .mo file information if lang changes. */
+ grub_register_variable_hook ("lang", NULL, grub_gettext_env_write_lang);
+
+ /* Preserve hooks after context changes. */
+ grub_env_export ("lang");
+}
+
+GRUB_MOD_FINI (gettext)
+{
+ if (fd_mo != 0)
+ grub_file_close (fd_mo);
+
+ grub_gettext_delete_list ();
+
+ grub_gettext = grub_gettext_original;
+}
diff --git a/grub-core/gfxmenu/font.c b/grub-core/gfxmenu/font.c
new file mode 100644
index 0000000..3c15e19
--- /dev/null
+++ b/grub-core/gfxmenu/font.c
@@ -0,0 +1,109 @@
+/* font.c - Font API and font file loader. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/bufio.h>
+#include <grub/dl.h>
+#include <grub/file.h>
+#include <grub/font.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/video.h>
+#include <grub/bitmap.h>
+#include <grub/charset.h>
+#include <grub/unicode.h>
+#include <grub/fontformat.h>
+#include <grub/gfxmenu_view.h>
+
+/* Draw a UTF-8 string of text on the current video render target.
+ The x coordinate specifies the starting x position for the first character,
+ while the y coordinate specifies the baseline position.
+ If the string contains a character that FONT does not contain, then
+ a glyph from another loaded font may be used instead. */
+grub_err_t
+grub_font_draw_string (const char *str, grub_font_t font,
+ grub_video_color_t color,
+ int left_x, int baseline_y)
+{
+ int x;
+ struct grub_font_glyph *glyph;
+ grub_uint32_t *logical;
+ grub_ssize_t logical_len, visual_len;
+ struct grub_unicode_glyph *visual, *ptr;
+
+ logical_len = grub_utf8_to_ucs4_alloc (str, &logical, 0);
+ if (logical_len < 0)
+ return grub_errno;
+
+ visual_len = grub_bidi_logical_to_visual (logical, logical_len, &visual,
+ 0, 0, 0);
+ grub_free (logical);
+ if (visual_len < 0)
+ return grub_errno;
+
+ for (ptr = visual, x = left_x; ptr < visual + visual_len; ptr++)
+ {
+ grub_err_t err;
+ glyph = grub_font_construct_glyph (font, ptr);
+ if (!glyph)
+ return grub_errno;
+ err = grub_font_draw_glyph (glyph, color, x, baseline_y);
+ x += glyph->device_width;
+ grub_free (glyph);
+ if (err)
+ return err;
+ }
+
+ grub_free (visual);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Get the width in pixels of the specified UTF-8 string, when rendered in
+ in the specified font (but falling back on other fonts for glyphs that
+ are missing). */
+int
+grub_font_get_string_width (grub_font_t font, const char *str)
+{
+ int width = 0;
+ grub_uint32_t *ptr;
+ grub_ssize_t logical_len;
+ grub_uint32_t *logical;
+
+ logical_len = grub_utf8_to_ucs4_alloc (str, &logical, 0);
+ if (logical_len < 0)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return 0;
+ }
+
+ for (ptr = logical; ptr < logical + logical_len;)
+ {
+ struct grub_unicode_glyph glyph;
+
+ ptr += grub_unicode_aglomerate_comb (ptr,
+ logical_len - (ptr - logical),
+ &glyph);
+ width += grub_font_get_constructed_device_width (font, &glyph);
+
+ grub_free (glyph.combining);
+ }
+
+ return width;
+}
diff --git a/grub-core/gfxmenu/gfxmenu.c b/grub-core/gfxmenu/gfxmenu.c
new file mode 100644
index 0000000..2f210e0
--- /dev/null
+++ b/grub-core/gfxmenu/gfxmenu.c
@@ -0,0 +1,135 @@
+/* gfxmenu.c - Graphical menu interface controller. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/video.h>
+#include <grub/gfxterm.h>
+#include <grub/bitmap.h>
+#include <grub/bitmap_scale.h>
+#include <grub/term.h>
+#include <grub/env.h>
+#include <grub/normal.h>
+#include <grub/gfxwidgets.h>
+#include <grub/menu.h>
+#include <grub/menu_viewer.h>
+#include <grub/gfxmenu_model.h>
+#include <grub/gfxmenu_view.h>
+#include <grub/time.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_gfxmenu_view_t cached_view;
+
+static void
+grub_gfxmenu_viewer_fini (void *data __attribute__ ((unused)))
+{
+}
+
+/* FIXME: Previously 't' changed to text menu is it necessary? */
+static grub_err_t
+grub_gfxmenu_try (int entry, grub_menu_t menu, int nested)
+{
+ grub_gfxmenu_view_t view = NULL;
+ const char *theme_path;
+ struct grub_menu_viewer *instance;
+ grub_err_t err;
+ struct grub_video_mode_info mode_info;
+
+ theme_path = grub_env_get ("theme");
+ if (! theme_path)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND, "no theme specified");
+
+ instance = grub_zalloc (sizeof (*instance));
+ if (!instance)
+ return grub_errno;
+
+ err = grub_video_get_info (&mode_info);
+ if (err)
+ return err;
+
+ if (!cached_view || grub_strcmp (cached_view->theme_path, theme_path) != 0
+ || cached_view->screen.width != mode_info.width
+ || cached_view->screen.height != mode_info.height)
+ {
+ grub_free (cached_view);
+ /* Create the view. */
+ cached_view = grub_gfxmenu_view_new (theme_path, mode_info.width,
+ mode_info.height);
+ }
+
+ if (! cached_view)
+ {
+ grub_free (instance);
+ return grub_errno;
+ }
+
+ view = cached_view;
+
+ view->double_repaint = (mode_info.mode_type
+ & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED)
+ && !(mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP);
+ view->selected = entry;
+ view->menu = menu;
+ view->nested = nested;
+ view->first_timeout = -1;
+
+ grub_video_set_viewport (0, 0, mode_info.width, mode_info.height);
+ if (view->double_repaint)
+ {
+ grub_video_swap_buffers ();
+ grub_video_set_viewport (0, 0, mode_info.width, mode_info.height);
+ }
+
+ grub_gfxmenu_view_draw (view);
+
+ instance->data = view;
+ instance->set_chosen_entry = grub_gfxmenu_set_chosen_entry;
+ instance->fini = grub_gfxmenu_viewer_fini;
+ instance->print_timeout = grub_gfxmenu_print_timeout;
+ instance->clear_timeout = grub_gfxmenu_clear_timeout;
+
+ grub_menu_register_viewer (instance);
+
+ return GRUB_ERR_NONE;
+}
+
+GRUB_MOD_INIT (gfxmenu)
+{
+ struct grub_term_output *term;
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ if (grub_gfxmenu_try_hook && grub_strcmp (term->name, "gfxterm") == 0)
+ {
+ grub_gfxterm_fullscreen ();
+ break;
+ }
+
+ grub_gfxmenu_try_hook = grub_gfxmenu_try;
+}
+
+GRUB_MOD_FINI (gfxmenu)
+{
+ grub_gfxmenu_view_destroy (cached_view);
+ grub_gfxmenu_try_hook = NULL;
+}
diff --git a/grub-core/gfxmenu/gui_box.c b/grub-core/gfxmenu/gui_box.c
new file mode 100644
index 0000000..38b15f9
--- /dev/null
+++ b/grub-core/gfxmenu/gui_box.c
@@ -0,0 +1,412 @@
+/* gui_box.c - GUI container that stack components. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/gui_string_util.h>
+
+struct component_node
+{
+ grub_gui_component_t component;
+ struct component_node *next;
+ struct component_node *prev;
+};
+
+typedef struct grub_gui_box *grub_gui_box_t;
+
+typedef void (*layout_func_t) (grub_gui_box_t self, int modify_layout,
+ unsigned *minimal_width,
+ unsigned *minimal_height);
+
+struct grub_gui_box
+{
+ struct grub_gui_container container;
+
+ grub_gui_container_t parent;
+ grub_video_rect_t bounds;
+ char *id;
+
+ /* Doubly linked list of components with dummy head & tail nodes. */
+ struct component_node chead;
+ struct component_node ctail;
+
+ /* The layout function: differs for vertical and horizontal boxes. */
+ layout_func_t layout_func;
+};
+
+static void
+box_destroy (void *vself)
+{
+ grub_gui_box_t self = vself;
+ struct component_node *cur;
+ struct component_node *next;
+ for (cur = self->chead.next; cur != &self->ctail; cur = next)
+ {
+ /* Copy the 'next' pointer, since we need it for the next iteration,
+ and we're going to free the memory it is stored in. */
+ next = cur->next;
+ /* Destroy the child component. */
+ cur->component->ops->destroy (cur->component);
+ /* Free the linked list node. */
+ grub_free (cur);
+ }
+ grub_free (self);
+}
+
+static const char *
+box_get_id (void *vself)
+{
+ grub_gui_box_t self = vself;
+ return self->id;
+}
+
+static int
+box_is_instance (void *vself __attribute__((unused)), const char *type)
+{
+ return (grub_strcmp (type, "component") == 0
+ || grub_strcmp (type, "container") == 0);
+}
+
+static void
+layout_horizontally (grub_gui_box_t self, int modify_layout,
+ unsigned *min_width, unsigned *min_height)
+{
+ /* Start at the left (chead) and set the x coordinates as we go right. */
+ /* All components have their width set to the box's width. */
+
+ struct component_node *cur;
+ unsigned w = 0, mwfrac = 0, h = 0, x = 0;
+ grub_fixed_signed_t wfrac = 0;
+ int bogus_frac = 0;
+
+ for (cur = self->chead.next; cur != &self->ctail; cur = cur->next)
+ {
+ grub_gui_component_t c = cur->component;
+ unsigned mw = 0, mh = 0;
+
+ if (c->ops->get_minimal_size)
+ c->ops->get_minimal_size (c, &mw, &mh);
+
+ if (c->h > (signed) h)
+ h = c->h;
+ if (mh > h)
+ h = mh;
+ wfrac += c->wfrac;
+ w += c->w;
+ if (mw - c->w > 0)
+ mwfrac += mw - c->w;
+ }
+ if (wfrac > GRUB_FIXED_1 || (w > 0 && wfrac == GRUB_FIXED_1))
+ bogus_frac = 1;
+
+ if (min_width)
+ {
+ if (wfrac < GRUB_FIXED_1)
+ *min_width = grub_fixed_sfs_divide (w, GRUB_FIXED_1 - wfrac);
+ else
+ *min_width = w;
+ if (*min_width < w + mwfrac)
+ *min_width = w + mwfrac;
+ }
+ if (min_height)
+ *min_height = h;
+
+ if (!modify_layout)
+ return;
+
+ for (cur = self->chead.next; cur != &self->ctail; cur = cur->next)
+ {
+ grub_video_rect_t r;
+ grub_gui_component_t c = cur->component;
+ unsigned mw = 0, mh = 0;
+
+ r.x = x;
+ r.y = 0;
+ r.height = h;
+
+ if (c->ops->get_minimal_size)
+ c->ops->get_minimal_size (c, &mw, &mh);
+
+ r.width = c->w;
+ if (!bogus_frac)
+ r.width += grub_fixed_sfs_multiply (self->bounds.width, c->wfrac);
+
+ if (r.width < mw)
+ r.width = mw;
+
+ c->ops->set_bounds (c, &r);
+
+ x += r.width;
+ }
+}
+
+static void
+layout_vertically (grub_gui_box_t self, int modify_layout,
+ unsigned *min_width, unsigned *min_height)
+{
+ /* Start at the top (chead) and set the y coordinates as we go rdown. */
+ /* All components have their height set to the box's height. */
+
+ struct component_node *cur;
+ unsigned h = 0, mhfrac = 0, w = 0, y = 0;
+ grub_fixed_signed_t hfrac = 0;
+ int bogus_frac = 0;
+
+ for (cur = self->chead.next; cur != &self->ctail; cur = cur->next)
+ {
+ grub_gui_component_t c = cur->component;
+ unsigned mw = 0, mh = 0;
+
+ if (c->ops->get_minimal_size)
+ c->ops->get_minimal_size (c, &mw, &mh);
+
+ if (c->w > (signed) w)
+ w = c->w;
+ if (mw > w)
+ w = mw;
+ hfrac += c->hfrac;
+ h += c->h;
+ if (mh - c->h > 0)
+ mhfrac += mh - c->h;
+ }
+ if (hfrac > GRUB_FIXED_1 || (h > 0 && hfrac == GRUB_FIXED_1))
+ bogus_frac = 1;
+
+ if (min_height)
+ {
+ if (hfrac < GRUB_FIXED_1)
+ *min_height = grub_fixed_sfs_divide (h, GRUB_FIXED_1 - hfrac);
+ else
+ *min_height = h;
+ if (*min_height < h + mhfrac)
+ *min_height = h + mhfrac;
+ }
+ if (min_width)
+ *min_width = w;
+
+ if (!modify_layout)
+ return;
+
+ for (cur = self->chead.next; cur != &self->ctail; cur = cur->next)
+ {
+ grub_video_rect_t r;
+ grub_gui_component_t c = cur->component;
+ unsigned mw = 0, mh = 0;
+
+ r.x = 0;
+ r.y = y;
+ r.width = w;
+
+ if (c->ops->get_minimal_size)
+ c->ops->get_minimal_size (c, &mw, &mh);
+
+ r.height = c->h;
+ if (!bogus_frac)
+ r.height += grub_fixed_sfs_multiply (self->bounds.height, c->hfrac);
+
+ if (r.height < mh)
+ r.height = mh;
+
+ c->ops->set_bounds (c, &r);
+
+ y += r.height;
+ }
+}
+
+static void
+box_paint (void *vself, const grub_video_rect_t *region)
+{
+ grub_gui_box_t self = vself;
+ struct component_node *cur;
+ grub_video_rect_t vpsave;
+
+ grub_gui_set_viewport (&self->bounds, &vpsave);
+ for (cur = self->chead.next; cur != &self->ctail; cur = cur->next)
+ {
+ grub_gui_component_t comp = cur->component;
+ comp->ops->paint (comp, region);
+ }
+ grub_gui_restore_viewport (&vpsave);
+}
+
+static void
+box_set_parent (void *vself, grub_gui_container_t parent)
+{
+ grub_gui_box_t self = vself;
+ self->parent = parent;
+}
+
+static grub_gui_container_t
+box_get_parent (void *vself)
+{
+ grub_gui_box_t self = vself;
+ return self->parent;
+}
+
+static void
+box_set_bounds (void *vself, const grub_video_rect_t *bounds)
+{
+ grub_gui_box_t self = vself;
+ self->bounds = *bounds;
+ self->layout_func (self, 1, 0, 0); /* Relayout the children. */
+}
+
+static void
+box_get_bounds (void *vself, grub_video_rect_t *bounds)
+{
+ grub_gui_box_t self = vself;
+ *bounds = self->bounds;
+}
+
+/* The box's preferred size is based on the preferred sizes
+ of its children. */
+static void
+box_get_minimal_size (void *vself, unsigned *width, unsigned *height)
+{
+ grub_gui_box_t self = vself;
+ self->layout_func (self, 0, width, height); /* Just calculate the size. */
+}
+
+static grub_err_t
+box_set_property (void *vself, const char *name, const char *value)
+{
+ grub_gui_box_t self = vself;
+ if (grub_strcmp (name, "id") == 0)
+ {
+ grub_free (self->id);
+ if (value)
+ {
+ self->id = grub_strdup (value);
+ if (! self->id)
+ return grub_errno;
+ }
+ else
+ self->id = 0;
+ }
+
+ return grub_errno;
+}
+
+static void
+box_add (void *vself, grub_gui_component_t comp)
+{
+ grub_gui_box_t self = vself;
+ struct component_node *node;
+ node = grub_malloc (sizeof (*node));
+ if (! node)
+ return; /* Note: probably should handle the error. */
+ node->component = comp;
+ /* Insert the node before the tail. */
+ node->prev = self->ctail.prev;
+ node->prev->next = node;
+ node->next = &self->ctail;
+ node->next->prev = node;
+
+ comp->ops->set_parent (comp, (grub_gui_container_t) self);
+ self->layout_func (self, 1, 0, 0); /* Relayout the children. */
+}
+
+static void
+box_remove (void *vself, grub_gui_component_t comp)
+{
+ grub_gui_box_t self = vself;
+ struct component_node *cur;
+ for (cur = self->chead.next; cur != &self->ctail; cur = cur->next)
+ {
+ if (cur->component == comp)
+ {
+ /* Unlink 'cur' from the list. */
+ cur->prev->next = cur->next;
+ cur->next->prev = cur->prev;
+ /* Free the node's memory (but don't destroy the component). */
+ grub_free (cur);
+ /* Must not loop again, since 'cur' would be dereferenced! */
+ return;
+ }
+ }
+}
+
+static void
+box_iterate_children (void *vself,
+ grub_gui_component_callback cb, void *userdata)
+{
+ grub_gui_box_t self = vself;
+ struct component_node *cur;
+ for (cur = self->chead.next; cur != &self->ctail; cur = cur->next)
+ cb (cur->component, userdata);
+}
+
+static struct grub_gui_component_ops box_comp_ops =
+ {
+ .destroy = box_destroy,
+ .get_id = box_get_id,
+ .is_instance = box_is_instance,
+ .paint = box_paint,
+ .set_parent = box_set_parent,
+ .get_parent = box_get_parent,
+ .set_bounds = box_set_bounds,
+ .get_bounds = box_get_bounds,
+ .get_minimal_size = box_get_minimal_size,
+ .set_property = box_set_property
+ };
+
+static struct grub_gui_container_ops box_ops =
+{
+ .add = box_add,
+ .remove = box_remove,
+ .iterate_children = box_iterate_children
+};
+
+/* Box constructor. Specify the appropriate layout function to create
+ a horizontal or vertical stacking box. */
+static grub_gui_box_t
+box_new (layout_func_t layout_func)
+{
+ grub_gui_box_t box;
+ box = grub_zalloc (sizeof (*box));
+ if (! box)
+ return 0;
+ box->container.ops = &box_ops;
+ box->container.component.ops = &box_comp_ops;
+ box->chead.next = &box->ctail;
+ box->ctail.prev = &box->chead;
+ box->layout_func = layout_func;
+ return box;
+}
+
+/* Create a new container that stacks its child components horizontally,
+ from left to right. Each child get a width corresponding to its
+ preferred width. The height of each child is set the maximum of the
+ preferred heights of all children. */
+grub_gui_container_t
+grub_gui_hbox_new (void)
+{
+ return (grub_gui_container_t) box_new (layout_horizontally);
+}
+
+/* Create a new container that stacks its child components verticallyj,
+ from top to bottom. Each child get a height corresponding to its
+ preferred height. The width of each child is set the maximum of the
+ preferred widths of all children. */
+grub_gui_container_t
+grub_gui_vbox_new (void)
+{
+ return (grub_gui_container_t) box_new (layout_vertically);
+}
diff --git a/grub-core/gfxmenu/gui_canvas.c b/grub-core/gfxmenu/gui_canvas.c
new file mode 100644
index 0000000..b3919c2
--- /dev/null
+++ b/grub-core/gfxmenu/gui_canvas.c
@@ -0,0 +1,267 @@
+/* gui_canvas.c - GUI container allowing manually placed components. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/gui_string_util.h>
+
+/* TODO Add layering so that components can be properly overlaid. */
+
+struct component_node
+{
+ grub_gui_component_t component;
+ struct component_node *next;
+};
+
+struct grub_gui_canvas
+{
+ struct grub_gui_container container;
+
+ grub_gui_container_t parent;
+ grub_video_rect_t bounds;
+ char *id;
+ /* Component list (dummy head node). */
+ struct component_node components;
+};
+
+typedef struct grub_gui_canvas *grub_gui_canvas_t;
+
+static void
+canvas_destroy (void *vself)
+{
+ grub_gui_canvas_t self = vself;
+ struct component_node *cur;
+ struct component_node *next;
+ for (cur = self->components.next; cur; cur = next)
+ {
+ /* Copy the 'next' pointer, since we need it for the next iteration,
+ and we're going to free the memory it is stored in. */
+ next = cur->next;
+ /* Destroy the child component. */
+ cur->component->ops->destroy (cur->component);
+ /* Free the linked list node. */
+ grub_free (cur);
+ }
+ grub_free (self);
+}
+
+static const char *
+canvas_get_id (void *vself)
+{
+ grub_gui_canvas_t self = vself;
+ return self->id;
+}
+
+static int
+canvas_is_instance (void *vself __attribute__((unused)), const char *type)
+{
+ return (grub_strcmp (type, "component") == 0
+ || grub_strcmp (type, "container") == 0);
+}
+
+static void
+canvas_paint (void *vself, const grub_video_rect_t *region)
+{
+ grub_gui_canvas_t self = vself;
+ struct component_node *cur;
+ grub_video_rect_t vpsave;
+
+ grub_gui_set_viewport (&self->bounds, &vpsave);
+ for (cur = self->components.next; cur; cur = cur->next)
+ {
+ grub_video_rect_t r;
+ grub_gui_component_t comp;
+ signed x, y, w, h;
+
+ comp = cur->component;
+
+ w = grub_fixed_sfs_multiply (self->bounds.width, comp->wfrac) + comp->w;
+ h = grub_fixed_sfs_multiply (self->bounds.height, comp->hfrac) + comp->h;
+ x = grub_fixed_sfs_multiply (self->bounds.width, comp->xfrac) + comp->x;
+ y = grub_fixed_sfs_multiply (self->bounds.height, comp->yfrac) + comp->y;
+
+ if (comp->ops->get_minimal_size)
+ {
+ unsigned mw;
+ unsigned mh;
+ comp->ops->get_minimal_size (comp, &mw, &mh);
+ if (w < (signed) mw)
+ w = mw;
+ if (h < (signed) mh)
+ h = mh;
+ }
+
+ /* Sanity checks. */
+ if (w <= 0)
+ w = 32;
+ if (h <= 0)
+ h = 32;
+
+ if (x >= (signed) self->bounds.width)
+ x = self->bounds.width - 32;
+ if (y >= (signed) self->bounds.height)
+ y = self->bounds.height - 32;
+
+ if (x < 0)
+ x = 0;
+ if (y < 0)
+ y = 0;
+
+ if (x + w >= (signed) self->bounds.width)
+ w = self->bounds.width - x;
+ if (y + h >= (signed) self->bounds.height)
+ h = self->bounds.height - y;
+
+ r.x = x;
+ r.y = y;
+ r.width = w;
+ r.height = h;
+ comp->ops->set_bounds (comp, &r);
+
+ /* Paint the child. */
+ if (grub_video_have_common_points (region, &r))
+ comp->ops->paint (comp, region);
+ }
+ grub_gui_restore_viewport (&vpsave);
+}
+
+static void
+canvas_set_parent (void *vself, grub_gui_container_t parent)
+{
+ grub_gui_canvas_t self = vself;
+ self->parent = parent;
+}
+
+static grub_gui_container_t
+canvas_get_parent (void *vself)
+{
+ grub_gui_canvas_t self = vself;
+ return self->parent;
+}
+
+static void
+canvas_set_bounds (void *vself, const grub_video_rect_t *bounds)
+{
+ grub_gui_canvas_t self = vself;
+ self->bounds = *bounds;
+}
+
+static void
+canvas_get_bounds (void *vself, grub_video_rect_t *bounds)
+{
+ grub_gui_canvas_t self = vself;
+ *bounds = self->bounds;
+}
+
+static grub_err_t
+canvas_set_property (void *vself, const char *name, const char *value)
+{
+ grub_gui_canvas_t self = vself;
+ if (grub_strcmp (name, "id") == 0)
+ {
+ grub_free (self->id);
+ if (value)
+ {
+ self->id = grub_strdup (value);
+ if (! self->id)
+ return grub_errno;
+ }
+ else
+ self->id = 0;
+ }
+ return grub_errno;
+}
+
+static void
+canvas_add (void *vself, grub_gui_component_t comp)
+{
+ grub_gui_canvas_t self = vself;
+ struct component_node *node;
+ node = grub_malloc (sizeof (*node));
+ if (! node)
+ return; /* Note: probably should handle the error. */
+ node->component = comp;
+ node->next = self->components.next;
+ self->components.next = node;
+ comp->ops->set_parent (comp, (grub_gui_container_t) self);
+}
+
+static void
+canvas_remove (void *vself, grub_gui_component_t comp)
+{
+ grub_gui_canvas_t self = vself;
+ struct component_node *cur;
+ struct component_node *prev;
+ prev = &self->components;
+ for (cur = self->components.next; cur; prev = cur, cur = cur->next)
+ {
+ if (cur->component == comp)
+ {
+ /* Unlink 'cur' from the list. */
+ prev->next = cur->next;
+ /* Free the node's memory (but don't destroy the component). */
+ grub_free (cur);
+ /* Must not loop again, since 'cur' would be dereferenced! */
+ return;
+ }
+ }
+}
+
+static void
+canvas_iterate_children (void *vself,
+ grub_gui_component_callback cb, void *userdata)
+{
+ grub_gui_canvas_t self = vself;
+ struct component_node *cur;
+ for (cur = self->components.next; cur; cur = cur->next)
+ cb (cur->component, userdata);
+}
+
+static struct grub_gui_component_ops canvas_comp_ops =
+{
+ .destroy = canvas_destroy,
+ .get_id = canvas_get_id,
+ .is_instance = canvas_is_instance,
+ .paint = canvas_paint,
+ .set_parent = canvas_set_parent,
+ .get_parent = canvas_get_parent,
+ .set_bounds = canvas_set_bounds,
+ .get_bounds = canvas_get_bounds,
+ .set_property = canvas_set_property
+};
+
+static struct grub_gui_container_ops canvas_ops =
+{
+ .add = canvas_add,
+ .remove = canvas_remove,
+ .iterate_children = canvas_iterate_children
+};
+
+grub_gui_container_t
+grub_gui_canvas_new (void)
+{
+ grub_gui_canvas_t canvas;
+ canvas = grub_zalloc (sizeof (*canvas));
+ if (! canvas)
+ return 0;
+ canvas->container.ops = &canvas_ops;
+ canvas->container.component.ops = &canvas_comp_ops;
+ return (grub_gui_container_t) canvas;
+}
diff --git a/grub-core/gfxmenu/gui_circular_progress.c b/grub-core/gfxmenu/gui_circular_progress.c
new file mode 100644
index 0000000..098ae1c
--- /dev/null
+++ b/grub-core/gfxmenu/gui_circular_progress.c
@@ -0,0 +1,308 @@
+/* gui_circular_process.c - GUI circular progress indicator component. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/font.h>
+#include <grub/gui_string_util.h>
+#include <grub/gfxmenu_view.h>
+#include <grub/gfxwidgets.h>
+#include <grub/trig.h>
+
+struct grub_gui_circular_progress
+{
+ struct grub_gui_progress progress;
+
+ grub_gui_container_t parent;
+ grub_video_rect_t bounds;
+ char *id;
+ int visible;
+ int start;
+ int end;
+ int value;
+ int num_ticks;
+ int start_angle;
+ int ticks_disappear;
+ char *theme_dir;
+ int need_to_load_pixmaps;
+ char *center_file;
+ char *tick_file;
+ struct grub_video_bitmap *center_bitmap;
+ struct grub_video_bitmap *tick_bitmap;
+};
+
+typedef struct grub_gui_circular_progress *circular_progress_t;
+
+static void
+circprog_destroy (void *vself)
+{
+ circular_progress_t self = vself;
+ grub_gfxmenu_timeout_unregister ((grub_gui_component_t) self);
+ grub_free (self);
+}
+
+static const char *
+circprog_get_id (void *vself)
+{
+ circular_progress_t self = vself;
+ return self->id;
+}
+
+static int
+circprog_is_instance (void *vself __attribute__((unused)), const char *type)
+{
+ return grub_strcmp (type, "component") == 0;
+}
+
+static struct grub_video_bitmap *
+load_bitmap (const char *dir, const char *file)
+{
+ struct grub_video_bitmap *bitmap;
+ char *abspath;
+
+ /* Check arguments. */
+ if (! dir || ! file)
+ return 0;
+
+ /* Resolve to an absolute path. */
+ abspath = grub_resolve_relative_path (dir, file);
+ if (! abspath)
+ return 0;
+
+ /* Load the image. */
+ grub_errno = GRUB_ERR_NONE;
+ grub_video_bitmap_load (&bitmap, abspath);
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_free (abspath);
+ return bitmap;
+}
+
+static int
+check_pixmaps (circular_progress_t self)
+{
+ if (self->need_to_load_pixmaps)
+ {
+ if (self->center_bitmap)
+ grub_video_bitmap_destroy (self->center_bitmap);
+ self->center_bitmap = load_bitmap (self->theme_dir, self->center_file);
+ self->tick_bitmap = load_bitmap (self->theme_dir, self->tick_file);
+ self->need_to_load_pixmaps = 0;
+ }
+
+ return (self->center_bitmap != 0 && self->tick_bitmap != 0);
+}
+
+static void
+circprog_paint (void *vself, const grub_video_rect_t *region)
+{
+ circular_progress_t self = vself;
+
+ if (! self->visible)
+ return;
+
+ if (!grub_video_have_common_points (region, &self->bounds))
+ return;
+
+ if (! check_pixmaps (self))
+ return;
+
+ grub_video_rect_t vpsave;
+ grub_gui_set_viewport (&self->bounds, &vpsave);
+
+ int width = self->bounds.width;
+ int height = self->bounds.height;
+ int center_width = grub_video_bitmap_get_width (self->center_bitmap);
+ int center_height = grub_video_bitmap_get_height (self->center_bitmap);
+ int tick_width = grub_video_bitmap_get_width (self->tick_bitmap);
+ int tick_height = grub_video_bitmap_get_height (self->tick_bitmap);
+ grub_video_blit_bitmap (self->center_bitmap, GRUB_VIDEO_BLIT_BLEND,
+ (width - center_width) / 2,
+ (height - center_height) / 2, 0, 0,
+ center_width, center_height);
+
+ int radius = width / 2 - tick_width / 2 - 1;
+ int nticks;
+ int tick_begin;
+ int tick_end;
+ if (self->end == self->start)
+ nticks = 0;
+ else
+ nticks = (self->num_ticks
+ * (self->value - self->start)
+ / (self->end - self->start));
+ /* Do ticks appear or disappear as the value approached the end? */
+ if (self->ticks_disappear)
+ {
+ tick_begin = nticks;
+ tick_end = self->num_ticks - 1;
+ }
+ else
+ {
+ tick_begin = 0;
+ tick_end = nticks - 1;
+ }
+
+ int i;
+ for (i = tick_begin; i < tick_end; i++)
+ {
+ int x;
+ int y;
+ int angle;
+
+ /* Calculate the location of the tick. */
+ angle = self->start_angle + i * GRUB_TRIG_ANGLE_MAX / self->num_ticks;
+ x = width / 2 + (grub_cos (angle) * radius / GRUB_TRIG_FRACTION_SCALE);
+ y = height / 2 + (grub_sin (angle) * radius / GRUB_TRIG_FRACTION_SCALE);
+
+ /* Adjust (x,y) so the tick is centered. */
+ x -= tick_width / 2;
+ y -= tick_height / 2;
+
+ /* Draw the tick. */
+ grub_video_blit_bitmap (self->tick_bitmap, GRUB_VIDEO_BLIT_BLEND,
+ x, y, 0, 0, tick_width, tick_height);
+ }
+
+ grub_gui_restore_viewport (&vpsave);
+}
+
+static void
+circprog_set_parent (void *vself, grub_gui_container_t parent)
+{
+ circular_progress_t self = vself;
+ self->parent = parent;
+}
+
+static grub_gui_container_t
+circprog_get_parent (void *vself)
+{
+ circular_progress_t self = vself;
+ return self->parent;
+}
+
+static void
+circprog_set_bounds (void *vself, const grub_video_rect_t *bounds)
+{
+ circular_progress_t self = vself;
+ self->bounds = *bounds;
+}
+
+static void
+circprog_get_bounds (void *vself, grub_video_rect_t *bounds)
+{
+ circular_progress_t self = vself;
+ *bounds = self->bounds;
+}
+
+static void
+circprog_set_state (void *vself, int visible, int start,
+ int current, int end)
+{
+ circular_progress_t self = vself;
+ self->visible = visible;
+ self->start = start;
+ self->value = current;
+ self->end = end;
+}
+
+static grub_err_t
+circprog_set_property (void *vself, const char *name, const char *value)
+{
+ circular_progress_t self = vself;
+ if (grub_strcmp (name, "num_ticks") == 0)
+ {
+ self->num_ticks = grub_strtol (value, 0, 10);
+ }
+ else if (grub_strcmp (name, "start_angle") == 0)
+ {
+ self->start_angle = grub_strtol (value, 0, 10);
+ }
+ else if (grub_strcmp (name, "ticks_disappear") == 0)
+ {
+ self->ticks_disappear = grub_strcmp (value, "false") != 0;
+ }
+ else if (grub_strcmp (name, "center_bitmap") == 0)
+ {
+ self->need_to_load_pixmaps = 1;
+ grub_free (self->center_file);
+ self->center_file = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "tick_bitmap") == 0)
+ {
+ self->need_to_load_pixmaps = 1;
+ grub_free (self->tick_file);
+ self->tick_file = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "theme_dir") == 0)
+ {
+ self->need_to_load_pixmaps = 1;
+ grub_free (self->theme_dir);
+ self->theme_dir = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "id") == 0)
+ {
+ grub_gfxmenu_timeout_unregister ((grub_gui_component_t) self);
+ grub_free (self->id);
+ if (value)
+ self->id = grub_strdup (value);
+ else
+ self->id = 0;
+ if (self->id && grub_strcmp (self->id, GRUB_GFXMENU_TIMEOUT_COMPONENT_ID)
+ == 0)
+ grub_gfxmenu_timeout_register ((grub_gui_component_t) self,
+ circprog_set_state);
+ }
+ return grub_errno;
+}
+
+static struct grub_gui_component_ops circprog_ops =
+{
+ .destroy = circprog_destroy,
+ .get_id = circprog_get_id,
+ .is_instance = circprog_is_instance,
+ .paint = circprog_paint,
+ .set_parent = circprog_set_parent,
+ .get_parent = circprog_get_parent,
+ .set_bounds = circprog_set_bounds,
+ .get_bounds = circprog_get_bounds,
+ .set_property = circprog_set_property
+};
+
+static struct grub_gui_progress_ops circprog_prog_ops =
+ {
+ .set_state = circprog_set_state
+ };
+
+grub_gui_component_t
+grub_gui_circular_progress_new (void)
+{
+ circular_progress_t self;
+ self = grub_zalloc (sizeof (*self));
+ if (! self)
+ return 0;
+ self->progress.ops = &circprog_prog_ops;
+ self->progress.component.ops = &circprog_ops;
+ self->visible = 1;
+ self->num_ticks = 64;
+ self->start_angle = -64;
+
+ return (grub_gui_component_t) self;
+}
diff --git a/grub-core/gfxmenu/gui_image.c b/grub-core/gfxmenu/gui_image.c
new file mode 100644
index 0000000..60e4a46
--- /dev/null
+++ b/grub-core/gfxmenu/gui_image.c
@@ -0,0 +1,272 @@
+/* gui_image.c - GUI component to display an image. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/gui_string_util.h>
+#include <grub/bitmap.h>
+#include <grub/bitmap_scale.h>
+
+struct grub_gui_image
+{
+ struct grub_gui_component component;
+
+ grub_gui_container_t parent;
+ grub_video_rect_t bounds;
+ char *id;
+ char *theme_dir;
+ struct grub_video_bitmap *raw_bitmap;
+ struct grub_video_bitmap *bitmap;
+};
+
+typedef struct grub_gui_image *grub_gui_image_t;
+
+static void
+image_destroy (void *vself)
+{
+ grub_gui_image_t self = vself;
+
+ /* Free the scaled bitmap, unless it's a reference to the raw bitmap. */
+ if (self->bitmap && (self->bitmap != self->raw_bitmap))
+ grub_video_bitmap_destroy (self->bitmap);
+ if (self->raw_bitmap)
+ grub_video_bitmap_destroy (self->raw_bitmap);
+
+ grub_free (self);
+}
+
+static const char *
+image_get_id (void *vself)
+{
+ grub_gui_image_t self = vself;
+ return self->id;
+}
+
+static int
+image_is_instance (void *vself __attribute__((unused)), const char *type)
+{
+ return grub_strcmp (type, "component") == 0;
+}
+
+static void
+image_paint (void *vself, const grub_video_rect_t *region)
+{
+ grub_gui_image_t self = vself;
+ grub_video_rect_t vpsave;
+
+ if (! self->bitmap)
+ return;
+ if (!grub_video_have_common_points (region, &self->bounds))
+ return;
+
+ grub_gui_set_viewport (&self->bounds, &vpsave);
+ grub_video_blit_bitmap (self->bitmap, GRUB_VIDEO_BLIT_BLEND,
+ 0, 0, 0, 0,
+ grub_video_bitmap_get_width (self->bitmap),
+ grub_video_bitmap_get_height (self->bitmap));
+ grub_gui_restore_viewport (&vpsave);
+}
+
+static void
+image_set_parent (void *vself, grub_gui_container_t parent)
+{
+ grub_gui_image_t self = vself;
+ self->parent = parent;
+}
+
+static grub_gui_container_t
+image_get_parent (void *vself)
+{
+ grub_gui_image_t self = vself;
+ return self->parent;
+}
+
+static grub_err_t
+rescale_image (grub_gui_image_t self)
+{
+ signed width;
+ signed height;
+
+ if (! self->raw_bitmap)
+ {
+ if (self->bitmap)
+ {
+ grub_video_bitmap_destroy (self->bitmap);
+ self->bitmap = 0;
+ }
+ return grub_errno;
+ }
+
+ width = self->bounds.width;
+ height = self->bounds.height;
+
+ if (self->bitmap
+ && ((signed) grub_video_bitmap_get_width (self->bitmap) == width)
+ && ((signed) grub_video_bitmap_get_height (self->bitmap) == height))
+ {
+ /* Nothing to do; already the right size. */
+ return grub_errno;
+ }
+
+ /* Free any old scaled bitmap,
+ *unless* it's a reference to the raw bitmap. */
+ if (self->bitmap && (self->bitmap != self->raw_bitmap))
+ grub_video_bitmap_destroy (self->bitmap);
+
+ self->bitmap = 0;
+
+ /* Create a scaled bitmap, unless the requested size is the same
+ as the raw size -- in that case a reference is made. */
+ if ((signed) grub_video_bitmap_get_width (self->raw_bitmap) == width
+ && (signed) grub_video_bitmap_get_height (self->raw_bitmap) == height)
+ {
+ self->bitmap = self->raw_bitmap;
+ return grub_errno;
+ }
+
+ /* Don't scale to an invalid size. */
+ if (width <= 0 || height <= 0)
+ return grub_errno;
+
+ /* Create the scaled bitmap. */
+ grub_video_bitmap_create_scaled (&self->bitmap,
+ width,
+ height,
+ self->raw_bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_error_push ();
+ grub_error (grub_errno, "failed to scale bitmap for image component");
+ }
+ return grub_errno;
+}
+
+static void
+image_set_bounds (void *vself, const grub_video_rect_t *bounds)
+{
+ grub_gui_image_t self = vself;
+ self->bounds = *bounds;
+ rescale_image (self);
+}
+
+static void
+image_get_bounds (void *vself, grub_video_rect_t *bounds)
+{
+ grub_gui_image_t self = vself;
+ *bounds = self->bounds;
+}
+
+/* FIXME: inform rendering system it's not forced minimum. */
+static void
+image_get_minimal_size (void *vself, unsigned *width, unsigned *height)
+{
+ grub_gui_image_t self = vself;
+
+ if (self->raw_bitmap)
+ {
+ *width = grub_video_bitmap_get_width (self->raw_bitmap);
+ *height = grub_video_bitmap_get_height (self->raw_bitmap);
+ }
+ else
+ {
+ *width = 0;
+ *height = 0;
+ }
+}
+
+static grub_err_t
+load_image (grub_gui_image_t self, const char *path)
+{
+ struct grub_video_bitmap *bitmap;
+ if (grub_video_bitmap_load (&bitmap, path) != GRUB_ERR_NONE)
+ return grub_errno;
+
+ if (self->bitmap && (self->bitmap != self->raw_bitmap))
+ grub_video_bitmap_destroy (self->bitmap);
+ if (self->raw_bitmap)
+ grub_video_bitmap_destroy (self->raw_bitmap);
+
+ self->raw_bitmap = bitmap;
+ return rescale_image (self);
+}
+
+static grub_err_t
+image_set_property (void *vself, const char *name, const char *value)
+{
+ grub_gui_image_t self = vself;
+ if (grub_strcmp (name, "theme_dir") == 0)
+ {
+ grub_free (self->theme_dir);
+ self->theme_dir = grub_strdup (value);
+ }
+ else if (grub_strcmp (name, "file") == 0)
+ {
+ char *absvalue;
+ grub_err_t err;
+
+ /* Resolve to an absolute path. */
+ if (! self->theme_dir)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unspecified theme_dir");
+ absvalue = grub_resolve_relative_path (self->theme_dir, value);
+ if (! absvalue)
+ return grub_errno;
+
+ err = load_image (self, absvalue);
+ grub_free (absvalue);
+
+ return err;
+ }
+ else if (grub_strcmp (name, "id") == 0)
+ {
+ grub_free (self->id);
+ if (value)
+ self->id = grub_strdup (value);
+ else
+ self->id = 0;
+ }
+ return grub_errno;
+}
+
+static struct grub_gui_component_ops image_ops =
+{
+ .destroy = image_destroy,
+ .get_id = image_get_id,
+ .is_instance = image_is_instance,
+ .paint = image_paint,
+ .set_parent = image_set_parent,
+ .get_parent = image_get_parent,
+ .set_bounds = image_set_bounds,
+ .get_bounds = image_get_bounds,
+ .get_minimal_size = image_get_minimal_size,
+ .set_property = image_set_property
+};
+
+grub_gui_component_t
+grub_gui_image_new (void)
+{
+ grub_gui_image_t image;
+ image = grub_zalloc (sizeof (*image));
+ if (! image)
+ return 0;
+ image->component.ops = &image_ops;
+ return (grub_gui_component_t) image;
+}
+
diff --git a/grub-core/gfxmenu/gui_label.c b/grub-core/gfxmenu/gui_label.c
new file mode 100644
index 0000000..15a352f
--- /dev/null
+++ b/grub-core/gfxmenu/gui_label.c
@@ -0,0 +1,254 @@
+/* gui_label.c - GUI component to display a line of text. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/font.h>
+#include <grub/gui_string_util.h>
+
+static const char *align_options[] =
+{
+ "left",
+ "center",
+ "right",
+ 0
+};
+
+enum align_mode {
+ align_left,
+ align_center,
+ align_right
+};
+
+struct grub_gui_label
+{
+ struct grub_gui_component comp;
+
+ grub_gui_container_t parent;
+ grub_video_rect_t bounds;
+ char *id;
+ int visible;
+ char *text;
+ char *template;
+ grub_font_t font;
+ grub_gui_color_t color;
+ int value;
+ enum align_mode align;
+};
+
+typedef struct grub_gui_label *grub_gui_label_t;
+
+static void
+label_destroy (void *vself)
+{
+ grub_gui_label_t self = vself;
+ grub_gfxmenu_timeout_unregister ((grub_gui_component_t) self);
+ grub_free (self->text);
+ grub_free (self->template);
+ grub_free (self);
+}
+
+static const char *
+label_get_id (void *vself)
+{
+ grub_gui_label_t self = vself;
+ return self->id;
+}
+
+static int
+label_is_instance (void *vself __attribute__((unused)), const char *type)
+{
+ return grub_strcmp (type, "component") == 0;
+}
+
+static void
+label_paint (void *vself, const grub_video_rect_t *region)
+{
+ grub_gui_label_t self = vself;
+
+ if (! self->visible)
+ return;
+
+ if (!grub_video_have_common_points (region, &self->bounds))
+ return;
+
+ /* Calculate the starting x coordinate. */
+ int left_x;
+ if (self->align == align_left)
+ left_x = 0;
+ else if (self->align == align_center)
+ left_x = ((self->bounds.width
+ - grub_font_get_string_width (self->font, self->text))
+ ) / 2;
+ else if (self->align == align_right)
+ left_x = (self->bounds.width
+ - grub_font_get_string_width (self->font, self->text));
+ else
+ return; /* Invalid alignment. */
+
+ grub_video_rect_t vpsave;
+ grub_gui_set_viewport (&self->bounds, &vpsave);
+ grub_font_draw_string (self->text,
+ self->font,
+ grub_gui_map_color (self->color),
+ left_x,
+ grub_font_get_ascent (self->font));
+ grub_gui_restore_viewport (&vpsave);
+}
+
+static void
+label_set_parent (void *vself, grub_gui_container_t parent)
+{
+ grub_gui_label_t self = vself;
+ self->parent = parent;
+}
+
+static grub_gui_container_t
+label_get_parent (void *vself)
+{
+ grub_gui_label_t self = vself;
+ return self->parent;
+}
+
+static void
+label_set_bounds (void *vself, const grub_video_rect_t *bounds)
+{
+ grub_gui_label_t self = vself;
+ self->bounds = *bounds;
+}
+
+static void
+label_get_bounds (void *vself, grub_video_rect_t *bounds)
+{
+ grub_gui_label_t self = vself;
+ *bounds = self->bounds;
+}
+
+static void
+label_get_minimal_size (void *vself, unsigned *width, unsigned *height)
+{
+ grub_gui_label_t self = vself;
+ *width = grub_font_get_string_width (self->font, self->text);
+ *height = (grub_font_get_ascent (self->font)
+ + grub_font_get_descent (self->font));
+}
+
+static void
+label_set_state (void *vself, int visible, int start __attribute__ ((unused)),
+ int current, int end __attribute__ ((unused)))
+{
+ grub_gui_label_t self = vself;
+ self->value = -current;
+ self->visible = visible;
+ grub_free (self->text);
+ self->text = grub_xasprintf (self->template ? : "%d", self->value);
+}
+
+static grub_err_t
+label_set_property (void *vself, const char *name, const char *value)
+{
+ grub_gui_label_t self = vself;
+ if (grub_strcmp (name, "text") == 0)
+ {
+ grub_free (self->text);
+ grub_free (self->template);
+ if (! value)
+ {
+ self->template = NULL;
+ self->text = grub_strdup ("");
+ }
+ else
+ {
+ self->template = grub_strdup (value);
+ self->text = grub_xasprintf (value, self->value);
+ }
+ }
+ else if (grub_strcmp (name, "font") == 0)
+ {
+ self->font = grub_font_get (value);
+ }
+ else if (grub_strcmp (name, "color") == 0)
+ {
+ grub_gui_parse_color (value, &self->color);
+ }
+ else if (grub_strcmp (name, "align") == 0)
+ {
+ int i;
+ for (i = 0; align_options[i]; i++)
+ {
+ if (grub_strcmp (align_options[i], value) == 0)
+ {
+ self->align = i; /* Set the alignment mode. */
+ break;
+ }
+ }
+ }
+ else if (grub_strcmp (name, "visible") == 0)
+ {
+ self->visible = grub_strcmp (value, "false") != 0;
+ }
+ else if (grub_strcmp (name, "id") == 0)
+ {
+ grub_gfxmenu_timeout_unregister ((grub_gui_component_t) self);
+ grub_free (self->id);
+ if (value)
+ self->id = grub_strdup (value);
+ else
+ self->id = 0;
+ if (self->id && grub_strcmp (self->id, GRUB_GFXMENU_TIMEOUT_COMPONENT_ID)
+ == 0)
+ grub_gfxmenu_timeout_register ((grub_gui_component_t) self,
+ label_set_state);
+ }
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_gui_component_ops label_ops =
+{
+ .destroy = label_destroy,
+ .get_id = label_get_id,
+ .is_instance = label_is_instance,
+ .paint = label_paint,
+ .set_parent = label_set_parent,
+ .get_parent = label_get_parent,
+ .set_bounds = label_set_bounds,
+ .get_bounds = label_get_bounds,
+ .get_minimal_size = label_get_minimal_size,
+ .set_property = label_set_property
+};
+
+grub_gui_component_t
+grub_gui_label_new (void)
+{
+ grub_gui_label_t label;
+ label = grub_zalloc (sizeof (*label));
+ if (! label)
+ return 0;
+ label->comp.ops = &label_ops;
+ label->visible = 1;
+ label->text = grub_strdup ("");
+ label->font = grub_font_get ("Unknown Regular 16");
+ label->color.red = 0;
+ label->color.green = 0;
+ label->color.blue = 0;
+ label->color.alpha = 255;
+ label->align = align_left;
+ return (grub_gui_component_t) label;
+}
diff --git a/grub-core/gfxmenu/gui_list.c b/grub-core/gfxmenu/gui_list.c
new file mode 100644
index 0000000..e5d6fc2
--- /dev/null
+++ b/grub-core/gfxmenu/gui_list.c
@@ -0,0 +1,620 @@
+/* gui_list.c - GUI component to display a selectable list of items. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/gui_string_util.h>
+#include <grub/gfxmenu_view.h>
+#include <grub/gfxwidgets.h>
+
+struct grub_gui_list_impl
+{
+ struct grub_gui_list list;
+
+ grub_gui_container_t parent;
+ grub_video_rect_t bounds;
+ char *id;
+ int visible;
+
+ int icon_width;
+ int icon_height;
+ int item_height;
+ int item_padding;
+ int item_icon_space;
+ int item_spacing;
+ grub_font_t item_font;
+ grub_font_t selected_item_font;
+ grub_gui_color_t item_color;
+ int selected_item_color_set;
+ grub_gui_color_t selected_item_color;
+
+ int draw_scrollbar;
+ int need_to_recreate_scrollbar;
+ char *scrollbar_frame_pattern;
+ char *scrollbar_thumb_pattern;
+ grub_gfxmenu_box_t scrollbar_frame;
+ grub_gfxmenu_box_t scrollbar_thumb;
+ int scrollbar_width;
+
+ int first_shown_index;
+
+ int need_to_recreate_boxes;
+ char *theme_dir;
+ char *menu_box_pattern;
+ char *selected_item_box_pattern;
+ grub_gfxmenu_box_t menu_box;
+ grub_gfxmenu_box_t selected_item_box;
+
+ grub_gfxmenu_icon_manager_t icon_manager;
+
+ grub_gfxmenu_view_t view;
+};
+
+typedef struct grub_gui_list_impl *list_impl_t;
+
+static void
+list_destroy (void *vself)
+{
+ list_impl_t self = vself;
+
+ grub_free (self->theme_dir);
+ grub_free (self->menu_box_pattern);
+ grub_free (self->selected_item_box_pattern);
+ if (self->menu_box)
+ self->menu_box->destroy (self->menu_box);
+ if (self->selected_item_box)
+ self->selected_item_box->destroy (self->selected_item_box);
+ if (self->icon_manager)
+ grub_gfxmenu_icon_manager_destroy (self->icon_manager);
+
+ grub_free (self);
+}
+
+static int
+get_num_shown_items (list_impl_t self)
+{
+ int boxpad = self->item_padding;
+ int item_vspace = self->item_spacing;
+ int item_height = self->item_height;
+
+ grub_gfxmenu_box_t box = self->menu_box;
+ int box_top_pad = box->get_top_pad (box);
+ int box_bottom_pad = box->get_bottom_pad (box);
+
+ return (self->bounds.height + item_vspace - 2 * boxpad
+ - box_top_pad - box_bottom_pad) / (item_height + item_vspace);
+}
+
+static int
+check_boxes (list_impl_t self)
+{
+ if (self->need_to_recreate_boxes)
+ {
+ grub_gui_recreate_box (&self->menu_box,
+ self->menu_box_pattern,
+ self->theme_dir);
+
+ grub_gui_recreate_box (&self->selected_item_box,
+ self->selected_item_box_pattern,
+ self->theme_dir);
+
+ self->need_to_recreate_boxes = 0;
+ }
+
+ return (self->menu_box != 0 && self->selected_item_box != 0);
+}
+
+static int
+check_scrollbar (list_impl_t self)
+{
+ if (self->need_to_recreate_scrollbar)
+ {
+ grub_gui_recreate_box (&self->scrollbar_frame,
+ self->scrollbar_frame_pattern,
+ self->theme_dir);
+
+ grub_gui_recreate_box (&self->scrollbar_thumb,
+ self->scrollbar_thumb_pattern,
+ self->theme_dir);
+
+ self->need_to_recreate_scrollbar = 0;
+ }
+
+ return (self->scrollbar_frame != 0 && self->scrollbar_thumb != 0);
+}
+
+static const char *
+list_get_id (void *vself)
+{
+ list_impl_t self = vself;
+ return self->id;
+}
+
+static int
+list_is_instance (void *vself __attribute__((unused)), const char *type)
+{
+ return (grub_strcmp (type, "component") == 0
+ || grub_strcmp (type, "list") == 0);
+}
+
+static struct grub_video_bitmap *
+get_item_icon (list_impl_t self, int item_index)
+{
+ grub_menu_entry_t entry;
+ entry = grub_menu_get_entry (self->view->menu, item_index);
+ if (! entry)
+ return 0;
+
+ return grub_gfxmenu_icon_manager_get_icon (self->icon_manager, entry);
+}
+
+static void
+make_selected_item_visible (list_impl_t self)
+{
+ int selected_index = self->view->selected;
+ if (selected_index < 0)
+ return; /* No item is selected. */
+ int num_shown_items = get_num_shown_items (self);
+ int last_shown_index = self->first_shown_index + (num_shown_items - 1);
+ if (selected_index < self->first_shown_index)
+ self->first_shown_index = selected_index;
+ else if (selected_index > last_shown_index)
+ self->first_shown_index = selected_index - (num_shown_items - 1);
+}
+
+/* Draw a scrollbar on the menu. */
+static void
+draw_scrollbar (list_impl_t self,
+ int value, int extent, int min, int max,
+ int rightx, int topy, int height)
+{
+ grub_gfxmenu_box_t frame = self->scrollbar_frame;
+ grub_gfxmenu_box_t thumb = self->scrollbar_thumb;
+ int frame_vertical_pad = (frame->get_top_pad (frame)
+ + frame->get_bottom_pad (frame));
+ int frame_horizontal_pad = (frame->get_left_pad (frame)
+ + frame->get_right_pad (frame));
+ int tracktop = topy + frame->get_top_pad (frame);
+ int tracklen = height - frame_vertical_pad;
+ frame->set_content_size (frame, self->scrollbar_width, tracklen);
+ int thumby = tracktop + tracklen * (value - min) / (max - min);
+ int thumbheight = tracklen * extent / (max - min) + 1;
+ thumb->set_content_size (thumb,
+ self->scrollbar_width - frame_horizontal_pad,
+ thumbheight - (thumb->get_top_pad (thumb)
+ + thumb->get_bottom_pad (thumb)));
+ frame->draw (frame,
+ rightx - (self->scrollbar_width + frame_horizontal_pad),
+ topy);
+ thumb->draw (thumb,
+ rightx - (self->scrollbar_width - frame->get_right_pad (frame)),
+ thumby);
+}
+
+/* Draw the list of items. */
+static void
+draw_menu (list_impl_t self, int num_shown_items)
+{
+ if (! self->menu_box || ! self->selected_item_box)
+ return;
+
+ int boxpad = self->item_padding;
+ int icon_text_space = self->item_icon_space;
+ int item_vspace = self->item_spacing;
+
+ int ascent = grub_font_get_ascent (self->item_font);
+ int descent = grub_font_get_descent (self->item_font);
+ int item_height = self->item_height;
+
+ make_selected_item_visible (self);
+
+ grub_gfxmenu_box_t selbox = self->selected_item_box;
+ int sel_leftpad = selbox->get_left_pad (selbox);
+ int sel_toppad = selbox->get_top_pad (selbox);
+ int item_top = sel_toppad;
+ int menu_index;
+ int visible_index;
+ struct grub_video_rect oviewport;
+
+ grub_video_get_viewport (&oviewport.x, &oviewport.y,
+ &oviewport.width, &oviewport.height);
+ grub_video_set_viewport (oviewport.x + boxpad,
+ oviewport.y + boxpad,
+ oviewport.width - 2 * boxpad,
+ oviewport.height - 2 * boxpad);
+
+ for (visible_index = 0, menu_index = self->first_shown_index;
+ visible_index < num_shown_items && menu_index < self->view->menu->size;
+ visible_index++, menu_index++)
+ {
+ int is_selected = (menu_index == self->view->selected);
+
+ if (is_selected)
+ {
+ int cwidth = oviewport.width - 2 * boxpad - 2;
+ if (selbox->get_border_width)
+ cwidth -= selbox->get_border_width (selbox);
+ selbox->set_content_size (selbox, cwidth, item_height - 1);
+ selbox->draw (selbox, 0,
+ item_top - sel_toppad);
+ }
+
+ struct grub_video_bitmap *icon;
+ if ((icon = get_item_icon (self, menu_index)) != 0)
+ grub_video_blit_bitmap (icon, GRUB_VIDEO_BLIT_BLEND,
+ sel_leftpad,
+ item_top + (item_height - self->icon_height) / 2,
+ 0, 0, self->icon_width, self->icon_height);
+
+ const char *item_title =
+ grub_menu_get_entry (self->view->menu, menu_index)->title;
+ grub_font_t font =
+ (is_selected && self->selected_item_font
+ ? self->selected_item_font
+ : self->item_font);
+ grub_gui_color_t text_color =
+ ((is_selected && self->selected_item_color_set)
+ ? self->selected_item_color
+ : self->item_color);
+ grub_font_draw_string (item_title,
+ font,
+ grub_gui_map_color (text_color),
+ sel_leftpad + self->icon_width + icon_text_space,
+ (item_top + (item_height - (ascent + descent))
+ / 2 + ascent));
+
+ item_top += item_height + item_vspace;
+ }
+ grub_video_set_viewport (oviewport.x,
+ oviewport.y,
+ oviewport.width,
+ oviewport.height);
+}
+
+static void
+list_paint (void *vself, const grub_video_rect_t *region)
+{
+ list_impl_t self = vself;
+ grub_video_rect_t vpsave;
+
+ if (! self->visible)
+ return;
+ if (!grub_video_have_common_points (region, &self->bounds))
+ return;
+
+ check_boxes (self);
+
+ if (! self->menu_box || ! self->selected_item_box)
+ return;
+
+ grub_gui_set_viewport (&self->bounds, &vpsave);
+ {
+ grub_gfxmenu_box_t box = self->menu_box;
+ int box_left_pad = box->get_left_pad (box);
+ int box_top_pad = box->get_top_pad (box);
+ int box_right_pad = box->get_right_pad (box);
+ int box_bottom_pad = box->get_bottom_pad (box);
+ grub_video_rect_t vpsave2, content_rect;
+ int num_shown_items = get_num_shown_items (self);
+ int drawing_scrollbar = (self->draw_scrollbar
+ && (num_shown_items < self->view->menu->size)
+ && check_scrollbar (self));
+
+ content_rect.x = box_left_pad;
+ content_rect.y = box_top_pad;
+ content_rect.width = self->bounds.width - box_left_pad - box_right_pad;
+ content_rect.height = self->bounds.height - box_top_pad - box_bottom_pad;
+
+ box->set_content_size (box, content_rect.width, content_rect.height);
+
+ box->draw (box, 0, 0);
+
+ grub_gui_set_viewport (&content_rect, &vpsave2);
+ draw_menu (self, num_shown_items);
+ grub_gui_restore_viewport (&vpsave2);
+
+ if (drawing_scrollbar)
+ draw_scrollbar (self,
+ self->first_shown_index, num_shown_items,
+ 0, self->view->menu->size,
+ self->bounds.width - box_right_pad
+ + self->scrollbar_width,
+ box_top_pad,
+ self->bounds.height - box_top_pad - box_bottom_pad);
+ }
+
+ grub_gui_restore_viewport (&vpsave);
+}
+
+static void
+list_set_parent (void *vself, grub_gui_container_t parent)
+{
+ list_impl_t self = vself;
+ self->parent = parent;
+}
+
+static grub_gui_container_t
+list_get_parent (void *vself)
+{
+ list_impl_t self = vself;
+ return self->parent;
+}
+
+static void
+list_set_bounds (void *vself, const grub_video_rect_t *bounds)
+{
+ list_impl_t self = vself;
+ self->bounds = *bounds;
+}
+
+static void
+list_get_bounds (void *vself, grub_video_rect_t *bounds)
+{
+ list_impl_t self = vself;
+ *bounds = self->bounds;
+}
+
+static void
+list_get_minimal_size (void *vself, unsigned *width, unsigned *height)
+{
+ list_impl_t self = vself;
+
+ if (check_boxes (self))
+ {
+ int boxpad = self->item_padding;
+ int item_vspace = self->item_spacing;
+ int item_height = self->item_height;
+ int num_items = 3;
+
+ grub_gfxmenu_box_t box = self->menu_box;
+ int box_left_pad = box->get_left_pad (box);
+ int box_top_pad = box->get_top_pad (box);
+ int box_right_pad = box->get_right_pad (box);
+ int box_bottom_pad = box->get_bottom_pad (box);
+ unsigned width_s;
+
+ grub_gfxmenu_box_t selbox = self->selected_item_box;
+ int sel_toppad = selbox->get_top_pad (selbox);
+
+ *width = grub_font_get_string_width (self->item_font, "Typical OS");
+ width_s = grub_font_get_string_width (self->selected_item_font,
+ "Typical OS");
+ if (*width < width_s)
+ *width = width_s;
+
+ *width += 2 * boxpad + box_left_pad + box_right_pad;
+
+ /* Set the menu box height to fit the items. */
+ *height = (item_height * num_items
+ + item_vspace * (num_items - 1)
+ + 2 * boxpad
+ + box_top_pad + box_bottom_pad + sel_toppad);
+ }
+ else
+ {
+ *width = 0;
+ *height = 0;
+ }
+}
+
+static grub_err_t
+list_set_property (void *vself, const char *name, const char *value)
+{
+ list_impl_t self = vself;
+ if (grub_strcmp (name, "item_font") == 0)
+ {
+ self->item_font = grub_font_get (value);
+ }
+ else if (grub_strcmp (name, "selected_item_font") == 0)
+ {
+ if (! value || grub_strcmp (value, "inherit") == 0)
+ self->selected_item_font = 0;
+ else
+ self->selected_item_font = grub_font_get (value);
+ }
+ else if (grub_strcmp (name, "item_color") == 0)
+ {
+ grub_gui_parse_color (value, &self->item_color);
+ }
+ else if (grub_strcmp (name, "selected_item_color") == 0)
+ {
+ if (! value || grub_strcmp (value, "inherit") == 0)
+ {
+ self->selected_item_color_set = 0;
+ }
+ else
+ {
+ if (grub_gui_parse_color (value, &self->selected_item_color)
+ == GRUB_ERR_NONE)
+ self->selected_item_color_set = 1;
+ }
+ }
+ else if (grub_strcmp (name, "icon_width") == 0)
+ {
+ self->icon_width = grub_strtol (value, 0, 10);
+ grub_gfxmenu_icon_manager_set_icon_size (self->icon_manager,
+ self->icon_width,
+ self->icon_height);
+ }
+ else if (grub_strcmp (name, "icon_height") == 0)
+ {
+ self->icon_height = grub_strtol (value, 0, 10);
+ grub_gfxmenu_icon_manager_set_icon_size (self->icon_manager,
+ self->icon_width,
+ self->icon_height);
+ }
+ else if (grub_strcmp (name, "item_height") == 0)
+ {
+ self->item_height = grub_strtol (value, 0, 10);
+ }
+ else if (grub_strcmp (name, "item_padding") == 0)
+ {
+ self->item_padding = grub_strtol (value, 0, 10);
+ }
+ else if (grub_strcmp (name, "item_icon_space") == 0)
+ {
+ self->item_icon_space = grub_strtol (value, 0, 10);
+ }
+ else if (grub_strcmp (name, "item_spacing") == 0)
+ {
+ self->item_spacing = grub_strtol (value, 0, 10);
+ }
+ else if (grub_strcmp (name, "visible") == 0)
+ {
+ self->visible = grub_strcmp (value, "false") != 0;
+ }
+ else if (grub_strcmp (name, "menu_pixmap_style") == 0)
+ {
+ self->need_to_recreate_boxes = 1;
+ grub_free (self->menu_box_pattern);
+ self->menu_box_pattern = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "selected_item_pixmap_style") == 0)
+ {
+ self->need_to_recreate_boxes = 1;
+ grub_free (self->selected_item_box_pattern);
+ self->selected_item_box_pattern = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "scrollbar_frame") == 0)
+ {
+ self->need_to_recreate_scrollbar = 1;
+ grub_free (self->scrollbar_frame_pattern);
+ self->scrollbar_frame_pattern = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "scrollbar_thumb") == 0)
+ {
+ self->need_to_recreate_scrollbar = 1;
+ grub_free (self->scrollbar_thumb_pattern);
+ self->scrollbar_thumb_pattern = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "scrollbar_width") == 0)
+ {
+ self->scrollbar_width = grub_strtol (value, 0, 10);
+ }
+ else if (grub_strcmp (name, "scrollbar") == 0)
+ {
+ self->draw_scrollbar = grub_strcmp (value, "false") != 0;
+ }
+ else if (grub_strcmp (name, "theme_dir") == 0)
+ {
+ self->need_to_recreate_boxes = 1;
+ grub_free (self->theme_dir);
+ self->theme_dir = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "id") == 0)
+ {
+ grub_free (self->id);
+ if (value)
+ self->id = grub_strdup (value);
+ else
+ self->id = 0;
+ }
+ return grub_errno;
+}
+
+/* Set necessary information that the gfxmenu view provides. */
+static void
+list_set_view_info (void *vself,
+ grub_gfxmenu_view_t view)
+{
+ list_impl_t self = vself;
+ grub_gfxmenu_icon_manager_set_theme_path (self->icon_manager,
+ view->theme_path);
+ self->view = view;
+}
+
+static struct grub_gui_component_ops list_comp_ops =
+ {
+ .destroy = list_destroy,
+ .get_id = list_get_id,
+ .is_instance = list_is_instance,
+ .paint = list_paint,
+ .set_parent = list_set_parent,
+ .get_parent = list_get_parent,
+ .set_bounds = list_set_bounds,
+ .get_bounds = list_get_bounds,
+ .get_minimal_size = list_get_minimal_size,
+ .set_property = list_set_property
+ };
+
+static struct grub_gui_list_ops list_ops =
+{
+ .set_view_info = list_set_view_info
+};
+
+grub_gui_component_t
+grub_gui_list_new (void)
+{
+ list_impl_t self;
+ grub_font_t default_font;
+ grub_gui_color_t default_fg_color;
+
+ self = grub_zalloc (sizeof (*self));
+ if (! self)
+ return 0;
+
+ self->list.ops = &list_ops;
+ self->list.component.ops = &list_comp_ops;
+
+ self->visible = 1;
+
+ default_font = grub_font_get ("Unknown Regular 16");
+ default_fg_color = grub_gui_color_rgb (0, 0, 0);
+
+ self->icon_width = 32;
+ self->icon_height = 32;
+ self->item_height = 42;
+ self->item_padding = 14;
+ self->item_icon_space = 4;
+ self->item_spacing = 16;
+ self->item_font = default_font;
+ self->selected_item_font = 0; /* Default to using the item_font. */
+ self->item_color = default_fg_color;
+ self->selected_item_color_set = 0; /* Default to using the item_color. */
+ self->selected_item_color = default_fg_color;
+
+ self->draw_scrollbar = 1;
+ self->need_to_recreate_scrollbar = 1;
+ self->scrollbar_frame = 0;
+ self->scrollbar_thumb = 0;
+ self->scrollbar_frame_pattern = 0;
+ self->scrollbar_thumb_pattern = 0;
+ self->scrollbar_width = 16;
+
+ self->first_shown_index = 0;
+
+ self->need_to_recreate_boxes = 0;
+ self->theme_dir = 0;
+ self->menu_box_pattern = 0;
+ self->selected_item_box_pattern = 0;
+ self->menu_box = grub_gfxmenu_create_box (0, 0);
+ self->selected_item_box = grub_gfxmenu_create_box (0, 0);
+
+ self->icon_manager = grub_gfxmenu_icon_manager_new ();
+ if (! self->icon_manager)
+ {
+ self->list.component.ops->destroy (self);
+ return 0;
+ }
+ grub_gfxmenu_icon_manager_set_icon_size (self->icon_manager,
+ self->icon_width,
+ self->icon_height);
+ return (grub_gui_component_t) self;
+}
diff --git a/grub-core/gfxmenu/gui_progress_bar.c b/grub-core/gfxmenu/gui_progress_bar.c
new file mode 100644
index 0000000..e1b3179
--- /dev/null
+++ b/grub-core/gfxmenu/gui_progress_bar.c
@@ -0,0 +1,391 @@
+/* gui_progress_bar.c - GUI progress bar component. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/font.h>
+#include <grub/gui_string_util.h>
+#include <grub/gfxmenu_view.h>
+#include <grub/gfxwidgets.h>
+#include <grub/i18n.h>
+
+struct grub_gui_progress_bar
+{
+ struct grub_gui_progress progress;
+
+ grub_gui_container_t parent;
+ grub_video_rect_t bounds;
+ char *id;
+ int visible;
+ int start;
+ int end;
+ int value;
+ int show_text;
+ char *template;
+ grub_font_t font;
+ grub_gui_color_t text_color;
+ grub_gui_color_t border_color;
+ grub_gui_color_t bg_color;
+ grub_gui_color_t fg_color;
+
+ char *theme_dir;
+ int need_to_recreate_pixmaps;
+ int pixmapbar_available;
+ char *bar_pattern;
+ char *highlight_pattern;
+ grub_gfxmenu_box_t bar_box;
+ grub_gfxmenu_box_t highlight_box;
+};
+
+typedef struct grub_gui_progress_bar *grub_gui_progress_bar_t;
+
+static void
+progress_bar_destroy (void *vself)
+{
+ grub_gui_progress_bar_t self = vself;
+ grub_gfxmenu_timeout_unregister ((grub_gui_component_t) self);
+ grub_free (self);
+}
+
+static const char *
+progress_bar_get_id (void *vself)
+{
+ grub_gui_progress_bar_t self = vself;
+ return self->id;
+}
+
+static int
+progress_bar_is_instance (void *vself __attribute__((unused)), const char *type)
+{
+ return grub_strcmp (type, "component") == 0;
+}
+
+static int
+check_pixmaps (grub_gui_progress_bar_t self)
+{
+ if (!self->pixmapbar_available)
+ return 0;
+ if (self->need_to_recreate_pixmaps)
+ {
+ grub_gui_recreate_box (&self->bar_box,
+ self->bar_pattern,
+ self->theme_dir);
+
+ grub_gui_recreate_box (&self->highlight_box,
+ self->highlight_pattern,
+ self->theme_dir);
+
+ self->need_to_recreate_pixmaps = 0;
+ }
+
+ return (self->bar_box != 0 && self->highlight_box != 0);
+}
+
+static void
+draw_filled_rect_bar (grub_gui_progress_bar_t self)
+{
+ /* Set the progress bar's frame. */
+ grub_video_rect_t f;
+ f.x = 1;
+ f.y = 1;
+ f.width = self->bounds.width - 2;
+ f.height = self->bounds.height - 2;
+
+ /* Border. */
+ grub_video_fill_rect (grub_gui_map_color (self->border_color),
+ f.x - 1, f.y - 1,
+ f.width + 2, f.height + 2);
+
+ /* Bar background. */
+ int barwidth = (f.width
+ * (self->value - self->start)
+ / (self->end - self->start));
+ grub_video_fill_rect (grub_gui_map_color (self->bg_color),
+ f.x + barwidth, f.y,
+ f.width - barwidth, f.height);
+
+ /* Bar foreground. */
+ grub_video_fill_rect (grub_gui_map_color (self->fg_color),
+ f.x, f.y,
+ barwidth, f.height);
+}
+
+static void
+draw_pixmap_bar (grub_gui_progress_bar_t self)
+{
+ grub_gfxmenu_box_t bar = self->bar_box;
+ grub_gfxmenu_box_t hl = self->highlight_box;
+ int w = self->bounds.width;
+ int h = self->bounds.height;
+ int bar_l_pad = bar->get_left_pad (bar);
+ int bar_r_pad = bar->get_right_pad (bar);
+ int bar_t_pad = bar->get_top_pad (bar);
+ int bar_b_pad = bar->get_bottom_pad (bar);
+ int bar_h_pad = bar_l_pad + bar_r_pad;
+ int bar_v_pad = bar_t_pad + bar_b_pad;
+ int tracklen = w - bar_h_pad;
+ int trackheight = h - bar_v_pad;
+ int barwidth;
+
+ bar->set_content_size (bar, tracklen, trackheight);
+
+ barwidth = (tracklen * (self->value - self->start)
+ / (self->end - self->start));
+
+ hl->set_content_size (hl, barwidth, h - bar_v_pad);
+
+ bar->draw (bar, 0, 0);
+ hl->draw (hl, bar_l_pad, bar_t_pad);
+}
+
+static void
+draw_text (grub_gui_progress_bar_t self)
+{
+ if (self->template)
+ {
+ grub_font_t font = self->font;
+ grub_video_color_t text_color = grub_gui_map_color (self->text_color);
+ int width = self->bounds.width;
+ int height = self->bounds.height;
+ char *text;
+ text = grub_xasprintf (self->template,
+ self->value > 0 ? self->value : -self->value);
+ if (!text)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+ /* Center the text. */
+ int text_width = grub_font_get_string_width (font, text);
+ int x = (width - text_width) / 2;
+ int y = ((height - grub_font_get_descent (font)) / 2
+ + grub_font_get_ascent (font) / 2);
+ grub_font_draw_string (text, font, text_color, x, y);
+ }
+}
+
+static void
+progress_bar_paint (void *vself, const grub_video_rect_t *region)
+{
+ grub_gui_progress_bar_t self = vself;
+ grub_video_rect_t vpsave;
+
+ if (! self->visible)
+ return;
+ if (!grub_video_have_common_points (region, &self->bounds))
+ return;
+
+ if (self->end == self->start)
+ return;
+
+ grub_gui_set_viewport (&self->bounds, &vpsave);
+
+ if (check_pixmaps (self))
+ draw_pixmap_bar (self);
+ else
+ draw_filled_rect_bar (self);
+
+ draw_text (self);
+
+ grub_gui_restore_viewport (&vpsave);
+}
+
+static void
+progress_bar_set_parent (void *vself, grub_gui_container_t parent)
+{
+ grub_gui_progress_bar_t self = vself;
+ self->parent = parent;
+}
+
+static grub_gui_container_t
+progress_bar_get_parent (void *vself)
+{
+ grub_gui_progress_bar_t self = vself;
+ return self->parent;
+}
+
+static void
+progress_bar_set_bounds (void *vself, const grub_video_rect_t *bounds)
+{
+ grub_gui_progress_bar_t self = vself;
+ self->bounds = *bounds;
+}
+
+static void
+progress_bar_get_bounds (void *vself, grub_video_rect_t *bounds)
+{
+ grub_gui_progress_bar_t self = vself;
+ *bounds = self->bounds;
+}
+
+static void
+progress_bar_get_minimal_size (void *vself,
+ unsigned *width, unsigned *height)
+{
+ unsigned text_width = 0, text_height = 0;
+ grub_gui_progress_bar_t self = vself;
+
+ if (self->template)
+ {
+ text_width = grub_font_get_string_width (self->font, self->template);
+ text_width += grub_font_get_string_width (self->font, "XXXXXXXXXX");
+ text_height = grub_font_get_descent (self->font)
+ + grub_font_get_ascent (self->font);
+ }
+ *width = 200;
+ if (*width < text_width)
+ *width = text_width;
+ *height = 28;
+ if (*height < text_height)
+ *height = text_height;
+}
+
+static void
+progress_bar_set_state (void *vself, int visible, int start,
+ int current, int end)
+{
+ grub_gui_progress_bar_t self = vself;
+ self->visible = visible;
+ self->start = start;
+ self->value = current;
+ self->end = end;
+}
+
+static grub_err_t
+progress_bar_set_property (void *vself, const char *name, const char *value)
+{
+ grub_gui_progress_bar_t self = vself;
+ if (grub_strcmp (name, "text") == 0)
+ {
+ grub_free (self->template);
+ if (grub_strcmp (value, "@TIMEOUT_NOTIFICATION_LONG@") == 0)
+ value
+ = _("The highlighted entry will be executed automatically in %ds.");
+ else if (grub_strcmp (value, "@TIMEOUT_NOTIFICATION_MIDDLE@") == 0)
+ /* TRANSLATORS: 's' stands for seconds.
+ It's a standalone timeout notification.
+ Please use the short form in your language. */
+ value = _("%ds remaining.");
+ else if (grub_strcmp (value, "@TIMEOUT_NOTIFICATION_SHORT@") == 0)
+ /* TRANSLATORS: 's' stands for seconds.
+ It's a standalone timeout notification.
+ Please use the shortest form available in you language. */
+ value = _("%ds");
+
+ self->template = grub_strdup (value);
+ }
+ else if (grub_strcmp (name, "font") == 0)
+ {
+ self->font = grub_font_get (value);
+ }
+ else if (grub_strcmp (name, "text_color") == 0)
+ {
+ grub_gui_parse_color (value, &self->text_color);
+ }
+ else if (grub_strcmp (name, "border_color") == 0)
+ {
+ grub_gui_parse_color (value, &self->border_color);
+ }
+ else if (grub_strcmp (name, "bg_color") == 0)
+ {
+ grub_gui_parse_color (value, &self->bg_color);
+ }
+ else if (grub_strcmp (name, "fg_color") == 0)
+ {
+ grub_gui_parse_color (value, &self->fg_color);
+ }
+ else if (grub_strcmp (name, "bar_style") == 0)
+ {
+ self->need_to_recreate_pixmaps = 1;
+ self->pixmapbar_available = 1;
+ grub_free (self->bar_pattern);
+ self->bar_pattern = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "highlight_style") == 0)
+ {
+ self->need_to_recreate_pixmaps = 1;
+ self->pixmapbar_available = 1;
+ grub_free (self->highlight_pattern);
+ self->highlight_pattern = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "theme_dir") == 0)
+ {
+ self->need_to_recreate_pixmaps = 1;
+ grub_free (self->theme_dir);
+ self->theme_dir = value ? grub_strdup (value) : 0;
+ }
+ else if (grub_strcmp (name, "id") == 0)
+ {
+ grub_gfxmenu_timeout_unregister ((grub_gui_component_t) self);
+ grub_free (self->id);
+ if (value)
+ self->id = grub_strdup (value);
+ else
+ self->id = 0;
+ /* if (self->id && grub_strcmp (self->id, GRUB_GFXMENU_TIMEOUT_COMPONENT_ID)
+ == 0)*/
+ grub_gfxmenu_timeout_register ((grub_gui_component_t) self,
+ progress_bar_set_state);
+ }
+ return grub_errno;
+}
+
+static struct grub_gui_component_ops progress_bar_ops =
+{
+ .destroy = progress_bar_destroy,
+ .get_id = progress_bar_get_id,
+ .is_instance = progress_bar_is_instance,
+ .paint = progress_bar_paint,
+ .set_parent = progress_bar_set_parent,
+ .get_parent = progress_bar_get_parent,
+ .set_bounds = progress_bar_set_bounds,
+ .get_bounds = progress_bar_get_bounds,
+ .get_minimal_size = progress_bar_get_minimal_size,
+ .set_property = progress_bar_set_property
+};
+
+static struct grub_gui_progress_ops progress_bar_pb_ops =
+ {
+ .set_state = progress_bar_set_state
+ };
+
+grub_gui_component_t
+grub_gui_progress_bar_new (void)
+{
+ grub_gui_progress_bar_t self;
+ self = grub_zalloc (sizeof (*self));
+ if (! self)
+ return 0;
+
+ self->progress.ops = &progress_bar_pb_ops;
+ self->progress.component.ops = &progress_bar_ops;
+ self->visible = 1;
+ self->font = grub_font_get ("Unknown Regular 16");
+ grub_gui_color_t black = { .red = 0, .green = 0, .blue = 0, .alpha = 255 };
+ grub_gui_color_t gray = { .red = 128, .green = 128, .blue = 128, .alpha = 255 };
+ grub_gui_color_t lightgray = { .red = 200, .green = 200, .blue = 200, .alpha = 255 };
+ self->text_color = black;
+ self->border_color = black;
+ self->bg_color = gray;
+ self->fg_color = lightgray;
+
+ return (grub_gui_component_t) self;
+}
diff --git a/grub-core/gfxmenu/gui_string_util.c b/grub-core/gfxmenu/gui_string_util.c
new file mode 100644
index 0000000..8c51e39
--- /dev/null
+++ b/grub-core/gfxmenu/gui_string_util.c
@@ -0,0 +1,327 @@
+/* gui_string_util.c - String utilities used by the GUI system. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/gui_string_util.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+
+/* Create a new NUL-terminated string on the heap as a substring of BUF.
+ The range of buf included is the half-open interval [START,END).
+ The index START is inclusive, END is exclusive. */
+char *
+grub_new_substring (const char *buf,
+ grub_size_t start, grub_size_t end)
+{
+ if (end < start)
+ return 0;
+ grub_size_t len = end - start;
+ char *s = grub_malloc (len + 1);
+ if (! s)
+ return 0;
+ grub_memcpy (s, buf + start, len);
+ s[len] = '\0';
+ return s;
+}
+
+/* Eliminate "." and ".." path elements from PATH. A new heap-allocated
+ string is returned. */
+static char *
+canonicalize_path (const char *path)
+{
+ int i;
+ const char *p;
+ char *newpath = 0;
+
+ /* Count the path components in path. */
+ int components = 1;
+ for (p = path; *p; p++)
+ if (*p == '/')
+ components++;
+
+ char **path_array = grub_malloc (components * sizeof (*path_array));
+ if (! path_array)
+ return 0;
+
+ /* Initialize array elements to NULL pointers; in case once of the
+ allocations fails, the cleanup code can just call grub_free() for all
+ pointers in the array. */
+ for (i = 0; i < components; i++)
+ path_array[i] = 0;
+
+ /* Parse the path into path_array. */
+ p = path;
+ for (i = 0; i < components && p; i++)
+ {
+ /* Find the end of the path element. */
+ const char *end = grub_strchr (p, '/');
+ if (!end)
+ end = p + grub_strlen (p);
+
+ /* Copy the element. */
+ path_array[i] = grub_new_substring (p, 0, end - p);
+ if (! path_array[i])
+ goto cleanup;
+
+ /* Advance p to point to the start of the next element, or NULL. */
+ if (*end)
+ p = end + 1;
+ else
+ p = 0;
+ }
+
+ /* Eliminate '.' and '..' elements from the path array. */
+ int newpath_length = 0;
+ for (i = components - 1; i >= 0; --i)
+ {
+ if (! grub_strcmp (path_array[i], "."))
+ {
+ grub_free (path_array[i]);
+ path_array[i] = 0;
+ }
+ else if (! grub_strcmp (path_array[i], "..")
+ && i > 0)
+ {
+ /* Delete the '..' and the prior path element. */
+ grub_free (path_array[i]);
+ path_array[i] = 0;
+ --i;
+ grub_free (path_array[i]);
+ path_array[i] = 0;
+ }
+ else
+ {
+ newpath_length += grub_strlen (path_array[i]) + 1;
+ }
+ }
+
+ /* Construct a new path string. */
+ newpath = grub_malloc (newpath_length + 1);
+ if (! newpath)
+ goto cleanup;
+
+ newpath[0] = '\0';
+ char *newpath_end = newpath;
+ int first = 1;
+ for (i = 0; i < components; i++)
+ {
+ char *element = path_array[i];
+ if (element)
+ {
+ /* For all components but the first, prefix with a slash. */
+ if (! first)
+ newpath_end = grub_stpcpy (newpath_end, "/");
+ newpath_end = grub_stpcpy (newpath_end, element);
+ first = 0;
+ }
+ }
+
+cleanup:
+ for (i = 0; i < components; i++)
+ grub_free (path_array[i]);
+ grub_free (path_array);
+
+ return newpath;
+}
+
+/* Return a new heap-allocated string representing to absolute path
+ to the file referred to by PATH. If PATH is an absolute path, then
+ the returned path is a copy of PATH. If PATH is a relative path, then
+ BASE is with PATH used to construct the absolute path. */
+char *
+grub_resolve_relative_path (const char *base, const char *path)
+{
+ char *abspath;
+ char *canonpath;
+ char *p;
+ grub_size_t l;
+
+ /* If PATH is an absolute path, then just use it as is. */
+ if (path[0] == '/' || path[0] == '(')
+ return canonicalize_path (path);
+
+ abspath = grub_malloc (grub_strlen (base) + grub_strlen (path) + 3);
+ if (! abspath)
+ return 0;
+
+ /* Concatenate BASE and PATH. */
+ p = grub_stpcpy (abspath, base);
+ l = grub_strlen (abspath);
+ if (l == 0 || abspath[l-1] != '/')
+ {
+ *p = '/';
+ p++;
+ *p = 0;
+ }
+ grub_stpcpy (p, path);
+
+ canonpath = canonicalize_path (abspath);
+ if (! canonpath)
+ return abspath;
+
+ grub_free (abspath);
+ return canonpath;
+}
+
+/* Get the path of the directory where the file at FILE_PATH is located.
+ FILE_PATH should refer to a file, not a directory. The returned path
+ includes a trailing slash.
+ This does not handle GRUB "(hd0,0)" paths properly yet since it only
+ looks at slashes. */
+char *
+grub_get_dirname (const char *file_path)
+{
+ int i;
+ int last_slash;
+
+ last_slash = -1;
+ for (i = grub_strlen (file_path) - 1; i >= 0; --i)
+ {
+ if (file_path[i] == '/')
+ {
+ last_slash = i;
+ break;
+ }
+ }
+ if (last_slash == -1)
+ return grub_strdup ("/");
+
+ return grub_new_substring (file_path, 0, last_slash + 1);
+}
+
+static __inline int
+my_isxdigit (char c)
+{
+ return ((c >= '0' && c <= '9')
+ || (c >= 'a' && c <= 'f')
+ || (c >= 'A' && c <= 'F'));
+}
+
+static int
+parse_hex_color_component (const char *s, unsigned start, unsigned end)
+{
+ unsigned len;
+ char buf[3];
+
+ len = end - start;
+ /* Check the limits so we don't overrun the buffer. */
+ if (len < 1 || len > 2)
+ return 0;
+
+ if (len == 1)
+ {
+ buf[0] = s[start]; /* Get the first and only hex digit. */
+ buf[1] = buf[0]; /* Duplicate the hex digit. */
+ }
+ else if (len == 2)
+ {
+ buf[0] = s[start];
+ buf[1] = s[start + 1];
+ }
+
+ buf[2] = '\0';
+
+ return grub_strtoul (buf, 0, 16);
+}
+
+/* Parse a color string of the form "r, g, b", "#RGB", "#RGBA",
+ "#RRGGBB", or "#RRGGBBAA". */
+grub_err_t
+grub_gui_parse_color (const char *s, grub_gui_color_t *color)
+{
+ grub_gui_color_t c;
+
+ /* Skip whitespace. */
+ while (*s && grub_isspace (*s))
+ s++;
+
+ if (*s == '#')
+ {
+ /* HTML-style. Number if hex digits:
+ [6] #RRGGBB [3] #RGB
+ [8] #RRGGBBAA [4] #RGBA */
+
+ s++; /* Skip the '#'. */
+ /* Count the hexits to determine the format. */
+ int hexits = 0;
+ const char *end = s;
+ while (my_isxdigit (*end))
+ {
+ end++;
+ hexits++;
+ }
+
+ /* Parse the color components based on the format. */
+ if (hexits == 3 || hexits == 4)
+ {
+ c.red = parse_hex_color_component (s, 0, 1);
+ c.green = parse_hex_color_component (s, 1, 2);
+ c.blue = parse_hex_color_component (s, 2, 3);
+ if (hexits == 4)
+ c.alpha = parse_hex_color_component (s, 3, 4);
+ else
+ c.alpha = 255;
+ }
+ else if (hexits == 6 || hexits == 8)
+ {
+ c.red = parse_hex_color_component (s, 0, 2);
+ c.green = parse_hex_color_component (s, 2, 4);
+ c.blue = parse_hex_color_component (s, 4, 6);
+ if (hexits == 8)
+ c.alpha = parse_hex_color_component (s, 6, 8);
+ else
+ c.alpha = 255;
+ }
+ else
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "invalid HTML-type color string `%s'", s);
+ }
+ else if (grub_isdigit (*s))
+ {
+ /* Comma separated decimal values. */
+ c.red = grub_strtoul (s, 0, 0);
+ if ((s = grub_strchr (s, ',')) == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "missing 1st comma separator in color `%s'", s);
+ s++;
+ c.green = grub_strtoul (s, 0, 0);
+ if ((s = grub_strchr (s, ',')) == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "missing 2nd comma separator in color `%s'", s);
+ s++;
+ c.blue = grub_strtoul (s, 0, 0);
+ if ((s = grub_strchr (s, ',')) == 0)
+ c.alpha = 255;
+ else
+ {
+ s++;
+ c.alpha = grub_strtoul (s, 0, 0);
+ }
+ }
+ else
+ {
+ if (! grub_gui_get_named_color (s, &c))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "invalid named color `%s'", s);
+ }
+
+ if (grub_errno == GRUB_ERR_NONE)
+ *color = c;
+ return grub_errno;
+}
diff --git a/grub-core/gfxmenu/gui_util.c b/grub-core/gfxmenu/gui_util.c
new file mode 100644
index 0000000..eba7bb3
--- /dev/null
+++ b/grub-core/gfxmenu/gui_util.c
@@ -0,0 +1,101 @@
+/* gui_util.c - GUI utility functions. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/gui.h>
+#include <grub/gui_string_util.h>
+
+
+struct find_by_id_state
+{
+ const char *match_id;
+ grub_gui_component_callback match_callback;
+ void *match_userdata;
+};
+
+static void
+find_by_id_recursively (grub_gui_component_t component, void *userdata)
+{
+ struct find_by_id_state *state;
+ const char *id;
+
+ state = (struct find_by_id_state *) userdata;
+ id = component->ops->get_id (component);
+ if (id && grub_strcmp (id, state->match_id) == 0)
+ state->match_callback (component, state->match_userdata);
+
+ if (component->ops->is_instance (component, "container"))
+ {
+ grub_gui_container_t container;
+ container = (grub_gui_container_t) component;
+ container->ops->iterate_children (container,
+ find_by_id_recursively,
+ state);
+ }
+}
+
+void
+grub_gui_find_by_id (grub_gui_component_t root,
+ const char *id,
+ grub_gui_component_callback cb,
+ void *userdata)
+{
+ struct find_by_id_state state;
+ state.match_id = id;
+ state.match_callback = cb;
+ state.match_userdata = userdata;
+ find_by_id_recursively (root, &state);
+}
+
+
+struct iterate_recursively_state
+{
+ grub_gui_component_callback callback;
+ void *userdata;
+};
+
+static
+void iterate_recursively_cb (grub_gui_component_t component, void *userdata)
+{
+ struct iterate_recursively_state *state;
+
+ state = (struct iterate_recursively_state *) userdata;
+ state->callback (component, state->userdata);
+
+ if (component->ops->is_instance (component, "container"))
+ {
+ grub_gui_container_t container;
+ container = (grub_gui_container_t) component;
+ container->ops->iterate_children (container,
+ iterate_recursively_cb,
+ state);
+ }
+}
+
+void
+grub_gui_iterate_recursively (grub_gui_component_t root,
+ grub_gui_component_callback cb,
+ void *userdata)
+{
+ struct iterate_recursively_state state;
+ state.callback = cb;
+ state.userdata = userdata;
+ iterate_recursively_cb (root, &state);
+}
diff --git a/grub-core/gfxmenu/icon_manager.c b/grub-core/gfxmenu/icon_manager.c
new file mode 100644
index 0000000..6990d05
--- /dev/null
+++ b/grub-core/gfxmenu/icon_manager.c
@@ -0,0 +1,263 @@
+/* icon_manager.c - gfxmenu icon manager. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/gui_string_util.h>
+#include <grub/bitmap.h>
+#include <grub/bitmap_scale.h>
+#include <grub/menu.h>
+#include <grub/icon_manager.h>
+#include <grub/env.h>
+
+/* Currently hard coded to '.png' extension. */
+static const char icon_extension[] = ".png";
+
+typedef struct icon_entry
+{
+ char *class_name;
+ struct grub_video_bitmap *bitmap;
+ struct icon_entry *next;
+} *icon_entry_t;
+
+struct grub_gfxmenu_icon_manager
+{
+ char *theme_path;
+ int icon_width;
+ int icon_height;
+
+ /* Icon cache: linked list w/ dummy head node. */
+ struct icon_entry cache;
+};
+
+
+/* Create a new icon manager and return a point to it. */
+grub_gfxmenu_icon_manager_t
+grub_gfxmenu_icon_manager_new (void)
+{
+ grub_gfxmenu_icon_manager_t mgr;
+ mgr = grub_malloc (sizeof (*mgr));
+ if (! mgr)
+ return 0;
+
+ mgr->theme_path = 0;
+ mgr->icon_width = 0;
+ mgr->icon_height = 0;
+
+ /* Initialize the dummy head node. */
+ mgr->cache.class_name = 0;
+ mgr->cache.bitmap = 0;
+ mgr->cache.next = 0;
+
+ return mgr;
+}
+
+/* Destroy the icon manager MGR, freeing all resources used by it.
+
+Note: Any bitmaps returned by grub_gfxmenu_icon_manager_get_icon()
+are destroyed and must not be used by the caller after this function
+is called. */
+void
+grub_gfxmenu_icon_manager_destroy (grub_gfxmenu_icon_manager_t mgr)
+{
+ grub_gfxmenu_icon_manager_clear_cache (mgr);
+ grub_free (mgr->theme_path);
+ grub_free (mgr);
+}
+
+/* Clear the icon cache. */
+void
+grub_gfxmenu_icon_manager_clear_cache (grub_gfxmenu_icon_manager_t mgr)
+{
+ icon_entry_t cur;
+ icon_entry_t next;
+ for (cur = mgr->cache.next; cur; cur = next)
+ {
+ next = cur->next;
+ grub_free (cur->class_name);
+ grub_video_bitmap_destroy (cur->bitmap);
+ grub_free (cur);
+ }
+ mgr->cache.next = 0;
+}
+
+/* Set the theme path. If the theme path is changed, the icon cache
+ is cleared. */
+void
+grub_gfxmenu_icon_manager_set_theme_path (grub_gfxmenu_icon_manager_t mgr,
+ const char *path)
+{
+ /* Clear the cache if the theme path has changed. */
+ if (((mgr->theme_path == 0) != (path == 0))
+ || (grub_strcmp (mgr->theme_path, path) != 0))
+ grub_gfxmenu_icon_manager_clear_cache (mgr);
+
+ grub_free (mgr->theme_path);
+ mgr->theme_path = path ? grub_strdup (path) : 0;
+}
+
+/* Set the icon size. When icons are requested from the icon manager,
+ they are scaled to this size before being returned. If the size is
+ changed, the icon cache is cleared. */
+void
+grub_gfxmenu_icon_manager_set_icon_size (grub_gfxmenu_icon_manager_t mgr,
+ int width, int height)
+{
+ /* If the width or height is changed, we must clear the cache, since the
+ scaled bitmaps are stored in the cache. */
+ if (width != mgr->icon_width || height != mgr->icon_height)
+ grub_gfxmenu_icon_manager_clear_cache (mgr);
+
+ mgr->icon_width = width;
+ mgr->icon_height = height;
+}
+
+/* Try to load an icon for the specified CLASS_NAME in the directory DIR.
+ Returns 0 if the icon could not be loaded, or returns a pointer to a new
+ bitmap if it was successful. */
+static struct grub_video_bitmap *
+try_loading_icon (grub_gfxmenu_icon_manager_t mgr,
+ const char *dir, const char *class_name)
+{
+ char *path;
+ int l;
+
+ path = grub_malloc (grub_strlen (dir) + grub_strlen (class_name)
+ + grub_strlen (icon_extension) + 3);
+ if (! path)
+ return 0;
+
+ grub_strcpy (path, dir);
+ l = grub_strlen (path);
+ if (path[l-1] != '/')
+ {
+ path[l] = '/';
+ path[l+1] = 0;
+ }
+ grub_strcat (path, class_name);
+ grub_strcat (path, icon_extension);
+
+ struct grub_video_bitmap *raw_bitmap;
+ grub_video_bitmap_load (&raw_bitmap, path);
+ grub_free (path);
+ grub_errno = GRUB_ERR_NONE; /* Critical to clear the error!! */
+ if (! raw_bitmap)
+ return 0;
+
+ struct grub_video_bitmap *scaled_bitmap;
+ grub_video_bitmap_create_scaled (&scaled_bitmap,
+ mgr->icon_width, mgr->icon_height,
+ raw_bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ grub_video_bitmap_destroy (raw_bitmap);
+ if (! scaled_bitmap)
+ {
+ grub_error_push ();
+ grub_error (grub_errno, "failed to scale icon");
+ return 0;
+ }
+
+ return scaled_bitmap;
+}
+
+/* Get the icon for the specified class CLASS_NAME. If an icon for
+ CLASS_NAME already exists in the cache, then a reference to the cached
+ bitmap is returned. If it is not cached, then it is loaded and cached.
+ If no icon could be could for CLASS_NAME, then 0 is returned. */
+static struct grub_video_bitmap *
+get_icon_by_class (grub_gfxmenu_icon_manager_t mgr, const char *class_name)
+{
+ /* First check the icon cache. */
+ icon_entry_t entry;
+ for (entry = mgr->cache.next; entry; entry = entry->next)
+ {
+ if (grub_strcmp (entry->class_name, class_name) == 0)
+ return entry->bitmap;
+ }
+
+ if (! mgr->theme_path)
+ return 0;
+
+ /* Otherwise, we search for an icon to load. */
+ char *theme_dir = grub_get_dirname (mgr->theme_path);
+ char *icons_dir;
+ struct grub_video_bitmap *icon;
+ icon = 0;
+ /* First try the theme's own icons, from "grub/themes/NAME/icons/" */
+ icons_dir = grub_resolve_relative_path (theme_dir, "icons/");
+ if (icons_dir)
+ {
+ icon = try_loading_icon (mgr, icons_dir, class_name);
+ grub_free (icons_dir);
+ }
+
+ grub_free (theme_dir);
+ if (! icon)
+ {
+ const char *icondir;
+
+ icondir = grub_env_get ("icondir");
+ if (icondir)
+ icon = try_loading_icon (mgr, icondir, class_name);
+ }
+
+ /* No icon was found. */
+ /* This should probably be noted in the cache, so that a search is not
+ performed each time an icon for CLASS_NAME is requested. */
+ if (! icon)
+ return 0;
+
+ /* Insert a new cache entry for this icon. */
+ entry = grub_malloc (sizeof (*entry));
+ if (! entry)
+ {
+ grub_video_bitmap_destroy (icon);
+ return 0;
+ }
+ entry->class_name = grub_strdup (class_name);
+ entry->bitmap = icon;
+ entry->next = mgr->cache.next;
+ mgr->cache.next = entry; /* Link it into the cache. */
+ return entry->bitmap;
+}
+
+/* Get the best available icon for ENTRY. Beginning with the first class
+ listed in the menu entry and proceeding forward, an icon for each class
+ is searched for. The first icon found is returned. The returned icon
+ is scaled to the size specified by
+ grub_gfxmenu_icon_manager_set_icon_size().
+
+ Note: Bitmaps returned by this function are destroyed when the
+ icon manager is destroyed.
+ */
+struct grub_video_bitmap *
+grub_gfxmenu_icon_manager_get_icon (grub_gfxmenu_icon_manager_t mgr,
+ grub_menu_entry_t entry)
+{
+ struct grub_menu_entry_class *c;
+ struct grub_video_bitmap *icon;
+
+ /* Try each class in succession. */
+ icon = 0;
+ for (c = entry->classes; c && ! icon; c = c->next)
+ icon = get_icon_by_class (mgr, c->name);
+ return icon;
+}
diff --git a/grub-core/gfxmenu/model.c b/grub-core/gfxmenu/model.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/grub-core/gfxmenu/model.c
diff --git a/grub-core/gfxmenu/named_colors.c b/grub-core/gfxmenu/named_colors.c
new file mode 100644
index 0000000..eedbc47
--- /dev/null
+++ b/grub-core/gfxmenu/named_colors.c
@@ -0,0 +1,209 @@
+/* named_colors.c - Named color values. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/gui.h>
+#include <grub/gui_string_util.h>
+#include <grub/misc.h>
+
+struct named_color
+{
+ const char *name;
+ grub_gui_color_t color;
+};
+
+/*
+ Named color list generated from the list of SVG color keywords from
+ <http://www.w3.org/TR/css3-color/#svg-color>,
+ processed through the following Perl command:
+ perl -ne 'chomp;split;print "{ \"$_[0]\", RGB_COLOR($_[2]) },\n"'
+ */
+
+#define RGB_COLOR(r,g,b) {.red = r, .green = g, .blue = b, .alpha = 255}
+
+static struct named_color named_colors[] =
+{
+ { "aliceblue", RGB_COLOR(240,248,255) },
+ { "antiquewhite", RGB_COLOR(250,235,215) },
+ { "aqua", RGB_COLOR(0,255,255) },
+ { "aquamarine", RGB_COLOR(127,255,212) },
+ { "azure", RGB_COLOR(240,255,255) },
+ { "beige", RGB_COLOR(245,245,220) },
+ { "bisque", RGB_COLOR(255,228,196) },
+ { "black", RGB_COLOR(0,0,0) },
+ { "blanchedalmond", RGB_COLOR(255,235,205) },
+ { "blue", RGB_COLOR(0,0,255) },
+ { "blueviolet", RGB_COLOR(138,43,226) },
+ { "brown", RGB_COLOR(165,42,42) },
+ { "burlywood", RGB_COLOR(222,184,135) },
+ { "cadetblue", RGB_COLOR(95,158,160) },
+ { "chartreuse", RGB_COLOR(127,255,0) },
+ { "chocolate", RGB_COLOR(210,105,30) },
+ { "coral", RGB_COLOR(255,127,80) },
+ { "cornflowerblue", RGB_COLOR(100,149,237) },
+ { "cornsilk", RGB_COLOR(255,248,220) },
+ { "crimson", RGB_COLOR(220,20,60) },
+ { "cyan", RGB_COLOR(0,255,255) },
+ { "darkblue", RGB_COLOR(0,0,139) },
+ { "darkcyan", RGB_COLOR(0,139,139) },
+ { "darkgoldenrod", RGB_COLOR(184,134,11) },
+ { "darkgray", RGB_COLOR(169,169,169) },
+ { "darkgreen", RGB_COLOR(0,100,0) },
+ { "darkgrey", RGB_COLOR(169,169,169) },
+ { "darkkhaki", RGB_COLOR(189,183,107) },
+ { "darkmagenta", RGB_COLOR(139,0,139) },
+ { "darkolivegreen", RGB_COLOR(85,107,47) },
+ { "darkorange", RGB_COLOR(255,140,0) },
+ { "darkorchid", RGB_COLOR(153,50,204) },
+ { "darkred", RGB_COLOR(139,0,0) },
+ { "darksalmon", RGB_COLOR(233,150,122) },
+ { "darkseagreen", RGB_COLOR(143,188,143) },
+ { "darkslateblue", RGB_COLOR(72,61,139) },
+ { "darkslategray", RGB_COLOR(47,79,79) },
+ { "darkslategrey", RGB_COLOR(47,79,79) },
+ { "darkturquoise", RGB_COLOR(0,206,209) },
+ { "darkviolet", RGB_COLOR(148,0,211) },
+ { "deeppink", RGB_COLOR(255,20,147) },
+ { "deepskyblue", RGB_COLOR(0,191,255) },
+ { "dimgray", RGB_COLOR(105,105,105) },
+ { "dimgrey", RGB_COLOR(105,105,105) },
+ { "dodgerblue", RGB_COLOR(30,144,255) },
+ { "firebrick", RGB_COLOR(178,34,34) },
+ { "floralwhite", RGB_COLOR(255,250,240) },
+ { "forestgreen", RGB_COLOR(34,139,34) },
+ { "fuchsia", RGB_COLOR(255,0,255) },
+ { "gainsboro", RGB_COLOR(220,220,220) },
+ { "ghostwhite", RGB_COLOR(248,248,255) },
+ { "gold", RGB_COLOR(255,215,0) },
+ { "goldenrod", RGB_COLOR(218,165,32) },
+ { "gray", RGB_COLOR(128,128,128) },
+ { "green", RGB_COLOR(0,128,0) },
+ { "greenyellow", RGB_COLOR(173,255,47) },
+ { "grey", RGB_COLOR(128,128,128) },
+ { "honeydew", RGB_COLOR(240,255,240) },
+ { "hotpink", RGB_COLOR(255,105,180) },
+ { "indianred", RGB_COLOR(205,92,92) },
+ { "indigo", RGB_COLOR(75,0,130) },
+ { "ivory", RGB_COLOR(255,255,240) },
+ { "khaki", RGB_COLOR(240,230,140) },
+ { "lavender", RGB_COLOR(230,230,250) },
+ { "lavenderblush", RGB_COLOR(255,240,245) },
+ { "lawngreen", RGB_COLOR(124,252,0) },
+ { "lemonchiffon", RGB_COLOR(255,250,205) },
+ { "lightblue", RGB_COLOR(173,216,230) },
+ { "lightcoral", RGB_COLOR(240,128,128) },
+ { "lightcyan", RGB_COLOR(224,255,255) },
+ { "lightgoldenrodyellow", RGB_COLOR(250,250,210) },
+ { "lightgray", RGB_COLOR(211,211,211) },
+ { "lightgreen", RGB_COLOR(144,238,144) },
+ { "lightgrey", RGB_COLOR(211,211,211) },
+ { "lightpink", RGB_COLOR(255,182,193) },
+ { "lightsalmon", RGB_COLOR(255,160,122) },
+ { "lightseagreen", RGB_COLOR(32,178,170) },
+ { "lightskyblue", RGB_COLOR(135,206,250) },
+ { "lightslategray", RGB_COLOR(119,136,153) },
+ { "lightslategrey", RGB_COLOR(119,136,153) },
+ { "lightsteelblue", RGB_COLOR(176,196,222) },
+ { "lightyellow", RGB_COLOR(255,255,224) },
+ { "lime", RGB_COLOR(0,255,0) },
+ { "limegreen", RGB_COLOR(50,205,50) },
+ { "linen", RGB_COLOR(250,240,230) },
+ { "magenta", RGB_COLOR(255,0,255) },
+ { "maroon", RGB_COLOR(128,0,0) },
+ { "mediumaquamarine", RGB_COLOR(102,205,170) },
+ { "mediumblue", RGB_COLOR(0,0,205) },
+ { "mediumorchid", RGB_COLOR(186,85,211) },
+ { "mediumpurple", RGB_COLOR(147,112,219) },
+ { "mediumseagreen", RGB_COLOR(60,179,113) },
+ { "mediumslateblue", RGB_COLOR(123,104,238) },
+ { "mediumspringgreen", RGB_COLOR(0,250,154) },
+ { "mediumturquoise", RGB_COLOR(72,209,204) },
+ { "mediumvioletred", RGB_COLOR(199,21,133) },
+ { "midnightblue", RGB_COLOR(25,25,112) },
+ { "mintcream", RGB_COLOR(245,255,250) },
+ { "mistyrose", RGB_COLOR(255,228,225) },
+ { "moccasin", RGB_COLOR(255,228,181) },
+ { "navajowhite", RGB_COLOR(255,222,173) },
+ { "navy", RGB_COLOR(0,0,128) },
+ { "oldlace", RGB_COLOR(253,245,230) },
+ { "olive", RGB_COLOR(128,128,0) },
+ { "olivedrab", RGB_COLOR(107,142,35) },
+ { "orange", RGB_COLOR(255,165,0) },
+ { "orangered", RGB_COLOR(255,69,0) },
+ { "orchid", RGB_COLOR(218,112,214) },
+ { "palegoldenrod", RGB_COLOR(238,232,170) },
+ { "palegreen", RGB_COLOR(152,251,152) },
+ { "paleturquoise", RGB_COLOR(175,238,238) },
+ { "palevioletred", RGB_COLOR(219,112,147) },
+ { "papayawhip", RGB_COLOR(255,239,213) },
+ { "peachpuff", RGB_COLOR(255,218,185) },
+ { "peru", RGB_COLOR(205,133,63) },
+ { "pink", RGB_COLOR(255,192,203) },
+ { "plum", RGB_COLOR(221,160,221) },
+ { "powderblue", RGB_COLOR(176,224,230) },
+ { "purple", RGB_COLOR(128,0,128) },
+ { "red", RGB_COLOR(255,0,0) },
+ { "rosybrown", RGB_COLOR(188,143,143) },
+ { "royalblue", RGB_COLOR(65,105,225) },
+ { "saddlebrown", RGB_COLOR(139,69,19) },
+ { "salmon", RGB_COLOR(250,128,114) },
+ { "sandybrown", RGB_COLOR(244,164,96) },
+ { "seagreen", RGB_COLOR(46,139,87) },
+ { "seashell", RGB_COLOR(255,245,238) },
+ { "sienna", RGB_COLOR(160,82,45) },
+ { "silver", RGB_COLOR(192,192,192) },
+ { "skyblue", RGB_COLOR(135,206,235) },
+ { "slateblue", RGB_COLOR(106,90,205) },
+ { "slategray", RGB_COLOR(112,128,144) },
+ { "slategrey", RGB_COLOR(112,128,144) },
+ { "snow", RGB_COLOR(255,250,250) },
+ { "springgreen", RGB_COLOR(0,255,127) },
+ { "steelblue", RGB_COLOR(70,130,180) },
+ { "tan", RGB_COLOR(210,180,140) },
+ { "teal", RGB_COLOR(0,128,128) },
+ { "thistle", RGB_COLOR(216,191,216) },
+ { "tomato", RGB_COLOR(255,99,71) },
+ { "turquoise", RGB_COLOR(64,224,208) },
+ { "violet", RGB_COLOR(238,130,238) },
+ { "wheat", RGB_COLOR(245,222,179) },
+ { "white", RGB_COLOR(255,255,255) },
+ { "whitesmoke", RGB_COLOR(245,245,245) },
+ { "yellow", RGB_COLOR(255,255,0) },
+ { "yellowgreen", RGB_COLOR(154,205,50) },
+ { 0, { 0, 0, 0, 0 } } /* Terminator. */
+};
+
+/* Get the color named NAME. If the color was found, returns 1 and
+ stores the color into *COLOR. If the color was not found, returns 0 and
+ does not modify *COLOR. */
+int
+grub_gui_get_named_color (const char *name,
+ grub_gui_color_t *color)
+{
+ int i;
+ for (i = 0; named_colors[i].name; i++)
+ {
+ if (grub_strcmp (named_colors[i].name, name) == 0)
+ {
+ *color = named_colors[i].color;
+ return 1;
+ }
+ }
+ return 0;
+}
diff --git a/grub-core/gfxmenu/theme_loader.c b/grub-core/gfxmenu/theme_loader.c
new file mode 100644
index 0000000..3854c6c
--- /dev/null
+++ b/grub-core/gfxmenu/theme_loader.c
@@ -0,0 +1,723 @@
+/* theme_loader.c - Theme file loader for gfxmenu. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/file.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/video.h>
+#include <grub/gui_string_util.h>
+#include <grub/bitmap.h>
+#include <grub/bitmap_scale.h>
+#include <grub/gfxwidgets.h>
+#include <grub/gfxmenu_view.h>
+#include <grub/gui.h>
+
+/* Construct a new box widget using ABSPATTERN to find the pixmap files for
+ it, storing the new box instance at *BOXPTR.
+ PATTERN should be of the form: "(hd0,0)/somewhere/style*.png".
+ The '*' then gets substituted with the various pixmap names that the
+ box uses. */
+static grub_err_t
+recreate_box_absolute (grub_gfxmenu_box_t *boxptr, const char *abspattern)
+{
+ char *prefix;
+ char *suffix;
+ char *star;
+ grub_gfxmenu_box_t box;
+
+ star = grub_strchr (abspattern, '*');
+ if (! star)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "missing `*' in box pixmap pattern `%s'", abspattern);
+
+ /* Prefix: Get the part before the '*'. */
+ prefix = grub_malloc (star - abspattern + 1);
+ if (! prefix)
+ return grub_errno;
+
+ grub_memcpy (prefix, abspattern, star - abspattern);
+ prefix[star - abspattern] = '\0';
+
+ /* Suffix: Everything after the '*' is the suffix. */
+ suffix = star + 1;
+
+ box = grub_gfxmenu_create_box (prefix, suffix);
+ grub_free (prefix);
+ if (! box)
+ return grub_errno;
+
+ if (*boxptr)
+ (*boxptr)->destroy (*boxptr);
+ *boxptr = box;
+ return grub_errno;
+}
+
+
+/* Construct a new box widget using PATTERN to find the pixmap files for it,
+ storing the new widget at *BOXPTR. PATTERN should be of the form:
+ "somewhere/style*.png". The '*' then gets substituted with the various
+ pixmap names that the widget uses.
+
+ Important! The value of *BOXPTR must be initialized! It must either
+ (1) Be 0 (a NULL pointer), or
+ (2) Be a pointer to a valid 'grub_gfxmenu_box_t' instance.
+ In this case, the previous instance is destroyed. */
+grub_err_t
+grub_gui_recreate_box (grub_gfxmenu_box_t *boxptr,
+ const char *pattern, const char *theme_dir)
+{
+ char *abspattern;
+
+ /* Check arguments. */
+ if (! pattern)
+ {
+ /* If no pixmap pattern is given, then just create an empty box. */
+ if (*boxptr)
+ (*boxptr)->destroy (*boxptr);
+ *boxptr = grub_gfxmenu_create_box (0, 0);
+ return grub_errno;
+ }
+
+ if (! theme_dir)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "styled box missing theme directory");
+
+ /* Resolve to an absolute path. */
+ abspattern = grub_resolve_relative_path (theme_dir, pattern);
+ if (! abspattern)
+ return grub_errno;
+
+ /* Create the box. */
+ recreate_box_absolute (boxptr, abspattern);
+ grub_free (abspattern);
+ return grub_errno;
+}
+
+/* Set the specified property NAME on the view to the given string VALUE.
+ The caller is responsible for the lifetimes of NAME and VALUE. */
+static grub_err_t
+theme_set_string (grub_gfxmenu_view_t view,
+ const char *name,
+ const char *value,
+ const char *theme_dir,
+ const char *filename,
+ int line_num,
+ int col_num)
+{
+ if (! grub_strcmp ("title-font", name))
+ view->title_font = grub_font_get (value);
+ else if (! grub_strcmp ("message-font", name))
+ view->message_font = grub_font_get (value);
+ else if (! grub_strcmp ("terminal-font", name))
+ {
+ grub_free (view->terminal_font_name);
+ view->terminal_font_name = grub_strdup (value);
+ if (! view->terminal_font_name)
+ return grub_errno;
+ }
+ else if (! grub_strcmp ("title-color", name))
+ grub_gui_parse_color (value, &view->title_color);
+ else if (! grub_strcmp ("message-color", name))
+ grub_gui_parse_color (value, &view->message_color);
+ else if (! grub_strcmp ("message-bg-color", name))
+ grub_gui_parse_color (value, &view->message_bg_color);
+ else if (! grub_strcmp ("desktop-image", name))
+ {
+ struct grub_video_bitmap *raw_bitmap;
+ struct grub_video_bitmap *scaled_bitmap;
+ char *path;
+ path = grub_resolve_relative_path (theme_dir, value);
+ if (! path)
+ return grub_errno;
+ if (grub_video_bitmap_load (&raw_bitmap, path) != GRUB_ERR_NONE)
+ {
+ grub_free (path);
+ return grub_errno;
+ }
+ grub_free(path);
+ grub_video_bitmap_create_scaled (&scaled_bitmap,
+ view->screen.width,
+ view->screen.height,
+ raw_bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ grub_video_bitmap_destroy (raw_bitmap);
+ if (! scaled_bitmap)
+ {
+ grub_error_push ();
+ return grub_error (grub_errno, "error scaling desktop image");
+ }
+
+ grub_video_bitmap_destroy (view->desktop_image);
+ view->desktop_image = scaled_bitmap;
+ }
+ else if (! grub_strcmp ("desktop-color", name))
+ grub_gui_parse_color (value, &view->desktop_color);
+ else if (! grub_strcmp ("terminal-box", name))
+ {
+ grub_err_t err;
+ err = grub_gui_recreate_box (&view->terminal_box, value, theme_dir);
+ if (err != GRUB_ERR_NONE)
+ return err;
+ }
+ else if (! grub_strcmp ("title-text", name))
+ {
+ grub_free (view->title_text);
+ view->title_text = grub_strdup (value);
+ if (! view->title_text)
+ return grub_errno;
+ }
+ else
+ {
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "%s:%d:%d unknown property `%s'",
+ filename, line_num, col_num, name);
+ }
+ return grub_errno;
+}
+
+struct parsebuf
+{
+ char *buf;
+ int pos;
+ int len;
+ int line_num;
+ int col_num;
+ const char *filename;
+ char *theme_dir;
+ grub_gfxmenu_view_t view;
+};
+
+static int
+has_more (struct parsebuf *p)
+{
+ return p->pos < p->len;
+}
+
+static int
+read_char (struct parsebuf *p)
+{
+ if (has_more (p))
+ {
+ char c;
+ c = p->buf[p->pos++];
+ if (c == '\n')
+ {
+ p->line_num++;
+ p->col_num = 1;
+ }
+ else
+ {
+ p->col_num++;
+ }
+ return c;
+ }
+ else
+ return -1;
+}
+
+static int
+peek_char (struct parsebuf *p)
+{
+ if (has_more (p))
+ return p->buf[p->pos];
+ else
+ return -1;
+}
+
+static int
+is_whitespace (char c)
+{
+ return (c == ' '
+ || c == '\t'
+ || c == '\r'
+ || c == '\n'
+ || c == '\f');
+}
+
+static void
+skip_whitespace (struct parsebuf *p)
+{
+ while (has_more (p) && is_whitespace(peek_char (p)))
+ read_char (p);
+}
+
+static void
+advance_to_next_line (struct parsebuf *p)
+{
+ int c;
+
+ /* Eat characters up to the newline. */
+ do
+ {
+ c = read_char (p);
+ }
+ while (c != -1 && c != '\n');
+}
+
+static int
+is_identifier_char (int c)
+{
+ return (c != -1
+ && (grub_isalpha(c)
+ || grub_isdigit(c)
+ || c == '_'
+ || c == '-'));
+}
+
+static char *
+read_identifier (struct parsebuf *p)
+{
+ /* Index of the first character of the identifier in p->buf. */
+ int start;
+ /* Next index after the last character of the identifer in p->buf. */
+ int end;
+
+ skip_whitespace (p);
+
+ /* Capture the start of the identifier. */
+ start = p->pos;
+
+ /* Scan for the end. */
+ while (is_identifier_char (peek_char (p)))
+ read_char (p);
+ end = p->pos;
+
+ if (end - start < 1)
+ return 0;
+
+ return grub_new_substring (p->buf, start, end);
+}
+
+static char *
+read_expression (struct parsebuf *p)
+{
+ int start;
+ int end;
+
+ skip_whitespace (p);
+ if (peek_char (p) == '"')
+ {
+ /* Read as a quoted string.
+ The quotation marks are not included in the expression value. */
+ /* Skip opening quotation mark. */
+ read_char (p);
+ start = p->pos;
+ while (has_more (p) && peek_char (p) != '"')
+ read_char (p);
+ end = p->pos;
+ /* Skip the terminating quotation mark. */
+ read_char (p);
+ }
+ else if (peek_char (p) == '(')
+ {
+ /* Read as a parenthesized string -- for tuples/coordinates. */
+ /* The parentheses are included in the expression value. */
+ int c;
+
+ start = p->pos;
+ do
+ {
+ c = read_char (p);
+ }
+ while (c != -1 && c != ')');
+ end = p->pos;
+ }
+ else if (has_more (p))
+ {
+ /* Read as a single word -- for numeric values or words without
+ whitespace. */
+ start = p->pos;
+ while (has_more (p) && ! is_whitespace (peek_char (p)))
+ read_char (p);
+ end = p->pos;
+ }
+ else
+ {
+ /* The end of the theme file has been reached. */
+ grub_error (GRUB_ERR_IO, "%s:%d:%d expression expected in theme file",
+ p->filename, p->line_num, p->col_num);
+ return 0;
+ }
+
+ return grub_new_substring (p->buf, start, end);
+}
+
+static grub_err_t
+parse_proportional_spec (char *value, signed *abs, grub_fixed_signed_t *prop)
+{
+ signed num;
+ char *ptr;
+ int sig = 0;
+ *abs = 0;
+ *prop = 0;
+ ptr = value;
+ while (*ptr)
+ {
+ sig = 0;
+
+ while (*ptr == '-' || *ptr == '+')
+ {
+ if (*ptr == '-')
+ sig = !sig;
+ ptr++;
+ }
+
+ num = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ if (sig)
+ num = -num;
+ if (*ptr == '%')
+ {
+ *prop += grub_fixed_fsf_divide (grub_signed_to_fixed (num), 100);
+ ptr++;
+ }
+ else
+ *abs += num;
+ }
+ return GRUB_ERR_NONE;
+}
+
+
+/* Read a GUI object specification from the theme file.
+ Any components created will be added to the GUI container PARENT. */
+static grub_err_t
+read_object (struct parsebuf *p, grub_gui_container_t parent)
+{
+ grub_video_rect_t bounds;
+
+ char *name;
+ name = read_identifier (p);
+ if (! name)
+ goto cleanup;
+
+ grub_gui_component_t component = 0;
+ if (grub_strcmp (name, "label") == 0)
+ {
+ component = grub_gui_label_new ();
+ }
+ else if (grub_strcmp (name, "image") == 0)
+ {
+ component = grub_gui_image_new ();
+ }
+ else if (grub_strcmp (name, "vbox") == 0)
+ {
+ component = (grub_gui_component_t) grub_gui_vbox_new ();
+ }
+ else if (grub_strcmp (name, "hbox") == 0)
+ {
+ component = (grub_gui_component_t) grub_gui_hbox_new ();
+ }
+ else if (grub_strcmp (name, "canvas") == 0)
+ {
+ component = (grub_gui_component_t) grub_gui_canvas_new ();
+ }
+ else if (grub_strcmp (name, "progress_bar") == 0)
+ {
+ component = grub_gui_progress_bar_new ();
+ }
+ else if (grub_strcmp (name, "circular_progress") == 0)
+ {
+ component = grub_gui_circular_progress_new ();
+ }
+ else if (grub_strcmp (name, "boot_menu") == 0)
+ {
+ component = grub_gui_list_new ();
+ }
+ else
+ {
+ /* Unknown type. */
+ grub_error (GRUB_ERR_IO, "%s:%d:%d unknown object type `%s'",
+ p->filename, p->line_num, p->col_num, name);
+ goto cleanup;
+ }
+
+ if (! component)
+ goto cleanup;
+
+ /* Inform the component about the theme so it can find its resources. */
+ component->ops->set_property (component, "theme_dir", p->theme_dir);
+ component->ops->set_property (component, "theme_path", p->filename);
+
+ /* Add the component as a child of PARENT. */
+ bounds.x = 0;
+ bounds.y = 0;
+ bounds.width = -1;
+ bounds.height = -1;
+ component->ops->set_bounds (component, &bounds);
+ parent->ops->add (parent, component);
+
+ skip_whitespace (p);
+ if (read_char (p) != '{')
+ {
+ grub_error (GRUB_ERR_IO,
+ "%s:%d:%d expected `{' after object type name `%s'",
+ p->filename, p->line_num, p->col_num, name);
+ goto cleanup;
+ }
+
+ while (has_more (p))
+ {
+ skip_whitespace (p);
+
+ /* Check whether the end has been encountered. */
+ if (peek_char (p) == '}')
+ {
+ /* Skip the closing brace. */
+ read_char (p);
+ break;
+ }
+
+ if (peek_char (p) == '#')
+ {
+ /* Skip comments. */
+ advance_to_next_line (p);
+ continue;
+ }
+
+ if (peek_char (p) == '+')
+ {
+ /* Skip the '+'. */
+ read_char (p);
+
+ /* Check whether this component is a container. */
+ if (component->ops->is_instance (component, "container"))
+ {
+ /* Read the sub-object recursively and add it as a child. */
+ if (read_object (p, (grub_gui_container_t) component) != 0)
+ goto cleanup;
+ /* After reading the sub-object, resume parsing, expecting
+ another property assignment or sub-object definition. */
+ continue;
+ }
+ else
+ {
+ grub_error (GRUB_ERR_IO,
+ "%s:%d:%d attempted to add object to non-container",
+ p->filename, p->line_num, p->col_num);
+ goto cleanup;
+ }
+ }
+
+ char *property;
+ property = read_identifier (p);
+ if (! property)
+ {
+ grub_error (GRUB_ERR_IO, "%s:%d:%d identifier expected in theme file",
+ p->filename, p->line_num, p->col_num);
+ goto cleanup;
+ }
+
+ skip_whitespace (p);
+ if (read_char (p) != '=')
+ {
+ grub_error (GRUB_ERR_IO,
+ "%s:%d:%d expected `=' after property name `%s'",
+ p->filename, p->line_num, p->col_num, property);
+ grub_free (property);
+ goto cleanup;
+ }
+ skip_whitespace (p);
+
+ char *value;
+ value = read_expression (p);
+ if (! value)
+ {
+ grub_free (property);
+ goto cleanup;
+ }
+
+ /* Handle the property value. */
+ if (grub_strcmp (property, "left") == 0)
+ parse_proportional_spec (value, &component->x, &component->xfrac);
+ else if (grub_strcmp (property, "top") == 0)
+ parse_proportional_spec (value, &component->y, &component->yfrac);
+ else if (grub_strcmp (property, "width") == 0)
+ parse_proportional_spec (value, &component->w, &component->wfrac);
+ else if (grub_strcmp (property, "height") == 0)
+ parse_proportional_spec (value, &component->h, &component->hfrac);
+ else
+ /* General property handling. */
+ component->ops->set_property (component, property, value);
+
+ grub_free (value);
+ grub_free (property);
+ if (grub_errno != GRUB_ERR_NONE)
+ goto cleanup;
+ }
+
+cleanup:
+ grub_free (name);
+ return grub_errno;
+}
+
+static grub_err_t
+read_property (struct parsebuf *p)
+{
+ char *name;
+
+ /* Read the property name. */
+ name = read_identifier (p);
+ if (! name)
+ {
+ advance_to_next_line (p);
+ return grub_errno;
+ }
+
+ /* Skip whitespace before separator. */
+ skip_whitespace (p);
+
+ /* Read separator. */
+ if (read_char (p) != ':')
+ {
+ grub_error (GRUB_ERR_IO,
+ "%s:%d:%d missing separator after property name `%s'",
+ p->filename, p->line_num, p->col_num, name);
+ goto done;
+ }
+
+ /* Skip whitespace after separator. */
+ skip_whitespace (p);
+
+ /* Get the value based on its type. */
+ if (peek_char (p) == '"')
+ {
+ /* String value (e.g., '"My string"'). */
+ char *value = read_expression (p);
+ if (! value)
+ {
+ grub_error (GRUB_ERR_IO, "%s:%d:%d missing property value",
+ p->filename, p->line_num, p->col_num);
+ goto done;
+ }
+ /* If theme_set_string results in an error, grub_errno will be returned
+ below. */
+ theme_set_string (p->view, name, value, p->theme_dir,
+ p->filename, p->line_num, p->col_num);
+ grub_free (value);
+ }
+ else
+ {
+ grub_error (GRUB_ERR_IO,
+ "%s:%d:%d property value invalid; "
+ "enclose literal values in quotes (\")",
+ p->filename, p->line_num, p->col_num);
+ goto done;
+ }
+
+done:
+ grub_free (name);
+ return grub_errno;
+}
+
+/* Set properties on the view based on settings from the specified
+ theme file. */
+grub_err_t
+grub_gfxmenu_view_load_theme (grub_gfxmenu_view_t view, const char *theme_path)
+{
+ grub_file_t file;
+ struct parsebuf p;
+
+ p.view = view;
+ p.theme_dir = grub_get_dirname (theme_path);
+
+ file = grub_file_open (theme_path);
+ if (! file)
+ {
+ grub_free (p.theme_dir);
+ return grub_errno;
+ }
+
+ p.len = grub_file_size (file);
+ p.buf = grub_malloc (p.len);
+ p.pos = 0;
+ p.line_num = 1;
+ p.col_num = 1;
+ p.filename = theme_path;
+ if (! p.buf)
+ {
+ grub_file_close (file);
+ grub_free (p.theme_dir);
+ return grub_errno;
+ }
+ if (grub_file_read (file, p.buf, p.len) != p.len)
+ {
+ grub_free (p.buf);
+ grub_file_close (file);
+ grub_free (p.theme_dir);
+ return grub_errno;
+ }
+
+ if (view->canvas)
+ view->canvas->component.ops->destroy (view->canvas);
+
+ view->canvas = grub_gui_canvas_new ();
+ ((grub_gui_component_t) view->canvas)
+ ->ops->set_bounds ((grub_gui_component_t) view->canvas,
+ &view->screen);
+
+ while (has_more (&p))
+ {
+ /* Skip comments (lines beginning with #). */
+ if (peek_char (&p) == '#')
+ {
+ advance_to_next_line (&p);
+ continue;
+ }
+
+ /* Find the first non-whitespace character. */
+ skip_whitespace (&p);
+
+ /* Handle the content. */
+ if (peek_char (&p) == '+')
+ {
+ /* Skip the '+'. */
+ read_char (&p);
+ read_object (&p, view->canvas);
+ }
+ else
+ {
+ read_property (&p);
+ }
+
+ if (grub_errno != GRUB_ERR_NONE)
+ goto fail;
+ }
+
+ /* Set the new theme path. */
+ grub_free (view->theme_path);
+ view->theme_path = grub_strdup (theme_path);
+ goto cleanup;
+
+fail:
+ if (view->canvas)
+ {
+ view->canvas->component.ops->destroy (view->canvas);
+ view->canvas = 0;
+ }
+
+cleanup:
+ grub_free (p.buf);
+ grub_file_close (file);
+ grub_free (p.theme_dir);
+ return grub_errno;
+}
diff --git a/grub-core/gfxmenu/view.c b/grub-core/gfxmenu/view.c
new file mode 100644
index 0000000..901cdc8
--- /dev/null
+++ b/grub-core/gfxmenu/view.c
@@ -0,0 +1,446 @@
+/* view.c - Graphical menu interface MVC view. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/file.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/normal.h>
+#include <grub/video.h>
+#include <grub/gfxterm.h>
+#include <grub/bitmap.h>
+#include <grub/bitmap_scale.h>
+#include <grub/term.h>
+#include <grub/gfxwidgets.h>
+#include <grub/time.h>
+#include <grub/menu.h>
+#include <grub/menu_viewer.h>
+#include <grub/gfxmenu_view.h>
+#include <grub/gui_string_util.h>
+#include <grub/icon_manager.h>
+
+static void
+init_terminal (grub_gfxmenu_view_t view);
+static grub_video_rect_t term_rect;
+static grub_gfxmenu_view_t term_view;
+
+/* Create a new view object, loading the theme specified by THEME_PATH and
+ associating MODEL with the view. */
+grub_gfxmenu_view_t
+grub_gfxmenu_view_new (const char *theme_path,
+ int width, int height)
+{
+ grub_gfxmenu_view_t view;
+ grub_font_t default_font;
+ grub_gui_color_t default_fg_color;
+ grub_gui_color_t default_bg_color;
+
+ view = grub_malloc (sizeof (*view));
+ if (! view)
+ return 0;
+
+ view->screen.x = 0;
+ view->screen.y = 0;
+ view->screen.width = width;
+ view->screen.height = height;
+
+ default_font = grub_font_get ("Unknown Regular 16");
+ default_fg_color = grub_gui_color_rgb (0, 0, 0);
+ default_bg_color = grub_gui_color_rgb (255, 255, 255);
+
+ view->canvas = 0;
+
+ view->title_font = default_font;
+ view->message_font = default_font;
+ view->terminal_font_name = grub_strdup ("Fixed 10");
+ view->title_color = default_fg_color;
+ view->message_color = default_bg_color;
+ view->message_bg_color = default_fg_color;
+ view->desktop_image = 0;
+ view->desktop_color = default_bg_color;
+ view->terminal_box = grub_gfxmenu_create_box (0, 0);
+ view->title_text = grub_strdup ("GRUB Boot Menu");
+ view->progress_message_text = 0;
+ view->theme_path = 0;
+
+ /* Set the timeout bar's frame. */
+ view->progress_message_frame.width = view->screen.width * 4 / 5;
+ view->progress_message_frame.height = 50;
+ view->progress_message_frame.x = view->screen.x
+ + (view->screen.width - view->progress_message_frame.width) / 2;
+ view->progress_message_frame.y = view->screen.y
+ + view->screen.height - 90 - 20 - view->progress_message_frame.height;
+
+ if (grub_gfxmenu_view_load_theme (view, theme_path) != 0)
+ {
+ grub_gfxmenu_view_destroy (view);
+ return 0;
+ }
+
+ return view;
+}
+
+/* Destroy the view object. All used memory is freed. */
+void
+grub_gfxmenu_view_destroy (grub_gfxmenu_view_t view)
+{
+ if (!view)
+ return;
+ grub_video_bitmap_destroy (view->desktop_image);
+ if (view->terminal_box)
+ view->terminal_box->destroy (view->terminal_box);
+ grub_free (view->terminal_font_name);
+ grub_free (view->title_text);
+ grub_free (view->progress_message_text);
+ grub_free (view->theme_path);
+ if (view->canvas)
+ view->canvas->component.ops->destroy (view->canvas);
+ grub_free (view);
+}
+
+static void
+redraw_background (grub_gfxmenu_view_t view,
+ const grub_video_rect_t *bounds)
+{
+ if (view->desktop_image)
+ {
+ struct grub_video_bitmap *img = view->desktop_image;
+ grub_video_blit_bitmap (img, GRUB_VIDEO_BLIT_REPLACE,
+ bounds->x, bounds->y,
+ bounds->x - view->screen.x,
+ bounds->y - view->screen.y,
+ bounds->width, bounds->height);
+ }
+ else
+ {
+ grub_video_fill_rect (grub_gui_map_color (view->desktop_color),
+ bounds->x, bounds->y,
+ bounds->width, bounds->height);
+ }
+}
+
+static void
+draw_title (grub_gfxmenu_view_t view)
+{
+ if (! view->title_text)
+ return;
+
+ /* Center the title. */
+ int title_width = grub_font_get_string_width (view->title_font,
+ view->title_text);
+ int x = (view->screen.width - title_width) / 2;
+ int y = 40 + grub_font_get_ascent (view->title_font);
+ grub_font_draw_string (view->title_text,
+ view->title_font,
+ grub_gui_map_color (view->title_color),
+ x, y);
+}
+
+struct progress_value_data
+{
+ int visible;
+ int start;
+ int end;
+ int value;
+};
+
+struct grub_gfxmenu_timeout_notify *grub_gfxmenu_timeout_notifications;
+
+static void
+update_timeouts (int visible, int start, int value, int end)
+{
+ struct grub_gfxmenu_timeout_notify *cur;
+
+ for (cur = grub_gfxmenu_timeout_notifications; cur; cur = cur->next)
+ cur->set_state (cur->self, visible, start, value, end);
+}
+
+static void
+redraw_timeouts (struct grub_gfxmenu_view *view)
+{
+ struct grub_gfxmenu_timeout_notify *cur;
+
+ for (cur = grub_gfxmenu_timeout_notifications; cur; cur = cur->next)
+ {
+ grub_video_rect_t bounds;
+ cur->self->ops->get_bounds (cur->self, &bounds);
+ grub_gfxmenu_view_redraw (view, &bounds);
+ }
+}
+
+void
+grub_gfxmenu_print_timeout (int timeout, void *data)
+{
+ struct grub_gfxmenu_view *view = data;
+
+ if (view->first_timeout == -1)
+ view->first_timeout = timeout;
+
+ update_timeouts (1, -(view->first_timeout + 1), -timeout, 0);
+ redraw_timeouts (view);
+ grub_video_swap_buffers ();
+ if (view->double_repaint)
+ redraw_timeouts (view);
+}
+
+void
+grub_gfxmenu_clear_timeout (void *data)
+{
+ struct grub_gfxmenu_view *view = data;
+
+ update_timeouts (0, 1, 0, 0);
+ redraw_timeouts (view);
+ grub_video_swap_buffers ();
+ if (view->double_repaint)
+ redraw_timeouts (view);
+}
+
+static void
+update_menu_visit (grub_gui_component_t component,
+ void *userdata)
+{
+ grub_gfxmenu_view_t view;
+ view = userdata;
+ if (component->ops->is_instance (component, "list"))
+ {
+ grub_gui_list_t list = (grub_gui_list_t) component;
+ list->ops->set_view_info (list, view);
+ }
+}
+
+/* Update any boot menu components with the current menu model and
+ theme path. */
+static void
+update_menu_components (grub_gfxmenu_view_t view)
+{
+ grub_gui_iterate_recursively ((grub_gui_component_t) view->canvas,
+ update_menu_visit, view);
+}
+
+static void
+draw_message (grub_gfxmenu_view_t view)
+{
+ char *text = view->progress_message_text;
+ grub_video_rect_t f = view->progress_message_frame;
+ if (! text)
+ return;
+
+ grub_font_t font = view->message_font;
+ grub_video_color_t color = grub_gui_map_color (view->message_color);
+
+ /* Border. */
+ grub_video_fill_rect (color,
+ f.x-1, f.y-1, f.width+2, f.height+2);
+ /* Fill. */
+ grub_video_fill_rect (grub_gui_map_color (view->message_bg_color),
+ f.x, f.y, f.width, f.height);
+
+ /* Center the text. */
+ int text_width = grub_font_get_string_width (font, text);
+ int x = f.x + (f.width - text_width) / 2;
+ int y = (f.y + (f.height - grub_font_get_descent (font)) / 2
+ + grub_font_get_ascent (font) / 2);
+ grub_font_draw_string (text, font, color, x, y);
+}
+
+void
+grub_gfxmenu_view_redraw (grub_gfxmenu_view_t view,
+ const grub_video_rect_t *region)
+{
+ if (grub_video_have_common_points (&term_rect, region))
+ grub_gfxterm_schedule_repaint ();
+
+ grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
+
+ redraw_background (view, region);
+ if (view->canvas)
+ view->canvas->component.ops->paint (view->canvas, region);
+ draw_title (view);
+ if (grub_video_have_common_points (&view->progress_message_frame, region))
+ draw_message (view);
+}
+
+void
+grub_gfxmenu_view_draw (grub_gfxmenu_view_t view)
+{
+ init_terminal (view);
+
+ /* Clear the screen; there may be garbage left over in video memory. */
+ grub_video_fill_rect (grub_video_map_rgb (0, 0, 0),
+ view->screen.x, view->screen.y,
+ view->screen.width, view->screen.height);
+ grub_video_swap_buffers ();
+ if (view->double_repaint)
+ grub_video_fill_rect (grub_video_map_rgb (0, 0, 0),
+ view->screen.x, view->screen.y,
+ view->screen.width, view->screen.height);
+
+ update_menu_components (view);
+
+ grub_gfxmenu_view_redraw (view, &view->screen);
+ grub_video_swap_buffers ();
+ if (view->double_repaint)
+ grub_gfxmenu_view_redraw (view, &view->screen);
+}
+
+static void
+redraw_menu_visit (grub_gui_component_t component,
+ void *userdata)
+{
+ grub_gfxmenu_view_t view;
+ view = userdata;
+ if (component->ops->is_instance (component, "list"))
+ {
+ grub_video_rect_t bounds;
+
+ component->ops->get_bounds (component, &bounds);
+ grub_gfxmenu_view_redraw (view, &bounds);
+ }
+}
+
+void
+grub_gfxmenu_redraw_menu (grub_gfxmenu_view_t view)
+{
+ update_menu_components (view);
+
+ grub_gui_iterate_recursively ((grub_gui_component_t) view->canvas,
+ redraw_menu_visit, view);
+ grub_video_swap_buffers ();
+ if (view->double_repaint)
+ {
+ grub_gui_iterate_recursively ((grub_gui_component_t) view->canvas,
+ redraw_menu_visit, view);
+ }
+}
+
+void
+grub_gfxmenu_set_chosen_entry (int entry, void *data)
+{
+ grub_gfxmenu_view_t view = data;
+
+ view->selected = entry;
+ grub_gfxmenu_redraw_menu (view);
+}
+
+static void
+grub_gfxmenu_draw_terminal_box (void)
+{
+ grub_gfxmenu_box_t term_box;
+
+ term_box = term_view->terminal_box;
+ if (!term_box)
+ return;
+
+ term_box->set_content_size (term_box, term_rect.width,
+ term_rect.height);
+
+ term_box->draw (term_box,
+ term_rect.x - term_box->get_left_pad (term_box),
+ term_rect.y - term_box->get_top_pad (term_box));
+}
+
+static void
+init_terminal (grub_gfxmenu_view_t view)
+{
+ term_rect.width = view->screen.width * 7 / 10;
+ term_rect.height = view->screen.height * 7 / 10;
+
+ term_rect.x = view->screen.x + view->screen.width * (10 - 7) / 10 / 2;
+ term_rect.y = view->screen.y + view->screen.height * (10 - 7) / 10 / 2;
+
+ term_view = view;
+
+ /* Note: currently there is no API for changing the gfxterm font
+ on the fly, so whatever font the initially loaded theme specifies
+ will be permanent. */
+ grub_gfxterm_set_window (GRUB_VIDEO_RENDER_TARGET_DISPLAY, term_rect.x,
+ term_rect.y,
+ term_rect.width, term_rect.height,
+ view->double_repaint, view->terminal_font_name, 3);
+ grub_gfxterm_decorator_hook = grub_gfxmenu_draw_terminal_box;
+}
+
+/* FIXME: previously notifications were displayed in special case.
+ Is it necessary?
+ */
+#if 0
+/* Sets MESSAGE as the progress message for the view.
+ MESSAGE can be 0, in which case no message is displayed. */
+static void
+set_progress_message (grub_gfxmenu_view_t view, const char *message)
+{
+ grub_free (view->progress_message_text);
+ if (message)
+ view->progress_message_text = grub_strdup (message);
+ else
+ view->progress_message_text = 0;
+}
+
+static void
+notify_booting (grub_menu_entry_t entry, void *userdata)
+{
+ grub_gfxmenu_view_t view = (grub_gfxmenu_view_t) userdata;
+
+ char *s = grub_malloc (100 + grub_strlen (entry->title));
+ if (!s)
+ return;
+
+ grub_sprintf (s, "Booting '%s'", entry->title);
+ set_progress_message (view, s);
+ grub_free (s);
+ grub_gfxmenu_view_redraw (view, &view->progress_message_frame);
+ grub_video_swap_buffers ();
+ if (view->double_repaint)
+ grub_gfxmenu_view_redraw (view, &view->progress_message_frame);
+}
+
+static void
+notify_fallback (grub_menu_entry_t entry, void *userdata)
+{
+ grub_gfxmenu_view_t view = (grub_gfxmenu_view_t) userdata;
+
+ char *s = grub_malloc (100 + grub_strlen (entry->title));
+ if (!s)
+ return;
+
+ grub_sprintf (s, "Falling back to '%s'", entry->title);
+ set_progress_message (view, s);
+ grub_free (s);
+ grub_gfxmenu_view_redraw (view, &view->progress_message_frame);
+ grub_video_swap_buffers ();
+ if (view->double_repaint)
+ grub_gfxmenu_view_redraw (view, &view->progress_message_frame);
+}
+
+static void
+notify_execution_failure (void *userdata __attribute__ ((unused)))
+{
+}
+
+
+static struct grub_menu_execute_callback execute_callback =
+{
+ .notify_booting = notify_booting,
+ .notify_fallback = notify_fallback,
+ .notify_failure = notify_execution_failure
+};
+
+#endif
diff --git a/grub-core/gfxmenu/widget-box.c b/grub-core/gfxmenu/widget-box.c
new file mode 100644
index 0000000..41ca7f5
--- /dev/null
+++ b/grub-core/gfxmenu/widget-box.c
@@ -0,0 +1,310 @@
+/* widget_box.c - Pixmap-stylized box widget. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/video.h>
+#include <grub/bitmap.h>
+#include <grub/bitmap_scale.h>
+#include <grub/gfxwidgets.h>
+
+enum box_pixmaps
+{
+ BOX_PIXMAP_NW, BOX_PIXMAP_NE, BOX_PIXMAP_SE, BOX_PIXMAP_SW,
+ BOX_PIXMAP_N, BOX_PIXMAP_E, BOX_PIXMAP_S, BOX_PIXMAP_W,
+ BOX_PIXMAP_CENTER
+};
+
+static const char *box_pixmap_names[] = {
+ /* Corners: */
+ "nw", "ne", "se", "sw",
+ /* Sides: */
+ "n", "e", "s", "w",
+ /* Center: */
+ "c"
+};
+
+#define BOX_NUM_PIXMAPS (sizeof(box_pixmap_names)/sizeof(*box_pixmap_names))
+
+static int
+get_height (struct grub_video_bitmap *bitmap)
+{
+ if (bitmap)
+ return grub_video_bitmap_get_height (bitmap);
+ else
+ return 0;
+}
+
+static int
+get_width (struct grub_video_bitmap *bitmap)
+{
+ if (bitmap)
+ return grub_video_bitmap_get_width (bitmap);
+ else
+ return 0;
+}
+
+static void
+blit (grub_gfxmenu_box_t self, int pixmap_index, int x, int y)
+{
+ struct grub_video_bitmap *bitmap;
+ bitmap = self->scaled_pixmaps[pixmap_index];
+ if (! bitmap)
+ return;
+ grub_video_blit_bitmap (bitmap, GRUB_VIDEO_BLIT_BLEND,
+ x, y, 0, 0,
+ grub_video_bitmap_get_width (bitmap),
+ grub_video_bitmap_get_height (bitmap));
+}
+
+static void
+draw (grub_gfxmenu_box_t self, int x, int y)
+{
+ int height_n;
+ int width_w;
+
+ height_n = get_height (self->scaled_pixmaps[BOX_PIXMAP_N]);
+ width_w = get_width (self->scaled_pixmaps[BOX_PIXMAP_W]);
+
+ /* Draw sides. */
+ blit (self, BOX_PIXMAP_N, x + width_w, y);
+ blit (self, BOX_PIXMAP_S, x + width_w, y + height_n + self->content_height);
+ blit (self, BOX_PIXMAP_E, x + width_w + self->content_width, y + height_n);
+ blit (self, BOX_PIXMAP_W, x, y + height_n);
+
+ /* Draw corners. */
+ blit (self, BOX_PIXMAP_NW, x, y);
+ blit (self, BOX_PIXMAP_NE, x + width_w + self->content_width, y);
+ blit (self, BOX_PIXMAP_SE,
+ x + width_w + self->content_width,
+ y + height_n + self->content_height);
+ blit (self, BOX_PIXMAP_SW, x, y + height_n + self->content_height);
+
+ /* Draw center. */
+ blit (self, BOX_PIXMAP_CENTER, x + width_w, y + height_n);
+}
+
+static grub_err_t
+scale_pixmap (grub_gfxmenu_box_t self, int i, int w, int h)
+{
+ struct grub_video_bitmap **scaled = &self->scaled_pixmaps[i];
+ struct grub_video_bitmap *raw = self->raw_pixmaps[i];
+
+ if (raw == 0)
+ return grub_errno;
+
+ if (w == -1)
+ w = grub_video_bitmap_get_width (raw);
+ if (h == -1)
+ h = grub_video_bitmap_get_height (raw);
+
+ if (*scaled == 0
+ || ((int) grub_video_bitmap_get_width (*scaled) != w)
+ || ((int) grub_video_bitmap_get_height (*scaled) != h))
+ {
+ if (*scaled)
+ {
+ grub_video_bitmap_destroy (*scaled);
+ *scaled = 0;
+ }
+
+ /* Don't try to create a bitmap with a zero dimension. */
+ if (w != 0 && h != 0)
+ grub_video_bitmap_create_scaled (scaled, w, h, raw,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_error_push ();
+ grub_error (grub_errno,
+ "failed to scale bitmap for styled box pixmap #%d", i);
+ }
+ }
+
+ return grub_errno;
+}
+
+static void
+set_content_size (grub_gfxmenu_box_t self,
+ int width, int height)
+{
+ self->content_width = width;
+ self->content_height = height;
+
+ /* Resize sides to match the width and height. */
+ /* It is assumed that the corners width/height match the adjacent sides. */
+
+ /* Resize N and S sides to match width. */
+ if (scale_pixmap(self, BOX_PIXMAP_N, width, -1) != GRUB_ERR_NONE)
+ return;
+ if (scale_pixmap(self, BOX_PIXMAP_S, width, -1) != GRUB_ERR_NONE)
+ return;
+
+ /* Resize E and W sides to match height. */
+ if (scale_pixmap(self, BOX_PIXMAP_E, -1, height) != GRUB_ERR_NONE)
+ return;
+ if (scale_pixmap(self, BOX_PIXMAP_W, -1, height) != GRUB_ERR_NONE)
+ return;
+
+ /* Don't scale the corners--they are assumed to match the sides. */
+ if (scale_pixmap(self, BOX_PIXMAP_NW, -1, -1) != GRUB_ERR_NONE)
+ return;
+ if (scale_pixmap(self, BOX_PIXMAP_SW, -1, -1) != GRUB_ERR_NONE)
+ return;
+ if (scale_pixmap(self, BOX_PIXMAP_NE, -1, -1) != GRUB_ERR_NONE)
+ return;
+ if (scale_pixmap(self, BOX_PIXMAP_SE, -1, -1) != GRUB_ERR_NONE)
+ return;
+
+ /* Scale the center area. */
+ if (scale_pixmap(self, BOX_PIXMAP_CENTER, width, height) != GRUB_ERR_NONE)
+ return;
+}
+
+static int
+get_border_width (grub_gfxmenu_box_t self)
+{
+ return (get_width (self->raw_pixmaps[BOX_PIXMAP_E])
+ + get_width (self->raw_pixmaps[BOX_PIXMAP_W]));
+}
+
+static int
+get_left_pad (grub_gfxmenu_box_t self)
+{
+ return get_width (self->raw_pixmaps[BOX_PIXMAP_W]);
+}
+
+static int
+get_top_pad (grub_gfxmenu_box_t self)
+{
+ return get_height (self->raw_pixmaps[BOX_PIXMAP_N]);
+}
+
+static int
+get_right_pad (grub_gfxmenu_box_t self)
+{
+ return get_width (self->raw_pixmaps[BOX_PIXMAP_E]);
+}
+
+static int
+get_bottom_pad (grub_gfxmenu_box_t self)
+{
+ return get_height (self->raw_pixmaps[BOX_PIXMAP_S]);
+}
+
+static void
+destroy (grub_gfxmenu_box_t self)
+{
+ unsigned i;
+ for (i = 0; i < BOX_NUM_PIXMAPS; i++)
+ {
+ if (self->raw_pixmaps[i])
+ grub_video_bitmap_destroy(self->raw_pixmaps[i]);
+ self->raw_pixmaps[i] = 0;
+
+ if (self->scaled_pixmaps[i])
+ grub_video_bitmap_destroy(self->scaled_pixmaps[i]);
+ self->scaled_pixmaps[i] = 0;
+ }
+ grub_free (self->raw_pixmaps);
+ self->raw_pixmaps = 0;
+ grub_free (self->scaled_pixmaps);
+ self->scaled_pixmaps = 0;
+
+ /* Free self: must be the last step! */
+ grub_free (self);
+}
+
+
+/* Create a new box. If PIXMAPS_PREFIX and PIXMAPS_SUFFIX are both non-null,
+ then an attempt is made to load the north, south, east, west, northwest,
+ northeast, southeast, southwest, and center pixmaps.
+ If either PIXMAPS_PREFIX or PIXMAPS_SUFFIX is 0, then no pixmaps are
+ loaded, and the box has zero-width borders and is drawn transparent. */
+grub_gfxmenu_box_t
+grub_gfxmenu_create_box (const char *pixmaps_prefix,
+ const char *pixmaps_suffix)
+{
+ unsigned i;
+ grub_gfxmenu_box_t box;
+
+ box = (grub_gfxmenu_box_t) grub_malloc (sizeof (*box));
+ if (! box)
+ return 0;
+
+ box->content_width = 0;
+ box->content_height = 0;
+ box->raw_pixmaps =
+ (struct grub_video_bitmap **)
+ grub_malloc (BOX_NUM_PIXMAPS * sizeof (struct grub_video_bitmap *));
+ box->scaled_pixmaps =
+ (struct grub_video_bitmap **)
+ grub_malloc (BOX_NUM_PIXMAPS * sizeof (struct grub_video_bitmap *));
+
+ /* Initialize all pixmap pointers to NULL so that proper destruction can
+ be performed if an error is encountered partway through construction. */
+ for (i = 0; i < BOX_NUM_PIXMAPS; i++)
+ box->raw_pixmaps[i] = 0;
+ for (i = 0; i < BOX_NUM_PIXMAPS; i++)
+ box->scaled_pixmaps[i] = 0;
+
+ /* Load the pixmaps. */
+ for (i = 0; i < BOX_NUM_PIXMAPS; i++)
+ {
+ if (pixmaps_prefix && pixmaps_suffix)
+ {
+ char *path;
+ char *path_end;
+
+ path = grub_malloc (grub_strlen (pixmaps_prefix)
+ + grub_strlen (box_pixmap_names[i])
+ + grub_strlen (pixmaps_suffix)
+ + 1);
+ if (! path)
+ goto fail_and_destroy;
+
+ /* Construct the specific path for this pixmap. */
+ path_end = grub_stpcpy (path, pixmaps_prefix);
+ path_end = grub_stpcpy (path_end, box_pixmap_names[i]);
+ path_end = grub_stpcpy (path_end, pixmaps_suffix);
+
+ grub_video_bitmap_load (&box->raw_pixmaps[i], path);
+ grub_free (path);
+
+ /* Ignore missing pixmaps. */
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+
+ box->draw = draw;
+ box->set_content_size = set_content_size;
+ box->get_border_width = get_border_width;
+
+ box->get_left_pad = get_left_pad;
+ box->get_top_pad = get_top_pad;
+ box->get_right_pad = get_right_pad;
+ box->get_bottom_pad = get_bottom_pad;
+ box->destroy = destroy;
+ return box;
+
+fail_and_destroy:
+ destroy (box);
+ return 0;
+}
diff --git a/grub-core/gnulib/Makefile.am b/grub-core/gnulib/Makefile.am
new file mode 100644
index 0000000..fb1525f
--- /dev/null
+++ b/grub-core/gnulib/Makefile.am
@@ -0,0 +1,1359 @@
+## DO NOT EDIT! GENERATED AUTOMATICALLY!
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=grub-core/gnulib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl --no-vc-files argp error fnmatch getdelim getline gettext progname regex
+
+AUTOMAKE_OPTIONS = 1.5 gnits
+
+SUBDIRS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+noinst_LTLIBRARIES =
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS =
+AM_CFLAGS =
+
+noinst_LIBRARIES += libgnu.a
+
+libgnu_a_SOURCES =
+libgnu_a_LIBADD = $(gl_LIBOBJS)
+libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
+EXTRA_libgnu_a_SOURCES =
+
+## begin gnulib module alloca
+
+
+EXTRA_DIST += alloca.c
+
+EXTRA_libgnu_a_SOURCES += alloca.c
+
+libgnu_a_LIBADD += @ALLOCA@
+libgnu_a_DEPENDENCIES += @ALLOCA@
+## end gnulib module alloca
+
+## begin gnulib module alloca-opt
+
+BUILT_SOURCES += $(ALLOCA_H)
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/alloca.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+EXTRA_DIST += alloca.in.h
+
+## end gnulib module alloca-opt
+
+## begin gnulib module arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
+
+## end gnulib module arg-nonnull
+
+## begin gnulib module argp
+
+libgnu_a_SOURCES += argp.h argp-ba.c argp-eexst.c \
+ argp-fmtstream.c argp-fmtstream.h argp-fs-xinl.c argp-help.c \
+ argp-namefrob.h argp-parse.c argp-pin.c argp-pv.c argp-pvh.c \
+ argp-xinl.c
+
+## end gnulib module argp
+
+## begin gnulib module btowc
+
+
+EXTRA_DIST += btowc.c
+
+EXTRA_libgnu_a_SOURCES += btowc.c
+
+## end gnulib module btowc
+
+## begin gnulib module c++defs
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += c++defs.h
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/_GL_CXXDEFS/,$$p' \
+ < $(top_srcdir)/build-aux/c++defs.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+
+CXXDEFS_H=c++defs.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
+
+## end gnulib module c++defs
+
+## begin gnulib module configmake
+
+# Retrieve values of the variables through 'configure' followed by
+# 'make', not directly through 'configure', so that a user who
+# sets some of these variables consistently on the 'make' command
+# line gets correct results.
+#
+# One advantage of this approach, compared to the classical
+# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
+# is that it protects against the use of undefined variables.
+# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
+# defined by this module, and code using LIBDIR gives a
+# compilation error.
+#
+# Another advantage is that 'make' output is shorter.
+#
+# Listed in the same order as the GNU makefile conventions.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+ $(AM_V_GEN)rm -f $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > $@-t && \
+ if test -f $@ && cmp $@-t $@ > /dev/null; then \
+ rm -f $@-t; \
+ else \
+ rm -f $@; mv $@-t $@; \
+ fi
+
+BUILT_SOURCES += configmake.h
+CLEANFILES += configmake.h configmake.h-t
+
+## end gnulib module configmake
+
+## begin gnulib module dirname-lgpl
+
+
+EXTRA_DIST += basename-lgpl.c dirname-lgpl.c dirname.h stripslash.c
+
+EXTRA_libgnu_a_SOURCES += basename-lgpl.c dirname-lgpl.c stripslash.c
+
+## end gnulib module dirname-lgpl
+
+## begin gnulib module errno
+
+BUILT_SOURCES += $(ERRNO_H)
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+ < $(srcdir)/errno.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += errno.h errno.h-t
+
+EXTRA_DIST += errno.in.h
+
+## end gnulib module errno
+
+## begin gnulib module error
+
+
+EXTRA_DIST += error.c error.h
+
+EXTRA_libgnu_a_SOURCES += error.c
+
+## end gnulib module error
+
+## begin gnulib module float
+
+BUILT_SOURCES += $(FLOAT_H)
+
+# We need the following in order to create <float.h> when the system
+# doesn't have one that works with the given compiler.
+float.h: float.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
+ < $(srcdir)/float.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += float.h float.h-t
+
+EXTRA_DIST += float.in.h
+
+## end gnulib module float
+
+## begin gnulib module fnmatch
+
+BUILT_SOURCES += $(FNMATCH_H)
+
+# We need the following in order to create <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/fnmatch.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
+
+EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c
+
+EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c
+
+## end gnulib module fnmatch
+
+## begin gnulib module getdelim
+
+
+EXTRA_DIST += getdelim.c
+
+EXTRA_libgnu_a_SOURCES += getdelim.c
+
+## end gnulib module getdelim
+
+## begin gnulib module getline
+
+
+EXTRA_DIST += getline.c
+
+EXTRA_libgnu_a_SOURCES += getline.c
+
+## end gnulib module getline
+
+## begin gnulib module getopt-posix
+
+BUILT_SOURCES += $(GETOPT_H)
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/getopt.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+MOSTLYCLEANFILES += getopt.h getopt.h-t
+
+EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
+
+EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c
+
+## end gnulib module getopt-posix
+
+## begin gnulib module gettext
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS += -I$(top_builddir)/intl
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module gettext
+
+## begin gnulib module gettext-h
+
+libgnu_a_SOURCES += gettext.h
+
+## end gnulib module gettext-h
+
+## begin gnulib module havelib
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module havelib
+
+## begin gnulib module intprops
+
+
+EXTRA_DIST += intprops.h
+
+## end gnulib module intprops
+
+## begin gnulib module langinfo
+
+BUILT_SOURCES += langinfo.h
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
+ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
+ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
+ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/langinfo.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += langinfo.h langinfo.h-t
+
+EXTRA_DIST += langinfo.in.h
+
+## end gnulib module langinfo
+
+## begin gnulib module localcharset
+
+libgnu_a_SOURCES += localcharset.h localcharset.c
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+ if test $(GLIBC21) = no; then \
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+ darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+ esac ; \
+ else \
+ need_charset_alias=false ; \
+ fi ; \
+ if $$need_charset_alias; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+ fi ; \
+ if test -f $(charset_alias); then \
+ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if $$need_charset_alias; then \
+ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
+ if test -f $(charset_alias); then \
+ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+charset.alias: config.charset
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
+ mv t-$@ $@
+
+SUFFIXES += .sed .sin
+.sin.sed:
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
+ mv t-$@ $@
+
+CLEANFILES += charset.alias ref-add.sed ref-del.sed
+
+EXTRA_DIST += config.charset ref-add.sin ref-del.sin
+
+## end gnulib module localcharset
+
+## begin gnulib module malloc-gnu
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnu_a_SOURCES += malloc.c
+
+## end gnulib module malloc-gnu
+
+## begin gnulib module malloc-posix
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnu_a_SOURCES += malloc.c
+
+## end gnulib module malloc-posix
+
+## begin gnulib module mbrtowc
+
+
+EXTRA_DIST += mbrtowc.c
+
+EXTRA_libgnu_a_SOURCES += mbrtowc.c
+
+## end gnulib module mbrtowc
+
+## begin gnulib module mbsinit
+
+
+EXTRA_DIST += mbsinit.c
+
+EXTRA_libgnu_a_SOURCES += mbsinit.c
+
+## end gnulib module mbsinit
+
+## begin gnulib module mbsrtowcs
+
+
+EXTRA_DIST += mbsrtowcs-state.c mbsrtowcs.c
+
+EXTRA_libgnu_a_SOURCES += mbsrtowcs-state.c mbsrtowcs.c
+
+## end gnulib module mbsrtowcs
+
+## begin gnulib module memchr
+
+
+EXTRA_DIST += memchr.c memchr.valgrind
+
+EXTRA_libgnu_a_SOURCES += memchr.c
+
+## end gnulib module memchr
+
+## begin gnulib module mempcpy
+
+
+EXTRA_DIST += mempcpy.c
+
+EXTRA_libgnu_a_SOURCES += mempcpy.c
+
+## end gnulib module mempcpy
+
+## begin gnulib module nl_langinfo
+
+
+EXTRA_DIST += nl_langinfo.c
+
+EXTRA_libgnu_a_SOURCES += nl_langinfo.c
+
+## end gnulib module nl_langinfo
+
+## begin gnulib module progname
+
+libgnu_a_SOURCES += progname.h progname.c
+
+## end gnulib module progname
+
+## begin gnulib module rawmemchr
+
+
+EXTRA_DIST += rawmemchr.c rawmemchr.valgrind
+
+EXTRA_libgnu_a_SOURCES += rawmemchr.c
+
+## end gnulib module rawmemchr
+
+## begin gnulib module realloc-posix
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libgnu_a_SOURCES += realloc.c
+
+## end gnulib module realloc-posix
+
+## begin gnulib module regex
+
+
+EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c
+
+EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c
+
+## end gnulib module regex
+
+## begin gnulib module size_max
+
+libgnu_a_SOURCES += size_max.h
+
+## end gnulib module size_max
+
+## begin gnulib module sleep
+
+
+EXTRA_DIST += sleep.c
+
+EXTRA_libgnu_a_SOURCES += sleep.c
+
+## end gnulib module sleep
+
+## begin gnulib module stdbool
+
+BUILT_SOURCES += $(STDBOOL_H)
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+
+EXTRA_DIST += stdbool.in.h
+
+## end gnulib module stdbool
+
+## begin gnulib module stddef
+
+BUILT_SOURCES += $(STDDEF_H)
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+stddef.h: stddef.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+ < $(srcdir)/stddef.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stddef.h stddef.h-t
+
+EXTRA_DIST += stddef.in.h
+
+## end gnulib module stddef
+
+## begin gnulib module stdint
+
+BUILT_SOURCES += $(STDINT_H)
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ < $(srcdir)/stdint.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdint.h stdint.h-t
+
+EXTRA_DIST += stdint.in.h
+
+## end gnulib module stdint
+
+## begin gnulib module stdio
+
+BUILT_SOURCES += stdio.h
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
+ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
+ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ < $(srcdir)/stdio.in.h | \
+ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
+ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
+ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
+ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
+ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
+ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
+ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
+ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdio.h stdio.h-t
+
+EXTRA_DIST += stdio-write.c stdio.in.h
+
+EXTRA_libgnu_a_SOURCES += stdio-write.c
+
+## end gnulib module stdio
+
+## begin gnulib module stdlib
+
+BUILT_SOURCES += stdlib.h
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
+ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+ -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
+ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
+ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
+ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
+ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
+ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
+ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
+ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
+ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
+ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/stdlib.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+
+EXTRA_DIST += stdlib.in.h
+
+## end gnulib module stdlib
+
+## begin gnulib module strcase
+
+
+EXTRA_DIST += strcasecmp.c strncasecmp.c
+
+EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c
+
+## end gnulib module strcase
+
+## begin gnulib module strchrnul
+
+
+EXTRA_DIST += strchrnul.c strchrnul.valgrind
+
+EXTRA_libgnu_a_SOURCES += strchrnul.c
+
+## end gnulib module strchrnul
+
+## begin gnulib module streq
+
+
+EXTRA_DIST += streq.h
+
+## end gnulib module streq
+
+## begin gnulib module strerror
+
+
+EXTRA_DIST += strerror.c
+
+EXTRA_libgnu_a_SOURCES += strerror.c
+
+## end gnulib module strerror
+
+## begin gnulib module string
+
+BUILT_SOURCES += string.h
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+ -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ < $(srcdir)/string.in.h | \
+ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
+ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
+ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
+ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ < $(srcdir)/string.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += string.h string.h-t
+
+EXTRA_DIST += string.in.h
+
+## end gnulib module string
+
+## begin gnulib module strings
+
+BUILT_SOURCES += strings.h
+
+# We need the following in order to create <strings.h> when the system
+# doesn't have one that works with the given compiler.
+strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
+ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
+ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/strings.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += strings.h strings.h-t
+
+EXTRA_DIST += strings.in.h
+
+## end gnulib module strings
+
+## begin gnulib module strndup
+
+
+EXTRA_DIST += strndup.c
+
+EXTRA_libgnu_a_SOURCES += strndup.c
+
+## end gnulib module strndup
+
+## begin gnulib module strnlen
+
+
+EXTRA_DIST += strnlen.c
+
+EXTRA_libgnu_a_SOURCES += strnlen.c
+
+## end gnulib module strnlen
+
+## begin gnulib module strnlen1
+
+libgnu_a_SOURCES += strnlen1.h strnlen1.c
+
+## end gnulib module strnlen1
+
+## begin gnulib module sys_wait
+
+BUILT_SOURCES += sys/wait.h
+
+# We need the following in order to create <sys/wait.h> when the system
+# has one that is incomplete.
+sys/wait.h: sys_wait.in.h
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
+ < $(srcdir)/sys_wait.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_wait.in.h
+
+## end gnulib module sys_wait
+
+## begin gnulib module sysexits
+
+BUILT_SOURCES += $(SYSEXITS_H)
+
+# We need the following in order to create <sysexits.h> when the system
+# doesn't have one that works with the given compiler.
+sysexits.h: sysexits.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYSEXITS_H''@|$(NEXT_SYSEXITS_H)|g' \
+ < $(srcdir)/sysexits.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+MOSTLYCLEANFILES += sysexits.h sysexits.h-t
+
+EXTRA_DIST += sysexits.in.h
+
+## end gnulib module sysexits
+
+## begin gnulib module unistd
+
+BUILT_SOURCES += unistd.h
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
+ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
+ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
+ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
+ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
+ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
+ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
+ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ < $(srcdir)/unistd.in.h | \
+ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
+ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
+ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
+ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
+ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
+ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
+ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
+ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
+ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
+ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+ -e 's|@''HAVE_TTYNAME_R''@|$(HAVE_TTYNAME_R)|g' \
+ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
+ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
+ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
+ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
+ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
+ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
+ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
+ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
+ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
+ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
+ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t
+
+EXTRA_DIST += unistd.in.h
+
+## end gnulib module unistd
+
+## begin gnulib module vasnprintf
+
+
+EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
+
+EXTRA_libgnu_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
+
+## end gnulib module vasnprintf
+
+## begin gnulib module verify
+
+libgnu_a_SOURCES += verify.h
+
+## end gnulib module verify
+
+## begin gnulib module vsnprintf
+
+
+EXTRA_DIST += vsnprintf.c
+
+EXTRA_libgnu_a_SOURCES += vsnprintf.c
+
+## end gnulib module vsnprintf
+
+## begin gnulib module warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
+
+## end gnulib module warn-on-use
+
+## begin gnulib module wchar
+
+BUILT_SOURCES += wchar.h
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/wchar.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += wchar.h wchar.h-t
+
+EXTRA_DIST += wchar.in.h
+
+## end gnulib module wchar
+
+## begin gnulib module wcrtomb
+
+
+EXTRA_DIST += wcrtomb.c
+
+EXTRA_libgnu_a_SOURCES += wcrtomb.c
+
+## end gnulib module wcrtomb
+
+## begin gnulib module wctype
+
+BUILT_SOURCES += wctype.h
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/wctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += wctype.h wctype.h-t
+
+EXTRA_DIST += wctype.in.h
+
+## end gnulib module wctype
+
+## begin gnulib module xsize
+
+libgnu_a_SOURCES += xsize.h
+
+## end gnulib module xsize
+
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
diff --git a/grub-core/gnulib/Makefile.in b/grub-core/gnulib/Makefile.in
new file mode 100644
index 0000000..0533f9d
--- /dev/null
+++ b/grub-core/gnulib/Makefile.in
@@ -0,0 +1,2107 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=grub-core/gnulib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl --no-vc-files argp error fnmatch getdelim getline gettext progname regex
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = grub-core/gnulib
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in alloca.c
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argp.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/malloc.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \
+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \
+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
+ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \
+ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \
+ $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strerror.m4 \
+ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \
+ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \
+ $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/sysexits.m4 \
+ $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/vsnprintf.m4 $(top_srcdir)/m4/warn-on-use.m4 \
+ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config-util.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libgnu_a_AR = $(AR) $(ARFLAGS)
+am__DEPENDENCIES_1 =
+am_libgnu_a_OBJECTS = argp-ba.$(OBJEXT) argp-eexst.$(OBJEXT) \
+ argp-fmtstream.$(OBJEXT) argp-fs-xinl.$(OBJEXT) \
+ argp-help.$(OBJEXT) argp-parse.$(OBJEXT) argp-pin.$(OBJEXT) \
+ argp-pv.$(OBJEXT) argp-pvh.$(OBJEXT) argp-xinl.$(OBJEXT) \
+ localcharset.$(OBJEXT) progname.$(OBJEXT) strnlen1.$(OBJEXT)
+libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES)
+DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+ADDR32 = @ADDR32@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+BSS_START_SYMBOL = @BSS_START_SYMBOL@
+BUILD_CC = @BUILD_CC@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CMP = @CMP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATA32 = @DATA32@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+END_SYMBOL = @END_SYMBOL@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+EXEEXT = @EXEEXT@
+FLOAT_H = @FLOAT_H@
+FNMATCH_H = @FNMATCH_H@
+FONT_SOURCE = @FONT_SOURCE@
+FREETYPE = @FREETYPE@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNCAT = @GNULIB_STRNCAT@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_TMPFILE = @GNULIB_TMPFILE@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GNULIB__EXIT = @GNULIB__EXIT@
+GREP = @GREP@
+GRUB_BOOT_MACHINE_LINK_ADDR = @GRUB_BOOT_MACHINE_LINK_ADDR@
+HAVE_ASM_USCORE = @HAVE_ASM_USCORE@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
+HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMP = @HAVE_MKSTEMP@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASECMP = @HAVE_STRCASECMP@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TTYNAME_R = @HAVE_TTYNAME_R@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+HELP2MAN = @HELP2MAN@
+HOST_CC = @HOST_CC@
+HOST_CCASFLAGS = @HOST_CCASFLAGS@
+HOST_CFLAGS = @HOST_CFLAGS@
+HOST_CPPFLAGS = @HOST_CPPFLAGS@
+HOST_LDFLAGS = @HOST_LDFLAGS@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBCURSES = @LIBCURSES@
+LIBDEVMAPPER = @LIBDEVMAPPER@
+LIBGEOM = @LIBGEOM@
+LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
+LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBLZMA = @LIBLZMA@
+LIBNVPAIR = @LIBNVPAIR@
+LIBOBJS = @LIBOBJS@
+LIBPCIACCESS = @LIBPCIACCESS@
+LIBS = @LIBS@
+LIBSDL = @LIBSDL@
+LIBUSB = @LIBUSB@
+LIBUTIL = @LIBUTIL@
+LIBZFS = @LIBZFS@
+LN_S = @LN_S@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEED_ENABLE_EXECUTE_STACK = @NEED_ENABLE_EXECUTE_STACK@
+NEED_REGISTER_FRAME_INFO = @NEED_REGISTER_FRAME_INFO@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRINGS_H = @NEXT_STRINGS_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@
+NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+NM = @NM@
+OBJCONV = @OBJCONV@
+OBJCOPY = @OBJCOPY@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYSEXITS_H = @SYSEXITS_H@
+TARGET_APPLE_CC = @TARGET_APPLE_CC@
+TARGET_CC = @TARGET_CC@
+TARGET_CCAS = @TARGET_CCAS@
+TARGET_CCASFLAGS = @TARGET_CCASFLAGS@
+TARGET_CFLAGS = @TARGET_CFLAGS@
+TARGET_CPP = @TARGET_CPP@
+TARGET_CPPFLAGS = @TARGET_CPPFLAGS@
+TARGET_IMG_BASE_LDOPT = @TARGET_IMG_BASE_LDOPT@
+TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
+TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
+TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
+TARGET_LDFLAGS = @TARGET_LDFLAGS@
+TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
+TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_APPLE_CC_FIXES = @USE_APPLE_CC_FIXES@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_TARGET_CC = @ac_ct_TARGET_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+bootdirname = @bootdirname@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+enable_efiemu = @enable_efiemu@
+enable_grub_emu_pci = @enable_grub_emu_pci@
+enable_grub_emu_sdl = @enable_grub_emu_sdl@
+enable_grub_emu_usb = @enable_grub_emu_usb@
+enable_grub_mkfont = @enable_grub_mkfont@
+exec_prefix = @exec_prefix@
+freetype_cflags = @freetype_cflags@
+freetype_libs = @freetype_libs@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
+gltests_WITNESS = @gltests_WITNESS@
+grubdirname = @grubdirname@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_kernel = @host_kernel@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkglibrootdir = @pkglibrootdir@
+platform = @platform@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.5 gnits
+SUBDIRS =
+noinst_HEADERS =
+noinst_LIBRARIES = libgnu.a
+noinst_LTLIBRARIES =
+EXTRA_DIST = alloca.c alloca.in.h \
+ $(top_srcdir)/build-aux/arg-nonnull.h btowc.c \
+ $(top_srcdir)/build-aux/c++defs.h basename-lgpl.c \
+ dirname-lgpl.c dirname.h stripslash.c errno.in.h error.c \
+ error.h float.in.h fnmatch.c fnmatch.in.h fnmatch_loop.c \
+ getdelim.c getline.c getopt.c getopt.in.h getopt1.c \
+ getopt_int.h $(top_srcdir)/build-aux/config.rpath \
+ $(top_srcdir)/build-aux/config.rpath intprops.h langinfo.in.h \
+ config.charset ref-add.sin ref-del.sin malloc.c malloc.c \
+ mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c memchr.c \
+ memchr.valgrind mempcpy.c nl_langinfo.c rawmemchr.c \
+ rawmemchr.valgrind realloc.c regcomp.c regex.c regex.h \
+ regex_internal.c regex_internal.h regexec.c sleep.c \
+ stdbool.in.h stddef.in.h stdint.in.h stdio-write.c stdio.in.h \
+ stdlib.in.h strcasecmp.c strncasecmp.c strchrnul.c \
+ strchrnul.valgrind streq.h strerror.c string.in.h strings.in.h \
+ strndup.c strnlen.c sys_wait.in.h sysexits.in.h unistd.in.h \
+ asnprintf.c float+.h printf-args.c printf-args.h \
+ printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h \
+ vsnprintf.c $(top_srcdir)/build-aux/warn-on-use.h wchar.in.h \
+ wcrtomb.c wctype.in.h
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h configmake.h \
+ $(ERRNO_H) $(FLOAT_H) $(FNMATCH_H) $(GETOPT_H) langinfo.h \
+ $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h \
+ strings.h sys/wait.h $(SYSEXITS_H) unistd.h warn-on-use.h \
+ wchar.h wctype.h
+SUFFIXES = .sed .sin
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
+ arg-nonnull.h-t c++defs.h c++defs.h-t errno.h errno.h-t \
+ float.h float.h-t fnmatch.h fnmatch.h-t getopt.h getopt.h-t \
+ langinfo.h langinfo.h-t stdbool.h stdbool.h-t stddef.h \
+ stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h \
+ stdlib.h-t string.h string.h-t strings.h strings.h-t \
+ sys/wait.h sys/wait.h-t sysexits.h sysexits.h-t unistd.h \
+ unistd.h-t warn-on-use.h warn-on-use.h-t wchar.h wchar.h-t \
+ wctype.h wctype.h-t
+MOSTLYCLEANDIRS = sys
+CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
+ ref-del.sed
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS = -I$(top_builddir)/intl
+AM_CFLAGS =
+libgnu_a_SOURCES = argp.h argp-ba.c argp-eexst.c argp-fmtstream.c \
+ argp-fmtstream.h argp-fs-xinl.c argp-help.c argp-namefrob.h \
+ argp-parse.c argp-pin.c argp-pv.c argp-pvh.c argp-xinl.c \
+ gettext.h localcharset.h localcharset.c progname.h progname.c \
+ size_max.h strnlen1.h strnlen1.c verify.h xsize.h
+libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
+libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
+EXTRA_libgnu_a_SOURCES = alloca.c btowc.c basename-lgpl.c \
+ dirname-lgpl.c stripslash.c error.c fnmatch.c fnmatch_loop.c \
+ getdelim.c getline.c getopt.c getopt1.c malloc.c malloc.c \
+ mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c memchr.c \
+ mempcpy.c nl_langinfo.c rawmemchr.c realloc.c regcomp.c \
+ regex.c regex_internal.c regexec.c sleep.c stdio-write.c \
+ strcasecmp.c strncasecmp.c strchrnul.c strerror.c strndup.c \
+ strnlen.c asnprintf.c printf-args.c printf-parse.c \
+ vasnprintf.c vsnprintf.c wcrtomb.c
+ARG_NONNULL_H = arg-nonnull.h
+CXXDEFS_H = c++defs.h
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+WARN_ON_USE_H = warn-on-use.h
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .sed .sin .c .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits grub-core/gnulib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits grub-core/gnulib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES)
+ -rm -f libgnu.a
+ $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD)
+ $(RANLIB) libgnu.a
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-ba.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-eexst.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-fmtstream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-fs-xinl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-help.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-pvh.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argp-xinl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf $(DEPDIR) ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-exec-local
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf $(DEPDIR) ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-local
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ ctags-recursive install install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am all-local check check-am clean clean-generic \
+ clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \
+ ctags-recursive distclean distclean-compile distclean-generic \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-local \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am uninstall-local
+
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/alloca.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/c++defs.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/_GL_CXXDEFS/,$$p' \
+ < $(top_srcdir)/build-aux/c++defs.h \
+ > $@-t && \
+ mv $@-t $@
+
+# Retrieve values of the variables through 'configure' followed by
+# 'make', not directly through 'configure', so that a user who
+# sets some of these variables consistently on the 'make' command
+# line gets correct results.
+#
+# One advantage of this approach, compared to the classical
+# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
+# is that it protects against the use of undefined variables.
+# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
+# defined by this module, and code using LIBDIR gives a
+# compilation error.
+#
+# Another advantage is that 'make' output is shorter.
+#
+# Listed in the same order as the GNU makefile conventions.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+ $(AM_V_GEN)rm -f $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > $@-t && \
+ if test -f $@ && cmp $@-t $@ > /dev/null; then \
+ rm -f $@-t; \
+ else \
+ rm -f $@; mv $@-t $@; \
+ fi
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+ < $(srcdir)/errno.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <float.h> when the system
+# doesn't have one that works with the given compiler.
+float.h: float.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
+ < $(srcdir)/float.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/fnmatch.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/getopt.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
+ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
+ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
+ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/langinfo.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+ if test $(GLIBC21) = no; then \
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+ darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+ esac ; \
+ else \
+ need_charset_alias=false ; \
+ fi ; \
+ if $$need_charset_alias; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+ fi ; \
+ if test -f $(charset_alias); then \
+ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if $$need_charset_alias; then \
+ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
+ if test -f $(charset_alias); then \
+ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+charset.alias: config.charset
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
+ mv t-$@ $@
+.sin.sed:
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
+ mv t-$@ $@
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+stddef.h: stddef.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+ < $(srcdir)/stddef.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ < $(srcdir)/stdint.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
+ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
+ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ < $(srcdir)/stdio.in.h | \
+ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
+ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
+ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
+ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
+ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
+ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
+ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
+ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
+ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+ -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
+ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
+ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
+ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
+ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
+ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
+ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
+ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
+ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
+ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/stdlib.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+ -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ < $(srcdir)/string.in.h | \
+ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
+ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
+ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
+ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ < $(srcdir)/string.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <strings.h> when the system
+# doesn't have one that works with the given compiler.
+strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
+ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
+ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/strings.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sys/wait.h> when the system
+# has one that is incomplete.
+sys/wait.h: sys_wait.in.h
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
+ < $(srcdir)/sys_wait.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sysexits.h> when the system
+# doesn't have one that works with the given compiler.
+sysexits.h: sysexits.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYSEXITS_H''@|$(NEXT_SYSEXITS_H)|g' \
+ < $(srcdir)/sysexits.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
+ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
+ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
+ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
+ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
+ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
+ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
+ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ < $(srcdir)/unistd.in.h | \
+ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
+ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
+ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
+ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
+ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
+ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
+ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
+ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
+ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
+ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+ -e 's|@''HAVE_TTYNAME_R''@|$(HAVE_TTYNAME_R)|g' \
+ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
+ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
+ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
+ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
+ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
+ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
+ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
+ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
+ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
+ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
+ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/wchar.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/wctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/grub-core/gnulib/alloca.c b/grub-core/gnulib/alloca.c
new file mode 100644
index 0000000..75afdb9
--- /dev/null
+++ b/grub-core/gnulib/alloca.c
@@ -0,0 +1,489 @@
+/* alloca.c -- allocate automatically reclaimed memory
+ (Mostly) portable public-domain implementation -- D A Gwyn
+
+ This implementation of the PWB library alloca function,
+ which is used to allocate space off the run-time stack so
+ that it is automatically reclaimed upon procedure exit,
+ was inspired by discussions with J. Q. Johnson of Cornell.
+ J.Otto Tennant <jot@cray.com> contributed the Cray support.
+
+ There are some preprocessor constants that can
+ be defined when compiling for your specific system, for
+ improved efficiency; however, the defaults should be okay.
+
+ The general concept of this implementation is to keep
+ track of all alloca-allocated blocks, and reclaim any
+ that are found to be deeper in the stack than the current
+ invocation. This heuristic does not reclaim storage as
+ soon as it becomes invalid, but it will do so eventually.
+
+ As a special case, alloca(0) reclaims storage without
+ allocating any. It is a good idea to use alloca(0) in
+ your main control loop, etc. to force garbage collection. */
+
+#include <config.h>
+
+#include <alloca.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+#ifdef emacs
+# include "lisp.h"
+# include "blockinput.h"
+# ifdef EMACS_FREE
+# undef free
+# define free EMACS_FREE
+# endif
+#else
+# define memory_full() abort ()
+#endif
+
+/* If compiling with GCC 2, this file's not needed. */
+#if !defined (__GNUC__) || __GNUC__ < 2
+
+/* If someone has defined alloca as a macro,
+ there must be some other way alloca is supposed to work. */
+# ifndef alloca
+
+# ifdef emacs
+# ifdef static
+/* actually, only want this if static is defined as ""
+ -- this is for usg, in which emacs must undefine static
+ in order to make unexec workable
+ */
+# ifndef STACK_DIRECTION
+you
+lose
+-- must know STACK_DIRECTION at compile-time
+/* Using #error here is not wise since this file should work for
+ old and obscure compilers. */
+# endif /* STACK_DIRECTION undefined */
+# endif /* static */
+# endif /* emacs */
+
+/* If your stack is a linked list of frames, you have to
+ provide an "address metric" ADDRESS_FUNCTION macro. */
+
+# if defined (CRAY) && defined (CRAY_STACKSEG_END)
+long i00afunc ();
+# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
+# else
+# define ADDRESS_FUNCTION(arg) &(arg)
+# endif
+
+/* Define STACK_DIRECTION if you know the direction of stack
+ growth for your system; otherwise it will be automatically
+ deduced at run-time.
+
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+
+# ifndef STACK_DIRECTION
+# define STACK_DIRECTION 0 /* Direction unknown. */
+# endif
+
+# if STACK_DIRECTION != 0
+
+# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
+
+# else /* STACK_DIRECTION == 0; need run-time code. */
+
+static int stack_dir; /* 1 or -1 once known. */
+# define STACK_DIR stack_dir
+
+static void
+find_stack_direction (void)
+{
+ static char *addr = NULL; /* Address of first `dummy', once known. */
+ auto char dummy; /* To get stack address. */
+
+ if (addr == NULL)
+ { /* Initial entry. */
+ addr = ADDRESS_FUNCTION (dummy);
+
+ find_stack_direction (); /* Recurse once. */
+ }
+ else
+ {
+ /* Second entry. */
+ if (ADDRESS_FUNCTION (dummy) > addr)
+ stack_dir = 1; /* Stack grew upward. */
+ else
+ stack_dir = -1; /* Stack grew downward. */
+ }
+}
+
+# endif /* STACK_DIRECTION == 0 */
+
+/* An "alloca header" is used to:
+ (a) chain together all alloca'ed blocks;
+ (b) keep track of stack depth.
+
+ It is very important that sizeof(header) agree with malloc
+ alignment chunk size. The following default should work okay. */
+
+# ifndef ALIGN_SIZE
+# define ALIGN_SIZE sizeof(double)
+# endif
+
+typedef union hdr
+{
+ char align[ALIGN_SIZE]; /* To force sizeof(header). */
+ struct
+ {
+ union hdr *next; /* For chaining headers. */
+ char *deep; /* For stack depth measure. */
+ } h;
+} header;
+
+static header *last_alloca_header = NULL; /* -> last alloca header. */
+
+/* Return a pointer to at least SIZE bytes of storage,
+ which will be automatically reclaimed upon exit from
+ the procedure that called alloca. Originally, this space
+ was supposed to be taken from the current stack frame of the
+ caller, but that method cannot be made to work for some
+ implementations of C, for example under Gould's UTX/32. */
+
+void *
+alloca (size_t size)
+{
+ auto char probe; /* Probes stack depth: */
+ register char *depth = ADDRESS_FUNCTION (probe);
+
+# if STACK_DIRECTION == 0
+ if (STACK_DIR == 0) /* Unknown growth direction. */
+ find_stack_direction ();
+# endif
+
+ /* Reclaim garbage, defined as all alloca'd storage that
+ was allocated from deeper in the stack than currently. */
+
+ {
+ register header *hp; /* Traverses linked list. */
+
+# ifdef emacs
+ BLOCK_INPUT;
+# endif
+
+ for (hp = last_alloca_header; hp != NULL;)
+ if ((STACK_DIR > 0 && hp->h.deep > depth)
+ || (STACK_DIR < 0 && hp->h.deep < depth))
+ {
+ register header *np = hp->h.next;
+
+ free (hp); /* Collect garbage. */
+
+ hp = np; /* -> next header. */
+ }
+ else
+ break; /* Rest are not deeper. */
+
+ last_alloca_header = hp; /* -> last valid storage. */
+
+# ifdef emacs
+ UNBLOCK_INPUT;
+# endif
+ }
+
+ if (size == 0)
+ return NULL; /* No allocation required. */
+
+ /* Allocate combined header + user data storage. */
+
+ {
+ /* Address of header. */
+ register header *new;
+
+ size_t combined_size = sizeof (header) + size;
+ if (combined_size < sizeof (header))
+ memory_full ();
+
+ new = malloc (combined_size);
+
+ if (! new)
+ memory_full ();
+
+ new->h.next = last_alloca_header;
+ new->h.deep = depth;
+
+ last_alloca_header = new;
+
+ /* User storage begins just after header. */
+
+ return (void *) (new + 1);
+ }
+}
+
+# if defined (CRAY) && defined (CRAY_STACKSEG_END)
+
+# ifdef DEBUG_I00AFUNC
+# include <stdio.h>
+# endif
+
+# ifndef CRAY_STACK
+# define CRAY_STACK
+# ifndef CRAY2
+/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
+struct stack_control_header
+ {
+ long shgrow:32; /* Number of times stack has grown. */
+ long shaseg:32; /* Size of increments to stack. */
+ long shhwm:32; /* High water mark of stack. */
+ long shsize:32; /* Current size of stack (all segments). */
+ };
+
+/* The stack segment linkage control information occurs at
+ the high-address end of a stack segment. (The stack
+ grows from low addresses to high addresses.) The initial
+ part of the stack segment linkage control information is
+ 0200 (octal) words. This provides for register storage
+ for the routine which overflows the stack. */
+
+struct stack_segment_linkage
+ {
+ long ss[0200]; /* 0200 overflow words. */
+ long sssize:32; /* Number of words in this segment. */
+ long ssbase:32; /* Offset to stack base. */
+ long:32;
+ long sspseg:32; /* Offset to linkage control of previous
+ segment of stack. */
+ long:32;
+ long sstcpt:32; /* Pointer to task common address block. */
+ long sscsnm; /* Private control structure number for
+ microtasking. */
+ long ssusr1; /* Reserved for user. */
+ long ssusr2; /* Reserved for user. */
+ long sstpid; /* Process ID for pid based multi-tasking. */
+ long ssgvup; /* Pointer to multitasking thread giveup. */
+ long sscray[7]; /* Reserved for Cray Research. */
+ long ssa0;
+ long ssa1;
+ long ssa2;
+ long ssa3;
+ long ssa4;
+ long ssa5;
+ long ssa6;
+ long ssa7;
+ long sss0;
+ long sss1;
+ long sss2;
+ long sss3;
+ long sss4;
+ long sss5;
+ long sss6;
+ long sss7;
+ };
+
+# else /* CRAY2 */
+/* The following structure defines the vector of words
+ returned by the STKSTAT library routine. */
+struct stk_stat
+ {
+ long now; /* Current total stack size. */
+ long maxc; /* Amount of contiguous space which would
+ be required to satisfy the maximum
+ stack demand to date. */
+ long high_water; /* Stack high-water mark. */
+ long overflows; /* Number of stack overflow ($STKOFEN) calls. */
+ long hits; /* Number of internal buffer hits. */
+ long extends; /* Number of block extensions. */
+ long stko_mallocs; /* Block allocations by $STKOFEN. */
+ long underflows; /* Number of stack underflow calls ($STKRETN). */
+ long stko_free; /* Number of deallocations by $STKRETN. */
+ long stkm_free; /* Number of deallocations by $STKMRET. */
+ long segments; /* Current number of stack segments. */
+ long maxs; /* Maximum number of stack segments so far. */
+ long pad_size; /* Stack pad size. */
+ long current_address; /* Current stack segment address. */
+ long current_size; /* Current stack segment size. This
+ number is actually corrupted by STKSTAT to
+ include the fifteen word trailer area. */
+ long initial_address; /* Address of initial segment. */
+ long initial_size; /* Size of initial segment. */
+ };
+
+/* The following structure describes the data structure which trails
+ any stack segment. I think that the description in 'asdef' is
+ out of date. I only describe the parts that I am sure about. */
+
+struct stk_trailer
+ {
+ long this_address; /* Address of this block. */
+ long this_size; /* Size of this block (does not include
+ this trailer). */
+ long unknown2;
+ long unknown3;
+ long link; /* Address of trailer block of previous
+ segment. */
+ long unknown5;
+ long unknown6;
+ long unknown7;
+ long unknown8;
+ long unknown9;
+ long unknown10;
+ long unknown11;
+ long unknown12;
+ long unknown13;
+ long unknown14;
+ };
+
+# endif /* CRAY2 */
+# endif /* not CRAY_STACK */
+
+# ifdef CRAY2
+/* Determine a "stack measure" for an arbitrary ADDRESS.
+ I doubt that "lint" will like this much. */
+
+static long
+i00afunc (long *address)
+{
+ struct stk_stat status;
+ struct stk_trailer *trailer;
+ long *block, size;
+ long result = 0;
+
+ /* We want to iterate through all of the segments. The first
+ step is to get the stack status structure. We could do this
+ more quickly and more directly, perhaps, by referencing the
+ $LM00 common block, but I know that this works. */
+
+ STKSTAT (&status);
+
+ /* Set up the iteration. */
+
+ trailer = (struct stk_trailer *) (status.current_address
+ + status.current_size
+ - 15);
+
+ /* There must be at least one stack segment. Therefore it is
+ a fatal error if "trailer" is null. */
+
+ if (trailer == 0)
+ abort ();
+
+ /* Discard segments that do not contain our argument address. */
+
+ while (trailer != 0)
+ {
+ block = (long *) trailer->this_address;
+ size = trailer->this_size;
+ if (block == 0 || size == 0)
+ abort ();
+ trailer = (struct stk_trailer *) trailer->link;
+ if ((block <= address) && (address < (block + size)))
+ break;
+ }
+
+ /* Set the result to the offset in this segment and add the sizes
+ of all predecessor segments. */
+
+ result = address - block;
+
+ if (trailer == 0)
+ {
+ return result;
+ }
+
+ do
+ {
+ if (trailer->this_size <= 0)
+ abort ();
+ result += trailer->this_size;
+ trailer = (struct stk_trailer *) trailer->link;
+ }
+ while (trailer != 0);
+
+ /* We are done. Note that if you present a bogus address (one
+ not in any segment), you will get a different number back, formed
+ from subtracting the address of the first block. This is probably
+ not what you want. */
+
+ return (result);
+}
+
+# else /* not CRAY2 */
+/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
+ Determine the number of the cell within the stack,
+ given the address of the cell. The purpose of this
+ routine is to linearize, in some sense, stack addresses
+ for alloca. */
+
+static long
+i00afunc (long address)
+{
+ long stkl = 0;
+
+ long size, pseg, this_segment, stack;
+ long result = 0;
+
+ struct stack_segment_linkage *ssptr;
+
+ /* Register B67 contains the address of the end of the
+ current stack segment. If you (as a subprogram) store
+ your registers on the stack and find that you are past
+ the contents of B67, you have overflowed the segment.
+
+ B67 also points to the stack segment linkage control
+ area, which is what we are really interested in. */
+
+ stkl = CRAY_STACKSEG_END ();
+ ssptr = (struct stack_segment_linkage *) stkl;
+
+ /* If one subtracts 'size' from the end of the segment,
+ one has the address of the first word of the segment.
+
+ If this is not the first segment, 'pseg' will be
+ nonzero. */
+
+ pseg = ssptr->sspseg;
+ size = ssptr->sssize;
+
+ this_segment = stkl - size;
+
+ /* It is possible that calling this routine itself caused
+ a stack overflow. Discard stack segments which do not
+ contain the target address. */
+
+ while (!(this_segment <= address && address <= stkl))
+ {
+# ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
+# endif
+ if (pseg == 0)
+ break;
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ this_segment = stkl - size;
+ }
+
+ result = address - this_segment;
+
+ /* If you subtract pseg from the current end of the stack,
+ you get the address of the previous stack segment's end.
+ This seems a little convoluted to me, but I'll bet you save
+ a cycle somewhere. */
+
+ while (pseg != 0)
+ {
+# ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o\n", pseg, size);
+# endif
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ result += size;
+ }
+ return (result);
+}
+
+# endif /* not CRAY2 */
+# endif /* CRAY */
+
+# endif /* no alloca */
+#endif /* not GCC version 3 */
diff --git a/grub-core/gnulib/alloca.in.h b/grub-core/gnulib/alloca.in.h
new file mode 100644
index 0000000..44f20b7
--- /dev/null
+++ b/grub-core/gnulib/alloca.in.h
@@ -0,0 +1,56 @@
+/* Memory allocation on the stack.
+
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation,
+ Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA. */
+
+/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
+ means there is a real alloca function. */
+#ifndef _GL_ALLOCA_H
+#define _GL_ALLOCA_H
+
+/* alloca (N) returns a pointer to N bytes of memory
+ allocated on the stack, which will last until the function returns.
+ Use of alloca should be avoided:
+ - inside arguments of function calls - undefined behaviour,
+ - in inline functions - the allocation may actually last until the
+ calling function returns,
+ - for huge N (say, N >= 65536) - you never know how large (or small)
+ the stack is, and when the stack cannot fulfill the memory allocation
+ request, the program just crashes.
+ */
+
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _AIX
+# define alloca __alloca
+# elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# elif defined __DECC && defined __VMS
+# define alloca __ALLOCA
+# else
+# include <stddef.h>
+# ifdef __cplusplus
+extern "C"
+# endif
+void *alloca (size_t);
+# endif
+#endif
+
+#endif /* _GL_ALLOCA_H */
diff --git a/grub-core/gnulib/argp-ba.c b/grub-core/gnulib/argp-ba.c
new file mode 100644
index 0000000..95feabb
--- /dev/null
+++ b/grub-core/gnulib/argp-ba.c
@@ -0,0 +1,34 @@
+/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
+ Copyright (C) 1996, 1997, 1999, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* If set by the user program, it should point to string that is the
+ bug-reporting address for the program. It will be printed by argp_help if
+ the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
+ messages), embedded in a sentence that says something like `Report bugs to
+ ADDR.'. */
+const char *argp_program_bug_address
+/* This variable should be zero-initialized. On most systems, putting it into
+ BSS is sufficient. Not so on MacOS X 10.3 and 10.4, see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>
+ <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00096.html>. */
+#if defined __ELF__
+ /* On ELF systems, variables in BSS behave well. */
+#else
+ = (const char *) 0
+#endif
+ ;
diff --git a/grub-core/gnulib/argp-eexst.c b/grub-core/gnulib/argp-eexst.c
new file mode 100644
index 0000000..115a8cd
--- /dev/null
+++ b/grub-core/gnulib/argp-eexst.c
@@ -0,0 +1,30 @@
+/* Default definition for ARGP_ERR_EXIT_STATUS
+ Copyright (C) 1997, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sysexits.h>
+
+#include "argp.h"
+
+/* The exit status that argp will use when exiting due to a parsing error.
+ If not defined or set by the user program, this defaults to EX_USAGE from
+ <sysexits.h>. */
+error_t argp_err_exit_status = EX_USAGE;
diff --git a/grub-core/gnulib/argp-fmtstream.c b/grub-core/gnulib/argp-fmtstream.c
new file mode 100644
index 0000000..70bbebc
--- /dev/null
+++ b/grub-core/gnulib/argp-fmtstream.c
@@ -0,0 +1,435 @@
+/* Word-wrapping and line-truncating streams
+ Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This package emulates glibc `line_wrap_stream' semantics for systems that
+ don't have that. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <ctype.h>
+
+#include "argp-fmtstream.h"
+#include "argp-namefrob.h"
+
+#ifndef ARGP_FMTSTREAM_USE_LINEWRAP
+
+#ifndef isblank
+#define isblank(ch) ((ch)==' ' || (ch)=='\t')
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+# include <wchar.h>
+# include <libio/libioP.h>
+# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
+#endif
+
+#define INIT_BUF_SIZE 200
+#define PRINTF_SIZE_GUESS 150
+
+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
+ written on it with LMARGIN spaces and limits them to RMARGIN columns
+ total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
+ replacing the whitespace before them with a newline and WMARGIN spaces.
+ Otherwise, chars beyond RMARGIN are simply dropped until a newline.
+ Returns NULL if there was an error. */
+argp_fmtstream_t
+__argp_make_fmtstream (FILE *stream,
+ size_t lmargin, size_t rmargin, ssize_t wmargin)
+{
+ argp_fmtstream_t fs;
+
+ fs = (struct argp_fmtstream *) malloc (sizeof (struct argp_fmtstream));
+ if (fs != NULL)
+ {
+ fs->stream = stream;
+
+ fs->lmargin = lmargin;
+ fs->rmargin = rmargin;
+ fs->wmargin = wmargin;
+ fs->point_col = 0;
+ fs->point_offs = 0;
+
+ fs->buf = (char *) malloc (INIT_BUF_SIZE);
+ if (! fs->buf)
+ {
+ free (fs);
+ fs = 0;
+ }
+ else
+ {
+ fs->p = fs->buf;
+ fs->end = fs->buf + INIT_BUF_SIZE;
+ }
+ }
+
+ return fs;
+}
+#if 0
+/* Not exported. */
+#ifdef weak_alias
+weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
+#endif
+#endif
+
+/* Flush FS to its stream, and free it (but don't close the stream). */
+void
+__argp_fmtstream_free (argp_fmtstream_t fs)
+{
+ __argp_fmtstream_update (fs);
+ if (fs->p > fs->buf)
+ {
+#ifdef USE_IN_LIBIO
+ __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
+#else
+ fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
+#endif
+ }
+ free (fs->buf);
+ free (fs);
+}
+#if 0
+/* Not exported. */
+#ifdef weak_alias
+weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
+#endif
+#endif
+
+/* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
+ end of its buffer. This code is mostly from glibc stdio/linewrap.c. */
+void
+__argp_fmtstream_update (argp_fmtstream_t fs)
+{
+ char *buf, *nl;
+ size_t len;
+
+ /* Scan the buffer for newlines. */
+ buf = fs->buf + fs->point_offs;
+ while (buf < fs->p)
+ {
+ size_t r;
+
+ if (fs->point_col == 0 && fs->lmargin != 0)
+ {
+ /* We are starting a new line. Print spaces to the left margin. */
+ const size_t pad = fs->lmargin;
+ if (fs->p + pad < fs->end)
+ {
+ /* We can fit in them in the buffer by moving the
+ buffer text up and filling in the beginning. */
+ memmove (buf + pad, buf, fs->p - buf);
+ fs->p += pad; /* Compensate for bigger buffer. */
+ memset (buf, ' ', pad); /* Fill in the spaces. */
+ buf += pad; /* Don't bother searching them. */
+ }
+ else
+ {
+ /* No buffer space for spaces. Must flush. */
+ size_t i;
+ for (i = 0; i < pad; i++)
+ {
+#ifdef USE_IN_LIBIO
+ if (_IO_fwide (fs->stream, 0) > 0)
+ putwc_unlocked (L' ', fs->stream);
+ else
+#endif
+ putc_unlocked (' ', fs->stream);
+ }
+ }
+ fs->point_col = pad;
+ }
+
+ len = fs->p - buf;
+ nl = memchr (buf, '\n', len);
+
+ if (fs->point_col < 0)
+ fs->point_col = 0;
+
+ if (!nl)
+ {
+ /* The buffer ends in a partial line. */
+
+ if (fs->point_col + len < fs->rmargin)
+ {
+ /* The remaining buffer text is a partial line and fits
+ within the maximum line width. Advance point for the
+ characters to be written and stop scanning. */
+ fs->point_col += len;
+ break;
+ }
+ else
+ /* Set the end-of-line pointer for the code below to
+ the end of the buffer. */
+ nl = fs->p;
+ }
+ else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
+ {
+ /* The buffer contains a full line that fits within the maximum
+ line width. Reset point and scan the next line. */
+ fs->point_col = 0;
+ buf = nl + 1;
+ continue;
+ }
+
+ /* This line is too long. */
+ r = fs->rmargin - 1;
+
+ if (fs->wmargin < 0)
+ {
+ /* Truncate the line by overwriting the excess with the
+ newline and anything after it in the buffer. */
+ if (nl < fs->p)
+ {
+ memmove (buf + (r - fs->point_col), nl, fs->p - nl);
+ fs->p -= buf + (r - fs->point_col) - nl;
+ /* Reset point for the next line and start scanning it. */
+ fs->point_col = 0;
+ buf += r + 1; /* Skip full line plus \n. */
+ }
+ else
+ {
+ /* The buffer ends with a partial line that is beyond the
+ maximum line width. Advance point for the characters
+ written, and discard those past the max from the buffer. */
+ fs->point_col += len;
+ fs->p -= fs->point_col - r;
+ break;
+ }
+ }
+ else
+ {
+ /* Do word wrap. Go to the column just past the maximum line
+ width and scan back for the beginning of the word there.
+ Then insert a line break. */
+
+ char *p, *nextline;
+ int i;
+
+ p = buf + (r + 1 - fs->point_col);
+ while (p >= buf && !isblank ((unsigned char) *p))
+ --p;
+ nextline = p + 1; /* This will begin the next line. */
+
+ if (nextline > buf)
+ {
+ /* Swallow separating blanks. */
+ if (p >= buf)
+ do
+ --p;
+ while (p >= buf && isblank ((unsigned char) *p));
+ nl = p + 1; /* The newline will replace the first blank. */
+ }
+ else
+ {
+ /* A single word that is greater than the maximum line width.
+ Oh well. Put it on an overlong line by itself. */
+ p = buf + (r + 1 - fs->point_col);
+ /* Find the end of the long word. */
+ if (p < nl)
+ do
+ ++p;
+ while (p < nl && !isblank ((unsigned char) *p));
+ if (p == nl)
+ {
+ /* It already ends a line. No fussing required. */
+ fs->point_col = 0;
+ buf = nl + 1;
+ continue;
+ }
+ /* We will move the newline to replace the first blank. */
+ nl = p;
+ /* Swallow separating blanks. */
+ do
+ ++p;
+ while (isblank ((unsigned char) *p));
+ /* The next line will start here. */
+ nextline = p;
+ }
+
+ /* Note: There are a bunch of tests below for
+ NEXTLINE == BUF + LEN + 1; this case is where NL happens to fall
+ at the end of the buffer, and NEXTLINE is in fact empty (and so
+ we need not be careful to maintain its contents). */
+
+ if ((nextline == buf + len + 1
+ ? fs->end - nl < fs->wmargin + 1
+ : nextline - (nl + 1) < fs->wmargin)
+ && fs->p > nextline)
+ {
+ /* The margin needs more blanks than we removed. */
+ if (fs->end - fs->p > fs->wmargin + 1)
+ /* Make some space for them. */
+ {
+ size_t mv = fs->p - nextline;
+ memmove (nl + 1 + fs->wmargin, nextline, mv);
+ nextline = nl + 1 + fs->wmargin;
+ len = nextline + mv - buf;
+ *nl++ = '\n';
+ }
+ else
+ /* Output the first line so we can use the space. */
+ {
+#ifdef _LIBC
+ __fxprintf (fs->stream, "%.*s\n",
+ (int) (nl - fs->buf), fs->buf);
+#else
+ if (nl > fs->buf)
+ fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
+ putc_unlocked ('\n', fs->stream);
+#endif
+
+ len += buf - fs->buf;
+ nl = buf = fs->buf;
+ }
+ }
+ else
+ /* We can fit the newline and blanks in before
+ the next word. */
+ *nl++ = '\n';
+
+ if (nextline - nl >= fs->wmargin
+ || (nextline == buf + len + 1 && fs->end - nextline >= fs->wmargin))
+ /* Add blanks up to the wrap margin column. */
+ for (i = 0; i < fs->wmargin; ++i)
+ *nl++ = ' ';
+ else
+ for (i = 0; i < fs->wmargin; ++i)
+#ifdef USE_IN_LIBIO
+ if (_IO_fwide (fs->stream, 0) > 0)
+ putwc_unlocked (L' ', fs->stream);
+ else
+#endif
+ putc_unlocked (' ', fs->stream);
+
+ /* Copy the tail of the original buffer into the current buffer
+ position. */
+ if (nl < nextline)
+ memmove (nl, nextline, buf + len - nextline);
+ len -= nextline - buf;
+
+ /* Continue the scan on the remaining lines in the buffer. */
+ buf = nl;
+
+ /* Restore bufp to include all the remaining text. */
+ fs->p = nl + len;
+
+ /* Reset the counter of what has been output this line. If wmargin
+ is 0, we want to avoid the lmargin getting added, so we set
+ point_col to a magic value of -1 in that case. */
+ fs->point_col = fs->wmargin ? fs->wmargin : -1;
+ }
+ }
+
+ /* Remember that we've scanned as far as the end of the buffer. */
+ fs->point_offs = fs->p - fs->buf;
+}
+
+/* Ensure that FS has space for AMOUNT more bytes in its buffer, either by
+ growing the buffer, or by flushing it. True is returned iff we succeed. */
+int
+__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
+{
+ if ((size_t) (fs->end - fs->p) < amount)
+ {
+ ssize_t wrote;
+
+ /* Flush FS's buffer. */
+ __argp_fmtstream_update (fs);
+
+#ifdef _LIBC
+ __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
+ wrote = fs->p - fs->buf;
+#else
+ wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
+#endif
+ if (wrote == fs->p - fs->buf)
+ {
+ fs->p = fs->buf;
+ fs->point_offs = 0;
+ }
+ else
+ {
+ fs->p -= wrote;
+ fs->point_offs -= wrote;
+ memmove (fs->buf, fs->buf + wrote, fs->p - fs->buf);
+ return 0;
+ }
+
+ if ((size_t) (fs->end - fs->buf) < amount)
+ /* Gotta grow the buffer. */
+ {
+ size_t old_size = fs->end - fs->buf;
+ size_t new_size = old_size + amount;
+ char *new_buf;
+
+ if (new_size < old_size || ! (new_buf = realloc (fs->buf, new_size)))
+ {
+ __set_errno (ENOMEM);
+ return 0;
+ }
+
+ fs->buf = new_buf;
+ fs->end = new_buf + new_size;
+ fs->p = fs->buf;
+ }
+ }
+
+ return 1;
+}
+
+ssize_t
+__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
+{
+ int out;
+ size_t avail;
+ size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
+
+ do
+ {
+ va_list args;
+
+ if (! __argp_fmtstream_ensure (fs, size_guess))
+ return -1;
+
+ va_start (args, fmt);
+ avail = fs->end - fs->p;
+ out = __vsnprintf (fs->p, avail, fmt, args);
+ va_end (args);
+ if ((size_t) out >= avail)
+ size_guess = out + 1;
+ }
+ while ((size_t) out >= avail);
+
+ fs->p += out;
+
+ return out;
+}
+#if 0
+/* Not exported. */
+#ifdef weak_alias
+weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
+#endif
+#endif
+
+#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
diff --git a/grub-core/gnulib/argp-fmtstream.h b/grub-core/gnulib/argp-fmtstream.h
new file mode 100644
index 0000000..b913d1b
--- /dev/null
+++ b/grub-core/gnulib/argp-fmtstream.h
@@ -0,0 +1,354 @@
+/* Word-wrapping and line-truncating streams.
+ Copyright (C) 1997, 2006-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This package emulates glibc `line_wrap_stream' semantics for systems that
+ don't have that. If the system does have it, it is just a wrapper for
+ that. This header file is only used internally while compiling argp, and
+ shouldn't be installed. */
+
+#ifndef _ARGP_FMTSTREAM_H
+#define _ARGP_FMTSTREAM_H
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
+ || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
+/* line_wrap_stream is available, so use that. */
+#define ARGP_FMTSTREAM_USE_LINEWRAP
+#endif
+
+#ifdef ARGP_FMTSTREAM_USE_LINEWRAP
+/* Just be a simple wrapper for line_wrap_stream; the semantics are
+ *slightly* different, as line_wrap_stream doesn't actually make a new
+ object, it just modifies the given stream (reversibly) to do
+ line-wrapping. Since we control who uses this code, it doesn't matter. */
+
+#include <linewrap.h>
+
+typedef FILE *argp_fmtstream_t;
+
+#define argp_make_fmtstream line_wrap_stream
+#define __argp_make_fmtstream line_wrap_stream
+#define argp_fmtstream_free line_unwrap_stream
+#define __argp_fmtstream_free line_unwrap_stream
+
+#define __argp_fmtstream_putc(fs,ch) putc(ch,fs)
+#define argp_fmtstream_putc(fs,ch) putc(ch,fs)
+#define __argp_fmtstream_puts(fs,str) fputs(str,fs)
+#define argp_fmtstream_puts(fs,str) fputs(str,fs)
+#define __argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
+#define argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
+#define __argp_fmtstream_printf fprintf
+#define argp_fmtstream_printf fprintf
+
+#define __argp_fmtstream_lmargin line_wrap_lmargin
+#define argp_fmtstream_lmargin line_wrap_lmargin
+#define __argp_fmtstream_set_lmargin line_wrap_set_lmargin
+#define argp_fmtstream_set_lmargin line_wrap_set_lmargin
+#define __argp_fmtstream_rmargin line_wrap_rmargin
+#define argp_fmtstream_rmargin line_wrap_rmargin
+#define __argp_fmtstream_set_rmargin line_wrap_set_rmargin
+#define argp_fmtstream_set_rmargin line_wrap_set_rmargin
+#define __argp_fmtstream_wmargin line_wrap_wmargin
+#define argp_fmtstream_wmargin line_wrap_wmargin
+#define __argp_fmtstream_set_wmargin line_wrap_set_wmargin
+#define argp_fmtstream_set_wmargin line_wrap_set_wmargin
+#define __argp_fmtstream_point line_wrap_point
+#define argp_fmtstream_point line_wrap_point
+
+#else /* !ARGP_FMTSTREAM_USE_LINEWRAP */
+/* Guess we have to define our own version. */
+
+struct argp_fmtstream
+{
+ FILE *stream; /* The stream we're outputting to. */
+
+ size_t lmargin, rmargin; /* Left and right margins. */
+ ssize_t wmargin; /* Margin to wrap to, or -1 to truncate. */
+
+ /* Point in buffer to which we've processed for wrapping, but not output. */
+ size_t point_offs;
+ /* Output column at POINT_OFFS, or -1 meaning 0 but don't add lmargin. */
+ ssize_t point_col;
+
+ char *buf; /* Output buffer. */
+ char *p; /* Current end of text in BUF. */
+ char *end; /* Absolute end of BUF. */
+};
+
+typedef struct argp_fmtstream *argp_fmtstream_t;
+
+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
+ written on it with LMARGIN spaces and limits them to RMARGIN columns
+ total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
+ replacing the whitespace before them with a newline and WMARGIN spaces.
+ Otherwise, chars beyond RMARGIN are simply dropped until a newline.
+ Returns NULL if there was an error. */
+extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
+ size_t __lmargin,
+ size_t __rmargin,
+ ssize_t __wmargin);
+extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
+ size_t __lmargin,
+ size_t __rmargin,
+ ssize_t __wmargin);
+
+/* Flush __FS to its stream, and free it (but don't close the stream). */
+extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
+extern void argp_fmtstream_free (argp_fmtstream_t __fs);
+
+extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
+ const char *__fmt, ...)
+ __attribute__ ((__format__ (printf, 2, 3)));
+extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
+ const char *__fmt, ...)
+ __attribute__ ((__format__ (printf, 2, 3)));
+
+#if _LIBC || !defined __OPTIMIZE__
+extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+
+extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
+extern int argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
+
+extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
+ const char *__str, size_t __len);
+extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
+ const char *__str, size_t __len);
+#endif
+
+/* Access macros for various bits of state. */
+#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
+#define argp_fmtstream_rmargin(__fs) ((__fs)->rmargin)
+#define argp_fmtstream_wmargin(__fs) ((__fs)->wmargin)
+#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
+#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
+#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+
+#if _LIBC || !defined __OPTIMIZE__
+/* Set __FS's left margin to LMARGIN and return the old value. */
+extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
+ size_t __lmargin);
+extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
+ size_t __lmargin);
+
+/* Set __FS's right margin to __RMARGIN and return the old value. */
+extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
+ size_t __rmargin);
+extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
+ size_t __rmargin);
+
+/* Set __FS's wrap margin to __WMARGIN and return the old value. */
+extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
+ size_t __wmargin);
+extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
+ size_t __wmargin);
+
+/* Return the column number of the current output point in __FS. */
+extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
+extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
+#endif
+
+/* Internal routines. */
+extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
+extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
+extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
+extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
+
+#ifdef __OPTIMIZE__
+/* Inline versions of above routines. */
+
+#if !_LIBC
+#define __argp_fmtstream_putc argp_fmtstream_putc
+#define __argp_fmtstream_puts argp_fmtstream_puts
+#define __argp_fmtstream_write argp_fmtstream_write
+#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
+#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
+#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
+#define __argp_fmtstream_point argp_fmtstream_point
+#define __argp_fmtstream_update _argp_fmtstream_update
+#define __argp_fmtstream_ensure _argp_fmtstream_ensure
+#endif
+
+#ifndef ARGP_FS_EI
+# ifdef __GNUC__
+ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. It defines a macro
+ __GNUC_STDC_INLINE__ to indicate this situation or a macro
+ __GNUC_GNU_INLINE__ to indicate the opposite situation.
+
+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
+ semantics but warns, unless -fgnu89-inline is used:
+ warning: C99 inline functions are not supported; using GNU89
+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
+
+ Whereas Apple GCC 4.0.1 build 5479 without -std=c99 or -std=gnu99
+ implements the GNU C inline semantics and defines the macro
+ __GNUC_GNU_INLINE__, but it does not warn and does not support
+ __attribute__ ((__gnu_inline__)).
+
+ All in all, these are the possible combinations. For every compiler,
+ we need to choose ARGP_FS_EI so that the corresponding table cell
+ contains an "ok".
+
+ \ ARGP_FS_EI inline extern extern
+ \ inline inline
+ CC \ __attribute__
+ ((gnu_inline))
+
+ gcc 4.3.0 error ok ok
+ gcc 4.3.0 -std=gnu99 -fgnu89-inline error ok ok
+ gcc 4.3.0 -std=gnu99 ok error ok
+
+ gcc 4.2.2 error ok ok
+ gcc 4.2.2 -std=gnu99 -fgnu89-inline error ok ok
+ gcc 4.2.2 -std=gnu99 error warning ok
+
+ gcc 4.1.2 error ok warning
+ gcc 4.1.2 -std=gnu99 error ok warning
+
+ Apple gcc 4.0.1 error ok warning
+ Apple gcc 4.0.1 -std=gnu99 ok error warning
+ */
+# if defined __GNUC_STDC_INLINE__
+# define ARGP_FS_EI inline
+# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
+# define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__))
+# else
+# define ARGP_FS_EI extern inline
+# endif
+# else
+ /* With other compilers, assume the ISO C99 meaning of 'inline', if
+ the compiler supports 'inline' at all. */
+# define ARGP_FS_EI inline
+# endif
+#endif
+
+ARGP_FS_EI size_t
+__argp_fmtstream_write (argp_fmtstream_t __fs,
+ const char *__str, size_t __len)
+{
+ if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len))
+ {
+ memcpy (__fs->p, __str, __len);
+ __fs->p += __len;
+ return __len;
+ }
+ else
+ return 0;
+}
+
+ARGP_FS_EI int
+__argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str)
+{
+ size_t __len = strlen (__str);
+ if (__len)
+ {
+ size_t __wrote = __argp_fmtstream_write (__fs, __str, __len);
+ return __wrote == __len ? 0 : -1;
+ }
+ else
+ return 0;
+}
+
+ARGP_FS_EI int
+__argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch)
+{
+ if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1))
+ return *__fs->p++ = __ch;
+ else
+ return EOF;
+}
+
+/* Set __FS's left margin to __LMARGIN and return the old value. */
+ARGP_FS_EI size_t
+__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
+{
+ size_t __old;
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
+ __argp_fmtstream_update (__fs);
+ __old = __fs->lmargin;
+ __fs->lmargin = __lmargin;
+ return __old;
+}
+
+/* Set __FS's right margin to __RMARGIN and return the old value. */
+ARGP_FS_EI size_t
+__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
+{
+ size_t __old;
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
+ __argp_fmtstream_update (__fs);
+ __old = __fs->rmargin;
+ __fs->rmargin = __rmargin;
+ return __old;
+}
+
+/* Set FS's wrap margin to __WMARGIN and return the old value. */
+ARGP_FS_EI size_t
+__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
+{
+ size_t __old;
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
+ __argp_fmtstream_update (__fs);
+ __old = __fs->wmargin;
+ __fs->wmargin = __wmargin;
+ return __old;
+}
+
+/* Return the column number of the current output point in __FS. */
+ARGP_FS_EI size_t
+__argp_fmtstream_point (argp_fmtstream_t __fs)
+{
+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
+ __argp_fmtstream_update (__fs);
+ return __fs->point_col >= 0 ? __fs->point_col : 0;
+}
+
+#if !_LIBC
+#undef __argp_fmtstream_putc
+#undef __argp_fmtstream_puts
+#undef __argp_fmtstream_write
+#undef __argp_fmtstream_set_lmargin
+#undef __argp_fmtstream_set_rmargin
+#undef __argp_fmtstream_set_wmargin
+#undef __argp_fmtstream_point
+#undef __argp_fmtstream_update
+#undef __argp_fmtstream_ensure
+#endif
+
+#endif /* __OPTIMIZE__ */
+
+#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
+
+#endif /* argp-fmtstream.h */
diff --git a/grub-core/gnulib/argp-fs-xinl.c b/grub-core/gnulib/argp-fs-xinl.c
new file mode 100644
index 0000000..2c683f9
--- /dev/null
+++ b/grub-core/gnulib/argp-fs-xinl.c
@@ -0,0 +1,42 @@
+/* Real definitions for extern inline functions in argp-fmtstream.h
+ Copyright (C) 1997, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define ARGP_FS_EI
+#undef __OPTIMIZE__
+#define __OPTIMIZE__ 1
+#include "argp-fmtstream.h"
+
+#if 0
+/* Not exported. */
+/* Add weak aliases. */
+#if _LIBC - 0 && !defined (ARGP_FMTSTREAM_USE_LINEWRAP) && defined (weak_alias)
+
+weak_alias (__argp_fmtstream_putc, argp_fmtstream_putc)
+weak_alias (__argp_fmtstream_puts, argp_fmtstream_puts)
+weak_alias (__argp_fmtstream_write, argp_fmtstream_write)
+weak_alias (__argp_fmtstream_set_lmargin, argp_fmtstream_set_lmargin)
+weak_alias (__argp_fmtstream_set_rmargin, argp_fmtstream_set_rmargin)
+weak_alias (__argp_fmtstream_set_wmargin, argp_fmtstream_set_wmargin)
+weak_alias (__argp_fmtstream_point, argp_fmtstream_point)
+
+#endif
+#endif
diff --git a/grub-core/gnulib/argp-help.c b/grub-core/gnulib/argp-help.c
new file mode 100644
index 0000000..5b6d950
--- /dev/null
+++ b/grub-core/gnulib/argp-help.c
@@ -0,0 +1,1951 @@
+/* Hierarchial argument parsing help output
+ Copyright (C) 1995-2005, 2007, 2009-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <alloca.h>
+#include <errno.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <limits.h>
+#ifdef USE_IN_LIBIO
+# include <wchar.h>
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+# undef dgettext
+# define dgettext(domain, msgid) \
+ INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
+#else
+# include "gettext.h"
+#endif
+
+#include "argp.h"
+#include "argp-fmtstream.h"
+#include "argp-namefrob.h"
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+/* User-selectable (using an environment variable) formatting parameters.
+
+ These may be specified in an environment variable called `ARGP_HELP_FMT',
+ with a contents like: VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2
+ Where VALn must be a positive integer. The list of variables is in the
+ UPARAM_NAMES vector, below. */
+
+/* Default parameters. */
+#define DUP_ARGS 0 /* True if option argument can be duplicated. */
+#define DUP_ARGS_NOTE 1 /* True to print a note about duplicate args. */
+#define SHORT_OPT_COL 2 /* column in which short options start */
+#define LONG_OPT_COL 6 /* column in which long options start */
+#define DOC_OPT_COL 2 /* column in which doc options start */
+#define OPT_DOC_COL 29 /* column in which option text starts */
+#define HEADER_COL 1 /* column in which group headers are printed */
+#define USAGE_INDENT 12 /* indentation of wrapped usage lines */
+#define RMARGIN 79 /* right margin used for wrapping */
+
+/* User-selectable (using an environment variable) formatting parameters.
+ They must all be of type `int' for the parsing code to work. */
+struct uparams
+{
+ /* If true, arguments for an option are shown with both short and long
+ options, even when a given option has both, e.g. `-x ARG, --longx=ARG'.
+ If false, then if an option has both, the argument is only shown with
+ the long one, e.g., `-x, --longx=ARG', and a message indicating that
+ this really means both is printed below the options. */
+ int dup_args;
+
+ /* This is true if when DUP_ARGS is false, and some duplicate arguments have
+ been suppressed, an explanatory message should be printed. */
+ int dup_args_note;
+
+ /* Various output columns. */
+ int short_opt_col; /* column in which short options start */
+ int long_opt_col; /* column in which long options start */
+ int doc_opt_col; /* column in which doc options start */
+ int opt_doc_col; /* column in which option text starts */
+ int header_col; /* column in which group headers are printed */
+ int usage_indent; /* indentation of wrapped usage lines */
+ int rmargin; /* right margin used for wrapping */
+
+ int valid; /* True when the values in here are valid. */
+};
+
+/* This is a global variable, as user options are only ever read once. */
+static struct uparams uparams = {
+ DUP_ARGS, DUP_ARGS_NOTE,
+ SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL,
+ USAGE_INDENT, RMARGIN,
+ 0
+};
+
+/* A particular uparam, and what the user name is. */
+struct uparam_name
+{
+ const char *name; /* User name. */
+ int is_bool; /* Whether it's `boolean'. */
+ size_t uparams_offs; /* Location of the (int) field in UPARAMS. */
+};
+
+/* The name-field mappings we know about. */
+static const struct uparam_name uparam_names[] =
+{
+ { "dup-args", 1, offsetof (struct uparams, dup_args) },
+ { "dup-args-note", 1, offsetof (struct uparams, dup_args_note) },
+ { "short-opt-col", 0, offsetof (struct uparams, short_opt_col) },
+ { "long-opt-col", 0, offsetof (struct uparams, long_opt_col) },
+ { "doc-opt-col", 0, offsetof (struct uparams, doc_opt_col) },
+ { "opt-doc-col", 0, offsetof (struct uparams, opt_doc_col) },
+ { "header-col", 0, offsetof (struct uparams, header_col) },
+ { "usage-indent", 0, offsetof (struct uparams, usage_indent) },
+ { "rmargin", 0, offsetof (struct uparams, rmargin) },
+ { 0 }
+};
+
+static void
+validate_uparams (const struct argp_state *state, struct uparams *upptr)
+{
+ const struct uparam_name *up;
+
+ for (up = uparam_names; up->name; up++)
+ {
+ if (up->is_bool
+ || up->uparams_offs == offsetof (struct uparams, rmargin))
+ continue;
+ if (*(int *)((char *)upptr + up->uparams_offs) >= upptr->rmargin)
+ {
+ __argp_failure (state, 0, 0,
+ dgettext (state->root_argp->argp_domain,
+ "\
+ARGP_HELP_FMT: %s value is less than or equal to %s"),
+ "rmargin", up->name);
+ return;
+ }
+ }
+ uparams = *upptr;
+ uparams.valid = 1;
+}
+
+/* Read user options from the environment, and fill in UPARAMS appropiately. */
+static void
+fill_in_uparams (const struct argp_state *state)
+{
+ const char *var = getenv ("ARGP_HELP_FMT");
+ struct uparams new_params = uparams;
+
+#define SKIPWS(p) do { while (isspace ((unsigned char) *p)) p++; } while (0);
+
+ if (var)
+ {
+ /* Parse var. */
+ while (*var)
+ {
+ SKIPWS (var);
+
+ if (isalpha ((unsigned char) *var))
+ {
+ size_t var_len;
+ const struct uparam_name *un;
+ int unspec = 0, val = 0;
+ const char *arg = var;
+
+ while (isalnum ((unsigned char) *arg) || *arg == '-' || *arg == '_')
+ arg++;
+ var_len = arg - var;
+
+ SKIPWS (arg);
+
+ if (*arg == '\0' || *arg == ',')
+ unspec = 1;
+ else if (*arg == '=')
+ {
+ arg++;
+ SKIPWS (arg);
+ }
+
+ if (unspec)
+ {
+ if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
+ {
+ val = 0;
+ var += 3;
+ var_len -= 3;
+ }
+ else
+ val = 1;
+ }
+ else if (isdigit ((unsigned char) *arg))
+ {
+ val = atoi (arg);
+ while (isdigit ((unsigned char) *arg))
+ arg++;
+ SKIPWS (arg);
+ }
+
+ for (un = uparam_names; un->name; un++)
+ if (strlen (un->name) == var_len
+ && strncmp (var, un->name, var_len) == 0)
+ {
+ if (unspec && !un->is_bool)
+ __argp_failure (state, 0, 0,
+ dgettext (state->root_argp->argp_domain,
+ "\
+%.*s: ARGP_HELP_FMT parameter requires a value"),
+ (int) var_len, var);
+ else if (val < 0)
+ __argp_failure (state, 0, 0,
+ dgettext (state->root_argp->argp_domain,
+ "\
+%.*s: ARGP_HELP_FMT parameter must be positive"),
+ (int) var_len, var);
+ else
+ *(int *)((char *)&new_params + un->uparams_offs) = val;
+ break;
+ }
+ if (! un->name)
+ __argp_failure (state, 0, 0,
+ dgettext (state->root_argp->argp_domain, "\
+%.*s: Unknown ARGP_HELP_FMT parameter"),
+ (int) var_len, var);
+
+ var = arg;
+ if (*var == ',')
+ var++;
+ }
+ else if (*var)
+ {
+ __argp_failure (state, 0, 0,
+ dgettext (state->root_argp->argp_domain,
+ "Garbage in ARGP_HELP_FMT: %s"), var);
+ break;
+ }
+ }
+ validate_uparams (state, &new_params);
+ }
+}
+
+/* Returns true if OPT hasn't been marked invisible. Visibility only affects
+ whether OPT is displayed or used in sorting, not option shadowing. */
+#define ovisible(opt) (! ((opt)->flags & OPTION_HIDDEN))
+
+/* Returns true if OPT is an alias for an earlier option. */
+#define oalias(opt) ((opt)->flags & OPTION_ALIAS)
+
+/* Returns true if OPT is an documentation-only entry. */
+#define odoc(opt) ((opt)->flags & OPTION_DOC)
+
+/* Returns true if OPT should not be translated */
+#define onotrans(opt) ((opt)->flags & OPTION_NO_TRANS)
+
+/* Returns true if OPT is the end-of-list marker for a list of options. */
+#define oend(opt) __option_is_end (opt)
+
+/* Returns true if OPT has a short option. */
+#define oshort(opt) __option_is_short (opt)
+
+/*
+ The help format for a particular option is like:
+
+ -xARG, -yARG, --long1=ARG, --long2=ARG Documentation...
+
+ Where ARG will be omitted if there's no argument, for this option, or
+ will be surrounded by "[" and "]" appropiately if the argument is
+ optional. The documentation string is word-wrapped appropiately, and if
+ the list of options is long enough, it will be started on a separate line.
+ If there are no short options for a given option, the first long option is
+ indented slighly in a way that's supposed to make most long options appear
+ to be in a separate column.
+
+ For example, the following output (from ps):
+
+ -p PID, --pid=PID List the process PID
+ --pgrp=PGRP List processes in the process group PGRP
+ -P, -x, --no-parent Include processes without parents
+ -Q, --all-fields Don't elide unusable fields (normally if there's
+ some reason ps can't print a field for any
+ process, it's removed from the output entirely)
+ -r, --reverse, --gratuitously-long-reverse-option
+ Reverse the order of any sort
+ --session[=SID] Add the processes from the session SID (which
+ defaults to the sid of the current process)
+
+ Here are some more options:
+ -f ZOT, --foonly=ZOT Glork a foonly
+ -z, --zaza Snit a zar
+
+ -?, --help Give this help list
+ --usage Give a short usage message
+ -V, --version Print program version
+
+ The struct argp_option array for the above could look like:
+
+ {
+ {"pid", 'p', "PID", 0, "List the process PID"},
+ {"pgrp", OPT_PGRP, "PGRP", 0, "List processes in the process group PGRP"},
+ {"no-parent", 'P', 0, 0, "Include processes without parents"},
+ {0, 'x', 0, OPTION_ALIAS},
+ {"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally"
+ " if there's some reason ps can't"
+ " print a field for any process, it's"
+ " removed from the output entirely)" },
+ {"reverse", 'r', 0, 0, "Reverse the order of any sort"},
+ {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
+ {"session", OPT_SESS, "SID", OPTION_ARG_OPTIONAL,
+ "Add the processes from the session"
+ " SID (which defaults to the sid of"
+ " the current process)" },
+
+ {0,0,0,0, "Here are some more options:"},
+ {"foonly", 'f', "ZOT", 0, "Glork a foonly"},
+ {"zaza", 'z', 0, 0, "Snit a zar"},
+
+ {0}
+ }
+
+ Note that the last three options are automatically supplied by argp_parse,
+ unless you tell it not to with ARGP_NO_HELP.
+
+*/
+
+/* Returns true if CH occurs between BEG and END. */
+static int
+find_char (char ch, char *beg, char *end)
+{
+ while (beg < end)
+ if (*beg == ch)
+ return 1;
+ else
+ beg++;
+ return 0;
+}
+
+struct hol_cluster; /* fwd decl */
+
+struct hol_entry
+{
+ /* First option. */
+ const struct argp_option *opt;
+ /* Number of options (including aliases). */
+ unsigned num;
+
+ /* A pointers into the HOL's short_options field, to the first short option
+ letter for this entry. The order of the characters following this point
+ corresponds to the order of options pointed to by OPT, and there are at
+ most NUM. A short option recorded in a option following OPT is only
+ valid if it occurs in the right place in SHORT_OPTIONS (otherwise it's
+ probably been shadowed by some other entry). */
+ char *short_options;
+
+ /* Entries are sorted by their group first, in the order:
+ 1, 2, ..., n, 0, -m, ..., -2, -1
+ and then alphabetically within each group. The default is 0. */
+ int group;
+
+ /* The cluster of options this entry belongs to, or 0 if none. */
+ struct hol_cluster *cluster;
+
+ /* The argp from which this option came. */
+ const struct argp *argp;
+
+ /* Position in the array */
+ unsigned ord;
+};
+
+/* A cluster of entries to reflect the argp tree structure. */
+struct hol_cluster
+{
+ /* A descriptive header printed before options in this cluster. */
+ const char *header;
+
+ /* Used to order clusters within the same group with the same parent,
+ according to the order in which they occurred in the parent argp's child
+ list. */
+ int index;
+
+ /* How to sort this cluster with respect to options and other clusters at the
+ same depth (clusters always follow options in the same group). */
+ int group;
+
+ /* The cluster to which this cluster belongs, or 0 if it's at the base
+ level. */
+ struct hol_cluster *parent;
+
+ /* The argp from which this cluster is (eventually) derived. */
+ const struct argp *argp;
+
+ /* The distance this cluster is from the root. */
+ int depth;
+
+ /* Clusters in a given hol are kept in a linked list, to make freeing them
+ possible. */
+ struct hol_cluster *next;
+};
+
+/* A list of options for help. */
+struct hol
+{
+ /* An array of hol_entry's. */
+ struct hol_entry *entries;
+ /* The number of entries in this hol. If this field is zero, the others
+ are undefined. */
+ unsigned num_entries;
+
+ /* A string containing all short options in this HOL. Each entry contains
+ pointers into this string, so the order can't be messed with blindly. */
+ char *short_options;
+
+ /* Clusters of entries in this hol. */
+ struct hol_cluster *clusters;
+};
+
+/* Create a struct hol from the options in ARGP. CLUSTER is the
+ hol_cluster in which these entries occur, or 0, if at the root. */
+static struct hol *
+make_hol (const struct argp *argp, struct hol_cluster *cluster)
+{
+ char *so;
+ const struct argp_option *o;
+ const struct argp_option *opts = argp->options;
+ struct hol_entry *entry;
+ unsigned num_short_options = 0;
+ struct hol *hol = malloc (sizeof (struct hol));
+
+ assert (hol);
+
+ hol->num_entries = 0;
+ hol->clusters = 0;
+
+ if (opts)
+ {
+ int cur_group = 0;
+
+ /* The first option must not be an alias. */
+ assert (! oalias (opts));
+
+ /* Calculate the space needed. */
+ for (o = opts; ! oend (o); o++)
+ {
+ if (! oalias (o))
+ hol->num_entries++;
+ if (oshort (o))
+ num_short_options++; /* This is an upper bound. */
+ }
+
+ hol->entries = malloc (sizeof (struct hol_entry) * hol->num_entries);
+ hol->short_options = malloc (num_short_options + 1);
+
+ assert (hol->entries && hol->short_options);
+ if (SIZE_MAX <= UINT_MAX)
+ assert (hol->num_entries <= SIZE_MAX / sizeof (struct hol_entry));
+
+ /* Fill in the entries. */
+ so = hol->short_options;
+ for (o = opts, entry = hol->entries; ! oend (o); entry++)
+ {
+ entry->opt = o;
+ entry->num = 0;
+ entry->short_options = so;
+ entry->group = cur_group =
+ o->group
+ ? o->group
+ : ((!o->name && !o->key)
+ ? cur_group + 1
+ : cur_group);
+ entry->cluster = cluster;
+ entry->argp = argp;
+
+ do
+ {
+ entry->num++;
+ if (oshort (o) && ! find_char (o->key, hol->short_options, so))
+ /* O has a valid short option which hasn't already been used.*/
+ *so++ = o->key;
+ o++;
+ }
+ while (! oend (o) && oalias (o));
+ }
+ *so = '\0'; /* null terminated so we can find the length */
+ }
+
+ return hol;
+}
+
+/* Add a new cluster to HOL, with the given GROUP and HEADER (taken from the
+ associated argp child list entry), INDEX, and PARENT, and return a pointer
+ to it. ARGP is the argp that this cluster results from. */
+static struct hol_cluster *
+hol_add_cluster (struct hol *hol, int group, const char *header, int index,
+ struct hol_cluster *parent, const struct argp *argp)
+{
+ struct hol_cluster *cl = malloc (sizeof (struct hol_cluster));
+ if (cl)
+ {
+ cl->group = group;
+ cl->header = header;
+
+ cl->index = index;
+ cl->parent = parent;
+ cl->argp = argp;
+ cl->depth = parent ? parent->depth + 1 : 0;
+
+ cl->next = hol->clusters;
+ hol->clusters = cl;
+ }
+ return cl;
+}
+
+/* Free HOL and any resources it uses. */
+static void
+hol_free (struct hol *hol)
+{
+ struct hol_cluster *cl = hol->clusters;
+
+ while (cl)
+ {
+ struct hol_cluster *next = cl->next;
+ free (cl);
+ cl = next;
+ }
+
+ if (hol->num_entries > 0)
+ {
+ free (hol->entries);
+ free (hol->short_options);
+ }
+
+ free (hol);
+}
+
+static int
+hol_entry_short_iterate (const struct hol_entry *entry,
+ int (*func)(const struct argp_option *opt,
+ const struct argp_option *real,
+ const char *domain, void *cookie),
+ const char *domain, void *cookie)
+{
+ unsigned nopts;
+ int val = 0;
+ const struct argp_option *opt, *real = entry->opt;
+ char *so = entry->short_options;
+
+ for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
+ if (oshort (opt) && *so == opt->key)
+ {
+ if (!oalias (opt))
+ real = opt;
+ if (ovisible (opt))
+ val = (*func)(opt, real, domain, cookie);
+ so++;
+ }
+
+ return val;
+}
+
+static inline int
+__attribute__ ((always_inline))
+hol_entry_long_iterate (const struct hol_entry *entry,
+ int (*func)(const struct argp_option *opt,
+ const struct argp_option *real,
+ const char *domain, void *cookie),
+ const char *domain, void *cookie)
+{
+ unsigned nopts;
+ int val = 0;
+ const struct argp_option *opt, *real = entry->opt;
+
+ for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
+ if (opt->name)
+ {
+ if (!oalias (opt))
+ real = opt;
+ if (ovisible (opt))
+ val = (*func)(opt, real, domain, cookie);
+ }
+
+ return val;
+}
+
+/* Iterator that returns true for the first short option. */
+static int
+until_short (const struct argp_option *opt, const struct argp_option *real,
+ const char *domain, void *cookie)
+{
+ return oshort (opt) ? opt->key : 0;
+}
+
+/* Returns the first valid short option in ENTRY, or 0 if there is none. */
+static char
+hol_entry_first_short (const struct hol_entry *entry)
+{
+ return hol_entry_short_iterate (entry, until_short,
+ entry->argp->argp_domain, 0);
+}
+
+/* Returns the first valid long option in ENTRY, or 0 if there is none. */
+static const char *
+hol_entry_first_long (const struct hol_entry *entry)
+{
+ const struct argp_option *opt;
+ unsigned num;
+ for (opt = entry->opt, num = entry->num; num > 0; opt++, num--)
+ if (opt->name && ovisible (opt))
+ return opt->name;
+ return 0;
+}
+
+/* Returns the entry in HOL with the long option name NAME, or 0 if there is
+ none. */
+static struct hol_entry *
+hol_find_entry (struct hol *hol, const char *name)
+{
+ struct hol_entry *entry = hol->entries;
+ unsigned num_entries = hol->num_entries;
+
+ while (num_entries-- > 0)
+ {
+ const struct argp_option *opt = entry->opt;
+ unsigned num_opts = entry->num;
+
+ while (num_opts-- > 0)
+ if (opt->name && ovisible (opt) && strcmp (opt->name, name) == 0)
+ return entry;
+ else
+ opt++;
+
+ entry++;
+ }
+
+ return 0;
+}
+
+/* If an entry with the long option NAME occurs in HOL, set it's special
+ sort position to GROUP. */
+static void
+hol_set_group (struct hol *hol, const char *name, int group)
+{
+ struct hol_entry *entry = hol_find_entry (hol, name);
+ if (entry)
+ entry->group = group;
+}
+
+/* Order by group: 0, 1, 2, ..., n, -m, ..., -2, -1.
+ EQ is what to return if GROUP1 and GROUP2 are the same. */
+static int
+group_cmp (int group1, int group2, int eq)
+{
+ if (group1 == group2)
+ return eq;
+ else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0))
+ return group1 - group2;
+ else
+ return group2 - group1;
+}
+
+/* Compare clusters CL1 & CL2 by the order that they should appear in
+ output. */
+static int
+hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2)
+{
+ /* If one cluster is deeper than the other, use its ancestor at the same
+ level, so that finding the common ancestor is straightforward.
+
+ clN->depth > 0 means that clN->parent != NULL (see hol_add_cluster) */
+ while (cl1->depth > cl2->depth)
+ cl1 = cl1->parent;
+ while (cl2->depth > cl1->depth)
+ cl2 = cl2->parent;
+
+ /* Now reduce both clusters to their ancestors at the point where both have
+ a common parent; these can be directly compared. */
+ while (cl1->parent != cl2->parent)
+ cl1 = cl1->parent, cl2 = cl2->parent;
+
+ return group_cmp (cl1->group, cl2->group, cl2->index - cl1->index);
+}
+
+/* Return the ancestor of CL that's just below the root (i.e., has a parent
+ of 0). */
+static struct hol_cluster *
+hol_cluster_base (struct hol_cluster *cl)
+{
+ while (cl->parent)
+ cl = cl->parent;
+ return cl;
+}
+
+/* Return true if CL1 is a child of CL2. */
+static int
+hol_cluster_is_child (const struct hol_cluster *cl1,
+ const struct hol_cluster *cl2)
+{
+ while (cl1 && cl1 != cl2)
+ cl1 = cl1->parent;
+ return cl1 == cl2;
+}
+
+/* Given the name of a OPTION_DOC option, modifies NAME to start at the tail
+ that should be used for comparisons, and returns true iff it should be
+ treated as a non-option. */
+static int
+canon_doc_option (const char **name)
+{
+ int non_opt;
+
+ if (!*name)
+ non_opt = 1;
+ else
+ {
+ /* Skip initial whitespace. */
+ while (isspace ((unsigned char) **name))
+ (*name)++;
+ /* Decide whether this looks like an option (leading `-') or not. */
+ non_opt = (**name != '-');
+ /* Skip until part of name used for sorting. */
+ while (**name && !isalnum ((unsigned char) **name))
+ (*name)++;
+ }
+ return non_opt;
+}
+
+#define HOL_ENTRY_PTRCMP(a,b) ((a)->ord < (b)->ord ? -1 : 1)
+
+/* Order ENTRY1 & ENTRY2 by the order which they should appear in a help
+ listing. */
+static int
+hol_entry_cmp (const struct hol_entry *entry1,
+ const struct hol_entry *entry2)
+{
+ /* The group numbers by which the entries should be ordered; if either is
+ in a cluster, then this is just the group within the cluster. */
+ int group1 = entry1->group, group2 = entry2->group;
+ int rc;
+
+ if (entry1->cluster != entry2->cluster)
+ {
+ /* The entries are not within the same cluster, so we can't compare them
+ directly, we have to use the appropiate clustering level too. */
+ if (! entry1->cluster)
+ /* ENTRY1 is at the `base level', not in a cluster, so we have to
+ compare it's group number with that of the base cluster in which
+ ENTRY2 resides. Note that if they're in the same group, the
+ clustered option always comes laster. */
+ return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
+ else if (! entry2->cluster)
+ /* Likewise, but ENTRY2's not in a cluster. */
+ return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
+ else
+ /* Both entries are in clusters, we can just compare the clusters. */
+ return (rc = hol_cluster_cmp (entry1->cluster, entry2->cluster)) ?
+ rc : HOL_ENTRY_PTRCMP (entry1, entry2);
+ }
+ else if (group1 == group2)
+ /* The entries are both in the same cluster and group, so compare them
+ alphabetically. */
+ {
+ int short1 = hol_entry_first_short (entry1);
+ int short2 = hol_entry_first_short (entry2);
+ int doc1 = odoc (entry1->opt);
+ int doc2 = odoc (entry2->opt);
+ const char *long1 = hol_entry_first_long (entry1);
+ const char *long2 = hol_entry_first_long (entry2);
+
+ if (doc1)
+ doc1 = canon_doc_option (&long1);
+ if (doc2)
+ doc2 = canon_doc_option (&long2);
+
+ if (doc1 != doc2)
+ /* `documentation' options always follow normal options (or
+ documentation options that *look* like normal options). */
+ return doc1 - doc2;
+ else if (!short1 && !short2 && long1 && long2)
+ /* Only long options. */
+ return (rc = __strcasecmp (long1, long2)) ?
+ rc : HOL_ENTRY_PTRCMP (entry1, entry2);
+ else
+ /* Compare short/short, long/short, short/long, using the first
+ character of long options. Entries without *any* valid
+ options (such as options with OPTION_HIDDEN set) will be put
+ first, but as they're not displayed, it doesn't matter where
+ they are. */
+ {
+ unsigned char first1 = short1 ? short1 : long1 ? *long1 : 0;
+ unsigned char first2 = short2 ? short2 : long2 ? *long2 : 0;
+ /* Use tolower, not _tolower, since only the former is
+ guaranteed to work on something already lower case. */
+ int lower_cmp = tolower (first1) - tolower (first2);
+ /* Compare ignoring case, except when the options are both the
+ same letter, in which case lower-case always comes first. */
+ return lower_cmp ? lower_cmp :
+ (rc = first2 - first1) ?
+ rc : HOL_ENTRY_PTRCMP (entry1, entry2);
+ }
+ }
+ else
+ /* Within the same cluster, but not the same group, so just compare
+ groups. */
+ return group_cmp (group1, group2, HOL_ENTRY_PTRCMP (entry1, entry2));
+}
+
+/* Version of hol_entry_cmp with correct signature for qsort. */
+static int
+hol_entry_qcmp (const void *entry1_v, const void *entry2_v)
+{
+ return hol_entry_cmp (entry1_v, entry2_v);
+}
+
+/* Sort HOL by group and alphabetically by option name (with short options
+ taking precedence over long). Since the sorting is for display purposes
+ only, the shadowing of options isn't effected. */
+static void
+hol_sort (struct hol *hol)
+{
+ if (hol->num_entries > 0)
+ {
+ unsigned i;
+ struct hol_entry *e;
+ for (i = 0, e = hol->entries; i < hol->num_entries; i++, e++)
+ e->ord = i;
+ qsort (hol->entries, hol->num_entries, sizeof (struct hol_entry),
+ hol_entry_qcmp);
+ }
+}
+
+/* Append MORE to HOL, destroying MORE in the process. Options in HOL shadow
+ any in MORE with the same name. */
+static void
+hol_append (struct hol *hol, struct hol *more)
+{
+ struct hol_cluster **cl_end = &hol->clusters;
+
+ /* Steal MORE's cluster list, and add it to the end of HOL's. */
+ while (*cl_end)
+ cl_end = &(*cl_end)->next;
+ *cl_end = more->clusters;
+ more->clusters = 0;
+
+ /* Merge entries. */
+ if (more->num_entries > 0)
+ {
+ if (hol->num_entries == 0)
+ {
+ hol->num_entries = more->num_entries;
+ hol->entries = more->entries;
+ hol->short_options = more->short_options;
+ more->num_entries = 0; /* Mark MORE's fields as invalid. */
+ }
+ else
+ /* Append the entries in MORE to those in HOL, taking care to only add
+ non-shadowed SHORT_OPTIONS values. */
+ {
+ unsigned left;
+ char *so, *more_so;
+ struct hol_entry *e;
+ unsigned num_entries = hol->num_entries + more->num_entries;
+ struct hol_entry *entries =
+ malloc (num_entries * sizeof (struct hol_entry));
+ unsigned hol_so_len = strlen (hol->short_options);
+ char *short_options =
+ malloc (hol_so_len + strlen (more->short_options) + 1);
+
+ assert (entries && short_options);
+ if (SIZE_MAX <= UINT_MAX)
+ assert (num_entries <= SIZE_MAX / sizeof (struct hol_entry));
+
+ __mempcpy (__mempcpy (entries, hol->entries,
+ hol->num_entries * sizeof (struct hol_entry)),
+ more->entries,
+ more->num_entries * sizeof (struct hol_entry));
+
+ __mempcpy (short_options, hol->short_options, hol_so_len);
+
+ /* Fix up the short options pointers from HOL. */
+ for (e = entries, left = hol->num_entries; left > 0; e++, left--)
+ e->short_options += (short_options - hol->short_options);
+
+ /* Now add the short options from MORE, fixing up its entries
+ too. */
+ so = short_options + hol_so_len;
+ more_so = more->short_options;
+ for (left = more->num_entries; left > 0; e++, left--)
+ {
+ int opts_left;
+ const struct argp_option *opt;
+
+ e->short_options = so;
+
+ for (opts_left = e->num, opt = e->opt; opts_left; opt++, opts_left--)
+ {
+ int ch = *more_so;
+ if (oshort (opt) && ch == opt->key)
+ /* The next short option in MORE_SO, CH, is from OPT. */
+ {
+ if (! find_char (ch, short_options,
+ short_options + hol_so_len))
+ /* The short option CH isn't shadowed by HOL's options,
+ so add it to the sum. */
+ *so++ = ch;
+ more_so++;
+ }
+ }
+ }
+
+ *so = '\0';
+
+ free (hol->entries);
+ free (hol->short_options);
+
+ hol->entries = entries;
+ hol->num_entries = num_entries;
+ hol->short_options = short_options;
+ }
+ }
+
+ hol_free (more);
+}
+
+/* Inserts enough spaces to make sure STREAM is at column COL. */
+static void
+indent_to (argp_fmtstream_t stream, unsigned col)
+{
+ int needed = col - __argp_fmtstream_point (stream);
+ while (needed-- > 0)
+ __argp_fmtstream_putc (stream, ' ');
+}
+
+/* Output to STREAM either a space, or a newline if there isn't room for at
+ least ENSURE characters before the right margin. */
+static void
+space (argp_fmtstream_t stream, size_t ensure)
+{
+ if (__argp_fmtstream_point (stream) + ensure
+ >= __argp_fmtstream_rmargin (stream))
+ __argp_fmtstream_putc (stream, '\n');
+ else
+ __argp_fmtstream_putc (stream, ' ');
+}
+
+/* If the option REAL has an argument, we print it in using the printf
+ format REQ_FMT or OPT_FMT depending on whether it's a required or
+ optional argument. */
+static void
+arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt,
+ const char *domain, argp_fmtstream_t stream)
+{
+ if (real->arg)
+ {
+ if (real->flags & OPTION_ARG_OPTIONAL)
+ __argp_fmtstream_printf (stream, opt_fmt,
+ dgettext (domain, real->arg));
+ else
+ __argp_fmtstream_printf (stream, req_fmt,
+ dgettext (domain, real->arg));
+ }
+}
+
+/* Helper functions for hol_entry_help. */
+
+/* State used during the execution of hol_help. */
+struct hol_help_state
+{
+ /* PREV_ENTRY should contain the previous entry printed, or 0. */
+ struct hol_entry *prev_entry;
+
+ /* If an entry is in a different group from the previous one, and SEP_GROUPS
+ is true, then a blank line will be printed before any output. */
+ int sep_groups;
+
+ /* True if a duplicate option argument was suppressed (only ever set if
+ UPARAMS.dup_args is false). */
+ int suppressed_dup_arg;
+};
+
+/* Some state used while printing a help entry (used to communicate with
+ helper functions). See the doc for hol_entry_help for more info, as most
+ of the fields are copied from its arguments. */
+struct pentry_state
+{
+ const struct hol_entry *entry;
+ argp_fmtstream_t stream;
+ struct hol_help_state *hhstate;
+
+ /* True if nothing's been printed so far. */
+ int first;
+
+ /* If non-zero, the state that was used to print this help. */
+ const struct argp_state *state;
+};
+
+/* If a user doc filter should be applied to DOC, do so. */
+static const char *
+filter_doc (const char *doc, int key, const struct argp *argp,
+ const struct argp_state *state)
+{
+ if (argp->help_filter)
+ /* We must apply a user filter to this output. */
+ {
+ void *input = __argp_input (argp, state);
+ return (*argp->help_filter) (key, doc, input);
+ }
+ else
+ /* No filter. */
+ return doc;
+}
+
+/* Prints STR as a header line, with the margin lines set appropiately, and
+ notes the fact that groups should be separated with a blank line. ARGP is
+ the argp that should dictate any user doc filtering to take place. Note
+ that the previous wrap margin isn't restored, but the left margin is reset
+ to 0. */
+static void
+print_header (const char *str, const struct argp *argp,
+ struct pentry_state *pest)
+{
+ const char *tstr = dgettext (argp->argp_domain, str);
+ const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_HEADER, argp, pest->state);
+
+ if (fstr)
+ {
+ if (*fstr)
+ {
+ if (pest->hhstate->prev_entry)
+ /* Precede with a blank line. */
+ __argp_fmtstream_putc (pest->stream, '\n');
+ indent_to (pest->stream, uparams.header_col);
+ __argp_fmtstream_set_lmargin (pest->stream, uparams.header_col);
+ __argp_fmtstream_set_wmargin (pest->stream, uparams.header_col);
+ __argp_fmtstream_puts (pest->stream, fstr);
+ __argp_fmtstream_set_lmargin (pest->stream, 0);
+ __argp_fmtstream_putc (pest->stream, '\n');
+ }
+
+ pest->hhstate->sep_groups = 1; /* Separate subsequent groups. */
+ }
+
+ if (fstr != tstr)
+ free ((char *) fstr);
+}
+
+/* Inserts a comma if this isn't the first item on the line, and then makes
+ sure we're at least to column COL. If this *is* the first item on a line,
+ prints any pending whitespace/headers that should precede this line. Also
+ clears FIRST. */
+static void
+comma (unsigned col, struct pentry_state *pest)
+{
+ if (pest->first)
+ {
+ const struct hol_entry *pe = pest->hhstate->prev_entry;
+ const struct hol_cluster *cl = pest->entry->cluster;
+
+ if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group)
+ __argp_fmtstream_putc (pest->stream, '\n');
+
+ if (cl && cl->header && *cl->header
+ && (!pe
+ || (pe->cluster != cl
+ && !hol_cluster_is_child (pe->cluster, cl))))
+ /* If we're changing clusters, then this must be the start of the
+ ENTRY's cluster unless that is an ancestor of the previous one
+ (in which case we had just popped into a sub-cluster for a bit).
+ If so, then print the cluster's header line. */
+ {
+ int old_wm = __argp_fmtstream_wmargin (pest->stream);
+ print_header (cl->header, cl->argp, pest);
+ __argp_fmtstream_set_wmargin (pest->stream, old_wm);
+ }
+
+ pest->first = 0;
+ }
+ else
+ __argp_fmtstream_puts (pest->stream, ", ");
+
+ indent_to (pest->stream, col);
+}
+
+/* Print help for ENTRY to STREAM. */
+static void
+hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
+ argp_fmtstream_t stream, struct hol_help_state *hhstate)
+{
+ unsigned num;
+ const struct argp_option *real = entry->opt, *opt;
+ char *so = entry->short_options;
+ int have_long_opt = 0; /* We have any long options. */
+ /* Saved margins. */
+ int old_lm = __argp_fmtstream_set_lmargin (stream, 0);
+ int old_wm = __argp_fmtstream_wmargin (stream);
+ /* PEST is a state block holding some of our variables that we'd like to
+ share with helper functions. */
+ struct pentry_state pest;
+
+ pest.entry = entry;
+ pest.stream = stream;
+ pest.hhstate = hhstate;
+ pest.first = 1;
+ pest.state = state;
+
+ if (! odoc (real))
+ for (opt = real, num = entry->num; num > 0; opt++, num--)
+ if (opt->name && ovisible (opt))
+ {
+ have_long_opt = 1;
+ break;
+ }
+
+ /* First emit short options. */
+ __argp_fmtstream_set_wmargin (stream, uparams.short_opt_col); /* For truly bizarre cases. */
+ for (opt = real, num = entry->num; num > 0; opt++, num--)
+ if (oshort (opt) && opt->key == *so)
+ /* OPT has a valid (non shadowed) short option. */
+ {
+ if (ovisible (opt))
+ {
+ comma (uparams.short_opt_col, &pest);
+ __argp_fmtstream_putc (stream, '-');
+ __argp_fmtstream_putc (stream, *so);
+ if (!have_long_opt || uparams.dup_args)
+ arg (real, " %s", "[%s]", state->root_argp->argp_domain, stream);
+ else if (real->arg)
+ hhstate->suppressed_dup_arg = 1;
+ }
+ so++;
+ }
+
+ /* Now, long options. */
+ if (odoc (real))
+ /* A `documentation' option. */
+ {
+ __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col);
+ for (opt = real, num = entry->num; num > 0; opt++, num--)
+ if (opt->name && *opt->name && ovisible (opt))
+ {
+ comma (uparams.doc_opt_col, &pest);
+ /* Calling dgettext here isn't quite right, since sorting will
+ have been done on the original; but documentation options
+ should be pretty rare anyway... */
+ __argp_fmtstream_puts (stream,
+ onotrans (opt) ?
+ opt->name :
+ dgettext (state->root_argp->argp_domain,
+ opt->name));
+ }
+ }
+ else
+ /* A real long option. */
+ {
+ int first_long_opt = 1;
+
+ __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col);
+ for (opt = real, num = entry->num; num > 0; opt++, num--)
+ if (opt->name && ovisible (opt))
+ {
+ comma (uparams.long_opt_col, &pest);
+ __argp_fmtstream_printf (stream, "--%s", opt->name);
+ if (first_long_opt || uparams.dup_args)
+ arg (real, "=%s", "[=%s]", state->root_argp->argp_domain,
+ stream);
+ else if (real->arg)
+ hhstate->suppressed_dup_arg = 1;
+ }
+ }
+
+ /* Next, documentation strings. */
+ __argp_fmtstream_set_lmargin (stream, 0);
+
+ if (pest.first)
+ {
+ /* Didn't print any switches, what's up? */
+ if (!oshort (real) && !real->name)
+ /* This is a group header, print it nicely. */
+ print_header (real->doc, entry->argp, &pest);
+ else
+ /* Just a totally shadowed option or null header; print nothing. */
+ goto cleanup; /* Just return, after cleaning up. */
+ }
+ else
+ {
+ const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain,
+ real->doc) : 0;
+ const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
+ if (fstr && *fstr)
+ {
+ unsigned int col = __argp_fmtstream_point (stream);
+
+ __argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
+ __argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
+
+ if (col > (unsigned int) (uparams.opt_doc_col + 3))
+ __argp_fmtstream_putc (stream, '\n');
+ else if (col >= (unsigned int) uparams.opt_doc_col)
+ __argp_fmtstream_puts (stream, " ");
+ else
+ indent_to (stream, uparams.opt_doc_col);
+
+ __argp_fmtstream_puts (stream, fstr);
+ }
+ if (fstr && fstr != tstr)
+ free ((char *) fstr);
+
+ /* Reset the left margin. */
+ __argp_fmtstream_set_lmargin (stream, 0);
+ __argp_fmtstream_putc (stream, '\n');
+ }
+
+ hhstate->prev_entry = entry;
+
+cleanup:
+ __argp_fmtstream_set_lmargin (stream, old_lm);
+ __argp_fmtstream_set_wmargin (stream, old_wm);
+}
+
+/* Output a long help message about the options in HOL to STREAM. */
+static void
+hol_help (struct hol *hol, const struct argp_state *state,
+ argp_fmtstream_t stream)
+{
+ unsigned num;
+ struct hol_entry *entry;
+ struct hol_help_state hhstate = { 0, 0, 0 };
+
+ for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--)
+ hol_entry_help (entry, state, stream, &hhstate);
+
+ if (hhstate.suppressed_dup_arg && uparams.dup_args_note)
+ {
+ const char *tstr = dgettext (state->root_argp->argp_domain, "\
+Mandatory or optional arguments to long options are also mandatory or \
+optional for any corresponding short options.");
+ const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
+ state ? state->root_argp : 0, state);
+ if (fstr && *fstr)
+ {
+ __argp_fmtstream_putc (stream, '\n');
+ __argp_fmtstream_puts (stream, fstr);
+ __argp_fmtstream_putc (stream, '\n');
+ }
+ if (fstr && fstr != tstr)
+ free ((char *) fstr);
+ }
+}
+
+/* Helper functions for hol_usage. */
+
+/* If OPT is a short option without an arg, append its key to the string
+ pointer pointer to by COOKIE, and advance the pointer. */
+static int
+add_argless_short_opt (const struct argp_option *opt,
+ const struct argp_option *real,
+ const char *domain, void *cookie)
+{
+ char **snao_end = cookie;
+ if (!(opt->arg || real->arg)
+ && !((opt->flags | real->flags) & OPTION_NO_USAGE))
+ *(*snao_end)++ = opt->key;
+ return 0;
+}
+
+/* If OPT is a short option with an arg, output a usage entry for it to the
+ stream pointed at by COOKIE. */
+static int
+usage_argful_short_opt (const struct argp_option *opt,
+ const struct argp_option *real,
+ const char *domain, void *cookie)
+{
+ argp_fmtstream_t stream = cookie;
+ const char *arg = opt->arg;
+ int flags = opt->flags | real->flags;
+
+ if (! arg)
+ arg = real->arg;
+
+ if (arg && !(flags & OPTION_NO_USAGE))
+ {
+ arg = dgettext (domain, arg);
+
+ if (flags & OPTION_ARG_OPTIONAL)
+ __argp_fmtstream_printf (stream, " [-%c[%s]]", opt->key, arg);
+ else
+ {
+ /* Manually do line wrapping so that it (probably) won't
+ get wrapped at the embedded space. */
+ space (stream, 6 + strlen (arg));
+ __argp_fmtstream_printf (stream, "[-%c %s]", opt->key, arg);
+ }
+ }
+
+ return 0;
+}
+
+/* Output a usage entry for the long option opt to the stream pointed at by
+ COOKIE. */
+static int
+usage_long_opt (const struct argp_option *opt,
+ const struct argp_option *real,
+ const char *domain, void *cookie)
+{
+ argp_fmtstream_t stream = cookie;
+ const char *arg = opt->arg;
+ int flags = opt->flags | real->flags;
+
+ if (! arg)
+ arg = real->arg;
+
+ if (! (flags & OPTION_NO_USAGE) && !odoc (opt))
+ {
+ if (arg)
+ {
+ arg = dgettext (domain, arg);
+ if (flags & OPTION_ARG_OPTIONAL)
+ __argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg);
+ else
+ __argp_fmtstream_printf (stream, " [--%s=%s]", opt->name, arg);
+ }
+ else
+ __argp_fmtstream_printf (stream, " [--%s]", opt->name);
+ }
+
+ return 0;
+}
+
+/* Print a short usage description for the arguments in HOL to STREAM. */
+static void
+hol_usage (struct hol *hol, argp_fmtstream_t stream)
+{
+ if (hol->num_entries > 0)
+ {
+ unsigned nentries;
+ struct hol_entry *entry;
+ char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
+ char *snao_end = short_no_arg_opts;
+
+ /* First we put a list of short options without arguments. */
+ for (entry = hol->entries, nentries = hol->num_entries
+ ; nentries > 0
+ ; entry++, nentries--)
+ hol_entry_short_iterate (entry, add_argless_short_opt,
+ entry->argp->argp_domain, &snao_end);
+ if (snao_end > short_no_arg_opts)
+ {
+ *snao_end++ = 0;
+ __argp_fmtstream_printf (stream, " [-%s]", short_no_arg_opts);
+ }
+
+ /* Now a list of short options *with* arguments. */
+ for (entry = hol->entries, nentries = hol->num_entries
+ ; nentries > 0
+ ; entry++, nentries--)
+ hol_entry_short_iterate (entry, usage_argful_short_opt,
+ entry->argp->argp_domain, stream);
+
+ /* Finally, a list of long options (whew!). */
+ for (entry = hol->entries, nentries = hol->num_entries
+ ; nentries > 0
+ ; entry++, nentries--)
+ hol_entry_long_iterate (entry, usage_long_opt,
+ entry->argp->argp_domain, stream);
+ }
+}
+
+/* Make a HOL containing all levels of options in ARGP. CLUSTER is the
+ cluster in which ARGP's entries should be clustered, or 0. */
+static struct hol *
+argp_hol (const struct argp *argp, struct hol_cluster *cluster)
+{
+ const struct argp_child *child = argp->children;
+ struct hol *hol = make_hol (argp, cluster);
+ if (child)
+ while (child->argp)
+ {
+ struct hol_cluster *child_cluster =
+ ((child->group || child->header)
+ /* Put CHILD->argp within its own cluster. */
+ ? hol_add_cluster (hol, child->group, child->header,
+ child - argp->children, cluster, argp)
+ /* Just merge it into the parent's cluster. */
+ : cluster);
+ hol_append (hol, argp_hol (child->argp, child_cluster)) ;
+ child++;
+ }
+ return hol;
+}
+
+/* Calculate how many different levels with alternative args strings exist in
+ ARGP. */
+static size_t
+argp_args_levels (const struct argp *argp)
+{
+ size_t levels = 0;
+ const struct argp_child *child = argp->children;
+
+ if (argp->args_doc && strchr (argp->args_doc, '\n'))
+ levels++;
+
+ if (child)
+ while (child->argp)
+ levels += argp_args_levels ((child++)->argp);
+
+ return levels;
+}
+
+/* Print all the non-option args documented in ARGP to STREAM. Any output is
+ preceded by a space. LEVELS is a pointer to a byte vector the length
+ returned by argp_args_levels; it should be initialized to zero, and
+ updated by this routine for the next call if ADVANCE is true. True is
+ returned as long as there are more patterns to output. */
+static int
+argp_args_usage (const struct argp *argp, const struct argp_state *state,
+ char **levels, int advance, argp_fmtstream_t stream)
+{
+ char *our_level = *levels;
+ int multiple = 0;
+ const struct argp_child *child = argp->children;
+ const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = 0;
+ const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state);
+
+ if (fdoc)
+ {
+ const char *cp = fdoc;
+ nl = __strchrnul (cp, '\n');
+ if (*nl != '\0')
+ /* This is a `multi-level' args doc; advance to the correct position
+ as determined by our state in LEVELS, and update LEVELS. */
+ {
+ int i;
+ multiple = 1;
+ for (i = 0; i < *our_level; i++)
+ cp = nl + 1, nl = __strchrnul (cp, '\n');
+ (*levels)++;
+ }
+
+ /* Manually do line wrapping so that it (probably) won't get wrapped at
+ any embedded spaces. */
+ space (stream, 1 + nl - cp);
+
+ __argp_fmtstream_write (stream, cp, nl - cp);
+ }
+ if (fdoc && fdoc != tdoc)
+ free ((char *)fdoc); /* Free user's modified doc string. */
+
+ if (child)
+ while (child->argp)
+ advance = !argp_args_usage ((child++)->argp, state, levels, advance, stream);
+
+ if (advance && multiple)
+ {
+ /* Need to increment our level. */
+ if (*nl)
+ /* There's more we can do here. */
+ {
+ (*our_level)++;
+ advance = 0; /* Our parent shouldn't advance also. */
+ }
+ else if (*our_level > 0)
+ /* We had multiple levels, but used them up; reset to zero. */
+ *our_level = 0;
+ }
+
+ return !advance;
+}
+
+/* Print the documentation for ARGP to STREAM; if POST is false, then
+ everything preceeding a `\v' character in the documentation strings (or
+ the whole string, for those with none) is printed, otherwise, everything
+ following the `\v' character (nothing for strings without). Each separate
+ bit of documentation is separated a blank line, and if PRE_BLANK is true,
+ then the first is as well. If FIRST_ONLY is true, only the first
+ occurrence is output. Returns true if anything was output. */
+static int
+argp_doc (const struct argp *argp, const struct argp_state *state,
+ int post, int pre_blank, int first_only,
+ argp_fmtstream_t stream)
+{
+ const char *text;
+ const char *inp_text;
+ size_t inp_text_len = 0;
+ const char *trans_text;
+ void *input = 0;
+ int anything = 0;
+ const struct argp_child *child = argp->children;
+
+ if (argp->doc)
+ {
+ char *vt = strchr (argp->doc, '\v');
+ if (vt)
+ {
+ if (post)
+ inp_text = vt + 1;
+ else
+ {
+ inp_text_len = vt - argp->doc;
+ inp_text = __strndup (argp->doc, inp_text_len);
+ }
+ }
+ else
+ inp_text = post ? 0 : argp->doc;
+ trans_text = inp_text ? dgettext (argp->argp_domain, inp_text) : NULL;
+ }
+ else
+ trans_text = inp_text = 0;
+
+ if (argp->help_filter)
+ /* We have to filter the doc strings. */
+ {
+ input = __argp_input (argp, state);
+ text =
+ (*argp->help_filter) (post
+ ? ARGP_KEY_HELP_POST_DOC
+ : ARGP_KEY_HELP_PRE_DOC,
+ trans_text, input);
+ }
+ else
+ text = (const char *) trans_text;
+
+ if (text)
+ {
+ if (pre_blank)
+ __argp_fmtstream_putc (stream, '\n');
+
+ __argp_fmtstream_puts (stream, text);
+
+ if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream))
+ __argp_fmtstream_putc (stream, '\n');
+
+ anything = 1;
+ }
+
+ if (text && text != trans_text)
+ free ((char *) text); /* Free TEXT returned from the help filter. */
+
+ if (inp_text && inp_text_len)
+ free ((char *) inp_text); /* We copied INP_TEXT, so free it now. */
+
+ if (post && argp->help_filter)
+ /* Now see if we have to output a ARGP_KEY_HELP_EXTRA text. */
+ {
+ text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input);
+ if (text)
+ {
+ if (anything || pre_blank)
+ __argp_fmtstream_putc (stream, '\n');
+ __argp_fmtstream_puts (stream, text);
+ free ((char *) text);
+ if (__argp_fmtstream_point (stream)
+ > __argp_fmtstream_lmargin (stream))
+ __argp_fmtstream_putc (stream, '\n');
+ anything = 1;
+ }
+ }
+
+ if (child)
+ while (child->argp && !(first_only && anything))
+ anything |=
+ argp_doc ((child++)->argp, state,
+ post, anything || pre_blank, first_only,
+ stream);
+
+ return anything;
+}
+
+/* Output a usage message for ARGP to STREAM. If called from
+ argp_state_help, STATE is the relevent parsing state. FLAGS are from the
+ set ARGP_HELP_*. NAME is what to use wherever a `program name' is
+ needed. */
+static void
+_help (const struct argp *argp, const struct argp_state *state, FILE *stream,
+ unsigned flags, char *name)
+{
+ int anything = 0; /* Whether we've output anything. */
+ struct hol *hol = 0;
+ argp_fmtstream_t fs;
+
+ if (! stream)
+ return;
+
+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+ __flockfile (stream);
+#endif
+
+ if (! uparams.valid)
+ fill_in_uparams (state);
+
+ fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0);
+ if (! fs)
+ {
+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+ __funlockfile (stream);
+#endif
+ return;
+ }
+
+ if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG))
+ {
+ hol = argp_hol (argp, 0);
+
+ /* If present, these options always come last. */
+ hol_set_group (hol, "help", -1);
+ hol_set_group (hol, "version", -1);
+
+ hol_sort (hol);
+ }
+
+ if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE))
+ /* Print a short `Usage:' message. */
+ {
+ int first_pattern = 1, more_patterns;
+ size_t num_pattern_levels = argp_args_levels (argp);
+ char *pattern_levels = alloca (num_pattern_levels);
+
+ memset (pattern_levels, 0, num_pattern_levels);
+
+ do
+ {
+ int old_lm;
+ int old_wm = __argp_fmtstream_set_wmargin (fs, uparams.usage_indent);
+ char *levels = pattern_levels;
+
+ if (first_pattern)
+ __argp_fmtstream_printf (fs, "%s %s",
+ dgettext (argp->argp_domain, "Usage:"),
+ name);
+ else
+ __argp_fmtstream_printf (fs, "%s %s",
+ dgettext (argp->argp_domain, " or: "),
+ name);
+
+ /* We set the lmargin as well as the wmargin, because hol_usage
+ manually wraps options with newline to avoid annoying breaks. */
+ old_lm = __argp_fmtstream_set_lmargin (fs, uparams.usage_indent);
+
+ if (flags & ARGP_HELP_SHORT_USAGE)
+ /* Just show where the options go. */
+ {
+ if (hol->num_entries > 0)
+ __argp_fmtstream_puts (fs, dgettext (argp->argp_domain,
+ " [OPTION...]"));
+ }
+ else
+ /* Actually print the options. */
+ {
+ hol_usage (hol, fs);
+ flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once. */
+ }
+
+ more_patterns = argp_args_usage (argp, state, &levels, 1, fs);
+
+ __argp_fmtstream_set_wmargin (fs, old_wm);
+ __argp_fmtstream_set_lmargin (fs, old_lm);
+
+ __argp_fmtstream_putc (fs, '\n');
+ anything = 1;
+
+ first_pattern = 0;
+ }
+ while (more_patterns);
+ }
+
+ if (flags & ARGP_HELP_PRE_DOC)
+ anything |= argp_doc (argp, state, 0, 0, 1, fs);
+
+ if (flags & ARGP_HELP_SEE)
+ {
+ __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\
+Try `%s --help' or `%s --usage' for more information.\n"),
+ name, name);
+ anything = 1;
+ }
+
+ if (flags & ARGP_HELP_LONG)
+ /* Print a long, detailed help message. */
+ {
+ /* Print info about all the options. */
+ if (hol->num_entries > 0)
+ {
+ if (anything)
+ __argp_fmtstream_putc (fs, '\n');
+ hol_help (hol, state, fs);
+ anything = 1;
+ }
+ }
+
+ if (flags & ARGP_HELP_POST_DOC)
+ /* Print any documentation strings at the end. */
+ anything |= argp_doc (argp, state, 1, anything, 0, fs);
+
+ if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address)
+ {
+ if (anything)
+ __argp_fmtstream_putc (fs, '\n');
+ __argp_fmtstream_printf (fs, dgettext (argp->argp_domain,
+ "Report bugs to %s.\n"),
+ argp_program_bug_address);
+ anything = 1;
+ }
+
+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+ __funlockfile (stream);
+#endif
+
+ if (hol)
+ hol_free (hol);
+
+ __argp_fmtstream_free (fs);
+}
+
+/* Output a usage message for ARGP to STREAM. FLAGS are from the set
+ ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */
+void __argp_help (const struct argp *argp, FILE *stream,
+ unsigned flags, char *name)
+{
+ struct argp_state state;
+ memset (&state, 0, sizeof state);
+ state.root_argp = argp;
+ _help (argp, &state, stream, flags, name);
+}
+#ifdef weak_alias
+weak_alias (__argp_help, argp_help)
+#endif
+
+#if ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)
+char *
+__argp_short_program_name (void)
+{
+# if HAVE_DECL_PROGRAM_INVOCATION_NAME
+ return __argp_base_name (program_invocation_name);
+# else
+ /* FIXME: What now? Miles suggests that it is better to use NULL,
+ but currently the value is passed on directly to fputs_unlocked,
+ so that requires more changes. */
+# if __GNUC__
+# warning No reasonable value to return
+# endif /* __GNUC__ */
+ return "";
+# endif
+}
+#endif
+
+/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
+ from the set ARGP_HELP_*. */
+void
+__argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)
+{
+ if ((!state || ! (state->flags & ARGP_NO_ERRS)) && stream)
+ {
+ if (state && (state->flags & ARGP_LONG_ONLY))
+ flags |= ARGP_HELP_LONG_ONLY;
+
+ _help (state ? state->root_argp : 0, state, stream, flags,
+ state ? state->name : __argp_short_program_name ());
+
+ if (!state || ! (state->flags & ARGP_NO_EXIT))
+ {
+ if (flags & ARGP_HELP_EXIT_ERR)
+ exit (argp_err_exit_status);
+ if (flags & ARGP_HELP_EXIT_OK)
+ exit (0);
+ }
+ }
+}
+#ifdef weak_alias
+weak_alias (__argp_state_help, argp_state_help)
+#endif
+
+/* If appropriate, print the printf string FMT and following args, preceded
+ by the program name and `:', to stderr, and followed by a `Try ... --help'
+ message, then exit (1). */
+void
+__argp_error (const struct argp_state *state, const char *fmt, ...)
+{
+ if (!state || !(state->flags & ARGP_NO_ERRS))
+ {
+ FILE *stream = state ? state->err_stream : stderr;
+
+ if (stream)
+ {
+ va_list ap;
+
+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+ __flockfile (stream);
+#endif
+
+ va_start (ap, fmt);
+
+#ifdef USE_IN_LIBIO
+ if (_IO_fwide (stream, 0) > 0)
+ {
+ char *buf;
+
+ if (__asprintf (&buf, fmt, ap) < 0)
+ buf = NULL;
+
+ __fwprintf (stream, L"%s: %s\n",
+ state ? state->name : __argp_short_program_name (),
+ buf);
+
+ free (buf);
+ }
+ else
+#endif
+ {
+ fputs_unlocked (state
+ ? state->name : __argp_short_program_name (),
+ stream);
+ putc_unlocked (':', stream);
+ putc_unlocked (' ', stream);
+
+ vfprintf (stream, fmt, ap);
+
+ putc_unlocked ('\n', stream);
+ }
+
+ __argp_state_help (state, stream, ARGP_HELP_STD_ERR);
+
+ va_end (ap);
+
+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+ __funlockfile (stream);
+#endif
+ }
+ }
+}
+#ifdef weak_alias
+weak_alias (__argp_error, argp_error)
+#endif
+
+/* Similar to the standard gnu error-reporting function error(), but will
+ respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
+ to STATE->err_stream. This is useful for argument parsing code that is
+ shared between program startup (when exiting is desired) and runtime
+ option parsing (when typically an error code is returned instead). The
+ difference between this function and argp_error is that the latter is for
+ *parsing errors*, and the former is for other problems that occur during
+ parsing but don't reflect a (syntactic) problem with the input. */
+void
+__argp_failure (const struct argp_state *state, int status, int errnum,
+ const char *fmt, ...)
+{
+ if (!state || !(state->flags & ARGP_NO_ERRS))
+ {
+ FILE *stream = state ? state->err_stream : stderr;
+
+ if (stream)
+ {
+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+ __flockfile (stream);
+#endif
+
+#ifdef USE_IN_LIBIO
+ if (_IO_fwide (stream, 0) > 0)
+ __fwprintf (stream, L"%s",
+ state ? state->name : __argp_short_program_name ());
+ else
+#endif
+ fputs_unlocked (state
+ ? state->name : __argp_short_program_name (),
+ stream);
+
+ if (fmt)
+ {
+ va_list ap;
+
+ va_start (ap, fmt);
+#ifdef USE_IN_LIBIO
+ if (_IO_fwide (stream, 0) > 0)
+ {
+ char *buf;
+
+ if (__asprintf (&buf, fmt, ap) < 0)
+ buf = NULL;
+
+ __fwprintf (stream, L": %s", buf);
+
+ free (buf);
+ }
+ else
+#endif
+ {
+ putc_unlocked (':', stream);
+ putc_unlocked (' ', stream);
+
+ vfprintf (stream, fmt, ap);
+ }
+
+ va_end (ap);
+ }
+
+ if (errnum)
+ {
+ char buf[200];
+
+#ifdef USE_IN_LIBIO
+ if (_IO_fwide (stream, 0) > 0)
+ __fwprintf (stream, L": %s",
+ __strerror_r (errnum, buf, sizeof (buf)));
+ else
+#endif
+ {
+ char const *s = NULL;
+ putc_unlocked (':', stream);
+ putc_unlocked (' ', stream);
+#if _LIBC || (HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P)
+ s = __strerror_r (errnum, buf, sizeof buf);
+#elif HAVE_DECL_STRERROR_R
+ if (__strerror_r (errnum, buf, sizeof buf) == 0)
+ s = buf;
+#endif
+#if !_LIBC
+ if (! s && ! (s = strerror (errnum)))
+ s = dgettext (state->root_argp->argp_domain,
+ "Unknown system error");
+#endif
+ fputs (s, stream);
+ }
+ }
+
+#ifdef USE_IN_LIBIO
+ if (_IO_fwide (stream, 0) > 0)
+ putwc_unlocked (L'\n', stream);
+ else
+#endif
+ putc_unlocked ('\n', stream);
+
+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
+ __funlockfile (stream);
+#endif
+
+ if (status && (!state || !(state->flags & ARGP_NO_EXIT)))
+ exit (status);
+ }
+ }
+}
+#ifdef weak_alias
+weak_alias (__argp_failure, argp_failure)
+#endif
diff --git a/grub-core/gnulib/argp-namefrob.h b/grub-core/gnulib/argp-namefrob.h
new file mode 100644
index 0000000..24581a6
--- /dev/null
+++ b/grub-core/gnulib/argp-namefrob.h
@@ -0,0 +1,157 @@
+/* Name frobnication for compiling argp outside of glibc
+ Copyright (C) 1997, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if !_LIBC
+/* This code is written for inclusion in gnu-libc, and uses names in the
+ namespace reserved for libc. If we're not compiling in libc, define those
+ names to be the normal ones instead. */
+
+/* argp-parse functions */
+#undef __argp_parse
+#define __argp_parse argp_parse
+#undef __option_is_end
+#define __option_is_end _option_is_end
+#undef __option_is_short
+#define __option_is_short _option_is_short
+#undef __argp_input
+#define __argp_input _argp_input
+
+/* argp-help functions */
+#undef __argp_help
+#define __argp_help argp_help
+#undef __argp_error
+#define __argp_error argp_error
+#undef __argp_failure
+#define __argp_failure argp_failure
+#undef __argp_state_help
+#define __argp_state_help argp_state_help
+#undef __argp_usage
+#define __argp_usage argp_usage
+
+/* argp-fmtstream functions */
+#undef __argp_make_fmtstream
+#define __argp_make_fmtstream argp_make_fmtstream
+#undef __argp_fmtstream_free
+#define __argp_fmtstream_free argp_fmtstream_free
+#undef __argp_fmtstream_putc
+#define __argp_fmtstream_putc argp_fmtstream_putc
+#undef __argp_fmtstream_puts
+#define __argp_fmtstream_puts argp_fmtstream_puts
+#undef __argp_fmtstream_write
+#define __argp_fmtstream_write argp_fmtstream_write
+#undef __argp_fmtstream_printf
+#define __argp_fmtstream_printf argp_fmtstream_printf
+#undef __argp_fmtstream_set_lmargin
+#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
+#undef __argp_fmtstream_set_rmargin
+#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
+#undef __argp_fmtstream_set_wmargin
+#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
+#undef __argp_fmtstream_point
+#define __argp_fmtstream_point argp_fmtstream_point
+#undef __argp_fmtstream_update
+#define __argp_fmtstream_update _argp_fmtstream_update
+#undef __argp_fmtstream_ensure
+#define __argp_fmtstream_ensure _argp_fmtstream_ensure
+#undef __argp_fmtstream_lmargin
+#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
+#undef __argp_fmtstream_rmargin
+#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
+#undef __argp_fmtstream_wmargin
+#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+
+/* normal libc functions we call */
+#undef __flockfile
+#define __flockfile flockfile
+#undef __funlockfile
+#define __funlockfile funlockfile
+#undef __mempcpy
+#define __mempcpy mempcpy
+#undef __sleep
+#define __sleep sleep
+#undef __strcasecmp
+#define __strcasecmp strcasecmp
+#undef __strchrnul
+#define __strchrnul strchrnul
+#undef __strerror_r
+#define __strerror_r strerror_r
+#undef __strndup
+#define __strndup strndup
+#undef __vsnprintf
+#define __vsnprintf vsnprintf
+
+#if defined(HAVE_DECL_CLEARERR_UNLOCKED) && !HAVE_DECL_CLEARERR_UNLOCKED
+# define clearerr_unlocked(x) clearerr (x)
+#endif
+#if defined(HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
+# define feof_unlocked(x) feof (x)
+# endif
+#if defined(HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
+# define ferror_unlocked(x) ferror (x)
+# endif
+#if defined(HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
+# define fflush_unlocked(x) fflush (x)
+# endif
+#if defined(HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
+# define fgets_unlocked(x,y,z) fgets (x,y,z)
+# endif
+#if defined(HAVE_DECL_FPUTC_UNLOCKED) && !HAVE_DECL_FPUTC_UNLOCKED
+# define fputc_unlocked(x,y) fputc (x,y)
+# endif
+#if defined(HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
+# define fputs_unlocked(x,y) fputs (x,y)
+# endif
+#if defined(HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
+# define fread_unlocked(w,x,y,z) fread (w,x,y,z)
+# endif
+#if defined(HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
+# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
+# endif
+#if defined(HAVE_DECL_GETC_UNLOCKED) && !HAVE_DECL_GETC_UNLOCKED
+# define getc_unlocked(x) getc (x)
+# endif
+#if defined(HAVE_DECL_GETCHAR_UNLOCKED) && !HAVE_DECL_GETCHAR_UNLOCKED
+# define getchar_unlocked() getchar ()
+# endif
+#if defined(HAVE_DECL_PUTC_UNLOCKED) && !HAVE_DECL_PUTC_UNLOCKED
+# define putc_unlocked(x,y) putc (x,y)
+# endif
+#if defined(HAVE_DECL_PUTCHAR_UNLOCKED) && !HAVE_DECL_PUTCHAR_UNLOCKED
+# define putchar_unlocked(x) putchar (x)
+# endif
+
+#endif /* !_LIBC */
+
+#ifndef __set_errno
+#define __set_errno(e) (errno = (e))
+#endif
+
+#if defined GNULIB_ARGP_DISABLE_DIRNAME
+# define __argp_base_name(arg) arg
+#elif defined GNULIB_ARGP_EXTERN_BASENAME
+extern char *__argp_base_name (const char *arg);
+#else
+# include "dirname.h"
+# define __argp_base_name last_component
+#endif
+
+#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+# define __argp_short_program_name() (program_invocation_short_name)
+#else
+extern char *__argp_short_program_name (void);
+#endif
diff --git a/grub-core/gnulib/argp-parse.c b/grub-core/gnulib/argp-parse.c
new file mode 100644
index 0000000..9c05465
--- /dev/null
+++ b/grub-core/gnulib/argp-parse.c
@@ -0,0 +1,952 @@
+/* Hierarchial argument parsing, layered over getopt
+ Copyright (C) 1995-2000, 2002-2004, 2009-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <alloca.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <limits.h>
+#include <getopt.h>
+#include <getopt_int.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+# undef dgettext
+# define dgettext(domain, msgid) \
+ INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
+#else
+# include "gettext.h"
+#endif
+#define N_(msgid) msgid
+
+#include "argp.h"
+#include "argp-namefrob.h"
+
+#define alignof(type) offsetof (struct { char c; type x; }, x)
+#define alignto(n, d) ((((n) + (d) - 1) / (d)) * (d))
+
+/* Getopt return values. */
+#define KEY_END (-1) /* The end of the options. */
+#define KEY_ARG 1 /* A non-option argument. */
+#define KEY_ERR '?' /* An error parsing the options. */
+
+/* The meta-argument used to prevent any further arguments being interpreted
+ as options. */
+#define QUOTE "--"
+
+/* The number of bits we steal in a long-option value for our own use. */
+#define GROUP_BITS CHAR_BIT
+
+/* The number of bits available for the user value. */
+#define USER_BITS ((sizeof ((struct option *)0)->val * CHAR_BIT) - GROUP_BITS)
+#define USER_MASK ((1 << USER_BITS) - 1)
+
+/* EZ alias for ARGP_ERR_UNKNOWN. */
+#define EBADKEY ARGP_ERR_UNKNOWN
+
+/* Default options. */
+
+/* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep
+ for one second intervals, decrementing _ARGP_HANG until it's zero. Thus
+ you can force the program to continue by attaching a debugger and setting
+ it to 0 yourself. */
+static volatile int _argp_hang;
+
+#define OPT_PROGNAME -2
+#define OPT_USAGE -3
+#define OPT_HANG -4
+
+static const struct argp_option argp_default_options[] =
+{
+ {"help", '?', 0, 0, N_("give this help list"), -1},
+ {"usage", OPT_USAGE, 0, 0, N_("give a short usage message"), 0},
+ {"program-name",OPT_PROGNAME,N_("NAME"), OPTION_HIDDEN, N_("set the program name"), 0},
+ {"HANG", OPT_HANG, N_("SECS"), OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
+ N_("hang for SECS seconds (default 3600)"), 0},
+ {NULL, 0, 0, 0, NULL, 0}
+};
+
+static error_t
+argp_default_parser (int key, char *arg, struct argp_state *state)
+{
+ switch (key)
+ {
+ case '?':
+ __argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP);
+ break;
+ case OPT_USAGE:
+ __argp_state_help (state, state->out_stream,
+ ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
+ break;
+
+ case OPT_PROGNAME: /* Set the program name. */
+#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_NAME
+ program_invocation_name = arg;
+#endif
+ /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka
+ __PROGNAME), in which case, PROGRAM_INVOCATION_NAME is just defined
+ to be that, so we have to be a bit careful here.] */
+
+ /* Update what we use for messages. */
+ state->name = __argp_base_name (arg);
+
+#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ program_invocation_short_name = state->name;
+#endif
+
+ if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
+ == ARGP_PARSE_ARGV0)
+ /* Update what getopt uses too. */
+ state->argv[0] = arg;
+
+ break;
+
+ case OPT_HANG:
+ _argp_hang = atoi (arg ? arg : "3600");
+ while (_argp_hang-- > 0)
+ __sleep (1);
+ break;
+
+ default:
+ return EBADKEY;
+ }
+ return 0;
+}
+
+static const struct argp argp_default_argp =
+ {argp_default_options, &argp_default_parser, NULL, NULL, NULL, NULL, "libc"};
+
+
+static const struct argp_option argp_version_options[] =
+{
+ {"version", 'V', 0, 0, N_("print program version"), -1},
+ {NULL, 0, 0, 0, NULL, 0}
+};
+
+static error_t
+argp_version_parser (int key, char *arg, struct argp_state *state)
+{
+ switch (key)
+ {
+ case 'V':
+ if (argp_program_version_hook)
+ (*argp_program_version_hook) (state->out_stream, state);
+ else if (argp_program_version)
+ fprintf (state->out_stream, "%s\n", argp_program_version);
+ else
+ __argp_error (state, dgettext (state->root_argp->argp_domain,
+ "(PROGRAM ERROR) No version known!?"));
+ if (! (state->flags & ARGP_NO_EXIT))
+ exit (0);
+ break;
+ default:
+ return EBADKEY;
+ }
+ return 0;
+}
+
+static const struct argp argp_version_argp =
+ {argp_version_options, &argp_version_parser, NULL, NULL, NULL, NULL, "libc"};
+
+/* Returns the offset into the getopt long options array LONG_OPTIONS of a
+ long option with called NAME, or -1 if none is found. Passing NULL as
+ NAME will return the number of options. */
+static int
+find_long_option (struct option *long_options, const char *name)
+{
+ struct option *l = long_options;
+ while (l->name != NULL)
+ if (name != NULL && strcmp (l->name, name) == 0)
+ return l - long_options;
+ else
+ l++;
+ if (name == NULL)
+ return l - long_options;
+ else
+ return -1;
+}
+
+
+/* The state of a `group' during parsing. Each group corresponds to a
+ particular argp structure from the tree of such descending from the top
+ level argp passed to argp_parse. */
+struct group
+{
+ /* This group's parsing function. */
+ argp_parser_t parser;
+
+ /* Which argp this group is from. */
+ const struct argp *argp;
+
+ /* Points to the point in SHORT_OPTS corresponding to the end of the short
+ options for this group. We use it to determine from which group a
+ particular short options is from. */
+ char *short_end;
+
+ /* The number of non-option args sucessfully handled by this parser. */
+ unsigned args_processed;
+
+ /* This group's parser's parent's group. */
+ struct group *parent;
+ unsigned parent_index; /* And the our position in the parent. */
+
+ /* These fields are swapped into and out of the state structure when
+ calling this group's parser. */
+ void *input, **child_inputs;
+ void *hook;
+};
+
+/* Call GROUP's parser with KEY and ARG, swapping any group-specific info
+ from STATE before calling, and back into state afterwards. If GROUP has
+ no parser, EBADKEY is returned. */
+static error_t
+group_parse (struct group *group, struct argp_state *state, int key, char *arg)
+{
+ if (group->parser)
+ {
+ error_t err;
+ state->hook = group->hook;
+ state->input = group->input;
+ state->child_inputs = group->child_inputs;
+ state->arg_num = group->args_processed;
+ err = (*group->parser)(key, arg, state);
+ group->hook = state->hook;
+ return err;
+ }
+ else
+ return EBADKEY;
+}
+
+struct parser
+{
+ const struct argp *argp;
+
+ /* SHORT_OPTS is the getopt short options string for the union of all the
+ groups of options. */
+ char *short_opts;
+ /* LONG_OPTS is the array of getop long option structures for the union of
+ all the groups of options. */
+ struct option *long_opts;
+ /* OPT_DATA is the getopt data used for the re-entrant getopt. */
+ struct _getopt_data opt_data;
+
+ /* States of the various parsing groups. */
+ struct group *groups;
+ /* The end of the GROUPS array. */
+ struct group *egroup;
+ /* An vector containing storage for the CHILD_INPUTS field in all groups. */
+ void **child_inputs;
+
+ /* True if we think using getopt is still useful; if false, then
+ remaining arguments are just passed verbatim with ARGP_KEY_ARG. This is
+ cleared whenever getopt returns KEY_END, but may be set again if the user
+ moves the next argument pointer backwards. */
+ int try_getopt;
+
+ /* State block supplied to parsing routines. */
+ struct argp_state state;
+
+ /* Memory used by this parser. */
+ void *storage;
+};
+
+/* The next usable entries in the various parser tables being filled in by
+ convert_options. */
+struct parser_convert_state
+{
+ struct parser *parser;
+ char *short_end;
+ struct option *long_end;
+ void **child_inputs_end;
+};
+
+/* Converts all options in ARGP (which is put in GROUP) and ancestors
+ into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and
+ CVT->LONG_END are the points at which new options are added. Returns the
+ next unused group entry. CVT holds state used during the conversion. */
+static struct group *
+convert_options (const struct argp *argp,
+ struct group *parent, unsigned parent_index,
+ struct group *group, struct parser_convert_state *cvt)
+{
+ /* REAL is the most recent non-alias value of OPT. */
+ const struct argp_option *real = argp->options;
+ const struct argp_child *children = argp->children;
+
+ if (real || argp->parser)
+ {
+ const struct argp_option *opt;
+
+ if (real)
+ for (opt = real; !__option_is_end (opt); opt++)
+ {
+ if (! (opt->flags & OPTION_ALIAS))
+ /* OPT isn't an alias, so we can use values from it. */
+ real = opt;
+
+ if (! (real->flags & OPTION_DOC))
+ /* A real option (not just documentation). */
+ {
+ if (__option_is_short (opt))
+ /* OPT can be used as a short option. */
+ {
+ *cvt->short_end++ = opt->key;
+ if (real->arg)
+ {
+ *cvt->short_end++ = ':';
+ if (real->flags & OPTION_ARG_OPTIONAL)
+ *cvt->short_end++ = ':';
+ }
+ *cvt->short_end = '\0'; /* keep 0 terminated */
+ }
+
+ if (opt->name
+ && find_long_option (cvt->parser->long_opts, opt->name) < 0)
+ /* OPT can be used as a long option. */
+ {
+ cvt->long_end->name = opt->name;
+ cvt->long_end->has_arg =
+ (real->arg
+ ? (real->flags & OPTION_ARG_OPTIONAL
+ ? optional_argument
+ : required_argument)
+ : no_argument);
+ cvt->long_end->flag = 0;
+ /* we add a disambiguating code to all the user's
+ values (which is removed before we actually call
+ the function to parse the value); this means that
+ the user loses use of the high 8 bits in all his
+ values (the sign of the lower bits is preserved
+ however)... */
+ cvt->long_end->val =
+ ((opt->key ? opt->key : real->key) & USER_MASK)
+ + (((group - cvt->parser->groups) + 1) << USER_BITS);
+
+ /* Keep the LONG_OPTS list terminated. */
+ (++cvt->long_end)->name = NULL;
+ }
+ }
+ }
+
+ group->parser = argp->parser;
+ group->argp = argp;
+ group->short_end = cvt->short_end;
+ group->args_processed = 0;
+ group->parent = parent;
+ group->parent_index = parent_index;
+ group->input = 0;
+ group->hook = 0;
+ group->child_inputs = 0;
+
+ if (children)
+ /* Assign GROUP's CHILD_INPUTS field some space from
+ CVT->child_inputs_end.*/
+ {
+ unsigned num_children = 0;
+ while (children[num_children].argp)
+ num_children++;
+ group->child_inputs = cvt->child_inputs_end;
+ cvt->child_inputs_end += num_children;
+ }
+
+ parent = group++;
+ }
+ else
+ parent = 0;
+
+ if (children)
+ {
+ unsigned index = 0;
+ while (children->argp)
+ group =
+ convert_options (children++->argp, parent, index++, group, cvt);
+ }
+
+ return group;
+}
+
+/* Find the merged set of getopt options, with keys appropiately prefixed. */
+static void
+parser_convert (struct parser *parser, const struct argp *argp, int flags)
+{
+ struct parser_convert_state cvt;
+
+ cvt.parser = parser;
+ cvt.short_end = parser->short_opts;
+ cvt.long_end = parser->long_opts;
+ cvt.child_inputs_end = parser->child_inputs;
+
+ if (flags & ARGP_IN_ORDER)
+ *cvt.short_end++ = '-';
+ else if (flags & ARGP_NO_ARGS)
+ *cvt.short_end++ = '+';
+ *cvt.short_end = '\0';
+
+ cvt.long_end->name = NULL;
+
+ parser->argp = argp;
+
+ if (argp)
+ parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt);
+ else
+ parser->egroup = parser->groups; /* No parsers at all! */
+}
+
+/* Lengths of various parser fields which we will allocated. */
+struct parser_sizes
+{
+ size_t short_len; /* Getopt short options string. */
+ size_t long_len; /* Getopt long options vector. */
+ size_t num_groups; /* Group structures we allocate. */
+ size_t num_child_inputs; /* Child input slots. */
+};
+
+/* For ARGP, increments the NUM_GROUPS field in SZS by the total number of
+ argp structures descended from it, and the SHORT_LEN & LONG_LEN fields by
+ the maximum lengths of the resulting merged getopt short options string and
+ long-options array, respectively. */
+static void
+calc_sizes (const struct argp *argp, struct parser_sizes *szs)
+{
+ const struct argp_child *child = argp->children;
+ const struct argp_option *opt = argp->options;
+
+ if (opt || argp->parser)
+ {
+ szs->num_groups++;
+ if (opt)
+ {
+ int num_opts = 0;
+ while (!__option_is_end (opt++))
+ num_opts++;
+ szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */
+ szs->long_len += num_opts;
+ }
+ }
+
+ if (child)
+ while (child->argp)
+ {
+ calc_sizes ((child++)->argp, szs);
+ szs->num_child_inputs++;
+ }
+}
+
+/* Initializes PARSER to parse ARGP in a manner described by FLAGS. */
+static error_t
+parser_init (struct parser *parser, const struct argp *argp,
+ int argc, char **argv, int flags, void *input)
+{
+ error_t err = 0;
+ struct group *group;
+ struct parser_sizes szs;
+ struct _getopt_data opt_data = _GETOPT_DATA_INITIALIZER;
+ char *storage;
+ size_t glen, gsum;
+ size_t clen, csum;
+ size_t llen, lsum;
+ size_t slen, ssum;
+
+ szs.short_len = (flags & ARGP_NO_ARGS) ? 0 : 1;
+ szs.long_len = 0;
+ szs.num_groups = 0;
+ szs.num_child_inputs = 0;
+
+ if (argp)
+ calc_sizes (argp, &szs);
+
+ /* Lengths of the various bits of storage used by PARSER. */
+ glen = (szs.num_groups + 1) * sizeof (struct group);
+ clen = szs.num_child_inputs * sizeof (void *);
+ llen = (szs.long_len + 1) * sizeof (struct option);
+ slen = szs.short_len + 1;
+
+ /* Sums of previous lengths, properly aligned. There's no need to
+ align gsum, since struct group is aligned at least as strictly as
+ void * (since it contains a void * member). And there's no need
+ to align lsum, since struct option is aligned at least as
+ strictly as char. */
+ gsum = glen;
+ csum = alignto (gsum + clen, alignof (struct option));
+ lsum = csum + llen;
+ ssum = lsum + slen;
+
+ parser->storage = malloc (ssum);
+ if (! parser->storage)
+ return ENOMEM;
+
+ storage = parser->storage;
+ parser->groups = parser->storage;
+ parser->child_inputs = (void **) (storage + gsum);
+ parser->long_opts = (struct option *) (storage + csum);
+ parser->short_opts = storage + lsum;
+ parser->opt_data = opt_data;
+
+ memset (parser->child_inputs, 0, clen);
+ parser_convert (parser, argp, flags);
+
+ memset (&parser->state, 0, sizeof (struct argp_state));
+ parser->state.root_argp = parser->argp;
+ parser->state.argc = argc;
+ parser->state.argv = argv;
+ parser->state.flags = flags;
+ parser->state.err_stream = stderr;
+ parser->state.out_stream = stdout;
+ parser->state.next = 0; /* Tell getopt to initialize. */
+ parser->state.pstate = parser;
+
+ parser->try_getopt = 1;
+
+ /* Call each parser for the first time, giving it a chance to propagate
+ values to child parsers. */
+ if (parser->groups < parser->egroup)
+ parser->groups->input = input;
+ for (group = parser->groups;
+ group < parser->egroup && (!err || err == EBADKEY);
+ group++)
+ {
+ if (group->parent)
+ /* If a child parser, get the initial input value from the parent. */
+ group->input = group->parent->child_inputs[group->parent_index];
+
+ if (!group->parser
+ && group->argp->children && group->argp->children->argp)
+ /* For the special case where no parsing function is supplied for an
+ argp, propagate its input to its first child, if any (this just
+ makes very simple wrapper argps more convenient). */
+ group->child_inputs[0] = group->input;
+
+ err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
+ }
+ if (err == EBADKEY)
+ err = 0; /* Some parser didn't understand. */
+
+ if (err)
+ return err;
+
+ if (parser->state.flags & ARGP_NO_ERRS)
+ {
+ parser->opt_data.opterr = 0;
+ if (parser->state.flags & ARGP_PARSE_ARGV0)
+ /* getopt always skips ARGV[0], so we have to fake it out. As long
+ as OPTERR is 0, then it shouldn't actually try to access it. */
+ parser->state.argv--, parser->state.argc++;
+ }
+ else
+ parser->opt_data.opterr = 1; /* Print error messages. */
+
+ if (parser->state.argv == argv && argv[0])
+ /* There's an argv[0]; use it for messages. */
+ parser->state.name = __argp_base_name (argv[0]);
+ else
+ parser->state.name = __argp_short_program_name ();
+
+ return 0;
+}
+
+/* Free any storage consumed by PARSER (but not PARSER itself). */
+static error_t
+parser_finalize (struct parser *parser,
+ error_t err, int arg_ebadkey, int *end_index)
+{
+ struct group *group;
+
+ if (err == EBADKEY && arg_ebadkey)
+ /* Suppress errors generated by unparsed arguments. */
+ err = 0;
+
+ if (! err)
+ {
+ if (parser->state.next == parser->state.argc)
+ /* We successfully parsed all arguments! Call all the parsers again,
+ just a few more times... */
+ {
+ for (group = parser->groups;
+ group < parser->egroup && (!err || err==EBADKEY);
+ group++)
+ if (group->args_processed == 0)
+ err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0);
+ for (group = parser->egroup - 1;
+ group >= parser->groups && (!err || err==EBADKEY);
+ group--)
+ err = group_parse (group, &parser->state, ARGP_KEY_END, 0);
+
+ if (err == EBADKEY)
+ err = 0; /* Some parser didn't understand. */
+
+ /* Tell the user that all arguments are parsed. */
+ if (end_index)
+ *end_index = parser->state.next;
+ }
+ else if (end_index)
+ /* Return any remaining arguments to the user. */
+ *end_index = parser->state.next;
+ else
+ /* No way to return the remaining arguments, they must be bogus. */
+ {
+ if (!(parser->state.flags & ARGP_NO_ERRS)
+ && parser->state.err_stream)
+ fprintf (parser->state.err_stream,
+ dgettext (parser->argp->argp_domain,
+ "%s: Too many arguments\n"),
+ parser->state.name);
+ err = EBADKEY;
+ }
+ }
+
+ /* Okay, we're all done, with either an error or success; call the parsers
+ to indicate which one. */
+
+ if (err)
+ {
+ /* Maybe print an error message. */
+ if (err == EBADKEY)
+ /* An appropriate message describing what the error was should have
+ been printed earlier. */
+ __argp_state_help (&parser->state, parser->state.err_stream,
+ ARGP_HELP_STD_ERR);
+
+ /* Since we didn't exit, give each parser an error indication. */
+ for (group = parser->groups; group < parser->egroup; group++)
+ group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
+ }
+ else
+ /* Notify parsers of success, and propagate back values from parsers. */
+ {
+ /* We pass over the groups in reverse order so that child groups are
+ given a chance to do there processing before passing back a value to
+ the parent. */
+ for (group = parser->egroup - 1
+ ; group >= parser->groups && (!err || err == EBADKEY)
+ ; group--)
+ err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0);
+ if (err == EBADKEY)
+ err = 0; /* Some parser didn't understand. */
+ }
+
+ /* Call parsers once more, to do any final cleanup. Errors are ignored. */
+ for (group = parser->egroup - 1; group >= parser->groups; group--)
+ group_parse (group, &parser->state, ARGP_KEY_FINI, 0);
+
+ if (err == EBADKEY)
+ err = EINVAL;
+
+ free (parser->storage);
+
+ return err;
+}
+
+/* Call the user parsers to parse the non-option argument VAL, at the current
+ position, returning any error. The state NEXT pointer is assumed to have
+ been adjusted (by getopt) to point after this argument; this function will
+ adjust it correctly to reflect however many args actually end up being
+ consumed. */
+static error_t
+parser_parse_arg (struct parser *parser, char *val)
+{
+ /* Save the starting value of NEXT, first adjusting it so that the arg
+ we're parsing is again the front of the arg vector. */
+ int index = --parser->state.next;
+ error_t err = EBADKEY;
+ struct group *group;
+ int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */
+
+ /* Try to parse the argument in each parser. */
+ for (group = parser->groups
+ ; group < parser->egroup && err == EBADKEY
+ ; group++)
+ {
+ parser->state.next++; /* For ARGP_KEY_ARG, consume the arg. */
+ key = ARGP_KEY_ARG;
+ err = group_parse (group, &parser->state, key, val);
+
+ if (err == EBADKEY)
+ /* This parser doesn't like ARGP_KEY_ARG; try ARGP_KEY_ARGS instead. */
+ {
+ parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg. */
+ key = ARGP_KEY_ARGS;
+ err = group_parse (group, &parser->state, key, 0);
+ }
+ }
+
+ if (! err)
+ {
+ if (key == ARGP_KEY_ARGS)
+ /* The default for ARGP_KEY_ARGS is to assume that if NEXT isn't
+ changed by the user, *all* arguments should be considered
+ consumed. */
+ parser->state.next = parser->state.argc;
+
+ if (parser->state.next > index)
+ /* Remember that we successfully processed a non-option
+ argument -- but only if the user hasn't gotten tricky and set
+ the clock back. */
+ (--group)->args_processed += (parser->state.next - index);
+ else
+ /* The user wants to reparse some args, give getopt another try. */
+ parser->try_getopt = 1;
+ }
+
+ return err;
+}
+
+/* Call the user parsers to parse the option OPT, with argument VAL, at the
+ current position, returning any error. */
+static error_t
+parser_parse_opt (struct parser *parser, int opt, char *val)
+{
+ /* The group key encoded in the high bits; 0 for short opts or
+ group_number + 1 for long opts. */
+ int group_key = opt >> USER_BITS;
+ error_t err = EBADKEY;
+
+ if (group_key == 0)
+ /* A short option. By comparing OPT's position in SHORT_OPTS to the
+ various starting positions in each group's SHORT_END field, we can
+ determine which group OPT came from. */
+ {
+ struct group *group;
+ char *short_index = strchr (parser->short_opts, opt);
+
+ if (short_index)
+ for (group = parser->groups; group < parser->egroup; group++)
+ if (group->short_end > short_index)
+ {
+ err = group_parse (group, &parser->state, opt,
+ parser->opt_data.optarg);
+ break;
+ }
+ }
+ else
+ /* A long option. We use shifts instead of masking for extracting
+ the user value in order to preserve the sign. */
+ err =
+ group_parse (&parser->groups[group_key - 1], &parser->state,
+ (opt << GROUP_BITS) >> GROUP_BITS,
+ parser->opt_data.optarg);
+
+ if (err == EBADKEY)
+ /* At least currently, an option not recognized is an error in the
+ parser, because we pre-compute which parser is supposed to deal
+ with each option. */
+ {
+ static const char bad_key_err[] =
+ N_("(PROGRAM ERROR) Option should have been recognized!?");
+ if (group_key == 0)
+ __argp_error (&parser->state, "-%c: %s", opt,
+ dgettext (parser->argp->argp_domain, bad_key_err));
+ else
+ {
+ struct option *long_opt = parser->long_opts;
+ while (long_opt->val != opt && long_opt->name)
+ long_opt++;
+ __argp_error (&parser->state, "--%s: %s",
+ long_opt->name ? long_opt->name : "???",
+ dgettext (parser->argp->argp_domain, bad_key_err));
+ }
+ }
+
+ return err;
+}
+
+/* Parse the next argument in PARSER (as indicated by PARSER->state.next).
+ Any error from the parsers is returned, and *ARGP_EBADKEY indicates
+ whether a value of EBADKEY is due to an unrecognized argument (which is
+ generally not fatal). */
+static error_t
+parser_parse_next (struct parser *parser, int *arg_ebadkey)
+{
+ int opt;
+ error_t err = 0;
+
+ if (parser->state.quoted && parser->state.next < parser->state.quoted)
+ /* The next argument pointer has been moved to before the quoted
+ region, so pretend we never saw the quoting `--', and give getopt
+ another chance. If the user hasn't removed it, getopt will just
+ process it again. */
+ parser->state.quoted = 0;
+
+ if (parser->try_getopt && !parser->state.quoted)
+ /* Give getopt a chance to parse this. */
+ {
+ /* Put it back in OPTIND for getopt. */
+ parser->opt_data.optind = parser->state.next;
+ /* Distinguish KEY_ERR from a real option. */
+ parser->opt_data.optopt = KEY_END;
+ if (parser->state.flags & ARGP_LONG_ONLY)
+ opt = _getopt_long_only_r (parser->state.argc, parser->state.argv,
+ parser->short_opts, parser->long_opts, 0,
+ &parser->opt_data);
+ else
+ opt = _getopt_long_r (parser->state.argc, parser->state.argv,
+ parser->short_opts, parser->long_opts, 0,
+ &parser->opt_data);
+ /* And see what getopt did. */
+ parser->state.next = parser->opt_data.optind;
+
+ if (opt == KEY_END)
+ /* Getopt says there are no more options, so stop using
+ getopt; we'll continue if necessary on our own. */
+ {
+ parser->try_getopt = 0;
+ if (parser->state.next > 1
+ && strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
+ == 0)
+ /* Not only is this the end of the options, but it's a
+ `quoted' region, which may have args that *look* like
+ options, so we definitely shouldn't try to use getopt past
+ here, whatever happens. */
+ parser->state.quoted = parser->state.next;
+ }
+ else if (opt == KEY_ERR && parser->opt_data.optopt != KEY_END)
+ /* KEY_ERR can have the same value as a valid user short
+ option, but in the case of a real error, getopt sets OPTOPT
+ to the offending character, which can never be KEY_END. */
+ {
+ *arg_ebadkey = 0;
+ return EBADKEY;
+ }
+ }
+ else
+ opt = KEY_END;
+
+ if (opt == KEY_END)
+ {
+ /* We're past what getopt considers the options. */
+ if (parser->state.next >= parser->state.argc
+ || (parser->state.flags & ARGP_NO_ARGS))
+ /* Indicate that we're done. */
+ {
+ *arg_ebadkey = 1;
+ return EBADKEY;
+ }
+ else
+ /* A non-option arg; simulate what getopt might have done. */
+ {
+ opt = KEY_ARG;
+ parser->opt_data.optarg = parser->state.argv[parser->state.next++];
+ }
+ }
+
+ if (opt == KEY_ARG)
+ /* A non-option argument; try each parser in turn. */
+ err = parser_parse_arg (parser, parser->opt_data.optarg);
+ else
+ err = parser_parse_opt (parser, opt, parser->opt_data.optarg);
+
+ if (err == EBADKEY)
+ *arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
+
+ return err;
+}
+
+/* Parse the options strings in ARGC & ARGV according to the argp in ARGP.
+ FLAGS is one of the ARGP_ flags above. If END_INDEX is non-NULL, the
+ index in ARGV of the first unparsed option is returned in it. If an
+ unknown option is present, EINVAL is returned; if some parser routine
+ returned a non-zero value, it is returned; otherwise 0 is returned. */
+error_t
+__argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
+ int *end_index, void *input)
+{
+ error_t err;
+ struct parser parser;
+
+ /* If true, then err == EBADKEY is a result of a non-option argument failing
+ to be parsed (which in some cases isn't actually an error). */
+ int arg_ebadkey = 0;
+
+#ifndef _LIBC
+ if (!(flags & ARGP_PARSE_ARGV0))
+ {
+#ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
+ if (!program_invocation_name)
+ program_invocation_name = argv[0];
+#endif
+#ifdef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ if (!program_invocation_short_name)
+ program_invocation_short_name = __argp_base_name (argv[0]);
+#endif
+ }
+#endif
+
+ if (! (flags & ARGP_NO_HELP))
+ /* Add our own options. */
+ {
+ struct argp_child *child = alloca (4 * sizeof (struct argp_child));
+ struct argp *top_argp = alloca (sizeof (struct argp));
+
+ /* TOP_ARGP has no options, it just serves to group the user & default
+ argps. */
+ memset (top_argp, 0, sizeof (*top_argp));
+ top_argp->children = child;
+
+ memset (child, 0, 4 * sizeof (struct argp_child));
+
+ if (argp)
+ (child++)->argp = argp;
+ (child++)->argp = &argp_default_argp;
+ if (argp_program_version || argp_program_version_hook)
+ (child++)->argp = &argp_version_argp;
+ child->argp = 0;
+
+ argp = top_argp;
+ }
+
+ /* Construct a parser for these arguments. */
+ err = parser_init (&parser, argp, argc, argv, flags, input);
+
+ if (! err)
+ /* Parse! */
+ {
+ while (! err)
+ err = parser_parse_next (&parser, &arg_ebadkey);
+ err = parser_finalize (&parser, err, arg_ebadkey, end_index);
+ }
+
+ return err;
+}
+#ifdef weak_alias
+weak_alias (__argp_parse, argp_parse)
+#endif
+
+/* Return the input field for ARGP in the parser corresponding to STATE; used
+ by the help routines. */
+void *
+__argp_input (const struct argp *argp, const struct argp_state *state)
+{
+ if (state && state->pstate)
+ {
+ struct group *group;
+ struct parser *parser = state->pstate;
+
+ for (group = parser->groups; group < parser->egroup; group++)
+ if (group->argp == argp)
+ return group->input;
+ }
+
+ return 0;
+}
+#ifdef weak_alias
+weak_alias (__argp_input, _argp_input)
+#endif
diff --git a/grub-core/gnulib/argp-pin.c b/grub-core/gnulib/argp-pin.c
new file mode 100644
index 0000000..eda4d95
--- /dev/null
+++ b/grub-core/gnulib/argp-pin.c
@@ -0,0 +1,27 @@
+/* Full and short program names for argp module
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
+char *program_invocation_short_name = 0;
+#endif
+#ifndef HAVE_PROGRAM_INVOCATION_NAME
+char *program_invocation_name = 0;
+#endif
+
diff --git a/grub-core/gnulib/argp-pv.c b/grub-core/gnulib/argp-pv.c
new file mode 100644
index 0000000..e3227d3
--- /dev/null
+++ b/grub-core/gnulib/argp-pv.c
@@ -0,0 +1,34 @@
+/* Default definition for ARGP_PROGRAM_VERSION.
+ Copyright (C) 1996, 1997, 1999, 2006, 2009, 2010 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* If set by the user program to a non-zero value, then a default option
+ --version is added (unless the ARGP_NO_HELP flag is used), which will
+ print this string followed by a newline and exit (unless the
+ ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
+const char *argp_program_version
+/* This variable should be zero-initialized. On most systems, putting it into
+ BSS is sufficient. Not so on MacOS X 10.3 and 10.4, see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>
+ <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00096.html>. */
+#if defined __ELF__
+ /* On ELF systems, variables in BSS behave well. */
+#else
+ = (const char *) 0
+#endif
+ ;
diff --git a/grub-core/gnulib/argp-pvh.c b/grub-core/gnulib/argp-pvh.c
new file mode 100644
index 0000000..fb98fc2
--- /dev/null
+++ b/grub-core/gnulib/argp-pvh.c
@@ -0,0 +1,31 @@
+/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
+ Copyright (C) 1996, 1997, 1999, 2004, 2009, 2010 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "argp.h"
+
+/* If set by the user program to a non-zero value, then a default option
+ --version is added (unless the ARGP_NO_HELP flag is used), which calls
+ this function with a stream to print the version to and a pointer to the
+ current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
+ used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
+void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) = NULL;
diff --git a/grub-core/gnulib/argp-xinl.c b/grub-core/gnulib/argp-xinl.c
new file mode 100644
index 0000000..6e7e20b
--- /dev/null
+++ b/grub-core/gnulib/argp-xinl.c
@@ -0,0 +1,42 @@
+/* Real definitions for extern inline functions in argp.h
+ Copyright (C) 1997, 1998, 2004, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined _LIBC || defined HAVE_FEATURES_H
+# include <features.h>
+#endif
+
+#ifndef __USE_EXTERN_INLINES
+# define __USE_EXTERN_INLINES 1
+#endif
+#define ARGP_EI
+#undef __OPTIMIZE__
+#define __OPTIMIZE__ 1
+#include "argp.h"
+
+/* Add weak aliases. */
+#if _LIBC - 0 && defined (weak_alias)
+
+weak_alias (__argp_usage, argp_usage)
+weak_alias (__option_is_short, _option_is_short)
+weak_alias (__option_is_end, _option_is_end)
+
+#endif
diff --git a/grub-core/gnulib/argp.h b/grub-core/gnulib/argp.h
new file mode 100644
index 0000000..3667224
--- /dev/null
+++ b/grub-core/gnulib/argp.h
@@ -0,0 +1,645 @@
+/* Hierarchial argument parsing, layered over getopt.
+ Copyright (C) 1995-1999, 2003-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Miles Bader <miles@gnu.ai.mit.edu>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _ARGP_H
+#define _ARGP_H
+
+#include <stdio.h>
+#include <ctype.h>
+#include <getopt.h>
+#include <limits.h>
+
+#define __need_error_t
+#include <errno.h>
+
+#ifndef __THROW
+# define __THROW
+#endif
+#ifndef __NTH
+# define __NTH(fct) fct __THROW
+#endif
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+ "restrict", and "configure" may have defined "restrict".
+ Other compilers use __restrict, __restrict__, and _Restrict, and
+ 'configure' might #define 'restrict' to those words. */
+#ifndef __restrict
+# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
+# if 199901L <= __STDC_VERSION__
+# define __restrict restrict
+# else
+# define __restrict
+# endif
+# endif
+#endif
+
+#ifndef __error_t_defined
+typedef int error_t;
+# define __error_t_defined
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* A description of a particular option. A pointer to an array of
+ these is passed in the OPTIONS field of an argp structure. Each option
+ entry can correspond to one long option and/or one short option; more
+ names for the same option can be added by following an entry in an option
+ array with options having the OPTION_ALIAS flag set. */
+struct argp_option
+{
+ /* The long option name. For more than one name for the same option, you
+ can use following options with the OPTION_ALIAS flag set. */
+ const char *name;
+
+ /* What key is returned for this option. If > 0 and printable, then it's
+ also accepted as a short option. */
+ int key;
+
+ /* If non-NULL, this is the name of the argument associated with this
+ option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
+ const char *arg;
+
+ /* OPTION_ flags. */
+ int flags;
+
+ /* The doc string for this option. If both NAME and KEY are 0, This string
+ will be printed outdented from the normal option column, making it
+ useful as a group header (it will be the first thing printed in its
+ group); in this usage, it's conventional to end the string with a `:'.
+
+ Write the initial value as N_("TEXT") if you want xgettext to collect
+ it into a POT file. */
+ const char *doc;
+
+ /* The group this option is in. In a long help message, options are sorted
+ alphabetically within each group, and the groups presented in the order
+ 0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with
+ if this field 0 will inherit the group number of the previous entry, or
+ zero if it's the first one, unless its a group header (NAME and KEY both
+ 0), in which case, the previous entry + 1 is the default. Automagic
+ options such as --help are put into group -1. */
+ int group;
+};
+
+/* The argument associated with this option is optional. */
+#define OPTION_ARG_OPTIONAL 0x1
+
+/* This option isn't displayed in any help messages. */
+#define OPTION_HIDDEN 0x2
+
+/* This option is an alias for the closest previous non-alias option. This
+ means that it will be displayed in the same help entry, and will inherit
+ fields other than NAME and KEY from the aliased option. */
+#define OPTION_ALIAS 0x4
+
+/* This option isn't actually an option (and so should be ignored by the
+ actual option parser), but rather an arbitrary piece of documentation that
+ should be displayed in much the same manner as the options. If this flag
+ is set, then the option NAME field is displayed unmodified (e.g., no `--'
+ prefix is added) at the left-margin (where a *short* option would normally
+ be displayed), and the documentation string in the normal place. The NAME
+ field will be translated using gettext, unless OPTION_NO_TRANS is set (see
+ below). For purposes of sorting, any leading whitespace and punctuation is
+ ignored, except that if the first non-whitespace character is not `-', this
+ entry is displayed after all options (and OPTION_DOC entries with a leading
+ `-') in the same group. */
+#define OPTION_DOC 0x8
+
+/* This option shouldn't be included in `long' usage messages (but is still
+ included in help messages). This is mainly intended for options that are
+ completely documented in an argp's ARGS_DOC field, in which case including
+ the option in the generic usage list would be redundant. For instance,
+ if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
+ distinguish these two cases, -x should probably be marked
+ OPTION_NO_USAGE. */
+#define OPTION_NO_USAGE 0x10
+
+/* Valid only in conjunction with OPTION_DOC. This option disables translation
+ of option name. */
+#define OPTION_NO_TRANS 0x20
+
+
+struct argp; /* fwd declare this type */
+struct argp_state; /* " */
+struct argp_child; /* " */
+
+/* The type of a pointer to an argp parsing function. */
+typedef error_t (*argp_parser_t) (int key, char *arg,
+ struct argp_state *state);
+
+/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such
+ returns will simply be ignored. For user keys, this error will be turned
+ into EINVAL (if the call to argp_parse is such that errors are propagated
+ back to the user instead of exiting); returning EINVAL itself would result
+ in an immediate stop to parsing in *all* cases. */
+#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */
+
+/* Special values for the KEY argument to an argument parsing function.
+ ARGP_ERR_UNKNOWN should be returned if they aren't understood.
+
+ The sequence of keys to a parsing function is either (where each
+ uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
+
+ INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all
+ or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed
+ or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized
+
+ The third case is where every parser returned ARGP_KEY_UNKNOWN for an
+ argument, in which case parsing stops at that argument (returning the
+ unparsed arguments to the caller of argp_parse if requested, or stopping
+ with an error message if not).
+
+ If an error occurs (either detected by argp, or because the parsing
+ function returned an error value), then the parser is called with
+ ARGP_KEY_ERROR, and no further calls are made. */
+
+/* This is not an option at all, but rather a command line argument. If a
+ parser receiving this key returns success, the fact is recorded, and the
+ ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the
+ argument, a parser function decrements the NEXT field of the state it's
+ passed, the option won't be considered processed; this is to allow you to
+ actually modify the argument (perhaps into an option), and have it
+ processed again. */
+#define ARGP_KEY_ARG 0
+/* There are remaining arguments not parsed by any parser, which may be found
+ starting at (STATE->argv + STATE->next). If success is returned, but
+ STATE->next left untouched, it's assumed that all arguments were consume,
+ otherwise, the parser should adjust STATE->next to reflect any arguments
+ consumed. */
+#define ARGP_KEY_ARGS 0x1000006
+/* There are no more command line arguments at all. */
+#define ARGP_KEY_END 0x1000001
+/* Because it's common to want to do some special processing if there aren't
+ any non-option args, user parsers are called with this key if they didn't
+ successfully process any non-option arguments. Called just before
+ ARGP_KEY_END (where more general validity checks on previously parsed
+ arguments can take place). */
+#define ARGP_KEY_NO_ARGS 0x1000002
+/* Passed in before any parsing is done. Afterwards, the values of each
+ element of the CHILD_INPUT field, if any, in the state structure is
+ copied to each child's state to be the initial value of the INPUT field. */
+#define ARGP_KEY_INIT 0x1000003
+/* Use after all other keys, including SUCCESS & END. */
+#define ARGP_KEY_FINI 0x1000007
+/* Passed in when parsing has successfully been completed (even if there are
+ still arguments remaining). */
+#define ARGP_KEY_SUCCESS 0x1000004
+/* Passed in if an error occurs. */
+#define ARGP_KEY_ERROR 0x1000005
+
+/* An argp structure contains a set of options declarations, a function to
+ deal with parsing one, documentation string, a possible vector of child
+ argp's, and perhaps a function to filter help output. When actually
+ parsing options, getopt is called with the union of all the argp
+ structures chained together through their CHILD pointers, with conflicts
+ being resolved in favor of the first occurrence in the chain. */
+struct argp
+{
+ /* An array of argp_option structures, terminated by an entry with both
+ NAME and KEY having a value of 0. */
+ const struct argp_option *options;
+
+ /* What to do with an option from this structure. KEY is the key
+ associated with the option, and ARG is any associated argument (NULL if
+ none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be
+ returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
+ parsing is stopped immediately, and that value is returned from
+ argp_parse(). For special (non-user-supplied) values of KEY, see the
+ ARGP_KEY_ definitions below. */
+ argp_parser_t parser;
+
+ /* A string describing what other arguments are wanted by this program. It
+ is only used by argp_usage to print the `Usage:' message. If it
+ contains newlines, the strings separated by them are considered
+ alternative usage patterns, and printed on separate lines (lines after
+ the first are prefix by ` or: ' instead of `Usage:'). */
+ const char *args_doc;
+
+ /* If non-NULL, a string containing extra text to be printed before and
+ after the options in a long help message (separated by a vertical tab
+ `\v' character).
+ Write the initial value as N_("BEFORE-TEXT") "\v" N_("AFTER-TEXT") if
+ you want xgettext to collect the two pieces of text into a POT file. */
+ const char *doc;
+
+ /* A vector of argp_children structures, terminated by a member with a 0
+ argp field, pointing to child argps should be parsed with this one. Any
+ conflicts are resolved in favor of this argp, or early argps in the
+ CHILDREN list. This field is useful if you use libraries that supply
+ their own argp structure, which you want to use in conjunction with your
+ own. */
+ const struct argp_child *children;
+
+ /* If non-zero, this should be a function to filter the output of help
+ messages. KEY is either a key from an option, in which case TEXT is
+ that option's help text, or a special key from the ARGP_KEY_HELP_
+ defines, below, describing which other help text TEXT is. The function
+ should return either TEXT, if it should be used as-is, a replacement
+ string, which should be malloced, and will be freed by argp, or NULL,
+ meaning `print nothing'. The value for TEXT is *after* any translation
+ has been done, so if any of the replacement text also needs translation,
+ that should be done by the filter function. INPUT is either the input
+ supplied to argp_parse, or NULL, if argp_help was called directly. */
+ char *(*help_filter) (int __key, const char *__text, void *__input);
+
+ /* If non-zero the strings used in the argp library are translated using
+ the domain described by this string. Otherwise the currently installed
+ default domain is used. */
+ const char *argp_domain;
+};
+
+/* Possible KEY arguments to a help filter function. */
+#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */
+#define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */
+#define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */
+#define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation;
+ TEXT is NULL for this key. */
+/* Explanatory note emitted when duplicate option arguments have been
+ suppressed. */
+#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
+#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */
+
+/* When an argp has a non-zero CHILDREN field, it should point to a vector of
+ argp_child structures, each of which describes a subsidiary argp. */
+struct argp_child
+{
+ /* The child parser. */
+ const struct argp *argp;
+
+ /* Flags for this child. */
+ int flags;
+
+ /* If non-zero, an optional header to be printed in help output before the
+ child options. As a side-effect, a non-zero value forces the child
+ options to be grouped together; to achieve this effect without actually
+ printing a header string, use a value of "". */
+ const char *header;
+
+ /* Where to group the child options relative to the other (`consolidated')
+ options in the parent argp; the values are the same as the GROUP field
+ in argp_option structs, but all child-groupings follow parent options at
+ a particular group level. If both this field and HEADER are zero, then
+ they aren't grouped at all, but rather merged with the parent options
+ (merging the child's grouping levels with the parents). */
+ int group;
+};
+
+/* Parsing state. This is provided to parsing functions called by argp,
+ which may examine and, as noted, modify fields. */
+struct argp_state
+{
+ /* The top level ARGP being parsed. */
+ const struct argp *root_argp;
+
+ /* The argument vector being parsed. May be modified. */
+ int argc;
+ char **argv;
+
+ /* The index in ARGV of the next arg that to be parsed. May be modified. */
+ int next;
+
+ /* The flags supplied to argp_parse. May be modified. */
+ unsigned flags;
+
+ /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
+ number of the current arg, starting at zero, and incremented after each
+ such call returns. At all other times, this is the number of such
+ arguments that have been processed. */
+ unsigned arg_num;
+
+ /* If non-zero, the index in ARGV of the first argument following a special
+ `--' argument (which prevents anything following being interpreted as an
+ option). Only set once argument parsing has proceeded past this point. */
+ int quoted;
+
+ /* An arbitrary pointer passed in from the user. */
+ void *input;
+ /* Values to pass to child parsers. This vector will be the same length as
+ the number of children for the current parser. */
+ void **child_inputs;
+
+ /* For the parser's use. Initialized to 0. */
+ void *hook;
+
+ /* The name used when printing messages. This is initialized to ARGV[0],
+ or PROGRAM_INVOCATION_NAME if that is unavailable. */
+ char *name;
+
+ /* Streams used when argp prints something. */
+ FILE *err_stream; /* For errors; initialized to stderr. */
+ FILE *out_stream; /* For information; initialized to stdout. */
+
+ void *pstate; /* Private, for use by argp. */
+};
+
+/* Flags for argp_parse (note that the defaults are those that are
+ convenient for program command line parsing): */
+
+/* Don't ignore the first element of ARGV. Normally (and always unless
+ ARGP_NO_ERRS is set) the first element of the argument vector is
+ skipped for option parsing purposes, as it corresponds to the program name
+ in a command line. */
+#define ARGP_PARSE_ARGV0 0x01
+
+/* Don't print error messages for unknown options to stderr; unless this flag
+ is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
+ name in the error messages. This flag implies ARGP_NO_EXIT (on the
+ assumption that silent exiting upon errors is bad behaviour). */
+#define ARGP_NO_ERRS 0x02
+
+/* Don't parse any non-option args. Normally non-option args are parsed by
+ calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
+ as the value. Since it's impossible to know which parse function wants to
+ handle it, each one is called in turn, until one returns 0 or an error
+ other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
+ argp_parse returns prematurely (but with a return value of 0). If all
+ args have been parsed without error, all parsing functions are called one
+ last time with a key of ARGP_KEY_END. This flag needn't normally be set,
+ as the normal behavior is to stop parsing as soon as some argument can't
+ be handled. */
+#define ARGP_NO_ARGS 0x04
+
+/* Parse options and arguments in the same order they occur on the command
+ line -- normally they're rearranged so that all options come first. */
+#define ARGP_IN_ORDER 0x08
+
+/* Don't provide the standard long option --help, which causes usage and
+ option help information to be output to stdout, and exit (0) called. */
+#define ARGP_NO_HELP 0x10
+
+/* Don't exit on errors (they may still result in error messages). */
+#define ARGP_NO_EXIT 0x20
+
+/* Use the gnu getopt `long-only' rules for parsing arguments. */
+#define ARGP_LONG_ONLY 0x40
+
+/* Turns off any message-printing/exiting options. */
+#define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
+
+/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
+ FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the
+ index in ARGV of the first unparsed option is returned in it. If an
+ unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
+ routine returned a non-zero value, it is returned; otherwise 0 is
+ returned. This function may also call exit unless the ARGP_NO_HELP flag
+ is set. INPUT is a pointer to a value to be passed in to the parser. */
+extern error_t argp_parse (const struct argp *__restrict __argp,
+ int /*argc*/, char **__restrict /*argv*/,
+ unsigned __flags, int *__restrict __arg_index,
+ void *__restrict __input);
+extern error_t __argp_parse (const struct argp *__restrict __argp,
+ int /*argc*/, char **__restrict /*argv*/,
+ unsigned __flags, int *__restrict __arg_index,
+ void *__restrict __input);
+
+/* Global variables. */
+
+/* GNULIB makes sure both program_invocation_name and
+ program_invocation_short_name are available */
+#ifdef GNULIB_PROGRAM_INVOCATION_NAME
+extern char *program_invocation_name;
+# undef HAVE_DECL_PROGRAM_INVOCATION_NAME
+# define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
+#endif
+
+#ifdef GNULIB_PROGRAM_INVOCATION_SHORT_NAME
+extern char *program_invocation_short_name;
+# undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+# define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
+#endif
+
+/* If defined or set by the user program to a non-zero value, then a default
+ option --version is added (unless the ARGP_NO_HELP flag is used), which
+ will print this string followed by a newline and exit (unless the
+ ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
+extern const char *argp_program_version;
+
+/* If defined or set by the user program to a non-zero value, then a default
+ option --version is added (unless the ARGP_NO_HELP flag is used), which
+ calls this function with a stream to print the version to and a pointer to
+ the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
+ used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
+extern void (*argp_program_version_hook) (FILE *__restrict __stream,
+ struct argp_state *__restrict
+ __state);
+
+/* If defined or set by the user program, it should point to string that is
+ the bug-reporting address for the program. It will be printed by
+ argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
+ standard help messages), embedded in a sentence that says something like
+ `Report bugs to ADDR.'. */
+extern const char *argp_program_bug_address;
+
+/* The exit status that argp will use when exiting due to a parsing error.
+ If not defined or set by the user program, this defaults to EX_USAGE from
+ <sysexits.h>. */
+extern error_t argp_err_exit_status;
+
+/* Flags for argp_help. */
+#define ARGP_HELP_USAGE 0x01 /* a Usage: message. */
+#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */
+#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */
+#define ARGP_HELP_LONG 0x08 /* a long help message. */
+#define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */
+#define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */
+#define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
+#define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */
+#define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to
+ reflect ARGP_LONG_ONLY mode. */
+
+/* These ARGP_HELP flags are only understood by argp_state_help. */
+#define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */
+#define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */
+
+/* The standard thing to do after a program command line parsing error, if an
+ error message has already been printed. */
+#define ARGP_HELP_STD_ERR \
+ (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
+/* The standard thing to do after a program command line parsing error, if no
+ more specific error message has been printed. */
+#define ARGP_HELP_STD_USAGE \
+ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
+/* The standard thing to do in response to a --help option. */
+#define ARGP_HELP_STD_HELP \
+ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
+ | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
+
+/* Output a usage message for ARGP to STREAM. FLAGS are from the set
+ ARGP_HELP_*. */
+extern void argp_help (const struct argp *__restrict __argp,
+ FILE *__restrict __stream,
+ unsigned __flags, char *__restrict __name);
+extern void __argp_help (const struct argp *__restrict __argp,
+ FILE *__restrict __stream, unsigned __flags,
+ char *__name);
+
+/* The following routines are intended to be called from within an argp
+ parsing routine (thus taking an argp_state structure as the first
+ argument). They may or may not print an error message and exit, depending
+ on the flags in STATE -- in any case, the caller should be prepared for
+ them *not* to exit, and should return an appropiate error after calling
+ them. [argp_usage & argp_error should probably be called argp_state_...,
+ but they're used often enough that they should be short] */
+
+/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
+ from the set ARGP_HELP_*. */
+extern void argp_state_help (const struct argp_state *__restrict __state,
+ FILE *__restrict __stream,
+ unsigned int __flags);
+extern void __argp_state_help (const struct argp_state *__restrict __state,
+ FILE *__restrict __stream,
+ unsigned int __flags);
+
+#if _LIBC || !defined __USE_EXTERN_INLINES
+/* Possibly output the standard usage message for ARGP to stderr and exit. */
+extern void argp_usage (const struct argp_state *__state);
+extern void __argp_usage (const struct argp_state *__state);
+#endif
+
+/* If appropriate, print the printf string FMT and following args, preceded
+ by the program name and `:', to stderr, and followed by a `Try ... --help'
+ message, then exit (1). */
+extern void argp_error (const struct argp_state *__restrict __state,
+ const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+extern void __argp_error (const struct argp_state *__restrict __state,
+ const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+
+/* Similar to the standard gnu error-reporting function error(), but will
+ respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
+ to STATE->err_stream. This is useful for argument parsing code that is
+ shared between program startup (when exiting is desired) and runtime
+ option parsing (when typically an error code is returned instead). The
+ difference between this function and argp_error is that the latter is for
+ *parsing errors*, and the former is for other problems that occur during
+ parsing but don't reflect a (syntactic) problem with the input. */
+extern void argp_failure (const struct argp_state *__restrict __state,
+ int __status, int __errnum,
+ const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 4, 5)));
+extern void __argp_failure (const struct argp_state *__restrict __state,
+ int __status, int __errnum,
+ const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 4, 5)));
+
+#if _LIBC || !defined __USE_EXTERN_INLINES
+/* Returns true if the option OPT is a valid short option. */
+extern int _option_is_short (const struct argp_option *__opt) __THROW;
+extern int __option_is_short (const struct argp_option *__opt) __THROW;
+
+/* Returns true if the option OPT is in fact the last (unused) entry in an
+ options array. */
+extern int _option_is_end (const struct argp_option *__opt) __THROW;
+extern int __option_is_end (const struct argp_option *__opt) __THROW;
+#endif
+
+/* Return the input field for ARGP in the parser corresponding to STATE; used
+ by the help routines. */
+extern void *_argp_input (const struct argp *__restrict __argp,
+ const struct argp_state *__restrict __state)
+ __THROW;
+extern void *__argp_input (const struct argp *__restrict __argp,
+ const struct argp_state *__restrict __state)
+ __THROW;
+
+#ifdef __USE_EXTERN_INLINES
+
+# if !_LIBC
+# define __argp_usage argp_usage
+# define __argp_state_help argp_state_help
+# define __option_is_short _option_is_short
+# define __option_is_end _option_is_end
+# endif
+
+# ifndef ARGP_EI
+# ifdef __GNUC__
+ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. It defines a macro
+ __GNUC_STDC_INLINE__ to indicate this situation or a macro
+ __GNUC_GNU_INLINE__ to indicate the opposite situation.
+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
+ semantics but warns, unless -fgnu89-inline is used:
+ warning: C99 inline functions are not supported; using GNU89
+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. */
+# if defined __GNUC_STDC_INLINE__
+# define ARGP_EI __inline__
+# elif defined __GNUC_GNU_INLINE__
+# define ARGP_EI extern __inline__ __attribute__ ((__gnu_inline__))
+# else
+# define ARGP_EI extern __inline__
+# endif
+# else
+ /* With other compilers, assume the ISO C99 meaning of 'inline', if
+ the compiler supports 'inline' at all. */
+# define ARGP_EI inline
+# endif
+# endif
+
+ARGP_EI void
+__argp_usage (const struct argp_state *__state)
+{
+ __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+}
+
+ARGP_EI int
+__NTH (__option_is_short (const struct argp_option *__opt))
+{
+ if (__opt->flags & OPTION_DOC)
+ return 0;
+ else
+ {
+ int __key = __opt->key;
+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
+ }
+}
+
+ARGP_EI int
+__NTH (__option_is_end (const struct argp_option *__opt))
+{
+ return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+}
+
+# if !_LIBC
+# undef __argp_usage
+# undef __argp_state_help
+# undef __option_is_short
+# undef __option_is_end
+# endif
+#endif /* Use extern inlines. */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* argp.h */
diff --git a/grub-core/gnulib/asnprintf.c b/grub-core/gnulib/asnprintf.c
new file mode 100644
index 0000000..3bd2229
--- /dev/null
+++ b/grub-core/gnulib/asnprintf.c
@@ -0,0 +1,35 @@
+/* Formatted output to strings.
+ Copyright (C) 1999, 2002, 2006, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include "vasnprintf.h"
+
+#include <stdarg.h>
+
+char *
+asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+ va_list args;
+ char *result;
+
+ va_start (args, format);
+ result = vasnprintf (resultbuf, lengthp, format, args);
+ va_end (args);
+ return result;
+}
diff --git a/grub-core/gnulib/basename-lgpl.c b/grub-core/gnulib/basename-lgpl.c
new file mode 100644
index 0000000..a35ff01
--- /dev/null
+++ b/grub-core/gnulib/basename-lgpl.c
@@ -0,0 +1,75 @@
+/* basename.c -- return the last element in a file name
+
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <string.h>
+
+/* Return the address of the last file name component of NAME. If
+ NAME has no relative file name components because it is a file
+ system root, return the empty string. */
+
+char *
+last_component (char const *name)
+{
+ char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
+ char const *p;
+ bool saw_slash = false;
+
+ while (ISSLASH (*base))
+ base++;
+
+ for (p = base; *p; p++)
+ {
+ if (ISSLASH (*p))
+ saw_slash = true;
+ else if (saw_slash)
+ {
+ base = p;
+ saw_slash = false;
+ }
+ }
+
+ return (char *) base;
+}
+
+/* Return the length of the basename NAME. Typically NAME is the
+ value returned by base_name or last_component. Act like strlen
+ (NAME), except omit all trailing slashes. */
+
+size_t
+base_len (char const *name)
+{
+ size_t len;
+ size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+
+ for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
+ continue;
+
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1
+ && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
+ return 2;
+
+ if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
+ && len == prefix_len && ISSLASH (name[prefix_len]))
+ return prefix_len + 1;
+
+ return len;
+}
diff --git a/grub-core/gnulib/btowc.c b/grub-core/gnulib/btowc.c
new file mode 100644
index 0000000..8744602
--- /dev/null
+++ b/grub-core/gnulib/btowc.c
@@ -0,0 +1,39 @@
+/* Convert unibyte character to wide character.
+ Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+wint_t
+btowc (int c)
+{
+ if (c != EOF)
+ {
+ char buf[1];
+ wchar_t wc;
+
+ buf[0] = c;
+ if (mbtowc (&wc, buf, 1) >= 0)
+ return wc;
+ }
+ return WEOF;
+}
diff --git a/grub-core/gnulib/config.charset b/grub-core/gnulib/config.charset
new file mode 100644
index 0000000..aa7d00d
--- /dev/null
+++ b/grub-core/gnulib/config.charset
@@ -0,0 +1,683 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+# Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The table consists of lines of the form
+# ALIAS CANONICAL
+#
+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
+# ALIAS is compared in a case sensitive way.
+#
+# CANONICAL is the GNU canonical name for this character encoding.
+# It must be an encoding supported by libiconv. Support by GNU libc is
+# also desirable. CANONICAL is case insensitive. Usually an upper case
+# MIME charset name is preferred.
+# The current list of GNU canonical charset names is as follows.
+#
+# name MIME? used by which systems
+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin
+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+# ISO-8859-3 Y glibc solaris cygwin
+# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+# ISO-8859-6 Y glibc aix hpux solaris cygwin
+# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin
+# ISO-8859-8 Y glibc aix hpux osf solaris cygwin
+# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin
+# ISO-8859-13 glibc netbsd openbsd darwin cygwin
+# ISO-8859-14 glibc cygwin
+# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin
+# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
+# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
+# KOI8-T glibc
+# CP437 dos
+# CP775 dos
+# CP850 aix osf dos
+# CP852 dos
+# CP855 dos
+# CP856 aix
+# CP857 dos
+# CP861 dos
+# CP862 dos
+# CP864 dos
+# CP865 dos
+# CP866 freebsd netbsd openbsd darwin dos
+# CP869 dos
+# CP874 woe32 dos
+# CP922 aix
+# CP932 aix cygwin woe32 dos
+# CP943 aix
+# CP949 osf darwin woe32 dos
+# CP950 woe32 dos
+# CP1046 aix
+# CP1124 aix
+# CP1125 dos
+# CP1129 aix
+# CP1131 darwin
+# CP1250 woe32
+# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32
+# CP1252 aix woe32
+# CP1253 woe32
+# CP1254 woe32
+# CP1255 glibc woe32
+# CP1256 woe32
+# CP1257 woe32
+# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
+# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
+# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
+# EUC-TW glibc aix hpux irix osf solaris netbsd
+# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
+# BIG5-HKSCS glibc solaris darwin
+# GBK glibc aix osf solaris darwin cygwin woe32 dos
+# GB18030 glibc solaris netbsd darwin
+# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
+# JOHAB glibc solaris woe32
+# TIS-620 glibc aix hpux osf solaris cygwin
+# VISCII Y glibc
+# TCVN5712-1 glibc
+# ARMSCII-8 glibc darwin
+# GEORGIAN-PS glibc cygwin
+# PT154 glibc
+# HP-ROMAN8 hpux
+# HP-ARABIC8 hpux
+# HP-GREEK8 hpux
+# HP-HEBREW8 hpux
+# HP-TURKISH8 hpux
+# HP-KANA8 hpux
+# DEC-KANJI osf
+# DEC-HANYU osf
+# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
+#
+# Note: Names which are not marked as being a MIME name should not be used in
+# Internet protocols for information interchange (mail, news, etc.).
+#
+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+# must understand both names and treat them as equivalent.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+
+host="$1"
+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
+echo "# This file contains a table of character encoding aliases,"
+echo "# suitable for operating system '${os}'."
+echo "# It was automatically generated from config.charset."
+# List of references, updated during installation:
+echo "# Packages using this file: "
+case "$os" in
+ linux-gnulibc1*)
+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "C ASCII"
+ echo "POSIX ASCII"
+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
+ sv_FI sv_SE; do
+ echo "$l ISO-8859-1"
+ echo "$l.iso-8859-1 ISO-8859-1"
+ echo "$l.iso-8859-15 ISO-8859-15"
+ echo "$l.iso-8859-15@euro ISO-8859-15"
+ echo "$l@euro ISO-8859-15"
+ echo "$l.cp-437 CP437"
+ echo "$l.cp-850 CP850"
+ echo "$l.cp-1252 CP1252"
+ echo "$l.cp-1252@euro CP1252"
+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
+ echo "$l.utf-8 UTF-8"
+ echo "$l.utf-8@euro UTF-8"
+ done
+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
+ sl_SI sr sr_CS sr_YU; do
+ echo "$l ISO-8859-2"
+ echo "$l.iso-8859-2 ISO-8859-2"
+ echo "$l.cp-852 CP852"
+ echo "$l.cp-1250 CP1250"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in mk mk_MK ru ru_RU; do
+ echo "$l ISO-8859-5"
+ echo "$l.iso-8859-5 ISO-8859-5"
+ echo "$l.koi8-r KOI8-R"
+ echo "$l.cp-866 CP866"
+ echo "$l.cp-1251 CP1251"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in ar ar_SA; do
+ echo "$l ISO-8859-6"
+ echo "$l.iso-8859-6 ISO-8859-6"
+ echo "$l.cp-864 CP864"
+ #echo "$l.cp-868 CP868" # not a commonly used encoding
+ echo "$l.cp-1256 CP1256"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in el el_GR gr gr_GR; do
+ echo "$l ISO-8859-7"
+ echo "$l.iso-8859-7 ISO-8859-7"
+ echo "$l.cp-869 CP869"
+ echo "$l.cp-1253 CP1253"
+ echo "$l.cp-1253@euro CP1253"
+ echo "$l.utf-8 UTF-8"
+ echo "$l.utf-8@euro UTF-8"
+ done
+ for l in he he_IL iw iw_IL; do
+ echo "$l ISO-8859-8"
+ echo "$l.iso-8859-8 ISO-8859-8"
+ echo "$l.cp-862 CP862"
+ echo "$l.cp-1255 CP1255"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in tr tr_TR; do
+ echo "$l ISO-8859-9"
+ echo "$l.iso-8859-9 ISO-8859-9"
+ echo "$l.cp-857 CP857"
+ echo "$l.cp-1254 CP1254"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in lt lt_LT lv lv_LV; do
+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
+ echo "$l ISO-8859-13"
+ done
+ for l in ru_UA uk uk_UA; do
+ echo "$l KOI8-U"
+ done
+ for l in zh zh_CN; do
+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
+ echo "$l GB2312"
+ done
+ for l in ja ja_JP ja_JP.EUC; do
+ echo "$l EUC-JP"
+ done
+ for l in ko ko_KR; do
+ echo "$l EUC-KR"
+ done
+ for l in th th_TH; do
+ echo "$l TIS-620"
+ done
+ for l in fa fa_IR; do
+ #echo "$l ISIRI-3342" # a broken encoding
+ echo "$l.utf-8 UTF-8"
+ done
+ ;;
+ linux* | *-gnu*)
+ # With glibc-2.1 or newer, we don't need any canonicalization,
+ # because glibc has iconv and both glibc and libiconv support all
+ # GNU canonical names directly. Therefore, the Makefile does not
+ # need to install the alias file at all.
+ # The following applies only to glibc-2.0.x and older libcs.
+ echo "ISO_646.IRV:1983 ASCII"
+ ;;
+ aix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "IBM-850 CP850"
+ echo "IBM-856 CP856"
+ echo "IBM-921 ISO-8859-13"
+ echo "IBM-922 CP922"
+ echo "IBM-932 CP932"
+ echo "IBM-943 CP943"
+ echo "IBM-1046 CP1046"
+ echo "IBM-1124 CP1124"
+ echo "IBM-1129 CP1129"
+ echo "IBM-1252 CP1252"
+ echo "IBM-eucCN GB2312"
+ echo "IBM-eucJP EUC-JP"
+ echo "IBM-eucKR EUC-KR"
+ echo "IBM-eucTW EUC-TW"
+ echo "big5 BIG5"
+ echo "GBK GBK"
+ echo "TIS-620 TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ hpux*)
+ echo "iso88591 ISO-8859-1"
+ echo "iso88592 ISO-8859-2"
+ echo "iso88595 ISO-8859-5"
+ echo "iso88596 ISO-8859-6"
+ echo "iso88597 ISO-8859-7"
+ echo "iso88598 ISO-8859-8"
+ echo "iso88599 ISO-8859-9"
+ echo "iso885915 ISO-8859-15"
+ echo "roman8 HP-ROMAN8"
+ echo "arabic8 HP-ARABIC8"
+ echo "greek8 HP-GREEK8"
+ echo "hebrew8 HP-HEBREW8"
+ echo "turkish8 HP-TURKISH8"
+ echo "kana8 HP-KANA8"
+ echo "tis620 TIS-620"
+ echo "big5 BIG5"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "hp15CN GB2312"
+ #echo "ccdc ?" # what is this?
+ echo "SJIS SHIFT_JIS"
+ echo "utf8 UTF-8"
+ ;;
+ irix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ ;;
+ osf*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "cp850 CP850"
+ echo "big5 BIG5"
+ echo "dechanyu DEC-HANYU"
+ echo "dechanzi GB2312"
+ echo "deckanji DEC-KANJI"
+ echo "deckorean EUC-KR"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "GBK GBK"
+ echo "KSC5601 CP949"
+ echo "sdeckanji EUC-JP"
+ echo "SJIS SHIFT_JIS"
+ echo "TACTIS TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ solaris*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-3 ISO-8859-3"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "koi8-r KOI8-R"
+ echo "ansi-1251 CP1251"
+ echo "BIG5 BIG5"
+ echo "Big5-HKSCS BIG5-HKSCS"
+ echo "gb2312 GB2312"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "cns11643 EUC-TW"
+ echo "5601 EUC-KR"
+ echo "ko_KR.johap92 JOHAB"
+ echo "eucJP EUC-JP"
+ echo "PCK SHIFT_JIS"
+ echo "TIS620.2533 TIS-620"
+ #echo "sun_eu_greek ?" # what is this?
+ echo "UTF-8 UTF-8"
+ ;;
+ freebsd* | os2*)
+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+ # reuse FreeBSD's locale data for OS/2.
+ echo "C ASCII"
+ echo "US-ASCII ASCII"
+ for l in la_LN lt_LN; do
+ echo "$l.ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+ echo "$l.ISO_8859-1 ISO-8859-1"
+ echo "$l.DIS_8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+ echo "$l.ISO_8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO_8859-4 ISO-8859-4"
+ done
+ for l in ru_RU ru_SU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO_8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ja_JP.Shift_JIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ netbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "BIG5 BIG5"
+ echo "SJIS SHIFT_JIS"
+ ;;
+ openbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ ;;
+ darwin[56]*)
+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "C ASCII"
+ for l in en_AU en_CA en_GB en_US la_LN; do
+ echo "$l.US-ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
+ nl_NL no_NO pt_PT sv_SE; do
+ echo "$l ISO-8859-1"
+ echo "$l.ISO8859-1 ISO-8859-1"
+ echo "$l.ISO8859-15 ISO-8859-15"
+ done
+ for l in la_LN; do
+ echo "$l.ISO8859-1 ISO-8859-1"
+ echo "$l.ISO8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
+ echo "$l.ISO8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO8859-4 ISO-8859-4"
+ done
+ for l in ru_RU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ for l in bg_BG; do
+ echo "$l.CP1251 CP1251"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ darwin*)
+ # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
+ # useless:
+ # - It returns the empty string when LANG is set to a locale of the
+ # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
+ # LC_CTYPE file.
+ # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
+ # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
+ # - The documentation says:
+ # "... all code that calls BSD system routines should ensure
+ # that the const *char parameters of these routines are in UTF-8
+ # encoding. All BSD system functions expect their string
+ # parameters to be in UTF-8 encoding and nothing else."
+ # It also says
+ # "An additional caveat is that string parameters for files,
+ # paths, and other file-system entities must be in canonical
+ # UTF-8. In a canonical UTF-8 Unicode string, all decomposable
+ # characters are decomposed ..."
+ # but this is not true: You can pass non-decomposed UTF-8 strings
+ # to file system functions, and it is the OS which will convert
+ # them to decomposed UTF-8 before accessing the file system.
+ # - The Apple Terminal application displays UTF-8 by default.
+ # - However, other applications are free to use different encodings:
+ # - xterm uses ISO-8859-1 by default.
+ # - TextEdit uses MacRoman by default.
+ # We prefer UTF-8 over decomposed UTF-8-MAC because one should
+ # minimize the use of decomposed Unicode. Unfortunately, through the
+ # Darwin file system, decomposed UTF-8 strings are leaked into user
+ # space nevertheless.
+ # Then there are also the locales with encodings other than US-ASCII
+ # and UTF-8. These locales can be occasionally useful to users (e.g.
+ # when grepping through ISO-8859-1 encoded text files), when all their
+ # file names are in US-ASCII.
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "KOI8-R KOI8-R"
+ echo "KOI8-U KOI8-U"
+ echo "CP866 CP866"
+ echo "CP949 CP949"
+ echo "CP1131 CP1131"
+ echo "CP1251 CP1251"
+ echo "eucCN GB2312"
+ echo "GB2312 GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "Big5 BIG5"
+ echo "Big5HKSCS BIG5-HKSCS"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "SJIS SHIFT_JIS"
+ echo "ARMSCII-8 ARMSCII-8"
+ echo "PT154 PT154"
+ #echo "ISCII-DEV ?"
+ echo "* UTF-8"
+ ;;
+ beos* | haiku*)
+ # BeOS and Haiku have a single locale, and it has UTF-8 encoding.
+ echo "* UTF-8"
+ ;;
+ msdosdjgpp*)
+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "#"
+ echo "# The encodings given here may not all be correct."
+ echo "# If you find that the encoding given for your language and"
+ echo "# country is not the one your DOS machine actually uses, just"
+ echo "# correct it in this file, and send a mail to"
+ echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
+ echo "# and Bruno Haible <bruno@clisp.org>."
+ echo "#"
+ echo "C ASCII"
+ # ISO-8859-1 languages
+ echo "ca CP850"
+ echo "ca_ES CP850"
+ echo "da CP865" # not CP850 ??
+ echo "da_DK CP865" # not CP850 ??
+ echo "de CP850"
+ echo "de_AT CP850"
+ echo "de_CH CP850"
+ echo "de_DE CP850"
+ echo "en CP850"
+ echo "en_AU CP850" # not CP437 ??
+ echo "en_CA CP850"
+ echo "en_GB CP850"
+ echo "en_NZ CP437"
+ echo "en_US CP437"
+ echo "en_ZA CP850" # not CP437 ??
+ echo "es CP850"
+ echo "es_AR CP850"
+ echo "es_BO CP850"
+ echo "es_CL CP850"
+ echo "es_CO CP850"
+ echo "es_CR CP850"
+ echo "es_CU CP850"
+ echo "es_DO CP850"
+ echo "es_EC CP850"
+ echo "es_ES CP850"
+ echo "es_GT CP850"
+ echo "es_HN CP850"
+ echo "es_MX CP850"
+ echo "es_NI CP850"
+ echo "es_PA CP850"
+ echo "es_PY CP850"
+ echo "es_PE CP850"
+ echo "es_SV CP850"
+ echo "es_UY CP850"
+ echo "es_VE CP850"
+ echo "et CP850"
+ echo "et_EE CP850"
+ echo "eu CP850"
+ echo "eu_ES CP850"
+ echo "fi CP850"
+ echo "fi_FI CP850"
+ echo "fr CP850"
+ echo "fr_BE CP850"
+ echo "fr_CA CP850"
+ echo "fr_CH CP850"
+ echo "fr_FR CP850"
+ echo "ga CP850"
+ echo "ga_IE CP850"
+ echo "gd CP850"
+ echo "gd_GB CP850"
+ echo "gl CP850"
+ echo "gl_ES CP850"
+ echo "id CP850" # not CP437 ??
+ echo "id_ID CP850" # not CP437 ??
+ echo "is CP861" # not CP850 ??
+ echo "is_IS CP861" # not CP850 ??
+ echo "it CP850"
+ echo "it_CH CP850"
+ echo "it_IT CP850"
+ echo "lt CP775"
+ echo "lt_LT CP775"
+ echo "lv CP775"
+ echo "lv_LV CP775"
+ echo "nb CP865" # not CP850 ??
+ echo "nb_NO CP865" # not CP850 ??
+ echo "nl CP850"
+ echo "nl_BE CP850"
+ echo "nl_NL CP850"
+ echo "nn CP865" # not CP850 ??
+ echo "nn_NO CP865" # not CP850 ??
+ echo "no CP865" # not CP850 ??
+ echo "no_NO CP865" # not CP850 ??
+ echo "pt CP850"
+ echo "pt_BR CP850"
+ echo "pt_PT CP850"
+ echo "sv CP850"
+ echo "sv_SE CP850"
+ # ISO-8859-2 languages
+ echo "cs CP852"
+ echo "cs_CZ CP852"
+ echo "hr CP852"
+ echo "hr_HR CP852"
+ echo "hu CP852"
+ echo "hu_HU CP852"
+ echo "pl CP852"
+ echo "pl_PL CP852"
+ echo "ro CP852"
+ echo "ro_RO CP852"
+ echo "sk CP852"
+ echo "sk_SK CP852"
+ echo "sl CP852"
+ echo "sl_SI CP852"
+ echo "sq CP852"
+ echo "sq_AL CP852"
+ echo "sr CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+ # ISO-8859-3 languages
+ echo "mt CP850"
+ echo "mt_MT CP850"
+ # ISO-8859-5 languages
+ echo "be CP866"
+ echo "be_BE CP866"
+ echo "bg CP866" # not CP855 ??
+ echo "bg_BG CP866" # not CP855 ??
+ echo "mk CP866" # not CP855 ??
+ echo "mk_MK CP866" # not CP855 ??
+ echo "ru CP866"
+ echo "ru_RU CP866"
+ echo "uk CP1125"
+ echo "uk_UA CP1125"
+ # ISO-8859-6 languages
+ echo "ar CP864"
+ echo "ar_AE CP864"
+ echo "ar_DZ CP864"
+ echo "ar_EG CP864"
+ echo "ar_IQ CP864"
+ echo "ar_IR CP864"
+ echo "ar_JO CP864"
+ echo "ar_KW CP864"
+ echo "ar_MA CP864"
+ echo "ar_OM CP864"
+ echo "ar_QA CP864"
+ echo "ar_SA CP864"
+ echo "ar_SY CP864"
+ # ISO-8859-7 languages
+ echo "el CP869"
+ echo "el_GR CP869"
+ # ISO-8859-8 languages
+ echo "he CP862"
+ echo "he_IL CP862"
+ # ISO-8859-9 languages
+ echo "tr CP857"
+ echo "tr_TR CP857"
+ # Japanese
+ echo "ja CP932"
+ echo "ja_JP CP932"
+ # Chinese
+ echo "zh_CN GBK"
+ echo "zh_TW CP950" # not CP938 ??
+ # Korean
+ echo "kr CP949" # not CP934 ??
+ echo "kr_KR CP949" # not CP934 ??
+ # Thai
+ echo "th CP874"
+ echo "th_TH CP874"
+ # Other
+ echo "eo CP850"
+ echo "eo_EO CP850"
+ ;;
+esac
diff --git a/grub-core/gnulib/dirname-lgpl.c b/grub-core/gnulib/dirname-lgpl.c
new file mode 100644
index 0000000..d4506e0
--- /dev/null
+++ b/grub-core/gnulib/dirname-lgpl.c
@@ -0,0 +1,86 @@
+/* dirname.c -- return all but the last element in a file name
+
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+/* Return the length of the prefix of FILE that will be used by
+ dir_name. If FILE is in the working directory, this returns zero
+ even though `dir_name (FILE)' will return ".". Works properly even
+ if there are trailing slashes (by effectively ignoring them). */
+
+size_t
+dir_len (char const *file)
+{
+ size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
+ size_t length;
+
+ /* Advance prefix_length beyond important leading slashes. */
+ prefix_length += (prefix_length != 0
+ ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+ && ISSLASH (file[prefix_length]))
+ : (ISSLASH (file[0])
+ ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT
+ && ISSLASH (file[1]) && ! ISSLASH (file[2])
+ ? 2 : 1))
+ : 0));
+
+ /* Strip the basename and any redundant slashes before it. */
+ for (length = last_component (file) - file;
+ prefix_length < length; length--)
+ if (! ISSLASH (file[length - 1]))
+ break;
+ return length;
+}
+
+
+/* In general, we can't use the builtin `dirname' function if available,
+ since it has different meanings in different environments.
+ In some environments the builtin `dirname' modifies its argument.
+
+ Return the leading directories part of FILE, allocated with malloc.
+ Works properly even if there are trailing slashes (by effectively
+ ignoring them). Return NULL on failure.
+
+ If lstat (FILE) would succeed, then { chdir (dir_name (FILE));
+ lstat (base_name (FILE)); } will access the same file. Likewise,
+ if the sequence { chdir (dir_name (FILE));
+ rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE
+ to "foo" in the same directory FILE was in. */
+
+char *
+mdir_name (char const *file)
+{
+ size_t length = dir_len (file);
+ bool append_dot = (length == 0
+ || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+ && length == FILE_SYSTEM_PREFIX_LEN (file)
+ && file[2] != '\0' && ! ISSLASH (file[2])));
+ char *dir = malloc (length + append_dot + 1);
+ if (!dir)
+ return NULL;
+ memcpy (dir, file, length);
+ if (append_dot)
+ dir[length++] = '.';
+ dir[length] = '\0';
+ return dir;
+}
diff --git a/grub-core/gnulib/dirname.h b/grub-core/gnulib/dirname.h
new file mode 100644
index 0000000..fb19508
--- /dev/null
+++ b/grub-core/gnulib/dirname.h
@@ -0,0 +1,74 @@
+/* Take file names apart into directory and base names.
+
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2010 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef DIRNAME_H_
+# define DIRNAME_H_ 1
+
+# include <stdbool.h>
+# include <stddef.h>
+
+# ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+# endif
+
+# ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+# endif
+
+# ifndef FILE_SYSTEM_PREFIX_LEN
+# if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+ /* This internal macro assumes ASCII, but all hosts that support drive
+ letters use ASCII. */
+# define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \
+ <= 'z' - 'a')
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
+# else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+# endif
+# endif
+
+# ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
+# endif
+
+# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+# endif
+
+# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
+# else
+# define IS_ABSOLUTE_FILE_NAME(F) \
+ (ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F))
+# endif
+# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
+
+# if GNULIB_DIRNAME
+char *base_name (char const *file);
+char *dir_name (char const *file);
+# endif
+
+char *mdir_name (char const *file);
+size_t base_len (char const *file);
+size_t dir_len (char const *file);
+char *last_component (char const *file);
+
+bool strip_trailing_slashes (char *file);
+
+#endif /* not DIRNAME_H_ */
diff --git a/grub-core/gnulib/errno.in.h b/grub-core/gnulib/errno.in.h
new file mode 100644
index 0000000..140e5d1
--- /dev/null
+++ b/grub-core/gnulib/errno.in.h
@@ -0,0 +1,160 @@
+/* A POSIX-like <errno.h>.
+
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_ERRNO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
+
+#ifndef _GL_ERRNO_H
+#define _GL_ERRNO_H
+
+
+/* On native Windows platforms, many macros are not defined. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */
+# define EWOULDBLOCK EAGAIN
+
+/* Values >= 100 seem safe to use. */
+# define ETXTBSY 100
+# define GNULIB_defined_ETXTBSY 1
+
+/* These are intentionally the same values as the WSA* error numbers, defined
+ in <winsock2.h>. */
+# define EINPROGRESS 10036
+# define EALREADY 10037
+# define ENOTSOCK 10038
+# define EDESTADDRREQ 10039
+# define EMSGSIZE 10040
+# define EPROTOTYPE 10041
+# define ENOPROTOOPT 10042
+# define EPROTONOSUPPORT 10043
+# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
+# define EOPNOTSUPP 10045
+# define EPFNOSUPPORT 10046 /* not required by POSIX */
+# define EAFNOSUPPORT 10047
+# define EADDRINUSE 10048
+# define EADDRNOTAVAIL 10049
+# define ENETDOWN 10050
+# define ENETUNREACH 10051
+# define ENETRESET 10052
+# define ECONNABORTED 10053
+# define ECONNRESET 10054
+# define ENOBUFS 10055
+# define EISCONN 10056
+# define ENOTCONN 10057
+# define ESHUTDOWN 10058 /* not required by POSIX */
+# define ETOOMANYREFS 10059 /* not required by POSIX */
+# define ETIMEDOUT 10060
+# define ECONNREFUSED 10061
+# define ELOOP 10062
+# define EHOSTDOWN 10064 /* not required by POSIX */
+# define EHOSTUNREACH 10065
+# define EPROCLIM 10067 /* not required by POSIX */
+# define EUSERS 10068 /* not required by POSIX */
+# define EDQUOT 10069
+# define ESTALE 10070
+# define EREMOTE 10071 /* not required by POSIX */
+# define GNULIB_defined_ESOCK 1
+
+# endif
+
+
+/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
+ EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
+# if @EMULTIHOP_HIDDEN@
+# define EMULTIHOP @EMULTIHOP_VALUE@
+# define GNULIB_defined_EMULTIHOP 1
+# endif
+# if @ENOLINK_HIDDEN@
+# define ENOLINK @ENOLINK_VALUE@
+# define GNULIB_defined_ENOLINK 1
+# endif
+# if @EOVERFLOW_HIDDEN@
+# define EOVERFLOW @EOVERFLOW_VALUE@
+# define GNULIB_defined_EOVERFLOW 1
+# endif
+
+
+/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
+ EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
+ Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
+ HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
+
+ Note: When one of these systems defines some of these macros some day,
+ binaries will have to be recompiled so that they recognizes the new
+ errno values from the system. */
+
+# ifndef ENOMSG
+# define ENOMSG 2000
+# define GNULIB_defined_ENOMSG 1
+# endif
+
+# ifndef EIDRM
+# define EIDRM 2001
+# define GNULIB_defined_EIDRM 1
+# endif
+
+# ifndef ENOLINK
+# define ENOLINK 2002
+# define GNULIB_defined_ENOLINK 1
+# endif
+
+# ifndef EPROTO
+# define EPROTO 2003
+# define GNULIB_defined_EPROTO 1
+# endif
+
+# ifndef EMULTIHOP
+# define EMULTIHOP 2004
+# define GNULIB_defined_EMULTIHOP 1
+# endif
+
+# ifndef EBADMSG
+# define EBADMSG 2005
+# define GNULIB_defined_EBADMSG 1
+# endif
+
+# ifndef EOVERFLOW
+# define EOVERFLOW 2006
+# define GNULIB_defined_EOVERFLOW 1
+# endif
+
+# ifndef ENOTSUP
+# define ENOTSUP 2007
+# define GNULIB_defined_ENOTSUP 1
+# endif
+
+# ifndef ESTALE
+# define ESTALE 2009
+# define GNULIB_defined_ESTALE 1
+# endif
+
+# ifndef ECANCELED
+# define ECANCELED 2008
+# define GNULIB_defined_ECANCELED 1
+# endif
+
+
+#endif /* _GL_ERRNO_H */
+#endif /* _GL_ERRNO_H */
diff --git a/grub-core/gnulib/error.c b/grub-core/gnulib/error.c
new file mode 100644
index 0000000..ed9dba0
--- /dev/null
+++ b/grub-core/gnulib/error.c
@@ -0,0 +1,394 @@
+/* Error handler for noninteractive utilities
+ Copyright (C) 1990-1998, 2000-2007, 2009-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+#include "error.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !_LIBC && ENABLE_NLS
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <wchar.h>
+# define mbsrtowcs __mbsrtowcs
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called. */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this. */
+
+# define program_name program_invocation_name
+# include <errno.h>
+# include <limits.h>
+# include <libio/libioP.h>
+
+/* In GNU libc we want do not want to use the common name `error' directly.
+ Instead make it a weak alias. */
+extern void __error (int status, int errnum, const char *message, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void __error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message,
+ ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));;
+# define error __error
+# define error_at_line __error_at_line
+
+# include <libio/iolibio.h>
+# define fflush(s) INTUSE(_IO_fflush) (s)
+# undef putc
+# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
+
+# include <bits/libc-lock.h>
+
+#else /* not _LIBC */
+
+# include <fcntl.h>
+# include <unistd.h>
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# endif
+
+/* The gnulib override of fcntl is not needed in this file. */
+# undef fcntl
+
+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+# ifndef HAVE_DECL_STRERROR_R
+"this configure-time declaration test was not run"
+# endif
+char *strerror_r ();
+# endif
+
+/* The calling program should define program_name and set it to the
+ name of the executing program. */
+extern char *program_name;
+
+# if HAVE_STRERROR_R || defined strerror_r
+# define __strerror_r strerror_r
+# endif /* HAVE_STRERROR_R || defined strerror_r */
+#endif /* not _LIBC */
+
+#if !_LIBC
+/* Return non-zero if FD is open. */
+static inline int
+is_open (int fd)
+{
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32: The initial state of unassigned standard file descriptors is
+ that they are open but point to an INVALID_HANDLE_VALUE. There is no
+ fcntl, and the gnulib replacement fcntl does not support F_GETFL. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+# else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+# endif
+}
+#endif
+
+static inline void
+flush_stdout (void)
+{
+#if !_LIBC
+ int stdout_fd;
+
+# if GNULIB_FREOPEN_SAFER
+ /* Use of gnulib's freopen-safer module normally ensures that
+ fileno (stdout) == 1
+ whenever stdout is open. */
+ stdout_fd = STDOUT_FILENO;
+# else
+ /* POSIX states that fileno (stdout) after fclose is unspecified. But in
+ practice it is not a problem, because stdout is statically allocated and
+ the fd of a FILE stream is stored as a field in its allocated memory. */
+ stdout_fd = fileno (stdout);
+# endif
+ /* POSIX states that fflush (stdout) after fclose is unspecified; it
+ is safe in glibc, but not on all other platforms. fflush (NULL)
+ is always defined, but too draconian. */
+ if (0 <= stdout_fd && is_open (stdout_fd))
+#endif
+ fflush (stdout);
+}
+
+static void
+print_errno_message (int errnum)
+{
+ char const *s;
+
+#if defined HAVE_STRERROR_R || _LIBC
+ char errbuf[1024];
+# if STRERROR_R_CHAR_P || _LIBC
+ s = __strerror_r (errnum, errbuf, sizeof errbuf);
+# else
+ if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
+ s = errbuf;
+ else
+ s = 0;
+# endif
+#else
+ s = strerror (errnum);
+#endif
+
+#if !_LIBC
+ if (! s)
+ s = _("Unknown system error");
+#endif
+
+#if _LIBC
+ __fxprintf (NULL, ": %s", s);
+#else
+ fprintf (stderr, ": %s", s);
+#endif
+}
+
+static void
+error_tail (int status, int errnum, const char *message, va_list args)
+{
+#if _LIBC
+ if (_IO_fwide (stderr, 0) > 0)
+ {
+# define ALLOCA_LIMIT 2000
+ size_t len = strlen (message) + 1;
+ wchar_t *wmessage = NULL;
+ mbstate_t st;
+ size_t res;
+ const char *tmp;
+ bool use_malloc = false;
+
+ while (1)
+ {
+ if (__libc_use_alloca (len * sizeof (wchar_t)))
+ wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
+ else
+ {
+ if (!use_malloc)
+ wmessage = NULL;
+
+ wchar_t *p = (wchar_t *) realloc (wmessage,
+ len * sizeof (wchar_t));
+ if (p == NULL)
+ {
+ free (wmessage);
+ fputws_unlocked (L"out of memory\n", stderr);
+ return;
+ }
+ wmessage = p;
+ use_malloc = true;
+ }
+
+ memset (&st, '\0', sizeof (st));
+ tmp = message;
+
+ res = mbsrtowcs (wmessage, &tmp, len, &st);
+ if (res != len)
+ break;
+
+ if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+ {
+ /* This really should not happen if everything is fine. */
+ res = (size_t) -1;
+ break;
+ }
+
+ len *= 2;
+ }
+
+ if (res == (size_t) -1)
+ {
+ /* The string cannot be converted. */
+ if (use_malloc)
+ {
+ free (wmessage);
+ use_malloc = false;
+ }
+ wmessage = (wchar_t *) L"???";
+ }
+
+ __vfwprintf (stderr, wmessage, args);
+
+ if (use_malloc)
+ free (wmessage);
+ }
+ else
+#endif
+ vfprintf (stderr, message, args);
+ va_end (args);
+
+ ++error_message_count;
+ if (errnum)
+ print_errno_message (errnum);
+#if _LIBC
+ __fxprintf (NULL, "\n");
+#else
+ putc ('\n', stderr);
+#endif
+ fflush (stderr);
+ if (status)
+ exit (status);
+}
+
+
+/* Print the program name and error message MESSAGE, which is a printf-style
+ format string with optional args.
+ If ERRNUM is nonzero, print its corresponding system error message.
+ Exit with status STATUS if it is nonzero. */
+void
+error (int status, int errnum, const char *message, ...)
+{
+ va_list args;
+
+#if defined _LIBC && defined __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+ 0);
+#endif
+
+ flush_stdout ();
+#ifdef _LIBC
+ _IO_flockfile (stderr);
+#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+#if _LIBC
+ __fxprintf (NULL, "%s: ", program_name);
+#else
+ fprintf (stderr, "%s: ", program_name);
+#endif
+ }
+
+ va_start (args, message);
+ error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+ _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+int error_one_per_line;
+
+void
+error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message, ...)
+{
+ va_list args;
+
+ if (error_one_per_line)
+ {
+ static const char *old_file_name;
+ static unsigned int old_line_number;
+
+ if (old_line_number == line_number
+ && (file_name == old_file_name
+ || strcmp (old_file_name, file_name) == 0))
+ /* Simply return and print nothing. */
+ return;
+
+ old_file_name = file_name;
+ old_line_number = line_number;
+ }
+
+#if defined _LIBC && defined __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+ 0);
+#endif
+
+ flush_stdout ();
+#ifdef _LIBC
+ _IO_flockfile (stderr);
+#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+#if _LIBC
+ __fxprintf (NULL, "%s:", program_name);
+#else
+ fprintf (stderr, "%s:", program_name);
+#endif
+ }
+
+#if _LIBC
+ __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+ file_name, line_number);
+#else
+ fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+ file_name, line_number);
+#endif
+
+ va_start (args, message);
+ error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+ _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+#ifdef _LIBC
+/* Make the weak alias. */
+# undef error
+# undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif
diff --git a/grub-core/gnulib/error.h b/grub-core/gnulib/error.h
new file mode 100644
index 0000000..9deef02
--- /dev/null
+++ b/grub-core/gnulib/error.h
@@ -0,0 +1,65 @@
+/* Declaration for error-reporting function
+ Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008, 2009, 2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _ERROR_H
+#define _ERROR_H 1
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Print a message with `fprintf (stderr, FORMAT, ...)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
+
+extern void error (int __status, int __errnum, const char *__format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern void error_at_line (int __status, int __errnum, const char *__fname,
+ unsigned int __lineno, const char *__format, ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+extern void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called. */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+extern int error_one_per_line;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* error.h */
diff --git a/grub-core/gnulib/float+.h b/grub-core/gnulib/float+.h
new file mode 100644
index 0000000..b55e5e6
--- /dev/null
+++ b/grub-core/gnulib/float+.h
@@ -0,0 +1,148 @@
+/* Supplemental information about the floating-point formats.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _FLOATPLUS_H
+#define _FLOATPLUS_H
+
+#include <float.h>
+#include <limits.h>
+
+/* Number of bits in the mantissa of a floating-point number, including the
+ "hidden bit". */
+#if FLT_RADIX == 2
+# define FLT_MANT_BIT FLT_MANT_DIG
+# define DBL_MANT_BIT DBL_MANT_DIG
+# define LDBL_MANT_BIT LDBL_MANT_DIG
+#elif FLT_RADIX == 4
+# define FLT_MANT_BIT (FLT_MANT_DIG * 2)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 2)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2)
+#elif FLT_RADIX == 16
+# define FLT_MANT_BIT (FLT_MANT_DIG * 4)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 4)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4)
+#endif
+
+/* Bit mask that can be used to mask the exponent, as an unsigned number. */
+#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7)
+#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7)
+#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7)
+
+/* Number of bits used for the exponent of a floating-point number, including
+ the exponent's sign. */
+#define FLT_EXP_BIT \
+ (FLT_EXP_MASK < 0x100 ? 8 : \
+ FLT_EXP_MASK < 0x200 ? 9 : \
+ FLT_EXP_MASK < 0x400 ? 10 : \
+ FLT_EXP_MASK < 0x800 ? 11 : \
+ FLT_EXP_MASK < 0x1000 ? 12 : \
+ FLT_EXP_MASK < 0x2000 ? 13 : \
+ FLT_EXP_MASK < 0x4000 ? 14 : \
+ FLT_EXP_MASK < 0x8000 ? 15 : \
+ FLT_EXP_MASK < 0x10000 ? 16 : \
+ FLT_EXP_MASK < 0x20000 ? 17 : \
+ FLT_EXP_MASK < 0x40000 ? 18 : \
+ FLT_EXP_MASK < 0x80000 ? 19 : \
+ FLT_EXP_MASK < 0x100000 ? 20 : \
+ FLT_EXP_MASK < 0x200000 ? 21 : \
+ FLT_EXP_MASK < 0x400000 ? 22 : \
+ FLT_EXP_MASK < 0x800000 ? 23 : \
+ FLT_EXP_MASK < 0x1000000 ? 24 : \
+ FLT_EXP_MASK < 0x2000000 ? 25 : \
+ FLT_EXP_MASK < 0x4000000 ? 26 : \
+ FLT_EXP_MASK < 0x8000000 ? 27 : \
+ FLT_EXP_MASK < 0x10000000 ? 28 : \
+ FLT_EXP_MASK < 0x20000000 ? 29 : \
+ FLT_EXP_MASK < 0x40000000 ? 30 : \
+ FLT_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+#define DBL_EXP_BIT \
+ (DBL_EXP_MASK < 0x100 ? 8 : \
+ DBL_EXP_MASK < 0x200 ? 9 : \
+ DBL_EXP_MASK < 0x400 ? 10 : \
+ DBL_EXP_MASK < 0x800 ? 11 : \
+ DBL_EXP_MASK < 0x1000 ? 12 : \
+ DBL_EXP_MASK < 0x2000 ? 13 : \
+ DBL_EXP_MASK < 0x4000 ? 14 : \
+ DBL_EXP_MASK < 0x8000 ? 15 : \
+ DBL_EXP_MASK < 0x10000 ? 16 : \
+ DBL_EXP_MASK < 0x20000 ? 17 : \
+ DBL_EXP_MASK < 0x40000 ? 18 : \
+ DBL_EXP_MASK < 0x80000 ? 19 : \
+ DBL_EXP_MASK < 0x100000 ? 20 : \
+ DBL_EXP_MASK < 0x200000 ? 21 : \
+ DBL_EXP_MASK < 0x400000 ? 22 : \
+ DBL_EXP_MASK < 0x800000 ? 23 : \
+ DBL_EXP_MASK < 0x1000000 ? 24 : \
+ DBL_EXP_MASK < 0x2000000 ? 25 : \
+ DBL_EXP_MASK < 0x4000000 ? 26 : \
+ DBL_EXP_MASK < 0x8000000 ? 27 : \
+ DBL_EXP_MASK < 0x10000000 ? 28 : \
+ DBL_EXP_MASK < 0x20000000 ? 29 : \
+ DBL_EXP_MASK < 0x40000000 ? 30 : \
+ DBL_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+#define LDBL_EXP_BIT \
+ (LDBL_EXP_MASK < 0x100 ? 8 : \
+ LDBL_EXP_MASK < 0x200 ? 9 : \
+ LDBL_EXP_MASK < 0x400 ? 10 : \
+ LDBL_EXP_MASK < 0x800 ? 11 : \
+ LDBL_EXP_MASK < 0x1000 ? 12 : \
+ LDBL_EXP_MASK < 0x2000 ? 13 : \
+ LDBL_EXP_MASK < 0x4000 ? 14 : \
+ LDBL_EXP_MASK < 0x8000 ? 15 : \
+ LDBL_EXP_MASK < 0x10000 ? 16 : \
+ LDBL_EXP_MASK < 0x20000 ? 17 : \
+ LDBL_EXP_MASK < 0x40000 ? 18 : \
+ LDBL_EXP_MASK < 0x80000 ? 19 : \
+ LDBL_EXP_MASK < 0x100000 ? 20 : \
+ LDBL_EXP_MASK < 0x200000 ? 21 : \
+ LDBL_EXP_MASK < 0x400000 ? 22 : \
+ LDBL_EXP_MASK < 0x800000 ? 23 : \
+ LDBL_EXP_MASK < 0x1000000 ? 24 : \
+ LDBL_EXP_MASK < 0x2000000 ? 25 : \
+ LDBL_EXP_MASK < 0x4000000 ? 26 : \
+ LDBL_EXP_MASK < 0x8000000 ? 27 : \
+ LDBL_EXP_MASK < 0x10000000 ? 28 : \
+ LDBL_EXP_MASK < 0x20000000 ? 29 : \
+ LDBL_EXP_MASK < 0x40000000 ? 30 : \
+ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+
+/* Number of bits used for a floating-point number: the mantissa (not
+ counting the "hidden bit", since it may or may not be explicit), the
+ exponent, and the sign. */
+#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1)
+#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1)
+#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1)
+
+/* Number of bytes used for a floating-point number.
+ This can be smaller than the 'sizeof'. For example, on i386 systems,
+ 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence
+ LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but
+ sizeof (long double) = 12 or = 16. */
+#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+
+/* Verify that SIZEOF_FLT <= sizeof (float) etc. */
+typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1];
+typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1];
+typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1];
+
+#endif /* _FLOATPLUS_H */
diff --git a/grub-core/gnulib/float.in.h b/grub-core/gnulib/float.in.h
new file mode 100644
index 0000000..caf822f
--- /dev/null
+++ b/grub-core/gnulib/float.in.h
@@ -0,0 +1,62 @@
+/* A correct <float.h>.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_FLOAT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_FLOAT_H@
+
+#ifndef _GL_FLOAT_H
+#define _GL_FLOAT_H
+
+/* 'long double' properties. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+/* Number of mantissa units, in base FLT_RADIX. */
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG 64
+/* Number of decimal digits that is sufficient for representing a number. */
+# undef LDBL_DIG
+# define LDBL_DIG 18
+/* x-1 where x is the smallest representable number > 1. */
+# undef LDBL_EPSILON
+# define LDBL_EPSILON 1.0842021724855044340E-19L
+/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */
+# undef LDBL_MAX_EXP
+# define LDBL_MAX_EXP 16384
+/* Minimum positive normalized number. */
+# undef LDBL_MIN
+# define LDBL_MIN 3.3621031431120935063E-4932L
+/* Maximum representable finite number. */
+# undef LDBL_MAX
+# define LDBL_MAX 1.1897314953572317650E+4932L
+/* Minimum e such that 10^e is in the range of normalized numbers. */
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP (-4931)
+/* Maximum e such that 10^e is in the range of representable finite numbers. */
+# undef LDBL_MAX_10_EXP
+# define LDBL_MAX_10_EXP 4932
+#endif
+
+#endif /* _GL_FLOAT_H */
+#endif /* _GL_FLOAT_H */
diff --git a/grub-core/gnulib/fnmatch.c b/grub-core/gnulib/fnmatch.c
new file mode 100644
index 0000000..d73e47d
--- /dev/null
+++ b/grub-core/gnulib/fnmatch.c
@@ -0,0 +1,354 @@
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Enable GNU extensions in fnmatch.h. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#if ! defined __builtin_expect && __GNUC__ < 3
+# define __builtin_expect(expr, expected) (expr)
+#endif
+
+#include <fnmatch.h>
+
+#include <alloca.h>
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define WIDE_CHAR_SUPPORT \
+ (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \
+ && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY))
+
+/* For platform which support the ISO C amendement 1 functionality we
+ support user defined character classes. */
+#if defined _LIBC || WIDE_CHAR_SUPPORT
+# include <wctype.h>
+# include <wchar.h>
+#endif
+
+/* We need some of the locale data (the collation sequence information)
+ but there is no interface to get this information in general. Therefore
+ we support a correct implementation only in glibc. */
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+# include "../locale/elem-hash.h"
+# include "../locale/coll-lookup.h"
+# include <shlib-compat.h>
+
+# define CONCAT(a,b) __CONCAT(a,b)
+# define mbsrtowcs __mbsrtowcs
+# define fnmatch __fnmatch
+extern int fnmatch (const char *pattern, const char *string, int flags);
+#endif
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */
+#define NO_LEADING_PERIOD(flags) \
+ ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself, and have not detected a bug
+ in the library. This code is part of the GNU C
+ Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object files,
+ it is simpler to just do this in the source for each such file. */
+
+#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
+
+
+# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
+# define isblank(c) ((c) == ' ' || (c) == '\t')
+# endif
+
+# define STREQ(s1, s2) (strcmp (s1, s2) == 0)
+
+# if defined _LIBC || WIDE_CHAR_SUPPORT
+/* The GNU C library provides support for user-defined character classes
+ and the functions from ISO C amendement 1. */
+# ifdef CHARCLASS_NAME_MAX
+# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
+# else
+/* This shouldn't happen but some implementation might still have this
+ problem. Use a reasonable default value. */
+# define CHAR_CLASS_MAX_LENGTH 256
+# endif
+
+# ifdef _LIBC
+# define IS_CHAR_CLASS(string) __wctype (string)
+# else
+# define IS_CHAR_CLASS(string) wctype (string)
+# endif
+
+# ifdef _LIBC
+# define ISWCTYPE(WC, WT) __iswctype (WC, WT)
+# else
+# define ISWCTYPE(WC, WT) iswctype (WC, WT)
+# endif
+
+# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
+/* In this case we are implementing the multibyte character handling. */
+# define HANDLE_MULTIBYTE 1
+# endif
+
+# else
+# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
+
+# define IS_CHAR_CLASS(string) \
+ (STREQ (string, "alpha") || STREQ (string, "upper") \
+ || STREQ (string, "lower") || STREQ (string, "digit") \
+ || STREQ (string, "alnum") || STREQ (string, "xdigit") \
+ || STREQ (string, "space") || STREQ (string, "print") \
+ || STREQ (string, "punct") || STREQ (string, "graph") \
+ || STREQ (string, "cntrl") || STREQ (string, "blank"))
+# endif
+
+/* Avoid depending on library functions or files
+ whose names are inconsistent. */
+
+/* Global variable. */
+static int posixly_correct;
+
+# ifndef internal_function
+/* Inside GNU libc we mark some function in a special way. In other
+ environments simply ignore the marking. */
+# define internal_function
+# endif
+
+/* Note that this evaluates C many times. */
+# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
+# define CHAR char
+# define UCHAR unsigned char
+# define INT int
+# define FCT internal_fnmatch
+# define EXT ext_match
+# define END end_pattern
+# define L_(CS) CS
+# ifdef _LIBC
+# define BTOWC(C) __btowc (C)
+# else
+# define BTOWC(C) btowc (C)
+# endif
+# define STRLEN(S) strlen (S)
+# define STRCAT(D, S) strcat (D, S)
+# ifdef _LIBC
+# define MEMPCPY(D, S, N) __mempcpy (D, S, N)
+# else
+# if HAVE_MEMPCPY
+# define MEMPCPY(D, S, N) mempcpy (D, S, N)
+# else
+# define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
+# endif
+# endif
+# define MEMCHR(S, C, N) memchr (S, C, N)
+# define STRCOLL(S1, S2) strcoll (S1, S2)
+# include "fnmatch_loop.c"
+
+
+# if HANDLE_MULTIBYTE
+# define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
+# define CHAR wchar_t
+# define UCHAR wint_t
+# define INT wint_t
+# define FCT internal_fnwmatch
+# define EXT ext_wmatch
+# define END end_wpattern
+# define L_(CS) L##CS
+# define BTOWC(C) (C)
+# ifdef _LIBC
+# define STRLEN(S) __wcslen (S)
+# define STRCAT(D, S) __wcscat (D, S)
+# define MEMPCPY(D, S, N) __wmempcpy (D, S, N)
+# else
+# define STRLEN(S) wcslen (S)
+# define STRCAT(D, S) wcscat (D, S)
+# if HAVE_WMEMPCPY
+# define MEMPCPY(D, S, N) wmempcpy (D, S, N)
+# else
+# define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N))
+# endif
+# endif
+# define MEMCHR(S, C, N) wmemchr (S, C, N)
+# define STRCOLL(S1, S2) wcscoll (S1, S2)
+# define WIDE_CHAR_VERSION 1
+
+# undef IS_CHAR_CLASS
+/* We have to convert the wide character string in a multibyte string. But
+ we know that the character class names consist of alphanumeric characters
+ from the portable character set, and since the wide character encoding
+ for a member of the portable character set is the same code point as
+ its single-byte encoding, we can use a simplified method to convert the
+ string to a multibyte character string. */
+static wctype_t
+is_char_class (const wchar_t *wcs)
+{
+ char s[CHAR_CLASS_MAX_LENGTH + 1];
+ char *cp = s;
+
+ do
+ {
+ /* Test for a printable character from the portable character set. */
+# ifdef _LIBC
+ if (*wcs < 0x20 || *wcs > 0x7e
+ || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60)
+ return (wctype_t) 0;
+# else
+ switch (*wcs)
+ {
+ case L' ': case L'!': case L'"': case L'#': case L'%':
+ case L'&': case L'\'': case L'(': case L')': case L'*':
+ case L'+': case L',': case L'-': case L'.': case L'/':
+ case L'0': case L'1': case L'2': case L'3': case L'4':
+ case L'5': case L'6': case L'7': case L'8': case L'9':
+ case L':': case L';': case L'<': case L'=': case L'>':
+ case L'?':
+ case L'A': case L'B': case L'C': case L'D': case L'E':
+ case L'F': case L'G': case L'H': case L'I': case L'J':
+ case L'K': case L'L': case L'M': case L'N': case L'O':
+ case L'P': case L'Q': case L'R': case L'S': case L'T':
+ case L'U': case L'V': case L'W': case L'X': case L'Y':
+ case L'Z':
+ case L'[': case L'\\': case L']': case L'^': case L'_':
+ case L'a': case L'b': case L'c': case L'd': case L'e':
+ case L'f': case L'g': case L'h': case L'i': case L'j':
+ case L'k': case L'l': case L'm': case L'n': case L'o':
+ case L'p': case L'q': case L'r': case L's': case L't':
+ case L'u': case L'v': case L'w': case L'x': case L'y':
+ case L'z': case L'{': case L'|': case L'}': case L'~':
+ break;
+ default:
+ return (wctype_t) 0;
+ }
+# endif
+
+ /* Avoid overrunning the buffer. */
+ if (cp == s + CHAR_CLASS_MAX_LENGTH)
+ return (wctype_t) 0;
+
+ *cp++ = (char) *wcs++;
+ }
+ while (*wcs != L'\0');
+
+ *cp = '\0';
+
+# ifdef _LIBC
+ return __wctype (s);
+# else
+ return wctype (s);
+# endif
+}
+# define IS_CHAR_CLASS(string) is_char_class (string)
+
+# include "fnmatch_loop.c"
+# endif
+
+
+int
+fnmatch (const char *pattern, const char *string, int flags)
+{
+# if HANDLE_MULTIBYTE
+# define ALLOCA_LIMIT 2000
+ if (__builtin_expect (MB_CUR_MAX, 1) != 1)
+ {
+ mbstate_t ps;
+ size_t patsize;
+ size_t strsize;
+ size_t totsize;
+ wchar_t *wpattern;
+ wchar_t *wstring;
+ int res;
+
+ /* Calculate the size needed to convert the strings to
+ wide characters. */
+ memset (&ps, '\0', sizeof (ps));
+ patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1;
+ if (__builtin_expect (patsize != 0, 1))
+ {
+ assert (mbsinit (&ps));
+ strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1;
+ if (__builtin_expect (strsize != 0, 1))
+ {
+ assert (mbsinit (&ps));
+ totsize = patsize + strsize;
+ if (__builtin_expect (! (patsize <= totsize
+ && totsize <= SIZE_MAX / sizeof (wchar_t)),
+ 0))
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ /* Allocate room for the wide characters. */
+ if (__builtin_expect (totsize < ALLOCA_LIMIT, 1))
+ wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t));
+ else
+ {
+ wpattern = malloc (totsize * sizeof (wchar_t));
+ if (__builtin_expect (! wpattern, 0))
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ }
+ wstring = wpattern + patsize;
+
+ /* Convert the strings into wide characters. */
+ mbsrtowcs (wpattern, &pattern, patsize, &ps);
+ assert (mbsinit (&ps));
+ mbsrtowcs (wstring, &string, strsize, &ps);
+
+ res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1,
+ flags & FNM_PERIOD, flags);
+
+ if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0))
+ free (wpattern);
+ return res;
+ }
+ }
+ }
+
+# endif /* HANDLE_MULTIBYTE */
+
+ return internal_fnmatch (pattern, string, string + strlen (string),
+ flags & FNM_PERIOD, flags);
+}
+
+# ifdef _LIBC
+# undef fnmatch
+versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3);
+# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3)
+strong_alias (__fnmatch, __fnmatch_old)
+compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0);
+# endif
+libc_hidden_ver (__fnmatch, fnmatch)
+# endif
+
+#endif /* _LIBC or not __GNU_LIBRARY__. */
diff --git a/grub-core/gnulib/fnmatch.in.h b/grub-core/gnulib/fnmatch.in.h
new file mode 100644
index 0000000..8caab19
--- /dev/null
+++ b/grub-core/gnulib/fnmatch.in.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
+ 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _FNMATCH_H
+#define _FNMATCH_H 1
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* We #undef these before defining them because some losing systems
+ (HP-UX A.08.07 for example) define these in <unistd.h>. */
+#undef FNM_PATHNAME
+#undef FNM_NOESCAPE
+#undef FNM_PERIOD
+
+/* Bits set in the FLAGS argument to `fnmatch'. */
+#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
+#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
+#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
+
+#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
+# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
+# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
+# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
+# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */
+#endif
+
+/* Value returned by `fnmatch' if STRING does not match PATTERN. */
+#define FNM_NOMATCH 1
+
+/* This value is returned if the implementation does not support
+ `fnmatch'. Since this is not the case here it will never be
+ returned but the conformance test suites still require the symbol
+ to be defined. */
+#ifdef _XOPEN_SOURCE
+# define FNM_NOSYS (-1)
+#endif
+
+/* Match NAME against the file name pattern PATTERN,
+ returning zero if it matches, FNM_NOMATCH if not. */
+extern int fnmatch (const char *__pattern, const char *__name,
+ int __flags)
+ _GL_ARG_NONNULL ((1, 2));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* fnmatch.h */
diff --git a/grub-core/gnulib/fnmatch_loop.c b/grub-core/gnulib/fnmatch_loop.c
new file mode 100644
index 0000000..741c993
--- /dev/null
+++ b/grub-core/gnulib/fnmatch_loop.c
@@ -0,0 +1,1215 @@
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Match STRING against the file name pattern PATTERN, returning zero if
+ it matches, nonzero if not. */
+static int EXT (INT opt, const CHAR *pattern, const CHAR *string,
+ const CHAR *string_end, bool no_leading_period, int flags)
+ internal_function;
+static const CHAR *END (const CHAR *patternp) internal_function;
+
+static int
+internal_function
+FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
+ bool no_leading_period, int flags)
+{
+ register const CHAR *p = pattern, *n = string;
+ register UCHAR c;
+#ifdef _LIBC
+# if WIDE_CHAR_VERSION
+ const char *collseq = (const char *)
+ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+# else
+ const UCHAR *collseq = (const UCHAR *)
+ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+# endif
+#endif
+
+ while ((c = *p++) != L_('\0'))
+ {
+ bool new_no_leading_period = false;
+ c = FOLD (c);
+
+ switch (c)
+ {
+ case L_('?'):
+ if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+ {
+ int res;
+
+ res = EXT (c, p, n, string_end, no_leading_period,
+ flags);
+ if (res != -1)
+ return res;
+ }
+
+ if (n == string_end)
+ return FNM_NOMATCH;
+ else if (*n == L_('/') && (flags & FNM_FILE_NAME))
+ return FNM_NOMATCH;
+ else if (*n == L_('.') && no_leading_period)
+ return FNM_NOMATCH;
+ break;
+
+ case L_('\\'):
+ if (!(flags & FNM_NOESCAPE))
+ {
+ c = *p++;
+ if (c == L_('\0'))
+ /* Trailing \ loses. */
+ return FNM_NOMATCH;
+ c = FOLD (c);
+ }
+ if (n == string_end || FOLD ((UCHAR) *n) != c)
+ return FNM_NOMATCH;
+ break;
+
+ case L_('*'):
+ if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+ {
+ int res;
+
+ res = EXT (c, p, n, string_end, no_leading_period,
+ flags);
+ if (res != -1)
+ return res;
+ }
+
+ if (n != string_end && *n == L_('.') && no_leading_period)
+ return FNM_NOMATCH;
+
+ for (c = *p++; c == L_('?') || c == L_('*'); c = *p++)
+ {
+ if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0)
+ {
+ const CHAR *endp = END (p);
+ if (endp != p)
+ {
+ /* This is a pattern. Skip over it. */
+ p = endp;
+ continue;
+ }
+ }
+
+ if (c == L_('?'))
+ {
+ /* A ? needs to match one character. */
+ if (n == string_end)
+ /* There isn't another character; no match. */
+ return FNM_NOMATCH;
+ else if (*n == L_('/')
+ && __builtin_expect (flags & FNM_FILE_NAME, 0))
+ /* A slash does not match a wildcard under
+ FNM_FILE_NAME. */
+ return FNM_NOMATCH;
+ else
+ /* One character of the string is consumed in matching
+ this ? wildcard, so *??? won't match if there are
+ less than three characters. */
+ ++n;
+ }
+ }
+
+ if (c == L_('\0'))
+ /* The wildcard(s) is/are the last element of the pattern.
+ If the name is a file name and contains another slash
+ this means it cannot match, unless the FNM_LEADING_DIR
+ flag is set. */
+ {
+ int result = (flags & FNM_FILE_NAME) == 0 ? 0 : FNM_NOMATCH;
+
+ if (flags & FNM_FILE_NAME)
+ {
+ if (flags & FNM_LEADING_DIR)
+ result = 0;
+ else
+ {
+ if (MEMCHR (n, L_('/'), string_end - n) == NULL)
+ result = 0;
+ }
+ }
+
+ return result;
+ }
+ else
+ {
+ const CHAR *endp;
+
+ endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'),
+ string_end - n);
+ if (endp == NULL)
+ endp = string_end;
+
+ if (c == L_('[')
+ || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0
+ && (c == L_('@') || c == L_('+') || c == L_('!'))
+ && *p == L_('(')))
+ {
+ int flags2 = ((flags & FNM_FILE_NAME)
+ ? flags : (flags & ~FNM_PERIOD));
+ bool no_leading_period2 = no_leading_period;
+
+ for (--p; n < endp; ++n, no_leading_period2 = false)
+ if (FCT (p, n, string_end, no_leading_period2, flags2)
+ == 0)
+ return 0;
+ }
+ else if (c == L_('/') && (flags & FNM_FILE_NAME))
+ {
+ while (n < string_end && *n != L_('/'))
+ ++n;
+ if (n < string_end && *n == L_('/')
+ && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags)
+ == 0))
+ return 0;
+ }
+ else
+ {
+ int flags2 = ((flags & FNM_FILE_NAME)
+ ? flags : (flags & ~FNM_PERIOD));
+ int no_leading_period2 = no_leading_period;
+
+ if (c == L_('\\') && !(flags & FNM_NOESCAPE))
+ c = *p;
+ c = FOLD (c);
+ for (--p; n < endp; ++n, no_leading_period2 = false)
+ if (FOLD ((UCHAR) *n) == c
+ && (FCT (p, n, string_end, no_leading_period2, flags2)
+ == 0))
+ return 0;
+ }
+ }
+
+ /* If we come here no match is possible with the wildcard. */
+ return FNM_NOMATCH;
+
+ case L_('['):
+ {
+ /* Nonzero if the sense of the character class is inverted. */
+ register bool not;
+ CHAR cold;
+ UCHAR fn;
+
+ if (posixly_correct == 0)
+ posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
+
+ if (n == string_end)
+ return FNM_NOMATCH;
+
+ if (*n == L_('.') && no_leading_period)
+ return FNM_NOMATCH;
+
+ if (*n == L_('/') && (flags & FNM_FILE_NAME))
+ /* `/' cannot be matched. */
+ return FNM_NOMATCH;
+
+ not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^')));
+ if (not)
+ ++p;
+
+ fn = FOLD ((UCHAR) *n);
+
+ c = *p++;
+ for (;;)
+ {
+ if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
+ {
+ if (*p == L_('\0'))
+ return FNM_NOMATCH;
+ c = FOLD ((UCHAR) *p);
+ ++p;
+
+ goto normal_bracket;
+ }
+ else if (c == L_('[') && *p == L_(':'))
+ {
+ /* Leave room for the null. */
+ CHAR str[CHAR_CLASS_MAX_LENGTH + 1];
+ size_t c1 = 0;
+#if defined _LIBC || WIDE_CHAR_SUPPORT
+ wctype_t wt;
+#endif
+ const CHAR *startp = p;
+
+ for (;;)
+ {
+ if (c1 == CHAR_CLASS_MAX_LENGTH)
+ /* The name is too long and therefore the pattern
+ is ill-formed. */
+ return FNM_NOMATCH;
+
+ c = *++p;
+ if (c == L_(':') && p[1] == L_(']'))
+ {
+ p += 2;
+ break;
+ }
+ if (c < L_('a') || c >= L_('z'))
+ {
+ /* This cannot possibly be a character class name.
+ Match it as a normal range. */
+ p = startp;
+ c = L_('[');
+ goto normal_bracket;
+ }
+ str[c1++] = c;
+ }
+ str[c1] = L_('\0');
+
+#if defined _LIBC || WIDE_CHAR_SUPPORT
+ wt = IS_CHAR_CLASS (str);
+ if (wt == 0)
+ /* Invalid character class name. */
+ return FNM_NOMATCH;
+
+# if defined _LIBC && ! WIDE_CHAR_VERSION
+ /* The following code is glibc specific but does
+ there a good job in speeding up the code since
+ we can avoid the btowc() call. */
+ if (_ISCTYPE ((UCHAR) *n, wt))
+ goto matched;
+# else
+ if (ISWCTYPE (BTOWC ((UCHAR) *n), wt))
+ goto matched;
+# endif
+#else
+ if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n))
+ || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n))
+ || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n))
+ || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n))
+ || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n))
+ || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n))
+ || (STREQ (str, L_("lower")) && islower ((UCHAR) *n))
+ || (STREQ (str, L_("print")) && isprint ((UCHAR) *n))
+ || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n))
+ || (STREQ (str, L_("space")) && isspace ((UCHAR) *n))
+ || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n))
+ || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n)))
+ goto matched;
+#endif
+ c = *p++;
+ }
+#ifdef _LIBC
+ else if (c == L_('[') && *p == L_('='))
+ {
+ UCHAR str[1];
+ uint32_t nrules =
+ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ const CHAR *startp = p;
+
+ c = *++p;
+ if (c == L_('\0'))
+ {
+ p = startp;
+ c = L_('[');
+ goto normal_bracket;
+ }
+ str[0] = c;
+
+ c = *++p;
+ if (c != L_('=') || p[1] != L_(']'))
+ {
+ p = startp;
+ c = L_('[');
+ goto normal_bracket;
+ }
+ p += 2;
+
+ if (nrules == 0)
+ {
+ if ((UCHAR) *n == str[0])
+ goto matched;
+ }
+ else
+ {
+ const int32_t *table;
+# if WIDE_CHAR_VERSION
+ const int32_t *weights;
+ const int32_t *extra;
+# else
+ const unsigned char *weights;
+ const unsigned char *extra;
+# endif
+ const int32_t *indirect;
+ int32_t idx;
+ const UCHAR *cp = (const UCHAR *) str;
+
+ /* This #include defines a local function! */
+# if WIDE_CHAR_VERSION
+# include <locale/weightwc.h>
+# else
+# include <locale/weight.h>
+# endif
+
+# if WIDE_CHAR_VERSION
+ table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC);
+ weights = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC);
+ extra = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC);
+ indirect = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC);
+# else
+ table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ weights = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+# endif
+
+ idx = findidx (&cp);
+ if (idx != 0)
+ {
+ /* We found a table entry. Now see whether the
+ character we are currently at has the same
+ equivalance class value. */
+ int len = weights[idx & 0xffffff];
+ int32_t idx2;
+ const UCHAR *np = (const UCHAR *) n;
+
+ idx2 = findidx (&np);
+ if (idx2 != 0
+ && (idx >> 24) == (idx2 >> 24)
+ && len == weights[idx2 & 0xffffff])
+ {
+ int cnt = 0;
+
+ idx &= 0xffffff;
+ idx2 &= 0xffffff;
+
+ while (cnt < len
+ && (weights[idx + 1 + cnt]
+ == weights[idx2 + 1 + cnt]))
+ ++cnt;
+
+ if (cnt == len)
+ goto matched;
+ }
+ }
+ }
+
+ c = *p++;
+ }
+#endif
+ else if (c == L_('\0'))
+ /* [ (unterminated) loses. */
+ return FNM_NOMATCH;
+ else
+ {
+ bool is_range = false;
+
+#ifdef _LIBC
+ bool is_seqval = false;
+
+ if (c == L_('[') && *p == L_('.'))
+ {
+ uint32_t nrules =
+ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ const CHAR *startp = p;
+ size_t c1 = 0;
+
+ while (1)
+ {
+ c = *++p;
+ if (c == L_('.') && p[1] == L_(']'))
+ {
+ p += 2;
+ break;
+ }
+ if (c == '\0')
+ return FNM_NOMATCH;
+ ++c1;
+ }
+
+ /* We have to handling the symbols differently in
+ ranges since then the collation sequence is
+ important. */
+ is_range = *p == L_('-') && p[1] != L_('\0');
+
+ if (nrules == 0)
+ {
+ /* There are no names defined in the collation
+ data. Therefore we only accept the trivial
+ names consisting of the character itself. */
+ if (c1 != 1)
+ return FNM_NOMATCH;
+
+ if (!is_range && *n == startp[1])
+ goto matched;
+
+ cold = startp[1];
+ c = *p++;
+ }
+ else
+ {
+ int32_t table_size;
+ const int32_t *symb_table;
+# ifdef WIDE_CHAR_VERSION
+ char str[c1];
+ size_t strcnt;
+# else
+# define str (startp + 1)
+# endif
+ const unsigned char *extra;
+ int32_t idx;
+ int32_t elem;
+ int32_t second;
+ int32_t hash;
+
+# ifdef WIDE_CHAR_VERSION
+ /* We have to convert the name to a single-byte
+ string. This is possible since the names
+ consist of ASCII characters and the internal
+ representation is UCS4. */
+ for (strcnt = 0; strcnt < c1; ++strcnt)
+ str[strcnt] = startp[1 + strcnt];
+# endif
+
+ table_size =
+ _NL_CURRENT_WORD (LC_COLLATE,
+ _NL_COLLATE_SYMB_HASH_SIZEMB);
+ symb_table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_TABLEMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_EXTRAMB);
+
+ /* Locate the character in the hashing table. */
+ hash = elem_hash (str, c1);
+
+ idx = 0;
+ elem = hash % table_size;
+ if (symb_table[2 * elem] != 0)
+ {
+ second = hash % (table_size - 2) + 1;
+
+ do
+ {
+ /* First compare the hashing value. */
+ if (symb_table[2 * elem] == hash
+ && (c1
+ == extra[symb_table[2 * elem + 1]])
+ && memcmp (str,
+ &extra[symb_table[2 * elem
+ + 1]
+ + 1], c1) == 0)
+ {
+ /* Yep, this is the entry. */
+ idx = symb_table[2 * elem + 1];
+ idx += 1 + extra[idx];
+ break;
+ }
+
+ /* Next entry. */
+ elem += second;
+ }
+ while (symb_table[2 * elem] != 0);
+ }
+
+ if (symb_table[2 * elem] != 0)
+ {
+ /* Compare the byte sequence but only if
+ this is not part of a range. */
+# ifdef WIDE_CHAR_VERSION
+ int32_t *wextra;
+
+ idx += 1 + extra[idx];
+ /* Adjust for the alignment. */
+ idx = (idx + 3) & ~3;
+
+ wextra = (int32_t *) &extra[idx + 4];
+# endif
+
+ if (! is_range)
+ {
+# ifdef WIDE_CHAR_VERSION
+ for (c1 = 0;
+ (int32_t) c1 < wextra[idx];
+ ++c1)
+ if (n[c1] != wextra[1 + c1])
+ break;
+
+ if ((int32_t) c1 == wextra[idx])
+ goto matched;
+# else
+ for (c1 = 0; c1 < extra[idx]; ++c1)
+ if (n[c1] != extra[1 + c1])
+ break;
+
+ if (c1 == extra[idx])
+ goto matched;
+# endif
+ }
+
+ /* Get the collation sequence value. */
+ is_seqval = true;
+# ifdef WIDE_CHAR_VERSION
+ cold = wextra[1 + wextra[idx]];
+# else
+ /* Adjust for the alignment. */
+ idx += 1 + extra[idx];
+ idx = (idx + 3) & ~4;
+ cold = *((int32_t *) &extra[idx]);
+# endif
+
+ c = *p++;
+ }
+ else if (c1 == 1)
+ {
+ /* No valid character. Match it as a
+ single byte. */
+ if (!is_range && *n == str[0])
+ goto matched;
+
+ cold = str[0];
+ c = *p++;
+ }
+ else
+ return FNM_NOMATCH;
+ }
+ }
+ else
+# undef str
+#endif
+ {
+ c = FOLD (c);
+ normal_bracket:
+
+ /* We have to handling the symbols differently in
+ ranges since then the collation sequence is
+ important. */
+ is_range = (*p == L_('-') && p[1] != L_('\0')
+ && p[1] != L_(']'));
+
+ if (!is_range && c == fn)
+ goto matched;
+
+#if _LIBC
+ /* This is needed if we goto normal_bracket; from
+ outside of is_seqval's scope. */
+ is_seqval = false;
+#endif
+
+ cold = c;
+ c = *p++;
+ }
+
+ if (c == L_('-') && *p != L_(']'))
+ {
+#if _LIBC
+ /* We have to find the collation sequence
+ value for C. Collation sequence is nothing
+ we can regularly access. The sequence
+ value is defined by the order in which the
+ definitions of the collation values for the
+ various characters appear in the source
+ file. A strange concept, nowhere
+ documented. */
+ uint32_t fcollseq;
+ uint32_t lcollseq;
+ UCHAR cend = *p++;
+
+# ifdef WIDE_CHAR_VERSION
+ /* Search in the `names' array for the characters. */
+ fcollseq = __collseq_table_lookup (collseq, fn);
+ if (fcollseq == ~((uint32_t) 0))
+ /* XXX We don't know anything about the character
+ we are supposed to match. This means we are
+ failing. */
+ goto range_not_matched;
+
+ if (is_seqval)
+ lcollseq = cold;
+ else
+ lcollseq = __collseq_table_lookup (collseq, cold);
+# else
+ fcollseq = collseq[fn];
+ lcollseq = is_seqval ? cold : collseq[(UCHAR) cold];
+# endif
+
+ is_seqval = false;
+ if (cend == L_('[') && *p == L_('.'))
+ {
+ uint32_t nrules =
+ _NL_CURRENT_WORD (LC_COLLATE,
+ _NL_COLLATE_NRULES);
+ const CHAR *startp = p;
+ size_t c1 = 0;
+
+ while (1)
+ {
+ c = *++p;
+ if (c == L_('.') && p[1] == L_(']'))
+ {
+ p += 2;
+ break;
+ }
+ if (c == '\0')
+ return FNM_NOMATCH;
+ ++c1;
+ }
+
+ if (nrules == 0)
+ {
+ /* There are no names defined in the
+ collation data. Therefore we only
+ accept the trivial names consisting
+ of the character itself. */
+ if (c1 != 1)
+ return FNM_NOMATCH;
+
+ cend = startp[1];
+ }
+ else
+ {
+ int32_t table_size;
+ const int32_t *symb_table;
+# ifdef WIDE_CHAR_VERSION
+ char str[c1];
+ size_t strcnt;
+# else
+# define str (startp + 1)
+# endif
+ const unsigned char *extra;
+ int32_t idx;
+ int32_t elem;
+ int32_t second;
+ int32_t hash;
+
+# ifdef WIDE_CHAR_VERSION
+ /* We have to convert the name to a single-byte
+ string. This is possible since the names
+ consist of ASCII characters and the internal
+ representation is UCS4. */
+ for (strcnt = 0; strcnt < c1; ++strcnt)
+ str[strcnt] = startp[1 + strcnt];
+# endif
+
+ table_size =
+ _NL_CURRENT_WORD (LC_COLLATE,
+ _NL_COLLATE_SYMB_HASH_SIZEMB);
+ symb_table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_TABLEMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_EXTRAMB);
+
+ /* Locate the character in the hashing
+ table. */
+ hash = elem_hash (str, c1);
+
+ idx = 0;
+ elem = hash % table_size;
+ if (symb_table[2 * elem] != 0)
+ {
+ second = hash % (table_size - 2) + 1;
+
+ do
+ {
+ /* First compare the hashing value. */
+ if (symb_table[2 * elem] == hash
+ && (c1
+ == extra[symb_table[2 * elem + 1]])
+ && memcmp (str,
+ &extra[symb_table[2 * elem + 1]
+ + 1], c1) == 0)
+ {
+ /* Yep, this is the entry. */
+ idx = symb_table[2 * elem + 1];
+ idx += 1 + extra[idx];
+ break;
+ }
+
+ /* Next entry. */
+ elem += second;
+ }
+ while (symb_table[2 * elem] != 0);
+ }
+
+ if (symb_table[2 * elem] != 0)
+ {
+ /* Compare the byte sequence but only if
+ this is not part of a range. */
+# ifdef WIDE_CHAR_VERSION
+ int32_t *wextra;
+
+ idx += 1 + extra[idx];
+ /* Adjust for the alignment. */
+ idx = (idx + 3) & ~4;
+
+ wextra = (int32_t *) &extra[idx + 4];
+# endif
+ /* Get the collation sequence value. */
+ is_seqval = true;
+# ifdef WIDE_CHAR_VERSION
+ cend = wextra[1 + wextra[idx]];
+# else
+ /* Adjust for the alignment. */
+ idx += 1 + extra[idx];
+ idx = (idx + 3) & ~4;
+ cend = *((int32_t *) &extra[idx]);
+# endif
+ }
+ else if (symb_table[2 * elem] != 0 && c1 == 1)
+ {
+ cend = str[0];
+ c = *p++;
+ }
+ else
+ return FNM_NOMATCH;
+ }
+# undef str
+ }
+ else
+ {
+ if (!(flags & FNM_NOESCAPE) && cend == L_('\\'))
+ cend = *p++;
+ if (cend == L_('\0'))
+ return FNM_NOMATCH;
+ cend = FOLD (cend);
+ }
+
+ /* XXX It is not entirely clear to me how to handle
+ characters which are not mentioned in the
+ collation specification. */
+ if (
+# ifdef WIDE_CHAR_VERSION
+ lcollseq == 0xffffffff ||
+# endif
+ lcollseq <= fcollseq)
+ {
+ /* We have to look at the upper bound. */
+ uint32_t hcollseq;
+
+ if (is_seqval)
+ hcollseq = cend;
+ else
+ {
+# ifdef WIDE_CHAR_VERSION
+ hcollseq =
+ __collseq_table_lookup (collseq, cend);
+ if (hcollseq == ~((uint32_t) 0))
+ {
+ /* Hum, no information about the upper
+ bound. The matching succeeds if the
+ lower bound is matched exactly. */
+ if (lcollseq != fcollseq)
+ goto range_not_matched;
+
+ goto matched;
+ }
+# else
+ hcollseq = collseq[cend];
+# endif
+ }
+
+ if (lcollseq <= hcollseq && fcollseq <= hcollseq)
+ goto matched;
+ }
+# ifdef WIDE_CHAR_VERSION
+ range_not_matched:
+# endif
+#else
+ /* We use a boring value comparison of the character
+ values. This is better than comparing using
+ `strcoll' since the latter would have surprising
+ and sometimes fatal consequences. */
+ UCHAR cend = *p++;
+
+ if (!(flags & FNM_NOESCAPE) && cend == L_('\\'))
+ cend = *p++;
+ if (cend == L_('\0'))
+ return FNM_NOMATCH;
+
+ /* It is a range. */
+ if (cold <= fn && fn <= cend)
+ goto matched;
+#endif
+
+ c = *p++;
+ }
+ }
+
+ if (c == L_(']'))
+ break;
+ }
+
+ if (!not)
+ return FNM_NOMATCH;
+ break;
+
+ matched:
+ /* Skip the rest of the [...] that already matched. */
+ do
+ {
+ ignore_next:
+ c = *p++;
+
+ if (c == L_('\0'))
+ /* [... (unterminated) loses. */
+ return FNM_NOMATCH;
+
+ if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
+ {
+ if (*p == L_('\0'))
+ return FNM_NOMATCH;
+ /* XXX 1003.2d11 is unclear if this is right. */
+ ++p;
+ }
+ else if (c == L_('[') && *p == L_(':'))
+ {
+ int c1 = 0;
+ const CHAR *startp = p;
+
+ while (1)
+ {
+ c = *++p;
+ if (++c1 == CHAR_CLASS_MAX_LENGTH)
+ return FNM_NOMATCH;
+
+ if (*p == L_(':') && p[1] == L_(']'))
+ break;
+
+ if (c < L_('a') || c >= L_('z'))
+ {
+ p = startp;
+ goto ignore_next;
+ }
+ }
+ p += 2;
+ c = *p++;
+ }
+ else if (c == L_('[') && *p == L_('='))
+ {
+ c = *++p;
+ if (c == L_('\0'))
+ return FNM_NOMATCH;
+ c = *++p;
+ if (c != L_('=') || p[1] != L_(']'))
+ return FNM_NOMATCH;
+ p += 2;
+ c = *p++;
+ }
+ else if (c == L_('[') && *p == L_('.'))
+ {
+ ++p;
+ while (1)
+ {
+ c = *++p;
+ if (c == '\0')
+ return FNM_NOMATCH;
+
+ if (*p == L_('.') && p[1] == L_(']'))
+ break;
+ }
+ p += 2;
+ c = *p++;
+ }
+ }
+ while (c != L_(']'));
+ if (not)
+ return FNM_NOMATCH;
+ }
+ break;
+
+ case L_('+'):
+ case L_('@'):
+ case L_('!'):
+ if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+ {
+ int res;
+
+ res = EXT (c, p, n, string_end, no_leading_period, flags);
+ if (res != -1)
+ return res;
+ }
+ goto normal_match;
+
+ case L_('/'):
+ if (NO_LEADING_PERIOD (flags))
+ {
+ if (n == string_end || c != (UCHAR) *n)
+ return FNM_NOMATCH;
+
+ new_no_leading_period = true;
+ break;
+ }
+ /* FALLTHROUGH */
+ default:
+ normal_match:
+ if (n == string_end || c != FOLD ((UCHAR) *n))
+ return FNM_NOMATCH;
+ }
+
+ no_leading_period = new_no_leading_period;
+ ++n;
+ }
+
+ if (n == string_end)
+ return 0;
+
+ if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/'))
+ /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */
+ return 0;
+
+ return FNM_NOMATCH;
+}
+
+
+static const CHAR *
+internal_function
+END (const CHAR *pattern)
+{
+ const CHAR *p = pattern;
+
+ while (1)
+ if (*++p == L_('\0'))
+ /* This is an invalid pattern. */
+ return pattern;
+ else if (*p == L_('['))
+ {
+ /* Handle brackets special. */
+ if (posixly_correct == 0)
+ posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
+
+ /* Skip the not sign. We have to recognize it because of a possibly
+ following ']'. */
+ if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^')))
+ ++p;
+ /* A leading ']' is recognized as such. */
+ if (*p == L_(']'))
+ ++p;
+ /* Skip over all characters of the list. */
+ while (*p != L_(']'))
+ if (*p++ == L_('\0'))
+ /* This is no valid pattern. */
+ return pattern;
+ }
+ else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
+ || *p == L_('!')) && p[1] == L_('('))
+ p = END (p + 1);
+ else if (*p == L_(')'))
+ break;
+
+ return p + 1;
+}
+
+
+static int
+internal_function
+EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
+ bool no_leading_period, int flags)
+{
+ const CHAR *startp;
+ size_t level;
+ struct patternlist
+ {
+ struct patternlist *next;
+ CHAR str[1];
+ } *list = NULL;
+ struct patternlist **lastp = &list;
+ size_t pattern_len = STRLEN (pattern);
+ const CHAR *p;
+ const CHAR *rs;
+ enum { ALLOCA_LIMIT = 8000 };
+
+ /* Parse the pattern. Store the individual parts in the list. */
+ level = 0;
+ for (startp = p = pattern + 1; ; ++p)
+ if (*p == L_('\0'))
+ /* This is an invalid pattern. */
+ return -1;
+ else if (*p == L_('['))
+ {
+ /* Handle brackets special. */
+ if (posixly_correct == 0)
+ posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
+
+ /* Skip the not sign. We have to recognize it because of a possibly
+ following ']'. */
+ if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^')))
+ ++p;
+ /* A leading ']' is recognized as such. */
+ if (*p == L_(']'))
+ ++p;
+ /* Skip over all characters of the list. */
+ while (*p != L_(']'))
+ if (*p++ == L_('\0'))
+ /* This is no valid pattern. */
+ return -1;
+ }
+ else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
+ || *p == L_('!')) && p[1] == L_('('))
+ /* Remember the nesting level. */
+ ++level;
+ else if (*p == L_(')'))
+ {
+ if (level-- == 0)
+ {
+ /* This means we found the end of the pattern. */
+#define NEW_PATTERN \
+ struct patternlist *newp; \
+ size_t plen; \
+ size_t plensize; \
+ size_t newpsize; \
+ \
+ plen = (opt == L_('?') || opt == L_('@') \
+ ? pattern_len \
+ : p - startp + 1UL); \
+ plensize = plen * sizeof (CHAR); \
+ newpsize = offsetof (struct patternlist, str) + plensize; \
+ if ((size_t) -1 / sizeof (CHAR) < plen \
+ || newpsize < offsetof (struct patternlist, str) \
+ || ALLOCA_LIMIT <= newpsize) \
+ return -1; \
+ newp = (struct patternlist *) alloca (newpsize); \
+ *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \
+ newp->next = NULL; \
+ *lastp = newp; \
+ lastp = &newp->next
+ NEW_PATTERN;
+ break;
+ }
+ }
+ else if (*p == L_('|'))
+ {
+ if (level == 0)
+ {
+ NEW_PATTERN;
+ startp = p + 1;
+ }
+ }
+ assert (list != NULL);
+ assert (p[-1] == L_(')'));
+#undef NEW_PATTERN
+
+ switch (opt)
+ {
+ case L_('*'):
+ if (FCT (p, string, string_end, no_leading_period, flags) == 0)
+ return 0;
+ /* FALLTHROUGH */
+
+ case L_('+'):
+ do
+ {
+ for (rs = string; rs <= string_end; ++rs)
+ /* First match the prefix with the current pattern with the
+ current pattern. */
+ if (FCT (list->str, string, rs, no_leading_period,
+ flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0
+ /* This was successful. Now match the rest with the rest
+ of the pattern. */
+ && (FCT (p, rs, string_end,
+ rs == string
+ ? no_leading_period
+ : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
+ flags & FNM_FILE_NAME
+ ? flags : flags & ~FNM_PERIOD) == 0
+ /* This didn't work. Try the whole pattern. */
+ || (rs != string
+ && FCT (pattern - 1, rs, string_end,
+ rs == string
+ ? no_leading_period
+ : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
+ flags & FNM_FILE_NAME
+ ? flags : flags & ~FNM_PERIOD) == 0)))
+ /* It worked. Signal success. */
+ return 0;
+ }
+ while ((list = list->next) != NULL);
+
+ /* None of the patterns lead to a match. */
+ return FNM_NOMATCH;
+
+ case L_('?'):
+ if (FCT (p, string, string_end, no_leading_period, flags) == 0)
+ return 0;
+ /* FALLTHROUGH */
+
+ case L_('@'):
+ do
+ /* I cannot believe it but `strcat' is actually acceptable
+ here. Match the entire string with the prefix from the
+ pattern list and the rest of the pattern following the
+ pattern list. */
+ if (FCT (STRCAT (list->str, p), string, string_end,
+ no_leading_period,
+ flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
+ /* It worked. Signal success. */
+ return 0;
+ while ((list = list->next) != NULL);
+
+ /* None of the patterns lead to a match. */
+ return FNM_NOMATCH;
+
+ case L_('!'):
+ for (rs = string; rs <= string_end; ++rs)
+ {
+ struct patternlist *runp;
+
+ for (runp = list; runp != NULL; runp = runp->next)
+ if (FCT (runp->str, string, rs, no_leading_period,
+ flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
+ break;
+
+ /* If none of the patterns matched see whether the rest does. */
+ if (runp == NULL
+ && (FCT (p, rs, string_end,
+ rs == string
+ ? no_leading_period
+ : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
+ flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD)
+ == 0))
+ /* This is successful. */
+ return 0;
+ }
+
+ /* None of the patterns together with the rest of the pattern
+ lead to a match. */
+ return FNM_NOMATCH;
+
+ default:
+ assert (! "Invalid extended matching operator");
+ break;
+ }
+
+ return -1;
+}
+
+
+#undef FOLD
+#undef CHAR
+#undef UCHAR
+#undef INT
+#undef FCT
+#undef EXT
+#undef END
+#undef MEMPCPY
+#undef MEMCHR
+#undef STRCOLL
+#undef STRLEN
+#undef STRCAT
+#undef L_
+#undef BTOWC
diff --git a/grub-core/gnulib/getdelim.c b/grub-core/gnulib/getdelim.c
new file mode 100644
index 0000000..66d07b9
--- /dev/null
+++ b/grub-core/gnulib/getdelim.c
@@ -0,0 +1,137 @@
+/* getdelim.c --- Implementation of replacement getdelim function.
+ Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007, 2008,
+ 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 3, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Ported from glibc by Simon Josefsson. */
+
+#include <config.h>
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */
+#define _GL_ARG_NONNULL(params)
+
+#include <stdio.h>
+
+#include <limits.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+# define getc_maybe_unlocked(fp) getc(fp)
+#elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED
+# undef flockfile
+# undef funlockfile
+# define flockfile(x) ((void) 0)
+# define funlockfile(x) ((void) 0)
+# define getc_maybe_unlocked(fp) getc(fp)
+#else
+# define getc_maybe_unlocked(fp) getc_unlocked(fp)
+#endif
+
+/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
+ NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
+ NULL), pointing to *N characters of space. It is realloc'ed as
+ necessary. Returns the number of characters read (not including
+ the null terminator), or -1 on error or EOF. */
+
+ssize_t
+getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
+{
+ ssize_t result;
+ size_t cur_len = 0;
+
+ if (lineptr == NULL || n == NULL || fp == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ flockfile (fp);
+
+ if (*lineptr == NULL || *n == 0)
+ {
+ char *new_lineptr;
+ *n = 120;
+ new_lineptr = (char *) realloc (*lineptr, *n);
+ if (new_lineptr == NULL)
+ {
+ result = -1;
+ goto unlock_return;
+ }
+ *lineptr = new_lineptr;
+ }
+
+ for (;;)
+ {
+ int i;
+
+ i = getc_maybe_unlocked (fp);
+ if (i == EOF)
+ {
+ result = -1;
+ break;
+ }
+
+ /* Make enough space for len+1 (for final NUL) bytes. */
+ if (cur_len + 1 >= *n)
+ {
+ size_t needed_max =
+ SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
+ size_t needed = 2 * *n + 1; /* Be generous. */
+ char *new_lineptr;
+
+ if (needed_max < needed)
+ needed = needed_max;
+ if (cur_len + 1 >= needed)
+ {
+ result = -1;
+ errno = EOVERFLOW;
+ goto unlock_return;
+ }
+
+ new_lineptr = (char *) realloc (*lineptr, needed);
+ if (new_lineptr == NULL)
+ {
+ result = -1;
+ goto unlock_return;
+ }
+
+ *lineptr = new_lineptr;
+ *n = needed;
+ }
+
+ (*lineptr)[cur_len] = i;
+ cur_len++;
+
+ if (i == delimiter)
+ break;
+ }
+ (*lineptr)[cur_len] = '\0';
+ result = cur_len ? cur_len : result;
+
+ unlock_return:
+ funlockfile (fp); /* doesn't set errno */
+
+ return result;
+}
diff --git a/grub-core/gnulib/getline.c b/grub-core/gnulib/getline.c
new file mode 100644
index 0000000..30c076e
--- /dev/null
+++ b/grub-core/gnulib/getline.c
@@ -0,0 +1,29 @@
+/* getline.c --- Implementation of replacement getline function.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 3, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Written by Simon Josefsson. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+ssize_t
+getline (char **lineptr, size_t *n, FILE *stream)
+{
+ return getdelim (lineptr, n, '\n', stream);
+}
diff --git a/grub-core/gnulib/getopt.c b/grub-core/gnulib/getopt.c
new file mode 100644
index 0000000..3791f12
--- /dev/null
+++ b/grub-core/gnulib/getopt.c
@@ -0,0 +1,1192 @@
+/* Getopt for GNU.
+ NOTE: getopt is part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to drepper@gnu.org
+ before changing it!
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include "getopt.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+# include <wchar.h>
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+ but it behaves differently for the user, since it allows the user
+ to intersperse the options with the other arguments.
+
+ As `getopt_long' works, it permutes the elements of ARGV so that,
+ when it is done, all the options precede everything else. Thus
+ all application programs are extended to handle flexible argument order.
+
+ Using `getopt' or setting the environment variable POSIXLY_CORRECT
+ disables permutation.
+ Then the behavior is completely standard.
+
+ GNU application programs can use a third alternative mode in which
+ they can distinguish the relative order of options and other arguments. */
+
+#include "getopt_int.h"
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+/* 1003.2 says this must be 1 before any call. */
+int optind = 1;
+
+/* Callers store zero here to inhibit the error message
+ for unrecognized options. */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+ This must be initialized on some systems to avoid linking in the
+ system's own getopt implementation. */
+
+int optopt = '?';
+
+/* Keep a global copy of all internal members of getopt_data. */
+
+static struct _getopt_data getopt_data;
+
+
+#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
+extern char *getenv ();
+#endif
+
+#ifdef _LIBC
+/* Stored original parameters.
+ XXX This is no good solution. We should rather copy the args so
+ that we can compare them later. But we must not use malloc(3). */
+extern int __libc_argc;
+extern char **__libc_argv;
+
+/* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
+# ifdef USE_NONOPTION_FLAGS
+/* Defined in getopt_init.c */
+extern char *__getopt_nonoption_flags;
+# endif
+
+# ifdef USE_NONOPTION_FLAGS
+# define SWAP_FLAGS(ch1, ch2) \
+ if (d->__nonoption_flags_len > 0) \
+ { \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
+ }
+# else
+# define SWAP_FLAGS(ch1, ch2)
+# endif
+#else /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif /* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+ One subsequence is elements [first_nonopt,last_nonopt)
+ which contains all the non-options that have been skipped so far.
+ The other is elements [last_nonopt,optind), which contains all
+ the options processed since those non-options were skipped.
+
+ `first_nonopt' and `last_nonopt' are relocated so that they describe
+ the new indices of the non-options in ARGV after they are moved. */
+
+static void
+exchange (char **argv, struct _getopt_data *d)
+{
+ int bottom = d->__first_nonopt;
+ int middle = d->__last_nonopt;
+ int top = d->optind;
+ char *tem;
+
+ /* Exchange the shorter segment with the far end of the longer segment.
+ That puts the shorter segment into the right place.
+ It leaves the longer segment in the right place overall,
+ but it consists of two parts that need to be swapped next. */
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
+ {
+ /* We must extend the array. The user plays games with us and
+ presents new arguments. */
+ char *new_str = malloc (top + 1);
+ if (new_str == NULL)
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
+ else
+ {
+ memset (__mempcpy (new_str, __getopt_nonoption_flags,
+ d->__nonoption_flags_max_len),
+ '\0', top + 1 - d->__nonoption_flags_max_len);
+ d->__nonoption_flags_max_len = top + 1;
+ __getopt_nonoption_flags = new_str;
+ }
+ }
+#endif
+
+ while (top > middle && middle > bottom)
+ {
+ if (top - middle > middle - bottom)
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ register int i;
+
+ /* Swap it with the top part of the top segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[top - (middle - bottom) + i];
+ argv[top - (middle - bottom) + i] = tem;
+ SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
+ else
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ register int i;
+
+ /* Swap it with the bottom part of the bottom segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[middle + i];
+ argv[middle + i] = tem;
+ SWAP_FLAGS (bottom + i, middle + i);
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
+ }
+
+ /* Update records for the slots the non-options now occupy. */
+
+ d->__first_nonopt += (d->optind - d->__last_nonopt);
+ d->__last_nonopt = d->optind;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+static const char *
+_getopt_initialize (int argc _GL_UNUSED,
+ char **argv _GL_UNUSED, const char *optstring,
+ struct _getopt_data *d, int posixly_correct)
+{
+ /* Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ d->__first_nonopt = d->__last_nonopt = d->optind;
+
+ d->__nextchar = NULL;
+
+ d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ d->__ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ d->__ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (d->__posixly_correct)
+ d->__ordering = REQUIRE_ORDER;
+ else
+ d->__ordering = PERMUTE;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ if (!d->__posixly_correct
+ && argc == __libc_argc && argv == __libc_argv)
+ {
+ if (d->__nonoption_flags_max_len == 0)
+ {
+ if (__getopt_nonoption_flags == NULL
+ || __getopt_nonoption_flags[0] == '\0')
+ d->__nonoption_flags_max_len = -1;
+ else
+ {
+ const char *orig_str = __getopt_nonoption_flags;
+ int len = d->__nonoption_flags_max_len = strlen (orig_str);
+ if (d->__nonoption_flags_max_len < argc)
+ d->__nonoption_flags_max_len = argc;
+ __getopt_nonoption_flags =
+ (char *) malloc (d->__nonoption_flags_max_len);
+ if (__getopt_nonoption_flags == NULL)
+ d->__nonoption_flags_max_len = -1;
+ else
+ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ '\0', d->__nonoption_flags_max_len - len);
+ }
+ }
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len;
+ }
+ else
+ d->__nonoption_flags_len = 0;
+#endif
+
+ return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+ given in OPTSTRING.
+
+ If an element of ARGV starts with '-', and is not exactly "-" or "--",
+ then it is an option element. The characters of this element
+ (aside from the initial '-') are option characters. If `getopt'
+ is called repeatedly, it returns successively each of the option characters
+ from each of the option elements.
+
+ If `getopt' finds another option character, it returns that character,
+ updating `optind' and `nextchar' so that the next call to `getopt' can
+ resume the scan with the following option character or ARGV-element.
+
+ If there are no more option characters, `getopt' returns -1.
+ Then `optind' is the index in ARGV of the first ARGV-element
+ that is not an option. (The ARGV-elements have been permuted
+ so that those that are not options now come last.)
+
+ OPTSTRING is a string containing the legitimate option characters.
+ If an option character is seen that is not listed in OPTSTRING,
+ return '?' after printing an error message. If you set `opterr' to
+ zero, the error message is suppressed but we still return '?'.
+
+ If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+ so the following text in the same ARGV-element, or the text of the following
+ ARGV-element, is returned in `optarg'. Two colons mean an option that
+ wants an optional arg; if there is text in the current ARGV-element,
+ it is returned in `optarg', otherwise `optarg' is set to zero.
+
+ If OPTSTRING starts with `-' or `+', it requests different methods of
+ handling the non-option ARGV-elements.
+ See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+ Long-named options begin with `--' instead of `-'.
+ Their names may be abbreviated as long as the abbreviation is unique
+ or is an exact match for some defined option. If they have an
+ argument, it follows the option name in the same ARGV-element, separated
+ from the option name by a `=', or else the in next ARGV-element.
+ When `getopt' finds a long-named option, it returns 0 if that option's
+ `flag' field is nonzero, the value of the option's `val' field
+ if the `flag' field is zero.
+
+ The elements of ARGV aren't really const, because we permute them.
+ But we pretend they're const in the prototype to be compatible
+ with other systems.
+
+ LONGOPTS is a vector of `struct option' terminated by an
+ element containing a name which is zero.
+
+ LONGIND returns the index in LONGOPT of the long-named option found.
+ It is only valid when a long-named option has been found by the most
+ recent call.
+
+ If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+ long-named options. */
+
+int
+_getopt_internal_r (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind,
+ int long_only, struct _getopt_data *d, int posixly_correct)
+{
+ int print_errors = d->opterr;
+
+ if (argc < 1)
+ return -1;
+
+ d->optarg = NULL;
+
+ if (d->optind == 0 || !d->__initialized)
+ {
+ if (d->optind == 0)
+ d->optind = 1; /* Don't scan ARGV[0], the program name. */
+ optstring = _getopt_initialize (argc, argv, optstring, d,
+ posixly_correct);
+ d->__initialized = 1;
+ }
+ else if (optstring[0] == '-' || optstring[0] == '+')
+ optstring++;
+ if (optstring[0] == ':')
+ print_errors = 0;
+
+ /* Test whether ARGV[optind] points to a non-option argument.
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
+ || (d->optind < d->__nonoption_flags_len \
+ && __getopt_nonoption_flags[d->optind] == '1'))
+#else
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
+#endif
+
+ if (d->__nextchar == NULL || *d->__nextchar == '\0')
+ {
+ /* Advance to the next ARGV-element. */
+
+ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+ moved back by the user (who may also have changed the arguments). */
+ if (d->__last_nonopt > d->optind)
+ d->__last_nonopt = d->optind;
+ if (d->__first_nonopt > d->optind)
+ d->__first_nonopt = d->optind;
+
+ if (d->__ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange ((char **) argv, d);
+ else if (d->__last_nonopt != d->optind)
+ d->__first_nonopt = d->optind;
+
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (d->optind < argc && NONOPTION_P)
+ d->optind++;
+ d->__last_nonopt = d->optind;
+ }
+
+ /* The special ARGV-element `--' means premature end of options.
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
+
+ if (d->optind != argc && !strcmp (argv[d->optind], "--"))
+ {
+ d->optind++;
+
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange ((char **) argv, d);
+ else if (d->__first_nonopt == d->__last_nonopt)
+ d->__first_nonopt = d->optind;
+ d->__last_nonopt = argc;
+
+ d->optind = argc;
+ }
+
+ /* If we have done all the ARGV-elements, stop the scan
+ and back over any non-options that we skipped and permuted. */
+
+ if (d->optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (d->__first_nonopt != d->__last_nonopt)
+ d->optind = d->__first_nonopt;
+ return -1;
+ }
+
+ /* If we have come to a non-option and did not permute it,
+ either stop the scan or describe it to the caller and pass it by. */
+
+ if (NONOPTION_P)
+ {
+ if (d->__ordering == REQUIRE_ORDER)
+ return -1;
+ d->optarg = argv[d->optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Skip the initial punctuation. */
+
+ d->__nextchar = (argv[d->optind] + 1
+ + (longopts != NULL && argv[d->optind][1] == '-'));
+ }
+
+ /* Decode the current option-ARGV-element. */
+
+ /* Check whether the ARGV-element is a long option.
+
+ If long_only and the ARGV-element has the form "-f", where f is
+ a valid short option, don't consider it an abbreviated form of
+ a long option that starts with f. Otherwise there would be no
+ way to give the -f short option.
+
+ On the other hand, if there's a long option "fubar" and
+ the ARGV-element is "-fu", do consider that an abbreviation of
+ the long option, just like "--fu", and not "-f" with arg "u".
+
+ This distinction seems to be the most useful approach. */
+
+ if (longopts != NULL
+ && (argv[d->optind][1] == '-'
+ || (long_only && (argv[d->optind][2]
+ || !strchr (optstring, argv[d->optind][1])))))
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = -1;
+ int option_index;
+
+ for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+ {
+ if ((unsigned int) (nameend - d->__nextchar)
+ == (unsigned int) strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else if (long_only
+ || pfound->has_arg != p->has_arg
+ || pfound->flag != p->flag
+ || pfound->val != p->val)
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
+ argv[0], argv[d->optind]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ d->optind++;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ d->optarg = nameend + 1;
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind - 1][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option '--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option '--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option '%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option '%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+
+ d->__nextchar += strlen (d->__nextchar);
+
+ d->optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option '--%s' requires an argument\n"),
+ argv[0], pfound->name) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option '--%s' requires an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short
+ option, then it's an error.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[d->optind][1] == '-'
+ || strchr (optstring, *d->__nextchar) == NULL)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
+ argv[0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
+ argv[0], d->__nextchar);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+ d->__nextchar = (char *) "";
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *d->__nextchar++;
+ const char *temp = strchr (optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*d->__nextchar == '\0')
+ ++d->optind;
+
+ if (temp == NULL || c == ':' || c == ';')
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
+ argv[0], c);
+#else
+ fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+ d->optopt = c;
+ return '?';
+ }
+ /* Convenience. Treat POSIX -W foo same as long option --foo */
+ if (temp[0] == 'W' && temp[1] == ';')
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = 0;
+ int option_index;
+
+ /* This is an option that requires an argument. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ d->optind++;
+ }
+ else if (d->optind == argc)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c);
+#endif
+ }
+ d->optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `d->optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ d->optarg = argv[d->optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
+ nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+ {
+ if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else if (long_only
+ || pfound->has_arg != p->has_arg
+ || pfound->flag != p->flag
+ || pfound->val != p->val)
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
+ argv[0], d->optarg) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
+ argv[0], d->optarg);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ return '?';
+ }
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ d->optarg = nameend + 1;
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option '-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("\
+%s: option '-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+
+ d->__nextchar += strlen (d->__nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option '-W %s' requires an argument\n"),
+ argv[0], pfound->name) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("\
+%s: option '-W %s' requires an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ else
+ d->optarg = NULL;
+ d->__nextchar += strlen (d->__nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ d->__nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
+ }
+ if (temp[1] == ':')
+ {
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ d->optind++;
+ }
+ else
+ d->optarg = NULL;
+ d->__nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ d->optind++;
+ }
+ else if (d->optind == argc)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option requires an argument -- '%c'\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c);
+#endif
+ }
+ d->optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ d->optarg = argv[d->optind++];
+ d->__nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int
+_getopt_internal (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind, int long_only,
+ int posixly_correct)
+{
+ int result;
+
+ getopt_data.optind = optind;
+ getopt_data.opterr = opterr;
+
+ result = _getopt_internal_r (argc, argv, optstring, longopts,
+ longind, long_only, &getopt_data,
+ posixly_correct);
+
+ optind = getopt_data.optind;
+ optarg = getopt_data.optarg;
+ optopt = getopt_data.optopt;
+
+ return result;
+}
+
+/* glibc gets a LSB-compliant getopt.
+ Standalone applications get a POSIX-compliant getopt. */
+#if _LIBC
+enum { POSIXLY_CORRECT = 0 };
+#else
+enum { POSIXLY_CORRECT = 1 };
+#endif
+
+int
+getopt (int argc, char *const *argv, const char *optstring)
+{
+ return _getopt_internal (argc, (char **) argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0, POSIXLY_CORRECT);
+}
+
+#ifdef _LIBC
+int
+__posix_getopt (int argc, char *const *argv, const char *optstring)
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0, 1);
+}
+#endif
+
+
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+ the above definition of `getopt'. */
+
+int
+main (int argc, char **argv)
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+
+ c = getopt (argc, argv, "abc:d:0123456789");
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value '%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/grub-core/gnulib/getopt.in.h b/grub-core/gnulib/getopt.in.h
new file mode 100644
index 0000000..57a8e89
--- /dev/null
+++ b/grub-core/gnulib/getopt.in.h
@@ -0,0 +1,249 @@
+/* Declarations for getopt.
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_GETOPT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. We must
+ also inform the replacement unistd.h to not recursively use
+ <getopt.h>; our definitions will be present soon enough. */
+#if @HAVE_GETOPT_H@
+# define _GL_SYSTEM_GETOPT
+# @INCLUDE_NEXT@ @NEXT_GETOPT_H@
+# undef _GL_SYSTEM_GETOPT
+#endif
+
+#ifndef _GL_GETOPT_H
+
+#ifndef __need_getopt
+# define _GL_GETOPT_H 1
+#endif
+
+/* Standalone applications should #define __GETOPT_PREFIX to an
+ identifier that prefixes the external functions and variables
+ defined in this header. When this happens, include the
+ headers that might declare getopt so that they will not cause
+ confusion if included after this file (if the system had <getopt.h>,
+ we have already included it). Then systematically rename
+ identifiers so that they do not collide with the system functions
+ and variables. Renaming avoids problems with some compilers and
+ linkers. */
+#if defined __GETOPT_PREFIX && !defined __need_getopt
+# if !@HAVE_GETOPT_H@
+# include <stdlib.h>
+# include <stdio.h>
+# include <unistd.h>
+# endif
+# undef __need_getopt
+# undef getopt
+# undef getopt_long
+# undef getopt_long_only
+# undef optarg
+# undef opterr
+# undef optind
+# undef optopt
+# undef option
+# define __GETOPT_CONCAT(x, y) x ## y
+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
+# define getopt __GETOPT_ID (getopt)
+# define getopt_long __GETOPT_ID (getopt_long)
+# define getopt_long_only __GETOPT_ID (getopt_long_only)
+# define optarg __GETOPT_ID (optarg)
+# define opterr __GETOPT_ID (opterr)
+# define optind __GETOPT_ID (optind)
+# define optopt __GETOPT_ID (optopt)
+# define option __GETOPT_ID (option)
+# define _getopt_internal __GETOPT_ID (getopt_internal)
+#endif
+
+/* Standalone applications get correct prototypes for getopt_long and
+ getopt_long_only; they declare "char **argv". libc uses prototypes
+ with "char *const *argv" that are incorrect because getopt_long and
+ getopt_long_only can permute argv; this is required for backward
+ compatibility (e.g., for LSB 2.0.1).
+
+ This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+ but it caused redefinition warnings if both unistd.h and getopt.h were
+ included, since unistd.h includes getopt.h having previously defined
+ __need_getopt.
+
+ The only place where __getopt_argv_const is used is in definitions
+ of getopt_long and getopt_long_only below, but these are visible
+ only if __need_getopt is not defined, so it is quite safe to rewrite
+ the conditional as follows:
+*/
+#if !defined __need_getopt
+# if defined __GETOPT_PREFIX
+# define __getopt_argv_const /* empty */
+# else
+# define __getopt_argv_const const
+# endif
+#endif
+
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+ standalone, or this is the first header included in the source file.
+ If we are being used with glibc, we need to include <features.h>, but
+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+ not defined, include <ctype.h>, which will pull in <features.h> for us
+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+ doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
+
+#ifndef __THROW
+# ifndef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) (0)
+# endif
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# else
+# define __THROW
+# endif
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+#ifndef __need_getopt
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+ const char *name;
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+# define no_argument 0
+# define required_argument 1
+# define optional_argument 2
+#endif /* need getopt */
+
+
+/* Get definitions and prototypes for functions to process the
+ arguments in ARGV (ARGC of them, minus the program name) for
+ options given in OPTS.
+
+ Return the option character from OPTS just read. Return -1 when
+ there are no more options. For unrecognized options, or options
+ missing arguments, `optopt' is set to the option letter, and '?' is
+ returned.
+
+ The OPTS string is a list of characters which are recognized option
+ letters, optionally followed by colons, specifying that that letter
+ takes an argument, to be placed in `optarg'.
+
+ If a letter in OPTS is followed by two colons, its argument is
+ optional. This behavior is specific to the GNU `getopt'.
+
+ The argument `--' causes premature termination of argument
+ scanning, explicitly telling `getopt' that there are no more
+ options.
+
+ If OPTS begins with `-', then non-option arguments are treated as
+ arguments to the option '\1'. This behavior is specific to the GNU
+ `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
+ the environment, then do not permute arguments. */
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+
+#ifndef __need_getopt
+extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* getopt.h */
+#endif /* getopt.h */
diff --git a/grub-core/gnulib/getopt1.c b/grub-core/gnulib/getopt1.c
new file mode 100644
index 0000000..046d69f
--- /dev/null
+++ b/grub-core/gnulib/getopt1.c
@@ -0,0 +1,170 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+ Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
+ 1998, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef _LIBC
+# include <getopt.h>
+#else
+# include <config.h>
+# include "getopt.h"
+#endif
+#include "getopt_int.h"
+
+#include <stdio.h>
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
+ const struct option *long_options, int *opt_index)
+{
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 0, 0);
+}
+
+int
+_getopt_long_r (int argc, char **argv, const char *options,
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
+{
+ return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+ 0, d, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+ If an option that starts with '-' (not '--') doesn't match a long option,
+ but does match a short option, it is parsed as a short option
+ instead. */
+
+int
+getopt_long_only (int argc, char *__getopt_argv_const *argv,
+ const char *options,
+ const struct option *long_options, int *opt_index)
+{
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 1, 0);
+}
+
+int
+_getopt_long_only_r (int argc, char **argv, const char *options,
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
+{
+ return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+ 1, d, 0);
+}
+
+
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+ int option_index = 0;
+ static const struct option long_options[] =
+ {
+ {"add", 1, 0, 0},
+ {"append", 0, 0, 0},
+ {"delete", 1, 0, 0},
+ {"verbose", 0, 0, 0},
+ {"create", 0, 0, 0},
+ {"file", 1, 0, 0},
+ {0, 0, 0, 0}
+ };
+
+ c = getopt_long (argc, argv, "abc:d:0123456789",
+ long_options, &option_index);
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case 0:
+ printf ("option %s", long_options[option_index].name);
+ if (optarg)
+ printf (" with arg %s", optarg);
+ printf ("\n");
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", optarg);
+ break;
+
+ case 'd':
+ printf ("option d with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/grub-core/gnulib/getopt_int.h b/grub-core/gnulib/getopt_int.h
new file mode 100644
index 0000000..980b750
--- /dev/null
+++ b/grub-core/gnulib/getopt_int.h
@@ -0,0 +1,135 @@
+/* Internal declarations for getopt.
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_INT_H
+#define _GETOPT_INT_H 1
+
+#include <getopt.h>
+
+extern int _getopt_internal (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, int __posixly_correct);
+
+
+/* Reentrant versions which can handle parsing multiple argument
+ vectors at the same time. */
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters, or by calling getopt.
+
+ PERMUTE is the default. We permute the contents of ARGV as we
+ scan, so that eventually all the non-options are at the end.
+ This allows options to be given in any order, even with programs
+ that were not written to expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were
+ written to expect options and other ARGV-elements in any order
+ and that care about the ordering of the two. We describe each
+ non-option ARGV-element as if it were the argument of an option
+ with character code 1. Using `-' as the first character of the
+ list of option characters selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
+
+enum __ord
+ {
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+ };
+
+/* Data type for reentrant functions. */
+struct _getopt_data
+{
+ /* These have exactly the same meaning as the corresponding global
+ variables, except that they are used for the reentrant
+ versions of getopt. */
+ int optind;
+ int opterr;
+ int optopt;
+ char *optarg;
+
+ /* Internal members. */
+
+ /* True if the internal members have been initialized. */
+ int __initialized;
+
+ /* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+ char *__nextchar;
+
+ /* See __ord above. */
+ enum __ord __ordering;
+
+ /* If the POSIXLY_CORRECT environment variable is set
+ or getopt was called. */
+ int __posixly_correct;
+
+
+ /* Handle permutation of arguments. */
+
+ /* Describe the part of ARGV that contains non-options that have
+ been skipped. `first_nonopt' is the index in ARGV of the first
+ of them; `last_nonopt' is the index after the last of them. */
+
+ int __first_nonopt;
+ int __last_nonopt;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ int __nonoption_flags_max_len;
+ int __nonoption_flags_len;
+# endif
+};
+
+/* The initializer is necessary to set OPTIND and OPTERR to their
+ default values and to clear the initialization flag. */
+#define _GETOPT_DATA_INITIALIZER { 1, 1 }
+
+extern int _getopt_internal_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, struct _getopt_data *__data,
+ int __posixly_correct);
+
+extern int _getopt_long_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ struct _getopt_data *__data);
+
+extern int _getopt_long_only_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts,
+ int *__longind,
+ struct _getopt_data *__data);
+
+#endif /* getopt_int.h */
diff --git a/grub-core/gnulib/gettext.h b/grub-core/gnulib/gettext.h
new file mode 100644
index 0000000..881ae33
--- /dev/null
+++ b/grub-core/gnulib/gettext.h
@@ -0,0 +1,280 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option. */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions. */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+ the gettext() and ngettext() macros. This is an alternative to calling
+ textdomain(), and is useful for libraries. */
+# ifdef DEFAULT_TEXT_DOMAIN
+# undef gettext
+# define gettext(Msgid) \
+ dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+ <libintl.h>, which chokes if dcgettext is defined as a macro. So include
+ it now, to make later inclusions of <libintl.h> a NOP. */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+ The casts to 'const char *' serve the purpose of producing warnings
+ for invalid uses of the value returned from these functions.
+ On pre-ANSI systems without 'const', the config.h file is supposed to
+ contain "#define const". */
+# undef gettext
+# define gettext(Msgid) ((const char *) (Msgid))
+# undef dgettext
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# undef dcgettext
+# define dcgettext(Domainname, Msgid, Category) \
+ ((void) (Category), dgettext (Domainname, Msgid))
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ ((N) == 1 \
+ ? ((void) (Msgid2), (const char *) (Msgid1)) \
+ : ((void) (Msgid1), (const char *) (Msgid2)))
+# undef dngettext
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+ ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# undef dcngettext
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
+# undef textdomain
+# define textdomain(Domainname) ((const char *) (Domainname))
+# undef bindtextdomain
+# define bindtextdomain(Domainname, Dirname) \
+ ((void) (Domainname), (const char *) (Dirname))
+# undef bind_textdomain_codeset
+# define bind_textdomain_codeset(Domainname, Codeset) \
+ ((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+ extraction of messages, but does not call gettext(). The run-time
+ translation is done at a different place in the code.
+ The argument, String, should be a literal string. Concatenated strings
+ and other string expressions won't work.
+ The macro's expansion is not parenthesized, so that it is suitable as
+ initializer for static 'char[]' or 'const char[]' variables. */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file. */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+ MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
+ short and rarely need to change.
+ The letter 'p' stands for 'particular' or 'special'. */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ int category)
+{
+ const char *translation = dcgettext (domain, msg_ctxt_id, category);
+ if (translation == msg_ctxt_id)
+ return msgid;
+ else
+ return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ const char *translation =
+ dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ if (translation == msg_ctxt_id || translation == msgid_plural)
+ return (n == 1 ? msgid : msgid_plural);
+ else
+ return translation;
+}
+
+/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
+ can be arbitrary expressions. But for string literals these macros are
+ less efficient than those above. */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+ /* || __STDC_VERSION__ >= 199901L */ )
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (translation != msg_ctxt_id)
+ return translation;
+ }
+ return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ return translation;
+ }
+ return (n == 1 ? msgid : msgid_plural);
+}
+
+#endif /* _LIBGETTEXT_H */
diff --git a/grub-core/gnulib/intprops.h b/grub-core/gnulib/intprops.h
new file mode 100644
index 0000000..46f4d47
--- /dev/null
+++ b/grub-core/gnulib/intprops.h
@@ -0,0 +1,83 @@
+/* intprops.h -- properties of integer types
+
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef GL_INTPROPS_H
+# define GL_INTPROPS_H
+
+# include <limits.h>
+
+/* The extra casts in the following macros work around compiler bugs,
+ e.g., in Cray C 5.0.3.0. */
+
+/* True if the arithmetic type T is an integer type. bool counts as
+ an integer. */
+# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+ complement, ones' complement, or signed magnitude representation,
+ respectively. Much GNU code assumes two's complement, but some
+ people like to be portable to all possible C hosts. */
+# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the arithmetic type T is signed. */
+# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* The maximum and minimum values for the integer type T. These
+ macros have undefined behavior if T is signed and has padding bits.
+ If this is a problem for you, please let us know how to fix it for
+ your host. */
+# define TYPE_MINIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) 0 \
+ : TYPE_SIGNED_MAGNITUDE (t) \
+ ? ~ (t) 0 \
+ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+# define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+
+/* Return zero if T can be determined to be an unsigned type.
+ Otherwise, return 1.
+ When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
+ tighter bound. Otherwise, it overestimates the true bound by one byte
+ when applied to unsigned types of size 2, 4, 16, ... bytes.
+ The symbol signed_type_or_expr__ is private to this header file. */
+# if __GNUC__ >= 2
+# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
+# else
+# define signed_type_or_expr__(t) 1
+# endif
+
+/* Bound on length of the string representing an integer type or expression T.
+ Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485;
+ add 1 for integer division truncation; add 1 more for a minus sign
+ if needed. */
+# define INT_STRLEN_BOUND(t) \
+ ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \
+ + signed_type_or_expr__ (t) + 1)
+
+/* Bound on buffer size needed to represent an integer type or expression T,
+ including the terminating null. */
+# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+#endif /* GL_INTPROPS_H */
diff --git a/grub-core/gnulib/langinfo.in.h b/grub-core/gnulib/langinfo.in.h
new file mode 100644
index 0000000..3a92647
--- /dev/null
+++ b/grub-core/gnulib/langinfo.in.h
@@ -0,0 +1,173 @@
+/* Substitute for and wrapper around <langinfo.h>.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+ * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
+ * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
+ */
+
+#ifndef _GL_LANGINFO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_LANGINFO_H@
+# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
+#endif
+
+#ifndef _GL_LANGINFO_H
+#define _GL_LANGINFO_H
+
+
+#if !@HAVE_LANGINFO_H@
+
+/* A platform that lacks <langinfo.h>. */
+
+/* Assume that it also lacks <nl_types.h> and the nl_item type. */
+typedef int nl_item;
+
+/* nl_langinfo items of the LC_CTYPE category */
+# define CODESET 10000
+/* nl_langinfo items of the LC_NUMERIC category */
+# define RADIXCHAR 10001
+# define THOUSEP 10002
+/* nl_langinfo items of the LC_TIME category */
+# define D_T_FMT 10003
+# define D_FMT 10004
+# define T_FMT 10005
+# define T_FMT_AMPM 10006
+# define AM_STR 10007
+# define PM_STR 10008
+# define DAY_1 10009
+# define DAY_2 (DAY_1 + 1)
+# define DAY_3 (DAY_1 + 2)
+# define DAY_4 (DAY_1 + 3)
+# define DAY_5 (DAY_1 + 4)
+# define DAY_6 (DAY_1 + 5)
+# define DAY_7 (DAY_1 + 6)
+# define ABDAY_1 10016
+# define ABDAY_2 (ABDAY_1 + 1)
+# define ABDAY_3 (ABDAY_1 + 2)
+# define ABDAY_4 (ABDAY_1 + 3)
+# define ABDAY_5 (ABDAY_1 + 4)
+# define ABDAY_6 (ABDAY_1 + 5)
+# define ABDAY_7 (ABDAY_1 + 6)
+# define MON_1 10023
+# define MON_2 (MON_1 + 1)
+# define MON_3 (MON_1 + 2)
+# define MON_4 (MON_1 + 3)
+# define MON_5 (MON_1 + 4)
+# define MON_6 (MON_1 + 5)
+# define MON_7 (MON_1 + 6)
+# define MON_8 (MON_1 + 7)
+# define MON_9 (MON_1 + 8)
+# define MON_10 (MON_1 + 9)
+# define MON_11 (MON_1 + 10)
+# define MON_12 (MON_1 + 11)
+# define ABMON_1 10035
+# define ABMON_2 (ABMON_1 + 1)
+# define ABMON_3 (ABMON_1 + 2)
+# define ABMON_4 (ABMON_1 + 3)
+# define ABMON_5 (ABMON_1 + 4)
+# define ABMON_6 (ABMON_1 + 5)
+# define ABMON_7 (ABMON_1 + 6)
+# define ABMON_8 (ABMON_1 + 7)
+# define ABMON_9 (ABMON_1 + 8)
+# define ABMON_10 (ABMON_1 + 9)
+# define ABMON_11 (ABMON_1 + 10)
+# define ABMON_12 (ABMON_1 + 11)
+# define ERA 10047
+# define ERA_D_FMT 10048
+# define ERA_D_T_FMT 10049
+# define ERA_T_FMT 10050
+# define ALT_DIGITS 10051
+/* nl_langinfo items of the LC_MONETARY category */
+# define CRNCYSTR 10052
+/* nl_langinfo items of the LC_MESSAGES category */
+# define YESEXPR 10053
+# define NOEXPR 10054
+
+#else
+
+/* A platform that has <langinfo.h>. */
+
+# if !@HAVE_LANGINFO_CODESET@
+# define CODESET 10000
+# define GNULIB_defined_CODESET 1
+# endif
+
+# if !@HAVE_LANGINFO_T_FMT_AMPM@
+# define T_FMT_AMPM 10006
+# define GNULIB_defined_T_FMT_AMPM 1
+# endif
+
+# if !@HAVE_LANGINFO_ERA@
+# define ERA 10047
+# define ERA_D_FMT 10048
+# define ERA_D_T_FMT 10049
+# define ERA_T_FMT 10050
+# define ALT_DIGITS 10051
+# define GNULIB_defined_ERA 1
+# endif
+
+# if !@HAVE_LANGINFO_YESEXPR@
+# define YESEXPR 10053
+# define NOEXPR 10054
+# define GNULIB_defined_YESEXPR 1
+# endif
+
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Declare overridden functions. */
+
+
+/* Return a piece of locale dependent information.
+ Note: The difference between nl_langinfo (CODESET) and locale_charset ()
+ is that the latter normalizes the encoding names to GNU conventions. */
+
+#if @GNULIB_NL_LANGINFO@
+# if @REPLACE_NL_LANGINFO@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef nl_langinfo
+# define nl_langinfo rpl_nl_langinfo
+# endif
+_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item));
+_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item));
+# else
+# if !@HAVE_NL_LANGINFO@
+_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
+# endif
+_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
+# endif
+_GL_CXXALIASWARN (nl_langinfo);
+#elif defined GNULIB_POSIXCHECK
+# undef nl_langinfo
+# if HAVE_RAW_DECL_NL_LANGINFO
+_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
+ "use gnulib module nl_langinfo for portability");
+# endif
+#endif
+
+
+#endif /* _GL_LANGINFO_H */
+#endif /* _GL_LANGINFO_H */
diff --git a/grub-core/gnulib/localcharset.c b/grub-core/gnulib/localcharset.c
new file mode 100644
index 0000000..fa2207f
--- /dev/null
+++ b/grub-core/gnulib/localcharset.c
@@ -0,0 +1,548 @@
+/* Determine a canonical name for the current locale's character encoding.
+
+ Copyright (C) 2000-2006, 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "localcharset.h"
+
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
+# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WIN32_NATIVE
+#endif
+
+#if defined __EMX__
+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
+# ifndef OS2
+# define OS2
+# endif
+#endif
+
+#if !defined WIN32_NATIVE
+# include <unistd.h>
+# if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+# else
+# if 0 /* see comment below */
+# include <locale.h>
+# endif
+# endif
+# ifdef __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# endif
+#elif defined WIN32_NATIVE
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#endif
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+/* Get LIBDIR. */
+#ifndef LIBDIR
+# include "configmake.h"
+#endif
+
+/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
+#ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+#endif
+
+#ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+#endif
+
+#if HAVE_DECL_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+#endif
+
+/* The following static variable is declared 'volatile' to avoid a
+ possible multithread problem in the function get_charset_aliases. If we
+ are running in a threaded environment, and if two threads initialize
+ 'charset_aliases' simultaneously, both will produce the same value,
+ and everything will be ok if the two assignments to 'charset_aliases'
+ are atomic. But I don't know what will happen if the two assignments mix. */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
+/* Pointer to the contents of the charset.alias file, if it has already been
+ read, else NULL. Its format is:
+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
+static const char * volatile charset_aliases;
+
+/* Return a pointer to the contents of the charset.alias file. */
+static const char *
+get_charset_aliases (void)
+{
+ const char *cp;
+
+ cp = charset_aliases;
+ if (cp == NULL)
+ {
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+ const char *dir;
+ const char *base = "charset.alias";
+ char *file_name;
+
+ /* Make it possible to override the charset.alias location. This is
+ necessary for running the testsuite before "make install". */
+ dir = getenv ("CHARSETALIASDIR");
+ if (dir == NULL || dir[0] == '\0')
+ dir = relocate (LIBDIR);
+
+ /* Concatenate dir and base into freshly allocated file_name. */
+ {
+ size_t dir_len = strlen (dir);
+ size_t base_len = strlen (base);
+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
+ if (file_name != NULL)
+ {
+ memcpy (file_name, dir, dir_len);
+ if (add_slash)
+ file_name[dir_len] = DIRECTORY_SEPARATOR;
+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
+ }
+ }
+
+ if (file_name == NULL)
+ /* Out of memory. Treat the file as empty. */
+ cp = "";
+ else
+ {
+ int fd;
+
+ /* Open the file. Reject symbolic links on platforms that support
+ O_NOFOLLOW. This is a security feature. Without it, an attacker
+ could retrieve parts of the contents (namely, the tail of the
+ first line that starts with "* ") of an arbitrary file by placing
+ a symbolic link to that file under the name "charset.alias" in
+ some writable directory and defining the environment variable
+ CHARSETALIASDIR to point to that directory. */
+ fd = open (file_name,
+ O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
+ if (fd < 0)
+ /* File not found. Treat it as empty. */
+ cp = "";
+ else
+ {
+ FILE *fp;
+
+ fp = fdopen (fd, "r");
+ if (fp == NULL)
+ {
+ /* Out of memory. Treat the file as empty. */
+ close (fd);
+ cp = "";
+ }
+ else
+ {
+ /* Parse the file's contents. */
+ char *res_ptr = NULL;
+ size_t res_size = 0;
+
+ for (;;)
+ {
+ int c;
+ char buf1[50+1];
+ char buf2[50+1];
+ size_t l1, l2;
+ char *old_res_ptr;
+
+ c = getc (fp);
+ if (c == EOF)
+ break;
+ if (c == '\n' || c == ' ' || c == '\t')
+ continue;
+ if (c == '#')
+ {
+ /* Skip comment, to end of line. */
+ do
+ c = getc (fp);
+ while (!(c == EOF || c == '\n'));
+ if (c == EOF)
+ break;
+ continue;
+ }
+ ungetc (c, fp);
+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+ break;
+ l1 = strlen (buf1);
+ l2 = strlen (buf2);
+ old_res_ptr = res_ptr;
+ if (res_size == 0)
+ {
+ res_size = l1 + 1 + l2 + 1;
+ res_ptr = (char *) malloc (res_size + 1);
+ }
+ else
+ {
+ res_size += l1 + 1 + l2 + 1;
+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
+ }
+ if (res_ptr == NULL)
+ {
+ /* Out of memory. */
+ res_size = 0;
+ if (old_res_ptr != NULL)
+ free (old_res_ptr);
+ break;
+ }
+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
+ }
+ fclose (fp);
+ if (res_size == 0)
+ cp = "";
+ else
+ {
+ *(res_ptr + res_size) = '\0';
+ cp = res_ptr;
+ }
+ }
+ }
+
+ free (file_name);
+ }
+
+#else
+
+# if defined DARWIN7
+ /* To avoid the trouble of installing a file that is shared by many
+ GNU packages -- many packaging systems have problems with this --,
+ simply inline the aliases here. */
+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
+ "ISO8859-4" "\0" "ISO-8859-4" "\0"
+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
+ "ISO8859-13" "\0" "ISO-8859-13" "\0"
+ "ISO8859-15" "\0" "ISO-8859-15" "\0"
+ "KOI8-R" "\0" "KOI8-R" "\0"
+ "KOI8-U" "\0" "KOI8-U" "\0"
+ "CP866" "\0" "CP866" "\0"
+ "CP949" "\0" "CP949" "\0"
+ "CP1131" "\0" "CP1131" "\0"
+ "CP1251" "\0" "CP1251" "\0"
+ "eucCN" "\0" "GB2312" "\0"
+ "GB2312" "\0" "GB2312" "\0"
+ "eucJP" "\0" "EUC-JP" "\0"
+ "eucKR" "\0" "EUC-KR" "\0"
+ "Big5" "\0" "BIG5" "\0"
+ "Big5HKSCS" "\0" "BIG5-HKSCS" "\0"
+ "GBK" "\0" "GBK" "\0"
+ "GB18030" "\0" "GB18030" "\0"
+ "SJIS" "\0" "SHIFT_JIS" "\0"
+ "ARMSCII-8" "\0" "ARMSCII-8" "\0"
+ "PT154" "\0" "PT154" "\0"
+ /*"ISCII-DEV" "\0" "?" "\0"*/
+ "*" "\0" "UTF-8" "\0";
+# endif
+
+# if defined VMS
+ /* To avoid the troubles of an extra file charset.alias_vms in the
+ sources of many GNU packages, simply inline the aliases here. */
+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
+ section 10.7 "Handling Different Character Sets". */
+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
+ "ISO8859-8" "\0" "ISO-8859-8" "\0"
+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
+ /* Japanese */
+ "eucJP" "\0" "EUC-JP" "\0"
+ "SJIS" "\0" "SHIFT_JIS" "\0"
+ "DECKANJI" "\0" "DEC-KANJI" "\0"
+ "SDECKANJI" "\0" "EUC-JP" "\0"
+ /* Chinese */
+ "eucTW" "\0" "EUC-TW" "\0"
+ "DECHANYU" "\0" "DEC-HANYU" "\0"
+ "DECHANZI" "\0" "GB2312" "\0"
+ /* Korean */
+ "DECKOREAN" "\0" "EUC-KR" "\0";
+# endif
+
+# if defined WIN32_NATIVE || defined __CYGWIN__
+ /* To avoid the troubles of installing a separate file in the same
+ directory as the DLL and of retrieving the DLL's directory at
+ runtime, simply inline the aliases here. */
+
+ cp = "CP936" "\0" "GBK" "\0"
+ "CP1361" "\0" "JOHAB" "\0"
+ "CP20127" "\0" "ASCII" "\0"
+ "CP20866" "\0" "KOI8-R" "\0"
+ "CP20936" "\0" "GB2312" "\0"
+ "CP21866" "\0" "KOI8-RU" "\0"
+ "CP28591" "\0" "ISO-8859-1" "\0"
+ "CP28592" "\0" "ISO-8859-2" "\0"
+ "CP28593" "\0" "ISO-8859-3" "\0"
+ "CP28594" "\0" "ISO-8859-4" "\0"
+ "CP28595" "\0" "ISO-8859-5" "\0"
+ "CP28596" "\0" "ISO-8859-6" "\0"
+ "CP28597" "\0" "ISO-8859-7" "\0"
+ "CP28598" "\0" "ISO-8859-8" "\0"
+ "CP28599" "\0" "ISO-8859-9" "\0"
+ "CP28605" "\0" "ISO-8859-15" "\0"
+ "CP38598" "\0" "ISO-8859-8" "\0"
+ "CP51932" "\0" "EUC-JP" "\0"
+ "CP51936" "\0" "GB2312" "\0"
+ "CP51949" "\0" "EUC-KR" "\0"
+ "CP51950" "\0" "EUC-TW" "\0"
+ "CP54936" "\0" "GB18030" "\0"
+ "CP65001" "\0" "UTF-8" "\0";
+# endif
+#endif
+
+ charset_aliases = cp;
+ }
+
+ return cp;
+}
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+
+#ifdef STATIC
+STATIC
+#endif
+const char *
+locale_charset (void)
+{
+ const char *codeset;
+ const char *aliases;
+
+#if !(defined WIN32_NATIVE || defined OS2)
+
+# if HAVE_LANGINFO_CODESET
+
+ /* Most systems support nl_langinfo (CODESET) nowadays. */
+ codeset = nl_langinfo (CODESET);
+
+# ifdef __CYGWIN__
+ /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always
+ returns "US-ASCII". Return the suffix of the locale name from the
+ environment variables (if present) or the codepage as a number. */
+ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
+ {
+ const char *locale;
+ static char buf[2 + 10 + 1];
+
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return
+ it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+ }
+
+ /* Woe32 has a function returning the locale's codepage as a number:
+ GetACP(). This encoding is used by Cygwin, unless the user has set
+ the environment variable CYGWIN=codepage:oem (which very few people
+ do).
+ Output directed to console windows needs to be converted (to
+ GetOEMCP() if the console is using a raster font, or to
+ GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
+ this conversion transparently (see winsup/cygwin/fhandler_console.cc),
+ converting to GetConsoleOutputCP(). This leads to correct results,
+ except when SetConsoleOutputCP has been called and a raster font is
+ in use. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+ }
+# endif
+
+# else
+
+ /* On old systems which lack it, use setlocale or getenv. */
+ const char *locale = NULL;
+
+ /* But most old systems don't have a complete set of locales. Some
+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
+ use setlocale here; it would return "C" when it doesn't support the
+ locale name the user has set. */
+# if 0
+ locale = setlocale (LC_CTYPE, NULL);
+# endif
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ }
+
+ /* On some old systems, one used to set locale = "iso8859_1". On others,
+ you set it to "language_COUNTRY.charset". In any case, we resolve it
+ through the charset.alias file. */
+ codeset = locale;
+
+# endif
+
+#elif defined WIN32_NATIVE
+
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number:
+ GetACP().
+ When the output goes to a console window, it needs to be provided in
+ GetOEMCP() encoding if the console is using a raster font, or in
+ GetConsoleOutputCP() encoding if it is using a TrueType font.
+ But in GUI programs and for output sent to files and pipes, GetACP()
+ encoding is the best bet. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+
+#elif defined OS2
+
+ const char *locale;
+ static char buf[2 + 10 + 1];
+ ULONG cp[3];
+ ULONG cplen;
+
+ /* Allow user to override the codeset, as set in the operating system,
+ with standard language environment variables. */
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+
+ /* Resolve through the charset.alias file. */
+ codeset = locale;
+ }
+ else
+ {
+ /* OS/2 has a function returning the locale's codepage as a number. */
+ if (DosQueryCp (sizeof (cp), cp, &cplen))
+ codeset = "";
+ else
+ {
+ sprintf (buf, "CP%u", cp[0]);
+ codeset = buf;
+ }
+ }
+
+#endif
+
+ if (codeset == NULL)
+ /* The canonical name cannot be determined. */
+ codeset = "";
+
+ /* Resolve alias. */
+ for (aliases = get_charset_aliases ();
+ *aliases != '\0';
+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
+ if (strcmp (codeset, aliases) == 0
+ || (aliases[0] == '*' && aliases[1] == '\0'))
+ {
+ codeset = aliases + strlen (aliases) + 1;
+ break;
+ }
+
+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
+ the empty string as denoting "the locale's character encoding",
+ thus GNU libiconv would call this function a second time. */
+ if (codeset[0] == '\0')
+ codeset = "ASCII";
+
+ return codeset;
+}
diff --git a/grub-core/gnulib/localcharset.h b/grub-core/gnulib/localcharset.h
new file mode 100644
index 0000000..899b3ba
--- /dev/null
+++ b/grub-core/gnulib/localcharset.h
@@ -0,0 +1,41 @@
+/* Determine a canonical name for the current locale's character encoding.
+ Copyright (C) 2000-2003, 2009-2010 Free Software Foundation, Inc.
+ This file is part of the GNU CHARSET Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+extern const char * locale_charset (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/grub-core/gnulib/malloc.c b/grub-core/gnulib/malloc.c
new file mode 100644
index 0000000..4fa38ee
--- /dev/null
+++ b/grub-core/gnulib/malloc.c
@@ -0,0 +1,60 @@
+/* malloc() function that is glibc compatible.
+
+ Copyright (C) 1997-1998, 2006-2007, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
+#ifdef malloc
+# define NEED_MALLOC_GNU 1
+# undef malloc
+/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */
+#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
+# define NEED_MALLOC_GNU 1
+#endif
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+
+/* Call the system's malloc below. */
+#undef malloc
+
+/* Allocate an N-byte block of memory from the heap.
+ If N is zero, allocate a 1-byte block. */
+
+void *
+rpl_malloc (size_t n)
+{
+ void *result;
+
+#if NEED_MALLOC_GNU
+ if (n == 0)
+ n = 1;
+#endif
+
+ result = malloc (n);
+
+#if !HAVE_MALLOC_POSIX
+ if (result == NULL)
+ errno = ENOMEM;
+#endif
+
+ return result;
+}
diff --git a/grub-core/gnulib/mbrtowc.c b/grub-core/gnulib/mbrtowc.c
new file mode 100644
index 0000000..5c2650e
--- /dev/null
+++ b/grub-core/gnulib/mbrtowc.c
@@ -0,0 +1,386 @@
+/* Convert multibyte character to wide character.
+ Copyright (C) 1999-2002, 2005-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#if GNULIB_defined_mbstate_t
+/* Implement mbrtowc() on top of mbtowc(). */
+
+# include <errno.h>
+# include <stdlib.h>
+
+# include "localcharset.h"
+# include "streq.h"
+# include "verify.h"
+
+
+verify (sizeof (mbstate_t) >= 4);
+
+static char internal_state[4];
+
+size_t
+mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+ char *pstate = (char *)ps;
+
+ if (pstate == NULL)
+ pstate = internal_state;
+
+ if (s == NULL)
+ {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+
+ if (n == 0)
+ return (size_t)(-2);
+
+ /* Here n > 0. */
+ {
+ size_t nstate = pstate[0];
+ char buf[4];
+ const char *p;
+ size_t m;
+
+ switch (nstate)
+ {
+ case 0:
+ p = s;
+ m = n;
+ break;
+ case 3:
+ buf[2] = pstate[3];
+ /*FALLTHROUGH*/
+ case 2:
+ buf[1] = pstate[2];
+ /*FALLTHROUGH*/
+ case 1:
+ buf[0] = pstate[1];
+ p = buf;
+ m = nstate;
+ buf[m++] = s[0];
+ if (n >= 2 && m < 4)
+ {
+ buf[m++] = s[1];
+ if (n >= 3 && m < 4)
+ buf[m++] = s[2];
+ }
+ break;
+ default:
+ errno = EINVAL;
+ return (size_t)(-1);
+ }
+
+ /* Here m > 0. */
+
+# if __GLIBC__
+ /* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
+ mbtowc (NULL, NULL, 0);
+# endif
+ {
+ int res = mbtowc (pwc, p, m);
+
+ if (res >= 0)
+ {
+ if (pwc != NULL && ((*pwc == 0) != (res == 0)))
+ abort ();
+ if (nstate >= (res > 0 ? res : 1))
+ abort ();
+ res -= nstate;
+ pstate[0] = 0;
+ return res;
+ }
+
+ /* mbtowc does not distinguish between invalid and incomplete multibyte
+ sequences. But mbrtowc needs to make this distinction.
+ There are two possible approaches:
+ - Use iconv() and its return value.
+ - Use built-in knowledge about the possible encodings.
+ Given the low quality of implementation of iconv() on the systems that
+ lack mbrtowc(), we use the second approach.
+ The possible encodings are:
+ - 8-bit encodings,
+ - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
+ - UTF-8.
+ Use specialized code for each. */
+ if (m >= 4 || m >= MB_CUR_MAX)
+ goto invalid;
+ /* Here MB_CUR_MAX > 1 and 0 < m < 4. */
+ {
+ const char *encoding = locale_charset ();
+
+ if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ {
+ /* Cf. unistr/u8-mblen.c. */
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0xc2)
+ {
+ if (c < 0xe0)
+ {
+ if (m == 1)
+ goto incomplete;
+ }
+ else if (c < 0xf0)
+ {
+ if (m == 1)
+ goto incomplete;
+ if (m == 2)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xe1 || c2 >= 0xa0)
+ && (c != 0xed || c2 < 0xa0))
+ goto incomplete;
+ }
+ }
+ else if (c <= 0xf4)
+ {
+ if (m == 1)
+ goto incomplete;
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xf1 || c2 >= 0x90)
+ && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m == 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if ((c3 ^ 0x80) < 0x40)
+ goto incomplete;
+ }
+ }
+ }
+ }
+ }
+ goto invalid;
+ }
+
+ /* As a reference for this code, you can use the GNU libiconv
+ implementation. Look for uses of the RET_TOOFEW macro. */
+
+ if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
+ goto incomplete;
+ }
+ if (m == 2)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8f)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0xa1 && c2 < 0xff)
+ goto incomplete;
+ }
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0xa1 && c < 0xff)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8e)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0x90 && c <= 0xe3)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0x30 && c2 <= 0x39)
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m == 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if (c3 >= 0x81 && c3 <= 0xfe)
+ goto incomplete;
+ }
+ }
+ }
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
+ || (c >= 0xf0 && c <= 0xf9))
+ goto incomplete;
+ }
+ goto invalid;
+ }
+
+ /* An unknown multibyte encoding. */
+ goto incomplete;
+ }
+
+ incomplete:
+ {
+ size_t k = nstate;
+ /* Here 0 <= k < m < 4. */
+ pstate[++k] = s[0];
+ if (k < m)
+ {
+ pstate[++k] = s[1];
+ if (k < m)
+ pstate[++k] = s[2];
+ }
+ if (k != m)
+ abort ();
+ }
+ pstate[0] = m;
+ return (size_t)(-2);
+
+ invalid:
+ errno = EILSEQ;
+ /* The conversion state is undefined, says POSIX. */
+ return (size_t)(-1);
+ }
+ }
+}
+
+#else
+/* Override the system's mbrtowc() function. */
+
+# undef mbrtowc
+
+size_t
+rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+# if MBRTOWC_NULL_ARG_BUG || MBRTOWC_RETVAL_BUG
+ if (s == NULL)
+ {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+# endif
+
+# if MBRTOWC_RETVAL_BUG
+ {
+ static mbstate_t internal_state;
+
+ /* Override mbrtowc's internal state. We can not call mbsinit() on the
+ hidden internal state, but we can call it on our variable. */
+ if (ps == NULL)
+ ps = &internal_state;
+
+ if (!mbsinit (ps))
+ {
+ /* Parse the rest of the multibyte character byte for byte. */
+ size_t count = 0;
+ for (; n > 0; s++, n--)
+ {
+ wchar_t wc;
+ size_t ret = mbrtowc (&wc, s, 1, ps);
+
+ if (ret == (size_t)(-1))
+ return (size_t)(-1);
+ count++;
+ if (ret != (size_t)(-2))
+ {
+ /* The multibyte character has been completed. */
+ if (pwc != NULL)
+ *pwc = wc;
+ return (wc == 0 ? 0 : count);
+ }
+ }
+ return (size_t)(-2);
+ }
+ }
+# endif
+
+# if MBRTOWC_NUL_RETVAL_BUG
+ {
+ wchar_t wc;
+ size_t ret = mbrtowc (&wc, s, n, ps);
+
+ if (ret != (size_t)(-1) && ret != (size_t)(-2))
+ {
+ if (pwc != NULL)
+ *pwc = wc;
+ if (wc == 0)
+ ret = 0;
+ }
+ return ret;
+ }
+# else
+ return mbrtowc (pwc, s, n, ps);
+# endif
+}
+
+#endif
diff --git a/grub-core/gnulib/mbsinit.c b/grub-core/gnulib/mbsinit.c
new file mode 100644
index 0000000..066ddfe
--- /dev/null
+++ b/grub-core/gnulib/mbsinit.c
@@ -0,0 +1,47 @@
+/* Test for initial conversion state.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include "verify.h"
+
+/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
+ and wcrtomb(), wcsrtombs().
+ We assume that
+ - sizeof (mbstate_t) >= 4,
+ - only stateless encodings are supported (such as UTF-8 and EUC-JP, but
+ not ISO-2022 variants),
+ - for each encoding, the number of bytes for a wide character is <= 4.
+ (This maximum is attained for UTF-8, GB18030, EUC-TW.)
+ We define the meaning of mbstate_t as follows:
+ - In mb -> wc direction, mbstate_t's first byte contains the number of
+ buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
+ - In wc -> mb direction, mbstate_t contains no information. In other
+ words, it is always in the initial state. */
+
+verify (sizeof (mbstate_t) >= 4);
+
+int
+mbsinit (const mbstate_t *ps)
+{
+ const char *pstate = (const char *)ps;
+
+ return pstate[0] == 0;
+}
diff --git a/grub-core/gnulib/mbsrtowcs-state.c b/grub-core/gnulib/mbsrtowcs-state.c
new file mode 100644
index 0000000..35045f6
--- /dev/null
+++ b/grub-core/gnulib/mbsrtowcs-state.c
@@ -0,0 +1,37 @@
+/* Convert string to wide string.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+/* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */
+mbstate_t _gl_mbsrtowcs_state
+/* The state must initially be in the "initial state"; so, zero-initialize it.
+ On most systems, putting it into BSS is sufficient. Not so on MacOS X 10.3,
+ see <http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00329.html>.
+ When it needs an initializer, use 0 or {0} as initializer? 0 only works
+ when mbstate_t is a scalar type (such as when gnulib defines it, or on
+ AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct
+ or union type, but also for a scalar type (ISO C 99, 6.7.8.(11)). */
+#if defined __ELF__
+ /* On ELF systems, variables in BSS behave well. */
+#else
+ /* Use braces, to be on the safe side. */
+ = { 0 }
+#endif
+ ;
diff --git a/grub-core/gnulib/mbsrtowcs.c b/grub-core/gnulib/mbsrtowcs.c
new file mode 100644
index 0000000..c577f36
--- /dev/null
+++ b/grub-core/gnulib/mbsrtowcs.c
@@ -0,0 +1,136 @@
+/* Convert string to wide string.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include "strnlen1.h"
+
+
+extern mbstate_t _gl_mbsrtowcs_state;
+
+size_t
+mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+{
+ if (ps == NULL)
+ ps = &_gl_mbsrtowcs_state;
+ {
+ const char *src = *srcp;
+
+ if (dest != NULL)
+ {
+ wchar_t *destptr = dest;
+
+ for (; len > 0; destptr++, len--)
+ {
+ size_t src_avail;
+ size_t ret;
+
+ /* An optimized variant of
+ src_avail = strnlen1 (src, MB_LEN_MAX); */
+ if (src[0] == '\0')
+ src_avail = 1;
+ else if (src[1] == '\0')
+ src_avail = 2;
+ else if (src[2] == '\0')
+ src_avail = 3;
+ else if (MB_LEN_MAX <= 4 || src[3] == '\0')
+ src_avail = 4;
+ else
+ src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
+
+ /* Parse the next multibyte character. */
+ ret = mbrtowc (destptr, src, src_avail, ps);
+
+ if (ret == (size_t)(-2))
+ /* Encountered a multibyte character that extends past a '\0' byte
+ or that is longer than MB_LEN_MAX bytes. Cannot happen. */
+ abort ();
+
+ if (ret == (size_t)(-1))
+ goto bad_input;
+ if (ret == 0)
+ {
+ src = NULL;
+ /* Here mbsinit (ps). */
+ break;
+ }
+ src += ret;
+ }
+
+ *srcp = src;
+ return destptr - dest;
+ }
+ else
+ {
+ /* Ignore dest and len, don't store *srcp at the end, and
+ don't clobber *ps. */
+ mbstate_t state = *ps;
+ size_t totalcount = 0;
+
+ for (;; totalcount++)
+ {
+ size_t src_avail;
+ size_t ret;
+
+ /* An optimized variant of
+ src_avail = strnlen1 (src, MB_LEN_MAX); */
+ if (src[0] == '\0')
+ src_avail = 1;
+ else if (src[1] == '\0')
+ src_avail = 2;
+ else if (src[2] == '\0')
+ src_avail = 3;
+ else if (MB_LEN_MAX <= 4 || src[3] == '\0')
+ src_avail = 4;
+ else
+ src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
+
+ /* Parse the next multibyte character. */
+ ret = mbrtowc (NULL, src, src_avail, &state);
+
+ if (ret == (size_t)(-2))
+ /* Encountered a multibyte character that extends past a '\0' byte
+ or that is longer than MB_LEN_MAX bytes. Cannot happen. */
+ abort ();
+
+ if (ret == (size_t)(-1))
+ goto bad_input2;
+ if (ret == 0)
+ {
+ /* Here mbsinit (&state). */
+ break;
+ }
+ src += ret;
+ }
+
+ return totalcount;
+ }
+
+ bad_input:
+ *srcp = src;
+ bad_input2:
+ errno = EILSEQ;
+ return (size_t)(-1);
+ }
+}
diff --git a/grub-core/gnulib/memchr.c b/grub-core/gnulib/memchr.c
new file mode 100644
index 0000000..6c2b2d6
--- /dev/null
+++ b/grub-core/gnulib/memchr.c
@@ -0,0 +1,172 @@
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2010
+ Free Software Foundation, Inc.
+
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+ with help from Dan Sahlin (dan@sics.se) and
+ commentary by Jim Blandy (jimb@ai.mit.edu);
+ adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
+ and implemented by Roland McGrath (roland@ai.mit.edu).
+
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or any
+later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#include <stddef.h>
+
+#if defined _LIBC
+# include <memcopy.h>
+#else
+# define reg_char char
+#endif
+
+#include <limits.h>
+
+#if HAVE_BP_SYM_H || defined _LIBC
+# include <bp-sym.h>
+#else
+# define BP_SYM(sym) sym
+#endif
+
+#undef __memchr
+#ifdef _LIBC
+# undef memchr
+#endif
+
+#ifndef weak_alias
+# define __memchr memchr
+#endif
+
+/* Search no more than N bytes of S for C. */
+void *
+__memchr (void const *s, int c_in, size_t n)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c;
+ unsigned reg_char c;
+
+ c = (unsigned char) c_in;
+
+ /* Handle the first few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s;
+ n > 0 && (size_t) char_ptr % sizeof (longword) != 0;
+ --n, ++char_ptr)
+ if (*char_ptr == c)
+ return (void *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c has c in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c = c | (c << 8);
+ repeated_c |= repeated_c << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c |= repeated_c << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c |= repeated_c << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will test a
+ longword at a time. The tricky part is testing if *any of the four*
+ bytes in the longword in question are equal to c. We first use an xor
+ with repeated_c. This reduces the task to testing whether *any of the
+ four* bytes in longword1 is zero.
+
+ We compute tmp =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ So, the test whether any byte in longword1 is zero is equivalent to
+ testing whether tmp is nonzero. */
+
+ while (n >= sizeof (longword))
+ {
+ longword longword1 = *longword_ptr ^ repeated_c;
+
+ if ((((longword1 - repeated_one) & ~longword1)
+ & (repeated_one << 7)) != 0)
+ break;
+ longword_ptr++;
+ n -= sizeof (longword);
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that either n < sizeof (longword), or one of the
+ sizeof (longword) bytes starting at char_ptr is == c. On little-endian
+ machines, we could determine the first such byte without any further
+ memory accesses, just by looking at the tmp result from the last loop
+ iteration. But this does not work on big-endian machines. Choose code
+ that works in both cases. */
+
+ for (; n > 0; --n, ++char_ptr)
+ {
+ if (*char_ptr == c)
+ return (void *) char_ptr;
+ }
+
+ return NULL;
+}
+#ifdef weak_alias
+weak_alias (__memchr, BP_SYM (memchr))
+#endif
diff --git a/grub-core/gnulib/memchr.valgrind b/grub-core/gnulib/memchr.valgrind
new file mode 100644
index 0000000..60f247e
--- /dev/null
+++ b/grub-core/gnulib/memchr.valgrind
@@ -0,0 +1,14 @@
+# Suppress a valgrind message about use of uninitialized memory in memchr().
+# POSIX states that when the character is found, memchr must not read extra
+# bytes in an overestimated length (for example, where memchr is used to
+# implement strnlen). However, we use a safe word read to provide a speedup.
+{
+ memchr-value4
+ Memcheck:Value4
+ fun:rpl_memchr
+}
+{
+ memchr-value8
+ Memcheck:Value8
+ fun:rpl_memchr
+}
diff --git a/grub-core/gnulib/mempcpy.c b/grub-core/gnulib/mempcpy.c
new file mode 100644
index 0000000..b624d69
--- /dev/null
+++ b/grub-core/gnulib/mempcpy.c
@@ -0,0 +1,29 @@
+/* Copy memory area and return pointer after last written byte.
+ Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+ last written byte. */
+void *
+mempcpy (void *dest, const void *src, size_t n)
+{
+ return (char *) memcpy (dest, src, n) + n;
+}
diff --git a/grub-core/gnulib/nl_langinfo.c b/grub-core/gnulib/nl_langinfo.c
new file mode 100644
index 0000000..a3d0d11
--- /dev/null
+++ b/grub-core/gnulib/nl_langinfo.c
@@ -0,0 +1,270 @@
+/* nl_langinfo() replacement: query locale dependent information.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <langinfo.h>
+
+#if REPLACE_NL_LANGINFO
+
+/* Override nl_langinfo with support for added nl_item values. */
+
+# include <locale.h>
+# include <string.h>
+
+# undef nl_langinfo
+
+char *
+rpl_nl_langinfo (nl_item item)
+{
+ switch (item)
+ {
+# if GNULIB_defined_CODESET
+ case CODESET:
+ {
+ const char *locale;
+ static char buf[2 + 10 + 1];
+
+ locale = setlocale (LC_CTYPE, NULL);
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return
+ it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+ }
+ return "";
+ }
+# endif
+# if GNULIB_defined_T_FMT_AMPM
+ case T_FMT_AMPM:
+ return "%I:%M:%S %p";
+# endif
+# if GNULIB_defined_ERA
+ case ERA:
+ /* The format is not standardized. In glibc it is a sequence of strings
+ of the form "direction:offset:start_date:end_date:era_name:era_format"
+ with an empty string at the end. */
+ return "";
+ case ERA_D_FMT:
+ /* The %Ex conversion in strftime behaves like %x if the locale does not
+ have an alternative time format. */
+ item = D_FMT;
+ break;
+ case ERA_D_T_FMT:
+ /* The %Ec conversion in strftime behaves like %c if the locale does not
+ have an alternative time format. */
+ item = D_T_FMT;
+ break;
+ case ERA_T_FMT:
+ /* The %EX conversion in strftime behaves like %X if the locale does not
+ have an alternative time format. */
+ item = T_FMT;
+ break;
+ case ALT_DIGITS:
+ /* The format is not standardized. In glibc it is a sequence of 10
+ strings, appended in memory. */
+ return "\0\0\0\0\0\0\0\0\0\0";
+# endif
+# if GNULIB_defined_YESEXPR
+ case YESEXPR:
+ return "^[yY]";
+ case NOEXPR:
+ return "^[nN]";
+# endif
+ default:
+ break;
+ }
+ return nl_langinfo (item);
+}
+
+#else
+
+/* Provide nl_langinfo from scratch. */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Native Windows platforms. */
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# include <stdio.h>
+
+# else
+
+/* An old Unix platform without locales, such as Linux libc5 or BeOS. */
+
+# endif
+
+# include <locale.h>
+
+char *
+nl_langinfo (nl_item item)
+{
+ switch (item)
+ {
+ /* nl_langinfo items of the LC_CTYPE category */
+ case CODESET:
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ {
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number. */
+ sprintf (buf, "CP%u", GetACP ());
+ return buf;
+ }
+# elif defined __BEOS__
+ return "UTF-8";
+# else
+ return "ISO-8859-1";
+# endif
+ /* nl_langinfo items of the LC_NUMERIC category */
+ case RADIXCHAR:
+ return localeconv () ->decimal_point;
+ case THOUSEP:
+ return localeconv () ->thousands_sep;
+ /* nl_langinfo items of the LC_TIME category.
+ TODO: Really use the locale. */
+ case D_T_FMT:
+ case ERA_D_T_FMT:
+ return "%a %b %e %H:%M:%S %Y";
+ case D_FMT:
+ case ERA_D_FMT:
+ return "%m/%d/%y";
+ case T_FMT:
+ case ERA_T_FMT:
+ return "%H:%M:%S";
+ case T_FMT_AMPM:
+ return "%I:%M:%S %p";
+ case AM_STR:
+ return "AM";
+ case PM_STR:
+ return "PM";
+ case DAY_1:
+ return "Sunday";
+ case DAY_2:
+ return "Monday";
+ case DAY_3:
+ return "Tuesday";
+ case DAY_4:
+ return "Wednesday";
+ case DAY_5:
+ return "Thursday";
+ case DAY_6:
+ return "Friday";
+ case DAY_7:
+ return "Saturday";
+ case ABDAY_1:
+ return "Sun";
+ case ABDAY_2:
+ return "Mon";
+ case ABDAY_3:
+ return "Tue";
+ case ABDAY_4:
+ return "Wed";
+ case ABDAY_5:
+ return "Thu";
+ case ABDAY_6:
+ return "Fri";
+ case ABDAY_7:
+ return "Sat";
+ case MON_1:
+ return "January";
+ case MON_2:
+ return "February";
+ case MON_3:
+ return "March";
+ case MON_4:
+ return "April";
+ case MON_5:
+ return "May";
+ case MON_6:
+ return "June";
+ case MON_7:
+ return "July";
+ case MON_8:
+ return "August";
+ case MON_9:
+ return "September";
+ case MON_10:
+ return "October";
+ case MON_11:
+ return "November";
+ case MON_12:
+ return "December";
+ case ABMON_1:
+ return "Jan";
+ case ABMON_2:
+ return "Feb";
+ case ABMON_3:
+ return "Mar";
+ case ABMON_4:
+ return "Apr";
+ case ABMON_5:
+ return "May";
+ case ABMON_6:
+ return "Jun";
+ case ABMON_7:
+ return "Jul";
+ case ABMON_8:
+ return "Aug";
+ case ABMON_9:
+ return "Sep";
+ case ABMON_10:
+ return "Oct";
+ case ABMON_11:
+ return "Nov";
+ case ABMON_12:
+ return "Dec";
+ case ERA:
+ return "";
+ case ALT_DIGITS:
+ return "\0\0\0\0\0\0\0\0\0\0";
+ /* nl_langinfo items of the LC_MONETARY category
+ TODO: Really use the locale. */
+ case CRNCYSTR:
+ return "-";
+ /* nl_langinfo items of the LC_MESSAGES category
+ TODO: Really use the locale. */
+ case YESEXPR:
+ return "^[yY]";
+ case NOEXPR:
+ return "^[nN]";
+ default:
+ return "";
+ }
+}
+
+#endif
diff --git a/grub-core/gnulib/printf-args.c b/grub-core/gnulib/printf-args.c
new file mode 100644
index 0000000..46c03a2
--- /dev/null
+++ b/grub-core/gnulib/printf-args.c
@@ -0,0 +1,188 @@
+/* Decomposed printf argument list.
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This file can be parametrized with the following macros:
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
+ PRINTF_FETCHARGS Name of the function to be defined.
+ STATIC Set to 'static' to declare the function static. */
+
+#ifndef PRINTF_FETCHARGS
+# include <config.h>
+#endif
+
+/* Specification. */
+#ifndef PRINTF_FETCHARGS
+# include "printf-args.h"
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_FETCHARGS (va_list args, arguments *a)
+{
+ size_t i;
+ argument *ap;
+
+ for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
+ switch (ap->type)
+ {
+ case TYPE_SCHAR:
+ ap->a.a_schar = va_arg (args, /*signed char*/ int);
+ break;
+ case TYPE_UCHAR:
+ ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
+ break;
+ case TYPE_SHORT:
+ ap->a.a_short = va_arg (args, /*short*/ int);
+ break;
+ case TYPE_USHORT:
+ ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
+ break;
+ case TYPE_INT:
+ ap->a.a_int = va_arg (args, int);
+ break;
+ case TYPE_UINT:
+ ap->a.a_uint = va_arg (args, unsigned int);
+ break;
+ case TYPE_LONGINT:
+ ap->a.a_longint = va_arg (args, long int);
+ break;
+ case TYPE_ULONGINT:
+ ap->a.a_ulongint = va_arg (args, unsigned long int);
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_LONGLONGINT:
+ ap->a.a_longlongint = va_arg (args, long long int);
+ break;
+ case TYPE_ULONGLONGINT:
+ ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
+ break;
+#endif
+ case TYPE_DOUBLE:
+ ap->a.a_double = va_arg (args, double);
+ break;
+ case TYPE_LONGDOUBLE:
+ ap->a.a_longdouble = va_arg (args, long double);
+ break;
+ case TYPE_CHAR:
+ ap->a.a_char = va_arg (args, int);
+ break;
+#if HAVE_WINT_T
+ case TYPE_WIDE_CHAR:
+ /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
+ default argument promotions", this is not the case in mingw32,
+ where wint_t is 'unsigned short'. */
+ ap->a.a_wide_char =
+ (sizeof (wint_t) < sizeof (int)
+ ? (wint_t) va_arg (args, int)
+ : va_arg (args, wint_t));
+ break;
+#endif
+ case TYPE_STRING:
+ ap->a.a_string = va_arg (args, const char *);
+ /* A null pointer is an invalid argument for "%s", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_string == NULL)
+ ap->a.a_string = "(NULL)";
+ break;
+#if HAVE_WCHAR_T
+ case TYPE_WIDE_STRING:
+ ap->a.a_wide_string = va_arg (args, const wchar_t *);
+ /* A null pointer is an invalid argument for "%ls", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_wide_string == NULL)
+ {
+ static const wchar_t wide_null_string[] =
+ {
+ (wchar_t)'(',
+ (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',
+ (wchar_t)')',
+ (wchar_t)0
+ };
+ ap->a.a_wide_string = wide_null_string;
+ }
+ break;
+#endif
+ case TYPE_POINTER:
+ ap->a.a_pointer = va_arg (args, void *);
+ break;
+ case TYPE_COUNT_SCHAR_POINTER:
+ ap->a.a_count_schar_pointer = va_arg (args, signed char *);
+ break;
+ case TYPE_COUNT_SHORT_POINTER:
+ ap->a.a_count_short_pointer = va_arg (args, short *);
+ break;
+ case TYPE_COUNT_INT_POINTER:
+ ap->a.a_count_int_pointer = va_arg (args, int *);
+ break;
+ case TYPE_COUNT_LONGINT_POINTER:
+ ap->a.a_count_longint_pointer = va_arg (args, long int *);
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_COUNT_LONGLONGINT_POINTER:
+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
+ break;
+#endif
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ case TYPE_U8_STRING:
+ ap->a.a_u8_string = va_arg (args, const uint8_t *);
+ /* A null pointer is an invalid argument for "%U", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_u8_string == NULL)
+ {
+ static const uint8_t u8_null_string[] =
+ { '(', 'N', 'U', 'L', 'L', ')', 0 };
+ ap->a.a_u8_string = u8_null_string;
+ }
+ break;
+ case TYPE_U16_STRING:
+ ap->a.a_u16_string = va_arg (args, const uint16_t *);
+ /* A null pointer is an invalid argument for "%lU", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_u16_string == NULL)
+ {
+ static const uint16_t u16_null_string[] =
+ { '(', 'N', 'U', 'L', 'L', ')', 0 };
+ ap->a.a_u16_string = u16_null_string;
+ }
+ break;
+ case TYPE_U32_STRING:
+ ap->a.a_u32_string = va_arg (args, const uint32_t *);
+ /* A null pointer is an invalid argument for "%llU", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_u32_string == NULL)
+ {
+ static const uint32_t u32_null_string[] =
+ { '(', 'N', 'U', 'L', 'L', ')', 0 };
+ ap->a.a_u32_string = u32_null_string;
+ }
+ break;
+#endif
+ default:
+ /* Unknown type. */
+ return -1;
+ }
+ return 0;
+}
diff --git a/grub-core/gnulib/printf-args.h b/grub-core/gnulib/printf-args.h
new file mode 100644
index 0000000..2536eba
--- /dev/null
+++ b/grub-core/gnulib/printf-args.h
@@ -0,0 +1,155 @@
+/* Decomposed printf argument list.
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _PRINTF_ARGS_H
+#define _PRINTF_ARGS_H
+
+/* This file can be parametrized with the following macros:
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
+ PRINTF_FETCHARGS Name of the function to be declared.
+ STATIC Set to 'static' to declare the function static. */
+
+/* Default parameters. */
+#ifndef PRINTF_FETCHARGS
+# define PRINTF_FETCHARGS printf_fetchargs
+#endif
+
+/* Get size_t. */
+#include <stddef.h>
+
+/* Get wchar_t. */
+#if HAVE_WCHAR_T
+# include <stddef.h>
+#endif
+
+/* Get wint_t. */
+#if HAVE_WINT_T
+# include <wchar.h>
+#endif
+
+/* Get va_list. */
+#include <stdarg.h>
+
+
+/* Argument types */
+typedef enum
+{
+ TYPE_NONE,
+ TYPE_SCHAR,
+ TYPE_UCHAR,
+ TYPE_SHORT,
+ TYPE_USHORT,
+ TYPE_INT,
+ TYPE_UINT,
+ TYPE_LONGINT,
+ TYPE_ULONGINT,
+#if HAVE_LONG_LONG_INT
+ TYPE_LONGLONGINT,
+ TYPE_ULONGLONGINT,
+#endif
+ TYPE_DOUBLE,
+ TYPE_LONGDOUBLE,
+ TYPE_CHAR,
+#if HAVE_WINT_T
+ TYPE_WIDE_CHAR,
+#endif
+ TYPE_STRING,
+#if HAVE_WCHAR_T
+ TYPE_WIDE_STRING,
+#endif
+ TYPE_POINTER,
+ TYPE_COUNT_SCHAR_POINTER,
+ TYPE_COUNT_SHORT_POINTER,
+ TYPE_COUNT_INT_POINTER,
+ TYPE_COUNT_LONGINT_POINTER
+#if HAVE_LONG_LONG_INT
+, TYPE_COUNT_LONGLONGINT_POINTER
+#endif
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+, TYPE_U8_STRING
+, TYPE_U16_STRING
+, TYPE_U32_STRING
+#endif
+} arg_type;
+
+/* Polymorphic argument */
+typedef struct
+{
+ arg_type type;
+ union
+ {
+ signed char a_schar;
+ unsigned char a_uchar;
+ short a_short;
+ unsigned short a_ushort;
+ int a_int;
+ unsigned int a_uint;
+ long int a_longint;
+ unsigned long int a_ulongint;
+#if HAVE_LONG_LONG_INT
+ long long int a_longlongint;
+ unsigned long long int a_ulonglongint;
+#endif
+ float a_float;
+ double a_double;
+ long double a_longdouble;
+ int a_char;
+#if HAVE_WINT_T
+ wint_t a_wide_char;
+#endif
+ const char* a_string;
+#if HAVE_WCHAR_T
+ const wchar_t* a_wide_string;
+#endif
+ void* a_pointer;
+ signed char * a_count_schar_pointer;
+ short * a_count_short_pointer;
+ int * a_count_int_pointer;
+ long int * a_count_longint_pointer;
+#if HAVE_LONG_LONG_INT
+ long long int * a_count_longlongint_pointer;
+#endif
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ const uint8_t * a_u8_string;
+ const uint16_t * a_u16_string;
+ const uint32_t * a_u32_string;
+#endif
+ }
+ a;
+}
+argument;
+
+typedef struct
+{
+ size_t count;
+ argument *arg;
+}
+arguments;
+
+
+/* Fetch the arguments, putting them into a. */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int PRINTF_FETCHARGS (va_list args, arguments *a);
+
+#endif /* _PRINTF_ARGS_H */
diff --git a/grub-core/gnulib/printf-parse.c b/grub-core/gnulib/printf-parse.c
new file mode 100644
index 0000000..f612beb
--- /dev/null
+++ b/grub-core/gnulib/printf-parse.c
@@ -0,0 +1,627 @@
+/* Formatted output to strings.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This file can be parametrized with the following macros:
+ CHAR_T The element type of the format string.
+ CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters
+ in the format string are ASCII.
+ DIRECTIVE Structure denoting a format directive.
+ Depends on CHAR_T.
+ DIRECTIVES Structure denoting the set of format directives of a
+ format string. Depends on CHAR_T.
+ PRINTF_PARSE Function that parses a format string.
+ Depends on CHAR_T.
+ STATIC Set to 'static' to declare the function static.
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */
+
+#ifndef PRINTF_PARSE
+# include <config.h>
+#endif
+
+/* Specification. */
+#ifndef PRINTF_PARSE
+# include "printf-parse.h"
+#endif
+
+/* Default parameters. */
+#ifndef PRINTF_PARSE
+# define PRINTF_PARSE printf_parse
+# define CHAR_T char
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+#endif
+
+/* Get size_t, NULL. */
+#include <stddef.h>
+
+/* Get intmax_t. */
+#if defined IN_LIBINTL || defined IN_LIBASPRINTF
+# if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+# endif
+# if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+# endif
+#else
+# include <stdint.h>
+#endif
+
+/* malloc(), realloc(), free(). */
+#include <stdlib.h>
+
+/* errno. */
+#include <errno.h>
+
+/* Checked size_t computations. */
+#include "xsize.h"
+
+#if CHAR_T_ONLY_ASCII
+/* c_isascii(). */
+# include "c-ctype.h"
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
+{
+ const CHAR_T *cp = format; /* pointer into format */
+ size_t arg_posn = 0; /* number of regular arguments consumed */
+ size_t d_allocated; /* allocated elements of d->dir */
+ size_t a_allocated; /* allocated elements of a->arg */
+ size_t max_width_length = 0;
+ size_t max_precision_length = 0;
+
+ d->count = 0;
+ d_allocated = 1;
+ d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE));
+ if (d->dir == NULL)
+ /* Out of memory. */
+ goto out_of_memory_1;
+
+ a->count = 0;
+ a_allocated = 0;
+ a->arg = NULL;
+
+#define REGISTER_ARG(_index_,_type_) \
+ { \
+ size_t n = (_index_); \
+ if (n >= a_allocated) \
+ { \
+ size_t memory_size; \
+ argument *memory; \
+ \
+ a_allocated = xtimes (a_allocated, 2); \
+ if (a_allocated <= n) \
+ a_allocated = xsum (n, 1); \
+ memory_size = xtimes (a_allocated, sizeof (argument)); \
+ if (size_overflow_p (memory_size)) \
+ /* Overflow, would lead to out of memory. */ \
+ goto out_of_memory; \
+ memory = (argument *) (a->arg \
+ ? realloc (a->arg, memory_size) \
+ : malloc (memory_size)); \
+ if (memory == NULL) \
+ /* Out of memory. */ \
+ goto out_of_memory; \
+ a->arg = memory; \
+ } \
+ while (a->count <= n) \
+ a->arg[a->count++].type = TYPE_NONE; \
+ if (a->arg[n].type == TYPE_NONE) \
+ a->arg[n].type = (_type_); \
+ else if (a->arg[n].type != (_type_)) \
+ /* Ambiguous type for positional argument. */ \
+ goto error; \
+ }
+
+ while (*cp != '\0')
+ {
+ CHAR_T c = *cp++;
+ if (c == '%')
+ {
+ size_t arg_index = ARG_NONE;
+ DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */
+
+ /* Initialize the next directive. */
+ dp->dir_start = cp - 1;
+ dp->flags = 0;
+ dp->width_start = NULL;
+ dp->width_end = NULL;
+ dp->width_arg_index = ARG_NONE;
+ dp->precision_start = NULL;
+ dp->precision_end = NULL;
+ dp->precision_arg_index = ARG_NONE;
+ dp->arg_index = ARG_NONE;
+
+ /* Test for positional argument. */
+ if (*cp >= '0' && *cp <= '9')
+ {
+ const CHAR_T *np;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ ;
+ if (*np == '$')
+ {
+ size_t n = 0;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ n = xsum (xtimes (n, 10), *np - '0');
+ if (n == 0)
+ /* Positional argument 0. */
+ goto error;
+ if (size_overflow_p (n))
+ /* n too large, would lead to out of memory later. */
+ goto error;
+ arg_index = n - 1;
+ cp = np + 1;
+ }
+ }
+
+ /* Read the flags. */
+ for (;;)
+ {
+ if (*cp == '\'')
+ {
+ dp->flags |= FLAG_GROUP;
+ cp++;
+ }
+ else if (*cp == '-')
+ {
+ dp->flags |= FLAG_LEFT;
+ cp++;
+ }
+ else if (*cp == '+')
+ {
+ dp->flags |= FLAG_SHOWSIGN;
+ cp++;
+ }
+ else if (*cp == ' ')
+ {
+ dp->flags |= FLAG_SPACE;
+ cp++;
+ }
+ else if (*cp == '#')
+ {
+ dp->flags |= FLAG_ALT;
+ cp++;
+ }
+ else if (*cp == '0')
+ {
+ dp->flags |= FLAG_ZERO;
+ cp++;
+ }
+ else
+ break;
+ }
+
+ /* Parse the field width. */
+ if (*cp == '*')
+ {
+ dp->width_start = cp;
+ cp++;
+ dp->width_end = cp;
+ if (max_width_length < 1)
+ max_width_length = 1;
+
+ /* Test for positional argument. */
+ if (*cp >= '0' && *cp <= '9')
+ {
+ const CHAR_T *np;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ ;
+ if (*np == '$')
+ {
+ size_t n = 0;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ n = xsum (xtimes (n, 10), *np - '0');
+ if (n == 0)
+ /* Positional argument 0. */
+ goto error;
+ if (size_overflow_p (n))
+ /* n too large, would lead to out of memory later. */
+ goto error;
+ dp->width_arg_index = n - 1;
+ cp = np + 1;
+ }
+ }
+ if (dp->width_arg_index == ARG_NONE)
+ {
+ dp->width_arg_index = arg_posn++;
+ if (dp->width_arg_index == ARG_NONE)
+ /* arg_posn wrapped around. */
+ goto error;
+ }
+ REGISTER_ARG (dp->width_arg_index, TYPE_INT);
+ }
+ else if (*cp >= '0' && *cp <= '9')
+ {
+ size_t width_length;
+
+ dp->width_start = cp;
+ for (; *cp >= '0' && *cp <= '9'; cp++)
+ ;
+ dp->width_end = cp;
+ width_length = dp->width_end - dp->width_start;
+ if (max_width_length < width_length)
+ max_width_length = width_length;
+ }
+
+ /* Parse the precision. */
+ if (*cp == '.')
+ {
+ cp++;
+ if (*cp == '*')
+ {
+ dp->precision_start = cp - 1;
+ cp++;
+ dp->precision_end = cp;
+ if (max_precision_length < 2)
+ max_precision_length = 2;
+
+ /* Test for positional argument. */
+ if (*cp >= '0' && *cp <= '9')
+ {
+ const CHAR_T *np;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ ;
+ if (*np == '$')
+ {
+ size_t n = 0;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ n = xsum (xtimes (n, 10), *np - '0');
+ if (n == 0)
+ /* Positional argument 0. */
+ goto error;
+ if (size_overflow_p (n))
+ /* n too large, would lead to out of memory
+ later. */
+ goto error;
+ dp->precision_arg_index = n - 1;
+ cp = np + 1;
+ }
+ }
+ if (dp->precision_arg_index == ARG_NONE)
+ {
+ dp->precision_arg_index = arg_posn++;
+ if (dp->precision_arg_index == ARG_NONE)
+ /* arg_posn wrapped around. */
+ goto error;
+ }
+ REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
+ }
+ else
+ {
+ size_t precision_length;
+
+ dp->precision_start = cp - 1;
+ for (; *cp >= '0' && *cp <= '9'; cp++)
+ ;
+ dp->precision_end = cp;
+ precision_length = dp->precision_end - dp->precision_start;
+ if (max_precision_length < precision_length)
+ max_precision_length = precision_length;
+ }
+ }
+
+ {
+ arg_type type;
+
+ /* Parse argument type/size specifiers. */
+ {
+ int flags = 0;
+
+ for (;;)
+ {
+ if (*cp == 'h')
+ {
+ flags |= (1 << (flags & 1));
+ cp++;
+ }
+ else if (*cp == 'L')
+ {
+ flags |= 4;
+ cp++;
+ }
+ else if (*cp == 'l')
+ {
+ flags += 8;
+ cp++;
+ }
+ else if (*cp == 'j')
+ {
+ if (sizeof (intmax_t) > sizeof (long))
+ {
+ /* intmax_t = long long */
+ flags += 16;
+ }
+ else if (sizeof (intmax_t) > sizeof (int))
+ {
+ /* intmax_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+ else if (*cp == 'z' || *cp == 'Z')
+ {
+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+ because the warning facility in gcc-2.95.2 understands
+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
+ if (sizeof (size_t) > sizeof (long))
+ {
+ /* size_t = long long */
+ flags += 16;
+ }
+ else if (sizeof (size_t) > sizeof (int))
+ {
+ /* size_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+ else if (*cp == 't')
+ {
+ if (sizeof (ptrdiff_t) > sizeof (long))
+ {
+ /* ptrdiff_t = long long */
+ flags += 16;
+ }
+ else if (sizeof (ptrdiff_t) > sizeof (int))
+ {
+ /* ptrdiff_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+#if defined __APPLE__ && defined __MACH__
+ /* On MacOS X 10.3, PRIdMAX is defined as "qd".
+ We cannot change it to "lld" because PRIdMAX must also
+ be understood by the system's printf routines. */
+ else if (*cp == 'q')
+ {
+ if (64 / 8 > sizeof (long))
+ {
+ /* int64_t = long long */
+ flags += 16;
+ }
+ else
+ {
+ /* int64_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+#endif
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Win32, PRIdMAX is defined as "I64d".
+ We cannot change it to "lld" because PRIdMAX must also
+ be understood by the system's printf routines. */
+ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
+ {
+ if (64 / 8 > sizeof (long))
+ {
+ /* __int64 = long long */
+ flags += 16;
+ }
+ else
+ {
+ /* __int64 = long */
+ flags += 8;
+ }
+ cp += 3;
+ }
+#endif
+ else
+ break;
+ }
+
+ /* Read the conversion character. */
+ c = *cp++;
+ switch (c)
+ {
+ case 'd': case 'i':
+#if HAVE_LONG_LONG_INT
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_LONGLONGINT;
+ else
+#endif
+ /* If 'long long' exists and is the same as 'long', we parse
+ "lld" into TYPE_LONGINT. */
+ if (flags >= 8)
+ type = TYPE_LONGINT;
+ else if (flags & 2)
+ type = TYPE_SCHAR;
+ else if (flags & 1)
+ type = TYPE_SHORT;
+ else
+ type = TYPE_INT;
+ break;
+ case 'o': case 'u': case 'x': case 'X':
+#if HAVE_LONG_LONG_INT
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_ULONGLONGINT;
+ else
+#endif
+ /* If 'unsigned long long' exists and is the same as
+ 'unsigned long', we parse "llu" into TYPE_ULONGINT. */
+ if (flags >= 8)
+ type = TYPE_ULONGINT;
+ else if (flags & 2)
+ type = TYPE_UCHAR;
+ else if (flags & 1)
+ type = TYPE_USHORT;
+ else
+ type = TYPE_UINT;
+ break;
+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+ case 'a': case 'A':
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_LONGDOUBLE;
+ else
+ type = TYPE_DOUBLE;
+ break;
+ case 'c':
+ if (flags >= 8)
+#if HAVE_WINT_T
+ type = TYPE_WIDE_CHAR;
+#else
+ goto error;
+#endif
+ else
+ type = TYPE_CHAR;
+ break;
+#if HAVE_WINT_T
+ case 'C':
+ type = TYPE_WIDE_CHAR;
+ c = 'c';
+ break;
+#endif
+ case 's':
+ if (flags >= 8)
+#if HAVE_WCHAR_T
+ type = TYPE_WIDE_STRING;
+#else
+ goto error;
+#endif
+ else
+ type = TYPE_STRING;
+ break;
+#if HAVE_WCHAR_T
+ case 'S':
+ type = TYPE_WIDE_STRING;
+ c = 's';
+ break;
+#endif
+ case 'p':
+ type = TYPE_POINTER;
+ break;
+ case 'n':
+#if HAVE_LONG_LONG_INT
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_COUNT_LONGLONGINT_POINTER;
+ else
+#endif
+ /* If 'long long' exists and is the same as 'long', we parse
+ "lln" into TYPE_COUNT_LONGINT_POINTER. */
+ if (flags >= 8)
+ type = TYPE_COUNT_LONGINT_POINTER;
+ else if (flags & 2)
+ type = TYPE_COUNT_SCHAR_POINTER;
+ else if (flags & 1)
+ type = TYPE_COUNT_SHORT_POINTER;
+ else
+ type = TYPE_COUNT_INT_POINTER;
+ break;
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ case 'U':
+ if (flags >= 16)
+ type = TYPE_U32_STRING;
+ else if (flags >= 8)
+ type = TYPE_U16_STRING;
+ else
+ type = TYPE_U8_STRING;
+ break;
+#endif
+ case '%':
+ type = TYPE_NONE;
+ break;
+ default:
+ /* Unknown conversion character. */
+ goto error;
+ }
+ }
+
+ if (type != TYPE_NONE)
+ {
+ dp->arg_index = arg_index;
+ if (dp->arg_index == ARG_NONE)
+ {
+ dp->arg_index = arg_posn++;
+ if (dp->arg_index == ARG_NONE)
+ /* arg_posn wrapped around. */
+ goto error;
+ }
+ REGISTER_ARG (dp->arg_index, type);
+ }
+ dp->conversion = c;
+ dp->dir_end = cp;
+ }
+
+ d->count++;
+ if (d->count >= d_allocated)
+ {
+ size_t memory_size;
+ DIRECTIVE *memory;
+
+ d_allocated = xtimes (d_allocated, 2);
+ memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
+ if (size_overflow_p (memory_size))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ memory = (DIRECTIVE *) realloc (d->dir, memory_size);
+ if (memory == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ d->dir = memory;
+ }
+ }
+#if CHAR_T_ONLY_ASCII
+ else if (!c_isascii (c))
+ {
+ /* Non-ASCII character. Not supported. */
+ goto error;
+ }
+#endif
+ }
+ d->dir[d->count].dir_start = cp;
+
+ d->max_width_length = max_width_length;
+ d->max_precision_length = max_precision_length;
+ return 0;
+
+error:
+ if (a->arg)
+ free (a->arg);
+ if (d->dir)
+ free (d->dir);
+ errno = EINVAL;
+ return -1;
+
+out_of_memory:
+ if (a->arg)
+ free (a->arg);
+ if (d->dir)
+ free (d->dir);
+out_of_memory_1:
+ errno = ENOMEM;
+ return -1;
+}
+
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef CHAR_T_ONLY_ASCII
+#undef CHAR_T
diff --git a/grub-core/gnulib/printf-parse.h b/grub-core/gnulib/printf-parse.h
new file mode 100644
index 0000000..0f2b708
--- /dev/null
+++ b/grub-core/gnulib/printf-parse.h
@@ -0,0 +1,180 @@
+/* Parse printf format string.
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _PRINTF_PARSE_H
+#define _PRINTF_PARSE_H
+
+/* This file can be parametrized with the following macros:
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
+ STATIC Set to 'static' to declare the function static. */
+
+#include "printf-args.h"
+
+
+/* Flags */
+#define FLAG_GROUP 1 /* ' flag */
+#define FLAG_LEFT 2 /* - flag */
+#define FLAG_SHOWSIGN 4 /* + flag */
+#define FLAG_SPACE 8 /* space flag */
+#define FLAG_ALT 16 /* # flag */
+#define FLAG_ZERO 32
+
+/* arg_index value indicating that no argument is consumed. */
+#define ARG_NONE (~(size_t)0)
+
+/* xxx_directive: A parsed directive.
+ xxx_directives: A parsed format string. */
+
+/* A parsed directive. */
+typedef struct
+{
+ const char* dir_start;
+ const char* dir_end;
+ int flags;
+ const char* width_start;
+ const char* width_end;
+ size_t width_arg_index;
+ const char* precision_start;
+ const char* precision_end;
+ size_t precision_arg_index;
+ char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+char_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ char_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+char_directives;
+
+#if ENABLE_UNISTDIO
+
+/* A parsed directive. */
+typedef struct
+{
+ const uint8_t* dir_start;
+ const uint8_t* dir_end;
+ int flags;
+ const uint8_t* width_start;
+ const uint8_t* width_end;
+ size_t width_arg_index;
+ const uint8_t* precision_start;
+ const uint8_t* precision_end;
+ size_t precision_arg_index;
+ uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+u8_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ u8_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+u8_directives;
+
+/* A parsed directive. */
+typedef struct
+{
+ const uint16_t* dir_start;
+ const uint16_t* dir_end;
+ int flags;
+ const uint16_t* width_start;
+ const uint16_t* width_end;
+ size_t width_arg_index;
+ const uint16_t* precision_start;
+ const uint16_t* precision_end;
+ size_t precision_arg_index;
+ uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+u16_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ u16_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+u16_directives;
+
+/* A parsed directive. */
+typedef struct
+{
+ const uint32_t* dir_start;
+ const uint32_t* dir_end;
+ int flags;
+ const uint32_t* width_start;
+ const uint32_t* width_end;
+ size_t width_arg_index;
+ const uint32_t* precision_start;
+ const uint32_t* precision_end;
+ size_t precision_arg_index;
+ uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+u32_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ u32_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+u32_directives;
+
+#endif
+
+
+/* Parses the format string. Fills in the number N of directives, and fills
+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
+ to the end of the format string. Also fills in the arg_type fields of the
+ arguments and the needed count of arguments. */
+#if ENABLE_UNISTDIO
+extern int
+ ulc_printf_parse (const char *format, char_directives *d, arguments *a);
+extern int
+ u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a);
+extern int
+ u16_printf_parse (const uint16_t *format, u16_directives *d,
+ arguments *a);
+extern int
+ u32_printf_parse (const uint32_t *format, u32_directives *d,
+ arguments *a);
+#else
+# ifdef STATIC
+STATIC
+# else
+extern
+# endif
+int printf_parse (const char *format, char_directives *d, arguments *a);
+#endif
+
+#endif /* _PRINTF_PARSE_H */
diff --git a/grub-core/gnulib/progname.c b/grub-core/gnulib/progname.c
new file mode 100644
index 0000000..1415e6a
--- /dev/null
+++ b/grub-core/gnulib/progname.c
@@ -0,0 +1,92 @@
+/* Program name management.
+ Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+/* Specification. */
+#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */
+#include "progname.h"
+
+#include <errno.h> /* get program_invocation_name declaration */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+/* String containing name the program is called with.
+ To be initialized by main(). */
+const char *program_name = NULL;
+
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
+void
+set_program_name (const char *argv0)
+{
+ /* libtool creates a temporary executable whose name is sometimes prefixed
+ with "lt-" (depends on the platform). It also makes argv[0] absolute.
+ But the name of the temporary executable is a detail that should not be
+ visible to the end user and to the test suite.
+ Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */
+ const char *slash;
+ const char *base;
+
+ /* Sanity check. POSIX requires the invoking process to pass a non-NULL
+ argv[0]. */
+ if (argv0 == NULL)
+ {
+ /* It's a bug in the invoking program. Help diagnosing it. */
+ fputs ("A NULL argv[0] was passed through an exec system call.\n",
+ stderr);
+ abort ();
+ }
+
+ slash = strrchr (argv0, '/');
+ base = (slash != NULL ? slash + 1 : argv0);
+ if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
+ {
+ argv0 = base;
+ if (strncmp (base, "lt-", 3) == 0)
+ {
+ argv0 = base + 3;
+ /* On glibc systems, remove the "lt-" prefix from the variable
+ program_invocation_short_name. */
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ program_invocation_short_name = (char *) argv0;
+#endif
+ }
+ }
+
+ /* But don't strip off a leading <dirname>/ in general, because when the user
+ runs
+ /some/hidden/place/bin/cp foo foo
+ he should get the error message
+ /some/hidden/place/bin/cp: `foo' and `foo' are the same file
+ not
+ cp: `foo' and `foo' are the same file
+ */
+
+ program_name = argv0;
+
+ /* On glibc systems, the error() function comes from libc and uses the
+ variable program_invocation_name, not program_name. So set this variable
+ as well. */
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
+ program_invocation_name = (char *) argv0;
+#endif
+}
diff --git a/grub-core/gnulib/progname.h b/grub-core/gnulib/progname.h
new file mode 100644
index 0000000..5ba303b
--- /dev/null
+++ b/grub-core/gnulib/progname.h
@@ -0,0 +1,62 @@
+/* Program name management.
+ Copyright (C) 2001-2004, 2006, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _PROGNAME_H
+#define _PROGNAME_H
+
+/* Programs using this file should do the following in main():
+ set_program_name (argv[0]);
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* String containing name the program is called with. */
+extern const char *program_name;
+
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
+extern void set_program_name (const char *argv0);
+
+#if ENABLE_RELOCATABLE
+
+/* Set program_name, based on argv[0], and original installation prefix and
+ directory, for relocatability. */
+extern void set_program_name_and_installdir (const char *argv0,
+ const char *orig_installprefix,
+ const char *orig_installdir);
+#undef set_program_name
+#define set_program_name(ARG0) \
+ set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
+
+/* Return the full pathname of the current executable, based on the earlier
+ call to set_program_name_and_installdir. Return NULL if unknown. */
+extern char *get_full_program_name (void);
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PROGNAME_H */
diff --git a/grub-core/gnulib/rawmemchr.c b/grub-core/gnulib/rawmemchr.c
new file mode 100644
index 0000000..0a88777
--- /dev/null
+++ b/grub-core/gnulib/rawmemchr.c
@@ -0,0 +1,136 @@
+/* Searching in a string.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+/* Find the first occurrence of C in S. */
+void *
+rawmemchr (const void *s, int c_in)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c;
+ unsigned char c;
+
+ c = (unsigned char) c_in;
+
+ /* Handle the first few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s;
+ (size_t) char_ptr % sizeof (longword) != 0;
+ ++char_ptr)
+ if (*char_ptr == c)
+ return (void *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c has c in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c = c | (c << 8);
+ repeated_c |= repeated_c << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c |= repeated_c << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c |= repeated_c << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will
+ test a longword at a time. The tricky part is testing if *any of
+ the four* bytes in the longword in question are equal to NUL or
+ c. We first use an xor with repeated_c. This reduces the task
+ to testing whether *any of the four* bytes in longword1 is zero.
+
+ We compute tmp =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ The test whether any byte in longword1 is zero is equivalent
+ to testing whether tmp is nonzero.
+
+ This test can read beyond the end of a string, depending on where
+ C_IN is encountered. However, this is considered safe since the
+ initialization phase ensured that the read will be aligned,
+ therefore, the read will not cross page boundaries and will not
+ cause a fault. */
+
+ while (1)
+ {
+ longword longword1 = *longword_ptr ^ repeated_c;
+
+ if ((((longword1 - repeated_one) & ~longword1)
+ & (repeated_one << 7)) != 0)
+ break;
+ longword_ptr++;
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that one of the sizeof (longword) bytes
+ starting at char_ptr is == c. On little-endian machines, we
+ could determine the first such byte without any further memory
+ accesses, just by looking at the tmp result from the last loop
+ iteration. But this does not work on big-endian machines.
+ Choose code that works in both cases. */
+
+ char_ptr = (unsigned char *) longword_ptr;
+ while (*char_ptr != c)
+ char_ptr++;
+ return (void *) char_ptr;
+}
diff --git a/grub-core/gnulib/rawmemchr.valgrind b/grub-core/gnulib/rawmemchr.valgrind
new file mode 100644
index 0000000..6363923
--- /dev/null
+++ b/grub-core/gnulib/rawmemchr.valgrind
@@ -0,0 +1,12 @@
+# Suppress a valgrind message about use of uninitialized memory in rawmemchr().
+# This use is OK because it provides only a speedup.
+{
+ rawmemchr-value4
+ Memcheck:Value4
+ fun:rawmemchr
+}
+{
+ rawmemchr-value8
+ Memcheck:Value8
+ fun:rawmemchr
+}
diff --git a/grub-core/gnulib/realloc.c b/grub-core/gnulib/realloc.c
new file mode 100644
index 0000000..053208f
--- /dev/null
+++ b/grub-core/gnulib/realloc.c
@@ -0,0 +1,91 @@
+/* realloc() function that is glibc compatible.
+
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+
+/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */
+#ifdef realloc
+# define NEED_REALLOC_GNU 1
+/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */
+#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU
+# define NEED_REALLOC_GNU 1
+#endif
+
+/* Infer the properties of the system's malloc function.
+ The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */
+#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU
+# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1
+#endif
+
+/* Below we want to call the system's malloc and realloc.
+ Undefine the symbols here so that including <stdlib.h> provides a
+ declaration of malloc(), not of rpl_malloc(), and likewise for realloc. */
+#undef malloc
+#undef realloc
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+
+/* Below we want to call the system's malloc and realloc.
+ Undefine the symbols, if they were defined by gnulib's <stdlib.h>
+ replacement. */
+#undef malloc
+#undef realloc
+
+/* Change the size of an allocated block of memory P to N bytes,
+ with error checking. If N is zero, change it to 1. If P is NULL,
+ use malloc. */
+
+void *
+rpl_realloc (void *p, size_t n)
+{
+ void *result;
+
+#if NEED_REALLOC_GNU
+ if (n == 0)
+ {
+ n = 1;
+
+ /* In theory realloc might fail, so don't rely on it to free. */
+ free (p);
+ p = NULL;
+ }
+#endif
+
+ if (p == NULL)
+ {
+#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE
+ if (n == 0)
+ n = 1;
+#endif
+ result = malloc (n);
+ }
+ else
+ result = realloc (p, n);
+
+#if !HAVE_REALLOC_POSIX
+ if (result == NULL)
+ errno = ENOMEM;
+#endif
+
+ return result;
+}
diff --git a/grub-core/gnulib/ref-add.sin b/grub-core/gnulib/ref-add.sin
new file mode 100644
index 0000000..dbb61df
--- /dev/null
+++ b/grub-core/gnulib/ref-add.sin
@@ -0,0 +1,30 @@
+# Add this package to a list of references stored in a text file.
+#
+# Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ ta
+ :a
+ s/ @PACKAGE@ / @PACKAGE@ /
+ tb
+ s/ $/ @PACKAGE@ /
+ :b
+ s/^/# Packages using this file:/
+}
diff --git a/grub-core/gnulib/ref-del.sin b/grub-core/gnulib/ref-del.sin
new file mode 100644
index 0000000..4c31a6e
--- /dev/null
+++ b/grub-core/gnulib/ref-del.sin
@@ -0,0 +1,25 @@
+# Remove this package from a list of references stored in a text file.
+#
+# Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ s/ @PACKAGE@ / /
+ s/^/# Packages using this file:/
+}
diff --git a/grub-core/gnulib/regcomp.c b/grub-core/gnulib/regcomp.c
new file mode 100644
index 0000000..86ca02b
--- /dev/null
+++ b/grub-core/gnulib/regcomp.c
@@ -0,0 +1,3877 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
+ size_t length, reg_syntax_t syntax);
+static void re_compile_fastmap_iter (regex_t *bufp,
+ const re_dfastate_t *init_state,
+ char *fastmap);
+static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len);
+#ifdef RE_ENABLE_I18N
+static void free_charset (re_charset_t *cset);
+#endif /* RE_ENABLE_I18N */
+static void free_workarea_compile (regex_t *preg);
+static reg_errcode_t create_initial_state (re_dfa_t *dfa);
+#ifdef RE_ENABLE_I18N
+static void optimize_utf8 (re_dfa_t *dfa);
+#endif
+static reg_errcode_t analyze (regex_t *preg);
+static reg_errcode_t preorder (bin_tree_t *root,
+ reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra);
+static reg_errcode_t postorder (bin_tree_t *root,
+ reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra);
+static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node);
+static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node);
+static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg,
+ bin_tree_t *node);
+static reg_errcode_t calc_first (void *extra, bin_tree_t *node);
+static reg_errcode_t calc_next (void *extra, bin_tree_t *node);
+static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node);
+static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint);
+static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
+ unsigned int constraint);
+static reg_errcode_t calc_eclosure (re_dfa_t *dfa);
+static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa,
+ Idx node, bool root);
+static reg_errcode_t calc_inveclosure (re_dfa_t *dfa);
+static Idx fetch_number (re_string_t *input, re_token_t *token,
+ reg_syntax_t syntax);
+static int peek_token (re_token_t *token, re_string_t *input,
+ reg_syntax_t syntax) internal_function;
+static bin_tree_t *parse (re_string_t *regexp, regex_t *preg,
+ reg_syntax_t syntax, reg_errcode_t *err);
+static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp,
+ re_dfa_t *dfa, re_token_t *token,
+ reg_syntax_t syntax, reg_errcode_t *err);
+static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa,
+ re_token_t *token, reg_syntax_t syntax,
+ reg_errcode_t *err);
+static reg_errcode_t parse_bracket_element (bracket_elem_t *elem,
+ re_string_t *regexp,
+ re_token_t *token, int token_len,
+ re_dfa_t *dfa,
+ reg_syntax_t syntax,
+ bool accept_hyphen);
+static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem,
+ re_string_t *regexp,
+ re_token_t *token);
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t build_equiv_class (bitset_t sbcset,
+ re_charset_t *mbcset,
+ Idx *equiv_class_alloc,
+ const unsigned char *name);
+static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+ bitset_t sbcset,
+ re_charset_t *mbcset,
+ Idx *char_class_alloc,
+ const unsigned char *class_name,
+ reg_syntax_t syntax);
+#else /* not RE_ENABLE_I18N */
+static reg_errcode_t build_equiv_class (bitset_t sbcset,
+ const unsigned char *name);
+static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+ bitset_t sbcset,
+ const unsigned char *class_name,
+ reg_syntax_t syntax);
+#endif /* not RE_ENABLE_I18N */
+static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
+ RE_TRANSLATE_TYPE trans,
+ const unsigned char *class_name,
+ const unsigned char *extra,
+ bool non_match, reg_errcode_t *err);
+static bin_tree_t *create_tree (re_dfa_t *dfa,
+ bin_tree_t *left, bin_tree_t *right,
+ re_token_type_t type);
+static bin_tree_t *create_token_tree (re_dfa_t *dfa,
+ bin_tree_t *left, bin_tree_t *right,
+ const re_token_t *token);
+static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa);
+static void free_token (re_token_t *node);
+static reg_errcode_t free_tree (void *extra, bin_tree_t *node);
+static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node);
+
+/* This table gives an error message for each of the error codes listed
+ in regex.h. Obviously the order here has to be same as there.
+ POSIX doesn't require that we do anything for REG_NOERROR,
+ but why not be nice? */
+
+static const char __re_error_msgid[] =
+ {
+#define REG_NOERROR_IDX 0
+ gettext_noop ("Success") /* REG_NOERROR */
+ "\0"
+#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
+ gettext_noop ("No match") /* REG_NOMATCH */
+ "\0"
+#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
+ gettext_noop ("Invalid regular expression") /* REG_BADPAT */
+ "\0"
+#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
+ gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
+ "\0"
+#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character")
+ gettext_noop ("Invalid character class name") /* REG_ECTYPE */
+ "\0"
+#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name")
+ gettext_noop ("Trailing backslash") /* REG_EESCAPE */
+ "\0"
+#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash")
+ gettext_noop ("Invalid back reference") /* REG_ESUBREG */
+ "\0"
+#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
+ gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+ "\0"
+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+ gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
+ "\0"
+#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
+ gettext_noop ("Unmatched \\{") /* REG_EBRACE */
+ "\0"
+#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{")
+ gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
+ "\0"
+#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
+ gettext_noop ("Invalid range end") /* REG_ERANGE */
+ "\0"
+#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
+ gettext_noop ("Memory exhausted") /* REG_ESPACE */
+ "\0"
+#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
+ gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
+ "\0"
+#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
+ gettext_noop ("Premature end of regular expression") /* REG_EEND */
+ "\0"
+#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression")
+ gettext_noop ("Regular expression too big") /* REG_ESIZE */
+ "\0"
+#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big")
+ gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
+ };
+
+static const size_t __re_error_msgid_idx[] =
+ {
+ REG_NOERROR_IDX,
+ REG_NOMATCH_IDX,
+ REG_BADPAT_IDX,
+ REG_ECOLLATE_IDX,
+ REG_ECTYPE_IDX,
+ REG_EESCAPE_IDX,
+ REG_ESUBREG_IDX,
+ REG_EBRACK_IDX,
+ REG_EPAREN_IDX,
+ REG_EBRACE_IDX,
+ REG_BADBR_IDX,
+ REG_ERANGE_IDX,
+ REG_ESPACE_IDX,
+ REG_BADRPT_IDX,
+ REG_EEND_IDX,
+ REG_ESIZE_IDX,
+ REG_ERPAREN_IDX
+ };
+
+/* Entry points for GNU code. */
+
+/* re_compile_pattern is the GNU regular expression compiler: it
+ compiles PATTERN (of length LENGTH) and puts the result in BUFP.
+ Returns 0 if the pattern was valid, otherwise an error string.
+
+ Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+ are set in BUFP on entry. */
+
+#ifdef _LIBC
+const char *
+re_compile_pattern (pattern, length, bufp)
+ const char *pattern;
+ size_t length;
+ struct re_pattern_buffer *bufp;
+#else /* size_t might promote */
+const char *
+re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *bufp)
+#endif
+{
+ reg_errcode_t ret;
+
+ /* And GNU code determines whether or not to get register information
+ by passing null for the REGS argument to re_match, etc., not by
+ setting no_sub, unless RE_NO_SUB is set. */
+ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB);
+
+ /* Match anchors at newline. */
+ bufp->newline_anchor = 1;
+
+ ret = re_compile_internal (bufp, pattern, length, re_syntax_options);
+
+ if (!ret)
+ return NULL;
+ return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+}
+#ifdef _LIBC
+weak_alias (__re_compile_pattern, re_compile_pattern)
+#endif
+
+/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
+ also be assigned to arbitrarily: each pattern buffer stores its own
+ syntax, so it can be changed between regex compilations. */
+/* This has no initializer because initialized variables in Emacs
+ become read-only after dumping. */
+reg_syntax_t re_syntax_options;
+
+
+/* Specify the precise syntax of regexps for compilation. This provides
+ for compatibility for various utilities which historically have
+ different, incompatible syntaxes.
+
+ The argument SYNTAX is a bit mask comprised of the various bits
+ defined in regex.h. We return the old syntax. */
+
+reg_syntax_t
+re_set_syntax (syntax)
+ reg_syntax_t syntax;
+{
+ reg_syntax_t ret = re_syntax_options;
+
+ re_syntax_options = syntax;
+ return ret;
+}
+#ifdef _LIBC
+weak_alias (__re_set_syntax, re_set_syntax)
+#endif
+
+int
+re_compile_fastmap (bufp)
+ struct re_pattern_buffer *bufp;
+{
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ char *fastmap = bufp->fastmap;
+
+ memset (fastmap, '\0', sizeof (char) * SBC_MAX);
+ re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);
+ if (dfa->init_state != dfa->init_state_word)
+ re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap);
+ if (dfa->init_state != dfa->init_state_nl)
+ re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap);
+ if (dfa->init_state != dfa->init_state_begbuf)
+ re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap);
+ bufp->fastmap_accurate = 1;
+ return 0;
+}
+#ifdef _LIBC
+weak_alias (__re_compile_fastmap, re_compile_fastmap)
+#endif
+
+static inline void
+__attribute ((always_inline))
+re_set_fastmap (char *fastmap, bool icase, int ch)
+{
+ fastmap[ch] = 1;
+ if (icase)
+ fastmap[tolower (ch)] = 1;
+}
+
+/* Helper function for re_compile_fastmap.
+ Compile fastmap for the initial_state INIT_STATE. */
+
+static void
+re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
+ char *fastmap)
+{
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ Idx node_cnt;
+ bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
+ for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
+ {
+ Idx node = init_state->nodes.elems[node_cnt];
+ re_token_type_t type = dfa->nodes[node].type;
+
+ if (type == CHARACTER)
+ {
+ re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
+#ifdef RE_ENABLE_I18N
+ if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ {
+ unsigned char buf[MB_LEN_MAX];
+ unsigned char *p;
+ wchar_t wc;
+ mbstate_t state;
+
+ p = buf;
+ *p++ = dfa->nodes[node].opr.c;
+ while (++node < dfa->nodes_len
+ && dfa->nodes[node].type == CHARACTER
+ && dfa->nodes[node].mb_partial)
+ *p++ = dfa->nodes[node].opr.c;
+ memset (&state, '\0', sizeof (state));
+ if (__mbrtowc (&wc, (const char *) buf, p - buf,
+ &state) == p - buf
+ && (__wcrtomb ((char *) buf, towlower (wc), &state)
+ != (size_t) -1))
+ re_set_fastmap (fastmap, false, buf[0]);
+ }
+#endif
+ }
+ else if (type == SIMPLE_BRACKET)
+ {
+ int i, ch;
+ for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+ {
+ int j;
+ bitset_word_t w = dfa->nodes[node].opr.sbcset[i];
+ for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+ if (w & ((bitset_word_t) 1 << j))
+ re_set_fastmap (fastmap, icase, ch);
+ }
+ }
+#ifdef RE_ENABLE_I18N
+ else if (type == COMPLEX_BRACKET)
+ {
+ re_charset_t *cset = dfa->nodes[node].opr.mbcset;
+ Idx i;
+
+# ifdef _LIBC
+ /* See if we have to try all bytes which start multiple collation
+ elements.
+ e.g. In da_DK, we want to catch 'a' since "aa" is a valid
+ collation element, and don't catch 'b' since 'b' is
+ the only collation element which starts from 'b' (and
+ it is caught by SIMPLE_BRACKET). */
+ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0
+ && (cset->ncoll_syms || cset->nranges))
+ {
+ const int32_t *table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ for (i = 0; i < SBC_MAX; ++i)
+ if (table[i] < 0)
+ re_set_fastmap (fastmap, icase, i);
+ }
+# endif /* _LIBC */
+
+ /* See if we have to start the match at all multibyte characters,
+ i.e. where we would not find an invalid sequence. This only
+ applies to multibyte character sets; for single byte character
+ sets, the SIMPLE_BRACKET again suffices. */
+ if (dfa->mb_cur_max > 1
+ && (cset->nchar_classes || cset->non_match || cset->nranges
+# ifdef _LIBC
+ || cset->nequiv_classes
+# endif /* _LIBC */
+ ))
+ {
+ unsigned char c = 0;
+ do
+ {
+ mbstate_t mbs;
+ memset (&mbs, 0, sizeof (mbs));
+ if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2)
+ re_set_fastmap (fastmap, false, (int) c);
+ }
+ while (++c != 0);
+ }
+
+ else
+ {
+ /* ... Else catch all bytes which can start the mbchars. */
+ for (i = 0; i < cset->nmbchars; ++i)
+ {
+ char buf[256];
+ mbstate_t state;
+ memset (&state, '\0', sizeof (state));
+ if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+ re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+ if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ {
+ if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ != (size_t) -1)
+ re_set_fastmap (fastmap, false, *(unsigned char *) buf);
+ }
+ }
+ }
+ }
+#endif /* RE_ENABLE_I18N */
+ else if (type == OP_PERIOD
+#ifdef RE_ENABLE_I18N
+ || type == OP_UTF8_PERIOD
+#endif /* RE_ENABLE_I18N */
+ || type == END_OF_RE)
+ {
+ memset (fastmap, '\1', sizeof (char) * SBC_MAX);
+ if (type == END_OF_RE)
+ bufp->can_be_null = 1;
+ return;
+ }
+ }
+}
+
+/* Entry point for POSIX code. */
+/* regcomp takes a regular expression as a string and compiles it.
+
+ PREG is a regex_t *. We do not expect any fields to be initialized,
+ since POSIX says we shouldn't. Thus, we set
+
+ `buffer' to the compiled pattern;
+ `used' to the length of the compiled pattern;
+ `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+ REG_EXTENDED bit in CFLAGS is set; otherwise, to
+ RE_SYNTAX_POSIX_BASIC;
+ `newline_anchor' to REG_NEWLINE being set in CFLAGS;
+ `fastmap' to an allocated space for the fastmap;
+ `fastmap_accurate' to zero;
+ `re_nsub' to the number of subexpressions in PATTERN.
+
+ PATTERN is the address of the pattern string.
+
+ CFLAGS is a series of bits which affect compilation.
+
+ If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
+ use POSIX basic syntax.
+
+ If REG_NEWLINE is set, then . and [^...] don't match newline.
+ Also, regexec will try a match beginning after every newline.
+
+ If REG_ICASE is set, then we considers upper- and lowercase
+ versions of letters to be equivalent when matching.
+
+ If REG_NOSUB is set, then when PREG is passed to regexec, that
+ routine will report only success or failure, and nothing about the
+ registers.
+
+ It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
+ the return codes and their meanings.) */
+
+int
+regcomp (preg, pattern, cflags)
+ regex_t *_Restrict_ preg;
+ const char *_Restrict_ pattern;
+ int cflags;
+{
+ reg_errcode_t ret;
+ reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
+ : RE_SYNTAX_POSIX_BASIC);
+
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ preg->used = 0;
+
+ /* Try to allocate space for the fastmap. */
+ preg->fastmap = re_malloc (char, SBC_MAX);
+ if (BE (preg->fastmap == NULL, 0))
+ return REG_ESPACE;
+
+ syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0;
+
+ /* If REG_NEWLINE is set, newlines are treated differently. */
+ if (cflags & REG_NEWLINE)
+ { /* REG_NEWLINE implies neither . nor [^...] match newline. */
+ syntax &= ~RE_DOT_NEWLINE;
+ syntax |= RE_HAT_LISTS_NOT_NEWLINE;
+ /* It also changes the matching behavior. */
+ preg->newline_anchor = 1;
+ }
+ else
+ preg->newline_anchor = 0;
+ preg->no_sub = !!(cflags & REG_NOSUB);
+ preg->translate = NULL;
+
+ ret = re_compile_internal (preg, pattern, strlen (pattern), syntax);
+
+ /* POSIX doesn't distinguish between an unmatched open-group and an
+ unmatched close-group: both are REG_EPAREN. */
+ if (ret == REG_ERPAREN)
+ ret = REG_EPAREN;
+
+ /* We have already checked preg->fastmap != NULL. */
+ if (BE (ret == REG_NOERROR, 1))
+ /* Compute the fastmap now, since regexec cannot modify the pattern
+ buffer. This function never fails in this implementation. */
+ (void) re_compile_fastmap (preg);
+ else
+ {
+ /* Some error occurred while compiling the expression. */
+ re_free (preg->fastmap);
+ preg->fastmap = NULL;
+ }
+
+ return (int) ret;
+}
+#ifdef _LIBC
+weak_alias (__regcomp, regcomp)
+#endif
+
+/* Returns a message corresponding to an error code, ERRCODE, returned
+ from either regcomp or regexec. We don't use PREG here. */
+
+#ifdef _LIBC
+size_t
+regerror (errcode, preg, errbuf, errbuf_size)
+ int errcode;
+ const regex_t *_Restrict_ preg;
+ char *_Restrict_ errbuf;
+ size_t errbuf_size;
+#else /* size_t might promote */
+size_t
+regerror (int errcode, const regex_t *_Restrict_ preg,
+ char *_Restrict_ errbuf, size_t errbuf_size)
+#endif
+{
+ const char *msg;
+ size_t msg_size;
+
+ if (BE (errcode < 0
+ || errcode >= (int) (sizeof (__re_error_msgid_idx)
+ / sizeof (__re_error_msgid_idx[0])), 0))
+ /* Only error codes returned by the rest of the code should be passed
+ to this routine. If we are given anything else, or if other regex
+ code generates an invalid error code, then the program has a bug.
+ Dump core so we can fix it. */
+ abort ();
+
+ msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
+
+ msg_size = strlen (msg) + 1; /* Includes the null. */
+
+ if (BE (errbuf_size != 0, 1))
+ {
+ size_t cpy_size = msg_size;
+ if (BE (msg_size > errbuf_size, 0))
+ {
+ cpy_size = errbuf_size - 1;
+ errbuf[cpy_size] = '\0';
+ }
+ memcpy (errbuf, msg, cpy_size);
+ }
+
+ return msg_size;
+}
+#ifdef _LIBC
+weak_alias (__regerror, regerror)
+#endif
+
+
+#ifdef RE_ENABLE_I18N
+/* This static array is used for the map to single-byte characters when
+ UTF-8 is used. Otherwise we would allocate memory just to initialize
+ it the same all the time. UTF-8 is the preferred encoding so this is
+ a worthwhile optimization. */
+static const bitset_t utf8_sb_map =
+{
+ /* Set the first 128 bits. */
+# if 4 * BITSET_WORD_BITS < ASCII_CHARS
+# error "bitset_word_t is narrower than 32 bits"
+# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX,
+# endif
+ (BITSET_WORD_MAX
+ >> (SBC_MAX % BITSET_WORD_BITS == 0
+ ? 0
+ : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
+};
+#endif
+
+
+static void
+free_dfa_content (re_dfa_t *dfa)
+{
+ Idx i, j;
+
+ if (dfa->nodes)
+ for (i = 0; i < dfa->nodes_len; ++i)
+ free_token (dfa->nodes + i);
+ re_free (dfa->nexts);
+ for (i = 0; i < dfa->nodes_len; ++i)
+ {
+ if (dfa->eclosures != NULL)
+ re_node_set_free (dfa->eclosures + i);
+ if (dfa->inveclosures != NULL)
+ re_node_set_free (dfa->inveclosures + i);
+ if (dfa->edests != NULL)
+ re_node_set_free (dfa->edests + i);
+ }
+ re_free (dfa->edests);
+ re_free (dfa->eclosures);
+ re_free (dfa->inveclosures);
+ re_free (dfa->nodes);
+
+ if (dfa->state_table)
+ for (i = 0; i <= dfa->state_hash_mask; ++i)
+ {
+ struct re_state_table_entry *entry = dfa->state_table + i;
+ for (j = 0; j < entry->num; ++j)
+ {
+ re_dfastate_t *state = entry->array[j];
+ free_state (state);
+ }
+ re_free (entry->array);
+ }
+ re_free (dfa->state_table);
+#ifdef RE_ENABLE_I18N
+ if (dfa->sb_char != utf8_sb_map)
+ re_free (dfa->sb_char);
+#endif
+ re_free (dfa->subexp_map);
+#ifdef DEBUG
+ re_free (dfa->re_str);
+#endif
+
+ re_free (dfa);
+}
+
+
+/* Free dynamically allocated space used by PREG. */
+
+void
+regfree (preg)
+ regex_t *preg;
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ if (BE (dfa != NULL, 1))
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+
+ re_free (preg->fastmap);
+ preg->fastmap = NULL;
+
+ re_free (preg->translate);
+ preg->translate = NULL;
+}
+#ifdef _LIBC
+weak_alias (__regfree, regfree)
+#endif
+
+/* Entry points compatible with 4.2 BSD regex library. We don't define
+ them unless specifically requested. */
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+
+/* BSD has one and only one pattern buffer. */
+static struct re_pattern_buffer re_comp_buf;
+
+char *
+# ifdef _LIBC
+/* Make these definitions weak in libc, so POSIX programs can redefine
+ these names if they don't use our functions, and still use
+ regcomp/regexec above without link errors. */
+weak_function
+# endif
+re_comp (s)
+ const char *s;
+{
+ reg_errcode_t ret;
+ char *fastmap;
+
+ if (!s)
+ {
+ if (!re_comp_buf.buffer)
+ return gettext ("No previous regular expression");
+ return 0;
+ }
+
+ if (re_comp_buf.buffer)
+ {
+ fastmap = re_comp_buf.fastmap;
+ re_comp_buf.fastmap = NULL;
+ __regfree (&re_comp_buf);
+ memset (&re_comp_buf, '\0', sizeof (re_comp_buf));
+ re_comp_buf.fastmap = fastmap;
+ }
+
+ if (re_comp_buf.fastmap == NULL)
+ {
+ re_comp_buf.fastmap = (char *) malloc (SBC_MAX);
+ if (re_comp_buf.fastmap == NULL)
+ return (char *) gettext (__re_error_msgid
+ + __re_error_msgid_idx[(int) REG_ESPACE]);
+ }
+
+ /* Since `re_exec' always passes NULL for the `regs' argument, we
+ don't need to initialize the pattern buffer fields which affect it. */
+
+ /* Match anchors at newlines. */
+ re_comp_buf.newline_anchor = 1;
+
+ ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options);
+
+ if (!ret)
+ return NULL;
+
+ /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
+ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+}
+
+#ifdef _LIBC
+libc_freeres_fn (free_mem)
+{
+ __regfree (&re_comp_buf);
+}
+#endif
+
+#endif /* _REGEX_RE_COMP */
+
+/* Internal entry point.
+ Compile the regular expression PATTERN, whose length is LENGTH.
+ SYNTAX indicate regular expression's syntax. */
+
+static reg_errcode_t
+re_compile_internal (regex_t *preg, const char * pattern, size_t length,
+ reg_syntax_t syntax)
+{
+ reg_errcode_t err = REG_NOERROR;
+ re_dfa_t *dfa;
+ re_string_t regexp;
+
+ /* Initialize the pattern buffer. */
+ preg->fastmap_accurate = 0;
+ preg->syntax = syntax;
+ preg->not_bol = preg->not_eol = 0;
+ preg->used = 0;
+ preg->re_nsub = 0;
+ preg->can_be_null = 0;
+ preg->regs_allocated = REGS_UNALLOCATED;
+
+ /* Initialize the dfa. */
+ dfa = (re_dfa_t *) preg->buffer;
+ if (BE (preg->allocated < sizeof (re_dfa_t), 0))
+ {
+ /* If zero allocated, but buffer is non-null, try to realloc
+ enough space. This loses if buffer's address is bogus, but
+ that is the user's responsibility. If ->buffer is NULL this
+ is a simple allocation. */
+ dfa = re_realloc (preg->buffer, re_dfa_t, 1);
+ if (dfa == NULL)
+ return REG_ESPACE;
+ preg->allocated = sizeof (re_dfa_t);
+ preg->buffer = (unsigned char *) dfa;
+ }
+ preg->used = sizeof (re_dfa_t);
+
+ err = init_dfa (dfa, length);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ return err;
+ }
+#ifdef DEBUG
+ /* Note: length+1 will not overflow since it is checked in init_dfa. */
+ dfa->re_str = re_malloc (char, length + 1);
+ strncpy (dfa->re_str, pattern, length + 1);
+#endif
+
+ __libc_lock_init (dfa->lock);
+
+ err = re_string_construct (&regexp, pattern, length, preg->translate,
+ (syntax & RE_ICASE) != 0, dfa);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_compile_internal_free_return:
+ free_workarea_compile (preg);
+ re_string_destruct (&regexp);
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ return err;
+ }
+
+ /* Parse the regular expression, and build a structure tree. */
+ preg->re_nsub = 0;
+ dfa->str_tree = parse (&regexp, preg, syntax, &err);
+ if (BE (dfa->str_tree == NULL, 0))
+ goto re_compile_internal_free_return;
+
+ /* Analyze the tree and create the nfa. */
+ err = analyze (preg);
+ if (BE (err != REG_NOERROR, 0))
+ goto re_compile_internal_free_return;
+
+#ifdef RE_ENABLE_I18N
+ /* If possible, do searching in single byte encoding to speed things up. */
+ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL)
+ optimize_utf8 (dfa);
+#endif
+
+ /* Then create the initial state of the dfa. */
+ err = create_initial_state (dfa);
+
+ /* Release work areas. */
+ free_workarea_compile (preg);
+ re_string_destruct (&regexp);
+
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ }
+
+ return err;
+}
+
+/* Initialize DFA. We use the length of the regular expression PAT_LEN
+ as the initial length of some arrays. */
+
+static reg_errcode_t
+init_dfa (re_dfa_t *dfa, size_t pat_len)
+{
+ __re_size_t table_size;
+#ifndef _LIBC
+ char *codeset_name;
+#endif
+#ifdef RE_ENABLE_I18N
+ size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
+#else
+ size_t max_i18n_object_size = 0;
+#endif
+ size_t max_object_size =
+ MAX (sizeof (struct re_state_table_entry),
+ MAX (sizeof (re_token_t),
+ MAX (sizeof (re_node_set),
+ MAX (sizeof (regmatch_t),
+ max_i18n_object_size))));
+
+ memset (dfa, '\0', sizeof (re_dfa_t));
+
+ /* Force allocation of str_tree_storage the first time. */
+ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE;
+
+ /* Avoid overflows. The extra "/ 2" is for the table_size doubling
+ calculation below, and for similar doubling calculations
+ elsewhere. And it's <= rather than <, because some of the
+ doubling calculations add 1 afterwards. */
+ if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0))
+ return REG_ESPACE;
+
+ dfa->nodes_alloc = pat_len + 1;
+ dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc);
+
+ /* table_size = 2 ^ ceil(log pat_len) */
+ for (table_size = 1; ; table_size <<= 1)
+ if (table_size > pat_len)
+ break;
+
+ dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size);
+ dfa->state_hash_mask = table_size - 1;
+
+ dfa->mb_cur_max = MB_CUR_MAX;
+#ifdef _LIBC
+ if (dfa->mb_cur_max == 6
+ && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)
+ dfa->is_utf8 = 1;
+ dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII)
+ != 0);
+#else
+ codeset_name = nl_langinfo (CODESET);
+ if (strcasecmp (codeset_name, "UTF-8") == 0
+ || strcasecmp (codeset_name, "UTF8") == 0)
+ dfa->is_utf8 = 1;
+
+ /* We check exhaustively in the loop below if this charset is a
+ superset of ASCII. */
+ dfa->map_notascii = 0;
+#endif
+
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ if (dfa->is_utf8)
+ dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map;
+ else
+ {
+ int i, j, ch;
+
+ dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+ if (BE (dfa->sb_char == NULL, 0))
+ return REG_ESPACE;
+
+ /* Set the bits corresponding to single byte chars. */
+ for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+ for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+ {
+ wint_t wch = __btowc (ch);
+ if (wch != WEOF)
+ dfa->sb_char[i] |= (bitset_word_t) 1 << j;
+# ifndef _LIBC
+ if (isascii (ch) && wch != ch)
+ dfa->map_notascii = 1;
+# endif
+ }
+ }
+ }
+#endif
+
+ if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0))
+ return REG_ESPACE;
+ return REG_NOERROR;
+}
+
+/* Initialize WORD_CHAR table, which indicate which character is
+ "word". In this case "word" means that it is the word construction
+ character used by some operators like "\<", "\>", etc. */
+
+static void
+internal_function
+init_word_char (re_dfa_t *dfa)
+{
+ int i, j, ch;
+ dfa->word_ops_used = 1;
+ for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+ for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+ if (isalnum (ch) || ch == '_')
+ dfa->word_char[i] |= (bitset_word_t) 1 << j;
+}
+
+/* Free the work area which are only used while compiling. */
+
+static void
+free_workarea_compile (regex_t *preg)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_storage_t *storage, *next;
+ for (storage = dfa->str_tree_storage; storage; storage = next)
+ {
+ next = storage->next;
+ re_free (storage);
+ }
+ dfa->str_tree_storage = NULL;
+ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE;
+ dfa->str_tree = NULL;
+ re_free (dfa->org_indices);
+ dfa->org_indices = NULL;
+}
+
+/* Create initial states for all contexts. */
+
+static reg_errcode_t
+create_initial_state (re_dfa_t *dfa)
+{
+ Idx first, i;
+ reg_errcode_t err;
+ re_node_set init_nodes;
+
+ /* Initial states have the epsilon closure of the node which is
+ the first node of the regular expression. */
+ first = dfa->str_tree->first->node_idx;
+ dfa->init_node = first;
+ err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* The back-references which are in initial states can epsilon transit,
+ since in this case all of the subexpressions can be null.
+ Then we add epsilon closures of the nodes which are the next nodes of
+ the back-references. */
+ if (dfa->nbackref > 0)
+ for (i = 0; i < init_nodes.nelem; ++i)
+ {
+ Idx node_idx = init_nodes.elems[i];
+ re_token_type_t type = dfa->nodes[node_idx].type;
+
+ Idx clexp_idx;
+ if (type != OP_BACK_REF)
+ continue;
+ for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx)
+ {
+ re_token_t *clexp_node;
+ clexp_node = dfa->nodes + init_nodes.elems[clexp_idx];
+ if (clexp_node->type == OP_CLOSE_SUBEXP
+ && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx)
+ break;
+ }
+ if (clexp_idx == init_nodes.nelem)
+ continue;
+
+ if (type == OP_BACK_REF)
+ {
+ Idx dest_idx = dfa->edests[node_idx].elems[0];
+ if (!re_node_set_contains (&init_nodes, dest_idx))
+ {
+ reg_errcode_t merge_err
+ = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx);
+ if (merge_err != REG_NOERROR)
+ return merge_err;
+ i = 0;
+ }
+ }
+ }
+
+ /* It must be the first time to invoke acquire_state. */
+ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0);
+ /* We don't check ERR here, since the initial state must not be NULL. */
+ if (BE (dfa->init_state == NULL, 0))
+ return err;
+ if (dfa->init_state->has_constraint)
+ {
+ dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes,
+ CONTEXT_WORD);
+ dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes,
+ CONTEXT_NEWLINE);
+ dfa->init_state_begbuf = re_acquire_state_context (&err, dfa,
+ &init_nodes,
+ CONTEXT_NEWLINE
+ | CONTEXT_BEGBUF);
+ if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL, 0))
+ return err;
+ }
+ else
+ dfa->init_state_word = dfa->init_state_nl
+ = dfa->init_state_begbuf = dfa->init_state;
+
+ re_node_set_free (&init_nodes);
+ return REG_NOERROR;
+}
+
+#ifdef RE_ENABLE_I18N
+/* If it is possible to do searching in single byte encoding instead of UTF-8
+ to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change
+ DFA nodes where needed. */
+
+static void
+optimize_utf8 (re_dfa_t *dfa)
+{
+ Idx node;
+ int i;
+ bool mb_chars = false;
+ bool has_period = false;
+
+ for (node = 0; node < dfa->nodes_len; ++node)
+ switch (dfa->nodes[node].type)
+ {
+ case CHARACTER:
+ if (dfa->nodes[node].opr.c >= ASCII_CHARS)
+ mb_chars = true;
+ break;
+ case ANCHOR:
+ switch (dfa->nodes[node].opr.ctx_type)
+ {
+ case LINE_FIRST:
+ case LINE_LAST:
+ case BUF_FIRST:
+ case BUF_LAST:
+ break;
+ default:
+ /* Word anchors etc. cannot be handled. It's okay to test
+ opr.ctx_type since constraints (for all DFA nodes) are
+ created by ORing one or more opr.ctx_type values. */
+ return;
+ }
+ break;
+ case OP_PERIOD:
+ has_period = true;
+ break;
+ case OP_BACK_REF:
+ case OP_ALT:
+ case END_OF_RE:
+ case OP_DUP_ASTERISK:
+ case OP_OPEN_SUBEXP:
+ case OP_CLOSE_SUBEXP:
+ break;
+ case COMPLEX_BRACKET:
+ return;
+ case SIMPLE_BRACKET:
+ /* Just double check. */
+ {
+ int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0
+ ? 0
+ : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS);
+ for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
+ {
+ if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0)
+ return;
+ rshift = 0;
+ }
+ }
+ break;
+ default:
+ abort ();
+ }
+
+ if (mb_chars || has_period)
+ for (node = 0; node < dfa->nodes_len; ++node)
+ {
+ if (dfa->nodes[node].type == CHARACTER
+ && dfa->nodes[node].opr.c >= ASCII_CHARS)
+ dfa->nodes[node].mb_partial = 0;
+ else if (dfa->nodes[node].type == OP_PERIOD)
+ dfa->nodes[node].type = OP_UTF8_PERIOD;
+ }
+
+ /* The search can be in single byte locale. */
+ dfa->mb_cur_max = 1;
+ dfa->is_utf8 = 0;
+ dfa->has_mb_node = dfa->nbackref > 0 || has_period;
+}
+#endif
+
+/* Analyze the structure tree, and calculate "first", "next", "edest",
+ "eclosure", and "inveclosure". */
+
+static reg_errcode_t
+analyze (regex_t *preg)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ reg_errcode_t ret;
+
+ /* Allocate arrays. */
+ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc);
+ dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc);
+ dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc);
+ dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc);
+ if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL
+ || dfa->eclosures == NULL, 0))
+ return REG_ESPACE;
+
+ dfa->subexp_map = re_malloc (Idx, preg->re_nsub);
+ if (dfa->subexp_map != NULL)
+ {
+ Idx i;
+ for (i = 0; i < preg->re_nsub; i++)
+ dfa->subexp_map[i] = i;
+ preorder (dfa->str_tree, optimize_subexps, dfa);
+ for (i = 0; i < preg->re_nsub; i++)
+ if (dfa->subexp_map[i] != i)
+ break;
+ if (i == preg->re_nsub)
+ {
+ free (dfa->subexp_map);
+ dfa->subexp_map = NULL;
+ }
+ }
+
+ ret = postorder (dfa->str_tree, lower_subexps, preg);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ ret = postorder (dfa->str_tree, calc_first, dfa);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ preorder (dfa->str_tree, calc_next, dfa);
+ ret = preorder (dfa->str_tree, link_nfa_nodes, dfa);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ ret = calc_eclosure (dfa);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+
+ /* We only need this during the prune_impossible_nodes pass in regexec.c;
+ skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */
+ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match)
+ || dfa->nbackref)
+ {
+ dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len);
+ if (BE (dfa->inveclosures == NULL, 0))
+ return REG_ESPACE;
+ ret = calc_inveclosure (dfa);
+ }
+
+ return ret;
+}
+
+/* Our parse trees are very unbalanced, so we cannot use a stack to
+ implement parse tree visits. Instead, we use parent pointers and
+ some hairy code in these two functions. */
+static reg_errcode_t
+postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra)
+{
+ bin_tree_t *node, *prev;
+
+ for (node = root; ; )
+ {
+ /* Descend down the tree, preferably to the left (or to the right
+ if that's the only child). */
+ while (node->left || node->right)
+ if (node->left)
+ node = node->left;
+ else
+ node = node->right;
+
+ do
+ {
+ reg_errcode_t err = fn (extra, node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ if (node->parent == NULL)
+ return REG_NOERROR;
+ prev = node;
+ node = node->parent;
+ }
+ /* Go up while we have a node that is reached from the right. */
+ while (node->right == prev || node->right == NULL);
+ node = node->right;
+ }
+}
+
+static reg_errcode_t
+preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra)
+{
+ bin_tree_t *node;
+
+ for (node = root; ; )
+ {
+ reg_errcode_t err = fn (extra, node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* Go to the left node, or up and to the right. */
+ if (node->left)
+ node = node->left;
+ else
+ {
+ bin_tree_t *prev = NULL;
+ while (node->right == prev || node->right == NULL)
+ {
+ prev = node;
+ node = node->parent;
+ if (!node)
+ return REG_NOERROR;
+ }
+ node = node->right;
+ }
+ }
+}
+
+/* Optimization pass: if a SUBEXP is entirely contained, strip it and tell
+ re_search_internal to map the inner one's opr.idx to this one's. Adjust
+ backreferences as well. Requires a preorder visit. */
+static reg_errcode_t
+optimize_subexps (void *extra, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) extra;
+
+ if (node->token.type == OP_BACK_REF && dfa->subexp_map)
+ {
+ int idx = node->token.opr.idx;
+ node->token.opr.idx = dfa->subexp_map[idx];
+ dfa->used_bkref_map |= 1 << node->token.opr.idx;
+ }
+
+ else if (node->token.type == SUBEXP
+ && node->left && node->left->token.type == SUBEXP)
+ {
+ Idx other_idx = node->left->token.opr.idx;
+
+ node->left = node->left->left;
+ if (node->left)
+ node->left->parent = node;
+
+ dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx];
+ if (other_idx < BITSET_WORD_BITS)
+ dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx);
+ }
+
+ return REG_NOERROR;
+}
+
+/* Lowering pass: Turn each SUBEXP node into the appropriate concatenation
+ of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */
+static reg_errcode_t
+lower_subexps (void *extra, bin_tree_t *node)
+{
+ regex_t *preg = (regex_t *) extra;
+ reg_errcode_t err = REG_NOERROR;
+
+ if (node->left && node->left->token.type == SUBEXP)
+ {
+ node->left = lower_subexp (&err, preg, node->left);
+ if (node->left)
+ node->left->parent = node;
+ }
+ if (node->right && node->right->token.type == SUBEXP)
+ {
+ node->right = lower_subexp (&err, preg, node->right);
+ if (node->right)
+ node->right->parent = node;
+ }
+
+ return err;
+}
+
+static bin_tree_t *
+lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *body = node->left;
+ bin_tree_t *op, *cls, *tree1, *tree;
+
+ if (preg->no_sub
+ /* We do not optimize empty subexpressions, because otherwise we may
+ have bad CONCAT nodes with NULL children. This is obviously not
+ very common, so we do not lose much. An example that triggers
+ this case is the sed "script" /\(\)/x. */
+ && node->left != NULL
+ && (node->token.opr.idx >= BITSET_WORD_BITS
+ || !(dfa->used_bkref_map
+ & ((bitset_word_t) 1 << node->token.opr.idx))))
+ return node->left;
+
+ /* Convert the SUBEXP node to the concatenation of an
+ OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */
+ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP);
+ cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP);
+ tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls;
+ tree = create_tree (dfa, op, tree1, CONCAT);
+ if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx;
+ op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp;
+ return tree;
+}
+
+/* Pass 1 in building the NFA: compute FIRST and create unlinked automaton
+ nodes. Requires a postorder visit. */
+static reg_errcode_t
+calc_first (void *extra, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) extra;
+ if (node->token.type == CONCAT)
+ {
+ node->first = node->left->first;
+ node->node_idx = node->left->node_idx;
+ }
+ else
+ {
+ node->first = node;
+ node->node_idx = re_dfa_add_node (dfa, node->token);
+ if (BE (node->node_idx == REG_MISSING, 0))
+ return REG_ESPACE;
+ if (node->token.type == ANCHOR)
+ dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
+ }
+ return REG_NOERROR;
+}
+
+/* Pass 2: compute NEXT on the tree. Preorder visit. */
+static reg_errcode_t
+calc_next (void *extra, bin_tree_t *node)
+{
+ switch (node->token.type)
+ {
+ case OP_DUP_ASTERISK:
+ node->left->next = node;
+ break;
+ case CONCAT:
+ node->left->next = node->right->first;
+ node->right->next = node->next;
+ break;
+ default:
+ if (node->left)
+ node->left->next = node->next;
+ if (node->right)
+ node->right->next = node->next;
+ break;
+ }
+ return REG_NOERROR;
+}
+
+/* Pass 3: link all DFA nodes to their NEXT node (any order will do). */
+static reg_errcode_t
+link_nfa_nodes (void *extra, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) extra;
+ Idx idx = node->node_idx;
+ reg_errcode_t err = REG_NOERROR;
+
+ switch (node->token.type)
+ {
+ case CONCAT:
+ break;
+
+ case END_OF_RE:
+ assert (node->next == NULL);
+ break;
+
+ case OP_DUP_ASTERISK:
+ case OP_ALT:
+ {
+ Idx left, right;
+ dfa->has_plural_match = 1;
+ if (node->left != NULL)
+ left = node->left->first->node_idx;
+ else
+ left = node->next->node_idx;
+ if (node->right != NULL)
+ right = node->right->first->node_idx;
+ else
+ right = node->next->node_idx;
+ assert (REG_VALID_INDEX (left));
+ assert (REG_VALID_INDEX (right));
+ err = re_node_set_init_2 (dfa->edests + idx, left, right);
+ }
+ break;
+
+ case ANCHOR:
+ case OP_OPEN_SUBEXP:
+ case OP_CLOSE_SUBEXP:
+ err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx);
+ break;
+
+ case OP_BACK_REF:
+ dfa->nexts[idx] = node->next->node_idx;
+ if (node->token.type == OP_BACK_REF)
+ err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]);
+ break;
+
+ default:
+ assert (!IS_EPSILON_NODE (node->token.type));
+ dfa->nexts[idx] = node->next->node_idx;
+ break;
+ }
+
+ return err;
+}
+
+/* Duplicate the epsilon closure of the node ROOT_NODE.
+ Note that duplicated nodes have constraint INIT_CONSTRAINT in addition
+ to their own constraint. */
+
+static reg_errcode_t
+internal_function
+duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
+ Idx root_node, unsigned int init_constraint)
+{
+ Idx org_node, clone_node;
+ bool ok;
+ unsigned int constraint = init_constraint;
+ for (org_node = top_org_node, clone_node = top_clone_node;;)
+ {
+ Idx org_dest, clone_dest;
+ if (dfa->nodes[org_node].type == OP_BACK_REF)
+ {
+ /* If the back reference epsilon-transit, its destination must
+ also have the constraint. Then duplicate the epsilon closure
+ of the destination of the back reference, and store it in
+ edests of the back reference. */
+ org_dest = dfa->nexts[org_node];
+ re_node_set_empty (dfa->edests + clone_node);
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ dfa->nexts[clone_node] = dfa->nexts[org_node];
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ else if (dfa->edests[org_node].nelem == 0)
+ {
+ /* In case of the node can't epsilon-transit, don't duplicate the
+ destination and store the original destination as the
+ destination of the node. */
+ dfa->nexts[clone_node] = dfa->nexts[org_node];
+ break;
+ }
+ else if (dfa->edests[org_node].nelem == 1)
+ {
+ /* In case of the node can epsilon-transit, and it has only one
+ destination. */
+ org_dest = dfa->edests[org_node].elems[0];
+ re_node_set_empty (dfa->edests + clone_node);
+ /* If the node is root_node itself, it means the epsilon closure
+ has a loop. Then tie it to the destination of the root_node. */
+ if (org_node == root_node && clone_node != org_node)
+ {
+ ok = re_node_set_insert (dfa->edests + clone_node, org_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ break;
+ }
+ /* In case the node has another constraint, append it. */
+ constraint |= dfa->nodes[org_node].constraint;
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ else /* dfa->edests[org_node].nelem == 2 */
+ {
+ /* In case of the node can epsilon-transit, and it has two
+ destinations. In the bin_tree_t and DFA, that's '|' and '*'. */
+ org_dest = dfa->edests[org_node].elems[0];
+ re_node_set_empty (dfa->edests + clone_node);
+ /* Search for a duplicated node which satisfies the constraint. */
+ clone_dest = search_duplicated_node (dfa, org_dest, constraint);
+ if (clone_dest == REG_MISSING)
+ {
+ /* There is no such duplicated node, create a new one. */
+ reg_errcode_t err;
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ err = duplicate_node_closure (dfa, org_dest, clone_dest,
+ root_node, constraint);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ else
+ {
+ /* There is a duplicated node which satisfies the constraint,
+ use it to avoid infinite loop. */
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+
+ org_dest = dfa->edests[org_node].elems[1];
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ org_node = org_dest;
+ clone_node = clone_dest;
+ }
+ return REG_NOERROR;
+}
+
+/* Search for a node which is duplicated from the node ORG_NODE, and
+ satisfies the constraint CONSTRAINT. */
+
+static Idx
+search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
+ unsigned int constraint)
+{
+ Idx idx;
+ for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx)
+ {
+ if (org_node == dfa->org_indices[idx]
+ && constraint == dfa->nodes[idx].constraint)
+ return idx; /* Found. */
+ }
+ return REG_MISSING; /* Not found. */
+}
+
+/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
+ Return the index of the new node, or REG_MISSING if insufficient storage is
+ available. */
+
+static Idx
+duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
+{
+ Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
+ if (BE (dup_idx != REG_MISSING, 1))
+ {
+ dfa->nodes[dup_idx].constraint = constraint;
+ dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
+ dfa->nodes[dup_idx].duplicated = 1;
+
+ /* Store the index of the original node. */
+ dfa->org_indices[dup_idx] = org_idx;
+ }
+ return dup_idx;
+}
+
+static reg_errcode_t
+calc_inveclosure (re_dfa_t *dfa)
+{
+ Idx src, idx;
+ bool ok;
+ for (idx = 0; idx < dfa->nodes_len; ++idx)
+ re_node_set_init_empty (dfa->inveclosures + idx);
+
+ for (src = 0; src < dfa->nodes_len; ++src)
+ {
+ Idx *elems = dfa->eclosures[src].elems;
+ for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx)
+ {
+ ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ }
+
+ return REG_NOERROR;
+}
+
+/* Calculate "eclosure" for all the node in DFA. */
+
+static reg_errcode_t
+calc_eclosure (re_dfa_t *dfa)
+{
+ Idx node_idx;
+ bool incomplete;
+#ifdef DEBUG
+ assert (dfa->nodes_len > 0);
+#endif
+ incomplete = false;
+ /* For each nodes, calculate epsilon closure. */
+ for (node_idx = 0; ; ++node_idx)
+ {
+ reg_errcode_t err;
+ re_node_set eclosure_elem;
+ if (node_idx == dfa->nodes_len)
+ {
+ if (!incomplete)
+ break;
+ incomplete = false;
+ node_idx = 0;
+ }
+
+#ifdef DEBUG
+ assert (dfa->eclosures[node_idx].nelem != REG_MISSING);
+#endif
+
+ /* If we have already calculated, skip it. */
+ if (dfa->eclosures[node_idx].nelem != 0)
+ continue;
+ /* Calculate epsilon closure of `node_idx'. */
+ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ if (dfa->eclosures[node_idx].nelem == 0)
+ {
+ incomplete = true;
+ re_node_set_free (&eclosure_elem);
+ }
+ }
+ return REG_NOERROR;
+}
+
+/* Calculate epsilon closure of NODE. */
+
+static reg_errcode_t
+calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
+{
+ reg_errcode_t err;
+ Idx i;
+ re_node_set eclosure;
+ bool ok;
+ bool incomplete = false;
+ err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* This indicates that we are calculating this node now.
+ We reference this value to avoid infinite loop. */
+ dfa->eclosures[node].nelem = REG_MISSING;
+
+ /* If the current node has constraints, duplicate all nodes
+ since they must inherit the constraints. */
+ if (dfa->nodes[node].constraint
+ && dfa->edests[node].nelem
+ && !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
+ {
+ err = duplicate_node_closure (dfa, node, node, node,
+ dfa->nodes[node].constraint);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ /* Expand each epsilon destination nodes. */
+ if (IS_EPSILON_NODE(dfa->nodes[node].type))
+ for (i = 0; i < dfa->edests[node].nelem; ++i)
+ {
+ re_node_set eclosure_elem;
+ Idx edest = dfa->edests[node].elems[i];
+ /* If calculating the epsilon closure of `edest' is in progress,
+ return intermediate result. */
+ if (dfa->eclosures[edest].nelem == REG_MISSING)
+ {
+ incomplete = true;
+ continue;
+ }
+ /* If we haven't calculated the epsilon closure of `edest' yet,
+ calculate now. Otherwise use calculated epsilon closure. */
+ if (dfa->eclosures[edest].nelem == 0)
+ {
+ err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ else
+ eclosure_elem = dfa->eclosures[edest];
+ /* Merge the epsilon closure of `edest'. */
+ err = re_node_set_merge (&eclosure, &eclosure_elem);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ /* If the epsilon closure of `edest' is incomplete,
+ the epsilon closure of this node is also incomplete. */
+ if (dfa->eclosures[edest].nelem == 0)
+ {
+ incomplete = true;
+ re_node_set_free (&eclosure_elem);
+ }
+ }
+
+ /* An epsilon closure includes itself. */
+ ok = re_node_set_insert (&eclosure, node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ if (incomplete && !root)
+ dfa->eclosures[node].nelem = 0;
+ else
+ dfa->eclosures[node] = eclosure;
+ *new_set = eclosure;
+ return REG_NOERROR;
+}
+
+/* Functions for token which are used in the parser. */
+
+/* Fetch a token from INPUT.
+ We must not use this function inside bracket expressions. */
+
+static void
+internal_function
+fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax)
+{
+ re_string_skip_bytes (input, peek_token (result, input, syntax));
+}
+
+/* Peek a token from INPUT, and return the length of the token.
+ We must not use this function inside bracket expressions. */
+
+static int
+internal_function
+peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
+{
+ unsigned char c;
+
+ if (re_string_eoi (input))
+ {
+ token->type = END_OF_RE;
+ return 0;
+ }
+
+ c = re_string_peek_byte (input, 0);
+ token->opr.c = c;
+
+ token->word_char = 0;
+#ifdef RE_ENABLE_I18N
+ token->mb_partial = 0;
+ if (input->mb_cur_max > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+ token->mb_partial = 1;
+ return 1;
+ }
+#endif
+ if (c == '\\')
+ {
+ unsigned char c2;
+ if (re_string_cur_idx (input) + 1 >= re_string_length (input))
+ {
+ token->type = BACK_SLASH;
+ return 1;
+ }
+
+ c2 = re_string_peek_byte_case (input, 1);
+ token->opr.c = c2;
+ token->type = CHARACTER;
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1)
+ {
+ wint_t wc = re_string_wchar_at (input,
+ re_string_cur_idx (input) + 1);
+ token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+ }
+ else
+#endif
+ token->word_char = IS_WORD_CHAR (c2) != 0;
+
+ switch (c2)
+ {
+ case '|':
+ if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR))
+ token->type = OP_ALT;
+ break;
+ case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ if (!(syntax & RE_NO_BK_REFS))
+ {
+ token->type = OP_BACK_REF;
+ token->opr.idx = c2 - '1';
+ }
+ break;
+ case '<':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = WORD_FIRST;
+ }
+ break;
+ case '>':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = WORD_LAST;
+ }
+ break;
+ case 'b':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = WORD_DELIM;
+ }
+ break;
+ case 'B':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = NOT_WORD_DELIM;
+ }
+ break;
+ case 'w':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_WORD;
+ break;
+ case 'W':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_NOTWORD;
+ break;
+ case 's':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_SPACE;
+ break;
+ case 'S':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_NOTSPACE;
+ break;
+ case '`':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = BUF_FIRST;
+ }
+ break;
+ case '\'':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = BUF_LAST;
+ }
+ break;
+ case '(':
+ if (!(syntax & RE_NO_BK_PARENS))
+ token->type = OP_OPEN_SUBEXP;
+ break;
+ case ')':
+ if (!(syntax & RE_NO_BK_PARENS))
+ token->type = OP_CLOSE_SUBEXP;
+ break;
+ case '+':
+ if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_PLUS;
+ break;
+ case '?':
+ if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_QUESTION;
+ break;
+ case '{':
+ if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES)))
+ token->type = OP_OPEN_DUP_NUM;
+ break;
+ case '}':
+ if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES)))
+ token->type = OP_CLOSE_DUP_NUM;
+ break;
+ default:
+ break;
+ }
+ return 2;
+ }
+
+ token->type = CHARACTER;
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1)
+ {
+ wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input));
+ token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+ }
+ else
+#endif
+ token->word_char = IS_WORD_CHAR (token->opr.c);
+
+ switch (c)
+ {
+ case '\n':
+ if (syntax & RE_NEWLINE_ALT)
+ token->type = OP_ALT;
+ break;
+ case '|':
+ if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR))
+ token->type = OP_ALT;
+ break;
+ case '*':
+ token->type = OP_DUP_ASTERISK;
+ break;
+ case '+':
+ if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_PLUS;
+ break;
+ case '?':
+ if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_QUESTION;
+ break;
+ case '{':
+ if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+ token->type = OP_OPEN_DUP_NUM;
+ break;
+ case '}':
+ if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+ token->type = OP_CLOSE_DUP_NUM;
+ break;
+ case '(':
+ if (syntax & RE_NO_BK_PARENS)
+ token->type = OP_OPEN_SUBEXP;
+ break;
+ case ')':
+ if (syntax & RE_NO_BK_PARENS)
+ token->type = OP_CLOSE_SUBEXP;
+ break;
+ case '[':
+ token->type = OP_OPEN_BRACKET;
+ break;
+ case '.':
+ token->type = OP_PERIOD;
+ break;
+ case '^':
+ if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) &&
+ re_string_cur_idx (input) != 0)
+ {
+ char prev = re_string_peek_byte (input, -1);
+ if (!(syntax & RE_NEWLINE_ALT) || prev != '\n')
+ break;
+ }
+ token->type = ANCHOR;
+ token->opr.ctx_type = LINE_FIRST;
+ break;
+ case '$':
+ if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) &&
+ re_string_cur_idx (input) + 1 != re_string_length (input))
+ {
+ re_token_t next;
+ re_string_skip_bytes (input, 1);
+ peek_token (&next, input, syntax);
+ re_string_skip_bytes (input, -1);
+ if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP)
+ break;
+ }
+ token->type = ANCHOR;
+ token->opr.ctx_type = LINE_LAST;
+ break;
+ default:
+ break;
+ }
+ return 1;
+}
+
+/* Peek a token from INPUT, and return the length of the token.
+ We must not use this function out of bracket expressions. */
+
+static int
+internal_function
+peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
+{
+ unsigned char c;
+ if (re_string_eoi (input))
+ {
+ token->type = END_OF_RE;
+ return 0;
+ }
+ c = re_string_peek_byte (input, 0);
+ token->opr.c = c;
+
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+ return 1;
+ }
+#endif /* RE_ENABLE_I18N */
+
+ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS)
+ && re_string_cur_idx (input) + 1 < re_string_length (input))
+ {
+ /* In this case, '\' escape a character. */
+ unsigned char c2;
+ re_string_skip_bytes (input, 1);
+ c2 = re_string_peek_byte (input, 0);
+ token->opr.c = c2;
+ token->type = CHARACTER;
+ return 1;
+ }
+ if (c == '[') /* '[' is a special char in a bracket exps. */
+ {
+ unsigned char c2;
+ int token_len;
+ if (re_string_cur_idx (input) + 1 < re_string_length (input))
+ c2 = re_string_peek_byte (input, 1);
+ else
+ c2 = 0;
+ token->opr.c = c2;
+ token_len = 2;
+ switch (c2)
+ {
+ case '.':
+ token->type = OP_OPEN_COLL_ELEM;
+ break;
+ case '=':
+ token->type = OP_OPEN_EQUIV_CLASS;
+ break;
+ case ':':
+ if (syntax & RE_CHAR_CLASSES)
+ {
+ token->type = OP_OPEN_CHAR_CLASS;
+ break;
+ }
+ /* else fall through. */
+ default:
+ token->type = CHARACTER;
+ token->opr.c = c;
+ token_len = 1;
+ break;
+ }
+ return token_len;
+ }
+ switch (c)
+ {
+ case '-':
+ token->type = OP_CHARSET_RANGE;
+ break;
+ case ']':
+ token->type = OP_CLOSE_BRACKET;
+ break;
+ case '^':
+ token->type = OP_NON_MATCH_LIST;
+ break;
+ default:
+ token->type = CHARACTER;
+ }
+ return 1;
+}
+
+/* Functions for parser. */
+
+/* Entry point of the parser.
+ Parse the regular expression REGEXP and return the structure tree.
+ If an error is occured, ERR is set by error code, and return NULL.
+ This function build the following tree, from regular expression <reg_exp>:
+ CAT
+ / \
+ / \
+ <reg_exp> EOR
+
+ CAT means concatenation.
+ EOR means end of regular expression. */
+
+static bin_tree_t *
+parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
+ reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree, *eor, *root;
+ re_token_t current_token;
+ dfa->syntax = syntax;
+ fetch_token (&current_token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+ tree = parse_reg_exp (regexp, preg, &current_token, syntax, 0, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ eor = create_tree (dfa, NULL, NULL, END_OF_RE);
+ if (tree != NULL)
+ root = create_tree (dfa, tree, eor, CONCAT);
+ else
+ root = eor;
+ if (BE (eor == NULL || root == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ return root;
+}
+
+/* This function build the following tree, from regular expression
+ <branch1>|<branch2>:
+ ALT
+ / \
+ / \
+ <branch1> <branch2>
+
+ ALT means alternative, which represents the operator `|'. */
+
+static bin_tree_t *
+parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree, *branch = NULL;
+ tree = parse_branch (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+
+ while (token->type == OP_ALT)
+ {
+ fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+ if (token->type != OP_ALT && token->type != END_OF_RE
+ && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
+ {
+ branch = parse_branch (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && branch == NULL, 0))
+ return NULL;
+ }
+ else
+ branch = NULL;
+ tree = create_tree (dfa, tree, branch, OP_ALT);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ return tree;
+}
+
+/* This function build the following tree, from regular expression
+ <exp1><exp2>:
+ CAT
+ / \
+ / \
+ <exp1> <exp2>
+
+ CAT means concatenation. */
+
+static bin_tree_t *
+parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ bin_tree_t *tree, *expr;
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ tree = parse_expression (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+
+ while (token->type != OP_ALT && token->type != END_OF_RE
+ && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
+ {
+ expr = parse_expression (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && expr == NULL, 0))
+ {
+ return NULL;
+ }
+ if (tree != NULL && expr != NULL)
+ {
+ tree = create_tree (dfa, tree, expr, CONCAT);
+ if (tree == NULL)
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ else if (tree == NULL)
+ tree = expr;
+ /* Otherwise expr == NULL, we don't need to create new tree. */
+ }
+ return tree;
+}
+
+/* This function build the following tree, from regular expression a*:
+ *
+ |
+ a
+*/
+
+static bin_tree_t *
+parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree;
+ switch (token->type)
+ {
+ case CHARACTER:
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ while (!re_string_eoi (regexp)
+ && !re_string_first_byte (regexp, re_string_cur_idx (regexp)))
+ {
+ bin_tree_t *mbc_remain;
+ fetch_token (token, regexp, syntax);
+ mbc_remain = create_token_tree (dfa, NULL, NULL, token);
+ tree = create_tree (dfa, tree, mbc_remain, CONCAT);
+ if (BE (mbc_remain == NULL || tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ }
+#endif
+ break;
+ case OP_OPEN_SUBEXP:
+ tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_OPEN_BRACKET:
+ tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_BACK_REF:
+ if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
+ {
+ *err = REG_ESUBREG;
+ return NULL;
+ }
+ dfa->used_bkref_map |= 1 << token->opr.idx;
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ ++dfa->nbackref;
+ dfa->has_mb_node = 1;
+ break;
+ case OP_OPEN_DUP_NUM:
+ if (syntax & RE_CONTEXT_INVALID_DUP)
+ {
+ *err = REG_BADRPT;
+ return NULL;
+ }
+ /* FALLTHROUGH */
+ case OP_DUP_ASTERISK:
+ case OP_DUP_PLUS:
+ case OP_DUP_QUESTION:
+ if (syntax & RE_CONTEXT_INVALID_OPS)
+ {
+ *err = REG_BADRPT;
+ return NULL;
+ }
+ else if (syntax & RE_CONTEXT_INDEP_OPS)
+ {
+ fetch_token (token, regexp, syntax);
+ return parse_expression (regexp, preg, token, syntax, nest, err);
+ }
+ /* else fall through */
+ case OP_CLOSE_SUBEXP:
+ if ((token->type == OP_CLOSE_SUBEXP) &&
+ !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
+ {
+ *err = REG_ERPAREN;
+ return NULL;
+ }
+ /* else fall through */
+ case OP_CLOSE_DUP_NUM:
+ /* We treat it as a normal character. */
+
+ /* Then we can these characters as normal characters. */
+ token->type = CHARACTER;
+ /* mb_partial and word_char bits should be initialized already
+ by peek_token. */
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ break;
+ case ANCHOR:
+ if ((token->opr.ctx_type
+ & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST))
+ && dfa->word_ops_used == 0)
+ init_word_char (dfa);
+ if (token->opr.ctx_type == WORD_DELIM
+ || token->opr.ctx_type == NOT_WORD_DELIM)
+ {
+ bin_tree_t *tree_first, *tree_last;
+ if (token->opr.ctx_type == WORD_DELIM)
+ {
+ token->opr.ctx_type = WORD_FIRST;
+ tree_first = create_token_tree (dfa, NULL, NULL, token);
+ token->opr.ctx_type = WORD_LAST;
+ }
+ else
+ {
+ token->opr.ctx_type = INSIDE_WORD;
+ tree_first = create_token_tree (dfa, NULL, NULL, token);
+ token->opr.ctx_type = INSIDE_NOTWORD;
+ }
+ tree_last = create_token_tree (dfa, NULL, NULL, token);
+ tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
+ if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ else
+ {
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ /* We must return here, since ANCHORs can't be followed
+ by repetition operators.
+ eg. RE"^*" is invalid or "<ANCHOR(^)><CHAR(*)>",
+ it must not be "<ANCHOR(^)><REPEAT(*)>". */
+ fetch_token (token, regexp, syntax);
+ return tree;
+ case OP_PERIOD:
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ if (dfa->mb_cur_max > 1)
+ dfa->has_mb_node = 1;
+ break;
+ case OP_WORD:
+ case OP_NOTWORD:
+ tree = build_charclass_op (dfa, regexp->trans,
+ (const unsigned char *) "alnum",
+ (const unsigned char *) "_",
+ token->type == OP_NOTWORD, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_SPACE:
+ case OP_NOTSPACE:
+ tree = build_charclass_op (dfa, regexp->trans,
+ (const unsigned char *) "space",
+ (const unsigned char *) "",
+ token->type == OP_NOTSPACE, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_ALT:
+ case END_OF_RE:
+ return NULL;
+ case BACK_SLASH:
+ *err = REG_EESCAPE;
+ return NULL;
+ default:
+ /* Must not happen? */
+#ifdef DEBUG
+ assert (0);
+#endif
+ return NULL;
+ }
+ fetch_token (token, regexp, syntax);
+
+ while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS
+ || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM)
+ {
+ tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ /* In BRE consecutive duplications are not allowed. */
+ if ((syntax & RE_CONTEXT_INVALID_DUP)
+ && (token->type == OP_DUP_ASTERISK
+ || token->type == OP_OPEN_DUP_NUM))
+ {
+ *err = REG_BADRPT;
+ return NULL;
+ }
+ }
+
+ return tree;
+}
+
+/* This function build the following tree, from regular expression
+ (<reg_exp>):
+ SUBEXP
+ |
+ <reg_exp>
+*/
+
+static bin_tree_t *
+parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree;
+ size_t cur_nsub;
+ cur_nsub = preg->re_nsub++;
+
+ fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+
+ /* The subexpression may be a null string. */
+ if (token->type == OP_CLOSE_SUBEXP)
+ tree = NULL;
+ else
+ {
+ tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
+ if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
+ *err = REG_EPAREN;
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ }
+
+ if (cur_nsub <= '9' - '1')
+ dfa->completed_bkref_map |= 1 << cur_nsub;
+
+ tree = create_tree (dfa, tree, NULL, SUBEXP);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ tree->token.opr.idx = cur_nsub;
+ return tree;
+}
+
+/* This function parse repetition operators like "*", "+", "{1,3}" etc. */
+
+static bin_tree_t *
+parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
+ re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err)
+{
+ bin_tree_t *tree = NULL, *old_tree = NULL;
+ Idx i, start, end, start_idx = re_string_cur_idx (regexp);
+ re_token_t start_token = *token;
+
+ if (token->type == OP_OPEN_DUP_NUM)
+ {
+ end = 0;
+ start = fetch_number (regexp, token, syntax);
+ if (start == REG_MISSING)
+ {
+ if (token->type == CHARACTER && token->opr.c == ',')
+ start = 0; /* We treat "{,m}" as "{0,m}". */
+ else
+ {
+ *err = REG_BADBR; /* <re>{} is invalid. */
+ return NULL;
+ }
+ }
+ if (BE (start != REG_ERROR, 1))
+ {
+ /* We treat "{n}" as "{n,n}". */
+ end = ((token->type == OP_CLOSE_DUP_NUM) ? start
+ : ((token->type == CHARACTER && token->opr.c == ',')
+ ? fetch_number (regexp, token, syntax) : REG_ERROR));
+ }
+ if (BE (start == REG_ERROR || end == REG_ERROR, 0))
+ {
+ /* Invalid sequence. */
+ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
+ {
+ if (token->type == END_OF_RE)
+ *err = REG_EBRACE;
+ else
+ *err = REG_BADBR;
+
+ return NULL;
+ }
+
+ /* If the syntax bit is set, rollback. */
+ re_string_set_index (regexp, start_idx);
+ *token = start_token;
+ token->type = CHARACTER;
+ /* mb_partial and word_char bits should be already initialized by
+ peek_token. */
+ return elem;
+ }
+
+ if (BE ((end != REG_MISSING && start > end)
+ || token->type != OP_CLOSE_DUP_NUM, 0))
+ {
+ /* First number greater than second. */
+ *err = REG_BADBR;
+ return NULL;
+ }
+ }
+ else
+ {
+ start = (token->type == OP_DUP_PLUS) ? 1 : 0;
+ end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING;
+ }
+
+ fetch_token (token, regexp, syntax);
+
+ if (BE (elem == NULL, 0))
+ return NULL;
+ if (BE (start == 0 && end == 0, 0))
+ {
+ postorder (elem, free_tree, NULL);
+ return NULL;
+ }
+
+ /* Extract "<re>{n,m}" to "<re><re>...<re><re>{0,<m-n>}". */
+ if (BE (start > 0, 0))
+ {
+ tree = elem;
+ for (i = 2; i <= start; ++i)
+ {
+ elem = duplicate_tree (elem, dfa);
+ tree = create_tree (dfa, tree, elem, CONCAT);
+ if (BE (elem == NULL || tree == NULL, 0))
+ goto parse_dup_op_espace;
+ }
+
+ if (start == end)
+ return tree;
+
+ /* Duplicate ELEM before it is marked optional. */
+ elem = duplicate_tree (elem, dfa);
+ old_tree = tree;
+ }
+ else
+ old_tree = NULL;
+
+ if (elem->token.type == SUBEXP)
+ postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+
+ tree = create_tree (dfa, elem, NULL,
+ (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
+ if (BE (tree == NULL, 0))
+ goto parse_dup_op_espace;
+
+/* From gnulib's "intprops.h":
+ True if the arithmetic type T is signed. */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+ /* This loop is actually executed only when end != REG_MISSING,
+ to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have
+ already created the start+1-th copy. */
+ if (TYPE_SIGNED (Idx) || end != REG_MISSING)
+ for (i = start + 2; i <= end; ++i)
+ {
+ elem = duplicate_tree (elem, dfa);
+ tree = create_tree (dfa, tree, elem, CONCAT);
+ if (BE (elem == NULL || tree == NULL, 0))
+ goto parse_dup_op_espace;
+
+ tree = create_tree (dfa, tree, NULL, OP_ALT);
+ if (BE (tree == NULL, 0))
+ goto parse_dup_op_espace;
+ }
+
+ if (old_tree)
+ tree = create_tree (dfa, old_tree, tree, CONCAT);
+
+ return tree;
+
+ parse_dup_op_espace:
+ *err = REG_ESPACE;
+ return NULL;
+}
+
+/* Size of the names for collating symbol/equivalence_class/character_class.
+ I'm not sure, but maybe enough. */
+#define BRACKET_NAME_BUF_SIZE 32
+
+#ifndef _LIBC
+ /* Local function for parse_bracket_exp only used in case of NOT _LIBC.
+ Build the range expression which starts from START_ELEM, and ends
+ at END_ELEM. The result are written to MBCSET and SBCSET.
+ RANGE_ALLOC is the allocated size of mbcset->range_starts, and
+ mbcset->range_ends, is a pointer argument sinse we may
+ update it. */
+
+static reg_errcode_t
+internal_function
+# ifdef RE_ENABLE_I18N
+build_range_exp (const reg_syntax_t syntax,
+ bitset_t sbcset,
+ re_charset_t *mbcset,
+ Idx *range_alloc,
+ const bracket_elem_t *start_elem,
+ const bracket_elem_t *end_elem)
+# else /* not RE_ENABLE_I18N */
+build_range_exp (const reg_syntax_t syntax,
+ bitset_t sbcset,
+ const bracket_elem_t *start_elem,
+ const bracket_elem_t *end_elem)
+# endif /* not RE_ENABLE_I18N */
+{
+ unsigned int start_ch, end_ch;
+ /* Equivalence Classes and Character Classes can't be a range start/end. */
+ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
+ 0))
+ return REG_ERANGE;
+
+ /* We can handle no multi character collating elements without libc
+ support. */
+ if (BE ((start_elem->type == COLL_SYM
+ && strlen ((char *) start_elem->opr.name) > 1)
+ || (end_elem->type == COLL_SYM
+ && strlen ((char *) end_elem->opr.name) > 1), 0))
+ return REG_ECOLLATE;
+
+# ifdef RE_ENABLE_I18N
+ {
+ wchar_t wc;
+ wint_t start_wc;
+ wint_t end_wc;
+ wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
+
+ start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch
+ : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
+ : 0));
+ end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch
+ : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
+ : 0));
+ start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM)
+ ? __btowc (start_ch) : start_elem->opr.wch);
+ end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM)
+ ? __btowc (end_ch) : end_elem->opr.wch);
+ if (start_wc == WEOF || end_wc == WEOF)
+ return REG_ECOLLATE;
+ cmp_buf[0] = start_wc;
+ cmp_buf[4] = end_wc;
+
+ if (BE ((syntax & RE_NO_EMPTY_RANGES)
+ && wcscoll (cmp_buf, cmp_buf + 4) > 0, 0))
+ return REG_ERANGE;
+
+ /* Got valid collation sequence values, add them as a new entry.
+ However, for !_LIBC we have no collation elements: if the
+ character set is single byte, the single byte character set
+ that we build below suffices. parse_bracket_exp passes
+ no MBCSET if dfa->mb_cur_max == 1. */
+ if (mbcset)
+ {
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
+ {
+ /* There is not enough space, need realloc. */
+ wchar_t *new_array_start, *new_array_end;
+ Idx new_nranges;
+
+ /* +1 in case of mbcset->nranges is 0. */
+ new_nranges = 2 * mbcset->nranges + 1;
+ /* Use realloc since mbcset->range_starts and mbcset->range_ends
+ are NULL if *range_alloc == 0. */
+ new_array_start = re_realloc (mbcset->range_starts, wchar_t,
+ new_nranges);
+ new_array_end = re_realloc (mbcset->range_ends, wchar_t,
+ new_nranges);
+
+ if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ return REG_ESPACE;
+
+ mbcset->range_starts = new_array_start;
+ mbcset->range_ends = new_array_end;
+ *range_alloc = new_nranges;
+ }
+
+ mbcset->range_starts[mbcset->nranges] = start_wc;
+ mbcset->range_ends[mbcset->nranges++] = end_wc;
+ }
+
+ /* Build the table for single byte characters. */
+ for (wc = 0; wc < SBC_MAX; ++wc)
+ {
+ cmp_buf[2] = wc;
+ if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
+ && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+ bitset_set (sbcset, wc);
+ }
+ }
+# else /* not RE_ENABLE_I18N */
+ {
+ unsigned int ch;
+ start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch
+ : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
+ : 0));
+ end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch
+ : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
+ : 0));
+ if (start_ch > end_ch)
+ return REG_ERANGE;
+ /* Build the table for single byte characters. */
+ for (ch = 0; ch < SBC_MAX; ++ch)
+ if (start_ch <= ch && ch <= end_ch)
+ bitset_set (sbcset, ch);
+ }
+# endif /* not RE_ENABLE_I18N */
+ return REG_NOERROR;
+}
+#endif /* not _LIBC */
+
+#ifndef _LIBC
+/* Helper function for parse_bracket_exp only used in case of NOT _LIBC..
+ Build the collating element which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
+ pointer argument since we may update it. */
+
+static reg_errcode_t
+internal_function
+build_collating_symbol (bitset_t sbcset,
+# ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset, Idx *coll_sym_alloc,
+# endif
+ const unsigned char *name)
+{
+ size_t name_len = strlen ((const char *) name);
+ if (BE (name_len != 1, 0))
+ return REG_ECOLLATE;
+ else
+ {
+ bitset_set (sbcset, name[0]);
+ return REG_NOERROR;
+ }
+}
+#endif /* not _LIBC */
+
+/* This function parse bracket expression like "[abc]", "[a-c]",
+ "[[.a-a.]]" etc. */
+
+static bin_tree_t *
+parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
+ reg_syntax_t syntax, reg_errcode_t *err)
+{
+#ifdef _LIBC
+ const unsigned char *collseqmb;
+ const char *collseqwc;
+ uint32_t nrules;
+ int32_t table_size;
+ const int32_t *symb_table;
+ const unsigned char *extra;
+
+ /* Local function for parse_bracket_exp used in _LIBC environement.
+ Seek the collating symbol entry correspondings to NAME.
+ Return the index of the symbol in the SYMB_TABLE. */
+
+ auto inline int32_t
+ __attribute ((always_inline))
+ seek_collating_symbol_entry (name, name_len)
+ const unsigned char *name;
+ size_t name_len;
+ {
+ int32_t hash = elem_hash ((const char *) name, name_len);
+ int32_t elem = hash % table_size;
+ if (symb_table[2 * elem] != 0)
+ {
+ int32_t second = hash % (table_size - 2) + 1;
+
+ do
+ {
+ /* First compare the hashing value. */
+ if (symb_table[2 * elem] == hash
+ /* Compare the length of the name. */
+ && name_len == extra[symb_table[2 * elem + 1]]
+ /* Compare the name. */
+ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
+ name_len) == 0)
+ {
+ /* Yep, this is the entry. */
+ break;
+ }
+
+ /* Next entry. */
+ elem += second;
+ }
+ while (symb_table[2 * elem] != 0);
+ }
+ return elem;
+ }
+
+ /* Local function for parse_bracket_exp used in _LIBC environment.
+ Look up the collation sequence value of BR_ELEM.
+ Return the value if succeeded, UINT_MAX otherwise. */
+
+ auto inline unsigned int
+ __attribute ((always_inline))
+ lookup_collation_sequence_value (br_elem)
+ bracket_elem_t *br_elem;
+ {
+ if (br_elem->type == SB_CHAR)
+ {
+ /*
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+ return collseqmb[br_elem->opr.ch];
+ else
+ {
+ wint_t wc = __btowc (br_elem->opr.ch);
+ return __collseq_table_lookup (collseqwc, wc);
+ }
+ }
+ else if (br_elem->type == MB_CHAR)
+ {
+ if (nrules != 0)
+ return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
+ }
+ else if (br_elem->type == COLL_SYM)
+ {
+ size_t sym_name_len = strlen ((char *) br_elem->opr.name);
+ if (nrules != 0)
+ {
+ int32_t elem, idx;
+ elem = seek_collating_symbol_entry (br_elem->opr.name,
+ sym_name_len);
+ if (symb_table[2 * elem] != 0)
+ {
+ /* We found the entry. */
+ idx = symb_table[2 * elem + 1];
+ /* Skip the name of collating element name. */
+ idx += 1 + extra[idx];
+ /* Skip the byte sequence of the collating element. */
+ idx += 1 + extra[idx];
+ /* Adjust for the alignment. */
+ idx = (idx + 3) & ~3;
+ /* Skip the multibyte collation sequence value. */
+ idx += sizeof (unsigned int);
+ /* Skip the wide char sequence of the collating element. */
+ idx += sizeof (unsigned int) *
+ (1 + *(unsigned int *) (extra + idx));
+ /* Return the collation sequence value. */
+ return *(unsigned int *) (extra + idx);
+ }
+ else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
+ {
+ /* No valid character. Match it as a single byte
+ character. */
+ return collseqmb[br_elem->opr.name[0]];
+ }
+ }
+ else if (sym_name_len == 1)
+ return collseqmb[br_elem->opr.name[0]];
+ }
+ return UINT_MAX;
+ }
+
+ /* Local function for parse_bracket_exp used in _LIBC environement.
+ Build the range expression which starts from START_ELEM, and ends
+ at END_ELEM. The result are written to MBCSET and SBCSET.
+ RANGE_ALLOC is the allocated size of mbcset->range_starts, and
+ mbcset->range_ends, is a pointer argument sinse we may
+ update it. */
+
+ auto inline reg_errcode_t
+ __attribute ((always_inline))
+ build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
+ re_charset_t *mbcset;
+ Idx *range_alloc;
+ bitset_t sbcset;
+ bracket_elem_t *start_elem, *end_elem;
+ {
+ unsigned int ch;
+ uint32_t start_collseq;
+ uint32_t end_collseq;
+
+ /* Equivalence Classes and Character Classes can't be a range
+ start/end. */
+ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
+ 0))
+ return REG_ERANGE;
+
+ start_collseq = lookup_collation_sequence_value (start_elem);
+ end_collseq = lookup_collation_sequence_value (end_elem);
+ /* Check start/end collation sequence values. */
+ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0))
+ return REG_ECOLLATE;
+ if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0))
+ return REG_ERANGE;
+
+ /* Got valid collation sequence values, add them as a new entry.
+ However, if we have no collation elements, and the character set
+ is single byte, the single byte character set that we
+ build below suffices. */
+ if (nrules > 0 || dfa->mb_cur_max > 1)
+ {
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
+ {
+ /* There is not enough space, need realloc. */
+ uint32_t *new_array_start;
+ uint32_t *new_array_end;
+ Idx new_nranges;
+
+ /* +1 in case of mbcset->nranges is 0. */
+ new_nranges = 2 * mbcset->nranges + 1;
+ new_array_start = re_realloc (mbcset->range_starts, uint32_t,
+ new_nranges);
+ new_array_end = re_realloc (mbcset->range_ends, uint32_t,
+ new_nranges);
+
+ if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ return REG_ESPACE;
+
+ mbcset->range_starts = new_array_start;
+ mbcset->range_ends = new_array_end;
+ *range_alloc = new_nranges;
+ }
+
+ mbcset->range_starts[mbcset->nranges] = start_collseq;
+ mbcset->range_ends[mbcset->nranges++] = end_collseq;
+ }
+
+ /* Build the table for single byte characters. */
+ for (ch = 0; ch < SBC_MAX; ch++)
+ {
+ uint32_t ch_collseq;
+ /*
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+ ch_collseq = collseqmb[ch];
+ else
+ ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
+ if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
+ bitset_set (sbcset, ch);
+ }
+ return REG_NOERROR;
+ }
+
+ /* Local function for parse_bracket_exp used in _LIBC environement.
+ Build the collating element which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
+ pointer argument sinse we may update it. */
+
+ auto inline reg_errcode_t
+ __attribute ((always_inline))
+ build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
+ re_charset_t *mbcset;
+ Idx *coll_sym_alloc;
+ bitset_t sbcset;
+ const unsigned char *name;
+ {
+ int32_t elem, idx;
+ size_t name_len = strlen ((const char *) name);
+ if (nrules != 0)
+ {
+ elem = seek_collating_symbol_entry (name, name_len);
+ if (symb_table[2 * elem] != 0)
+ {
+ /* We found the entry. */
+ idx = symb_table[2 * elem + 1];
+ /* Skip the name of collating element name. */
+ idx += 1 + extra[idx];
+ }
+ else if (symb_table[2 * elem] == 0 && name_len == 1)
+ {
+ /* No valid character, treat it as a normal
+ character. */
+ bitset_set (sbcset, name[0]);
+ return REG_NOERROR;
+ }
+ else
+ return REG_ECOLLATE;
+
+ /* Got valid collation sequence, add it as a new entry. */
+ /* Check the space of the arrays. */
+ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0))
+ {
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->ncoll_syms is 0. */
+ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
+ /* Use realloc since mbcset->coll_syms is NULL
+ if *alloc == 0. */
+ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
+ new_coll_sym_alloc);
+ if (BE (new_coll_syms == NULL, 0))
+ return REG_ESPACE;
+ mbcset->coll_syms = new_coll_syms;
+ *coll_sym_alloc = new_coll_sym_alloc;
+ }
+ mbcset->coll_syms[mbcset->ncoll_syms++] = idx;
+ return REG_NOERROR;
+ }
+ else
+ {
+ if (BE (name_len != 1, 0))
+ return REG_ECOLLATE;
+ else
+ {
+ bitset_set (sbcset, name[0]);
+ return REG_NOERROR;
+ }
+ }
+ }
+#endif
+
+ re_token_t br_token;
+ re_bitset_ptr_t sbcset;
+#ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset;
+ Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
+ Idx equiv_class_alloc = 0, char_class_alloc = 0;
+#endif /* not RE_ENABLE_I18N */
+ bool non_match = false;
+ bin_tree_t *work_tree;
+ int token_len;
+ bool first_round = true;
+#ifdef _LIBC
+ collseqmb = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules)
+ {
+ /*
+ if (MB_CUR_MAX > 1)
+ */
+ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+ table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB);
+ symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_TABLEMB);
+ extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_EXTRAMB);
+ }
+#endif
+ sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+#ifdef RE_ENABLE_I18N
+ mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+#endif /* RE_ENABLE_I18N */
+#ifdef RE_ENABLE_I18N
+ if (BE (sbcset == NULL || mbcset == NULL, 0))
+#else
+ if (BE (sbcset == NULL, 0))
+#endif /* RE_ENABLE_I18N */
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ token_len = peek_token_bracket (token, regexp, syntax);
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_BADPAT;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token->type == OP_NON_MATCH_LIST)
+ {
+#ifdef RE_ENABLE_I18N
+ mbcset->non_match = 1;
+#endif /* not RE_ENABLE_I18N */
+ non_match = true;
+ if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
+ bitset_set (sbcset, '\n');
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+ token_len = peek_token_bracket (token, regexp, syntax);
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_BADPAT;
+ goto parse_bracket_exp_free_return;
+ }
+ }
+
+ /* We treat the first ']' as a normal character. */
+ if (token->type == OP_CLOSE_BRACKET)
+ token->type = CHARACTER;
+
+ while (1)
+ {
+ bracket_elem_t start_elem, end_elem;
+ unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE];
+ unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE];
+ reg_errcode_t ret;
+ int token_len2 = 0;
+ bool is_range_exp = false;
+ re_token_t token2;
+
+ start_elem.opr.name = start_name_buf;
+ ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa,
+ syntax, first_round);
+ if (BE (ret != REG_NOERROR, 0))
+ {
+ *err = ret;
+ goto parse_bracket_exp_free_return;
+ }
+ first_round = false;
+
+ /* Get information about the next token. We need it in any case. */
+ token_len = peek_token_bracket (token, regexp, syntax);
+
+ /* Do not check for ranges if we know they are not allowed. */
+ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS)
+ {
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_EBRACK;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token->type == OP_CHARSET_RANGE)
+ {
+ re_string_skip_bytes (regexp, token_len); /* Skip '-'. */
+ token_len2 = peek_token_bracket (&token2, regexp, syntax);
+ if (BE (token2.type == END_OF_RE, 0))
+ {
+ *err = REG_EBRACK;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token2.type == OP_CLOSE_BRACKET)
+ {
+ /* We treat the last '-' as a normal character. */
+ re_string_skip_bytes (regexp, -token_len);
+ token->type = CHARACTER;
+ }
+ else
+ is_range_exp = true;
+ }
+ }
+
+ if (is_range_exp == true)
+ {
+ end_elem.opr.name = end_name_buf;
+ ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
+ dfa, syntax, true);
+ if (BE (ret != REG_NOERROR, 0))
+ {
+ *err = ret;
+ goto parse_bracket_exp_free_return;
+ }
+
+ token_len = peek_token_bracket (token, regexp, syntax);
+
+#ifdef _LIBC
+ *err = build_range_exp (sbcset, mbcset, &range_alloc,
+ &start_elem, &end_elem);
+#else
+# ifdef RE_ENABLE_I18N
+ *err = build_range_exp (syntax, sbcset,
+ dfa->mb_cur_max > 1 ? mbcset : NULL,
+ &range_alloc, &start_elem, &end_elem);
+# else
+ *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem);
+# endif
+#endif /* RE_ENABLE_I18N */
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ }
+ else
+ {
+ switch (start_elem.type)
+ {
+ case SB_CHAR:
+ bitset_set (sbcset, start_elem.opr.ch);
+ break;
+#ifdef RE_ENABLE_I18N
+ case MB_CHAR:
+ /* Check whether the array has enough space. */
+ if (BE (mbchar_alloc == mbcset->nmbchars, 0))
+ {
+ wchar_t *new_mbchars;
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->nmbchars is 0. */
+ mbchar_alloc = 2 * mbcset->nmbchars + 1;
+ /* Use realloc since array is NULL if *alloc == 0. */
+ new_mbchars = re_realloc (mbcset->mbchars, wchar_t,
+ mbchar_alloc);
+ if (BE (new_mbchars == NULL, 0))
+ goto parse_bracket_exp_espace;
+ mbcset->mbchars = new_mbchars;
+ }
+ mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
+ break;
+#endif /* RE_ENABLE_I18N */
+ case EQUIV_CLASS:
+ *err = build_equiv_class (sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &equiv_class_alloc,
+#endif /* RE_ENABLE_I18N */
+ start_elem.opr.name);
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ break;
+ case COLL_SYM:
+ *err = build_collating_symbol (sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &coll_sym_alloc,
+#endif /* RE_ENABLE_I18N */
+ start_elem.opr.name);
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ break;
+ case CHAR_CLASS:
+ *err = build_charclass (regexp->trans, sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &char_class_alloc,
+#endif /* RE_ENABLE_I18N */
+ start_elem.opr.name, syntax);
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ break;
+ default:
+ assert (0);
+ break;
+ }
+ }
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_EBRACK;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token->type == OP_CLOSE_BRACKET)
+ break;
+ }
+
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+
+ /* If it is non-matching list. */
+ if (non_match)
+ bitset_not (sbcset);
+
+#ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+ if (dfa->mb_cur_max > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+
+ if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes
+ || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes
+ || mbcset->non_match)))
+ {
+ bin_tree_t *mbc_tree;
+ int sbc_idx;
+ /* Build a tree for complex bracket. */
+ dfa->has_mb_node = 1;
+ br_token.type = COMPLEX_BRACKET;
+ br_token.opr.mbcset = mbcset;
+ mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (mbc_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+ for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx)
+ if (sbcset[sbc_idx])
+ break;
+ /* If there are no bits set in sbcset, there is no point
+ of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */
+ if (sbc_idx < BITSET_WORDS)
+ {
+ /* Build a tree for simple bracket. */
+ br_token.type = SIMPLE_BRACKET;
+ br_token.opr.sbcset = sbcset;
+ work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+
+ /* Then join them by ALT node. */
+ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+ }
+ else
+ {
+ re_free (sbcset);
+ work_tree = mbc_tree;
+ }
+ }
+ else
+#endif /* not RE_ENABLE_I18N */
+ {
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif
+ /* Build a tree for simple bracket. */
+ br_token.type = SIMPLE_BRACKET;
+ br_token.opr.sbcset = sbcset;
+ work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+ }
+ return work_tree;
+
+ parse_bracket_exp_espace:
+ *err = REG_ESPACE;
+ parse_bracket_exp_free_return:
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+ return NULL;
+}
+
+/* Parse an element in the bracket expression. */
+
+static reg_errcode_t
+parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
+ re_token_t *token, int token_len, re_dfa_t *dfa,
+ reg_syntax_t syntax, bool accept_hyphen)
+{
+#ifdef RE_ENABLE_I18N
+ int cur_char_size;
+ cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp));
+ if (cur_char_size > 1)
+ {
+ elem->type = MB_CHAR;
+ elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp));
+ re_string_skip_bytes (regexp, cur_char_size);
+ return REG_NOERROR;
+ }
+#endif /* RE_ENABLE_I18N */
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
+ || token->type == OP_OPEN_EQUIV_CLASS)
+ return parse_bracket_symbol (elem, regexp, token);
+ if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen)
+ {
+ /* A '-' must only appear as anything but a range indicator before
+ the closing bracket. Everything else is an error. */
+ re_token_t token2;
+ (void) peek_token_bracket (&token2, regexp, syntax);
+ if (token2.type != OP_CLOSE_BRACKET)
+ /* The actual error value is not standardized since this whole
+ case is undefined. But ERANGE makes good sense. */
+ return REG_ERANGE;
+ }
+ elem->type = SB_CHAR;
+ elem->opr.ch = token->opr.c;
+ return REG_NOERROR;
+}
+
+/* Parse a bracket symbol in the bracket expression. Bracket symbols are
+ such as [:<character_class>:], [.<collating_element>.], and
+ [=<equivalent_class>=]. */
+
+static reg_errcode_t
+parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
+ re_token_t *token)
+{
+ unsigned char ch, delim = token->opr.c;
+ int i = 0;
+ if (re_string_eoi(regexp))
+ return REG_EBRACK;
+ for (;; ++i)
+ {
+ if (i >= BRACKET_NAME_BUF_SIZE)
+ return REG_EBRACK;
+ if (token->type == OP_OPEN_CHAR_CLASS)
+ ch = re_string_fetch_byte_case (regexp);
+ else
+ ch = re_string_fetch_byte (regexp);
+ if (re_string_eoi(regexp))
+ return REG_EBRACK;
+ if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
+ break;
+ elem->opr.name[i] = ch;
+ }
+ re_string_skip_bytes (regexp, 1);
+ elem->opr.name[i] = '\0';
+ switch (token->type)
+ {
+ case OP_OPEN_COLL_ELEM:
+ elem->type = COLL_SYM;
+ break;
+ case OP_OPEN_EQUIV_CLASS:
+ elem->type = EQUIV_CLASS;
+ break;
+ case OP_OPEN_CHAR_CLASS:
+ elem->type = CHAR_CLASS;
+ break;
+ default:
+ break;
+ }
+ return REG_NOERROR;
+}
+
+ /* Helper function for parse_bracket_exp.
+ Build the equivalence class which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
+ is a pointer argument sinse we may update it. */
+
+static reg_errcode_t
+#ifdef RE_ENABLE_I18N
+build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
+ Idx *equiv_class_alloc, const unsigned char *name)
+#else /* not RE_ENABLE_I18N */
+build_equiv_class (bitset_t sbcset, const unsigned char *name)
+#endif /* not RE_ENABLE_I18N */
+{
+#ifdef _LIBC
+ uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+ const int32_t *table, *indirect;
+ const unsigned char *weights, *extra, *cp;
+ unsigned char char_buf[2];
+ int32_t idx1, idx2;
+ unsigned int ch;
+ size_t len;
+ /* This #include defines a local function! */
+# include <locale/weight.h>
+ /* Calculate the index for equivalence class. */
+ cp = name;
+ table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_WEIGHTMB);
+ extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_INDIRECTMB);
+ idx1 = findidx (&cp);
+ if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+ /* This isn't a valid character. */
+ return REG_ECOLLATE;
+
+ /* Build single byte matcing table for this equivalence class. */
+ char_buf[1] = (unsigned char) '\0';
+ len = weights[idx1 & 0xffffff];
+ for (ch = 0; ch < SBC_MAX; ++ch)
+ {
+ char_buf[0] = ch;
+ cp = char_buf;
+ idx2 = findidx (&cp);
+/*
+ idx2 = table[ch];
+*/
+ if (idx2 == 0)
+ /* This isn't a valid character. */
+ continue;
+ /* Compare only if the length matches and the collation rule
+ index is the same. */
+ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24))
+ {
+ int cnt = 0;
+
+ while (cnt <= len &&
+ weights[(idx1 & 0xffffff) + 1 + cnt]
+ == weights[(idx2 & 0xffffff) + 1 + cnt])
+ ++cnt;
+
+ if (cnt > len)
+ bitset_set (sbcset, ch);
+ }
+ }
+ /* Check whether the array has enough space. */
+ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0))
+ {
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->nequiv_classes is 0. */
+ Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1;
+ /* Use realloc since the array is NULL if *alloc == 0. */
+ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes,
+ int32_t,
+ new_equiv_class_alloc);
+ if (BE (new_equiv_classes == NULL, 0))
+ return REG_ESPACE;
+ mbcset->equiv_classes = new_equiv_classes;
+ *equiv_class_alloc = new_equiv_class_alloc;
+ }
+ mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;
+ }
+ else
+#endif /* _LIBC */
+ {
+ if (BE (strlen ((const char *) name) != 1, 0))
+ return REG_ECOLLATE;
+ bitset_set (sbcset, *name);
+ }
+ return REG_NOERROR;
+}
+
+ /* Helper function for parse_bracket_exp.
+ Build the character class which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
+ is a pointer argument sinse we may update it. */
+
+static reg_errcode_t
+#ifdef RE_ENABLE_I18N
+build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+ re_charset_t *mbcset, Idx *char_class_alloc,
+ const unsigned char *class_name, reg_syntax_t syntax)
+#else /* not RE_ENABLE_I18N */
+build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+ const unsigned char *class_name, reg_syntax_t syntax)
+#endif /* not RE_ENABLE_I18N */
+{
+ int i;
+ const char *name = (const char *) class_name;
+
+ /* In case of REG_ICASE "upper" and "lower" match the both of
+ upper and lower cases. */
+ if ((syntax & RE_ICASE)
+ && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0))
+ name = "alpha";
+
+#ifdef RE_ENABLE_I18N
+ /* Check the space of the arrays. */
+ if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
+ {
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->nchar_classes is 0. */
+ Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1;
+ /* Use realloc since array is NULL if *alloc == 0. */
+ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t,
+ new_char_class_alloc);
+ if (BE (new_char_classes == NULL, 0))
+ return REG_ESPACE;
+ mbcset->char_classes = new_char_classes;
+ *char_class_alloc = new_char_class_alloc;
+ }
+ mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
+#endif /* RE_ENABLE_I18N */
+
+#define BUILD_CHARCLASS_LOOP(ctype_func) \
+ do { \
+ if (BE (trans != NULL, 0)) \
+ { \
+ for (i = 0; i < SBC_MAX; ++i) \
+ if (ctype_func (i)) \
+ bitset_set (sbcset, trans[i]); \
+ } \
+ else \
+ { \
+ for (i = 0; i < SBC_MAX; ++i) \
+ if (ctype_func (i)) \
+ bitset_set (sbcset, i); \
+ } \
+ } while (0)
+
+ if (strcmp (name, "alnum") == 0)
+ BUILD_CHARCLASS_LOOP (isalnum);
+ else if (strcmp (name, "cntrl") == 0)
+ BUILD_CHARCLASS_LOOP (iscntrl);
+ else if (strcmp (name, "lower") == 0)
+ BUILD_CHARCLASS_LOOP (islower);
+ else if (strcmp (name, "space") == 0)
+ BUILD_CHARCLASS_LOOP (isspace);
+ else if (strcmp (name, "alpha") == 0)
+ BUILD_CHARCLASS_LOOP (isalpha);
+ else if (strcmp (name, "digit") == 0)
+ BUILD_CHARCLASS_LOOP (isdigit);
+ else if (strcmp (name, "print") == 0)
+ BUILD_CHARCLASS_LOOP (isprint);
+ else if (strcmp (name, "upper") == 0)
+ BUILD_CHARCLASS_LOOP (isupper);
+ else if (strcmp (name, "blank") == 0)
+ BUILD_CHARCLASS_LOOP (isblank);
+ else if (strcmp (name, "graph") == 0)
+ BUILD_CHARCLASS_LOOP (isgraph);
+ else if (strcmp (name, "punct") == 0)
+ BUILD_CHARCLASS_LOOP (ispunct);
+ else if (strcmp (name, "xdigit") == 0)
+ BUILD_CHARCLASS_LOOP (isxdigit);
+ else
+ return REG_ECTYPE;
+
+ return REG_NOERROR;
+}
+
+static bin_tree_t *
+build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
+ const unsigned char *class_name,
+ const unsigned char *extra, bool non_match,
+ reg_errcode_t *err)
+{
+ re_bitset_ptr_t sbcset;
+#ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset;
+ Idx alloc = 0;
+#endif /* not RE_ENABLE_I18N */
+ reg_errcode_t ret;
+ re_token_t br_token;
+ bin_tree_t *tree;
+
+ sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+#ifdef RE_ENABLE_I18N
+ mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+#endif /* RE_ENABLE_I18N */
+
+#ifdef RE_ENABLE_I18N
+ if (BE (sbcset == NULL || mbcset == NULL, 0))
+#else /* not RE_ENABLE_I18N */
+ if (BE (sbcset == NULL, 0))
+#endif /* not RE_ENABLE_I18N */
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ if (non_match)
+ {
+#ifdef RE_ENABLE_I18N
+ mbcset->non_match = 1;
+#endif /* not RE_ENABLE_I18N */
+ }
+
+ /* We don't care the syntax in this case. */
+ ret = build_charclass (trans, sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &alloc,
+#endif /* RE_ENABLE_I18N */
+ class_name, 0);
+
+ if (BE (ret != REG_NOERROR, 0))
+ {
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+ *err = ret;
+ return NULL;
+ }
+ /* \w match '_' also. */
+ for (; *extra; extra++)
+ bitset_set (sbcset, *extra);
+
+ /* If it is non-matching list. */
+ if (non_match)
+ bitset_not (sbcset);
+
+#ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+ if (dfa->mb_cur_max > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+#endif
+
+ /* Build a tree for simple bracket. */
+ br_token.type = SIMPLE_BRACKET;
+ br_token.opr.sbcset = sbcset;
+ tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (tree == NULL, 0))
+ goto build_word_op_espace;
+
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ bin_tree_t *mbc_tree;
+ /* Build a tree for complex bracket. */
+ br_token.type = COMPLEX_BRACKET;
+ br_token.opr.mbcset = mbcset;
+ dfa->has_mb_node = 1;
+ mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (mbc_tree == NULL, 0))
+ goto build_word_op_espace;
+ /* Then join them by ALT node. */
+ tree = create_tree (dfa, tree, mbc_tree, OP_ALT);
+ if (BE (mbc_tree != NULL, 1))
+ return tree;
+ }
+ else
+ {
+ free_charset (mbcset);
+ return tree;
+ }
+#else /* not RE_ENABLE_I18N */
+ return tree;
+#endif /* not RE_ENABLE_I18N */
+
+ build_word_op_espace:
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+ *err = REG_ESPACE;
+ return NULL;
+}
+
+/* This is intended for the expressions like "a{1,3}".
+ Fetch a number from `input', and return the number.
+ Return REG_MISSING if the number field is empty like "{,1}".
+ Return REG_ERROR if an error occurred. */
+
+static Idx
+fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
+{
+ Idx num = REG_MISSING;
+ unsigned char c;
+ while (1)
+ {
+ fetch_token (token, input, syntax);
+ c = token->opr.c;
+ if (BE (token->type == END_OF_RE, 0))
+ return REG_ERROR;
+ if (token->type == OP_CLOSE_DUP_NUM || c == ',')
+ break;
+ num = ((token->type != CHARACTER || c < '0' || '9' < c
+ || num == REG_ERROR)
+ ? REG_ERROR
+ : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0'));
+ num = (num > RE_DUP_MAX) ? REG_ERROR : num;
+ }
+ return num;
+}
+
+#ifdef RE_ENABLE_I18N
+static void
+free_charset (re_charset_t *cset)
+{
+ re_free (cset->mbchars);
+# ifdef _LIBC
+ re_free (cset->coll_syms);
+ re_free (cset->equiv_classes);
+ re_free (cset->range_starts);
+ re_free (cset->range_ends);
+# endif
+ re_free (cset->char_classes);
+ re_free (cset);
+}
+#endif /* RE_ENABLE_I18N */
+
+/* Functions for binary tree operation. */
+
+/* Create a tree node. */
+
+static bin_tree_t *
+create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
+ re_token_type_t type)
+{
+ re_token_t t;
+ t.type = type;
+ return create_token_tree (dfa, left, right, &t);
+}
+
+static bin_tree_t *
+create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
+ const re_token_t *token)
+{
+ bin_tree_t *tree;
+ if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0))
+ {
+ bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1);
+
+ if (storage == NULL)
+ return NULL;
+ storage->next = dfa->str_tree_storage;
+ dfa->str_tree_storage = storage;
+ dfa->str_tree_storage_idx = 0;
+ }
+ tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++];
+
+ tree->parent = NULL;
+ tree->left = left;
+ tree->right = right;
+ tree->token = *token;
+ tree->token.duplicated = 0;
+ tree->token.opt_subexp = 0;
+ tree->first = NULL;
+ tree->next = NULL;
+ tree->node_idx = REG_MISSING;
+
+ if (left != NULL)
+ left->parent = tree;
+ if (right != NULL)
+ right->parent = tree;
+ return tree;
+}
+
+/* Mark the tree SRC as an optional subexpression.
+ To be called from preorder or postorder. */
+
+static reg_errcode_t
+mark_opt_subexp (void *extra, bin_tree_t *node)
+{
+ Idx idx = (Idx) (long) extra;
+ if (node->token.type == SUBEXP && node->token.opr.idx == idx)
+ node->token.opt_subexp = 1;
+
+ return REG_NOERROR;
+}
+
+/* Free the allocated memory inside NODE. */
+
+static void
+free_token (re_token_t *node)
+{
+#ifdef RE_ENABLE_I18N
+ if (node->type == COMPLEX_BRACKET && node->duplicated == 0)
+ free_charset (node->opr.mbcset);
+ else
+#endif /* RE_ENABLE_I18N */
+ if (node->type == SIMPLE_BRACKET && node->duplicated == 0)
+ re_free (node->opr.sbcset);
+}
+
+/* Worker function for tree walking. Free the allocated memory inside NODE
+ and its children. */
+
+static reg_errcode_t
+free_tree (void *extra, bin_tree_t *node)
+{
+ free_token (&node->token);
+ return REG_NOERROR;
+}
+
+
+/* Duplicate the node SRC, and return new node. This is a preorder
+ visit similar to the one implemented by the generic visitor, but
+ we need more infrastructure to maintain two parallel trees --- so,
+ it's easier to duplicate. */
+
+static bin_tree_t *
+duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa)
+{
+ const bin_tree_t *node;
+ bin_tree_t *dup_root;
+ bin_tree_t **p_new = &dup_root, *dup_node = root->parent;
+
+ for (node = root; ; )
+ {
+ /* Create a new tree and link it back to the current parent. */
+ *p_new = create_token_tree (dfa, NULL, NULL, &node->token);
+ if (*p_new == NULL)
+ return NULL;
+ (*p_new)->parent = dup_node;
+ (*p_new)->token.duplicated = 1;
+ dup_node = *p_new;
+
+ /* Go to the left node, or up and to the right. */
+ if (node->left)
+ {
+ node = node->left;
+ p_new = &dup_node->left;
+ }
+ else
+ {
+ const bin_tree_t *prev = NULL;
+ while (node->right == prev || node->right == NULL)
+ {
+ prev = node;
+ node = node->parent;
+ dup_node = dup_node->parent;
+ if (!node)
+ return dup_root;
+ }
+ node = node->right;
+ p_new = &dup_node->right;
+ }
+ }
+}
diff --git a/grub-core/gnulib/regex.c b/grub-core/gnulib/regex.c
new file mode 100644
index 0000000..ba0eebe
--- /dev/null
+++ b/grub-core/gnulib/regex.c
@@ -0,0 +1,72 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Make sure noone compiles this code with a C++ compiler. */
+#if defined __cplusplus && defined _LIBC
+# error "This is C code, use a C compiler"
+#endif
+
+#ifdef _LIBC
+/* We have to keep the namespace clean. */
+# define regfree(preg) __regfree (preg)
+# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
+# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
+# define regerror(errcode, preg, errbuf, errbuf_size) \
+ __regerror(errcode, preg, errbuf, errbuf_size)
+# define re_set_registers(bu, re, nu, st, en) \
+ __re_set_registers (bu, re, nu, st, en)
+# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
+ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
+# define re_match(bufp, string, size, pos, regs) \
+ __re_match (bufp, string, size, pos, regs)
+# define re_search(bufp, string, size, startpos, range, regs) \
+ __re_search (bufp, string, size, startpos, range, regs)
+# define re_compile_pattern(pattern, length, bufp) \
+ __re_compile_pattern (pattern, length, bufp)
+# define re_set_syntax(syntax) __re_set_syntax (syntax)
+# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
+ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
+# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
+
+# include "../locale/localeinfo.h"
+#endif
+
+/* On some systems, limits.h sets RE_DUP_MAX to a lower value than
+ GNU regex allows. Include it before <regex.h>, which correctly
+ #undefs RE_DUP_MAX and sets it to the right value. */
+#include <limits.h>
+
+#include <regex.h>
+#include "regex_internal.h"
+
+#include "regex_internal.c"
+#include "regcomp.c"
+#include "regexec.c"
+
+/* Binary backward compatibility. */
+#if _LIBC
+# include <shlib-compat.h>
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
+link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
+int re_max_failures = 2000;
+# endif
+#endif
diff --git a/grub-core/gnulib/regex.h b/grub-core/gnulib/regex.h
new file mode 100644
index 0000000..e8bd549
--- /dev/null
+++ b/grub-core/gnulib/regex.h
@@ -0,0 +1,676 @@
+/* Definitions for data structures and routines for the regular
+ expression library.
+ Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1998,
+ 2000, 2001, 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _REGEX_H
+#define _REGEX_H 1
+
+#include <sys/types.h>
+
+/* Allow the use in C++ code. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define __USE_GNU_REGEX to declare GNU extensions that violate the
+ POSIX name space rules. */
+#undef __USE_GNU_REGEX
+#if (defined _GNU_SOURCE \
+ || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \
+ && !defined _XOPEN_SOURCE))
+# define __USE_GNU_REGEX 1
+#endif
+
+#ifdef _REGEX_LARGE_OFFSETS
+
+/* Use types and values that are wide enough to represent signed and
+ unsigned byte offsets in memory. This currently works only when
+ the regex code is used outside of the GNU C library; it is not yet
+ supported within glibc itself, and glibc users should not define
+ _REGEX_LARGE_OFFSETS. */
+
+/* The type of the offset of a byte within a string.
+ For historical reasons POSIX 1003.1-2004 requires that regoff_t be
+ at least as wide as off_t. However, many common POSIX platforms set
+ regoff_t to the more-sensible ssize_t and the Open Group has
+ signalled its intention to change the requirement to be that
+ regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
+ 60 (2005-08-25). We don't know of any hosts where ssize_t or
+ ptrdiff_t is wider than ssize_t, so ssize_t is safe. */
+typedef ssize_t regoff_t;
+
+/* The type of nonnegative object indexes. Traditionally, GNU regex
+ uses 'int' for these. Code that uses __re_idx_t should work
+ regardless of whether the type is signed. */
+typedef size_t __re_idx_t;
+
+/* The type of object sizes. */
+typedef size_t __re_size_t;
+
+/* The type of object sizes, in places where the traditional code
+ uses unsigned long int. */
+typedef size_t __re_long_size_t;
+
+#else
+
+/* Use types that are binary-compatible with the traditional GNU regex
+ implementation, which mishandles strings longer than INT_MAX. */
+
+typedef int regoff_t;
+typedef int __re_idx_t;
+typedef unsigned int __re_size_t;
+typedef unsigned long int __re_long_size_t;
+
+#endif
+
+/* The following two types have to be signed and unsigned integer type
+ wide enough to hold a value of a pointer. For most ANSI compilers
+ ptrdiff_t and size_t should be likely OK. Still size of these two
+ types is 2 for Microsoft C. Ugh... */
+typedef long int s_reg_t;
+typedef unsigned long int active_reg_t;
+
+/* The following bits are used to determine the regexp syntax we
+ recognize. The set/not-set meanings are chosen so that Emacs syntax
+ remains the value 0. The bits are given in alphabetical order, and
+ the definitions shifted by one from the previous bit; thus, when we
+ add or remove a bit, only one other definition need change. */
+typedef unsigned long int reg_syntax_t;
+
+#ifdef __USE_GNU_REGEX
+
+/* If this bit is not set, then \ inside a bracket expression is literal.
+ If set, then such a \ quotes the following character. */
+# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+
+/* If this bit is not set, then + and ? are operators, and \+ and \? are
+ literals.
+ If set, then \+ and \? are operators and + and ? are literals. */
+# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+
+/* If this bit is set, then character classes are supported. They are:
+ [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
+ [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
+ If not set, then character classes are not supported. */
+# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+
+/* If this bit is set, then ^ and $ are always anchors (outside bracket
+ expressions, of course).
+ If this bit is not set, then it depends:
+ ^ is an anchor if it is at the beginning of a regular
+ expression or after an open-group or an alternation operator;
+ $ is an anchor if it is at the end of a regular expression, or
+ before a close-group or an alternation operator.
+
+ This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
+ POSIX draft 11.2 says that * etc. in leading positions is undefined.
+ We already implemented a previous draft which made those constructs
+ invalid, though, so we haven't changed the code back. */
+# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+
+/* If this bit is set, then special characters are always special
+ regardless of where they are in the pattern.
+ If this bit is not set, then special characters are special only in
+ some contexts; otherwise they are ordinary. Specifically,
+ * + ? and intervals are only special when not after the beginning,
+ open-group, or alternation operator. */
+# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+
+/* If this bit is set, then *, +, ?, and { cannot be first in an re or
+ immediately after an alternation or begin-group operator. */
+# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+
+/* If this bit is set, then . matches newline.
+ If not set, then it doesn't. */
+# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+
+/* If this bit is set, then . doesn't match NUL.
+ If not set, then it does. */
+# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+
+/* If this bit is set, nonmatching lists [^...] do not match newline.
+ If not set, they do. */
+# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+
+/* If this bit is set, either \{...\} or {...} defines an
+ interval, depending on RE_NO_BK_BRACES.
+ If not set, \{, \}, {, and } are literals. */
+# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+
+/* If this bit is set, +, ? and | aren't recognized as operators.
+ If not set, they are. */
+# define RE_LIMITED_OPS (RE_INTERVALS << 1)
+
+/* If this bit is set, newline is an alternation operator.
+ If not set, newline is literal. */
+# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+
+/* If this bit is set, then `{...}' defines an interval, and \{ and \}
+ are literals.
+ If not set, then `\{...\}' defines an interval. */
+# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+
+/* If this bit is set, (...) defines a group, and \( and \) are literals.
+ If not set, \(...\) defines a group, and ( and ) are literals. */
+# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+
+/* If this bit is set, then \<digit> matches <digit>.
+ If not set, then \<digit> is a back-reference. */
+# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+
+/* If this bit is set, then | is an alternation operator, and \| is literal.
+ If not set, then \| is an alternation operator, and | is literal. */
+# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+
+/* If this bit is set, then an ending range point collating higher
+ than the starting range point, as in [z-a], is invalid.
+ If not set, then when ending range point collates higher than the
+ starting range point, the range is ignored. */
+# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+
+/* If this bit is set, then an unmatched ) is ordinary.
+ If not set, then an unmatched ) is invalid. */
+# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+
+/* If this bit is set, succeed as soon as we match the whole pattern,
+ without further backtracking. */
+# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+
+/* If this bit is set, do not process the GNU regex operators.
+ If not set, then the GNU regex operators are recognized. */
+# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+
+/* If this bit is set, turn on internal regex debugging.
+ If not set, and debugging was on, turn it off.
+ This only works if regex.c is compiled -DDEBUG.
+ We define this bit always, so that all that's needed to turn on
+ debugging is to recompile regex.c; the calling code can always have
+ this bit set, and it won't affect anything in the normal case. */
+# define RE_DEBUG (RE_NO_GNU_OPS << 1)
+
+/* If this bit is set, a syntactically invalid interval is treated as
+ a string of ordinary characters. For example, the ERE 'a{1' is
+ treated as 'a\{1'. */
+# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+
+/* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
+
+/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
+ for ^, because it is difficult to scan the regex backwards to find
+ whether ^ should be special. */
+# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
+
+/* If this bit is set, then \{ cannot be first in a regex or
+ immediately after an alternation, open-group or \} operator. */
+# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
+
+/* If this bit is set, then no_sub will be set to 1 during
+ re_compile_pattern. */
+# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+
+#endif /* defined __USE_GNU_REGEX */
+
+/* This global variable defines the particular regexp syntax to use (for
+ some interfaces). When a regexp is compiled, the syntax used is
+ stored in the pattern buffer, so changing this does not affect
+ already-compiled regexps. */
+extern reg_syntax_t re_syntax_options;
+
+#ifdef __USE_GNU_REGEX
+/* Define combinations of the above bits for the standard possibilities.
+ (The [[[ comments delimit what gets put into the Texinfo file, so
+ don't delete them!) */
+/* [[[begin syntaxes]]] */
+# define RE_SYNTAX_EMACS 0
+
+# define RE_SYNTAX_AWK \
+ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
+ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
+
+# define RE_SYNTAX_GNU_AWK \
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
+ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \
+ | RE_CONTEXT_INVALID_OPS ))
+
+# define RE_SYNTAX_POSIX_AWK \
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
+ | RE_INTERVALS | RE_NO_GNU_OPS)
+
+# define RE_SYNTAX_GREP \
+ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
+ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
+ | RE_NEWLINE_ALT)
+
+# define RE_SYNTAX_EGREP \
+ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
+ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
+ | RE_NO_BK_VBAR)
+
+# define RE_SYNTAX_POSIX_EGREP \
+ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
+ | RE_INVALID_INTERVAL_ORD)
+
+/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
+# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
+# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+
+/* Syntax bits common to both basic and extended POSIX regex syntax. */
+# define _RE_SYNTAX_POSIX_COMMON \
+ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
+ | RE_INTERVALS | RE_NO_EMPTY_RANGES)
+
+# define RE_SYNTAX_POSIX_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
+
+/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+ RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
+ isn't minimal, since other operators, such as \`, aren't disabled. */
+# define RE_SYNTAX_POSIX_MINIMAL_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
+
+# define RE_SYNTAX_POSIX_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
+ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
+ removed and RE_NO_BK_REFS is added. */
+# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
+/* [[[end syntaxes]]] */
+
+#endif /* defined __USE_GNU_REGEX */
+
+#ifdef __USE_GNU_REGEX
+
+/* Maximum number of duplicates an interval can allow. POSIX-conforming
+ systems might define this in <limits.h>, but we want our
+ value, so remove any previous define. */
+# ifdef RE_DUP_MAX
+# undef RE_DUP_MAX
+# endif
+
+/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
+ the counter as a 2-byte signed integer. This is no longer true, so
+ RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
+ ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+ However, there would be a huge performance problem if someone
+ actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
+ its historical value. */
+# define RE_DUP_MAX (0x7fff)
+
+#endif /* defined __USE_GNU_REGEX */
+
+
+/* POSIX `cflags' bits (i.e., information for `regcomp'). */
+
+/* If this bit is set, then use extended regular expression syntax.
+ If not set, then use basic regular expression syntax. */
+#define REG_EXTENDED 1
+
+/* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+#define REG_ICASE (1 << 1)
+
+/* If this bit is set, then anchors do not match at newline
+ characters in the string.
+ If not set, then anchors do match at newlines. */
+#define REG_NEWLINE (1 << 2)
+
+/* If this bit is set, then report only success or fail in regexec.
+ If not set, then returns differ between not matching and errors. */
+#define REG_NOSUB (1 << 3)
+
+
+/* POSIX `eflags' bits (i.e., information for regexec). */
+
+/* If this bit is set, then the beginning-of-line operator doesn't match
+ the beginning of the string (presumably because it's not the
+ beginning of a line).
+ If not set, then the beginning-of-line operator does match the
+ beginning of the string. */
+#define REG_NOTBOL 1
+
+/* Like REG_NOTBOL, except for the end-of-line. */
+#define REG_NOTEOL (1 << 1)
+
+/* Use PMATCH[0] to delimit the start and end of the search in the
+ buffer. */
+#define REG_STARTEND (1 << 2)
+
+
+/* If any error codes are removed, changed, or added, update the
+ `__re_error_msgid' table in regcomp.c. */
+
+typedef enum
+{
+ _REG_ENOSYS = -1, /* This will never happen for this implementation. */
+ _REG_NOERROR = 0, /* Success. */
+ _REG_NOMATCH, /* Didn't find a match (for regexec). */
+
+ /* POSIX regcomp return error codes. (In the order listed in the
+ standard.) */
+ _REG_BADPAT, /* Invalid pattern. */
+ _REG_ECOLLATE, /* Invalid collating element. */
+ _REG_ECTYPE, /* Invalid character class name. */
+ _REG_EESCAPE, /* Trailing backslash. */
+ _REG_ESUBREG, /* Invalid back reference. */
+ _REG_EBRACK, /* Unmatched left bracket. */
+ _REG_EPAREN, /* Parenthesis imbalance. */
+ _REG_EBRACE, /* Unmatched \{. */
+ _REG_BADBR, /* Invalid contents of \{\}. */
+ _REG_ERANGE, /* Invalid range end. */
+ _REG_ESPACE, /* Ran out of memory. */
+ _REG_BADRPT, /* No preceding re for repetition op. */
+
+ /* Error codes we've added. */
+ _REG_EEND, /* Premature end. */
+ _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
+ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
+} reg_errcode_t;
+
+#ifdef _XOPEN_SOURCE
+# define REG_ENOSYS _REG_ENOSYS
+#endif
+#define REG_NOERROR _REG_NOERROR
+#define REG_NOMATCH _REG_NOMATCH
+#define REG_BADPAT _REG_BADPAT
+#define REG_ECOLLATE _REG_ECOLLATE
+#define REG_ECTYPE _REG_ECTYPE
+#define REG_EESCAPE _REG_EESCAPE
+#define REG_ESUBREG _REG_ESUBREG
+#define REG_EBRACK _REG_EBRACK
+#define REG_EPAREN _REG_EPAREN
+#define REG_EBRACE _REG_EBRACE
+#define REG_BADBR _REG_BADBR
+#define REG_ERANGE _REG_ERANGE
+#define REG_ESPACE _REG_ESPACE
+#define REG_BADRPT _REG_BADRPT
+#define REG_EEND _REG_EEND
+#define REG_ESIZE _REG_ESIZE
+#define REG_ERPAREN _REG_ERPAREN
+
+/* struct re_pattern_buffer normally uses member names like `buffer'
+ that POSIX does not allow. In POSIX mode these members have names
+ with leading `re_' (e.g., `re_buffer'). */
+#ifdef __USE_GNU_REGEX
+# define _REG_RE_NAME(id) id
+# define _REG_RM_NAME(id) id
+#else
+# define _REG_RE_NAME(id) re_##id
+# define _REG_RM_NAME(id) rm_##id
+#endif
+
+/* The user can specify the type of the re_translate member by
+ defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned
+ char *. This pollutes the POSIX name space, so in POSIX mode just
+ use unsigned char *. */
+#ifdef __USE_GNU_REGEX
+# ifndef RE_TRANSLATE_TYPE
+# define RE_TRANSLATE_TYPE unsigned char *
+# endif
+# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE
+#else
+# define REG_TRANSLATE_TYPE unsigned char *
+#endif
+
+/* This data structure represents a compiled pattern. Before calling
+ the pattern compiler, the fields `buffer', `allocated', `fastmap',
+ `translate', and `no_sub' can be set. After the pattern has been
+ compiled, the `re_nsub' field is available. All other fields are
+ private to the regex routines. */
+
+struct re_pattern_buffer
+{
+ /* Space that holds the compiled pattern. It is declared as
+ `unsigned char *' because its elements are sometimes used as
+ array indexes. */
+ unsigned char *_REG_RE_NAME (buffer);
+
+ /* Number of bytes to which `buffer' points. */
+ __re_long_size_t _REG_RE_NAME (allocated);
+
+ /* Number of bytes actually used in `buffer'. */
+ __re_long_size_t _REG_RE_NAME (used);
+
+ /* Syntax setting with which the pattern was compiled. */
+ reg_syntax_t _REG_RE_NAME (syntax);
+
+ /* Pointer to a fastmap, if any, otherwise zero. re_search uses the
+ fastmap, if there is one, to skip over impossible starting points
+ for matches. */
+ char *_REG_RE_NAME (fastmap);
+
+ /* Either a translate table to apply to all characters before
+ comparing them, or zero for no translation. The translation is
+ applied to a pattern when it is compiled and to a string when it
+ is matched. */
+ REG_TRANSLATE_TYPE _REG_RE_NAME (translate);
+
+ /* Number of subexpressions found by the compiler. */
+ size_t re_nsub;
+
+ /* Zero if this pattern cannot match the empty string, one else.
+ Well, in truth it's used only in `re_search_2', to see whether or
+ not we should use the fastmap, so we don't set this absolutely
+ perfectly; see `re_compile_fastmap' (the `duplicate' case). */
+ unsigned int _REG_RE_NAME (can_be_null) : 1;
+
+ /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+ for `max (RE_NREGS, re_nsub + 1)' groups.
+ If REGS_REALLOCATE, reallocate space if necessary.
+ If REGS_FIXED, use what's there. */
+#ifdef __USE_GNU_REGEX
+# define REGS_UNALLOCATED 0
+# define REGS_REALLOCATE 1
+# define REGS_FIXED 2
+#endif
+ unsigned int _REG_RE_NAME (regs_allocated) : 2;
+
+ /* Set to zero when `re_compile_pattern' compiles a pattern; set to
+ one by `re_compile_fastmap' if it updates the fastmap. */
+ unsigned int _REG_RE_NAME (fastmap_accurate) : 1;
+
+ /* If set, `re_match_2' does not return information about
+ subexpressions. */
+ unsigned int _REG_RE_NAME (no_sub) : 1;
+
+ /* If set, a beginning-of-line anchor doesn't match at the beginning
+ of the string. */
+ unsigned int _REG_RE_NAME (not_bol) : 1;
+
+ /* Similarly for an end-of-line anchor. */
+ unsigned int _REG_RE_NAME (not_eol) : 1;
+
+ /* If true, an anchor at a newline matches. */
+ unsigned int _REG_RE_NAME (newline_anchor) : 1;
+
+/* [[[end pattern_buffer]]] */
+};
+
+typedef struct re_pattern_buffer regex_t;
+
+/* This is the structure we store register match data in. See
+ regex.texinfo for a full description of what registers match. */
+struct re_registers
+{
+ __re_size_t _REG_RM_NAME (num_regs);
+ regoff_t *_REG_RM_NAME (start);
+ regoff_t *_REG_RM_NAME (end);
+};
+
+
+/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+ `re_match_2' returns information about at least this many registers
+ the first time a `regs' structure is passed. */
+#if !defined RE_NREGS && defined __USE_GNU_REGEX
+# define RE_NREGS 30
+#endif
+
+
+/* POSIX specification for registers. Aside from the different names than
+ `re_registers', POSIX uses an array of structures, instead of a
+ structure of arrays. */
+typedef struct
+{
+ regoff_t rm_so; /* Byte offset from string's start to substring's start. */
+ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
+} regmatch_t;
+
+/* Declarations for routines. */
+
+/* Sets the current default syntax to SYNTAX, and return the old syntax.
+ You can also simply assign to the `re_syntax_options' variable. */
+extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
+
+/* Compile the regular expression PATTERN, with length LENGTH
+ and syntax given by the global `re_syntax_options', into the buffer
+ BUFFER. Return NULL if successful, and an error string if not. */
+extern const char *re_compile_pattern (const char *__pattern, size_t __length,
+ struct re_pattern_buffer *__buffer);
+
+
+/* Compile a fastmap for the compiled pattern in BUFFER; used to
+ accelerate searches. Return 0 if successful and -2 if was an
+ internal error. */
+extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
+
+
+/* Search in the string STRING (with length LENGTH) for the pattern
+ compiled into BUFFER. Start searching at position START, for RANGE
+ characters. Return the starting position of the match, -1 for no
+ match, or -2 for an internal error. Also return register
+ information in REGS (if REGS and BUFFER->no_sub are nonzero). */
+extern regoff_t re_search (struct re_pattern_buffer *__buffer,
+ const char *__string, __re_idx_t __length,
+ __re_idx_t __start, regoff_t __range,
+ struct re_registers *__regs);
+
+
+/* Like `re_search', but search in the concatenation of STRING1 and
+ STRING2. Also, stop searching at index START + STOP. */
+extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, __re_idx_t __length1,
+ const char *__string2, __re_idx_t __length2,
+ __re_idx_t __start, regoff_t __range,
+ struct re_registers *__regs,
+ __re_idx_t __stop);
+
+
+/* Like `re_search', but return how many characters in STRING the regexp
+ in BUFFER matched, starting at position START. */
+extern regoff_t re_match (struct re_pattern_buffer *__buffer,
+ const char *__string, __re_idx_t __length,
+ __re_idx_t __start, struct re_registers *__regs);
+
+
+/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
+extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, __re_idx_t __length1,
+ const char *__string2, __re_idx_t __length2,
+ __re_idx_t __start, struct re_registers *__regs,
+ __re_idx_t __stop);
+
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using BUFFER and REGS will use this memory
+ for recording register information. STARTS and ENDS must be
+ allocated with malloc, and must each be at least `NUM_REGS * sizeof
+ (regoff_t)' bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ BUFFER will allocate its own register data, without freeing the old
+ data. */
+extern void re_set_registers (struct re_pattern_buffer *__buffer,
+ struct re_registers *__regs,
+ __re_size_t __num_regs,
+ regoff_t *__starts, regoff_t *__ends);
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+# ifndef _CRAY
+/* 4.2 bsd compatibility. */
+extern char *re_comp (const char *);
+extern int re_exec (const char *);
+# endif
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+ "restrict", and "configure" may have defined "restrict".
+ Other compilers use __restrict, __restrict__, and _Restrict, and
+ 'configure' might #define 'restrict' to those words, so pick a
+ different name. */
+#ifndef _Restrict_
+# if 199901L <= __STDC_VERSION__
+# define _Restrict_ restrict
+# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)
+# define _Restrict_ __restrict
+# else
+# define _Restrict_
+# endif
+#endif
+/* gcc 3.1 and up support the [restrict] syntax. Don't trust
+ sys/cdefs.h's definition of __restrict_arr, though, as it
+ mishandles gcc -ansi -pedantic. */
+#ifndef _Restrict_arr_
+# if ((199901L <= __STDC_VERSION__ \
+ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \
+ && !__STRICT_ANSI__)) \
+ && !defined __GNUG__)
+# define _Restrict_arr_ _Restrict_
+# else
+# define _Restrict_arr_
+# endif
+#endif
+
+/* POSIX compatibility. */
+extern int regcomp (regex_t *_Restrict_ __preg,
+ const char *_Restrict_ __pattern,
+ int __cflags);
+
+extern int regexec (const regex_t *_Restrict_ __preg,
+ const char *_Restrict_ __string, size_t __nmatch,
+ regmatch_t __pmatch[_Restrict_arr_],
+ int __eflags);
+
+extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
+ char *_Restrict_ __errbuf, size_t __errbuf_size);
+
+extern void regfree (regex_t *__preg);
+
+
+#ifdef __cplusplus
+}
+#endif /* C++ */
+
+#endif /* regex.h */
diff --git a/grub-core/gnulib/regex_internal.c b/grub-core/gnulib/regex_internal.c
new file mode 100644
index 0000000..98b8d5d
--- /dev/null
+++ b/grub-core/gnulib/regex_internal.c
@@ -0,0 +1,1742 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static void re_string_construct_common (const char *str, Idx len,
+ re_string_t *pstr,
+ RE_TRANSLATE_TYPE trans, bool icase,
+ const re_dfa_t *dfa) internal_function;
+static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
+ const re_node_set *nodes,
+ re_hashval_t hash) internal_function;
+static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
+ const re_node_set *nodes,
+ unsigned int context,
+ re_hashval_t hash) internal_function;
+
+/* Functions for string operation. */
+
+/* This function allocate the buffers. It is necessary to call
+ re_string_reconstruct before using the object. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
+ RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
+{
+ reg_errcode_t ret;
+ Idx init_buf_len;
+
+ /* Ensure at least one character fits into the buffers. */
+ if (init_len < dfa->mb_cur_max)
+ init_len = dfa->mb_cur_max;
+ init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
+ re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+ ret = re_string_realloc_buffers (pstr, init_buf_len);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+
+ pstr->word_char = dfa->word_char;
+ pstr->word_ops_used = dfa->word_ops_used;
+ pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+ pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
+ pstr->valid_raw_len = pstr->valid_len;
+ return REG_NOERROR;
+}
+
+/* This function allocate the buffers, and initialize them. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_construct (re_string_t *pstr, const char *str, Idx len,
+ RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
+{
+ reg_errcode_t ret;
+ memset (pstr, '\0', sizeof (re_string_t));
+ re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+ if (len > 0)
+ {
+ ret = re_string_realloc_buffers (pstr, len + 1);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+
+ if (icase)
+ {
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ while (1)
+ {
+ ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ if (pstr->valid_raw_len >= len)
+ break;
+ if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
+ break;
+ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ build_upper_buffer (pstr);
+ }
+ else
+ {
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ build_wcs_buffer (pstr);
+ else
+#endif /* RE_ENABLE_I18N */
+ {
+ if (trans != NULL)
+ re_string_translate_buffer (pstr);
+ else
+ {
+ pstr->valid_len = pstr->bufs_len;
+ pstr->valid_raw_len = pstr->bufs_len;
+ }
+ }
+ }
+
+ return REG_NOERROR;
+}
+
+/* Helper functions for re_string_allocate, and re_string_construct. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
+{
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ wint_t *new_wcs;
+
+ /* Avoid overflow. */
+ size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
+ if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
+ return REG_ESPACE;
+
+ new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
+ if (BE (new_wcs == NULL, 0))
+ return REG_ESPACE;
+ pstr->wcs = new_wcs;
+ if (pstr->offsets != NULL)
+ {
+ Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len);
+ if (BE (new_offsets == NULL, 0))
+ return REG_ESPACE;
+ pstr->offsets = new_offsets;
+ }
+ }
+#endif /* RE_ENABLE_I18N */
+ if (pstr->mbs_allocated)
+ {
+ unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char,
+ new_buf_len);
+ if (BE (new_mbs == NULL, 0))
+ return REG_ESPACE;
+ pstr->mbs = new_mbs;
+ }
+ pstr->bufs_len = new_buf_len;
+ return REG_NOERROR;
+}
+
+
+static void
+internal_function
+re_string_construct_common (const char *str, Idx len, re_string_t *pstr,
+ RE_TRANSLATE_TYPE trans, bool icase,
+ const re_dfa_t *dfa)
+{
+ pstr->raw_mbs = (const unsigned char *) str;
+ pstr->len = len;
+ pstr->raw_len = len;
+ pstr->trans = trans;
+ pstr->icase = icase;
+ pstr->mbs_allocated = (trans != NULL || icase);
+ pstr->mb_cur_max = dfa->mb_cur_max;
+ pstr->is_utf8 = dfa->is_utf8;
+ pstr->map_notascii = dfa->map_notascii;
+ pstr->stop = pstr->len;
+ pstr->raw_stop = pstr->stop;
+}
+
+#ifdef RE_ENABLE_I18N
+
+/* Build wide character buffer PSTR->WCS.
+ If the byte sequence of the string are:
+ <mb1>(0), <mb1>(1), <mb2>(0), <mb2>(1), <sb3>
+ Then wide character buffer will be:
+ <wc1> , WEOF , <wc2> , WEOF , <wc3>
+ We use WEOF for padding, they indicate that the position isn't
+ a first byte of a multibyte character.
+
+ Note that this function assumes PSTR->VALID_LEN elements are already
+ built and starts from PSTR->VALID_LEN. */
+
+static void
+internal_function
+build_wcs_buffer (re_string_t *pstr)
+{
+#ifdef _LIBC
+ unsigned char buf[MB_LEN_MAX];
+ assert (MB_LEN_MAX >= pstr->mb_cur_max);
+#else
+ unsigned char buf[64];
+#endif
+ mbstate_t prev_st;
+ Idx byte_idx, end_idx, remain_len;
+ size_t mbclen;
+
+ /* Build the buffers from pstr->valid_len to either pstr->len or
+ pstr->bufs_len. */
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+ for (byte_idx = pstr->valid_len; byte_idx < end_idx;)
+ {
+ wchar_t wc;
+ const char *p;
+
+ remain_len = end_idx - byte_idx;
+ prev_st = pstr->cur_state;
+ /* Apply the translation if we need. */
+ if (BE (pstr->trans != NULL, 0))
+ {
+ int i, ch;
+
+ for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i];
+ buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch];
+ }
+ p = (const char *) buf;
+ }
+ else
+ p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+ if (BE (mbclen == (size_t) -2, 0))
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
+ }
+ else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
+ {
+ /* We treat these cases as a singlebyte character. */
+ mbclen = 1;
+ wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
+ if (BE (pstr->trans != NULL, 0))
+ wc = pstr->trans[wc];
+ pstr->cur_state = prev_st;
+ }
+
+ /* Write wide character and padding. */
+ pstr->wcs[byte_idx++] = wc;
+ /* Write paddings. */
+ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ pstr->wcs[byte_idx++] = WEOF;
+ }
+ pstr->valid_len = byte_idx;
+ pstr->valid_raw_len = byte_idx;
+}
+
+/* Build wide character buffer PSTR->WCS like build_wcs_buffer,
+ but for REG_ICASE. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+build_wcs_upper_buffer (re_string_t *pstr)
+{
+ mbstate_t prev_st;
+ Idx src_idx, byte_idx, end_idx, remain_len;
+ size_t mbclen;
+#ifdef _LIBC
+ char buf[MB_LEN_MAX];
+ assert (MB_LEN_MAX >= pstr->mb_cur_max);
+#else
+ char buf[64];
+#endif
+
+ byte_idx = pstr->valid_len;
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+ /* The following optimization assumes that ASCII characters can be
+ mapped to wide characters with a simple cast. */
+ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed)
+ {
+ while (byte_idx < end_idx)
+ {
+ wchar_t wc;
+
+ if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx])
+ && mbsinit (&pstr->cur_state))
+ {
+ /* In case of a singlebyte character. */
+ pstr->mbs[byte_idx]
+ = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]);
+ /* The next step uses the assumption that wchar_t is encoded
+ ASCII-safe: all ASCII values can be converted like this. */
+ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx];
+ ++byte_idx;
+ continue;
+ }
+
+ remain_len = end_idx - byte_idx;
+ prev_st = pstr->cur_state;
+ mbclen = __mbrtowc (&wc,
+ ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
+ + byte_idx), remain_len, &pstr->cur_state);
+ if (BE (mbclen < (size_t) -2, 1))
+ {
+ wchar_t wcu = wc;
+ if (iswlower (wc))
+ {
+ size_t mbcdlen;
+
+ wcu = towupper (wc);
+ mbcdlen = wcrtomb (buf, wcu, &prev_st);
+ if (BE (mbclen == mbcdlen, 1))
+ memcpy (pstr->mbs + byte_idx, buf, mbclen);
+ else
+ {
+ src_idx = byte_idx;
+ goto offsets_needed;
+ }
+ }
+ else
+ memcpy (pstr->mbs + byte_idx,
+ pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen);
+ pstr->wcs[byte_idx++] = wcu;
+ /* Write paddings. */
+ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ pstr->wcs[byte_idx++] = WEOF;
+ }
+ else if (mbclen == (size_t) -1 || mbclen == 0)
+ {
+ /* It is an invalid character or '\0'. Just use the byte. */
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
+ pstr->mbs[byte_idx] = ch;
+ /* And also cast it to wide char. */
+ pstr->wcs[byte_idx++] = (wchar_t) ch;
+ if (BE (mbclen == (size_t) -1, 0))
+ pstr->cur_state = prev_st;
+ }
+ else
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
+ }
+ }
+ pstr->valid_len = byte_idx;
+ pstr->valid_raw_len = byte_idx;
+ return REG_NOERROR;
+ }
+ else
+ for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;)
+ {
+ wchar_t wc;
+ const char *p;
+ offsets_needed:
+ remain_len = end_idx - byte_idx;
+ prev_st = pstr->cur_state;
+ if (BE (pstr->trans != NULL, 0))
+ {
+ int i, ch;
+
+ for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i];
+ buf[i] = pstr->trans[ch];
+ }
+ p = (const char *) buf;
+ }
+ else
+ p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+ if (BE (mbclen < (size_t) -2, 1))
+ {
+ wchar_t wcu = wc;
+ if (iswlower (wc))
+ {
+ size_t mbcdlen;
+
+ wcu = towupper (wc);
+ mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
+ if (BE (mbclen == mbcdlen, 1))
+ memcpy (pstr->mbs + byte_idx, buf, mbclen);
+ else if (mbcdlen != (size_t) -1)
+ {
+ size_t i;
+
+ if (byte_idx + mbcdlen > pstr->bufs_len)
+ {
+ pstr->cur_state = prev_st;
+ break;
+ }
+
+ if (pstr->offsets == NULL)
+ {
+ pstr->offsets = re_malloc (Idx, pstr->bufs_len);
+
+ if (pstr->offsets == NULL)
+ return REG_ESPACE;
+ }
+ if (!pstr->offsets_needed)
+ {
+ for (i = 0; i < (size_t) byte_idx; ++i)
+ pstr->offsets[i] = i;
+ pstr->offsets_needed = 1;
+ }
+
+ memcpy (pstr->mbs + byte_idx, buf, mbcdlen);
+ pstr->wcs[byte_idx] = wcu;
+ pstr->offsets[byte_idx] = src_idx;
+ for (i = 1; i < mbcdlen; ++i)
+ {
+ pstr->offsets[byte_idx + i]
+ = src_idx + (i < mbclen ? i : mbclen - 1);
+ pstr->wcs[byte_idx + i] = WEOF;
+ }
+ pstr->len += mbcdlen - mbclen;
+ if (pstr->raw_stop > src_idx)
+ pstr->stop += mbcdlen - mbclen;
+ end_idx = (pstr->bufs_len > pstr->len)
+ ? pstr->len : pstr->bufs_len;
+ byte_idx += mbcdlen;
+ src_idx += mbclen;
+ continue;
+ }
+ else
+ memcpy (pstr->mbs + byte_idx, p, mbclen);
+ }
+ else
+ memcpy (pstr->mbs + byte_idx, p, mbclen);
+
+ if (BE (pstr->offsets_needed != 0, 0))
+ {
+ size_t i;
+ for (i = 0; i < mbclen; ++i)
+ pstr->offsets[byte_idx + i] = src_idx + i;
+ }
+ src_idx += mbclen;
+
+ pstr->wcs[byte_idx++] = wcu;
+ /* Write paddings. */
+ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ pstr->wcs[byte_idx++] = WEOF;
+ }
+ else if (mbclen == (size_t) -1 || mbclen == 0)
+ {
+ /* It is an invalid character or '\0'. Just use the byte. */
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
+
+ if (BE (pstr->trans != NULL, 0))
+ ch = pstr->trans [ch];
+ pstr->mbs[byte_idx] = ch;
+
+ if (BE (pstr->offsets_needed != 0, 0))
+ pstr->offsets[byte_idx] = src_idx;
+ ++src_idx;
+
+ /* And also cast it to wide char. */
+ pstr->wcs[byte_idx++] = (wchar_t) ch;
+ if (BE (mbclen == (size_t) -1, 0))
+ pstr->cur_state = prev_st;
+ }
+ else
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
+ }
+ }
+ pstr->valid_len = byte_idx;
+ pstr->valid_raw_len = src_idx;
+ return REG_NOERROR;
+}
+
+/* Skip characters until the index becomes greater than NEW_RAW_IDX.
+ Return the index. */
+
+static Idx
+internal_function
+re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
+{
+ mbstate_t prev_st;
+ Idx rawbuf_idx;
+ size_t mbclen;
+ wint_t wc = WEOF;
+
+ /* Skip the characters which are not necessary to check. */
+ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len;
+ rawbuf_idx < new_raw_idx;)
+ {
+ wchar_t wc2;
+ Idx remain_len;
+ remain_len = pstr->len - rawbuf_idx;
+ prev_st = pstr->cur_state;
+ mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
+ remain_len, &pstr->cur_state);
+ if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
+ {
+ /* We treat these cases as a single byte character. */
+ if (mbclen == 0 || remain_len == 0)
+ wc = L'\0';
+ else
+ wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx);
+ mbclen = 1;
+ pstr->cur_state = prev_st;
+ }
+ else
+ wc = wc2;
+ /* Then proceed the next character. */
+ rawbuf_idx += mbclen;
+ }
+ *last_wc = wc;
+ return rawbuf_idx;
+}
+#endif /* RE_ENABLE_I18N */
+
+/* Build the buffer PSTR->MBS, and apply the translation if we need.
+ This function is used in case of REG_ICASE. */
+
+static void
+internal_function
+build_upper_buffer (re_string_t *pstr)
+{
+ Idx char_idx, end_idx;
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+ for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx)
+ {
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
+ if (BE (pstr->trans != NULL, 0))
+ ch = pstr->trans[ch];
+ if (islower (ch))
+ pstr->mbs[char_idx] = toupper (ch);
+ else
+ pstr->mbs[char_idx] = ch;
+ }
+ pstr->valid_len = char_idx;
+ pstr->valid_raw_len = char_idx;
+}
+
+/* Apply TRANS to the buffer in PSTR. */
+
+static void
+internal_function
+re_string_translate_buffer (re_string_t *pstr)
+{
+ Idx buf_idx, end_idx;
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+ for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx)
+ {
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx];
+ pstr->mbs[buf_idx] = pstr->trans[ch];
+ }
+
+ pstr->valid_len = buf_idx;
+ pstr->valid_raw_len = buf_idx;
+}
+
+/* This function re-construct the buffers.
+ Concretely, convert to wide character in case of pstr->mb_cur_max > 1,
+ convert to upper case in case of REG_ICASE, apply translation. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
+{
+ Idx offset;
+
+ if (BE (pstr->raw_mbs_idx <= idx, 0))
+ offset = idx - pstr->raw_mbs_idx;
+ else
+ {
+ /* Reset buffer. */
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+#endif /* RE_ENABLE_I18N */
+ pstr->len = pstr->raw_len;
+ pstr->stop = pstr->raw_stop;
+ pstr->valid_len = 0;
+ pstr->raw_mbs_idx = 0;
+ pstr->valid_raw_len = 0;
+ pstr->offsets_needed = 0;
+ pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
+ : CONTEXT_NEWLINE | CONTEXT_BEGBUF);
+ if (!pstr->mbs_allocated)
+ pstr->mbs = (unsigned char *) pstr->raw_mbs;
+ offset = idx;
+ }
+
+ if (BE (offset != 0, 1))
+ {
+ /* Should the already checked characters be kept? */
+ if (BE (offset < pstr->valid_raw_len, 1))
+ {
+ /* Yes, move them to the front of the buffer. */
+#ifdef RE_ENABLE_I18N
+ if (BE (pstr->offsets_needed, 0))
+ {
+ Idx low = 0, high = pstr->valid_len, mid;
+ do
+ {
+ mid = (high + low) / 2;
+ if (pstr->offsets[mid] > offset)
+ high = mid;
+ else if (pstr->offsets[mid] < offset)
+ low = mid + 1;
+ else
+ break;
+ }
+ while (low < high);
+ if (pstr->offsets[mid] < offset)
+ ++mid;
+ pstr->tip_context = re_string_context_at (pstr, mid - 1,
+ eflags);
+ /* This can be quite complicated, so handle specially
+ only the common and easy case where the character with
+ different length representation of lower and upper
+ case is present at or after offset. */
+ if (pstr->valid_len > offset
+ && mid == offset && pstr->offsets[mid] == offset)
+ {
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
+ memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset);
+ pstr->valid_len -= offset;
+ pstr->valid_raw_len -= offset;
+ for (low = 0; low < pstr->valid_len; low++)
+ pstr->offsets[low] = pstr->offsets[low + offset] - offset;
+ }
+ else
+ {
+ /* Otherwise, just find out how long the partial multibyte
+ character at offset is and fill it with WEOF/255. */
+ pstr->len = pstr->raw_len - idx + offset;
+ pstr->stop = pstr->raw_stop - idx + offset;
+ pstr->offsets_needed = 0;
+ while (mid > 0 && pstr->offsets[mid - 1] == offset)
+ --mid;
+ while (mid < pstr->valid_len)
+ if (pstr->wcs[mid] != WEOF)
+ break;
+ else
+ ++mid;
+ if (mid == pstr->valid_len)
+ pstr->valid_len = 0;
+ else
+ {
+ pstr->valid_len = pstr->offsets[mid] - offset;
+ if (pstr->valid_len)
+ {
+ for (low = 0; low < pstr->valid_len; ++low)
+ pstr->wcs[low] = WEOF;
+ memset (pstr->mbs, 255, pstr->valid_len);
+ }
+ }
+ pstr->valid_raw_len = pstr->valid_len;
+ }
+ }
+ else
+#endif
+ {
+ pstr->tip_context = re_string_context_at (pstr, offset - 1,
+ eflags);
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
+#endif /* RE_ENABLE_I18N */
+ if (BE (pstr->mbs_allocated, 0))
+ memmove (pstr->mbs, pstr->mbs + offset,
+ pstr->valid_len - offset);
+ pstr->valid_len -= offset;
+ pstr->valid_raw_len -= offset;
+#if DEBUG
+ assert (pstr->valid_len > 0);
+#endif
+ }
+ }
+ else
+ {
+#ifdef RE_ENABLE_I18N
+ /* No, skip all characters until IDX. */
+ Idx prev_valid_len = pstr->valid_len;
+
+ if (BE (pstr->offsets_needed, 0))
+ {
+ pstr->len = pstr->raw_len - idx + offset;
+ pstr->stop = pstr->raw_stop - idx + offset;
+ pstr->offsets_needed = 0;
+ }
+#endif
+ pstr->valid_len = 0;
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ Idx wcs_idx;
+ wint_t wc = WEOF;
+
+ if (pstr->is_utf8)
+ {
+ const unsigned char *raw, *p, *end;
+
+ /* Special case UTF-8. Multi-byte chars start with any
+ byte other than 0x80 - 0xbf. */
+ raw = pstr->raw_mbs + pstr->raw_mbs_idx;
+ end = raw + (offset - pstr->mb_cur_max);
+ if (end < pstr->raw_mbs)
+ end = pstr->raw_mbs;
+ p = raw + offset - 1;
+#ifdef _LIBC
+ /* We know the wchar_t encoding is UCS4, so for the simple
+ case, ASCII characters, skip the conversion step. */
+ if (isascii (*p) && BE (pstr->trans == NULL, 1))
+ {
+ memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+ /* pstr->valid_len = 0; */
+ wc = (wchar_t) *p;
+ }
+ else
+#endif
+ for (; p >= end; --p)
+ if ((*p & 0xc0) != 0x80)
+ {
+ mbstate_t cur_state;
+ wchar_t wc2;
+ Idx mlen = raw + pstr->len - p;
+ size_t mbclen;
+
+#if 0 /* dead code: buf is set but never used */
+ unsigned char buf[6];
+ if (BE (pstr->trans != NULL, 0))
+ {
+ int i = mlen < 6 ? mlen : 6;
+ while (--i >= 0)
+ buf[i] = pstr->trans[p[i]];
+ }
+#endif
+ /* XXX Don't use mbrtowc, we know which conversion
+ to use (UTF-8 -> UCS4). */
+ memset (&cur_state, 0, sizeof (cur_state));
+ mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+ &cur_state);
+ if (raw + offset - p <= mbclen
+ && mbclen < (size_t) -2)
+ {
+ memset (&pstr->cur_state, '\0',
+ sizeof (mbstate_t));
+ pstr->valid_len = mbclen - (raw + offset - p);
+ wc = wc2;
+ }
+ break;
+ }
+ }
+
+ if (wc == WEOF)
+ pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx;
+ if (wc == WEOF)
+ pstr->tip_context
+ = re_string_context_at (pstr, prev_valid_len - 1, eflags);
+ else
+ pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
+ && IS_WIDE_WORD_CHAR (wc))
+ ? CONTEXT_WORD
+ : ((IS_WIDE_NEWLINE (wc)
+ && pstr->newline_anchor)
+ ? CONTEXT_NEWLINE : 0));
+ if (BE (pstr->valid_len, 0))
+ {
+ for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx)
+ pstr->wcs[wcs_idx] = WEOF;
+ if (pstr->mbs_allocated)
+ memset (pstr->mbs, 255, pstr->valid_len);
+ }
+ pstr->valid_raw_len = pstr->valid_len;
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ {
+ int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1];
+ pstr->valid_raw_len = 0;
+ if (pstr->trans)
+ c = pstr->trans[c];
+ pstr->tip_context = (bitset_contain (pstr->word_char, c)
+ ? CONTEXT_WORD
+ : ((IS_NEWLINE (c) && pstr->newline_anchor)
+ ? CONTEXT_NEWLINE : 0));
+ }
+ }
+ if (!BE (pstr->mbs_allocated, 0))
+ pstr->mbs += offset;
+ }
+ pstr->raw_mbs_idx = idx;
+ pstr->len -= offset;
+ pstr->stop -= offset;
+
+ /* Then build the buffers. */
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ if (pstr->icase)
+ {
+ reg_errcode_t ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ else
+ build_wcs_buffer (pstr);
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ if (BE (pstr->mbs_allocated, 0))
+ {
+ if (pstr->icase)
+ build_upper_buffer (pstr);
+ else if (pstr->trans != NULL)
+ re_string_translate_buffer (pstr);
+ }
+ else
+ pstr->valid_len = pstr->len;
+
+ pstr->cur_idx = 0;
+ return REG_NOERROR;
+}
+
+static unsigned char
+internal_function __attribute ((pure))
+re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
+{
+ int ch;
+ Idx off;
+
+ /* Handle the common (easiest) cases first. */
+ if (BE (!pstr->mbs_allocated, 1))
+ return re_string_peek_byte (pstr, idx);
+
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1
+ && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx))
+ return re_string_peek_byte (pstr, idx);
+#endif
+
+ off = pstr->cur_idx + idx;
+#ifdef RE_ENABLE_I18N
+ if (pstr->offsets_needed)
+ off = pstr->offsets[off];
+#endif
+
+ ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
+
+#ifdef RE_ENABLE_I18N
+ /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I
+ this function returns CAPITAL LETTER I instead of first byte of
+ DOTLESS SMALL LETTER I. The latter would confuse the parser,
+ since peek_byte_case doesn't advance cur_idx in any way. */
+ if (pstr->offsets_needed && !isascii (ch))
+ return re_string_peek_byte (pstr, idx);
+#endif
+
+ return ch;
+}
+
+static unsigned char
+internal_function __attribute ((pure))
+re_string_fetch_byte_case (re_string_t *pstr)
+{
+ if (BE (!pstr->mbs_allocated, 1))
+ return re_string_fetch_byte (pstr);
+
+#ifdef RE_ENABLE_I18N
+ if (pstr->offsets_needed)
+ {
+ Idx off;
+ int ch;
+
+ /* For tr_TR.UTF-8 [[:islower:]] there is
+ [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip
+ in that case the whole multi-byte character and return
+ the original letter. On the other side, with
+ [[: DOTLESS SMALL LETTER I return [[:I, as doing
+ anything else would complicate things too much. */
+
+ if (!re_string_first_byte (pstr, pstr->cur_idx))
+ return re_string_fetch_byte (pstr);
+
+ off = pstr->offsets[pstr->cur_idx];
+ ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
+
+ if (! isascii (ch))
+ return re_string_fetch_byte (pstr);
+
+ re_string_skip_bytes (pstr,
+ re_string_char_size_at (pstr, pstr->cur_idx));
+ return ch;
+ }
+#endif
+
+ return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++];
+}
+
+static void
+internal_function
+re_string_destruct (re_string_t *pstr)
+{
+#ifdef RE_ENABLE_I18N
+ re_free (pstr->wcs);
+ re_free (pstr->offsets);
+#endif /* RE_ENABLE_I18N */
+ if (pstr->mbs_allocated)
+ re_free (pstr->mbs);
+}
+
+/* Return the context at IDX in INPUT. */
+
+static unsigned int
+internal_function
+re_string_context_at (const re_string_t *input, Idx idx, int eflags)
+{
+ int c;
+ if (BE (! REG_VALID_INDEX (idx), 0))
+ /* In this case, we use the value stored in input->tip_context,
+ since we can't know the character in input->mbs[-1] here. */
+ return input->tip_context;
+ if (BE (idx == input->len, 0))
+ return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
+ : CONTEXT_NEWLINE | CONTEXT_ENDBUF);
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1)
+ {
+ wint_t wc;
+ Idx wc_idx = idx;
+ while(input->wcs[wc_idx] == WEOF)
+ {
+#ifdef DEBUG
+ /* It must not happen. */
+ assert (REG_VALID_INDEX (wc_idx));
+#endif
+ --wc_idx;
+ if (! REG_VALID_INDEX (wc_idx))
+ return input->tip_context;
+ }
+ wc = input->wcs[wc_idx];
+ if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc))
+ return CONTEXT_WORD;
+ return (IS_WIDE_NEWLINE (wc) && input->newline_anchor
+ ? CONTEXT_NEWLINE : 0);
+ }
+ else
+#endif
+ {
+ c = re_string_byte_at (input, idx);
+ if (bitset_contain (input->word_char, c))
+ return CONTEXT_WORD;
+ return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0;
+ }
+}
+
+/* Functions for set operation. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_alloc (re_node_set *set, Idx size)
+{
+ set->alloc = size;
+ set->nelem = 0;
+ set->elems = re_malloc (Idx, size);
+ if (BE (set->elems == NULL, 0))
+ return REG_ESPACE;
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_1 (re_node_set *set, Idx elem)
+{
+ set->alloc = 1;
+ set->nelem = 1;
+ set->elems = re_malloc (Idx, 1);
+ if (BE (set->elems == NULL, 0))
+ {
+ set->alloc = set->nelem = 0;
+ return REG_ESPACE;
+ }
+ set->elems[0] = elem;
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
+{
+ set->alloc = 2;
+ set->elems = re_malloc (Idx, 2);
+ if (BE (set->elems == NULL, 0))
+ return REG_ESPACE;
+ if (elem1 == elem2)
+ {
+ set->nelem = 1;
+ set->elems[0] = elem1;
+ }
+ else
+ {
+ set->nelem = 2;
+ if (elem1 < elem2)
+ {
+ set->elems[0] = elem1;
+ set->elems[1] = elem2;
+ }
+ else
+ {
+ set->elems[0] = elem2;
+ set->elems[1] = elem1;
+ }
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
+{
+ dest->nelem = src->nelem;
+ if (src->nelem > 0)
+ {
+ dest->alloc = dest->nelem;
+ dest->elems = re_malloc (Idx, dest->alloc);
+ if (BE (dest->elems == NULL, 0))
+ {
+ dest->alloc = dest->nelem = 0;
+ return REG_ESPACE;
+ }
+ memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
+ }
+ else
+ re_node_set_init_empty (dest);
+ return REG_NOERROR;
+}
+
+/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to
+ DEST. Return value indicate the error code or REG_NOERROR if succeeded.
+ Note: We assume dest->elems is NULL, when dest->alloc is 0. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
+ const re_node_set *src2)
+{
+ Idx i1, i2, is, id, delta, sbase;
+ if (src1->nelem == 0 || src2->nelem == 0)
+ return REG_NOERROR;
+
+ /* We need dest->nelem + 2 * elems_in_intersection; this is a
+ conservative estimate. */
+ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc)
+ {
+ Idx new_alloc = src1->nelem + src2->nelem + dest->alloc;
+ Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc);
+ if (BE (new_elems == NULL, 0))
+ return REG_ESPACE;
+ dest->elems = new_elems;
+ dest->alloc = new_alloc;
+ }
+
+ /* Find the items in the intersection of SRC1 and SRC2, and copy
+ into the top of DEST those that are not already in DEST itself. */
+ sbase = dest->nelem + src1->nelem + src2->nelem;
+ i1 = src1->nelem - 1;
+ i2 = src2->nelem - 1;
+ id = dest->nelem - 1;
+ for (;;)
+ {
+ if (src1->elems[i1] == src2->elems[i2])
+ {
+ /* Try to find the item in DEST. Maybe we could binary search? */
+ while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
+ --id;
+
+ if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
+ dest->elems[--sbase] = src1->elems[i1];
+
+ if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2))
+ break;
+ }
+
+ /* Lower the highest of the two items. */
+ else if (src1->elems[i1] < src2->elems[i2])
+ {
+ if (! REG_VALID_INDEX (--i2))
+ break;
+ }
+ else
+ {
+ if (! REG_VALID_INDEX (--i1))
+ break;
+ }
+ }
+
+ id = dest->nelem - 1;
+ is = dest->nelem + src1->nelem + src2->nelem - 1;
+ delta = is - sbase + 1;
+
+ /* Now copy. When DELTA becomes zero, the remaining
+ DEST elements are already in place; this is more or
+ less the same loop that is in re_node_set_merge. */
+ dest->nelem += delta;
+ if (delta > 0 && REG_VALID_INDEX (id))
+ for (;;)
+ {
+ if (dest->elems[is] > dest->elems[id])
+ {
+ /* Copy from the top. */
+ dest->elems[id + delta--] = dest->elems[is--];
+ if (delta == 0)
+ break;
+ }
+ else
+ {
+ /* Slide from the bottom. */
+ dest->elems[id + delta] = dest->elems[id];
+ if (! REG_VALID_INDEX (--id))
+ break;
+ }
+ }
+
+ /* Copy remaining SRC elements. */
+ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx));
+
+ return REG_NOERROR;
+}
+
+/* Calculate the union set of the sets SRC1 and SRC2. And store it to
+ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
+ const re_node_set *src2)
+{
+ Idx i1, i2, id;
+ if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0)
+ {
+ dest->alloc = src1->nelem + src2->nelem;
+ dest->elems = re_malloc (Idx, dest->alloc);
+ if (BE (dest->elems == NULL, 0))
+ return REG_ESPACE;
+ }
+ else
+ {
+ if (src1 != NULL && src1->nelem > 0)
+ return re_node_set_init_copy (dest, src1);
+ else if (src2 != NULL && src2->nelem > 0)
+ return re_node_set_init_copy (dest, src2);
+ else
+ re_node_set_init_empty (dest);
+ return REG_NOERROR;
+ }
+ for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;)
+ {
+ if (src1->elems[i1] > src2->elems[i2])
+ {
+ dest->elems[id++] = src2->elems[i2++];
+ continue;
+ }
+ if (src1->elems[i1] == src2->elems[i2])
+ ++i2;
+ dest->elems[id++] = src1->elems[i1++];
+ }
+ if (i1 < src1->nelem)
+ {
+ memcpy (dest->elems + id, src1->elems + i1,
+ (src1->nelem - i1) * sizeof (Idx));
+ id += src1->nelem - i1;
+ }
+ else if (i2 < src2->nelem)
+ {
+ memcpy (dest->elems + id, src2->elems + i2,
+ (src2->nelem - i2) * sizeof (Idx));
+ id += src2->nelem - i2;
+ }
+ dest->nelem = id;
+ return REG_NOERROR;
+}
+
+/* Calculate the union set of the sets DEST and SRC. And store it to
+ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_merge (re_node_set *dest, const re_node_set *src)
+{
+ Idx is, id, sbase, delta;
+ if (src == NULL || src->nelem == 0)
+ return REG_NOERROR;
+ if (dest->alloc < 2 * src->nelem + dest->nelem)
+ {
+ Idx new_alloc = 2 * (src->nelem + dest->alloc);
+ Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc);
+ if (BE (new_buffer == NULL, 0))
+ return REG_ESPACE;
+ dest->elems = new_buffer;
+ dest->alloc = new_alloc;
+ }
+
+ if (BE (dest->nelem == 0, 0))
+ {
+ dest->nelem = src->nelem;
+ memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
+ return REG_NOERROR;
+ }
+
+ /* Copy into the top of DEST the items of SRC that are not
+ found in DEST. Maybe we could binary search in DEST? */
+ for (sbase = dest->nelem + 2 * src->nelem,
+ is = src->nelem - 1, id = dest->nelem - 1;
+ REG_VALID_INDEX (is) && REG_VALID_INDEX (id); )
+ {
+ if (dest->elems[id] == src->elems[is])
+ is--, id--;
+ else if (dest->elems[id] < src->elems[is])
+ dest->elems[--sbase] = src->elems[is--];
+ else /* if (dest->elems[id] > src->elems[is]) */
+ --id;
+ }
+
+ if (REG_VALID_INDEX (is))
+ {
+ /* If DEST is exhausted, the remaining items of SRC must be unique. */
+ sbase -= is + 1;
+ memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx));
+ }
+
+ id = dest->nelem - 1;
+ is = dest->nelem + 2 * src->nelem - 1;
+ delta = is - sbase + 1;
+ if (delta == 0)
+ return REG_NOERROR;
+
+ /* Now copy. When DELTA becomes zero, the remaining
+ DEST elements are already in place. */
+ dest->nelem += delta;
+ for (;;)
+ {
+ if (dest->elems[is] > dest->elems[id])
+ {
+ /* Copy from the top. */
+ dest->elems[id + delta--] = dest->elems[is--];
+ if (delta == 0)
+ break;
+ }
+ else
+ {
+ /* Slide from the bottom. */
+ dest->elems[id + delta] = dest->elems[id];
+ if (! REG_VALID_INDEX (--id))
+ {
+ /* Copy remaining SRC elements. */
+ memcpy (dest->elems, dest->elems + sbase,
+ delta * sizeof (Idx));
+ break;
+ }
+ }
+ }
+
+ return REG_NOERROR;
+}
+
+/* Insert the new element ELEM to the re_node_set* SET.
+ SET should not already have ELEM.
+ Return true if successful. */
+
+static bool
+internal_function __attribute_warn_unused_result__
+re_node_set_insert (re_node_set *set, Idx elem)
+{
+ Idx idx;
+ /* In case the set is empty. */
+ if (set->alloc == 0)
+ return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1);
+
+ if (BE (set->nelem, 0) == 0)
+ {
+ /* We already guaranteed above that set->alloc != 0. */
+ set->elems[0] = elem;
+ ++set->nelem;
+ return true;
+ }
+
+ /* Realloc if we need. */
+ if (set->alloc == set->nelem)
+ {
+ Idx *new_elems;
+ set->alloc = set->alloc * 2;
+ new_elems = re_realloc (set->elems, Idx, set->alloc);
+ if (BE (new_elems == NULL, 0))
+ return false;
+ set->elems = new_elems;
+ }
+
+ /* Move the elements which follows the new element. Test the
+ first element separately to skip a check in the inner loop. */
+ if (elem < set->elems[0])
+ {
+ idx = 0;
+ for (idx = set->nelem; idx > 0; idx--)
+ set->elems[idx] = set->elems[idx - 1];
+ }
+ else
+ {
+ for (idx = set->nelem; set->elems[idx - 1] > elem; idx--)
+ set->elems[idx] = set->elems[idx - 1];
+ }
+
+ /* Insert the new element. */
+ set->elems[idx] = elem;
+ ++set->nelem;
+ return true;
+}
+
+/* Insert the new element ELEM to the re_node_set* SET.
+ SET should not already have any element greater than or equal to ELEM.
+ Return true if successful. */
+
+static bool
+internal_function __attribute_warn_unused_result__
+re_node_set_insert_last (re_node_set *set, Idx elem)
+{
+ /* Realloc if we need. */
+ if (set->alloc == set->nelem)
+ {
+ Idx *new_elems;
+ set->alloc = (set->alloc + 1) * 2;
+ new_elems = re_realloc (set->elems, Idx, set->alloc);
+ if (BE (new_elems == NULL, 0))
+ return false;
+ set->elems = new_elems;
+ }
+
+ /* Insert the new element. */
+ set->elems[set->nelem++] = elem;
+ return true;
+}
+
+/* Compare two node sets SET1 and SET2.
+ Return true if SET1 and SET2 are equivalent. */
+
+static bool
+internal_function __attribute ((pure))
+re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
+{
+ Idx i;
+ if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem)
+ return false;
+ for (i = set1->nelem ; REG_VALID_INDEX (--i) ; )
+ if (set1->elems[i] != set2->elems[i])
+ return false;
+ return true;
+}
+
+/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */
+
+static Idx
+internal_function __attribute ((pure))
+re_node_set_contains (const re_node_set *set, Idx elem)
+{
+ __re_size_t idx, right, mid;
+ if (! REG_VALID_NONZERO_INDEX (set->nelem))
+ return 0;
+
+ /* Binary search the element. */
+ idx = 0;
+ right = set->nelem - 1;
+ while (idx < right)
+ {
+ mid = (idx + right) / 2;
+ if (set->elems[mid] < elem)
+ idx = mid + 1;
+ else
+ right = mid;
+ }
+ return set->elems[idx] == elem ? idx + 1 : 0;
+}
+
+static void
+internal_function
+re_node_set_remove_at (re_node_set *set, Idx idx)
+{
+ if (idx < 0 || idx >= set->nelem)
+ return;
+ --set->nelem;
+ for (; idx < set->nelem; idx++)
+ set->elems[idx] = set->elems[idx + 1];
+}
+
+
+/* Add the token TOKEN to dfa->nodes, and return the index of the token.
+ Or return REG_MISSING if an error occurred. */
+
+static Idx
+internal_function
+re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
+{
+ if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
+ {
+ size_t new_nodes_alloc = dfa->nodes_alloc * 2;
+ Idx *new_nexts, *new_indices;
+ re_node_set *new_edests, *new_eclosures;
+ re_token_t *new_nodes;
+ size_t max_object_size =
+ MAX (sizeof (re_token_t),
+ MAX (sizeof (re_node_set),
+ sizeof (Idx)));
+
+ /* Avoid overflows. */
+ if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
+ return REG_MISSING;
+
+ new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
+ if (BE (new_nodes == NULL, 0))
+ return REG_MISSING;
+ dfa->nodes = new_nodes;
+ new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
+ new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
+ new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
+ new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
+ if (BE (new_nexts == NULL || new_indices == NULL
+ || new_edests == NULL || new_eclosures == NULL, 0))
+ return REG_MISSING;
+ dfa->nexts = new_nexts;
+ dfa->org_indices = new_indices;
+ dfa->edests = new_edests;
+ dfa->eclosures = new_eclosures;
+ dfa->nodes_alloc = new_nodes_alloc;
+ }
+ dfa->nodes[dfa->nodes_len] = token;
+ dfa->nodes[dfa->nodes_len].constraint = 0;
+#ifdef RE_ENABLE_I18N
+ {
+ int type = token.type;
+ dfa->nodes[dfa->nodes_len].accept_mb =
+ (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
+ }
+#endif
+ dfa->nexts[dfa->nodes_len] = REG_MISSING;
+ re_node_set_init_empty (dfa->edests + dfa->nodes_len);
+ re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
+ return dfa->nodes_len++;
+}
+
+static inline re_hashval_t
+internal_function
+calc_state_hash (const re_node_set *nodes, unsigned int context)
+{
+ re_hashval_t hash = nodes->nelem + context;
+ Idx i;
+ for (i = 0 ; i < nodes->nelem ; i++)
+ hash += nodes->elems[i];
+ return hash;
+}
+
+/* Search for the state whose node_set is equivalent to NODES.
+ Return the pointer to the state, if we found it in the DFA.
+ Otherwise create the new one and return it. In case of an error
+ return NULL and set the error code in ERR.
+ Note: - We assume NULL as the invalid state, then it is possible that
+ return value is NULL and ERR is REG_NOERROR.
+ - We never return non-NULL value in case of any errors, it is for
+ optimization. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
+ const re_node_set *nodes)
+{
+ re_hashval_t hash;
+ re_dfastate_t *new_state;
+ struct re_state_table_entry *spot;
+ Idx i;
+#ifdef lint
+ /* Suppress bogus uninitialized-variable warnings. */
+ *err = REG_NOERROR;
+#endif
+ if (BE (nodes->nelem == 0, 0))
+ {
+ *err = REG_NOERROR;
+ return NULL;
+ }
+ hash = calc_state_hash (nodes, 0);
+ spot = dfa->state_table + (hash & dfa->state_hash_mask);
+
+ for (i = 0 ; i < spot->num ; i++)
+ {
+ re_dfastate_t *state = spot->array[i];
+ if (hash != state->hash)
+ continue;
+ if (re_node_set_compare (&state->nodes, nodes))
+ return state;
+ }
+
+ /* There are no appropriate state in the dfa, create the new one. */
+ new_state = create_ci_newstate (dfa, nodes, hash);
+ if (BE (new_state == NULL, 0))
+ *err = REG_ESPACE;
+
+ return new_state;
+}
+
+/* Search for the state whose node_set is equivalent to NODES and
+ whose context is equivalent to CONTEXT.
+ Return the pointer to the state, if we found it in the DFA.
+ Otherwise create the new one and return it. In case of an error
+ return NULL and set the error code in ERR.
+ Note: - We assume NULL as the invalid state, then it is possible that
+ return value is NULL and ERR is REG_NOERROR.
+ - We never return non-NULL value in case of any errors, it is for
+ optimization. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
+ const re_node_set *nodes, unsigned int context)
+{
+ re_hashval_t hash;
+ re_dfastate_t *new_state;
+ struct re_state_table_entry *spot;
+ Idx i;
+#ifdef lint
+ /* Suppress bogus uninitialized-variable warnings. */
+ *err = REG_NOERROR;
+#endif
+ if (nodes->nelem == 0)
+ {
+ *err = REG_NOERROR;
+ return NULL;
+ }
+ hash = calc_state_hash (nodes, context);
+ spot = dfa->state_table + (hash & dfa->state_hash_mask);
+
+ for (i = 0 ; i < spot->num ; i++)
+ {
+ re_dfastate_t *state = spot->array[i];
+ if (state->hash == hash
+ && state->context == context
+ && re_node_set_compare (state->entrance_nodes, nodes))
+ return state;
+ }
+ /* There are no appropriate state in `dfa', create the new one. */
+ new_state = create_cd_newstate (dfa, nodes, context, hash);
+ if (BE (new_state == NULL, 0))
+ *err = REG_ESPACE;
+
+ return new_state;
+}
+
+/* Finish initialization of the new state NEWSTATE, and using its hash value
+ HASH put in the appropriate bucket of DFA's state table. Return value
+ indicates the error code if failed. */
+
+static reg_errcode_t
+__attribute_warn_unused_result__
+register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
+ re_hashval_t hash)
+{
+ struct re_state_table_entry *spot;
+ reg_errcode_t err;
+ Idx i;
+
+ newstate->hash = hash;
+ err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem);
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ESPACE;
+ for (i = 0; i < newstate->nodes.nelem; i++)
+ {
+ Idx elem = newstate->nodes.elems[i];
+ if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
+ if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0))
+ return REG_ESPACE;
+ }
+
+ spot = dfa->state_table + (hash & dfa->state_hash_mask);
+ if (BE (spot->alloc <= spot->num, 0))
+ {
+ Idx new_alloc = 2 * spot->num + 2;
+ re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *,
+ new_alloc);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ spot->array = new_array;
+ spot->alloc = new_alloc;
+ }
+ spot->array[spot->num++] = newstate;
+ return REG_NOERROR;
+}
+
+static void
+free_state (re_dfastate_t *state)
+{
+ re_node_set_free (&state->non_eps_nodes);
+ re_node_set_free (&state->inveclosure);
+ if (state->entrance_nodes != &state->nodes)
+ {
+ re_node_set_free (state->entrance_nodes);
+ re_free (state->entrance_nodes);
+ }
+ re_node_set_free (&state->nodes);
+ re_free (state->word_trtable);
+ re_free (state->trtable);
+ re_free (state);
+}
+
+/* Create the new state which is independ of contexts.
+ Return the new state if succeeded, otherwise return NULL. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
+ re_hashval_t hash)
+{
+ Idx i;
+ reg_errcode_t err;
+ re_dfastate_t *newstate;
+
+ newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ if (BE (newstate == NULL, 0))
+ return NULL;
+ err = re_node_set_init_copy (&newstate->nodes, nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_free (newstate);
+ return NULL;
+ }
+
+ newstate->entrance_nodes = &newstate->nodes;
+ for (i = 0 ; i < nodes->nelem ; i++)
+ {
+ re_token_t *node = dfa->nodes + nodes->elems[i];
+ re_token_type_t type = node->type;
+ if (type == CHARACTER && !node->constraint)
+ continue;
+#ifdef RE_ENABLE_I18N
+ newstate->accept_mb |= node->accept_mb;
+#endif /* RE_ENABLE_I18N */
+
+ /* If the state has the halt node, the state is a halt state. */
+ if (type == END_OF_RE)
+ newstate->halt = 1;
+ else if (type == OP_BACK_REF)
+ newstate->has_backref = 1;
+ else if (type == ANCHOR || node->constraint)
+ newstate->has_constraint = 1;
+ }
+ err = register_state (dfa, newstate, hash);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_state (newstate);
+ newstate = NULL;
+ }
+ return newstate;
+}
+
+/* Create the new state which is depend on the context CONTEXT.
+ Return the new state if succeeded, otherwise return NULL. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
+ unsigned int context, re_hashval_t hash)
+{
+ Idx i, nctx_nodes = 0;
+ reg_errcode_t err;
+ re_dfastate_t *newstate;
+
+ newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ if (BE (newstate == NULL, 0))
+ return NULL;
+ err = re_node_set_init_copy (&newstate->nodes, nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_free (newstate);
+ return NULL;
+ }
+
+ newstate->context = context;
+ newstate->entrance_nodes = &newstate->nodes;
+
+ for (i = 0 ; i < nodes->nelem ; i++)
+ {
+ re_token_t *node = dfa->nodes + nodes->elems[i];
+ re_token_type_t type = node->type;
+ unsigned int constraint = node->constraint;
+
+ if (type == CHARACTER && !constraint)
+ continue;
+#ifdef RE_ENABLE_I18N
+ newstate->accept_mb |= node->accept_mb;
+#endif /* RE_ENABLE_I18N */
+
+ /* If the state has the halt node, the state is a halt state. */
+ if (type == END_OF_RE)
+ newstate->halt = 1;
+ else if (type == OP_BACK_REF)
+ newstate->has_backref = 1;
+
+ if (constraint)
+ {
+ if (newstate->entrance_nodes == &newstate->nodes)
+ {
+ newstate->entrance_nodes = re_malloc (re_node_set, 1);
+ if (BE (newstate->entrance_nodes == NULL, 0))
+ {
+ free_state (newstate);
+ return NULL;
+ }
+ if (re_node_set_init_copy (newstate->entrance_nodes, nodes)
+ != REG_NOERROR)
+ return NULL;
+ nctx_nodes = 0;
+ newstate->has_constraint = 1;
+ }
+
+ if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context))
+ {
+ re_node_set_remove_at (&newstate->nodes, i - nctx_nodes);
+ ++nctx_nodes;
+ }
+ }
+ }
+ err = register_state (dfa, newstate, hash);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_state (newstate);
+ newstate = NULL;
+ }
+ return newstate;
+}
diff --git a/grub-core/gnulib/regex_internal.h b/grub-core/gnulib/regex_internal.h
new file mode 100644
index 0000000..5aa5aa2
--- /dev/null
+++ b/grub-core/gnulib/regex_internal.h
@@ -0,0 +1,873 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _REGEX_INTERNAL_H
+#define _REGEX_INTERNAL_H 1
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <langinfo.h>
+#ifndef _LIBC
+# include "localcharset.h"
+#endif
+#if defined HAVE_LOCALE_H || defined _LIBC
+# include <locale.h>
+#endif
+
+#include <wchar.h>
+#include <wctype.h>
+#include <stdint.h>
+#if defined _LIBC
+# include <bits/libc-lock.h>
+#else
+# define __libc_lock_init(NAME) do { } while (0)
+# define __libc_lock_lock(NAME) do { } while (0)
+# define __libc_lock_unlock(NAME) do { } while (0)
+#endif
+
+/* In case that the system doesn't have isblank(). */
+#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
+# define isblank(ch) ((ch) == ' ' || (ch) == '\t')
+#endif
+
+#ifdef _LIBC
+# ifndef _RE_DEFINE_LOCALE_FUNCTIONS
+# define _RE_DEFINE_LOCALE_FUNCTIONS 1
+# include <locale/localeinfo.h>
+# include <locale/elem-hash.h>
+# include <locale/coll-lookup.h>
+# endif
+#endif
+
+/* This is for other GNU distributions with internationalized messages. */
+#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
+# include <libintl.h>
+# ifdef _LIBC
+# undef gettext
+# define gettext(msgid) \
+ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES)
+# endif
+#else
+# define gettext(msgid) (msgid)
+#endif
+
+#ifndef gettext_noop
+/* This define is so xgettext can find the internationalizable
+ strings. */
+# define gettext_noop(String) String
+#endif
+
+/* For loser systems without the definition. */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
+# define RE_ENABLE_I18N
+#endif
+
+#if __GNUC__ >= 3
+# define BE(expr, val) __builtin_expect (expr, val)
+#else
+# define BE(expr, val) (expr)
+# ifdef _LIBC
+# define inline
+# endif
+#endif
+
+/* Number of ASCII characters. */
+#define ASCII_CHARS 0x80
+
+/* Number of single byte characters. */
+#define SBC_MAX (UCHAR_MAX + 1)
+
+#define COLL_ELEM_LEN_MAX 8
+
+/* The character which represents newline. */
+#define NEWLINE_CHAR '\n'
+#define WIDE_NEWLINE_CHAR L'\n'
+
+/* Rename to standard API for using out of glibc. */
+#ifndef _LIBC
+# define __wctype wctype
+# define __iswctype iswctype
+# define __btowc btowc
+# define __wcrtomb wcrtomb
+# define __mbrtowc mbrtowc
+# define __regfree regfree
+# define attribute_hidden
+#endif /* not _LIBC */
+
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+# define __attribute(arg) __attribute__ (arg)
+#else
+# define __attribute(arg)
+#endif
+
+typedef __re_idx_t Idx;
+
+/* Special return value for failure to match. */
+#define REG_MISSING ((Idx) -1)
+
+/* Special return value for internal error. */
+#define REG_ERROR ((Idx) -2)
+
+/* Test whether N is a valid index, and is not one of the above. */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR)
+#else
+# define REG_VALID_INDEX(n) (0 <= (n))
+#endif
+
+/* Test whether N is a valid nonzero index. */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1))
+#else
+# define REG_VALID_NONZERO_INDEX(n) (0 < (n))
+#endif
+
+/* A hash value, suitable for computing hash tables. */
+typedef __re_size_t re_hashval_t;
+
+/* An integer used to represent a set of bits. It must be unsigned,
+ and must be at least as wide as unsigned int. */
+typedef unsigned long int bitset_word_t;
+/* All bits set in a bitset_word_t. */
+#define BITSET_WORD_MAX ULONG_MAX
+
+/* Number of bits in a bitset_word_t. For portability to hosts with
+ padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)';
+ instead, deduce it directly from BITSET_WORD_MAX. Avoid
+ greater-than-32-bit integers and unconditional shifts by more than
+ 31 bits, as they're not portable. */
+#if BITSET_WORD_MAX == 0xffffffffUL
+# define BITSET_WORD_BITS 32
+#elif BITSET_WORD_MAX >> 31 >> 4 == 1
+# define BITSET_WORD_BITS 36
+#elif BITSET_WORD_MAX >> 31 >> 16 == 1
+# define BITSET_WORD_BITS 48
+#elif BITSET_WORD_MAX >> 31 >> 28 == 1
+# define BITSET_WORD_BITS 60
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1
+# define BITSET_WORD_BITS 64
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1
+# define BITSET_WORD_BITS 72
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1
+# define BITSET_WORD_BITS 128
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1
+# define BITSET_WORD_BITS 256
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1
+# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */
+# if BITSET_WORD_BITS <= SBC_MAX
+# error "Invalid SBC_MAX"
+# endif
+#else
+# error "Add case for new bitset_word_t size"
+#endif
+
+/* Number of bitset_word_t values in a bitset_t. */
+#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
+
+typedef bitset_word_t bitset_t[BITSET_WORDS];
+typedef bitset_word_t *re_bitset_ptr_t;
+typedef const bitset_word_t *re_const_bitset_ptr_t;
+
+#define PREV_WORD_CONSTRAINT 0x0001
+#define PREV_NOTWORD_CONSTRAINT 0x0002
+#define NEXT_WORD_CONSTRAINT 0x0004
+#define NEXT_NOTWORD_CONSTRAINT 0x0008
+#define PREV_NEWLINE_CONSTRAINT 0x0010
+#define NEXT_NEWLINE_CONSTRAINT 0x0020
+#define PREV_BEGBUF_CONSTRAINT 0x0040
+#define NEXT_ENDBUF_CONSTRAINT 0x0080
+#define WORD_DELIM_CONSTRAINT 0x0100
+#define NOT_WORD_DELIM_CONSTRAINT 0x0200
+
+typedef enum
+{
+ INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT,
+ WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT,
+ WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT,
+ INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT,
+ LINE_FIRST = PREV_NEWLINE_CONSTRAINT,
+ LINE_LAST = NEXT_NEWLINE_CONSTRAINT,
+ BUF_FIRST = PREV_BEGBUF_CONSTRAINT,
+ BUF_LAST = NEXT_ENDBUF_CONSTRAINT,
+ WORD_DELIM = WORD_DELIM_CONSTRAINT,
+ NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT
+} re_context_type;
+
+typedef struct
+{
+ Idx alloc;
+ Idx nelem;
+ Idx *elems;
+} re_node_set;
+
+typedef enum
+{
+ NON_TYPE = 0,
+
+ /* Node type, These are used by token, node, tree. */
+ CHARACTER = 1,
+ END_OF_RE = 2,
+ SIMPLE_BRACKET = 3,
+ OP_BACK_REF = 4,
+ OP_PERIOD = 5,
+#ifdef RE_ENABLE_I18N
+ COMPLEX_BRACKET = 6,
+ OP_UTF8_PERIOD = 7,
+#endif /* RE_ENABLE_I18N */
+
+ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used
+ when the debugger shows values of this enum type. */
+#define EPSILON_BIT 8
+ OP_OPEN_SUBEXP = EPSILON_BIT | 0,
+ OP_CLOSE_SUBEXP = EPSILON_BIT | 1,
+ OP_ALT = EPSILON_BIT | 2,
+ OP_DUP_ASTERISK = EPSILON_BIT | 3,
+ ANCHOR = EPSILON_BIT | 4,
+
+ /* Tree type, these are used only by tree. */
+ CONCAT = 16,
+ SUBEXP = 17,
+
+ /* Token type, these are used only by token. */
+ OP_DUP_PLUS = 18,
+ OP_DUP_QUESTION,
+ OP_OPEN_BRACKET,
+ OP_CLOSE_BRACKET,
+ OP_CHARSET_RANGE,
+ OP_OPEN_DUP_NUM,
+ OP_CLOSE_DUP_NUM,
+ OP_NON_MATCH_LIST,
+ OP_OPEN_COLL_ELEM,
+ OP_CLOSE_COLL_ELEM,
+ OP_OPEN_EQUIV_CLASS,
+ OP_CLOSE_EQUIV_CLASS,
+ OP_OPEN_CHAR_CLASS,
+ OP_CLOSE_CHAR_CLASS,
+ OP_WORD,
+ OP_NOTWORD,
+ OP_SPACE,
+ OP_NOTSPACE,
+ BACK_SLASH
+
+} re_token_type_t;
+
+#ifdef RE_ENABLE_I18N
+typedef struct
+{
+ /* Multibyte characters. */
+ wchar_t *mbchars;
+
+ /* Collating symbols. */
+# ifdef _LIBC
+ int32_t *coll_syms;
+# endif
+
+ /* Equivalence classes. */
+# ifdef _LIBC
+ int32_t *equiv_classes;
+# endif
+
+ /* Range expressions. */
+# ifdef _LIBC
+ uint32_t *range_starts;
+ uint32_t *range_ends;
+# else /* not _LIBC */
+ wchar_t *range_starts;
+ wchar_t *range_ends;
+# endif /* not _LIBC */
+
+ /* Character classes. */
+ wctype_t *char_classes;
+
+ /* If this character set is the non-matching list. */
+ unsigned int non_match : 1;
+
+ /* # of multibyte characters. */
+ Idx nmbchars;
+
+ /* # of collating symbols. */
+ Idx ncoll_syms;
+
+ /* # of equivalence classes. */
+ Idx nequiv_classes;
+
+ /* # of range expressions. */
+ Idx nranges;
+
+ /* # of character classes. */
+ Idx nchar_classes;
+} re_charset_t;
+#endif /* RE_ENABLE_I18N */
+
+typedef struct
+{
+ union
+ {
+ unsigned char c; /* for CHARACTER */
+ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */
+#ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset; /* for COMPLEX_BRACKET */
+#endif /* RE_ENABLE_I18N */
+ Idx idx; /* for BACK_REF */
+ re_context_type ctx_type; /* for ANCHOR */
+ } opr;
+#if __GNUC__ >= 2 && !__STRICT_ANSI__
+ re_token_type_t type : 8;
+#else
+ re_token_type_t type;
+#endif
+ unsigned int constraint : 10; /* context constraint */
+ unsigned int duplicated : 1;
+ unsigned int opt_subexp : 1;
+#ifdef RE_ENABLE_I18N
+ unsigned int accept_mb : 1;
+ /* These 2 bits can be moved into the union if needed (e.g. if running out
+ of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */
+ unsigned int mb_partial : 1;
+#endif
+ unsigned int word_char : 1;
+} re_token_t;
+
+#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT)
+
+struct re_string_t
+{
+ /* Indicate the raw buffer which is the original string passed as an
+ argument of regexec(), re_search(), etc.. */
+ const unsigned char *raw_mbs;
+ /* Store the multibyte string. In case of "case insensitive mode" like
+ REG_ICASE, upper cases of the string are stored, otherwise MBS points
+ the same address that RAW_MBS points. */
+ unsigned char *mbs;
+#ifdef RE_ENABLE_I18N
+ /* Store the wide character string which is corresponding to MBS. */
+ wint_t *wcs;
+ Idx *offsets;
+ mbstate_t cur_state;
+#endif
+ /* Index in RAW_MBS. Each character mbs[i] corresponds to
+ raw_mbs[raw_mbs_idx + i]. */
+ Idx raw_mbs_idx;
+ /* The length of the valid characters in the buffers. */
+ Idx valid_len;
+ /* The corresponding number of bytes in raw_mbs array. */
+ Idx valid_raw_len;
+ /* The length of the buffers MBS and WCS. */
+ Idx bufs_len;
+ /* The index in MBS, which is updated by re_string_fetch_byte. */
+ Idx cur_idx;
+ /* length of RAW_MBS array. */
+ Idx raw_len;
+ /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */
+ Idx len;
+ /* End of the buffer may be shorter than its length in the cases such
+ as re_match_2, re_search_2. Then, we use STOP for end of the buffer
+ instead of LEN. */
+ Idx raw_stop;
+ /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */
+ Idx stop;
+
+ /* The context of mbs[0]. We store the context independently, since
+ the context of mbs[0] may be different from raw_mbs[0], which is
+ the beginning of the input string. */
+ unsigned int tip_context;
+ /* The translation passed as a part of an argument of re_compile_pattern. */
+ RE_TRANSLATE_TYPE trans;
+ /* Copy of re_dfa_t's word_char. */
+ re_const_bitset_ptr_t word_char;
+ /* true if REG_ICASE. */
+ unsigned char icase;
+ unsigned char is_utf8;
+ unsigned char map_notascii;
+ unsigned char mbs_allocated;
+ unsigned char offsets_needed;
+ unsigned char newline_anchor;
+ unsigned char word_ops_used;
+ int mb_cur_max;
+};
+typedef struct re_string_t re_string_t;
+
+
+struct re_dfa_t;
+typedef struct re_dfa_t re_dfa_t;
+
+#ifndef _LIBC
+# if defined __i386__ && !defined __EMX__
+# define internal_function __attribute ((regparm (3), stdcall))
+# else
+# define internal_function
+# endif
+#endif
+
+static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
+ Idx new_buf_len)
+ internal_function;
+#ifdef RE_ENABLE_I18N
+static void build_wcs_buffer (re_string_t *pstr) internal_function;
+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
+ internal_function;
+#endif /* RE_ENABLE_I18N */
+static void build_upper_buffer (re_string_t *pstr) internal_function;
+static void re_string_translate_buffer (re_string_t *pstr) internal_function;
+static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
+ int eflags)
+ internal_function __attribute ((pure));
+#define re_string_peek_byte(pstr, offset) \
+ ((pstr)->mbs[(pstr)->cur_idx + offset])
+#define re_string_fetch_byte(pstr) \
+ ((pstr)->mbs[(pstr)->cur_idx++])
+#define re_string_first_byte(pstr, idx) \
+ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)
+#define re_string_is_single_byte_char(pstr, idx) \
+ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \
+ || (pstr)->wcs[(idx) + 1] != WEOF))
+#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx)
+#define re_string_cur_idx(pstr) ((pstr)->cur_idx)
+#define re_string_get_buffer(pstr) ((pstr)->mbs)
+#define re_string_length(pstr) ((pstr)->len)
+#define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx])
+#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
+#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
+
+#include <alloca.h>
+
+#ifndef _LIBC
+# if HAVE_ALLOCA
+/* The OS usually guarantees only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ allocate anything larger than 4096 bytes. Also care for the possibility
+ of a few compiler-allocated temporary stack slots. */
+# define __libc_use_alloca(n) ((n) < 4032)
+# else
+/* alloca is implemented with malloc, so just use malloc. */
+# define __libc_use_alloca(n) 0
+# undef alloca
+# define alloca(n) malloc (n)
+# endif
+#endif
+
+#ifndef MAX
+# define MAX(a,b) ((a) < (b) ? (b) : (a))
+#endif
+
+#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
+#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
+#define re_free(p) free (p)
+
+struct bin_tree_t
+{
+ struct bin_tree_t *parent;
+ struct bin_tree_t *left;
+ struct bin_tree_t *right;
+ struct bin_tree_t *first;
+ struct bin_tree_t *next;
+
+ re_token_t token;
+
+ /* `node_idx' is the index in dfa->nodes, if `type' == 0.
+ Otherwise `type' indicate the type of this node. */
+ Idx node_idx;
+};
+typedef struct bin_tree_t bin_tree_t;
+
+#define BIN_TREE_STORAGE_SIZE \
+ ((1024 - sizeof (void *)) / sizeof (bin_tree_t))
+
+struct bin_tree_storage_t
+{
+ struct bin_tree_storage_t *next;
+ bin_tree_t data[BIN_TREE_STORAGE_SIZE];
+};
+typedef struct bin_tree_storage_t bin_tree_storage_t;
+
+#define CONTEXT_WORD 1
+#define CONTEXT_NEWLINE (CONTEXT_WORD << 1)
+#define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1)
+#define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1)
+
+#define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD)
+#define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE)
+#define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF)
+#define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF)
+#define IS_ORDINARY_CONTEXT(c) ((c) == 0)
+
+#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_')
+#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR)
+#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_')
+#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR)
+
+#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \
+ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
+ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
+ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\
+ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context)))
+
+#define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \
+ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
+ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
+ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \
+ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context)))
+
+struct re_dfastate_t
+{
+ re_hashval_t hash;
+ re_node_set nodes;
+ re_node_set non_eps_nodes;
+ re_node_set inveclosure;
+ re_node_set *entrance_nodes;
+ struct re_dfastate_t **trtable, **word_trtable;
+ unsigned int context : 4;
+ unsigned int halt : 1;
+ /* If this state can accept `multi byte'.
+ Note that we refer to multibyte characters, and multi character
+ collating elements as `multi byte'. */
+ unsigned int accept_mb : 1;
+ /* If this state has backreference node(s). */
+ unsigned int has_backref : 1;
+ unsigned int has_constraint : 1;
+};
+typedef struct re_dfastate_t re_dfastate_t;
+
+struct re_state_table_entry
+{
+ Idx num;
+ Idx alloc;
+ re_dfastate_t **array;
+};
+
+/* Array type used in re_sub_match_last_t and re_sub_match_top_t. */
+
+typedef struct
+{
+ Idx next_idx;
+ Idx alloc;
+ re_dfastate_t **array;
+} state_array_t;
+
+/* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */
+
+typedef struct
+{
+ Idx node;
+ Idx str_idx; /* The position NODE match at. */
+ state_array_t path;
+} re_sub_match_last_t;
+
+/* Store information about the node NODE whose type is OP_OPEN_SUBEXP.
+ And information about the node, whose type is OP_CLOSE_SUBEXP,
+ corresponding to NODE is stored in LASTS. */
+
+typedef struct
+{
+ Idx str_idx;
+ Idx node;
+ state_array_t *path;
+ Idx alasts; /* Allocation size of LASTS. */
+ Idx nlasts; /* The number of LASTS. */
+ re_sub_match_last_t **lasts;
+} re_sub_match_top_t;
+
+struct re_backref_cache_entry
+{
+ Idx node;
+ Idx str_idx;
+ Idx subexp_from;
+ Idx subexp_to;
+ char more;
+ char unused;
+ unsigned short int eps_reachable_subexps_map;
+};
+
+typedef struct
+{
+ /* The string object corresponding to the input string. */
+ re_string_t input;
+#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+ const re_dfa_t *const dfa;
+#else
+ const re_dfa_t *dfa;
+#endif
+ /* EFLAGS of the argument of regexec. */
+ int eflags;
+ /* Where the matching ends. */
+ Idx match_last;
+ Idx last_node;
+ /* The state log used by the matcher. */
+ re_dfastate_t **state_log;
+ Idx state_log_top;
+ /* Back reference cache. */
+ Idx nbkref_ents;
+ Idx abkref_ents;
+ struct re_backref_cache_entry *bkref_ents;
+ int max_mb_elem_len;
+ Idx nsub_tops;
+ Idx asub_tops;
+ re_sub_match_top_t **sub_tops;
+} re_match_context_t;
+
+typedef struct
+{
+ re_dfastate_t **sifted_states;
+ re_dfastate_t **limited_states;
+ Idx last_node;
+ Idx last_str_idx;
+ re_node_set limits;
+} re_sift_context_t;
+
+struct re_fail_stack_ent_t
+{
+ Idx idx;
+ Idx node;
+ regmatch_t *regs;
+ re_node_set eps_via_nodes;
+};
+
+struct re_fail_stack_t
+{
+ Idx num;
+ Idx alloc;
+ struct re_fail_stack_ent_t *stack;
+};
+
+struct re_dfa_t
+{
+ re_token_t *nodes;
+ size_t nodes_alloc;
+ size_t nodes_len;
+ Idx *nexts;
+ Idx *org_indices;
+ re_node_set *edests;
+ re_node_set *eclosures;
+ re_node_set *inveclosures;
+ struct re_state_table_entry *state_table;
+ re_dfastate_t *init_state;
+ re_dfastate_t *init_state_word;
+ re_dfastate_t *init_state_nl;
+ re_dfastate_t *init_state_begbuf;
+ bin_tree_t *str_tree;
+ bin_tree_storage_t *str_tree_storage;
+ re_bitset_ptr_t sb_char;
+ int str_tree_storage_idx;
+
+ /* number of subexpressions `re_nsub' is in regex_t. */
+ re_hashval_t state_hash_mask;
+ Idx init_node;
+ Idx nbackref; /* The number of backreference in this dfa. */
+
+ /* Bitmap expressing which backreference is used. */
+ bitset_word_t used_bkref_map;
+ bitset_word_t completed_bkref_map;
+
+ unsigned int has_plural_match : 1;
+ /* If this dfa has "multibyte node", which is a backreference or
+ a node which can accept multibyte character or multi character
+ collating element. */
+ unsigned int has_mb_node : 1;
+ unsigned int is_utf8 : 1;
+ unsigned int map_notascii : 1;
+ unsigned int word_ops_used : 1;
+ int mb_cur_max;
+ bitset_t word_char;
+ reg_syntax_t syntax;
+ Idx *subexp_map;
+#ifdef DEBUG
+ char* re_str;
+#endif
+#ifdef _LIBC
+ __libc_lock_define (, lock)
+#endif
+};
+
+#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
+#define re_node_set_remove(set,id) \
+ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
+#define re_node_set_empty(p) ((p)->nelem = 0)
+#define re_node_set_free(set) re_free ((set)->elems)
+
+
+typedef enum
+{
+ SB_CHAR,
+ MB_CHAR,
+ EQUIV_CLASS,
+ COLL_SYM,
+ CHAR_CLASS
+} bracket_elem_type;
+
+typedef struct
+{
+ bracket_elem_type type;
+ union
+ {
+ unsigned char ch;
+ unsigned char *name;
+ wchar_t wch;
+ } opr;
+} bracket_elem_t;
+
+
+/* Inline functions for bitset_t operation. */
+
+static inline void
+bitset_set (bitset_t set, Idx i)
+{
+ set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
+}
+
+static inline void
+bitset_clear (bitset_t set, Idx i)
+{
+ set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
+}
+
+static inline bool
+bitset_contain (const bitset_t set, Idx i)
+{
+ return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
+}
+
+static inline void
+bitset_empty (bitset_t set)
+{
+ memset (set, '\0', sizeof (bitset_t));
+}
+
+static inline void
+bitset_set_all (bitset_t set)
+{
+ memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
+ if (SBC_MAX % BITSET_WORD_BITS != 0)
+ set[BITSET_WORDS - 1] =
+ ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
+}
+
+static inline void
+bitset_copy (bitset_t dest, const bitset_t src)
+{
+ memcpy (dest, src, sizeof (bitset_t));
+}
+
+static inline void
+bitset_not (bitset_t set)
+{
+ int bitset_i;
+ for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i)
+ set[bitset_i] = ~set[bitset_i];
+ if (SBC_MAX % BITSET_WORD_BITS != 0)
+ set[BITSET_WORDS - 1] =
+ ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1)
+ & ~set[BITSET_WORDS - 1]);
+}
+
+static inline void
+bitset_merge (bitset_t dest, const bitset_t src)
+{
+ int bitset_i;
+ for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
+ dest[bitset_i] |= src[bitset_i];
+}
+
+static inline void
+bitset_mask (bitset_t dest, const bitset_t src)
+{
+ int bitset_i;
+ for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
+ dest[bitset_i] &= src[bitset_i];
+}
+
+#ifdef RE_ENABLE_I18N
+/* Inline functions for re_string. */
+static inline int
+internal_function __attribute ((pure))
+re_string_char_size_at (const re_string_t *pstr, Idx idx)
+{
+ int byte_idx;
+ if (pstr->mb_cur_max == 1)
+ return 1;
+ for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
+ if (pstr->wcs[idx + byte_idx] != WEOF)
+ break;
+ return byte_idx;
+}
+
+static inline wint_t
+internal_function __attribute ((pure))
+re_string_wchar_at (const re_string_t *pstr, Idx idx)
+{
+ if (pstr->mb_cur_max == 1)
+ return (wint_t) pstr->mbs[idx];
+ return (wint_t) pstr->wcs[idx];
+}
+
+static int
+internal_function __attribute ((pure))
+re_string_elem_size_at (const re_string_t *pstr, Idx idx)
+{
+# ifdef _LIBC
+ const unsigned char *p, *extra;
+ const int32_t *table, *indirect;
+ int32_t tmp;
+# include <locale/weight.h>
+ uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+
+ if (nrules != 0)
+ {
+ table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_INDIRECTMB);
+ p = pstr->mbs + idx;
+ tmp = findidx (&p);
+ return p - pstr->mbs - idx;
+ }
+ else
+# endif /* _LIBC */
+ return 1;
+}
+#endif /* RE_ENABLE_I18N */
+
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+# define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+# define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
+#if __GNUC_PREREQ (3,4)
+# undef __attribute_warn_unused_result__
+# define __attribute_warn_unused_result__ \
+ __attribute__ ((__warn_unused_result__))
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+
+#endif /* _REGEX_INTERNAL_H */
diff --git a/grub-core/gnulib/regexec.c b/grub-core/gnulib/regexec.c
new file mode 100644
index 0000000..dc449ce
--- /dev/null
+++ b/grub-core/gnulib/regexec.c
@@ -0,0 +1,4416 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
+ Idx n) internal_function;
+static void match_ctx_clean (re_match_context_t *mctx) internal_function;
+static void match_ctx_free (re_match_context_t *cache) internal_function;
+static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node,
+ Idx str_idx, Idx from, Idx to)
+ internal_function;
+static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
+ internal_function;
+static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node,
+ Idx str_idx) internal_function;
+static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop,
+ Idx node, Idx str_idx)
+ internal_function;
+static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
+ re_dfastate_t **limited_sts, Idx last_node,
+ Idx last_str_idx)
+ internal_function;
+static reg_errcode_t re_search_internal (const regex_t *preg,
+ const char *string, Idx length,
+ Idx start, Idx last_start, Idx stop,
+ size_t nmatch, regmatch_t pmatch[],
+ int eflags) internal_function;
+static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp,
+ const char *string1, Idx length1,
+ const char *string2, Idx length2,
+ Idx start, regoff_t range,
+ struct re_registers *regs,
+ Idx stop, bool ret_len) internal_function;
+static regoff_t re_search_stub (struct re_pattern_buffer *bufp,
+ const char *string, Idx length, Idx start,
+ regoff_t range, Idx stop,
+ struct re_registers *regs,
+ bool ret_len) internal_function;
+static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
+ Idx nregs, int regs_allocated)
+ internal_function;
+static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
+ internal_function;
+static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
+ Idx *p_match_first) internal_function;
+static Idx check_halt_state_context (const re_match_context_t *mctx,
+ const re_dfastate_t *state, Idx idx)
+ internal_function;
+static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
+ regmatch_t *prev_idx_match, Idx cur_node,
+ Idx cur_idx, Idx nmatch) internal_function;
+static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
+ Idx str_idx, Idx dest_node, Idx nregs,
+ regmatch_t *regs,
+ re_node_set *eps_via_nodes)
+ internal_function;
+static reg_errcode_t set_regs (const regex_t *preg,
+ const re_match_context_t *mctx,
+ size_t nmatch, regmatch_t *pmatch,
+ bool fl_backtrack) internal_function;
+static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs)
+ internal_function;
+
+#ifdef RE_ENABLE_I18N
+static int sift_states_iter_mb (const re_match_context_t *mctx,
+ re_sift_context_t *sctx,
+ Idx node_idx, Idx str_idx, Idx max_str_idx)
+ internal_function;
+#endif /* RE_ENABLE_I18N */
+static reg_errcode_t sift_states_backward (const re_match_context_t *mctx,
+ re_sift_context_t *sctx)
+ internal_function;
+static reg_errcode_t build_sifted_states (const re_match_context_t *mctx,
+ re_sift_context_t *sctx, Idx str_idx,
+ re_node_set *cur_dest)
+ internal_function;
+static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx,
+ re_sift_context_t *sctx,
+ Idx str_idx,
+ re_node_set *dest_nodes)
+ internal_function;
+static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa,
+ re_node_set *dest_nodes,
+ const re_node_set *candidates)
+ internal_function;
+static bool check_dst_limits (const re_match_context_t *mctx,
+ const re_node_set *limits,
+ Idx dst_node, Idx dst_idx, Idx src_node,
+ Idx src_idx) internal_function;
+static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx,
+ int boundaries, Idx subexp_idx,
+ Idx from_node, Idx bkref_idx)
+ internal_function;
+static int check_dst_limits_calc_pos (const re_match_context_t *mctx,
+ Idx limit, Idx subexp_idx,
+ Idx node, Idx str_idx,
+ Idx bkref_idx) internal_function;
+static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa,
+ re_node_set *dest_nodes,
+ const re_node_set *candidates,
+ re_node_set *limits,
+ struct re_backref_cache_entry *bkref_ents,
+ Idx str_idx) internal_function;
+static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx,
+ re_sift_context_t *sctx,
+ Idx str_idx, const re_node_set *candidates)
+ internal_function;
+static reg_errcode_t merge_state_array (const re_dfa_t *dfa,
+ re_dfastate_t **dst,
+ re_dfastate_t **src, Idx num)
+ internal_function;
+static re_dfastate_t *find_recover_state (reg_errcode_t *err,
+ re_match_context_t *mctx) internal_function;
+static re_dfastate_t *transit_state (reg_errcode_t *err,
+ re_match_context_t *mctx,
+ re_dfastate_t *state) internal_function;
+static re_dfastate_t *merge_state_with_log (reg_errcode_t *err,
+ re_match_context_t *mctx,
+ re_dfastate_t *next_state)
+ internal_function;
+static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx,
+ re_node_set *cur_nodes,
+ Idx str_idx) internal_function;
+#if 0
+static re_dfastate_t *transit_state_sb (reg_errcode_t *err,
+ re_match_context_t *mctx,
+ re_dfastate_t *pstate)
+ internal_function;
+#endif
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t transit_state_mb (re_match_context_t *mctx,
+ re_dfastate_t *pstate)
+ internal_function;
+#endif /* RE_ENABLE_I18N */
+static reg_errcode_t transit_state_bkref (re_match_context_t *mctx,
+ const re_node_set *nodes)
+ internal_function;
+static reg_errcode_t get_subexp (re_match_context_t *mctx,
+ Idx bkref_node, Idx bkref_str_idx)
+ internal_function;
+static reg_errcode_t get_subexp_sub (re_match_context_t *mctx,
+ const re_sub_match_top_t *sub_top,
+ re_sub_match_last_t *sub_last,
+ Idx bkref_node, Idx bkref_str)
+ internal_function;
+static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
+ Idx subexp_idx, int type) internal_function;
+static reg_errcode_t check_arrival (re_match_context_t *mctx,
+ state_array_t *path, Idx top_node,
+ Idx top_str, Idx last_node, Idx last_str,
+ int type) internal_function;
+static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx,
+ Idx str_idx,
+ re_node_set *cur_nodes,
+ re_node_set *next_nodes)
+ internal_function;
+static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa,
+ re_node_set *cur_nodes,
+ Idx ex_subexp, int type)
+ internal_function;
+static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa,
+ re_node_set *dst_nodes,
+ Idx target, Idx ex_subexp,
+ int type) internal_function;
+static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx,
+ re_node_set *cur_nodes, Idx cur_str,
+ Idx subexp_num, int type)
+ internal_function;
+static bool build_trtable (const re_dfa_t *dfa,
+ re_dfastate_t *state) internal_function;
+#ifdef RE_ENABLE_I18N
+static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+ const re_string_t *input, Idx idx)
+ internal_function;
+# ifdef _LIBC
+static unsigned int find_collation_sequence_value (const unsigned char *mbs,
+ size_t name_len)
+ internal_function;
+# endif /* _LIBC */
+#endif /* RE_ENABLE_I18N */
+static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
+ const re_dfastate_t *state,
+ re_node_set *states_node,
+ bitset_t *states_ch) internal_function;
+static bool check_node_accept (const re_match_context_t *mctx,
+ const re_token_t *node, Idx idx)
+ internal_function;
+static reg_errcode_t extend_buffers (re_match_context_t *mctx)
+ internal_function;
+
+/* Entry point for POSIX code. */
+
+/* regexec searches for a given pattern, specified by PREG, in the
+ string STRING.
+
+ If NMATCH is zero or REG_NOSUB was set in the cflags argument to
+ `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
+ least NMATCH elements, and we set them to the offsets of the
+ corresponding matched substrings.
+
+ EFLAGS specifies `execution flags' which affect matching: if
+ REG_NOTBOL is set, then ^ does not match at the beginning of the
+ string; if REG_NOTEOL is set, then $ does not match at the end.
+
+ We return 0 if we find a match and REG_NOMATCH if not. */
+
+int
+regexec (preg, string, nmatch, pmatch, eflags)
+ const regex_t *_Restrict_ preg;
+ const char *_Restrict_ string;
+ size_t nmatch;
+ regmatch_t pmatch[_Restrict_arr_];
+ int eflags;
+{
+ reg_errcode_t err;
+ Idx start, length;
+#ifdef _LIBC
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+#endif
+
+ if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
+ return REG_BADPAT;
+
+ if (eflags & REG_STARTEND)
+ {
+ start = pmatch[0].rm_so;
+ length = pmatch[0].rm_eo;
+ }
+ else
+ {
+ start = 0;
+ length = strlen (string);
+ }
+
+ __libc_lock_lock (dfa->lock);
+ if (preg->no_sub)
+ err = re_search_internal (preg, string, length, start, length,
+ length, 0, NULL, eflags);
+ else
+ err = re_search_internal (preg, string, length, start, length,
+ length, nmatch, pmatch, eflags);
+ __libc_lock_unlock (dfa->lock);
+ return err != REG_NOERROR;
+}
+
+#ifdef _LIBC
+# include <shlib-compat.h>
+versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
+
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+__typeof__ (__regexec) __compat_regexec;
+
+int
+attribute_compat_text_section
+__compat_regexec (const regex_t *_Restrict_ preg,
+ const char *_Restrict_ string, size_t nmatch,
+ regmatch_t pmatch[], int eflags)
+{
+ return regexec (preg, string, nmatch, pmatch,
+ eflags & (REG_NOTBOL | REG_NOTEOL));
+}
+compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
+# endif
+#endif
+
+/* Entry points for GNU code. */
+
+/* re_match, re_search, re_match_2, re_search_2
+
+ The former two functions operate on STRING with length LENGTH,
+ while the later two operate on concatenation of STRING1 and STRING2
+ with lengths LENGTH1 and LENGTH2, respectively.
+
+ re_match() matches the compiled pattern in BUFP against the string,
+ starting at index START.
+
+ re_search() first tries matching at index START, then it tries to match
+ starting from index START + 1, and so on. The last start position tried
+ is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same
+ way as re_match().)
+
+ The parameter STOP of re_{match,search}_2 specifies that no match exceeding
+ the first STOP characters of the concatenation of the strings should be
+ concerned.
+
+ If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match
+ and all groups is stored in REGS. (For the "_2" variants, the offsets are
+ computed relative to the concatenation, not relative to the individual
+ strings.)
+
+ On success, re_match* functions return the length of the match, re_search*
+ return the position of the start of the match. Return value -1 means no
+ match was found and -2 indicates an internal error. */
+
+regoff_t
+re_match (bufp, string, length, start, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ Idx length, start;
+ struct re_registers *regs;
+{
+ return re_search_stub (bufp, string, length, start, 0, length, regs, true);
+}
+#ifdef _LIBC
+weak_alias (__re_match, re_match)
+#endif
+
+regoff_t
+re_search (bufp, string, length, start, range, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ Idx length, start;
+ regoff_t range;
+ struct re_registers *regs;
+{
+ return re_search_stub (bufp, string, length, start, range, length, regs,
+ false);
+}
+#ifdef _LIBC
+weak_alias (__re_search, re_search)
+#endif
+
+regoff_t
+re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ Idx length1, length2, start, stop;
+ struct re_registers *regs;
+{
+ return re_search_2_stub (bufp, string1, length1, string2, length2,
+ start, 0, regs, stop, true);
+}
+#ifdef _LIBC
+weak_alias (__re_match_2, re_match_2)
+#endif
+
+regoff_t
+re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ Idx length1, length2, start, stop;
+ regoff_t range;
+ struct re_registers *regs;
+{
+ return re_search_2_stub (bufp, string1, length1, string2, length2,
+ start, range, regs, stop, false);
+}
+#ifdef _LIBC
+weak_alias (__re_search_2, re_search_2)
+#endif
+
+static regoff_t
+internal_function
+re_search_2_stub (struct re_pattern_buffer *bufp,
+ const char *string1, Idx length1,
+ const char *string2, Idx length2,
+ Idx start, regoff_t range, struct re_registers *regs,
+ Idx stop, bool ret_len)
+{
+ const char *str;
+ regoff_t rval;
+ Idx len = length1 + length2;
+ char *s = NULL;
+
+ if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0))
+ return -2;
+
+ /* Concatenate the strings. */
+ if (length2 > 0)
+ if (length1 > 0)
+ {
+ s = re_malloc (char, len);
+
+ if (BE (s == NULL, 0))
+ return -2;
+#ifdef _LIBC
+ memcpy (__mempcpy (s, string1, length1), string2, length2);
+#else
+ memcpy (s, string1, length1);
+ memcpy (s + length1, string2, length2);
+#endif
+ str = s;
+ }
+ else
+ str = string2;
+ else
+ str = string1;
+
+ rval = re_search_stub (bufp, str, len, start, range, stop, regs,
+ ret_len);
+ re_free (s);
+ return rval;
+}
+
+/* The parameters have the same meaning as those of re_search.
+ Additional parameters:
+ If RET_LEN is true the length of the match is returned (re_match style);
+ otherwise the position of the match is returned. */
+
+static regoff_t
+internal_function
+re_search_stub (struct re_pattern_buffer *bufp,
+ const char *string, Idx length,
+ Idx start, regoff_t range, Idx stop, struct re_registers *regs,
+ bool ret_len)
+{
+ reg_errcode_t result;
+ regmatch_t *pmatch;
+ Idx nregs;
+ regoff_t rval;
+ int eflags = 0;
+#ifdef _LIBC
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+#endif
+ Idx last_start = start + range;
+
+ /* Check for out-of-range. */
+ if (BE (start < 0 || start > length, 0))
+ return -1;
+ if (BE (length < last_start || (0 <= range && last_start < start), 0))
+ last_start = length;
+ else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
+ last_start = 0;
+
+ __libc_lock_lock (dfa->lock);
+
+ eflags |= (bufp->not_bol) ? REG_NOTBOL : 0;
+ eflags |= (bufp->not_eol) ? REG_NOTEOL : 0;
+
+ /* Compile fastmap if we haven't yet. */
+ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate)
+ re_compile_fastmap (bufp);
+
+ if (BE (bufp->no_sub, 0))
+ regs = NULL;
+
+ /* We need at least 1 register. */
+ if (regs == NULL)
+ nregs = 1;
+ else if (BE (bufp->regs_allocated == REGS_FIXED
+ && regs->num_regs <= bufp->re_nsub, 0))
+ {
+ nregs = regs->num_regs;
+ if (BE (nregs < 1, 0))
+ {
+ /* Nothing can be copied to regs. */
+ regs = NULL;
+ nregs = 1;
+ }
+ }
+ else
+ nregs = bufp->re_nsub + 1;
+ pmatch = re_malloc (regmatch_t, nregs);
+ if (BE (pmatch == NULL, 0))
+ {
+ rval = -2;
+ goto out;
+ }
+
+ result = re_search_internal (bufp, string, length, start, last_start, stop,
+ nregs, pmatch, eflags);
+
+ rval = 0;
+
+ /* I hope we needn't fill ther regs with -1's when no match was found. */
+ if (result != REG_NOERROR)
+ rval = -1;
+ else if (regs != NULL)
+ {
+ /* If caller wants register contents data back, copy them. */
+ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs,
+ bufp->regs_allocated);
+ if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0))
+ rval = -2;
+ }
+
+ if (BE (rval == 0, 1))
+ {
+ if (ret_len)
+ {
+ assert (pmatch[0].rm_so == start);
+ rval = pmatch[0].rm_eo - start;
+ }
+ else
+ rval = pmatch[0].rm_so;
+ }
+ re_free (pmatch);
+ out:
+ __libc_lock_unlock (dfa->lock);
+ return rval;
+}
+
+static unsigned int
+internal_function
+re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
+ int regs_allocated)
+{
+ int rval = REGS_REALLOCATE;
+ Idx i;
+ Idx need_regs = nregs + 1;
+ /* We need one extra element beyond `num_regs' for the `-1' marker GNU code
+ uses. */
+
+ /* Have the register data arrays been allocated? */
+ if (regs_allocated == REGS_UNALLOCATED)
+ { /* No. So allocate them with malloc. */
+ regs->start = re_malloc (regoff_t, need_regs);
+ if (BE (regs->start == NULL, 0))
+ return REGS_UNALLOCATED;
+ regs->end = re_malloc (regoff_t, need_regs);
+ if (BE (regs->end == NULL, 0))
+ {
+ re_free (regs->start);
+ return REGS_UNALLOCATED;
+ }
+ regs->num_regs = need_regs;
+ }
+ else if (regs_allocated == REGS_REALLOCATE)
+ { /* Yes. If we need more elements than were already
+ allocated, reallocate them. If we need fewer, just
+ leave it alone. */
+ if (BE (need_regs > regs->num_regs, 0))
+ {
+ regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs);
+ regoff_t *new_end;
+ if (BE (new_start == NULL, 0))
+ return REGS_UNALLOCATED;
+ new_end = re_realloc (regs->end, regoff_t, need_regs);
+ if (BE (new_end == NULL, 0))
+ {
+ re_free (new_start);
+ return REGS_UNALLOCATED;
+ }
+ regs->start = new_start;
+ regs->end = new_end;
+ regs->num_regs = need_regs;
+ }
+ }
+ else
+ {
+ assert (regs_allocated == REGS_FIXED);
+ /* This function may not be called with REGS_FIXED and nregs too big. */
+ assert (regs->num_regs >= nregs);
+ rval = REGS_FIXED;
+ }
+
+ /* Copy the regs. */
+ for (i = 0; i < nregs; ++i)
+ {
+ regs->start[i] = pmatch[i].rm_so;
+ regs->end[i] = pmatch[i].rm_eo;
+ }
+ for ( ; i < regs->num_regs; ++i)
+ regs->start[i] = regs->end[i] = -1;
+
+ return rval;
+}
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
+ this memory for recording register information. STARTS and ENDS
+ must be allocated using the malloc library routine, and must each
+ be at least NUM_REGS * sizeof (regoff_t) bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+
+void
+re_set_registers (bufp, regs, num_regs, starts, ends)
+ struct re_pattern_buffer *bufp;
+ struct re_registers *regs;
+ __re_size_t num_regs;
+ regoff_t *starts, *ends;
+{
+ if (num_regs)
+ {
+ bufp->regs_allocated = REGS_REALLOCATE;
+ regs->num_regs = num_regs;
+ regs->start = starts;
+ regs->end = ends;
+ }
+ else
+ {
+ bufp->regs_allocated = REGS_UNALLOCATED;
+ regs->num_regs = 0;
+ regs->start = regs->end = NULL;
+ }
+}
+#ifdef _LIBC
+weak_alias (__re_set_registers, re_set_registers)
+#endif
+
+/* Entry points compatible with 4.2 BSD regex library. We don't define
+ them unless specifically requested. */
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+int
+# ifdef _LIBC
+weak_function
+# endif
+re_exec (s)
+ const char *s;
+{
+ return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
+}
+#endif /* _REGEX_RE_COMP */
+
+/* Internal entry point. */
+
+/* Searches for a compiled pattern PREG in the string STRING, whose
+ length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same
+ meaning as with regexec. LAST_START is START + RANGE, where
+ START and RANGE have the same meaning as with re_search.
+ Return REG_NOERROR if we find a match, and REG_NOMATCH if not,
+ otherwise return the error code.
+ Note: We assume front end functions already check ranges.
+ (0 <= LAST_START && LAST_START <= LENGTH) */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_search_internal (const regex_t *preg,
+ const char *string, Idx length,
+ Idx start, Idx last_start, Idx stop,
+ size_t nmatch, regmatch_t pmatch[],
+ int eflags)
+{
+ reg_errcode_t err;
+ const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+ Idx left_lim, right_lim;
+ int incr;
+ bool fl_longest_match;
+ int match_kind;
+ Idx match_first;
+ Idx match_last = REG_MISSING;
+ Idx extra_nmatch;
+ bool sb;
+ int ch;
+#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+ re_match_context_t mctx = { .dfa = dfa };
+#else
+ re_match_context_t mctx;
+#endif
+ char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate
+ && start != last_start && !preg->can_be_null)
+ ? preg->fastmap : NULL);
+ RE_TRANSLATE_TYPE t = preg->translate;
+
+#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
+ memset (&mctx, '\0', sizeof (re_match_context_t));
+ mctx.dfa = dfa;
+#endif
+
+ extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0;
+ nmatch -= extra_nmatch;
+
+ /* Check if the DFA haven't been compiled. */
+ if (BE (preg->used == 0 || dfa->init_state == NULL
+ || dfa->init_state_word == NULL || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL, 0))
+ return REG_NOMATCH;
+
+#ifdef DEBUG
+ /* We assume front-end functions already check them. */
+ assert (0 <= last_start && last_start <= length);
+#endif
+
+ /* If initial states with non-begbuf contexts have no elements,
+ the regex must be anchored. If preg->newline_anchor is set,
+ we'll never use init_state_nl, so do not check it. */
+ if (dfa->init_state->nodes.nelem == 0
+ && dfa->init_state_word->nodes.nelem == 0
+ && (dfa->init_state_nl->nodes.nelem == 0
+ || !preg->newline_anchor))
+ {
+ if (start != 0 && last_start != 0)
+ return REG_NOMATCH;
+ start = last_start = 0;
+ }
+
+ /* We must check the longest matching, if nmatch > 0. */
+ fl_longest_match = (nmatch != 0 || dfa->nbackref);
+
+ err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
+ preg->translate, (preg->syntax & RE_ICASE) != 0,
+ dfa);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ mctx.input.stop = stop;
+ mctx.input.raw_stop = stop;
+ mctx.input.newline_anchor = preg->newline_anchor;
+
+ err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ /* We will log all the DFA states through which the dfa pass,
+ if nmatch > 1, or this dfa has "multibyte node", which is a
+ back-reference or a node which can accept multibyte character or
+ multi character collating element. */
+ if (nmatch > 1 || dfa->has_mb_node)
+ {
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+
+ mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1);
+ if (BE (mctx.state_log == NULL, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+ }
+ else
+ mctx.state_log = NULL;
+
+ match_first = start;
+ mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
+ : CONTEXT_NEWLINE | CONTEXT_BEGBUF;
+
+ /* Check incrementally whether of not the input string match. */
+ incr = (last_start < start) ? -1 : 1;
+ left_lim = (last_start < start) ? last_start : start;
+ right_lim = (last_start < start) ? start : last_start;
+ sb = dfa->mb_cur_max == 1;
+ match_kind =
+ (fastmap
+ ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0)
+ | (start <= last_start ? 2 : 0)
+ | (t != NULL ? 1 : 0))
+ : 8);
+
+ for (;; match_first += incr)
+ {
+ err = REG_NOMATCH;
+ if (match_first < left_lim || right_lim < match_first)
+ goto free_return;
+
+ /* Advance as rapidly as possible through the string, until we
+ find a plausible place to start matching. This may be done
+ with varying efficiency, so there are various possibilities:
+ only the most common of them are specialized, in order to
+ save on code size. We use a switch statement for speed. */
+ switch (match_kind)
+ {
+ case 8:
+ /* No fastmap. */
+ break;
+
+ case 7:
+ /* Fastmap with single-byte translation, match forward. */
+ while (BE (match_first < right_lim, 1)
+ && !fastmap[t[(unsigned char) string[match_first]]])
+ ++match_first;
+ goto forward_match_found_start_or_reached_end;
+
+ case 6:
+ /* Fastmap without translation, match forward. */
+ while (BE (match_first < right_lim, 1)
+ && !fastmap[(unsigned char) string[match_first]])
+ ++match_first;
+
+ forward_match_found_start_or_reached_end:
+ if (BE (match_first == right_lim, 0))
+ {
+ ch = match_first >= length
+ ? 0 : (unsigned char) string[match_first];
+ if (!fastmap[t ? t[ch] : ch])
+ goto free_return;
+ }
+ break;
+
+ case 4:
+ case 5:
+ /* Fastmap without multi-byte translation, match backwards. */
+ while (match_first >= left_lim)
+ {
+ ch = match_first >= length
+ ? 0 : (unsigned char) string[match_first];
+ if (fastmap[t ? t[ch] : ch])
+ break;
+ --match_first;
+ }
+ if (match_first < left_lim)
+ goto free_return;
+ break;
+
+ default:
+ /* In this case, we can't determine easily the current byte,
+ since it might be a component byte of a multibyte
+ character. Then we use the constructed buffer instead. */
+ for (;;)
+ {
+ /* If MATCH_FIRST is out of the valid range, reconstruct the
+ buffers. */
+ __re_size_t offset = match_first - mctx.input.raw_mbs_idx;
+ if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0))
+ {
+ err = re_string_reconstruct (&mctx.input, match_first,
+ eflags);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ offset = match_first - mctx.input.raw_mbs_idx;
+ }
+ /* If MATCH_FIRST is out of the buffer, leave it as '\0'.
+ Note that MATCH_FIRST must not be smaller than 0. */
+ ch = (match_first >= length
+ ? 0 : re_string_byte_at (&mctx.input, offset));
+ if (fastmap[ch])
+ break;
+ match_first += incr;
+ if (match_first < left_lim || match_first > right_lim)
+ {
+ err = REG_NOMATCH;
+ goto free_return;
+ }
+ }
+ break;
+ }
+
+ /* Reconstruct the buffers so that the matcher can assume that
+ the matching starts from the beginning of the buffer. */
+ err = re_string_reconstruct (&mctx.input, match_first, eflags);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+#ifdef RE_ENABLE_I18N
+ /* Don't consider this char as a possible match start if it part,
+ yet isn't the head, of a multibyte character. */
+ if (!sb && !re_string_first_byte (&mctx.input, 0))
+ continue;
+#endif
+
+ /* It seems to be appropriate one, then use the matcher. */
+ /* We assume that the matching starts from 0. */
+ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
+ match_last = check_matching (&mctx, fl_longest_match,
+ start <= last_start ? &match_first : NULL);
+ if (match_last != REG_MISSING)
+ {
+ if (BE (match_last == REG_ERROR, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+ else
+ {
+ mctx.match_last = match_last;
+ if ((!preg->no_sub && nmatch > 1) || dfa->nbackref)
+ {
+ re_dfastate_t *pstate = mctx.state_log[match_last];
+ mctx.last_node = check_halt_state_context (&mctx, pstate,
+ match_last);
+ }
+ if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match)
+ || dfa->nbackref)
+ {
+ err = prune_impossible_nodes (&mctx);
+ if (err == REG_NOERROR)
+ break;
+ if (BE (err != REG_NOMATCH, 0))
+ goto free_return;
+ match_last = REG_MISSING;
+ }
+ else
+ break; /* We found a match. */
+ }
+ }
+
+ match_ctx_clean (&mctx);
+ }
+
+#ifdef DEBUG
+ assert (match_last != REG_MISSING);
+ assert (err == REG_NOERROR);
+#endif
+
+ /* Set pmatch[] if we need. */
+ if (nmatch > 0)
+ {
+ Idx reg_idx;
+
+ /* Initialize registers. */
+ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx)
+ pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1;
+
+ /* Set the points where matching start/end. */
+ pmatch[0].rm_so = 0;
+ pmatch[0].rm_eo = mctx.match_last;
+ /* FIXME: This function should fail if mctx.match_last exceeds
+ the maximum possible regoff_t value. We need a new error
+ code REG_OVERFLOW. */
+
+ if (!preg->no_sub && nmatch > 1)
+ {
+ err = set_regs (preg, &mctx, nmatch, pmatch,
+ dfa->has_plural_match && dfa->nbackref > 0);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+
+ /* At last, add the offset to the each registers, since we slided
+ the buffers so that we could assume that the matching starts
+ from 0. */
+ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
+ if (pmatch[reg_idx].rm_so != -1)
+ {
+#ifdef RE_ENABLE_I18N
+ if (BE (mctx.input.offsets_needed != 0, 0))
+ {
+ pmatch[reg_idx].rm_so =
+ (pmatch[reg_idx].rm_so == mctx.input.valid_len
+ ? mctx.input.valid_raw_len
+ : mctx.input.offsets[pmatch[reg_idx].rm_so]);
+ pmatch[reg_idx].rm_eo =
+ (pmatch[reg_idx].rm_eo == mctx.input.valid_len
+ ? mctx.input.valid_raw_len
+ : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
+ }
+#else
+ assert (mctx.input.offsets_needed == 0);
+#endif
+ pmatch[reg_idx].rm_so += match_first;
+ pmatch[reg_idx].rm_eo += match_first;
+ }
+ for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx)
+ {
+ pmatch[nmatch + reg_idx].rm_so = -1;
+ pmatch[nmatch + reg_idx].rm_eo = -1;
+ }
+
+ if (dfa->subexp_map)
+ for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++)
+ if (dfa->subexp_map[reg_idx] != reg_idx)
+ {
+ pmatch[reg_idx + 1].rm_so
+ = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so;
+ pmatch[reg_idx + 1].rm_eo
+ = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo;
+ }
+ }
+
+ free_return:
+ re_free (mctx.state_log);
+ if (dfa->nbackref)
+ match_ctx_free (&mctx);
+ re_string_destruct (&mctx.input);
+ return err;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+prune_impossible_nodes (re_match_context_t *mctx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx halt_node, match_last;
+ reg_errcode_t ret;
+ re_dfastate_t **sifted_states;
+ re_dfastate_t **lim_states = NULL;
+ re_sift_context_t sctx;
+#ifdef DEBUG
+ assert (mctx->state_log != NULL);
+#endif
+ match_last = mctx->match_last;
+ halt_node = mctx->last_node;
+
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0))
+ return REG_ESPACE;
+
+ sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
+ if (BE (sifted_states == NULL, 0))
+ {
+ ret = REG_ESPACE;
+ goto free_return;
+ }
+ if (dfa->nbackref)
+ {
+ lim_states = re_malloc (re_dfastate_t *, match_last + 1);
+ if (BE (lim_states == NULL, 0))
+ {
+ ret = REG_ESPACE;
+ goto free_return;
+ }
+ while (1)
+ {
+ memset (lim_states, '\0',
+ sizeof (re_dfastate_t *) * (match_last + 1));
+ sift_ctx_init (&sctx, sifted_states, lim_states, halt_node,
+ match_last);
+ ret = sift_states_backward (mctx, &sctx);
+ re_node_set_free (&sctx.limits);
+ if (BE (ret != REG_NOERROR, 0))
+ goto free_return;
+ if (sifted_states[0] != NULL || lim_states[0] != NULL)
+ break;
+ do
+ {
+ --match_last;
+ if (! REG_VALID_INDEX (match_last))
+ {
+ ret = REG_NOMATCH;
+ goto free_return;
+ }
+ } while (mctx->state_log[match_last] == NULL
+ || !mctx->state_log[match_last]->halt);
+ halt_node = check_halt_state_context (mctx,
+ mctx->state_log[match_last],
+ match_last);
+ }
+ ret = merge_state_array (dfa, sifted_states, lim_states,
+ match_last + 1);
+ re_free (lim_states);
+ lim_states = NULL;
+ if (BE (ret != REG_NOERROR, 0))
+ goto free_return;
+ }
+ else
+ {
+ sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last);
+ ret = sift_states_backward (mctx, &sctx);
+ re_node_set_free (&sctx.limits);
+ if (BE (ret != REG_NOERROR, 0))
+ goto free_return;
+ if (sifted_states[0] == NULL)
+ {
+ ret = REG_NOMATCH;
+ goto free_return;
+ }
+ }
+ re_free (mctx->state_log);
+ mctx->state_log = sifted_states;
+ sifted_states = NULL;
+ mctx->last_node = halt_node;
+ mctx->match_last = match_last;
+ ret = REG_NOERROR;
+ free_return:
+ re_free (sifted_states);
+ re_free (lim_states);
+ return ret;
+}
+
+/* Acquire an initial state and return it.
+ We must select appropriate initial state depending on the context,
+ since initial states may have constraints like "\<", "^", etc.. */
+
+static inline re_dfastate_t *
+__attribute ((always_inline)) internal_function
+acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
+ Idx idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ if (dfa->init_state->has_constraint)
+ {
+ unsigned int context;
+ context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags);
+ if (IS_WORD_CONTEXT (context))
+ return dfa->init_state_word;
+ else if (IS_ORDINARY_CONTEXT (context))
+ return dfa->init_state;
+ else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context))
+ return dfa->init_state_begbuf;
+ else if (IS_NEWLINE_CONTEXT (context))
+ return dfa->init_state_nl;
+ else if (IS_BEGBUF_CONTEXT (context))
+ {
+ /* It is relatively rare case, then calculate on demand. */
+ return re_acquire_state_context (err, dfa,
+ dfa->init_state->entrance_nodes,
+ context);
+ }
+ else
+ /* Must not happen? */
+ return dfa->init_state;
+ }
+ else
+ return dfa->init_state;
+}
+
+/* Check whether the regular expression match input string INPUT or not,
+ and return the index where the matching end. Return REG_MISSING if
+ there is no match, and return REG_ERROR in case of an error.
+ FL_LONGEST_MATCH means we want the POSIX longest matching.
+ If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
+ next place where we may want to try matching.
+ Note that the matcher assume that the maching starts from the current
+ index of the buffer. */
+
+static Idx
+internal_function __attribute_warn_unused_result__
+check_matching (re_match_context_t *mctx, bool fl_longest_match,
+ Idx *p_match_first)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx match = 0;
+ Idx match_last = REG_MISSING;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+ re_dfastate_t *cur_state;
+ bool at_init_state = p_match_first != NULL;
+ Idx next_start_idx = cur_str_idx;
+
+ err = REG_NOERROR;
+ cur_state = acquire_init_state_context (&err, mctx, cur_str_idx);
+ /* An initial state must not be NULL (invalid). */
+ if (BE (cur_state == NULL, 0))
+ {
+ assert (err == REG_ESPACE);
+ return REG_ERROR;
+ }
+
+ if (mctx->state_log != NULL)
+ {
+ mctx->state_log[cur_str_idx] = cur_state;
+
+ /* Check OP_OPEN_SUBEXP in the initial state in case that we use them
+ later. E.g. Processing back references. */
+ if (BE (dfa->nbackref, 0))
+ {
+ at_init_state = false;
+ err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ if (cur_state->has_backref)
+ {
+ err = transit_state_bkref (mctx, &cur_state->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ }
+
+ /* If the RE accepts NULL string. */
+ if (BE (cur_state->halt, 0))
+ {
+ if (!cur_state->has_constraint
+ || check_halt_state_context (mctx, cur_state, cur_str_idx))
+ {
+ if (!fl_longest_match)
+ return cur_str_idx;
+ else
+ {
+ match_last = cur_str_idx;
+ match = 1;
+ }
+ }
+ }
+
+ while (!re_string_eoi (&mctx->input))
+ {
+ re_dfastate_t *old_state = cur_state;
+ Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
+
+ if (BE (next_char_idx >= mctx->input.bufs_len, 0)
+ || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ && mctx->input.valid_len < mctx->input.len))
+ {
+ err = extend_buffers (mctx);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ assert (err == REG_ESPACE);
+ return REG_ERROR;
+ }
+ }
+
+ cur_state = transit_state (&err, mctx, cur_state);
+ if (mctx->state_log != NULL)
+ cur_state = merge_state_with_log (&err, mctx, cur_state);
+
+ if (cur_state == NULL)
+ {
+ /* Reached the invalid state or an error. Try to recover a valid
+ state using the state log, if available and if we have not
+ already found a valid (even if not the longest) match. */
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ERROR;
+
+ if (mctx->state_log == NULL
+ || (match && !fl_longest_match)
+ || (cur_state = find_recover_state (&err, mctx)) == NULL)
+ break;
+ }
+
+ if (BE (at_init_state, 0))
+ {
+ if (old_state == cur_state)
+ next_start_idx = next_char_idx;
+ else
+ at_init_state = false;
+ }
+
+ if (cur_state->halt)
+ {
+ /* Reached a halt state.
+ Check the halt state can satisfy the current context. */
+ if (!cur_state->has_constraint
+ || check_halt_state_context (mctx, cur_state,
+ re_string_cur_idx (&mctx->input)))
+ {
+ /* We found an appropriate halt state. */
+ match_last = re_string_cur_idx (&mctx->input);
+ match = 1;
+
+ /* We found a match, do not modify match_first below. */
+ p_match_first = NULL;
+ if (!fl_longest_match)
+ break;
+ }
+ }
+ }
+
+ if (p_match_first)
+ *p_match_first += next_start_idx;
+
+ return match_last;
+}
+
+/* Check NODE match the current context. */
+
+static bool
+internal_function
+check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context)
+{
+ re_token_type_t type = dfa->nodes[node].type;
+ unsigned int constraint = dfa->nodes[node].constraint;
+ if (type != END_OF_RE)
+ return false;
+ if (!constraint)
+ return true;
+ if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context))
+ return false;
+ return true;
+}
+
+/* Check the halt state STATE match the current context.
+ Return 0 if not match, if the node, STATE has, is a halt node and
+ match the context, return the node. */
+
+static Idx
+internal_function
+check_halt_state_context (const re_match_context_t *mctx,
+ const re_dfastate_t *state, Idx idx)
+{
+ Idx i;
+ unsigned int context;
+#ifdef DEBUG
+ assert (state->halt);
+#endif
+ context = re_string_context_at (&mctx->input, idx, mctx->eflags);
+ for (i = 0; i < state->nodes.nelem; ++i)
+ if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
+ return state->nodes.elems[i];
+ return 0;
+}
+
+/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
+ corresponding to the DFA).
+ Return the destination node, and update EPS_VIA_NODES;
+ return REG_MISSING in case of errors. */
+
+static Idx
+internal_function
+proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
+ Idx *pidx, Idx node, re_node_set *eps_via_nodes,
+ struct re_fail_stack_t *fs)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx i;
+ bool ok;
+ if (IS_EPSILON_NODE (dfa->nodes[node].type))
+ {
+ re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
+ re_node_set *edests = &dfa->edests[node];
+ Idx dest_node;
+ ok = re_node_set_insert (eps_via_nodes, node);
+ if (BE (! ok, 0))
+ return REG_ERROR;
+ /* Pick up a valid destination, or return REG_MISSING if none
+ is found. */
+ for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i)
+ {
+ Idx candidate = edests->elems[i];
+ if (!re_node_set_contains (cur_nodes, candidate))
+ continue;
+ if (dest_node == REG_MISSING)
+ dest_node = candidate;
+
+ else
+ {
+ /* In order to avoid infinite loop like "(a*)*", return the second
+ epsilon-transition if the first was already considered. */
+ if (re_node_set_contains (eps_via_nodes, dest_node))
+ return candidate;
+
+ /* Otherwise, push the second epsilon-transition on the fail stack. */
+ else if (fs != NULL
+ && push_fail_stack (fs, *pidx, candidate, nregs, regs,
+ eps_via_nodes))
+ return REG_ERROR;
+
+ /* We know we are going to exit. */
+ break;
+ }
+ }
+ return dest_node;
+ }
+ else
+ {
+ Idx naccepted = 0;
+ re_token_type_t type = dfa->nodes[node].type;
+
+#ifdef RE_ENABLE_I18N
+ if (dfa->nodes[node].accept_mb)
+ naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx);
+ else
+#endif /* RE_ENABLE_I18N */
+ if (type == OP_BACK_REF)
+ {
+ Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
+ naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
+ if (fs != NULL)
+ {
+ if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
+ return REG_MISSING;
+ else if (naccepted)
+ {
+ char *buf = (char *) re_string_get_buffer (&mctx->input);
+ if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
+ naccepted) != 0)
+ return REG_MISSING;
+ }
+ }
+
+ if (naccepted == 0)
+ {
+ Idx dest_node;
+ ok = re_node_set_insert (eps_via_nodes, node);
+ if (BE (! ok, 0))
+ return REG_ERROR;
+ dest_node = dfa->edests[node].elems[0];
+ if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
+ dest_node))
+ return dest_node;
+ }
+ }
+
+ if (naccepted != 0
+ || check_node_accept (mctx, dfa->nodes + node, *pidx))
+ {
+ Idx dest_node = dfa->nexts[node];
+ *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted;
+ if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
+ || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
+ dest_node)))
+ return REG_MISSING;
+ re_node_set_empty (eps_via_nodes);
+ return dest_node;
+ }
+ }
+ return REG_MISSING;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
+ Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
+{
+ reg_errcode_t err;
+ Idx num = fs->num++;
+ if (fs->num == fs->alloc)
+ {
+ struct re_fail_stack_ent_t *new_array;
+ new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t)
+ * fs->alloc * 2));
+ if (new_array == NULL)
+ return REG_ESPACE;
+ fs->alloc *= 2;
+ fs->stack = new_array;
+ }
+ fs->stack[num].idx = str_idx;
+ fs->stack[num].node = dest_node;
+ fs->stack[num].regs = re_malloc (regmatch_t, nregs);
+ if (fs->stack[num].regs == NULL)
+ return REG_ESPACE;
+ memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs);
+ err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes);
+ return err;
+}
+
+static Idx
+internal_function
+pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
+ regmatch_t *regs, re_node_set *eps_via_nodes)
+{
+ Idx num = --fs->num;
+ assert (REG_VALID_INDEX (num));
+ *pidx = fs->stack[num].idx;
+ memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
+ re_node_set_free (eps_via_nodes);
+ re_free (fs->stack[num].regs);
+ *eps_via_nodes = fs->stack[num].eps_via_nodes;
+ return fs->stack[num].node;
+}
+
+/* Set the positions where the subexpressions are starts/ends to registers
+ PMATCH.
+ Note: We assume that pmatch[0] is already set, and
+ pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
+ regmatch_t *pmatch, bool fl_backtrack)
+{
+ const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+ Idx idx, cur_node;
+ re_node_set eps_via_nodes;
+ struct re_fail_stack_t *fs;
+ struct re_fail_stack_t fs_body = { 0, 2, NULL };
+ regmatch_t *prev_idx_match;
+ bool prev_idx_match_malloced = false;
+
+#ifdef DEBUG
+ assert (nmatch > 1);
+ assert (mctx->state_log != NULL);
+#endif
+ if (fl_backtrack)
+ {
+ fs = &fs_body;
+ fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc);
+ if (fs->stack == NULL)
+ return REG_ESPACE;
+ }
+ else
+ fs = NULL;
+
+ cur_node = dfa->init_node;
+ re_node_set_init_empty (&eps_via_nodes);
+
+ if (__libc_use_alloca (nmatch * sizeof (regmatch_t)))
+ prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t));
+ else
+ {
+ prev_idx_match = re_malloc (regmatch_t, nmatch);
+ if (prev_idx_match == NULL)
+ {
+ free_fail_stack_return (fs);
+ return REG_ESPACE;
+ }
+ prev_idx_match_malloced = true;
+ }
+ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
+
+ for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;)
+ {
+ update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
+
+ if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
+ {
+ Idx reg_idx;
+ if (fs)
+ {
+ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
+ if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1)
+ break;
+ if (reg_idx == nmatch)
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return free_fail_stack_return (fs);
+ }
+ cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+ &eps_via_nodes);
+ }
+ else
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return REG_NOERROR;
+ }
+ }
+
+ /* Proceed to next node. */
+ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
+ &eps_via_nodes, fs);
+
+ if (BE (! REG_VALID_INDEX (cur_node), 0))
+ {
+ if (BE (cur_node == REG_ERROR, 0))
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ free_fail_stack_return (fs);
+ return REG_ESPACE;
+ }
+ if (fs)
+ cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+ &eps_via_nodes);
+ else
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return REG_NOMATCH;
+ }
+ }
+ }
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return free_fail_stack_return (fs);
+}
+
+static reg_errcode_t
+internal_function
+free_fail_stack_return (struct re_fail_stack_t *fs)
+{
+ if (fs)
+ {
+ Idx fs_idx;
+ for (fs_idx = 0; fs_idx < fs->num; ++fs_idx)
+ {
+ re_node_set_free (&fs->stack[fs_idx].eps_via_nodes);
+ re_free (fs->stack[fs_idx].regs);
+ }
+ re_free (fs->stack);
+ }
+ return REG_NOERROR;
+}
+
+static void
+internal_function
+update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
+ regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch)
+{
+ int type = dfa->nodes[cur_node].type;
+ if (type == OP_OPEN_SUBEXP)
+ {
+ Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
+
+ /* We are at the first node of this sub expression. */
+ if (reg_num < nmatch)
+ {
+ pmatch[reg_num].rm_so = cur_idx;
+ pmatch[reg_num].rm_eo = -1;
+ }
+ }
+ else if (type == OP_CLOSE_SUBEXP)
+ {
+ Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
+ if (reg_num < nmatch)
+ {
+ /* We are at the last node of this sub expression. */
+ if (pmatch[reg_num].rm_so < cur_idx)
+ {
+ pmatch[reg_num].rm_eo = cur_idx;
+ /* This is a non-empty match or we are not inside an optional
+ subexpression. Accept this right away. */
+ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
+ }
+ else
+ {
+ if (dfa->nodes[cur_node].opt_subexp
+ && prev_idx_match[reg_num].rm_so != -1)
+ /* We transited through an empty match for an optional
+ subexpression, like (a?)*, and this is not the subexp's
+ first match. Copy back the old content of the registers
+ so that matches of an inner subexpression are undone as
+ well, like in ((a?))*. */
+ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch);
+ else
+ /* We completed a subexpression, but it may be part of
+ an optional one, so do not update PREV_IDX_MATCH. */
+ pmatch[reg_num].rm_eo = cur_idx;
+ }
+ }
+ }
+}
+
+/* This function checks the STATE_LOG from the SCTX->last_str_idx to 0
+ and sift the nodes in each states according to the following rules.
+ Updated state_log will be wrote to STATE_LOG.
+
+ Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if...
+ 1. When STR_IDX == MATCH_LAST(the last index in the state_log):
+ If `a' isn't the LAST_NODE and `a' can't epsilon transit to
+ the LAST_NODE, we throw away the node `a'.
+ 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts
+ string `s' and transit to `b':
+ i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw
+ away the node `a'.
+ ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is
+ thrown away, we throw away the node `a'.
+ 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b':
+ i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the
+ node `a'.
+ ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away,
+ we throw away the node `a'. */
+
+#define STATE_NODE_CONTAINS(state,node) \
+ ((state) != NULL && re_node_set_contains (&(state)->nodes, node))
+
+static reg_errcode_t
+internal_function
+sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
+{
+ reg_errcode_t err;
+ int null_cnt = 0;
+ Idx str_idx = sctx->last_str_idx;
+ re_node_set cur_dest;
+
+#ifdef DEBUG
+ assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL);
+#endif
+
+ /* Build sifted state_log[str_idx]. It has the nodes which can epsilon
+ transit to the last_node and the last_node itself. */
+ err = re_node_set_init_1 (&cur_dest, sctx->last_node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ /* Then check each states in the state_log. */
+ while (str_idx > 0)
+ {
+ /* Update counters. */
+ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0;
+ if (null_cnt > mctx->max_mb_elem_len)
+ {
+ memset (sctx->sifted_states, '\0',
+ sizeof (re_dfastate_t *) * str_idx);
+ re_node_set_free (&cur_dest);
+ return REG_NOERROR;
+ }
+ re_node_set_empty (&cur_dest);
+ --str_idx;
+
+ if (mctx->state_log[str_idx])
+ {
+ err = build_sifted_states (mctx, sctx, str_idx, &cur_dest);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+
+ /* Add all the nodes which satisfy the following conditions:
+ - It can epsilon transit to a node in CUR_DEST.
+ - It is in CUR_SRC.
+ And update state_log. */
+ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ err = REG_NOERROR;
+ free_return:
+ re_node_set_free (&cur_dest);
+ return err;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
+ Idx str_idx, re_node_set *cur_dest)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes;
+ Idx i;
+
+ /* Then build the next sifted state.
+ We build the next sifted state on `cur_dest', and update
+ `sifted_states[str_idx]' with `cur_dest'.
+ Note:
+ `cur_dest' is the sifted state from `state_log[str_idx + 1]'.
+ `cur_src' points the node_set of the old `state_log[str_idx]'
+ (with the epsilon nodes pre-filtered out). */
+ for (i = 0; i < cur_src->nelem; i++)
+ {
+ Idx prev_node = cur_src->elems[i];
+ int naccepted = 0;
+ bool ok;
+
+#ifdef DEBUG
+ re_token_type_t type = dfa->nodes[prev_node].type;
+ assert (!IS_EPSILON_NODE (type));
+#endif
+#ifdef RE_ENABLE_I18N
+ /* If the node may accept `multi byte'. */
+ if (dfa->nodes[prev_node].accept_mb)
+ naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
+ str_idx, sctx->last_str_idx);
+#endif /* RE_ENABLE_I18N */
+
+ /* We don't check backreferences here.
+ See update_cur_sifted_state(). */
+ if (!naccepted
+ && check_node_accept (mctx, dfa->nodes + prev_node, str_idx)
+ && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1],
+ dfa->nexts[prev_node]))
+ naccepted = 1;
+
+ if (naccepted == 0)
+ continue;
+
+ if (sctx->limits.nelem)
+ {
+ Idx to_idx = str_idx + naccepted;
+ if (check_dst_limits (mctx, &sctx->limits,
+ dfa->nexts[prev_node], to_idx,
+ prev_node, str_idx))
+ continue;
+ }
+ ok = re_node_set_insert (cur_dest, prev_node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+
+ return REG_NOERROR;
+}
+
+/* Helper functions. */
+
+static reg_errcode_t
+internal_function
+clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
+{
+ Idx top = mctx->state_log_top;
+
+ if (next_state_log_idx >= mctx->input.bufs_len
+ || (next_state_log_idx >= mctx->input.valid_len
+ && mctx->input.valid_len < mctx->input.len))
+ {
+ reg_errcode_t err;
+ err = extend_buffers (mctx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ if (top < next_state_log_idx)
+ {
+ memset (mctx->state_log + top + 1, '\0',
+ sizeof (re_dfastate_t *) * (next_state_log_idx - top));
+ mctx->state_log_top = next_state_log_idx;
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function
+merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
+ re_dfastate_t **src, Idx num)
+{
+ Idx st_idx;
+ reg_errcode_t err;
+ for (st_idx = 0; st_idx < num; ++st_idx)
+ {
+ if (dst[st_idx] == NULL)
+ dst[st_idx] = src[st_idx];
+ else if (src[st_idx] != NULL)
+ {
+ re_node_set merged_set;
+ err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
+ &src[st_idx]->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ dst[st_idx] = re_acquire_state (&err, dfa, &merged_set);
+ re_node_set_free (&merged_set);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function
+update_cur_sifted_state (const re_match_context_t *mctx,
+ re_sift_context_t *sctx, Idx str_idx,
+ re_node_set *dest_nodes)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err = REG_NOERROR;
+ const re_node_set *candidates;
+ candidates = ((mctx->state_log[str_idx] == NULL) ? NULL
+ : &mctx->state_log[str_idx]->nodes);
+
+ if (dest_nodes->nelem == 0)
+ sctx->sifted_states[str_idx] = NULL;
+ else
+ {
+ if (candidates)
+ {
+ /* At first, add the nodes which can epsilon transit to a node in
+ DEST_NODE. */
+ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* Then, check the limitations in the current sift_context. */
+ if (sctx->limits.nelem)
+ {
+ err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits,
+ mctx->bkref_ents, str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+
+ sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ if (candidates && mctx->state_log[str_idx]->has_backref)
+ {
+ err = sift_states_bkref (mctx, sctx, str_idx, candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
+ const re_node_set *candidates)
+{
+ reg_errcode_t err = REG_NOERROR;
+ Idx i;
+
+ re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ if (!state->inveclosure.alloc)
+ {
+ err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem);
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ESPACE;
+ for (i = 0; i < dest_nodes->nelem; i++)
+ {
+ err = re_node_set_merge (&state->inveclosure,
+ dfa->inveclosures + dest_nodes->elems[i]);
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ESPACE;
+ }
+ }
+ return re_node_set_add_intersect (dest_nodes, candidates,
+ &state->inveclosure);
+}
+
+static reg_errcode_t
+internal_function
+sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
+ const re_node_set *candidates)
+{
+ Idx ecl_idx;
+ reg_errcode_t err;
+ re_node_set *inv_eclosure = dfa->inveclosures + node;
+ re_node_set except_nodes;
+ re_node_set_init_empty (&except_nodes);
+ for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
+ {
+ Idx cur_node = inv_eclosure->elems[ecl_idx];
+ if (cur_node == node)
+ continue;
+ if (IS_EPSILON_NODE (dfa->nodes[cur_node].type))
+ {
+ Idx edst1 = dfa->edests[cur_node].elems[0];
+ Idx edst2 = ((dfa->edests[cur_node].nelem > 1)
+ ? dfa->edests[cur_node].elems[1] : REG_MISSING);
+ if ((!re_node_set_contains (inv_eclosure, edst1)
+ && re_node_set_contains (dest_nodes, edst1))
+ || (REG_VALID_NONZERO_INDEX (edst2)
+ && !re_node_set_contains (inv_eclosure, edst2)
+ && re_node_set_contains (dest_nodes, edst2)))
+ {
+ err = re_node_set_add_intersect (&except_nodes, candidates,
+ dfa->inveclosures + cur_node);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&except_nodes);
+ return err;
+ }
+ }
+ }
+ }
+ for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
+ {
+ Idx cur_node = inv_eclosure->elems[ecl_idx];
+ if (!re_node_set_contains (&except_nodes, cur_node))
+ {
+ Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1;
+ re_node_set_remove_at (dest_nodes, idx);
+ }
+ }
+ re_node_set_free (&except_nodes);
+ return REG_NOERROR;
+}
+
+static bool
+internal_function
+check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits,
+ Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx lim_idx, src_pos, dst_pos;
+
+ Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx);
+ Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx);
+ for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
+ {
+ Idx subexp_idx;
+ struct re_backref_cache_entry *ent;
+ ent = mctx->bkref_ents + limits->elems[lim_idx];
+ subexp_idx = dfa->nodes[ent->node].opr.idx;
+
+ dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
+ subexp_idx, dst_node, dst_idx,
+ dst_bkref_idx);
+ src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
+ subexp_idx, src_node, src_idx,
+ src_bkref_idx);
+
+ /* In case of:
+ <src> <dst> ( <subexp> )
+ ( <subexp> ) <src> <dst>
+ ( <subexp1> <src> <subexp2> <dst> <subexp3> ) */
+ if (src_pos == dst_pos)
+ continue; /* This is unrelated limitation. */
+ else
+ return true;
+ }
+ return false;
+}
+
+static int
+internal_function
+check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
+ Idx subexp_idx, Idx from_node, Idx bkref_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ const re_node_set *eclosures = dfa->eclosures + from_node;
+ Idx node_idx;
+
+ /* Else, we are on the boundary: examine the nodes on the epsilon
+ closure. */
+ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx)
+ {
+ Idx node = eclosures->elems[node_idx];
+ switch (dfa->nodes[node].type)
+ {
+ case OP_BACK_REF:
+ if (bkref_idx != REG_MISSING)
+ {
+ struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
+ do
+ {
+ Idx dst;
+ int cpos;
+
+ if (ent->node != node)
+ continue;
+
+ if (subexp_idx < BITSET_WORD_BITS
+ && !(ent->eps_reachable_subexps_map
+ & ((bitset_word_t) 1 << subexp_idx)))
+ continue;
+
+ /* Recurse trying to reach the OP_OPEN_SUBEXP and
+ OP_CLOSE_SUBEXP cases below. But, if the
+ destination node is the same node as the source
+ node, don't recurse because it would cause an
+ infinite loop: a regex that exhibits this behavior
+ is ()\1*\1* */
+ dst = dfa->edests[node].elems[0];
+ if (dst == from_node)
+ {
+ if (boundaries & 1)
+ return -1;
+ else /* if (boundaries & 2) */
+ return 0;
+ }
+
+ cpos =
+ check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
+ dst, bkref_idx);
+ if (cpos == -1 /* && (boundaries & 1) */)
+ return -1;
+ if (cpos == 0 && (boundaries & 2))
+ return 0;
+
+ if (subexp_idx < BITSET_WORD_BITS)
+ ent->eps_reachable_subexps_map
+ &= ~((bitset_word_t) 1 << subexp_idx);
+ }
+ while (ent++->more);
+ }
+ break;
+
+ case OP_OPEN_SUBEXP:
+ if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx)
+ return -1;
+ break;
+
+ case OP_CLOSE_SUBEXP:
+ if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx)
+ return 0;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return (boundaries & 2) ? 1 : 0;
+}
+
+static int
+internal_function
+check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit,
+ Idx subexp_idx, Idx from_node, Idx str_idx,
+ Idx bkref_idx)
+{
+ struct re_backref_cache_entry *lim = mctx->bkref_ents + limit;
+ int boundaries;
+
+ /* If we are outside the range of the subexpression, return -1 or 1. */
+ if (str_idx < lim->subexp_from)
+ return -1;
+
+ if (lim->subexp_to < str_idx)
+ return 1;
+
+ /* If we are within the subexpression, return 0. */
+ boundaries = (str_idx == lim->subexp_from);
+ boundaries |= (str_idx == lim->subexp_to) << 1;
+ if (boundaries == 0)
+ return 0;
+
+ /* Else, examine epsilon closure. */
+ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
+ from_node, bkref_idx);
+}
+
+/* Check the limitations of sub expressions LIMITS, and remove the nodes
+ which are against limitations from DEST_NODES. */
+
+static reg_errcode_t
+internal_function
+check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
+ const re_node_set *candidates, re_node_set *limits,
+ struct re_backref_cache_entry *bkref_ents, Idx str_idx)
+{
+ reg_errcode_t err;
+ Idx node_idx, lim_idx;
+
+ for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
+ {
+ Idx subexp_idx;
+ struct re_backref_cache_entry *ent;
+ ent = bkref_ents + limits->elems[lim_idx];
+
+ if (str_idx <= ent->subexp_from || ent->str_idx < str_idx)
+ continue; /* This is unrelated limitation. */
+
+ subexp_idx = dfa->nodes[ent->node].opr.idx;
+ if (ent->subexp_to == str_idx)
+ {
+ Idx ops_node = REG_MISSING;
+ Idx cls_node = REG_MISSING;
+ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+ {
+ Idx node = dest_nodes->elems[node_idx];
+ re_token_type_t type = dfa->nodes[node].type;
+ if (type == OP_OPEN_SUBEXP
+ && subexp_idx == dfa->nodes[node].opr.idx)
+ ops_node = node;
+ else if (type == OP_CLOSE_SUBEXP
+ && subexp_idx == dfa->nodes[node].opr.idx)
+ cls_node = node;
+ }
+
+ /* Check the limitation of the open subexpression. */
+ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */
+ if (REG_VALID_INDEX (ops_node))
+ {
+ err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
+ candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ /* Check the limitation of the close subexpression. */
+ if (REG_VALID_INDEX (cls_node))
+ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+ {
+ Idx node = dest_nodes->elems[node_idx];
+ if (!re_node_set_contains (dfa->inveclosures + node,
+ cls_node)
+ && !re_node_set_contains (dfa->eclosures + node,
+ cls_node))
+ {
+ /* It is against this limitation.
+ Remove it form the current sifted state. */
+ err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
+ candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ --node_idx;
+ }
+ }
+ }
+ else /* (ent->subexp_to != str_idx) */
+ {
+ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+ {
+ Idx node = dest_nodes->elems[node_idx];
+ re_token_type_t type = dfa->nodes[node].type;
+ if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP)
+ {
+ if (subexp_idx != dfa->nodes[node].opr.idx)
+ continue;
+ /* It is against this limitation.
+ Remove it form the current sifted state. */
+ err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
+ candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ }
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
+ Idx str_idx, const re_node_set *candidates)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx node_idx, node;
+ re_sift_context_t local_sctx;
+ Idx first_idx = search_cur_bkref_entry (mctx, str_idx);
+
+ if (first_idx == REG_MISSING)
+ return REG_NOERROR;
+
+ local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */
+
+ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx)
+ {
+ Idx enabled_idx;
+ re_token_type_t type;
+ struct re_backref_cache_entry *entry;
+ node = candidates->elems[node_idx];
+ type = dfa->nodes[node].type;
+ /* Avoid infinite loop for the REs like "()\1+". */
+ if (node == sctx->last_node && str_idx == sctx->last_str_idx)
+ continue;
+ if (type != OP_BACK_REF)
+ continue;
+
+ entry = mctx->bkref_ents + first_idx;
+ enabled_idx = first_idx;
+ do
+ {
+ Idx subexp_len;
+ Idx to_idx;
+ Idx dst_node;
+ bool ok;
+ re_dfastate_t *cur_state;
+
+ if (entry->node != node)
+ continue;
+ subexp_len = entry->subexp_to - entry->subexp_from;
+ to_idx = str_idx + subexp_len;
+ dst_node = (subexp_len ? dfa->nexts[node]
+ : dfa->edests[node].elems[0]);
+
+ if (to_idx > sctx->last_str_idx
+ || sctx->sifted_states[to_idx] == NULL
+ || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node)
+ || check_dst_limits (mctx, &sctx->limits, node,
+ str_idx, dst_node, to_idx))
+ continue;
+
+ if (local_sctx.sifted_states == NULL)
+ {
+ local_sctx = *sctx;
+ err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ local_sctx.last_node = node;
+ local_sctx.last_str_idx = str_idx;
+ ok = re_node_set_insert (&local_sctx.limits, enabled_idx);
+ if (BE (! ok, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+ cur_state = local_sctx.sifted_states[str_idx];
+ err = sift_states_backward (mctx, &local_sctx);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ if (sctx->limited_states != NULL)
+ {
+ err = merge_state_array (dfa, sctx->limited_states,
+ local_sctx.sifted_states,
+ str_idx + 1);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ local_sctx.sifted_states[str_idx] = cur_state;
+ re_node_set_remove (&local_sctx.limits, enabled_idx);
+
+ /* mctx->bkref_ents may have changed, reload the pointer. */
+ entry = mctx->bkref_ents + enabled_idx;
+ }
+ while (enabled_idx++, entry++->more);
+ }
+ err = REG_NOERROR;
+ free_return:
+ if (local_sctx.sifted_states != NULL)
+ {
+ re_node_set_free (&local_sctx.limits);
+ }
+
+ return err;
+}
+
+
+#ifdef RE_ENABLE_I18N
+static int
+internal_function
+sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
+ Idx node_idx, Idx str_idx, Idx max_str_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ int naccepted;
+ /* Check the node can accept `multi byte'. */
+ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
+ if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
+ !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
+ dfa->nexts[node_idx]))
+ /* The node can't accept the `multi byte', or the
+ destination was already thrown away, then the node
+ could't accept the current input `multi byte'. */
+ naccepted = 0;
+ /* Otherwise, it is sure that the node could accept
+ `naccepted' bytes input. */
+ return naccepted;
+}
+#endif /* RE_ENABLE_I18N */
+
+
+/* Functions for state transition. */
+
+/* Return the next state to which the current state STATE will transit by
+ accepting the current input byte, and update STATE_LOG if necessary.
+ If STATE can accept a multibyte char/collating element/back reference
+ update the destination of STATE_LOG. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+transit_state (reg_errcode_t *err, re_match_context_t *mctx,
+ re_dfastate_t *state)
+{
+ re_dfastate_t **trtable;
+ unsigned char ch;
+
+#ifdef RE_ENABLE_I18N
+ /* If the current state can accept multibyte. */
+ if (BE (state->accept_mb, 0))
+ {
+ *err = transit_state_mb (mctx, state);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ }
+#endif /* RE_ENABLE_I18N */
+
+ /* Then decide the next state with the single byte. */
+#if 0
+ if (0)
+ /* don't use transition table */
+ return transit_state_sb (err, mctx, state);
+#endif
+
+ /* Use transition table */
+ ch = re_string_fetch_byte (&mctx->input);
+ for (;;)
+ {
+ trtable = state->trtable;
+ if (BE (trtable != NULL, 1))
+ return trtable[ch];
+
+ trtable = state->word_trtable;
+ if (BE (trtable != NULL, 1))
+ {
+ unsigned int context;
+ context
+ = re_string_context_at (&mctx->input,
+ re_string_cur_idx (&mctx->input) - 1,
+ mctx->eflags);
+ if (IS_WORD_CONTEXT (context))
+ return trtable[ch + SBC_MAX];
+ else
+ return trtable[ch];
+ }
+
+ if (!build_trtable (mctx->dfa, state))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ /* Retry, we now have a transition table. */
+ }
+}
+
+/* Update the state_log if we need */
+static re_dfastate_t *
+internal_function
+merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
+ re_dfastate_t *next_state)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx cur_idx = re_string_cur_idx (&mctx->input);
+
+ if (cur_idx > mctx->state_log_top)
+ {
+ mctx->state_log[cur_idx] = next_state;
+ mctx->state_log_top = cur_idx;
+ }
+ else if (mctx->state_log[cur_idx] == 0)
+ {
+ mctx->state_log[cur_idx] = next_state;
+ }
+ else
+ {
+ re_dfastate_t *pstate;
+ unsigned int context;
+ re_node_set next_nodes, *log_nodes, *table_nodes = NULL;
+ /* If (state_log[cur_idx] != 0), it implies that cur_idx is
+ the destination of a multibyte char/collating element/
+ back reference. Then the next state is the union set of
+ these destinations and the results of the transition table. */
+ pstate = mctx->state_log[cur_idx];
+ log_nodes = pstate->entrance_nodes;
+ if (next_state != NULL)
+ {
+ table_nodes = next_state->entrance_nodes;
+ *err = re_node_set_init_union (&next_nodes, table_nodes,
+ log_nodes);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ }
+ else
+ next_nodes = *log_nodes;
+ /* Note: We already add the nodes of the initial state,
+ then we don't need to add them here. */
+
+ context = re_string_context_at (&mctx->input,
+ re_string_cur_idx (&mctx->input) - 1,
+ mctx->eflags);
+ next_state = mctx->state_log[cur_idx]
+ = re_acquire_state_context (err, dfa, &next_nodes, context);
+ /* We don't need to check errors here, since the return value of
+ this function is next_state and ERR is already set. */
+
+ if (table_nodes != NULL)
+ re_node_set_free (&next_nodes);
+ }
+
+ if (BE (dfa->nbackref, 0) && next_state != NULL)
+ {
+ /* Check OP_OPEN_SUBEXP in the current state in case that we use them
+ later. We must check them here, since the back references in the
+ next state might use them. */
+ *err = check_subexp_matching_top (mctx, &next_state->nodes,
+ cur_idx);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+
+ /* If the next state has back references. */
+ if (next_state->has_backref)
+ {
+ *err = transit_state_bkref (mctx, &next_state->nodes);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ next_state = mctx->state_log[cur_idx];
+ }
+ }
+
+ return next_state;
+}
+
+/* Skip bytes in the input that correspond to part of a
+ multi-byte match, then look in the log for a state
+ from which to restart matching. */
+static re_dfastate_t *
+internal_function
+find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
+{
+ re_dfastate_t *cur_state;
+ do
+ {
+ Idx max = mctx->state_log_top;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+
+ do
+ {
+ if (++cur_str_idx > max)
+ return NULL;
+ re_string_skip_bytes (&mctx->input, 1);
+ }
+ while (mctx->state_log[cur_str_idx] == NULL);
+
+ cur_state = merge_state_with_log (err, mctx, NULL);
+ }
+ while (*err == REG_NOERROR && cur_state == NULL);
+ return cur_state;
+}
+
+/* Helper functions for transit_state. */
+
+/* From the node set CUR_NODES, pick up the nodes whose types are
+ OP_OPEN_SUBEXP and which have corresponding back references in the regular
+ expression. And register them to use them later for evaluating the
+ correspoding back references. */
+
+static reg_errcode_t
+internal_function
+check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
+ Idx str_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx node_idx;
+ reg_errcode_t err;
+
+ /* TODO: This isn't efficient.
+ Because there might be more than one nodes whose types are
+ OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all
+ nodes.
+ E.g. RE: (a){2} */
+ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx)
+ {
+ Idx node = cur_nodes->elems[node_idx];
+ if (dfa->nodes[node].type == OP_OPEN_SUBEXP
+ && dfa->nodes[node].opr.idx < BITSET_WORD_BITS
+ && (dfa->used_bkref_map
+ & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
+ {
+ err = match_ctx_add_subtop (mctx, node, str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ return REG_NOERROR;
+}
+
+#if 0
+/* Return the next state to which the current state STATE will transit by
+ accepting the current input byte. */
+
+static re_dfastate_t *
+transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
+ re_dfastate_t *state)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ re_node_set next_nodes;
+ re_dfastate_t *next_state;
+ Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input);
+ unsigned int context;
+
+ *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
+ {
+ Idx cur_node = state->nodes.elems[node_cnt];
+ if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx))
+ {
+ *err = re_node_set_merge (&next_nodes,
+ dfa->eclosures + dfa->nexts[cur_node]);
+ if (BE (*err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return NULL;
+ }
+ }
+ }
+ context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags);
+ next_state = re_acquire_state_context (err, dfa, &next_nodes, context);
+ /* We don't need to check errors here, since the return value of
+ this function is next_state and ERR is already set. */
+
+ re_node_set_free (&next_nodes);
+ re_string_skip_bytes (&mctx->input, 1);
+ return next_state;
+}
+#endif
+
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t
+internal_function
+transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx i;
+
+ for (i = 0; i < pstate->nodes.nelem; ++i)
+ {
+ re_node_set dest_nodes, *new_nodes;
+ Idx cur_node_idx = pstate->nodes.elems[i];
+ int naccepted;
+ Idx dest_idx;
+ unsigned int context;
+ re_dfastate_t *dest_state;
+
+ if (!dfa->nodes[cur_node_idx].accept_mb)
+ continue;
+
+ if (dfa->nodes[cur_node_idx].constraint)
+ {
+ context = re_string_context_at (&mctx->input,
+ re_string_cur_idx (&mctx->input),
+ mctx->eflags);
+ if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint,
+ context))
+ continue;
+ }
+
+ /* How many bytes the node can accept? */
+ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input,
+ re_string_cur_idx (&mctx->input));
+ if (naccepted == 0)
+ continue;
+
+ /* The node can accepts `naccepted' bytes. */
+ dest_idx = re_string_cur_idx (&mctx->input) + naccepted;
+ mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
+ : mctx->max_mb_elem_len);
+ err = clean_state_log_if_needed (mctx, dest_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+#ifdef DEBUG
+ assert (dfa->nexts[cur_node_idx] != REG_MISSING);
+#endif
+ new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
+
+ dest_state = mctx->state_log[dest_idx];
+ if (dest_state == NULL)
+ dest_nodes = *new_nodes;
+ else
+ {
+ err = re_node_set_init_union (&dest_nodes,
+ dest_state->entrance_nodes, new_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ context = re_string_context_at (&mctx->input, dest_idx - 1,
+ mctx->eflags);
+ mctx->state_log[dest_idx]
+ = re_acquire_state_context (&err, dfa, &dest_nodes, context);
+ if (dest_state != NULL)
+ re_node_set_free (&dest_nodes);
+ if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0))
+ return err;
+ }
+ return REG_NOERROR;
+}
+#endif /* RE_ENABLE_I18N */
+
+static reg_errcode_t
+internal_function
+transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx i;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+
+ for (i = 0; i < nodes->nelem; ++i)
+ {
+ Idx dest_str_idx, prev_nelem, bkc_idx;
+ Idx node_idx = nodes->elems[i];
+ unsigned int context;
+ const re_token_t *node = dfa->nodes + node_idx;
+ re_node_set *new_dest_nodes;
+
+ /* Check whether `node' is a backreference or not. */
+ if (node->type != OP_BACK_REF)
+ continue;
+
+ if (node->constraint)
+ {
+ context = re_string_context_at (&mctx->input, cur_str_idx,
+ mctx->eflags);
+ if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))
+ continue;
+ }
+
+ /* `node' is a backreference.
+ Check the substring which the substring matched. */
+ bkc_idx = mctx->nbkref_ents;
+ err = get_subexp (mctx, node_idx, cur_str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ /* And add the epsilon closures (which is `new_dest_nodes') of
+ the backreference to appropriate state_log. */
+#ifdef DEBUG
+ assert (dfa->nexts[node_idx] != REG_MISSING);
+#endif
+ for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
+ {
+ Idx subexp_len;
+ re_dfastate_t *dest_state;
+ struct re_backref_cache_entry *bkref_ent;
+ bkref_ent = mctx->bkref_ents + bkc_idx;
+ if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx)
+ continue;
+ subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from;
+ new_dest_nodes = (subexp_len == 0
+ ? dfa->eclosures + dfa->edests[node_idx].elems[0]
+ : dfa->eclosures + dfa->nexts[node_idx]);
+ dest_str_idx = (cur_str_idx + bkref_ent->subexp_to
+ - bkref_ent->subexp_from);
+ context = re_string_context_at (&mctx->input, dest_str_idx - 1,
+ mctx->eflags);
+ dest_state = mctx->state_log[dest_str_idx];
+ prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0
+ : mctx->state_log[cur_str_idx]->nodes.nelem);
+ /* Add `new_dest_node' to state_log. */
+ if (dest_state == NULL)
+ {
+ mctx->state_log[dest_str_idx]
+ = re_acquire_state_context (&err, dfa, new_dest_nodes,
+ context);
+ if (BE (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ else
+ {
+ re_node_set dest_nodes;
+ err = re_node_set_init_union (&dest_nodes,
+ dest_state->entrance_nodes,
+ new_dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&dest_nodes);
+ goto free_return;
+ }
+ mctx->state_log[dest_str_idx]
+ = re_acquire_state_context (&err, dfa, &dest_nodes, context);
+ re_node_set_free (&dest_nodes);
+ if (BE (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ /* We need to check recursively if the backreference can epsilon
+ transit. */
+ if (subexp_len == 0
+ && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)
+ {
+ err = check_subexp_matching_top (mctx, new_dest_nodes,
+ cur_str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ err = transit_state_bkref (mctx, new_dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ }
+ }
+ err = REG_NOERROR;
+ free_return:
+ return err;
+}
+
+/* Enumerate all the candidates which the backreference BKREF_NODE can match
+ at BKREF_STR_IDX, and register them by match_ctx_add_entry().
+ Note that we might collect inappropriate candidates here.
+ However, the cost of checking them strictly here is too high, then we
+ delay these checking for prune_impossible_nodes(). */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx subexp_num, sub_top_idx;
+ const char *buf = (const char *) re_string_get_buffer (&mctx->input);
+ /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */
+ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
+ if (cache_idx != REG_MISSING)
+ {
+ const struct re_backref_cache_entry *entry
+ = mctx->bkref_ents + cache_idx;
+ do
+ if (entry->node == bkref_node)
+ return REG_NOERROR; /* We already checked it. */
+ while (entry++->more);
+ }
+
+ subexp_num = dfa->nodes[bkref_node].opr.idx;
+
+ /* For each sub expression */
+ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx)
+ {
+ reg_errcode_t err;
+ re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx];
+ re_sub_match_last_t *sub_last;
+ Idx sub_last_idx, sl_str, bkref_str_off;
+
+ if (dfa->nodes[sub_top->node].opr.idx != subexp_num)
+ continue; /* It isn't related. */
+
+ sl_str = sub_top->str_idx;
+ bkref_str_off = bkref_str_idx;
+ /* At first, check the last node of sub expressions we already
+ evaluated. */
+ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx)
+ {
+ regoff_t sl_str_diff;
+ sub_last = sub_top->lasts[sub_last_idx];
+ sl_str_diff = sub_last->str_idx - sl_str;
+ /* The matched string by the sub expression match with the substring
+ at the back reference? */
+ if (sl_str_diff > 0)
+ {
+ if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0))
+ {
+ /* Not enough chars for a successful match. */
+ if (bkref_str_off + sl_str_diff > mctx->input.len)
+ break;
+
+ err = clean_state_log_if_needed (mctx,
+ bkref_str_off
+ + sl_str_diff);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ buf = (const char *) re_string_get_buffer (&mctx->input);
+ }
+ if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0)
+ /* We don't need to search this sub expression any more. */
+ break;
+ }
+ bkref_str_off += sl_str_diff;
+ sl_str += sl_str_diff;
+ err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
+ bkref_str_idx);
+
+ /* Reload buf, since the preceding call might have reallocated
+ the buffer. */
+ buf = (const char *) re_string_get_buffer (&mctx->input);
+
+ if (err == REG_NOMATCH)
+ continue;
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ if (sub_last_idx < sub_top->nlasts)
+ continue;
+ if (sub_last_idx > 0)
+ ++sl_str;
+ /* Then, search for the other last nodes of the sub expression. */
+ for (; sl_str <= bkref_str_idx; ++sl_str)
+ {
+ Idx cls_node;
+ regoff_t sl_str_off;
+ const re_node_set *nodes;
+ sl_str_off = sl_str - sub_top->str_idx;
+ /* The matched string by the sub expression match with the substring
+ at the back reference? */
+ if (sl_str_off > 0)
+ {
+ if (BE (bkref_str_off >= mctx->input.valid_len, 0))
+ {
+ /* If we are at the end of the input, we cannot match. */
+ if (bkref_str_off >= mctx->input.len)
+ break;
+
+ err = extend_buffers (mctx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ buf = (const char *) re_string_get_buffer (&mctx->input);
+ }
+ if (buf [bkref_str_off++] != buf[sl_str - 1])
+ break; /* We don't need to search this sub expression
+ any more. */
+ }
+ if (mctx->state_log[sl_str] == NULL)
+ continue;
+ /* Does this state have a ')' of the sub expression? */
+ nodes = &mctx->state_log[sl_str]->nodes;
+ cls_node = find_subexp_node (dfa, nodes, subexp_num,
+ OP_CLOSE_SUBEXP);
+ if (cls_node == REG_MISSING)
+ continue; /* No. */
+ if (sub_top->path == NULL)
+ {
+ sub_top->path = calloc (sizeof (state_array_t),
+ sl_str - sub_top->str_idx + 1);
+ if (sub_top->path == NULL)
+ return REG_ESPACE;
+ }
+ /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node
+ in the current context? */
+ err = check_arrival (mctx, sub_top->path, sub_top->node,
+ sub_top->str_idx, cls_node, sl_str,
+ OP_CLOSE_SUBEXP);
+ if (err == REG_NOMATCH)
+ continue;
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str);
+ if (BE (sub_last == NULL, 0))
+ return REG_ESPACE;
+ err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
+ bkref_str_idx);
+ if (err == REG_NOMATCH)
+ continue;
+ }
+ }
+ return REG_NOERROR;
+}
+
+/* Helper functions for get_subexp(). */
+
+/* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR.
+ If it can arrive, register the sub expression expressed with SUB_TOP
+ and SUB_LAST. */
+
+static reg_errcode_t
+internal_function
+get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
+ re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str)
+{
+ reg_errcode_t err;
+ Idx to_idx;
+ /* Can the subexpression arrive the back reference? */
+ err = check_arrival (mctx, &sub_last->path, sub_last->node,
+ sub_last->str_idx, bkref_node, bkref_str,
+ OP_OPEN_SUBEXP);
+ if (err != REG_NOERROR)
+ return err;
+ err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx,
+ sub_last->str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx;
+ return clean_state_log_if_needed (mctx, to_idx);
+}
+
+/* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX.
+ Search '(' if FL_OPEN, or search ')' otherwise.
+ TODO: This function isn't efficient...
+ Because there might be more than one nodes whose types are
+ OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all
+ nodes.
+ E.g. RE: (a){2} */
+
+static Idx
+internal_function
+find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
+ Idx subexp_idx, int type)
+{
+ Idx cls_idx;
+ for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx)
+ {
+ Idx cls_node = nodes->elems[cls_idx];
+ const re_token_t *node = dfa->nodes + cls_node;
+ if (node->type == type
+ && node->opr.idx == subexp_idx)
+ return cls_node;
+ }
+ return REG_MISSING;
+}
+
+/* Check whether the node TOP_NODE at TOP_STR can arrive to the node
+ LAST_NODE at LAST_STR. We record the path onto PATH since it will be
+ heavily reused.
+ Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
+ Idx top_str, Idx last_node, Idx last_str, int type)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err = REG_NOERROR;
+ Idx subexp_num, backup_cur_idx, str_idx, null_cnt;
+ re_dfastate_t *cur_state = NULL;
+ re_node_set *cur_nodes, next_nodes;
+ re_dfastate_t **backup_state_log;
+ unsigned int context;
+
+ subexp_num = dfa->nodes[top_node].opr.idx;
+ /* Extend the buffer if we need. */
+ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0))
+ {
+ re_dfastate_t **new_array;
+ Idx old_alloc = path->alloc;
+ Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1;
+ if (BE (new_alloc < old_alloc, 0)
+ || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+ return REG_ESPACE;
+ new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ path->array = new_array;
+ path->alloc = new_alloc;
+ memset (new_array + old_alloc, '\0',
+ sizeof (re_dfastate_t *) * (path->alloc - old_alloc));
+ }
+
+ str_idx = path->next_idx ? path->next_idx : top_str;
+
+ /* Temporary modify MCTX. */
+ backup_state_log = mctx->state_log;
+ backup_cur_idx = mctx->input.cur_idx;
+ mctx->state_log = path->array;
+ mctx->input.cur_idx = str_idx;
+
+ /* Setup initial node set. */
+ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
+ if (str_idx == top_str)
+ {
+ err = re_node_set_init_1 (&next_nodes, top_node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ else
+ {
+ cur_state = mctx->state_log[str_idx];
+ if (cur_state && cur_state->has_backref)
+ {
+ err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ else
+ re_node_set_init_empty (&next_nodes);
+ }
+ if (str_idx == top_str || (cur_state && cur_state->has_backref))
+ {
+ if (next_nodes.nelem)
+ {
+ err = expand_bkref_cache (mctx, &next_nodes, str_idx,
+ subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
+ if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ mctx->state_log[str_idx] = cur_state;
+ }
+
+ for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;)
+ {
+ re_node_set_empty (&next_nodes);
+ if (mctx->state_log[str_idx + 1])
+ {
+ err = re_node_set_merge (&next_nodes,
+ &mctx->state_log[str_idx + 1]->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ if (cur_state)
+ {
+ err = check_arrival_add_next_nodes (mctx, str_idx,
+ &cur_state->non_eps_nodes,
+ &next_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ ++str_idx;
+ if (next_nodes.nelem)
+ {
+ err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ err = expand_bkref_cache (mctx, &next_nodes, str_idx,
+ subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
+ cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
+ if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ mctx->state_log[str_idx] = cur_state;
+ null_cnt = cur_state == NULL ? null_cnt + 1 : 0;
+ }
+ re_node_set_free (&next_nodes);
+ cur_nodes = (mctx->state_log[last_str] == NULL ? NULL
+ : &mctx->state_log[last_str]->nodes);
+ path->next_idx = str_idx;
+
+ /* Fix MCTX. */
+ mctx->state_log = backup_state_log;
+ mctx->input.cur_idx = backup_cur_idx;
+
+ /* Then check the current node set has the node LAST_NODE. */
+ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node))
+ return REG_NOERROR;
+
+ return REG_NOMATCH;
+}
+
+/* Helper functions for check_arrival. */
+
+/* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them
+ to NEXT_NODES.
+ TODO: This function is similar to the functions transit_state*(),
+ however this function has many additional works.
+ Can't we unify them? */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
+ re_node_set *cur_nodes, re_node_set *next_nodes)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ bool ok;
+ Idx cur_idx;
+#ifdef RE_ENABLE_I18N
+ reg_errcode_t err = REG_NOERROR;
+#endif
+ re_node_set union_set;
+ re_node_set_init_empty (&union_set);
+ for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
+ {
+ int naccepted = 0;
+ Idx cur_node = cur_nodes->elems[cur_idx];
+#ifdef DEBUG
+ re_token_type_t type = dfa->nodes[cur_node].type;
+ assert (!IS_EPSILON_NODE (type));
+#endif
+#ifdef RE_ENABLE_I18N
+ /* If the node may accept `multi byte'. */
+ if (dfa->nodes[cur_node].accept_mb)
+ {
+ naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input,
+ str_idx);
+ if (naccepted > 1)
+ {
+ re_dfastate_t *dest_state;
+ Idx next_node = dfa->nexts[cur_node];
+ Idx next_idx = str_idx + naccepted;
+ dest_state = mctx->state_log[next_idx];
+ re_node_set_empty (&union_set);
+ if (dest_state)
+ {
+ err = re_node_set_merge (&union_set, &dest_state->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&union_set);
+ return err;
+ }
+ }
+ ok = re_node_set_insert (&union_set, next_node);
+ if (BE (! ok, 0))
+ {
+ re_node_set_free (&union_set);
+ return REG_ESPACE;
+ }
+ mctx->state_log[next_idx] = re_acquire_state (&err, dfa,
+ &union_set);
+ if (BE (mctx->state_log[next_idx] == NULL
+ && err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&union_set);
+ return err;
+ }
+ }
+ }
+#endif /* RE_ENABLE_I18N */
+ if (naccepted
+ || check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
+ {
+ ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
+ if (BE (! ok, 0))
+ {
+ re_node_set_free (&union_set);
+ return REG_ESPACE;
+ }
+ }
+ }
+ re_node_set_free (&union_set);
+ return REG_NOERROR;
+}
+
+/* For all the nodes in CUR_NODES, add the epsilon closures of them to
+ CUR_NODES, however exclude the nodes which are:
+ - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN.
+ - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN.
+*/
+
+static reg_errcode_t
+internal_function
+check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
+ Idx ex_subexp, int type)
+{
+ reg_errcode_t err;
+ Idx idx, outside_node;
+ re_node_set new_nodes;
+#ifdef DEBUG
+ assert (cur_nodes->nelem);
+#endif
+ err = re_node_set_alloc (&new_nodes, cur_nodes->nelem);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ /* Create a new node set NEW_NODES with the nodes which are epsilon
+ closures of the node in CUR_NODES. */
+
+ for (idx = 0; idx < cur_nodes->nelem; ++idx)
+ {
+ Idx cur_node = cur_nodes->elems[idx];
+ const re_node_set *eclosure = dfa->eclosures + cur_node;
+ outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
+ if (outside_node == REG_MISSING)
+ {
+ /* There are no problematic nodes, just merge them. */
+ err = re_node_set_merge (&new_nodes, eclosure);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&new_nodes);
+ return err;
+ }
+ }
+ else
+ {
+ /* There are problematic nodes, re-calculate incrementally. */
+ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node,
+ ex_subexp, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&new_nodes);
+ return err;
+ }
+ }
+ }
+ re_node_set_free (cur_nodes);
+ *cur_nodes = new_nodes;
+ return REG_NOERROR;
+}
+
+/* Helper function for check_arrival_expand_ecl.
+ Check incrementally the epsilon closure of TARGET, and if it isn't
+ problematic append it to DST_NODES. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
+ Idx target, Idx ex_subexp, int type)
+{
+ Idx cur_node;
+ for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);)
+ {
+ bool ok;
+
+ if (dfa->nodes[cur_node].type == type
+ && dfa->nodes[cur_node].opr.idx == ex_subexp)
+ {
+ if (type == OP_CLOSE_SUBEXP)
+ {
+ ok = re_node_set_insert (dst_nodes, cur_node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ break;
+ }
+ ok = re_node_set_insert (dst_nodes, cur_node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ if (dfa->edests[cur_node].nelem == 0)
+ break;
+ if (dfa->edests[cur_node].nelem == 2)
+ {
+ reg_errcode_t err;
+ err = check_arrival_expand_ecl_sub (dfa, dst_nodes,
+ dfa->edests[cur_node].elems[1],
+ ex_subexp, type);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ cur_node = dfa->edests[cur_node].elems[0];
+ }
+ return REG_NOERROR;
+}
+
+
+/* For all the back references in the current state, calculate the
+ destination of the back references by the appropriate entry
+ in MCTX->BKREF_ENTS. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
+ Idx cur_str, Idx subexp_num, int type)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
+ struct re_backref_cache_entry *ent;
+
+ if (cache_idx_start == REG_MISSING)
+ return REG_NOERROR;
+
+ restart:
+ ent = mctx->bkref_ents + cache_idx_start;
+ do
+ {
+ Idx to_idx, next_node;
+
+ /* Is this entry ENT is appropriate? */
+ if (!re_node_set_contains (cur_nodes, ent->node))
+ continue; /* No. */
+
+ to_idx = cur_str + ent->subexp_to - ent->subexp_from;
+ /* Calculate the destination of the back reference, and append it
+ to MCTX->STATE_LOG. */
+ if (to_idx == cur_str)
+ {
+ /* The backreference did epsilon transit, we must re-check all the
+ node in the current state. */
+ re_node_set new_dests;
+ reg_errcode_t err2, err3;
+ next_node = dfa->edests[ent->node].elems[0];
+ if (re_node_set_contains (cur_nodes, next_node))
+ continue;
+ err = re_node_set_init_1 (&new_dests, next_node);
+ err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type);
+ err3 = re_node_set_merge (cur_nodes, &new_dests);
+ re_node_set_free (&new_dests);
+ if (BE (err != REG_NOERROR || err2 != REG_NOERROR
+ || err3 != REG_NOERROR, 0))
+ {
+ err = (err != REG_NOERROR ? err
+ : (err2 != REG_NOERROR ? err2 : err3));
+ return err;
+ }
+ /* TODO: It is still inefficient... */
+ goto restart;
+ }
+ else
+ {
+ re_node_set union_set;
+ next_node = dfa->nexts[ent->node];
+ if (mctx->state_log[to_idx])
+ {
+ bool ok;
+ if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
+ next_node))
+ continue;
+ err = re_node_set_init_copy (&union_set,
+ &mctx->state_log[to_idx]->nodes);
+ ok = re_node_set_insert (&union_set, next_node);
+ if (BE (err != REG_NOERROR || ! ok, 0))
+ {
+ re_node_set_free (&union_set);
+ err = err != REG_NOERROR ? err : REG_ESPACE;
+ return err;
+ }
+ }
+ else
+ {
+ err = re_node_set_init_1 (&union_set, next_node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set);
+ re_node_set_free (&union_set);
+ if (BE (mctx->state_log[to_idx] == NULL
+ && err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ while (ent++->more);
+ return REG_NOERROR;
+}
+
+/* Build transition table for the state.
+ Return true if successful. */
+
+static bool
+internal_function
+build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
+{
+ reg_errcode_t err;
+ Idx i, j;
+ int ch;
+ bool need_word_trtable = false;
+ bitset_word_t elem, mask;
+ bool dests_node_malloced = false;
+ bool dest_states_malloced = false;
+ Idx ndests; /* Number of the destination states from `state'. */
+ re_dfastate_t **trtable;
+ re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl;
+ re_node_set follows, *dests_node;
+ bitset_t *dests_ch;
+ bitset_t acceptable;
+
+ struct dests_alloc
+ {
+ re_node_set dests_node[SBC_MAX];
+ bitset_t dests_ch[SBC_MAX];
+ } *dests_alloc;
+
+ /* We build DFA states which corresponds to the destination nodes
+ from `state'. `dests_node[i]' represents the nodes which i-th
+ destination state contains, and `dests_ch[i]' represents the
+ characters which i-th destination state accepts. */
+ if (__libc_use_alloca (sizeof (struct dests_alloc)))
+ dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc));
+ else
+ {
+ dests_alloc = re_malloc (struct dests_alloc, 1);
+ if (BE (dests_alloc == NULL, 0))
+ return false;
+ dests_node_malloced = true;
+ }
+ dests_node = dests_alloc->dests_node;
+ dests_ch = dests_alloc->dests_ch;
+
+ /* Initialize transiton table. */
+ state->word_trtable = state->trtable = NULL;
+
+ /* At first, group all nodes belonging to `state' into several
+ destinations. */
+ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
+ if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
+ {
+ if (dests_node_malloced)
+ free (dests_alloc);
+ if (ndests == 0)
+ {
+ state->trtable = (re_dfastate_t **)
+ calloc (sizeof (re_dfastate_t *), SBC_MAX);
+ return true;
+ }
+ return false;
+ }
+
+ err = re_node_set_alloc (&follows, ndests + 1);
+ if (BE (err != REG_NOERROR, 0))
+ goto out_free;
+
+ /* Avoid arithmetic overflow in size calculation. */
+ if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
+ / (3 * sizeof (re_dfastate_t *)))
+ < ndests),
+ 0))
+ goto out_free;
+
+ if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX
+ + ndests * 3 * sizeof (re_dfastate_t *)))
+ dest_states = (re_dfastate_t **)
+ alloca (ndests * 3 * sizeof (re_dfastate_t *));
+ else
+ {
+ dest_states = (re_dfastate_t **)
+ malloc (ndests * 3 * sizeof (re_dfastate_t *));
+ if (BE (dest_states == NULL, 0))
+ {
+out_free:
+ if (dest_states_malloced)
+ free (dest_states);
+ re_node_set_free (&follows);
+ for (i = 0; i < ndests; ++i)
+ re_node_set_free (dests_node + i);
+ if (dests_node_malloced)
+ free (dests_alloc);
+ return false;
+ }
+ dest_states_malloced = true;
+ }
+ dest_states_word = dest_states + ndests;
+ dest_states_nl = dest_states_word + ndests;
+ bitset_empty (acceptable);
+
+ /* Then build the states for all destinations. */
+ for (i = 0; i < ndests; ++i)
+ {
+ Idx next_node;
+ re_node_set_empty (&follows);
+ /* Merge the follows of this destination states. */
+ for (j = 0; j < dests_node[i].nelem; ++j)
+ {
+ next_node = dfa->nexts[dests_node[i].elems[j]];
+ if (next_node != REG_MISSING)
+ {
+ err = re_node_set_merge (&follows, dfa->eclosures + next_node);
+ if (BE (err != REG_NOERROR, 0))
+ goto out_free;
+ }
+ }
+ dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0);
+ if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+ /* If the new state has context constraint,
+ build appropriate states for these contexts. */
+ if (dest_states[i]->has_constraint)
+ {
+ dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows,
+ CONTEXT_WORD);
+ if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+
+ if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
+ need_word_trtable = true;
+
+ dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
+ CONTEXT_NEWLINE);
+ if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+ }
+ else
+ {
+ dest_states_word[i] = dest_states[i];
+ dest_states_nl[i] = dest_states[i];
+ }
+ bitset_merge (acceptable, dests_ch[i]);
+ }
+
+ if (!BE (need_word_trtable, 0))
+ {
+ /* We don't care about whether the following character is a word
+ character, or we are in a single-byte character set so we can
+ discern by looking at the character code: allocate a
+ 256-entry transition table. */
+ trtable = state->trtable =
+ (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX);
+ if (BE (trtable == NULL, 0))
+ goto out_free;
+
+ /* For all characters ch...: */
+ for (i = 0; i < BITSET_WORDS; ++i)
+ for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
+ elem;
+ mask <<= 1, elem >>= 1, ++ch)
+ if (BE (elem & 1, 0))
+ {
+ /* There must be exactly one destination which accepts
+ character ch. See group_nodes_into_DFAstates. */
+ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
+ ;
+
+ /* j-th destination accepts the word character ch. */
+ if (dfa->word_char[i] & mask)
+ trtable[ch] = dest_states_word[j];
+ else
+ trtable[ch] = dest_states[j];
+ }
+ }
+ else
+ {
+ /* We care about whether the following character is a word
+ character, and we are in a multi-byte character set: discern
+ by looking at the character code: build two 256-entry
+ transition tables, one starting at trtable[0] and one
+ starting at trtable[SBC_MAX]. */
+ trtable = state->word_trtable =
+ (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX);
+ if (BE (trtable == NULL, 0))
+ goto out_free;
+
+ /* For all characters ch...: */
+ for (i = 0; i < BITSET_WORDS; ++i)
+ for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
+ elem;
+ mask <<= 1, elem >>= 1, ++ch)
+ if (BE (elem & 1, 0))
+ {
+ /* There must be exactly one destination which accepts
+ character ch. See group_nodes_into_DFAstates. */
+ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
+ ;
+
+ /* j-th destination accepts the word character ch. */
+ trtable[ch] = dest_states[j];
+ trtable[ch + SBC_MAX] = dest_states_word[j];
+ }
+ }
+
+ /* new line */
+ if (bitset_contain (acceptable, NEWLINE_CHAR))
+ {
+ /* The current state accepts newline character. */
+ for (j = 0; j < ndests; ++j)
+ if (bitset_contain (dests_ch[j], NEWLINE_CHAR))
+ {
+ /* k-th destination accepts newline character. */
+ trtable[NEWLINE_CHAR] = dest_states_nl[j];
+ if (need_word_trtable)
+ trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j];
+ /* There must be only one destination which accepts
+ newline. See group_nodes_into_DFAstates. */
+ break;
+ }
+ }
+
+ if (dest_states_malloced)
+ free (dest_states);
+
+ re_node_set_free (&follows);
+ for (i = 0; i < ndests; ++i)
+ re_node_set_free (dests_node + i);
+
+ if (dests_node_malloced)
+ free (dests_alloc);
+
+ return true;
+}
+
+/* Group all nodes belonging to STATE into several destinations.
+ Then for all destinations, set the nodes belonging to the destination
+ to DESTS_NODE[i] and set the characters accepted by the destination
+ to DEST_CH[i]. This function return the number of destinations. */
+
+static Idx
+internal_function
+group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
+ re_node_set *dests_node, bitset_t *dests_ch)
+{
+ reg_errcode_t err;
+ bool ok;
+ Idx i, j, k;
+ Idx ndests; /* Number of the destinations from `state'. */
+ bitset_t accepts; /* Characters a node can accept. */
+ const re_node_set *cur_nodes = &state->nodes;
+ bitset_empty (accepts);
+ ndests = 0;
+
+ /* For all the nodes belonging to `state', */
+ for (i = 0; i < cur_nodes->nelem; ++i)
+ {
+ re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
+ re_token_type_t type = node->type;
+ unsigned int constraint = node->constraint;
+
+ /* Enumerate all single byte character this node can accept. */
+ if (type == CHARACTER)
+ bitset_set (accepts, node->opr.c);
+ else if (type == SIMPLE_BRACKET)
+ {
+ bitset_merge (accepts, node->opr.sbcset);
+ }
+ else if (type == OP_PERIOD)
+ {
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ bitset_merge (accepts, dfa->sb_char);
+ else
+#endif
+ bitset_set_all (accepts);
+ if (!(dfa->syntax & RE_DOT_NEWLINE))
+ bitset_clear (accepts, '\n');
+ if (dfa->syntax & RE_DOT_NOT_NULL)
+ bitset_clear (accepts, '\0');
+ }
+#ifdef RE_ENABLE_I18N
+ else if (type == OP_UTF8_PERIOD)
+ {
+ if (ASCII_CHARS % BITSET_WORD_BITS == 0)
+ memset (accepts, -1, ASCII_CHARS / CHAR_BIT);
+ else
+ bitset_merge (accepts, utf8_sb_map);
+ if (!(dfa->syntax & RE_DOT_NEWLINE))
+ bitset_clear (accepts, '\n');
+ if (dfa->syntax & RE_DOT_NOT_NULL)
+ bitset_clear (accepts, '\0');
+ }
+#endif
+ else
+ continue;
+
+ /* Check the `accepts' and sift the characters which are not
+ match it the context. */
+ if (constraint)
+ {
+ if (constraint & NEXT_NEWLINE_CONSTRAINT)
+ {
+ bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR);
+ bitset_empty (accepts);
+ if (accepts_newline)
+ bitset_set (accepts, NEWLINE_CHAR);
+ else
+ continue;
+ }
+ if (constraint & NEXT_ENDBUF_CONSTRAINT)
+ {
+ bitset_empty (accepts);
+ continue;
+ }
+
+ if (constraint & NEXT_WORD_CONSTRAINT)
+ {
+ bitset_word_t any_set = 0;
+ if (type == CHARACTER && !node->word_char)
+ {
+ bitset_empty (accepts);
+ continue;
+ }
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
+ else
+#endif
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= dfa->word_char[j]);
+ if (!any_set)
+ continue;
+ }
+ if (constraint & NEXT_NOTWORD_CONSTRAINT)
+ {
+ bitset_word_t any_set = 0;
+ if (type == CHARACTER && node->word_char)
+ {
+ bitset_empty (accepts);
+ continue;
+ }
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
+ else
+#endif
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= ~dfa->word_char[j]);
+ if (!any_set)
+ continue;
+ }
+ }
+
+ /* Then divide `accepts' into DFA states, or create a new
+ state. Above, we make sure that accepts is not empty. */
+ for (j = 0; j < ndests; ++j)
+ {
+ bitset_t intersec; /* Intersection sets, see below. */
+ bitset_t remains;
+ /* Flags, see below. */
+ bitset_word_t has_intersec, not_subset, not_consumed;
+
+ /* Optimization, skip if this state doesn't accept the character. */
+ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c))
+ continue;
+
+ /* Enumerate the intersection set of this state and `accepts'. */
+ has_intersec = 0;
+ for (k = 0; k < BITSET_WORDS; ++k)
+ has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k];
+ /* And skip if the intersection set is empty. */
+ if (!has_intersec)
+ continue;
+
+ /* Then check if this state is a subset of `accepts'. */
+ not_subset = not_consumed = 0;
+ for (k = 0; k < BITSET_WORDS; ++k)
+ {
+ not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k];
+ not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k];
+ }
+
+ /* If this state isn't a subset of `accepts', create a
+ new group state, which has the `remains'. */
+ if (not_subset)
+ {
+ bitset_copy (dests_ch[ndests], remains);
+ bitset_copy (dests_ch[j], intersec);
+ err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]);
+ if (BE (err != REG_NOERROR, 0))
+ goto error_return;
+ ++ndests;
+ }
+
+ /* Put the position in the current group. */
+ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
+ if (BE (! ok, 0))
+ goto error_return;
+
+ /* If all characters are consumed, go to next node. */
+ if (!not_consumed)
+ break;
+ }
+ /* Some characters remain, create a new group. */
+ if (j == ndests)
+ {
+ bitset_copy (dests_ch[ndests], accepts);
+ err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]);
+ if (BE (err != REG_NOERROR, 0))
+ goto error_return;
+ ++ndests;
+ bitset_empty (accepts);
+ }
+ }
+ return ndests;
+ error_return:
+ for (j = 0; j < ndests; ++j)
+ re_node_set_free (dests_node + j);
+ return REG_MISSING;
+}
+
+#ifdef RE_ENABLE_I18N
+/* Check how many bytes the node `dfa->nodes[node_idx]' accepts.
+ Return the number of the bytes the node accepts.
+ STR_IDX is the current index of the input string.
+
+ This function handles the nodes which can accept one character, or
+ one collating element like '.', '[a-z]', opposite to the other nodes
+ can only accept one byte. */
+
+static int
+internal_function
+check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+ const re_string_t *input, Idx str_idx)
+{
+ const re_token_t *node = dfa->nodes + node_idx;
+ int char_len, elem_len;
+ Idx i;
+
+ if (BE (node->type == OP_UTF8_PERIOD, 0))
+ {
+ unsigned char c = re_string_byte_at (input, str_idx), d;
+ if (BE (c < 0xc2, 1))
+ return 0;
+
+ if (str_idx + 2 > input->len)
+ return 0;
+
+ d = re_string_byte_at (input, str_idx + 1);
+ if (c < 0xe0)
+ return (d < 0x80 || d > 0xbf) ? 0 : 2;
+ else if (c < 0xf0)
+ {
+ char_len = 3;
+ if (c == 0xe0 && d < 0xa0)
+ return 0;
+ }
+ else if (c < 0xf8)
+ {
+ char_len = 4;
+ if (c == 0xf0 && d < 0x90)
+ return 0;
+ }
+ else if (c < 0xfc)
+ {
+ char_len = 5;
+ if (c == 0xf8 && d < 0x88)
+ return 0;
+ }
+ else if (c < 0xfe)
+ {
+ char_len = 6;
+ if (c == 0xfc && d < 0x84)
+ return 0;
+ }
+ else
+ return 0;
+
+ if (str_idx + char_len > input->len)
+ return 0;
+
+ for (i = 1; i < char_len; ++i)
+ {
+ d = re_string_byte_at (input, str_idx + i);
+ if (d < 0x80 || d > 0xbf)
+ return 0;
+ }
+ return char_len;
+ }
+
+ char_len = re_string_char_size_at (input, str_idx);
+ if (node->type == OP_PERIOD)
+ {
+ if (char_len <= 1)
+ return 0;
+ /* FIXME: I don't think this if is needed, as both '\n'
+ and '\0' are char_len == 1. */
+ /* '.' accepts any one character except the following two cases. */
+ if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
+ re_string_byte_at (input, str_idx) == '\n') ||
+ ((dfa->syntax & RE_DOT_NOT_NULL) &&
+ re_string_byte_at (input, str_idx) == '\0'))
+ return 0;
+ return char_len;
+ }
+
+ elem_len = re_string_elem_size_at (input, str_idx);
+ if ((elem_len <= 1 && char_len <= 1) || char_len == 0)
+ return 0;
+
+ if (node->type == COMPLEX_BRACKET)
+ {
+ const re_charset_t *cset = node->opr.mbcset;
+# ifdef _LIBC
+ const unsigned char *pin
+ = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
+ Idx j;
+ uint32_t nrules;
+# endif /* _LIBC */
+ int match_len = 0;
+ wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
+ ? re_string_wchar_at (input, str_idx) : 0);
+
+ /* match with multibyte character? */
+ for (i = 0; i < cset->nmbchars; ++i)
+ if (wc == cset->mbchars[i])
+ {
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
+ /* match with character_class? */
+ for (i = 0; i < cset->nchar_classes; ++i)
+ {
+ wctype_t wt = cset->char_classes[i];
+ if (__iswctype (wc, wt))
+ {
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
+ }
+
+# ifdef _LIBC
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+ unsigned int in_collseq = 0;
+ const int32_t *table, *indirect;
+ const unsigned char *weights, *extra;
+ const char *collseqwc;
+ int32_t idx;
+ /* This #include defines a local function! */
+# include <locale/weight.h>
+
+ /* match with collating_symbol? */
+ if (cset->ncoll_syms)
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+ for (i = 0; i < cset->ncoll_syms; ++i)
+ {
+ const unsigned char *coll_sym = extra + cset->coll_syms[i];
+ /* Compare the length of input collating element and
+ the length of current collating element. */
+ if (*coll_sym != elem_len)
+ continue;
+ /* Compare each bytes. */
+ for (j = 0; j < *coll_sym; j++)
+ if (pin[j] != coll_sym[1 + j])
+ break;
+ if (j == *coll_sym)
+ {
+ /* Match if every bytes is equal. */
+ match_len = j;
+ goto check_node_accept_bytes_match;
+ }
+ }
+
+ if (cset->nranges)
+ {
+ if (elem_len <= char_len)
+ {
+ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+ in_collseq = __collseq_table_lookup (collseqwc, wc);
+ }
+ else
+ in_collseq = find_collation_sequence_value (pin, elem_len);
+ }
+ /* match with range expression? */
+ for (i = 0; i < cset->nranges; ++i)
+ if (cset->range_starts[i] <= in_collseq
+ && in_collseq <= cset->range_ends[i])
+ {
+ match_len = elem_len;
+ goto check_node_accept_bytes_match;
+ }
+
+ /* match with equivalence_class? */
+ if (cset->nequiv_classes)
+ {
+ const unsigned char *cp = pin;
+ table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ weights = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+ int32_t idx = findidx (&cp);
+ if (idx > 0)
+ for (i = 0; i < cset->nequiv_classes; ++i)
+ {
+ int32_t equiv_class_idx = cset->equiv_classes[i];
+ size_t weight_len = weights[idx & 0xffffff];
+ if (weight_len == weights[equiv_class_idx & 0xffffff]
+ && (idx >> 24) == (equiv_class_idx >> 24))
+ {
+ Idx cnt = 0;
+
+ idx &= 0xffffff;
+ equiv_class_idx &= 0xffffff;
+
+ while (cnt <= weight_len
+ && (weights[equiv_class_idx + 1 + cnt]
+ == weights[idx + 1 + cnt]))
+ ++cnt;
+ if (cnt > weight_len)
+ {
+ match_len = elem_len;
+ goto check_node_accept_bytes_match;
+ }
+ }
+ }
+ }
+ }
+ else
+# endif /* _LIBC */
+ {
+ /* match with range expression? */
+#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__)
+ wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
+#else
+ wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
+ cmp_buf[2] = wc;
+#endif
+ for (i = 0; i < cset->nranges; ++i)
+ {
+ cmp_buf[0] = cset->range_starts[i];
+ cmp_buf[4] = cset->range_ends[i];
+ if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
+ && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+ {
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
+ }
+ }
+ check_node_accept_bytes_match:
+ if (!cset->non_match)
+ return match_len;
+ else
+ {
+ if (match_len > 0)
+ return 0;
+ else
+ return (elem_len > char_len) ? elem_len : char_len;
+ }
+ }
+ return 0;
+}
+
+# ifdef _LIBC
+static unsigned int
+internal_function
+find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
+{
+ uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules == 0)
+ {
+ if (mbs_len == 1)
+ {
+ /* No valid character. Match it as a single byte character. */
+ const unsigned char *collseq = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+ return collseq[mbs[0]];
+ }
+ return UINT_MAX;
+ }
+ else
+ {
+ int32_t idx;
+ const unsigned char *extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+ int32_t extrasize = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra;
+
+ for (idx = 0; idx < extrasize;)
+ {
+ int mbs_cnt;
+ bool found = false;
+ int32_t elem_mbs_len;
+ /* Skip the name of collating element name. */
+ idx = idx + extra[idx] + 1;
+ elem_mbs_len = extra[idx++];
+ if (mbs_len == elem_mbs_len)
+ {
+ for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt)
+ if (extra[idx + mbs_cnt] != mbs[mbs_cnt])
+ break;
+ if (mbs_cnt == elem_mbs_len)
+ /* Found the entry. */
+ found = true;
+ }
+ /* Skip the byte sequence of the collating element. */
+ idx += elem_mbs_len;
+ /* Adjust for the alignment. */
+ idx = (idx + 3) & ~3;
+ /* Skip the collation sequence value. */
+ idx += sizeof (uint32_t);
+ /* Skip the wide char sequence of the collating element. */
+ idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
+ /* If we found the entry, return the sequence value. */
+ if (found)
+ return *(uint32_t *) (extra + idx);
+ /* Skip the collation sequence value. */
+ idx += sizeof (uint32_t);
+ }
+ return UINT_MAX;
+ }
+}
+# endif /* _LIBC */
+#endif /* RE_ENABLE_I18N */
+
+/* Check whether the node accepts the byte which is IDX-th
+ byte of the INPUT. */
+
+static bool
+internal_function
+check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
+ Idx idx)
+{
+ unsigned char ch;
+ ch = re_string_byte_at (&mctx->input, idx);
+ switch (node->type)
+ {
+ case CHARACTER:
+ if (node->opr.c != ch)
+ return false;
+ break;
+
+ case SIMPLE_BRACKET:
+ if (!bitset_contain (node->opr.sbcset, ch))
+ return false;
+ break;
+
+#ifdef RE_ENABLE_I18N
+ case OP_UTF8_PERIOD:
+ if (ch >= ASCII_CHARS)
+ return false;
+ /* FALLTHROUGH */
+#endif
+ case OP_PERIOD:
+ if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE))
+ || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL)))
+ return false;
+ break;
+
+ default:
+ return false;
+ }
+
+ if (node->constraint)
+ {
+ /* The node has constraints. Check whether the current context
+ satisfies the constraints. */
+ unsigned int context = re_string_context_at (&mctx->input, idx,
+ mctx->eflags);
+ if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))
+ return false;
+ }
+
+ return true;
+}
+
+/* Extend the buffers, if the buffers have run out. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+extend_buffers (re_match_context_t *mctx)
+{
+ reg_errcode_t ret;
+ re_string_t *pstr = &mctx->input;
+
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+ return REG_ESPACE;
+
+ /* Double the lengthes of the buffers. */
+ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+
+ if (mctx->state_log != NULL)
+ {
+ /* And double the length of state_log. */
+ /* XXX We have no indication of the size of this buffer. If this
+ allocation fail we have no indication that the state_log array
+ does not have the right size. */
+ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *,
+ pstr->bufs_len + 1);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ mctx->state_log = new_array;
+ }
+
+ /* Then reconstruct the buffers. */
+ if (pstr->icase)
+ {
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ build_upper_buffer (pstr);
+ }
+ else
+ {
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ build_wcs_buffer (pstr);
+ else
+#endif /* RE_ENABLE_I18N */
+ {
+ if (pstr->trans != NULL)
+ re_string_translate_buffer (pstr);
+ }
+ }
+ return REG_NOERROR;
+}
+
+
+/* Functions for matching context. */
+
+/* Initialize MCTX. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
+{
+ mctx->eflags = eflags;
+ mctx->match_last = REG_MISSING;
+ if (n > 0)
+ {
+ /* Avoid overflow. */
+ size_t max_object_size =
+ MAX (sizeof (struct re_backref_cache_entry),
+ sizeof (re_sub_match_top_t *));
+ if (BE (SIZE_MAX / max_object_size < n, 0))
+ return REG_ESPACE;
+
+ mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
+ mctx->sub_tops = re_malloc (re_sub_match_top_t *, n);
+ if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0))
+ return REG_ESPACE;
+ }
+ /* Already zero-ed by the caller.
+ else
+ mctx->bkref_ents = NULL;
+ mctx->nbkref_ents = 0;
+ mctx->nsub_tops = 0; */
+ mctx->abkref_ents = n;
+ mctx->max_mb_elem_len = 1;
+ mctx->asub_tops = n;
+ return REG_NOERROR;
+}
+
+/* Clean the entries which depend on the current input in MCTX.
+ This function must be invoked when the matcher changes the start index
+ of the input, or changes the input string. */
+
+static void
+internal_function
+match_ctx_clean (re_match_context_t *mctx)
+{
+ Idx st_idx;
+ for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx)
+ {
+ Idx sl_idx;
+ re_sub_match_top_t *top = mctx->sub_tops[st_idx];
+ for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx)
+ {
+ re_sub_match_last_t *last = top->lasts[sl_idx];
+ re_free (last->path.array);
+ re_free (last);
+ }
+ re_free (top->lasts);
+ if (top->path)
+ {
+ re_free (top->path->array);
+ re_free (top->path);
+ }
+ free (top);
+ }
+
+ mctx->nsub_tops = 0;
+ mctx->nbkref_ents = 0;
+}
+
+/* Free all the memory associated with MCTX. */
+
+static void
+internal_function
+match_ctx_free (re_match_context_t *mctx)
+{
+ /* First, free all the memory associated with MCTX->SUB_TOPS. */
+ match_ctx_clean (mctx);
+ re_free (mctx->sub_tops);
+ re_free (mctx->bkref_ents);
+}
+
+/* Add a new backreference entry to MCTX.
+ Note that we assume that caller never call this function with duplicate
+ entry, and call with STR_IDX which isn't smaller than any existing entry.
+*/
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
+ Idx to)
+{
+ if (mctx->nbkref_ents >= mctx->abkref_ents)
+ {
+ struct re_backref_cache_entry* new_entry;
+ new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry,
+ mctx->abkref_ents * 2);
+ if (BE (new_entry == NULL, 0))
+ {
+ re_free (mctx->bkref_ents);
+ return REG_ESPACE;
+ }
+ mctx->bkref_ents = new_entry;
+ memset (mctx->bkref_ents + mctx->nbkref_ents, '\0',
+ sizeof (struct re_backref_cache_entry) * mctx->abkref_ents);
+ mctx->abkref_ents *= 2;
+ }
+ if (mctx->nbkref_ents > 0
+ && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx)
+ mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1;
+
+ mctx->bkref_ents[mctx->nbkref_ents].node = node;
+ mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx;
+ mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from;
+ mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to;
+
+ /* This is a cache that saves negative results of check_dst_limits_calc_pos.
+ If bit N is clear, means that this entry won't epsilon-transition to
+ an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If
+ it is set, check_dst_limits_calc_pos_1 will recurse and try to find one
+ such node.
+
+ A backreference does not epsilon-transition unless it is empty, so set
+ to all zeros if FROM != TO. */
+ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map
+ = (from == to ? -1 : 0);
+
+ mctx->bkref_ents[mctx->nbkref_ents++].more = 0;
+ if (mctx->max_mb_elem_len < to - from)
+ mctx->max_mb_elem_len = to - from;
+ return REG_NOERROR;
+}
+
+/* Return the first entry with the same str_idx, or REG_MISSING if none is
+ found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */
+
+static Idx
+internal_function
+search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
+{
+ Idx left, right, mid, last;
+ last = right = mctx->nbkref_ents;
+ for (left = 0; left < right;)
+ {
+ mid = (left + right) / 2;
+ if (mctx->bkref_ents[mid].str_idx < str_idx)
+ left = mid + 1;
+ else
+ right = mid;
+ }
+ if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
+ return left;
+ else
+ return REG_MISSING;
+}
+
+/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches
+ at STR_IDX. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
+{
+#ifdef DEBUG
+ assert (mctx->sub_tops != NULL);
+ assert (mctx->asub_tops > 0);
+#endif
+ if (BE (mctx->nsub_tops == mctx->asub_tops, 0))
+ {
+ Idx new_asub_tops = mctx->asub_tops * 2;
+ re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops,
+ re_sub_match_top_t *,
+ new_asub_tops);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ mctx->sub_tops = new_array;
+ mctx->asub_tops = new_asub_tops;
+ }
+ mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t));
+ if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0))
+ return REG_ESPACE;
+ mctx->sub_tops[mctx->nsub_tops]->node = node;
+ mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;
+ return REG_NOERROR;
+}
+
+/* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches
+ at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */
+
+static re_sub_match_last_t *
+internal_function
+match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
+{
+ re_sub_match_last_t *new_entry;
+ if (BE (subtop->nlasts == subtop->alasts, 0))
+ {
+ Idx new_alasts = 2 * subtop->alasts + 1;
+ re_sub_match_last_t **new_array = re_realloc (subtop->lasts,
+ re_sub_match_last_t *,
+ new_alasts);
+ if (BE (new_array == NULL, 0))
+ return NULL;
+ subtop->lasts = new_array;
+ subtop->alasts = new_alasts;
+ }
+ new_entry = calloc (1, sizeof (re_sub_match_last_t));
+ if (BE (new_entry != NULL, 1))
+ {
+ subtop->lasts[subtop->nlasts] = new_entry;
+ new_entry->node = node;
+ new_entry->str_idx = str_idx;
+ ++subtop->nlasts;
+ }
+ return new_entry;
+}
+
+static void
+internal_function
+sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
+ re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx)
+{
+ sctx->sifted_states = sifted_sts;
+ sctx->limited_states = limited_sts;
+ sctx->last_node = last_node;
+ sctx->last_str_idx = last_str_idx;
+ re_node_set_init_empty (&sctx->limits);
+}
diff --git a/grub-core/gnulib/size_max.h b/grub-core/gnulib/size_max.h
new file mode 100644
index 0000000..56d5a9b
--- /dev/null
+++ b/grub-core/gnulib/size_max.h
@@ -0,0 +1,31 @@
+/* size_max.h -- declare SIZE_MAX through system headers
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef GNULIB_SIZE_MAX_H
+#define GNULIB_SIZE_MAX_H
+
+/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */
+# include <limits.h>
+/* Get SIZE_MAX declaration on systems like glibc 2. */
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+/* On systems where these include files don't define it, SIZE_MAX is defined
+ in config.h. */
+
+#endif /* GNULIB_SIZE_MAX_H */
diff --git a/grub-core/gnulib/sleep.c b/grub-core/gnulib/sleep.c
new file mode 100644
index 0000000..213e5bd
--- /dev/null
+++ b/grub-core/gnulib/sleep.c
@@ -0,0 +1,75 @@
+/* Pausing execution of the current thread.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <limits.h>
+
+#include "verify.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+unsigned int
+sleep (unsigned int seconds)
+{
+ unsigned int remaining;
+
+ /* Sleep for 1 second many times, because
+ 1. Sleep is not interruptiple by Ctrl-C,
+ 2. we want to avoid arithmetic overflow while multiplying with 1000. */
+ for (remaining = seconds; remaining > 0; remaining--)
+ Sleep (1000);
+
+ return remaining;
+}
+
+#elif HAVE_SLEEP
+
+# undef sleep
+
+/* Guarantee unlimited sleep and a reasonable return value. Cygwin
+ 1.5.x rejects attempts to sleep more than 49.7 days (2**32
+ milliseconds), but uses uninitialized memory which results in a
+ garbage answer. */
+unsigned int
+rpl_sleep (unsigned int seconds)
+{
+ /* This requires int larger than 16 bits. */
+ verify (UINT_MAX / 49 / 24 / 60 / 60);
+ const unsigned int limit = 49 * 24 * 60 * 60;
+ while (limit < seconds)
+ {
+ unsigned int result;
+ seconds -= limit;
+ result = sleep (limit);
+ if (result)
+ return seconds + result;
+ }
+ return sleep (seconds);
+}
+
+#else /* !HAVE_SLEEP */
+
+ #error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib."
+
+#endif
diff --git a/grub-core/gnulib/stdbool.in.h b/grub-core/gnulib/stdbool.in.h
new file mode 100644
index 0000000..574c281
--- /dev/null
+++ b/grub-core/gnulib/stdbool.in.h
@@ -0,0 +1,122 @@
+/* Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
+
+/* ISO C 99 <stdbool.h> for platforms that lack it. */
+
+/* Usage suggestions:
+
+ Programs that use <stdbool.h> should be aware of some limitations
+ and standards compliance issues.
+
+ Standards compliance:
+
+ - <stdbool.h> must be #included before 'bool', 'false', 'true'
+ can be used.
+
+ - You cannot assume that sizeof (bool) == 1.
+
+ - Programs should not undefine the macros bool, true, and false,
+ as C99 lists that as an "obsolescent feature".
+
+ Limitations of this substitute, when used in a C89 environment:
+
+ - <stdbool.h> must be #included before the '_Bool' type can be used.
+
+ - You cannot assume that _Bool is a typedef; it might be a macro.
+
+ - Bit-fields of type 'bool' are not supported. Portable code
+ should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
+
+ - In C99, casts and automatic conversions to '_Bool' or 'bool' are
+ performed in such a way that every nonzero value gets converted
+ to 'true', and zero gets converted to 'false'. This doesn't work
+ with this substitute. With this substitute, only the values 0 and 1
+ give the expected result when converted to _Bool' or 'bool'.
+
+ - C99 allows the use of (_Bool)0.0 in constant expressions, but
+ this substitute cannot always provide this property.
+
+ Also, it is suggested that programs use 'bool' rather than '_Bool';
+ this isn't required, but 'bool' is more common. */
+
+
+/* 7.16. Boolean type and values */
+
+/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
+ definitions below, but temporarily we have to #undef them. */
+#if defined __BEOS__ && !defined __HAIKU__
+# include <OS.h> /* defines bool but not _Bool */
+# undef false
+# undef true
+#endif
+
+/* For the sake of symbolic names in gdb, we define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But if we do
+ this, values of type '_Bool' may promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
+#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+ /* A compiler known to have 'bool'. */
+ /* If the compiler already has both 'bool' and '_Bool', we can assume they
+ are the same types. */
+# if !@HAVE__BOOL@
+typedef bool _Bool;
+# endif
+#else
+# if !defined __GNUC__
+ /* If @HAVE__BOOL@:
+ Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
+ the built-in _Bool type is used. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ Similar bugs are likely with other compilers as well; this file
+ wouldn't be used if <stdbool.h> was working.
+ So we override the _Bool type.
+ If !@HAVE__BOOL@:
+ Need to define _Bool ourselves. As 'signed char' or as an enum type?
+ Use of a typedef, with SunPRO C, leads to a stupid
+ "warning: _Bool is a keyword in ISO C99".
+ Use of an enum type, with IRIX cc, leads to a stupid
+ "warning(1185): enumerated type mixed with another type".
+ Even the existence of an enum type, without a typedef,
+ "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
+ The only benefit of the enum, debuggability, is not important
+ with these compilers. So use 'signed char' and no enum. */
+# define _Bool signed char
+# else
+ /* With this compiler, trust the _Bool type if the compiler has it. */
+# if !@HAVE__BOOL@
+typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
+# endif
+#endif
+#define bool _Bool
+
+/* The other macros must be usable in preprocessor directives. */
+#define false 0
+#define true 1
+#define __bool_true_false_are_defined 1
+
+#endif /* _GL_STDBOOL_H */
diff --git a/grub-core/gnulib/stddef.in.h b/grub-core/gnulib/stddef.in.h
new file mode 100644
index 0000000..08778a2
--- /dev/null
+++ b/grub-core/gnulib/stddef.in.h
@@ -0,0 +1,86 @@
+/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
+
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake. */
+
+/*
+ * POSIX 2008 <stddef.h> for platforms that have issues.
+ * <http://www.opengroup.org/susv3xbd/stddef.h.html>
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_wchar_t || defined __need_size_t \
+ || defined __need_ptrdiff_t || defined __need_NULL \
+ || defined __need_wint_t
+/* Special invocation convention inside gcc header files. In
+ particular, gcc provides a version of <stddef.h> that blindly
+ redefines NULL even when __need_wint_t was defined, even though
+ wint_t is not normally provided by <stddef.h>. Hence, we must
+ remember if special invocation has ever been used to obtain wint_t,
+ in which case we need to clean up NULL yet again. */
+
+# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# ifdef __need_wint_t
+# undef _GL_STDDEF_H
+# define _GL_STDDEF_WINT_T
+# endif
+# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+# endif
+
+#else
+/* Normal invocation convention. */
+
+# ifndef _GL_STDDEF_H
+
+/* The include_next requires a split double-inclusion guard. */
+
+# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+
+# ifndef _GL_STDDEF_H
+# define _GL_STDDEF_H
+
+/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
+#if @REPLACE_NULL@
+# undef NULL
+# ifdef __cplusplus
+ /* ISO C++ says that the macro NULL must expand to an integer constant
+ expression, hence '((void *) 0)' is not allowed in C++. */
+# if __GNUG__ >= 3
+ /* GNU C++ has a __null macro that behaves like an integer ('int' or
+ 'long') but has the same size as a pointer. Use that, to avoid
+ warnings. */
+# define NULL __null
+# else
+# define NULL 0L
+# endif
+# else
+# define NULL ((void *) 0)
+# endif
+#endif
+
+/* Some platforms lack wchar_t. */
+#if !@HAVE_WCHAR_T@
+# define wchar_t int
+#endif
+
+# endif /* _GL_STDDEF_H */
+# endif /* _GL_STDDEF_H */
+#endif /* __need_XXX */
diff --git a/grub-core/gnulib/stdint.in.h b/grub-core/gnulib/stdint.in.h
new file mode 100644
index 0000000..5da5f17
--- /dev/null
+++ b/grub-core/gnulib/stdint.in.h
@@ -0,0 +1,568 @@
+/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
+ Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
+ This file is part of gnulib.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+ * ISO C 99 <stdint.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/stdint.h.html>
+ */
+
+#ifndef _GL_STDINT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* When including a system file that in turn includes <inttypes.h>,
+ use the system <inttypes.h>, not our substitute. This avoids
+ problems with (for example) VMS, whose <sys/bitypes.h> includes
+ <inttypes.h>. */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Get those types that are already defined in other system include
+ files, so that we can "#define int8_t signed char" below without
+ worrying about a later system include file containing a "typedef
+ signed char int8_t;" that will get messed up by our macro. Our
+ macros should all be consistent with the system versions, except
+ for the "fast" types and macros, which we recommend against using
+ in public interfaces due to compiler differences. */
+
+#if @HAVE_STDINT_H@
+# if defined __sgi && ! defined __c99
+ /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
+ with "This header file is to be used only for c99 mode compilations"
+ diagnostics. */
+# define __STDINT_H__
+# endif
+ /* Other systems may have an incomplete or buggy <stdint.h>.
+ Include it before <inttypes.h>, since any "#include <stdint.h>"
+ in <inttypes.h> would reinclude us, skipping our contents because
+ _GL_STDINT_H is defined.
+ The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+#endif
+
+#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define _GL_STDINT_H
+
+/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
+ IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
+ AIX 5.2 <sys/types.h> isn't needed and causes troubles.
+ MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+ relies on the system <stdint.h> definitions, so include
+ <sys/types.h> after @NEXT_STDINT_H@. */
+#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+# include <sys/types.h>
+#endif
+
+/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
+#include <limits.h>
+
+#if @HAVE_INTTYPES_H@
+ /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
+ int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
+ <inttypes.h> also defines intptr_t and uintptr_t. */
+# include <inttypes.h>
+#elif @HAVE_SYS_INTTYPES_H@
+ /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
+ the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
+# include <sys/inttypes.h>
+#endif
+
+#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+ /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
+ int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
+ included by <sys/types.h>. */
+# include <sys/bitypes.h>
+#endif
+
+#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Minimum and maximum values for a integer type under the usual assumption.
+ Return an unspecified value if BITS == 0, adding a check to pacify
+ picky compilers. */
+
+#define _STDINT_MIN(signed, bits, zero) \
+ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+
+#define _STDINT_MAX(signed, bits, zero) \
+ ((signed) \
+ ? ~ _STDINT_MIN (signed, bits, zero) \
+ : /* The expression for the unsigned case. The subtraction of (signed) \
+ is a nop in the unsigned case and avoids "signed integer overflow" \
+ warnings in the signed case. */ \
+ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+
+/* 7.18.1.1. Exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. */
+
+#undef int8_t
+#undef uint8_t
+typedef signed char gl_int8_t;
+typedef unsigned char gl_uint8_t;
+#define int8_t gl_int8_t
+#define uint8_t gl_uint8_t
+
+#undef int16_t
+#undef uint16_t
+typedef short int gl_int16_t;
+typedef unsigned short int gl_uint16_t;
+#define int16_t gl_int16_t
+#define uint16_t gl_uint16_t
+
+#undef int32_t
+#undef uint32_t
+typedef int gl_int32_t;
+typedef unsigned int gl_uint32_t;
+#define int32_t gl_int32_t
+#define uint32_t gl_uint32_t
+
+/* Do not undefine int64_t if gnulib is not being used with 64-bit
+ types, since otherwise it breaks platforms like Tandem/NSK. */
+#if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
+typedef long int gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#elif defined _MSC_VER
+# undef int64_t
+typedef __int64 gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#elif @HAVE_LONG_LONG_INT@
+# undef int64_t
+typedef long long int gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#endif
+
+#if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#elif defined _MSC_VER
+# undef uint64_t
+typedef unsigned __int64 gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
+typedef unsigned long long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#endif
+
+/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
+#define _UINT8_T
+#define _UINT32_T
+#define _UINT64_T
+
+
+/* 7.18.1.2. Minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+ are the same as the corresponding N_t types. */
+
+#undef int_least8_t
+#undef uint_least8_t
+#undef int_least16_t
+#undef uint_least16_t
+#undef int_least32_t
+#undef uint_least32_t
+#undef int_least64_t
+#undef uint_least64_t
+#define int_least8_t int8_t
+#define uint_least8_t uint8_t
+#define int_least16_t int16_t
+#define uint_least16_t uint16_t
+#define int_least32_t int32_t
+#define uint_least32_t uint32_t
+#ifdef GL_INT64_T
+# define int_least64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_least64_t uint64_t
+#endif
+
+/* 7.18.1.3. Fastest minimum-width integer types */
+
+/* Note: Other <stdint.h> substitutes may define these types differently.
+ It is not recommended to use these types in public header files. */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+ are taken from the same list of types. Assume that 'long int'
+ is fast enough for all narrower integers. */
+
+#undef int_fast8_t
+#undef uint_fast8_t
+#undef int_fast16_t
+#undef uint_fast16_t
+#undef int_fast32_t
+#undef uint_fast32_t
+#undef int_fast64_t
+#undef uint_fast64_t
+typedef long int gl_int_fast8_t;
+typedef unsigned long int gl_uint_fast8_t;
+typedef long int gl_int_fast16_t;
+typedef unsigned long int gl_uint_fast16_t;
+typedef long int gl_int_fast32_t;
+typedef unsigned long int gl_uint_fast32_t;
+#define int_fast8_t gl_int_fast8_t
+#define uint_fast8_t gl_uint_fast8_t
+#define int_fast16_t gl_int_fast16_t
+#define uint_fast16_t gl_uint_fast16_t
+#define int_fast32_t gl_int_fast32_t
+#define uint_fast32_t gl_uint_fast32_t
+#ifdef GL_INT64_T
+# define int_fast64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_fast64_t uint64_t
+#endif
+
+/* 7.18.1.4. Integer types capable of holding object pointers */
+
+#undef intptr_t
+#undef uintptr_t
+typedef long int gl_intptr_t;
+typedef unsigned long int gl_uintptr_t;
+#define intptr_t gl_intptr_t
+#define uintptr_t gl_uintptr_t
+
+/* 7.18.1.5. Greatest-width integer types */
+
+/* Note: These types are compiler dependent. It may be unwise to use them in
+ public header files. */
+
+#undef intmax_t
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+typedef long long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#elif defined GL_INT64_T
+# define intmax_t int64_t
+#else
+typedef long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#endif
+
+#undef uintmax_t
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+typedef unsigned long long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+#else
+typedef unsigned long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#endif
+
+/* Verify that intmax_t and uintmax_t have the same size. Too much code
+ breaks if this is not the case. If this check fails, the reason is likely
+ to be found in the autoconf macros. */
+typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
+
+/* 7.18.2. Limits of specified-width integer types */
+
+#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
+
+/* 7.18.2.1. Limits of exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. */
+
+#undef INT8_MIN
+#undef INT8_MAX
+#undef UINT8_MAX
+#define INT8_MIN (~ INT8_MAX)
+#define INT8_MAX 127
+#define UINT8_MAX 255
+
+#undef INT16_MIN
+#undef INT16_MAX
+#undef UINT16_MAX
+#define INT16_MIN (~ INT16_MAX)
+#define INT16_MAX 32767
+#define UINT16_MAX 65535
+
+#undef INT32_MIN
+#undef INT32_MAX
+#undef UINT32_MAX
+#define INT32_MIN (~ INT32_MAX)
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295U
+
+#undef INT64_MIN
+#undef INT64_MAX
+#ifdef GL_INT64_T
+/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
+ evaluates the latter incorrectly in preprocessor expressions. */
+# define INT64_MIN (- INTMAX_C (1) << 63)
+# define INT64_MAX INTMAX_C (9223372036854775807)
+#endif
+
+#undef UINT64_MAX
+#ifdef GL_UINT64_T
+# define UINT64_MAX UINTMAX_C (18446744073709551615)
+#endif
+
+/* 7.18.2.2. Limits of minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+ are the same as the corresponding N_t types. */
+
+#undef INT_LEAST8_MIN
+#undef INT_LEAST8_MAX
+#undef UINT_LEAST8_MAX
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST8_MAX INT8_MAX
+#define UINT_LEAST8_MAX UINT8_MAX
+
+#undef INT_LEAST16_MIN
+#undef INT_LEAST16_MAX
+#undef UINT_LEAST16_MAX
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST16_MAX INT16_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+
+#undef INT_LEAST32_MIN
+#undef INT_LEAST32_MAX
+#undef UINT_LEAST32_MAX
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST32_MAX INT32_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+
+#undef INT_LEAST64_MIN
+#undef INT_LEAST64_MAX
+#ifdef GL_INT64_T
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+#endif
+
+#undef UINT_LEAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_LEAST64_MAX UINT64_MAX
+#endif
+
+/* 7.18.2.3. Limits of fastest minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+ are taken from the same list of types. */
+
+#undef INT_FAST8_MIN
+#undef INT_FAST8_MAX
+#undef UINT_FAST8_MAX
+#define INT_FAST8_MIN LONG_MIN
+#define INT_FAST8_MAX LONG_MAX
+#define UINT_FAST8_MAX ULONG_MAX
+
+#undef INT_FAST16_MIN
+#undef INT_FAST16_MAX
+#undef UINT_FAST16_MAX
+#define INT_FAST16_MIN LONG_MIN
+#define INT_FAST16_MAX LONG_MAX
+#define UINT_FAST16_MAX ULONG_MAX
+
+#undef INT_FAST32_MIN
+#undef INT_FAST32_MAX
+#undef UINT_FAST32_MAX
+#define INT_FAST32_MIN LONG_MIN
+#define INT_FAST32_MAX LONG_MAX
+#define UINT_FAST32_MAX ULONG_MAX
+
+#undef INT_FAST64_MIN
+#undef INT_FAST64_MAX
+#ifdef GL_INT64_T
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+#endif
+
+#undef UINT_FAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_FAST64_MAX UINT64_MAX
+#endif
+
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */
+
+#undef INTPTR_MIN
+#undef INTPTR_MAX
+#undef UINTPTR_MAX
+#define INTPTR_MIN LONG_MIN
+#define INTPTR_MAX LONG_MAX
+#define UINTPTR_MAX ULONG_MAX
+
+/* 7.18.2.5. Limits of greatest-width integer types */
+
+#undef INTMAX_MIN
+#undef INTMAX_MAX
+#ifdef INT64_MAX
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+#else
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+#endif
+
+#undef UINTMAX_MAX
+#ifdef UINT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+#else
+# define UINTMAX_MAX UINT32_MAX
+#endif
+
+/* 7.18.3. Limits of other integer types */
+
+/* ptrdiff_t limits */
+#undef PTRDIFF_MIN
+#undef PTRDIFF_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# else
+# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
+# endif
+#else
+# define PTRDIFF_MIN \
+ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+# define PTRDIFF_MAX \
+ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+#endif
+
+/* sig_atomic_t limits */
+#undef SIG_ATOMIC_MIN
+#undef SIG_ATOMIC_MAX
+#define SIG_ATOMIC_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+ 0@SIG_ATOMIC_T_SUFFIX@)
+#define SIG_ATOMIC_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+ 0@SIG_ATOMIC_T_SUFFIX@)
+
+
+/* size_t limit */
+#undef SIZE_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# else
+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# endif
+#else
+# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
+#endif
+
+/* wchar_t limits */
+/* Get WCHAR_MIN, WCHAR_MAX.
+ This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
+ includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
+ <stdint.h> and assumes its types are already defined. */
+#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+#endif
+#undef WCHAR_MIN
+#undef WCHAR_MAX
+#define WCHAR_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+#define WCHAR_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+
+/* wint_t limits */
+#undef WINT_MIN
+#undef WINT_MAX
+#define WINT_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+#define WINT_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+
+#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
+
+/* 7.18.4. Macros for integer constants */
+
+#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
+/* 7.18.4.1. Macros for minimum-width integer constants */
+/* According to ISO C 99 Technical Corrigendum 1 */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
+
+#undef INT8_C
+#undef UINT8_C
+#define INT8_C(x) x
+#define UINT8_C(x) x
+
+#undef INT16_C
+#undef UINT16_C
+#define INT16_C(x) x
+#define UINT16_C(x) x
+
+#undef INT32_C
+#undef UINT32_C
+#define INT32_C(x) x
+#define UINT32_C(x) x ## U
+
+#undef INT64_C
+#undef UINT64_C
+#if LONG_MAX >> 31 >> 31 == 1
+# define INT64_C(x) x##L
+#elif defined _MSC_VER
+# define INT64_C(x) x##i64
+#elif @HAVE_LONG_LONG_INT@
+# define INT64_C(x) x##LL
+#endif
+#if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# define UINT64_C(x) x##UL
+#elif defined _MSC_VER
+# define UINT64_C(x) x##ui64
+#elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# define UINT64_C(x) x##ULL
+#endif
+
+/* 7.18.4.2. Macros for greatest-width integer constants */
+
+#undef INTMAX_C
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x) x##LL
+#elif defined GL_INT64_T
+# define INTMAX_C(x) INT64_C(x)
+#else
+# define INTMAX_C(x) x##L
+#endif
+
+#undef UINTMAX_C
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x) x##ULL
+#elif defined GL_UINT64_T
+# define UINTMAX_C(x) UINT64_C(x)
+#else
+# define UINTMAX_C(x) x##UL
+#endif
+
+#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
+
+#endif /* _GL_STDINT_H */
+#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/grub-core/gnulib/stdio-write.c b/grub-core/gnulib/stdio-write.c
new file mode 100644
index 0000000..a6a0eb1
--- /dev/null
+++ b/grub-core/gnulib/stdio-write.c
@@ -0,0 +1,148 @@
+/* POSIX compatible FILE stream write function.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Replace these functions only if module 'sigpipe' is requested. */
+#if GNULIB_SIGPIPE
+
+/* On native Windows platforms, SIGPIPE does not exist. When write() is
+ called on a pipe with no readers, WriteFile() fails with error
+ GetLastError() = ERROR_NO_DATA, and write() in consequence fails with
+ error EINVAL. This write() function is at the basis of the function
+ which flushes the buffer of a FILE stream. */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# include <errno.h>
+# include <signal.h>
+# include <io.h>
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \
+ if (ferror (stream)) \
+ return (EXPRESSION); \
+ else \
+ { \
+ RETTYPE ret; \
+ SetLastError (0); \
+ ret = (EXPRESSION); \
+ if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \
+ { \
+ int fd = fileno (stream); \
+ if (fd >= 0 \
+ && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\
+ { \
+ /* Try to raise signal SIGPIPE. */ \
+ raise (SIGPIPE); \
+ /* If it is currently blocked or ignored, change errno from \
+ EINVAL to EPIPE. */ \
+ errno = EPIPE; \
+ } \
+ } \
+ return ret; \
+ }
+
+# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
+int
+printf (const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stdout, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+
+# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
+int
+fprintf (FILE *stream, const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stream, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+
+# if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */
+int
+vprintf (const char *format, va_list args)
+{
+ return vfprintf (stdout, format, args);
+}
+# endif
+
+# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */
+int
+vfprintf (FILE *stream, const char *format, va_list args)
+#undef vfprintf
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF)
+}
+# endif
+
+int
+putchar (int c)
+{
+ return fputc (c, stdout);
+}
+
+int
+fputc (int c, FILE *stream)
+#undef fputc
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF)
+}
+
+int
+fputs (const char *string, FILE *stream)
+#undef fputs
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF)
+}
+
+int
+puts (const char *string)
+#undef puts
+{
+ FILE *stream = stdout;
+ CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF)
+}
+
+size_t
+fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
+#undef fwrite
+{
+ CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n)
+}
+
+# endif
+#endif
diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
new file mode 100644
index 0000000..80b9dbf
--- /dev/null
+++ b/grub-core/gnulib/stdio.in.h
@@ -0,0 +1,1071 @@
+/* A GNU-like <stdio.h>.
+
+ Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_FILE || defined __need___FILE
+/* Special invocation convention inside glibc header files. */
+
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_STDIO_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#ifndef _GL_STDIO_H
+#define _GL_STDIO_H
+
+/* Get va_list. Needed on many systems, including glibc 2.8. */
+#include <stdarg.h>
+
+#include <stddef.h>
+
+/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8. */
+#include <sys/types.h>
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Macros for stringification. */
+#define _GL_STDIO_STRINGIZE(token) #token
+#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
+
+
+#if @GNULIB_DPRINTF@
+# if @REPLACE_DPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define dprintf rpl_dprintf
+# endif
+_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
+# else
+# if !@HAVE_DPRINTF@
+_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (dprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef dprintf
+# if HAVE_RAW_DECL_DPRINTF
+_GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
+ "use gnulib module dprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_FCLOSE@
+/* Close STREAM and its underlying file descriptor. */
+# if @REPLACE_FCLOSE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define fclose rpl_fclose
+# endif
+_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
+# endif
+_GL_CXXALIASWARN (fclose);
+#elif defined GNULIB_POSIXCHECK
+# undef fclose
+/* Assume fclose is always declared. */
+_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
+ "use gnulib module fclose for portable POSIX compliance");
+#endif
+
+#if @GNULIB_FFLUSH@
+/* Flush all pending data on STREAM according to POSIX rules. Both
+ output and seekable input streams are supported.
+ Note! LOSS OF DATA can occur if fflush is applied on an input stream
+ that is _not_seekable_ or on an update stream that is _not_seekable_
+ and in which the most recent operation was input. Seekability can
+ be tested with lseek(fileno(fp),0,SEEK_CUR). */
+# if @REPLACE_FFLUSH@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define fflush rpl_fflush
+# endif
+_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
+_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
+# else
+_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
+# endif
+_GL_CXXALIASWARN (fflush);
+#elif defined GNULIB_POSIXCHECK
+# undef fflush
+/* Assume fflush is always declared. */
+_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
+ "use gnulib module fflush for portable POSIX compliance");
+#endif
+
+/* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+#undef gets
+_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+#if @GNULIB_FOPEN@
+# if @REPLACE_FOPEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fopen
+# define fopen rpl_fopen
+# endif
+_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
+# else
+_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
+# endif
+_GL_CXXALIASWARN (fopen);
+#elif defined GNULIB_POSIXCHECK
+# undef fopen
+/* Assume fopen is always declared. */
+_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
+ "use gnulib module fopen for portability");
+#endif
+
+#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
+# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
+ || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define fprintf rpl_fprintf
+# endif
+# define GNULIB_overrides_fprintf 1
+_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
+# else
+_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (fprintf);
+#endif
+#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_fprintf
+# undef fprintf
+# endif
+/* Assume fprintf is always declared. */
+_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
+ "use gnulib module fprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_FPURGE@
+/* Discard all pending buffered I/O data on STREAM.
+ STREAM must not be wide-character oriented.
+ When discarding pending output, the file position is set back to where it
+ was before the write calls. When discarding pending input, the file
+ position is advanced to match the end of the previously read input.
+ Return 0 if successful. Upon error, return -1 and set errno. */
+# if @REPLACE_FPURGE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define fpurge rpl_fpurge
+# endif
+_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
+# else
+# if !@HAVE_DECL_FPURGE@
+_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
+# endif
+_GL_CXXALIASWARN (fpurge);
+#elif defined GNULIB_POSIXCHECK
+# undef fpurge
+# if HAVE_RAW_DECL_FPURGE
+_GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
+ "use gnulib module fpurge for portability");
+# endif
+#endif
+
+#if @GNULIB_FPUTC@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fputc
+# define fputc rpl_fputc
+# endif
+_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
+# endif
+_GL_CXXALIASWARN (fputc);
+#endif
+
+#if @GNULIB_FPUTS@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fputs
+# define fputs rpl_fputs
+# endif
+_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
+# endif
+_GL_CXXALIASWARN (fputs);
+#endif
+
+#if @GNULIB_FREOPEN@
+# if @REPLACE_FREOPEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef freopen
+# define freopen rpl_freopen
+# endif
+_GL_FUNCDECL_RPL (freopen, FILE *,
+ (const char *filename, const char *mode, FILE *stream)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (freopen, FILE *,
+ (const char *filename, const char *mode, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (freopen, FILE *,
+ (const char *filename, const char *mode, FILE *stream));
+# endif
+_GL_CXXALIASWARN (freopen);
+#elif defined GNULIB_POSIXCHECK
+# undef freopen
+/* Assume freopen is always declared. */
+_GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - "
+ "use gnulib module freopen for portability");
+#endif
+
+
+/* Set up the following warnings, based on which modules are in use.
+ GNU Coding Standards discourage the use of fseek, since it imposes
+ an arbitrary limitation on some 32-bit hosts. Remember that the
+ fseek module depends on the fseeko module, so we only have three
+ cases to consider:
+
+ 1. The developer is not using either module. Issue a warning under
+ GNULIB_POSIXCHECK for both functions, to remind them that both
+ functions have bugs on some systems. _GL_NO_LARGE_FILES has no
+ impact on this warning.
+
+ 2. The developer is using both modules. They may be unaware of the
+ arbitrary limitations of fseek, so issue a warning under
+ GNULIB_POSIXCHECK. On the other hand, they may be using both
+ modules intentionally, so the developer can define
+ _GL_NO_LARGE_FILES in the compilation units where the use of fseek
+ is safe, to silence the warning.
+
+ 3. The developer is using the fseeko module, but not fseek. Gnulib
+ guarantees that fseek will still work around platform bugs in that
+ case, but we presume that the developer is aware of the pitfalls of
+ fseek and was trying to avoid it, so issue a warning even when
+ GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be
+ defined to silence the warning in particular compilation units.
+ In C++ compilations with GNULIB_NAMESPACE, in order to avoid that
+ fseek gets defined as a macro, it is recommended that the developer
+ uses the fseek module, even if he is not calling the fseek function.
+
+ Most gnulib clients that perform stream operations should fall into
+ category 3. */
+
+#if @GNULIB_FSEEK@
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
+# define _GL_FSEEK_WARN /* Category 2, above. */
+# undef fseek
+# endif
+# if @REPLACE_FSEEK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fseek
+# define fseek rpl_fseek
+# endif
+_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
+# else
+_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
+# endif
+_GL_CXXALIASWARN (fseek);
+#endif
+
+#if @GNULIB_FSEEKO@
+# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
+# define _GL_FSEEK_WARN /* Category 3, above. */
+# undef fseek
+# endif
+# if @REPLACE_FSEEKO@
+/* Provide an fseeko function that is aware of a preceding fflush(), and which
+ detects pipes. */
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fseeko
+# define fseeko rpl_fseeko
+# endif
+_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
+# else
+# if ! @HAVE_FSEEKO@
+_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
+# endif
+_GL_CXXALIASWARN (fseeko);
+# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
+ /* Provide an fseek function that is consistent with fseeko. */
+ /* In order to avoid that fseek gets defined as a macro here, the
+ developer can request the 'fseek' module. */
+# undef fseek
+# define fseek rpl_fseek
+static inline int _GL_ARG_NONNULL ((1))
+rpl_fseek (FILE *fp, long offset, int whence)
+{
+# if @REPLACE_FSEEKO@
+ return rpl_fseeko (fp, offset, whence);
+# else
+ return fseeko (fp, offset, whence);
+# endif
+}
+# endif
+#elif defined GNULIB_POSIXCHECK
+# define _GL_FSEEK_WARN /* Category 1, above. */
+# undef fseek
+# undef fseeko
+# if HAVE_RAW_DECL_FSEEKO
+_GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
+ "use gnulib module fseeko for portability");
+# endif
+#endif
+
+#ifdef _GL_FSEEK_WARN
+# undef _GL_FSEEK_WARN
+/* Here, either fseek is undefined (but C89 guarantees that it is
+ declared), or it is defined as rpl_fseek (declared above). */
+_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
+ "on 32-bit platforms - "
+ "use fseeko function for handling of large files");
+#endif
+
+
+/* ftell, ftello. See the comments on fseek/fseeko. */
+
+#if @GNULIB_FTELL@
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
+# define _GL_FTELL_WARN /* Category 2, above. */
+# undef ftell
+# endif
+# if @REPLACE_FTELL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ftell
+# define ftell rpl_ftell
+# endif
+_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
+# else
+_GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
+# endif
+_GL_CXXALIASWARN (ftell);
+#endif
+
+#if @GNULIB_FTELLO@
+# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
+# define _GL_FTELL_WARN /* Category 3, above. */
+# undef ftell
+# endif
+# if @REPLACE_FTELLO@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ftello
+# define ftello rpl_ftello
+# endif
+_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
+# else
+# if ! @HAVE_FTELLO@
+_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
+# endif
+_GL_CXXALIASWARN (ftello);
+# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
+ /* Provide an ftell function that is consistent with ftello. */
+ /* In order to avoid that ftell gets defined as a macro here, the
+ developer can request the 'ftell' module. */
+# undef ftell
+# define ftell rpl_ftell
+static inline long _GL_ARG_NONNULL ((1))
+rpl_ftell (FILE *f)
+{
+# if @REPLACE_FTELLO@
+ return rpl_ftello (f);
+# else
+ return ftello (f);
+# endif
+}
+# endif
+#elif defined GNULIB_POSIXCHECK
+# define _GL_FTELL_WARN /* Category 1, above. */
+# undef ftell
+# undef ftello
+# if HAVE_RAW_DECL_FTELLO
+_GL_WARN_ON_USE (ftello, "ftello is unportable - "
+ "use gnulib module ftello for portability");
+# endif
+#endif
+
+#ifdef _GL_FTELL_WARN
+# undef _GL_FTELL_WARN
+/* Here, either ftell is undefined (but C89 guarantees that it is
+ declared), or it is defined as rpl_ftell (declared above). */
+_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
+ "on 32-bit platforms - "
+ "use ftello function for handling of large files");
+#endif
+
+
+#if @GNULIB_FWRITE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fwrite
+# define fwrite rpl_fwrite
+# endif
+_GL_FUNCDECL_RPL (fwrite, size_t,
+ (const void *ptr, size_t s, size_t n, FILE *stream)
+ _GL_ARG_NONNULL ((1, 4)));
+_GL_CXXALIAS_RPL (fwrite, size_t,
+ (const void *ptr, size_t s, size_t n, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fwrite, size_t,
+ (const void *ptr, size_t s, size_t n, FILE *stream));
+# endif
+_GL_CXXALIASWARN (fwrite);
+#endif
+
+#if @GNULIB_GETDELIM@
+/* Read input, up to (and including) the next occurrence of DELIMITER, from
+ STREAM, store it in *LINEPTR (and NUL-terminate it).
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+ bytes of space. It is realloc'd as necessary.
+ Return the number of bytes read and stored at *LINEPTR (not including the
+ NUL terminator), or -1 on error or EOF. */
+# if @REPLACE_GETDELIM@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getdelim
+# define getdelim rpl_getdelim
+# endif
+_GL_FUNCDECL_RPL (getdelim, ssize_t,
+ (char **lineptr, size_t *linesize, int delimiter,
+ FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 4)));
+_GL_CXXALIAS_RPL (getdelim, ssize_t,
+ (char **lineptr, size_t *linesize, int delimiter,
+ FILE *stream));
+# else
+# if !@HAVE_DECL_GETDELIM@
+_GL_FUNCDECL_SYS (getdelim, ssize_t,
+ (char **lineptr, size_t *linesize, int delimiter,
+ FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 4)));
+# endif
+_GL_CXXALIAS_SYS (getdelim, ssize_t,
+ (char **lineptr, size_t *linesize, int delimiter,
+ FILE *stream));
+# endif
+_GL_CXXALIASWARN (getdelim);
+#elif defined GNULIB_POSIXCHECK
+# undef getdelim
+# if HAVE_RAW_DECL_GETDELIM
+_GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
+ "use gnulib module getdelim for portability");
+# endif
+#endif
+
+#if @GNULIB_GETLINE@
+/* Read a line, up to (and including) the next newline, from STREAM, store it
+ in *LINEPTR (and NUL-terminate it).
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+ bytes of space. It is realloc'd as necessary.
+ Return the number of bytes read and stored at *LINEPTR (not including the
+ NUL terminator), or -1 on error or EOF. */
+# if @REPLACE_GETLINE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getline
+# define getline rpl_getline
+# endif
+_GL_FUNCDECL_RPL (getline, ssize_t,
+ (char **lineptr, size_t *linesize, FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 3)));
+_GL_CXXALIAS_RPL (getline, ssize_t,
+ (char **lineptr, size_t *linesize, FILE *stream));
+# else
+# if !@HAVE_DECL_GETLINE@
+_GL_FUNCDECL_SYS (getline, ssize_t,
+ (char **lineptr, size_t *linesize, FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 3)));
+# endif
+_GL_CXXALIAS_SYS (getline, ssize_t,
+ (char **lineptr, size_t *linesize, FILE *stream));
+# endif
+# if @HAVE_DECL_GETLINE@
+_GL_CXXALIASWARN (getline);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getline
+# if HAVE_RAW_DECL_GETLINE
+_GL_WARN_ON_USE (getline, "getline is unportable - "
+ "use gnulib module getline for portability");
+# endif
+#endif
+
+#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+struct obstack;
+/* Grow an obstack with formatted output. Return the number of
+ bytes added to OBS. No trailing nul byte is added, and the
+ object should be closed with obstack_finish before use. Upon
+ memory allocation error, call obstack_alloc_failed_handler. Upon
+ other error, return -1. */
+# if @REPLACE_OBSTACK_PRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define obstack_printf rpl_obstack_printf
+# endif
+_GL_FUNCDECL_RPL (obstack_printf, int,
+ (struct obstack *obs, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (obstack_printf, int,
+ (struct obstack *obs, const char *format, ...));
+# else
+# if !@HAVE_DECL_OBSTACK_PRINTF@
+_GL_FUNCDECL_SYS (obstack_printf, int,
+ (struct obstack *obs, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (obstack_printf, int,
+ (struct obstack *obs, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (obstack_printf);
+# if @REPLACE_OBSTACK_PRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define obstack_vprintf rpl_obstack_vprintf
+# endif
+_GL_FUNCDECL_RPL (obstack_vprintf, int,
+ (struct obstack *obs, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (obstack_vprintf, int,
+ (struct obstack *obs, const char *format, va_list args));
+# else
+# if !@HAVE_DECL_OBSTACK_PRINTF@
+_GL_FUNCDECL_SYS (obstack_vprintf, int,
+ (struct obstack *obs, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (obstack_vprintf, int,
+ (struct obstack *obs, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (obstack_vprintf);
+#endif
+
+#if @GNULIB_PERROR@
+/* Print a message to standard error, describing the value of ERRNO,
+ (if STRING is not NULL and not empty) prefixed with STRING and ": ",
+ and terminated with a newline. */
+# if @REPLACE_PERROR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define perror rpl_perror
+# endif
+_GL_FUNCDECL_RPL (perror, void, (const char *string));
+_GL_CXXALIAS_RPL (perror, void, (const char *string));
+# else
+_GL_CXXALIAS_SYS (perror, void, (const char *string));
+# endif
+_GL_CXXALIASWARN (perror);
+#elif defined GNULIB_POSIXCHECK
+# undef perror
+/* Assume perror is always declared. */
+_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
+ "use gnulib module perror for portability");
+#endif
+
+#if @GNULIB_POPEN@
+# if @REPLACE_POPEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef popen
+# define popen rpl_popen
+# endif
+_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
+# else
+_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
+# endif
+_GL_CXXALIASWARN (popen);
+#elif defined GNULIB_POSIXCHECK
+# undef popen
+# if HAVE_RAW_DECL_POPEN
+_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
+ "use gnulib module popen or pipe for more portability");
+# endif
+#endif
+
+#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
+# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
+ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+# if defined __GNUC__
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+/* Don't break __attribute__((format(printf,M,N))). */
+# define printf __printf__
+# endif
+_GL_FUNCDECL_RPL_1 (__printf__, int,
+ (const char *format, ...)
+ __asm__ (@ASM_SYMBOL_PREFIX@
+ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
+ __attribute__ ((__format__ (__printf__, 1, 2)))
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
+# else
+_GL_FUNCDECL_RPL (printf, int,
+ (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)))
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
+# endif
+# define GNULIB_overrides_printf 1
+# else
+_GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
+# endif
+_GL_CXXALIASWARN (printf);
+#endif
+#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_printf
+# undef printf
+# endif
+/* Assume printf is always declared. */
+_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
+ "use gnulib module printf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_PUTC@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef putc
+# define putc rpl_fputc
+# endif
+_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
+# endif
+_GL_CXXALIASWARN (putc);
+#endif
+
+#if @GNULIB_PUTCHAR@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef putchar
+# define putchar rpl_putchar
+# endif
+_GL_FUNCDECL_RPL (putchar, int, (int c));
+_GL_CXXALIAS_RPL (putchar, int, (int c));
+# else
+_GL_CXXALIAS_SYS (putchar, int, (int c));
+# endif
+_GL_CXXALIASWARN (putchar);
+#endif
+
+#if @GNULIB_PUTS@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef puts
+# define puts rpl_puts
+# endif
+_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (puts, int, (const char *string));
+# else
+_GL_CXXALIAS_SYS (puts, int, (const char *string));
+# endif
+_GL_CXXALIASWARN (puts);
+#endif
+
+#if @GNULIB_REMOVE@
+# if @REPLACE_REMOVE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef remove
+# define remove rpl_remove
+# endif
+_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (remove, int, (const char *name));
+# else
+_GL_CXXALIAS_SYS (remove, int, (const char *name));
+# endif
+_GL_CXXALIASWARN (remove);
+#elif defined GNULIB_POSIXCHECK
+# undef remove
+/* Assume remove is always declared. */
+_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
+ "use gnulib module remove for more portability");
+#endif
+
+#if @GNULIB_RENAME@
+# if @REPLACE_RENAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef rename
+# define rename rpl_rename
+# endif
+_GL_FUNCDECL_RPL (rename, int,
+ (const char *old_filename, const char *new_filename)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (rename, int,
+ (const char *old_filename, const char *new_filename));
+# else
+_GL_CXXALIAS_SYS (rename, int,
+ (const char *old_filename, const char *new_filename));
+# endif
+_GL_CXXALIASWARN (rename);
+#elif defined GNULIB_POSIXCHECK
+# undef rename
+/* Assume rename is always declared. */
+_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
+ "use gnulib module rename for more portability");
+#endif
+
+#if @GNULIB_RENAMEAT@
+# if @REPLACE_RENAMEAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef renameat
+# define renameat rpl_renameat
+# endif
+_GL_FUNCDECL_RPL (renameat, int,
+ (int fd1, char const *file1, int fd2, char const *file2)
+ _GL_ARG_NONNULL ((2, 4)));
+_GL_CXXALIAS_RPL (renameat, int,
+ (int fd1, char const *file1, int fd2, char const *file2));
+# else
+# if !@HAVE_RENAMEAT@
+_GL_FUNCDECL_SYS (renameat, int,
+ (int fd1, char const *file1, int fd2, char const *file2)
+ _GL_ARG_NONNULL ((2, 4)));
+# endif
+_GL_CXXALIAS_SYS (renameat, int,
+ (int fd1, char const *file1, int fd2, char const *file2));
+# endif
+_GL_CXXALIASWARN (renameat);
+#elif defined GNULIB_POSIXCHECK
+# undef renameat
+# if HAVE_RAW_DECL_RENAMEAT
+_GL_WARN_ON_USE (renameat, "renameat is not portable - "
+ "use gnulib module renameat for portability");
+# endif
+#endif
+
+#if @GNULIB_SNPRINTF@
+# if @REPLACE_SNPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define snprintf rpl_snprintf
+# endif
+_GL_FUNCDECL_RPL (snprintf, int,
+ (char *str, size_t size, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)))
+ _GL_ARG_NONNULL ((3)));
+_GL_CXXALIAS_RPL (snprintf, int,
+ (char *str, size_t size, const char *format, ...));
+# else
+# if !@HAVE_DECL_SNPRINTF@
+_GL_FUNCDECL_SYS (snprintf, int,
+ (char *str, size_t size, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)))
+ _GL_ARG_NONNULL ((3)));
+# endif
+_GL_CXXALIAS_SYS (snprintf, int,
+ (char *str, size_t size, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (snprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef snprintf
+# if HAVE_RAW_DECL_SNPRINTF
+_GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
+ "use gnulib module snprintf for portability");
+# endif
+#endif
+
+/* Some people would argue that sprintf should be handled like gets
+ (for example, OpenBSD issues a link warning for both functions),
+ since both can cause security holes due to buffer overruns.
+ However, we believe that sprintf can be used safely, and is more
+ efficient than snprintf in those safe cases; and as proof of our
+ belief, we use sprintf in several gnulib modules. So this header
+ intentionally avoids adding a warning to sprintf except when
+ GNULIB_POSIXCHECK is defined. */
+
+#if @GNULIB_SPRINTF_POSIX@
+# if @REPLACE_SPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define sprintf rpl_sprintf
+# endif
+_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
+# else
+_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (sprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef sprintf
+/* Assume sprintf is always declared. */
+_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
+ "use gnulib module sprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_TMPFILE@
+# if @REPLACE_TMPFILE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define tmpfile rpl_tmpfile
+# endif
+_GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
+_GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
+# else
+_GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
+# endif
+_GL_CXXALIASWARN (tmpfile);
+#elif defined GNULIB_POSIXCHECK
+# undef tmpfile
+# if HAVE_RAW_DECL_TMPFILE
+_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
+ "use gnulib module tmpfile for portability");
+# endif
+#endif
+
+#if @GNULIB_VASPRINTF@
+/* Write formatted output to a string dynamically allocated with malloc().
+ If the memory allocation succeeds, store the address of the string in
+ *RESULT and return the number of resulting bytes, excluding the trailing
+ NUL. Upon memory allocation error, or some other error, return -1. */
+# if @REPLACE_VASPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define asprintf rpl_asprintf
+# endif
+_GL_FUNCDECL_RPL (asprintf, int,
+ (char **result, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (asprintf, int,
+ (char **result, const char *format, ...));
+# else
+# if !@HAVE_VASPRINTF@
+_GL_FUNCDECL_SYS (asprintf, int,
+ (char **result, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (asprintf, int,
+ (char **result, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (asprintf);
+# if @REPLACE_VASPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define vasprintf rpl_vasprintf
+# endif
+_GL_FUNCDECL_RPL (vasprintf, int,
+ (char **result, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (vasprintf, int,
+ (char **result, const char *format, va_list args));
+# else
+# if !@HAVE_VASPRINTF@
+_GL_FUNCDECL_SYS (vasprintf, int,
+ (char **result, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (vasprintf, int,
+ (char **result, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vasprintf);
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define vdprintf rpl_vdprintf
+# endif
+_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
+# else
+# if !@HAVE_VDPRINTF@
+_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((2)));
+# endif
+/* Need to cast, because on Solaris, the third parameter will likely be
+ __va_list args. */
+_GL_CXXALIAS_SYS_CAST (vdprintf, int,
+ (int fd, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vdprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# if HAVE_RAW_DECL_VDPRINTF
+_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
+ "use gnulib module vdprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
+# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
+ || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define vfprintf rpl_vfprintf
+# endif
+# define GNULIB_overrides_vfprintf 1
+_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
+# else
+/* Need to cast, because on Solaris, the third parameter is
+ __va_list args
+ and GCC's fixincludes did not change this to __gnuc_va_list. */
+_GL_CXXALIAS_SYS_CAST (vfprintf, int,
+ (FILE *fp, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vfprintf);
+#endif
+#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_vfprintf
+# undef vfprintf
+# endif
+/* Assume vfprintf is always declared. */
+_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
+ "use gnulib module vfprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
+# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
+ || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define vprintf rpl_vprintf
+# endif
+# define GNULIB_overrides_vprintf 1
+_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 1, 0)))
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
+# else
+/* Need to cast, because on Solaris, the second parameter is
+ __va_list args
+ and GCC's fixincludes did not change this to __gnuc_va_list. */
+_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vprintf);
+#endif
+#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_vprintf
+# undef vprintf
+# endif
+/* Assume vprintf is always declared. */
+_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
+ "use gnulib module vprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_VSNPRINTF@
+# if @REPLACE_VSNPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define vsnprintf rpl_vsnprintf
+# endif
+_GL_FUNCDECL_RPL (vsnprintf, int,
+ (char *str, size_t size, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 3, 0)))
+ _GL_ARG_NONNULL ((3)));
+_GL_CXXALIAS_RPL (vsnprintf, int,
+ (char *str, size_t size, const char *format, va_list args));
+# else
+# if !@HAVE_DECL_VSNPRINTF@
+_GL_FUNCDECL_SYS (vsnprintf, int,
+ (char *str, size_t size, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 3, 0)))
+ _GL_ARG_NONNULL ((3)));
+# endif
+_GL_CXXALIAS_SYS (vsnprintf, int,
+ (char *str, size_t size, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vsnprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef vsnprintf
+# if HAVE_RAW_DECL_VSNPRINTF
+_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
+ "use gnulib module vsnprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_VSPRINTF_POSIX@
+# if @REPLACE_VSPRINTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define vsprintf rpl_vsprintf
+# endif
+_GL_FUNCDECL_RPL (vsprintf, int,
+ (char *str, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (vsprintf, int,
+ (char *str, const char *format, va_list args));
+# else
+/* Need to cast, because on Solaris, the third parameter is
+ __va_list args
+ and GCC's fixincludes did not change this to __gnuc_va_list. */
+_GL_CXXALIAS_SYS_CAST (vsprintf, int,
+ (char *str, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vsprintf);
+#elif defined GNULIB_POSIXCHECK
+# undef vsprintf
+/* Assume vsprintf is always declared. */
+_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
+ "use gnulib module vsprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+
+#endif /* _GL_STDIO_H */
+#endif /* _GL_STDIO_H */
+#endif
diff --git a/grub-core/gnulib/stdlib.in.h b/grub-core/gnulib/stdlib.in.h
new file mode 100644
index 0000000..f4309ed
--- /dev/null
+++ b/grub-core/gnulib/stdlib.in.h
@@ -0,0 +1,715 @@
+/* A GNU-like <stdlib.h>.
+
+ Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_malloc_and_calloc
+/* Special invocation convention inside glibc header files. */
+
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_STDLIB_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#ifndef _GL_STDLIB_H
+#define _GL_STDLIB_H
+
+/* NetBSD 5.0 mis-defines NULL. */
+#include <stddef.h>
+
+/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */
+#ifndef WEXITSTATUS
+# include <sys/wait.h>
+#endif
+
+/* Solaris declares getloadavg() in <sys/loadavg.h>. */
+#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
+# include <sys/loadavg.h>
+#endif
+
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+ from <stdlib.h> if _REENTRANT is defined. Include it always. */
+#if @HAVE_RANDOM_H@
+# include <random.h>
+#endif
+
+#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
+ || defined GNULIB_POSIXCHECK
+# include <stdint.h>
+#endif
+
+#if !@HAVE_STRUCT_RANDOM_DATA@
+struct random_data
+{
+ int32_t *fptr; /* Front pointer. */
+ int32_t *rptr; /* Rear pointer. */
+ int32_t *state; /* Array of state values. */
+ int rand_type; /* Type of random number generator. */
+ int rand_deg; /* Degree of random number generator. */
+ int rand_sep; /* Distance between front and rear. */
+ int32_t *end_ptr; /* Pointer behind state table. */
+};
+#endif
+
+#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
+/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
+/* But avoid namespace pollution on glibc systems and native Windows. */
+# include <unistd.h>
+#endif
+
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
+ with proper operation of xargs. */
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#elif EXIT_FAILURE != 1
+# undef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+
+#if @GNULIB__EXIT@
+/* Terminate the current process with the given return code, without running
+ the 'atexit' handlers. */
+# if !@HAVE__EXIT@
+_GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__)));
+# endif
+_GL_CXXALIAS_SYS (_Exit, void, (int status));
+_GL_CXXALIASWARN (_Exit);
+#elif defined GNULIB_POSIXCHECK
+# undef _Exit
+# if HAVE_RAW_DECL__EXIT
+_GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
+ "use gnulib module _Exit for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ATOLL@
+/* Parse a signed decimal integer.
+ Returns the value of the integer. Errors are not detected. */
+# if !@HAVE_ATOLL@
+_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (atoll, long long, (const char *string));
+_GL_CXXALIASWARN (atoll);
+#elif defined GNULIB_POSIXCHECK
+# undef atoll
+# if HAVE_RAW_DECL_ATOLL
+_GL_WARN_ON_USE (atoll, "atoll is unportable - "
+ "use gnulib module atoll for portability");
+# endif
+#endif
+
+#if @GNULIB_CALLOC_POSIX@
+# if @REPLACE_CALLOC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef calloc
+# define calloc rpl_calloc
+# endif
+_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
+_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
+# else
+_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
+# endif
+_GL_CXXALIASWARN (calloc);
+#elif defined GNULIB_POSIXCHECK
+# undef calloc
+/* Assume calloc is always declared. */
+_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
+ "use gnulib module calloc-posix for portability");
+#endif
+
+#if @GNULIB_CANONICALIZE_FILE_NAME@
+# if @REPLACE_CANONICALIZE_FILE_NAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define canonicalize_file_name rpl_canonicalize_file_name
+# endif
+_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
+# else
+# if !@HAVE_CANONICALIZE_FILE_NAME@
+_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
+# endif
+_GL_CXXALIASWARN (canonicalize_file_name);
+#elif defined GNULIB_POSIXCHECK
+# undef canonicalize_file_name
+# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
+_GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - "
+ "use gnulib module canonicalize-lgpl for portability");
+# endif
+#endif
+
+#if @GNULIB_GETLOADAVG@
+/* Store max(NELEM,3) load average numbers in LOADAVG[].
+ The three numbers are the load average of the last 1 minute, the last 5
+ minutes, and the last 15 minutes, respectively.
+ LOADAVG is an array of NELEM numbers. */
+# if !@HAVE_DECL_GETLOADAVG@
+_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
+_GL_CXXALIASWARN (getloadavg);
+#elif defined GNULIB_POSIXCHECK
+# undef getloadavg
+# if HAVE_RAW_DECL_GETLOADAVG
+_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
+ "use gnulib module getloadavg for portability");
+# endif
+#endif
+
+#if @GNULIB_GETSUBOPT@
+/* Assuming *OPTIONP is a comma separated list of elements of the form
+ "token" or "token=value", getsubopt parses the first of these elements.
+ If the first element refers to a "token" that is member of the given
+ NULL-terminated array of tokens:
+ - It replaces the comma with a NUL byte, updates *OPTIONP to point past
+ the first option and the comma, sets *VALUEP to the value of the
+ element (or NULL if it doesn't contain an "=" sign),
+ - It returns the index of the "token" in the given array of tokens.
+ Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
+ For more details see the POSIX:2001 specification.
+ http://www.opengroup.org/susv3xsh/getsubopt.html */
+# if !@HAVE_GETSUBOPT@
+_GL_FUNCDECL_SYS (getsubopt, int,
+ (char **optionp, char *const *tokens, char **valuep)
+ _GL_ARG_NONNULL ((1, 2, 3)));
+# endif
+_GL_CXXALIAS_SYS (getsubopt, int,
+ (char **optionp, char *const *tokens, char **valuep));
+_GL_CXXALIASWARN (getsubopt);
+#elif defined GNULIB_POSIXCHECK
+# undef getsubopt
+# if HAVE_RAW_DECL_GETSUBOPT
+_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
+ "use gnulib module getsubopt for portability");
+# endif
+#endif
+
+#if @GNULIB_GRANTPT@
+/* Change the ownership and access permission of the slave side of the
+ pseudo-terminal whose master side is specified by FD. */
+# if !@HAVE_GRANTPT@
+_GL_FUNCDECL_SYS (grantpt, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (grantpt, int, (int fd));
+_GL_CXXALIASWARN (grantpt);
+#elif defined GNULIB_POSIXCHECK
+# undef grantpt
+# if HAVE_RAW_DECL_GRANTPT
+_GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
+ "use gnulib module grantpt for portability");
+# endif
+#endif
+
+#if @GNULIB_MALLOC_POSIX@
+# if @REPLACE_MALLOC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef malloc
+# define malloc rpl_malloc
+# endif
+_GL_FUNCDECL_RPL (malloc, void *, (size_t size));
+_GL_CXXALIAS_RPL (malloc, void *, (size_t size));
+# else
+_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
+# endif
+_GL_CXXALIASWARN (malloc);
+#elif defined GNULIB_POSIXCHECK
+# undef malloc
+/* Assume malloc is always declared. */
+_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
+ "use gnulib module malloc-posix for portability");
+#endif
+
+#if @GNULIB_MKDTEMP@
+/* Create a unique temporary directory from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the directory name unique.
+ Returns TEMPLATE, or a null pointer if it cannot get a unique name.
+ The directory is created mode 700. */
+# if !@HAVE_MKDTEMP@
+_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
+_GL_CXXALIASWARN (mkdtemp);
+#elif defined GNULIB_POSIXCHECK
+# undef mkdtemp
+# if HAVE_RAW_DECL_MKDTEMP
+_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
+ "use gnulib module mkdtemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKOSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ The file is then created, with the specified flags, ensuring it didn't exist
+ before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+# if !@HAVE_MKOSTEMP@
+_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
+_GL_CXXALIASWARN (mkostemp);
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemp
+# if HAVE_RAW_DECL_MKOSTEMP
+_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
+ "use gnulib module mkostemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKOSTEMPS@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE before a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ The file is then created, with the specified flags, ensuring it didn't exist
+ before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+# if !@HAVE_MKOSTEMPS@
+_GL_FUNCDECL_SYS (mkostemps, int,
+ (char * /*template*/, int /*suffixlen*/, int /*flags*/)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkostemps, int,
+ (char * /*template*/, int /*suffixlen*/, int /*flags*/));
+_GL_CXXALIASWARN (mkostemps);
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemps
+# if HAVE_RAW_DECL_MKOSTEMPS
+_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
+ "use gnulib module mkostemps for portability");
+# endif
+#endif
+
+#if @GNULIB_MKSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The file is then created, ensuring it didn't exist before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+# if @REPLACE_MKSTEMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mkstemp rpl_mkstemp
+# endif
+_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
+# else
+# if ! @HAVE_MKSTEMP@
+_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
+# endif
+_GL_CXXALIASWARN (mkstemp);
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemp
+# if HAVE_RAW_DECL_MKSTEMP
+_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
+ "use gnulib module mkstemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKSTEMPS@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE prior to a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The file is then created, ensuring it didn't exist before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+# if !@HAVE_MKSTEMPS@
+_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
+_GL_CXXALIASWARN (mkstemps);
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemps
+# if HAVE_RAW_DECL_MKSTEMPS
+_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
+ "use gnulib module mkstemps for portability");
+# endif
+#endif
+
+#if @GNULIB_PTSNAME@
+/* Return the pathname of the pseudo-terminal slave associated with
+ the master FD is open on, or NULL on errors. */
+# if !@HAVE_PTSNAME@
+_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
+# endif
+_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
+_GL_CXXALIASWARN (ptsname);
+#elif defined GNULIB_POSIXCHECK
+# undef ptsname
+# if HAVE_RAW_DECL_PTSNAME
+_GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
+ "use gnulib module ptsname for portability");
+# endif
+#endif
+
+#if @GNULIB_PUTENV@
+# if @REPLACE_PUTENV@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef putenv
+# define putenv rpl_putenv
+# endif
+_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (putenv, int, (char *string));
+# else
+_GL_CXXALIAS_SYS (putenv, int, (char *string));
+# endif
+_GL_CXXALIASWARN (putenv);
+#endif
+
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+# ifndef RAND_MAX
+# define RAND_MAX 2147483647
+# endif
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
+_GL_CXXALIASWARN (random_r);
+#elif defined GNULIB_POSIXCHECK
+# undef random_r
+# if HAVE_RAW_DECL_RANDOM_R
+_GL_WARN_ON_USE (random_r, "random_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (srandom_r, int,
+ (unsigned int seed, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (srandom_r, int,
+ (unsigned int seed, struct random_data *rand_state));
+_GL_CXXALIASWARN (srandom_r);
+#elif defined GNULIB_POSIXCHECK
+# undef srandom_r
+# if HAVE_RAW_DECL_SRANDOM_R
+_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (initstate_r, int,
+ (unsigned int seed, char *buf, size_t buf_size,
+ struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2, 4)));
+# endif
+_GL_CXXALIAS_SYS (initstate_r, int,
+ (unsigned int seed, char *buf, size_t buf_size,
+ struct random_data *rand_state));
+_GL_CXXALIASWARN (initstate_r);
+#elif defined GNULIB_POSIXCHECK
+# undef initstate_r
+# if HAVE_RAW_DECL_INITSTATE_R
+_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+_GL_FUNCDECL_SYS (setstate_r, int,
+ (char *arg_state, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (setstate_r, int,
+ (char *arg_state, struct random_data *rand_state));
+_GL_CXXALIASWARN (setstate_r);
+#elif defined GNULIB_POSIXCHECK
+# undef setstate_r
+# if HAVE_RAW_DECL_SETSTATE_R
+_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+#endif
+
+
+#if @GNULIB_REALLOC_POSIX@
+# if @REPLACE_REALLOC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef realloc
+# define realloc rpl_realloc
+# endif
+_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
+_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
+# else
+_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
+# endif
+_GL_CXXALIASWARN (realloc);
+#elif defined GNULIB_POSIXCHECK
+# undef realloc
+/* Assume realloc is always declared. */
+_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
+ "use gnulib module realloc-posix for portability");
+#endif
+
+#if @GNULIB_REALPATH@
+# if @REPLACE_REALPATH@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define realpath rpl_realpath
+# endif
+_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
+# else
+# if !@HAVE_REALPATH@
+_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
+# endif
+_GL_CXXALIASWARN (realpath);
+#elif defined GNULIB_POSIXCHECK
+# undef realpath
+# if HAVE_RAW_DECL_REALPATH
+_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
+ "canonicalize or canonicalize-lgpl for portability");
+# endif
+#endif
+
+#if @GNULIB_RPMATCH@
+/* Test a user response to a question.
+ Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
+# if !@HAVE_RPMATCH@
+_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
+_GL_CXXALIASWARN (rpmatch);
+#elif defined GNULIB_POSIXCHECK
+# undef rpmatch
+# if HAVE_RAW_DECL_RPMATCH
+_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
+ "use gnulib module rpmatch for portability");
+# endif
+#endif
+
+#if @GNULIB_SETENV@
+/* Set NAME to VALUE in the environment.
+ If REPLACE is nonzero, overwrite an existing value. */
+# if @REPLACE_SETENV@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef setenv
+# define setenv rpl_setenv
+# endif
+_GL_FUNCDECL_RPL (setenv, int,
+ (const char *name, const char *value, int replace)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (setenv, int,
+ (const char *name, const char *value, int replace));
+# else
+# if !@HAVE_SETENV@
+_GL_FUNCDECL_SYS (setenv, int,
+ (const char *name, const char *value, int replace)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (setenv, int,
+ (const char *name, const char *value, int replace));
+# endif
+_GL_CXXALIASWARN (setenv);
+#elif defined GNULIB_POSIXCHECK
+# undef setenv
+# if HAVE_RAW_DECL_SETENV
+_GL_WARN_ON_USE (setenv, "setenv is unportable - "
+ "use gnulib module setenv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOD@
+ /* Parse a double from STRING, updating ENDP if appropriate. */
+# if @REPLACE_STRTOD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strtod rpl_strtod
+# endif
+_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
+# else
+# if !@HAVE_STRTOD@
+_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
+# endif
+_GL_CXXALIASWARN (strtod);
+#elif defined GNULIB_POSIXCHECK
+# undef strtod
+# if HAVE_RAW_DECL_STRTOD
+_GL_WARN_ON_USE (strtod, "strtod is unportable - "
+ "use gnulib module strtod for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOLL@
+/* Parse a signed integer whose textual representation starts at STRING.
+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+ "0x").
+ If ENDPTR is not NULL, the address of the first byte after the integer is
+ stored in *ENDPTR.
+ Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
+ to ERANGE. */
+# if !@HAVE_STRTOLL@
+_GL_FUNCDECL_SYS (strtoll, long long,
+ (const char *string, char **endptr, int base)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtoll, long long,
+ (const char *string, char **endptr, int base));
+_GL_CXXALIASWARN (strtoll);
+#elif defined GNULIB_POSIXCHECK
+# undef strtoll
+# if HAVE_RAW_DECL_STRTOLL
+_GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
+ "use gnulib module strtoll for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOULL@
+/* Parse an unsigned integer whose textual representation starts at STRING.
+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+ "0x").
+ If ENDPTR is not NULL, the address of the first byte after the integer is
+ stored in *ENDPTR.
+ Upon overflow, the return value is ULLONG_MAX, and errno is set to
+ ERANGE. */
+# if !@HAVE_STRTOULL@
+_GL_FUNCDECL_SYS (strtoull, unsigned long long,
+ (const char *string, char **endptr, int base)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtoull, unsigned long long,
+ (const char *string, char **endptr, int base));
+_GL_CXXALIASWARN (strtoull);
+#elif defined GNULIB_POSIXCHECK
+# undef strtoull
+# if HAVE_RAW_DECL_STRTOULL
+_GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
+ "use gnulib module strtoull for portability");
+# endif
+#endif
+
+#if @GNULIB_UNLOCKPT@
+/* Unlock the slave side of the pseudo-terminal whose master side is specified
+ by FD, so that it can be opened. */
+# if !@HAVE_UNLOCKPT@
+_GL_FUNCDECL_SYS (unlockpt, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (unlockpt, int, (int fd));
+_GL_CXXALIASWARN (unlockpt);
+#elif defined GNULIB_POSIXCHECK
+# undef unlockpt
+# if HAVE_RAW_DECL_UNLOCKPT
+_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
+ "use gnulib module unlockpt for portability");
+# endif
+#endif
+
+#if @GNULIB_UNSETENV@
+/* Remove the variable NAME from the environment. */
+# if @REPLACE_UNSETENV@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef unsetenv
+# define unsetenv rpl_unsetenv
+# endif
+_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
+# else
+# if !@HAVE_UNSETENV@
+_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
+# endif
+_GL_CXXALIASWARN (unsetenv);
+#elif defined GNULIB_POSIXCHECK
+# undef unsetenv
+# if HAVE_RAW_DECL_UNSETENV
+_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
+ "use gnulib module unsetenv for portability");
+# endif
+#endif
+
+
+#endif /* _GL_STDLIB_H */
+#endif /* _GL_STDLIB_H */
+#endif
diff --git a/grub-core/gnulib/strcasecmp.c b/grub-core/gnulib/strcasecmp.c
new file mode 100644
index 0000000..612c80f
--- /dev/null
+++ b/grub-core/gnulib/strcasecmp.c
@@ -0,0 +1,63 @@
+/* Case-insensitive string comparison function.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+#include <ctype.h>
+#include <limits.h>
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+ greater than zero if S1 is lexicographically less than, equal to or greater
+ than S2.
+ Note: This function does not work with multibyte strings! */
+
+int
+strcasecmp (const char *s1, const char *s2)
+{
+ const unsigned char *p1 = (const unsigned char *) s1;
+ const unsigned char *p2 = (const unsigned char *) s2;
+ unsigned char c1, c2;
+
+ if (p1 == p2)
+ return 0;
+
+ do
+ {
+ c1 = TOLOWER (*p1);
+ c2 = TOLOWER (*p2);
+
+ if (c1 == '\0')
+ break;
+
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ if (UCHAR_MAX <= INT_MAX)
+ return c1 - c2;
+ else
+ /* On machines where 'char' and 'int' are types of the same size, the
+ difference of two 'unsigned char' values - including the sign bit -
+ doesn't fit in an 'int'. */
+ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/grub-core/gnulib/strchrnul.c b/grub-core/gnulib/strchrnul.c
new file mode 100644
index 0000000..f834d34
--- /dev/null
+++ b/grub-core/gnulib/strchrnul.c
@@ -0,0 +1,142 @@
+/* Searching in a string.
+ Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+/* Find the first occurrence of C in S or the final NUL byte. */
+char *
+strchrnul (const char *s, int c_in)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c;
+ unsigned char c;
+
+ c = (unsigned char) c_in;
+ if (!c)
+ return rawmemchr (s, 0);
+
+ /* Handle the first few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s;
+ (size_t) char_ptr % sizeof (longword) != 0;
+ ++char_ptr)
+ if (!*char_ptr || *char_ptr == c)
+ return (char *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c has c in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c = c | (c << 8);
+ repeated_c |= repeated_c << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c |= repeated_c << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c |= repeated_c << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will
+ test a longword at a time. The tricky part is testing if *any of
+ the four* bytes in the longword in question are equal to NUL or
+ c. We first use an xor with repeated_c. This reduces the task
+ to testing whether *any of the four* bytes in longword1 or
+ longword2 is zero.
+
+ Let's consider longword1. We compute tmp =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ The test whether any byte in longword1 or longword2 is zero is equivalent
+ to testing whether tmp1 is nonzero or tmp2 is nonzero. We can combine
+ this into a single test, whether (tmp1 | tmp2) is nonzero.
+
+ This test can read more than one byte beyond the end of a string,
+ depending on where the terminating NUL is encountered. However,
+ this is considered safe since the initialization phase ensured
+ that the read will be aligned, therefore, the read will not cross
+ page boundaries and will not cause a fault. */
+
+ while (1)
+ {
+ longword longword1 = *longword_ptr ^ repeated_c;
+ longword longword2 = *longword_ptr;
+
+ if (((((longword1 - repeated_one) & ~longword1)
+ | ((longword2 - repeated_one) & ~longword2))
+ & (repeated_one << 7)) != 0)
+ break;
+ longword_ptr++;
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that one of the sizeof (longword) bytes
+ starting at char_ptr is == 0 or == c. On little-endian machines,
+ we could determine the first such byte without any further memory
+ accesses, just by looking at the tmp result from the last loop
+ iteration. But this does not work on big-endian machines.
+ Choose code that works in both cases. */
+
+ char_ptr = (unsigned char *) longword_ptr;
+ while (*char_ptr && (*char_ptr != c))
+ char_ptr++;
+ return (char *) char_ptr;
+}
diff --git a/grub-core/gnulib/strchrnul.valgrind b/grub-core/gnulib/strchrnul.valgrind
new file mode 100644
index 0000000..b14fa13
--- /dev/null
+++ b/grub-core/gnulib/strchrnul.valgrind
@@ -0,0 +1,12 @@
+# Suppress a valgrind message about use of uninitialized memory in strchrnul().
+# This use is OK because it provides only a speedup.
+{
+ strchrnul-value4
+ Memcheck:Value4
+ fun:strchrnul
+}
+{
+ strchrnul-value8
+ Memcheck:Value8
+ fun:strchrnul
+}
diff --git a/grub-core/gnulib/streq.h b/grub-core/gnulib/streq.h
new file mode 100644
index 0000000..aa65bb8
--- /dev/null
+++ b/grub-core/gnulib/streq.h
@@ -0,0 +1,176 @@
+/* Optimized string comparison.
+ Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#ifndef _GL_STREQ_H
+#define _GL_STREQ_H
+
+#include <string.h>
+
+/* STREQ allows to optimize string comparison with a small literal string.
+ STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ is semantically equivalent to
+ strcmp (s, "EUC-KR") == 0
+ just faster. */
+
+/* Help GCC to generate good code for string comparisons with
+ immediate strings. */
+#if defined (__GNUC__) && defined (__OPTIMIZE__)
+
+static inline int
+streq9 (const char *s1, const char *s2)
+{
+ return strcmp (s1 + 9, s2 + 9) == 0;
+}
+
+static inline int
+streq8 (const char *s1, const char *s2, char s28)
+{
+ if (s1[8] == s28)
+ {
+ if (s28 == 0)
+ return 1;
+ else
+ return streq9 (s1, s2);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq7 (const char *s1, const char *s2, char s27, char s28)
+{
+ if (s1[7] == s27)
+ {
+ if (s27 == 0)
+ return 1;
+ else
+ return streq8 (s1, s2, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq6 (const char *s1, const char *s2, char s26, char s27, char s28)
+{
+ if (s1[6] == s26)
+ {
+ if (s26 == 0)
+ return 1;
+ else
+ return streq7 (s1, s2, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28)
+{
+ if (s1[5] == s25)
+ {
+ if (s25 == 0)
+ return 1;
+ else
+ return streq6 (s1, s2, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[4] == s24)
+ {
+ if (s24 == 0)
+ return 1;
+ else
+ return streq5 (s1, s2, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[3] == s23)
+ {
+ if (s23 == 0)
+ return 1;
+ else
+ return streq4 (s1, s2, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[2] == s22)
+ {
+ if (s22 == 0)
+ return 1;
+ else
+ return streq3 (s1, s2, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[1] == s21)
+ {
+ if (s21 == 0)
+ return 1;
+ else
+ return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[0] == s20)
+ {
+ if (s20 == 0)
+ return 1;
+ else
+ return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
+
+#else
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ (strcmp (s1, s2) == 0)
+
+#endif
+
+#endif /* _GL_STREQ_H */
diff --git a/grub-core/gnulib/strerror.c b/grub-core/gnulib/strerror.c
new file mode 100644
index 0000000..46153ab
--- /dev/null
+++ b/grub-core/gnulib/strerror.c
@@ -0,0 +1,350 @@
+/* strerror.c --- POSIX compatible system error routine
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <string.h>
+
+#if REPLACE_STRERROR
+
+# include <errno.h>
+# include <stdio.h>
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+# if HAVE_WINSOCK2_H
+# include <winsock2.h>
+# endif
+# endif
+
+# include "intprops.h"
+
+/* Use the system functions, not the gnulib overrides in this file. */
+# undef sprintf
+
+# undef strerror
+# if ! HAVE_DECL_STRERROR
+# define strerror(n) NULL
+# endif
+
+char *
+rpl_strerror (int n)
+{
+ char const *msg = NULL;
+ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
+ switch (n)
+ {
+# if GNULIB_defined_ETXTBSY
+ case ETXTBSY:
+ msg = "Text file busy";
+ break;
+# endif
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+ /* EWOULDBLOCK is the same as EAGAIN. */
+ case EINPROGRESS:
+ msg = "Operation now in progress";
+ break;
+ case EALREADY:
+ msg = "Operation already in progress";
+ break;
+ case ENOTSOCK:
+ msg = "Socket operation on non-socket";
+ break;
+ case EDESTADDRREQ:
+ msg = "Destination address required";
+ break;
+ case EMSGSIZE:
+ msg = "Message too long";
+ break;
+ case EPROTOTYPE:
+ msg = "Protocol wrong type for socket";
+ break;
+ case ENOPROTOOPT:
+ msg = "Protocol not available";
+ break;
+ case EPROTONOSUPPORT:
+ msg = "Protocol not supported";
+ break;
+ case ESOCKTNOSUPPORT:
+ msg = "Socket type not supported";
+ break;
+ case EOPNOTSUPP:
+ msg = "Operation not supported";
+ break;
+ case EPFNOSUPPORT:
+ msg = "Protocol family not supported";
+ break;
+ case EAFNOSUPPORT:
+ msg = "Address family not supported by protocol";
+ break;
+ case EADDRINUSE:
+ msg = "Address already in use";
+ break;
+ case EADDRNOTAVAIL:
+ msg = "Cannot assign requested address";
+ break;
+ case ENETDOWN:
+ msg = "Network is down";
+ break;
+ case ENETUNREACH:
+ msg = "Network is unreachable";
+ break;
+ case ENETRESET:
+ msg = "Network dropped connection on reset";
+ break;
+ case ECONNABORTED:
+ msg = "Software caused connection abort";
+ break;
+ case ECONNRESET:
+ msg = "Connection reset by peer";
+ break;
+ case ENOBUFS:
+ msg = "No buffer space available";
+ break;
+ case EISCONN:
+ msg = "Transport endpoint is already connected";
+ break;
+ case ENOTCONN:
+ msg = "Transport endpoint is not connected";
+ break;
+ case ESHUTDOWN:
+ msg = "Cannot send after transport endpoint shutdown";
+ break;
+ case ETOOMANYREFS:
+ msg = "Too many references: cannot splice";
+ break;
+ case ETIMEDOUT:
+ msg = "Connection timed out";
+ break;
+ case ECONNREFUSED:
+ msg = "Connection refused";
+ break;
+ case ELOOP:
+ msg = "Too many levels of symbolic links";
+ break;
+ case EHOSTDOWN:
+ msg = "Host is down";
+ break;
+ case EHOSTUNREACH:
+ msg = "No route to host";
+ break;
+ case EPROCLIM:
+ msg = "Too many processes";
+ break;
+ case EUSERS:
+ msg = "Too many users";
+ break;
+ case EDQUOT:
+ msg = "Disk quota exceeded";
+ break;
+ case ESTALE:
+ msg = "Stale NFS file handle";
+ break;
+ case EREMOTE:
+ msg = "Object is remote";
+ break;
+# if HAVE_WINSOCK2_H
+ /* WSA_INVALID_HANDLE maps to EBADF */
+ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+ /* WSA_INVALID_PARAMETER maps to EINVAL */
+ case WSA_OPERATION_ABORTED:
+ msg = "Overlapped operation aborted";
+ break;
+ case WSA_IO_INCOMPLETE:
+ msg = "Overlapped I/O event object not in signaled state";
+ break;
+ case WSA_IO_PENDING:
+ msg = "Overlapped operations will complete later";
+ break;
+ /* WSAEINTR maps to EINTR */
+ /* WSAEBADF maps to EBADF */
+ /* WSAEACCES maps to EACCES */
+ /* WSAEFAULT maps to EFAULT */
+ /* WSAEINVAL maps to EINVAL */
+ /* WSAEMFILE maps to EMFILE */
+ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+ /* WSAEINPROGRESS is EINPROGRESS */
+ /* WSAEALREADY is EALREADY */
+ /* WSAENOTSOCK is ENOTSOCK */
+ /* WSAEDESTADDRREQ is EDESTADDRREQ */
+ /* WSAEMSGSIZE is EMSGSIZE */
+ /* WSAEPROTOTYPE is EPROTOTYPE */
+ /* WSAENOPROTOOPT is ENOPROTOOPT */
+ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
+ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+ /* WSAEOPNOTSUPP is EOPNOTSUPP */
+ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
+ /* WSAEADDRINUSE is EADDRINUSE */
+ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
+ /* WSAENETDOWN is ENETDOWN */
+ /* WSAENETUNREACH is ENETUNREACH */
+ /* WSAENETRESET is ENETRESET */
+ /* WSAECONNABORTED is ECONNABORTED */
+ /* WSAECONNRESET is ECONNRESET */
+ /* WSAENOBUFS is ENOBUFS */
+ /* WSAEISCONN is EISCONN */
+ /* WSAENOTCONN is ENOTCONN */
+ /* WSAESHUTDOWN is ESHUTDOWN */
+ /* WSAETOOMANYREFS is ETOOMANYREFS */
+ /* WSAETIMEDOUT is ETIMEDOUT */
+ /* WSAECONNREFUSED is ECONNREFUSED */
+ /* WSAELOOP is ELOOP */
+ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+ /* WSAEHOSTDOWN is EHOSTDOWN */
+ /* WSAEHOSTUNREACH is EHOSTUNREACH */
+ /* WSAENOTEMPTY maps to ENOTEMPTY */
+ /* WSAEPROCLIM is EPROCLIM */
+ /* WSAEUSERS is EUSERS */
+ /* WSAEDQUOT is EDQUOT */
+ /* WSAESTALE is ESTALE */
+ /* WSAEREMOTE is EREMOTE */
+ case WSASYSNOTREADY:
+ msg = "Network subsystem is unavailable";
+ break;
+ case WSAVERNOTSUPPORTED:
+ msg = "Winsock.dll version out of range";
+ break;
+ case WSANOTINITIALISED:
+ msg = "Successful WSAStartup not yet performed";
+ break;
+ case WSAEDISCON:
+ msg = "Graceful shutdown in progress";
+ break;
+ case WSAENOMORE: case WSA_E_NO_MORE:
+ msg = "No more results";
+ break;
+ case WSAECANCELLED: case WSA_E_CANCELLED:
+ msg = "Call was canceled";
+ break;
+ case WSAEINVALIDPROCTABLE:
+ msg = "Procedure call table is invalid";
+ break;
+ case WSAEINVALIDPROVIDER:
+ msg = "Service provider is invalid";
+ break;
+ case WSAEPROVIDERFAILEDINIT:
+ msg = "Service provider failed to initialize";
+ break;
+ case WSASYSCALLFAILURE:
+ msg = "System call failure";
+ break;
+ case WSASERVICE_NOT_FOUND:
+ msg = "Service not found";
+ break;
+ case WSATYPE_NOT_FOUND:
+ msg = "Class type not found";
+ break;
+ case WSAEREFUSED:
+ msg = "Database query was refused";
+ break;
+ case WSAHOST_NOT_FOUND:
+ msg = "Host not found";
+ break;
+ case WSATRY_AGAIN:
+ msg = "Nonauthoritative host not found";
+ break;
+ case WSANO_RECOVERY:
+ msg = "Nonrecoverable error";
+ break;
+ case WSANO_DATA:
+ msg = "Valid name, no data record of requested type";
+ break;
+ /* WSA_QOS_* omitted */
+# endif
+# endif
+
+# if GNULIB_defined_ENOMSG
+ case ENOMSG:
+ msg = "No message of desired type";
+ break;
+# endif
+
+# if GNULIB_defined_EIDRM
+ case EIDRM:
+ msg = "Identifier removed";
+ break;
+# endif
+
+# if GNULIB_defined_ENOLINK
+ case ENOLINK:
+ msg = "Link has been severed";
+ break;
+# endif
+
+# if GNULIB_defined_EPROTO
+ case EPROTO:
+ msg = "Protocol error";
+ break;
+# endif
+
+# if GNULIB_defined_EMULTIHOP
+ case EMULTIHOP:
+ msg = "Multihop attempted";
+ break;
+# endif
+
+# if GNULIB_defined_EBADMSG
+ case EBADMSG:
+ msg = "Bad message";
+ break;
+# endif
+
+# if GNULIB_defined_EOVERFLOW
+ case EOVERFLOW:
+ msg = "Value too large for defined data type";
+ break;
+# endif
+
+# if GNULIB_defined_ENOTSUP
+ case ENOTSUP:
+ msg = "Not supported";
+ break;
+# endif
+
+# if GNULIB_defined_ESTALE
+ case ESTALE:
+ msg = "Stale NFS file handle";
+ break;
+# endif
+
+# if GNULIB_defined_ECANCELED
+ case ECANCELED:
+ msg = "Operation canceled";
+ break;
+# endif
+ }
+
+ if (msg)
+ return (char *) msg;
+
+ {
+ char *result = strerror (n);
+
+ if (result == NULL || result[0] == '\0')
+ {
+ static char const fmt[] = "Unknown error (%d)";
+ static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
+ sprintf (msg_buf, fmt, n);
+ return msg_buf;
+ }
+
+ return result;
+ }
+}
+
+#endif
diff --git a/grub-core/gnulib/string.in.h b/grub-core/gnulib/string.in.h
new file mode 100644
index 0000000..49c711d
--- /dev/null
+++ b/grub-core/gnulib/string.in.h
@@ -0,0 +1,945 @@
+/* A GNU-like <string.h>.
+
+ Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STRING_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+#ifndef _GL_STRING_H
+#define _GL_STRING_H
+
+/* NetBSD 5.0 mis-defines NULL. */
+#include <stddef.h>
+
+/* MirBSD defines mbslen as a macro. */
+#if @GNULIB_MBSLEN@ && defined __MirBSD__
+# include <wchar.h>
+#endif
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+/* The attribute __pure__ was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) \
+ && ! defined __GLIBC__
+# include <unistd.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Return the first instance of C within N bytes of S, or NULL. */
+#if @GNULIB_MEMCHR@
+# if @REPLACE_MEMCHR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define memchr rpl_memchr
+# endif
+_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
+# else
+# if ! @HAVE_MEMCHR@
+_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C" { const void * std::memchr (const void *, int, size_t); }
+ extern "C++" { void * std::memchr (void *, int, size_t); } */
+_GL_CXXALIAS_SYS_CAST2 (memchr,
+ void *, (void const *__s, int __c, size_t __n),
+ void const *, (void const *__s, int __c, size_t __n));
+# endif
+# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
+_GL_CXXALIASWARN1 (memchr, void const *,
+ (void const *__s, int __c, size_t __n));
+# else
+_GL_CXXALIASWARN (memchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memchr
+/* Assume memchr is always declared. */
+_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
+ "use gnulib module memchr for portability" );
+#endif
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. */
+#if @GNULIB_MEMMEM@
+# if @REPLACE_MEMMEM@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define memmem rpl_memmem
+# endif
+_GL_FUNCDECL_RPL (memmem, void *,
+ (void const *__haystack, size_t __haystack_len,
+ void const *__needle, size_t __needle_len)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (memmem, void *,
+ (void const *__haystack, size_t __haystack_len,
+ void const *__needle, size_t __needle_len));
+# else
+# if ! @HAVE_DECL_MEMMEM@
+_GL_FUNCDECL_SYS (memmem, void *,
+ (void const *__haystack, size_t __haystack_len,
+ void const *__needle, size_t __needle_len)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 3)));
+# endif
+_GL_CXXALIAS_SYS (memmem, void *,
+ (void const *__haystack, size_t __haystack_len,
+ void const *__needle, size_t __needle_len));
+# endif
+_GL_CXXALIASWARN (memmem);
+#elif defined GNULIB_POSIXCHECK
+# undef memmem
+# if HAVE_RAW_DECL_MEMMEM
+_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
+ "use gnulib module memmem-simple for portability, "
+ "and module memmem for speed" );
+# endif
+#endif
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+ last written byte. */
+#if @GNULIB_MEMPCPY@
+# if ! @HAVE_MEMPCPY@
+_GL_FUNCDECL_SYS (mempcpy, void *,
+ (void *restrict __dest, void const *restrict __src,
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (mempcpy, void *,
+ (void *restrict __dest, void const *restrict __src,
+ size_t __n));
+_GL_CXXALIASWARN (mempcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef mempcpy
+# if HAVE_RAW_DECL_MEMPCPY
+_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
+ "use gnulib module mempcpy for portability");
+# endif
+#endif
+
+/* Search backwards through a block for a byte (specified as an int). */
+#if @GNULIB_MEMRCHR@
+# if ! @HAVE_DECL_MEMRCHR@
+_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" { const void * std::memrchr (const void *, int, size_t); }
+ extern "C++" { void * std::memrchr (void *, int, size_t); } */
+_GL_CXXALIAS_SYS_CAST2 (memrchr,
+ void *, (void const *, int, size_t),
+ void const *, (void const *, int, size_t));
+# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
+_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
+# else
+_GL_CXXALIASWARN (memrchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memrchr
+# if HAVE_RAW_DECL_MEMRCHR
+_GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
+ "use gnulib module memrchr for portability");
+# endif
+#endif
+
+/* Find the first occurrence of C in S. More efficient than
+ memchr(S,C,N), at the expense of undefined behavior if C does not
+ occur within N bytes. */
+#if @GNULIB_RAWMEMCHR@
+# if ! @HAVE_RAWMEMCHR@
+_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" { const void * std::rawmemchr (const void *, int); }
+ extern "C++" { void * std::rawmemchr (void *, int); } */
+_GL_CXXALIAS_SYS_CAST2 (rawmemchr,
+ void *, (void const *__s, int __c_in),
+ void const *, (void const *__s, int __c_in));
+# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
+_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
+# else
+_GL_CXXALIASWARN (rawmemchr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rawmemchr
+# if HAVE_RAW_DECL_RAWMEMCHR
+_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
+ "use gnulib module rawmemchr for portability");
+# endif
+#endif
+
+/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
+#if @GNULIB_STPCPY@
+# if ! @HAVE_STPCPY@
+_GL_FUNCDECL_SYS (stpcpy, char *,
+ (char *restrict __dst, char const *restrict __src)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (stpcpy, char *,
+ (char *restrict __dst, char const *restrict __src));
+_GL_CXXALIASWARN (stpcpy);
+#elif defined GNULIB_POSIXCHECK
+# undef stpcpy
+# if HAVE_RAW_DECL_STPCPY
+_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
+ "use gnulib module stpcpy for portability");
+# endif
+#endif
+
+/* Copy no more than N bytes of SRC to DST, returning a pointer past the
+ last non-NUL byte written into DST. */
+#if @GNULIB_STPNCPY@
+# if @REPLACE_STPNCPY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef stpncpy
+# define stpncpy rpl_stpncpy
+# endif
+_GL_FUNCDECL_RPL (stpncpy, char *,
+ (char *restrict __dst, char const *restrict __src,
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (stpncpy, char *,
+ (char *restrict __dst, char const *restrict __src,
+ size_t __n));
+# else
+# if ! @HAVE_STPNCPY@
+_GL_FUNCDECL_SYS (stpncpy, char *,
+ (char *restrict __dst, char const *restrict __src,
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (stpncpy, char *,
+ (char *restrict __dst, char const *restrict __src,
+ size_t __n));
+# endif
+_GL_CXXALIASWARN (stpncpy);
+#elif defined GNULIB_POSIXCHECK
+# undef stpncpy
+# if HAVE_RAW_DECL_STPNCPY
+_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
+ "use gnulib module stpncpy for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strchr() does not work with multibyte strings if the locale encoding is
+ GB18030 and the character to be searched is a digit. */
+# undef strchr
+/* Assume strchr is always declared. */
+_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
+ "in some multibyte locales - "
+ "use mbschr if you care about internationalization");
+#endif
+
+/* Find the first occurrence of C in S or the final NUL byte. */
+#if @GNULIB_STRCHRNUL@
+# if ! @HAVE_STRCHRNUL@
+_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" { const char * std::strchrnul (const char *, int); }
+ extern "C++" { char * std::strchrnul (char *, int); } */
+_GL_CXXALIAS_SYS_CAST2 (strchrnul,
+ char *, (char const *__s, int __c_in),
+ char const *, (char const *__s, int __c_in));
+# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
+_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
+# else
+_GL_CXXALIASWARN (strchrnul);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strchrnul
+# if HAVE_RAW_DECL_STRCHRNUL
+_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
+ "use gnulib module strchrnul for portability");
+# endif
+#endif
+
+/* Duplicate S, returning an identical malloc'd string. */
+#if @GNULIB_STRDUP@
+# if @REPLACE_STRDUP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strdup
+# define strdup rpl_strdup
+# endif
+_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
+# else
+# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
+ /* strdup exists as a function and as a macro. Get rid of the macro. */
+# undef strdup
+# endif
+# if !(@HAVE_DECL_STRDUP@ || defined strdup)
+_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
+# endif
+_GL_CXXALIASWARN (strdup);
+#elif defined GNULIB_POSIXCHECK
+# undef strdup
+# if HAVE_RAW_DECL_STRDUP
+_GL_WARN_ON_USE (strdup, "strdup is unportable - "
+ "use gnulib module strdup for portability");
+# endif
+#endif
+
+/* Append no more than N characters from SRC onto DEST. */
+#if @GNULIB_STRNCAT@
+# if @REPLACE_STRNCAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strncat
+# define strncat rpl_strncat
+# endif
+_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
+# else
+_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
+# endif
+_GL_CXXALIASWARN (strncat);
+#elif defined GNULIB_POSIXCHECK
+# undef strncat
+# if HAVE_RAW_DECL_STRNCAT
+_GL_WARN_ON_USE (strncat, "strncat is unportable - "
+ "use gnulib module strncat for portability");
+# endif
+#endif
+
+/* Return a newly allocated copy of at most N bytes of STRING. */
+#if @GNULIB_STRNDUP@
+# if @REPLACE_STRNDUP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strndup
+# define strndup rpl_strndup
+# endif
+_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
+# else
+# if ! @HAVE_DECL_STRNDUP@
+_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
+# endif
+_GL_CXXALIASWARN (strndup);
+#elif defined GNULIB_POSIXCHECK
+# undef strndup
+# if HAVE_RAW_DECL_STRNDUP
+_GL_WARN_ON_USE (strndup, "strndup is unportable - "
+ "use gnulib module strndup for portability");
+# endif
+#endif
+
+/* Find the length (number of bytes) of STRING, but scan at most
+ MAXLEN bytes. If no '\0' terminator is found in that many bytes,
+ return MAXLEN. */
+#if @GNULIB_STRNLEN@
+# if @REPLACE_STRNLEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strnlen
+# define strnlen rpl_strnlen
+# endif
+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
+# else
+# if ! @HAVE_DECL_STRNLEN@
+_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
+# endif
+_GL_CXXALIASWARN (strnlen);
+#elif defined GNULIB_POSIXCHECK
+# undef strnlen
+# if HAVE_RAW_DECL_STRNLEN
+_GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
+ "use gnulib module strnlen for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strcspn() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it does not work with multibyte strings if the
+ locale encoding is GB18030 and one of the characters to be searched is a
+ digit. */
+# undef strcspn
+/* Assume strcspn is always declared. */
+_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbscspn if you care about internationalization");
+#endif
+
+/* Find the first occurrence in S of any character in ACCEPT. */
+#if @GNULIB_STRPBRK@
+# if ! @HAVE_STRPBRK@
+_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C" { const char * strpbrk (const char *, const char *); }
+ extern "C++" { char * strpbrk (char *, const char *); } */
+_GL_CXXALIAS_SYS_CAST2 (strpbrk,
+ char *, (char const *__s, char const *__accept),
+ const char *, (char const *__s, char const *__accept));
+# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
+_GL_CXXALIASWARN1 (strpbrk, char const *,
+ (char const *__s, char const *__accept));
+# else
+_GL_CXXALIASWARN (strpbrk);
+# endif
+# if defined GNULIB_POSIXCHECK
+/* strpbrk() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it does not work with multibyte strings if the
+ locale encoding is GB18030 and one of the characters to be searched is a
+ digit. */
+# undef strpbrk
+_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbspbrk if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strpbrk
+# if HAVE_RAW_DECL_STRPBRK
+_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
+ "use gnulib module strpbrk for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strspn() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it cannot work with multibyte strings. */
+# undef strspn
+/* Assume strspn is always declared. */
+_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbsspn if you care about internationalization");
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strrchr() does not work with multibyte strings if the locale encoding is
+ GB18030 and the character to be searched is a digit. */
+# undef strrchr
+/* Assume strrchr is always declared. */
+_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
+ "in some multibyte locales - "
+ "use mbsrchr if you care about internationalization");
+#endif
+
+/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
+ If one is found, overwrite it with a NUL, and advance *STRINGP
+ to point to the next char after it. Otherwise, set *STRINGP to NULL.
+ If *STRINGP was already NULL, nothing happens.
+ Return the old value of *STRINGP.
+
+ This is a variant of strtok() that is multithread-safe and supports
+ empty fields.
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+ Caveat: It doesn't work with multibyte strings unless all of the delimiter
+ characters are ASCII characters < 0x30.
+
+ See also strtok_r(). */
+#if @GNULIB_STRSEP@
+# if ! @HAVE_STRSEP@
+_GL_FUNCDECL_SYS (strsep, char *,
+ (char **restrict __stringp, char const *restrict __delim)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (strsep, char *,
+ (char **restrict __stringp, char const *restrict __delim));
+_GL_CXXALIASWARN (strsep);
+# if defined GNULIB_POSIXCHECK
+# undef strsep
+_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbssep if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strsep
+# if HAVE_RAW_DECL_STRSEP
+_GL_WARN_ON_USE (strsep, "strsep is unportable - "
+ "use gnulib module strsep for portability");
+# endif
+#endif
+
+#if @GNULIB_STRSTR@
+# if @REPLACE_STRSTR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strstr rpl_strstr
+# endif
+_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
+# else
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" { const char * strstr (const char *, const char *); }
+ extern "C++" { char * strstr (char *, const char *); } */
+_GL_CXXALIAS_SYS_CAST2 (strstr,
+ char *, (const char *haystack, const char *needle),
+ const char *, (const char *haystack, const char *needle));
+# endif
+# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
+_GL_CXXALIASWARN1 (strstr, const char *,
+ (const char *haystack, const char *needle));
+# else
+_GL_CXXALIASWARN (strstr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strstr() does not work with multibyte strings if the locale encoding is
+ different from UTF-8:
+ POSIX says that it operates on "strings", and "string" in POSIX is defined
+ as a sequence of bytes, not of characters. */
+# undef strstr
+/* Assume strstr is always declared. */
+_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
+ "work correctly on character strings in most "
+ "multibyte locales - "
+ "use mbsstr if you care about internationalization, "
+ "or use strstr if you care about speed");
+#endif
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+ comparison. */
+#if @GNULIB_STRCASESTR@
+# if @REPLACE_STRCASESTR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strcasestr rpl_strcasestr
+# endif
+_GL_FUNCDECL_RPL (strcasestr, char *,
+ (const char *haystack, const char *needle)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strcasestr, char *,
+ (const char *haystack, const char *needle));
+# else
+# if ! @HAVE_STRCASESTR@
+_GL_FUNCDECL_SYS (strcasestr, char *,
+ (const char *haystack, const char *needle)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" { const char * strcasestr (const char *, const char *); }
+ extern "C++" { char * strcasestr (char *, const char *); } */
+_GL_CXXALIAS_SYS_CAST2 (strcasestr,
+ char *, (const char *haystack, const char *needle),
+ const char *, (const char *haystack, const char *needle));
+# endif
+# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 10 \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
+_GL_CXXALIASWARN1 (strcasestr, const char *,
+ (const char *haystack, const char *needle));
+# else
+_GL_CXXALIASWARN (strcasestr);
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strcasestr() does not work with multibyte strings:
+ It is a glibc extension, and glibc implements it only for unibyte
+ locales. */
+# undef strcasestr
+# if HAVE_RAW_DECL_STRCASESTR
+_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
+ "strings in multibyte locales - "
+ "use mbscasestr if you care about "
+ "internationalization, or use c-strcasestr if you want "
+ "a locale independent function");
+# endif
+#endif
+
+/* Parse S into tokens separated by characters in DELIM.
+ If S is NULL, the saved pointer in SAVE_PTR is used as
+ the next starting point. For example:
+ char s[] = "-abc-=-def";
+ char *sp;
+ x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
+ x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
+ x = strtok_r(NULL, "=", &sp); // x = NULL
+ // s = "abc\0-def\0"
+
+ This is a variant of strtok() that is multithread-safe.
+
+ For the POSIX documentation for this function, see:
+ http://www.opengroup.org/susv3xsh/strtok.html
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+ Caveat: It doesn't work with multibyte strings unless all of the delimiter
+ characters are ASCII characters < 0x30.
+
+ See also strsep(). */
+#if @GNULIB_STRTOK_R@
+# if @REPLACE_STRTOK_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strtok_r
+# define strtok_r rpl_strtok_r
+# endif
+_GL_FUNCDECL_RPL (strtok_r, char *,
+ (char *restrict s, char const *restrict delim,
+ char **restrict save_ptr)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (strtok_r, char *,
+ (char *restrict s, char const *restrict delim,
+ char **restrict save_ptr));
+# else
+# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
+# undef strtok_r
+# endif
+# if ! @HAVE_DECL_STRTOK_R@
+_GL_FUNCDECL_SYS (strtok_r, char *,
+ (char *restrict s, char const *restrict delim,
+ char **restrict save_ptr)
+ _GL_ARG_NONNULL ((2, 3)));
+# endif
+_GL_CXXALIAS_SYS (strtok_r, char *,
+ (char *restrict s, char const *restrict delim,
+ char **restrict save_ptr));
+# endif
+_GL_CXXALIASWARN (strtok_r);
+# if defined GNULIB_POSIXCHECK
+_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
+ "strings in multibyte locales - "
+ "use mbstok_r if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtok_r
+# if HAVE_RAW_DECL_STRTOK_R
+_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
+ "use gnulib module strtok_r for portability");
+# endif
+#endif
+
+
+/* The following functions are not specified by POSIX. They are gnulib
+ extensions. */
+
+#if @GNULIB_MBSLEN@
+/* Return the number of multibyte characters in the character string STRING.
+ This considers multibyte characters, unlike strlen, which counts bytes. */
+# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */
+# undef mbslen
+# endif
+# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mbslen rpl_mbslen
+# endif
+_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
+# else
+_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
+# endif
+_GL_CXXALIASWARN (mbslen);
+#endif
+
+#if @GNULIB_MBSNLEN@
+/* Return the number of multibyte characters in the character string starting
+ at STRING and ending at STRING + LEN. */
+_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
+ _GL_ARG_NONNULL ((1));
+#endif
+
+#if @GNULIB_MBSCHR@
+/* Locate the first single-byte character C in the character string STRING,
+ and return a pointer to it. Return NULL if C is not found in STRING.
+ Unlike strchr(), this function works correctly in multibyte locales with
+ encodings such as GB18030. */
+# if defined __hpux
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
+# endif
+_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
+# else
+_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
+# endif
+_GL_CXXALIASWARN (mbschr);
+#endif
+
+#if @GNULIB_MBSRCHR@
+/* Locate the last single-byte character C in the character string STRING,
+ and return a pointer to it. Return NULL if C is not found in STRING.
+ Unlike strrchr(), this function works correctly in multibyte locales with
+ encodings such as GB18030. */
+# if defined __hpux
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+# endif
+_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
+# else
+_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
+# endif
+_GL_CXXALIASWARN (mbsrchr);
+#endif
+
+#if @GNULIB_MBSSTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+ string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
+ Unlike strstr(), this function works correctly in multibyte locales with
+ encodings different from UTF-8. */
+_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCASECMP@
+/* Compare the character strings S1 and S2, ignoring case, returning less than,
+ equal to or greater than zero if S1 is lexicographically less than, equal to
+ or greater than S2.
+ Note: This function may, in multibyte locales, return 0 for strings of
+ different lengths!
+ Unlike strcasecmp(), this function works correctly in multibyte locales. */
+_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSNCASECMP@
+/* Compare the initial segment of the character string S1 consisting of at most
+ N characters with the initial segment of the character string S2 consisting
+ of at most N characters, ignoring case, returning less than, equal to or
+ greater than zero if the initial segment of S1 is lexicographically less
+ than, equal to or greater than the initial segment of S2.
+ Note: This function may, in multibyte locales, return 0 for initial segments
+ of different lengths!
+ Unlike strncasecmp(), this function works correctly in multibyte locales.
+ But beware that N is not a byte count but a character count! */
+_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSPCASECMP@
+/* Compare the initial segment of the character string STRING consisting of
+ at most mbslen (PREFIX) characters with the character string PREFIX,
+ ignoring case. If the two match, return a pointer to the first byte
+ after this prefix in STRING. Otherwise, return NULL.
+ Note: This function may, in multibyte locales, return non-NULL if STRING
+ is of smaller length than PREFIX!
+ Unlike strncasecmp(), this function works correctly in multibyte
+ locales. */
+_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCASESTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+ string HAYSTACK, using case-insensitive comparison.
+ Note: This function may, in multibyte locales, return success even if
+ strlen (haystack) < strlen (needle) !
+ Unlike strcasestr(), this function works correctly in multibyte locales. */
+_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCSPN@
+/* Find the first occurrence in the character string STRING of any character
+ in the character string ACCEPT. Return the number of bytes from the
+ beginning of the string to this occurrence, or to the end of the string
+ if none exists.
+ Unlike strcspn(), this function works correctly in multibyte locales. */
+_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSPBRK@
+/* Find the first occurrence in the character string STRING of any character
+ in the character string ACCEPT. Return the pointer to it, or NULL if none
+ exists.
+ Unlike strpbrk(), this function works correctly in multibyte locales. */
+# if defined __hpux
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
+# endif
+_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
+# else
+_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
+# endif
+_GL_CXXALIASWARN (mbspbrk);
+#endif
+
+#if @GNULIB_MBSSPN@
+/* Find the first occurrence in the character string STRING of any character
+ not in the character string REJECT. Return the number of bytes from the
+ beginning of the string to this occurrence, or to the end of the string
+ if none exists.
+ Unlike strspn(), this function works correctly in multibyte locales. */
+_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSSEP@
+/* Search the next delimiter (multibyte character listed in the character
+ string DELIM) starting at the character string *STRINGP.
+ If one is found, overwrite it with a NUL, and advance *STRINGP to point
+ to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
+ If *STRINGP was already NULL, nothing happens.
+ Return the old value of *STRINGP.
+
+ This is a variant of mbstok_r() that supports empty fields.
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+
+ See also mbstok_r(). */
+_GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSTOK_R@
+/* Parse the character string STRING into tokens separated by characters in
+ the character string DELIM.
+ If STRING is NULL, the saved pointer in SAVE_PTR is used as
+ the next starting point. For example:
+ char s[] = "-abc-=-def";
+ char *sp;
+ x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
+ x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
+ x = mbstok_r(NULL, "=", &sp); // x = NULL
+ // s = "abc\0-def\0"
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+
+ See also mbssep(). */
+_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
+ _GL_ARG_NONNULL ((2, 3));
+#endif
+
+/* Map any int, typically from errno, into an error message. */
+#if @GNULIB_STRERROR@
+# if @REPLACE_STRERROR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strerror
+# define strerror rpl_strerror
+# endif
+_GL_FUNCDECL_RPL (strerror, char *, (int));
+_GL_CXXALIAS_RPL (strerror, char *, (int));
+# else
+_GL_CXXALIAS_SYS (strerror, char *, (int));
+# endif
+_GL_CXXALIASWARN (strerror);
+#elif defined GNULIB_POSIXCHECK
+# undef strerror
+/* Assume strerror is always declared. */
+_GL_WARN_ON_USE (strerror, "strerror is unportable - "
+ "use gnulib module strerror to guarantee non-NULL result");
+#endif
+
+#if @GNULIB_STRSIGNAL@
+# if @REPLACE_STRSIGNAL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strsignal rpl_strsignal
+# endif
+_GL_FUNCDECL_RPL (strsignal, char *, (int __sig));
+_GL_CXXALIAS_RPL (strsignal, char *, (int __sig));
+# else
+# if ! @HAVE_DECL_STRSIGNAL@
+_GL_FUNCDECL_SYS (strsignal, char *, (int __sig));
+# endif
+/* Need to cast, because on Cygwin 1.5.x systems, the return type is
+ 'const char *'. */
+_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig));
+# endif
+_GL_CXXALIASWARN (strsignal);
+#elif defined GNULIB_POSIXCHECK
+# undef strsignal
+# if HAVE_RAW_DECL_STRSIGNAL
+_GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
+ "use gnulib module strsignal for portability");
+# endif
+#endif
+
+#if @GNULIB_STRVERSCMP@
+# if !@HAVE_STRVERSCMP@
+_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
+_GL_CXXALIASWARN (strverscmp);
+#elif defined GNULIB_POSIXCHECK
+# undef strverscmp
+# if HAVE_RAW_DECL_STRVERSCMP
+_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
+ "use gnulib module strverscmp for portability");
+# endif
+#endif
+
+
+#endif /* _GL_STRING_H */
+#endif /* _GL_STRING_H */
diff --git a/grub-core/gnulib/strings.in.h b/grub-core/gnulib/strings.in.h
new file mode 100644
index 0000000..c726a16
--- /dev/null
+++ b/grub-core/gnulib/strings.in.h
@@ -0,0 +1,93 @@
+/* A substitute <strings.h>.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STRINGS_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STRINGS_H@
+
+#ifndef _GL_STRINGS_H
+#define _GL_STRINGS_H
+
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+ greater than zero if S1 is lexicographically less than, equal to or greater
+ than S2.
+ Note: This function does not work in multibyte locales. */
+#if ! @HAVE_STRCASECMP@
+extern int strcasecmp (char const *s1, char const *s2)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+#if defined GNULIB_POSIXCHECK
+/* strcasecmp() does not work with multibyte strings:
+ POSIX says that it operates on "strings", and "string" in POSIX is defined
+ as a sequence of bytes, not of characters. */
+# undef strcasecmp
+# if HAVE_RAW_DECL_STRCASECMP
+_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character "
+ "strings in multibyte locales - "
+ "use mbscasecmp if you care about "
+ "internationalization, or use c_strcasecmp , "
+ "gnulib module c-strcase) if you want a locale "
+ "independent function");
+# endif
+#endif
+
+/* Compare no more than N bytes of strings S1 and S2, ignoring case,
+ returning less than, equal to or greater than zero if S1 is
+ lexicographically less than, equal to or greater than S2.
+ Note: This function cannot work correctly in multibyte locales. */
+#if ! @HAVE_DECL_STRNCASECMP@
+extern int strncasecmp (char const *s1, char const *s2, size_t n)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+#if defined GNULIB_POSIXCHECK
+/* strncasecmp() does not work with multibyte strings:
+ POSIX says that it operates on "strings", and "string" in POSIX is defined
+ as a sequence of bytes, not of characters. */
+# undef strncasecmp
+# if HAVE_RAW_DECL_STRNCASECMP
+_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character "
+ "strings in multibyte locales - "
+ "use mbsncasecmp or mbspcasecmp if you care about "
+ "internationalization, or use c_strncasecmp , "
+ "gnulib module c-strcase) if you want a locale "
+ "independent function");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STRING_H */
+#endif /* _GL_STRING_H */
diff --git a/grub-core/gnulib/stripslash.c b/grub-core/gnulib/stripslash.c
new file mode 100644
index 0000000..3a5996f
--- /dev/null
+++ b/grub-core/gnulib/stripslash.c
@@ -0,0 +1,45 @@
+/* stripslash.c -- remove redundant trailing slashes from a file name
+
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2010 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+/* Remove trailing slashes from FILE. Return true if a trailing slash
+ was removed. This is useful when using file name completion from a
+ shell that adds a "/" after directory names (such as tcsh and
+ bash), because on symlinks to directories, several system calls
+ have different semantics according to whether a trailing slash is
+ present. */
+
+bool
+strip_trailing_slashes (char *file)
+{
+ char *base = last_component (file);
+ char *base_lim;
+ bool had_slash;
+
+ /* last_component returns "" for file system roots, but we need to turn
+ `///' into `/'. */
+ if (! *base)
+ base = file;
+ base_lim = base + base_len (base);
+ had_slash = (*base_lim != '\0');
+ *base_lim = '\0';
+ return had_slash;
+}
diff --git a/grub-core/gnulib/strncasecmp.c b/grub-core/gnulib/strncasecmp.c
new file mode 100644
index 0000000..8c806a6
--- /dev/null
+++ b/grub-core/gnulib/strncasecmp.c
@@ -0,0 +1,63 @@
+/* strncasecmp.c -- case insensitive string comparator
+ Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+#include <ctype.h>
+#include <limits.h>
+
+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+
+/* Compare no more than N bytes of strings S1 and S2, ignoring case,
+ returning less than, equal to or greater than zero if S1 is
+ lexicographically less than, equal to or greater than S2.
+ Note: This function cannot work correctly in multibyte locales. */
+
+int
+strncasecmp (const char *s1, const char *s2, size_t n)
+{
+ register const unsigned char *p1 = (const unsigned char *) s1;
+ register const unsigned char *p2 = (const unsigned char *) s2;
+ unsigned char c1, c2;
+
+ if (p1 == p2 || n == 0)
+ return 0;
+
+ do
+ {
+ c1 = TOLOWER (*p1);
+ c2 = TOLOWER (*p2);
+
+ if (--n == 0 || c1 == '\0')
+ break;
+
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ if (UCHAR_MAX <= INT_MAX)
+ return c1 - c2;
+ else
+ /* On machines where 'char' and 'int' are types of the same size, the
+ difference of two 'unsigned char' values - including the sign bit -
+ doesn't fit in an 'int'. */
+ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/grub-core/gnulib/strndup.c b/grub-core/gnulib/strndup.c
new file mode 100644
index 0000000..3de3dbc
--- /dev/null
+++ b/grub-core/gnulib/strndup.c
@@ -0,0 +1,37 @@
+/* A replacement function, for systems that lack strndup.
+
+ Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007, 2009,
+ 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <stdlib.h>
+
+char *
+strndup (char const *s, size_t n)
+{
+ size_t len = strnlen (s, n);
+ char *new = malloc (len + 1);
+
+ if (new == NULL)
+ return NULL;
+
+ new[len] = '\0';
+ return memcpy (new, s, len);
+}
diff --git a/grub-core/gnulib/strnlen.c b/grub-core/gnulib/strnlen.c
new file mode 100644
index 0000000..f1ec356
--- /dev/null
+++ b/grub-core/gnulib/strnlen.c
@@ -0,0 +1,31 @@
+/* Find the length of STRING, but scan at most MAXLEN characters.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include <string.h>
+
+/* Find the length of STRING, but scan at most MAXLEN characters.
+ If no '\0' terminator is found in that many characters, return MAXLEN. */
+
+size_t
+strnlen (const char *string, size_t maxlen)
+{
+ const char *end = memchr (string, '\0', maxlen);
+ return end ? (size_t) (end - string) : maxlen;
+}
diff --git a/grub-core/gnulib/strnlen1.c b/grub-core/gnulib/strnlen1.c
new file mode 100644
index 0000000..b8cd2bf
--- /dev/null
+++ b/grub-core/gnulib/strnlen1.c
@@ -0,0 +1,35 @@
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "strnlen1.h"
+
+#include <string.h>
+
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ If no '\0' terminator is found in that many characters, return MAXLEN. */
+/* This is the same as strnlen (string, maxlen - 1) + 1. */
+size_t
+strnlen1 (const char *string, size_t maxlen)
+{
+ const char *end = (const char *) memchr (string, '\0', maxlen);
+ if (end != NULL)
+ return end - string + 1;
+ else
+ return maxlen;
+}
diff --git a/grub-core/gnulib/strnlen1.h b/grub-core/gnulib/strnlen1.h
new file mode 100644
index 0000000..dfaf62d
--- /dev/null
+++ b/grub-core/gnulib/strnlen1.h
@@ -0,0 +1,39 @@
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _STRNLEN1_H
+#define _STRNLEN1_H
+
+#include <stddef.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ If no '\0' terminator is found in that many characters, return MAXLEN. */
+/* This is the same as strnlen (string, maxlen - 1) + 1. */
+extern size_t strnlen1 (const char *string, size_t maxlen);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _STRNLEN1_H */
diff --git a/grub-core/gnulib/sys_wait.in.h b/grub-core/gnulib/sys_wait.in.h
new file mode 100644
index 0000000..009fa21
--- /dev/null
+++ b/grub-core/gnulib/sys_wait.in.h
@@ -0,0 +1,106 @@
+/* A POSIX-like <sys/wait.h>.
+ Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+
+#ifndef _GL_SYS_WAIT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@
+#endif
+
+#ifndef _GL_SYS_WAIT_H
+#define _GL_SYS_WAIT_H
+
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+/* Unix API. */
+
+/* The following macros apply to an argument x, that is a status of a process,
+ as returned by waitpid().
+ On nearly all systems, including Linux/x86, WEXITSTATUS are bits 15..8 and
+ WTERMSIG are bits 7..0, while BeOS uses the opposite. Therefore programs
+ have to use the abstract macros. */
+
+/* For valid x, exactly one of WIFSIGNALED(x), WIFEXITED(x), WIFSTOPPED(x)
+ is true. */
+# ifndef WIFSIGNALED
+# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f)
+# endif
+# ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+# endif
+# ifndef WIFSTOPPED
+# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f)
+# endif
+
+/* The termination signal. Only to be accessed if WIFSIGNALED(x) is true. */
+# ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+# endif
+
+/* The exit status. Only to be accessed if WIFEXITED(x) is true. */
+# ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+# endif
+
+/* True if the process dumped core. Not standardized by POSIX. */
+# ifndef WCOREDUMP
+# define WCOREDUMP(x) ((x) & 0x80)
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* Declarations of functions. */
+
+# ifdef __cplusplus
+}
+# endif
+
+#else
+/* Native Windows API. */
+
+# include <process.h>
+
+# define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
+
+/* The following macros apply to an argument x, that is a status of a process,
+ as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess().
+ This value is simply an 'int', not composed of bit fields. */
+
+/* When an unhandled fatal signal terminates a process, the exit code is 3. */
+# define WIFSIGNALED(x) ((x) == 3)
+# define WIFEXITED(x) ((x) != 3)
+# define WIFSTOPPED(x) 0
+
+/* The signal that terminated a process is not known posthum. */
+# define WTERMSIG(x) SIGTERM
+
+# define WEXITSTATUS(x) (x)
+
+/* There are no core dumps. */
+# define WCOREDUMP(x) 0
+
+#endif
+
+#endif /* _GL_SYS_WAIT_H */
+#endif /* _GL_SYS_WAIT_H */
diff --git a/grub-core/gnulib/sysexits.in.h b/grub-core/gnulib/sysexits.in.h
new file mode 100644
index 0000000..45255df
--- /dev/null
+++ b/grub-core/gnulib/sysexits.in.h
@@ -0,0 +1,71 @@
+/* exit() exit codes for some BSD system programs.
+ Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson based on sysexits(3) man page */
+
+#ifndef _GL_SYSEXITS_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if @HAVE_SYSEXITS_H@
+
+/* IRIX 6.5 has an <unistd.h> that defines a macro EX_OK with a nonzero
+ value. Override it. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-03/msg00361.html> */
+# ifdef __sgi
+# include <unistd.h>
+# undef EX_OK
+# endif
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_SYSEXITS_H@
+
+/* HP-UX 11 <sysexits.h> ends at EX_NOPERM. */
+# ifndef EX_CONFIG
+# define EX_CONFIG 78
+# endif
+
+#endif
+
+#ifndef _GL_SYSEXITS_H
+#define _GL_SYSEXITS_H
+
+#if !@HAVE_SYSEXITS_H@
+
+# define EX_OK 0 /* same value as EXIT_SUCCESS */
+
+# define EX_USAGE 64
+# define EX_DATAERR 65
+# define EX_NOINPUT 66
+# define EX_NOUSER 67
+# define EX_NOHOST 68
+# define EX_UNAVAILABLE 69
+# define EX_SOFTWARE 70
+# define EX_OSERR 71
+# define EX_OSFILE 72
+# define EX_CANTCREAT 73
+# define EX_IOERR 74
+# define EX_TEMPFAIL 75
+# define EX_PROTOCOL 76
+# define EX_NOPERM 77
+# define EX_CONFIG 78
+
+#endif
+
+#endif /* _GL_SYSEXITS_H */
+#endif /* _GL_SYSEXITS_H */
diff --git a/grub-core/gnulib/unistd.in.h b/grub-core/gnulib/unistd.in.h
new file mode 100644
index 0000000..26a4cbd
--- /dev/null
+++ b/grub-core/gnulib/unistd.in.h
@@ -0,0 +1,1326 @@
+/* Substitute for and wrapper around <unistd.h>.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* Special invocation convention:
+ - On mingw, several headers, including <winsock2.h>, include <unistd.h>,
+ but we need to ensure that both the system <unistd.h> and <winsock2.h>
+ are completely included before we replace gethostname. */
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+ && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
+/* <unistd.h> is being indirectly included for the first time from
+ <winsock2.h>; avoid declaring any overrides. */
+# if @HAVE_UNISTD_H@
+# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+# else
+# error unexpected; report this to bug-gnulib@gnu.org
+# endif
+# define _GL_WINSOCK2_H_WITNESS
+
+/* Normal invocation. */
+#elif !defined _GL_UNISTD_H
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_UNISTD_H@
+# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+#endif
+
+/* Get all possible declarations of gethostname(). */
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+ && !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+#endif
+
+#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
+#define _GL_UNISTD_H
+
+/* NetBSD 5.0 mis-defines NULL. Also get size_t. */
+#include <stddef.h>
+
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
+/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
+ || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \
+ && ! defined __GLIBC__
+# include <stdio.h>
+#endif
+
+/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+# include <fcntl.h>
+#endif
+
+/* mingw fails to declare _exit in <unistd.h>. */
+/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stdlib.h>
+#endif
+
+/* mingw declares getcwd in <io.h>, not in <unistd.h>. */
+#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# include <io.h>
+#endif
+
+#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
+ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
+/* Get ssize_t. */
+# include <sys/types.h>
+#endif
+
+/* Get getopt(), optarg, optind, opterr, optopt.
+ But avoid namespace pollution on glibc systems. */
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
+# include <getopt.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+#if @GNULIB_GETHOSTNAME@
+/* Get all possible declarations of gethostname(). */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+# if !defined _GL_SYS_SOCKET_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef socket
+# define socket socket_used_without_including_sys_socket_h
+# undef connect
+# define connect connect_used_without_including_sys_socket_h
+# undef accept
+# define accept accept_used_without_including_sys_socket_h
+# undef bind
+# define bind bind_used_without_including_sys_socket_h
+# undef getpeername
+# define getpeername getpeername_used_without_including_sys_socket_h
+# undef getsockname
+# define getsockname getsockname_used_without_including_sys_socket_h
+# undef getsockopt
+# define getsockopt getsockopt_used_without_including_sys_socket_h
+# undef listen
+# define listen listen_used_without_including_sys_socket_h
+# undef recv
+# define recv recv_used_without_including_sys_socket_h
+# undef send
+# define send send_used_without_including_sys_socket_h
+# undef recvfrom
+# define recvfrom recvfrom_used_without_including_sys_socket_h
+# undef sendto
+# define sendto sendto_used_without_including_sys_socket_h
+# undef setsockopt
+# define setsockopt setsockopt_used_without_including_sys_socket_h
+# undef shutdown
+# define shutdown shutdown_used_without_including_sys_socket_h
+# else
+ _GL_WARN_ON_USE (socket,
+ "socket() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (connect,
+ "connect() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (accept,
+ "accept() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (bind,
+ "bind() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getpeername,
+ "getpeername() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockname,
+ "getsockname() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockopt,
+ "getsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (listen,
+ "listen() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recv,
+ "recv() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (send,
+ "send() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recvfrom,
+ "recvfrom() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (sendto,
+ "sendto() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (setsockopt,
+ "setsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (shutdown,
+ "shutdown() used without including <sys/socket.h>");
+# endif
+# endif
+# if !defined _GL_SYS_SELECT_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select select_used_without_including_sys_select_h
+# else
+ _GL_WARN_ON_USE (select,
+ "select() used without including <sys/select.h>");
+# endif
+# endif
+# endif
+#endif
+
+
+/* OS/2 EMX lacks these macros. */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+/* Ensure *_OK macros exist. */
+#ifndef F_OK
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+#endif
+
+
+/* Declare overridden functions. */
+
+
+#if defined GNULIB_POSIXCHECK
+/* The access() function is a security risk. */
+_GL_WARN_ON_USE (access, "the access function is a security risk - "
+ "use the gnulib module faccessat instead");
+#endif
+
+
+#if @GNULIB_CHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+ to GID (if GID is not -1). Follow symbolic links.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/chown.html>. */
+# if @REPLACE_CHOWN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef chown
+# define chown rpl_chown
+# endif
+_GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid));
+# else
+# if !@HAVE_CHOWN@
+_GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid));
+# endif
+_GL_CXXALIASWARN (chown);
+#elif defined GNULIB_POSIXCHECK
+# undef chown
+# if HAVE_RAW_DECL_CHOWN
+_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
+ "doesn't treat a uid or gid of -1 on some systems - "
+ "use gnulib module chown for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CLOSE@
+# if @REPLACE_CLOSE@
+/* Automatically included by modules that need a replacement for close. */
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef close
+# define close rpl_close
+# endif
+_GL_FUNCDECL_RPL (close, int, (int fd));
+_GL_CXXALIAS_RPL (close, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (close, int, (int fd));
+# endif
+_GL_CXXALIASWARN (close);
+#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+# undef close
+# define close close_used_without_requesting_gnulib_module_close
+#elif defined GNULIB_POSIXCHECK
+# undef close
+/* Assume close is always declared. */
+_GL_WARN_ON_USE (close, "close does not portably work on sockets - "
+ "use gnulib module close for portability");
+#endif
+
+
+#if @REPLACE_DUP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define dup rpl_dup
+# endif
+_GL_FUNCDECL_RPL (dup, int, (int oldfd));
+_GL_CXXALIAS_RPL (dup, int, (int oldfd));
+#else
+_GL_CXXALIAS_SYS (dup, int, (int oldfd));
+#endif
+_GL_CXXALIASWARN (dup);
+
+
+#if @GNULIB_DUP2@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
+ NEWFD = OLDFD, otherwise close NEWFD first if it is open.
+ Return newfd if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/dup2.html>. */
+# if @REPLACE_DUP2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define dup2 rpl_dup2
+# endif
+_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
+_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
+# else
+# if !@HAVE_DUP2@
+_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd));
+# endif
+_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
+# endif
+_GL_CXXALIASWARN (dup2);
+#elif defined GNULIB_POSIXCHECK
+# undef dup2
+# if HAVE_RAW_DECL_DUP2
+_GL_WARN_ON_USE (dup2, "dup2 is unportable - "
+ "use gnulib module dup2 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_DUP3@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the
+ specified flags.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ Close NEWFD first if it is open.
+ Return newfd if successful, otherwise -1 and errno set.
+ See the Linux man page at
+ <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */
+# if @HAVE_DUP3@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define dup3 rpl_dup3
+# endif
+_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
+_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
+# else
+_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
+_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
+# endif
+_GL_CXXALIASWARN (dup3);
+#elif defined GNULIB_POSIXCHECK
+# undef dup3
+# if HAVE_RAW_DECL_DUP3
+_GL_WARN_ON_USE (dup3, "dup3 is unportable - "
+ "use gnulib module dup3 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ENVIRON@
+# if !@HAVE_DECL_ENVIRON@
+/* Set of environment variables and values. An array of strings of the form
+ "VARIABLE=VALUE", terminated with a NULL. */
+# if defined __APPLE__ && defined __MACH__
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron ())
+# else
+# ifdef __cplusplus
+extern "C" {
+# endif
+extern char **environ;
+# ifdef __cplusplus
+}
+# endif
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if HAVE_RAW_DECL_ENVIRON
+static inline char ***
+rpl_environ (void)
+{
+ return &environ;
+}
+_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
+ "use gnulib module environ for portability");
+# undef environ
+# define environ (*rpl_environ ())
+# endif
+#endif
+
+
+#if @GNULIB_EUIDACCESS@
+/* Like access(), except that it uses the effective user id and group id of
+ the current process. */
+# if !@HAVE_EUIDACCESS@
+_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode));
+_GL_CXXALIASWARN (euidaccess);
+# if defined GNULIB_POSIXCHECK
+/* Like access(), this function is a security risk. */
+_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - "
+ "use the gnulib module faccessat instead");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef euidaccess
+# if HAVE_RAW_DECL_EUIDACCESS
+_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
+ "use gnulib module euidaccess for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FACCESSAT@
+# if !@HAVE_FACCESSAT@
+_GL_FUNCDECL_SYS (faccessat, int,
+ (int fd, char const *file, int mode, int flag)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (faccessat, int,
+ (int fd, char const *file, int mode, int flag));
+_GL_CXXALIASWARN (faccessat);
+#elif defined GNULIB_POSIXCHECK
+# undef faccessat
+# if HAVE_RAW_DECL_FACCESSAT
+_GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
+ "use gnulib module faccessat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FCHDIR@
+/* Change the process' current working directory to the directory on which
+ the given file descriptor is open.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fchdir.html>. */
+# if ! @HAVE_FCHDIR@
+_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
+
+/* Gnulib internal hooks needed to maintain the fchdir metadata. */
+_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
+ _GL_ARG_NONNULL ((2));
+_GL_EXTERN_C void _gl_unregister_fd (int fd);
+_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
+_GL_EXTERN_C const char *_gl_directory_name (int fd);
+
+# endif
+_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
+_GL_CXXALIASWARN (fchdir);
+#elif defined GNULIB_POSIXCHECK
+# undef fchdir
+# if HAVE_RAW_DECL_FCHDIR
+_GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
+ "use gnulib module fchdir for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FCHOWNAT@
+# if @REPLACE_FCHOWNAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fchownat
+# define fchownat rpl_fchownat
+# endif
+_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file,
+ uid_t owner, gid_t group, int flag)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file,
+ uid_t owner, gid_t group, int flag));
+# else
+# if !@HAVE_FCHOWNAT@
+_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file,
+ uid_t owner, gid_t group, int flag)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file,
+ uid_t owner, gid_t group, int flag));
+# endif
+_GL_CXXALIASWARN (fchownat);
+#elif defined GNULIB_POSIXCHECK
+# undef fchownat
+# if HAVE_RAW_DECL_FCHOWNAT
+_GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FSYNC@
+/* Synchronize changes to a file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fsync.html>. */
+# if !@HAVE_FSYNC@
+_GL_FUNCDECL_SYS (fsync, int, (int fd));
+# endif
+_GL_CXXALIAS_SYS (fsync, int, (int fd));
+_GL_CXXALIASWARN (fsync);
+#elif defined GNULIB_POSIXCHECK
+# undef fsync
+# if HAVE_RAW_DECL_FSYNC
+_GL_WARN_ON_USE (fsync, "fsync is unportable - "
+ "use gnulib module fsync for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FTRUNCATE@
+/* Change the size of the file to which FD is opened to become equal to LENGTH.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/ftruncate.html>. */
+# if !@HAVE_FTRUNCATE@
+_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
+# endif
+_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
+_GL_CXXALIASWARN (ftruncate);
+#elif defined GNULIB_POSIXCHECK
+# undef ftruncate
+# if HAVE_RAW_DECL_FTRUNCATE
+_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
+ "use gnulib module ftruncate for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETCWD@
+/* Get the name of the current working directory, and put it in SIZE bytes
+ of BUF.
+ Return BUF if successful, or NULL if the directory couldn't be determined
+ or SIZE was too small.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/getcwd.html>.
+ Additionally, the gnulib module 'getcwd' guarantees the following GNU
+ extension: If BUF is NULL, an array is allocated with 'malloc'; the array
+ is SIZE bytes long, unless SIZE == 0, in which case it is as big as
+ necessary. */
+# if @REPLACE_GETCWD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define getcwd rpl_getcwd
+# endif
+_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
+_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
+# else
+/* Need to cast, because on mingw, the second parameter is
+ int size. */
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
+# endif
+_GL_CXXALIASWARN (getcwd);
+#elif defined GNULIB_POSIXCHECK
+# undef getcwd
+# if HAVE_RAW_DECL_GETCWD
+_GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
+ "use gnulib module getcwd for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETDOMAINNAME@
+/* Return the NIS domain name of the machine.
+ WARNING! The NIS domain name is unrelated to the fully qualified host name
+ of the machine. It is also unrelated to email addresses.
+ WARNING! The NIS domain name is usually the empty string or "(none)" when
+ not using NIS.
+
+ Put up to LEN bytes of the NIS domain name into NAME.
+ Null terminate it if the name is shorter than LEN.
+ If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
+ Return 0 if successful, otherwise set errno and return -1. */
+# if !@HAVE_GETDOMAINNAME@
+_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
+ _GL_ARG_NONNULL ((1)));
+# endif
+/* Need to cast, because on MacOS X 10.5 systems, the second parameter is
+ int len. */
+_GL_CXXALIAS_SYS_CAST (getdomainname, int, (char *name, size_t len));
+_GL_CXXALIASWARN (getdomainname);
+#elif defined GNULIB_POSIXCHECK
+# undef getdomainname
+# if HAVE_RAW_DECL_GETDOMAINNAME
+_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
+ "use gnulib module getdomainname for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETDTABLESIZE@
+/* Return the maximum number of file descriptors in the current process.
+ In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
+# if !@HAVE_GETDTABLESIZE@
+_GL_FUNCDECL_SYS (getdtablesize, int, (void));
+# endif
+_GL_CXXALIAS_SYS (getdtablesize, int, (void));
+_GL_CXXALIASWARN (getdtablesize);
+#elif defined GNULIB_POSIXCHECK
+# undef getdtablesize
+# if HAVE_RAW_DECL_GETDTABLESIZE
+_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
+ "use gnulib module getdtablesize for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETGROUPS@
+/* Return the supplemental groups that the current process belongs to.
+ It is unspecified whether the effective group id is in the list.
+ If N is 0, return the group count; otherwise, N describes how many
+ entries are available in GROUPS. Return -1 and set errno if N is
+ not 0 and not large enough. Fails with ENOSYS on some systems. */
+# if @REPLACE_GETGROUPS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getgroups
+# define getgroups rpl_getgroups
+# endif
+_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups));
+_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups));
+# else
+# if !@HAVE_GETGROUPS@
+_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups));
+# endif
+_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups));
+# endif
+_GL_CXXALIASWARN (getgroups);
+#elif defined GNULIB_POSIXCHECK
+# undef getgroups
+# if HAVE_RAW_DECL_GETGROUPS
+_GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
+ "use gnulib module getgroups for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETHOSTNAME@
+/* Return the standard host name of the machine.
+ WARNING! The host name may or may not be fully qualified.
+
+ Put up to LEN bytes of the host name into NAME.
+ Null terminate it if the name is shorter than LEN.
+ If the host name is longer than LEN, set errno = EINVAL and return -1.
+ Return 0 if successful, otherwise set errno and return -1. */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gethostname
+# define gethostname rpl_gethostname
+# endif
+_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
+# else
+# if !@HAVE_GETHOSTNAME@
+_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
+ _GL_ARG_NONNULL ((1)));
+# endif
+/* Need to cast, because on Solaris 10 systems, the second parameter is
+ int len. */
+_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
+# endif
+_GL_CXXALIASWARN (gethostname);
+#elif @UNISTD_H_HAVE_WINSOCK2_H@
+# undef gethostname
+# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
+#elif defined GNULIB_POSIXCHECK
+# undef gethostname
+# if HAVE_RAW_DECL_GETHOSTNAME
+_GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
+ "use gnulib module gethostname for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETLOGIN@
+/* Returns the user's login name, or NULL if it cannot be found. Upon error,
+ returns NULL with errno set.
+
+ See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+
+ Most programs don't need to use this function, because the information is
+ available through environment variables:
+ ${LOGNAME-$USER} on Unix platforms,
+ $USERNAME on native Windows platforms.
+ */
+# if !@HAVE_GETLOGIN@
+_GL_FUNCDECL_SYS (getlogin, char *, (void));
+# endif
+_GL_CXXALIAS_SYS (getlogin, char *, (void));
+_GL_CXXALIASWARN (getlogin);
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin
+# if HAVE_RAW_DECL_GETLOGIN
+_GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
+ "use gnulib module getlogin for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETLOGIN_R@
+/* Copies the user's login name to NAME.
+ The array pointed to by NAME has room for SIZE bytes.
+
+ Returns 0 if successful. Upon error, an error number is returned, or -1 in
+ the case that the login name cannot be found but no specific error is
+ provided (this case is hopefully rare but is left open by the POSIX spec).
+
+ See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+
+ Most programs don't need to use this function, because the information is
+ available through environment variables:
+ ${LOGNAME-$USER} on Unix platforms,
+ $USERNAME on native Windows platforms.
+ */
+# if !@HAVE_DECL_GETLOGIN_R@
+_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
+ _GL_ARG_NONNULL ((1)));
+# endif
+/* Need to cast, because on Solaris 10 systems, the second argument is
+ int size. */
+_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
+_GL_CXXALIASWARN (getlogin_r);
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin_r
+# if HAVE_RAW_DECL_GETLOGIN_R
+_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
+ "use gnulib module getlogin_r for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETPAGESIZE@
+# if @REPLACE_GETPAGESIZE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define getpagesize rpl_getpagesize
+# endif
+_GL_FUNCDECL_RPL (getpagesize, int, (void));
+_GL_CXXALIAS_RPL (getpagesize, int, (void));
+# else
+# if !@HAVE_GETPAGESIZE@
+# if !defined getpagesize
+/* This is for POSIX systems. */
+# if !defined _gl_getpagesize && defined _SC_PAGESIZE
+# if ! (defined __VMS && __VMS_VER < 70000000)
+# define _gl_getpagesize() sysconf (_SC_PAGESIZE)
+# endif
+# endif
+/* This is for older VMS. */
+# if !defined _gl_getpagesize && defined __VMS
+# ifdef __ALPHA
+# define _gl_getpagesize() 8192
+# else
+# define _gl_getpagesize() 512
+# endif
+# endif
+/* This is for BeOS. */
+# if !defined _gl_getpagesize && @HAVE_OS_H@
+# include <OS.h>
+# if defined B_PAGE_SIZE
+# define _gl_getpagesize() B_PAGE_SIZE
+# endif
+# endif
+/* This is for AmigaOS4.0. */
+# if !defined _gl_getpagesize && defined __amigaos4__
+# define _gl_getpagesize() 2048
+# endif
+/* This is for older Unix systems. */
+# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define _gl_getpagesize() EXEC_PAGESIZE
+# else
+# ifdef NBPG
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif
+# define _gl_getpagesize() (NBPG * CLSIZE)
+# else
+# ifdef NBPC
+# define _gl_getpagesize() NBPC
+# endif
+# endif
+# endif
+# endif
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define getpagesize() _gl_getpagesize ()
+# else
+static inline int
+getpagesize ()
+{
+ return _gl_getpagesize ();
+}
+# endif
+# endif
+# endif
+/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */
+_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void));
+# endif
+# if @HAVE_DECL_GETPAGESIZE@
+_GL_CXXALIASWARN (getpagesize);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getpagesize
+# if HAVE_RAW_DECL_GETPAGESIZE
+_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
+ "use gnulib module getpagesize for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETUSERSHELL@
+/* Return the next valid login shell on the system, or NULL when the end of
+ the list has been reached. */
+# if !@HAVE_DECL_GETUSERSHELL@
+_GL_FUNCDECL_SYS (getusershell, char *, (void));
+# endif
+_GL_CXXALIAS_SYS (getusershell, char *, (void));
+_GL_CXXALIASWARN (getusershell);
+#elif defined GNULIB_POSIXCHECK
+# undef getusershell
+# if HAVE_RAW_DECL_GETUSERSHELL
+_GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
+ "use gnulib module getusershell for portability");
+# endif
+#endif
+
+#if @GNULIB_GETUSERSHELL@
+/* Rewind to pointer that is advanced at each getusershell() call. */
+# if !@HAVE_DECL_GETUSERSHELL@
+_GL_FUNCDECL_SYS (setusershell, void, (void));
+# endif
+_GL_CXXALIAS_SYS (setusershell, void, (void));
+_GL_CXXALIASWARN (setusershell);
+#elif defined GNULIB_POSIXCHECK
+# undef setusershell
+# if HAVE_RAW_DECL_SETUSERSHELL
+_GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
+ "use gnulib module getusershell for portability");
+# endif
+#endif
+
+#if @GNULIB_GETUSERSHELL@
+/* Free the pointer that is advanced at each getusershell() call and
+ associated resources. */
+# if !@HAVE_DECL_GETUSERSHELL@
+_GL_FUNCDECL_SYS (endusershell, void, (void));
+# endif
+_GL_CXXALIAS_SYS (endusershell, void, (void));
+_GL_CXXALIASWARN (endusershell);
+#elif defined GNULIB_POSIXCHECK
+# undef endusershell
+# if HAVE_RAW_DECL_ENDUSERSHELL
+_GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
+ "use gnulib module getusershell for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LCHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+ to GID (if GID is not -1). Do not follow symbolic links.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/lchown.html>. */
+# if @REPLACE_LCHOWN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef lchown
+# define lchown rpl_lchown
+# endif
+_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group));
+# else
+# if !@HAVE_LCHOWN@
+_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group));
+# endif
+_GL_CXXALIASWARN (lchown);
+#elif defined GNULIB_POSIXCHECK
+# undef lchown
+# if HAVE_RAW_DECL_LCHOWN
+_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
+ "use gnulib module lchown for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LINK@
+/* Create a new hard link for an existing file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/link.html>. */
+# if @REPLACE_LINK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define link rpl_link
+# endif
+_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2));
+# else
+# if !@HAVE_LINK@
+_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2));
+# endif
+_GL_CXXALIASWARN (link);
+#elif defined GNULIB_POSIXCHECK
+# undef link
+# if HAVE_RAW_DECL_LINK
+_GL_WARN_ON_USE (link, "link is unportable - "
+ "use gnulib module link for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LINKAT@
+/* Create a new hard link for an existing file, relative to two
+ directories. FLAG controls whether symlinks are followed.
+ Return 0 if successful, otherwise -1 and errno set. */
+# if @REPLACE_LINKAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef linkat
+# define linkat rpl_linkat
+# endif
+_GL_FUNCDECL_RPL (linkat, int,
+ (int fd1, const char *path1, int fd2, const char *path2,
+ int flag)
+ _GL_ARG_NONNULL ((2, 4)));
+_GL_CXXALIAS_RPL (linkat, int,
+ (int fd1, const char *path1, int fd2, const char *path2,
+ int flag));
+# else
+# if !@HAVE_LINKAT@
+_GL_FUNCDECL_SYS (linkat, int,
+ (int fd1, const char *path1, int fd2, const char *path2,
+ int flag)
+ _GL_ARG_NONNULL ((2, 4)));
+# endif
+_GL_CXXALIAS_SYS (linkat, int,
+ (int fd1, const char *path1, int fd2, const char *path2,
+ int flag));
+# endif
+_GL_CXXALIASWARN (linkat);
+#elif defined GNULIB_POSIXCHECK
+# undef linkat
+# if HAVE_RAW_DECL_LINKAT
+_GL_WARN_ON_USE (linkat, "linkat is unportable - "
+ "use gnulib module linkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LSEEK@
+/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
+ Return the new offset if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/lseek.html>. */
+# if @REPLACE_LSEEK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define lseek rpl_lseek
+# endif
+_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
+_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
+# else
+_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
+# endif
+_GL_CXXALIASWARN (lseek);
+#elif defined GNULIB_POSIXCHECK
+# undef lseek
+# if HAVE_RAW_DECL_LSEEK
+_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
+ "systems - use gnulib module lseek for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PIPE2@
+/* Create a pipe, applying the given flags when opening the read-end of the
+ pipe and the write-end of the pipe.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ Store the read-end as fd[0] and the write-end as fd[1].
+ Return 0 upon success, or -1 with errno set upon failure.
+ See also the Linux man page at
+ <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */
+# if @HAVE_PIPE2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define pipe2 rpl_pipe2
+# endif
+_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
+# else
+_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
+# endif
+_GL_CXXALIASWARN (pipe2);
+#elif defined GNULIB_POSIXCHECK
+# undef pipe2
+# if HAVE_RAW_DECL_PIPE2
+_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
+ "use gnulib module pipe2 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PREAD@
+/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
+ Return the number of bytes placed into BUF if successful, otherwise
+ set errno and return -1. 0 indicates EOF. See the POSIX:2001
+ specification <http://www.opengroup.org/susv3xsh/pread.html>. */
+# if @REPLACE_PREAD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define pread rpl_pread
+# endif
+_GL_FUNCDECL_RPL (pread, ssize_t,
+ (int fd, void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (pread, ssize_t,
+ (int fd, void *buf, size_t bufsize, off_t offset));
+# else
+# if !@HAVE_PREAD@
+_GL_FUNCDECL_SYS (pread, ssize_t,
+ (int fd, void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (pread, ssize_t,
+ (int fd, void *buf, size_t bufsize, off_t offset));
+# endif
+_GL_CXXALIASWARN (pread);
+#elif defined GNULIB_POSIXCHECK
+# undef pread
+# if HAVE_RAW_DECL_PREAD
+_GL_WARN_ON_USE (pread, "pread is unportable - "
+ "use gnulib module pread for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PWRITE@
+/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
+ Return the number of bytes written if successful, otherwise
+ set errno and return -1. 0 indicates nothing written. See the
+ POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/pwrite.html>. */
+# if @REPLACE_PWRITE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define pwrite rpl_pwrite
+# endif
+_GL_FUNCDECL_RPL (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset));
+# else
+# if !@HAVE_PWRITE@
+_GL_FUNCDECL_SYS (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset));
+# endif
+_GL_CXXALIASWARN (pwrite);
+#elif defined GNULIB_POSIXCHECK
+# undef pwrite
+# if HAVE_RAW_DECL_PWRITE
+_GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
+ "use gnulib module pwrite for portability");
+# endif
+#endif
+
+
+#if @GNULIB_READLINK@
+/* Read the contents of the symbolic link FILE and place the first BUFSIZE
+ bytes of it into BUF. Return the number of bytes placed into BUF if
+ successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/readlink.html>. */
+# if @REPLACE_READLINK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define readlink rpl_readlink
+# endif
+_GL_FUNCDECL_RPL (readlink, ssize_t,
+ (const char *file, char *buf, size_t bufsize)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (readlink, ssize_t,
+ (const char *file, char *buf, size_t bufsize));
+# else
+# if !@HAVE_READLINK@
+_GL_FUNCDECL_SYS (readlink, ssize_t,
+ (const char *file, char *buf, size_t bufsize)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (readlink, ssize_t,
+ (const char *file, char *buf, size_t bufsize));
+# endif
+_GL_CXXALIASWARN (readlink);
+#elif defined GNULIB_POSIXCHECK
+# undef readlink
+# if HAVE_RAW_DECL_READLINK
+_GL_WARN_ON_USE (readlink, "readlink is unportable - "
+ "use gnulib module readlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_READLINKAT@
+# if !@HAVE_READLINKAT@
+_GL_FUNCDECL_SYS (readlinkat, ssize_t,
+ (int fd, char const *file, char *buf, size_t len)
+ _GL_ARG_NONNULL ((2, 3)));
+# endif
+_GL_CXXALIAS_SYS (readlinkat, ssize_t,
+ (int fd, char const *file, char *buf, size_t len));
+_GL_CXXALIASWARN (readlinkat);
+#elif defined GNULIB_POSIXCHECK
+# undef readlinkat
+# if HAVE_RAW_DECL_READLINKAT
+_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
+ "use gnulib module readlinkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RMDIR@
+/* Remove the directory DIR. */
+# if @REPLACE_RMDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define rmdir rpl_rmdir
+# endif
+_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (rmdir, int, (char const *name));
+# else
+_GL_CXXALIAS_SYS (rmdir, int, (char const *name));
+# endif
+_GL_CXXALIASWARN (rmdir);
+#elif defined GNULIB_POSIXCHECK
+# undef rmdir
+# if HAVE_RAW_DECL_RMDIR
+_GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
+ "use gnulib module rmdir for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SLEEP@
+/* Pause the execution of the current thread for N seconds.
+ Returns the number of seconds left to sleep.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/sleep.html>. */
+# if @REPLACE_SLEEP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sleep
+# define sleep rpl_sleep
+# endif
+_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n));
+_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n));
+# else
+# if !@HAVE_SLEEP@
+_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n));
+# endif
+_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n));
+# endif
+_GL_CXXALIASWARN (sleep);
+#elif defined GNULIB_POSIXCHECK
+# undef sleep
+# if HAVE_RAW_DECL_SLEEP
+_GL_WARN_ON_USE (sleep, "sleep is unportable - "
+ "use gnulib module sleep for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SYMLINK@
+# if @REPLACE_SYMLINK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef symlink
+# define symlink rpl_symlink
+# endif
+_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file));
+# else
+# if !@HAVE_SYMLINK@
+_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file));
+# endif
+_GL_CXXALIASWARN (symlink);
+#elif defined GNULIB_POSIXCHECK
+# undef symlink
+# if HAVE_RAW_DECL_SYMLINK
+_GL_WARN_ON_USE (symlink, "symlink is not portable - "
+ "use gnulib module symlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SYMLINKAT@
+# if !@HAVE_SYMLINKAT@
+_GL_FUNCDECL_SYS (symlinkat, int,
+ (char const *contents, int fd, char const *file)
+ _GL_ARG_NONNULL ((1, 3)));
+# endif
+_GL_CXXALIAS_SYS (symlinkat, int,
+ (char const *contents, int fd, char const *file));
+_GL_CXXALIASWARN (symlinkat);
+#elif defined GNULIB_POSIXCHECK
+# undef symlinkat
+# if HAVE_RAW_DECL_SYMLINKAT
+_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
+ "use gnulib module symlinkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TTYNAME_R@
+/* Store at most BUFLEN characters of the pathname of the terminal FD is
+ open on in BUF. Return 0 on success, otherwise an error number. */
+# if @REPLACE_TTYNAME_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ttyname_r
+# define ttyname_r rpl_ttyname_r
+# endif
+_GL_FUNCDECL_RPL (ttyname_r, int,
+ (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (ttyname_r, int,
+ (int fd, char *buf, size_t buflen));
+# else
+# if !@HAVE_TTYNAME_R@
+_GL_FUNCDECL_SYS (ttyname_r, int,
+ (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (ttyname_r, int,
+ (int fd, char *buf, size_t buflen));
+# endif
+_GL_CXXALIASWARN (ttyname_r);
+#elif defined GNULIB_POSIXCHECK
+# undef ttyname_r
+# if HAVE_RAW_DECL_TTYNAME_R
+_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
+ "use gnulib module ttyname_r for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UNLINK@
+# if @REPLACE_UNLINK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef unlink
+# define unlink rpl_unlink
+# endif
+_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (unlink, int, (char const *file));
+# else
+_GL_CXXALIAS_SYS (unlink, int, (char const *file));
+# endif
+_GL_CXXALIASWARN (unlink);
+#elif defined GNULIB_POSIXCHECK
+# undef unlink
+# if HAVE_RAW_DECL_UNLINK
+_GL_WARN_ON_USE (unlink, "unlink is not portable - "
+ "use gnulib module unlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UNLINKAT@
+# if @REPLACE_UNLINKAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef unlinkat
+# define unlinkat rpl_unlinkat
+# endif
+_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag));
+# else
+# if !@HAVE_UNLINKAT@
+_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag));
+# endif
+_GL_CXXALIASWARN (unlinkat);
+#elif defined GNULIB_POSIXCHECK
+# undef unlinkat
+# if HAVE_RAW_DECL_UNLINKAT
+_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_USLEEP@
+/* Pause the execution of the current thread for N microseconds.
+ Returns 0 on completion, or -1 on range error.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/sleep.html>. */
+# if @REPLACE_USLEEP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef usleep
+# define usleep rpl_usleep
+# endif
+_GL_FUNCDECL_RPL (usleep, int, (useconds_t n));
+_GL_CXXALIAS_RPL (usleep, int, (useconds_t n));
+# else
+# if !@HAVE_USLEEP@
+_GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
+# endif
+_GL_CXXALIAS_SYS (usleep, int, (useconds_t n));
+# endif
+_GL_CXXALIASWARN (usleep);
+#elif defined GNULIB_POSIXCHECK
+# undef usleep
+# if HAVE_RAW_DECL_USLEEP
+_GL_WARN_ON_USE (usleep, "usleep is unportable - "
+ "use gnulib module usleep for portability");
+# endif
+#endif
+
+
+#if @GNULIB_WRITE@
+/* Write up to COUNT bytes starting at BUF to file descriptor FD.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/write.html>. */
+# if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef write
+# define write rpl_write
+# endif
+_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
+# else
+/* Need to cast, because on mingw, the third parameter is
+ unsigned int count
+ and the return type is 'int'. */
+_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (write);
+#endif
+
+
+#endif /* _GL_UNISTD_H */
+#endif /* _GL_UNISTD_H */
diff --git a/grub-core/gnulib/vasnprintf.c b/grub-core/gnulib/vasnprintf.c
new file mode 100644
index 0000000..e618901
--- /dev/null
+++ b/grub-core/gnulib/vasnprintf.c
@@ -0,0 +1,5567 @@
+/* vsprintf with automatic memory allocation.
+ Copyright (C) 1999, 2002-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This file can be parametrized with the following macros:
+ VASNPRINTF The name of the function being defined.
+ FCHAR_T The element type of the format string.
+ DCHAR_T The element type of the destination (result) string.
+ FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters
+ in the format string are ASCII. MUST be set if
+ FCHAR_T and DCHAR_T are not the same type.
+ DIRECTIVE Structure denoting a format directive.
+ Depends on FCHAR_T.
+ DIRECTIVES Structure denoting the set of format directives of a
+ format string. Depends on FCHAR_T.
+ PRINTF_PARSE Function that parses a format string.
+ Depends on FCHAR_T.
+ DCHAR_CPY memcpy like function for DCHAR_T[] arrays.
+ DCHAR_SET memset like function for DCHAR_T[] arrays.
+ DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays.
+ SNPRINTF The system's snprintf (or similar) function.
+ This may be either snprintf or swprintf.
+ TCHAR_T The element type of the argument and result string
+ of the said SNPRINTF function. This may be either
+ char or wchar_t. The code exploits that
+ sizeof (TCHAR_T) | sizeof (DCHAR_T) and
+ alignof (TCHAR_T) <= alignof (DCHAR_T).
+ DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type.
+ DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[].
+ DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t.
+ DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t.
+ DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */
+
+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifndef VASNPRINTF
+# include <config.h>
+#endif
+#ifndef IN_LIBINTL
+# include <alloca.h>
+#endif
+
+/* Specification. */
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# include "vasnwprintf.h"
+# else
+# include "vasnprintf.h"
+# endif
+#endif
+
+#include <locale.h> /* localeconv() */
+#include <stdio.h> /* snprintf(), sprintf() */
+#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
+#include <string.h> /* memcpy(), strlen() */
+#include <errno.h> /* errno */
+#include <limits.h> /* CHAR_BIT */
+#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
+#if HAVE_NL_LANGINFO
+# include <langinfo.h>
+#endif
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# include "wprintf-parse.h"
+# else
+# include "printf-parse.h"
+# endif
+#endif
+
+/* Checked size_t computations. */
+#include "xsize.h"
+
+#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "float+.h"
+#endif
+
+#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnand-nolibm.h"
+#endif
+
+#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnanl-nolibm.h"
+# include "fpucw.h"
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnand-nolibm.h"
+# include "printf-frexp.h"
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnanl-nolibm.h"
+# include "printf-frexpl.h"
+# include "fpucw.h"
+#endif
+
+/* Default parameters. */
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# define VASNPRINTF vasnwprintf
+# define FCHAR_T wchar_t
+# define DCHAR_T wchar_t
+# define TCHAR_T wchar_t
+# define DCHAR_IS_TCHAR 1
+# define DIRECTIVE wchar_t_directive
+# define DIRECTIVES wchar_t_directives
+# define PRINTF_PARSE wprintf_parse
+# define DCHAR_CPY wmemcpy
+# define DCHAR_SET wmemset
+# else
+# define VASNPRINTF vasnprintf
+# define FCHAR_T char
+# define DCHAR_T char
+# define TCHAR_T char
+# define DCHAR_IS_TCHAR 1
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+# define PRINTF_PARSE printf_parse
+# define DCHAR_CPY memcpy
+# define DCHAR_SET memset
+# endif
+#endif
+#if WIDE_CHAR_VERSION
+ /* TCHAR_T is wchar_t. */
+# define USE_SNPRINTF 1
+# if HAVE_DECL__SNWPRINTF
+ /* On Windows, the function swprintf() has a different signature than
+ on Unix; we use the function _snwprintf() or - on mingw - snwprintf()
+ instead. The mingw function snwprintf() has fewer bugs than the
+ MSVCRT function _snwprintf(), so prefer that. */
+# if defined __MINGW32__
+# define SNPRINTF snwprintf
+# else
+# define SNPRINTF _snwprintf
+# endif
+# else
+ /* Unix. */
+# define SNPRINTF swprintf
+# endif
+#else
+ /* TCHAR_T is char. */
+ /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'.
+ But don't use it on BeOS, since BeOS snprintf produces no output if the
+ size argument is >= 0x3000000.
+ Also don't use it on Linux libc5, since there snprintf with size = 1
+ writes any output without bounds, like sprintf. */
+# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1)
+# define USE_SNPRINTF 1
+# else
+# define USE_SNPRINTF 0
+# endif
+# if HAVE_DECL__SNPRINTF
+ /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT
+ function _snprintf(), so prefer that. */
+# if defined __MINGW32__
+# define SNPRINTF snprintf
+ /* Here we need to call the native snprintf, not rpl_snprintf. */
+# undef snprintf
+# else
+# define SNPRINTF _snprintf
+# endif
+# else
+ /* Unix. */
+# define SNPRINTF snprintf
+ /* Here we need to call the native snprintf, not rpl_snprintf. */
+# undef snprintf
+# endif
+#endif
+/* Here we need to call the native sprintf, not rpl_sprintf. */
+#undef sprintf
+
+/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
+ warnings in this file. Use -Dlint to suppress them. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
+/* Avoid some warnings from "gcc -Wshadow".
+ This file doesn't use the exp() and remainder() functions. */
+#undef exp
+#define exp expo
+#undef remainder
+#define remainder rem
+
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION
+# if (HAVE_STRNLEN && !defined _AIX)
+# define local_strnlen strnlen
+# else
+# ifndef local_strnlen_defined
+# define local_strnlen_defined 1
+static size_t
+local_strnlen (const char *string, size_t maxlen)
+{
+ const char *end = memchr (string, '\0', maxlen);
+ return end ? (size_t) (end - string) : maxlen;
+}
+# endif
+# endif
+#endif
+
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+# if HAVE_WCSLEN
+# define local_wcslen wcslen
+# else
+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
+ a dependency towards this library, here is a local substitute.
+ Define this substitute only once, even if this file is included
+ twice in the same compilation unit. */
+# ifndef local_wcslen_defined
+# define local_wcslen_defined 1
+static size_t
+local_wcslen (const wchar_t *s)
+{
+ const wchar_t *ptr;
+
+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
+ ;
+ return ptr - s;
+}
+# endif
+# endif
+#endif
+
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
+# if HAVE_WCSNLEN
+# define local_wcsnlen wcsnlen
+# else
+# ifndef local_wcsnlen_defined
+# define local_wcsnlen_defined 1
+static size_t
+local_wcsnlen (const wchar_t *s, size_t maxlen)
+{
+ const wchar_t *ptr;
+
+ for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--)
+ ;
+ return ptr - s;
+}
+# endif
+# endif
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+/* Determine the decimal-point character according to the current locale. */
+# ifndef decimal_point_char_defined
+# define decimal_point_char_defined 1
+static char
+decimal_point_char (void)
+{
+ const char *point;
+ /* Determine it in a multithread-safe way. We know nl_langinfo is
+ multithread-safe on glibc systems and MacOS X systems, but is not required
+ to be multithread-safe by POSIX. sprintf(), however, is multithread-safe.
+ localeconv() is rarely multithread-safe. */
+# if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined __MACH__))
+ point = nl_langinfo (RADIXCHAR);
+# elif 1
+ char pointbuf[5];
+ sprintf (pointbuf, "%#.0f", 1.0);
+ point = &pointbuf[1];
+# else
+ point = localeconv () -> decimal_point;
+# endif
+ /* The decimal point is always a single byte: either '.' or ','. */
+ return (point[0] != '\0' ? point[0] : '.');
+}
+# endif
+#endif
+
+#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL
+
+/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */
+static int
+is_infinite_or_zero (double x)
+{
+ return isnand (x) || x + x == x;
+}
+
+#endif
+
+#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL
+
+/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */
+static int
+is_infinite_or_zerol (long double x)
+{
+ return isnanl (x) || x + x == x;
+}
+
+#endif
+
+#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+
+/* Converting 'long double' to decimal without rare rounding bugs requires
+ real bignums. We use the naming conventions of GNU gmp, but vastly simpler
+ (and slower) algorithms. */
+
+typedef unsigned int mp_limb_t;
+# define GMP_LIMB_BITS 32
+typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1];
+
+typedef unsigned long long mp_twolimb_t;
+# define GMP_TWOLIMB_BITS 64
+typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1];
+
+/* Representation of a bignum >= 0. */
+typedef struct
+{
+ size_t nlimbs;
+ mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */
+} mpn_t;
+
+/* Compute the product of two bignums >= 0.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
+{
+ const mp_limb_t *p1;
+ const mp_limb_t *p2;
+ size_t len1;
+ size_t len2;
+
+ if (src1.nlimbs <= src2.nlimbs)
+ {
+ len1 = src1.nlimbs;
+ p1 = src1.limbs;
+ len2 = src2.nlimbs;
+ p2 = src2.limbs;
+ }
+ else
+ {
+ len1 = src2.nlimbs;
+ p1 = src2.limbs;
+ len2 = src1.nlimbs;
+ p2 = src1.limbs;
+ }
+ /* Now 0 <= len1 <= len2. */
+ if (len1 == 0)
+ {
+ /* src1 or src2 is zero. */
+ dest->nlimbs = 0;
+ dest->limbs = (mp_limb_t *) malloc (1);
+ }
+ else
+ {
+ /* Here 1 <= len1 <= len2. */
+ size_t dlen;
+ mp_limb_t *dp;
+ size_t k, i, j;
+
+ dlen = len1 + len2;
+ dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t));
+ if (dp == NULL)
+ return NULL;
+ for (k = len2; k > 0; )
+ dp[--k] = 0;
+ for (i = 0; i < len1; i++)
+ {
+ mp_limb_t digit1 = p1[i];
+ mp_twolimb_t carry = 0;
+ for (j = 0; j < len2; j++)
+ {
+ mp_limb_t digit2 = p2[j];
+ carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
+ carry += dp[i + j];
+ dp[i + j] = (mp_limb_t) carry;
+ carry = carry >> GMP_LIMB_BITS;
+ }
+ dp[i + len2] = (mp_limb_t) carry;
+ }
+ /* Normalise. */
+ while (dlen > 0 && dp[dlen - 1] == 0)
+ dlen--;
+ dest->nlimbs = dlen;
+ dest->limbs = dp;
+ }
+ return dest->limbs;
+}
+
+/* Compute the quotient of a bignum a >= 0 and a bignum b > 0.
+ a is written as a = q * b + r with 0 <= r < b. q is the quotient, r
+ the remainder.
+ Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd,
+ q is incremented.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+divide (mpn_t a, mpn_t b, mpn_t *q)
+{
+ /* Algorithm:
+ First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]]
+ with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS).
+ If m<n, then q:=0 and r:=a.
+ If m>=n=1, perform a single-precision division:
+ r:=0, j:=m,
+ while j>0 do
+ {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j =
+ = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r<b[0]<beta}
+ j:=j-1, r:=r*beta+a[j], q[j]:=floor(r/b[0]), r:=r-b[0]*q[j].
+ Normalise [q[m-1],...,q[0]], yields q.
+ If m>=n>1, perform a multiple-precision division:
+ We have a/b < beta^(m-n+1).
+ s:=intDsize-1-(highest bit in b[n-1]), 0<=s<intDsize.
+ Shift a and b left by s bits, copying them. r:=a.
+ r=[r[m],...,r[0]], b=[b[n-1],...,b[0]] with b[n-1]>=beta/2.
+ For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).}
+ Compute q* :
+ q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]).
+ In case of overflow (q* >= beta) set q* := beta-1.
+ Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2]
+ and c3 := b[n-2] * q*.
+ {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow
+ occurred. Furthermore 0 <= c3 < beta^2.
+ If there was overflow and
+ r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2,
+ the next test can be skipped.}
+ While c3 > c2, {Here 0 <= c2 < c3 < beta^2}
+ Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2].
+ If q* > 0:
+ Put r := r - b * q* * beta^j. In detail:
+ [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]].
+ hence: u:=0, for i:=0 to n-1 do
+ u := u + q* * b[i],
+ r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry),
+ u:=u div beta (+ 1, if carry in subtraction)
+ r[n+j]:=r[n+j]-u.
+ {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1
+ < q* + 1 <= beta,
+ the carry u does not overflow.}
+ If a negative carry occurs, put q* := q* - 1
+ and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]].
+ Set q[j] := q*.
+ Normalise [q[m-n],..,q[0]]; this yields the quotient q.
+ Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the
+ rest r.
+ The room for q[j] can be allocated at the memory location of r[n+j].
+ Finally, round-to-even:
+ Shift r left by 1 bit.
+ If r > b or if r = b and q[0] is odd, q := q+1.
+ */
+ const mp_limb_t *a_ptr = a.limbs;
+ size_t a_len = a.nlimbs;
+ const mp_limb_t *b_ptr = b.limbs;
+ size_t b_len = b.nlimbs;
+ mp_limb_t *roomptr;
+ mp_limb_t *tmp_roomptr = NULL;
+ mp_limb_t *q_ptr;
+ size_t q_len;
+ mp_limb_t *r_ptr;
+ size_t r_len;
+
+ /* Allocate room for a_len+2 digits.
+ (Need a_len+1 digits for the real division and 1 more digit for the
+ final rounding of q.) */
+ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t));
+ if (roomptr == NULL)
+ return NULL;
+
+ /* Normalise a. */
+ while (a_len > 0 && a_ptr[a_len - 1] == 0)
+ a_len--;
+
+ /* Normalise b. */
+ for (;;)
+ {
+ if (b_len == 0)
+ /* Division by zero. */
+ abort ();
+ if (b_ptr[b_len - 1] == 0)
+ b_len--;
+ else
+ break;
+ }
+
+ /* Here m = a_len >= 0 and n = b_len > 0. */
+
+ if (a_len < b_len)
+ {
+ /* m<n: trivial case. q=0, r := copy of a. */
+ r_ptr = roomptr;
+ r_len = a_len;
+ memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
+ q_ptr = roomptr + a_len;
+ q_len = 0;
+ }
+ else if (b_len == 1)
+ {
+ /* n=1: single precision division.
+ beta^(m-1) <= a < beta^m ==> beta^(m-2) <= a/b < beta^m */
+ r_ptr = roomptr;
+ q_ptr = roomptr + 1;
+ {
+ mp_limb_t den = b_ptr[0];
+ mp_limb_t remainder = 0;
+ const mp_limb_t *sourceptr = a_ptr + a_len;
+ mp_limb_t *destptr = q_ptr + a_len;
+ size_t count;
+ for (count = a_len; count > 0; count--)
+ {
+ mp_twolimb_t num =
+ ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr;
+ *--destptr = num / den;
+ remainder = num % den;
+ }
+ /* Normalise and store r. */
+ if (remainder > 0)
+ {
+ r_ptr[0] = remainder;
+ r_len = 1;
+ }
+ else
+ r_len = 0;
+ /* Normalise q. */
+ q_len = a_len;
+ if (q_ptr[q_len - 1] == 0)
+ q_len--;
+ }
+ }
+ else
+ {
+ /* n>1: multiple precision division.
+ beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==>
+ beta^(m-n-1) <= a/b < beta^(m-n+1). */
+ /* Determine s. */
+ size_t s;
+ {
+ mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */
+ s = 31;
+ if (msd >= 0x10000)
+ {
+ msd = msd >> 16;
+ s -= 16;
+ }
+ if (msd >= 0x100)
+ {
+ msd = msd >> 8;
+ s -= 8;
+ }
+ if (msd >= 0x10)
+ {
+ msd = msd >> 4;
+ s -= 4;
+ }
+ if (msd >= 0x4)
+ {
+ msd = msd >> 2;
+ s -= 2;
+ }
+ if (msd >= 0x2)
+ {
+ msd = msd >> 1;
+ s -= 1;
+ }
+ }
+ /* 0 <= s < GMP_LIMB_BITS.
+ Copy b, shifting it left by s bits. */
+ if (s > 0)
+ {
+ tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t));
+ if (tmp_roomptr == NULL)
+ {
+ free (roomptr);
+ return NULL;
+ }
+ {
+ const mp_limb_t *sourceptr = b_ptr;
+ mp_limb_t *destptr = tmp_roomptr;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = b_len; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *sourceptr++ << s;
+ *destptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ /* accu must be zero, since that was how s was determined. */
+ if (accu != 0)
+ abort ();
+ }
+ b_ptr = tmp_roomptr;
+ }
+ /* Copy a, shifting it left by s bits, yields r.
+ Memory layout:
+ At the beginning: r = roomptr[0..a_len],
+ at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */
+ r_ptr = roomptr;
+ if (s == 0)
+ {
+ memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
+ r_ptr[a_len] = 0;
+ }
+ else
+ {
+ const mp_limb_t *sourceptr = a_ptr;
+ mp_limb_t *destptr = r_ptr;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = a_len; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *sourceptr++ << s;
+ *destptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ *destptr++ = (mp_limb_t) accu;
+ }
+ q_ptr = roomptr + b_len;
+ q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */
+ {
+ size_t j = a_len - b_len; /* m-n */
+ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */
+ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */
+ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */
+ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd;
+ /* Division loop, traversed m-n+1 times.
+ j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */
+ for (;;)
+ {
+ mp_limb_t q_star;
+ mp_limb_t c1;
+ if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */
+ {
+ /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */
+ mp_twolimb_t num =
+ ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS)
+ | r_ptr[j + b_len - 1];
+ q_star = num / b_msd;
+ c1 = num % b_msd;
+ }
+ else
+ {
+ /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */
+ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */
+ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta
+ <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta
+ <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta)
+ {<= beta !}.
+ If yes, jump directly to the subtraction loop.
+ (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta
+ <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */
+ if (r_ptr[j + b_len] > b_msd
+ || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd)
+ /* r[j+n] >= b[n-1]+1 or
+ r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a
+ carry. */
+ goto subtract;
+ }
+ /* q_star = q*,
+ c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, <beta). */
+ {
+ mp_twolimb_t c2 = /* c1*beta+r[j+n-2] */
+ ((mp_twolimb_t) c1 << GMP_LIMB_BITS) | r_ptr[j + b_len - 2];
+ mp_twolimb_t c3 = /* b[n-2] * q* */
+ (mp_twolimb_t) b_2msd * (mp_twolimb_t) q_star;
+ /* While c2 < c3, increase c2 and decrease c3.
+ Consider c3-c2. While it is > 0, decrease it by
+ b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2
+ this can happen only twice. */
+ if (c3 > c2)
+ {
+ q_star = q_star - 1; /* q* := q* - 1 */
+ if (c3 - c2 > b_msdd)
+ q_star = q_star - 1; /* q* := q* - 1 */
+ }
+ }
+ if (q_star > 0)
+ subtract:
+ {
+ /* Subtract r := r - b * q* * beta^j. */
+ mp_limb_t cr;
+ {
+ const mp_limb_t *sourceptr = b_ptr;
+ mp_limb_t *destptr = r_ptr + j;
+ mp_twolimb_t carry = 0;
+ size_t count;
+ for (count = b_len; count > 0; count--)
+ {
+ /* Here 0 <= carry <= q*. */
+ carry =
+ carry
+ + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++
+ + (mp_limb_t) ~(*destptr);
+ /* Here 0 <= carry <= beta*q* + beta-1. */
+ *destptr++ = ~(mp_limb_t) carry;
+ carry = carry >> GMP_LIMB_BITS; /* <= q* */
+ }
+ cr = (mp_limb_t) carry;
+ }
+ /* Subtract cr from r_ptr[j + b_len], then forget about
+ r_ptr[j + b_len]. */
+ if (cr > r_ptr[j + b_len])
+ {
+ /* Subtraction gave a carry. */
+ q_star = q_star - 1; /* q* := q* - 1 */
+ /* Add b back. */
+ {
+ const mp_limb_t *sourceptr = b_ptr;
+ mp_limb_t *destptr = r_ptr + j;
+ mp_limb_t carry = 0;
+ size_t count;
+ for (count = b_len; count > 0; count--)
+ {
+ mp_limb_t source1 = *sourceptr++;
+ mp_limb_t source2 = *destptr;
+ *destptr++ = source1 + source2 + carry;
+ carry =
+ (carry
+ ? source1 >= (mp_limb_t) ~source2
+ : source1 > (mp_limb_t) ~source2);
+ }
+ }
+ /* Forget about the carry and about r[j+n]. */
+ }
+ }
+ /* q* is determined. Store it as q[j]. */
+ q_ptr[j] = q_star;
+ if (j == 0)
+ break;
+ j--;
+ }
+ }
+ r_len = b_len;
+ /* Normalise q. */
+ if (q_ptr[q_len - 1] == 0)
+ q_len--;
+# if 0 /* Not needed here, since we need r only to compare it with b/2, and
+ b is shifted left by s bits. */
+ /* Shift r right by s bits. */
+ if (s > 0)
+ {
+ mp_limb_t ptr = r_ptr + r_len;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = r_len; count > 0; count--)
+ {
+ accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS;
+ accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s);
+ *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS);
+ }
+ }
+# endif
+ /* Normalise r. */
+ while (r_len > 0 && r_ptr[r_len - 1] == 0)
+ r_len--;
+ }
+ /* Compare r << 1 with b. */
+ if (r_len > b_len)
+ goto increment_q;
+ {
+ size_t i;
+ for (i = b_len;;)
+ {
+ mp_limb_t r_i =
+ (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0)
+ | (i < r_len ? r_ptr[i] << 1 : 0);
+ mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0);
+ if (r_i > b_i)
+ goto increment_q;
+ if (r_i < b_i)
+ goto keep_q;
+ if (i == 0)
+ break;
+ i--;
+ }
+ }
+ if (q_len > 0 && ((q_ptr[0] & 1) != 0))
+ /* q is odd. */
+ increment_q:
+ {
+ size_t i;
+ for (i = 0; i < q_len; i++)
+ if (++(q_ptr[i]) != 0)
+ goto keep_q;
+ q_ptr[q_len++] = 1;
+ }
+ keep_q:
+ if (tmp_roomptr != NULL)
+ free (tmp_roomptr);
+ q->limbs = q_ptr;
+ q->nlimbs = q_len;
+ return roomptr;
+}
+
+/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal
+ representation.
+ Destroys the contents of a.
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+convert_to_decimal (mpn_t a, size_t extra_zeroes)
+{
+ mp_limb_t *a_ptr = a.limbs;
+ size_t a_len = a.nlimbs;
+ /* 0.03345 is slightly larger than log(2)/(9*log(10)). */
+ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
+ char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
+ if (c_ptr != NULL)
+ {
+ char *d_ptr = c_ptr;
+ for (; extra_zeroes > 0; extra_zeroes--)
+ *d_ptr++ = '0';
+ while (a_len > 0)
+ {
+ /* Divide a by 10^9, in-place. */
+ mp_limb_t remainder = 0;
+ mp_limb_t *ptr = a_ptr + a_len;
+ size_t count;
+ for (count = a_len; count > 0; count--)
+ {
+ mp_twolimb_t num =
+ ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr;
+ *ptr = num / 1000000000;
+ remainder = num % 1000000000;
+ }
+ /* Store the remainder as 9 decimal digits. */
+ for (count = 9; count > 0; count--)
+ {
+ *d_ptr++ = '0' + (remainder % 10);
+ remainder = remainder / 10;
+ }
+ /* Normalize a. */
+ if (a_ptr[a_len - 1] == 0)
+ a_len--;
+ }
+ /* Remove leading zeroes. */
+ while (d_ptr > c_ptr && d_ptr[-1] == '0')
+ d_ptr--;
+ /* But keep at least one zero. */
+ if (d_ptr == c_ptr)
+ *d_ptr++ = '0';
+ /* Terminate the string. */
+ *d_ptr = '\0';
+ }
+ return c_ptr;
+}
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and >= 0:
+ write x as x = 2^e * m, where m is a bignum.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+decode_long_double (long double x, int *ep, mpn_t *mp)
+{
+ mpn_t m;
+ int exp;
+ long double y;
+ size_t i;
+
+ /* Allocate memory for result. */
+ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
+ m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t));
+ if (m.limbs == NULL)
+ return NULL;
+ /* Split into exponential part and mantissa. */
+ y = frexpl (x, &exp);
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the
+ latter is an integer. */
+ /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs.
+ I'm not sure whether it's safe to cast a 'long double' value between
+ 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
+ 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int',
+ doesn't matter). */
+# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0
+# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2));
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+# else
+ {
+ mp_limb_t d;
+ y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS);
+ d = (int) y;
+ y -= d;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d;
+ }
+# endif
+# endif
+ for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; )
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+#if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess
+ precision. */
+ if (!(y == 0.0L))
+ abort ();
+#endif
+ /* Normalise. */
+ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
+ m.nlimbs--;
+ *mp = m;
+ *ep = exp - LDBL_MANT_BIT;
+ return m.limbs;
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and >= 0:
+ write x as x = 2^e * m, where m is a bignum.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+decode_double (double x, int *ep, mpn_t *mp)
+{
+ mpn_t m;
+ int exp;
+ double y;
+ size_t i;
+
+ /* Allocate memory for result. */
+ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
+ m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t));
+ if (m.limbs == NULL)
+ return NULL;
+ /* Split into exponential part and mantissa. */
+ y = frexp (x, &exp);
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the
+ latter is an integer. */
+ /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs.
+ I'm not sure whether it's safe to cast a 'double' value between
+ 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
+ 'double' values between 0 and 2^16 (to 'unsigned int' or 'int',
+ doesn't matter). */
+# if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0
+# if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2));
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+# else
+ {
+ mp_limb_t d;
+ y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS);
+ d = (int) y;
+ y -= d;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d;
+ }
+# endif
+# endif
+ for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; )
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+ if (!(y == 0.0))
+ abort ();
+ /* Normalise. */
+ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
+ m.nlimbs--;
+ *mp = m;
+ *ep = exp - DBL_MANT_BIT;
+ return m.limbs;
+}
+
+# endif
+
+/* Assuming x = 2^e * m is finite and >= 0, and n is an integer:
+ Returns the decimal representation of round (x * 10^n).
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n)
+{
+ int s;
+ size_t extra_zeroes;
+ unsigned int abs_n;
+ unsigned int abs_s;
+ mp_limb_t *pow5_ptr;
+ size_t pow5_len;
+ unsigned int s_limbs;
+ unsigned int s_bits;
+ mpn_t pow5;
+ mpn_t z;
+ void *z_memory;
+ char *digits;
+
+ if (memory == NULL)
+ return NULL;
+ /* x = 2^e * m, hence
+ y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m)
+ = round (2^s * 5^n * m). */
+ s = e + n;
+ extra_zeroes = 0;
+ /* Factor out a common power of 10 if possible. */
+ if (s > 0 && n > 0)
+ {
+ extra_zeroes = (s < n ? s : n);
+ s -= extra_zeroes;
+ n -= extra_zeroes;
+ }
+ /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes.
+ Before converting to decimal, we need to compute
+ z = round (2^s * 5^n * m). */
+ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same
+ sign. 2.322 is slightly larger than log(5)/log(2). */
+ abs_n = (n >= 0 ? n : -n);
+ abs_s = (s >= 0 ? s : -s);
+ pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1
+ + abs_s / GMP_LIMB_BITS + 1)
+ * sizeof (mp_limb_t));
+ if (pow5_ptr == NULL)
+ {
+ free (memory);
+ return NULL;
+ }
+ /* Initialize with 1. */
+ pow5_ptr[0] = 1;
+ pow5_len = 1;
+ /* Multiply with 5^|n|. */
+ if (abs_n > 0)
+ {
+ static mp_limb_t const small_pow5[13 + 1] =
+ {
+ 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625,
+ 48828125, 244140625, 1220703125
+ };
+ unsigned int n13;
+ for (n13 = 0; n13 <= abs_n; n13 += 13)
+ {
+ mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13];
+ size_t j;
+ mp_twolimb_t carry = 0;
+ for (j = 0; j < pow5_len; j++)
+ {
+ mp_limb_t digit2 = pow5_ptr[j];
+ carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
+ pow5_ptr[j] = (mp_limb_t) carry;
+ carry = carry >> GMP_LIMB_BITS;
+ }
+ if (carry > 0)
+ pow5_ptr[pow5_len++] = (mp_limb_t) carry;
+ }
+ }
+ s_limbs = abs_s / GMP_LIMB_BITS;
+ s_bits = abs_s % GMP_LIMB_BITS;
+ if (n >= 0 ? s >= 0 : s <= 0)
+ {
+ /* Multiply with 2^|s|. */
+ if (s_bits > 0)
+ {
+ mp_limb_t *ptr = pow5_ptr;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = pow5_len; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *ptr << s_bits;
+ *ptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ if (accu > 0)
+ {
+ *ptr = (mp_limb_t) accu;
+ pow5_len++;
+ }
+ }
+ if (s_limbs > 0)
+ {
+ size_t count;
+ for (count = pow5_len; count > 0;)
+ {
+ count--;
+ pow5_ptr[s_limbs + count] = pow5_ptr[count];
+ }
+ for (count = s_limbs; count > 0;)
+ {
+ count--;
+ pow5_ptr[count] = 0;
+ }
+ pow5_len += s_limbs;
+ }
+ pow5.limbs = pow5_ptr;
+ pow5.nlimbs = pow5_len;
+ if (n >= 0)
+ {
+ /* Multiply m with pow5. No division needed. */
+ z_memory = multiply (m, pow5, &z);
+ }
+ else
+ {
+ /* Divide m by pow5 and round. */
+ z_memory = divide (m, pow5, &z);
+ }
+ }
+ else
+ {
+ pow5.limbs = pow5_ptr;
+ pow5.nlimbs = pow5_len;
+ if (n >= 0)
+ {
+ /* n >= 0, s < 0.
+ Multiply m with pow5, then divide by 2^|s|. */
+ mpn_t numerator;
+ mpn_t denominator;
+ void *tmp_memory;
+ tmp_memory = multiply (m, pow5, &numerator);
+ if (tmp_memory == NULL)
+ {
+ free (pow5_ptr);
+ free (memory);
+ return NULL;
+ }
+ /* Construct 2^|s|. */
+ {
+ mp_limb_t *ptr = pow5_ptr + pow5_len;
+ size_t i;
+ for (i = 0; i < s_limbs; i++)
+ ptr[i] = 0;
+ ptr[s_limbs] = (mp_limb_t) 1 << s_bits;
+ denominator.limbs = ptr;
+ denominator.nlimbs = s_limbs + 1;
+ }
+ z_memory = divide (numerator, denominator, &z);
+ free (tmp_memory);
+ }
+ else
+ {
+ /* n < 0, s > 0.
+ Multiply m with 2^s, then divide by pow5. */
+ mpn_t numerator;
+ mp_limb_t *num_ptr;
+ num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1)
+ * sizeof (mp_limb_t));
+ if (num_ptr == NULL)
+ {
+ free (pow5_ptr);
+ free (memory);
+ return NULL;
+ }
+ {
+ mp_limb_t *destptr = num_ptr;
+ {
+ size_t i;
+ for (i = 0; i < s_limbs; i++)
+ *destptr++ = 0;
+ }
+ if (s_bits > 0)
+ {
+ const mp_limb_t *sourceptr = m.limbs;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = m.nlimbs; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *sourceptr++ << s_bits;
+ *destptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ if (accu > 0)
+ *destptr++ = (mp_limb_t) accu;
+ }
+ else
+ {
+ const mp_limb_t *sourceptr = m.limbs;
+ size_t count;
+ for (count = m.nlimbs; count > 0; count--)
+ *destptr++ = *sourceptr++;
+ }
+ numerator.limbs = num_ptr;
+ numerator.nlimbs = destptr - num_ptr;
+ }
+ z_memory = divide (numerator, pow5, &z);
+ free (num_ptr);
+ }
+ }
+ free (pow5_ptr);
+ free (memory);
+
+ /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */
+
+ if (z_memory == NULL)
+ return NULL;
+ digits = convert_to_decimal (z, extra_zeroes);
+ free (z_memory);
+ return digits;
+}
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and >= 0, and n is an integer:
+ Returns the decimal representation of round (x * 10^n).
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+scale10_round_decimal_long_double (long double x, int n)
+{
+ int e IF_LINT(= 0);
+ mpn_t m;
+ void *memory = decode_long_double (x, &e, &m);
+ return scale10_round_decimal_decoded (e, m, memory, n);
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and >= 0, and n is an integer:
+ Returns the decimal representation of round (x * 10^n).
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+scale10_round_decimal_double (double x, int n)
+{
+ int e IF_LINT(= 0);
+ mpn_t m;
+ void *memory = decode_double (x, &e, &m);
+ return scale10_round_decimal_decoded (e, m, memory, n);
+}
+
+# endif
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and > 0:
+ Return an approximation for n with 10^n <= x < 10^(n+1).
+ The approximation is usually the right n, but may be off by 1 sometimes. */
+static int
+floorlog10l (long double x)
+{
+ int exp;
+ long double y;
+ double z;
+ double l;
+
+ /* Split into exponential part and mantissa. */
+ y = frexpl (x, &exp);
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ if (y == 0.0L)
+ return INT_MIN;
+ if (y < 0.5L)
+ {
+ while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2))))
+ {
+ y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2));
+ exp -= GMP_LIMB_BITS;
+ }
+ if (y < (1.0L / (1 << 16)))
+ {
+ y *= 1.0L * (1 << 16);
+ exp -= 16;
+ }
+ if (y < (1.0L / (1 << 8)))
+ {
+ y *= 1.0L * (1 << 8);
+ exp -= 8;
+ }
+ if (y < (1.0L / (1 << 4)))
+ {
+ y *= 1.0L * (1 << 4);
+ exp -= 4;
+ }
+ if (y < (1.0L / (1 << 2)))
+ {
+ y *= 1.0L * (1 << 2);
+ exp -= 2;
+ }
+ if (y < (1.0L / (1 << 1)))
+ {
+ y *= 1.0L * (1 << 1);
+ exp -= 1;
+ }
+ }
+ if (!(y >= 0.5L && y < 1.0L))
+ abort ();
+ /* Compute an approximation for l = log2(x) = exp + log2(y). */
+ l = exp;
+ z = y;
+ if (z < 0.70710678118654752444)
+ {
+ z *= 1.4142135623730950488;
+ l -= 0.5;
+ }
+ if (z < 0.8408964152537145431)
+ {
+ z *= 1.1892071150027210667;
+ l -= 0.25;
+ }
+ if (z < 0.91700404320467123175)
+ {
+ z *= 1.0905077326652576592;
+ l -= 0.125;
+ }
+ if (z < 0.9576032806985736469)
+ {
+ z *= 1.0442737824274138403;
+ l -= 0.0625;
+ }
+ /* Now 0.95 <= z <= 1.01. */
+ z = 1 - z;
+ /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...)
+ Four terms are enough to get an approximation with error < 10^-7. */
+ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25)));
+ /* Finally multiply with log(2)/log(10), yields an approximation for
+ log10(x). */
+ l *= 0.30102999566398119523;
+ /* Round down to the next integer. */
+ return (int) l + (l < 0 ? -1 : 0);
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and > 0:
+ Return an approximation for n with 10^n <= x < 10^(n+1).
+ The approximation is usually the right n, but may be off by 1 sometimes. */
+static int
+floorlog10 (double x)
+{
+ int exp;
+ double y;
+ double z;
+ double l;
+
+ /* Split into exponential part and mantissa. */
+ y = frexp (x, &exp);
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ if (y == 0.0)
+ return INT_MIN;
+ if (y < 0.5)
+ {
+ while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2))))
+ {
+ y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2));
+ exp -= GMP_LIMB_BITS;
+ }
+ if (y < (1.0 / (1 << 16)))
+ {
+ y *= 1.0 * (1 << 16);
+ exp -= 16;
+ }
+ if (y < (1.0 / (1 << 8)))
+ {
+ y *= 1.0 * (1 << 8);
+ exp -= 8;
+ }
+ if (y < (1.0 / (1 << 4)))
+ {
+ y *= 1.0 * (1 << 4);
+ exp -= 4;
+ }
+ if (y < (1.0 / (1 << 2)))
+ {
+ y *= 1.0 * (1 << 2);
+ exp -= 2;
+ }
+ if (y < (1.0 / (1 << 1)))
+ {
+ y *= 1.0 * (1 << 1);
+ exp -= 1;
+ }
+ }
+ if (!(y >= 0.5 && y < 1.0))
+ abort ();
+ /* Compute an approximation for l = log2(x) = exp + log2(y). */
+ l = exp;
+ z = y;
+ if (z < 0.70710678118654752444)
+ {
+ z *= 1.4142135623730950488;
+ l -= 0.5;
+ }
+ if (z < 0.8408964152537145431)
+ {
+ z *= 1.1892071150027210667;
+ l -= 0.25;
+ }
+ if (z < 0.91700404320467123175)
+ {
+ z *= 1.0905077326652576592;
+ l -= 0.125;
+ }
+ if (z < 0.9576032806985736469)
+ {
+ z *= 1.0442737824274138403;
+ l -= 0.0625;
+ }
+ /* Now 0.95 <= z <= 1.01. */
+ z = 1 - z;
+ /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...)
+ Four terms are enough to get an approximation with error < 10^-7. */
+ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25)));
+ /* Finally multiply with log(2)/log(10), yields an approximation for
+ log10(x). */
+ l *= 0.30102999566398119523;
+ /* Round down to the next integer. */
+ return (int) l + (l < 0 ? -1 : 0);
+}
+
+# endif
+
+/* Tests whether a string of digits consists of exactly PRECISION zeroes and
+ a single '1' digit. */
+static int
+is_borderline (const char *digits, size_t precision)
+{
+ for (; precision > 0; precision--, digits++)
+ if (*digits != '0')
+ return 0;
+ if (*digits != '1')
+ return 0;
+ digits++;
+ return *digits == '\0';
+}
+
+#endif
+
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99
+
+/* Use a different function name, to make it possible that the 'wchar_t'
+ parametrization and the 'char' parametrization get compiled in the same
+ translation unit. */
+# if WIDE_CHAR_VERSION
+# define MAX_ROOM_NEEDED wmax_room_needed
+# else
+# define MAX_ROOM_NEEDED max_room_needed
+# endif
+
+/* Returns the number of TCHAR_T units needed as temporary space for the result
+ of sprintf or SNPRINTF of a single conversion directive. */
+static inline size_t
+MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
+ arg_type type, int flags, size_t width, int has_precision,
+ size_t precision, int pad_ourselves)
+{
+ size_t tmp_length;
+
+ switch (conversion)
+ {
+ case 'd': case 'i': case 'u':
+# if HAVE_LONG_LONG_INT
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+# endif
+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Multiply by 2, as an estimate for FLAG_GROUP. */
+ tmp_length = xsum (tmp_length, tmp_length);
+ /* Add 1, to account for a leading sign. */
+ tmp_length = xsum (tmp_length, 1);
+ break;
+
+ case 'o':
+# if HAVE_LONG_LONG_INT
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+# endif
+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Add 1, to account for a leading sign. */
+ tmp_length = xsum (tmp_length, 1);
+ break;
+
+ case 'x': case 'X':
+# if HAVE_LONG_LONG_INT
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+# endif
+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Add 2, to account for a leading sign or alternate form. */
+ tmp_length = xsum (tmp_length, 2);
+ break;
+
+ case 'f': case 'F':
+ if (type == TYPE_LONGDOUBLE)
+ tmp_length =
+ (unsigned int) (LDBL_MAX_EXP
+ * 0.30103 /* binary -> decimal */
+ * 2 /* estimate for FLAG_GROUP */
+ )
+ + 1 /* turn floor into ceil */
+ + 10; /* sign, decimal point etc. */
+ else
+ tmp_length =
+ (unsigned int) (DBL_MAX_EXP
+ * 0.30103 /* binary -> decimal */
+ * 2 /* estimate for FLAG_GROUP */
+ )
+ + 1 /* turn floor into ceil */
+ + 10; /* sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, precision);
+ break;
+
+ case 'e': case 'E': case 'g': case 'G':
+ tmp_length =
+ 12; /* sign, decimal point, exponent etc. */
+ tmp_length = xsum (tmp_length, precision);
+ break;
+
+ case 'a': case 'A':
+ if (type == TYPE_LONGDOUBLE)
+ tmp_length =
+ (unsigned int) (LDBL_DIG
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (DBL_DIG
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Account for sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, 12);
+ break;
+
+ case 'c':
+# if HAVE_WINT_T && !WIDE_CHAR_VERSION
+ if (type == TYPE_WIDE_CHAR)
+ tmp_length = MB_CUR_MAX;
+ else
+# endif
+ tmp_length = 1;
+ break;
+
+ case 's':
+# if HAVE_WCHAR_T
+ if (type == TYPE_WIDE_STRING)
+ {
+# if WIDE_CHAR_VERSION
+ /* ISO C says about %ls in fwprintf:
+ "If the precision is not specified or is greater than the size
+ of the array, the array shall contain a null wide character."
+ So if there is a precision, we must not use wcslen. */
+ const wchar_t *arg = ap->arg[arg_index].a.a_wide_string;
+
+ if (has_precision)
+ tmp_length = local_wcsnlen (arg, precision);
+ else
+ tmp_length = local_wcslen (arg);
+# else
+ /* ISO C says about %ls in fprintf:
+ "If a precision is specified, no more than that many bytes are
+ written (including shift sequences, if any), and the array
+ shall contain a null wide character if, to equal the multibyte
+ character sequence length given by the precision, the function
+ would need to access a wide character one past the end of the
+ array."
+ So if there is a precision, we must not use wcslen. */
+ /* This case has already been handled separately in VASNPRINTF. */
+ abort ();
+# endif
+ }
+ else
+# endif
+ {
+# if WIDE_CHAR_VERSION
+ /* ISO C says about %s in fwprintf:
+ "If the precision is not specified or is greater than the size
+ of the converted array, the converted array shall contain a
+ null wide character."
+ So if there is a precision, we must not use strlen. */
+ /* This case has already been handled separately in VASNPRINTF. */
+ abort ();
+# else
+ /* ISO C says about %s in fprintf:
+ "If the precision is not specified or greater than the size of
+ the array, the array shall contain a null character."
+ So if there is a precision, we must not use strlen. */
+ const char *arg = ap->arg[arg_index].a.a_string;
+
+ if (has_precision)
+ tmp_length = local_strnlen (arg, precision);
+ else
+ tmp_length = strlen (arg);
+# endif
+ }
+ break;
+
+ case 'p':
+ tmp_length =
+ (unsigned int) (sizeof (void *) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1 /* turn floor into ceil */
+ + 2; /* account for leading 0x */
+ break;
+
+ default:
+ abort ();
+ }
+
+ if (!pad_ourselves)
+ {
+# if ENABLE_UNISTDIO
+ /* Padding considers the number of characters, therefore the number of
+ elements after padding may be
+ > max (tmp_length, width)
+ but is certainly
+ <= tmp_length + width. */
+ tmp_length = xsum (tmp_length, width);
+# else
+ /* Padding considers the number of elements, says POSIX. */
+ if (tmp_length < width)
+ tmp_length = width;
+# endif
+ }
+
+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+ return tmp_length;
+}
+
+#endif
+
+DCHAR_T *
+VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ const FCHAR_T *format, va_list args)
+{
+ DIRECTIVES d;
+ arguments a;
+
+ if (PRINTF_PARSE (format, &d, &a) < 0)
+ /* errno is already set. */
+ return NULL;
+
+#define CLEANUP() \
+ free (d.dir); \
+ if (a.arg) \
+ free (a.arg);
+
+ if (PRINTF_FETCHARGS (args, &a) < 0)
+ {
+ CLEANUP ();
+ errno = EINVAL;
+ return NULL;
+ }
+
+ {
+ size_t buf_neededlength;
+ TCHAR_T *buf;
+ TCHAR_T *buf_malloced;
+ const FCHAR_T *cp;
+ size_t i;
+ DIRECTIVE *dp;
+ /* Output string accumulator. */
+ DCHAR_T *result;
+ size_t allocated;
+ size_t length;
+
+ /* Allocate a small buffer that will hold a directive passed to
+ sprintf or snprintf. */
+ buf_neededlength =
+ xsum4 (7, d.max_width_length, d.max_precision_length, 6);
+#if HAVE_ALLOCA
+ if (buf_neededlength < 4000 / sizeof (TCHAR_T))
+ {
+ buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T));
+ buf_malloced = NULL;
+ }
+ else
+#endif
+ {
+ size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T));
+ if (size_overflow_p (buf_memsize))
+ goto out_of_memory_1;
+ buf = (TCHAR_T *) malloc (buf_memsize);
+ if (buf == NULL)
+ goto out_of_memory_1;
+ buf_malloced = buf;
+ }
+
+ if (resultbuf != NULL)
+ {
+ result = resultbuf;
+ allocated = *lengthp;
+ }
+ else
+ {
+ result = NULL;
+ allocated = 0;
+ }
+ length = 0;
+ /* Invariants:
+ result is either == resultbuf or == NULL or malloc-allocated.
+ If length > 0, then result != NULL. */
+
+ /* Ensures that allocated >= needed. Aborts through a jump to
+ out_of_memory if needed is SIZE_MAX or otherwise too big. */
+#define ENSURE_ALLOCATION(needed) \
+ if ((needed) > allocated) \
+ { \
+ size_t memory_size; \
+ DCHAR_T *memory; \
+ \
+ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
+ if ((needed) > allocated) \
+ allocated = (needed); \
+ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \
+ if (size_overflow_p (memory_size)) \
+ goto out_of_memory; \
+ if (result == resultbuf || result == NULL) \
+ memory = (DCHAR_T *) malloc (memory_size); \
+ else \
+ memory = (DCHAR_T *) realloc (result, memory_size); \
+ if (memory == NULL) \
+ goto out_of_memory; \
+ if (result == resultbuf && length > 0) \
+ DCHAR_CPY (memory, result, length); \
+ result = memory; \
+ }
+
+ for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
+ {
+ if (cp != dp->dir_start)
+ {
+ size_t n = dp->dir_start - cp;
+ size_t augmented_length = xsum (length, n);
+
+ ENSURE_ALLOCATION (augmented_length);
+ /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we
+ need that the format string contains only ASCII characters
+ if FCHAR_T and DCHAR_T are not the same type. */
+ if (sizeof (FCHAR_T) == sizeof (DCHAR_T))
+ {
+ DCHAR_CPY (result + length, (const DCHAR_T *) cp, n);
+ length = augmented_length;
+ }
+ else
+ {
+ do
+ result[length++] = (unsigned char) *cp++;
+ while (--n > 0);
+ }
+ }
+ if (i == d.count)
+ break;
+
+ /* Execute a single directive. */
+ if (dp->conversion == '%')
+ {
+ size_t augmented_length;
+
+ if (!(dp->arg_index == ARG_NONE))
+ abort ();
+ augmented_length = xsum (length, 1);
+ ENSURE_ALLOCATION (augmented_length);
+ result[length] = '%';
+ length = augmented_length;
+ }
+ else
+ {
+ if (!(dp->arg_index != ARG_NONE))
+ abort ();
+
+ if (dp->conversion == 'n')
+ {
+ switch (a.arg[dp->arg_index].type)
+ {
+ case TYPE_COUNT_SCHAR_POINTER:
+ *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
+ break;
+ case TYPE_COUNT_SHORT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_short_pointer = length;
+ break;
+ case TYPE_COUNT_INT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int_pointer = length;
+ break;
+ case TYPE_COUNT_LONGINT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_COUNT_LONGLONGINT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
+ break;
+#endif
+ default:
+ abort ();
+ }
+ }
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ else if (dp->conversion == 'U')
+ {
+ arg_type type = a.arg[dp->arg_index].type;
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 0;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ switch (type)
+ {
+ case TYPE_U8_STRING:
+ {
+ const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string;
+ const uint8_t *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only PRECISION characters, from the left. */
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count = u8_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of
+ characters. */
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count = u8_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + u8_strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_UINT8_T
+ {
+ size_t n = arg_end - arg;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_CPY (result + length, arg, n);
+ length += n;
+ }
+# else
+ { /* Convert. */
+ DCHAR_T *converted = result + length;
+ size_t converted_len = allocated - length;
+# if DCHAR_IS_TCHAR
+ /* Convert from UTF-8 to locale encoding. */
+ converted =
+ u8_conv_to_encoding (locale_charset (),
+ iconveh_question_mark,
+ arg, arg_end - arg, NULL,
+ converted, &converted_len);
+# else
+ /* Convert from UTF-8 to UTF-16/UTF-32. */
+ converted =
+ U8_TO_DCHAR (arg, arg_end - arg,
+ converted, &converted_len);
+# endif
+ if (converted == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ if (converted != result + length)
+ {
+ ENSURE_ALLOCATION (xsum (length, converted_len));
+ DCHAR_CPY (result + length, converted, converted_len);
+ free (converted);
+ }
+ length += converted_len;
+ }
+# endif
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ break;
+
+ case TYPE_U16_STRING:
+ {
+ const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string;
+ const uint16_t *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only PRECISION characters, from the left. */
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count = u16_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of
+ characters. */
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count = u16_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + u16_strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_UINT16_T
+ {
+ size_t n = arg_end - arg;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_CPY (result + length, arg, n);
+ length += n;
+ }
+# else
+ { /* Convert. */
+ DCHAR_T *converted = result + length;
+ size_t converted_len = allocated - length;
+# if DCHAR_IS_TCHAR
+ /* Convert from UTF-16 to locale encoding. */
+ converted =
+ u16_conv_to_encoding (locale_charset (),
+ iconveh_question_mark,
+ arg, arg_end - arg, NULL,
+ converted, &converted_len);
+# else
+ /* Convert from UTF-16 to UTF-8/UTF-32. */
+ converted =
+ U16_TO_DCHAR (arg, arg_end - arg,
+ converted, &converted_len);
+# endif
+ if (converted == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ if (converted != result + length)
+ {
+ ENSURE_ALLOCATION (xsum (length, converted_len));
+ DCHAR_CPY (result + length, converted, converted_len);
+ free (converted);
+ }
+ length += converted_len;
+ }
+# endif
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ break;
+
+ case TYPE_U32_STRING:
+ {
+ const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string;
+ const uint32_t *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only PRECISION characters, from the left. */
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count = u32_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of
+ characters. */
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count = u32_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + u32_strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_UINT32_T
+ {
+ size_t n = arg_end - arg;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_CPY (result + length, arg, n);
+ length += n;
+ }
+# else
+ { /* Convert. */
+ DCHAR_T *converted = result + length;
+ size_t converted_len = allocated - length;
+# if DCHAR_IS_TCHAR
+ /* Convert from UTF-32 to locale encoding. */
+ converted =
+ u32_conv_to_encoding (locale_charset (),
+ iconveh_question_mark,
+ arg, arg_end - arg, NULL,
+ converted, &converted_len);
+# else
+ /* Convert from UTF-32 to UTF-8/UTF-16. */
+ converted =
+ U32_TO_DCHAR (arg, arg_end - arg,
+ converted, &converted_len);
+# endif
+ if (converted == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ if (converted != result + length)
+ {
+ ENSURE_ALLOCATION (xsum (length, converted_len));
+ DCHAR_CPY (result + length, converted, converted_len);
+ free (converted);
+ }
+ length += converted_len;
+ }
+# endif
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+#endif
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
+ else if (dp->conversion == 's'
+# if WIDE_CHAR_VERSION
+ && a.arg[dp->arg_index].type != TYPE_WIDE_STRING
+# else
+ && a.arg[dp->arg_index].type == TYPE_WIDE_STRING
+# endif
+ )
+ {
+ /* The normal handling of the 's' directive below requires
+ allocating a temporary buffer. The determination of its
+ length (tmp_length), in the case when a precision is
+ specified, below requires a conversion between a char[]
+ string and a wchar_t[] wide string. It could be done, but
+ we have no guarantee that the implementation of sprintf will
+ use the exactly same algorithm. Without this guarantee, it
+ is possible to have buffer overrun bugs. In order to avoid
+ such bugs, we implement the entire processing of the 's'
+ directive ourselves. */
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 6;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+# if WIDE_CHAR_VERSION
+ /* %s in vasnwprintf. See the specification of fwprintf. */
+ {
+ const char *arg = a.arg[dp->arg_index].a.a_string;
+ const char *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only as many bytes as needed to produce PRECISION
+ wide characters, from the left. */
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrlen (arg_end, MB_CUR_MAX, &state);
+# else
+ count = mblen (arg_end, MB_CUR_MAX);
+# endif
+ if (count == 0)
+ /* Found the terminating NUL. */
+ break;
+ if (count < 0)
+ {
+ /* Invalid or incomplete multibyte character. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of wide
+ characters. */
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrlen (arg_end, MB_CUR_MAX, &state);
+# else
+ count = mblen (arg_end, MB_CUR_MAX);
+# endif
+ if (count == 0)
+ /* Found the terminating NUL. */
+ break;
+ if (count < 0)
+ {
+ /* Invalid or incomplete multibyte character. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+ if (has_precision || has_width)
+ {
+ /* We know the number of wide characters in advance. */
+ size_t remaining;
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ ENSURE_ALLOCATION (xsum (length, characters));
+ for (remaining = characters; remaining > 0; remaining--)
+ {
+ wchar_t wc;
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrtowc (&wc, arg, arg_end - arg, &state);
+# else
+ count = mbtowc (&wc, arg, arg_end - arg);
+# endif
+ if (count <= 0)
+ /* mbrtowc not consistent with mbrlen, or mbtowc
+ not consistent with mblen. */
+ abort ();
+ result[length++] = wc;
+ arg += count;
+ }
+ if (!(arg == arg_end))
+ abort ();
+ }
+ else
+ {
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ while (arg < arg_end)
+ {
+ wchar_t wc;
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrtowc (&wc, arg, arg_end - arg, &state);
+# else
+ count = mbtowc (&wc, arg, arg_end - arg);
+# endif
+ if (count <= 0)
+ /* mbrtowc not consistent with mbrlen, or mbtowc
+ not consistent with mblen. */
+ abort ();
+ ENSURE_ALLOCATION (xsum (length, 1));
+ result[length++] = wc;
+ arg += count;
+ }
+ }
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+# else
+ /* %ls in vasnprintf. See the specification of fprintf. */
+ {
+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+ const wchar_t *arg_end;
+ size_t characters;
+# if !DCHAR_IS_TCHAR
+ /* This code assumes that TCHAR_T is 'char'. */
+ typedef int TCHAR_T_verify[2 * (sizeof (TCHAR_T) == 1) - 1];
+ TCHAR_T *tmpsrc;
+ DCHAR_T *tmpdst;
+ size_t tmpdst_len;
+# endif
+ size_t w;
+
+ if (has_precision)
+ {
+ /* Use only as many wide characters as needed to produce
+ at most PRECISION bytes, from the left. */
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ while (precision > 0)
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg_end == 0)
+ /* Found the terminating null wide character. */
+ break;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg_end, &state);
+# else
+ count = wctomb (cbuf, *arg_end);
+# endif
+ if (count < 0)
+ {
+ /* Cannot convert. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ if (precision < count)
+ break;
+ arg_end++;
+ characters += count;
+ precision -= count;
+ }
+ }
+# if DCHAR_IS_TCHAR
+ else if (has_width)
+# else
+ else
+# endif
+ {
+ /* Use the entire string, and count the number of
+ bytes. */
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg_end == 0)
+ /* Found the terminating null wide character. */
+ break;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg_end, &state);
+# else
+ count = wctomb (cbuf, *arg_end);
+# endif
+ if (count < 0)
+ {
+ /* Cannot convert. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end++;
+ characters += count;
+ }
+ }
+# if DCHAR_IS_TCHAR
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + local_wcslen (arg);
+ /* The number of bytes doesn't matter. */
+ characters = 0;
+ }
+# endif
+
+# if !DCHAR_IS_TCHAR
+ /* Convert the string into a piece of temporary memory. */
+ tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T));
+ if (tmpsrc == NULL)
+ goto out_of_memory;
+ {
+ TCHAR_T *tmpptr = tmpsrc;
+ size_t remaining;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ for (remaining = characters; remaining > 0; )
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg, &state);
+# else
+ count = wctomb (cbuf, *arg);
+# endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+ memcpy (tmpptr, cbuf, count);
+ tmpptr += count;
+ arg++;
+ remaining -= count;
+ }
+ if (!(arg == arg_end))
+ abort ();
+ }
+
+ /* Convert from TCHAR_T[] to DCHAR_T[]. */
+ tmpdst =
+ DCHAR_CONV_FROM_ENCODING (locale_charset (),
+ iconveh_question_mark,
+ tmpsrc, characters,
+ NULL,
+ NULL, &tmpdst_len);
+ if (tmpdst == NULL)
+ {
+ int saved_errno = errno;
+ free (tmpsrc);
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ free (tmpsrc);
+# endif
+
+ if (has_width)
+ {
+# if ENABLE_UNISTDIO
+ /* Outside POSIX, it's preferrable to compare the width
+ against the number of _characters_ of the converted
+ value. */
+ w = DCHAR_MBSNLEN (result + length, characters);
+# else
+ /* The width is compared against the number of _bytes_
+ of the converted value, says POSIX. */
+ w = characters;
+# endif
+ }
+ else
+ /* w doesn't matter. */
+ w = 0;
+
+ if (has_width && width > w
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - w;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_TCHAR
+ if (has_precision || has_width)
+ {
+ /* We know the number of bytes in advance. */
+ size_t remaining;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ ENSURE_ALLOCATION (xsum (length, characters));
+ for (remaining = characters; remaining > 0; )
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg, &state);
+# else
+ count = wctomb (cbuf, *arg);
+# endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+ memcpy (result + length, cbuf, count);
+ length += count;
+ arg++;
+ remaining -= count;
+ }
+ if (!(arg == arg_end))
+ abort ();
+ }
+ else
+ {
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ while (arg < arg_end)
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg, &state);
+# else
+ count = wctomb (cbuf, *arg);
+# endif
+ if (count <= 0)
+ {
+ /* Cannot convert. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ ENSURE_ALLOCATION (xsum (length, count));
+ memcpy (result + length, cbuf, count);
+ length += count;
+ arg++;
+ }
+ }
+# else
+ ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+ DCHAR_CPY (result + length, tmpdst, tmpdst_len);
+ free (tmpdst);
+ length += tmpdst_len;
+# endif
+
+ if (has_width && width > w
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - w;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+# endif
+ }
+#endif
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+ else if ((dp->conversion == 'a' || dp->conversion == 'A')
+# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE))
+ && (0
+# if NEED_PRINTF_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_DOUBLE
+# endif
+# if NEED_PRINTF_LONG_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+# endif
+ )
+# endif
+ )
+ {
+ arg_type type = a.arg[dp->arg_index].type;
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+ size_t tmp_length;
+ DCHAR_T tmpbuf[700];
+ DCHAR_T *tmp;
+ DCHAR_T *pad_ptr;
+ DCHAR_T *p;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 0;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ /* Allocate a temporary buffer of sufficient size. */
+ if (type == TYPE_LONGDOUBLE)
+ tmp_length =
+ (unsigned int) ((LDBL_DIG + 1)
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) ((DBL_DIG + 1)
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Account for sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, 12);
+
+ if (tmp_length < width)
+ tmp_length = width;
+
+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+ tmp = tmpbuf;
+ else
+ {
+ size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+ if (size_overflow_p (tmp_memsize))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ tmp = (DCHAR_T *) malloc (tmp_memsize);
+ if (tmp == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ }
+
+ pad_ptr = NULL;
+ p = tmp;
+ if (type == TYPE_LONGDOUBLE)
+ {
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+
+ if (isnanl (arg))
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+ DECL_LONG_DOUBLE_ROUNDING
+
+ BEGIN_LONG_DOUBLE_ROUNDING ();
+
+ if (signbit (arg)) /* arg < 0.0L or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0L && arg + arg == arg)
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+ int exponent;
+ long double mantissa;
+
+ if (arg > 0.0L)
+ mantissa = printf_frexpl (arg, &exponent);
+ else
+ {
+ exponent = 0;
+ mantissa = 0.0L;
+ }
+
+ if (has_precision
+ && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1)
+ {
+ /* Round the mantissa. */
+ long double tail = mantissa;
+ size_t q;
+
+ for (q = precision; ; q--)
+ {
+ int digit = (int) tail;
+ tail -= digit;
+ if (q == 0)
+ {
+ if (digit & 1 ? tail >= 0.5L : tail > 0.5L)
+ tail = 1 - tail;
+ else
+ tail = - tail;
+ break;
+ }
+ tail *= 16.0L;
+ }
+ if (tail != 0.0L)
+ for (q = precision; q > 0; q--)
+ tail *= 0.0625L;
+ mantissa += tail;
+ }
+
+ *p++ = '0';
+ *p++ = dp->conversion - 'A' + 'X';
+ pad_ptr = p;
+ {
+ int digit;
+
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = '0' + digit;
+ if ((flags & FLAG_ALT)
+ || mantissa > 0.0L || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ /* This loop terminates because we assume
+ that FLT_RADIX is a power of 2. */
+ while (mantissa > 0.0L)
+ {
+ mantissa *= 16.0L;
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = digit
+ + (digit < 10
+ ? '0'
+ : dp->conversion - 10);
+ if (precision > 0)
+ precision--;
+ }
+ while (precision > 0)
+ {
+ *p++ = '0';
+ precision--;
+ }
+ }
+ }
+ *p++ = dp->conversion - 'A' + 'P';
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+
+ END_LONG_DOUBLE_ROUNDING ();
+ }
+# else
+ abort ();
+# endif
+ }
+ else
+ {
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE
+ double arg = a.arg[dp->arg_index].a.a_double;
+
+ if (isnand (arg))
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+
+ if (signbit (arg)) /* arg < 0.0 or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0 && arg + arg == arg)
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+ int exponent;
+ double mantissa;
+
+ if (arg > 0.0)
+ mantissa = printf_frexp (arg, &exponent);
+ else
+ {
+ exponent = 0;
+ mantissa = 0.0;
+ }
+
+ if (has_precision
+ && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1)
+ {
+ /* Round the mantissa. */
+ double tail = mantissa;
+ size_t q;
+
+ for (q = precision; ; q--)
+ {
+ int digit = (int) tail;
+ tail -= digit;
+ if (q == 0)
+ {
+ if (digit & 1 ? tail >= 0.5 : tail > 0.5)
+ tail = 1 - tail;
+ else
+ tail = - tail;
+ break;
+ }
+ tail *= 16.0;
+ }
+ if (tail != 0.0)
+ for (q = precision; q > 0; q--)
+ tail *= 0.0625;
+ mantissa += tail;
+ }
+
+ *p++ = '0';
+ *p++ = dp->conversion - 'A' + 'X';
+ pad_ptr = p;
+ {
+ int digit;
+
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = '0' + digit;
+ if ((flags & FLAG_ALT)
+ || mantissa > 0.0 || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ /* This loop terminates because we assume
+ that FLT_RADIX is a power of 2. */
+ while (mantissa > 0.0)
+ {
+ mantissa *= 16.0;
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = digit
+ + (digit < 10
+ ? '0'
+ : dp->conversion - 10);
+ if (precision > 0)
+ precision--;
+ }
+ while (precision > 0)
+ {
+ *p++ = '0';
+ precision--;
+ }
+ }
+ }
+ *p++ = dp->conversion - 'A' + 'P';
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+ }
+# else
+ abort ();
+# endif
+ }
+ /* The generated string now extends from tmp to p, with the
+ zero padding insertion point being at pad_ptr. */
+ if (has_width && p - tmp < width)
+ {
+ size_t pad = width - (p - tmp);
+ DCHAR_T *end = p + pad;
+
+ if (flags & FLAG_LEFT)
+ {
+ /* Pad with spaces on the right. */
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ {
+ /* Pad with zeroes. */
+ DCHAR_T *q = end;
+
+ while (p > pad_ptr)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = '0';
+ }
+ else
+ {
+ /* Pad with spaces on the left. */
+ DCHAR_T *q = end;
+
+ while (p > tmp)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+
+ p = end;
+ }
+
+ {
+ size_t count = p - tmp;
+
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
+
+ /* Make room for the result. */
+ if (count >= allocated - length)
+ {
+ size_t n = xsum (length, count);
+
+ ENSURE_ALLOCATION (n);
+ }
+
+ /* Append the result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+ if (tmp != tmpbuf)
+ free (tmp);
+ length += count;
+ }
+ }
+#endif
+#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+ else if ((dp->conversion == 'f' || dp->conversion == 'F'
+ || dp->conversion == 'e' || dp->conversion == 'E'
+ || dp->conversion == 'g' || dp->conversion == 'G'
+ || dp->conversion == 'a' || dp->conversion == 'A')
+ && (0
+# if NEED_PRINTF_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_DOUBLE
+# elif NEED_PRINTF_INFINITE_DOUBLE
+ || (a.arg[dp->arg_index].type == TYPE_DOUBLE
+ /* The systems (mingw) which produce wrong output
+ for Inf, -Inf, and NaN also do so for -0.0.
+ Therefore we treat this case here as well. */
+ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double))
+# endif
+# if NEED_PRINTF_LONG_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+# elif NEED_PRINTF_INFINITE_LONG_DOUBLE
+ || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+ /* Some systems produce wrong output for Inf,
+ -Inf, and NaN. Some systems in this category
+ (IRIX 5.3) also do so for -0.0. Therefore we
+ treat this case here as well. */
+ && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble))
+# endif
+ ))
+ {
+# if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE)
+ arg_type type = a.arg[dp->arg_index].type;
+# endif
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+ size_t tmp_length;
+ DCHAR_T tmpbuf[700];
+ DCHAR_T *tmp;
+ DCHAR_T *pad_ptr;
+ DCHAR_T *p;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 0;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ /* POSIX specifies the default precision to be 6 for %f, %F,
+ %e, %E, but not for %g, %G. Implementations appear to use
+ the same default precision also for %g, %G. But for %a, %A,
+ the default precision is 0. */
+ if (!has_precision)
+ if (!(dp->conversion == 'a' || dp->conversion == 'A'))
+ precision = 6;
+
+ /* Allocate a temporary buffer of sufficient size. */
+# if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE
+ tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1);
+# elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE
+ tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0);
+# elif NEED_PRINTF_LONG_DOUBLE
+ tmp_length = LDBL_DIG + 1;
+# elif NEED_PRINTF_DOUBLE
+ tmp_length = DBL_DIG + 1;
+# else
+ tmp_length = 0;
+# endif
+ if (tmp_length < precision)
+ tmp_length = precision;
+# if NEED_PRINTF_LONG_DOUBLE
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ if (type == TYPE_LONGDOUBLE)
+# endif
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+ if (!(isnanl (arg) || arg + arg == arg))
+ {
+ /* arg is finite and nonzero. */
+ int exponent = floorlog10l (arg < 0 ? -arg : arg);
+ if (exponent >= 0 && tmp_length < exponent + precision)
+ tmp_length = exponent + precision;
+ }
+ }
+# endif
+# if NEED_PRINTF_DOUBLE
+# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
+ if (type == TYPE_DOUBLE)
+# endif
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ double arg = a.arg[dp->arg_index].a.a_double;
+ if (!(isnand (arg) || arg + arg == arg))
+ {
+ /* arg is finite and nonzero. */
+ int exponent = floorlog10 (arg < 0 ? -arg : arg);
+ if (exponent >= 0 && tmp_length < exponent + precision)
+ tmp_length = exponent + precision;
+ }
+ }
+# endif
+ /* Account for sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, 12);
+
+ if (tmp_length < width)
+ tmp_length = width;
+
+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+ tmp = tmpbuf;
+ else
+ {
+ size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+ if (size_overflow_p (tmp_memsize))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ tmp = (DCHAR_T *) malloc (tmp_memsize);
+ if (tmp == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ }
+
+ pad_ptr = NULL;
+ p = tmp;
+
+# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ if (type == TYPE_LONGDOUBLE)
+# endif
+ {
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+
+ if (isnanl (arg))
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+ DECL_LONG_DOUBLE_ROUNDING
+
+ BEGIN_LONG_DOUBLE_ROUNDING ();
+
+ if (signbit (arg)) /* arg < 0.0L or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0L && arg + arg == arg)
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+# if NEED_PRINTF_LONG_DOUBLE
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ char *digits;
+ size_t ndigits;
+
+ digits =
+ scale10_round_decimal_long_double (arg, precision);
+ if (digits == NULL)
+ {
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ ndigits = strlen (digits);
+
+ if (ndigits > precision)
+ do
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ while (ndigits > precision);
+ else
+ *p++ = '0';
+ /* Here ndigits <= precision. */
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > ndigits; precision--)
+ *p++ = '0';
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ int exponent;
+
+ if (arg == 0.0L)
+ {
+ exponent = 0;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else
+ {
+ /* arg > 0.0L. */
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+
+ exponent = floorlog10l (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_long_double (arg,
+ (int)precision - exponent);
+ if (digits == NULL)
+ {
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ ndigits = strlen (digits);
+
+ if (ndigits == precision + 1)
+ break;
+ if (ndigits < precision
+ || ndigits > precision + 2)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits == precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision+1. */
+ if (is_borderline (digits, precision))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_long_double (arg,
+ (int)precision - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision + 1)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision+1. */
+
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+
+ *p++ = dp->conversion; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', '.', '2', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+.2d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+.2d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ if (precision == 0)
+ precision = 1;
+ /* precision >= 1. */
+
+ if (arg == 0.0L)
+ /* The exponent is 0, >= -4, < precision.
+ Use fixed-point notation. */
+ {
+ size_t ndigits = precision;
+ /* Number of trailing zeroes that have to be
+ dropped. */
+ size_t nzeroes =
+ (flags & FLAG_ALT ? 0 : precision - 1);
+
+ --ndigits;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = '0';
+ }
+ }
+ }
+ else
+ {
+ /* arg > 0.0L. */
+ int exponent;
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+ size_t nzeroes;
+
+ exponent = floorlog10l (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_long_double (arg,
+ (int)(precision - 1) - exponent);
+ if (digits == NULL)
+ {
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ ndigits = strlen (digits);
+
+ if (ndigits == precision)
+ break;
+ if (ndigits < precision - 1
+ || ndigits > precision + 1)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits < precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision. */
+ if (is_borderline (digits, precision - 1))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_long_double (arg,
+ (int)(precision - 1) - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision. */
+
+ /* Determine the number of trailing zeroes
+ that have to be dropped. */
+ nzeroes = 0;
+ if ((flags & FLAG_ALT) == 0)
+ while (nzeroes < ndigits
+ && digits[nzeroes] == '0')
+ nzeroes++;
+
+ /* The exponent is now determined. */
+ if (exponent >= -4
+ && exponent < (long)precision)
+ {
+ /* Fixed-point notation:
+ max(exponent,0)+1 digits, then the
+ decimal point, then the remaining
+ digits without trailing zeroes. */
+ if (exponent >= 0)
+ {
+ size_t count = exponent + 1;
+ /* Note: count <= precision = ndigits. */
+ for (; count > 0; count--)
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ size_t count = -exponent - 1;
+ *p++ = '0';
+ *p++ = decimal_point_char ();
+ for (; count > 0; count--)
+ *p++ = '0';
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ /* Exponential notation. */
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', '.', '2', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+.2d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+.2d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+
+ free (digits);
+ }
+ }
+ else
+ abort ();
+# else
+ /* arg is finite. */
+ if (!(arg == 0.0L))
+ abort ();
+
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ *p++ = dp->conversion; /* 'e' or 'E' */
+ *p++ = '+';
+ *p++ = '0';
+ *p++ = '0';
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ *p++ = '0';
+ if (flags & FLAG_ALT)
+ {
+ size_t ndigits =
+ (precision > 0 ? precision - 1 : 0);
+ *p++ = decimal_point_char ();
+ for (; ndigits > 0; --ndigits)
+ *p++ = '0';
+ }
+ }
+ else if (dp->conversion == 'a' || dp->conversion == 'A')
+ {
+ *p++ = '0';
+ *p++ = dp->conversion - 'A' + 'X';
+ pad_ptr = p;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ *p++ = dp->conversion - 'A' + 'P';
+ *p++ = '+';
+ *p++ = '0';
+ }
+ else
+ abort ();
+# endif
+ }
+
+ END_LONG_DOUBLE_ROUNDING ();
+ }
+ }
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ else
+# endif
+# endif
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ {
+ double arg = a.arg[dp->arg_index].a.a_double;
+
+ if (isnand (arg))
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+
+ if (signbit (arg)) /* arg < 0.0 or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0 && arg + arg == arg)
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+# if NEED_PRINTF_DOUBLE
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ char *digits;
+ size_t ndigits;
+
+ digits =
+ scale10_round_decimal_double (arg, precision);
+ if (digits == NULL)
+ goto out_of_memory;
+ ndigits = strlen (digits);
+
+ if (ndigits > precision)
+ do
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ while (ndigits > precision);
+ else
+ *p++ = '0';
+ /* Here ndigits <= precision. */
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > ndigits; precision--)
+ *p++ = '0';
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ int exponent;
+
+ if (arg == 0.0)
+ {
+ exponent = 0;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else
+ {
+ /* arg > 0.0. */
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+
+ exponent = floorlog10 (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_double (arg,
+ (int)precision - exponent);
+ if (digits == NULL)
+ goto out_of_memory;
+ ndigits = strlen (digits);
+
+ if (ndigits == precision + 1)
+ break;
+ if (ndigits < precision
+ || ndigits > precision + 2)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits == precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision+1. */
+ if (is_borderline (digits, precision))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_double (arg,
+ (int)precision - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision + 1)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision+1. */
+
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+
+ *p++ = dp->conversion; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ { '%', '+', '.', '3', 'd', '\0' };
+# else
+ { '%', '+', '.', '2', 'd', '\0' };
+# endif
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ {
+ static const char decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ "%+.3d";
+# else
+ "%+.2d";
+# endif
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, decimal_format, exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, decimal_format, exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+ }
+# endif
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ if (precision == 0)
+ precision = 1;
+ /* precision >= 1. */
+
+ if (arg == 0.0)
+ /* The exponent is 0, >= -4, < precision.
+ Use fixed-point notation. */
+ {
+ size_t ndigits = precision;
+ /* Number of trailing zeroes that have to be
+ dropped. */
+ size_t nzeroes =
+ (flags & FLAG_ALT ? 0 : precision - 1);
+
+ --ndigits;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = '0';
+ }
+ }
+ }
+ else
+ {
+ /* arg > 0.0. */
+ int exponent;
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+ size_t nzeroes;
+
+ exponent = floorlog10 (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_double (arg,
+ (int)(precision - 1) - exponent);
+ if (digits == NULL)
+ goto out_of_memory;
+ ndigits = strlen (digits);
+
+ if (ndigits == precision)
+ break;
+ if (ndigits < precision - 1
+ || ndigits > precision + 1)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits < precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision. */
+ if (is_borderline (digits, precision - 1))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_double (arg,
+ (int)(precision - 1) - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision. */
+
+ /* Determine the number of trailing zeroes
+ that have to be dropped. */
+ nzeroes = 0;
+ if ((flags & FLAG_ALT) == 0)
+ while (nzeroes < ndigits
+ && digits[nzeroes] == '0')
+ nzeroes++;
+
+ /* The exponent is now determined. */
+ if (exponent >= -4
+ && exponent < (long)precision)
+ {
+ /* Fixed-point notation:
+ max(exponent,0)+1 digits, then the
+ decimal point, then the remaining
+ digits without trailing zeroes. */
+ if (exponent >= 0)
+ {
+ size_t count = exponent + 1;
+ /* Note: count <= precision = ndigits. */
+ for (; count > 0; count--)
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ size_t count = -exponent - 1;
+ *p++ = '0';
+ *p++ = decimal_point_char ();
+ for (; count > 0; count--)
+ *p++ = '0';
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ /* Exponential notation. */
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ { '%', '+', '.', '3', 'd', '\0' };
+# else
+ { '%', '+', '.', '2', 'd', '\0' };
+# endif
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ {
+ static const char decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ "%+.3d";
+# else
+ "%+.2d";
+# endif
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, decimal_format, exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, decimal_format, exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+ }
+# endif
+ }
+
+ free (digits);
+ }
+ }
+ else
+ abort ();
+# else
+ /* arg is finite. */
+ if (!(arg == 0.0))
+ abort ();
+
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ *p++ = dp->conversion; /* 'e' or 'E' */
+ *p++ = '+';
+ /* Produce the same number of exponent digits as
+ the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ *p++ = '0';
+# endif
+ *p++ = '0';
+ *p++ = '0';
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ *p++ = '0';
+ if (flags & FLAG_ALT)
+ {
+ size_t ndigits =
+ (precision > 0 ? precision - 1 : 0);
+ *p++ = decimal_point_char ();
+ for (; ndigits > 0; --ndigits)
+ *p++ = '0';
+ }
+ }
+ else
+ abort ();
+# endif
+ }
+ }
+ }
+# endif
+
+ /* The generated string now extends from tmp to p, with the
+ zero padding insertion point being at pad_ptr. */
+ if (has_width && p - tmp < width)
+ {
+ size_t pad = width - (p - tmp);
+ DCHAR_T *end = p + pad;
+
+ if (flags & FLAG_LEFT)
+ {
+ /* Pad with spaces on the right. */
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ {
+ /* Pad with zeroes. */
+ DCHAR_T *q = end;
+
+ while (p > pad_ptr)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = '0';
+ }
+ else
+ {
+ /* Pad with spaces on the left. */
+ DCHAR_T *q = end;
+
+ while (p > tmp)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+
+ p = end;
+ }
+
+ {
+ size_t count = p - tmp;
+
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
+
+ /* Make room for the result. */
+ if (count >= allocated - length)
+ {
+ size_t n = xsum (length, count);
+
+ ENSURE_ALLOCATION (n);
+ }
+
+ /* Append the result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+ if (tmp != tmpbuf)
+ free (tmp);
+ length += count;
+ }
+ }
+#endif
+ else
+ {
+ arg_type type = a.arg[dp->arg_index].type;
+ int flags = dp->flags;
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ int has_width;
+ size_t width;
+#endif
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION
+ int has_precision;
+ size_t precision;
+#endif
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+ int prec_ourselves;
+#else
+# define prec_ourselves 0
+#endif
+#if NEED_PRINTF_FLAG_LEFTADJUST
+# define pad_ourselves 1
+#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ int pad_ourselves;
+#else
+# define pad_ourselves 0
+#endif
+ TCHAR_T *fbp;
+ unsigned int prefix_count;
+ int prefixes[2] IF_LINT (= { 0 });
+#if !USE_SNPRINTF
+ size_t tmp_length;
+ TCHAR_T tmpbuf[700];
+ TCHAR_T *tmp;
+#endif
+
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+#endif
+
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION
+ has_precision = 0;
+ precision = 6;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+#endif
+
+ /* Decide whether to handle the precision ourselves. */
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+ switch (dp->conversion)
+ {
+ case 'd': case 'i': case 'u':
+ case 'o':
+ case 'x': case 'X': case 'p':
+ prec_ourselves = has_precision && (precision > 0);
+ break;
+ default:
+ prec_ourselves = 0;
+ break;
+ }
+#endif
+
+ /* Decide whether to perform the padding ourselves. */
+#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
+ switch (dp->conversion)
+ {
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
+ /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need
+ to perform the padding after this conversion. Functions
+ with unistdio extensions perform the padding based on
+ character count rather than element count. */
+ case 'c': case 's':
+# endif
+# if NEED_PRINTF_FLAG_ZERO
+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+ case 'a': case 'A':
+# endif
+ pad_ourselves = 1;
+ break;
+ default:
+ pad_ourselves = prec_ourselves;
+ break;
+ }
+#endif
+
+#if !USE_SNPRINTF
+ /* Allocate a temporary buffer of sufficient size for calling
+ sprintf. */
+ tmp_length =
+ MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type,
+ flags, width, has_precision, precision,
+ pad_ourselves);
+
+ if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T))
+ tmp = tmpbuf;
+ else
+ {
+ size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T));
+
+ if (size_overflow_p (tmp_memsize))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ tmp = (TCHAR_T *) malloc (tmp_memsize);
+ if (tmp == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ }
+#endif
+
+ /* Construct the format string for calling snprintf or
+ sprintf. */
+ fbp = buf;
+ *fbp++ = '%';
+#if NEED_PRINTF_FLAG_GROUPING
+ /* The underlying implementation doesn't support the ' flag.
+ Produce no grouping characters in this case; this is
+ acceptable because the grouping is locale dependent. */
+#else
+ if (flags & FLAG_GROUP)
+ *fbp++ = '\'';
+#endif
+ if (flags & FLAG_LEFT)
+ *fbp++ = '-';
+ if (flags & FLAG_SHOWSIGN)
+ *fbp++ = '+';
+ if (flags & FLAG_SPACE)
+ *fbp++ = ' ';
+ if (flags & FLAG_ALT)
+ *fbp++ = '#';
+ if (!pad_ourselves)
+ {
+ if (flags & FLAG_ZERO)
+ *fbp++ = '0';
+ if (dp->width_start != dp->width_end)
+ {
+ size_t n = dp->width_end - dp->width_start;
+ /* The width specification is known to consist only
+ of standard ASCII characters. */
+ if (sizeof (FCHAR_T) == sizeof (TCHAR_T))
+ {
+ memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T));
+ fbp += n;
+ }
+ else
+ {
+ const FCHAR_T *mp = dp->width_start;
+ do
+ *fbp++ = (unsigned char) *mp++;
+ while (--n > 0);
+ }
+ }
+ }
+ if (!prec_ourselves)
+ {
+ if (dp->precision_start != dp->precision_end)
+ {
+ size_t n = dp->precision_end - dp->precision_start;
+ /* The precision specification is known to consist only
+ of standard ASCII characters. */
+ if (sizeof (FCHAR_T) == sizeof (TCHAR_T))
+ {
+ memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T));
+ fbp += n;
+ }
+ else
+ {
+ const FCHAR_T *mp = dp->precision_start;
+ do
+ *fbp++ = (unsigned char) *mp++;
+ while (--n > 0);
+ }
+ }
+ }
+
+ switch (type)
+ {
+#if HAVE_LONG_LONG_INT
+ case TYPE_LONGLONGINT:
+ case TYPE_ULONGLONGINT:
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ *fbp++ = 'I';
+ *fbp++ = '6';
+ *fbp++ = '4';
+ break;
+# else
+ *fbp++ = 'l';
+ /*FALLTHROUGH*/
+# endif
+#endif
+ case TYPE_LONGINT:
+ case TYPE_ULONGINT:
+#if HAVE_WINT_T
+ case TYPE_WIDE_CHAR:
+#endif
+#if HAVE_WCHAR_T
+ case TYPE_WIDE_STRING:
+#endif
+ *fbp++ = 'l';
+ break;
+ case TYPE_LONGDOUBLE:
+ *fbp++ = 'L';
+ break;
+ default:
+ break;
+ }
+#if NEED_PRINTF_DIRECTIVE_F
+ if (dp->conversion == 'F')
+ *fbp = 'f';
+ else
+#endif
+ *fbp = dp->conversion;
+#if USE_SNPRINTF
+# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+ fbp[1] = '%';
+ fbp[2] = 'n';
+ fbp[3] = '\0';
+# else
+ /* On glibc2 systems from glibc >= 2.3 - probably also older
+ ones - we know that snprintf's returns value conforms to
+ ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
+ Therefore we can avoid using %n in this situation.
+ On glibc2 systems from 2004-10-18 or newer, the use of %n
+ in format strings in writable memory may crash the program
+ (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
+ in this situation. */
+ /* On native Win32 systems (such as mingw), we can avoid using
+ %n because:
+ - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
+ snprintf does not write more than the specified number
+ of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes
+ '4', '5', '6' into buf, not '4', '5', '\0'.)
+ - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf
+ allows us to recognize the case of an insufficient
+ buffer size: it returns -1 in this case.
+ On native Win32 systems (such as mingw) where the OS is
+ Windows Vista, the use of %n in format strings by default
+ crashes the program. See
+ <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
+ <http://msdn2.microsoft.com/en-us/library/ms175782(VS.80).aspx>
+ So we should avoid %n in this situation. */
+ fbp[1] = '\0';
+# endif
+#else
+ fbp[1] = '\0';
+#endif
+
+ /* Construct the arguments for calling snprintf or sprintf. */
+ prefix_count = 0;
+ if (!pad_ourselves && dp->width_arg_index != ARG_NONE)
+ {
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
+ }
+ if (!prec_ourselves && dp->precision_arg_index != ARG_NONE)
+ {
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
+ }
+
+#if USE_SNPRINTF
+ /* The SNPRINTF result is appended after result[0..length].
+ The latter is an array of DCHAR_T; SNPRINTF appends an
+ array of TCHAR_T to it. This is possible because
+ sizeof (TCHAR_T) divides sizeof (DCHAR_T) and
+ alignof (TCHAR_T) <= alignof (DCHAR_T). */
+# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T))
+ /* Ensure that maxlen below will be >= 2. Needed on BeOS,
+ where an snprintf() with maxlen==1 acts like sprintf(). */
+ ENSURE_ALLOCATION (xsum (length,
+ (2 + TCHARS_PER_DCHAR - 1)
+ / TCHARS_PER_DCHAR));
+ /* Prepare checking whether snprintf returns the count
+ via %n. */
+ *(TCHAR_T *) (result + length) = '\0';
+#endif
+
+ for (;;)
+ {
+ int count = -1;
+
+#if USE_SNPRINTF
+ int retcount = 0;
+ size_t maxlen = allocated - length;
+ /* SNPRINTF can fail if its second argument is
+ > INT_MAX. */
+ if (maxlen > INT_MAX / TCHARS_PER_DCHAR)
+ maxlen = INT_MAX / TCHARS_PER_DCHAR;
+ maxlen = maxlen * TCHARS_PER_DCHAR;
+# define SNPRINTF_BUF(arg) \
+ switch (prefix_count) \
+ { \
+ case 0: \
+ retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+ maxlen, buf, \
+ arg, &count); \
+ break; \
+ case 1: \
+ retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+ maxlen, buf, \
+ prefixes[0], arg, &count); \
+ break; \
+ case 2: \
+ retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+ maxlen, buf, \
+ prefixes[0], prefixes[1], arg, \
+ &count); \
+ break; \
+ default: \
+ abort (); \
+ }
+#else
+# define SNPRINTF_BUF(arg) \
+ switch (prefix_count) \
+ { \
+ case 0: \
+ count = sprintf (tmp, buf, arg); \
+ break; \
+ case 1: \
+ count = sprintf (tmp, buf, prefixes[0], arg); \
+ break; \
+ case 2: \
+ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
+ arg); \
+ break; \
+ default: \
+ abort (); \
+ }
+#endif
+
+ errno = 0;
+ switch (type)
+ {
+ case TYPE_SCHAR:
+ {
+ int arg = a.arg[dp->arg_index].a.a_schar;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UCHAR:
+ {
+ unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_SHORT:
+ {
+ int arg = a.arg[dp->arg_index].a.a_short;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_USHORT:
+ {
+ unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT:
+ {
+ int arg = a.arg[dp->arg_index].a.a_int;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT:
+ {
+ unsigned int arg = a.arg[dp->arg_index].a.a_uint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_LONGINT:
+ {
+ long int arg = a.arg[dp->arg_index].a.a_longint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_ULONGINT:
+ {
+ unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_LONGLONGINT:
+ {
+ long long int arg = a.arg[dp->arg_index].a.a_longlongint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_ULONGLONGINT:
+ {
+ unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#endif
+ case TYPE_DOUBLE:
+ {
+ double arg = a.arg[dp->arg_index].a.a_double;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_LONGDOUBLE:
+ {
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_CHAR:
+ {
+ int arg = a.arg[dp->arg_index].a.a_char;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#if HAVE_WINT_T
+ case TYPE_WIDE_CHAR:
+ {
+ wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#endif
+ case TYPE_STRING:
+ {
+ const char *arg = a.arg[dp->arg_index].a.a_string;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#if HAVE_WCHAR_T
+ case TYPE_WIDE_STRING:
+ {
+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#endif
+ case TYPE_POINTER:
+ {
+ void *arg = a.arg[dp->arg_index].a.a_pointer;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ default:
+ abort ();
+ }
+
+#if USE_SNPRINTF
+ /* Portability: Not all implementations of snprintf()
+ are ISO C 99 compliant. Determine the number of
+ bytes that snprintf() has produced or would have
+ produced. */
+ if (count >= 0)
+ {
+ /* Verify that snprintf() has NUL-terminated its
+ result. */
+ if (count < maxlen
+ && ((TCHAR_T *) (result + length)) [count] != '\0')
+ abort ();
+ /* Portability hack. */
+ if (retcount > count)
+ count = retcount;
+ }
+ else
+ {
+ /* snprintf() doesn't understand the '%n'
+ directive. */
+ if (fbp[1] != '\0')
+ {
+ /* Don't use the '%n' directive; instead, look
+ at the snprintf() return value. */
+ fbp[1] = '\0';
+ continue;
+ }
+ else
+ {
+ /* Look at the snprintf() return value. */
+ if (retcount < 0)
+ {
+# if !HAVE_SNPRINTF_RETVAL_C99
+ /* HP-UX 10.20 snprintf() is doubly deficient:
+ It doesn't understand the '%n' directive,
+ *and* it returns -1 (rather than the length
+ that would have been required) when the
+ buffer is too small.
+ But a failure at this point can also come
+ from other reasons than a too small buffer,
+ such as an invalid wide string argument to
+ the %ls directive, or possibly an invalid
+ floating-point argument. */
+ size_t tmp_length =
+ MAX_ROOM_NEEDED (&a, dp->arg_index,
+ dp->conversion, type, flags,
+ width, has_precision,
+ precision, pad_ourselves);
+
+ if (maxlen < tmp_length)
+ {
+ /* Make more room. But try to do through
+ this reallocation only once. */
+ size_t bigger_need =
+ xsum (length,
+ xsum (tmp_length,
+ TCHARS_PER_DCHAR - 1)
+ / TCHARS_PER_DCHAR);
+ /* And always grow proportionally.
+ (There may be several arguments, each
+ needing a little more room than the
+ previous one.) */
+ size_t bigger_need2 =
+ xsum (xtimes (allocated, 2), 12);
+ if (bigger_need < bigger_need2)
+ bigger_need = bigger_need2;
+ ENSURE_ALLOCATION (bigger_need);
+ continue;
+ }
+# endif
+ }
+ else
+ count = retcount;
+ }
+ }
+#endif
+
+ /* Attempt to handle failure. */
+ if (count < 0)
+ {
+ /* SNPRINTF or sprintf failed. Save and use the errno
+ that it has set, if any. */
+ int saved_errno = errno;
+
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno =
+ (saved_errno != 0
+ ? saved_errno
+ : (dp->conversion == 'c' || dp->conversion == 's'
+ ? EILSEQ
+ : EINVAL));
+ return NULL;
+ }
+
+#if USE_SNPRINTF
+ /* Handle overflow of the allocated buffer.
+ If such an overflow occurs, a C99 compliant snprintf()
+ returns a count >= maxlen. However, a non-compliant
+ snprintf() function returns only count = maxlen - 1. To
+ cover both cases, test whether count >= maxlen - 1. */
+ if ((unsigned int) count + 1 >= maxlen)
+ {
+ /* If maxlen already has attained its allowed maximum,
+ allocating more memory will not increase maxlen.
+ Instead of looping, bail out. */
+ if (maxlen == INT_MAX / TCHARS_PER_DCHAR)
+ goto overflow;
+ else
+ {
+ /* Need at least (count + 1) * sizeof (TCHAR_T)
+ bytes. (The +1 is for the trailing NUL.)
+ But ask for (count + 2) * sizeof (TCHAR_T)
+ bytes, so that in the next round, we likely get
+ maxlen > (unsigned int) count + 1
+ and so we don't get here again.
+ And allocate proportionally, to avoid looping
+ eternally if snprintf() reports a too small
+ count. */
+ size_t n =
+ xmax (xsum (length,
+ ((unsigned int) count + 2
+ + TCHARS_PER_DCHAR - 1)
+ / TCHARS_PER_DCHAR),
+ xtimes (allocated, 2));
+
+ ENSURE_ALLOCATION (n);
+ continue;
+ }
+ }
+#endif
+
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+ if (prec_ourselves)
+ {
+ /* Handle the precision. */
+ TCHAR_T *prec_ptr =
+# if USE_SNPRINTF
+ (TCHAR_T *) (result + length);
+# else
+ tmp;
+# endif
+ size_t prefix_count;
+ size_t move;
+
+ prefix_count = 0;
+ /* Put the additional zeroes after the sign. */
+ if (count >= 1
+ && (*prec_ptr == '-' || *prec_ptr == '+'
+ || *prec_ptr == ' '))
+ prefix_count = 1;
+ /* Put the additional zeroes after the 0x prefix if
+ (flags & FLAG_ALT) || (dp->conversion == 'p'). */
+ else if (count >= 2
+ && prec_ptr[0] == '0'
+ && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X'))
+ prefix_count = 2;
+
+ move = count - prefix_count;
+ if (precision > move)
+ {
+ /* Insert zeroes. */
+ size_t insert = precision - move;
+ TCHAR_T *prec_end;
+
+# if USE_SNPRINTF
+ size_t n =
+ xsum (length,
+ (count + insert + TCHARS_PER_DCHAR - 1)
+ / TCHARS_PER_DCHAR);
+ length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR;
+ ENSURE_ALLOCATION (n);
+ length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR;
+ prec_ptr = (TCHAR_T *) (result + length);
+# endif
+
+ prec_end = prec_ptr + count;
+ prec_ptr += prefix_count;
+
+ while (prec_end > prec_ptr)
+ {
+ prec_end--;
+ prec_end[insert] = prec_end[0];
+ }
+
+ prec_end += insert;
+ do
+ *--prec_end = '0';
+ while (prec_end > prec_ptr);
+
+ count += insert;
+ }
+ }
+#endif
+
+#if !USE_SNPRINTF
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
+#endif
+
+#if !DCHAR_IS_TCHAR
+ /* Convert from TCHAR_T[] to DCHAR_T[]. */
+ if (dp->conversion == 'c' || dp->conversion == 's')
+ {
+ /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING
+ TYPE_WIDE_STRING.
+ The result string is not certainly ASCII. */
+ const TCHAR_T *tmpsrc;
+ DCHAR_T *tmpdst;
+ size_t tmpdst_len;
+ /* This code assumes that TCHAR_T is 'char'. */
+ typedef int TCHAR_T_verify
+ [2 * (sizeof (TCHAR_T) == 1) - 1];
+# if USE_SNPRINTF
+ tmpsrc = (TCHAR_T *) (result + length);
+# else
+ tmpsrc = tmp;
+# endif
+ tmpdst =
+ DCHAR_CONV_FROM_ENCODING (locale_charset (),
+ iconveh_question_mark,
+ tmpsrc, count,
+ NULL,
+ NULL, &tmpdst_len);
+ if (tmpdst == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+ DCHAR_CPY (result + length, tmpdst, tmpdst_len);
+ free (tmpdst);
+ count = tmpdst_len;
+ }
+ else
+ {
+ /* The result string is ASCII.
+ Simple 1:1 conversion. */
+# if USE_SNPRINTF
+ /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a
+ no-op conversion, in-place on the array starting
+ at (result + length). */
+ if (sizeof (DCHAR_T) != sizeof (TCHAR_T))
+# endif
+ {
+ const TCHAR_T *tmpsrc;
+ DCHAR_T *tmpdst;
+ size_t n;
+
+# if USE_SNPRINTF
+ if (result == resultbuf)
+ {
+ tmpsrc = (TCHAR_T *) (result + length);
+ /* ENSURE_ALLOCATION will not move tmpsrc
+ (because it's part of resultbuf). */
+ ENSURE_ALLOCATION (xsum (length, count));
+ }
+ else
+ {
+ /* ENSURE_ALLOCATION will move the array
+ (because it uses realloc(). */
+ ENSURE_ALLOCATION (xsum (length, count));
+ tmpsrc = (TCHAR_T *) (result + length);
+ }
+# else
+ tmpsrc = tmp;
+ ENSURE_ALLOCATION (xsum (length, count));
+# endif
+ tmpdst = result + length;
+ /* Copy backwards, because of overlapping. */
+ tmpsrc += count;
+ tmpdst += count;
+ for (n = count; n > 0; n--)
+ *--tmpdst = (unsigned char) *--tmpsrc;
+ }
+ }
+#endif
+
+#if DCHAR_IS_TCHAR && !USE_SNPRINTF
+ /* Make room for the result. */
+ if (count > allocated - length)
+ {
+ /* Need at least count elements. But allocate
+ proportionally. */
+ size_t n =
+ xmax (xsum (length, count), xtimes (allocated, 2));
+
+ ENSURE_ALLOCATION (n);
+ }
+#endif
+
+ /* Here count <= allocated - length. */
+
+ /* Perform padding. */
+#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ if (pad_ourselves && has_width)
+ {
+ size_t w;
+# if ENABLE_UNISTDIO
+ /* Outside POSIX, it's preferrable to compare the width
+ against the number of _characters_ of the converted
+ value. */
+ w = DCHAR_MBSNLEN (result + length, count);
+# else
+ /* The width is compared against the number of _bytes_
+ of the converted value, says POSIX. */
+ w = count;
+# endif
+ if (w < width)
+ {
+ size_t pad = width - w;
+
+ /* Make room for the result. */
+ if (xsum (count, pad) > allocated - length)
+ {
+ /* Need at least count + pad elements. But
+ allocate proportionally. */
+ size_t n =
+ xmax (xsum3 (length, count, pad),
+ xtimes (allocated, 2));
+
+# if USE_SNPRINTF
+ length += count;
+ ENSURE_ALLOCATION (n);
+ length -= count;
+# else
+ ENSURE_ALLOCATION (n);
+# endif
+ }
+ /* Here count + pad <= allocated - length. */
+
+ {
+# if !DCHAR_IS_TCHAR || USE_SNPRINTF
+ DCHAR_T * const rp = result + length;
+# else
+ DCHAR_T * const rp = tmp;
+# endif
+ DCHAR_T *p = rp + count;
+ DCHAR_T *end = p + pad;
+ DCHAR_T *pad_ptr;
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
+ if (dp->conversion == 'c'
+ || dp->conversion == 's')
+ /* No zero-padding for string directives. */
+ pad_ptr = NULL;
+ else
+# endif
+ {
+ pad_ptr = (*rp == '-' ? rp + 1 : rp);
+ /* No zero-padding of "inf" and "nan". */
+ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z')
+ || (*pad_ptr >= 'a' && *pad_ptr <= 'z'))
+ pad_ptr = NULL;
+ }
+ /* The generated string now extends from rp to p,
+ with the zero padding insertion point being at
+ pad_ptr. */
+
+ count = count + pad; /* = end - rp */
+
+ if (flags & FLAG_LEFT)
+ {
+ /* Pad with spaces on the right. */
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ {
+ /* Pad with zeroes. */
+ DCHAR_T *q = end;
+
+ while (p > pad_ptr)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = '0';
+ }
+ else
+ {
+ /* Pad with spaces on the left. */
+ DCHAR_T *q = end;
+
+ while (p > rp)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ }
+ }
+ }
+#endif
+
+ /* Here still count <= allocated - length. */
+
+#if !DCHAR_IS_TCHAR || USE_SNPRINTF
+ /* The snprintf() result did fit. */
+#else
+ /* Append the sprintf() result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+#endif
+#if !USE_SNPRINTF
+ if (tmp != tmpbuf)
+ free (tmp);
+#endif
+
+#if NEED_PRINTF_DIRECTIVE_F
+ if (dp->conversion == 'F')
+ {
+ /* Convert the %f result to upper case for %F. */
+ DCHAR_T *rp = result + length;
+ size_t rc;
+ for (rc = count; rc > 0; rc--, rp++)
+ if (*rp >= 'a' && *rp <= 'z')
+ *rp = *rp - 'a' + 'A';
+ }
+#endif
+
+ length += count;
+ break;
+ }
+#undef pad_ourselves
+#undef prec_ourselves
+ }
+ }
+ }
+
+ /* Add the final NUL. */
+ ENSURE_ALLOCATION (xsum (length, 1));
+ result[length] = '\0';
+
+ if (result != resultbuf && length + 1 < allocated)
+ {
+ /* Shrink the allocated memory if possible. */
+ DCHAR_T *memory;
+
+ memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T));
+ if (memory != NULL)
+ result = memory;
+ }
+
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ *lengthp = length;
+ /* Note that we can produce a big string of a length > INT_MAX. POSIX
+ says that snprintf() fails with errno = EOVERFLOW in this case, but
+ that's only because snprintf() returns an 'int'. This function does
+ not have this limitation. */
+ return result;
+
+#if USE_SNPRINTF
+ overflow:
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EOVERFLOW;
+ return NULL;
+#endif
+
+ out_of_memory:
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ out_of_memory_1:
+ CLEANUP ();
+ errno = ENOMEM;
+ return NULL;
+ }
+}
+
+#undef MAX_ROOM_NEEDED
+#undef TCHARS_PER_DCHAR
+#undef SNPRINTF
+#undef USE_SNPRINTF
+#undef DCHAR_SET
+#undef DCHAR_CPY
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef DCHAR_IS_TCHAR
+#undef TCHAR_T
+#undef DCHAR_T
+#undef FCHAR_T
+#undef VASNPRINTF
diff --git a/grub-core/gnulib/vasnprintf.h b/grub-core/gnulib/vasnprintf.h
new file mode 100644
index 0000000..a689bad
--- /dev/null
+++ b/grub-core/gnulib/vasnprintf.h
@@ -0,0 +1,80 @@
+/* vsprintf with automatic memory allocation.
+ Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _VASNPRINTF_H
+#define _VASNPRINTF_H
+
+/* Get va_list. */
+#include <stdarg.h>
+
+/* Get size_t. */
+#include <stddef.h>
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc().
+ You can pass a preallocated buffer for the result in RESULTBUF and its
+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+ If successful, return the address of the string (this may be = RESULTBUF
+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
+ number of resulting bytes, excluding the trailing NUL. Upon error, set
+ errno and return NULL.
+
+ When dynamic memory allocation occurs, the preallocated buffer is left
+ alone (with possibly modified contents). This makes it possible to use
+ a statically allocated or stack-allocated buffer, like this:
+
+ char buf[100];
+ size_t len = sizeof (buf);
+ char *output = vasnprintf (buf, &len, format, args);
+ if (output == NULL)
+ ... error handling ...;
+ else
+ {
+ ... use the output string ...;
+ if (output != buf)
+ free (output);
+ }
+ */
+#if REPLACE_VASNPRINTF
+# define asnprintf rpl_asnprintf
+# define vasnprintf rpl_vasnprintf
+#endif
+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 3, 0)));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _VASNPRINTF_H */
diff --git a/grub-core/gnulib/verify.h b/grub-core/gnulib/verify.h
new file mode 100644
index 0000000..4ad780c
--- /dev/null
+++ b/grub-core/gnulib/verify.h
@@ -0,0 +1,163 @@
+/* Compile-time assert-like macros.
+
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
+
+#ifndef VERIFY_H
+# define VERIFY_H 1
+
+/* Each of these macros verifies that its argument R is nonzero. To
+ be portable, R should be an integer constant expression. Unlike
+ assert (R), there is no run-time overhead.
+
+ There are two macros, since no single macro can be used in all
+ contexts in C. verify_true (R) is for scalar contexts, including
+ integer constant expression contexts. verify (R) is for declaration
+ contexts, e.g., the top level.
+
+ Symbols ending in "__" are private to this header.
+
+ The code below uses several ideas.
+
+ * The first step is ((R) ? 1 : -1). Given an expression R, of
+ integral or boolean or floating-point type, this yields an
+ expression of integral type, whose value is later verified to be
+ constant and nonnegative.
+
+ * Next this expression W is wrapped in a type
+ struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+ If W is negative, this yields a compile-time error. No compiler can
+ deal with a bit-field of negative size.
+
+ One might think that an array size check would have the same
+ effect, that is, that the type struct { unsigned int dummy[W]; }
+ would work as well. However, inside a function, some compilers
+ (such as C++ compilers and GNU C) allow local parameters and
+ variables inside array size expressions. With these compilers,
+ an array size check would not properly diagnose this misuse of
+ the verify macro:
+
+ void function (int n) { verify (n < 0); }
+
+ * For the verify macro, the struct verify_type__ will need to
+ somehow be embedded into a declaration. To be portable, this
+ declaration must declare an object, a constant, a function, or a
+ typedef name. If the declared entity uses the type directly,
+ such as in
+
+ struct dummy {...};
+ typedef struct {...} dummy;
+ extern struct {...} *dummy;
+ extern void dummy (struct {...} *);
+ extern struct {...} *dummy (void);
+
+ two uses of the verify macro would yield colliding declarations
+ if the entity names are not disambiguated. A workaround is to
+ attach the current line number to the entity name:
+
+ #define _GL_CONCAT0(x, y) x##y
+ #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+ extern struct {...} * _GL_CONCAT (dummy, __LINE__);
+
+ But this has the problem that two invocations of verify from
+ within the same macro would collide, since the __LINE__ value
+ would be the same for both invocations. (The GCC __COUNTER__
+ macro solves this problem, but is not portable.)
+
+ A solution is to use the sizeof operator. It yields a number,
+ getting rid of the identity of the type. Declarations like
+
+ extern int dummy [sizeof (struct {...})];
+ extern void dummy (int [sizeof (struct {...})]);
+ extern int (*dummy (void)) [sizeof (struct {...})];
+
+ can be repeated.
+
+ * Should the implementation use a named struct or an unnamed struct?
+ Which of the following alternatives can be used?
+
+ extern int dummy [sizeof (struct {...})];
+ extern int dummy [sizeof (struct verify_type__ {...})];
+ extern void dummy (int [sizeof (struct {...})]);
+ extern void dummy (int [sizeof (struct verify_type__ {...})]);
+ extern int (*dummy (void)) [sizeof (struct {...})];
+ extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+
+ In the second and sixth case, the struct type is exported to the
+ outer scope; two such declarations therefore collide. GCC warns
+ about the first, third, and fourth cases. So the only remaining
+ possibility is the fifth case:
+
+ extern int (*dummy (void)) [sizeof (struct {...})];
+
+ * GCC warns about duplicate declarations of the dummy function if
+ -Wredundant_decls is used. GCC 4.3 and later have a builtin
+ __COUNTER__ macro that can let us generate unique identifiers for
+ each dummy function, to suppress this warning.
+
+ * This implementation exploits the fact that GCC does not warn about
+ the last declaration mentioned above. If a future version of GCC
+ introduces a warning for this, the problem could be worked around
+ by using code specialized to GCC, just as __COUNTER__ is already
+ being used if available.
+
+ #if 4 <= __GNUC__
+ # define verify(R) [another version to keep GCC happy]
+ #endif
+
+ * In C++, any struct definition inside sizeof is invalid.
+ Use a template type to work around the problem. */
+
+/* Concatenate two preprocessor tokens. */
+# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+# define _GL_CONCAT0(x, y) x##y
+
+/* _GL_COUNTER is an integer, preferably one that changes each time we
+ use it. Use __COUNTER__ if it works, falling back on __LINE__
+ otherwise. __LINE__ isn't perfect, but it's better than a
+ constant. */
+# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
+# define _GL_COUNTER __COUNTER__
+# else
+# define _GL_COUNTER __LINE__
+# endif
+
+/* Generate a symbol with the given prefix, making it unique if
+ possible. */
+# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
+
+/* Verify requirement R at compile-time, as an integer constant expression.
+ Return 1. */
+
+# ifdef __cplusplus
+template <int w>
+ struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
+# define verify_true(R) \
+ (!!sizeof (verify_type__<(R) ? 1 : -1>))
+# else
+# define verify_true(R) \
+ (!!sizeof \
+ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+# endif
+
+/* Verify requirement R at compile-time, as a declaration without a
+ trailing ';'. */
+
+# define verify(R) \
+ extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)]
+
+#endif
diff --git a/grub-core/gnulib/vsnprintf.c b/grub-core/gnulib/vsnprintf.c
new file mode 100644
index 0000000..d447cc2
--- /dev/null
+++ b/grub-core/gnulib/vsnprintf.c
@@ -0,0 +1,71 @@
+/* Formatted output to strings.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
+ Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "vasnprintf.h"
+
+/* Print formatted output to string STR. Similar to vsprintf, but
+ additional length SIZE limit how much is written into STR. Returns
+ string length of formatted string (which may be larger than SIZE).
+ STR may be NULL, in which case nothing will be written. On error,
+ return a negative value. */
+int
+vsnprintf (char *str, size_t size, const char *format, va_list args)
+{
+ char *output;
+ size_t len;
+ size_t lenbuf = size;
+
+ output = vasnprintf (str, &lenbuf, format, args);
+ len = lenbuf;
+
+ if (!output)
+ return -1;
+
+ if (output != str)
+ {
+ if (size)
+ {
+ size_t pruned_len = (len < size ? len : size - 1);
+ memcpy (str, output, pruned_len);
+ str[pruned_len] = '\0';
+ }
+
+ free (output);
+ }
+
+ if (len > INT_MAX)
+ {
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+ return len;
+}
diff --git a/grub-core/gnulib/wchar.in.h b/grub-core/gnulib/wchar.in.h
new file mode 100644
index 0000000..88d47db
--- /dev/null
+++ b/grub-core/gnulib/wchar.in.h
@@ -0,0 +1,428 @@
+/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake. */
+
+/*
+ * ISO C 99 <wchar.h> for platforms that have issues.
+ * <http://www.opengroup.org/susv3xbd/wchar.h.html>
+ *
+ * For now, this just ensures proper prerequisite inclusion order and
+ * the declaration of wcwidth().
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+/* Special invocation convention:
+ - Inside glibc and uClibc header files.
+ - On HP-UX 11.00 we have a sequence of nested includes
+ <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
+ once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
+ and once directly. In both situations 'wint_t' is not yet defined,
+ therefore we cannot provide the function overrides; instead include only
+ the system's <wchar.h>.
+ - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
+ the latter includes <wchar.h>. But here, we have no way to detect whether
+ <wctype.h> is completely included or is still being included. */
+
+#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_WCHAR_H
+
+#define _GL_ALREADY_INCLUDING_WCHAR_H
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+
+/* Include the original <wchar.h> if it exists.
+ Some builds of uClibc lack it. */
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_WCHAR_H@
+# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
+#endif
+
+#undef _GL_ALREADY_INCLUDING_WCHAR_H
+
+#ifndef _GL_WCHAR_H
+#define _GL_WCHAR_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Define wint_t and WEOF. (Also done in wctype.in.h.) */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+# define WEOF -1
+# endif
+#else
+# ifndef WEOF
+# define WEOF ((wint_t) -1)
+# endif
+#endif
+
+
+/* Override mbstate_t if it is too small.
+ On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
+ implementing mbrtowc for encodings like UTF-8. */
+#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
+typedef int rpl_mbstate_t;
+# undef mbstate_t
+# define mbstate_t rpl_mbstate_t
+# define GNULIB_defined_mbstate_t 1
+#endif
+
+
+/* Convert a single-byte character to a wide character. */
+#if @GNULIB_BTOWC@
+# if @REPLACE_BTOWC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef btowc
+# define btowc rpl_btowc
+# endif
+_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
+_GL_CXXALIAS_RPL (btowc, wint_t, (int c));
+# else
+# if !@HAVE_BTOWC@
+_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
+# endif
+_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
+# endif
+_GL_CXXALIASWARN (btowc);
+#elif defined GNULIB_POSIXCHECK
+# undef btowc
+# if HAVE_RAW_DECL_BTOWC
+_GL_WARN_ON_USE (btowc, "btowc is unportable - "
+ "use gnulib module btowc for portability");
+# endif
+#endif
+
+
+/* Convert a wide character to a single-byte character. */
+#if @GNULIB_WCTOB@
+# if @REPLACE_WCTOB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wctob
+# define wctob rpl_wctob
+# endif
+_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
+_GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
+# else
+# if !defined wctob && !@HAVE_DECL_WCTOB@
+/* wctob is provided by gnulib, or wctob exists but is not declared. */
+_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
+# endif
+_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
+# endif
+_GL_CXXALIASWARN (wctob);
+#elif defined GNULIB_POSIXCHECK
+# undef wctob
+# if HAVE_RAW_DECL_WCTOB
+_GL_WARN_ON_USE (wctob, "wctob is unportable - "
+ "use gnulib module wctob for portability");
+# endif
+#endif
+
+
+/* Test whether *PS is in the initial state. */
+#if @GNULIB_MBSINIT@
+# if @REPLACE_MBSINIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mbsinit
+# define mbsinit rpl_mbsinit
+# endif
+_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
+_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
+# else
+# if !@HAVE_MBSINIT@
+_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
+# endif
+_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbsinit);
+#elif defined GNULIB_POSIXCHECK
+# undef mbsinit
+# if HAVE_RAW_DECL_MBSINIT
+_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
+ "use gnulib module mbsinit for portability");
+# endif
+#endif
+
+
+/* Convert a multibyte character to a wide character. */
+#if @GNULIB_MBRTOWC@
+# if @REPLACE_MBRTOWC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mbrtowc
+# define mbrtowc rpl_mbrtowc
+# endif
+_GL_FUNCDECL_RPL (mbrtowc, size_t,
+ (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+_GL_CXXALIAS_RPL (mbrtowc, size_t,
+ (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+# else
+# if !@HAVE_MBRTOWC@
+_GL_FUNCDECL_SYS (mbrtowc, size_t,
+ (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+# endif
+_GL_CXXALIAS_SYS (mbrtowc, size_t,
+ (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbrtowc);
+#elif defined GNULIB_POSIXCHECK
+# undef mbrtowc
+# if HAVE_RAW_DECL_MBRTOWC
+_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
+ "use gnulib module mbrtowc for portability");
+# endif
+#endif
+
+
+/* Recognize a multibyte character. */
+#if @GNULIB_MBRLEN@
+# if @REPLACE_MBRLEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mbrlen
+# define mbrlen rpl_mbrlen
+# endif
+_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+# else
+# if !@HAVE_MBRLEN@
+_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+# endif
+_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbrlen);
+#elif defined GNULIB_POSIXCHECK
+# undef mbrlen
+# if HAVE_RAW_DECL_MBRLEN
+_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
+ "use gnulib module mbrlen for portability");
+# endif
+#endif
+
+
+/* Convert a string to a wide string. */
+#if @GNULIB_MBSRTOWCS@
+# if @REPLACE_MBSRTOWCS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mbsrtowcs
+# define mbsrtowcs rpl_mbsrtowcs
+# endif
+_GL_FUNCDECL_RPL (mbsrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mbsrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t len,
+ mbstate_t *ps));
+# else
+# if !@HAVE_MBSRTOWCS@
+_GL_FUNCDECL_SYS (mbsrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mbsrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t len,
+ mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbsrtowcs);
+#elif defined GNULIB_POSIXCHECK
+# undef mbsrtowcs
+# if HAVE_RAW_DECL_MBSRTOWCS
+_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
+ "use gnulib module mbsrtowcs for portability");
+# endif
+#endif
+
+
+/* Convert a string to a wide string. */
+#if @GNULIB_MBSNRTOWCS@
+# if @REPLACE_MBSNRTOWCS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mbsnrtowcs
+# define mbsnrtowcs rpl_mbsnrtowcs
+# endif
+_GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+ mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+ mbstate_t *ps));
+# else
+# if !@HAVE_MBSNRTOWCS@
+_GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+ mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
+ (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
+ mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (mbsnrtowcs);
+#elif defined GNULIB_POSIXCHECK
+# undef mbsnrtowcs
+# if HAVE_RAW_DECL_MBSNRTOWCS
+_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
+ "use gnulib module mbsnrtowcs for portability");
+# endif
+#endif
+
+
+/* Convert a wide character to a multibyte character. */
+#if @GNULIB_WCRTOMB@
+# if @REPLACE_WCRTOMB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcrtomb
+# define wcrtomb rpl_wcrtomb
+# endif
+_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+# else
+# if !@HAVE_WCRTOMB@
+_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+# endif
+_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (wcrtomb);
+#elif defined GNULIB_POSIXCHECK
+# undef wcrtomb
+# if HAVE_RAW_DECL_WCRTOMB
+_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
+ "use gnulib module wcrtomb for portability");
+# endif
+#endif
+
+
+/* Convert a wide string to a string. */
+#if @GNULIB_WCSRTOMBS@
+# if @REPLACE_WCSRTOMBS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcsrtombs
+# define wcsrtombs rpl_wcsrtombs
+# endif
+_GL_FUNCDECL_RPL (wcsrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (wcsrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t len,
+ mbstate_t *ps));
+# else
+# if !@HAVE_WCSRTOMBS@
+_GL_FUNCDECL_SYS (wcsrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (wcsrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t len,
+ mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (wcsrtombs);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsrtombs
+# if HAVE_RAW_DECL_WCSRTOMBS
+_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
+ "use gnulib module wcsrtombs for portability");
+# endif
+#endif
+
+
+/* Convert a wide string to a string. */
+#if @GNULIB_WCSNRTOMBS@
+# if @REPLACE_WCSNRTOMBS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcsnrtombs
+# define wcsnrtombs rpl_wcsnrtombs
+# endif
+_GL_FUNCDECL_RPL (wcsnrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+ mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (wcsnrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+ mbstate_t *ps));
+# else
+# if !@HAVE_WCSNRTOMBS@
+_GL_FUNCDECL_SYS (wcsnrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+ mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (wcsnrtombs, size_t,
+ (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
+ mbstate_t *ps));
+# endif
+_GL_CXXALIASWARN (wcsnrtombs);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsnrtombs
+# if HAVE_RAW_DECL_WCSNRTOMBS
+_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
+ "use gnulib module wcsnrtombs for portability");
+# endif
+#endif
+
+
+/* Return the number of screen columns needed for WC. */
+#if @GNULIB_WCWIDTH@
+# if @REPLACE_WCWIDTH@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcwidth
+# define wcwidth rpl_wcwidth
+# endif
+_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
+_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
+# else
+# if !@HAVE_DECL_WCWIDTH@
+/* wcwidth exists but is not declared. */
+_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
+# endif
+_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
+# endif
+_GL_CXXALIASWARN (wcwidth);
+#elif defined GNULIB_POSIXCHECK
+# undef wcwidth
+# if HAVE_RAW_DECL_WCWIDTH
+_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
+ "use gnulib module wcwidth for portability");
+# endif
+#endif
+
+
+#endif /* _GL_WCHAR_H */
+#endif /* _GL_WCHAR_H */
+#endif
diff --git a/grub-core/gnulib/wcrtomb.c b/grub-core/gnulib/wcrtomb.c
new file mode 100644
index 0000000..e7345f6
--- /dev/null
+++ b/grub-core/gnulib/wcrtomb.c
@@ -0,0 +1,53 @@
+/* Convert wide character to multibyte character.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+
+size_t
+wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+{
+ /* This implementation of wcrtomb on top of wctomb() supports only
+ stateless encodings. ps must be in the initial state. */
+ if (ps != NULL && !mbsinit (ps))
+ {
+ errno = EINVAL;
+ return (size_t)(-1);
+ }
+
+ if (s == NULL)
+ /* We know the NUL wide character corresponds to the NUL character. */
+ return 1;
+ else
+ {
+ int ret = wctomb (s, wc);
+
+ if (ret >= 0)
+ return ret;
+ else
+ {
+ errno = EILSEQ;
+ return (size_t)(-1);
+ }
+ }
+}
diff --git a/grub-core/gnulib/wctype.in.h b/grub-core/gnulib/wctype.in.h
new file mode 100644
index 0000000..12c8975
--- /dev/null
+++ b/grub-core/gnulib/wctype.in.h
@@ -0,0 +1,392 @@
+/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
+
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Bruno Haible and Paul Eggert. */
+
+/*
+ * ISO C 99 <wctype.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/wctype.h.html>
+ *
+ * iswctype, towctrans, towlower, towupper, wctrans, wctype,
+ * wctrans_t, and wctype_t are not yet implemented.
+ */
+
+#ifndef _GL_WCTYPE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if @HAVE_WINT_T@
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
+ Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+
+/* Include the original <wctype.h> if it exists.
+ BeOS 5 has the functions but no <wctype.h>. */
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_WCTYPE_H@
+# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
+#endif
+
+#ifndef _GL_WCTYPE_H
+#define _GL_WCTYPE_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Define wint_t and WEOF. (Also done in wchar.in.h.) */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+# define WEOF -1
+# endif
+#else
+# ifndef WEOF
+# define WEOF ((wint_t) -1)
+# endif
+#endif
+
+
+/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
+ Linux libc5 has <wctype.h> and the functions but they are broken.
+ Assume all 11 functions (all isw* except iswblank) are implemented the
+ same way, or not at all. */
+#if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
+
+/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
+ undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
+ refer to system functions like _iswctype that are not in the
+ standard C library. Rather than try to get ancient buggy
+ implementations like this to work, just disable them. */
+# undef iswalnum
+# undef iswalpha
+# undef iswblank
+# undef iswcntrl
+# undef iswdigit
+# undef iswgraph
+# undef iswlower
+# undef iswprint
+# undef iswpunct
+# undef iswspace
+# undef iswupper
+# undef iswxdigit
+# undef towlower
+# undef towupper
+
+/* Linux libc5 has <wctype.h> and the functions but they are broken. */
+# if @REPLACE_ISWCNTRL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define iswalnum rpl_iswalnum
+# define iswalpha rpl_iswalpha
+# define iswblank rpl_iswblank
+# define iswcntrl rpl_iswcntrl
+# define iswdigit rpl_iswdigit
+# define iswgraph rpl_iswgraph
+# define iswlower rpl_iswlower
+# define iswprint rpl_iswprint
+# define iswpunct rpl_iswpunct
+# define iswspace rpl_iswspace
+# define iswupper rpl_iswupper
+# define iswxdigit rpl_iswxdigit
+# define towlower rpl_towlower
+# define towupper rpl_towupper
+# endif
+# endif
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswalnum
+# else
+iswalnum
+# endif
+ (wint_t wc)
+{
+ return ((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswalpha
+# else
+iswalpha
+# endif
+ (wint_t wc)
+{
+ return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswblank
+# else
+iswblank
+# endif
+ (wint_t wc)
+{
+ return wc == ' ' || wc == '\t';
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswcntrl
+# else
+iswcntrl
+# endif
+ (wint_t wc)
+{
+ return (wc & ~0x1f) == 0 || wc == 0x7f;
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswdigit
+# else
+iswdigit
+# endif
+ (wint_t wc)
+{
+ return wc >= '0' && wc <= '9';
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswgraph
+# else
+iswgraph
+# endif
+ (wint_t wc)
+{
+ return wc >= '!' && wc <= '~';
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswlower
+# else
+iswlower
+# endif
+ (wint_t wc)
+{
+ return wc >= 'a' && wc <= 'z';
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswprint
+# else
+iswprint
+# endif
+ (wint_t wc)
+{
+ return wc >= ' ' && wc <= '~';
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswpunct
+# else
+iswpunct
+# endif
+ (wint_t wc)
+{
+ return (wc >= '!' && wc <= '~'
+ && !((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswspace
+# else
+iswspace
+# endif
+ (wint_t wc)
+{
+ return (wc == ' ' || wc == '\t'
+ || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswupper
+# else
+iswupper
+# endif
+ (wint_t wc)
+{
+ return wc >= 'A' && wc <= 'Z';
+}
+
+static inline int
+# if @REPLACE_ISWCNTRL@
+rpl_iswxdigit
+# else
+iswxdigit
+# endif
+ (wint_t wc)
+{
+ return ((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
+}
+
+static inline wint_t
+# if @REPLACE_ISWCNTRL@
+rpl_towlower
+# else
+towlower
+# endif
+ (wint_t wc)
+{
+ return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
+}
+
+static inline wint_t
+# if @REPLACE_ISWCNTRL@
+rpl_towupper
+# else
+towupper
+# endif
+ (wint_t wc)
+{
+ return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
+}
+
+#elif ! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@
+/* Only the iswblank function is missing. */
+
+# if @REPLACE_ISWBLANK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define iswblank rpl_iswblank
+# endif
+# endif
+
+static inline int
+# if @REPLACE_ISWBLANK@
+rpl_iswblank
+# else
+iswblank
+# endif
+ (wint_t wc)
+{
+ return wc == ' ' || wc == '\t';
+}
+
+#endif
+
+#if defined __MINGW32__
+
+/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
+ The functions towlower and towupper are implemented in the MSVCRT library
+ to take a wchar_t argument and return a wchar_t result. mingw declares
+ these functions to take a wint_t argument and return a wint_t result.
+ This means that:
+ 1. When the user passes an argument outside the range 0x0000..0xFFFF, the
+ function will look only at the lower 16 bits. This is allowed according
+ to POSIX.
+ 2. The return value is returned in the lower 16 bits of the result register.
+ The upper 16 bits are random: whatever happened to be in that part of the
+ result register. We need to fix this by adding a zero-extend from
+ wchar_t to wint_t after the call. */
+
+static inline wint_t
+rpl_towlower (wint_t wc)
+{
+ return (wint_t) (wchar_t) towlower (wc);
+}
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define towlower rpl_towlower
+# endif
+
+static inline wint_t
+rpl_towupper (wint_t wc)
+{
+ return (wint_t) (wchar_t) towupper (wc);
+}
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define towupper rpl_towupper
+# endif
+
+#endif /* __MINGW32__ */
+
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
+_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
+#else
+_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
+# if @REPLACE_ISWBLANK@
+_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
+# else
+_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
+# endif
+_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc));
+_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
+#endif
+_GL_CXXALIASWARN (iswalnum);
+_GL_CXXALIASWARN (iswalpha);
+_GL_CXXALIASWARN (iswblank);
+_GL_CXXALIASWARN (iswcntrl);
+_GL_CXXALIASWARN (iswdigit);
+_GL_CXXALIASWARN (iswgraph);
+_GL_CXXALIASWARN (iswlower);
+_GL_CXXALIASWARN (iswprint);
+_GL_CXXALIASWARN (iswpunct);
+_GL_CXXALIASWARN (iswspace);
+_GL_CXXALIASWARN (iswupper);
+_GL_CXXALIASWARN (iswxdigit);
+
+#if @REPLACE_ISWCNTRL@ || defined __MINGW32__
+_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
+_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
+#else
+_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc));
+_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc));
+#endif
+_GL_CXXALIASWARN (towlower);
+_GL_CXXALIASWARN (towupper);
+
+
+#endif /* _GL_WCTYPE_H */
+#endif /* _GL_WCTYPE_H */
diff --git a/grub-core/gnulib/xsize.h b/grub-core/gnulib/xsize.h
new file mode 100644
index 0000000..fbd6329
--- /dev/null
+++ b/grub-core/gnulib/xsize.h
@@ -0,0 +1,108 @@
+/* xsize.h -- Checked size_t computations.
+
+ Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _XSIZE_H
+#define _XSIZE_H
+
+/* Get size_t. */
+#include <stddef.h>
+
+/* Get SIZE_MAX. */
+#include <limits.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+/* The size of memory objects is often computed through expressions of
+ type size_t. Example:
+ void* p = malloc (header_size + n * element_size).
+ These computations can lead to overflow. When this happens, malloc()
+ returns a piece of memory that is way too small, and the program then
+ crashes while attempting to fill the memory.
+ To avoid this, the functions and macros in this file check for overflow.
+ The convention is that SIZE_MAX represents overflow.
+ malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
+ implementation that uses mmap --, it's recommended to use size_overflow_p()
+ or size_in_bounds_p() before invoking malloc().
+ The example thus becomes:
+ size_t size = xsum (header_size, xtimes (n, element_size));
+ void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
+*/
+
+/* Convert an arbitrary value >= 0 to type size_t. */
+#define xcast_size_t(N) \
+ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
+
+/* Sum of two sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum (size_t size1, size_t size2)
+{
+ size_t sum = size1 + size2;
+ return (sum >= size1 ? sum : SIZE_MAX);
+}
+
+/* Sum of three sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum3 (size_t size1, size_t size2, size_t size3)
+{
+ return xsum (xsum (size1, size2), size3);
+}
+
+/* Sum of four sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
+{
+ return xsum (xsum (xsum (size1, size2), size3), size4);
+}
+
+/* Maximum of two sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xmax (size_t size1, size_t size2)
+{
+ /* No explicit check is needed here, because for any n:
+ max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
+ return (size1 >= size2 ? size1 : size2);
+}
+
+/* Multiplication of a count with an element size, with overflow check.
+ The count must be >= 0 and the element size must be > 0.
+ This is a macro, not an inline function, so that it works correctly even
+ when N is of a wider type and N > SIZE_MAX. */
+#define xtimes(N, ELSIZE) \
+ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
+
+/* Check for overflow. */
+#define size_overflow_p(SIZE) \
+ ((SIZE) == SIZE_MAX)
+/* Check against overflow. */
+#define size_in_bounds_p(SIZE) \
+ ((SIZE) != SIZE_MAX)
+
+#endif /* _XSIZE_H */
diff --git a/grub-core/hello/hello.c b/grub-core/hello/hello.c
new file mode 100644
index 0000000..2c9e90f
--- /dev/null
+++ b/grub-core/hello/hello.c
@@ -0,0 +1,51 @@
+/* hello.c - test module for dynamic loading */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2007 Free Software Foundation, Inc.
+ * Copyright (C) 2003 NIIBE Yutaka <gniibe@m17n.org>
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_hello (grub_extcmd_context_t ctxt __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_printf ("Hello World\n");
+ return 0;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(hello)
+{
+ cmd = grub_register_extcmd ("hello", grub_cmd_hello, 0, 0,
+ N_("Say \"Hello World\"."), 0);
+}
+
+GRUB_MOD_FINI(hello)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/hook/datehook.c b/grub-core/hook/datehook.c
new file mode 100644
index 0000000..f64fac0
--- /dev/null
+++ b/grub-core/hook/datehook.c
@@ -0,0 +1,110 @@
+/* datehook.c - Module to install datetime hooks. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/normal.h>
+#include <grub/datetime.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static char *grub_datetime_names[] =
+{
+ "YEAR",
+ "MONTH",
+ "DAY",
+ "HOUR",
+ "MINUTE",
+ "SECOND",
+ "WEEKDAY",
+};
+
+static char *
+grub_read_hook_datetime (struct grub_env_var *var,
+ const char *val __attribute__ ((unused)))
+{
+ struct grub_datetime datetime;
+ static char buf[6];
+
+ buf[0] = 0;
+ if (! grub_get_datetime (&datetime))
+ {
+ int i;
+
+ for (i = 0; i < 7; i++)
+ if (! grub_strcmp (var->name, grub_datetime_names[i]))
+ {
+ int n;
+
+ switch (i)
+ {
+ case 0:
+ n = datetime.year;
+ break;
+ case 1:
+ n = datetime.month;
+ break;
+ case 2:
+ n = datetime.day;
+ break;
+ case 3:
+ n = datetime.hour;
+ break;
+ case 4:
+ n = datetime.minute;
+ break;
+ case 5:
+ n = datetime.second;
+ break;
+ default:
+ return grub_get_weekday_name (&datetime);
+ }
+
+ grub_snprintf (buf, sizeof (buf), "%d", n);
+ break;
+ }
+ }
+
+ return buf;
+}
+
+GRUB_MOD_INIT(datehook)
+{
+ unsigned i;
+
+ for (i = 0; i < ARRAY_SIZE (grub_datetime_names); i++)
+ {
+ grub_register_variable_hook (grub_datetime_names[i],
+ grub_read_hook_datetime, 0);
+ grub_env_export (grub_datetime_names[i]);
+ }
+}
+
+GRUB_MOD_FINI(datehook)
+{
+ unsigned i;
+
+ for (i = 0; i < ARRAY_SIZE (grub_datetime_names); i++)
+ {
+ grub_register_variable_hook (grub_datetime_names[i], 0, 0);
+ grub_env_unset (grub_datetime_names[i]);
+ }
+}
diff --git a/grub-core/io/bufio.c b/grub-core/io/bufio.c
new file mode 100644
index 0000000..3b456c1
--- /dev/null
+++ b/grub-core/io/bufio.c
@@ -0,0 +1,209 @@
+/* bufio.c - buffered io access */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/fs.h>
+#include <grub/bufio.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_BUFIO_DEF_SIZE 8192
+#define GRUB_BUFIO_MAX_SIZE 1048576
+
+struct grub_bufio
+{
+ grub_file_t file;
+ grub_size_t block_size;
+ grub_size_t buffer_len;
+ char buffer[0];
+};
+typedef struct grub_bufio *grub_bufio_t;
+
+static struct grub_fs grub_bufio_fs;
+
+grub_file_t
+grub_bufio_open (grub_file_t io, int size)
+{
+ grub_file_t file;
+ grub_bufio_t bufio = 0;
+
+ file = (grub_file_t) grub_malloc (sizeof (*file));
+ if (! file)
+ return 0;
+
+ if (size == 0)
+ size = GRUB_BUFIO_DEF_SIZE;
+ else if (size > GRUB_BUFIO_MAX_SIZE)
+ size = GRUB_BUFIO_MAX_SIZE;
+
+ if ((size < 0) || ((unsigned) size > io->size))
+ size = ((io->size > GRUB_BUFIO_MAX_SIZE) ? GRUB_BUFIO_MAX_SIZE :
+ io->size);
+
+ bufio = grub_malloc (sizeof (struct grub_bufio) + size);
+ if (! bufio)
+ {
+ grub_free (file);
+ return 0;
+ }
+
+ bufio->file = io;
+ bufio->block_size = size;
+ bufio->buffer_len = 0;
+
+ file->device = io->device;
+ file->offset = 0;
+ file->size = io->size;
+ file->data = bufio;
+ file->read_hook = 0;
+ file->fs = &grub_bufio_fs;
+ file->not_easily_seekable = io->not_easily_seekable;
+
+ return file;
+}
+
+grub_file_t
+grub_buffile_open (const char *name, int size)
+{
+ grub_file_t io, file;
+
+ io = grub_file_open (name);
+ if (! io)
+ return 0;
+
+ file = grub_bufio_open (io, size);
+ if (! file)
+ {
+ grub_file_close (io);
+ return 0;
+ }
+
+ return file;
+}
+
+static grub_ssize_t
+grub_bufio_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ grub_size_t res = len;
+ grub_bufio_t bufio = file->data;
+ grub_uint32_t pos;
+
+ if ((file->offset >= bufio->file->offset) &&
+ (file->offset < bufio->file->offset + bufio->buffer_len))
+ {
+ grub_size_t n;
+
+ pos = file->offset - bufio->file->offset;
+ n = bufio->buffer_len - pos;
+ if (n > len)
+ n = len;
+
+ grub_memcpy (buf, &bufio->buffer[pos], n);
+ len -= n;
+ if (! len)
+ return res;
+
+ buf += n;
+ bufio->file->offset += bufio->buffer_len;
+ pos = 0;
+ }
+ else
+ {
+ bufio->file->offset = grub_divmod64 (file->offset, bufio->block_size,
+ &pos);
+ bufio->file->offset *= bufio->block_size;
+ }
+
+ if (pos + len >= bufio->block_size)
+ {
+ if (pos)
+ {
+ grub_size_t n;
+
+ bufio->file->fs->read (bufio->file, bufio->buffer,
+ bufio->block_size);
+ if (grub_errno)
+ return -1;
+
+ n = bufio->block_size - pos;
+ grub_memcpy (buf, &bufio->buffer[pos], n);
+ len -= n;
+ buf += n;
+ bufio->file->offset += bufio->block_size;
+ pos = 0;
+ }
+
+ while (len >= bufio->block_size)
+ {
+ bufio->file->fs->read (bufio->file, buf, bufio->block_size);
+ if (grub_errno)
+ return -1;
+
+ len -= bufio->block_size;
+ buf += bufio->block_size;
+ bufio->file->offset += bufio->block_size;
+ }
+
+ if (! len)
+ {
+ bufio->buffer_len = 0;
+ return res;
+ }
+ }
+
+ bufio->buffer_len = bufio->file->size - bufio->file->offset;
+ if (bufio->buffer_len > bufio->block_size)
+ bufio->buffer_len = bufio->block_size;
+
+ bufio->file->fs->read (bufio->file, bufio->buffer, bufio->buffer_len);
+ if (grub_errno)
+ return -1;
+
+ grub_memcpy (buf, &bufio->buffer[pos], len);
+
+ return res;
+}
+
+static grub_err_t
+grub_bufio_close (grub_file_t file)
+{
+ grub_bufio_t bufio = file->data;
+
+ grub_file_close (bufio->file);
+ grub_free (bufio);
+
+ file->device = 0;
+
+ return grub_errno;
+}
+
+static struct grub_fs grub_bufio_fs =
+ {
+ .name = "bufio",
+ .dir = 0,
+ .open = 0,
+ .read = grub_bufio_read,
+ .close = grub_bufio_close,
+ .label = 0,
+ .next = 0
+ };
diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c
new file mode 100644
index 0000000..1397a72
--- /dev/null
+++ b/grub-core/io/gzio.c
@@ -0,0 +1,1322 @@
+/* gzio.c - decompression support for gzip */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2005,2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Most of this file was originally the source file "inflate.c", written
+ * by Mark Adler. It has been very heavily modified. In particular, the
+ * original would run through the whole file at once, and this version can
+ * be stopped and restarted on any boundary during the decompression process.
+ *
+ * The license and header comments that file are included here.
+ */
+
+/* inflate.c -- Not copyrighted 1992 by Mark Adler
+ version c10p1, 10 January 1993 */
+
+/* You can do whatever you like with this source file, though I would
+ prefer that if you modify it and redistribute it that you include
+ comments to that effect with your name and the date. Thank you.
+ */
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/fs.h>
+#include <grub/file.h>
+#include <grub/dl.h>
+#include <grub/deflate.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/*
+ * Window Size
+ *
+ * This must be a power of two, and at least 32K for zip's deflate method
+ */
+
+#define WSIZE 0x8000
+
+
+#define INBUFSIZ 0x2000
+
+/* The state stored in filesystem-specific data. */
+struct grub_gzio
+{
+ /* The underlying file object. */
+ grub_file_t file;
+ /* If input is in memory following fields are used instead of file. */
+ grub_size_t mem_input_size, mem_input_off;
+ grub_uint8_t *mem_input;
+ /* The offset at which the data starts in the underlying file. */
+ grub_off_t data_offset;
+ /* The type of current block. */
+ int block_type;
+ /* The length of current block. */
+ int block_len;
+ /* The flag of the last block. */
+ int last_block;
+ /* The flag of codes. */
+ int code_state;
+ /* The length of a copy. */
+ unsigned inflate_n;
+ /* The index of a copy. */
+ unsigned inflate_d;
+ /* The input buffer. */
+ grub_uint8_t inbuf[INBUFSIZ];
+ int inbuf_d;
+ /* The bit buffer. */
+ unsigned long bb;
+ /* The bits in the bit buffer. */
+ unsigned bk;
+ /* The sliding window in uncompressed data. */
+ grub_uint8_t slide[WSIZE];
+ /* Current position in the slide. */
+ unsigned wp;
+ /* The literal/length code table. */
+ struct huft *tl;
+ /* The distance code table. */
+ struct huft *td;
+ /* The lookup bits for the literal/length code table. */
+ int bl;
+ /* The lookup bits for the distance code table. */
+ int bd;
+ /* The original offset value. */
+ grub_off_t saved_offset;
+};
+typedef struct grub_gzio *grub_gzio_t;
+
+/* Declare the filesystem structure for grub_gzio_open. */
+static struct grub_fs grub_gzio_fs;
+
+/* Function prototypes */
+static void initialize_tables (grub_gzio_t);
+
+/* Eat variable-length header fields. */
+static int
+eat_field (grub_file_t file, int len)
+{
+ char ch = 1;
+ int not_retval = 1;
+
+ do
+ {
+ if (len >= 0)
+ {
+ if (! (len--))
+ break;
+ }
+ else
+ {
+ if (! ch)
+ break;
+ }
+ }
+ while ((not_retval = grub_file_read (file, &ch, 1)) == 1);
+
+ return ! not_retval;
+}
+
+
+/* Little-Endian defines for the 2-byte magic numbers for gzip files. */
+#define GZIP_MAGIC grub_le_to_cpu16 (0x8B1F)
+#define OLD_GZIP_MAGIC grub_le_to_cpu16 (0x9E1F)
+
+/* Compression methods (see algorithm.doc) */
+#define STORED 0
+#define COMPRESSED 1
+#define PACKED 2
+#define LZHED 3
+/* methods 4 to 7 reserved */
+#define DEFLATED 8
+#define MAX_METHODS 9
+
+/* gzip flag byte */
+#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
+#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
+#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
+#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
+#define COMMENT 0x10 /* bit 4 set: file comment present */
+#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
+#define RESERVED 0xC0 /* bit 6,7: reserved */
+
+#define UNSUPPORTED_FLAGS (CONTINUATION | ENCRYPTED | RESERVED)
+
+/* inflate block codes */
+#define INFLATE_STORED 0
+#define INFLATE_FIXED 1
+#define INFLATE_DYNAMIC 2
+
+typedef unsigned char uch;
+typedef unsigned short ush;
+typedef unsigned long ulg;
+
+static int
+test_gzip_header (grub_file_t file)
+{
+ struct {
+ grub_uint16_t magic;
+ grub_uint8_t method;
+ grub_uint8_t flags;
+ grub_uint32_t timestamp;
+ grub_uint8_t extra_flags;
+ grub_uint8_t os_type;
+ } hdr;
+ grub_uint16_t extra_len;
+ grub_uint32_t orig_len;
+ grub_gzio_t gzio = file->data;
+
+ if (grub_file_tell (gzio->file) != 0)
+ grub_file_seek (gzio->file, 0);
+
+ /*
+ * This checks if the file is gzipped. If a problem occurs here
+ * (other than a real error with the disk) then we don't think it
+ * is a compressed file, and simply mark it as such.
+ */
+ if (grub_file_read (gzio->file, &hdr, 10) != 10
+ || ((hdr.magic != GZIP_MAGIC)
+ && (hdr.magic != OLD_GZIP_MAGIC)))
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "no gzip magic found");
+ return 0;
+ }
+
+ /*
+ * This does consistency checking on the header data. If a
+ * problem occurs from here on, then we have corrupt or otherwise
+ * bad data, and the error should be reported to the user.
+ */
+ if (hdr.method != DEFLATED
+ || (hdr.flags & UNSUPPORTED_FLAGS)
+ || ((hdr.flags & EXTRA_FIELD)
+ && (grub_file_read (gzio->file, &extra_len, 2) != 2
+ || eat_field (gzio->file,
+ grub_le_to_cpu16 (extra_len))))
+ || ((hdr.flags & ORIG_NAME) && eat_field (gzio->file, -1))
+ || ((hdr.flags & COMMENT) && eat_field (gzio->file, -1)))
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
+ return 0;
+ }
+
+ gzio->data_offset = grub_file_tell (gzio->file);
+
+ /* FIXME: don't do this on not easily seekable files. */
+ {
+ grub_file_seek (gzio->file, grub_file_size (gzio->file) - 4);
+ if (grub_file_read (gzio->file, &orig_len, 4) != 4)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "unsupported gzip format");
+ return 0;
+ }
+ /* FIXME: this does not handle files whose original size is over 4GB.
+ But how can we know the real original size? */
+ file->size = grub_le_to_cpu32 (orig_len);
+ }
+
+ initialize_tables (gzio);
+
+ return 1;
+}
+
+
+/* Huffman code lookup table entry--this entry is four bytes for machines
+ that have 16-bit pointers (e.g. PC's in the small or medium model).
+ Valid extra bits are 0..13. e == 15 is EOB (end of block), e == 16
+ means that v is a literal, 16 < e < 32 means that v is a pointer to
+ the next table, which codes e - 16 bits, and lastly e == 99 indicates
+ an unused code. If a code with e == 99 is looked up, this implies an
+ error in the data. */
+struct huft
+{
+ uch e; /* number of extra bits or operation */
+ uch b; /* number of bits in this code or subcode */
+ union
+ {
+ ush n; /* literal, length base, or distance base */
+ struct huft *t; /* pointer to next level of table */
+ }
+ v;
+};
+
+
+/* The inflate algorithm uses a sliding 32K byte window on the uncompressed
+ stream to find repeated byte strings. This is implemented here as a
+ circular buffer. The index is updated simply by incrementing and then
+ and'ing with 0x7fff (32K-1). */
+/* It is left to other modules to supply the 32K area. It is assumed
+ to be usable as if it were declared "uch slide[32768];" or as just
+ "uch *slide;" and then malloc'ed in the latter case. The definition
+ must be in unzip.h, included above. */
+
+
+/* Tables for deflate from PKZIP's appnote.txt. */
+static unsigned bitorder[] =
+{ /* Order of the bit length code lengths */
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
+static ush cplens[] =
+{ /* Copy lengths for literal codes 257..285 */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
+ /* note: see note #13 above about the 258 in this list. */
+static ush cplext[] =
+{ /* Extra bits for literal codes 257..285 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
+ 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */
+static ush cpdist[] =
+{ /* Copy offsets for distance codes 0..29 */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577};
+static ush cpdext[] =
+{ /* Extra bits for distance codes */
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
+ 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
+ 12, 12, 13, 13};
+
+
+/*
+ Huffman code decoding is performed using a multi-level table lookup.
+ The fastest way to decode is to simply build a lookup table whose
+ size is determined by the longest code. However, the time it takes
+ to build this table can also be a factor if the data being decoded
+ is not very long. The most common codes are necessarily the
+ shortest codes, so those codes dominate the decoding time, and hence
+ the speed. The idea is you can have a shorter table that decodes the
+ shorter, more probable codes, and then point to subsidiary tables for
+ the longer codes. The time it costs to decode the longer codes is
+ then traded against the time it takes to make longer tables.
+
+ This results of this trade are in the variables lbits and dbits
+ below. lbits is the number of bits the first level table for literal/
+ length codes can decode in one step, and dbits is the same thing for
+ the distance codes. Subsequent tables are also less than or equal to
+ those sizes. These values may be adjusted either when all of the
+ codes are shorter than that, in which case the longest code length in
+ bits is used, or when the shortest code is *longer* than the requested
+ table size, in which case the length of the shortest code in bits is
+ used.
+
+ There are two different values for the two tables, since they code a
+ different number of possibilities each. The literal/length table
+ codes 286 possible values, or in a flat code, a little over eight
+ bits. The distance table codes 30 possible values, or a little less
+ than five bits, flat. The optimum values for speed end up being
+ about one bit more than those, so lbits is 8+1 and dbits is 5+1.
+ The optimum values may differ though from machine to machine, and
+ possibly even between compilers. Your mileage may vary.
+ */
+
+
+static int lbits = 9; /* bits in base literal/length lookup table */
+static int dbits = 6; /* bits in base distance lookup table */
+
+
+/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */
+#define BMAX 16 /* maximum bit length of any code (16 for explode) */
+#define N_MAX 288 /* maximum number of codes in any set */
+
+
+/* Macros for inflate() bit peeking and grabbing.
+ The usage is:
+
+ NEEDBITS(j)
+ x = b & mask_bits[j];
+ DUMPBITS(j)
+
+ where NEEDBITS makes sure that b has at least j bits in it, and
+ DUMPBITS removes the bits from b. The macros use the variable k
+ for the number of bits in b. Normally, b and k are register
+ variables for speed, and are initialized at the beginning of a
+ routine that uses these macros from a global bit buffer and count.
+
+ If we assume that EOB will be the longest code, then we will never
+ ask for bits with NEEDBITS that are beyond the end of the stream.
+ So, NEEDBITS should not read any more bytes than are needed to
+ meet the request. Then no bytes need to be "returned" to the buffer
+ at the end of the last block.
+
+ However, this assumption is not true for fixed blocks--the EOB code
+ is 7 bits, but the other literal/length codes can be 8 or 9 bits.
+ (The EOB code is shorter than other codes because fixed blocks are
+ generally short. So, while a block always has an EOB, many other
+ literal/length codes have a significantly lower probability of
+ showing up at all.) However, by making the first table have a
+ lookup of seven bits, the EOB code will be found in that first
+ lookup, and so will not require that too many bits be pulled from
+ the stream.
+ */
+
+static ush mask_bits[] =
+{
+ 0x0000,
+ 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
+ 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
+};
+
+#define NEEDBITS(n) do {while(k<(n)){b|=((ulg)get_byte(gzio))<<k;k+=8;}} while (0)
+#define DUMPBITS(n) do {b>>=(n);k-=(n);} while (0)
+
+static int
+get_byte (grub_gzio_t gzio)
+{
+ if (gzio->mem_input)
+ {
+ if (gzio->mem_input_off < gzio->mem_input_size)
+ return gzio->mem_input[gzio->mem_input_off++];
+ return 0;
+ }
+
+ if (grub_file_tell (gzio->file) == (grub_off_t) gzio->data_offset
+ || gzio->inbuf_d == INBUFSIZ)
+ {
+ gzio->inbuf_d = 0;
+ grub_file_read (gzio->file, gzio->inbuf, INBUFSIZ);
+ }
+
+ return gzio->inbuf[gzio->inbuf_d++];
+}
+
+static void
+gzio_seek (grub_gzio_t gzio, grub_off_t off)
+{
+ if (gzio->mem_input)
+ {
+ if (off > gzio->mem_input_size)
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "attempt to seek outside of the file");
+ else
+ gzio->mem_input_off = gzio->data_offset;
+ }
+ else
+ grub_file_seek (gzio->file, off);
+}
+
+/* more function prototypes */
+static int huft_build (unsigned *, unsigned, unsigned, ush *, ush *,
+ struct huft **, int *);
+static int huft_free (struct huft *);
+static int inflate_codes_in_window (grub_gzio_t);
+
+
+/* Given a list of code lengths and a maximum table size, make a set of
+ tables to decode that set of codes. Return zero on success, one if
+ the given code set is incomplete (the tables are still built in this
+ case), two if the input is invalid (all zero length codes or an
+ oversubscribed set of lengths), and three if not enough memory. */
+
+static int
+huft_build (unsigned *b, /* code lengths in bits (all assumed <= BMAX) */
+ unsigned n, /* number of codes (assumed <= N_MAX) */
+ unsigned s, /* number of simple-valued codes (0..s-1) */
+ ush * d, /* list of base values for non-simple codes */
+ ush * e, /* list of extra bits for non-simple codes */
+ struct huft **t, /* result: starting table */
+ int *m) /* maximum lookup bits, returns actual */
+{
+ unsigned a; /* counter for codes of length k */
+ unsigned c[BMAX + 1]; /* bit length count table */
+ unsigned f; /* i repeats in table every f entries */
+ int g; /* maximum code length */
+ int h; /* table level */
+ register unsigned i; /* counter, current code */
+ register unsigned j; /* counter */
+ register int k; /* number of bits in current code */
+ int l; /* bits per table (returned in m) */
+ register unsigned *p; /* pointer into c[], b[], or v[] */
+ register struct huft *q; /* points to current table */
+ struct huft r; /* table entry for structure assignment */
+ struct huft *u[BMAX]; /* table stack */
+ unsigned v[N_MAX]; /* values in order of bit length */
+ register int w; /* bits before this table == (l * h) */
+ unsigned x[BMAX + 1]; /* bit offsets, then code stack */
+ unsigned *xp; /* pointer into x */
+ int y; /* number of dummy codes added */
+ unsigned z; /* number of entries in current table */
+
+ /* Generate counts for each bit length */
+ grub_memset ((char *) c, 0, sizeof (c));
+ p = b;
+ i = n;
+ do
+ {
+ c[*p]++; /* assume all entries <= BMAX */
+ p++; /* Can't combine with above line (Solaris bug) */
+ }
+ while (--i);
+ if (c[0] == n) /* null input--all zero length codes */
+ {
+ *t = (struct huft *) NULL;
+ *m = 0;
+ return 0;
+ }
+
+ /* Find minimum and maximum length, bound *m by those */
+ l = *m;
+ for (j = 1; j <= BMAX; j++)
+ if (c[j])
+ break;
+ k = j; /* minimum code length */
+ if ((unsigned) l < j)
+ l = j;
+ for (i = BMAX; i; i--)
+ if (c[i])
+ break;
+ g = i; /* maximum code length */
+ if ((unsigned) l > i)
+ l = i;
+ *m = l;
+
+ /* Adjust last length count to fill out codes, if needed */
+ for (y = 1 << j; j < i; j++, y <<= 1)
+ if ((y -= c[j]) < 0)
+ return 2; /* bad input: more codes than bits */
+ if ((y -= c[i]) < 0)
+ return 2;
+ c[i] += y;
+
+ /* Generate starting offsets into the value table for each length */
+ x[1] = j = 0;
+ p = c + 1;
+ xp = x + 2;
+ while (--i)
+ { /* note that i == g from above */
+ *xp++ = (j += *p++);
+ }
+
+ /* Make a table of values in order of bit lengths */
+ p = b;
+ i = 0;
+ do
+ {
+ if ((j = *p++) != 0)
+ v[x[j]++] = i;
+ }
+ while (++i < n);
+
+ /* Generate the Huffman codes and for each, make the table entries */
+ x[0] = i = 0; /* first Huffman code is zero */
+ p = v; /* grab values in bit order */
+ h = -1; /* no tables yet--level -1 */
+ w = -l; /* bits decoded == (l * h) */
+ u[0] = (struct huft *) NULL; /* just to keep compilers happy */
+ q = (struct huft *) NULL; /* ditto */
+ z = 0; /* ditto */
+
+ /* go through the bit lengths (k already is bits in shortest code) */
+ for (; k <= g; k++)
+ {
+ a = c[k];
+ while (a--)
+ {
+ /* here i is the Huffman code of length k bits for value *p */
+ /* make tables up to required level */
+ while (k > w + l)
+ {
+ h++;
+ w += l; /* previous table always l bits */
+
+ /* compute minimum size table less than or equal to l bits */
+ z = (z = (unsigned) (g - w)) > (unsigned) l ? (unsigned) l : z; /* upper limit on table size */
+ if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
+ { /* too few codes for k-w bit table */
+ f -= a + 1; /* deduct codes from patterns left */
+ xp = c + k;
+ while (++j < z) /* try smaller tables up to z bits */
+ {
+ if ((f <<= 1) <= *++xp)
+ break; /* enough codes to use up j bits */
+ f -= *xp; /* else deduct codes from patterns */
+ }
+ }
+ z = 1 << j; /* table entries for j-bit table */
+
+ /* allocate and link in new table */
+ q = (struct huft *) grub_malloc ((z + 1) * sizeof (struct huft));
+ if (! q)
+ {
+ if (h)
+ huft_free (u[0]);
+ return 3;
+ }
+
+ *t = q + 1; /* link to list for huft_free() */
+ *(t = &(q->v.t)) = (struct huft *) NULL;
+ u[h] = ++q; /* table starts after link */
+
+ /* connect to last table, if there is one */
+ if (h)
+ {
+ x[h] = i; /* save pattern for backing up */
+ r.b = (uch) l; /* bits to dump before this table */
+ r.e = (uch) (16 + j); /* bits in this table */
+ r.v.t = q; /* pointer to this table */
+ j = i >> (w - l); /* (get around Turbo C bug) */
+ u[h - 1][j] = r; /* connect to last table */
+ }
+ }
+
+ /* set up table entry in r */
+ r.b = (uch) (k - w);
+ if (p >= v + n)
+ r.e = 99; /* out of values--invalid code */
+ else if (*p < s)
+ {
+ r.e = (uch) (*p < 256 ? 16 : 15); /* 256 is end-of-block code */
+ r.v.n = (ush) (*p); /* simple code is just the value */
+ p++; /* one compiler does not like *p++ */
+ }
+ else
+ {
+ r.e = (uch) e[*p - s]; /* non-simple--look up in lists */
+ r.v.n = d[*p++ - s];
+ }
+
+ /* fill code-like entries with r */
+ f = 1 << (k - w);
+ for (j = i >> w; j < z; j += f)
+ q[j] = r;
+
+ /* backwards increment the k-bit code i */
+ for (j = 1 << (k - 1); i & j; j >>= 1)
+ i ^= j;
+ i ^= j;
+
+ /* backup over finished tables */
+ while ((i & ((1 << w) - 1)) != x[h])
+ {
+ h--; /* don't need to update q */
+ w -= l;
+ }
+ }
+ }
+
+ /* Return true (1) if we were given an incomplete table */
+ return y != 0 && g != 1;
+}
+
+
+/* Free the malloc'ed tables built by huft_build(), which makes a linked
+ list of the tables it made, with the links in a dummy first entry of
+ each table. */
+static int
+huft_free (struct huft *t)
+{
+ register struct huft *p, *q;
+
+
+ /* Go through linked list, freeing from the malloced (t[-1]) address. */
+ p = t;
+ while (p != (struct huft *) NULL)
+ {
+ q = (--p)->v.t;
+ grub_free ((char *) p);
+ p = q;
+ }
+ return 0;
+}
+
+
+/*
+ * inflate (decompress) the codes in a deflated (compressed) block.
+ * Return an error code or zero if it all goes ok.
+ */
+
+static int
+inflate_codes_in_window (grub_gzio_t gzio)
+{
+ register unsigned e; /* table entry flag/number of extra bits */
+ unsigned n, d; /* length and index for copy */
+ unsigned w; /* current window position */
+ struct huft *t; /* pointer to table entry */
+ unsigned ml, md; /* masks for bl and bd bits */
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+
+ /* make local copies of globals */
+ d = gzio->inflate_d;
+ n = gzio->inflate_n;
+ b = gzio->bb; /* initialize bit buffer */
+ k = gzio->bk;
+ w = gzio->wp; /* initialize window position */
+
+ /* inflate the coded data */
+ ml = mask_bits[gzio->bl]; /* precompute masks for speed */
+ md = mask_bits[gzio->bd];
+ for (;;) /* do until end of block */
+ {
+ if (! gzio->code_state)
+ {
+ NEEDBITS ((unsigned) gzio->bl);
+ if ((e = (t = gzio->tl + ((unsigned) b & ml))->e) > 16)
+ do
+ {
+ if (e == 99)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "an unused code found");
+ return 1;
+ }
+ DUMPBITS (t->b);
+ e -= 16;
+ NEEDBITS (e);
+ }
+ while ((e = (t = t->v.t + ((unsigned) b & mask_bits[e]))->e) > 16);
+ DUMPBITS (t->b);
+
+ if (e == 16) /* then it's a literal */
+ {
+ gzio->slide[w++] = (uch) t->v.n;
+ if (w == WSIZE)
+ break;
+ }
+ else
+ /* it's an EOB or a length */
+ {
+ /* exit if end of block */
+ if (e == 15)
+ {
+ gzio->block_len = 0;
+ break;
+ }
+
+ /* get length of block to copy */
+ NEEDBITS (e);
+ n = t->v.n + ((unsigned) b & mask_bits[e]);
+ DUMPBITS (e);
+
+ /* decode distance of block to copy */
+ NEEDBITS ((unsigned) gzio->bd);
+ if ((e = (t = gzio->td + ((unsigned) b & md))->e) > 16)
+ do
+ {
+ if (e == 99)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "an unused code found");
+ return 1;
+ }
+ DUMPBITS (t->b);
+ e -= 16;
+ NEEDBITS (e);
+ }
+ while ((e = (t = t->v.t + ((unsigned) b & mask_bits[e]))->e)
+ > 16);
+ DUMPBITS (t->b);
+ NEEDBITS (e);
+ d = w - t->v.n - ((unsigned) b & mask_bits[e]);
+ DUMPBITS (e);
+ gzio->code_state++;
+ }
+ }
+
+ if (gzio->code_state)
+ {
+ /* do the copy */
+ do
+ {
+ n -= (e = (e = WSIZE - ((d &= WSIZE - 1) > w ? d : w)) > n ? n
+ : e);
+
+ if (w - d >= e)
+ {
+ grub_memmove (gzio->slide + w, gzio->slide + d, e);
+ w += e;
+ d += e;
+ }
+ else
+ /* purposefully use the overlap for extra copies here!! */
+ {
+ while (e--)
+ gzio->slide[w++] = gzio->slide[d++];
+ }
+
+ if (w == WSIZE)
+ break;
+ }
+ while (n);
+
+ if (! n)
+ gzio->code_state--;
+
+ /* did we break from the loop too soon? */
+ if (w == WSIZE)
+ break;
+ }
+ }
+
+ /* restore the globals from the locals */
+ gzio->inflate_d = d;
+ gzio->inflate_n = n;
+ gzio->wp = w; /* restore global window pointer */
+ gzio->bb = b; /* restore global bit buffer */
+ gzio->bk = k;
+
+ return ! gzio->block_len;
+}
+
+
+/* get header for an inflated type 0 (stored) block. */
+
+static void
+init_stored_block (grub_gzio_t gzio)
+{
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+
+ /* make local copies of globals */
+ b = gzio->bb; /* initialize bit buffer */
+ k = gzio->bk;
+
+ /* go to byte boundary */
+ DUMPBITS (k & 7);
+
+ /* get the length and its complement */
+ NEEDBITS (16);
+ gzio->block_len = ((unsigned) b & 0xffff);
+ DUMPBITS (16);
+ NEEDBITS (16);
+ if (gzio->block_len != (int) ((~b) & 0xffff))
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "the length of a stored block does not match");
+ DUMPBITS (16);
+
+ /* restore global variables */
+ gzio->bb = b;
+ gzio->bk = k;
+}
+
+
+/* get header for an inflated type 1 (fixed Huffman codes) block. We should
+ either replace this with a custom decoder, or at least precompute the
+ Huffman tables. */
+
+static void
+init_fixed_block (grub_gzio_t gzio)
+{
+ int i; /* temporary variable */
+ unsigned l[288]; /* length list for huft_build */
+
+ /* set up literal table */
+ for (i = 0; i < 144; i++)
+ l[i] = 8;
+ for (; i < 256; i++)
+ l[i] = 9;
+ for (; i < 280; i++)
+ l[i] = 7;
+ for (; i < 288; i++) /* make a complete, but wrong code set */
+ l[i] = 8;
+ gzio->bl = 7;
+ if (huft_build (l, 288, 257, cplens, cplext, &gzio->tl, &gzio->bl) != 0)
+ {
+ if (grub_errno == GRUB_ERR_NONE)
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "failed in building a Huffman code table");
+ return;
+ }
+
+ /* set up distance table */
+ for (i = 0; i < 30; i++) /* make an incomplete code set */
+ l[i] = 5;
+ gzio->bd = 5;
+ if (huft_build (l, 30, 0, cpdist, cpdext, &gzio->td, &gzio->bd) > 1)
+ {
+ if (grub_errno == GRUB_ERR_NONE)
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "failed in building a Huffman code table");
+ huft_free (gzio->tl);
+ gzio->tl = 0;
+ return;
+ }
+
+ /* indicate we're now working on a block */
+ gzio->code_state = 0;
+ gzio->block_len++;
+}
+
+
+/* get header for an inflated type 2 (dynamic Huffman codes) block. */
+
+static void
+init_dynamic_block (grub_gzio_t gzio)
+{
+ int i; /* temporary variables */
+ unsigned j;
+ unsigned l; /* last length */
+ unsigned m; /* mask for bit lengths table */
+ unsigned n; /* number of lengths to get */
+ unsigned nb; /* number of bit length codes */
+ unsigned nl; /* number of literal/length codes */
+ unsigned nd; /* number of distance codes */
+ unsigned ll[286 + 30]; /* literal/length and distance code lengths */
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+
+ /* make local bit buffer */
+ b = gzio->bb;
+ k = gzio->bk;
+
+ /* read in table lengths */
+ NEEDBITS (5);
+ nl = 257 + ((unsigned) b & 0x1f); /* number of literal/length codes */
+ DUMPBITS (5);
+ NEEDBITS (5);
+ nd = 1 + ((unsigned) b & 0x1f); /* number of distance codes */
+ DUMPBITS (5);
+ NEEDBITS (4);
+ nb = 4 + ((unsigned) b & 0xf); /* number of bit length codes */
+ DUMPBITS (4);
+ if (nl > 286 || nd > 30)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too much data");
+ return;
+ }
+
+ /* read in bit-length-code lengths */
+ for (j = 0; j < nb; j++)
+ {
+ NEEDBITS (3);
+ ll[bitorder[j]] = (unsigned) b & 7;
+ DUMPBITS (3);
+ }
+ for (; j < 19; j++)
+ ll[bitorder[j]] = 0;
+
+ /* build decoding table for trees--single level, 7 bit lookup */
+ gzio->bl = 7;
+ if (huft_build (ll, 19, 19, NULL, NULL, &gzio->tl, &gzio->bl) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "failed in building a Huffman code table");
+ return;
+ }
+
+ /* read in literal and distance code lengths */
+ n = nl + nd;
+ m = mask_bits[gzio->bl];
+ i = l = 0;
+ while ((unsigned) i < n)
+ {
+ NEEDBITS ((unsigned) gzio->bl);
+ j = (gzio->td = gzio->tl + ((unsigned) b & m))->b;
+ DUMPBITS (j);
+ j = gzio->td->v.n;
+ if (j < 16) /* length of code in bits (0..15) */
+ ll[i++] = l = j; /* save last length in l */
+ else if (j == 16) /* repeat last length 3 to 6 times */
+ {
+ NEEDBITS (2);
+ j = 3 + ((unsigned) b & 3);
+ DUMPBITS (2);
+ if ((unsigned) i + j > n)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too many codes found");
+ return;
+ }
+ while (j--)
+ ll[i++] = l;
+ }
+ else if (j == 17) /* 3 to 10 zero length codes */
+ {
+ NEEDBITS (3);
+ j = 3 + ((unsigned) b & 7);
+ DUMPBITS (3);
+ if ((unsigned) i + j > n)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too many codes found");
+ return;
+ }
+ while (j--)
+ ll[i++] = 0;
+ l = 0;
+ }
+ else
+ /* j == 18: 11 to 138 zero length codes */
+ {
+ NEEDBITS (7);
+ j = 11 + ((unsigned) b & 0x7f);
+ DUMPBITS (7);
+ if ((unsigned) i + j > n)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "too many codes found");
+ return;
+ }
+ while (j--)
+ ll[i++] = 0;
+ l = 0;
+ }
+ }
+
+ /* free decoding table for trees */
+ huft_free (gzio->tl);
+ gzio->td = 0;
+ gzio->tl = 0;
+
+ /* restore the global bit buffer */
+ gzio->bb = b;
+ gzio->bk = k;
+
+ /* build the decoding tables for literal/length and distance codes */
+ gzio->bl = lbits;
+ if (huft_build (ll, nl, 257, cplens, cplext, &gzio->tl, &gzio->bl) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "failed in building a Huffman code table");
+ return;
+ }
+ gzio->bd = dbits;
+ if (huft_build (ll + nl, nd, 0, cpdist, cpdext, &gzio->td, &gzio->bd) != 0)
+ {
+ huft_free (gzio->tl);
+ gzio->tl = 0;
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "failed in building a Huffman code table");
+ return;
+ }
+
+ /* indicate we're now working on a block */
+ gzio->code_state = 0;
+ gzio->block_len++;
+}
+
+
+static void
+get_new_block (grub_gzio_t gzio)
+{
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+
+ /* make local bit buffer */
+ b = gzio->bb;
+ k = gzio->bk;
+
+ /* read in last block bit */
+ NEEDBITS (1);
+ gzio->last_block = (int) b & 1;
+ DUMPBITS (1);
+
+ /* read in block type */
+ NEEDBITS (2);
+ gzio->block_type = (unsigned) b & 3;
+ DUMPBITS (2);
+
+ /* restore the global bit buffer */
+ gzio->bb = b;
+ gzio->bk = k;
+
+ switch (gzio->block_type)
+ {
+ case INFLATE_STORED:
+ init_stored_block (gzio);
+ break;
+ case INFLATE_FIXED:
+ init_fixed_block (gzio);
+ break;
+ case INFLATE_DYNAMIC:
+ init_dynamic_block (gzio);
+ break;
+ default:
+ break;
+ }
+}
+
+
+static void
+inflate_window (grub_gzio_t gzio)
+{
+ /* initialize window */
+ gzio->wp = 0;
+
+ /*
+ * Main decompression loop.
+ */
+
+ while (gzio->wp < WSIZE && grub_errno == GRUB_ERR_NONE)
+ {
+ if (! gzio->block_len)
+ {
+ if (gzio->last_block)
+ break;
+
+ get_new_block (gzio);
+ }
+
+ if (gzio->block_type > INFLATE_DYNAMIC)
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "unknown block type %d", gzio->block_type);
+
+ if (grub_errno != GRUB_ERR_NONE)
+ return;
+
+ /*
+ * Expand stored block here.
+ */
+ if (gzio->block_type == INFLATE_STORED)
+ {
+ int w = gzio->wp;
+
+ /*
+ * This is basically a glorified pass-through
+ */
+
+ while (gzio->block_len && w < WSIZE && grub_errno == GRUB_ERR_NONE)
+ {
+ gzio->slide[w++] = get_byte (gzio);
+ gzio->block_len--;
+ }
+
+ gzio->wp = w;
+
+ continue;
+ }
+
+ /*
+ * Expand other kind of block.
+ */
+
+ if (inflate_codes_in_window (gzio))
+ {
+ huft_free (gzio->tl);
+ huft_free (gzio->td);
+ gzio->tl = 0;
+ gzio->td = 0;
+ }
+ }
+
+ gzio->saved_offset += WSIZE;
+
+ /* XXX do CRC calculation here! */
+}
+
+
+static void
+initialize_tables (grub_gzio_t gzio)
+{
+ gzio->saved_offset = 0;
+ gzio_seek (gzio, gzio->data_offset);
+
+ /* Initialize the bit buffer. */
+ gzio->bk = 0;
+ gzio->bb = 0;
+
+ /* Reset partial decompression code. */
+ gzio->last_block = 0;
+ gzio->block_len = 0;
+
+ /* Reset memory allocation stuff. */
+ huft_free (gzio->tl);
+ huft_free (gzio->td);
+}
+
+
+/* Open a new decompressing object on the top of IO. If TRANSPARENT is true,
+ even if IO does not contain data compressed by gzip, return a valid file
+ object. Note that this function won't close IO, even if an error occurs. */
+static grub_file_t
+grub_gzio_open (grub_file_t io)
+{
+ grub_file_t file;
+ grub_gzio_t gzio = 0;
+
+ file = (grub_file_t) grub_malloc (sizeof (*file));
+ if (! file)
+ return 0;
+
+ gzio = grub_zalloc (sizeof (*gzio));
+ if (! gzio)
+ {
+ grub_free (file);
+ return 0;
+ }
+
+ gzio->file = io;
+
+ file->device = io->device;
+ file->offset = 0;
+ file->data = gzio;
+ file->read_hook = 0;
+ file->fs = &grub_gzio_fs;
+ file->not_easily_seekable = 1;
+
+ if (! test_gzip_header (file))
+ {
+ grub_free (gzio);
+ grub_free (file);
+ grub_file_seek (io, 0);
+
+ if (grub_errno == GRUB_ERR_BAD_FILE_TYPE)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return io;
+ }
+ }
+
+ return file;
+}
+
+static int
+test_zlib_header (grub_gzio_t gzio)
+{
+ grub_uint8_t cmf, flg;
+
+ cmf = get_byte (gzio);
+ flg = get_byte (gzio);
+
+ /* Check that compression method is DEFLATE. */
+ if ((cmf & 0xf) != DEFLATED)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
+ return 0;
+ }
+
+ if ((cmf * 256 + flg) % 31)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
+ return 0;
+ }
+
+ /* Dictionary isn't supported. */
+ if (flg & 0x20)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
+ return 0;
+ }
+
+ gzio->data_offset = 2;
+ initialize_tables (gzio);
+
+ return 1;
+}
+
+static grub_ssize_t
+grub_gzio_read_real (grub_gzio_t gzio, grub_off_t offset,
+ char *buf, grub_size_t len)
+{
+ grub_ssize_t ret = 0;
+
+ /* Do we reset decompression to the beginning of the file? */
+ if (gzio->saved_offset > offset + WSIZE)
+ initialize_tables (gzio);
+
+ /*
+ * This loop operates upon uncompressed data only. The only
+ * special thing it does is to make sure the decompression
+ * window is within the range of data it needs.
+ */
+
+ while (len > 0 && grub_errno == GRUB_ERR_NONE)
+ {
+ register grub_size_t size;
+ register char *srcaddr;
+
+ while (offset >= gzio->saved_offset)
+ inflate_window (gzio);
+
+ srcaddr = (char *) ((offset & (WSIZE - 1)) + gzio->slide);
+ size = gzio->saved_offset - offset;
+ if (size > len)
+ size = len;
+
+ grub_memmove (buf, srcaddr, size);
+
+ buf += size;
+ len -= size;
+ ret += size;
+ offset += size;
+ }
+
+ if (grub_errno != GRUB_ERR_NONE)
+ ret = -1;
+
+ return ret;
+}
+
+static grub_ssize_t
+grub_gzio_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ return grub_gzio_read_real (file->data, file->offset, buf, len);
+}
+
+/* Release everything, including the underlying file object. */
+static grub_err_t
+grub_gzio_close (grub_file_t file)
+{
+ grub_gzio_t gzio = file->data;
+
+ grub_file_close (gzio->file);
+ huft_free (gzio->tl);
+ huft_free (gzio->td);
+ grub_free (gzio);
+
+ /* No need to close the same device twice. */
+ file->device = 0;
+
+ return grub_errno;
+}
+
+grub_ssize_t
+grub_zlib_decompress (char *inbuf, grub_size_t insize, grub_off_t off,
+ char *outbuf, grub_size_t outsize)
+{
+ grub_gzio_t gzio = 0;
+ grub_ssize_t ret;
+
+ gzio = grub_zalloc (sizeof (*gzio));
+ if (! gzio)
+ return -1;
+ gzio->mem_input = (grub_uint8_t *) inbuf;
+ gzio->mem_input_size = insize;
+ gzio->mem_input_off = 0;
+
+ if (!test_zlib_header (gzio))
+ {
+ grub_free (gzio);
+ return -1;
+ }
+
+ ret = grub_gzio_read_real (gzio, off, outbuf, outsize);
+ grub_free (gzio);
+
+ /* FIXME: Check Adler. */
+ return ret;
+}
+
+
+
+static struct grub_fs grub_gzio_fs =
+ {
+ .name = "gzio",
+ .dir = 0,
+ .open = 0,
+ .read = grub_gzio_read,
+ .close = grub_gzio_close,
+ .label = 0,
+ .next = 0
+ };
+
+GRUB_MOD_INIT(gzio)
+{
+ grub_file_filter_register (GRUB_FILE_FILTER_GZIO, grub_gzio_open);
+}
+
+GRUB_MOD_FINI(gzio)
+{
+ grub_file_filter_unregister (GRUB_FILE_FILTER_GZIO);
+}
diff --git a/grub-core/io/xzio.c b/grub-core/io/xzio.c
new file mode 100644
index 0000000..1f42cd2
--- /dev/null
+++ b/grub-core/io/xzio.c
@@ -0,0 +1,356 @@
+/* xzio.c - decompression support for xz */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/fs.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#include "xz.h"
+#include "xz_stream.h"
+
+#define XZBUFSIZ 0x2000
+#define VLI_MAX_DIGITS 9
+#define XZ_STREAM_FOOTER_SIZE 12
+
+struct grub_xzio
+{
+ grub_file_t file;
+ struct xz_buf buf;
+ struct xz_dec *dec;
+ grub_uint8_t inbuf[XZBUFSIZ];
+ grub_uint8_t outbuf[XZBUFSIZ];
+ grub_off_t saved_offset;
+};
+
+typedef struct grub_xzio *grub_xzio_t;
+static struct grub_fs grub_xzio_fs;
+
+static grub_size_t
+decode_vli (const grub_uint8_t buf[], grub_size_t size_max,
+ grub_uint64_t * num)
+{
+ if (size_max == 0)
+ return 0;
+
+ if (size_max > VLI_MAX_DIGITS)
+ size_max = VLI_MAX_DIGITS;
+
+ *num = buf[0] & 0x7F;
+ grub_size_t i = 0;
+
+ while (buf[i++] & 0x80)
+ {
+ if (i >= size_max || buf[i] == 0x00)
+ return 0;
+
+ *num |= (uint64_t) (buf[i] & 0x7F) << (i * 7);
+ }
+
+ return i;
+}
+
+static grub_ssize_t
+read_vli (grub_file_t file, grub_uint64_t * num)
+{
+ grub_uint8_t buf[VLI_MAX_DIGITS];
+ grub_ssize_t read;
+ grub_size_t dec;
+
+ read = grub_file_read (file, buf, VLI_MAX_DIGITS);
+ if (read < 0)
+ return -1;
+
+ dec = decode_vli (buf, read, num);
+ grub_file_seek (file, file->offset - (read - dec));
+ return dec;
+}
+
+/* Function xz_dec_run() should consume header and ask for more (XZ_OK)
+ * else file is corrupted (or options not supported) or not xz. */
+static int
+test_header (grub_file_t file)
+{
+ grub_xzio_t xzio = file->data;
+ xzio->buf.in_size = grub_file_read (xzio->file, xzio->inbuf,
+ STREAM_HEADER_SIZE);
+
+ if (xzio->buf.in_size != STREAM_HEADER_SIZE)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "no xz magic found");
+ return 0;
+ }
+
+ enum xz_ret ret = xz_dec_run (xzio->dec, &xzio->buf);
+
+ if (ret == XZ_FORMAT_ERROR)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "no xz magic found");
+ return 0;
+ }
+
+ if (ret != XZ_OK)
+ {
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "not supported xz options");
+ return 0;
+ }
+
+ return 1;
+}
+
+/* Try to find out size of uncompressed data,
+ * also do some footer sanity checks. */
+static int
+test_footer (grub_file_t file)
+{
+ grub_xzio_t xzio = file->data;
+ grub_uint8_t footer[FOOTER_MAGIC_SIZE];
+ grub_uint32_t backsize;
+ grub_uint8_t imarker;
+ grub_uint64_t uncompressed_size_total = 0;
+ grub_uint64_t uncompressed_size;
+ grub_uint64_t records;
+
+ grub_file_seek (xzio->file, xzio->file->size - FOOTER_MAGIC_SIZE);
+ if (grub_file_read (xzio->file, footer, FOOTER_MAGIC_SIZE) !=
+ FOOTER_MAGIC_SIZE
+ || grub_memcmp (footer, FOOTER_MAGIC, FOOTER_MAGIC_SIZE) != 0)
+ goto ERROR;
+
+ grub_file_seek (xzio->file, xzio->file->size - 8);
+ if (grub_file_read (xzio->file, &backsize, sizeof (backsize))
+ != sizeof (backsize))
+ goto ERROR;
+
+ /* Calculate real backward size. */
+ backsize = (grub_le_to_cpu32 (backsize) + 1) * 4;
+
+ /* Set file to the beginning of stream index. */
+ grub_file_seek (xzio->file,
+ xzio->file->size - XZ_STREAM_FOOTER_SIZE - backsize);
+
+ /* Test index marker. */
+ if (grub_file_read (xzio->file, &imarker, sizeof (imarker)) !=
+ sizeof (imarker) && imarker != 0x00)
+ goto ERROR;
+
+ if (read_vli (xzio->file, &records) <= 0)
+ goto ERROR;
+
+ for (; records != 0; records--)
+ {
+ if (read_vli (xzio->file, &uncompressed_size) <= 0) /* Ignore unpadded. */
+ goto ERROR;
+ if (read_vli (xzio->file, &uncompressed_size) <= 0) /* Uncompressed. */
+ goto ERROR;
+
+ uncompressed_size_total += uncompressed_size;
+ }
+
+ file->size = uncompressed_size_total;
+ grub_file_seek (xzio->file, STREAM_HEADER_SIZE);
+ return 1;
+
+ERROR:
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "bad footer magic");
+ return 0;
+}
+
+static grub_file_t
+grub_xzio_open (grub_file_t io)
+{
+ grub_file_t file;
+ grub_xzio_t xzio;
+
+ file = (grub_file_t) grub_zalloc (sizeof (*file));
+ if (!file)
+ return 0;
+
+ xzio = grub_zalloc (sizeof (*xzio));
+ if (!xzio)
+ {
+ grub_free (file);
+ return 0;
+ }
+
+ xzio->file = io;
+ xzio->saved_offset = 0;
+
+ file->device = io->device;
+ file->offset = 0;
+ file->data = xzio;
+ file->read_hook = 0;
+ file->fs = &grub_xzio_fs;
+ file->size = GRUB_FILE_SIZE_UNKNOWN;
+ file->not_easily_seekable = 1;
+
+ if (grub_file_tell (xzio->file) != 0)
+ grub_file_seek (xzio->file, 0);
+
+ /* Allocated 64KiB for dictionary.
+ * Decoder will relocate if bigger is needed. */
+ xzio->dec = xz_dec_init (1 << 16);
+ if (!xzio->dec)
+ {
+ grub_free (file);
+ grub_free (xzio);
+ return 0;
+ }
+
+ xzio->buf.in = xzio->inbuf;
+ xzio->buf.in_pos = 0;
+ xzio->buf.in_size = 0;
+ xzio->buf.out = xzio->outbuf;
+ xzio->buf.out_pos = 0;
+ xzio->buf.out_size = XZBUFSIZ;
+
+ /* FIXME: don't test footer on not easily seekable files. */
+ if (!test_header (file) || !test_footer (file))
+ {
+ grub_errno = GRUB_ERR_NONE;
+ grub_file_seek (io, 0);
+ xz_dec_end (xzio->dec);
+ grub_free (xzio);
+ grub_free (file);
+
+ return io;
+ }
+
+ return file;
+}
+
+static grub_ssize_t
+grub_xzio_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ grub_ssize_t ret = 0;
+ grub_ssize_t readret;
+ enum xz_ret xzret;
+ grub_xzio_t xzio = file->data;
+ grub_off_t current_offset;
+
+ /* If seek backward need to reset decoder and start from beginning of file.
+ TODO Possible improvement by jumping blocks. */
+ if (file->offset < xzio->saved_offset)
+ {
+ xz_dec_reset (xzio->dec);
+ xzio->saved_offset = 0;
+ xzio->buf.out_pos = 0;
+ xzio->buf.in_pos = 0;
+ xzio->buf.in_size = 0;
+ grub_file_seek (xzio->file, 0);
+ }
+
+ current_offset = xzio->saved_offset;
+
+ while (len > 0)
+ {
+ xzio->buf.out_size = grub_min (file->offset + ret + len - current_offset,
+ XZBUFSIZ);
+
+ /* Feed input. */
+ if (xzio->buf.in_pos == xzio->buf.in_size)
+ {
+ readret = grub_file_read (xzio->file, xzio->inbuf, XZBUFSIZ);
+ if (readret < 0)
+ return -1;
+ xzio->buf.in_size = readret;
+ xzio->buf.in_pos = 0;
+ }
+
+ xzret = xz_dec_run (xzio->dec, &xzio->buf);
+ switch (xzret)
+ {
+ case XZ_MEMLIMIT_ERROR:
+ case XZ_FORMAT_ERROR:
+ case XZ_OPTIONS_ERROR:
+ case XZ_DATA_ERROR:
+ case XZ_BUF_ERROR:
+ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
+ "file corrupted or unsupported block options");
+ return -1;
+ default:
+ break;
+ }
+
+ {
+ grub_off_t new_offset = current_offset + xzio->buf.out_pos;
+
+ if (file->offset <= new_offset)
+ /* Store first chunk of data in buffer. */
+ {
+ grub_size_t delta = new_offset - (file->offset + ret);
+ grub_memmove (buf, xzio->buf.out + (xzio->buf.out_pos - delta),
+ delta);
+ len -= delta;
+ buf += delta;
+ ret += delta;
+ }
+ current_offset = new_offset;
+ }
+ xzio->buf.out_pos = 0;
+
+ if (xzret == XZ_STREAM_END) /* Stream end, EOF. */
+ break;
+ }
+
+ if (ret >= 0)
+ xzio->saved_offset = file->offset + ret;
+
+ return ret;
+}
+
+/* Release everything, including the underlying file object. */
+static grub_err_t
+grub_xzio_close (grub_file_t file)
+{
+ grub_xzio_t xzio = file->data;
+
+ xz_dec_end (xzio->dec);
+
+ grub_file_close (xzio->file);
+ grub_free (xzio);
+
+ /* Device must not be closed twice. */
+ file->device = 0;
+ return grub_errno;
+}
+
+static struct grub_fs grub_xzio_fs = {
+ .name = "xzio",
+ .dir = 0,
+ .open = 0,
+ .read = grub_xzio_read,
+ .close = grub_xzio_close,
+ .label = 0,
+ .next = 0
+};
+
+GRUB_MOD_INIT (xzio)
+{
+ grub_file_filter_register (GRUB_FILE_FILTER_XZIO, grub_xzio_open);
+}
+
+GRUB_MOD_FINI (xzio)
+{
+ grub_file_filter_unregister (GRUB_FILE_FILTER_XZIO);
+}
diff --git a/grub-core/kern/command.c b/grub-core/kern/command.c
new file mode 100644
index 0000000..7f353b6
--- /dev/null
+++ b/grub-core/kern/command.c
@@ -0,0 +1,58 @@
+/* command.c - support basic command */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/command.h>
+
+grub_command_t grub_command_list;
+
+grub_command_t
+grub_register_command_prio (const char *name,
+ grub_command_func_t func,
+ const char *summary,
+ const char *description,
+ int prio)
+{
+ grub_command_t cmd;
+
+ cmd = (grub_command_t) grub_zalloc (sizeof (*cmd));
+ if (! cmd)
+ return 0;
+
+ cmd->name = name;
+ cmd->func = func;
+ cmd->summary = (summary) ? summary : "";
+ cmd->description = description;
+
+ cmd->flags = 0;
+ cmd->prio = prio;
+
+ grub_prio_list_insert (GRUB_AS_PRIO_LIST_P (&grub_command_list),
+ GRUB_AS_PRIO_LIST (cmd));
+
+ return cmd;
+}
+
+void
+grub_unregister_command (grub_command_t cmd)
+{
+ grub_prio_list_remove (GRUB_AS_PRIO_LIST_P (&grub_command_list),
+ GRUB_AS_PRIO_LIST (cmd));
+ grub_free (cmd);
+}
diff --git a/grub-core/kern/corecmd.c b/grub-core/kern/corecmd.c
new file mode 100644
index 0000000..687692f
--- /dev/null
+++ b/grub-core/kern/corecmd.c
@@ -0,0 +1,194 @@
+/* corecmd.c - critical commands which are registered in kernel */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/err.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/file.h>
+#include <grub/device.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+/* set ENVVAR=VALUE */
+static grub_err_t
+grub_core_cmd_set (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ char *var;
+ char *val;
+
+ auto int print_env (struct grub_env_var *env);
+
+ int print_env (struct grub_env_var *env)
+ {
+ grub_printf ("%s=%s\n", env->name, env->value);
+ return 0;
+ }
+
+ if (argc < 1)
+ {
+ grub_env_iterate (print_env);
+ return 0;
+ }
+
+ var = argv[0];
+ val = grub_strchr (var, '=');
+ if (! val)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "not an assignment");
+
+ val[0] = 0;
+ grub_env_set (var, val + 1);
+ val[0] = '=';
+
+ return 0;
+}
+
+static grub_err_t
+grub_core_cmd_unset (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "no environment variable specified");
+
+ grub_env_unset (argv[0]);
+ return 0;
+}
+
+/* insmod MODULE */
+static grub_err_t
+grub_core_cmd_insmod (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ char *p;
+ grub_dl_t mod;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
+
+ p = grub_strchr (argv[0], '/');
+ if (! p)
+ mod = grub_dl_load (argv[0]);
+ else
+ mod = grub_dl_load_file (argv[0]);
+
+ if (mod)
+ grub_dl_ref (mod);
+
+ return 0;
+}
+
+static int
+grub_mini_print_devices (const char *name)
+{
+ grub_printf ("(%s) ", name);
+
+ return 0;
+}
+
+static int
+grub_mini_print_files (const char *filename,
+ const struct grub_dirhook_info *info)
+{
+ grub_printf ("%s%s ", filename, info->dir ? "/" : "");
+
+ return 0;
+}
+
+/* ls [ARG] */
+static grub_err_t
+grub_core_cmd_ls (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ if (argc < 1)
+ {
+ grub_device_iterate (grub_mini_print_devices);
+ grub_xputs ("\n");
+ grub_refresh ();
+ }
+ else
+ {
+ char *device_name;
+ grub_device_t dev;
+ grub_fs_t fs;
+ char *path;
+
+ device_name = grub_file_get_device_name (argv[0]);
+ dev = grub_device_open (device_name);
+ if (! dev)
+ goto fail;
+
+ fs = grub_fs_probe (dev);
+ path = grub_strchr (argv[0], ')');
+ if (! path)
+ path = argv[0];
+ else
+ path++;
+
+ if (! path && ! device_name)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
+ goto fail;
+ }
+
+ if (! path)
+ {
+ if (grub_errno == GRUB_ERR_UNKNOWN_FS)
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_printf ("(%s): Filesystem is %s.\n",
+ device_name, fs ? fs->name : "unknown");
+ }
+ else if (fs)
+ {
+ (fs->dir) (dev, path, grub_mini_print_files);
+ grub_xputs ("\n");
+ grub_refresh ();
+ }
+
+ fail:
+ if (dev)
+ grub_device_close (dev);
+
+ grub_free (device_name);
+ }
+
+ return grub_errno;
+}
+
+void
+grub_register_core_commands (void)
+{
+ grub_command_t cmd;
+ cmd = grub_register_command ("set", grub_core_cmd_set,
+ N_("[ENVVAR=VALUE]"),
+ N_("Set an environment variable."));
+ if (cmd)
+ cmd->flags |= GRUB_COMMAND_FLAG_EXTRACTOR;
+ grub_register_command ("unset", grub_core_cmd_unset,
+ N_("ENVVAR"),
+ N_("Remove an environment variable."));
+ grub_register_command ("ls", grub_core_cmd_ls,
+ N_("[ARG]"), N_("List devices or files."));
+ grub_register_command ("insmod", grub_core_cmd_insmod,
+ N_("MODULE"), N_("Insert a module."));
+}
diff --git a/grub-core/kern/device.c b/grub-core/kern/device.c
new file mode 100644
index 0000000..3db14f5
--- /dev/null
+++ b/grub-core/kern/device.c
@@ -0,0 +1,169 @@
+/* device.c - device manager */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/net.h>
+#include <grub/fs.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/partition.h>
+
+grub_device_t
+grub_device_open (const char *name)
+{
+ grub_disk_t disk = 0;
+ grub_device_t dev = 0;
+
+ if (! name)
+ {
+ name = grub_env_get ("root");
+ if (*name == '\0')
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "no device is set");
+ goto fail;
+ }
+ }
+
+ dev = grub_malloc (sizeof (*dev));
+ if (! dev)
+ goto fail;
+
+ /* Try to open a disk. */
+ disk = grub_disk_open (name);
+ if (! disk)
+ goto fail;
+
+ dev->disk = disk;
+ dev->net = 0; /* FIXME */
+
+ return dev;
+
+ fail:
+ if (disk)
+ grub_disk_close (disk);
+
+ grub_free (dev);
+
+ return 0;
+}
+
+grub_err_t
+grub_device_close (grub_device_t device)
+{
+ if (device->disk)
+ grub_disk_close (device->disk);
+
+ grub_free (device);
+
+ return grub_errno;
+}
+
+int
+grub_device_iterate (int (*hook) (const char *name))
+{
+ auto int iterate_disk (const char *disk_name);
+ auto int iterate_partition (grub_disk_t disk,
+ const grub_partition_t partition);
+
+ struct part_ent
+ {
+ struct part_ent *next;
+ char *name;
+ } *ents;
+
+ int iterate_disk (const char *disk_name)
+ {
+ grub_device_t dev;
+
+ if (hook (disk_name))
+ return 1;
+
+ dev = grub_device_open (disk_name);
+ if (! dev)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return 0;
+ }
+
+ if (dev->disk)
+ {
+ struct part_ent *p;
+ int ret = 0;
+
+ ents = NULL;
+ (void) grub_partition_iterate (dev->disk, iterate_partition);
+ grub_device_close (dev);
+
+ grub_errno = GRUB_ERR_NONE;
+
+ p = ents;
+ while (p != NULL)
+ {
+ struct part_ent *next = p->next;
+
+ if (!ret)
+ ret = hook (p->name);
+ grub_free (p->name);
+ grub_free (p);
+ p = next;
+ }
+
+ return ret;
+ }
+
+ grub_device_close (dev);
+ return 0;
+ }
+
+ int iterate_partition (grub_disk_t disk, const grub_partition_t partition)
+ {
+ struct part_ent *p;
+ char *part_name;
+
+ p = grub_malloc (sizeof (*p));
+ if (!p)
+ {
+ return 1;
+ }
+
+ part_name = grub_partition_get_name (partition);
+ if (!part_name)
+ {
+ grub_free (p);
+ return 1;
+ }
+ p->name = grub_xasprintf ("%s,%s", disk->name, part_name);
+ grub_free (part_name);
+ if (!p->name)
+ {
+ grub_free (p);
+ return 1;
+ }
+
+ p->next = ents;
+ ents = p;
+
+ return 0;
+ }
+
+ /* Only disk devices are supported at the moment. */
+ return grub_disk_dev_iterate (iterate_disk);
+}
diff --git a/grub-core/kern/disk.c b/grub-core/kern/disk.c
new file mode 100644
index 0000000..807ee42
--- /dev/null
+++ b/grub-core/kern/disk.c
@@ -0,0 +1,604 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/partition.h>
+#include <grub/misc.h>
+#include <grub/time.h>
+#include <grub/file.h>
+
+#define GRUB_CACHE_TIMEOUT 2
+
+/* The last time the disk was used. */
+static grub_uint64_t grub_last_time = 0;
+
+
+/* Disk cache. */
+struct grub_disk_cache
+{
+ enum grub_disk_dev_id dev_id;
+ unsigned long disk_id;
+ grub_disk_addr_t sector;
+ char *data;
+ int lock;
+};
+
+static struct grub_disk_cache grub_disk_cache_table[GRUB_DISK_CACHE_NUM];
+
+void (*grub_disk_firmware_fini) (void);
+int grub_disk_firmware_is_tainted;
+
+grub_err_t (* grub_disk_ata_pass_through) (grub_disk_t,
+ struct grub_disk_ata_pass_through_parms *);
+
+
+#if 0
+static unsigned long grub_disk_cache_hits;
+static unsigned long grub_disk_cache_misses;
+
+void
+grub_disk_cache_get_performance (unsigned long *hits, unsigned long *misses)
+{
+ *hits = grub_disk_cache_hits;
+ *misses = grub_disk_cache_misses;
+}
+#endif
+
+static unsigned
+grub_disk_cache_get_index (unsigned long dev_id, unsigned long disk_id,
+ grub_disk_addr_t sector)
+{
+ return ((dev_id * 524287UL + disk_id * 2606459UL
+ + ((unsigned) (sector >> GRUB_DISK_CACHE_BITS)))
+ % GRUB_DISK_CACHE_NUM);
+}
+
+static void
+grub_disk_cache_invalidate (unsigned long dev_id, unsigned long disk_id,
+ grub_disk_addr_t sector)
+{
+ unsigned index;
+ struct grub_disk_cache *cache;
+
+ sector &= ~(GRUB_DISK_CACHE_SIZE - 1);
+ index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+ cache = grub_disk_cache_table + index;
+
+ if (cache->dev_id == dev_id && cache->disk_id == disk_id
+ && cache->sector == sector && cache->data)
+ {
+ cache->lock = 1;
+ grub_free (cache->data);
+ cache->data = 0;
+ cache->lock = 0;
+ }
+}
+
+void
+grub_disk_cache_invalidate_all (void)
+{
+ unsigned i;
+
+ for (i = 0; i < GRUB_DISK_CACHE_NUM; i++)
+ {
+ struct grub_disk_cache *cache = grub_disk_cache_table + i;
+
+ if (cache->data && ! cache->lock)
+ {
+ grub_free (cache->data);
+ cache->data = 0;
+ }
+ }
+}
+
+static char *
+grub_disk_cache_fetch (unsigned long dev_id, unsigned long disk_id,
+ grub_disk_addr_t sector)
+{
+ struct grub_disk_cache *cache;
+ unsigned index;
+
+ index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+ cache = grub_disk_cache_table + index;
+
+ if (cache->dev_id == dev_id && cache->disk_id == disk_id
+ && cache->sector == sector)
+ {
+ cache->lock = 1;
+#if 0
+ grub_disk_cache_hits++;
+#endif
+ return cache->data;
+ }
+
+#if 0
+ grub_disk_cache_misses++;
+#endif
+
+ return 0;
+}
+
+static void
+grub_disk_cache_unlock (unsigned long dev_id, unsigned long disk_id,
+ grub_disk_addr_t sector)
+{
+ struct grub_disk_cache *cache;
+ unsigned index;
+
+ index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+ cache = grub_disk_cache_table + index;
+
+ if (cache->dev_id == dev_id && cache->disk_id == disk_id
+ && cache->sector == sector)
+ cache->lock = 0;
+}
+
+static grub_err_t
+grub_disk_cache_store (unsigned long dev_id, unsigned long disk_id,
+ grub_disk_addr_t sector, const char *data)
+{
+ unsigned index;
+ struct grub_disk_cache *cache;
+
+ index = grub_disk_cache_get_index (dev_id, disk_id, sector);
+ cache = grub_disk_cache_table + index;
+
+ cache->lock = 1;
+ grub_free (cache->data);
+ cache->data = 0;
+ cache->lock = 0;
+
+ cache->data = grub_malloc (GRUB_DISK_SECTOR_SIZE << GRUB_DISK_CACHE_BITS);
+ if (! cache->data)
+ return grub_errno;
+
+ grub_memcpy (cache->data, data,
+ GRUB_DISK_SECTOR_SIZE << GRUB_DISK_CACHE_BITS);
+ cache->dev_id = dev_id;
+ cache->disk_id = disk_id;
+ cache->sector = sector;
+
+ return GRUB_ERR_NONE;
+}
+
+
+
+static grub_disk_dev_t grub_disk_dev_list;
+
+void
+grub_disk_dev_register (grub_disk_dev_t dev)
+{
+ dev->next = grub_disk_dev_list;
+ grub_disk_dev_list = dev;
+}
+
+void
+grub_disk_dev_unregister (grub_disk_dev_t dev)
+{
+ grub_disk_dev_t *p, q;
+
+ for (p = &grub_disk_dev_list, q = *p; q; p = &(q->next), q = q->next)
+ if (q == dev)
+ {
+ *p = q->next;
+ break;
+ }
+}
+
+int
+grub_disk_dev_iterate (int (*hook) (const char *name))
+{
+ grub_disk_dev_t p;
+
+ for (p = grub_disk_dev_list; p; p = p->next)
+ if (p->iterate && (p->iterate) (hook))
+ return 1;
+
+ return 0;
+}
+
+/* Return the location of the first ',', if any, which is not
+ escaped by a '\'. */
+static const char *
+find_part_sep (const char *name)
+{
+ const char *p = name;
+ char c;
+
+ while ((c = *p++) != '\0')
+ {
+ if (c == '\\' && *p == ',')
+ p++;
+ else if (c == ',')
+ return p - 1;
+ }
+ return NULL;
+}
+
+grub_disk_t
+grub_disk_open (const char *name)
+{
+ const char *p;
+ grub_disk_t disk;
+ grub_disk_dev_t dev;
+ char *raw = (char *) name;
+ grub_uint64_t current_time;
+
+ grub_dprintf ("disk", "Opening `%s'...\n", name);
+
+ disk = (grub_disk_t) grub_zalloc (sizeof (*disk));
+ if (! disk)
+ return 0;
+
+ p = find_part_sep (name);
+ if (p)
+ {
+ grub_size_t len = p - name;
+
+ raw = grub_malloc (len + 1);
+ if (! raw)
+ goto fail;
+
+ grub_memcpy (raw, name, len);
+ raw[len] = '\0';
+ disk->name = grub_strdup (raw);
+ }
+ else
+ disk->name = grub_strdup (name);
+ if (! disk->name)
+ goto fail;
+
+
+ for (dev = grub_disk_dev_list; dev; dev = dev->next)
+ {
+ if ((dev->open) (raw, disk) == GRUB_ERR_NONE)
+ break;
+ else if (grub_errno == GRUB_ERR_UNKNOWN_DEVICE)
+ grub_errno = GRUB_ERR_NONE;
+ else
+ goto fail;
+ }
+
+ if (! dev)
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such disk");
+ goto fail;
+ }
+
+ disk->dev = dev;
+
+ if (p)
+ {
+ disk->partition = grub_partition_probe (disk, p + 1);
+ if (! disk->partition)
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such partition");
+ goto fail;
+ }
+ }
+
+ /* The cache will be invalidated about 2 seconds after a device was
+ closed. */
+ current_time = grub_get_time_ms ();
+
+ if (current_time > (grub_last_time
+ + GRUB_CACHE_TIMEOUT * 1000))
+ grub_disk_cache_invalidate_all ();
+
+ grub_last_time = current_time;
+
+ fail:
+
+ if (raw && raw != name)
+ grub_free (raw);
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_error_push ();
+ grub_dprintf ("disk", "Opening `%s' failed.\n", name);
+ grub_error_pop ();
+
+ grub_disk_close (disk);
+ return 0;
+ }
+
+ return disk;
+}
+
+void
+grub_disk_close (grub_disk_t disk)
+{
+ grub_partition_t part;
+ grub_dprintf ("disk", "Closing `%s'.\n", disk->name);
+
+ if (disk->dev && disk->dev->close)
+ (disk->dev->close) (disk);
+
+ /* Reset the timer. */
+ grub_last_time = grub_get_time_ms ();
+
+ while (disk->partition)
+ {
+ part = disk->partition->parent;
+ grub_free (disk->partition);
+ disk->partition = part;
+ }
+ grub_free ((void *) disk->name);
+ grub_free (disk);
+}
+
+/* This function performs three tasks:
+ - Make sectors disk relative from partition relative.
+ - Normalize offset to be less than the sector size.
+ - Verify that the range is inside the partition. */
+static grub_err_t
+grub_disk_adjust_range (grub_disk_t disk, grub_disk_addr_t *sector,
+ grub_off_t *offset, grub_size_t size)
+{
+ grub_partition_t part;
+ *sector += *offset >> GRUB_DISK_SECTOR_BITS;
+ *offset &= GRUB_DISK_SECTOR_SIZE - 1;
+
+ for (part = disk->partition; part; part = part->parent)
+ {
+ grub_disk_addr_t start;
+ grub_uint64_t len;
+
+ start = part->start;
+ len = part->len;
+
+ if (*sector >= len
+ || len - *sector < ((*offset + size + GRUB_DISK_SECTOR_SIZE - 1)
+ >> GRUB_DISK_SECTOR_BITS))
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "out of partition");
+
+ *sector += start;
+ }
+
+ if (disk->total_sectors <= *sector
+ || ((*offset + size + GRUB_DISK_SECTOR_SIZE - 1)
+ >> GRUB_DISK_SECTOR_BITS) > disk->total_sectors - *sector)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "out of disk");
+
+ return GRUB_ERR_NONE;
+}
+
+/* Read data from the disk. */
+grub_err_t
+grub_disk_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_off_t offset, grub_size_t size, void *buf)
+{
+ char *tmp_buf;
+ unsigned real_offset;
+
+ /* First of all, check if the region is within the disk. */
+ if (grub_disk_adjust_range (disk, &sector, &offset, size) != GRUB_ERR_NONE)
+ {
+ grub_error_push ();
+ grub_dprintf ("disk", "Read out of range: sector 0x%llx (%s).\n",
+ (unsigned long long) sector, grub_errmsg);
+ grub_error_pop ();
+ return grub_errno;
+ }
+
+ real_offset = offset;
+
+ /* Allocate a temporary buffer. */
+ tmp_buf = grub_malloc (GRUB_DISK_SECTOR_SIZE << GRUB_DISK_CACHE_BITS);
+ if (! tmp_buf)
+ return grub_errno;
+
+ /* Until SIZE is zero... */
+ while (size)
+ {
+ char *data;
+ grub_disk_addr_t start_sector;
+ grub_size_t len;
+ grub_size_t pos;
+
+ /* For reading bulk data. */
+ start_sector = sector & ~(GRUB_DISK_CACHE_SIZE - 1);
+ pos = (sector - start_sector) << GRUB_DISK_SECTOR_BITS;
+ len = ((GRUB_DISK_SECTOR_SIZE << GRUB_DISK_CACHE_BITS)
+ - pos - real_offset);
+ if (len > size)
+ len = size;
+
+ /* Fetch the cache. */
+ data = grub_disk_cache_fetch (disk->dev->id, disk->id, start_sector);
+ if (data)
+ {
+ /* Just copy it! */
+ grub_memcpy (buf, data + pos + real_offset, len);
+ grub_disk_cache_unlock (disk->dev->id, disk->id, start_sector);
+ }
+ else
+ {
+ /* Otherwise read data from the disk actually. */
+ if (start_sector + GRUB_DISK_CACHE_SIZE > disk->total_sectors
+ || (disk->dev->read) (disk, start_sector,
+ GRUB_DISK_CACHE_SIZE, tmp_buf)
+ != GRUB_ERR_NONE)
+ {
+ /* Uggh... Failed. Instead, just read necessary data. */
+ unsigned num;
+ char *p;
+
+ grub_errno = GRUB_ERR_NONE;
+
+ num = ((size + real_offset + GRUB_DISK_SECTOR_SIZE - 1)
+ >> GRUB_DISK_SECTOR_BITS);
+
+ p = grub_realloc (tmp_buf, num << GRUB_DISK_SECTOR_BITS);
+ if (!p)
+ goto finish;
+
+ tmp_buf = p;
+
+ if ((disk->dev->read) (disk, sector, num, tmp_buf))
+ {
+ grub_error_push ();
+ grub_dprintf ("disk", "%s read failed\n", disk->name);
+ grub_error_pop ();
+ goto finish;
+ }
+
+ grub_memcpy (buf, tmp_buf + real_offset, size);
+
+ /* Call the read hook, if any. */
+ if (disk->read_hook)
+ while (size)
+ {
+ grub_size_t to_read = (size > GRUB_DISK_SECTOR_SIZE) ? GRUB_DISK_SECTOR_SIZE : size;
+ (disk->read_hook) (sector, real_offset,
+ to_read);
+ if (grub_errno != GRUB_ERR_NONE)
+ goto finish;
+
+ sector++;
+ size -= to_read - real_offset;
+ real_offset = 0;
+ }
+
+ /* This must be the end. */
+ goto finish;
+ }
+
+ /* Copy it and store it in the disk cache. */
+ grub_memcpy (buf, tmp_buf + pos + real_offset, len);
+ grub_disk_cache_store (disk->dev->id, disk->id,
+ start_sector, tmp_buf);
+ }
+
+ /* Call the read hook, if any. */
+ if (disk->read_hook)
+ {
+ grub_disk_addr_t s = sector;
+ grub_size_t l = len;
+
+ while (l)
+ {
+ (disk->read_hook) (s, real_offset,
+ ((l > GRUB_DISK_SECTOR_SIZE)
+ ? GRUB_DISK_SECTOR_SIZE
+ : l));
+
+ if (l < GRUB_DISK_SECTOR_SIZE - real_offset)
+ break;
+
+ s++;
+ l -= GRUB_DISK_SECTOR_SIZE - real_offset;
+ real_offset = 0;
+ }
+ }
+
+ sector = start_sector + GRUB_DISK_CACHE_SIZE;
+ buf = (char *) buf + len;
+ size -= len;
+ real_offset = 0;
+ }
+
+ finish:
+
+ grub_free (tmp_buf);
+
+ return grub_errno;
+}
+
+grub_err_t
+grub_disk_write (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_off_t offset, grub_size_t size, const void *buf)
+{
+ unsigned real_offset;
+
+ grub_dprintf ("disk", "Writing `%s'...\n", disk->name);
+
+ if (grub_disk_adjust_range (disk, &sector, &offset, size) != GRUB_ERR_NONE)
+ return -1;
+
+ real_offset = offset;
+
+ while (size)
+ {
+ if (real_offset != 0 || (size < GRUB_DISK_SECTOR_SIZE && size != 0))
+ {
+ char tmp_buf[GRUB_DISK_SECTOR_SIZE];
+ grub_size_t len;
+ grub_partition_t part;
+
+ part = disk->partition;
+ disk->partition = 0;
+ if (grub_disk_read (disk, sector, 0, GRUB_DISK_SECTOR_SIZE, tmp_buf)
+ != GRUB_ERR_NONE)
+ {
+ disk->partition = part;
+ goto finish;
+ }
+ disk->partition = part;
+
+ len = GRUB_DISK_SECTOR_SIZE - real_offset;
+ if (len > size)
+ len = size;
+
+ grub_memcpy (tmp_buf + real_offset, buf, len);
+
+ grub_disk_cache_invalidate (disk->dev->id, disk->id, sector);
+
+ if ((disk->dev->write) (disk, sector, 1, tmp_buf) != GRUB_ERR_NONE)
+ goto finish;
+
+ sector++;
+ buf = (char *) buf + len;
+ size -= len;
+ real_offset = 0;
+ }
+ else
+ {
+ grub_size_t len;
+ grub_size_t n;
+
+ len = size & ~(GRUB_DISK_SECTOR_SIZE - 1);
+ n = size >> GRUB_DISK_SECTOR_BITS;
+
+ if ((disk->dev->write) (disk, sector, n, buf) != GRUB_ERR_NONE)
+ goto finish;
+
+ while (n--)
+ grub_disk_cache_invalidate (disk->dev->id, disk->id, sector++);
+
+ buf = (char *) buf + len;
+ size -= len;
+ }
+ }
+
+ finish:
+
+ return grub_errno;
+}
+
+grub_uint64_t
+grub_disk_get_size (grub_disk_t disk)
+{
+ if (disk->partition)
+ return grub_partition_get_len (disk->partition);
+ else
+ return disk->total_sectors;
+}
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
new file mode 100644
index 0000000..623e0cb
--- /dev/null
+++ b/grub-core/kern/dl.c
@@ -0,0 +1,724 @@
+/* dl.c - loadable module support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Force native word size */
+#define GRUB_TARGET_WORDSIZE (8 * GRUB_CPU_SIZEOF_VOID_P)
+
+#include <config.h>
+#include <grub/elf.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/symbol.h>
+#include <grub/file.h>
+#include <grub/env.h>
+#include <grub/cache.h>
+
+/* Platforms where modules are in a readonly area of memory. */
+#if defined(GRUB_MACHINE_QEMU)
+#define GRUB_MODULES_MACHINE_READONLY
+#endif
+
+
+
+grub_dl_t grub_dl_head = 0;
+
+static grub_err_t
+grub_dl_add (grub_dl_t mod)
+{
+ if (grub_dl_get (mod->name))
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "`%s' is already loaded", mod->name);
+
+ mod->next = grub_dl_head;
+ grub_dl_head = mod;
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_dl_remove (grub_dl_t mod)
+{
+ grub_dl_t *p, q;
+
+ for (p = &grub_dl_head, q = *p; q; p = &q->next, q = *p)
+ if (q == mod)
+ {
+ *p = q->next;
+ return;
+ }
+}
+
+grub_dl_t
+grub_dl_get (const char *name)
+{
+ grub_dl_t l;
+
+ for (l = grub_dl_head; l; l = l->next)
+ if (grub_strcmp (name, l->name) == 0)
+ return l;
+
+ return 0;
+}
+
+
+
+struct grub_symbol
+{
+ struct grub_symbol *next;
+ const char *name;
+ void *addr;
+ grub_dl_t mod; /* The module to which this symbol belongs. */
+};
+typedef struct grub_symbol *grub_symbol_t;
+
+/* The size of the symbol table. */
+#define GRUB_SYMTAB_SIZE 509
+
+/* The symbol table (using an open-hash). */
+static struct grub_symbol *grub_symtab[GRUB_SYMTAB_SIZE];
+
+/* Simple hash function. */
+static unsigned
+grub_symbol_hash (const char *s)
+{
+ unsigned key = 0;
+
+ while (*s)
+ key = key * 65599 + *s++;
+
+ return (key + (key >> 5)) % GRUB_SYMTAB_SIZE;
+}
+
+/* Resolve the symbol name NAME and return the address.
+ Return NULL, if not found. */
+static void *
+grub_dl_resolve_symbol (const char *name)
+{
+ grub_symbol_t sym;
+
+ for (sym = grub_symtab[grub_symbol_hash (name)]; sym; sym = sym->next)
+ if (grub_strcmp (sym->name, name) == 0)
+ return sym->addr;
+
+ return 0;
+}
+
+/* Register a symbol with the name NAME and the address ADDR. */
+grub_err_t
+grub_dl_register_symbol (const char *name, void *addr, grub_dl_t mod)
+{
+ grub_symbol_t sym;
+ unsigned k;
+
+ sym = (grub_symbol_t) grub_malloc (sizeof (*sym));
+ if (! sym)
+ return grub_errno;
+
+ if (mod)
+ {
+ sym->name = grub_strdup (name);
+ if (! sym->name)
+ {
+ grub_free (sym);
+ return grub_errno;
+ }
+ }
+ else
+ sym->name = name;
+
+ sym->addr = addr;
+ sym->mod = mod;
+
+ k = grub_symbol_hash (name);
+ sym->next = grub_symtab[k];
+ grub_symtab[k] = sym;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Unregister all the symbols defined in the module MOD. */
+static void
+grub_dl_unregister_symbols (grub_dl_t mod)
+{
+ unsigned i;
+
+ if (! mod)
+ grub_fatal ("core symbols cannot be unregistered");
+
+ for (i = 0; i < GRUB_SYMTAB_SIZE; i++)
+ {
+ grub_symbol_t sym, *p, q;
+
+ for (p = &grub_symtab[i], sym = *p; sym; sym = q)
+ {
+ q = sym->next;
+ if (sym->mod == mod)
+ {
+ *p = q;
+ grub_free ((void *) sym->name);
+ grub_free (sym);
+ }
+ else
+ p = &sym->next;
+ }
+ }
+}
+
+/* Return the address of a section whose index is N. */
+static void *
+grub_dl_get_section_addr (grub_dl_t mod, unsigned n)
+{
+ grub_dl_segment_t seg;
+
+ for (seg = mod->segment; seg; seg = seg->next)
+ if (seg->section == n)
+ return seg->addr;
+
+ return 0;
+}
+
+/* Check if EHDR is a valid ELF header. */
+static grub_err_t
+grub_dl_check_header (void *ehdr, grub_size_t size)
+{
+ Elf_Ehdr *e = ehdr;
+
+ /* Check the header size. */
+ if (size < sizeof (Elf_Ehdr))
+ return grub_error (GRUB_ERR_BAD_OS, "ELF header smaller than expected");
+
+ /* Check the magic numbers. */
+ if (grub_arch_dl_check_header (ehdr)
+ || e->e_ident[EI_MAG0] != ELFMAG0
+ || e->e_ident[EI_MAG1] != ELFMAG1
+ || e->e_ident[EI_MAG2] != ELFMAG2
+ || e->e_ident[EI_MAG3] != ELFMAG3
+ || e->e_ident[EI_VERSION] != EV_CURRENT
+ || e->e_version != EV_CURRENT)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch independent ELF magic");
+
+ return GRUB_ERR_NONE;
+}
+
+/* Load all segments from memory specified by E. */
+static grub_err_t
+grub_dl_load_segments (grub_dl_t mod, const Elf_Ehdr *e)
+{
+ unsigned i;
+ Elf_Shdr *s;
+
+ for (i = 0, s = (Elf_Shdr *)((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *)((char *) s + e->e_shentsize))
+ {
+ if (s->sh_flags & SHF_ALLOC)
+ {
+ grub_dl_segment_t seg;
+
+ seg = (grub_dl_segment_t) grub_malloc (sizeof (*seg));
+ if (! seg)
+ return grub_errno;
+
+ if (s->sh_size)
+ {
+ void *addr;
+
+ addr = grub_memalign (s->sh_addralign, s->sh_size);
+ if (! addr)
+ {
+ grub_free (seg);
+ return grub_errno;
+ }
+
+ switch (s->sh_type)
+ {
+ case SHT_PROGBITS:
+ grub_memcpy (addr, (char *) e + s->sh_offset, s->sh_size);
+ break;
+ case SHT_NOBITS:
+ grub_memset (addr, 0, s->sh_size);
+ break;
+ }
+
+ seg->addr = addr;
+ }
+ else
+ seg->addr = 0;
+
+ seg->size = s->sh_size;
+ seg->section = i;
+ seg->next = mod->segment;
+ mod->segment = seg;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
+{
+ unsigned i;
+ Elf_Shdr *s;
+ Elf_Sym *sym;
+ const char *str;
+ Elf_Word size, entsize;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no symbol table");
+
+#ifdef GRUB_MODULES_MACHINE_READONLY
+ mod->symtab = grub_malloc (s->sh_size);
+ memcpy (mod->symtab, (char *) e + s->sh_offset, s->sh_size);
+#else
+ mod->symtab = (Elf_Sym *) ((char *) e + s->sh_offset);
+#endif
+ sym = mod->symtab;
+ size = s->sh_size;
+ entsize = s->sh_entsize;
+
+ s = (Elf_Shdr *) ((char *) e + e->e_shoff + e->e_shentsize * s->sh_link);
+ str = (char *) e + s->sh_offset;
+
+ for (i = 0;
+ i < size / entsize;
+ i++, sym = (Elf_Sym *) ((char *) sym + entsize))
+ {
+ unsigned char type = ELF_ST_TYPE (sym->st_info);
+ unsigned char bind = ELF_ST_BIND (sym->st_info);
+ const char *name = str + sym->st_name;
+
+ switch (type)
+ {
+ case STT_NOTYPE:
+ case STT_OBJECT:
+ /* Resolve a global symbol. */
+ if (sym->st_name != 0 && sym->st_shndx == 0)
+ {
+ sym->st_value = (Elf_Addr) grub_dl_resolve_symbol (name);
+ if (! sym->st_value)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "symbol not found: `%s'", name);
+ }
+ else
+ {
+ sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,
+ sym->st_shndx);
+ if (bind != STB_LOCAL)
+ if (grub_dl_register_symbol (name, (void *) sym->st_value, mod))
+ return grub_errno;
+ }
+ break;
+
+ case STT_FUNC:
+ sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,
+ sym->st_shndx);
+ if (bind != STB_LOCAL)
+ if (grub_dl_register_symbol (name, (void *) sym->st_value, mod))
+ return grub_errno;
+
+ if (grub_strcmp (name, "grub_mod_init") == 0)
+ mod->init = (void (*) (grub_dl_t)) sym->st_value;
+ else if (grub_strcmp (name, "grub_mod_fini") == 0)
+ mod->fini = (void (*) (void)) sym->st_value;
+ break;
+
+ case STT_SECTION:
+ sym->st_value = (Elf_Addr) grub_dl_get_section_addr (mod,
+ sym->st_shndx);
+ break;
+
+ case STT_FILE:
+ sym->st_value = 0;
+ break;
+
+ default:
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "unknown symbol type `%d'", (int) type);
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_dl_call_init (grub_dl_t mod)
+{
+ if (mod->init)
+ (mod->init) (mod);
+}
+
+/* Me, Vladimir Serbinenko, hereby I add this module check as per new
+ GNU module policy. Note that this license check is informative only.
+ Modules have to be licensed under GPLv3 or GPLv3+ (optionally
+ multi-licensed under other licences as well) independently of the
+ presence of this check and solely by linking (module loading in GRUB
+ constitutes linking) and GRUB core being licensed under GPLv3+.
+ Be sure to understand your license obligations.
+*/
+static grub_err_t
+grub_dl_check_license (Elf_Ehdr *e)
+{
+ Elf_Shdr *s;
+ const char *str;
+ unsigned i;
+
+ s = (Elf_Shdr *) ((char *) e + e->e_shoff + e->e_shstrndx * e->e_shentsize);
+ str = (char *) e + s->sh_offset;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (grub_strcmp (str + s->sh_name, ".module_license") == 0)
+ {
+ if (grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3") == 0
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3+") == 0
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0)
+ return GRUB_ERR_NONE;
+ }
+
+ return grub_error (GRUB_ERR_BAD_MODULE, "incompatible license");
+}
+
+static grub_err_t
+grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
+{
+ Elf_Shdr *s;
+ const char *str;
+ unsigned i;
+
+ s = (Elf_Shdr *) ((char *) e + e->e_shoff + e->e_shstrndx * e->e_shentsize);
+ str = (char *) e + s->sh_offset;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (grub_strcmp (str + s->sh_name, ".modname") == 0)
+ {
+ mod->name = grub_strdup ((char *) e + s->sh_offset);
+ if (! mod->name)
+ return grub_errno;
+ break;
+ }
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no module name found");
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_dl_resolve_dependencies (grub_dl_t mod, Elf_Ehdr *e)
+{
+ Elf_Shdr *s;
+ const char *str;
+ unsigned i;
+
+ s = (Elf_Shdr *) ((char *) e + e->e_shoff + e->e_shstrndx * e->e_shentsize);
+ str = (char *) e + s->sh_offset;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (grub_strcmp (str + s->sh_name, ".moddeps") == 0)
+ {
+ const char *name = (char *) e + s->sh_offset;
+ const char *max = name + s->sh_size;
+
+ while ((name < max) && (*name))
+ {
+ grub_dl_t m;
+ grub_dl_dep_t dep;
+
+ m = grub_dl_load (name);
+ if (! m)
+ return grub_errno;
+
+ grub_dl_ref (m);
+
+ dep = (grub_dl_dep_t) grub_malloc (sizeof (*dep));
+ if (! dep)
+ return grub_errno;
+
+ dep->mod = m;
+ dep->next = mod->dep;
+ mod->dep = dep;
+
+ name += grub_strlen (name) + 1;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+int
+grub_dl_ref (grub_dl_t mod)
+{
+ grub_dl_dep_t dep;
+
+ if (!mod)
+ return 0;
+
+ for (dep = mod->dep; dep; dep = dep->next)
+ grub_dl_ref (dep->mod);
+
+ return ++mod->ref_count;
+}
+
+int
+grub_dl_unref (grub_dl_t mod)
+{
+ grub_dl_dep_t dep;
+
+ if (!mod)
+ return 0;
+
+ for (dep = mod->dep; dep; dep = dep->next)
+ grub_dl_unref (dep->mod);
+
+ return --mod->ref_count;
+}
+
+static void
+grub_dl_flush_cache (grub_dl_t mod)
+{
+ grub_dl_segment_t seg;
+
+ for (seg = mod->segment; seg; seg = seg->next) {
+ if (seg->size) {
+ grub_dprintf ("modules", "flushing 0x%lx bytes at %p\n",
+ (unsigned long) seg->size, seg->addr);
+ grub_arch_sync_caches (seg->addr, seg->size);
+ }
+ }
+}
+
+/* Load a module from core memory. */
+grub_dl_t
+grub_dl_load_core (void *addr, grub_size_t size)
+{
+ Elf_Ehdr *e;
+ grub_dl_t mod;
+
+ grub_dprintf ("modules", "module at %p, size 0x%lx\n", addr,
+ (unsigned long) size);
+ e = addr;
+ if (grub_dl_check_header (e, size))
+ return 0;
+
+ if (e->e_type != ET_REL)
+ {
+ grub_error (GRUB_ERR_BAD_MODULE, "invalid ELF file type");
+ return 0;
+ }
+
+ /* Make sure that every section is within the core. */
+ if (size < e->e_shoff + e->e_shentsize * e->e_shnum)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "ELF sections outside core");
+ return 0;
+ }
+
+ mod = (grub_dl_t) grub_zalloc (sizeof (*mod));
+ if (! mod)
+ return 0;
+
+ mod->ref_count = 1;
+
+ grub_dprintf ("modules", "relocating to %p\n", mod);
+ /* Me, Vladimir Serbinenko, hereby I add this module check as per new
+ GNU module policy. Note that this license check is informative only.
+ Modules have to be licensed under GPLv3 or GPLv3+ (optionally
+ multi-licensed under other licences as well) independently of the
+ presence of this check and solely by linking (module loading in GRUB
+ constitutes linking) and GRUB core being licensed under GPLv3+.
+ Be sure to understand your license obligations.
+ */
+ if (grub_dl_check_license (e)
+ || grub_dl_resolve_name (mod, e)
+ || grub_dl_resolve_dependencies (mod, e)
+ || grub_dl_load_segments (mod, e)
+ || grub_dl_resolve_symbols (mod, e)
+ || grub_arch_dl_relocate_symbols (mod, e))
+ {
+ mod->fini = 0;
+ grub_dl_unload (mod);
+ return 0;
+ }
+
+ grub_dl_flush_cache (mod);
+
+ grub_dprintf ("modules", "module name: %s\n", mod->name);
+ grub_dprintf ("modules", "init function: %p\n", mod->init);
+ grub_dl_call_init (mod);
+
+ if (grub_dl_add (mod))
+ {
+ grub_dl_unload (mod);
+ return 0;
+ }
+
+ return mod;
+}
+
+/* Load a module from the file FILENAME. */
+grub_dl_t
+grub_dl_load_file (const char *filename)
+{
+ grub_file_t file = NULL;
+ grub_ssize_t size;
+ void *core = 0;
+ grub_dl_t mod = 0;
+
+ file = grub_file_open (filename);
+ if (! file)
+ return 0;
+
+ size = grub_file_size (file);
+ core = grub_malloc (size);
+ if (! core)
+ {
+ grub_file_close (file);
+ return 0;
+ }
+
+ if (grub_file_read (file, core, size) != (int) size)
+ {
+ grub_file_close (file);
+ grub_free (core);
+ return 0;
+ }
+
+ /* We must close this before we try to process dependencies.
+ Some disk backends do not handle gracefully multiple concurrent
+ opens of the same device. */
+ grub_file_close (file);
+
+ mod = grub_dl_load_core (core, size);
+ if (! mod)
+ {
+ grub_free (core);
+ return 0;
+ }
+
+ mod->ref_count--;
+ return mod;
+}
+
+/* Load a module using a symbolic name. */
+grub_dl_t
+grub_dl_load (const char *name)
+{
+ char *filename;
+ grub_dl_t mod;
+ char *grub_dl_dir = grub_env_get ("prefix");
+
+ mod = grub_dl_get (name);
+ if (mod)
+ return mod;
+
+ if (! grub_dl_dir) {
+ grub_error (GRUB_ERR_FILE_NOT_FOUND, "\"prefix\" is not set");
+ return 0;
+ }
+
+ filename = grub_xasprintf ("%s/%s.mod", grub_dl_dir, name);
+ if (! filename)
+ return 0;
+
+ mod = grub_dl_load_file (filename);
+ grub_free (filename);
+
+ if (! mod)
+ return 0;
+
+ if (grub_strcmp (mod->name, name) != 0)
+ grub_error (GRUB_ERR_BAD_MODULE, "mismatched names");
+
+ return mod;
+}
+
+/* Unload the module MOD. */
+int
+grub_dl_unload (grub_dl_t mod)
+{
+ grub_dl_dep_t dep, depn;
+ grub_dl_segment_t seg, segn;
+
+ if (mod->ref_count > 0)
+ return 0;
+
+ if (mod->fini)
+ (mod->fini) ();
+
+ grub_dl_remove (mod);
+ grub_dl_unregister_symbols (mod);
+
+ for (dep = mod->dep; dep; dep = depn)
+ {
+ depn = dep->next;
+
+ grub_dl_unload (dep->mod);
+
+ grub_free (dep);
+ }
+
+ for (seg = mod->segment; seg; seg = segn)
+ {
+ segn = seg->next;
+ grub_free (seg->addr);
+ grub_free (seg);
+ }
+
+ grub_free (mod->name);
+#ifdef GRUB_MODULES_MACHINE_READONLY
+ grub_free (mod->symtab);
+#endif
+ grub_free (mod);
+ return 1;
+}
+
+/* Unload unneeded modules. */
+void
+grub_dl_unload_unneeded (void)
+{
+ /* Because grub_dl_remove modifies the list of modules, this
+ implementation is tricky. */
+ grub_dl_t p = grub_dl_head;
+
+ while (p)
+ {
+ if (grub_dl_unload (p))
+ {
+ p = grub_dl_head;
+ continue;
+ }
+
+ p = p->next;
+ }
+}
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
new file mode 100644
index 0000000..fa1d0c7
--- /dev/null
+++ b/grub-core/kern/efi/efi.c
@@ -0,0 +1,742 @@
+/* efi.c - generic EFI support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/charset.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/console_control.h>
+#include <grub/efi/pe32.h>
+#include <grub/machine/time.h>
+#include <grub/term.h>
+#include <grub/kernel.h>
+#include <grub/mm.h>
+
+/* The handle of GRUB itself. Filled in by the startup code. */
+grub_efi_handle_t grub_efi_image_handle;
+
+/* The pointer to a system table. Filled in by the startup code. */
+grub_efi_system_table_t *grub_efi_system_table;
+
+static grub_efi_guid_t console_control_guid = GRUB_EFI_CONSOLE_CONTROL_GUID;
+static grub_efi_guid_t loaded_image_guid = GRUB_EFI_LOADED_IMAGE_GUID;
+static grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID;
+
+void *
+grub_efi_locate_protocol (grub_efi_guid_t *protocol, void *registration)
+{
+ void *interface;
+ grub_efi_status_t status;
+
+ status = efi_call_3 (grub_efi_system_table->boot_services->locate_protocol,
+ protocol, registration, &interface);
+ if (status != GRUB_EFI_SUCCESS)
+ return 0;
+
+ return interface;
+}
+
+/* Return the array of handles which meet the requirement. If successful,
+ the number of handles is stored in NUM_HANDLES. The array is allocated
+ from the heap. */
+grub_efi_handle_t *
+grub_efi_locate_handle (grub_efi_locate_search_type_t search_type,
+ grub_efi_guid_t *protocol,
+ void *search_key,
+ grub_efi_uintn_t *num_handles)
+{
+ grub_efi_boot_services_t *b;
+ grub_efi_status_t status;
+ grub_efi_handle_t *buffer;
+ grub_efi_uintn_t buffer_size = 8 * sizeof (grub_efi_handle_t);
+
+ buffer = grub_malloc (buffer_size);
+ if (! buffer)
+ return 0;
+
+ b = grub_efi_system_table->boot_services;
+ status = efi_call_5 (b->locate_handle, search_type, protocol, search_key,
+ &buffer_size, buffer);
+ if (status == GRUB_EFI_BUFFER_TOO_SMALL)
+ {
+ grub_free (buffer);
+ buffer = grub_malloc (buffer_size);
+ if (! buffer)
+ return 0;
+
+ status = efi_call_5 (b->locate_handle, search_type, protocol, search_key,
+ &buffer_size, buffer);
+ }
+
+ if (status != GRUB_EFI_SUCCESS)
+ {
+ grub_free (buffer);
+ return 0;
+ }
+
+ *num_handles = buffer_size / sizeof (grub_efi_handle_t);
+ return buffer;
+}
+
+void *
+grub_efi_open_protocol (grub_efi_handle_t handle,
+ grub_efi_guid_t *protocol,
+ grub_efi_uint32_t attributes)
+{
+ grub_efi_boot_services_t *b;
+ grub_efi_status_t status;
+ void *interface;
+
+ b = grub_efi_system_table->boot_services;
+ status = efi_call_6 (b->open_protocol, handle,
+ protocol,
+ &interface,
+ grub_efi_image_handle,
+ 0,
+ attributes);
+ if (status != GRUB_EFI_SUCCESS)
+ return 0;
+
+ return interface;
+}
+
+int
+grub_efi_set_text_mode (int on)
+{
+ grub_efi_console_control_protocol_t *c;
+ grub_efi_screen_mode_t mode, new_mode;
+
+ c = grub_efi_locate_protocol (&console_control_guid, 0);
+ if (! c)
+ /* No console control protocol instance available, assume it is
+ already in text mode. */
+ return 1;
+
+ if (efi_call_4 (c->get_mode, c, &mode, 0, 0) != GRUB_EFI_SUCCESS)
+ return 0;
+
+ new_mode = on ? GRUB_EFI_SCREEN_TEXT : GRUB_EFI_SCREEN_GRAPHICS;
+ if (mode != new_mode)
+ if (efi_call_2 (c->set_mode, c, new_mode) != GRUB_EFI_SUCCESS)
+ return 0;
+
+ return 1;
+}
+
+void
+grub_efi_stall (grub_efi_uintn_t microseconds)
+{
+ efi_call_1 (grub_efi_system_table->boot_services->stall, microseconds);
+}
+
+grub_efi_loaded_image_t *
+grub_efi_get_loaded_image (grub_efi_handle_t image_handle)
+{
+ return grub_efi_open_protocol (image_handle,
+ &loaded_image_guid,
+ GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+}
+
+void
+grub_exit (void)
+{
+ grub_efi_fini ();
+ efi_call_4 (grub_efi_system_table->boot_services->exit,
+ grub_efi_image_handle, GRUB_EFI_SUCCESS, 0, 0);
+ for (;;) ;
+}
+
+/* On i386, a firmware-independant grub_reboot() is provided by realmode.S. */
+#ifndef __i386__
+void
+grub_reboot (void)
+{
+ grub_efi_fini ();
+ efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
+ GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL);
+ for (;;) ;
+}
+#endif
+
+grub_err_t
+grub_efi_set_virtual_address_map (grub_efi_uintn_t memory_map_size,
+ grub_efi_uintn_t descriptor_size,
+ grub_efi_uint32_t descriptor_version,
+ grub_efi_memory_descriptor_t *virtual_map)
+{
+ grub_efi_runtime_services_t *r;
+ grub_efi_status_t status;
+
+ r = grub_efi_system_table->runtime_services;
+ status = efi_call_4 (r->set_virtual_address_map, memory_map_size,
+ descriptor_size, descriptor_version, virtual_map);
+
+ if (status == GRUB_EFI_SUCCESS)
+ return GRUB_ERR_NONE;
+
+ return grub_error (GRUB_ERR_IO, "set_virtual_address_map failed");
+}
+
+grub_uint32_t
+grub_get_rtc (void)
+{
+ grub_efi_time_t time;
+ grub_efi_runtime_services_t *r;
+
+ r = grub_efi_system_table->runtime_services;
+ if (efi_call_2 (r->get_time, &time, 0) != GRUB_EFI_SUCCESS)
+ /* What is possible in this case? */
+ return 0;
+
+ return (((time.minute * 60 + time.second) * 1000
+ + time.nanosecond / 1000000)
+ * GRUB_TICKS_PER_SECOND / 1000);
+}
+
+/* Search the mods section from the PE32/PE32+ image. This code uses
+ a PE32 header, but should work with PE32+ as well. */
+grub_addr_t
+grub_arch_modules_addr (void)
+{
+ grub_efi_loaded_image_t *image;
+ struct grub_pe32_header *header;
+ struct grub_pe32_coff_header *coff_header;
+ struct grub_pe32_section_table *sections;
+ struct grub_pe32_section_table *section;
+ struct grub_module_info *info;
+ grub_uint16_t i;
+
+ image = grub_efi_get_loaded_image (grub_efi_image_handle);
+ if (! image)
+ return 0;
+
+ header = image->image_base;
+ coff_header = &(header->coff_header);
+ sections
+ = (struct grub_pe32_section_table *) ((char *) coff_header
+ + sizeof (*coff_header)
+ + coff_header->optional_header_size);
+
+ for (i = 0, section = sections;
+ i < coff_header->num_sections;
+ i++, section++)
+ {
+ if (grub_strcmp (section->name, "mods") == 0)
+ break;
+ }
+
+ if (i == coff_header->num_sections)
+ return 0;
+
+ info = (struct grub_module_info *) ((char *) image->image_base
+ + section->virtual_address);
+ if (info->magic != GRUB_MODULE_MAGIC)
+ return 0;
+
+ return (grub_addr_t) info;
+}
+
+char *
+grub_efi_get_filename (grub_efi_device_path_t *dp)
+{
+ char *name = 0;
+
+ while (1)
+ {
+ grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp);
+ grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp);
+
+ if (type == GRUB_EFI_END_DEVICE_PATH_TYPE)
+ break;
+ else if (type == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE
+ && subtype == GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE)
+ {
+ grub_efi_file_path_device_path_t *fp;
+ grub_efi_uint16_t len;
+ char *p;
+ grub_size_t size;
+
+ if (name)
+ {
+ size = grub_strlen (name);
+ name[size] = '/';
+ size++;
+ }
+ else
+ size = 0;
+
+ len = ((GRUB_EFI_DEVICE_PATH_LENGTH (dp) - 4)
+ / sizeof (grub_efi_char16_t));
+ p = grub_realloc (name, size + len * 4 + 1);
+ if (! p)
+ {
+ grub_free (name);
+ return 0;
+ }
+
+ name = p;
+ fp = (grub_efi_file_path_device_path_t *) dp;
+ *grub_utf16_to_utf8 ((grub_uint8_t *) name + size,
+ fp->path_name, len) = '\0';
+ }
+
+ dp = GRUB_EFI_NEXT_DEVICE_PATH (dp);
+ }
+
+ if (name)
+ {
+ /* EFI breaks paths with backslashes. */
+ char *p;
+
+ for (p = name; *p; p++)
+ if (*p == '\\')
+ *p = '/';
+ }
+
+ return name;
+}
+
+grub_efi_device_path_t *
+grub_efi_get_device_path (grub_efi_handle_t handle)
+{
+ return grub_efi_open_protocol (handle, &device_path_guid,
+ GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+}
+
+/* Print the chain of Device Path nodes. This is mainly for debugging. */
+void
+grub_efi_print_device_path (grub_efi_device_path_t *dp)
+{
+ while (1)
+ {
+ grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp);
+ grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp);
+ grub_efi_uint16_t len = GRUB_EFI_DEVICE_PATH_LENGTH (dp);
+
+ switch (type)
+ {
+ case GRUB_EFI_END_DEVICE_PATH_TYPE:
+ switch (subtype)
+ {
+ case GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE:
+ grub_printf ("/EndEntire\n");
+ //grub_putchar ('\n');
+ break;
+ case GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE:
+ grub_printf ("/EndThis\n");
+ //grub_putchar ('\n');
+ break;
+ default:
+ grub_printf ("/EndUnknown(%x)\n", (unsigned) subtype);
+ break;
+ }
+ break;
+
+ case GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE:
+ switch (subtype)
+ {
+ case GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_pci_device_path_t pci;
+ grub_memcpy (&pci, dp, len);
+ grub_printf ("/PCI(%x,%x)",
+ (unsigned) pci.function, (unsigned) pci.device);
+ }
+ break;
+ case GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_pccard_device_path_t pccard;
+ grub_memcpy (&pccard, dp, len);
+ grub_printf ("/PCCARD(%x)",
+ (unsigned) pccard.function);
+ }
+ break;
+ case GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_memory_mapped_device_path_t mmapped;
+ grub_memcpy (&mmapped, dp, len);
+ grub_printf ("/MMap(%x,%llx,%llx)",
+ (unsigned) mmapped.memory_type,
+ (unsigned long long) mmapped.start_address,
+ (unsigned long long) mmapped.end_address);
+ }
+ break;
+ case GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_vendor_device_path_t vendor;
+ grub_memcpy (&vendor, dp, sizeof (vendor));
+ grub_printf ("/Vendor(%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
+ (unsigned) vendor.vendor_guid.data1,
+ (unsigned) vendor.vendor_guid.data2,
+ (unsigned) vendor.vendor_guid.data3,
+ (unsigned) vendor.vendor_guid.data4[0],
+ (unsigned) vendor.vendor_guid.data4[1],
+ (unsigned) vendor.vendor_guid.data4[2],
+ (unsigned) vendor.vendor_guid.data4[3],
+ (unsigned) vendor.vendor_guid.data4[4],
+ (unsigned) vendor.vendor_guid.data4[5],
+ (unsigned) vendor.vendor_guid.data4[6],
+ (unsigned) vendor.vendor_guid.data4[7]);
+ }
+ break;
+ case GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_controller_device_path_t controller;
+ grub_memcpy (&controller, dp, len);
+ grub_printf ("/Ctrl(%x)",
+ (unsigned) controller.controller_number);
+ }
+ break;
+ default:
+ grub_printf ("/UnknownHW(%x)", (unsigned) subtype);
+ break;
+ }
+ break;
+
+ case GRUB_EFI_ACPI_DEVICE_PATH_TYPE:
+ switch (subtype)
+ {
+ case GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_acpi_device_path_t acpi;
+ grub_memcpy (&acpi, dp, len);
+ grub_printf ("/ACPI(%x,%x)",
+ (unsigned) acpi.hid,
+ (unsigned) acpi.uid);
+ }
+ break;
+ case GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_expanded_acpi_device_path_t eacpi;
+ grub_memcpy (&eacpi, dp, sizeof (eacpi));
+ grub_printf ("/ACPI(");
+
+ if (GRUB_EFI_EXPANDED_ACPI_HIDSTR (dp)[0] == '\0')
+ grub_printf ("%x,", (unsigned) eacpi.hid);
+ else
+ grub_printf ("%s,", GRUB_EFI_EXPANDED_ACPI_HIDSTR (dp));
+
+ if (GRUB_EFI_EXPANDED_ACPI_UIDSTR (dp)[0] == '\0')
+ grub_printf ("%x,", (unsigned) eacpi.uid);
+ else
+ grub_printf ("%s,", GRUB_EFI_EXPANDED_ACPI_UIDSTR (dp));
+
+ if (GRUB_EFI_EXPANDED_ACPI_CIDSTR (dp)[0] == '\0')
+ grub_printf ("%x)", (unsigned) eacpi.cid);
+ else
+ grub_printf ("%s)", GRUB_EFI_EXPANDED_ACPI_CIDSTR (dp));
+ }
+ break;
+ default:
+ grub_printf ("/UnknownACPI(%x)", (unsigned) subtype);
+ break;
+ }
+ break;
+
+ case GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE:
+ switch (subtype)
+ {
+ case GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_atapi_device_path_t atapi;
+ grub_memcpy (&atapi, dp, len);
+ grub_printf ("/ATAPI(%x,%x,%x)",
+ (unsigned) atapi.primary_secondary,
+ (unsigned) atapi.slave_master,
+ (unsigned) atapi.lun);
+ }
+ break;
+ case GRUB_EFI_SCSI_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_scsi_device_path_t scsi;
+ grub_memcpy (&scsi, dp, len);
+ grub_printf ("/SCSI(%x,%x)",
+ (unsigned) scsi.pun,
+ (unsigned) scsi.lun);
+ }
+ break;
+ case GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_fibre_channel_device_path_t fc;
+ grub_memcpy (&fc, dp, len);
+ grub_printf ("/FibreChannel(%llx,%llx)",
+ (unsigned long long) fc.wwn,
+ (unsigned long long) fc.lun);
+ }
+ break;
+ case GRUB_EFI_1394_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_1394_device_path_t firewire;
+ grub_memcpy (&firewire, dp, len);
+ grub_printf ("/1394(%llx)", (unsigned long long) firewire.guid);
+ }
+ break;
+ case GRUB_EFI_USB_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_usb_device_path_t usb;
+ grub_memcpy (&usb, dp, len);
+ grub_printf ("/USB(%x,%x)",
+ (unsigned) usb.parent_port_number,
+ (unsigned) usb.interface);
+ }
+ break;
+ case GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_usb_class_device_path_t usb_class;
+ grub_memcpy (&usb_class, dp, len);
+ grub_printf ("/USBClass(%x,%x,%x,%x,%x)",
+ (unsigned) usb_class.vendor_id,
+ (unsigned) usb_class.product_id,
+ (unsigned) usb_class.device_class,
+ (unsigned) usb_class.device_subclass,
+ (unsigned) usb_class.device_protocol);
+ }
+ break;
+ case GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_i2o_device_path_t i2o;
+ grub_memcpy (&i2o, dp, len);
+ grub_printf ("/I2O(%x)", (unsigned) i2o.tid);
+ }
+ break;
+ case GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_mac_address_device_path_t mac;
+ grub_memcpy (&mac, dp, len);
+ grub_printf ("/MacAddr(%02x:%02x:%02x:%02x:%02x:%02x,%x)",
+ (unsigned) mac.mac_address[0],
+ (unsigned) mac.mac_address[1],
+ (unsigned) mac.mac_address[2],
+ (unsigned) mac.mac_address[3],
+ (unsigned) mac.mac_address[4],
+ (unsigned) mac.mac_address[5],
+ (unsigned) mac.if_type);
+ }
+ break;
+ case GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_ipv4_device_path_t ipv4;
+ grub_memcpy (&ipv4, dp, len);
+ grub_printf ("/IPv4(%u.%u.%u.%u,%u.%u.%u.%u,%u,%u,%x,%x)",
+ (unsigned) ipv4.local_ip_address[0],
+ (unsigned) ipv4.local_ip_address[1],
+ (unsigned) ipv4.local_ip_address[2],
+ (unsigned) ipv4.local_ip_address[3],
+ (unsigned) ipv4.remote_ip_address[0],
+ (unsigned) ipv4.remote_ip_address[1],
+ (unsigned) ipv4.remote_ip_address[2],
+ (unsigned) ipv4.remote_ip_address[3],
+ (unsigned) ipv4.local_port,
+ (unsigned) ipv4.remote_port,
+ (unsigned) ipv4.protocol,
+ (unsigned) ipv4.static_ip_address);
+ }
+ break;
+ case GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_ipv6_device_path_t ipv6;
+ grub_memcpy (&ipv6, dp, len);
+ grub_printf ("/IPv6(%x:%x:%x:%x:%x:%x:%x:%x,%x:%x:%x:%x:%x:%x:%x:%x,%u,%u,%x,%x)",
+ (unsigned) ipv6.local_ip_address[0],
+ (unsigned) ipv6.local_ip_address[1],
+ (unsigned) ipv6.local_ip_address[2],
+ (unsigned) ipv6.local_ip_address[3],
+ (unsigned) ipv6.local_ip_address[4],
+ (unsigned) ipv6.local_ip_address[5],
+ (unsigned) ipv6.local_ip_address[6],
+ (unsigned) ipv6.local_ip_address[7],
+ (unsigned) ipv6.remote_ip_address[0],
+ (unsigned) ipv6.remote_ip_address[1],
+ (unsigned) ipv6.remote_ip_address[2],
+ (unsigned) ipv6.remote_ip_address[3],
+ (unsigned) ipv6.remote_ip_address[4],
+ (unsigned) ipv6.remote_ip_address[5],
+ (unsigned) ipv6.remote_ip_address[6],
+ (unsigned) ipv6.remote_ip_address[7],
+ (unsigned) ipv6.local_port,
+ (unsigned) ipv6.remote_port,
+ (unsigned) ipv6.protocol,
+ (unsigned) ipv6.static_ip_address);
+ }
+ break;
+ case GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_infiniband_device_path_t ib;
+ grub_memcpy (&ib, dp, len);
+ grub_printf ("/InfiniBand(%x,%llx,%llx,%llx)",
+ (unsigned) ib.port_gid[0], /* XXX */
+ (unsigned long long) ib.remote_id,
+ (unsigned long long) ib.target_port_id,
+ (unsigned long long) ib.device_id);
+ }
+ break;
+ case GRUB_EFI_UART_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_uart_device_path_t uart;
+ grub_memcpy (&uart, dp, len);
+ grub_printf ("/UART(%llu,%u,%x,%x)",
+ (unsigned long long) uart.baud_rate,
+ uart.data_bits,
+ uart.parity,
+ uart.stop_bits);
+ }
+ break;
+ case GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_vendor_messaging_device_path_t vendor;
+ grub_memcpy (&vendor, dp, sizeof (vendor));
+ grub_printf ("/Vendor(%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
+ (unsigned) vendor.vendor_guid.data1,
+ (unsigned) vendor.vendor_guid.data2,
+ (unsigned) vendor.vendor_guid.data3,
+ (unsigned) vendor.vendor_guid.data4[0],
+ (unsigned) vendor.vendor_guid.data4[1],
+ (unsigned) vendor.vendor_guid.data4[2],
+ (unsigned) vendor.vendor_guid.data4[3],
+ (unsigned) vendor.vendor_guid.data4[4],
+ (unsigned) vendor.vendor_guid.data4[5],
+ (unsigned) vendor.vendor_guid.data4[6],
+ (unsigned) vendor.vendor_guid.data4[7]);
+ }
+ break;
+ default:
+ grub_printf ("/UnknownMessaging(%x)", (unsigned) subtype);
+ break;
+ }
+ break;
+
+ case GRUB_EFI_MEDIA_DEVICE_PATH_TYPE:
+ switch (subtype)
+ {
+ case GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_hard_drive_device_path_t hd;
+ grub_memcpy (&hd, dp, len);
+ grub_printf ("/HD(%u,%llx,%llx,%02x%02x%02x%02x%02x%02x%02x%02x,%x,%x)",
+ hd.partition_number,
+ (unsigned long long) hd.partition_start,
+ (unsigned long long) hd.partition_size,
+ (unsigned) hd.partition_signature[0],
+ (unsigned) hd.partition_signature[1],
+ (unsigned) hd.partition_signature[2],
+ (unsigned) hd.partition_signature[3],
+ (unsigned) hd.partition_signature[4],
+ (unsigned) hd.partition_signature[5],
+ (unsigned) hd.partition_signature[6],
+ (unsigned) hd.partition_signature[7],
+ (unsigned) hd.mbr_type,
+ (unsigned) hd.signature_type);
+ }
+ break;
+ case GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_cdrom_device_path_t cd;
+ grub_memcpy (&cd, dp, len);
+ grub_printf ("/CD(%u,%llx,%llx)",
+ cd.boot_entry,
+ (unsigned long long) cd.partition_start,
+ (unsigned long long) cd.partition_size);
+ }
+ break;
+ case GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_vendor_media_device_path_t vendor;
+ grub_memcpy (&vendor, dp, sizeof (vendor));
+ grub_printf ("/Vendor(%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
+ (unsigned) vendor.vendor_guid.data1,
+ (unsigned) vendor.vendor_guid.data2,
+ (unsigned) vendor.vendor_guid.data3,
+ (unsigned) vendor.vendor_guid.data4[0],
+ (unsigned) vendor.vendor_guid.data4[1],
+ (unsigned) vendor.vendor_guid.data4[2],
+ (unsigned) vendor.vendor_guid.data4[3],
+ (unsigned) vendor.vendor_guid.data4[4],
+ (unsigned) vendor.vendor_guid.data4[5],
+ (unsigned) vendor.vendor_guid.data4[6],
+ (unsigned) vendor.vendor_guid.data4[7]);
+ }
+ break;
+ case GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_file_path_device_path_t *fp;
+ grub_uint8_t buf[(len - 4) * 2 + 1];
+ fp = (grub_efi_file_path_device_path_t *) dp;
+ *grub_utf16_to_utf8 (buf, fp->path_name,
+ (len - 4) / sizeof (grub_efi_char16_t))
+ = '\0';
+ grub_printf ("/File(%s)", buf);
+ }
+ break;
+ case GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_protocol_device_path_t proto;
+ grub_memcpy (&proto, dp, sizeof (proto));
+ grub_printf ("/Protocol(%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
+ (unsigned) proto.guid.data1,
+ (unsigned) proto.guid.data2,
+ (unsigned) proto.guid.data3,
+ (unsigned) proto.guid.data4[0],
+ (unsigned) proto.guid.data4[1],
+ (unsigned) proto.guid.data4[2],
+ (unsigned) proto.guid.data4[3],
+ (unsigned) proto.guid.data4[4],
+ (unsigned) proto.guid.data4[5],
+ (unsigned) proto.guid.data4[6],
+ (unsigned) proto.guid.data4[7]);
+ }
+ break;
+ default:
+ grub_printf ("/UnknownMedia(%x)", (unsigned) subtype);
+ break;
+ }
+ break;
+
+ case GRUB_EFI_BIOS_DEVICE_PATH_TYPE:
+ switch (subtype)
+ {
+ case GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE:
+ {
+ grub_efi_bios_device_path_t bios;
+ grub_memcpy (&bios, dp, sizeof (bios));
+ grub_printf ("/BIOS(%x,%x,%s)",
+ (unsigned) bios.device_type,
+ (unsigned) bios.status_flags,
+ (char *) (dp + 1));
+ }
+ break;
+ default:
+ grub_printf ("/UnknownBIOS(%x)", (unsigned) subtype);
+ break;
+ }
+ break;
+
+ default:
+ grub_printf ("/UnknownType(%x,%x)\n",
+ (unsigned) type,
+ (unsigned) subtype);
+ return;
+ break;
+ }
+
+ if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp))
+ break;
+
+ dp = (grub_efi_device_path_t *) ((char *) dp + len);
+ }
+}
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
new file mode 100644
index 0000000..1b0a872
--- /dev/null
+++ b/grub-core/kern/efi/init.c
@@ -0,0 +1,130 @@
+/* init.c - generic EFI initialization and finalization */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/efi/efi.h>
+#include <grub/efi/console.h>
+#include <grub/efi/disk.h>
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/mm.h>
+#include <grub/kernel.h>
+
+void
+grub_efi_init (void)
+{
+ /* First of all, initialize the console so that GRUB can display
+ messages. */
+ grub_console_init ();
+
+ /* Initialize the memory management system. */
+ grub_efi_mm_init ();
+
+ efi_call_4 (grub_efi_system_table->boot_services->set_watchdog_timer,
+ 0, 0, 0, NULL);
+
+ grub_efidisk_init ();
+}
+
+void
+grub_efi_set_prefix (void)
+{
+ grub_efi_loaded_image_t *image = NULL;
+ char *device = NULL;
+ char *path = NULL;
+
+ {
+ char *pptr = NULL;
+ if (grub_prefix[0] == '(')
+ {
+ pptr = grub_strrchr (grub_prefix, ')');
+ if (pptr)
+ {
+ device = grub_strndup (grub_prefix + 1, pptr - grub_prefix - 1);
+ pptr++;
+ }
+ }
+ if (!pptr)
+ pptr = grub_prefix;
+ if (pptr[0])
+ path = grub_strdup (pptr);
+ }
+
+ if ((!device || device[0] == ',' || !device[0]) || !path)
+ image = grub_efi_get_loaded_image (grub_efi_image_handle);
+ if (image)
+ {
+ if (!device)
+ device = grub_efidisk_get_device_name (image->device_handle);
+ else if (device[0] == ',' || !device[0])
+ {
+ /* We have a partition, but still need to fill in the drive. */
+ char *image_device, *comma, *new_device;
+
+ image_device = grub_efidisk_get_device_name (image->device_handle);
+ comma = grub_strchr (image_device, ',');
+ if (comma)
+ {
+ char *drive = grub_strndup (image_device, comma - image_device);
+ new_device = grub_xasprintf ("%s%s", drive, device);
+ grub_free (drive);
+ }
+ else
+ new_device = grub_xasprintf ("%s%s", image_device, device);
+
+ grub_free (image_device);
+ grub_free (device);
+ device = new_device;
+ }
+ }
+
+ if (image && !path)
+ {
+ char *p;
+
+ path = grub_efi_get_filename (image->file_path);
+
+ /* Get the directory. */
+ p = grub_strrchr (path, '/');
+ if (p)
+ *p = '\0';
+ }
+
+ if (device && path)
+ {
+ char *prefix;
+
+ prefix = grub_xasprintf ("(%s)%s", device, path);
+ if (prefix)
+ {
+ grub_env_set ("prefix", prefix);
+ grub_free (prefix);
+ }
+ }
+
+ grub_free (device);
+ grub_free (path);
+}
+
+void
+grub_efi_fini (void)
+{
+ grub_efidisk_fini ();
+ grub_console_fini ();
+}
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
new file mode 100644
index 0000000..8b9e6ec
--- /dev/null
+++ b/grub-core/kern/efi/mm.c
@@ -0,0 +1,453 @@
+/* mm.c - generic EFI memory management */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+
+#define NEXT_MEMORY_DESCRIPTOR(desc, size) \
+ ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
+
+#define BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> 12)
+#define PAGES_TO_BYTES(pages) ((pages) << 12)
+
+/* The size of a memory map obtained from the firmware. This must be
+ a multiplier of 4KB. */
+#define MEMORY_MAP_SIZE 0x3000
+
+/* The minimum and maximum heap size for GRUB itself. */
+#define MIN_HEAP_SIZE 0x100000
+#define MAX_HEAP_SIZE (1600 * 0x100000)
+
+static void *finish_mmap_buf = 0;
+static grub_efi_uintn_t finish_mmap_size = 0;
+static grub_efi_uintn_t finish_key = 0;
+static grub_efi_uintn_t finish_desc_size;
+static grub_efi_uint32_t finish_desc_version;
+int grub_efi_is_finished = 0;
+
+/* Allocate pages. Return the pointer to the first of allocated pages. */
+void *
+grub_efi_allocate_pages (grub_efi_physical_address_t address,
+ grub_efi_uintn_t pages)
+{
+ grub_efi_allocate_type_t type;
+ grub_efi_status_t status;
+ grub_efi_boot_services_t *b;
+
+#if 1
+ /* Limit the memory access to less than 4GB for 32-bit platforms. */
+ if (address > 0xffffffff)
+ return 0;
+#endif
+
+#if 1
+ if (address == 0)
+ {
+ type = GRUB_EFI_ALLOCATE_MAX_ADDRESS;
+ address = 0xffffffff;
+ }
+ else
+ type = GRUB_EFI_ALLOCATE_ADDRESS;
+#else
+ if (address == 0)
+ type = GRUB_EFI_ALLOCATE_ANY_PAGES;
+ else
+ type = GRUB_EFI_ALLOCATE_ADDRESS;
+#endif
+
+ b = grub_efi_system_table->boot_services;
+ status = efi_call_4 (b->allocate_pages, type, GRUB_EFI_LOADER_DATA, pages, &address);
+ if (status != GRUB_EFI_SUCCESS)
+ return 0;
+
+ if (address == 0)
+ {
+ /* Uggh, the address 0 was allocated... This is too annoying,
+ so reallocate another one. */
+ address = 0xffffffff;
+ status = efi_call_4 (b->allocate_pages, type, GRUB_EFI_LOADER_DATA, pages, &address);
+ grub_efi_free_pages (0, pages);
+ if (status != GRUB_EFI_SUCCESS)
+ return 0;
+ }
+
+ return (void *) ((grub_addr_t) address);
+}
+
+/* Free pages starting from ADDRESS. */
+void
+grub_efi_free_pages (grub_efi_physical_address_t address,
+ grub_efi_uintn_t pages)
+{
+ grub_efi_boot_services_t *b;
+
+ b = grub_efi_system_table->boot_services;
+ efi_call_2 (b->free_pages, address, pages);
+}
+
+grub_err_t
+grub_efi_finish_boot_services (grub_efi_uintn_t *outbuf_size, void *outbuf,
+ grub_efi_uintn_t *map_key,
+ grub_efi_uintn_t *efi_desc_size,
+ grub_efi_uint32_t *efi_desc_version)
+{
+ grub_efi_boot_services_t *b;
+ grub_efi_status_t status;
+
+ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
+ &finish_desc_size, &finish_desc_version) < 0)
+ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
+
+ if (outbuf && *outbuf_size < finish_mmap_size)
+ return grub_error (GRUB_ERR_IO, "memory map buffer is too small");
+
+ finish_mmap_buf = grub_malloc (finish_mmap_size);
+ if (!finish_mmap_buf)
+ return grub_errno;
+
+ if (grub_efi_get_memory_map (&finish_mmap_size, finish_mmap_buf, &finish_key,
+ &finish_desc_size, &finish_desc_version) <= 0)
+ return grub_error (GRUB_ERR_IO, "couldn't retrieve memory map");
+
+ b = grub_efi_system_table->boot_services;
+ status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
+ finish_key);
+ if (status != GRUB_EFI_SUCCESS)
+ return grub_error (GRUB_ERR_IO, "couldn't terminate EFI services");
+
+ grub_efi_is_finished = 1;
+ if (outbuf_size)
+ *outbuf_size = finish_mmap_size;
+ if (outbuf)
+ grub_memcpy (outbuf, finish_mmap_buf, finish_mmap_size);
+ if (map_key)
+ *map_key = finish_key;
+ if (efi_desc_size)
+ *efi_desc_size = finish_desc_size;
+ if (efi_desc_version)
+ *efi_desc_version = finish_desc_version;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Get the memory map as defined in the EFI spec. Return 1 if successful,
+ return 0 if partial, or return -1 if an error occurs. */
+int
+grub_efi_get_memory_map (grub_efi_uintn_t *memory_map_size,
+ grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_uintn_t *map_key,
+ grub_efi_uintn_t *descriptor_size,
+ grub_efi_uint32_t *descriptor_version)
+{
+ grub_efi_status_t status;
+ grub_efi_boot_services_t *b;
+ grub_efi_uintn_t key;
+ grub_efi_uint32_t version;
+
+ if (grub_efi_is_finished)
+ {
+ int ret = 1;
+ if (*memory_map_size < finish_mmap_size)
+ {
+ grub_memcpy (memory_map, finish_mmap_buf, *memory_map_size);
+ ret = 0;
+ }
+ else
+ {
+ grub_memcpy (memory_map, finish_mmap_buf, finish_mmap_size);
+ ret = 1;
+ }
+ *memory_map_size = finish_mmap_size;
+ if (map_key)
+ *map_key = finish_key;
+ if (descriptor_size)
+ *descriptor_size = finish_desc_size;
+ if (descriptor_version)
+ *descriptor_version = finish_desc_version;
+ return ret;
+ }
+
+ /* Allow some parameters to be missing. */
+ if (! map_key)
+ map_key = &key;
+ if (! descriptor_version)
+ descriptor_version = &version;
+
+ b = grub_efi_system_table->boot_services;
+ status = efi_call_5 (b->get_memory_map, memory_map_size, memory_map, map_key,
+ descriptor_size, descriptor_version);
+ if (status == GRUB_EFI_SUCCESS)
+ return 1;
+ else if (status == GRUB_EFI_BUFFER_TOO_SMALL)
+ return 0;
+ else
+ return -1;
+}
+
+/* Sort the memory map in place. */
+static void
+sort_memory_map (grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_uintn_t desc_size,
+ grub_efi_memory_descriptor_t *memory_map_end)
+{
+ grub_efi_memory_descriptor_t *d1;
+ grub_efi_memory_descriptor_t *d2;
+
+ for (d1 = memory_map;
+ d1 < memory_map_end;
+ d1 = NEXT_MEMORY_DESCRIPTOR (d1, desc_size))
+ {
+ grub_efi_memory_descriptor_t *max_desc = d1;
+
+ for (d2 = NEXT_MEMORY_DESCRIPTOR (d1, desc_size);
+ d2 < memory_map_end;
+ d2 = NEXT_MEMORY_DESCRIPTOR (d2, desc_size))
+ {
+ if (max_desc->num_pages < d2->num_pages)
+ max_desc = d2;
+ }
+
+ if (max_desc != d1)
+ {
+ grub_efi_memory_descriptor_t tmp;
+
+ tmp = *d1;
+ *d1 = *max_desc;
+ *max_desc = tmp;
+ }
+ }
+}
+
+/* Filter the descriptors. GRUB needs only available memory. */
+static grub_efi_memory_descriptor_t *
+filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_memory_descriptor_t *filtered_memory_map,
+ grub_efi_uintn_t desc_size,
+ grub_efi_memory_descriptor_t *memory_map_end)
+{
+ grub_efi_memory_descriptor_t *desc;
+ grub_efi_memory_descriptor_t *filtered_desc;
+
+ for (desc = memory_map, filtered_desc = filtered_memory_map;
+ desc < memory_map_end;
+ desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
+ {
+ if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY
+#if 1
+ && desc->physical_start <= 0xffffffff
+#endif
+ && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000
+ && desc->num_pages != 0)
+ {
+ grub_memcpy (filtered_desc, desc, desc_size);
+
+ /* Avoid less than 1MB, because some loaders seem to be confused. */
+ if (desc->physical_start < 0x100000)
+ {
+ desc->num_pages -= BYTES_TO_PAGES (0x100000
+ - desc->physical_start);
+ desc->physical_start = 0x100000;
+ }
+
+#if 1
+ if (BYTES_TO_PAGES (filtered_desc->physical_start)
+ + filtered_desc->num_pages
+ > BYTES_TO_PAGES (0x100000000LL))
+ filtered_desc->num_pages
+ = (BYTES_TO_PAGES (0x100000000LL)
+ - BYTES_TO_PAGES (filtered_desc->physical_start));
+#endif
+
+ if (filtered_desc->num_pages == 0)
+ continue;
+
+ filtered_desc = NEXT_MEMORY_DESCRIPTOR (filtered_desc, desc_size);
+ }
+ }
+
+ return filtered_desc;
+}
+
+/* Return the total number of pages. */
+static grub_efi_uint64_t
+get_total_pages (grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_uintn_t desc_size,
+ grub_efi_memory_descriptor_t *memory_map_end)
+{
+ grub_efi_memory_descriptor_t *desc;
+ grub_efi_uint64_t total = 0;
+
+ for (desc = memory_map;
+ desc < memory_map_end;
+ desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
+ total += desc->num_pages;
+
+ return total;
+}
+
+/* Add memory regions. */
+static void
+add_memory_regions (grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_uintn_t desc_size,
+ grub_efi_memory_descriptor_t *memory_map_end,
+ grub_efi_uint64_t required_pages)
+{
+ grub_efi_memory_descriptor_t *desc;
+
+ for (desc = memory_map;
+ desc < memory_map_end;
+ desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
+ {
+ grub_efi_uint64_t pages;
+ grub_efi_physical_address_t start;
+ void *addr;
+
+ start = desc->physical_start;
+ pages = desc->num_pages;
+ if (pages > required_pages)
+ {
+ start += PAGES_TO_BYTES (pages - required_pages);
+ pages = required_pages;
+ }
+
+ addr = grub_efi_allocate_pages (start, pages);
+ if (! addr)
+ grub_fatal ("cannot allocate conventional memory %p with %u pages",
+ (void *) ((grub_addr_t) start),
+ (unsigned) pages);
+
+ grub_mm_init_region (addr, PAGES_TO_BYTES (pages));
+
+ required_pages -= pages;
+ if (required_pages == 0)
+ break;
+ }
+
+ if (required_pages > 0)
+ grub_fatal ("too little memory");
+}
+
+#if 0
+/* Print the memory map. */
+static void
+print_memory_map (grub_efi_memory_descriptor_t *memory_map,
+ grub_efi_uintn_t desc_size,
+ grub_efi_memory_descriptor_t *memory_map_end)
+{
+ grub_efi_memory_descriptor_t *desc;
+ int i;
+
+ for (desc = memory_map, i = 0;
+ desc < memory_map_end;
+ desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size), i++)
+ {
+ grub_printf ("MD: t=%x, p=%llx, v=%llx, n=%llx, a=%llx\n",
+ desc->type, desc->physical_start, desc->virtual_start,
+ desc->num_pages, desc->attribute);
+ }
+}
+#endif
+
+void
+grub_efi_mm_init (void)
+{
+ grub_efi_memory_descriptor_t *memory_map;
+ grub_efi_memory_descriptor_t *memory_map_end;
+ grub_efi_memory_descriptor_t *filtered_memory_map;
+ grub_efi_memory_descriptor_t *filtered_memory_map_end;
+ grub_efi_uintn_t map_size;
+ grub_efi_uintn_t desc_size;
+ grub_efi_uint64_t total_pages;
+ grub_efi_uint64_t required_pages;
+ int mm_status;
+
+ /* Prepare a memory region to store two memory maps. */
+ memory_map = grub_efi_allocate_pages (0,
+ 2 * BYTES_TO_PAGES (MEMORY_MAP_SIZE));
+ if (! memory_map)
+ grub_fatal ("cannot allocate memory");
+
+ /* Obtain descriptors for available memory. */
+ map_size = MEMORY_MAP_SIZE;
+
+ mm_status = grub_efi_get_memory_map (&map_size, memory_map, 0, &desc_size, 0);
+
+ if (mm_status == 0)
+ {
+ grub_efi_free_pages
+ ((grub_efi_physical_address_t) ((grub_addr_t) memory_map),
+ 2 * BYTES_TO_PAGES (MEMORY_MAP_SIZE));
+
+ /* Freeing/allocating operations may increase memory map size. */
+ map_size += desc_size * 32;
+
+ memory_map = grub_efi_allocate_pages (0, 2 * BYTES_TO_PAGES (map_size));
+ if (! memory_map)
+ grub_fatal ("cannot allocate memory");
+
+ mm_status = grub_efi_get_memory_map (&map_size, memory_map, 0,
+ &desc_size, 0);
+ }
+
+ if (mm_status < 0)
+ grub_fatal ("cannot get memory map");
+
+ memory_map_end = NEXT_MEMORY_DESCRIPTOR (memory_map, map_size);
+
+ filtered_memory_map = memory_map_end;
+
+ filtered_memory_map_end = filter_memory_map (memory_map, filtered_memory_map,
+ desc_size, memory_map_end);
+
+ /* By default, request a quarter of the available memory. */
+ total_pages = get_total_pages (filtered_memory_map, desc_size,
+ filtered_memory_map_end);
+ required_pages = (total_pages >> 2);
+ if (required_pages < BYTES_TO_PAGES (MIN_HEAP_SIZE))
+ required_pages = BYTES_TO_PAGES (MIN_HEAP_SIZE);
+ else if (required_pages > BYTES_TO_PAGES (MAX_HEAP_SIZE))
+ required_pages = BYTES_TO_PAGES (MAX_HEAP_SIZE);
+
+ /* Sort the filtered descriptors, so that GRUB can allocate pages
+ from smaller regions. */
+ sort_memory_map (filtered_memory_map, desc_size, filtered_memory_map_end);
+
+ /* Allocate memory regions for GRUB's memory management. */
+ add_memory_regions (filtered_memory_map, desc_size,
+ filtered_memory_map_end, required_pages);
+
+#if 0
+ /* For debug. */
+ map_size = MEMORY_MAP_SIZE;
+
+ if (grub_efi_get_memory_map (&map_size, memory_map, 0, &desc_size, 0) < 0)
+ grub_fatal ("cannot get memory map");
+
+ grub_printf ("printing memory map\n");
+ print_memory_map (memory_map, desc_size,
+ NEXT_MEMORY_DESCRIPTOR (memory_map, map_size));
+ grub_abort ();
+#endif
+
+ /* Release the memory maps. */
+ grub_efi_free_pages ((grub_addr_t) memory_map,
+ 2 * BYTES_TO_PAGES (MEMORY_MAP_SIZE));
+}
diff --git a/grub-core/kern/elf.c b/grub-core/kern/elf.c
new file mode 100644
index 0000000..9c7b8ce
--- /dev/null
+++ b/grub-core/kern/elf.c
@@ -0,0 +1,488 @@
+/* elf.c - load ELF files */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/elf.h>
+#include <grub/elfload.h>
+#include <grub/file.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Check if EHDR is a valid ELF header. */
+static grub_err_t
+grub_elf_check_header (grub_elf_t elf)
+{
+ Elf32_Ehdr *e = &elf->ehdr.ehdr32;
+
+ if (e->e_ident[EI_MAG0] != ELFMAG0
+ || e->e_ident[EI_MAG1] != ELFMAG1
+ || e->e_ident[EI_MAG2] != ELFMAG2
+ || e->e_ident[EI_MAG3] != ELFMAG3
+ || e->e_ident[EI_VERSION] != EV_CURRENT
+ || e->e_version != EV_CURRENT)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch independent ELF magic");
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_elf_close (grub_elf_t elf)
+{
+ grub_file_t file = elf->file;
+
+ grub_free (elf->phdrs);
+ grub_free (elf);
+
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+grub_elf_t
+grub_elf_file (grub_file_t file)
+{
+ grub_elf_t elf;
+
+ elf = grub_zalloc (sizeof (*elf));
+ if (! elf)
+ return 0;
+
+ elf->file = file;
+
+ if (grub_file_seek (elf->file, 0) == (grub_off_t) -1)
+ goto fail;
+
+ if (grub_file_read (elf->file, &elf->ehdr, sizeof (elf->ehdr))
+ != sizeof (elf->ehdr))
+ {
+ grub_error_push ();
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read ELF header");
+ goto fail;
+ }
+
+ if (grub_elf_check_header (elf))
+ goto fail;
+
+ return elf;
+
+fail:
+ grub_free (elf->phdrs);
+ grub_free (elf);
+ return 0;
+}
+
+grub_elf_t
+grub_elf_open (const char *name)
+{
+ grub_file_t file;
+ grub_elf_t elf;
+
+ file = grub_file_open (name);
+ if (! file)
+ return 0;
+
+ elf = grub_elf_file (file);
+ if (! elf)
+ grub_file_close (file);
+
+ return elf;
+}
+
+
+/* 32-bit */
+
+int
+grub_elf_is_elf32 (grub_elf_t elf)
+{
+ return elf->ehdr.ehdr32.e_ident[EI_CLASS] == ELFCLASS32;
+}
+
+static grub_err_t
+grub_elf32_load_phdrs (grub_elf_t elf)
+{
+ grub_ssize_t phdrs_size;
+
+ phdrs_size = elf->ehdr.ehdr32.e_phnum * elf->ehdr.ehdr32.e_phentsize;
+
+ grub_dprintf ("elf", "Loading program headers at 0x%llx, size 0x%lx.\n",
+ (unsigned long long) elf->ehdr.ehdr32.e_phoff,
+ (unsigned long) phdrs_size);
+
+ elf->phdrs = grub_malloc (phdrs_size);
+ if (! elf->phdrs)
+ return grub_errno;
+
+ if ((grub_file_seek (elf->file, elf->ehdr.ehdr32.e_phoff) == (grub_off_t) -1)
+ || (grub_file_read (elf->file, elf->phdrs, phdrs_size) != phdrs_size))
+ {
+ grub_error_push ();
+ return grub_error (GRUB_ERR_READ_ERROR, "cannot read program headers");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_elf32_phdr_iterate (grub_elf_t elf,
+ int NESTED_FUNC_ATTR (*hook) (grub_elf_t, Elf32_Phdr *, void *),
+ void *hook_arg)
+{
+ Elf32_Phdr *phdrs;
+ unsigned int i;
+
+ if (! elf->phdrs)
+ if (grub_elf32_load_phdrs (elf))
+ return grub_errno;
+ phdrs = elf->phdrs;
+
+ for (i = 0; i < elf->ehdr.ehdr32.e_phnum; i++)
+ {
+ Elf32_Phdr *phdr = phdrs + i;
+ grub_dprintf ("elf",
+ "Segment %u: type 0x%x paddr 0x%lx memsz 0x%lx "
+ "filesz %lx\n",
+ i, phdr->p_type,
+ (unsigned long) phdr->p_paddr,
+ (unsigned long) phdr->p_memsz,
+ (unsigned long) phdr->p_filesz);
+ if (hook (elf, phdr, hook_arg))
+ break;
+ }
+
+ return grub_errno;
+}
+
+/* Calculate the amount of memory spanned by the segments. */
+grub_size_t
+grub_elf32_size (grub_elf_t elf, Elf32_Addr *base, grub_uint32_t *max_align)
+{
+ Elf32_Addr segments_start = (Elf32_Addr) -1;
+ Elf32_Addr segments_end = 0;
+ int nr_phdrs = 0;
+ grub_uint32_t curr_align = 1;
+
+ /* Run through the program headers to calculate the total memory size we
+ * should claim. */
+ auto int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf, Elf32_Phdr *phdr, void *_arg);
+ int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf __attribute__ ((unused)),
+ Elf32_Phdr *phdr,
+ void *_arg __attribute__ ((unused)))
+ {
+ /* Only consider loadable segments. */
+ if (phdr->p_type != PT_LOAD)
+ return 0;
+ nr_phdrs++;
+ if (phdr->p_paddr < segments_start)
+ segments_start = phdr->p_paddr;
+ if (phdr->p_paddr + phdr->p_memsz > segments_end)
+ segments_end = phdr->p_paddr + phdr->p_memsz;
+ if (curr_align < phdr->p_align)
+ curr_align = phdr->p_align;
+ return 0;
+ }
+
+ grub_elf32_phdr_iterate (elf, calcsize, 0);
+
+ if (base)
+ *base = 0;
+
+ if (nr_phdrs == 0)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "no program headers present");
+ return 0;
+ }
+
+ if (segments_end < segments_start)
+ {
+ /* Very bad addresses. */
+ grub_error (GRUB_ERR_BAD_OS, "bad program header load addresses");
+ return 0;
+ }
+
+ if (base)
+ *base = segments_start;
+ if (max_align)
+ *max_align = curr_align;
+ return segments_end - segments_start;
+}
+
+/* Load every loadable segment into memory specified by `_load_hook'. */
+grub_err_t
+grub_elf32_load (grub_elf_t _elf, grub_elf32_load_hook_t _load_hook,
+ grub_addr_t *base, grub_size_t *size)
+{
+ grub_addr_t load_base = (grub_addr_t) -1ULL;
+ grub_size_t load_size = 0;
+ grub_err_t err;
+
+ auto int NESTED_FUNC_ATTR grub_elf32_load_segment (grub_elf_t elf, Elf32_Phdr *phdr, void *hook);
+ int NESTED_FUNC_ATTR grub_elf32_load_segment (grub_elf_t elf, Elf32_Phdr *phdr, void *hook)
+ {
+ grub_elf32_load_hook_t load_hook = (grub_elf32_load_hook_t) hook;
+ grub_addr_t load_addr;
+ int do_load = 1;
+
+ load_addr = phdr->p_paddr;
+ if (load_hook && load_hook (phdr, &load_addr, &do_load))
+ return 1;
+
+ if (! do_load)
+ return 0;
+
+ if (load_addr < load_base)
+ load_base = load_addr;
+
+ grub_dprintf ("elf", "Loading segment at 0x%llx, size 0x%llx\n",
+ (unsigned long long) load_addr,
+ (unsigned long long) phdr->p_memsz);
+
+ if (grub_file_seek (elf->file, phdr->p_offset) == (grub_off_t) -1)
+ {
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS,
+ "invalid offset in program header");
+ }
+
+ if (phdr->p_filesz)
+ {
+ grub_ssize_t read;
+ read = grub_file_read (elf->file, (void *) load_addr, phdr->p_filesz);
+ if (read != (grub_ssize_t) phdr->p_filesz)
+ {
+ /* XXX How can we free memory from `load_hook'? */
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read segment from file: "
+ "wanted 0x%lx bytes; read 0x%lx bytes",
+ phdr->p_filesz, read);
+ }
+ }
+
+ if (phdr->p_filesz < phdr->p_memsz)
+ grub_memset ((void *) (long) (load_addr + phdr->p_filesz),
+ 0, phdr->p_memsz - phdr->p_filesz);
+
+ load_size += phdr->p_memsz;
+
+ return 0;
+ }
+
+ err = grub_elf32_phdr_iterate (_elf, grub_elf32_load_segment, _load_hook);
+
+ if (base)
+ *base = load_base;
+ if (size)
+ *size = load_size;
+
+ return err;
+}
+
+
+/* 64-bit */
+
+int
+grub_elf_is_elf64 (grub_elf_t elf)
+{
+ return elf->ehdr.ehdr64.e_ident[EI_CLASS] == ELFCLASS64;
+}
+
+static grub_err_t
+grub_elf64_load_phdrs (grub_elf_t elf)
+{
+ grub_ssize_t phdrs_size;
+
+ phdrs_size = elf->ehdr.ehdr64.e_phnum * elf->ehdr.ehdr64.e_phentsize;
+
+ grub_dprintf ("elf", "Loading program headers at 0x%llx, size 0x%lx.\n",
+ (unsigned long long) elf->ehdr.ehdr64.e_phoff,
+ (unsigned long) phdrs_size);
+
+ elf->phdrs = grub_malloc (phdrs_size);
+ if (! elf->phdrs)
+ return grub_errno;
+
+ if ((grub_file_seek (elf->file, elf->ehdr.ehdr64.e_phoff) == (grub_off_t) -1)
+ || (grub_file_read (elf->file, elf->phdrs, phdrs_size) != phdrs_size))
+ {
+ grub_error_push ();
+ return grub_error (GRUB_ERR_READ_ERROR, "cannot read program headers");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_elf64_phdr_iterate (grub_elf_t elf,
+ int NESTED_FUNC_ATTR (*hook) (grub_elf_t, Elf64_Phdr *, void *),
+ void *hook_arg)
+{
+ Elf64_Phdr *phdrs;
+ unsigned int i;
+
+ if (! elf->phdrs)
+ if (grub_elf64_load_phdrs (elf))
+ return grub_errno;
+ phdrs = elf->phdrs;
+
+ for (i = 0; i < elf->ehdr.ehdr64.e_phnum; i++)
+ {
+ Elf64_Phdr *phdr = phdrs + i;
+ grub_dprintf ("elf",
+ "Segment %u: type 0x%x paddr 0x%lx memsz 0x%lx "
+ "filesz %lx\n",
+ i, phdr->p_type,
+ (unsigned long) phdr->p_paddr,
+ (unsigned long) phdr->p_memsz,
+ (unsigned long) phdr->p_filesz);
+ if (hook (elf, phdr, hook_arg))
+ break;
+ }
+
+ return grub_errno;
+}
+
+/* Calculate the amount of memory spanned by the segments. */
+grub_size_t
+grub_elf64_size (grub_elf_t elf, Elf64_Addr *base, grub_uint64_t *max_align)
+{
+ Elf64_Addr segments_start = (Elf64_Addr) -1;
+ Elf64_Addr segments_end = 0;
+ int nr_phdrs = 0;
+ grub_uint64_t curr_align = 1;
+
+ /* Run through the program headers to calculate the total memory size we
+ * should claim. */
+ auto int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf, Elf64_Phdr *phdr, void *_arg);
+ int NESTED_FUNC_ATTR calcsize (grub_elf_t _elf __attribute__ ((unused)),
+ Elf64_Phdr *phdr,
+ void *_arg __attribute__ ((unused)))
+ {
+ /* Only consider loadable segments. */
+ if (phdr->p_type != PT_LOAD)
+ return 0;
+ nr_phdrs++;
+ if (phdr->p_paddr < segments_start)
+ segments_start = phdr->p_paddr;
+ if (phdr->p_paddr + phdr->p_memsz > segments_end)
+ segments_end = phdr->p_paddr + phdr->p_memsz;
+ if (curr_align < phdr->p_align)
+ curr_align = phdr->p_align;
+ return 0;
+ }
+
+ grub_elf64_phdr_iterate (elf, calcsize, 0);
+
+ if (base)
+ *base = 0;
+
+ if (nr_phdrs == 0)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "no program headers present");
+ return 0;
+ }
+
+ if (segments_end < segments_start)
+ {
+ /* Very bad addresses. */
+ grub_error (GRUB_ERR_BAD_OS, "bad program header load addresses");
+ return 0;
+ }
+
+ if (base)
+ *base = segments_start;
+ if (max_align)
+ *max_align = curr_align;
+ return segments_end - segments_start;
+}
+
+/* Load every loadable segment into memory specified by `_load_hook'. */
+grub_err_t
+grub_elf64_load (grub_elf_t _elf, grub_elf64_load_hook_t _load_hook,
+ grub_addr_t *base, grub_size_t *size)
+{
+ grub_addr_t load_base = (grub_addr_t) -1ULL;
+ grub_size_t load_size = 0;
+ grub_err_t err;
+
+ auto int NESTED_FUNC_ATTR grub_elf64_load_segment (grub_elf_t elf, Elf64_Phdr *phdr,
+ void *hook);
+ int NESTED_FUNC_ATTR grub_elf64_load_segment (grub_elf_t elf, Elf64_Phdr *phdr, void *hook)
+ {
+ grub_elf64_load_hook_t load_hook = (grub_elf64_load_hook_t) hook;
+ grub_addr_t load_addr;
+ int do_load = 1;
+
+ load_addr = phdr->p_paddr;
+ if (load_hook && load_hook (phdr, &load_addr, &do_load))
+ return 1;
+
+ if (! do_load)
+ return 0;
+
+ if (load_addr < load_base)
+ load_base = load_addr;
+
+ grub_dprintf ("elf", "Loading segment at 0x%llx, size 0x%llx\n",
+ (unsigned long long) load_addr,
+ (unsigned long long) phdr->p_memsz);
+
+ if (grub_file_seek (elf->file, phdr->p_offset) == (grub_off_t) -1)
+ {
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS,
+ "invalid offset in program header");
+ }
+
+ if (phdr->p_filesz)
+ {
+ grub_ssize_t read;
+ read = grub_file_read (elf->file, (void *) load_addr, phdr->p_filesz);
+ if (read != (grub_ssize_t) phdr->p_filesz)
+ {
+ /* XXX How can we free memory from `load_hook'? */
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read segment from file: "
+ "wanted 0x%lx bytes; read 0x%lx bytes",
+ phdr->p_filesz, read);
+ }
+ }
+
+ if (phdr->p_filesz < phdr->p_memsz)
+ grub_memset ((void *) (long) (load_addr + phdr->p_filesz),
+ 0, phdr->p_memsz - phdr->p_filesz);
+
+ load_size += phdr->p_memsz;
+
+ return 0;
+ }
+
+ err = grub_elf64_phdr_iterate (_elf, grub_elf64_load_segment, _load_hook);
+
+ if (base)
+ *base = load_base;
+ if (size)
+ *size = load_size;
+
+ return err;
+}
diff --git a/grub-core/kern/emu/cache.S b/grub-core/kern/emu/cache.S
new file mode 100644
index 0000000..abd81c9
--- /dev/null
+++ b/grub-core/kern/emu/cache.S
@@ -0,0 +1,28 @@
+#ifndef GRUB_MACHINE_EMU
+#error "This source is only meant for grub-emu platform"
+#endif
+
+#if defined(__i386__) || defined(__x86_64__)
+/* Nothing is necessary. */
+#elif defined(__sparc__)
+#include "../sparc64/cache.S"
+#elif defined(__mips__)
+/* On MIPS we must go through standard functions. */
+#include <grub/symbol.h>
+
+FUNCTION (grub_cpu_flush_cache)
+FUNCTION (grub_arch_sync_caches)
+ .set nomacro
+ .set noreorder
+ lui $t0, %hi(_flush_cache)
+ addui $t0, $t0, %lo(_flush_cache)
+ move $a3, $zero
+ jr $t0
+ nop
+ .set reorder
+ .set macro
+#elif defined(__powerpc__)
+#include "../powerpc/cache.S"
+#else
+#error "No target cpu type is defined"
+#endif
diff --git a/grub-core/kern/emu/console.c b/grub-core/kern/emu/console.c
new file mode 100644
index 0000000..7fd1fc0
--- /dev/null
+++ b/grub-core/kern/emu/console.c
@@ -0,0 +1,293 @@
+/* console.c -- Ncurses console for GRUB. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <config-util.h>
+
+/* For compatibility. */
+#ifndef A_NORMAL
+# define A_NORMAL 0
+#endif /* ! A_NORMAL */
+#ifndef A_STANDOUT
+# define A_STANDOUT 0
+#endif /* ! A_STANDOUT */
+
+#include <grub/emu/console.h>
+#include <grub/term.h>
+#include <grub/types.h>
+
+#if defined(HAVE_NCURSES_CURSES_H)
+# include <ncurses/curses.h>
+#elif defined(HAVE_NCURSES_H)
+# include <ncurses.h>
+#elif defined(HAVE_CURSES_H)
+# include <curses.h>
+#else
+#error What the hell?
+#endif
+
+static int grub_console_attr = A_NORMAL;
+
+grub_uint8_t grub_console_cur_color = 7;
+
+static const grub_uint8_t grub_console_standard_color = 0x7;
+
+#define NUM_COLORS 8
+
+static grub_uint8_t color_map[NUM_COLORS] =
+{
+ COLOR_BLACK,
+ COLOR_BLUE,
+ COLOR_GREEN,
+ COLOR_CYAN,
+ COLOR_RED,
+ COLOR_MAGENTA,
+ COLOR_YELLOW,
+ COLOR_WHITE
+};
+
+static int use_color;
+
+static void
+grub_ncurses_putchar (struct grub_term_output *term __attribute__ ((unused)),
+ const struct grub_unicode_glyph *c)
+{
+ addch (c->base | grub_console_attr);
+}
+
+static void
+grub_ncurses_setcolorstate (struct grub_term_output *term,
+ grub_term_color_state state)
+{
+ switch (state)
+ {
+ case GRUB_TERM_COLOR_STANDARD:
+ grub_console_cur_color = grub_console_standard_color;
+ grub_console_attr = A_NORMAL;
+ break;
+ case GRUB_TERM_COLOR_NORMAL:
+ grub_console_cur_color = term->normal_color;
+ grub_console_attr = A_NORMAL;
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ grub_console_cur_color = term->highlight_color;
+ grub_console_attr = A_STANDOUT;
+ break;
+ default:
+ break;
+ }
+
+ if (use_color)
+ {
+ grub_uint8_t fg, bg;
+
+ fg = (grub_console_cur_color & 7);
+ bg = (grub_console_cur_color >> 4) & 7;
+
+ grub_console_attr = (grub_console_cur_color & 8) ? A_BOLD : A_NORMAL;
+ color_set ((bg << 3) + fg, 0);
+ }
+}
+
+static int
+grub_ncurses_getkey (struct grub_term_input *term __attribute__ ((unused)))
+{
+ int c;
+
+ wtimeout (stdscr, 100);
+ c = getch ();
+
+ switch (c)
+ {
+ case ERR:
+ return -1;
+ case KEY_LEFT:
+ c = GRUB_TERM_KEY_LEFT;
+ break;
+
+ case KEY_RIGHT:
+ c = GRUB_TERM_KEY_RIGHT;
+ break;
+
+ case KEY_UP:
+ c = GRUB_TERM_KEY_UP;
+ break;
+
+ case KEY_DOWN:
+ c = GRUB_TERM_KEY_DOWN;
+ break;
+
+ case KEY_IC:
+ c = 24;
+ break;
+
+ case KEY_DC:
+ c = GRUB_TERM_KEY_DC;
+ break;
+
+ case KEY_BACKSPACE:
+ /* XXX: For some reason ncurses on xterm does not return
+ KEY_BACKSPACE. */
+ case 127:
+ c = '\b';
+ break;
+
+ case KEY_HOME:
+ c = GRUB_TERM_KEY_HOME;
+ break;
+
+ case KEY_END:
+ c = GRUB_TERM_KEY_END;
+ break;
+
+ case KEY_NPAGE:
+ c = GRUB_TERM_KEY_NPAGE;
+ break;
+
+ case KEY_PPAGE:
+ c = GRUB_TERM_KEY_PPAGE;
+ break;
+ }
+
+ return c;
+}
+
+static grub_uint16_t
+grub_ncurses_getxy (struct grub_term_output *term __attribute__ ((unused)))
+{
+ int x;
+ int y;
+
+ getyx (stdscr, y, x);
+
+ return (x << 8) | y;
+}
+
+static grub_uint16_t
+grub_ncurses_getwh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ int x;
+ int y;
+
+ getmaxyx (stdscr, y, x);
+
+ return (x << 8) | y;
+}
+
+static void
+grub_ncurses_gotoxy (struct grub_term_output *term __attribute__ ((unused)),
+ grub_uint8_t x, grub_uint8_t y)
+{
+ move (y, x);
+}
+
+static void
+grub_ncurses_cls (struct grub_term_output *term __attribute__ ((unused)))
+{
+ clear ();
+ refresh ();
+}
+
+static void
+grub_ncurses_setcursor (struct grub_term_output *term __attribute__ ((unused)),
+ int on)
+{
+ curs_set (on ? 1 : 0);
+}
+
+static void
+grub_ncurses_refresh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ refresh ();
+}
+
+static grub_err_t
+grub_ncurses_init (struct grub_term_output *term __attribute__ ((unused)))
+{
+ initscr ();
+ raw ();
+ noecho ();
+ scrollok (stdscr, TRUE);
+
+ nonl ();
+ intrflush (stdscr, FALSE);
+ keypad (stdscr, TRUE);
+
+ if (has_colors ())
+ {
+ start_color ();
+
+ if ((COLORS >= NUM_COLORS) && (COLOR_PAIRS >= NUM_COLORS * NUM_COLORS))
+ {
+ int i, j, n;
+
+ n = 0;
+ for (i = 0; i < NUM_COLORS; i++)
+ for (j = 0; j < NUM_COLORS; j++)
+ init_pair(n++, color_map[j], color_map[i]);
+
+ use_color = 1;
+ }
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_ncurses_fini (struct grub_term_output *term __attribute__ ((unused)))
+{
+ endwin ();
+ return 0;
+}
+
+
+static struct grub_term_input grub_ncurses_term_input =
+ {
+ .name = "console",
+ .getkey = grub_ncurses_getkey,
+ };
+
+static struct grub_term_output grub_ncurses_term_output =
+ {
+ .name = "console",
+ .init = grub_ncurses_init,
+ .fini = grub_ncurses_fini,
+ .putchar = grub_ncurses_putchar,
+ .getxy = grub_ncurses_getxy,
+ .getwh = grub_ncurses_getwh,
+ .gotoxy = grub_ncurses_gotoxy,
+ .cls = grub_ncurses_cls,
+ .setcolorstate = grub_ncurses_setcolorstate,
+ .setcursor = grub_ncurses_setcursor,
+ .refresh = grub_ncurses_refresh,
+ .flags = GRUB_TERM_CODE_TYPE_ASCII
+ };
+
+void
+grub_console_init (void)
+{
+ grub_term_register_output ("console", &grub_ncurses_term_output);
+ grub_term_register_input ("console", &grub_ncurses_term_input);
+}
+
+void
+grub_console_fini (void)
+{
+ grub_ncurses_fini (&grub_ncurses_term_output);
+}
diff --git a/grub-core/kern/emu/full.c b/grub-core/kern/emu/full.c
new file mode 100644
index 0000000..70bcae7
--- /dev/null
+++ b/grub-core/kern/emu/full.c
@@ -0,0 +1,71 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+#include <grub/kernel.h>
+#include <grub/misc.h>
+#include <grub/emu/misc.h>
+#include <grub/disk.h>
+
+void
+grub_register_exported_symbols (void)
+{
+}
+
+grub_err_t
+grub_arch_dl_check_header (void *ehdr)
+{
+ (void) ehdr;
+ return GRUB_ERR_BAD_MODULE;
+}
+
+grub_err_t
+grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
+{
+ (void) mod;
+ (void) ehdr;
+ return GRUB_ERR_BAD_MODULE;
+}
+
+void
+grub_emu_init (void)
+{
+ grub_no_autoload = 1;
+}
+
+#ifdef GRUB_LINKER_HAVE_INIT
+void
+grub_arch_dl_init_linker (void)
+{
+}
+#endif
+
+void
+grub_emu_post_init (void)
+{
+ grub_lvm_fini ();
+ grub_mdraid09_fini ();
+ grub_mdraid1x_fini ();
+ grub_raid_fini ();
+ grub_raid_init ();
+ grub_mdraid09_init ();
+ grub_mdraid1x_init ();
+ grub_lvm_init ();
+}
diff --git a/grub-core/kern/emu/getroot.c b/grub-core/kern/emu/getroot.c
new file mode 100644
index 0000000..a274f3c
--- /dev/null
+++ b/grub-core/kern/emu/getroot.c
@@ -0,0 +1,932 @@
+/* getroot.c - Get root device */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config-util.h>
+#include <config.h>
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <dirent.h>
+#include <errno.h>
+#include <error.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <grub/util/misc.h>
+
+#ifdef __GNU__
+#include <hurd.h>
+#include <hurd/lookup.h>
+#include <hurd/fs.h>
+#include <sys/mman.h>
+#endif
+
+#ifdef __linux__
+# include <sys/types.h>
+# include <sys/wait.h>
+#endif
+
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+# include <grub/util/libzfs.h>
+# include <grub/util/libnvpair.h>
+#endif
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/emu/misc.h>
+#include <grub/emu/hostdisk.h>
+#include <grub/emu/getroot.h>
+
+static void
+strip_extra_slashes (char *dir)
+{
+ char *p = dir;
+
+ while ((p = strchr (p, '/')) != 0)
+ {
+ if (p[1] == '/')
+ {
+ memmove (p, p + 1, strlen (p));
+ continue;
+ }
+ else if (p[1] == '\0')
+ {
+ if (p > dir)
+ p[0] = '\0';
+ break;
+ }
+
+ p++;
+ }
+}
+
+static char *
+xgetcwd (void)
+{
+ size_t size = 10;
+ char *path;
+
+ path = xmalloc (size);
+ while (! getcwd (path, size))
+ {
+ size <<= 1;
+ path = xrealloc (path, size);
+ }
+
+ return path;
+}
+
+#ifdef __linux__
+
+struct mountinfo_entry
+{
+ int id;
+ int major, minor;
+ char enc_root[PATH_MAX], enc_path[PATH_MAX];
+ char fstype[PATH_MAX], device[PATH_MAX];
+};
+
+/* Statting something on a btrfs filesystem always returns a virtual device
+ major/minor pair rather than the real underlying device, because btrfs
+ can span multiple underlying devices (and even if it's currently only
+ using a single device it can be dynamically extended onto another). We
+ can't deal with the multiple-device case yet, but in the meantime, we can
+ at least cope with the single-device case by scanning
+ /proc/self/mountinfo. */
+char *
+grub_find_root_device_from_mountinfo (const char *dir, char **relroot)
+{
+ FILE *fp;
+ char *buf = NULL;
+ size_t len = 0;
+ char *ret = NULL;
+ int entry_len = 0, entry_max = 4;
+ struct mountinfo_entry *entries;
+ struct mountinfo_entry parent_entry = { 0, 0, 0, "", "", "", "" };
+ int i;
+
+ if (! *dir)
+ dir = "/";
+ if (relroot)
+ *relroot = NULL;
+
+ fp = fopen ("/proc/self/mountinfo", "r");
+ if (! fp)
+ return NULL; /* fall through to other methods */
+
+ entries = xmalloc (entry_max * sizeof (*entries));
+
+ /* First, build a list of relevant visible mounts. */
+ while (getline (&buf, &len, fp) > 0)
+ {
+ struct mountinfo_entry entry;
+ int count;
+ size_t enc_path_len;
+ const char *sep;
+
+ if (sscanf (buf, "%d %d %u:%u %s %s%n",
+ &entry.id, &parent_entry.id, &entry.major, &entry.minor,
+ entry.enc_root, entry.enc_path, &count) < 6)
+ continue;
+
+ enc_path_len = strlen (entry.enc_path);
+ /* Check that enc_path is a prefix of dir. The prefix must either be
+ the entire string, or end with a slash, or be immediately followed
+ by a slash. */
+ if (strncmp (dir, entry.enc_path, enc_path_len) != 0 ||
+ (enc_path_len && dir[enc_path_len - 1] != '/' &&
+ dir[enc_path_len] && dir[enc_path_len] != '/'))
+ continue;
+
+ sep = strstr (buf + count, " - ");
+ if (!sep)
+ continue;
+
+ sep += sizeof (" - ") - 1;
+ if (sscanf (sep, "%s %s", entry.fstype, entry.device) != 2)
+ continue;
+
+ /* Using the mount IDs, find out where this fits in the list of
+ visible mount entries we've seen so far. There are three
+ interesting cases. Firstly, it may be inserted at the end: this is
+ the usual case of /foo/bar being mounted after /foo. Secondly, it
+ may be inserted at the start: for example, this can happen for
+ filesystems that are mounted before / and later moved under it.
+ Thirdly, it may occlude part or all of the existing filesystem
+ tree, in which case the end of the list needs to be pruned and this
+ new entry will be inserted at the end. */
+ if (entry_len >= entry_max)
+ {
+ entry_max <<= 1;
+ entries = xrealloc (entries, entry_max * sizeof (*entries));
+ }
+
+ if (!entry_len)
+ {
+ /* Initialise list. */
+ entry_len = 2;
+ entries[0] = parent_entry;
+ entries[1] = entry;
+ }
+ else
+ {
+ for (i = entry_len - 1; i >= 0; i--)
+ {
+ if (entries[i].id == parent_entry.id)
+ {
+ /* Insert at end, pruning anything previously above this. */
+ entry_len = i + 2;
+ entries[i + 1] = entry;
+ break;
+ }
+ else if (i == 0 && entries[i].id == entry.id)
+ {
+ /* Insert at start. */
+ entry_len++;
+ memmove (entries + 1, entries,
+ (entry_len - 1) * sizeof (*entries));
+ entries[0] = parent_entry;
+ entries[1] = entry;
+ break;
+ }
+ }
+ }
+ }
+
+ /* Now scan visible mounts for the ones we're interested in. */
+ for (i = entry_len - 1; i >= 0; i--)
+ {
+ if (!*entries[i].device)
+ continue;
+
+ ret = strdup (entries[i].device);
+ if (relroot)
+ *relroot = strdup (entries[i].enc_root);
+ break;
+ }
+
+ free (buf);
+ free (entries);
+ fclose (fp);
+ return ret;
+}
+
+#endif /* __linux__ */
+
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+static char *
+find_root_device_from_libzfs (const char *dir)
+{
+ char *device = NULL;
+ char *poolname;
+ char *poolfs;
+
+ grub_find_zpool_from_dir (dir, &poolname, &poolfs);
+ if (! poolname)
+ return NULL;
+
+ {
+ zpool_handle_t *zpool;
+ libzfs_handle_t *libzfs;
+ nvlist_t *config, *vdev_tree;
+ nvlist_t **children, **path;
+ unsigned int nvlist_count;
+ unsigned int i;
+
+ libzfs = grub_get_libzfs_handle ();
+ if (! libzfs)
+ return NULL;
+
+ zpool = zpool_open (libzfs, poolname);
+ config = zpool_get_config (zpool, NULL);
+
+ if (nvlist_lookup_nvlist (config, "vdev_tree", &vdev_tree) != 0)
+ error (1, errno, "nvlist_lookup_nvlist (\"vdev_tree\")");
+
+ if (nvlist_lookup_nvlist_array (vdev_tree, "children", &children, &nvlist_count) != 0)
+ error (1, errno, "nvlist_lookup_nvlist_array (\"children\")");
+ assert (nvlist_count > 0);
+
+ while (nvlist_lookup_nvlist_array (children[0], "children",
+ &children, &nvlist_count) == 0)
+ assert (nvlist_count > 0);
+
+ for (i = 0; i < nvlist_count; i++)
+ {
+ if (nvlist_lookup_string (children[i], "path", &device) != 0)
+ error (1, errno, "nvlist_lookup_string (\"path\")");
+
+ struct stat st;
+ if (stat (device, &st) == 0)
+ {
+ device = xstrdup (device);
+ break;
+ }
+
+ device = NULL;
+ }
+
+ zpool_close (zpool);
+ }
+
+ free (poolname);
+ if (poolfs)
+ free (poolfs);
+
+ return device;
+}
+#endif
+
+#ifdef __MINGW32__
+
+char *
+grub_find_device (const char *dir __attribute__ ((unused)),
+ dev_t dev __attribute__ ((unused)))
+{
+ return 0;
+}
+
+#elif ! defined(__CYGWIN__)
+
+char *
+grub_find_device (const char *dir, dev_t dev)
+{
+ DIR *dp;
+ char *saved_cwd;
+ struct dirent *ent;
+
+ if (! dir)
+ {
+#ifdef __CYGWIN__
+ return NULL;
+#else
+ dir = "/dev";
+#endif
+ }
+
+ dp = opendir (dir);
+ if (! dp)
+ return 0;
+
+ saved_cwd = xgetcwd ();
+
+ grub_util_info ("changing current directory to %s", dir);
+ if (chdir (dir) < 0)
+ {
+ free (saved_cwd);
+ closedir (dp);
+ return 0;
+ }
+
+ while ((ent = readdir (dp)) != 0)
+ {
+ struct stat st;
+
+ /* Avoid:
+ - dotfiles (like "/dev/.tmp.md0") since they could be duplicates.
+ - dotdirs (like "/dev/.static") since they could contain duplicates. */
+ if (ent->d_name[0] == '.')
+ continue;
+
+ if (lstat (ent->d_name, &st) < 0)
+ /* Ignore any error. */
+ continue;
+
+ if (S_ISLNK (st.st_mode)) {
+#ifdef __linux__
+ if (strcmp (dir, "mapper") == 0) {
+ /* Follow symbolic links under /dev/mapper/; the canonical name
+ may be something like /dev/dm-0, but the names under
+ /dev/mapper/ are more human-readable and so we prefer them if
+ we can get them. */
+ if (stat (ent->d_name, &st) < 0)
+ continue;
+ } else
+#endif /* __linux__ */
+ /* Don't follow other symbolic links. */
+ continue;
+ }
+
+ if (S_ISDIR (st.st_mode))
+ {
+ /* Find it recursively. */
+ char *res;
+
+ res = grub_find_device (ent->d_name, dev);
+
+ if (res)
+ {
+ if (chdir (saved_cwd) < 0)
+ grub_util_error ("cannot restore the original directory");
+
+ free (saved_cwd);
+ closedir (dp);
+ return res;
+ }
+ }
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
+ if (S_ISCHR (st.st_mode) && st.st_rdev == dev)
+#else
+ if (S_ISBLK (st.st_mode) && st.st_rdev == dev)
+#endif
+ {
+#ifdef __linux__
+ /* Skip device names like /dev/dm-0, which are short-hand aliases
+ to more descriptive device names, e.g. those under /dev/mapper */
+ if (ent->d_name[0] == 'd' &&
+ ent->d_name[1] == 'm' &&
+ ent->d_name[2] == '-' &&
+ ent->d_name[3] >= '0' &&
+ ent->d_name[3] <= '9')
+ continue;
+#endif
+
+ /* Found! */
+ char *res;
+ char *cwd;
+#if defined(__NetBSD__)
+ /* Convert this block device to its character (raw) device. */
+ const char *template = "%s/r%s";
+#else
+ /* Keep the device name as it is. */
+ const char *template = "%s/%s";
+#endif
+
+ cwd = xgetcwd ();
+ res = xmalloc (strlen (cwd) + strlen (ent->d_name) + 3);
+ sprintf (res, template, cwd, ent->d_name);
+ strip_extra_slashes (res);
+ free (cwd);
+
+ /* /dev/root is not a real block device keep looking, takes care
+ of situation where root filesystem is on the same partition as
+ grub files */
+
+ if (strcmp(res, "/dev/root") == 0)
+ continue;
+
+ if (chdir (saved_cwd) < 0)
+ grub_util_error ("cannot restore the original directory");
+
+ free (saved_cwd);
+ closedir (dp);
+ return res;
+ }
+ }
+
+ if (chdir (saved_cwd) < 0)
+ grub_util_error ("cannot restore the original directory");
+
+ free (saved_cwd);
+ closedir (dp);
+ return 0;
+}
+
+#else /* __CYGWIN__ */
+
+/* Read drive/partition serial number from mbr/boot sector,
+ return 0 on read error, ~0 on unknown serial. */
+static unsigned
+get_bootsec_serial (const char *os_dev, int mbr)
+{
+ /* Read boot sector. */
+ int fd = open (os_dev, O_RDONLY);
+ if (fd < 0)
+ return 0;
+ unsigned char buf[0x200];
+ int n = read (fd, buf, sizeof (buf));
+ close (fd);
+ if (n != sizeof(buf))
+ return 0;
+
+ /* Check signature. */
+ if (!(buf[0x1fe] == 0x55 && buf[0x1ff] == 0xaa))
+ return ~0;
+
+ /* Serial number offset depends on boot sector type. */
+ if (mbr)
+ n = 0x1b8;
+ else if (memcmp (buf + 0x03, "NTFS", 4) == 0)
+ n = 0x048;
+ else if (memcmp (buf + 0x52, "FAT32", 5) == 0)
+ n = 0x043;
+ else if (memcmp (buf + 0x36, "FAT", 3) == 0)
+ n = 0x027;
+ else
+ return ~0;
+
+ unsigned serial = *(unsigned *)(buf + n);
+ if (serial == 0)
+ return ~0;
+ return serial;
+}
+
+char *
+grub_find_device (const char *path, dev_t dev)
+{
+ /* No root device for /cygdrive. */
+ if (dev == (DEV_CYGDRIVE_MAJOR << 16))
+ return 0;
+
+ /* Convert to full POSIX and Win32 path. */
+ char fullpath[PATH_MAX], winpath[PATH_MAX];
+ cygwin_conv_to_full_posix_path (path, fullpath);
+ cygwin_conv_to_full_win32_path (fullpath, winpath);
+
+ /* If identical, this is no real filesystem path. */
+ if (strcmp (fullpath, winpath) == 0)
+ return 0;
+
+ /* Check for floppy drive letter. */
+ if (winpath[0] && winpath[1] == ':' && strchr ("AaBb", winpath[0]))
+ return xstrdup (strchr ("Aa", winpath[0]) ? "/dev/fd0" : "/dev/fd1");
+
+ /* Cygwin returns the partition serial number in stat.st_dev.
+ This is never identical to the device number of the emulated
+ /dev/sdXN device, so above grub_find_device () does not work.
+ Search the partition with the same serial in boot sector instead. */
+ char devpath[sizeof ("/dev/sda15") + 13]; /* Size + Paranoia. */
+ int d;
+ for (d = 'a'; d <= 'z'; d++)
+ {
+ sprintf (devpath, "/dev/sd%c", d);
+ if (get_bootsec_serial (devpath, 1) == 0)
+ continue;
+ int p;
+ for (p = 1; p <= 15; p++)
+ {
+ sprintf (devpath, "/dev/sd%c%d", d, p);
+ unsigned ser = get_bootsec_serial (devpath, 0);
+ if (ser == 0)
+ break;
+ if (ser != (unsigned)~0 && dev == (dev_t)ser)
+ return xstrdup (devpath);
+ }
+ }
+ return 0;
+}
+
+#endif /* __CYGWIN__ */
+
+char *
+grub_guess_root_device (const char *dir)
+{
+ char *os_dev = NULL;
+#ifdef __GNU__
+ file_t file;
+ mach_port_t *ports;
+ int *ints;
+ loff_t *offsets;
+ char *data;
+ error_t err;
+ mach_msg_type_number_t num_ports = 0, num_ints = 0, num_offsets = 0, data_len = 0;
+ size_t name_len;
+
+ file = file_name_lookup (dir, 0, 0);
+ if (file == MACH_PORT_NULL)
+ return 0;
+
+ err = file_get_storage_info (file,
+ &ports, &num_ports,
+ &ints, &num_ints,
+ &offsets, &num_offsets,
+ &data, &data_len);
+
+ if (num_ints < 1)
+ grub_util_error ("Storage info for `%s' does not include type", dir);
+ if (ints[0] != STORAGE_DEVICE)
+ grub_util_error ("Filesystem of `%s' is not stored on local disk", dir);
+
+ if (num_ints < 5)
+ grub_util_error ("Storage info for `%s' does not include name", dir);
+ name_len = ints[4];
+ if (name_len < data_len)
+ grub_util_error ("Bogus name length for storage info for `%s'", dir);
+ if (data[name_len - 1] != '\0')
+ grub_util_error ("Storage name for `%s' not NUL-terminated", dir);
+
+ os_dev = xmalloc (strlen ("/dev/") + data_len);
+ memcpy (os_dev, "/dev/", strlen ("/dev/"));
+ memcpy (os_dev + strlen ("/dev/"), data, data_len);
+
+ if (ports && num_ports > 0)
+ {
+ mach_msg_type_number_t i;
+ for (i = 0; i < num_ports; i++)
+ {
+ mach_port_t port = ports[i];
+ if (port != MACH_PORT_NULL)
+ mach_port_deallocate (mach_task_self(), port);
+ }
+ munmap ((caddr_t) ports, num_ports * sizeof (*ports));
+ }
+
+ if (ints && num_ints > 0)
+ munmap ((caddr_t) ints, num_ints * sizeof (*ints));
+ if (offsets && num_offsets > 0)
+ munmap ((caddr_t) offsets, num_offsets * sizeof (*offsets));
+ if (data && data_len > 0)
+ munmap (data, data_len);
+ mach_port_deallocate (mach_task_self (), file);
+#else /* !__GNU__ */
+ struct stat st;
+ dev_t dev;
+
+#ifdef __linux__
+ if (!os_dev)
+ os_dev = grub_find_root_device_from_mountinfo (dir, NULL);
+#endif /* __linux__ */
+
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+ if (!os_dev)
+ os_dev = find_root_device_from_libzfs (dir);
+#endif
+
+ if (os_dev)
+ {
+ if (stat (os_dev, &st) >= 0)
+ dev = st.st_rdev;
+ else
+ grub_util_error ("cannot stat `%s'", os_dev);
+ free (os_dev);
+ }
+ else
+ {
+ if (stat (dir, &st) >= 0)
+ dev = st.st_dev;
+ else
+ grub_util_error ("cannot stat `%s'", dir);
+ }
+
+#ifdef __CYGWIN__
+ /* Cygwin specific function. */
+ os_dev = grub_find_device (dir, dev);
+
+#else
+
+ /* This might be truly slow, but is there any better way? */
+ os_dev = grub_find_device ("/dev", dev);
+#endif
+#endif /* !__GNU__ */
+
+ return os_dev;
+}
+
+static int
+grub_util_is_dmraid (const char *os_dev)
+{
+ if (! strncmp (os_dev, "/dev/mapper/nvidia_", 19))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/isw_", 16))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/hpt37x_", 19))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/hpt45x_", 19))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/via_", 16))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/lsi_", 16))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/pdc_", 16))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/jmicron_", 20))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/asr_", 16))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/sil_", 16))
+ return 1;
+ else if (! strncmp (os_dev, "/dev/mapper/ddf1_", 17))
+ return 1;
+
+ return 0;
+}
+
+int
+grub_util_get_dev_abstraction (const char *os_dev __attribute__((unused)))
+{
+#ifdef __linux__
+ /* User explicitly claims that this drive is visible by BIOS. */
+ if (grub_util_biosdisk_is_present (os_dev))
+ return GRUB_DEV_ABSTRACTION_NONE;
+
+ /* Check for LVM. */
+ if (!strncmp (os_dev, "/dev/mapper/", 12)
+ && ! grub_util_is_dmraid (os_dev)
+ && strncmp (os_dev, "/dev/mapper/mpath", 17) != 0)
+ return GRUB_DEV_ABSTRACTION_LVM;
+
+ /* Check for RAID. */
+ if (!strncmp (os_dev, "/dev/md", 7))
+ return GRUB_DEV_ABSTRACTION_RAID;
+#endif
+
+ /* No abstraction found. */
+ return GRUB_DEV_ABSTRACTION_NONE;
+}
+
+#ifdef __linux__
+static char *
+get_mdadm_uuid (const char *os_dev)
+{
+ int mdadm_pipe[2];
+ pid_t mdadm_pid;
+ char *name = NULL;
+
+ if (pipe (mdadm_pipe) < 0)
+ {
+ grub_util_warn ("Unable to create pipe for mdadm: %s", strerror (errno));
+ return NULL;
+ }
+
+ mdadm_pid = fork ();
+ if (mdadm_pid < 0)
+ grub_util_warn ("Unable to fork mdadm: %s", strerror (errno));
+ else if (mdadm_pid == 0)
+ {
+ /* Child. */
+ char *argv[5];
+
+ close (mdadm_pipe[0]);
+ dup2 (mdadm_pipe[1], STDOUT_FILENO);
+ close (mdadm_pipe[1]);
+
+ /* execvp has inconvenient types, hence the casts. None of these
+ strings will actually be modified. */
+ argv[0] = (char *) "mdadm";
+ argv[1] = (char *) "--detail";
+ argv[2] = (char *) "--export";
+ argv[3] = (char *) os_dev;
+ argv[4] = NULL;
+ execvp ("mdadm", argv);
+ exit (127);
+ }
+ else
+ {
+ /* Parent. Read mdadm's output. */
+ FILE *mdadm;
+ char *buf = NULL;
+ size_t len = 0;
+
+ close (mdadm_pipe[1]);
+ mdadm = fdopen (mdadm_pipe[0], "r");
+ if (! mdadm)
+ {
+ grub_util_warn ("Unable to open stream from mdadm: %s",
+ strerror (errno));
+ goto out;
+ }
+
+ while (getline (&buf, &len, mdadm) > 0)
+ {
+ if (strncmp (buf, "MD_UUID=", sizeof ("MD_UUID=") - 1) == 0)
+ {
+ char *name_start, *ptri, *ptro;
+ size_t name_len;
+
+ free (name);
+ name_start = buf + sizeof ("MD_UUID=") - 1;
+ ptro = name = xmalloc (strlen (name_start) + 1);
+ for (ptri = name_start; *ptri && *ptri != '\n' && *ptri != '\r';
+ ptri++)
+ if ((*ptri >= '0' && *ptri <= '9')
+ || (*ptri >= 'a' && *ptri <= 'f')
+ || (*ptri >= 'A' && *ptri <= 'F'))
+ *ptro++ = *ptri;
+ *ptro = 0;
+ }
+ }
+
+out:
+ close (mdadm_pipe[0]);
+ waitpid (mdadm_pid, NULL, 0);
+ }
+
+ return name;
+}
+#endif /* __linux__ */
+
+char *
+grub_util_get_grub_dev (const char *os_dev)
+{
+ char *grub_dev = NULL;
+
+ switch (grub_util_get_dev_abstraction (os_dev))
+ {
+ case GRUB_DEV_ABSTRACTION_LVM:
+
+ {
+ unsigned short i, len;
+ grub_size_t offset = sizeof ("/dev/mapper/") - 1;
+
+ len = strlen (os_dev) - offset + 1;
+ grub_dev = xmalloc (len);
+
+ for (i = 0; i < len; i++, offset++)
+ {
+ grub_dev[i] = os_dev[offset];
+ if (os_dev[offset] == '-' && os_dev[offset + 1] == '-')
+ offset++;
+ }
+ }
+
+ break;
+
+ case GRUB_DEV_ABSTRACTION_RAID:
+
+ if (os_dev[7] == '_' && os_dev[8] == 'd')
+ {
+ /* This a partitionable RAID device of the form /dev/md_dNNpMM. */
+
+ char *p, *q;
+
+ p = strdup (os_dev + sizeof ("/dev/md_d") - 1);
+
+ q = strchr (p, 'p');
+ if (q)
+ *q = ',';
+
+ grub_dev = xasprintf ("md%s", p);
+ free (p);
+ }
+ else if (os_dev[7] == '/' && os_dev[8] == 'd')
+ {
+ /* This a partitionable RAID device of the form /dev/md/dNNpMM. */
+
+ char *p, *q;
+
+ p = strdup (os_dev + sizeof ("/dev/md/d") - 1);
+
+ q = strchr (p, 'p');
+ if (q)
+ *q = ',';
+
+ grub_dev = xasprintf ("md%s", p);
+ free (p);
+ }
+ else if (os_dev[7] >= '0' && os_dev[7] <= '9')
+ {
+ char *p , *q;
+
+ p = strdup (os_dev + sizeof ("/dev/md") - 1);
+
+ q = strchr (p, 'p');
+ if (q)
+ *q = ',';
+
+ grub_dev = xasprintf ("md%s", p);
+ free (p);
+ }
+ else if (os_dev[7] == '/' && os_dev[8] >= '0' && os_dev[8] <= '9')
+ {
+ char *p , *q;
+
+ p = strdup (os_dev + sizeof ("/dev/md/") - 1);
+
+ q = strchr (p, 'p');
+ if (q)
+ *q = ',';
+
+ grub_dev = xasprintf ("md%s", p);
+ free (p);
+ }
+ else if (os_dev[7] == '/')
+ {
+ /* mdraid 1.x with a free name. */
+ char *p , *q;
+
+ p = strdup (os_dev + sizeof ("/dev/md/") - 1);
+
+ q = strchr (p, 'p');
+ if (q)
+ *q = ',';
+
+ grub_dev = xasprintf ("md/%s", p);
+ free (p);
+ }
+ else
+ grub_util_error ("unknown kind of RAID device `%s'", os_dev);
+
+#ifdef __linux__
+ {
+ char *mdadm_name = get_mdadm_uuid (os_dev);
+ struct stat st;
+
+ if (mdadm_name)
+ {
+ const char *q;
+
+ for (q = os_dev + strlen (os_dev) - 1; q >= os_dev
+ && grub_isdigit (*q); q--);
+
+ if (q >= os_dev && *q == 'p')
+ {
+ free (grub_dev);
+ grub_dev = xasprintf ("mduuid/%s,%s", mdadm_name, q + 1);
+ goto done;
+ }
+ free (grub_dev);
+ grub_dev = xasprintf ("mduuid/%s", mdadm_name);
+
+ done:
+ free (mdadm_name);
+ }
+ }
+#endif /* __linux__ */
+
+ break;
+
+ default: /* GRUB_DEV_ABSTRACTION_NONE */
+ grub_dev = grub_util_biosdisk_get_grub_dev (os_dev);
+ }
+
+ return grub_dev;
+}
+
+const char *
+grub_util_check_block_device (const char *blk_dev)
+{
+ struct stat st;
+
+ if (stat (blk_dev, &st) < 0)
+ grub_util_error ("cannot stat `%s'", blk_dev);
+
+ if (S_ISBLK (st.st_mode))
+ return (blk_dev);
+ else
+ return 0;
+}
+
+const char *
+grub_util_check_char_device (const char *blk_dev)
+{
+ struct stat st;
+
+ if (stat (blk_dev, &st) < 0)
+ grub_util_error ("cannot stat `%s'", blk_dev);
+
+ if (S_ISCHR (st.st_mode))
+ return (blk_dev);
+ else
+ return 0;
+}
diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c
new file mode 100644
index 0000000..feb2a8f
--- /dev/null
+++ b/grub-core/kern/emu/hostdisk.c
@@ -0,0 +1,1776 @@
+/* hostdisk.c - emulate biosdisk */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/msdos_partition.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/emu/misc.h>
+#include <grub/emu/hostdisk.h>
+#include <grub/misc.h>
+#include <grub/i18n.h>
+#include <grub/list.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <limits.h>
+
+#ifdef __linux__
+# include <sys/ioctl.h> /* ioctl */
+# if !defined(__GLIBC__) || \
+ ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
+/* Maybe libc doesn't have large file support. */
+# include <linux/unistd.h> /* _llseek */
+# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
+# ifndef BLKFLSBUF
+# define BLKFLSBUF _IO (0x12,97) /* flush buffer cache */
+# endif /* ! BLKFLSBUF */
+# include <sys/ioctl.h> /* ioctl */
+# ifndef HDIO_GETGEO
+# define HDIO_GETGEO 0x0301 /* get device geometry */
+/* If HDIO_GETGEO is not defined, it is unlikely that hd_geometry is
+ defined. */
+struct hd_geometry
+{
+ unsigned char heads;
+ unsigned char sectors;
+ unsigned short cylinders;
+ unsigned long start;
+};
+# endif /* ! HDIO_GETGEO */
+# ifndef BLKGETSIZE64
+# define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size */
+# endif /* ! BLKGETSIZE64 */
+# ifndef MAJOR
+# ifndef MINORBITS
+# define MINORBITS 8
+# endif /* ! MINORBITS */
+# define MAJOR(dev) ((unsigned) ((dev) >> MINORBITS))
+# endif /* ! MAJOR */
+# ifndef FLOPPY_MAJOR
+# define FLOPPY_MAJOR 2
+# endif /* ! FLOPPY_MAJOR */
+# ifndef LOOP_MAJOR
+# define LOOP_MAJOR 7
+# endif /* ! LOOP_MAJOR */
+#endif /* __linux__ */
+
+#ifdef __CYGWIN__
+# include <sys/ioctl.h>
+# include <cygwin/fs.h> /* BLKGETSIZE64 */
+# include <cygwin/hdreg.h> /* HDIO_GETGEO */
+# define MAJOR(dev) ((unsigned) ((dev) >> 16))
+# define FLOPPY_MAJOR 2
+#endif
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+# include <sys/disk.h> /* DIOCGMEDIASIZE */
+# include <sys/param.h>
+# include <sys/sysctl.h>
+# define MAJOR(dev) major(dev)
+# define FLOPPY_MAJOR 2
+#endif
+
+#if defined(__APPLE__)
+# include <sys/disk.h>
+#endif
+
+#ifdef HAVE_DEVICE_MAPPER
+# include <libdevmapper.h>
+#endif
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <libgeom.h>
+#elif defined(__NetBSD__)
+# define HAVE_DIOCGDINFO
+# include <sys/ioctl.h>
+# include <sys/disklabel.h> /* struct disklabel */
+#else /* !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) */
+# undef HAVE_DIOCGDINFO
+#endif /* defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) */
+
+#if defined(__NetBSD__)
+# ifdef HAVE_GETRAWPARTITION
+# include <util.h> /* getrawpartition */
+# endif /* HAVE_GETRAWPARTITION */
+# include <sys/fdio.h>
+# ifndef FLOPPY_MAJOR
+# define FLOPPY_MAJOR 2
+# endif /* ! FLOPPY_MAJOR */
+# ifndef RAW_FLOPPY_MAJOR
+# define RAW_FLOPPY_MAJOR 9
+# endif /* ! RAW_FLOPPY_MAJOR */
+#endif /* defined(__NetBSD__) */
+
+struct
+{
+ char *drive;
+ char *device;
+} map[256];
+
+struct grub_util_biosdisk_data
+{
+ char *dev;
+ int access_mode;
+ int fd;
+ int is_disk;
+};
+
+#ifdef __linux__
+/* Check if we have devfs support. */
+static int
+have_devfs (void)
+{
+ static int dev_devfsd_exists = -1;
+
+ if (dev_devfsd_exists < 0)
+ {
+ struct stat st;
+
+ dev_devfsd_exists = stat ("/dev/.devfsd", &st) == 0;
+ }
+
+ return dev_devfsd_exists;
+}
+#endif /* __linux__ */
+
+#if defined(__NetBSD__)
+/* Adjust device driver parameters. This function should be called just
+ after successfully opening the device. For now, it simply prevents the
+ floppy driver from retrying operations on failure, as otherwise the
+ driver takes a while to abort when there is no floppy in the drive. */
+static void
+configure_device_driver (int fd)
+{
+ struct stat st;
+
+ if (fstat (fd, &st) < 0 || ! S_ISCHR (st.st_mode))
+ return;
+ if (major(st.st_rdev) == RAW_FLOPPY_MAJOR)
+ {
+ int floppy_opts;
+
+ if (ioctl (fd, FDIOCGETOPTS, &floppy_opts) == -1)
+ return;
+ floppy_opts |= FDOPT_NORETRY;
+ if (ioctl (fd, FDIOCSETOPTS, &floppy_opts) == -1)
+ return;
+ }
+}
+#endif /* defined(__NetBSD__) */
+
+static int
+find_grub_drive (const char *name)
+{
+ unsigned int i;
+
+ if (name)
+ {
+ for (i = 0; i < ARRAY_SIZE (map); i++)
+ if (map[i].drive && ! strcmp (map[i].drive, name))
+ return i;
+ }
+
+ return -1;
+}
+
+static int
+find_free_slot (void)
+{
+ unsigned int i;
+
+ for (i = 0; i < sizeof (map) / sizeof (map[0]); i++)
+ if (! map[i].drive)
+ return i;
+
+ return -1;
+}
+
+static int
+grub_util_biosdisk_iterate (int (*hook) (const char *name))
+{
+ unsigned i;
+
+ for (i = 0; i < sizeof (map) / sizeof (map[0]); i++)
+ if (map[i].drive && hook (map[i].drive))
+ return 1;
+
+ return 0;
+}
+
+static grub_err_t
+grub_util_biosdisk_open (const char *name, grub_disk_t disk)
+{
+ int drive;
+ struct stat st;
+ struct grub_util_biosdisk_data *data;
+
+ drive = find_grub_drive (name);
+ if (drive < 0)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "no mapping exists for `%s'", name);
+
+ disk->id = drive;
+ disk->data = data = xmalloc (sizeof (struct grub_util_biosdisk_data));
+ data->dev = NULL;
+ data->access_mode = 0;
+ data->fd = -1;
+ data->is_disk = 0;
+
+ /* Get the size. */
+#if defined(__MINGW32__)
+ {
+ grub_uint64_t size;
+
+ size = grub_util_get_disk_size (map[drive].device);
+
+ if (size % 512)
+ grub_util_error ("unaligned device size");
+
+ disk->total_sectors = size >> 9;
+
+ grub_util_info ("the size of %s is %llu", name, disk->total_sectors);
+
+ return GRUB_ERR_NONE;
+ }
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
+ defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__NetBSD__)
+ {
+# if defined(__NetBSD__)
+ struct disklabel label;
+# else
+ unsigned long long nr;
+# endif
+ int fd;
+
+ fd = open (map[drive].device, O_RDONLY);
+ if (fd == -1)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot open `%s' while attempting to get disk size", map[drive].device);
+
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__NetBSD__)
+ if (fstat (fd, &st) < 0 || ! S_ISCHR (st.st_mode))
+# else
+ if (fstat (fd, &st) < 0 || ! S_ISBLK (st.st_mode))
+# endif
+ {
+ close (fd);
+ goto fail;
+ }
+ data->is_disk = 1;
+
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ if (ioctl (fd, DIOCGMEDIASIZE, &nr))
+# elif defined(__APPLE__)
+ if (ioctl (fd, DKIOCGETBLOCKCOUNT, &nr))
+# elif defined(__NetBSD__)
+ configure_device_driver (fd);
+ if (ioctl (fd, DIOCGDINFO, &label) == -1)
+# else
+ if (ioctl (fd, BLKGETSIZE64, &nr))
+# endif
+ {
+ close (fd);
+ goto fail;
+ }
+
+ close (fd);
+
+# if defined (__APPLE__)
+ disk->total_sectors = nr;
+# elif defined(__NetBSD__)
+ disk->total_sectors = label.d_secperunit;
+# else
+ disk->total_sectors = nr / 512;
+
+ if (nr % 512)
+ grub_util_error ("unaligned device size");
+# endif
+
+ grub_util_info ("the size of %s is %llu", name, disk->total_sectors);
+
+ return GRUB_ERR_NONE;
+ }
+
+ fail:
+ /* In GNU/Hurd, stat() will return the right size. */
+#elif !defined (__GNU__)
+# warning "No special routine to get the size of a block device is implemented for your OS. This is not possibly fatal."
+#endif
+ if (stat (map[drive].device, &st) < 0)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot stat `%s'", map[drive].device);
+
+ disk->total_sectors = st.st_size >> GRUB_DISK_SECTOR_BITS;
+
+ grub_util_info ("the size of %s is %lu", name, disk->total_sectors);
+
+ return GRUB_ERR_NONE;
+}
+
+#ifdef HAVE_DEVICE_MAPPER
+static int
+device_is_mapped (const char *dev)
+{
+ struct stat st;
+
+ if (stat (dev, &st) < 0)
+ return 0;
+
+ return dm_is_dm_major (major (st.st_rdev));
+}
+#endif /* HAVE_DEVICE_MAPPER */
+
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
+/* FIXME: geom actually gives us the whole container hierarchy.
+ It can be used more efficiently than this. */
+static void
+follow_geom_up (const char *name, grub_disk_addr_t *off_out, char **name_out)
+{
+ struct gmesh mesh;
+ struct gclass *class;
+ int error;
+ struct ggeom *geom;
+
+ grub_util_info ("following geom '%s'", name);
+
+ error = geom_gettree (&mesh);
+ if (error != 0)
+ grub_util_error ("couldn't open geom");
+
+ LIST_FOREACH (class, &mesh.lg_class, lg_class)
+ if (strcasecmp (class->lg_name, "part") == 0)
+ break;
+ if (!class)
+ grub_util_error ("couldn't open geom part");
+
+ LIST_FOREACH (geom, &class->lg_geom, lg_geom)
+ {
+ struct gprovider *provider;
+ LIST_FOREACH (provider, &geom->lg_provider, lg_provider)
+ if (strcmp (provider->lg_name, name) == 0)
+ {
+ char *name_tmp = xstrdup (geom->lg_name);
+ grub_disk_addr_t off = 0;
+ struct gconfig *config;
+ grub_util_info ("geom '%s' has parent '%s'", name, geom->lg_name);
+
+ follow_geom_up (name_tmp, &off, name_out);
+ free (name_tmp);
+ LIST_FOREACH (config, &provider->lg_config, lg_config)
+ if (strcasecmp (config->lg_name, "start") == 0)
+ off += strtoull (config->lg_val, 0, 10);
+ if (off_out)
+ *off_out = off;
+ return;
+ }
+ }
+ grub_util_info ("geom '%s' has no parent", name);
+ if (name_out)
+ *name_out = xstrdup (name);
+ if (off_out)
+ *off_out = 0;
+}
+
+static grub_disk_addr_t
+find_partition_start (const char *dev)
+{
+ grub_disk_addr_t out;
+ if (strncmp (dev, "/dev/", sizeof ("/dev/") - 1) != 0)
+ return 0;
+ follow_geom_up (dev + sizeof ("/dev/") - 1, &out, NULL);
+
+ return out;
+}
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(HAVE_DIOCGDINFO)
+static grub_disk_addr_t
+find_partition_start (const char *dev)
+{
+ int fd;
+# if !defined(HAVE_DIOCGDINFO)
+ struct hd_geometry hdg;
+# else /* defined(HAVE_DIOCGDINFO) */
+ struct disklabel label;
+ int p_index;
+# endif /* !defined(HAVE_DIOCGDINFO) */
+
+# ifdef HAVE_DEVICE_MAPPER
+ if (grub_device_mapper_supported () && device_is_mapped (dev)) {
+ struct dm_task *task = NULL;
+ grub_uint64_t start, length;
+ char *target_type, *params, *space;
+ grub_disk_addr_t partition_start;
+
+ /* If any device-mapper operation fails, we fall back silently to
+ HDIO_GETGEO. */
+ task = dm_task_create (DM_DEVICE_TABLE);
+ if (! task)
+ {
+ grub_dprintf ("hostdisk", "dm_task_create failed\n");
+ goto devmapper_fail;
+ }
+
+ if (! dm_task_set_name (task, dev))
+ {
+ grub_dprintf ("hostdisk", "dm_task_set_name failed\n");
+ goto devmapper_fail;
+ }
+
+ if (! dm_task_run (task))
+ {
+ grub_dprintf ("hostdisk", "dm_task_run failed\n");
+ goto devmapper_fail;
+ }
+
+ dm_get_next_target (task, NULL, &start, &length, &target_type, &params);
+ if (! target_type)
+ {
+ grub_dprintf ("hostdisk", "no dm target\n");
+ goto devmapper_fail;
+ }
+ if (strcmp (target_type, "linear") != 0)
+ {
+ grub_dprintf ("hostdisk", "ignoring dm target %s (not linear)\n",
+ target_type);
+ goto devmapper_fail;
+ }
+ if (! params)
+ {
+ grub_dprintf ("hostdisk", "no dm params\n");
+ goto devmapper_fail;
+ }
+
+ /* The params string for a linear target looks like this:
+ DEVICE-NAME START-SECTOR
+ Parse this out. */
+ space = strchr (params, ' ');
+ if (! space)
+ goto devmapper_fail;
+ errno = 0;
+ partition_start = strtoull (space + 1, NULL, 10);
+ if (errno == 0)
+ {
+ grub_dprintf ("hostdisk", "dm %s starts at %llu\n",
+ dev, (unsigned long long) partition_start);
+ dm_task_destroy (task);
+ return partition_start;
+ }
+
+devmapper_fail:
+ if (task)
+ dm_task_destroy (task);
+ }
+# endif /* HAVE_DEVICE_MAPPER */
+
+ fd = open (dev, O_RDONLY);
+ if (fd == -1)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE,
+# if !defined(HAVE_DIOCGDINFO)
+ "cannot open `%s' while attempting to get disk geometry", dev);
+# else /* defined(HAVE_DIOCGDINFO) */
+ "cannot open `%s' while attempting to get disk label", dev);
+# endif /* !defined(HAVE_DIOCGDINFO) */
+ return 0;
+ }
+
+# if !defined(HAVE_DIOCGDINFO)
+ if (ioctl (fd, HDIO_GETGEO, &hdg))
+# else /* defined(HAVE_DIOCGDINFO) */
+# if defined(__NetBSD__)
+ configure_device_driver (fd);
+# endif /* defined(__NetBSD__) */
+ if (ioctl (fd, DIOCGDINFO, &label) == -1)
+# endif /* !defined(HAVE_DIOCGDINFO) */
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE,
+# if !defined(HAVE_DIOCGDINFO)
+ "cannot get disk geometry of `%s'", dev);
+# else /* defined(HAVE_DIOCGDINFO) */
+ "cannot get disk label of `%s'", dev);
+# endif /* !defined(HAVE_DIOCGDINFO) */
+ close (fd);
+ return 0;
+ }
+
+ close (fd);
+
+# if !defined(HAVE_DIOCGDINFO)
+ return hdg.start;
+# else /* defined(HAVE_DIOCGDINFO) */
+ if (dev[0])
+ p_index = dev[strlen(dev) - 1] - 'a';
+ else
+ p_index = -1;
+
+ if (p_index >= label.d_npartitions || p_index < 0)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE,
+ "no disk label entry for `%s'", dev);
+ return 0;
+ }
+ return (grub_disk_addr_t) label.d_partitions[p_index].p_offset;
+# endif /* !defined(HAVE_DIOCGDINFO) */
+}
+#endif /* __linux__ || __CYGWIN__ || HAVE_DIOCGDINFO */
+
+#ifdef __linux__
+/* Cache of partition start sectors for each disk. */
+struct linux_partition_cache
+{
+ struct linux_partition_cache *next;
+ char *dev;
+ unsigned long start;
+ int partno;
+};
+
+struct linux_partition_cache *linux_partition_cache_list;
+
+static int
+linux_find_partition (char *dev, grub_disk_addr_t sector)
+{
+ size_t len = strlen (dev);
+ const char *format;
+ char *p;
+ int i;
+ char real_dev[PATH_MAX];
+ struct linux_partition_cache *cache;
+
+ strcpy(real_dev, dev);
+
+ if (have_devfs () && strcmp (real_dev + len - 5, "/disc") == 0)
+ {
+ p = real_dev + len - 4;
+ format = "part%d";
+ }
+ else if (real_dev[len - 1] >= '0' && real_dev[len - 1] <= '9')
+ {
+ p = real_dev + len;
+ format = "p%d";
+ }
+ else
+ {
+ p = real_dev + len;
+ format = "%d";
+ }
+
+ for (cache = linux_partition_cache_list; cache; cache = cache->next)
+ {
+ if (strcmp (cache->dev, dev) == 0 && cache->start == sector)
+ {
+ sprintf (p, format, cache->partno);
+ strcpy (dev, real_dev);
+ return 1;
+ }
+ }
+
+ for (i = 1; i < 10000; i++)
+ {
+ int fd;
+ grub_disk_addr_t start;
+
+ sprintf (p, format, i);
+
+ fd = open (real_dev, O_RDONLY);
+ if (fd == -1)
+ continue;
+ close (fd);
+
+ start = find_partition_start (real_dev);
+ /* We don't care about errors here. */
+ grub_errno = GRUB_ERR_NONE;
+
+ if (start == sector)
+ {
+ struct linux_partition_cache *new_cache_item;
+
+ new_cache_item = xmalloc (sizeof *new_cache_item);
+ new_cache_item->dev = xstrdup (dev);
+ new_cache_item->start = start;
+ new_cache_item->partno = i;
+ grub_list_push (GRUB_AS_LIST_P (&linux_partition_cache_list),
+ GRUB_AS_LIST (new_cache_item));
+
+ strcpy (dev, real_dev);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+#endif /* __linux__ */
+
+static int
+open_device (const grub_disk_t disk, grub_disk_addr_t sector, int flags)
+{
+ int fd;
+ struct grub_util_biosdisk_data *data = disk->data;
+
+#ifdef O_LARGEFILE
+ flags |= O_LARGEFILE;
+#endif
+#ifdef O_SYNC
+ flags |= O_SYNC;
+#endif
+#ifdef O_FSYNC
+ flags |= O_FSYNC;
+#endif
+#ifdef O_BINARY
+ flags |= O_BINARY;
+#endif
+
+#ifdef __linux__
+ /* Linux has a bug that the disk cache for a whole disk is not consistent
+ with the one for a partition of the disk. */
+ {
+ int is_partition = 0;
+ char dev[PATH_MAX];
+ grub_disk_addr_t part_start = 0;
+
+ part_start = grub_partition_get_start (disk->partition);
+
+ strcpy (dev, map[disk->id].device);
+ if (disk->partition && sector >= part_start
+ && strncmp (map[disk->id].device, "/dev/", 5) == 0)
+ is_partition = linux_find_partition (dev, part_start);
+
+ if (data->dev && strcmp (data->dev, dev) == 0 &&
+ data->access_mode == (flags & O_ACCMODE))
+ {
+ grub_dprintf ("hostdisk", "reusing open device `%s'\n", dev);
+ fd = data->fd;
+ }
+ else
+ {
+ free (data->dev);
+ if (data->fd != -1)
+ {
+ if (data->access_mode == O_RDWR || data->access_mode == O_WRONLY)
+ {
+ fsync (data->fd);
+#ifdef __linux__
+ if (data->is_disk)
+ ioctl (data->fd, BLKFLSBUF, 0);
+#endif
+ }
+
+ close (data->fd);
+ data->fd = -1;
+ }
+
+ /* Open the partition. */
+ grub_dprintf ("hostdisk", "opening the device `%s' in open_device()\n", dev);
+ fd = open (dev, flags);
+ if (fd < 0)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot open `%s'", dev);
+ return -1;
+ }
+
+ data->dev = xstrdup (dev);
+ data->access_mode = (flags & O_ACCMODE);
+ data->fd = fd;
+ }
+
+ if (is_partition)
+ sector -= part_start;
+ }
+#else /* ! __linux__ */
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
+ int sysctl_flags, sysctl_oldflags;
+ size_t sysctl_size = sizeof (sysctl_flags);
+
+ if (sysctlbyname ("kern.geom.debugflags", &sysctl_oldflags, &sysctl_size, NULL, 0))
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot get current flags of sysctl kern.geom.debugflags");
+ return -1;
+ }
+ sysctl_flags = sysctl_oldflags | 0x10;
+ if (! (sysctl_oldflags & 0x10)
+ && sysctlbyname ("kern.geom.debugflags", NULL , 0, &sysctl_flags, sysctl_size))
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot set flags of sysctl kern.geom.debugflags");
+ return -1;
+ }
+#endif
+
+ if (data->dev && strcmp (data->dev, map[disk->id].device) == 0 &&
+ data->access_mode == (flags & O_ACCMODE))
+ {
+ grub_dprintf ("hostdisk", "reusing open device `%s'\n", data->dev);
+ fd = data->fd;
+ }
+ else
+ {
+ free (data->dev);
+ if (data->fd != -1)
+ {
+ if (data->access_mode == O_RDWR || data->access_mode == O_WRONLY)
+ {
+ fsync (data->fd);
+#ifdef __linux__
+ if (data->is_disk)
+ ioctl (data->fd, BLKFLSBUF, 0);
+#endif
+ }
+ close (data->fd);
+ data->fd = -1;
+ }
+
+ fd = open (map[disk->id].device, flags);
+ if (fd >= 0)
+ {
+ data->dev = xstrdup (map[disk->id].device);
+ data->access_mode = (flags & O_ACCMODE);
+ data->fd = fd;
+ }
+ }
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ if (! (sysctl_oldflags & 0x10)
+ && sysctlbyname ("kern.geom.debugflags", NULL , 0, &sysctl_oldflags, sysctl_size))
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot set flags back to the old value for sysctl kern.geom.debugflags");
+ return -1;
+ }
+#endif
+
+#if defined(__APPLE__)
+ /* If we can't have exclusive access, try shared access */
+ if (fd < 0)
+ fd = open(map[disk->id].device, flags | O_SHLOCK);
+#endif
+
+ if (fd < 0)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot open `%s' in open_device()", map[disk->id].device);
+ return -1;
+ }
+#endif /* ! __linux__ */
+
+#if defined(__NetBSD__)
+ configure_device_driver (fd);
+#endif /* defined(__NetBSD__) */
+
+#if defined(__linux__) && (!defined(__GLIBC__) || \
+ ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+ /* Maybe libc doesn't have large file support. */
+ {
+ loff_t offset, result;
+ static int _llseek (uint filedes, ulong hi, ulong lo,
+ loff_t *res, uint wh);
+ _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
+ loff_t *, res, uint, wh);
+
+ offset = (loff_t) sector << GRUB_DISK_SECTOR_BITS;
+ if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot seek `%s'", map[disk->id].device);
+ close (fd);
+ return -1;
+ }
+ }
+#else
+ {
+ off_t offset = (off_t) sector << GRUB_DISK_SECTOR_BITS;
+
+ if (lseek (fd, offset, SEEK_SET) != offset)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot seek `%s'", map[disk->id].device);
+ close (fd);
+ return -1;
+ }
+ }
+#endif
+
+ return fd;
+}
+
+/* Read LEN bytes from FD in BUF. Return less than or equal to zero if an
+ error occurs, otherwise return LEN. */
+static ssize_t
+nread (int fd, char *buf, size_t len)
+{
+ ssize_t size = len;
+
+ while (len)
+ {
+ ssize_t ret = read (fd, buf, len);
+
+ if (ret <= 0)
+ {
+ if (errno == EINTR)
+ continue;
+ else
+ return ret;
+ }
+
+ len -= ret;
+ buf += ret;
+ }
+
+ return size;
+}
+
+/* Write LEN bytes from BUF to FD. Return less than or equal to zero if an
+ error occurs, otherwise return LEN. */
+static ssize_t
+nwrite (int fd, const char *buf, size_t len)
+{
+ ssize_t size = len;
+
+ while (len)
+ {
+ ssize_t ret = write (fd, buf, len);
+
+ if (ret <= 0)
+ {
+ if (errno == EINTR)
+ continue;
+ else
+ return ret;
+ }
+
+ len -= ret;
+ buf += ret;
+ }
+
+ return size;
+}
+
+static grub_err_t
+grub_util_biosdisk_read (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, char *buf)
+{
+ int fd;
+
+ /* Split pre-partition and partition reads. */
+ if (disk->partition && sector < disk->partition->start
+ && sector + size > disk->partition->start)
+ {
+ grub_err_t err;
+ err = grub_util_biosdisk_read (disk, sector,
+ disk->partition->start - sector,
+ buf);
+ if (err)
+ return err;
+
+ return grub_util_biosdisk_read (disk, disk->partition->start,
+ size - (disk->partition->start - sector),
+ buf + ((disk->partition->start - sector)
+ << GRUB_DISK_SECTOR_BITS));
+ }
+
+ fd = open_device (disk, sector, O_RDONLY);
+ if (fd < 0)
+ return grub_errno;
+
+#ifdef __linux__
+ if (sector == 0 && size > 1)
+ {
+ /* Work around a bug in Linux ez remapping. Linux remaps all
+ sectors that are read together with the MBR in one read. It
+ should only remap the MBR, so we split the read in two
+ parts. -jochen */
+ if (nread (fd, buf, GRUB_DISK_SECTOR_SIZE) != GRUB_DISK_SECTOR_SIZE)
+ {
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read `%s'", map[disk->id].device);
+ return grub_errno;
+ }
+
+ buf += GRUB_DISK_SECTOR_SIZE;
+ size--;
+ }
+#endif /* __linux__ */
+
+ if (nread (fd, buf, size << GRUB_DISK_SECTOR_BITS)
+ != (ssize_t) (size << GRUB_DISK_SECTOR_BITS))
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read from `%s'", map[disk->id].device);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_util_biosdisk_write (grub_disk_t disk, grub_disk_addr_t sector,
+ grub_size_t size, const char *buf)
+{
+ int fd;
+
+ /* Split pre-partition and partition writes. */
+ if (disk->partition && sector < disk->partition->start
+ && sector + size > disk->partition->start)
+ {
+ grub_err_t err;
+ err = grub_util_biosdisk_write (disk, sector,
+ disk->partition->start - sector,
+ buf);
+ if (err)
+ return err;
+
+ return grub_util_biosdisk_write (disk, disk->partition->start,
+ size - (disk->partition->start - sector),
+ buf + ((disk->partition->start - sector)
+ << GRUB_DISK_SECTOR_BITS));
+ }
+
+ fd = open_device (disk, sector, O_WRONLY);
+ if (fd < 0)
+ return grub_errno;
+
+ if (nwrite (fd, buf, size << GRUB_DISK_SECTOR_BITS)
+ != (ssize_t) (size << GRUB_DISK_SECTOR_BITS))
+ grub_error (GRUB_ERR_WRITE_ERROR, "cannot write to `%s'", map[disk->id].device);
+
+ return grub_errno;
+}
+
+grub_err_t
+grub_util_biosdisk_flush (struct grub_disk *disk)
+{
+ struct grub_util_biosdisk_data *data = disk->data;
+
+ if (disk->dev->id != GRUB_DISK_DEVICE_BIOSDISK_ID)
+ return GRUB_ERR_NONE;
+ if (data->fd == -1)
+ {
+ data->fd = open_device (disk, 0, O_RDONLY);
+ if (data->fd < 0)
+ return grub_errno;
+ }
+ fsync (data->fd);
+#ifdef __linux__
+ if (data->is_disk)
+ ioctl (data->fd, BLKFLSBUF, 0);
+#endif
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_util_biosdisk_close (struct grub_disk *disk)
+{
+ struct grub_util_biosdisk_data *data = disk->data;
+
+ free (data->dev);
+ if (data->fd != -1)
+ {
+ if (data->access_mode == O_RDWR || data->access_mode == O_WRONLY)
+ grub_util_biosdisk_flush (disk);
+ close (data->fd);
+ }
+ free (data);
+}
+
+static struct grub_disk_dev grub_util_biosdisk_dev =
+ {
+ .name = "biosdisk",
+ .id = GRUB_DISK_DEVICE_BIOSDISK_ID,
+ .iterate = grub_util_biosdisk_iterate,
+ .open = grub_util_biosdisk_open,
+ .close = grub_util_biosdisk_close,
+ .read = grub_util_biosdisk_read,
+ .write = grub_util_biosdisk_write,
+ .next = 0
+ };
+
+static void
+read_device_map (const char *dev_map)
+{
+ FILE *fp;
+ char buf[1024]; /* XXX */
+ int lineno = 0;
+ struct stat st;
+
+ auto void show_error (const char *msg);
+ void show_error (const char *msg)
+ {
+ grub_util_error ("%s:%d: %s", dev_map, lineno, msg);
+ }
+
+ fp = fopen (dev_map, "r");
+ if (! fp)
+ {
+ grub_util_info (_("cannot open `%s'"), dev_map);
+ return;
+ }
+
+ while (fgets (buf, sizeof (buf), fp))
+ {
+ char *p = buf;
+ char *e;
+ int drive;
+
+ lineno++;
+
+ /* Skip leading spaces. */
+ while (*p && isspace (*p))
+ p++;
+
+ /* If the first character is `#' or NUL, skip this line. */
+ if (*p == '\0' || *p == '#')
+ continue;
+
+ if (*p != '(')
+ show_error ("No open parenthesis found");
+
+ p++;
+ /* Find a free slot. */
+ drive = find_free_slot ();
+ if (drive < 0)
+ show_error ("Map table size exceeded");
+
+ e = p;
+ p = strchr (p, ')');
+ if (! p)
+ show_error ("No close parenthesis found");
+
+ map[drive].drive = xmalloc (p - e + sizeof ('\0'));
+ strncpy (map[drive].drive, e, p - e + sizeof ('\0'));
+ map[drive].drive[p - e] = '\0';
+
+ p++;
+ /* Skip leading spaces. */
+ while (*p && isspace (*p))
+ p++;
+
+ if (*p == '\0')
+ show_error ("No filename found");
+
+ /* NUL-terminate the filename. */
+ e = p;
+ while (*e && ! isspace (*e))
+ e++;
+ *e = '\0';
+
+#ifdef __MINGW32__
+ (void) st;
+ if (grub_util_get_disk_size (p) == -1LL)
+#else
+ if (stat (p, &st) == -1)
+#endif
+ {
+ free (map[drive].drive);
+ map[drive].drive = NULL;
+ grub_util_info ("Cannot stat `%s', skipping", p);
+ continue;
+ }
+
+#ifdef __linux__
+ /* On Linux, the devfs uses symbolic links horribly, and that
+ confuses the interface very much, so use realpath to expand
+ symbolic links. Leave /dev/mapper/ alone, though. */
+ if (strncmp (p, "/dev/mapper/", 12) != 0)
+ {
+ map[drive].device = xmalloc (PATH_MAX);
+ if (! realpath (p, map[drive].device))
+ grub_util_error ("cannot get the real path of `%s'", p);
+ }
+ else
+#endif
+ map[drive].device = xstrdup (p);
+ }
+
+ fclose (fp);
+}
+
+void
+grub_util_biosdisk_init (const char *dev_map)
+{
+ read_device_map (dev_map);
+ grub_disk_dev_register (&grub_util_biosdisk_dev);
+}
+
+void
+grub_util_biosdisk_fini (void)
+{
+ unsigned i;
+
+ for (i = 0; i < sizeof (map) / sizeof (map[0]); i++)
+ {
+ if (map[i].drive)
+ free (map[i].drive);
+ if (map[i].device)
+ free (map[i].device);
+ map[i].drive = map[i].device = NULL;
+ }
+
+ grub_disk_dev_unregister (&grub_util_biosdisk_dev);
+}
+
+/*
+ * Note: we do not use the new partition naming scheme as dos_part does not
+ * necessarily correspond to an msdos partition.
+ */
+static char *
+make_device_name (int drive, int dos_part, int bsd_part)
+{
+ char *ret;
+ char *dos_part_str = NULL;
+ char *bsd_part_str = NULL;
+
+ if (dos_part >= 0)
+ dos_part_str = xasprintf (",%d", dos_part + 1);
+
+ if (bsd_part >= 0)
+ bsd_part_str = xasprintf (",%d", bsd_part + 1);
+
+ ret = xasprintf ("%s%s%s", map[drive].drive,
+ dos_part_str ? : "",
+ bsd_part_str ? : "");
+
+ if (dos_part_str)
+ free (dos_part_str);
+
+ if (bsd_part_str)
+ free (bsd_part_str);
+
+ return ret;
+}
+
+static char *
+convert_system_partition_to_system_disk (const char *os_dev, struct stat *st)
+{
+#if defined(__linux__)
+ char *path = xmalloc (PATH_MAX);
+ if (! realpath (os_dev, path))
+ return NULL;
+
+ if (strncmp ("/dev/", path, 5) == 0)
+ {
+ char *p = path + 5;
+
+ /* If this is an IDE disk. */
+ if (strncmp ("ide/", p, 4) == 0)
+ {
+ p = strstr (p, "part");
+ if (p)
+ strcpy (p, "disc");
+
+ return path;
+ }
+
+ /* If this is a SCSI disk. */
+ if (strncmp ("scsi/", p, 5) == 0)
+ {
+ p = strstr (p, "part");
+ if (p)
+ strcpy (p, "disc");
+
+ return path;
+ }
+
+ /* If this is a DAC960 disk. */
+ if (strncmp ("rd/c", p, 4) == 0)
+ {
+ /* /dev/rd/c[0-9]+d[0-9]+(p[0-9]+)? */
+ p = strchr (p, 'p');
+ if (p)
+ *p = '\0';
+
+ return path;
+ }
+
+ /* If this is a Mylex AcceleRAID Array. */
+ if (strncmp ("rs/c", p, 4) == 0)
+ {
+ /* /dev/rd/c[0-9]+d[0-9]+(p[0-9]+)? */
+ p = strchr (p, 'p');
+ if (p)
+ *p = '\0';
+
+ return path;
+ }
+ /* If this is a CCISS disk. */
+ if (strncmp ("cciss/c", p, sizeof ("cciss/c") - 1) == 0)
+ {
+ /* /dev/cciss/c[0-9]+d[0-9]+(p[0-9]+)? */
+ p = strchr (p, 'p');
+ if (p)
+ *p = '\0';
+
+ return path;
+ }
+
+ /* If this is a Compaq Intelligent Drive Array. */
+ if (strncmp ("ida/c", p, sizeof ("ida/c") - 1) == 0)
+ {
+ /* /dev/ida/c[0-9]+d[0-9]+(p[0-9]+)? */
+ p = strchr (p, 'p');
+ if (p)
+ *p = '\0';
+
+ return path;
+ }
+
+ /* If this is an I2O disk. */
+ if (strncmp ("i2o/hd", p, sizeof ("i2o/hd") - 1) == 0)
+ {
+ /* /dev/i2o/hd[a-z]([0-9]+)? */
+ p[sizeof ("i2o/hda") - 1] = '\0';
+ return path;
+ }
+
+ /* If this is a MultiMediaCard (MMC). */
+ if (strncmp ("mmcblk", p, sizeof ("mmcblk") - 1) == 0)
+ {
+ /* /dev/mmcblk[0-9]+(p[0-9]+)? */
+ p = strchr (p, 'p');
+ if (p)
+ *p = '\0';
+
+ return path;
+ }
+
+ if (strncmp ("md", p, 2) == 0
+ && p[2] >= '0' && p[2] <= '9')
+ {
+ char *ptr = p + 2;
+ while (*ptr >= '0' && *ptr <= '9')
+ ptr++;
+ *ptr = 0;
+ return path;
+ }
+
+ /* If this is an IDE, SCSI or Virtio disk. */
+ if (strncmp ("vdisk", p, 5) == 0
+ && p[5] >= 'a' && p[5] <= 'z')
+ {
+ /* /dev/vdisk[a-z][0-9]* */
+ p[6] = '\0';
+ return path;
+ }
+ if ((strncmp ("hd", p, 2) == 0
+ || strncmp ("vd", p, 2) == 0
+ || strncmp ("sd", p, 2) == 0)
+ && p[2] >= 'a' && p[2] <= 'z')
+ {
+ char *pp = p + 2;
+ while (*pp >= 'a' && *pp <= 'z')
+ pp++;
+ /* /dev/[hsv]d[a-z]+[0-9]* */
+ *pp = '\0';
+ return path;
+ }
+
+ /* If this is a Xen virtual block device. */
+ if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
+ {
+ char *pp = p + 3;
+ while (*pp >= 'a' && *pp <= 'z')
+ pp++;
+ /* /dev/xvd[a-z]+[0-9]* */
+ *pp = '\0';
+ return path;
+ }
+
+#ifdef HAVE_DEVICE_MAPPER
+ /* If this is a DM-RAID device.
+ Compare os_dev rather than path here, since nodes under
+ /dev/mapper/ are often symlinks. */
+ if ((strncmp ("/dev/mapper/", os_dev, 12) == 0))
+ {
+ struct dm_tree *tree;
+ uint32_t maj, min;
+ struct dm_tree_node *node = NULL, *child;
+ void *handle;
+ const char *node_uuid, *mapper_name = NULL, *child_uuid, *child_name;
+
+ tree = dm_tree_create ();
+ if (! tree)
+ {
+ grub_dprintf ("hostdisk", "dm_tree_create failed\n");
+ goto devmapper_out;
+ }
+
+ maj = major (st->st_rdev);
+ min = minor (st->st_rdev);
+ if (! dm_tree_add_dev (tree, maj, min))
+ {
+ grub_dprintf ("hostdisk", "dm_tree_add_dev failed\n");
+ goto devmapper_out;
+ }
+
+ node = dm_tree_find_node (tree, maj, min);
+ if (! node)
+ {
+ grub_dprintf ("hostdisk", "dm_tree_find_node failed\n");
+ goto devmapper_out;
+ }
+ node_uuid = dm_tree_node_get_uuid (node);
+ if (! node_uuid)
+ {
+ grub_dprintf ("hostdisk", "%s has no DM uuid\n", path);
+ node = NULL;
+ goto devmapper_out;
+ }
+ else if (strncmp (node_uuid, "DMRAID-", 7) != 0)
+ {
+ grub_dprintf ("hostdisk", "%s is not DM-RAID\n", path);
+ node = NULL;
+ goto devmapper_out;
+ }
+
+ handle = NULL;
+ /* Counter-intuitively, device-mapper refers to the disk-like
+ device containing a DM-RAID partition device as a "child" of
+ the partition device. */
+ child = dm_tree_next_child (&handle, node, 0);
+ if (! child)
+ {
+ grub_dprintf ("hostdisk", "%s has no DM children\n", path);
+ goto devmapper_out;
+ }
+ child_uuid = dm_tree_node_get_uuid (child);
+ if (! child_uuid)
+ {
+ grub_dprintf ("hostdisk", "%s child has no DM uuid\n", path);
+ goto devmapper_out;
+ }
+ else if (strncmp (child_uuid, "DMRAID-", 7) != 0)
+ {
+ grub_dprintf ("hostdisk", "%s child is not DM-RAID\n", path);
+ goto devmapper_out;
+ }
+ child_name = dm_tree_node_get_name (child);
+ if (! child_name)
+ {
+ grub_dprintf ("hostdisk", "%s child has no DM name\n", path);
+ goto devmapper_out;
+ }
+ mapper_name = child_name;
+
+devmapper_out:
+ if (! mapper_name && node)
+ {
+ /* This is a DM-RAID disk, not a partition. */
+ mapper_name = dm_tree_node_get_name (node);
+ if (! mapper_name)
+ grub_dprintf ("hostdisk", "%s has no DM name\n", path);
+ }
+ if (tree)
+ dm_tree_free (tree);
+ free (path);
+ if (mapper_name)
+ return xasprintf ("/dev/mapper/%s", mapper_name);
+ else
+ return NULL;
+ }
+#endif /* HAVE_DEVICE_MAPPER */
+ }
+
+ return path;
+
+#elif defined(__GNU__)
+ char *path = xstrdup (os_dev);
+ if (strncmp ("/dev/sd", path, 7) == 0 || strncmp ("/dev/hd", path, 7) == 0)
+ {
+ char *p = strchr (path + 7, 's');
+ if (p)
+ *p = '\0';
+ }
+ return path;
+
+#elif defined(__CYGWIN__)
+ char *path = xstrdup (os_dev);
+ if (strncmp ("/dev/sd", path, 7) == 0 && 'a' <= path[7] && path[7] <= 'z')
+ path[8] = 0;
+ return path;
+
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ char *out, *out2;
+ if (strncmp (os_dev, "/dev/", sizeof ("/dev/") - 1) != 0)
+ return xstrdup (os_dev);
+ follow_geom_up (os_dev + sizeof ("/dev/") - 1, NULL, &out);
+
+ out2 = xasprintf ("/dev/%s", out);
+ free (out);
+
+ return out2;
+#elif defined(__APPLE__)
+ char *path = xstrdup (os_dev);
+ if (strncmp ("/dev/", path, 5) == 0)
+ {
+ char *p;
+ for (p = path + 5; *p; ++p)
+ if (grub_isdigit(*p))
+ {
+ p = strpbrk (p, "sp");
+ if (p)
+ *p = '\0';
+ break;
+ }
+ }
+ return path;
+
+#elif defined(__NetBSD__)
+ /* NetBSD uses "/dev/r[a-z]+[0-9][a-z]". */
+ char *path = xstrdup (os_dev);
+ if (strncmp ("/dev/r", path, sizeof("/dev/r") - 1) == 0 &&
+ (path[sizeof("/dev/r") - 1] >= 'a' && path[sizeof("/dev/r") - 1] <= 'z') &&
+ strncmp ("fd", path + sizeof("/dev/r") - 1, sizeof("fd") - 1) != 0) /* not a floppy device name */
+ {
+ char *p;
+ for (p = path + sizeof("/dev/r"); *p >= 'a' && *p <= 'z'; p++);
+ if (grub_isdigit(*p))
+ {
+ p++;
+ if ((*p >= 'a' && *p <= 'z') && (*(p+1) == '\0'))
+ {
+ /* path matches the required regular expression and
+ p points to its last character. */
+ int rawpart = -1;
+# ifdef HAVE_GETRAWPARTITION
+ rawpart = getrawpartition();
+# endif /* HAVE_GETRAWPARTITION */
+ if (rawpart >= 0)
+ *p = 'a' + rawpart;
+ }
+ }
+ }
+ return path;
+
+#else
+# warning "The function `convert_system_partition_to_system_disk' might not work on your OS correctly."
+ return xstrdup (os_dev);
+#endif
+}
+
+#if defined(__linux__) || defined(__CYGWIN__)
+static int
+device_is_wholedisk (const char *os_dev)
+{
+ int len = strlen (os_dev);
+
+ if (os_dev[len - 1] < '0' || os_dev[len - 1] > '9')
+ return 1;
+ return 0;
+}
+#endif
+
+#if defined(__NetBSD__)
+/* Try to determine whether a given device name corresponds to a whole disk.
+ This function should give in most cases a definite answer, but it may
+ actually give an approximate one in the following sense: if the return
+ value is 0 then the device name does not correspond to a whole disk. */
+static int
+device_is_wholedisk (const char *os_dev)
+{
+ int len = strlen (os_dev);
+ int rawpart = -1;
+
+# ifdef HAVE_GETRAWPARTITION
+ rawpart = getrawpartition();
+# endif /* HAVE_GETRAWPARTITION */
+ if (rawpart < 0)
+ return 1;
+ return (os_dev[len - 1] == ('a' + rawpart));
+}
+#endif /* defined(__NetBSD__) */
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+static int
+device_is_wholedisk (const char *os_dev)
+{
+ const char *p;
+
+ if (strncmp (os_dev, "/dev/", sizeof ("/dev/") - 1) != 0)
+ return 0;
+
+ for (p = os_dev + sizeof ("/dev/") - 1; *p; ++p)
+ if (grub_isdigit (*p))
+ {
+ if (strchr (p, 's'))
+ return 0;
+ break;
+ }
+
+ return 1;
+}
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) */
+
+static int
+find_system_device (const char *os_dev, struct stat *st, int convert, int add)
+{
+ unsigned int i;
+ char *os_disk;
+
+ if (convert)
+ os_disk = convert_system_partition_to_system_disk (os_dev, st);
+ else
+ os_disk = xstrdup (os_dev);
+ if (! os_disk)
+ return -1;
+
+ for (i = 0; i < ARRAY_SIZE (map); i++)
+ if (! map[i].device)
+ break;
+ else if (strcmp (map[i].device, os_disk) == 0)
+ {
+ free (os_disk);
+ return i;
+ }
+
+ if (!add)
+ return -1;
+
+ if (i == ARRAY_SIZE (map))
+ grub_util_error (_("device count exceeds limit"));
+
+ map[i].device = os_disk;
+ map[i].drive = xstrdup (os_disk);
+
+ return i;
+}
+
+int
+grub_util_biosdisk_is_present (const char *os_dev)
+{
+ struct stat st;
+
+ if (stat (os_dev, &st) < 0)
+ return 0;
+
+ return find_system_device (os_dev, &st, 1, 0) != -1;
+}
+
+char *
+grub_util_biosdisk_get_grub_dev (const char *os_dev)
+{
+ struct stat st;
+ int drive;
+
+ if (stat (os_dev, &st) < 0)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot stat `%s'", os_dev);
+ grub_util_info ("cannot stat `%s'", os_dev);
+ return 0;
+ }
+
+ drive = find_system_device (os_dev, &st, 1, 1);
+ if (drive < 0)
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "no mapping exists for `%s'", os_dev);
+ grub_util_info ("no mapping exists for `%s'", os_dev);
+ return 0;
+ }
+
+ if (grub_strcmp (os_dev,
+ convert_system_partition_to_system_disk (os_dev, &st)) == 0)
+ return make_device_name (drive, -1, -1);
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__NetBSD__)
+ if (! S_ISCHR (st.st_mode))
+#else
+ if (! S_ISBLK (st.st_mode))
+#endif
+ return make_device_name (drive, -1, -1);
+
+#if defined(__linux__) || defined(__CYGWIN__) || defined(HAVE_DIOCGDINFO) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
+ /* Linux counts partitions uniformly, whether a BSD partition or a DOS
+ partition, so mapping them to GRUB devices is not trivial.
+ Here, get the start sector of a partition by HDIO_GETGEO, and
+ compare it with each partition GRUB recognizes.
+
+ Cygwin /dev/sdXN emulation uses Windows partition mapping. It
+ does not count the extended partition and missing primary
+ partitions. Use same method as on Linux here.
+
+ For NetBSD and FreeBSD, proceed as for Linux, except that the start
+ sector is obtained from the disk label. */
+ {
+ char *name, *partname;
+ grub_disk_t disk;
+ grub_disk_addr_t start;
+ auto int find_partition (grub_disk_t dsk,
+ const grub_partition_t partition);
+
+ int find_partition (grub_disk_t dsk __attribute__ ((unused)),
+ const grub_partition_t partition)
+ {
+ grub_disk_addr_t part_start = 0;
+ grub_util_info ("Partition %d starts from %lu",
+ partition->number, partition->start);
+
+ part_start = grub_partition_get_start (partition);
+
+ if (start == part_start)
+ {
+ partname = grub_partition_get_name (partition);
+ return 1;
+ }
+
+ return 0;
+ }
+
+ name = make_device_name (drive, -1, -1);
+
+# if !defined(HAVE_DIOCGDINFO)
+ if (MAJOR (st.st_rdev) == FLOPPY_MAJOR)
+ return name;
+# else /* defined(HAVE_DIOCGDINFO) */
+ /* Since os_dev and convert_system_partition_to_system_disk (os_dev) are
+ * different, we know that os_dev cannot be a floppy device. */
+# endif /* !defined(HAVE_DIOCGDINFO) */
+
+ start = find_partition_start (os_dev);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ free (name);
+ return 0;
+ }
+
+ grub_util_info ("%s starts from %lu", os_dev, start);
+
+ if (start == 0 && device_is_wholedisk (os_dev))
+ return name;
+
+ grub_util_info ("opening the device %s", name);
+ disk = grub_disk_open (name);
+ free (name);
+
+ if (! disk)
+ {
+ /* We already know that the partition exists. Given that we already
+ checked the device map above, we can only get
+ GRUB_ERR_UNKNOWN_DEVICE at this point if the disk does not exist.
+ This can happen on Xen, where disk images in the host can be
+ assigned to devices that have partition-like names in the guest
+ but are really more like disks. */
+ if (grub_errno == GRUB_ERR_UNKNOWN_DEVICE)
+ {
+ grub_util_warn
+ ("disk does not exist, so falling back to partition device %s",
+ os_dev);
+
+ drive = find_system_device (os_dev, &st, 0, 1);
+ if (drive < 0)
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "no mapping exists for `%s'", os_dev);
+ return 0;
+ }
+
+ return make_device_name (drive, -1, -1);
+ }
+ else
+ return 0;
+ }
+
+ partname = NULL;
+ grub_partition_iterate (disk, find_partition);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_disk_close (disk);
+ return 0;
+ }
+
+ if (partname == NULL)
+ {
+ grub_disk_close (disk);
+ grub_error (GRUB_ERR_BAD_DEVICE,
+ "cannot find the partition of `%s'", os_dev);
+ return 0;
+ }
+
+ name = grub_xasprintf ("%s,%s", disk->name, partname);
+ free (partname);
+ return name;
+ }
+
+#elif defined(__GNU__)
+ /* GNU uses "/dev/[hs]d[0-9]+(s[0-9]+[a-z]?)?". */
+ {
+ char *p;
+ int dos_part = -1;
+ int bsd_part = -1;
+
+ p = strrchr (os_dev, 's');
+ if (p)
+ {
+ long int n;
+ char *q;
+
+ p++;
+ n = strtol (p, &q, 10);
+ if (p != q && n != GRUB_LONG_MIN && n != GRUB_LONG_MAX)
+ {
+ dos_part = (int) n - 1;
+
+ if (*q >= 'a' && *q <= 'g')
+ bsd_part = *q - 'a';
+ }
+ }
+
+ return make_device_name (drive, dos_part, bsd_part);
+ }
+
+#else
+# warning "The function `grub_util_biosdisk_get_grub_dev' might not work on your OS correctly."
+ return make_device_name (drive, -1, -1);
+#endif
+}
+
+const char *
+grub_util_biosdisk_get_osdev (grub_disk_t disk)
+{
+ return map[disk->id].device;
+}
+
+int
+grub_util_biosdisk_is_floppy (grub_disk_t disk)
+{
+ struct stat st;
+ int fd;
+
+ fd = open (map[disk->id].device, O_RDONLY);
+ /* Shouldn't happen. */
+ if (fd == -1)
+ return 0;
+
+ /* Shouldn't happen either. */
+ if (fstat (fd, &st) < 0)
+ return 0;
+
+#if defined(__NetBSD__)
+ if (major(st.st_rdev) == RAW_FLOPPY_MAJOR)
+ return 1;
+#endif
+
+#if defined(FLOPPY_MAJOR)
+ if (major(st.st_rdev) == FLOPPY_MAJOR)
+#else
+ /* Some kernels (e.g. kFreeBSD) don't have a static major number
+ for floppies, but they still use a "fd[0-9]" pathname. */
+ if (map[disk->id].device[5] == 'f'
+ && map[disk->id].device[6] == 'd'
+ && map[disk->id].device[7] >= '0'
+ && map[disk->id].device[7] <= '9')
+#endif
+ return 1;
+
+ return 0;
+}
diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c
new file mode 100644
index 0000000..501ad46
--- /dev/null
+++ b/grub-core/kern/emu/hostfs.c
@@ -0,0 +1,175 @@
+/* hostfs.c - Dummy filesystem to provide access to the hosts filesystem */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+#define _BSD_SOURCE
+#include <grub/fs.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+#include <grub/util/misc.h>
+
+#include <dirent.h>
+#include <stdio.h>
+#include <errno.h>
+
+
+/* dirent.d_type is a BSD extension, not part of POSIX */
+#include <sys/stat.h>
+#include <string.h>
+
+static int
+is_dir (const char *path, const char *name)
+{
+ int len1 = strlen(path);
+ int len2 = strlen(name);
+
+ char pathname[len1 + 1 + len2 + 1 + 13];
+ strcpy (pathname, path);
+
+ /* Avoid UNC-path "//name" on Cygwin. */
+ if (len1 > 0 && pathname[len1 - 1] != '/')
+ strcat (pathname, "/");
+
+ strcat (pathname, name);
+
+ struct stat st;
+ if (stat (pathname, &st))
+ return 0;
+ return S_ISDIR (st.st_mode);
+}
+
+static grub_err_t
+grub_hostfs_dir (grub_device_t device, const char *path,
+ int (*hook) (const char *filename,
+ const struct grub_dirhook_info *info))
+{
+ DIR *dir;
+
+ /* Check if the disk is our dummy disk. */
+ if (grub_strcmp (device->disk->name, "host"))
+ return grub_error (GRUB_ERR_BAD_FS, "not a hostfs");
+
+ dir = opendir (path);
+ if (! dir)
+ return grub_error (GRUB_ERR_BAD_FILENAME,
+ "can't open the hostfs directory `%s'", path);
+
+ while (1)
+ {
+ struct dirent *de;
+ struct grub_dirhook_info info;
+ grub_memset (&info, 0, sizeof (info));
+
+ de = readdir (dir);
+ if (! de)
+ break;
+
+ info.dir = !! is_dir (path, de->d_name);
+ hook (de->d_name, &info);
+
+ }
+
+ closedir (dir);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Open a file named NAME and initialize FILE. */
+static grub_err_t
+grub_hostfs_open (struct grub_file *file, const char *name)
+{
+ FILE *f;
+
+ f = fopen (name, "rb");
+ if (! f)
+ return grub_error (GRUB_ERR_BAD_FILENAME,
+ "can't open `%s'", name);
+ file->data = f;
+
+#ifdef __MINGW32__
+ file->size = grub_util_get_disk_size (name);
+#else
+ fseeko (f, 0, SEEK_END);
+ file->size = ftello (f);
+ fseeko (f, 0, SEEK_SET);
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_ssize_t
+grub_hostfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ FILE *f;
+
+ f = (FILE *) file->data;
+ if (fseeko (f, file->offset, SEEK_SET) != 0)
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, "fseeko: %s", strerror (errno));
+ return -1;
+ }
+
+ unsigned int s = fread (buf, 1, len, f);
+ if (s != len)
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "fread: %s", strerror (errno));
+
+ return (signed) s;
+}
+
+static grub_err_t
+grub_hostfs_close (grub_file_t file)
+{
+ FILE *f;
+
+ f = (FILE *) file->data;
+ fclose (f);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_hostfs_label (grub_device_t device __attribute ((unused)),
+ char **label __attribute ((unused)))
+{
+ *label = 0;
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_fs grub_hostfs_fs =
+ {
+ .name = "hostfs",
+ .dir = grub_hostfs_dir,
+ .open = grub_hostfs_open,
+ .read = grub_hostfs_read,
+ .close = grub_hostfs_close,
+ .label = grub_hostfs_label,
+ .next = 0
+ };
+
+
+
+GRUB_MOD_INIT(hostfs)
+{
+ grub_fs_register (&grub_hostfs_fs);
+}
+
+GRUB_MOD_FINI(hostfs)
+{
+ grub_fs_unregister (&grub_hostfs_fs);
+}
diff --git a/grub-core/kern/emu/lite.c b/grub-core/kern/emu/lite.c
new file mode 100644
index 0000000..32e12a0
--- /dev/null
+++ b/grub-core/kern/emu/lite.c
@@ -0,0 +1,45 @@
+#include <config.h>
+#include <grub/emu/misc.h>
+
+#ifndef GRUB_MACHINE_EMU
+#error "This source is only meant for grub-emu platform"
+#endif
+
+#if defined(__i386__)
+#include "../i386/dl.c"
+#elif defined(__x86_64__)
+#include "../x86_64/dl.c"
+#elif defined(__sparc__)
+#include "../sparc64/dl.c"
+#elif defined(__mips__)
+#include "../mips/dl.c"
+#elif defined(__powerpc__)
+#include "../powerpc/dl.c"
+#else
+#error "No target cpu type is defined"
+#endif
+
+/* grub-emu-lite supports dynamic module loading, so it won't have any
+ embedded modules. */
+void
+grub_init_all (void)
+{
+ return;
+}
+
+void
+grub_fini_all (void)
+{
+ return;
+}
+
+void
+grub_emu_init (void)
+{
+ return;
+}
+
+void
+grub_emu_post_init (void)
+{
+}
diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
new file mode 100644
index 0000000..0a76459
--- /dev/null
+++ b/grub-core/kern/emu/main.c
@@ -0,0 +1,259 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <setjmp.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/setjmp.h>
+#include <grub/fs.h>
+#include <grub/emu/hostdisk.h>
+#include <grub/time.h>
+#include <grub/emu/console.h>
+#include <grub/emu/misc.h>
+#include <grub/kernel.h>
+#include <grub/normal.h>
+#include <grub/emu/getroot.h>
+#include <grub/env.h>
+#include <grub/partition.h>
+#include <grub/i18n.h>
+
+#include "progname.h"
+
+#define ENABLE_RELOCATABLE 0
+
+/* Used for going back to the main function. */
+static jmp_buf main_env;
+
+/* Store the prefix specified by an argument. */
+static char *prefix = NULL;
+
+int grub_no_autoload;
+
+grub_addr_t
+grub_arch_modules_addr (void)
+{
+ return 0;
+}
+
+void
+grub_reboot (void)
+{
+ longjmp (main_env, 1);
+}
+
+void
+grub_machine_init (void)
+{
+}
+
+void
+grub_machine_set_prefix (void)
+{
+ grub_env_set ("prefix", prefix);
+ free (prefix);
+ prefix = 0;
+}
+
+void
+grub_machine_fini (void)
+{
+ grub_console_fini ();
+}
+
+
+
+static struct option options[] =
+ {
+ {"root-device", required_argument, 0, 'r'},
+ {"device-map", required_argument, 0, 'm'},
+ {"directory", required_argument, 0, 'd'},
+ {"hold", optional_argument, 0, 'H'},
+ {"help", no_argument, 0, 'h'},
+ {"version", no_argument, 0, 'V'},
+ {"verbose", no_argument, 0, 'v'},
+ { 0, 0, 0, 0 }
+ };
+
+static int
+usage (int status)
+{
+ if (status)
+ fprintf (stderr,
+ "Try `%s --help' for more information.\n", program_name);
+ else
+ printf (
+ "Usage: %s [OPTION]...\n"
+ "\n"
+ "GRUB emulator.\n"
+ "\n"
+ " -r, --root-device=DEV use DEV as the root device [default=guessed]\n"
+ " -m, --device-map=FILE use FILE as the device map [default=%s]\n"
+ " -d, --directory=DIR use GRUB files in the directory DIR [default=%s]\n"
+ " -v, --verbose print verbose messages\n"
+ " -H, --hold[=SECONDS] wait until a debugger will attach\n"
+ " -h, --help display this message and exit\n"
+ " -V, --version print version information and exit\n"
+ "\n"
+ "Report bugs to <%s>.\n", program_name, DEFAULT_DEVICE_MAP, DEFAULT_DIRECTORY, PACKAGE_BUGREPORT);
+ return status;
+}
+
+
+void grub_hostfs_init (void);
+void grub_hostfs_fini (void);
+void grub_host_init (void);
+void grub_host_fini (void);
+void grub_emu_init (void);
+
+int
+main (int argc, char *argv[])
+{
+ char *root_dev = 0;
+ char *dir = DEFAULT_DIRECTORY;
+ char *dev_map = DEFAULT_DEVICE_MAP;
+ volatile int hold = 0;
+ int opt;
+
+ set_program_name (argv[0]);
+
+ while ((opt = getopt_long (argc, argv, "r:d:m:vH:hV", options, 0)) != -1)
+ switch (opt)
+ {
+ case 'r':
+ root_dev = optarg;
+ break;
+ case 'd':
+ dir = optarg;
+ break;
+ case 'm':
+ dev_map = optarg;
+ break;
+ case 'v':
+ verbosity++;
+ break;
+ case 'H':
+ hold = (optarg ? atoi (optarg) : -1);
+ break;
+ case 'h':
+ return usage (0);
+ case 'V':
+ printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION);
+ return 0;
+ default:
+ return usage (1);
+ }
+
+ if (optind < argc)
+ {
+ fprintf (stderr, "Unknown extra argument `%s'.\n", argv[optind]);
+ return usage (1);
+ }
+
+ /* Wait until the ARGS.HOLD variable is cleared by an attached debugger. */
+ if (hold && verbosity > 0)
+ printf ("Run \"gdb %s %d\", and set ARGS.HOLD to zero.\n",
+ program_name, (int) getpid ());
+ while (hold)
+ {
+ if (hold > 0)
+ hold--;
+
+ sleep (1);
+ }
+
+ signal (SIGINT, SIG_IGN);
+ grub_emu_init ();
+ grub_console_init ();
+ grub_host_init ();
+
+ /* XXX: This is a bit unportable. */
+ grub_util_biosdisk_init (dev_map);
+
+ grub_init_all ();
+
+ grub_hostfs_init ();
+
+ grub_emu_post_init ();
+
+ /* Make sure that there is a root device. */
+ if (! root_dev)
+ {
+ char *device_name = grub_guess_root_device (dir);
+ if (! device_name)
+ grub_util_error ("cannot find a device for %s", dir);
+
+ root_dev = grub_util_get_grub_dev (device_name);
+ if (! root_dev)
+ {
+ grub_util_info ("guessing the root device failed, because of `%s'",
+ grub_errmsg);
+ grub_util_error ("cannot guess the root device. Specify the option `--root-device'");
+ }
+ }
+
+ if (strcmp (root_dev, "host") == 0)
+ dir = xstrdup (dir);
+ else
+ dir = grub_make_system_path_relative_to_its_root (dir);
+ prefix = xmalloc (strlen (root_dev) + 2 + strlen (dir) + 1);
+ sprintf (prefix, "(%s)%s", root_dev, dir);
+ free (dir);
+
+ /* Start GRUB! */
+ if (setjmp (main_env) == 0)
+ grub_main ();
+
+ grub_fini_all ();
+ grub_hostfs_fini ();
+ grub_host_fini ();
+
+ grub_machine_fini ();
+
+ return 0;
+}
+
+#ifdef __MINGW32__
+
+void
+grub_millisleep (grub_uint32_t ms)
+{
+ Sleep (ms);
+}
+
+#else
+
+void
+grub_millisleep (grub_uint32_t ms)
+{
+ struct timespec ts;
+
+ ts.tv_sec = ms / 1000;
+ ts.tv_nsec = (ms % 1000) * 1000000;
+ nanosleep (&ts, NULL);
+}
+
+#endif
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
new file mode 100644
index 0000000..44c40b0
--- /dev/null
+++ b/grub-core/kern/emu/misc.c
@@ -0,0 +1,537 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config-util.h>
+#include <config.h>
+
+#include <errno.h>
+#include <error.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/env.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/i18n.h>
+#include <grub/time.h>
+#include <grub/emu/misc.h>
+
+#ifdef HAVE_DEVICE_MAPPER
+# include <libdevmapper.h>
+#endif
+
+#ifdef HAVE_LIBZFS
+# include <grub/util/libzfs.h>
+#endif
+
+#ifdef HAVE_LIBNVPAIR
+# include <grub/util/libnvpair.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+
+#ifdef HAVE_SYS_MNTTAB_H
+# include <stdio.h> /* Needed by sys/mnttab.h. */
+# include <sys/mnttab.h>
+#endif
+
+#ifdef HAVE_SYS_MKDEV_H
+# include <sys/mkdev.h> /* makedev */
+#endif
+
+int verbosity;
+
+void
+grub_util_warn (const char *fmt, ...)
+{
+ va_list ap;
+
+ fprintf (stderr, _("%s: warn:"), program_name);
+ fprintf (stderr, " ");
+ va_start (ap, fmt);
+ vfprintf (stderr, fmt, ap);
+ va_end (ap);
+ fprintf (stderr, ".\n");
+ fflush (stderr);
+}
+
+void
+grub_util_info (const char *fmt, ...)
+{
+ if (verbosity > 0)
+ {
+ va_list ap;
+
+ fprintf (stderr, _("%s: info:"), program_name);
+ fprintf (stderr, " ");
+ va_start (ap, fmt);
+ vfprintf (stderr, fmt, ap);
+ va_end (ap);
+ fprintf (stderr, ".\n");
+ fflush (stderr);
+ }
+}
+
+void
+grub_util_error (const char *fmt, ...)
+{
+ va_list ap;
+
+ fprintf (stderr, _("%s: error:"), program_name);
+ fprintf (stderr, " ");
+ va_start (ap, fmt);
+ vfprintf (stderr, fmt, ap);
+ va_end (ap);
+ fprintf (stderr, ".\n");
+ exit (1);
+}
+
+void *
+xmalloc (grub_size_t size)
+{
+ void *p;
+
+ p = malloc (size);
+ if (! p)
+ grub_util_error ("out of memory");
+
+ return p;
+}
+
+void *
+xrealloc (void *ptr, grub_size_t size)
+{
+ ptr = realloc (ptr, size);
+ if (! ptr)
+ grub_util_error ("out of memory");
+
+ return ptr;
+}
+
+char *
+xstrdup (const char *str)
+{
+ size_t len;
+ char *newstr;
+
+ len = strlen (str);
+ newstr = (char *) xmalloc (len + 1);
+ memcpy (newstr, str, len + 1);
+
+ return newstr;
+}
+
+#ifndef HAVE_VASPRINTF
+
+int
+vasprintf (char **buf, const char *fmt, va_list ap)
+{
+ /* Should be large enough. */
+ *buf = xmalloc (512);
+
+ return vsnprintf (*buf, 512, fmt, ap);
+}
+
+#endif
+
+#ifndef HAVE_ASPRINTF
+
+int
+asprintf (char **buf, const char *fmt, ...)
+{
+ int status;
+ va_list ap;
+
+ va_start (ap, fmt);
+ status = vasprintf (buf, fmt, ap);
+ va_end (ap);
+
+ return status;
+}
+
+#endif
+
+char *
+xasprintf (const char *fmt, ...)
+{
+ va_list ap;
+ char *result;
+
+ va_start (ap, fmt);
+ if (vasprintf (&result, fmt, ap) < 0)
+ {
+ if (errno == ENOMEM)
+ grub_util_error ("out of memory");
+ return NULL;
+ }
+
+ return result;
+}
+
+void
+grub_exit (void)
+{
+ exit (1);
+}
+
+grub_uint64_t
+grub_get_time_ms (void)
+{
+ struct timeval tv;
+
+ gettimeofday (&tv, 0);
+
+ return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
+}
+
+grub_uint32_t
+grub_get_rtc (void)
+{
+ struct timeval tv;
+
+ gettimeofday (&tv, 0);
+
+ return (tv.tv_sec * GRUB_TICKS_PER_SECOND
+ + (((tv.tv_sec % GRUB_TICKS_PER_SECOND) * 1000000 + tv.tv_usec)
+ * GRUB_TICKS_PER_SECOND / 1000000));
+}
+
+char *
+canonicalize_file_name (const char *path)
+{
+ char *ret;
+#ifdef PATH_MAX
+ ret = xmalloc (PATH_MAX);
+ if (!realpath (path, ret))
+ return NULL;
+#else
+ ret = realpath (path, NULL);
+#endif
+ return ret;
+}
+
+#ifdef __CYGWIN__
+/* Convert POSIX path to Win32 path,
+ remove drive letter, replace backslashes. */
+static char *
+get_win32_path (const char *path)
+{
+ char winpath[PATH_MAX];
+ if (cygwin_conv_path (CCP_POSIX_TO_WIN_A, path, winpath, sizeof(winpath)))
+ grub_util_error ("cygwin_conv_path() failed");
+
+ int len = strlen (winpath);
+ int offs = (len > 2 && winpath[1] == ':' ? 2 : 0);
+
+ int i;
+ for (i = offs; i < len; i++)
+ if (winpath[i] == '\\')
+ winpath[i] = '/';
+ return xstrdup (winpath + offs);
+}
+#endif
+
+#ifdef HAVE_LIBZFS
+static libzfs_handle_t *__libzfs_handle;
+
+static void
+fini_libzfs (void)
+{
+ libzfs_fini (__libzfs_handle);
+}
+
+libzfs_handle_t *
+grub_get_libzfs_handle (void)
+{
+ if (! __libzfs_handle)
+ {
+ __libzfs_handle = libzfs_init ();
+
+ if (__libzfs_handle)
+ atexit (fini_libzfs);
+ }
+
+ return __libzfs_handle;
+}
+#endif /* HAVE_LIBZFS */
+
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+/* ZFS has similar problems to those of btrfs (see above). */
+void
+grub_find_zpool_from_dir (const char *dir, char **poolname, char **poolfs)
+{
+ char *slash;
+
+ *poolname = *poolfs = NULL;
+
+#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && defined(HAVE_STRUCT_STATFS_F_MNTFROMNAME)
+ /* FreeBSD and GNU/kFreeBSD. */
+ {
+ struct statfs mnt;
+
+ if (statfs (dir, &mnt) != 0)
+ return;
+
+ if (strcmp (mnt.f_fstypename, "zfs") != 0)
+ return;
+
+ *poolname = xstrdup (mnt.f_mntfromname);
+ }
+#elif defined(HAVE_GETEXTMNTENT)
+ /* Solaris. */
+ {
+ struct stat st;
+ struct extmnttab mnt;
+
+ if (stat (dir, &st) != 0)
+ return;
+
+ FILE *mnttab = fopen ("/etc/mnttab", "r");
+ if (! mnttab)
+ return;
+
+ while (getextmntent (mnttab, &mnt, sizeof (mnt)) == 0)
+ {
+ if (makedev (mnt.mnt_major, mnt.mnt_minor) == st.st_dev
+ && !strcmp (mnt.mnt_fstype, "zfs"))
+ {
+ *poolname = xstrdup (mnt.mnt_special);
+ break;
+ }
+ }
+
+ fclose (mnttab);
+ }
+#endif
+
+ if (! *poolname)
+ return;
+
+ slash = strchr (*poolname, '/');
+ if (slash)
+ {
+ *slash = '\0';
+ *poolfs = xstrdup (slash + 1);
+ }
+ else
+ *poolfs = xstrdup ("");
+}
+#endif
+
+/* This function never prints trailing slashes (so that its output
+ can be appended a slash unconditionally). */
+char *
+grub_make_system_path_relative_to_its_root (const char *path)
+{
+ struct stat st;
+ char *p, *buf, *buf2, *buf3, *ret;
+ uintptr_t offset = 0;
+ dev_t num;
+ size_t len;
+
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+ char *poolfs = NULL;
+#endif
+
+ /* canonicalize. */
+ p = canonicalize_file_name (path);
+ if (p == NULL)
+ grub_util_error ("failed to get canonical path of %s", path);
+
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+ /* For ZFS sub-pool filesystems, could be extended to others (btrfs?). */
+ {
+ char *dummy;
+ grub_find_zpool_from_dir (p, &dummy, &poolfs);
+ }
+#endif
+
+ len = strlen (p) + 1;
+ buf = xstrdup (p);
+ free (p);
+
+ if (stat (buf, &st) < 0)
+ grub_util_error ("cannot stat %s: %s", buf, strerror (errno));
+
+ buf2 = xstrdup (buf);
+ num = st.st_dev;
+
+ /* This loop sets offset to the number of chars of the root
+ directory we're inspecting. */
+ while (1)
+ {
+ p = strrchr (buf, '/');
+ if (p == NULL)
+ /* This should never happen. */
+ grub_util_error ("FIXME: no / in buf. (make_system_path_relative_to_its_root)");
+ if (p != buf)
+ *p = 0;
+ else
+ *++p = 0;
+
+ if (stat (buf, &st) < 0)
+ grub_util_error ("cannot stat %s: %s", buf, strerror (errno));
+
+ /* buf is another filesystem; we found it. */
+ if (st.st_dev != num)
+ {
+ /* offset == 0 means path given is the mount point.
+ This works around special-casing of "/" in Un*x. This function never
+ prints trailing slashes (so that its output can be appended a slash
+ unconditionally). Each slash in is considered a preceding slash, and
+ therefore the root directory is an empty string. */
+ if (offset == 0)
+ {
+ free (buf);
+#ifdef __linux__
+ {
+ char *bind;
+ grub_free (grub_find_root_device_from_mountinfo (buf2, &bind));
+ if (bind && bind[0] && bind[1])
+ {
+ buf3 = bind;
+ goto parsedir;
+ }
+ grub_free (bind);
+ }
+#endif
+ free (buf2);
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+ if (poolfs)
+ return xasprintf ("/%s/@", poolfs);
+#endif
+ return xstrdup ("");
+ }
+ else
+ break;
+ }
+
+ offset = p - buf;
+ /* offset == 1 means root directory. */
+ if (offset == 1)
+ {
+ /* Include leading slash. */
+ offset = 0;
+ break;
+ }
+ }
+ free (buf);
+ buf3 = xstrdup (buf2 + offset);
+ buf2[offset] = 0;
+#ifdef __linux__
+ {
+ char *bind;
+ grub_free (grub_find_root_device_from_mountinfo (buf2, &bind));
+ if (bind && bind[0] && bind[1])
+ {
+ char *temp = buf3;
+ buf3 = grub_xasprintf ("%s%s%s", bind, buf3[0] == '/' ?"":"/", buf3);
+ grub_free (temp);
+ }
+ grub_free (bind);
+ }
+#endif
+
+ free (buf2);
+
+#ifdef __CYGWIN__
+ if (st.st_dev != (DEV_CYGDRIVE_MAJOR << 16))
+ {
+ /* Reached some mount point not below /cygdrive.
+ GRUB does not know Cygwin's emulated mounts,
+ convert to Win32 path. */
+ grub_util_info ("Cygwin path = %s\n", buf3);
+ char * temp = get_win32_path (buf3);
+ free (buf3);
+ buf3 = temp;
+ }
+#endif
+
+ parsedir:
+ /* Remove trailing slashes, return empty string if root directory. */
+ len = strlen (buf3);
+ while (len > 0 && buf3[len - 1] == '/')
+ {
+ buf3[len - 1] = '\0';
+ len--;
+ }
+
+#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+ if (poolfs)
+ {
+ ret = xasprintf ("/%s/@%s", poolfs, buf3);
+ free (buf3);
+ }
+ else
+#endif
+ ret = buf3;
+
+ return ret;
+}
+
+#ifdef HAVE_DEVICE_MAPPER
+static void device_mapper_null_log (int level __attribute__ ((unused)),
+ const char *file __attribute__ ((unused)),
+ int line __attribute__ ((unused)),
+ int dm_errno __attribute__ ((unused)),
+ const char *f __attribute__ ((unused)),
+ ...)
+{
+}
+
+int
+grub_device_mapper_supported (void)
+{
+ static int supported = -1;
+
+ if (supported == -1)
+ {
+ struct dm_task *dmt;
+
+ /* Suppress annoying log messages. */
+ dm_log_with_errno_init (&device_mapper_null_log);
+
+ dmt = dm_task_create (DM_DEVICE_VERSION);
+ supported = (dmt != NULL);
+ if (dmt)
+ dm_task_destroy (dmt);
+
+ /* Restore the original logger. */
+ dm_log_with_errno_init (NULL);
+ }
+
+ return supported;
+}
+#endif /* HAVE_DEVICE_MAPPER */
diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c
new file mode 100644
index 0000000..6a70efb
--- /dev/null
+++ b/grub-core/kern/emu/mm.c
@@ -0,0 +1,87 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config-util.h>
+
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <stdlib.h>
+#include <string.h>
+
+void *
+grub_malloc (grub_size_t size)
+{
+ void *ret;
+ ret = malloc (size);
+ if (!ret)
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+ return ret;
+}
+
+void *
+grub_zalloc (grub_size_t size)
+{
+ void *ret;
+
+ ret = grub_malloc (size);
+ if (!ret)
+ return NULL;
+ memset (ret, 0, size);
+ return ret;
+}
+
+void
+grub_free (void *ptr)
+{
+ free (ptr);
+}
+
+void *
+grub_realloc (void *ptr, grub_size_t size)
+{
+ void *ret;
+ ret = realloc (ptr, size);
+ if (!ret)
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+ return ret;
+}
+
+void *
+grub_memalign (grub_size_t align, grub_size_t size)
+{
+ void *p;
+
+#if defined(HAVE_POSIX_MEMALIGN)
+ if (align < sizeof (void *))
+ align = sizeof (void *);
+ if (posix_memalign (&p, align, size) != 0)
+ p = 0;
+#elif defined(HAVE_MEMALIGN)
+ p = memalign (align, size);
+#else
+ (void) align;
+ (void) size;
+ grub_util_error ("grub_memalign is not supported");
+#endif
+
+ if (!p)
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+
+ return p;
+}
diff --git a/grub-core/kern/emu/time.c b/grub-core/kern/emu/time.c
new file mode 100644
index 0000000..5da8092
--- /dev/null
+++ b/grub-core/kern/emu/time.c
@@ -0,0 +1,46 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/datetime.h>
+#include <time.h>
+
+grub_err_t
+grub_get_datetime (struct grub_datetime *datetime)
+{
+ struct tm *mytm;
+ time_t mytime;
+
+ mytime = time (&mytime);
+ mytm = gmtime (&mytime);
+
+ datetime->year = mytm->tm_year + 1900;
+ datetime->month = mytm->tm_mon + 1;
+ datetime->day = mytm->tm_mday;
+ datetime->hour = mytm->tm_hour;
+ datetime->minute = mytm->tm_min;
+ datetime->second = mytm->tm_sec;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_set_datetime (struct grub_datetime *datetime __attribute__ ((unused)))
+{
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "no clock setting routine available");
+}
diff --git a/grub-core/kern/env.c b/grub-core/kern/env.c
new file mode 100644
index 0000000..8f843a8
--- /dev/null
+++ b/grub-core/kern/env.c
@@ -0,0 +1,262 @@
+/* env.c - Environment variables */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/env.h>
+#include <grub/env_private.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+
+/* The initial context. */
+static struct grub_env_context initial_context;
+
+/* The current context. */
+struct grub_env_context *grub_current_context = &initial_context;
+
+/* Return the hash representation of the string S. */
+static unsigned int
+grub_env_hashval (const char *s)
+{
+ unsigned int i = 0;
+
+ /* XXX: This can be done much more efficiently. */
+ while (*s)
+ i += 5 * *(s++);
+
+ return i % HASHSZ;
+}
+
+struct grub_env_var *
+grub_env_find (const char *name)
+{
+ struct grub_env_var *var;
+ int idx = grub_env_hashval (name);
+
+ /* Look for the variable in the current context. */
+ for (var = grub_current_context->vars[idx]; var; var = var->next)
+ if (grub_strcmp (var->name, name) == 0)
+ return var;
+
+ return 0;
+}
+
+static void
+grub_env_insert (struct grub_env_context *context,
+ struct grub_env_var *var)
+{
+ int idx = grub_env_hashval (var->name);
+
+ /* Insert the variable into the hashtable. */
+ var->prevp = &context->vars[idx];
+ var->next = context->vars[idx];
+ if (var->next)
+ var->next->prevp = &(var->next);
+ context->vars[idx] = var;
+}
+
+static void
+grub_env_remove (struct grub_env_var *var)
+{
+ /* Remove the entry from the variable table. */
+ *var->prevp = var->next;
+ if (var->next)
+ var->next->prevp = var->prevp;
+}
+
+grub_err_t
+grub_env_set (const char *name, const char *val)
+{
+ struct grub_env_var *var;
+
+ /* If the variable does already exist, just update the variable. */
+ var = grub_env_find (name);
+ if (var)
+ {
+ char *old = var->value;
+
+ if (var->write_hook)
+ var->value = var->write_hook (var, val);
+ else
+ var->value = grub_strdup (val);
+
+ if (! var->value)
+ {
+ var->value = old;
+ return grub_errno;
+ }
+
+ grub_free (old);
+ return GRUB_ERR_NONE;
+ }
+
+ /* The variable does not exist, so create a new one. */
+ var = grub_zalloc (sizeof (*var));
+ if (! var)
+ return grub_errno;
+
+ /* This is not necessary. But leave this for readability. */
+ var->global = 0;
+
+ var->name = grub_strdup (name);
+ if (! var->name)
+ goto fail;
+
+ var->value = grub_strdup (val);
+ if (! var->value)
+ goto fail;
+
+ grub_env_insert (grub_current_context, var);
+
+ return GRUB_ERR_NONE;
+
+ fail:
+ grub_free (var->name);
+ grub_free (var->value);
+ grub_free (var);
+
+ return grub_errno;
+}
+
+char *
+grub_env_get (const char *name)
+{
+ struct grub_env_var *var;
+
+ var = grub_env_find (name);
+ if (! var)
+ return 0;
+
+ if (var->read_hook)
+ return var->read_hook (var, var->value);
+
+ return var->value;
+}
+
+void
+grub_env_unset (const char *name)
+{
+ struct grub_env_var *var;
+
+ var = grub_env_find (name);
+ if (! var)
+ return;
+
+ if (var->read_hook || var->write_hook)
+ {
+ grub_env_set (name, "");
+ return;
+ }
+
+ grub_env_remove (var);
+
+ grub_free (var->name);
+ grub_free (var->value);
+ grub_free (var);
+}
+
+void
+grub_env_iterate (int (*func) (struct grub_env_var *var))
+{
+ struct grub_env_sorted_var *sorted_list = 0;
+ struct grub_env_sorted_var *sorted_var;
+ int i;
+
+ /* Add variables associated with this context into a sorted list. */
+ for (i = 0; i < HASHSZ; i++)
+ {
+ struct grub_env_var *var;
+
+ for (var = grub_current_context->vars[i]; var; var = var->next)
+ {
+ struct grub_env_sorted_var *p, **q;
+
+ sorted_var = grub_malloc (sizeof (*sorted_var));
+ if (! sorted_var)
+ goto fail;
+
+ sorted_var->var = var;
+
+ for (q = &sorted_list, p = *q; p; q = &((*q)->next), p = *q)
+ {
+ if (grub_strcmp (p->var->name, var->name) > 0)
+ break;
+ }
+
+ sorted_var->next = *q;
+ *q = sorted_var;
+ }
+ }
+
+ /* Iterate FUNC on the sorted list. */
+ for (sorted_var = sorted_list; sorted_var; sorted_var = sorted_var->next)
+ if (func (sorted_var->var))
+ break;
+
+ fail:
+
+ /* Free the sorted list. */
+ for (sorted_var = sorted_list; sorted_var; )
+ {
+ struct grub_env_sorted_var *tmp = sorted_var->next;
+
+ grub_free (sorted_var);
+ sorted_var = tmp;
+ }
+}
+
+grub_err_t
+grub_register_variable_hook (const char *name,
+ grub_env_read_hook_t read_hook,
+ grub_env_write_hook_t write_hook)
+{
+ struct grub_env_var *var = grub_env_find (name);
+
+ if (! var)
+ {
+ if (grub_env_set (name, "") != GRUB_ERR_NONE)
+ return grub_errno;
+
+ var = grub_env_find (name);
+ /* XXX Insert an assertion? */
+ }
+
+ var->read_hook = read_hook;
+ var->write_hook = write_hook;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_env_export (const char *name)
+{
+ struct grub_env_var *var;
+
+ var = grub_env_find (name);
+ if (! var)
+ {
+ grub_err_t err;
+
+ err = grub_env_set (name, "");
+ if (err)
+ return err;
+ var = grub_env_find (name);
+ }
+ var->global = 1;
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/kern/err.c b/grub-core/kern/err.c
new file mode 100644
index 0000000..74f3915
--- /dev/null
+++ b/grub-core/kern/err.c
@@ -0,0 +1,139 @@
+/* err.c - error handling routines */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <stdarg.h>
+#include <grub/i18n.h>
+
+#define GRUB_MAX_ERRMSG 256
+#define GRUB_ERROR_STACK_SIZE 10
+
+grub_err_t grub_errno;
+char grub_errmsg[GRUB_MAX_ERRMSG];
+int grub_err_printed_errors;
+
+static struct
+{
+ grub_err_t errno;
+ char errmsg[GRUB_MAX_ERRMSG];
+} grub_error_stack_items[GRUB_ERROR_STACK_SIZE];
+
+static int grub_error_stack_pos;
+static int grub_error_stack_assert;
+
+grub_err_t
+grub_error (grub_err_t n, const char *fmt, ...)
+{
+ va_list ap;
+
+ grub_errno = n;
+
+ va_start (ap, fmt);
+ grub_vsnprintf (grub_errmsg, sizeof (grub_errmsg), _(fmt), ap);
+ va_end (ap);
+
+ return n;
+}
+
+void
+grub_fatal (const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ grub_vprintf (_(fmt), ap);
+ va_end (ap);
+
+ grub_abort ();
+}
+
+void
+grub_error_push (void)
+{
+ /* Only add items to stack, if there is enough room. */
+ if (grub_error_stack_pos < GRUB_ERROR_STACK_SIZE)
+ {
+ /* Copy active error message to stack. */
+ grub_error_stack_items[grub_error_stack_pos].errno = grub_errno;
+ grub_memcpy (grub_error_stack_items[grub_error_stack_pos].errmsg,
+ grub_errmsg,
+ sizeof (grub_errmsg));
+
+ /* Advance to next error stack position. */
+ grub_error_stack_pos++;
+ }
+ else
+ {
+ /* There is no room for new error message. Discard new error message
+ and mark error stack assertion flag. */
+ grub_error_stack_assert = 1;
+ }
+
+ /* Allow further operation of other components by resetting
+ active errno to GRUB_ERR_NONE. */
+ grub_errno = GRUB_ERR_NONE;
+}
+
+int
+grub_error_pop (void)
+{
+ if (grub_error_stack_pos > 0)
+ {
+ /* Pop error message from error stack to current active error. */
+ grub_error_stack_pos--;
+
+ grub_errno = grub_error_stack_items[grub_error_stack_pos].errno;
+ grub_memcpy (grub_errmsg,
+ grub_error_stack_items[grub_error_stack_pos].errmsg,
+ sizeof (grub_errmsg));
+
+ return 1;
+ }
+ else
+ {
+ /* There is no more items on error stack, reset to no error state. */
+ grub_errno = GRUB_ERR_NONE;
+
+ return 0;
+ }
+}
+
+void
+grub_print_error (void)
+{
+ /* Print error messages in reverse order. First print active error message
+ and then empty error stack. */
+ do
+ {
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_err_printf (_("error: %s.\n"), grub_errmsg);
+ grub_err_printed_errors++;
+ }
+ }
+ while (grub_error_pop ());
+
+ /* If there was an assert while using error stack, report about it. */
+ if (grub_error_stack_assert)
+ {
+ grub_err_printf ("assert: error stack overflow detected!\n");
+ grub_error_stack_assert = 0;
+ }
+}
diff --git a/grub-core/kern/file.c b/grub-core/kern/file.c
new file mode 100644
index 0000000..9d5a51c
--- /dev/null
+++ b/grub-core/kern/file.c
@@ -0,0 +1,186 @@
+/* file.c - file I/O functions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/fs.h>
+#include <grub/device.h>
+
+grub_file_filter_t grub_file_filters_all[GRUB_FILE_FILTER_MAX];
+grub_file_filter_t grub_file_filters_enabled[GRUB_FILE_FILTER_MAX];
+
+/* Get the device part of the filename NAME. It is enclosed by parentheses. */
+char *
+grub_file_get_device_name (const char *name)
+{
+ if (name[0] == '(')
+ {
+ char *p = grub_strchr (name, ')');
+ char *ret;
+
+ if (! p)
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "missing `)'");
+ return 0;
+ }
+
+ ret = (char *) grub_malloc (p - name);
+ if (! ret)
+ return 0;
+
+ grub_memcpy (ret, name + 1, p - name - 1);
+ ret[p - name - 1] = '\0';
+ return ret;
+ }
+
+ return 0;
+}
+
+grub_file_t
+grub_file_open (const char *name)
+{
+ grub_device_t device = 0;
+ grub_file_t file = 0, last_file = 0;
+ char *device_name;
+ char *file_name;
+ grub_file_filter_id_t filter;
+
+ device_name = grub_file_get_device_name (name);
+ if (grub_errno)
+ goto fail;
+
+ /* Get the file part of NAME. */
+ file_name = (name[0] == '(') ? grub_strchr (name, ')') : NULL;
+ if (file_name)
+ file_name++;
+ else
+ file_name = (char *) name;
+
+ device = grub_device_open (device_name);
+ grub_free (device_name);
+ if (! device)
+ goto fail;
+
+ file = (grub_file_t) grub_zalloc (sizeof (*file));
+ if (! file)
+ goto fail;
+
+ file->device = device;
+
+ if (device->disk && file_name[0] != '/')
+ /* This is a block list. */
+ file->fs = &grub_fs_blocklist;
+ else
+ {
+ file->fs = grub_fs_probe (device);
+ if (! file->fs)
+ goto fail;
+ }
+
+ if ((file->fs->open) (file, file_name) != GRUB_ERR_NONE)
+ goto fail;
+
+ for (filter = 0; file && filter < ARRAY_SIZE (grub_file_filters_enabled);
+ filter++)
+ if (grub_file_filters_enabled[filter])
+ {
+ last_file = file;
+ file = grub_file_filters_enabled[filter] (file);
+ }
+ if (!file)
+ grub_file_close (last_file);
+
+ grub_memcpy (grub_file_filters_enabled, grub_file_filters_all,
+ sizeof (grub_file_filters_enabled));
+
+ return file;
+
+ fail:
+ if (device)
+ grub_device_close (device);
+
+ /* if (net) grub_net_close (net); */
+
+ grub_free (file);
+
+ grub_memcpy (grub_file_filters_enabled, grub_file_filters_all,
+ sizeof (grub_file_filters_enabled));
+
+ return 0;
+}
+
+grub_ssize_t
+grub_file_read (grub_file_t file, void *buf, grub_size_t len)
+{
+ grub_ssize_t res;
+
+ if (file->offset > file->size)
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "attempt to read past the end of file");
+ return -1;
+ }
+
+ if (len == 0 || len > file->size - file->offset)
+ len = file->size - file->offset;
+
+ /* Prevent an overflow. */
+ if ((grub_ssize_t) len < 0)
+ len >>= 1;
+
+ if (len == 0)
+ return 0;
+
+ res = (file->fs->read) (file, buf, len);
+ if (res > 0)
+ file->offset += res;
+
+ return res;
+}
+
+grub_err_t
+grub_file_close (grub_file_t file)
+{
+ if (file->fs->close)
+ (file->fs->close) (file);
+
+ if (file->device)
+ grub_device_close (file->device);
+ grub_free (file);
+ return grub_errno;
+}
+
+grub_off_t
+grub_file_seek (grub_file_t file, grub_off_t offset)
+{
+ grub_off_t old;
+
+ if (offset > file->size)
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "attempt to seek outside of the file");
+ return -1;
+ }
+
+ old = file->offset;
+ file->offset = offset;
+ return old;
+}
diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c
new file mode 100644
index 0000000..cf800f4
--- /dev/null
+++ b/grub-core/kern/fs.c
@@ -0,0 +1,231 @@
+/* fs.c - filesystem manager */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/net.h>
+#include <grub/fs.h>
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/term.h>
+
+grub_fs_t grub_fs_list = 0;
+
+grub_fs_autoload_hook_t grub_fs_autoload_hook = 0;
+
+grub_fs_t
+grub_fs_probe (grub_device_t device)
+{
+ grub_fs_t p;
+ auto int dummy_func (const char *filename,
+ const struct grub_dirhook_info *info);
+
+ int dummy_func (const char *filename __attribute__ ((unused)),
+ const struct grub_dirhook_info *info __attribute__ ((unused)))
+ {
+ return 1;
+ }
+
+ if (device->disk)
+ {
+ /* Make it sure not to have an infinite recursive calls. */
+ static int count = 0;
+
+ for (p = grub_fs_list; p; p = p->next)
+ {
+ grub_dprintf ("fs", "Detecting %s...\n", p->name);
+ (p->dir) (device, "/", dummy_func);
+ if (grub_errno == GRUB_ERR_NONE)
+ return p;
+
+ grub_error_push ();
+ grub_dprintf ("fs", "%s detection failed.\n", p->name);
+ grub_error_pop ();
+
+ if (grub_errno != GRUB_ERR_BAD_FS)
+ return 0;
+
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ /* Let's load modules automatically. */
+ if (grub_fs_autoload_hook && count == 0)
+ {
+ count++;
+
+ while (grub_fs_autoload_hook ())
+ {
+ p = grub_fs_list;
+
+ (p->dir) (device, "/", dummy_func);
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ count--;
+ return p;
+ }
+
+ if (grub_errno != GRUB_ERR_BAD_FS)
+ {
+ count--;
+ return 0;
+ }
+
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ count--;
+ }
+ }
+ else if (device->net->fs)
+ return device->net->fs;
+
+ grub_error (GRUB_ERR_UNKNOWN_FS, "unknown filesystem");
+ return 0;
+}
+
+
+
+/* Block list support routines. */
+
+struct grub_fs_block
+{
+ grub_disk_addr_t offset;
+ unsigned long length;
+};
+
+static grub_err_t
+grub_fs_blocklist_open (grub_file_t file, const char *name)
+{
+ char *p = (char *) name;
+ unsigned num = 0;
+ unsigned i;
+ grub_disk_t disk = file->device->disk;
+ struct grub_fs_block *blocks;
+
+ /* First, count the number of blocks. */
+ do
+ {
+ num++;
+ p = grub_strchr (p, ',');
+ if (p)
+ p++;
+ }
+ while (p);
+
+ /* Allocate a block list. */
+ blocks = grub_zalloc (sizeof (struct grub_fs_block) * (num + 1));
+ if (! blocks)
+ return 0;
+
+ file->size = 0;
+ p = (char *) name;
+ for (i = 0; i < num; i++)
+ {
+ if (*p != '+')
+ {
+ blocks[i].offset = grub_strtoull (p, &p, 0);
+ if (grub_errno != GRUB_ERR_NONE || *p != '+')
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME,
+ "invalid file name `%s'", name);
+ goto fail;
+ }
+ }
+
+ p++;
+ blocks[i].length = grub_strtoul (p, &p, 0);
+ if (grub_errno != GRUB_ERR_NONE
+ || blocks[i].length == 0
+ || (*p && *p != ',' && ! grub_isspace (*p)))
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME,
+ "invalid file name `%s'", name);
+ goto fail;
+ }
+
+ if (disk->total_sectors < blocks[i].offset + blocks[i].length)
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "beyond the total sectors");
+ goto fail;
+ }
+
+ file->size += (blocks[i].length << GRUB_DISK_SECTOR_BITS);
+ p++;
+ }
+
+ file->data = blocks;
+
+ return GRUB_ERR_NONE;
+
+ fail:
+ grub_free (blocks);
+ return grub_errno;
+}
+
+static grub_ssize_t
+grub_fs_blocklist_read (grub_file_t file, char *buf, grub_size_t len)
+{
+ struct grub_fs_block *p;
+ grub_disk_addr_t sector;
+ grub_off_t offset;
+ grub_ssize_t ret = 0;
+
+ if (len > file->size - file->offset)
+ len = file->size - file->offset;
+
+ sector = (file->offset >> GRUB_DISK_SECTOR_BITS);
+ offset = (file->offset & (GRUB_DISK_SECTOR_SIZE - 1));
+ for (p = file->data; p->length && len > 0; p++)
+ {
+ if (sector < p->length)
+ {
+ grub_size_t size;
+
+ size = len;
+ if (((size + offset + GRUB_DISK_SECTOR_SIZE - 1)
+ >> GRUB_DISK_SECTOR_BITS) > p->length - sector)
+ size = ((p->length - sector) << GRUB_DISK_SECTOR_BITS) - offset;
+
+ if (grub_disk_read (file->device->disk, p->offset + sector, offset,
+ size, buf) != GRUB_ERR_NONE)
+ return -1;
+
+ ret += size;
+ len -= size;
+ sector -= ((size + offset) >> GRUB_DISK_SECTOR_BITS);
+ offset = ((size + offset) & (GRUB_DISK_SECTOR_SIZE - 1));
+ }
+ else
+ sector -= p->length;
+ }
+
+ return ret;
+}
+
+struct grub_fs grub_fs_blocklist =
+ {
+ .name = "blocklist",
+ .dir = 0,
+ .open = grub_fs_blocklist_open,
+ .read = grub_fs_blocklist_read,
+ .close = 0,
+ .next = 0
+ };
diff --git a/grub-core/kern/generic/millisleep.c b/grub-core/kern/generic/millisleep.c
new file mode 100644
index 0000000..9d5971f
--- /dev/null
+++ b/grub-core/kern/generic/millisleep.c
@@ -0,0 +1,39 @@
+/* millisleep.c - generic millisleep function.
+ * The generic implementation of these functions can be used for architectures
+ * or platforms that do not have a more specialized implementation. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/time.h>
+
+void
+grub_millisleep (grub_uint32_t ms)
+{
+ grub_uint64_t start;
+
+ start = grub_get_time_ms ();
+
+ /* Instead of setting an end time and looping while the current time is
+ less than that, comparing the elapsed sleep time with the desired sleep
+ time handles the (unlikely!) case that the timer would wrap around
+ during the sleep. */
+
+ while (grub_get_time_ms () - start < ms)
+ grub_cpu_idle ();
+}
diff --git a/grub-core/kern/generic/rtc_get_time_ms.c b/grub-core/kern/generic/rtc_get_time_ms.c
new file mode 100644
index 0000000..3592336
--- /dev/null
+++ b/grub-core/kern/generic/rtc_get_time_ms.c
@@ -0,0 +1,37 @@
+/* rtc_get_time_ms.c - get_time_ms implementation using platform RTC.
+ * The generic implementation of these functions can be used for architectures
+ * or platforms that do not have a more specialized implementation. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/time.h>
+#include <grub/misc.h>
+
+/* Calculate the time in milliseconds since the epoch based on the RTC. */
+grub_uint64_t
+grub_rtc_get_time_ms (void)
+{
+ /* By dimensional analysis:
+
+ 1000 ms N rtc ticks 1 s
+ ------- * ----------- * ----------- = 1000*N/T ms
+ 1 s 1 T rtc ticks
+ */
+ grub_uint64_t ticks_ms_per_sec = ((grub_uint64_t) 1000) * grub_get_rtc ();
+ return grub_divmod64 (ticks_ms_per_sec, GRUB_TICKS_PER_SECOND, 0);
+}
diff --git a/grub-core/kern/i386/coreboot/init.c b/grub-core/kern/i386/coreboot/init.c
new file mode 100644
index 0000000..434b9b5
--- /dev/null
+++ b/grub-core/kern/i386/coreboot/init.c
@@ -0,0 +1,132 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/mm.h>
+#include <grub/machine/time.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/console.h>
+#include <grub/offsets.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/loader.h>
+#include <grub/env.h>
+#include <grub/cache.h>
+#include <grub/time.h>
+#include <grub/symbol.h>
+#include <grub/cpu/io.h>
+#include <grub/cpu/floppy.h>
+#include <grub/cpu/tsc.h>
+#ifdef GRUB_MACHINE_QEMU
+#include <grub/machine/kernel.h>
+#endif
+
+extern char _start[];
+extern char _end[];
+
+grub_uint32_t
+grub_get_rtc (void)
+{
+ grub_fatal ("grub_get_rtc() is not implemented.\n");
+}
+
+void
+grub_exit (void)
+{
+ /* We can't use grub_fatal() in this function. This would create an infinite
+ loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
+ while (1)
+ grub_cpu_idle ();
+}
+
+void
+grub_machine_init (void)
+{
+#ifdef GRUB_MACHINE_QEMU
+ grub_qemu_init_cirrus ();
+#endif
+ /* Initialize the console as early as possible. */
+ grub_vga_text_init ();
+
+ auto int NESTED_FUNC_ATTR heap_init (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR heap_init (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+#if GRUB_CPU_SIZEOF_VOID_P == 4
+ /* Restrict ourselves to 32-bit memory space. */
+ if (addr > GRUB_ULONG_MAX)
+ return 0;
+ if (addr + size > GRUB_ULONG_MAX)
+ size = GRUB_ULONG_MAX - addr;
+#endif
+
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+
+ /* Avoid the lower memory. */
+ if (addr < GRUB_MEMORY_MACHINE_LOWER_SIZE)
+ {
+ if (addr + size <= GRUB_MEMORY_MACHINE_LOWER_SIZE)
+ return 0;
+ else
+ {
+ size -= GRUB_MEMORY_MACHINE_LOWER_SIZE - addr;
+ addr = GRUB_MEMORY_MACHINE_LOWER_SIZE;
+ }
+ }
+
+ grub_mm_init_region ((void *) (grub_addr_t) addr, (grub_size_t) size);
+
+ return 0;
+ }
+
+#if defined (GRUB_MACHINE_MULTIBOOT) || defined (GRUB_MACHINE_QEMU)
+ grub_machine_mmap_init ();
+#endif
+ grub_machine_mmap_iterate (heap_init);
+
+ grub_tsc_init ();
+}
+
+void
+grub_machine_set_prefix (void)
+{
+ /* Initialize the prefix. */
+ grub_env_set ("prefix", grub_prefix);
+}
+
+void
+grub_machine_fini (void)
+{
+ grub_vga_text_fini ();
+ grub_stop_floppy ();
+}
+
+/* Return the end of the core image. */
+grub_addr_t
+grub_arch_modules_addr (void)
+{
+#ifdef GRUB_MACHINE_QEMU
+ return grub_core_entry_addr + grub_kernel_image_size;
+#else
+ return ALIGN_UP((grub_addr_t) _end, GRUB_KERNEL_MACHINE_MOD_ALIGN);
+#endif
+}
diff --git a/grub-core/kern/i386/coreboot/mmap.c b/grub-core/kern/i386/coreboot/mmap.c
new file mode 100644
index 0000000..8b0b202
--- /dev/null
+++ b/grub-core/kern/i386/coreboot/mmap.c
@@ -0,0 +1,108 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/memory.h>
+#include <grub/machine/lbio.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+
+static grub_err_t
+grub_linuxbios_table_iterate (int (*hook) (grub_linuxbios_table_item_t))
+{
+ grub_linuxbios_table_header_t table_header;
+ grub_linuxbios_table_item_t table_item;
+
+ auto int check_signature (grub_linuxbios_table_header_t);
+ int check_signature (grub_linuxbios_table_header_t tbl_header)
+ {
+ if (! grub_memcmp (tbl_header->signature, "LBIO", 4))
+ return 1;
+
+ return 0;
+ }
+
+ /* Assuming table_header is aligned to its size (8 bytes). */
+
+ for (table_header = (grub_linuxbios_table_header_t) 0x500;
+ table_header < (grub_linuxbios_table_header_t) 0x1000; table_header++)
+ if (check_signature (table_header))
+ goto signature_found;
+
+ for (table_header = (grub_linuxbios_table_header_t) 0xf0000;
+ table_header < (grub_linuxbios_table_header_t) 0x100000; table_header++)
+ if (check_signature (table_header))
+ goto signature_found;
+
+ grub_fatal ("Could not find coreboot table\n");
+
+signature_found:
+
+ table_item =
+ (grub_linuxbios_table_item_t) ((long) table_header +
+ (long) table_header->size);
+ for (; table_item->size;
+ table_item = (grub_linuxbios_table_item_t) ((long) table_item + (long) table_item->size))
+ {
+ if (table_item->tag == GRUB_LINUXBIOS_MEMBER_LINK
+ && check_signature ((grub_linuxbios_table_header_t) (grub_addr_t)
+ *(grub_uint64_t *) (table_item + 1)))
+ {
+ table_header = (grub_linuxbios_table_header_t) (grub_addr_t)
+ *(grub_uint64_t *) (table_item + 1);
+ goto signature_found;
+ }
+ if (hook (table_item))
+ return 1;
+ }
+
+ return 0;
+}
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ mem_region_t mem_region;
+
+ auto int iterate_linuxbios_table (grub_linuxbios_table_item_t);
+ int iterate_linuxbios_table (grub_linuxbios_table_item_t table_item)
+ {
+ if (table_item->tag != GRUB_LINUXBIOS_MEMBER_MEMORY)
+ return 0;
+
+ mem_region =
+ (mem_region_t) ((long) table_item +
+ sizeof (struct grub_linuxbios_table_item));
+ while ((long) mem_region < (long) table_item + (long) table_item->size)
+ {
+ if (hook (mem_region->addr, mem_region->size,
+ /* Multiboot mmaps match with the coreboot mmap definition.
+ Therefore, we can just pass type through. */
+ mem_region->type))
+ return 1;
+
+ mem_region++;
+ }
+
+ return 0;
+ }
+
+ grub_linuxbios_table_iterate (iterate_linuxbios_table);
+
+ return 0;
+}
diff --git a/grub-core/kern/i386/coreboot/startup.S b/grub-core/kern/i386/coreboot/startup.S
new file mode 100644
index 0000000..cac023d
--- /dev/null
+++ b/grub-core/kern/i386/coreboot/startup.S
@@ -0,0 +1,89 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+/* For stack parameters. */
+#include <grub/i386/pc/memory.h>
+#include <grub/machine/memory.h>
+#include <grub/cpu/linux.h>
+#include <grub/offsets.h>
+#include <multiboot.h>
+#include <multiboot2.h>
+
+/*
+ * Note: GRUB is compiled with the options -mrtd and -mregparm=3.
+ * So the first three arguments are passed in %eax, %edx, and %ecx,
+ * respectively, and if a function has a fixed number of arguments
+ * and the number if greater than three, the function must return
+ * with "ret $N" where N is ((the number of arguments) - 3) * 4.
+ */
+
+ .file "startup.S"
+ .text
+ .globl start, _start
+start:
+_start:
+ jmp codestart
+
+ /*
+ * This is a special data area at a fixed offset from the beginning.
+ */
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX
+
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX_END
+
+/*
+ * Support for booting GRUB from a Multiboot boot loader (e.g. GRUB itself).
+ */
+ .p2align 2 /* force 4-byte alignment */
+multiboot_header:
+ /* magic */
+ .long 0x1BADB002
+ /* flags */
+ .long MULTIBOOT_MEMORY_INFO
+ /* checksum */
+ .long -0x1BADB002 - MULTIBOOT_MEMORY_INFO
+
+codestart:
+#ifdef GRUB_MACHINE_MULTIBOOT
+ cmpl $MULTIBOOT_BOOTLOADER_MAGIC, %eax
+ jne 0f
+ movl %ebx, EXT_C(startup_multiboot_info)
+0:
+#endif
+
+ /* initialize the stack */
+ movl $GRUB_MEMORY_MACHINE_PROT_STACK, %esp
+
+ /* jump to the main body of C code */
+ jmp EXT_C(grub_main)
+
+/*
+ * prot_to_real and associated structures (but NOT real_to_prot, that is
+ * only needed for BIOS gates).
+ */
+#include "../realmode.S"
+
diff --git a/grub-core/kern/i386/dl.c b/grub-core/kern/i386/dl.c
new file mode 100644
index 0000000..5785496
--- /dev/null
+++ b/grub-core/kern/i386/dl.c
@@ -0,0 +1,109 @@
+/* dl-386.c - arch-dependent part of loadable module support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/elf.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+
+/* Check if EHDR is a valid ELF header. */
+grub_err_t
+grub_arch_dl_check_header (void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+
+ /* Check the magic numbers. */
+ if (e->e_ident[EI_CLASS] != ELFCLASS32
+ || e->e_ident[EI_DATA] != ELFDATA2LSB
+ || e->e_machine != EM_386)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch specific ELF magic");
+
+ return GRUB_ERR_NONE;
+}
+
+/* Relocate symbols. */
+grub_err_t
+grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+ Elf_Shdr *s;
+ Elf_Word entsize;
+ unsigned i;
+
+ /* Find a symbol table. */
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no symtab found");
+
+ entsize = s->sh_entsize;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_REL)
+ {
+ grub_dl_segment_t seg;
+
+ /* Find the target segment. */
+ for (seg = mod->segment; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf_Rel *rel, *max;
+
+ for (rel = (Elf_Rel *) ((char *) e + s->sh_offset),
+ max = rel + s->sh_size / s->sh_entsize;
+ rel < max;
+ rel++)
+ {
+ Elf_Word *addr;
+ Elf_Sym *sym;
+
+ if (seg->size < rel->r_offset)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "reloc offset is out of the segment");
+
+ addr = (Elf_Word *) ((char *) seg->addr + rel->r_offset);
+ sym = (Elf_Sym *) ((char *) mod->symtab
+ + entsize * ELF_R_SYM (rel->r_info));
+
+ switch (ELF_R_TYPE (rel->r_info))
+ {
+ case R_386_32:
+ *addr += sym->st_value;
+ break;
+
+ case R_386_PC32:
+ *addr += (sym->st_value - (Elf_Word) seg->addr
+ - rel->r_offset);
+ break;
+ }
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/kern/i386/efi/init.c b/grub-core/kern/i386/efi/init.c
new file mode 100644
index 0000000..f73f828
--- /dev/null
+++ b/grub-core/kern/i386/efi/init.c
@@ -0,0 +1,47 @@
+/* init.c - initialize an x86-based EFI system */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/cache.h>
+#include <grub/kernel.h>
+#include <grub/efi/efi.h>
+#include <grub/i386/tsc.h>
+
+void
+grub_machine_init (void)
+{
+ grub_efi_init ();
+ grub_tsc_init ();
+}
+
+void
+grub_machine_fini (void)
+{
+ grub_efi_fini ();
+}
+
+void
+grub_machine_set_prefix (void)
+{
+ grub_efi_set_prefix ();
+}
diff --git a/grub-core/kern/i386/efi/startup.S b/grub-core/kern/i386/efi/startup.S
new file mode 100644
index 0000000..5b464ab
--- /dev/null
+++ b/grub-core/kern/i386/efi/startup.S
@@ -0,0 +1,66 @@
+/* startup.S - bootstrap GRUB itself */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/symbol.h>
+#include <grub/boot.h>
+
+ .file "startup.S"
+ .text
+ .globl start, _start
+start:
+_start:
+ jmp codestart
+
+ /*
+ * Compatibility version number
+ *
+ * These MUST be at byte offset 6 and 7 of the executable
+ * DO NOT MOVE !!!
+ */
+ . = _start + 0x6
+ .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
+
+ /*
+ * This is a special data area 8 bytes from the beginning.
+ */
+
+ . = _start + 0x8
+
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = _start + 0x50
+
+codestart:
+ /*
+ * EFI_SYSTEM_TABLE * and EFI_HANDLE are passed on the stack.
+ */
+ movl 4(%esp), %eax
+ movl %eax, EXT_C(grub_efi_image_handle)
+ movl 8(%esp), %eax
+ movl %eax, EXT_C(grub_efi_system_table)
+ call EXT_C(grub_main)
+ ret
+
+#include "../realmode.S"
diff --git a/grub-core/kern/i386/ieee1275/startup.S b/grub-core/kern/i386/ieee1275/startup.S
new file mode 100644
index 0000000..8208732
--- /dev/null
+++ b/grub-core/kern/i386/ieee1275/startup.S
@@ -0,0 +1,65 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/offsets.h>
+#include <grub/cpu/linux.h>
+#include <multiboot.h>
+#include <multiboot2.h>
+
+/*
+ * Note: GRUB is compiled with the options -mrtd and -mregparm=3.
+ * So the first three arguments are passed in %eax, %edx, and %ecx,
+ * respectively, and if a function has a fixed number of arguments
+ * and the number if greater than three, the function must return
+ * with "ret $N" where N is ((the number of arguments) - 3) * 4.
+ */
+
+ .file "startup.S"
+ .text
+ .globl start, _start
+
+start:
+_start:
+ jmp codestart
+
+ /*
+ * This is a special data area at a fixed offset from the beginning.
+ */
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX
+
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX_END
+
+codestart:
+ movl %eax, EXT_C(grub_ieee1275_entry_fn)
+ jmp EXT_C(grub_main)
+
+/*
+ * prot_to_real and associated structures (but NOT real_to_prot, that is
+ * only needed for BIOS gates).
+ */
+#include "../realmode.S"
+
diff --git a/grub-core/kern/i386/multiboot_mmap.c b/grub-core/kern/i386/multiboot_mmap.c
new file mode 100644
index 0000000..7f4bc3b
--- /dev/null
+++ b/grub-core/kern/i386/multiboot_mmap.c
@@ -0,0 +1,73 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/memory.h>
+#include <grub/types.h>
+#include <grub/multiboot.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+
+/* A pointer to the MBI in its initial location. */
+struct multiboot_info *startup_multiboot_info;
+
+/* The MBI has to be copied to our BSS so that it won't be
+ overwritten. This is its final location. */
+static struct multiboot_info kern_multiboot_info;
+
+/* Unfortunately we can't use heap at this point. But 32 looks like a sane
+ limit (used by memtest86). */
+static grub_uint8_t mmap_entries[sizeof (struct multiboot_mmap_entry) * 32];
+
+void
+grub_machine_mmap_init ()
+{
+ if (! startup_multiboot_info)
+ grub_fatal ("Unable to find Multiboot Information (is CONFIG_MULTIBOOT disabled in coreboot?)");
+
+ /* Move MBI to a safe place. */
+ grub_memmove (&kern_multiboot_info, startup_multiboot_info, sizeof (struct multiboot_info));
+
+ if ((kern_multiboot_info.flags & MULTIBOOT_INFO_MEM_MAP) == 0)
+ grub_fatal ("Missing Multiboot memory information");
+
+ /* Move the memory map to a safe place. */
+ if (kern_multiboot_info.mmap_length > sizeof (mmap_entries))
+ {
+ grub_printf ("WARNING: Memory map size exceeds limit (0x%x > 0x%x); it will be truncated\n",
+ kern_multiboot_info.mmap_length, sizeof (mmap_entries));
+ kern_multiboot_info.mmap_length = sizeof (mmap_entries);
+ }
+ grub_memmove (mmap_entries, (void *) kern_multiboot_info.mmap_addr, kern_multiboot_info.mmap_length);
+ kern_multiboot_info.mmap_addr = (grub_uint32_t) mmap_entries;
+}
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ struct multiboot_mmap_entry *entry = (void *) kern_multiboot_info.mmap_addr;
+
+ while ((unsigned long) entry < kern_multiboot_info.mmap_addr + kern_multiboot_info.mmap_length)
+ {
+ if (hook (entry->addr, entry->len, entry->type))
+ break;
+
+ entry = (void *) ((grub_addr_t) entry + entry->size + sizeof (entry->size));
+ }
+
+ return 0;
+}
diff --git a/grub-core/kern/i386/pc/init.c b/grub-core/kern/i386/pc/init.c
new file mode 100644
index 0000000..d8c337b
--- /dev/null
+++ b/grub-core/kern/i386/pc/init.c
@@ -0,0 +1,234 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/mm.h>
+#include <grub/machine/boot.h>
+#include <grub/i386/floppy.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/console.h>
+#include <grub/machine/kernel.h>
+#include <grub/machine/int.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/loader.h>
+#include <grub/env.h>
+#include <grub/cache.h>
+#include <grub/time.h>
+#include <grub/cpu/tsc.h>
+
+struct mem_region
+{
+ grub_addr_t addr;
+ grub_size_t size;
+};
+
+#define MAX_REGIONS 32
+
+static struct mem_region mem_regions[MAX_REGIONS];
+static int num_regions;
+
+static char *
+make_install_device (void)
+{
+ /* XXX: This should be enough. */
+ char dev[100], *ptr = dev;
+
+ if (grub_prefix[0] != '(')
+ {
+ /* No hardcoded root partition - make it from the boot drive and the
+ partition number encoded at the install time. */
+ if (grub_boot_drive == GRUB_BOOT_MACHINE_PXE_DL)
+ {
+ grub_strcpy (dev, "(pxe");
+ ptr += sizeof ("(pxe") - 1;
+ }
+ else
+ {
+ grub_snprintf (dev, sizeof (dev),
+ "(%cd%u", (grub_boot_drive & 0x80) ? 'h' : 'f',
+ grub_boot_drive & 0x7f);
+ ptr += grub_strlen (ptr);
+
+ if (grub_install_dos_part >= 0)
+ grub_snprintf (ptr, sizeof (dev) - (ptr - dev),
+ ",%u", grub_install_dos_part + 1);
+ ptr += grub_strlen (ptr);
+
+ if (grub_install_bsd_part >= 0)
+ grub_snprintf (ptr, sizeof (dev) - (ptr - dev), ",%u",
+ grub_install_bsd_part + 1);
+ ptr += grub_strlen (ptr);
+ }
+
+ grub_snprintf (ptr, sizeof (dev) - (ptr - dev), ")%s", grub_prefix);
+ grub_strcpy (grub_prefix, dev);
+ }
+ else if (grub_prefix[1] == ',' || grub_prefix[1] == ')')
+ {
+ /* We have a prefix, but still need to fill in the boot drive. */
+ grub_snprintf (dev, sizeof (dev),
+ "(%cd%u%s", (grub_boot_drive & 0x80) ? 'h' : 'f',
+ grub_boot_drive & 0x7f, grub_prefix + 1);
+ grub_strcpy (grub_prefix, dev);
+ }
+
+ return grub_prefix;
+}
+
+/* Add a memory region. */
+static void
+add_mem_region (grub_addr_t addr, grub_size_t size)
+{
+ if (num_regions == MAX_REGIONS)
+ /* Ignore. */
+ return;
+
+ mem_regions[num_regions].addr = addr;
+ mem_regions[num_regions].size = size;
+ num_regions++;
+}
+
+/* Compact memory regions. */
+static void
+compact_mem_regions (void)
+{
+ int i, j;
+
+ /* Sort them. */
+ for (i = 0; i < num_regions - 1; i++)
+ for (j = i + 1; j < num_regions; j++)
+ if (mem_regions[i].addr > mem_regions[j].addr)
+ {
+ struct mem_region tmp = mem_regions[i];
+ mem_regions[i] = mem_regions[j];
+ mem_regions[j] = tmp;
+ }
+
+ /* Merge overlaps. */
+ for (i = 0; i < num_regions - 1; i++)
+ if (mem_regions[i].addr + mem_regions[i].size >= mem_regions[i + 1].addr)
+ {
+ j = i + 1;
+
+ if (mem_regions[i].addr + mem_regions[i].size
+ < mem_regions[j].addr + mem_regions[j].size)
+ mem_regions[i].size = (mem_regions[j].addr + mem_regions[j].size
+ - mem_regions[i].addr);
+
+ grub_memmove (mem_regions + j, mem_regions + j + 1,
+ (num_regions - j - 1) * sizeof (struct mem_region));
+ i--;
+ num_regions--;
+ }
+}
+
+void
+grub_machine_init (void)
+{
+ int i;
+#if 0
+ int grub_lower_mem;
+#endif
+
+ /* Initialize the console as early as possible. */
+ grub_console_init ();
+
+ /* This sanity check is useless since top of GRUB_MEMORY_MACHINE_RESERVED_END
+ is used for stack and if it's unavailable we wouldn't have gotten so far.
+ */
+#if 0
+ grub_lower_mem = grub_get_conv_memsize () << 10;
+
+ /* Sanity check. */
+ if (grub_lower_mem < GRUB_MEMORY_MACHINE_RESERVED_END)
+ grub_fatal ("too small memory");
+#endif
+
+/* FIXME: This prevents loader/i386/linux.c from using low memory. When our
+ heap implements support for requesting a chunk in low memory, this should
+ no longer be a problem. */
+#if 0
+ /* Add the lower memory into free memory. */
+ if (grub_lower_mem >= GRUB_MEMORY_MACHINE_RESERVED_END)
+ add_mem_region (GRUB_MEMORY_MACHINE_RESERVED_END,
+ grub_lower_mem - GRUB_MEMORY_MACHINE_RESERVED_END);
+#endif
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ /* Avoid the lower memory. */
+ if (addr < 0x100000)
+ {
+ if (size <= 0x100000 - addr)
+ return 0;
+
+ size -= 0x100000 - addr;
+ addr = 0x100000;
+ }
+
+ /* Ignore >4GB. */
+ if (addr <= 0xFFFFFFFF && type == GRUB_MEMORY_AVAILABLE)
+ {
+ grub_size_t len;
+
+ len = (grub_size_t) ((addr + size > 0xFFFFFFFF)
+ ? 0xFFFFFFFF - addr
+ : size);
+ add_mem_region (addr, len);
+ }
+
+ return 0;
+ }
+
+ grub_machine_mmap_iterate (hook);
+
+ compact_mem_regions ();
+
+ for (i = 0; i < num_regions; i++)
+ grub_mm_init_region ((void *) mem_regions[i].addr, mem_regions[i].size);
+
+ grub_tsc_init ();
+}
+
+void
+grub_machine_set_prefix (void)
+{
+ /* Initialize the prefix. */
+ grub_env_set ("prefix", make_install_device ());
+}
+
+void
+grub_machine_fini (void)
+{
+ grub_console_fini ();
+ grub_stop_floppy ();
+}
+
+/* Return the end of the core image. */
+grub_addr_t
+grub_arch_modules_addr (void)
+{
+ return GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR
+ + (grub_kernel_image_size - GRUB_KERNEL_MACHINE_RAW_SIZE);
+}
diff --git a/grub-core/kern/i386/pc/lzma_decode.S b/grub-core/kern/i386/pc/lzma_decode.S
new file mode 100644
index 0000000..88c668d
--- /dev/null
+++ b/grub-core/kern/i386/pc/lzma_decode.S
@@ -0,0 +1,614 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define FIXED_PROPS
+
+#define LZMA_BASE_SIZE 1846
+#define LZMA_LIT_SIZE 768
+
+#define LZMA_PROPERTIES_SIZE 5
+
+#define kNumTopBits 24
+#define kTopValue (1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+
+
+#define kNumPosBitsMax 4
+#define kNumPosStatesMax (1 << kNumPosBitsMax)
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumMidBits 3
+#define kLenNumMidSymbols (1 << kLenNumMidBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+
+#define LenChoice 0
+#define LenChoice2 (LenChoice + 1)
+#define LenLow (LenChoice2 + 1)
+#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
+#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+
+
+#define kNumStates 12
+#define kNumLitStates 7
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+
+#define kNumPosSlotBits 6
+#define kNumLenToPosStates 4
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+
+#define kMatchMinLen 2
+
+#define IsMatch 0
+#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
+#define IsRepG0 (IsRep + kNumStates)
+#define IsRepG1 (IsRepG0 + kNumStates)
+#define IsRepG2 (IsRepG1 + kNumStates)
+#define IsRep0Long (IsRepG2 + kNumStates)
+#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
+#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
+#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
+#define LenCoder (Align + kAlignTableSize)
+#define RepLenCoder (LenCoder + kNumLenProbs)
+#define Literal (RepLenCoder + kNumLenProbs)
+
+#define out_size 8(%ebp)
+
+#define now_pos -4(%ebp)
+#define prev_byte -8(%ebp)
+#define range -12(%ebp)
+#define code -16(%ebp)
+#define state -20(%ebp)
+#define rep0 -24(%ebp)
+#define rep1 -28(%ebp)
+#define rep2 -32(%ebp)
+#define rep3 -36(%ebp)
+
+#ifdef FIXED_PROPS
+
+#define FIXED_LC 3
+#define FIXED_LP 0
+#define FIXED_PB 2
+
+#define POS_STATE_MASK ((1 << (FIXED_PB)) - 1)
+#define LIT_POS_MASK ((1 << (FIXED_LP)) - 1)
+
+#define LOCAL_SIZE 36
+
+#else
+
+#define lc (%ebx)
+#define lp 4(%ebx)
+#define pb 8(%ebx)
+#define probs 12(%ebx)
+
+#define pos_state_mask -40(%ebp)
+#define lit_pos_mask -44(%ebp)
+
+#define LOCAL_SIZE 44
+
+#endif
+
+RangeDecoderBitDecode:
+#ifdef FIXED_PROPS
+ leal (%ebx, %eax, 4), %eax
+#else
+ shll $2, %eax
+ addl probs, %eax
+#endif
+
+ movl %eax, %ecx
+ movl (%ecx), %eax
+
+ movl range, %edx
+ shrl $kNumBitModelTotalBits, %edx
+ mull %edx
+
+ cmpl code, %eax
+ jbe 1f
+
+ movl %eax, range
+ movl $kBitModelTotal, %edx
+ subl (%ecx), %edx
+ shrl $kNumMoveBits, %edx
+ addl %edx, (%ecx)
+ clc
+3:
+ pushf
+ cmpl $kTopValue, range
+ jnc 2f
+ shll $8, code
+ lodsb
+ movb %al, code
+ shll $8, range
+2:
+ popf
+ ret
+1:
+ subl %eax, range
+ subl %eax, code
+ movl (%ecx), %edx
+ shrl $kNumMoveBits, %edx
+ subl %edx, (%ecx)
+ stc
+ jmp 3b
+
+RangeDecoderBitTreeDecode:
+RangeDecoderReverseBitTreeDecode:
+ movzbl %cl, %ecx
+ xorl %edx, %edx
+ pushl %edx
+ incl %edx
+ pushl %edx
+
+1:
+ pushl %eax
+ pushl %ecx
+ pushl %edx
+
+ addl %edx, %eax
+ call RangeDecoderBitDecode
+
+ popl %edx
+ popl %ecx
+
+ jnc 2f
+ movl 4(%esp), %eax
+ orl %eax, 8(%esp)
+ stc
+
+2:
+ adcl %edx, %edx
+ popl %eax
+
+ shll $1, (%esp)
+ loop 1b
+
+ popl %ecx
+ subl %ecx, %edx /* RangeDecoderBitTreeDecode */
+ popl %ecx /* RangeDecoderReverseBitTreeDecode */
+ ret
+
+LzmaLenDecode:
+ pushl %eax
+ addl $LenChoice, %eax
+ call RangeDecoderBitDecode
+ popl %eax
+ jc 1f
+ pushl $0
+ movb $kLenNumLowBits, %cl
+ addl $LenLow, %eax
+2:
+ movl 12(%esp), %edx
+ shll %cl, %edx
+ addl %edx, %eax
+3:
+
+ call RangeDecoderBitTreeDecode
+ popl %eax
+ addl %eax, %edx
+ ret
+
+1:
+ pushl %eax
+ addl $LenChoice2, %eax
+ call RangeDecoderBitDecode
+ popl %eax
+ jc 1f
+ pushl $kLenNumLowSymbols
+ movb $kLenNumMidBits, %cl
+ addl $LenMid, %eax
+ jmp 2b
+
+1:
+ pushl $(kLenNumLowSymbols + kLenNumMidSymbols)
+ addl $LenHigh, %eax
+ movb $kLenNumHighBits, %cl
+ jmp 3b
+
+WriteByte:
+ movb %al, prev_byte
+ stosb
+ incl now_pos
+ ret
+
+/*
+ * int LzmaDecode(CLzmaDecoderState *vs,
+ * const unsigned char *inStream,
+ * unsigned char *outStream,
+ * SizeT outSize);
+ */
+
+_LzmaDecodeA:
+
+ pushl %ebp
+ movl %esp, %ebp
+ subl $LOCAL_SIZE, %esp
+
+#ifndef ASM_FILE
+ pushl %esi
+ pushl %edi
+ pushl %ebx
+
+ movl %eax, %ebx
+ movl %edx, %esi
+ pushl %ecx
+#else
+ pushl %edi
+#endif
+
+ cld
+
+#ifdef FIXED_PROPS
+ movl %ebx, %edi
+ movl $(Literal + (LZMA_LIT_SIZE << (FIXED_LC + FIXED_LP))), %ecx
+#else
+ movl $LZMA_LIT_SIZE, %eax
+ movb lc, %cl
+ addb lp, %cl
+ shll %cl, %eax
+ addl $Literal, %eax
+ movl %eax, %ecx
+ movl probs, %edi
+#endif
+
+ movl $(kBitModelTotal >> 1), %eax
+
+ rep
+ stosl
+
+ popl %edi
+
+ xorl %eax, %eax
+ movl %eax, now_pos
+ movl %eax, prev_byte
+ movl %eax, state
+
+ incl %eax
+ movl %eax, rep0
+ movl %eax, rep1
+ movl %eax, rep2
+ movl %eax, rep3
+
+#ifndef FIXED_PROPS
+ movl %eax, %edx
+ movb pb, %cl
+ shll %cl, %edx
+ decl %edx
+ movl %edx, pos_state_mask
+
+ movl %eax, %edx
+ movb lp, %cl
+ shll %cl, %edx
+ decl %edx
+ movl %edx, lit_pos_mask;
+#endif
+
+ /* RangeDecoderInit */
+ negl %eax
+ movl %eax, range
+
+ incl %eax
+ movb $5, %cl
+
+1:
+ shll $8, %eax
+ lodsb
+ loop 1b
+
+ movl %eax, code
+
+lzma_decode_loop:
+ movl now_pos, %eax
+ cmpl out_size, %eax
+
+ jb 1f
+
+#ifndef ASM_FILE
+ xorl %eax, %eax
+
+ popl %ebx
+ popl %edi
+ popl %esi
+#endif
+
+ movl %ebp, %esp
+ popl %ebp
+ ret
+
+1:
+#ifdef FIXED_PROPS
+ andl $POS_STATE_MASK, %eax
+#else
+ andl pos_state_mask, %eax
+#endif
+ pushl %eax /* posState */
+ movl state, %edx
+ shll $kNumPosBitsMax, %edx
+ addl %edx, %eax
+ pushl %eax /* (state << kNumPosBitsMax) + posState */
+
+ call RangeDecoderBitDecode
+ jc 1f
+
+ movl now_pos, %eax
+
+#ifdef FIXED_PROPS
+ andl $LIT_POS_MASK, %eax
+ shll $FIXED_LC, %eax
+ movl prev_byte, %edx
+ shrl $(8 - FIXED_LC), %edx
+#else
+ andl lit_pos_mask, %eax
+ movb lc, %cl
+ shll %cl, %eax
+ negb %cl
+ addb $8, %cl
+ movl prev_byte, %edx
+ shrl %cl, %edx
+#endif
+
+ addl %edx, %eax
+ movl $LZMA_LIT_SIZE, %edx
+ mull %edx
+ addl $Literal, %eax
+ pushl %eax
+
+ incl %edx /* edx = 1 */
+
+ movl rep0, %eax
+ negl %eax
+ pushl (%edi, %eax) /* matchByte */
+
+ cmpb $kNumLitStates, state
+ jb 5f
+
+ /* LzmaLiteralDecodeMatch */
+
+3:
+ cmpl $0x100, %edx
+ jae 4f
+
+ xorl %eax, %eax
+ shlb $1, (%esp)
+ adcl %eax, %eax
+
+ pushl %eax
+ pushl %edx
+
+ shll $8, %eax
+ leal 0x100(%edx, %eax), %eax
+ addl 12(%esp), %eax
+ call RangeDecoderBitDecode
+
+ setc %al
+ popl %edx
+ adcl %edx, %edx
+
+ popl %ecx
+ cmpb %cl, %al
+ jz 3b
+
+5:
+
+ /* LzmaLiteralDecode */
+
+ cmpl $0x100, %edx
+ jae 4f
+
+ pushl %edx
+ movl %edx, %eax
+ addl 8(%esp), %eax
+ call RangeDecoderBitDecode
+ popl %edx
+ adcl %edx, %edx
+ jmp 5b
+
+4:
+ addl $16, %esp
+
+ movb %dl, %al
+ call WriteByte
+
+ movb state, %al
+ cmpb $4, %al
+ jae 2f
+ xorb %al, %al
+ jmp 3f
+2:
+ subb $3, %al
+ cmpb $7, %al
+ jb 3f
+ subb $3, %al
+3:
+ movb %al, state
+ jmp lzma_decode_loop
+
+1:
+ movl state, %eax
+ addl $IsRep, %eax
+ call RangeDecoderBitDecode
+ jnc 1f
+
+ movl state, %eax
+ addl $IsRepG0, %eax
+ call RangeDecoderBitDecode
+ jc 10f
+
+ movl (%esp), %eax
+ addl $IsRep0Long, %eax
+ call RangeDecoderBitDecode
+ jc 20f
+
+ cmpb $7, state
+ movb $9, state
+ jb 100f
+ addb $2, state
+100:
+
+ movl $1, %ecx
+
+3:
+ movl rep0, %edx
+ negl %edx
+
+4:
+ movb (%edi, %edx), %al
+ call WriteByte
+ loop 4b
+
+ popl %eax
+ popl %eax
+ jmp lzma_decode_loop
+
+10:
+ movl state, %eax
+ addl $IsRepG1, %eax
+ call RangeDecoderBitDecode
+ movl rep1, %edx
+ jnc 100f
+
+ movl state, %eax
+ addl $IsRepG2, %eax
+ call RangeDecoderBitDecode
+ movl rep2, %edx
+ jnc 1000f
+ movl rep2, %edx
+ xchgl rep3, %edx
+1000:
+ pushl rep1
+ popl rep2
+100:
+ xchg rep0, %edx
+ movl %edx, rep1
+20:
+
+ movl $RepLenCoder, %eax
+ call LzmaLenDecode
+
+ cmpb $7, state
+ movb $8, state
+ jb 100f
+ addb $3, state
+100:
+ jmp 2f
+
+1:
+ movl rep0, %eax
+ xchgl rep1, %eax
+ xchgl rep2, %eax
+ movl %eax, rep3
+
+ cmpb $7, state
+ movb $7, state
+ jb 10f
+ addb $3, state
+10:
+
+ movl $LenCoder, %eax
+ call LzmaLenDecode
+ pushl %edx
+
+ movl $(kNumLenToPosStates - 1), %eax
+ cmpl %eax, %edx
+ jbe 100f
+ movl %eax, %edx
+100:
+ movb $kNumPosSlotBits, %cl
+ shll %cl, %edx
+ leal PosSlot(%edx), %eax
+ call RangeDecoderBitTreeDecode
+
+ movl %edx, rep0
+ cmpl $kStartPosModelIndex, %edx
+ jb 100f
+
+ movl %edx, %ecx
+ shrl $1, %ecx
+ decl %ecx
+
+ movzbl %dl, %eax
+ andb $1, %al
+ orb $2, %al
+ shll %cl, %eax
+ movl %eax, rep0
+
+ cmpl $kEndPosModelIndex, %edx
+ jae 200f
+ movl rep0, %eax
+ addl $(SpecPos - 1), %eax
+ subl %edx, %eax
+ jmp 300f
+200:
+
+ subb $kNumAlignBits, %cl
+
+ /* RangeDecoderDecodeDirectBits */
+ xorl %edx, %edx
+
+1000:
+ shrl $1, range
+ shll $1, %edx
+
+ movl range, %eax
+ cmpl %eax, code
+ jb 2000f
+ subl %eax, code
+ orb $1, %dl
+2000:
+
+ cmpl $kTopValue, %eax
+ jae 3000f
+ shll $8, range
+ shll $8, code
+ lodsb
+ movb %al, code
+
+3000:
+ loop 1000b
+
+ movb $kNumAlignBits, %cl
+ shll %cl, %edx
+ addl %edx, rep0
+
+ movl $Align, %eax
+
+300:
+ call RangeDecoderReverseBitTreeDecode
+ addl %ecx, rep0
+
+100:
+ incl rep0
+ popl %edx
+
+2:
+
+ addl $kMatchMinLen, %edx
+ movl %edx, %ecx
+
+ jmp 3b
diff --git a/grub-core/kern/i386/pc/mmap.c b/grub-core/kern/i386/pc/mmap.c
new file mode 100644
index 0000000..480ffa9
--- /dev/null
+++ b/grub-core/kern/i386/pc/mmap.c
@@ -0,0 +1,190 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/memory.h>
+#include <grub/machine/int.h>
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+
+struct grub_machine_mmap_entry
+{
+ grub_uint32_t size;
+ grub_uint64_t addr;
+ grub_uint64_t len;
+#define GRUB_MACHINE_MEMORY_AVAILABLE 1
+#define GRUB_MACHINE_MEMORY_RESERVED 2
+#define GRUB_MACHINE_MEMORY_ACPI 3
+#define GRUB_MACHINE_MEMORY_NVS 4
+#define GRUB_MACHINE_MEMORY_BADRAM 5
+ grub_uint32_t type;
+} __attribute__((packed));
+
+
+/*
+ *
+ * grub_get_conv_memsize(i) : return the conventional memory size in KB.
+ * BIOS call "INT 12H" to get conventional memory size
+ * The return value in AX.
+ */
+static inline grub_uint16_t
+grub_get_conv_memsize (void)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x12, &regs);
+ return regs.eax & 0xffff;
+}
+
+/*
+ * grub_get_ext_memsize() : return the extended memory size in KB.
+ * BIOS call "INT 15H, AH=88H" to get extended memory size
+ * The return value in AX.
+ *
+ */
+static inline grub_uint16_t
+grub_get_ext_memsize (void)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x8800;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x15, &regs);
+ return regs.eax & 0xffff;
+}
+
+/* Get a packed EISA memory map. Lower 16 bits are between 1MB and 16MB
+ in 1KB parts, and upper 16 bits are above 16MB in 64KB parts. If error, return zero.
+ BIOS call "INT 15H, AH=E801H" to get EISA memory map,
+ AX = memory between 1M and 16M in 1K parts.
+ BX = memory above 16M in 64K parts.
+*/
+
+static inline grub_uint32_t
+grub_get_eisa_mmap (void)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ regs.eax = 0xe801;
+ grub_bios_interrupt (0x15, &regs);
+
+ if ((regs.eax & 0xff00) == 0x8600)
+ return 0;
+
+ return (regs.eax & 0xffff) | (regs.ebx << 16);
+}
+
+/*
+ *
+ * grub_get_mmap_entry(addr, cont) : address and old continuation value (zero to
+ * start), for the Query System Address Map BIOS call.
+ *
+ * Sets the first 4-byte int value of "addr" to the size returned by
+ * the call. If the call fails, sets it to zero.
+ *
+ * Returns: new (non-zero) continuation value, 0 if done.
+ */
+/* Get a memory map entry. Return next continuation value. Zero means
+ the end. */
+static grub_uint32_t
+grub_get_mmap_entry (struct grub_machine_mmap_entry *entry,
+ grub_uint32_t cont)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+
+ /* place address (+4) in ES:DI */
+ regs.es = ((grub_addr_t) &entry->addr) >> 4;
+ regs.edi = ((grub_addr_t) &entry->addr) & 0xf;
+
+ /* set continuation value */
+ regs.ebx = cont;
+
+ /* set default maximum buffer size */
+ regs.ecx = sizeof (*entry) - sizeof (entry->size);
+
+ /* set EDX to 'SMAP' */
+ regs.edx = 0x534d4150;
+
+ regs.eax = 0xe820;
+ grub_bios_interrupt (0x15, &regs);
+
+ /* write length of buffer (zero if error) into ADDR */
+ if ((regs.flags & GRUB_CPU_INT_FLAGS_CARRY) || regs.eax != 0x534d4150
+ || regs.ecx < 0x14 || regs.ecx > 0x400)
+ entry->size = 0;
+ else
+ entry->size = regs.ecx;
+
+ /* return the continuation value */
+ return regs.ebx;
+}
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ grub_uint32_t cont;
+ struct grub_machine_mmap_entry *entry
+ = (struct grub_machine_mmap_entry *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+
+ grub_memset (entry, 0, sizeof (entry));
+
+ /* Check if grub_get_mmap_entry works. */
+ cont = grub_get_mmap_entry (entry, 0);
+
+ if (entry->size)
+ do
+ {
+ if (hook (entry->addr, entry->len,
+ /* GRUB mmaps have been defined to match with the E820 definition.
+ Therefore, we can just pass type through. */
+ ((entry->type <= GRUB_MACHINE_MEMORY_BADRAM) && (entry->type >= GRUB_MACHINE_MEMORY_AVAILABLE)) ? entry->type : GRUB_MEMORY_RESERVED))
+ break;
+
+ if (! cont)
+ break;
+
+ grub_memset (entry, 0, sizeof (entry));
+
+ cont = grub_get_mmap_entry (entry, cont);
+ }
+ while (entry->size);
+ else
+ {
+ grub_uint32_t eisa_mmap = grub_get_eisa_mmap ();
+
+ if (hook (0x0, ((grub_uint32_t) grub_get_conv_memsize ()) << 10,
+ GRUB_MEMORY_AVAILABLE))
+ return 0;
+
+ if (eisa_mmap)
+ {
+ if (hook (0x100000, (eisa_mmap & 0xFFFF) << 10,
+ GRUB_MEMORY_AVAILABLE) == 0)
+ hook (0x1000000, eisa_mmap & ~0xFFFF, GRUB_MEMORY_AVAILABLE);
+ }
+ else
+ hook (0x100000, ((grub_uint32_t) grub_get_ext_memsize ()) << 10,
+ GRUB_MEMORY_AVAILABLE);
+ }
+
+ return 0;
+}
diff --git a/grub-core/kern/i386/pc/startup.S b/grub-core/kern/i386/pc/startup.S
new file mode 100644
index 0000000..e78a0aa
--- /dev/null
+++ b/grub-core/kern/i386/pc/startup.S
@@ -0,0 +1,1011 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/*
+ * Note: These functions defined in this file may be called from C.
+ * Be careful of that you must not modify some registers. Quote
+ * from gcc-2.95.2/gcc/config/i386/i386.h:
+
+ 1 for registers not available across function calls.
+ These must include the FIXED_REGISTERS and also any
+ registers that can be used without being saved.
+ The latter must include the registers where values are returned
+ and the register where structure-value addresses are passed.
+ Aside from that, you can include as many other registers as you like.
+
+ ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg
+{ 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
+ */
+
+/*
+ * Note: GRUB is compiled with the options -mrtd and -mregparm=3.
+ * So the first three arguments are passed in %eax, %edx, and %ecx,
+ * respectively, and if a function has a fixed number of arguments
+ * and the number is greater than three, the function must return
+ * with "ret $N" where N is ((the number of arguments) - 3) * 4.
+ */
+
+#include <config.h>
+#include <grub/symbol.h>
+#include <grub/boot.h>
+#include <grub/machine/boot.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/console.h>
+#include <grub/cpu/linux.h>
+#include <grub/machine/kernel.h>
+#include <grub/term.h>
+#include <multiboot.h>
+#include <multiboot2.h>
+
+#define ABS(x) ((x) - LOCAL (base) + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
+
+ .file "startup.S"
+
+ .text
+
+ /* Tell GAS to generate 16-bit instructions so that this code works
+ in real mode. */
+ .code16
+
+ .globl start, _start
+start:
+_start:
+LOCAL (base):
+ /*
+ * Guarantee that "main" is loaded at 0x0:0x8200.
+ */
+#ifdef __APPLE__
+ ljmp $0, $(ABS(LOCAL (codestart)) - 0x10000)
+#else
+ ljmp $0, $ABS(LOCAL (codestart))
+#endif
+ /*
+ * Compatibility version number
+ *
+ * These MUST be at byte offset 6 and 7 of the executable
+ * DO NOT MOVE !!!
+ */
+ . = _start + 0x6
+ .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
+
+ /*
+ * This is a special data area 8 bytes from the beginning.
+ */
+
+ . = _start + 0x8
+
+VARIABLE(grub_total_module_size)
+ .long 0
+VARIABLE(grub_kernel_image_size)
+ .long 0
+VARIABLE(grub_compressed_size)
+ .long 0
+VARIABLE(grub_install_dos_part)
+ .long 0xFFFFFFFF
+VARIABLE(grub_install_bsd_part)
+ .long 0xFFFFFFFF
+reed_solomon_redundancy:
+ .long 0
+
+#ifdef APPLE_CC
+bss_start:
+ .long 0
+bss_end:
+ .long 0
+#endif
+/*
+ * This is the area for all of the special variables.
+ */
+
+VARIABLE(grub_boot_drive)
+ .byte 0
+
+/* the real mode code continues... */
+LOCAL (codestart):
+ cli /* we're not safe here! */
+
+ /* set up %ds, %ss, and %es */
+ xorw %ax, %ax
+ movw %ax, %ds
+ movw %ax, %ss
+ movw %ax, %es
+
+ /* set up the real mode/BIOS stack */
+ movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp
+ movl %ebp, %esp
+
+ sti /* we're safe again */
+
+ /* save the boot drive */
+ ADDR32 movb %dl, EXT_C(grub_boot_drive)
+
+ /* reset disk system (%ah = 0) */
+ int $0x13
+
+ /* transition to protected mode */
+ DATA32 call real_to_prot
+
+ /* The ".code32" directive takes GAS out of 16-bit mode. */
+ .code32
+
+ incl %eax
+ call grub_gate_a20
+
+ movl EXT_C(grub_compressed_size), %edx
+ addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART), %edx
+ movl reed_solomon_redundancy, %ecx
+ leal _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART, %eax
+ call EXT_C (grub_reed_solomon_recover)
+ jmp post_reed_solomon
+
+#include <rs_decoder.S>
+
+ .text
+
+ . = _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART
+/*
+ * Support for booting GRUB from a Multiboot boot loader (e.g. GRUB itself).
+ * This uses the a.out kludge to load raw binary to the area starting at 1MB,
+ * and relocates itself after loaded.
+ */
+ .p2align 2 /* force 4-byte alignment */
+multiboot_header:
+ /* magic */
+ .long 0x1BADB002
+ /* flags */
+ .long (1 << 16)
+ /* checksum */
+ .long -0x1BADB002 - (1 << 16)
+ /* header addr */
+ .long multiboot_header - _start + 0x100000 + 0x200
+ /* load addr */
+ .long 0x100000
+ /* load end addr */
+ .long 0
+ /* bss end addr */
+ .long 0
+ /* entry addr */
+ .long multiboot_entry - _start + 0x100000 + 0x200
+
+multiboot_entry:
+ .code32
+ /* obtain the boot device */
+ movl 12(%ebx), %edx
+
+ movl $GRUB_MEMORY_MACHINE_PROT_STACK, %ebp
+ movl %ebp, %esp
+
+ /* relocate the code */
+ movl $(GRUB_KERNEL_MACHINE_RAW_SIZE + 0x200), %ecx
+ addl EXT_C(grub_compressed_size) - _start + 0x100000 + 0x200, %ecx
+ movl $0x100000, %esi
+ movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %edi
+ cld
+ rep
+ movsb
+ /* jump to the real address */
+ movl $multiboot_trampoline, %eax
+ jmp *%eax
+
+multiboot_trampoline:
+ /* fill the boot information */
+ movl %edx, %eax
+ shrl $8, %eax
+ xorl %ebx, %ebx
+ cmpb $0xFF, %ah
+ je 1f
+ movb %ah, %bl
+ movl %ebx, EXT_C(grub_install_dos_part)
+1:
+ cmpb $0xFF, %al
+ je 2f
+ movb %al, %bl
+ movl %ebx, EXT_C(grub_install_bsd_part)
+2:
+ shrl $24, %edx
+ movb $0xFF, %dh
+ /* enter the usual booting */
+ call prot_to_real
+ jmp LOCAL (codestart)
+
+post_reed_solomon:
+
+#ifdef ENABLE_LZMA
+ movl $GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR, %edi
+ movl $(_start + GRUB_KERNEL_MACHINE_RAW_SIZE), %esi
+ pushl %edi
+ pushl %esi
+ movl EXT_C(grub_kernel_image_size), %ecx
+ addl EXT_C(grub_total_module_size), %ecx
+ subl $GRUB_KERNEL_MACHINE_RAW_SIZE, %ecx
+ pushl %ecx
+ leal (%edi, %ecx), %ebx
+ call _LzmaDecodeA
+ /* _LzmaDecodeA clears DF, so no need to run cld */
+ popl %ecx
+ popl %edi
+ popl %esi
+#endif
+
+ /* copy back the decompressed part (except the modules) */
+ subl EXT_C(grub_total_module_size), %ecx
+ rep
+ movsb
+
+#if 0
+ /* copy modules before cleaning out the bss */
+ movl EXT_C(grub_total_module_size), %ecx
+ movl EXT_C(grub_kernel_image_size), %esi
+ addl %ecx, %esi
+ addl $_start, %esi
+ decl %esi
+ movl $END_SYMBOL, %edi
+ addl %ecx, %edi
+ decl %edi
+ std
+ rep
+ movsb
+#endif
+
+#ifdef APPLE_CC
+ /* clean out the bss */
+ bss_start_abs = ABS (bss_start)
+ bss_end_abs = ABS (bss_end)
+
+ movl bss_start_abs, %edi
+
+ /* compute the bss length */
+ movl bss_end_abs, %ecx
+ subl %edi, %ecx
+#else
+ /* clean out the bss */
+ movl $BSS_START_SYMBOL, %edi
+
+ /* compute the bss length */
+ movl $END_SYMBOL, %ecx
+ subl %edi, %ecx
+#endif
+
+ /* clean out */
+ xorl %eax, %eax
+ cld
+ rep
+ stosb
+
+ /*
+ * Call the start of main body of C code.
+ */
+ call EXT_C(grub_main)
+
+#include "../realmode.S"
+
+/*
+ * grub_gate_a20(int on)
+ *
+ * Gate address-line 20 for high memory.
+ *
+ * This routine is probably overconservative in what it does, but so what?
+ *
+ * It also eats any keystrokes in the keyboard buffer. :-(
+ */
+
+grub_gate_a20:
+ movl %eax, %edx
+
+gate_a20_test_current_state:
+ /* first of all, test if already in a good state */
+ call gate_a20_check_state
+ cmpb %al, %dl
+ jnz gate_a20_try_bios
+ ret
+
+gate_a20_try_bios:
+ /* second, try a BIOS call */
+ pushl %ebp
+ call prot_to_real
+
+ .code16
+ movw $0x2400, %ax
+ testb %dl, %dl
+ jz 1f
+ incw %ax
+1: int $0x15
+
+ DATA32 call real_to_prot
+ .code32
+
+ popl %ebp
+ call gate_a20_check_state
+ cmpb %al, %dl
+ jnz gate_a20_try_system_control_port_a
+ ret
+
+gate_a20_try_system_control_port_a:
+ /*
+ * In macbook, the keyboard test would hang the machine, so we move
+ * this forward.
+ */
+ /* fourth, try the system control port A */
+ inb $0x92
+ andb $(~0x03), %al
+ testb %dl, %dl
+ jz 6f
+ orb $0x02, %al
+6: outb $0x92
+
+ /* When turning off Gate A20, do not check the state strictly,
+ because a failure is not fatal usually, and Gate A20 is always
+ on some modern machines. */
+ testb %dl, %dl
+ jz 7f
+ call gate_a20_check_state
+ cmpb %al, %dl
+ jnz gate_a20_try_keyboard_controller
+7: ret
+
+gate_a20_flush_keyboard_buffer:
+ inb $0x64
+ andb $0x02, %al
+ jnz gate_a20_flush_keyboard_buffer
+2:
+ inb $0x64
+ andb $0x01, %al
+ jz 3f
+ inb $0x60
+ jmp 2b
+3:
+ ret
+
+gate_a20_try_keyboard_controller:
+ /* third, try the keyboard controller */
+ call gate_a20_flush_keyboard_buffer
+
+ movb $0xd1, %al
+ outb $0x64
+4:
+ inb $0x64
+ andb $0x02, %al
+ jnz 4b
+
+ movb $0xdd, %al
+ testb %dl, %dl
+ jz 5f
+ orb $0x02, %al
+5: outb $0x60
+ call gate_a20_flush_keyboard_buffer
+
+ /* output a dummy command (USB keyboard hack) */
+ movb $0xff, %al
+ outb $0x64
+ call gate_a20_flush_keyboard_buffer
+
+ call gate_a20_check_state
+ cmpb %al, %dl
+ /* everything failed, so restart from the beginning */
+ jnz gate_a20_try_bios
+ ret
+
+gate_a20_check_state:
+ /* iterate the checking for a while */
+ movl $100, %ecx
+1:
+ call 3f
+ cmpb %al, %dl
+ jz 2f
+ loop 1b
+2:
+ ret
+3:
+ pushl %ebx
+ pushl %ecx
+ xorl %eax, %eax
+ /* compare the byte at 0x8000 with that at 0x108000 */
+ movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %ebx
+ pushl %ebx
+ /* save the original byte in CL */
+ movb (%ebx), %cl
+ /* store the value at 0x108000 in AL */
+ addl $0x100000, %ebx
+ movb (%ebx), %al
+ /* try to set one less value at 0x8000 */
+ popl %ebx
+ movb %al, %ch
+ decb %ch
+ movb %ch, (%ebx)
+ /* serialize */
+ outb %al, $0x80
+ outb %al, $0x80
+ /* obtain the value at 0x108000 in CH */
+ pushl %ebx
+ addl $0x100000, %ebx
+ movb (%ebx), %ch
+ /* this result is 1 if A20 is on or 0 if it is off */
+ subb %ch, %al
+ xorb $1, %al
+ /* restore the original */
+ popl %ebx
+ movb %cl, (%ebx)
+ popl %ecx
+ popl %ebx
+ ret
+
+#ifdef ENABLE_LZMA
+#include "lzma_decode.S"
+#endif
+
+/*
+ * The code beyond this point is compressed. Assert that the uncompressed
+ * code fits GRUB_KERNEL_MACHINE_RAW_SIZE.
+ */
+ . = _start + GRUB_KERNEL_MACHINE_RAW_SIZE
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX_END
+
+
+
+/*
+ * grub_exit()
+ *
+ * Exit the system.
+ */
+FUNCTION(grub_exit)
+ call prot_to_real
+ .code16
+ /* Tell the BIOS a boot failure. If this does not work, reboot. */
+ int $0x18
+ jmp cold_reboot
+ .code32
+
+/*
+ * void grub_chainloader_real_boot (int drive, void *part_addr)
+ *
+ * This starts another boot loader.
+ */
+
+FUNCTION(grub_chainloader_real_boot)
+ pushl %edx
+ pushl %eax
+
+ /* Turn off Gate A20 */
+ xorl %eax, %eax
+ call grub_gate_a20
+
+ /* set up to pass boot drive */
+ popl %edx
+
+ /* ESI must point to a partition table entry */
+ popl %esi
+
+ call prot_to_real
+ .code16
+ ljmp $0, $GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR
+ .code32
+
+/*
+ * void grub_console_putchar (int c)
+ *
+ * Put the character C on the console. Because GRUB wants to write a
+ * character with an attribute, this implementation is a bit tricky.
+ * If C is a control character (CR, LF, BEL, BS), use INT 10, AH = 0Eh
+ * (TELETYPE OUTPUT). Otherwise, save the original position, put a space,
+ * save the current position, restore the original position, write the
+ * character and the attribute, and restore the current position.
+ *
+ * The reason why this is so complicated is that there is no easy way to
+ * get the height of the screen, and the TELETYPE OUTPUT BIOS call doesn't
+ * support setting a background attribute.
+ */
+FUNCTION(grub_console_putchar)
+ /* Retrieve the base character. */
+ movl 0(%edx), %edx
+ pusha
+ movb EXT_C(grub_console_cur_color), %bl
+
+ call prot_to_real
+ .code16
+ movb %dl, %al
+ xorb %bh, %bh
+
+ /* use teletype output if control character */
+ cmpb $0x7, %al
+ je 1f
+ cmpb $0x8, %al
+ je 1f
+ cmpb $0xa, %al
+ je 1f
+ cmpb $0xd, %al
+ je 1f
+
+ /* save the character and the attribute on the stack */
+ pushw %ax
+ pushw %bx
+
+ /* get the current position */
+ movb $0x3, %ah
+ int $0x10
+
+ /* check the column with the width */
+ cmpb $79, %dl
+ jl 2f
+
+ /* print CR and LF, if next write will exceed the width */
+ movw $0x0e0d, %ax
+ int $0x10
+ movb $0x0a, %al
+ int $0x10
+
+ /* get the current position */
+ movb $0x3, %ah
+ int $0x10
+
+2:
+ /* restore the character and the attribute */
+ popw %bx
+ popw %ax
+
+ /* write the character with the attribute */
+ movb $0x9, %ah
+ movw $1, %cx
+ int $0x10
+
+ /* move the cursor forward */
+ incb %dl
+ movb $0x2, %ah
+ int $0x10
+
+ jmp 3f
+
+1: movw $1, %bx
+ movb $0xe, %ah
+ int $0x10
+
+3: DATA32 call real_to_prot
+ .code32
+
+ popa
+ ret
+
+
+LOCAL(bypass_table):
+ .word 0x011b, 0x0f00 | '\t', 0x0e00 | '\b', 0x1c00 | '\r'
+ .word 0x1c00 | '\n'
+LOCAL(bypass_table_end):
+
+/*
+ * int grub_console_getkey (void)
+ * if there is a character pending, return it; otherwise return -1
+ * BIOS call "INT 16H Function 01H" to check whether a character is pending
+ * Call with %ah = 0x1
+ * Return:
+ * If key waiting to be input:
+ * %ah = keyboard scan code
+ * %al = ASCII character
+ * Zero flag = clear
+ * else
+ * Zero flag = set
+ * BIOS call "INT 16H Function 00H" to read character from keyboard
+ * Call with %ah = 0x0
+ * Return: %ah = keyboard scan code
+ * %al = ASCII character
+ */
+
+FUNCTION(grub_console_getkey)
+ pushl %ebp
+ pushl %edi
+
+ call prot_to_real
+ .code16
+
+ /*
+ * Due to a bug in apple's bootcamp implementation, INT 16/AH = 0 would
+ * cause the machine to hang at the second keystroke. However, we can
+ * work around this problem by ensuring the presence of keystroke with
+ * INT 16/AH = 1 before calling INT 16/AH = 0.
+ */
+
+ movb $1, %ah
+ int $0x16
+ jz notpending
+
+ movb $0, %ah
+ int $0x16
+
+ xorl %edx, %edx
+ movw %ax, %dx /* real_to_prot uses %eax */
+
+ DATA32 call real_to_prot
+ .code32
+
+ movl $0xff, %eax
+ testl %eax, %edx
+ jz 1f
+
+ andl %edx, %eax
+ cmpl $0x20, %eax
+ jae 2f
+ movl %edx, %eax
+ leal LOCAL(bypass_table), %edi
+ movl $((LOCAL(bypass_table_end) - LOCAL(bypass_table)) >> 1), %ecx
+ repne scasw
+ jz 3f
+
+ andl $0xff, %eax
+ addl $(('a' - 1) | GRUB_TERM_CTRL), %eax
+ jmp 2f
+3:
+ andl $0xff, %eax
+ jmp 2f
+
+1: movl %edx, %eax
+ shrl $8, %eax
+ orl $GRUB_TERM_EXTENDED, %eax
+2:
+ popl %edi
+ popl %ebp
+ ret
+
+notpending:
+ .code16
+ DATA32 call real_to_prot
+ .code32
+#if GRUB_TERM_NO_KEY != 0
+#error Fix this asm code
+#endif
+ jmp 2b
+
+
+/*
+ * grub_uint16_t grub_console_getxy (void)
+ * BIOS call "INT 10H Function 03h" to get cursor position
+ * Call with %ah = 0x03
+ * %bh = page
+ * Returns %ch = starting scan line
+ * %cl = ending scan line
+ * %dh = row (0 is top)
+ * %dl = column (0 is left)
+ */
+
+
+FUNCTION(grub_console_getxy)
+ pushl %ebp
+ pushl %ebx /* save EBX */
+
+ call prot_to_real
+ .code16
+
+ xorb %bh, %bh /* set page to 0 */
+ movb $0x3, %ah
+ int $0x10 /* get cursor position */
+
+ DATA32 call real_to_prot
+ .code32
+
+ movb %dl, %ah
+ movb %dh, %al
+
+ popl %ebx
+ popl %ebp
+ ret
+
+
+/*
+ * void grub_console_gotoxy(grub_uint8_t x, grub_uint8_t y)
+ * BIOS call "INT 10H Function 02h" to set cursor position
+ * Call with %ah = 0x02
+ * %bh = page
+ * %dh = row (0 is top)
+ * %dl = column (0 is left)
+ */
+
+
+FUNCTION(grub_console_gotoxy)
+ pushl %ebp
+ pushl %ebx /* save EBX */
+
+ movb %cl, %dh /* %dh = y */
+ /* %dl = x */
+
+ call prot_to_real
+ .code16
+
+ xorb %bh, %bh /* set page to 0 */
+ movb $0x2, %ah
+ int $0x10 /* set cursor position */
+
+ DATA32 call real_to_prot
+ .code32
+
+ popl %ebx
+ popl %ebp
+ ret
+
+
+/*
+ * void grub_console_cls (void)
+ * BIOS call "INT 10H Function 09h" to write character and attribute
+ * Call with %ah = 0x09
+ * %al = (character)
+ * %bh = (page number)
+ * %bl = (attribute)
+ * %cx = (number of times)
+ */
+
+FUNCTION(grub_console_cls)
+ pushl %ebp
+ pushl %ebx /* save EBX */
+
+ call prot_to_real
+ .code16
+
+ /* move the cursor to the beginning */
+ movb $0x02, %ah
+ xorb %bh, %bh
+ xorw %dx, %dx
+ int $0x10
+
+ /* write spaces to the entire screen */
+ movw $0x0920, %ax
+ movw $0x07, %bx
+ movw $(80 * 25), %cx
+ int $0x10
+
+ /* move back the cursor */
+ movb $0x02, %ah
+ int $0x10
+
+ DATA32 call real_to_prot
+ .code32
+
+ popl %ebx
+ popl %ebp
+ ret
+
+
+/*
+ * void grub_console_setcursor (int on)
+ * BIOS call "INT 10H Function 01h" to set cursor type
+ * Call with %ah = 0x01
+ * %ch = cursor starting scanline
+ * %cl = cursor ending scanline
+ */
+
+console_cursor_state:
+ .byte 1
+console_cursor_shape:
+ .word 0
+
+FUNCTION(grub_console_setcursor)
+ pushl %ebp
+ pushl %ebx
+
+ /* push ON */
+ pushl %edx
+
+ /* check if the standard cursor shape has already been saved */
+ movw console_cursor_shape, %ax
+ testw %ax, %ax
+ jne 1f
+
+ call prot_to_real
+ .code16
+
+ movb $0x03, %ah
+ xorb %bh, %bh
+ int $0x10
+
+ DATA32 call real_to_prot
+ .code32
+
+ cmp %cl, %ch
+ jb 3f
+ movw $0x0d0e, %cx
+3:
+ movw %cx, console_cursor_shape
+1:
+ /* set %cx to the designated cursor shape */
+ movw $0x2000, %cx
+ popl %eax
+ testl %eax, %eax
+ jz 2f
+ movw console_cursor_shape, %cx
+2:
+ call prot_to_real
+ .code16
+
+ movb $0x1, %ah
+ int $0x10
+
+ DATA32 call real_to_prot
+ .code32
+
+ popl %ebx
+ popl %ebp
+ ret
+
+/*
+ * grub_get_rtc()
+ * return the real time in ticks, of which there are about
+ * 18-20 per second
+ */
+FUNCTION(grub_get_rtc)
+ pushl %ebp
+
+ call prot_to_real /* enter real mode */
+ .code16
+
+ /* %ax is already zero */
+ int $0x1a
+
+ DATA32 call real_to_prot
+ .code32
+
+ movl %ecx, %eax
+ shll $16, %eax
+ movw %dx, %ax
+
+ popl %ebp
+ ret
+
+/*
+ * int grub_pxe_call (int func, void* data, grub_uint32_t pxe_rm_entry);
+ */
+FUNCTION(grub_pxe_call)
+ pushl %ebp
+ movl %esp, %ebp
+ pushl %esi
+ pushl %edi
+ pushl %ebx
+
+ movl %ecx, %ebx
+ movl %eax, %ecx
+ movl %edx, %eax
+ andl $0xF, %eax
+ shrl $4, %edx
+ shll $16, %edx
+ addl %eax, %edx
+
+ call prot_to_real
+ .code16
+
+ pushl %ebx
+ pushl %edx
+ pushw %cx
+ movw %sp, %bx
+ lcall *%ss:6(%bx)
+ cld
+ addw $10, %sp
+ movw %ax, %cx
+
+ DATA32 call real_to_prot
+ .code32
+
+ movzwl %cx, %eax
+
+ popl %ebx
+ popl %edi
+ popl %esi
+ popl %ebp
+ ret
+
+FUNCTION(grub_bios_interrupt)
+ pushl %ebp
+ pushl %ecx
+ pushl %eax
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+ pushl %edx
+
+ movb %al, intno
+ movl (%edx), %eax
+ movl %eax, LOCAL(bios_register_eax)
+ movw 4(%edx), %ax
+ movw %ax, LOCAL(bios_register_es)
+ movw 6(%edx), %ax
+ movw %ax, LOCAL(bios_register_ds)
+ movw 8(%edx), %ax
+ movw %ax, LOCAL(bios_register_flags)
+
+ movl 12(%edx), %ebx
+ movl 16(%edx), %ecx
+ movl 20(%edx), %edi
+ movl 24(%edx), %esi
+ movl 28(%edx), %edx
+
+ call prot_to_real
+ .code16
+
+ mov %ds, %ax
+ push %ax
+
+ /* movw imm16, %ax*/
+ .byte 0xb8
+LOCAL(bios_register_es):
+ .short 0
+ movw %ax, %es
+ /* movw imm16, %ax*/
+ .byte 0xb8
+LOCAL(bios_register_ds):
+ .short 0
+ movw %ax, %ds
+
+ /* movw imm16, %ax*/
+ .byte 0xb8
+LOCAL(bios_register_flags):
+ .short 0
+ push %ax
+ popf
+
+ /* movl imm32, %eax*/
+ .byte 0x66, 0xb8
+LOCAL(bios_register_eax):
+ .long 0
+
+ /* int imm8. */
+ .byte 0xcd
+intno:
+ .byte 0
+
+ movl %eax, %cs:LOCAL(bios_register_eax)
+ movw %ds, %ax
+ movw %ax, %cs:LOCAL(bios_register_ds)
+ pop %ax
+ mov %ax, %ds
+ pushf
+ pop %ax
+ movw %ax, LOCAL(bios_register_flags)
+ mov %es, %ax
+ movw %ax, LOCAL(bios_register_es)
+
+ DATA32 call real_to_prot
+ .code32
+
+ popl %eax
+
+ movl %ebx, 12(%eax)
+ movl %ecx, 16(%eax)
+ movl %edi, 20(%eax)
+ movl %esi, 24(%eax)
+ movl %edx, 28(%eax)
+
+ movl %eax, %edx
+
+ movl LOCAL(bios_register_eax), %eax
+ movl %eax, (%edx)
+ movw LOCAL(bios_register_es), %ax
+ movw %ax, 4(%edx)
+ movw LOCAL(bios_register_ds), %ax
+ movw %ax, 6(%edx)
+ movw LOCAL(bios_register_flags), %ax
+ movw %ax, 8(%edx)
+
+ popl %edi
+ popl %esi
+ popl %ebx
+ popl %eax
+ popl %ecx
+ popl %ebp
+ ret
diff --git a/grub-core/kern/i386/pit.c b/grub-core/kern/i386/pit.c
new file mode 100644
index 0000000..82a17d3
--- /dev/null
+++ b/grub-core/kern/i386/pit.c
@@ -0,0 +1,56 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/i386/io.h>
+#include <grub/i386/pit.h>
+
+#define TIMER2_REG_CONTROL 0x42
+#define TIMER_REG_COMMAND 0x43
+#define TIMER2_REG_LATCH 0x61
+
+#define TIMER2_SELECT 0x80
+#define TIMER_ENABLE_LSB 0x20
+#define TIMER_ENABLE_MSB 0x10
+#define TIMER2_LATCH 0x20
+#define TIMER2_SPEAKER 0x02
+#define TIMER2_GATE 0x01
+
+void
+grub_pit_wait (grub_uint16_t tics)
+{
+ /* Disable timer2 gate and speaker. */
+ grub_outb (grub_inb (TIMER2_REG_LATCH) & ~ (TIMER2_SPEAKER | TIMER2_GATE),
+ TIMER2_REG_LATCH);
+
+ /* Set tics. */
+ grub_outb (TIMER2_SELECT | TIMER_ENABLE_LSB | TIMER_ENABLE_MSB, TIMER_REG_COMMAND);
+ grub_outb (tics & 0xff, TIMER2_REG_CONTROL);
+ grub_outb (tics >> 8, TIMER2_REG_CONTROL);
+
+ /* Enable timer2 gate, keep speaker disabled. */
+ grub_outb ((grub_inb (TIMER2_REG_LATCH) & ~ TIMER2_SPEAKER) | TIMER2_GATE,
+ TIMER2_REG_LATCH);
+
+ /* Wait. */
+ while ((grub_inb (TIMER2_REG_LATCH) & TIMER2_LATCH) == 0x00);
+
+ /* Disable timer2 gate and speaker. */
+ grub_outb (grub_inb (TIMER2_REG_LATCH) & ~ (TIMER2_SPEAKER | TIMER2_GATE),
+ TIMER2_REG_LATCH);
+}
diff --git a/grub-core/kern/i386/qemu/init.c b/grub-core/kern/i386/qemu/init.c
new file mode 100644
index 0000000..054dfa8
--- /dev/null
+++ b/grub-core/kern/i386/qemu/init.c
@@ -0,0 +1,147 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/pci.h>
+#include <grub/machine/kernel.h>
+#include <grub/misc.h>
+#include <grub/vga.h>
+
+static struct {grub_uint8_t r, g, b, a; } colors[] =
+ {
+ // {R, G, B, A}
+ {0x00, 0x00, 0x00, 0xFF}, // 0 = black
+ {0x00, 0x00, 0xA8, 0xFF}, // 1 = blue
+ {0x00, 0xA8, 0x00, 0xFF}, // 2 = green
+ {0x00, 0xA8, 0xA8, 0xFF}, // 3 = cyan
+ {0xA8, 0x00, 0x00, 0xFF}, // 4 = red
+ {0xA8, 0x00, 0xA8, 0xFF}, // 5 = magenta
+ {0xA8, 0x54, 0x00, 0xFF}, // 6 = brown
+ {0xA8, 0xA8, 0xA8, 0xFF}, // 7 = light gray
+
+ {0x54, 0x54, 0x54, 0xFF}, // 8 = dark gray
+ {0x54, 0x54, 0xFE, 0xFF}, // 9 = bright blue
+ {0x54, 0xFE, 0x54, 0xFF}, // 10 = bright green
+ {0x54, 0xFE, 0xFE, 0xFF}, // 11 = bright cyan
+ {0xFE, 0x54, 0x54, 0xFF}, // 12 = bright red
+ {0xFE, 0x54, 0xFE, 0xFF}, // 13 = bright magenta
+ {0xFE, 0xFE, 0x54, 0xFF}, // 14 = yellow
+ {0xFE, 0xFE, 0xFE, 0xFF} // 15 = white
+ };
+
+#include <ascii.h>
+
+static void
+load_font (void)
+{
+ unsigned i;
+
+ grub_vga_gr_write (0 << 2, GRUB_VGA_GR_GR6);
+
+ grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_NORMAL, GRUB_VGA_SR_MEMORY_MODE);
+ grub_vga_sr_write (1 << GRUB_VGA_TEXT_FONT_PLANE,
+ GRUB_VGA_SR_MAP_MASK_REGISTER);
+
+ grub_vga_gr_write (0, GRUB_VGA_GR_DATA_ROTATE);
+ grub_vga_gr_write (0, GRUB_VGA_GR_MODE);
+ grub_vga_gr_write (0xff, GRUB_VGA_GR_BITMASK);
+
+ for (i = 0; i < 128; i++)
+ grub_memcpy ((void *) (0xa0000 + 32 * i), ascii_bitmaps + 16 * i, 16);
+}
+
+static void
+load_palette (void)
+{
+ unsigned i;
+ for (i = 0; i < 16; i++)
+ grub_vga_write_arx (i, i);
+
+ for (i = 0; i < ARRAY_SIZE (colors); i++)
+ grub_vga_palette_write (i, colors[i].r, colors[i].g, colors[i].b);
+}
+
+void
+grub_qemu_init_cirrus (void)
+{
+ auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid);
+ int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__ ((unused)))
+ {
+ grub_pci_address_t addr;
+ grub_uint32_t class;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class = grub_pci_read (addr);
+
+ if (((class >> 16) & 0xffff) != GRUB_PCI_CLASS_SUBCLASS_VGA)
+ return 0;
+
+ /* FIXME: chooose addresses dynamically. */
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
+ grub_pci_write (addr, 0xf0000000 | GRUB_PCI_ADDR_MEM_PREFETCH
+ | GRUB_PCI_ADDR_SPACE_MEMORY | GRUB_PCI_ADDR_MEM_TYPE_32);
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG1);
+ grub_pci_write (addr, 0xf2000000
+ | GRUB_PCI_ADDR_SPACE_MEMORY | GRUB_PCI_ADDR_MEM_TYPE_32);
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
+ grub_pci_write (addr, GRUB_PCI_COMMAND_MEM_ENABLED
+ | GRUB_PCI_COMMAND_IO_ENABLED);
+
+ return 1;
+ }
+
+ grub_pci_iterate (find_card);
+
+ grub_outb (GRUB_VGA_IO_MISC_COLOR, GRUB_VGA_IO_MISC_WRITE);
+
+ load_font ();
+
+ grub_vga_gr_write (GRUB_VGA_GR_GR6_MMAP_CGA, GRUB_VGA_GR_GR6);
+ grub_vga_gr_write (GRUB_VGA_GR_MODE_ODD_EVEN, GRUB_VGA_GR_MODE);
+
+ grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_NORMAL, GRUB_VGA_SR_MEMORY_MODE);
+
+ grub_vga_sr_write ((1 << GRUB_VGA_TEXT_TEXT_PLANE)
+ | (1 << GRUB_VGA_TEXT_ATTR_PLANE),
+ GRUB_VGA_SR_MAP_MASK_REGISTER);
+
+ grub_vga_cr_write (15, GRUB_VGA_CR_CELL_HEIGHT);
+ grub_vga_cr_write (79, GRUB_VGA_CR_HORIZ_END);
+ grub_vga_cr_write (40, GRUB_VGA_CR_PITCH);
+
+ int vert = 25 * 16;
+ grub_vga_cr_write (vert & 0xff, GRUB_VGA_CR_VDISPLAY_END);
+ grub_vga_cr_write (((vert >> GRUB_VGA_CR_OVERFLOW_HEIGHT1_SHIFT)
+ & GRUB_VGA_CR_OVERFLOW_HEIGHT1_MASK)
+ | ((vert >> GRUB_VGA_CR_OVERFLOW_HEIGHT2_SHIFT)
+ & GRUB_VGA_CR_OVERFLOW_HEIGHT2_MASK),
+ GRUB_VGA_CR_OVERFLOW);
+
+ load_palette ();
+
+ grub_vga_write_arx (GRUB_VGA_ARX_MODE_TEXT, GRUB_VGA_ARX_MODE);
+ grub_vga_write_arx (0, GRUB_VGA_ARX_COLOR_SELECT);
+
+ grub_vga_sr_write (GRUB_VGA_SR_CLOCKING_MODE_8_DOT_CLOCK,
+ GRUB_VGA_SR_CLOCKING_MODE);
+
+ grub_vga_cr_write (14, GRUB_VGA_CR_CURSOR_START);
+ grub_vga_cr_write (15, GRUB_VGA_CR_CURSOR_END);
+
+ grub_outb (0x20, 0x3c0);
+}
diff --git a/grub-core/kern/i386/qemu/mmap.c b/grub-core/kern/i386/qemu/mmap.c
new file mode 100644
index 0000000..208f36b
--- /dev/null
+++ b/grub-core/kern/i386/qemu/mmap.c
@@ -0,0 +1,100 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/i386/memory.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/boot.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/cmos.h>
+#include <grub/offsets.h>
+
+#define QEMU_CMOS_MEMSIZE_HIGH 0x35
+#define QEMU_CMOS_MEMSIZE_LOW 0x34
+
+#define QEMU_CMOS_MEMSIZE2_HIGH 0x31
+#define QEMU_CMOS_MEMSIZE2_LOW 0x30
+
+#define min(a,b) ((a) > (b) ? (b) : (a))
+
+extern char _start[];
+extern char _end[];
+
+static grub_uint64_t mem_size, above_4g;
+
+void
+grub_machine_mmap_init ()
+{
+ mem_size = ((grub_uint64_t) grub_cmos_read (QEMU_CMOS_MEMSIZE_HIGH)) << 24
+ | ((grub_uint64_t) grub_cmos_read (QEMU_CMOS_MEMSIZE_LOW)) << 16;
+ if (mem_size > 0)
+ {
+ /* Don't ask... */
+ mem_size += (16 * 1024 * 1024);
+ }
+ else
+ {
+ mem_size
+ = ((((grub_uint64_t) grub_cmos_read (QEMU_CMOS_MEMSIZE2_HIGH)) << 18)
+ | ((grub_uint64_t) (grub_cmos_read (QEMU_CMOS_MEMSIZE2_LOW)) << 10))
+ + 1024 * 1024;
+ }
+
+ above_4g = (((grub_uint64_t) grub_cmos_read (0x5b)) << 16)
+ | (((grub_uint64_t) grub_cmos_read (0x5c)) << 24)
+ | (((grub_uint64_t) grub_cmos_read (0x5d)) << 32);
+}
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ if (hook (0x0,
+ (grub_addr_t) _start,
+ GRUB_MEMORY_AVAILABLE))
+ return 1;
+
+ if (hook ((grub_addr_t) _end,
+ 0xa0000 - (grub_addr_t) _end,
+ GRUB_MEMORY_AVAILABLE))
+ return 1;
+
+ if (hook (GRUB_MEMORY_MACHINE_UPPER,
+ 0x100000 - GRUB_MEMORY_MACHINE_UPPER,
+ GRUB_MEMORY_RESERVED))
+ return 1;
+
+ /* Everything else is free. */
+ if (hook (0x100000,
+ min (mem_size, (grub_uint32_t) -GRUB_BOOT_MACHINE_SIZE) - 0x100000,
+ GRUB_MEMORY_AVAILABLE))
+ return 1;
+
+ /* Protect boot.img, which contains the gdt. It is mapped at the top of memory
+ (it is also mapped below 0x100000, but we already reserved that area). */
+ if (hook ((grub_uint32_t) -GRUB_BOOT_MACHINE_SIZE,
+ GRUB_BOOT_MACHINE_SIZE,
+ GRUB_MEMORY_RESERVED))
+ return 1;
+
+ if (above_4g != 0 && hook (0x100000000ULL, above_4g,
+ GRUB_MEMORY_AVAILABLE))
+ return 1;
+
+ return 0;
+}
diff --git a/grub-core/kern/i386/qemu/startup.S b/grub-core/kern/i386/qemu/startup.S
new file mode 100644
index 0000000..7834d1d
--- /dev/null
+++ b/grub-core/kern/i386/qemu/startup.S
@@ -0,0 +1,104 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/symbol.h>
+
+#include <grub/i386/pc/memory.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/kernel.h>
+
+ .text
+ .code32
+ .globl _start
+_start:
+ jmp codestart
+
+ . = _start + GRUB_KERNEL_I386_QEMU_CORE_ENTRY_ADDR
+VARIABLE(grub_core_entry_addr)
+ .long 0
+VARIABLE(grub_kernel_image_size)
+ .long 0
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX_END
+
+codestart:
+ /* Relocate to low memory. First we figure out our location.
+ We will derive the rom start address from it. */
+ call 1f
+1: popl %esi
+
+ /* Rom size is a multiple of 64 kiB. With this we get the
+ value of `grub_core_entry_addr' in %esi. */
+ xorw %si, %si
+
+ /* ... which allows us to access `grub_kernel_image_size'
+ before relocation. */
+ movl (grub_kernel_image_size - _start)(%esi), %ecx
+
+
+ movl $_start, %edi
+ cld
+ rep
+ movsb
+ ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $1f
+1:
+
+#ifdef APPLE_CC
+ /* clean out the bss */
+ bss_start_abs = ABS (bss_start)
+ bss_end_abs = ABS (bss_end)
+
+ movl bss_start_abs, %edi
+
+ /* compute the bss length */
+ movl bss_end_abs, %ecx
+ subl %edi, %ecx
+#else
+ /* clean out the bss */
+ movl $BSS_START_SYMBOL, %edi
+
+ /* compute the bss length */
+ movl $END_SYMBOL, %ecx
+ subl %edi, %ecx
+#endif
+
+ /* clean out */
+ xorl %eax, %eax
+ cld
+ rep
+ stosb
+
+ /*
+ * Call the start of main body of C code.
+ */
+ call EXT_C(grub_main)
+
+ /* This should never happen. */
+ cli
+1:
+ hlt
+ jmp 1b
+
+#include "../realmode.S"
diff --git a/grub-core/kern/i386/realmode.S b/grub-core/kern/i386/realmode.S
new file mode 100644
index 0000000..578c8d2
--- /dev/null
+++ b/grub-core/kern/i386/realmode.S
@@ -0,0 +1,242 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/i386/pc/memory.h>
+
+/*
+ * Note: These functions defined in this file may be called from C.
+ * Be careful of that you must not modify some registers. Quote
+ * from gcc-2.95.2/gcc/config/i386/i386.h:
+
+ 1 for registers not available across function calls.
+ These must include the FIXED_REGISTERS and also any
+ registers that can be used without being saved.
+ The latter must include the registers where values are returned
+ and the register where structure-value addresses are passed.
+ Aside from that, you can include as many other registers as you like.
+
+ ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg
+{ 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
+ */
+
+/*
+ * Note: GRUB is compiled with the options -mrtd and -mregparm=3.
+ * So the first three arguments are passed in %eax, %edx, and %ecx,
+ * respectively, and if a function has a fixed number of arguments
+ * and the number if greater than three, the function must return
+ * with "ret $N" where N is ((the number of arguments) - 3) * 4.
+ */
+
+/*
+ * This is the area for all of the special variables.
+ */
+
+ .p2align 2 /* force 4-byte alignment */
+
+protstack:
+ .long GRUB_MEMORY_MACHINE_PROT_STACK
+
+/*
+ * This is the Global Descriptor Table
+ *
+ * An entry, a "Segment Descriptor", looks like this:
+ *
+ * 31 24 19 16 7 0
+ * ------------------------------------------------------------
+ * | | |B| |A| | | |1|0|E|W|A| |
+ * | BASE 31..24 |G|/|L|V| LIMIT |P|DPL| TYPE | BASE 23:16 | 4
+ * | | |D| |L| 19..16| | |1|1|C|R|A| |
+ * ------------------------------------------------------------
+ * | | |
+ * | BASE 15..0 | LIMIT 15..0 | 0
+ * | | |
+ * ------------------------------------------------------------
+ *
+ * Note the ordering of the data items is reversed from the above
+ * description.
+ */
+
+ .p2align 2 /* force 4-byte alignment */
+gdt:
+ .word 0, 0
+ .byte 0, 0, 0, 0
+
+ /* -- code segment --
+ * base = 0x00000000, limit = 0xFFFFF (4 KiB Granularity), present
+ * type = 32bit code execute/read, DPL = 0
+ */
+ .word 0xFFFF, 0
+ .byte 0, 0x9A, 0xCF, 0
+
+ /* -- data segment --
+ * base = 0x00000000, limit 0xFFFFF (4 KiB Granularity), present
+ * type = 32 bit data read/write, DPL = 0
+ */
+ .word 0xFFFF, 0
+ .byte 0, 0x92, 0xCF, 0
+
+ /* -- 16 bit real mode CS --
+ * base = 0x00000000, limit 0x0FFFF (1 B Granularity), present
+ * type = 16 bit code execute/read only/conforming, DPL = 0
+ */
+ .word 0xFFFF, 0
+ .byte 0, 0x9E, 0, 0
+
+ /* -- 16 bit real mode DS --
+ * base = 0x00000000, limit 0x0FFFF (1 B Granularity), present
+ * type = 16 bit data read/write, DPL = 0
+ */
+ .word 0xFFFF, 0
+ .byte 0, 0x92, 0, 0
+
+
+/* this is the GDT descriptor */
+gdtdesc:
+ .word 0x27 /* limit */
+ .long gdt /* addr */
+
+/*
+ * These next two routines, "real_to_prot" and "prot_to_real" are structured
+ * in a very specific way. Be very careful when changing them.
+ *
+ * NOTE: Use of either one messes up %eax and %ebp.
+ */
+
+real_to_prot:
+ .code16
+ cli
+
+ /* load the GDT register */
+ xorw %ax, %ax
+ movw %ax, %ds
+ DATA32 ADDR32 lgdt gdtdesc
+
+ /* turn on protected mode */
+ movl %cr0, %eax
+ orl $GRUB_MEMORY_CPU_CR0_PE_ON, %eax
+ movl %eax, %cr0
+
+ /* jump to relocation, flush prefetch queue, and reload %cs */
+ DATA32 ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $protcseg
+
+ .code32
+protcseg:
+ /* reload other segment registers */
+ movw $GRUB_MEMORY_MACHINE_PROT_MODE_DSEG, %ax
+ movw %ax, %ds
+ movw %ax, %es
+ movw %ax, %fs
+ movw %ax, %gs
+ movw %ax, %ss
+
+ /* put the return address in a known safe location */
+ movl (%esp), %eax
+ movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK
+
+ /* get protected mode stack */
+ movl protstack, %eax
+ movl %eax, %esp
+ movl %eax, %ebp
+
+ /* get return address onto the right stack */
+ movl GRUB_MEMORY_MACHINE_REAL_STACK, %eax
+ movl %eax, (%esp)
+
+ /* zero %eax */
+ xorl %eax, %eax
+
+ /* return on the old (or initialized) stack! */
+ ret
+
+prot_to_real:
+ /* just in case, set GDT */
+ lgdt gdtdesc
+
+ /* save the protected mode stack */
+ movl %esp, %eax
+ movl %eax, protstack
+
+ /* get the return address */
+ movl (%esp), %eax
+ movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK
+
+ /* set up new stack */
+ movl $GRUB_MEMORY_MACHINE_REAL_STACK, %eax
+ movl %eax, %esp
+ movl %eax, %ebp
+
+ /* set up segment limits */
+ movw $GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG, %ax
+ movw %ax, %ds
+ movw %ax, %es
+ movw %ax, %fs
+ movw %ax, %gs
+ movw %ax, %ss
+
+ /* this might be an extra step */
+ /* jump to a 16 bit segment */
+ ljmp $GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG, $tmpcseg
+
+tmpcseg:
+ .code16
+
+ /* clear the PE bit of CR0 */
+ movl %cr0, %eax
+ andl $(~GRUB_MEMORY_CPU_CR0_PE_ON), %eax
+ movl %eax, %cr0
+
+ /* flush prefetch queue, reload %cs */
+ DATA32 ljmp $0, $realcseg
+
+realcseg:
+ /* we are in real mode now
+ * set up the real mode segment registers : DS, SS, ES
+ */
+ /* zero %eax */
+ xorl %eax, %eax
+
+ movw %ax, %ds
+ movw %ax, %es
+ movw %ax, %fs
+ movw %ax, %gs
+ movw %ax, %ss
+
+#ifdef GRUB_MACHINE_PCBIOS
+ /* restore interrupts */
+ sti
+#endif
+
+ /* return on new stack! */
+ DATA32 ret
+
+ .code32
+
+/*
+ * grub_reboot()
+ *
+ * Reboot the system. At the moment, rely on BIOS.
+ */
+FUNCTION(grub_reboot)
+ call prot_to_real
+ .code16
+cold_reboot:
+ /* set 0x472 to 0x0000 for cold boot (0x1234 for warm boot) */
+ movw $0x0472, %di
+ movw %ax, (%di)
+ ljmp $0xf000, $0xfff0
+ .code32
diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c
new file mode 100644
index 0000000..36b35e2
--- /dev/null
+++ b/grub-core/kern/i386/tsc.c
@@ -0,0 +1,74 @@
+/* kern/i386/tsc.c - x86 TSC time source implementation
+ * Requires Pentium or better x86 CPU that supports the RDTSC instruction.
+ * This module uses the RTC (via grub_get_rtc()) to calibrate the TSC to
+ * real time.
+ *
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/time.h>
+#include <grub/misc.h>
+#include <grub/i386/tsc.h>
+#include <grub/i386/pit.h>
+
+/* This defines the value TSC had at the epoch (that is, when we calibrated it). */
+static grub_uint64_t tsc_boot_time;
+
+/* Calibrated TSC rate. (In TSC ticks per millisecond.) */
+static grub_uint64_t tsc_ticks_per_ms;
+
+
+grub_uint64_t
+grub_tsc_get_time_ms (void)
+{
+ return tsc_boot_time + grub_divmod64 (grub_get_tsc (), tsc_ticks_per_ms, 0);
+}
+
+
+/* How many RTC ticks to use for calibration loop. (>= 1) */
+#define CALIBRATION_TICKS 2
+
+/* Calibrate the TSC based on the RTC. */
+static void
+calibrate_tsc (void)
+{
+ /* First calibrate the TSC rate (relative, not absolute time). */
+ grub_uint64_t start_tsc;
+ grub_uint64_t end_tsc;
+
+ start_tsc = grub_get_tsc ();
+ grub_pit_wait (0xffff);
+ end_tsc = grub_get_tsc ();
+
+ tsc_ticks_per_ms = grub_divmod64 (end_tsc - start_tsc, 55, 0);
+}
+
+void
+grub_tsc_init (void)
+{
+ if (grub_cpu_is_tsc_supported ())
+ {
+ tsc_boot_time = grub_get_tsc ();
+ calibrate_tsc ();
+ grub_install_get_time_ms (grub_tsc_get_time_ms);
+ }
+ else
+ {
+ grub_install_get_time_ms (grub_rtc_get_time_ms);
+ }
+}
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
new file mode 100644
index 0000000..2fbe809
--- /dev/null
+++ b/grub-core/kern/ieee1275/cmain.c
@@ -0,0 +1,182 @@
+/* cmain.c - Startup code for the PowerPC. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/ieee1275/ieee1275.h>
+
+int (*grub_ieee1275_entry_fn) (void *);
+
+grub_ieee1275_phandle_t grub_ieee1275_chosen;
+grub_ieee1275_ihandle_t grub_ieee1275_mmu;
+
+static grub_uint32_t grub_ieee1275_flags;
+
+
+
+int
+grub_ieee1275_test_flag (enum grub_ieee1275_flag flag)
+{
+ return (grub_ieee1275_flags & (1 << flag));
+}
+
+void
+grub_ieee1275_set_flag (enum grub_ieee1275_flag flag)
+{
+ grub_ieee1275_flags |= (1 << flag);
+}
+
+#define SF "SmartFirmware(tm)"
+#define OHW "PPC Open Hack'Ware"
+
+static void
+grub_ieee1275_find_options (void)
+{
+ grub_ieee1275_phandle_t root;
+ grub_ieee1275_phandle_t options;
+ grub_ieee1275_phandle_t openprom;
+ grub_ieee1275_phandle_t bootrom;
+ int rc;
+ grub_uint32_t realmode = 0;
+ char tmp[32];
+ int is_smartfirmware = 0;
+ int is_olpc = 0;
+ int is_qemu = 0;
+
+ grub_ieee1275_finddevice ("/", &root);
+ grub_ieee1275_finddevice ("/options", &options);
+ grub_ieee1275_finddevice ("/openprom", &openprom);
+
+ rc = grub_ieee1275_get_integer_property (options, "real-mode?", &realmode,
+ sizeof realmode, 0);
+ if (((rc >= 0) && realmode) || (grub_ieee1275_mmu == 0))
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_REAL_MODE);
+
+ rc = grub_ieee1275_get_property (openprom, "CodeGen-copyright",
+ tmp, sizeof (tmp), 0);
+ if (rc >= 0 && !grub_strncmp (tmp, SF, sizeof (SF) - 1))
+ is_smartfirmware = 1;
+
+ rc = grub_ieee1275_get_property (root, "architecture",
+ tmp, sizeof (tmp), 0);
+ if (rc >= 0 && !grub_strcmp (tmp, "OLPC"))
+ is_olpc = 1;
+
+ rc = grub_ieee1275_get_property (root, "model",
+ tmp, sizeof (tmp), 0);
+ if (rc >= 0 && !grub_strcmp (tmp, "Emulated PC"))
+ is_qemu = 1;
+
+ if (grub_strncmp (tmp, "PowerMac", sizeof ("PowerMac") - 1) == 0)
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS);
+
+ if (is_smartfirmware)
+ {
+ /* Broken in all versions */
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT);
+
+ /* There are two incompatible ways of checking the version number. Try
+ both. */
+ rc = grub_ieee1275_get_property (openprom, "SmartFirmware-version",
+ tmp, sizeof (tmp), 0);
+ if (rc < 0)
+ rc = grub_ieee1275_get_property (openprom, "firmware-version",
+ tmp, sizeof (tmp), 0);
+ if (rc >= 0)
+ {
+ /* It is tempting to implement a version parser to set the flags for
+ e.g. 1.3 and below. However, there's a special situation here.
+ 3rd party updates which fix the partition bugs are common, and for
+ some reason their fixes aren't being merged into trunk. So for
+ example we know that 1.2 and 1.3 are broken, but there's 1.2.99
+ and 1.3.99 which are known good (and applying this workaround
+ would cause breakage). */
+ if (!grub_strcmp (tmp, "1.0")
+ || !grub_strcmp (tmp, "1.1")
+ || !grub_strcmp (tmp, "1.2")
+ || !grub_strcmp (tmp, "1.3"))
+ {
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_PARTITION_0);
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS);
+ }
+ }
+ }
+
+ if (is_olpc)
+ {
+ /* OLPC / XO laptops have three kinds of storage devices:
+
+ - NAND flash. These are accessible via OFW callbacks, but:
+ - Follow strange semantics, imposed by hardware constraints.
+ - Its ABI is undocumented, and not stable.
+ They lack "device_type" property, which conveniently makes GRUB
+ skip them.
+
+ - USB drives. Not accessible, because OFW shuts down the controller
+ in order to prevent collisions with applications accessing it
+ directly. Even worse, attempts to access it will NOT return
+ control to the caller, so we have to avoid probing them.
+
+ - SD cards. These work fine.
+
+ To avoid breakage, we only need to skip USB probing. However,
+ since detecting SD cards is more reliable, we do that instead.
+ */
+
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY);
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_HAS_CURSORONOFF);
+ }
+
+ if (is_qemu)
+ {
+ /* OpenFirmware hangs on qemu if one requests any memory below 1.5 MiB. */
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM);
+
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_HAS_CURSORONOFF);
+ }
+
+ if (! grub_ieee1275_finddevice ("/rom/boot-rom", &bootrom))
+ {
+ rc = grub_ieee1275_get_property (bootrom, "model", tmp, sizeof (tmp), 0);
+ if (rc >= 0 && !grub_strncmp (tmp, OHW, sizeof (OHW) - 1))
+ {
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT);
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS);
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_INTERPRET);
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_FORCE_CLAIM);
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_ANSI);
+ }
+ }
+}
+
+#undef SF
+#undef OHW
+
+void
+grub_ieee1275_init (void)
+{
+ grub_ieee1275_finddevice ("/chosen", &grub_ieee1275_chosen);
+
+ if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "mmu", &grub_ieee1275_mmu,
+ sizeof grub_ieee1275_mmu, 0) < 0)
+ grub_ieee1275_mmu = 0;
+
+ grub_ieee1275_find_options ();
+}
diff --git a/grub-core/kern/ieee1275/ieee1275.c b/grub-core/kern/ieee1275/ieee1275.c
new file mode 100644
index 0000000..9e29191
--- /dev/null
+++ b/grub-core/kern/ieee1275/ieee1275.c
@@ -0,0 +1,609 @@
+/* of.c - Access the Open Firmware client interface. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/types.h>
+
+#define IEEE1275_PHANDLE_INVALID ((grub_ieee1275_cell_t) -1)
+#define IEEE1275_IHANDLE_INVALID ((grub_ieee1275_cell_t) 0)
+#define IEEE1275_CELL_INVALID ((grub_ieee1275_cell_t) -1)
+
+
+
+int
+grub_ieee1275_finddevice (char *name, grub_ieee1275_phandle_t *phandlep)
+{
+ struct find_device_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t device;
+ grub_ieee1275_cell_t phandle;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "finddevice", 1, 1);
+ args.device = (grub_ieee1275_cell_t) name;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *phandlep = args.phandle;
+ if (args.phandle == IEEE1275_PHANDLE_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_get_property (grub_ieee1275_phandle_t phandle,
+ const char *property, void *buf,
+ grub_size_t size, grub_ssize_t *actual)
+{
+ struct get_property_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t phandle;
+ grub_ieee1275_cell_t prop;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t buflen;
+ grub_ieee1275_cell_t size;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "getprop", 4, 1);
+ args.phandle = phandle;
+ args.prop = (grub_ieee1275_cell_t) property;
+ args.buf = (grub_ieee1275_cell_t) buf;
+ args.buflen = (grub_ieee1275_cell_t) size;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ if (actual)
+ *actual = (grub_ssize_t) args.size;
+ if (args.size == IEEE1275_CELL_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_get_integer_property (grub_ieee1275_phandle_t phandle,
+ const char *property, grub_uint32_t *buf,
+ grub_size_t size, grub_ssize_t *actual)
+{
+ int ret;
+ ret = grub_ieee1275_get_property (phandle, property, (void *) buf, size, actual);
+#ifndef GRUB_CPU_WORDS_BIGENDIAN
+ /* Integer properties are always in big endian. */
+ if (ret == 0)
+ {
+ unsigned int i;
+ size /= sizeof (grub_uint32_t);
+ for (i = 0; i < size; i++)
+ buf[i] = grub_be_to_cpu32 (buf[i]);
+ }
+#endif
+ return ret;
+}
+
+int
+grub_ieee1275_next_property (grub_ieee1275_phandle_t phandle, char *prev_prop,
+ char *prop)
+{
+ struct get_property_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t phandle;
+ grub_ieee1275_cell_t prev_prop;
+ grub_ieee1275_cell_t next_prop;
+ grub_ieee1275_cell_t flags;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "nextprop", 3, 1);
+ args.phandle = phandle;
+ args.prev_prop = (grub_ieee1275_cell_t) prev_prop;
+ args.next_prop = (grub_ieee1275_cell_t) prop;
+ args.flags = (grub_ieee1275_cell_t) -1;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ return (int) args.flags;
+}
+
+int
+grub_ieee1275_get_property_length (grub_ieee1275_phandle_t phandle,
+ const char *prop, grub_ssize_t *length)
+{
+ struct get_property_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t phandle;
+ grub_ieee1275_cell_t prop;
+ grub_ieee1275_cell_t length;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "getproplen", 2, 1);
+ args.phandle = phandle;
+ args.prop = (grub_ieee1275_cell_t) prop;
+ args.length = (grub_ieee1275_cell_t) -1;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *length = args.length;
+ if (args.length == IEEE1275_CELL_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_instance_to_package (grub_ieee1275_ihandle_t ihandle,
+ grub_ieee1275_phandle_t *phandlep)
+{
+ struct instance_to_package_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t phandle;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "instance-to-package", 1, 1);
+ args.ihandle = ihandle;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *phandlep = args.phandle;
+ if (args.phandle == IEEE1275_PHANDLE_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_package_to_path (grub_ieee1275_phandle_t phandle,
+ char *path, grub_size_t len,
+ grub_ssize_t *actual)
+{
+ struct instance_to_package_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t phandle;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t buflen;
+ grub_ieee1275_cell_t actual;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "package-to-path", 3, 1);
+ args.phandle = phandle;
+ args.buf = (grub_ieee1275_cell_t) path;
+ args.buflen = (grub_ieee1275_cell_t) len;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ if (actual)
+ *actual = args.actual;
+ if (args.actual == IEEE1275_CELL_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_instance_to_path (grub_ieee1275_ihandle_t ihandle,
+ char *path, grub_size_t len,
+ grub_ssize_t *actual)
+{
+ struct instance_to_path_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t buflen;
+ grub_ieee1275_cell_t actual;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "instance-to-path", 3, 1);
+ args.ihandle = ihandle;
+ args.buf = (grub_ieee1275_cell_t) path;
+ args.buflen = (grub_ieee1275_cell_t) len;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ if (actual)
+ *actual = args.actual;
+ if (args.actual == IEEE1275_CELL_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_write (grub_ieee1275_ihandle_t ihandle, void *buffer,
+ grub_size_t len, grub_ssize_t *actualp)
+{
+ struct write_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t len;
+ grub_ieee1275_cell_t actual;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "write", 3, 1);
+ args.ihandle = ihandle;
+ args.buf = (grub_ieee1275_cell_t) buffer;
+ args.len = (grub_ieee1275_cell_t) len;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ if (actualp)
+ *actualp = args.actual;
+ return 0;
+}
+
+int
+grub_ieee1275_read (grub_ieee1275_ihandle_t ihandle, void *buffer,
+ grub_size_t len, grub_ssize_t *actualp)
+{
+ struct write_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t len;
+ grub_ieee1275_cell_t actual;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "read", 3, 1);
+ args.ihandle = ihandle;
+ args.buf = (grub_ieee1275_cell_t) buffer;
+ args.len = (grub_ieee1275_cell_t) len;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ if (actualp)
+ *actualp = args.actual;
+ return 0;
+}
+
+int
+grub_ieee1275_seek (grub_ieee1275_ihandle_t ihandle, grub_disk_addr_t pos,
+ grub_ssize_t *result)
+{
+ struct write_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t pos_hi;
+ grub_ieee1275_cell_t pos_lo;
+ grub_ieee1275_cell_t result;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "seek", 3, 1);
+ args.ihandle = ihandle;
+ /* To prevent stupid gcc warning. */
+#if GRUB_IEEE1275_CELL_SIZEOF >= 8
+ args.pos_hi = 0;
+ args.pos_lo = pos;
+#else
+ args.pos_hi = (grub_ieee1275_cell_t) (pos >> (8 * GRUB_IEEE1275_CELL_SIZEOF));
+ args.pos_lo = (grub_ieee1275_cell_t)
+ (pos & ((1ULL << (8 * GRUB_IEEE1275_CELL_SIZEOF)) - 1));
+#endif
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+
+ if (result)
+ *result = args.result;
+ return 0;
+}
+
+int
+grub_ieee1275_peer (grub_ieee1275_phandle_t node,
+ grub_ieee1275_phandle_t *result)
+{
+ struct peer_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t node;
+ grub_ieee1275_cell_t result;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "peer", 1, 1);
+ args.node = node;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *result = args.result;
+ if (args.result == 0)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_child (grub_ieee1275_phandle_t node,
+ grub_ieee1275_phandle_t *result)
+{
+ struct child_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t node;
+ grub_ieee1275_cell_t result;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "child", 1, 1);
+ args.node = node;
+ args.result = IEEE1275_PHANDLE_INVALID;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *result = args.result;
+ if (args.result == 0)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_parent (grub_ieee1275_phandle_t node,
+ grub_ieee1275_phandle_t *result)
+{
+ struct parent_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t node;
+ grub_ieee1275_cell_t result;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "parent", 1, 1);
+ args.node = node;
+ args.result = IEEE1275_PHANDLE_INVALID;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *result = args.result;
+ return 0;
+}
+
+int
+grub_ieee1275_interpret (const char *command, grub_ieee1275_cell_t *catch)
+{
+ struct enter_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t command;
+ grub_ieee1275_cell_t catch;
+ }
+ args;
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_INTERPRET))
+ return -1;
+
+ INIT_IEEE1275_COMMON (&args.common, "interpret", 1, 1);
+ args.command = (grub_ieee1275_cell_t) command;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ if (catch)
+ *catch = args.catch;
+ return 0;
+}
+
+int
+grub_ieee1275_enter (void)
+{
+ struct enter_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "enter", 0, 0);
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ return 0;
+}
+
+void
+grub_ieee1275_exit (void)
+{
+ struct exit_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "exit", 0, 0);
+
+ IEEE1275_CALL_ENTRY_FN (&args);
+ for (;;) ;
+}
+
+int
+grub_ieee1275_open (const char *path, grub_ieee1275_ihandle_t *result)
+{
+ struct open_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t path;
+ grub_ieee1275_cell_t result;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "open", 1, 1);
+ args.path = (grub_ieee1275_cell_t) path;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *result = args.result;
+ if (args.result == IEEE1275_IHANDLE_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_close (grub_ieee1275_ihandle_t ihandle)
+{
+ struct close_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t ihandle;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "close", 1, 0);
+ args.ihandle = ihandle;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+
+ return 0;
+}
+
+int
+grub_ieee1275_claim (grub_addr_t addr, grub_size_t size, unsigned int align,
+ grub_addr_t *result)
+{
+ struct claim_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t addr;
+ grub_ieee1275_cell_t size;
+ grub_ieee1275_cell_t align;
+ grub_ieee1275_cell_t base;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "claim", 3, 1);
+ args.addr = (grub_ieee1275_cell_t) addr;
+ args.size = (grub_ieee1275_cell_t) size;
+ args.align = (grub_ieee1275_cell_t) align;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ if (result)
+ *result = args.base;
+ if (args.base == IEEE1275_CELL_INVALID)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_release (grub_addr_t addr, grub_size_t size)
+{
+ struct release_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t addr;
+ grub_ieee1275_cell_t size;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "release", 2, 0);
+ args.addr = addr;
+ args.size = size;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_set_property (grub_ieee1275_phandle_t phandle,
+ const char *propname, void *buf,
+ grub_size_t size, grub_ssize_t *actual)
+{
+ struct set_property_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t phandle;
+ grub_ieee1275_cell_t propname;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t size;
+ grub_ieee1275_cell_t actual;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "setprop", 4, 1);
+ args.size = (grub_ieee1275_cell_t) size;
+ args.buf = (grub_ieee1275_cell_t) buf;
+ args.propname = (grub_ieee1275_cell_t) propname;
+ args.phandle = (grub_ieee1275_cell_t) phandle;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *actual = args.actual;
+ if ((args.actual == IEEE1275_CELL_INVALID) || (args.actual != args.size))
+ return -1;
+ return 0;
+}
+
+int
+grub_ieee1275_set_color (grub_ieee1275_ihandle_t ihandle,
+ int index, int r, int g, int b)
+{
+ struct set_color_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t index;
+ grub_ieee1275_cell_t b;
+ grub_ieee1275_cell_t g;
+ grub_ieee1275_cell_t r;
+ grub_ieee1275_cell_t catch_result;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 6, 1);
+ args.method = (grub_ieee1275_cell_t) "color!";
+ args.ihandle = ihandle;
+ args.index = index;
+ args.r = r;
+ args.g = g;
+ args.b = b;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ return args.catch_result;
+}
+
+int
+grub_ieee1275_milliseconds (grub_uint32_t *msecs)
+{
+ struct milliseconds_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t msecs;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "milliseconds", 0, 1);
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ *msecs = args.msecs;
+ return 0;
+}
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
new file mode 100644
index 0000000..682a8b5
--- /dev/null
+++ b/grub-core/kern/ieee1275/init.c
@@ -0,0 +1,274 @@
+/* init.c -- Initialize GRUB on the newworld mac (PPC). */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/dl.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+#include <grub/normal.h>
+#include <grub/fs.h>
+#include <grub/setjmp.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/time.h>
+#include <grub/ieee1275/console.h>
+#include <grub/ieee1275/ofdisk.h>
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/offsets.h>
+#include <grub/memory.h>
+
+/* The minimal heap size we can live with. */
+#define HEAP_MIN_SIZE (unsigned long) (2 * 1024 * 1024)
+
+/* The maximum heap size we're going to claim */
+#define HEAP_MAX_SIZE (unsigned long) (32 * 1024 * 1024)
+
+/* If possible, we will avoid claiming heap above this address, because it
+ seems to cause relocation problems with OSes that link at 4 MiB */
+#define HEAP_MAX_ADDR (unsigned long) (32 * 1024 * 1024)
+
+extern char _start[];
+extern char _end[];
+
+void
+grub_exit (void)
+{
+ grub_ieee1275_exit ();
+}
+
+/* Translate an OF filesystem path (separated by backslashes), into a GRUB
+ path (separated by forward slashes). */
+static void
+grub_translate_ieee1275_path (char *filepath)
+{
+ char *backslash;
+
+ backslash = grub_strchr (filepath, '\\');
+ while (backslash != 0)
+ {
+ *backslash = '/';
+ backslash = grub_strchr (filepath, '\\');
+ }
+}
+
+void
+grub_machine_set_prefix (void)
+{
+ char bootpath[64]; /* XXX check length */
+ char *filename;
+ char *prefix;
+
+ if (grub_prefix[0])
+ {
+ grub_env_set ("prefix", grub_prefix);
+ /* Prefix is hardcoded in the core image. */
+ return;
+ }
+
+ if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", &bootpath,
+ sizeof (bootpath), 0))
+ {
+ /* Should never happen. */
+ grub_printf ("/chosen/bootpath property missing!\n");
+ grub_env_set ("prefix", "");
+ return;
+ }
+
+ /* Transform an OF device path to a GRUB path. */
+
+ prefix = grub_ieee1275_encode_devname (bootpath);
+
+ filename = grub_ieee1275_get_filename (bootpath);
+ if (filename)
+ {
+ char *newprefix;
+ char *lastslash = grub_strrchr (filename, '\\');
+
+ /* Truncate at last directory. */
+ if (lastslash)
+ {
+ *lastslash = '\0';
+ grub_translate_ieee1275_path (filename);
+
+ newprefix = grub_xasprintf ("%s%s", prefix, filename);
+ if (newprefix)
+ {
+ grub_free (prefix);
+ prefix = newprefix;
+ }
+ }
+ }
+
+ grub_env_set ("prefix", prefix);
+
+ grub_free (filename);
+ grub_free (prefix);
+}
+
+/* Claim some available memory in the first /memory node. */
+static void grub_claim_heap (void)
+{
+ unsigned long total = 0;
+
+ auto int NESTED_FUNC_ATTR heap_init (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type);
+ int NESTED_FUNC_ATTR heap_init (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type)
+ {
+ if (type != 1)
+ return 0;
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM))
+ {
+ if (addr + len <= 0x180000)
+ return 0;
+
+ if (addr < 0x180000)
+ {
+ len = addr + len - 0x180000;
+ addr = 0x180000;
+ }
+ }
+ len -= 1; /* Required for some firmware. */
+
+ /* Never exceed HEAP_MAX_SIZE */
+ if (total + len > HEAP_MAX_SIZE)
+ len = HEAP_MAX_SIZE - total;
+
+ /* Avoid claiming anything above HEAP_MAX_ADDR, if possible. */
+ if ((addr < HEAP_MAX_ADDR) && /* if it's too late, don't bother */
+ (addr + len > HEAP_MAX_ADDR) && /* if it wasn't available anyway, don't bother */
+ (total + (HEAP_MAX_ADDR - addr) > HEAP_MIN_SIZE)) /* only limit ourselves when we can afford to */
+ len = HEAP_MAX_ADDR - addr;
+
+ /* In theory, firmware should already prevent this from happening by not
+ listing our own image in /memory/available. The check below is intended
+ as a safeguard in case that doesn't happen. However, it doesn't protect
+ us from corrupting our module area, which extends up to a
+ yet-undetermined region above _end. */
+ if ((addr < (grub_addr_t) _end) && ((addr + len) > (grub_addr_t) _start))
+ {
+ grub_printf ("Warning: attempt to claim over our own code!\n");
+ len = 0;
+ }
+
+ if (len)
+ {
+ /* Claim and use it. */
+ if (grub_claimmap (addr, len) < 0)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "failed to claim heap at 0x%llx, len 0x%llx",
+ addr, len);
+ grub_mm_init_region ((void *) (grub_addr_t) addr, len);
+ }
+
+ total += len;
+ if (total >= HEAP_MAX_SIZE)
+ return 1;
+
+ return 0;
+ }
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_INTERPRET))
+ heap_init (HEAP_MAX_ADDR - HEAP_MIN_SIZE, HEAP_MIN_SIZE, 1);
+ else
+ grub_machine_mmap_iterate (heap_init);
+}
+
+static grub_uint64_t ieee1275_get_time_ms (void);
+
+void
+grub_machine_init (void)
+{
+ char args[256];
+ grub_ssize_t actual;
+
+ grub_ieee1275_init ();
+
+ grub_console_init_early ();
+ grub_claim_heap ();
+ grub_console_init_lately ();
+ grub_ofdisk_init ();
+
+ /* Process commandline. */
+ if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootargs", &args,
+ sizeof args, &actual) == 0
+ && actual > 1)
+ {
+ int i = 0;
+
+ while (i < actual)
+ {
+ char *command = &args[i];
+ char *end;
+ char *val;
+
+ end = grub_strchr (command, ';');
+ if (end == 0)
+ i = actual; /* No more commands after this one. */
+ else
+ {
+ *end = '\0';
+ i += end - command + 1;
+ while (grub_isspace(args[i]))
+ i++;
+ }
+
+ /* Process command. */
+ val = grub_strchr (command, '=');
+ if (val)
+ {
+ *val = '\0';
+ grub_env_set (command, val + 1);
+ }
+ }
+ }
+
+ grub_install_get_time_ms (ieee1275_get_time_ms);
+}
+
+void
+grub_machine_fini (void)
+{
+ grub_ofdisk_fini ();
+ grub_console_fini ();
+}
+
+static grub_uint64_t
+ieee1275_get_time_ms (void)
+{
+ grub_uint32_t msecs = 0;
+
+ grub_ieee1275_milliseconds (&msecs);
+
+ return msecs;
+}
+
+grub_uint32_t
+grub_get_rtc (void)
+{
+ return ieee1275_get_time_ms ();
+}
+
+grub_addr_t
+grub_arch_modules_addr (void)
+{
+ return ALIGN_UP((grub_addr_t) _end + GRUB_KERNEL_MACHINE_MOD_GAP, GRUB_KERNEL_MACHINE_MOD_ALIGN);
+}
diff --git a/grub-core/kern/ieee1275/mmap.c b/grub-core/kern/ieee1275/mmap.c
new file mode 100644
index 0000000..2e4e085
--- /dev/null
+++ b/grub-core/kern/ieee1275/mmap.c
@@ -0,0 +1,80 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/memory.h>
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/types.h>
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ grub_ieee1275_phandle_t root;
+ grub_ieee1275_phandle_t memory;
+ grub_uint32_t available[32];
+ grub_ssize_t available_size;
+ grub_uint32_t address_cells = 1;
+ grub_uint32_t size_cells = 1;
+ int i;
+
+ /* Determine the format of each entry in `available'. */
+ grub_ieee1275_finddevice ("/", &root);
+ grub_ieee1275_get_integer_property (root, "#address-cells", &address_cells,
+ sizeof address_cells, 0);
+ grub_ieee1275_get_integer_property (root, "#size-cells", &size_cells,
+ sizeof size_cells, 0);
+
+ if (size_cells > address_cells)
+ address_cells = size_cells;
+
+ /* Load `/memory/available'. */
+ if (grub_ieee1275_finddevice ("/memory", &memory))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "couldn't find /memory node");
+ if (grub_ieee1275_get_integer_property (memory, "available", available,
+ sizeof available, &available_size))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "couldn't examine /memory/available property");
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS))
+ {
+ address_cells = 1;
+ size_cells = 1;
+ }
+
+ /* Decode each entry and call `hook'. */
+ i = 0;
+ available_size /= sizeof (grub_uint32_t);
+ while (i < available_size)
+ {
+ grub_uint64_t address;
+ grub_uint64_t size;
+
+ address = available[i++];
+ if (address_cells == 2)
+ address = (address << 32) | available[i++];
+
+ size = available[i++];
+ if (size_cells == 2)
+ size = (size << 32) | available[i++];
+
+ if (hook (address, size, GRUB_MEMORY_AVAILABLE))
+ break;
+ }
+
+ return grub_errno;
+}
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
new file mode 100644
index 0000000..f5dc8ef
--- /dev/null
+++ b/grub-core/kern/ieee1275/openfw.c
@@ -0,0 +1,469 @@
+/* openfw.c -- Open firmware support functions. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/ieee1275/ieee1275.h>
+
+enum grub_ieee1275_parse_type
+{
+ GRUB_PARSE_FILENAME,
+ GRUB_PARSE_PARTITION,
+};
+
+/* Walk children of 'devpath', calling hook for each. */
+int
+grub_children_iterate (char *devpath,
+ int (*hook) (struct grub_ieee1275_devalias *alias))
+{
+ grub_ieee1275_phandle_t dev;
+ grub_ieee1275_phandle_t child;
+ char *childtype, *childpath;
+ char *childname;
+ int ret = 0;
+
+ if (grub_ieee1275_finddevice (devpath, &dev))
+ return 0;
+
+ if (grub_ieee1275_child (dev, &child))
+ return 0;
+
+ childtype = grub_malloc (IEEE1275_MAX_PROP_LEN);
+ if (!childtype)
+ return 0;
+ childpath = grub_malloc (IEEE1275_MAX_PATH_LEN);
+ if (!childpath)
+ {
+ grub_free (childtype);
+ return 0;
+ }
+ childname = grub_malloc (IEEE1275_MAX_PROP_LEN);
+ if (!childname)
+ {
+ grub_free (childpath);
+ grub_free (childtype);
+ return 0;
+ }
+
+ do
+ {
+ struct grub_ieee1275_devalias alias;
+ grub_ssize_t actual;
+
+ if (grub_ieee1275_get_property (child, "device_type", childtype,
+ IEEE1275_MAX_PROP_LEN, &actual))
+ childtype[0] = 0;
+
+ if (dev == child)
+ continue;
+
+ if (grub_ieee1275_package_to_path (child, childpath,
+ IEEE1275_MAX_PATH_LEN, &actual))
+ continue;
+
+ if (grub_strcmp (devpath, childpath) == 0)
+ continue;
+
+ if (grub_ieee1275_get_property (child, "name", childname,
+ IEEE1275_MAX_PROP_LEN, &actual))
+ continue;
+
+ alias.type = childtype;
+ alias.path = childpath;
+ alias.name = childname;
+ ret = hook (&alias);
+ if (ret)
+ break;
+ }
+ while (grub_ieee1275_peer (child, &child) != -1);
+
+ grub_free (childname);
+ grub_free (childpath);
+ grub_free (childtype);
+
+ return ret;
+}
+
+int
+grub_ieee1275_devices_iterate (int (*hook) (struct grub_ieee1275_devalias *alias))
+{
+ auto int it_through (struct grub_ieee1275_devalias *alias);
+ int it_through (struct grub_ieee1275_devalias *alias)
+ {
+ if (hook (alias))
+ return 1;
+ return grub_children_iterate (alias->path, it_through);
+ }
+
+ return grub_children_iterate ("/", it_through);
+}
+
+/* Iterate through all device aliases. This function can be used to
+ find a device of a specific type. */
+int
+grub_devalias_iterate (int (*hook) (struct grub_ieee1275_devalias *alias))
+{
+ grub_ieee1275_phandle_t aliases;
+ char *aliasname, *devtype;
+ grub_ssize_t actual;
+ struct grub_ieee1275_devalias alias;
+ int ret = 0;
+
+ if (grub_ieee1275_finddevice ("/aliases", &aliases))
+ return 0;
+
+ aliasname = grub_malloc (IEEE1275_MAX_PROP_LEN);
+ if (!aliasname)
+ return 0;
+ devtype = grub_malloc (IEEE1275_MAX_PROP_LEN);
+ if (!devtype)
+ {
+ grub_free (aliasname);
+ return 0;
+ }
+
+ /* Find the first property. */
+ aliasname[0] = '\0';
+
+ while (grub_ieee1275_next_property (aliases, aliasname, aliasname) > 0)
+ {
+ grub_ieee1275_phandle_t dev;
+ grub_ssize_t pathlen;
+ char *devpath;
+
+ grub_dprintf ("devalias", "devalias name = %s\n", aliasname);
+
+ grub_ieee1275_get_property_length (aliases, aliasname, &pathlen);
+
+ /* The property `name' is a special case we should skip. */
+ if (!grub_strcmp (aliasname, "name"))
+ continue;
+
+ /* Sun's OpenBoot often doesn't zero terminate the device alias
+ strings, so we will add a NULL byte at the end explicitly. */
+ pathlen += 1;
+
+ devpath = grub_malloc (pathlen);
+ if (! devpath)
+ {
+ grub_free (devtype);
+ grub_free (aliasname);
+ return 0;
+ }
+
+ if (grub_ieee1275_get_property (aliases, aliasname, devpath, pathlen,
+ &actual))
+ {
+ grub_dprintf ("devalias", "get_property (%s) failed\n", aliasname);
+ goto nextprop;
+ }
+ devpath [actual] = '\0';
+
+ if (grub_ieee1275_finddevice (devpath, &dev))
+ {
+ grub_dprintf ("devalias", "finddevice (%s) failed\n", devpath);
+ goto nextprop;
+ }
+
+ if (grub_ieee1275_get_property (dev, "device_type", devtype,
+ IEEE1275_MAX_PROP_LEN, &actual))
+ {
+ /* NAND device don't have device_type property. */
+ devtype[0] = 0;
+ }
+
+ alias.name = aliasname;
+ alias.path = devpath;
+ alias.type = devtype;
+ ret = hook (&alias);
+
+nextprop:
+ grub_free (devpath);
+ if (ret)
+ break;
+ }
+
+ grub_free (devtype);
+ grub_free (aliasname);
+ return ret;
+}
+
+/* Call the "map" method of /chosen/mmu. */
+int
+grub_ieee1275_map (grub_addr_t phys, grub_addr_t virt, grub_size_t size,
+ grub_uint32_t mode)
+{
+ struct map_args {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t mode;
+ grub_ieee1275_cell_t size;
+ grub_ieee1275_cell_t virt;
+#ifdef GRUB_MACHINE_SPARC64
+ grub_ieee1275_cell_t phys_high;
+#endif
+ grub_ieee1275_cell_t phys_low;
+ grub_ieee1275_cell_t catch_result;
+ } args;
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method",
+#ifdef GRUB_MACHINE_SPARC64
+ 7,
+#else
+ 6,
+#endif
+ 1);
+ args.method = (grub_ieee1275_cell_t) "map";
+ args.ihandle = grub_ieee1275_mmu;
+#ifdef GRUB_MACHINE_SPARC64
+ args.phys_high = 0;
+#endif
+ args.phys_low = phys;
+ args.virt = virt;
+ args.size = size;
+ args.mode = mode; /* Format is WIMG0PP. */
+ args.catch_result = (grub_ieee1275_cell_t) -1;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+
+ return args.catch_result;
+}
+
+int
+grub_claimmap (grub_addr_t addr, grub_size_t size)
+{
+ if (grub_ieee1275_claim (addr, size, 0, 0))
+ return -1;
+
+ if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_REAL_MODE)
+ && grub_ieee1275_map (addr, addr, size, 0x00))
+ {
+ grub_printf ("map failed: address 0x%llx, size 0x%llx\n",
+ (long long) addr, (long long) size);
+ grub_ieee1275_release (addr, size);
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Get the device arguments of the Open Firmware node name `path'. */
+static char *
+grub_ieee1275_get_devargs (const char *path)
+{
+ char *colon = grub_strchr (path, ':');
+
+ if (! colon)
+ return 0;
+
+ return grub_strdup (colon + 1);
+}
+
+/* Get the device path of the Open Firmware node name `path'. */
+static char *
+grub_ieee1275_get_devname (const char *path)
+{
+ char *colon = grub_strchr (path, ':');
+ char *newpath = 0;
+ int pathlen = grub_strlen (path);
+ auto int match_alias (struct grub_ieee1275_devalias *alias);
+
+ int match_alias (struct grub_ieee1275_devalias *curalias)
+ {
+ /* briQ firmware can change capitalization in /chosen/bootpath. */
+ if (! grub_strncasecmp (curalias->path, path, pathlen))
+ {
+ newpath = grub_strdup (curalias->name);
+ return 1;
+ }
+
+ return 0;
+ }
+
+ if (colon)
+ pathlen = (int)(colon - path);
+
+ /* Try to find an alias for this device. */
+ grub_devalias_iterate (match_alias);
+
+ if (! newpath)
+ newpath = grub_strndup (path, pathlen);
+
+ return newpath;
+}
+
+static char *
+grub_ieee1275_parse_args (const char *path, enum grub_ieee1275_parse_type ptype)
+{
+ char type[64]; /* XXX check size. */
+ char *device = grub_ieee1275_get_devname (path);
+ char *args = grub_ieee1275_get_devargs (path);
+ char *ret = 0;
+ grub_ieee1275_phandle_t dev;
+
+ if (!args)
+ /* Shouldn't happen. */
+ return 0;
+
+ /* We need to know what type of device it is in order to parse the full
+ file path properly. */
+ if (grub_ieee1275_finddevice (device, &dev))
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE, "device %s not found", device);
+ goto fail;
+ }
+ if (grub_ieee1275_get_property (dev, "device_type", &type, sizeof type, 0))
+ {
+ grub_error (GRUB_ERR_UNKNOWN_DEVICE,
+ "device %s lacks a device_type property", device);
+ goto fail;
+ }
+
+ if (!grub_strcmp ("block", type))
+ {
+ /* The syntax of the device arguments is defined in the CHRP and PReP
+ IEEE1275 bindings: "[partition][,[filename]]". */
+ char *comma = grub_strchr (args, ',');
+
+ if (ptype == GRUB_PARSE_FILENAME)
+ {
+ if (comma)
+ {
+ char *filepath = comma + 1;
+
+ /* Make sure filepath has leading backslash. */
+ if (filepath[0] != '\\')
+ ret = grub_xasprintf ("\\%s", filepath);
+ else
+ ret = grub_strdup (filepath);
+ }
+ }
+ else if (ptype == GRUB_PARSE_PARTITION)
+ {
+ if (!comma)
+ ret = grub_strdup (args);
+ else
+ ret = grub_strndup (args, (grub_size_t)(comma - args));
+ }
+ }
+ else
+ {
+ /* XXX Handle net devices by configuring & registering a grub_net_dev
+ here, then return its name?
+ Example path: "net:<server ip>,<file name>,<client ip>,<gateway
+ ip>,<bootp retries>,<tftp retries>". */
+ grub_printf ("Unsupported type %s for device %s\n", type, device);
+ }
+
+fail:
+ grub_free (device);
+ grub_free (args);
+ return ret;
+}
+
+char *
+grub_ieee1275_get_filename (const char *path)
+{
+ return grub_ieee1275_parse_args (path, GRUB_PARSE_FILENAME);
+}
+
+/* Convert a device name from IEEE1275 syntax to GRUB syntax. */
+char *
+grub_ieee1275_encode_devname (const char *path)
+{
+ char *device = grub_ieee1275_get_devname (path);
+ char *partition = grub_ieee1275_parse_args (path, GRUB_PARSE_PARTITION);
+ char *encoding;
+
+ if (partition && partition[0])
+ {
+ unsigned int partno = grub_strtoul (partition, 0, 0);
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS))
+ /* GRUB partition 1 is OF partition 0. */
+ partno++;
+
+ encoding = grub_xasprintf ("(%s,%d)", device, partno);
+ }
+ else
+ encoding = grub_xasprintf ("(%s)", device);
+
+ grub_free (partition);
+ grub_free (device);
+
+ return encoding;
+}
+
+/* On i386, a firmware-independant grub_reboot() is provided by realmode.S. */
+#ifndef __i386__
+void
+grub_reboot (void)
+{
+ grub_ieee1275_interpret ("reset-all", 0);
+ for (;;) ;
+}
+#endif
+
+/* Resolve aliases. */
+char *
+grub_ieee1275_canonicalise_devname (const char *path)
+{
+ struct canon_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t path;
+ grub_ieee1275_cell_t buf;
+ grub_ieee1275_cell_t inlen;
+ grub_ieee1275_cell_t outlen;
+ }
+ args;
+ char *buf = NULL;
+ grub_size_t bufsize = 64;
+ int i;
+
+ for (i = 0; i < 2; i++)
+ {
+ grub_free (buf);
+
+ buf = grub_malloc (bufsize);
+ if (!buf)
+ return NULL;
+
+ INIT_IEEE1275_COMMON (&args.common, "canon", 3, 1);
+ args.path = (grub_ieee1275_cell_t) path;
+ args.buf = (grub_ieee1275_cell_t) buf;
+ args.inlen = (grub_ieee1275_cell_t) (bufsize - 1);
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return 0;
+ if (args.outlen > bufsize - 1)
+ {
+ bufsize = args.outlen + 2;
+ continue;
+ }
+ return buf;
+ }
+ /* Shouldn't reach here. */
+ grub_free (buf);
+ return NULL;
+}
diff --git a/grub-core/kern/list.c b/grub-core/kern/list.c
new file mode 100644
index 0000000..33c3341
--- /dev/null
+++ b/grub-core/kern/list.c
@@ -0,0 +1,87 @@
+/* list.c - grub list function */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/list.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+
+void
+grub_list_push (grub_list_t *head, grub_list_t item)
+{
+ item->next = *head;
+ *head = item;
+}
+
+void
+grub_list_remove (grub_list_t *head, grub_list_t item)
+{
+ grub_list_t *p, q;
+
+ for (p = head, q = *p; q; p = &(q->next), q = q->next)
+ if (q == item)
+ {
+ *p = q->next;
+ break;
+ }
+}
+
+void *
+grub_named_list_find (grub_named_list_t head, const char *name)
+{
+ grub_named_list_t item;
+
+ FOR_LIST_ELEMENTS (item, head)
+ if (grub_strcmp (item->name, name) == 0)
+ return item;
+
+ return NULL;
+}
+
+void
+grub_prio_list_insert (grub_prio_list_t *head, grub_prio_list_t nitem)
+{
+ int inactive = 0;
+
+ grub_prio_list_t *p, q;
+
+ for (p = head, q = *p; q; p = &(q->next), q = q->next)
+ {
+ int r;
+
+ r = grub_strcmp (nitem->name, q->name);
+ if (r < 0)
+ break;
+ if (r > 0)
+ continue;
+
+ if (nitem->prio >= (q->prio & GRUB_PRIO_LIST_PRIO_MASK))
+ {
+ q->prio &= ~GRUB_PRIO_LIST_FLAG_ACTIVE;
+ break;
+ }
+
+ inactive = 1;
+ }
+
+ *p = nitem;
+ nitem->next = q;
+
+ if (! inactive)
+ nitem->prio |= GRUB_PRIO_LIST_FLAG_ACTIVE;
+}
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
new file mode 100644
index 0000000..da71232
--- /dev/null
+++ b/grub-core/kern/main.c
@@ -0,0 +1,200 @@
+/* main.c - the kernel main routine */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2006,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/misc.h>
+#include <grub/symbol.h>
+#include <grub/dl.h>
+#include <grub/term.h>
+#include <grub/file.h>
+#include <grub/device.h>
+#include <grub/env.h>
+#include <grub/mm.h>
+#include <grub/command.h>
+#include <grub/reader.h>
+#include <grub/parser.h>
+
+void
+grub_module_iterate (int (*hook) (struct grub_module_header *header))
+{
+ struct grub_module_info *modinfo;
+ struct grub_module_header *header;
+ grub_addr_t modbase;
+
+ modbase = grub_arch_modules_addr ();
+ modinfo = (struct grub_module_info *) modbase;
+
+ /* Check if there are any modules. */
+ if ((modinfo == 0) || modinfo->magic != GRUB_MODULE_MAGIC)
+ return;
+
+ for (header = (struct grub_module_header *) (modbase + modinfo->offset);
+ header < (struct grub_module_header *) (modbase + modinfo->size);
+ header = (struct grub_module_header *) ((char *) header + header->size))
+ {
+ if (hook (header))
+ break;
+ }
+}
+
+/* This is actualy platform-independant but used only on yeeloong and sparc. */
+#if defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_SPARC64)
+grub_addr_t
+grub_modules_get_end (void)
+{
+ struct grub_module_info *modinfo;
+ grub_addr_t modbase;
+
+ modbase = grub_arch_modules_addr ();
+ modinfo = (struct grub_module_info *) modbase;
+
+ /* Check if there are any modules. */
+ if ((modinfo == 0) || modinfo->magic != GRUB_MODULE_MAGIC)
+ return modbase;
+
+ return modbase + modinfo->size;
+}
+#endif
+
+/* Load all modules in core. */
+static void
+grub_load_modules (void)
+{
+ auto int hook (struct grub_module_header *);
+ int hook (struct grub_module_header *header)
+ {
+ /* Not an ELF module, skip. */
+ if (header->type != OBJ_TYPE_ELF)
+ return 0;
+
+ if (! grub_dl_load_core ((char *) header + sizeof (struct grub_module_header),
+ (header->size - sizeof (struct grub_module_header))))
+ grub_fatal ("%s", grub_errmsg);
+
+ if (grub_errno)
+ grub_print_error ();
+
+ return 0;
+ }
+
+ grub_module_iterate (hook);
+}
+
+static void
+grub_load_config (void)
+{
+ auto int hook (struct grub_module_header *);
+ int hook (struct grub_module_header *header)
+ {
+ /* Not an embedded config, skip. */
+ if (header->type != OBJ_TYPE_CONFIG)
+ return 0;
+
+ grub_parser_execute ((char *) header +
+ sizeof (struct grub_module_header));
+ return 1;
+ }
+
+ grub_module_iterate (hook);
+}
+
+/* Write hook for the environment variables of root. Remove surrounding
+ parentheses, if any. */
+static char *
+grub_env_write_root (struct grub_env_var *var __attribute__ ((unused)),
+ const char *val)
+{
+ /* XXX Is it better to check the existence of the device? */
+ grub_size_t len = grub_strlen (val);
+
+ if (val[0] == '(' && val[len - 1] == ')')
+ return grub_strndup (val + 1, len - 2);
+
+ return grub_strdup (val);
+}
+
+/* Set the root device according to the dl prefix. */
+static void
+grub_set_root_dev (void)
+{
+ const char *prefix;
+
+ grub_register_variable_hook ("root", 0, grub_env_write_root);
+
+ prefix = grub_env_get ("prefix");
+
+ if (prefix)
+ {
+ char *dev;
+
+ dev = grub_file_get_device_name (prefix);
+ if (dev)
+ {
+ grub_env_set ("root", dev);
+ grub_free (dev);
+ }
+ }
+}
+
+/* Load the normal mode module and execute the normal mode if possible. */
+static void
+grub_load_normal_mode (void)
+{
+ /* Load the module. */
+ grub_dl_load ("normal");
+
+ /* Something went wrong. Print errors here to let user know why we're entering rescue mode. */
+ grub_print_error ();
+ grub_errno = 0;
+
+ grub_command_execute ("normal", 0, 0);
+}
+
+/* The main routine. */
+void
+grub_main (void)
+{
+ /* First of all, initialize the machine. */
+ grub_machine_init ();
+
+ /* Hello. */
+ grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
+ grub_printf ("Welcome to GRUB!\n\n");
+ grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
+
+ /* Load pre-loaded modules and free the space. */
+ grub_register_exported_symbols ();
+#ifdef GRUB_LINKER_HAVE_INIT
+ grub_arch_dl_init_linker ();
+#endif
+ grub_load_modules ();
+
+ /* It is better to set the root device as soon as possible,
+ for convenience. */
+ grub_machine_set_prefix ();
+ grub_set_root_dev ();
+ grub_env_export ("root");
+ grub_env_export ("prefix");
+
+ grub_register_core_commands ();
+
+ grub_load_config ();
+ grub_load_normal_mode ();
+ grub_rescue_run ();
+}
diff --git a/grub-core/kern/mips/cache.S b/grub-core/kern/mips/cache.S
new file mode 100644
index 0000000..a4aa06f
--- /dev/null
+++ b/grub-core/kern/mips/cache.S
@@ -0,0 +1,45 @@
+
+#include <grub/symbol.h>
+
+ .set noreorder
+ .set nomacro
+
+FUNCTION (grub_cpu_flush_cache)
+FUNCTION (grub_arch_sync_caches)
+#include "cache_flush.S"
+ j $ra
+
+FUNCTION (grub_arch_sync_dma_caches)
+ move $t2, $a0
+ addu $t3, $a0, $a1
+ srl $t2, $t2, 5
+ sll $t2, $t2, 5
+ addu $t3, $t3, 0x1f
+ srl $t3, $t3, 5
+ sll $t3, $t3, 5
+ move $t0, $t2
+ subu $t1, $t3, $t2
+1:
+ cache 1, 0($t0)
+ addiu $t1, $t1, 0xffff
+ bne $t1, $zero, 1b
+ addiu $t0, $t0, 0x1
+ sync
+ move $t0, $t2
+ subu $t1, $t3, $t2
+2:
+ cache 0, 0($t0)
+ addiu $t1, $t1, 0xffff
+ bne $t1, $zero, 2b
+ addiu $t0, $t0, 0x1
+ sync
+ move $t0, $t2
+ subu $t1, $t3, $t2
+2:
+ cache 23, 0($t0)
+ addiu $t1, $t1, 0xffff
+ bne $t1, $zero, 2b
+ addiu $t0, $t0, 0x1
+ sync
+
+ jr $ra \ No newline at end of file
diff --git a/grub-core/kern/mips/cache_flush.S b/grub-core/kern/mips/cache_flush.S
new file mode 100644
index 0000000..11096c0
--- /dev/null
+++ b/grub-core/kern/mips/cache_flush.S
@@ -0,0 +1,23 @@
+ move $t2, $a0
+ addu $t3, $a0, $a1
+ srl $t2, $t2, 5
+ sll $t2, $t2, 5
+ addu $t3, $t3, 0x1f
+ srl $t3, $t3, 5
+ sll $t3, $t3, 5
+ move $t0, $t2
+ subu $t1, $t3, $t2
+1:
+ cache 1, 0($t0)
+ addiu $t1, $t1, 0xffff
+ bne $t1, $zero, 1b
+ addiu $t0, $t0, 0x1
+ sync
+ move $t0, $t2
+ subu $t1, $t3, $t2
+2:
+ cache 0, 0($t0)
+ addiu $t1, $t1, 0xffff
+ bne $t1, $zero, 2b
+ addiu $t0, $t0, 0x1
+ sync
diff --git a/grub-core/kern/mips/dl.c b/grub-core/kern/mips/dl.c
new file mode 100644
index 0000000..e17e9f3
--- /dev/null
+++ b/grub-core/kern/mips/dl.c
@@ -0,0 +1,239 @@
+/* dl-386.c - arch-dependent part of loadable module support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/elf.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/cpu/types.h>
+#include <grub/mm.h>
+
+/* Dummy __gnu_local_gp. Resolved by linker. */
+static char __gnu_local_gp_dummy;
+
+/* Check if EHDR is a valid ELF header. */
+grub_err_t
+grub_arch_dl_check_header (void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+
+ /* Check the magic numbers. */
+#ifdef WORDS_BIGENDIAN
+ if (e->e_ident[EI_CLASS] != ELFCLASS32
+ || e->e_ident[EI_DATA] != ELFDATA2MSB
+ || e->e_machine != EM_MIPS)
+#else
+ if (e->e_ident[EI_CLASS] != ELFCLASS32
+ || e->e_ident[EI_DATA] != ELFDATA2LSB
+ || e->e_machine != EM_MIPS)
+#endif
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch specific ELF magic");
+
+ return GRUB_ERR_NONE;
+}
+
+/* Relocate symbols. */
+grub_err_t
+grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+ Elf_Shdr *s;
+ Elf_Word entsize;
+ unsigned i;
+ grub_size_t gp_size = 0;
+ /* FIXME: suboptimal. */
+ grub_uint32_t *gp, *gpptr;
+ grub_uint32_t gp0;
+
+ /* Find a symbol table. */
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no symtab found");
+
+ entsize = s->sh_entsize;
+
+ /* Find reginfo. */
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_MIPS_REGINFO)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no reginfo found");
+
+ gp0 = ((grub_uint32_t *)((char *) e + s->sh_offset))[5];
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_REL)
+ {
+ grub_dl_segment_t seg;
+
+ /* Find the target segment. */
+ for (seg = mod->segment; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf_Rel *rel, *max;
+
+ for (rel = (Elf_Rel *) ((char *) e + s->sh_offset),
+ max = rel + s->sh_size / s->sh_entsize;
+ rel < max;
+ rel++)
+ switch (ELF_R_TYPE (rel->r_info))
+ {
+ case R_MIPS_GOT16:
+ case R_MIPS_CALL16:
+ case R_MIPS_GPREL32:
+ gp_size += 4;
+ break;
+ }
+ }
+ }
+
+ if (gp_size > 0x08000)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "__gnu_local_gp is too big\n");
+
+ gpptr = gp = grub_malloc (gp_size);
+ if (!gp)
+ return grub_errno;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_REL)
+ {
+ grub_dl_segment_t seg;
+
+ /* Find the target segment. */
+ for (seg = mod->segment; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf_Rel *rel, *max;
+
+ for (rel = (Elf_Rel *) ((char *) e + s->sh_offset),
+ max = rel + s->sh_size / s->sh_entsize;
+ rel < max;
+ rel++)
+ {
+ Elf_Word *addr;
+ Elf_Sym *sym;
+
+ if (seg->size < rel->r_offset)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "reloc offset is out of the segment");
+
+ addr = (Elf_Word *) ((char *) seg->addr + rel->r_offset);
+ sym = (Elf_Sym *) ((char *) mod->symtab
+ + entsize * ELF_R_SYM (rel->r_info));
+ if (sym->st_value == (grub_addr_t) &__gnu_local_gp_dummy)
+ sym->st_value = (grub_addr_t) gp;
+
+ switch (ELF_R_TYPE (rel->r_info))
+ {
+ case R_MIPS_HI16:
+ {
+ grub_uint32_t value;
+ Elf_Rel *rel2;
+
+ /* Handle partner lo16 relocation. Lower part is
+ treated as signed. Hence add 0x8000 to compensate.
+ */
+ value = (*(grub_uint16_t *) addr << 16)
+ + sym->st_value + 0x8000;
+ for (rel2 = rel + 1; rel2 < max; rel2++)
+ if (ELF_R_SYM (rel2->r_info)
+ == ELF_R_SYM (rel->r_info)
+ && ELF_R_TYPE (rel2->r_info) == R_MIPS_LO16)
+ {
+ value += *(grub_int16_t *)
+ ((char *) seg->addr + rel2->r_offset);
+ break;
+ }
+ *(grub_uint16_t *) addr = (value >> 16) & 0xffff;
+ }
+ break;
+ case R_MIPS_LO16:
+ *(grub_uint16_t *) addr += (sym->st_value) & 0xffff;
+ break;
+ case R_MIPS_32:
+ *(grub_uint32_t *) addr += sym->st_value;
+ break;
+ case R_MIPS_GPREL32:
+ *(grub_uint32_t *) addr = sym->st_value
+ + *(grub_uint32_t *) addr + gp0 - (grub_uint32_t)gp;
+ break;
+
+ case R_MIPS_26:
+ {
+ grub_uint32_t value;
+ grub_uint32_t raw;
+ raw = (*(grub_uint32_t *) addr) & 0x3ffffff;
+ value = raw << 2;
+ value += sym->st_value;
+ raw = (value >> 2) & 0x3ffffff;
+
+ *(grub_uint32_t *) addr =
+ raw | ((*(grub_uint32_t *) addr) & 0xfc000000);
+ }
+ break;
+ case R_MIPS_GOT16:
+ case R_MIPS_CALL16:
+ /* FIXME: reuse*/
+ *gpptr = sym->st_value + *(grub_uint16_t *) addr;
+ *(grub_uint16_t *) addr
+ = sizeof (grub_uint32_t) * (gpptr - gp);
+ gpptr++;
+ break;
+ case R_MIPS_JALR:
+ break;
+ default:
+ {
+ grub_free (gp);
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "Unknown relocation type %d\n",
+ ELF_R_TYPE (rel->r_info));
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_arch_dl_init_linker (void)
+{
+ grub_dl_register_symbol ("__gnu_local_gp", &__gnu_local_gp_dummy, 0);
+}
+
diff --git a/grub-core/kern/mips/init.c b/grub-core/kern/mips/init.c
new file mode 100644
index 0000000..f220108
--- /dev/null
+++ b/grub-core/kern/mips/init.c
@@ -0,0 +1,34 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/env.h>
+
+void
+grub_machine_set_prefix (void)
+{
+ grub_env_set ("prefix", grub_prefix);
+}
+
+extern char _end[];
+
+grub_addr_t
+grub_arch_modules_addr (void)
+{
+ return (grub_addr_t) _end;
+}
diff --git a/grub-core/kern/mips/qemu-mips/init.c b/grub-core/kern/mips/qemu-mips/init.c
new file mode 100644
index 0000000..f2bb652
--- /dev/null
+++ b/grub-core/kern/mips/qemu-mips/init.c
@@ -0,0 +1,58 @@
+#include <grub/kernel.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/time.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/time.h>
+#include <grub/machine/kernel.h>
+#include <grub/machine/memory.h>
+#include <grub/cpu/kernel.h>
+
+#define RAMSIZE (*(grub_uint32_t *) ((16 << 20) - 264))
+
+grub_uint32_t
+grub_get_rtc (void)
+{
+ static int calln = 0;
+ return calln++;
+}
+
+void
+grub_machine_init (void)
+{
+ grub_mm_init_region ((void *) GRUB_MACHINE_MEMORY_USABLE,
+ RAMSIZE - (GRUB_MACHINE_MEMORY_USABLE & 0x7fffffff));
+ grub_install_get_time_ms (grub_rtc_get_time_ms);
+}
+
+void
+grub_machine_fini (void)
+{
+}
+
+void
+grub_exit (void)
+{
+ while (1);
+}
+
+void
+grub_halt (void)
+{
+ while (1);
+}
+
+void
+grub_reboot (void)
+{
+ while (1);
+}
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ hook (0, RAMSIZE, GRUB_MEMORY_AVAILABLE);
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/kern/mips/startup.S b/grub-core/kern/mips/startup.S
new file mode 100644
index 0000000..ae0e0b1
--- /dev/null
+++ b/grub-core/kern/mips/startup.S
@@ -0,0 +1,126 @@
+/* startup.S - Startup code for the MIPS. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/offsets.h>
+#include <grub/machine/memory.h>
+#include <grub/offsets.h>
+
+#define BASE_ADDR 8
+
+ .globl __start, _start, start
+ .set noreorder
+ .set nomacro
+__start:
+_start:
+start:
+.extern __bss_start
+.extern _end
+ bal cont
+ nop
+
+ . = _start + GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE
+total_module_size:
+ .long 0
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX
+
+VARIABLE(grub_prefix)
+
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX_END
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+VARIABLE (grub_arch_busclock)
+ .long 0
+VARIABLE (grub_arch_cpuclock)
+ .long 0
+VARIABLE (grub_arch_memsize)
+ .long 0
+VARIABLE (grub_arch_highmemsize)
+ .long 0
+#endif
+cont:
+ /* Save our base. */
+ move $s0, $ra
+
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+ lui $t1, %hi(grub_arch_busclock)
+ addiu $t1, %lo(grub_arch_busclock)
+ sw $s2, 0($t1)
+ sw $s3, 4($t1)
+ sw $s4, 8($t1)
+ sw $s5, 12($t1)
+#endif
+
+ /* Move the modules out of BSS. */
+ lui $t2, %hi(__bss_start)
+ addiu $t2, %lo(__bss_start)
+
+ lui $t1, %hi(_end)
+ addiu $t1, %lo(_end)
+ addiu $t1, (GRUB_KERNEL_MACHINE_MOD_ALIGN - 1)
+ li $t3, (GRUB_KERNEL_MACHINE_MOD_ALIGN - 1)
+ nor $t3, $t3, $0
+ and $t1, $t1, $t3
+
+ lw $t3, (GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE - BASE_ADDR)($s0)
+
+ /* Backward copy. */
+ add $t1, $t1, $t3
+ add $t2, $t2, $t3
+ addiu $t1, $t1, -1
+ addiu $t2, $t2, -1
+
+ /* $t2 is source. $t1 is destination. $t3 is size. */
+modulesmovcont:
+ beq $t3, $0, modulesmovdone
+ nop
+ lb $t4, 0($t2)
+ sb $t4, 0($t1)
+ addiu $t2, $t2, -1
+ addiu $t1, $t1, -1
+ b modulesmovcont
+ addiu $t3, $t3, -1
+modulesmovdone:
+
+ /* Clean BSS. */
+
+ lui $t1, %hi(__bss_start)
+ addiu $t1, $t1, %lo(__bss_start)
+ lui $t2, %hi(_end)
+ addiu $t2, $t2, %lo(_end)
+bsscont:
+ sb $0,0($t1)
+ addiu $t1, $t1, 1
+ sltu $t3, $t1, $t2
+ bne $t3, $0, bsscont
+ nop
+
+ lui $t1, %hi(grub_main)
+ addiu $t1, %lo(grub_main)
+
+ lui $sp, %hi(GRUB_MACHINE_MEMORY_STACK_HIGH)
+ jr $t1
+ addiu $sp, $sp, %lo(GRUB_MACHINE_MEMORY_STACK_HIGH)
+
diff --git a/grub-core/kern/mips/yeeloong/init.c b/grub-core/kern/mips/yeeloong/init.c
new file mode 100644
index 0000000..7a48d69
--- /dev/null
+++ b/grub-core/kern/mips/yeeloong/init.c
@@ -0,0 +1,253 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/time.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/time.h>
+#include <grub/machine/kernel.h>
+#include <grub/machine/memory.h>
+#include <grub/memory.h>
+#include <grub/mips/loongson.h>
+#include <grub/cs5536.h>
+#include <grub/term.h>
+#include <grub/machine/ec.h>
+
+extern void grub_video_sm712_init (void);
+extern void grub_video_init (void);
+extern void grub_bitmap_init (void);
+extern void grub_font_init (void);
+extern void grub_gfxterm_init (void);
+extern void grub_at_keyboard_init (void);
+extern void grub_serial_init (void);
+extern void grub_terminfo_init (void);
+extern void grub_keylayouts_init (void);
+extern void grub_boot_init (void);
+
+/* FIXME: use interrupt to count high. */
+grub_uint64_t
+grub_get_rtc (void)
+{
+ static grub_uint32_t high = 0;
+ static grub_uint32_t last = 0;
+ grub_uint32_t low;
+
+ asm volatile ("mfc0 %0, " GRUB_CPU_LOONGSON_COP0_TIMER_COUNT : "=r" (low));
+ if (low < last)
+ high++;
+ last = low;
+
+ return (((grub_uint64_t) high) << 32) | low;
+}
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ hook (GRUB_ARCH_LOWMEMPSTART, grub_arch_memsize << 20,
+ GRUB_MEMORY_AVAILABLE);
+ hook (GRUB_ARCH_HIGHMEMPSTART, grub_arch_highmemsize << 20,
+ GRUB_MEMORY_AVAILABLE);
+ return GRUB_ERR_NONE;
+}
+
+static void
+init_pci (void)
+{
+ auto int NESTED_FUNC_ATTR set_card (grub_pci_device_t dev, grub_pci_id_t pciid);
+ int NESTED_FUNC_ATTR set_card (grub_pci_device_t dev, grub_pci_id_t pciid)
+ {
+ grub_pci_address_t addr;
+ /* FIXME: autoscan for BARs and devices. */
+ switch (pciid)
+ {
+ case GRUB_YEELOONG_OHCI_PCIID:
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
+ grub_pci_write (addr, 0x5025000);
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
+ grub_pci_write_word (addr, GRUB_PCI_COMMAND_SERR_ENABLE
+ | GRUB_PCI_COMMAND_PARITY_ERROR
+ | GRUB_PCI_COMMAND_BUS_MASTER
+ | GRUB_PCI_COMMAND_MEM_ENABLED);
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_STATUS);
+ grub_pci_write_word (addr, 0x0200 | GRUB_PCI_STATUS_CAPABILITIES);
+ break;
+ case GRUB_YEELOONG_EHCI_PCIID:
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
+ grub_pci_write (addr, 0x5026000);
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
+ grub_pci_write_word (addr, GRUB_PCI_COMMAND_SERR_ENABLE
+ | GRUB_PCI_COMMAND_PARITY_ERROR
+ | GRUB_PCI_COMMAND_BUS_MASTER
+ | GRUB_PCI_COMMAND_MEM_ENABLED);
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_STATUS);
+ grub_pci_write_word (addr, (1 << GRUB_PCI_STATUS_DEVSEL_TIMING_SHIFT)
+ | GRUB_PCI_STATUS_CAPABILITIES);
+ break;
+ }
+ return 0;
+ }
+
+ *((volatile grub_uint32_t *) GRUB_CPU_LOONGSON_PCI_HIT1_SEL_LO) = 0x8000000c;
+ *((volatile grub_uint32_t *) GRUB_CPU_LOONGSON_PCI_HIT1_SEL_HI) = 0xffffffff;
+
+ /* Setup PCI controller. */
+ *((volatile grub_uint16_t *) (GRUB_MACHINE_PCI_CONTROLLER_HEADER
+ + GRUB_PCI_REG_COMMAND))
+ = GRUB_PCI_COMMAND_PARITY_ERROR | GRUB_PCI_COMMAND_BUS_MASTER
+ | GRUB_PCI_COMMAND_MEM_ENABLED;
+ *((volatile grub_uint16_t *) (GRUB_MACHINE_PCI_CONTROLLER_HEADER
+ + GRUB_PCI_REG_STATUS))
+ = (1 << GRUB_PCI_STATUS_DEVSEL_TIMING_SHIFT)
+ | GRUB_PCI_STATUS_FAST_B2B_CAPABLE | GRUB_PCI_STATUS_66MHZ_CAPABLE
+ | GRUB_PCI_STATUS_CAPABILITIES;
+
+ *((volatile grub_uint32_t *) (GRUB_MACHINE_PCI_CONTROLLER_HEADER
+ + GRUB_PCI_REG_CACHELINE)) = 0xff;
+ *((volatile grub_uint32_t *) (GRUB_MACHINE_PCI_CONTROLLER_HEADER
+ + GRUB_PCI_REG_ADDRESS_REG0))
+ = 0x80000000 | GRUB_PCI_ADDR_MEM_TYPE_64 | GRUB_PCI_ADDR_MEM_PREFETCH;
+ *((volatile grub_uint32_t *) (GRUB_MACHINE_PCI_CONTROLLER_HEADER
+ + GRUB_PCI_REG_ADDRESS_REG1)) = 0;
+
+ grub_pci_iterate (set_card);
+}
+
+void
+grub_machine_init (void)
+{
+ grub_addr_t modend;
+
+ /* FIXME: measure this. */
+ if (grub_arch_busclock == 0)
+ {
+ grub_arch_busclock = 66000000;
+ grub_arch_cpuclock = 797000000;
+ }
+
+ grub_install_get_time_ms (grub_rtc_get_time_ms);
+
+ if (grub_arch_memsize == 0)
+ {
+ grub_port_t smbbase;
+ grub_err_t err;
+ grub_pci_device_t dev;
+ struct grub_smbus_spd spd;
+ unsigned totalmem;
+ int i;
+
+ if (!grub_cs5536_find (&dev))
+ grub_fatal ("No CS5536 found\n");
+
+ err = grub_cs5536_init_smbus (dev, 0x7ff, &smbbase);
+ if (err)
+ grub_fatal ("Couldn't init SMBus: %s\n", grub_errmsg);
+
+ /* Yeeloong has only one memory slot. */
+ err = grub_cs5536_read_spd (smbbase, GRUB_SMB_RAM_START_ADDR, &spd);
+ if (err)
+ grub_fatal ("Couldn't read SPD: %s\n", grub_errmsg);
+ for (i = 5; i < 13; i++)
+ if (spd.ddr2.rank_capacity & (1 << (i & 7)))
+ break;
+ /* Something is wrong. */
+ if (i == 13)
+ totalmem = 256;
+ else
+ totalmem = ((spd.ddr2.num_of_ranks
+ & GRUB_SMBUS_SPD_MEMORY_NUM_OF_RANKS_MASK) + 1) << (i + 2);
+
+ if (totalmem >= 256)
+ {
+ grub_arch_memsize = 256;
+ grub_arch_highmemsize = totalmem - 256;
+ }
+ else
+ {
+ grub_arch_memsize = (totalmem >> 20);
+ grub_arch_highmemsize = 0;
+ }
+
+ grub_cs5536_init_geode (dev);
+
+ init_pci ();
+ }
+
+ modend = grub_modules_get_end ();
+ grub_mm_init_region ((void *) modend, (grub_arch_memsize << 20)
+ - (modend - GRUB_ARCH_LOWMEMVSTART));
+ /* FIXME: use upper memory as well. */
+
+ /* Initialize output terminal (can't be done earlier, as gfxterm
+ relies on a working heap. */
+ grub_video_init ();
+ grub_video_sm712_init ();
+ grub_bitmap_init ();
+ grub_font_init ();
+ grub_gfxterm_init ();
+
+ grub_keylayouts_init ();
+ grub_at_keyboard_init ();
+
+ grub_terminfo_init ();
+ grub_serial_init ();
+
+ grub_boot_init ();
+}
+
+void
+grub_machine_fini (void)
+{
+}
+
+void
+grub_halt (void)
+{
+ grub_outb (grub_inb (GRUB_CPU_LOONGSON_GPIOCFG)
+ & ~GRUB_CPU_LOONGSON_SHUTDOWN_GPIO, GRUB_CPU_LOONGSON_GPIOCFG);
+
+ grub_millisleep (1500);
+
+ grub_printf ("Shutdown failed\n");
+ grub_refresh ();
+ while (1);
+}
+
+void
+grub_exit (void)
+{
+ grub_halt ();
+}
+
+void
+grub_reboot (void)
+{
+ grub_write_ec (GRUB_MACHINE_EC_COMMAND_REBOOT);
+
+ grub_millisleep (1500);
+
+ grub_printf ("Reboot failed\n");
+ grub_refresh ();
+ while (1);
+}
+
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
new file mode 100644
index 0000000..1b4cdec
--- /dev/null
+++ b/grub-core/kern/misc.c
@@ -0,0 +1,1019 @@
+/* misc.c - definitions of misc functions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <stdarg.h>
+#include <grub/term.h>
+#include <grub/env.h>
+#include <grub/i18n.h>
+
+static int
+grub_vsnprintf_real (char *str, grub_size_t n, const char *fmt, va_list args);
+
+static int
+grub_iswordseparator (int c)
+{
+ return (grub_isspace (c) || c == ',' || c == ';' || c == '|' || c == '&');
+}
+
+/* grub_gettext_dummy is not translating anything. */
+static const char *
+grub_gettext_dummy (const char *s)
+{
+ return s;
+}
+
+const char* (*grub_gettext) (const char *s) = grub_gettext_dummy;
+
+void *
+grub_memmove (void *dest, const void *src, grub_size_t n)
+{
+ char *d = (char *) dest;
+ const char *s = (const char *) src;
+
+ if (d < s)
+ while (n--)
+ *d++ = *s++;
+ else
+ {
+ d += n;
+ s += n;
+
+ while (n--)
+ *--d = *--s;
+ }
+
+ return dest;
+}
+
+#ifndef APPLE_CC
+void *memmove (void *dest, const void *src, grub_size_t n)
+ __attribute__ ((alias ("grub_memmove")));
+/* GCC emits references to memcpy() for struct copies etc. */
+void *memcpy (void *dest, const void *src, grub_size_t n)
+ __attribute__ ((alias ("grub_memmove")));
+#else
+void *memcpy (void *dest, const void *src, grub_size_t n)
+{
+ return grub_memmove (dest, src, n);
+}
+void *memmove (void *dest, const void *src, grub_size_t n)
+{
+ return grub_memmove (dest, src, n);
+}
+#endif
+
+char *
+grub_strcpy (char *dest, const char *src)
+{
+ char *p = dest;
+
+ while ((*p++ = *src++) != '\0')
+ ;
+
+ return dest;
+}
+
+char *
+grub_strncpy (char *dest, const char *src, int c)
+{
+ char *p = dest;
+
+ while ((*p++ = *src++) != '\0' && --c)
+ ;
+
+ return dest;
+}
+
+char *
+grub_stpcpy (char *dest, const char *src)
+{
+ char *d = dest;
+ const char *s = src;
+
+ do
+ *d++ = *s;
+ while (*s++ != '\0');
+
+ return d - 1;
+}
+
+int
+grub_printf (const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start (ap, fmt);
+ ret = grub_vprintf (fmt, ap);
+ va_end (ap);
+
+ return ret;
+}
+
+int
+grub_printf_ (const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start (ap, fmt);
+ ret = grub_vprintf (_(fmt), ap);
+ va_end (ap);
+
+ return ret;
+}
+
+int
+grub_puts_ (const char *s)
+{
+ return grub_puts (_(s));
+}
+
+#if defined (APPLE_CC) && ! defined (GRUB_UTIL)
+int
+grub_err_printf (const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start (ap, fmt);
+ ret = grub_vprintf (fmt, ap);
+ va_end (ap);
+
+ return ret;
+}
+#endif
+
+#if ! defined (APPLE_CC) && ! defined (GRUB_UTIL)
+int grub_err_printf (const char *fmt, ...)
+__attribute__ ((alias("grub_printf")));
+#endif
+
+void
+grub_real_dprintf (const char *file, const int line, const char *condition,
+ const char *fmt, ...)
+{
+ va_list args;
+ const char *debug = grub_env_get ("debug");
+
+ if (! debug)
+ return;
+
+ if (grub_strword (debug, "all") || grub_strword (debug, condition))
+ {
+ grub_printf ("%s:%d: ", file, line);
+ va_start (args, fmt);
+ grub_vprintf (fmt, args);
+ va_end (args);
+ grub_refresh ();
+ }
+}
+
+#define PREALLOC_SIZE 255
+
+int
+grub_vprintf (const char *fmt, va_list args)
+{
+ grub_size_t s;
+ static char buf[PREALLOC_SIZE + 1];
+ char *curbuf = buf;
+ va_list ap2;
+ va_copy (ap2, args);
+
+ s = grub_vsnprintf_real (buf, PREALLOC_SIZE, fmt, args);
+ if (s > PREALLOC_SIZE)
+ {
+ curbuf = grub_malloc (s + 1);
+ if (!curbuf)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ buf[PREALLOC_SIZE - 3] = '.';
+ buf[PREALLOC_SIZE - 2] = '.';
+ buf[PREALLOC_SIZE - 1] = '.';
+ buf[PREALLOC_SIZE] = 0;
+ }
+ else
+ s = grub_vsnprintf_real (curbuf, s, fmt, ap2);
+ }
+
+ grub_xputs (curbuf);
+
+ if (curbuf != buf)
+ grub_free (curbuf);
+
+ return s;
+}
+
+int
+grub_memcmp (const void *s1, const void *s2, grub_size_t n)
+{
+ const char *t1 = s1;
+ const char *t2 = s2;
+
+ while (n--)
+ {
+ if (*t1 != *t2)
+ return (int) *t1 - (int) *t2;
+
+ t1++;
+ t2++;
+ }
+
+ return 0;
+}
+#ifndef APPLE_CC
+int memcmp (const void *s1, const void *s2, grub_size_t n)
+ __attribute__ ((alias ("grub_memcmp")));
+#else
+int memcmp (const void *s1, const void *s2, grub_size_t n)
+{
+ return grub_memcmp (s1, s2, n);
+}
+#endif
+
+int
+grub_strcmp (const char *s1, const char *s2)
+{
+ while (*s1 && *s2)
+ {
+ if (*s1 != *s2)
+ break;
+
+ s1++;
+ s2++;
+ }
+
+ return (int) *s1 - (int) *s2;
+}
+
+int
+grub_strncmp (const char *s1, const char *s2, grub_size_t n)
+{
+ if (n == 0)
+ return 0;
+
+ while (*s1 && *s2 && --n)
+ {
+ if (*s1 != *s2)
+ break;
+
+ s1++;
+ s2++;
+ }
+
+ return (int) *s1 - (int) *s2;
+}
+
+char *
+grub_strchr (const char *s, int c)
+{
+ do
+ {
+ if (*s == c)
+ return (char *) s;
+ }
+ while (*s++);
+
+ return 0;
+}
+
+char *
+grub_strrchr (const char *s, int c)
+{
+ char *p = NULL;
+
+ do
+ {
+ if (*s == c)
+ p = (char *) s;
+ }
+ while (*s++);
+
+ return p;
+}
+
+/* Copied from gnulib.
+ Written by Bruno Haible <bruno@clisp.org>, 2005. */
+char *
+grub_strstr (const char *haystack, const char *needle)
+{
+ /* Be careful not to look at the entire extent of haystack or needle
+ until needed. This is useful because of these two cases:
+ - haystack may be very long, and a match of needle found early,
+ - needle may be very long, and not even a short initial segment of
+ needle may be found in haystack. */
+ if (*needle != '\0')
+ {
+ /* Speed up the following searches of needle by caching its first
+ character. */
+ char b = *needle++;
+
+ for (;; haystack++)
+ {
+ if (*haystack == '\0')
+ /* No match. */
+ return NULL;
+ if (*haystack == b)
+ /* The first character matches. */
+ {
+ const char *rhaystack = haystack + 1;
+ const char *rneedle = needle;
+
+ for (;; rhaystack++, rneedle++)
+ {
+ if (*rneedle == '\0')
+ /* Found a match. */
+ return (char *) haystack;
+ if (*rhaystack == '\0')
+ /* No match. */
+ return NULL;
+ if (*rhaystack != *rneedle)
+ /* Nothing in this round. */
+ break;
+ }
+ }
+ }
+ }
+ else
+ return (char *) haystack;
+}
+
+int
+grub_strword (const char *haystack, const char *needle)
+{
+ const char *n_pos = needle;
+
+ while (grub_iswordseparator (*haystack))
+ haystack++;
+
+ while (*haystack)
+ {
+ /* Crawl both the needle and the haystack word we're on. */
+ while(*haystack && !grub_iswordseparator (*haystack)
+ && *haystack == *n_pos)
+ {
+ haystack++;
+ n_pos++;
+ }
+
+ /* If we reached the end of both words at the same time, the word
+ is found. If not, eat everything in the haystack that isn't the
+ next word (or the end of string) and "reset" the needle. */
+ if ( (!*haystack || grub_iswordseparator (*haystack))
+ && (!*n_pos || grub_iswordseparator (*n_pos)))
+ return 1;
+ else
+ {
+ n_pos = needle;
+ while (*haystack && !grub_iswordseparator (*haystack))
+ haystack++;
+ while (grub_iswordseparator (*haystack))
+ haystack++;
+ }
+ }
+
+ return 0;
+}
+
+int
+grub_isspace (int c)
+{
+ return (c == '\n' || c == '\r' || c == ' ' || c == '\t');
+}
+
+int
+grub_isprint (int c)
+{
+ return (c >= ' ' && c <= '~');
+}
+
+
+unsigned long
+grub_strtoul (const char *str, char **end, int base)
+{
+ unsigned long long num;
+
+ num = grub_strtoull (str, end, base);
+ if (num > ~0UL)
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
+ return ~0UL;
+ }
+
+ return (unsigned long) num;
+}
+
+unsigned long long
+grub_strtoull (const char *str, char **end, int base)
+{
+ unsigned long long num = 0;
+ int found = 0;
+
+ /* Skip white spaces. */
+ while (*str && grub_isspace (*str))
+ str++;
+
+ /* Guess the base, if not specified. The prefix `0x' means 16, and
+ the prefix `0' means 8. */
+ if (str[0] == '0')
+ {
+ if (str[1] == 'x')
+ {
+ if (base == 0 || base == 16)
+ {
+ base = 16;
+ str += 2;
+ }
+ }
+ else if (base == 0 && str[1] >= '0' && str[1] <= '7')
+ base = 8;
+ }
+
+ if (base == 0)
+ base = 10;
+
+ while (*str)
+ {
+ unsigned long digit;
+
+ digit = grub_tolower (*str) - '0';
+ if (digit > 9)
+ {
+ digit += '0' - 'a' + 10;
+ if (digit >= (unsigned long) base)
+ break;
+ }
+
+ found = 1;
+
+ /* NUM * BASE + DIGIT > ~0ULL */
+ if (num > grub_divmod64 (~0ULL - digit, base, 0))
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
+ return ~0ULL;
+ }
+
+ num = num * base + digit;
+ str++;
+ }
+
+ if (! found)
+ {
+ grub_error (GRUB_ERR_BAD_NUMBER, "unrecognized number");
+ return 0;
+ }
+
+ if (end)
+ *end = (char *) str;
+
+ return num;
+}
+
+char *
+grub_strdup (const char *s)
+{
+ grub_size_t len;
+ char *p;
+
+ len = grub_strlen (s) + 1;
+ p = (char *) grub_malloc (len);
+ if (! p)
+ return 0;
+
+ return grub_memcpy (p, s, len);
+}
+
+char *
+grub_strndup (const char *s, grub_size_t n)
+{
+ grub_size_t len;
+ char *p;
+
+ len = grub_strlen (s);
+ if (len > n)
+ len = n;
+ p = (char *) grub_malloc (len + 1);
+ if (! p)
+ return 0;
+
+ grub_memcpy (p, s, len);
+ p[len] = '\0';
+ return p;
+}
+
+void *
+grub_memset (void *s, int c, grub_size_t len)
+{
+ void *p = s;
+ grub_uint8_t pattern8 = c;
+
+ if (len >= 3 * sizeof (unsigned long))
+ {
+ unsigned long patternl = 0;
+ grub_size_t i;
+
+ for (i = 0; i < sizeof (unsigned long); i++)
+ patternl |= ((unsigned long) pattern8) << (8 * i);
+
+ while (len > 0 && (((grub_addr_t) p) & (sizeof (unsigned long) - 1)))
+ {
+ *(grub_uint8_t *) p = pattern8;
+ p = (grub_uint8_t *) p + 1;
+ len--;
+ }
+ while (len >= sizeof (unsigned long))
+ {
+ *(unsigned long *) p = patternl;
+ p = (unsigned long *) p + 1;
+ len -= sizeof (unsigned long);
+ }
+ }
+
+ while (len > 0)
+ {
+ *(grub_uint8_t *) p = pattern8;
+ p = (grub_uint8_t *) p + 1;
+ len--;
+ }
+
+ return s;
+}
+#ifndef APPLE_CC
+void *memset (void *s, int c, grub_size_t n)
+ __attribute__ ((alias ("grub_memset")));
+#else
+void *memset (void *s, int c, grub_size_t n)
+{
+ return grub_memset (s, c, n);
+}
+#endif
+
+grub_size_t
+grub_strlen (const char *s)
+{
+ const char *p = s;
+
+ while (*p)
+ p++;
+
+ return p - s;
+}
+
+static inline void
+grub_reverse (char *str)
+{
+ char *p = str + grub_strlen (str) - 1;
+
+ while (str < p)
+ {
+ char tmp;
+
+ tmp = *str;
+ *str = *p;
+ *p = tmp;
+ str++;
+ p--;
+ }
+}
+
+/* Divide N by D, return the quotient, and store the remainder in *R. */
+grub_uint64_t
+grub_divmod64_full (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
+{
+ /* This algorithm is typically implemented by hardware. The idea
+ is to get the highest bit in N, 64 times, by keeping
+ upper(N * 2^i) = (Q * D + M), where upper
+ represents the high 64 bits in 128-bits space. */
+ unsigned bits = 64;
+ grub_uint64_t q = 0;
+ grub_uint64_t m = 0;
+
+ /* Skip the slow computation if 32-bit arithmetic is possible. */
+ if (n < 0xffffffff && d < 0xffffffff)
+ {
+ if (r)
+ *r = ((grub_uint32_t) n) % (grub_uint32_t) d;
+
+ return ((grub_uint32_t) n) / (grub_uint32_t) d;
+ }
+
+ while (bits--)
+ {
+ m <<= 1;
+
+ if (n & (1ULL << 63))
+ m |= 1;
+
+ q <<= 1;
+ n <<= 1;
+
+ if (m >= d)
+ {
+ q |= 1;
+ m -= d;
+ }
+ }
+
+ if (r)
+ *r = m;
+
+ return q;
+}
+
+/* Convert a long long value to a string. This function avoids 64-bit
+ modular arithmetic or divisions. */
+static char *
+grub_lltoa (char *str, int c, unsigned long long n)
+{
+ unsigned base = (c == 'x') ? 16 : 10;
+ char *p;
+
+ if ((long long) n < 0 && c == 'd')
+ {
+ n = (unsigned long long) (-((long long) n));
+ *str++ = '-';
+ }
+
+ p = str;
+
+ if (base == 16)
+ do
+ {
+ unsigned d = (unsigned) (n & 0xf);
+ *p++ = (d > 9) ? d + 'a' - 10 : d + '0';
+ }
+ while (n >>= 4);
+ else
+ /* BASE == 10 */
+ do
+ {
+ unsigned m;
+
+ n = grub_divmod64 (n, 10, &m);
+ *p++ = m + '0';
+ }
+ while (n);
+
+ *p = 0;
+
+ grub_reverse (str);
+ return p;
+}
+
+static int
+grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt, va_list args)
+{
+ char c;
+ grub_size_t count = 0;
+ auto void write_char (unsigned char ch);
+ auto void write_str (const char *s);
+ auto void write_fill (const char ch, int n);
+
+ void write_char (unsigned char ch)
+ {
+ if (count < max_len)
+ *str++ = ch;
+
+ count++;
+ }
+
+ void write_str (const char *s)
+ {
+ while (*s)
+ write_char (*s++);
+ }
+
+ void write_fill (const char ch, int n)
+ {
+ int i;
+ for (i = 0; i < n; i++)
+ write_char (ch);
+ }
+
+ while ((c = *fmt++) != 0)
+ {
+ if (c != '%')
+ write_char (c);
+ else
+ {
+ char tmp[32];
+ char *p;
+ unsigned int format1 = 0;
+ unsigned int format2 = ~ 0U;
+ char zerofill = ' ';
+ int rightfill = 0;
+ int n;
+ int longfmt = 0;
+ int longlongfmt = 0;
+ int unsig = 0;
+
+ if (*fmt && *fmt =='-')
+ {
+ rightfill = 1;
+ fmt++;
+ }
+
+ p = (char *) fmt;
+ /* Read formatting parameters. */
+ while (*p && grub_isdigit (*p))
+ p++;
+
+ if (p > fmt)
+ {
+ char s[p - fmt + 1];
+ grub_strncpy (s, fmt, p - fmt);
+ s[p - fmt] = 0;
+ if (s[0] == '0')
+ zerofill = '0';
+ format1 = grub_strtoul (s, 0, 10);
+ fmt = p;
+ }
+
+ if (*p && *p == '.')
+ {
+ p++;
+ fmt++;
+ while (*p && grub_isdigit (*p))
+ p++;
+
+ if (p > fmt)
+ {
+ char fstr[p - fmt + 1];
+ grub_strncpy (fstr, fmt, p - fmt);
+ fstr[p - fmt] = 0;
+ format2 = grub_strtoul (fstr, 0, 10);
+ fmt = p;
+ }
+ }
+
+ c = *fmt++;
+ if (c == 'l')
+ {
+ longfmt = 1;
+ c = *fmt++;
+ if (c == 'l')
+ {
+ longlongfmt = 1;
+ c = *fmt++;
+ }
+ }
+
+ switch (c)
+ {
+ case 'p':
+ write_str ("0x");
+ c = 'x';
+ longlongfmt |= (sizeof (void *) == sizeof (long long));
+ /* Fall through. */
+ case 'x':
+ case 'u':
+ unsig = 1;
+ /* Fall through. */
+ case 'd':
+ if (longlongfmt)
+ {
+ long long ll;
+
+ ll = va_arg (args, long long);
+ grub_lltoa (tmp, c, ll);
+ }
+ else if (longfmt && unsig)
+ {
+ unsigned long l = va_arg (args, unsigned long);
+ grub_lltoa (tmp, c, l);
+ }
+ else if (longfmt)
+ {
+ long l = va_arg (args, long);
+ grub_lltoa (tmp, c, l);
+ }
+ else if (unsig)
+ {
+ unsigned u = va_arg (args, unsigned);
+ grub_lltoa (tmp, c, u);
+ }
+ else
+ {
+ n = va_arg (args, int);
+ grub_lltoa (tmp, c, n);
+ }
+ if (! rightfill && grub_strlen (tmp) < format1)
+ write_fill (zerofill, format1 - grub_strlen (tmp));
+ write_str (tmp);
+ if (rightfill && grub_strlen (tmp) < format1)
+ write_fill (zerofill, format1 - grub_strlen (tmp));
+ break;
+
+ case 'c':
+ n = va_arg (args, int);
+ write_char (n & 0xff);
+ break;
+
+ case 'C':
+ {
+ grub_uint32_t code = va_arg (args, grub_uint32_t);
+ int shift;
+ unsigned mask;
+
+ if (code <= 0x7f)
+ {
+ shift = 0;
+ mask = 0;
+ }
+ else if (code <= 0x7ff)
+ {
+ shift = 6;
+ mask = 0xc0;
+ }
+ else if (code <= 0xffff)
+ {
+ shift = 12;
+ mask = 0xe0;
+ }
+ else if (code <= 0x1fffff)
+ {
+ shift = 18;
+ mask = 0xf0;
+ }
+ else if (code <= 0x3ffffff)
+ {
+ shift = 24;
+ mask = 0xf8;
+ }
+ else if (code <= 0x7fffffff)
+ {
+ shift = 30;
+ mask = 0xfc;
+ }
+ else
+ {
+ code = '?';
+ shift = 0;
+ mask = 0;
+ }
+
+ write_char (mask | (code >> shift));
+
+ for (shift -= 6; shift >= 0; shift -= 6)
+ write_char (0x80 | (0x3f & (code >> shift)));
+ }
+ break;
+
+ case 's':
+ p = va_arg (args, char *);
+ if (p)
+ {
+ grub_size_t len = 0;
+ while (len < format2 && p[len])
+ len++;
+
+ if (!rightfill && len < format1)
+ write_fill (zerofill, format1 - len);
+
+ grub_size_t i;
+ for (i = 0; i < len; i++)
+ write_char (*p++);
+
+ if (rightfill && len < format1)
+ write_fill (zerofill, format1 - len);
+ }
+ else
+ write_str ("(null)");
+
+ break;
+
+ default:
+ write_char (c);
+ break;
+ }
+ }
+ }
+
+ *str = '\0';
+
+ return count;
+}
+
+int
+grub_vsnprintf (char *str, grub_size_t n, const char *fmt, va_list ap)
+{
+ grub_size_t ret;
+
+ if (!n)
+ return 0;
+
+ n--;
+
+ ret = grub_vsnprintf_real (str, n, fmt, ap);
+
+ return ret < n ? ret : n;
+}
+
+int
+grub_snprintf (char *str, grub_size_t n, const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start (ap, fmt);
+ ret = grub_vsnprintf (str, n, fmt, ap);
+ va_end (ap);
+
+ return ret;
+}
+
+char *
+grub_xvasprintf (const char *fmt, va_list ap)
+{
+ grub_size_t s, as = PREALLOC_SIZE;
+ char *ret;
+
+ while (1)
+ {
+ va_list ap2;
+ va_copy (ap2, ap);
+ ret = grub_malloc (as + 1);
+ if (!ret)
+ return NULL;
+
+ s = grub_vsnprintf_real (ret, as, fmt, ap2);
+ if (s <= as)
+ return ret;
+
+ grub_free (ret);
+ as = s;
+ }
+}
+
+char *
+grub_xasprintf (const char *fmt, ...)
+{
+ va_list ap;
+ char *ret;
+
+ va_start (ap, fmt);
+ ret = grub_xvasprintf (fmt, ap);
+ va_end (ap);
+
+ return ret;
+}
+
+/* Abort GRUB. This function does not return. */
+void
+grub_abort (void)
+{
+ grub_printf ("\nAborted.");
+
+#ifndef GRUB_UTIL
+ if (grub_term_inputs)
+#endif
+ {
+ grub_printf (" Press any key to exit.");
+ grub_getkey ();
+ }
+
+ grub_exit ();
+}
+
+#if ! defined (APPLE_CC) && !defined (GRUB_UTIL)
+/* GCC emits references to abort(). */
+void abort (void) __attribute__ ((alias ("grub_abort")));
+#endif
+
+#if NEED_ENABLE_EXECUTE_STACK && !defined(GRUB_UTIL) && !defined(GRUB_MACHINE_EMU)
+/* Some gcc versions generate a call to this function
+ in trampolines for nested functions. */
+void __enable_execute_stack (void *addr __attribute__ ((unused)))
+{
+}
+#endif
+
+#if NEED_REGISTER_FRAME_INFO && !defined(GRUB_UTIL)
+void __register_frame_info (void)
+{
+}
+
+void __deregister_frame_info (void)
+{
+}
+#endif
+
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
new file mode 100644
index 0000000..d54f3f2
--- /dev/null
+++ b/grub-core/kern/mm.c
@@ -0,0 +1,572 @@
+/* mm.c - functions for memory manager */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ The design of this memory manager.
+
+ This is a simple implementation of malloc with a few extensions. These are
+ the extensions:
+
+ - memalign is implemented efficiently.
+
+ - multiple regions may be used as free space. They may not be
+ contiguous.
+
+ Regions are managed by a singly linked list, and the meta information is
+ stored in the beginning of each region. Space after the meta information
+ is used to allocate memory.
+
+ The memory space is used as cells instead of bytes for simplicity. This
+ is important for some CPUs which may not access multiple bytes at a time
+ when the first byte is not aligned at a certain boundary (typically,
+ 4-byte or 8-byte). The size of each cell is equal to the size of struct
+ grub_mm_header, so the header of each allocated/free block fits into one
+ cell precisely. One cell is 16 bytes on 32-bit platforms and 32 bytes
+ on 64-bit platforms.
+
+ There are two types of blocks: allocated blocks and free blocks.
+
+ In allocated blocks, the header of each block has only its size. Note that
+ this size is based on cells but not on bytes. The header is located right
+ before the returned pointer, that is, the header resides at the previous
+ cell.
+
+ Free blocks constitutes a ring, using a singly linked list. The first free
+ block is pointed to by the meta information of a region. The allocator
+ attempts to pick up the second block instead of the first one. This is
+ a typical optimization against defragmentation, and makes the
+ implementation a bit easier.
+
+ For safety, both allocated blocks and free ones are marked by magic
+ numbers. Whenever anything unexpected is detected, GRUB aborts the
+ operation.
+ */
+
+#include <config.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/mm_private.h>
+
+#ifdef MM_DEBUG
+# undef grub_malloc
+# undef grub_zalloc
+# undef grub_realloc
+# undef grub_free
+# undef grub_memalign
+#endif
+
+
+
+grub_mm_region_t grub_mm_base;
+
+/* Get a header from the pointer PTR, and set *P and *R to a pointer
+ to the header and a pointer to its region, respectively. PTR must
+ be allocated. */
+static void
+get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r)
+{
+ if ((grub_addr_t) ptr & (GRUB_MM_ALIGN - 1))
+ grub_fatal ("unaligned pointer %p", ptr);
+
+ for (*r = grub_mm_base; *r; *r = (*r)->next)
+ if ((grub_addr_t) ptr > (grub_addr_t) ((*r) + 1)
+ && (grub_addr_t) ptr <= (grub_addr_t) ((*r) + 1) + (*r)->size)
+ break;
+
+ if (! *r)
+ grub_fatal ("out of range pointer %p", ptr);
+
+ *p = (grub_mm_header_t) ptr - 1;
+ if ((*p)->magic != GRUB_MM_ALLOC_MAGIC)
+ grub_fatal ("alloc magic is broken at %p", *p);
+}
+
+/* Initialize a region starting from ADDR and whose size is SIZE,
+ to use it as free space. */
+void
+grub_mm_init_region (void *addr, grub_size_t size)
+{
+ grub_mm_header_t h;
+ grub_mm_region_t r, *p, q;
+
+#if 0
+ grub_printf ("Using memory for heap: start=%p, end=%p\n", addr, addr + (unsigned int) size);
+#endif
+
+ /* Allocate a region from the head. */
+ r = (grub_mm_region_t) ALIGN_UP ((grub_addr_t) addr, GRUB_MM_ALIGN);
+ size -= (char *) r - (char *) addr + sizeof (*r);
+
+ /* If this region is too small, ignore it. */
+ if (size < GRUB_MM_ALIGN)
+ return;
+
+ h = (grub_mm_header_t) (r + 1);
+ h->next = h;
+ h->magic = GRUB_MM_FREE_MAGIC;
+ h->size = (size >> GRUB_MM_ALIGN_LOG2);
+
+ r->first = h;
+ r->pre_size = (grub_addr_t) r - (grub_addr_t) addr;
+ r->size = (h->size << GRUB_MM_ALIGN_LOG2);
+
+ /* Find where to insert this region. Put a smaller one before bigger ones,
+ to prevent fragmentation. */
+ for (p = &grub_mm_base, q = *p; q; p = &(q->next), q = *p)
+ if (q->size > r->size)
+ break;
+
+ *p = r;
+ r->next = q;
+}
+
+/* Allocate the number of units N with the alignment ALIGN from the ring
+ buffer starting from *FIRST. ALIGN must be a power of two. Both N and
+ ALIGN are in units of GRUB_MM_ALIGN. Return a non-NULL if successful,
+ otherwise return NULL. */
+static void *
+grub_real_malloc (grub_mm_header_t *first, grub_size_t n, grub_size_t align)
+{
+ grub_mm_header_t p, q;
+
+ /* When everything is allocated side effect is that *first will have alloc
+ magic marked, meaning that there is no room in this region. */
+ if ((*first)->magic == GRUB_MM_ALLOC_MAGIC)
+ return 0;
+
+ /* Try to search free slot for allocation in this memory region. */
+ for (q = *first, p = q->next; ; q = p, p = p->next)
+ {
+ grub_off_t extra;
+
+ extra = ((grub_addr_t) (p + 1) >> GRUB_MM_ALIGN_LOG2) % align;
+ if (extra)
+ extra = align - extra;
+
+ if (! p)
+ grub_fatal ("null in the ring");
+
+ if (p->magic != GRUB_MM_FREE_MAGIC)
+ grub_fatal ("free magic is broken at %p: 0x%x", p, p->magic);
+
+ if (p->size >= n + extra)
+ {
+ extra += (p->size - extra - n) & (~(align - 1));
+ if (extra == 0 && p->size == n)
+ {
+ /* There is no special alignment requirement and memory block
+ is complete match.
+
+ 1. Just mark memory block as allocated and remove it from
+ free list.
+
+ Result:
+ +---------------+ previous block's next
+ | alloc, size=n | |
+ +---------------+ v
+ */
+ q->next = p->next;
+ }
+ else if (align == 1 || p->size == n + extra)
+ {
+ /* There might be alignment requirement, when taking it into
+ account memory block fits in.
+
+ 1. Allocate new area at end of memory block.
+ 2. Reduce size of available blocks from original node.
+ 3. Mark new area as allocated and "remove" it from free
+ list.
+
+ Result:
+ +---------------+
+ | free, size-=n | next --+
+ +---------------+ |
+ | alloc, size=n | |
+ +---------------+ v
+ */
+
+ p->size -= n;
+ p += p->size;
+ }
+ else if (extra == 0)
+ {
+ grub_mm_header_t r;
+
+ r = p + extra + n;
+ r->magic = GRUB_MM_FREE_MAGIC;
+ r->size = p->size - extra - n;
+ r->next = p->next;
+ q->next = r;
+
+ if (q == p)
+ {
+ q = r;
+ r->next = r;
+ }
+ }
+ else
+ {
+ /* There is alignment requirement and there is room in memory
+ block. Split memory block to three pieces.
+
+ 1. Create new memory block right after section being
+ allocated. Mark it as free.
+ 2. Add new memory block to free chain.
+ 3. Mark current memory block having only extra blocks.
+ 4. Advance to aligned block and mark that as allocated and
+ "remove" it from free list.
+
+ Result:
+ +------------------------------+
+ | free, size=extra | next --+
+ +------------------------------+ |
+ | alloc, size=n | |
+ +------------------------------+ |
+ | free, size=orig.size-extra-n | <------+, next --+
+ +------------------------------+ v
+ */
+ grub_mm_header_t r;
+
+ r = p + extra + n;
+ r->magic = GRUB_MM_FREE_MAGIC;
+ r->size = p->size - extra - n;
+ r->next = p;
+
+ p->size = extra;
+ q->next = r;
+ p += extra;
+ }
+
+ p->magic = GRUB_MM_ALLOC_MAGIC;
+ p->size = n;
+
+ /* Mark find as a start marker for next allocation to fasten it.
+ This will have side effect of fragmenting memory as small
+ pieces before this will be un-used. */
+ *first = q;
+
+ return p + 1;
+ }
+
+ /* Search was completed without result. */
+ if (p == *first)
+ break;
+ }
+
+ return 0;
+}
+
+/* Allocate SIZE bytes with the alignment ALIGN and return the pointer. */
+void *
+grub_memalign (grub_size_t align, grub_size_t size)
+{
+ grub_mm_region_t r;
+ grub_size_t n = ((size + GRUB_MM_ALIGN - 1) >> GRUB_MM_ALIGN_LOG2) + 1;
+ int count = 0;
+
+ if (!grub_mm_base)
+ goto fail;
+
+ align = (align >> GRUB_MM_ALIGN_LOG2);
+ if (align == 0)
+ align = 1;
+
+ again:
+
+ for (r = grub_mm_base; r; r = r->next)
+ {
+ void *p;
+
+ p = grub_real_malloc (&(r->first), n, align);
+ if (p)
+ return p;
+ }
+
+ /* If failed, increase free memory somehow. */
+ switch (count)
+ {
+ case 0:
+ /* Invalidate disk caches. */
+ grub_disk_cache_invalidate_all ();
+ count++;
+ goto again;
+
+#if 0
+ case 1:
+ /* Unload unneeded modules. */
+ grub_dl_unload_unneeded ();
+ count++;
+ goto again;
+#endif
+
+ default:
+ break;
+ }
+
+ fail:
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+ return 0;
+}
+
+/* Allocate SIZE bytes and return the pointer. */
+void *
+grub_malloc (grub_size_t size)
+{
+ return grub_memalign (0, size);
+}
+
+/* Allocate SIZE bytes, clear them and return the pointer. */
+void *
+grub_zalloc (grub_size_t size)
+{
+ void *ret;
+
+ ret = grub_memalign (0, size);
+ if (ret)
+ grub_memset (ret, 0, size);
+
+ return ret;
+}
+
+/* Deallocate the pointer PTR. */
+void
+grub_free (void *ptr)
+{
+ grub_mm_header_t p;
+ grub_mm_region_t r;
+
+ if (! ptr)
+ return;
+
+ get_header_from_pointer (ptr, &p, &r);
+
+ if (r->first->magic == GRUB_MM_ALLOC_MAGIC)
+ {
+ p->magic = GRUB_MM_FREE_MAGIC;
+ r->first = p->next = p;
+ }
+ else
+ {
+ grub_mm_header_t q;
+
+#if 0
+ q = r->first;
+ do
+ {
+ grub_printf ("%s:%d: q=%p, q->size=0x%x, q->magic=0x%x\n",
+ GRUB_FILE, __LINE__, q, q->size, q->magic);
+ q = q->next;
+ }
+ while (q != r->first);
+#endif
+
+ for (q = r->first; q >= p || q->next <= p; q = q->next)
+ {
+ if (q->magic != GRUB_MM_FREE_MAGIC)
+ grub_fatal ("free magic is broken at %p: 0x%x", q, q->magic);
+
+ if (q >= q->next && (q < p || q->next > p))
+ break;
+ }
+
+ p->magic = GRUB_MM_FREE_MAGIC;
+ p->next = q->next;
+ q->next = p;
+
+ if (p + p->size == p->next)
+ {
+ if (p->next == q)
+ q = p;
+
+ p->next->magic = 0;
+ p->size += p->next->size;
+ p->next = p->next->next;
+ }
+
+ if (q + q->size == p)
+ {
+ p->magic = 0;
+ q->size += p->size;
+ q->next = p->next;
+ }
+
+ r->first = q;
+ }
+}
+
+/* Reallocate SIZE bytes and return the pointer. The contents will be
+ the same as that of PTR. */
+void *
+grub_realloc (void *ptr, grub_size_t size)
+{
+ grub_mm_header_t p;
+ grub_mm_region_t r;
+ void *q;
+ grub_size_t n;
+
+ if (! ptr)
+ return grub_malloc (size);
+
+ if (! size)
+ {
+ grub_free (ptr);
+ return 0;
+ }
+
+ /* FIXME: Not optimal. */
+ n = ((size + GRUB_MM_ALIGN - 1) >> GRUB_MM_ALIGN_LOG2) + 1;
+ get_header_from_pointer (ptr, &p, &r);
+
+ if (p->size >= n)
+ return ptr;
+
+ q = grub_malloc (size);
+ if (! q)
+ return q;
+
+ grub_memcpy (q, ptr, size);
+ grub_free (ptr);
+ return q;
+}
+
+#ifdef MM_DEBUG
+int grub_mm_debug = 0;
+
+void
+grub_mm_dump_free (void)
+{
+ grub_mm_region_t r;
+
+ for (r = grub_mm_base; r; r = r->next)
+ {
+ grub_mm_header_t p;
+
+ /* Follow the free list. */
+ p = r->first;
+ do
+ {
+ if (p->magic != GRUB_MM_FREE_MAGIC)
+ grub_fatal ("free magic is broken at %p: 0x%x", p, p->magic);
+
+ grub_printf ("F:%p:%u:%p\n",
+ p, (unsigned int) p->size << GRUB_MM_ALIGN_LOG2, p->next);
+ p = p->next;
+ }
+ while (p != r->first);
+ }
+
+ grub_printf ("\n");
+}
+
+void
+grub_mm_dump (unsigned lineno)
+{
+ grub_mm_region_t r;
+
+ grub_printf ("called at line %u\n", lineno);
+ for (r = grub_mm_base; r; r = r->next)
+ {
+ grub_mm_header_t p;
+
+ for (p = (grub_mm_header_t) ALIGN_UP ((grub_addr_t) (r + 1),
+ GRUB_MM_ALIGN);
+ (grub_addr_t) p < (grub_addr_t) (r+1) + r->size;
+ p++)
+ {
+ switch (p->magic)
+ {
+ case GRUB_MM_FREE_MAGIC:
+ grub_printf ("F:%p:%u:%p\n",
+ p, (unsigned int) p->size << GRUB_MM_ALIGN_LOG2, p->next);
+ break;
+ case GRUB_MM_ALLOC_MAGIC:
+ grub_printf ("A:%p:%u\n", p, (unsigned int) p->size << GRUB_MM_ALIGN_LOG2);
+ break;
+ }
+ }
+ }
+
+ grub_printf ("\n");
+}
+
+void *
+grub_debug_malloc (const char *file, int line, grub_size_t size)
+{
+ void *ptr;
+
+ if (grub_mm_debug)
+ grub_printf ("%s:%d: malloc (0x%zx) = ", file, line, size);
+ ptr = grub_malloc (size);
+ if (grub_mm_debug)
+ grub_printf ("%p\n", ptr);
+ return ptr;
+}
+
+void *
+grub_debug_zalloc (const char *file, int line, grub_size_t size)
+{
+ void *ptr;
+
+ if (grub_mm_debug)
+ grub_printf ("%s:%d: zalloc (0x%zx) = ", file, line, size);
+ ptr = grub_zalloc (size);
+ if (grub_mm_debug)
+ grub_printf ("%p\n", ptr);
+ return ptr;
+}
+
+void
+grub_debug_free (const char *file, int line, void *ptr)
+{
+ if (grub_mm_debug)
+ grub_printf ("%s:%d: free (%p)\n", file, line, ptr);
+ grub_free (ptr);
+}
+
+void *
+grub_debug_realloc (const char *file, int line, void *ptr, grub_size_t size)
+{
+ if (grub_mm_debug)
+ grub_printf ("%s:%d: realloc (%p, 0x%zx) = ", file, line, ptr, size);
+ ptr = grub_realloc (ptr, size);
+ if (grub_mm_debug)
+ grub_printf ("%p\n", ptr);
+ return ptr;
+}
+
+void *
+grub_debug_memalign (const char *file, int line, grub_size_t align,
+ grub_size_t size)
+{
+ void *ptr;
+
+ if (grub_mm_debug)
+ grub_printf ("%s:%d: memalign (0x%zx, 0x%zx) = ",
+ file, line, align, size);
+ ptr = grub_memalign (align, size);
+ if (grub_mm_debug)
+ grub_printf ("%p\n", ptr);
+ return ptr;
+}
+
+#endif /* MM_DEBUG */
diff --git a/grub-core/kern/parser.c b/grub-core/kern/parser.c
new file mode 100644
index 0000000..6370a7b
--- /dev/null
+++ b/grub-core/kern/parser.c
@@ -0,0 +1,267 @@
+/* parser.c - the part of the parser that can return partial tokens */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/parser.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+
+
+/* All the possible state transitions on the command line. If a
+ transition can not be found, it is assumed that there is no
+ transition and keep_value is assumed to be 1. */
+static struct grub_parser_state_transition state_transitions[] = {
+ {GRUB_PARSER_STATE_TEXT, GRUB_PARSER_STATE_QUOTE, '\'', 0},
+ {GRUB_PARSER_STATE_TEXT, GRUB_PARSER_STATE_DQUOTE, '\"', 0},
+ {GRUB_PARSER_STATE_TEXT, GRUB_PARSER_STATE_VAR, '$', 0},
+ {GRUB_PARSER_STATE_TEXT, GRUB_PARSER_STATE_ESC, '\\', 0},
+
+ {GRUB_PARSER_STATE_ESC, GRUB_PARSER_STATE_TEXT, 0, 1},
+
+ {GRUB_PARSER_STATE_QUOTE, GRUB_PARSER_STATE_TEXT, '\'', 0},
+
+ {GRUB_PARSER_STATE_DQUOTE, GRUB_PARSER_STATE_TEXT, '\"', 0},
+ {GRUB_PARSER_STATE_DQUOTE, GRUB_PARSER_STATE_QVAR, '$', 0},
+
+ {GRUB_PARSER_STATE_VAR, GRUB_PARSER_STATE_VARNAME2, '{', 0},
+ {GRUB_PARSER_STATE_VAR, GRUB_PARSER_STATE_VARNAME, 0, 1},
+ {GRUB_PARSER_STATE_VARNAME, GRUB_PARSER_STATE_TEXT, ' ', 1},
+ {GRUB_PARSER_STATE_VARNAME2, GRUB_PARSER_STATE_TEXT, '}', 0},
+
+ {GRUB_PARSER_STATE_QVAR, GRUB_PARSER_STATE_QVARNAME2, '{', 0},
+ {GRUB_PARSER_STATE_QVAR, GRUB_PARSER_STATE_QVARNAME, 0, 1},
+ {GRUB_PARSER_STATE_QVARNAME, GRUB_PARSER_STATE_TEXT, '\"', 0},
+ {GRUB_PARSER_STATE_QVARNAME, GRUB_PARSER_STATE_DQUOTE, ' ', 1},
+ {GRUB_PARSER_STATE_QVARNAME2, GRUB_PARSER_STATE_DQUOTE, '}', 0},
+
+ {0, 0, 0, 0}
+};
+
+
+/* Determines the state following STATE, determined by C. */
+grub_parser_state_t
+grub_parser_cmdline_state (grub_parser_state_t state, char c, char *result)
+{
+ struct grub_parser_state_transition *transition;
+ struct grub_parser_state_transition default_transition;
+
+ default_transition.to_state = state;
+ default_transition.keep_value = 1;
+
+ /* Look for a good translation. */
+ for (transition = state_transitions; transition->from_state; transition++)
+ {
+ if (transition->from_state != state)
+ continue;
+ /* An exact match was found, use it. */
+ if (transition->input == c)
+ break;
+
+ if (transition->input == ' ' && !grub_isalpha (c)
+ && !grub_isdigit (c) && c != '_')
+ break;
+
+ /* A less perfect match was found, use this one if no exact
+ match can be found. */
+ if (transition->input == 0)
+ break;
+ }
+
+ if (!transition->from_state)
+ transition = &default_transition;
+
+ if (transition->keep_value)
+ *result = c;
+ else
+ *result = 0;
+ return transition->to_state;
+}
+
+
+grub_err_t
+grub_parser_split_cmdline (const char *cmdline, grub_reader_getline_t getline,
+ int *argc, char ***argv)
+{
+ grub_parser_state_t state = GRUB_PARSER_STATE_TEXT;
+ /* XXX: Fixed size buffer, perhaps this buffer should be dynamically
+ allocated. */
+ char buffer[1024];
+ char *bp = buffer;
+ char *rd = (char *) cmdline;
+ char varname[200];
+ char *vp = varname;
+ char *args;
+ int i;
+
+ auto int check_varstate (grub_parser_state_t s);
+
+ int check_varstate (grub_parser_state_t s)
+ {
+ return (s == GRUB_PARSER_STATE_VARNAME
+ || s == GRUB_PARSER_STATE_VARNAME2
+ || s == GRUB_PARSER_STATE_QVARNAME
+ || s == GRUB_PARSER_STATE_QVARNAME2);
+ }
+
+ auto void add_var (grub_parser_state_t newstate);
+
+ void add_var (grub_parser_state_t newstate)
+ {
+ char *val;
+
+ /* Check if a variable was being read in and the end of the name
+ was reached. */
+ if (!(check_varstate (state) && !check_varstate (newstate)))
+ return;
+
+ *(vp++) = '\0';
+ val = grub_env_get (varname);
+ vp = varname;
+ if (!val)
+ return;
+
+ /* Insert the contents of the variable in the buffer. */
+ for (; *val; val++)
+ *(bp++) = *val;
+ }
+
+ *argc = 0;
+ do
+ {
+ if (!rd || !*rd)
+ {
+ if (getline)
+ getline (&rd, 1);
+ else
+ break;
+ }
+
+ if (!rd)
+ break;
+
+ for (; *rd; rd++)
+ {
+ grub_parser_state_t newstate;
+ char use;
+
+ newstate = grub_parser_cmdline_state (state, *rd, &use);
+
+ /* If a variable was being processed and this character does
+ not describe the variable anymore, write the variable to
+ the buffer. */
+ add_var (newstate);
+
+ if (check_varstate (newstate))
+ {
+ if (use)
+ *(vp++) = use;
+ }
+ else
+ {
+ if (newstate == GRUB_PARSER_STATE_TEXT
+ && state != GRUB_PARSER_STATE_ESC && use == ' ')
+ {
+ /* Don't add more than one argument if multiple
+ spaces are used. */
+ if (bp != buffer && *(bp - 1))
+ {
+ *(bp++) = '\0';
+ (*argc)++;
+ }
+ }
+ else if (use)
+ *(bp++) = use;
+ }
+ state = newstate;
+ }
+ }
+ while (state != GRUB_PARSER_STATE_TEXT && !check_varstate (state));
+
+ /* A special case for when the last character was part of a
+ variable. */
+ add_var (GRUB_PARSER_STATE_TEXT);
+
+ if (bp != buffer && *(bp - 1))
+ {
+ *(bp++) = '\0';
+ (*argc)++;
+ }
+
+ /* Reserve memory for the return values. */
+ args = grub_malloc (bp - buffer);
+ if (!args)
+ return grub_errno;
+ grub_memcpy (args, buffer, bp - buffer);
+
+ *argv = grub_malloc (sizeof (char *) * (*argc + 1));
+ if (!*argv)
+ {
+ grub_free (args);
+ return grub_errno;
+ }
+
+ /* The arguments are separated with 0's, setup argv so it points to
+ the right values. */
+ bp = args;
+ for (i = 0; i < *argc; i++)
+ {
+ (*argv)[i] = bp;
+ while (*bp)
+ bp++;
+ bp++;
+ }
+
+ return 0;
+}
+
+grub_err_t
+grub_parser_execute (char *source)
+{
+ auto grub_err_t getline (char **line, int cont);
+ grub_err_t getline (char **line, int cont __attribute__ ((unused)))
+ {
+ char *p;
+
+ if (!source)
+ {
+ *line = 0;
+ return 0;
+ }
+
+ p = grub_strchr (source, '\n');
+
+ if (p)
+ *line = grub_strndup (source, p - source);
+ else
+ *line = grub_strdup (source);
+ source = p ? p + 1 : 0;
+ return 0;
+ }
+
+ while (source)
+ {
+ char *line;
+
+ getline (&line, 0);
+ grub_rescue_parse_line (line, getline);
+ grub_free (line);
+ }
+
+ return grub_errno;
+}
diff --git a/grub-core/kern/partition.c b/grub-core/kern/partition.c
new file mode 100644
index 0000000..a2f5dd7
--- /dev/null
+++ b/grub-core/kern/partition.c
@@ -0,0 +1,253 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+#include <grub/disk.h>
+
+#ifdef GRUB_UTIL
+#include <grub/util/misc.h>
+#endif
+
+grub_partition_map_t grub_partition_map_list;
+
+/*
+ * Checks that disk->partition contains part. This function assumes that the
+ * start of part is relative to the start of disk->partition. Returns 1 if
+ * disk->partition is null.
+ */
+static int
+grub_partition_check_containment (const grub_disk_t disk,
+ const grub_partition_t part)
+{
+ if (disk->partition == NULL)
+ return 1;
+
+ if (part->start + part->len > disk->partition->len)
+ {
+ char *partname;
+
+ partname = grub_partition_get_name (disk->partition);
+ grub_dprintf ("partition", "sub-partition %s%d of (%s,%s) ends after parent.\n",
+ part->partmap->name, part->number + 1, disk->name, partname);
+#ifdef GRUB_UTIL
+ grub_util_warn ("Discarding improperly nested partition (%s,%s,%s%d)",
+ disk->name, partname, part->partmap->name, part->number + 1);
+#endif
+ grub_free (partname);
+
+ return 0;
+ }
+
+ return 1;
+}
+
+static grub_partition_t
+grub_partition_map_probe (const grub_partition_map_t partmap,
+ grub_disk_t disk, int partnum)
+{
+ grub_partition_t p = 0;
+
+ auto int find_func (grub_disk_t d, const grub_partition_t partition);
+
+ int find_func (grub_disk_t dsk,
+ const grub_partition_t partition)
+ {
+ if (partnum != partition->number)
+ return 0;
+
+ if (!(grub_partition_check_containment (dsk, partition)))
+ return 0;
+
+ p = (grub_partition_t) grub_malloc (sizeof (*p));
+ if (! p)
+ return 1;
+
+ grub_memcpy (p, partition, sizeof (*p));
+ return 1;
+ }
+
+ partmap->iterate (disk, find_func);
+ if (grub_errno)
+ goto fail;
+
+ return p;
+
+ fail:
+ grub_free (p);
+ return 0;
+}
+
+grub_partition_t
+grub_partition_probe (struct grub_disk *disk, const char *str)
+{
+ grub_partition_t part = 0;
+ grub_partition_t curpart = 0;
+ grub_partition_t tail;
+ const char *ptr;
+
+ part = tail = disk->partition;
+
+ for (ptr = str; *ptr;)
+ {
+ grub_partition_map_t partmap;
+ int num;
+ const char *partname, *partname_end;
+
+ partname = ptr;
+ while (*ptr && grub_isalpha (*ptr))
+ ptr++;
+ partname_end = ptr;
+ num = grub_strtoul (ptr, (char **) &ptr, 0) - 1;
+
+ curpart = 0;
+ /* Use the first partition map type found. */
+ FOR_PARTITION_MAPS(partmap)
+ {
+ if (partname_end != partname &&
+ (grub_strncmp (partmap->name, partname, partname_end - partname)
+ != 0 || partmap->name[partname_end - partname] != 0))
+ continue;
+
+ disk->partition = part;
+ curpart = grub_partition_map_probe (partmap, disk, num);
+ disk->partition = tail;
+ if (curpart)
+ break;
+
+ if (grub_errno == GRUB_ERR_BAD_PART_TABLE)
+ {
+ /* Continue to next partition map type. */
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ break;
+ }
+
+ if (! curpart)
+ {
+ while (part)
+ {
+ curpart = part->parent;
+ grub_free (part);
+ part = curpart;
+ }
+ return 0;
+ }
+ curpart->parent = part;
+ part = curpart;
+ if (! ptr || *ptr != ',')
+ break;
+ ptr++;
+ }
+
+ return part;
+}
+
+int
+grub_partition_iterate (struct grub_disk *disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ int ret = 0;
+
+ auto int part_iterate (grub_disk_t dsk, const grub_partition_t p);
+
+ int part_iterate (grub_disk_t dsk,
+ const grub_partition_t partition)
+ {
+ struct grub_partition p = *partition;
+
+ if (!(grub_partition_check_containment (dsk, partition)))
+ return 0;
+
+ p.parent = dsk->partition;
+ dsk->partition = 0;
+ if (hook (dsk, &p))
+ {
+ ret = 1;
+ return 1;
+ }
+ if (p.start != 0)
+ {
+ const struct grub_partition_map *partmap;
+ dsk->partition = &p;
+ FOR_PARTITION_MAPS(partmap)
+ {
+ grub_err_t err;
+ err = partmap->iterate (dsk, part_iterate);
+ if (err)
+ grub_errno = GRUB_ERR_NONE;
+ if (ret)
+ break;
+ }
+ }
+ dsk->partition = p.parent;
+ return ret;
+ }
+
+ {
+ const struct grub_partition_map *partmap;
+ FOR_PARTITION_MAPS(partmap)
+ {
+ grub_err_t err;
+ err = partmap->iterate (disk, part_iterate);
+ if (err)
+ grub_errno = GRUB_ERR_NONE;
+ if (ret)
+ break;
+ }
+ }
+
+ return ret;
+}
+
+char *
+grub_partition_get_name (const grub_partition_t partition)
+{
+ char *out = 0;
+ int curlen = 0;
+ grub_partition_t part;
+ for (part = partition; part; part = part->parent)
+ {
+ /* Even on 64-bit machines this buffer is enough to hold
+ longest number. */
+ char buf[grub_strlen (part->partmap->name) + 25];
+ int strl;
+ grub_snprintf (buf, sizeof (buf), "%s%d", part->partmap->name,
+ part->number + 1);
+ strl = grub_strlen (buf);
+ if (curlen)
+ {
+ out = grub_realloc (out, curlen + strl + 2);
+ grub_memcpy (out + strl + 1, out, curlen);
+ out[curlen + 1 + strl] = 0;
+ grub_memcpy (out, buf, strl);
+ out[strl] = ',';
+ curlen = curlen + 1 + strl;
+ }
+ else
+ {
+ curlen = strl;
+ out = grub_strdup (buf);
+ }
+ }
+ return out;
+}
diff --git a/grub-core/kern/powerpc/cache.S b/grub-core/kern/powerpc/cache.S
new file mode 100644
index 0000000..d85e68d
--- /dev/null
+++ b/grub-core/kern/powerpc/cache.S
@@ -0,0 +1,26 @@
+/* cache.S - Flush the processor cache for a specific region. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2007,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ .text
+
+ .align 2
+ .globl grub_arch_sync_caches
+grub_arch_sync_caches:
+#include "cache_flush.S"
+ blr
diff --git a/grub-core/kern/powerpc/cache_flush.S b/grub-core/kern/powerpc/cache_flush.S
new file mode 100644
index 0000000..1410f78
--- /dev/null
+++ b/grub-core/kern/powerpc/cache_flush.S
@@ -0,0 +1,43 @@
+/* cache.S - Flush the processor cache for a specific region. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2007,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#undef CACHE_LINE_BYTES
+#define CACHE_LINE_BYTES 32
+
+ /* `address' may not be CACHE_LINE_BYTES-aligned. */
+ andi. 6, 3, CACHE_LINE_BYTES - 1 /* Find the misalignment. */
+ add 4, 4, 6 /* Adjust `size' to compensate. */
+
+ /* Force the dcache lines to memory. */
+ li 5, 0
+1: dcbst 5, 3
+ addi 5, 5, CACHE_LINE_BYTES
+ cmpw 5, 4
+ blt 1b
+ sync /* Force all dcbsts to complete. */
+
+ /* Invalidate the icache lines. */
+ li 5, 0
+1: icbi 5, 3
+ addi 5, 5, CACHE_LINE_BYTES
+ cmpw 5, 4
+ blt 1b
+ sync /* Force all icbis to complete. */
+ isync /* Discard partially executed instructions that were
+ loaded from the invalid icache. */
diff --git a/grub-core/kern/powerpc/dl.c b/grub-core/kern/powerpc/dl.c
new file mode 100644
index 0000000..ad19e56
--- /dev/null
+++ b/grub-core/kern/powerpc/dl.c
@@ -0,0 +1,136 @@
+/* dl.c - arch-dependent part of loadable module support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/elf.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+
+/* Check if EHDR is a valid ELF header. */
+grub_err_t
+grub_arch_dl_check_header (void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+
+ /* Check the magic numbers. */
+ if (e->e_ident[EI_CLASS] != ELFCLASS32
+ || e->e_ident[EI_DATA] != ELFDATA2MSB
+ || e->e_machine != EM_PPC)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch specific ELF magic");
+
+ return GRUB_ERR_NONE;
+}
+
+
+/* Relocate symbols. */
+grub_err_t
+grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+ Elf_Shdr *s;
+ Elf_Word entsize;
+ unsigned i;
+
+ /* Find a symbol table. */
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no symtab found");
+
+ entsize = s->sh_entsize;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_RELA)
+ {
+ grub_dl_segment_t seg;
+
+ /* Find the target segment. */
+ for (seg = mod->segment; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf_Rela *rel, *max;
+
+ for (rel = (Elf_Rela *) ((char *) e + s->sh_offset),
+ max = rel + s->sh_size / s->sh_entsize;
+ rel < max;
+ rel++)
+ {
+ Elf_Word *addr;
+ Elf_Sym *sym;
+ grub_uint32_t value;
+
+ if (seg->size < rel->r_offset)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "reloc offset is out of the segment");
+
+ addr = (Elf_Word *) ((char *) seg->addr + rel->r_offset);
+ sym = (Elf_Sym *) ((char *) mod->symtab
+ + entsize * ELF_R_SYM (rel->r_info));
+
+ /* On the PPC the value does not have an explicit
+ addend, add it. */
+ value = sym->st_value + rel->r_addend;
+ switch (ELF_R_TYPE (rel->r_info))
+ {
+ case R_PPC_ADDR16_LO:
+ *(Elf_Half *) addr = value;
+ break;
+
+ case R_PPC_REL24:
+ {
+ Elf_Sword delta = value - (Elf_Word) addr;
+
+ if (delta << 6 >> 6 != delta)
+ return grub_error (GRUB_ERR_BAD_MODULE, "relocation overflow");
+ *addr = (*addr & 0xfc000003) | (delta & 0x3fffffc);
+ break;
+ }
+
+ case R_PPC_ADDR16_HA:
+ *(Elf_Half *) addr = (value + 0x8000) >> 16;
+ break;
+
+ case R_PPC_ADDR32:
+ *addr = value;
+ break;
+
+ case R_PPC_REL32:
+ *addr = value - (Elf_Word) addr;
+ break;
+
+ default:
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "this relocation (%d) is not implemented yet",
+ ELF_R_TYPE (rel->r_info));
+ }
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S
new file mode 100644
index 0000000..0b1c233
--- /dev/null
+++ b/grub-core/kern/powerpc/ieee1275/startup.S
@@ -0,0 +1,64 @@
+/* startup.S - Startup code for the PowerPC. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/offsets.h>
+
+.extern __bss_start
+.extern _end
+
+ .text
+ .align 2
+ .globl start, _start
+start:
+_start:
+ b codestart
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX
+
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = _start + GRUB_KERNEL_MACHINE_PREFIX_END
+
+codestart:
+ li 2, 0
+ li 13, 0
+
+ /* Stage1 won't zero BSS for us. In other cases, why not do it again? */
+ lis 6, (__bss_start - 4)@h
+ ori 6, 6, (__bss_start - 4)@l
+ lis 7, (_end - 4)@h
+ ori 7, 7, (_end - 4)@l
+ subf 7, 6, 7
+ srwi 7, 7, 2 /* We store 4 bytes at a time. */
+ mtctr 7
+2: stwu 2, 4(6) /* We know r2 is already 0 from above. */
+ bdnz 2b
+
+ /* Store r5 in grub_ieee1275_entry_fn. */
+ lis 9, grub_ieee1275_entry_fn@ha
+ stw 5, grub_ieee1275_entry_fn@l(9)
+
+ bl grub_main
+1: b 1b
diff --git a/grub-core/kern/rescue_parser.c b/grub-core/kern/rescue_parser.c
new file mode 100644
index 0000000..9c85ba6
--- /dev/null
+++ b/grub-core/kern/rescue_parser.c
@@ -0,0 +1,76 @@
+/* rescue_parser.c - rescue mode parser */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/parser.h>
+#include <grub/misc.h>
+#include <grub/command.h>
+
+grub_err_t
+grub_rescue_parse_line (char *line, grub_reader_getline_t getline)
+{
+ char *name;
+ int n;
+ grub_command_t cmd;
+ char **args;
+
+ if (grub_parser_split_cmdline (line, getline, &n, &args) || n < 0)
+ return grub_errno;
+
+ if (n == 0)
+ return GRUB_ERR_NONE;
+
+ /* In case of an assignment set the environment accordingly
+ instead of calling a function. */
+ if (n == 1 && grub_strchr (line, '='))
+ {
+ char *val = grub_strchr (args[0], '=');
+ val[0] = 0;
+ grub_env_set (args[0], val + 1);
+ val[0] = '=';
+ goto quit;
+ }
+
+ /* Get the command name. */
+ name = args[0];
+
+ /* If nothing is specified, restart. */
+ if (*name == '\0')
+ goto quit;
+
+ cmd = grub_command_find (name);
+ if (cmd)
+ {
+ (cmd->func) (cmd, n - 1, &args[1]);
+ }
+ else
+ {
+ grub_printf ("Unknown command `%s'\n", name);
+ if (grub_command_find ("help"))
+ grub_printf ("Try `help' for usage\n");
+ }
+
+ quit:
+ grub_free (args[0]);
+ grub_free (args);
+
+ return grub_errno;
+}
diff --git a/grub-core/kern/rescue_reader.c b/grub-core/kern/rescue_reader.c
new file mode 100644
index 0000000..a810085
--- /dev/null
+++ b/grub-core/kern/rescue_reader.c
@@ -0,0 +1,97 @@
+/* rescue_reader.c - rescue mode reader */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/reader.h>
+#include <grub/parser.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/mm.h>
+
+#define GRUB_RESCUE_BUF_SIZE 256
+
+static char linebuf[GRUB_RESCUE_BUF_SIZE];
+
+/* Prompt to input a command and read the line. */
+static grub_err_t
+grub_rescue_read_line (char **line, int cont)
+{
+ int c;
+ int pos = 0;
+ char str[4];
+
+ grub_printf ((cont) ? "> " : "grub rescue> ");
+ grub_memset (linebuf, 0, GRUB_RESCUE_BUF_SIZE);
+
+ while ((c = grub_getkey ()) != '\n' && c != '\r')
+ {
+ if (grub_isprint (c))
+ {
+ if (pos < GRUB_RESCUE_BUF_SIZE - 1)
+ {
+ str[0] = c;
+ str[1] = 0;
+ linebuf[pos++] = c;
+ grub_xputs (str);
+ }
+ }
+ else if (c == '\b')
+ {
+ if (pos > 0)
+ {
+ str[0] = c;
+ str[1] = ' ';
+ str[2] = c;
+ str[3] = 0;
+ linebuf[--pos] = 0;
+ grub_xputs (str);
+ }
+ }
+ grub_refresh ();
+ }
+
+ grub_xputs ("\n");
+ grub_refresh ();
+
+ *line = grub_strdup (linebuf);
+
+ return 0;
+}
+
+void
+grub_rescue_run (void)
+{
+ grub_printf ("Entering rescue mode...\n");
+
+ while (1)
+ {
+ char *line;
+
+ /* Print an error, if any. */
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_rescue_read_line (&line, 0);
+ if (! line || line[0] == '\0')
+ continue;
+
+ grub_rescue_parse_line (line, grub_rescue_read_line);
+ grub_free (line);
+ }
+}
diff --git a/grub-core/kern/sparc64/cache.S b/grub-core/kern/sparc64/cache.S
new file mode 100644
index 0000000..1a16add
--- /dev/null
+++ b/grub-core/kern/sparc64/cache.S
@@ -0,0 +1,41 @@
+/* cache.S - Flush the processor cache for a specific region. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+
+ .file "cache.S"
+
+ .text
+
+/*
+ * void grub_arch_sync_caches (void *address, grub_size_t len)
+ */
+FUNCTION(grub_arch_sync_caches)
+ brz,pn %o1, 2f
+ add %o0, %o1, %o1
+ add %o1, 7, %o1
+ andn %o1, 7, %o1
+ andn %o0, 7, %o0
+ sub %o1, %o0, %o1
+1: subcc %o1, 8, %o1
+ bne,pt %icc, 1b
+ flush %o0 + %o1
+2: retl
+ nop
+
diff --git a/grub-core/kern/sparc64/dl.c b/grub-core/kern/sparc64/dl.c
new file mode 100644
index 0000000..7b6266c
--- /dev/null
+++ b/grub-core/kern/sparc64/dl.c
@@ -0,0 +1,142 @@
+/* dl.c - arch-dependent part of loadable module support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/elf.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+
+/* Check if EHDR is a valid ELF header. */
+grub_err_t
+grub_arch_dl_check_header (void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+
+ /* Check the magic numbers. */
+ if (e->e_ident[EI_CLASS] != ELFCLASS64
+ || e->e_ident[EI_DATA] != ELFDATA2MSB
+ || e->e_machine != EM_SPARCV9)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch specific ELF magic");
+
+ return GRUB_ERR_NONE;
+}
+
+
+/* Relocate symbols. */
+grub_err_t
+grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
+{
+ Elf_Ehdr *e = ehdr;
+ Elf_Shdr *s;
+ Elf_Word entsize;
+ unsigned i;
+
+ /* Find a symbol table. */
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no symtab found");
+
+ entsize = s->sh_entsize;
+
+ for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_RELA)
+ {
+ grub_dl_segment_t seg;
+
+ /* Find the target segment. */
+ for (seg = mod->segment; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf_Rela *rel, *max;
+
+ for (rel = (Elf_Rela *) ((char *) e + s->sh_offset),
+ max = rel + s->sh_size / s->sh_entsize;
+ rel < max;
+ rel++)
+ {
+ Elf_Word *addr;
+ Elf_Sym *sym;
+ Elf_Addr value;
+
+ if (seg->size < rel->r_offset)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "reloc offset is out of the segment");
+
+ addr = (Elf_Word *) ((char *) seg->addr + rel->r_offset);
+ sym = (Elf_Sym *) ((char *) mod->symtab
+ + entsize * ELF_R_SYM (rel->r_info));
+
+ value = sym->st_value + rel->r_addend;
+ switch (ELF_R_TYPE (rel->r_info) & 0xff)
+ {
+ case R_SPARC_32: /* 3 V-word32 */
+ if (value & 0xFFFFFFFF00000000)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "address out of 32 bits range");
+ *addr = value;
+ break;
+ case R_SPARC_WDISP30: /* 7 V-disp30 */
+ if (((value - (Elf_Addr) addr) & 0xFFFFFFFF00000000) &&
+ (((value - (Elf_Addr) addr) & 0xFFFFFFFF00000000)
+ != 0xFFFFFFFF00000000))
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "displacement out of 30 bits range");
+ *addr = (*addr & 0xC0000000) |
+ (((grub_int32_t) ((value - (Elf_Addr) addr) >> 2)) &
+ 0x3FFFFFFF);
+ break;
+ case R_SPARC_HI22: /* 9 V-imm22 */
+ if (((grub_int32_t) value) & 0xFF00000000)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "high address out of 22 bits range");
+ *addr = (*addr & 0xFFC00000) | ((value >> 10) & 0x3FFFFF);
+ break;
+ case R_SPARC_LO10: /* 12 T-simm13 */
+ *addr = (*addr & 0xFFFFFC00) | (value & 0x3FF);
+ break;
+ case R_SPARC_64: /* 32 V-xwords64 */
+ *(Elf_Xword *) addr = value;
+ break;
+ case R_SPARC_OLO10:
+ *addr = (*addr & ~0x1fff)
+ | (((value & 0x3ff) +
+ (ELF_R_TYPE (rel->r_info) >> 8))
+ & 0x1fff);
+ break;
+ default:
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "this relocation (%d) is not implemented yet",
+ ELF_R_TYPE (rel->r_info));
+ }
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/kern/sparc64/ieee1275/crt0.S b/grub-core/kern/sparc64/ieee1275/crt0.S
new file mode 100644
index 0000000..cebdca2
--- /dev/null
+++ b/grub-core/kern/sparc64/ieee1275/crt0.S
@@ -0,0 +1,94 @@
+/* crt0.S - Startup code for the Sparc64. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <grub/symbol.h>
+#include <grub/machine/kernel.h>
+#include <grub/offsets.h>
+
+ .text
+ .align 4
+ .globl _start
+_start:
+ ba codestart
+ mov %o4, %o0
+
+ . = EXT_C(_start) + GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE
+
+VARIABLE(grub_total_module_size)
+ .word 0
+VARIABLE(grub_kernel_image_size)
+ .word 0
+VARIABLE(grub_compressed_size)
+ .word 0
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = EXT_C(_start) + GRUB_KERNEL_MACHINE_PREFIX_END
+
+codestart:
+ /* Copy the modules past the end of the kernel image.
+ * They are currently sitting in the BSS.
+ */
+ sethi %hi(__bss_start), %o2
+ or %o2, %lo(__bss_start), %o2
+ sethi %hi(_end), %o3
+ or %o3, %lo(_end), %o3
+ sethi %hi(grub_total_module_size), %o4
+ lduw [%o4 + %lo(grub_total_module_size)], %o4
+
+ add %o2, %o4, %o2
+ add %o3, %o4, %o3
+
+ /* Save ieee1275 stack for future use by booter. */
+ mov %o6, %o1
+ /* Our future stack. */
+ sethi %hi(GRUB_KERNEL_MACHINE_STACK_SIZE), %o5
+ or %o5, %lo(GRUB_KERNEL_MACHINE_STACK_SIZE), %o5
+ add %o3, %o5, %o6
+ and %o6, ~0xff, %o6
+ sub %o6, 2047, %o6
+
+ sub %o2, 4, %o2
+ sub %o3, 4, %o3
+1: lduw [%o2], %o5
+ stw %o5, [%o3]
+ subcc %o4, 4, %o4
+ sub %o2, 4, %o2
+ bne,pt %icc, 1b
+ sub %o3, 4, %o3
+
+ /* Now it's safe to clear out the BSS. */
+ sethi %hi(__bss_start), %o2
+ or %o2, %lo(__bss_start), %o2
+ sethi %hi(_end), %o3
+ or %o3, %lo(_end), %o3
+1: stx %g0, [%o2]
+ add %o2, 8, %o2
+ cmp %o2, %o3
+ blt,pt %xcc, 1b
+ nop
+ sethi %hi(grub_ieee1275_original_stack), %o2
+ stx %o1, [%o2 + %lo(grub_ieee1275_original_stack)]
+ sethi %hi(grub_ieee1275_entry_fn), %o2
+ call grub_main
+ stx %o0, [%o2 + %lo(grub_ieee1275_entry_fn)]
+1: ba,a 1b
diff --git a/grub-core/kern/sparc64/ieee1275/ieee1275.c b/grub-core/kern/sparc64/ieee1275/ieee1275.c
new file mode 100644
index 0000000..53be692
--- /dev/null
+++ b/grub-core/kern/sparc64/ieee1275/ieee1275.c
@@ -0,0 +1,91 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/types.h>
+
+/* Sun specific ieee1275 interfaces used by GRUB. */
+
+int
+grub_ieee1275_claim_vaddr (grub_addr_t vaddr, grub_size_t size)
+{
+ struct claim_vaddr_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t align;
+ grub_ieee1275_cell_t size;
+ grub_ieee1275_cell_t virt;
+ grub_ieee1275_cell_t catch_result;
+ }
+ args;
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 5, 2);
+ args.method = (grub_ieee1275_cell_t) "claim";
+ args.ihandle = grub_ieee1275_mmu;
+ args.align = 0;
+ args.size = size;
+ args.virt = vaddr;
+ args.catch_result = (grub_ieee1275_cell_t) -1;
+
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+ return args.catch_result;
+}
+
+int
+grub_ieee1275_alloc_physmem (grub_addr_t *paddr, grub_size_t size,
+ grub_uint32_t align)
+{
+ grub_uint32_t memory_ihandle;
+ struct alloc_physmem_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t ihandle;
+ grub_ieee1275_cell_t align;
+ grub_ieee1275_cell_t size;
+ grub_ieee1275_cell_t catch_result;
+ grub_ieee1275_cell_t phys_high;
+ grub_ieee1275_cell_t phys_low;
+ }
+ args;
+ grub_ssize_t actual = 0;
+
+ grub_ieee1275_get_property (grub_ieee1275_chosen, "memory",
+ &memory_ihandle, sizeof (memory_ihandle),
+ &actual);
+ if (actual != sizeof (memory_ihandle))
+ return -1;
+
+ if (!align)
+ align = 1;
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 4, 3);
+ args.method = (grub_ieee1275_cell_t) "claim";
+ args.ihandle = memory_ihandle;
+ args.align = (align ? align : 1);
+ args.size = size;
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ return -1;
+
+ *paddr = args.phys_low;
+
+ return args.catch_result;
+}
diff --git a/grub-core/kern/sparc64/ieee1275/init.c b/grub-core/kern/sparc64/ieee1275/init.c
new file mode 100644
index 0000000..72ee1f1
--- /dev/null
+++ b/grub-core/kern/sparc64/ieee1275/init.c
@@ -0,0 +1,174 @@
+/* init.c -- Initialize GRUB on SPARC64. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/time.h>
+#include <grub/machine/boot.h>
+#include <grub/ieee1275/console.h>
+#include <grub/machine/kernel.h>
+#include <grub/machine/time.h>
+#include <grub/ieee1275/ofdisk.h>
+#include <grub/ieee1275/ieee1275.h>
+
+grub_addr_t grub_ieee1275_original_stack;
+
+void
+grub_exit (void)
+{
+ grub_ieee1275_exit ();
+}
+
+static grub_uint64_t
+ieee1275_get_time_ms (void)
+{
+ grub_uint32_t msecs = 0;
+
+ grub_ieee1275_milliseconds (&msecs);
+
+ return msecs;
+}
+
+grub_uint32_t
+grub_get_rtc (void)
+{
+ return ieee1275_get_time_ms ();
+}
+
+grub_addr_t
+grub_arch_modules_addr (void)
+{
+ extern char _end[];
+ return (grub_addr_t) _end;
+}
+
+void
+grub_machine_set_prefix (void)
+{
+ if (grub_prefix[0] != '(')
+ {
+ char bootpath[IEEE1275_MAX_PATH_LEN];
+ char *prefix, *path, *colon;
+ grub_ssize_t actual;
+
+ if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath",
+ &bootpath, sizeof (bootpath), &actual))
+ {
+ /* Should never happen. */
+ grub_printf ("/chosen/bootpath property missing!\n");
+ grub_env_set ("prefix", "");
+ return;
+ }
+
+ /* Transform an OF device path to a GRUB path. */
+ colon = grub_strchr (bootpath, ':');
+ if (colon)
+ {
+ char *part = colon + 1;
+
+ /* Consistently provide numbered partitions to GRUB.
+ OpenBOOT traditionally uses alphabetical partition
+ specifiers. */
+ if (part[0] >= 'a' && part[0] <= 'z')
+ part[0] = '1' + (part[0] - 'a');
+ }
+ prefix = grub_ieee1275_encode_devname (bootpath);
+
+ path = grub_xasprintf("%s%s", prefix, grub_prefix);
+
+ grub_strcpy (grub_prefix, path);
+
+ grub_free (path);
+ grub_free (prefix);
+ }
+
+ grub_env_set ("prefix", grub_prefix);
+}
+
+static void
+grub_heap_init (void)
+{
+ grub_mm_init_region ((void *) (grub_modules_get_end ()
+ + GRUB_KERNEL_MACHINE_STACK_SIZE), 0x200000);
+}
+
+static void
+grub_parse_cmdline (void)
+{
+ grub_ssize_t actual;
+ char args[256];
+
+ if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootargs", &args,
+ sizeof args, &actual) == 0
+ && actual > 1)
+ {
+ int i = 0;
+
+ while (i < actual)
+ {
+ char *command = &args[i];
+ char *end;
+ char *val;
+
+ end = grub_strchr (command, ';');
+ if (end == 0)
+ i = actual; /* No more commands after this one. */
+ else
+ {
+ *end = '\0';
+ i += end - command + 1;
+ while (grub_isspace(args[i]))
+ i++;
+ }
+
+ /* Process command. */
+ val = grub_strchr (command, '=');
+ if (val)
+ {
+ *val = '\0';
+ grub_env_set (command, val + 1);
+ }
+ }
+ }
+}
+
+void
+grub_machine_init (void)
+{
+ grub_ieee1275_init ();
+ grub_console_init_early ();
+ grub_heap_init ();
+ grub_console_init_lately ();
+
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_PARTITION_0);
+ grub_ofdisk_init ();
+
+ grub_parse_cmdline ();
+ grub_install_get_time_ms (ieee1275_get_time_ms);
+}
+
+void
+grub_machine_fini (void)
+{
+ grub_ofdisk_fini ();
+ grub_console_fini ();
+}
diff --git a/grub-core/kern/term.c b/grub-core/kern/term.c
new file mode 100644
index 0000000..7b35931
--- /dev/null
+++ b/grub-core/kern/term.c
@@ -0,0 +1,130 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/term.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/time.h>
+
+struct grub_term_output *grub_term_outputs_disabled;
+struct grub_term_input *grub_term_inputs_disabled;
+struct grub_term_output *grub_term_outputs;
+struct grub_term_input *grub_term_inputs;
+
+void (*grub_term_poll_usb) (void) = NULL;
+
+/* Put a Unicode character. */
+static void
+grub_putcode_dumb (grub_uint32_t code,
+ struct grub_term_output *term)
+{
+ struct grub_unicode_glyph c =
+ {
+ .base = code,
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0,
+ .estimated_width = 1
+ };
+
+ if (code == '\t' && term->getxy)
+ {
+ int n;
+
+ n = 8 - ((term->getxy (term) >> 8) & 7);
+ while (n--)
+ grub_putcode_dumb (' ', term);
+
+ return;
+ }
+
+ (term->putchar) (term, &c);
+ if (code == '\n')
+ grub_putcode_dumb ('\r', term);
+}
+
+static void
+grub_xputs_dumb (const char *str)
+{
+ for (; *str; str++)
+ {
+ grub_term_output_t term;
+ grub_uint32_t code = *str;
+ if (code > 0x7f)
+ code = '?';
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ grub_putcode_dumb (code, term);
+ }
+}
+
+void (*grub_xputs) (const char *str) = grub_xputs_dumb;
+
+static int pending_key = GRUB_TERM_NO_KEY;
+
+int
+grub_checkkey (void)
+{
+ grub_term_input_t term;
+
+ if (pending_key != GRUB_TERM_NO_KEY)
+ return pending_key;
+
+ if (grub_term_poll_usb)
+ grub_term_poll_usb ();
+
+ FOR_ACTIVE_TERM_INPUTS(term)
+ {
+ pending_key = term->getkey (term);
+ if (pending_key != GRUB_TERM_NO_KEY)
+ return pending_key;
+ }
+
+ return -1;
+}
+
+int
+grub_getkey (void)
+{
+ int ret;
+
+ grub_refresh ();
+
+ grub_checkkey ();
+ while (pending_key == GRUB_TERM_NO_KEY)
+ {
+ grub_cpu_idle ();
+ grub_checkkey ();
+ }
+ ret = pending_key;
+ pending_key = GRUB_TERM_NO_KEY;
+ return ret;
+}
+
+
+void
+grub_refresh (void)
+{
+ struct grub_term_output *term;
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ grub_term_refresh (term);
+}
diff --git a/grub-core/kern/time.c b/grub-core/kern/time.c
new file mode 100644
index 0000000..6521ec6
--- /dev/null
+++ b/grub-core/kern/time.c
@@ -0,0 +1,37 @@
+/* time.c - kernel time functions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/time.h>
+
+typedef grub_uint64_t (*get_time_ms_func_t) (void);
+
+/* Function pointer to the implementation in use. */
+static get_time_ms_func_t get_time_ms_func;
+
+grub_uint64_t
+grub_get_time_ms (void)
+{
+ return get_time_ms_func ();
+}
+
+void
+grub_install_get_time_ms (get_time_ms_func_t func)
+{
+ get_time_ms_func = func;
+}
diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
new file mode 100644
index 0000000..090ad78
--- /dev/null
+++ b/grub-core/kern/x86_64/dl.c
@@ -0,0 +1,119 @@
+/* dl-x86_64.c - arch-dependent part of loadable module support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/elf.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+
+/* Check if EHDR is a valid ELF header. */
+grub_err_t
+grub_arch_dl_check_header (void *ehdr)
+{
+ Elf64_Ehdr *e = ehdr;
+
+ /* Check the magic numbers. */
+ if (e->e_ident[EI_CLASS] != ELFCLASS64
+ || e->e_ident[EI_DATA] != ELFDATA2LSB
+ || e->e_machine != EM_X86_64)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch specific ELF magic");
+
+ return GRUB_ERR_NONE;
+}
+
+/* Relocate symbols. */
+grub_err_t
+grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
+{
+ Elf64_Ehdr *e = ehdr;
+ Elf64_Shdr *s;
+ Elf64_Word entsize;
+ unsigned i;
+
+ /* Find a symbol table. */
+ for (i = 0, s = (Elf64_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf64_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+
+ if (i == e->e_shnum)
+ return grub_error (GRUB_ERR_BAD_MODULE, "no symtab found");
+
+ entsize = s->sh_entsize;
+
+ for (i = 0, s = (Elf64_Shdr *) ((char *) e + e->e_shoff);
+ i < e->e_shnum;
+ i++, s = (Elf64_Shdr *) ((char *) s + e->e_shentsize))
+ if (s->sh_type == SHT_RELA)
+ {
+ grub_dl_segment_t seg;
+
+ /* Find the target segment. */
+ for (seg = mod->segment; seg; seg = seg->next)
+ if (seg->section == s->sh_info)
+ break;
+
+ if (seg)
+ {
+ Elf64_Rela *rel, *max;
+
+ for (rel = (Elf64_Rela *) ((char *) e + s->sh_offset),
+ max = rel + s->sh_size / s->sh_entsize;
+ rel < max;
+ rel++)
+ {
+ Elf64_Word *addr32;
+ Elf64_Xword *addr64;
+ Elf64_Sym *sym;
+
+ if (seg->size < rel->r_offset)
+ return grub_error (GRUB_ERR_BAD_MODULE,
+ "reloc offset is out of the segment");
+
+ addr32 = (Elf64_Word *) ((char *) seg->addr + rel->r_offset);
+ addr64 = (Elf64_Xword *) addr32;
+ sym = (Elf64_Sym *) ((char *) mod->symtab
+ + entsize * ELF_R_SYM (rel->r_info));
+
+ switch (ELF_R_TYPE (rel->r_info))
+ {
+ case R_X86_64_64:
+ *addr64 += rel->r_addend + sym->st_value;
+ break;
+
+ case R_X86_64_PC32:
+ *addr32 += rel->r_addend + sym->st_value -
+ (Elf64_Xword) seg->addr - rel->r_offset;
+ break;
+
+ case R_X86_64_32:
+ case R_X86_64_32S:
+ *addr32 += rel->r_addend + sym->st_value;
+ break;
+
+ default:
+ grub_fatal ("Unrecognized relocation: %d\n", ELF_R_TYPE (rel->r_info));
+ }
+ }
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/kern/x86_64/efi/callwrap.S b/grub-core/kern/x86_64/efi/callwrap.S
new file mode 100644
index 0000000..aae2678
--- /dev/null
+++ b/grub-core/kern/x86_64/efi/callwrap.S
@@ -0,0 +1,116 @@
+/* callwrap.S - wrapper for x86_64 efi calls */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/symbol.h>
+#include <grub/boot.h>
+
+/*
+ * x86_64 uses registry to pass parameters. Unfortunately, gcc and efi use
+ * different call conversion, so we need to do some conversion.
+ *
+ * gcc:
+ * %rdi, %esi, %rdx, %rcx, %r8, %r9, 8(%rsp), 16(%rsp), ...
+ *
+ * efi:
+ * %rcx, %rdx, %r8, %r9, 32(%rsp), 40(%rsp), 48(%rsp), ...
+ *
+ */
+
+ .file "callwrap.S"
+ .text
+
+FUNCTION(efi_wrap_0)
+ subq $48, %rsp
+ call *%rdi
+ addq $48, %rsp
+ ret
+
+FUNCTION(efi_wrap_1)
+ subq $48, %rsp
+ mov %rsi, %rcx
+ call *%rdi
+ addq $48, %rsp
+ ret
+
+FUNCTION(efi_wrap_2)
+ subq $48, %rsp
+ mov %rsi, %rcx
+ call *%rdi
+ addq $48, %rsp
+ ret
+
+FUNCTION(efi_wrap_3)
+ subq $48, %rsp
+ mov %rcx, %r8
+ mov %rsi, %rcx
+ call *%rdi
+ addq $48, %rsp
+ ret
+
+FUNCTION(efi_wrap_4)
+ subq $48, %rsp
+ mov %r8, %r9
+ mov %rcx, %r8
+ mov %rsi, %rcx
+ call *%rdi
+ addq $48, %rsp
+ ret
+
+FUNCTION(efi_wrap_5)
+ subq $48, %rsp
+ mov %r9, 32(%rsp)
+ mov %r8, %r9
+ mov %rcx, %r8
+ mov %rsi, %rcx
+ call *%rdi
+ addq $48, %rsp
+ ret
+
+FUNCTION(efi_wrap_6)
+ subq $64, %rsp
+ mov 64+8(%rsp), %rax
+ mov %rax, 40(%rsp)
+ mov %r9, 32(%rsp)
+ mov %r8, %r9
+ mov %rcx, %r8
+ mov %rsi, %rcx
+ call *%rdi
+ addq $64, %rsp
+ ret
+
+FUNCTION(efi_wrap_10)
+ subq $96, %rsp
+ mov 96+40(%rsp), %rax
+ mov %rax, 72(%rsp)
+ mov 96+32(%rsp), %rax
+ mov %rax, 64(%rsp)
+ mov 96+24(%rsp), %rax
+ mov %rax, 56(%rsp)
+ mov 96+16(%rsp), %rax
+ mov %rax, 48(%rsp)
+ mov 96+8(%rsp), %rax
+ mov %rax, 40(%rsp)
+ mov %r9, 32(%rsp)
+ mov %r8, %r9
+ mov %rcx, %r8
+ mov %rsi, %rcx
+ call *%rdi
+ addq $96, %rsp
+ ret
diff --git a/grub-core/kern/x86_64/efi/startup.S b/grub-core/kern/x86_64/efi/startup.S
new file mode 100644
index 0000000..fb4fc7b
--- /dev/null
+++ b/grub-core/kern/x86_64/efi/startup.S
@@ -0,0 +1,63 @@
+/* startup.S - bootstrap GRUB itself */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/symbol.h>
+#include <grub/boot.h>
+
+ .file "startup.S"
+ .text
+ .globl start, _start
+ .code64
+
+start:
+_start:
+ jmp codestart
+
+ /*
+ * Compatibility version number
+ *
+ * These MUST be at byte offset 6 and 7 of the executable
+ * DO NOT MOVE !!!
+ */
+ . = _start + 0x6
+ .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
+
+ /*
+ * This is a special data area 8 bytes from the beginning.
+ */
+
+ . = _start + 0x8
+
+VARIABLE(grub_prefix)
+ /* to be filled by grub-mkimage */
+
+ /*
+ * Leave some breathing room for the prefix.
+ */
+
+ . = _start + 0x50
+
+codestart:
+ movq %rcx, EXT_C(grub_efi_image_handle)(%rip)
+ movq %rdx, EXT_C(grub_efi_system_table)(%rip)
+
+ call EXT_C(grub_main)
+ ret
+
diff --git a/grub-core/lib/LzFind.c b/grub-core/lib/LzFind.c
new file mode 100644
index 0000000..d2bb15c
--- /dev/null
+++ b/grub-core/lib/LzFind.c
@@ -0,0 +1,777 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (c) 1999-2008 Igor Pavlov
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This code was taken from LZMA SDK 4.58 beta, and was slightly modified
+ * to adapt it to GRUB's requirement.
+ *
+ * See <http://www.7-zip.org>, for more information about LZMA.
+ */
+
+
+#include <config.h>
+
+#include <string.h>
+
+#include <grub/lib/LzFind.h>
+#include <grub/lib/LzHash.h>
+
+#define kEmptyHashValue 0
+#define kMaxValForNormalize ((UInt32)0xFFFFFFFF)
+#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */
+#define kNormalizeMask (~(kNormalizeStepMin - 1))
+#define kMaxHistorySize ((UInt32)3 << 30)
+
+#define kStartMaxLen 3
+
+static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc)
+{
+ if (!p->directInput)
+ {
+ alloc->Free(alloc, p->bufferBase);
+ p->bufferBase = 0;
+ }
+}
+
+/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */
+
+static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc)
+{
+ UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv;
+ if (p->directInput)
+ {
+ p->blockSize = blockSize;
+ return 1;
+ }
+ if (p->bufferBase == 0 || p->blockSize != blockSize)
+ {
+ LzInWindow_Free(p, alloc);
+ p->blockSize = blockSize;
+ p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize);
+ }
+ return (p->bufferBase != 0);
+}
+
+Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
+Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
+
+UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
+
+void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
+{
+ p->posLimit -= subValue;
+ p->pos -= subValue;
+ p->streamPos -= subValue;
+}
+
+static void MatchFinder_ReadBlock(CMatchFinder *p)
+{
+ if (p->streamEndWasReached || p->result != SZ_OK)
+ return;
+ for (;;)
+ {
+ Byte *dest = p->buffer + (p->streamPos - p->pos);
+ size_t size = (p->bufferBase + p->blockSize - dest);
+ if (size == 0)
+ return;
+ p->result = p->stream->Read(p->stream, dest, &size);
+ if (p->result != SZ_OK)
+ return;
+ if (size == 0)
+ {
+ p->streamEndWasReached = 1;
+ return;
+ }
+ p->streamPos += (UInt32)size;
+ if (p->streamPos - p->pos > p->keepSizeAfter)
+ return;
+ }
+}
+
+void MatchFinder_MoveBlock(CMatchFinder *p)
+{
+ memmove(p->bufferBase,
+ p->buffer - p->keepSizeBefore,
+ (size_t)(p->streamPos - p->pos + p->keepSizeBefore));
+ p->buffer = p->bufferBase + p->keepSizeBefore;
+}
+
+int MatchFinder_NeedMove(CMatchFinder *p)
+{
+ /* if (p->streamEndWasReached) return 0; */
+ return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
+}
+
+void MatchFinder_ReadIfRequired(CMatchFinder *p)
+{
+ if (p->streamEndWasReached)
+ return;
+ if (p->keepSizeAfter >= p->streamPos - p->pos)
+ MatchFinder_ReadBlock(p);
+}
+
+static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
+{
+ if (MatchFinder_NeedMove(p))
+ MatchFinder_MoveBlock(p);
+ MatchFinder_ReadBlock(p);
+}
+
+static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
+{
+ p->cutValue = 32;
+ p->btMode = 1;
+ p->numHashBytes = 4;
+ /* p->skipModeBits = 0; */
+ p->directInput = 0;
+ p->bigHash = 0;
+}
+
+#define kCrcPoly 0xEDB88320
+
+void MatchFinder_Construct(CMatchFinder *p)
+{
+ UInt32 i;
+ p->bufferBase = 0;
+ p->directInput = 0;
+ p->hash = 0;
+ MatchFinder_SetDefaultSettings(p);
+
+ for (i = 0; i < 256; i++)
+ {
+ UInt32 r = i;
+ int j;
+ for (j = 0; j < 8; j++)
+ r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
+ p->crc[i] = r;
+ }
+}
+
+static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->hash);
+ p->hash = 0;
+}
+
+void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc)
+{
+ MatchFinder_FreeThisClassMemory(p, alloc);
+ LzInWindow_Free(p, alloc);
+}
+
+static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc)
+{
+ size_t sizeInBytes = (size_t)num * sizeof(CLzRef);
+ if (sizeInBytes / sizeof(CLzRef) != num)
+ return 0;
+ return (CLzRef *)alloc->Alloc(alloc, sizeInBytes);
+}
+
+int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
+ UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
+ ISzAlloc *alloc)
+{
+ UInt32 sizeReserv;
+ if (historySize > kMaxHistorySize)
+ {
+ MatchFinder_Free(p, alloc);
+ return 0;
+ }
+ sizeReserv = historySize >> 1;
+ if (historySize > ((UInt32)2 << 30))
+ sizeReserv = historySize >> 2;
+ sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);
+
+ p->keepSizeBefore = historySize + keepAddBufferBefore + 1;
+ p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;
+ /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */
+ if (LzInWindow_Create(p, sizeReserv, alloc))
+ {
+ UInt32 newCyclicBufferSize = (historySize /* >> p->skipModeBits */) + 1;
+ UInt32 hs;
+ p->matchMaxLen = matchMaxLen;
+ {
+ p->fixedHashSize = 0;
+ if (p->numHashBytes == 2)
+ hs = (1 << 16) - 1;
+ else
+ {
+ hs = historySize - 1;
+ hs |= (hs >> 1);
+ hs |= (hs >> 2);
+ hs |= (hs >> 4);
+ hs |= (hs >> 8);
+ hs >>= 1;
+ /* hs >>= p->skipModeBits; */
+ hs |= 0xFFFF; /* don't change it! It's required for Deflate */
+ if (hs > (1 << 24))
+ {
+ if (p->numHashBytes == 3)
+ hs = (1 << 24) - 1;
+ else
+ hs >>= 1;
+ }
+ }
+ p->hashMask = hs;
+ hs++;
+ if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size;
+ if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size;
+ if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size;
+ hs += p->fixedHashSize;
+ }
+
+ {
+ UInt32 prevSize = p->hashSizeSum + p->numSons;
+ UInt32 newSize;
+ p->historySize = historySize;
+ p->hashSizeSum = hs;
+ p->cyclicBufferSize = newCyclicBufferSize;
+ p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize);
+ newSize = p->hashSizeSum + p->numSons;
+ if (p->hash != 0 && prevSize == newSize)
+ return 1;
+ MatchFinder_FreeThisClassMemory(p, alloc);
+ p->hash = AllocRefs(newSize, alloc);
+ if (p->hash != 0)
+ {
+ p->son = p->hash + p->hashSizeSum;
+ return 1;
+ }
+ }
+ }
+ MatchFinder_Free(p, alloc);
+ return 0;
+}
+
+static void MatchFinder_SetLimits(CMatchFinder *p)
+{
+ UInt32 limit = kMaxValForNormalize - p->pos;
+ UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;
+ if (limit2 < limit)
+ limit = limit2;
+ limit2 = p->streamPos - p->pos;
+ if (limit2 <= p->keepSizeAfter)
+ {
+ if (limit2 > 0)
+ limit2 = 1;
+ }
+ else
+ limit2 -= p->keepSizeAfter;
+ if (limit2 < limit)
+ limit = limit2;
+ {
+ UInt32 lenLimit = p->streamPos - p->pos;
+ if (lenLimit > p->matchMaxLen)
+ lenLimit = p->matchMaxLen;
+ p->lenLimit = lenLimit;
+ }
+ p->posLimit = p->pos + limit;
+}
+
+void MatchFinder_Init(CMatchFinder *p)
+{
+ UInt32 i;
+ for(i = 0; i < p->hashSizeSum; i++)
+ p->hash[i] = kEmptyHashValue;
+ p->cyclicBufferPos = 0;
+ p->buffer = p->bufferBase;
+ p->pos = p->streamPos = p->cyclicBufferSize;
+ p->result = SZ_OK;
+ p->streamEndWasReached = 0;
+ MatchFinder_ReadBlock(p);
+ MatchFinder_SetLimits(p);
+}
+
+static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
+{
+ return (p->pos - p->historySize - 1) & kNormalizeMask;
+}
+
+void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
+{
+ UInt32 i;
+ for (i = 0; i < numItems; i++)
+ {
+ UInt32 value = items[i];
+ if (value <= subValue)
+ value = kEmptyHashValue;
+ else
+ value -= subValue;
+ items[i] = value;
+ }
+}
+
+static void MatchFinder_Normalize(CMatchFinder *p)
+{
+ UInt32 subValue = MatchFinder_GetSubValue(p);
+ MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons);
+ MatchFinder_ReduceOffsets(p, subValue);
+}
+
+static void MatchFinder_CheckLimits(CMatchFinder *p)
+{
+ if (p->pos == kMaxValForNormalize)
+ MatchFinder_Normalize(p);
+ if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos)
+ MatchFinder_CheckAndMoveAndRead(p);
+ if (p->cyclicBufferPos == p->cyclicBufferSize)
+ p->cyclicBufferPos = 0;
+ MatchFinder_SetLimits(p);
+}
+
+static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
+ UInt32 *distances, UInt32 maxLen)
+{
+ son[_cyclicBufferPos] = curMatch;
+ for (;;)
+ {
+ UInt32 delta = pos - curMatch;
+ if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+ return distances;
+ {
+ const Byte *pb = cur - delta;
+ curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
+ if (pb[maxLen] == cur[maxLen] && *pb == *cur)
+ {
+ UInt32 len = 0;
+ while(++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ if (maxLen < len)
+ {
+ *distances++ = maxLen = len;
+ *distances++ = delta - 1;
+ if (len == lenLimit)
+ return distances;
+ }
+ }
+ }
+ }
+}
+
+UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
+ UInt32 *distances, UInt32 maxLen)
+{
+ CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
+ CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
+ UInt32 len0 = 0, len1 = 0;
+ for (;;)
+ {
+ UInt32 delta = pos - curMatch;
+ if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+ {
+ *ptr0 = *ptr1 = kEmptyHashValue;
+ return distances;
+ }
+ {
+ CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
+ const Byte *pb = cur - delta;
+ UInt32 len = (len0 < len1 ? len0 : len1);
+ if (pb[len] == cur[len])
+ {
+ if (++len != lenLimit && pb[len] == cur[len])
+ while(++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ if (maxLen < len)
+ {
+ *distances++ = maxLen = len;
+ *distances++ = delta - 1;
+ if (len == lenLimit)
+ {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ return distances;
+ }
+ }
+ }
+ if (pb[len] < cur[len])
+ {
+ *ptr1 = curMatch;
+ ptr1 = pair + 1;
+ curMatch = *ptr1;
+ len1 = len;
+ }
+ else
+ {
+ *ptr0 = curMatch;
+ ptr0 = pair;
+ curMatch = *ptr0;
+ len0 = len;
+ }
+ }
+ }
+}
+
+static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
+ UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue)
+{
+ CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
+ CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
+ UInt32 len0 = 0, len1 = 0;
+ for (;;)
+ {
+ UInt32 delta = pos - curMatch;
+ if (cutValue-- == 0 || delta >= _cyclicBufferSize)
+ {
+ *ptr0 = *ptr1 = kEmptyHashValue;
+ return;
+ }
+ {
+ CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
+ const Byte *pb = cur - delta;
+ UInt32 len = (len0 < len1 ? len0 : len1);
+ if (pb[len] == cur[len])
+ {
+ while(++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ {
+ if (len == lenLimit)
+ {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ return;
+ }
+ }
+ }
+ if (pb[len] < cur[len])
+ {
+ *ptr1 = curMatch;
+ ptr1 = pair + 1;
+ curMatch = *ptr1;
+ len1 = len;
+ }
+ else
+ {
+ *ptr0 = curMatch;
+ ptr0 = pair;
+ curMatch = *ptr0;
+ len0 = len;
+ }
+ }
+ }
+}
+
+#define MOVE_POS \
+ ++p->cyclicBufferPos; \
+ p->buffer++; \
+ if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);
+
+#define MOVE_POS_RET MOVE_POS return offset;
+
+static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
+
+#define GET_MATCHES_HEADER2(minLen, ret_op) \
+ UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \
+ lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
+ cur = p->buffer;
+
+#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0)
+#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue)
+
+#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue
+
+#define GET_MATCHES_FOOTER(offset, maxLen) \
+ offset = (UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \
+ distances + offset, maxLen) - distances); MOVE_POS_RET;
+
+#define SKIP_FOOTER \
+ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;
+
+static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 offset;
+ GET_MATCHES_HEADER(2)
+ HASH2_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ offset = 0;
+ GET_MATCHES_FOOTER(offset, 1)
+}
+
+UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 offset;
+ GET_MATCHES_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ offset = 0;
+ GET_MATCHES_FOOTER(offset, 2)
+}
+
+static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 hash2Value, delta2, maxLen, offset;
+ GET_MATCHES_HEADER(3)
+
+ HASH3_CALC;
+
+ delta2 = p->pos - p->hash[hash2Value];
+ curMatch = p->hash[kFix3HashSize + hashValue];
+
+ p->hash[hash2Value] =
+ p->hash[kFix3HashSize + hashValue] = p->pos;
+
+
+ maxLen = 2;
+ offset = 0;
+ if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+ {
+ for (; maxLen != lenLimit; maxLen++)
+ if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
+ break;
+ distances[0] = maxLen;
+ distances[1] = delta2 - 1;
+ offset = 2;
+ if (maxLen == lenLimit)
+ {
+ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
+ MOVE_POS_RET;
+ }
+ }
+ GET_MATCHES_FOOTER(offset, maxLen)
+}
+
+static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
+ GET_MATCHES_HEADER(4)
+
+ HASH4_CALC;
+
+ delta2 = p->pos - p->hash[ hash2Value];
+ delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
+ curMatch = p->hash[kFix4HashSize + hashValue];
+
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] =
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+
+ maxLen = 1;
+ offset = 0;
+ if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+ {
+ distances[0] = maxLen = 2;
+ distances[1] = delta2 - 1;
+ offset = 2;
+ }
+ if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
+ {
+ maxLen = 3;
+ distances[offset + 1] = delta3 - 1;
+ offset += 2;
+ delta2 = delta3;
+ }
+ if (offset != 0)
+ {
+ for (; maxLen != lenLimit; maxLen++)
+ if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
+ break;
+ distances[offset - 2] = maxLen;
+ if (maxLen == lenLimit)
+ {
+ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
+ MOVE_POS_RET;
+ }
+ }
+ if (maxLen < 3)
+ maxLen = 3;
+ GET_MATCHES_FOOTER(offset, maxLen)
+}
+
+static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
+ GET_MATCHES_HEADER(4)
+
+ HASH4_CALC;
+
+ delta2 = p->pos - p->hash[ hash2Value];
+ delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
+ curMatch = p->hash[kFix4HashSize + hashValue];
+
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] =
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+
+ maxLen = 1;
+ offset = 0;
+ if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
+ {
+ distances[0] = maxLen = 2;
+ distances[1] = delta2 - 1;
+ offset = 2;
+ }
+ if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
+ {
+ maxLen = 3;
+ distances[offset + 1] = delta3 - 1;
+ offset += 2;
+ delta2 = delta3;
+ }
+ if (offset != 0)
+ {
+ for (; maxLen != lenLimit; maxLen++)
+ if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
+ break;
+ distances[offset - 2] = maxLen;
+ if (maxLen == lenLimit)
+ {
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS_RET;
+ }
+ }
+ if (maxLen < 3)
+ maxLen = 3;
+ offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+ distances + offset, maxLen) - (distances));
+ MOVE_POS_RET
+}
+
+UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
+{
+ UInt32 offset;
+ GET_MATCHES_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
+ distances, 2) - (distances));
+ MOVE_POS_RET
+}
+
+static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ SKIP_HEADER(2)
+ HASH2_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ SKIP_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 hash2Value;
+ SKIP_HEADER(3)
+ HASH3_CALC;
+ curMatch = p->hash[kFix3HashSize + hashValue];
+ p->hash[hash2Value] =
+ p->hash[kFix3HashSize + hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 hash2Value, hash3Value;
+ SKIP_HEADER(4)
+ HASH4_CALC;
+ curMatch = p->hash[kFix4HashSize + hashValue];
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] = p->pos;
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+ SKIP_FOOTER
+ }
+ while (--num != 0);
+}
+
+static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ UInt32 hash2Value, hash3Value;
+ SKIP_HEADER(4)
+ HASH4_CALC;
+ curMatch = p->hash[kFix4HashSize + hashValue];
+ p->hash[ hash2Value] =
+ p->hash[kFix3HashSize + hash3Value] =
+ p->hash[kFix4HashSize + hashValue] = p->pos;
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS
+ }
+ while (--num != 0);
+}
+
+void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
+{
+ do
+ {
+ SKIP_HEADER(3)
+ HASH_ZIP_CALC;
+ curMatch = p->hash[hashValue];
+ p->hash[hashValue] = p->pos;
+ p->son[p->cyclicBufferPos] = curMatch;
+ MOVE_POS
+ }
+ while (--num != 0);
+}
+
+void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
+{
+ vTable->Init = (Mf_Init_Func)MatchFinder_Init;
+ vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte;
+ vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes;
+ vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos;
+ if (!p->btMode)
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip;
+ }
+ else if (p->numHashBytes == 2)
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip;
+ }
+ else if (p->numHashBytes == 3)
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip;
+ }
+ else
+ {
+ vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches;
+ vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
+ }
+}
diff --git a/grub-core/lib/LzmaDec.c b/grub-core/lib/LzmaDec.c
new file mode 100644
index 0000000..62ebee6
--- /dev/null
+++ b/grub-core/lib/LzmaDec.c
@@ -0,0 +1,1035 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (c) 1999-2008 Igor Pavlov
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This code was taken from LZMA SDK 4.58 beta, and was slightly modified
+ * to adapt it to GRUB's requirement.
+ *
+ * See <http://www.7-zip.org>, for more information about LZMA.
+ */
+
+#include <grub/lib/LzmaDec.h>
+
+#include <string.h>
+
+#define kNumTopBits 24
+#define kTopValue ((UInt32)1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+
+#define RC_INIT_SIZE 5
+
+#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }
+
+#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
+#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
+#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
+#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \
+ { UPDATE_0(p); i = (i + i); A0; } else \
+ { UPDATE_1(p); i = (i + i) + 1; A1; }
+#define GET_BIT(p, i) GET_BIT2(p, i, ; , ;)
+
+#define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); }
+#define TREE_DECODE(probs, limit, i) \
+ { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; }
+
+/* #define _LZMA_SIZE_OPT */
+
+#ifdef _LZMA_SIZE_OPT
+#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i)
+#else
+#define TREE_6_DECODE(probs, i) \
+ { i = 1; \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ TREE_GET_BIT(probs, i); \
+ i -= 0x40; }
+#endif
+
+#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
+
+#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
+#define UPDATE_0_CHECK range = bound;
+#define UPDATE_1_CHECK range -= bound; code -= bound;
+#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \
+ { UPDATE_0_CHECK; i = (i + i); A0; } else \
+ { UPDATE_1_CHECK; i = (i + i) + 1; A1; }
+#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;)
+#define TREE_DECODE_CHECK(probs, limit, i) \
+ { i = 1; do { GET_BIT_CHECK(probs + i, i) } while(i < limit); i -= limit; }
+
+
+#define kNumPosBitsMax 4
+#define kNumPosStatesMax (1 << kNumPosBitsMax)
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumMidBits 3
+#define kLenNumMidSymbols (1 << kLenNumMidBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+
+#define LenChoice 0
+#define LenChoice2 (LenChoice + 1)
+#define LenLow (LenChoice2 + 1)
+#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
+#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+
+
+#define kNumStates 12
+#define kNumLitStates 7
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+
+#define kNumPosSlotBits 6
+#define kNumLenToPosStates 4
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+
+#define kMatchMinLen 2
+#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols)
+
+#define IsMatch 0
+#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
+#define IsRepG0 (IsRep + kNumStates)
+#define IsRepG1 (IsRepG0 + kNumStates)
+#define IsRepG2 (IsRepG1 + kNumStates)
+#define IsRep0Long (IsRepG2 + kNumStates)
+#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
+#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
+#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
+#define LenCoder (Align + kAlignTableSize)
+#define RepLenCoder (LenCoder + kNumLenProbs)
+#define Literal (RepLenCoder + kNumLenProbs)
+
+#define LZMA_BASE_SIZE 1846
+#define LZMA_LIT_SIZE 768
+
+#define LzmaProps_GetNumProbs(p) ((UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
+
+#if Literal != LZMA_BASE_SIZE
+StopCompilingDueBUG
+#endif
+
+/*
+#define LZMA_STREAM_WAS_FINISHED_ID (-1)
+#define LZMA_SPEC_LEN_OFFSET (-3)
+*/
+
+Byte kLiteralNextStates[kNumStates * 2] =
+{
+ 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5,
+ 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10
+};
+
+#define LZMA_DIC_MIN (1 << 12)
+
+/* First LZMA-symbol is always decoded.
+And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization
+Out:
+ Result:
+ 0 - OK
+ 1 - Error
+ p->remainLen:
+ < kMatchSpecLenStart : normal remain
+ = kMatchSpecLenStart : finished
+ = kMatchSpecLenStart + 1 : Flush marker
+ = kMatchSpecLenStart + 2 : State Init Marker
+*/
+
+static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
+{
+ CLzmaProb *probs = p->probs;
+
+ unsigned state = p->state;
+ UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3];
+ unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1;
+ unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1;
+ unsigned lc = p->prop.lc;
+
+ Byte *dic = p->dic;
+ SizeT dicBufSize = p->dicBufSize;
+ SizeT dicPos = p->dicPos;
+
+ UInt32 processedPos = p->processedPos;
+ UInt32 checkDicSize = p->checkDicSize;
+ unsigned len = 0;
+
+ const Byte *buf = p->buf;
+ UInt32 range = p->range;
+ UInt32 code = p->code;
+
+ do
+ {
+ CLzmaProb *prob;
+ UInt32 bound;
+ unsigned ttt;
+ unsigned posState = processedPos & pbMask;
+
+ prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
+ IF_BIT_0(prob)
+ {
+ unsigned symbol;
+ UPDATE_0(prob);
+ prob = probs + Literal;
+ if (checkDicSize != 0 || processedPos != 0)
+ prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) +
+ (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc))));
+
+ if (state < kNumLitStates)
+ {
+ symbol = 1;
+ do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
+ }
+ else
+ {
+ unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
+ unsigned offs = 0x100;
+ symbol = 1;
+ do
+ {
+ unsigned bit;
+ CLzmaProb *probLit;
+ matchByte <<= 1;
+ bit = (matchByte & offs);
+ probLit = prob + offs + bit + symbol;
+ GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit)
+ }
+ while (symbol < 0x100);
+ }
+ dic[dicPos++] = (Byte)symbol;
+ processedPos++;
+
+ state = kLiteralNextStates[state];
+ /* if (state < 4) state = 0; else if (state < 10) state -= 3; else state -= 6; */
+ continue;
+ }
+ else
+ {
+ UPDATE_1(prob);
+ prob = probs + IsRep + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ state += kNumStates;
+ prob = probs + LenCoder;
+ }
+ else
+ {
+ UPDATE_1(prob);
+ if (checkDicSize == 0 && processedPos == 0)
+ return SZ_ERROR_DATA;
+ prob = probs + IsRepG0 + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
+ dicPos++;
+ processedPos++;
+ state = state < kNumLitStates ? 9 : 11;
+ continue;
+ }
+ UPDATE_1(prob);
+ }
+ else
+ {
+ UInt32 distance;
+ UPDATE_1(prob);
+ prob = probs + IsRepG1 + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ distance = rep1;
+ }
+ else
+ {
+ UPDATE_1(prob);
+ prob = probs + IsRepG2 + state;
+ IF_BIT_0(prob)
+ {
+ UPDATE_0(prob);
+ distance = rep2;
+ }
+ else
+ {
+ UPDATE_1(prob);
+ distance = rep3;
+ rep3 = rep2;
+ }
+ rep2 = rep1;
+ }
+ rep1 = rep0;
+ rep0 = distance;
+ }
+ state = state < kNumLitStates ? 8 : 11;
+ prob = probs + RepLenCoder;
+ }
+ {
+ unsigned limit, offset;
+ CLzmaProb *probLen = prob + LenChoice;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenLow + (posState << kLenNumLowBits);
+ offset = 0;
+ limit = (1 << kLenNumLowBits);
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenChoice2;
+ IF_BIT_0(probLen)
+ {
+ UPDATE_0(probLen);
+ probLen = prob + LenMid + (posState << kLenNumMidBits);
+ offset = kLenNumLowSymbols;
+ limit = (1 << kLenNumMidBits);
+ }
+ else
+ {
+ UPDATE_1(probLen);
+ probLen = prob + LenHigh;
+ offset = kLenNumLowSymbols + kLenNumMidSymbols;
+ limit = (1 << kLenNumHighBits);
+ }
+ }
+ TREE_DECODE(probLen, limit, len);
+ len += offset;
+ }
+
+ if (state >= kNumStates)
+ {
+ UInt32 distance;
+ prob = probs + PosSlot +
+ ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits);
+ TREE_6_DECODE(prob, distance);
+ if (distance >= kStartPosModelIndex)
+ {
+ unsigned posSlot = (unsigned)distance;
+ int numDirectBits = (int)(((distance >> 1) - 1));
+ distance = (2 | (distance & 1));
+ if (posSlot < kEndPosModelIndex)
+ {
+ distance <<= numDirectBits;
+ prob = probs + SpecPos + distance - posSlot - 1;
+ {
+ UInt32 mask = 1;
+ unsigned i = 1;
+ do
+ {
+ GET_BIT2(prob + i, i, ; , distance |= mask);
+ mask <<= 1;
+ }
+ while(--numDirectBits != 0);
+ }
+ }
+ else
+ {
+ numDirectBits -= kNumAlignBits;
+ do
+ {
+ NORMALIZE
+ range >>= 1;
+
+ {
+ UInt32 t;
+ code -= range;
+ t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */
+ distance = (distance << 1) + (t + 1);
+ code += range & t;
+ }
+ /*
+ distance <<= 1;
+ if (code >= range)
+ {
+ code -= range;
+ distance |= 1;
+ }
+ */
+ }
+ while (--numDirectBits != 0);
+ prob = probs + Align;
+ distance <<= kNumAlignBits;
+ {
+ unsigned i = 1;
+ GET_BIT2(prob + i, i, ; , distance |= 1);
+ GET_BIT2(prob + i, i, ; , distance |= 2);
+ GET_BIT2(prob + i, i, ; , distance |= 4);
+ GET_BIT2(prob + i, i, ; , distance |= 8);
+ }
+ if (distance == (UInt32)0xFFFFFFFF)
+ {
+ len += kMatchSpecLenStart;
+ state -= kNumStates;
+ break;
+ }
+ }
+ }
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ rep0 = distance + 1;
+ if (checkDicSize == 0)
+ {
+ if (distance >= processedPos)
+ return SZ_ERROR_DATA;
+ }
+ else if (distance >= checkDicSize)
+ return SZ_ERROR_DATA;
+ state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
+ /* state = kLiteralNextStates[state]; */
+ }
+
+ len += kMatchMinLen;
+
+ {
+ SizeT rem = limit - dicPos;
+ unsigned curLen = ((rem < len) ? (unsigned)rem : len);
+ SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0);
+
+ processedPos += curLen;
+
+ len -= curLen;
+ if (pos + curLen <= dicBufSize)
+ {
+ Byte *dest = dic + dicPos;
+ ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
+ const Byte *lim = dest + curLen;
+ dicPos += curLen;
+ do
+ *(dest) = (Byte)*(dest + src);
+ while (++dest != lim);
+ }
+ else
+ {
+ do
+ {
+ dic[dicPos++] = dic[pos];
+ if (++pos == dicBufSize)
+ pos = 0;
+ }
+ while (--curLen != 0);
+ }
+ }
+ }
+ }
+ while (dicPos < limit && buf < bufLimit);
+ NORMALIZE;
+ p->buf = buf;
+ p->range = range;
+ p->code = code;
+ p->remainLen = len;
+ p->dicPos = dicPos;
+ p->processedPos = processedPos;
+ p->reps[0] = rep0;
+ p->reps[1] = rep1;
+ p->reps[2] = rep2;
+ p->reps[3] = rep3;
+ p->state = state;
+
+ return SZ_OK;
+}
+
+static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
+{
+ if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart)
+ {
+ Byte *dic = p->dic;
+ SizeT dicPos = p->dicPos;
+ SizeT dicBufSize = p->dicBufSize;
+ unsigned len = p->remainLen;
+ UInt32 rep0 = p->reps[0];
+ if (limit - dicPos < len)
+ len = (unsigned)(limit - dicPos);
+
+ if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)
+ p->checkDicSize = p->prop.dicSize;
+
+ p->processedPos += len;
+ p->remainLen -= len;
+ while (len-- != 0)
+ {
+ dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
+ dicPos++;
+ }
+ p->dicPos = dicPos;
+ }
+}
+
+/* LzmaDec_DecodeReal2 decodes LZMA-symbols and sets p->needFlush and p->needInit, if required. */
+
+static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
+{
+ do
+ {
+ SizeT limit2 = limit;
+ if (p->checkDicSize == 0)
+ {
+ UInt32 rem = p->prop.dicSize - p->processedPos;
+ if (limit - p->dicPos > rem)
+ limit2 = p->dicPos + rem;
+ }
+ RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit));
+ if (p->processedPos >= p->prop.dicSize)
+ p->checkDicSize = p->prop.dicSize;
+ LzmaDec_WriteRem(p, limit);
+ }
+ while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);
+
+ if (p->remainLen > kMatchSpecLenStart)
+ {
+ p->remainLen = kMatchSpecLenStart;
+ }
+ return 0;
+}
+
+typedef enum
+{
+ DUMMY_ERROR, /* unexpected end of input stream */
+ DUMMY_LIT,
+ DUMMY_MATCH,
+ DUMMY_REP
+} ELzmaDummy;
+
+static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize)
+{
+ UInt32 range = p->range;
+ UInt32 code = p->code;
+ const Byte *bufLimit = buf + inSize;
+ CLzmaProb *probs = p->probs;
+ unsigned state = p->state;
+ ELzmaDummy res;
+
+ {
+ CLzmaProb *prob;
+ UInt32 bound;
+ unsigned ttt;
+ unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1);
+
+ prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK
+
+ /* if (bufLimit - buf >= 7) return DUMMY_LIT; */
+
+ prob = probs + Literal;
+ if (p->checkDicSize != 0 || p->processedPos != 0)
+ prob += (LZMA_LIT_SIZE *
+ ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
+ (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
+
+ if (state < kNumLitStates)
+ {
+ unsigned symbol = 1;
+ do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100);
+ }
+ else
+ {
+ unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
+ ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)];
+ unsigned offs = 0x100;
+ unsigned symbol = 1;
+ do
+ {
+ unsigned bit;
+ CLzmaProb *probLit;
+ matchByte <<= 1;
+ bit = (matchByte & offs);
+ probLit = prob + offs + bit + symbol;
+ GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit)
+ }
+ while (symbol < 0x100);
+ }
+ res = DUMMY_LIT;
+ }
+ else
+ {
+ unsigned len;
+ UPDATE_1_CHECK;
+
+ prob = probs + IsRep + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ state = 0;
+ prob = probs + LenCoder;
+ res = DUMMY_MATCH;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ res = DUMMY_REP;
+ prob = probs + IsRepG0 + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ NORMALIZE_CHECK;
+ return DUMMY_REP;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ }
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ prob = probs + IsRepG1 + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ prob = probs + IsRepG2 + state;
+ IF_BIT_0_CHECK(prob)
+ {
+ UPDATE_0_CHECK;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ }
+ }
+ }
+ state = kNumStates;
+ prob = probs + RepLenCoder;
+ }
+ {
+ unsigned limit, offset;
+ CLzmaProb *probLen = prob + LenChoice;
+ IF_BIT_0_CHECK(probLen)
+ {
+ UPDATE_0_CHECK;
+ probLen = prob + LenLow + (posState << kLenNumLowBits);
+ offset = 0;
+ limit = 1 << kLenNumLowBits;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ probLen = prob + LenChoice2;
+ IF_BIT_0_CHECK(probLen)
+ {
+ UPDATE_0_CHECK;
+ probLen = prob + LenMid + (posState << kLenNumMidBits);
+ offset = kLenNumLowSymbols;
+ limit = 1 << kLenNumMidBits;
+ }
+ else
+ {
+ UPDATE_1_CHECK;
+ probLen = prob + LenHigh;
+ offset = kLenNumLowSymbols + kLenNumMidSymbols;
+ limit = 1 << kLenNumHighBits;
+ }
+ }
+ TREE_DECODE_CHECK(probLen, limit, len);
+ len += offset;
+ }
+
+ if (state < 4)
+ {
+ unsigned posSlot;
+ prob = probs + PosSlot +
+ ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
+ kNumPosSlotBits);
+ TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot);
+ if (posSlot >= kStartPosModelIndex)
+ {
+ int numDirectBits = ((posSlot >> 1) - 1);
+
+ /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */
+
+ if (posSlot < kEndPosModelIndex)
+ {
+ prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1;
+ }
+ else
+ {
+ numDirectBits -= kNumAlignBits;
+ do
+ {
+ NORMALIZE_CHECK
+ range >>= 1;
+ code -= range & (((code - range) >> 31) - 1);
+ /* if (code >= range) code -= range; */
+ }
+ while (--numDirectBits != 0);
+ prob = probs + Align;
+ numDirectBits = kNumAlignBits;
+ }
+ {
+ unsigned i = 1;
+ do
+ {
+ GET_BIT_CHECK(prob + i, i);
+ }
+ while(--numDirectBits != 0);
+ }
+ }
+ }
+ }
+ }
+ NORMALIZE_CHECK;
+ return res;
+}
+
+
+static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
+{
+ p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]);
+ p->range = 0xFFFFFFFF;
+ p->needFlush = 0;
+}
+
+void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
+{
+ p->needFlush = 1;
+ p->remainLen = 0;
+ p->tempBufSize = 0;
+
+ if (initDic)
+ {
+ p->processedPos = 0;
+ p->checkDicSize = 0;
+ p->needInitState = 1;
+ }
+ if (initState)
+ p->needInitState = 1;
+}
+
+void LzmaDec_Init(CLzmaDec *p)
+{
+ p->dicPos = 0;
+ LzmaDec_InitDicAndState(p, True, True);
+}
+
+static void LzmaDec_InitStateReal(CLzmaDec *p)
+{
+ UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp));
+ UInt32 i;
+ CLzmaProb *probs = p->probs;
+ for (i = 0; i < numProbs; i++)
+ probs[i] = kBitModelTotal >> 1;
+ p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1;
+ p->state = 0;
+ p->needInitState = 0;
+}
+
+SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen,
+ ELzmaFinishMode finishMode, ELzmaStatus *status)
+{
+ SizeT inSize = *srcLen;
+ (*srcLen) = 0;
+ LzmaDec_WriteRem(p, dicLimit);
+
+ *status = LZMA_STATUS_NOT_SPECIFIED;
+
+ while (p->remainLen != kMatchSpecLenStart)
+ {
+ int checkEndMarkNow;
+
+ if (p->needFlush != 0)
+ {
+ for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--)
+ p->tempBuf[p->tempBufSize++] = *src++;
+ if (p->tempBufSize < RC_INIT_SIZE)
+ {
+ *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+ return SZ_OK;
+ }
+ if (p->tempBuf[0] != 0)
+ return SZ_ERROR_DATA;
+
+ LzmaDec_InitRc(p, p->tempBuf);
+ p->tempBufSize = 0;
+ }
+
+ checkEndMarkNow = 0;
+ if (p->dicPos >= dicLimit)
+ {
+ if (p->remainLen == 0 && p->code == 0)
+ {
+ *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK;
+ return SZ_OK;
+ }
+ if (finishMode == LZMA_FINISH_ANY)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_OK;
+ }
+ if (p->remainLen != 0)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_ERROR_DATA;
+ }
+ checkEndMarkNow = 1;
+ }
+
+ if (p->needInitState)
+ LzmaDec_InitStateReal(p);
+
+ if (p->tempBufSize == 0)
+ {
+ SizeT processed;
+ const Byte *bufLimit;
+ if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
+ {
+ int dummyRes = LzmaDec_TryDummy(p, src, inSize);
+ if (dummyRes == DUMMY_ERROR)
+ {
+ memcpy(p->tempBuf, src, inSize);
+ p->tempBufSize = (unsigned)inSize;
+ (*srcLen) += inSize;
+ *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+ return SZ_OK;
+ }
+ if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_ERROR_DATA;
+ }
+ bufLimit = src;
+ }
+ else
+ bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX;
+ p->buf = src;
+ if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0)
+ return SZ_ERROR_DATA;
+ processed = p->buf - src;
+ (*srcLen) += processed;
+ src += processed;
+ inSize -= processed;
+ }
+ else
+ {
+ unsigned rem = p->tempBufSize, lookAhead = 0;
+ while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize)
+ p->tempBuf[rem++] = src[lookAhead++];
+ p->tempBufSize = rem;
+ if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
+ {
+ int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem);
+ if (dummyRes == DUMMY_ERROR)
+ {
+ (*srcLen) += lookAhead;
+ *status = LZMA_STATUS_NEEDS_MORE_INPUT;
+ return SZ_OK;
+ }
+ if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
+ {
+ *status = LZMA_STATUS_NOT_FINISHED;
+ return SZ_ERROR_DATA;
+ }
+ }
+ p->buf = p->tempBuf;
+ if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)
+ return SZ_ERROR_DATA;
+ lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf));
+ (*srcLen) += lookAhead;
+ src += lookAhead;
+ inSize -= lookAhead;
+ p->tempBufSize = 0;
+ }
+ }
+ if (p->code == 0)
+ *status = LZMA_STATUS_FINISHED_WITH_MARK;
+ return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA;
+}
+
+SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
+{
+ SizeT outSize = *destLen;
+ SizeT inSize = *srcLen;
+ *srcLen = *destLen = 0;
+ for (;;)
+ {
+ SizeT inSizeCur = inSize, outSizeCur, dicPos;
+ ELzmaFinishMode curFinishMode;
+ SRes res;
+ if (p->dicPos == p->dicBufSize)
+ p->dicPos = 0;
+ dicPos = p->dicPos;
+ if (outSize > p->dicBufSize - dicPos)
+ {
+ outSizeCur = p->dicBufSize;
+ curFinishMode = LZMA_FINISH_ANY;
+ }
+ else
+ {
+ outSizeCur = dicPos + outSize;
+ curFinishMode = finishMode;
+ }
+
+ res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status);
+ src += inSizeCur;
+ inSize -= inSizeCur;
+ *srcLen += inSizeCur;
+ outSizeCur = p->dicPos - dicPos;
+ memcpy(dest, p->dic + dicPos, outSizeCur);
+ dest += outSizeCur;
+ outSize -= outSizeCur;
+ *destLen += outSizeCur;
+ if (res != 0)
+ return res;
+ if (outSizeCur == 0 || outSize == 0)
+ return SZ_OK;
+ }
+}
+
+void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->probs);
+ p->probs = 0;
+}
+
+static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->dic);
+ p->dic = 0;
+}
+
+void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
+{
+ LzmaDec_FreeProbs(p, alloc);
+ LzmaDec_FreeDict(p, alloc);
+}
+
+SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
+{
+ UInt32 dicSize;
+ Byte d;
+
+ if (size < LZMA_PROPS_SIZE)
+ return SZ_ERROR_UNSUPPORTED;
+ else
+ dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
+
+ if (dicSize < LZMA_DIC_MIN)
+ dicSize = LZMA_DIC_MIN;
+ p->dicSize = dicSize;
+
+ d = data[0];
+ if (d >= (9 * 5 * 5))
+ return SZ_ERROR_UNSUPPORTED;
+
+ p->lc = d % 9;
+ d /= 9;
+ p->pb = d / 5;
+ p->lp = d % 5;
+
+ return SZ_OK;
+}
+
+static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc)
+{
+ UInt32 numProbs = LzmaProps_GetNumProbs(propNew);
+ if (p->probs == 0 || numProbs != p->numProbs)
+ {
+ LzmaDec_FreeProbs(p, alloc);
+ p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb));
+ p->numProbs = numProbs;
+ if (p->probs == 0)
+ return SZ_ERROR_MEM;
+ }
+ return SZ_OK;
+}
+
+SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
+{
+ CLzmaProps propNew;
+ RINOK(LzmaProps_Decode(&propNew, props, propsSize));
+ RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
+ p->prop = propNew;
+ return SZ_OK;
+}
+
+SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
+{
+ CLzmaProps propNew;
+ SizeT dicBufSize;
+ RINOK(LzmaProps_Decode(&propNew, props, propsSize));
+ RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
+ dicBufSize = propNew.dicSize;
+ if (p->dic == 0 || dicBufSize != p->dicBufSize)
+ {
+ LzmaDec_FreeDict(p, alloc);
+ p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize);
+ if (p->dic == 0)
+ {
+ LzmaDec_FreeProbs(p, alloc);
+ return SZ_ERROR_MEM;
+ }
+ }
+ p->dicBufSize = dicBufSize;
+ p->prop = propNew;
+ return SZ_OK;
+}
+
+SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
+ const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
+ ELzmaStatus *status, ISzAlloc *alloc)
+{
+ CLzmaDec p;
+ SRes res;
+ SizeT inSize = *srcLen;
+ SizeT outSize = *destLen;
+ *srcLen = *destLen = 0;
+ if (inSize < RC_INIT_SIZE)
+ return SZ_ERROR_INPUT_EOF;
+
+ LzmaDec_Construct(&p);
+ res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc);
+ if (res != 0)
+ return res;
+ p.dic = dest;
+ p.dicBufSize = outSize;
+
+ LzmaDec_Init(&p);
+
+ *srcLen = inSize;
+ res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
+
+ if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
+ res = SZ_ERROR_INPUT_EOF;
+
+ (*destLen) = p.dicPos;
+ LzmaDec_FreeProbs(&p, alloc);
+ return res;
+}
diff --git a/grub-core/lib/LzmaEnc.c b/grub-core/lib/LzmaEnc.c
new file mode 100644
index 0000000..01ffa91
--- /dev/null
+++ b/grub-core/lib/LzmaEnc.c
@@ -0,0 +1,2357 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (c) 1999-2008 Igor Pavlov
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This code was taken from LZMA SDK 4.58 beta, and was slightly modified
+ * to adapt it to GRUB's requirement.
+ *
+ * See <http://www.7-zip.org>, for more information about LZMA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include <grub/lib/LzmaEnc.h>
+
+#include <grub/lib/LzFind.h>
+#ifdef COMPRESS_MF_MT
+#include <grub/lib/LzFindMt.h>
+#endif
+
+/* #define SHOW_STAT */
+/* #define SHOW_STAT2 */
+
+#ifdef SHOW_STAT
+static int ttt = 0;
+#endif
+
+#define kBlockSizeMax ((1 << LZMA_NUM_BLOCK_SIZE_BITS) - 1)
+
+#define kBlockSize (9 << 10)
+#define kUnpackBlockSize (1 << 18)
+#define kMatchArraySize (1 << 21)
+#define kMatchRecordMaxSize ((LZMA_MATCH_LEN_MAX * 2 + 3) * LZMA_MATCH_LEN_MAX)
+
+#define kNumMaxDirectBits (31)
+
+#define kNumTopBits 24
+#define kTopValue ((UInt32)1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+#define kProbInitValue (kBitModelTotal >> 1)
+
+#define kNumMoveReducingBits 4
+#define kNumBitPriceShiftBits 4
+#define kBitPrice (1 << kNumBitPriceShiftBits)
+
+void LzmaEncProps_Init(CLzmaEncProps *p)
+{
+ p->level = 5;
+ p->dictSize = p->mc = 0;
+ p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1;
+ p->writeEndMark = 0;
+}
+
+void LzmaEncProps_Normalize(CLzmaEncProps *p)
+{
+ int level = p->level;
+ if (level < 0) level = 5;
+ p->level = level;
+ if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26)));
+ if (p->lc < 0) p->lc = 3;
+ if (p->lp < 0) p->lp = 0;
+ if (p->pb < 0) p->pb = 2;
+ if (p->algo < 0) p->algo = (level < 5 ? 0 : 1);
+ if (p->fb < 0) p->fb = (level < 7 ? 32 : 64);
+ if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1);
+ if (p->numHashBytes < 0) p->numHashBytes = 4;
+ if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1);
+ if (p->numThreads < 0) p->numThreads = ((p->btMode && p->algo) ? 2 : 1);
+}
+
+UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
+{
+ CLzmaEncProps props = *props2;
+ LzmaEncProps_Normalize(&props);
+ return props.dictSize;
+}
+
+/* #define LZMA_LOG_BSR */
+/* Define it for Intel's CPU */
+
+
+#ifdef LZMA_LOG_BSR
+
+#define kDicLogSizeMaxCompress 30
+
+#define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); }
+
+UInt32 GetPosSlot1(UInt32 pos)
+{
+ UInt32 res;
+ BSR2_RET(pos, res);
+ return res;
+}
+#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
+#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); }
+
+#else
+
+#define kNumLogBits (9 + (int)sizeof(size_t) / 2)
+#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
+
+void LzmaEnc_FastPosInit(Byte *g_FastPos)
+{
+ int c = 2, slotFast;
+ g_FastPos[0] = 0;
+ g_FastPos[1] = 1;
+
+ for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++)
+ {
+ UInt32 k = (1 << ((slotFast >> 1) - 1));
+ UInt32 j;
+ for (j = 0; j < k; j++, c++)
+ g_FastPos[c] = (Byte)slotFast;
+ }
+}
+
+#define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \
+ (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \
+ res = p->g_FastPos[pos >> i] + (i * 2); }
+/*
+#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \
+ p->g_FastPos[pos >> 6] + 12 : \
+ p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; }
+*/
+
+#define GetPosSlot1(pos) p->g_FastPos[pos]
+#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
+#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos]; else BSR2_RET(pos, res); }
+
+#endif
+
+
+#define LZMA_NUM_REPS 4
+
+typedef unsigned CState;
+
+typedef struct _COptimal
+{
+ UInt32 price;
+
+ CState state;
+ int prev1IsChar;
+ int prev2;
+
+ UInt32 posPrev2;
+ UInt32 backPrev2;
+
+ UInt32 posPrev;
+ UInt32 backPrev;
+ UInt32 backs[LZMA_NUM_REPS];
+} COptimal;
+
+#define kNumOpts (1 << 12)
+
+#define kNumLenToPosStates 4
+#define kNumPosSlotBits 6
+#define kDicLogSizeMin 0
+#define kDicLogSizeMax 32
+#define kDistTableSizeMax (kDicLogSizeMax * 2)
+
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+#define kAlignMask (kAlignTableSize - 1)
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumPosModels (kEndPosModelIndex - kStartPosModelIndex)
+
+#define kNumFullDistances (1 << (kEndPosModelIndex / 2))
+
+#ifdef _LZMA_PROB32
+#define CLzmaProb UInt32
+#else
+#define CLzmaProb UInt16
+#endif
+
+#define LZMA_PB_MAX 4
+#define LZMA_LC_MAX 8
+#define LZMA_LP_MAX 4
+
+#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX)
+
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumMidBits 3
+#define kLenNumMidSymbols (1 << kLenNumMidBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+
+#define kLenNumSymbolsTotal (kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols)
+
+#define LZMA_MATCH_LEN_MIN 2
+#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1)
+
+#define kNumStates 12
+
+typedef struct
+{
+ CLzmaProb choice;
+ CLzmaProb choice2;
+ CLzmaProb low[LZMA_NUM_PB_STATES_MAX << kLenNumLowBits];
+ CLzmaProb mid[LZMA_NUM_PB_STATES_MAX << kLenNumMidBits];
+ CLzmaProb high[kLenNumHighSymbols];
+} CLenEnc;
+
+typedef struct
+{
+ CLenEnc p;
+ UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal];
+ UInt32 tableSize;
+ UInt32 counters[LZMA_NUM_PB_STATES_MAX];
+} CLenPriceEnc;
+
+typedef struct _CRangeEnc
+{
+ UInt32 range;
+ Byte cache;
+ UInt64 low;
+ UInt64 cacheSize;
+ Byte *buf;
+ Byte *bufLim;
+ Byte *bufBase;
+ ISeqOutStream *outStream;
+ UInt64 processed;
+ SRes res;
+} CRangeEnc;
+
+typedef struct _CSeqInStreamBuf
+{
+ ISeqInStream funcTable;
+ const Byte *data;
+ SizeT rem;
+} CSeqInStreamBuf;
+
+static SRes MyRead(void *pp, void *data, size_t *size)
+{
+ size_t curSize = *size;
+ CSeqInStreamBuf *p = (CSeqInStreamBuf *)pp;
+ if (p->rem < curSize)
+ curSize = p->rem;
+ memcpy(data, p->data, curSize);
+ p->rem -= curSize;
+ p->data += curSize;
+ *size = curSize;
+ return SZ_OK;
+}
+
+typedef struct
+{
+ CLzmaProb *litProbs;
+
+ CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
+ CLzmaProb isRep[kNumStates];
+ CLzmaProb isRepG0[kNumStates];
+ CLzmaProb isRepG1[kNumStates];
+ CLzmaProb isRepG2[kNumStates];
+ CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX];
+
+ CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
+ CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
+ CLzmaProb posAlignEncoder[1 << kNumAlignBits];
+
+ CLenPriceEnc lenEnc;
+ CLenPriceEnc repLenEnc;
+
+ UInt32 reps[LZMA_NUM_REPS];
+ UInt32 state;
+} CSaveState;
+
+typedef struct _CLzmaEnc
+{
+ IMatchFinder matchFinder;
+ void *matchFinderObj;
+
+ #ifdef COMPRESS_MF_MT
+ Bool mtMode;
+ CMatchFinderMt matchFinderMt;
+ #endif
+
+ CMatchFinder matchFinderBase;
+
+ #ifdef COMPRESS_MF_MT
+ Byte pad[128];
+ #endif
+
+ UInt32 optimumEndIndex;
+ UInt32 optimumCurrentIndex;
+
+ Bool longestMatchWasFound;
+ UInt32 longestMatchLength;
+ UInt32 numDistancePairs;
+
+ COptimal opt[kNumOpts];
+
+ #ifndef LZMA_LOG_BSR
+ Byte g_FastPos[1 << kNumLogBits];
+ #endif
+
+ UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
+ UInt32 matchDistances[LZMA_MATCH_LEN_MAX * 2 + 2 + 1];
+ UInt32 numFastBytes;
+ UInt32 additionalOffset;
+ UInt32 reps[LZMA_NUM_REPS];
+ UInt32 state;
+
+ UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
+ UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances];
+ UInt32 alignPrices[kAlignTableSize];
+ UInt32 alignPriceCount;
+
+ UInt32 distTableSize;
+
+ unsigned lc, lp, pb;
+ unsigned lpMask, pbMask;
+
+ CLzmaProb *litProbs;
+
+ CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
+ CLzmaProb isRep[kNumStates];
+ CLzmaProb isRepG0[kNumStates];
+ CLzmaProb isRepG1[kNumStates];
+ CLzmaProb isRepG2[kNumStates];
+ CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX];
+
+ CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
+ CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
+ CLzmaProb posAlignEncoder[1 << kNumAlignBits];
+
+ CLenPriceEnc lenEnc;
+ CLenPriceEnc repLenEnc;
+
+ unsigned lclp;
+
+ Bool fastMode;
+
+ CRangeEnc rc;
+
+ Bool writeEndMark;
+ UInt64 nowPos64;
+ UInt32 matchPriceCount;
+ Bool finished;
+ Bool multiThread;
+
+ SRes result;
+ UInt32 dictSize;
+ UInt32 matchFinderCycles;
+
+ ISeqInStream *inStream;
+ CSeqInStreamBuf seqBufInStream;
+
+ CSaveState saveState;
+} CLzmaEnc;
+
+void LzmaEnc_SaveState(CLzmaEncHandle pp)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ CSaveState *dest = &p->saveState;
+ int i;
+ dest->lenEnc = p->lenEnc;
+ dest->repLenEnc = p->repLenEnc;
+ dest->state = p->state;
+
+ for (i = 0; i < kNumStates; i++)
+ {
+ memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i]));
+ memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i]));
+ }
+ for (i = 0; i < kNumLenToPosStates; i++)
+ memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i]));
+ memcpy(dest->isRep, p->isRep, sizeof(p->isRep));
+ memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0));
+ memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1));
+ memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2));
+ memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders));
+ memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
+ memcpy(dest->reps, p->reps, sizeof(p->reps));
+ memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb));
+}
+
+void LzmaEnc_RestoreState(CLzmaEncHandle pp)
+{
+ CLzmaEnc *dest = (CLzmaEnc *)pp;
+ const CSaveState *p = &dest->saveState;
+ int i;
+ dest->lenEnc = p->lenEnc;
+ dest->repLenEnc = p->repLenEnc;
+ dest->state = p->state;
+
+ for (i = 0; i < kNumStates; i++)
+ {
+ memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i]));
+ memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i]));
+ }
+ for (i = 0; i < kNumLenToPosStates; i++)
+ memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i]));
+ memcpy(dest->isRep, p->isRep, sizeof(p->isRep));
+ memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0));
+ memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1));
+ memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2));
+ memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders));
+ memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
+ memcpy(dest->reps, p->reps, sizeof(p->reps));
+ memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb));
+}
+
+SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ CLzmaEncProps props = *props2;
+ LzmaEncProps_Normalize(&props);
+
+ if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX ||
+ props.dictSize > (1U << kDicLogSizeMaxCompress) || props.dictSize > (1 << 30))
+ return SZ_ERROR_PARAM;
+ p->dictSize = props.dictSize;
+ p->matchFinderCycles = props.mc;
+ {
+ unsigned fb = props.fb;
+ if (fb < 5)
+ fb = 5;
+ if (fb > LZMA_MATCH_LEN_MAX)
+ fb = LZMA_MATCH_LEN_MAX;
+ p->numFastBytes = fb;
+ }
+ p->lc = props.lc;
+ p->lp = props.lp;
+ p->pb = props.pb;
+ p->fastMode = (props.algo == 0);
+ p->matchFinderBase.btMode = props.btMode;
+ {
+ UInt32 numHashBytes = 4;
+ if (props.btMode)
+ {
+ if (props.numHashBytes < 2)
+ numHashBytes = 2;
+ else if (props.numHashBytes < 4)
+ numHashBytes = props.numHashBytes;
+ }
+ p->matchFinderBase.numHashBytes = numHashBytes;
+ }
+
+ p->matchFinderBase.cutValue = props.mc;
+
+ p->writeEndMark = props.writeEndMark;
+
+ #ifdef COMPRESS_MF_MT
+ /*
+ if (newMultiThread != _multiThread)
+ {
+ ReleaseMatchFinder();
+ _multiThread = newMultiThread;
+ }
+ */
+ p->multiThread = (props.numThreads > 1);
+ #endif
+
+ return SZ_OK;
+}
+
+static const int kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
+static const int kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
+static const int kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
+static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
+
+/*
+ void UpdateChar() { Index = kLiteralNextStates[Index]; }
+ void UpdateMatch() { Index = kMatchNextStates[Index]; }
+ void UpdateRep() { Index = kRepNextStates[Index]; }
+ void UpdateShortRep() { Index = kShortRepNextStates[Index]; }
+*/
+
+#define IsCharState(s) ((s) < 7)
+
+
+#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1)
+
+#define kInfinityPrice (1 << 30)
+
+static void RangeEnc_Construct(CRangeEnc *p)
+{
+ p->outStream = 0;
+ p->bufBase = 0;
+}
+
+#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize)
+
+#define RC_BUF_SIZE (1 << 16)
+static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc)
+{
+ if (p->bufBase == 0)
+ {
+ p->bufBase = (Byte *)alloc->Alloc(alloc, RC_BUF_SIZE);
+ if (p->bufBase == 0)
+ return 0;
+ p->bufLim = p->bufBase + RC_BUF_SIZE;
+ }
+ return 1;
+}
+
+static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->bufBase);
+ p->bufBase = 0;
+}
+
+static void RangeEnc_Init(CRangeEnc *p)
+{
+ /* Stream.Init(); */
+ p->low = 0;
+ p->range = 0xFFFFFFFF;
+ p->cacheSize = 1;
+ p->cache = 0;
+
+ p->buf = p->bufBase;
+
+ p->processed = 0;
+ p->res = SZ_OK;
+}
+
+static void RangeEnc_FlushStream(CRangeEnc *p)
+{
+ size_t num;
+ if (p->res != SZ_OK)
+ return;
+ num = p->buf - p->bufBase;
+ if (num != p->outStream->Write(p->outStream, p->bufBase, num))
+ p->res = SZ_ERROR_WRITE;
+ p->processed += num;
+ p->buf = p->bufBase;
+}
+
+static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p)
+{
+ if ((UInt32)p->low < (UInt32)0xFF000000 || (int)(p->low >> 32) != 0)
+ {
+ Byte temp = p->cache;
+ do
+ {
+ Byte *buf = p->buf;
+ *buf++ = (Byte)(temp + (Byte)(p->low >> 32));
+ p->buf = buf;
+ if (buf == p->bufLim)
+ RangeEnc_FlushStream(p);
+ temp = 0xFF;
+ }
+ while (--p->cacheSize != 0);
+ p->cache = (Byte)((UInt32)p->low >> 24);
+ }
+ p->cacheSize++;
+ p->low = (UInt32)p->low << 8;
+}
+
+static void RangeEnc_FlushData(CRangeEnc *p)
+{
+ int i;
+ for (i = 0; i < 5; i++)
+ RangeEnc_ShiftLow(p);
+}
+
+static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, int numBits)
+{
+ do
+ {
+ p->range >>= 1;
+ p->low += p->range & (0 - ((value >> --numBits) & 1));
+ if (p->range < kTopValue)
+ {
+ p->range <<= 8;
+ RangeEnc_ShiftLow(p);
+ }
+ }
+ while (numBits != 0);
+}
+
+static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol)
+{
+ UInt32 ttt = *prob;
+ UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt;
+ if (symbol == 0)
+ {
+ p->range = newBound;
+ ttt += (kBitModelTotal - ttt) >> kNumMoveBits;
+ }
+ else
+ {
+ p->low += newBound;
+ p->range -= newBound;
+ ttt -= ttt >> kNumMoveBits;
+ }
+ *prob = (CLzmaProb)ttt;
+ if (p->range < kTopValue)
+ {
+ p->range <<= 8;
+ RangeEnc_ShiftLow(p);
+ }
+}
+
+static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol)
+{
+ symbol |= 0x100;
+ do
+ {
+ RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1);
+ symbol <<= 1;
+ }
+ while (symbol < 0x10000);
+}
+
+static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte)
+{
+ UInt32 offs = 0x100;
+ symbol |= 0x100;
+ do
+ {
+ matchByte <<= 1;
+ RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1);
+ symbol <<= 1;
+ offs &= ~(matchByte ^ symbol);
+ }
+ while (symbol < 0x10000);
+}
+
+void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
+{
+ UInt32 i;
+ for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits))
+ {
+ const int kCyclesBits = kNumBitPriceShiftBits;
+ UInt32 w = i;
+ UInt32 bitCount = 0;
+ int j;
+ for (j = 0; j < kCyclesBits; j++)
+ {
+ w = w * w;
+ bitCount <<= 1;
+ while (w >= ((UInt32)1 << 16))
+ {
+ w >>= 1;
+ bitCount++;
+ }
+ }
+ ProbPrices[i >> kNumMoveReducingBits] = ((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount);
+ }
+}
+
+
+#define GET_PRICE(prob, symbol) \
+ p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
+
+#define GET_PRICEa(prob, symbol) \
+ ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
+
+#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits]
+#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
+
+#define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits]
+#define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
+
+static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices)
+{
+ UInt32 price = 0;
+ symbol |= 0x100;
+ do
+ {
+ price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1);
+ symbol <<= 1;
+ }
+ while (symbol < 0x10000);
+ return price;
+};
+
+static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt32 *ProbPrices)
+{
+ UInt32 price = 0;
+ UInt32 offs = 0x100;
+ symbol |= 0x100;
+ do
+ {
+ matchByte <<= 1;
+ price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1);
+ symbol <<= 1;
+ offs &= ~(matchByte ^ symbol);
+ }
+ while (symbol < 0x10000);
+ return price;
+};
+
+
+static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
+{
+ UInt32 m = 1;
+ int i;
+ for (i = numBitLevels; i != 0 ;)
+ {
+ UInt32 bit;
+ i--;
+ bit = (symbol >> i) & 1;
+ RangeEnc_EncodeBit(rc, probs + m, bit);
+ m = (m << 1) | bit;
+ }
+};
+
+static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
+{
+ UInt32 m = 1;
+ int i;
+ for (i = 0; i < numBitLevels; i++)
+ {
+ UInt32 bit = symbol & 1;
+ RangeEnc_EncodeBit(rc, probs + m, bit);
+ m = (m << 1) | bit;
+ symbol >>= 1;
+ }
+}
+
+static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
+{
+ UInt32 price = 0;
+ symbol |= (1 << numBitLevels);
+ while (symbol != 1)
+ {
+ price += GET_PRICEa(probs[symbol >> 1], symbol & 1);
+ symbol >>= 1;
+ }
+ return price;
+}
+
+static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
+{
+ UInt32 price = 0;
+ UInt32 m = 1;
+ int i;
+ for (i = numBitLevels; i != 0; i--)
+ {
+ UInt32 bit = symbol & 1;
+ symbol >>= 1;
+ price += GET_PRICEa(probs[m], bit);
+ m = (m << 1) | bit;
+ }
+ return price;
+}
+
+
+static void LenEnc_Init(CLenEnc *p)
+{
+ unsigned i;
+ p->choice = p->choice2 = kProbInitValue;
+ for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++)
+ p->low[i] = kProbInitValue;
+ for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++)
+ p->mid[i] = kProbInitValue;
+ for (i = 0; i < kLenNumHighSymbols; i++)
+ p->high[i] = kProbInitValue;
+}
+
+static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState)
+{
+ if (symbol < kLenNumLowSymbols)
+ {
+ RangeEnc_EncodeBit(rc, &p->choice, 0);
+ RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol);
+ }
+ else
+ {
+ RangeEnc_EncodeBit(rc, &p->choice, 1);
+ if (symbol < kLenNumLowSymbols + kLenNumMidSymbols)
+ {
+ RangeEnc_EncodeBit(rc, &p->choice2, 0);
+ RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols);
+ }
+ else
+ {
+ RangeEnc_EncodeBit(rc, &p->choice2, 1);
+ RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols);
+ }
+ }
+}
+
+static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 *ProbPrices)
+{
+ UInt32 a0 = GET_PRICE_0a(p->choice);
+ UInt32 a1 = GET_PRICE_1a(p->choice);
+ UInt32 b0 = a1 + GET_PRICE_0a(p->choice2);
+ UInt32 b1 = a1 + GET_PRICE_1a(p->choice2);
+ UInt32 i = 0;
+ for (i = 0; i < kLenNumLowSymbols; i++)
+ {
+ if (i >= numSymbols)
+ return;
+ prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPrices);
+ }
+ for (; i < kLenNumLowSymbols + kLenNumMidSymbols; i++)
+ {
+ if (i >= numSymbols)
+ return;
+ prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNumLowSymbols, ProbPrices);
+ }
+ for (; i < numSymbols; i++)
+ prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices);
+}
+
+static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPrices)
+{
+ LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices);
+ p->counters[posState] = p->tableSize;
+}
+
+static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, UInt32 *ProbPrices)
+{
+ UInt32 posState;
+ for (posState = 0; posState < numPosStates; posState++)
+ LenPriceEnc_UpdateTable(p, posState, ProbPrices);
+}
+
+static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices)
+{
+ LenEnc_Encode(&p->p, rc, symbol, posState);
+ if (updatePrice)
+ if (--p->counters[posState] == 0)
+ LenPriceEnc_UpdateTable(p, posState, ProbPrices);
+}
+
+
+
+
+static void MovePos(CLzmaEnc *p, UInt32 num)
+{
+ #ifdef SHOW_STAT
+ ttt += num;
+ printf("\n MovePos %d", num);
+ #endif
+ if (num != 0)
+ {
+ p->additionalOffset += num;
+ p->matchFinder.Skip(p->matchFinderObj, num);
+ }
+}
+
+static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes)
+{
+ UInt32 lenRes = 0, numDistancePairs;
+ numDistancePairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matchDistances);
+ #ifdef SHOW_STAT
+ printf("\n i = %d numPairs = %d ", ttt, numDistancePairs / 2);
+ if (ttt >= 61994)
+ ttt = ttt;
+
+ ttt++;
+ {
+ UInt32 i;
+ for (i = 0; i < numDistancePairs; i += 2)
+ printf("%2d %6d | ", p->matchDistances[i], p->matchDistances[i + 1]);
+ }
+ #endif
+ if (numDistancePairs > 0)
+ {
+ lenRes = p->matchDistances[numDistancePairs - 2];
+ if (lenRes == p->numFastBytes)
+ {
+ UInt32 numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) + 1;
+ const Byte *pby = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+ UInt32 distance = p->matchDistances[numDistancePairs - 1] + 1;
+ if (numAvail > LZMA_MATCH_LEN_MAX)
+ numAvail = LZMA_MATCH_LEN_MAX;
+
+ {
+ const Byte *pby2 = pby - distance;
+ for (; lenRes < numAvail && pby[lenRes] == pby2[lenRes]; lenRes++);
+ }
+ }
+ }
+ p->additionalOffset++;
+ *numDistancePairsRes = numDistancePairs;
+ return lenRes;
+}
+
+
+#define MakeAsChar(p) (p)->backPrev = (UInt32)(-1); (p)->prev1IsChar = False;
+#define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = False;
+#define IsShortRep(p) ((p)->backPrev == 0)
+
+static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState)
+{
+ return
+ GET_PRICE_0(p->isRepG0[state]) +
+ GET_PRICE_0(p->isRep0Long[state][posState]);
+}
+
+static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState)
+{
+ UInt32 price;
+ if (repIndex == 0)
+ {
+ price = GET_PRICE_0(p->isRepG0[state]);
+ price += GET_PRICE_1(p->isRep0Long[state][posState]);
+ }
+ else
+ {
+ price = GET_PRICE_1(p->isRepG0[state]);
+ if (repIndex == 1)
+ price += GET_PRICE_0(p->isRepG1[state]);
+ else
+ {
+ price += GET_PRICE_1(p->isRepG1[state]);
+ price += GET_PRICE(p->isRepG2[state], repIndex - 2);
+ }
+ }
+ return price;
+}
+
+static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState)
+{
+ return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] +
+ GetPureRepPrice(p, repIndex, state, posState);
+}
+
+static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur)
+{
+ UInt32 posMem = p->opt[cur].posPrev;
+ UInt32 backMem = p->opt[cur].backPrev;
+ p->optimumEndIndex = cur;
+ do
+ {
+ if (p->opt[cur].prev1IsChar)
+ {
+ MakeAsChar(&p->opt[posMem])
+ p->opt[posMem].posPrev = posMem - 1;
+ if (p->opt[cur].prev2)
+ {
+ p->opt[posMem - 1].prev1IsChar = False;
+ p->opt[posMem - 1].posPrev = p->opt[cur].posPrev2;
+ p->opt[posMem - 1].backPrev = p->opt[cur].backPrev2;
+ }
+ }
+ {
+ UInt32 posPrev = posMem;
+ UInt32 backCur = backMem;
+
+ backMem = p->opt[posPrev].backPrev;
+ posMem = p->opt[posPrev].posPrev;
+
+ p->opt[posPrev].backPrev = backCur;
+ p->opt[posPrev].posPrev = cur;
+ cur = posPrev;
+ }
+ }
+ while (cur != 0);
+ *backRes = p->opt[0].backPrev;
+ p->optimumCurrentIndex = p->opt[0].posPrev;
+ return p->optimumCurrentIndex;
+}
+
+#define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300)
+
+static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
+{
+ UInt32 numAvailableBytes, lenMain, numDistancePairs;
+ const Byte *data;
+ UInt32 reps[LZMA_NUM_REPS];
+ UInt32 repLens[LZMA_NUM_REPS];
+ UInt32 repMaxIndex, i;
+ UInt32 *matchDistances;
+ Byte currentByte, matchByte;
+ UInt32 posState;
+ UInt32 matchPrice, repMatchPrice;
+ UInt32 lenEnd;
+ UInt32 len;
+ UInt32 normalMatchPrice;
+ UInt32 cur;
+ if (p->optimumEndIndex != p->optimumCurrentIndex)
+ {
+ const COptimal *opt = &p->opt[p->optimumCurrentIndex];
+ UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex;
+ *backRes = opt->backPrev;
+ p->optimumCurrentIndex = opt->posPrev;
+ return lenRes;
+ }
+ p->optimumCurrentIndex = p->optimumEndIndex = 0;
+
+ numAvailableBytes = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
+
+ if (!p->longestMatchWasFound)
+ {
+ lenMain = ReadMatchDistances(p, &numDistancePairs);
+ }
+ else
+ {
+ lenMain = p->longestMatchLength;
+ numDistancePairs = p->numDistancePairs;
+ p->longestMatchWasFound = False;
+ }
+
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+ if (numAvailableBytes < 2)
+ {
+ *backRes = (UInt32)(-1);
+ return 1;
+ }
+ if (numAvailableBytes > LZMA_MATCH_LEN_MAX)
+ numAvailableBytes = LZMA_MATCH_LEN_MAX;
+
+ repMaxIndex = 0;
+ for (i = 0; i < LZMA_NUM_REPS; i++)
+ {
+ UInt32 lenTest;
+ const Byte *data2;
+ reps[i] = p->reps[i];
+ data2 = data - (reps[i] + 1);
+ if (data[0] != data2[0] || data[1] != data2[1])
+ {
+ repLens[i] = 0;
+ continue;
+ }
+ for (lenTest = 2; lenTest < numAvailableBytes && data[lenTest] == data2[lenTest]; lenTest++);
+ repLens[i] = lenTest;
+ if (lenTest > repLens[repMaxIndex])
+ repMaxIndex = i;
+ }
+ if (repLens[repMaxIndex] >= p->numFastBytes)
+ {
+ UInt32 lenRes;
+ *backRes = repMaxIndex;
+ lenRes = repLens[repMaxIndex];
+ MovePos(p, lenRes - 1);
+ return lenRes;
+ }
+
+ matchDistances = p->matchDistances;
+ if (lenMain >= p->numFastBytes)
+ {
+ *backRes = matchDistances[numDistancePairs - 1] + LZMA_NUM_REPS;
+ MovePos(p, lenMain - 1);
+ return lenMain;
+ }
+ currentByte = *data;
+ matchByte = *(data - (reps[0] + 1));
+
+ if (lenMain < 2 && currentByte != matchByte && repLens[repMaxIndex] < 2)
+ {
+ *backRes = (UInt32)-1;
+ return 1;
+ }
+
+ p->opt[0].state = (CState)p->state;
+
+ posState = (position & p->pbMask);
+
+ {
+ const CLzmaProb *probs = LIT_PROBS(position, *(data - 1));
+ p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) +
+ (!IsCharState(p->state) ?
+ LitEnc_GetPriceMatched(probs, currentByte, matchByte, p->ProbPrices) :
+ LitEnc_GetPrice(probs, currentByte, p->ProbPrices));
+ }
+
+ MakeAsChar(&p->opt[1]);
+
+ matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]);
+ repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]);
+
+ if (matchByte == currentByte)
+ {
+ UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState);
+ if (shortRepPrice < p->opt[1].price)
+ {
+ p->opt[1].price = shortRepPrice;
+ MakeAsShortRep(&p->opt[1]);
+ }
+ }
+ lenEnd = ((lenMain >= repLens[repMaxIndex]) ? lenMain : repLens[repMaxIndex]);
+
+ if (lenEnd < 2)
+ {
+ *backRes = p->opt[1].backPrev;
+ return 1;
+ }
+
+ p->opt[1].posPrev = 0;
+ for (i = 0; i < LZMA_NUM_REPS; i++)
+ p->opt[0].backs[i] = reps[i];
+
+ len = lenEnd;
+ do
+ p->opt[len--].price = kInfinityPrice;
+ while (len >= 2);
+
+ for (i = 0; i < LZMA_NUM_REPS; i++)
+ {
+ UInt32 repLen = repLens[i];
+ UInt32 price;
+ if (repLen < 2)
+ continue;
+ price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState);
+ do
+ {
+ UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2];
+ COptimal *opt = &p->opt[repLen];
+ if (curAndLenPrice < opt->price)
+ {
+ opt->price = curAndLenPrice;
+ opt->posPrev = 0;
+ opt->backPrev = i;
+ opt->prev1IsChar = False;
+ }
+ }
+ while (--repLen >= 2);
+ }
+
+ normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]);
+
+ len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2);
+ if (len <= lenMain)
+ {
+ UInt32 offs = 0;
+ while (len > matchDistances[offs])
+ offs += 2;
+ for (; ; len++)
+ {
+ COptimal *opt;
+ UInt32 distance = matchDistances[offs + 1];
+
+ UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN];
+ UInt32 lenToPosState = GetLenToPosState(len);
+ if (distance < kNumFullDistances)
+ curAndLenPrice += p->distancesPrices[lenToPosState][distance];
+ else
+ {
+ UInt32 slot;
+ GetPosSlot2(distance, slot);
+ curAndLenPrice += p->alignPrices[distance & kAlignMask] + p->posSlotPrices[lenToPosState][slot];
+ }
+ opt = &p->opt[len];
+ if (curAndLenPrice < opt->price)
+ {
+ opt->price = curAndLenPrice;
+ opt->posPrev = 0;
+ opt->backPrev = distance + LZMA_NUM_REPS;
+ opt->prev1IsChar = False;
+ }
+ if (len == matchDistances[offs])
+ {
+ offs += 2;
+ if (offs == numDistancePairs)
+ break;
+ }
+ }
+ }
+
+ cur = 0;
+
+ #ifdef SHOW_STAT2
+ if (position >= 0)
+ {
+ unsigned i;
+ printf("\n pos = %4X", position);
+ for (i = cur; i <= lenEnd; i++)
+ printf("\nprice[%4X] = %d", position - cur + i, p->opt[i].price);
+ }
+ #endif
+
+ for (;;)
+ {
+ UInt32 numAvailableBytesFull, newLen, numDistancePairs;
+ COptimal *curOpt;
+ UInt32 posPrev;
+ UInt32 state;
+ UInt32 curPrice;
+ Bool nextIsChar;
+ const Byte *data;
+ Byte currentByte, matchByte;
+ UInt32 posState;
+ UInt32 curAnd1Price;
+ COptimal *nextOpt;
+ UInt32 matchPrice, repMatchPrice;
+ UInt32 numAvailableBytes;
+ UInt32 startLen;
+
+ cur++;
+ if (cur == lenEnd)
+ return Backward(p, backRes, cur);
+
+ numAvailableBytesFull = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
+ newLen = ReadMatchDistances(p, &numDistancePairs);
+ if (newLen >= p->numFastBytes)
+ {
+ p->numDistancePairs = numDistancePairs;
+ p->longestMatchLength = newLen;
+ p->longestMatchWasFound = True;
+ return Backward(p, backRes, cur);
+ }
+ position++;
+ curOpt = &p->opt[cur];
+ posPrev = curOpt->posPrev;
+ if (curOpt->prev1IsChar)
+ {
+ posPrev--;
+ if (curOpt->prev2)
+ {
+ state = p->opt[curOpt->posPrev2].state;
+ if (curOpt->backPrev2 < LZMA_NUM_REPS)
+ state = kRepNextStates[state];
+ else
+ state = kMatchNextStates[state];
+ }
+ else
+ state = p->opt[posPrev].state;
+ state = kLiteralNextStates[state];
+ }
+ else
+ state = p->opt[posPrev].state;
+ if (posPrev == cur - 1)
+ {
+ if (IsShortRep(curOpt))
+ state = kShortRepNextStates[state];
+ else
+ state = kLiteralNextStates[state];
+ }
+ else
+ {
+ UInt32 pos;
+ const COptimal *prevOpt;
+ if (curOpt->prev1IsChar && curOpt->prev2)
+ {
+ posPrev = curOpt->posPrev2;
+ pos = curOpt->backPrev2;
+ state = kRepNextStates[state];
+ }
+ else
+ {
+ pos = curOpt->backPrev;
+ if (pos < LZMA_NUM_REPS)
+ state = kRepNextStates[state];
+ else
+ state = kMatchNextStates[state];
+ }
+ prevOpt = &p->opt[posPrev];
+ if (pos < LZMA_NUM_REPS)
+ {
+ UInt32 i;
+ reps[0] = prevOpt->backs[pos];
+ for (i = 1; i <= pos; i++)
+ reps[i] = prevOpt->backs[i - 1];
+ for (; i < LZMA_NUM_REPS; i++)
+ reps[i] = prevOpt->backs[i];
+ }
+ else
+ {
+ UInt32 i;
+ reps[0] = (pos - LZMA_NUM_REPS);
+ for (i = 1; i < LZMA_NUM_REPS; i++)
+ reps[i] = prevOpt->backs[i - 1];
+ }
+ }
+ curOpt->state = (CState)state;
+
+ curOpt->backs[0] = reps[0];
+ curOpt->backs[1] = reps[1];
+ curOpt->backs[2] = reps[2];
+ curOpt->backs[3] = reps[3];
+
+ curPrice = curOpt->price;
+ nextIsChar = False;
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+ currentByte = *data;
+ matchByte = *(data - (reps[0] + 1));
+
+ posState = (position & p->pbMask);
+
+ curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]);
+ {
+ const CLzmaProb *probs = LIT_PROBS(position, *(data - 1));
+ curAnd1Price +=
+ (!IsCharState(state) ?
+ LitEnc_GetPriceMatched(probs, currentByte, matchByte, p->ProbPrices) :
+ LitEnc_GetPrice(probs, currentByte, p->ProbPrices));
+ }
+
+ nextOpt = &p->opt[cur + 1];
+
+ if (curAnd1Price < nextOpt->price)
+ {
+ nextOpt->price = curAnd1Price;
+ nextOpt->posPrev = cur;
+ MakeAsChar(nextOpt);
+ nextIsChar = True;
+ }
+
+ matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]);
+ repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]);
+
+ if (matchByte == currentByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0))
+ {
+ UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState);
+ if (shortRepPrice <= nextOpt->price)
+ {
+ nextOpt->price = shortRepPrice;
+ nextOpt->posPrev = cur;
+ MakeAsShortRep(nextOpt);
+ nextIsChar = True;
+ }
+ }
+
+ {
+ UInt32 temp = kNumOpts - 1 - cur;
+ if (temp < numAvailableBytesFull)
+ numAvailableBytesFull = temp;
+ }
+ numAvailableBytes = numAvailableBytesFull;
+
+ if (numAvailableBytes < 2)
+ continue;
+ if (numAvailableBytes > p->numFastBytes)
+ numAvailableBytes = p->numFastBytes;
+ if (!nextIsChar && matchByte != currentByte) /* speed optimization */
+ {
+ /* try Literal + rep0 */
+ UInt32 temp;
+ UInt32 lenTest2;
+ const Byte *data2 = data - (reps[0] + 1);
+ UInt32 limit = p->numFastBytes + 1;
+ if (limit > numAvailableBytesFull)
+ limit = numAvailableBytesFull;
+
+ for (temp = 1; temp < limit && data[temp] == data2[temp]; temp++);
+ lenTest2 = temp - 1;
+ if (lenTest2 >= 2)
+ {
+ UInt32 state2 = kLiteralNextStates[state];
+ UInt32 posStateNext = (position + 1) & p->pbMask;
+ UInt32 nextRepMatchPrice = curAnd1Price +
+ GET_PRICE_1(p->isMatch[state2][posStateNext]) +
+ GET_PRICE_1(p->isRep[state2]);
+ /* for (; lenTest2 >= 2; lenTest2--) */
+ {
+ UInt32 curAndLenPrice;
+ COptimal *opt;
+ UInt32 offset = cur + 1 + lenTest2;
+ while (lenEnd < offset)
+ p->opt[++lenEnd].price = kInfinityPrice;
+ curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext);
+ opt = &p->opt[offset];
+ if (curAndLenPrice < opt->price)
+ {
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur + 1;
+ opt->backPrev = 0;
+ opt->prev1IsChar = True;
+ opt->prev2 = False;
+ }
+ }
+ }
+ }
+
+ startLen = 2; /* speed optimization */
+ {
+ UInt32 repIndex;
+ for (repIndex = 0; repIndex < LZMA_NUM_REPS; repIndex++)
+ {
+ UInt32 lenTest;
+ UInt32 lenTestTemp;
+ UInt32 price;
+ const Byte *data2 = data - (reps[repIndex] + 1);
+ if (data[0] != data2[0] || data[1] != data2[1])
+ continue;
+ for (lenTest = 2; lenTest < numAvailableBytes && data[lenTest] == data2[lenTest]; lenTest++);
+ while (lenEnd < cur + lenTest)
+ p->opt[++lenEnd].price = kInfinityPrice;
+ lenTestTemp = lenTest;
+ price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState);
+ do
+ {
+ UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2];
+ COptimal *opt = &p->opt[cur + lenTest];
+ if (curAndLenPrice < opt->price)
+ {
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur;
+ opt->backPrev = repIndex;
+ opt->prev1IsChar = False;
+ }
+ }
+ while (--lenTest >= 2);
+ lenTest = lenTestTemp;
+
+ if (repIndex == 0)
+ startLen = lenTest + 1;
+
+ /* if (_maxMode) */
+ {
+ UInt32 lenTest2 = lenTest + 1;
+ UInt32 limit = lenTest2 + p->numFastBytes;
+ UInt32 nextRepMatchPrice;
+ if (limit > numAvailableBytesFull)
+ limit = numAvailableBytesFull;
+ for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++);
+ lenTest2 -= lenTest + 1;
+ if (lenTest2 >= 2)
+ {
+ UInt32 state2 = kRepNextStates[state];
+ UInt32 posStateNext = (position + lenTest) & p->pbMask;
+ UInt32 curAndLenCharPrice =
+ price + p->repLenEnc.prices[posState][lenTest - 2] +
+ GET_PRICE_0(p->isMatch[state2][posStateNext]) +
+ LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]),
+ data[lenTest], data2[lenTest], p->ProbPrices);
+ state2 = kLiteralNextStates[state2];
+ posStateNext = (position + lenTest + 1) & p->pbMask;
+ nextRepMatchPrice = curAndLenCharPrice +
+ GET_PRICE_1(p->isMatch[state2][posStateNext]) +
+ GET_PRICE_1(p->isRep[state2]);
+
+ /* for (; lenTest2 >= 2; lenTest2--) */
+ {
+ UInt32 curAndLenPrice;
+ COptimal *opt;
+ UInt32 offset = cur + lenTest + 1 + lenTest2;
+ while (lenEnd < offset)
+ p->opt[++lenEnd].price = kInfinityPrice;
+ curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext);
+ opt = &p->opt[offset];
+ if (curAndLenPrice < opt->price)
+ {
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur + lenTest + 1;
+ opt->backPrev = 0;
+ opt->prev1IsChar = True;
+ opt->prev2 = True;
+ opt->posPrev2 = cur;
+ opt->backPrev2 = repIndex;
+ }
+ }
+ }
+ }
+ }
+ }
+ /* for (UInt32 lenTest = 2; lenTest <= newLen; lenTest++) */
+ if (newLen > numAvailableBytes)
+ {
+ newLen = numAvailableBytes;
+ for (numDistancePairs = 0; newLen > matchDistances[numDistancePairs]; numDistancePairs += 2);
+ matchDistances[numDistancePairs] = newLen;
+ numDistancePairs += 2;
+ }
+ if (newLen >= startLen)
+ {
+ UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]);
+ UInt32 offs, curBack, posSlot;
+ UInt32 lenTest;
+ while (lenEnd < cur + newLen)
+ p->opt[++lenEnd].price = kInfinityPrice;
+
+ offs = 0;
+ while (startLen > matchDistances[offs])
+ offs += 2;
+ curBack = matchDistances[offs + 1];
+ GetPosSlot2(curBack, posSlot);
+ for (lenTest = /*2*/ startLen; ; lenTest++)
+ {
+ UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN];
+ UInt32 lenToPosState = GetLenToPosState(lenTest);
+ COptimal *opt;
+ if (curBack < kNumFullDistances)
+ curAndLenPrice += p->distancesPrices[lenToPosState][curBack];
+ else
+ curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask];
+
+ opt = &p->opt[cur + lenTest];
+ if (curAndLenPrice < opt->price)
+ {
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur;
+ opt->backPrev = curBack + LZMA_NUM_REPS;
+ opt->prev1IsChar = False;
+ }
+
+ if (/*_maxMode && */lenTest == matchDistances[offs])
+ {
+ /* Try Match + Literal + Rep0 */
+ const Byte *data2 = data - (curBack + 1);
+ UInt32 lenTest2 = lenTest + 1;
+ UInt32 limit = lenTest2 + p->numFastBytes;
+ UInt32 nextRepMatchPrice;
+ if (limit > numAvailableBytesFull)
+ limit = numAvailableBytesFull;
+ for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++);
+ lenTest2 -= lenTest + 1;
+ if (lenTest2 >= 2)
+ {
+ UInt32 state2 = kMatchNextStates[state];
+ UInt32 posStateNext = (position + lenTest) & p->pbMask;
+ UInt32 curAndLenCharPrice = curAndLenPrice +
+ GET_PRICE_0(p->isMatch[state2][posStateNext]) +
+ LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]),
+ data[lenTest], data2[lenTest], p->ProbPrices);
+ state2 = kLiteralNextStates[state2];
+ posStateNext = (posStateNext + 1) & p->pbMask;
+ nextRepMatchPrice = curAndLenCharPrice +
+ GET_PRICE_1(p->isMatch[state2][posStateNext]) +
+ GET_PRICE_1(p->isRep[state2]);
+
+ /* for (; lenTest2 >= 2; lenTest2--) */
+ {
+ UInt32 offset = cur + lenTest + 1 + lenTest2;
+ UInt32 curAndLenPrice;
+ COptimal *opt;
+ while (lenEnd < offset)
+ p->opt[++lenEnd].price = kInfinityPrice;
+ curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext);
+ opt = &p->opt[offset];
+ if (curAndLenPrice < opt->price)
+ {
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur + lenTest + 1;
+ opt->backPrev = 0;
+ opt->prev1IsChar = True;
+ opt->prev2 = True;
+ opt->posPrev2 = cur;
+ opt->backPrev2 = curBack + LZMA_NUM_REPS;
+ }
+ }
+ }
+ offs += 2;
+ if (offs == numDistancePairs)
+ break;
+ curBack = matchDistances[offs + 1];
+ if (curBack >= kNumFullDistances)
+ GetPosSlot2(curBack, posSlot);
+ }
+ }
+ }
+ }
+}
+
+#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist))
+
+static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes)
+{
+ UInt32 numAvailableBytes = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
+ UInt32 lenMain, numDistancePairs;
+ const Byte *data;
+ UInt32 repLens[LZMA_NUM_REPS];
+ UInt32 repMaxIndex, i;
+ UInt32 *matchDistances;
+ UInt32 backMain;
+
+ if (!p->longestMatchWasFound)
+ {
+ lenMain = ReadMatchDistances(p, &numDistancePairs);
+ }
+ else
+ {
+ lenMain = p->longestMatchLength;
+ numDistancePairs = p->numDistancePairs;
+ p->longestMatchWasFound = False;
+ }
+
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+ if (numAvailableBytes > LZMA_MATCH_LEN_MAX)
+ numAvailableBytes = LZMA_MATCH_LEN_MAX;
+ if (numAvailableBytes < 2)
+ {
+ *backRes = (UInt32)(-1);
+ return 1;
+ }
+
+ repMaxIndex = 0;
+
+ for (i = 0; i < LZMA_NUM_REPS; i++)
+ {
+ const Byte *data2 = data - (p->reps[i] + 1);
+ UInt32 len;
+ if (data[0] != data2[0] || data[1] != data2[1])
+ {
+ repLens[i] = 0;
+ continue;
+ }
+ for (len = 2; len < numAvailableBytes && data[len] == data2[len]; len++);
+ if (len >= p->numFastBytes)
+ {
+ *backRes = i;
+ MovePos(p, len - 1);
+ return len;
+ }
+ repLens[i] = len;
+ if (len > repLens[repMaxIndex])
+ repMaxIndex = i;
+ }
+ matchDistances = p->matchDistances;
+ if (lenMain >= p->numFastBytes)
+ {
+ *backRes = matchDistances[numDistancePairs - 1] + LZMA_NUM_REPS;
+ MovePos(p, lenMain - 1);
+ return lenMain;
+ }
+
+ backMain = 0; /* for GCC */
+ if (lenMain >= 2)
+ {
+ backMain = matchDistances[numDistancePairs - 1];
+ while (numDistancePairs > 2 && lenMain == matchDistances[numDistancePairs - 4] + 1)
+ {
+ if (!ChangePair(matchDistances[numDistancePairs - 3], backMain))
+ break;
+ numDistancePairs -= 2;
+ lenMain = matchDistances[numDistancePairs - 2];
+ backMain = matchDistances[numDistancePairs - 1];
+ }
+ if (lenMain == 2 && backMain >= 0x80)
+ lenMain = 1;
+ }
+
+ if (repLens[repMaxIndex] >= 2)
+ {
+ if (repLens[repMaxIndex] + 1 >= lenMain ||
+ (repLens[repMaxIndex] + 2 >= lenMain && (backMain > (1 << 9))) ||
+ (repLens[repMaxIndex] + 3 >= lenMain && (backMain > (1 << 15))))
+ {
+ UInt32 lenRes;
+ *backRes = repMaxIndex;
+ lenRes = repLens[repMaxIndex];
+ MovePos(p, lenRes - 1);
+ return lenRes;
+ }
+ }
+
+ if (lenMain >= 2 && numAvailableBytes > 2)
+ {
+ UInt32 i;
+ numAvailableBytes = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
+ p->longestMatchLength = ReadMatchDistances(p, &p->numDistancePairs);
+ if (p->longestMatchLength >= 2)
+ {
+ UInt32 newDistance = matchDistances[p->numDistancePairs - 1];
+ if ((p->longestMatchLength >= lenMain && newDistance < backMain) ||
+ (p->longestMatchLength == lenMain + 1 && !ChangePair(backMain, newDistance)) ||
+ (p->longestMatchLength > lenMain + 1) ||
+ (p->longestMatchLength + 1 >= lenMain && lenMain >= 3 && ChangePair(newDistance, backMain)))
+ {
+ p->longestMatchWasFound = True;
+ *backRes = (UInt32)(-1);
+ return 1;
+ }
+ }
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+ for (i = 0; i < LZMA_NUM_REPS; i++)
+ {
+ UInt32 len;
+ const Byte *data2 = data - (p->reps[i] + 1);
+ if (data[1] != data2[1] || data[2] != data2[2])
+ {
+ repLens[i] = 0;
+ continue;
+ }
+ for (len = 2; len < numAvailableBytes && data[len] == data2[len]; len++);
+ if (len + 1 >= lenMain)
+ {
+ p->longestMatchWasFound = True;
+ *backRes = (UInt32)(-1);
+ return 1;
+ }
+ }
+ *backRes = backMain + LZMA_NUM_REPS;
+ MovePos(p, lenMain - 2);
+ return lenMain;
+ }
+ *backRes = (UInt32)(-1);
+ return 1;
+}
+
+static void WriteEndMarker(CLzmaEnc *p, UInt32 posState)
+{
+ UInt32 len;
+ RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
+ RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
+ p->state = kMatchNextStates[p->state];
+ len = LZMA_MATCH_LEN_MIN;
+ LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
+ RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1);
+ RangeEnc_EncodeDirectBits(&p->rc, (((UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits);
+ RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask);
+}
+
+static SRes CheckErrors(CLzmaEnc *p)
+{
+ if (p->result != SZ_OK)
+ return p->result;
+ if (p->rc.res != SZ_OK)
+ p->result = SZ_ERROR_WRITE;
+ if (p->matchFinderBase.result != SZ_OK)
+ p->result = SZ_ERROR_READ;
+ if (p->result != SZ_OK)
+ p->finished = True;
+ return p->result;
+}
+
+static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
+{
+ /* ReleaseMFStream(); */
+ p->finished = True;
+ if (p->writeEndMark)
+ WriteEndMarker(p, nowPos & p->pbMask);
+ RangeEnc_FlushData(&p->rc);
+ RangeEnc_FlushStream(&p->rc);
+ return CheckErrors(p);
+}
+
+static void FillAlignPrices(CLzmaEnc *p)
+{
+ UInt32 i;
+ for (i = 0; i < kAlignTableSize; i++)
+ p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices);
+ p->alignPriceCount = 0;
+}
+
+static void FillDistancesPrices(CLzmaEnc *p)
+{
+ UInt32 tempPrices[kNumFullDistances];
+ UInt32 i, lenToPosState;
+ for (i = kStartPosModelIndex; i < kNumFullDistances; i++)
+ {
+ UInt32 posSlot = GetPosSlot1(i);
+ UInt32 footerBits = ((posSlot >> 1) - 1);
+ UInt32 base = ((2 | (posSlot & 1)) << footerBits);
+ tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base - posSlot - 1, footerBits, i - base, p->ProbPrices);
+ }
+
+ for (lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++)
+ {
+ UInt32 posSlot;
+ const CLzmaProb *encoder = p->posSlotEncoder[lenToPosState];
+ UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState];
+ for (posSlot = 0; posSlot < p->distTableSize; posSlot++)
+ posSlotPrices[posSlot] = RcTree_GetPrice(encoder, kNumPosSlotBits, posSlot, p->ProbPrices);
+ for (posSlot = kEndPosModelIndex; posSlot < p->distTableSize; posSlot++)
+ posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << kNumBitPriceShiftBits);
+
+ {
+ UInt32 *distancesPrices = p->distancesPrices[lenToPosState];
+ UInt32 i;
+ for (i = 0; i < kStartPosModelIndex; i++)
+ distancesPrices[i] = posSlotPrices[i];
+ for (; i < kNumFullDistances; i++)
+ distancesPrices[i] = posSlotPrices[GetPosSlot1(i)] + tempPrices[i];
+ }
+ }
+ p->matchPriceCount = 0;
+}
+
+void LzmaEnc_Construct(CLzmaEnc *p)
+{
+ RangeEnc_Construct(&p->rc);
+ MatchFinder_Construct(&p->matchFinderBase);
+ #ifdef COMPRESS_MF_MT
+ MatchFinderMt_Construct(&p->matchFinderMt);
+ p->matchFinderMt.MatchFinder = &p->matchFinderBase;
+ #endif
+
+ {
+ CLzmaEncProps props;
+ LzmaEncProps_Init(&props);
+ LzmaEnc_SetProps(p, &props);
+ }
+
+ #ifndef LZMA_LOG_BSR
+ LzmaEnc_FastPosInit(p->g_FastPos);
+ #endif
+
+ LzmaEnc_InitPriceTables(p->ProbPrices);
+ p->litProbs = 0;
+ p->saveState.litProbs = 0;
+}
+
+CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc)
+{
+ void *p;
+ p = alloc->Alloc(alloc, sizeof(CLzmaEnc));
+ if (p != 0)
+ LzmaEnc_Construct((CLzmaEnc *)p);
+ return p;
+}
+
+void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
+{
+ alloc->Free(alloc, p->litProbs);
+ alloc->Free(alloc, p->saveState.litProbs);
+ p->litProbs = 0;
+ p->saveState.litProbs = 0;
+}
+
+void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ #ifdef COMPRESS_MF_MT
+ MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
+ #endif
+ MatchFinder_Free(&p->matchFinderBase, allocBig);
+ LzmaEnc_FreeLits(p, alloc);
+ RangeEnc_Free(&p->rc, alloc);
+}
+
+void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig);
+ alloc->Free(alloc, p);
+}
+
+static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize, UInt32 maxUnpackSize)
+{
+ UInt32 nowPos32, startPos32;
+ if (p->inStream != 0)
+ {
+ p->matchFinderBase.stream = p->inStream;
+ p->matchFinder.Init(p->matchFinderObj);
+ p->inStream = 0;
+ }
+
+ if (p->finished)
+ return p->result;
+ RINOK(CheckErrors(p));
+
+ nowPos32 = (UInt32)p->nowPos64;
+ startPos32 = nowPos32;
+
+ if (p->nowPos64 == 0)
+ {
+ UInt32 numDistancePairs;
+ Byte curByte;
+ if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0)
+ return Flush(p, nowPos32);
+ ReadMatchDistances(p, &numDistancePairs);
+ RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0);
+ p->state = kLiteralNextStates[p->state];
+ curByte = p->matchFinder.GetIndexByte(p->matchFinderObj, 0 - p->additionalOffset);
+ LitEnc_Encode(&p->rc, p->litProbs, curByte);
+ p->additionalOffset--;
+ nowPos32++;
+ }
+
+ if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0)
+ for (;;)
+ {
+ UInt32 pos, len, posState;
+
+ if (p->fastMode)
+ len = GetOptimumFast(p, &pos);
+ else
+ len = GetOptimum(p, nowPos32, &pos);
+
+ #ifdef SHOW_STAT2
+ printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos);
+ #endif
+
+ posState = nowPos32 & p->pbMask;
+ if (len == 1 && pos == 0xFFFFFFFF)
+ {
+ Byte curByte;
+ CLzmaProb *probs;
+ const Byte *data;
+
+ RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0);
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
+ curByte = *data;
+ probs = LIT_PROBS(nowPos32, *(data - 1));
+ if (IsCharState(p->state))
+ LitEnc_Encode(&p->rc, probs, curByte);
+ else
+ LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1));
+ p->state = kLiteralNextStates[p->state];
+ }
+ else
+ {
+ RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
+ if (pos < LZMA_NUM_REPS)
+ {
+ RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1);
+ if (pos == 0)
+ {
+ RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0);
+ RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1));
+ }
+ else
+ {
+ UInt32 distance = p->reps[pos];
+ RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1);
+ if (pos == 1)
+ RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0);
+ else
+ {
+ RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1);
+ RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2);
+ if (pos == 3)
+ p->reps[3] = p->reps[2];
+ p->reps[2] = p->reps[1];
+ }
+ p->reps[1] = p->reps[0];
+ p->reps[0] = distance;
+ }
+ if (len == 1)
+ p->state = kShortRepNextStates[p->state];
+ else
+ {
+ LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
+ p->state = kRepNextStates[p->state];
+ }
+ }
+ else
+ {
+ UInt32 posSlot;
+ RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
+ p->state = kMatchNextStates[p->state];
+ LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
+ pos -= LZMA_NUM_REPS;
+ GetPosSlot(pos, posSlot);
+ RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot);
+
+ if (posSlot >= kStartPosModelIndex)
+ {
+ UInt32 footerBits = ((posSlot >> 1) - 1);
+ UInt32 base = ((2 | (posSlot & 1)) << footerBits);
+ UInt32 posReduced = pos - base;
+
+ if (posSlot < kEndPosModelIndex)
+ RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced);
+ else
+ {
+ RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits);
+ RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask);
+ p->alignPriceCount++;
+ }
+ }
+ p->reps[3] = p->reps[2];
+ p->reps[2] = p->reps[1];
+ p->reps[1] = p->reps[0];
+ p->reps[0] = pos;
+ p->matchPriceCount++;
+ }
+ }
+ p->additionalOffset -= len;
+ nowPos32 += len;
+ if (p->additionalOffset == 0)
+ {
+ UInt32 processed;
+ if (!p->fastMode)
+ {
+ if (p->matchPriceCount >= (1 << 7))
+ FillDistancesPrices(p);
+ if (p->alignPriceCount >= kAlignTableSize)
+ FillAlignPrices(p);
+ }
+ if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0)
+ break;
+ processed = nowPos32 - startPos32;
+ if (useLimits)
+ {
+ if (processed + kNumOpts + 300 >= maxUnpackSize ||
+ RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize)
+ break;
+ }
+ else if (processed >= (1 << 15))
+ {
+ p->nowPos64 += nowPos32 - startPos32;
+ return CheckErrors(p);
+ }
+ }
+ }
+ p->nowPos64 += nowPos32 - startPos32;
+ return Flush(p, nowPos32);
+}
+
+#define kBigHashDicLimit ((UInt32)1 << 24)
+
+static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ UInt32 beforeSize = kNumOpts;
+ Bool btMode;
+ if (!RangeEnc_Alloc(&p->rc, alloc))
+ return SZ_ERROR_MEM;
+ btMode = (p->matchFinderBase.btMode != 0);
+ #ifdef COMPRESS_MF_MT
+ p->mtMode = (p->multiThread && !p->fastMode && btMode);
+ #endif
+
+ {
+ unsigned lclp = p->lc + p->lp;
+ if (p->litProbs == 0 || p->saveState.litProbs == 0 || p->lclp != lclp)
+ {
+ LzmaEnc_FreeLits(p, alloc);
+ p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb));
+ p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb));
+ if (p->litProbs == 0 || p->saveState.litProbs == 0)
+ {
+ LzmaEnc_FreeLits(p, alloc);
+ return SZ_ERROR_MEM;
+ }
+ p->lclp = lclp;
+ }
+ }
+
+ p->matchFinderBase.bigHash = (p->dictSize > kBigHashDicLimit);
+
+ if (beforeSize + p->dictSize < keepWindowSize)
+ beforeSize = keepWindowSize - p->dictSize;
+
+ #ifdef COMPRESS_MF_MT
+ if (p->mtMode)
+ {
+ RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig));
+ p->matchFinderObj = &p->matchFinderMt;
+ MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder);
+ }
+ else
+ #endif
+ {
+ if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig))
+ return SZ_ERROR_MEM;
+ p->matchFinderObj = &p->matchFinderBase;
+ MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder);
+ }
+ return SZ_OK;
+}
+
+void LzmaEnc_Init(CLzmaEnc *p)
+{
+ UInt32 i;
+ p->state = 0;
+ for(i = 0 ; i < LZMA_NUM_REPS; i++)
+ p->reps[i] = 0;
+
+ RangeEnc_Init(&p->rc);
+
+
+ for (i = 0; i < kNumStates; i++)
+ {
+ UInt32 j;
+ for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++)
+ {
+ p->isMatch[i][j] = kProbInitValue;
+ p->isRep0Long[i][j] = kProbInitValue;
+ }
+ p->isRep[i] = kProbInitValue;
+ p->isRepG0[i] = kProbInitValue;
+ p->isRepG1[i] = kProbInitValue;
+ p->isRepG2[i] = kProbInitValue;
+ }
+
+ {
+ UInt32 num = 0x300 << (p->lp + p->lc);
+ for (i = 0; i < num; i++)
+ p->litProbs[i] = kProbInitValue;
+ }
+
+ {
+ for (i = 0; i < kNumLenToPosStates; i++)
+ {
+ CLzmaProb *probs = p->posSlotEncoder[i];
+ UInt32 j;
+ for (j = 0; j < (1 << kNumPosSlotBits); j++)
+ probs[j] = kProbInitValue;
+ }
+ }
+ {
+ for(i = 0; i < kNumFullDistances - kEndPosModelIndex; i++)
+ p->posEncoders[i] = kProbInitValue;
+ }
+
+ LenEnc_Init(&p->lenEnc.p);
+ LenEnc_Init(&p->repLenEnc.p);
+
+ for (i = 0; i < (1 << kNumAlignBits); i++)
+ p->posAlignEncoder[i] = kProbInitValue;
+
+ p->longestMatchWasFound = False;
+ p->optimumEndIndex = 0;
+ p->optimumCurrentIndex = 0;
+ p->additionalOffset = 0;
+
+ p->pbMask = (1 << p->pb) - 1;
+ p->lpMask = (1 << p->lp) - 1;
+}
+
+void LzmaEnc_InitPrices(CLzmaEnc *p)
+{
+ if (!p->fastMode)
+ {
+ FillDistancesPrices(p);
+ FillAlignPrices(p);
+ }
+
+ p->lenEnc.tableSize =
+ p->repLenEnc.tableSize =
+ p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN;
+ LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, p->ProbPrices);
+ LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, p->ProbPrices);
+}
+
+static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ UInt32 i;
+ for (i = 0; i < (UInt32)kDicLogSizeMaxCompress; i++)
+ if (p->dictSize <= ((UInt32)1 << i))
+ break;
+ p->distTableSize = i * 2;
+
+ p->finished = False;
+ p->result = SZ_OK;
+ RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig));
+ LzmaEnc_Init(p);
+ LzmaEnc_InitPrices(p);
+ p->nowPos64 = 0;
+ return SZ_OK;
+}
+
+static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqInStream *inStream, ISeqOutStream *outStream,
+ ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ p->inStream = inStream;
+ p->rc.outStream = outStream;
+ return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig);
+}
+
+SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
+ ISeqInStream *inStream, UInt32 keepWindowSize,
+ ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ p->inStream = inStream;
+ return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
+}
+
+static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
+{
+ p->seqBufInStream.funcTable.Read = MyRead;
+ p->seqBufInStream.data = src;
+ p->seqBufInStream.rem = srcLen;
+}
+
+SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
+ UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ LzmaEnc_SetInputBuf(p, src, srcLen);
+ p->inStream = &p->seqBufInStream.funcTable;
+ return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
+}
+
+void LzmaEnc_Finish(CLzmaEncHandle pp)
+{
+ #ifdef COMPRESS_MF_MT
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ if (p->mtMode)
+ MatchFinderMt_ReleaseStream(&p->matchFinderMt);
+ #else
+ (void)pp;
+ #endif
+}
+
+typedef struct _CSeqOutStreamBuf
+{
+ ISeqOutStream funcTable;
+ Byte *data;
+ SizeT rem;
+ Bool overflow;
+} CSeqOutStreamBuf;
+
+static size_t MyWrite(void *pp, const void *data, size_t size)
+{
+ CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp;
+ if (p->rem < size)
+ {
+ size = p->rem;
+ p->overflow = True;
+ }
+ memcpy(p->data, data, size);
+ p->rem -= size;
+ p->data += size;
+ return size;
+}
+
+
+UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
+{
+ const CLzmaEnc *p = (CLzmaEnc *)pp;
+ return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
+}
+
+const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
+{
+ const CLzmaEnc *p = (CLzmaEnc *)pp;
+ return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
+}
+
+SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
+ Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ UInt64 nowPos64;
+ SRes res;
+ CSeqOutStreamBuf outStream;
+
+ outStream.funcTable.Write = MyWrite;
+ outStream.data = dest;
+ outStream.rem = *destLen;
+ outStream.overflow = False;
+
+ p->writeEndMark = False;
+ p->finished = False;
+ p->result = SZ_OK;
+
+ if (reInit)
+ LzmaEnc_Init(p);
+ LzmaEnc_InitPrices(p);
+ nowPos64 = p->nowPos64;
+ RangeEnc_Init(&p->rc);
+ p->rc.outStream = &outStream.funcTable;
+
+ res = LzmaEnc_CodeOneBlock(pp, True, desiredPackSize, *unpackSize);
+
+ *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
+ *destLen -= outStream.rem;
+ if (outStream.overflow)
+ return SZ_ERROR_OUTPUT_EOF;
+
+ return res;
+}
+
+SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress,
+ ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ SRes res = SZ_OK;
+
+ #ifdef COMPRESS_MF_MT
+ Byte allocaDummy[0x300];
+ int i = 0;
+ for (i = 0; i < 16; i++)
+ allocaDummy[i] = (Byte)i;
+ #endif
+
+ RINOK(LzmaEnc_Prepare(pp, inStream, outStream, alloc, allocBig));
+
+ for (;;)
+ {
+ res = LzmaEnc_CodeOneBlock(pp, False, 0, 0);
+ if (res != SZ_OK || p->finished != 0)
+ break;
+ if (progress != 0)
+ {
+ res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc));
+ if (res != SZ_OK)
+ {
+ res = SZ_ERROR_PROGRESS;
+ break;
+ }
+ }
+ }
+ LzmaEnc_Finish(pp);
+ return res;
+}
+
+SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
+{
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+ int i;
+ UInt32 dictSize = p->dictSize;
+ if (*size < LZMA_PROPS_SIZE)
+ return SZ_ERROR_PARAM;
+ *size = LZMA_PROPS_SIZE;
+ props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc);
+
+ for (i = 11; i <= 30; i++)
+ {
+ if (dictSize <= ((UInt32)2 << i))
+ {
+ dictSize = (2 << i);
+ break;
+ }
+ if (dictSize <= ((UInt32)3 << i))
+ {
+ dictSize = (3 << i);
+ break;
+ }
+ }
+
+ for (i = 0; i < 4; i++)
+ props[1 + i] = (Byte)(dictSize >> (8 * i));
+ return SZ_OK;
+}
+
+SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
+ int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ SRes res;
+ CLzmaEnc *p = (CLzmaEnc *)pp;
+
+ CSeqOutStreamBuf outStream;
+
+ LzmaEnc_SetInputBuf(p, src, srcLen);
+
+ outStream.funcTable.Write = MyWrite;
+ outStream.data = dest;
+ outStream.rem = *destLen;
+ outStream.overflow = False;
+
+ p->writeEndMark = writeEndMark;
+ res = LzmaEnc_Encode(pp, &outStream.funcTable, &p->seqBufInStream.funcTable,
+ progress, alloc, allocBig);
+
+ *destLen -= outStream.rem;
+ if (outStream.overflow)
+ return SZ_ERROR_OUTPUT_EOF;
+ return res;
+}
+
+SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
+ const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
+ ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig)
+{
+ CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc);
+ SRes res;
+ if (p == 0)
+ return SZ_ERROR_MEM;
+
+ res = LzmaEnc_SetProps(p, props);
+ if (res == SZ_OK)
+ {
+ res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize);
+ if (res == SZ_OK)
+ res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen,
+ writeEndMark, progress, alloc, allocBig);
+ }
+
+ LzmaEnc_Destroy(p, alloc, allocBig);
+ return res;
+}
diff --git a/grub-core/lib/arg.c b/grub-core/lib/arg.c
new file mode 100644
index 0000000..75b1dd5
--- /dev/null
+++ b/grub-core/lib/arg.c
@@ -0,0 +1,478 @@
+/* arg.c - argument parser */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/term.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+
+/* Built-in parser for default options. */
+#define SHORT_ARG_HELP -100
+#define SHORT_ARG_USAGE -101
+
+static const struct grub_arg_option help_options[] =
+ {
+ {"help", SHORT_ARG_HELP, 0,
+ N_("Display this help and exit."), 0, ARG_TYPE_NONE},
+ {"usage", SHORT_ARG_USAGE, 0,
+ N_("Display the usage of this command and exit."), 0, ARG_TYPE_NONE},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static struct grub_arg_option *
+find_short (const struct grub_arg_option *options, char c)
+{
+ struct grub_arg_option *found = 0;
+ auto struct grub_arg_option *fnd_short (const struct grub_arg_option *opt);
+
+ struct grub_arg_option *fnd_short (const struct grub_arg_option *opt)
+ {
+ while (opt->doc)
+ {
+ if (opt->shortarg == c)
+ return (struct grub_arg_option *) opt;
+ opt++;
+ }
+ return 0;
+ }
+
+ if (options)
+ found = fnd_short (options);
+
+ if (! found)
+ {
+ switch (c)
+ {
+ case 'h':
+ found = (struct grub_arg_option *) help_options;
+ break;
+
+ case 'u':
+ found = (struct grub_arg_option *) (help_options + 1);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return found;
+}
+
+static struct grub_arg_option *
+find_long (const struct grub_arg_option *options, const char *s, int len)
+{
+ struct grub_arg_option *found = 0;
+ auto struct grub_arg_option *fnd_long (const struct grub_arg_option *opt);
+
+ struct grub_arg_option *fnd_long (const struct grub_arg_option *opt)
+ {
+ while (opt->doc)
+ {
+ if (opt->longarg && ! grub_strncmp (opt->longarg, s, len) &&
+ opt->longarg[len] == '\0')
+ return (struct grub_arg_option *) opt;
+ opt++;
+ }
+ return 0;
+ }
+
+ if (options)
+ found = fnd_long (options);
+
+ if (! found)
+ found = fnd_long (help_options);
+
+ return found;
+}
+
+static void
+show_usage (grub_extcmd_t cmd)
+{
+ grub_printf ("%s %s %s\n", _("Usage:"), cmd->cmd->name, _(cmd->cmd->summary));
+}
+
+void
+grub_arg_show_help (grub_extcmd_t cmd)
+{
+ auto void showargs (const struct grub_arg_option *opt);
+ int h_is_used = 0;
+ int u_is_used = 0;
+
+ auto void showargs (const struct grub_arg_option *opt)
+ {
+ for (; opt->doc; opt++)
+ {
+ int spacing = 20;
+
+ if (opt->shortarg && grub_isgraph (opt->shortarg))
+ grub_printf ("-%c%c ", opt->shortarg, opt->longarg ? ',':' ');
+ else if (opt->shortarg == SHORT_ARG_HELP && ! h_is_used)
+ grub_printf ("-h, ");
+ else if (opt->shortarg == SHORT_ARG_USAGE && ! u_is_used)
+ grub_printf ("-u, ");
+ else
+ grub_printf (" ");
+
+ if (opt->longarg)
+ {
+ grub_printf ("--%s", opt->longarg);
+ spacing -= grub_strlen (opt->longarg) + 2;
+
+ if (opt->arg)
+ {
+ grub_printf ("=%s", opt->arg);
+ spacing -= grub_strlen (opt->arg) + 1;
+ }
+ }
+
+ if (spacing < 0)
+ spacing = 3;
+
+ while (spacing--)
+ grub_xputs (" ");
+
+ grub_printf ("%s\n", _(opt->doc));
+
+ switch (opt->shortarg)
+ {
+ case 'h':
+ h_is_used = 1;
+ break;
+
+ case 'u':
+ u_is_used = 1;
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ show_usage (cmd);
+ grub_printf ("%s\n\n", _(cmd->cmd->description));
+ if (cmd->options)
+ showargs (cmd->options);
+ showargs (help_options);
+#if 0
+ grub_printf ("\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT);
+#endif
+}
+
+
+static int
+parse_option (grub_extcmd_t cmd, int key, char *arg, struct grub_arg_list *usr)
+{
+ switch (key)
+ {
+ case SHORT_ARG_HELP:
+ grub_arg_show_help (cmd);
+ return -1;
+
+ case SHORT_ARG_USAGE:
+ show_usage (cmd);
+ return -1;
+
+ default:
+ {
+ int found = -1;
+ int i = 0;
+ const struct grub_arg_option *opt = cmd->options;
+
+ while (opt->doc)
+ {
+ if (opt->shortarg && key == opt->shortarg)
+ {
+ found = i;
+ break;
+ }
+ opt++;
+ i++;
+ }
+
+ if (found == -1)
+ return -1;
+
+ if (opt->flags & GRUB_ARG_OPTION_REPEATABLE)
+ {
+ usr[found].args[usr[found].set++] = arg;
+ usr[found].args[usr[found].set] = NULL;
+ }
+ else
+ {
+ usr[found].set = 1;
+ usr[found].arg = arg;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int
+grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
+ struct grub_arg_list *usr, char ***args, int *argnum)
+{
+ int curarg;
+ int arglen;
+ char **argl = 0;
+ int num = 0;
+ auto grub_err_t add_arg (char *s);
+
+ grub_err_t add_arg (char *s)
+ {
+ char **p = argl;
+ argl = grub_realloc (argl, (++num + 1) * sizeof (char *));
+ if (! argl)
+ {
+ grub_free (p);
+ return grub_errno;
+ }
+ argl[num - 1] = s;
+ argl[num] = NULL;
+ return 0;
+ }
+
+
+ for (curarg = 0; curarg < argc; curarg++)
+ {
+ char *arg = argv[curarg];
+ struct grub_arg_option *opt;
+ char *option = 0;
+
+ /* No option is used. */
+ if ((num && (cmd->cmd->flags & GRUB_COMMAND_OPTIONS_AT_START))
+ || arg[0] != '-' || grub_strlen (arg) == 1)
+ {
+ if (add_arg (arg) != 0)
+ goto fail;
+
+ continue;
+ }
+
+ /* One or more short options. */
+ if (arg[1] != '-')
+ {
+ char *curshort;
+
+ if (cmd->cmd->flags & GRUB_COMMAND_ACCEPT_DASH)
+ {
+ for (curshort = arg + 1; *curshort; curshort++)
+ if (!find_short (cmd->options, *curshort))
+ break;
+
+ if (*curshort)
+ {
+ if (add_arg (arg) != 0)
+ goto fail;
+ continue;
+ }
+ }
+
+ curshort = arg + 1;
+
+ while (1)
+ {
+ opt = find_short (cmd->options, *curshort);
+
+ if (! opt)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "unknown argument `-%c'", *curshort);
+ goto fail;
+ }
+
+ curshort++;
+
+ /* Parse all arguments here except the last one because
+ it can have an argument value. */
+ if (*curshort)
+ {
+ if (parse_option (cmd, opt->shortarg, 0, usr) || grub_errno)
+ goto fail;
+ }
+ else
+ {
+ if (opt->type != ARG_TYPE_NONE)
+ {
+ if (curarg + 1 < argc)
+ {
+ char *nextarg = argv[curarg + 1];
+ if (!(opt->flags & GRUB_ARG_OPTION_OPTIONAL)
+ || (grub_strlen (nextarg) < 2 || nextarg[0] != '-'))
+ option = argv[++curarg];
+ }
+ }
+ break;
+ }
+ }
+
+ }
+ else /* The argument starts with "--". */
+ {
+ /* If the argument "--" is used just pass the other
+ arguments. */
+ if (grub_strlen (arg) == 2)
+ {
+ for (curarg++; curarg < argc; curarg++)
+ if (add_arg (argv[curarg]) != 0)
+ goto fail;
+ break;
+ }
+
+ option = grub_strchr (arg, '=');
+ if (option)
+ {
+ arglen = option - arg - 2;
+ option++;
+ }
+ else
+ arglen = grub_strlen (arg) - 2;
+
+ opt = find_long (cmd->options, arg + 2, arglen);
+
+ if (!option && argv[curarg + 1] && argv[curarg + 1][0] != '-'
+ && opt->type != ARG_TYPE_NONE)
+ option = argv[++curarg];
+
+ if (!opt && (cmd->cmd->flags & GRUB_COMMAND_ACCEPT_DASH))
+ {
+ if (add_arg (arg) != 0)
+ goto fail;
+ continue;
+ }
+
+ if (! opt)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown argument `%s'", arg);
+ goto fail;
+ }
+ }
+
+ if (! (opt->type == ARG_TYPE_NONE
+ || (! option && (opt->flags & GRUB_ARG_OPTION_OPTIONAL))))
+ {
+ if (! option)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "missing mandatory option for `%s'", opt->longarg);
+ goto fail;
+ }
+
+ switch (opt->type)
+ {
+ case ARG_TYPE_NONE:
+ /* This will never happen. */
+ break;
+
+ case ARG_TYPE_STRING:
+ /* No need to do anything. */
+ break;
+
+ case ARG_TYPE_INT:
+ {
+ char *tail;
+
+ grub_strtoull (option, &tail, 0);
+ if (tail == 0 || tail == option || *tail != '\0' || grub_errno)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "the argument `%s' requires an integer",
+ arg);
+
+ goto fail;
+ }
+ break;
+ }
+
+ case ARG_TYPE_DEVICE:
+ case ARG_TYPE_DIR:
+ case ARG_TYPE_FILE:
+ case ARG_TYPE_PATHNAME:
+ /* XXX: Not implemented. */
+ break;
+ }
+ if (parse_option (cmd, opt->shortarg, option, usr) || grub_errno)
+ goto fail;
+ }
+ else
+ {
+ if (option)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "a value was assigned to the argument `%s' while it "
+ "doesn't require an argument", arg);
+ goto fail;
+ }
+
+ if (parse_option (cmd, opt->shortarg, 0, usr) || grub_errno)
+ goto fail;
+ }
+ }
+
+ *args = argl;
+ *argnum = num;
+ return 1;
+
+ fail:
+ return 0;
+}
+
+struct grub_arg_list*
+grub_arg_list_alloc(grub_extcmd_t extcmd, int argc,
+ char **argv __attribute__((unused)))
+{
+ int i;
+ char **args;
+ unsigned argcnt;
+ struct grub_arg_list *list;
+ const struct grub_arg_option *options;
+
+ options = extcmd->options;
+ if (! options)
+ return 0;
+
+ argcnt = 0;
+ for (i = 0; options[i].doc; i++)
+ {
+ if (options[i].flags & GRUB_ARG_OPTION_REPEATABLE)
+ argcnt += (argc + 1) / 2 + 1; /* max possible for any option */
+ }
+
+ list = grub_zalloc (sizeof (*list) * i + sizeof (char*) * argcnt);
+ if (! list)
+ return 0;
+
+ args = (char**) (list + i);
+ for (i = 0; options[i].doc; i++)
+ {
+ list[i].set = 0;
+ list[i].arg = 0;
+
+ if (options[i].flags & GRUB_ARG_OPTION_REPEATABLE)
+ {
+ list[i].args = args;
+ args += argc / 2 + 1;
+ }
+ }
+ return list;
+}
diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c
new file mode 100644
index 0000000..a702e64
--- /dev/null
+++ b/grub-core/lib/cmdline.c
@@ -0,0 +1,105 @@
+/* cmdline.c - linux command line handling */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/lib/cmdline.h>
+#include <grub/misc.h>
+
+static unsigned int check_arg (char *c, int *has_space)
+{
+ int space = 0;
+ unsigned int size = 0;
+
+ while (*c)
+ {
+ if (*c == '\\' || *c == '\'' || *c == '"')
+ size++;
+ else if (*c == ' ')
+ space = 1;
+
+ size++;
+ c++;
+ }
+
+ if (space)
+ size += 2;
+
+ if (has_space)
+ *has_space = space;
+
+ return size;
+}
+
+unsigned int grub_loader_cmdline_size (int argc, char *argv[])
+{
+ int i;
+ unsigned int size = 0;
+
+ for (i = 0; i < argc; i++)
+ {
+ size += check_arg (argv[i], 0);
+ size++; /* Separator space or NULL. */
+ }
+
+ return size;
+}
+
+int grub_create_loader_cmdline (int argc, char *argv[], char *buf,
+ grub_size_t size)
+{
+ int i, space;
+ unsigned int arg_size;
+ char *c;
+
+ for (i = 0; i < argc; i++)
+ {
+ c = argv[i];
+ arg_size = check_arg(argv[i], &space);
+ arg_size++; /* Separator space or NULL. */
+
+ if (size < arg_size)
+ break;
+
+ size -= arg_size;
+
+ if (space)
+ *buf++ = '"';
+
+ while (*c)
+ {
+ if (*c == '\\' || *c == '\'' || *c == '"')
+ *buf++ = '\\';
+
+ *buf++ = *c;
+ c++;
+ }
+
+ if (space)
+ *buf++ = '"';
+
+ *buf++ = ' ';
+ }
+
+ /* Replace last space with null. */
+ if (i)
+ buf--;
+
+ *buf = 0;
+
+ return i;
+}
diff --git a/grub-core/lib/cmos_datetime.c b/grub-core/lib/cmos_datetime.c
new file mode 100644
index 0000000..73c5a03
--- /dev/null
+++ b/grub-core/lib/cmos_datetime.c
@@ -0,0 +1,158 @@
+/* kern/cmos_datetime.c - CMOS datetime function.
+ *
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/datetime.h>
+#include <grub/cmos.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+grub_err_t
+grub_get_datetime (struct grub_datetime *datetime)
+{
+ int is_bcd, is_12hour;
+ grub_uint8_t value, flag;
+
+ flag = grub_cmos_read (GRUB_CMOS_INDEX_STATUS_B);
+
+ is_bcd = ! (flag & GRUB_CMOS_STATUS_B_BINARY);
+
+ value = grub_cmos_read (GRUB_CMOS_INDEX_YEAR);
+ if (is_bcd)
+ value = grub_bcd_to_num (value);
+
+ datetime->year = value;
+ datetime->year += (value < 80) ? 2000 : 1900;
+
+ value = grub_cmos_read (GRUB_CMOS_INDEX_MONTH);
+ if (is_bcd)
+ value = grub_bcd_to_num (value);
+
+ datetime->month = value;
+
+ value = grub_cmos_read (GRUB_CMOS_INDEX_DAY_OF_MONTH);
+ if (is_bcd)
+ value = grub_bcd_to_num (value);
+
+ datetime->day = value;
+
+ is_12hour = ! (flag & GRUB_CMOS_STATUS_B_24HOUR);
+
+ value = grub_cmos_read (GRUB_CMOS_INDEX_HOUR);
+ if (is_12hour)
+ {
+ is_12hour = (value & 0x80);
+
+ value &= 0x7F;
+ value--;
+ }
+
+ if (is_bcd)
+ value = grub_bcd_to_num (value);
+
+ if (is_12hour)
+ value += 12;
+
+ datetime->hour = value;
+
+ value = grub_cmos_read (GRUB_CMOS_INDEX_MINUTE);
+ if (is_bcd)
+ value = grub_bcd_to_num (value);
+
+ datetime->minute = value;
+
+ value = grub_cmos_read (GRUB_CMOS_INDEX_SECOND);
+ if (is_bcd)
+ value = grub_bcd_to_num (value);
+
+ datetime->second = value;
+
+ return 0;
+}
+
+grub_err_t
+grub_set_datetime (struct grub_datetime *datetime)
+{
+ int is_bcd, is_12hour;
+ grub_uint8_t value, flag;
+
+ flag = grub_cmos_read (GRUB_CMOS_INDEX_STATUS_B);
+
+ is_bcd = ! (flag & GRUB_CMOS_STATUS_B_BINARY);
+
+ value = ((datetime->year >= 2000) ? datetime->year - 2000 :
+ datetime->year - 1900);
+
+ if (is_bcd)
+ value = grub_num_to_bcd (value);
+
+ grub_cmos_write (GRUB_CMOS_INDEX_YEAR, value);
+
+ value = datetime->month;
+
+ if (is_bcd)
+ value = grub_num_to_bcd (value);
+
+ grub_cmos_write (GRUB_CMOS_INDEX_MONTH, value);
+
+ value = datetime->day;
+
+ if (is_bcd)
+ value = grub_num_to_bcd (value);
+
+ grub_cmos_write (GRUB_CMOS_INDEX_DAY_OF_MONTH, value);
+
+ value = datetime->hour;
+
+ is_12hour = (! (flag & GRUB_CMOS_STATUS_B_24HOUR));
+
+ if (is_12hour)
+ {
+ value++;
+
+ if (value > 12)
+ value -= 12;
+ else
+ is_12hour = 0;
+ }
+
+ if (is_bcd)
+ value = grub_num_to_bcd (value);
+
+ if (is_12hour)
+ value |= 0x80;
+
+ grub_cmos_write (GRUB_CMOS_INDEX_HOUR, value);
+
+ value = datetime->minute;
+
+ if (is_bcd)
+ value = grub_num_to_bcd (value);
+
+ grub_cmos_write (GRUB_CMOS_INDEX_MINUTE, value);
+
+ value = datetime->second;
+
+ if (is_bcd)
+ value = grub_num_to_bcd (value);
+
+ grub_cmos_write (GRUB_CMOS_INDEX_SECOND, value);
+
+ return 0;
+}
diff --git a/grub-core/lib/crc.c b/grub-core/lib/crc.c
new file mode 100644
index 0000000..ffc3ef3
--- /dev/null
+++ b/grub-core/lib/crc.c
@@ -0,0 +1,75 @@
+/* crc.c - crc function */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/lib/crc.h>
+
+static grub_uint32_t crc32c_table [256];
+
+static void
+init_crc32c_table (void)
+{
+ auto grub_uint32_t reflect (grub_uint32_t ref, int len);
+ grub_uint32_t reflect (grub_uint32_t ref, int len)
+ {
+ grub_uint32_t result = 0;
+ int i;
+
+ for (i = 1; i <= len; i++)
+ {
+ if (ref & 1)
+ result |= 1 << (len - i);
+ ref >>= 1;
+ }
+
+ return result;
+ }
+
+ grub_uint32_t polynomial = 0x1edc6f41;
+ int i, j;
+
+ for(i = 0; i < 256; i++)
+ {
+ crc32c_table[i] = reflect(i, 8) << 24;
+ for (j = 0; j < 8; j++)
+ crc32c_table[i] = (crc32c_table[i] << 1) ^
+ (crc32c_table[i] & (1 << 31) ? polynomial : 0);
+ crc32c_table[i] = reflect(crc32c_table[i], 32);
+ }
+}
+
+grub_uint32_t
+grub_getcrc32c (grub_uint32_t crc, const void *buf, int size)
+{
+ int i;
+ const grub_uint8_t *data = buf;
+
+ if (! crc32c_table[1])
+ init_crc32c_table ();
+
+ crc^= 0xffffffff;
+
+ for (i = 0; i < size; i++)
+ {
+ crc = (crc >> 8) ^ crc32c_table[(crc & 0xFF) ^ *data];
+ data++;
+ }
+
+ return crc ^ 0xffffffff;
+}
diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
new file mode 100644
index 0000000..ad1bfc4
--- /dev/null
+++ b/grub-core/lib/crypto.c
@@ -0,0 +1,456 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/crypto.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/term.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_crypto_hmac_handle
+{
+ const struct gcry_md_spec *md;
+ void *ctx;
+ void *opad;
+};
+
+static gcry_cipher_spec_t *grub_ciphers = NULL;
+static gcry_md_spec_t *grub_digests = NULL;
+
+void (*grub_crypto_autoload_hook) (const char *name) = NULL;
+
+/* Based on libgcrypt-1.4.4/src/misc.c. */
+void
+grub_burn_stack (grub_size_t size)
+{
+ char buf[64];
+
+ grub_memset (buf, 0, sizeof (buf));
+ if (size > sizeof (buf))
+ grub_burn_stack (size - sizeof (buf));
+}
+
+
+void
+grub_cipher_register (gcry_cipher_spec_t *cipher)
+{
+ cipher->next = grub_ciphers;
+ grub_ciphers = cipher;
+}
+
+void
+grub_cipher_unregister (gcry_cipher_spec_t *cipher)
+{
+ gcry_cipher_spec_t **ciph;
+ for (ciph = &grub_ciphers; *ciph; ciph = &((*ciph)->next))
+ if (*ciph == cipher)
+ {
+ *ciph = (*ciph)->next;
+ break;
+ }
+}
+
+void
+grub_md_register (gcry_md_spec_t *digest)
+{
+ digest->next = grub_digests;
+ grub_digests = digest;
+}
+
+void
+grub_md_unregister (gcry_md_spec_t *cipher)
+{
+ gcry_md_spec_t **ciph;
+ for (ciph = &grub_digests; *ciph; ciph = &((*ciph)->next))
+ if (*ciph == cipher)
+ {
+ *ciph = (*ciph)->next;
+ break;
+ }
+}
+
+void
+grub_crypto_hash (const gcry_md_spec_t *hash, void *out, const void *in,
+ grub_size_t inlen)
+{
+ grub_uint8_t ctx[hash->contextsize];
+ hash->init (&ctx);
+ hash->write (&ctx, in, inlen);
+ hash->final (&ctx);
+ grub_memcpy (out, hash->read (&ctx), hash->mdlen);
+}
+
+const gcry_md_spec_t *
+grub_crypto_lookup_md_by_name (const char *name)
+{
+ const gcry_md_spec_t *md;
+ int first = 1;
+ while (1)
+ {
+ for (md = grub_digests; md; md = md->next)
+ if (grub_strcasecmp (name, md->name) == 0)
+ return md;
+ if (grub_crypto_autoload_hook && first)
+ grub_crypto_autoload_hook (name);
+ else
+ return NULL;
+ first = 0;
+ }
+}
+
+const gcry_cipher_spec_t *
+grub_crypto_lookup_cipher_by_name (const char *name)
+{
+ const gcry_cipher_spec_t *ciph;
+ int first = 1;
+ while (1)
+ {
+ for (ciph = grub_ciphers; ciph; ciph = ciph->next)
+ {
+ const char **alias;
+ if (grub_strcasecmp (name, ciph->name) == 0)
+ return ciph;
+ if (!ciph->aliases)
+ continue;
+ for (alias = ciph->aliases; *alias; alias++)
+ if (grub_strcasecmp (name, *alias) == 0)
+ return ciph;
+ }
+ if (grub_crypto_autoload_hook && first)
+ grub_crypto_autoload_hook (name);
+ else
+ return NULL;
+ first = 0;
+ }
+}
+
+
+grub_crypto_cipher_handle_t
+grub_crypto_cipher_open (const struct gcry_cipher_spec *cipher)
+{
+ grub_crypto_cipher_handle_t ret;
+ ret = grub_malloc (sizeof (*ret) + cipher->contextsize);
+ if (!ret)
+ return NULL;
+ ret->cipher = cipher;
+ return ret;
+}
+
+gcry_err_code_t
+grub_crypto_cipher_set_key (grub_crypto_cipher_handle_t cipher,
+ const unsigned char *key,
+ unsigned keylen)
+{
+ return cipher->cipher->setkey (cipher->ctx, key, keylen);
+}
+
+
+void
+grub_crypto_cipher_close (grub_crypto_cipher_handle_t cipher)
+{
+ grub_free (cipher);
+}
+
+
+void
+grub_crypto_xor (void *out, const void *in1, const void *in2, grub_size_t size)
+{
+ const grub_uint8_t *in1ptr = in1, *in2ptr = in2;
+ grub_uint8_t *outptr = out;
+ while (size--)
+ {
+ *outptr = *in1ptr ^ *in2ptr;
+ in1ptr++;
+ in2ptr++;
+ outptr++;
+ }
+}
+
+gcry_err_code_t
+grub_crypto_ecb_decrypt (grub_crypto_cipher_handle_t cipher,
+ void *out, void *in, grub_size_t size)
+{
+ grub_uint8_t *inptr, *outptr, *end;
+ if (!cipher->cipher->decrypt)
+ return GPG_ERR_NOT_SUPPORTED;
+ if (size % cipher->cipher->blocksize != 0)
+ return GPG_ERR_INV_ARG;
+ end = (grub_uint8_t *) in + size;
+ for (inptr = in, outptr = out; inptr < end;
+ inptr += cipher->cipher->blocksize, outptr += cipher->cipher->blocksize)
+ cipher->cipher->decrypt (cipher->ctx, outptr, inptr);
+ return GPG_ERR_NO_ERROR;
+}
+
+gcry_err_code_t
+grub_crypto_ecb_encrypt (grub_crypto_cipher_handle_t cipher,
+ void *out, void *in, grub_size_t size)
+{
+ grub_uint8_t *inptr, *outptr, *end;
+ if (!cipher->cipher->encrypt)
+ return GPG_ERR_NOT_SUPPORTED;
+ if (size % cipher->cipher->blocksize != 0)
+ return GPG_ERR_INV_ARG;
+ end = (grub_uint8_t *) in + size;
+ for (inptr = in, outptr = out; inptr < end;
+ inptr += cipher->cipher->blocksize, outptr += cipher->cipher->blocksize)
+ cipher->cipher->encrypt (cipher->ctx, outptr, inptr);
+ return GPG_ERR_NO_ERROR;
+}
+
+gcry_err_code_t
+grub_crypto_cbc_encrypt (grub_crypto_cipher_handle_t cipher,
+ void *out, void *in, grub_size_t size,
+ void *iv_in)
+{
+ grub_uint8_t *inptr, *outptr, *end;
+ void *iv;
+ if (!cipher->cipher->decrypt)
+ return GPG_ERR_NOT_SUPPORTED;
+ if (size % cipher->cipher->blocksize != 0)
+ return GPG_ERR_INV_ARG;
+ end = (grub_uint8_t *) in + size;
+ iv = iv_in;
+ for (inptr = in, outptr = out; inptr < end;
+ inptr += cipher->cipher->blocksize, outptr += cipher->cipher->blocksize)
+ {
+ grub_crypto_xor (outptr, inptr, iv, cipher->cipher->blocksize);
+ cipher->cipher->encrypt (cipher->ctx, outptr, outptr);
+ iv = outptr;
+ }
+ grub_memcpy (iv_in, iv, cipher->cipher->blocksize);
+ return GPG_ERR_NO_ERROR;
+}
+
+gcry_err_code_t
+grub_crypto_cbc_decrypt (grub_crypto_cipher_handle_t cipher,
+ void *out, void *in, grub_size_t size,
+ void *iv)
+{
+ grub_uint8_t *inptr, *outptr, *end;
+ grub_uint8_t ivt[cipher->cipher->blocksize];
+ if (!cipher->cipher->decrypt)
+ return GPG_ERR_NOT_SUPPORTED;
+ if (size % cipher->cipher->blocksize != 0)
+ return GPG_ERR_INV_ARG;
+ end = (grub_uint8_t *) in + size;
+ for (inptr = in, outptr = out; inptr < end;
+ inptr += cipher->cipher->blocksize, outptr += cipher->cipher->blocksize)
+ {
+ grub_memcpy (ivt, inptr, cipher->cipher->blocksize);
+ cipher->cipher->decrypt (cipher->ctx, outptr, inptr);
+ grub_crypto_xor (outptr, outptr, iv, cipher->cipher->blocksize);
+ grub_memcpy (iv, ivt, cipher->cipher->blocksize);
+ }
+ return GPG_ERR_NO_ERROR;
+}
+
+/* Based on gcry/cipher/md.c. */
+struct grub_crypto_hmac_handle *
+grub_crypto_hmac_init (const struct gcry_md_spec *md,
+ const void *key, grub_size_t keylen)
+{
+ grub_uint8_t *helpkey = NULL;
+ grub_uint8_t *ipad = NULL, *opad = NULL;
+ void *ctx = NULL;
+ struct grub_crypto_hmac_handle *ret = NULL;
+ unsigned i;
+
+ if (md->mdlen > md->blocksize)
+ return NULL;
+
+ ctx = grub_malloc (md->contextsize);
+ if (!ctx)
+ goto err;
+
+ if ( keylen > md->blocksize )
+ {
+ helpkey = grub_malloc (md->mdlen);
+ if (!helpkey)
+ goto err;
+ grub_crypto_hash (md, helpkey, key, keylen);
+
+ key = helpkey;
+ keylen = md->mdlen;
+ }
+
+ ipad = grub_zalloc (md->blocksize);
+ if (!ipad)
+ goto err;
+
+ opad = grub_zalloc (md->blocksize);
+ if (!opad)
+ goto err;
+
+ grub_memcpy ( ipad, key, keylen );
+ grub_memcpy ( opad, key, keylen );
+ for (i=0; i < md->blocksize; i++ )
+ {
+ ipad[i] ^= 0x36;
+ opad[i] ^= 0x5c;
+ }
+ grub_free (helpkey);
+ helpkey = NULL;
+
+ md->init (ctx);
+
+ md->write (ctx, ipad, md->blocksize); /* inner pad */
+ grub_memset (ipad, 0, md->blocksize);
+ grub_free (ipad);
+ ipad = NULL;
+
+ ret = grub_malloc (sizeof (*ret));
+ if (!ret)
+ goto err;
+
+ ret->md = md;
+ ret->ctx = ctx;
+ ret->opad = opad;
+
+ return ret;
+
+ err:
+ grub_free (helpkey);
+ grub_free (ctx);
+ grub_free (ipad);
+ grub_free (opad);
+ return NULL;
+}
+
+void
+grub_crypto_hmac_write (struct grub_crypto_hmac_handle *hnd, void *data,
+ grub_size_t datalen)
+{
+ hnd->md->write (hnd->ctx, data, datalen);
+}
+
+gcry_err_code_t
+grub_crypto_hmac_fini (struct grub_crypto_hmac_handle *hnd, void *out)
+{
+ grub_uint8_t *p;
+ grub_uint8_t *ctx2;
+
+ ctx2 = grub_malloc (hnd->md->contextsize);
+ if (!ctx2)
+ return GPG_ERR_OUT_OF_MEMORY;
+
+ hnd->md->final (hnd->ctx);
+ hnd->md->read (hnd->ctx);
+ p = hnd->md->read (hnd->ctx);
+
+ hnd->md->init (ctx2);
+ hnd->md->write (ctx2, hnd->opad, hnd->md->blocksize);
+ hnd->md->write (ctx2, p, hnd->md->mdlen);
+ hnd->md->final (ctx2);
+ grub_memset (hnd->opad, 0, hnd->md->blocksize);
+ grub_free (hnd->opad);
+ grub_memset (hnd->ctx, 0, hnd->md->contextsize);
+ grub_free (hnd->ctx);
+
+ grub_memcpy (out, hnd->md->read (ctx2), hnd->md->mdlen);
+ grub_memset (ctx2, 0, hnd->md->contextsize);
+ grub_free (ctx2);
+
+ grub_memset (hnd, 0, sizeof (*hnd));
+ grub_free (hnd);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+gcry_err_code_t
+grub_crypto_hmac_buffer (const struct gcry_md_spec *md,
+ const void *key, grub_size_t keylen,
+ void *data, grub_size_t datalen, void *out)
+{
+ struct grub_crypto_hmac_handle *hnd;
+
+ hnd = grub_crypto_hmac_init (md, key, keylen);
+ if (!hnd)
+ return GPG_ERR_OUT_OF_MEMORY;
+
+ grub_crypto_hmac_write (hnd, data, datalen);
+ return grub_crypto_hmac_fini (hnd, out);
+}
+
+
+grub_err_t
+grub_crypto_gcry_error (gcry_err_code_t in)
+{
+ if (in == GPG_ERR_NO_ERROR)
+ return GRUB_ERR_NONE;
+ return GRUB_ACCESS_DENIED;
+}
+
+int
+grub_crypto_memcmp (const void *a, const void *b, grub_size_t n)
+{
+ register grub_size_t counter = 0;
+ const grub_uint8_t *pa, *pb;
+
+ for (pa = a, pb = b; n; pa++, pb++, n--)
+ {
+ if (*pa != *pb)
+ counter++;
+ }
+
+ return !!counter;
+}
+
+#ifndef GRUB_MKPASSWD
+int
+grub_password_get (char buf[], unsigned buf_size)
+{
+ unsigned cur_len = 0;
+ int key;
+
+ while (1)
+ {
+ key = grub_getkey ();
+ if (key == '\n' || key == '\r')
+ break;
+
+ if (key == '\e')
+ {
+ cur_len = 0;
+ break;
+ }
+
+ if (key == '\b')
+ {
+ cur_len--;
+ continue;
+ }
+
+ if (!grub_isprint (key))
+ continue;
+
+ if (cur_len + 2 < buf_size)
+ buf[cur_len++] = key;
+ }
+
+ grub_memset (buf + cur_len, 0, buf_size - cur_len);
+
+ grub_xputs ("\n");
+ grub_refresh ();
+
+ return (key != '\e');
+}
+#endif
diff --git a/grub-core/lib/efi/datetime.c b/grub-core/lib/efi/datetime.c
new file mode 100644
index 0000000..0fd1b5f
--- /dev/null
+++ b/grub-core/lib/efi/datetime.c
@@ -0,0 +1,82 @@
+/* kern/efi/datetime.c - efi datetime function.
+ *
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/symbol.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/datetime.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+grub_err_t
+grub_get_datetime (struct grub_datetime *datetime)
+{
+ grub_efi_status_t status;
+ struct grub_efi_time efi_time;
+
+ status = efi_call_2 (grub_efi_system_table->runtime_services->get_time,
+ &efi_time, 0);
+
+ if (status)
+ return grub_error (GRUB_ERR_INVALID_COMMAND,
+ "can\'t get datetime using efi");
+ else
+ {
+ datetime->year = efi_time.year;
+ datetime->month = efi_time.month;
+ datetime->day = efi_time.day;
+ datetime->hour = efi_time.hour;
+ datetime->minute = efi_time.minute;
+ datetime->second = efi_time.second;
+ }
+
+ return 0;
+}
+
+grub_err_t
+grub_set_datetime (struct grub_datetime *datetime)
+{
+ grub_efi_status_t status;
+ struct grub_efi_time efi_time;
+
+ status = efi_call_2 (grub_efi_system_table->runtime_services->get_time,
+ &efi_time, 0);
+
+ if (status)
+ return grub_error (GRUB_ERR_INVALID_COMMAND,
+ "can\'t get datetime using efi");
+
+ efi_time.year = datetime->year;
+ efi_time.month = datetime->month;
+ efi_time.day = datetime->day;
+ efi_time.hour = datetime->hour;
+ efi_time.minute = datetime->minute;
+ efi_time.second = datetime->second;
+
+ status = efi_call_1 (grub_efi_system_table->runtime_services->set_time,
+ &efi_time);
+
+ if (status)
+ return grub_error (GRUB_ERR_INVALID_COMMAND,
+ "can\'t set datetime using efi");
+
+ return 0;
+}
diff --git a/grub-core/lib/efi/halt.c b/grub-core/lib/efi/halt.c
new file mode 100644
index 0000000..c195368
--- /dev/null
+++ b/grub-core/lib/efi/halt.c
@@ -0,0 +1,36 @@
+/* efi.c - generic EFI support */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/kernel.h>
+#include <grub/acpi.h>
+
+void
+grub_halt (void)
+{
+ grub_machine_fini ();
+ grub_acpi_halt ();
+ efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
+ GRUB_EFI_RESET_SHUTDOWN, GRUB_EFI_SUCCESS, 0, NULL);
+
+ while (1);
+}
diff --git a/grub-core/lib/efi/relocator.c b/grub-core/lib/efi/relocator.c
new file mode 100644
index 0000000..0d346be
--- /dev/null
+++ b/grub-core/lib/efi/relocator.c
@@ -0,0 +1,119 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/relocator.h>
+#include <grub/relocator_private.h>
+#include <grub/memory.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/api.h>
+#include <grub/term.h>
+
+#define NEXT_MEMORY_DESCRIPTOR(desc, size) \
+ ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
+
+unsigned
+grub_relocator_firmware_get_max_events (void)
+{
+ grub_efi_uintn_t mmapsize = 0, descriptor_size = 0;
+ grub_efi_uint32_t descriptor_version = 0;
+ grub_efi_uintn_t key;
+ grub_efi_get_memory_map (&mmapsize, NULL, &key, &descriptor_size,
+ &descriptor_version);
+ /* Since grub_relocator_firmware_fill_events uses malloc
+ we need some reserve. Hence +10. */
+ return 2 * (mmapsize / descriptor_size + 10);
+}
+
+unsigned
+grub_relocator_firmware_fill_events (struct grub_relocator_mmap_event *events)
+{
+ grub_efi_uintn_t mmapsize = 0, desc_size = 0;
+ grub_efi_uint32_t descriptor_version = 0;
+ grub_efi_memory_descriptor_t *descs = NULL;
+ grub_efi_uintn_t key;
+ int counter = 0;
+ grub_efi_memory_descriptor_t *desc;
+
+ grub_efi_get_memory_map (&mmapsize, NULL, &key, &desc_size,
+ &descriptor_version);
+ descs = grub_malloc (mmapsize);
+ if (!descs)
+ return 0;
+
+ grub_efi_get_memory_map (&mmapsize, descs, &key, &desc_size,
+ &descriptor_version);
+
+ for (desc = descs;
+ (char *) desc < ((char *) descs + mmapsize);
+ desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
+ {
+ grub_uint64_t start = desc->physical_start;
+ grub_uint64_t end = desc->physical_start + (desc->num_pages << 12);
+
+ /* post-4G addresses are never supported on 32-bit EFI.
+ Moreover it has been reported that some 64-bit EFI contrary to the
+ spec don't map post-4G pages. So if you enable post-4G allocations,
+ map pages manually or check that they are mapped.
+ */
+ if (end >= 0x100000000ULL)
+ end = 0x100000000ULL;
+ if (end <= start)
+ continue;
+ if (desc->type != GRUB_EFI_CONVENTIONAL_MEMORY)
+ continue;
+ events[counter].type = REG_FIRMWARE_START;
+ events[counter].pos = start;
+ counter++;
+ events[counter].type = REG_FIRMWARE_END;
+ events[counter].pos = end;
+ counter++;
+ }
+
+ return counter;
+}
+
+int
+grub_relocator_firmware_alloc_region (grub_addr_t start, grub_size_t size)
+{
+ grub_efi_boot_services_t *b;
+ grub_efi_physical_address_t address = start;
+ grub_efi_status_t status;
+
+ if (grub_efi_is_finished)
+ return 1;
+
+ grub_dprintf ("relocator", "EFI alloc: %llx, %llx\n",
+ (unsigned long long) start, (unsigned long long) size);
+
+ b = grub_efi_system_table->boot_services;
+ status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ADDRESS,
+ GRUB_EFI_LOADER_DATA, size >> 12, &address);
+ return (status == GRUB_EFI_SUCCESS);
+}
+
+void
+grub_relocator_firmware_free_region (grub_addr_t start, grub_size_t size)
+{
+ grub_efi_boot_services_t *b;
+
+ if (grub_efi_is_finished)
+ return;
+
+ b = grub_efi_system_table->boot_services;
+ efi_call_2 (b->free_pages, start, size >> 12);
+}
diff --git a/grub-core/lib/emu/halt.c b/grub-core/lib/emu/halt.c
new file mode 100644
index 0000000..620935b
--- /dev/null
+++ b/grub-core/lib/emu/halt.c
@@ -0,0 +1,25 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+
+void
+grub_halt (void)
+{
+ grub_reboot ();
+}
diff --git a/grub-core/lib/envblk.c b/grub-core/lib/envblk.c
new file mode 100644
index 0000000..311927b
--- /dev/null
+++ b/grub-core/lib/envblk.c
@@ -0,0 +1,296 @@
+/* envblk.c - Common functions for environment block. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/lib/envblk.h>
+
+grub_envblk_t
+grub_envblk_open (char *buf, grub_size_t size)
+{
+ grub_envblk_t envblk;
+
+ if (size < sizeof (GRUB_ENVBLK_SIGNATURE)
+ || grub_memcmp (buf, GRUB_ENVBLK_SIGNATURE,
+ sizeof (GRUB_ENVBLK_SIGNATURE) - 1))
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "invalid environment block");
+ return 0;
+ }
+
+ envblk = grub_malloc (sizeof (*envblk));
+ if (envblk)
+ {
+ envblk->buf = buf;
+ envblk->size = size;
+ }
+
+ return envblk;
+}
+
+void
+grub_envblk_close (grub_envblk_t envblk)
+{
+ grub_free (envblk->buf);
+ grub_free (envblk);
+}
+
+static int
+escaped_value_len (const char *value)
+{
+ int n = 0;
+ char *p;
+
+ for (p = (char *) value; *p; p++)
+ {
+ if (*p == '\\' || *p == '\n')
+ n += 2;
+ else
+ n++;
+ }
+
+ return n;
+}
+
+static char *
+find_next_line (char *p, const char *pend)
+{
+ while (p < pend)
+ {
+ if (*p == '\\')
+ p += 2;
+ else if (*p == '\n')
+ break;
+ else
+ p++;
+ }
+
+ return p + 1;
+}
+
+int
+grub_envblk_set (grub_envblk_t envblk, const char *name, const char *value)
+{
+ char *p, *pend;
+ char *space;
+ int found = 0;
+ int nl;
+ int vl;
+ int i;
+
+ nl = grub_strlen (name);
+ vl = escaped_value_len (value);
+ p = envblk->buf + sizeof (GRUB_ENVBLK_SIGNATURE) - 1;
+ pend = envblk->buf + envblk->size;
+
+ /* First, look at free space. */
+ for (space = pend - 1; *space == '#'; space--)
+ ;
+
+ if (*space != '\n')
+ /* Broken. */
+ return 0;
+
+ space++;
+
+ while (p + nl + 1 < space)
+ {
+ if (grub_memcmp (p, name, nl) == 0 && p[nl] == '=')
+ {
+ int len;
+
+ /* Found the same name. */
+ p += nl + 1;
+
+ /* Check the length of the current value. */
+ len = 0;
+ while (p + len < pend && p[len] != '\n')
+ {
+ if (p[len] == '\\')
+ len += 2;
+ else
+ len++;
+ }
+
+ if (p + len >= pend)
+ /* Broken. */
+ return 0;
+
+ if (pend - space < vl - len)
+ /* No space. */
+ return 0;
+
+ if (vl < len)
+ {
+ /* Move the following characters backward, and fill the new
+ space with harmless characters. */
+ grub_memmove (p + vl, p + len, pend - (p + len));
+ grub_memset (space + len - vl, '#', len - vl);
+ }
+ else
+ /* Move the following characters forward. */
+ grub_memmove (p + vl, p + len, pend - (p + vl));
+
+ found = 1;
+ break;
+ }
+
+ p = find_next_line (p, pend);
+ }
+
+ if (! found)
+ {
+ /* Append a new variable. */
+
+ if (pend - space < nl + 1 + vl + 1)
+ /* No space. */
+ return 0;
+
+ grub_memcpy (space, name, nl);
+ p = space + nl;
+ *p++ = '=';
+ }
+
+ /* Write the value. */
+ for (i = 0; value[i]; i++)
+ {
+ if (value[i] == '\\' || value[i] == '\n')
+ *p++ = '\\';
+
+ *p++ = value[i];
+ }
+
+ *p = '\n';
+ return 1;
+}
+
+void
+grub_envblk_delete (grub_envblk_t envblk, const char *name)
+{
+ char *p, *pend;
+ int nl;
+
+ nl = grub_strlen (name);
+ p = envblk->buf + sizeof (GRUB_ENVBLK_SIGNATURE) - 1;
+ pend = envblk->buf + envblk->size;
+
+ while (p + nl + 1 < pend)
+ {
+ if (grub_memcmp (p, name, nl) == 0 && p[nl] == '=')
+ {
+ /* Found. */
+ int len = nl + 1;
+
+ while (p + len < pend)
+ {
+ if (p[len] == '\n')
+ break;
+ else if (p[len] == '\\')
+ len += 2;
+ else
+ len++;
+ }
+
+ if (p + len >= pend)
+ /* Broken. */
+ return;
+
+ len++;
+ grub_memmove (p, p + len, pend - (p + len));
+ grub_memset (pend - len, '#', len);
+ break;
+ }
+
+ p = find_next_line (p, pend);
+ }
+}
+
+void
+grub_envblk_iterate (grub_envblk_t envblk,
+ int hook (const char *name, const char *value))
+{
+ char *p, *pend;
+
+ p = envblk->buf + sizeof (GRUB_ENVBLK_SIGNATURE) - 1;
+ pend = envblk->buf + envblk->size;
+
+ while (p < pend)
+ {
+ if (*p != '#')
+ {
+ char *name;
+ char *value;
+ char *name_start, *name_end, *value_start;
+ char *q;
+ int ret;
+
+ name_start = p;
+ while (p < pend && *p != '=')
+ p++;
+ if (p == pend)
+ /* Broken. */
+ return;
+ name_end = p;
+
+ p++;
+ value_start = p;
+ while (p < pend)
+ {
+ if (*p == '\n')
+ break;
+ else if (*p == '\\')
+ p += 2;
+ else
+ p++;
+ }
+
+ if (p >= pend)
+ /* Broken. */
+ return;
+
+ name = grub_malloc (p - name_start + 1);
+ if (! name)
+ /* out of memory. */
+ return;
+
+ value = name + (value_start - name_start);
+
+ grub_memcpy (name, name_start, name_end - name_start);
+ name[name_end - name_start] = '\0';
+
+ for (p = value_start, q = value; *p != '\n'; ++p)
+ {
+ if (*p == '\\')
+ *q++ = *++p;
+ else
+ *q++ = *p;
+ }
+ *q = '\0';
+
+ ret = hook (name, value);
+ grub_free (name);
+ if (ret)
+ return;
+ }
+
+ p = find_next_line (p, pend);
+ }
+}
diff --git a/grub-core/lib/hexdump.c b/grub-core/lib/hexdump.c
new file mode 100644
index 0000000..317635a
--- /dev/null
+++ b/grub-core/lib/hexdump.c
@@ -0,0 +1,85 @@
+/* hexdump.c - hexdump function */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/lib/hexdump.h>
+
+void
+hexdump (unsigned long bse, char *buf, int len)
+{
+ int pos;
+ char line[80];
+
+ while (len > 0)
+ {
+ int cnt, i;
+
+ pos = grub_snprintf (line, sizeof (line), "%08lx ", bse);
+ cnt = 16;
+ if (cnt > len)
+ cnt = len;
+
+ for (i = 0; i < cnt; i++)
+ {
+ pos += grub_snprintf (&line[pos], sizeof (line) - pos,
+ "%02x ", (unsigned char) buf[i]);
+ if ((i & 7) == 7)
+ line[pos++] = ' ';
+ }
+
+ for (; i < 16; i++)
+ {
+ pos += grub_snprintf (&line[pos], sizeof (line) - pos, " ");
+ if ((i & 7) == 7)
+ line[pos++] = ' ';
+ }
+
+ line[pos++] = '|';
+
+ for (i = 0; i < cnt; i++)
+ line[pos++] = ((buf[i] >= 32) && (buf[i] < 127)) ? buf[i] : '.';
+
+ line[pos++] = '|';
+
+ line[pos] = 0;
+
+ grub_printf ("%s\n", line);
+
+ /* Print only first and last line if more than 3 lines are identical. */
+ if (len >= 4 * 16
+ && ! grub_memcmp (buf, buf + 1 * 16, 16)
+ && ! grub_memcmp (buf, buf + 2 * 16, 16)
+ && ! grub_memcmp (buf, buf + 3 * 16, 16))
+ {
+ grub_printf ("*\n");
+ do
+ {
+ bse += 16;
+ buf += 16;
+ len -= 16;
+ }
+ while (len >= 3 * 16 && ! grub_memcmp (buf, buf + 2 * 16, 16));
+ }
+
+ bse += 16;
+ buf += 16;
+ len -= cnt;
+ }
+}
diff --git a/grub-core/lib/i386/halt.c b/grub-core/lib/i386/halt.c
new file mode 100644
index 0000000..15c4ba0
--- /dev/null
+++ b/grub-core/lib/i386/halt.c
@@ -0,0 +1,60 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/cpu/io.h>
+#include <grub/misc.h>
+#include <grub/acpi.h>
+
+const char bochs_shutdown[] = "Shutdown";
+
+/*
+ * This call is special... it never returns... in fact it should simply
+ * hang at this point!
+ */
+static inline void __attribute__ ((noreturn))
+stop (void)
+{
+ asm volatile ("cli");
+ while (1)
+ {
+ asm volatile ("hlt");
+ }
+}
+
+void
+grub_halt (void)
+{
+ unsigned int i;
+
+#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_MULTIBOOT)
+ grub_acpi_halt ();
+#endif
+
+ /* Disable interrupts. */
+ __asm__ __volatile__ ("cli");
+
+ /* Bochs, QEMU, etc. */
+ for (i = 0; i < sizeof (bochs_shutdown) - 1; i++)
+ grub_outb (bochs_shutdown[i], 0x8900);
+
+ grub_printf ("GRUB doesn't know how to halt this machine yet!\n");
+
+ /* In order to return we'd have to check what the previous status of IF
+ flag was. But user most likely doesn't want to return anyway ... */
+ stop ();
+}
diff --git a/grub-core/lib/i386/pc/biosnum.c b/grub-core/lib/i386/pc/biosnum.c
new file mode 100644
index 0000000..1277108
--- /dev/null
+++ b/grub-core/lib/i386/pc/biosnum.c
@@ -0,0 +1,47 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/machine/biosnum.h>
+
+static int
+grub_get_root_biosnumber_default (void)
+{
+ char *biosnum;
+ int ret = -1;
+ grub_device_t dev;
+
+ biosnum = grub_env_get ("biosnum");
+
+ if (biosnum)
+ return grub_strtoul (biosnum, 0, 0);
+
+ dev = grub_device_open (0);
+ if (dev && dev->disk && dev->disk->dev
+ && dev->disk->dev->id == GRUB_DISK_DEVICE_BIOSDISK_ID)
+ ret = (int) dev->disk->id;
+
+ if (dev)
+ grub_device_close (dev);
+
+ return ret;
+}
+
+int (*grub_get_root_biosnumber) (void) = grub_get_root_biosnumber_default;
diff --git a/grub-core/lib/i386/pc/vesa_modes_table.c b/grub-core/lib/i386/pc/vesa_modes_table.c
new file mode 100644
index 0000000..6dc4b7d
--- /dev/null
+++ b/grub-core/lib/i386/pc/vesa_modes_table.c
@@ -0,0 +1,127 @@
+
+#include <grub/i386/pc/vesa_modes_table.h>
+
+/* This is the reverse of the table in [linux]/Documentation/fb/vesafb.txt
+ plus a few more modes based on the table in
+ http://en.wikipedia.org/wiki/VESA_BIOS_Extensions */
+struct grub_vesa_mode_table_entry
+grub_vesa_mode_table[GRUB_VESA_MODE_TABLE_END
+ - GRUB_VESA_MODE_TABLE_START + 1] =
+ {
+ { 640, 400, 8 }, /* 0x300 */
+ { 640, 480, 8 }, /* 0x301 */
+ { 800, 600, 4 }, /* 0x302 */
+ { 800, 600, 8 }, /* 0x303 */
+ { 1024, 768, 4 }, /* 0x304 */
+ { 1024, 768, 8 }, /* 0x305 */
+ { 1280, 1024, 4 }, /* 0x306 */
+ { 1280, 1024, 8 }, /* 0x307 */
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 320, 200, 15 }, /* 0x30d */
+ { 320, 200, 16 }, /* 0x30e */
+ { 320, 200, 24 }, /* 0x30f */
+ { 640, 480, 15 }, /* 0x310 */
+ { 640, 480, 16 }, /* 0x311 */
+ { 640, 480, 24 }, /* 0x312 */
+ { 800, 600, 15 }, /* 0x313 */
+ { 800, 600, 16 }, /* 0x314 */
+ { 800, 600, 24 }, /* 0x315 */
+ { 1024, 768, 15 }, /* 0x316 */
+ { 1024, 768, 16 }, /* 0x317 */
+ { 1024, 768, 24 }, /* 0x318 */
+ { 1280, 1024, 15 }, /* 0x319 */
+ { 1280, 1024, 16 }, /* 0x31a */
+ { 1280, 1024, 24 }, /* 0x31b */
+ { 1600, 1200, 8 }, /* 0x31c */
+ { 1600, 1200, 15 }, /* 0x31d */
+ { 1600, 1200, 16 }, /* 0x31e */
+ { 1600, 1200, 24 }, /* 0x31f */
+ { 0, 0, 0 },
+ { 640, 400, 15 }, /* 0x321 */
+ { 640, 400, 16 }, /* 0x322 */
+ { 640, 400, 24 }, /* 0x323 */
+ { 640, 400, 32 }, /* 0x324 */
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 640, 480, 32 }, /* 0x329 */
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 896, 672, 8 }, /* 0x32f */
+ { 896, 672, 15 }, /* 0x330 */
+ { 896, 672, 16 }, /* 0x331 */
+ { 896, 672, 24 }, /* 0x332 */
+ { 896, 672, 32 }, /* 0x333 */
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 1600, 1200, 32 }, /* 0x342 */
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 1440, 900, 8 }, /* 0x360 */
+ { 1440, 900, 15 }, /* 0x361 */
+ { 1440, 900, 16 }, /* 0x362 */
+ { 1440, 900, 24 }, /* 0x363 */
+ { 1440, 900, 32 }, /* 0x364 */
+ { 1152, 720, 8 }, /* 0x365 */
+ { 1152, 720, 15 }, /* 0x366 */
+ { 1152, 720, 16 }, /* 0x367 */
+ { 1152, 720, 24 }, /* 0x368 */
+ { 1152, 720, 32 }, /* 0x369 */
+ { 1024, 640, 8 }, /* 0x36a */
+ { 1024, 640, 15 }, /* 0x36b */
+ { 1024, 640, 16 }, /* 0x36c */
+ { 1024, 640, 24 }, /* 0x36d */
+ { 1024, 640, 32 }, /* 0x36e */
+ { 800, 500, 8 }, /* 0x36f */
+ { 800, 500, 15 }, /* 0x370 */
+ { 800, 500, 16 }, /* 0x371 */
+ { 800, 500, 24 }, /* 0x372 */
+ { 800, 500, 32 }, /* 0x373 */
+ };
diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c
new file mode 100644
index 0000000..1bc4240
--- /dev/null
+++ b/grub-core/lib/i386/relocator.c
@@ -0,0 +1,270 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/term.h>
+
+#include <grub/i386/relocator.h>
+#include <grub/relocator_private.h>
+
+extern grub_uint8_t grub_relocator_forward_start;
+extern grub_uint8_t grub_relocator_forward_end;
+extern grub_uint8_t grub_relocator_backward_start;
+extern grub_uint8_t grub_relocator_backward_end;
+
+extern void *grub_relocator_backward_dest;
+extern void *grub_relocator_backward_src;
+extern grub_size_t grub_relocator_backward_chunk_size;
+
+extern void *grub_relocator_forward_dest;
+extern void *grub_relocator_forward_src;
+extern grub_size_t grub_relocator_forward_chunk_size;
+
+extern grub_uint8_t grub_relocator16_start;
+extern grub_uint8_t grub_relocator16_end;
+extern grub_uint16_t grub_relocator16_cs;
+extern grub_uint16_t grub_relocator16_ip;
+extern grub_uint16_t grub_relocator16_ds;
+extern grub_uint16_t grub_relocator16_es;
+extern grub_uint16_t grub_relocator16_fs;
+extern grub_uint16_t grub_relocator16_gs;
+extern grub_uint16_t grub_relocator16_ss;
+extern grub_uint16_t grub_relocator16_sp;
+extern grub_uint32_t grub_relocator16_edx;
+
+extern grub_uint8_t grub_relocator32_start;
+extern grub_uint8_t grub_relocator32_end;
+extern grub_uint32_t grub_relocator32_eax;
+extern grub_uint32_t grub_relocator32_ebx;
+extern grub_uint32_t grub_relocator32_ecx;
+extern grub_uint32_t grub_relocator32_edx;
+extern grub_uint32_t grub_relocator32_eip;
+extern grub_uint32_t grub_relocator32_esp;
+extern grub_uint32_t grub_relocator32_ebp;
+extern grub_uint32_t grub_relocator32_esi;
+extern grub_uint32_t grub_relocator32_edi;
+
+extern grub_uint8_t grub_relocator64_start;
+extern grub_uint8_t grub_relocator64_end;
+extern grub_uint64_t grub_relocator64_rax;
+extern grub_uint64_t grub_relocator64_rbx;
+extern grub_uint64_t grub_relocator64_rcx;
+extern grub_uint64_t grub_relocator64_rdx;
+extern grub_uint64_t grub_relocator64_rip;
+extern grub_uint64_t grub_relocator64_rip_addr;
+extern grub_uint64_t grub_relocator64_rsp;
+extern grub_uint64_t grub_relocator64_rsi;
+extern grub_addr_t grub_relocator64_cr3;
+
+#define RELOCATOR_SIZEOF(x) (&grub_relocator##x##_end - &grub_relocator##x##_start)
+
+grub_size_t grub_relocator_align = 1;
+grub_size_t grub_relocator_forward_size;
+grub_size_t grub_relocator_backward_size;
+#ifdef __x86_64__
+grub_size_t grub_relocator_jumper_size = 12;
+#else
+grub_size_t grub_relocator_jumper_size = 7;
+#endif
+
+void
+grub_cpu_relocator_init (void)
+{
+ grub_relocator_forward_size = RELOCATOR_SIZEOF(_forward);
+ grub_relocator_backward_size = RELOCATOR_SIZEOF(_backward);
+}
+
+void
+grub_cpu_relocator_jumper (void *rels, grub_addr_t addr)
+{
+ grub_uint8_t *ptr;
+ ptr = rels;
+#ifdef __x86_64__
+ /* movq imm64, %rax (for relocator) */
+ *(grub_uint8_t *) ptr = 0x48;
+ ptr++;
+ *(grub_uint8_t *) ptr = 0xb8;
+ ptr++;
+ *(grub_uint64_t *) ptr = addr;
+ ptr += sizeof (grub_uint64_t);
+#else
+ /* movl imm32, %eax (for relocator) */
+ *(grub_uint8_t *) ptr = 0xb8;
+ ptr++;
+ *(grub_uint32_t *) ptr = addr;
+ ptr += sizeof (grub_uint32_t);
+#endif
+ /* jmp $eax/$rax */
+ *(grub_uint8_t *) ptr = 0xff;
+ ptr++;
+ *(grub_uint8_t *) ptr = 0xe0;
+ ptr++;
+}
+
+void
+grub_cpu_relocator_backward (void *ptr, void *src, void *dest,
+ grub_size_t size)
+{
+ grub_relocator_backward_dest = dest;
+ grub_relocator_backward_src = src;
+ grub_relocator_backward_chunk_size = size;
+
+ grub_memmove (ptr,
+ &grub_relocator_backward_start,
+ RELOCATOR_SIZEOF (_backward));
+}
+
+void
+grub_cpu_relocator_forward (void *ptr, void *src, void *dest,
+ grub_size_t size)
+{
+ grub_relocator_forward_dest = dest;
+ grub_relocator_forward_src = src;
+ grub_relocator_forward_chunk_size = size;
+
+ grub_memmove (ptr,
+ &grub_relocator_forward_start,
+ RELOCATOR_SIZEOF (_forward));
+}
+
+grub_err_t
+grub_relocator32_boot (struct grub_relocator *rel,
+ struct grub_relocator32_state state)
+{
+ grub_err_t err;
+ void *relst;
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
+ (0xffffffff - RELOCATOR_SIZEOF (32))
+ + 1, RELOCATOR_SIZEOF (32), 16,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+
+ grub_relocator32_eax = state.eax;
+ grub_relocator32_ebx = state.ebx;
+ grub_relocator32_ecx = state.ecx;
+ grub_relocator32_edx = state.edx;
+ grub_relocator32_eip = state.eip;
+ grub_relocator32_esp = state.esp;
+ grub_relocator32_ebp = state.ebp;
+ grub_relocator32_esi = state.esi;
+ grub_relocator32_edi = state.edi;
+
+ grub_memmove (get_virtual_current_address (ch), &grub_relocator32_start,
+ RELOCATOR_SIZEOF (32));
+
+ err = grub_relocator_prepare_relocs (rel, get_physical_target_address (ch),
+ &relst, NULL);
+ if (err)
+ return err;
+
+ asm volatile ("cli");
+ ((void (*) (void)) relst) ();
+
+ /* Not reached. */
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_relocator16_boot (struct grub_relocator *rel,
+ struct grub_relocator16_state state)
+{
+ grub_err_t err;
+ void *relst;
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
+ 0xa0000 - RELOCATOR_SIZEOF (16),
+ RELOCATOR_SIZEOF (16), 16,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+
+ grub_relocator16_cs = state.cs;
+ grub_relocator16_ip = state.ip;
+
+ grub_relocator16_ds = state.ds;
+ grub_relocator16_es = state.es;
+ grub_relocator16_fs = state.fs;
+ grub_relocator16_gs = state.gs;
+
+ grub_relocator16_ss = state.ss;
+ grub_relocator16_sp = state.sp;
+
+ grub_relocator16_edx = state.edx;
+
+ grub_memmove (get_virtual_current_address (ch), &grub_relocator16_start,
+ RELOCATOR_SIZEOF (16));
+
+ err = grub_relocator_prepare_relocs (rel, get_physical_target_address (ch),
+ &relst, NULL);
+ if (err)
+ return err;
+
+ asm volatile ("cli");
+ ((void (*) (void)) relst) ();
+
+ /* Not reached. */
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_relocator64_boot (struct grub_relocator *rel,
+ struct grub_relocator64_state state,
+ grub_addr_t min_addr, grub_addr_t max_addr)
+{
+ grub_err_t err;
+ void *relst;
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_align (rel, &ch, min_addr,
+ max_addr - RELOCATOR_SIZEOF (64),
+ RELOCATOR_SIZEOF (64), 16,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+
+ grub_relocator64_rax = state.rax;
+ grub_relocator64_rbx = state.rbx;
+ grub_relocator64_rcx = state.rcx;
+ grub_relocator64_rdx = state.rdx;
+ grub_relocator64_rip = state.rip;
+ grub_relocator64_rsp = state.rsp;
+ grub_relocator64_rsi = state.rsi;
+ grub_relocator64_cr3 = state.cr3;
+
+ grub_memmove (get_virtual_current_address (ch), &grub_relocator64_start,
+ RELOCATOR_SIZEOF (64));
+
+ err = grub_relocator_prepare_relocs (rel, get_physical_target_address (ch),
+ &relst, NULL);
+ if (err)
+ return err;
+
+ asm volatile ("cli");
+ ((void (*) (void)) relst) ();
+
+ /* Not reached. */
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/lib/i386/relocator16.S b/grub-core/lib/i386/relocator16.S
new file mode 100644
index 0000000..982415d
--- /dev/null
+++ b/grub-core/lib/i386/relocator16.S
@@ -0,0 +1,193 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* The code segment of the protected mode. */
+#define CODE_SEGMENT 0x08
+
+/* The data segment of the protected mode. */
+#define DATA_SEGMENT 0x10
+
+#define PSEUDO_REAL_CSEG 0x18
+
+#define PSEUDO_REAL_DSEG 0x20
+
+#include "relocator_common.S"
+
+ .p2align 4 /* force 16-byte alignment */
+
+VARIABLE(grub_relocator16_start)
+ PREAMBLE
+
+ movl %esi, %eax
+ movw %ax, (LOCAL (cs_base_bytes12) - LOCAL (base)) (RSI, 1)
+ shrl $16, %eax
+ movb %al, (LOCAL (cs_base_byte3) - LOCAL (base)) (RSI, 1)
+
+ RELOAD_GDT
+ .code32
+ /* Update other registers. */
+ movl $DATA_SEGMENT, %eax
+ movl %eax, %ds
+ movl %eax, %es
+ movl %eax, %fs
+ movl %eax, %gs
+ movl %eax, %ss
+
+ DISABLE_PAGING
+
+#ifdef __x86_64__
+ /* Disable amd64. */
+ movl $GRUB_MEMORY_CPU_AMD64_MSR, %ecx
+ rdmsr
+ andl $(~GRUB_MEMORY_CPU_AMD64_MSR_ON), %eax
+ wrmsr
+#endif
+
+ /* Turn off PAE. */
+ movl %cr4, %eax
+ andl $(~GRUB_MEMORY_CPU_CR4_PAE_ON), %eax
+ movl %eax, %cr4
+
+ /* Update other registers. */
+ movl $PSEUDO_REAL_DSEG, %eax
+ movl %eax, %ds
+ movl %eax, %es
+ movl %eax, %fs
+ movl %eax, %gs
+ movl %eax, %ss
+
+ movl %esi, %eax
+ shrl $4, %eax
+ movw %ax, (LOCAL (segment) - LOCAL (base)) (%esi, 1)
+
+ /* jump to a 16 bit segment */
+ ljmp $PSEUDO_REAL_CSEG, $(LOCAL (cont2) - LOCAL(base))
+LOCAL(cont2):
+ .code16
+
+ /* clear the PE bit of CR0 */
+ movl %cr0, %eax
+ andl $(~GRUB_MEMORY_CPU_CR0_PE_ON), %eax
+ movl %eax, %cr0
+
+ /* flush prefetch queue, reload %cs */
+ /* ljmp */
+ .byte 0xea
+ .word LOCAL(cont3)-LOCAL(base)
+LOCAL(segment):
+ .word 0
+
+LOCAL(cont3):
+ /* we are in real mode now
+ * set up the real mode segment registers : DS, SS, ES
+ */
+ /* movw imm16, %ax. */
+ .byte 0xb8
+VARIABLE(grub_relocator16_ds)
+ .word 0
+ movw %ax, %ds
+
+ /* movw imm16, %ax. */
+ .byte 0xb8
+VARIABLE(grub_relocator16_es)
+ .word 0
+ movw %ax, %es
+
+ /* movw imm16, %ax. */
+ .byte 0xb8
+VARIABLE(grub_relocator16_fs)
+ .word 0
+ movw %ax, %fs
+
+ /* movw imm16, %ax. */
+ .byte 0xb8
+VARIABLE(grub_relocator16_gs)
+ .word 0
+ movw %ax, %gs
+
+ /* movw imm16, %ax. */
+ .byte 0xb8
+VARIABLE(grub_relocator16_ss)
+ .word 0
+ movw %ax, %ss
+
+ /* movw imm16, %ax. */
+ .byte 0xb8
+VARIABLE(grub_relocator16_sp)
+ .word 0
+ movzwl %ax, %esp
+
+ /* movw imm32, %edx. */
+ .byte 0x66, 0xba
+VARIABLE(grub_relocator16_edx)
+ .long 0
+
+ /* Cleared direction flag is of no problem with any current
+ payload and makes this implementation easier. */
+ cld
+
+ /* ljmp */
+ .byte 0xea
+VARIABLE(grub_relocator16_ip)
+ .word 0
+VARIABLE(grub_relocator16_cs)
+ .word 0
+
+ .code32
+
+ /* GDT. Copied from loader/i386/linux.c. */
+ .p2align 4
+LOCAL(gdt):
+ .word 0, 0
+ .byte 0, 0, 0, 0
+
+ /* -- code segment --
+ * base = 0x00000000, limit = 0xFFFFF (4 KiB Granularity), present
+ * type = 32bit code execute/read, DPL = 0
+ */
+ .word 0xFFFF, 0
+ .byte 0, 0x9A, 0xCF, 0
+
+ /* -- data segment --
+ * base = 0x00000000, limit 0xFFFFF (4 KiB Granularity), present
+ * type = 32 bit data read/write, DPL = 0
+ */
+ .word 0xFFFF, 0
+ .byte 0, 0x92, 0xCF, 0
+
+ /* -- 16 bit real mode CS --
+ * base = 0x00000000, limit 0x0FFFF (1 B Granularity), present
+ * type = 16 bit code execute/read only/conforming, DPL = 0
+ */
+ .word 0xFFFF
+LOCAL(cs_base_bytes12):
+ .word 0
+LOCAL(cs_base_byte3):
+ .byte 0
+
+ .byte 0x9E, 0, 0
+
+ /* -- 16 bit real mode DS --
+ * base = 0x00000000, limit 0x0FFFF (1 B Granularity), present
+ * type = 16 bit data read/write, DPL = 0
+ */
+ .word 0xFFFF, 0
+ .byte 0, 0x92, 0, 0
+LOCAL(gdt_end):
+
+VARIABLE(grub_relocator16_end)
diff --git a/grub-core/lib/i386/relocator32.S b/grub-core/lib/i386/relocator32.S
new file mode 100644
index 0000000..09ce56a
--- /dev/null
+++ b/grub-core/lib/i386/relocator32.S
@@ -0,0 +1,134 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* The code segment of the protected mode. */
+#define CODE_SEGMENT 0x10
+
+/* The data segment of the protected mode. */
+#define DATA_SEGMENT 0x18
+
+#include "relocator_common.S"
+
+ .p2align 4 /* force 16-byte alignment */
+
+VARIABLE(grub_relocator32_start)
+ PREAMBLE
+
+ RELOAD_GDT
+ .code32
+ /* Update other registers. */
+ movl $DATA_SEGMENT, %eax
+ movl %eax, %ds
+ movl %eax, %es
+ movl %eax, %fs
+ movl %eax, %gs
+ movl %eax, %ss
+
+ DISABLE_PAGING
+
+#ifdef __x86_64__
+ /* Disable amd64. */
+ movl $GRUB_MEMORY_CPU_AMD64_MSR, %ecx
+ rdmsr
+ andl $(~GRUB_MEMORY_CPU_AMD64_MSR_ON), %eax
+ wrmsr
+#endif
+
+ /* Turn off PAE. */
+ movl %cr4, %eax
+ andl $(~GRUB_MEMORY_CPU_CR4_PAE_ON), %eax
+ movl %eax, %cr4
+
+ jmp LOCAL(cont2)
+LOCAL(cont2):
+ .code32
+
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator32_esp)
+ .long 0
+
+ movl %eax, %esp
+
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator32_ebp)
+ .long 0
+
+ movl %eax, %ebp
+
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator32_esi)
+ .long 0
+
+ movl %eax, %esi
+
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator32_edi)
+ .long 0
+
+ movl %eax, %edi
+
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator32_eax)
+ .long 0
+
+ /* mov imm32, %ebx */
+ .byte 0xbb
+VARIABLE(grub_relocator32_ebx)
+ .long 0
+
+ /* mov imm32, %ecx */
+ .byte 0xb9
+VARIABLE(grub_relocator32_ecx)
+ .long 0
+
+ /* mov imm32, %edx */
+ .byte 0xba
+VARIABLE(grub_relocator32_edx)
+ .long 0
+
+ /* Cleared direction flag is of no problem with any current
+ payload and makes this implementation easier. */
+ cld
+
+ .byte 0xea
+VARIABLE(grub_relocator32_eip)
+ .long 0
+ .word CODE_SEGMENT
+
+ /* GDT. Copied from loader/i386/linux.c. */
+ .p2align 4
+LOCAL(gdt):
+ /* NULL. */
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+
+ /* Reserved. */
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+
+ /* Code segment. */
+ .byte 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x9A, 0xCF, 0x00
+
+ /* Data segment. */
+ .byte 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x92, 0xCF, 0x00
+LOCAL(gdt_end):
+
+VARIABLE(grub_relocator32_end)
diff --git a/grub-core/lib/i386/relocator64.S b/grub-core/lib/i386/relocator64.S
new file mode 100644
index 0000000..bb08641
--- /dev/null
+++ b/grub-core/lib/i386/relocator64.S
@@ -0,0 +1,160 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define CODE32_SEGMENT 0x18
+#define CODE_SEGMENT 0x08
+
+/* The data segment of the protected mode. */
+#define DATA_SEGMENT 0x10
+
+#include "relocator_common.S"
+
+ .p2align 4 /* force 16-byte alignment */
+
+VARIABLE(grub_relocator64_start)
+ PREAMBLE
+#ifndef __x86_64__
+ DISABLE_PAGING
+
+ /* Turn on PAE. */
+ movl %cr4, %eax
+ orl $(GRUB_MEMORY_CPU_CR4_PAE_ON | GRUB_MEMORY_CPU_CR4_PSE_ON), %eax
+ movl %eax, %cr4
+
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator64_cr3)
+ .long 0
+ movl %eax, %cr3
+
+ /* Turn on amd64. */
+ movl $GRUB_MEMORY_CPU_AMD64_MSR, %ecx
+ rdmsr
+ orl $GRUB_MEMORY_CPU_AMD64_MSR_ON, %eax
+ wrmsr
+
+ /* Enable paging. */
+ movl %cr0, %eax
+ orl $GRUB_MEMORY_CPU_CR0_PAGING_ON, %eax
+ movl %eax, %cr0
+
+ RELOAD_GDT
+#else
+ /* mov imm64, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator64_cr3)
+ .quad 0
+ movq %rax, %cr3
+#endif
+
+ .code64
+
+ /* mov imm64, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator64_rsp)
+ .quad 0
+
+ movq %rax, %rsp
+
+ /* mov imm64, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator64_rsi)
+ .quad 0
+
+ movq %rax, %rsi
+
+ /* mov imm64, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator64_rax)
+ .quad 0
+
+ /* mov imm64, %rbx */
+ .byte 0x48
+ .byte 0xbb
+VARIABLE(grub_relocator64_rbx)
+ .quad 0
+
+ /* mov imm64, %rcx */
+ .byte 0x48
+ .byte 0xb9
+VARIABLE(grub_relocator64_rcx)
+ .quad 0
+
+ /* mov imm64, %rdx */
+ .byte 0x48
+ .byte 0xba
+VARIABLE(grub_relocator64_rdx)
+ .quad 0
+
+ /* Cleared direction flag is of no problem with any current
+ payload and makes this implementation easier. */
+ cld
+
+ jmp *LOCAL(jump_addr) (%rip)
+
+LOCAL(jump_addr):
+VARIABLE(grub_relocator64_rip)
+ .quad 0
+
+#ifndef __x86_64__
+ .p2align 4
+LOCAL(gdt):
+ /* NULL. */
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+
+ /* 64-bit segment. */
+ .word 0xffff /* Limit xffff. */
+ .word 0x0000 /* Base xxxx0000. */
+ .byte 0x00 /* Base xx00xxxx. */
+ .byte (0x8 /* Type 8. */ | (1 << 4) /* Code. */ \
+ | (0 << 5) /* Ring 0. */ | (1 << 7) /* Present. */)
+ .byte (0xf /* Limit fxxxx. */ | (0 << 4) /* AVL flag. */ \
+ | (1 << 5) /* 64-bit. */ | (0 << 6) \
+ | (1 << 7) /* 4K granular. */)
+ .byte 0x00 /* Base 00xxxxxx. */
+
+ /* Data segment*/
+ .word 0xffff /* Limit xffff. */
+ .word 0x0000 /* Base xxxx0000. */
+ .byte 0x00 /* Base xx00xxxx. */
+ .byte (0x0 /* Type 0. */ | (0 << 4) /* Data. */ \
+ | (0 << 5) /* Ring 0. */ | (1 << 7) /* Present. */)
+ .byte (0xf /* Limit fxxxx. */ | (0 << 4) /* AVL flag. */ \
+ | (0 << 5) /* Data. */ | (0 << 6) \
+ | (1 << 7) /* 4K granular. */)
+ .byte 0x00 /* Base 00xxxxxx. */
+
+ /* Compatibility segment. */
+ .word 0xffff /* Limit xffff. */
+ .word 0x0000 /* Base xxxx0000. */
+ .byte 0x00 /* Base xx00xxxx. */
+ .byte (0x8 /* Type 8. */ | (1 << 4) /* Code. */ \
+ | (0 << 5) /* Ring 0. */ | (1 << 7) /* Present. */)
+ .byte (0xf /* Limit fxxxx. */ | (0 << 4) /* AVL flag. */ \
+ | (0 << 5) /* 32-bit. */ | (1 << 6) /* 32-bit. */ \
+ | (1 << 7) /* 4K granular. */)
+ .byte 0x00 /* Base 00xxxxxx. */
+
+LOCAL(gdt_end):
+#endif
+
+VARIABLE(grub_relocator64_end)
diff --git a/grub-core/lib/i386/relocator_asm.S b/grub-core/lib/i386/relocator_asm.S
new file mode 100644
index 0000000..f273586
--- /dev/null
+++ b/grub-core/lib/i386/relocator_asm.S
@@ -0,0 +1,80 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/i386/memory.h>
+
+ .p2align 2
+
+VARIABLE(grub_relocator_backward_start)
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator_backward_dest)
+ .long 0
+ movl %eax, %edi
+
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator_backward_src)
+ .long 0
+ movl %eax, %esi
+
+ /* mov imm32, %ecx */
+ .byte 0xb9
+VARIABLE(grub_relocator_backward_chunk_size)
+ .long 0
+
+ add %ecx, %esi
+ add %ecx, %edi
+
+
+ /* Backward movsb is implicitly off-by-one. compensate that. */
+ sub $1, %esi
+ sub $1, %edi
+
+ /* Backward copy. */
+ std
+
+ rep
+ movsb
+VARIABLE(grub_relocator_backward_end)
+
+
+VARIABLE(grub_relocator_forward_start)
+ /* mov imm32, %eax */
+ .byte 0xb8
+VARIABLE(grub_relocator_forward_dest)
+ .long 0
+ movl %eax, %edi
+
+ /* mov imm32, %rax */
+ .byte 0xb8
+VARIABLE(grub_relocator_forward_src)
+ .long 0
+ movl %eax, %esi
+
+ /* mov imm32, %ecx */
+ .byte 0xb9
+VARIABLE(grub_relocator_forward_chunk_size)
+ .long 0
+
+ /* Forward copy. */
+ cld
+ rep
+ movsb
+VARIABLE(grub_relocator_forward_end)
diff --git a/grub-core/lib/i386/relocator_backward.S b/grub-core/lib/i386/relocator_backward.S
new file mode 100644
index 0000000..0691347
--- /dev/null
+++ b/grub-core/lib/i386/relocator_backward.S
@@ -0,0 +1,2 @@
+#define BACKWARD
+#include "relocator_asm.S"
diff --git a/grub-core/lib/i386/relocator_common.S b/grub-core/lib/i386/relocator_common.S
new file mode 100644
index 0000000..bd5b53f
--- /dev/null
+++ b/grub-core/lib/i386/relocator_common.S
@@ -0,0 +1,82 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include <grub/symbol.h>
+#include <grub/i386/memory.h>
+
+#ifdef __x86_64__
+#define RAX %rax
+#define RSI %rsi
+#else
+#define RAX %eax
+#define RSI %esi
+#endif
+
+ .macro DISABLE_PAGING
+#ifdef GRUB_MACHINE_IEEE1275
+#endif
+
+ movl %cr0, %eax
+ andl $(~GRUB_MEMORY_CPU_CR0_PAGING_ON), %eax
+ movl %eax, %cr0
+ .endm
+
+ .macro PREAMBLE
+LOCAL(base):
+ /* %rax contains now our new 'base'. */
+ mov RAX, RSI
+
+ add $(LOCAL(cont0) - LOCAL(base)), RAX
+ jmp *RAX
+LOCAL(cont0):
+ .endm
+
+ .macro RELOAD_GDT
+ lea (LOCAL(cont1) - LOCAL(base)) (RSI, 1), RAX
+ movl %eax, (LOCAL(jump_vector) - LOCAL(base)) (RSI, 1)
+
+ lea (LOCAL(gdt) - LOCAL(base)) (RSI, 1), RAX
+ mov RAX, (LOCAL(gdt_addr) - LOCAL(base)) (RSI, 1)
+
+ /* Switch to compatibility mode. */
+ lgdt (LOCAL(gdtdesc) - LOCAL(base)) (RSI, 1)
+
+ /* Update %cs. */
+ ljmp *(LOCAL(jump_vector) - LOCAL(base)) (RSI, 1)
+
+ .p2align 4
+LOCAL(gdtdesc):
+ .word LOCAL(gdt_end) - LOCAL(gdt)
+LOCAL(gdt_addr):
+#ifdef __x86_64__
+ /* Filled by the code. */
+ .quad 0
+#else
+ /* Filled by the code. */
+ .long 0
+#endif
+
+ .p2align 4
+LOCAL(jump_vector):
+ /* Jump location. Is filled by the code */
+ .long 0
+ .long CODE_SEGMENT
+
+LOCAL(cont1):
+ .endm
diff --git a/grub-core/lib/i386/setjmp.S b/grub-core/lib/i386/setjmp.S
new file mode 100644
index 0000000..5b7aa15
--- /dev/null
+++ b/grub-core/lib/i386/setjmp.S
@@ -0,0 +1,59 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/dl.h>
+
+ .file "setjmp.S"
+
+GRUB_MOD_LICENSE ("GPLv3+")
+
+ .text
+
+/*
+ * int grub_setjmp (grub_jmp_buf env)
+ */
+FUNCTION(grub_setjmp)
+ movl %ebx, 0(%eax) /* EBX */
+ movl %esi, 4(%eax) /* ESI */
+ movl %edi, 8(%eax) /* EDI */
+ movl %ebp, 12(%eax) /* EBP */
+ popl %ecx
+ movl %esp, 16(%eax) /* ESP */
+ movl %ecx, 20(%eax) /* EIP */
+ xorl %eax, %eax
+ jmp *%ecx
+
+
+/*
+ * int grub_longjmp (grub_jmp_buf env, int val)
+ */
+FUNCTION(grub_longjmp)
+ movl 0(%eax), %ebx
+ movl 4(%eax), %esi
+ movl 8(%eax), %edi
+ movl 12(%eax), %ebp
+ movl 16(%eax), %esp
+ movl 20(%eax), %ecx
+
+ movl %edx, %eax
+ testl %eax, %eax
+ jnz 1f
+ incl %eax
+1: jmp *%ecx
+
diff --git a/grub-core/lib/ieee1275/datetime.c b/grub-core/lib/ieee1275/datetime.c
new file mode 100644
index 0000000..4105c63
--- /dev/null
+++ b/grub-core/lib/ieee1275/datetime.c
@@ -0,0 +1,145 @@
+/* kern/cmos_datetime.c - CMOS datetime function.
+ *
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/datetime.h>
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static char *rtc = 0;
+
+static void
+find_rtc (void)
+{
+ auto int hook (struct grub_ieee1275_devalias *alias);
+ int hook (struct grub_ieee1275_devalias *alias)
+ {
+ if (grub_strcmp (alias->type, "rtc") == 0)
+ {
+ grub_dprintf ("datetime", "Found RTC %s\n", alias->path);
+ rtc = grub_strdup (alias->path);
+ return 1;
+ }
+ return 0;
+ }
+
+ grub_ieee1275_devices_iterate (hook);
+}
+
+grub_err_t
+grub_get_datetime (struct grub_datetime *datetime)
+{
+ struct get_time_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t device;
+ grub_ieee1275_cell_t catch_result;
+ grub_ieee1275_cell_t year;
+ grub_ieee1275_cell_t month;
+ grub_ieee1275_cell_t day;
+ grub_ieee1275_cell_t hour;
+ grub_ieee1275_cell_t minute;
+ grub_ieee1275_cell_t second;
+ }
+ args;
+ int status;
+ grub_ieee1275_ihandle_t ihandle;
+
+ if (!rtc)
+ find_rtc ();
+ if (!rtc)
+ return grub_error (GRUB_ERR_IO, "no RTC found");
+
+ status = grub_ieee1275_open (rtc, &ihandle);
+ if (status == -1)
+ return grub_error (GRUB_ERR_IO, "couldn't open RTC");
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 2, 7);
+ args.device = (grub_ieee1275_cell_t) ihandle;
+ args.method = (grub_ieee1275_cell_t) "get-time";
+
+ status = IEEE1275_CALL_ENTRY_FN (&args);
+
+ grub_ieee1275_close (ihandle);
+
+ if (status == -1)
+ return grub_error (GRUB_ERR_IO, "get-time failed");
+
+ datetime->year = args.year;
+ datetime->month = args.month;
+ datetime->day = args.day;
+ datetime->hour = args.hour;
+ datetime->minute = args.minute;
+ datetime->second = args.second;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_set_datetime (struct grub_datetime *datetime)
+{
+ struct set_time_args
+ {
+ struct grub_ieee1275_common_hdr common;
+ grub_ieee1275_cell_t method;
+ grub_ieee1275_cell_t device;
+ grub_ieee1275_cell_t year;
+ grub_ieee1275_cell_t month;
+ grub_ieee1275_cell_t day;
+ grub_ieee1275_cell_t hour;
+ grub_ieee1275_cell_t minute;
+ grub_ieee1275_cell_t second;
+ grub_ieee1275_cell_t catch_result;
+ }
+ args;
+ int status;
+ grub_ieee1275_ihandle_t ihandle;
+
+ if (!rtc)
+ find_rtc ();
+ if (!rtc)
+ return grub_error (GRUB_ERR_IO, "no RTC found");
+
+ status = grub_ieee1275_open (rtc, &ihandle);
+ if (status == -1)
+ return grub_error (GRUB_ERR_IO, "couldn't open RTC");
+
+ INIT_IEEE1275_COMMON (&args.common, "call-method", 8, 1);
+ args.device = (grub_ieee1275_cell_t) ihandle;
+ args.method = (grub_ieee1275_cell_t) "set-time";
+
+ args.year = datetime->year;
+ args.month = datetime->month;
+ args.day = datetime->day;
+ args.hour = datetime->hour;
+ args.minute = datetime->minute;
+ args.second = datetime->second;
+
+ status = IEEE1275_CALL_ENTRY_FN (&args);
+
+ grub_ieee1275_close (ihandle);
+
+ if (status == -1)
+ return grub_error (GRUB_ERR_IO, "set-time failed");
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/lib/ieee1275/halt.c b/grub-core/lib/ieee1275/halt.c
new file mode 100644
index 0000000..7ede29d
--- /dev/null
+++ b/grub-core/lib/ieee1275/halt.c
@@ -0,0 +1,33 @@
+/* openfw.c -- Open firmware support functions. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/misc.h>
+
+void
+grub_halt (void)
+{
+ /* Not standardized. We try three known commands. */
+
+ grub_ieee1275_interpret ("shut-down", 0);
+ grub_ieee1275_interpret ("power-off", 0);
+ grub_ieee1275_interpret ("poweroff", 0);
+
+ while (1);
+}
diff --git a/grub-core/lib/ieee1275/relocator.c b/grub-core/lib/ieee1275/relocator.c
new file mode 100644
index 0000000..c09f1e9
--- /dev/null
+++ b/grub-core/lib/ieee1275/relocator.c
@@ -0,0 +1,95 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/relocator.h>
+#include <grub/relocator_private.h>
+#include <grub/memory.h>
+#include <grub/ieee1275/ieee1275.h>
+
+unsigned
+grub_relocator_firmware_get_max_events (void)
+{
+ int counter = 0;
+ auto int NESTED_FUNC_ATTR count (grub_uint64_t addr __attribute__ ((unused)),
+ grub_uint64_t len __attribute__ ((unused)),
+ grub_memory_type_t type __attribute__ ((unused)));
+ int NESTED_FUNC_ATTR count (grub_uint64_t addr __attribute__ ((unused)),
+ grub_uint64_t len __attribute__ ((unused)),
+ grub_memory_type_t type __attribute__ ((unused)))
+ {
+ counter++;
+ return 0;
+ }
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_INTERPRET))
+ return 0;
+ grub_machine_mmap_iterate (count);
+ return 2 * counter;
+}
+
+unsigned
+grub_relocator_firmware_fill_events (struct grub_relocator_mmap_event *events)
+{
+ int counter = 0;
+ auto int NESTED_FUNC_ATTR fill (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type);
+ int NESTED_FUNC_ATTR fill (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type)
+ {
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM))
+ {
+ if (addr + len <= 0x180000)
+ return 0;
+
+ if (addr < 0x180000)
+ {
+ len = addr + len - 0x180000;
+ addr = 0x180000;
+ }
+ }
+
+ events[counter].type = REG_FIRMWARE_START;
+ events[counter].pos = addr;
+ counter++;
+ events[counter].type = REG_FIRMWARE_END;
+ events[counter].pos = addr + len;
+ counter++;
+
+ return 0;
+ }
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_INTERPRET))
+ return 0;
+ grub_machine_mmap_iterate (fill);
+ return counter;
+}
+
+int
+grub_relocator_firmware_alloc_region (grub_addr_t start, grub_size_t size)
+{
+ return (grub_claimmap (start, size) >= 0);
+}
+
+void
+grub_relocator_firmware_free_region (grub_addr_t start, grub_size_t size)
+{
+ grub_ieee1275_release (start, size);
+}
diff --git a/grub-core/lib/legacy_parse.c b/grub-core/lib/legacy_parse.c
new file mode 100644
index 0000000..659fa70
--- /dev/null
+++ b/grub-core/lib/legacy_parse.c
@@ -0,0 +1,815 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/legacy_parse.h>
+#include <grub/i386/pc/vesa_modes_table.h>
+
+struct legacy_command
+{
+ const char *name;
+ const char *map;
+ const char *suffix;
+ unsigned suffixarg;
+ unsigned argc;
+ enum arg_type {
+ TYPE_VERBATIM,
+ TYPE_FORCE_OPTION,
+ TYPE_NOAPM_OPTION,
+ TYPE_TYPE_OR_NOMEM_OPTION,
+ TYPE_OPTION,
+ TYPE_FILE,
+ TYPE_FILE_NO_CONSUME,
+ TYPE_PARTITION,
+ TYPE_BOOL,
+ TYPE_INT,
+ TYPE_REST_VERBATIM,
+ TYPE_VBE_MODE
+ } argt[4];
+ enum {
+ FLAG_IGNORE_REST = 0x001,
+ FLAG_FALLBACK_AVAILABLE = 0x004,
+ FLAG_FALLBACK = 0x008,
+ FLAG_COLOR_INVERT = 0x010,
+ FLAG_NO_MENUENTRY = 0x020,
+ FLAG_MENUENTRY_ONLY = 0x040,
+ FLAG_TERMINAL = 0x080,
+ FLAG_TITLE = 0x100,
+ } flags;
+ const char *shortdesc;
+ const char *longdesc;
+};
+
+static struct legacy_command legacy_commands[] =
+ {
+ {"blocklist", "blocklist '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
+ "Print the blocklist notation of the file FILE."},
+ {"boot", "boot\n", NULL, 0, 0, {}, 0, 0,
+ "Boot the OS/chain-loader which has been loaded."},
+ /* FIXME: bootp unsupported. */
+ {"cat", "cat '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
+ "Print the contents of the file FILE."},
+ {"chainloader", "chainloader %s '%s'\n", NULL, 0,
+ 2, {TYPE_FORCE_OPTION, TYPE_FILE}, 0, "[--force] FILE",
+ "Load the chain-loader FILE. If --force is specified, then load it"
+ " forcibly, whether the boot loader signature is present or not."},
+ {"cmp", "cmp '%s' '%s'\n", NULL, 0,
+ 2, {TYPE_FILE, TYPE_FILE}, FLAG_IGNORE_REST, "FILE1 FILE2",
+ "Compare the file FILE1 with the FILE2 and inform the different values"
+ " if any."},
+ {"color", "set color_normal='%s'; set color_highlight='%s'\n", NULL, 0,
+ 2, {TYPE_VERBATIM, TYPE_VERBATIM},
+ FLAG_IGNORE_REST | FLAG_FALLBACK_AVAILABLE, "NORMAL [HIGHLIGHT]",
+ "Change the menu colors. The color NORMAL is used for most"
+ " lines in the menu, and the color HIGHLIGHT is used to highlight the"
+ " line where the cursor points. If you omit HIGHLIGHT, then the"
+ " inverted color of NORMAL is used for the highlighted line."
+ " The format of a color is \"FG/BG\". FG and BG are symbolic color names."
+ " A symbolic color name must be one of these: black, blue, green,"
+ " cyan, red, magenta, brown, light-gray, dark-gray, light-blue,"
+ " light-green, light-cyan, light-red, light-magenta, yellow and white."
+ " But only the first eight names can be used for BG. You can prefix"
+ " \"blink-\" to FG if you want a blinking foreground color."},
+ {"color", "set color_normal='%s'; set color_highlight='%s'\n", NULL, 0,
+ 1, {TYPE_VERBATIM},
+ FLAG_IGNORE_REST | FLAG_FALLBACK | FLAG_COLOR_INVERT, NULL, NULL},
+ {"configfile", "legacy_configfile '%s'\n", NULL, 0, 1, {TYPE_FILE},
+ 0, "FILE", "Load FILE as the configuration file."},
+ {"debug",
+ "if [ -z \"$debug\" ]; then set debug=all; else set debug=; fi\n", NULL, 0,
+ 0, {}, 0, 0, "Turn on/off the debug mode."},
+ {"default",
+ "set default='%s'; if [ x\"$default\" = xsaved ]; then load_env; "
+ "set default=\"$saved_entry\"; fi\n", NULL, 0, 1, {TYPE_VERBATIM}, 0,
+ "[NUM | `saved']",
+ "Set the default entry to entry number NUM (if not specified, it is"
+ " 0, the first entry) or the entry number saved by savedefault."},
+ /* FIXME: dhcp unsupported. */
+ {"displayapm", "lsapm\n", NULL, 0, 0, {}, 0, 0,
+ "Display APM BIOS information."},
+ {"displaymem", "lsmmap\n", NULL, 0, 0, {}, 0, 0,
+ "Display what GRUB thinks the system address space map of the"
+ " machine is, including all regions of physical RAM installed."},
+ /* NOTE: embed unsupported. */
+ {"fallback", "set fallback='%s'\n", NULL, 0,
+ 1, {TYPE_VERBATIM}, 0, "NUM...",
+ "Go into unattended boot mode: if the default boot entry has any"
+ " errors, instead of waiting for the user to do anything, it"
+ " immediately starts over using the NUM entry (same numbering as the"
+ " `default' command). This obviously won't help if the machine"
+ " was rebooted by a kernel that GRUB loaded."},
+ {"find", "search -f '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILENAME",
+ "Search for the filename FILENAME in all of partitions and print the list of"
+ " the devices which contain the file."},
+ /* FIXME: fstest unsupported. */
+ /* NOTE: The obsolete C/H/S geometry isn't shown anymore. */
+ {"geometry", "insmod regexp; ls -l (%s*)\n", NULL, 0, 1, {TYPE_VERBATIM}, 0, "DRIVE",
+ "Print the information for a drive DRIVE. "},
+ {"halt", "halt %s\n", NULL, 0, 1, {TYPE_NOAPM_OPTION}, 0, "[--no-apm]",
+ "Halt your system. If APM is available on it, turn off the power using"
+ " the APM BIOS, unless you specify the option `--no-apm'."},
+ /* FIXME: help unsupported. */ /* NUL_TERMINATE */
+ {"hiddenmenu", NULL,
+ "if sleep -i $timeout; then timeout=0; else timeout=-1; fi\n", 0,
+ 0, {}, 0, "", "Hide the menu."},
+ {"hide", "parttool '%s' hidden+\n", NULL, 0, 1, {TYPE_PARTITION},
+ 0, "PARTITION",
+ "Hide PARTITION by setting the \"hidden\" bit in"
+ " its partition type code."},
+ /* FIXME: ifconfig unsupported. */
+ /* FIXME: impsprobe unsupported. */
+ {"initrd", "legacy_initrd '%s' %s\n", NULL, 0, 2, {TYPE_FILE_NO_CONSUME,
+ TYPE_REST_VERBATIM}, 0,
+ "FILE [ARG ...]",
+ "Load an initial ramdisk FILE for a Linux format boot image and set the"
+ " appropriate parameters in the Linux setup area in memory."},
+ /* NOTE: install unsupported. */
+ /* FIXME: ioprobe unsupported. */
+ /* FIXME: really support --no-mem-option. */
+ {"kernel", "legacy_kernel %s %s '%s' %s\n", NULL, 0,
+ 4, {TYPE_TYPE_OR_NOMEM_OPTION, TYPE_TYPE_OR_NOMEM_OPTION,
+ TYPE_FILE_NO_CONSUME, TYPE_REST_VERBATIM}, 0,
+ "[--no-mem-option] [--type=TYPE] FILE [ARG ...]",
+ "Attempt to load the primary boot image from FILE. The rest of the"
+ " line is passed verbatim as the \"kernel command line\". Any modules"
+ " must be reloaded after using this command. The option --type is used"
+ " to suggest what type of kernel to be loaded. TYPE must be either of"
+ " \"netbsd\", \"freebsd\", \"openbsd\", \"linux\", \"biglinux\" and"
+ " \"multiboot\". The option --no-mem-option tells GRUB not to pass a"
+ " Linux's mem option automatically."},
+ {"lock", "if ! authenticate legacy; then return; fi", NULL, 0, 0, {}, 0,
+ 0, "Break a command execution unless the user is authenticated."},
+ {"makeactive", "parttool \"$root\" boot+\n", NULL, 0, 0, {}, 0, 0,
+ "Set the active partition on the root disk to GRUB's root device."
+ " This command is limited to _primary_ PC partitions on a hard disk."},
+ {"map", "drivemap '%s' '%s'\n", NULL, 0,
+ 2, {TYPE_PARTITION, TYPE_PARTITION},
+ FLAG_IGNORE_REST, "TO_DRIVE FROM_DRIVE",
+ "Map the drive FROM_DRIVE to the drive TO_DRIVE. This is necessary"
+ " when you chain-load some operating systems, such as DOS, if such an"
+ " OS resides at a non-first drive."},
+ /* NOTE: md5crypt unsupported since GRUB has not enough entropy and this
+ hash shouldn't be used anymore. */
+ {"module", "legacy_initrd '%s' %s\n", NULL, 0, 2, {TYPE_FILE_NO_CONSUME,
+ TYPE_REST_VERBATIM}, 0,
+ "FILE [ARG ...]",
+ "Load a boot module FILE for a Multiboot format boot image (no"
+ " interpretation of the file contents is made, so users of this"
+ " command must know what the kernel in question expects). The"
+ " rest of the line is passed as the \"module command line\", like"
+ " the `kernel' command."},
+ {"modulenounzip", "legacy_initrd_nounzip '%s' %s\n", NULL, 0, 2,
+ {TYPE_FILE_NO_CONSUME, TYPE_REST_VERBATIM}, 0,
+ "FILE [ARG ...]",
+ "The same as `module', except that automatic decompression is"
+ " disabled."},
+ {"pager", "set pager=%s; if [ \"$pager\" = 0 ]; then "
+ " echo Internal pager is now off; else "
+ "echo Internal pager is now on; fi\n", NULL, 0,
+ 1, {TYPE_BOOL}, FLAG_FALLBACK_AVAILABLE, "[FLAG]",
+ "Toggle pager mode with no argument. If FLAG is given and its value"
+ " is `on', turn on the mode. If FLAG is `off', turn off the mode."},
+ {"pager",
+ "if [ \"$pager\" = 1 ]; then pager=0; echo Internal pager is now off;"
+ "else pager=1; echo Internal pager is now on; fi\n", NULL, 0, 0, {},
+ FLAG_FALLBACK, NULL, NULL},
+ /* FIXME: partnew unsupported. */
+ {"parttype", "parttool '%s' type=%s\n", NULL, 0,
+ 2, {TYPE_PARTITION, TYPE_INT}, 0,
+ "PART TYPE", "Change the type of the partition PART to TYPE."},
+ {"password", "if [ \"$superusers\" = "" ]; then superusers=legacy; fi;\n"
+ "legacy_password %s '%s'\n",
+ "menuentry \"Superuser menu\" --users \"legacy\" { configfile '%s'; }\n",
+ 2, 3, {TYPE_OPTION, TYPE_VERBATIM, TYPE_FILE},
+ FLAG_IGNORE_REST | FLAG_FALLBACK_AVAILABLE | FLAG_NO_MENUENTRY,
+ "[--md5] PASSWD [FILE]",
+ "If used in the first section of a menu file, disable all"
+ " interactive editing control (menu entry editor and"
+ " command line). If the password PASSWD is entered, it loads the"
+ " FILE as a new config file and restarts the GRUB Stage 2. If you"
+ " omit the argument FILE, then GRUB just unlocks privileged"
+ " instructions. You can also use it in the script section, in"
+ " which case it will ask for the password, before continuing."
+ " The option --md5 tells GRUB that PASSWD is encrypted with"
+ " md5crypt."},
+ {"password", "if [ \"$superusers\" = "" ]; then superusers=legacy; fi;\n"
+ "legacy_password %s '%s'\n", NULL, 0, 2, {TYPE_OPTION, TYPE_VERBATIM},
+ FLAG_IGNORE_REST | FLAG_FALLBACK | FLAG_NO_MENUENTRY, NULL, NULL},
+ {"password", "if legacy_check_password %s '%s'; then configfile '%s'; "
+ "else return; fi\n", NULL, 2, 3, {TYPE_OPTION, TYPE_VERBATIM, TYPE_FILE},
+ FLAG_IGNORE_REST | FLAG_FALLBACK_AVAILABLE | FLAG_MENUENTRY_ONLY,
+ NULL, NULL},
+ {"password", "if ! legacy_check_password %s '%s'; then return fi;\n",
+ NULL, 0, 2, {TYPE_OPTION, TYPE_VERBATIM},
+ FLAG_IGNORE_REST | FLAG_FALLBACK | FLAG_MENUENTRY_ONLY, NULL, NULL},
+ /* NOTE: GRUB2 has a design principle of not eternally waiting for user
+ input. 60 seconds should be enough.
+ */
+ {"pause", "echo %s; if ! sleep -i 60; then return; fi\n", NULL, 0, 1,
+ {TYPE_REST_VERBATIM}, 0,
+ "[MESSAGE ...]", "Print MESSAGE, then wait until a key is pressed."},
+ /* FIXME: rarp unsupported. */
+ {"read", "read_dword %s\n", NULL, 0, 1, {TYPE_INT}, 0, "ADDR",
+ "Read a 32-bit value from memory at address ADDR and"
+ " display it in hex format."},
+ {"reboot", "reboot\n", NULL, 0, 0, {}, 0, 0, "Reboot your system."},
+ {"root", "set root='%s'; set legacy_hdbias='%s'\n", NULL, 0,
+ 2, {TYPE_PARTITION, TYPE_INT}, FLAG_FALLBACK_AVAILABLE,
+ "[DEVICE [HDBIAS]]",
+ "Set the current \"root device\" to the device DEVICE, then"
+ " attempt to mount it to get the partition size (for passing the"
+ " partition descriptor in `ES:ESI', used by some chain-loaded"
+ " bootloaders), the BSD drive-type (for booting BSD kernels using"
+ " their native boot format), and correctly determine "
+ " the PC partition where a BSD sub-partition is located. The"
+ " optional HDBIAS parameter is a number to tell a BSD kernel"
+ " how many BIOS drive numbers are on controllers before the current"
+ " one. For example, if there is an IDE disk and a SCSI disk, and your"
+ " FreeBSD root partition is on the SCSI disk, then use a `1' for HDBIAS."},
+ {"root", "echo \"$root\"\n", NULL, 0, 0, {}, FLAG_FALLBACK, NULL, NULL},
+ {"rootnoverify", "set root='%s'; set legacy_hdbias='%s'\n", NULL, 0,
+ 2, {TYPE_PARTITION, TYPE_INT}, 0,
+ "[DEVICE [HDBIAS]]",
+ "Similar to `root', but don't attempt to mount the partition. This"
+ " is useful for when an OS is outside of the area of the disk that"
+ " GRUB can read, but setting the correct root device is still"
+ " desired. Note that the items mentioned in `root' which"
+ " derived from attempting the mount will NOT work correctly."},
+ {"rootnoverify", "echo \"$root\"\n", NULL, 0,
+ 0, {}, FLAG_FALLBACK, NULL, NULL},
+ /* FIXME: support saving NUM and fallback. */
+ {"savedefault", "saved_entry=${chosen}; save_env saved_entry\n", NULL, 0,
+ 0, {}, 0, "[NUM | `fallback']",
+ "Save the current entry as the default boot entry if no argument is"
+ " specified. If a number is specified, this number is saved. If"
+ " `fallback' is used, next fallback entry is saved."},
+ {"serial", "serial %s\n", NULL, 0, 1, {TYPE_REST_VERBATIM}, 0,
+ "[--unit=UNIT] [--port=PORT] [--speed=SPEED] [--word=WORD] "
+ "[--parity=PARITY] [--stop=STOP] [--device=DEV]",
+ "Initialize a serial device. UNIT is a digit that specifies which serial"
+ " device is used (e.g. 0 == COM1). If you need to specify the port number,"
+ " set it by --port. SPEED is the DTE-DTE speed. WORD is the word length,"
+ " PARITY is the type of parity, which is one of `no', `odd' and `even'."
+ " STOP is the length of stop bit(s). The option --device can be used only"
+ " in the grub shell, which specifies the file name of a tty device. The"
+ " default values are COM1, 9600, 8N1."},
+ /* FIXME: setkey unsupported. */ /* NUL_TERMINATE */
+ /* NOTE: setup unsupported. */
+ /* FIXME: --no-echo, --no-edit, hercules unsupported. */
+ /* NOTE: both terminals are activated so --silent and --timeout
+ are useless. */
+ {"terminal", NULL, NULL, 0, 0, {}, FLAG_TERMINAL | FLAG_IGNORE_REST,
+ "[--dumb] [--no-echo] [--no-edit] [--timeout=SECS] [--lines=LINES] "
+ "[--silent] [console] [serial] [hercules]",
+ "Select a terminal. When multiple terminals are specified, wait until"
+ " you push any key to continue. If both console and serial are specified,"
+ " the terminal to which you input a key first will be selected. If no"
+ " argument is specified, print current setting. The option --dumb"
+ " specifies that your terminal is dumb, otherwise, vt100-compatibility"
+ " is assumed. If you specify --no-echo, input characters won't be echoed."
+ " If you specify --no-edit, the BASH-like editing feature will be disabled."
+ " If --timeout is present, this command will wait at most for SECS"
+ " seconds. The option --lines specifies the maximum number of lines."
+ " The option --silent is used to suppress messages."},
+ /* FIXME: terminfo unsupported. */ /* NUL_TERMINATE */
+ {"testload", "cat '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
+ "Read the entire contents of FILE in several different ways and"
+ " compares them, to test the filesystem code. "
+ " If this test succeeds, then a good next"
+ " step is to try loading a kernel."},
+ {"testvbe", "insmod vbe; videotest '%s'\n", NULL, 0, 1, {TYPE_VBE_MODE}, 0,
+ "MODE", "Test the VBE mode MODE. Hit any key to return."},
+ /* FIXME: tftpserver unsupported. */
+ {"timeout", "set timeout=%s\n", NULL, 0, 1, {TYPE_INT}, 0, "SEC",
+ "Set a timeout, in SEC seconds, before automatically booting the"
+ " default entry (normally the first entry defined)."},
+ {"title", NULL, NULL, 0, 0, {}, FLAG_TITLE, "NAME ...",
+ "Start a new boot entry, and set its name to the contents of the"
+ " rest of the line, starting with the first non-space character."},
+ {"unhide", "parttool '%s' hidden-\n", NULL, 0,
+ 1, {TYPE_PARTITION}, 0, "PARTITION",
+ "Unhide PARTITION by clearing the \"hidden\" bit in its"
+ " partition type code."},
+ /* FIXME: uppermem unsupported. */
+ {"uuid", "search --set=root --fs-uuid '%s'\n", NULL, 0, 1, {TYPE_VERBATIM},
+ 0, "UUID", "Find root by UUID"},
+ {"vbeprobe", "insmod vbe; videoinfo '%s'\n", NULL, 0, 1, {TYPE_VBE_MODE},
+ FLAG_FALLBACK_AVAILABLE, "[MODE]",
+ "Probe VBE information. If the mode number MODE is specified, show only"
+ " the information about only the mode."},
+ {"vbeprobe", "insmod vbe; videoinfo\n", NULL, 0, 0, {},
+ FLAG_FALLBACK, NULL, NULL}
+ };
+
+char *
+grub_legacy_escape (const char *in, grub_size_t len)
+{
+ char *ptr;
+ char *ret;
+ char saved;
+ int overhead = 0;
+
+ for (ptr = (char*)in; ptr < in + len && *ptr; ptr++)
+ if (*ptr == '\'')
+ overhead += 3;
+ ret = grub_malloc (ptr - in + overhead + 1);
+ if (!ret)
+ return NULL;
+
+ ptr = (char*)in;
+ saved = ptr[len];
+ ptr[len] = '\0';
+ grub_strchrsub (ret, ptr, '\'', "'\\''");
+ ptr[len] = saved;
+ return ret;
+}
+
+static char *
+adjust_file (const char *in, grub_size_t len)
+{
+ const char *comma, *ptr, *rest;
+ char *ret, *outptr;
+ int overhead = 0;
+ int part = -1, subpart = -1;
+ if (in[0] != '(')
+ return grub_legacy_escape (in, len);
+ for (ptr = in + 1; ptr < in + len && *ptr && *ptr != ')'
+ && *ptr != ','; ptr++)
+ if (*ptr == '\'' || *ptr == '\\')
+ overhead++;
+ comma = ptr;
+ if (*comma != ',')
+ return grub_legacy_escape (in, len);
+ part = grub_strtoull (comma + 1, (char **) &rest, 0);
+ if (rest[0] == ',' && rest[1] >= 'a' && rest[1] <= 'z')
+ {
+ subpart = rest[1] - 'a';
+ rest += 2;
+ }
+ for (ptr = rest; ptr < in + len && *ptr; ptr++)
+ if (*ptr == '\'' || *ptr == '\\')
+ overhead++;
+
+ /* 35 is enough for any 2 numbers. */
+ ret = grub_malloc (ptr - in + overhead + 35);
+ if (!ret)
+ return NULL;
+
+ outptr = ret;
+ for (ptr = in; ptr < in + len && ptr <= comma; ptr++)
+ {
+ if (*ptr == '\'' || *ptr == '\\')
+ *outptr++ = '\\';
+
+ *outptr++ = *ptr;
+ }
+ if (subpart != -1)
+ grub_snprintf (outptr, 35, "%d,%d", part + 1, subpart + 1);
+ else
+ grub_snprintf (outptr, 35, "%d", part + 1);
+ while (*outptr)
+ outptr++;
+ for (ptr = rest; ptr < in + len; ptr++)
+ {
+ if (*ptr == '\'' || *ptr == '\\')
+ *outptr++ = '\\';
+
+ *outptr++ = *ptr;
+ }
+ *outptr = 0;
+ return ret;
+}
+
+static int
+check_option (const char *a, char *b, grub_size_t len)
+{
+ if (grub_strlen (b) != len)
+ return 0;
+ return grub_strncmp (a, b, len) == 0;
+}
+
+static int
+is_option (enum arg_type opt, const char *curarg, grub_size_t len)
+{
+ switch (opt)
+ {
+ case TYPE_NOAPM_OPTION:
+ return check_option (curarg, "--no-apm", len);
+ case TYPE_FORCE_OPTION:
+ return check_option (curarg, "--force", len);
+ case TYPE_TYPE_OR_NOMEM_OPTION:
+ return check_option (curarg, "--type=netbsd", len)
+ || check_option (curarg, "--type=freebsd", len)
+ || check_option (curarg, "--type=openbsd", len)
+ || check_option (curarg, "--type=linux", len)
+ || check_option (curarg, "--type=biglinux", len)
+ || check_option (curarg, "--type=multiboot", len)
+ || check_option (curarg, "--no-mem-option", len);
+ case TYPE_OPTION:
+ return (len >= 2 && curarg[0] == '-' && curarg[1] == '-');
+ default:
+ return 0;
+ }
+}
+
+char *
+grub_legacy_parse (const char *buf, char **entryname, char **suffix)
+{
+ const char *ptr;
+ const char *cmdname;
+ unsigned i, cmdnum;
+ char *args[ARRAY_SIZE (legacy_commands[0].argt)];
+
+ *suffix = NULL;
+
+ for (ptr = buf; *ptr && grub_isspace (*ptr); ptr++);
+ if (!*ptr || *ptr == '#')
+ {
+ char *ret;
+ int len = grub_strlen (buf);
+ ret = grub_malloc (len + 2);
+ grub_memcpy (ret, buf, len);
+ if (len && ret[len - 1] == '\n')
+ ret[len] = 0;
+ else
+ {
+ ret[len] = '\n';
+ ret[len + 1] = 0;
+ }
+ return ret;
+ }
+
+ cmdname = ptr;
+ for (ptr = buf; *ptr && !grub_isspace (*ptr) && *ptr != '='; ptr++);
+
+ for (cmdnum = 0; cmdnum < ARRAY_SIZE (legacy_commands); cmdnum++)
+ if (grub_strncmp (legacy_commands[cmdnum].name, cmdname, ptr - cmdname) == 0
+ && legacy_commands[cmdnum].name[ptr - cmdname] == 0
+ && (!(*entryname != NULL && (legacy_commands[cmdnum].flags
+ & FLAG_NO_MENUENTRY)))
+ && (!(*entryname == NULL && (legacy_commands[cmdnum].flags
+ & FLAG_MENUENTRY_ONLY))))
+ break;
+ if (cmdnum == ARRAY_SIZE (legacy_commands))
+ return grub_xasprintf ("# Unsupported legacy command: %s\n", buf);
+
+ for (; grub_isspace (*ptr) || *ptr == '='; ptr++);
+
+ if (legacy_commands[cmdnum].flags & FLAG_TITLE)
+ {
+ const char *ptr2;
+ ptr2 = ptr + grub_strlen (ptr);
+ while (ptr2 > ptr && grub_isspace (*(ptr2 - 1)))
+ ptr2--;
+ *entryname = grub_strndup (ptr, ptr2 - ptr);
+ return NULL;
+ }
+
+ if (legacy_commands[cmdnum].flags & FLAG_TERMINAL)
+ {
+ int dumb = 0, lines = 24;
+#ifdef TODO
+ int no_echo = 0, no_edit = 0;
+ int hercules = 0;
+#endif
+ int console = 0, serial = 0;
+ /* Big enough for any possible resulting command. */
+ char outbuf[256] = "";
+ char *outptr;
+ while (*ptr)
+ {
+ /* "[--timeout=SECS] [--silent]"
+ " [console] [serial] [hercules]"*/
+ if (grub_memcmp (ptr, "--dumb", sizeof ("--dumb") - 1) == 0)
+ dumb = 1;
+#ifdef TODO
+ if (grub_memcmp (ptr, "--no-echo", sizeof ("--no-echo") - 1) == 0)
+ no_echo = 1;
+
+ if (grub_memcmp (ptr, "--no-edit", sizeof ("--no-edit") - 1) == 0)
+ no_edit = 1;
+#endif
+ if (grub_memcmp (ptr, "--lines=", sizeof ("--lines=") - 1) == 0)
+ {
+ lines = grub_strtoul (ptr + sizeof ("--lines=") - 1, 0, 0);
+ if (grub_errno)
+ {
+ lines = 24;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+
+ if (grub_memcmp (ptr, "console", sizeof ("console") - 1) == 0)
+ console = 1;
+
+ if (grub_memcmp (ptr, "serial", sizeof ("serial") - 1) == 0)
+ serial = 1;
+#ifdef TODO
+ if (grub_memcmp (ptr, "hercules", sizeof ("hercules") - 1) == 0)
+ hercules = 1;
+#endif
+ while (*ptr && !grub_isspace (*ptr))
+ ptr++;
+ while (*ptr && grub_isspace (*ptr))
+ ptr++;
+ }
+
+ if (!console && !serial)
+ return grub_strdup ("terminal_input; terminal_output; terminfo\n");
+
+ grub_strcpy (outbuf, "terminal_input ");
+ outptr = outbuf + grub_strlen (outbuf);
+ if (serial)
+ {
+ grub_strcpy (outptr, "serial ");
+ outptr += grub_strlen (outptr);
+ }
+ if (console)
+ {
+ grub_strcpy (outptr, "console ");
+ outptr += grub_strlen (outptr);
+ }
+ grub_strcpy (outptr, "; terminal_output ");
+ outptr += grub_strlen (outptr);
+ if (serial)
+ {
+ grub_strcpy (outptr, "serial ");
+ outptr += grub_strlen (outptr);
+ }
+ if (console)
+ {
+ grub_strcpy (outptr, "console ");
+ outptr += grub_strlen (outptr);
+ }
+ grub_strcpy (outptr, "; ");
+ outptr += grub_strlen (outptr);
+ if (serial)
+ {
+ grub_snprintf (outptr, outbuf + sizeof (outbuf) - outptr,
+ "terminfo serial -g 80x%d %s; ",
+ lines, dumb ? "dumb" : "vt100");
+ outptr += grub_strlen (outptr);
+ }
+
+ grub_strcpy (outptr, "\n");
+
+ return grub_strdup (outbuf);
+ }
+
+ grub_memset (args, 0, sizeof (args));
+
+ {
+ int hold_arg = 0;
+ const char *curarg = NULL;
+ for (i = 0; i < legacy_commands[cmdnum].argc; i++)
+ {
+ grub_size_t curarglen;
+ if (hold_arg)
+ {
+ ptr = curarg;
+ hold_arg = 0;
+ }
+ for (; grub_isspace (*ptr); ptr++);
+ curarg = ptr;
+ if (!*curarg)
+ break;
+ for (; *ptr && !grub_isspace (*ptr); ptr++);
+ if (i != legacy_commands[cmdnum].argc - 1
+ || (legacy_commands[cmdnum].flags & FLAG_IGNORE_REST))
+ curarglen = ptr - curarg;
+ else
+ {
+ curarglen = grub_strlen (curarg);
+ while (curarglen > 0 && grub_isspace (curarg[curarglen - 1]))
+ curarglen--;
+ }
+ if (*ptr)
+ ptr++;
+ switch (legacy_commands[cmdnum].argt[i])
+ {
+ case TYPE_FILE_NO_CONSUME:
+ hold_arg = 1;
+ case TYPE_PARTITION:
+ case TYPE_FILE:
+ args[i] = adjust_file (curarg, curarglen);
+ break;
+
+ case TYPE_REST_VERBATIM:
+ {
+ char *outptr, *outptr0;
+ int overhead = 3;
+ ptr = curarg;
+ while (*ptr)
+ {
+ for (; *ptr && grub_isspace (*ptr); ptr++);
+ for (; *ptr && !grub_isspace (*ptr); ptr++)
+ if (*ptr == '\'')
+ overhead += 3;
+ if (*ptr)
+ ptr++;
+ overhead += 3;
+ }
+
+ outptr0 = args[i] = grub_malloc (overhead + (ptr - curarg));
+ if (!outptr0)
+ return NULL;
+ ptr = curarg;
+ outptr = outptr0;
+ while (*ptr)
+ {
+ for (; *ptr && grub_isspace (*ptr); ptr++);
+ if (outptr != outptr0)
+ *outptr++ = ' ';
+ *outptr++ = '\'';
+ for (; *ptr && !grub_isspace (*ptr); ptr++)
+ {
+ if (*ptr == '\'')
+ {
+ *outptr++ = '\'';
+ *outptr++ = '\\';
+ *outptr++ = '\'';
+ *outptr++ = '\'';
+ }
+ else
+ *outptr++ = *ptr;
+ }
+ *outptr++ = '\'';
+ if (*ptr)
+ ptr++;
+ }
+ *outptr++ = 0;
+ }
+ break;
+
+ case TYPE_VERBATIM:
+ args[i] = grub_legacy_escape (curarg, curarglen);
+ break;
+ case TYPE_FORCE_OPTION:
+ case TYPE_NOAPM_OPTION:
+ case TYPE_TYPE_OR_NOMEM_OPTION:
+ case TYPE_OPTION:
+ if (is_option (legacy_commands[cmdnum].argt[i], curarg, curarglen))
+ {
+ args[i] = grub_strndup (curarg, curarglen);
+ break;
+ }
+ args[i] = grub_strdup ("");
+ hold_arg = 1;
+ break;
+ case TYPE_INT:
+ {
+ const char *brk;
+ int base = 10;
+ brk = curarg;
+ if (brk[0] == '0' && brk[1] == 'x')
+ {
+ base = 16;
+ brk += 2;
+ }
+ else if (brk[0] == '0')
+ base = 8;
+ for (; *brk && brk < curarg + curarglen; brk++)
+ {
+ if (base == 8 && (*brk == '8' || *brk == '9'))
+ break;
+ if (grub_isdigit (*brk))
+ continue;
+ if (base != 16)
+ break;
+ if (!(*brk >= 'a' && *brk <= 'f')
+ && !(*brk >= 'A' && *brk <= 'F'))
+ break;
+ }
+ if (brk == curarg)
+ args[i] = grub_strdup ("0");
+ else
+ args[i] = grub_strndup (curarg, brk - curarg);
+ }
+ break;
+ case TYPE_VBE_MODE:
+ {
+ unsigned mod;
+ struct grub_vesa_mode_table_entry *modedesc;
+
+ mod = grub_strtoul (curarg, 0, 0);
+ if (grub_errno)
+ {
+ mod = 0;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (mod < GRUB_VESA_MODE_TABLE_START
+ || mod > GRUB_VESA_MODE_TABLE_END)
+ {
+ args[i] = grub_strdup ("auto");
+ break;
+ }
+ modedesc = &grub_vesa_mode_table[mod - GRUB_VESA_MODE_TABLE_START];
+ if (!modedesc->width)
+ {
+ args[i] = grub_strdup ("auto");
+ break;
+ }
+ args[i] = grub_xasprintf ("%ux%ux%u",
+ modedesc->width, modedesc->height,
+ modedesc->depth);
+ break;
+ }
+ case TYPE_BOOL:
+ if (curarglen == 2 && curarg[0] == 'o' && curarg[1] == 'n')
+ args[i] = grub_strdup ("1");
+ else
+ args[i] = grub_strdup ("0");
+ break;
+ }
+ }
+ }
+
+ while (legacy_commands[cmdnum].argc > 0
+ && args[legacy_commands[cmdnum].argc - 1] == NULL
+ && (legacy_commands[cmdnum].flags & FLAG_FALLBACK_AVAILABLE)
+ && args[legacy_commands[cmdnum + 1].argc] == NULL)
+ cmdnum++;
+
+ for (; i < legacy_commands[cmdnum].argc; i++)
+ switch (legacy_commands[cmdnum].argt[i])
+ {
+ case TYPE_FILE_NO_CONSUME:
+ case TYPE_PARTITION:
+ case TYPE_FILE:
+ case TYPE_REST_VERBATIM:
+ case TYPE_VERBATIM:
+ case TYPE_FORCE_OPTION:
+ case TYPE_NOAPM_OPTION:
+ case TYPE_TYPE_OR_NOMEM_OPTION:
+ case TYPE_OPTION:
+ args[i] = grub_strdup ("");
+ break;
+ case TYPE_BOOL:
+ case TYPE_INT:
+ args[i] = grub_strdup ("0");
+ break;
+ case TYPE_VBE_MODE:
+ args[i] = grub_strdup ("auto");
+ break;
+ }
+
+ if (legacy_commands[cmdnum].flags & FLAG_COLOR_INVERT)
+ {
+ char *corig = args[legacy_commands[cmdnum].argc - 1];
+ char *slash = grub_strchr (corig, '/');
+ char *invert;
+ grub_size_t len;
+
+ len = grub_strlen (corig);
+ if (!slash)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "bad color specification %s",
+ args[0]);
+ return NULL;
+ }
+ invert = grub_malloc (len + 1);
+ if (!invert)
+ return NULL;
+ grub_memcpy (invert, slash + 1, len - (slash - corig) - 1);
+ invert[len - (slash - args[0]) - 1] = '/';
+ grub_memcpy (invert + len - (slash - corig), corig, slash - corig);
+ invert[len] = 0;
+ args[legacy_commands[cmdnum].argc] = invert;
+ }
+
+ if (legacy_commands[cmdnum].suffix)
+ {
+ *suffix = grub_xasprintf (legacy_commands[cmdnum].suffix,
+ args[legacy_commands[cmdnum].suffixarg]);
+ if (*suffix)
+ return NULL;
+ }
+
+ {
+ char *ret = grub_xasprintf (legacy_commands[cmdnum].map, args[0], args[1],
+ args[2], args[3]);
+ grub_free (args[0]);
+ grub_free (args[1]);
+ grub_free (args[2]);
+ grub_free (args[3]);
+ return ret;
+ }
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/ChangeLog b/grub-core/lib/libgcrypt-grub/cipher/ChangeLog
new file mode 100644
index 0000000..e7db175
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/ChangeLog
@@ -0,0 +1,4212 @@
+2011-05-14 Automatic import tool
+
+ Imported ciphers to GRUB
+
+ * ac.c: Removed
+ * arcfour.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (elftest): Removed declaration.
+ (selftest): Removed.
+ (GRUB_MOD_INIT(gcry_arcfour)): New function
+
+ Register cipher _gcry_cipher_spec_arcfour
+ (GRUB_MOD_FINI(gcry_arcfour)): New function
+
+ Unregister cipher _gcry_cipher_spec_arcfour
+ * blowfish.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (selftest): Removed.
+ (GRUB_MOD_INIT(gcry_blowfish)): New function
+
+ Register cipher _gcry_cipher_spec_blowfish
+ (GRUB_MOD_FINI(gcry_blowfish)): New function
+
+ Unregister cipher _gcry_cipher_spec_blowfish
+ * camellia.c: Removed including of string.h
+ Removed including of stdlib.h
+ * camellia.h: Removed including of config.h
+ * camellia-glue.c: Removed including of config.h
+ Removed including of config.h
+ (elftest): Removed declaration.
+ (selftest): Removed.
+ (GRUB_MOD_INIT(gcry_camellia)): New function
+
+ Register cipher _gcry_cipher_spec_camellia128
+ Register cipher _gcry_cipher_spec_camellia192
+ Register cipher _gcry_cipher_spec_camellia256
+ (GRUB_MOD_FINI(gcry_camellia)): New function
+
+ Unregister cipher _gcry_cipher_spec_camellia128
+ Unregister cipher _gcry_cipher_spec_camellia192
+ Unregister cipher _gcry_cipher_spec_camellia256
+ * cast5.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (selftest): Removed.
+ (GRUB_MOD_INIT(gcry_cast5)): New function
+
+ Register cipher _gcry_cipher_spec_cast5
+ (GRUB_MOD_FINI(gcry_cast5)): New function
+
+ Unregister cipher _gcry_cipher_spec_cast5
+ * cipher.c: Removed
+ * crc.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (GRUB_MOD_INIT(gcry_crc)): New function
+
+ Register digest _gcry_digest_spec_crc32
+ Register digest _gcry_digest_spec_crc32_rfc1510
+ Register digest _gcry_digest_spec_crc24_rfc2440
+ (GRUB_MOD_FINI(gcry_crc)): New function
+
+ Unregister MD _gcry_digest_spec_crc32
+ Unregister MD _gcry_digest_spec_crc32_rfc1510
+ Unregister MD _gcry_digest_spec_crc24_rfc2440
+ * des.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of string.h
+ (elftest): Removed declaration.
+ (weak_keys_chksum): Removed.
+ (tripledes_set2keys): Removed.
+ (selftest): Removed.
+ (do_tripledes_set_extra_info): Removed.
+ (selftest_fips): Removed.
+ (run_selftests): Removed.
+ (_gcry_cipher_extraspec_tripledes): Removed.
+ (GRUB_MOD_INIT(gcry_des)): New function
+
+ Register cipher _gcry_cipher_spec_des
+ Register cipher _gcry_cipher_spec_tripledes
+ (GRUB_MOD_FINI(gcry_des)): New function
+
+ Unregister cipher _gcry_cipher_spec_des
+ Unregister cipher _gcry_cipher_spec_tripledes
+ * dsa.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (selftest_sign_1024): Removed.
+ (selftests_dsa): Removed.
+ (run_selftests): Removed.
+ * ecc.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (selftests_ecdsa): Removed.
+ (run_selftests): Removed.
+ * elgamal.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ * hash-common.c: Removed
+ * hmac-tests.c: Removed
+ * md.c: Removed
+ * md4.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (GRUB_MOD_INIT(gcry_md4)): New function
+
+ Register digest _gcry_digest_spec_md4
+ (GRUB_MOD_FINI(gcry_md4)): New function
+
+ Unregister MD _gcry_digest_spec_md4
+ * md5.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (GRUB_MOD_INIT(gcry_md5)): New function
+
+ Register digest _gcry_digest_spec_md5
+ (GRUB_MOD_FINI(gcry_md5)): New function
+
+ Unregister MD _gcry_digest_spec_md5
+ * primegen.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ Removed including of errno.h
+ * pubkey.c: Removed
+ * rfc2268.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (elftest): Removed declaration.
+ (selftest): Removed.
+ (GRUB_MOD_INIT(gcry_rfc2268)): New function
+
+ Register cipher _gcry_cipher_spec_rfc2268_40
+ (GRUB_MOD_FINI(gcry_rfc2268)): New function
+
+ Unregister cipher _gcry_cipher_spec_rfc2268_40
+ * rijndael.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (elftest): Removed declaration.
+ (_gcry_aes_cfb_enc): Removed.
+ (_gcry_aes_cbc_enc): Removed.
+ (_gcry_aes_cfb_dec): Removed.
+ (_gcry_aes_cbc_dec): Removed.
+ (selftest_basic_128): Removed.
+ (selftest_basic_192): Removed.
+ (selftest_basic_256): Removed.
+ (selftest): Removed.
+ (selftest_fips_128_38a): Removed.
+ (selftest_fips_128): Removed.
+ (selftest_fips_192): Removed.
+ (selftest_fips_256): Removed.
+ (run_selftests): Removed.
+ (_gcry_cipher_extraspec_aes): Removed.
+ (_gcry_cipher_extraspec_aes192): Removed.
+ (_gcry_cipher_extraspec_aes256): Removed.
+ (GRUB_MOD_INIT(gcry_rijndael)): New function
+
+ Register cipher _gcry_cipher_spec_aes
+ Register cipher _gcry_cipher_spec_aes192
+ Register cipher _gcry_cipher_spec_aes256
+ (GRUB_MOD_FINI(gcry_rijndael)): New function
+
+ Unregister cipher _gcry_cipher_spec_aes
+ Unregister cipher _gcry_cipher_spec_aes192
+ Unregister cipher _gcry_cipher_spec_aes256
+ * rmd160.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (_gcry_rmd160_hash_buffer): Removed.
+ (GRUB_MOD_INIT(gcry_rmd160)): New function
+
+ Register digest _gcry_digest_spec_rmd160
+ (GRUB_MOD_FINI(gcry_rmd160)): New function
+
+ Unregister MD _gcry_digest_spec_rmd160
+ * rsa.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ Removed including of errno.h
+ (selftest_sign_1024): Removed.
+ (selftest_encr_1024): Removed.
+ (selftests_rsa): Removed.
+ (run_selftests): Removed.
+ * seed.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ (elftest): Removed declaration.
+ (selftest): Removed.
+ (GRUB_MOD_INIT(gcry_seed)): New function
+
+ Register cipher _gcry_cipher_spec_seed
+ (GRUB_MOD_FINI(gcry_seed)): New function
+
+ Unregister cipher _gcry_cipher_spec_seed
+ * serpent.c: Removed including of config.h
+ Removed including of string.h
+ Removed including of stdio.h
+ (GRUB_MOD_INIT(gcry_serpent)): New function
+
+ Register cipher _gcry_cipher_spec_serpent128
+ Register cipher _gcry_cipher_spec_serpent192
+ Register cipher _gcry_cipher_spec_serpent256
+ (GRUB_MOD_FINI(gcry_serpent)): New function
+
+ Unregister cipher _gcry_cipher_spec_serpent128
+ Unregister cipher _gcry_cipher_spec_serpent192
+ Unregister cipher _gcry_cipher_spec_serpent256
+ * sha1.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (_gcry_sha1_hash_buffer): Removed.
+ (selftests_sha1): Removed.
+ (run_selftests): Removed.
+ (_gcry_digest_extraspec_sha1): Removed.
+ (GRUB_MOD_INIT(gcry_sha1)): New function
+
+ Register digest _gcry_digest_spec_sha1
+ (GRUB_MOD_FINI(gcry_sha1)): New function
+
+ Unregister MD _gcry_digest_spec_sha1
+ * sha256.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (selftests_sha224): Removed.
+ (selftests_sha256): Removed.
+ (run_selftests): Removed.
+ (_gcry_digest_extraspec_sha224): Removed.
+ (_gcry_digest_extraspec_sha256): Removed.
+ (GRUB_MOD_INIT(gcry_sha256)): New function
+
+ Register digest _gcry_digest_spec_sha224
+ Register digest _gcry_digest_spec_sha256
+ (GRUB_MOD_FINI(gcry_sha256)): New function
+
+ Unregister MD _gcry_digest_spec_sha224
+ Unregister MD _gcry_digest_spec_sha256
+ * sha512.c: Removed including of config.h
+ Removed including of string.h
+ (selftests_sha384): Removed.
+ (selftests_sha512): Removed.
+ (run_selftests): Removed.
+ (_gcry_digest_extraspec_sha512): Removed.
+ (_gcry_digest_extraspec_sha384): Removed.
+ (GRUB_MOD_INIT(gcry_sha512)): New function
+
+ Register digest _gcry_digest_spec_sha512
+ Register digest _gcry_digest_spec_sha384
+ (GRUB_MOD_FINI(gcry_sha512)): New function
+
+ Unregister MD _gcry_digest_spec_sha512
+ Unregister MD _gcry_digest_spec_sha384
+ * tiger.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (GRUB_MOD_INIT(gcry_tiger)): New function
+
+ Register digest _gcry_digest_spec_tiger
+ (GRUB_MOD_FINI(gcry_tiger)): New function
+
+ Unregister MD _gcry_digest_spec_tiger
+ * twofish.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (elftest): Removed declaration.
+ (selftest): Removed.
+ Removed including of stdio.h
+ Removed including of string.h
+ Removed including of time.h
+ (GRUB_MOD_INIT(gcry_twofish)): New function
+
+ Register cipher _gcry_cipher_spec_twofish
+ Register cipher _gcry_cipher_spec_twofish128
+ (GRUB_MOD_FINI(gcry_twofish)): New function
+
+ Unregister cipher _gcry_cipher_spec_twofish
+ Unregister cipher _gcry_cipher_spec_twofish128
+ * whirlpool.c: Removed including of config.h
+ Removed including of stdio.h
+ Removed including of stdlib.h
+ Removed including of string.h
+ (GRUB_MOD_INIT(gcry_whirlpool)): New function
+
+ Register digest _gcry_digest_spec_whirlpool
+ (GRUB_MOD_FINI(gcry_whirlpool)): New function
+
+ Unregister MD _gcry_digest_spec_whirlpool
+ * crypto.lst: New file.
+ * types.h: New file.
+ * memory.h: New file.
+ * cipher.h: Likewise.
+ * g10lib.h: Likewise.
+
+2009-01-22 Werner Koch <wk@g10code.com>
+
+ * ecc.c (compute_keygrip): Remove superfluous const.
+
+2009-01-06 Werner Koch <wk@g10code.com>
+
+ * rmd160.c (oid_spec_rmd160): Add TeleTrust identifier.
+
+2008-12-10 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate): Add arg DOMAIN and use it if specified.
+ (generate_fips186): Ditto.
+ (dsa_generate_ext): Parse and check the optional "domain"
+ parameter and pass them to the generate functions.
+
+ * rijndael.c (rijndael_names): Add "AES128" and "AES-128".
+ (rijndael192_names): Add "AES-192".
+ (rijndael256_names): Add "AES-256".
+
+2008-12-05 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate): Add arg TRANSIENT_KEY and use it to detrmine
+ the RNG quality needed.
+ (dsa_generate_ext): Parse the transient-key flag und pass it to
+ generate.
+
+2008-11-28 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate_fips186): Add arg DERIVEPARMS and use the seed
+ value if available.
+
+ * primegen.c (_gcry_generate_fips186_2_prime): Fix inner p loop.
+
+2008-11-26 Werner Koch <wk@g10code.com>
+
+ * primegen.c (_gcry_generate_fips186_3_prime): New.
+ * dsa.c (generate_fips186): Add arg USE_FIPS186_2.
+ (dsa_generate_ext): Parse new flag use-fips183-2.
+
+2008-11-25 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate_fips186): New.
+ (dsa_generate_ext): Use new function if derive-parms are given or
+ if in FIPS mode.
+ * primegen.c (_gcry_generate_fips186_2_prime): New.
+
+2008-11-24 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Insert code to output extrainfo.
+ (pubkey_generate): Add arg R_EXTRAINFO and pass it to the extended
+ key generation function.
+ * rsa.c (gen_x931_parm_xp, gen_x931_parm_xi): New.
+ (generate_x931): Generate params if not given.
+ (rsa_generate_ext): Parse use-x931 flag. Return p-q-swapped
+ indicator.
+ * dsa.c (dsa_generate_ext): Put RETFACTORS into R_EXTRAINFO if
+ possible.
+
+ * pubkey.c (gcry_pk_genkey): Remove parsing of almost all
+ parameters and pass the parameter S-expression to pubkey_generate.
+ (pubkey_generate): Simplify by requitring modules to parse the
+ parameters. Remove the special cases for Elgamal and ECC.
+ (sexp_elements_extract_ecc): Add arg EXTRASPEC and use it. Fix
+ small memory leak.
+ (sexp_to_key): Pass EXTRASPEC to sexp_elements_extract_ecc.
+ (pubkey_table) [USE_ELGAMAL]: Add real extraspec.
+ * rsa.c (rsa_generate_ext): Adjust for new calling convention.
+ * dsa.c (dsa_generate_ext): Ditto.
+ * elgamal.c (_gcry_elg_generate): Ditto. Rename to elg_generate_ext.
+ (elg_generate): New.
+ (_gcry_elg_generate_using_x): Remove after merging code with
+ elg_generate_ext.
+ (_gcry_pubkey_extraspec_elg): New.
+ (_gcry_elg_check_secret_key, _gcry_elg_encrypt, _gcry_elg_sign)
+ (_gcry_elg_verify, _gcry_elg_get_nbits): Make static and remove
+ _gcry_ prefix.
+ * ecc.c (_gcry_ecc_generate): Rename to ecc_generate_ext and
+ adjust for new calling convention.
+ (_gcry_ecc_get_param): Rename to ecc_get_param and make static.
+ (_gcry_pubkey_extraspec_ecdsa): Add ecc_generate_ext and
+ ecc_get_param.
+
+2008-11-20 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (pubkey_generate): Add arg DERIVEPARMS.
+ (gcry_pk_genkey): Parse derive-parms and pass it to above.
+ * rsa.c (generate_x931): New.
+ (rsa_generate_ext): Add arg DERIVEPARMS and call new function in
+ fips mode or if DERIVEPARMS is given.
+ * primegen.c (_gcry_derive_x931_prime, find_x931_prime): New.
+
+2008-11-19 Werner Koch <wk@g10code.com>
+
+ * rsa.c (rsa_decrypt): Use gcry_create_nonce for blinding.
+ (generate): Rename to generate_std.
+
+2008-11-05 Werner Koch <wk@g10code.com>
+
+ * md.c (md_open): Use a switch to set the Bsize.
+ (prepare_macpads): Fix long key case for SHA384 and SHA512.
+
+ * cipher.c (gcry_cipher_handle): Add field EXTRASPEC.
+ (gcry_cipher_open): Set it.
+ (gcry_cipher_ctl): Add private control code to disable weak key
+ detection and to return the current input block.
+ * des.c (_tripledes_ctx): Add field FLAGS.
+ (do_tripledes_set_extra_info): New.
+ (_gcry_cipher_extraspec_tripledes): Add new function.
+ (do_tripledes_setkey): Disable weak key detection.
+
+2008-10-24 Werner Koch <wk@g10code.com>
+
+ * md.c (digest_table): Allow MD5 in fips mode.
+ (md_register_default): Take special action for MD5.
+ (md_enable, gcry_md_hash_buffer): Ditto.
+
+2008-09-30 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (do_setkey): Properly align "t" and "tk".
+ (prepare_decryption): Properly align "w". Fixes bug #936.
+
+2008-09-18 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Parse domain parameter.
+ (pubkey_generate): Add new arg DOMAIN and remove special case for
+ DSA with qbits.
+ * rsa.c (rsa_generate): Add dummy args QBITS, NAME and DOMAIN and
+ rename to rsa_generate_ext. Change caller.
+ (_gcry_rsa_generate, _gcry_rsa_check_secret_key)
+ (_gcry_rsa_encrypt, _gcry_rsa_decrypt, _gcry_rsa_sign)
+ (_gcry_rsa_verify, _gcry_rsa_get_nbits): Make static and remove
+ _gcry_ prefix.
+ (_gcry_pubkey_spec_rsa, _gcry_pubkey_extraspec_rsa): Adjust names.
+ * dsa.c (dsa_generate_ext): New.
+ (_gcry_dsa_generate): Replace code by a call to dsa_generate.
+ (_gcry_dsa_check_secret_key, _gcry_dsa_sign, _gcry_dsa_verify)
+ (_gcry_dsa_get_nbits): Make static and remove _gcry prefix.
+ (_gcry_dsa_generate2): Remove.
+ (_gcry_pubkey_spec_dsa): Adjust to name changes.
+ (_gcry_pubkey_extraspec_rsa): Add dsa_generate_ext.
+
+2008-09-16 Werner Koch <wk@g10code.com>
+
+ * ecc.c (run_selftests): Add arg EXTENDED.
+
+2008-09-12 Werner Koch <wk@g10code.com>
+
+ * rsa.c (test_keys): Do a bad case signature check.
+ * dsa.c (test_keys): Do a bad case check.
+
+ * cipher.c (_gcry_cipher_selftest): Add arg EXTENDED and pass it
+ to the called tests.
+ * md.c (_gcry_md_selftest): Ditto.
+ * pubkey.c (_gcry_pk_selftest): Ditto.
+ * rijndael.c (run_selftests): Add arg EXTENDED and pass it to the
+ called tests.
+ (selftest_fips_128): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftest_fips_192): Add dummy arg EXTENDED.
+ (selftest_fips_256): Ditto.
+ * hmac-tests.c (_gcry_hmac_selftest): Ditto.
+ (run_selftests): Ditto.
+ (selftests_sha1): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftests_sha224, selftests_sha256): Ditto.
+ (selftests_sha384, selftests_sha512): Ditto.
+ * sha1.c (run_selftests): Add arg EXTENDED and pass it to the
+ called test.
+ (selftests_sha1): Add arg EXTENDED and run only one test
+ non-extended mode.
+ * sha256.c (run_selftests): Add arg EXTENDED and pass it to the
+ called tests.
+ (selftests_sha224): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftests_sha256): Ditto.
+ * sha512.c (run_selftests): Add arg EXTENDED and pass it to the
+ called tests.
+ (selftests_sha384): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftests_sha512): Ditto.
+ * des.c (run_selftests): Add arg EXTENDED and pass it to the
+ called test.
+ (selftest_fips): Add dummy arg EXTENDED.
+ * rsa.c (run_selftests): Add dummy arg EXTENDED.
+
+ * dsa.c (run_selftests): Add dummy arg EXTENDED.
+
+ * rsa.c (extract_a_from_sexp): New.
+ (selftest_encr_1024): Check that the ciphertext does not match the
+ plaintext.
+ (test_keys): Improve tests and return an error status.
+ (generate): Return an error if test_keys fails.
+ * dsa.c (test_keys): Add comments and return an error status.
+ (generate): Return an error if test_keys failed.
+
+2008-09-11 Werner Koch <wk@g10code.com>
+
+ * rsa.c (_gcry_rsa_decrypt): Return an error instead of calling
+ BUG in case of a practically impossible condition.
+ (sample_secret_key, sample_public_key): New.
+ (selftest_sign_1024, selftest_encr_1024): New.
+ (selftests_rsa): Implement tests.
+ * dsa.c (sample_secret_key, sample_public_key): New.
+ (selftest_sign_1024): New.
+ (selftests_dsa): Implement tests.
+
+2008-09-09 Werner Koch <wk@g10code.com>
+
+ * hmac-tests.c (selftests_sha1): Add tests.
+ (selftests_sha224, selftests_sha384, selftests_sha512): Make up tests.
+
+ * hash-common.c, hash-common.h: New.
+ * sha1.c (selftests_sha1): Add 3 tests.
+ * sha256.c (selftests_sha256, selftests_sha224): Ditto.
+ * sha512.c (selftests_sha512, selftests_sha384): Ditto.
+
+2008-08-29 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_get_keygrip): Remove the special case for RSA
+ and check whether a custom computation function has been setup.
+ * rsa.c (compute_keygrip): New.
+ (_gcry_pubkey_extraspec_rsa): Setup this function.
+ * ecc.c (compute_keygrip): New.
+ (_gcry_pubkey_extraspec_ecdsa): Setup this function.
+
+2008-08-28 Werner Koch <wk@g10code.com>
+
+ * cipher.c (cipher_decrypt, cipher_encrypt): Return an error if
+ mode NONE is used.
+ (gcry_cipher_open): Allow mode NONE only with a debug flag set and
+ if not in FIPS mode.
+
+2008-08-26 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (pubkey_generate): Add arg KEYGEN_FLAGS.
+ (gcry_pk_genkey): Implement new parameter "transient-key" and
+ pass it as flags to pubkey_generate.
+ (pubkey_generate): Make use of an ext_generate function.
+ * rsa.c (generate): Add new arg transient_key and pass appropriate
+ args to the prime generator.
+ (_gcry_rsa_generate): Factor all code out to ...
+ (rsa_generate): .. new func with extra arg KEYGEN_FLAGS.
+ (_gcry_pubkey_extraspec_ecdsa): Setup rsa_generate.
+ * primegen.c (_gcry_generate_secret_prime)
+ (_gcry_generate_public_prime): Add new arg RANDOM_LEVEL.
+
+2008-08-21 Werner Koch <wk@g10code.com>
+
+ * primegen.c (_gcry_generate_secret_prime)
+ (_gcry_generate_public_prime): Use a constant macro for the random
+ level.
+
+2008-08-19 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_elements_extract_ecc) [!USE_ECC]: Do not allow
+ allow "curve" parameter.
+
+2008-08-15 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (_gcry_pk_selftest): New.
+ * dsa.c (selftests_dsa, run_selftests): New.
+ * rsa.c (selftests_rsa, run_selftests): New.
+ * ecc.c (selftests_ecdsa, run_selftests): New.
+
+ * md.c (_gcry_md_selftest): New.
+ * sha1.c (run_selftests, selftests_sha1): New.
+ * sha256.c (selftests_sha224, selftests_sha256, run_selftests): New.
+ * sha512.c (selftests_sha384, selftests_sha512, run_selftests): New.
+
+ * des.c (selftest): Remove static variable form selftest.
+ (des_setkey): No on-the-fly self test in fips mode.
+ (tripledes_set3keys): Ditto.
+
+ * cipher.c (_gcry_cipher_setkey, _gcry_cipher_setiv):
+
+ * dsa.c (generate): Bail out in fips mode if NBITS is less than 1024.
+ * rsa.c (generate): Return an error code if the the requested size
+ is less than 1024 and we are in fpis mode.
+ (_gcry_rsa_generate): Take care of that error code.
+
+ * ecc.c (generate_curve): In fips mode enable only NIST curves.
+
+ * cipher.c (_gcry_cipher_selftest): New.
+
+ * sha512.c (_gcry_digest_extraspec_sha384)
+ (_gcry_digest_extraspec_sha512): New.
+ * sha256.c (_gcry_digest_extraspec_sha224)
+ (_gcry_digest_extraspec_sha256): New.
+ * sha1.c (_gcry_digest_extraspec_sha1): New.
+ * ecc.c (_gcry_pubkey_extraspec_ecdsa): New.
+ * dsa.c (_gcry_pubkey_extraspec_dsa): New.
+ * rsa.c (_gcry_pubkey_extraspec_rsa): New.
+ * rijndael.c (_gcry_cipher_extraspec_aes)
+ (_gcry_cipher_extraspec_aes192, _gcry_cipher_extraspec_aes256): New.
+ * des.c (_gcry_cipher_extraspec_tripledes): New.
+
+ * cipher.c (gcry_cipher_register): Rename to _gcry_cipher_register.
+ Add arg EXTRASPEC.
+ (dummy_extra_spec): New.
+ (cipher_table_entry): Add extraspec field.
+ * md.c (_gcry_md_register): Rename to _gcry_md_register. Add
+ arg EXTRASPEC.
+ (dummy_extra_spec): New.
+ (digest_table_entry): Add extraspec field.
+ * pubkey.c (gcry_pk_register): Rename to _gcry_pk_register. Add
+ arg EXTRASPEC.
+ (dummy_extra_spec): New.
+ (pubkey_table_entry): Add extraspec field.
+
+ * ac.c: Let most public functions return GPG_ERR_UNSUPPORTED in
+ fips mode.
+
+ * pubkey.c (pubkey_table_entry): Add field FIPS_ALLOWED and mark
+ appropriate algorithms.
+ (dummy_generate, dummy_check_secret_key, dummy_encrypt)
+ (dummy_decrypt, dummy_sign, dummy_verify, dummy_get_nbits): Signal
+ a fips error when used.
+ (gcry_pk_register): In fips mode do not allow to register new
+ algorithms.
+
+ * md.c (digest_table): Add field FIPS_ALLOWED and mark appropriate
+ algorithms.
+ (md_register_default): In fips mode register only fips algorithms.
+ (gcry_md_register): In fips mode do not allow to register new
+ algorithms.
+ (gcry_md_get): Signal a fips error if called.
+ (gcry_md_hash_buffer): Do not allow rmd160 when not in fips mode.
+ (md_start_debug): Disable in fips_mode.
+
+ * md.c (gcry_md_register_default): Rename to ..
+ (md_register_default): .. this.
+ (md_digest): Remove this commented fucntion.
+ * pubkey.c (gcry_pk_register_default): Rename to ..
+ (pk_register_default): .. this.
+
+ * cipher.c (cipher_table_entry): Add field FIPS_ALLOWED.
+ (gcry_cipher_register_default): Register only fips approved
+ algorithms.
+ (gcry_cipher_register): Do not allow to register new ciphers.
+ (cipher_setiv): Signal fips error.
+
+ * cipher (gcry_cipher_register_default): Rename to ..
+ (cipher_register_default): .. this.
+ (REGISTER_DEFAULT_CIPHERS): Adjust for that change.
+
+2008-07-05 Werner Koch <wk@g10code.com>
+
+ * random-daemon.c, random.h, rndhw.c, rndunix.c, rand-internal.h
+ * random.c, rndegd.c, rndlinux.c, rndw32.c: Move to ../cipher.
+ * Makefile.am: Remove random stuff.
+
+2008-06-24 Szakats Istvan <szaki.ms@gmail.com> (wk)
+
+ * ac.c (_gcry_ac_key_destroy, _gcry_ac_key_pair_generate): Relase
+ some more memory.
+
+2008-04-22 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (_gcry_aes_cfb_enc, _gcry_aes_cbc_enc)
+ (_gcry_aes_cfb_dec, _gcry_aes_cbc_dec): Use Padlock if possible.
+
+2008-04-18 Werner Koch <wk@g10code.com>
+
+ * sha1.c (transform_aligned): Remove. That is will obviosuly not
+ work because we need a scratch working area and our internal API
+ does not allow to modify the buffers.
+
+ * rijndael.c: Factor tables out to ..
+ * rijndael-tables.h: .. new.
+
+ * ac.c (ac_data_extract): Make static.
+
+ * camellia.h [HAVE_CONFIG_H]: Include config.h.
+
+ * rndw32.c (registry_poll): Only print the performance data
+ problem warning once. Suggested by Simon Josefsson.
+
+2008-03-19 Werner Koch <wk@g10code.com>
+
+ * cipher.c (gcry_cipher_open) [USE_AES]: Init bulk encryption only
+ if requested. Suggested by Dirk Stoecker.
+
+2008-03-18 Werner Koch <wk@g10code.com>
+
+ * sha1.c: Include stdint.h.
+ (transform): Add arg NBLOCKS so that we can work on more than one
+ block and avoid updates of the chaining variables. Changed all
+ callers to use 1.
+ (sha1_write): Replace loop around transform.
+ (transform_aligned) [WORDS_BIGENDIAN]: New.
+ (TRANSFORM): New macro to replace all direct calls of transform.
+
+2008-03-17 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (_gcry_aes_cfb_dec): New.
+ (do_encrypt): Factor code out to ..
+ (do_encrypt_aligned): .. New.
+ (_gcry_aes_cfb_enc, _gcry_aes_cfb_dec): Use new function.
+ (do_decrypt): Factor code out to ..
+ (do_decrypt_aligned): .. new.
+ (_gcry_aes_cbc_enc, _gcry_aes_cbc_dec): New.
+ * cipher.c (struct gcry_cipher_handle): Put field IV into new
+ union U_IV to enforce proper alignment. Change all users.
+ (do_cfb_decrypt): Optimize.
+ (do_cbc_encrypt, do_cbc_decrypt): Optimize.
+
+2008-03-15 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (_gcry_aes_cfb_enc): New.
+ * cipher.c (struct gcry_cipher_handle): Add field ALGO and BULK.
+ (gcry_cipher_open): Set ALGO and BULK.
+ (do_cfb_encrypt): Optimize.
+
+2008-02-18 Werner Koch <wk@g10code.com>
+
+ * rsa.c (_gcry_rsa_verify) [IS_DEVELOPMENT_VERSION]: Print
+ intermediate results.
+
+2008-01-08 Werner Koch <wk@g10code.com>
+
+ * random.c (add_randomness): Do not just increment
+ POOL_FILLED_COUNTER but update it by the actual amount of data.
+
+2007-12-13 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_data_to_mpi): Support SHA-224.
+
+2007-12-05 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (USE_PADLOCK): Depend on ENABLE_PADLOCK_SUPPORT.
+ * rndhw.c (USE_PADLOCK): Ditto
+
+ * rsa.c (secret): Fixed condition test for using CRT. Reported by
+ Dean Scarff. Fixes bug#864.
+ (_gcry_rsa_check_secret_key): Return an erro if the optional
+ parameters are missing.
+ * pubkey.c (sexp_elements_extract): Add arg ALGO_NAME. Changed all
+ callers to pass NULL. Add hack to allow for optional RSA
+ parameters.
+ (sexp_to_key): Pass algo name to sexp_elements_extract.
+
+2007-12-03 Werner Koch <wk@g10code.com>
+
+ * random.c (gcry_random_add_bytes): Implement it.
+ * rand-internal.h (RANDOM_ORIGIN_EXTERNAL): New.
+
+2007-11-30 Werner Koch <wk@g10code.com>
+
+ * rndhw.c: New.
+ * rndlinux.c (_gcry_rndlinux_gather_random): Try to read 50%
+ directly from the hwrng.
+ * random.c (do_fast_random_poll): Also run the hw rng fast poll.
+ (_gcry_random_dump_stats): Tell whether the hw rng failed.
+
+2007-11-29 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (USE_PADLOCK): Define new macro used for ia32.
+ (RIJNDAEL_context) [USE_PADLOCK]: Add fields USE_PADLOCK and
+ PADLOCK_KEY.
+ (do_setkey) [USE_PADLOCK]: Enable padlock if available for 128 bit
+ AES.
+ (do_padlock) [USE_PADLOCK]: New.
+ (rijndael_encrypt, rijndael_decrypt) [USE_PADLOCK]: Divert to
+ do_padlock.
+ * cipher.c (cipher_context_alignment_t): New. Use it in this
+ module in place of PROPERLY_ALIGNED_TYPE.
+ (NEED_16BYTE_ALIGNED_CONTEXT): Define macro for ia32.
+ (struct gcry_cipher_handle): Add field HANDLE_OFFSET.
+ (gcry_cipher_open): Take care of increased alignment requirements.
+ (gcry_cipher_close): Ditto.
+
+2007-11-28 Werner Koch <wk@g10code.com>
+
+ * sha256.c (asn224): Fixed wrong template. It happened due to a
+ bug in RFC4880. SHA-224 is not in the stable version of libgcrypt
+ so the consequences are limited to users of this devel version.
+
+2007-10-31 Werner Koch <wk@g10code.com>
+
+ * ac.c (gcry_ac_data_new): Remove due to the visibility wrapper.
+ (gcry_ac_data_destroy, gcry_ac_data_copy, gcry_ac_data_length)
+ (gcry_ac_data_set, gcry_ac_data_get_name, gcry_ac_data_get_index)
+ (gcry_ac_data_to_sexp, gcry_ac_data_from_sexp)
+ (gcry_ac_data_clear, gcry_ac_io_init, gcry_ac_open)
+ (gcry_ac_close, gcry_ac_key_init, gcry_ac_key_pair_generate)
+ (gcry_ac_key_pair_extract, gcry_ac_key_destroy)
+ (gcry_ac_key_pair_destroy, gcry_ac_key_data_get)
+ (gcry_ac_key_test, gcry_ac_key_get_nbits, gcry_ac_key_get_grip)
+ (gcry_ac_data_encrypt, gcry_ac_data_decrypt, gcry_ac_data_sign)
+ (gcry_ac_data_verify, gcry_ac_data_encode, gcry_ac_data_decode)
+ (gcry_ac_mpi_to_os, gcry_ac_mpi_to_os_alloc, gcry_ac_os_to_mpi)
+ (gcry_ac_data_encrypt_scheme, gcry_ac_data_decrypt_scheme)
+ (gcry_ac_data_sign_scheme, gcry_ac_data_verify_scheme)
+ (gcry_ac_io_init_va): Ditto.
+ (gcry_ac_id_to_name, gcry_ac_name_to_id): Remove as these
+ deprecated functions are now implemented by visibility.c.
+
+2007-10-26 Werner Koch <wk@g10code.com>
+
+ * rndw32.c: Disable debug flag.
+
+2007-10-25 Werner Koch <wk@g10code.com>
+
+ * rndw32.c: Updated from current cryptlib snapshot and modified
+ for our use. Removed support from pre NT systems.
+ (slow_gatherer_windows95): Remove.
+ (_gcry_rndw32_gather_random): Require an NT platform.
+ (init_system_rng, read_system_rng, read_mbm_data): New.
+ (slow_gatherer_windowsNT): Rename to ...
+ (slow_gatherer): .. this. Read system RNG and MBM.
+ (registry_poll): New with code factored out from slow_gatherer.
+
+2007-08-23 Werner Koch <wk@g10code.com>
+
+ * random.c (pool_filled_counter): New.
+ (add_randomness): Use it.
+
+2007-08-22 Werner Koch <wk@g10code.com>
+
+ * rndw32.c, rndunix.c: Switched to LGPL.
+
+2007-05-30 Werner Koch <wk@g10code.com>
+
+ * camellia.h, camellia.c: Replace by new LGPL version and adjusted
+ camellia.h.
+
+2007-05-09 Marcus Brinkmann <marcus@g10code.de>
+
+ * ac.c (_gcry_ac_io_init_va, _gcry_ac_io_write, _gcry_ac_io_read):
+ Adjust users of gcry_ac_io_t because union is not anonymous
+ anymore.
+
+2007-05-02 Werner Koch <wk@g10code.com>
+
+ * camellia-glue.c (camellia_setkey, camellia_encrypt)
+ (camellia_decrypt): Recalculated used stack size in called
+ functions.
+ * camellia.h: Redefine external symbols.
+
+2007-05-02 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am, cipher.c: Add Camellia.
+
+ * camellia-glue.c: New. The necessary glue to interface libgcrypt
+ to the stock NTT Camellia distribution.
+
+ * camellia.h, camellia.c: The stock NTT Camellia distribution
+ (GPL).
+
+2007-04-30 David Shaw <dshaw@jabberwocky.com>
+
+ * cipher.c: Use #if instead of #ifdef as configure defines the
+ USE_cipher defines as 0 for disabled.
+
+2007-04-30 Werner Koch <wk@g10code.com>
+
+ * rndegd.c (_gcry_rndegd_set_socket_name): New.
+
+2007-04-30 Marcus Brinkmann <marcus@g10code.de>
+
+ * ecc.c (ec2os): Fix relocation of short numbers.
+
+ * ecc.c (generate_key): Do not allocate D, which will be allocated
+ by GEN_K. Remove G. Fix test if g_x, g_y resp. q_x, q_y are
+ requested.
+ (_gcry_ecc_generate): Release unneeded members of SK.
+ * pubkey.c (sexp_to_key): Release NAME.
+
+2007-04-28 Marcus Brinkmann <marcus@g10code.de>
+
+ * ac.c (gcry_ac_mpi): Remove member NAME_PROVIDED.
+ (ac_data_mpi_copy, _gcry_ac_data_set, _gcry_ac_data_get_name)
+ (_gcry_ac_data_get_index, ac_data_construct): Adjust handling of
+ NAME accordingly.
+
+2007-04-20 Werner Koch <wk@g10code.com>
+
+ * ecc.c (domain_parms): Add standard brainpool curves.
+
+2007-04-18 Werner Koch <wk@g10code.com>
+
+ * ecc.c (generate_curve): Implement alias mechanism.
+
+ * pubkey.c (sexp_elements_extract_ecc): New.
+ (sexp_to_key): Add special case for ecc.
+ (sexp_to_key, sexp_to_sig, sexp_to_enc, gcry_pk_genkey): Replace
+ name_terminated stuff by a call to _gcry_sexp_nth_string.
+ (gcry_pk_get_keygrip): Ditto.
+
+2007-04-16 Werner Koch <wk@g10code.com>
+
+ * ecc.c (_gcry_ecc_generate): Renamed DUMMY to CURVE and use it.
+
+2007-04-13 Marcus Brinkmann <marcus@g10code.de>
+
+ * ac.c (ac_data_construct): Cast const away to suppress compiler
+ warning.
+
+ * ecc.c (ecc_generate): Avoid compiler warning for unused argument
+ DUMMY.
+ (ecc_verify): Avoid compiler warning for unused arguments CMP and
+ OPAQUEV.
+
+2007-04-06 Werner Koch <wk@g10code.com>
+
+ * sha1.c (oid_spec_sha1): Add another oid from X9.62.
+
+2007-03-28 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Do not issue misc-key-info if it is
+ empty.
+ (gcry_pk_genkey): New parameter "curve".
+
+ * ecc.c: Entirely rewritten with only a few traces of the old
+ code left.
+ (_gcry_ecc_generate): New.
+ (generate_key) New arg NAME.
+ (generate_curve): Ditto. Return actual number of NBITS.
+
+2007-03-26 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Increase size of SKEY array and add a
+ runtime bounds check.
+
+2007-03-23 Werner Koch <wk@g10code.com>
+
+ * ecc.c (ecc_ctx_init, ecc_ctx_free, ecc_mod, ecc_mulm): New.
+ (duplicate_point, sum_points, escalar_mult): Don't use a
+ copy of base->p. Replaced all mpi_mulm by ecc_mulm so that we can
+ experiment with different algorithms.
+ (generate_key, check_secret_key, sign, verify): Initialize a
+ computation context for use by ecc_mulm.
+
+2007-03-22 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (pubkey_table): Initialize ECC.
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Add ecc.c.
+ * ecc.c: New. Heavily reformatted and changed for use in libgcrypt.
+ (point_init): New.
+ (escalar_mult): Make arg R the first arg to be similar to the mpi
+ functions.
+ (duplicate_point): Ditto
+ (sum_points): Ditto
+ (sign, verify): Remove unneeded copy operations.
+ (sum_points): Removed memory leaks and optimized some compares.
+ (verify): Simplified input check.
+
+2007-03-14 Werner Koch <wk@g10code.com>
+
+ * random.c (MASK_LEVEL): Removed macro as it was used only at one
+ place. Open coded it there.
+ (gcry_randomize, _gcry_update_random_seed_file)
+ (_gcry_fast_random_poll): Factor lock code out to ..
+ (lock_pool, unlock_pool): .. new.
+ (initialize): Look the pool while allocating.
+ (read_random_source, do_fast_random_poll): Moved intialization to ...
+ (initialize): .. here.
+ (_gcry_enable_quick_random_gen): No more need for initialization.
+ (is_initialized): Moved this global flag to ..
+ (initialize): .. here and changed all users to unconditionally call
+ initialize.
+ (add_randomness): Remove initalization here. It simply can't
+ happen.
+
+ * random.c (enum random_origins): Moved to ..
+ * rand-internal.h: .. here.
+ * rndunix.c (_gcry_rndunix_gather_random): Use enum in prototype
+ for ORIGIN and renamed REQUESTOR to ORIGIN.
+ * rndegd.c (_gcry_rndegd_gather_random): Ditto.
+ * rndlinux.c (_gcry_rndlinux_gather_random): Ditto.
+ * rndw32.c (_gcry_rndw32_gather_random): Ditto.
+ (_gcry_rndw32_gather_random_fast): Ditto.
+
+2007-03-13 Werner Koch <wk@g10code.com>
+
+ * random.c (enum random_origins): New.
+ (add_randomness): Renamed arg SOURCE to ORIGIN.
+ (read_random_source): Renamed arg REQUESTOR to ORIGIN.
+ (getfnc_gather_random): Removed static variable because this
+ function is only called one and thus we don't need this
+ optimization.
+ (_gcry_quick_random_gen): Removed and replaced by..
+ (_gcry_enable_quick_random_gen): .. this. It is onlyu used to
+ enable it and it does not make sense to disable it later. Changed
+ the only one caller too.
+ (get_random_bytes): Removed.
+ (gcry_random_bytes, gcry_random_bytes_secure): Implement in terms
+ of gcry_randomize.
+ * random-daemon.c (_gcry_daemon_get_random_bytes): Removed.
+
+2007-02-23 Werner Koch <wk@g10code.com>
+
+ * elgamal.c (generate): Removed unused variable TEMP.
+ (test_keys): New arg NODIE.
+ (generate_using_x, _gcry_elg_generate_using_x): New.
+ * pubkey.c (pubkey_generate): New arg XVALUE and direct call to
+ the new elgamal generate fucntion.
+ (gcry_pk_genkey): Parse the new "xvalue" tag.
+
+2007-02-22 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_data_to_mpi): Handle dynamically allocated
+ algorithms. Suggested by Neil Dunbar. Fixes bug#596.
+
+ * rndw32.c (_gcry_rndw32_gather_random_fast): Make it return void.
+
+ * cipher.c (gcry_cipher_algo_name): Simplified.
+
+ * random.c: Use the daemon only if compiled with USE_RANDOM_DAEMON.
+
+ * Makefile.am (libcipher_la_SOURCES): Build random-daemon support
+ only if requested.
+
+2007-02-21 Werner Koch <wk@g10code.com>
+
+ * random.c (rndpool, keypool): Make unsigned.
+ (mix_pool): Change char* variables to unsigned char*.
+ (gcry_randomize): Make arg BUFFER a void*.
+ (gcry_create_nonce): Ditto.
+
+ * rmd160.c (gcry_rmd160_mixblock): Make BUFFER a void*.
+ (_gcry_rmd160_hash_buffer): Make OUTBUF and BUFFER void*.
+ * sha1.c (_gcry_sha1_hash_buffer): Ditto.
+
+ * cipher.c (gcry_cipher_encrypt, cry_cipher_decrypt): Change
+ buffer args to void*.
+ (gcry_cipher_register): Make ALGORITHM_ID a int *.
+
+ * md.c (md_start_debug): Make SUFFIX a const char*. Use snprintf.
+ (gcry_md_debug): New.
+ (gcry_md_ctl): Changed arg BUFFER from unsigned char*.
+
+ * md.c (md_write): Make INBUF a const void*.
+ (gcry_md_write): Remove needless cast.
+ * crc.c (crc32_write): Make INBUF a const void*
+ (update_crc32, crc24rfc2440_write): Ditto.
+ * sha512.c (sha512_write, transform): Ditto.
+ * sha256.c (sha256_write, transform): Ditto.
+ * rmd160.c (rmd160_write, transform): Ditto.
+ * md5.c (md5_write, transform): Ditto.
+ * md4.c (md4_write, transform): Ditto.
+ * sha1.c (sha1_write, transform): Ditto.
+
+ * tiger.c (tiger_write, transform): Ditto.
+ * whirlpool.c (whirlpool_write, whirlpool_add, transform): Ditto.
+
+ * elgamal.c (elg_names): Change to a const*.
+ * dsa.c (dsa_names): Ditto.
+ * rsa.c (rsa_names): Ditto.
+ * pubkey.c (gcry_pk_lookup_func_name): Make ALIASES a const.
+
+2007-02-20 Werner Koch <wk@g10code.com>
+
+ * rndlinux.c (open_device): Remove unsused arg MINOR.
+
+2007-01-30 Werner Koch <wk@g10code.com>
+
+ * sha256.c (oid_spec_sha256): Add alias from pkcs#1.
+ * sha512.c (oid_spec_sha512): Ditto.
+ (oid_spec_sha384): Ditto.
+
+2006-12-18 Werner Koch <wk@g10code.com>
+
+ * rndlinux.c (set_cloexec_flag): New.
+ (open_device): Set close-on-exit flags. Suggested by Max
+ Kellermann. Fixes Debian#403613.
+
+ * Makefile.am (AM_CPPFLAGS, AM_CFLAGS): Splitted and merged
+ Moritz' changes.
+ (INCLUDES): Removed.
+
+2006-11-30 Werner Koch <wk@g10code.com>
+
+ * serpent.c (byte_swap_32): Remove trailing semicolon.
+
+2006-11-15 Werner Koch <wk@g10code.com>
+
+ * Makefile.am (INCLUDES): Include ../src/
+
+2006-11-03 Werner Koch <wk@g10code.com>
+
+ * random.c [HAVE_GETTIMEOFDAY]: Included sys/time.h and not
+ sys/times.h. Reported by Rafaël Carré.
+
+2006-11-05 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (AM_CFLAGS): Added -I$(top_builddir)/src so that the
+ new gcrypt.h is used, not the one installed in the system.
+
+2006-10-25 Werner Koch <wk@g10code.com>
+
+ * primegen.c (prime_generate_internal): Tweaked use of secure
+ memory and entropy use. Safe unused primes from the pool. Allocate
+ at least a pool of 30.
+ (save_pool_prime, get_pool_prime): New.
+
+2006-10-23 Werner Koch <wk@g10code.com>
+
+ * ac.c (_gcry_ac_data_from_sexp): Reset sexp_tmp for failsafe
+ means. Release sexp_cur if needed. Reported by Dirk Stoecker.
+
+ * pubkey.c (pubkeys_registered_lock): Intialized it. It is not
+ realy needed because this is a mere initialization to 0 anyway.
+ Noted by Victor Stinner.
+
+2006-10-17 Werner Koch <wk@g10code.com>
+
+ * dsa.c (_gcry_dsa_generate2): New.
+ (generate): New arg QBITS. Add sanity checks for reasonable qbits
+ and nbits.
+ * pubkey.c (gcry_pk_genkey): Parse an qbits element.
+ (pubkey_generate): New arg QBITS. Pass it to the DSA generation.
+
+2006-10-05 Werner Koch <wk@g10code.com>
+
+ * md.c (gcry_md_algo_info) <get_asnoid>: Check that the algo is
+ available.
+
+2006-10-04 David Shaw <dshaw@jabberwocky.com> (wk)
+
+ * tiger.c (round): Rename to tiger_round as gcc 4 has a built-in
+ round function that this conflicts with.
+
+2006-09-11 Werner Koch <wk@g10code.com>
+
+ * rndw32.c (slow_gatherer_windowsNT): While adding data use the
+ size of the diskPerformance and not its address. Has been fixed in
+ GnuPG more than a year ago. Noted by Lee Fisher.
+
+2006-08-30 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_data_to_mpi): Need to allow "ripemd160" here as
+ this is the canonical name.
+
+2006-08-29 Hye-Shik Chang <perky@FreeBSD.org> (wk)
+
+ * seed.c: New.
+
+2006-08-03 Werner Koch <wk@g10code.com>
+
+ * random-daemon.c (_gcry_daemon_initialize_basics): Don't
+ initialize the socket. Remove arg SOCKETNAME.
+ (connect_to_socket): Make sure that daemon is set to -1 on error.
+ (call_daemon): Initialize the socket on the first call.
+ (_gcry_daemon_randomize, _gcry_daemon_get_random_bytes)
+ (_gcry_daemon_create_nonce): New arg SOCKETNAME.
+ * random.c (initialize): Call new daemon initializator.
+ (get_random_bytes, gcry_randomize, gcry_create_nonce): Pass socket
+ name to daemon call and reset allow_daemon on failure.
+
+2006-07-26 Werner Koch <wk@g10code.com>
+
+ * rmd160.c (_gcry_rmd160_mixblock): Add cast to transform call.
+
+ * blowfish.c (selftest): Cast string to usnigned char*.
+
+ * primegen.c (prime_generate_internal): Cast unsigned/char*
+ mismatch in calling m_out_of_n.
+ (is_prime): Changed COUNT to unsigned int *.
+
+ * ac.c (_gcry_ac_data_copy): Initialize DATA_MPIS.
+
+ * random.c (gcry_create_nonce): Update the pid after a fork.
+ Reported by Uoti Urpala.
+
+2006-07-04 Marcus Brinkmann <marcus@g10code.de>
+
+ * sha512.c: Fix typo in copyright notice.
+
+2006-06-21 Werner Koch <wk@g10code.com>
+
+ * rsa.c (_gcry_rsa_generate): Replace xcalloc by calloc.
+ * pubkey.c (gcry_pk_encrypt, gcry_pk_sign): Ditto.
+ (sexp_to_key, sexp_to_sig, sexp_to_enc, gcry_pk_encrypt)
+ (gcry_pk_sign, gcry_pk_genkey, gcry_pk_get_keygrip): Ditto.
+ * md.c (md_copy): Ditto.
+
+2006-04-22 Moritz Schulte <moritz@g10code.com>
+
+ * random-daemon.c (_gcry_daemon_initialize_basics): New argument:
+ SOCKETNAME. Passing on to connect_to_socket() if non-NULL.
+ (connect_to_socket, writen, readn, call_daemon): New functions.
+ (_gcry_daemon_randomize, _gcry_daemon_get_random_bytes)
+ (_gcry_daemon_create_nonce): Call call_daemon().
+ (RANDOM_DAEMON_SOCKET): New symbol.
+ (daemon_socket): New static variable.
+
+ * random.h (_gcry_daemon_initialize_basics): New parameter:
+ SOCKETNAME.
+ (_gcry_set_random_daemon_socket): New declaration.
+
+ * random.c (initialize_basics): Pass DAEMON_SOCKET_NAME to
+ _gcry_daemon_initialize_basics.
+ (_gcry_set_random_daemon_socket): New function, setting
+ DAEMON_SOCKET_NAME.
+
+2006-04-01 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (eme_pkcs_v1_5_encode): Use KEY_SIZE directly, no need to
+ call gcry_ac_key_get_nbits.
+ (eme_pkcs_v1_5_decode): Likewise.
+ (ac_es_dencode_prepare_pkcs_v1_5): Fill options_em structure with
+ key_size.
+ (_gcry_ac_data_dump, gcry_ac_data_dump): New functions.
+ (_gcry_ac_data_to_sexp, _gcry_ac_data_from_sexp): More or less
+ rewritten; changed S-Expression format so that it matches the one
+ used in pubkey.c.
+
+2006-03-15 Werner Koch <wk@g10code.com>
+
+ * random-daemon.c: New.
+ * random.c (_gcry_use_random_daemon): New.
+ (get_random_bytes, gcry_randomize, gcry_create_nonce): Try
+ diverting to the daemon functions.
+
+2006-03-14 Werner Koch <wk@g10code.com>
+
+ * random.c (lock_seed_file): New.
+ (read_seed_file, _gcry_update_random_seed_file): Use it.
+
+ * random.c (gcry_create_nonce): Detect a fork and re-seed.
+ (read_pool): Fixed the fork detection; it used to work only for
+ multi-threaded processes.
+
+2006-03-12 Brad Hards <bradh@frogmouth.net> (wk)
+
+ * md.c (md_open): Use new variable macpads_Bsize instead of
+ hardwiring the block size. Changed at all places.
+
+2006-03-10 Brad Hards <bradh@frogmouth.net> (wk, patch 2005-04-22)
+
+ * md.c, sha256.c: Add support for SHA-224.
+ (sha224_init): New.
+
+2006-01-18 Brad Hards <bradh@frogmouth.net> (wk 2006-03-07)
+
+ * cipher.c (cipher_encrypt, cipher_decrypt, do_ofb_encrypt)
+ (do_ofb_decrypt, gcry_cipher_open): Implement Output Feedback Mode.
+
+2005-11-02 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_algo_name): Return "?" instead of NULL for
+ unknown algorithm IDs.
+ * cipher.c (cipher_algo_to_string): Likewise.
+
+2005-11-01 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_algo_info): Don't forget to break after switch
+ case.
+
+2005-09-19 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate): Add preliminary support for 2 and 4 keys.
+ Return an error code if the key size is not supported.
+ (_gcry_dsa_generate): Return an error.
+
+2005-08-22 Werner Koch <wk@g10code.com>
+
+ * primegen.c (check_prime): New arg RM_ROUNDS.
+ (prime_generate_internal): Call it here with 5 rounds as used
+ before.
+ (gcry_prime_check): But here with 64 rounds.
+ (is_prime): Make sure never to use less than 5 rounds.
+
+2005-04-16 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_init): New function.
+
+2005-04-12 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_io_write, _gcry_ac_io_read): Initialize err to
+ make the compiler happy.
+ Always use errno, now that gcry_malloc() is guaranteed to set
+ errno on failure.
+ (_gcry_ac_data_to_sexp): Don't forget to goto out after error in
+ loop.
+ (_gcry_ac_data_to_sexp): Remove unused variable: mpi_list;
+ (_gcry_ac_data_to_sexp): Always deallocate sexp_buffer.
+ (_gcry_ac_data_from_sexp): Don't forget to initialize data_set_new.
+ (_gcry_ac_data_from_sexp): Handle special case, which is
+ necessary, since gcry_sexp_nth() does not distinguish between
+ "element does not exist" and "element is the empty list".
+ (_gcry_ac_io_init_va): Use assert to make sure that mode and type
+ are correct.
+ Use gcry_error_t types where gcry_err_code_t types have been used
+ before.
+
+2005-04-11 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_data_sign_scheme): Don't forget to initialize
+ buffer.
+
+ * whirlpool.c: New file.
+ * md.c (digest_table): Add whirlpool.
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Added: whirlpool.c.
+
+2005-03-30 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_data_from_sexp): Use length of SEXP_CUR, not
+ length of SEXP; do not forget to set SEXP_TMP to NULL after it has
+ been released.
+
+ (struct gcry_ac_mpi): New member: name_provided.
+ (_gcry_ac_data_set): Rename variable `name_final' to `name_cp';
+ remove const qualifier; change code to not cast away const
+ qualifiers; use name_provided member as well.
+ (_gcry_ac_data_set, _gcry_ac_data_get_name): Use name_provided
+ member of named mpi structure.
+
+ (gcry_ac_name_to_id): Do not forget to initialize err.
+ (_gcry_ac_data_get_index): Do not forget to initialize mpi_return;
+ use gcry_free() instead of free(); remove unnecessary cast; rename
+ mpi_return and name_return to mpi_cp and name_cp; adjust code.
+ (ac_data_mpi_copy): Do not cast away const qualifier.
+ (ac_data_values_destroy): Likewise.
+ (ac_data_construct): Likewise.
+
+ (ac_data_mpi_copy): Initialize flags to GCRY_AC_FLAG_DEALLOC.
+ (ac_data_extract): Use GCRY_AC_FLAG_DEALLOC instead of
+ GCRY_AC_FLAG_COPY.
+
+ (_gcry_ac_io_init_va, _gcry_ac_io_init, gcry_ac_io_init)
+ (gcry_ac_io_init_va, _gcry_ac_io_write, _gcry_ac_io_read)
+ (_gcry_ac_io_read_all, _gcry_ac_io_process): New functions.
+ (gry_ac_em_dencode_t): Use gcry_ac_io_t in prototype instead of
+ memroy strings directly; adjust encode/decode functions to use io
+ objects.
+ (emsa_pkcs_v1_5_encode_data_cb): New function ...
+ (emsa_pkcs_v1_5_encode): ... use it here.
+ (ac_data_dencode): Use io objects.
+ (_gcry_ac_data_encode, _gcry_ac_data_decode, gcry_ac_data_encode)
+ (gcry_ac_data_decode): Likewise.
+ (_gcry_ac_data_encrypt_scheme, gcry_ac_data_encrypt_scheme)
+ (_gcry_ac_data_decrypt_scheme, gcry_ac_data_decrypt_scheme)
+ (_gcry_ac_data_sign_scheme, gcry_ac_data_sign_scheme)
+ (_gcry_ac_data_verify_scheme, gcry_ac_data_verify_scheme):
+ Likewise.
+
+2005-03-23 Werner Koch <wk@g10code.com>
+
+ * rndw32.c (_gcry_rndw32_gather_random_fast): While adding data
+ use the size of the object and not the one of its address. Bug
+ reported by Sascha Kiefer.
+
+2005-03-19 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (do_cbc_encrypt): Be careful to not overwrite data,
+ which is to be used later on. This happend, in case CTS is
+ enabled and OUTBUF is equal to INBUF.
+
+2005-02-25 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_get_keygrip): Allow for shadowed-private-key.
+
+2005-02-13 Moritz Schulte <moritz@g10code.com>
+
+ * serpent.c: Updated from 1.2 branch:
+
+ s/u32_t/u32/ and s/byte_t/byte/. Too match what we have always
+ used and are using in all other files too
+ (serpent_test): Moved prototype out of a fucntion.
+
+2005-02-07 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: Major parts rewritten.
+ * pubkey.c (_gcry_pk_get_elements): New function.
+
+2004-12-09 Werner Koch <wk@g10code.com>
+
+ * serpent.c (serpent_setkey): Moved prototype of serpent_test to
+ outer scope.
+
+2004-09-11 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (pubkey_table): Added an alias entry for GCRY_PK_ELG_E.
+
+2004-08-23 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: Do not include <assert.h>.
+ * rndegd.c: Likewise.
+ * sha1.c: Likewise.
+ * rndunix.c: Likewise.
+ * rndlinux.c: Likewise.
+ * rmd160.c: Likewise.
+ * md5.c: Likewise.
+ * md4.c: Likewise.
+ * cipher.c: Likewise.
+ * crc.c: Likewise.
+ * blowfish.c: Likewise.
+
+ * pubkey.c (dummy_generate, dummy_check_secret_key)
+ (dummy_encrypt, dummy_decrypt, dummy_sign, dummy_verify): Return
+ err code GPG_ERR_NOT_IMPLEMENTED instead of aborting through
+ log_bug().
+ (dummy_get_nbits): Return 0 instead of aborting though log_bug().
+
+2004-08-19 Werner Koch <wk@g10code.de>
+
+ * pubkey.c (sexp_data_to_mpi): Changed the zero random byte
+ substituting code to actually do clever things. Thanks to
+ Matthias Urlichs for noting the implementation problem.
+
+2004-08-09 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_sign): Fixed memory leak; fix provided by
+ Modestas Vainius.
+
+2004-07-16 Werner Koch <wk@gnupg.org>
+
+ * rijndael.c (do_encrypt): Fix alignment problem. Bugs found by
+ Matthias Urlichs.
+ (do_decrypt): Ditto.
+ (keySched, keySched2): Use 2 macros along with unions in the key
+ schedule context.
+
+2004-07-14 Moritz Schulte <moritz@g10code.com>
+
+ * rsa.c (_gcry_rsa_decrypt): Don't forget to free "a". Thanks to
+ Nikos Mavroyanopoulos.
+
+2004-05-09 Werner Koch <wk@gnupg.org>
+
+ * random.c (read_pool): Mix the PID in to better protect after a
+ fork.
+
+2004-07-04 Moritz Schulte <moritz@g10code.com>
+
+ * serpent.c: Use "u32_t" instead of "unsigned long", do not
+ declare S-Box variables as "register". Fixes failure on
+ OpenBSD/sparc64, reported by Nikolay Sturm.
+
+2004-05-07 Werner Koch <wk@gnupg.org>
+
+ * random.c (initialize): Factored out some code to ..
+ (initialize_basics): .. new function.
+ (_gcry_random_initialize): Just call initialize_basics unless the
+ new arg FULL is set to TRUE.
+ (_gcry_fast_random_poll): Don't do anything unless the random
+ system has been really initialized.
+
+2004-05-07 Moritz Schulte <moritz@g10code.de>
+
+ * ac.c (gcry_ac_open): Do not dereference NULL pointer. Reported
+ by Umberto Salsi.
+
+2004-02-20 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (check_prime): New args CB_FUNC and CB_ARG; call them
+ at different stages. Pass these arguments through all callers.
+
+2004-02-06 Werner Koch <wk@gnupg.org>
+
+ * des.c: Add a new OID as used by pkcs#12.
+
+ * rfc2268.c: New. Taken from libgcrypt.
+ * cipher.c: Setup the rfc2268 algorithm.
+
+2004-01-25 Moritz Schulte <mo@g10code.com>
+
+ * primegen.c (prime_generate_internal): Do not forget to free
+ `q_factor'; fixed by Brieuc Jeunhomme.
+ (prime_generate_internal): Do not forget to free `prime'.
+
+2004-01-14 Moritz Schulte <mo@g10code.com>
+
+ * ac.c (gcry_ac_data_set): New argument: flags; slightly
+ rewritten.
+ (gcry_ac_data_get_name, gcry_ac_data_get_index): Likewise.
+ (gcry_ac_key_pair_generate): New argument: misc_data; modified
+ order of arguments.
+ (gcry_ac_key_test): New argument: handle.
+ (gcry_ac_key_get_nbits, gcry_ac_key_get_grip): Likewise.
+ Use GCRY_AC_FLAG_NO_BLINDING instead of
+ GCRY_AC_DATA_FLAG_NO_BLINDING.
+ (gcry_ac_mpi): New member: flags.
+ (gcry_ac_data_search, gcry_ac_data_add): Removed functions.
+
+2003-12-22 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (is_prime): Release A2.
+
+2003-12-19 Werner Koch <wk@gnupg.org>
+
+ * md.c: Moved a couple of functions down below the data structure
+ definitions.
+ (struct gcry_md_context): New field ACTUAL_HANDLE_SIZE.
+ (md_open): Set it here.
+ (strcut gcry_md_list): New field ACTUAL_STRUCT_SIZE.
+ (md_enable): Set it here.
+ (md_close): Wipe the context memory.
+ secure memory.
+ * cipher.c (struct gcry_cipher_handle): New field ACTUAL_HANDLE_SIZE.
+ (gcry_cipher_open): Set it here.
+ (gcry_cipher_close): Use it to always wipe out the handle data.
+
+ * ac.c (gcry_ac_open): Make sure HANDLE gets initialized even when
+ the function is not successful.
+ (gcry_ac_close): Allow a NULL handle.
+ (gcry_ac_key_destroy, gcry_ac_key_pair_destroy): Ditto.
+ (gcry_ac_key_get_grip): Return INV_OBJ on error.
+
+ * primegen.c (prime_generate_internal): Fixed error code for
+ failed malloc. Replaced the !err if chain by gotos.
+ (gcry_prime_group_generator): Remove the extra sanity check.
+
+ * md.c: Minor code and comment cleanups.
+
+2003-12-16 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): Doc fix. Thanks to Newton Hammet.
+
+2003-12-11 Werner Koch <wk@gnupg.org>
+
+ * rndunix.c (slow_poll): Don't use #warning but #error.
+
+ * rndegd.c: Changed indentation.
+ (my_make_filename): Removd the var_arg cruft becuase we
+ don't need it here. Changed caller.
+
+ * rndlinux.c: Changed indentation.
+ (open_device): Remove the superfluous stat call and clarify
+ comment.
+
+ * rsa.c: Changed indentation.
+ (secret): Use the standard algorithm if p, q and u are not
+ available.
+ (rsa_blind, rsa_unblind): Renamed from _gcry_rsa_blind,
+ _gcry_rsa_unblind and moved more to the top.
+
+ * md4.c: Changed indentation. Removed unnecessary casts.
+ * md5.c, rmd160.c, sha1.c, tiger.c: Ditto.
+ * rijndael.c, twofish.c: Ditto.
+ * serpent.c: Removed unnecessary casts.
+ * sha256.c, sha512.c: Ditto.
+
+2003-12-09 Werner Koch <wk@gnupg.org>
+
+ * dsa.c: Unified indentation style.
+ * elgamal.c: Ditto.
+ * des.c (des_key_schedule): Code beautifications.
+ * blowfish.c: Changed indentation style.
+ * cast5.c (do_cast_setkey): Ditto.
+
+ * pubkey.c (gcry_pk_encrypt): Replaced the chain of if(!err) tests
+ by straightforward gotos. Other cleanups.
+ (gcry_pk_decrypt): Ditto.
+ (gcry_pk_sign): Ditto.
+ (gcry_pk_verify): Ditto.
+ (gcry_pk_genkey): Ditto. Use strtoul instead of strtol.
+ (gcry_pk_ctl): Use GPG_ERR_INV_ARG to indicate bad arguments.
+
+2003-12-07 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_register_default): Undef the helper macro.
+ (gcry_pk_map_name): Allow NULL for string.
+ (sexp_to_key): Use memcpy and not strncpy. Use gcry_free and not
+ free.
+ (sexp_to_sig): Ditto.
+ (sexp_to_enc): Ditto. Replaced the chain of if(!err) tests by
+ straightforward gotos.
+
+2003-12-05 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Documentation cleanups.
+ (gcry_cipher_mode_from_oid): Allow NULL for STRING.
+
+2003-12-03 Werner Koch <wk@gnupg.org>
+
+ * elgamal.c (sign, do_encrypt, gen_k): Make sure that a small K is
+ only used for encryption.
+
+2003-11-18 Werner Koch <wk@gnupg.org>
+
+ * random.h (rndw32_set_dll_name): Removed unused prototype.
+
+ * Makefile.am (EXTRA_DIST): Added Manifest.
+
+2003-11-11 Werner Koch <wk@gnupg.org>
+
+ * Manifest: New.
+
+2003-11-04 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Use shortcut for SHA1
+ * sha1.c (_gcry_sha1_hash_buffer): New.
+
+ * random.c: Reformatted most functions.
+ (mix_pool): Moved the failsafe_digest from global
+ scope to here.
+ (do_fast_random_poll): Use the generic fucntions even if a fast
+ gathering function has been used.
+ (read_pool): Detect a fork and retry.
+ (gcry_randomize, get_random_bytes): Don't distinguish anymore
+ between weak and strong random.
+ (gcry_create_nonce): New.
+
+2003-10-31 Werner Koch <wk@gnupg.org>
+
+ * rndw32.c (slow_gatherer_windowsNT): Use a plain buffer for the
+ disk performance values and not the W32 API structure.
+
+ * dsa.c (verify): s/exp/ex/ due to shadowing of a builtin.
+ * elgamal.c (verify): Ditto.
+
+ * ac.c (gcry_ac_data_get_index): s/index/idx/
+ (gcry_ac_data_copy_internal): Remove the cast in _gcry_malloc.
+ (gcry_ac_data_add): Must use gcry_realloc instead of realloc.
+ * pubkey.c (sexp_elements_extract): s/index/idx/ as tribute to the
+ forehackers.
+ (gcry_pk_encrypt): Removed shadowed definition of I. Reordered
+ arguments to malloc for clarity.
+ (gcry_pk_sign, gcry_pk_genkey): Ditto.
+ * primegen.c (prime_generate_internal): s/random/randomlevel/.
+
+2003-10-27 Moritz Schulte <mo@g10code.com>
+
+ * pubkey.c (gcry_pk_encrypt): Don't forget to deallocate pkey.
+
+2003-10-27 Werner Koch <wk@gnupg.org>
+
+ * random.c (gcry_random_add_bytes): Return if buflen is zero to
+ avoid gcc warning about unsed parameter.
+ (MASK_LEVEL): Simplified; does now work for signed and unsigned
+ w/o warnings.
+
+ * md.c (md_start_debug): Removed the const from SUFFIX, because
+ this function is called from the control fucntion which does not
+ require const.
+
+ Prefixed all (pubkey,digest,cipher}_spec_* globale variables with
+ _gcry_.
+
+ * ac.c (ac_key_identifiers): Made static.
+
+ * random.c (getfnc_gather_random,getfnc_fast_random_poll): Move
+ prototypes to ..
+ * rand-internal.h: .. here
+ * random.c (getfnc_gather_random): Include rndw32 gatherer.
+ * rndunix.c, rndw32.c, rndegd.c: Include them here.
+ * rndlinux.c (_gcry_rndlinux_gather_random): Prepend the _gcry_
+ prefix. Changed all callers.
+ * rndegd.c (_gcry_rndegd_gather_random): Likewise.
+ (_gcry_rndegd_connect_socket): Likewise.
+ * rndunix.c (_gcry_rndunix_gather_random): Likewise.
+ (waitpid): Made static.
+ * rndw32.c: Removed the old and unused winseed.dll cruft.
+ (_gcry_rndw32_gather_random_fast): Renamed from
+ gather_random_fast.
+ (_gcry_rndw32_gather_random): Renamed from gather_random. Note,
+ that the changes 2003-04-08 somehow got lost.
+
+ * sha512.c (sha512_init, sha384_init): Made static.
+
+ * cipher.c (do_ctr_decrypt): Removed "return" from this void
+ function.
+
+2003-10-24 Moritz Schulte <mo@g10code.com>
+
+ * serpent.c: Fix an issue on big-endian systems.
+
+ * rndw32.c: Removed IS_MODULE -cruft.
+ * rndlinux.c (rndlinux_gather_random): Likewise.
+
+2003-10-10 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): Bail out if NBITS is less than 16.
+ (prime_generate_internal): Initialize prime variable to suppress
+ compiler warning. Check pbits, initialize qbits when passed as
+ zero.
+
+ * primegen.c (prime_generate_internal): New arg
+ ALL_FACTORS. Changed all callers.
+ (gcry_prime_generate): Make the factors arg optional. Request
+ all_factors. Make sure PRIME is set to NULL even on error.
+ (gcry_prime_group_generator): New.
+ (gcry_prime_release_factors): New.
+
+2003-10-06 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): Assert that NBITS is never zero, it
+ would cause a segv.
+
+2003-09-28 Moritz Schulte <mo@g10code.com>
+
+ * ac.c: Include "cipher.h".
+
+2003-09-27 Moritz Schulte <mo@g10code.com>
+
+ * rndegd.c (do_read): Return nread instead of nbytes; thanks to
+ Michael Caerwyn.
+
+2003-09-04 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (_gcry_pk_aliased_algo_name): New.
+ * ac.c (gcry_ac_open): Use it here.
+
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Add serpent.c
+
+2003-09-02 Moritz Schulte <mo@g10code.com>
+
+ * primegen.c (gcry_prime_check, gcry_prime_generate): New
+ functions.
+ (prime_generate_internal): New function, based on
+ _gcry_generate_elg_prime.
+ (_gcry_generate_elg_prime): Rewritten as a wrapper for
+ prime_generate_internal.
+
+2003-08-28 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_encrypt): Don't include the flags list in the
+ return value. This does not make sense and breaks any programs
+ parsing the output strictly (e.g. current gpgsm).
+ (gcry_pk_encrypt): If aliases for the algorithm name exists, take
+ the first one instead of the regular name to adhere to SPKI
+ conventions.
+ (gcry_pk_genkey): Ditto.
+ (gcry_pk_sign): Ditto. Removed unused KEY_ALGO_NAME.
+
+2003-08-19 Moritz Schulte <mo@g10code.com>
+
+ * cipher.c: Add support for Serpent
+ * serpent.c: New file.
+
+2003-08-10 Moritz Schulte <moritz@g10code.com>
+
+ * rsa.c (_gcry_rsa_blind, _gcry_rsa_unblind): Declare static.
+
+2003-08-09 Timo Schulz <twoaday@freakmail.de>
+
+ * random.c (getfnc_gather_random): Don't check NAME_OF_DEV_RANDOM
+ two times, but also the NAME_OF_DEV_URANDOM device.
+
+2003-08-08 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_to_enc): Fixed extraction of S-Expression: do not
+ fail if no `flags' sub S-Expression is found.
+
+2003-07-27 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_lookup_func_oid): Allow for empty OID lists.
+
+2003-07-23 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (gcry_ac_data_construct): New argument: include_flags, only
+ include `flags' S-expression, if include_flags is true. Adjust
+ callers. Thanks for triggering a bug caused by `flags'
+ sub-S-expression where they are not expected to Ralf Schneider.
+
+2003-07-21 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_lookup_func_name): Use new member name
+ `aliases' instead of `sexp_names'.
+
+ * ac.c (gcry_ac_key_data_get): New function.
+
+ * cipher.c (gcry_cipher_lookup_func_name): Fix return value.
+
+2003-07-20 Moritz Schulte <moritz@g10code.com>
+
+ * blowfish.c: Adjusted for new gcry_cipher_spec_t structure.
+ * cast5.c: Likewise.
+ * twofish.c: Likewise.
+ * arcfour.c: Likewise.
+ * rijndael.c (rijndael_oids, rijndael192_oids, rijndael256_oids):
+ New variables, adjust for new gcry_cipher_spec_t structure.
+ * des.c (oids_tripledes): New variable, adjust for new
+ gcry_cipher_spec_t structure.
+
+ * md.c (oid_table): Removed.
+
+ * tiger.c (oid_spec_tiger): New variable.
+ (digest_spec_tiger): Adjusted for new gry_md_spec_t structure.
+
+ * sha512.c (oid_spec_sha512): New variable.
+ (digest_spec_sha512): Adjusted for new gry_md_spec_t structure.
+
+ * sha512.c (oid_spec_sha384): New variable.
+ (digest_spec_sha384): Adjusted for new gry_md_spec_t structure.
+
+ * sha256.c (oid_spec_sha256): New variable.
+ (digest_spec_sha256): Adjusted for new gry_md_spec_t structure.
+
+ * sha1.c (oid_spec_sha1): New variable.
+ (digest_spec_sha1): Adjusted for new gry_md_spec_t structure.
+
+ * rmd160.c (oid_spec_rmd160): New variable.
+ (digest_spec_rnd160): Adjusted for new gry_md_spec_t structure.
+
+ * md5.c (oid_spec_md5): New variable.
+ (digest_spec_md5): Adjusted for new gry_md_spec_t structure.
+
+ * md4.c (oid_spec_md4): New variable.
+ (digest_spec_md4): Adjusted for new gry_md_spec_t structure.
+
+ * crc.c (digest_spec_crc32, digest_spec_crc32_rfc1510,
+ digest_spec_crc32_rfc2440): Adjusted for new gry_md_spec_t
+ structure.
+
+2003-07-19 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (gcry_md_lookup_func_oid): New function.
+ (search_oid): New function, copied from cipher.c.
+ (gcry_md_map_name): Adjust for new search_oid_interface.
+
+ * cipher.c (oid_table): Removed table.
+ (gcry_cipher_lookup_func_oid): New function.
+ (search_oid): Rewritten to use the module functions.
+ (gcry_cipher_map_name): Adjust for new search_oid interface.
+ (gcry_cipher_mode_from_oid): Likewise.
+
+2003-07-18 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Convert ERR to gpg_error_t in
+ gpg_strerror.
+
+2003-07-14 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (gcry_cipher_lookup_func_name): Also check the cipher
+ name aliases, not just the primary name.
+ (gcry_cipher_map_name): Remove kludge for aliasing Rijndael to
+ AES.
+
+ * arcfour.c, blowfish.c, cast5.c, des.c, twofish.c: Adjust cipher
+ specification structures.
+
+ * rijndael.c (rijndael_names, rijndael192_names,
+ rijndael256_names): New variables, use them in the cipher
+ specifications.
+
+ * rmd160test.c: Removed file.
+
+ * ac.c, arcfour.c, blowfish.c, cast5.c, cipher.c, des.c, dsa.c,
+ elgamal.c, md.c, pubkey.c, random.c, rijndael.c, rsa.c, twofish.c:
+ Used gcry_err* wrappers for libgpg symbols.
+
+ * primegen.c (gen_prime): Correct the order arguments to
+ extra_check.
+
+2003-07-12 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: Replaced all public occurences of gpg_error_t with
+ gcry_error_t.
+ * cipher.c: Likewise.
+ * md.c: Likewise.
+ * pubkey.c: Likewise.
+ * random.c: Likewise.
+
+ * cipher.c: Added support for TWOFISH128.
+
+2003-07-08 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (gcry_ac_data_copy_internal): New function, based on
+ gcry_ac_data_copy.
+ (gcry_ac_data_copy): Made public, use gcry_ac_data_copy_internal.
+ (gcry_ac_key_init): Use gcry_ac_data_copy_internal.
+
+2003-07-07 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (gcry_ac_data_set): Only release old MPI value if it is
+ different from the new value. Bug reported by Simon Josefsson
+ <jas@extundo.com>.
+
+ * pubkey.c (gcry_pk_list): New function.
+ * md.c (gcry_md_list): New function.
+
+ * ac.c (gcry_ac_key_pair_generate): Fix calculation of format
+ string size.
+
+2003-07-05 Moritz Schulte <moritz@g10code.com>
+
+ * md.c: Named struct of digest_table `digest_table_entry'.
+ (digest_table_entry): New member: algorithm; filled in.
+ (digest_table_entry): Removed unused member: flags.
+ (gcry_md_register): New argument: algorithm_id, filled in.
+ (gcry_md_register_default): Used algorithm ID from module
+ structure.
+ (gcry_md_map_name): Likewise.
+ (md_enable): Likewise.
+ (md_read): Likewise.
+ (gcry_md_info): Likewise.
+
+ * pubkey.c: Named truct for pubkey_table `pubkey_table_entry'.
+ (pubkey_table_entry): New member: algorithm; filled in.
+ (gcry_pk_register_default): Used algorithm ID from pubkey_table.
+ (gcry_pk_register): New argument: algorithm_id, filled in.
+ (gcry_pk_map_name): Used algorithm ID from module structure.
+ (gcry_pk_decrypt): Likewise.
+ (gcry_pk_encrypt): Likewise.
+ (gcry_pk_verify): Likewise.
+ (gcry_pk_sign): Likewise.
+ (gcry_pk_testkey): Likewise.
+ (gcry_pk_genkey): Likewise.
+ (gcry_pk_get_nbits): Likewise.
+ (sexp_to_key): Removed unused variable: algo.
+ (sexp_to_sig): Likewise.
+
+ * cipher.c: Named struct for cipher_table `cipher_table_entry'.
+ (cipher_table_entry): New member: algorithm; filled in.
+ (gcry_cipher_register_default): Used algorithm ID from
+ cipher_table.
+ (gcry_cipher_register): New argument: algorithm_id, filled in.
+ (gcry_cipher_map_name): Used algorithm ID from module structure.
+
+ * arcfour.c (cipher_spec_arcfour): Removed algorithm ID.
+ * blowfish.c (cipher_spec_blowfish): Likewise.
+ * cast5.c (cipher_spec_cast5): Likewise.
+ * crc.c (digest_spec_crc32): Likewise.
+ * crc.c (digest_spec_crc32_rfc1510): Likewise.
+ * crc.c (digest_spec_crc32_rfc2440): Likewise.
+ * des.c (cipher_spec_des): Likewise.
+ * des.c (cipher_spec_tripledes): Likewise.
+ * dsa.c (pubkey_spec_dsa): Likewise.
+ * elgamal.c (pubkey_spec_elg): Likewise.
+ * md4.c (digest_spec_md4): Likewise.
+ * md5.c (digest_spec_md5): Likewise.
+ * aes.c (cipher_spec_aes): Likewise.
+ * aes.c (cipher_spec_aes192): Likewise.
+ * aes.c (cipher_spec_aes256): Likewise.
+ * rsa.c (pubkey_spec_rsa): Likewise.
+ * sha1.c (digest_spec_sha1): Likewise.
+ * sha256.c (digest_spec_sha256): Likewise.
+ * sha512.c (digest_spec_sha512): Likewise.
+ * tiger.c (digest_spec_tiger): Likewise.
+ * twofish.c (cipher_spec_twofish): Likewise.
+ * twofish.c (cipher_spec_twofish128): Likewise.
+
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Fix list of source
+ files; reported by Simon Josefsson <jas@extundo.com>.
+
+ * pubkey.c: Replaced all occurences of `id' with `algorithm',
+ since `id' is a keyword in obj-c.
+ * md.c: Likewise.
+ * cipher.c: Likewise.
+
+ * crc.c, md4.c, md5.c, rmd160.c, sha1.c, sha256.c, tiger.c:
+ Replaced all occurences of gcry_digest_spec_t with gcry_md_spec_t.
+
+ * dsa.c, rsa.c, elgamal.c: Replaced all occurencens of
+ gcry_pubkey_spec_t with gcry_pk_spec_t.
+
+ * md.c: Replaced all occurences of gcry_digest_spec_t with
+ gcry_md_spec_t.
+ (gcry_digest_register_default): Renamed to ...
+ (gcry_md_register_default): ... this; adjusted callers.
+ (gcry_digest_lookup_func_name): Renamed to ...
+ (gcry_md_lookup_func_name): ... this; adjusted callers.
+ (gcry_digest_lookup_name): Renamed to ...
+ (gcry_md_lookup_name): ... this; adjusted callers.
+ (gcry_digest_register): Renamed to ...
+ (gcry_md_register): ... this.
+ (gcry_digest_unregister): Renamed to ...
+ (gcry_md_unregister): ... this.
+
+ * pubkey.c (gcry_pubkey_register): Renamed to ...
+ (gcry_pk_register): ... this.
+ (gcry_pubkey_unregister): Renamed to ...
+ (gcry_pk_unregister): ... this.
+ Replaced all occurences of gcry_pubkey_spec_t with gcry_pk_spec_t.
+ (gcry_pubkey_register_default): Renamed to ...
+ (gcry_pk_register_default): ... this; adjusted callers.
+ (gcry_pubkey_lookup_func_name): Renamed to ...
+ (gcry_pk_lookup_func_name): ... this; adjusted callers.
+ (gcry_pubkey_lookup_name): Renamed to ...
+ (gcry_pk_lookup_name): ... this; adjusted callers.
+
+ * md.c (gcry_md_hash_buffer): Fix error checking. Thanks to Simon
+ Josefsson <jas@extunde.com>.
+
+2003-07-04 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (gcry_cipher_list): New function.
+
+2003-07-01 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_to_sig): Accept a `flags' S-expression to be more
+ consistent with sexp_to_enc.
+
+2003-06-30 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (libcipher_la_SOURCES): Added: ac.c.
+
+ * pubkey.c (_gcry_pk_module_lookup): New function.
+ (_gcry_pk_module_release): New function.
+
+2003-06-29 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: New file.
+
+2003-06-26 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Trigger BUG correcly with new API.
+
+2003-06-19 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_is_enabled): Fixed.
+
+2003-06-18 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_get_algo_keylen): New.
+ (gcry_cipher_get_algo_blklen): New.
+
+2003-06-18 Moritz Schulte <moritz@g10code.com>
+
+ * arcfour.c, cipher.c, blowfish.c, md.c, cast5.c, pubkey.c, crc.c,
+ des.c, dsa.c, elgamal.c, md4.c, md5.c, random.c, rijndael.c,
+ rmd160.c, rsa.c, sha1.c, sha256.c, sha512.c, tiger.c, twofish.c:
+ Replaced older types GcryDigestSpec, GcryCipherSpec and
+ GcryPubkeySpec with newer types: gcry_digest_spec_t,
+ gcry_cipher_spec_t and gcry_pubkey_spec_t.
+
+ * md.c (gcry_digest_id_new): Removed function.
+ (gcry_digest_register): Removed code for generating a new module
+ ID.
+
+ * pubkey.c (gcry_pubkey_id_new): Removed function.
+ (gcry_pubkey_register): Removed code for generating a new module
+ ID.
+
+ * cipher.c, md.c, pubkey.c: Replace old type GcryModule with newer
+ one: gcry_module_t.
+ (gcry_cipher_id_new): Removed function.
+ (gcry_cipher_register): Removed code for generating a new module
+ ID.
+
+ * cipher.c (gcry_cipher_register): Adjust call to
+ _gcry_module_add.
+ (gcry_cipher_register_default): Likewise.
+ * pubkey.c (gcry_pubkey_register_default): Likewise.
+ (gcry_pubkey_register): Likewise.
+ * md.c (gcry_digest_register_default): Likewise.
+ (gcry_digest_register): Likewise.
+
+ * md.c (gcry_digest_lookup_func_id): Removed function.
+ (gcry_digest_lookup_id): Likewise.
+ (gcry_digest_id_new): Use _gcry_module_lookup_id instead of
+ gcry_digest_lookup_id.
+ (digest_algo_to_string): Likewise.
+ (check_digest_algo): Likewise.
+ (md_enable): Likewise.
+ (md_digest_length): Likewise.
+ (md_asn_oid): Likewise.
+
+ * pubkey.c (gcry_pubkey_lookup_id): Removed function.
+ (gcry_pubkey_lookup_func_id): Likewise.
+ (gcry_pubkey_id_new): Use _gcry_module_lookup_id instead of
+ gcry_pubkey_id_new.
+ (gcry_pk_algo_name): Likewise.
+ (disable_pubkey_algo): Likewise.
+ (check_pubkey_algo): Likewise.
+ (pubkey_get_npkey): Likewise.
+ (pubkey_get_nskey): Likewise.
+ (pubkey_get_nsig): Likewise.
+ (pubkey_get_nenc): Likewise.
+ (pubkey_generate): Likewise.
+ (pubkey_check_secret_key): Likewise.
+ (pubkey_encrypt): Likewise.
+ (pubkey_decrypt): Likewise.
+ (pubkey_sign): Likewise.
+ (pubkey_verify): Likewise.
+ (gcry_pk_algo_info): Likewise.
+
+ * cipher.c (gcry_cipher_lookup_func_id): Removed function.
+ (gcry_cipher_lookup_id): Likewise.
+ (cipher_algo_to_string): use _gcry_module_lookup_id instead of
+ gcry_cipher_lookup_id.
+ (disable_cipher_algo): Likewise.
+ (check_cipher_algo): Likewise.
+ (cipher_get_blocksize): Likewise.
+ (gcry_cipher_open): Likewise.
+ (gcry_cipher_id_new): Likewise.
+
+2003-06-17 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (GCRYPT_MODULES): Set to @GCRYPT_CIPHERS@,
+ @GCRYPT_PUBKEY_CIPHERS@, @GCRYPT_DIGESTS@ and @GCRYPT_RANDOM@.
+ (libcipher_la_DEPENDENCIES): Set to $(GCRYPT_MODULES).
+ (libcipher_la_LIBADD): Likewise.
+ (AM_CFLAGS): Added: @GPG_ERROR_CFLAGS@.
+ (EXTRA_libcipher_la_SOURCES): Added all conditional sources.
+
+ * md.c (md_open): Use _gcry_fast_random_poll instead of
+ fast_random_poll.
+ * cipher.c (gcry_cipher_open): Likewise.
+
+ * random.h (fast_random_poll): Removed macro.
+
+ * blowfish.c, md4.c, md5.c, rmd160.c, sha1.c, sha256.c, sha512.c,
+ tiger.c: Use Autoconf's WORDS_BIGENDIAN instead of our own
+ BIG_ENDIAN_HOST.
+
+2003-06-16 Moritz Schulte <moritz@g10code.com>
+
+ * random.c (getfnc_gather_random): Do not special-case
+ USE_ALL_RANDOM_MODULES, make it the default.
+
+ * dsa.c: Replace last occurences of old type names with newer
+ names (i.e. replace MPI with gcry_mpi_t).
+ * elgamal.c: Likewise.
+ * primegen.c: Likewise.
+ * pubkey.c: Likewise.
+ * rsa.c: Likewise.
+
+2003-06-14 Moritz Schulte <moritz@g10code.com>
+
+ * des.c (des_setkey): Add selftest check.
+ (tripledes_set3keys): Likewise.
+ (do_tripledes_setkey): Remove selftest check.
+ (do_des_setkey): Likewise.
+
+2003-06-11 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (_gcry_md_init): New function.
+ * cipher.c (_gcry_cipher_init): New function.
+ * pubkey.c (_gcry_pk_init): New function.
+
+2003-06-13 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_get_algo): Reverted to old API. This is a
+ convenience function anyway and error checking is not approriate.
+ (gcry_md_is_secure): New.
+ (gcry_md_is_enabled): New.
+
+2003-06-12 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_open): Make sure HANDLE is set to NULL on
+ error.
+
+2003-06-11 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_open): Make sure H receives either NULL or an
+ valid handle.
+ (gcry_md_copy): Swapped arguments so that it is more in lione with
+ md_open and most other API fucntions like memcpy (destination
+ comes first). Make sure HANDLE is set to NULL on error.
+
+ * rijndael.c (do_encrypt): Hack to force correct alignment. It
+ seems not to be not sufficient, though. We should rework this
+ fucntions and remove all these ugly casts. Let the compiler
+ optimize or have an assembler implementation.
+
+2003-06-09 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am: Removed rules serpent, since that is not commited
+ yet.
+
+2003-06-08 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_encrypt): Improve calculation for size of the
+ format string.
+
+2003-06-07 Moritz Schulte <moritz@g10code.com>
+
+ * arcfour.c, bithelp.h, blowfish.c, cast5.c, cipher.c, crc.c,
+ des.c, dsa.c, elgamal.c, md4.c, md5.c, md.c, primegen.c, pubkey.c,
+ rand-internal.h, random.c, random.h, rijndael.c, rmd160.c,
+ rmd160test.c, rmd.h, rndeged.c, rndlinux.c, rndunix.c, rndw32.c,
+ rsa.c, sha1.c, sha256.c, sha512.c, tiger.c, twofish.c: Edited all
+ preprocessor instructions to remove whitespace before the '#'.
+ This is not required by C89, but there are some compilers out
+ there that don't like it. Replaced any occurence of the now
+ deprecated type names with the new ones.
+
+2003-06-04 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_encrypt): Construct an arg_list and use
+ gcry_sexp_build_array instead of gcry_sexp_build.
+ (gcry_pk_sign): Likewise.
+ (gcry_pk_genkey): Likewise.
+
+2003-06-01 Moritz Schulte <moritz@g10code.com>
+
+ * dsa.c (_gcry_dsa_generate): Do not check wether the algorithm ID
+ does indeed belong to DSA.
+ (_gcry_dsa_sign): Likewise.
+ (_gcry_dsa_verify): Likewise.
+ (_gcry_dsa_get_nbits): Likewise.
+
+ * elgamal.c (_gcry_elg_check_secret_key): Do not check wether the
+ algorithm ID does indeed belong to ElGamal.
+ (_gcry_elg_encrypt): Likewise.
+ (_gcry_elg_decrypt): Likewise.
+ (_gcry_elg_sign): Likewise.
+ (_gcry_elg_verify): Likewise.
+ (_gcry_elg_get_nbits): Likewise.
+ (_gcry_elg_generate): Likewise.
+
+ * rsa.c (_gcry_rsa_generate): Do not check wether the algorithm ID
+ does indeed belong to RSA.
+ (_gcry_rsa_encrypt): Likewise.
+ (_gcry_rsa_decrypt): Likewise.
+ (_gcry_rsa_sign): Likewise.
+ (_gcry_rsa_verify): Likewise.
+ (_gcry_rsa_get_nbits): Likewise.
+
+2003-05-30 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (md_get_algo): Return zero in case to algorithm is enabled.
+
+ * md.c (gcry_md_info): Adjusted for new no-errno-API.
+ (md_final): Likewise.
+ (gcry_md_get_algo): Likewise.
+ * pubkey.c (gcry_pk_get_keygrip): Likewise.
+ (gcry_pk_ctl): Likewise.
+ (gcry_pk_algo_info): Likewise.
+ * des.c (selftest): Likewise.
+
+2003-05-29 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (md_enable): Do not forget to release module on error.
+ (gcry_md_open): Adjusted for new no-errno-API.
+ (md_open): Likewise.
+ (md_copy): Likewise.
+ (gcry_md_copy): Likewise.
+ (gcry_md_setkey): Likewise.
+ (gcry_md_algo_info): Likewise.
+
+ * cipher.c (gcry_cipher_open): Adjusted for new no-errno-API and
+ also fixed a locking bug.
+ (gcry_cipher_encrypt): Adjusted for new no-errno-API.
+ (gcry_cipher_decrypt): Likewise.
+ (gcry_cipher_ctl): Likewise.
+ (gcry_cipher_info): Likewise.
+ (gcry_cipher_algo_info): Likewise.
+
+2003-05-28 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (md_enable): Adjusted for libgpg-error.
+ (gcry_md_enable): Likewise.
+ (gcry_digest_register_default): Likewise.
+ (gcry_digest_register): Likewise.
+ (check_digest_algo): Likewise.
+ (prepare_macpads): Likewise.
+ (gcry_md_setkey): Likewise.
+ (gcry_md_ctl): Likewise.
+ (gcry_md_get): Likewise.
+ (gcry_md_algo_info): Likewise.
+ (gcry_md_info): Likewise.
+ * dsa.c (_gcry_dsa_generate): Likewise.
+ (_gcry_dsa_check_secret_key): Likewise.
+ (_gcry_dsa_sign): Likewie.
+ (_gcry_dsa_verify): Likewise.
+ * twofish.c (do_twofish_setkey): Likewise.
+ (twofish_setkey): Likewise.
+ * cipher.c (gcry_cipher_register): Likewise.
+
+2003-05-25 Moritz Schulte <moritz@g10code.com>
+
+ * rijndael.c (do_setkey): Adjusted for libgpg-error.
+ (rijndael_setkey): Likewise.
+ * random.c (gcry_random_add_bytes): Likewise.
+ * elgamal.c (_gcry_elg_generate): Likewise.
+ (_gcry_elg_check_secret_key): Likewise.
+ (_gcry_elg_encrypt): Likewise.
+ (_gcry_elg_decrypt): Likewise.
+ (_gcry_elg_sign): Likewise.
+ (_gcry_elg_verify): Likewise.
+ * rsa.c (_gcry_rsa_generate): Likewise.
+ (_gcry_rsa_check_secret_key): Likewise.
+ (_gcry_rsa_encrypt): Likewise.
+ (_gcry_rsa_decrypt): Likewise.
+ (_gcry_rsa_sign): Likewise.
+ (_gcry_rsa_verify): Likewise.
+ * pubkey.c (dummy_generate, dummy_check_secret_key, dummy_encrypt,
+ dummy_decrypt, dummy_sign, dummy_verify): Likewise.
+ (gcry_pubkey_register): Likewise.
+ (check_pubkey_algo): Likewise.
+ (pubkey_generate): Likewise.
+ (pubkey_check_secret_key): Likewise.
+ (pubkey_encrypt): Likewise.
+ (pubkey_decrypt): Likewise.
+ (pubkey_sign): Likewise.
+ (pubkey_verify): Likewise.
+ (sexp_elements_extract): Likewise.
+ (sexp_to_key): Likewise.
+ (sexp_to_sig): Likewise.
+ (sexp_to_enc): Likewise.
+ (sexp_data_to_mpi): Likewise.
+ (gcry_pk_encrypt): Likewise.
+ (gcry_pk_decrypt): Likewise.
+ (gcry_pk_sign): Likewise.
+ (gcry_pk_verify): Likewise.
+ (gcry_pk_testkey): Likewise.
+ (gcry_pk_genkey): Likewise.
+ (gcry_pk_ctl): Likewise.
+ * cipher.c (dummy_setkey): Likewise.
+ (check_cipher_algo): Likewise.
+ (gcry_cipher_open): Likewise.
+ (cipher_setkey): Likewise.
+ (gcry_cipher_ctl): Likewise.
+ (cipher_encrypt): Likewise.
+ (gcry_cipher_encrypt): Likewise.
+ (cipher_decrypt): Likewise.
+ (gcry_cipher_decrypt): Likewise.
+ (gcry_cipher_info): Likewise.
+ (gcry_cipher_algo_info): Likewise.
+ * cast5.c (cast_setkey): Likewise.
+ (do_cast_setkey): Likewise.
+ * arcfour.c (arcfour_setkey): Likewise.
+ (do_arcfour_setkey): Likewise.
+ * blowfish.c (do_bf_setkey): Likewise.
+ (bf_setkey): Likewise.
+ * des.c (do_des_setkey): Likewise.
+ (do_tripledes_setkey): Likewise.
+
+2003-05-22 Moritz Schulte <moritz@g10code.com>
+
+ * tiger.c: Merged code ussing the U64_C macro from GnuPG.
+
+ * sha512.c: Likewise.
+
+2003-05-17 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Fix type: acquire a lock, instead of
+ releasing it.
+
+2003-05-11 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_testkey): Call REGISTER_DEFAULT_CIPHERS.
+ (gcry_pk_ctl): Likewise.
+
+2003-04-27 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Release sexp after extracted data has
+ been used.
+
+ * md.c (gcry_md_get_algo_dlen): Simplified, simply call
+ md_digest_length to do the job.
+
+ * des.c (do_des_setkey): Check for selftest failure not only
+ during initialization.
+ (do_tripledes_setkey): Include check for selftest failure.
+
+ * pubkey.c (gcry_pubkey_register_default): New macro
+ `pubkey_use_dummy', use it.
+
+ * elgamal.c (elg_names): New variable.
+ (pubkey_spec_elg): Include elg_names.
+
+ * dsa.c (dsa_names): New variable.
+ (pubkey_spec_dsa): Include dsa_names.
+
+ * rsa.c (rsa_names): New variable.
+ (pubkey_spec_rsa): Include rsa_names.
+
+ * pubkey.c (gcry_pubkey_lookup_func_name): Compare name also with
+ the names listed in `sexp_names'.
+
+2003-04-24 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_to_key): New variables: module, pubkey. Adjusted
+ to new module interface.
+ (sexp_to_key): Changend type of argument `retalgo' from `int *' to
+ `GcryModule **'. Adjusted all callers. Removed argument:
+ r_algotblidx.
+ (sexp_to_sig): Changend type of argument `retalgo' from `int *' to
+ `GcryModule **'. Adjusted all callers.
+ (sexp_to_enc): Likewise.
+
+ (pubkey_get_npkey, pubkey_get_nskey, pubkey_get_nsig,
+ pubkey_get_nenc): Use strlen to find out the number.
+
+ * rsa.c: Adjust pubkey_spec_rsa to new internal interface.
+ * dsa.c: Likewise.
+ * elgamal.c: Likewise.
+
+2003-04-17 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_elements_extract): New function.
+ * pubkey.c (sexp_to_key): Removed variable `idx', added `err', use
+ sexp_elements_extract.
+ (sexp_to_sig): Likewise.
+ (sexp_to_enc): Likewise.
+
+ * pubkey.c: Terminate list correctly.
+ * md.c: Include sha512/sha384 in digest_table.
+
+2003-04-16 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am: Include support for sha512.c.
+
+ * sha512.c: New file, merged from GnuPG, with few modifications
+ for libgcrypt.
+
+ * rand-internal.h: Removed declarations for constructor functions.
+
+ * md.c (md_copy): Call _gcry_module_use for incrementing the usage
+ counter of the digest modules.
+
+ * rsa.c: Do not include "rsa.h".
+ * dsa.c: Do not include "dsa.h".
+ * elgamal.c: Do not include "elgamal.h".
+ * des.c: Do not include "des.h".
+ * cast5.c: Do not include "cast5.h".
+ * blowfish.c: Do not include "blowfish.h".
+ * arcfour.c: Do not include "arcfour.h".
+
+ * Makefile.am (libcipher_la_DEPENDENCIES): Removed.
+ (libcipher_la_LIBADD): Removed.
+ Use Automake conditionals for conditional compilation.
+
+2003-04-13 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (gcry_cipher_open): Call REGISTER_DEFAULT_CIPHERS.
+
+ * md.c (gcry_md_list): New member: module.
+ (md_enable): New variable: module, changed use of module and
+ digest.
+ (md_enable): Initialize member: module.
+ (md_close): Call _gcry_module_release.
+
+ * cipher.c (gcry_cipher_open): New variable: module, changed use of
+ module and cipher.
+ (struct gcry_cipher_handle): New member: module.
+ (gcry_cipher_open): Initialize member: module.
+ (gcry_cipher_close): Call _gcry_module_release.
+
+2003-04-09 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c: Include "ath.h".
+ * md.c: Likewise.
+ * pubkey.c: Likewise.
+
+ * cipher.c (ciphers_registered_lock): New variable.
+ * md.c (digests_registered_lock): New variable.
+ * pubkey.c (pubkeys_registered_lock): New variable.
+
+ * rndlinux.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndlinux_constructor): Removed function.
+
+ * rndegd.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndegd_constructor): Removed function.
+
+ * rndunix.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndunix_constructor): Removed function.
+
+ * rndw32.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndw32_constructor): Removed function.
+
+ * rndegd.c (rndegd_connect_socket): Simplify code for creating the
+ egd socket address.
+ (rndegd_connect_socket): Call log_fatal use instead of
+ g10_log_fatal.
+ (egd_gather_random): Renamed to ...
+ (rndegd_gather_random): ... here.
+
+2003-04-08 Moritz Schulte <moritz@g10code.com>
+
+ * rndlinux.c: Do not include "dynload.h".
+ * rndunix.c: Likewise.
+ * rndw32.c: Likewise.
+
+ * rndegd.c (rndegd_connect_socket): Factored out from ...
+ (egd_gather_random): here; call it.
+ (egd_socket): New variable.
+ (egd_gather_random): Initialize fd with egd_socket, do not declare
+ fd static.
+ (do_read): Merged few changes from GnuPG. FIXME - not finished?
+ Do not include "dynload.h".
+
+ * rndw32.c (gather_random): Renamed to rndw32_gather_random, do
+ not declare static.
+ (gather_random_fast): Renamed to rndw32_gather_random_fast, do not
+ declare static.
+
+ * rndunix.c (gather_random): Renamed to rndunix_gather_random, do
+ not declare static.
+ * rndegd.c (gather_random): Renamed to rndegd_gather_random, do
+ not declare static.
+ * rndlinux.c (gather_random): Renamed to rndlinux_gather_random,
+ do not declare static.
+
+2003-04-07 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (libcipher_la_SOURCES): Removed construct.c.
+ (libcipher_la_SOURCES): Added sha1.c, sha256.c, rmd160.c, md4.c,
+ md5.c, tiger.c and crc.c
+ (EXTRA_PROGRAMS): Removed sha1, sha256, rmd160, md4, md5, tiger
+ and crc. Removed definitions: EXTRA_md4_SOURCES,
+ EXTRA_md5_SOURCES, EXTRA_rmd160_SOURCES, EXTRA_sha1_SOURCES,
+ EXTRA_sha256_SOURCES, EXTRA_tiger_SOURCES and EXTRA_crc_SOURCES,
+ BUILT_SOURCES, DISTCLEANFILES.
+
+ * pubkey.c: Do not include "elgamal.h", "dsa.h" and "rsa.h".
+
+ * Makefile.am (libcipher_la_SOURCES): Removed rsa.h, elgamal.h,
+ dsa.h, des.h, cast5.h, arcfour.h and blowfish.h.
+
+ * rsa.h: Removed file.
+ * elgamal.h: Removed file.
+ * dsa.h: Removed file.
+ * des.h: Removed file.
+ * cast5.h: Removed file.
+ * arcfour.h: Removed file.
+ * blowfish.h: Removed file.
+
+ * Makefile.am (libcipher_la_SOURCES): Removed dynload.c and
+ dynload.h.
+
+ * rsa.c (pubkey_spec_rsa): New variable.
+ * dsa.c (pubkey_spec_rsa): New variable.
+ * elgamal.c (pubkey_spec_elg): New variable.
+
+ * rsa.c (_gcry_rsa_get_info): Removed function.
+ * elgamal.c (_gcry_elg_get_info): Removed function.
+ * dsa.c (_gcry_dsa_get_info): Removed function.
+
+ * tiger.c (tiger_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_tiger_constructor): Removed function.
+
+ * sha1.c (sha1_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_sha1_constructor): Removed function.
+
+ * sha256.c (sha256_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_sha256_constructor): Removed function.
+
+ * rmd160.c (rmd160_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rmd160_constructor): Removed function.
+
+ * md5.c (md5_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_md5_constructor): Removed function.
+
+ * md4.c (md4_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_md4_constructor): Removed function.
+
+ * crc.c (crc_get_info): Removed function.
+
+ * arcfour.c (do_arcfour_setkey): Changed type of context argument
+ to `void *', added local variable for cast, adjusted callers.
+ (arcfour_setkey): Likewise.
+ (encrypt_stream): Likewise.
+ * cast5.c (cast_setkey): Likewise.
+ (encrypt_block): Likewise.
+ * rijndael.c (rijndael_setkey): Likewise.
+ (rijndael_encrypt): Likewise.
+ (rijndael_decrypt): Likewise.
+ * twofish.c (twofish_setkey): Likewise.
+ (twofish_encrypt): Likewise.
+ (twofish_decrypt): Likewise.
+ * des.c (do_des_setkey): Likewise.
+ (do_des_encrypt): Likewise.
+ (do_des_encrypt): Likewise.
+ (do_tripledes_encrypt): Likewise.
+ (do_tripledes_encrypt): Likewise.
+ * blowfish.c (bf_setkey: Likewise.
+ (encrypt_block): Likewise.
+ (decrypt_block): Likewise.
+
+ * arcfour.c (encrypt_stream): Likewise.
+
+ * rijndael.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func) Removed function.
+
+ * twofish.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func) Removed function.
+
+ * cast5.c (CIPHER_ALGO_CAST5): Removed.
+
+ * blowfish.c (FNCCAST_SETKEY, FNCCAST_CRYPT): Removed macros.
+ (CIPHER_ALGO_BLOWFISH): Removed symbol.
+ * cast5.c (FNCCAST_SETKEY, FNCCAST_CRYPT): Likewise.
+ * des.c (selftest_failed): Removed.
+ (initialized): New variable.
+ (do_des_setkey): Run selftest, if not yet done.
+ (FNCCAST_SETKEY, FNCCAST_CRYPT): Removed macros.
+
+ * arcfour.c (_gcry_arcfour_get_info): Removed function.
+ * blowfish.c (_gcry_blowfish_get_info): Removed function.
+ * cast5.c (_gcry_cast5_get_info): Removed function.
+ * des.c (_gcry_des_get_info): Removed function.
+ * rijndael.c (_gcry_rijndael_get_info): Removed function.
+ * twofish.c (_gcry_twofish_get_info): Removed function.
+
+ * arcfour.c (cipher_spec_arcfour): New variable.
+ * twofish.c (cipher_spec_twofish, cipher_spec_twofish128): New
+ variables.
+ * rijndael.c (cipher_spec_aes, cipher_spec_aes192,
+ cipher_spec256): New variables.
+ * des.c (cipher_spec_des, cipher_spec_tripledes): New variables.
+ * cast5.c (cipher_spec_cast5): New variable.
+ * blowfish.c (cipher_spec_blowfish): Likewise.
+
+ * twofish.c: Do not include "dynload.h".
+ * rijndael.c: Likewise.
+ * des.c: Likewise.
+ * cast5.c: Likewise.
+ * blowfish.c: Likewise.
+ * cipher.c: Likewise.
+ * crc.c: Likewise.
+ * md4.c: Likewise.
+ * md5.c: Likewise.
+ * md.c: Likewise.
+ * pubkey.c: Likewise.
+ * rijndael.c: Likewise.
+ * sha1.c: Likewise.
+ * sha256.c: Likewise.
+
+ * arcfour.c: Include "cipher.h".
+ * twofish.c: Likewise.
+ * rijndael.c: Likewise.
+ * des.c: Likewise.
+ * cast5.c: Likewise.
+ * blowfish.c: Likewise.
+
+ * twofish.c (twofish_setkey): Declared argument `key' const.
+ (twofish_encrypt): Declared argument `inbuf' const.
+ (twofish_decrypt): Likewise.
+
+ * rijndael.c (rijndael_setkey): Declared argument `key' const.
+ (rijndael_encrypt): Declared argument `inbuf' const.
+ (rijndael_decrypt): Likewise.
+
+ * des.c (do_des_setkey): Declared argument `key' const.
+ (do_tripledes_setkey): Likewise.
+ (do_des_encrypt): Declared argument `inbuf' const.
+ (do_des_decrypt): Likewise.
+ (do_tripledes_encrypt): Likewise.
+ (do_tripledes_decrypt): Likewise.
+
+ * cast5.c (encrypt_block): Declared argument `inbuf' const.
+ (decrypt_block): Likewise.
+ (cast_setkey): Declared argument `key' const.
+
+ * blowfish.c (do_bf_setkey): Declared argument `key' const.
+ (encrypt_block): Declared argument `inbuf' const.
+ (encrypt_block): Likewise.
+
+
+
+ * cipher.c: Remove CIPHER_ALGO_DUMMY related code.
+ Removed struct cipher_table_s.
+ Changed definition of cipher_table.
+ Removed definition of disabled_algos.
+ (ciphers_registered, default_ciphers_registered): New variables.
+ (REGISTER_DEFAULT_CIPHERS): New macro.
+ (dummy_setkey): Declared argument `key' const.
+ (dummy_encrypt_block): Declared argument `inbuf' const.
+ (dummy_encrypt_block): Likewise.
+ (dummy_encrypt_stream): Likewise.
+ (dummy_encrypt_stream): Likewise.
+ (dummy_setkey): Use `unsigned char' instead of `byte'.
+ (dummy_encrypt_block): Likewise.
+ (dummy_decrypt_block): Likewise.
+ (dummy_encrypt_stream): Likewise.
+ (dummy_decrypt_stream): Likewise.
+ (gcry_cipher_register_default): New function.
+ (gcry_cipher_lookup_func_id): New function.
+ (gcry_cipher_lookup_func_name): New function.
+ (gcry_cipher_lookup_id): New function.
+ (gcry_cipher_lookup_name): New function.
+ (gcry_cipher_id_new): New function.
+ (gcry_cipher_register): New function.
+ (gcry_cipher_unregister): New function.
+ (setup_cipher_table): Removed function.
+ (load_cipher_modules): Removed function.
+ (gcry_cipher_map_name): Adjusted to use new module management.
+ (cipher_algo_to_string): Likewise.
+ (disable_cipher_algo): Likewise.
+ (check_cipher_algo): Likewise.
+ (cipher_get_keylen): Likewise.
+ (cipher_get_blocksize): Likewise.
+ (gcry_cipher_open): Likewise.
+ (struct gcry_cipher_handle): Replaced members algo, algo_index,
+ blocksize, setkey, encrypt, decrypt, stencrypt, stdecrypt with one
+ member: cipher.
+ (gcry_cipher_open): Adjusted code for new handle structure.
+ (cipher_setkey): Likewise.
+ (cipher_setiv): Likewise.
+ (cipher_reset): Likewise.
+ (do_ecb_encrypt): Likewise.
+ (do_ecb_decrypt): Likewise.
+ (do_cbc_encrypt): Likewise.
+ (do_cbc_decrypt): Likewise.
+ (do_cfb_encrypt): Likewise.
+ (do_cfb_decrypt): Likewise.
+ (do_ctr_encrypt): Likewise.
+ (cipher_encrypt): Likewise.
+ (gcry_cipher_encrypt): Likewise.
+ (cipher_decrypt): Likewise.
+ (gcry_cipher_decrypt): Likewise.
+ (cipher_sync): Likewise.
+ (gcry_cipher_ctl): Likewise.
+
+ * pubkey.c: Removed struct pubkey_table_s.
+ Changed definition of pubkey_table.
+ Removed definition of disabled_algos.
+ (pubkeys_registered, default_pubkeys_registered): New variables.
+ (REGISTER_DEFAULT_PUBKEYS): New macro.
+ (setup_pubkey_table): Removed function.
+ (load_pubkey_modules): Removed function.
+ (gcry_pubkey_register_default): New function.
+ (gcry_pubkey_lookup_func_id): New function.
+ (gcry_pubkey_lookup_func_name): New function.
+ (gcry_pubkey_lookup_id): New function.
+ (gcry_pubkey_lookup_name): New function.
+ (gcry_pubkey_id_new): New function.
+ (gcry_pubkey_register): New function.
+ (gcry_pubkey_unregister): New function.
+ (gcry_pk_map_name): Adjusted to use new module management.
+ (gcry_pk_algo_name): Likewise.
+ (disable_pubkey_algo): Likewise.
+ (check_pubkey_algo): Likewise.
+ (pubkey_get_npkey): Likewise.
+ (pubkey_get_nskey): Likewise.
+ (pubkey_get_nsig): Likewise.
+ (pubkey_get_nenc): Likewise.
+ (pubkey_generate): Likewise.
+ (pubkey_check_secret_key): Likewise.
+ (pubkey_encrypt): Likewise.
+ (pubkey_decrypt): Likewise.
+ (pubkey_sign): Likewise.
+ (pubkey_verify): Likewise.
+ (gcry_pk_get_nbits): Likewise.
+ (gcry_pk_algo_info): Likewise.
+
+ * md.c: Removed struct md_digest_list_s.
+ (digest_list): Changed definition.
+ (digests_registered, default_digests_registered): New variables.
+ (REGISTER_DEFAULT_DIGESTS): New macro.
+ (new_list_item): Removed function.
+ (setup_md_table): Removed function.
+ (load_digest_module): Removed function.
+ (gcry_digest_register_default): New function.
+ (gcry_digest_lookup_func_id): New function.
+ (gcry_digest_lookup_func_name): New function.
+ (gcry_digest_lookup_id): New function.
+ (gcry_digest_lookup_name): New function.
+ (gcry_digest_id_new): New function.
+ (gcry_digest_register): New function.
+ (gcry_digest_unregister): New function.
+ (GcryDigestEntry): New type.
+ (struct gcry_md_context): Adjusted type of `list'.
+ (gcry_md_map_name): Adjusted to use new module management.
+ (digest_algo_to_string): Likewise.
+ (check_digest_algo): Likewise.
+ (md_enable): Likewise.
+ (md_digest_length): Likewise.
+ (md_asn_oid): Likewise.
+
+2003-04-07 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c: Replaced PUBKEY_ALGO_DSA with GCRY_PK_DSA,
+ PUBKEY_ALGO_RSA with GCRY_PK_RSA and PUBKEY_ALGO_ELGAMAL with
+ GCRY_PK_ELG.
+
+ * dsa.c: Replaced PUBKEY_ALGO_DSA with GCRY_PK_DSA.
+
+2003-04-01 Moritz Schulte <moritz@g10code.com>
+
+ * des.c: Removed checks for GCRY_CIPHER_3DES and GCRY_CIPHER_DES.
+
+2003-03-31 Moritz Schulte <moritz@g10code.com>
+
+ * tiger.c (tiger_get_info): Do not declare static.
+ * sha256.c (sha256_get_info): Likewise.
+ * sha1.c (sha1_get_info): Likewise.
+ * rmd160.c (rmd160_get_info): Likewise.
+ * md5.c (md5_get_info): Likewise.
+ * md4.c (md4_get_info): Likewise.
+ * crc.c (crc_get_info): Likewise.
+
+ * md.c (load_digest_module): Call setup_md_table during
+ initialization.
+ (new_list_item): Link new element into digest_list.
+
+ * cipher.c (do_ctr_decrypt): Made do_ctr_encrypt act as a wrapper
+ for do_ctr_encrypt, since these functions are identical.
+
+2003-03-30 Simon Josefsson <jas@extundo.com>
+
+ * cipher.c (struct gcry_cipher_handle): Add counter field.
+ (gcry_cipher_open): Add CTR.
+ (cipher_reset): Clear counter field.
+ (do_ctr_encrypt, do_ctr_decrypt): New functions.
+ (cipher_encrypt, cipher_decrypt): Call CTR functions.
+ (gcry_cipher_ctl): Add SET_CTR to set counter.
+
+2003-03-30 Moritz Schulte <moritz@g10code.com>
+
+ * rsa.c (_gcry_rsa_blind): New function.
+ (_gcry_rsa_unblind): New function.
+ (_gcry_rsa_decrypt): Use _gcry_rsa_blind and _gcry_rsa_decrypt.
+
+2003-03-26 Moritz Schulte <moritz@g10code.com>
+
+ * dynload.c (_gcry_enum_gnupgext_pubkeys): Adjust `encrypt' and
+ `decrypt' function arguments.
+ (_gcry_enum_gnupgext_pubkeys): Likewise.
+ * dynload.h: Likewise.
+
+ * pubkey.c (dummy_decrypt): Add argument: int flags.
+ (dummy_encrypt): Likewise.
+
+ * elgamal.c (_gcry_elg_encrypt): Add argument: int flags.
+ (_gcry_elg_decrypt): Likewise.
+
+ * rsa.c (_gcry_rsa_encrypt): Add argument: int flags.
+ (_gcry_rsa_decrypt): Likewise.
+
+ * pubkey.c: Add `flags' argument to members `encrypt' and
+ `decrypt' of struct `pubkey_table_s'.
+
+ * rsa.h: Add `flags' argument to function declarations.
+ * elgamal.h: Likewise.
+
+ * pubkey.c (sexp_data_to_mpi): New variable: int parsed_flags.
+ (sexp_data_to_mpi): Set `parsed_flags'.
+ (sexp_data_to_mpi): New argument: int *flags.
+ (gcry_pk_encrypt): New variable: int flags.
+ (gcry_pk_encrypt): Pass `flags' to pubkey_encrypt.
+ (pubkey_encrypt): New variable: int flags.
+ (pubkey_encrypt): Pass `flags' to pubkey encrypt function.
+ (pubkey_decrypt): Likewise.
+ (pubkey_decrypt): Pass `flags' to pubkey encrypt function.
+ (gcry_pk_encrypt): Include `flags' s-exp in return list.
+ (sexp_to_enc): New argument: int *flags.
+ (gcry_pk_decrypt): New variable: int flags.
+ (gcry_pk_decrypt): Pass `flags' to pubkey_decrypt.
+ (sexp_to_enc): New variable: int parsed_flags.
+ (sexp_to_enc): Set `parsed_flags'.
+
+2003-03-22 Simon Josefsson <jas@extundo.com>
+
+ * cipher.c (gcry_cipher_open, do_cbc_encrypt)
+ (gcry_cipher_encrypt): Support GCRY_CIPHER_CBC_MAC.
+ (gcry_cipher_ctl): Support GCRYCTL_SET_CBC_MAC.
+
+2003-03-19 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): New args EXTRA_CHECK and EXTRA_CHECK_ARG
+ to allow for a user callback. Changed all callers.
+ (_gcry_generate_secret_prime)
+ (_gcry_generate_public_prime): Ditto, pass them to gen_prime.
+ * rsa.c (check_exponent): New.
+ (generate): Use a callback to ensure that a given exponent is
+ actually generated.
+
+2003-03-12 Moritz Schulte <moritz@g10code.com>
+
+ * primegen.c: Initialize `no_of_small_prime_numbers' statically.
+ (gen_prime): Remove calculation of `no_of_small_prime_numbers'.
+
+2003-03-03 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (gcry_md_ctl): Rewritten to use same style like the other
+ functions dispatchers.
+
+2003-03-02 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (struct gcry_cipher_handle): New member: algo_index.
+ (gcry_cipher_open): Allocate memory for two cipher contexts.
+ Initialize algo_index.
+ (cipher_setkey): Duplicate context into reserved memory.
+ (cipher_reset): New function, which resets the context and clear
+ the IV.
+ (gcry_cipher_ctl): Call cipher_reset.
+
+2003-02-23 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c: Remove (bogus) `digitp' macro definition.
+ * md.c: Likewise.
+
+ * blowfish.c (burn_stack): Removed.
+ * arcfour.c (burn_stack): Likewise.
+ * cast5.c (burn_stack): Likewise.
+ * des.c (burn_stack): Likewise.
+ * md4.c (burn_stack): Likewise.
+ * md5.c (burn_stack): Likewise.
+ * random.c (burn_stack): Likewise.
+ * rijndael.c (burn_stack): Likewise.
+ * rmd160.c (burn_stack): Likewise.
+ * sha1.c (burn_stack): Likewise.
+ * sha256.c (burn_stack): Likewise.
+ * tiger.c (burn_stack): Likewise.
+ * twofish.c (burn_stack): Likewise.
+
+ * blowfish.c: Changed all occurences of burn_stack to
+ _gcry_burn_stack.
+ * arcfour.c: Likewise.
+ * cast5.c: Likewise.
+ * des.c: Likewise.
+ * md4.c: Likewise.
+ * md5.c: Likewise.
+ * random.c: Likewise.
+ * rijndael.c: Likewise.
+ * rmd160.c: Likewise.
+ * sha1.c: Likewise.
+ * sha256.c: Likewise.
+ * tiger.c: Likewise.
+ * twofish.c: Likewise.
+
+ * arcfour.c (_gcry_arcfour_get_info): Use GCRY_CIPHER_ARCFOUR
+ instead of hard-coded value `301'.
+
+2003-01-24 Werner Koch <wk@gnupg.org>
+
+ * random.c (_gcry_register_random_progress): New.
+ (_gcry_random_progress): New.
+
+ * rndlinux.c (gather_random): Call the random progress function.
+
+2003-01-23 Werner Koch <wk@gnupg.org>
+
+ * rsa.c (generate): New arg USE_E to request a specific public
+ exponent.
+ (_gcry_rsa_generate): Ditto.
+ * elgamal.c (_gcry_elg_generate): Must add an dummy argument
+ instead of USE_E.
+ * dsa.c (_gcry_dsa_generate): Ditto.
+ * pubkey.c (dummy_generate): Ditto.
+ (pubkey_generate): Add USE_E arg and pass it down.
+ (gcry_pk_genkey): Detect "rsa-use-e" parameter and pass it to generate.
+
+ * pubkey.c (sexp_to_enc): New arg RET_MODERN.
+ (gcry_pk_decrypt): Make use of it to return a real S-expression.
+ Return better error codes.
+ (gcry_pk_verify): Return better error codes.
+
+2003-01-21 Werner Koch <wk@gnupg.org>
+
+ * random.c (gcry_random_add_bytes): Add QUALITY argument, let
+ function return an error code and disable its core for now.
+
+2003-01-21 Timo Schulz <twoaday@freakmail.de>
+
+ * random.c (gcry_random_add_bytes): New. Function to add external
+ random to the pool.
+
+2003-01-20 Simon Josefsson <jas@extundo.com>
+
+ * crc.c: New.
+ * Makefile.am (EXTRA_PROGRAMS, EXTRA_crc_SOURCES): Add crc.c.
+ * md.c (gcry_md_get_algo_dlen): Add values for CRC.
+
+2003-01-20 Werner Koch <wk@gnupg.org>
+
+ * sha256.c: New.
+ * bithelp.h (ror): New.
+ * Makfile.am: Add sha256.c.
+ * md.c (oid_table): Add values for SHA256 et al.
+ (gcry_md_get_algo_dlen): Likewise
+
+2003-01-20 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_get_keygrip): Implemented keygrips for DSA
+ and ElGamal.
+
+2003-01-17 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_encrypt): Reworked so that the output will
+ never contain the plaintext even if the caller did not checked the
+ return value.
+
+ * md.c (gcry_md_get_algo): Changed error code to GCRYERR_GENERAL
+ because we don't have an invalid md algo but no algorithm enabled.
+
+ * pubkey.c (gcry_pk_genkey): Changed error code for bounds check
+ of table parameters to GCRYERR_INTERNAL.
+
+ * md.c (gcry_md_open): Partly reverted Timo's change from
+ 2002-10-10 by removing the check for the algorithm. An algorithm
+ of 0 is allowed and anyway we should not double check it or check
+ it using a different function. Also fixed the flags check.
+
+ * pubkey.c (gcry_pk_encrypt): Make sure that R_CIPH points to NULL
+ on error.
+ (gcry_pk_decrypt): Ditto for R_PLAIN.
+ (gcry_pk_sign): Ditto for R_SIG.
+ (gcry_pk_genkey): Ditto for R_KEY.
+
+2003-01-16 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_write): Changed 2nd argument type to void*.
+ (gcry_md_hash_buffer): Changed type of boths buffers to void*.
+ (gcry_md_setkey): Changed 2nd argument type to void*.
+
+2003-01-15 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (sexp_data_to_mpi): New. This handles pkcs1 padding.
+ (gcry_pk_sign, gcry_pk_verify): Use it here.
+ (gcry_pk_encrypt): And here.
+ (pubkey_verify): Add debug code.
+ (sexp_to_enc): Handle flags in the input and return the pkcs1 flag
+ in a new parameter.
+ (gcry_pk_decrypt): Prepare for future pkcs1 handling.
+
+2002-12-19 Werner Koch <wk@gnupg.org>
+
+ * random.c (_gcry_random_initialize): New.
+
+2002-12-16 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Added a Teletrust specific OID for 3DES.
+
+2002-12-12 Werner Koch <wk@gnupg.org>
+
+ * md.c: Added another oddball OIW OID (sha-1WithRSAEncryption).
+
+2002-11-23 Werner Koch <wk@gnupg.org>
+
+ * md.c (load_digest_module): Enlarged checked_algos bitmap.
+ * md4.c (func_table): Fixed entry for md4.
+ Both by Simon Josephson.
+ (transform): Copy data to get the alignment straight. Tested only
+ on i386.
+
+2002-11-10 Simon Josefsson <jas@extundo.com>
+
+ * cipher.c (gcry_cipher_open): Don't reject CTS flag.
+ (do_cbc_encrypt, do_cbc_decrypt, cipher_encrypt)
+ (gcry_cipher_encrypt, cipher_decrypt)
+ (gcry_cipher_decrypt): Support CTS flag.
+ (gcry_cipher_ctl): Toggle CTS flag.
+
+2002-11-10 Werner Koch <wk@gnupg.org>
+
+ * md4.c: New. By Simon Josefsson.
+ * Makefile.am (EXTRA_PROGRAMS): Add md4.c.
+ * md.c (oid_table,gcry_md_get_algo_dlen): MD4 support.
+
+2002-10-14 Werner Koch <wk@gnupg.org>
+
+ * arcfour.c (do_encrypt_stream): Don't use increment op when
+ assigning to the same variable.
+
+2002-10-10 Timo Schulz <ts@winpt.org>
+
+ * pubkey.c (gcry_pk_genkey): Check boundaries.
+
+ * md.c (gcry_md_open): Check that algo is available and only
+ valid flag values are used.
+ (gcry_md_get_algo): Add error handling.
+
+2002-09-26 Werner Koch <wk@gnupg.org>
+
+ * md.c: Include an OID for TIGER.
+ * tiger.c (tiger_get_info): Use a regular OID.
+
+2002-09-17 Werner Koch <wk@gnupg.org>
+
+ * random.c: Replaced mutex.h by the new ath.h. Changed all calls.
+
+2002-09-16 Werner Koch <wk@gnupg.org>
+
+ * arcfour.c (do_encrypt_stream): Use register modifier and modulo.
+ According to Nikos Mavroyanopoulos this increases perfromace on
+ i386 system noticable. And I always tought gcc is clever enough.
+ * md5.c (transform): Use register modifier.
+ * rmd160.c (transform): Ditto.
+ * sha1.c (transform): Ditto. We hope that there are 6 free registers.
+ * random.c (gcry_randomize): Rewrote to avoid malloc calls.
+
+ * rndlinux.c (gather_random): Replaced remaining fprintfs by log_*.
+ * arcfour.c (do_arcfour_setkey): Ditto.
+ * twofish.c (do_twofish_setkey): Ditto.
+ * rndegd.c (gather_random): Ditto.
+ * rijndael.c (do_setkey): Ditto.
+ * random.c (_gcry_random_dump_stats): Ditto.
+ * primegen.c (_gcry_generate_elg_prime): Ditto.
+ * des.c (_gcry_des_get_info): Ditto.
+ * cast5.c (do_cast_setkey): Ditto.
+ * blowfish.c (do_bf_setkey): Ditto.
+
+2002-08-26 Werner Koch <wk@gnupg.org>
+
+ * des.c (weak_keys): Fixed one entry in the table and compared
+ all entries against the literature.
+ (selftest): Checksum the weak key table.
+
+2002-08-21 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c: Enable keygrip calculation for "openpgp-rsa".
+
+2002-08-17 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (setup_cipher_table): Don't overwrite the DES entry
+ with the entry for DUMMY.
+
+2002-08-14 Werner Koch <wk@gnupg.org>
+
+ * des.c (do_des_setkey,do_des_encrypt, do_des_decrypt): New.
+ (_gcry_des_get_info): Support plain old DES.
+ * cipher.c (setup_cipher_table): Put DES into the table.
+
+2002-07-25 Werner Koch <wk@gnupg.org>
+
+ * rndunix.c (_gcry_rndunix_constructor): Prefixed with _gcry_.
+ Noted by Stephan Austermuehle.
+
+2002-07-08 Timo Schulz <ts@winpt.org>
+
+ * rndw32.c: Replaced the m_ memory functions with the real
+ gcry_ functions. Renamed all g10_ prefixed functions to log_.
+
+2002-06-12 Werner Koch <wk@gnupg.org>
+
+ * rsa.c (generate): Use e = 65537 for now.
+
+2002-06-11 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_get_keygrip): Allow a "protected-private-key".
+
+2002-06-05 Timo Schulz <ts@winpt.org>
+
+ * cipher.c (gcry_cipher_encrypt, gcry_cipher_decrypt):
+ Check that the input size is a multiple of the blocksize.
+
+2002-05-23 Werner Koch <wk@gnupg.org>
+
+ * md.c (oid_table): Add an rsadsi OID for MD5.
+
+2002-05-21 Werner Koch <wk@gnupg.org>
+
+ * primegen.c, elgamal.c, dsa.c (progress): Do not print anything
+ by default. Pass an extra identifying string to the callback and
+ reserved 2 argumenst for current and total counters. Changed the
+ register function prototype.
+
+2002-05-17 Werner Koch <wk@gnupg.org>
+
+ * rndegd.c (rndegd_constructor): Fixed name of register function
+ and prefixed the function name with _gcry_.
+ * rndw32.c (rndw32_constructor): Ditto.
+ * tiger.c (tiger_constructor): Ditto.
+
+ * Makefile.am: Removed all dynamic loading stuff.
+ * dynload.c: Ditto. Now only used for the constructor system.
+
+2002-05-15 Werner Koch <wk@gnupg.org>
+
+ * random.c (gcry_random_bytes,gcry_random_bytes_secure)
+ (gcry_randomize): Make sure we are initialized.
+
+2002-05-14 Werner Koch <wk@gnupg.org>
+
+ Changed license of most files to the LGPL.
+
+2002-05-02 Werner Koch <wk@gnupg.org>
+
+ * random.c (_gcry_fast_random_poll): Initialize the module so the
+ mutex can be used.
+
+ * primegen.c (small_prime_numbers): Moved table from smallprime.c
+ * smallprime.c: File removed.
+
+ * des.c (leftkey_swap, rightkey_swap, working_memcmp): Made static.
+
+ * cipher.c (gcry_cipher_map_name): Map "RIJNDAEL" to "AES".
+ * rijndael.c (rijndael_get_info): We do only support a 128 bit
+ blocksize so it makes sense to change the algorithm strings to
+ AES.
+
+ * tiger.c (tiger_final): Removed superfluous token pasting operators.
+ * md5.c (md5_final): Ditto.
+
+2002-04-30 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Fixed list of copyright years.
+
+2002-03-18 Werner Koch <wk@gnupg.org>
+
+ * random.c (initialize): Initialize the new pool lock mutex.
+ (_gcry_fast_random_poll): Add locking and moved main
+ code out to...
+ (do_fast_random_poll): new function.
+ (read_pool): Use the new function here.
+ (get_random_bytes): Add locking.
+ (_gcry_update_random_seed_file): Ditto.
+
+2002-03-11 Werner Koch <wk@gnupg.org>
+
+ * md.c: Add rsaSignatureWithripemd160 to OID table.
+
+2002-02-20 Werner Koch <wk@gnupg.org>
+
+ * sha1.c: Removed a left over comment note. The code has been
+ rewritten from scratch in 1998. Thanks to Niels Möller for
+ reporting this misleading comment.
+
+2002-02-18 Werner Koch <wk@gnupg.org>
+
+ * rndunix.c (rndunix_constructor): Use the the new prefixed
+ function name. Reported by Jordi Mallach.
+
+2002-02-10 Werner Koch <wk@gnupg.org>
+
+ * random.c (mix_pool): Carry an extra failsafe_digest buffer
+ around to make the function more robust.
+
+2002-02-08 Werner Koch <wk@gnupg.org>
+
+ * random.c (add_randomness): Xor new data into the pool and not
+ just copy it. This avoids any choosen input attacks which are not
+ serious in our setting because an outsider won't be able to mix
+ data in and even then we keep going with a PRNG. Thanks to Stefan
+ Keller for pointing this out.
+
+2002-01-04 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_genkey): Do not release skey - it is static.
+
+ * primegen.c (gen_prime): Of course we should use set_bit
+ and not set_highbit to set the second high bit.
+
+2001-12-18 Werner Koch <wk@gnupg.org>
+
+ * rsa.c (generate): Loop until we find the exact modulus size.
+ Changed the exponent to 41.
+ (rsa_get_info): s/usage/r_usage/ to avoid shadow warnings.
+ * primegen.c (gen_prime): Set 2 high order bits for secret primes.
+
+ * Makefile.am (DISTCLEANFILES): Include construct.c.
+
+2001-12-17 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_get_keygrip): New - experimental.
+
+2001-12-11 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Added OIDs for AES.
+ (gcry_cipher_mode_from_oid): New.
+ (gcry_cipher_map_name): Moved OID search code to ..
+ (search_oid): .. new function.
+
+2001-12-10 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_encrypt): Find the signature algorithm by name
+ and not by number.
+
+ * pubkey.c (gcry_pk_encrypt,gcry_pk_decrypt,gcry_pk_sign)
+ (gcry_pk_verify,gcry_pk_testkey, gcry_pk_genkey)
+ (gcry_pk_get_nbits): Release the arrays. Noted by Nikos
+ Mavroyanopoulos.
+
+2001-12-06 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_map_name): Look also for OIDs prefixed
+ with "oid." or "OID.".
+
+2001-12-05 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (algo_info_table): Fixed entry for openpgp-rsa.
+
+2001-11-24 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c: Added the rsaEncryption OID to the tables.
+ (sexp_to_key): Add an arg to return the index of the algorithm,
+ changed all callers.
+ (gcry_pk_sign): Find the signature algorithm by name and not by
+ number.
+ (gcry_pk_get_nbits): Fixed so that we can now really pass a secret
+ key to get the result.
+
+ * md.c (gcry_md_map_name): Look also for OIDs prefixed with "oid."
+ or "OID." so that an OID string can be used as an S-Exp token.
+
+2001-11-20 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_map_name): Lookup by OID if the the name begins
+ with a digit.
+ (oid_table): New.
+
+2001-11-16 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_info): New operator GCRYCTL_IS_ALGO_ENABLED.
+
+2001-11-07 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Close the handle which was left open
+ for algorithms other than rmd160.
+
+2001-08-08 Werner Koch <wk@gnupg.org>
+
+ * rndw32.c (gather_random): Use toolhelp in addition to the NT
+ gatherer for Windows2000. Suggested by Sami Tolvanen.
+
+ * random.c (read_pool): Fixed length check, this used to be one
+ byte to strict. Made an assert out of it because the caller has
+ already made sure that only poolsize bytes are requested.
+ Reported by Marcus Brinkmann.
+
+2001-08-03 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (cipher_encrypt, cipher_decrypt): Prepare to return
+ errors. We have to change the interface to all ciphers to make
+ this really work but we should do so to prepare for hardware
+ encryption modules.
+ (gcry_cipher_encrypt, gcry_cipher_decrypt): Return the error and
+ set lasterr.
+ (gcry_cipher_ctl): Make sure that errors from setkey are returned.
+
+2001-08-02 Werner Koch <wk@gnupg.org>
+
+ * rndlinux.c (gather_random): casted a size_t arg to int so that
+ the format string is correct. Casting is okay here and avoids
+ translation changes.
+
+ * random.c (fast_random_poll): Do not check the return code of
+ getrusage.
+
+ * rndunix.c: Add a signal.h header to avoid warnings on Solaris 7
+ and 8.
+
+ * tiger.c (print_abc,print_data): Removed.
+
+ * rijndael.c, des.c, blowfish.c, twofish.c, cast5.c, arcfour.c
+ (burn_stack): New. Add wrappers for most functions to be able to
+ call burn_stack after the function invocation. This methods seems
+ to be the most portable way to zeroise the stack used. It does
+ only work on stack frame based machines but it is highly portable
+ and has no side effects. Just setting the automatic variables at
+ the end of a function to zero does not work well because the
+ compiler will optimize them away - marking them as volatile would
+ be bad for performance.
+ * md5.c, sha1.c, rmd160.c, tiger.c (burn_stack): Likewise.
+ * random.c (burn_stack): New.
+ (mix_pool): Use it here to burn the stack of the mixblock function.
+
+ * primegen.c (_gcry_generate_elg_prime): Freed q at 3 places.
+ Thanks to Tommi Komulainen.
+
+ * arcfour.c (arcfour_setkey): Check the minimim keylength against
+ bytes and not bits.
+ (selftest): Must reset the key before decryption.
+
+2001-05-31 Werner Koch <wk@gnupg.org>
+
+ * sha1.c (sha1_init): Made static.
+
+ Changed all g10_ prefixed function names as well as some mpi_
+ function names to cope with the introduced naming changes.
+
+ * md.c (prepare_macpads): Made key const.
+
+2001-05-28 Werner Koch <wk@gnupg.org>
+
+ * rndegd.c (gather_random): Removed the use of tty_printf.
+
+2001-03-29 Werner Koch <wk@gnupg.org>
+
+ * md5.c (md5_final): Fixed calculation of hashed length. Thanks
+ to disastry@saiknes.lv for pointing out that it was horrible wrong
+ for more than 512MB of input.
+ * sha1.c (sha1_final): Ditto.
+ * rmd160.c (rmd160_final): Ditto.
+ * tiger.c (tiger_final): Ditto.
+
+ * blowfish.c (encrypt,do_encrypt): Changed name to do_encrypt to
+ avoid name clashes with an encrypt function in stdlib.h of
+ Dynix/PIX. Thanks to Gene Carter.
+ * elgamal.c (encrypt,do_encrypt): Ditto.
+
+ * twofish.c (gnupgext_enum_func): Use only when when compiled as a
+ module.
+ * rijndael.c (gnupgext_enum_func): Ditto.
+
+ * tiger.c (tiger_get_info): Return "TIGER192" and not just
+ "TIGER". By Edwin Woudt.
+
+ * random.c: Always include time.h - standard requirement. Thanks
+ to James Troup.
+
+ * rndw32.c: Fixes to the macros.
+
+2001-01-11 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (cipher_encrypt,gcry_cipher_encrypt): Use blocksize and
+ not 8.
+
+2000-12-19 Werner Koch <wk@gnupg.org>
+
+ Major change:
+ Removed all GnuPG stuff and renamed this piece of software
+ to gcrypt.
+
+2000-11-14 Werner Koch <wk@gnupg.org>
+
+ * dsa.c (test_keys): Replaced mpi_alloc by gcry_mpi_new and
+ mpi_free by gcry_mpi_release.
+ * elgamal.c (test_keys,generate): Ditto, also for mpi_alloc_secure.
+ * rsa.c (test_keys,generate,rsa_verify): Ditto.
+ * primegen.c (generate_elg_prime): Ditto.
+ (gen_prime): Ditto and removed nlimbs.
+
+ * rsa.c (generate): Allocate 2 more vars in secure memory.
+
+ * Makefile.am (OMIT_DEPENDENCIES): Hack to work around dependency
+ problems.
+
+2000-10-09 Werner Koch <wk@gnupg.org>
+
+ * arcfour.c, arcfour.h: New.
+ * cipher.c (cipher_encrypt, cipher_decrypt): Add stream mode.
+ (setup_cipher_table): Add Arcfour.
+ (gcry_cipher_open): Kludge to allow stream mode.
+
+Wed Oct 4 13:16:18 CEST 2000 Werner Koch <wk@openit.de>
+
+ * sha1.c (transform): Use rol() macro. Actually this is not needed
+ for a newer gcc but there are still aoter compilers.
+
+ * rsa.c (test_keys): Use new random function.
+
+ * md.c (gcry_md_setkey): New function to overcome problems with
+ const conflics.
+ (gcry_md_ctl): Pass set key to the new functions.
+
+ * rijndael.c: New.
+ * cipher.c: Add Rijndael support.
+
+Mon Sep 18 16:35:45 CEST 2000 Werner Koch <wk@openit.de>
+
+ * rndlinux.c (open_device): Loose random device checking.
+ By Nils Ellmenreich.
+
+ * random.c (fast_random_poll): Check ENOSYS for getrusage.
+ * rndunix.c: Add 2 sources for QNX. By Sam Roberts.
+
+ * pubkey.c (gcry_pk_algo_info): Add GCRYCTL_GET_ALGO_USAGE.
+
+ * rsa.c: Changed the comment about the patent.
+ (secret): Speed up by using the CRT. For a 2k keys this
+ is about 3 times faster.
+ (stronger_key_check): New but unused code to check the secret key.
+ * Makefile.am: Included rsa.[ch].
+ * pubkey.c: Enabled RSA support.
+ (pubkey_get_npkey): Removed RSA workaround.
+
+Mon Jul 31 10:04:47 CEST 2000 Werner Koch <wk@openit.de>
+
+ * pubkey.c: Replaced all gcry_sexp_{car,cdr}_{data,mpi} by the new
+ gcry_sexp_nth_{data,mpi} functions.
+
+Tue Jul 25 17:44:15 CEST 2000 Werner Koch <wk@openit.de>
+
+ * pubkey.c (exp_to_key,sexp_to_sig,sexp_to_enc,gcry_pk_encrypt,
+ gcry_pk_decrypt,gcry_pk_sign,gcry_pk_genkey): Changed to work with
+ the new S-Exp interface.
+
+Mon Jul 17 16:35:47 CEST 2000 Werner Koch <wk@>
+
+ * random.c (gather_faked): Replaced make_timestamp by time(2) again.
+
+Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@>
+
+ * md.c (gcry_md_ctl): Support GCRYCTL_{START,STOP}_DUMP.
+
+ * Makefile.am: Never compile mingw32 as module.
+
+ * Makefile.am: Tweaked module build and removed libtool
+
+ * Makefile.am: Replaced -O1 by -O. Suggested by Alec Habig.
+
+ * elgamal.c (sign): Removed inactive code.
+
+ * rsa.c, rsa.h: New based on the old module version (only in CVS for now).
+ * pubkey.c (setup_pubkey_table): Added commented support for RSA.
+
+ * rndunix.c (waitpid): New. For UTS 2.1. All by Dave Dykstra.
+ (my_popen): Do the FD_CLOEXEC only if it is available
+ (start_gatherer): Cope with missing _SC_OPEN_MAX
+
+ * rndunix.c: Add some more headers for QNX. By Sam Roberts.
+
+ * rndegd.c (gather_random): Shortcut level 0.
+ * rndunix.c (gather_random): Ditto.
+ * rndw32.c (gather_random): Ditto.
+
+ * rndw32.c: Replaced with code from Cryptlib and commented the old stuff.
+ * rndw32.c: Add some debuging code enabled by an environment variable.
+
+ * random.c (read_seed_file): Binary open for DOSish system
+ (update_random_seed_file): Ditto.
+ * random.c [MINGW32]: Include process.h for getpid.
+ * random.c (fast_random_poll): Add clock_gettime() as fallback for
+ system which support this POSIX.4 fucntion. By Sam Roberts.
+
+ * random.c (read_seed_file): Removed the S_ISLNK test becuase it
+ is already covered by !S_ISREG and is not defined in Unixware.
+ Reported by Dave Dykstra.
+ (update_random_seed_file): Silently ignore update request when pool
+ is not filled.
+
+ * random.c (read_seed_file): New.
+ (set_random_seed_file): New.
+ (read_pool): Try to read the seeding file.
+ (update_random_seed_file): New.
+
+ (read_pool): Do an initial extra seeding when level 2 quality random
+ is requested the first time. This requestes at least POOLSIZE/2 bytes
+ of entropy. Compined with the seeding file this should make normal
+ random bytes cheaper and increase the quality of the random bytes
+ used for key generation.
+
+ * random.c (read_pool): Print a more friendly error message in
+ cases when too much random is requested in one call.
+
+ * random.c (fast_random_poll): Check whether RUSAGE_SELF is defined;
+ this is not the case for some ESIX and Unixware, although they have
+ getrusage().
+
+ * primegen.c (generate_elg_prime): All primes are now generated with
+ the lowest random quality level. Because they are public anyway we
+ don't need stronger random and by this we do not drain the systems
+ entropy so much.
+
+ * primegen.c (register_primegen_progress): New.
+ * dsa.c (register_pk_dsa_progress): New.
+ * elgamal.c (register_pk_elg_progress): New.
+
+ * elgamal.c (wiener_map): New.
+ (gen_k): Use a much smaller k.
+ (generate): Calculate the qbits using the wiener map and
+ choose an x at a size comparable to the one choosen in gen_k
+
+ * rmd160.c (rmd160_get_info): Moved casting to the left side due to a
+ problem with UTS4.3. Suggested by Dave Dykstra.
+ * sha1.c (sha1_get_info): Ditto.
+ * tiger.c (tiger_get_info): Ditto.
+ * md5.c (md5_get_info): Ditto
+ * des.c (des_get_info): Ditto.
+ * blowfish.c (blowfish_get_info): Ditto.
+ * cast5.c (cast5_get_info): Ditto.
+ * twofish.c (twofish_get_info): Ditto.
+
+Fri Mar 24 11:25:45 CET 2000 Werner Koch <wk@openit.de>
+
+ * md.c (md_open): Add hmac arg and allocate space for the pads.
+ (md_finalize): Add HMAC support.
+ (md_copy): Ditto.
+ (md_close): Ditto.
+ (gcry_md_reset): Ditto.
+ (gcry_md_ctl): Ditto.
+ (prepare_macpdas): New.
+
+Mon Mar 13 19:22:46 CET 2000 Werner Koch <wk@openit.de>
+
+ * md.c (gcry_md_hash_buffer): Add support for the other algorithms.
+
+Mon Jan 31 16:37:34 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * genprime.c (generate_elg_prime): Fixed returned factors which never
+ worked for non-DSA keys.
+
+Thu Jan 27 18:00:44 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (sexp_to_key): Fixed mem leaks in case of errors.
+
+Mon Jan 24 22:24:38 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (gcry_pk_decrypt): Implemented.
+ (gcry_pk_encrypt): Implemented.
+ (gcry_pk_testkey): New.
+ (gcry_pk_genkey): New.
+ (pubkey_decrypt): Made static.
+ (pubkey_encrypt): Ditto.
+ (pubkey_check_secret_key): Ditto.
+ (pubkey_generate): Ditto.
+
+Mon Jan 24 13:04:28 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (pubkey_nbits): Removed and replaced by ...
+ (gcry_pk_get_nbits): this new one.
+
+Wed Dec 8 21:58:32 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * dsa.c: s/mpi_powm/gcry_mpi_powm/g
+ * elgamal.c: Ditto.
+ * primegen.c: Ditto.
+
+ * : Replaced g10_opt_verbose by g10_log_verbosity().
+
+ * Makefile.am (INCLUDES): removed intl, add ../gcrypt
+
+Fri Nov 19 17:15:20 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * dynload.c (cmp_filenames): New to replaced compare_filename() in
+ module.
+ (register_cipher_extension): Removed the tilde expansion stuff.
+ * rndeg.c (my_make_filename): New.
+
+ * : Replaced header util.h by g10lib.h
+
+ * random.c (gather_faked): Replaced make_timestamp by time(2).
+ Disabled wrning printed with tty_printf.
+ * rndlinux.c (gather_random): Always use fprintf instead of tty_xxx;
+ this should be replaced by a callback function.
+
+ * primegen.c (gen_prime): Use gcry_mpi_randomize.
+ (is_prime): Ditto.
+ * elgamal.c (test_keys): Ditto.
+ * dsa.c (test_keys): Ditto.
+
+ * cipher.c (gcry_cipher_close): Die on invalid handle.
+
+Mon Nov 15 21:36:02 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * elgamal.c (gen_k): Use the new random API.
+ (generate): Ditto.
+ * dsa.c (gen_k): Ditto.
+ (generate): Ditto.
+
+Sat Nov 13 17:44:23 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (disable_pubkey_algo): Made static.
+ (gcry_pk_ctl): New.
+
+ * random.c (get_random_bits): Renamed to ...
+ (get_random_bytes): ... this and made static.
+ (gcry_random_bytes): New.
+ (gcry_random_bytes_secure): New.
+ (randomize_buffer): Renamed to ...
+ (gcry_randomize): ...this.
+
+ * md.c (gcry_md_hash_buffer): New.
+
+ * pubkey.c (gcry_pk_algo_info): 4 new commands.
+ (pubkey_get_npkey): Made static.
+ (pubkey_get_nskey): Made static.
+ (pubkey_get_nsig): Made static.
+ (pubkey_get_nenc): Made static.
+
+ * pubkey.c: Removed all G10ERR_xxx.
+ * cipher.c: Changed all GCRYERR_INV_ALGO to GCRYERR_INV_CIPHER_ALGO.
+ * md.c: Changed all GCRYERR_INV_ALGO to GCRYERR_INV_MD_ALGO.
+ * cast5.c (cast_setkey): Changed errocodes to GCRYERR_xxx.
+ * blowfish.c: Ditto.
+ * des.c: Ditto.
+ * twofish.c: Ditto.
+ * dsa.c: Ditto.
+ * elgamal.c: Ditto.
+
+ * g10c.c: Removed
+
+ * cipher.c (gcry_cipher_open): Replaced alloc functions and return NULL
+ if we are out of core.
+ * dynload.c: Replaced all memory allocation functions.
+ * md.c: Ditto.
+ * primegen.c: Ditto.
+ * pubkey.c: Ditto.
+ * random.c: Ditto.
+ * rndw32.c: Ditto.
+ * elgamal.c: Ditto.
+ * dsa.c: Ditto.
+
+Tue Oct 26 14:10:21 CEST 1999 Werner Koch <wk@gnupg.de>
+
+ * elgamal.c (sign): Hugh found strange code here. Replaced by BUG().
+
+ * cipher.c: Merged with gcrypt/symapi.c.
+
+ * pubkey.c (string_to_pubkey_algo): Renamed function to ...
+ (gcry_pk_map_name): ... this.
+ (pubkey_algo_to_string): Renamed function to ...
+ (gcry_pk_algo_name): ... this.
+ (gcry_pk_algo_info): New.
+ * pubkey.c: Merged with gcrypt/pkapi.c.
+
+ * md.c (md_reset): Clear finalized; thanks to Ulf Moeller for
+ fixing this bug.
+
+ * md.c: Merged with gcrypt/mdapi.c
+
+Wed Sep 15 14:39:59 CEST 1999 Michael Roth <mroth@nessie.de>
+
+ * des.c: Various speed improvements: One bit pre rotation
+ trick after initial permutation (Richard Outerbridge).
+ Finished test of SSLeay Tripple-DES patterns.
+
+Wed Sep 15 16:22:17 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndw32.c: New.
+
+Mon Sep 13 10:51:29 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * bithelp.h: New.
+ * rmd160.h, sha1.h, md5.h: Use the rol macro from bithelp.h
+
+Tue Sep 7 16:23:36 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * Makefile.am: Fixed seds for latest egcc. By Ollivier Robert.
+
+Mon Sep 6 19:59:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * des.c (selftest): Add some testpattern
+
+Mon Aug 30 20:38:33 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (do_cbc_encrypt): Fixed serious bug occuring when not using
+ in place encryption. Pointed out by Frank Stajano.
+
+Mon Jul 26 09:34:46 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md5.c (md5_final): Fix for a SCO cpp bug.
+
+Thu Jul 15 10:15:35 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * elgamal.c (elg_check_secret_key,elg_encrypt
+ elg_decrypt,elg_sign,elg_verify): Sanity check on the args.
+ * dsa.c (dsa_check_secret_key,dsa_sign,dsa_verify): Ditto.
+
+ * pubkey.c (disable_pubkey_algo): New.
+ (check_pubkey_algo2): Look at disabled algo table.
+ * cipher.c (disable_cipher_algo): New.
+ (check_cipher_algo): Look at disabled algo table.
+
+Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * Makefile.am: Support for libtool.
+
+Fri Jul 2 11:45:54 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dsa.c (gen_k): Changed algorithm to consume less random bytes
+ * elgamal.c (gen_k): Ditto.
+
+ * random.c (random_dump_stats): New.
+
+Thu Jul 1 12:47:31 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * primegen.c, elgamal.c, dsa.c (progess): New and replaced all
+ fputc with a call to this function.
+
+Sat Jun 26 12:15:59 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndegd.c (do_write): s/ssize_t/int/ due to SunOS 4.1 probs.
+
+ * cipher.c (do_cbc_encrypt, do_cbc_decrypt): New.
+
+ * dynload.c (HAVE_DL_SHL_LOAD): Map hpux API to dlopen (Dave Dykstra).
+ * Makefile.am (install-exec-hook): Removed.
+
+Sun May 23 14:20:22 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (setup_cipher_table): Enable Twofish
+
+ * random.c (fast_random_poll): Disable use of times() for mingw32.
+
+Mon May 17 21:54:43 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (register_internal_cipher_extension): Minor init fix.
+
+Tue May 4 15:47:53 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * primegen.c (gen_prime): Readded the Fermat test. Fixed the bug
+ that we didn't correct for step when passing the prime to the
+ Rabin-Miller test which led to bad performance (Stefan Keller).
+ (check_prime): Add a first Fermat test.
+
+Sun Apr 18 10:11:28 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (cipher_setiv): Add ivlen arg, changed all callers.
+
+ * random.c (randomize_buffer): alway use secure memory because
+ we can't use m_is_secure() on a statically allocated buffer.
+
+ * twofish.c: Replaced some macros by a loop to reduce text size.
+ * Makefile.am (twofish): No more need for sed editing.
+
+Fri Apr 9 12:26:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (cipher_open): Reversed the changes for AUTO_CFB.
+
+ * blowfish.c: Dropped the Blowfish 160 mode.
+ * cipher.c (cipher_open): Ditto.
+ (setup_cipher_table): Ditto. And removed support of twofish128
+
+Wed Apr 7 20:51:39 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (get_random_bits): Can now handle requests > POOLSIZE
+
+ * cipher.c (cipher_open): Now uses standard CFB for automode if
+ the blocksize is gt 8 (according to rfc2440).
+
+ * twofish.c: Applied Matthew Skala's patches for 256 bit key.
+
+Tue Apr 6 19:58:12 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (get_random_bits): Can now handle requests > POOLSIZE
+
+ * cipher.c (cipher_open): Now uses standard CFB for automode if
+ the blocksize is gt 8 (according to rfc2440).
+
+Sat Mar 20 11:44:21 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndlinux.c (tty_printf) [IS_MODULE]: Removed.
+
+ * rndegd.c (gather_random): Some fixes.
+
+Wed Mar 17 13:09:03 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndegd.c (do_read): New.
+ (gather_random): Changed the implementation.
+
+Mon Mar 8 20:47:17 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (DLSYM_NEEDS_UNDERSCORE): Renamed.
+
+Fri Feb 26 17:55:41 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md.c: Nearly a total rewrote.
+
+Wed Feb 24 11:07:27 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (context): Fixed alignment
+ * md.c: Ditto.
+
+ * rndegd.c: New
+
+Mon Feb 22 20:04:00 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndegd.c: New.
+
+Wed Feb 10 17:15:39 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * Makefile.am: Modules are now figured out by configure
+ * construct.c: New. Generated by configure. Changed all modules
+ to work with that.
+ * sha1.h: Removed.
+ * md5.h: Removed.
+
+ * twofish.c: Changed interface to allow Twofish/256
+
+ * rndunix.c (start_gatherer): Die on SIGPIPE.
+
+Wed Jan 20 18:59:49 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndunix.c (gather_random): Fix to avoid infinite loop.
+
+Sun Jan 17 11:04:33 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * des.c (is_weak_key): Replace system memcmp due to bugs
+ in SunOS's memcmp.
+ (des_get_info): Return error on failed selftest.
+ * twofish.c (twofish_setkey): Return error on failed selftest or
+ invalid keylength.
+ * cast5.c (cast_setkey): Ditto.
+ * blowfish.c (bf_setkey): Return error on failed selftest.
+
+Tue Jan 12 11:17:18 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (random_is_faked): New.
+
+ * tiger.c: Only compile if we have the u64 type
+
+Sat Jan 9 16:02:23 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndunix.c (gather_random): check for setuid.
+
+ * Makefile.am: Add a way to staically link random modules
+
+Thu Jan 7 18:00:58 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md.c (md_stop_debug): Do a flush first.
+ (md_open): size of buffer now depends on the secure parameter
+
+Sun Jan 3 15:28:44 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndunix.c (start_gatherer): Fixed stupid ==/= bug
+
+1998-12-31 Geoff Keating <geoffk@ozemail.com.au>
+
+ * des.c (is_weak_key): Rewrite loop end condition.
+
+Tue Dec 29 14:41:47 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c: add unistd.h for getpid().
+ (RAND_MAX): Fallback value for Sun.
+
+Wed Dec 23 17:12:24 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md.c (md_copy): Reset debug.
+
+Mon Dec 14 21:18:49 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (read_random_source): Changed the interface to the
+ random gathering function.
+ (gather_faked): Use new interface.
+ * dynload.c (dynload_getfnc_fast_random_poll): Ditto.
+ (dynload_getfnc_gather_random): Ditto.
+ * rndlinux.c (gather_random): Ditto.
+ * rndunix.c (gather_random): Ditto.
+
+Sat Dec 12 18:40:32 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (SYMBOL_VERSION): New to cope with system which needs
+ underscores.
+
+ * rndunix.c: Rewrote large parts
+
+Thu Dec 10 20:15:36 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (load_extension): increased needed verbosity level.
+
+ * random.c (fast_random_poll): Fallback to a default fast random
+ poll function.
+ (read_random_source): Always use the faked entroy gatherer if no
+ gather module is available.
+ * rndlinux.c (fast_poll): Removed.
+ * rndunix.c (fast_poll): Removed.
+
+
+Wed Nov 25 12:33:41 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-*.c: Removed.
+ * rndlinux.c : New.
+ * rndunix.c : New.
+ * random.c : Restructured the interface to the gather modules.
+ (intialize): Call constructor functions
+ (read_radnom_source): Moved to here.
+ * dynload.c (dynload_getfnc_gather_random): New.
+ (dynload_getfnc_fast_random_poll): New.
+ (register_internal_cipher_extension): New.
+ (register_cipher_extension): Support of internal modules.
+
+Sun Nov 8 17:44:36 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-unix.c (read_random_source): Removed the assert.
+
+Mon Oct 19 18:34:30 1998 me,,, (wk@tobold)
+
+ * pubkey.c: Hack to allow us to give some info about RSA keys back.
+
+Thu Oct 15 11:47:57 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dynload.c: Support for DLD
+
+Wed Oct 14 12:13:07 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-unix.c: Now uses names from configure for /dev/random.
+
+1998-10-10 SL Baur <steve@altair.xemacs.org>
+
+ * Makefile.am: fix sed -O substitutions to catch -O6, etc.
+
+Tue Oct 6 10:06:32 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-unix.c (HAVE_GETTIMEOFDAY): Fixed (was ..GETTIMEOFTIME :-)
+ * rand-dummy.c (HAVE_GETTIMEOFDAY): Ditto.
+
+Mon Sep 28 13:23:09 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_digest): New.
+ (md_reset): New.
+
+Wed Sep 23 12:27:02 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c (TIGER_CONTEXT): moved "buf", so that it is 64 bit aligned.
+
+Mon Sep 21 06:22:53 1998 Werner Koch (wk@(none))
+
+ * des.c: Some patches from Michael.
+
+Thu Sep 17 19:00:06 1998 Werner Koch (wk@(none))
+
+ * des.c : New file from Michael Roth <mroth@nessie.de>
+
+Mon Sep 14 11:10:55 1998 Werner Koch (wk@(none))
+
+ * blowfish.c (bf_setkey): Niklas Hernaeus patch to detect weak keys.
+
+Mon Sep 14 09:19:25 1998 Werner Koch (wk@(none))
+
+ * dynload.c (RTLD_NOW): Now defined to 1 if it is undefined.
+
+Mon Sep 7 17:04:33 1998 Werner Koch (wk@(none))
+
+ * Makefile.am: Fixes to allow a different build directory
+
+Thu Aug 6 17:25:38 1998 Werner Koch,mobil,,, (wk@tobold)
+
+ * random.c (get_random_byte): Removed and changed all callers
+ to use get_random_bits()
+
+Mon Jul 27 10:30:22 1998 Werner Koch (wk@(none))
+
+ * cipher.c : Support for other blocksizes
+ (cipher_get_blocksize): New.
+ * twofish.c: New.
+ * Makefile.am: Add twofish module.
+
+Mon Jul 13 21:30:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (read_pool): Simple alloc if secure_alloc is not set.
+ (get_random_bits): Ditto.
+
+Thu Jul 9 13:01:14 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dynload.c (load_extension): Function now nbails out if
+ the program is run setuid.
+
+Wed Jul 8 18:58:23 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (rmd160_hash_buffer): New.
+
+Thu Jul 2 10:50:30 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c (cipher_open): algos >=100 use standard CFB
+
+Thu Jun 25 11:18:25 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * Makefile.am: Support for extensions
+
+Thu Jun 18 12:09:38 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (mix_pool): simpler handling for level 0
+
+Mon Jun 15 14:40:48 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c: Removed from dist, will reappear as dynload module
+
+Sat Jun 13 14:16:57 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * pubkey.c: Major changes to allow extensions. Changed the inteface
+ of all public key ciphers and added the ability to load extensions
+ on demand.
+
+ * misc.c: Removed.
+
+Wed Jun 10 07:52:08 1998 Werner Koch,mobil,,, (wk@tobold)
+
+ * dynload.c: New.
+ * cipher.c: Major changes to allow extensions.
+
+Mon Jun 8 22:43:00 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c: Major internal chnages to support extensions.
+ * blowfish.c (blowfish_get_info): New and made all internal
+ functions static, changed heder.
+ * cast5.c (cast5_get_info): Likewise.
+
+Mon Jun 8 12:27:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c (transform): Fix for big endian
+
+ * cipher.c (do_cfb_decrypt): Big endian fix.
+
+Fri May 22 07:30:39 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_get_oid): Add a new one for TIGER.
+
+Thu May 21 13:24:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c: Add support for a dummy cipher
+
+Thu May 14 15:40:36 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (transform): fixed sigbus - I should better
+ add Christian von Roques's new implemenation of rmd160_write.
+
+Fri May 8 18:07:44 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-internal.h, rand-unix.c, rand-w32.c, rand_dummy.c: New
+ * random.c: Moved system specific functions to rand-****.c
+
+Fri May 8 14:01:17 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (fast_random_poll): add call to gethrtime.
+
+Tue May 5 21:28:55 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * elgamal.c (elg_generate): choosing x was not correct, could
+ yield 6 bytes which are not from the random pool, tsss, tsss..
+
+Tue May 5 14:09:06 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * primegen.c (generate_elg_prime): Add arg mode, changed all
+ callers and implemented mode 1.
+
+Mon Apr 27 14:41:58 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c (cipher_get_keylen): New.
+
+Sun Apr 26 14:44:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c, tiger.h: New.
+
+Wed Apr 8 14:57:11 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * misc.c (check_pubkey_algo2): New.
+
+Tue Apr 7 18:46:49 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c: New
+ * misc.c (check_cipher_algo): Moved to cipher.c
+ * cast5.c: Moved many functions to cipher.c
+ * blowfish.c: Likewise.
+
+Sat Apr 4 19:52:08 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cast5.c: Implemented and tested.
+
+Wed Apr 1 16:38:27 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * elgamal.c (elg_generate): Faster generation of x in some cases.
+
+Thu Mar 19 13:54:48 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * blowfish.c (blowfish_decode_cfb): changed XOR operation
+ (blowfish_encode_cfb): Ditto.
+
+Thu Mar 12 14:04:05 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * sha1.c (transform): Rewrote
+
+ * blowfish.c (encrypt): Unrolled for rounds == 16
+ (decrypt): Ditto.
+
+Tue Mar 10 16:32:08 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (transform): Unrolled the loop.
+
+Tue Mar 10 13:05:14 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (read_pool): Add pool_balance stuff.
+ (get_random_bits): New.
+
+ * elgamal.c (elg_generate): Now uses get_random_bits to generate x.
+
+
+Tue Mar 10 11:33:51 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_digest_length): New.
+
+Tue Mar 10 11:27:41 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dsa.c (dsa_verify): Works.
+
+Mon Mar 9 12:59:08 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dsa.c, dsa.h: Removed some unused code.
+
+Wed Mar 4 10:39:22 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_open): Add call to fast_random_poll.
+ blowfish.c (blowfish_setkey): Ditto.
+
+Tue Mar 3 13:32:54 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (rmd160_mixblock): New.
+ * random.c: Restructured to start with a new RNG implementation.
+ * random.h: New.
+
+Mon Mar 2 19:21:46 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * gost.c, gost.h: Removed because they did only contain trash.
+
+Sun Mar 1 16:42:29 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (fill_buffer): removed error message if n == -1.
+
+Fri Feb 27 16:39:34 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_enable): No init if called twice.
+
+Thu Feb 26 07:57:02 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * primegen.c (generate_elg_prime): Changed the progress printing.
+ (gen_prime): Ditto.
+
+Tue Feb 24 12:28:42 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md5.c, md.5 : Replaced by a modified version of md5.c from
+ GNU textutils 1.22.
+
+Wed Feb 18 14:08:30 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c, md.h : New debugging support
+
+Mon Feb 16 10:08:47 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * misc.c (cipher_algo_to_string): New
+ (pubkey_algo_to_string): New.
+ (digest_algo_to_string): New.
+
+
+ Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006
+ 2007, 2008, 2009 Free Software Foundation, Inc.
+
+ This file is free software; as a special exception the author gives
+ unlimited permission to copy and/or distribute it, with or without
+ modifications, as long as this notice is preserved.
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/grub-core/lib/libgcrypt-grub/cipher/arcfour.c b/grub-core/lib/libgcrypt-grub/cipher/arcfour.c
new file mode 100644
index 0000000..99f9c1c
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/arcfour.c
@@ -0,0 +1,141 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* arcfour.c - The arcfour stream cipher
+ * Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * For a description of the algorithm, see:
+ * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
+ * ISBN 0-471-11709-9. Pages 397 ff.
+ */
+
+
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+
+
+typedef struct {
+ int idx_i, idx_j;
+ byte sbox[256];
+} ARCFOUR_context;
+
+static void
+do_encrypt_stream( ARCFOUR_context *ctx,
+ byte *outbuf, const byte *inbuf, unsigned int length )
+{
+ register int i = ctx->idx_i;
+ register int j = ctx->idx_j;
+ register byte *sbox = ctx->sbox;
+ register int t;
+
+ while ( length-- )
+ {
+ i++;
+ i = i & 255; /* The and-op seems to be faster than the mod-op. */
+ j += sbox[i];
+ j &= 255;
+ t = sbox[i]; sbox[i] = sbox[j]; sbox[j] = t;
+ *outbuf++ = *inbuf++ ^ sbox[(sbox[i] + sbox[j]) & 255];
+ }
+
+ ctx->idx_i = i;
+ ctx->idx_j = j;
+}
+
+static void
+encrypt_stream (void *context,
+ byte *outbuf, const byte *inbuf, unsigned int length)
+{
+ ARCFOUR_context *ctx = (ARCFOUR_context *) context;
+ do_encrypt_stream (ctx, outbuf, inbuf, length );
+ _gcry_burn_stack (64);
+}
+
+
+static gcry_err_code_t
+do_arcfour_setkey (void *context, const byte *key, unsigned int keylen)
+{
+ static int initialized;
+ static const char* selftest_failed;
+ int i, j;
+ byte karr[256];
+ ARCFOUR_context *ctx = (ARCFOUR_context *) context;
+
+ if (!initialized )
+ {
+ initialized = 1;
+ selftest_failed = selftest();
+ if( selftest_failed )
+ log_error ("ARCFOUR selftest failed (%s)\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if( keylen < 40/8 ) /* we want at least 40 bits */
+ return GPG_ERR_INV_KEYLEN;
+
+ ctx->idx_i = ctx->idx_j = 0;
+ for (i=0; i < 256; i++ )
+ ctx->sbox[i] = i;
+ for (i=0; i < 256; i++ )
+ karr[i] = key[i%keylen];
+ for (i=j=0; i < 256; i++ )
+ {
+ int t;
+ j = (j + ctx->sbox[i] + karr[i]) % 256;
+ t = ctx->sbox[i];
+ ctx->sbox[i] = ctx->sbox[j];
+ ctx->sbox[j] = t;
+ }
+ memset( karr, 0, 256 );
+
+ return GPG_ERR_NO_ERROR;
+}
+
+static gcry_err_code_t
+arcfour_setkey ( void *context, const byte *key, unsigned int keylen )
+{
+ ARCFOUR_context *ctx = (ARCFOUR_context *) context;
+ gcry_err_code_t rc = do_arcfour_setkey (ctx, key, keylen );
+ _gcry_burn_stack (300);
+ return rc;
+}
+
+
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_arcfour =
+ {
+ "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
+ arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
+ };
+
+
+
+GRUB_MOD_INIT(gcry_arcfour)
+{
+ grub_cipher_register (&_gcry_cipher_spec_arcfour);
+}
+
+GRUB_MOD_FINI(gcry_arcfour)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_arcfour);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/bithelp.h b/grub-core/lib/libgcrypt-grub/cipher/bithelp.h
new file mode 100644
index 0000000..e957b4e
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/bithelp.h
@@ -0,0 +1,57 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+/* bithelp.h - Some bit manipulation helpers
+ * Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+#ifndef G10_BITHELP_H
+#define G10_BITHELP_H
+
+
+/****************
+ * Rotate the 32 bit unsigned integer X by N bits left/right
+ */
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+rol( u32 x, int n)
+{
+ __asm__("roll %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
+#endif
+
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+ror(u32 x, int n)
+{
+ __asm__("rorl %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+#define ror(x,n) ( ((x) >> (n)) | ((x) << (32-(n))) )
+#endif
+
+
+#endif /*G10_BITHELP_H*/
diff --git a/grub-core/lib/libgcrypt-grub/cipher/blowfish.c b/grub-core/lib/libgcrypt-grub/cipher/blowfish.c
new file mode 100644
index 0000000..3780889
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/blowfish.c
@@ -0,0 +1,588 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* blowfish.c - Blowfish encryption
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * For a description of the algorithm, see:
+ * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
+ * ISBN 0-471-11709-9. Pages 336 ff.
+ */
+
+/* Test values:
+ * key "abcdefghijklmnopqrstuvwxyz";
+ * plain "BLOWFISH"
+ * cipher 32 4E D0 FE F4 13 A2 03
+ *
+ */
+
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+
+#define BLOWFISH_BLOCKSIZE 8
+#define BLOWFISH_ROUNDS 16
+
+typedef struct {
+ u32 s0[256];
+ u32 s1[256];
+ u32 s2[256];
+ u32 s3[256];
+ u32 p[BLOWFISH_ROUNDS+2];
+} BLOWFISH_context;
+
+static gcry_err_code_t bf_setkey (void *c, const byte *key, unsigned keylen);
+static void encrypt_block (void *bc, byte *outbuf, const byte *inbuf);
+static void decrypt_block (void *bc, byte *outbuf, const byte *inbuf);
+
+
+/* precomputed S boxes */
+static const u32 ks0[256] = {
+ 0xD1310BA6,0x98DFB5AC,0x2FFD72DB,0xD01ADFB7,0xB8E1AFED,0x6A267E96,
+ 0xBA7C9045,0xF12C7F99,0x24A19947,0xB3916CF7,0x0801F2E2,0x858EFC16,
+ 0x636920D8,0x71574E69,0xA458FEA3,0xF4933D7E,0x0D95748F,0x728EB658,
+ 0x718BCD58,0x82154AEE,0x7B54A41D,0xC25A59B5,0x9C30D539,0x2AF26013,
+ 0xC5D1B023,0x286085F0,0xCA417918,0xB8DB38EF,0x8E79DCB0,0x603A180E,
+ 0x6C9E0E8B,0xB01E8A3E,0xD71577C1,0xBD314B27,0x78AF2FDA,0x55605C60,
+ 0xE65525F3,0xAA55AB94,0x57489862,0x63E81440,0x55CA396A,0x2AAB10B6,
+ 0xB4CC5C34,0x1141E8CE,0xA15486AF,0x7C72E993,0xB3EE1411,0x636FBC2A,
+ 0x2BA9C55D,0x741831F6,0xCE5C3E16,0x9B87931E,0xAFD6BA33,0x6C24CF5C,
+ 0x7A325381,0x28958677,0x3B8F4898,0x6B4BB9AF,0xC4BFE81B,0x66282193,
+ 0x61D809CC,0xFB21A991,0x487CAC60,0x5DEC8032,0xEF845D5D,0xE98575B1,
+ 0xDC262302,0xEB651B88,0x23893E81,0xD396ACC5,0x0F6D6FF3,0x83F44239,
+ 0x2E0B4482,0xA4842004,0x69C8F04A,0x9E1F9B5E,0x21C66842,0xF6E96C9A,
+ 0x670C9C61,0xABD388F0,0x6A51A0D2,0xD8542F68,0x960FA728,0xAB5133A3,
+ 0x6EEF0B6C,0x137A3BE4,0xBA3BF050,0x7EFB2A98,0xA1F1651D,0x39AF0176,
+ 0x66CA593E,0x82430E88,0x8CEE8619,0x456F9FB4,0x7D84A5C3,0x3B8B5EBE,
+ 0xE06F75D8,0x85C12073,0x401A449F,0x56C16AA6,0x4ED3AA62,0x363F7706,
+ 0x1BFEDF72,0x429B023D,0x37D0D724,0xD00A1248,0xDB0FEAD3,0x49F1C09B,
+ 0x075372C9,0x80991B7B,0x25D479D8,0xF6E8DEF7,0xE3FE501A,0xB6794C3B,
+ 0x976CE0BD,0x04C006BA,0xC1A94FB6,0x409F60C4,0x5E5C9EC2,0x196A2463,
+ 0x68FB6FAF,0x3E6C53B5,0x1339B2EB,0x3B52EC6F,0x6DFC511F,0x9B30952C,
+ 0xCC814544,0xAF5EBD09,0xBEE3D004,0xDE334AFD,0x660F2807,0x192E4BB3,
+ 0xC0CBA857,0x45C8740F,0xD20B5F39,0xB9D3FBDB,0x5579C0BD,0x1A60320A,
+ 0xD6A100C6,0x402C7279,0x679F25FE,0xFB1FA3CC,0x8EA5E9F8,0xDB3222F8,
+ 0x3C7516DF,0xFD616B15,0x2F501EC8,0xAD0552AB,0x323DB5FA,0xFD238760,
+ 0x53317B48,0x3E00DF82,0x9E5C57BB,0xCA6F8CA0,0x1A87562E,0xDF1769DB,
+ 0xD542A8F6,0x287EFFC3,0xAC6732C6,0x8C4F5573,0x695B27B0,0xBBCA58C8,
+ 0xE1FFA35D,0xB8F011A0,0x10FA3D98,0xFD2183B8,0x4AFCB56C,0x2DD1D35B,
+ 0x9A53E479,0xB6F84565,0xD28E49BC,0x4BFB9790,0xE1DDF2DA,0xA4CB7E33,
+ 0x62FB1341,0xCEE4C6E8,0xEF20CADA,0x36774C01,0xD07E9EFE,0x2BF11FB4,
+ 0x95DBDA4D,0xAE909198,0xEAAD8E71,0x6B93D5A0,0xD08ED1D0,0xAFC725E0,
+ 0x8E3C5B2F,0x8E7594B7,0x8FF6E2FB,0xF2122B64,0x8888B812,0x900DF01C,
+ 0x4FAD5EA0,0x688FC31C,0xD1CFF191,0xB3A8C1AD,0x2F2F2218,0xBE0E1777,
+ 0xEA752DFE,0x8B021FA1,0xE5A0CC0F,0xB56F74E8,0x18ACF3D6,0xCE89E299,
+ 0xB4A84FE0,0xFD13E0B7,0x7CC43B81,0xD2ADA8D9,0x165FA266,0x80957705,
+ 0x93CC7314,0x211A1477,0xE6AD2065,0x77B5FA86,0xC75442F5,0xFB9D35CF,
+ 0xEBCDAF0C,0x7B3E89A0,0xD6411BD3,0xAE1E7E49,0x00250E2D,0x2071B35E,
+ 0x226800BB,0x57B8E0AF,0x2464369B,0xF009B91E,0x5563911D,0x59DFA6AA,
+ 0x78C14389,0xD95A537F,0x207D5BA2,0x02E5B9C5,0x83260376,0x6295CFA9,
+ 0x11C81968,0x4E734A41,0xB3472DCA,0x7B14A94A,0x1B510052,0x9A532915,
+ 0xD60F573F,0xBC9BC6E4,0x2B60A476,0x81E67400,0x08BA6FB5,0x571BE91F,
+ 0xF296EC6B,0x2A0DD915,0xB6636521,0xE7B9F9B6,0xFF34052E,0xC5855664,
+ 0x53B02D5D,0xA99F8FA1,0x08BA4799,0x6E85076A };
+
+static const u32 ks1[256] = {
+ 0x4B7A70E9,0xB5B32944,0xDB75092E,0xC4192623,0xAD6EA6B0,0x49A7DF7D,
+ 0x9CEE60B8,0x8FEDB266,0xECAA8C71,0x699A17FF,0x5664526C,0xC2B19EE1,
+ 0x193602A5,0x75094C29,0xA0591340,0xE4183A3E,0x3F54989A,0x5B429D65,
+ 0x6B8FE4D6,0x99F73FD6,0xA1D29C07,0xEFE830F5,0x4D2D38E6,0xF0255DC1,
+ 0x4CDD2086,0x8470EB26,0x6382E9C6,0x021ECC5E,0x09686B3F,0x3EBAEFC9,
+ 0x3C971814,0x6B6A70A1,0x687F3584,0x52A0E286,0xB79C5305,0xAA500737,
+ 0x3E07841C,0x7FDEAE5C,0x8E7D44EC,0x5716F2B8,0xB03ADA37,0xF0500C0D,
+ 0xF01C1F04,0x0200B3FF,0xAE0CF51A,0x3CB574B2,0x25837A58,0xDC0921BD,
+ 0xD19113F9,0x7CA92FF6,0x94324773,0x22F54701,0x3AE5E581,0x37C2DADC,
+ 0xC8B57634,0x9AF3DDA7,0xA9446146,0x0FD0030E,0xECC8C73E,0xA4751E41,
+ 0xE238CD99,0x3BEA0E2F,0x3280BBA1,0x183EB331,0x4E548B38,0x4F6DB908,
+ 0x6F420D03,0xF60A04BF,0x2CB81290,0x24977C79,0x5679B072,0xBCAF89AF,
+ 0xDE9A771F,0xD9930810,0xB38BAE12,0xDCCF3F2E,0x5512721F,0x2E6B7124,
+ 0x501ADDE6,0x9F84CD87,0x7A584718,0x7408DA17,0xBC9F9ABC,0xE94B7D8C,
+ 0xEC7AEC3A,0xDB851DFA,0x63094366,0xC464C3D2,0xEF1C1847,0x3215D908,
+ 0xDD433B37,0x24C2BA16,0x12A14D43,0x2A65C451,0x50940002,0x133AE4DD,
+ 0x71DFF89E,0x10314E55,0x81AC77D6,0x5F11199B,0x043556F1,0xD7A3C76B,
+ 0x3C11183B,0x5924A509,0xF28FE6ED,0x97F1FBFA,0x9EBABF2C,0x1E153C6E,
+ 0x86E34570,0xEAE96FB1,0x860E5E0A,0x5A3E2AB3,0x771FE71C,0x4E3D06FA,
+ 0x2965DCB9,0x99E71D0F,0x803E89D6,0x5266C825,0x2E4CC978,0x9C10B36A,
+ 0xC6150EBA,0x94E2EA78,0xA5FC3C53,0x1E0A2DF4,0xF2F74EA7,0x361D2B3D,
+ 0x1939260F,0x19C27960,0x5223A708,0xF71312B6,0xEBADFE6E,0xEAC31F66,
+ 0xE3BC4595,0xA67BC883,0xB17F37D1,0x018CFF28,0xC332DDEF,0xBE6C5AA5,
+ 0x65582185,0x68AB9802,0xEECEA50F,0xDB2F953B,0x2AEF7DAD,0x5B6E2F84,
+ 0x1521B628,0x29076170,0xECDD4775,0x619F1510,0x13CCA830,0xEB61BD96,
+ 0x0334FE1E,0xAA0363CF,0xB5735C90,0x4C70A239,0xD59E9E0B,0xCBAADE14,
+ 0xEECC86BC,0x60622CA7,0x9CAB5CAB,0xB2F3846E,0x648B1EAF,0x19BDF0CA,
+ 0xA02369B9,0x655ABB50,0x40685A32,0x3C2AB4B3,0x319EE9D5,0xC021B8F7,
+ 0x9B540B19,0x875FA099,0x95F7997E,0x623D7DA8,0xF837889A,0x97E32D77,
+ 0x11ED935F,0x16681281,0x0E358829,0xC7E61FD6,0x96DEDFA1,0x7858BA99,
+ 0x57F584A5,0x1B227263,0x9B83C3FF,0x1AC24696,0xCDB30AEB,0x532E3054,
+ 0x8FD948E4,0x6DBC3128,0x58EBF2EF,0x34C6FFEA,0xFE28ED61,0xEE7C3C73,
+ 0x5D4A14D9,0xE864B7E3,0x42105D14,0x203E13E0,0x45EEE2B6,0xA3AAABEA,
+ 0xDB6C4F15,0xFACB4FD0,0xC742F442,0xEF6ABBB5,0x654F3B1D,0x41CD2105,
+ 0xD81E799E,0x86854DC7,0xE44B476A,0x3D816250,0xCF62A1F2,0x5B8D2646,
+ 0xFC8883A0,0xC1C7B6A3,0x7F1524C3,0x69CB7492,0x47848A0B,0x5692B285,
+ 0x095BBF00,0xAD19489D,0x1462B174,0x23820E00,0x58428D2A,0x0C55F5EA,
+ 0x1DADF43E,0x233F7061,0x3372F092,0x8D937E41,0xD65FECF1,0x6C223BDB,
+ 0x7CDE3759,0xCBEE7460,0x4085F2A7,0xCE77326E,0xA6078084,0x19F8509E,
+ 0xE8EFD855,0x61D99735,0xA969A7AA,0xC50C06C2,0x5A04ABFC,0x800BCADC,
+ 0x9E447A2E,0xC3453484,0xFDD56705,0x0E1E9EC9,0xDB73DBD3,0x105588CD,
+ 0x675FDA79,0xE3674340,0xC5C43465,0x713E38D8,0x3D28F89E,0xF16DFF20,
+ 0x153E21E7,0x8FB03D4A,0xE6E39F2B,0xDB83ADF7 };
+
+static const u32 ks2[256] = {
+ 0xE93D5A68,0x948140F7,0xF64C261C,0x94692934,0x411520F7,0x7602D4F7,
+ 0xBCF46B2E,0xD4A20068,0xD4082471,0x3320F46A,0x43B7D4B7,0x500061AF,
+ 0x1E39F62E,0x97244546,0x14214F74,0xBF8B8840,0x4D95FC1D,0x96B591AF,
+ 0x70F4DDD3,0x66A02F45,0xBFBC09EC,0x03BD9785,0x7FAC6DD0,0x31CB8504,
+ 0x96EB27B3,0x55FD3941,0xDA2547E6,0xABCA0A9A,0x28507825,0x530429F4,
+ 0x0A2C86DA,0xE9B66DFB,0x68DC1462,0xD7486900,0x680EC0A4,0x27A18DEE,
+ 0x4F3FFEA2,0xE887AD8C,0xB58CE006,0x7AF4D6B6,0xAACE1E7C,0xD3375FEC,
+ 0xCE78A399,0x406B2A42,0x20FE9E35,0xD9F385B9,0xEE39D7AB,0x3B124E8B,
+ 0x1DC9FAF7,0x4B6D1856,0x26A36631,0xEAE397B2,0x3A6EFA74,0xDD5B4332,
+ 0x6841E7F7,0xCA7820FB,0xFB0AF54E,0xD8FEB397,0x454056AC,0xBA489527,
+ 0x55533A3A,0x20838D87,0xFE6BA9B7,0xD096954B,0x55A867BC,0xA1159A58,
+ 0xCCA92963,0x99E1DB33,0xA62A4A56,0x3F3125F9,0x5EF47E1C,0x9029317C,
+ 0xFDF8E802,0x04272F70,0x80BB155C,0x05282CE3,0x95C11548,0xE4C66D22,
+ 0x48C1133F,0xC70F86DC,0x07F9C9EE,0x41041F0F,0x404779A4,0x5D886E17,
+ 0x325F51EB,0xD59BC0D1,0xF2BCC18F,0x41113564,0x257B7834,0x602A9C60,
+ 0xDFF8E8A3,0x1F636C1B,0x0E12B4C2,0x02E1329E,0xAF664FD1,0xCAD18115,
+ 0x6B2395E0,0x333E92E1,0x3B240B62,0xEEBEB922,0x85B2A20E,0xE6BA0D99,
+ 0xDE720C8C,0x2DA2F728,0xD0127845,0x95B794FD,0x647D0862,0xE7CCF5F0,
+ 0x5449A36F,0x877D48FA,0xC39DFD27,0xF33E8D1E,0x0A476341,0x992EFF74,
+ 0x3A6F6EAB,0xF4F8FD37,0xA812DC60,0xA1EBDDF8,0x991BE14C,0xDB6E6B0D,
+ 0xC67B5510,0x6D672C37,0x2765D43B,0xDCD0E804,0xF1290DC7,0xCC00FFA3,
+ 0xB5390F92,0x690FED0B,0x667B9FFB,0xCEDB7D9C,0xA091CF0B,0xD9155EA3,
+ 0xBB132F88,0x515BAD24,0x7B9479BF,0x763BD6EB,0x37392EB3,0xCC115979,
+ 0x8026E297,0xF42E312D,0x6842ADA7,0xC66A2B3B,0x12754CCC,0x782EF11C,
+ 0x6A124237,0xB79251E7,0x06A1BBE6,0x4BFB6350,0x1A6B1018,0x11CAEDFA,
+ 0x3D25BDD8,0xE2E1C3C9,0x44421659,0x0A121386,0xD90CEC6E,0xD5ABEA2A,
+ 0x64AF674E,0xDA86A85F,0xBEBFE988,0x64E4C3FE,0x9DBC8057,0xF0F7C086,
+ 0x60787BF8,0x6003604D,0xD1FD8346,0xF6381FB0,0x7745AE04,0xD736FCCC,
+ 0x83426B33,0xF01EAB71,0xB0804187,0x3C005E5F,0x77A057BE,0xBDE8AE24,
+ 0x55464299,0xBF582E61,0x4E58F48F,0xF2DDFDA2,0xF474EF38,0x8789BDC2,
+ 0x5366F9C3,0xC8B38E74,0xB475F255,0x46FCD9B9,0x7AEB2661,0x8B1DDF84,
+ 0x846A0E79,0x915F95E2,0x466E598E,0x20B45770,0x8CD55591,0xC902DE4C,
+ 0xB90BACE1,0xBB8205D0,0x11A86248,0x7574A99E,0xB77F19B6,0xE0A9DC09,
+ 0x662D09A1,0xC4324633,0xE85A1F02,0x09F0BE8C,0x4A99A025,0x1D6EFE10,
+ 0x1AB93D1D,0x0BA5A4DF,0xA186F20F,0x2868F169,0xDCB7DA83,0x573906FE,
+ 0xA1E2CE9B,0x4FCD7F52,0x50115E01,0xA70683FA,0xA002B5C4,0x0DE6D027,
+ 0x9AF88C27,0x773F8641,0xC3604C06,0x61A806B5,0xF0177A28,0xC0F586E0,
+ 0x006058AA,0x30DC7D62,0x11E69ED7,0x2338EA63,0x53C2DD94,0xC2C21634,
+ 0xBBCBEE56,0x90BCB6DE,0xEBFC7DA1,0xCE591D76,0x6F05E409,0x4B7C0188,
+ 0x39720A3D,0x7C927C24,0x86E3725F,0x724D9DB9,0x1AC15BB4,0xD39EB8FC,
+ 0xED545578,0x08FCA5B5,0xD83D7CD3,0x4DAD0FC4,0x1E50EF5E,0xB161E6F8,
+ 0xA28514D9,0x6C51133C,0x6FD5C7E7,0x56E14EC4,0x362ABFCE,0xDDC6C837,
+ 0xD79A3234,0x92638212,0x670EFA8E,0x406000E0 };
+
+static const u32 ks3[256] = {
+ 0x3A39CE37,0xD3FAF5CF,0xABC27737,0x5AC52D1B,0x5CB0679E,0x4FA33742,
+ 0xD3822740,0x99BC9BBE,0xD5118E9D,0xBF0F7315,0xD62D1C7E,0xC700C47B,
+ 0xB78C1B6B,0x21A19045,0xB26EB1BE,0x6A366EB4,0x5748AB2F,0xBC946E79,
+ 0xC6A376D2,0x6549C2C8,0x530FF8EE,0x468DDE7D,0xD5730A1D,0x4CD04DC6,
+ 0x2939BBDB,0xA9BA4650,0xAC9526E8,0xBE5EE304,0xA1FAD5F0,0x6A2D519A,
+ 0x63EF8CE2,0x9A86EE22,0xC089C2B8,0x43242EF6,0xA51E03AA,0x9CF2D0A4,
+ 0x83C061BA,0x9BE96A4D,0x8FE51550,0xBA645BD6,0x2826A2F9,0xA73A3AE1,
+ 0x4BA99586,0xEF5562E9,0xC72FEFD3,0xF752F7DA,0x3F046F69,0x77FA0A59,
+ 0x80E4A915,0x87B08601,0x9B09E6AD,0x3B3EE593,0xE990FD5A,0x9E34D797,
+ 0x2CF0B7D9,0x022B8B51,0x96D5AC3A,0x017DA67D,0xD1CF3ED6,0x7C7D2D28,
+ 0x1F9F25CF,0xADF2B89B,0x5AD6B472,0x5A88F54C,0xE029AC71,0xE019A5E6,
+ 0x47B0ACFD,0xED93FA9B,0xE8D3C48D,0x283B57CC,0xF8D56629,0x79132E28,
+ 0x785F0191,0xED756055,0xF7960E44,0xE3D35E8C,0x15056DD4,0x88F46DBA,
+ 0x03A16125,0x0564F0BD,0xC3EB9E15,0x3C9057A2,0x97271AEC,0xA93A072A,
+ 0x1B3F6D9B,0x1E6321F5,0xF59C66FB,0x26DCF319,0x7533D928,0xB155FDF5,
+ 0x03563482,0x8ABA3CBB,0x28517711,0xC20AD9F8,0xABCC5167,0xCCAD925F,
+ 0x4DE81751,0x3830DC8E,0x379D5862,0x9320F991,0xEA7A90C2,0xFB3E7BCE,
+ 0x5121CE64,0x774FBE32,0xA8B6E37E,0xC3293D46,0x48DE5369,0x6413E680,
+ 0xA2AE0810,0xDD6DB224,0x69852DFD,0x09072166,0xB39A460A,0x6445C0DD,
+ 0x586CDECF,0x1C20C8AE,0x5BBEF7DD,0x1B588D40,0xCCD2017F,0x6BB4E3BB,
+ 0xDDA26A7E,0x3A59FF45,0x3E350A44,0xBCB4CDD5,0x72EACEA8,0xFA6484BB,
+ 0x8D6612AE,0xBF3C6F47,0xD29BE463,0x542F5D9E,0xAEC2771B,0xF64E6370,
+ 0x740E0D8D,0xE75B1357,0xF8721671,0xAF537D5D,0x4040CB08,0x4EB4E2CC,
+ 0x34D2466A,0x0115AF84,0xE1B00428,0x95983A1D,0x06B89FB4,0xCE6EA048,
+ 0x6F3F3B82,0x3520AB82,0x011A1D4B,0x277227F8,0x611560B1,0xE7933FDC,
+ 0xBB3A792B,0x344525BD,0xA08839E1,0x51CE794B,0x2F32C9B7,0xA01FBAC9,
+ 0xE01CC87E,0xBCC7D1F6,0xCF0111C3,0xA1E8AAC7,0x1A908749,0xD44FBD9A,
+ 0xD0DADECB,0xD50ADA38,0x0339C32A,0xC6913667,0x8DF9317C,0xE0B12B4F,
+ 0xF79E59B7,0x43F5BB3A,0xF2D519FF,0x27D9459C,0xBF97222C,0x15E6FC2A,
+ 0x0F91FC71,0x9B941525,0xFAE59361,0xCEB69CEB,0xC2A86459,0x12BAA8D1,
+ 0xB6C1075E,0xE3056A0C,0x10D25065,0xCB03A442,0xE0EC6E0E,0x1698DB3B,
+ 0x4C98A0BE,0x3278E964,0x9F1F9532,0xE0D392DF,0xD3A0342B,0x8971F21E,
+ 0x1B0A7441,0x4BA3348C,0xC5BE7120,0xC37632D8,0xDF359F8D,0x9B992F2E,
+ 0xE60B6F47,0x0FE3F11D,0xE54CDA54,0x1EDAD891,0xCE6279CF,0xCD3E7E6F,
+ 0x1618B166,0xFD2C1D05,0x848FD2C5,0xF6FB2299,0xF523F357,0xA6327623,
+ 0x93A83531,0x56CCCD02,0xACF08162,0x5A75EBB5,0x6E163697,0x88D273CC,
+ 0xDE966292,0x81B949D0,0x4C50901B,0x71C65614,0xE6C6C7BD,0x327A140A,
+ 0x45E1D006,0xC3F27B9A,0xC9AA53FD,0x62A80F00,0xBB25BFE2,0x35BDD2F6,
+ 0x71126905,0xB2040222,0xB6CBCF7C,0xCD769C2B,0x53113EC0,0x1640E3D3,
+ 0x38ABBD60,0x2547ADF0,0xBA38209C,0xF746CE76,0x77AFA1C5,0x20756060,
+ 0x85CBFE4E,0x8AE88DD8,0x7AAAF9B0,0x4CF9AA7E,0x1948C25C,0x02FB8A8C,
+ 0x01C36AE4,0xD6EBE1F9,0x90D4F869,0xA65CDEA0,0x3F09252D,0xC208E69F,
+ 0xB74E6132,0xCE77E25B,0x578FDFE3,0x3AC372E6 };
+
+static const u32 ps[BLOWFISH_ROUNDS+2] = {
+ 0x243F6A88,0x85A308D3,0x13198A2E,0x03707344,0xA4093822,0x299F31D0,
+ 0x082EFA98,0xEC4E6C89,0x452821E6,0x38D01377,0xBE5466CF,0x34E90C6C,
+ 0xC0AC29B7,0xC97C50DD,0x3F84D5B5,0xB5470917,0x9216D5D9,0x8979FB1B };
+
+
+
+#if BLOWFISH_ROUNDS != 16
+static inline u32
+function_F( BLOWFISH_context *bc, u32 x )
+{
+ u16 a, b, c, d;
+
+#ifdef WORDS_BIGENDIAN
+ a = ((byte*)&x)[0];
+ b = ((byte*)&x)[1];
+ c = ((byte*)&x)[2];
+ d = ((byte*)&x)[3];
+#else
+ a = ((byte*)&x)[3];
+ b = ((byte*)&x)[2];
+ c = ((byte*)&x)[1];
+ d = ((byte*)&x)[0];
+#endif
+
+ return ((bc->s0[a] + bc->s1[b]) ^ bc->s2[c] ) + bc->s3[d];
+}
+#endif
+
+#ifdef WORDS_BIGENDIAN
+#define F(x) ((( s0[((byte*)&x)[0]] + s1[((byte*)&x)[1]]) \
+ ^ s2[((byte*)&x)[2]]) + s3[((byte*)&x)[3]] )
+#else
+#define F(x) ((( s0[((byte*)&x)[3]] + s1[((byte*)&x)[2]]) \
+ ^ s2[((byte*)&x)[1]]) + s3[((byte*)&x)[0]] )
+#endif
+#define R(l,r,i) do { l ^= p[i]; r ^= F(l); } while(0)
+
+
+static void
+do_encrypt ( BLOWFISH_context *bc, u32 *ret_xl, u32 *ret_xr )
+{
+#if BLOWFISH_ROUNDS == 16
+ u32 xl, xr, *s0, *s1, *s2, *s3, *p;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+ s0 = bc->s0;
+ s1 = bc->s1;
+ s2 = bc->s2;
+ s3 = bc->s3;
+
+ R( xl, xr, 0);
+ R( xr, xl, 1);
+ R( xl, xr, 2);
+ R( xr, xl, 3);
+ R( xl, xr, 4);
+ R( xr, xl, 5);
+ R( xl, xr, 6);
+ R( xr, xl, 7);
+ R( xl, xr, 8);
+ R( xr, xl, 9);
+ R( xl, xr, 10);
+ R( xr, xl, 11);
+ R( xl, xr, 12);
+ R( xr, xl, 13);
+ R( xl, xr, 14);
+ R( xr, xl, 15);
+
+ xl ^= p[BLOWFISH_ROUNDS];
+ xr ^= p[BLOWFISH_ROUNDS+1];
+
+ *ret_xl = xr;
+ *ret_xr = xl;
+
+#else
+ u32 xl, xr, temp, *p;
+ int i;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+
+ for(i=0; i < BLOWFISH_ROUNDS; i++ )
+ {
+ xl ^= p[i];
+ xr ^= function_F(bc, xl);
+ temp = xl;
+ xl = xr;
+ xr = temp;
+ }
+ temp = xl;
+ xl = xr;
+ xr = temp;
+
+ xr ^= p[BLOWFISH_ROUNDS];
+ xl ^= p[BLOWFISH_ROUNDS+1];
+
+ *ret_xl = xl;
+ *ret_xr = xr;
+#endif
+}
+
+
+static void
+decrypt ( BLOWFISH_context *bc, u32 *ret_xl, u32 *ret_xr )
+{
+#if BLOWFISH_ROUNDS == 16
+ u32 xl, xr, *s0, *s1, *s2, *s3, *p;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+ s0 = bc->s0;
+ s1 = bc->s1;
+ s2 = bc->s2;
+ s3 = bc->s3;
+
+ R( xl, xr, 17);
+ R( xr, xl, 16);
+ R( xl, xr, 15);
+ R( xr, xl, 14);
+ R( xl, xr, 13);
+ R( xr, xl, 12);
+ R( xl, xr, 11);
+ R( xr, xl, 10);
+ R( xl, xr, 9);
+ R( xr, xl, 8);
+ R( xl, xr, 7);
+ R( xr, xl, 6);
+ R( xl, xr, 5);
+ R( xr, xl, 4);
+ R( xl, xr, 3);
+ R( xr, xl, 2);
+
+ xl ^= p[1];
+ xr ^= p[0];
+
+ *ret_xl = xr;
+ *ret_xr = xl;
+
+#else
+ u32 xl, xr, temp, *p;
+ int i;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+
+ for (i=BLOWFISH_ROUNDS+1; i > 1; i-- )
+ {
+ xl ^= p[i];
+ xr ^= function_F(bc, xl);
+ temp = xl;
+ xl = xr;
+ xr = temp;
+ }
+
+ temp = xl;
+ xl = xr;
+ xr = temp;
+
+ xr ^= p[1];
+ xl ^= p[0];
+
+ *ret_xl = xl;
+ *ret_xr = xr;
+#endif
+}
+
+#undef F
+#undef R
+
+static void
+do_encrypt_block ( BLOWFISH_context *bc, byte *outbuf, const byte *inbuf )
+{
+ u32 d1, d2;
+
+ d1 = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ d2 = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+ do_encrypt( bc, &d1, &d2 );
+ outbuf[0] = (d1 >> 24) & 0xff;
+ outbuf[1] = (d1 >> 16) & 0xff;
+ outbuf[2] = (d1 >> 8) & 0xff;
+ outbuf[3] = d1 & 0xff;
+ outbuf[4] = (d2 >> 24) & 0xff;
+ outbuf[5] = (d2 >> 16) & 0xff;
+ outbuf[6] = (d2 >> 8) & 0xff;
+ outbuf[7] = d2 & 0xff;
+}
+
+static void
+encrypt_block (void *context, byte *outbuf, const byte *inbuf)
+{
+ BLOWFISH_context *bc = (BLOWFISH_context *) context;
+ do_encrypt_block (bc, outbuf, inbuf);
+ _gcry_burn_stack (64);
+}
+
+
+static void
+do_decrypt_block (BLOWFISH_context *bc, byte *outbuf, const byte *inbuf)
+{
+ u32 d1, d2;
+
+ d1 = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ d2 = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+ decrypt( bc, &d1, &d2 );
+ outbuf[0] = (d1 >> 24) & 0xff;
+ outbuf[1] = (d1 >> 16) & 0xff;
+ outbuf[2] = (d1 >> 8) & 0xff;
+ outbuf[3] = d1 & 0xff;
+ outbuf[4] = (d2 >> 24) & 0xff;
+ outbuf[5] = (d2 >> 16) & 0xff;
+ outbuf[6] = (d2 >> 8) & 0xff;
+ outbuf[7] = d2 & 0xff;
+}
+
+static void
+decrypt_block (void *context, byte *outbuf, const byte *inbuf)
+{
+ BLOWFISH_context *bc = (BLOWFISH_context *) context;
+ do_decrypt_block (bc, outbuf, inbuf);
+ _gcry_burn_stack (64);
+}
+
+
+
+
+
+static gcry_err_code_t
+do_bf_setkey (BLOWFISH_context *c, const byte *key, unsigned keylen)
+{
+ int i, j;
+ u32 data, datal, datar;
+ static int initialized;
+ static const char *selftest_failed;
+
+ if( !initialized )
+ {
+ initialized = 1;
+ selftest_failed = selftest();
+ if( selftest_failed )
+ log_error ("%s\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ for(i=0; i < BLOWFISH_ROUNDS+2; i++ )
+ c->p[i] = ps[i];
+ for(i=0; i < 256; i++ )
+ {
+ c->s0[i] = ks0[i];
+ c->s1[i] = ks1[i];
+ c->s2[i] = ks2[i];
+ c->s3[i] = ks3[i];
+ }
+
+ for(i=j=0; i < BLOWFISH_ROUNDS+2; i++ )
+ {
+#ifdef WORDS_BIGENDIAN
+ ((byte*)&data)[0] = key[j];
+ ((byte*)&data)[1] = key[(j+1)%keylen];
+ ((byte*)&data)[2] = key[(j+2)%keylen];
+ ((byte*)&data)[3] = key[(j+3)%keylen];
+#else
+ ((byte*)&data)[3] = key[j];
+ ((byte*)&data)[2] = key[(j+1)%keylen];
+ ((byte*)&data)[1] = key[(j+2)%keylen];
+ ((byte*)&data)[0] = key[(j+3)%keylen];
+#endif
+ c->p[i] ^= data;
+ j = (j+4) % keylen;
+ }
+
+ datal = datar = 0;
+ for(i=0; i < BLOWFISH_ROUNDS+2; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->p[i] = datal;
+ c->p[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s0[i] = datal;
+ c->s0[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s1[i] = datal;
+ c->s1[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s2[i] = datal;
+ c->s2[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s3[i] = datal;
+ c->s3[i+1] = datar;
+ }
+
+
+ /* Check for weak key. A weak key is a key in which a value in
+ the P-array (here c) occurs more than once per table. */
+ for(i=0; i < 255; i++ )
+ {
+ for( j=i+1; j < 256; j++)
+ {
+ if( (c->s0[i] == c->s0[j]) || (c->s1[i] == c->s1[j]) ||
+ (c->s2[i] == c->s2[j]) || (c->s3[i] == c->s3[j]) )
+ return GPG_ERR_WEAK_KEY;
+ }
+ }
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+bf_setkey (void *context, const byte *key, unsigned keylen)
+{
+ BLOWFISH_context *c = (BLOWFISH_context *) context;
+ gcry_err_code_t rc = do_bf_setkey (c, key, keylen);
+ _gcry_burn_stack (64);
+ return rc;
+}
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_blowfish =
+ {
+ "BLOWFISH", NULL, NULL, BLOWFISH_BLOCKSIZE, 128,
+ sizeof (BLOWFISH_context),
+ bf_setkey, encrypt_block, decrypt_block
+ };
+
+
+GRUB_MOD_INIT(gcry_blowfish)
+{
+ grub_cipher_register (&_gcry_cipher_spec_blowfish);
+}
+
+GRUB_MOD_FINI(gcry_blowfish)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_blowfish);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/camellia-glue.c b/grub-core/lib/libgcrypt-grub/cipher/camellia-glue.c
new file mode 100644
index 0000000..c620191
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/camellia-glue.c
@@ -0,0 +1,199 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* camellia-glue.c - Glue for the Camellia cipher
+ * Copyright (C) 2007 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+/* I put all the libgcrypt-specific stuff in this file to keep the
+ camellia.c/camellia.h files exactly as provided by NTT. If they
+ update their code, this should make it easier to bring the changes
+ in. - dshaw
+
+ There is one small change which needs to be done: Include the
+ following code at the top of camellia.h: */
+#if 0
+
+/* To use Camellia with libraries it is often useful to keep the name
+ * space of the library clean. The following macro is thus useful:
+ *
+ * #define CAMELLIA_EXT_SYM_PREFIX foo_
+ *
+ * This prefixes all external symbols with "foo_".
+ */
+#ifdef HAVE_CONFIG_H
+#endif
+#ifdef CAMELLIA_EXT_SYM_PREFIX
+#define CAMELLIA_PREFIX1(x,y) x ## y
+#define CAMELLIA_PREFIX2(x,y) CAMELLIA_PREFIX1(x,y)
+#define CAMELLIA_PREFIX(x) CAMELLIA_PREFIX2(CAMELLIA_EXT_SYM_PREFIX,x)
+#define Camellia_Ekeygen CAMELLIA_PREFIX(Camellia_Ekeygen)
+#define Camellia_EncryptBlock CAMELLIA_PREFIX(Camellia_EncryptBlock)
+#define Camellia_DecryptBlock CAMELLIA_PREFIX(Camellia_DecryptBlock)
+#define camellia_decrypt128 CAMELLIA_PREFIX(camellia_decrypt128)
+#define camellia_decrypt256 CAMELLIA_PREFIX(camellia_decrypt256)
+#define camellia_encrypt128 CAMELLIA_PREFIX(camellia_encrypt128)
+#define camellia_encrypt256 CAMELLIA_PREFIX(camellia_encrypt256)
+#define camellia_setup128 CAMELLIA_PREFIX(camellia_setup128)
+#define camellia_setup192 CAMELLIA_PREFIX(camellia_setup192)
+#define camellia_setup256 CAMELLIA_PREFIX(camellia_setup256)
+#endif /*CAMELLIA_EXT_SYM_PREFIX*/
+
+#endif /* Code sample. */
+
+
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+#include "camellia.h"
+
+typedef struct
+{
+ int keybitlength;
+ KEY_TABLE_TYPE keytable;
+} CAMELLIA_context;
+
+
+static gcry_err_code_t
+camellia_setkey(void *c, const byte *key, unsigned keylen)
+{
+ CAMELLIA_context *ctx=c;
+ static int initialized=0;
+ static const char *selftest_failed=NULL;
+
+ if(keylen!=16 && keylen!=24 && keylen!=32)
+ return GPG_ERR_INV_KEYLEN;
+
+ if(!initialized)
+ {
+ initialized=1;
+ selftest_failed=selftest();
+ if(selftest_failed)
+ log_error("%s\n",selftest_failed);
+ }
+
+ if(selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ ctx->keybitlength=keylen*8;
+ Camellia_Ekeygen(ctx->keybitlength,key,ctx->keytable);
+ _gcry_burn_stack
+ ((19+34+34)*sizeof(u32)+2*sizeof(void*) /* camellia_setup256 */
+ +(4+32)*sizeof(u32)+2*sizeof(void*) /* camellia_setup192 */
+ +0+sizeof(int)+2*sizeof(void*) /* Camellia_Ekeygen */
+ +3*2*sizeof(void*) /* Function calls. */
+ );
+
+ return 0;
+}
+
+static void
+camellia_encrypt(void *c, byte *outbuf, const byte *inbuf)
+{
+ CAMELLIA_context *ctx=c;
+
+ Camellia_EncryptBlock(ctx->keybitlength,inbuf,ctx->keytable,outbuf);
+ _gcry_burn_stack
+ (sizeof(int)+2*sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
+ +4*sizeof(u32)
+ +2*sizeof(u32*)+4*sizeof(u32)
+ +2*2*sizeof(void*) /* Function calls. */
+ );
+}
+
+static void
+camellia_decrypt(void *c, byte *outbuf, const byte *inbuf)
+{
+ CAMELLIA_context *ctx=c;
+
+ Camellia_DecryptBlock(ctx->keybitlength,inbuf,ctx->keytable,outbuf);
+ _gcry_burn_stack
+ (sizeof(int)+2*sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
+ +4*sizeof(u32)
+ +2*sizeof(u32*)+4*sizeof(u32)
+ +2*2*sizeof(void*) /* Function calls. */
+ );
+}
+
+
+/* These oids are from
+ <http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications_oid.html>,
+ retrieved May 1, 2007. */
+
+static gcry_cipher_oid_spec_t camellia128_oids[] =
+ {
+ {"1.2.392.200011.61.1.1.1.2", GCRY_CIPHER_MODE_CBC},
+ {"0.3.4401.5.3.1.9.1", GCRY_CIPHER_MODE_ECB},
+ {"0.3.4401.5.3.1.9.3", GCRY_CIPHER_MODE_OFB},
+ {"0.3.4401.5.3.1.9.4", GCRY_CIPHER_MODE_CFB},
+ { NULL }
+ };
+
+static gcry_cipher_oid_spec_t camellia192_oids[] =
+ {
+ {"1.2.392.200011.61.1.1.1.3", GCRY_CIPHER_MODE_CBC},
+ {"0.3.4401.5.3.1.9.21", GCRY_CIPHER_MODE_ECB},
+ {"0.3.4401.5.3.1.9.23", GCRY_CIPHER_MODE_OFB},
+ {"0.3.4401.5.3.1.9.24", GCRY_CIPHER_MODE_CFB},
+ { NULL }
+ };
+
+static gcry_cipher_oid_spec_t camellia256_oids[] =
+ {
+ {"1.2.392.200011.61.1.1.1.4", GCRY_CIPHER_MODE_CBC},
+ {"0.3.4401.5.3.1.9.41", GCRY_CIPHER_MODE_ECB},
+ {"0.3.4401.5.3.1.9.43", GCRY_CIPHER_MODE_OFB},
+ {"0.3.4401.5.3.1.9.44", GCRY_CIPHER_MODE_CFB},
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_camellia128 =
+ {
+ "CAMELLIA128",NULL,camellia128_oids,CAMELLIA_BLOCK_SIZE,128,
+ sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_camellia192 =
+ {
+ "CAMELLIA192",NULL,camellia192_oids,CAMELLIA_BLOCK_SIZE,192,
+ sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_camellia256 =
+ {
+ "CAMELLIA256",NULL,camellia256_oids,CAMELLIA_BLOCK_SIZE,256,
+ sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt
+ };
+
+
+GRUB_MOD_INIT(gcry_camellia)
+{
+ grub_cipher_register (&_gcry_cipher_spec_camellia128);
+ grub_cipher_register (&_gcry_cipher_spec_camellia192);
+ grub_cipher_register (&_gcry_cipher_spec_camellia256);
+}
+
+GRUB_MOD_FINI(gcry_camellia)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_camellia128);
+ grub_cipher_unregister (&_gcry_cipher_spec_camellia192);
+ grub_cipher_unregister (&_gcry_cipher_spec_camellia256);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/camellia.c b/grub-core/lib/libgcrypt-grub/cipher/camellia.c
new file mode 100644
index 0000000..6ef6e74
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/camellia.c
@@ -0,0 +1,1463 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* camellia.h ver 1.2.0
+ *
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * Algorithm Specification
+ * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
+ */
+
+
+#include "camellia.h"
+
+/* u32 must be 32bit word */
+typedef unsigned int u32;
+typedef unsigned char u8;
+
+/* key constants */
+
+#define CAMELLIA_SIGMA1L (0xA09E667FL)
+#define CAMELLIA_SIGMA1R (0x3BCC908BL)
+#define CAMELLIA_SIGMA2L (0xB67AE858L)
+#define CAMELLIA_SIGMA2R (0x4CAA73B2L)
+#define CAMELLIA_SIGMA3L (0xC6EF372FL)
+#define CAMELLIA_SIGMA3R (0xE94F82BEL)
+#define CAMELLIA_SIGMA4L (0x54FF53A5L)
+#define CAMELLIA_SIGMA4R (0xF1D36F1CL)
+#define CAMELLIA_SIGMA5L (0x10E527FAL)
+#define CAMELLIA_SIGMA5R (0xDE682D1DL)
+#define CAMELLIA_SIGMA6L (0xB05688C2L)
+#define CAMELLIA_SIGMA6R (0xB3E6C1FDL)
+
+/*
+ * macros
+ */
+
+
+#if defined(_MSC_VER)
+
+# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00)
+# define GETU32(p) SWAP(*((u32 *)(p)))
+# define PUTU32(ct, st) {*((u32 *)(ct)) = SWAP((st));}
+
+#else /* not MS-VC */
+
+# define GETU32(pt) \
+ (((u32)(pt)[0] << 24) \
+ ^ ((u32)(pt)[1] << 16) \
+ ^ ((u32)(pt)[2] << 8) \
+ ^ ((u32)(pt)[3]))
+
+# define PUTU32(ct, st) { \
+ (ct)[0] = (u8)((st) >> 24); \
+ (ct)[1] = (u8)((st) >> 16); \
+ (ct)[2] = (u8)((st) >> 8); \
+ (ct)[3] = (u8)(st); }
+
+#endif
+
+#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
+#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
+
+/* rotation right shift 1byte */
+#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
+/* rotation left shift 1bit */
+#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
+/* rotation left shift 1byte */
+#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
+
+#define CAMELLIA_ROLDQ(ll, lr, rl, rr, w0, w1, bits) \
+ do { \
+ w0 = ll; \
+ ll = (ll << bits) + (lr >> (32 - bits)); \
+ lr = (lr << bits) + (rl >> (32 - bits)); \
+ rl = (rl << bits) + (rr >> (32 - bits)); \
+ rr = (rr << bits) + (w0 >> (32 - bits)); \
+ } while(0)
+
+#define CAMELLIA_ROLDQo32(ll, lr, rl, rr, w0, w1, bits) \
+ do { \
+ w0 = ll; \
+ w1 = lr; \
+ ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
+ lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
+ rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
+ rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
+ } while(0)
+
+#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
+#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
+#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
+#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
+
+#define CAMELLIA_F(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \
+ do { \
+ il = xl ^ kl; \
+ ir = xr ^ kr; \
+ t0 = il >> 16; \
+ t1 = ir >> 16; \
+ yl = CAMELLIA_SP1110(ir & 0xff) \
+ ^ CAMELLIA_SP0222((t1 >> 8) & 0xff) \
+ ^ CAMELLIA_SP3033(t1 & 0xff) \
+ ^ CAMELLIA_SP4404((ir >> 8) & 0xff); \
+ yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) \
+ ^ CAMELLIA_SP0222(t0 & 0xff) \
+ ^ CAMELLIA_SP3033((il >> 8) & 0xff) \
+ ^ CAMELLIA_SP4404(il & 0xff); \
+ yl ^= yr; \
+ yr = CAMELLIA_RR8(yr); \
+ yr ^= yl; \
+ } while(0)
+
+
+/*
+ * for speed up
+ *
+ */
+#define CAMELLIA_FLS(ll, lr, rl, rr, kll, klr, krl, krr, t0, t1, t2, t3) \
+ do { \
+ t0 = kll; \
+ t0 &= ll; \
+ lr ^= CAMELLIA_RL1(t0); \
+ t1 = klr; \
+ t1 |= lr; \
+ ll ^= t1; \
+ \
+ t2 = krr; \
+ t2 |= rr; \
+ rl ^= t2; \
+ t3 = krl; \
+ t3 &= rl; \
+ rr ^= CAMELLIA_RL1(t3); \
+ } while(0)
+
+#define CAMELLIA_ROUNDSM(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \
+ do { \
+ ir = CAMELLIA_SP1110(xr & 0xff) \
+ ^ CAMELLIA_SP0222((xr >> 24) & 0xff) \
+ ^ CAMELLIA_SP3033((xr >> 16) & 0xff) \
+ ^ CAMELLIA_SP4404((xr >> 8) & 0xff); \
+ il = CAMELLIA_SP1110((xl >> 24) & 0xff) \
+ ^ CAMELLIA_SP0222((xl >> 16) & 0xff) \
+ ^ CAMELLIA_SP3033((xl >> 8) & 0xff) \
+ ^ CAMELLIA_SP4404(xl & 0xff); \
+ il ^= kl; \
+ ir ^= kr; \
+ ir ^= il; \
+ il = CAMELLIA_RR8(il); \
+ il ^= ir; \
+ yl ^= ir; \
+ yr ^= il; \
+ } while(0)
+
+
+static const u32 camellia_sp1110[256] = {
+ 0x70707000,0x82828200,0x2c2c2c00,0xececec00,
+ 0xb3b3b300,0x27272700,0xc0c0c000,0xe5e5e500,
+ 0xe4e4e400,0x85858500,0x57575700,0x35353500,
+ 0xeaeaea00,0x0c0c0c00,0xaeaeae00,0x41414100,
+ 0x23232300,0xefefef00,0x6b6b6b00,0x93939300,
+ 0x45454500,0x19191900,0xa5a5a500,0x21212100,
+ 0xededed00,0x0e0e0e00,0x4f4f4f00,0x4e4e4e00,
+ 0x1d1d1d00,0x65656500,0x92929200,0xbdbdbd00,
+ 0x86868600,0xb8b8b800,0xafafaf00,0x8f8f8f00,
+ 0x7c7c7c00,0xebebeb00,0x1f1f1f00,0xcecece00,
+ 0x3e3e3e00,0x30303000,0xdcdcdc00,0x5f5f5f00,
+ 0x5e5e5e00,0xc5c5c500,0x0b0b0b00,0x1a1a1a00,
+ 0xa6a6a600,0xe1e1e100,0x39393900,0xcacaca00,
+ 0xd5d5d500,0x47474700,0x5d5d5d00,0x3d3d3d00,
+ 0xd9d9d900,0x01010100,0x5a5a5a00,0xd6d6d600,
+ 0x51515100,0x56565600,0x6c6c6c00,0x4d4d4d00,
+ 0x8b8b8b00,0x0d0d0d00,0x9a9a9a00,0x66666600,
+ 0xfbfbfb00,0xcccccc00,0xb0b0b000,0x2d2d2d00,
+ 0x74747400,0x12121200,0x2b2b2b00,0x20202000,
+ 0xf0f0f000,0xb1b1b100,0x84848400,0x99999900,
+ 0xdfdfdf00,0x4c4c4c00,0xcbcbcb00,0xc2c2c200,
+ 0x34343400,0x7e7e7e00,0x76767600,0x05050500,
+ 0x6d6d6d00,0xb7b7b700,0xa9a9a900,0x31313100,
+ 0xd1d1d100,0x17171700,0x04040400,0xd7d7d700,
+ 0x14141400,0x58585800,0x3a3a3a00,0x61616100,
+ 0xdedede00,0x1b1b1b00,0x11111100,0x1c1c1c00,
+ 0x32323200,0x0f0f0f00,0x9c9c9c00,0x16161600,
+ 0x53535300,0x18181800,0xf2f2f200,0x22222200,
+ 0xfefefe00,0x44444400,0xcfcfcf00,0xb2b2b200,
+ 0xc3c3c300,0xb5b5b500,0x7a7a7a00,0x91919100,
+ 0x24242400,0x08080800,0xe8e8e800,0xa8a8a800,
+ 0x60606000,0xfcfcfc00,0x69696900,0x50505000,
+ 0xaaaaaa00,0xd0d0d000,0xa0a0a000,0x7d7d7d00,
+ 0xa1a1a100,0x89898900,0x62626200,0x97979700,
+ 0x54545400,0x5b5b5b00,0x1e1e1e00,0x95959500,
+ 0xe0e0e000,0xffffff00,0x64646400,0xd2d2d200,
+ 0x10101000,0xc4c4c400,0x00000000,0x48484800,
+ 0xa3a3a300,0xf7f7f700,0x75757500,0xdbdbdb00,
+ 0x8a8a8a00,0x03030300,0xe6e6e600,0xdadada00,
+ 0x09090900,0x3f3f3f00,0xdddddd00,0x94949400,
+ 0x87878700,0x5c5c5c00,0x83838300,0x02020200,
+ 0xcdcdcd00,0x4a4a4a00,0x90909000,0x33333300,
+ 0x73737300,0x67676700,0xf6f6f600,0xf3f3f300,
+ 0x9d9d9d00,0x7f7f7f00,0xbfbfbf00,0xe2e2e200,
+ 0x52525200,0x9b9b9b00,0xd8d8d800,0x26262600,
+ 0xc8c8c800,0x37373700,0xc6c6c600,0x3b3b3b00,
+ 0x81818100,0x96969600,0x6f6f6f00,0x4b4b4b00,
+ 0x13131300,0xbebebe00,0x63636300,0x2e2e2e00,
+ 0xe9e9e900,0x79797900,0xa7a7a700,0x8c8c8c00,
+ 0x9f9f9f00,0x6e6e6e00,0xbcbcbc00,0x8e8e8e00,
+ 0x29292900,0xf5f5f500,0xf9f9f900,0xb6b6b600,
+ 0x2f2f2f00,0xfdfdfd00,0xb4b4b400,0x59595900,
+ 0x78787800,0x98989800,0x06060600,0x6a6a6a00,
+ 0xe7e7e700,0x46464600,0x71717100,0xbababa00,
+ 0xd4d4d400,0x25252500,0xababab00,0x42424200,
+ 0x88888800,0xa2a2a200,0x8d8d8d00,0xfafafa00,
+ 0x72727200,0x07070700,0xb9b9b900,0x55555500,
+ 0xf8f8f800,0xeeeeee00,0xacacac00,0x0a0a0a00,
+ 0x36363600,0x49494900,0x2a2a2a00,0x68686800,
+ 0x3c3c3c00,0x38383800,0xf1f1f100,0xa4a4a400,
+ 0x40404000,0x28282800,0xd3d3d300,0x7b7b7b00,
+ 0xbbbbbb00,0xc9c9c900,0x43434300,0xc1c1c100,
+ 0x15151500,0xe3e3e300,0xadadad00,0xf4f4f400,
+ 0x77777700,0xc7c7c700,0x80808000,0x9e9e9e00,
+};
+
+static const u32 camellia_sp0222[256] = {
+ 0x00e0e0e0,0x00050505,0x00585858,0x00d9d9d9,
+ 0x00676767,0x004e4e4e,0x00818181,0x00cbcbcb,
+ 0x00c9c9c9,0x000b0b0b,0x00aeaeae,0x006a6a6a,
+ 0x00d5d5d5,0x00181818,0x005d5d5d,0x00828282,
+ 0x00464646,0x00dfdfdf,0x00d6d6d6,0x00272727,
+ 0x008a8a8a,0x00323232,0x004b4b4b,0x00424242,
+ 0x00dbdbdb,0x001c1c1c,0x009e9e9e,0x009c9c9c,
+ 0x003a3a3a,0x00cacaca,0x00252525,0x007b7b7b,
+ 0x000d0d0d,0x00717171,0x005f5f5f,0x001f1f1f,
+ 0x00f8f8f8,0x00d7d7d7,0x003e3e3e,0x009d9d9d,
+ 0x007c7c7c,0x00606060,0x00b9b9b9,0x00bebebe,
+ 0x00bcbcbc,0x008b8b8b,0x00161616,0x00343434,
+ 0x004d4d4d,0x00c3c3c3,0x00727272,0x00959595,
+ 0x00ababab,0x008e8e8e,0x00bababa,0x007a7a7a,
+ 0x00b3b3b3,0x00020202,0x00b4b4b4,0x00adadad,
+ 0x00a2a2a2,0x00acacac,0x00d8d8d8,0x009a9a9a,
+ 0x00171717,0x001a1a1a,0x00353535,0x00cccccc,
+ 0x00f7f7f7,0x00999999,0x00616161,0x005a5a5a,
+ 0x00e8e8e8,0x00242424,0x00565656,0x00404040,
+ 0x00e1e1e1,0x00636363,0x00090909,0x00333333,
+ 0x00bfbfbf,0x00989898,0x00979797,0x00858585,
+ 0x00686868,0x00fcfcfc,0x00ececec,0x000a0a0a,
+ 0x00dadada,0x006f6f6f,0x00535353,0x00626262,
+ 0x00a3a3a3,0x002e2e2e,0x00080808,0x00afafaf,
+ 0x00282828,0x00b0b0b0,0x00747474,0x00c2c2c2,
+ 0x00bdbdbd,0x00363636,0x00222222,0x00383838,
+ 0x00646464,0x001e1e1e,0x00393939,0x002c2c2c,
+ 0x00a6a6a6,0x00303030,0x00e5e5e5,0x00444444,
+ 0x00fdfdfd,0x00888888,0x009f9f9f,0x00656565,
+ 0x00878787,0x006b6b6b,0x00f4f4f4,0x00232323,
+ 0x00484848,0x00101010,0x00d1d1d1,0x00515151,
+ 0x00c0c0c0,0x00f9f9f9,0x00d2d2d2,0x00a0a0a0,
+ 0x00555555,0x00a1a1a1,0x00414141,0x00fafafa,
+ 0x00434343,0x00131313,0x00c4c4c4,0x002f2f2f,
+ 0x00a8a8a8,0x00b6b6b6,0x003c3c3c,0x002b2b2b,
+ 0x00c1c1c1,0x00ffffff,0x00c8c8c8,0x00a5a5a5,
+ 0x00202020,0x00898989,0x00000000,0x00909090,
+ 0x00474747,0x00efefef,0x00eaeaea,0x00b7b7b7,
+ 0x00151515,0x00060606,0x00cdcdcd,0x00b5b5b5,
+ 0x00121212,0x007e7e7e,0x00bbbbbb,0x00292929,
+ 0x000f0f0f,0x00b8b8b8,0x00070707,0x00040404,
+ 0x009b9b9b,0x00949494,0x00212121,0x00666666,
+ 0x00e6e6e6,0x00cecece,0x00ededed,0x00e7e7e7,
+ 0x003b3b3b,0x00fefefe,0x007f7f7f,0x00c5c5c5,
+ 0x00a4a4a4,0x00373737,0x00b1b1b1,0x004c4c4c,
+ 0x00919191,0x006e6e6e,0x008d8d8d,0x00767676,
+ 0x00030303,0x002d2d2d,0x00dedede,0x00969696,
+ 0x00262626,0x007d7d7d,0x00c6c6c6,0x005c5c5c,
+ 0x00d3d3d3,0x00f2f2f2,0x004f4f4f,0x00191919,
+ 0x003f3f3f,0x00dcdcdc,0x00797979,0x001d1d1d,
+ 0x00525252,0x00ebebeb,0x00f3f3f3,0x006d6d6d,
+ 0x005e5e5e,0x00fbfbfb,0x00696969,0x00b2b2b2,
+ 0x00f0f0f0,0x00313131,0x000c0c0c,0x00d4d4d4,
+ 0x00cfcfcf,0x008c8c8c,0x00e2e2e2,0x00757575,
+ 0x00a9a9a9,0x004a4a4a,0x00575757,0x00848484,
+ 0x00111111,0x00454545,0x001b1b1b,0x00f5f5f5,
+ 0x00e4e4e4,0x000e0e0e,0x00737373,0x00aaaaaa,
+ 0x00f1f1f1,0x00dddddd,0x00595959,0x00141414,
+ 0x006c6c6c,0x00929292,0x00545454,0x00d0d0d0,
+ 0x00787878,0x00707070,0x00e3e3e3,0x00494949,
+ 0x00808080,0x00505050,0x00a7a7a7,0x00f6f6f6,
+ 0x00777777,0x00939393,0x00868686,0x00838383,
+ 0x002a2a2a,0x00c7c7c7,0x005b5b5b,0x00e9e9e9,
+ 0x00eeeeee,0x008f8f8f,0x00010101,0x003d3d3d,
+};
+
+static const u32 camellia_sp3033[256] = {
+ 0x38003838,0x41004141,0x16001616,0x76007676,
+ 0xd900d9d9,0x93009393,0x60006060,0xf200f2f2,
+ 0x72007272,0xc200c2c2,0xab00abab,0x9a009a9a,
+ 0x75007575,0x06000606,0x57005757,0xa000a0a0,
+ 0x91009191,0xf700f7f7,0xb500b5b5,0xc900c9c9,
+ 0xa200a2a2,0x8c008c8c,0xd200d2d2,0x90009090,
+ 0xf600f6f6,0x07000707,0xa700a7a7,0x27002727,
+ 0x8e008e8e,0xb200b2b2,0x49004949,0xde00dede,
+ 0x43004343,0x5c005c5c,0xd700d7d7,0xc700c7c7,
+ 0x3e003e3e,0xf500f5f5,0x8f008f8f,0x67006767,
+ 0x1f001f1f,0x18001818,0x6e006e6e,0xaf00afaf,
+ 0x2f002f2f,0xe200e2e2,0x85008585,0x0d000d0d,
+ 0x53005353,0xf000f0f0,0x9c009c9c,0x65006565,
+ 0xea00eaea,0xa300a3a3,0xae00aeae,0x9e009e9e,
+ 0xec00ecec,0x80008080,0x2d002d2d,0x6b006b6b,
+ 0xa800a8a8,0x2b002b2b,0x36003636,0xa600a6a6,
+ 0xc500c5c5,0x86008686,0x4d004d4d,0x33003333,
+ 0xfd00fdfd,0x66006666,0x58005858,0x96009696,
+ 0x3a003a3a,0x09000909,0x95009595,0x10001010,
+ 0x78007878,0xd800d8d8,0x42004242,0xcc00cccc,
+ 0xef00efef,0x26002626,0xe500e5e5,0x61006161,
+ 0x1a001a1a,0x3f003f3f,0x3b003b3b,0x82008282,
+ 0xb600b6b6,0xdb00dbdb,0xd400d4d4,0x98009898,
+ 0xe800e8e8,0x8b008b8b,0x02000202,0xeb00ebeb,
+ 0x0a000a0a,0x2c002c2c,0x1d001d1d,0xb000b0b0,
+ 0x6f006f6f,0x8d008d8d,0x88008888,0x0e000e0e,
+ 0x19001919,0x87008787,0x4e004e4e,0x0b000b0b,
+ 0xa900a9a9,0x0c000c0c,0x79007979,0x11001111,
+ 0x7f007f7f,0x22002222,0xe700e7e7,0x59005959,
+ 0xe100e1e1,0xda00dada,0x3d003d3d,0xc800c8c8,
+ 0x12001212,0x04000404,0x74007474,0x54005454,
+ 0x30003030,0x7e007e7e,0xb400b4b4,0x28002828,
+ 0x55005555,0x68006868,0x50005050,0xbe00bebe,
+ 0xd000d0d0,0xc400c4c4,0x31003131,0xcb00cbcb,
+ 0x2a002a2a,0xad00adad,0x0f000f0f,0xca00caca,
+ 0x70007070,0xff00ffff,0x32003232,0x69006969,
+ 0x08000808,0x62006262,0x00000000,0x24002424,
+ 0xd100d1d1,0xfb00fbfb,0xba00baba,0xed00eded,
+ 0x45004545,0x81008181,0x73007373,0x6d006d6d,
+ 0x84008484,0x9f009f9f,0xee00eeee,0x4a004a4a,
+ 0xc300c3c3,0x2e002e2e,0xc100c1c1,0x01000101,
+ 0xe600e6e6,0x25002525,0x48004848,0x99009999,
+ 0xb900b9b9,0xb300b3b3,0x7b007b7b,0xf900f9f9,
+ 0xce00cece,0xbf00bfbf,0xdf00dfdf,0x71007171,
+ 0x29002929,0xcd00cdcd,0x6c006c6c,0x13001313,
+ 0x64006464,0x9b009b9b,0x63006363,0x9d009d9d,
+ 0xc000c0c0,0x4b004b4b,0xb700b7b7,0xa500a5a5,
+ 0x89008989,0x5f005f5f,0xb100b1b1,0x17001717,
+ 0xf400f4f4,0xbc00bcbc,0xd300d3d3,0x46004646,
+ 0xcf00cfcf,0x37003737,0x5e005e5e,0x47004747,
+ 0x94009494,0xfa00fafa,0xfc00fcfc,0x5b005b5b,
+ 0x97009797,0xfe00fefe,0x5a005a5a,0xac00acac,
+ 0x3c003c3c,0x4c004c4c,0x03000303,0x35003535,
+ 0xf300f3f3,0x23002323,0xb800b8b8,0x5d005d5d,
+ 0x6a006a6a,0x92009292,0xd500d5d5,0x21002121,
+ 0x44004444,0x51005151,0xc600c6c6,0x7d007d7d,
+ 0x39003939,0x83008383,0xdc00dcdc,0xaa00aaaa,
+ 0x7c007c7c,0x77007777,0x56005656,0x05000505,
+ 0x1b001b1b,0xa400a4a4,0x15001515,0x34003434,
+ 0x1e001e1e,0x1c001c1c,0xf800f8f8,0x52005252,
+ 0x20002020,0x14001414,0xe900e9e9,0xbd00bdbd,
+ 0xdd00dddd,0xe400e4e4,0xa100a1a1,0xe000e0e0,
+ 0x8a008a8a,0xf100f1f1,0xd600d6d6,0x7a007a7a,
+ 0xbb00bbbb,0xe300e3e3,0x40004040,0x4f004f4f,
+};
+
+static const u32 camellia_sp4404[256] = {
+ 0x70700070,0x2c2c002c,0xb3b300b3,0xc0c000c0,
+ 0xe4e400e4,0x57570057,0xeaea00ea,0xaeae00ae,
+ 0x23230023,0x6b6b006b,0x45450045,0xa5a500a5,
+ 0xeded00ed,0x4f4f004f,0x1d1d001d,0x92920092,
+ 0x86860086,0xafaf00af,0x7c7c007c,0x1f1f001f,
+ 0x3e3e003e,0xdcdc00dc,0x5e5e005e,0x0b0b000b,
+ 0xa6a600a6,0x39390039,0xd5d500d5,0x5d5d005d,
+ 0xd9d900d9,0x5a5a005a,0x51510051,0x6c6c006c,
+ 0x8b8b008b,0x9a9a009a,0xfbfb00fb,0xb0b000b0,
+ 0x74740074,0x2b2b002b,0xf0f000f0,0x84840084,
+ 0xdfdf00df,0xcbcb00cb,0x34340034,0x76760076,
+ 0x6d6d006d,0xa9a900a9,0xd1d100d1,0x04040004,
+ 0x14140014,0x3a3a003a,0xdede00de,0x11110011,
+ 0x32320032,0x9c9c009c,0x53530053,0xf2f200f2,
+ 0xfefe00fe,0xcfcf00cf,0xc3c300c3,0x7a7a007a,
+ 0x24240024,0xe8e800e8,0x60600060,0x69690069,
+ 0xaaaa00aa,0xa0a000a0,0xa1a100a1,0x62620062,
+ 0x54540054,0x1e1e001e,0xe0e000e0,0x64640064,
+ 0x10100010,0x00000000,0xa3a300a3,0x75750075,
+ 0x8a8a008a,0xe6e600e6,0x09090009,0xdddd00dd,
+ 0x87870087,0x83830083,0xcdcd00cd,0x90900090,
+ 0x73730073,0xf6f600f6,0x9d9d009d,0xbfbf00bf,
+ 0x52520052,0xd8d800d8,0xc8c800c8,0xc6c600c6,
+ 0x81810081,0x6f6f006f,0x13130013,0x63630063,
+ 0xe9e900e9,0xa7a700a7,0x9f9f009f,0xbcbc00bc,
+ 0x29290029,0xf9f900f9,0x2f2f002f,0xb4b400b4,
+ 0x78780078,0x06060006,0xe7e700e7,0x71710071,
+ 0xd4d400d4,0xabab00ab,0x88880088,0x8d8d008d,
+ 0x72720072,0xb9b900b9,0xf8f800f8,0xacac00ac,
+ 0x36360036,0x2a2a002a,0x3c3c003c,0xf1f100f1,
+ 0x40400040,0xd3d300d3,0xbbbb00bb,0x43430043,
+ 0x15150015,0xadad00ad,0x77770077,0x80800080,
+ 0x82820082,0xecec00ec,0x27270027,0xe5e500e5,
+ 0x85850085,0x35350035,0x0c0c000c,0x41410041,
+ 0xefef00ef,0x93930093,0x19190019,0x21210021,
+ 0x0e0e000e,0x4e4e004e,0x65650065,0xbdbd00bd,
+ 0xb8b800b8,0x8f8f008f,0xebeb00eb,0xcece00ce,
+ 0x30300030,0x5f5f005f,0xc5c500c5,0x1a1a001a,
+ 0xe1e100e1,0xcaca00ca,0x47470047,0x3d3d003d,
+ 0x01010001,0xd6d600d6,0x56560056,0x4d4d004d,
+ 0x0d0d000d,0x66660066,0xcccc00cc,0x2d2d002d,
+ 0x12120012,0x20200020,0xb1b100b1,0x99990099,
+ 0x4c4c004c,0xc2c200c2,0x7e7e007e,0x05050005,
+ 0xb7b700b7,0x31310031,0x17170017,0xd7d700d7,
+ 0x58580058,0x61610061,0x1b1b001b,0x1c1c001c,
+ 0x0f0f000f,0x16160016,0x18180018,0x22220022,
+ 0x44440044,0xb2b200b2,0xb5b500b5,0x91910091,
+ 0x08080008,0xa8a800a8,0xfcfc00fc,0x50500050,
+ 0xd0d000d0,0x7d7d007d,0x89890089,0x97970097,
+ 0x5b5b005b,0x95950095,0xffff00ff,0xd2d200d2,
+ 0xc4c400c4,0x48480048,0xf7f700f7,0xdbdb00db,
+ 0x03030003,0xdada00da,0x3f3f003f,0x94940094,
+ 0x5c5c005c,0x02020002,0x4a4a004a,0x33330033,
+ 0x67670067,0xf3f300f3,0x7f7f007f,0xe2e200e2,
+ 0x9b9b009b,0x26260026,0x37370037,0x3b3b003b,
+ 0x96960096,0x4b4b004b,0xbebe00be,0x2e2e002e,
+ 0x79790079,0x8c8c008c,0x6e6e006e,0x8e8e008e,
+ 0xf5f500f5,0xb6b600b6,0xfdfd00fd,0x59590059,
+ 0x98980098,0x6a6a006a,0x46460046,0xbaba00ba,
+ 0x25250025,0x42420042,0xa2a200a2,0xfafa00fa,
+ 0x07070007,0x55550055,0xeeee00ee,0x0a0a000a,
+ 0x49490049,0x68680068,0x38380038,0xa4a400a4,
+ 0x28280028,0x7b7b007b,0xc9c900c9,0xc1c100c1,
+ 0xe3e300e3,0xf4f400f4,0xc7c700c7,0x9e9e009e,
+};
+
+
+/**
+ * Stuff related to the Camellia key schedule
+ */
+#define subl(x) subL[(x)]
+#define subr(x) subR[(x)]
+
+void camellia_setup128(const unsigned char *key, u32 *subkey)
+{
+ u32 kll, klr, krl, krr;
+ u32 il, ir, t0, t1, w0, w1;
+ u32 kw4l, kw4r, dw, tl, tr;
+ u32 subL[26];
+ u32 subR[26];
+
+ /**
+ * k == kll || klr || krl || krr (|| is concatination)
+ */
+ kll = GETU32(key );
+ klr = GETU32(key + 4);
+ krl = GETU32(key + 8);
+ krr = GETU32(key + 12);
+ /**
+ * generate KL dependent subkeys
+ */
+ subl(0) = kll; subr(0) = klr;
+ subl(1) = krl; subr(1) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(4) = kll; subr(4) = klr;
+ subl(5) = krl; subr(5) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30);
+ subl(10) = kll; subr(10) = klr;
+ subl(11) = krl; subr(11) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(13) = krl; subr(13) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(16) = kll; subr(16) = klr;
+ subl(17) = krl; subr(17) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(18) = kll; subr(18) = klr;
+ subl(19) = krl; subr(19) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(22) = kll; subr(22) = klr;
+ subl(23) = krl; subr(23) = krr;
+
+ /* generate KA */
+ kll = subl(0); klr = subr(0);
+ krl = subl(1); krr = subr(1);
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R,
+ w0, w1, il, ir, t0, t1);
+ krl ^= w0; krr ^= w1;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R,
+ kll, klr, il, ir, t0, t1);
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R,
+ krl, krr, il, ir, t0, t1);
+ krl ^= w0; krr ^= w1;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R,
+ w0, w1, il, ir, t0, t1);
+ kll ^= w0; klr ^= w1;
+
+ /* generate KA dependent subkeys */
+ subl(2) = kll; subr(2) = klr;
+ subl(3) = krl; subr(3) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(6) = kll; subr(6) = klr;
+ subl(7) = krl; subr(7) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(8) = kll; subr(8) = klr;
+ subl(9) = krl; subr(9) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(12) = kll; subr(12) = klr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(14) = kll; subr(14) = klr;
+ subl(15) = krl; subr(15) = krr;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34);
+ subl(20) = kll; subr(20) = klr;
+ subl(21) = krl; subr(21) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(24) = kll; subr(24) = klr;
+ subl(25) = krl; subr(25) = krr;
+
+
+ /* absorb kw2 to other subkeys */
+ subl(3) ^= subl(1); subr(3) ^= subr(1);
+ subl(5) ^= subl(1); subr(5) ^= subr(1);
+ subl(7) ^= subl(1); subr(7) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(9);
+ dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(11) ^= subl(1); subr(11) ^= subr(1);
+ subl(13) ^= subl(1); subr(13) ^= subr(1);
+ subl(15) ^= subl(1); subr(15) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(17);
+ dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(19) ^= subl(1); subr(19) ^= subr(1);
+ subl(21) ^= subl(1); subr(21) ^= subr(1);
+ subl(23) ^= subl(1); subr(23) ^= subr(1);
+ subl(24) ^= subl(1); subr(24) ^= subr(1);
+
+ /* absorb kw4 to other subkeys */
+ kw4l = subl(25); kw4r = subr(25);
+ subl(22) ^= kw4l; subr(22) ^= kw4r;
+ subl(20) ^= kw4l; subr(20) ^= kw4r;
+ subl(18) ^= kw4l; subr(18) ^= kw4r;
+ kw4l ^= kw4r & ~subr(16);
+ dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
+ subl(14) ^= kw4l; subr(14) ^= kw4r;
+ subl(12) ^= kw4l; subr(12) ^= kw4r;
+ subl(10) ^= kw4l; subr(10) ^= kw4r;
+ kw4l ^= kw4r & ~subr(8);
+ dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
+ subl(6) ^= kw4l; subr(6) ^= kw4r;
+ subl(4) ^= kw4l; subr(4) ^= kw4r;
+ subl(2) ^= kw4l; subr(2) ^= kw4r;
+ subl(0) ^= kw4l; subr(0) ^= kw4r;
+
+ /* key XOR is end of F-function */
+ CamelliaSubkeyL(0) = subl(0) ^ subl(2);
+ CamelliaSubkeyR(0) = subr(0) ^ subr(2);
+ CamelliaSubkeyL(2) = subl(3);
+ CamelliaSubkeyR(2) = subr(3);
+ CamelliaSubkeyL(3) = subl(2) ^ subl(4);
+ CamelliaSubkeyR(3) = subr(2) ^ subr(4);
+ CamelliaSubkeyL(4) = subl(3) ^ subl(5);
+ CamelliaSubkeyR(4) = subr(3) ^ subr(5);
+ CamelliaSubkeyL(5) = subl(4) ^ subl(6);
+ CamelliaSubkeyR(5) = subr(4) ^ subr(6);
+ CamelliaSubkeyL(6) = subl(5) ^ subl(7);
+ CamelliaSubkeyR(6) = subr(5) ^ subr(7);
+ tl = subl(10) ^ (subr(10) & ~subr(8));
+ dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(7) = subl(6) ^ tl;
+ CamelliaSubkeyR(7) = subr(6) ^ tr;
+ CamelliaSubkeyL(8) = subl(8);
+ CamelliaSubkeyR(8) = subr(8);
+ CamelliaSubkeyL(9) = subl(9);
+ CamelliaSubkeyR(9) = subr(9);
+ tl = subl(7) ^ (subr(7) & ~subr(9));
+ dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(10) = tl ^ subl(11);
+ CamelliaSubkeyR(10) = tr ^ subr(11);
+ CamelliaSubkeyL(11) = subl(10) ^ subl(12);
+ CamelliaSubkeyR(11) = subr(10) ^ subr(12);
+ CamelliaSubkeyL(12) = subl(11) ^ subl(13);
+ CamelliaSubkeyR(12) = subr(11) ^ subr(13);
+ CamelliaSubkeyL(13) = subl(12) ^ subl(14);
+ CamelliaSubkeyR(13) = subr(12) ^ subr(14);
+ CamelliaSubkeyL(14) = subl(13) ^ subl(15);
+ CamelliaSubkeyR(14) = subr(13) ^ subr(15);
+ tl = subl(18) ^ (subr(18) & ~subr(16));
+ dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(15) = subl(14) ^ tl;
+ CamelliaSubkeyR(15) = subr(14) ^ tr;
+ CamelliaSubkeyL(16) = subl(16);
+ CamelliaSubkeyR(16) = subr(16);
+ CamelliaSubkeyL(17) = subl(17);
+ CamelliaSubkeyR(17) = subr(17);
+ tl = subl(15) ^ (subr(15) & ~subr(17));
+ dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(18) = tl ^ subl(19);
+ CamelliaSubkeyR(18) = tr ^ subr(19);
+ CamelliaSubkeyL(19) = subl(18) ^ subl(20);
+ CamelliaSubkeyR(19) = subr(18) ^ subr(20);
+ CamelliaSubkeyL(20) = subl(19) ^ subl(21);
+ CamelliaSubkeyR(20) = subr(19) ^ subr(21);
+ CamelliaSubkeyL(21) = subl(20) ^ subl(22);
+ CamelliaSubkeyR(21) = subr(20) ^ subr(22);
+ CamelliaSubkeyL(22) = subl(21) ^ subl(23);
+ CamelliaSubkeyR(22) = subr(21) ^ subr(23);
+ CamelliaSubkeyL(23) = subl(22);
+ CamelliaSubkeyR(23) = subr(22);
+ CamelliaSubkeyL(24) = subl(24) ^ subl(23);
+ CamelliaSubkeyR(24) = subr(24) ^ subr(23);
+
+ /* apply the inverse of the last half of P-function */
+ dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
+ dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
+ dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
+ dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
+ dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
+ dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
+ dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
+ dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
+ dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
+ dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
+ dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
+ dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
+ dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
+ dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
+ dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
+ dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
+ dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
+ dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
+
+ return;
+}
+
+void camellia_setup256(const unsigned char *key, u32 *subkey)
+{
+ u32 kll,klr,krl,krr; /* left half of key */
+ u32 krll,krlr,krrl,krrr; /* right half of key */
+ u32 il, ir, t0, t1, w0, w1; /* temporary variables */
+ u32 kw4l, kw4r, dw, tl, tr;
+ u32 subL[34];
+ u32 subR[34];
+
+ /**
+ * key = (kll || klr || krl || krr || krll || krlr || krrl || krrr)
+ * (|| is concatination)
+ */
+
+ kll = GETU32(key );
+ klr = GETU32(key + 4);
+ krl = GETU32(key + 8);
+ krr = GETU32(key + 12);
+ krll = GETU32(key + 16);
+ krlr = GETU32(key + 20);
+ krrl = GETU32(key + 24);
+ krrr = GETU32(key + 28);
+
+ /* generate KL dependent subkeys */
+ subl(0) = kll; subr(0) = klr;
+ subl(1) = krl; subr(1) = krr;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 45);
+ subl(12) = kll; subr(12) = klr;
+ subl(13) = krl; subr(13) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(16) = kll; subr(16) = klr;
+ subl(17) = krl; subr(17) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(22) = kll; subr(22) = klr;
+ subl(23) = krl; subr(23) = krr;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34);
+ subl(30) = kll; subr(30) = klr;
+ subl(31) = krl; subr(31) = krr;
+
+ /* generate KR dependent subkeys */
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15);
+ subl(4) = krll; subr(4) = krlr;
+ subl(5) = krrl; subr(5) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15);
+ subl(8) = krll; subr(8) = krlr;
+ subl(9) = krrl; subr(9) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
+ subl(18) = krll; subr(18) = krlr;
+ subl(19) = krrl; subr(19) = krrr;
+ CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34);
+ subl(26) = krll; subr(26) = krlr;
+ subl(27) = krrl; subr(27) = krrr;
+ CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34);
+
+ /* generate KA */
+ kll = subl(0) ^ krll; klr = subr(0) ^ krlr;
+ krl = subl(1) ^ krrl; krr = subr(1) ^ krrr;
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R,
+ w0, w1, il, ir, t0, t1);
+ krl ^= w0; krr ^= w1;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R,
+ kll, klr, il, ir, t0, t1);
+ kll ^= krll; klr ^= krlr;
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R,
+ krl, krr, il, ir, t0, t1);
+ krl ^= w0 ^ krrl; krr ^= w1 ^ krrr;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R,
+ w0, w1, il, ir, t0, t1);
+ kll ^= w0; klr ^= w1;
+
+ /* generate KB */
+ krll ^= kll; krlr ^= klr;
+ krrl ^= krl; krrr ^= krr;
+ CAMELLIA_F(krll, krlr,
+ CAMELLIA_SIGMA5L, CAMELLIA_SIGMA5R,
+ w0, w1, il, ir, t0, t1);
+ krrl ^= w0; krrr ^= w1;
+ CAMELLIA_F(krrl, krrr,
+ CAMELLIA_SIGMA6L, CAMELLIA_SIGMA6R,
+ w0, w1, il, ir, t0, t1);
+ krll ^= w0; krlr ^= w1;
+
+ /* generate KA dependent subkeys */
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(6) = kll; subr(6) = klr;
+ subl(7) = krl; subr(7) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30);
+ subl(14) = kll; subr(14) = klr;
+ subl(15) = krl; subr(15) = krr;
+ subl(24) = klr; subr(24) = krl;
+ subl(25) = krr; subr(25) = kll;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 49);
+ subl(28) = kll; subr(28) = klr;
+ subl(29) = krl; subr(29) = krr;
+
+ /* generate KB dependent subkeys */
+ subl(2) = krll; subr(2) = krlr;
+ subl(3) = krrl; subr(3) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
+ subl(10) = krll; subr(10) = krlr;
+ subl(11) = krrl; subr(11) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
+ subl(20) = krll; subr(20) = krlr;
+ subl(21) = krrl; subr(21) = krrr;
+ CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 51);
+ subl(32) = krll; subr(32) = krlr;
+ subl(33) = krrl; subr(33) = krrr;
+
+ /* absorb kw2 to other subkeys */
+ subl(3) ^= subl(1); subr(3) ^= subr(1);
+ subl(5) ^= subl(1); subr(5) ^= subr(1);
+ subl(7) ^= subl(1); subr(7) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(9);
+ dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(11) ^= subl(1); subr(11) ^= subr(1);
+ subl(13) ^= subl(1); subr(13) ^= subr(1);
+ subl(15) ^= subl(1); subr(15) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(17);
+ dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(19) ^= subl(1); subr(19) ^= subr(1);
+ subl(21) ^= subl(1); subr(21) ^= subr(1);
+ subl(23) ^= subl(1); subr(23) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(25);
+ dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(27) ^= subl(1); subr(27) ^= subr(1);
+ subl(29) ^= subl(1); subr(29) ^= subr(1);
+ subl(31) ^= subl(1); subr(31) ^= subr(1);
+ subl(32) ^= subl(1); subr(32) ^= subr(1);
+
+ /* absorb kw4 to other subkeys */
+ kw4l = subl(33); kw4r = subr(33);
+ subl(30) ^= kw4l; subr(30) ^= kw4r;
+ subl(28) ^= kw4l; subr(28) ^= kw4r;
+ subl(26) ^= kw4l; subr(26) ^= kw4r;
+ kw4l ^= kw4r & ~subr(24);
+ dw = kw4l & subl(24), kw4r ^= CAMELLIA_RL1(dw);
+ subl(22) ^= kw4l; subr(22) ^= kw4r;
+ subl(20) ^= kw4l; subr(20) ^= kw4r;
+ subl(18) ^= kw4l; subr(18) ^= kw4r;
+ kw4l ^= kw4r & ~subr(16);
+ dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
+ subl(14) ^= kw4l; subr(14) ^= kw4r;
+ subl(12) ^= kw4l; subr(12) ^= kw4r;
+ subl(10) ^= kw4l; subr(10) ^= kw4r;
+ kw4l ^= kw4r & ~subr(8);
+ dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
+ subl(6) ^= kw4l; subr(6) ^= kw4r;
+ subl(4) ^= kw4l; subr(4) ^= kw4r;
+ subl(2) ^= kw4l; subr(2) ^= kw4r;
+ subl(0) ^= kw4l; subr(0) ^= kw4r;
+
+ /* key XOR is end of F-function */
+ CamelliaSubkeyL(0) = subl(0) ^ subl(2);
+ CamelliaSubkeyR(0) = subr(0) ^ subr(2);
+ CamelliaSubkeyL(2) = subl(3);
+ CamelliaSubkeyR(2) = subr(3);
+ CamelliaSubkeyL(3) = subl(2) ^ subl(4);
+ CamelliaSubkeyR(3) = subr(2) ^ subr(4);
+ CamelliaSubkeyL(4) = subl(3) ^ subl(5);
+ CamelliaSubkeyR(4) = subr(3) ^ subr(5);
+ CamelliaSubkeyL(5) = subl(4) ^ subl(6);
+ CamelliaSubkeyR(5) = subr(4) ^ subr(6);
+ CamelliaSubkeyL(6) = subl(5) ^ subl(7);
+ CamelliaSubkeyR(6) = subr(5) ^ subr(7);
+ tl = subl(10) ^ (subr(10) & ~subr(8));
+ dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(7) = subl(6) ^ tl;
+ CamelliaSubkeyR(7) = subr(6) ^ tr;
+ CamelliaSubkeyL(8) = subl(8);
+ CamelliaSubkeyR(8) = subr(8);
+ CamelliaSubkeyL(9) = subl(9);
+ CamelliaSubkeyR(9) = subr(9);
+ tl = subl(7) ^ (subr(7) & ~subr(9));
+ dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(10) = tl ^ subl(11);
+ CamelliaSubkeyR(10) = tr ^ subr(11);
+ CamelliaSubkeyL(11) = subl(10) ^ subl(12);
+ CamelliaSubkeyR(11) = subr(10) ^ subr(12);
+ CamelliaSubkeyL(12) = subl(11) ^ subl(13);
+ CamelliaSubkeyR(12) = subr(11) ^ subr(13);
+ CamelliaSubkeyL(13) = subl(12) ^ subl(14);
+ CamelliaSubkeyR(13) = subr(12) ^ subr(14);
+ CamelliaSubkeyL(14) = subl(13) ^ subl(15);
+ CamelliaSubkeyR(14) = subr(13) ^ subr(15);
+ tl = subl(18) ^ (subr(18) & ~subr(16));
+ dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(15) = subl(14) ^ tl;
+ CamelliaSubkeyR(15) = subr(14) ^ tr;
+ CamelliaSubkeyL(16) = subl(16);
+ CamelliaSubkeyR(16) = subr(16);
+ CamelliaSubkeyL(17) = subl(17);
+ CamelliaSubkeyR(17) = subr(17);
+ tl = subl(15) ^ (subr(15) & ~subr(17));
+ dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(18) = tl ^ subl(19);
+ CamelliaSubkeyR(18) = tr ^ subr(19);
+ CamelliaSubkeyL(19) = subl(18) ^ subl(20);
+ CamelliaSubkeyR(19) = subr(18) ^ subr(20);
+ CamelliaSubkeyL(20) = subl(19) ^ subl(21);
+ CamelliaSubkeyR(20) = subr(19) ^ subr(21);
+ CamelliaSubkeyL(21) = subl(20) ^ subl(22);
+ CamelliaSubkeyR(21) = subr(20) ^ subr(22);
+ CamelliaSubkeyL(22) = subl(21) ^ subl(23);
+ CamelliaSubkeyR(22) = subr(21) ^ subr(23);
+ tl = subl(26) ^ (subr(26) & ~subr(24));
+ dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(23) = subl(22) ^ tl;
+ CamelliaSubkeyR(23) = subr(22) ^ tr;
+ CamelliaSubkeyL(24) = subl(24);
+ CamelliaSubkeyR(24) = subr(24);
+ CamelliaSubkeyL(25) = subl(25);
+ CamelliaSubkeyR(25) = subr(25);
+ tl = subl(23) ^ (subr(23) & ~subr(25));
+ dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(26) = tl ^ subl(27);
+ CamelliaSubkeyR(26) = tr ^ subr(27);
+ CamelliaSubkeyL(27) = subl(26) ^ subl(28);
+ CamelliaSubkeyR(27) = subr(26) ^ subr(28);
+ CamelliaSubkeyL(28) = subl(27) ^ subl(29);
+ CamelliaSubkeyR(28) = subr(27) ^ subr(29);
+ CamelliaSubkeyL(29) = subl(28) ^ subl(30);
+ CamelliaSubkeyR(29) = subr(28) ^ subr(30);
+ CamelliaSubkeyL(30) = subl(29) ^ subl(31);
+ CamelliaSubkeyR(30) = subr(29) ^ subr(31);
+ CamelliaSubkeyL(31) = subl(30);
+ CamelliaSubkeyR(31) = subr(30);
+ CamelliaSubkeyL(32) = subl(32) ^ subl(31);
+ CamelliaSubkeyR(32) = subr(32) ^ subr(31);
+
+ /* apply the inverse of the last half of P-function */
+ dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
+ dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
+ dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
+ dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
+ dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
+ dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
+ dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
+ dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
+ dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
+ dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
+ dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
+ dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
+ dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
+ dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
+ dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
+ dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
+ dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
+ dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
+ dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw;
+ dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw;
+ dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw;
+ dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw;
+ dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw;
+ dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw,CamelliaSubkeyL(31) = dw;
+
+ return;
+}
+
+void camellia_setup192(const unsigned char *key, u32 *subkey)
+{
+ unsigned char kk[32];
+ u32 krll, krlr, krrl,krrr;
+
+ memcpy(kk, key, 24);
+ memcpy((unsigned char *)&krll, key+16,4);
+ memcpy((unsigned char *)&krlr, key+20,4);
+ krrl = ~krll;
+ krrr = ~krlr;
+ memcpy(kk+24, (unsigned char *)&krrl, 4);
+ memcpy(kk+28, (unsigned char *)&krrr, 4);
+ camellia_setup256(kk, subkey);
+ return;
+}
+
+
+/**
+ * Stuff related to camellia encryption/decryption
+ *
+ * "io" must be 4byte aligned and big-endian data.
+ */
+void camellia_encrypt128(const u32 *subkey, u32 *io)
+{
+ u32 il, ir, t0, t1;
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(0);
+ io[1] ^= CamelliaSubkeyR(0);
+ /* main iteration */
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(24);
+ io[3] ^= CamelliaSubkeyR(24);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+void camellia_decrypt128(const u32 *subkey, u32 *io)
+{
+ u32 il,ir,t0,t1; /* temporary valiables */
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(24);
+ io[1] ^= CamelliaSubkeyR(24);
+
+ /* main iteration */
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(0);
+ io[3] ^= CamelliaSubkeyR(0);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+/**
+ * stuff for 192 and 256bit encryption/decryption
+ */
+void camellia_encrypt256(const u32 *subkey, u32 *io)
+{
+ u32 il,ir,t0,t1; /* temporary valiables */
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(0);
+ io[1] ^= CamelliaSubkeyR(0);
+
+ /* main iteration */
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(24),CamelliaSubkeyR(24),
+ CamelliaSubkeyL(25),CamelliaSubkeyR(25),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(26),CamelliaSubkeyR(26),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(27),CamelliaSubkeyR(27),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(28),CamelliaSubkeyR(28),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(29),CamelliaSubkeyR(29),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(30),CamelliaSubkeyR(30),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(31),CamelliaSubkeyR(31),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(32);
+ io[3] ^= CamelliaSubkeyR(32);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+void camellia_decrypt256(const u32 *subkey, u32 *io)
+{
+ u32 il,ir,t0,t1; /* temporary valiables */
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(32);
+ io[1] ^= CamelliaSubkeyR(32);
+
+ /* main iteration */
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(31),CamelliaSubkeyR(31),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(30),CamelliaSubkeyR(30),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(29),CamelliaSubkeyR(29),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(28),CamelliaSubkeyR(28),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(27),CamelliaSubkeyR(27),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(26),CamelliaSubkeyR(26),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(25),CamelliaSubkeyR(25),
+ CamelliaSubkeyL(24),CamelliaSubkeyR(24),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(0);
+ io[3] ^= CamelliaSubkeyR(0);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+/***
+ *
+ * API for compatibility
+ */
+
+void Camellia_Ekeygen(const int keyBitLength,
+ const unsigned char *rawKey,
+ KEY_TABLE_TYPE keyTable)
+{
+ switch(keyBitLength) {
+ case 128:
+ camellia_setup128(rawKey, keyTable);
+ break;
+ case 192:
+ camellia_setup192(rawKey, keyTable);
+ break;
+ case 256:
+ camellia_setup256(rawKey, keyTable);
+ break;
+ default:
+ break;
+ }
+}
+
+
+void Camellia_EncryptBlock(const int keyBitLength,
+ const unsigned char *plaintext,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *ciphertext)
+{
+ u32 tmp[4];
+
+ tmp[0] = GETU32(plaintext);
+ tmp[1] = GETU32(plaintext + 4);
+ tmp[2] = GETU32(plaintext + 8);
+ tmp[3] = GETU32(plaintext + 12);
+
+ switch (keyBitLength) {
+ case 128:
+ camellia_encrypt128(keyTable, tmp);
+ break;
+ case 192:
+ /* fall through */
+ case 256:
+ camellia_encrypt256(keyTable, tmp);
+ break;
+ default:
+ break;
+ }
+
+ PUTU32(ciphertext, tmp[0]);
+ PUTU32(ciphertext + 4, tmp[1]);
+ PUTU32(ciphertext + 8, tmp[2]);
+ PUTU32(ciphertext + 12, tmp[3]);
+}
+
+void Camellia_DecryptBlock(const int keyBitLength,
+ const unsigned char *ciphertext,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *plaintext)
+{
+ u32 tmp[4];
+
+ tmp[0] = GETU32(ciphertext);
+ tmp[1] = GETU32(ciphertext + 4);
+ tmp[2] = GETU32(ciphertext + 8);
+ tmp[3] = GETU32(ciphertext + 12);
+
+ switch (keyBitLength) {
+ case 128:
+ camellia_decrypt128(keyTable, tmp);
+ break;
+ case 192:
+ /* fall through */
+ case 256:
+ camellia_decrypt256(keyTable, tmp);
+ break;
+ default:
+ break;
+ }
+ PUTU32(plaintext, tmp[0]);
+ PUTU32(plaintext + 4, tmp[1]);
+ PUTU32(plaintext + 8, tmp[2]);
+ PUTU32(plaintext + 12, tmp[3]);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/camellia.h b/grub-core/lib/libgcrypt-grub/cipher/camellia.h
new file mode 100644
index 0000000..c96f0b4
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/camellia.h
@@ -0,0 +1,83 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+/* camellia.h ver 1.2.0
+ *
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef HEADER_CAMELLIA_H
+#define HEADER_CAMELLIA_H
+
+/* To use Camellia with libraries it is often useful to keep the name
+ * space of the library clean. The following macro is thus useful:
+ *
+ * #define CAMELLIA_EXT_SYM_PREFIX foo_
+ *
+ * This prefixes all external symbols with "foo_".
+ */
+#ifdef HAVE_CONFIG_H
+#endif
+#ifdef CAMELLIA_EXT_SYM_PREFIX
+#define CAMELLIA_PREFIX1(x,y) x ## y
+#define CAMELLIA_PREFIX2(x,y) CAMELLIA_PREFIX1(x,y)
+#define CAMELLIA_PREFIX(x) CAMELLIA_PREFIX2(CAMELLIA_EXT_SYM_PREFIX,x)
+#define Camellia_Ekeygen CAMELLIA_PREFIX(Camellia_Ekeygen)
+#define Camellia_EncryptBlock CAMELLIA_PREFIX(Camellia_EncryptBlock)
+#define Camellia_DecryptBlock CAMELLIA_PREFIX(Camellia_DecryptBlock)
+#define camellia_decrypt128 CAMELLIA_PREFIX(camellia_decrypt128)
+#define camellia_decrypt256 CAMELLIA_PREFIX(camellia_decrypt256)
+#define camellia_encrypt128 CAMELLIA_PREFIX(camellia_encrypt128)
+#define camellia_encrypt256 CAMELLIA_PREFIX(camellia_encrypt256)
+#define camellia_setup128 CAMELLIA_PREFIX(camellia_setup128)
+#define camellia_setup192 CAMELLIA_PREFIX(camellia_setup192)
+#define camellia_setup256 CAMELLIA_PREFIX(camellia_setup256)
+#endif /*CAMELLIA_EXT_SYM_PREFIX*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CAMELLIA_BLOCK_SIZE 16
+#define CAMELLIA_TABLE_BYTE_LEN 272
+#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
+
+typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN];
+
+
+void Camellia_Ekeygen(const int keyBitLength,
+ const unsigned char *rawKey,
+ KEY_TABLE_TYPE keyTable);
+
+void Camellia_EncryptBlock(const int keyBitLength,
+ const unsigned char *plaintext,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *cipherText);
+
+void Camellia_DecryptBlock(const int keyBitLength,
+ const unsigned char *cipherText,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *plaintext);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* HEADER_CAMELLIA_H */
diff --git a/grub-core/lib/libgcrypt-grub/cipher/cast5.c b/grub-core/lib/libgcrypt-grub/cipher/cast5.c
new file mode 100644
index 0000000..984bb44
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/cast5.c
@@ -0,0 +1,586 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* cast5.c - CAST5 cipher (RFC2144)
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+/* Test vectors:
+ *
+ * 128-bit key = 01 23 45 67 12 34 56 78 23 45 67 89 34 56 78 9A
+ * plaintext = 01 23 45 67 89 AB CD EF
+ * ciphertext = 23 8B 4F E5 84 7E 44 B2
+ *
+ * 80-bit key = 01 23 45 67 12 34 56 78 23 45
+ * = 01 23 45 67 12 34 56 78 23 45 00 00 00 00 00 00
+ * plaintext = 01 23 45 67 89 AB CD EF
+ * ciphertext = EB 6A 71 1A 2C 02 27 1B
+ *
+ * 40-bit key = 01 23 45 67 12
+ * = 01 23 45 67 12 00 00 00 00 00 00 00 00 00 00 00
+ * plaintext = 01 23 45 67 89 AB CD EF
+ * ciphertext = 7A C8 16 D1 6E 9B 30 2E
+ */
+
+#include "g10lib.h"
+#include "types.h"
+#include "cipher.h"
+
+#define CAST5_BLOCKSIZE 8
+
+typedef struct {
+ u32 Km[16];
+ byte Kr[16];
+} CAST5_context;
+
+static gcry_err_code_t cast_setkey (void *c, const byte *key, unsigned keylen);
+static void encrypt_block (void *c, byte *outbuf, const byte *inbuf);
+static void decrypt_block (void *c, byte *outbuf, const byte *inbuf);
+
+
+
+
+static const u32 s1[256] = {
+0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949,
+0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e,
+0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d,
+0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0,
+0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7,
+0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935,
+0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d,
+0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50,
+0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe,
+0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3,
+0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167,
+0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291,
+0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779,
+0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2,
+0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511,
+0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d,
+0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5,
+0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324,
+0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c,
+0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc,
+0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d,
+0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96,
+0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a,
+0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d,
+0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd,
+0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6,
+0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9,
+0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872,
+0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c,
+0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e,
+0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9,
+0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf
+};
+static const u32 s2[256] = {
+0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651,
+0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3,
+0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb,
+0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806,
+0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b,
+0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359,
+0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b,
+0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c,
+0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34,
+0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb,
+0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd,
+0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860,
+0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b,
+0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304,
+0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b,
+0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf,
+0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c,
+0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13,
+0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f,
+0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6,
+0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6,
+0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58,
+0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906,
+0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d,
+0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6,
+0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4,
+0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6,
+0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f,
+0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249,
+0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa,
+0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9,
+0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1
+};
+static const u32 s3[256] = {
+0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90,
+0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5,
+0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e,
+0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240,
+0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5,
+0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b,
+0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71,
+0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04,
+0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82,
+0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15,
+0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2,
+0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176,
+0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148,
+0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc,
+0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341,
+0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e,
+0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51,
+0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f,
+0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a,
+0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b,
+0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b,
+0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5,
+0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45,
+0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536,
+0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc,
+0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0,
+0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69,
+0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2,
+0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49,
+0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d,
+0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a,
+0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783
+};
+static const u32 s4[256] = {
+0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1,
+0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf,
+0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15,
+0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121,
+0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25,
+0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5,
+0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb,
+0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5,
+0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d,
+0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6,
+0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23,
+0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003,
+0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6,
+0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119,
+0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24,
+0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a,
+0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79,
+0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df,
+0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26,
+0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab,
+0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7,
+0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417,
+0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2,
+0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2,
+0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a,
+0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919,
+0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef,
+0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876,
+0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab,
+0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04,
+0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282,
+0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2
+};
+static const u32 s5[256] = {
+0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f,
+0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a,
+0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff,
+0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02,
+0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a,
+0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7,
+0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9,
+0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981,
+0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774,
+0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655,
+0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2,
+0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910,
+0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1,
+0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da,
+0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049,
+0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f,
+0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba,
+0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be,
+0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3,
+0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840,
+0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4,
+0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2,
+0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7,
+0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5,
+0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e,
+0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e,
+0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801,
+0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad,
+0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0,
+0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20,
+0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8,
+0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4
+};
+static const u32 s6[256] = {
+0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac,
+0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138,
+0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367,
+0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98,
+0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072,
+0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3,
+0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd,
+0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8,
+0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9,
+0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54,
+0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387,
+0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc,
+0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf,
+0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf,
+0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f,
+0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289,
+0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950,
+0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f,
+0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b,
+0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be,
+0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13,
+0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976,
+0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0,
+0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891,
+0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da,
+0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc,
+0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084,
+0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25,
+0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121,
+0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5,
+0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd,
+0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f
+};
+static const u32 s7[256] = {
+0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f,
+0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de,
+0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43,
+0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19,
+0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2,
+0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516,
+0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88,
+0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816,
+0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756,
+0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a,
+0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264,
+0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688,
+0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28,
+0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3,
+0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7,
+0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06,
+0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033,
+0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a,
+0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566,
+0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509,
+0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962,
+0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e,
+0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c,
+0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c,
+0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285,
+0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301,
+0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be,
+0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767,
+0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647,
+0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914,
+0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c,
+0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3
+};
+static const u32 s8[256] = {
+0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5,
+0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc,
+0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd,
+0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d,
+0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2,
+0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862,
+0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc,
+0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c,
+0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e,
+0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039,
+0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8,
+0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42,
+0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5,
+0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472,
+0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225,
+0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c,
+0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb,
+0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054,
+0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70,
+0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc,
+0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c,
+0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3,
+0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4,
+0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101,
+0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f,
+0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e,
+0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a,
+0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c,
+0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384,
+0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c,
+0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82,
+0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e
+};
+
+
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+rol(int n, u32 x)
+{
+ __asm__("roll %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+#define rol(n,x) ( ((x) << (n)) | ((x) >> (32-(n))) )
+#endif
+
+#define F1(D,m,r) ( (I = ((m) + (D))), (I=rol((r),I)), \
+ (((s1[I >> 24] ^ s2[(I>>16)&0xff]) - s3[(I>>8)&0xff]) + s4[I&0xff]) )
+#define F2(D,m,r) ( (I = ((m) ^ (D))), (I=rol((r),I)), \
+ (((s1[I >> 24] - s2[(I>>16)&0xff]) + s3[(I>>8)&0xff]) ^ s4[I&0xff]) )
+#define F3(D,m,r) ( (I = ((m) - (D))), (I=rol((r),I)), \
+ (((s1[I >> 24] + s2[(I>>16)&0xff]) ^ s3[(I>>8)&0xff]) - s4[I&0xff]) )
+
+static void
+do_encrypt_block( CAST5_context *c, byte *outbuf, const byte *inbuf )
+{
+ u32 l, r, t;
+ u32 I; /* used by the Fx macros */
+ u32 *Km;
+ byte *Kr;
+
+ Km = c->Km;
+ Kr = c->Kr;
+
+ /* (L0,R0) <-- (m1...m64). (Split the plaintext into left and
+ * right 32-bit halves L0 = m1...m32 and R0 = m33...m64.)
+ */
+ l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+
+ /* (16 rounds) for i from 1 to 16, compute Li and Ri as follows:
+ * Li = Ri-1;
+ * Ri = Li-1 ^ f(Ri-1,Kmi,Kri), where f is defined in Section 2.2
+ * Rounds 1, 4, 7, 10, 13, and 16 use f function Type 1.
+ * Rounds 2, 5, 8, 11, and 14 use f function Type 2.
+ * Rounds 3, 6, 9, 12, and 15 use f function Type 3.
+ */
+
+ t = l; l = r; r = t ^ F1(r, Km[ 0], Kr[ 0]);
+ t = l; l = r; r = t ^ F2(r, Km[ 1], Kr[ 1]);
+ t = l; l = r; r = t ^ F3(r, Km[ 2], Kr[ 2]);
+ t = l; l = r; r = t ^ F1(r, Km[ 3], Kr[ 3]);
+ t = l; l = r; r = t ^ F2(r, Km[ 4], Kr[ 4]);
+ t = l; l = r; r = t ^ F3(r, Km[ 5], Kr[ 5]);
+ t = l; l = r; r = t ^ F1(r, Km[ 6], Kr[ 6]);
+ t = l; l = r; r = t ^ F2(r, Km[ 7], Kr[ 7]);
+ t = l; l = r; r = t ^ F3(r, Km[ 8], Kr[ 8]);
+ t = l; l = r; r = t ^ F1(r, Km[ 9], Kr[ 9]);
+ t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]);
+ t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]);
+ t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]);
+ t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]);
+ t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]);
+ t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]);
+
+ /* c1...c64 <-- (R16,L16). (Exchange final blocks L16, R16 and
+ * concatenate to form the ciphertext.) */
+ outbuf[0] = (r >> 24) & 0xff;
+ outbuf[1] = (r >> 16) & 0xff;
+ outbuf[2] = (r >> 8) & 0xff;
+ outbuf[3] = r & 0xff;
+ outbuf[4] = (l >> 24) & 0xff;
+ outbuf[5] = (l >> 16) & 0xff;
+ outbuf[6] = (l >> 8) & 0xff;
+ outbuf[7] = l & 0xff;
+}
+
+static void
+encrypt_block (void *context , byte *outbuf, const byte *inbuf)
+{
+ CAST5_context *c = (CAST5_context *) context;
+ do_encrypt_block (c, outbuf, inbuf);
+ _gcry_burn_stack (20+4*sizeof(void*));
+}
+
+
+static void
+do_decrypt_block (CAST5_context *c, byte *outbuf, const byte *inbuf )
+{
+ u32 l, r, t;
+ u32 I;
+ u32 *Km;
+ byte *Kr;
+
+ Km = c->Km;
+ Kr = c->Kr;
+
+ l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+
+ t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]);
+ t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]);
+ t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]);
+ t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]);
+ t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]);
+ t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]);
+ t = l; l = r; r = t ^ F1(r, Km[ 9], Kr[ 9]);
+ t = l; l = r; r = t ^ F3(r, Km[ 8], Kr[ 8]);
+ t = l; l = r; r = t ^ F2(r, Km[ 7], Kr[ 7]);
+ t = l; l = r; r = t ^ F1(r, Km[ 6], Kr[ 6]);
+ t = l; l = r; r = t ^ F3(r, Km[ 5], Kr[ 5]);
+ t = l; l = r; r = t ^ F2(r, Km[ 4], Kr[ 4]);
+ t = l; l = r; r = t ^ F1(r, Km[ 3], Kr[ 3]);
+ t = l; l = r; r = t ^ F3(r, Km[ 2], Kr[ 2]);
+ t = l; l = r; r = t ^ F2(r, Km[ 1], Kr[ 1]);
+ t = l; l = r; r = t ^ F1(r, Km[ 0], Kr[ 0]);
+
+ outbuf[0] = (r >> 24) & 0xff;
+ outbuf[1] = (r >> 16) & 0xff;
+ outbuf[2] = (r >> 8) & 0xff;
+ outbuf[3] = r & 0xff;
+ outbuf[4] = (l >> 24) & 0xff;
+ outbuf[5] = (l >> 16) & 0xff;
+ outbuf[6] = (l >> 8) & 0xff;
+ outbuf[7] = l & 0xff;
+}
+
+static void
+decrypt_block (void *context, byte *outbuf, const byte *inbuf)
+{
+ CAST5_context *c = (CAST5_context *) context;
+ do_decrypt_block (c, outbuf, inbuf);
+ _gcry_burn_stack (20+4*sizeof(void*));
+}
+
+
+
+
+static void
+key_schedule( u32 *x, u32 *z, u32 *k )
+{
+
+#define xi(i) ((x[(i)/4] >> (8*(3-((i)%4)))) & 0xff)
+#define zi(i) ((z[(i)/4] >> (8*(3-((i)%4)))) & 0xff)
+
+ z[0] = x[0] ^ s5[xi(13)]^s6[xi(15)]^s7[xi(12)]^s8[xi(14)]^s7[xi( 8)];
+ z[1] = x[2] ^ s5[zi( 0)]^s6[zi( 2)]^s7[zi( 1)]^s8[zi( 3)]^s8[xi(10)];
+ z[2] = x[3] ^ s5[zi( 7)]^s6[zi( 6)]^s7[zi( 5)]^s8[zi( 4)]^s5[xi( 9)];
+ z[3] = x[1] ^ s5[zi(10)]^s6[zi( 9)]^s7[zi(11)]^s8[zi( 8)]^s6[xi(11)];
+ k[0] = s5[zi( 8)]^s6[zi( 9)]^s7[zi( 7)]^s8[zi( 6)]^s5[zi( 2)];
+ k[1] = s5[zi(10)]^s6[zi(11)]^s7[zi( 5)]^s8[zi( 4)]^s6[zi( 6)];
+ k[2] = s5[zi(12)]^s6[zi(13)]^s7[zi( 3)]^s8[zi( 2)]^s7[zi( 9)];
+ k[3] = s5[zi(14)]^s6[zi(15)]^s7[zi( 1)]^s8[zi( 0)]^s8[zi(12)];
+
+ x[0] = z[2] ^ s5[zi( 5)]^s6[zi( 7)]^s7[zi( 4)]^s8[zi( 6)]^s7[zi( 0)];
+ x[1] = z[0] ^ s5[xi( 0)]^s6[xi( 2)]^s7[xi( 1)]^s8[xi( 3)]^s8[zi( 2)];
+ x[2] = z[1] ^ s5[xi( 7)]^s6[xi( 6)]^s7[xi( 5)]^s8[xi( 4)]^s5[zi( 1)];
+ x[3] = z[3] ^ s5[xi(10)]^s6[xi( 9)]^s7[xi(11)]^s8[xi( 8)]^s6[zi( 3)];
+ k[4] = s5[xi( 3)]^s6[xi( 2)]^s7[xi(12)]^s8[xi(13)]^s5[xi( 8)];
+ k[5] = s5[xi( 1)]^s6[xi( 0)]^s7[xi(14)]^s8[xi(15)]^s6[xi(13)];
+ k[6] = s5[xi( 7)]^s6[xi( 6)]^s7[xi( 8)]^s8[xi( 9)]^s7[xi( 3)];
+ k[7] = s5[xi( 5)]^s6[xi( 4)]^s7[xi(10)]^s8[xi(11)]^s8[xi( 7)];
+
+ z[0] = x[0] ^ s5[xi(13)]^s6[xi(15)]^s7[xi(12)]^s8[xi(14)]^s7[xi( 8)];
+ z[1] = x[2] ^ s5[zi( 0)]^s6[zi( 2)]^s7[zi( 1)]^s8[zi( 3)]^s8[xi(10)];
+ z[2] = x[3] ^ s5[zi( 7)]^s6[zi( 6)]^s7[zi( 5)]^s8[zi( 4)]^s5[xi( 9)];
+ z[3] = x[1] ^ s5[zi(10)]^s6[zi( 9)]^s7[zi(11)]^s8[zi( 8)]^s6[xi(11)];
+ k[8] = s5[zi( 3)]^s6[zi( 2)]^s7[zi(12)]^s8[zi(13)]^s5[zi( 9)];
+ k[9] = s5[zi( 1)]^s6[zi( 0)]^s7[zi(14)]^s8[zi(15)]^s6[zi(12)];
+ k[10]= s5[zi( 7)]^s6[zi( 6)]^s7[zi( 8)]^s8[zi( 9)]^s7[zi( 2)];
+ k[11]= s5[zi( 5)]^s6[zi( 4)]^s7[zi(10)]^s8[zi(11)]^s8[zi( 6)];
+
+ x[0] = z[2] ^ s5[zi( 5)]^s6[zi( 7)]^s7[zi( 4)]^s8[zi( 6)]^s7[zi( 0)];
+ x[1] = z[0] ^ s5[xi( 0)]^s6[xi( 2)]^s7[xi( 1)]^s8[xi( 3)]^s8[zi( 2)];
+ x[2] = z[1] ^ s5[xi( 7)]^s6[xi( 6)]^s7[xi( 5)]^s8[xi( 4)]^s5[zi( 1)];
+ x[3] = z[3] ^ s5[xi(10)]^s6[xi( 9)]^s7[xi(11)]^s8[xi( 8)]^s6[zi( 3)];
+ k[12]= s5[xi( 8)]^s6[xi( 9)]^s7[xi( 7)]^s8[xi( 6)]^s5[xi( 3)];
+ k[13]= s5[xi(10)]^s6[xi(11)]^s7[xi( 5)]^s8[xi( 4)]^s6[xi( 7)];
+ k[14]= s5[xi(12)]^s6[xi(13)]^s7[xi( 3)]^s8[xi( 2)]^s7[xi( 8)];
+ k[15]= s5[xi(14)]^s6[xi(15)]^s7[xi( 1)]^s8[xi( 0)]^s8[xi(13)];
+
+#undef xi
+#undef zi
+}
+
+
+static gcry_err_code_t
+do_cast_setkey( CAST5_context *c, const byte *key, unsigned keylen )
+{
+ static int initialized;
+ static const char* selftest_failed;
+ int i;
+ u32 x[4];
+ u32 z[4];
+ u32 k[16];
+
+ if( !initialized )
+ {
+ initialized = 1;
+ selftest_failed = selftest();
+ if( selftest_failed )
+ log_error ("CAST5 selftest failed (%s).\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if( keylen != 16 )
+ return GPG_ERR_INV_KEYLEN;
+
+ x[0] = key[0] << 24 | key[1] << 16 | key[2] << 8 | key[3];
+ x[1] = key[4] << 24 | key[5] << 16 | key[6] << 8 | key[7];
+ x[2] = key[8] << 24 | key[9] << 16 | key[10] << 8 | key[11];
+ x[3] = key[12] << 24 | key[13] << 16 | key[14] << 8 | key[15];
+
+ key_schedule( x, z, k );
+ for(i=0; i < 16; i++ )
+ c->Km[i] = k[i];
+ key_schedule( x, z, k );
+ for(i=0; i < 16; i++ )
+ c->Kr[i] = k[i] & 0x1f;
+
+ memset(&x,0, sizeof x);
+ memset(&z,0, sizeof z);
+ memset(&k,0, sizeof k);
+
+#undef xi
+#undef zi
+ return GPG_ERR_NO_ERROR;
+}
+
+static gcry_err_code_t
+cast_setkey (void *context, const byte *key, unsigned keylen )
+{
+ CAST5_context *c = (CAST5_context *) context;
+ gcry_err_code_t rc = do_cast_setkey (c, key, keylen);
+ _gcry_burn_stack (96+7*sizeof(void*));
+ return rc;
+}
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_cast5 =
+ {
+ "CAST5", NULL, NULL, CAST5_BLOCKSIZE, 128, sizeof (CAST5_context),
+ cast_setkey, encrypt_block, decrypt_block
+ };
+
+
+GRUB_MOD_INIT(gcry_cast5)
+{
+ grub_cipher_register (&_gcry_cipher_spec_cast5);
+}
+
+GRUB_MOD_FINI(gcry_cast5)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_cast5);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/cipher.h b/grub-core/lib/libgcrypt-grub/cipher/cipher.h
new file mode 100644
index 0000000..73c6779
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/cipher.h
@@ -0,0 +1,2 @@
+#include <grub/crypto.h>
+#include <cipher_wrap.h>
diff --git a/grub-core/lib/libgcrypt-grub/cipher/crc.c b/grub-core/lib/libgcrypt-grub/cipher/crc.c
new file mode 100644
index 0000000..e0f2bf2
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/crc.c
@@ -0,0 +1,318 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* crc.c - Cyclic redundancy checks.
+ * Copyright (C) 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ */
+
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+/* Table of CRCs of all 8-bit messages. Generated by running code
+ from RFC 1952 modified to print out the table. */
+static u32 crc32_table[256] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
+ 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
+ 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
+ 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
+ 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
+ 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
+ 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
+ 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
+ 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
+ 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
+ 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
+ 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
+ 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
+ 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
+ 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
+ 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
+ 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
+ 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
+};
+
+/*
+ * The following function was extracted from RFC 1952 by Simon
+ * Josefsson, for the Shishi project, and modified to be compatible
+ * with the modified CRC-32 used by RFC 1510, and subsequently
+ * modified for GNU Libgcrypt to allow it to be used for calculating
+ * both unmodified CRC-32 and modified CRC-32 values. Original
+ * copyright and notice from the document follows:
+ *
+ * Copyright (c) 1996 L. Peter Deutsch
+ *
+ * Permission is granted to copy and distribute this document for
+ * any purpose and without charge, including translations into
+ * other languages and incorporation into compilations, provided
+ * that the copyright notice and this notice are preserved, and
+ * that any substantive changes or deletions from the original are
+ * clearly marked.
+ *
+ * The copyright on RFCs, and consequently the function below, are
+ * supposedly also retroactively claimed by the Internet Society
+ * (according to rfc-editor@rfc-editor.org), with the following
+ * copyright notice:
+ *
+ * Copyright (C) The Internet Society. All Rights Reserved.
+ *
+ * This document and translations of it may be copied and furnished
+ * to others, and derivative works that comment on or otherwise
+ * explain it or assist in its implementation may be prepared,
+ * copied, published and distributed, in whole or in part, without
+ * restriction of any kind, provided that the above copyright
+ * notice and this paragraph are included on all such copies and
+ * derivative works. However, this document itself may not be
+ * modified in any way, such as by removing the copyright notice or
+ * references to the Internet Society or other Internet
+ * organizations, except as needed for the purpose of developing
+ * Internet standards in which case the procedures for copyrights
+ * defined in the Internet Standards process must be followed, or
+ * as required to translate it into languages other than English.
+ *
+ * The limited permissions granted above are perpetual and will not be
+ * revoked by the Internet Society or its successors or assigns.
+ *
+ * This document and the information contained herein is provided
+ * on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
+ * ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
+ * OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ */
+static u32
+update_crc32 (u32 crc, const void *buf_arg, size_t len)
+{
+ const char *buf = buf_arg;
+ size_t n;
+
+ for (n = 0; n < len; n++)
+ crc = crc32_table[(crc ^ buf[n]) & 0xff] ^ (crc >> 8);
+
+ return crc;
+}
+
+typedef struct
+{
+ u32 CRC;
+ byte buf[4];
+}
+CRC_CONTEXT;
+
+/* CRC32 */
+
+static void
+crc32_init (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC = 0 ^ 0xffffffffL;
+}
+
+static void
+crc32_write (void *context, const void *inbuf, size_t inlen)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ if (!inbuf)
+ return;
+ ctx->CRC = update_crc32 (ctx->CRC, inbuf, inlen);
+}
+
+static byte *
+crc32_read (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ return ctx->buf;
+}
+
+static void
+crc32_final (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC ^= 0xffffffffL;
+ ctx->buf[0] = (ctx->CRC >> 24) & 0xFF;
+ ctx->buf[1] = (ctx->CRC >> 16) & 0xFF;
+ ctx->buf[2] = (ctx->CRC >> 8) & 0xFF;
+ ctx->buf[3] = (ctx->CRC ) & 0xFF;
+}
+
+/* CRC32 a'la RFC 1510 */
+static void
+crc32rfc1510_init (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC = 0;
+}
+
+static void
+crc32rfc1510_final (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->buf[0] = (ctx->CRC >> 24) & 0xFF;
+ ctx->buf[1] = (ctx->CRC >> 16) & 0xFF;
+ ctx->buf[2] = (ctx->CRC >> 8) & 0xFF;
+ ctx->buf[3] = (ctx->CRC ) & 0xFF;
+}
+
+/* CRC24 a'la RFC 2440 */
+/*
+ * The following CRC 24 routines are adapted from RFC 2440, which has
+ * the following copyright notice:
+ *
+ * Copyright (C) The Internet Society (1998). All Rights Reserved.
+ *
+ * This document and translations of it may be copied and furnished
+ * to others, and derivative works that comment on or otherwise
+ * explain it or assist in its implementation may be prepared,
+ * copied, published and distributed, in whole or in part, without
+ * restriction of any kind, provided that the above copyright notice
+ * and this paragraph are included on all such copies and derivative
+ * works. However, this document itself may not be modified in any
+ * way, such as by removing the copyright notice or references to
+ * the Internet Society or other Internet organizations, except as
+ * needed for the purpose of developing Internet standards in which
+ * case the procedures for copyrights defined in the Internet
+ * Standards process must be followed, or as required to translate
+ * it into languages other than English.
+ *
+ * The limited permissions granted above are perpetual and will not be
+ * revoked by the Internet Society or its successors or assigns.
+ *
+ * This document and the information contained herein is provided on
+ * an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
+ * ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
+ * OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#define CRC24_INIT 0xb704ceL
+#define CRC24_POLY 0x1864cfbL
+
+static void
+crc24rfc2440_init (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC = CRC24_INIT;
+}
+
+static void
+crc24rfc2440_write (void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ int i;
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+
+ if (!inbuf)
+ return;
+
+ while (inlen--) {
+ ctx->CRC ^= (*inbuf++) << 16;
+ for (i = 0; i < 8; i++) {
+ ctx->CRC <<= 1;
+ if (ctx->CRC & 0x1000000)
+ ctx->CRC ^= CRC24_POLY;
+ }
+ }
+}
+
+static void
+crc24rfc2440_final (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->buf[0] = (ctx->CRC >> 16) & 0xFF;
+ ctx->buf[1] = (ctx->CRC >> 8) & 0xFF;
+ ctx->buf[2] = (ctx->CRC ) & 0xFF;
+}
+
+gcry_md_spec_t _gcry_digest_spec_crc32 =
+ {
+ "CRC32", NULL, 0, NULL, 4,
+ crc32_init, crc32_write, crc32_final, crc32_read,
+ sizeof (CRC_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+gcry_md_spec_t _gcry_digest_spec_crc32_rfc1510 =
+ {
+ "CRC32RFC1510", NULL, 0, NULL, 4,
+ crc32rfc1510_init, crc32_write,
+ crc32rfc1510_final, crc32_read,
+ sizeof (CRC_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+gcry_md_spec_t _gcry_digest_spec_crc24_rfc2440 =
+ {
+ "CRC24RFC2440", NULL, 0, NULL, 3,
+ crc24rfc2440_init, crc24rfc2440_write,
+ crc24rfc2440_final, crc32_read,
+ sizeof (CRC_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+
+GRUB_MOD_INIT(gcry_crc)
+{
+ grub_md_register (&_gcry_digest_spec_crc32);
+ grub_md_register (&_gcry_digest_spec_crc32_rfc1510);
+ grub_md_register (&_gcry_digest_spec_crc24_rfc2440);
+}
+
+GRUB_MOD_FINI(gcry_crc)
+{
+ grub_md_unregister (&_gcry_digest_spec_crc32);
+ grub_md_unregister (&_gcry_digest_spec_crc32_rfc1510);
+ grub_md_unregister (&_gcry_digest_spec_crc24_rfc2440);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/crypto.lst b/grub-core/lib/libgcrypt-grub/cipher/crypto.lst
new file mode 100644
index 0000000..5f33d7a
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/crypto.lst
@@ -0,0 +1,38 @@
+RIJNDAEL: gcry_rijndael
+RIJNDAEL192: gcry_rijndael
+RIJNDAEL256: gcry_rijndael
+AES128: gcry_rijndael
+AES-128: gcry_rijndael
+AES-192: gcry_rijndael
+AES-256: gcry_rijndael
+ARCFOUR: gcry_arcfour
+BLOWFISH: gcry_blowfish
+CAMELLIA128: gcry_camellia
+CAMELLIA192: gcry_camellia
+CAMELLIA256: gcry_camellia
+CAST5: gcry_cast5
+CRC32: gcry_crc
+CRC32RFC1510: gcry_crc
+CRC24RFC2440: gcry_crc
+DES: gcry_des
+3DES: gcry_des
+MD4: gcry_md4
+MD5: gcry_md5
+RFC2268_40: gcry_rfc2268
+AES: gcry_rijndael
+AES192: gcry_rijndael
+AES256: gcry_rijndael
+RIPEMD160: gcry_rmd160
+SEED: gcry_seed
+SERPENT128: gcry_serpent
+SERPENT192: gcry_serpent
+SERPENT256: gcry_serpent
+SHA1: gcry_sha1
+SHA224: gcry_sha256
+SHA256: gcry_sha256
+SHA512: gcry_sha512
+SHA384: gcry_sha512
+TIGER192: gcry_tiger
+TWOFISH: gcry_twofish
+TWOFISH128: gcry_twofish
+WHIRLPOOL: gcry_whirlpool
diff --git a/grub-core/lib/libgcrypt-grub/cipher/des.c b/grub-core/lib/libgcrypt-grub/cipher/des.c
new file mode 100644
index 0000000..48592df
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/des.c
@@ -0,0 +1,923 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* des.c - DES and Triple-DES encryption/decryption Algorithm
+ * Copyright (C) 1998, 1999, 2001, 2002, 2003,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * For a description of triple encryption, see:
+ * Bruce Schneier: Applied Cryptography. Second Edition.
+ * John Wiley & Sons, 1996. ISBN 0-471-12845-7. Pages 358 ff.
+ * This implementation is according to the definition of DES in FIPS
+ * PUB 46-2 from December 1993.
+ */
+
+
+/*
+ * Written by Michael Roth <mroth@nessie.de>, September 1998
+ */
+
+
+/*
+ * U S A G E
+ * ===========
+ *
+ * For DES or Triple-DES encryption/decryption you must initialize a proper
+ * encryption context with a key.
+ *
+ * A DES key is 64bit wide but only 56bits of the key are used. The remaining
+ * bits are parity bits and they will _not_ checked in this implementation, but
+ * simply ignored.
+ *
+ * For Triple-DES you could use either two 64bit keys or three 64bit keys.
+ * The parity bits will _not_ checked, too.
+ *
+ * After initializing a context with a key you could use this context to
+ * encrypt or decrypt data in 64bit blocks in Electronic Codebook Mode.
+ *
+ * (In the examples below the slashes at the beginning and ending of comments
+ * are omited.)
+ *
+ * DES Example
+ * -----------
+ * unsigned char key[8];
+ * unsigned char plaintext[8];
+ * unsigned char ciphertext[8];
+ * unsigned char recoverd[8];
+ * des_ctx context;
+ *
+ * * Fill 'key' and 'plaintext' with some data *
+ * ....
+ *
+ * * Set up the DES encryption context *
+ * des_setkey(context, key);
+ *
+ * * Encrypt the plaintext *
+ * des_ecb_encrypt(context, plaintext, ciphertext);
+ *
+ * * To recover the orginal plaintext from ciphertext use: *
+ * des_ecb_decrypt(context, ciphertext, recoverd);
+ *
+ *
+ * Triple-DES Example
+ * ------------------
+ * unsigned char key1[8];
+ * unsigned char key2[8];
+ * unsigned char key3[8];
+ * unsigned char plaintext[8];
+ * unsigned char ciphertext[8];
+ * unsigned char recoverd[8];
+ * tripledes_ctx context;
+ *
+ * * If you would like to use two 64bit keys, fill 'key1' and'key2'
+ * then setup the encryption context: *
+ * tripledes_set2keys(context, key1, key2);
+ *
+ * * To use three 64bit keys with Triple-DES use: *
+ * tripledes_set3keys(context, key1, key2, key3);
+ *
+ * * Encrypting plaintext with Triple-DES *
+ * tripledes_ecb_encrypt(context, plaintext, ciphertext);
+ *
+ * * Decrypting ciphertext to recover the plaintext with Triple-DES *
+ * tripledes_ecb_decrypt(context, ciphertext, recoverd);
+ *
+ *
+ * Selftest
+ * --------
+ * char *error_msg;
+ *
+ * * To perform a selftest of this DES/Triple-DES implementation use the
+ * function selftest(). It will return an error string if there are
+ * some problems with this library. *
+ *
+ * if ( (error_msg = selftest()) )
+ * {
+ * fprintf(stderr, "An error in the DES/Tripple-DES implementation occured: %s\n", error_msg);
+ * abort();
+ * }
+ */
+
+
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+#if defined(__GNUC__) && defined(__GNU_LIBRARY__)
+#define working_memcmp memcmp
+#else
+/*
+ * According to the SunOS man page, memcmp returns indeterminate sign
+ * depending on whether characters are signed or not.
+ */
+static int
+working_memcmp( const char *a, const char *b, size_t n )
+{
+ for( ; n; n--, a++, b++ )
+ if( *a != *b )
+ return (int)(*(byte*)a) - (int)(*(byte*)b);
+ return 0;
+}
+#endif
+
+/*
+ * Encryption/Decryption context of DES
+ */
+typedef struct _des_ctx
+ {
+ u32 encrypt_subkeys[32];
+ u32 decrypt_subkeys[32];
+ }
+des_ctx[1];
+
+/*
+ * Encryption/Decryption context of Triple-DES
+ */
+typedef struct _tripledes_ctx
+ {
+ u32 encrypt_subkeys[96];
+ u32 decrypt_subkeys[96];
+ struct {
+ int no_weak_key;
+ } flags;
+ }
+tripledes_ctx[1];
+
+static void des_key_schedule (const byte *, u32 *);
+static int des_setkey (struct _des_ctx *, const byte *);
+static int des_ecb_crypt (struct _des_ctx *, const byte *, byte *, int);
+static int tripledes_set3keys (struct _tripledes_ctx *,
+ const byte *, const byte *, const byte *);
+static int tripledes_ecb_crypt (struct _tripledes_ctx *,
+ const byte *, byte *, int);
+static int is_weak_key ( const byte *key );
+
+static int initialized;
+
+
+
+
+/*
+ * The s-box values are permuted according to the 'primitive function P'
+ * and are rotated one bit to the left.
+ */
+static u32 sbox1[64] =
+{
+ 0x01010400, 0x00000000, 0x00010000, 0x01010404, 0x01010004, 0x00010404, 0x00000004, 0x00010000,
+ 0x00000400, 0x01010400, 0x01010404, 0x00000400, 0x01000404, 0x01010004, 0x01000000, 0x00000004,
+ 0x00000404, 0x01000400, 0x01000400, 0x00010400, 0x00010400, 0x01010000, 0x01010000, 0x01000404,
+ 0x00010004, 0x01000004, 0x01000004, 0x00010004, 0x00000000, 0x00000404, 0x00010404, 0x01000000,
+ 0x00010000, 0x01010404, 0x00000004, 0x01010000, 0x01010400, 0x01000000, 0x01000000, 0x00000400,
+ 0x01010004, 0x00010000, 0x00010400, 0x01000004, 0x00000400, 0x00000004, 0x01000404, 0x00010404,
+ 0x01010404, 0x00010004, 0x01010000, 0x01000404, 0x01000004, 0x00000404, 0x00010404, 0x01010400,
+ 0x00000404, 0x01000400, 0x01000400, 0x00000000, 0x00010004, 0x00010400, 0x00000000, 0x01010004
+};
+
+static u32 sbox2[64] =
+{
+ 0x80108020, 0x80008000, 0x00008000, 0x00108020, 0x00100000, 0x00000020, 0x80100020, 0x80008020,
+ 0x80000020, 0x80108020, 0x80108000, 0x80000000, 0x80008000, 0x00100000, 0x00000020, 0x80100020,
+ 0x00108000, 0x00100020, 0x80008020, 0x00000000, 0x80000000, 0x00008000, 0x00108020, 0x80100000,
+ 0x00100020, 0x80000020, 0x00000000, 0x00108000, 0x00008020, 0x80108000, 0x80100000, 0x00008020,
+ 0x00000000, 0x00108020, 0x80100020, 0x00100000, 0x80008020, 0x80100000, 0x80108000, 0x00008000,
+ 0x80100000, 0x80008000, 0x00000020, 0x80108020, 0x00108020, 0x00000020, 0x00008000, 0x80000000,
+ 0x00008020, 0x80108000, 0x00100000, 0x80000020, 0x00100020, 0x80008020, 0x80000020, 0x00100020,
+ 0x00108000, 0x00000000, 0x80008000, 0x00008020, 0x80000000, 0x80100020, 0x80108020, 0x00108000
+};
+
+static u32 sbox3[64] =
+{
+ 0x00000208, 0x08020200, 0x00000000, 0x08020008, 0x08000200, 0x00000000, 0x00020208, 0x08000200,
+ 0x00020008, 0x08000008, 0x08000008, 0x00020000, 0x08020208, 0x00020008, 0x08020000, 0x00000208,
+ 0x08000000, 0x00000008, 0x08020200, 0x00000200, 0x00020200, 0x08020000, 0x08020008, 0x00020208,
+ 0x08000208, 0x00020200, 0x00020000, 0x08000208, 0x00000008, 0x08020208, 0x00000200, 0x08000000,
+ 0x08020200, 0x08000000, 0x00020008, 0x00000208, 0x00020000, 0x08020200, 0x08000200, 0x00000000,
+ 0x00000200, 0x00020008, 0x08020208, 0x08000200, 0x08000008, 0x00000200, 0x00000000, 0x08020008,
+ 0x08000208, 0x00020000, 0x08000000, 0x08020208, 0x00000008, 0x00020208, 0x00020200, 0x08000008,
+ 0x08020000, 0x08000208, 0x00000208, 0x08020000, 0x00020208, 0x00000008, 0x08020008, 0x00020200
+};
+
+static u32 sbox4[64] =
+{
+ 0x00802001, 0x00002081, 0x00002081, 0x00000080, 0x00802080, 0x00800081, 0x00800001, 0x00002001,
+ 0x00000000, 0x00802000, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00800080, 0x00800001,
+ 0x00000001, 0x00002000, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002001, 0x00002080,
+ 0x00800081, 0x00000001, 0x00002080, 0x00800080, 0x00002000, 0x00802080, 0x00802081, 0x00000081,
+ 0x00800080, 0x00800001, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00000000, 0x00802000,
+ 0x00002080, 0x00800080, 0x00800081, 0x00000001, 0x00802001, 0x00002081, 0x00002081, 0x00000080,
+ 0x00802081, 0x00000081, 0x00000001, 0x00002000, 0x00800001, 0x00002001, 0x00802080, 0x00800081,
+ 0x00002001, 0x00002080, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002000, 0x00802080
+};
+
+static u32 sbox5[64] =
+{
+ 0x00000100, 0x02080100, 0x02080000, 0x42000100, 0x00080000, 0x00000100, 0x40000000, 0x02080000,
+ 0x40080100, 0x00080000, 0x02000100, 0x40080100, 0x42000100, 0x42080000, 0x00080100, 0x40000000,
+ 0x02000000, 0x40080000, 0x40080000, 0x00000000, 0x40000100, 0x42080100, 0x42080100, 0x02000100,
+ 0x42080000, 0x40000100, 0x00000000, 0x42000000, 0x02080100, 0x02000000, 0x42000000, 0x00080100,
+ 0x00080000, 0x42000100, 0x00000100, 0x02000000, 0x40000000, 0x02080000, 0x42000100, 0x40080100,
+ 0x02000100, 0x40000000, 0x42080000, 0x02080100, 0x40080100, 0x00000100, 0x02000000, 0x42080000,
+ 0x42080100, 0x00080100, 0x42000000, 0x42080100, 0x02080000, 0x00000000, 0x40080000, 0x42000000,
+ 0x00080100, 0x02000100, 0x40000100, 0x00080000, 0x00000000, 0x40080000, 0x02080100, 0x40000100
+};
+
+static u32 sbox6[64] =
+{
+ 0x20000010, 0x20400000, 0x00004000, 0x20404010, 0x20400000, 0x00000010, 0x20404010, 0x00400000,
+ 0x20004000, 0x00404010, 0x00400000, 0x20000010, 0x00400010, 0x20004000, 0x20000000, 0x00004010,
+ 0x00000000, 0x00400010, 0x20004010, 0x00004000, 0x00404000, 0x20004010, 0x00000010, 0x20400010,
+ 0x20400010, 0x00000000, 0x00404010, 0x20404000, 0x00004010, 0x00404000, 0x20404000, 0x20000000,
+ 0x20004000, 0x00000010, 0x20400010, 0x00404000, 0x20404010, 0x00400000, 0x00004010, 0x20000010,
+ 0x00400000, 0x20004000, 0x20000000, 0x00004010, 0x20000010, 0x20404010, 0x00404000, 0x20400000,
+ 0x00404010, 0x20404000, 0x00000000, 0x20400010, 0x00000010, 0x00004000, 0x20400000, 0x00404010,
+ 0x00004000, 0x00400010, 0x20004010, 0x00000000, 0x20404000, 0x20000000, 0x00400010, 0x20004010
+};
+
+static u32 sbox7[64] =
+{
+ 0x00200000, 0x04200002, 0x04000802, 0x00000000, 0x00000800, 0x04000802, 0x00200802, 0x04200800,
+ 0x04200802, 0x00200000, 0x00000000, 0x04000002, 0x00000002, 0x04000000, 0x04200002, 0x00000802,
+ 0x04000800, 0x00200802, 0x00200002, 0x04000800, 0x04000002, 0x04200000, 0x04200800, 0x00200002,
+ 0x04200000, 0x00000800, 0x00000802, 0x04200802, 0x00200800, 0x00000002, 0x04000000, 0x00200800,
+ 0x04000000, 0x00200800, 0x00200000, 0x04000802, 0x04000802, 0x04200002, 0x04200002, 0x00000002,
+ 0x00200002, 0x04000000, 0x04000800, 0x00200000, 0x04200800, 0x00000802, 0x00200802, 0x04200800,
+ 0x00000802, 0x04000002, 0x04200802, 0x04200000, 0x00200800, 0x00000000, 0x00000002, 0x04200802,
+ 0x00000000, 0x00200802, 0x04200000, 0x00000800, 0x04000002, 0x04000800, 0x00000800, 0x00200002
+};
+
+static u32 sbox8[64] =
+{
+ 0x10001040, 0x00001000, 0x00040000, 0x10041040, 0x10000000, 0x10001040, 0x00000040, 0x10000000,
+ 0x00040040, 0x10040000, 0x10041040, 0x00041000, 0x10041000, 0x00041040, 0x00001000, 0x00000040,
+ 0x10040000, 0x10000040, 0x10001000, 0x00001040, 0x00041000, 0x00040040, 0x10040040, 0x10041000,
+ 0x00001040, 0x00000000, 0x00000000, 0x10040040, 0x10000040, 0x10001000, 0x00041040, 0x00040000,
+ 0x00041040, 0x00040000, 0x10041000, 0x00001000, 0x00000040, 0x10040040, 0x00001000, 0x00041040,
+ 0x10001000, 0x00000040, 0x10000040, 0x10040000, 0x10040040, 0x10000000, 0x00040000, 0x10001040,
+ 0x00000000, 0x10041040, 0x00040040, 0x10000040, 0x10040000, 0x10001000, 0x10001040, 0x00000000,
+ 0x10041040, 0x00041000, 0x00041000, 0x00001040, 0x00001040, 0x00040040, 0x10000000, 0x10041000
+};
+
+
+/*
+ * These two tables are part of the 'permuted choice 1' function.
+ * In this implementation several speed improvements are done.
+ */
+static u32 leftkey_swap[16] =
+{
+ 0x00000000, 0x00000001, 0x00000100, 0x00000101,
+ 0x00010000, 0x00010001, 0x00010100, 0x00010101,
+ 0x01000000, 0x01000001, 0x01000100, 0x01000101,
+ 0x01010000, 0x01010001, 0x01010100, 0x01010101
+};
+
+static u32 rightkey_swap[16] =
+{
+ 0x00000000, 0x01000000, 0x00010000, 0x01010000,
+ 0x00000100, 0x01000100, 0x00010100, 0x01010100,
+ 0x00000001, 0x01000001, 0x00010001, 0x01010001,
+ 0x00000101, 0x01000101, 0x00010101, 0x01010101,
+};
+
+
+
+/*
+ * Numbers of left shifts per round for encryption subkeys.
+ * To calculate the decryption subkeys we just reverse the
+ * ordering of the calculated encryption subkeys. So their
+ * is no need for a decryption rotate tab.
+ */
+static byte encrypt_rotate_tab[16] =
+{
+ 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
+};
+
+
+
+/*
+ * Table with weak DES keys sorted in ascending order.
+ * In DES their are 64 known keys which are weak. They are weak
+ * because they produce only one, two or four different
+ * subkeys in the subkey scheduling process.
+ * The keys in this table have all their parity bits cleared.
+ */
+static byte weak_keys[64][8] =
+{
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /*w*/
+ { 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e },
+ { 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0 },
+ { 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe },
+ { 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x0e }, /*sw*/
+ { 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e, 0x00 },
+ { 0x00, 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0, 0xfe },
+ { 0x00, 0x1e, 0xfe, 0xe0, 0x00, 0x0e, 0xfe, 0xf0 },
+ { 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf0 }, /*sw*/
+ { 0x00, 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e, 0xfe },
+ { 0x00, 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0, 0x00 },
+ { 0x00, 0xe0, 0xfe, 0x1e, 0x00, 0xf0, 0xfe, 0x0e },
+ { 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe }, /*sw*/
+ { 0x00, 0xfe, 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0 },
+ { 0x00, 0xfe, 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e },
+ { 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00 },
+ { 0x1e, 0x00, 0x00, 0x1e, 0x0e, 0x00, 0x00, 0x0e },
+ { 0x1e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x0e, 0x00 }, /*sw*/
+ { 0x1e, 0x00, 0xe0, 0xfe, 0x0e, 0x00, 0xf0, 0xfe },
+ { 0x1e, 0x00, 0xfe, 0xe0, 0x0e, 0x00, 0xfe, 0xf0 },
+ { 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00 },
+ { 0x1e, 0x1e, 0x1e, 0x1e, 0x0e, 0x0e, 0x0e, 0x0e }, /*w*/
+ { 0x1e, 0x1e, 0xe0, 0xe0, 0x0e, 0x0e, 0xf0, 0xf0 },
+ { 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e, 0xfe, 0xfe },
+ { 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0, 0x00, 0xfe },
+ { 0x1e, 0xe0, 0x1e, 0xe0, 0x0e, 0xf0, 0x0e, 0xf0 }, /*sw*/
+ { 0x1e, 0xe0, 0xe0, 0x1e, 0x0e, 0xf0, 0xf0, 0x0e },
+ { 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0, 0xfe, 0x00 },
+ { 0x1e, 0xfe, 0x00, 0xe0, 0x0e, 0xfe, 0x00, 0xf0 },
+ { 0x1e, 0xfe, 0x1e, 0xfe, 0x0e, 0xfe, 0x0e, 0xfe }, /*sw*/
+ { 0x1e, 0xfe, 0xe0, 0x00, 0x0e, 0xfe, 0xf0, 0x00 },
+ { 0x1e, 0xfe, 0xfe, 0x1e, 0x0e, 0xfe, 0xfe, 0x0e },
+ { 0xe0, 0x00, 0x00, 0xe0, 0xf0, 0x00, 0x00, 0xf0 },
+ { 0xe0, 0x00, 0x1e, 0xfe, 0xf0, 0x00, 0x0e, 0xfe },
+ { 0xe0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf0, 0x00 }, /*sw*/
+ { 0xe0, 0x00, 0xfe, 0x1e, 0xf0, 0x00, 0xfe, 0x0e },
+ { 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e, 0x00, 0xfe },
+ { 0xe0, 0x1e, 0x1e, 0xe0, 0xf0, 0x0e, 0x0e, 0xf0 },
+ { 0xe0, 0x1e, 0xe0, 0x1e, 0xf0, 0x0e, 0xf0, 0x0e }, /*sw*/
+ { 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e, 0xfe, 0x00 },
+ { 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00 },
+ { 0xe0, 0xe0, 0x1e, 0x1e, 0xf0, 0xf0, 0x0e, 0x0e },
+ { 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0 }, /*w*/
+ { 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0, 0xfe, 0xfe },
+ { 0xe0, 0xfe, 0x00, 0x1e, 0xf0, 0xfe, 0x00, 0x0e },
+ { 0xe0, 0xfe, 0x1e, 0x00, 0xf0, 0xfe, 0x0e, 0x00 },
+ { 0xe0, 0xfe, 0xe0, 0xfe, 0xf0, 0xfe, 0xf0, 0xfe }, /*sw*/
+ { 0xe0, 0xfe, 0xfe, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0 },
+ { 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe },
+ { 0xfe, 0x00, 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0 },
+ { 0xfe, 0x00, 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e },
+ { 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00 }, /*sw*/
+ { 0xfe, 0x1e, 0x00, 0xe0, 0xfe, 0x0e, 0x00, 0xf0 },
+ { 0xfe, 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e, 0xfe },
+ { 0xfe, 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0, 0x00 },
+ { 0xfe, 0x1e, 0xfe, 0x1e, 0xfe, 0x0e, 0xfe, 0x0e }, /*sw*/
+ { 0xfe, 0xe0, 0x00, 0x1e, 0xfe, 0xf0, 0x00, 0x0e },
+ { 0xfe, 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e, 0x00 },
+ { 0xfe, 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0, 0xfe },
+ { 0xfe, 0xe0, 0xfe, 0xe0, 0xfe, 0xf0, 0xfe, 0xf0 }, /*sw*/
+ { 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00 },
+ { 0xfe, 0xfe, 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e },
+ { 0xfe, 0xfe, 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0 },
+ { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe } /*w*/
+};
+
+
+
+/*
+ * Macro to swap bits across two words.
+ */
+#define DO_PERMUTATION(a, temp, b, offset, mask) \
+ temp = ((a>>offset) ^ b) & mask; \
+ b ^= temp; \
+ a ^= temp<<offset;
+
+
+/*
+ * This performs the 'initial permutation' of the data to be encrypted
+ * or decrypted. Additionally the resulting two words are rotated one bit
+ * to the left.
+ */
+#define INITIAL_PERMUTATION(left, temp, right) \
+ DO_PERMUTATION(left, temp, right, 4, 0x0f0f0f0f) \
+ DO_PERMUTATION(left, temp, right, 16, 0x0000ffff) \
+ DO_PERMUTATION(right, temp, left, 2, 0x33333333) \
+ DO_PERMUTATION(right, temp, left, 8, 0x00ff00ff) \
+ right = (right << 1) | (right >> 31); \
+ temp = (left ^ right) & 0xaaaaaaaa; \
+ right ^= temp; \
+ left ^= temp; \
+ left = (left << 1) | (left >> 31);
+
+/*
+ * The 'inverse initial permutation'.
+ */
+#define FINAL_PERMUTATION(left, temp, right) \
+ left = (left << 31) | (left >> 1); \
+ temp = (left ^ right) & 0xaaaaaaaa; \
+ left ^= temp; \
+ right ^= temp; \
+ right = (right << 31) | (right >> 1); \
+ DO_PERMUTATION(right, temp, left, 8, 0x00ff00ff) \
+ DO_PERMUTATION(right, temp, left, 2, 0x33333333) \
+ DO_PERMUTATION(left, temp, right, 16, 0x0000ffff) \
+ DO_PERMUTATION(left, temp, right, 4, 0x0f0f0f0f)
+
+
+/*
+ * A full DES round including 'expansion function', 'sbox substitution'
+ * and 'primitive function P' but without swapping the left and right word.
+ * Please note: The data in 'from' and 'to' is already rotated one bit to
+ * the left, done in the initial permutation.
+ */
+#define DES_ROUND(from, to, work, subkey) \
+ work = from ^ *subkey++; \
+ to ^= sbox8[ work & 0x3f ]; \
+ to ^= sbox6[ (work>>8) & 0x3f ]; \
+ to ^= sbox4[ (work>>16) & 0x3f ]; \
+ to ^= sbox2[ (work>>24) & 0x3f ]; \
+ work = ((from << 28) | (from >> 4)) ^ *subkey++; \
+ to ^= sbox7[ work & 0x3f ]; \
+ to ^= sbox5[ (work>>8) & 0x3f ]; \
+ to ^= sbox3[ (work>>16) & 0x3f ]; \
+ to ^= sbox1[ (work>>24) & 0x3f ];
+
+/*
+ * Macros to convert 8 bytes from/to 32bit words.
+ */
+#define READ_64BIT_DATA(data, left, right) \
+ left = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]; \
+ right = (data[4] << 24) | (data[5] << 16) | (data[6] << 8) | data[7];
+
+#define WRITE_64BIT_DATA(data, left, right) \
+ data[0] = (left >> 24) &0xff; data[1] = (left >> 16) &0xff; \
+ data[2] = (left >> 8) &0xff; data[3] = left &0xff; \
+ data[4] = (right >> 24) &0xff; data[5] = (right >> 16) &0xff; \
+ data[6] = (right >> 8) &0xff; data[7] = right &0xff;
+
+/*
+ * Handy macros for encryption and decryption of data
+ */
+#define des_ecb_encrypt(ctx, from, to) des_ecb_crypt(ctx, from, to, 0)
+#define des_ecb_decrypt(ctx, from, to) des_ecb_crypt(ctx, from, to, 1)
+#define tripledes_ecb_encrypt(ctx, from, to) tripledes_ecb_crypt(ctx,from,to,0)
+#define tripledes_ecb_decrypt(ctx, from, to) tripledes_ecb_crypt(ctx,from,to,1)
+
+
+
+
+
+
+/*
+ * des_key_schedule(): Calculate 16 subkeys pairs (even/odd) for
+ * 16 encryption rounds.
+ * To calculate subkeys for decryption the caller
+ * have to reorder the generated subkeys.
+ *
+ * rawkey: 8 Bytes of key data
+ * subkey: Array of at least 32 u32s. Will be filled
+ * with calculated subkeys.
+ *
+ */
+static void
+des_key_schedule (const byte * rawkey, u32 * subkey)
+{
+ u32 left, right, work;
+ int round;
+
+ READ_64BIT_DATA (rawkey, left, right)
+
+ DO_PERMUTATION (right, work, left, 4, 0x0f0f0f0f)
+ DO_PERMUTATION (right, work, left, 0, 0x10101010)
+
+ left = ((leftkey_swap[(left >> 0) & 0xf] << 3)
+ | (leftkey_swap[(left >> 8) & 0xf] << 2)
+ | (leftkey_swap[(left >> 16) & 0xf] << 1)
+ | (leftkey_swap[(left >> 24) & 0xf])
+ | (leftkey_swap[(left >> 5) & 0xf] << 7)
+ | (leftkey_swap[(left >> 13) & 0xf] << 6)
+ | (leftkey_swap[(left >> 21) & 0xf] << 5)
+ | (leftkey_swap[(left >> 29) & 0xf] << 4));
+
+ left &= 0x0fffffff;
+
+ right = ((rightkey_swap[(right >> 1) & 0xf] << 3)
+ | (rightkey_swap[(right >> 9) & 0xf] << 2)
+ | (rightkey_swap[(right >> 17) & 0xf] << 1)
+ | (rightkey_swap[(right >> 25) & 0xf])
+ | (rightkey_swap[(right >> 4) & 0xf] << 7)
+ | (rightkey_swap[(right >> 12) & 0xf] << 6)
+ | (rightkey_swap[(right >> 20) & 0xf] << 5)
+ | (rightkey_swap[(right >> 28) & 0xf] << 4));
+
+ right &= 0x0fffffff;
+
+ for (round = 0; round < 16; ++round)
+ {
+ left = ((left << encrypt_rotate_tab[round])
+ | (left >> (28 - encrypt_rotate_tab[round]))) & 0x0fffffff;
+ right = ((right << encrypt_rotate_tab[round])
+ | (right >> (28 - encrypt_rotate_tab[round]))) & 0x0fffffff;
+
+ *subkey++ = (((left << 4) & 0x24000000)
+ | ((left << 28) & 0x10000000)
+ | ((left << 14) & 0x08000000)
+ | ((left << 18) & 0x02080000)
+ | ((left << 6) & 0x01000000)
+ | ((left << 9) & 0x00200000)
+ | ((left >> 1) & 0x00100000)
+ | ((left << 10) & 0x00040000)
+ | ((left << 2) & 0x00020000)
+ | ((left >> 10) & 0x00010000)
+ | ((right >> 13) & 0x00002000)
+ | ((right >> 4) & 0x00001000)
+ | ((right << 6) & 0x00000800)
+ | ((right >> 1) & 0x00000400)
+ | ((right >> 14) & 0x00000200)
+ | (right & 0x00000100)
+ | ((right >> 5) & 0x00000020)
+ | ((right >> 10) & 0x00000010)
+ | ((right >> 3) & 0x00000008)
+ | ((right >> 18) & 0x00000004)
+ | ((right >> 26) & 0x00000002)
+ | ((right >> 24) & 0x00000001));
+
+ *subkey++ = (((left << 15) & 0x20000000)
+ | ((left << 17) & 0x10000000)
+ | ((left << 10) & 0x08000000)
+ | ((left << 22) & 0x04000000)
+ | ((left >> 2) & 0x02000000)
+ | ((left << 1) & 0x01000000)
+ | ((left << 16) & 0x00200000)
+ | ((left << 11) & 0x00100000)
+ | ((left << 3) & 0x00080000)
+ | ((left >> 6) & 0x00040000)
+ | ((left << 15) & 0x00020000)
+ | ((left >> 4) & 0x00010000)
+ | ((right >> 2) & 0x00002000)
+ | ((right << 8) & 0x00001000)
+ | ((right >> 14) & 0x00000808)
+ | ((right >> 9) & 0x00000400)
+ | ((right) & 0x00000200)
+ | ((right << 7) & 0x00000100)
+ | ((right >> 7) & 0x00000020)
+ | ((right >> 3) & 0x00000011)
+ | ((right << 2) & 0x00000004)
+ | ((right >> 21) & 0x00000002));
+ }
+}
+
+
+/*
+ * Fill a DES context with subkeys calculated from a 64bit key.
+ * Does not check parity bits, but simply ignore them.
+ * Does not check for weak keys.
+ */
+static int
+des_setkey (struct _des_ctx *ctx, const byte * key)
+{
+ static const char *selftest_failed;
+ int i;
+
+ if (!fips_mode () && !initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+
+ if (selftest_failed)
+ log_error ("%s\n", selftest_failed);
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ des_key_schedule (key, ctx->encrypt_subkeys);
+ _gcry_burn_stack (32);
+
+ for(i=0; i<32; i+=2)
+ {
+ ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[30-i];
+ ctx->decrypt_subkeys[i+1] = ctx->encrypt_subkeys[31-i];
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * Electronic Codebook Mode DES encryption/decryption of data according
+ * to 'mode'.
+ */
+static int
+des_ecb_crypt (struct _des_ctx *ctx, const byte * from, byte * to, int mode)
+{
+ u32 left, right, work;
+ u32 *keys;
+
+ keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys;
+
+ READ_64BIT_DATA (from, left, right)
+ INITIAL_PERMUTATION (left, work, right)
+
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+
+ FINAL_PERMUTATION (right, work, left)
+ WRITE_64BIT_DATA (to, right, left)
+
+ return 0;
+}
+
+
+
+/*
+ * Fill a Triple-DES context with subkeys calculated from two 64bit keys.
+ * Does not check the parity bits of the keys, but simply ignore them.
+ * Does not check for weak keys.
+ */
+
+
+
+/*
+ * Fill a Triple-DES context with subkeys calculated from three 64bit keys.
+ * Does not check the parity bits of the keys, but simply ignore them.
+ * Does not check for weak keys.
+ */
+static int
+tripledes_set3keys (struct _tripledes_ctx *ctx,
+ const byte * key1,
+ const byte * key2,
+ const byte * key3)
+{
+ static const char *selftest_failed;
+ int i;
+
+ if (!fips_mode () && !initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+
+ if (selftest_failed)
+ log_error ("%s\n", selftest_failed);
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ des_key_schedule (key1, ctx->encrypt_subkeys);
+ des_key_schedule (key2, &(ctx->decrypt_subkeys[32]));
+ des_key_schedule (key3, &(ctx->encrypt_subkeys[64]));
+ _gcry_burn_stack (32);
+
+ for(i=0; i<32; i+=2)
+ {
+ ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[94-i];
+ ctx->decrypt_subkeys[i+1] = ctx->encrypt_subkeys[95-i];
+
+ ctx->encrypt_subkeys[i+32] = ctx->decrypt_subkeys[62-i];
+ ctx->encrypt_subkeys[i+33] = ctx->decrypt_subkeys[63-i];
+
+ ctx->decrypt_subkeys[i+64] = ctx->encrypt_subkeys[30-i];
+ ctx->decrypt_subkeys[i+65] = ctx->encrypt_subkeys[31-i];
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * Electronic Codebook Mode Triple-DES encryption/decryption of data
+ * according to 'mode'. Sometimes this mode is named 'EDE' mode
+ * (Encryption-Decryption-Encryption).
+ */
+static int
+tripledes_ecb_crypt (struct _tripledes_ctx *ctx, const byte * from,
+ byte * to, int mode)
+{
+ u32 left, right, work;
+ u32 *keys;
+
+ keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys;
+
+ READ_64BIT_DATA (from, left, right)
+ INITIAL_PERMUTATION (left, work, right)
+
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+
+ FINAL_PERMUTATION (right, work, left)
+ WRITE_64BIT_DATA (to, right, left)
+
+ return 0;
+}
+
+
+
+
+
+/*
+ * Check whether the 8 byte key is weak.
+ * Does not check the parity bits of the key but simple ignore them.
+ */
+static int
+is_weak_key ( const byte *key )
+{
+ byte work[8];
+ int i, left, right, middle, cmp_result;
+
+ /* clear parity bits */
+ for(i=0; i<8; ++i)
+ work[i] = key[i] & 0xfe;
+
+ /* binary search in the weak key table */
+ left = 0;
+ right = 63;
+ while(left <= right)
+ {
+ middle = (left + right) / 2;
+
+ if ( !(cmp_result=working_memcmp(work, weak_keys[middle], 8)) )
+ return -1;
+
+ if ( cmp_result > 0 )
+ left = middle + 1;
+ else
+ right = middle - 1;
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * Performs a selftest of this DES/Triple-DES implementation.
+ * Returns an string with the error text on failure.
+ * Returns NULL if all is ok.
+ */
+
+
+static gcry_err_code_t
+do_tripledes_setkey ( void *context, const byte *key, unsigned keylen )
+{
+ struct _tripledes_ctx *ctx = (struct _tripledes_ctx *) context;
+
+ if( keylen != 24 )
+ return GPG_ERR_INV_KEYLEN;
+
+ tripledes_set3keys ( ctx, key, key+8, key+16);
+
+ if (ctx->flags.no_weak_key)
+ ; /* Detection has been disabled. */
+ else if (is_weak_key (key) || is_weak_key (key+8) || is_weak_key (key+16))
+ {
+ _gcry_burn_stack (64);
+ return GPG_ERR_WEAK_KEY;
+ }
+ _gcry_burn_stack (64);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+
+
+static void
+do_tripledes_encrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _tripledes_ctx *ctx = (struct _tripledes_ctx *) context;
+
+ tripledes_ecb_encrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+static void
+do_tripledes_decrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _tripledes_ctx *ctx = (struct _tripledes_ctx *) context;
+ tripledes_ecb_decrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+static gcry_err_code_t
+do_des_setkey (void *context, const byte *key, unsigned keylen)
+{
+ struct _des_ctx *ctx = (struct _des_ctx *) context;
+
+ if (keylen != 8)
+ return GPG_ERR_INV_KEYLEN;
+
+ des_setkey (ctx, key);
+
+ if (is_weak_key (key)) {
+ _gcry_burn_stack (64);
+ return GPG_ERR_WEAK_KEY;
+ }
+ _gcry_burn_stack (64);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static void
+do_des_encrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _des_ctx *ctx = (struct _des_ctx *) context;
+
+ des_ecb_encrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+static void
+do_des_decrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _des_ctx *ctx = (struct _des_ctx *) context;
+
+ des_ecb_decrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+
+
+
+/*
+ Self-test section.
+ */
+
+
+/* Selftest for TripleDES. */
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_des =
+ {
+ "DES", NULL, NULL, 8, 64, sizeof (struct _des_ctx),
+ do_des_setkey, do_des_encrypt, do_des_decrypt
+ };
+
+static gcry_cipher_oid_spec_t oids_tripledes[] =
+ {
+ { "1.2.840.113549.3.7", GCRY_CIPHER_MODE_CBC },
+ /* Teletrust specific OID for 3DES. */
+ { "1.3.36.3.1.3.2.1", GCRY_CIPHER_MODE_CBC },
+ /* pbeWithSHAAnd3_KeyTripleDES_CBC */
+ { "1.2.840.113549.1.12.1.3", GCRY_CIPHER_MODE_CBC },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_tripledes =
+ {
+ "3DES", NULL, oids_tripledes, 8, 192, sizeof (struct _tripledes_ctx),
+ do_tripledes_setkey, do_tripledes_encrypt, do_tripledes_decrypt
+ };
+
+
+
+GRUB_MOD_INIT(gcry_des)
+{
+ grub_cipher_register (&_gcry_cipher_spec_des);
+ grub_cipher_register (&_gcry_cipher_spec_tripledes);
+}
+
+GRUB_MOD_FINI(gcry_des)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_des);
+ grub_cipher_unregister (&_gcry_cipher_spec_tripledes);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/dsa.c b/grub-core/lib/libgcrypt-grub/cipher/dsa.c
new file mode 100644
index 0000000..296d2ef
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/dsa.c
@@ -0,0 +1,1063 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* dsa.c - DSA signature algorithm
+ * Copyright (C) 1998, 2000, 2001, 2002, 2003,
+ * 2006, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t q; /* group order */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+} DSA_public_key;
+
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t q; /* group order */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+ gcry_mpi_t x; /* secret exponent */
+} DSA_secret_key;
+
+
+/* A structure used to hold domain parameters. */
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t q; /* group order */
+ gcry_mpi_t g; /* group generator */
+} dsa_domain_t;
+
+
+/* A sample 1024 bit DSA key used for the selftests. */
+static const char sample_secret_key[] =
+"(private-key"
+" (dsa"
+" (p #00AD7C0025BA1A15F775F3F2D673718391D00456978D347B33D7B49E7F32EDAB"
+" 96273899DD8B2BB46CD6ECA263FAF04A28903503D59062A8865D2AE8ADFB5191"
+" CF36FFB562D0E2F5809801A1F675DAE59698A9E01EFE8D7DCFCA084F4C6F5A44"
+" 44D499A06FFAEA5E8EF5E01F2FD20A7B7EF3F6968AFBA1FB8D91F1559D52D8777B#)"
+" (q #00EB7B5751D25EBBB7BD59D920315FD840E19AEBF9#)"
+" (g #1574363387FDFD1DDF38F4FBE135BB20C7EE4772FB94C337AF86EA8E49666503"
+" AE04B6BE81A2F8DD095311E0217ACA698A11E6C5D33CCDAE71498ED35D13991E"
+" B02F09AB40BD8F4C5ED8C75DA779D0AE104BC34C960B002377068AB4B5A1F984"
+" 3FBA91F537F1B7CAC4D8DD6D89B0D863AF7025D549F9C765D2FC07EE208F8D15#)"
+" (y #64B11EF8871BE4AB572AA810D5D3CA11A6CDBC637A8014602C72960DB135BF46"
+" A1816A724C34F87330FC9E187C5D66897A04535CC2AC9164A7150ABFA8179827"
+" 6E45831AB811EEE848EBB24D9F5F2883B6E5DDC4C659DEF944DCFD80BF4D0A20"
+" 42CAA7DC289F0C5A9D155F02D3D551DB741A81695B74D4C8F477F9C7838EB0FB#)"
+" (x #11D54E4ADBD3034160F2CED4B7CD292A4EBF3EC0#)))";
+/* A sample 1024 bit DSA key used for the selftests (public only). */
+static const char sample_public_key[] =
+"(public-key"
+" (dsa"
+" (p #00AD7C0025BA1A15F775F3F2D673718391D00456978D347B33D7B49E7F32EDAB"
+" 96273899DD8B2BB46CD6ECA263FAF04A28903503D59062A8865D2AE8ADFB5191"
+" CF36FFB562D0E2F5809801A1F675DAE59698A9E01EFE8D7DCFCA084F4C6F5A44"
+" 44D499A06FFAEA5E8EF5E01F2FD20A7B7EF3F6968AFBA1FB8D91F1559D52D8777B#)"
+" (q #00EB7B5751D25EBBB7BD59D920315FD840E19AEBF9#)"
+" (g #1574363387FDFD1DDF38F4FBE135BB20C7EE4772FB94C337AF86EA8E49666503"
+" AE04B6BE81A2F8DD095311E0217ACA698A11E6C5D33CCDAE71498ED35D13991E"
+" B02F09AB40BD8F4C5ED8C75DA779D0AE104BC34C960B002377068AB4B5A1F984"
+" 3FBA91F537F1B7CAC4D8DD6D89B0D863AF7025D549F9C765D2FC07EE208F8D15#)"
+" (y #64B11EF8871BE4AB572AA810D5D3CA11A6CDBC637A8014602C72960DB135BF46"
+" A1816A724C34F87330FC9E187C5D66897A04535CC2AC9164A7150ABFA8179827"
+" 6E45831AB811EEE848EBB24D9F5F2883B6E5DDC4C659DEF944DCFD80BF4D0A20"
+" 42CAA7DC289F0C5A9D155F02D3D551DB741A81695B74D4C8F477F9C7838EB0FB#)))";
+
+
+
+
+static gcry_mpi_t gen_k (gcry_mpi_t q);
+static int test_keys (DSA_secret_key *sk, unsigned int qbits);
+static int check_secret_key (DSA_secret_key *sk);
+static gpg_err_code_t generate (DSA_secret_key *sk,
+ unsigned int nbits,
+ unsigned int qbits,
+ int transient_key,
+ dsa_domain_t *domain,
+ gcry_mpi_t **ret_factors);
+static void sign (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t input,
+ DSA_secret_key *skey);
+static int verify (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t input,
+ DSA_public_key *pkey);
+
+static void (*progress_cb) (void *,const char *, int, int, int );
+static void *progress_cb_data;
+
+
+void
+_gcry_register_pk_dsa_progress (void (*cb) (void *, const char *,
+ int, int, int),
+ void *cb_data)
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+
+static void
+progress (int c)
+{
+ if (progress_cb)
+ progress_cb (progress_cb_data, "pk_dsa", c, 0, 0);
+}
+
+
+/*
+ * Generate a random secret exponent k less than q.
+ */
+static gcry_mpi_t
+gen_k( gcry_mpi_t q )
+{
+ gcry_mpi_t k = mpi_alloc_secure( mpi_get_nlimbs(q) );
+ unsigned int nbits = mpi_get_nbits(q);
+ unsigned int nbytes = (nbits+7)/8;
+ char *rndbuf = NULL;
+
+ if ( DBG_CIPHER )
+ log_debug("choosing a random k ");
+ for (;;)
+ {
+ if( DBG_CIPHER )
+ progress('.');
+
+ if ( !rndbuf || nbits < 32 )
+ {
+ gcry_free(rndbuf);
+ rndbuf = gcry_random_bytes_secure( (nbits+7)/8, GCRY_STRONG_RANDOM );
+ }
+ else
+ { /* Change only some of the higher bits. We could improve
+ this by directly requesting more memory at the first call
+ to get_random_bytes() and use this the here maybe it is
+ easier to do this directly in random.c. */
+ char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
+ memcpy( rndbuf,pp, 4 );
+ gcry_free(pp);
+ }
+ _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
+ if ( mpi_test_bit( k, nbits-1 ) )
+ mpi_set_highbit( k, nbits-1 );
+ else
+ {
+ mpi_set_highbit( k, nbits-1 );
+ mpi_clear_bit( k, nbits-1 );
+ }
+
+ if( !(mpi_cmp( k, q ) < 0) ) /* check: k < q */
+ {
+ if( DBG_CIPHER )
+ progress('+');
+ continue; /* no */
+ }
+ if( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */
+ {
+ if( DBG_CIPHER )
+ progress('-');
+ continue; /* no */
+ }
+ break; /* okay */
+ }
+ gcry_free(rndbuf);
+ if( DBG_CIPHER )
+ progress('\n');
+
+ return k;
+}
+
+
+/* Check that a freshly generated key actually works. Returns 0 on success. */
+static int
+test_keys (DSA_secret_key *sk, unsigned int qbits)
+{
+ int result = -1; /* Default to failure. */
+ DSA_public_key pk;
+ gcry_mpi_t data = gcry_mpi_new (qbits);
+ gcry_mpi_t sig_a = gcry_mpi_new (qbits);
+ gcry_mpi_t sig_b = gcry_mpi_new (qbits);
+
+ /* Put the relevant parameters into a public key structure. */
+ pk.p = sk->p;
+ pk.q = sk->q;
+ pk.g = sk->g;
+ pk.y = sk->y;
+
+ /* Create a random plaintext. */
+ gcry_mpi_randomize (data, qbits, GCRY_WEAK_RANDOM);
+
+ /* Sign DATA using the secret key. */
+ sign (sig_a, sig_b, data, sk);
+
+ /* Verify the signature using the public key. */
+ if ( !verify (sig_a, sig_b, data, &pk) )
+ goto leave; /* Signature does not match. */
+
+ /* Modify the data and check that the signing fails. */
+ gcry_mpi_add_ui (data, data, 1);
+ if ( verify (sig_a, sig_b, data, &pk) )
+ goto leave; /* Signature matches but should not. */
+
+ result = 0; /* The test succeeded. */
+
+ leave:
+ gcry_mpi_release (sig_b);
+ gcry_mpi_release (sig_a);
+ gcry_mpi_release (data);
+ return result;
+}
+
+
+
+/*
+ Generate a DSA key pair with a key of size NBITS. If transient_key
+ is true the key is generated using the standard RNG and not the
+ very secure one.
+
+ Returns: 2 structures filled with all needed values
+ and an array with the n-1 factors of (p-1)
+ */
+static gpg_err_code_t
+generate (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits,
+ int transient_key, dsa_domain_t *domain, gcry_mpi_t **ret_factors )
+{
+ gcry_mpi_t p; /* the prime */
+ gcry_mpi_t q; /* the 160 bit prime factor */
+ gcry_mpi_t g; /* the generator */
+ gcry_mpi_t y; /* g^x mod p */
+ gcry_mpi_t x; /* the secret exponent */
+ gcry_mpi_t h, e; /* helper */
+ unsigned char *rndbuf;
+ gcry_random_level_t random_level;
+
+ if (qbits)
+ ; /* Caller supplied qbits. Use this value. */
+ else if ( nbits >= 512 && nbits <= 1024 )
+ qbits = 160;
+ else if ( nbits == 2048 )
+ qbits = 224;
+ else if ( nbits == 3072 )
+ qbits = 256;
+ else if ( nbits == 7680 )
+ qbits = 384;
+ else if ( nbits == 15360 )
+ qbits = 512;
+ else
+ return GPG_ERR_INV_VALUE;
+
+ if (qbits < 160 || qbits > 512 || (qbits%8) )
+ return GPG_ERR_INV_VALUE;
+ if (nbits < 2*qbits || nbits > 15360)
+ return GPG_ERR_INV_VALUE;
+
+ if (fips_mode ())
+ {
+ if (nbits < 1024)
+ return GPG_ERR_INV_VALUE;
+ if (transient_key)
+ return GPG_ERR_INV_VALUE;
+ }
+
+ if (domain->p && domain->q && domain->g)
+ {
+ /* Domain parameters are given; use them. */
+ p = mpi_copy (domain->p);
+ q = mpi_copy (domain->q);
+ g = mpi_copy (domain->g);
+ gcry_assert (mpi_get_nbits (p) == nbits);
+ gcry_assert (mpi_get_nbits (q) == qbits);
+ h = mpi_alloc (0);
+ e = NULL;
+ }
+ else
+ {
+ /* Generate new domain parameters. */
+ p = _gcry_generate_elg_prime (1, nbits, qbits, NULL, ret_factors);
+ /* Get q out of factors. */
+ q = mpi_copy ((*ret_factors)[0]);
+ gcry_assert (mpi_get_nbits (q) == qbits);
+
+ /* Find a generator g (h and e are helpers).
+ e = (p-1)/q */
+ e = mpi_alloc (mpi_get_nlimbs (p));
+ mpi_sub_ui (e, p, 1);
+ mpi_fdiv_q (e, e, q);
+ g = mpi_alloc (mpi_get_nlimbs (p));
+ h = mpi_alloc_set_ui (1); /* (We start with 2.) */
+ do
+ {
+ mpi_add_ui (h, h, 1);
+ /* g = h^e mod p */
+ gcry_mpi_powm (g, h, e, p);
+ }
+ while (!mpi_cmp_ui (g, 1)); /* Continue until g != 1. */
+ }
+
+ /* Select a random number X with the property:
+ * 0 < x < q-1
+ * This must be a very good random number because this is the secret
+ * part. The random quality depends on the transient_key flag. */
+ random_level = transient_key ? GCRY_STRONG_RANDOM : GCRY_VERY_STRONG_RANDOM;
+ if (DBG_CIPHER)
+ log_debug("choosing a random x%s", transient_key? " (transient-key)":"");
+ gcry_assert( qbits >= 160 );
+ x = mpi_alloc_secure( mpi_get_nlimbs(q) );
+ mpi_sub_ui( h, q, 1 ); /* put q-1 into h */
+ rndbuf = NULL;
+ do
+ {
+ if( DBG_CIPHER )
+ progress('.');
+ if( !rndbuf )
+ rndbuf = gcry_random_bytes_secure ((qbits+7)/8, random_level);
+ else
+ { /* Change only some of the higher bits (= 2 bytes)*/
+ char *r = gcry_random_bytes_secure (2, random_level);
+ memcpy(rndbuf, r, 2 );
+ gcry_free(r);
+ }
+
+ _gcry_mpi_set_buffer( x, rndbuf, (qbits+7)/8, 0 );
+ mpi_clear_highbit( x, qbits+1 );
+ }
+ while ( !( mpi_cmp_ui( x, 0 )>0 && mpi_cmp( x, h )<0 ) );
+ gcry_free(rndbuf);
+ mpi_free( e );
+ mpi_free( h );
+
+ /* y = g^x mod p */
+ y = mpi_alloc( mpi_get_nlimbs(p) );
+ gcry_mpi_powm( y, g, x, p );
+
+ if( DBG_CIPHER )
+ {
+ progress('\n');
+ log_mpidump("dsa p", p );
+ log_mpidump("dsa q", q );
+ log_mpidump("dsa g", g );
+ log_mpidump("dsa y", y );
+ log_mpidump("dsa x", x );
+ }
+
+ /* Copy the stuff to the key structures. */
+ sk->p = p;
+ sk->q = q;
+ sk->g = g;
+ sk->y = y;
+ sk->x = x;
+
+ /* Now we can test our keys (this should never fail!). */
+ if ( test_keys (sk, qbits) )
+ {
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->g); sk->g = NULL;
+ gcry_mpi_release (sk->y); sk->y = NULL;
+ gcry_mpi_release (sk->x); sk->x = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ return GPG_ERR_SELFTEST_FAILED;
+ }
+ return 0;
+}
+
+
+/* Generate a DSA key pair with a key of size NBITS using the
+ algorithm given in FIPS-186-3. If USE_FIPS186_2 is true,
+ FIPS-186-2 is used and thus the length is restricted to 1024/160.
+ If DERIVEPARMS is not NULL it may contain a seed value. If domain
+ parameters are specified in DOMAIN, DERIVEPARMS may not be given
+ and NBITS and QBITS must match the specified domain parameters. */
+static gpg_err_code_t
+generate_fips186 (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits,
+ gcry_sexp_t deriveparms, int use_fips186_2,
+ dsa_domain_t *domain,
+ int *r_counter, void **r_seed, size_t *r_seedlen,
+ gcry_mpi_t *r_h)
+{
+ gpg_err_code_t ec;
+ struct {
+ gcry_sexp_t sexp;
+ const void *seed;
+ size_t seedlen;
+ } initial_seed = { NULL, NULL, 0 };
+ gcry_mpi_t prime_q = NULL;
+ gcry_mpi_t prime_p = NULL;
+ gcry_mpi_t value_g = NULL; /* The generator. */
+ gcry_mpi_t value_y = NULL; /* g^x mod p */
+ gcry_mpi_t value_x = NULL; /* The secret exponent. */
+ gcry_mpi_t value_h = NULL; /* Helper. */
+ gcry_mpi_t value_e = NULL; /* Helper. */
+
+ /* Preset return values. */
+ *r_counter = 0;
+ *r_seed = NULL;
+ *r_seedlen = 0;
+ *r_h = NULL;
+
+ /* Derive QBITS from NBITS if requested */
+ if (!qbits)
+ {
+ if (nbits == 1024)
+ qbits = 160;
+ else if (nbits == 2048)
+ qbits = 224;
+ else if (nbits == 3072)
+ qbits = 256;
+ }
+
+ /* Check that QBITS and NBITS match the standard. Note that FIPS
+ 186-3 uses N for QBITS and L for NBITS. */
+ if (nbits == 1024 && qbits == 160)
+ ;
+ else if (nbits == 2048 && qbits == 224)
+ ;
+ else if (nbits == 2048 && qbits == 256)
+ ;
+ else if (nbits == 3072 && qbits == 256)
+ ;
+ else
+ return GPG_ERR_INV_VALUE;
+
+ if (domain->p && domain->q && domain->g)
+ {
+ /* Domain parameters are given; use them. */
+ prime_p = mpi_copy (domain->p);
+ prime_q = mpi_copy (domain->q);
+ value_g = mpi_copy (domain->g);
+ gcry_assert (mpi_get_nbits (prime_p) == nbits);
+ gcry_assert (mpi_get_nbits (prime_q) == qbits);
+ gcry_assert (!deriveparms);
+ ec = 0;
+ }
+ else
+ {
+ /* Generate new domain parameters. */
+
+ /* Get an initial seed value. */
+ if (deriveparms)
+ {
+ initial_seed.sexp = gcry_sexp_find_token (deriveparms, "seed", 0);
+ if (initial_seed.sexp)
+ initial_seed.seed = gcry_sexp_nth_data (initial_seed.sexp, 1,
+ &initial_seed.seedlen);
+ }
+
+ /* Fixme: Enable 186-3 after it has been approved and after fixing
+ the generation function. */
+ /* if (use_fips186_2) */
+ (void)use_fips186_2;
+ ec = _gcry_generate_fips186_2_prime (nbits, qbits,
+ initial_seed.seed,
+ initial_seed.seedlen,
+ &prime_q, &prime_p,
+ r_counter,
+ r_seed, r_seedlen);
+ /* else */
+ /* ec = _gcry_generate_fips186_3_prime (nbits, qbits, NULL, 0, */
+ /* &prime_q, &prime_p, */
+ /* r_counter, */
+ /* r_seed, r_seedlen, NULL); */
+ gcry_sexp_release (initial_seed.sexp);
+ if (ec)
+ goto leave;
+
+ /* Find a generator g (h and e are helpers).
+ e = (p-1)/q */
+ value_e = mpi_alloc_like (prime_p);
+ mpi_sub_ui (value_e, prime_p, 1);
+ mpi_fdiv_q (value_e, value_e, prime_q );
+ value_g = mpi_alloc_like (prime_p);
+ value_h = mpi_alloc_set_ui (1);
+ do
+ {
+ mpi_add_ui (value_h, value_h, 1);
+ /* g = h^e mod p */
+ mpi_powm (value_g, value_h, value_e, prime_p);
+ }
+ while (!mpi_cmp_ui (value_g, 1)); /* Continue until g != 1. */
+ }
+
+
+ /* Select a random number x with: 0 < x < q */
+ value_x = gcry_mpi_snew (qbits);
+ do
+ {
+ if( DBG_CIPHER )
+ progress('.');
+ gcry_mpi_randomize (value_x, qbits, GCRY_VERY_STRONG_RANDOM);
+ mpi_clear_highbit (value_x, qbits+1);
+ }
+ while (!(mpi_cmp_ui (value_x, 0) > 0 && mpi_cmp (value_x, prime_q) < 0));
+
+ /* y = g^x mod p */
+ value_y = mpi_alloc_like (prime_p);
+ gcry_mpi_powm (value_y, value_g, value_x, prime_p);
+
+ if (DBG_CIPHER)
+ {
+ progress('\n');
+ log_mpidump("dsa p", prime_p );
+ log_mpidump("dsa q", prime_q );
+ log_mpidump("dsa g", value_g );
+ log_mpidump("dsa y", value_y );
+ log_mpidump("dsa x", value_x );
+ log_mpidump("dsa h", value_h );
+ }
+
+ /* Copy the stuff to the key structures. */
+ sk->p = prime_p; prime_p = NULL;
+ sk->q = prime_q; prime_q = NULL;
+ sk->g = value_g; value_g = NULL;
+ sk->y = value_y; value_y = NULL;
+ sk->x = value_x; value_x = NULL;
+ *r_h = value_h; value_h = NULL;
+
+ leave:
+ gcry_mpi_release (prime_p);
+ gcry_mpi_release (prime_q);
+ gcry_mpi_release (value_g);
+ gcry_mpi_release (value_y);
+ gcry_mpi_release (value_x);
+ gcry_mpi_release (value_h);
+ gcry_mpi_release (value_e);
+
+ /* As a last step test this keys (this should never fail of course). */
+ if (!ec && test_keys (sk, qbits) )
+ {
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->g); sk->g = NULL;
+ gcry_mpi_release (sk->y); sk->y = NULL;
+ gcry_mpi_release (sk->x); sk->x = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ ec = GPG_ERR_SELFTEST_FAILED;
+ }
+
+ if (ec)
+ {
+ *r_counter = 0;
+ gcry_free (*r_seed); *r_seed = NULL;
+ *r_seedlen = 0;
+ gcry_mpi_release (*r_h); *r_h = NULL;
+ }
+
+ return ec;
+}
+
+
+
+/*
+ Test whether the secret key is valid.
+ Returns: if this is a valid key.
+ */
+static int
+check_secret_key( DSA_secret_key *sk )
+{
+ int rc;
+ gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs(sk->y) );
+
+ gcry_mpi_powm( y, sk->g, sk->x, sk->p );
+ rc = !mpi_cmp( y, sk->y );
+ mpi_free( y );
+ return rc;
+}
+
+
+
+/*
+ Make a DSA signature from HASH and put it into r and s.
+ */
+static void
+sign(gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t hash, DSA_secret_key *skey )
+{
+ gcry_mpi_t k;
+ gcry_mpi_t kinv;
+ gcry_mpi_t tmp;
+
+ /* Select a random k with 0 < k < q */
+ k = gen_k( skey->q );
+
+ /* r = (a^k mod p) mod q */
+ gcry_mpi_powm( r, skey->g, k, skey->p );
+ mpi_fdiv_r( r, r, skey->q );
+
+ /* kinv = k^(-1) mod q */
+ kinv = mpi_alloc( mpi_get_nlimbs(k) );
+ mpi_invm(kinv, k, skey->q );
+
+ /* s = (kinv * ( hash + x * r)) mod q */
+ tmp = mpi_alloc( mpi_get_nlimbs(skey->p) );
+ mpi_mul( tmp, skey->x, r );
+ mpi_add( tmp, tmp, hash );
+ mpi_mulm( s , kinv, tmp, skey->q );
+
+ mpi_free(k);
+ mpi_free(kinv);
+ mpi_free(tmp);
+}
+
+
+/*
+ Returns true if the signature composed from R and S is valid.
+ */
+static int
+verify (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t hash, DSA_public_key *pkey )
+{
+ int rc;
+ gcry_mpi_t w, u1, u2, v;
+ gcry_mpi_t base[3];
+ gcry_mpi_t ex[3];
+
+ if( !(mpi_cmp_ui( r, 0 ) > 0 && mpi_cmp( r, pkey->q ) < 0) )
+ return 0; /* assertion 0 < r < q failed */
+ if( !(mpi_cmp_ui( s, 0 ) > 0 && mpi_cmp( s, pkey->q ) < 0) )
+ return 0; /* assertion 0 < s < q failed */
+
+ w = mpi_alloc( mpi_get_nlimbs(pkey->q) );
+ u1 = mpi_alloc( mpi_get_nlimbs(pkey->q) );
+ u2 = mpi_alloc( mpi_get_nlimbs(pkey->q) );
+ v = mpi_alloc( mpi_get_nlimbs(pkey->p) );
+
+ /* w = s^(-1) mod q */
+ mpi_invm( w, s, pkey->q );
+
+ /* u1 = (hash * w) mod q */
+ mpi_mulm( u1, hash, w, pkey->q );
+
+ /* u2 = r * w mod q */
+ mpi_mulm( u2, r, w, pkey->q );
+
+ /* v = g^u1 * y^u2 mod p mod q */
+ base[0] = pkey->g; ex[0] = u1;
+ base[1] = pkey->y; ex[1] = u2;
+ base[2] = NULL; ex[2] = NULL;
+ mpi_mulpowm( v, base, ex, pkey->p );
+ mpi_fdiv_r( v, v, pkey->q );
+
+ rc = !mpi_cmp( v, r );
+
+ mpi_free(w);
+ mpi_free(u1);
+ mpi_free(u2);
+ mpi_free(v);
+
+ return rc;
+}
+
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+
+static gcry_err_code_t
+dsa_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ gpg_err_code_t ec;
+ DSA_secret_key sk;
+ gcry_sexp_t l1;
+ unsigned int qbits = 0;
+ gcry_sexp_t deriveparms = NULL;
+ gcry_sexp_t seedinfo = NULL;
+ int transient_key = 0;
+ int use_fips186_2 = 0;
+ int use_fips186 = 0;
+ dsa_domain_t domain;
+
+ (void)algo; /* No need to check it. */
+ (void)evalue; /* Not required for DSA. */
+
+ memset (&domain, 0, sizeof domain);
+
+ if (genparms)
+ {
+ gcry_sexp_t domainsexp;
+
+ /* Parse the optional qbits element. */
+ l1 = gcry_sexp_find_token (genparms, "qbits", 0);
+ if (l1)
+ {
+ char buf[50];
+ const char *s;
+ size_t n;
+
+ s = gcry_sexp_nth_data (l1, 1, &n);
+ if (!s || n >= DIM (buf) - 1 )
+ {
+ gcry_sexp_release (l1);
+ return GPG_ERR_INV_OBJ; /* No value or value too large. */
+ }
+ memcpy (buf, s, n);
+ buf[n] = 0;
+ qbits = (unsigned int)strtoul (buf, NULL, 0);
+ gcry_sexp_release (l1);
+ }
+
+ /* Parse the optional transient-key flag. */
+ l1 = gcry_sexp_find_token (genparms, "transient-key", 0);
+ if (l1)
+ {
+ transient_key = 1;
+ gcry_sexp_release (l1);
+ }
+
+ /* Get the optional derive parameters. */
+ deriveparms = gcry_sexp_find_token (genparms, "derive-parms", 0);
+
+ /* Parse the optional "use-fips186" flags. */
+ l1 = gcry_sexp_find_token (genparms, "use-fips186", 0);
+ if (l1)
+ {
+ use_fips186 = 1;
+ gcry_sexp_release (l1);
+ }
+ l1 = gcry_sexp_find_token (genparms, "use-fips186-2", 0);
+ if (l1)
+ {
+ use_fips186_2 = 1;
+ gcry_sexp_release (l1);
+ }
+
+ /* Check whether domain parameters are given. */
+ domainsexp = gcry_sexp_find_token (genparms, "domain", 0);
+ if (domainsexp)
+ {
+ /* DERIVEPARMS can't be used together with domain
+ parameters. NBITS abnd QBITS may not be specified
+ because there values are derived from the domain
+ parameters. */
+ if (deriveparms || qbits || nbits)
+ {
+ gcry_sexp_release (domainsexp);
+ gcry_sexp_release (deriveparms);
+ return GPG_ERR_INV_VALUE;
+ }
+
+ /* Put all domain parameters into the domain object. */
+ l1 = gcry_sexp_find_token (domainsexp, "p", 0);
+ domain.p = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ l1 = gcry_sexp_find_token (domainsexp, "q", 0);
+ domain.q = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ l1 = gcry_sexp_find_token (domainsexp, "g", 0);
+ domain.g = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ gcry_sexp_release (domainsexp);
+
+ /* Check that all domain parameters are available. */
+ if (!domain.p || !domain.q || !domain.g)
+ {
+ gcry_mpi_release (domain.p);
+ gcry_mpi_release (domain.q);
+ gcry_mpi_release (domain.g);
+ gcry_sexp_release (deriveparms);
+ return GPG_ERR_MISSING_VALUE;
+ }
+
+ /* Get NBITS and QBITS from the domain parameters. */
+ nbits = mpi_get_nbits (domain.p);
+ qbits = mpi_get_nbits (domain.q);
+ }
+ }
+
+ if (deriveparms || use_fips186 || use_fips186_2 || fips_mode ())
+ {
+ int counter;
+ void *seed;
+ size_t seedlen;
+ gcry_mpi_t h_value;
+
+ ec = generate_fips186 (&sk, nbits, qbits, deriveparms, use_fips186_2,
+ &domain,
+ &counter, &seed, &seedlen, &h_value);
+ gcry_sexp_release (deriveparms);
+ if (!ec && h_value)
+ {
+ /* Format the seed-values unless domain parameters are used
+ for which a H_VALUE of NULL is an indication. */
+ ec = gpg_err_code (gcry_sexp_build
+ (&seedinfo, NULL,
+ "(seed-values(counter %d)(seed %b)(h %m))",
+ counter, (int)seedlen, seed, h_value));
+ if (ec)
+ {
+ gcry_mpi_release (sk.p); sk.p = NULL;
+ gcry_mpi_release (sk.q); sk.q = NULL;
+ gcry_mpi_release (sk.g); sk.g = NULL;
+ gcry_mpi_release (sk.y); sk.y = NULL;
+ gcry_mpi_release (sk.x); sk.x = NULL;
+ }
+ gcry_free (seed);
+ gcry_mpi_release (h_value);
+ }
+ }
+ else
+ {
+ ec = generate (&sk, nbits, qbits, transient_key, &domain, retfactors);
+ }
+
+ gcry_mpi_release (domain.p);
+ gcry_mpi_release (domain.q);
+ gcry_mpi_release (domain.g);
+
+ if (!ec)
+ {
+ skey[0] = sk.p;
+ skey[1] = sk.q;
+ skey[2] = sk.g;
+ skey[3] = sk.y;
+ skey[4] = sk.x;
+
+ if (!r_extrainfo)
+ {
+ /* Old style interface - return the factors - if any - at
+ retfactors. */
+ }
+ else if (!*retfactors && !seedinfo)
+ {
+ /* No factors and no seedinfo, thus there is nothing to return. */
+ *r_extrainfo = NULL;
+ }
+ else
+ {
+ /* Put the factors into extrainfo and set retfactors to NULL
+ to make use of the new interface. Note that the factors
+ are not confidential thus we can store them in standard
+ memory. */
+ int nfactors, i, j;
+ char *p;
+ char *format = NULL;
+ void **arg_list = NULL;
+
+ for (nfactors=0; *retfactors && (*retfactors)[nfactors]; nfactors++)
+ ;
+ /* Allocate space for the format string:
+ "(misc-key-info%S(pm1-factors%m))"
+ with one "%m" for each factor and construct it. */
+ format = gcry_malloc (50 + 2*nfactors);
+ if (!format)
+ ec = gpg_err_code_from_syserror ();
+ else
+ {
+ p = stpcpy (format, "(misc-key-info");
+ if (seedinfo)
+ p = stpcpy (p, "%S");
+ if (nfactors)
+ {
+ p = stpcpy (p, "(pm1-factors");
+ for (i=0; i < nfactors; i++)
+ p = stpcpy (p, "%m");
+ p = stpcpy (p, ")");
+ }
+ p = stpcpy (p, ")");
+
+ /* Allocate space for the list of factors plus one for
+ an S-expression plus an extra NULL entry for safety
+ and fill it with the factors. */
+ arg_list = gcry_calloc (nfactors+1+1, sizeof *arg_list);
+ if (!arg_list)
+ ec = gpg_err_code_from_syserror ();
+ else
+ {
+ i = 0;
+ if (seedinfo)
+ arg_list[i++] = &seedinfo;
+ for (j=0; j < nfactors; j++)
+ arg_list[i++] = (*retfactors) + j;
+ arg_list[i] = NULL;
+
+ ec = gpg_err_code (gcry_sexp_build_array
+ (r_extrainfo, NULL, format, arg_list));
+ }
+ }
+
+ gcry_free (arg_list);
+ gcry_free (format);
+ for (i=0; i < nfactors; i++)
+ {
+ gcry_mpi_release ((*retfactors)[i]);
+ (*retfactors)[i] = NULL;
+ }
+ *retfactors = NULL;
+ if (ec)
+ {
+ for (i=0; i < 5; i++)
+ {
+ gcry_mpi_release (skey[i]);
+ skey[i] = NULL;
+ }
+ }
+ }
+ }
+
+ gcry_sexp_release (seedinfo);
+ return ec;
+}
+
+
+static gcry_err_code_t
+dsa_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ (void)evalue;
+ return dsa_generate_ext (algo, nbits, 0, NULL, skey, retfactors, NULL);
+}
+
+
+
+static gcry_err_code_t
+dsa_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ DSA_secret_key sk;
+
+ (void)algo;
+
+ if ((! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]) || (! skey[4]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.q = skey[1];
+ sk.g = skey[2];
+ sk.y = skey[3];
+ sk.x = skey[4];
+ if (! check_secret_key (&sk))
+ err = GPG_ERR_BAD_SECKEY;
+ }
+
+ return err;
+}
+
+
+static gcry_err_code_t
+dsa_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ DSA_secret_key sk;
+
+ (void)algo;
+
+ if ((! data)
+ || (! skey[0]) || (! skey[1]) || (! skey[2])
+ || (! skey[3]) || (! skey[4]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.q = skey[1];
+ sk.g = skey[2];
+ sk.y = skey[3];
+ sk.x = skey[4];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ sign (resarr[0], resarr[1], data, &sk);
+ }
+ return err;
+}
+
+static gcry_err_code_t
+dsa_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp) (void *, gcry_mpi_t), void *opaquev)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ DSA_public_key pk;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ if ((! data[0]) || (! data[1]) || (! hash)
+ || (! pkey[0]) || (! pkey[1]) || (! pkey[2]) || (! pkey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ pk.p = pkey[0];
+ pk.q = pkey[1];
+ pk.g = pkey[2];
+ pk.y = pkey[3];
+ if (! verify (data[0], data[1], hash, &pk))
+ err = GPG_ERR_BAD_SIGNATURE;
+ }
+ return err;
+}
+
+
+static unsigned int
+dsa_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+
+/*
+ Self-test section.
+ */
+
+
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+
+static const char *dsa_names[] =
+ {
+ "dsa",
+ "openpgp-dsa",
+ NULL,
+ };
+
+gcry_pk_spec_t _gcry_pubkey_spec_dsa =
+ {
+ "DSA", dsa_names,
+ "pqgy", "pqgyx", "", "rs", "pqgy",
+ GCRY_PK_USAGE_SIGN,
+ dsa_generate,
+ dsa_check_secret_key,
+ NULL,
+ NULL,
+ dsa_sign,
+ dsa_verify,
+ dsa_get_nbits
+ };
+pk_extra_spec_t _gcry_pubkey_extraspec_dsa =
+ {
+ run_selftests,
+ dsa_generate_ext
+ };
+
diff --git a/grub-core/lib/libgcrypt-grub/cipher/ecc.c b/grub-core/lib/libgcrypt-grub/cipher/ecc.c
new file mode 100644
index 0000000..75a2c8d
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/ecc.c
@@ -0,0 +1,1351 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* ecc.c - Elliptic Curve Cryptography
+ Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of Libgcrypt.
+
+ Libgcrypt is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ Libgcrypt is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA. */
+
+/* This code is originally based on the Patch 0.1.6 for the gnupg
+ 1.4.x branch as retrieved on 2007-03-21 from
+ http://www.calcurco.cat/eccGnuPG/src/gnupg-1.4.6-ecc0.2.0beta1.diff.bz2
+ The original authors are:
+ Written by
+ Sergi Blanch i Torne <d4372211 at alumnes.eup.udl.es>,
+ Ramiro Moreno Chiral <ramiro at eup.udl.es>
+ Maintainers
+ Sergi Blanch i Torne
+ Ramiro Moreno Chiral
+ Mikael Mylnikov (mmr)
+ For use in Libgcrypt the code has been heavily modified and cleaned
+ up. In fact there is not much left of the orginally code except for
+ some variable names and the text book implementaion of the sign and
+ verification algorithms. The arithmetic functions have entirely
+ been rewritten and moved to mpi/ec.c. */
+
+
+/* TODO:
+
+ - If we support point compression we need to decide how to compute
+ the keygrip - it should not change due to compression.
+
+ - In mpi/ec.c we use mpi_powm for x^2 mod p: Either implement a
+ special case in mpi_powm or check whether mpi_mulm is faster.
+
+ - Decide whether we should hide the mpi_point_t definition.
+
+ - Support more than just ECDSA.
+*/
+
+
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+
+/* Definition of a curve. */
+typedef struct
+{
+ gcry_mpi_t p; /* Prime specifying the field GF(p). */
+ gcry_mpi_t a; /* First coefficient of the Weierstrass equation. */
+ gcry_mpi_t b; /* Second coefficient of the Weierstrass equation. */
+ mpi_point_t G; /* Base point (generator). */
+ gcry_mpi_t n; /* Order of G. */
+} elliptic_curve_t;
+
+
+typedef struct
+{
+ elliptic_curve_t E;
+ mpi_point_t Q; /* Q = [d]G */
+} ECC_public_key;
+
+typedef struct
+{
+ elliptic_curve_t E;
+ mpi_point_t Q;
+ gcry_mpi_t d;
+} ECC_secret_key;
+
+
+/* This tables defines aliases for curve names. */
+static const struct
+{
+ const char *name; /* Our name. */
+ const char *other; /* Other name. */
+} curve_aliases[] =
+ {
+ { "NIST P-192", "1.2.840.10045.3.1.1" }, /* X9.62 OID */
+ { "NIST P-192", "prime192v1" }, /* X9.62 name. */
+ { "NIST P-192", "secp192r1" }, /* SECP name. */
+
+ { "NIST P-224", "secp224r1" },
+ { "NIST P-224", "1.3.132.0.33" }, /* SECP OID. */
+
+ { "NIST P-256", "1.2.840.10045.3.1.7" }, /* From NIST SP 800-78-1. */
+ { "NIST P-256", "prime256v1" },
+ { "NIST P-256", "secp256r1" },
+
+ { "NIST P-384", "secp384r1" },
+ { "NIST P-384", "1.3.132.0.34" },
+
+ { "NIST P-521", "secp521r1" },
+ { "NIST P-521", "1.3.132.0.35" },
+
+ { "brainpoolP160r1", "1.3.36.3.3.2.8.1.1.1" },
+ { "brainpoolP192r1", "1.3.36.3.3.2.8.1.1.3" },
+ { "brainpoolP224r1", "1.3.36.3.3.2.8.1.1.5" },
+ { "brainpoolP256r1", "1.3.36.3.3.2.8.1.1.7" },
+ { "brainpoolP320r1", "1.3.36.3.3.2.8.1.1.9" },
+ { "brainpoolP384r1", "1.3.36.3.3.2.8.1.1.11"},
+ { "brainpoolP512r1", "1.3.36.3.3.2.8.1.1.13"},
+
+ { NULL, NULL}
+ };
+
+
+
+/* This static table defines all available curves. */
+static const struct
+{
+ const char *desc; /* Description of the curve. */
+ unsigned int nbits; /* Number of bits. */
+ unsigned int fips:1; /* True if this is a FIPS140-2 approved curve. */
+ const char *p; /* Order of the prime field. */
+ const char *a, *b; /* The coefficients. */
+ const char *n; /* The order of the base point. */
+ const char *g_x, *g_y; /* Base point. */
+} domain_parms[] =
+ {
+ {
+ "NIST P-192", 192, 1,
+ "0xfffffffffffffffffffffffffffffffeffffffffffffffff",
+ "0xfffffffffffffffffffffffffffffffefffffffffffffffc",
+ "0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",
+ "0xffffffffffffffffffffffff99def836146bc9b1b4d22831",
+
+ "0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",
+ "0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811"
+ },
+ {
+ "NIST P-224", 224, 1,
+ "0xffffffffffffffffffffffffffffffff000000000000000000000001",
+ "0xfffffffffffffffffffffffffffffffefffffffffffffffffffffffe",
+ "0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4",
+ "0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d" ,
+
+ "0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21",
+ "0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34"
+ },
+ {
+ "NIST P-256", 256, 1,
+ "0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
+ "0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc",
+ "0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",
+ "0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
+
+ "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",
+ "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"
+ },
+ {
+ "NIST P-384", 384, 1,
+ "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
+ "ffffffff0000000000000000ffffffff",
+ "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
+ "ffffffff0000000000000000fffffffc",
+ "0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875a"
+ "c656398d8a2ed19d2a85c8edd3ec2aef",
+ "0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf"
+ "581a0db248b0a77aecec196accc52973",
+
+ "0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a38"
+ "5502f25dbf55296c3a545e3872760ab7",
+ "0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c0"
+ "0a60b1ce1d7e819d7a431d7c90ea0e5f"
+ },
+ {
+ "NIST P-521", 521, 1,
+ "0x01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "0x01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc",
+ "0x051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef10"
+ "9e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00",
+ "0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ "ffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409",
+
+ "0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3d"
+ "baa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66",
+ "0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e6"
+ "62c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"
+ },
+
+ { "brainpoolP160r1", 160, 0,
+ "0xe95e4a5f737059dc60dfc7ad95b3d8139515620f",
+ "0x340e7be2a280eb74e2be61bada745d97e8f7c300",
+ "0x1e589a8595423412134faa2dbdec95c8d8675e58",
+ "0xe95e4a5f737059dc60df5991d45029409e60fc09",
+ "0xbed5af16ea3f6a4f62938c4631eb5af7bdbcdbc3",
+ "0x1667cb477a1a8ec338f94741669c976316da6321"
+ },
+
+ { "brainpoolP192r1", 192, 0,
+ "0xc302f41d932a36cda7a3463093d18db78fce476de1a86297",
+ "0x6a91174076b1e0e19c39c031fe8685c1cae040e5c69a28ef",
+ "0x469a28ef7c28cca3dc721d044f4496bcca7ef4146fbf25c9",
+ "0xc302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1",
+ "0xc0a0647eaab6a48753b033c56cb0f0900a2f5c4853375fd6",
+ "0x14b690866abd5bb88b5f4828c1490002e6773fa2fa299b8f"
+ },
+
+ { "brainpoolP224r1", 224, 0,
+ "0xd7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0ff",
+ "0x68a5e62ca9ce6c1c299803a6c1530b514e182ad8b0042a59cad29f43",
+ "0x2580f63ccfe44138870713b1a92369e33e2135d266dbb372386c400b",
+ "0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f",
+ "0x0d9029ad2c7e5cf4340823b2a87dc68c9e4ce3174c1e6efdee12c07d",
+ "0x58aa56f772c0726f24c6b89e4ecdac24354b9e99caa3f6d3761402cd"
+ },
+
+ { "brainpoolP256r1", 256, 0,
+ "0xa9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377",
+ "0x7d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6ce94a4b44f330b5d9",
+ "0x26dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7e1ce6bccdc18ff8c07b6",
+ "0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7",
+ "0x8bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27e1e3bd23c23a4453bd9ace3262",
+ "0x547ef835c3dac4fd97f8461a14611dc9c27745132ded8e545c1d54c72f046997"
+ },
+
+ { "brainpoolP320r1", 320, 0,
+ "0xd35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28"
+ "fcd412b1f1b32e27",
+ "0x3ee30b568fbab0f883ccebd46d3f3bb8a2a73513f5eb79da66190eb085ffa9f4"
+ "92f375a97d860eb4",
+ "0x520883949dfdbc42d3ad198640688a6fe13f41349554b49acc31dccd88453981"
+ "6f5eb4ac8fb1f1a6",
+ "0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e9"
+ "8691555b44c59311",
+ "0x43bd7e9afb53d8b85289bcc48ee5bfe6f20137d10a087eb6e7871e2a10a599c7"
+ "10af8d0d39e20611",
+ "0x14fdd05545ec1cc8ab4093247f77275e0743ffed117182eaa9c77877aaac6ac7"
+ "d35245d1692e8ee1"
+ },
+
+ { "brainpoolP384r1", 384, 0,
+ "0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123"
+ "acd3a729901d1a71874700133107ec53",
+ "0x7bc382c63d8c150c3c72080ace05afa0c2bea28e4fb22787139165efba91f90f"
+ "8aa5814a503ad4eb04a8c7dd22ce2826",
+ "0x04a8c7dd22ce28268b39b55416f0447c2fb77de107dcd2a62e880ea53eeb62d5"
+ "7cb4390295dbc9943ab78696fa504c11",
+ "0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7"
+ "cf3ab6af6b7fc3103b883202e9046565",
+ "0x1d1c64f068cf45ffa2a63a81b7c13f6b8847a3e77ef14fe3db7fcafe0cbd10e8"
+ "e826e03436d646aaef87b2e247d4af1e",
+ "0x8abe1d7520f9c2a45cb1eb8e95cfd55262b70b29feec5864e19c054ff9912928"
+ "0e4646217791811142820341263c5315"
+ },
+
+ { "brainpoolP512r1", 512, 0,
+ "0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330871"
+ "7d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3",
+ "0x7830a3318b603b89e2327145ac234cc594cbdd8d3df91610a83441caea9863bc"
+ "2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94ca",
+ "0x3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a7"
+ "2bf2c7b9e7c1ac4d77fc94cadc083e67984050b75ebae5dd2809bd638016f723",
+ "0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870"
+ "553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90069",
+ "0x81aee4bdd82ed9645a21322e9c4c6a9385ed9f70b5d916c1b43b62eef4d0098e"
+ "ff3b1f78e2d0d48d50d1687b93b97d5f7c6d5047406a5e688b352209bcb9f822",
+ "0x7dde385d566332ecc0eabfa9cf7822fdf209f70024a57b1aa000c55b881f8111"
+ "b2dcde494a5f485e5bca4bd88a2763aed1ca2b2fa8f0540678cd1e0f3ad80892"
+ },
+
+ { NULL, 0, 0, NULL, NULL, NULL, NULL }
+ };
+
+
+/* Registered progress function and its callback value. */
+static void (*progress_cb) (void *, const char*, int, int, int);
+static void *progress_cb_data;
+
+
+#define point_init(a) _gcry_mpi_ec_point_init ((a))
+#define point_free(a) _gcry_mpi_ec_point_free ((a))
+
+
+
+/* Local prototypes. */
+static gcry_mpi_t gen_k (gcry_mpi_t p, int security_level);
+static void test_keys (ECC_secret_key * sk, unsigned int nbits);
+static int check_secret_key (ECC_secret_key * sk);
+static gpg_err_code_t sign (gcry_mpi_t input, ECC_secret_key *skey,
+ gcry_mpi_t r, gcry_mpi_t s);
+static gpg_err_code_t verify (gcry_mpi_t input, ECC_public_key *pkey,
+ gcry_mpi_t r, gcry_mpi_t s);
+
+
+static gcry_mpi_t gen_y_2 (gcry_mpi_t x, elliptic_curve_t * base);
+
+
+
+
+void
+_gcry_register_pk_ecc_progress (void (*cb) (void *, const char *,
+ int, int, int),
+ void *cb_data)
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+/* static void */
+/* progress (int c) */
+/* { */
+/* if (progress_cb) */
+/* progress_cb (progress_cb_data, "pk_ecc", c, 0, 0); */
+/* } */
+
+
+
+
+/* Set the value from S into D. */
+static void
+point_set (mpi_point_t *d, mpi_point_t *s)
+{
+ mpi_set (d->x, s->x);
+ mpi_set (d->y, s->y);
+ mpi_set (d->z, s->z);
+}
+
+
+/*
+ * Release a curve object.
+ */
+static void
+curve_free (elliptic_curve_t *E)
+{
+ mpi_free (E->p); E->p = NULL;
+ mpi_free (E->a); E->a = NULL;
+ mpi_free (E->b); E->b = NULL;
+ point_free (&E->G);
+ mpi_free (E->n); E->n = NULL;
+}
+
+
+/*
+ * Return a copy of a curve object.
+ */
+static elliptic_curve_t
+curve_copy (elliptic_curve_t E)
+{
+ elliptic_curve_t R;
+
+ R.p = mpi_copy (E.p);
+ R.a = mpi_copy (E.a);
+ R.b = mpi_copy (E.b);
+ point_init (&R.G);
+ point_set (&R.G, &E.G);
+ R.n = mpi_copy (E.n);
+
+ return R;
+}
+
+
+
+/* Helper to scan a hex string. */
+static gcry_mpi_t
+scanval (const char *string)
+{
+ gpg_error_t err;
+ gcry_mpi_t val;
+
+ err = gcry_mpi_scan (&val, GCRYMPI_FMT_HEX, string, 0, NULL);
+ if (err)
+ log_fatal ("scanning ECC parameter failed: %s\n", gpg_strerror (err));
+ return val;
+}
+
+
+
+
+
+/****************
+ * Solve the right side of the equation that defines a curve.
+ */
+static gcry_mpi_t
+gen_y_2 (gcry_mpi_t x, elliptic_curve_t *base)
+{
+ gcry_mpi_t three, x_3, axb, y;
+
+ three = mpi_alloc_set_ui (3);
+ x_3 = mpi_new (0);
+ axb = mpi_new (0);
+ y = mpi_new (0);
+
+ mpi_powm (x_3, x, three, base->p);
+ mpi_mulm (axb, base->a, x, base->p);
+ mpi_addm (axb, axb, base->b, base->p);
+ mpi_addm (y, x_3, axb, base->p);
+
+ mpi_free (x_3);
+ mpi_free (axb);
+ mpi_free (three);
+ return y; /* The quadratic value of the coordinate if it exist. */
+}
+
+
+
+
+
+/* Generate a random secret scalar k with an order of p
+
+ At the beginning this was identical to the code is in elgamal.c.
+ Later imporved by mmr. Further simplified by wk. */
+static gcry_mpi_t
+gen_k (gcry_mpi_t p, int security_level)
+{
+ gcry_mpi_t k;
+ unsigned int nbits;
+
+ nbits = mpi_get_nbits (p);
+ k = mpi_snew (nbits);
+ if (DBG_CIPHER)
+ log_debug ("choosing a random k of %u bits\n", nbits);
+
+ gcry_mpi_randomize (k, nbits, security_level);
+
+ mpi_mod (k, k, p); /* k = k mod p */
+
+ return k;
+}
+
+/****************
+ * Generate the crypto system setup.
+ * As of now the fix NIST recommended values are used.
+ * The subgroup generator point is in another function: gen_big_point.
+ */
+static gpg_err_code_t
+generate_curve (unsigned int nbits, const char *name,
+ elliptic_curve_t *curve, unsigned int *r_nbits)
+{
+ int idx, aliasno;
+
+ if (name)
+ {
+ /* First check nor native curves. */
+ for (idx = 0; domain_parms[idx].desc; idx++)
+ if (!strcmp (name, domain_parms[idx].desc))
+ break;
+ /* If not found consult the alias table. */
+ if (!domain_parms[idx].desc)
+ {
+ for (aliasno = 0; curve_aliases[aliasno].name; aliasno++)
+ if (!strcmp (name, curve_aliases[aliasno].other))
+ break;
+ if (curve_aliases[aliasno].name)
+ {
+ for (idx = 0; domain_parms[idx].desc; idx++)
+ if (!strcmp (curve_aliases[aliasno].name,
+ domain_parms[idx].desc))
+ break;
+ }
+ }
+ }
+ else
+ {
+ for (idx = 0; domain_parms[idx].desc; idx++)
+ if (nbits == domain_parms[idx].nbits)
+ break;
+ }
+ if (!domain_parms[idx].desc)
+ return GPG_ERR_INV_VALUE;
+
+ /* In fips mode we only support NIST curves. Note that it is
+ possible to bypass this check by specifying the curve parameters
+ directly. */
+ if (fips_mode () && !domain_parms[idx].fips )
+ return GPG_ERR_NOT_SUPPORTED;
+
+
+ *r_nbits = domain_parms[idx].nbits;
+ curve->p = scanval (domain_parms[idx].p);
+ curve->a = scanval (domain_parms[idx].a);
+ curve->b = scanval (domain_parms[idx].b);
+ curve->n = scanval (domain_parms[idx].n);
+ curve->G.x = scanval (domain_parms[idx].g_x);
+ curve->G.y = scanval (domain_parms[idx].g_y);
+ curve->G.z = mpi_alloc_set_ui (1);
+
+ return 0;
+}
+
+
+/*
+ * First obtain the setup. Over the finite field randomize an scalar
+ * secret value, and calculate the public point.
+ */
+static gpg_err_code_t
+generate_key (ECC_secret_key *sk, unsigned int nbits, const char *name,
+ gcry_mpi_t g_x, gcry_mpi_t g_y,
+ gcry_mpi_t q_x, gcry_mpi_t q_y)
+{
+ gpg_err_code_t err;
+ elliptic_curve_t E;
+ gcry_mpi_t d;
+ mpi_point_t Q;
+ mpi_ec_t ctx;
+
+ err = generate_curve (nbits, name, &E, &nbits);
+ if (err)
+ return err;
+
+ if (DBG_CIPHER)
+ {
+ log_mpidump ("ecc generation p", E.p);
+ log_mpidump ("ecc generation a", E.a);
+ log_mpidump ("ecc generation b", E.b);
+ log_mpidump ("ecc generation n", E.n);
+ log_mpidump ("ecc generation Gx", E.G.x);
+ log_mpidump ("ecc generation Gy", E.G.y);
+ log_mpidump ("ecc generation Gz", E.G.z);
+ }
+
+ if (DBG_CIPHER)
+ log_debug ("choosing a random x of size %u\n", nbits);
+ d = gen_k (E.n, GCRY_VERY_STRONG_RANDOM);
+
+ /* Compute Q. */
+ point_init (&Q);
+ ctx = _gcry_mpi_ec_init (E.p, E.a);
+ _gcry_mpi_ec_mul_point (&Q, d, &E.G, ctx);
+
+ /* Copy the stuff to the key structures. */
+ sk->E.p = mpi_copy (E.p);
+ sk->E.a = mpi_copy (E.a);
+ sk->E.b = mpi_copy (E.b);
+ point_init (&sk->E.G);
+ point_set (&sk->E.G, &E.G);
+ sk->E.n = mpi_copy (E.n);
+ point_init (&sk->Q);
+ point_set (&sk->Q, &Q);
+ sk->d = mpi_copy (d);
+ /* We also return copies of G and Q in affine coordinates if
+ requested. */
+ if (g_x && g_y)
+ {
+ if (_gcry_mpi_ec_get_affine (g_x, g_y, &sk->E.G, ctx))
+ log_fatal ("ecc generate: Failed to get affine coordinates\n");
+ }
+ if (q_x && q_y)
+ {
+ if (_gcry_mpi_ec_get_affine (q_x, q_y, &sk->Q, ctx))
+ log_fatal ("ecc generate: Failed to get affine coordinates\n");
+ }
+ _gcry_mpi_ec_free (ctx);
+
+ point_free (&Q);
+ mpi_free (d);
+ curve_free (&E);
+
+ /* Now we can test our keys (this should never fail!). */
+ test_keys (sk, nbits - 64);
+
+ return 0;
+}
+
+
+/****************
+ * To verify correct skey it use a random information.
+ * First, encrypt and decrypt this dummy value,
+ * test if the information is recuperated.
+ * Second, test with the sign and verify functions.
+ */
+static void
+test_keys (ECC_secret_key *sk, unsigned int nbits)
+{
+ ECC_public_key pk;
+ gcry_mpi_t test = mpi_new (nbits);
+ mpi_point_t R_;
+ gcry_mpi_t c = mpi_new (nbits);
+ gcry_mpi_t out = mpi_new (nbits);
+ gcry_mpi_t r = mpi_new (nbits);
+ gcry_mpi_t s = mpi_new (nbits);
+
+ if (DBG_CIPHER)
+ log_debug ("Testing key.\n");
+
+ point_init (&R_);
+
+ pk.E = curve_copy (sk->E);
+ point_init (&pk.Q);
+ point_set (&pk.Q, &sk->Q);
+
+ gcry_mpi_randomize (test, nbits, GCRY_WEAK_RANDOM);
+
+ if (sign (test, sk, r, s) )
+ log_fatal ("ECDSA operation: sign failed\n");
+
+ if (verify (test, &pk, r, s))
+ {
+ log_fatal ("ECDSA operation: sign, verify failed\n");
+ }
+
+ if (DBG_CIPHER)
+ log_debug ("ECDSA operation: sign, verify ok.\n");
+
+ point_free (&pk.Q);
+ curve_free (&pk.E);
+
+ point_free (&R_);
+ mpi_free (s);
+ mpi_free (r);
+ mpi_free (out);
+ mpi_free (c);
+ mpi_free (test);
+}
+
+/****************
+ * To check the validity of the value, recalculate the correspondence
+ * between the public value and the secret one.
+ */
+static int
+check_secret_key (ECC_secret_key * sk)
+{
+ mpi_point_t Q;
+ gcry_mpi_t y_2, y2 = mpi_alloc (0);
+ mpi_ec_t ctx;
+
+ /* ?primarity test of 'p' */
+ /* (...) //!! */
+ /* G in E(F_p) */
+ y_2 = gen_y_2 (sk->E.G.x, &sk->E); /* y^2=x^3+a*x+b */
+ mpi_mulm (y2, sk->E.G.y, sk->E.G.y, sk->E.p); /* y^2=y*y */
+ if (mpi_cmp (y_2, y2))
+ {
+ if (DBG_CIPHER)
+ log_debug ("Bad check: Point 'G' does not belong to curve 'E'!\n");
+ return (1);
+ }
+ /* G != PaI */
+ if (!mpi_cmp_ui (sk->E.G.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("Bad check: 'G' cannot be Point at Infinity!\n");
+ return (1);
+ }
+
+ point_init (&Q);
+ ctx = _gcry_mpi_ec_init (sk->E.p, sk->E.a);
+ _gcry_mpi_ec_mul_point (&Q, sk->E.n, &sk->E.G, ctx);
+ if (mpi_cmp_ui (Q.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("check_secret_key: E is not a curve of order n\n");
+ point_free (&Q);
+ _gcry_mpi_ec_free (ctx);
+ return 1;
+ }
+ /* pubkey cannot be PaI */
+ if (!mpi_cmp_ui (sk->Q.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("Bad check: Q can not be a Point at Infinity!\n");
+ _gcry_mpi_ec_free (ctx);
+ return (1);
+ }
+ /* pubkey = [d]G over E */
+ _gcry_mpi_ec_mul_point (&Q, sk->d, &sk->E.G, ctx);
+ if ((Q.x == sk->Q.x) && (Q.y == sk->Q.y) && (Q.z == sk->Q.z))
+ {
+ if (DBG_CIPHER)
+ log_debug
+ ("Bad check: There is NO correspondence between 'd' and 'Q'!\n");
+ _gcry_mpi_ec_free (ctx);
+ return (1);
+ }
+ _gcry_mpi_ec_free (ctx);
+ point_free (&Q);
+ return 0;
+}
+
+
+/*
+ * Return the signature struct (r,s) from the message hash. The caller
+ * must have allocated R and S.
+ */
+static gpg_err_code_t
+sign (gcry_mpi_t input, ECC_secret_key *skey, gcry_mpi_t r, gcry_mpi_t s)
+{
+ gpg_err_code_t err = 0;
+ gcry_mpi_t k, dr, sum, k_1, x;
+ mpi_point_t I;
+ mpi_ec_t ctx;
+
+ k = NULL;
+ dr = mpi_alloc (0);
+ sum = mpi_alloc (0);
+ k_1 = mpi_alloc (0);
+ x = mpi_alloc (0);
+ point_init (&I);
+
+ mpi_set_ui (s, 0);
+ mpi_set_ui (r, 0);
+
+ ctx = _gcry_mpi_ec_init (skey->E.p, skey->E.a);
+
+ while (!mpi_cmp_ui (s, 0)) /* s == 0 */
+ {
+ while (!mpi_cmp_ui (r, 0)) /* r == 0 */
+ {
+ /* Note, that we are guaranteed to enter this loop at least
+ once because r has been intialized to 0. We can't use a
+ do_while because we want to keep the value of R even if S
+ has to be recomputed. */
+ mpi_free (k);
+ k = gen_k (skey->E.n, GCRY_STRONG_RANDOM);
+ _gcry_mpi_ec_mul_point (&I, k, &skey->E.G, ctx);
+ if (_gcry_mpi_ec_get_affine (x, NULL, &I, ctx))
+ {
+ if (DBG_CIPHER)
+ log_debug ("ecc sign: Failed to get affine coordinates\n");
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ mpi_mod (r, x, skey->E.n); /* r = x mod n */
+ }
+ mpi_mulm (dr, skey->d, r, skey->E.n); /* dr = d*r mod n */
+ mpi_addm (sum, input, dr, skey->E.n); /* sum = hash + (d*r) mod n */
+ mpi_invm (k_1, k, skey->E.n); /* k_1 = k^(-1) mod n */
+ mpi_mulm (s, k_1, sum, skey->E.n); /* s = k^(-1)*(hash+(d*r)) mod n */
+ }
+
+ leave:
+ _gcry_mpi_ec_free (ctx);
+ point_free (&I);
+ mpi_free (x);
+ mpi_free (k_1);
+ mpi_free (sum);
+ mpi_free (dr);
+ mpi_free (k);
+
+ return err;
+}
+
+/*
+ * Check if R and S verifies INPUT.
+ */
+static gpg_err_code_t
+verify (gcry_mpi_t input, ECC_public_key *pkey, gcry_mpi_t r, gcry_mpi_t s)
+{
+ gpg_err_code_t err = 0;
+ gcry_mpi_t h, h1, h2, x, y;
+ mpi_point_t Q, Q1, Q2;
+ mpi_ec_t ctx;
+
+ if( !(mpi_cmp_ui (r, 0) > 0 && mpi_cmp (r, pkey->E.n) < 0) )
+ return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < r < n failed. */
+ if( !(mpi_cmp_ui (s, 0) > 0 && mpi_cmp (s, pkey->E.n) < 0) )
+ return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < s < n failed. */
+
+ h = mpi_alloc (0);
+ h1 = mpi_alloc (0);
+ h2 = mpi_alloc (0);
+ x = mpi_alloc (0);
+ y = mpi_alloc (0);
+ point_init (&Q);
+ point_init (&Q1);
+ point_init (&Q2);
+
+ ctx = _gcry_mpi_ec_init (pkey->E.p, pkey->E.a);
+
+ /* h = s^(-1) (mod n) */
+ mpi_invm (h, s, pkey->E.n);
+/* log_mpidump (" h", h); */
+ /* h1 = hash * s^(-1) (mod n) */
+ mpi_mulm (h1, input, h, pkey->E.n);
+/* log_mpidump (" h1", h1); */
+ /* Q1 = [ hash * s^(-1) ]G */
+ _gcry_mpi_ec_mul_point (&Q1, h1, &pkey->E.G, ctx);
+/* log_mpidump ("Q1.x", Q1.x); */
+/* log_mpidump ("Q1.y", Q1.y); */
+/* log_mpidump ("Q1.z", Q1.z); */
+ /* h2 = r * s^(-1) (mod n) */
+ mpi_mulm (h2, r, h, pkey->E.n);
+/* log_mpidump (" h2", h2); */
+ /* Q2 = [ r * s^(-1) ]Q */
+ _gcry_mpi_ec_mul_point (&Q2, h2, &pkey->Q, ctx);
+/* log_mpidump ("Q2.x", Q2.x); */
+/* log_mpidump ("Q2.y", Q2.y); */
+/* log_mpidump ("Q2.z", Q2.z); */
+ /* Q = ([hash * s^(-1)]G) + ([r * s^(-1)]Q) */
+ _gcry_mpi_ec_add_points (&Q, &Q1, &Q2, ctx);
+/* log_mpidump (" Q.x", Q.x); */
+/* log_mpidump (" Q.y", Q.y); */
+/* log_mpidump (" Q.z", Q.z); */
+
+ if (!mpi_cmp_ui (Q.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("ecc verify: Rejected\n");
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ if (_gcry_mpi_ec_get_affine (x, y, &Q, ctx))
+ {
+ if (DBG_CIPHER)
+ log_debug ("ecc verify: Failed to get affine coordinates\n");
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ mpi_mod (x, x, pkey->E.n); /* x = x mod E_n */
+ if (mpi_cmp (x, r)) /* x != r */
+ {
+ if (DBG_CIPHER)
+ {
+ log_mpidump (" x", x);
+ log_mpidump (" y", y);
+ log_mpidump (" r", r);
+ log_mpidump (" s", s);
+ log_debug ("ecc verify: Not verified\n");
+ }
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ if (DBG_CIPHER)
+ log_debug ("ecc verify: Accepted\n");
+
+ leave:
+ _gcry_mpi_ec_free (ctx);
+ point_free (&Q2);
+ point_free (&Q1);
+ point_free (&Q);
+ mpi_free (y);
+ mpi_free (x);
+ mpi_free (h2);
+ mpi_free (h1);
+ mpi_free (h);
+ return err;
+}
+
+
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+static gcry_mpi_t
+ec2os (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t p)
+{
+ gpg_error_t err;
+ int pbytes = (mpi_get_nbits (p)+7)/8;
+ size_t n;
+ unsigned char *buf, *ptr;
+ gcry_mpi_t result;
+
+ buf = gcry_xmalloc ( 1 + 2*pbytes );
+ *buf = 04; /* Uncompressed point. */
+ ptr = buf+1;
+ err = gcry_mpi_print (GCRYMPI_FMT_USG, ptr, pbytes, &n, x);
+ if (err)
+ log_fatal ("mpi_print failed: %s\n", gpg_strerror (err));
+ if (n < pbytes)
+ {
+ memmove (ptr+(pbytes-n), ptr, n);
+ memset (ptr, 0, (pbytes-n));
+ }
+ ptr += pbytes;
+ err = gcry_mpi_print (GCRYMPI_FMT_USG, ptr, pbytes, &n, y);
+ if (err)
+ log_fatal ("mpi_print failed: %s\n", gpg_strerror (err));
+ if (n < pbytes)
+ {
+ memmove (ptr+(pbytes-n), ptr, n);
+ memset (ptr, 0, (pbytes-n));
+ }
+
+ err = gcry_mpi_scan (&result, GCRYMPI_FMT_USG, buf, 1+2*pbytes, NULL);
+ if (err)
+ log_fatal ("mpi_scan failed: %s\n", gpg_strerror (err));
+ gcry_free (buf);
+
+ mpi_free (x);
+ mpi_free (y);
+
+ return result;
+}
+
+/* RESULT must have been initialized and is set on success to the
+ point given by VALUE. */
+static gcry_error_t
+os2ec (mpi_point_t *result, gcry_mpi_t value)
+{
+ gcry_error_t err;
+ size_t n;
+ unsigned char *buf;
+ gcry_mpi_t x, y;
+
+ n = (mpi_get_nbits (value)+7)/8;
+ buf = gcry_xmalloc (n);
+ err = gcry_mpi_print (GCRYMPI_FMT_USG, buf, n, &n, value);
+ if (err)
+ {
+ gcry_free (buf);
+ return err;
+ }
+ if (n < 1)
+ {
+ gcry_free (buf);
+ return GPG_ERR_INV_OBJ;
+ }
+ if (*buf != 4)
+ {
+ gcry_free (buf);
+ return GPG_ERR_NOT_IMPLEMENTED; /* No support for point compression. */
+ }
+ if ( ((n-1)%2) )
+ {
+ gcry_free (buf);
+ return GPG_ERR_INV_OBJ;
+ }
+ n = (n-1)/2;
+ err = gcry_mpi_scan (&x, GCRYMPI_FMT_USG, buf+1, n, NULL);
+ if (err)
+ {
+ gcry_free (buf);
+ return err;
+ }
+ err = gcry_mpi_scan (&y, GCRYMPI_FMT_USG, buf+1+n, n, NULL);
+ gcry_free (buf);
+ if (err)
+ {
+ mpi_free (x);
+ return err;
+ }
+
+ mpi_set (result->x, x);
+ mpi_set (result->y, y);
+ mpi_set_ui (result->z, 1);
+
+ mpi_free (x);
+ mpi_free (y);
+
+ return 0;
+}
+
+
+/* Extended version of ecc_generate. */
+static gcry_err_code_t
+ecc_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ gpg_err_code_t ec;
+ ECC_secret_key sk;
+ gcry_mpi_t g_x, g_y, q_x, q_y;
+ char *curve_name = NULL;
+ gcry_sexp_t l1;
+
+ (void)algo;
+ (void)evalue;
+ (void)r_extrainfo;
+
+ if (genparms)
+ {
+ /* Parse the optional "curve" parameter. */
+ l1 = gcry_sexp_find_token (genparms, "curve", 0);
+ if (l1)
+ {
+ curve_name = _gcry_sexp_nth_string (l1, 1);
+ gcry_sexp_release (l1);
+ if (!curve_name)
+ return GPG_ERR_INV_OBJ; /* No curve name or value too large. */
+ }
+ }
+
+ /* NBITS is required if no curve name has been given. */
+ if (!nbits && !curve_name)
+ return GPG_ERR_NO_OBJ; /* No NBITS parameter. */
+
+ g_x = mpi_new (0);
+ g_y = mpi_new (0);
+ q_x = mpi_new (0);
+ q_y = mpi_new (0);
+ ec = generate_key (&sk, nbits, curve_name, g_x, g_y, q_x, q_y);
+ gcry_free (curve_name);
+ if (ec)
+ return ec;
+
+ skey[0] = sk.E.p;
+ skey[1] = sk.E.a;
+ skey[2] = sk.E.b;
+ /* The function ec2os releases g_x and g_y. */
+ skey[3] = ec2os (g_x, g_y, sk.E.p);
+ skey[4] = sk.E.n;
+ /* The function ec2os releases g_x and g_y. */
+ skey[5] = ec2os (q_x, q_y, sk.E.p);
+ skey[6] = sk.d;
+
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+
+ /* Make an empty list of factors. */
+ *retfactors = gcry_calloc ( 1, sizeof **retfactors );
+ if (!*retfactors)
+ return gpg_err_code_from_syserror ();
+
+ return 0;
+}
+
+
+static gcry_err_code_t
+ecc_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ (void)evalue;
+ return ecc_generate_ext (algo, nbits, 0, NULL, skey, retfactors, NULL);
+}
+
+
+/* Return the parameters of the curve NAME. */
+static gcry_err_code_t
+ecc_get_param (const char *name, gcry_mpi_t *pkey)
+{
+ gpg_err_code_t err;
+ unsigned int nbits;
+ elliptic_curve_t E;
+ mpi_ec_t ctx;
+ gcry_mpi_t g_x, g_y;
+
+ err = generate_curve (0, name, &E, &nbits);
+ if (err)
+ return err;
+
+ g_x = mpi_new (0);
+ g_y = mpi_new (0);
+ ctx = _gcry_mpi_ec_init (E.p, E.a);
+ if (_gcry_mpi_ec_get_affine (g_x, g_y, &E.G, ctx))
+ log_fatal ("ecc get param: Failed to get affine coordinates\n");
+ _gcry_mpi_ec_free (ctx);
+ point_free (&E.G);
+
+ pkey[0] = E.p;
+ pkey[1] = E.a;
+ pkey[2] = E.b;
+ pkey[3] = ec2os (g_x, g_y, E.p);
+ pkey[4] = E.n;
+ pkey[5] = NULL;
+
+ return 0;
+}
+
+
+static gcry_err_code_t
+ecc_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gpg_err_code_t err;
+ ECC_secret_key sk;
+
+ (void)algo;
+
+ if (!skey[0] || !skey[1] || !skey[2] || !skey[3] || !skey[4] || !skey[5]
+ || !skey[6] || !skey[7] || !skey[8] || !skey[9] || !skey[10])
+ return GPG_ERR_BAD_MPI;
+
+ sk.E.p = skey[0];
+ sk.E.a = skey[1];
+ sk.E.b = skey[2];
+ point_init (&sk.E.G);
+ err = os2ec (&sk.E.G, skey[3]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ return err;
+ }
+ sk.E.n = skey[4];
+ point_init (&sk.Q);
+ err = os2ec (&sk.Q, skey[5]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return err;
+ }
+
+ sk.d = skey[6];
+
+ if (check_secret_key (&sk))
+ {
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return GPG_ERR_BAD_SECKEY;
+ }
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return 0;
+}
+
+
+static gcry_err_code_t
+ecc_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ gpg_err_code_t err;
+ ECC_secret_key sk;
+
+ (void)algo;
+
+ if (!data || !skey[0] || !skey[1] || !skey[2] || !skey[3] || !skey[4]
+ || !skey[5] || !skey[6] )
+ return GPG_ERR_BAD_MPI;
+
+ sk.E.p = skey[0];
+ sk.E.a = skey[1];
+ sk.E.b = skey[2];
+ point_init (&sk.E.G);
+ err = os2ec (&sk.E.G, skey[3]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ return err;
+ }
+ sk.E.n = skey[4];
+ point_init (&sk.Q);
+ err = os2ec (&sk.Q, skey[5]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return err;
+ }
+ sk.d = skey[6];
+
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (sk.E.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (sk.E.p));
+ err = sign (data, &sk, resarr[0], resarr[1]);
+ if (err)
+ {
+ mpi_free (resarr[0]);
+ mpi_free (resarr[1]);
+ resarr[0] = NULL; /* Mark array as released. */
+ }
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return err;
+}
+
+static gcry_err_code_t
+ecc_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp)(void *, gcry_mpi_t), void *opaquev)
+{
+ gpg_err_code_t err;
+ ECC_public_key pk;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ if (!data[0] || !data[1] || !hash || !pkey[0] || !pkey[1] || !pkey[2]
+ || !pkey[3] || !pkey[4] || !pkey[5] )
+ return GPG_ERR_BAD_MPI;
+
+ pk.E.p = pkey[0];
+ pk.E.a = pkey[1];
+ pk.E.b = pkey[2];
+ point_init (&pk.E.G);
+ err = os2ec (&pk.E.G, pkey[3]);
+ if (err)
+ {
+ point_free (&pk.E.G);
+ return err;
+ }
+ pk.E.n = pkey[4];
+ point_init (&pk.Q);
+ err = os2ec (&pk.Q, pkey[5]);
+ if (err)
+ {
+ point_free (&pk.E.G);
+ point_free (&pk.Q);
+ return err;
+ }
+
+ err = verify (hash, &pk, data[0], data[1]);
+
+ point_free (&pk.E.G);
+ point_free (&pk.Q);
+ return err;
+}
+
+
+
+static unsigned int
+ecc_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+
+/* See rsa.c for a description of this function. */
+static gpg_err_code_t
+compute_keygrip (gcry_md_hd_t md, gcry_sexp_t keyparam)
+{
+ static const char names[] = "pabgnq";
+ gpg_err_code_t ec = 0;
+ gcry_sexp_t l1;
+ gcry_mpi_t values[6];
+ int idx;
+
+ /* Clear the values for easier error cleanup. */
+ for (idx=0; idx < 6; idx++)
+ values[idx] = NULL;
+
+ /* Fill values with all available parameters. */
+ for (idx=0; idx < 6; idx++)
+ {
+ l1 = gcry_sexp_find_token (keyparam, names+idx, 1);
+ if (l1)
+ {
+ values[idx] = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ if (!values[idx])
+ {
+ ec = GPG_ERR_INV_OBJ;
+ goto leave;
+ }
+ }
+ }
+
+ /* Check whether a curve parameter is available and use that to fill
+ in missing values. */
+ l1 = gcry_sexp_find_token (keyparam, "curve", 5);
+ if (l1)
+ {
+ char *curve;
+ gcry_mpi_t tmpvalues[6];
+
+ for (idx = 0; idx < 6; idx++)
+ tmpvalues[idx] = NULL;
+
+ curve = _gcry_sexp_nth_string (l1, 1);
+ if (!curve)
+ {
+ ec = GPG_ERR_INV_OBJ; /* Name missing or out of core. */
+ goto leave;
+ }
+ ec = ecc_get_param (curve, tmpvalues);
+ gcry_free (curve);
+ if (ec)
+ goto leave;
+
+ for (idx = 0; idx < 6; idx++)
+ {
+ if (!values[idx])
+ values[idx] = tmpvalues[idx];
+ else
+ mpi_free (tmpvalues[idx]);
+ }
+ }
+
+ /* Check that all parameters are known and normalize all MPIs (that
+ should not be required but we use an internal fucntion later and
+ thus we better make 100% sure that they are normalized). */
+ for (idx = 0; idx < 6; idx++)
+ if (!values[idx])
+ {
+ ec = GPG_ERR_NO_OBJ;
+ goto leave;
+ }
+ else
+ _gcry_mpi_normalize (values[idx]);
+
+ /* Hash them all. */
+ for (idx = 0; idx < 6; idx++)
+ {
+ char buf[30];
+ unsigned char *rawmpi;
+ unsigned int rawmpilen;
+
+ rawmpi = _gcry_mpi_get_buffer (values[idx], &rawmpilen, NULL);
+ if (!rawmpi)
+ {
+ ec = gpg_err_code_from_syserror ();
+ goto leave;
+ }
+ snprintf (buf, sizeof buf, "(1:%c%u:", names[idx], rawmpilen);
+ gcry_md_write (md, buf, strlen (buf));
+ gcry_md_write (md, rawmpi, rawmpilen);
+ gcry_md_write (md, ")", 1);
+ gcry_free (rawmpi);
+ }
+
+ leave:
+ for (idx = 0; idx < 6; idx++)
+ _gcry_mpi_release (values[idx]);
+
+ return ec;
+}
+
+
+
+
+
+/*
+ Self-test section.
+ */
+
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+
+static const char *ecdsa_names[] =
+ {
+ "ecdsa",
+ "ecc",
+ NULL,
+ };
+
+gcry_pk_spec_t _gcry_pubkey_spec_ecdsa =
+ {
+ "ECDSA", ecdsa_names,
+ "pabgnq", "pabgnqd", "", "rs", "pabgnq",
+ GCRY_PK_USAGE_SIGN,
+ ecc_generate,
+ ecc_check_secret_key,
+ NULL,
+ NULL,
+ ecc_sign,
+ ecc_verify,
+ ecc_get_nbits
+ };
+
+pk_extra_spec_t _gcry_pubkey_extraspec_ecdsa =
+ {
+ run_selftests,
+ ecc_generate_ext,
+ compute_keygrip,
+ ecc_get_param
+ };
+
diff --git a/grub-core/lib/libgcrypt-grub/cipher/elgamal.c b/grub-core/lib/libgcrypt-grub/cipher/elgamal.c
new file mode 100644
index 0000000..ade8dc2
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/elgamal.c
@@ -0,0 +1,846 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* Elgamal.c - Elgamal Public Key encryption
+ * Copyright (C) 1998, 2000, 2001, 2002, 2003,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * For a description of the algorithm, see:
+ * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
+ * ISBN 0-471-11709-9. Pages 476 ff.
+ */
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+} ELG_public_key;
+
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+ gcry_mpi_t x; /* secret exponent */
+} ELG_secret_key;
+
+
+static int test_keys (ELG_secret_key *sk, unsigned int nbits, int nodie);
+static gcry_mpi_t gen_k (gcry_mpi_t p, int small_k);
+static void generate (ELG_secret_key *sk, unsigned nbits, gcry_mpi_t **factors);
+static int check_secret_key (ELG_secret_key *sk);
+static void do_encrypt (gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input,
+ ELG_public_key *pkey);
+static void decrypt (gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b,
+ ELG_secret_key *skey);
+static void sign (gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input,
+ ELG_secret_key *skey);
+static int verify (gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input,
+ ELG_public_key *pkey);
+
+
+static void (*progress_cb) (void *, const char *, int, int, int);
+static void *progress_cb_data;
+
+void
+_gcry_register_pk_elg_progress (void (*cb) (void *, const char *,
+ int, int, int),
+ void *cb_data)
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+
+static void
+progress (int c)
+{
+ if (progress_cb)
+ progress_cb (progress_cb_data, "pk_elg", c, 0, 0);
+}
+
+
+/****************
+ * Michael Wiener's table on subgroup sizes to match field sizes.
+ * (floating around somewhere, probably based on the paper from
+ * Eurocrypt 96, page 332)
+ */
+static unsigned int
+wiener_map( unsigned int n )
+{
+ static struct { unsigned int p_n, q_n; } t[] =
+ { /* p q attack cost */
+ { 512, 119 }, /* 9 x 10^17 */
+ { 768, 145 }, /* 6 x 10^21 */
+ { 1024, 165 }, /* 7 x 10^24 */
+ { 1280, 183 }, /* 3 x 10^27 */
+ { 1536, 198 }, /* 7 x 10^29 */
+ { 1792, 212 }, /* 9 x 10^31 */
+ { 2048, 225 }, /* 8 x 10^33 */
+ { 2304, 237 }, /* 5 x 10^35 */
+ { 2560, 249 }, /* 3 x 10^37 */
+ { 2816, 259 }, /* 1 x 10^39 */
+ { 3072, 269 }, /* 3 x 10^40 */
+ { 3328, 279 }, /* 8 x 10^41 */
+ { 3584, 288 }, /* 2 x 10^43 */
+ { 3840, 296 }, /* 4 x 10^44 */
+ { 4096, 305 }, /* 7 x 10^45 */
+ { 4352, 313 }, /* 1 x 10^47 */
+ { 4608, 320 }, /* 2 x 10^48 */
+ { 4864, 328 }, /* 2 x 10^49 */
+ { 5120, 335 }, /* 3 x 10^50 */
+ { 0, 0 }
+ };
+ int i;
+
+ for(i=0; t[i].p_n; i++ )
+ {
+ if( n <= t[i].p_n )
+ return t[i].q_n;
+ }
+ /* Not in table - use an arbitrary high number. */
+ return n / 8 + 200;
+}
+
+static int
+test_keys ( ELG_secret_key *sk, unsigned int nbits, int nodie )
+{
+ ELG_public_key pk;
+ gcry_mpi_t test = gcry_mpi_new ( 0 );
+ gcry_mpi_t out1_a = gcry_mpi_new ( nbits );
+ gcry_mpi_t out1_b = gcry_mpi_new ( nbits );
+ gcry_mpi_t out2 = gcry_mpi_new ( nbits );
+ int failed = 0;
+
+ pk.p = sk->p;
+ pk.g = sk->g;
+ pk.y = sk->y;
+
+ gcry_mpi_randomize ( test, nbits, GCRY_WEAK_RANDOM );
+
+ do_encrypt ( out1_a, out1_b, test, &pk );
+ decrypt ( out2, out1_a, out1_b, sk );
+ if ( mpi_cmp( test, out2 ) )
+ failed |= 1;
+
+ sign ( out1_a, out1_b, test, sk );
+ if ( !verify( out1_a, out1_b, test, &pk ) )
+ failed |= 2;
+
+ gcry_mpi_release ( test );
+ gcry_mpi_release ( out1_a );
+ gcry_mpi_release ( out1_b );
+ gcry_mpi_release ( out2 );
+
+ if (failed && !nodie)
+ log_fatal ("Elgamal test key for %s %s failed\n",
+ (failed & 1)? "encrypt+decrypt":"",
+ (failed & 2)? "sign+verify":"");
+ if (failed && DBG_CIPHER)
+ log_debug ("Elgamal test key for %s %s failed\n",
+ (failed & 1)? "encrypt+decrypt":"",
+ (failed & 2)? "sign+verify":"");
+
+ return failed;
+}
+
+
+/****************
+ * Generate a random secret exponent k from prime p, so that k is
+ * relatively prime to p-1. With SMALL_K set, k will be selected for
+ * better encryption performance - this must never be used signing!
+ */
+static gcry_mpi_t
+gen_k( gcry_mpi_t p, int small_k )
+{
+ gcry_mpi_t k = mpi_alloc_secure( 0 );
+ gcry_mpi_t temp = mpi_alloc( mpi_get_nlimbs(p) );
+ gcry_mpi_t p_1 = mpi_copy(p);
+ unsigned int orig_nbits = mpi_get_nbits(p);
+ unsigned int nbits, nbytes;
+ char *rndbuf = NULL;
+
+ if (small_k)
+ {
+ /* Using a k much lesser than p is sufficient for encryption and
+ * it greatly improves the encryption performance. We use
+ * Wiener's table and add a large safety margin. */
+ nbits = wiener_map( orig_nbits ) * 3 / 2;
+ if( nbits >= orig_nbits )
+ BUG();
+ }
+ else
+ nbits = orig_nbits;
+
+
+ nbytes = (nbits+7)/8;
+ if( DBG_CIPHER )
+ log_debug("choosing a random k ");
+ mpi_sub_ui( p_1, p, 1);
+ for(;;)
+ {
+ if( !rndbuf || nbits < 32 )
+ {
+ gcry_free(rndbuf);
+ rndbuf = gcry_random_bytes_secure( nbytes, GCRY_STRONG_RANDOM );
+ }
+ else
+ {
+ /* Change only some of the higher bits. We could improve
+ this by directly requesting more memory at the first call
+ to get_random_bytes() and use this the here maybe it is
+ easier to do this directly in random.c Anyway, it is
+ highly inlikely that we will ever reach this code. */
+ char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
+ memcpy( rndbuf, pp, 4 );
+ gcry_free(pp);
+ }
+ _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
+
+ for(;;)
+ {
+ if( !(mpi_cmp( k, p_1 ) < 0) ) /* check: k < (p-1) */
+ {
+ if( DBG_CIPHER )
+ progress('+');
+ break; /* no */
+ }
+ if( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */
+ {
+ if( DBG_CIPHER )
+ progress('-');
+ break; /* no */
+ }
+ if (gcry_mpi_gcd( temp, k, p_1 ))
+ goto found; /* okay, k is relative prime to (p-1) */
+ mpi_add_ui( k, k, 1 );
+ if( DBG_CIPHER )
+ progress('.');
+ }
+ }
+ found:
+ gcry_free(rndbuf);
+ if( DBG_CIPHER )
+ progress('\n');
+ mpi_free(p_1);
+ mpi_free(temp);
+
+ return k;
+}
+
+/****************
+ * Generate a key pair with a key of size NBITS
+ * Returns: 2 structures filled with all needed values
+ * and an array with n-1 factors of (p-1)
+ */
+static void
+generate ( ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t **ret_factors )
+{
+ gcry_mpi_t p; /* the prime */
+ gcry_mpi_t p_min1;
+ gcry_mpi_t g;
+ gcry_mpi_t x; /* the secret exponent */
+ gcry_mpi_t y;
+ unsigned int qbits;
+ unsigned int xbits;
+ byte *rndbuf;
+
+ p_min1 = gcry_mpi_new ( nbits );
+ qbits = wiener_map( nbits );
+ if( qbits & 1 ) /* better have a even one */
+ qbits++;
+ g = mpi_alloc(1);
+ p = _gcry_generate_elg_prime( 0, nbits, qbits, g, ret_factors );
+ mpi_sub_ui(p_min1, p, 1);
+
+
+ /* Select a random number which has these properties:
+ * 0 < x < p-1
+ * This must be a very good random number because this is the
+ * secret part. The prime is public and may be shared anyway,
+ * so a random generator level of 1 is used for the prime.
+ *
+ * I don't see a reason to have a x of about the same size
+ * as the p. It should be sufficient to have one about the size
+ * of q or the later used k plus a large safety margin. Decryption
+ * will be much faster with such an x.
+ */
+ xbits = qbits * 3 / 2;
+ if( xbits >= nbits )
+ BUG();
+ x = gcry_mpi_snew ( xbits );
+ if( DBG_CIPHER )
+ log_debug("choosing a random x of size %u", xbits );
+ rndbuf = NULL;
+ do
+ {
+ if( DBG_CIPHER )
+ progress('.');
+ if( rndbuf )
+ { /* Change only some of the higher bits */
+ if( xbits < 16 ) /* should never happen ... */
+ {
+ gcry_free(rndbuf);
+ rndbuf = gcry_random_bytes_secure( (xbits+7)/8,
+ GCRY_VERY_STRONG_RANDOM );
+ }
+ else
+ {
+ char *r = gcry_random_bytes_secure( 2,
+ GCRY_VERY_STRONG_RANDOM );
+ memcpy(rndbuf, r, 2 );
+ gcry_free(r);
+ }
+ }
+ else
+ {
+ rndbuf = gcry_random_bytes_secure( (xbits+7)/8,
+ GCRY_VERY_STRONG_RANDOM );
+ }
+ _gcry_mpi_set_buffer( x, rndbuf, (xbits+7)/8, 0 );
+ mpi_clear_highbit( x, xbits+1 );
+ }
+ while( !( mpi_cmp_ui( x, 0 )>0 && mpi_cmp( x, p_min1 )<0 ) );
+ gcry_free(rndbuf);
+
+ y = gcry_mpi_new (nbits);
+ gcry_mpi_powm( y, g, x, p );
+
+ if( DBG_CIPHER )
+ {
+ progress('\n');
+ log_mpidump("elg p= ", p );
+ log_mpidump("elg g= ", g );
+ log_mpidump("elg y= ", y );
+ log_mpidump("elg x= ", x );
+ }
+
+ /* Copy the stuff to the key structures */
+ sk->p = p;
+ sk->g = g;
+ sk->y = y;
+ sk->x = x;
+
+ gcry_mpi_release ( p_min1 );
+
+ /* Now we can test our keys (this should never fail!) */
+ test_keys ( sk, nbits - 64, 0 );
+}
+
+
+/* Generate a key pair with a key of size NBITS not using a random
+ value for the secret key but the one given as X. This is useful to
+ implement a passphrase based decryption for a public key based
+ encryption. It has appliactions in backup systems.
+
+ Returns: A structure filled with all needed values and an array
+ with n-1 factors of (p-1). */
+static gcry_err_code_t
+generate_using_x (ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t x,
+ gcry_mpi_t **ret_factors )
+{
+ gcry_mpi_t p; /* The prime. */
+ gcry_mpi_t p_min1; /* The prime minus 1. */
+ gcry_mpi_t g; /* The generator. */
+ gcry_mpi_t y; /* g^x mod p. */
+ unsigned int qbits;
+ unsigned int xbits;
+
+ sk->p = NULL;
+ sk->g = NULL;
+ sk->y = NULL;
+ sk->x = NULL;
+
+ /* Do a quick check to see whether X is suitable. */
+ xbits = mpi_get_nbits (x);
+ if ( xbits < 64 || xbits >= nbits )
+ return GPG_ERR_INV_VALUE;
+
+ p_min1 = gcry_mpi_new ( nbits );
+ qbits = wiener_map ( nbits );
+ if ( (qbits & 1) ) /* Better have an even one. */
+ qbits++;
+ g = mpi_alloc (1);
+ p = _gcry_generate_elg_prime ( 0, nbits, qbits, g, ret_factors );
+ mpi_sub_ui (p_min1, p, 1);
+
+ if (DBG_CIPHER)
+ log_debug ("using a supplied x of size %u", xbits );
+ if ( !(mpi_cmp_ui ( x, 0 ) > 0 && mpi_cmp ( x, p_min1 ) <0 ) )
+ {
+ gcry_mpi_release ( p_min1 );
+ gcry_mpi_release ( p );
+ gcry_mpi_release ( g );
+ return GPG_ERR_INV_VALUE;
+ }
+
+ y = gcry_mpi_new (nbits);
+ gcry_mpi_powm ( y, g, x, p );
+
+ if ( DBG_CIPHER )
+ {
+ progress ('\n');
+ log_mpidump ("elg p= ", p );
+ log_mpidump ("elg g= ", g );
+ log_mpidump ("elg y= ", y );
+ log_mpidump ("elg x= ", x );
+ }
+
+ /* Copy the stuff to the key structures */
+ sk->p = p;
+ sk->g = g;
+ sk->y = y;
+ sk->x = gcry_mpi_copy (x);
+
+ gcry_mpi_release ( p_min1 );
+
+ /* Now we can test our keys. */
+ if ( test_keys ( sk, nbits - 64, 1 ) )
+ {
+ gcry_mpi_release ( sk->p ); sk->p = NULL;
+ gcry_mpi_release ( sk->g ); sk->g = NULL;
+ gcry_mpi_release ( sk->y ); sk->y = NULL;
+ gcry_mpi_release ( sk->x ); sk->x = NULL;
+ return GPG_ERR_BAD_SECKEY;
+ }
+
+ return 0;
+}
+
+
+/****************
+ * Test whether the secret key is valid.
+ * Returns: if this is a valid key.
+ */
+static int
+check_secret_key( ELG_secret_key *sk )
+{
+ int rc;
+ gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs(sk->y) );
+
+ gcry_mpi_powm( y, sk->g, sk->x, sk->p );
+ rc = !mpi_cmp( y, sk->y );
+ mpi_free( y );
+ return rc;
+}
+
+
+static void
+do_encrypt(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey )
+{
+ gcry_mpi_t k;
+
+ /* Note: maybe we should change the interface, so that it
+ * is possible to check that input is < p and return an
+ * error code.
+ */
+
+ k = gen_k( pkey->p, 1 );
+ gcry_mpi_powm( a, pkey->g, k, pkey->p );
+ /* b = (y^k * input) mod p
+ * = ((y^k mod p) * (input mod p)) mod p
+ * and because input is < p
+ * = ((y^k mod p) * input) mod p
+ */
+ gcry_mpi_powm( b, pkey->y, k, pkey->p );
+ gcry_mpi_mulm( b, b, input, pkey->p );
+#if 0
+ if( DBG_CIPHER )
+ {
+ log_mpidump("elg encrypted y= ", pkey->y);
+ log_mpidump("elg encrypted p= ", pkey->p);
+ log_mpidump("elg encrypted k= ", k);
+ log_mpidump("elg encrypted M= ", input);
+ log_mpidump("elg encrypted a= ", a);
+ log_mpidump("elg encrypted b= ", b);
+ }
+#endif
+ mpi_free(k);
+}
+
+
+
+
+static void
+decrypt(gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b, ELG_secret_key *skey )
+{
+ gcry_mpi_t t1 = mpi_alloc_secure( mpi_get_nlimbs( skey->p ) );
+
+ /* output = b/(a^x) mod p */
+ gcry_mpi_powm( t1, a, skey->x, skey->p );
+ mpi_invm( t1, t1, skey->p );
+ mpi_mulm( output, b, t1, skey->p );
+#if 0
+ if( DBG_CIPHER )
+ {
+ log_mpidump("elg decrypted x= ", skey->x);
+ log_mpidump("elg decrypted p= ", skey->p);
+ log_mpidump("elg decrypted a= ", a);
+ log_mpidump("elg decrypted b= ", b);
+ log_mpidump("elg decrypted M= ", output);
+ }
+#endif
+ mpi_free(t1);
+}
+
+
+/****************
+ * Make an Elgamal signature out of INPUT
+ */
+
+static void
+sign(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_secret_key *skey )
+{
+ gcry_mpi_t k;
+ gcry_mpi_t t = mpi_alloc( mpi_get_nlimbs(a) );
+ gcry_mpi_t inv = mpi_alloc( mpi_get_nlimbs(a) );
+ gcry_mpi_t p_1 = mpi_copy(skey->p);
+
+ /*
+ * b = (t * inv) mod (p-1)
+ * b = (t * inv(k,(p-1),(p-1)) mod (p-1)
+ * b = (((M-x*a) mod (p-1)) * inv(k,(p-1),(p-1))) mod (p-1)
+ *
+ */
+ mpi_sub_ui(p_1, p_1, 1);
+ k = gen_k( skey->p, 0 /* no small K ! */ );
+ gcry_mpi_powm( a, skey->g, k, skey->p );
+ mpi_mul(t, skey->x, a );
+ mpi_subm(t, input, t, p_1 );
+ mpi_invm(inv, k, p_1 );
+ mpi_mulm(b, t, inv, p_1 );
+
+#if 0
+ if( DBG_CIPHER )
+ {
+ log_mpidump("elg sign p= ", skey->p);
+ log_mpidump("elg sign g= ", skey->g);
+ log_mpidump("elg sign y= ", skey->y);
+ log_mpidump("elg sign x= ", skey->x);
+ log_mpidump("elg sign k= ", k);
+ log_mpidump("elg sign M= ", input);
+ log_mpidump("elg sign a= ", a);
+ log_mpidump("elg sign b= ", b);
+ }
+#endif
+ mpi_free(k);
+ mpi_free(t);
+ mpi_free(inv);
+ mpi_free(p_1);
+}
+
+
+/****************
+ * Returns true if the signature composed of A and B is valid.
+ */
+static int
+verify(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey )
+{
+ int rc;
+ gcry_mpi_t t1;
+ gcry_mpi_t t2;
+ gcry_mpi_t base[4];
+ gcry_mpi_t ex[4];
+
+ if( !(mpi_cmp_ui( a, 0 ) > 0 && mpi_cmp( a, pkey->p ) < 0) )
+ return 0; /* assertion 0 < a < p failed */
+
+ t1 = mpi_alloc( mpi_get_nlimbs(a) );
+ t2 = mpi_alloc( mpi_get_nlimbs(a) );
+
+#if 0
+ /* t1 = (y^a mod p) * (a^b mod p) mod p */
+ gcry_mpi_powm( t1, pkey->y, a, pkey->p );
+ gcry_mpi_powm( t2, a, b, pkey->p );
+ mpi_mulm( t1, t1, t2, pkey->p );
+
+ /* t2 = g ^ input mod p */
+ gcry_mpi_powm( t2, pkey->g, input, pkey->p );
+
+ rc = !mpi_cmp( t1, t2 );
+#elif 0
+ /* t1 = (y^a mod p) * (a^b mod p) mod p */
+ base[0] = pkey->y; ex[0] = a;
+ base[1] = a; ex[1] = b;
+ base[2] = NULL; ex[2] = NULL;
+ mpi_mulpowm( t1, base, ex, pkey->p );
+
+ /* t2 = g ^ input mod p */
+ gcry_mpi_powm( t2, pkey->g, input, pkey->p );
+
+ rc = !mpi_cmp( t1, t2 );
+#else
+ /* t1 = g ^ - input * y ^ a * a ^ b mod p */
+ mpi_invm(t2, pkey->g, pkey->p );
+ base[0] = t2 ; ex[0] = input;
+ base[1] = pkey->y; ex[1] = a;
+ base[2] = a; ex[2] = b;
+ base[3] = NULL; ex[3] = NULL;
+ mpi_mulpowm( t1, base, ex, pkey->p );
+ rc = !mpi_cmp_ui( t1, 1 );
+
+#endif
+
+ mpi_free(t1);
+ mpi_free(t2);
+ return rc;
+}
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+
+static gpg_err_code_t
+elg_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ gpg_err_code_t ec;
+ ELG_secret_key sk;
+ gcry_mpi_t xvalue = NULL;
+ gcry_sexp_t l1;
+
+ (void)algo;
+ (void)evalue;
+ (void)r_extrainfo;
+
+ if (genparms)
+ {
+ /* Parse the optional xvalue element. */
+ l1 = gcry_sexp_find_token (genparms, "xvalue", 0);
+ if (l1)
+ {
+ xvalue = gcry_sexp_nth_mpi (l1, 1, 0);
+ gcry_sexp_release (l1);
+ if (!xvalue)
+ return GPG_ERR_BAD_MPI;
+ }
+ }
+
+ if (xvalue)
+ ec = generate_using_x (&sk, nbits, xvalue, retfactors);
+ else
+ {
+ generate (&sk, nbits, retfactors);
+ ec = 0;
+ }
+
+ skey[0] = sk.p;
+ skey[1] = sk.g;
+ skey[2] = sk.y;
+ skey[3] = sk.x;
+
+ return ec;
+}
+
+
+static gcry_err_code_t
+elg_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ ELG_secret_key sk;
+
+ (void)algo;
+ (void)evalue;
+
+ generate (&sk, nbits, retfactors);
+ skey[0] = sk.p;
+ skey[1] = sk.g;
+ skey[2] = sk.y;
+ skey[3] = sk.x;
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+elg_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_secret_key sk;
+
+ (void)algo;
+
+ if ((! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.g = skey[1];
+ sk.y = skey[2];
+ sk.x = skey[3];
+
+ if (! check_secret_key (&sk))
+ err = GPG_ERR_BAD_SECKEY;
+ }
+
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_encrypt (int algo, gcry_mpi_t *resarr,
+ gcry_mpi_t data, gcry_mpi_t *pkey, int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_public_key pk;
+
+ (void)algo;
+ (void)flags;
+
+ if ((! data) || (! pkey[0]) || (! pkey[1]) || (! pkey[2]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ pk.p = pkey[0];
+ pk.g = pkey[1];
+ pk.y = pkey[2];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (pk.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (pk.p));
+ do_encrypt (resarr[0], resarr[1], data, &pk);
+ }
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_decrypt (int algo, gcry_mpi_t *result,
+ gcry_mpi_t *data, gcry_mpi_t *skey, int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_secret_key sk;
+
+ (void)algo;
+ (void)flags;
+
+ if ((! data[0]) || (! data[1])
+ || (! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.g = skey[1];
+ sk.y = skey[2];
+ sk.x = skey[3];
+ *result = mpi_alloc_secure (mpi_get_nlimbs (sk.p));
+ decrypt (*result, data[0], data[1], &sk);
+ }
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_secret_key sk;
+
+ (void)algo;
+
+ if ((! data)
+ || (! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.g = skey[1];
+ sk.y = skey[2];
+ sk.x = skey[3];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ sign (resarr[0], resarr[1], data, &sk);
+ }
+
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp) (void *, gcry_mpi_t), void *opaquev)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_public_key pk;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ if ((! data[0]) || (! data[1]) || (! hash)
+ || (! pkey[0]) || (! pkey[1]) || (! pkey[2]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ pk.p = pkey[0];
+ pk.g = pkey[1];
+ pk.y = pkey[2];
+ if (! verify (data[0], data[1], hash, &pk))
+ err = GPG_ERR_BAD_SIGNATURE;
+ }
+
+ return err;
+}
+
+
+static unsigned int
+elg_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+static const char *elg_names[] =
+ {
+ "elg",
+ "openpgp-elg",
+ "openpgp-elg-sig",
+ NULL,
+ };
+
+
+gcry_pk_spec_t _gcry_pubkey_spec_elg =
+ {
+ "ELG", elg_names,
+ "pgy", "pgyx", "ab", "rs", "pgy",
+ GCRY_PK_USAGE_SIGN | GCRY_PK_USAGE_ENCR,
+ elg_generate,
+ elg_check_secret_key,
+ elg_encrypt,
+ elg_decrypt,
+ elg_sign,
+ elg_verify,
+ elg_get_nbits
+ };
+
+pk_extra_spec_t _gcry_pubkey_extraspec_elg =
+ {
+ NULL,
+ elg_generate_ext,
+ NULL
+ };
+
diff --git a/grub-core/lib/libgcrypt-grub/cipher/g10lib.h b/grub-core/lib/libgcrypt-grub/cipher/g10lib.h
new file mode 100644
index 0000000..49cc16a
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/g10lib.h
@@ -0,0 +1 @@
+#include <cipher_wrap.h>
diff --git a/grub-core/lib/libgcrypt-grub/cipher/hash-common.h b/grub-core/lib/libgcrypt-grub/cipher/hash-common.h
new file mode 100644
index 0000000..4a1630f
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/hash-common.h
@@ -0,0 +1,36 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+/* hash-common.h - Declarations of common code for hash algorithms.
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GCRY_HASH_COMMON_H
+#define GCRY_HASH_COMMON_H
+
+
+const char * _gcry_hash_selftest_check_one
+/**/ (int algo,
+ int datamode, const void *data, size_t datalen,
+ const void *expect, size_t expectlen);
+
+
+
+
+
+#endif /*GCRY_HASH_COMMON_H*/
diff --git a/grub-core/lib/libgcrypt-grub/cipher/md4.c b/grub-core/lib/libgcrypt-grub/cipher/md4.c
new file mode 100644
index 0000000..184a4c7
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/md4.c
@@ -0,0 +1,341 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* md4.c - MD4 Message-Digest Algorithm
+ * Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * Based on md5.c in libgcrypt, but rewritten to compute md4 checksums
+ * using a public domain md4 implementation with the following comments:
+ *
+ * Modified by Wei Dai from Andrew M. Kuchling's md4.c
+ * The original code and all modifications are in the public domain.
+ *
+ * This is the original introductory comment:
+ *
+ * md4.c : MD4 hash algorithm.
+ *
+ * Part of the Python Cryptography Toolkit, version 1.1
+ *
+ * Distribute and use freely; there are no restrictions on further
+ * dissemination and usage except those imposed by the laws of your
+ * country of residence.
+ *
+ */
+
+/* MD4 test suite:
+ * MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
+ * MD4 ("a") = bde52cb31de33e46245e05fbdbd6fb24
+ * MD4 ("abc") = a448017aaf21d8525fc10ae87aa6729d
+ * MD4 ("message digest") = d9130a8164549fe818874806e1c7014b
+ * MD4 ("abcdefghijklmnopqrstuvwxyz") = d79e1c308aa5bbcdeea8ed63df412da9
+ * MD4 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =
+ * 043f8582f241db351ce627e153e7f0e4
+ * MD4 ("123456789012345678901234567890123456789012345678901234567890123456
+ * 78901234567890") = e33b4ddc9c38f2199c3e7b164fcc0536
+ */
+
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+
+typedef struct {
+ u32 A,B,C,D; /* chaining variables */
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} MD4_CONTEXT;
+
+
+static void
+md4_init( void *context )
+{
+ MD4_CONTEXT *ctx = context;
+
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
+
+ ctx->nblocks = 0;
+ ctx->count = 0;
+}
+
+#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+
+
+/****************
+ * transform 64 bytes
+ */
+static void
+transform ( MD4_CONTEXT *ctx, const unsigned char *data )
+{
+ u32 in[16];
+ register u32 A = ctx->A;
+ register u32 B = ctx->B;
+ register u32 C = ctx->C;
+ register u32 D = ctx->D;
+
+#ifdef WORDS_BIGENDIAN
+ {
+ int i;
+ byte *p2, *p1;
+ for(i=0, p1=data, p2=(byte*)in; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+#else
+ memcpy (in, data, 64);
+#endif
+
+ /* Round 1. */
+#define function(a,b,c,d,k,s) a=rol(a+F(b,c,d)+in[k],s);
+ function(A,B,C,D, 0, 3);
+ function(D,A,B,C, 1, 7);
+ function(C,D,A,B, 2,11);
+ function(B,C,D,A, 3,19);
+ function(A,B,C,D, 4, 3);
+ function(D,A,B,C, 5, 7);
+ function(C,D,A,B, 6,11);
+ function(B,C,D,A, 7,19);
+ function(A,B,C,D, 8, 3);
+ function(D,A,B,C, 9, 7);
+ function(C,D,A,B,10,11);
+ function(B,C,D,A,11,19);
+ function(A,B,C,D,12, 3);
+ function(D,A,B,C,13, 7);
+ function(C,D,A,B,14,11);
+ function(B,C,D,A,15,19);
+
+#undef function
+
+ /* Round 2. */
+#define function(a,b,c,d,k,s) a=rol(a+G(b,c,d)+in[k]+0x5a827999,s);
+
+ function(A,B,C,D, 0, 3);
+ function(D,A,B,C, 4, 5);
+ function(C,D,A,B, 8, 9);
+ function(B,C,D,A,12,13);
+ function(A,B,C,D, 1, 3);
+ function(D,A,B,C, 5, 5);
+ function(C,D,A,B, 9, 9);
+ function(B,C,D,A,13,13);
+ function(A,B,C,D, 2, 3);
+ function(D,A,B,C, 6, 5);
+ function(C,D,A,B,10, 9);
+ function(B,C,D,A,14,13);
+ function(A,B,C,D, 3, 3);
+ function(D,A,B,C, 7, 5);
+ function(C,D,A,B,11, 9);
+ function(B,C,D,A,15,13);
+
+#undef function
+
+ /* Round 3. */
+#define function(a,b,c,d,k,s) a=rol(a+H(b,c,d)+in[k]+0x6ed9eba1,s);
+
+ function(A,B,C,D, 0, 3);
+ function(D,A,B,C, 8, 9);
+ function(C,D,A,B, 4,11);
+ function(B,C,D,A,12,15);
+ function(A,B,C,D, 2, 3);
+ function(D,A,B,C,10, 9);
+ function(C,D,A,B, 6,11);
+ function(B,C,D,A,14,15);
+ function(A,B,C,D, 1, 3);
+ function(D,A,B,C, 9, 9);
+ function(C,D,A,B, 5,11);
+ function(B,C,D,A,13,15);
+ function(A,B,C,D, 3, 3);
+ function(D,A,B,C,11, 9);
+ function(C,D,A,B, 7,11);
+ function(B,C,D,A,15,15);
+
+
+ /* Put checksum in context given as argument. */
+ ctx->A += A;
+ ctx->B += B;
+ ctx->C += C;
+ ctx->D += D;
+}
+
+
+
+/* The routine updates the message-digest context to
+ * account for the presence of each of the characters inBuf[0..inLen-1]
+ * in the message whose digest is being computed.
+ */
+static void
+md4_write ( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ MD4_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ md4_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+
+/* The routine final terminates the message-digest computation and
+ * ends with the desired message digest in mdContext->digest[0...15].
+ * The handle is prepared for a new MD4 cycle.
+ * Returns 16 bytes representing the digest.
+ */
+
+static void
+md4_final( void *context )
+{
+ MD4_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ md4_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ md4_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
+ *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
+#else /* little endian */
+#define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0)
+#endif
+ X(A);
+ X(B);
+ X(C);
+ X(D);
+#undef X
+
+}
+
+static byte *
+md4_read (void *context)
+{
+ MD4_CONTEXT *hd = context;
+ return hd->buf;
+}
+
+static byte asn[18] = /* Object ID is 1.2.840.113549.2.4 */
+ { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86,0x48,
+ 0x86, 0xf7, 0x0d, 0x02, 0x04, 0x05, 0x00, 0x04, 0x10 };
+
+static gcry_md_oid_spec_t oid_spec_md4[] =
+ {
+ /* iso.member-body.us.rsadsi.digestAlgorithm.md4 */
+ { "1.2.840.113549.2.4" },
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_md4 =
+ {
+ "MD4", asn, DIM (asn), oid_spec_md4,16,
+ md4_init, md4_write, md4_final, md4_read,
+ sizeof (MD4_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+
+
+GRUB_MOD_INIT(gcry_md4)
+{
+ grub_md_register (&_gcry_digest_spec_md4);
+}
+
+GRUB_MOD_FINI(gcry_md4)
+{
+ grub_md_unregister (&_gcry_digest_spec_md4);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/md5.c b/grub-core/lib/libgcrypt-grub/cipher/md5.c
new file mode 100644
index 0000000..f790cd4
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/md5.c
@@ -0,0 +1,368 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* md5.c - MD5 Message-Digest Algorithm
+ * Copyright (C) 1995,1996,1998,1999,2001,2002,
+ * 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * According to the definition of MD5 in RFC 1321 from April 1992.
+ * NOTE: This is *not* the same file as the one from glibc.
+ * Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ * heavily modified for GnuPG by Werner Koch <wk@gnupg.org>
+ */
+
+/* Test values:
+ * "" D4 1D 8C D9 8F 00 B2 04 E9 80 09 98 EC F8 42 7E
+ * "a" 0C C1 75 B9 C0 F1 B6 A8 31 C3 99 E2 69 77 26 61
+ * "abc 90 01 50 98 3C D2 4F B0 D6 96 3F 7D 28 E1 7F 72
+ * "message digest" F9 6B 69 7D 7C B7 93 8D 52 5A 2F 31 AA F1 61 D0
+ */
+
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+
+typedef struct {
+ u32 A,B,C,D; /* chaining variables */
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} MD5_CONTEXT;
+
+
+static void
+md5_init( void *context )
+{
+ MD5_CONTEXT *ctx = context;
+
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
+
+ ctx->nblocks = 0;
+ ctx->count = 0;
+}
+
+
+/* These are the four functions used in the four steps of the MD5 algorithm
+ and defined in the RFC 1321. The first function is a little bit optimized
+ (as found in Colin Plumbs public domain implementation). */
+/* #define FF(b, c, d) ((b & c) | (~b & d)) */
+#define FF(b, c, d) (d ^ (b & (c ^ d)))
+#define FG(b, c, d) FF (d, b, c)
+#define FH(b, c, d) (b ^ c ^ d)
+#define FI(b, c, d) (c ^ (b | ~d))
+
+
+/****************
+ * transform n*64 bytes
+ */
+static void
+transform ( MD5_CONTEXT *ctx, const unsigned char *data )
+{
+ u32 correct_words[16];
+ register u32 A = ctx->A;
+ register u32 B = ctx->B;
+ register u32 C = ctx->C;
+ register u32 D = ctx->D;
+ u32 *cwp = correct_words;
+
+#ifdef WORDS_BIGENDIAN
+ {
+ int i;
+ byte *p2, *p1;
+ for(i=0, p1=data, p2=(byte*)correct_words; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+#else
+ memcpy( correct_words, data, 64 );
+#endif
+
+
+#define OP(a, b, c, d, s, T) \
+ do \
+ { \
+ a += FF (b, c, d) + (*cwp++) + T; \
+ a = rol(a, s); \
+ a += b; \
+ } \
+ while (0)
+
+ /* Before we start, one word about the strange constants.
+ They are defined in RFC 1321 as
+
+ T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64
+ */
+
+ /* Round 1. */
+ OP (A, B, C, D, 7, 0xd76aa478);
+ OP (D, A, B, C, 12, 0xe8c7b756);
+ OP (C, D, A, B, 17, 0x242070db);
+ OP (B, C, D, A, 22, 0xc1bdceee);
+ OP (A, B, C, D, 7, 0xf57c0faf);
+ OP (D, A, B, C, 12, 0x4787c62a);
+ OP (C, D, A, B, 17, 0xa8304613);
+ OP (B, C, D, A, 22, 0xfd469501);
+ OP (A, B, C, D, 7, 0x698098d8);
+ OP (D, A, B, C, 12, 0x8b44f7af);
+ OP (C, D, A, B, 17, 0xffff5bb1);
+ OP (B, C, D, A, 22, 0x895cd7be);
+ OP (A, B, C, D, 7, 0x6b901122);
+ OP (D, A, B, C, 12, 0xfd987193);
+ OP (C, D, A, B, 17, 0xa679438e);
+ OP (B, C, D, A, 22, 0x49b40821);
+
+#undef OP
+#define OP(f, a, b, c, d, k, s, T) \
+ do \
+ { \
+ a += f (b, c, d) + correct_words[k] + T; \
+ a = rol(a, s); \
+ a += b; \
+ } \
+ while (0)
+
+ /* Round 2. */
+ OP (FG, A, B, C, D, 1, 5, 0xf61e2562);
+ OP (FG, D, A, B, C, 6, 9, 0xc040b340);
+ OP (FG, C, D, A, B, 11, 14, 0x265e5a51);
+ OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa);
+ OP (FG, A, B, C, D, 5, 5, 0xd62f105d);
+ OP (FG, D, A, B, C, 10, 9, 0x02441453);
+ OP (FG, C, D, A, B, 15, 14, 0xd8a1e681);
+ OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8);
+ OP (FG, A, B, C, D, 9, 5, 0x21e1cde6);
+ OP (FG, D, A, B, C, 14, 9, 0xc33707d6);
+ OP (FG, C, D, A, B, 3, 14, 0xf4d50d87);
+ OP (FG, B, C, D, A, 8, 20, 0x455a14ed);
+ OP (FG, A, B, C, D, 13, 5, 0xa9e3e905);
+ OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8);
+ OP (FG, C, D, A, B, 7, 14, 0x676f02d9);
+ OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
+
+ /* Round 3. */
+ OP (FH, A, B, C, D, 5, 4, 0xfffa3942);
+ OP (FH, D, A, B, C, 8, 11, 0x8771f681);
+ OP (FH, C, D, A, B, 11, 16, 0x6d9d6122);
+ OP (FH, B, C, D, A, 14, 23, 0xfde5380c);
+ OP (FH, A, B, C, D, 1, 4, 0xa4beea44);
+ OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9);
+ OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60);
+ OP (FH, B, C, D, A, 10, 23, 0xbebfbc70);
+ OP (FH, A, B, C, D, 13, 4, 0x289b7ec6);
+ OP (FH, D, A, B, C, 0, 11, 0xeaa127fa);
+ OP (FH, C, D, A, B, 3, 16, 0xd4ef3085);
+ OP (FH, B, C, D, A, 6, 23, 0x04881d05);
+ OP (FH, A, B, C, D, 9, 4, 0xd9d4d039);
+ OP (FH, D, A, B, C, 12, 11, 0xe6db99e5);
+ OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8);
+ OP (FH, B, C, D, A, 2, 23, 0xc4ac5665);
+
+ /* Round 4. */
+ OP (FI, A, B, C, D, 0, 6, 0xf4292244);
+ OP (FI, D, A, B, C, 7, 10, 0x432aff97);
+ OP (FI, C, D, A, B, 14, 15, 0xab9423a7);
+ OP (FI, B, C, D, A, 5, 21, 0xfc93a039);
+ OP (FI, A, B, C, D, 12, 6, 0x655b59c3);
+ OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92);
+ OP (FI, C, D, A, B, 10, 15, 0xffeff47d);
+ OP (FI, B, C, D, A, 1, 21, 0x85845dd1);
+ OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f);
+ OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0);
+ OP (FI, C, D, A, B, 6, 15, 0xa3014314);
+ OP (FI, B, C, D, A, 13, 21, 0x4e0811a1);
+ OP (FI, A, B, C, D, 4, 6, 0xf7537e82);
+ OP (FI, D, A, B, C, 11, 10, 0xbd3af235);
+ OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb);
+ OP (FI, B, C, D, A, 9, 21, 0xeb86d391);
+
+ /* Put checksum in context given as argument. */
+ ctx->A += A;
+ ctx->B += B;
+ ctx->C += C;
+ ctx->D += D;
+}
+
+
+
+/* The routine updates the message-digest context to
+ * account for the presence of each of the characters inBuf[0..inLen-1]
+ * in the message whose digest is being computed.
+ */
+static void
+md5_write( void *context, const void *inbuf_arg , size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ MD5_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ md5_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+
+}
+
+
+
+/* The routine final terminates the message-digest computation and
+ * ends with the desired message digest in mdContext->digest[0...15].
+ * The handle is prepared for a new MD5 cycle.
+ * Returns 16 bytes representing the digest.
+ */
+
+static void
+md5_final( void *context)
+{
+ MD5_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ md5_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ md5_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
+ *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
+#else /* little endian */
+#define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0)
+#endif
+ X(A);
+ X(B);
+ X(C);
+ X(D);
+#undef X
+
+}
+
+static byte *
+md5_read( void *context )
+{
+ MD5_CONTEXT *hd = (MD5_CONTEXT *) context;
+ return hd->buf;
+}
+
+static byte asn[18] = /* Object ID is 1.2.840.113549.2.5 */
+ { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86,0x48,
+ 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10 };
+
+static gcry_md_oid_spec_t oid_spec_md5[] =
+ {
+ /* iso.member-body.us.rsadsi.pkcs.pkcs-1.4 (md5WithRSAEncryption) */
+ { "1.2.840.113549.1.1.4" },
+ /* RSADSI digestAlgorithm MD5 */
+ { "1.2.840.113549.2.5" },
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_md5 =
+ {
+ "MD5", asn, DIM (asn), oid_spec_md5, 16,
+ md5_init, md5_write, md5_final, md5_read,
+ sizeof (MD5_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+
+GRUB_MOD_INIT(gcry_md5)
+{
+ grub_md_register (&_gcry_digest_spec_md5);
+}
+
+GRUB_MOD_FINI(gcry_md5)
+{
+ grub_md_unregister (&_gcry_digest_spec_md5);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/memory.h b/grub-core/lib/libgcrypt-grub/cipher/memory.h
new file mode 100644
index 0000000..49cc16a
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/memory.h
@@ -0,0 +1 @@
+#include <cipher_wrap.h>
diff --git a/grub-core/lib/libgcrypt-grub/cipher/primegen.c b/grub-core/lib/libgcrypt-grub/cipher/primegen.c
new file mode 100644
index 0000000..b8a3121
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/primegen.c
@@ -0,0 +1,1861 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* primegen.c - prime number generator
+ * Copyright (C) 1998, 2000, 2001, 2002, 2003
+ * 2004, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+#include "ath.h"
+
+static gcry_mpi_t gen_prime (unsigned int nbits, int secret, int randomlevel,
+ int (*extra_check)(void *, gcry_mpi_t),
+ void *extra_check_arg);
+static int check_prime( gcry_mpi_t prime, gcry_mpi_t val_2, int rm_rounds,
+ gcry_prime_check_func_t cb_func, void *cb_arg );
+static int is_prime (gcry_mpi_t n, int steps, unsigned int *count);
+static void m_out_of_n( char *array, int m, int n );
+
+static void (*progress_cb) (void *,const char*,int,int, int );
+static void *progress_cb_data;
+
+/* Note: 2 is not included because it can be tested more easily by
+ looking at bit 0. The last entry in this list is marked by a zero */
+static ushort small_prime_numbers[] = {
+ 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
+ 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101,
+ 103, 107, 109, 113, 127, 131, 137, 139, 149, 151,
+ 157, 163, 167, 173, 179, 181, 191, 193, 197, 199,
+ 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
+ 269, 271, 277, 281, 283, 293, 307, 311, 313, 317,
+ 331, 337, 347, 349, 353, 359, 367, 373, 379, 383,
+ 389, 397, 401, 409, 419, 421, 431, 433, 439, 443,
+ 449, 457, 461, 463, 467, 479, 487, 491, 499, 503,
+ 509, 521, 523, 541, 547, 557, 563, 569, 571, 577,
+ 587, 593, 599, 601, 607, 613, 617, 619, 631, 641,
+ 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
+ 709, 719, 727, 733, 739, 743, 751, 757, 761, 769,
+ 773, 787, 797, 809, 811, 821, 823, 827, 829, 839,
+ 853, 857, 859, 863, 877, 881, 883, 887, 907, 911,
+ 919, 929, 937, 941, 947, 953, 967, 971, 977, 983,
+ 991, 997, 1009, 1013, 1019, 1021, 1031, 1033,
+ 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091,
+ 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151,
+ 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213,
+ 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277,
+ 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307,
+ 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399,
+ 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451,
+ 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493,
+ 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559,
+ 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609,
+ 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667,
+ 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733,
+ 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789,
+ 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871,
+ 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931,
+ 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997,
+ 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053,
+ 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111,
+ 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161,
+ 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243,
+ 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297,
+ 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357,
+ 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411,
+ 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473,
+ 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551,
+ 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633,
+ 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687,
+ 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729,
+ 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791,
+ 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851,
+ 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917,
+ 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999,
+ 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061,
+ 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137,
+ 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209,
+ 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271,
+ 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331,
+ 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391,
+ 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467,
+ 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533,
+ 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583,
+ 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643,
+ 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709,
+ 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779,
+ 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851,
+ 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917,
+ 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989,
+ 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049,
+ 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111,
+ 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177,
+ 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243,
+ 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297,
+ 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391,
+ 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457,
+ 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519,
+ 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597,
+ 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657,
+ 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729,
+ 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799,
+ 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889,
+ 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951,
+ 4957, 4967, 4969, 4973, 4987, 4993, 4999,
+ 0
+};
+static int no_of_small_prime_numbers = DIM (small_prime_numbers) - 1;
+
+
+
+/* An object and a list to build up a global pool of primes. See
+ save_pool_prime and get_pool_prime. */
+struct primepool_s
+{
+ struct primepool_s *next;
+ gcry_mpi_t prime; /* If this is NULL the entry is not used. */
+ unsigned int nbits;
+ gcry_random_level_t randomlevel;
+};
+struct primepool_s *primepool;
+/* Mutex used to protect access to the primepool. */
+static ath_mutex_t primepool_lock = ATH_MUTEX_INITIALIZER;
+
+
+
+/* Save PRIME which has been generated at RANDOMLEVEL for later
+ use. Needs to be called while primepool_lock is being hold. Note
+ that PRIME should be considered released after calling this
+ function. */
+static void
+save_pool_prime (gcry_mpi_t prime, gcry_random_level_t randomlevel)
+{
+ struct primepool_s *item, *item2;
+ size_t n;
+
+ for (n=0, item = primepool; item; item = item->next, n++)
+ if (!item->prime)
+ break;
+ if (!item && n > 100)
+ {
+ /* Remove some of the entries. Our strategy is removing
+ the last third from the list. */
+ int i;
+
+ for (i=0, item2 = primepool; item2; item2 = item2->next)
+ {
+ if (i >= n/3*2)
+ {
+ gcry_mpi_release (item2->prime);
+ item2->prime = NULL;
+ if (!item)
+ item = item2;
+ }
+ }
+ }
+ if (!item)
+ {
+ item = gcry_calloc (1, sizeof *item);
+ if (!item)
+ {
+ /* Out of memory. Silently giving up. */
+ gcry_mpi_release (prime);
+ return;
+ }
+ item->next = primepool;
+ primepool = item;
+ }
+ item->prime = prime;
+ item->nbits = mpi_get_nbits (prime);
+ item->randomlevel = randomlevel;
+}
+
+
+/* Return a prime for the prime pool or NULL if none has been found.
+ The prime needs to match NBITS and randomlevel. This function needs
+ to be called why the primepool_look is being hold. */
+static gcry_mpi_t
+get_pool_prime (unsigned int nbits, gcry_random_level_t randomlevel)
+{
+ struct primepool_s *item;
+
+ for (item = primepool; item; item = item->next)
+ if (item->prime
+ && item->nbits == nbits && item->randomlevel == randomlevel)
+ {
+ gcry_mpi_t prime = item->prime;
+ item->prime = NULL;
+ gcry_assert (nbits == mpi_get_nbits (prime));
+ return prime;
+ }
+ return NULL;
+}
+
+
+
+
+
+
+void
+_gcry_register_primegen_progress ( void (*cb)(void *,const char*,int,int,int),
+ void *cb_data )
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+
+static void
+progress( int c )
+{
+ if ( progress_cb )
+ progress_cb ( progress_cb_data, "primegen", c, 0, 0 );
+}
+
+
+/****************
+ * Generate a prime number (stored in secure memory)
+ */
+gcry_mpi_t
+_gcry_generate_secret_prime (unsigned int nbits,
+ gcry_random_level_t random_level,
+ int (*extra_check)(void*, gcry_mpi_t),
+ void *extra_check_arg)
+{
+ gcry_mpi_t prime;
+
+ prime = gen_prime (nbits, 1, random_level, extra_check, extra_check_arg);
+ progress('\n');
+ return prime;
+}
+
+
+/* Generate a prime number which may be public, i.e. not allocated in
+ secure memory. */
+gcry_mpi_t
+_gcry_generate_public_prime (unsigned int nbits,
+ gcry_random_level_t random_level,
+ int (*extra_check)(void*, gcry_mpi_t),
+ void *extra_check_arg)
+{
+ gcry_mpi_t prime;
+
+ prime = gen_prime (nbits, 0, random_level, extra_check, extra_check_arg);
+ progress('\n');
+ return prime;
+}
+
+
+/* Core prime generation function. The algorithm used to generate
+ practically save primes is due to Lim and Lee as described in the
+ CRYPTO '97 proceedings (ISBN3540633847) page 260.
+
+ NEED_Q_FACTOR: If true make sure that at least one factor is of
+ size qbits. This is for example required for DSA.
+ PRIME_GENERATED: Adresss of a variable where the resulting prime
+ number will be stored.
+ PBITS: Requested size of the prime number. At least 48.
+ QBITS: One factor of the prime needs to be of this size. Maybe 0
+ if this is not required. See also MODE.
+ G: If not NULL an MPI which will receive a generator for the prime
+ for use with Elgamal.
+ RET_FACTORS: if not NULL, an array with all factors are stored at
+ that address.
+ ALL_FACTORS: If set to true all factors of prime-1 are returned.
+ RANDOMLEVEL: How strong should the random numers be.
+ FLAGS: Prime generation bit flags. Currently supported:
+ GCRY_PRIME_FLAG_SECRET - The prime needs to be kept secret.
+ CB_FUNC, CB_ARG: Callback to be used for extra checks.
+
+ */
+static gcry_err_code_t
+prime_generate_internal (int need_q_factor,
+ gcry_mpi_t *prime_generated, unsigned int pbits,
+ unsigned int qbits, gcry_mpi_t g,
+ gcry_mpi_t **ret_factors,
+ gcry_random_level_t randomlevel, unsigned int flags,
+ int all_factors,
+ gcry_prime_check_func_t cb_func, void *cb_arg)
+{
+ gcry_err_code_t err = 0;
+ gcry_mpi_t *factors_new = NULL; /* Factors to return to the
+ caller. */
+ gcry_mpi_t *factors = NULL; /* Current factors. */
+ gcry_random_level_t poolrandomlevel; /* Random level used for pool primes. */
+ gcry_mpi_t *pool = NULL; /* Pool of primes. */
+ int *pool_in_use = NULL; /* Array with currently used POOL elements. */
+ unsigned char *perms = NULL; /* Permutations of POOL. */
+ gcry_mpi_t q_factor = NULL; /* Used if QBITS is non-zero. */
+ unsigned int fbits = 0; /* Length of prime factors. */
+ unsigned int n = 0; /* Number of factors. */
+ unsigned int m = 0; /* Number of primes in pool. */
+ gcry_mpi_t q = NULL; /* First prime factor. */
+ gcry_mpi_t prime = NULL; /* Prime candidate. */
+ unsigned int nprime = 0; /* Bits of PRIME. */
+ unsigned int req_qbits; /* The original QBITS value. */
+ gcry_mpi_t val_2; /* For check_prime(). */
+ int is_locked = 0; /* Flag to help unlocking the primepool. */
+ unsigned int is_secret = (flags & GCRY_PRIME_FLAG_SECRET);
+ unsigned int count1 = 0, count2 = 0;
+ unsigned int i = 0, j = 0;
+
+ if (pbits < 48)
+ return GPG_ERR_INV_ARG;
+
+ /* We won't use a too strong random elvel for the pooled subprimes. */
+ poolrandomlevel = (randomlevel > GCRY_STRONG_RANDOM?
+ GCRY_STRONG_RANDOM : randomlevel);
+
+
+ /* If QBITS is not given, assume a reasonable value. */
+ if (!qbits)
+ qbits = pbits / 3;
+
+ req_qbits = qbits;
+
+ /* Find number of needed prime factors N. */
+ for (n = 1; (pbits - qbits - 1) / n >= qbits; n++)
+ ;
+ n--;
+
+ val_2 = mpi_alloc_set_ui (2);
+
+ if ((! n) || ((need_q_factor) && (n < 2)))
+ {
+ err = GPG_ERR_INV_ARG;
+ goto leave;
+ }
+
+ if (need_q_factor)
+ {
+ n--; /* Need one factor less because we want a specific Q-FACTOR. */
+ fbits = (pbits - 2 * req_qbits -1) / n;
+ qbits = pbits - req_qbits - n * fbits;
+ }
+ else
+ {
+ fbits = (pbits - req_qbits -1) / n;
+ qbits = pbits - n * fbits;
+ }
+
+ if (DBG_CIPHER)
+ log_debug ("gen prime: pbits=%u qbits=%u fbits=%u/%u n=%d\n",
+ pbits, req_qbits, qbits, fbits, n);
+
+ /* Allocate an integer to old the new prime. */
+ prime = gcry_mpi_new (pbits);
+
+ /* Generate first prime factor. */
+ q = gen_prime (qbits, is_secret, randomlevel, NULL, NULL);
+
+ /* Generate a specific Q-Factor if requested. */
+ if (need_q_factor)
+ q_factor = gen_prime (req_qbits, is_secret, randomlevel, NULL, NULL);
+
+ /* Allocate an array to hold all factors + 2 for later usage. */
+ factors = gcry_calloc (n + 2, sizeof (*factors));
+ if (!factors)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ /* Allocate an array to track pool usage. */
+ pool_in_use = gcry_malloc (n * sizeof *pool_in_use);
+ if (!pool_in_use)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ for (i=0; i < n; i++)
+ pool_in_use[i] = -1;
+
+ /* Make a pool of 3n+5 primes (this is an arbitrary value). We
+ require at least 30 primes for are useful selection process.
+
+ Fixme: We need to research the best formula for sizing the pool.
+ */
+ m = n * 3 + 5;
+ if (need_q_factor) /* Need some more in this case. */
+ m += 5;
+ if (m < 30)
+ m = 30;
+ pool = gcry_calloc (m , sizeof (*pool));
+ if (! pool)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ /* Permutate over the pool of primes until we find a prime of the
+ requested length. */
+ do
+ {
+ next_try:
+ for (i=0; i < n; i++)
+ pool_in_use[i] = -1;
+
+ if (!perms)
+ {
+ /* Allocate new primes. This is done right at the beginning
+ of the loop and if we have later run out of primes. */
+ for (i = 0; i < m; i++)
+ {
+ mpi_free (pool[i]);
+ pool[i] = NULL;
+ }
+
+ /* Init m_out_of_n(). */
+ perms = gcry_calloc (1, m);
+ if (!perms)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ if (ath_mutex_lock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 1;
+ for (i = 0; i < n; i++)
+ {
+ perms[i] = 1;
+ /* At a maximum we use strong random for the factors.
+ This saves us a lot of entropy. Given that Q and
+ possible Q-factor are also used in the final prime
+ this should be acceptable. We also don't allocate in
+ secure memory to save on that scare resource too. If
+ Q has been allocated in secure memory, the final
+ prime will be saved there anyway. This is because
+ our MPI routines take care of that. GnuPG has worked
+ this way ever since. */
+ pool[i] = NULL;
+ if (is_locked)
+ {
+ pool[i] = get_pool_prime (fbits, poolrandomlevel);
+ if (!pool[i])
+ {
+ if (ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ }
+ }
+ if (!pool[i])
+ pool[i] = gen_prime (fbits, 0, poolrandomlevel, NULL, NULL);
+ pool_in_use[i] = i;
+ factors[i] = pool[i];
+ }
+ if (is_locked && ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ }
+ else
+ {
+ /* Get next permutation. */
+ m_out_of_n ( (char*)perms, n, m);
+ if (ath_mutex_lock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 1;
+ for (i = j = 0; (i < m) && (j < n); i++)
+ if (perms[i])
+ {
+ /* If the subprime has not yet beed generated do it now. */
+ if (!pool[i] && is_locked)
+ {
+ pool[i] = get_pool_prime (fbits, poolrandomlevel);
+ if (!pool[i])
+ {
+ if (ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ }
+ }
+ if (!pool[i])
+ pool[i] = gen_prime (fbits, 0, poolrandomlevel, NULL, NULL);
+ pool_in_use[j] = i;
+ factors[j++] = pool[i];
+ }
+ if (is_locked && ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ if (i == n)
+ {
+ /* Ran out of permutations: Allocate new primes. */
+ gcry_free (perms);
+ perms = NULL;
+ progress ('!');
+ goto next_try;
+ }
+ }
+
+ /* Generate next prime candidate:
+ p = 2 * q [ * q_factor] * factor_0 * factor_1 * ... * factor_n + 1.
+ */
+ mpi_set (prime, q);
+ mpi_mul_ui (prime, prime, 2);
+ if (need_q_factor)
+ mpi_mul (prime, prime, q_factor);
+ for(i = 0; i < n; i++)
+ mpi_mul (prime, prime, factors[i]);
+ mpi_add_ui (prime, prime, 1);
+ nprime = mpi_get_nbits (prime);
+
+ if (nprime < pbits)
+ {
+ if (++count1 > 20)
+ {
+ count1 = 0;
+ qbits++;
+ progress('>');
+ mpi_free (q);
+ q = gen_prime (qbits, is_secret, randomlevel, NULL, NULL);
+ goto next_try;
+ }
+ }
+ else
+ count1 = 0;
+
+ if (nprime > pbits)
+ {
+ if (++count2 > 20)
+ {
+ count2 = 0;
+ qbits--;
+ progress('<');
+ mpi_free (q);
+ q = gen_prime (qbits, is_secret, randomlevel, NULL, NULL);
+ goto next_try;
+ }
+ }
+ else
+ count2 = 0;
+ }
+ while (! ((nprime == pbits) && check_prime (prime, val_2, 5,
+ cb_func, cb_arg)));
+
+ if (DBG_CIPHER)
+ {
+ progress ('\n');
+ log_mpidump ("prime : ", prime);
+ log_mpidump ("factor q: ", q);
+ if (need_q_factor)
+ log_mpidump ("factor q0: ", q_factor);
+ for (i = 0; i < n; i++)
+ log_mpidump ("factor pi: ", factors[i]);
+ log_debug ("bit sizes: prime=%u, q=%u",
+ mpi_get_nbits (prime), mpi_get_nbits (q));
+ if (need_q_factor)
+ log_debug (", q0=%u", mpi_get_nbits (q_factor));
+ for (i = 0; i < n; i++)
+ log_debug (", p%d=%u", i, mpi_get_nbits (factors[i]));
+ progress('\n');
+ }
+
+ if (ret_factors)
+ {
+ /* Caller wants the factors. */
+ factors_new = gcry_calloc (n + 4, sizeof (*factors_new));
+ if (! factors_new)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ if (all_factors)
+ {
+ i = 0;
+ factors_new[i++] = gcry_mpi_set_ui (NULL, 2);
+ factors_new[i++] = mpi_copy (q);
+ if (need_q_factor)
+ factors_new[i++] = mpi_copy (q_factor);
+ for(j=0; j < n; j++)
+ factors_new[i++] = mpi_copy (factors[j]);
+ }
+ else
+ {
+ i = 0;
+ if (need_q_factor)
+ {
+ factors_new[i++] = mpi_copy (q_factor);
+ for (; i <= n; i++)
+ factors_new[i] = mpi_copy (factors[i]);
+ }
+ else
+ for (; i < n; i++ )
+ factors_new[i] = mpi_copy (factors[i]);
+ }
+ }
+
+ if (g)
+ {
+ /* Create a generator (start with 3). */
+ gcry_mpi_t tmp = mpi_alloc (mpi_get_nlimbs (prime));
+ gcry_mpi_t b = mpi_alloc (mpi_get_nlimbs (prime));
+ gcry_mpi_t pmin1 = mpi_alloc (mpi_get_nlimbs (prime));
+
+ if (need_q_factor)
+ err = GPG_ERR_NOT_IMPLEMENTED;
+ else
+ {
+ factors[n] = q;
+ factors[n + 1] = mpi_alloc_set_ui (2);
+ mpi_sub_ui (pmin1, prime, 1);
+ mpi_set_ui (g, 2);
+ do
+ {
+ mpi_add_ui (g, g, 1);
+ if (DBG_CIPHER)
+ {
+ log_debug ("checking g:");
+ gcry_mpi_dump (g);
+ log_printf ("\n");
+ }
+ else
+ progress('^');
+ for (i = 0; i < n + 2; i++)
+ {
+ mpi_fdiv_q (tmp, pmin1, factors[i]);
+ /* No mpi_pow(), but it is okay to use this with mod
+ prime. */
+ gcry_mpi_powm (b, g, tmp, prime);
+ if (! mpi_cmp_ui (b, 1))
+ break;
+ }
+ if (DBG_CIPHER)
+ progress('\n');
+ }
+ while (i < n + 2);
+
+ mpi_free (factors[n+1]);
+ mpi_free (tmp);
+ mpi_free (b);
+ mpi_free (pmin1);
+ }
+ }
+
+ if (! DBG_CIPHER)
+ progress ('\n');
+
+
+ leave:
+ if (pool)
+ {
+ is_locked = !ath_mutex_lock (&primepool_lock);
+ for(i = 0; i < m; i++)
+ {
+ if (pool[i])
+ {
+ for (j=0; j < n; j++)
+ if (pool_in_use[j] == i)
+ break;
+ if (j == n && is_locked)
+ {
+ /* This pooled subprime has not been used. */
+ save_pool_prime (pool[i], poolrandomlevel);
+ }
+ else
+ mpi_free (pool[i]);
+ }
+ }
+ if (is_locked && ath_mutex_unlock (&primepool_lock))
+ err = GPG_ERR_INTERNAL;
+ is_locked = 0;
+ gcry_free (pool);
+ }
+ gcry_free (pool_in_use);
+ if (factors)
+ gcry_free (factors); /* Factors are shallow copies. */
+ if (perms)
+ gcry_free (perms);
+
+ mpi_free (val_2);
+ mpi_free (q);
+ mpi_free (q_factor);
+
+ if (! err)
+ {
+ *prime_generated = prime;
+ if (ret_factors)
+ *ret_factors = factors_new;
+ }
+ else
+ {
+ if (factors_new)
+ {
+ for (i = 0; factors_new[i]; i++)
+ mpi_free (factors_new[i]);
+ gcry_free (factors_new);
+ }
+ mpi_free (prime);
+ }
+
+ return err;
+}
+
+
+/* Generate a prime used for discrete logarithm algorithms; i.e. this
+ prime will be public and no strong random is required. */
+gcry_mpi_t
+_gcry_generate_elg_prime (int mode, unsigned pbits, unsigned qbits,
+ gcry_mpi_t g, gcry_mpi_t **ret_factors)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_mpi_t prime = NULL;
+
+ err = prime_generate_internal ((mode == 1), &prime, pbits, qbits, g,
+ ret_factors, GCRY_WEAK_RANDOM, 0, 0,
+ NULL, NULL);
+
+ return prime;
+}
+
+
+static gcry_mpi_t
+gen_prime (unsigned int nbits, int secret, int randomlevel,
+ int (*extra_check)(void *, gcry_mpi_t), void *extra_check_arg)
+{
+ gcry_mpi_t prime, ptest, pminus1, val_2, val_3, result;
+ int i;
+ unsigned int x, step;
+ unsigned int count1, count2;
+ int *mods;
+
+/* if ( DBG_CIPHER ) */
+/* log_debug ("generate a prime of %u bits ", nbits ); */
+
+ if (nbits < 16)
+ log_fatal ("can't generate a prime with less than %d bits\n", 16);
+
+ mods = gcry_xmalloc( no_of_small_prime_numbers * sizeof *mods );
+ /* Make nbits fit into gcry_mpi_t implementation. */
+ val_2 = mpi_alloc_set_ui( 2 );
+ val_3 = mpi_alloc_set_ui( 3);
+ prime = secret? gcry_mpi_snew ( nbits ): gcry_mpi_new ( nbits );
+ result = mpi_alloc_like( prime );
+ pminus1= mpi_alloc_like( prime );
+ ptest = mpi_alloc_like( prime );
+ count1 = count2 = 0;
+ for (;;)
+ { /* try forvever */
+ int dotcount=0;
+
+ /* generate a random number */
+ gcry_mpi_randomize( prime, nbits, randomlevel );
+
+ /* Set high order bit to 1, set low order bit to 1. If we are
+ generating a secret prime we are most probably doing that
+ for RSA, to make sure that the modulus does have the
+ requested key size we set the 2 high order bits. */
+ mpi_set_highbit (prime, nbits-1);
+ if (secret)
+ mpi_set_bit (prime, nbits-2);
+ mpi_set_bit(prime, 0);
+
+ /* Calculate all remainders. */
+ for (i=0; (x = small_prime_numbers[i]); i++ )
+ mods[i] = mpi_fdiv_r_ui(NULL, prime, x);
+
+ /* Now try some primes starting with prime. */
+ for(step=0; step < 20000; step += 2 )
+ {
+ /* Check against all the small primes we have in mods. */
+ count1++;
+ for (i=0; (x = small_prime_numbers[i]); i++ )
+ {
+ while ( mods[i] + step >= x )
+ mods[i] -= x;
+ if ( !(mods[i] + step) )
+ break;
+ }
+ if ( x )
+ continue; /* Found a multiple of an already known prime. */
+
+ mpi_add_ui( ptest, prime, step );
+
+ /* Do a fast Fermat test now. */
+ count2++;
+ mpi_sub_ui( pminus1, ptest, 1);
+ gcry_mpi_powm( result, val_2, pminus1, ptest );
+ if ( !mpi_cmp_ui( result, 1 ) )
+ {
+ /* Not composite, perform stronger tests */
+ if (is_prime(ptest, 5, &count2 ))
+ {
+ if (!mpi_test_bit( ptest, nbits-1-secret ))
+ {
+ progress('\n');
+ log_debug ("overflow in prime generation\n");
+ break; /* Stop loop, continue with a new prime. */
+ }
+
+ if (extra_check && extra_check (extra_check_arg, ptest))
+ {
+ /* The extra check told us that this prime is
+ not of the caller's taste. */
+ progress ('/');
+ }
+ else
+ {
+ /* Got it. */
+ mpi_free(val_2);
+ mpi_free(val_3);
+ mpi_free(result);
+ mpi_free(pminus1);
+ mpi_free(prime);
+ gcry_free(mods);
+ return ptest;
+ }
+ }
+ }
+ if (++dotcount == 10 )
+ {
+ progress('.');
+ dotcount = 0;
+ }
+ }
+ progress(':'); /* restart with a new random value */
+ }
+}
+
+/****************
+ * Returns: true if this may be a prime
+ * RM_ROUNDS gives the number of Rabin-Miller tests to run.
+ */
+static int
+check_prime( gcry_mpi_t prime, gcry_mpi_t val_2, int rm_rounds,
+ gcry_prime_check_func_t cb_func, void *cb_arg)
+{
+ int i;
+ unsigned int x;
+ unsigned int count=0;
+
+ /* Check against small primes. */
+ for (i=0; (x = small_prime_numbers[i]); i++ )
+ {
+ if ( mpi_divisible_ui( prime, x ) )
+ return 0;
+ }
+
+ /* A quick Fermat test. */
+ {
+ gcry_mpi_t result = mpi_alloc_like( prime );
+ gcry_mpi_t pminus1 = mpi_alloc_like( prime );
+ mpi_sub_ui( pminus1, prime, 1);
+ gcry_mpi_powm( result, val_2, pminus1, prime );
+ mpi_free( pminus1 );
+ if ( mpi_cmp_ui( result, 1 ) )
+ {
+ /* Is composite. */
+ mpi_free( result );
+ progress('.');
+ return 0;
+ }
+ mpi_free( result );
+ }
+
+ if (!cb_func || cb_func (cb_arg, GCRY_PRIME_CHECK_AT_MAYBE_PRIME, prime))
+ {
+ /* Perform stronger tests. */
+ if ( is_prime( prime, rm_rounds, &count ) )
+ {
+ if (!cb_func
+ || cb_func (cb_arg, GCRY_PRIME_CHECK_AT_GOT_PRIME, prime))
+ return 1; /* Probably a prime. */
+ }
+ }
+ progress('.');
+ return 0;
+}
+
+
+/*
+ * Return true if n is probably a prime
+ */
+static int
+is_prime (gcry_mpi_t n, int steps, unsigned int *count)
+{
+ gcry_mpi_t x = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t z = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t nminus1 = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t a2 = mpi_alloc_set_ui( 2 );
+ gcry_mpi_t q;
+ unsigned i, j, k;
+ int rc = 0;
+ unsigned nbits = mpi_get_nbits( n );
+
+ if (steps < 5) /* Make sure that we do at least 5 rounds. */
+ steps = 5;
+
+ mpi_sub_ui( nminus1, n, 1 );
+
+ /* Find q and k, so that n = 1 + 2^k * q . */
+ q = mpi_copy ( nminus1 );
+ k = mpi_trailing_zeros ( q );
+ mpi_tdiv_q_2exp (q, q, k);
+
+ for (i=0 ; i < steps; i++ )
+ {
+ ++*count;
+ if( !i )
+ {
+ mpi_set_ui( x, 2 );
+ }
+ else
+ {
+ gcry_mpi_randomize( x, nbits, GCRY_WEAK_RANDOM );
+
+ /* Make sure that the number is smaller than the prime and
+ keep the randomness of the high bit. */
+ if ( mpi_test_bit ( x, nbits-2) )
+ {
+ mpi_set_highbit ( x, nbits-2); /* Clear all higher bits. */
+ }
+ else
+ {
+ mpi_set_highbit( x, nbits-2 );
+ mpi_clear_bit( x, nbits-2 );
+ }
+ gcry_assert (mpi_cmp (x, nminus1) < 0 && mpi_cmp_ui (x, 1) > 0);
+ }
+ gcry_mpi_powm ( y, x, q, n);
+ if ( mpi_cmp_ui(y, 1) && mpi_cmp( y, nminus1 ) )
+ {
+ for ( j=1; j < k && mpi_cmp( y, nminus1 ); j++ )
+ {
+ gcry_mpi_powm(y, y, a2, n);
+ if( !mpi_cmp_ui( y, 1 ) )
+ goto leave; /* Not a prime. */
+ }
+ if (mpi_cmp( y, nminus1 ) )
+ goto leave; /* Not a prime. */
+ }
+ progress('+');
+ }
+ rc = 1; /* May be a prime. */
+
+ leave:
+ mpi_free( x );
+ mpi_free( y );
+ mpi_free( z );
+ mpi_free( nminus1 );
+ mpi_free( q );
+ mpi_free( a2 );
+
+ return rc;
+}
+
+
+/* Given ARRAY of size N with M elements set to true produce a
+ modified array with the next permutation of M elements. Note, that
+ ARRAY is used in a one-bit-per-byte approach. To detected the last
+ permutation it is useful to intialize the array with the first M
+ element set to true and use this test:
+ m_out_of_n (array, m, n);
+ for (i = j = 0; i < n && j < m; i++)
+ if (array[i])
+ j++;
+ if (j == m)
+ goto ready;
+
+ This code is based on the algorithm 452 from the "Collected
+ Algorithms From ACM, Volume II" by C. N. Liu and D. T. Tang.
+*/
+static void
+m_out_of_n ( char *array, int m, int n )
+{
+ int i=0, i1=0, j=0, jp=0, j1=0, k1=0, k2=0;
+
+ if( !m || m >= n )
+ return;
+
+ /* Need to handle this simple case separately. */
+ if( m == 1 )
+ {
+ for (i=0; i < n; i++ )
+ {
+ if ( array[i] )
+ {
+ array[i++] = 0;
+ if( i >= n )
+ i = 0;
+ array[i] = 1;
+ return;
+ }
+ }
+ BUG();
+ }
+
+
+ for (j=1; j < n; j++ )
+ {
+ if ( array[n-1] == array[n-j-1])
+ continue;
+ j1 = j;
+ break;
+ }
+
+ if ( (m & 1) )
+ {
+ /* M is odd. */
+ if( array[n-1] )
+ {
+ if( j1 & 1 )
+ {
+ k1 = n - j1;
+ k2 = k1+2;
+ if( k2 > n )
+ k2 = n;
+ goto leave;
+ }
+ goto scan;
+ }
+ k2 = n - j1 - 1;
+ if( k2 == 0 )
+ {
+ k1 = i;
+ k2 = n - j1;
+ }
+ else if( array[k2] && array[k2-1] )
+ k1 = n;
+ else
+ k1 = k2 + 1;
+ }
+ else
+ {
+ /* M is even. */
+ if( !array[n-1] )
+ {
+ k1 = n - j1;
+ k2 = k1 + 1;
+ goto leave;
+ }
+
+ if( !(j1 & 1) )
+ {
+ k1 = n - j1;
+ k2 = k1+2;
+ if( k2 > n )
+ k2 = n;
+ goto leave;
+ }
+ scan:
+ jp = n - j1 - 1;
+ for (i=1; i <= jp; i++ )
+ {
+ i1 = jp + 2 - i;
+ if( array[i1-1] )
+ {
+ if( array[i1-2] )
+ {
+ k1 = i1 - 1;
+ k2 = n - j1;
+ }
+ else
+ {
+ k1 = i1 - 1;
+ k2 = n + 1 - j1;
+ }
+ goto leave;
+ }
+ }
+ k1 = 1;
+ k2 = n + 1 - m;
+ }
+ leave:
+ /* Now complement the two selected bits. */
+ array[k1-1] = !array[k1-1];
+ array[k2-1] = !array[k2-1];
+}
+
+
+/* Generate a new prime number of PRIME_BITS bits and store it in
+ PRIME. If FACTOR_BITS is non-zero, one of the prime factors of
+ (prime - 1) / 2 must be FACTOR_BITS bits long. If FACTORS is
+ non-zero, allocate a new, NULL-terminated array holding the prime
+ factors and store it in FACTORS. FLAGS might be used to influence
+ the prime number generation process. */
+gcry_error_t
+gcry_prime_generate (gcry_mpi_t *prime, unsigned int prime_bits,
+ unsigned int factor_bits, gcry_mpi_t **factors,
+ gcry_prime_check_func_t cb_func, void *cb_arg,
+ gcry_random_level_t random_level,
+ unsigned int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_mpi_t *factors_generated = NULL;
+ gcry_mpi_t prime_generated = NULL;
+ unsigned int mode = 0;
+
+ if (!prime)
+ return gpg_error (GPG_ERR_INV_ARG);
+ *prime = NULL;
+
+ if (flags & GCRY_PRIME_FLAG_SPECIAL_FACTOR)
+ mode = 1;
+
+ /* Generate. */
+ err = prime_generate_internal ((mode==1), &prime_generated, prime_bits,
+ factor_bits, NULL,
+ factors? &factors_generated : NULL,
+ random_level, flags, 1,
+ cb_func, cb_arg);
+
+ if (! err)
+ if (cb_func)
+ {
+ /* Additional check. */
+ if ( !cb_func (cb_arg, GCRY_PRIME_CHECK_AT_FINISH, prime_generated))
+ {
+ /* Failed, deallocate resources. */
+ unsigned int i;
+
+ mpi_free (prime_generated);
+ if (factors)
+ {
+ for (i = 0; factors_generated[i]; i++)
+ mpi_free (factors_generated[i]);
+ gcry_free (factors_generated);
+ }
+ err = GPG_ERR_GENERAL;
+ }
+ }
+
+ if (! err)
+ {
+ if (factors)
+ *factors = factors_generated;
+ *prime = prime_generated;
+ }
+
+ return gcry_error (err);
+}
+
+/* Check wether the number X is prime. */
+gcry_error_t
+gcry_prime_check (gcry_mpi_t x, unsigned int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_mpi_t val_2 = mpi_alloc_set_ui (2); /* Used by the Fermat test. */
+
+ (void)flags;
+
+ /* We use 64 rounds because the prime we are going to test is not
+ guaranteed to be a random one. */
+ if (! check_prime (x, val_2, 64, NULL, NULL))
+ err = GPG_ERR_NO_PRIME;
+
+ mpi_free (val_2);
+
+ return gcry_error (err);
+}
+
+/* Find a generator for PRIME where the factorization of (prime-1) is
+ in the NULL terminated array FACTORS. Return the generator as a
+ newly allocated MPI in R_G. If START_G is not NULL, use this as s
+ atart for the search. Returns 0 on success.*/
+gcry_error_t
+gcry_prime_group_generator (gcry_mpi_t *r_g,
+ gcry_mpi_t prime, gcry_mpi_t *factors,
+ gcry_mpi_t start_g)
+{
+ gcry_mpi_t tmp = gcry_mpi_new (0);
+ gcry_mpi_t b = gcry_mpi_new (0);
+ gcry_mpi_t pmin1 = gcry_mpi_new (0);
+ gcry_mpi_t g = start_g? gcry_mpi_copy (start_g) : gcry_mpi_set_ui (NULL, 3);
+ int first = 1;
+ int i, n;
+
+ if (!factors || !r_g || !prime)
+ return gpg_error (GPG_ERR_INV_ARG);
+ *r_g = NULL;
+
+ for (n=0; factors[n]; n++)
+ ;
+ if (n < 2)
+ return gpg_error (GPG_ERR_INV_ARG);
+
+ /* Extra sanity check - usually disabled. */
+/* mpi_set (tmp, factors[0]); */
+/* for(i = 1; i < n; i++) */
+/* mpi_mul (tmp, tmp, factors[i]); */
+/* mpi_add_ui (tmp, tmp, 1); */
+/* if (mpi_cmp (prime, tmp)) */
+/* return gpg_error (GPG_ERR_INV_ARG); */
+
+ gcry_mpi_sub_ui (pmin1, prime, 1);
+ do
+ {
+ if (first)
+ first = 0;
+ else
+ gcry_mpi_add_ui (g, g, 1);
+
+ if (DBG_CIPHER)
+ {
+ log_debug ("checking g:");
+ gcry_mpi_dump (g);
+ log_debug ("\n");
+ }
+ else
+ progress('^');
+
+ for (i = 0; i < n; i++)
+ {
+ mpi_fdiv_q (tmp, pmin1, factors[i]);
+ gcry_mpi_powm (b, g, tmp, prime);
+ if (! mpi_cmp_ui (b, 1))
+ break;
+ }
+ if (DBG_CIPHER)
+ progress('\n');
+ }
+ while (i < n);
+
+ gcry_mpi_release (tmp);
+ gcry_mpi_release (b);
+ gcry_mpi_release (pmin1);
+ *r_g = g;
+
+ return 0;
+}
+
+/* Convenience function to release the factors array. */
+void
+gcry_prime_release_factors (gcry_mpi_t *factors)
+{
+ if (factors)
+ {
+ int i;
+
+ for (i=0; factors[i]; i++)
+ mpi_free (factors[i]);
+ gcry_free (factors);
+ }
+}
+
+
+
+/* Helper for _gcry_derive_x931_prime. */
+static gcry_mpi_t
+find_x931_prime (const gcry_mpi_t pfirst)
+{
+ gcry_mpi_t val_2 = mpi_alloc_set_ui (2);
+ gcry_mpi_t prime;
+
+ prime = gcry_mpi_copy (pfirst);
+ /* If P is even add 1. */
+ mpi_set_bit (prime, 0);
+
+ /* We use 64 Rabin-Miller rounds which is better and thus
+ sufficient. We do not have a Lucas test implementaion thus we
+ can't do it in the X9.31 preferred way of running a few
+ Rabin-Miller followed by one Lucas test. */
+ while ( !check_prime (prime, val_2, 64, NULL, NULL) )
+ mpi_add_ui (prime, prime, 2);
+
+ mpi_free (val_2);
+
+ return prime;
+}
+
+
+/* Generate a prime using the algorithm from X9.31 appendix B.4.
+
+ This function requires that the provided public exponent E is odd.
+ XP, XP1 and XP2 are the seed values. All values are mandatory.
+
+ On success the prime is returned. If R_P1 or R_P2 are given the
+ internal values P1 and P2 are saved at these addresses. On error
+ NULL is returned. */
+gcry_mpi_t
+_gcry_derive_x931_prime (const gcry_mpi_t xp,
+ const gcry_mpi_t xp1, const gcry_mpi_t xp2,
+ const gcry_mpi_t e,
+ gcry_mpi_t *r_p1, gcry_mpi_t *r_p2)
+{
+ gcry_mpi_t p1, p2, p1p2, yp0;
+
+ if (!xp || !xp1 || !xp2)
+ return NULL;
+ if (!e || !mpi_test_bit (e, 0))
+ return NULL; /* We support only odd values for E. */
+
+ p1 = find_x931_prime (xp1);
+ p2 = find_x931_prime (xp2);
+ p1p2 = mpi_alloc_like (xp);
+ mpi_mul (p1p2, p1, p2);
+
+ {
+ gcry_mpi_t r1, tmp;
+
+ /* r1 = (p2^{-1} mod p1)p2 - (p1^{-1} mod p2) */
+ tmp = mpi_alloc_like (p1);
+ mpi_invm (tmp, p2, p1);
+ mpi_mul (tmp, tmp, p2);
+ r1 = tmp;
+
+ tmp = mpi_alloc_like (p2);
+ mpi_invm (tmp, p1, p2);
+ mpi_mul (tmp, tmp, p1);
+ mpi_sub (r1, r1, tmp);
+
+ /* Fixup a negative value. */
+ if (mpi_is_neg (r1))
+ mpi_add (r1, r1, p1p2);
+
+ /* yp0 = xp + (r1 - xp mod p1*p2) */
+ yp0 = tmp; tmp = NULL;
+ mpi_subm (yp0, r1, xp, p1p2);
+ mpi_add (yp0, yp0, xp);
+ mpi_free (r1);
+
+ /* Fixup a negative value. */
+ if (mpi_cmp (yp0, xp) < 0 )
+ mpi_add (yp0, yp0, p1p2);
+ }
+
+ /* yp0 is now the first integer greater than xp with p1 being a
+ large prime factor of yp0-1 and p2 a large prime factor of yp0+1. */
+
+ /* Note that the first example from X9.31 (D.1.1) which uses
+ (Xq1 #1A5CF72EE770DE50CB09ACCEA9#)
+ (Xq2 #134E4CAA16D2350A21D775C404#)
+ (Xq #CC1092495D867E64065DEE3E7955F2EBC7D47A2D
+ 7C9953388F97DDDC3E1CA19C35CA659EDC2FC325
+ 6D29C2627479C086A699A49C4C9CEE7EF7BD1B34
+ 321DE34A#))))
+ returns an yp0 of
+ #CC1092495D867E64065DEE3E7955F2EBC7D47A2D
+ 7C9953388F97DDDC3E1CA19C35CA659EDC2FC4E3
+ BF20CB896EE37E098A906313271422162CB6C642
+ 75C1201F#
+ and not
+ #CC1092495D867E64065DEE3E7955F2EBC7D47A2D
+ 7C9953388F97DDDC3E1CA19C35CA659EDC2FC2E6
+ C88FE299D52D78BE405A97E01FD71DD7819ECB91
+ FA85A076#
+ as stated in the standard. This seems to be a bug in X9.31.
+ */
+
+ {
+ gcry_mpi_t val_2 = mpi_alloc_set_ui (2);
+ gcry_mpi_t gcdtmp = mpi_alloc_like (yp0);
+ int gcdres;
+
+ mpi_sub_ui (p1p2, p1p2, 1); /* Adjust for loop body. */
+ mpi_sub_ui (yp0, yp0, 1); /* Ditto. */
+ for (;;)
+ {
+ gcdres = gcry_mpi_gcd (gcdtmp, e, yp0);
+ mpi_add_ui (yp0, yp0, 1);
+ if (!gcdres)
+ progress ('/'); /* gcd (e, yp0-1) != 1 */
+ else if (check_prime (yp0, val_2, 64, NULL, NULL))
+ break; /* Found. */
+ /* We add p1p2-1 because yp0 is incremented after the gcd test. */
+ mpi_add (yp0, yp0, p1p2);
+ }
+ mpi_free (gcdtmp);
+ mpi_free (val_2);
+ }
+
+ mpi_free (p1p2);
+
+ progress('\n');
+ if (r_p1)
+ *r_p1 = p1;
+ else
+ mpi_free (p1);
+ if (r_p2)
+ *r_p2 = p2;
+ else
+ mpi_free (p2);
+ return yp0;
+}
+
+
+
+/* Generate the two prime used for DSA using the algorithm specified
+ in FIPS 186-2. PBITS is the desired length of the prime P and a
+ QBITS the length of the prime Q. If SEED is not supplied and
+ SEEDLEN is 0 the function generates an appropriate SEED. On
+ success the generated primes are stored at R_Q and R_P, the counter
+ value is stored at R_COUNTER and the seed actually used for
+ generation is stored at R_SEED and R_SEEDVALUE. */
+gpg_err_code_t
+_gcry_generate_fips186_2_prime (unsigned int pbits, unsigned int qbits,
+ const void *seed, size_t seedlen,
+ gcry_mpi_t *r_q, gcry_mpi_t *r_p,
+ int *r_counter,
+ void **r_seed, size_t *r_seedlen)
+{
+ gpg_err_code_t ec;
+ unsigned char seed_help_buffer[160/8]; /* Used to hold a generated SEED. */
+ unsigned char *seed_plus; /* Malloced buffer to hold SEED+x. */
+ unsigned char digest[160/8]; /* Helper buffer for SHA-1 digest. */
+ gcry_mpi_t val_2 = NULL; /* Helper for the prime test. */
+ gcry_mpi_t tmpval = NULL; /* Helper variable. */
+ int i;
+
+ unsigned char value_u[160/8];
+ int value_n, value_b, value_k;
+ int counter;
+ gcry_mpi_t value_w = NULL;
+ gcry_mpi_t value_x = NULL;
+ gcry_mpi_t prime_q = NULL;
+ gcry_mpi_t prime_p = NULL;
+
+ /* FIPS 186-2 allows only for 1024/160 bit. */
+ if (pbits != 1024 || qbits != 160)
+ return GPG_ERR_INV_KEYLEN;
+
+ if (!seed && !seedlen)
+ ; /* No seed value given: We are asked to generate it. */
+ else if (!seed || seedlen < qbits/8)
+ return GPG_ERR_INV_ARG;
+
+ /* Allocate a buffer to later compute SEED+some_increment. */
+ seed_plus = gcry_malloc (seedlen < 20? 20:seedlen);
+ if (!seed_plus)
+ {
+ ec = gpg_err_code_from_syserror ();
+ goto leave;
+ }
+
+ val_2 = mpi_alloc_set_ui (2);
+ value_n = (pbits - 1) / qbits;
+ value_b = (pbits - 1) - value_n * qbits;
+ value_w = gcry_mpi_new (pbits);
+ value_x = gcry_mpi_new (pbits);
+
+ restart:
+ /* Generate Q. */
+ for (;;)
+ {
+ /* Step 1: Generate a (new) seed unless one has been supplied. */
+ if (!seed)
+ {
+ seedlen = sizeof seed_help_buffer;
+ gcry_create_nonce (seed_help_buffer, seedlen);
+ seed = seed_help_buffer;
+ }
+
+ /* Step 2: U = sha1(seed) ^ sha1((seed+1) mod 2^{qbits}) */
+ memcpy (seed_plus, seed, seedlen);
+ for (i=seedlen-1; i >= 0; i--)
+ {
+ seed_plus[i]++;
+ if (seed_plus[i])
+ break;
+ }
+ gcry_md_hash_buffer (GCRY_MD_SHA1, value_u, seed, seedlen);
+ gcry_md_hash_buffer (GCRY_MD_SHA1, digest, seed_plus, seedlen);
+ for (i=0; i < sizeof value_u; i++)
+ value_u[i] ^= digest[i];
+
+ /* Step 3: Form q from U */
+ gcry_mpi_release (prime_q); prime_q = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&prime_q, GCRYMPI_FMT_USG,
+ value_u, sizeof value_u, NULL));
+ if (ec)
+ goto leave;
+ mpi_set_highbit (prime_q, qbits-1 );
+ mpi_set_bit (prime_q, 0);
+
+ /* Step 4: Test whether Q is prime using 64 round of Rabin-Miller. */
+ if (check_prime (prime_q, val_2, 64, NULL, NULL))
+ break; /* Yes, Q is prime. */
+
+ /* Step 5. */
+ seed = NULL; /* Force a new seed at Step 1. */
+ }
+
+ /* Step 6. Note that we do no use an explicit offset but increment
+ SEED_PLUS accordingly. SEED_PLUS is currently SEED+1. */
+ counter = 0;
+
+ /* Generate P. */
+ prime_p = gcry_mpi_new (pbits);
+ for (;;)
+ {
+ /* Step 7: For k = 0,...n let
+ V_k = sha1(seed+offset+k) mod 2^{qbits}
+ Step 8: W = V_0 + V_1*2^160 +
+ ...
+ + V_{n-1}*2^{(n-1)*160}
+ + (V_{n} mod 2^b)*2^{n*160}
+ */
+ mpi_set_ui (value_w, 0);
+ for (value_k=0; value_k <= value_n; value_k++)
+ {
+ /* There is no need to have an explicit offset variable: In
+ the first round we shall have an offset of 2, this is
+ achieved by using SEED_PLUS which is already at SEED+1,
+ thus we just need to increment it once again. The
+ requirement for the next round is to update offset by N,
+ which we implictly did at the end of this loop, and then
+ to add one; this one is the same as in the first round. */
+ for (i=seedlen-1; i >= 0; i--)
+ {
+ seed_plus[i]++;
+ if (seed_plus[i])
+ break;
+ }
+ gcry_md_hash_buffer (GCRY_MD_SHA1, digest, seed_plus, seedlen);
+
+ gcry_mpi_release (tmpval); tmpval = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&tmpval, GCRYMPI_FMT_USG,
+ digest, sizeof digest, NULL));
+ if (ec)
+ goto leave;
+ if (value_k == value_n)
+ mpi_clear_highbit (tmpval, value_b); /* (V_n mod 2^b) */
+ mpi_lshift (tmpval, tmpval, value_k*qbits);
+ mpi_add (value_w, value_w, tmpval);
+ }
+
+ /* Step 8 continued: X = W + 2^{L-1} */
+ mpi_set_ui (value_x, 0);
+ mpi_set_highbit (value_x, pbits-1);
+ mpi_add (value_x, value_x, value_w);
+
+ /* Step 9: c = X mod 2q, p = X - (c - 1) */
+ mpi_mul_2exp (tmpval, prime_q, 1);
+ mpi_mod (tmpval, value_x, tmpval);
+ mpi_sub_ui (tmpval, tmpval, 1);
+ mpi_sub (prime_p, value_x, tmpval);
+
+ /* Step 10: If p < 2^{L-1} skip the primality test. */
+ /* Step 11 and 12: Primality test. */
+ if (mpi_get_nbits (prime_p) >= pbits-1
+ && check_prime (prime_p, val_2, 64, NULL, NULL) )
+ break; /* Yes, P is prime, continue with Step 15. */
+
+ /* Step 13: counter = counter + 1, offset = offset + n + 1. */
+ counter++;
+
+ /* Step 14: If counter >= 2^12 goto Step 1. */
+ if (counter >= 4096)
+ goto restart;
+ }
+
+ /* Step 15: Save p, q, counter and seed. */
+/* log_debug ("fips186-2 pbits p=%u q=%u counter=%d\n", */
+/* mpi_get_nbits (prime_p), mpi_get_nbits (prime_q), counter); */
+/* log_printhex("fips186-2 seed:", seed, seedlen); */
+/* log_mpidump ("fips186-2 prime p", prime_p); */
+/* log_mpidump ("fips186-2 prime q", prime_q); */
+ if (r_q)
+ {
+ *r_q = prime_q;
+ prime_q = NULL;
+ }
+ if (r_p)
+ {
+ *r_p = prime_p;
+ prime_p = NULL;
+ }
+ if (r_counter)
+ *r_counter = counter;
+ if (r_seed && r_seedlen)
+ {
+ memcpy (seed_plus, seed, seedlen);
+ *r_seed = seed_plus;
+ seed_plus = NULL;
+ *r_seedlen = seedlen;
+ }
+
+
+ leave:
+ gcry_mpi_release (tmpval);
+ gcry_mpi_release (value_x);
+ gcry_mpi_release (value_w);
+ gcry_mpi_release (prime_p);
+ gcry_mpi_release (prime_q);
+ gcry_free (seed_plus);
+ gcry_mpi_release (val_2);
+ return ec;
+}
+
+
+
+/* WARNING: The code below has not yet been tested! However, it is
+ not yet used. We need to wait for FIPS 186-3 final and for test
+ vectors.
+
+ Generate the two prime used for DSA using the algorithm specified
+ in FIPS 186-3, A.1.1.2. PBITS is the desired length of the prime P
+ and a QBITS the length of the prime Q. If SEED is not supplied and
+ SEEDLEN is 0 the function generates an appropriate SEED. On
+ success the generated primes are stored at R_Q and R_P, the counter
+ value is stored at R_COUNTER and the seed actually used for
+ generation is stored at R_SEED and R_SEEDVALUE. The hash algorithm
+ used is stored at R_HASHALGO.
+
+ Note that this function is very similar to the fips186_2 code. Due
+ to the minor differences, other buffer sizes and for documentarion,
+ we use a separate function.
+*/
+gpg_err_code_t
+_gcry_generate_fips186_3_prime (unsigned int pbits, unsigned int qbits,
+ const void *seed, size_t seedlen,
+ gcry_mpi_t *r_q, gcry_mpi_t *r_p,
+ int *r_counter,
+ void **r_seed, size_t *r_seedlen,
+ int *r_hashalgo)
+{
+ gpg_err_code_t ec;
+ unsigned char seed_help_buffer[256/8]; /* Used to hold a generated SEED. */
+ unsigned char *seed_plus; /* Malloced buffer to hold SEED+x. */
+ unsigned char digest[256/8]; /* Helper buffer for SHA-1 digest. */
+ gcry_mpi_t val_2 = NULL; /* Helper for the prime test. */
+ gcry_mpi_t tmpval = NULL; /* Helper variable. */
+ int hashalgo; /* The id of the Approved Hash Function. */
+ int i;
+
+ unsigned char value_u[256/8];
+ int value_n, value_b, value_j;
+ int counter;
+ gcry_mpi_t value_w = NULL;
+ gcry_mpi_t value_x = NULL;
+ gcry_mpi_t prime_q = NULL;
+ gcry_mpi_t prime_p = NULL;
+
+ gcry_assert (sizeof seed_help_buffer == sizeof digest
+ && sizeof seed_help_buffer == sizeof value_u);
+
+ /* Step 1: Check the requested prime lengths. */
+ /* Note that due to the size of our buffers QBITS is limited to 256. */
+ if (pbits == 1024 && qbits == 160)
+ hashalgo = GCRY_MD_SHA1;
+ else if (pbits == 2048 && qbits == 224)
+ hashalgo = GCRY_MD_SHA224;
+ else if (pbits == 2048 && qbits == 256)
+ hashalgo = GCRY_MD_SHA256;
+ else if (pbits == 3072 && qbits == 256)
+ hashalgo = GCRY_MD_SHA256;
+ else
+ return GPG_ERR_INV_KEYLEN;
+
+ /* Also check that the hash algorithm is available. */
+ ec = gpg_err_code (gcry_md_test_algo (hashalgo));
+ if (ec)
+ return ec;
+ gcry_assert (qbits/8 <= sizeof digest);
+ gcry_assert (gcry_md_get_algo_dlen (hashalgo) == qbits/8);
+
+
+ /* Step 2: Check seedlen. */
+ if (!seed && !seedlen)
+ ; /* No seed value given: We are asked to generate it. */
+ else if (!seed || seedlen < qbits/8)
+ return GPG_ERR_INV_ARG;
+
+ /* Allocate a buffer to later compute SEED+some_increment and a few
+ helper variables. */
+ seed_plus = gcry_malloc (seedlen < sizeof seed_help_buffer?
+ sizeof seed_help_buffer : seedlen);
+ if (!seed_plus)
+ {
+ ec = gpg_err_code_from_syserror ();
+ goto leave;
+ }
+ val_2 = mpi_alloc_set_ui (2);
+ value_w = gcry_mpi_new (pbits);
+ value_x = gcry_mpi_new (pbits);
+
+ /* Step 3: n = \lceil L / outlen \rceil - 1 */
+ value_n = (pbits + qbits - 1) / qbits - 1;
+ /* Step 4: b = L - 1 - (n * outlen) */
+ value_b = pbits - 1 - (value_n * qbits);
+
+ restart:
+ /* Generate Q. */
+ for (;;)
+ {
+ /* Step 5: Generate a (new) seed unless one has been supplied. */
+ if (!seed)
+ {
+ seedlen = qbits/8;
+ gcry_assert (seedlen <= sizeof seed_help_buffer);
+ gcry_create_nonce (seed_help_buffer, seedlen);
+ seed = seed_help_buffer;
+ }
+
+ /* Step 6: U = hash(seed) */
+ gcry_md_hash_buffer (hashalgo, value_u, seed, seedlen);
+
+ /* Step 7: q = 2^{N-1} + U + 1 - (U mod 2) */
+ if ( !(value_u[qbits/8-1] & 0x01) )
+ {
+ for (i=qbits/8-1; i >= 0; i--)
+ {
+ value_u[i]++;
+ if (value_u[i])
+ break;
+ }
+ }
+ gcry_mpi_release (prime_q); prime_q = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&prime_q, GCRYMPI_FMT_USG,
+ value_u, sizeof value_u, NULL));
+ if (ec)
+ goto leave;
+ mpi_set_highbit (prime_q, qbits-1 );
+
+ /* Step 8: Test whether Q is prime using 64 round of Rabin-Miller.
+ According to table C.1 this is sufficient for all
+ supported prime sizes (i.e. up 3072/256). */
+ if (check_prime (prime_q, val_2, 64, NULL, NULL))
+ break; /* Yes, Q is prime. */
+
+ /* Step 8. */
+ seed = NULL; /* Force a new seed at Step 5. */
+ }
+
+ /* Step 11. Note that we do no use an explicit offset but increment
+ SEED_PLUS accordingly. */
+ memcpy (seed_plus, seed, seedlen);
+ counter = 0;
+
+ /* Generate P. */
+ prime_p = gcry_mpi_new (pbits);
+ for (;;)
+ {
+ /* Step 11.1: For j = 0,...n let
+ V_j = hash(seed+offset+j)
+ Step 11.2: W = V_0 + V_1*2^outlen +
+ ...
+ + V_{n-1}*2^{(n-1)*outlen}
+ + (V_{n} mod 2^b)*2^{n*outlen}
+ */
+ mpi_set_ui (value_w, 0);
+ for (value_j=0; value_j <= value_n; value_j++)
+ {
+ /* There is no need to have an explicit offset variable: In
+ the first round we shall have an offset of 1 and a j of
+ 0. This is achieved by incrementing SEED_PLUS here. For
+ the next round offset is implicitly updated by using
+ SEED_PLUS again. */
+ for (i=seedlen-1; i >= 0; i--)
+ {
+ seed_plus[i]++;
+ if (seed_plus[i])
+ break;
+ }
+ gcry_md_hash_buffer (GCRY_MD_SHA1, digest, seed_plus, seedlen);
+
+ gcry_mpi_release (tmpval); tmpval = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&tmpval, GCRYMPI_FMT_USG,
+ digest, sizeof digest, NULL));
+ if (ec)
+ goto leave;
+ if (value_j == value_n)
+ mpi_clear_highbit (tmpval, value_b); /* (V_n mod 2^b) */
+ mpi_lshift (tmpval, tmpval, value_j*qbits);
+ mpi_add (value_w, value_w, tmpval);
+ }
+
+ /* Step 11.3: X = W + 2^{L-1} */
+ mpi_set_ui (value_x, 0);
+ mpi_set_highbit (value_x, pbits-1);
+ mpi_add (value_x, value_x, value_w);
+
+ /* Step 11.4: c = X mod 2q */
+ mpi_mul_2exp (tmpval, prime_q, 1);
+ mpi_mod (tmpval, value_x, tmpval);
+
+ /* Step 11.5: p = X - (c - 1) */
+ mpi_sub_ui (tmpval, tmpval, 1);
+ mpi_sub (prime_p, value_x, tmpval);
+
+ /* Step 11.6: If p < 2^{L-1} skip the primality test. */
+ /* Step 11.7 and 11.8: Primality test. */
+ if (mpi_get_nbits (prime_p) >= pbits-1
+ && check_prime (prime_p, val_2, 64, NULL, NULL) )
+ break; /* Yes, P is prime, continue with Step 15. */
+
+ /* Step 11.9: counter = counter + 1, offset = offset + n + 1.
+ If counter >= 4L goto Step 5. */
+ counter++;
+ if (counter >= 4*pbits)
+ goto restart;
+ }
+
+ /* Step 12: Save p, q, counter and seed. */
+ log_debug ("fips186-3 pbits p=%u q=%u counter=%d\n",
+ mpi_get_nbits (prime_p), mpi_get_nbits (prime_q), counter);
+ log_printhex("fips186-3 seed:", seed, seedlen);
+ log_mpidump ("fips186-3 prime p", prime_p);
+ log_mpidump ("fips186-3 prime q", prime_q);
+ if (r_q)
+ {
+ *r_q = prime_q;
+ prime_q = NULL;
+ }
+ if (r_p)
+ {
+ *r_p = prime_p;
+ prime_p = NULL;
+ }
+ if (r_counter)
+ *r_counter = counter;
+ if (r_seed && r_seedlen)
+ {
+ memcpy (seed_plus, seed, seedlen);
+ *r_seed = seed_plus;
+ seed_plus = NULL;
+ *r_seedlen = seedlen;
+ }
+ if (r_hashalgo)
+ *r_hashalgo = hashalgo;
+
+ leave:
+ gcry_mpi_release (tmpval);
+ gcry_mpi_release (value_x);
+ gcry_mpi_release (value_w);
+ gcry_mpi_release (prime_p);
+ gcry_mpi_release (prime_q);
+ gcry_free (seed_plus);
+ gcry_mpi_release (val_2);
+ return ec;
+}
+
diff --git a/grub-core/lib/libgcrypt-grub/cipher/rfc2268.c b/grub-core/lib/libgcrypt-grub/cipher/rfc2268.c
new file mode 100644
index 0000000..f6c2679
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/rfc2268.c
@@ -0,0 +1,282 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* rfc2268.c - The cipher described in rfc2268; aka Ron's Cipher 2.
+ * Copyright (C) 2003 Nikos Mavroyanopoulos
+ * Copyright (C) 2004 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+/* This implementation was written by Nikos Mavroyanopoulos for GNUTLS
+ * as a Libgcrypt module (gnutls/lib/x509/rc2.c) and later adapted for
+ * direct use by Libgcrypt by Werner Koch. This implementation is
+ * only useful for pkcs#12 descryption.
+ *
+ * The implementation here is based on Peter Gutmann's RRC.2 paper.
+ */
+
+
+#include "g10lib.h"
+#include "types.h"
+#include "cipher.h"
+
+#define RFC2268_BLOCKSIZE 8
+
+typedef struct
+{
+ u16 S[64];
+} RFC2268_context;
+
+static const unsigned char rfc2268_sbox[] = {
+ 217, 120, 249, 196, 25, 221, 181, 237,
+ 40, 233, 253, 121, 74, 160, 216, 157,
+ 198, 126, 55, 131, 43, 118, 83, 142,
+ 98, 76, 100, 136, 68, 139, 251, 162,
+ 23, 154, 89, 245, 135, 179, 79, 19,
+ 97, 69, 109, 141, 9, 129, 125, 50,
+ 189, 143, 64, 235, 134, 183, 123, 11,
+ 240, 149, 33, 34, 92, 107, 78, 130,
+ 84, 214, 101, 147, 206, 96, 178, 28,
+ 115, 86, 192, 20, 167, 140, 241, 220,
+ 18, 117, 202, 31, 59, 190, 228, 209,
+ 66, 61, 212, 48, 163, 60, 182, 38,
+ 111, 191, 14, 218, 70, 105, 7, 87,
+ 39, 242, 29, 155, 188, 148, 67, 3,
+ 248, 17, 199, 246, 144, 239, 62, 231,
+ 6, 195, 213, 47, 200, 102, 30, 215,
+ 8, 232, 234, 222, 128, 82, 238, 247,
+ 132, 170, 114, 172, 53, 77, 106, 42,
+ 150, 26, 210, 113, 90, 21, 73, 116,
+ 75, 159, 208, 94, 4, 24, 164, 236,
+ 194, 224, 65, 110, 15, 81, 203, 204,
+ 36, 145, 175, 80, 161, 244, 112, 57,
+ 153, 124, 58, 133, 35, 184, 180, 122,
+ 252, 2, 54, 91, 37, 85, 151, 49,
+ 45, 93, 250, 152, 227, 138, 146, 174,
+ 5, 223, 41, 16, 103, 108, 186, 201,
+ 211, 0, 230, 207, 225, 158, 168, 44,
+ 99, 22, 1, 63, 88, 226, 137, 169,
+ 13, 56, 52, 27, 171, 51, 255, 176,
+ 187, 72, 12, 95, 185, 177, 205, 46,
+ 197, 243, 219, 71, 229, 165, 156, 119,
+ 10, 166, 32, 104, 254, 127, 193, 173
+};
+
+#define rotl16(x,n) (((x) << ((u16)(n))) | ((x) >> (16 - (u16)(n))))
+#define rotr16(x,n) (((x) >> ((u16)(n))) | ((x) << (16 - (u16)(n))))
+
+
+
+static void
+do_encrypt (void *context, unsigned char *outbuf, const unsigned char *inbuf)
+{
+ RFC2268_context *ctx = context;
+ register int i, j;
+ u16 word0 = 0, word1 = 0, word2 = 0, word3 = 0;
+
+ word0 = (word0 << 8) | inbuf[1];
+ word0 = (word0 << 8) | inbuf[0];
+ word1 = (word1 << 8) | inbuf[3];
+ word1 = (word1 << 8) | inbuf[2];
+ word2 = (word2 << 8) | inbuf[5];
+ word2 = (word2 << 8) | inbuf[4];
+ word3 = (word3 << 8) | inbuf[7];
+ word3 = (word3 << 8) | inbuf[6];
+
+ for (i = 0; i < 16; i++)
+ {
+ j = i * 4;
+ /* For some reason I cannot combine those steps. */
+ word0 += (word1 & ~word3) + (word2 & word3) + ctx->S[j];
+ word0 = rotl16(word0, 1);
+
+ word1 += (word2 & ~word0) + (word3 & word0) + ctx->S[j + 1];
+ word1 = rotl16(word1, 2);
+
+ word2 += (word3 & ~word1) + (word0 & word1) + ctx->S[j + 2];
+ word2 = rotl16(word2, 3);
+
+ word3 += (word0 & ~word2) + (word1 & word2) + ctx->S[j + 3];
+ word3 = rotl16(word3, 5);
+
+ if (i == 4 || i == 10)
+ {
+ word0 += ctx->S[word3 & 63];
+ word1 += ctx->S[word0 & 63];
+ word2 += ctx->S[word1 & 63];
+ word3 += ctx->S[word2 & 63];
+ }
+
+ }
+
+ outbuf[0] = word0 & 255;
+ outbuf[1] = word0 >> 8;
+ outbuf[2] = word1 & 255;
+ outbuf[3] = word1 >> 8;
+ outbuf[4] = word2 & 255;
+ outbuf[5] = word2 >> 8;
+ outbuf[6] = word3 & 255;
+ outbuf[7] = word3 >> 8;
+}
+
+static void
+do_decrypt (void *context, unsigned char *outbuf, const unsigned char *inbuf)
+{
+ RFC2268_context *ctx = context;
+ register int i, j;
+ u16 word0 = 0, word1 = 0, word2 = 0, word3 = 0;
+
+ word0 = (word0 << 8) | inbuf[1];
+ word0 = (word0 << 8) | inbuf[0];
+ word1 = (word1 << 8) | inbuf[3];
+ word1 = (word1 << 8) | inbuf[2];
+ word2 = (word2 << 8) | inbuf[5];
+ word2 = (word2 << 8) | inbuf[4];
+ word3 = (word3 << 8) | inbuf[7];
+ word3 = (word3 << 8) | inbuf[6];
+
+ for (i = 15; i >= 0; i--)
+ {
+ j = i * 4;
+
+ word3 = rotr16(word3, 5);
+ word3 -= (word0 & ~word2) + (word1 & word2) + ctx->S[j + 3];
+
+ word2 = rotr16(word2, 3);
+ word2 -= (word3 & ~word1) + (word0 & word1) + ctx->S[j + 2];
+
+ word1 = rotr16(word1, 2);
+ word1 -= (word2 & ~word0) + (word3 & word0) + ctx->S[j + 1];
+
+ word0 = rotr16(word0, 1);
+ word0 -= (word1 & ~word3) + (word2 & word3) + ctx->S[j];
+
+ if (i == 5 || i == 11)
+ {
+ word3 = word3 - ctx->S[word2 & 63];
+ word2 = word2 - ctx->S[word1 & 63];
+ word1 = word1 - ctx->S[word0 & 63];
+ word0 = word0 - ctx->S[word3 & 63];
+ }
+
+ }
+
+ outbuf[0] = word0 & 255;
+ outbuf[1] = word0 >> 8;
+ outbuf[2] = word1 & 255;
+ outbuf[3] = word1 >> 8;
+ outbuf[4] = word2 & 255;
+ outbuf[5] = word2 >> 8;
+ outbuf[6] = word3 & 255;
+ outbuf[7] = word3 >> 8;
+}
+
+
+static gpg_err_code_t
+setkey_core (void *context, const unsigned char *key, unsigned int keylen, int with_phase2)
+{
+ static int initialized;
+ static const char *selftest_failed;
+ RFC2268_context *ctx = context;
+ unsigned int i;
+ unsigned char *S, x;
+ int len;
+ int bits = keylen * 8;
+
+ if (!initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if (selftest_failed)
+ log_error ("RFC2268 selftest failed (%s).\n", selftest_failed);
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if (keylen < 40 / 8) /* We want at least 40 bits. */
+ return GPG_ERR_INV_KEYLEN;
+
+ S = (unsigned char *) ctx->S;
+
+ for (i = 0; i < keylen; i++)
+ S[i] = key[i];
+
+ for (i = keylen; i < 128; i++)
+ S[i] = rfc2268_sbox[(S[i - keylen] + S[i - 1]) & 255];
+
+ S[0] = rfc2268_sbox[S[0]];
+
+ /* Phase 2 - reduce effective key size to "bits". This was not
+ * discussed in Gutmann's paper. I've copied that from the public
+ * domain code posted in sci.crypt. */
+ if (with_phase2)
+ {
+ len = (bits + 7) >> 3;
+ i = 128 - len;
+ x = rfc2268_sbox[S[i] & (255 >> (7 & -bits))];
+ S[i] = x;
+
+ while (i--)
+ {
+ x = rfc2268_sbox[x ^ S[i + len]];
+ S[i] = x;
+ }
+ }
+
+ /* Make the expanded key, endian independent. */
+ for (i = 0; i < 64; i++)
+ ctx->S[i] = ( (u16) S[i * 2] | (((u16) S[i * 2 + 1]) << 8));
+
+ return 0;
+}
+
+static gpg_err_code_t
+do_setkey (void *context, const unsigned char *key, unsigned int keylen)
+{
+ return setkey_core (context, key, keylen, 1);
+}
+
+
+
+
+static gcry_cipher_oid_spec_t oids_rfc2268_40[] =
+ {
+ /*{ "1.2.840.113549.3.2", GCRY_CIPHER_MODE_CBC },*/
+ /* pbeWithSHAAnd40BitRC2_CBC */
+ { "1.2.840.113549.1.12.1.6", GCRY_CIPHER_MODE_CBC },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_rfc2268_40 = {
+ "RFC2268_40", NULL, oids_rfc2268_40,
+ RFC2268_BLOCKSIZE, 40, sizeof(RFC2268_context),
+ do_setkey, do_encrypt, do_decrypt
+};
+
+
+
+GRUB_MOD_INIT(gcry_rfc2268)
+{
+ grub_cipher_register (&_gcry_cipher_spec_rfc2268_40);
+}
+
+GRUB_MOD_FINI(gcry_rfc2268)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_rfc2268_40);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/rijndael-tables.h b/grub-core/lib/libgcrypt-grub/cipher/rijndael-tables.h
new file mode 100644
index 0000000..b027ec6
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/rijndael-tables.h
@@ -0,0 +1,1690 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+/* rijndael-tables.h - Rijndael (AES) for GnuPG,
+ * Copyright (C) 2000, 2001, 2002, 2003, 2007,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* To keep the actual implementation at a readable size we use this
+ include file to define the tables. */
+
+static const unsigned char S[256] =
+ {
+ 99, 124, 119, 123, 242, 107, 111, 197,
+ 48, 1, 103, 43, 254, 215, 171, 118,
+ 202, 130, 201, 125, 250, 89, 71, 240,
+ 173, 212, 162, 175, 156, 164, 114, 192,
+ 183, 253, 147, 38, 54, 63, 247, 204,
+ 52, 165, 229, 241, 113, 216, 49, 21,
+ 4, 199, 35, 195, 24, 150, 5, 154,
+ 7, 18, 128, 226, 235, 39, 178, 117,
+ 9, 131, 44, 26, 27, 110, 90, 160,
+ 82, 59, 214, 179, 41, 227, 47, 132,
+ 83, 209, 0, 237, 32, 252, 177, 91,
+ 106, 203, 190, 57, 74, 76, 88, 207,
+ 208, 239, 170, 251, 67, 77, 51, 133,
+ 69, 249, 2, 127, 80, 60, 159, 168,
+ 81, 163, 64, 143, 146, 157, 56, 245,
+ 188, 182, 218, 33, 16, 255, 243, 210,
+ 205, 12, 19, 236, 95, 151, 68, 23,
+ 196, 167, 126, 61, 100, 93, 25, 115,
+ 96, 129, 79, 220, 34, 42, 144, 136,
+ 70, 238, 184, 20, 222, 94, 11, 219,
+ 224, 50, 58, 10, 73, 6, 36, 92,
+ 194, 211, 172, 98, 145, 149, 228, 121,
+ 231, 200, 55, 109, 141, 213, 78, 169,
+ 108, 86, 244, 234, 101, 122, 174, 8,
+ 186, 120, 37, 46, 28, 166, 180, 198,
+ 232, 221, 116, 31, 75, 189, 139, 138,
+ 112, 62, 181, 102, 72, 3, 246, 14,
+ 97, 53, 87, 185, 134, 193, 29, 158,
+ 225, 248, 152, 17, 105, 217, 142, 148,
+ 155, 30, 135, 233, 206, 85, 40, 223,
+ 140, 161, 137, 13, 191, 230, 66, 104,
+ 65, 153, 45, 15, 176, 84, 187, 22
+ };
+
+
+static const unsigned char T1[256][4] =
+ {
+ { 0xc6,0x63,0x63,0xa5 }, { 0xf8,0x7c,0x7c,0x84 },
+ { 0xee,0x77,0x77,0x99 }, { 0xf6,0x7b,0x7b,0x8d },
+ { 0xff,0xf2,0xf2,0x0d }, { 0xd6,0x6b,0x6b,0xbd },
+ { 0xde,0x6f,0x6f,0xb1 }, { 0x91,0xc5,0xc5,0x54 },
+ { 0x60,0x30,0x30,0x50 }, { 0x02,0x01,0x01,0x03 },
+ { 0xce,0x67,0x67,0xa9 }, { 0x56,0x2b,0x2b,0x7d },
+ { 0xe7,0xfe,0xfe,0x19 }, { 0xb5,0xd7,0xd7,0x62 },
+ { 0x4d,0xab,0xab,0xe6 }, { 0xec,0x76,0x76,0x9a },
+ { 0x8f,0xca,0xca,0x45 }, { 0x1f,0x82,0x82,0x9d },
+ { 0x89,0xc9,0xc9,0x40 }, { 0xfa,0x7d,0x7d,0x87 },
+ { 0xef,0xfa,0xfa,0x15 }, { 0xb2,0x59,0x59,0xeb },
+ { 0x8e,0x47,0x47,0xc9 }, { 0xfb,0xf0,0xf0,0x0b },
+ { 0x41,0xad,0xad,0xec }, { 0xb3,0xd4,0xd4,0x67 },
+ { 0x5f,0xa2,0xa2,0xfd }, { 0x45,0xaf,0xaf,0xea },
+ { 0x23,0x9c,0x9c,0xbf }, { 0x53,0xa4,0xa4,0xf7 },
+ { 0xe4,0x72,0x72,0x96 }, { 0x9b,0xc0,0xc0,0x5b },
+ { 0x75,0xb7,0xb7,0xc2 }, { 0xe1,0xfd,0xfd,0x1c },
+ { 0x3d,0x93,0x93,0xae }, { 0x4c,0x26,0x26,0x6a },
+ { 0x6c,0x36,0x36,0x5a }, { 0x7e,0x3f,0x3f,0x41 },
+ { 0xf5,0xf7,0xf7,0x02 }, { 0x83,0xcc,0xcc,0x4f },
+ { 0x68,0x34,0x34,0x5c }, { 0x51,0xa5,0xa5,0xf4 },
+ { 0xd1,0xe5,0xe5,0x34 }, { 0xf9,0xf1,0xf1,0x08 },
+ { 0xe2,0x71,0x71,0x93 }, { 0xab,0xd8,0xd8,0x73 },
+ { 0x62,0x31,0x31,0x53 }, { 0x2a,0x15,0x15,0x3f },
+ { 0x08,0x04,0x04,0x0c }, { 0x95,0xc7,0xc7,0x52 },
+ { 0x46,0x23,0x23,0x65 }, { 0x9d,0xc3,0xc3,0x5e },
+ { 0x30,0x18,0x18,0x28 }, { 0x37,0x96,0x96,0xa1 },
+ { 0x0a,0x05,0x05,0x0f }, { 0x2f,0x9a,0x9a,0xb5 },
+ { 0x0e,0x07,0x07,0x09 }, { 0x24,0x12,0x12,0x36 },
+ { 0x1b,0x80,0x80,0x9b }, { 0xdf,0xe2,0xe2,0x3d },
+ { 0xcd,0xeb,0xeb,0x26 }, { 0x4e,0x27,0x27,0x69 },
+ { 0x7f,0xb2,0xb2,0xcd }, { 0xea,0x75,0x75,0x9f },
+ { 0x12,0x09,0x09,0x1b }, { 0x1d,0x83,0x83,0x9e },
+ { 0x58,0x2c,0x2c,0x74 }, { 0x34,0x1a,0x1a,0x2e },
+ { 0x36,0x1b,0x1b,0x2d }, { 0xdc,0x6e,0x6e,0xb2 },
+ { 0xb4,0x5a,0x5a,0xee }, { 0x5b,0xa0,0xa0,0xfb },
+ { 0xa4,0x52,0x52,0xf6 }, { 0x76,0x3b,0x3b,0x4d },
+ { 0xb7,0xd6,0xd6,0x61 }, { 0x7d,0xb3,0xb3,0xce },
+ { 0x52,0x29,0x29,0x7b }, { 0xdd,0xe3,0xe3,0x3e },
+ { 0x5e,0x2f,0x2f,0x71 }, { 0x13,0x84,0x84,0x97 },
+ { 0xa6,0x53,0x53,0xf5 }, { 0xb9,0xd1,0xd1,0x68 },
+ { 0x00,0x00,0x00,0x00 }, { 0xc1,0xed,0xed,0x2c },
+ { 0x40,0x20,0x20,0x60 }, { 0xe3,0xfc,0xfc,0x1f },
+ { 0x79,0xb1,0xb1,0xc8 }, { 0xb6,0x5b,0x5b,0xed },
+ { 0xd4,0x6a,0x6a,0xbe }, { 0x8d,0xcb,0xcb,0x46 },
+ { 0x67,0xbe,0xbe,0xd9 }, { 0x72,0x39,0x39,0x4b },
+ { 0x94,0x4a,0x4a,0xde }, { 0x98,0x4c,0x4c,0xd4 },
+ { 0xb0,0x58,0x58,0xe8 }, { 0x85,0xcf,0xcf,0x4a },
+ { 0xbb,0xd0,0xd0,0x6b }, { 0xc5,0xef,0xef,0x2a },
+ { 0x4f,0xaa,0xaa,0xe5 }, { 0xed,0xfb,0xfb,0x16 },
+ { 0x86,0x43,0x43,0xc5 }, { 0x9a,0x4d,0x4d,0xd7 },
+ { 0x66,0x33,0x33,0x55 }, { 0x11,0x85,0x85,0x94 },
+ { 0x8a,0x45,0x45,0xcf }, { 0xe9,0xf9,0xf9,0x10 },
+ { 0x04,0x02,0x02,0x06 }, { 0xfe,0x7f,0x7f,0x81 },
+ { 0xa0,0x50,0x50,0xf0 }, { 0x78,0x3c,0x3c,0x44 },
+ { 0x25,0x9f,0x9f,0xba }, { 0x4b,0xa8,0xa8,0xe3 },
+ { 0xa2,0x51,0x51,0xf3 }, { 0x5d,0xa3,0xa3,0xfe },
+ { 0x80,0x40,0x40,0xc0 }, { 0x05,0x8f,0x8f,0x8a },
+ { 0x3f,0x92,0x92,0xad }, { 0x21,0x9d,0x9d,0xbc },
+ { 0x70,0x38,0x38,0x48 }, { 0xf1,0xf5,0xf5,0x04 },
+ { 0x63,0xbc,0xbc,0xdf }, { 0x77,0xb6,0xb6,0xc1 },
+ { 0xaf,0xda,0xda,0x75 }, { 0x42,0x21,0x21,0x63 },
+ { 0x20,0x10,0x10,0x30 }, { 0xe5,0xff,0xff,0x1a },
+ { 0xfd,0xf3,0xf3,0x0e }, { 0xbf,0xd2,0xd2,0x6d },
+ { 0x81,0xcd,0xcd,0x4c }, { 0x18,0x0c,0x0c,0x14 },
+ { 0x26,0x13,0x13,0x35 }, { 0xc3,0xec,0xec,0x2f },
+ { 0xbe,0x5f,0x5f,0xe1 }, { 0x35,0x97,0x97,0xa2 },
+ { 0x88,0x44,0x44,0xcc }, { 0x2e,0x17,0x17,0x39 },
+ { 0x93,0xc4,0xc4,0x57 }, { 0x55,0xa7,0xa7,0xf2 },
+ { 0xfc,0x7e,0x7e,0x82 }, { 0x7a,0x3d,0x3d,0x47 },
+ { 0xc8,0x64,0x64,0xac }, { 0xba,0x5d,0x5d,0xe7 },
+ { 0x32,0x19,0x19,0x2b }, { 0xe6,0x73,0x73,0x95 },
+ { 0xc0,0x60,0x60,0xa0 }, { 0x19,0x81,0x81,0x98 },
+ { 0x9e,0x4f,0x4f,0xd1 }, { 0xa3,0xdc,0xdc,0x7f },
+ { 0x44,0x22,0x22,0x66 }, { 0x54,0x2a,0x2a,0x7e },
+ { 0x3b,0x90,0x90,0xab }, { 0x0b,0x88,0x88,0x83 },
+ { 0x8c,0x46,0x46,0xca }, { 0xc7,0xee,0xee,0x29 },
+ { 0x6b,0xb8,0xb8,0xd3 }, { 0x28,0x14,0x14,0x3c },
+ { 0xa7,0xde,0xde,0x79 }, { 0xbc,0x5e,0x5e,0xe2 },
+ { 0x16,0x0b,0x0b,0x1d }, { 0xad,0xdb,0xdb,0x76 },
+ { 0xdb,0xe0,0xe0,0x3b }, { 0x64,0x32,0x32,0x56 },
+ { 0x74,0x3a,0x3a,0x4e }, { 0x14,0x0a,0x0a,0x1e },
+ { 0x92,0x49,0x49,0xdb }, { 0x0c,0x06,0x06,0x0a },
+ { 0x48,0x24,0x24,0x6c }, { 0xb8,0x5c,0x5c,0xe4 },
+ { 0x9f,0xc2,0xc2,0x5d }, { 0xbd,0xd3,0xd3,0x6e },
+ { 0x43,0xac,0xac,0xef }, { 0xc4,0x62,0x62,0xa6 },
+ { 0x39,0x91,0x91,0xa8 }, { 0x31,0x95,0x95,0xa4 },
+ { 0xd3,0xe4,0xe4,0x37 }, { 0xf2,0x79,0x79,0x8b },
+ { 0xd5,0xe7,0xe7,0x32 }, { 0x8b,0xc8,0xc8,0x43 },
+ { 0x6e,0x37,0x37,0x59 }, { 0xda,0x6d,0x6d,0xb7 },
+ { 0x01,0x8d,0x8d,0x8c }, { 0xb1,0xd5,0xd5,0x64 },
+ { 0x9c,0x4e,0x4e,0xd2 }, { 0x49,0xa9,0xa9,0xe0 },
+ { 0xd8,0x6c,0x6c,0xb4 }, { 0xac,0x56,0x56,0xfa },
+ { 0xf3,0xf4,0xf4,0x07 }, { 0xcf,0xea,0xea,0x25 },
+ { 0xca,0x65,0x65,0xaf }, { 0xf4,0x7a,0x7a,0x8e },
+ { 0x47,0xae,0xae,0xe9 }, { 0x10,0x08,0x08,0x18 },
+ { 0x6f,0xba,0xba,0xd5 }, { 0xf0,0x78,0x78,0x88 },
+ { 0x4a,0x25,0x25,0x6f }, { 0x5c,0x2e,0x2e,0x72 },
+ { 0x38,0x1c,0x1c,0x24 }, { 0x57,0xa6,0xa6,0xf1 },
+ { 0x73,0xb4,0xb4,0xc7 }, { 0x97,0xc6,0xc6,0x51 },
+ { 0xcb,0xe8,0xe8,0x23 }, { 0xa1,0xdd,0xdd,0x7c },
+ { 0xe8,0x74,0x74,0x9c }, { 0x3e,0x1f,0x1f,0x21 },
+ { 0x96,0x4b,0x4b,0xdd }, { 0x61,0xbd,0xbd,0xdc },
+ { 0x0d,0x8b,0x8b,0x86 }, { 0x0f,0x8a,0x8a,0x85 },
+ { 0xe0,0x70,0x70,0x90 }, { 0x7c,0x3e,0x3e,0x42 },
+ { 0x71,0xb5,0xb5,0xc4 }, { 0xcc,0x66,0x66,0xaa },
+ { 0x90,0x48,0x48,0xd8 }, { 0x06,0x03,0x03,0x05 },
+ { 0xf7,0xf6,0xf6,0x01 }, { 0x1c,0x0e,0x0e,0x12 },
+ { 0xc2,0x61,0x61,0xa3 }, { 0x6a,0x35,0x35,0x5f },
+ { 0xae,0x57,0x57,0xf9 }, { 0x69,0xb9,0xb9,0xd0 },
+ { 0x17,0x86,0x86,0x91 }, { 0x99,0xc1,0xc1,0x58 },
+ { 0x3a,0x1d,0x1d,0x27 }, { 0x27,0x9e,0x9e,0xb9 },
+ { 0xd9,0xe1,0xe1,0x38 }, { 0xeb,0xf8,0xf8,0x13 },
+ { 0x2b,0x98,0x98,0xb3 }, { 0x22,0x11,0x11,0x33 },
+ { 0xd2,0x69,0x69,0xbb }, { 0xa9,0xd9,0xd9,0x70 },
+ { 0x07,0x8e,0x8e,0x89 }, { 0x33,0x94,0x94,0xa7 },
+ { 0x2d,0x9b,0x9b,0xb6 }, { 0x3c,0x1e,0x1e,0x22 },
+ { 0x15,0x87,0x87,0x92 }, { 0xc9,0xe9,0xe9,0x20 },
+ { 0x87,0xce,0xce,0x49 }, { 0xaa,0x55,0x55,0xff },
+ { 0x50,0x28,0x28,0x78 }, { 0xa5,0xdf,0xdf,0x7a },
+ { 0x03,0x8c,0x8c,0x8f }, { 0x59,0xa1,0xa1,0xf8 },
+ { 0x09,0x89,0x89,0x80 }, { 0x1a,0x0d,0x0d,0x17 },
+ { 0x65,0xbf,0xbf,0xda }, { 0xd7,0xe6,0xe6,0x31 },
+ { 0x84,0x42,0x42,0xc6 }, { 0xd0,0x68,0x68,0xb8 },
+ { 0x82,0x41,0x41,0xc3 }, { 0x29,0x99,0x99,0xb0 },
+ { 0x5a,0x2d,0x2d,0x77 }, { 0x1e,0x0f,0x0f,0x11 },
+ { 0x7b,0xb0,0xb0,0xcb }, { 0xa8,0x54,0x54,0xfc },
+ { 0x6d,0xbb,0xbb,0xd6 }, { 0x2c,0x16,0x16,0x3a }
+ };
+
+static const unsigned char T2[256][4] =
+ {
+ { 0xa5,0xc6,0x63,0x63 }, { 0x84,0xf8,0x7c,0x7c },
+ { 0x99,0xee,0x77,0x77 }, { 0x8d,0xf6,0x7b,0x7b },
+ { 0x0d,0xff,0xf2,0xf2 }, { 0xbd,0xd6,0x6b,0x6b },
+ { 0xb1,0xde,0x6f,0x6f }, { 0x54,0x91,0xc5,0xc5 },
+ { 0x50,0x60,0x30,0x30 }, { 0x03,0x02,0x01,0x01 },
+ { 0xa9,0xce,0x67,0x67 }, { 0x7d,0x56,0x2b,0x2b },
+ { 0x19,0xe7,0xfe,0xfe }, { 0x62,0xb5,0xd7,0xd7 },
+ { 0xe6,0x4d,0xab,0xab }, { 0x9a,0xec,0x76,0x76 },
+ { 0x45,0x8f,0xca,0xca }, { 0x9d,0x1f,0x82,0x82 },
+ { 0x40,0x89,0xc9,0xc9 }, { 0x87,0xfa,0x7d,0x7d },
+ { 0x15,0xef,0xfa,0xfa }, { 0xeb,0xb2,0x59,0x59 },
+ { 0xc9,0x8e,0x47,0x47 }, { 0x0b,0xfb,0xf0,0xf0 },
+ { 0xec,0x41,0xad,0xad }, { 0x67,0xb3,0xd4,0xd4 },
+ { 0xfd,0x5f,0xa2,0xa2 }, { 0xea,0x45,0xaf,0xaf },
+ { 0xbf,0x23,0x9c,0x9c }, { 0xf7,0x53,0xa4,0xa4 },
+ { 0x96,0xe4,0x72,0x72 }, { 0x5b,0x9b,0xc0,0xc0 },
+ { 0xc2,0x75,0xb7,0xb7 }, { 0x1c,0xe1,0xfd,0xfd },
+ { 0xae,0x3d,0x93,0x93 }, { 0x6a,0x4c,0x26,0x26 },
+ { 0x5a,0x6c,0x36,0x36 }, { 0x41,0x7e,0x3f,0x3f },
+ { 0x02,0xf5,0xf7,0xf7 }, { 0x4f,0x83,0xcc,0xcc },
+ { 0x5c,0x68,0x34,0x34 }, { 0xf4,0x51,0xa5,0xa5 },
+ { 0x34,0xd1,0xe5,0xe5 }, { 0x08,0xf9,0xf1,0xf1 },
+ { 0x93,0xe2,0x71,0x71 }, { 0x73,0xab,0xd8,0xd8 },
+ { 0x53,0x62,0x31,0x31 }, { 0x3f,0x2a,0x15,0x15 },
+ { 0x0c,0x08,0x04,0x04 }, { 0x52,0x95,0xc7,0xc7 },
+ { 0x65,0x46,0x23,0x23 }, { 0x5e,0x9d,0xc3,0xc3 },
+ { 0x28,0x30,0x18,0x18 }, { 0xa1,0x37,0x96,0x96 },
+ { 0x0f,0x0a,0x05,0x05 }, { 0xb5,0x2f,0x9a,0x9a },
+ { 0x09,0x0e,0x07,0x07 }, { 0x36,0x24,0x12,0x12 },
+ { 0x9b,0x1b,0x80,0x80 }, { 0x3d,0xdf,0xe2,0xe2 },
+ { 0x26,0xcd,0xeb,0xeb }, { 0x69,0x4e,0x27,0x27 },
+ { 0xcd,0x7f,0xb2,0xb2 }, { 0x9f,0xea,0x75,0x75 },
+ { 0x1b,0x12,0x09,0x09 }, { 0x9e,0x1d,0x83,0x83 },
+ { 0x74,0x58,0x2c,0x2c }, { 0x2e,0x34,0x1a,0x1a },
+ { 0x2d,0x36,0x1b,0x1b }, { 0xb2,0xdc,0x6e,0x6e },
+ { 0xee,0xb4,0x5a,0x5a }, { 0xfb,0x5b,0xa0,0xa0 },
+ { 0xf6,0xa4,0x52,0x52 }, { 0x4d,0x76,0x3b,0x3b },
+ { 0x61,0xb7,0xd6,0xd6 }, { 0xce,0x7d,0xb3,0xb3 },
+ { 0x7b,0x52,0x29,0x29 }, { 0x3e,0xdd,0xe3,0xe3 },
+ { 0x71,0x5e,0x2f,0x2f }, { 0x97,0x13,0x84,0x84 },
+ { 0xf5,0xa6,0x53,0x53 }, { 0x68,0xb9,0xd1,0xd1 },
+ { 0x00,0x00,0x00,0x00 }, { 0x2c,0xc1,0xed,0xed },
+ { 0x60,0x40,0x20,0x20 }, { 0x1f,0xe3,0xfc,0xfc },
+ { 0xc8,0x79,0xb1,0xb1 }, { 0xed,0xb6,0x5b,0x5b },
+ { 0xbe,0xd4,0x6a,0x6a }, { 0x46,0x8d,0xcb,0xcb },
+ { 0xd9,0x67,0xbe,0xbe }, { 0x4b,0x72,0x39,0x39 },
+ { 0xde,0x94,0x4a,0x4a }, { 0xd4,0x98,0x4c,0x4c },
+ { 0xe8,0xb0,0x58,0x58 }, { 0x4a,0x85,0xcf,0xcf },
+ { 0x6b,0xbb,0xd0,0xd0 }, { 0x2a,0xc5,0xef,0xef },
+ { 0xe5,0x4f,0xaa,0xaa }, { 0x16,0xed,0xfb,0xfb },
+ { 0xc5,0x86,0x43,0x43 }, { 0xd7,0x9a,0x4d,0x4d },
+ { 0x55,0x66,0x33,0x33 }, { 0x94,0x11,0x85,0x85 },
+ { 0xcf,0x8a,0x45,0x45 }, { 0x10,0xe9,0xf9,0xf9 },
+ { 0x06,0x04,0x02,0x02 }, { 0x81,0xfe,0x7f,0x7f },
+ { 0xf0,0xa0,0x50,0x50 }, { 0x44,0x78,0x3c,0x3c },
+ { 0xba,0x25,0x9f,0x9f }, { 0xe3,0x4b,0xa8,0xa8 },
+ { 0xf3,0xa2,0x51,0x51 }, { 0xfe,0x5d,0xa3,0xa3 },
+ { 0xc0,0x80,0x40,0x40 }, { 0x8a,0x05,0x8f,0x8f },
+ { 0xad,0x3f,0x92,0x92 }, { 0xbc,0x21,0x9d,0x9d },
+ { 0x48,0x70,0x38,0x38 }, { 0x04,0xf1,0xf5,0xf5 },
+ { 0xdf,0x63,0xbc,0xbc }, { 0xc1,0x77,0xb6,0xb6 },
+ { 0x75,0xaf,0xda,0xda }, { 0x63,0x42,0x21,0x21 },
+ { 0x30,0x20,0x10,0x10 }, { 0x1a,0xe5,0xff,0xff },
+ { 0x0e,0xfd,0xf3,0xf3 }, { 0x6d,0xbf,0xd2,0xd2 },
+ { 0x4c,0x81,0xcd,0xcd }, { 0x14,0x18,0x0c,0x0c },
+ { 0x35,0x26,0x13,0x13 }, { 0x2f,0xc3,0xec,0xec },
+ { 0xe1,0xbe,0x5f,0x5f }, { 0xa2,0x35,0x97,0x97 },
+ { 0xcc,0x88,0x44,0x44 }, { 0x39,0x2e,0x17,0x17 },
+ { 0x57,0x93,0xc4,0xc4 }, { 0xf2,0x55,0xa7,0xa7 },
+ { 0x82,0xfc,0x7e,0x7e }, { 0x47,0x7a,0x3d,0x3d },
+ { 0xac,0xc8,0x64,0x64 }, { 0xe7,0xba,0x5d,0x5d },
+ { 0x2b,0x32,0x19,0x19 }, { 0x95,0xe6,0x73,0x73 },
+ { 0xa0,0xc0,0x60,0x60 }, { 0x98,0x19,0x81,0x81 },
+ { 0xd1,0x9e,0x4f,0x4f }, { 0x7f,0xa3,0xdc,0xdc },
+ { 0x66,0x44,0x22,0x22 }, { 0x7e,0x54,0x2a,0x2a },
+ { 0xab,0x3b,0x90,0x90 }, { 0x83,0x0b,0x88,0x88 },
+ { 0xca,0x8c,0x46,0x46 }, { 0x29,0xc7,0xee,0xee },
+ { 0xd3,0x6b,0xb8,0xb8 }, { 0x3c,0x28,0x14,0x14 },
+ { 0x79,0xa7,0xde,0xde }, { 0xe2,0xbc,0x5e,0x5e },
+ { 0x1d,0x16,0x0b,0x0b }, { 0x76,0xad,0xdb,0xdb },
+ { 0x3b,0xdb,0xe0,0xe0 }, { 0x56,0x64,0x32,0x32 },
+ { 0x4e,0x74,0x3a,0x3a }, { 0x1e,0x14,0x0a,0x0a },
+ { 0xdb,0x92,0x49,0x49 }, { 0x0a,0x0c,0x06,0x06 },
+ { 0x6c,0x48,0x24,0x24 }, { 0xe4,0xb8,0x5c,0x5c },
+ { 0x5d,0x9f,0xc2,0xc2 }, { 0x6e,0xbd,0xd3,0xd3 },
+ { 0xef,0x43,0xac,0xac }, { 0xa6,0xc4,0x62,0x62 },
+ { 0xa8,0x39,0x91,0x91 }, { 0xa4,0x31,0x95,0x95 },
+ { 0x37,0xd3,0xe4,0xe4 }, { 0x8b,0xf2,0x79,0x79 },
+ { 0x32,0xd5,0xe7,0xe7 }, { 0x43,0x8b,0xc8,0xc8 },
+ { 0x59,0x6e,0x37,0x37 }, { 0xb7,0xda,0x6d,0x6d },
+ { 0x8c,0x01,0x8d,0x8d }, { 0x64,0xb1,0xd5,0xd5 },
+ { 0xd2,0x9c,0x4e,0x4e }, { 0xe0,0x49,0xa9,0xa9 },
+ { 0xb4,0xd8,0x6c,0x6c }, { 0xfa,0xac,0x56,0x56 },
+ { 0x07,0xf3,0xf4,0xf4 }, { 0x25,0xcf,0xea,0xea },
+ { 0xaf,0xca,0x65,0x65 }, { 0x8e,0xf4,0x7a,0x7a },
+ { 0xe9,0x47,0xae,0xae }, { 0x18,0x10,0x08,0x08 },
+ { 0xd5,0x6f,0xba,0xba }, { 0x88,0xf0,0x78,0x78 },
+ { 0x6f,0x4a,0x25,0x25 }, { 0x72,0x5c,0x2e,0x2e },
+ { 0x24,0x38,0x1c,0x1c }, { 0xf1,0x57,0xa6,0xa6 },
+ { 0xc7,0x73,0xb4,0xb4 }, { 0x51,0x97,0xc6,0xc6 },
+ { 0x23,0xcb,0xe8,0xe8 }, { 0x7c,0xa1,0xdd,0xdd },
+ { 0x9c,0xe8,0x74,0x74 }, { 0x21,0x3e,0x1f,0x1f },
+ { 0xdd,0x96,0x4b,0x4b }, { 0xdc,0x61,0xbd,0xbd },
+ { 0x86,0x0d,0x8b,0x8b }, { 0x85,0x0f,0x8a,0x8a },
+ { 0x90,0xe0,0x70,0x70 }, { 0x42,0x7c,0x3e,0x3e },
+ { 0xc4,0x71,0xb5,0xb5 }, { 0xaa,0xcc,0x66,0x66 },
+ { 0xd8,0x90,0x48,0x48 }, { 0x05,0x06,0x03,0x03 },
+ { 0x01,0xf7,0xf6,0xf6 }, { 0x12,0x1c,0x0e,0x0e },
+ { 0xa3,0xc2,0x61,0x61 }, { 0x5f,0x6a,0x35,0x35 },
+ { 0xf9,0xae,0x57,0x57 }, { 0xd0,0x69,0xb9,0xb9 },
+ { 0x91,0x17,0x86,0x86 }, { 0x58,0x99,0xc1,0xc1 },
+ { 0x27,0x3a,0x1d,0x1d }, { 0xb9,0x27,0x9e,0x9e },
+ { 0x38,0xd9,0xe1,0xe1 }, { 0x13,0xeb,0xf8,0xf8 },
+ { 0xb3,0x2b,0x98,0x98 }, { 0x33,0x22,0x11,0x11 },
+ { 0xbb,0xd2,0x69,0x69 }, { 0x70,0xa9,0xd9,0xd9 },
+ { 0x89,0x07,0x8e,0x8e }, { 0xa7,0x33,0x94,0x94 },
+ { 0xb6,0x2d,0x9b,0x9b }, { 0x22,0x3c,0x1e,0x1e },
+ { 0x92,0x15,0x87,0x87 }, { 0x20,0xc9,0xe9,0xe9 },
+ { 0x49,0x87,0xce,0xce }, { 0xff,0xaa,0x55,0x55 },
+ { 0x78,0x50,0x28,0x28 }, { 0x7a,0xa5,0xdf,0xdf },
+ { 0x8f,0x03,0x8c,0x8c }, { 0xf8,0x59,0xa1,0xa1 },
+ { 0x80,0x09,0x89,0x89 }, { 0x17,0x1a,0x0d,0x0d },
+ { 0xda,0x65,0xbf,0xbf }, { 0x31,0xd7,0xe6,0xe6 },
+ { 0xc6,0x84,0x42,0x42 }, { 0xb8,0xd0,0x68,0x68 },
+ { 0xc3,0x82,0x41,0x41 }, { 0xb0,0x29,0x99,0x99 },
+ { 0x77,0x5a,0x2d,0x2d }, { 0x11,0x1e,0x0f,0x0f },
+ { 0xcb,0x7b,0xb0,0xb0 }, { 0xfc,0xa8,0x54,0x54 },
+ { 0xd6,0x6d,0xbb,0xbb }, { 0x3a,0x2c,0x16,0x16 }
+ };
+
+static const unsigned char T3[256][4] =
+ {
+ { 0x63,0xa5,0xc6,0x63 }, { 0x7c,0x84,0xf8,0x7c },
+ { 0x77,0x99,0xee,0x77 }, { 0x7b,0x8d,0xf6,0x7b },
+ { 0xf2,0x0d,0xff,0xf2 }, { 0x6b,0xbd,0xd6,0x6b },
+ { 0x6f,0xb1,0xde,0x6f }, { 0xc5,0x54,0x91,0xc5 },
+ { 0x30,0x50,0x60,0x30 }, { 0x01,0x03,0x02,0x01 },
+ { 0x67,0xa9,0xce,0x67 }, { 0x2b,0x7d,0x56,0x2b },
+ { 0xfe,0x19,0xe7,0xfe }, { 0xd7,0x62,0xb5,0xd7 },
+ { 0xab,0xe6,0x4d,0xab }, { 0x76,0x9a,0xec,0x76 },
+ { 0xca,0x45,0x8f,0xca }, { 0x82,0x9d,0x1f,0x82 },
+ { 0xc9,0x40,0x89,0xc9 }, { 0x7d,0x87,0xfa,0x7d },
+ { 0xfa,0x15,0xef,0xfa }, { 0x59,0xeb,0xb2,0x59 },
+ { 0x47,0xc9,0x8e,0x47 }, { 0xf0,0x0b,0xfb,0xf0 },
+ { 0xad,0xec,0x41,0xad }, { 0xd4,0x67,0xb3,0xd4 },
+ { 0xa2,0xfd,0x5f,0xa2 }, { 0xaf,0xea,0x45,0xaf },
+ { 0x9c,0xbf,0x23,0x9c }, { 0xa4,0xf7,0x53,0xa4 },
+ { 0x72,0x96,0xe4,0x72 }, { 0xc0,0x5b,0x9b,0xc0 },
+ { 0xb7,0xc2,0x75,0xb7 }, { 0xfd,0x1c,0xe1,0xfd },
+ { 0x93,0xae,0x3d,0x93 }, { 0x26,0x6a,0x4c,0x26 },
+ { 0x36,0x5a,0x6c,0x36 }, { 0x3f,0x41,0x7e,0x3f },
+ { 0xf7,0x02,0xf5,0xf7 }, { 0xcc,0x4f,0x83,0xcc },
+ { 0x34,0x5c,0x68,0x34 }, { 0xa5,0xf4,0x51,0xa5 },
+ { 0xe5,0x34,0xd1,0xe5 }, { 0xf1,0x08,0xf9,0xf1 },
+ { 0x71,0x93,0xe2,0x71 }, { 0xd8,0x73,0xab,0xd8 },
+ { 0x31,0x53,0x62,0x31 }, { 0x15,0x3f,0x2a,0x15 },
+ { 0x04,0x0c,0x08,0x04 }, { 0xc7,0x52,0x95,0xc7 },
+ { 0x23,0x65,0x46,0x23 }, { 0xc3,0x5e,0x9d,0xc3 },
+ { 0x18,0x28,0x30,0x18 }, { 0x96,0xa1,0x37,0x96 },
+ { 0x05,0x0f,0x0a,0x05 }, { 0x9a,0xb5,0x2f,0x9a },
+ { 0x07,0x09,0x0e,0x07 }, { 0x12,0x36,0x24,0x12 },
+ { 0x80,0x9b,0x1b,0x80 }, { 0xe2,0x3d,0xdf,0xe2 },
+ { 0xeb,0x26,0xcd,0xeb }, { 0x27,0x69,0x4e,0x27 },
+ { 0xb2,0xcd,0x7f,0xb2 }, { 0x75,0x9f,0xea,0x75 },
+ { 0x09,0x1b,0x12,0x09 }, { 0x83,0x9e,0x1d,0x83 },
+ { 0x2c,0x74,0x58,0x2c }, { 0x1a,0x2e,0x34,0x1a },
+ { 0x1b,0x2d,0x36,0x1b }, { 0x6e,0xb2,0xdc,0x6e },
+ { 0x5a,0xee,0xb4,0x5a }, { 0xa0,0xfb,0x5b,0xa0 },
+ { 0x52,0xf6,0xa4,0x52 }, { 0x3b,0x4d,0x76,0x3b },
+ { 0xd6,0x61,0xb7,0xd6 }, { 0xb3,0xce,0x7d,0xb3 },
+ { 0x29,0x7b,0x52,0x29 }, { 0xe3,0x3e,0xdd,0xe3 },
+ { 0x2f,0x71,0x5e,0x2f }, { 0x84,0x97,0x13,0x84 },
+ { 0x53,0xf5,0xa6,0x53 }, { 0xd1,0x68,0xb9,0xd1 },
+ { 0x00,0x00,0x00,0x00 }, { 0xed,0x2c,0xc1,0xed },
+ { 0x20,0x60,0x40,0x20 }, { 0xfc,0x1f,0xe3,0xfc },
+ { 0xb1,0xc8,0x79,0xb1 }, { 0x5b,0xed,0xb6,0x5b },
+ { 0x6a,0xbe,0xd4,0x6a }, { 0xcb,0x46,0x8d,0xcb },
+ { 0xbe,0xd9,0x67,0xbe }, { 0x39,0x4b,0x72,0x39 },
+ { 0x4a,0xde,0x94,0x4a }, { 0x4c,0xd4,0x98,0x4c },
+ { 0x58,0xe8,0xb0,0x58 }, { 0xcf,0x4a,0x85,0xcf },
+ { 0xd0,0x6b,0xbb,0xd0 }, { 0xef,0x2a,0xc5,0xef },
+ { 0xaa,0xe5,0x4f,0xaa }, { 0xfb,0x16,0xed,0xfb },
+ { 0x43,0xc5,0x86,0x43 }, { 0x4d,0xd7,0x9a,0x4d },
+ { 0x33,0x55,0x66,0x33 }, { 0x85,0x94,0x11,0x85 },
+ { 0x45,0xcf,0x8a,0x45 }, { 0xf9,0x10,0xe9,0xf9 },
+ { 0x02,0x06,0x04,0x02 }, { 0x7f,0x81,0xfe,0x7f },
+ { 0x50,0xf0,0xa0,0x50 }, { 0x3c,0x44,0x78,0x3c },
+ { 0x9f,0xba,0x25,0x9f }, { 0xa8,0xe3,0x4b,0xa8 },
+ { 0x51,0xf3,0xa2,0x51 }, { 0xa3,0xfe,0x5d,0xa3 },
+ { 0x40,0xc0,0x80,0x40 }, { 0x8f,0x8a,0x05,0x8f },
+ { 0x92,0xad,0x3f,0x92 }, { 0x9d,0xbc,0x21,0x9d },
+ { 0x38,0x48,0x70,0x38 }, { 0xf5,0x04,0xf1,0xf5 },
+ { 0xbc,0xdf,0x63,0xbc }, { 0xb6,0xc1,0x77,0xb6 },
+ { 0xda,0x75,0xaf,0xda }, { 0x21,0x63,0x42,0x21 },
+ { 0x10,0x30,0x20,0x10 }, { 0xff,0x1a,0xe5,0xff },
+ { 0xf3,0x0e,0xfd,0xf3 }, { 0xd2,0x6d,0xbf,0xd2 },
+ { 0xcd,0x4c,0x81,0xcd }, { 0x0c,0x14,0x18,0x0c },
+ { 0x13,0x35,0x26,0x13 }, { 0xec,0x2f,0xc3,0xec },
+ { 0x5f,0xe1,0xbe,0x5f }, { 0x97,0xa2,0x35,0x97 },
+ { 0x44,0xcc,0x88,0x44 }, { 0x17,0x39,0x2e,0x17 },
+ { 0xc4,0x57,0x93,0xc4 }, { 0xa7,0xf2,0x55,0xa7 },
+ { 0x7e,0x82,0xfc,0x7e }, { 0x3d,0x47,0x7a,0x3d },
+ { 0x64,0xac,0xc8,0x64 }, { 0x5d,0xe7,0xba,0x5d },
+ { 0x19,0x2b,0x32,0x19 }, { 0x73,0x95,0xe6,0x73 },
+ { 0x60,0xa0,0xc0,0x60 }, { 0x81,0x98,0x19,0x81 },
+ { 0x4f,0xd1,0x9e,0x4f }, { 0xdc,0x7f,0xa3,0xdc },
+ { 0x22,0x66,0x44,0x22 }, { 0x2a,0x7e,0x54,0x2a },
+ { 0x90,0xab,0x3b,0x90 }, { 0x88,0x83,0x0b,0x88 },
+ { 0x46,0xca,0x8c,0x46 }, { 0xee,0x29,0xc7,0xee },
+ { 0xb8,0xd3,0x6b,0xb8 }, { 0x14,0x3c,0x28,0x14 },
+ { 0xde,0x79,0xa7,0xde }, { 0x5e,0xe2,0xbc,0x5e },
+ { 0x0b,0x1d,0x16,0x0b }, { 0xdb,0x76,0xad,0xdb },
+ { 0xe0,0x3b,0xdb,0xe0 }, { 0x32,0x56,0x64,0x32 },
+ { 0x3a,0x4e,0x74,0x3a }, { 0x0a,0x1e,0x14,0x0a },
+ { 0x49,0xdb,0x92,0x49 }, { 0x06,0x0a,0x0c,0x06 },
+ { 0x24,0x6c,0x48,0x24 }, { 0x5c,0xe4,0xb8,0x5c },
+ { 0xc2,0x5d,0x9f,0xc2 }, { 0xd3,0x6e,0xbd,0xd3 },
+ { 0xac,0xef,0x43,0xac }, { 0x62,0xa6,0xc4,0x62 },
+ { 0x91,0xa8,0x39,0x91 }, { 0x95,0xa4,0x31,0x95 },
+ { 0xe4,0x37,0xd3,0xe4 }, { 0x79,0x8b,0xf2,0x79 },
+ { 0xe7,0x32,0xd5,0xe7 }, { 0xc8,0x43,0x8b,0xc8 },
+ { 0x37,0x59,0x6e,0x37 }, { 0x6d,0xb7,0xda,0x6d },
+ { 0x8d,0x8c,0x01,0x8d }, { 0xd5,0x64,0xb1,0xd5 },
+ { 0x4e,0xd2,0x9c,0x4e }, { 0xa9,0xe0,0x49,0xa9 },
+ { 0x6c,0xb4,0xd8,0x6c }, { 0x56,0xfa,0xac,0x56 },
+ { 0xf4,0x07,0xf3,0xf4 }, { 0xea,0x25,0xcf,0xea },
+ { 0x65,0xaf,0xca,0x65 }, { 0x7a,0x8e,0xf4,0x7a },
+ { 0xae,0xe9,0x47,0xae }, { 0x08,0x18,0x10,0x08 },
+ { 0xba,0xd5,0x6f,0xba }, { 0x78,0x88,0xf0,0x78 },
+ { 0x25,0x6f,0x4a,0x25 }, { 0x2e,0x72,0x5c,0x2e },
+ { 0x1c,0x24,0x38,0x1c }, { 0xa6,0xf1,0x57,0xa6 },
+ { 0xb4,0xc7,0x73,0xb4 }, { 0xc6,0x51,0x97,0xc6 },
+ { 0xe8,0x23,0xcb,0xe8 }, { 0xdd,0x7c,0xa1,0xdd },
+ { 0x74,0x9c,0xe8,0x74 }, { 0x1f,0x21,0x3e,0x1f },
+ { 0x4b,0xdd,0x96,0x4b }, { 0xbd,0xdc,0x61,0xbd },
+ { 0x8b,0x86,0x0d,0x8b }, { 0x8a,0x85,0x0f,0x8a },
+ { 0x70,0x90,0xe0,0x70 }, { 0x3e,0x42,0x7c,0x3e },
+ { 0xb5,0xc4,0x71,0xb5 }, { 0x66,0xaa,0xcc,0x66 },
+ { 0x48,0xd8,0x90,0x48 }, { 0x03,0x05,0x06,0x03 },
+ { 0xf6,0x01,0xf7,0xf6 }, { 0x0e,0x12,0x1c,0x0e },
+ { 0x61,0xa3,0xc2,0x61 }, { 0x35,0x5f,0x6a,0x35 },
+ { 0x57,0xf9,0xae,0x57 }, { 0xb9,0xd0,0x69,0xb9 },
+ { 0x86,0x91,0x17,0x86 }, { 0xc1,0x58,0x99,0xc1 },
+ { 0x1d,0x27,0x3a,0x1d }, { 0x9e,0xb9,0x27,0x9e },
+ { 0xe1,0x38,0xd9,0xe1 }, { 0xf8,0x13,0xeb,0xf8 },
+ { 0x98,0xb3,0x2b,0x98 }, { 0x11,0x33,0x22,0x11 },
+ { 0x69,0xbb,0xd2,0x69 }, { 0xd9,0x70,0xa9,0xd9 },
+ { 0x8e,0x89,0x07,0x8e }, { 0x94,0xa7,0x33,0x94 },
+ { 0x9b,0xb6,0x2d,0x9b }, { 0x1e,0x22,0x3c,0x1e },
+ { 0x87,0x92,0x15,0x87 }, { 0xe9,0x20,0xc9,0xe9 },
+ { 0xce,0x49,0x87,0xce }, { 0x55,0xff,0xaa,0x55 },
+ { 0x28,0x78,0x50,0x28 }, { 0xdf,0x7a,0xa5,0xdf },
+ { 0x8c,0x8f,0x03,0x8c }, { 0xa1,0xf8,0x59,0xa1 },
+ { 0x89,0x80,0x09,0x89 }, { 0x0d,0x17,0x1a,0x0d },
+ { 0xbf,0xda,0x65,0xbf }, { 0xe6,0x31,0xd7,0xe6 },
+ { 0x42,0xc6,0x84,0x42 }, { 0x68,0xb8,0xd0,0x68 },
+ { 0x41,0xc3,0x82,0x41 }, { 0x99,0xb0,0x29,0x99 },
+ { 0x2d,0x77,0x5a,0x2d }, { 0x0f,0x11,0x1e,0x0f },
+ { 0xb0,0xcb,0x7b,0xb0 }, { 0x54,0xfc,0xa8,0x54 },
+ { 0xbb,0xd6,0x6d,0xbb }, { 0x16,0x3a,0x2c,0x16 }
+ };
+
+static const unsigned char T4[256][4] =
+ {
+ { 0x63,0x63,0xa5,0xc6 }, { 0x7c,0x7c,0x84,0xf8 },
+ { 0x77,0x77,0x99,0xee }, { 0x7b,0x7b,0x8d,0xf6 },
+ { 0xf2,0xf2,0x0d,0xff }, { 0x6b,0x6b,0xbd,0xd6 },
+ { 0x6f,0x6f,0xb1,0xde }, { 0xc5,0xc5,0x54,0x91 },
+ { 0x30,0x30,0x50,0x60 }, { 0x01,0x01,0x03,0x02 },
+ { 0x67,0x67,0xa9,0xce }, { 0x2b,0x2b,0x7d,0x56 },
+ { 0xfe,0xfe,0x19,0xe7 }, { 0xd7,0xd7,0x62,0xb5 },
+ { 0xab,0xab,0xe6,0x4d }, { 0x76,0x76,0x9a,0xec },
+ { 0xca,0xca,0x45,0x8f }, { 0x82,0x82,0x9d,0x1f },
+ { 0xc9,0xc9,0x40,0x89 }, { 0x7d,0x7d,0x87,0xfa },
+ { 0xfa,0xfa,0x15,0xef }, { 0x59,0x59,0xeb,0xb2 },
+ { 0x47,0x47,0xc9,0x8e }, { 0xf0,0xf0,0x0b,0xfb },
+ { 0xad,0xad,0xec,0x41 }, { 0xd4,0xd4,0x67,0xb3 },
+ { 0xa2,0xa2,0xfd,0x5f }, { 0xaf,0xaf,0xea,0x45 },
+ { 0x9c,0x9c,0xbf,0x23 }, { 0xa4,0xa4,0xf7,0x53 },
+ { 0x72,0x72,0x96,0xe4 }, { 0xc0,0xc0,0x5b,0x9b },
+ { 0xb7,0xb7,0xc2,0x75 }, { 0xfd,0xfd,0x1c,0xe1 },
+ { 0x93,0x93,0xae,0x3d }, { 0x26,0x26,0x6a,0x4c },
+ { 0x36,0x36,0x5a,0x6c }, { 0x3f,0x3f,0x41,0x7e },
+ { 0xf7,0xf7,0x02,0xf5 }, { 0xcc,0xcc,0x4f,0x83 },
+ { 0x34,0x34,0x5c,0x68 }, { 0xa5,0xa5,0xf4,0x51 },
+ { 0xe5,0xe5,0x34,0xd1 }, { 0xf1,0xf1,0x08,0xf9 },
+ { 0x71,0x71,0x93,0xe2 }, { 0xd8,0xd8,0x73,0xab },
+ { 0x31,0x31,0x53,0x62 }, { 0x15,0x15,0x3f,0x2a },
+ { 0x04,0x04,0x0c,0x08 }, { 0xc7,0xc7,0x52,0x95 },
+ { 0x23,0x23,0x65,0x46 }, { 0xc3,0xc3,0x5e,0x9d },
+ { 0x18,0x18,0x28,0x30 }, { 0x96,0x96,0xa1,0x37 },
+ { 0x05,0x05,0x0f,0x0a }, { 0x9a,0x9a,0xb5,0x2f },
+ { 0x07,0x07,0x09,0x0e }, { 0x12,0x12,0x36,0x24 },
+ { 0x80,0x80,0x9b,0x1b }, { 0xe2,0xe2,0x3d,0xdf },
+ { 0xeb,0xeb,0x26,0xcd }, { 0x27,0x27,0x69,0x4e },
+ { 0xb2,0xb2,0xcd,0x7f }, { 0x75,0x75,0x9f,0xea },
+ { 0x09,0x09,0x1b,0x12 }, { 0x83,0x83,0x9e,0x1d },
+ { 0x2c,0x2c,0x74,0x58 }, { 0x1a,0x1a,0x2e,0x34 },
+ { 0x1b,0x1b,0x2d,0x36 }, { 0x6e,0x6e,0xb2,0xdc },
+ { 0x5a,0x5a,0xee,0xb4 }, { 0xa0,0xa0,0xfb,0x5b },
+ { 0x52,0x52,0xf6,0xa4 }, { 0x3b,0x3b,0x4d,0x76 },
+ { 0xd6,0xd6,0x61,0xb7 }, { 0xb3,0xb3,0xce,0x7d },
+ { 0x29,0x29,0x7b,0x52 }, { 0xe3,0xe3,0x3e,0xdd },
+ { 0x2f,0x2f,0x71,0x5e }, { 0x84,0x84,0x97,0x13 },
+ { 0x53,0x53,0xf5,0xa6 }, { 0xd1,0xd1,0x68,0xb9 },
+ { 0x00,0x00,0x00,0x00 }, { 0xed,0xed,0x2c,0xc1 },
+ { 0x20,0x20,0x60,0x40 }, { 0xfc,0xfc,0x1f,0xe3 },
+ { 0xb1,0xb1,0xc8,0x79 }, { 0x5b,0x5b,0xed,0xb6 },
+ { 0x6a,0x6a,0xbe,0xd4 }, { 0xcb,0xcb,0x46,0x8d },
+ { 0xbe,0xbe,0xd9,0x67 }, { 0x39,0x39,0x4b,0x72 },
+ { 0x4a,0x4a,0xde,0x94 }, { 0x4c,0x4c,0xd4,0x98 },
+ { 0x58,0x58,0xe8,0xb0 }, { 0xcf,0xcf,0x4a,0x85 },
+ { 0xd0,0xd0,0x6b,0xbb }, { 0xef,0xef,0x2a,0xc5 },
+ { 0xaa,0xaa,0xe5,0x4f }, { 0xfb,0xfb,0x16,0xed },
+ { 0x43,0x43,0xc5,0x86 }, { 0x4d,0x4d,0xd7,0x9a },
+ { 0x33,0x33,0x55,0x66 }, { 0x85,0x85,0x94,0x11 },
+ { 0x45,0x45,0xcf,0x8a }, { 0xf9,0xf9,0x10,0xe9 },
+ { 0x02,0x02,0x06,0x04 }, { 0x7f,0x7f,0x81,0xfe },
+ { 0x50,0x50,0xf0,0xa0 }, { 0x3c,0x3c,0x44,0x78 },
+ { 0x9f,0x9f,0xba,0x25 }, { 0xa8,0xa8,0xe3,0x4b },
+ { 0x51,0x51,0xf3,0xa2 }, { 0xa3,0xa3,0xfe,0x5d },
+ { 0x40,0x40,0xc0,0x80 }, { 0x8f,0x8f,0x8a,0x05 },
+ { 0x92,0x92,0xad,0x3f }, { 0x9d,0x9d,0xbc,0x21 },
+ { 0x38,0x38,0x48,0x70 }, { 0xf5,0xf5,0x04,0xf1 },
+ { 0xbc,0xbc,0xdf,0x63 }, { 0xb6,0xb6,0xc1,0x77 },
+ { 0xda,0xda,0x75,0xaf }, { 0x21,0x21,0x63,0x42 },
+ { 0x10,0x10,0x30,0x20 }, { 0xff,0xff,0x1a,0xe5 },
+ { 0xf3,0xf3,0x0e,0xfd }, { 0xd2,0xd2,0x6d,0xbf },
+ { 0xcd,0xcd,0x4c,0x81 }, { 0x0c,0x0c,0x14,0x18 },
+ { 0x13,0x13,0x35,0x26 }, { 0xec,0xec,0x2f,0xc3 },
+ { 0x5f,0x5f,0xe1,0xbe }, { 0x97,0x97,0xa2,0x35 },
+ { 0x44,0x44,0xcc,0x88 }, { 0x17,0x17,0x39,0x2e },
+ { 0xc4,0xc4,0x57,0x93 }, { 0xa7,0xa7,0xf2,0x55 },
+ { 0x7e,0x7e,0x82,0xfc }, { 0x3d,0x3d,0x47,0x7a },
+ { 0x64,0x64,0xac,0xc8 }, { 0x5d,0x5d,0xe7,0xba },
+ { 0x19,0x19,0x2b,0x32 }, { 0x73,0x73,0x95,0xe6 },
+ { 0x60,0x60,0xa0,0xc0 }, { 0x81,0x81,0x98,0x19 },
+ { 0x4f,0x4f,0xd1,0x9e }, { 0xdc,0xdc,0x7f,0xa3 },
+ { 0x22,0x22,0x66,0x44 }, { 0x2a,0x2a,0x7e,0x54 },
+ { 0x90,0x90,0xab,0x3b }, { 0x88,0x88,0x83,0x0b },
+ { 0x46,0x46,0xca,0x8c }, { 0xee,0xee,0x29,0xc7 },
+ { 0xb8,0xb8,0xd3,0x6b }, { 0x14,0x14,0x3c,0x28 },
+ { 0xde,0xde,0x79,0xa7 }, { 0x5e,0x5e,0xe2,0xbc },
+ { 0x0b,0x0b,0x1d,0x16 }, { 0xdb,0xdb,0x76,0xad },
+ { 0xe0,0xe0,0x3b,0xdb }, { 0x32,0x32,0x56,0x64 },
+ { 0x3a,0x3a,0x4e,0x74 }, { 0x0a,0x0a,0x1e,0x14 },
+ { 0x49,0x49,0xdb,0x92 }, { 0x06,0x06,0x0a,0x0c },
+ { 0x24,0x24,0x6c,0x48 }, { 0x5c,0x5c,0xe4,0xb8 },
+ { 0xc2,0xc2,0x5d,0x9f }, { 0xd3,0xd3,0x6e,0xbd },
+ { 0xac,0xac,0xef,0x43 }, { 0x62,0x62,0xa6,0xc4 },
+ { 0x91,0x91,0xa8,0x39 }, { 0x95,0x95,0xa4,0x31 },
+ { 0xe4,0xe4,0x37,0xd3 }, { 0x79,0x79,0x8b,0xf2 },
+ { 0xe7,0xe7,0x32,0xd5 }, { 0xc8,0xc8,0x43,0x8b },
+ { 0x37,0x37,0x59,0x6e }, { 0x6d,0x6d,0xb7,0xda },
+ { 0x8d,0x8d,0x8c,0x01 }, { 0xd5,0xd5,0x64,0xb1 },
+ { 0x4e,0x4e,0xd2,0x9c }, { 0xa9,0xa9,0xe0,0x49 },
+ { 0x6c,0x6c,0xb4,0xd8 }, { 0x56,0x56,0xfa,0xac },
+ { 0xf4,0xf4,0x07,0xf3 }, { 0xea,0xea,0x25,0xcf },
+ { 0x65,0x65,0xaf,0xca }, { 0x7a,0x7a,0x8e,0xf4 },
+ { 0xae,0xae,0xe9,0x47 }, { 0x08,0x08,0x18,0x10 },
+ { 0xba,0xba,0xd5,0x6f }, { 0x78,0x78,0x88,0xf0 },
+ { 0x25,0x25,0x6f,0x4a }, { 0x2e,0x2e,0x72,0x5c },
+ { 0x1c,0x1c,0x24,0x38 }, { 0xa6,0xa6,0xf1,0x57 },
+ { 0xb4,0xb4,0xc7,0x73 }, { 0xc6,0xc6,0x51,0x97 },
+ { 0xe8,0xe8,0x23,0xcb }, { 0xdd,0xdd,0x7c,0xa1 },
+ { 0x74,0x74,0x9c,0xe8 }, { 0x1f,0x1f,0x21,0x3e },
+ { 0x4b,0x4b,0xdd,0x96 }, { 0xbd,0xbd,0xdc,0x61 },
+ { 0x8b,0x8b,0x86,0x0d }, { 0x8a,0x8a,0x85,0x0f },
+ { 0x70,0x70,0x90,0xe0 }, { 0x3e,0x3e,0x42,0x7c },
+ { 0xb5,0xb5,0xc4,0x71 }, { 0x66,0x66,0xaa,0xcc },
+ { 0x48,0x48,0xd8,0x90 }, { 0x03,0x03,0x05,0x06 },
+ { 0xf6,0xf6,0x01,0xf7 }, { 0x0e,0x0e,0x12,0x1c },
+ { 0x61,0x61,0xa3,0xc2 }, { 0x35,0x35,0x5f,0x6a },
+ { 0x57,0x57,0xf9,0xae }, { 0xb9,0xb9,0xd0,0x69 },
+ { 0x86,0x86,0x91,0x17 }, { 0xc1,0xc1,0x58,0x99 },
+ { 0x1d,0x1d,0x27,0x3a }, { 0x9e,0x9e,0xb9,0x27 },
+ { 0xe1,0xe1,0x38,0xd9 }, { 0xf8,0xf8,0x13,0xeb },
+ { 0x98,0x98,0xb3,0x2b }, { 0x11,0x11,0x33,0x22 },
+ { 0x69,0x69,0xbb,0xd2 }, { 0xd9,0xd9,0x70,0xa9 },
+ { 0x8e,0x8e,0x89,0x07 }, { 0x94,0x94,0xa7,0x33 },
+ { 0x9b,0x9b,0xb6,0x2d }, { 0x1e,0x1e,0x22,0x3c },
+ { 0x87,0x87,0x92,0x15 }, { 0xe9,0xe9,0x20,0xc9 },
+ { 0xce,0xce,0x49,0x87 }, { 0x55,0x55,0xff,0xaa },
+ { 0x28,0x28,0x78,0x50 }, { 0xdf,0xdf,0x7a,0xa5 },
+ { 0x8c,0x8c,0x8f,0x03 }, { 0xa1,0xa1,0xf8,0x59 },
+ { 0x89,0x89,0x80,0x09 }, { 0x0d,0x0d,0x17,0x1a },
+ { 0xbf,0xbf,0xda,0x65 }, { 0xe6,0xe6,0x31,0xd7 },
+ { 0x42,0x42,0xc6,0x84 }, { 0x68,0x68,0xb8,0xd0 },
+ { 0x41,0x41,0xc3,0x82 }, { 0x99,0x99,0xb0,0x29 },
+ { 0x2d,0x2d,0x77,0x5a }, { 0x0f,0x0f,0x11,0x1e },
+ { 0xb0,0xb0,0xcb,0x7b }, { 0x54,0x54,0xfc,0xa8 },
+ { 0xbb,0xbb,0xd6,0x6d }, { 0x16,0x16,0x3a,0x2c }
+ };
+
+static const unsigned char T5[256][4] =
+ {
+ { 0x51,0xf4,0xa7,0x50 }, { 0x7e,0x41,0x65,0x53 },
+ { 0x1a,0x17,0xa4,0xc3 }, { 0x3a,0x27,0x5e,0x96 },
+ { 0x3b,0xab,0x6b,0xcb }, { 0x1f,0x9d,0x45,0xf1 },
+ { 0xac,0xfa,0x58,0xab }, { 0x4b,0xe3,0x03,0x93 },
+ { 0x20,0x30,0xfa,0x55 }, { 0xad,0x76,0x6d,0xf6 },
+ { 0x88,0xcc,0x76,0x91 }, { 0xf5,0x02,0x4c,0x25 },
+ { 0x4f,0xe5,0xd7,0xfc }, { 0xc5,0x2a,0xcb,0xd7 },
+ { 0x26,0x35,0x44,0x80 }, { 0xb5,0x62,0xa3,0x8f },
+ { 0xde,0xb1,0x5a,0x49 }, { 0x25,0xba,0x1b,0x67 },
+ { 0x45,0xea,0x0e,0x98 }, { 0x5d,0xfe,0xc0,0xe1 },
+ { 0xc3,0x2f,0x75,0x02 }, { 0x81,0x4c,0xf0,0x12 },
+ { 0x8d,0x46,0x97,0xa3 }, { 0x6b,0xd3,0xf9,0xc6 },
+ { 0x03,0x8f,0x5f,0xe7 }, { 0x15,0x92,0x9c,0x95 },
+ { 0xbf,0x6d,0x7a,0xeb }, { 0x95,0x52,0x59,0xda },
+ { 0xd4,0xbe,0x83,0x2d }, { 0x58,0x74,0x21,0xd3 },
+ { 0x49,0xe0,0x69,0x29 }, { 0x8e,0xc9,0xc8,0x44 },
+ { 0x75,0xc2,0x89,0x6a }, { 0xf4,0x8e,0x79,0x78 },
+ { 0x99,0x58,0x3e,0x6b }, { 0x27,0xb9,0x71,0xdd },
+ { 0xbe,0xe1,0x4f,0xb6 }, { 0xf0,0x88,0xad,0x17 },
+ { 0xc9,0x20,0xac,0x66 }, { 0x7d,0xce,0x3a,0xb4 },
+ { 0x63,0xdf,0x4a,0x18 }, { 0xe5,0x1a,0x31,0x82 },
+ { 0x97,0x51,0x33,0x60 }, { 0x62,0x53,0x7f,0x45 },
+ { 0xb1,0x64,0x77,0xe0 }, { 0xbb,0x6b,0xae,0x84 },
+ { 0xfe,0x81,0xa0,0x1c }, { 0xf9,0x08,0x2b,0x94 },
+ { 0x70,0x48,0x68,0x58 }, { 0x8f,0x45,0xfd,0x19 },
+ { 0x94,0xde,0x6c,0x87 }, { 0x52,0x7b,0xf8,0xb7 },
+ { 0xab,0x73,0xd3,0x23 }, { 0x72,0x4b,0x02,0xe2 },
+ { 0xe3,0x1f,0x8f,0x57 }, { 0x66,0x55,0xab,0x2a },
+ { 0xb2,0xeb,0x28,0x07 }, { 0x2f,0xb5,0xc2,0x03 },
+ { 0x86,0xc5,0x7b,0x9a }, { 0xd3,0x37,0x08,0xa5 },
+ { 0x30,0x28,0x87,0xf2 }, { 0x23,0xbf,0xa5,0xb2 },
+ { 0x02,0x03,0x6a,0xba }, { 0xed,0x16,0x82,0x5c },
+ { 0x8a,0xcf,0x1c,0x2b }, { 0xa7,0x79,0xb4,0x92 },
+ { 0xf3,0x07,0xf2,0xf0 }, { 0x4e,0x69,0xe2,0xa1 },
+ { 0x65,0xda,0xf4,0xcd }, { 0x06,0x05,0xbe,0xd5 },
+ { 0xd1,0x34,0x62,0x1f }, { 0xc4,0xa6,0xfe,0x8a },
+ { 0x34,0x2e,0x53,0x9d }, { 0xa2,0xf3,0x55,0xa0 },
+ { 0x05,0x8a,0xe1,0x32 }, { 0xa4,0xf6,0xeb,0x75 },
+ { 0x0b,0x83,0xec,0x39 }, { 0x40,0x60,0xef,0xaa },
+ { 0x5e,0x71,0x9f,0x06 }, { 0xbd,0x6e,0x10,0x51 },
+ { 0x3e,0x21,0x8a,0xf9 }, { 0x96,0xdd,0x06,0x3d },
+ { 0xdd,0x3e,0x05,0xae }, { 0x4d,0xe6,0xbd,0x46 },
+ { 0x91,0x54,0x8d,0xb5 }, { 0x71,0xc4,0x5d,0x05 },
+ { 0x04,0x06,0xd4,0x6f }, { 0x60,0x50,0x15,0xff },
+ { 0x19,0x98,0xfb,0x24 }, { 0xd6,0xbd,0xe9,0x97 },
+ { 0x89,0x40,0x43,0xcc }, { 0x67,0xd9,0x9e,0x77 },
+ { 0xb0,0xe8,0x42,0xbd }, { 0x07,0x89,0x8b,0x88 },
+ { 0xe7,0x19,0x5b,0x38 }, { 0x79,0xc8,0xee,0xdb },
+ { 0xa1,0x7c,0x0a,0x47 }, { 0x7c,0x42,0x0f,0xe9 },
+ { 0xf8,0x84,0x1e,0xc9 }, { 0x00,0x00,0x00,0x00 },
+ { 0x09,0x80,0x86,0x83 }, { 0x32,0x2b,0xed,0x48 },
+ { 0x1e,0x11,0x70,0xac }, { 0x6c,0x5a,0x72,0x4e },
+ { 0xfd,0x0e,0xff,0xfb }, { 0x0f,0x85,0x38,0x56 },
+ { 0x3d,0xae,0xd5,0x1e }, { 0x36,0x2d,0x39,0x27 },
+ { 0x0a,0x0f,0xd9,0x64 }, { 0x68,0x5c,0xa6,0x21 },
+ { 0x9b,0x5b,0x54,0xd1 }, { 0x24,0x36,0x2e,0x3a },
+ { 0x0c,0x0a,0x67,0xb1 }, { 0x93,0x57,0xe7,0x0f },
+ { 0xb4,0xee,0x96,0xd2 }, { 0x1b,0x9b,0x91,0x9e },
+ { 0x80,0xc0,0xc5,0x4f }, { 0x61,0xdc,0x20,0xa2 },
+ { 0x5a,0x77,0x4b,0x69 }, { 0x1c,0x12,0x1a,0x16 },
+ { 0xe2,0x93,0xba,0x0a }, { 0xc0,0xa0,0x2a,0xe5 },
+ { 0x3c,0x22,0xe0,0x43 }, { 0x12,0x1b,0x17,0x1d },
+ { 0x0e,0x09,0x0d,0x0b }, { 0xf2,0x8b,0xc7,0xad },
+ { 0x2d,0xb6,0xa8,0xb9 }, { 0x14,0x1e,0xa9,0xc8 },
+ { 0x57,0xf1,0x19,0x85 }, { 0xaf,0x75,0x07,0x4c },
+ { 0xee,0x99,0xdd,0xbb }, { 0xa3,0x7f,0x60,0xfd },
+ { 0xf7,0x01,0x26,0x9f }, { 0x5c,0x72,0xf5,0xbc },
+ { 0x44,0x66,0x3b,0xc5 }, { 0x5b,0xfb,0x7e,0x34 },
+ { 0x8b,0x43,0x29,0x76 }, { 0xcb,0x23,0xc6,0xdc },
+ { 0xb6,0xed,0xfc,0x68 }, { 0xb8,0xe4,0xf1,0x63 },
+ { 0xd7,0x31,0xdc,0xca }, { 0x42,0x63,0x85,0x10 },
+ { 0x13,0x97,0x22,0x40 }, { 0x84,0xc6,0x11,0x20 },
+ { 0x85,0x4a,0x24,0x7d }, { 0xd2,0xbb,0x3d,0xf8 },
+ { 0xae,0xf9,0x32,0x11 }, { 0xc7,0x29,0xa1,0x6d },
+ { 0x1d,0x9e,0x2f,0x4b }, { 0xdc,0xb2,0x30,0xf3 },
+ { 0x0d,0x86,0x52,0xec }, { 0x77,0xc1,0xe3,0xd0 },
+ { 0x2b,0xb3,0x16,0x6c }, { 0xa9,0x70,0xb9,0x99 },
+ { 0x11,0x94,0x48,0xfa }, { 0x47,0xe9,0x64,0x22 },
+ { 0xa8,0xfc,0x8c,0xc4 }, { 0xa0,0xf0,0x3f,0x1a },
+ { 0x56,0x7d,0x2c,0xd8 }, { 0x22,0x33,0x90,0xef },
+ { 0x87,0x49,0x4e,0xc7 }, { 0xd9,0x38,0xd1,0xc1 },
+ { 0x8c,0xca,0xa2,0xfe }, { 0x98,0xd4,0x0b,0x36 },
+ { 0xa6,0xf5,0x81,0xcf }, { 0xa5,0x7a,0xde,0x28 },
+ { 0xda,0xb7,0x8e,0x26 }, { 0x3f,0xad,0xbf,0xa4 },
+ { 0x2c,0x3a,0x9d,0xe4 }, { 0x50,0x78,0x92,0x0d },
+ { 0x6a,0x5f,0xcc,0x9b }, { 0x54,0x7e,0x46,0x62 },
+ { 0xf6,0x8d,0x13,0xc2 }, { 0x90,0xd8,0xb8,0xe8 },
+ { 0x2e,0x39,0xf7,0x5e }, { 0x82,0xc3,0xaf,0xf5 },
+ { 0x9f,0x5d,0x80,0xbe }, { 0x69,0xd0,0x93,0x7c },
+ { 0x6f,0xd5,0x2d,0xa9 }, { 0xcf,0x25,0x12,0xb3 },
+ { 0xc8,0xac,0x99,0x3b }, { 0x10,0x18,0x7d,0xa7 },
+ { 0xe8,0x9c,0x63,0x6e }, { 0xdb,0x3b,0xbb,0x7b },
+ { 0xcd,0x26,0x78,0x09 }, { 0x6e,0x59,0x18,0xf4 },
+ { 0xec,0x9a,0xb7,0x01 }, { 0x83,0x4f,0x9a,0xa8 },
+ { 0xe6,0x95,0x6e,0x65 }, { 0xaa,0xff,0xe6,0x7e },
+ { 0x21,0xbc,0xcf,0x08 }, { 0xef,0x15,0xe8,0xe6 },
+ { 0xba,0xe7,0x9b,0xd9 }, { 0x4a,0x6f,0x36,0xce },
+ { 0xea,0x9f,0x09,0xd4 }, { 0x29,0xb0,0x7c,0xd6 },
+ { 0x31,0xa4,0xb2,0xaf }, { 0x2a,0x3f,0x23,0x31 },
+ { 0xc6,0xa5,0x94,0x30 }, { 0x35,0xa2,0x66,0xc0 },
+ { 0x74,0x4e,0xbc,0x37 }, { 0xfc,0x82,0xca,0xa6 },
+ { 0xe0,0x90,0xd0,0xb0 }, { 0x33,0xa7,0xd8,0x15 },
+ { 0xf1,0x04,0x98,0x4a }, { 0x41,0xec,0xda,0xf7 },
+ { 0x7f,0xcd,0x50,0x0e }, { 0x17,0x91,0xf6,0x2f },
+ { 0x76,0x4d,0xd6,0x8d }, { 0x43,0xef,0xb0,0x4d },
+ { 0xcc,0xaa,0x4d,0x54 }, { 0xe4,0x96,0x04,0xdf },
+ { 0x9e,0xd1,0xb5,0xe3 }, { 0x4c,0x6a,0x88,0x1b },
+ { 0xc1,0x2c,0x1f,0xb8 }, { 0x46,0x65,0x51,0x7f },
+ { 0x9d,0x5e,0xea,0x04 }, { 0x01,0x8c,0x35,0x5d },
+ { 0xfa,0x87,0x74,0x73 }, { 0xfb,0x0b,0x41,0x2e },
+ { 0xb3,0x67,0x1d,0x5a }, { 0x92,0xdb,0xd2,0x52 },
+ { 0xe9,0x10,0x56,0x33 }, { 0x6d,0xd6,0x47,0x13 },
+ { 0x9a,0xd7,0x61,0x8c }, { 0x37,0xa1,0x0c,0x7a },
+ { 0x59,0xf8,0x14,0x8e }, { 0xeb,0x13,0x3c,0x89 },
+ { 0xce,0xa9,0x27,0xee }, { 0xb7,0x61,0xc9,0x35 },
+ { 0xe1,0x1c,0xe5,0xed }, { 0x7a,0x47,0xb1,0x3c },
+ { 0x9c,0xd2,0xdf,0x59 }, { 0x55,0xf2,0x73,0x3f },
+ { 0x18,0x14,0xce,0x79 }, { 0x73,0xc7,0x37,0xbf },
+ { 0x53,0xf7,0xcd,0xea }, { 0x5f,0xfd,0xaa,0x5b },
+ { 0xdf,0x3d,0x6f,0x14 }, { 0x78,0x44,0xdb,0x86 },
+ { 0xca,0xaf,0xf3,0x81 }, { 0xb9,0x68,0xc4,0x3e },
+ { 0x38,0x24,0x34,0x2c }, { 0xc2,0xa3,0x40,0x5f },
+ { 0x16,0x1d,0xc3,0x72 }, { 0xbc,0xe2,0x25,0x0c },
+ { 0x28,0x3c,0x49,0x8b }, { 0xff,0x0d,0x95,0x41 },
+ { 0x39,0xa8,0x01,0x71 }, { 0x08,0x0c,0xb3,0xde },
+ { 0xd8,0xb4,0xe4,0x9c }, { 0x64,0x56,0xc1,0x90 },
+ { 0x7b,0xcb,0x84,0x61 }, { 0xd5,0x32,0xb6,0x70 },
+ { 0x48,0x6c,0x5c,0x74 }, { 0xd0,0xb8,0x57,0x42 }
+ };
+
+static const unsigned char T6[256][4] =
+ {
+ { 0x50,0x51,0xf4,0xa7 }, { 0x53,0x7e,0x41,0x65 },
+ { 0xc3,0x1a,0x17,0xa4 }, { 0x96,0x3a,0x27,0x5e },
+ { 0xcb,0x3b,0xab,0x6b }, { 0xf1,0x1f,0x9d,0x45 },
+ { 0xab,0xac,0xfa,0x58 }, { 0x93,0x4b,0xe3,0x03 },
+ { 0x55,0x20,0x30,0xfa }, { 0xf6,0xad,0x76,0x6d },
+ { 0x91,0x88,0xcc,0x76 }, { 0x25,0xf5,0x02,0x4c },
+ { 0xfc,0x4f,0xe5,0xd7 }, { 0xd7,0xc5,0x2a,0xcb },
+ { 0x80,0x26,0x35,0x44 }, { 0x8f,0xb5,0x62,0xa3 },
+ { 0x49,0xde,0xb1,0x5a }, { 0x67,0x25,0xba,0x1b },
+ { 0x98,0x45,0xea,0x0e }, { 0xe1,0x5d,0xfe,0xc0 },
+ { 0x02,0xc3,0x2f,0x75 }, { 0x12,0x81,0x4c,0xf0 },
+ { 0xa3,0x8d,0x46,0x97 }, { 0xc6,0x6b,0xd3,0xf9 },
+ { 0xe7,0x03,0x8f,0x5f }, { 0x95,0x15,0x92,0x9c },
+ { 0xeb,0xbf,0x6d,0x7a }, { 0xda,0x95,0x52,0x59 },
+ { 0x2d,0xd4,0xbe,0x83 }, { 0xd3,0x58,0x74,0x21 },
+ { 0x29,0x49,0xe0,0x69 }, { 0x44,0x8e,0xc9,0xc8 },
+ { 0x6a,0x75,0xc2,0x89 }, { 0x78,0xf4,0x8e,0x79 },
+ { 0x6b,0x99,0x58,0x3e }, { 0xdd,0x27,0xb9,0x71 },
+ { 0xb6,0xbe,0xe1,0x4f }, { 0x17,0xf0,0x88,0xad },
+ { 0x66,0xc9,0x20,0xac }, { 0xb4,0x7d,0xce,0x3a },
+ { 0x18,0x63,0xdf,0x4a }, { 0x82,0xe5,0x1a,0x31 },
+ { 0x60,0x97,0x51,0x33 }, { 0x45,0x62,0x53,0x7f },
+ { 0xe0,0xb1,0x64,0x77 }, { 0x84,0xbb,0x6b,0xae },
+ { 0x1c,0xfe,0x81,0xa0 }, { 0x94,0xf9,0x08,0x2b },
+ { 0x58,0x70,0x48,0x68 }, { 0x19,0x8f,0x45,0xfd },
+ { 0x87,0x94,0xde,0x6c }, { 0xb7,0x52,0x7b,0xf8 },
+ { 0x23,0xab,0x73,0xd3 }, { 0xe2,0x72,0x4b,0x02 },
+ { 0x57,0xe3,0x1f,0x8f }, { 0x2a,0x66,0x55,0xab },
+ { 0x07,0xb2,0xeb,0x28 }, { 0x03,0x2f,0xb5,0xc2 },
+ { 0x9a,0x86,0xc5,0x7b }, { 0xa5,0xd3,0x37,0x08 },
+ { 0xf2,0x30,0x28,0x87 }, { 0xb2,0x23,0xbf,0xa5 },
+ { 0xba,0x02,0x03,0x6a }, { 0x5c,0xed,0x16,0x82 },
+ { 0x2b,0x8a,0xcf,0x1c }, { 0x92,0xa7,0x79,0xb4 },
+ { 0xf0,0xf3,0x07,0xf2 }, { 0xa1,0x4e,0x69,0xe2 },
+ { 0xcd,0x65,0xda,0xf4 }, { 0xd5,0x06,0x05,0xbe },
+ { 0x1f,0xd1,0x34,0x62 }, { 0x8a,0xc4,0xa6,0xfe },
+ { 0x9d,0x34,0x2e,0x53 }, { 0xa0,0xa2,0xf3,0x55 },
+ { 0x32,0x05,0x8a,0xe1 }, { 0x75,0xa4,0xf6,0xeb },
+ { 0x39,0x0b,0x83,0xec }, { 0xaa,0x40,0x60,0xef },
+ { 0x06,0x5e,0x71,0x9f }, { 0x51,0xbd,0x6e,0x10 },
+ { 0xf9,0x3e,0x21,0x8a }, { 0x3d,0x96,0xdd,0x06 },
+ { 0xae,0xdd,0x3e,0x05 }, { 0x46,0x4d,0xe6,0xbd },
+ { 0xb5,0x91,0x54,0x8d }, { 0x05,0x71,0xc4,0x5d },
+ { 0x6f,0x04,0x06,0xd4 }, { 0xff,0x60,0x50,0x15 },
+ { 0x24,0x19,0x98,0xfb }, { 0x97,0xd6,0xbd,0xe9 },
+ { 0xcc,0x89,0x40,0x43 }, { 0x77,0x67,0xd9,0x9e },
+ { 0xbd,0xb0,0xe8,0x42 }, { 0x88,0x07,0x89,0x8b },
+ { 0x38,0xe7,0x19,0x5b }, { 0xdb,0x79,0xc8,0xee },
+ { 0x47,0xa1,0x7c,0x0a }, { 0xe9,0x7c,0x42,0x0f },
+ { 0xc9,0xf8,0x84,0x1e }, { 0x00,0x00,0x00,0x00 },
+ { 0x83,0x09,0x80,0x86 }, { 0x48,0x32,0x2b,0xed },
+ { 0xac,0x1e,0x11,0x70 }, { 0x4e,0x6c,0x5a,0x72 },
+ { 0xfb,0xfd,0x0e,0xff }, { 0x56,0x0f,0x85,0x38 },
+ { 0x1e,0x3d,0xae,0xd5 }, { 0x27,0x36,0x2d,0x39 },
+ { 0x64,0x0a,0x0f,0xd9 }, { 0x21,0x68,0x5c,0xa6 },
+ { 0xd1,0x9b,0x5b,0x54 }, { 0x3a,0x24,0x36,0x2e },
+ { 0xb1,0x0c,0x0a,0x67 }, { 0x0f,0x93,0x57,0xe7 },
+ { 0xd2,0xb4,0xee,0x96 }, { 0x9e,0x1b,0x9b,0x91 },
+ { 0x4f,0x80,0xc0,0xc5 }, { 0xa2,0x61,0xdc,0x20 },
+ { 0x69,0x5a,0x77,0x4b }, { 0x16,0x1c,0x12,0x1a },
+ { 0x0a,0xe2,0x93,0xba }, { 0xe5,0xc0,0xa0,0x2a },
+ { 0x43,0x3c,0x22,0xe0 }, { 0x1d,0x12,0x1b,0x17 },
+ { 0x0b,0x0e,0x09,0x0d }, { 0xad,0xf2,0x8b,0xc7 },
+ { 0xb9,0x2d,0xb6,0xa8 }, { 0xc8,0x14,0x1e,0xa9 },
+ { 0x85,0x57,0xf1,0x19 }, { 0x4c,0xaf,0x75,0x07 },
+ { 0xbb,0xee,0x99,0xdd }, { 0xfd,0xa3,0x7f,0x60 },
+ { 0x9f,0xf7,0x01,0x26 }, { 0xbc,0x5c,0x72,0xf5 },
+ { 0xc5,0x44,0x66,0x3b }, { 0x34,0x5b,0xfb,0x7e },
+ { 0x76,0x8b,0x43,0x29 }, { 0xdc,0xcb,0x23,0xc6 },
+ { 0x68,0xb6,0xed,0xfc }, { 0x63,0xb8,0xe4,0xf1 },
+ { 0xca,0xd7,0x31,0xdc }, { 0x10,0x42,0x63,0x85 },
+ { 0x40,0x13,0x97,0x22 }, { 0x20,0x84,0xc6,0x11 },
+ { 0x7d,0x85,0x4a,0x24 }, { 0xf8,0xd2,0xbb,0x3d },
+ { 0x11,0xae,0xf9,0x32 }, { 0x6d,0xc7,0x29,0xa1 },
+ { 0x4b,0x1d,0x9e,0x2f }, { 0xf3,0xdc,0xb2,0x30 },
+ { 0xec,0x0d,0x86,0x52 }, { 0xd0,0x77,0xc1,0xe3 },
+ { 0x6c,0x2b,0xb3,0x16 }, { 0x99,0xa9,0x70,0xb9 },
+ { 0xfa,0x11,0x94,0x48 }, { 0x22,0x47,0xe9,0x64 },
+ { 0xc4,0xa8,0xfc,0x8c }, { 0x1a,0xa0,0xf0,0x3f },
+ { 0xd8,0x56,0x7d,0x2c }, { 0xef,0x22,0x33,0x90 },
+ { 0xc7,0x87,0x49,0x4e }, { 0xc1,0xd9,0x38,0xd1 },
+ { 0xfe,0x8c,0xca,0xa2 }, { 0x36,0x98,0xd4,0x0b },
+ { 0xcf,0xa6,0xf5,0x81 }, { 0x28,0xa5,0x7a,0xde },
+ { 0x26,0xda,0xb7,0x8e }, { 0xa4,0x3f,0xad,0xbf },
+ { 0xe4,0x2c,0x3a,0x9d }, { 0x0d,0x50,0x78,0x92 },
+ { 0x9b,0x6a,0x5f,0xcc }, { 0x62,0x54,0x7e,0x46 },
+ { 0xc2,0xf6,0x8d,0x13 }, { 0xe8,0x90,0xd8,0xb8 },
+ { 0x5e,0x2e,0x39,0xf7 }, { 0xf5,0x82,0xc3,0xaf },
+ { 0xbe,0x9f,0x5d,0x80 }, { 0x7c,0x69,0xd0,0x93 },
+ { 0xa9,0x6f,0xd5,0x2d }, { 0xb3,0xcf,0x25,0x12 },
+ { 0x3b,0xc8,0xac,0x99 }, { 0xa7,0x10,0x18,0x7d },
+ { 0x6e,0xe8,0x9c,0x63 }, { 0x7b,0xdb,0x3b,0xbb },
+ { 0x09,0xcd,0x26,0x78 }, { 0xf4,0x6e,0x59,0x18 },
+ { 0x01,0xec,0x9a,0xb7 }, { 0xa8,0x83,0x4f,0x9a },
+ { 0x65,0xe6,0x95,0x6e }, { 0x7e,0xaa,0xff,0xe6 },
+ { 0x08,0x21,0xbc,0xcf }, { 0xe6,0xef,0x15,0xe8 },
+ { 0xd9,0xba,0xe7,0x9b }, { 0xce,0x4a,0x6f,0x36 },
+ { 0xd4,0xea,0x9f,0x09 }, { 0xd6,0x29,0xb0,0x7c },
+ { 0xaf,0x31,0xa4,0xb2 }, { 0x31,0x2a,0x3f,0x23 },
+ { 0x30,0xc6,0xa5,0x94 }, { 0xc0,0x35,0xa2,0x66 },
+ { 0x37,0x74,0x4e,0xbc }, { 0xa6,0xfc,0x82,0xca },
+ { 0xb0,0xe0,0x90,0xd0 }, { 0x15,0x33,0xa7,0xd8 },
+ { 0x4a,0xf1,0x04,0x98 }, { 0xf7,0x41,0xec,0xda },
+ { 0x0e,0x7f,0xcd,0x50 }, { 0x2f,0x17,0x91,0xf6 },
+ { 0x8d,0x76,0x4d,0xd6 }, { 0x4d,0x43,0xef,0xb0 },
+ { 0x54,0xcc,0xaa,0x4d }, { 0xdf,0xe4,0x96,0x04 },
+ { 0xe3,0x9e,0xd1,0xb5 }, { 0x1b,0x4c,0x6a,0x88 },
+ { 0xb8,0xc1,0x2c,0x1f }, { 0x7f,0x46,0x65,0x51 },
+ { 0x04,0x9d,0x5e,0xea }, { 0x5d,0x01,0x8c,0x35 },
+ { 0x73,0xfa,0x87,0x74 }, { 0x2e,0xfb,0x0b,0x41 },
+ { 0x5a,0xb3,0x67,0x1d }, { 0x52,0x92,0xdb,0xd2 },
+ { 0x33,0xe9,0x10,0x56 }, { 0x13,0x6d,0xd6,0x47 },
+ { 0x8c,0x9a,0xd7,0x61 }, { 0x7a,0x37,0xa1,0x0c },
+ { 0x8e,0x59,0xf8,0x14 }, { 0x89,0xeb,0x13,0x3c },
+ { 0xee,0xce,0xa9,0x27 }, { 0x35,0xb7,0x61,0xc9 },
+ { 0xed,0xe1,0x1c,0xe5 }, { 0x3c,0x7a,0x47,0xb1 },
+ { 0x59,0x9c,0xd2,0xdf }, { 0x3f,0x55,0xf2,0x73 },
+ { 0x79,0x18,0x14,0xce }, { 0xbf,0x73,0xc7,0x37 },
+ { 0xea,0x53,0xf7,0xcd }, { 0x5b,0x5f,0xfd,0xaa },
+ { 0x14,0xdf,0x3d,0x6f }, { 0x86,0x78,0x44,0xdb },
+ { 0x81,0xca,0xaf,0xf3 }, { 0x3e,0xb9,0x68,0xc4 },
+ { 0x2c,0x38,0x24,0x34 }, { 0x5f,0xc2,0xa3,0x40 },
+ { 0x72,0x16,0x1d,0xc3 }, { 0x0c,0xbc,0xe2,0x25 },
+ { 0x8b,0x28,0x3c,0x49 }, { 0x41,0xff,0x0d,0x95 },
+ { 0x71,0x39,0xa8,0x01 }, { 0xde,0x08,0x0c,0xb3 },
+ { 0x9c,0xd8,0xb4,0xe4 }, { 0x90,0x64,0x56,0xc1 },
+ { 0x61,0x7b,0xcb,0x84 }, { 0x70,0xd5,0x32,0xb6 },
+ { 0x74,0x48,0x6c,0x5c }, { 0x42,0xd0,0xb8,0x57 }
+ };
+
+static const unsigned char T7[256][4] =
+ {
+ { 0xa7,0x50,0x51,0xf4 }, { 0x65,0x53,0x7e,0x41 },
+ { 0xa4,0xc3,0x1a,0x17 }, { 0x5e,0x96,0x3a,0x27 },
+ { 0x6b,0xcb,0x3b,0xab }, { 0x45,0xf1,0x1f,0x9d },
+ { 0x58,0xab,0xac,0xfa }, { 0x03,0x93,0x4b,0xe3 },
+ { 0xfa,0x55,0x20,0x30 }, { 0x6d,0xf6,0xad,0x76 },
+ { 0x76,0x91,0x88,0xcc }, { 0x4c,0x25,0xf5,0x02 },
+ { 0xd7,0xfc,0x4f,0xe5 }, { 0xcb,0xd7,0xc5,0x2a },
+ { 0x44,0x80,0x26,0x35 }, { 0xa3,0x8f,0xb5,0x62 },
+ { 0x5a,0x49,0xde,0xb1 }, { 0x1b,0x67,0x25,0xba },
+ { 0x0e,0x98,0x45,0xea }, { 0xc0,0xe1,0x5d,0xfe },
+ { 0x75,0x02,0xc3,0x2f }, { 0xf0,0x12,0x81,0x4c },
+ { 0x97,0xa3,0x8d,0x46 }, { 0xf9,0xc6,0x6b,0xd3 },
+ { 0x5f,0xe7,0x03,0x8f }, { 0x9c,0x95,0x15,0x92 },
+ { 0x7a,0xeb,0xbf,0x6d }, { 0x59,0xda,0x95,0x52 },
+ { 0x83,0x2d,0xd4,0xbe }, { 0x21,0xd3,0x58,0x74 },
+ { 0x69,0x29,0x49,0xe0 }, { 0xc8,0x44,0x8e,0xc9 },
+ { 0x89,0x6a,0x75,0xc2 }, { 0x79,0x78,0xf4,0x8e },
+ { 0x3e,0x6b,0x99,0x58 }, { 0x71,0xdd,0x27,0xb9 },
+ { 0x4f,0xb6,0xbe,0xe1 }, { 0xad,0x17,0xf0,0x88 },
+ { 0xac,0x66,0xc9,0x20 }, { 0x3a,0xb4,0x7d,0xce },
+ { 0x4a,0x18,0x63,0xdf }, { 0x31,0x82,0xe5,0x1a },
+ { 0x33,0x60,0x97,0x51 }, { 0x7f,0x45,0x62,0x53 },
+ { 0x77,0xe0,0xb1,0x64 }, { 0xae,0x84,0xbb,0x6b },
+ { 0xa0,0x1c,0xfe,0x81 }, { 0x2b,0x94,0xf9,0x08 },
+ { 0x68,0x58,0x70,0x48 }, { 0xfd,0x19,0x8f,0x45 },
+ { 0x6c,0x87,0x94,0xde }, { 0xf8,0xb7,0x52,0x7b },
+ { 0xd3,0x23,0xab,0x73 }, { 0x02,0xe2,0x72,0x4b },
+ { 0x8f,0x57,0xe3,0x1f }, { 0xab,0x2a,0x66,0x55 },
+ { 0x28,0x07,0xb2,0xeb }, { 0xc2,0x03,0x2f,0xb5 },
+ { 0x7b,0x9a,0x86,0xc5 }, { 0x08,0xa5,0xd3,0x37 },
+ { 0x87,0xf2,0x30,0x28 }, { 0xa5,0xb2,0x23,0xbf },
+ { 0x6a,0xba,0x02,0x03 }, { 0x82,0x5c,0xed,0x16 },
+ { 0x1c,0x2b,0x8a,0xcf }, { 0xb4,0x92,0xa7,0x79 },
+ { 0xf2,0xf0,0xf3,0x07 }, { 0xe2,0xa1,0x4e,0x69 },
+ { 0xf4,0xcd,0x65,0xda }, { 0xbe,0xd5,0x06,0x05 },
+ { 0x62,0x1f,0xd1,0x34 }, { 0xfe,0x8a,0xc4,0xa6 },
+ { 0x53,0x9d,0x34,0x2e }, { 0x55,0xa0,0xa2,0xf3 },
+ { 0xe1,0x32,0x05,0x8a }, { 0xeb,0x75,0xa4,0xf6 },
+ { 0xec,0x39,0x0b,0x83 }, { 0xef,0xaa,0x40,0x60 },
+ { 0x9f,0x06,0x5e,0x71 }, { 0x10,0x51,0xbd,0x6e },
+ { 0x8a,0xf9,0x3e,0x21 }, { 0x06,0x3d,0x96,0xdd },
+ { 0x05,0xae,0xdd,0x3e }, { 0xbd,0x46,0x4d,0xe6 },
+ { 0x8d,0xb5,0x91,0x54 }, { 0x5d,0x05,0x71,0xc4 },
+ { 0xd4,0x6f,0x04,0x06 }, { 0x15,0xff,0x60,0x50 },
+ { 0xfb,0x24,0x19,0x98 }, { 0xe9,0x97,0xd6,0xbd },
+ { 0x43,0xcc,0x89,0x40 }, { 0x9e,0x77,0x67,0xd9 },
+ { 0x42,0xbd,0xb0,0xe8 }, { 0x8b,0x88,0x07,0x89 },
+ { 0x5b,0x38,0xe7,0x19 }, { 0xee,0xdb,0x79,0xc8 },
+ { 0x0a,0x47,0xa1,0x7c }, { 0x0f,0xe9,0x7c,0x42 },
+ { 0x1e,0xc9,0xf8,0x84 }, { 0x00,0x00,0x00,0x00 },
+ { 0x86,0x83,0x09,0x80 }, { 0xed,0x48,0x32,0x2b },
+ { 0x70,0xac,0x1e,0x11 }, { 0x72,0x4e,0x6c,0x5a },
+ { 0xff,0xfb,0xfd,0x0e }, { 0x38,0x56,0x0f,0x85 },
+ { 0xd5,0x1e,0x3d,0xae }, { 0x39,0x27,0x36,0x2d },
+ { 0xd9,0x64,0x0a,0x0f }, { 0xa6,0x21,0x68,0x5c },
+ { 0x54,0xd1,0x9b,0x5b }, { 0x2e,0x3a,0x24,0x36 },
+ { 0x67,0xb1,0x0c,0x0a }, { 0xe7,0x0f,0x93,0x57 },
+ { 0x96,0xd2,0xb4,0xee }, { 0x91,0x9e,0x1b,0x9b },
+ { 0xc5,0x4f,0x80,0xc0 }, { 0x20,0xa2,0x61,0xdc },
+ { 0x4b,0x69,0x5a,0x77 }, { 0x1a,0x16,0x1c,0x12 },
+ { 0xba,0x0a,0xe2,0x93 }, { 0x2a,0xe5,0xc0,0xa0 },
+ { 0xe0,0x43,0x3c,0x22 }, { 0x17,0x1d,0x12,0x1b },
+ { 0x0d,0x0b,0x0e,0x09 }, { 0xc7,0xad,0xf2,0x8b },
+ { 0xa8,0xb9,0x2d,0xb6 }, { 0xa9,0xc8,0x14,0x1e },
+ { 0x19,0x85,0x57,0xf1 }, { 0x07,0x4c,0xaf,0x75 },
+ { 0xdd,0xbb,0xee,0x99 }, { 0x60,0xfd,0xa3,0x7f },
+ { 0x26,0x9f,0xf7,0x01 }, { 0xf5,0xbc,0x5c,0x72 },
+ { 0x3b,0xc5,0x44,0x66 }, { 0x7e,0x34,0x5b,0xfb },
+ { 0x29,0x76,0x8b,0x43 }, { 0xc6,0xdc,0xcb,0x23 },
+ { 0xfc,0x68,0xb6,0xed }, { 0xf1,0x63,0xb8,0xe4 },
+ { 0xdc,0xca,0xd7,0x31 }, { 0x85,0x10,0x42,0x63 },
+ { 0x22,0x40,0x13,0x97 }, { 0x11,0x20,0x84,0xc6 },
+ { 0x24,0x7d,0x85,0x4a }, { 0x3d,0xf8,0xd2,0xbb },
+ { 0x32,0x11,0xae,0xf9 }, { 0xa1,0x6d,0xc7,0x29 },
+ { 0x2f,0x4b,0x1d,0x9e }, { 0x30,0xf3,0xdc,0xb2 },
+ { 0x52,0xec,0x0d,0x86 }, { 0xe3,0xd0,0x77,0xc1 },
+ { 0x16,0x6c,0x2b,0xb3 }, { 0xb9,0x99,0xa9,0x70 },
+ { 0x48,0xfa,0x11,0x94 }, { 0x64,0x22,0x47,0xe9 },
+ { 0x8c,0xc4,0xa8,0xfc }, { 0x3f,0x1a,0xa0,0xf0 },
+ { 0x2c,0xd8,0x56,0x7d }, { 0x90,0xef,0x22,0x33 },
+ { 0x4e,0xc7,0x87,0x49 }, { 0xd1,0xc1,0xd9,0x38 },
+ { 0xa2,0xfe,0x8c,0xca }, { 0x0b,0x36,0x98,0xd4 },
+ { 0x81,0xcf,0xa6,0xf5 }, { 0xde,0x28,0xa5,0x7a },
+ { 0x8e,0x26,0xda,0xb7 }, { 0xbf,0xa4,0x3f,0xad },
+ { 0x9d,0xe4,0x2c,0x3a }, { 0x92,0x0d,0x50,0x78 },
+ { 0xcc,0x9b,0x6a,0x5f }, { 0x46,0x62,0x54,0x7e },
+ { 0x13,0xc2,0xf6,0x8d }, { 0xb8,0xe8,0x90,0xd8 },
+ { 0xf7,0x5e,0x2e,0x39 }, { 0xaf,0xf5,0x82,0xc3 },
+ { 0x80,0xbe,0x9f,0x5d }, { 0x93,0x7c,0x69,0xd0 },
+ { 0x2d,0xa9,0x6f,0xd5 }, { 0x12,0xb3,0xcf,0x25 },
+ { 0x99,0x3b,0xc8,0xac }, { 0x7d,0xa7,0x10,0x18 },
+ { 0x63,0x6e,0xe8,0x9c }, { 0xbb,0x7b,0xdb,0x3b },
+ { 0x78,0x09,0xcd,0x26 }, { 0x18,0xf4,0x6e,0x59 },
+ { 0xb7,0x01,0xec,0x9a }, { 0x9a,0xa8,0x83,0x4f },
+ { 0x6e,0x65,0xe6,0x95 }, { 0xe6,0x7e,0xaa,0xff },
+ { 0xcf,0x08,0x21,0xbc }, { 0xe8,0xe6,0xef,0x15 },
+ { 0x9b,0xd9,0xba,0xe7 }, { 0x36,0xce,0x4a,0x6f },
+ { 0x09,0xd4,0xea,0x9f }, { 0x7c,0xd6,0x29,0xb0 },
+ { 0xb2,0xaf,0x31,0xa4 }, { 0x23,0x31,0x2a,0x3f },
+ { 0x94,0x30,0xc6,0xa5 }, { 0x66,0xc0,0x35,0xa2 },
+ { 0xbc,0x37,0x74,0x4e }, { 0xca,0xa6,0xfc,0x82 },
+ { 0xd0,0xb0,0xe0,0x90 }, { 0xd8,0x15,0x33,0xa7 },
+ { 0x98,0x4a,0xf1,0x04 }, { 0xda,0xf7,0x41,0xec },
+ { 0x50,0x0e,0x7f,0xcd }, { 0xf6,0x2f,0x17,0x91 },
+ { 0xd6,0x8d,0x76,0x4d }, { 0xb0,0x4d,0x43,0xef },
+ { 0x4d,0x54,0xcc,0xaa }, { 0x04,0xdf,0xe4,0x96 },
+ { 0xb5,0xe3,0x9e,0xd1 }, { 0x88,0x1b,0x4c,0x6a },
+ { 0x1f,0xb8,0xc1,0x2c }, { 0x51,0x7f,0x46,0x65 },
+ { 0xea,0x04,0x9d,0x5e }, { 0x35,0x5d,0x01,0x8c },
+ { 0x74,0x73,0xfa,0x87 }, { 0x41,0x2e,0xfb,0x0b },
+ { 0x1d,0x5a,0xb3,0x67 }, { 0xd2,0x52,0x92,0xdb },
+ { 0x56,0x33,0xe9,0x10 }, { 0x47,0x13,0x6d,0xd6 },
+ { 0x61,0x8c,0x9a,0xd7 }, { 0x0c,0x7a,0x37,0xa1 },
+ { 0x14,0x8e,0x59,0xf8 }, { 0x3c,0x89,0xeb,0x13 },
+ { 0x27,0xee,0xce,0xa9 }, { 0xc9,0x35,0xb7,0x61 },
+ { 0xe5,0xed,0xe1,0x1c }, { 0xb1,0x3c,0x7a,0x47 },
+ { 0xdf,0x59,0x9c,0xd2 }, { 0x73,0x3f,0x55,0xf2 },
+ { 0xce,0x79,0x18,0x14 }, { 0x37,0xbf,0x73,0xc7 },
+ { 0xcd,0xea,0x53,0xf7 }, { 0xaa,0x5b,0x5f,0xfd },
+ { 0x6f,0x14,0xdf,0x3d }, { 0xdb,0x86,0x78,0x44 },
+ { 0xf3,0x81,0xca,0xaf }, { 0xc4,0x3e,0xb9,0x68 },
+ { 0x34,0x2c,0x38,0x24 }, { 0x40,0x5f,0xc2,0xa3 },
+ { 0xc3,0x72,0x16,0x1d }, { 0x25,0x0c,0xbc,0xe2 },
+ { 0x49,0x8b,0x28,0x3c }, { 0x95,0x41,0xff,0x0d },
+ { 0x01,0x71,0x39,0xa8 }, { 0xb3,0xde,0x08,0x0c },
+ { 0xe4,0x9c,0xd8,0xb4 }, { 0xc1,0x90,0x64,0x56 },
+ { 0x84,0x61,0x7b,0xcb }, { 0xb6,0x70,0xd5,0x32 },
+ { 0x5c,0x74,0x48,0x6c }, { 0x57,0x42,0xd0,0xb8 }
+ };
+
+static const unsigned char T8[256][4] =
+ {
+ { 0xf4,0xa7,0x50,0x51 }, { 0x41,0x65,0x53,0x7e },
+ { 0x17,0xa4,0xc3,0x1a }, { 0x27,0x5e,0x96,0x3a },
+ { 0xab,0x6b,0xcb,0x3b }, { 0x9d,0x45,0xf1,0x1f },
+ { 0xfa,0x58,0xab,0xac }, { 0xe3,0x03,0x93,0x4b },
+ { 0x30,0xfa,0x55,0x20 }, { 0x76,0x6d,0xf6,0xad },
+ { 0xcc,0x76,0x91,0x88 }, { 0x02,0x4c,0x25,0xf5 },
+ { 0xe5,0xd7,0xfc,0x4f }, { 0x2a,0xcb,0xd7,0xc5 },
+ { 0x35,0x44,0x80,0x26 }, { 0x62,0xa3,0x8f,0xb5 },
+ { 0xb1,0x5a,0x49,0xde }, { 0xba,0x1b,0x67,0x25 },
+ { 0xea,0x0e,0x98,0x45 }, { 0xfe,0xc0,0xe1,0x5d },
+ { 0x2f,0x75,0x02,0xc3 }, { 0x4c,0xf0,0x12,0x81 },
+ { 0x46,0x97,0xa3,0x8d }, { 0xd3,0xf9,0xc6,0x6b },
+ { 0x8f,0x5f,0xe7,0x03 }, { 0x92,0x9c,0x95,0x15 },
+ { 0x6d,0x7a,0xeb,0xbf }, { 0x52,0x59,0xda,0x95 },
+ { 0xbe,0x83,0x2d,0xd4 }, { 0x74,0x21,0xd3,0x58 },
+ { 0xe0,0x69,0x29,0x49 }, { 0xc9,0xc8,0x44,0x8e },
+ { 0xc2,0x89,0x6a,0x75 }, { 0x8e,0x79,0x78,0xf4 },
+ { 0x58,0x3e,0x6b,0x99 }, { 0xb9,0x71,0xdd,0x27 },
+ { 0xe1,0x4f,0xb6,0xbe }, { 0x88,0xad,0x17,0xf0 },
+ { 0x20,0xac,0x66,0xc9 }, { 0xce,0x3a,0xb4,0x7d },
+ { 0xdf,0x4a,0x18,0x63 }, { 0x1a,0x31,0x82,0xe5 },
+ { 0x51,0x33,0x60,0x97 }, { 0x53,0x7f,0x45,0x62 },
+ { 0x64,0x77,0xe0,0xb1 }, { 0x6b,0xae,0x84,0xbb },
+ { 0x81,0xa0,0x1c,0xfe }, { 0x08,0x2b,0x94,0xf9 },
+ { 0x48,0x68,0x58,0x70 }, { 0x45,0xfd,0x19,0x8f },
+ { 0xde,0x6c,0x87,0x94 }, { 0x7b,0xf8,0xb7,0x52 },
+ { 0x73,0xd3,0x23,0xab }, { 0x4b,0x02,0xe2,0x72 },
+ { 0x1f,0x8f,0x57,0xe3 }, { 0x55,0xab,0x2a,0x66 },
+ { 0xeb,0x28,0x07,0xb2 }, { 0xb5,0xc2,0x03,0x2f },
+ { 0xc5,0x7b,0x9a,0x86 }, { 0x37,0x08,0xa5,0xd3 },
+ { 0x28,0x87,0xf2,0x30 }, { 0xbf,0xa5,0xb2,0x23 },
+ { 0x03,0x6a,0xba,0x02 }, { 0x16,0x82,0x5c,0xed },
+ { 0xcf,0x1c,0x2b,0x8a }, { 0x79,0xb4,0x92,0xa7 },
+ { 0x07,0xf2,0xf0,0xf3 }, { 0x69,0xe2,0xa1,0x4e },
+ { 0xda,0xf4,0xcd,0x65 }, { 0x05,0xbe,0xd5,0x06 },
+ { 0x34,0x62,0x1f,0xd1 }, { 0xa6,0xfe,0x8a,0xc4 },
+ { 0x2e,0x53,0x9d,0x34 }, { 0xf3,0x55,0xa0,0xa2 },
+ { 0x8a,0xe1,0x32,0x05 }, { 0xf6,0xeb,0x75,0xa4 },
+ { 0x83,0xec,0x39,0x0b }, { 0x60,0xef,0xaa,0x40 },
+ { 0x71,0x9f,0x06,0x5e }, { 0x6e,0x10,0x51,0xbd },
+ { 0x21,0x8a,0xf9,0x3e }, { 0xdd,0x06,0x3d,0x96 },
+ { 0x3e,0x05,0xae,0xdd }, { 0xe6,0xbd,0x46,0x4d },
+ { 0x54,0x8d,0xb5,0x91 }, { 0xc4,0x5d,0x05,0x71 },
+ { 0x06,0xd4,0x6f,0x04 }, { 0x50,0x15,0xff,0x60 },
+ { 0x98,0xfb,0x24,0x19 }, { 0xbd,0xe9,0x97,0xd6 },
+ { 0x40,0x43,0xcc,0x89 }, { 0xd9,0x9e,0x77,0x67 },
+ { 0xe8,0x42,0xbd,0xb0 }, { 0x89,0x8b,0x88,0x07 },
+ { 0x19,0x5b,0x38,0xe7 }, { 0xc8,0xee,0xdb,0x79 },
+ { 0x7c,0x0a,0x47,0xa1 }, { 0x42,0x0f,0xe9,0x7c },
+ { 0x84,0x1e,0xc9,0xf8 }, { 0x00,0x00,0x00,0x00 },
+ { 0x80,0x86,0x83,0x09 }, { 0x2b,0xed,0x48,0x32 },
+ { 0x11,0x70,0xac,0x1e }, { 0x5a,0x72,0x4e,0x6c },
+ { 0x0e,0xff,0xfb,0xfd }, { 0x85,0x38,0x56,0x0f },
+ { 0xae,0xd5,0x1e,0x3d }, { 0x2d,0x39,0x27,0x36 },
+ { 0x0f,0xd9,0x64,0x0a }, { 0x5c,0xa6,0x21,0x68 },
+ { 0x5b,0x54,0xd1,0x9b }, { 0x36,0x2e,0x3a,0x24 },
+ { 0x0a,0x67,0xb1,0x0c }, { 0x57,0xe7,0x0f,0x93 },
+ { 0xee,0x96,0xd2,0xb4 }, { 0x9b,0x91,0x9e,0x1b },
+ { 0xc0,0xc5,0x4f,0x80 }, { 0xdc,0x20,0xa2,0x61 },
+ { 0x77,0x4b,0x69,0x5a }, { 0x12,0x1a,0x16,0x1c },
+ { 0x93,0xba,0x0a,0xe2 }, { 0xa0,0x2a,0xe5,0xc0 },
+ { 0x22,0xe0,0x43,0x3c }, { 0x1b,0x17,0x1d,0x12 },
+ { 0x09,0x0d,0x0b,0x0e }, { 0x8b,0xc7,0xad,0xf2 },
+ { 0xb6,0xa8,0xb9,0x2d }, { 0x1e,0xa9,0xc8,0x14 },
+ { 0xf1,0x19,0x85,0x57 }, { 0x75,0x07,0x4c,0xaf },
+ { 0x99,0xdd,0xbb,0xee }, { 0x7f,0x60,0xfd,0xa3 },
+ { 0x01,0x26,0x9f,0xf7 }, { 0x72,0xf5,0xbc,0x5c },
+ { 0x66,0x3b,0xc5,0x44 }, { 0xfb,0x7e,0x34,0x5b },
+ { 0x43,0x29,0x76,0x8b }, { 0x23,0xc6,0xdc,0xcb },
+ { 0xed,0xfc,0x68,0xb6 }, { 0xe4,0xf1,0x63,0xb8 },
+ { 0x31,0xdc,0xca,0xd7 }, { 0x63,0x85,0x10,0x42 },
+ { 0x97,0x22,0x40,0x13 }, { 0xc6,0x11,0x20,0x84 },
+ { 0x4a,0x24,0x7d,0x85 }, { 0xbb,0x3d,0xf8,0xd2 },
+ { 0xf9,0x32,0x11,0xae }, { 0x29,0xa1,0x6d,0xc7 },
+ { 0x9e,0x2f,0x4b,0x1d }, { 0xb2,0x30,0xf3,0xdc },
+ { 0x86,0x52,0xec,0x0d }, { 0xc1,0xe3,0xd0,0x77 },
+ { 0xb3,0x16,0x6c,0x2b }, { 0x70,0xb9,0x99,0xa9 },
+ { 0x94,0x48,0xfa,0x11 }, { 0xe9,0x64,0x22,0x47 },
+ { 0xfc,0x8c,0xc4,0xa8 }, { 0xf0,0x3f,0x1a,0xa0 },
+ { 0x7d,0x2c,0xd8,0x56 }, { 0x33,0x90,0xef,0x22 },
+ { 0x49,0x4e,0xc7,0x87 }, { 0x38,0xd1,0xc1,0xd9 },
+ { 0xca,0xa2,0xfe,0x8c }, { 0xd4,0x0b,0x36,0x98 },
+ { 0xf5,0x81,0xcf,0xa6 }, { 0x7a,0xde,0x28,0xa5 },
+ { 0xb7,0x8e,0x26,0xda }, { 0xad,0xbf,0xa4,0x3f },
+ { 0x3a,0x9d,0xe4,0x2c }, { 0x78,0x92,0x0d,0x50 },
+ { 0x5f,0xcc,0x9b,0x6a }, { 0x7e,0x46,0x62,0x54 },
+ { 0x8d,0x13,0xc2,0xf6 }, { 0xd8,0xb8,0xe8,0x90 },
+ { 0x39,0xf7,0x5e,0x2e }, { 0xc3,0xaf,0xf5,0x82 },
+ { 0x5d,0x80,0xbe,0x9f }, { 0xd0,0x93,0x7c,0x69 },
+ { 0xd5,0x2d,0xa9,0x6f }, { 0x25,0x12,0xb3,0xcf },
+ { 0xac,0x99,0x3b,0xc8 }, { 0x18,0x7d,0xa7,0x10 },
+ { 0x9c,0x63,0x6e,0xe8 }, { 0x3b,0xbb,0x7b,0xdb },
+ { 0x26,0x78,0x09,0xcd }, { 0x59,0x18,0xf4,0x6e },
+ { 0x9a,0xb7,0x01,0xec }, { 0x4f,0x9a,0xa8,0x83 },
+ { 0x95,0x6e,0x65,0xe6 }, { 0xff,0xe6,0x7e,0xaa },
+ { 0xbc,0xcf,0x08,0x21 }, { 0x15,0xe8,0xe6,0xef },
+ { 0xe7,0x9b,0xd9,0xba }, { 0x6f,0x36,0xce,0x4a },
+ { 0x9f,0x09,0xd4,0xea }, { 0xb0,0x7c,0xd6,0x29 },
+ { 0xa4,0xb2,0xaf,0x31 }, { 0x3f,0x23,0x31,0x2a },
+ { 0xa5,0x94,0x30,0xc6 }, { 0xa2,0x66,0xc0,0x35 },
+ { 0x4e,0xbc,0x37,0x74 }, { 0x82,0xca,0xa6,0xfc },
+ { 0x90,0xd0,0xb0,0xe0 }, { 0xa7,0xd8,0x15,0x33 },
+ { 0x04,0x98,0x4a,0xf1 }, { 0xec,0xda,0xf7,0x41 },
+ { 0xcd,0x50,0x0e,0x7f }, { 0x91,0xf6,0x2f,0x17 },
+ { 0x4d,0xd6,0x8d,0x76 }, { 0xef,0xb0,0x4d,0x43 },
+ { 0xaa,0x4d,0x54,0xcc }, { 0x96,0x04,0xdf,0xe4 },
+ { 0xd1,0xb5,0xe3,0x9e }, { 0x6a,0x88,0x1b,0x4c },
+ { 0x2c,0x1f,0xb8,0xc1 }, { 0x65,0x51,0x7f,0x46 },
+ { 0x5e,0xea,0x04,0x9d }, { 0x8c,0x35,0x5d,0x01 },
+ { 0x87,0x74,0x73,0xfa }, { 0x0b,0x41,0x2e,0xfb },
+ { 0x67,0x1d,0x5a,0xb3 }, { 0xdb,0xd2,0x52,0x92 },
+ { 0x10,0x56,0x33,0xe9 }, { 0xd6,0x47,0x13,0x6d },
+ { 0xd7,0x61,0x8c,0x9a }, { 0xa1,0x0c,0x7a,0x37 },
+ { 0xf8,0x14,0x8e,0x59 }, { 0x13,0x3c,0x89,0xeb },
+ { 0xa9,0x27,0xee,0xce }, { 0x61,0xc9,0x35,0xb7 },
+ { 0x1c,0xe5,0xed,0xe1 }, { 0x47,0xb1,0x3c,0x7a },
+ { 0xd2,0xdf,0x59,0x9c }, { 0xf2,0x73,0x3f,0x55 },
+ { 0x14,0xce,0x79,0x18 }, { 0xc7,0x37,0xbf,0x73 },
+ { 0xf7,0xcd,0xea,0x53 }, { 0xfd,0xaa,0x5b,0x5f },
+ { 0x3d,0x6f,0x14,0xdf }, { 0x44,0xdb,0x86,0x78 },
+ { 0xaf,0xf3,0x81,0xca }, { 0x68,0xc4,0x3e,0xb9 },
+ { 0x24,0x34,0x2c,0x38 }, { 0xa3,0x40,0x5f,0xc2 },
+ { 0x1d,0xc3,0x72,0x16 }, { 0xe2,0x25,0x0c,0xbc },
+ { 0x3c,0x49,0x8b,0x28 }, { 0x0d,0x95,0x41,0xff },
+ { 0xa8,0x01,0x71,0x39 }, { 0x0c,0xb3,0xde,0x08 },
+ { 0xb4,0xe4,0x9c,0xd8 }, { 0x56,0xc1,0x90,0x64 },
+ { 0xcb,0x84,0x61,0x7b }, { 0x32,0xb6,0x70,0xd5 },
+ { 0x6c,0x5c,0x74,0x48 }, { 0xb8,0x57,0x42,0xd0 }
+ };
+
+static const unsigned char S5[256] =
+ {
+ 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38,
+ 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb,
+ 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87,
+ 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb,
+ 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d,
+ 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e,
+ 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2,
+ 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25,
+ 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16,
+ 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92,
+ 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda,
+ 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84,
+ 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a,
+ 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06,
+ 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02,
+ 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b,
+ 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea,
+ 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73,
+ 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85,
+ 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e,
+ 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89,
+ 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b,
+ 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20,
+ 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4,
+ 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31,
+ 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f,
+ 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d,
+ 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef,
+ 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0,
+ 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61,
+ 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26,
+ 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+ };
+
+static const unsigned char U1[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x0e,0x09,0x0d,0x0b },
+ { 0x1c,0x12,0x1a,0x16 }, { 0x12,0x1b,0x17,0x1d },
+ { 0x38,0x24,0x34,0x2c }, { 0x36,0x2d,0x39,0x27 },
+ { 0x24,0x36,0x2e,0x3a }, { 0x2a,0x3f,0x23,0x31 },
+ { 0x70,0x48,0x68,0x58 }, { 0x7e,0x41,0x65,0x53 },
+ { 0x6c,0x5a,0x72,0x4e }, { 0x62,0x53,0x7f,0x45 },
+ { 0x48,0x6c,0x5c,0x74 }, { 0x46,0x65,0x51,0x7f },
+ { 0x54,0x7e,0x46,0x62 }, { 0x5a,0x77,0x4b,0x69 },
+ { 0xe0,0x90,0xd0,0xb0 }, { 0xee,0x99,0xdd,0xbb },
+ { 0xfc,0x82,0xca,0xa6 }, { 0xf2,0x8b,0xc7,0xad },
+ { 0xd8,0xb4,0xe4,0x9c }, { 0xd6,0xbd,0xe9,0x97 },
+ { 0xc4,0xa6,0xfe,0x8a }, { 0xca,0xaf,0xf3,0x81 },
+ { 0x90,0xd8,0xb8,0xe8 }, { 0x9e,0xd1,0xb5,0xe3 },
+ { 0x8c,0xca,0xa2,0xfe }, { 0x82,0xc3,0xaf,0xf5 },
+ { 0xa8,0xfc,0x8c,0xc4 }, { 0xa6,0xf5,0x81,0xcf },
+ { 0xb4,0xee,0x96,0xd2 }, { 0xba,0xe7,0x9b,0xd9 },
+ { 0xdb,0x3b,0xbb,0x7b }, { 0xd5,0x32,0xb6,0x70 },
+ { 0xc7,0x29,0xa1,0x6d }, { 0xc9,0x20,0xac,0x66 },
+ { 0xe3,0x1f,0x8f,0x57 }, { 0xed,0x16,0x82,0x5c },
+ { 0xff,0x0d,0x95,0x41 }, { 0xf1,0x04,0x98,0x4a },
+ { 0xab,0x73,0xd3,0x23 }, { 0xa5,0x7a,0xde,0x28 },
+ { 0xb7,0x61,0xc9,0x35 }, { 0xb9,0x68,0xc4,0x3e },
+ { 0x93,0x57,0xe7,0x0f }, { 0x9d,0x5e,0xea,0x04 },
+ { 0x8f,0x45,0xfd,0x19 }, { 0x81,0x4c,0xf0,0x12 },
+ { 0x3b,0xab,0x6b,0xcb }, { 0x35,0xa2,0x66,0xc0 },
+ { 0x27,0xb9,0x71,0xdd }, { 0x29,0xb0,0x7c,0xd6 },
+ { 0x03,0x8f,0x5f,0xe7 }, { 0x0d,0x86,0x52,0xec },
+ { 0x1f,0x9d,0x45,0xf1 }, { 0x11,0x94,0x48,0xfa },
+ { 0x4b,0xe3,0x03,0x93 }, { 0x45,0xea,0x0e,0x98 },
+ { 0x57,0xf1,0x19,0x85 }, { 0x59,0xf8,0x14,0x8e },
+ { 0x73,0xc7,0x37,0xbf }, { 0x7d,0xce,0x3a,0xb4 },
+ { 0x6f,0xd5,0x2d,0xa9 }, { 0x61,0xdc,0x20,0xa2 },
+ { 0xad,0x76,0x6d,0xf6 }, { 0xa3,0x7f,0x60,0xfd },
+ { 0xb1,0x64,0x77,0xe0 }, { 0xbf,0x6d,0x7a,0xeb },
+ { 0x95,0x52,0x59,0xda }, { 0x9b,0x5b,0x54,0xd1 },
+ { 0x89,0x40,0x43,0xcc }, { 0x87,0x49,0x4e,0xc7 },
+ { 0xdd,0x3e,0x05,0xae }, { 0xd3,0x37,0x08,0xa5 },
+ { 0xc1,0x2c,0x1f,0xb8 }, { 0xcf,0x25,0x12,0xb3 },
+ { 0xe5,0x1a,0x31,0x82 }, { 0xeb,0x13,0x3c,0x89 },
+ { 0xf9,0x08,0x2b,0x94 }, { 0xf7,0x01,0x26,0x9f },
+ { 0x4d,0xe6,0xbd,0x46 }, { 0x43,0xef,0xb0,0x4d },
+ { 0x51,0xf4,0xa7,0x50 }, { 0x5f,0xfd,0xaa,0x5b },
+ { 0x75,0xc2,0x89,0x6a }, { 0x7b,0xcb,0x84,0x61 },
+ { 0x69,0xd0,0x93,0x7c }, { 0x67,0xd9,0x9e,0x77 },
+ { 0x3d,0xae,0xd5,0x1e }, { 0x33,0xa7,0xd8,0x15 },
+ { 0x21,0xbc,0xcf,0x08 }, { 0x2f,0xb5,0xc2,0x03 },
+ { 0x05,0x8a,0xe1,0x32 }, { 0x0b,0x83,0xec,0x39 },
+ { 0x19,0x98,0xfb,0x24 }, { 0x17,0x91,0xf6,0x2f },
+ { 0x76,0x4d,0xd6,0x8d }, { 0x78,0x44,0xdb,0x86 },
+ { 0x6a,0x5f,0xcc,0x9b }, { 0x64,0x56,0xc1,0x90 },
+ { 0x4e,0x69,0xe2,0xa1 }, { 0x40,0x60,0xef,0xaa },
+ { 0x52,0x7b,0xf8,0xb7 }, { 0x5c,0x72,0xf5,0xbc },
+ { 0x06,0x05,0xbe,0xd5 }, { 0x08,0x0c,0xb3,0xde },
+ { 0x1a,0x17,0xa4,0xc3 }, { 0x14,0x1e,0xa9,0xc8 },
+ { 0x3e,0x21,0x8a,0xf9 }, { 0x30,0x28,0x87,0xf2 },
+ { 0x22,0x33,0x90,0xef }, { 0x2c,0x3a,0x9d,0xe4 },
+ { 0x96,0xdd,0x06,0x3d }, { 0x98,0xd4,0x0b,0x36 },
+ { 0x8a,0xcf,0x1c,0x2b }, { 0x84,0xc6,0x11,0x20 },
+ { 0xae,0xf9,0x32,0x11 }, { 0xa0,0xf0,0x3f,0x1a },
+ { 0xb2,0xeb,0x28,0x07 }, { 0xbc,0xe2,0x25,0x0c },
+ { 0xe6,0x95,0x6e,0x65 }, { 0xe8,0x9c,0x63,0x6e },
+ { 0xfa,0x87,0x74,0x73 }, { 0xf4,0x8e,0x79,0x78 },
+ { 0xde,0xb1,0x5a,0x49 }, { 0xd0,0xb8,0x57,0x42 },
+ { 0xc2,0xa3,0x40,0x5f }, { 0xcc,0xaa,0x4d,0x54 },
+ { 0x41,0xec,0xda,0xf7 }, { 0x4f,0xe5,0xd7,0xfc },
+ { 0x5d,0xfe,0xc0,0xe1 }, { 0x53,0xf7,0xcd,0xea },
+ { 0x79,0xc8,0xee,0xdb }, { 0x77,0xc1,0xe3,0xd0 },
+ { 0x65,0xda,0xf4,0xcd }, { 0x6b,0xd3,0xf9,0xc6 },
+ { 0x31,0xa4,0xb2,0xaf }, { 0x3f,0xad,0xbf,0xa4 },
+ { 0x2d,0xb6,0xa8,0xb9 }, { 0x23,0xbf,0xa5,0xb2 },
+ { 0x09,0x80,0x86,0x83 }, { 0x07,0x89,0x8b,0x88 },
+ { 0x15,0x92,0x9c,0x95 }, { 0x1b,0x9b,0x91,0x9e },
+ { 0xa1,0x7c,0x0a,0x47 }, { 0xaf,0x75,0x07,0x4c },
+ { 0xbd,0x6e,0x10,0x51 }, { 0xb3,0x67,0x1d,0x5a },
+ { 0x99,0x58,0x3e,0x6b }, { 0x97,0x51,0x33,0x60 },
+ { 0x85,0x4a,0x24,0x7d }, { 0x8b,0x43,0x29,0x76 },
+ { 0xd1,0x34,0x62,0x1f }, { 0xdf,0x3d,0x6f,0x14 },
+ { 0xcd,0x26,0x78,0x09 }, { 0xc3,0x2f,0x75,0x02 },
+ { 0xe9,0x10,0x56,0x33 }, { 0xe7,0x19,0x5b,0x38 },
+ { 0xf5,0x02,0x4c,0x25 }, { 0xfb,0x0b,0x41,0x2e },
+ { 0x9a,0xd7,0x61,0x8c }, { 0x94,0xde,0x6c,0x87 },
+ { 0x86,0xc5,0x7b,0x9a }, { 0x88,0xcc,0x76,0x91 },
+ { 0xa2,0xf3,0x55,0xa0 }, { 0xac,0xfa,0x58,0xab },
+ { 0xbe,0xe1,0x4f,0xb6 }, { 0xb0,0xe8,0x42,0xbd },
+ { 0xea,0x9f,0x09,0xd4 }, { 0xe4,0x96,0x04,0xdf },
+ { 0xf6,0x8d,0x13,0xc2 }, { 0xf8,0x84,0x1e,0xc9 },
+ { 0xd2,0xbb,0x3d,0xf8 }, { 0xdc,0xb2,0x30,0xf3 },
+ { 0xce,0xa9,0x27,0xee }, { 0xc0,0xa0,0x2a,0xe5 },
+ { 0x7a,0x47,0xb1,0x3c }, { 0x74,0x4e,0xbc,0x37 },
+ { 0x66,0x55,0xab,0x2a }, { 0x68,0x5c,0xa6,0x21 },
+ { 0x42,0x63,0x85,0x10 }, { 0x4c,0x6a,0x88,0x1b },
+ { 0x5e,0x71,0x9f,0x06 }, { 0x50,0x78,0x92,0x0d },
+ { 0x0a,0x0f,0xd9,0x64 }, { 0x04,0x06,0xd4,0x6f },
+ { 0x16,0x1d,0xc3,0x72 }, { 0x18,0x14,0xce,0x79 },
+ { 0x32,0x2b,0xed,0x48 }, { 0x3c,0x22,0xe0,0x43 },
+ { 0x2e,0x39,0xf7,0x5e }, { 0x20,0x30,0xfa,0x55 },
+ { 0xec,0x9a,0xb7,0x01 }, { 0xe2,0x93,0xba,0x0a },
+ { 0xf0,0x88,0xad,0x17 }, { 0xfe,0x81,0xa0,0x1c },
+ { 0xd4,0xbe,0x83,0x2d }, { 0xda,0xb7,0x8e,0x26 },
+ { 0xc8,0xac,0x99,0x3b }, { 0xc6,0xa5,0x94,0x30 },
+ { 0x9c,0xd2,0xdf,0x59 }, { 0x92,0xdb,0xd2,0x52 },
+ { 0x80,0xc0,0xc5,0x4f }, { 0x8e,0xc9,0xc8,0x44 },
+ { 0xa4,0xf6,0xeb,0x75 }, { 0xaa,0xff,0xe6,0x7e },
+ { 0xb8,0xe4,0xf1,0x63 }, { 0xb6,0xed,0xfc,0x68 },
+ { 0x0c,0x0a,0x67,0xb1 }, { 0x02,0x03,0x6a,0xba },
+ { 0x10,0x18,0x7d,0xa7 }, { 0x1e,0x11,0x70,0xac },
+ { 0x34,0x2e,0x53,0x9d }, { 0x3a,0x27,0x5e,0x96 },
+ { 0x28,0x3c,0x49,0x8b }, { 0x26,0x35,0x44,0x80 },
+ { 0x7c,0x42,0x0f,0xe9 }, { 0x72,0x4b,0x02,0xe2 },
+ { 0x60,0x50,0x15,0xff }, { 0x6e,0x59,0x18,0xf4 },
+ { 0x44,0x66,0x3b,0xc5 }, { 0x4a,0x6f,0x36,0xce },
+ { 0x58,0x74,0x21,0xd3 }, { 0x56,0x7d,0x2c,0xd8 },
+ { 0x37,0xa1,0x0c,0x7a }, { 0x39,0xa8,0x01,0x71 },
+ { 0x2b,0xb3,0x16,0x6c }, { 0x25,0xba,0x1b,0x67 },
+ { 0x0f,0x85,0x38,0x56 }, { 0x01,0x8c,0x35,0x5d },
+ { 0x13,0x97,0x22,0x40 }, { 0x1d,0x9e,0x2f,0x4b },
+ { 0x47,0xe9,0x64,0x22 }, { 0x49,0xe0,0x69,0x29 },
+ { 0x5b,0xfb,0x7e,0x34 }, { 0x55,0xf2,0x73,0x3f },
+ { 0x7f,0xcd,0x50,0x0e }, { 0x71,0xc4,0x5d,0x05 },
+ { 0x63,0xdf,0x4a,0x18 }, { 0x6d,0xd6,0x47,0x13 },
+ { 0xd7,0x31,0xdc,0xca }, { 0xd9,0x38,0xd1,0xc1 },
+ { 0xcb,0x23,0xc6,0xdc }, { 0xc5,0x2a,0xcb,0xd7 },
+ { 0xef,0x15,0xe8,0xe6 }, { 0xe1,0x1c,0xe5,0xed },
+ { 0xf3,0x07,0xf2,0xf0 }, { 0xfd,0x0e,0xff,0xfb },
+ { 0xa7,0x79,0xb4,0x92 }, { 0xa9,0x70,0xb9,0x99 },
+ { 0xbb,0x6b,0xae,0x84 }, { 0xb5,0x62,0xa3,0x8f },
+ { 0x9f,0x5d,0x80,0xbe }, { 0x91,0x54,0x8d,0xb5 },
+ { 0x83,0x4f,0x9a,0xa8 }, { 0x8d,0x46,0x97,0xa3 }
+ };
+
+static const unsigned char U2[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x0b,0x0e,0x09,0x0d },
+ { 0x16,0x1c,0x12,0x1a }, { 0x1d,0x12,0x1b,0x17 },
+ { 0x2c,0x38,0x24,0x34 }, { 0x27,0x36,0x2d,0x39 },
+ { 0x3a,0x24,0x36,0x2e }, { 0x31,0x2a,0x3f,0x23 },
+ { 0x58,0x70,0x48,0x68 }, { 0x53,0x7e,0x41,0x65 },
+ { 0x4e,0x6c,0x5a,0x72 }, { 0x45,0x62,0x53,0x7f },
+ { 0x74,0x48,0x6c,0x5c }, { 0x7f,0x46,0x65,0x51 },
+ { 0x62,0x54,0x7e,0x46 }, { 0x69,0x5a,0x77,0x4b },
+ { 0xb0,0xe0,0x90,0xd0 }, { 0xbb,0xee,0x99,0xdd },
+ { 0xa6,0xfc,0x82,0xca }, { 0xad,0xf2,0x8b,0xc7 },
+ { 0x9c,0xd8,0xb4,0xe4 }, { 0x97,0xd6,0xbd,0xe9 },
+ { 0x8a,0xc4,0xa6,0xfe }, { 0x81,0xca,0xaf,0xf3 },
+ { 0xe8,0x90,0xd8,0xb8 }, { 0xe3,0x9e,0xd1,0xb5 },
+ { 0xfe,0x8c,0xca,0xa2 }, { 0xf5,0x82,0xc3,0xaf },
+ { 0xc4,0xa8,0xfc,0x8c }, { 0xcf,0xa6,0xf5,0x81 },
+ { 0xd2,0xb4,0xee,0x96 }, { 0xd9,0xba,0xe7,0x9b },
+ { 0x7b,0xdb,0x3b,0xbb }, { 0x70,0xd5,0x32,0xb6 },
+ { 0x6d,0xc7,0x29,0xa1 }, { 0x66,0xc9,0x20,0xac },
+ { 0x57,0xe3,0x1f,0x8f }, { 0x5c,0xed,0x16,0x82 },
+ { 0x41,0xff,0x0d,0x95 }, { 0x4a,0xf1,0x04,0x98 },
+ { 0x23,0xab,0x73,0xd3 }, { 0x28,0xa5,0x7a,0xde },
+ { 0x35,0xb7,0x61,0xc9 }, { 0x3e,0xb9,0x68,0xc4 },
+ { 0x0f,0x93,0x57,0xe7 }, { 0x04,0x9d,0x5e,0xea },
+ { 0x19,0x8f,0x45,0xfd }, { 0x12,0x81,0x4c,0xf0 },
+ { 0xcb,0x3b,0xab,0x6b }, { 0xc0,0x35,0xa2,0x66 },
+ { 0xdd,0x27,0xb9,0x71 }, { 0xd6,0x29,0xb0,0x7c },
+ { 0xe7,0x03,0x8f,0x5f }, { 0xec,0x0d,0x86,0x52 },
+ { 0xf1,0x1f,0x9d,0x45 }, { 0xfa,0x11,0x94,0x48 },
+ { 0x93,0x4b,0xe3,0x03 }, { 0x98,0x45,0xea,0x0e },
+ { 0x85,0x57,0xf1,0x19 }, { 0x8e,0x59,0xf8,0x14 },
+ { 0xbf,0x73,0xc7,0x37 }, { 0xb4,0x7d,0xce,0x3a },
+ { 0xa9,0x6f,0xd5,0x2d }, { 0xa2,0x61,0xdc,0x20 },
+ { 0xf6,0xad,0x76,0x6d }, { 0xfd,0xa3,0x7f,0x60 },
+ { 0xe0,0xb1,0x64,0x77 }, { 0xeb,0xbf,0x6d,0x7a },
+ { 0xda,0x95,0x52,0x59 }, { 0xd1,0x9b,0x5b,0x54 },
+ { 0xcc,0x89,0x40,0x43 }, { 0xc7,0x87,0x49,0x4e },
+ { 0xae,0xdd,0x3e,0x05 }, { 0xa5,0xd3,0x37,0x08 },
+ { 0xb8,0xc1,0x2c,0x1f }, { 0xb3,0xcf,0x25,0x12 },
+ { 0x82,0xe5,0x1a,0x31 }, { 0x89,0xeb,0x13,0x3c },
+ { 0x94,0xf9,0x08,0x2b }, { 0x9f,0xf7,0x01,0x26 },
+ { 0x46,0x4d,0xe6,0xbd }, { 0x4d,0x43,0xef,0xb0 },
+ { 0x50,0x51,0xf4,0xa7 }, { 0x5b,0x5f,0xfd,0xaa },
+ { 0x6a,0x75,0xc2,0x89 }, { 0x61,0x7b,0xcb,0x84 },
+ { 0x7c,0x69,0xd0,0x93 }, { 0x77,0x67,0xd9,0x9e },
+ { 0x1e,0x3d,0xae,0xd5 }, { 0x15,0x33,0xa7,0xd8 },
+ { 0x08,0x21,0xbc,0xcf }, { 0x03,0x2f,0xb5,0xc2 },
+ { 0x32,0x05,0x8a,0xe1 }, { 0x39,0x0b,0x83,0xec },
+ { 0x24,0x19,0x98,0xfb }, { 0x2f,0x17,0x91,0xf6 },
+ { 0x8d,0x76,0x4d,0xd6 }, { 0x86,0x78,0x44,0xdb },
+ { 0x9b,0x6a,0x5f,0xcc }, { 0x90,0x64,0x56,0xc1 },
+ { 0xa1,0x4e,0x69,0xe2 }, { 0xaa,0x40,0x60,0xef },
+ { 0xb7,0x52,0x7b,0xf8 }, { 0xbc,0x5c,0x72,0xf5 },
+ { 0xd5,0x06,0x05,0xbe }, { 0xde,0x08,0x0c,0xb3 },
+ { 0xc3,0x1a,0x17,0xa4 }, { 0xc8,0x14,0x1e,0xa9 },
+ { 0xf9,0x3e,0x21,0x8a }, { 0xf2,0x30,0x28,0x87 },
+ { 0xef,0x22,0x33,0x90 }, { 0xe4,0x2c,0x3a,0x9d },
+ { 0x3d,0x96,0xdd,0x06 }, { 0x36,0x98,0xd4,0x0b },
+ { 0x2b,0x8a,0xcf,0x1c }, { 0x20,0x84,0xc6,0x11 },
+ { 0x11,0xae,0xf9,0x32 }, { 0x1a,0xa0,0xf0,0x3f },
+ { 0x07,0xb2,0xeb,0x28 }, { 0x0c,0xbc,0xe2,0x25 },
+ { 0x65,0xe6,0x95,0x6e }, { 0x6e,0xe8,0x9c,0x63 },
+ { 0x73,0xfa,0x87,0x74 }, { 0x78,0xf4,0x8e,0x79 },
+ { 0x49,0xde,0xb1,0x5a }, { 0x42,0xd0,0xb8,0x57 },
+ { 0x5f,0xc2,0xa3,0x40 }, { 0x54,0xcc,0xaa,0x4d },
+ { 0xf7,0x41,0xec,0xda }, { 0xfc,0x4f,0xe5,0xd7 },
+ { 0xe1,0x5d,0xfe,0xc0 }, { 0xea,0x53,0xf7,0xcd },
+ { 0xdb,0x79,0xc8,0xee }, { 0xd0,0x77,0xc1,0xe3 },
+ { 0xcd,0x65,0xda,0xf4 }, { 0xc6,0x6b,0xd3,0xf9 },
+ { 0xaf,0x31,0xa4,0xb2 }, { 0xa4,0x3f,0xad,0xbf },
+ { 0xb9,0x2d,0xb6,0xa8 }, { 0xb2,0x23,0xbf,0xa5 },
+ { 0x83,0x09,0x80,0x86 }, { 0x88,0x07,0x89,0x8b },
+ { 0x95,0x15,0x92,0x9c }, { 0x9e,0x1b,0x9b,0x91 },
+ { 0x47,0xa1,0x7c,0x0a }, { 0x4c,0xaf,0x75,0x07 },
+ { 0x51,0xbd,0x6e,0x10 }, { 0x5a,0xb3,0x67,0x1d },
+ { 0x6b,0x99,0x58,0x3e }, { 0x60,0x97,0x51,0x33 },
+ { 0x7d,0x85,0x4a,0x24 }, { 0x76,0x8b,0x43,0x29 },
+ { 0x1f,0xd1,0x34,0x62 }, { 0x14,0xdf,0x3d,0x6f },
+ { 0x09,0xcd,0x26,0x78 }, { 0x02,0xc3,0x2f,0x75 },
+ { 0x33,0xe9,0x10,0x56 }, { 0x38,0xe7,0x19,0x5b },
+ { 0x25,0xf5,0x02,0x4c }, { 0x2e,0xfb,0x0b,0x41 },
+ { 0x8c,0x9a,0xd7,0x61 }, { 0x87,0x94,0xde,0x6c },
+ { 0x9a,0x86,0xc5,0x7b }, { 0x91,0x88,0xcc,0x76 },
+ { 0xa0,0xa2,0xf3,0x55 }, { 0xab,0xac,0xfa,0x58 },
+ { 0xb6,0xbe,0xe1,0x4f }, { 0xbd,0xb0,0xe8,0x42 },
+ { 0xd4,0xea,0x9f,0x09 }, { 0xdf,0xe4,0x96,0x04 },
+ { 0xc2,0xf6,0x8d,0x13 }, { 0xc9,0xf8,0x84,0x1e },
+ { 0xf8,0xd2,0xbb,0x3d }, { 0xf3,0xdc,0xb2,0x30 },
+ { 0xee,0xce,0xa9,0x27 }, { 0xe5,0xc0,0xa0,0x2a },
+ { 0x3c,0x7a,0x47,0xb1 }, { 0x37,0x74,0x4e,0xbc },
+ { 0x2a,0x66,0x55,0xab }, { 0x21,0x68,0x5c,0xa6 },
+ { 0x10,0x42,0x63,0x85 }, { 0x1b,0x4c,0x6a,0x88 },
+ { 0x06,0x5e,0x71,0x9f }, { 0x0d,0x50,0x78,0x92 },
+ { 0x64,0x0a,0x0f,0xd9 }, { 0x6f,0x04,0x06,0xd4 },
+ { 0x72,0x16,0x1d,0xc3 }, { 0x79,0x18,0x14,0xce },
+ { 0x48,0x32,0x2b,0xed }, { 0x43,0x3c,0x22,0xe0 },
+ { 0x5e,0x2e,0x39,0xf7 }, { 0x55,0x20,0x30,0xfa },
+ { 0x01,0xec,0x9a,0xb7 }, { 0x0a,0xe2,0x93,0xba },
+ { 0x17,0xf0,0x88,0xad }, { 0x1c,0xfe,0x81,0xa0 },
+ { 0x2d,0xd4,0xbe,0x83 }, { 0x26,0xda,0xb7,0x8e },
+ { 0x3b,0xc8,0xac,0x99 }, { 0x30,0xc6,0xa5,0x94 },
+ { 0x59,0x9c,0xd2,0xdf }, { 0x52,0x92,0xdb,0xd2 },
+ { 0x4f,0x80,0xc0,0xc5 }, { 0x44,0x8e,0xc9,0xc8 },
+ { 0x75,0xa4,0xf6,0xeb }, { 0x7e,0xaa,0xff,0xe6 },
+ { 0x63,0xb8,0xe4,0xf1 }, { 0x68,0xb6,0xed,0xfc },
+ { 0xb1,0x0c,0x0a,0x67 }, { 0xba,0x02,0x03,0x6a },
+ { 0xa7,0x10,0x18,0x7d }, { 0xac,0x1e,0x11,0x70 },
+ { 0x9d,0x34,0x2e,0x53 }, { 0x96,0x3a,0x27,0x5e },
+ { 0x8b,0x28,0x3c,0x49 }, { 0x80,0x26,0x35,0x44 },
+ { 0xe9,0x7c,0x42,0x0f }, { 0xe2,0x72,0x4b,0x02 },
+ { 0xff,0x60,0x50,0x15 }, { 0xf4,0x6e,0x59,0x18 },
+ { 0xc5,0x44,0x66,0x3b }, { 0xce,0x4a,0x6f,0x36 },
+ { 0xd3,0x58,0x74,0x21 }, { 0xd8,0x56,0x7d,0x2c },
+ { 0x7a,0x37,0xa1,0x0c }, { 0x71,0x39,0xa8,0x01 },
+ { 0x6c,0x2b,0xb3,0x16 }, { 0x67,0x25,0xba,0x1b },
+ { 0x56,0x0f,0x85,0x38 }, { 0x5d,0x01,0x8c,0x35 },
+ { 0x40,0x13,0x97,0x22 }, { 0x4b,0x1d,0x9e,0x2f },
+ { 0x22,0x47,0xe9,0x64 }, { 0x29,0x49,0xe0,0x69 },
+ { 0x34,0x5b,0xfb,0x7e }, { 0x3f,0x55,0xf2,0x73 },
+ { 0x0e,0x7f,0xcd,0x50 }, { 0x05,0x71,0xc4,0x5d },
+ { 0x18,0x63,0xdf,0x4a }, { 0x13,0x6d,0xd6,0x47 },
+ { 0xca,0xd7,0x31,0xdc }, { 0xc1,0xd9,0x38,0xd1 },
+ { 0xdc,0xcb,0x23,0xc6 }, { 0xd7,0xc5,0x2a,0xcb },
+ { 0xe6,0xef,0x15,0xe8 }, { 0xed,0xe1,0x1c,0xe5 },
+ { 0xf0,0xf3,0x07,0xf2 }, { 0xfb,0xfd,0x0e,0xff },
+ { 0x92,0xa7,0x79,0xb4 }, { 0x99,0xa9,0x70,0xb9 },
+ { 0x84,0xbb,0x6b,0xae }, { 0x8f,0xb5,0x62,0xa3 },
+ { 0xbe,0x9f,0x5d,0x80 }, { 0xb5,0x91,0x54,0x8d },
+ { 0xa8,0x83,0x4f,0x9a }, { 0xa3,0x8d,0x46,0x97 }
+ };
+
+static const unsigned char U3[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x0d,0x0b,0x0e,0x09 },
+ { 0x1a,0x16,0x1c,0x12 }, { 0x17,0x1d,0x12,0x1b },
+ { 0x34,0x2c,0x38,0x24 }, { 0x39,0x27,0x36,0x2d },
+ { 0x2e,0x3a,0x24,0x36 }, { 0x23,0x31,0x2a,0x3f },
+ { 0x68,0x58,0x70,0x48 }, { 0x65,0x53,0x7e,0x41 },
+ { 0x72,0x4e,0x6c,0x5a }, { 0x7f,0x45,0x62,0x53 },
+ { 0x5c,0x74,0x48,0x6c }, { 0x51,0x7f,0x46,0x65 },
+ { 0x46,0x62,0x54,0x7e }, { 0x4b,0x69,0x5a,0x77 },
+ { 0xd0,0xb0,0xe0,0x90 }, { 0xdd,0xbb,0xee,0x99 },
+ { 0xca,0xa6,0xfc,0x82 }, { 0xc7,0xad,0xf2,0x8b },
+ { 0xe4,0x9c,0xd8,0xb4 }, { 0xe9,0x97,0xd6,0xbd },
+ { 0xfe,0x8a,0xc4,0xa6 }, { 0xf3,0x81,0xca,0xaf },
+ { 0xb8,0xe8,0x90,0xd8 }, { 0xb5,0xe3,0x9e,0xd1 },
+ { 0xa2,0xfe,0x8c,0xca }, { 0xaf,0xf5,0x82,0xc3 },
+ { 0x8c,0xc4,0xa8,0xfc }, { 0x81,0xcf,0xa6,0xf5 },
+ { 0x96,0xd2,0xb4,0xee }, { 0x9b,0xd9,0xba,0xe7 },
+ { 0xbb,0x7b,0xdb,0x3b }, { 0xb6,0x70,0xd5,0x32 },
+ { 0xa1,0x6d,0xc7,0x29 }, { 0xac,0x66,0xc9,0x20 },
+ { 0x8f,0x57,0xe3,0x1f }, { 0x82,0x5c,0xed,0x16 },
+ { 0x95,0x41,0xff,0x0d }, { 0x98,0x4a,0xf1,0x04 },
+ { 0xd3,0x23,0xab,0x73 }, { 0xde,0x28,0xa5,0x7a },
+ { 0xc9,0x35,0xb7,0x61 }, { 0xc4,0x3e,0xb9,0x68 },
+ { 0xe7,0x0f,0x93,0x57 }, { 0xea,0x04,0x9d,0x5e },
+ { 0xfd,0x19,0x8f,0x45 }, { 0xf0,0x12,0x81,0x4c },
+ { 0x6b,0xcb,0x3b,0xab }, { 0x66,0xc0,0x35,0xa2 },
+ { 0x71,0xdd,0x27,0xb9 }, { 0x7c,0xd6,0x29,0xb0 },
+ { 0x5f,0xe7,0x03,0x8f }, { 0x52,0xec,0x0d,0x86 },
+ { 0x45,0xf1,0x1f,0x9d }, { 0x48,0xfa,0x11,0x94 },
+ { 0x03,0x93,0x4b,0xe3 }, { 0x0e,0x98,0x45,0xea },
+ { 0x19,0x85,0x57,0xf1 }, { 0x14,0x8e,0x59,0xf8 },
+ { 0x37,0xbf,0x73,0xc7 }, { 0x3a,0xb4,0x7d,0xce },
+ { 0x2d,0xa9,0x6f,0xd5 }, { 0x20,0xa2,0x61,0xdc },
+ { 0x6d,0xf6,0xad,0x76 }, { 0x60,0xfd,0xa3,0x7f },
+ { 0x77,0xe0,0xb1,0x64 }, { 0x7a,0xeb,0xbf,0x6d },
+ { 0x59,0xda,0x95,0x52 }, { 0x54,0xd1,0x9b,0x5b },
+ { 0x43,0xcc,0x89,0x40 }, { 0x4e,0xc7,0x87,0x49 },
+ { 0x05,0xae,0xdd,0x3e }, { 0x08,0xa5,0xd3,0x37 },
+ { 0x1f,0xb8,0xc1,0x2c }, { 0x12,0xb3,0xcf,0x25 },
+ { 0x31,0x82,0xe5,0x1a }, { 0x3c,0x89,0xeb,0x13 },
+ { 0x2b,0x94,0xf9,0x08 }, { 0x26,0x9f,0xf7,0x01 },
+ { 0xbd,0x46,0x4d,0xe6 }, { 0xb0,0x4d,0x43,0xef },
+ { 0xa7,0x50,0x51,0xf4 }, { 0xaa,0x5b,0x5f,0xfd },
+ { 0x89,0x6a,0x75,0xc2 }, { 0x84,0x61,0x7b,0xcb },
+ { 0x93,0x7c,0x69,0xd0 }, { 0x9e,0x77,0x67,0xd9 },
+ { 0xd5,0x1e,0x3d,0xae }, { 0xd8,0x15,0x33,0xa7 },
+ { 0xcf,0x08,0x21,0xbc }, { 0xc2,0x03,0x2f,0xb5 },
+ { 0xe1,0x32,0x05,0x8a }, { 0xec,0x39,0x0b,0x83 },
+ { 0xfb,0x24,0x19,0x98 }, { 0xf6,0x2f,0x17,0x91 },
+ { 0xd6,0x8d,0x76,0x4d }, { 0xdb,0x86,0x78,0x44 },
+ { 0xcc,0x9b,0x6a,0x5f }, { 0xc1,0x90,0x64,0x56 },
+ { 0xe2,0xa1,0x4e,0x69 }, { 0xef,0xaa,0x40,0x60 },
+ { 0xf8,0xb7,0x52,0x7b }, { 0xf5,0xbc,0x5c,0x72 },
+ { 0xbe,0xd5,0x06,0x05 }, { 0xb3,0xde,0x08,0x0c },
+ { 0xa4,0xc3,0x1a,0x17 }, { 0xa9,0xc8,0x14,0x1e },
+ { 0x8a,0xf9,0x3e,0x21 }, { 0x87,0xf2,0x30,0x28 },
+ { 0x90,0xef,0x22,0x33 }, { 0x9d,0xe4,0x2c,0x3a },
+ { 0x06,0x3d,0x96,0xdd }, { 0x0b,0x36,0x98,0xd4 },
+ { 0x1c,0x2b,0x8a,0xcf }, { 0x11,0x20,0x84,0xc6 },
+ { 0x32,0x11,0xae,0xf9 }, { 0x3f,0x1a,0xa0,0xf0 },
+ { 0x28,0x07,0xb2,0xeb }, { 0x25,0x0c,0xbc,0xe2 },
+ { 0x6e,0x65,0xe6,0x95 }, { 0x63,0x6e,0xe8,0x9c },
+ { 0x74,0x73,0xfa,0x87 }, { 0x79,0x78,0xf4,0x8e },
+ { 0x5a,0x49,0xde,0xb1 }, { 0x57,0x42,0xd0,0xb8 },
+ { 0x40,0x5f,0xc2,0xa3 }, { 0x4d,0x54,0xcc,0xaa },
+ { 0xda,0xf7,0x41,0xec }, { 0xd7,0xfc,0x4f,0xe5 },
+ { 0xc0,0xe1,0x5d,0xfe }, { 0xcd,0xea,0x53,0xf7 },
+ { 0xee,0xdb,0x79,0xc8 }, { 0xe3,0xd0,0x77,0xc1 },
+ { 0xf4,0xcd,0x65,0xda }, { 0xf9,0xc6,0x6b,0xd3 },
+ { 0xb2,0xaf,0x31,0xa4 }, { 0xbf,0xa4,0x3f,0xad },
+ { 0xa8,0xb9,0x2d,0xb6 }, { 0xa5,0xb2,0x23,0xbf },
+ { 0x86,0x83,0x09,0x80 }, { 0x8b,0x88,0x07,0x89 },
+ { 0x9c,0x95,0x15,0x92 }, { 0x91,0x9e,0x1b,0x9b },
+ { 0x0a,0x47,0xa1,0x7c }, { 0x07,0x4c,0xaf,0x75 },
+ { 0x10,0x51,0xbd,0x6e }, { 0x1d,0x5a,0xb3,0x67 },
+ { 0x3e,0x6b,0x99,0x58 }, { 0x33,0x60,0x97,0x51 },
+ { 0x24,0x7d,0x85,0x4a }, { 0x29,0x76,0x8b,0x43 },
+ { 0x62,0x1f,0xd1,0x34 }, { 0x6f,0x14,0xdf,0x3d },
+ { 0x78,0x09,0xcd,0x26 }, { 0x75,0x02,0xc3,0x2f },
+ { 0x56,0x33,0xe9,0x10 }, { 0x5b,0x38,0xe7,0x19 },
+ { 0x4c,0x25,0xf5,0x02 }, { 0x41,0x2e,0xfb,0x0b },
+ { 0x61,0x8c,0x9a,0xd7 }, { 0x6c,0x87,0x94,0xde },
+ { 0x7b,0x9a,0x86,0xc5 }, { 0x76,0x91,0x88,0xcc },
+ { 0x55,0xa0,0xa2,0xf3 }, { 0x58,0xab,0xac,0xfa },
+ { 0x4f,0xb6,0xbe,0xe1 }, { 0x42,0xbd,0xb0,0xe8 },
+ { 0x09,0xd4,0xea,0x9f }, { 0x04,0xdf,0xe4,0x96 },
+ { 0x13,0xc2,0xf6,0x8d }, { 0x1e,0xc9,0xf8,0x84 },
+ { 0x3d,0xf8,0xd2,0xbb }, { 0x30,0xf3,0xdc,0xb2 },
+ { 0x27,0xee,0xce,0xa9 }, { 0x2a,0xe5,0xc0,0xa0 },
+ { 0xb1,0x3c,0x7a,0x47 }, { 0xbc,0x37,0x74,0x4e },
+ { 0xab,0x2a,0x66,0x55 }, { 0xa6,0x21,0x68,0x5c },
+ { 0x85,0x10,0x42,0x63 }, { 0x88,0x1b,0x4c,0x6a },
+ { 0x9f,0x06,0x5e,0x71 }, { 0x92,0x0d,0x50,0x78 },
+ { 0xd9,0x64,0x0a,0x0f }, { 0xd4,0x6f,0x04,0x06 },
+ { 0xc3,0x72,0x16,0x1d }, { 0xce,0x79,0x18,0x14 },
+ { 0xed,0x48,0x32,0x2b }, { 0xe0,0x43,0x3c,0x22 },
+ { 0xf7,0x5e,0x2e,0x39 }, { 0xfa,0x55,0x20,0x30 },
+ { 0xb7,0x01,0xec,0x9a }, { 0xba,0x0a,0xe2,0x93 },
+ { 0xad,0x17,0xf0,0x88 }, { 0xa0,0x1c,0xfe,0x81 },
+ { 0x83,0x2d,0xd4,0xbe }, { 0x8e,0x26,0xda,0xb7 },
+ { 0x99,0x3b,0xc8,0xac }, { 0x94,0x30,0xc6,0xa5 },
+ { 0xdf,0x59,0x9c,0xd2 }, { 0xd2,0x52,0x92,0xdb },
+ { 0xc5,0x4f,0x80,0xc0 }, { 0xc8,0x44,0x8e,0xc9 },
+ { 0xeb,0x75,0xa4,0xf6 }, { 0xe6,0x7e,0xaa,0xff },
+ { 0xf1,0x63,0xb8,0xe4 }, { 0xfc,0x68,0xb6,0xed },
+ { 0x67,0xb1,0x0c,0x0a }, { 0x6a,0xba,0x02,0x03 },
+ { 0x7d,0xa7,0x10,0x18 }, { 0x70,0xac,0x1e,0x11 },
+ { 0x53,0x9d,0x34,0x2e }, { 0x5e,0x96,0x3a,0x27 },
+ { 0x49,0x8b,0x28,0x3c }, { 0x44,0x80,0x26,0x35 },
+ { 0x0f,0xe9,0x7c,0x42 }, { 0x02,0xe2,0x72,0x4b },
+ { 0x15,0xff,0x60,0x50 }, { 0x18,0xf4,0x6e,0x59 },
+ { 0x3b,0xc5,0x44,0x66 }, { 0x36,0xce,0x4a,0x6f },
+ { 0x21,0xd3,0x58,0x74 }, { 0x2c,0xd8,0x56,0x7d },
+ { 0x0c,0x7a,0x37,0xa1 }, { 0x01,0x71,0x39,0xa8 },
+ { 0x16,0x6c,0x2b,0xb3 }, { 0x1b,0x67,0x25,0xba },
+ { 0x38,0x56,0x0f,0x85 }, { 0x35,0x5d,0x01,0x8c },
+ { 0x22,0x40,0x13,0x97 }, { 0x2f,0x4b,0x1d,0x9e },
+ { 0x64,0x22,0x47,0xe9 }, { 0x69,0x29,0x49,0xe0 },
+ { 0x7e,0x34,0x5b,0xfb }, { 0x73,0x3f,0x55,0xf2 },
+ { 0x50,0x0e,0x7f,0xcd }, { 0x5d,0x05,0x71,0xc4 },
+ { 0x4a,0x18,0x63,0xdf }, { 0x47,0x13,0x6d,0xd6 },
+ { 0xdc,0xca,0xd7,0x31 }, { 0xd1,0xc1,0xd9,0x38 },
+ { 0xc6,0xdc,0xcb,0x23 }, { 0xcb,0xd7,0xc5,0x2a },
+ { 0xe8,0xe6,0xef,0x15 }, { 0xe5,0xed,0xe1,0x1c },
+ { 0xf2,0xf0,0xf3,0x07 }, { 0xff,0xfb,0xfd,0x0e },
+ { 0xb4,0x92,0xa7,0x79 }, { 0xb9,0x99,0xa9,0x70 },
+ { 0xae,0x84,0xbb,0x6b }, { 0xa3,0x8f,0xb5,0x62 },
+ { 0x80,0xbe,0x9f,0x5d }, { 0x8d,0xb5,0x91,0x54 },
+ { 0x9a,0xa8,0x83,0x4f }, { 0x97,0xa3,0x8d,0x46 }
+ };
+
+static const unsigned char U4[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x09,0x0d,0x0b,0x0e },
+ { 0x12,0x1a,0x16,0x1c }, { 0x1b,0x17,0x1d,0x12 },
+ { 0x24,0x34,0x2c,0x38 }, { 0x2d,0x39,0x27,0x36 },
+ { 0x36,0x2e,0x3a,0x24 }, { 0x3f,0x23,0x31,0x2a },
+ { 0x48,0x68,0x58,0x70 }, { 0x41,0x65,0x53,0x7e },
+ { 0x5a,0x72,0x4e,0x6c }, { 0x53,0x7f,0x45,0x62 },
+ { 0x6c,0x5c,0x74,0x48 }, { 0x65,0x51,0x7f,0x46 },
+ { 0x7e,0x46,0x62,0x54 }, { 0x77,0x4b,0x69,0x5a },
+ { 0x90,0xd0,0xb0,0xe0 }, { 0x99,0xdd,0xbb,0xee },
+ { 0x82,0xca,0xa6,0xfc }, { 0x8b,0xc7,0xad,0xf2 },
+ { 0xb4,0xe4,0x9c,0xd8 }, { 0xbd,0xe9,0x97,0xd6 },
+ { 0xa6,0xfe,0x8a,0xc4 }, { 0xaf,0xf3,0x81,0xca },
+ { 0xd8,0xb8,0xe8,0x90 }, { 0xd1,0xb5,0xe3,0x9e },
+ { 0xca,0xa2,0xfe,0x8c }, { 0xc3,0xaf,0xf5,0x82 },
+ { 0xfc,0x8c,0xc4,0xa8 }, { 0xf5,0x81,0xcf,0xa6 },
+ { 0xee,0x96,0xd2,0xb4 }, { 0xe7,0x9b,0xd9,0xba },
+ { 0x3b,0xbb,0x7b,0xdb }, { 0x32,0xb6,0x70,0xd5 },
+ { 0x29,0xa1,0x6d,0xc7 }, { 0x20,0xac,0x66,0xc9 },
+ { 0x1f,0x8f,0x57,0xe3 }, { 0x16,0x82,0x5c,0xed },
+ { 0x0d,0x95,0x41,0xff }, { 0x04,0x98,0x4a,0xf1 },
+ { 0x73,0xd3,0x23,0xab }, { 0x7a,0xde,0x28,0xa5 },
+ { 0x61,0xc9,0x35,0xb7 }, { 0x68,0xc4,0x3e,0xb9 },
+ { 0x57,0xe7,0x0f,0x93 }, { 0x5e,0xea,0x04,0x9d },
+ { 0x45,0xfd,0x19,0x8f }, { 0x4c,0xf0,0x12,0x81 },
+ { 0xab,0x6b,0xcb,0x3b }, { 0xa2,0x66,0xc0,0x35 },
+ { 0xb9,0x71,0xdd,0x27 }, { 0xb0,0x7c,0xd6,0x29 },
+ { 0x8f,0x5f,0xe7,0x03 }, { 0x86,0x52,0xec,0x0d },
+ { 0x9d,0x45,0xf1,0x1f }, { 0x94,0x48,0xfa,0x11 },
+ { 0xe3,0x03,0x93,0x4b }, { 0xea,0x0e,0x98,0x45 },
+ { 0xf1,0x19,0x85,0x57 }, { 0xf8,0x14,0x8e,0x59 },
+ { 0xc7,0x37,0xbf,0x73 }, { 0xce,0x3a,0xb4,0x7d },
+ { 0xd5,0x2d,0xa9,0x6f }, { 0xdc,0x20,0xa2,0x61 },
+ { 0x76,0x6d,0xf6,0xad }, { 0x7f,0x60,0xfd,0xa3 },
+ { 0x64,0x77,0xe0,0xb1 }, { 0x6d,0x7a,0xeb,0xbf },
+ { 0x52,0x59,0xda,0x95 }, { 0x5b,0x54,0xd1,0x9b },
+ { 0x40,0x43,0xcc,0x89 }, { 0x49,0x4e,0xc7,0x87 },
+ { 0x3e,0x05,0xae,0xdd }, { 0x37,0x08,0xa5,0xd3 },
+ { 0x2c,0x1f,0xb8,0xc1 }, { 0x25,0x12,0xb3,0xcf },
+ { 0x1a,0x31,0x82,0xe5 }, { 0x13,0x3c,0x89,0xeb },
+ { 0x08,0x2b,0x94,0xf9 }, { 0x01,0x26,0x9f,0xf7 },
+ { 0xe6,0xbd,0x46,0x4d }, { 0xef,0xb0,0x4d,0x43 },
+ { 0xf4,0xa7,0x50,0x51 }, { 0xfd,0xaa,0x5b,0x5f },
+ { 0xc2,0x89,0x6a,0x75 }, { 0xcb,0x84,0x61,0x7b },
+ { 0xd0,0x93,0x7c,0x69 }, { 0xd9,0x9e,0x77,0x67 },
+ { 0xae,0xd5,0x1e,0x3d }, { 0xa7,0xd8,0x15,0x33 },
+ { 0xbc,0xcf,0x08,0x21 }, { 0xb5,0xc2,0x03,0x2f },
+ { 0x8a,0xe1,0x32,0x05 }, { 0x83,0xec,0x39,0x0b },
+ { 0x98,0xfb,0x24,0x19 }, { 0x91,0xf6,0x2f,0x17 },
+ { 0x4d,0xd6,0x8d,0x76 }, { 0x44,0xdb,0x86,0x78 },
+ { 0x5f,0xcc,0x9b,0x6a }, { 0x56,0xc1,0x90,0x64 },
+ { 0x69,0xe2,0xa1,0x4e }, { 0x60,0xef,0xaa,0x40 },
+ { 0x7b,0xf8,0xb7,0x52 }, { 0x72,0xf5,0xbc,0x5c },
+ { 0x05,0xbe,0xd5,0x06 }, { 0x0c,0xb3,0xde,0x08 },
+ { 0x17,0xa4,0xc3,0x1a }, { 0x1e,0xa9,0xc8,0x14 },
+ { 0x21,0x8a,0xf9,0x3e }, { 0x28,0x87,0xf2,0x30 },
+ { 0x33,0x90,0xef,0x22 }, { 0x3a,0x9d,0xe4,0x2c },
+ { 0xdd,0x06,0x3d,0x96 }, { 0xd4,0x0b,0x36,0x98 },
+ { 0xcf,0x1c,0x2b,0x8a }, { 0xc6,0x11,0x20,0x84 },
+ { 0xf9,0x32,0x11,0xae }, { 0xf0,0x3f,0x1a,0xa0 },
+ { 0xeb,0x28,0x07,0xb2 }, { 0xe2,0x25,0x0c,0xbc },
+ { 0x95,0x6e,0x65,0xe6 }, { 0x9c,0x63,0x6e,0xe8 },
+ { 0x87,0x74,0x73,0xfa }, { 0x8e,0x79,0x78,0xf4 },
+ { 0xb1,0x5a,0x49,0xde }, { 0xb8,0x57,0x42,0xd0 },
+ { 0xa3,0x40,0x5f,0xc2 }, { 0xaa,0x4d,0x54,0xcc },
+ { 0xec,0xda,0xf7,0x41 }, { 0xe5,0xd7,0xfc,0x4f },
+ { 0xfe,0xc0,0xe1,0x5d }, { 0xf7,0xcd,0xea,0x53 },
+ { 0xc8,0xee,0xdb,0x79 }, { 0xc1,0xe3,0xd0,0x77 },
+ { 0xda,0xf4,0xcd,0x65 }, { 0xd3,0xf9,0xc6,0x6b },
+ { 0xa4,0xb2,0xaf,0x31 }, { 0xad,0xbf,0xa4,0x3f },
+ { 0xb6,0xa8,0xb9,0x2d }, { 0xbf,0xa5,0xb2,0x23 },
+ { 0x80,0x86,0x83,0x09 }, { 0x89,0x8b,0x88,0x07 },
+ { 0x92,0x9c,0x95,0x15 }, { 0x9b,0x91,0x9e,0x1b },
+ { 0x7c,0x0a,0x47,0xa1 }, { 0x75,0x07,0x4c,0xaf },
+ { 0x6e,0x10,0x51,0xbd }, { 0x67,0x1d,0x5a,0xb3 },
+ { 0x58,0x3e,0x6b,0x99 }, { 0x51,0x33,0x60,0x97 },
+ { 0x4a,0x24,0x7d,0x85 }, { 0x43,0x29,0x76,0x8b },
+ { 0x34,0x62,0x1f,0xd1 }, { 0x3d,0x6f,0x14,0xdf },
+ { 0x26,0x78,0x09,0xcd }, { 0x2f,0x75,0x02,0xc3 },
+ { 0x10,0x56,0x33,0xe9 }, { 0x19,0x5b,0x38,0xe7 },
+ { 0x02,0x4c,0x25,0xf5 }, { 0x0b,0x41,0x2e,0xfb },
+ { 0xd7,0x61,0x8c,0x9a }, { 0xde,0x6c,0x87,0x94 },
+ { 0xc5,0x7b,0x9a,0x86 }, { 0xcc,0x76,0x91,0x88 },
+ { 0xf3,0x55,0xa0,0xa2 }, { 0xfa,0x58,0xab,0xac },
+ { 0xe1,0x4f,0xb6,0xbe }, { 0xe8,0x42,0xbd,0xb0 },
+ { 0x9f,0x09,0xd4,0xea }, { 0x96,0x04,0xdf,0xe4 },
+ { 0x8d,0x13,0xc2,0xf6 }, { 0x84,0x1e,0xc9,0xf8 },
+ { 0xbb,0x3d,0xf8,0xd2 }, { 0xb2,0x30,0xf3,0xdc },
+ { 0xa9,0x27,0xee,0xce }, { 0xa0,0x2a,0xe5,0xc0 },
+ { 0x47,0xb1,0x3c,0x7a }, { 0x4e,0xbc,0x37,0x74 },
+ { 0x55,0xab,0x2a,0x66 }, { 0x5c,0xa6,0x21,0x68 },
+ { 0x63,0x85,0x10,0x42 }, { 0x6a,0x88,0x1b,0x4c },
+ { 0x71,0x9f,0x06,0x5e }, { 0x78,0x92,0x0d,0x50 },
+ { 0x0f,0xd9,0x64,0x0a }, { 0x06,0xd4,0x6f,0x04 },
+ { 0x1d,0xc3,0x72,0x16 }, { 0x14,0xce,0x79,0x18 },
+ { 0x2b,0xed,0x48,0x32 }, { 0x22,0xe0,0x43,0x3c },
+ { 0x39,0xf7,0x5e,0x2e }, { 0x30,0xfa,0x55,0x20 },
+ { 0x9a,0xb7,0x01,0xec }, { 0x93,0xba,0x0a,0xe2 },
+ { 0x88,0xad,0x17,0xf0 }, { 0x81,0xa0,0x1c,0xfe },
+ { 0xbe,0x83,0x2d,0xd4 }, { 0xb7,0x8e,0x26,0xda },
+ { 0xac,0x99,0x3b,0xc8 }, { 0xa5,0x94,0x30,0xc6 },
+ { 0xd2,0xdf,0x59,0x9c }, { 0xdb,0xd2,0x52,0x92 },
+ { 0xc0,0xc5,0x4f,0x80 }, { 0xc9,0xc8,0x44,0x8e },
+ { 0xf6,0xeb,0x75,0xa4 }, { 0xff,0xe6,0x7e,0xaa },
+ { 0xe4,0xf1,0x63,0xb8 }, { 0xed,0xfc,0x68,0xb6 },
+ { 0x0a,0x67,0xb1,0x0c }, { 0x03,0x6a,0xba,0x02 },
+ { 0x18,0x7d,0xa7,0x10 }, { 0x11,0x70,0xac,0x1e },
+ { 0x2e,0x53,0x9d,0x34 }, { 0x27,0x5e,0x96,0x3a },
+ { 0x3c,0x49,0x8b,0x28 }, { 0x35,0x44,0x80,0x26 },
+ { 0x42,0x0f,0xe9,0x7c }, { 0x4b,0x02,0xe2,0x72 },
+ { 0x50,0x15,0xff,0x60 }, { 0x59,0x18,0xf4,0x6e },
+ { 0x66,0x3b,0xc5,0x44 }, { 0x6f,0x36,0xce,0x4a },
+ { 0x74,0x21,0xd3,0x58 }, { 0x7d,0x2c,0xd8,0x56 },
+ { 0xa1,0x0c,0x7a,0x37 }, { 0xa8,0x01,0x71,0x39 },
+ { 0xb3,0x16,0x6c,0x2b }, { 0xba,0x1b,0x67,0x25 },
+ { 0x85,0x38,0x56,0x0f }, { 0x8c,0x35,0x5d,0x01 },
+ { 0x97,0x22,0x40,0x13 }, { 0x9e,0x2f,0x4b,0x1d },
+ { 0xe9,0x64,0x22,0x47 }, { 0xe0,0x69,0x29,0x49 },
+ { 0xfb,0x7e,0x34,0x5b }, { 0xf2,0x73,0x3f,0x55 },
+ { 0xcd,0x50,0x0e,0x7f }, { 0xc4,0x5d,0x05,0x71 },
+ { 0xdf,0x4a,0x18,0x63 }, { 0xd6,0x47,0x13,0x6d },
+ { 0x31,0xdc,0xca,0xd7 }, { 0x38,0xd1,0xc1,0xd9 },
+ { 0x23,0xc6,0xdc,0xcb }, { 0x2a,0xcb,0xd7,0xc5 },
+ { 0x15,0xe8,0xe6,0xef }, { 0x1c,0xe5,0xed,0xe1 },
+ { 0x07,0xf2,0xf0,0xf3 }, { 0x0e,0xff,0xfb,0xfd },
+ { 0x79,0xb4,0x92,0xa7 }, { 0x70,0xb9,0x99,0xa9 },
+ { 0x6b,0xae,0x84,0xbb }, { 0x62,0xa3,0x8f,0xb5 },
+ { 0x5d,0x80,0xbe,0x9f }, { 0x54,0x8d,0xb5,0x91 },
+ { 0x4f,0x9a,0xa8,0x83 }, { 0x46,0x97,0xa3,0x8d }
+ };
+
+static const u32 rcon[30] =
+ {
+ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
+ 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35,
+ 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91
+ };
+
diff --git a/grub-core/lib/libgcrypt-grub/cipher/rijndael.c b/grub-core/lib/libgcrypt-grub/cipher/rijndael.c
new file mode 100644
index 0000000..557b3be
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/rijndael.c
@@ -0,0 +1,767 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* Rijndael (AES) for GnuPG
+ * Copyright (C) 2000, 2001, 2002, 2003, 2007,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *******************************************************************
+ * The code here is based on the optimized implementation taken from
+ * http://www.esat.kuleuven.ac.be/~rijmen/rijndael/ on Oct 2, 2000,
+ * which carries this notice:
+ *------------------------------------------
+ * rijndael-alg-fst.c v2.3 April '2000
+ *
+ * Optimised ANSI C code
+ *
+ * authors: v1.0: Antoon Bosselaers
+ * v2.0: Vincent Rijmen
+ * v2.3: Paulo Barreto
+ *
+ * This code is placed in the public domain.
+ *------------------------------------------
+ *
+ * The SP800-38a document is available at:
+ * http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
+ *
+ */
+
+
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+#define MAXKC (256/32)
+#define MAXROUNDS 14
+#define BLOCKSIZE (128/8)
+
+
+/* USE_PADLOCK indicates whether to compile the padlock specific
+ code. */
+#undef USE_PADLOCK
+#ifdef ENABLE_PADLOCK_SUPPORT
+# if defined (__i386__) && SIZEOF_UNSIGNED_LONG == 4 && defined (__GNUC__)
+# define USE_PADLOCK
+# endif
+#endif /*ENABLE_PADLOCK_SUPPORT*/
+
+
+typedef struct
+{
+ int ROUNDS; /* Key-length-dependent number of rounds. */
+ int decryption_prepared; /* The decryption key schedule is available. */
+#ifdef USE_PADLOCK
+ int use_padlock; /* Padlock shall be used. */
+ /* The key as passed to the padlock engine. */
+ unsigned char padlock_key[16] __attribute__ ((aligned (16)));
+#endif
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte keyschedule[MAXROUNDS+1][4][4];
+ } u1;
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte keyschedule[MAXROUNDS+1][4][4];
+ } u2;
+} RIJNDAEL_context;
+
+#define keySched u1.keyschedule
+#define keySched2 u2.keyschedule
+
+/* All the numbers. */
+#include "rijndael-tables.h"
+
+
+/* Perform the key setup. */
+static gcry_err_code_t
+do_setkey (RIJNDAEL_context *ctx, const byte *key, const unsigned keylen)
+{
+ static int initialized = 0;
+ static const char *selftest_failed=0;
+ int ROUNDS;
+ int i,j, r, t, rconpointer = 0;
+ int KC;
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte k[MAXKC][4];
+ } k;
+#define k k.k
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte tk[MAXKC][4];
+ } tk;
+#define tk tk.tk
+
+ /* The on-the-fly self tests are only run in non-fips mode. In fips
+ mode explicit self-tests are required. Actually the on-the-fly
+ self-tests are not fully thread-safe and it might happen that a
+ failed self-test won't get noticed in another thread.
+
+ FIXME: We might want to have a central registry of succeeded
+ self-tests. */
+ if (!fips_mode () && !initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if (selftest_failed)
+ log_error ("%s\n", selftest_failed );
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ ctx->decryption_prepared = 0;
+#ifdef USE_PADLOCK
+ ctx->use_padlock = 0;
+#endif
+
+ if( keylen == 128/8 )
+ {
+ ROUNDS = 10;
+ KC = 4;
+#ifdef USE_PADLOCK
+ if ((_gcry_get_hw_features () & HWF_PADLOCK_AES))
+ {
+ ctx->use_padlock = 1;
+ memcpy (ctx->padlock_key, key, keylen);
+ }
+#endif
+ }
+ else if ( keylen == 192/8 )
+ {
+ ROUNDS = 12;
+ KC = 6;
+ }
+ else if ( keylen == 256/8 )
+ {
+ ROUNDS = 14;
+ KC = 8;
+ }
+ else
+ return GPG_ERR_INV_KEYLEN;
+
+ ctx->ROUNDS = ROUNDS;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ /* Nothing to do as we support only hardware key generation for
+ now. */
+ }
+ else
+#endif /*USE_PADLOCK*/
+ {
+#define W (ctx->keySched)
+ for (i = 0; i < keylen; i++)
+ {
+ k[i >> 2][i & 3] = key[i];
+ }
+
+ for (j = KC-1; j >= 0; j--)
+ {
+ *((u32*)tk[j]) = *((u32*)k[j]);
+ }
+ r = 0;
+ t = 0;
+ /* Copy values into round key array. */
+ for (j = 0; (j < KC) && (r < ROUNDS + 1); )
+ {
+ for (; (j < KC) && (t < 4); j++, t++)
+ {
+ *((u32*)W[r][t]) = *((u32*)tk[j]);
+ }
+ if (t == 4)
+ {
+ r++;
+ t = 0;
+ }
+ }
+
+ while (r < ROUNDS + 1)
+ {
+ /* While not enough round key material calculated calculate
+ new values. */
+ tk[0][0] ^= S[tk[KC-1][1]];
+ tk[0][1] ^= S[tk[KC-1][2]];
+ tk[0][2] ^= S[tk[KC-1][3]];
+ tk[0][3] ^= S[tk[KC-1][0]];
+ tk[0][0] ^= rcon[rconpointer++];
+
+ if (KC != 8)
+ {
+ for (j = 1; j < KC; j++)
+ {
+ *((u32*)tk[j]) ^= *((u32*)tk[j-1]);
+ }
+ }
+ else
+ {
+ for (j = 1; j < KC/2; j++)
+ {
+ *((u32*)tk[j]) ^= *((u32*)tk[j-1]);
+ }
+ tk[KC/2][0] ^= S[tk[KC/2 - 1][0]];
+ tk[KC/2][1] ^= S[tk[KC/2 - 1][1]];
+ tk[KC/2][2] ^= S[tk[KC/2 - 1][2]];
+ tk[KC/2][3] ^= S[tk[KC/2 - 1][3]];
+ for (j = KC/2 + 1; j < KC; j++)
+ {
+ *((u32*)tk[j]) ^= *((u32*)tk[j-1]);
+ }
+ }
+
+ /* Copy values into round key array. */
+ for (j = 0; (j < KC) && (r < ROUNDS + 1); )
+ {
+ for (; (j < KC) && (t < 4); j++, t++)
+ {
+ *((u32*)W[r][t]) = *((u32*)tk[j]);
+ }
+ if (t == 4)
+ {
+ r++;
+ t = 0;
+ }
+ }
+ }
+#undef W
+ }
+
+ return 0;
+#undef tk
+#undef k
+}
+
+
+static gcry_err_code_t
+rijndael_setkey (void *context, const byte *key, const unsigned keylen)
+{
+ RIJNDAEL_context *ctx = context;
+
+ int rc = do_setkey (ctx, key, keylen);
+ _gcry_burn_stack ( 100 + 16*sizeof(int));
+ return rc;
+}
+
+
+/* Make a decryption key from an encryption key. */
+static void
+prepare_decryption( RIJNDAEL_context *ctx )
+{
+ int r;
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte *w;
+ } w;
+#define w w.w
+
+ for (r=0; r < MAXROUNDS+1; r++ )
+ {
+ *((u32*)ctx->keySched2[r][0]) = *((u32*)ctx->keySched[r][0]);
+ *((u32*)ctx->keySched2[r][1]) = *((u32*)ctx->keySched[r][1]);
+ *((u32*)ctx->keySched2[r][2]) = *((u32*)ctx->keySched[r][2]);
+ *((u32*)ctx->keySched2[r][3]) = *((u32*)ctx->keySched[r][3]);
+ }
+#define W (ctx->keySched2)
+ for (r = 1; r < ctx->ROUNDS; r++)
+ {
+ w = W[r][0];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+
+ w = W[r][1];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+
+ w = W[r][2];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+
+ w = W[r][3];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+ }
+#undef W
+#undef w
+}
+
+
+
+/* Encrypt one block. A and B need to be aligned on a 4 byte
+ boundary. A and B may be the same. */
+static void
+do_encrypt_aligned (const RIJNDAEL_context *ctx,
+ unsigned char *b, const unsigned char *a)
+{
+#define rk (ctx->keySched)
+ int ROUNDS = ctx->ROUNDS;
+ int r;
+ union
+ {
+ u32 tempu32[4]; /* Force correct alignment. */
+ byte temp[4][4];
+ } u;
+
+ *((u32*)u.temp[0]) = *((u32*)(a )) ^ *((u32*)rk[0][0]);
+ *((u32*)u.temp[1]) = *((u32*)(a+ 4)) ^ *((u32*)rk[0][1]);
+ *((u32*)u.temp[2]) = *((u32*)(a+ 8)) ^ *((u32*)rk[0][2]);
+ *((u32*)u.temp[3]) = *((u32*)(a+12)) ^ *((u32*)rk[0][3]);
+ *((u32*)(b )) = (*((u32*)T1[u.temp[0][0]])
+ ^ *((u32*)T2[u.temp[1][1]])
+ ^ *((u32*)T3[u.temp[2][2]])
+ ^ *((u32*)T4[u.temp[3][3]]));
+ *((u32*)(b + 4)) = (*((u32*)T1[u.temp[1][0]])
+ ^ *((u32*)T2[u.temp[2][1]])
+ ^ *((u32*)T3[u.temp[3][2]])
+ ^ *((u32*)T4[u.temp[0][3]]));
+ *((u32*)(b + 8)) = (*((u32*)T1[u.temp[2][0]])
+ ^ *((u32*)T2[u.temp[3][1]])
+ ^ *((u32*)T3[u.temp[0][2]])
+ ^ *((u32*)T4[u.temp[1][3]]));
+ *((u32*)(b +12)) = (*((u32*)T1[u.temp[3][0]])
+ ^ *((u32*)T2[u.temp[0][1]])
+ ^ *((u32*)T3[u.temp[1][2]])
+ ^ *((u32*)T4[u.temp[2][3]]));
+
+ for (r = 1; r < ROUNDS-1; r++)
+ {
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[r][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[r][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[r][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[r][3]);
+
+ *((u32*)(b )) = (*((u32*)T1[u.temp[0][0]])
+ ^ *((u32*)T2[u.temp[1][1]])
+ ^ *((u32*)T3[u.temp[2][2]])
+ ^ *((u32*)T4[u.temp[3][3]]));
+ *((u32*)(b + 4)) = (*((u32*)T1[u.temp[1][0]])
+ ^ *((u32*)T2[u.temp[2][1]])
+ ^ *((u32*)T3[u.temp[3][2]])
+ ^ *((u32*)T4[u.temp[0][3]]));
+ *((u32*)(b + 8)) = (*((u32*)T1[u.temp[2][0]])
+ ^ *((u32*)T2[u.temp[3][1]])
+ ^ *((u32*)T3[u.temp[0][2]])
+ ^ *((u32*)T4[u.temp[1][3]]));
+ *((u32*)(b +12)) = (*((u32*)T1[u.temp[3][0]])
+ ^ *((u32*)T2[u.temp[0][1]])
+ ^ *((u32*)T3[u.temp[1][2]])
+ ^ *((u32*)T4[u.temp[2][3]]));
+ }
+
+ /* Last round is special. */
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[ROUNDS-1][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[ROUNDS-1][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[ROUNDS-1][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[ROUNDS-1][3]);
+ b[ 0] = T1[u.temp[0][0]][1];
+ b[ 1] = T1[u.temp[1][1]][1];
+ b[ 2] = T1[u.temp[2][2]][1];
+ b[ 3] = T1[u.temp[3][3]][1];
+ b[ 4] = T1[u.temp[1][0]][1];
+ b[ 5] = T1[u.temp[2][1]][1];
+ b[ 6] = T1[u.temp[3][2]][1];
+ b[ 7] = T1[u.temp[0][3]][1];
+ b[ 8] = T1[u.temp[2][0]][1];
+ b[ 9] = T1[u.temp[3][1]][1];
+ b[10] = T1[u.temp[0][2]][1];
+ b[11] = T1[u.temp[1][3]][1];
+ b[12] = T1[u.temp[3][0]][1];
+ b[13] = T1[u.temp[0][1]][1];
+ b[14] = T1[u.temp[1][2]][1];
+ b[15] = T1[u.temp[2][3]][1];
+ *((u32*)(b )) ^= *((u32*)rk[ROUNDS][0]);
+ *((u32*)(b+ 4)) ^= *((u32*)rk[ROUNDS][1]);
+ *((u32*)(b+ 8)) ^= *((u32*)rk[ROUNDS][2]);
+ *((u32*)(b+12)) ^= *((u32*)rk[ROUNDS][3]);
+#undef rk
+}
+
+
+static void
+do_encrypt (const RIJNDAEL_context *ctx,
+ unsigned char *bx, const unsigned char *ax)
+{
+ /* BX and AX are not necessary correctly aligned. Thus we need to
+ copy them here. */
+ union
+ {
+ u32 dummy[4];
+ byte a[16];
+ } a;
+ union
+ {
+ u32 dummy[4];
+ byte b[16];
+ } b;
+
+ memcpy (a.a, ax, 16);
+ do_encrypt_aligned (ctx, b.b, a.a);
+ memcpy (bx, b.b, 16);
+}
+
+
+/* Encrypt or decrypt one block using the padlock engine. A and B may
+ be the same. */
+#ifdef USE_PADLOCK
+static void
+do_padlock (const RIJNDAEL_context *ctx, int decrypt_flag,
+ unsigned char *bx, const unsigned char *ax)
+{
+ /* BX and AX are not necessary correctly aligned. Thus we need to
+ copy them here. */
+ unsigned char a[16] __attribute__ ((aligned (16)));
+ unsigned char b[16] __attribute__ ((aligned (16)));
+ unsigned int cword[4] __attribute__ ((aligned (16)));
+
+ /* The control word fields are:
+ 127:12 11:10 9 8 7 6 5 4 3:0
+ RESERVED KSIZE CRYPT INTER KEYGN CIPHR ALIGN DGEST ROUND */
+ cword[0] = (ctx->ROUNDS & 15); /* (The mask is just a safeguard.) */
+ cword[1] = 0;
+ cword[2] = 0;
+ cword[3] = 0;
+ if (decrypt_flag)
+ cword[0] |= 0x00000200;
+
+ memcpy (a, ax, 16);
+
+ asm volatile
+ ("pushfl\n\t" /* Force key reload. */
+ "popfl\n\t"
+ "xchg %3, %%ebx\n\t" /* Load key. */
+ "movl $1, %%ecx\n\t" /* Init counter for just one block. */
+ ".byte 0xf3, 0x0f, 0xa7, 0xc8\n\t" /* REP XSTORE ECB. */
+ "xchg %3, %%ebx\n" /* Restore GOT register. */
+ : /* No output */
+ : "S" (a), "D" (b), "d" (cword), "r" (ctx->padlock_key)
+ : "%ecx", "cc", "memory"
+ );
+
+ memcpy (bx, b, 16);
+
+}
+#endif /*USE_PADLOCK*/
+
+
+static void
+rijndael_encrypt (void *context, byte *b, const byte *a)
+{
+ RIJNDAEL_context *ctx = context;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ do_padlock (ctx, 0, b, a);
+ _gcry_burn_stack (48 + 15 /* possible padding for alignment */);
+ }
+ else
+#endif /*USE_PADLOCK*/
+ {
+ do_encrypt (ctx, b, a);
+ _gcry_burn_stack (48 + 2*sizeof(int));
+ }
+}
+
+
+/* Bulk encryption of complete blocks in CFB mode. Caller needs to
+ make sure that IV is aligned on an unsigned long boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+
+
+/* Bulk encryption of complete blocks in CBC mode. Caller needs to
+ make sure that IV is aligned on an unsigned long boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+
+
+
+/* Decrypt one block. A and B need to be aligned on a 4 byte boundary
+ and the decryption must have been prepared. A and B may be the
+ same. */
+static void
+do_decrypt_aligned (RIJNDAEL_context *ctx,
+ unsigned char *b, const unsigned char *a)
+{
+#define rk (ctx->keySched2)
+ int ROUNDS = ctx->ROUNDS;
+ int r;
+ union
+ {
+ u32 tempu32[4]; /* Force correct alignment. */
+ byte temp[4][4];
+ } u;
+
+
+ *((u32*)u.temp[0]) = *((u32*)(a )) ^ *((u32*)rk[ROUNDS][0]);
+ *((u32*)u.temp[1]) = *((u32*)(a+ 4)) ^ *((u32*)rk[ROUNDS][1]);
+ *((u32*)u.temp[2]) = *((u32*)(a+ 8)) ^ *((u32*)rk[ROUNDS][2]);
+ *((u32*)u.temp[3]) = *((u32*)(a+12)) ^ *((u32*)rk[ROUNDS][3]);
+
+ *((u32*)(b )) = (*((u32*)T5[u.temp[0][0]])
+ ^ *((u32*)T6[u.temp[3][1]])
+ ^ *((u32*)T7[u.temp[2][2]])
+ ^ *((u32*)T8[u.temp[1][3]]));
+ *((u32*)(b+ 4)) = (*((u32*)T5[u.temp[1][0]])
+ ^ *((u32*)T6[u.temp[0][1]])
+ ^ *((u32*)T7[u.temp[3][2]])
+ ^ *((u32*)T8[u.temp[2][3]]));
+ *((u32*)(b+ 8)) = (*((u32*)T5[u.temp[2][0]])
+ ^ *((u32*)T6[u.temp[1][1]])
+ ^ *((u32*)T7[u.temp[0][2]])
+ ^ *((u32*)T8[u.temp[3][3]]));
+ *((u32*)(b+12)) = (*((u32*)T5[u.temp[3][0]])
+ ^ *((u32*)T6[u.temp[2][1]])
+ ^ *((u32*)T7[u.temp[1][2]])
+ ^ *((u32*)T8[u.temp[0][3]]));
+
+ for (r = ROUNDS-1; r > 1; r--)
+ {
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[r][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[r][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[r][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[r][3]);
+ *((u32*)(b )) = (*((u32*)T5[u.temp[0][0]])
+ ^ *((u32*)T6[u.temp[3][1]])
+ ^ *((u32*)T7[u.temp[2][2]])
+ ^ *((u32*)T8[u.temp[1][3]]));
+ *((u32*)(b+ 4)) = (*((u32*)T5[u.temp[1][0]])
+ ^ *((u32*)T6[u.temp[0][1]])
+ ^ *((u32*)T7[u.temp[3][2]])
+ ^ *((u32*)T8[u.temp[2][3]]));
+ *((u32*)(b+ 8)) = (*((u32*)T5[u.temp[2][0]])
+ ^ *((u32*)T6[u.temp[1][1]])
+ ^ *((u32*)T7[u.temp[0][2]])
+ ^ *((u32*)T8[u.temp[3][3]]));
+ *((u32*)(b+12)) = (*((u32*)T5[u.temp[3][0]])
+ ^ *((u32*)T6[u.temp[2][1]])
+ ^ *((u32*)T7[u.temp[1][2]])
+ ^ *((u32*)T8[u.temp[0][3]]));
+ }
+
+ /* Last round is special. */
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[1][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[1][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[1][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[1][3]);
+ b[ 0] = S5[u.temp[0][0]];
+ b[ 1] = S5[u.temp[3][1]];
+ b[ 2] = S5[u.temp[2][2]];
+ b[ 3] = S5[u.temp[1][3]];
+ b[ 4] = S5[u.temp[1][0]];
+ b[ 5] = S5[u.temp[0][1]];
+ b[ 6] = S5[u.temp[3][2]];
+ b[ 7] = S5[u.temp[2][3]];
+ b[ 8] = S5[u.temp[2][0]];
+ b[ 9] = S5[u.temp[1][1]];
+ b[10] = S5[u.temp[0][2]];
+ b[11] = S5[u.temp[3][3]];
+ b[12] = S5[u.temp[3][0]];
+ b[13] = S5[u.temp[2][1]];
+ b[14] = S5[u.temp[1][2]];
+ b[15] = S5[u.temp[0][3]];
+ *((u32*)(b )) ^= *((u32*)rk[0][0]);
+ *((u32*)(b+ 4)) ^= *((u32*)rk[0][1]);
+ *((u32*)(b+ 8)) ^= *((u32*)rk[0][2]);
+ *((u32*)(b+12)) ^= *((u32*)rk[0][3]);
+#undef rk
+}
+
+
+/* Decrypt one block. AX and BX may be the same. */
+static void
+do_decrypt (RIJNDAEL_context *ctx, byte *bx, const byte *ax)
+{
+ /* BX and AX are not necessary correctly aligned. Thus we need to
+ copy them here. */
+ union
+ {
+ u32 dummy[4];
+ byte a[16];
+ } a;
+ union
+ {
+ u32 dummy[4];
+ byte b[16];
+ } b;
+
+ if ( !ctx->decryption_prepared )
+ {
+ prepare_decryption ( ctx );
+ _gcry_burn_stack (64);
+ ctx->decryption_prepared = 1;
+ }
+
+ memcpy (a.a, ax, 16);
+ do_decrypt_aligned (ctx, b.b, a.a);
+ memcpy (bx, b.b, 16);
+#undef rk
+}
+
+
+
+
+static void
+rijndael_decrypt (void *context, byte *b, const byte *a)
+{
+ RIJNDAEL_context *ctx = context;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ do_padlock (ctx, 1, b, a);
+ _gcry_burn_stack (48 + 2*sizeof(int) /* FIXME */);
+ }
+ else
+#endif /*USE_PADLOCK*/
+ {
+ do_decrypt (ctx, b, a);
+ _gcry_burn_stack (48+2*sizeof(int));
+ }
+}
+
+
+/* Bulk decryption of complete blocks in CFB mode. Caller needs to
+ make sure that IV is aligned on an unisgned lonhg boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+
+
+/* Bulk decryption of complete blocks in CBC mode. Caller needs to
+ make sure that IV is aligned on an unsigned long boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+
+
+
+
+/* Run the self-tests for AES 128. Returns NULL on success. */
+
+/* Run the self-tests for AES 192. Returns NULL on success. */
+
+
+/* Run the self-tests for AES 256. Returns NULL on success. */
+
+/* Run all the self-tests and return NULL on success. This function
+ is used for the on-the-fly self-tests. */
+
+
+/* SP800-38a.pdf for AES-128. */
+
+
+/* Complete selftest for AES-128 with all modes and driver code. */
+
+/* Complete selftest for AES-192. */
+
+
+/* Complete selftest for AES-256. */
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+
+static const char *rijndael_names[] =
+ {
+ "RIJNDAEL",
+ "AES128",
+ "AES-128",
+ NULL
+ };
+
+static gcry_cipher_oid_spec_t rijndael_oids[] =
+ {
+ { "2.16.840.1.101.3.4.1.1", GCRY_CIPHER_MODE_ECB },
+ { "2.16.840.1.101.3.4.1.2", GCRY_CIPHER_MODE_CBC },
+ { "2.16.840.1.101.3.4.1.3", GCRY_CIPHER_MODE_OFB },
+ { "2.16.840.1.101.3.4.1.4", GCRY_CIPHER_MODE_CFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_aes =
+ {
+ "AES", rijndael_names, rijndael_oids, 16, 128, sizeof (RIJNDAEL_context),
+ rijndael_setkey, rijndael_encrypt, rijndael_decrypt
+ };
+
+static const char *rijndael192_names[] =
+ {
+ "RIJNDAEL192",
+ "AES-192",
+ NULL
+ };
+
+static gcry_cipher_oid_spec_t rijndael192_oids[] =
+ {
+ { "2.16.840.1.101.3.4.1.21", GCRY_CIPHER_MODE_ECB },
+ { "2.16.840.1.101.3.4.1.22", GCRY_CIPHER_MODE_CBC },
+ { "2.16.840.1.101.3.4.1.23", GCRY_CIPHER_MODE_OFB },
+ { "2.16.840.1.101.3.4.1.24", GCRY_CIPHER_MODE_CFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_aes192 =
+ {
+ "AES192", rijndael192_names, rijndael192_oids, 16, 192, sizeof (RIJNDAEL_context),
+ rijndael_setkey, rijndael_encrypt, rijndael_decrypt
+ };
+
+static const char *rijndael256_names[] =
+ {
+ "RIJNDAEL256",
+ "AES-256",
+ NULL
+ };
+
+static gcry_cipher_oid_spec_t rijndael256_oids[] =
+ {
+ { "2.16.840.1.101.3.4.1.41", GCRY_CIPHER_MODE_ECB },
+ { "2.16.840.1.101.3.4.1.42", GCRY_CIPHER_MODE_CBC },
+ { "2.16.840.1.101.3.4.1.43", GCRY_CIPHER_MODE_OFB },
+ { "2.16.840.1.101.3.4.1.44", GCRY_CIPHER_MODE_CFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_aes256 =
+ {
+ "AES256", rijndael256_names, rijndael256_oids, 16, 256,
+ sizeof (RIJNDAEL_context),
+ rijndael_setkey, rijndael_encrypt, rijndael_decrypt
+ };
+
+
+
+GRUB_MOD_INIT(gcry_rijndael)
+{
+ grub_cipher_register (&_gcry_cipher_spec_aes);
+ grub_cipher_register (&_gcry_cipher_spec_aes192);
+ grub_cipher_register (&_gcry_cipher_spec_aes256);
+}
+
+GRUB_MOD_FINI(gcry_rijndael)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_aes);
+ grub_cipher_unregister (&_gcry_cipher_spec_aes192);
+ grub_cipher_unregister (&_gcry_cipher_spec_aes256);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/rmd.h b/grub-core/lib/libgcrypt-grub/cipher/rmd.h
new file mode 100644
index 0000000..1f11382
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/rmd.h
@@ -0,0 +1,40 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+/* rmd.h - RIPE-MD hash functions
+ * Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+#ifndef G10_RMD_H
+#define G10_RMD_H
+
+
+/* We need this here because random.c must have direct access. */
+typedef struct
+{
+ u32 h0,h1,h2,h3,h4;
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} RMD160_CONTEXT;
+
+void _gcry_rmd160_init ( void *context );
+void _gcry_rmd160_mixblock ( RMD160_CONTEXT *hd, void *blockof64byte );
+
+#endif /*G10_RMD_H*/
+
diff --git a/grub-core/lib/libgcrypt-grub/cipher/rmd160.c b/grub-core/lib/libgcrypt-grub/cipher/rmd160.c
new file mode 100644
index 0000000..9c35e45
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/rmd160.c
@@ -0,0 +1,575 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* rmd160.c - RIPE-MD160
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+
+#include "g10lib.h"
+#include "memory.h"
+#include "rmd.h"
+#include "cipher.h" /* Only used for the rmd160_hash_buffer() prototype. */
+
+#include "bithelp.h"
+
+/*********************************
+ * RIPEMD-160 is not patented, see (as of 25.10.97)
+ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
+ * Note that the code uses Little Endian byteorder, which is good for
+ * 386 etc, but we must add some conversion when used on a big endian box.
+ *
+ *
+ * Pseudo-code for RIPEMD-160
+ *
+ * RIPEMD-160 is an iterative hash function that operates on 32-bit words.
+ * The round function takes as input a 5-word chaining variable and a 16-word
+ * message block and maps this to a new chaining variable. All operations are
+ * defined on 32-bit words. Padding is identical to that of MD4.
+ *
+ *
+ * RIPEMD-160: definitions
+ *
+ *
+ * nonlinear functions at bit level: exor, mux, -, mux, -
+ *
+ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15)
+ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31)
+ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47)
+ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63)
+ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79)
+ *
+ *
+ * added constants (hexadecimal)
+ *
+ * K(j) = 0x00000000 (0 <= j <= 15)
+ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2))
+ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3))
+ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5))
+ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7))
+ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2))
+ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3))
+ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5))
+ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7))
+ * K'(j) = 0x00000000 (64 <= j <= 79)
+ *
+ *
+ * selection of message word
+ *
+ * r(j) = j (0 <= j <= 15)
+ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8
+ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12
+ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2
+ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
+ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12
+ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2
+ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13
+ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14
+ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
+ *
+ *
+ * amount for rotate left (rol)
+ *
+ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8
+ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12
+ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5
+ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12
+ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
+ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6
+ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11
+ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5
+ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8
+ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
+ *
+ *
+ * initial value (hexadecimal)
+ *
+ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476;
+ * h4 = 0xC3D2E1F0;
+ *
+ *
+ * RIPEMD-160: pseudo-code
+ *
+ * It is assumed that the message after padding consists of t 16-word blocks
+ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15.
+ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left
+ * shift (rotate) over s positions.
+ *
+ *
+ * for i := 0 to t-1 {
+ * A := h0; B := h1; C := h2; D = h3; E = h4;
+ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4;
+ * for j := 0 to 79 {
+ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E;
+ * A := E; E := D; D := rol_10(C); C := B; B := T;
+ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)]
+ [+] K'(j)) [+] E';
+ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T;
+ * }
+ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A';
+ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T;
+ * }
+ */
+
+/* Some examples:
+ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31
+ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
+ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc
+ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36
+ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc
+ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b
+ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189
+ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb
+ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528
+ */
+
+
+void
+_gcry_rmd160_init (void *context)
+{
+ RMD160_CONTEXT *hd = context;
+
+ hd->h0 = 0x67452301;
+ hd->h1 = 0xEFCDAB89;
+ hd->h2 = 0x98BADCFE;
+ hd->h3 = 0x10325476;
+ hd->h4 = 0xC3D2E1F0;
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+
+/****************
+ * Transform the message X which consists of 16 32-bit-words
+ */
+static void
+transform ( RMD160_CONTEXT *hd, const unsigned char *data )
+{
+ register u32 a,b,c,d,e;
+ u32 aa,bb,cc,dd,ee,t;
+#ifdef WORDS_BIGENDIAN
+ u32 x[16];
+ {
+ int i;
+ byte *p2, *p1;
+ for (i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+#else
+ /* This version is better because it is always aligned;
+ * The performance penalty on a 586-100 is about 6% which
+ * is acceptable - because the data is more local it might
+ * also be possible that this is faster on some machines.
+ * This function (when compiled with -02 on gcc 2.7.2)
+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */
+ u32 x[16];
+ memcpy( x, data, 64 );
+#endif
+
+
+#define K0 0x00000000
+#define K1 0x5A827999
+#define K2 0x6ED9EBA1
+#define K3 0x8F1BBCDC
+#define K4 0xA953FD4E
+#define KK0 0x50A28BE6
+#define KK1 0x5C4DD124
+#define KK2 0x6D703EF3
+#define KK3 0x7A6D76E9
+#define KK4 0x00000000
+#define F0(x,y,z) ( (x) ^ (y) ^ (z) )
+#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) )
+#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) )
+#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) )
+#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) )
+#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \
+ a = rol(t,s) + e; \
+ c = rol(c,10); \
+ } while(0)
+
+ /* left lane */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ R( a, b, c, d, e, F0, K0, 0, 11 );
+ R( e, a, b, c, d, F0, K0, 1, 14 );
+ R( d, e, a, b, c, F0, K0, 2, 15 );
+ R( c, d, e, a, b, F0, K0, 3, 12 );
+ R( b, c, d, e, a, F0, K0, 4, 5 );
+ R( a, b, c, d, e, F0, K0, 5, 8 );
+ R( e, a, b, c, d, F0, K0, 6, 7 );
+ R( d, e, a, b, c, F0, K0, 7, 9 );
+ R( c, d, e, a, b, F0, K0, 8, 11 );
+ R( b, c, d, e, a, F0, K0, 9, 13 );
+ R( a, b, c, d, e, F0, K0, 10, 14 );
+ R( e, a, b, c, d, F0, K0, 11, 15 );
+ R( d, e, a, b, c, F0, K0, 12, 6 );
+ R( c, d, e, a, b, F0, K0, 13, 7 );
+ R( b, c, d, e, a, F0, K0, 14, 9 );
+ R( a, b, c, d, e, F0, K0, 15, 8 );
+ R( e, a, b, c, d, F1, K1, 7, 7 );
+ R( d, e, a, b, c, F1, K1, 4, 6 );
+ R( c, d, e, a, b, F1, K1, 13, 8 );
+ R( b, c, d, e, a, F1, K1, 1, 13 );
+ R( a, b, c, d, e, F1, K1, 10, 11 );
+ R( e, a, b, c, d, F1, K1, 6, 9 );
+ R( d, e, a, b, c, F1, K1, 15, 7 );
+ R( c, d, e, a, b, F1, K1, 3, 15 );
+ R( b, c, d, e, a, F1, K1, 12, 7 );
+ R( a, b, c, d, e, F1, K1, 0, 12 );
+ R( e, a, b, c, d, F1, K1, 9, 15 );
+ R( d, e, a, b, c, F1, K1, 5, 9 );
+ R( c, d, e, a, b, F1, K1, 2, 11 );
+ R( b, c, d, e, a, F1, K1, 14, 7 );
+ R( a, b, c, d, e, F1, K1, 11, 13 );
+ R( e, a, b, c, d, F1, K1, 8, 12 );
+ R( d, e, a, b, c, F2, K2, 3, 11 );
+ R( c, d, e, a, b, F2, K2, 10, 13 );
+ R( b, c, d, e, a, F2, K2, 14, 6 );
+ R( a, b, c, d, e, F2, K2, 4, 7 );
+ R( e, a, b, c, d, F2, K2, 9, 14 );
+ R( d, e, a, b, c, F2, K2, 15, 9 );
+ R( c, d, e, a, b, F2, K2, 8, 13 );
+ R( b, c, d, e, a, F2, K2, 1, 15 );
+ R( a, b, c, d, e, F2, K2, 2, 14 );
+ R( e, a, b, c, d, F2, K2, 7, 8 );
+ R( d, e, a, b, c, F2, K2, 0, 13 );
+ R( c, d, e, a, b, F2, K2, 6, 6 );
+ R( b, c, d, e, a, F2, K2, 13, 5 );
+ R( a, b, c, d, e, F2, K2, 11, 12 );
+ R( e, a, b, c, d, F2, K2, 5, 7 );
+ R( d, e, a, b, c, F2, K2, 12, 5 );
+ R( c, d, e, a, b, F3, K3, 1, 11 );
+ R( b, c, d, e, a, F3, K3, 9, 12 );
+ R( a, b, c, d, e, F3, K3, 11, 14 );
+ R( e, a, b, c, d, F3, K3, 10, 15 );
+ R( d, e, a, b, c, F3, K3, 0, 14 );
+ R( c, d, e, a, b, F3, K3, 8, 15 );
+ R( b, c, d, e, a, F3, K3, 12, 9 );
+ R( a, b, c, d, e, F3, K3, 4, 8 );
+ R( e, a, b, c, d, F3, K3, 13, 9 );
+ R( d, e, a, b, c, F3, K3, 3, 14 );
+ R( c, d, e, a, b, F3, K3, 7, 5 );
+ R( b, c, d, e, a, F3, K3, 15, 6 );
+ R( a, b, c, d, e, F3, K3, 14, 8 );
+ R( e, a, b, c, d, F3, K3, 5, 6 );
+ R( d, e, a, b, c, F3, K3, 6, 5 );
+ R( c, d, e, a, b, F3, K3, 2, 12 );
+ R( b, c, d, e, a, F4, K4, 4, 9 );
+ R( a, b, c, d, e, F4, K4, 0, 15 );
+ R( e, a, b, c, d, F4, K4, 5, 5 );
+ R( d, e, a, b, c, F4, K4, 9, 11 );
+ R( c, d, e, a, b, F4, K4, 7, 6 );
+ R( b, c, d, e, a, F4, K4, 12, 8 );
+ R( a, b, c, d, e, F4, K4, 2, 13 );
+ R( e, a, b, c, d, F4, K4, 10, 12 );
+ R( d, e, a, b, c, F4, K4, 14, 5 );
+ R( c, d, e, a, b, F4, K4, 1, 12 );
+ R( b, c, d, e, a, F4, K4, 3, 13 );
+ R( a, b, c, d, e, F4, K4, 8, 14 );
+ R( e, a, b, c, d, F4, K4, 11, 11 );
+ R( d, e, a, b, c, F4, K4, 6, 8 );
+ R( c, d, e, a, b, F4, K4, 15, 5 );
+ R( b, c, d, e, a, F4, K4, 13, 6 );
+
+ aa = a; bb = b; cc = c; dd = d; ee = e;
+
+ /* right lane */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ R( a, b, c, d, e, F4, KK0, 5, 8);
+ R( e, a, b, c, d, F4, KK0, 14, 9);
+ R( d, e, a, b, c, F4, KK0, 7, 9);
+ R( c, d, e, a, b, F4, KK0, 0, 11);
+ R( b, c, d, e, a, F4, KK0, 9, 13);
+ R( a, b, c, d, e, F4, KK0, 2, 15);
+ R( e, a, b, c, d, F4, KK0, 11, 15);
+ R( d, e, a, b, c, F4, KK0, 4, 5);
+ R( c, d, e, a, b, F4, KK0, 13, 7);
+ R( b, c, d, e, a, F4, KK0, 6, 7);
+ R( a, b, c, d, e, F4, KK0, 15, 8);
+ R( e, a, b, c, d, F4, KK0, 8, 11);
+ R( d, e, a, b, c, F4, KK0, 1, 14);
+ R( c, d, e, a, b, F4, KK0, 10, 14);
+ R( b, c, d, e, a, F4, KK0, 3, 12);
+ R( a, b, c, d, e, F4, KK0, 12, 6);
+ R( e, a, b, c, d, F3, KK1, 6, 9);
+ R( d, e, a, b, c, F3, KK1, 11, 13);
+ R( c, d, e, a, b, F3, KK1, 3, 15);
+ R( b, c, d, e, a, F3, KK1, 7, 7);
+ R( a, b, c, d, e, F3, KK1, 0, 12);
+ R( e, a, b, c, d, F3, KK1, 13, 8);
+ R( d, e, a, b, c, F3, KK1, 5, 9);
+ R( c, d, e, a, b, F3, KK1, 10, 11);
+ R( b, c, d, e, a, F3, KK1, 14, 7);
+ R( a, b, c, d, e, F3, KK1, 15, 7);
+ R( e, a, b, c, d, F3, KK1, 8, 12);
+ R( d, e, a, b, c, F3, KK1, 12, 7);
+ R( c, d, e, a, b, F3, KK1, 4, 6);
+ R( b, c, d, e, a, F3, KK1, 9, 15);
+ R( a, b, c, d, e, F3, KK1, 1, 13);
+ R( e, a, b, c, d, F3, KK1, 2, 11);
+ R( d, e, a, b, c, F2, KK2, 15, 9);
+ R( c, d, e, a, b, F2, KK2, 5, 7);
+ R( b, c, d, e, a, F2, KK2, 1, 15);
+ R( a, b, c, d, e, F2, KK2, 3, 11);
+ R( e, a, b, c, d, F2, KK2, 7, 8);
+ R( d, e, a, b, c, F2, KK2, 14, 6);
+ R( c, d, e, a, b, F2, KK2, 6, 6);
+ R( b, c, d, e, a, F2, KK2, 9, 14);
+ R( a, b, c, d, e, F2, KK2, 11, 12);
+ R( e, a, b, c, d, F2, KK2, 8, 13);
+ R( d, e, a, b, c, F2, KK2, 12, 5);
+ R( c, d, e, a, b, F2, KK2, 2, 14);
+ R( b, c, d, e, a, F2, KK2, 10, 13);
+ R( a, b, c, d, e, F2, KK2, 0, 13);
+ R( e, a, b, c, d, F2, KK2, 4, 7);
+ R( d, e, a, b, c, F2, KK2, 13, 5);
+ R( c, d, e, a, b, F1, KK3, 8, 15);
+ R( b, c, d, e, a, F1, KK3, 6, 5);
+ R( a, b, c, d, e, F1, KK3, 4, 8);
+ R( e, a, b, c, d, F1, KK3, 1, 11);
+ R( d, e, a, b, c, F1, KK3, 3, 14);
+ R( c, d, e, a, b, F1, KK3, 11, 14);
+ R( b, c, d, e, a, F1, KK3, 15, 6);
+ R( a, b, c, d, e, F1, KK3, 0, 14);
+ R( e, a, b, c, d, F1, KK3, 5, 6);
+ R( d, e, a, b, c, F1, KK3, 12, 9);
+ R( c, d, e, a, b, F1, KK3, 2, 12);
+ R( b, c, d, e, a, F1, KK3, 13, 9);
+ R( a, b, c, d, e, F1, KK3, 9, 12);
+ R( e, a, b, c, d, F1, KK3, 7, 5);
+ R( d, e, a, b, c, F1, KK3, 10, 15);
+ R( c, d, e, a, b, F1, KK3, 14, 8);
+ R( b, c, d, e, a, F0, KK4, 12, 8);
+ R( a, b, c, d, e, F0, KK4, 15, 5);
+ R( e, a, b, c, d, F0, KK4, 10, 12);
+ R( d, e, a, b, c, F0, KK4, 4, 9);
+ R( c, d, e, a, b, F0, KK4, 1, 12);
+ R( b, c, d, e, a, F0, KK4, 5, 5);
+ R( a, b, c, d, e, F0, KK4, 8, 14);
+ R( e, a, b, c, d, F0, KK4, 7, 6);
+ R( d, e, a, b, c, F0, KK4, 6, 8);
+ R( c, d, e, a, b, F0, KK4, 2, 13);
+ R( b, c, d, e, a, F0, KK4, 13, 6);
+ R( a, b, c, d, e, F0, KK4, 14, 5);
+ R( e, a, b, c, d, F0, KK4, 0, 15);
+ R( d, e, a, b, c, F0, KK4, 3, 13);
+ R( c, d, e, a, b, F0, KK4, 9, 11);
+ R( b, c, d, e, a, F0, KK4, 11, 11);
+
+
+ t = hd->h1 + d + cc;
+ hd->h1 = hd->h2 + e + dd;
+ hd->h2 = hd->h3 + a + ee;
+ hd->h3 = hd->h4 + b + aa;
+ hd->h4 = hd->h0 + c + bb;
+ hd->h0 = t;
+}
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+rmd160_write ( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ RMD160_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (108+5*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ rmd160_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ _gcry_burn_stack (108+5*sizeof(void*));
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+/****************
+ * Apply the rmd160 transform function on the buffer which must have
+ * a length 64 bytes. Do not use this function together with the
+ * other functions, use rmd160_init to initialize internal variables.
+ * Returns: 16 bytes in buffer with the mixed contentes of buffer.
+ */
+void
+_gcry_rmd160_mixblock ( RMD160_CONTEXT *hd, void *blockof64byte )
+{
+ char *p = blockof64byte;
+
+ transform ( hd, blockof64byte );
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+#undef X
+}
+
+
+/* The routine terminates the computation
+ */
+
+static void
+rmd160_final( void *context )
+{
+ RMD160_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ rmd160_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ rmd160_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (108+5*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \
+ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
+#else /* little endian */
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#endif
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+#undef X
+}
+
+static byte *
+rmd160_read( void *context )
+{
+ RMD160_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+
+
+/****************
+ * Shortcut functions which puts the hash value of the supplied buffer
+ * into outbuf which must have a size of 20 bytes.
+ */
+
+static byte asn[15] = /* Object ID is 1.3.36.3.2.1 */
+ { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x24, 0x03,
+ 0x02, 0x01, 0x05, 0x00, 0x04, 0x14 };
+
+static gcry_md_oid_spec_t oid_spec_rmd160[] =
+ {
+ /* rsaSignatureWithripemd160 */
+ { "1.3.36.3.3.1.2" },
+ /* TeleTrust hash algorithm. */
+ { "1.3.36.3.2.1" },
+ { NULL }
+ };
+
+gcry_md_spec_t _gcry_digest_spec_rmd160 =
+ {
+ "RIPEMD160", asn, DIM (asn), oid_spec_rmd160, 20,
+ _gcry_rmd160_init, rmd160_write, rmd160_final, rmd160_read,
+ sizeof (RMD160_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+
+GRUB_MOD_INIT(gcry_rmd160)
+{
+ grub_md_register (&_gcry_digest_spec_rmd160);
+}
+
+GRUB_MOD_FINI(gcry_rmd160)
+{
+ grub_md_unregister (&_gcry_digest_spec_rmd160);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/rsa.c b/grub-core/lib/libgcrypt-grub/cipher/rsa.c
new file mode 100644
index 0000000..168af84
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/rsa.c
@@ -0,0 +1,1160 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* rsa.c - RSA implementation
+ * Copyright (C) 1997, 1998, 1999 by Werner Koch (dd9jn)
+ * Copyright (C) 2000, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* This code uses an algorithm protected by U.S. Patent #4,405,829
+ which expired on September 20, 2000. The patent holder placed that
+ patent into the public domain on Sep 6th, 2000.
+*/
+
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+
+typedef struct
+{
+ gcry_mpi_t n; /* modulus */
+ gcry_mpi_t e; /* exponent */
+} RSA_public_key;
+
+
+typedef struct
+{
+ gcry_mpi_t n; /* public modulus */
+ gcry_mpi_t e; /* public exponent */
+ gcry_mpi_t d; /* exponent */
+ gcry_mpi_t p; /* prime p. */
+ gcry_mpi_t q; /* prime q. */
+ gcry_mpi_t u; /* inverse of p mod q. */
+} RSA_secret_key;
+
+
+/* A sample 1024 bit RSA key used for the selftests. */
+static const char sample_secret_key[] =
+"(private-key"
+" (rsa"
+" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa"
+" 2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291"
+" ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7"
+" 891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)"
+" (e #010001#)"
+" (d #046129f2489d71579be0a75fe029bd6cdb574ebf57ea8a5b0fda942cab943b11"
+" 7d7bb95e5d28875e0f9fc5fcc06a72f6d502464dabded78ef6b716177b83d5bd"
+" c543dc5d3fed932e59f5897e92e6f58a0f33424106a3b6fa2cbf877510e4ac21"
+" c3ee47851e97d12996222ac3566d4ccb0b83d164074abf7de655fc2446da1781#)"
+" (p #00e861b700e17e8afe6837e7512e35b6ca11d0ae47d8b85161c67baf64377213"
+" fe52d772f2035b3ca830af41d8a4120e1c1c70d12cc22f00d28d31dd48a8d424f1#)"
+" (q #00f7a7ca5367c661f8e62df34f0d05c10c88e5492348dd7bddc942c9a8f369f9"
+" 35a07785d2db805215ed786e4285df1658eed3ce84f469b81b50d358407b4ad361#)"
+" (u #304559a9ead56d2309d203811a641bb1a09626bc8eb36fffa23c968ec5bd891e"
+" ebbafc73ae666e01ba7c8990bae06cc2bbe10b75e69fcacb353a6473079d8e9b#)))";
+/* A sample 1024 bit RSA key used for the selftests (public only). */
+static const char sample_public_key[] =
+"(public-key"
+" (rsa"
+" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa"
+" 2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291"
+" ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7"
+" 891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)"
+" (e #010001#)))";
+
+
+
+
+static int test_keys (RSA_secret_key *sk, unsigned nbits);
+static int check_secret_key (RSA_secret_key *sk);
+static void public (gcry_mpi_t output, gcry_mpi_t input, RSA_public_key *skey);
+static void secret (gcry_mpi_t output, gcry_mpi_t input, RSA_secret_key *skey);
+
+
+/* Check that a freshly generated key actually works. Returns 0 on success. */
+static int
+test_keys (RSA_secret_key *sk, unsigned int nbits)
+{
+ int result = -1; /* Default to failure. */
+ RSA_public_key pk;
+ gcry_mpi_t plaintext = gcry_mpi_new (nbits);
+ gcry_mpi_t ciphertext = gcry_mpi_new (nbits);
+ gcry_mpi_t decr_plaintext = gcry_mpi_new (nbits);
+ gcry_mpi_t signature = gcry_mpi_new (nbits);
+
+ /* Put the relevant parameters into a public key structure. */
+ pk.n = sk->n;
+ pk.e = sk->e;
+
+ /* Create a random plaintext. */
+ gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
+
+ /* Encrypt using the public key. */
+ public (ciphertext, plaintext, &pk);
+
+ /* Check that the cipher text does not match the plaintext. */
+ if (!gcry_mpi_cmp (ciphertext, plaintext))
+ goto leave; /* Ciphertext is identical to the plaintext. */
+
+ /* Decrypt using the secret key. */
+ secret (decr_plaintext, ciphertext, sk);
+
+ /* Check that the decrypted plaintext matches the original plaintext. */
+ if (gcry_mpi_cmp (decr_plaintext, plaintext))
+ goto leave; /* Plaintext does not match. */
+
+ /* Create another random plaintext as data for signature checking. */
+ gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
+
+ /* Use the RSA secret function to create a signature of the plaintext. */
+ secret (signature, plaintext, sk);
+
+ /* Use the RSA public function to verify this signature. */
+ public (decr_plaintext, signature, &pk);
+ if (gcry_mpi_cmp (decr_plaintext, plaintext))
+ goto leave; /* Signature does not match. */
+
+ /* Modify the signature and check that the signing fails. */
+ gcry_mpi_add_ui (signature, signature, 1);
+ public (decr_plaintext, signature, &pk);
+ if (!gcry_mpi_cmp (decr_plaintext, plaintext))
+ goto leave; /* Signature matches but should not. */
+
+ result = 0; /* All tests succeeded. */
+
+ leave:
+ gcry_mpi_release (signature);
+ gcry_mpi_release (decr_plaintext);
+ gcry_mpi_release (ciphertext);
+ gcry_mpi_release (plaintext);
+ return result;
+}
+
+
+/* Callback used by the prime generation to test whether the exponent
+ is suitable. Returns 0 if the test has been passed. */
+static int
+check_exponent (void *arg, gcry_mpi_t a)
+{
+ gcry_mpi_t e = arg;
+ gcry_mpi_t tmp;
+ int result;
+
+ mpi_sub_ui (a, a, 1);
+ tmp = _gcry_mpi_alloc_like (a);
+ result = !gcry_mpi_gcd(tmp, e, a); /* GCD is not 1. */
+ gcry_mpi_release (tmp);
+ mpi_add_ui (a, a, 1);
+ return result;
+}
+
+/****************
+ * Generate a key pair with a key of size NBITS.
+ * USE_E = 0 let Libcgrypt decide what exponent to use.
+ * = 1 request the use of a "secure" exponent; this is required by some
+ * specification to be 65537.
+ * > 2 Use this public exponent. If the given exponent
+ * is not odd one is internally added to it.
+ * TRANSIENT_KEY: If true, generate the primes using the standard RNG.
+ * Returns: 2 structures filled with all needed values
+ */
+static gpg_err_code_t
+generate_std (RSA_secret_key *sk, unsigned int nbits, unsigned long use_e,
+ int transient_key)
+{
+ gcry_mpi_t p, q; /* the two primes */
+ gcry_mpi_t d; /* the private key */
+ gcry_mpi_t u;
+ gcry_mpi_t t1, t2;
+ gcry_mpi_t n; /* the public key */
+ gcry_mpi_t e; /* the exponent */
+ gcry_mpi_t phi; /* helper: (p-1)(q-1) */
+ gcry_mpi_t g;
+ gcry_mpi_t f;
+ gcry_random_level_t random_level;
+
+ if (fips_mode ())
+ {
+ if (nbits < 1024)
+ return GPG_ERR_INV_VALUE;
+ if (transient_key)
+ return GPG_ERR_INV_VALUE;
+ }
+
+ /* The random quality depends on the transient_key flag. */
+ random_level = transient_key ? GCRY_STRONG_RANDOM : GCRY_VERY_STRONG_RANDOM;
+
+ /* Make sure that nbits is even so that we generate p, q of equal size. */
+ if ( (nbits&1) )
+ nbits++;
+
+ if (use_e == 1) /* Alias for a secure value */
+ use_e = 65537; /* as demanded by Sphinx. */
+
+ /* Public exponent:
+ In general we use 41 as this is quite fast and more secure than the
+ commonly used 17. Benchmarking the RSA verify function
+ with a 1024 bit key yields (2001-11-08):
+ e=17 0.54 ms
+ e=41 0.75 ms
+ e=257 0.95 ms
+ e=65537 1.80 ms
+ */
+ e = mpi_alloc( (32+BITS_PER_MPI_LIMB-1)/BITS_PER_MPI_LIMB );
+ if (!use_e)
+ mpi_set_ui (e, 41); /* This is a reasonable secure and fast value */
+ else
+ {
+ use_e |= 1; /* make sure this is odd */
+ mpi_set_ui (e, use_e);
+ }
+
+ n = gcry_mpi_new (nbits);
+
+ p = q = NULL;
+ do
+ {
+ /* select two (very secret) primes */
+ if (p)
+ gcry_mpi_release (p);
+ if (q)
+ gcry_mpi_release (q);
+ if (use_e)
+ { /* Do an extra test to ensure that the given exponent is
+ suitable. */
+ p = _gcry_generate_secret_prime (nbits/2, random_level,
+ check_exponent, e);
+ q = _gcry_generate_secret_prime (nbits/2, random_level,
+ check_exponent, e);
+ }
+ else
+ { /* We check the exponent later. */
+ p = _gcry_generate_secret_prime (nbits/2, random_level, NULL, NULL);
+ q = _gcry_generate_secret_prime (nbits/2, random_level, NULL, NULL);
+ }
+ if (mpi_cmp (p, q) > 0 ) /* p shall be smaller than q (for calc of u)*/
+ mpi_swap(p,q);
+ /* calculate the modulus */
+ mpi_mul( n, p, q );
+ }
+ while ( mpi_get_nbits(n) != nbits );
+
+ /* calculate Euler totient: phi = (p-1)(q-1) */
+ t1 = mpi_alloc_secure( mpi_get_nlimbs(p) );
+ t2 = mpi_alloc_secure( mpi_get_nlimbs(p) );
+ phi = gcry_mpi_snew ( nbits );
+ g = gcry_mpi_snew ( nbits );
+ f = gcry_mpi_snew ( nbits );
+ mpi_sub_ui( t1, p, 1 );
+ mpi_sub_ui( t2, q, 1 );
+ mpi_mul( phi, t1, t2 );
+ gcry_mpi_gcd(g, t1, t2);
+ mpi_fdiv_q(f, phi, g);
+
+ while (!gcry_mpi_gcd(t1, e, phi)) /* (while gcd is not 1) */
+ {
+ if (use_e)
+ BUG (); /* The prime generator already made sure that we
+ never can get to here. */
+ mpi_add_ui (e, e, 2);
+ }
+
+ /* calculate the secret key d = e^1 mod phi */
+ d = gcry_mpi_snew ( nbits );
+ mpi_invm(d, e, f );
+ /* calculate the inverse of p and q (used for chinese remainder theorem)*/
+ u = gcry_mpi_snew ( nbits );
+ mpi_invm(u, p, q );
+
+ if( DBG_CIPHER )
+ {
+ log_mpidump(" p= ", p );
+ log_mpidump(" q= ", q );
+ log_mpidump("phi= ", phi );
+ log_mpidump(" g= ", g );
+ log_mpidump(" f= ", f );
+ log_mpidump(" n= ", n );
+ log_mpidump(" e= ", e );
+ log_mpidump(" d= ", d );
+ log_mpidump(" u= ", u );
+ }
+
+ gcry_mpi_release (t1);
+ gcry_mpi_release (t2);
+ gcry_mpi_release (phi);
+ gcry_mpi_release (f);
+ gcry_mpi_release (g);
+
+ sk->n = n;
+ sk->e = e;
+ sk->p = p;
+ sk->q = q;
+ sk->d = d;
+ sk->u = u;
+
+ /* Now we can test our keys. */
+ if (test_keys (sk, nbits - 64))
+ {
+ gcry_mpi_release (sk->n); sk->n = NULL;
+ gcry_mpi_release (sk->e); sk->e = NULL;
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->d); sk->d = NULL;
+ gcry_mpi_release (sk->u); sk->u = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ return GPG_ERR_SELFTEST_FAILED;
+ }
+
+ return 0;
+}
+
+
+/* Helper for generate_x931. */
+static gcry_mpi_t
+gen_x931_parm_xp (unsigned int nbits)
+{
+ gcry_mpi_t xp;
+
+ xp = gcry_mpi_snew (nbits);
+ gcry_mpi_randomize (xp, nbits, GCRY_VERY_STRONG_RANDOM);
+
+ /* The requirement for Xp is:
+
+ sqrt{2}*2^{nbits-1} <= xp <= 2^{nbits} - 1
+
+ We set the two high order bits to 1 to satisfy the lower bound.
+ By using mpi_set_highbit we make sure that the upper bound is
+ satisfied as well. */
+ mpi_set_highbit (xp, nbits-1);
+ mpi_set_bit (xp, nbits-2);
+ gcry_assert ( mpi_get_nbits (xp) == nbits );
+
+ return xp;
+}
+
+
+/* Helper for generate_x931. */
+static gcry_mpi_t
+gen_x931_parm_xi (void)
+{
+ gcry_mpi_t xi;
+
+ xi = gcry_mpi_snew (101);
+ gcry_mpi_randomize (xi, 101, GCRY_VERY_STRONG_RANDOM);
+ mpi_set_highbit (xi, 100);
+ gcry_assert ( mpi_get_nbits (xi) == 101 );
+
+ return xi;
+}
+
+
+
+/* Variant of the standard key generation code using the algorithm
+ from X9.31. Using this algorithm has the advantage that the
+ generation can be made deterministic which is required for CAVS
+ testing. */
+static gpg_err_code_t
+generate_x931 (RSA_secret_key *sk, unsigned int nbits, unsigned long e_value,
+ gcry_sexp_t deriveparms, int *swapped)
+{
+ gcry_mpi_t p, q; /* The two primes. */
+ gcry_mpi_t e; /* The public exponent. */
+ gcry_mpi_t n; /* The public key. */
+ gcry_mpi_t d; /* The private key */
+ gcry_mpi_t u; /* The inverse of p and q. */
+ gcry_mpi_t pm1; /* p - 1 */
+ gcry_mpi_t qm1; /* q - 1 */
+ gcry_mpi_t phi; /* Euler totient. */
+ gcry_mpi_t f, g; /* Helper. */
+
+ *swapped = 0;
+
+ if (e_value == 1) /* Alias for a secure value. */
+ e_value = 65537;
+
+ /* Point 1 of section 4.1: k = 1024 + 256s with S >= 0 */
+ if (nbits < 1024 || (nbits % 256))
+ return GPG_ERR_INV_VALUE;
+
+ /* Point 2: 2 <= bitlength(e) < 2^{k-2}
+ Note that we do not need to check the upper bound because we use
+ an unsigned long for E and thus there is no way for E to reach
+ that limit. */
+ if (e_value < 3)
+ return GPG_ERR_INV_VALUE;
+
+ /* Our implementaion requires E to be odd. */
+ if (!(e_value & 1))
+ return GPG_ERR_INV_VALUE;
+
+ /* Point 3: e > 0 or e 0 if it is to be randomly generated.
+ We support only a fixed E and thus there is no need for an extra test. */
+
+
+ /* Compute or extract the derive parameters. */
+ {
+ gcry_mpi_t xp1 = NULL;
+ gcry_mpi_t xp2 = NULL;
+ gcry_mpi_t xp = NULL;
+ gcry_mpi_t xq1 = NULL;
+ gcry_mpi_t xq2 = NULL;
+ gcry_mpi_t xq = NULL;
+ gcry_mpi_t tmpval;
+
+ if (!deriveparms)
+ {
+ /* Not given: Generate them. */
+ xp = gen_x931_parm_xp (nbits/2);
+ /* Make sure that |xp - xq| > 2^{nbits - 100} holds. */
+ tmpval = gcry_mpi_snew (nbits/2);
+ do
+ {
+ gcry_mpi_release (xq);
+ xq = gen_x931_parm_xp (nbits/2);
+ mpi_sub (tmpval, xp, xq);
+ }
+ while (mpi_get_nbits (tmpval) <= (nbits/2 - 100));
+ gcry_mpi_release (tmpval);
+
+ xp1 = gen_x931_parm_xi ();
+ xp2 = gen_x931_parm_xi ();
+ xq1 = gen_x931_parm_xi ();
+ xq2 = gen_x931_parm_xi ();
+
+ }
+ else
+ {
+ /* Parameters to derive the key are given. */
+ struct { const char *name; gcry_mpi_t *value; } tbl[] = {
+ { "Xp1", &xp1 },
+ { "Xp2", &xp2 },
+ { "Xp", &xp },
+ { "Xq1", &xq1 },
+ { "Xq2", &xq2 },
+ { "Xq", &xq },
+ { NULL, NULL }
+ };
+ int idx;
+ gcry_sexp_t oneparm;
+
+ for (idx=0; tbl[idx].name; idx++)
+ {
+ oneparm = gcry_sexp_find_token (deriveparms, tbl[idx].name, 0);
+ if (oneparm)
+ {
+ *tbl[idx].value = gcry_sexp_nth_mpi (oneparm, 1,
+ GCRYMPI_FMT_USG);
+ gcry_sexp_release (oneparm);
+ }
+ }
+ for (idx=0; tbl[idx].name; idx++)
+ if (!*tbl[idx].value)
+ break;
+ if (tbl[idx].name)
+ {
+ /* At least one parameter is missing. */
+ for (idx=0; tbl[idx].name; idx++)
+ gcry_mpi_release (*tbl[idx].value);
+ return GPG_ERR_MISSING_VALUE;
+ }
+ }
+
+ e = mpi_alloc_set_ui (e_value);
+
+ /* Find two prime numbers. */
+ p = _gcry_derive_x931_prime (xp, xp1, xp2, e, NULL, NULL);
+ q = _gcry_derive_x931_prime (xq, xq1, xq2, e, NULL, NULL);
+ gcry_mpi_release (xp); xp = NULL;
+ gcry_mpi_release (xp1); xp1 = NULL;
+ gcry_mpi_release (xp2); xp2 = NULL;
+ gcry_mpi_release (xq); xq = NULL;
+ gcry_mpi_release (xq1); xq1 = NULL;
+ gcry_mpi_release (xq2); xq2 = NULL;
+ if (!p || !q)
+ {
+ gcry_mpi_release (p);
+ gcry_mpi_release (q);
+ gcry_mpi_release (e);
+ return GPG_ERR_NO_PRIME;
+ }
+ }
+
+
+ /* Compute the public modulus. We make sure that p is smaller than
+ q to allow the use of the CRT. */
+ if (mpi_cmp (p, q) > 0 )
+ {
+ mpi_swap (p, q);
+ *swapped = 1;
+ }
+ n = gcry_mpi_new (nbits);
+ mpi_mul (n, p, q);
+
+ /* Compute the Euler totient: phi = (p-1)(q-1) */
+ pm1 = gcry_mpi_snew (nbits/2);
+ qm1 = gcry_mpi_snew (nbits/2);
+ phi = gcry_mpi_snew (nbits);
+ mpi_sub_ui (pm1, p, 1);
+ mpi_sub_ui (qm1, q, 1);
+ mpi_mul (phi, pm1, qm1);
+
+ g = gcry_mpi_snew (nbits);
+ gcry_assert (gcry_mpi_gcd (g, e, phi));
+
+ /* Compute: f = lcm(p-1,q-1) = phi / gcd(p-1,q-1) */
+ gcry_mpi_gcd (g, pm1, qm1);
+ f = pm1; pm1 = NULL;
+ gcry_mpi_release (qm1); qm1 = NULL;
+ mpi_fdiv_q (f, phi, g);
+ gcry_mpi_release (phi); phi = NULL;
+ d = g; g = NULL;
+ /* Compute the secret key: d = e^{-1} mod lcm(p-1,q-1) */
+ mpi_invm (d, e, f);
+
+ /* Compute the inverse of p and q. */
+ u = f; f = NULL;
+ mpi_invm (u, p, q );
+
+ if( DBG_CIPHER )
+ {
+ if (*swapped)
+ log_debug ("p and q are swapped\n");
+ log_mpidump(" p", p );
+ log_mpidump(" q", q );
+ log_mpidump(" n", n );
+ log_mpidump(" e", e );
+ log_mpidump(" d", d );
+ log_mpidump(" u", u );
+ }
+
+
+ sk->n = n;
+ sk->e = e;
+ sk->p = p;
+ sk->q = q;
+ sk->d = d;
+ sk->u = u;
+
+ /* Now we can test our keys. */
+ if (test_keys (sk, nbits - 64))
+ {
+ gcry_mpi_release (sk->n); sk->n = NULL;
+ gcry_mpi_release (sk->e); sk->e = NULL;
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->d); sk->d = NULL;
+ gcry_mpi_release (sk->u); sk->u = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ return GPG_ERR_SELFTEST_FAILED;
+ }
+
+ return 0;
+}
+
+
+/****************
+ * Test wether the secret key is valid.
+ * Returns: true if this is a valid key.
+ */
+static int
+check_secret_key( RSA_secret_key *sk )
+{
+ int rc;
+ gcry_mpi_t temp = mpi_alloc( mpi_get_nlimbs(sk->p)*2 );
+
+ mpi_mul(temp, sk->p, sk->q );
+ rc = mpi_cmp( temp, sk->n );
+ mpi_free(temp);
+ return !rc;
+}
+
+
+
+/****************
+ * Public key operation. Encrypt INPUT with PKEY and put result into OUTPUT.
+ *
+ * c = m^e mod n
+ *
+ * Where c is OUTPUT, m is INPUT and e,n are elements of PKEY.
+ */
+static void
+public(gcry_mpi_t output, gcry_mpi_t input, RSA_public_key *pkey )
+{
+ if( output == input ) /* powm doesn't like output and input the same */
+ {
+ gcry_mpi_t x = mpi_alloc( mpi_get_nlimbs(input)*2 );
+ mpi_powm( x, input, pkey->e, pkey->n );
+ mpi_set(output, x);
+ mpi_free(x);
+ }
+ else
+ mpi_powm( output, input, pkey->e, pkey->n );
+}
+
+#if 0
+static void
+stronger_key_check ( RSA_secret_key *skey )
+{
+ gcry_mpi_t t = mpi_alloc_secure ( 0 );
+ gcry_mpi_t t1 = mpi_alloc_secure ( 0 );
+ gcry_mpi_t t2 = mpi_alloc_secure ( 0 );
+ gcry_mpi_t phi = mpi_alloc_secure ( 0 );
+
+ /* check that n == p * q */
+ mpi_mul( t, skey->p, skey->q);
+ if (mpi_cmp( t, skey->n) )
+ log_info ( "RSA Oops: n != p * q\n" );
+
+ /* check that p is less than q */
+ if( mpi_cmp( skey->p, skey->q ) > 0 )
+ {
+ log_info ("RSA Oops: p >= q - fixed\n");
+ _gcry_mpi_swap ( skey->p, skey->q);
+ }
+
+ /* check that e divides neither p-1 nor q-1 */
+ mpi_sub_ui(t, skey->p, 1 );
+ mpi_fdiv_r(t, t, skey->e );
+ if ( !mpi_cmp_ui( t, 0) )
+ log_info ( "RSA Oops: e divides p-1\n" );
+ mpi_sub_ui(t, skey->q, 1 );
+ mpi_fdiv_r(t, t, skey->e );
+ if ( !mpi_cmp_ui( t, 0) )
+ log_info ( "RSA Oops: e divides q-1\n" );
+
+ /* check that d is correct */
+ mpi_sub_ui( t1, skey->p, 1 );
+ mpi_sub_ui( t2, skey->q, 1 );
+ mpi_mul( phi, t1, t2 );
+ gcry_mpi_gcd(t, t1, t2);
+ mpi_fdiv_q(t, phi, t);
+ mpi_invm(t, skey->e, t );
+ if ( mpi_cmp(t, skey->d ) )
+ {
+ log_info ( "RSA Oops: d is wrong - fixed\n");
+ mpi_set (skey->d, t);
+ _gcry_log_mpidump (" fixed d", skey->d);
+ }
+
+ /* check for correctness of u */
+ mpi_invm(t, skey->p, skey->q );
+ if ( mpi_cmp(t, skey->u ) )
+ {
+ log_info ( "RSA Oops: u is wrong - fixed\n");
+ mpi_set (skey->u, t);
+ _gcry_log_mpidump (" fixed u", skey->u);
+ }
+
+ log_info ( "RSA secret key check finished\n");
+
+ mpi_free (t);
+ mpi_free (t1);
+ mpi_free (t2);
+ mpi_free (phi);
+}
+#endif
+
+
+
+/****************
+ * Secret key operation. Encrypt INPUT with SKEY and put result into OUTPUT.
+ *
+ * m = c^d mod n
+ *
+ * Or faster:
+ *
+ * m1 = c ^ (d mod (p-1)) mod p
+ * m2 = c ^ (d mod (q-1)) mod q
+ * h = u * (m2 - m1) mod q
+ * m = m1 + h * p
+ *
+ * Where m is OUTPUT, c is INPUT and d,n,p,q,u are elements of SKEY.
+ */
+static void
+secret(gcry_mpi_t output, gcry_mpi_t input, RSA_secret_key *skey )
+{
+ if (!skey->p || !skey->q || !skey->u)
+ {
+ mpi_powm (output, input, skey->d, skey->n);
+ }
+ else
+ {
+ gcry_mpi_t m1 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+ gcry_mpi_t m2 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+ gcry_mpi_t h = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+
+ /* m1 = c ^ (d mod (p-1)) mod p */
+ mpi_sub_ui( h, skey->p, 1 );
+ mpi_fdiv_r( h, skey->d, h );
+ mpi_powm( m1, input, h, skey->p );
+ /* m2 = c ^ (d mod (q-1)) mod q */
+ mpi_sub_ui( h, skey->q, 1 );
+ mpi_fdiv_r( h, skey->d, h );
+ mpi_powm( m2, input, h, skey->q );
+ /* h = u * ( m2 - m1 ) mod q */
+ mpi_sub( h, m2, m1 );
+ if ( mpi_is_neg( h ) )
+ mpi_add ( h, h, skey->q );
+ mpi_mulm( h, skey->u, h, skey->q );
+ /* m = m2 + h * p */
+ mpi_mul ( h, h, skey->p );
+ mpi_add ( output, m1, h );
+
+ mpi_free ( h );
+ mpi_free ( m1 );
+ mpi_free ( m2 );
+ }
+}
+
+
+
+/* Perform RSA blinding. */
+static gcry_mpi_t
+rsa_blind (gcry_mpi_t x, gcry_mpi_t r, gcry_mpi_t e, gcry_mpi_t n)
+{
+ /* A helper. */
+ gcry_mpi_t a;
+
+ /* Result. */
+ gcry_mpi_t y;
+
+ a = gcry_mpi_snew (gcry_mpi_get_nbits (n));
+ y = gcry_mpi_snew (gcry_mpi_get_nbits (n));
+
+ /* Now we calculate: y = (x * r^e) mod n, where r is the random
+ number, e is the public exponent, x is the non-blinded data and n
+ is the RSA modulus. */
+ gcry_mpi_powm (a, r, e, n);
+ gcry_mpi_mulm (y, a, x, n);
+
+ gcry_mpi_release (a);
+
+ return y;
+}
+
+/* Undo RSA blinding. */
+static gcry_mpi_t
+rsa_unblind (gcry_mpi_t x, gcry_mpi_t ri, gcry_mpi_t n)
+{
+ gcry_mpi_t y;
+
+ y = gcry_mpi_snew (gcry_mpi_get_nbits (n));
+
+ /* Here we calculate: y = (x * r^-1) mod n, where x is the blinded
+ decrypted data, ri is the modular multiplicative inverse of r and
+ n is the RSA modulus. */
+
+ gcry_mpi_mulm (y, ri, x, n);
+
+ return y;
+}
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+
+static gcry_err_code_t
+rsa_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ RSA_secret_key sk;
+ gpg_err_code_t ec;
+ gcry_sexp_t deriveparms;
+ int transient_key = 0;
+ int use_x931 = 0;
+ gcry_sexp_t l1;
+
+ (void)algo;
+
+ *retfactors = NULL; /* We don't return them. */
+
+ deriveparms = (genparms?
+ gcry_sexp_find_token (genparms, "derive-parms", 0) : NULL);
+ if (!deriveparms)
+ {
+ /* Parse the optional "use-x931" flag. */
+ l1 = gcry_sexp_find_token (genparms, "use-x931", 0);
+ if (l1)
+ {
+ use_x931 = 1;
+ gcry_sexp_release (l1);
+ }
+ }
+
+ if (deriveparms || use_x931 || fips_mode ())
+ {
+ int swapped;
+ ec = generate_x931 (&sk, nbits, evalue, deriveparms, &swapped);
+ gcry_sexp_release (deriveparms);
+ if (!ec && r_extrainfo && swapped)
+ {
+ ec = gcry_sexp_new (r_extrainfo,
+ "(misc-key-info(p-q-swapped))", 0, 1);
+ if (ec)
+ {
+ gcry_mpi_release (sk.n); sk.n = NULL;
+ gcry_mpi_release (sk.e); sk.e = NULL;
+ gcry_mpi_release (sk.p); sk.p = NULL;
+ gcry_mpi_release (sk.q); sk.q = NULL;
+ gcry_mpi_release (sk.d); sk.d = NULL;
+ gcry_mpi_release (sk.u); sk.u = NULL;
+ }
+ }
+ }
+ else
+ {
+ /* Parse the optional "transient-key" flag. */
+ l1 = gcry_sexp_find_token (genparms, "transient-key", 0);
+ if (l1)
+ {
+ transient_key = 1;
+ gcry_sexp_release (l1);
+ }
+ /* Generate. */
+ ec = generate_std (&sk, nbits, evalue, transient_key);
+ }
+
+ if (!ec)
+ {
+ skey[0] = sk.n;
+ skey[1] = sk.e;
+ skey[2] = sk.d;
+ skey[3] = sk.p;
+ skey[4] = sk.q;
+ skey[5] = sk.u;
+ }
+
+ return ec;
+}
+
+
+static gcry_err_code_t
+rsa_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ return rsa_generate_ext (algo, nbits, evalue, NULL, skey, retfactors, NULL);
+}
+
+
+static gcry_err_code_t
+rsa_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ RSA_secret_key sk;
+
+ (void)algo;
+
+ sk.n = skey[0];
+ sk.e = skey[1];
+ sk.d = skey[2];
+ sk.p = skey[3];
+ sk.q = skey[4];
+ sk.u = skey[5];
+
+ if (!sk.p || !sk.q || !sk.u)
+ err = GPG_ERR_NO_OBJ; /* To check the key we need the optional
+ parameters. */
+ else if (!check_secret_key (&sk))
+ err = GPG_ERR_PUBKEY_ALGO;
+
+ return err;
+}
+
+
+static gcry_err_code_t
+rsa_encrypt (int algo, gcry_mpi_t *resarr, gcry_mpi_t data,
+ gcry_mpi_t *pkey, int flags)
+{
+ RSA_public_key pk;
+
+ (void)algo;
+ (void)flags;
+
+ pk.n = pkey[0];
+ pk.e = pkey[1];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (pk.n));
+ public (resarr[0], data, &pk);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+rsa_decrypt (int algo, gcry_mpi_t *result, gcry_mpi_t *data,
+ gcry_mpi_t *skey, int flags)
+{
+ RSA_secret_key sk;
+ gcry_mpi_t r = MPI_NULL; /* Random number needed for blinding. */
+ gcry_mpi_t ri = MPI_NULL; /* Modular multiplicative inverse of
+ r. */
+ gcry_mpi_t x = MPI_NULL; /* Data to decrypt. */
+ gcry_mpi_t y; /* Result. */
+
+ (void)algo;
+
+ /* Extract private key. */
+ sk.n = skey[0];
+ sk.e = skey[1];
+ sk.d = skey[2];
+ sk.p = skey[3]; /* Optional. */
+ sk.q = skey[4]; /* Optional. */
+ sk.u = skey[5]; /* Optional. */
+
+ y = gcry_mpi_snew (gcry_mpi_get_nbits (sk.n));
+
+ /* We use blinding by default to mitigate timing attacks which can
+ be practically mounted over the network as shown by Brumley and
+ Boney in 2003. */
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ {
+ /* Initialize blinding. */
+
+ /* First, we need a random number r between 0 and n - 1, which
+ is relatively prime to n (i.e. it is neither p nor q). The
+ random number needs to be only unpredictable, thus we employ
+ the gcry_create_nonce function by using GCRY_WEAK_RANDOM with
+ gcry_mpi_randomize. */
+ r = gcry_mpi_snew (gcry_mpi_get_nbits (sk.n));
+ ri = gcry_mpi_snew (gcry_mpi_get_nbits (sk.n));
+
+ gcry_mpi_randomize (r, gcry_mpi_get_nbits (sk.n), GCRY_WEAK_RANDOM);
+ gcry_mpi_mod (r, r, sk.n);
+
+ /* Calculate inverse of r. It practically impossible that the
+ follwing test fails, thus we do not add code to release
+ allocated resources. */
+ if (!gcry_mpi_invm (ri, r, sk.n))
+ return GPG_ERR_INTERNAL;
+ }
+
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ x = rsa_blind (data[0], r, sk.e, sk.n);
+ else
+ x = data[0];
+
+ /* Do the encryption. */
+ secret (y, x, &sk);
+
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ {
+ /* Undo blinding. */
+ gcry_mpi_t a = gcry_mpi_copy (y);
+
+ gcry_mpi_release (y);
+ y = rsa_unblind (a, ri, sk.n);
+
+ gcry_mpi_release (a);
+ }
+
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ {
+ /* Deallocate resources needed for blinding. */
+ gcry_mpi_release (x);
+ gcry_mpi_release (r);
+ gcry_mpi_release (ri);
+ }
+
+ /* Copy out result. */
+ *result = y;
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+rsa_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ RSA_secret_key sk;
+
+ (void)algo;
+
+ sk.n = skey[0];
+ sk.e = skey[1];
+ sk.d = skey[2];
+ sk.p = skey[3];
+ sk.q = skey[4];
+ sk.u = skey[5];
+ resarr[0] = mpi_alloc( mpi_get_nlimbs (sk.n));
+ secret (resarr[0], data, &sk);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+rsa_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp) (void *opaque, gcry_mpi_t tmp),
+ void *opaquev)
+{
+ RSA_public_key pk;
+ gcry_mpi_t result;
+ gcry_err_code_t rc;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ pk.n = pkey[0];
+ pk.e = pkey[1];
+ result = gcry_mpi_new ( 160 );
+ public( result, data[0], &pk );
+#ifdef IS_DEVELOPMENT_VERSION
+ if (DBG_CIPHER)
+ {
+ log_mpidump ("rsa verify result:", result );
+ log_mpidump (" hash:", hash );
+ }
+#endif /*IS_DEVELOPMENT_VERSION*/
+ /*rc = (*cmp)( opaquev, result );*/
+ rc = mpi_cmp (result, hash) ? GPG_ERR_BAD_SIGNATURE : GPG_ERR_NO_ERROR;
+ gcry_mpi_release (result);
+
+ return rc;
+}
+
+
+static unsigned int
+rsa_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+/* Compute a keygrip. MD is the hash context which we are going to
+ update. KEYPARAM is an S-expression with the key parameters, this
+ is usually a public key but may also be a secret key. An example
+ of such an S-expression is:
+
+ (rsa
+ (n #00B...#)
+ (e #010001#))
+
+ PKCS-15 says that for RSA only the modulus should be hashed -
+ however, it is not clear wether this is meant to use the raw bytes
+ (assuming this is an unsigned integer) or whether the DER required
+ 0 should be prefixed. We hash the raw bytes. */
+static gpg_err_code_t
+compute_keygrip (gcry_md_hd_t md, gcry_sexp_t keyparam)
+{
+ gcry_sexp_t l1;
+ const char *data;
+ size_t datalen;
+
+ l1 = gcry_sexp_find_token (keyparam, "n", 1);
+ if (!l1)
+ return GPG_ERR_NO_OBJ;
+
+ data = gcry_sexp_nth_data (l1, 1, &datalen);
+ if (!data)
+ {
+ gcry_sexp_release (l1);
+ return GPG_ERR_NO_OBJ;
+ }
+
+ gcry_md_write (md, data, datalen);
+ gcry_sexp_release (l1);
+
+ return 0;
+}
+
+
+
+
+/*
+ Self-test section.
+ */
+
+
+
+
+/* Given an S-expression ENCR_DATA of the form:
+
+ (enc-val
+ (rsa
+ (a a-value)))
+
+ as returned by gcry_pk_decrypt, return the the A-VALUE. On error,
+ return NULL. */
+static gcry_mpi_t
+extract_a_from_sexp (gcry_sexp_t encr_data)
+{
+ gcry_sexp_t l1, l2, l3;
+ gcry_mpi_t a_value;
+
+ l1 = gcry_sexp_find_token (encr_data, "enc-val", 0);
+ if (!l1)
+ return NULL;
+ l2 = gcry_sexp_find_token (l1, "rsa", 0);
+ gcry_sexp_release (l1);
+ if (!l2)
+ return NULL;
+ l3 = gcry_sexp_find_token (l2, "a", 0);
+ gcry_sexp_release (l2);
+ if (!l3)
+ return NULL;
+ a_value = gcry_sexp_nth_mpi (l3, 1, 0);
+ gcry_sexp_release (l3);
+
+ return a_value;
+}
+
+
+
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+
+static const char *rsa_names[] =
+ {
+ "rsa",
+ "openpgp-rsa",
+ "oid.1.2.840.113549.1.1.1",
+ NULL,
+ };
+
+gcry_pk_spec_t _gcry_pubkey_spec_rsa =
+ {
+ "RSA", rsa_names,
+ "ne", "nedpqu", "a", "s", "n",
+ GCRY_PK_USAGE_SIGN | GCRY_PK_USAGE_ENCR,
+ rsa_generate,
+ rsa_check_secret_key,
+ rsa_encrypt,
+ rsa_decrypt,
+ rsa_sign,
+ rsa_verify,
+ rsa_get_nbits,
+ };
+pk_extra_spec_t _gcry_pubkey_extraspec_rsa =
+ {
+ run_selftests,
+ rsa_generate_ext,
+ compute_keygrip
+ };
+
diff --git a/grub-core/lib/libgcrypt-grub/cipher/seed.c b/grub-core/lib/libgcrypt-grub/cipher/seed.c
new file mode 100644
index 0000000..8f47a29
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/seed.c
@@ -0,0 +1,458 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* SEED for libgcrypt
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * --
+ * This implementation was provided for libgcrypt in public domain
+ * by Hye-Shik Chang <perky@FreeBSD.org>, July 2006.
+ */
+
+
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+#define NUMKC 16
+
+#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ \
+ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
+#define PUTU32(ct, st) { (ct)[0] = (byte)((st) >> 24); \
+ (ct)[1] = (byte)((st) >> 16); \
+ (ct)[2] = (byte)((st) >> 8); \
+ (ct)[3] = (byte)(st); }
+
+union wordbuf
+{
+ u32 w;
+ byte b[4];
+};
+
+#ifdef WORDS_BIGENDIAN
+#define b0 b[3]
+#define b1 b[2]
+#define b2 b[1]
+#define b3 b[0]
+#else
+#define b0 b[0]
+#define b1 b[1]
+#define b2 b[2]
+#define b3 b[3]
+#endif
+
+
+typedef struct
+{
+ u32 keyschedule[32];
+} SEED_context;
+
+static const u32 SS0[256] = {
+ 0x2989a1a8, 0x05858184, 0x16c6d2d4, 0x13c3d3d0, 0x14445054, 0x1d0d111c,
+ 0x2c8ca0ac, 0x25052124, 0x1d4d515c, 0x03434340, 0x18081018, 0x1e0e121c,
+ 0x11415150, 0x3cccf0fc, 0x0acac2c8, 0x23436360, 0x28082028, 0x04444044,
+ 0x20002020, 0x1d8d919c, 0x20c0e0e0, 0x22c2e2e0, 0x08c8c0c8, 0x17071314,
+ 0x2585a1a4, 0x0f8f838c, 0x03030300, 0x3b4b7378, 0x3b8bb3b8, 0x13031310,
+ 0x12c2d2d0, 0x2ecee2ec, 0x30407070, 0x0c8c808c, 0x3f0f333c, 0x2888a0a8,
+ 0x32023230, 0x1dcdd1dc, 0x36c6f2f4, 0x34447074, 0x2ccce0ec, 0x15859194,
+ 0x0b0b0308, 0x17475354, 0x1c4c505c, 0x1b4b5358, 0x3d8db1bc, 0x01010100,
+ 0x24042024, 0x1c0c101c, 0x33437370, 0x18889098, 0x10001010, 0x0cccc0cc,
+ 0x32c2f2f0, 0x19c9d1d8, 0x2c0c202c, 0x27c7e3e4, 0x32427270, 0x03838380,
+ 0x1b8b9398, 0x11c1d1d0, 0x06868284, 0x09c9c1c8, 0x20406060, 0x10405050,
+ 0x2383a3a0, 0x2bcbe3e8, 0x0d0d010c, 0x3686b2b4, 0x1e8e929c, 0x0f4f434c,
+ 0x3787b3b4, 0x1a4a5258, 0x06c6c2c4, 0x38487078, 0x2686a2a4, 0x12021210,
+ 0x2f8fa3ac, 0x15c5d1d4, 0x21416160, 0x03c3c3c0, 0x3484b0b4, 0x01414140,
+ 0x12425250, 0x3d4d717c, 0x0d8d818c, 0x08080008, 0x1f0f131c, 0x19899198,
+ 0x00000000, 0x19091118, 0x04040004, 0x13435350, 0x37c7f3f4, 0x21c1e1e0,
+ 0x3dcdf1fc, 0x36467274, 0x2f0f232c, 0x27072324, 0x3080b0b0, 0x0b8b8388,
+ 0x0e0e020c, 0x2b8ba3a8, 0x2282a2a0, 0x2e4e626c, 0x13839390, 0x0d4d414c,
+ 0x29496168, 0x3c4c707c, 0x09090108, 0x0a0a0208, 0x3f8fb3bc, 0x2fcfe3ec,
+ 0x33c3f3f0, 0x05c5c1c4, 0x07878384, 0x14041014, 0x3ecef2fc, 0x24446064,
+ 0x1eced2dc, 0x2e0e222c, 0x0b4b4348, 0x1a0a1218, 0x06060204, 0x21012120,
+ 0x2b4b6368, 0x26466264, 0x02020200, 0x35c5f1f4, 0x12829290, 0x0a8a8288,
+ 0x0c0c000c, 0x3383b3b0, 0x3e4e727c, 0x10c0d0d0, 0x3a4a7278, 0x07474344,
+ 0x16869294, 0x25c5e1e4, 0x26062224, 0x00808080, 0x2d8da1ac, 0x1fcfd3dc,
+ 0x2181a1a0, 0x30003030, 0x37073334, 0x2e8ea2ac, 0x36063234, 0x15051114,
+ 0x22022220, 0x38083038, 0x34c4f0f4, 0x2787a3a4, 0x05454144, 0x0c4c404c,
+ 0x01818180, 0x29c9e1e8, 0x04848084, 0x17879394, 0x35053134, 0x0bcbc3c8,
+ 0x0ecec2cc, 0x3c0c303c, 0x31417170, 0x11011110, 0x07c7c3c4, 0x09898188,
+ 0x35457174, 0x3bcbf3f8, 0x1acad2d8, 0x38c8f0f8, 0x14849094, 0x19495158,
+ 0x02828280, 0x04c4c0c4, 0x3fcff3fc, 0x09494148, 0x39093138, 0x27476364,
+ 0x00c0c0c0, 0x0fcfc3cc, 0x17c7d3d4, 0x3888b0b8, 0x0f0f030c, 0x0e8e828c,
+ 0x02424240, 0x23032320, 0x11819190, 0x2c4c606c, 0x1bcbd3d8, 0x2484a0a4,
+ 0x34043034, 0x31c1f1f0, 0x08484048, 0x02c2c2c0, 0x2f4f636c, 0x3d0d313c,
+ 0x2d0d212c, 0x00404040, 0x3e8eb2bc, 0x3e0e323c, 0x3c8cb0bc, 0x01c1c1c0,
+ 0x2a8aa2a8, 0x3a8ab2b8, 0x0e4e424c, 0x15455154, 0x3b0b3338, 0x1cccd0dc,
+ 0x28486068, 0x3f4f737c, 0x1c8c909c, 0x18c8d0d8, 0x0a4a4248, 0x16465254,
+ 0x37477374, 0x2080a0a0, 0x2dcde1ec, 0x06464244, 0x3585b1b4, 0x2b0b2328,
+ 0x25456164, 0x3acaf2f8, 0x23c3e3e0, 0x3989b1b8, 0x3181b1b0, 0x1f8f939c,
+ 0x1e4e525c, 0x39c9f1f8, 0x26c6e2e4, 0x3282b2b0, 0x31013130, 0x2acae2e8,
+ 0x2d4d616c, 0x1f4f535c, 0x24c4e0e4, 0x30c0f0f0, 0x0dcdc1cc, 0x08888088,
+ 0x16061214, 0x3a0a3238, 0x18485058, 0x14c4d0d4, 0x22426260, 0x29092128,
+ 0x07070304, 0x33033330, 0x28c8e0e8, 0x1b0b1318, 0x05050104, 0x39497178,
+ 0x10809090, 0x2a4a6268, 0x2a0a2228, 0x1a8a9298,
+};
+
+static const u32 SS1[256] = {
+ 0x38380830, 0xe828c8e0, 0x2c2d0d21, 0xa42686a2, 0xcc0fcfc3, 0xdc1eced2,
+ 0xb03383b3, 0xb83888b0, 0xac2f8fa3, 0x60204060, 0x54154551, 0xc407c7c3,
+ 0x44044440, 0x6c2f4f63, 0x682b4b63, 0x581b4b53, 0xc003c3c3, 0x60224262,
+ 0x30330333, 0xb43585b1, 0x28290921, 0xa02080a0, 0xe022c2e2, 0xa42787a3,
+ 0xd013c3d3, 0x90118191, 0x10110111, 0x04060602, 0x1c1c0c10, 0xbc3c8cb0,
+ 0x34360632, 0x480b4b43, 0xec2fcfe3, 0x88088880, 0x6c2c4c60, 0xa82888a0,
+ 0x14170713, 0xc404c4c0, 0x14160612, 0xf434c4f0, 0xc002c2c2, 0x44054541,
+ 0xe021c1e1, 0xd416c6d2, 0x3c3f0f33, 0x3c3d0d31, 0x8c0e8e82, 0x98188890,
+ 0x28280820, 0x4c0e4e42, 0xf436c6f2, 0x3c3e0e32, 0xa42585a1, 0xf839c9f1,
+ 0x0c0d0d01, 0xdc1fcfd3, 0xd818c8d0, 0x282b0b23, 0x64264662, 0x783a4a72,
+ 0x24270723, 0x2c2f0f23, 0xf031c1f1, 0x70324272, 0x40024242, 0xd414c4d0,
+ 0x40014141, 0xc000c0c0, 0x70334373, 0x64274763, 0xac2c8ca0, 0x880b8b83,
+ 0xf437c7f3, 0xac2d8da1, 0x80008080, 0x1c1f0f13, 0xc80acac2, 0x2c2c0c20,
+ 0xa82a8aa2, 0x34340430, 0xd012c2d2, 0x080b0b03, 0xec2ecee2, 0xe829c9e1,
+ 0x5c1d4d51, 0x94148490, 0x18180810, 0xf838c8f0, 0x54174753, 0xac2e8ea2,
+ 0x08080800, 0xc405c5c1, 0x10130313, 0xcc0dcdc1, 0x84068682, 0xb83989b1,
+ 0xfc3fcff3, 0x7c3d4d71, 0xc001c1c1, 0x30310131, 0xf435c5f1, 0x880a8a82,
+ 0x682a4a62, 0xb03181b1, 0xd011c1d1, 0x20200020, 0xd417c7d3, 0x00020202,
+ 0x20220222, 0x04040400, 0x68284860, 0x70314171, 0x04070703, 0xd81bcbd3,
+ 0x9c1d8d91, 0x98198991, 0x60214161, 0xbc3e8eb2, 0xe426c6e2, 0x58194951,
+ 0xdc1dcdd1, 0x50114151, 0x90108090, 0xdc1cccd0, 0x981a8a92, 0xa02383a3,
+ 0xa82b8ba3, 0xd010c0d0, 0x80018181, 0x0c0f0f03, 0x44074743, 0x181a0a12,
+ 0xe023c3e3, 0xec2ccce0, 0x8c0d8d81, 0xbc3f8fb3, 0x94168692, 0x783b4b73,
+ 0x5c1c4c50, 0xa02282a2, 0xa02181a1, 0x60234363, 0x20230323, 0x4c0d4d41,
+ 0xc808c8c0, 0x9c1e8e92, 0x9c1c8c90, 0x383a0a32, 0x0c0c0c00, 0x2c2e0e22,
+ 0xb83a8ab2, 0x6c2e4e62, 0x9c1f8f93, 0x581a4a52, 0xf032c2f2, 0x90128292,
+ 0xf033c3f3, 0x48094941, 0x78384870, 0xcc0cccc0, 0x14150511, 0xf83bcbf3,
+ 0x70304070, 0x74354571, 0x7c3f4f73, 0x34350531, 0x10100010, 0x00030303,
+ 0x64244460, 0x6c2d4d61, 0xc406c6c2, 0x74344470, 0xd415c5d1, 0xb43484b0,
+ 0xe82acae2, 0x08090901, 0x74364672, 0x18190911, 0xfc3ecef2, 0x40004040,
+ 0x10120212, 0xe020c0e0, 0xbc3d8db1, 0x04050501, 0xf83acaf2, 0x00010101,
+ 0xf030c0f0, 0x282a0a22, 0x5c1e4e52, 0xa82989a1, 0x54164652, 0x40034343,
+ 0x84058581, 0x14140410, 0x88098981, 0x981b8b93, 0xb03080b0, 0xe425c5e1,
+ 0x48084840, 0x78394971, 0x94178793, 0xfc3cccf0, 0x1c1e0e12, 0x80028282,
+ 0x20210121, 0x8c0c8c80, 0x181b0b13, 0x5c1f4f53, 0x74374773, 0x54144450,
+ 0xb03282b2, 0x1c1d0d11, 0x24250521, 0x4c0f4f43, 0x00000000, 0x44064642,
+ 0xec2dcde1, 0x58184850, 0x50124252, 0xe82bcbe3, 0x7c3e4e72, 0xd81acad2,
+ 0xc809c9c1, 0xfc3dcdf1, 0x30300030, 0x94158591, 0x64254561, 0x3c3c0c30,
+ 0xb43686b2, 0xe424c4e0, 0xb83b8bb3, 0x7c3c4c70, 0x0c0e0e02, 0x50104050,
+ 0x38390931, 0x24260622, 0x30320232, 0x84048480, 0x68294961, 0x90138393,
+ 0x34370733, 0xe427c7e3, 0x24240420, 0xa42484a0, 0xc80bcbc3, 0x50134353,
+ 0x080a0a02, 0x84078783, 0xd819c9d1, 0x4c0c4c40, 0x80038383, 0x8c0f8f83,
+ 0xcc0ecec2, 0x383b0b33, 0x480a4a42, 0xb43787b3,
+};
+
+static const u32 SS2[256] = {
+ 0xa1a82989, 0x81840585, 0xd2d416c6, 0xd3d013c3, 0x50541444, 0x111c1d0d,
+ 0xa0ac2c8c, 0x21242505, 0x515c1d4d, 0x43400343, 0x10181808, 0x121c1e0e,
+ 0x51501141, 0xf0fc3ccc, 0xc2c80aca, 0x63602343, 0x20282808, 0x40440444,
+ 0x20202000, 0x919c1d8d, 0xe0e020c0, 0xe2e022c2, 0xc0c808c8, 0x13141707,
+ 0xa1a42585, 0x838c0f8f, 0x03000303, 0x73783b4b, 0xb3b83b8b, 0x13101303,
+ 0xd2d012c2, 0xe2ec2ece, 0x70703040, 0x808c0c8c, 0x333c3f0f, 0xa0a82888,
+ 0x32303202, 0xd1dc1dcd, 0xf2f436c6, 0x70743444, 0xe0ec2ccc, 0x91941585,
+ 0x03080b0b, 0x53541747, 0x505c1c4c, 0x53581b4b, 0xb1bc3d8d, 0x01000101,
+ 0x20242404, 0x101c1c0c, 0x73703343, 0x90981888, 0x10101000, 0xc0cc0ccc,
+ 0xf2f032c2, 0xd1d819c9, 0x202c2c0c, 0xe3e427c7, 0x72703242, 0x83800383,
+ 0x93981b8b, 0xd1d011c1, 0x82840686, 0xc1c809c9, 0x60602040, 0x50501040,
+ 0xa3a02383, 0xe3e82bcb, 0x010c0d0d, 0xb2b43686, 0x929c1e8e, 0x434c0f4f,
+ 0xb3b43787, 0x52581a4a, 0xc2c406c6, 0x70783848, 0xa2a42686, 0x12101202,
+ 0xa3ac2f8f, 0xd1d415c5, 0x61602141, 0xc3c003c3, 0xb0b43484, 0x41400141,
+ 0x52501242, 0x717c3d4d, 0x818c0d8d, 0x00080808, 0x131c1f0f, 0x91981989,
+ 0x00000000, 0x11181909, 0x00040404, 0x53501343, 0xf3f437c7, 0xe1e021c1,
+ 0xf1fc3dcd, 0x72743646, 0x232c2f0f, 0x23242707, 0xb0b03080, 0x83880b8b,
+ 0x020c0e0e, 0xa3a82b8b, 0xa2a02282, 0x626c2e4e, 0x93901383, 0x414c0d4d,
+ 0x61682949, 0x707c3c4c, 0x01080909, 0x02080a0a, 0xb3bc3f8f, 0xe3ec2fcf,
+ 0xf3f033c3, 0xc1c405c5, 0x83840787, 0x10141404, 0xf2fc3ece, 0x60642444,
+ 0xd2dc1ece, 0x222c2e0e, 0x43480b4b, 0x12181a0a, 0x02040606, 0x21202101,
+ 0x63682b4b, 0x62642646, 0x02000202, 0xf1f435c5, 0x92901282, 0x82880a8a,
+ 0x000c0c0c, 0xb3b03383, 0x727c3e4e, 0xd0d010c0, 0x72783a4a, 0x43440747,
+ 0x92941686, 0xe1e425c5, 0x22242606, 0x80800080, 0xa1ac2d8d, 0xd3dc1fcf,
+ 0xa1a02181, 0x30303000, 0x33343707, 0xa2ac2e8e, 0x32343606, 0x11141505,
+ 0x22202202, 0x30383808, 0xf0f434c4, 0xa3a42787, 0x41440545, 0x404c0c4c,
+ 0x81800181, 0xe1e829c9, 0x80840484, 0x93941787, 0x31343505, 0xc3c80bcb,
+ 0xc2cc0ece, 0x303c3c0c, 0x71703141, 0x11101101, 0xc3c407c7, 0x81880989,
+ 0x71743545, 0xf3f83bcb, 0xd2d81aca, 0xf0f838c8, 0x90941484, 0x51581949,
+ 0x82800282, 0xc0c404c4, 0xf3fc3fcf, 0x41480949, 0x31383909, 0x63642747,
+ 0xc0c000c0, 0xc3cc0fcf, 0xd3d417c7, 0xb0b83888, 0x030c0f0f, 0x828c0e8e,
+ 0x42400242, 0x23202303, 0x91901181, 0x606c2c4c, 0xd3d81bcb, 0xa0a42484,
+ 0x30343404, 0xf1f031c1, 0x40480848, 0xc2c002c2, 0x636c2f4f, 0x313c3d0d,
+ 0x212c2d0d, 0x40400040, 0xb2bc3e8e, 0x323c3e0e, 0xb0bc3c8c, 0xc1c001c1,
+ 0xa2a82a8a, 0xb2b83a8a, 0x424c0e4e, 0x51541545, 0x33383b0b, 0xd0dc1ccc,
+ 0x60682848, 0x737c3f4f, 0x909c1c8c, 0xd0d818c8, 0x42480a4a, 0x52541646,
+ 0x73743747, 0xa0a02080, 0xe1ec2dcd, 0x42440646, 0xb1b43585, 0x23282b0b,
+ 0x61642545, 0xf2f83aca, 0xe3e023c3, 0xb1b83989, 0xb1b03181, 0x939c1f8f,
+ 0x525c1e4e, 0xf1f839c9, 0xe2e426c6, 0xb2b03282, 0x31303101, 0xe2e82aca,
+ 0x616c2d4d, 0x535c1f4f, 0xe0e424c4, 0xf0f030c0, 0xc1cc0dcd, 0x80880888,
+ 0x12141606, 0x32383a0a, 0x50581848, 0xd0d414c4, 0x62602242, 0x21282909,
+ 0x03040707, 0x33303303, 0xe0e828c8, 0x13181b0b, 0x01040505, 0x71783949,
+ 0x90901080, 0x62682a4a, 0x22282a0a, 0x92981a8a,
+};
+
+static const u32 SS3[256] = {
+ 0x08303838, 0xc8e0e828, 0x0d212c2d, 0x86a2a426, 0xcfc3cc0f, 0xced2dc1e,
+ 0x83b3b033, 0x88b0b838, 0x8fa3ac2f, 0x40606020, 0x45515415, 0xc7c3c407,
+ 0x44404404, 0x4f636c2f, 0x4b63682b, 0x4b53581b, 0xc3c3c003, 0x42626022,
+ 0x03333033, 0x85b1b435, 0x09212829, 0x80a0a020, 0xc2e2e022, 0x87a3a427,
+ 0xc3d3d013, 0x81919011, 0x01111011, 0x06020406, 0x0c101c1c, 0x8cb0bc3c,
+ 0x06323436, 0x4b43480b, 0xcfe3ec2f, 0x88808808, 0x4c606c2c, 0x88a0a828,
+ 0x07131417, 0xc4c0c404, 0x06121416, 0xc4f0f434, 0xc2c2c002, 0x45414405,
+ 0xc1e1e021, 0xc6d2d416, 0x0f333c3f, 0x0d313c3d, 0x8e828c0e, 0x88909818,
+ 0x08202828, 0x4e424c0e, 0xc6f2f436, 0x0e323c3e, 0x85a1a425, 0xc9f1f839,
+ 0x0d010c0d, 0xcfd3dc1f, 0xc8d0d818, 0x0b23282b, 0x46626426, 0x4a72783a,
+ 0x07232427, 0x0f232c2f, 0xc1f1f031, 0x42727032, 0x42424002, 0xc4d0d414,
+ 0x41414001, 0xc0c0c000, 0x43737033, 0x47636427, 0x8ca0ac2c, 0x8b83880b,
+ 0xc7f3f437, 0x8da1ac2d, 0x80808000, 0x0f131c1f, 0xcac2c80a, 0x0c202c2c,
+ 0x8aa2a82a, 0x04303434, 0xc2d2d012, 0x0b03080b, 0xcee2ec2e, 0xc9e1e829,
+ 0x4d515c1d, 0x84909414, 0x08101818, 0xc8f0f838, 0x47535417, 0x8ea2ac2e,
+ 0x08000808, 0xc5c1c405, 0x03131013, 0xcdc1cc0d, 0x86828406, 0x89b1b839,
+ 0xcff3fc3f, 0x4d717c3d, 0xc1c1c001, 0x01313031, 0xc5f1f435, 0x8a82880a,
+ 0x4a62682a, 0x81b1b031, 0xc1d1d011, 0x00202020, 0xc7d3d417, 0x02020002,
+ 0x02222022, 0x04000404, 0x48606828, 0x41717031, 0x07030407, 0xcbd3d81b,
+ 0x8d919c1d, 0x89919819, 0x41616021, 0x8eb2bc3e, 0xc6e2e426, 0x49515819,
+ 0xcdd1dc1d, 0x41515011, 0x80909010, 0xccd0dc1c, 0x8a92981a, 0x83a3a023,
+ 0x8ba3a82b, 0xc0d0d010, 0x81818001, 0x0f030c0f, 0x47434407, 0x0a12181a,
+ 0xc3e3e023, 0xcce0ec2c, 0x8d818c0d, 0x8fb3bc3f, 0x86929416, 0x4b73783b,
+ 0x4c505c1c, 0x82a2a022, 0x81a1a021, 0x43636023, 0x03232023, 0x4d414c0d,
+ 0xc8c0c808, 0x8e929c1e, 0x8c909c1c, 0x0a32383a, 0x0c000c0c, 0x0e222c2e,
+ 0x8ab2b83a, 0x4e626c2e, 0x8f939c1f, 0x4a52581a, 0xc2f2f032, 0x82929012,
+ 0xc3f3f033, 0x49414809, 0x48707838, 0xccc0cc0c, 0x05111415, 0xcbf3f83b,
+ 0x40707030, 0x45717435, 0x4f737c3f, 0x05313435, 0x00101010, 0x03030003,
+ 0x44606424, 0x4d616c2d, 0xc6c2c406, 0x44707434, 0xc5d1d415, 0x84b0b434,
+ 0xcae2e82a, 0x09010809, 0x46727436, 0x09111819, 0xcef2fc3e, 0x40404000,
+ 0x02121012, 0xc0e0e020, 0x8db1bc3d, 0x05010405, 0xcaf2f83a, 0x01010001,
+ 0xc0f0f030, 0x0a22282a, 0x4e525c1e, 0x89a1a829, 0x46525416, 0x43434003,
+ 0x85818405, 0x04101414, 0x89818809, 0x8b93981b, 0x80b0b030, 0xc5e1e425,
+ 0x48404808, 0x49717839, 0x87939417, 0xccf0fc3c, 0x0e121c1e, 0x82828002,
+ 0x01212021, 0x8c808c0c, 0x0b13181b, 0x4f535c1f, 0x47737437, 0x44505414,
+ 0x82b2b032, 0x0d111c1d, 0x05212425, 0x4f434c0f, 0x00000000, 0x46424406,
+ 0xcde1ec2d, 0x48505818, 0x42525012, 0xcbe3e82b, 0x4e727c3e, 0xcad2d81a,
+ 0xc9c1c809, 0xcdf1fc3d, 0x00303030, 0x85919415, 0x45616425, 0x0c303c3c,
+ 0x86b2b436, 0xc4e0e424, 0x8bb3b83b, 0x4c707c3c, 0x0e020c0e, 0x40505010,
+ 0x09313839, 0x06222426, 0x02323032, 0x84808404, 0x49616829, 0x83939013,
+ 0x07333437, 0xc7e3e427, 0x04202424, 0x84a0a424, 0xcbc3c80b, 0x43535013,
+ 0x0a02080a, 0x87838407, 0xc9d1d819, 0x4c404c0c, 0x83838003, 0x8f838c0f,
+ 0xcec2cc0e, 0x0b33383b, 0x4a42480a, 0x87b3b437,
+};
+
+static const u32 KC[NUMKC] = {
+ 0x9e3779b9, 0x3c6ef373, 0x78dde6e6, 0xf1bbcdcc,
+ 0xe3779b99, 0xc6ef3733, 0x8dde6e67, 0x1bbcdccf,
+ 0x3779b99e, 0x6ef3733c, 0xdde6e678, 0xbbcdccf1,
+ 0x779b99e3, 0xef3733c6, 0xde6e678d, 0xbcdccf1b,
+};
+
+
+
+/* Perform the key setup.
+ */
+static gcry_err_code_t
+do_setkey (SEED_context *ctx, const byte *key, const unsigned keylen)
+{
+ static int initialized = 0;
+ static const char *selftest_failed=0;
+ u32 x1, x2, x3, x4;
+ union wordbuf t0, t1;
+ u32 *keyout = ctx->keyschedule;
+ int i;
+
+ if (!initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if( selftest_failed )
+ log_error ("%s\n", selftest_failed );
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if (keylen != 16)
+ return GPG_ERR_INV_KEYLEN;
+
+ x1 = GETU32 (key);
+ x2 = GETU32 (key+4);
+ x3 = GETU32 (key+8);
+ x4 = GETU32 (key+12);
+
+ for (i = 0; i < NUMKC; i++)
+ {
+ t0.w = x1 + x3 - KC[i];
+ t1.w = x2 + KC[i] - x4;
+ *(keyout++) = SS0[t0.b0] ^ SS1[t0.b1] ^ SS2[t0.b2] ^ SS3[t0.b3];
+ *(keyout++) = SS0[t1.b0] ^ SS1[t1.b1] ^ SS2[t1.b2] ^ SS3[t1.b3];
+
+ if (i % 2 == 0)
+ {
+ t0.w = x1;
+ x1 = (x1>>8) ^ (x2<<24);
+ x2 = (x2>>8) ^ (t0.w<<24);
+ }
+ else
+ {
+ t0.w = x3;
+ x3 = (x3<<8) ^ (x4>>24);
+ x4 = (x4<<8) ^ (t0.w>>24);
+ }
+ }
+
+ return 0;
+}
+
+static gcry_err_code_t
+seed_setkey (void *context, const byte *key, const unsigned keylen)
+{
+ SEED_context *ctx = context;
+
+ int rc = do_setkey (ctx, key, keylen);
+ _gcry_burn_stack (4*6 + sizeof(void*)*2 + sizeof(int)*2);
+ return rc;
+}
+
+
+
+#define OP(X1, X2, X3, X4, rbase) \
+ t0.w = X3 ^ ctx->keyschedule[rbase]; \
+ t1.w = X4 ^ ctx->keyschedule[rbase+1]; \
+ t1.w ^= t0.w; \
+ t1.w = SS0[t1.b0] ^ SS1[t1.b1] ^ SS2[t1.b2] ^ SS3[t1.b3]; \
+ t0.w += t1.w; \
+ t0.w = SS0[t0.b0] ^ SS1[t0.b1] ^ SS2[t0.b2] ^ SS3[t0.b3]; \
+ t1.w += t0.w; \
+ t1.w = SS0[t1.b0] ^ SS1[t1.b1] ^ SS2[t1.b2] ^ SS3[t1.b3]; \
+ t0.w += t1.w; \
+ X1 ^= t0.w; \
+ X2 ^= t1.w;
+
+/* Encrypt one block. inbuf and outbuf may be the same. */
+static void
+do_encrypt (const SEED_context *ctx, byte *outbuf, const byte *inbuf)
+{
+ u32 x1, x2, x3, x4;
+ union wordbuf t0, t1;
+
+ x1 = GETU32 (inbuf);
+ x2 = GETU32 (inbuf+4);
+ x3 = GETU32 (inbuf+8);
+ x4 = GETU32 (inbuf+12);
+
+ OP (x1, x2, x3, x4, 0);
+ OP (x3, x4, x1, x2, 2);
+ OP (x1, x2, x3, x4, 4);
+ OP (x3, x4, x1, x2, 6);
+ OP (x1, x2, x3, x4, 8);
+ OP (x3, x4, x1, x2, 10);
+ OP (x1, x2, x3, x4, 12);
+ OP (x3, x4, x1, x2, 14);
+ OP (x1, x2, x3, x4, 16);
+ OP (x3, x4, x1, x2, 18);
+ OP (x1, x2, x3, x4, 20);
+ OP (x3, x4, x1, x2, 22);
+ OP (x1, x2, x3, x4, 24);
+ OP (x3, x4, x1, x2, 26);
+ OP (x1, x2, x3, x4, 28);
+ OP (x3, x4, x1, x2, 30);
+
+ PUTU32 (outbuf, x3);
+ PUTU32 (outbuf+4, x4);
+ PUTU32 (outbuf+8, x1);
+ PUTU32 (outbuf+12, x2);
+}
+
+static void
+seed_encrypt (void *context, byte *outbuf, const byte *inbuf)
+{
+ SEED_context *ctx = context;
+
+ do_encrypt (ctx, outbuf, inbuf);
+ _gcry_burn_stack (4*6);
+}
+
+
+
+/* Decrypt one block. inbuf and outbuf may be the same. */
+static void
+do_decrypt (SEED_context *ctx, byte *outbuf, const byte *inbuf)
+{
+ u32 x1, x2, x3, x4;
+ union wordbuf t0, t1;
+
+ x1 = GETU32 (inbuf);
+ x2 = GETU32 (inbuf+4);
+ x3 = GETU32 (inbuf+8);
+ x4 = GETU32 (inbuf+12);
+
+ OP (x1, x2, x3, x4, 30);
+ OP (x3, x4, x1, x2, 28);
+ OP (x1, x2, x3, x4, 26);
+ OP (x3, x4, x1, x2, 24);
+ OP (x1, x2, x3, x4, 22);
+ OP (x3, x4, x1, x2, 20);
+ OP (x1, x2, x3, x4, 18);
+ OP (x3, x4, x1, x2, 16);
+ OP (x1, x2, x3, x4, 14);
+ OP (x3, x4, x1, x2, 12);
+ OP (x1, x2, x3, x4, 10);
+ OP (x3, x4, x1, x2, 8);
+ OP (x1, x2, x3, x4, 6);
+ OP (x3, x4, x1, x2, 4);
+ OP (x1, x2, x3, x4, 2);
+ OP (x3, x4, x1, x2, 0);
+
+ PUTU32 (outbuf, x3);
+ PUTU32 (outbuf+4, x4);
+ PUTU32 (outbuf+8, x1);
+ PUTU32 (outbuf+12, x2);
+}
+
+static void
+seed_decrypt (void *context, byte *outbuf, const byte *inbuf)
+{
+ SEED_context *ctx = context;
+
+ do_decrypt (ctx, outbuf, inbuf);
+ _gcry_burn_stack (4*6);
+}
+
+
+/* Test a single encryption and decryption with each key size. */
+
+
+
+static gcry_cipher_oid_spec_t seed_oids[] =
+ {
+ { "1.2.410.200004.1.3", GCRY_CIPHER_MODE_ECB },
+ { "1.2.410.200004.1.4", GCRY_CIPHER_MODE_CBC },
+ { "1.2.410.200004.1.5", GCRY_CIPHER_MODE_CFB },
+ { "1.2.410.200004.1.6", GCRY_CIPHER_MODE_OFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_seed =
+ {
+ "SEED", NULL, seed_oids, 16, 128, sizeof (SEED_context),
+ seed_setkey, seed_encrypt, seed_decrypt,
+ };
+
+
+GRUB_MOD_INIT(gcry_seed)
+{
+ grub_cipher_register (&_gcry_cipher_spec_seed);
+}
+
+GRUB_MOD_FINI(gcry_seed)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_seed);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/serpent.c b/grub-core/lib/libgcrypt-grub/cipher/serpent.c
new file mode 100644
index 0000000..b213ad2
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/serpent.c
@@ -0,0 +1,994 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* serpent.c - Implementation of the Serpent encryption algorithm.
+ * Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+
+
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+#include "bithelp.h"
+
+/* Number of rounds per Serpent encrypt/decrypt operation. */
+#define ROUNDS 32
+
+/* Magic number, used during generating of the subkeys. */
+#define PHI 0x9E3779B9
+
+/* Serpent works on 128 bit blocks. */
+typedef u32 serpent_block_t[4];
+
+/* Serpent key, provided by the user. If the original key is shorter
+ than 256 bits, it is padded. */
+typedef u32 serpent_key_t[8];
+
+/* The key schedule consists of 33 128 bit subkeys. */
+typedef u32 serpent_subkeys_t[ROUNDS + 1][4];
+
+/* A Serpent context. */
+typedef struct serpent_context
+{
+ serpent_subkeys_t keys; /* Generated subkeys. */
+} serpent_context_t;
+
+
+/* A prototype. */
+static const char *serpent_test (void);
+
+
+#define byte_swap_32(x) \
+ (0 \
+ | (((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) \
+ | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+
+/* These are the S-Boxes of Serpent. They are copied from Serpents
+ reference implementation (the optimized one, contained in
+ `floppy2') and are therefore:
+
+ Copyright (C) 1998 Ross Anderson, Eli Biham, Lars Knudsen.
+
+ To quote the Serpent homepage
+ (http://www.cl.cam.ac.uk/~rja14/serpent.html):
+
+ "Serpent is now completely in the public domain, and we impose no
+ restrictions on its use. This was announced on the 21st August at
+ the First AES Candidate Conference. The optimised implementations
+ in the submission package are now under the GNU PUBLIC LICENSE
+ (GPL), although some comments in the code still say otherwise. You
+ are welcome to use Serpent for any application." */
+
+#define SBOX0(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t05, t06, t07, t08, t09; \
+ u32 t11, t12, t13, t14, t15, t17, t01; \
+ t01 = b ^ c ; \
+ t02 = a | d ; \
+ t03 = a ^ b ; \
+ z = t02 ^ t01; \
+ t05 = c | z ; \
+ t06 = a ^ d ; \
+ t07 = b | c ; \
+ t08 = d & t05; \
+ t09 = t03 & t07; \
+ y = t09 ^ t08; \
+ t11 = t09 & y ; \
+ t12 = c ^ d ; \
+ t13 = t07 ^ t11; \
+ t14 = b & t06; \
+ t15 = t06 ^ t13; \
+ w = ~ t15; \
+ t17 = w ^ t14; \
+ x = t12 ^ t17; \
+ }
+
+#define SBOX0_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t08, t09, t10; \
+ u32 t12, t13, t14, t15, t17, t18, t01; \
+ t01 = c ^ d ; \
+ t02 = a | b ; \
+ t03 = b | c ; \
+ t04 = c & t01; \
+ t05 = t02 ^ t01; \
+ t06 = a | t04; \
+ y = ~ t05; \
+ t08 = b ^ d ; \
+ t09 = t03 & t08; \
+ t10 = d | y ; \
+ x = t09 ^ t06; \
+ t12 = a | t05; \
+ t13 = x ^ t12; \
+ t14 = t03 ^ t10; \
+ t15 = a ^ c ; \
+ z = t14 ^ t13; \
+ t17 = t05 & t13; \
+ t18 = t14 | t17; \
+ w = t15 ^ t18; \
+ }
+
+#define SBOX1(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08; \
+ u32 t10, t11, t12, t13, t16, t17, t01; \
+ t01 = a | d ; \
+ t02 = c ^ d ; \
+ t03 = ~ b ; \
+ t04 = a ^ c ; \
+ t05 = a | t03; \
+ t06 = d & t04; \
+ t07 = t01 & t02; \
+ t08 = b | t06; \
+ y = t02 ^ t05; \
+ t10 = t07 ^ t08; \
+ t11 = t01 ^ t10; \
+ t12 = y ^ t11; \
+ t13 = b & d ; \
+ z = ~ t10; \
+ x = t13 ^ t12; \
+ t16 = t10 | x ; \
+ t17 = t05 & t16; \
+ w = c ^ t17; \
+ }
+
+#define SBOX1_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08; \
+ u32 t09, t10, t11, t14, t15, t17, t01; \
+ t01 = a ^ b ; \
+ t02 = b | d ; \
+ t03 = a & c ; \
+ t04 = c ^ t02; \
+ t05 = a | t04; \
+ t06 = t01 & t05; \
+ t07 = d | t03; \
+ t08 = b ^ t06; \
+ t09 = t07 ^ t06; \
+ t10 = t04 | t03; \
+ t11 = d & t08; \
+ y = ~ t09; \
+ x = t10 ^ t11; \
+ t14 = a | y ; \
+ t15 = t06 ^ x ; \
+ z = t01 ^ t04; \
+ t17 = c ^ t15; \
+ w = t14 ^ t17; \
+ }
+
+#define SBOX2(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t05, t06, t07, t08; \
+ u32 t09, t10, t12, t13, t14, t01; \
+ t01 = a | c ; \
+ t02 = a ^ b ; \
+ t03 = d ^ t01; \
+ w = t02 ^ t03; \
+ t05 = c ^ w ; \
+ t06 = b ^ t05; \
+ t07 = b | t05; \
+ t08 = t01 & t06; \
+ t09 = t03 ^ t07; \
+ t10 = t02 | t09; \
+ x = t10 ^ t08; \
+ t12 = a | d ; \
+ t13 = t09 ^ x ; \
+ t14 = b ^ t13; \
+ z = ~ t09; \
+ y = t12 ^ t14; \
+ }
+
+#define SBOX2_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t06, t07, t08, t09; \
+ u32 t10, t11, t12, t15, t16, t17, t01; \
+ t01 = a ^ d ; \
+ t02 = c ^ d ; \
+ t03 = a & c ; \
+ t04 = b | t02; \
+ w = t01 ^ t04; \
+ t06 = a | c ; \
+ t07 = d | w ; \
+ t08 = ~ d ; \
+ t09 = b & t06; \
+ t10 = t08 | t03; \
+ t11 = b & t07; \
+ t12 = t06 & t02; \
+ z = t09 ^ t10; \
+ x = t12 ^ t11; \
+ t15 = c & z ; \
+ t16 = w ^ x ; \
+ t17 = t10 ^ t15; \
+ y = t16 ^ t17; \
+ }
+
+#define SBOX3(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08; \
+ u32 t09, t10, t11, t13, t14, t15, t01; \
+ t01 = a ^ c ; \
+ t02 = a | d ; \
+ t03 = a & d ; \
+ t04 = t01 & t02; \
+ t05 = b | t03; \
+ t06 = a & b ; \
+ t07 = d ^ t04; \
+ t08 = c | t06; \
+ t09 = b ^ t07; \
+ t10 = d & t05; \
+ t11 = t02 ^ t10; \
+ z = t08 ^ t09; \
+ t13 = d | z ; \
+ t14 = a | t07; \
+ t15 = b & t13; \
+ y = t08 ^ t11; \
+ w = t14 ^ t15; \
+ x = t05 ^ t04; \
+ }
+
+#define SBOX3_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t09; \
+ u32 t11, t12, t13, t14, t16, t01; \
+ t01 = c | d ; \
+ t02 = a | d ; \
+ t03 = c ^ t02; \
+ t04 = b ^ t02; \
+ t05 = a ^ d ; \
+ t06 = t04 & t03; \
+ t07 = b & t01; \
+ y = t05 ^ t06; \
+ t09 = a ^ t03; \
+ w = t07 ^ t03; \
+ t11 = w | t05; \
+ t12 = t09 & t11; \
+ t13 = a & y ; \
+ t14 = t01 ^ t05; \
+ x = b ^ t12; \
+ t16 = b | t13; \
+ z = t14 ^ t16; \
+ }
+
+#define SBOX4(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t08, t09; \
+ u32 t10, t11, t12, t13, t14, t15, t16, t01; \
+ t01 = a | b ; \
+ t02 = b | c ; \
+ t03 = a ^ t02; \
+ t04 = b ^ d ; \
+ t05 = d | t03; \
+ t06 = d & t01; \
+ z = t03 ^ t06; \
+ t08 = z & t04; \
+ t09 = t04 & t05; \
+ t10 = c ^ t06; \
+ t11 = b & c ; \
+ t12 = t04 ^ t08; \
+ t13 = t11 | t03; \
+ t14 = t10 ^ t09; \
+ t15 = a & t05; \
+ t16 = t11 | t12; \
+ y = t13 ^ t08; \
+ x = t15 ^ t16; \
+ w = ~ t14; \
+ }
+
+#define SBOX4_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t09; \
+ u32 t10, t11, t12, t13, t15, t01; \
+ t01 = b | d ; \
+ t02 = c | d ; \
+ t03 = a & t01; \
+ t04 = b ^ t02; \
+ t05 = c ^ d ; \
+ t06 = ~ t03; \
+ t07 = a & t04; \
+ x = t05 ^ t07; \
+ t09 = x | t06; \
+ t10 = a ^ t07; \
+ t11 = t01 ^ t09; \
+ t12 = d ^ t04; \
+ t13 = c | t10; \
+ z = t03 ^ t12; \
+ t15 = a ^ t04; \
+ y = t11 ^ t13; \
+ w = t15 ^ t09; \
+ }
+
+#define SBOX5(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t07, t08, t09; \
+ u32 t10, t11, t12, t13, t14, t01; \
+ t01 = b ^ d ; \
+ t02 = b | d ; \
+ t03 = a & t01; \
+ t04 = c ^ t02; \
+ t05 = t03 ^ t04; \
+ w = ~ t05; \
+ t07 = a ^ t01; \
+ t08 = d | w ; \
+ t09 = b | t05; \
+ t10 = d ^ t08; \
+ t11 = b | t07; \
+ t12 = t03 | w ; \
+ t13 = t07 | t10; \
+ t14 = t01 ^ t11; \
+ y = t09 ^ t13; \
+ x = t07 ^ t08; \
+ z = t12 ^ t14; \
+ }
+
+#define SBOX5_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t07, t08, t09; \
+ u32 t10, t12, t13, t15, t16, t01; \
+ t01 = a & d ; \
+ t02 = c ^ t01; \
+ t03 = a ^ d ; \
+ t04 = b & t02; \
+ t05 = a & c ; \
+ w = t03 ^ t04; \
+ t07 = a & w ; \
+ t08 = t01 ^ w ; \
+ t09 = b | t05; \
+ t10 = ~ b ; \
+ x = t08 ^ t09; \
+ t12 = t10 | t07; \
+ t13 = w | x ; \
+ z = t02 ^ t12; \
+ t15 = t02 ^ t13; \
+ t16 = b ^ d ; \
+ y = t16 ^ t15; \
+ }
+
+#define SBOX6(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t07, t08, t09, t10; \
+ u32 t11, t12, t13, t15, t17, t18, t01; \
+ t01 = a & d ; \
+ t02 = b ^ c ; \
+ t03 = a ^ d ; \
+ t04 = t01 ^ t02; \
+ t05 = b | c ; \
+ x = ~ t04; \
+ t07 = t03 & t05; \
+ t08 = b & x ; \
+ t09 = a | c ; \
+ t10 = t07 ^ t08; \
+ t11 = b | d ; \
+ t12 = c ^ t11; \
+ t13 = t09 ^ t10; \
+ y = ~ t13; \
+ t15 = x & t03; \
+ z = t12 ^ t07; \
+ t17 = a ^ b ; \
+ t18 = y ^ t15; \
+ w = t17 ^ t18; \
+ }
+
+#define SBOX6_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08, t09; \
+ u32 t12, t13, t14, t15, t16, t17, t01; \
+ t01 = a ^ c ; \
+ t02 = ~ c ; \
+ t03 = b & t01; \
+ t04 = b | t02; \
+ t05 = d | t03; \
+ t06 = b ^ d ; \
+ t07 = a & t04; \
+ t08 = a | t02; \
+ t09 = t07 ^ t05; \
+ x = t06 ^ t08; \
+ w = ~ t09; \
+ t12 = b & w ; \
+ t13 = t01 & t05; \
+ t14 = t01 ^ t12; \
+ t15 = t07 ^ t13; \
+ t16 = d | t02; \
+ t17 = a ^ x ; \
+ z = t17 ^ t15; \
+ y = t16 ^ t14; \
+ }
+
+#define SBOX7(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t08, t09, t10; \
+ u32 t11, t13, t14, t15, t16, t17, t01; \
+ t01 = a & c ; \
+ t02 = ~ d ; \
+ t03 = a & t02; \
+ t04 = b | t01; \
+ t05 = a & b ; \
+ t06 = c ^ t04; \
+ z = t03 ^ t06; \
+ t08 = c | z ; \
+ t09 = d | t05; \
+ t10 = a ^ t08; \
+ t11 = t04 & z ; \
+ x = t09 ^ t10; \
+ t13 = b ^ x ; \
+ t14 = t01 ^ x ; \
+ t15 = c ^ t05; \
+ t16 = t11 | t13; \
+ t17 = t02 | t14; \
+ w = t15 ^ t17; \
+ y = a ^ t16; \
+ }
+
+#define SBOX7_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t06, t07, t08, t09; \
+ u32 t10, t11, t13, t14, t15, t16, t01; \
+ t01 = a & b ; \
+ t02 = a | b ; \
+ t03 = c | t01; \
+ t04 = d & t02; \
+ z = t03 ^ t04; \
+ t06 = b ^ t04; \
+ t07 = d ^ z ; \
+ t08 = ~ t07; \
+ t09 = t06 | t08; \
+ t10 = b ^ d ; \
+ t11 = a | d ; \
+ x = a ^ t09; \
+ t13 = c ^ t06; \
+ t14 = c & t11; \
+ t15 = d | x ; \
+ t16 = t01 | t10; \
+ w = t13 ^ t15; \
+ y = t14 ^ t16; \
+ }
+
+/* XOR BLOCK1 into BLOCK0. */
+#define BLOCK_XOR(block0, block1) \
+ { \
+ block0[0] ^= block1[0]; \
+ block0[1] ^= block1[1]; \
+ block0[2] ^= block1[2]; \
+ block0[3] ^= block1[3]; \
+ }
+
+/* Copy BLOCK_SRC to BLOCK_DST. */
+#define BLOCK_COPY(block_dst, block_src) \
+ { \
+ block_dst[0] = block_src[0]; \
+ block_dst[1] = block_src[1]; \
+ block_dst[2] = block_src[2]; \
+ block_dst[3] = block_src[3]; \
+ }
+
+/* Apply SBOX number WHICH to to the block found in ARRAY0 at index
+ INDEX, writing the output to the block found in ARRAY1 at index
+ INDEX. */
+#define SBOX(which, array0, array1, index) \
+ SBOX##which (array0[index + 0], array0[index + 1], \
+ array0[index + 2], array0[index + 3], \
+ array1[index + 0], array1[index + 1], \
+ array1[index + 2], array1[index + 3]);
+
+/* Apply inverse SBOX number WHICH to to the block found in ARRAY0 at
+ index INDEX, writing the output to the block found in ARRAY1 at
+ index INDEX. */
+#define SBOX_INVERSE(which, array0, array1, index) \
+ SBOX##which##_INVERSE (array0[index + 0], array0[index + 1], \
+ array0[index + 2], array0[index + 3], \
+ array1[index + 0], array1[index + 1], \
+ array1[index + 2], array1[index + 3]);
+
+/* Apply the linear transformation to BLOCK. */
+#define LINEAR_TRANSFORMATION(block) \
+ { \
+ block[0] = rol (block[0], 13); \
+ block[2] = rol (block[2], 3); \
+ block[1] = block[1] ^ block[0] ^ block[2]; \
+ block[3] = block[3] ^ block[2] ^ (block[0] << 3); \
+ block[1] = rol (block[1], 1); \
+ block[3] = rol (block[3], 7); \
+ block[0] = block[0] ^ block[1] ^ block[3]; \
+ block[2] = block[2] ^ block[3] ^ (block[1] << 7); \
+ block[0] = rol (block[0], 5); \
+ block[2] = rol (block[2], 22); \
+ }
+
+/* Apply the inverse linear transformation to BLOCK. */
+#define LINEAR_TRANSFORMATION_INVERSE(block) \
+ { \
+ block[2] = ror (block[2], 22); \
+ block[0] = ror (block[0] , 5); \
+ block[2] = block[2] ^ block[3] ^ (block[1] << 7); \
+ block[0] = block[0] ^ block[1] ^ block[3]; \
+ block[3] = ror (block[3], 7); \
+ block[1] = ror (block[1], 1); \
+ block[3] = block[3] ^ block[2] ^ (block[0] << 3); \
+ block[1] = block[1] ^ block[0] ^ block[2]; \
+ block[2] = ror (block[2], 3); \
+ block[0] = ror (block[0], 13); \
+ }
+
+/* Apply a Serpent round to BLOCK, using the SBOX number WHICH and the
+ subkeys contained in SUBKEYS. Use BLOCK_TMP as temporary storage.
+ This macro increments `round'. */
+#define ROUND(which, subkeys, block, block_tmp) \
+ { \
+ BLOCK_XOR (block, subkeys[round]); \
+ round++; \
+ SBOX (which, block, block_tmp, 0); \
+ LINEAR_TRANSFORMATION (block_tmp); \
+ BLOCK_COPY (block, block_tmp); \
+ }
+
+/* Apply the last Serpent round to BLOCK, using the SBOX number WHICH
+ and the subkeys contained in SUBKEYS. Use BLOCK_TMP as temporary
+ storage. The result will be stored in BLOCK_TMP. This macro
+ increments `round'. */
+#define ROUND_LAST(which, subkeys, block, block_tmp) \
+ { \
+ BLOCK_XOR (block, subkeys[round]); \
+ round++; \
+ SBOX (which, block, block_tmp, 0); \
+ BLOCK_XOR (block_tmp, subkeys[round]); \
+ round++; \
+ }
+
+/* Apply an inverse Serpent round to BLOCK, using the SBOX number
+ WHICH and the subkeys contained in SUBKEYS. Use BLOCK_TMP as
+ temporary storage. This macro increments `round'. */
+#define ROUND_INVERSE(which, subkey, block, block_tmp) \
+ { \
+ LINEAR_TRANSFORMATION_INVERSE (block); \
+ SBOX_INVERSE (which, block, block_tmp, 0); \
+ BLOCK_XOR (block_tmp, subkey[round]); \
+ round--; \
+ BLOCK_COPY (block, block_tmp); \
+ }
+
+/* Apply the first Serpent round to BLOCK, using the SBOX number WHICH
+ and the subkeys contained in SUBKEYS. Use BLOCK_TMP as temporary
+ storage. The result will be stored in BLOCK_TMP. This macro
+ increments `round'. */
+#define ROUND_FIRST_INVERSE(which, subkeys, block, block_tmp) \
+ { \
+ BLOCK_XOR (block, subkeys[round]); \
+ round--; \
+ SBOX_INVERSE (which, block, block_tmp, 0); \
+ BLOCK_XOR (block_tmp, subkeys[round]); \
+ round--; \
+ }
+
+/* Convert the user provided key KEY of KEY_LENGTH bytes into the
+ internally used format. */
+static void
+serpent_key_prepare (const byte *key, unsigned int key_length,
+ serpent_key_t key_prepared)
+{
+ int i;
+
+ /* Copy key. */
+ for (i = 0; i < key_length / 4; i++)
+ {
+#ifdef WORDS_BIGENDIAN
+ key_prepared[i] = byte_swap_32 (((u32 *) key)[i]);
+#else
+ key_prepared[i] = ((u32 *) key)[i];
+#endif
+ }
+
+ if (i < 8)
+ {
+ /* Key must be padded according to the Serpent
+ specification. */
+ key_prepared[i] = 0x00000001;
+
+ for (i++; i < 8; i++)
+ key_prepared[i] = 0;
+ }
+}
+
+/* Derive the 33 subkeys from KEY and store them in SUBKEYS. */
+static void
+serpent_subkeys_generate (serpent_key_t key, serpent_subkeys_t subkeys)
+{
+ u32 w_real[140]; /* The `prekey'. */
+ u32 k[132];
+ u32 *w = &w_real[8];
+ int i, j;
+
+ /* Initialize with key values. */
+ for (i = 0; i < 8; i++)
+ w[i - 8] = key[i];
+
+ /* Expand to intermediate key using the affine recurrence. */
+ for (i = 0; i < 132; i++)
+ w[i] = rol (w[i - 8] ^ w[i - 5] ^ w[i - 3] ^ w[i - 1] ^ PHI ^ i, 11);
+
+ /* Calculate subkeys via S-Boxes, in bitslice mode. */
+ SBOX (3, w, k, 0);
+ SBOX (2, w, k, 4);
+ SBOX (1, w, k, 8);
+ SBOX (0, w, k, 12);
+ SBOX (7, w, k, 16);
+ SBOX (6, w, k, 20);
+ SBOX (5, w, k, 24);
+ SBOX (4, w, k, 28);
+ SBOX (3, w, k, 32);
+ SBOX (2, w, k, 36);
+ SBOX (1, w, k, 40);
+ SBOX (0, w, k, 44);
+ SBOX (7, w, k, 48);
+ SBOX (6, w, k, 52);
+ SBOX (5, w, k, 56);
+ SBOX (4, w, k, 60);
+ SBOX (3, w, k, 64);
+ SBOX (2, w, k, 68);
+ SBOX (1, w, k, 72);
+ SBOX (0, w, k, 76);
+ SBOX (7, w, k, 80);
+ SBOX (6, w, k, 84);
+ SBOX (5, w, k, 88);
+ SBOX (4, w, k, 92);
+ SBOX (3, w, k, 96);
+ SBOX (2, w, k, 100);
+ SBOX (1, w, k, 104);
+ SBOX (0, w, k, 108);
+ SBOX (7, w, k, 112);
+ SBOX (6, w, k, 116);
+ SBOX (5, w, k, 120);
+ SBOX (4, w, k, 124);
+ SBOX (3, w, k, 128);
+
+ /* Renumber subkeys. */
+ for (i = 0; i < ROUNDS + 1; i++)
+ for (j = 0; j < 4; j++)
+ subkeys[i][j] = k[4 * i + j];
+}
+
+/* Initialize CONTEXT with the key KEY of KEY_LENGTH bits. */
+static void
+serpent_setkey_internal (serpent_context_t *context,
+ const byte *key, unsigned int key_length)
+{
+ serpent_key_t key_prepared;
+
+ serpent_key_prepare (key, key_length, key_prepared);
+ serpent_subkeys_generate (key_prepared, context->keys);
+ _gcry_burn_stack (272 * sizeof (u32));
+}
+
+/* Initialize CTX with the key KEY of KEY_LENGTH bytes. */
+static gcry_err_code_t
+serpent_setkey (void *ctx,
+ const byte *key, unsigned int key_length)
+{
+ serpent_context_t *context = ctx;
+ static const char *serpent_test_ret;
+ static int serpent_init_done;
+ gcry_err_code_t ret = GPG_ERR_NO_ERROR;
+
+ if (! serpent_init_done)
+ {
+ /* Execute a self-test the first time, Serpent is used. */
+ serpent_test_ret = serpent_test ();
+ if (serpent_test_ret)
+ log_error ("Serpent test failure: %s\n", serpent_test_ret);
+ serpent_init_done = 1;
+ }
+
+ if (serpent_test_ret)
+ ret = GPG_ERR_SELFTEST_FAILED;
+ else
+ {
+ serpent_setkey_internal (context, key, key_length);
+ _gcry_burn_stack (sizeof (serpent_key_t));
+ }
+
+ return ret;
+}
+
+static void
+serpent_encrypt_internal (serpent_context_t *context,
+ const serpent_block_t input, serpent_block_t output)
+{
+ serpent_block_t b, b_next;
+ int round = 0;
+
+#ifdef WORDS_BIGENDIAN
+ b[0] = byte_swap_32 (input[0]);
+ b[1] = byte_swap_32 (input[1]);
+ b[2] = byte_swap_32 (input[2]);
+ b[3] = byte_swap_32 (input[3]);
+#else
+ b[0] = input[0];
+ b[1] = input[1];
+ b[2] = input[2];
+ b[3] = input[3];
+#endif
+
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+ ROUND (7, context->keys, b, b_next);
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+ ROUND (7, context->keys, b, b_next);
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+ ROUND (7, context->keys, b, b_next);
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+
+ ROUND_LAST (7, context->keys, b, b_next);
+
+#ifdef WORDS_BIGENDIAN
+ output[0] = byte_swap_32 (b_next[0]);
+ output[1] = byte_swap_32 (b_next[1]);
+ output[2] = byte_swap_32 (b_next[2]);
+ output[3] = byte_swap_32 (b_next[3]);
+#else
+ output[0] = b_next[0];
+ output[1] = b_next[1];
+ output[2] = b_next[2];
+ output[3] = b_next[3];
+#endif
+}
+
+static void
+serpent_decrypt_internal (serpent_context_t *context,
+ const serpent_block_t input, serpent_block_t output)
+{
+ serpent_block_t b, b_next;
+ int round = ROUNDS;
+
+#ifdef WORDS_BIGENDIAN
+ b_next[0] = byte_swap_32 (input[0]);
+ b_next[1] = byte_swap_32 (input[1]);
+ b_next[2] = byte_swap_32 (input[2]);
+ b_next[3] = byte_swap_32 (input[3]);
+#else
+ b_next[0] = input[0];
+ b_next[1] = input[1];
+ b_next[2] = input[2];
+ b_next[3] = input[3];
+#endif
+
+ ROUND_FIRST_INVERSE (7, context->keys, b_next, b);
+
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+ ROUND_INVERSE (7, context->keys, b, b_next);
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+ ROUND_INVERSE (7, context->keys, b, b_next);
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+ ROUND_INVERSE (7, context->keys, b, b_next);
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+
+
+#ifdef WORDS_BIGENDIAN
+ output[0] = byte_swap_32 (b_next[0]);
+ output[1] = byte_swap_32 (b_next[1]);
+ output[2] = byte_swap_32 (b_next[2]);
+ output[3] = byte_swap_32 (b_next[3]);
+#else
+ output[0] = b_next[0];
+ output[1] = b_next[1];
+ output[2] = b_next[2];
+ output[3] = b_next[3];
+#endif
+}
+
+static void
+serpent_encrypt (void *ctx, byte *buffer_out, const byte *buffer_in)
+{
+ serpent_context_t *context = ctx;
+
+ serpent_encrypt_internal (context,
+ (const u32 *) buffer_in, (u32 *) buffer_out);
+ _gcry_burn_stack (2 * sizeof (serpent_block_t));
+}
+
+static void
+serpent_decrypt (void *ctx, byte *buffer_out, const byte *buffer_in)
+{
+ serpent_context_t *context = ctx;
+
+ serpent_decrypt_internal (context,
+ (const u32 *) buffer_in,
+ (u32 *) buffer_out);
+ _gcry_burn_stack (2 * sizeof (serpent_block_t));
+}
+
+
+
+/* Serpent test. */
+
+static const char *
+serpent_test (void)
+{
+ serpent_context_t context;
+ unsigned char scratch[16];
+ unsigned int i;
+
+ static struct test
+ {
+ int key_length;
+ unsigned char key[32];
+ unsigned char text_plain[16];
+ unsigned char text_cipher[16];
+ } test_data[] =
+ {
+ {
+ 16,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\xD2\x9D\x57\x6F\xCE\xA3\xA3\xA7\xED\x90\x99\xF2\x92\x73\xD7\x8E",
+ "\xB2\x28\x8B\x96\x8A\xE8\xB0\x86\x48\xD1\xCE\x96\x06\xFD\x99\x2D"
+ },
+ {
+ 24,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\xD2\x9D\x57\x6F\xCE\xAB\xA3\xA7\xED\x98\x99\xF2\x92\x7B\xD7\x8E",
+ "\x13\x0E\x35\x3E\x10\x37\xC2\x24\x05\xE8\xFA\xEF\xB2\xC3\xC3\xE9"
+ },
+ {
+ 32,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\xD0\x95\x57\x6F\xCE\xA3\xE3\xA7\xED\x98\xD9\xF2\x90\x73\xD7\x8E",
+ "\xB9\x0E\xE5\x86\x2D\xE6\x91\x68\xF2\xBD\xD5\x12\x5B\x45\x47\x2B"
+ },
+ {
+ 32,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00",
+ "\x20\x61\xA4\x27\x82\xBD\x52\xEC\x69\x1E\xC3\x83\xB0\x3B\xA7\x7C"
+ },
+ {
+ 0
+ },
+ };
+
+ for (i = 0; test_data[i].key_length; i++)
+ {
+ serpent_setkey_internal (&context, test_data[i].key,
+ test_data[i].key_length);
+ serpent_encrypt_internal (&context,
+ (const u32 *) test_data[i].text_plain,
+ (u32 *) scratch);
+
+ if (memcmp (scratch, test_data[i].text_cipher, sizeof (serpent_block_t)))
+ switch (test_data[i].key_length)
+ {
+ case 16:
+ return "Serpent-128 test encryption failed.";
+ case 24:
+ return "Serpent-192 test encryption failed.";
+ case 32:
+ return "Serpent-256 test encryption failed.";
+ }
+
+ serpent_decrypt_internal (&context,
+ (const u32 *) test_data[i].text_cipher,
+ (u32 *) scratch);
+ if (memcmp (scratch, test_data[i].text_plain, sizeof (serpent_block_t)))
+ switch (test_data[i].key_length)
+ {
+ case 16:
+ return "Serpent-128 test decryption failed.";
+ case 24:
+ return "Serpent-192 test decryption failed.";
+ case 32:
+ return "Serpent-256 test decryption failed.";
+ }
+ }
+
+ return NULL;
+}
+
+
+
+/* "SERPENT" is an alias for "SERPENT128". */
+static const char *cipher_spec_serpent128_aliases[] =
+ {
+ "SERPENT",
+ NULL
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_serpent128 =
+ {
+ "SERPENT128", cipher_spec_serpent128_aliases, NULL, 16, 128,
+ sizeof (serpent_context_t),
+ serpent_setkey, serpent_encrypt, serpent_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_serpent192 =
+ {
+ "SERPENT192", NULL, NULL, 16, 192,
+ sizeof (serpent_context_t),
+ serpent_setkey, serpent_encrypt, serpent_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_serpent256 =
+ {
+ "SERPENT256", NULL, NULL, 16, 256,
+ sizeof (serpent_context_t),
+ serpent_setkey, serpent_encrypt, serpent_decrypt
+ };
+
+
+GRUB_MOD_INIT(gcry_serpent)
+{
+ grub_cipher_register (&_gcry_cipher_spec_serpent128);
+ grub_cipher_register (&_gcry_cipher_spec_serpent192);
+ grub_cipher_register (&_gcry_cipher_spec_serpent256);
+}
+
+GRUB_MOD_FINI(gcry_serpent)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_serpent128);
+ grub_cipher_unregister (&_gcry_cipher_spec_serpent192);
+ grub_cipher_unregister (&_gcry_cipher_spec_serpent256);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/sha1.c b/grub-core/lib/libgcrypt-grub/cipher/sha1.c
new file mode 100644
index 0000000..daf0af5
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/sha1.c
@@ -0,0 +1,418 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* sha1.c - SHA1 hash function
+ * Copyright (C) 1998, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* Test vectors:
+ *
+ * "abc"
+ * A999 3E36 4706 816A BA3E 2571 7850 C26C 9CD0 D89D
+ *
+ * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ * 8498 3E44 1C3B D26E BAAE 4AA1 F951 29E5 E546 70F1
+ */
+
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "g10lib.h"
+#include "memory.h"
+#include "bithelp.h"
+#include "cipher.h"
+#include "hash-common.h"
+
+
+/* A macro to test whether P is properly aligned for an u32 type.
+ Note that config.h provides a suitable replacement for uintptr_t if
+ it does not exist in stdint.h. */
+/* #if __GNUC__ >= 2 */
+/* # define U32_ALIGNED_P(p) (!(((uintptr_t)p) % __alignof__ (u32))) */
+/* #else */
+/* # define U32_ALIGNED_P(p) (!(((uintptr_t)p) % sizeof (u32))) */
+/* #endif */
+
+#define TRANSFORM(x,d,n) transform ((x), (d), (n))
+
+
+typedef struct
+{
+ u32 h0,h1,h2,h3,h4;
+ u32 nblocks;
+ unsigned char buf[64];
+ int count;
+} SHA1_CONTEXT;
+
+
+
+static void
+sha1_init (void *context)
+{
+ SHA1_CONTEXT *hd = context;
+
+ hd->h0 = 0x67452301;
+ hd->h1 = 0xefcdab89;
+ hd->h2 = 0x98badcfe;
+ hd->h3 = 0x10325476;
+ hd->h4 = 0xc3d2e1f0;
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+/* Round function macros. */
+#define K1 0x5A827999L
+#define K2 0x6ED9EBA1L
+#define K3 0x8F1BBCDCL
+#define K4 0xCA62C1D6L
+#define F1(x,y,z) ( z ^ ( x & ( y ^ z ) ) )
+#define F2(x,y,z) ( x ^ y ^ z )
+#define F3(x,y,z) ( ( x & y ) | ( z & ( x | y ) ) )
+#define F4(x,y,z) ( x ^ y ^ z )
+#define M(i) ( tm = x[ i &0x0f] \
+ ^ x[(i-14)&0x0f] \
+ ^ x[(i-8) &0x0f] \
+ ^ x[(i-3) &0x0f], \
+ (x[i&0x0f] = rol(tm, 1)))
+#define R(a,b,c,d,e,f,k,m) do { e += rol( a, 5 ) \
+ + f( b, c, d ) \
+ + k \
+ + m; \
+ b = rol( b, 30 ); \
+ } while(0)
+
+
+/*
+ * Transform NBLOCKS of each 64 bytes (16 32-bit words) at DATA.
+ */
+static void
+transform (SHA1_CONTEXT *hd, const unsigned char *data, size_t nblocks)
+{
+ register u32 a, b, c, d, e; /* Local copies of the chaining variables. */
+ register u32 tm; /* Helper. */
+ u32 x[16]; /* The array we work on. */
+
+ /* Loop over all blocks. */
+ for ( ;nblocks; nblocks--)
+ {
+#ifdef WORDS_BIGENDIAN
+ memcpy (x, data, 64);
+ data += 64;
+#else
+ {
+ int i;
+ unsigned char *p;
+
+ for(i=0, p=(unsigned char*)x; i < 16; i++, p += 4 )
+ {
+ p[3] = *data++;
+ p[2] = *data++;
+ p[1] = *data++;
+ p[0] = *data++;
+ }
+ }
+#endif
+ /* Get the values of the chaining variables. */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+
+ /* Transform. */
+ R( a, b, c, d, e, F1, K1, x[ 0] );
+ R( e, a, b, c, d, F1, K1, x[ 1] );
+ R( d, e, a, b, c, F1, K1, x[ 2] );
+ R( c, d, e, a, b, F1, K1, x[ 3] );
+ R( b, c, d, e, a, F1, K1, x[ 4] );
+ R( a, b, c, d, e, F1, K1, x[ 5] );
+ R( e, a, b, c, d, F1, K1, x[ 6] );
+ R( d, e, a, b, c, F1, K1, x[ 7] );
+ R( c, d, e, a, b, F1, K1, x[ 8] );
+ R( b, c, d, e, a, F1, K1, x[ 9] );
+ R( a, b, c, d, e, F1, K1, x[10] );
+ R( e, a, b, c, d, F1, K1, x[11] );
+ R( d, e, a, b, c, F1, K1, x[12] );
+ R( c, d, e, a, b, F1, K1, x[13] );
+ R( b, c, d, e, a, F1, K1, x[14] );
+ R( a, b, c, d, e, F1, K1, x[15] );
+ R( e, a, b, c, d, F1, K1, M(16) );
+ R( d, e, a, b, c, F1, K1, M(17) );
+ R( c, d, e, a, b, F1, K1, M(18) );
+ R( b, c, d, e, a, F1, K1, M(19) );
+ R( a, b, c, d, e, F2, K2, M(20) );
+ R( e, a, b, c, d, F2, K2, M(21) );
+ R( d, e, a, b, c, F2, K2, M(22) );
+ R( c, d, e, a, b, F2, K2, M(23) );
+ R( b, c, d, e, a, F2, K2, M(24) );
+ R( a, b, c, d, e, F2, K2, M(25) );
+ R( e, a, b, c, d, F2, K2, M(26) );
+ R( d, e, a, b, c, F2, K2, M(27) );
+ R( c, d, e, a, b, F2, K2, M(28) );
+ R( b, c, d, e, a, F2, K2, M(29) );
+ R( a, b, c, d, e, F2, K2, M(30) );
+ R( e, a, b, c, d, F2, K2, M(31) );
+ R( d, e, a, b, c, F2, K2, M(32) );
+ R( c, d, e, a, b, F2, K2, M(33) );
+ R( b, c, d, e, a, F2, K2, M(34) );
+ R( a, b, c, d, e, F2, K2, M(35) );
+ R( e, a, b, c, d, F2, K2, M(36) );
+ R( d, e, a, b, c, F2, K2, M(37) );
+ R( c, d, e, a, b, F2, K2, M(38) );
+ R( b, c, d, e, a, F2, K2, M(39) );
+ R( a, b, c, d, e, F3, K3, M(40) );
+ R( e, a, b, c, d, F3, K3, M(41) );
+ R( d, e, a, b, c, F3, K3, M(42) );
+ R( c, d, e, a, b, F3, K3, M(43) );
+ R( b, c, d, e, a, F3, K3, M(44) );
+ R( a, b, c, d, e, F3, K3, M(45) );
+ R( e, a, b, c, d, F3, K3, M(46) );
+ R( d, e, a, b, c, F3, K3, M(47) );
+ R( c, d, e, a, b, F3, K3, M(48) );
+ R( b, c, d, e, a, F3, K3, M(49) );
+ R( a, b, c, d, e, F3, K3, M(50) );
+ R( e, a, b, c, d, F3, K3, M(51) );
+ R( d, e, a, b, c, F3, K3, M(52) );
+ R( c, d, e, a, b, F3, K3, M(53) );
+ R( b, c, d, e, a, F3, K3, M(54) );
+ R( a, b, c, d, e, F3, K3, M(55) );
+ R( e, a, b, c, d, F3, K3, M(56) );
+ R( d, e, a, b, c, F3, K3, M(57) );
+ R( c, d, e, a, b, F3, K3, M(58) );
+ R( b, c, d, e, a, F3, K3, M(59) );
+ R( a, b, c, d, e, F4, K4, M(60) );
+ R( e, a, b, c, d, F4, K4, M(61) );
+ R( d, e, a, b, c, F4, K4, M(62) );
+ R( c, d, e, a, b, F4, K4, M(63) );
+ R( b, c, d, e, a, F4, K4, M(64) );
+ R( a, b, c, d, e, F4, K4, M(65) );
+ R( e, a, b, c, d, F4, K4, M(66) );
+ R( d, e, a, b, c, F4, K4, M(67) );
+ R( c, d, e, a, b, F4, K4, M(68) );
+ R( b, c, d, e, a, F4, K4, M(69) );
+ R( a, b, c, d, e, F4, K4, M(70) );
+ R( e, a, b, c, d, F4, K4, M(71) );
+ R( d, e, a, b, c, F4, K4, M(72) );
+ R( c, d, e, a, b, F4, K4, M(73) );
+ R( b, c, d, e, a, F4, K4, M(74) );
+ R( a, b, c, d, e, F4, K4, M(75) );
+ R( e, a, b, c, d, F4, K4, M(76) );
+ R( d, e, a, b, c, F4, K4, M(77) );
+ R( c, d, e, a, b, F4, K4, M(78) );
+ R( b, c, d, e, a, F4, K4, M(79) );
+
+ /* Update the chaining variables. */
+ hd->h0 += a;
+ hd->h1 += b;
+ hd->h2 += c;
+ hd->h3 += d;
+ hd->h4 += e;
+ }
+}
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+sha1_write( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ SHA1_CONTEXT *hd = context;
+ size_t nblocks;
+
+ if (hd->count == 64) /* Flush the buffer. */
+ {
+ TRANSFORM( hd, hd->buf, 1 );
+ _gcry_burn_stack (88+4*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if (!inbuf)
+ return;
+
+ if (hd->count)
+ {
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+ sha1_write (hd, NULL, 0);
+ if (!inlen)
+ return;
+ }
+
+ nblocks = inlen / 64;
+ if (nblocks)
+ {
+ TRANSFORM (hd, inbuf, nblocks);
+ hd->count = 0;
+ hd->nblocks += nblocks;
+ inlen -= nblocks * 64;
+ inbuf += nblocks * 64;
+ }
+ _gcry_burn_stack (88+4*sizeof(void*));
+
+ /* Save remaining bytes. */
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+/* The routine final terminates the computation and
+ * returns the digest.
+ * The handle is prepared for a new cycle, but adding bytes to the
+ * handle will the destroy the returned buffer.
+ * Returns: 20 bytes representing the digest.
+ */
+
+static void
+sha1_final(void *context)
+{
+ SHA1_CONTEXT *hd = context;
+
+ u32 t, msb, lsb;
+ unsigned char *p;
+
+ sha1_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ sha1_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = msb >> 24;
+ hd->buf[57] = msb >> 16;
+ hd->buf[58] = msb >> 8;
+ hd->buf[59] = msb ;
+ hd->buf[60] = lsb >> 24;
+ hd->buf[61] = lsb >> 16;
+ hd->buf[62] = lsb >> 8;
+ hd->buf[63] = lsb ;
+ TRANSFORM( hd, hd->buf, 1 );
+ _gcry_burn_stack (88+4*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
+ *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while(0)
+#endif
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+#undef X
+
+}
+
+static unsigned char *
+sha1_read( void *context )
+{
+ SHA1_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+/****************
+ * Shortcut functions which puts the hash value of the supplied buffer
+ * into outbuf which must have a size of 20 bytes.
+ */
+
+
+
+/*
+ Self-test section.
+ */
+
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+
+static unsigned char asn[15] = /* Object ID is 1.3.14.3.2.26 */
+ { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03,
+ 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 };
+
+static gcry_md_oid_spec_t oid_spec_sha1[] =
+ {
+ /* iso.member-body.us.rsadsi.pkcs.pkcs-1.5 (sha1WithRSAEncryption) */
+ { "1.2.840.113549.1.1.5" },
+ /* iso.member-body.us.x9-57.x9cm.3 (dsaWithSha1)*/
+ { "1.2.840.10040.4.3" },
+ /* from NIST's OIW (sha1) */
+ { "1.3.14.3.2.26" },
+ /* from NIST OIW (sha-1WithRSAEncryption) */
+ { "1.3.14.3.2.29" },
+ /* iso.member-body.us.ansi-x9-62.signatures.ecdsa-with-sha1 */
+ { "1.2.840.10045.4.1" },
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha1 =
+ {
+ "SHA1", asn, DIM (asn), oid_spec_sha1, 20,
+ sha1_init, sha1_write, sha1_final, sha1_read,
+ sizeof (SHA1_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+
+
+GRUB_MOD_INIT(gcry_sha1)
+{
+ grub_md_register (&_gcry_digest_spec_sha1);
+}
+
+GRUB_MOD_FINI(gcry_sha1)
+{
+ grub_md_unregister (&_gcry_digest_spec_sha1);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/sha256.c b/grub-core/lib/libgcrypt-grub/cipher/sha256.c
new file mode 100644
index 0000000..3e917a7
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/sha256.c
@@ -0,0 +1,388 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* sha256.c - SHA256 hash function
+ * Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* Test vectors:
+
+ "abc"
+ SHA224: 23097d22 3405d822 8642a477 bda255b3 2aadbce4 bda0b3f7 e36c9da7
+ SHA256: ba7816bf 8f01cfea 414140de 5dae2223 b00361a3 96177a9c b410ff61 f20015ad
+
+ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ SHA224: 75388b16 512776cc 5dba5da1 fd890150 b0c6455c b4f58b19 52522525
+ SHA256: 248d6a61 d20638b8 e5c02693 0c3e6039 a33ce459 64ff2167 f6ecedd4 19db06c1
+
+ "a" one million times
+ SHA224: 20794655 980c91d8 bbb4c1ea 97618a4b f03f4258 1948b2ee 4ee7ad67
+ SHA256: cdc76e5c 9914fb92 81a1c7e2 84d73e67 f1809a48 a497200e 046d39cc c7112cd0
+
+ */
+
+
+
+#include "g10lib.h"
+#include "memory.h"
+#include "bithelp.h"
+#include "cipher.h"
+#include "hash-common.h"
+
+typedef struct {
+ u32 h0,h1,h2,h3,h4,h5,h6,h7;
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} SHA256_CONTEXT;
+
+
+static void
+sha256_init (void *context)
+{
+ SHA256_CONTEXT *hd = context;
+
+ hd->h0 = 0x6a09e667;
+ hd->h1 = 0xbb67ae85;
+ hd->h2 = 0x3c6ef372;
+ hd->h3 = 0xa54ff53a;
+ hd->h4 = 0x510e527f;
+ hd->h5 = 0x9b05688c;
+ hd->h6 = 0x1f83d9ab;
+ hd->h7 = 0x5be0cd19;
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+static void
+sha224_init (void *context)
+{
+ SHA256_CONTEXT *hd = context;
+
+ hd->h0 = 0xc1059ed8;
+ hd->h1 = 0x367cd507;
+ hd->h2 = 0x3070dd17;
+ hd->h3 = 0xf70e5939;
+ hd->h4 = 0xffc00b31;
+ hd->h5 = 0x68581511;
+ hd->h6 = 0x64f98fa7;
+ hd->h7 = 0xbefa4fa4;
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+/*
+ Transform the message X which consists of 16 32-bit-words. See FIPS
+ 180-2 for details. */
+#define Cho(x,y,z) (z ^ (x & (y ^ z))) /* (4.2) same as SHA-1's F1 */
+#define Maj(x,y,z) ((x & y) | (z & (x|y))) /* (4.3) same as SHA-1's F3 */
+#define Sum0(x) (ror ((x), 2) ^ ror ((x), 13) ^ ror ((x), 22)) /* (4.4) */
+#define Sum1(x) (ror ((x), 6) ^ ror ((x), 11) ^ ror ((x), 25)) /* (4.5) */
+#define S0(x) (ror ((x), 7) ^ ror ((x), 18) ^ ((x) >> 3)) /* (4.6) */
+#define S1(x) (ror ((x), 17) ^ ror ((x), 19) ^ ((x) >> 10)) /* (4.7) */
+#define R(a,b,c,d,e,f,g,h,k,w) do \
+ { \
+ t1 = (h) + Sum1((e)) + Cho((e),(f),(g)) + (k) + (w); \
+ t2 = Sum0((a)) + Maj((a),(b),(c)); \
+ h = g; \
+ g = f; \
+ f = e; \
+ e = d + t1; \
+ d = c; \
+ c = b; \
+ b = a; \
+ a = t1 + t2; \
+ } while (0)
+
+static void
+transform (SHA256_CONTEXT *hd, const unsigned char *data)
+{
+ static const u32 K[64] = {
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+ 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+ 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+ 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+ 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+ 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+ 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+ 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+ 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+ 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+ };
+
+ u32 a,b,c,d,e,f,g,h,t1,t2;
+ u32 x[16];
+ u32 w[64];
+ int i;
+
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ f = hd->h5;
+ g = hd->h6;
+ h = hd->h7;
+
+#ifdef WORDS_BIGENDIAN
+ memcpy (x, data, 64);
+#else
+ {
+ byte *p2;
+
+ for (i=0, p2=(byte*)x; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *data++;
+ p2[2] = *data++;
+ p2[1] = *data++;
+ p2[0] = *data++;
+ }
+ }
+#endif
+
+ for (i=0; i < 16; i++)
+ w[i] = x[i];
+ for (; i < 64; i++)
+ w[i] = S1(w[i-2]) + w[i-7] + S0(w[i-15]) + w[i-16];
+
+ for (i=0; i < 64; i++)
+ R(a,b,c,d,e,f,g,h,K[i],w[i]);
+
+ hd->h0 += a;
+ hd->h1 += b;
+ hd->h2 += c;
+ hd->h3 += d;
+ hd->h4 += e;
+ hd->h5 += f;
+ hd->h6 += g;
+ hd->h7 += h;
+}
+#undef Cho
+#undef Maj
+#undef Sum0
+#undef Sum1
+#undef S0
+#undef S1
+#undef R
+
+
+/* Update the message digest with the contents of INBUF with length
+ INLEN. */
+static void
+sha256_write (void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ SHA256_CONTEXT *hd = context;
+
+ if (hd->count == 64)
+ { /* flush the buffer */
+ transform (hd, hd->buf);
+ _gcry_burn_stack (74*4+32);
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if (!inbuf)
+ return;
+ if (hd->count)
+ {
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+ sha256_write (hd, NULL, 0);
+ if (!inlen)
+ return;
+ }
+
+ while (inlen >= 64)
+ {
+ transform (hd, inbuf);
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ _gcry_burn_stack (74*4+32);
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+/*
+ The routine finally terminates the computation and returns the
+ digest. The handle is prepared for a new cycle, but adding bytes
+ to the handle will the destroy the returned buffer. Returns: 32
+ bytes with the message the digest. */
+static void
+sha256_final(void *context)
+{
+ SHA256_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ sha256_write (hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if ((lsb += hd->count) < t)
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if (hd->count < 56)
+ { /* enough room */
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while (hd->count < 56)
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else
+ { /* need one extra block */
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while (hd->count < 64)
+ hd->buf[hd->count++] = 0;
+ sha256_write (hd, NULL, 0); /* flush */;
+ memset (hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = msb >> 24;
+ hd->buf[57] = msb >> 16;
+ hd->buf[58] = msb >> 8;
+ hd->buf[59] = msb;
+ hd->buf[60] = lsb >> 24;
+ hd->buf[61] = lsb >> 16;
+ hd->buf[62] = lsb >> 8;
+ hd->buf[63] = lsb;
+ transform (hd, hd->buf);
+ _gcry_burn_stack (74*4+32);
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
+ *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while(0)
+#endif
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+ X(5);
+ X(6);
+ X(7);
+#undef X
+}
+
+static byte *
+sha256_read (void *context)
+{
+ SHA256_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+
+
+/*
+ Self-test section.
+ */
+
+
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+
+static byte asn224[19] = /* Object ID is 2.16.840.1.101.3.4.2.4 */
+ { 0x30, 0x2D, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48,
+ 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, 0x05, 0x00, 0x04,
+ 0x1C
+ };
+
+static gcry_md_oid_spec_t oid_spec_sha224[] =
+ {
+ /* From RFC3874, Section 4 */
+ { "2.16.840.1.101.3.4.2.4" },
+ { NULL },
+ };
+
+static byte asn256[19] = /* Object ID is 2.16.840.1.101.3.4.2.1 */
+ { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
+ 0x00, 0x04, 0x20 };
+
+static gcry_md_oid_spec_t oid_spec_sha256[] =
+ {
+ /* According to the OpenPGP draft rfc2440-bis06 */
+ { "2.16.840.1.101.3.4.2.1" },
+ /* PKCS#1 sha256WithRSAEncryption */
+ { "1.2.840.113549.1.1.11" },
+
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha224 =
+ {
+ "SHA224", asn224, DIM (asn224), oid_spec_sha224, 28,
+ sha224_init, sha256_write, sha256_final, sha256_read,
+ sizeof (SHA256_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha256 =
+ {
+ "SHA256", asn256, DIM (asn256), oid_spec_sha256, 32,
+ sha256_init, sha256_write, sha256_final, sha256_read,
+ sizeof (SHA256_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+
+GRUB_MOD_INIT(gcry_sha256)
+{
+ grub_md_register (&_gcry_digest_spec_sha224);
+ grub_md_register (&_gcry_digest_spec_sha256);
+}
+
+GRUB_MOD_FINI(gcry_sha256)
+{
+ grub_md_unregister (&_gcry_digest_spec_sha224);
+ grub_md_unregister (&_gcry_digest_spec_sha256);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/sha512.c b/grub-core/lib/libgcrypt-grub/cipher/sha512.c
new file mode 100644
index 0000000..856b3d0
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/sha512.c
@@ -0,0 +1,441 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* sha512.c - SHA384 and SHA512 hash functions
+ * Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* Test vectors from FIPS-180-2:
+ *
+ * "abc"
+ * 384:
+ * CB00753F 45A35E8B B5A03D69 9AC65007 272C32AB 0EDED163
+ * 1A8B605A 43FF5BED 8086072B A1E7CC23 58BAECA1 34C825A7
+ * 512:
+ * DDAF35A1 93617ABA CC417349 AE204131 12E6FA4E 89A97EA2 0A9EEEE6 4B55D39A
+ * 2192992A 274FC1A8 36BA3C23 A3FEEBBD 454D4423 643CE80E 2A9AC94F A54CA49F
+ *
+ * "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
+ * 384:
+ * 09330C33 F71147E8 3D192FC7 82CD1B47 53111B17 3B3B05D2
+ * 2FA08086 E3B0F712 FCC7C71A 557E2DB9 66C3E9FA 91746039
+ * 512:
+ * 8E959B75 DAE313DA 8CF4F728 14FC143F 8F7779C6 EB9F7FA1 7299AEAD B6889018
+ * 501D289E 4900F7E4 331B99DE C4B5433A C7D329EE B6DD2654 5E96E55B 874BE909
+ *
+ * "a" x 1000000
+ * 384:
+ * 9D0E1809 716474CB 086E834E 310A4A1C ED149E9C 00F24852
+ * 7972CEC5 704C2A5B 07B8B3DC 38ECC4EB AE97DDD8 7F3D8985
+ * 512:
+ * E718483D 0CE76964 4E2E42C7 BC15B463 8E1F98B1 3B204428 5632A803 AFA973EB
+ * DE0FF244 877EA60A 4CB0432C E577C31B EB009C5C 2C49AA2E 4EADB217 AD8CC09B
+ */
+
+
+#include "g10lib.h"
+#include "bithelp.h"
+#include "cipher.h"
+#include "hash-common.h"
+
+typedef struct
+{
+ u64 h0, h1, h2, h3, h4, h5, h6, h7;
+ u64 nblocks;
+ byte buf[128];
+ int count;
+} SHA512_CONTEXT;
+
+static void
+sha512_init (void *context)
+{
+ SHA512_CONTEXT *hd = context;
+
+ hd->h0 = U64_C(0x6a09e667f3bcc908);
+ hd->h1 = U64_C(0xbb67ae8584caa73b);
+ hd->h2 = U64_C(0x3c6ef372fe94f82b);
+ hd->h3 = U64_C(0xa54ff53a5f1d36f1);
+ hd->h4 = U64_C(0x510e527fade682d1);
+ hd->h5 = U64_C(0x9b05688c2b3e6c1f);
+ hd->h6 = U64_C(0x1f83d9abfb41bd6b);
+ hd->h7 = U64_C(0x5be0cd19137e2179);
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+static void
+sha384_init (void *context)
+{
+ SHA512_CONTEXT *hd = context;
+
+ hd->h0 = U64_C(0xcbbb9d5dc1059ed8);
+ hd->h1 = U64_C(0x629a292a367cd507);
+ hd->h2 = U64_C(0x9159015a3070dd17);
+ hd->h3 = U64_C(0x152fecd8f70e5939);
+ hd->h4 = U64_C(0x67332667ffc00b31);
+ hd->h5 = U64_C(0x8eb44a8768581511);
+ hd->h6 = U64_C(0xdb0c2e0d64f98fa7);
+ hd->h7 = U64_C(0x47b5481dbefa4fa4);
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+/****************
+ * Transform the message W which consists of 16 64-bit-words
+ */
+static void
+transform (SHA512_CONTEXT *hd, const unsigned char *data)
+{
+ u64 a, b, c, d, e, f, g, h;
+ u64 w[80];
+ int t;
+ static const u64 k[] =
+ {
+ U64_C(0x428a2f98d728ae22), U64_C(0x7137449123ef65cd),
+ U64_C(0xb5c0fbcfec4d3b2f), U64_C(0xe9b5dba58189dbbc),
+ U64_C(0x3956c25bf348b538), U64_C(0x59f111f1b605d019),
+ U64_C(0x923f82a4af194f9b), U64_C(0xab1c5ed5da6d8118),
+ U64_C(0xd807aa98a3030242), U64_C(0x12835b0145706fbe),
+ U64_C(0x243185be4ee4b28c), U64_C(0x550c7dc3d5ffb4e2),
+ U64_C(0x72be5d74f27b896f), U64_C(0x80deb1fe3b1696b1),
+ U64_C(0x9bdc06a725c71235), U64_C(0xc19bf174cf692694),
+ U64_C(0xe49b69c19ef14ad2), U64_C(0xefbe4786384f25e3),
+ U64_C(0x0fc19dc68b8cd5b5), U64_C(0x240ca1cc77ac9c65),
+ U64_C(0x2de92c6f592b0275), U64_C(0x4a7484aa6ea6e483),
+ U64_C(0x5cb0a9dcbd41fbd4), U64_C(0x76f988da831153b5),
+ U64_C(0x983e5152ee66dfab), U64_C(0xa831c66d2db43210),
+ U64_C(0xb00327c898fb213f), U64_C(0xbf597fc7beef0ee4),
+ U64_C(0xc6e00bf33da88fc2), U64_C(0xd5a79147930aa725),
+ U64_C(0x06ca6351e003826f), U64_C(0x142929670a0e6e70),
+ U64_C(0x27b70a8546d22ffc), U64_C(0x2e1b21385c26c926),
+ U64_C(0x4d2c6dfc5ac42aed), U64_C(0x53380d139d95b3df),
+ U64_C(0x650a73548baf63de), U64_C(0x766a0abb3c77b2a8),
+ U64_C(0x81c2c92e47edaee6), U64_C(0x92722c851482353b),
+ U64_C(0xa2bfe8a14cf10364), U64_C(0xa81a664bbc423001),
+ U64_C(0xc24b8b70d0f89791), U64_C(0xc76c51a30654be30),
+ U64_C(0xd192e819d6ef5218), U64_C(0xd69906245565a910),
+ U64_C(0xf40e35855771202a), U64_C(0x106aa07032bbd1b8),
+ U64_C(0x19a4c116b8d2d0c8), U64_C(0x1e376c085141ab53),
+ U64_C(0x2748774cdf8eeb99), U64_C(0x34b0bcb5e19b48a8),
+ U64_C(0x391c0cb3c5c95a63), U64_C(0x4ed8aa4ae3418acb),
+ U64_C(0x5b9cca4f7763e373), U64_C(0x682e6ff3d6b2b8a3),
+ U64_C(0x748f82ee5defb2fc), U64_C(0x78a5636f43172f60),
+ U64_C(0x84c87814a1f0ab72), U64_C(0x8cc702081a6439ec),
+ U64_C(0x90befffa23631e28), U64_C(0xa4506cebde82bde9),
+ U64_C(0xbef9a3f7b2c67915), U64_C(0xc67178f2e372532b),
+ U64_C(0xca273eceea26619c), U64_C(0xd186b8c721c0c207),
+ U64_C(0xeada7dd6cde0eb1e), U64_C(0xf57d4f7fee6ed178),
+ U64_C(0x06f067aa72176fba), U64_C(0x0a637dc5a2c898a6),
+ U64_C(0x113f9804bef90dae), U64_C(0x1b710b35131c471b),
+ U64_C(0x28db77f523047d84), U64_C(0x32caab7b40c72493),
+ U64_C(0x3c9ebe0a15c9bebc), U64_C(0x431d67c49c100d4c),
+ U64_C(0x4cc5d4becb3e42b6), U64_C(0x597f299cfc657e2a),
+ U64_C(0x5fcb6fab3ad6faec), U64_C(0x6c44198c4a475817)
+ };
+
+ /* get values from the chaining vars */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ f = hd->h5;
+ g = hd->h6;
+ h = hd->h7;
+
+#ifdef WORDS_BIGENDIAN
+ memcpy (w, data, 128);
+#else
+ {
+ int i;
+ byte *p2;
+
+ for (i = 0, p2 = (byte *) w; i < 16; i++, p2 += 8)
+ {
+ p2[7] = *data++;
+ p2[6] = *data++;
+ p2[5] = *data++;
+ p2[4] = *data++;
+ p2[3] = *data++;
+ p2[2] = *data++;
+ p2[1] = *data++;
+ p2[0] = *data++;
+ }
+ }
+#endif
+
+#define ROTR(x,n) (((x)>>(n)) | ((x)<<(64-(n))))
+#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
+#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
+#define Sum0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
+#define Sum1(x) (ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41))
+#define S0(x) (ROTR((x),1) ^ ROTR((x),8) ^ ((x)>>7))
+#define S1(x) (ROTR((x),19) ^ ROTR((x),61) ^ ((x)>>6))
+
+ for (t = 16; t < 80; t++)
+ w[t] = S1 (w[t - 2]) + w[t - 7] + S0 (w[t - 15]) + w[t - 16];
+
+ for (t = 0; t < 80; t++)
+ {
+ u64 t1, t2;
+
+ t1 = h + Sum1 (e) + Ch (e, f, g) + k[t] + w[t];
+ t2 = Sum0 (a) + Maj (a, b, c);
+ h = g;
+ g = f;
+ f = e;
+ e = d + t1;
+ d = c;
+ c = b;
+ b = a;
+ a = t1 + t2;
+
+ /* printf("t=%d a=%016llX b=%016llX c=%016llX d=%016llX "
+ "e=%016llX f=%016llX g=%016llX h=%016llX\n",t,a,b,c,d,e,f,g,h); */
+ }
+
+ /* update chaining vars */
+ hd->h0 += a;
+ hd->h1 += b;
+ hd->h2 += c;
+ hd->h3 += d;
+ hd->h4 += e;
+ hd->h5 += f;
+ hd->h6 += g;
+ hd->h7 += h;
+}
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+sha512_write (void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ SHA512_CONTEXT *hd = context;
+
+ if (hd->count == 128)
+ { /* flush the buffer */
+ transform (hd, hd->buf);
+ _gcry_burn_stack (768);
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if (!inbuf)
+ return;
+ if (hd->count)
+ {
+ for (; inlen && hd->count < 128; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+ sha512_write (context, NULL, 0);
+ if (!inlen)
+ return;
+ }
+
+ while (inlen >= 128)
+ {
+ transform (hd, inbuf);
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 128;
+ inbuf += 128;
+ }
+ _gcry_burn_stack (768);
+ for (; inlen && hd->count < 128; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+/* The routine final terminates the computation and
+ * returns the digest.
+ * The handle is prepared for a new cycle, but adding bytes to the
+ * handle will the destroy the returned buffer.
+ * Returns: 64 bytes representing the digest. When used for sha384,
+ * we take the leftmost 48 of those bytes.
+ */
+
+static void
+sha512_final (void *context)
+{
+ SHA512_CONTEXT *hd = context;
+ u64 t, msb, lsb;
+ byte *p;
+
+ sha512_write (context, NULL, 0); /* flush */ ;
+
+ t = hd->nblocks;
+ /* multiply by 128 to make a byte count */
+ lsb = t << 7;
+ msb = t >> 57;
+ /* add the count */
+ t = lsb;
+ if ((lsb += hd->count) < t)
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 61;
+
+ if (hd->count < 112)
+ { /* enough room */
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while (hd->count < 112)
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else
+ { /* need one extra block */
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while (hd->count < 128)
+ hd->buf[hd->count++] = 0;
+ sha512_write (context, NULL, 0); /* flush */ ;
+ memset (hd->buf, 0, 112); /* fill next block with zeroes */
+ }
+ /* append the 128 bit count */
+ hd->buf[112] = msb >> 56;
+ hd->buf[113] = msb >> 48;
+ hd->buf[114] = msb >> 40;
+ hd->buf[115] = msb >> 32;
+ hd->buf[116] = msb >> 24;
+ hd->buf[117] = msb >> 16;
+ hd->buf[118] = msb >> 8;
+ hd->buf[119] = msb;
+
+ hd->buf[120] = lsb >> 56;
+ hd->buf[121] = lsb >> 48;
+ hd->buf[122] = lsb >> 40;
+ hd->buf[123] = lsb >> 32;
+ hd->buf[124] = lsb >> 24;
+ hd->buf[125] = lsb >> 16;
+ hd->buf[126] = lsb >> 8;
+ hd->buf[127] = lsb;
+ transform (hd, hd->buf);
+ _gcry_burn_stack (768);
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u64*)p = hd->h##a ; p += 8; } while (0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->h##a >> 56; *p++ = hd->h##a >> 48; \
+ *p++ = hd->h##a >> 40; *p++ = hd->h##a >> 32; \
+ *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
+ *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while (0)
+#endif
+ X (0);
+ X (1);
+ X (2);
+ X (3);
+ X (4);
+ X (5);
+ /* Note that these last two chunks are included even for SHA384.
+ We just ignore them. */
+ X (6);
+ X (7);
+#undef X
+}
+
+static byte *
+sha512_read (void *context)
+{
+ SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context;
+ return hd->buf;
+}
+
+
+
+/*
+ Self-test section.
+ */
+
+
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+
+
+
+
+static byte sha512_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.3 */
+ {
+ 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05,
+ 0x00, 0x04, 0x40
+ };
+
+static gcry_md_oid_spec_t oid_spec_sha512[] =
+ {
+ { "2.16.840.1.101.3.4.2.3" },
+
+ /* PKCS#1 sha512WithRSAEncryption */
+ { "1.2.840.113549.1.1.13" },
+
+ { NULL }
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha512 =
+ {
+ "SHA512", sha512_asn, DIM (sha512_asn), oid_spec_sha512, 64,
+ sha512_init, sha512_write, sha512_final, sha512_read,
+ sizeof (SHA512_CONTEXT),
+ .blocksize = 128
+ };
+
+static byte sha384_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.2 */
+ {
+ 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05,
+ 0x00, 0x04, 0x30
+ };
+
+static gcry_md_oid_spec_t oid_spec_sha384[] =
+ {
+ { "2.16.840.1.101.3.4.2.2" },
+
+ /* PKCS#1 sha384WithRSAEncryption */
+ { "1.2.840.113549.1.1.12" },
+
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha384 =
+ {
+ "SHA384", sha384_asn, DIM (sha384_asn), oid_spec_sha384, 48,
+ sha384_init, sha512_write, sha512_final, sha512_read,
+ sizeof (SHA512_CONTEXT),
+ .blocksize = 128
+ };
+
+
+GRUB_MOD_INIT(gcry_sha512)
+{
+ grub_md_register (&_gcry_digest_spec_sha512);
+ grub_md_register (&_gcry_digest_spec_sha384);
+}
+
+GRUB_MOD_FINI(gcry_sha512)
+{
+ grub_md_unregister (&_gcry_digest_spec_sha512);
+ grub_md_unregister (&_gcry_digest_spec_sha384);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/tiger.c b/grub-core/lib/libgcrypt-grub/cipher/tiger.c
new file mode 100644
index 0000000..b7c6b0a
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/tiger.c
@@ -0,0 +1,864 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* tiger.c - The TIGER hash function
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#ifdef HAVE_U64_TYPEDEF
+
+/* we really need it here, but as this is only experiment we
+ * can live without Tiger */
+
+typedef struct {
+ u64 a, b, c;
+ byte buf[64];
+ int count;
+ u32 nblocks;
+} TIGER_CONTEXT;
+
+
+/*********************************
+ * Okay, okay, this is not the fastest code - improvements are welcome.
+ *
+ */
+
+/* Some test vectors:
+ * "" 24F0130C63AC9332 16166E76B1BB925F F373DE2D49584E7A
+ * "abc" F258C1E88414AB2A 527AB541FFC5B8BF 935F7B951C132951
+ * "Tiger" 9F00F599072300DD 276ABB38C8EB6DEC 37790C116F9D2BDF
+ * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"
+ * 87FB2A9083851CF7 470D2CF810E6DF9E B586445034A5A386
+ * "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789"
+ * 467DB80863EBCE48 8DF1CD1261655DE9 57896565975F9197
+ * "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham"
+ * 0C410A042968868A 1671DA5A3FD29A72 5EC1E457D3CDB303
+ * "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham, proc"
+ * "eedings of Fast Software Encryption 3, Cambridge."
+ * EBF591D5AFA655CE 7F22894FF87F54AC 89C811B6B0DA3193
+ * "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham, proc"
+ * "eedings of Fast Software Encryption 3, Cambridge, 1996."
+ * 3D9AEB03D1BD1A63 57B2774DFD6D5B24 DD68151D503974FC
+ * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-ABCDEF"
+ * "GHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"
+ * 00B83EB4E53440C5 76AC6AAEE0A74858 25FD15E70A59FFE4
+ */
+
+static u64 sbox1[256] = {
+ U64_C(0x02aab17cf7e90c5e) /* 0 */, U64_C(0xac424b03e243a8ec) /* 1 */,
+ U64_C(0x72cd5be30dd5fcd3) /* 2 */, U64_C(0x6d019b93f6f97f3a) /* 3 */,
+ U64_C(0xcd9978ffd21f9193) /* 4 */, U64_C(0x7573a1c9708029e2) /* 5 */,
+ U64_C(0xb164326b922a83c3) /* 6 */, U64_C(0x46883eee04915870) /* 7 */,
+ U64_C(0xeaace3057103ece6) /* 8 */, U64_C(0xc54169b808a3535c) /* 9 */,
+ U64_C(0x4ce754918ddec47c) /* 10 */, U64_C(0x0aa2f4dfdc0df40c) /* 11 */,
+ U64_C(0x10b76f18a74dbefa) /* 12 */, U64_C(0xc6ccb6235ad1ab6a) /* 13 */,
+ U64_C(0x13726121572fe2ff) /* 14 */, U64_C(0x1a488c6f199d921e) /* 15 */,
+ U64_C(0x4bc9f9f4da0007ca) /* 16 */, U64_C(0x26f5e6f6e85241c7) /* 17 */,
+ U64_C(0x859079dbea5947b6) /* 18 */, U64_C(0x4f1885c5c99e8c92) /* 19 */,
+ U64_C(0xd78e761ea96f864b) /* 20 */, U64_C(0x8e36428c52b5c17d) /* 21 */,
+ U64_C(0x69cf6827373063c1) /* 22 */, U64_C(0xb607c93d9bb4c56e) /* 23 */,
+ U64_C(0x7d820e760e76b5ea) /* 24 */, U64_C(0x645c9cc6f07fdc42) /* 25 */,
+ U64_C(0xbf38a078243342e0) /* 26 */, U64_C(0x5f6b343c9d2e7d04) /* 27 */,
+ U64_C(0xf2c28aeb600b0ec6) /* 28 */, U64_C(0x6c0ed85f7254bcac) /* 29 */,
+ U64_C(0x71592281a4db4fe5) /* 30 */, U64_C(0x1967fa69ce0fed9f) /* 31 */,
+ U64_C(0xfd5293f8b96545db) /* 32 */, U64_C(0xc879e9d7f2a7600b) /* 33 */,
+ U64_C(0x860248920193194e) /* 34 */, U64_C(0xa4f9533b2d9cc0b3) /* 35 */,
+ U64_C(0x9053836c15957613) /* 36 */, U64_C(0xdb6dcf8afc357bf1) /* 37 */,
+ U64_C(0x18beea7a7a370f57) /* 38 */, U64_C(0x037117ca50b99066) /* 39 */,
+ U64_C(0x6ab30a9774424a35) /* 40 */, U64_C(0xf4e92f02e325249b) /* 41 */,
+ U64_C(0x7739db07061ccae1) /* 42 */, U64_C(0xd8f3b49ceca42a05) /* 43 */,
+ U64_C(0xbd56be3f51382f73) /* 44 */, U64_C(0x45faed5843b0bb28) /* 45 */,
+ U64_C(0x1c813d5c11bf1f83) /* 46 */, U64_C(0x8af0e4b6d75fa169) /* 47 */,
+ U64_C(0x33ee18a487ad9999) /* 48 */, U64_C(0x3c26e8eab1c94410) /* 49 */,
+ U64_C(0xb510102bc0a822f9) /* 50 */, U64_C(0x141eef310ce6123b) /* 51 */,
+ U64_C(0xfc65b90059ddb154) /* 52 */, U64_C(0xe0158640c5e0e607) /* 53 */,
+ U64_C(0x884e079826c3a3cf) /* 54 */, U64_C(0x930d0d9523c535fd) /* 55 */,
+ U64_C(0x35638d754e9a2b00) /* 56 */, U64_C(0x4085fccf40469dd5) /* 57 */,
+ U64_C(0xc4b17ad28be23a4c) /* 58 */, U64_C(0xcab2f0fc6a3e6a2e) /* 59 */,
+ U64_C(0x2860971a6b943fcd) /* 60 */, U64_C(0x3dde6ee212e30446) /* 61 */,
+ U64_C(0x6222f32ae01765ae) /* 62 */, U64_C(0x5d550bb5478308fe) /* 63 */,
+ U64_C(0xa9efa98da0eda22a) /* 64 */, U64_C(0xc351a71686c40da7) /* 65 */,
+ U64_C(0x1105586d9c867c84) /* 66 */, U64_C(0xdcffee85fda22853) /* 67 */,
+ U64_C(0xccfbd0262c5eef76) /* 68 */, U64_C(0xbaf294cb8990d201) /* 69 */,
+ U64_C(0xe69464f52afad975) /* 70 */, U64_C(0x94b013afdf133e14) /* 71 */,
+ U64_C(0x06a7d1a32823c958) /* 72 */, U64_C(0x6f95fe5130f61119) /* 73 */,
+ U64_C(0xd92ab34e462c06c0) /* 74 */, U64_C(0xed7bde33887c71d2) /* 75 */,
+ U64_C(0x79746d6e6518393e) /* 76 */, U64_C(0x5ba419385d713329) /* 77 */,
+ U64_C(0x7c1ba6b948a97564) /* 78 */, U64_C(0x31987c197bfdac67) /* 79 */,
+ U64_C(0xde6c23c44b053d02) /* 80 */, U64_C(0x581c49fed002d64d) /* 81 */,
+ U64_C(0xdd474d6338261571) /* 82 */, U64_C(0xaa4546c3e473d062) /* 83 */,
+ U64_C(0x928fce349455f860) /* 84 */, U64_C(0x48161bbacaab94d9) /* 85 */,
+ U64_C(0x63912430770e6f68) /* 86 */, U64_C(0x6ec8a5e602c6641c) /* 87 */,
+ U64_C(0x87282515337ddd2b) /* 88 */, U64_C(0x2cda6b42034b701b) /* 89 */,
+ U64_C(0xb03d37c181cb096d) /* 90 */, U64_C(0xe108438266c71c6f) /* 91 */,
+ U64_C(0x2b3180c7eb51b255) /* 92 */, U64_C(0xdf92b82f96c08bbc) /* 93 */,
+ U64_C(0x5c68c8c0a632f3ba) /* 94 */, U64_C(0x5504cc861c3d0556) /* 95 */,
+ U64_C(0xabbfa4e55fb26b8f) /* 96 */, U64_C(0x41848b0ab3baceb4) /* 97 */,
+ U64_C(0xb334a273aa445d32) /* 98 */, U64_C(0xbca696f0a85ad881) /* 99 */,
+ U64_C(0x24f6ec65b528d56c) /* 100 */, U64_C(0x0ce1512e90f4524a) /* 101 */,
+ U64_C(0x4e9dd79d5506d35a) /* 102 */, U64_C(0x258905fac6ce9779) /* 103 */,
+ U64_C(0x2019295b3e109b33) /* 104 */, U64_C(0xf8a9478b73a054cc) /* 105 */,
+ U64_C(0x2924f2f934417eb0) /* 106 */, U64_C(0x3993357d536d1bc4) /* 107 */,
+ U64_C(0x38a81ac21db6ff8b) /* 108 */, U64_C(0x47c4fbf17d6016bf) /* 109 */,
+ U64_C(0x1e0faadd7667e3f5) /* 110 */, U64_C(0x7abcff62938beb96) /* 111 */,
+ U64_C(0xa78dad948fc179c9) /* 112 */, U64_C(0x8f1f98b72911e50d) /* 113 */,
+ U64_C(0x61e48eae27121a91) /* 114 */, U64_C(0x4d62f7ad31859808) /* 115 */,
+ U64_C(0xeceba345ef5ceaeb) /* 116 */, U64_C(0xf5ceb25ebc9684ce) /* 117 */,
+ U64_C(0xf633e20cb7f76221) /* 118 */, U64_C(0xa32cdf06ab8293e4) /* 119 */,
+ U64_C(0x985a202ca5ee2ca4) /* 120 */, U64_C(0xcf0b8447cc8a8fb1) /* 121 */,
+ U64_C(0x9f765244979859a3) /* 122 */, U64_C(0xa8d516b1a1240017) /* 123 */,
+ U64_C(0x0bd7ba3ebb5dc726) /* 124 */, U64_C(0xe54bca55b86adb39) /* 125 */,
+ U64_C(0x1d7a3afd6c478063) /* 126 */, U64_C(0x519ec608e7669edd) /* 127 */,
+ U64_C(0x0e5715a2d149aa23) /* 128 */, U64_C(0x177d4571848ff194) /* 129 */,
+ U64_C(0xeeb55f3241014c22) /* 130 */, U64_C(0x0f5e5ca13a6e2ec2) /* 131 */,
+ U64_C(0x8029927b75f5c361) /* 132 */, U64_C(0xad139fabc3d6e436) /* 133 */,
+ U64_C(0x0d5df1a94ccf402f) /* 134 */, U64_C(0x3e8bd948bea5dfc8) /* 135 */,
+ U64_C(0xa5a0d357bd3ff77e) /* 136 */, U64_C(0xa2d12e251f74f645) /* 137 */,
+ U64_C(0x66fd9e525e81a082) /* 138 */, U64_C(0x2e0c90ce7f687a49) /* 139 */,
+ U64_C(0xc2e8bcbeba973bc5) /* 140 */, U64_C(0x000001bce509745f) /* 141 */,
+ U64_C(0x423777bbe6dab3d6) /* 142 */, U64_C(0xd1661c7eaef06eb5) /* 143 */,
+ U64_C(0xa1781f354daacfd8) /* 144 */, U64_C(0x2d11284a2b16affc) /* 145 */,
+ U64_C(0xf1fc4f67fa891d1f) /* 146 */, U64_C(0x73ecc25dcb920ada) /* 147 */,
+ U64_C(0xae610c22c2a12651) /* 148 */, U64_C(0x96e0a810d356b78a) /* 149 */,
+ U64_C(0x5a9a381f2fe7870f) /* 150 */, U64_C(0xd5ad62ede94e5530) /* 151 */,
+ U64_C(0xd225e5e8368d1427) /* 152 */, U64_C(0x65977b70c7af4631) /* 153 */,
+ U64_C(0x99f889b2de39d74f) /* 154 */, U64_C(0x233f30bf54e1d143) /* 155 */,
+ U64_C(0x9a9675d3d9a63c97) /* 156 */, U64_C(0x5470554ff334f9a8) /* 157 */,
+ U64_C(0x166acb744a4f5688) /* 158 */, U64_C(0x70c74caab2e4aead) /* 159 */,
+ U64_C(0xf0d091646f294d12) /* 160 */, U64_C(0x57b82a89684031d1) /* 161 */,
+ U64_C(0xefd95a5a61be0b6b) /* 162 */, U64_C(0x2fbd12e969f2f29a) /* 163 */,
+ U64_C(0x9bd37013feff9fe8) /* 164 */, U64_C(0x3f9b0404d6085a06) /* 165 */,
+ U64_C(0x4940c1f3166cfe15) /* 166 */, U64_C(0x09542c4dcdf3defb) /* 167 */,
+ U64_C(0xb4c5218385cd5ce3) /* 168 */, U64_C(0xc935b7dc4462a641) /* 169 */,
+ U64_C(0x3417f8a68ed3b63f) /* 170 */, U64_C(0xb80959295b215b40) /* 171 */,
+ U64_C(0xf99cdaef3b8c8572) /* 172 */, U64_C(0x018c0614f8fcb95d) /* 173 */,
+ U64_C(0x1b14accd1a3acdf3) /* 174 */, U64_C(0x84d471f200bb732d) /* 175 */,
+ U64_C(0xc1a3110e95e8da16) /* 176 */, U64_C(0x430a7220bf1a82b8) /* 177 */,
+ U64_C(0xb77e090d39df210e) /* 178 */, U64_C(0x5ef4bd9f3cd05e9d) /* 179 */,
+ U64_C(0x9d4ff6da7e57a444) /* 180 */, U64_C(0xda1d60e183d4a5f8) /* 181 */,
+ U64_C(0xb287c38417998e47) /* 182 */, U64_C(0xfe3edc121bb31886) /* 183 */,
+ U64_C(0xc7fe3ccc980ccbef) /* 184 */, U64_C(0xe46fb590189bfd03) /* 185 */,
+ U64_C(0x3732fd469a4c57dc) /* 186 */, U64_C(0x7ef700a07cf1ad65) /* 187 */,
+ U64_C(0x59c64468a31d8859) /* 188 */, U64_C(0x762fb0b4d45b61f6) /* 189 */,
+ U64_C(0x155baed099047718) /* 190 */, U64_C(0x68755e4c3d50baa6) /* 191 */,
+ U64_C(0xe9214e7f22d8b4df) /* 192 */, U64_C(0x2addbf532eac95f4) /* 193 */,
+ U64_C(0x32ae3909b4bd0109) /* 194 */, U64_C(0x834df537b08e3450) /* 195 */,
+ U64_C(0xfa209da84220728d) /* 196 */, U64_C(0x9e691d9b9efe23f7) /* 197 */,
+ U64_C(0x0446d288c4ae8d7f) /* 198 */, U64_C(0x7b4cc524e169785b) /* 199 */,
+ U64_C(0x21d87f0135ca1385) /* 200 */, U64_C(0xcebb400f137b8aa5) /* 201 */,
+ U64_C(0x272e2b66580796be) /* 202 */, U64_C(0x3612264125c2b0de) /* 203 */,
+ U64_C(0x057702bdad1efbb2) /* 204 */, U64_C(0xd4babb8eacf84be9) /* 205 */,
+ U64_C(0x91583139641bc67b) /* 206 */, U64_C(0x8bdc2de08036e024) /* 207 */,
+ U64_C(0x603c8156f49f68ed) /* 208 */, U64_C(0xf7d236f7dbef5111) /* 209 */,
+ U64_C(0x9727c4598ad21e80) /* 210 */, U64_C(0xa08a0896670a5fd7) /* 211 */,
+ U64_C(0xcb4a8f4309eba9cb) /* 212 */, U64_C(0x81af564b0f7036a1) /* 213 */,
+ U64_C(0xc0b99aa778199abd) /* 214 */, U64_C(0x959f1ec83fc8e952) /* 215 */,
+ U64_C(0x8c505077794a81b9) /* 216 */, U64_C(0x3acaaf8f056338f0) /* 217 */,
+ U64_C(0x07b43f50627a6778) /* 218 */, U64_C(0x4a44ab49f5eccc77) /* 219 */,
+ U64_C(0x3bc3d6e4b679ee98) /* 220 */, U64_C(0x9cc0d4d1cf14108c) /* 221 */,
+ U64_C(0x4406c00b206bc8a0) /* 222 */, U64_C(0x82a18854c8d72d89) /* 223 */,
+ U64_C(0x67e366b35c3c432c) /* 224 */, U64_C(0xb923dd61102b37f2) /* 225 */,
+ U64_C(0x56ab2779d884271d) /* 226 */, U64_C(0xbe83e1b0ff1525af) /* 227 */,
+ U64_C(0xfb7c65d4217e49a9) /* 228 */, U64_C(0x6bdbe0e76d48e7d4) /* 229 */,
+ U64_C(0x08df828745d9179e) /* 230 */, U64_C(0x22ea6a9add53bd34) /* 231 */,
+ U64_C(0xe36e141c5622200a) /* 232 */, U64_C(0x7f805d1b8cb750ee) /* 233 */,
+ U64_C(0xafe5c7a59f58e837) /* 234 */, U64_C(0xe27f996a4fb1c23c) /* 235 */,
+ U64_C(0xd3867dfb0775f0d0) /* 236 */, U64_C(0xd0e673de6e88891a) /* 237 */,
+ U64_C(0x123aeb9eafb86c25) /* 238 */, U64_C(0x30f1d5d5c145b895) /* 239 */,
+ U64_C(0xbb434a2dee7269e7) /* 240 */, U64_C(0x78cb67ecf931fa38) /* 241 */,
+ U64_C(0xf33b0372323bbf9c) /* 242 */, U64_C(0x52d66336fb279c74) /* 243 */,
+ U64_C(0x505f33ac0afb4eaa) /* 244 */, U64_C(0xe8a5cd99a2cce187) /* 245 */,
+ U64_C(0x534974801e2d30bb) /* 246 */, U64_C(0x8d2d5711d5876d90) /* 247 */,
+ U64_C(0x1f1a412891bc038e) /* 248 */, U64_C(0xd6e2e71d82e56648) /* 249 */,
+ U64_C(0x74036c3a497732b7) /* 250 */, U64_C(0x89b67ed96361f5ab) /* 251 */,
+ U64_C(0xffed95d8f1ea02a2) /* 252 */, U64_C(0xe72b3bd61464d43d) /* 253 */,
+ U64_C(0xa6300f170bdc4820) /* 254 */, U64_C(0xebc18760ed78a77a) /* 255 */
+};
+static u64 sbox2[256] = {
+ U64_C(0xe6a6be5a05a12138) /* 256 */, U64_C(0xb5a122a5b4f87c98) /* 257 */,
+ U64_C(0x563c6089140b6990) /* 258 */, U64_C(0x4c46cb2e391f5dd5) /* 259 */,
+ U64_C(0xd932addbc9b79434) /* 260 */, U64_C(0x08ea70e42015aff5) /* 261 */,
+ U64_C(0xd765a6673e478cf1) /* 262 */, U64_C(0xc4fb757eab278d99) /* 263 */,
+ U64_C(0xdf11c6862d6e0692) /* 264 */, U64_C(0xddeb84f10d7f3b16) /* 265 */,
+ U64_C(0x6f2ef604a665ea04) /* 266 */, U64_C(0x4a8e0f0ff0e0dfb3) /* 267 */,
+ U64_C(0xa5edeef83dbcba51) /* 268 */, U64_C(0xfc4f0a2a0ea4371e) /* 269 */,
+ U64_C(0xe83e1da85cb38429) /* 270 */, U64_C(0xdc8ff882ba1b1ce2) /* 271 */,
+ U64_C(0xcd45505e8353e80d) /* 272 */, U64_C(0x18d19a00d4db0717) /* 273 */,
+ U64_C(0x34a0cfeda5f38101) /* 274 */, U64_C(0x0be77e518887caf2) /* 275 */,
+ U64_C(0x1e341438b3c45136) /* 276 */, U64_C(0xe05797f49089ccf9) /* 277 */,
+ U64_C(0xffd23f9df2591d14) /* 278 */, U64_C(0x543dda228595c5cd) /* 279 */,
+ U64_C(0x661f81fd99052a33) /* 280 */, U64_C(0x8736e641db0f7b76) /* 281 */,
+ U64_C(0x15227725418e5307) /* 282 */, U64_C(0xe25f7f46162eb2fa) /* 283 */,
+ U64_C(0x48a8b2126c13d9fe) /* 284 */, U64_C(0xafdc541792e76eea) /* 285 */,
+ U64_C(0x03d912bfc6d1898f) /* 286 */, U64_C(0x31b1aafa1b83f51b) /* 287 */,
+ U64_C(0xf1ac2796e42ab7d9) /* 288 */, U64_C(0x40a3a7d7fcd2ebac) /* 289 */,
+ U64_C(0x1056136d0afbbcc5) /* 290 */, U64_C(0x7889e1dd9a6d0c85) /* 291 */,
+ U64_C(0xd33525782a7974aa) /* 292 */, U64_C(0xa7e25d09078ac09b) /* 293 */,
+ U64_C(0xbd4138b3eac6edd0) /* 294 */, U64_C(0x920abfbe71eb9e70) /* 295 */,
+ U64_C(0xa2a5d0f54fc2625c) /* 296 */, U64_C(0xc054e36b0b1290a3) /* 297 */,
+ U64_C(0xf6dd59ff62fe932b) /* 298 */, U64_C(0x3537354511a8ac7d) /* 299 */,
+ U64_C(0xca845e9172fadcd4) /* 300 */, U64_C(0x84f82b60329d20dc) /* 301 */,
+ U64_C(0x79c62ce1cd672f18) /* 302 */, U64_C(0x8b09a2add124642c) /* 303 */,
+ U64_C(0xd0c1e96a19d9e726) /* 304 */, U64_C(0x5a786a9b4ba9500c) /* 305 */,
+ U64_C(0x0e020336634c43f3) /* 306 */, U64_C(0xc17b474aeb66d822) /* 307 */,
+ U64_C(0x6a731ae3ec9baac2) /* 308 */, U64_C(0x8226667ae0840258) /* 309 */,
+ U64_C(0x67d4567691caeca5) /* 310 */, U64_C(0x1d94155c4875adb5) /* 311 */,
+ U64_C(0x6d00fd985b813fdf) /* 312 */, U64_C(0x51286efcb774cd06) /* 313 */,
+ U64_C(0x5e8834471fa744af) /* 314 */, U64_C(0xf72ca0aee761ae2e) /* 315 */,
+ U64_C(0xbe40e4cdaee8e09a) /* 316 */, U64_C(0xe9970bbb5118f665) /* 317 */,
+ U64_C(0x726e4beb33df1964) /* 318 */, U64_C(0x703b000729199762) /* 319 */,
+ U64_C(0x4631d816f5ef30a7) /* 320 */, U64_C(0xb880b5b51504a6be) /* 321 */,
+ U64_C(0x641793c37ed84b6c) /* 322 */, U64_C(0x7b21ed77f6e97d96) /* 323 */,
+ U64_C(0x776306312ef96b73) /* 324 */, U64_C(0xae528948e86ff3f4) /* 325 */,
+ U64_C(0x53dbd7f286a3f8f8) /* 326 */, U64_C(0x16cadce74cfc1063) /* 327 */,
+ U64_C(0x005c19bdfa52c6dd) /* 328 */, U64_C(0x68868f5d64d46ad3) /* 329 */,
+ U64_C(0x3a9d512ccf1e186a) /* 330 */, U64_C(0x367e62c2385660ae) /* 331 */,
+ U64_C(0xe359e7ea77dcb1d7) /* 332 */, U64_C(0x526c0773749abe6e) /* 333 */,
+ U64_C(0x735ae5f9d09f734b) /* 334 */, U64_C(0x493fc7cc8a558ba8) /* 335 */,
+ U64_C(0xb0b9c1533041ab45) /* 336 */, U64_C(0x321958ba470a59bd) /* 337 */,
+ U64_C(0x852db00b5f46c393) /* 338 */, U64_C(0x91209b2bd336b0e5) /* 339 */,
+ U64_C(0x6e604f7d659ef19f) /* 340 */, U64_C(0xb99a8ae2782ccb24) /* 341 */,
+ U64_C(0xccf52ab6c814c4c7) /* 342 */, U64_C(0x4727d9afbe11727b) /* 343 */,
+ U64_C(0x7e950d0c0121b34d) /* 344 */, U64_C(0x756f435670ad471f) /* 345 */,
+ U64_C(0xf5add442615a6849) /* 346 */, U64_C(0x4e87e09980b9957a) /* 347 */,
+ U64_C(0x2acfa1df50aee355) /* 348 */, U64_C(0xd898263afd2fd556) /* 349 */,
+ U64_C(0xc8f4924dd80c8fd6) /* 350 */, U64_C(0xcf99ca3d754a173a) /* 351 */,
+ U64_C(0xfe477bacaf91bf3c) /* 352 */, U64_C(0xed5371f6d690c12d) /* 353 */,
+ U64_C(0x831a5c285e687094) /* 354 */, U64_C(0xc5d3c90a3708a0a4) /* 355 */,
+ U64_C(0x0f7f903717d06580) /* 356 */, U64_C(0x19f9bb13b8fdf27f) /* 357 */,
+ U64_C(0xb1bd6f1b4d502843) /* 358 */, U64_C(0x1c761ba38fff4012) /* 359 */,
+ U64_C(0x0d1530c4e2e21f3b) /* 360 */, U64_C(0x8943ce69a7372c8a) /* 361 */,
+ U64_C(0xe5184e11feb5ce66) /* 362 */, U64_C(0x618bdb80bd736621) /* 363 */,
+ U64_C(0x7d29bad68b574d0b) /* 364 */, U64_C(0x81bb613e25e6fe5b) /* 365 */,
+ U64_C(0x071c9c10bc07913f) /* 366 */, U64_C(0xc7beeb7909ac2d97) /* 367 */,
+ U64_C(0xc3e58d353bc5d757) /* 368 */, U64_C(0xeb017892f38f61e8) /* 369 */,
+ U64_C(0xd4effb9c9b1cc21a) /* 370 */, U64_C(0x99727d26f494f7ab) /* 371 */,
+ U64_C(0xa3e063a2956b3e03) /* 372 */, U64_C(0x9d4a8b9a4aa09c30) /* 373 */,
+ U64_C(0x3f6ab7d500090fb4) /* 374 */, U64_C(0x9cc0f2a057268ac0) /* 375 */,
+ U64_C(0x3dee9d2dedbf42d1) /* 376 */, U64_C(0x330f49c87960a972) /* 377 */,
+ U64_C(0xc6b2720287421b41) /* 378 */, U64_C(0x0ac59ec07c00369c) /* 379 */,
+ U64_C(0xef4eac49cb353425) /* 380 */, U64_C(0xf450244eef0129d8) /* 381 */,
+ U64_C(0x8acc46e5caf4deb6) /* 382 */, U64_C(0x2ffeab63989263f7) /* 383 */,
+ U64_C(0x8f7cb9fe5d7a4578) /* 384 */, U64_C(0x5bd8f7644e634635) /* 385 */,
+ U64_C(0x427a7315bf2dc900) /* 386 */, U64_C(0x17d0c4aa2125261c) /* 387 */,
+ U64_C(0x3992486c93518e50) /* 388 */, U64_C(0xb4cbfee0a2d7d4c3) /* 389 */,
+ U64_C(0x7c75d6202c5ddd8d) /* 390 */, U64_C(0xdbc295d8e35b6c61) /* 391 */,
+ U64_C(0x60b369d302032b19) /* 392 */, U64_C(0xce42685fdce44132) /* 393 */,
+ U64_C(0x06f3ddb9ddf65610) /* 394 */, U64_C(0x8ea4d21db5e148f0) /* 395 */,
+ U64_C(0x20b0fce62fcd496f) /* 396 */, U64_C(0x2c1b912358b0ee31) /* 397 */,
+ U64_C(0xb28317b818f5a308) /* 398 */, U64_C(0xa89c1e189ca6d2cf) /* 399 */,
+ U64_C(0x0c6b18576aaadbc8) /* 400 */, U64_C(0xb65deaa91299fae3) /* 401 */,
+ U64_C(0xfb2b794b7f1027e7) /* 402 */, U64_C(0x04e4317f443b5beb) /* 403 */,
+ U64_C(0x4b852d325939d0a6) /* 404 */, U64_C(0xd5ae6beefb207ffc) /* 405 */,
+ U64_C(0x309682b281c7d374) /* 406 */, U64_C(0xbae309a194c3b475) /* 407 */,
+ U64_C(0x8cc3f97b13b49f05) /* 408 */, U64_C(0x98a9422ff8293967) /* 409 */,
+ U64_C(0x244b16b01076ff7c) /* 410 */, U64_C(0xf8bf571c663d67ee) /* 411 */,
+ U64_C(0x1f0d6758eee30da1) /* 412 */, U64_C(0xc9b611d97adeb9b7) /* 413 */,
+ U64_C(0xb7afd5887b6c57a2) /* 414 */, U64_C(0x6290ae846b984fe1) /* 415 */,
+ U64_C(0x94df4cdeacc1a5fd) /* 416 */, U64_C(0x058a5bd1c5483aff) /* 417 */,
+ U64_C(0x63166cc142ba3c37) /* 418 */, U64_C(0x8db8526eb2f76f40) /* 419 */,
+ U64_C(0xe10880036f0d6d4e) /* 420 */, U64_C(0x9e0523c9971d311d) /* 421 */,
+ U64_C(0x45ec2824cc7cd691) /* 422 */, U64_C(0x575b8359e62382c9) /* 423 */,
+ U64_C(0xfa9e400dc4889995) /* 424 */, U64_C(0xd1823ecb45721568) /* 425 */,
+ U64_C(0xdafd983b8206082f) /* 426 */, U64_C(0xaa7d29082386a8cb) /* 427 */,
+ U64_C(0x269fcd4403b87588) /* 428 */, U64_C(0x1b91f5f728bdd1e0) /* 429 */,
+ U64_C(0xe4669f39040201f6) /* 430 */, U64_C(0x7a1d7c218cf04ade) /* 431 */,
+ U64_C(0x65623c29d79ce5ce) /* 432 */, U64_C(0x2368449096c00bb1) /* 433 */,
+ U64_C(0xab9bf1879da503ba) /* 434 */, U64_C(0xbc23ecb1a458058e) /* 435 */,
+ U64_C(0x9a58df01bb401ecc) /* 436 */, U64_C(0xa070e868a85f143d) /* 437 */,
+ U64_C(0x4ff188307df2239e) /* 438 */, U64_C(0x14d565b41a641183) /* 439 */,
+ U64_C(0xee13337452701602) /* 440 */, U64_C(0x950e3dcf3f285e09) /* 441 */,
+ U64_C(0x59930254b9c80953) /* 442 */, U64_C(0x3bf299408930da6d) /* 443 */,
+ U64_C(0xa955943f53691387) /* 444 */, U64_C(0xa15edecaa9cb8784) /* 445 */,
+ U64_C(0x29142127352be9a0) /* 446 */, U64_C(0x76f0371fff4e7afb) /* 447 */,
+ U64_C(0x0239f450274f2228) /* 448 */, U64_C(0xbb073af01d5e868b) /* 449 */,
+ U64_C(0xbfc80571c10e96c1) /* 450 */, U64_C(0xd267088568222e23) /* 451 */,
+ U64_C(0x9671a3d48e80b5b0) /* 452 */, U64_C(0x55b5d38ae193bb81) /* 453 */,
+ U64_C(0x693ae2d0a18b04b8) /* 454 */, U64_C(0x5c48b4ecadd5335f) /* 455 */,
+ U64_C(0xfd743b194916a1ca) /* 456 */, U64_C(0x2577018134be98c4) /* 457 */,
+ U64_C(0xe77987e83c54a4ad) /* 458 */, U64_C(0x28e11014da33e1b9) /* 459 */,
+ U64_C(0x270cc59e226aa213) /* 460 */, U64_C(0x71495f756d1a5f60) /* 461 */,
+ U64_C(0x9be853fb60afef77) /* 462 */, U64_C(0xadc786a7f7443dbf) /* 463 */,
+ U64_C(0x0904456173b29a82) /* 464 */, U64_C(0x58bc7a66c232bd5e) /* 465 */,
+ U64_C(0xf306558c673ac8b2) /* 466 */, U64_C(0x41f639c6b6c9772a) /* 467 */,
+ U64_C(0x216defe99fda35da) /* 468 */, U64_C(0x11640cc71c7be615) /* 469 */,
+ U64_C(0x93c43694565c5527) /* 470 */, U64_C(0xea038e6246777839) /* 471 */,
+ U64_C(0xf9abf3ce5a3e2469) /* 472 */, U64_C(0x741e768d0fd312d2) /* 473 */,
+ U64_C(0x0144b883ced652c6) /* 474 */, U64_C(0xc20b5a5ba33f8552) /* 475 */,
+ U64_C(0x1ae69633c3435a9d) /* 476 */, U64_C(0x97a28ca4088cfdec) /* 477 */,
+ U64_C(0x8824a43c1e96f420) /* 478 */, U64_C(0x37612fa66eeea746) /* 479 */,
+ U64_C(0x6b4cb165f9cf0e5a) /* 480 */, U64_C(0x43aa1c06a0abfb4a) /* 481 */,
+ U64_C(0x7f4dc26ff162796b) /* 482 */, U64_C(0x6cbacc8e54ed9b0f) /* 483 */,
+ U64_C(0xa6b7ffefd2bb253e) /* 484 */, U64_C(0x2e25bc95b0a29d4f) /* 485 */,
+ U64_C(0x86d6a58bdef1388c) /* 486 */, U64_C(0xded74ac576b6f054) /* 487 */,
+ U64_C(0x8030bdbc2b45805d) /* 488 */, U64_C(0x3c81af70e94d9289) /* 489 */,
+ U64_C(0x3eff6dda9e3100db) /* 490 */, U64_C(0xb38dc39fdfcc8847) /* 491 */,
+ U64_C(0x123885528d17b87e) /* 492 */, U64_C(0xf2da0ed240b1b642) /* 493 */,
+ U64_C(0x44cefadcd54bf9a9) /* 494 */, U64_C(0x1312200e433c7ee6) /* 495 */,
+ U64_C(0x9ffcc84f3a78c748) /* 496 */, U64_C(0xf0cd1f72248576bb) /* 497 */,
+ U64_C(0xec6974053638cfe4) /* 498 */, U64_C(0x2ba7b67c0cec4e4c) /* 499 */,
+ U64_C(0xac2f4df3e5ce32ed) /* 500 */, U64_C(0xcb33d14326ea4c11) /* 501 */,
+ U64_C(0xa4e9044cc77e58bc) /* 502 */, U64_C(0x5f513293d934fcef) /* 503 */,
+ U64_C(0x5dc9645506e55444) /* 504 */, U64_C(0x50de418f317de40a) /* 505 */,
+ U64_C(0x388cb31a69dde259) /* 506 */, U64_C(0x2db4a83455820a86) /* 507 */,
+ U64_C(0x9010a91e84711ae9) /* 508 */, U64_C(0x4df7f0b7b1498371) /* 509 */,
+ U64_C(0xd62a2eabc0977179) /* 510 */, U64_C(0x22fac097aa8d5c0e) /* 511 */
+};
+static u64 sbox3[256] = {
+ U64_C(0xf49fcc2ff1daf39b) /* 512 */, U64_C(0x487fd5c66ff29281) /* 513 */,
+ U64_C(0xe8a30667fcdca83f) /* 514 */, U64_C(0x2c9b4be3d2fcce63) /* 515 */,
+ U64_C(0xda3ff74b93fbbbc2) /* 516 */, U64_C(0x2fa165d2fe70ba66) /* 517 */,
+ U64_C(0xa103e279970e93d4) /* 518 */, U64_C(0xbecdec77b0e45e71) /* 519 */,
+ U64_C(0xcfb41e723985e497) /* 520 */, U64_C(0xb70aaa025ef75017) /* 521 */,
+ U64_C(0xd42309f03840b8e0) /* 522 */, U64_C(0x8efc1ad035898579) /* 523 */,
+ U64_C(0x96c6920be2b2abc5) /* 524 */, U64_C(0x66af4163375a9172) /* 525 */,
+ U64_C(0x2174abdcca7127fb) /* 526 */, U64_C(0xb33ccea64a72ff41) /* 527 */,
+ U64_C(0xf04a4933083066a5) /* 528 */, U64_C(0x8d970acdd7289af5) /* 529 */,
+ U64_C(0x8f96e8e031c8c25e) /* 530 */, U64_C(0xf3fec02276875d47) /* 531 */,
+ U64_C(0xec7bf310056190dd) /* 532 */, U64_C(0xf5adb0aebb0f1491) /* 533 */,
+ U64_C(0x9b50f8850fd58892) /* 534 */, U64_C(0x4975488358b74de8) /* 535 */,
+ U64_C(0xa3354ff691531c61) /* 536 */, U64_C(0x0702bbe481d2c6ee) /* 537 */,
+ U64_C(0x89fb24057deded98) /* 538 */, U64_C(0xac3075138596e902) /* 539 */,
+ U64_C(0x1d2d3580172772ed) /* 540 */, U64_C(0xeb738fc28e6bc30d) /* 541 */,
+ U64_C(0x5854ef8f63044326) /* 542 */, U64_C(0x9e5c52325add3bbe) /* 543 */,
+ U64_C(0x90aa53cf325c4623) /* 544 */, U64_C(0xc1d24d51349dd067) /* 545 */,
+ U64_C(0x2051cfeea69ea624) /* 546 */, U64_C(0x13220f0a862e7e4f) /* 547 */,
+ U64_C(0xce39399404e04864) /* 548 */, U64_C(0xd9c42ca47086fcb7) /* 549 */,
+ U64_C(0x685ad2238a03e7cc) /* 550 */, U64_C(0x066484b2ab2ff1db) /* 551 */,
+ U64_C(0xfe9d5d70efbf79ec) /* 552 */, U64_C(0x5b13b9dd9c481854) /* 553 */,
+ U64_C(0x15f0d475ed1509ad) /* 554 */, U64_C(0x0bebcd060ec79851) /* 555 */,
+ U64_C(0xd58c6791183ab7f8) /* 556 */, U64_C(0xd1187c5052f3eee4) /* 557 */,
+ U64_C(0xc95d1192e54e82ff) /* 558 */, U64_C(0x86eea14cb9ac6ca2) /* 559 */,
+ U64_C(0x3485beb153677d5d) /* 560 */, U64_C(0xdd191d781f8c492a) /* 561 */,
+ U64_C(0xf60866baa784ebf9) /* 562 */, U64_C(0x518f643ba2d08c74) /* 563 */,
+ U64_C(0x8852e956e1087c22) /* 564 */, U64_C(0xa768cb8dc410ae8d) /* 565 */,
+ U64_C(0x38047726bfec8e1a) /* 566 */, U64_C(0xa67738b4cd3b45aa) /* 567 */,
+ U64_C(0xad16691cec0dde19) /* 568 */, U64_C(0xc6d4319380462e07) /* 569 */,
+ U64_C(0xc5a5876d0ba61938) /* 570 */, U64_C(0x16b9fa1fa58fd840) /* 571 */,
+ U64_C(0x188ab1173ca74f18) /* 572 */, U64_C(0xabda2f98c99c021f) /* 573 */,
+ U64_C(0x3e0580ab134ae816) /* 574 */, U64_C(0x5f3b05b773645abb) /* 575 */,
+ U64_C(0x2501a2be5575f2f6) /* 576 */, U64_C(0x1b2f74004e7e8ba9) /* 577 */,
+ U64_C(0x1cd7580371e8d953) /* 578 */, U64_C(0x7f6ed89562764e30) /* 579 */,
+ U64_C(0xb15926ff596f003d) /* 580 */, U64_C(0x9f65293da8c5d6b9) /* 581 */,
+ U64_C(0x6ecef04dd690f84c) /* 582 */, U64_C(0x4782275fff33af88) /* 583 */,
+ U64_C(0xe41433083f820801) /* 584 */, U64_C(0xfd0dfe409a1af9b5) /* 585 */,
+ U64_C(0x4325a3342cdb396b) /* 586 */, U64_C(0x8ae77e62b301b252) /* 587 */,
+ U64_C(0xc36f9e9f6655615a) /* 588 */, U64_C(0x85455a2d92d32c09) /* 589 */,
+ U64_C(0xf2c7dea949477485) /* 590 */, U64_C(0x63cfb4c133a39eba) /* 591 */,
+ U64_C(0x83b040cc6ebc5462) /* 592 */, U64_C(0x3b9454c8fdb326b0) /* 593 */,
+ U64_C(0x56f56a9e87ffd78c) /* 594 */, U64_C(0x2dc2940d99f42bc6) /* 595 */,
+ U64_C(0x98f7df096b096e2d) /* 596 */, U64_C(0x19a6e01e3ad852bf) /* 597 */,
+ U64_C(0x42a99ccbdbd4b40b) /* 598 */, U64_C(0xa59998af45e9c559) /* 599 */,
+ U64_C(0x366295e807d93186) /* 600 */, U64_C(0x6b48181bfaa1f773) /* 601 */,
+ U64_C(0x1fec57e2157a0a1d) /* 602 */, U64_C(0x4667446af6201ad5) /* 603 */,
+ U64_C(0xe615ebcacfb0f075) /* 604 */, U64_C(0xb8f31f4f68290778) /* 605 */,
+ U64_C(0x22713ed6ce22d11e) /* 606 */, U64_C(0x3057c1a72ec3c93b) /* 607 */,
+ U64_C(0xcb46acc37c3f1f2f) /* 608 */, U64_C(0xdbb893fd02aaf50e) /* 609 */,
+ U64_C(0x331fd92e600b9fcf) /* 610 */, U64_C(0xa498f96148ea3ad6) /* 611 */,
+ U64_C(0xa8d8426e8b6a83ea) /* 612 */, U64_C(0xa089b274b7735cdc) /* 613 */,
+ U64_C(0x87f6b3731e524a11) /* 614 */, U64_C(0x118808e5cbc96749) /* 615 */,
+ U64_C(0x9906e4c7b19bd394) /* 616 */, U64_C(0xafed7f7e9b24a20c) /* 617 */,
+ U64_C(0x6509eadeeb3644a7) /* 618 */, U64_C(0x6c1ef1d3e8ef0ede) /* 619 */,
+ U64_C(0xb9c97d43e9798fb4) /* 620 */, U64_C(0xa2f2d784740c28a3) /* 621 */,
+ U64_C(0x7b8496476197566f) /* 622 */, U64_C(0x7a5be3e6b65f069d) /* 623 */,
+ U64_C(0xf96330ed78be6f10) /* 624 */, U64_C(0xeee60de77a076a15) /* 625 */,
+ U64_C(0x2b4bee4aa08b9bd0) /* 626 */, U64_C(0x6a56a63ec7b8894e) /* 627 */,
+ U64_C(0x02121359ba34fef4) /* 628 */, U64_C(0x4cbf99f8283703fc) /* 629 */,
+ U64_C(0x398071350caf30c8) /* 630 */, U64_C(0xd0a77a89f017687a) /* 631 */,
+ U64_C(0xf1c1a9eb9e423569) /* 632 */, U64_C(0x8c7976282dee8199) /* 633 */,
+ U64_C(0x5d1737a5dd1f7abd) /* 634 */, U64_C(0x4f53433c09a9fa80) /* 635 */,
+ U64_C(0xfa8b0c53df7ca1d9) /* 636 */, U64_C(0x3fd9dcbc886ccb77) /* 637 */,
+ U64_C(0xc040917ca91b4720) /* 638 */, U64_C(0x7dd00142f9d1dcdf) /* 639 */,
+ U64_C(0x8476fc1d4f387b58) /* 640 */, U64_C(0x23f8e7c5f3316503) /* 641 */,
+ U64_C(0x032a2244e7e37339) /* 642 */, U64_C(0x5c87a5d750f5a74b) /* 643 */,
+ U64_C(0x082b4cc43698992e) /* 644 */, U64_C(0xdf917becb858f63c) /* 645 */,
+ U64_C(0x3270b8fc5bf86dda) /* 646 */, U64_C(0x10ae72bb29b5dd76) /* 647 */,
+ U64_C(0x576ac94e7700362b) /* 648 */, U64_C(0x1ad112dac61efb8f) /* 649 */,
+ U64_C(0x691bc30ec5faa427) /* 650 */, U64_C(0xff246311cc327143) /* 651 */,
+ U64_C(0x3142368e30e53206) /* 652 */, U64_C(0x71380e31e02ca396) /* 653 */,
+ U64_C(0x958d5c960aad76f1) /* 654 */, U64_C(0xf8d6f430c16da536) /* 655 */,
+ U64_C(0xc8ffd13f1be7e1d2) /* 656 */, U64_C(0x7578ae66004ddbe1) /* 657 */,
+ U64_C(0x05833f01067be646) /* 658 */, U64_C(0xbb34b5ad3bfe586d) /* 659 */,
+ U64_C(0x095f34c9a12b97f0) /* 660 */, U64_C(0x247ab64525d60ca8) /* 661 */,
+ U64_C(0xdcdbc6f3017477d1) /* 662 */, U64_C(0x4a2e14d4decad24d) /* 663 */,
+ U64_C(0xbdb5e6d9be0a1eeb) /* 664 */, U64_C(0x2a7e70f7794301ab) /* 665 */,
+ U64_C(0xdef42d8a270540fd) /* 666 */, U64_C(0x01078ec0a34c22c1) /* 667 */,
+ U64_C(0xe5de511af4c16387) /* 668 */, U64_C(0x7ebb3a52bd9a330a) /* 669 */,
+ U64_C(0x77697857aa7d6435) /* 670 */, U64_C(0x004e831603ae4c32) /* 671 */,
+ U64_C(0xe7a21020ad78e312) /* 672 */, U64_C(0x9d41a70c6ab420f2) /* 673 */,
+ U64_C(0x28e06c18ea1141e6) /* 674 */, U64_C(0xd2b28cbd984f6b28) /* 675 */,
+ U64_C(0x26b75f6c446e9d83) /* 676 */, U64_C(0xba47568c4d418d7f) /* 677 */,
+ U64_C(0xd80badbfe6183d8e) /* 678 */, U64_C(0x0e206d7f5f166044) /* 679 */,
+ U64_C(0xe258a43911cbca3e) /* 680 */, U64_C(0x723a1746b21dc0bc) /* 681 */,
+ U64_C(0xc7caa854f5d7cdd3) /* 682 */, U64_C(0x7cac32883d261d9c) /* 683 */,
+ U64_C(0x7690c26423ba942c) /* 684 */, U64_C(0x17e55524478042b8) /* 685 */,
+ U64_C(0xe0be477656a2389f) /* 686 */, U64_C(0x4d289b5e67ab2da0) /* 687 */,
+ U64_C(0x44862b9c8fbbfd31) /* 688 */, U64_C(0xb47cc8049d141365) /* 689 */,
+ U64_C(0x822c1b362b91c793) /* 690 */, U64_C(0x4eb14655fb13dfd8) /* 691 */,
+ U64_C(0x1ecbba0714e2a97b) /* 692 */, U64_C(0x6143459d5cde5f14) /* 693 */,
+ U64_C(0x53a8fbf1d5f0ac89) /* 694 */, U64_C(0x97ea04d81c5e5b00) /* 695 */,
+ U64_C(0x622181a8d4fdb3f3) /* 696 */, U64_C(0xe9bcd341572a1208) /* 697 */,
+ U64_C(0x1411258643cce58a) /* 698 */, U64_C(0x9144c5fea4c6e0a4) /* 699 */,
+ U64_C(0x0d33d06565cf620f) /* 700 */, U64_C(0x54a48d489f219ca1) /* 701 */,
+ U64_C(0xc43e5eac6d63c821) /* 702 */, U64_C(0xa9728b3a72770daf) /* 703 */,
+ U64_C(0xd7934e7b20df87ef) /* 704 */, U64_C(0xe35503b61a3e86e5) /* 705 */,
+ U64_C(0xcae321fbc819d504) /* 706 */, U64_C(0x129a50b3ac60bfa6) /* 707 */,
+ U64_C(0xcd5e68ea7e9fb6c3) /* 708 */, U64_C(0xb01c90199483b1c7) /* 709 */,
+ U64_C(0x3de93cd5c295376c) /* 710 */, U64_C(0xaed52edf2ab9ad13) /* 711 */,
+ U64_C(0x2e60f512c0a07884) /* 712 */, U64_C(0xbc3d86a3e36210c9) /* 713 */,
+ U64_C(0x35269d9b163951ce) /* 714 */, U64_C(0x0c7d6e2ad0cdb5fa) /* 715 */,
+ U64_C(0x59e86297d87f5733) /* 716 */, U64_C(0x298ef221898db0e7) /* 717 */,
+ U64_C(0x55000029d1a5aa7e) /* 718 */, U64_C(0x8bc08ae1b5061b45) /* 719 */,
+ U64_C(0xc2c31c2b6c92703a) /* 720 */, U64_C(0x94cc596baf25ef42) /* 721 */,
+ U64_C(0x0a1d73db22540456) /* 722 */, U64_C(0x04b6a0f9d9c4179a) /* 723 */,
+ U64_C(0xeffdafa2ae3d3c60) /* 724 */, U64_C(0xf7c8075bb49496c4) /* 725 */,
+ U64_C(0x9cc5c7141d1cd4e3) /* 726 */, U64_C(0x78bd1638218e5534) /* 727 */,
+ U64_C(0xb2f11568f850246a) /* 728 */, U64_C(0xedfabcfa9502bc29) /* 729 */,
+ U64_C(0x796ce5f2da23051b) /* 730 */, U64_C(0xaae128b0dc93537c) /* 731 */,
+ U64_C(0x3a493da0ee4b29ae) /* 732 */, U64_C(0xb5df6b2c416895d7) /* 733 */,
+ U64_C(0xfcabbd25122d7f37) /* 734 */, U64_C(0x70810b58105dc4b1) /* 735 */,
+ U64_C(0xe10fdd37f7882a90) /* 736 */, U64_C(0x524dcab5518a3f5c) /* 737 */,
+ U64_C(0x3c9e85878451255b) /* 738 */, U64_C(0x4029828119bd34e2) /* 739 */,
+ U64_C(0x74a05b6f5d3ceccb) /* 740 */, U64_C(0xb610021542e13eca) /* 741 */,
+ U64_C(0x0ff979d12f59e2ac) /* 742 */, U64_C(0x6037da27e4f9cc50) /* 743 */,
+ U64_C(0x5e92975a0df1847d) /* 744 */, U64_C(0xd66de190d3e623fe) /* 745 */,
+ U64_C(0x5032d6b87b568048) /* 746 */, U64_C(0x9a36b7ce8235216e) /* 747 */,
+ U64_C(0x80272a7a24f64b4a) /* 748 */, U64_C(0x93efed8b8c6916f7) /* 749 */,
+ U64_C(0x37ddbff44cce1555) /* 750 */, U64_C(0x4b95db5d4b99bd25) /* 751 */,
+ U64_C(0x92d3fda169812fc0) /* 752 */, U64_C(0xfb1a4a9a90660bb6) /* 753 */,
+ U64_C(0x730c196946a4b9b2) /* 754 */, U64_C(0x81e289aa7f49da68) /* 755 */,
+ U64_C(0x64669a0f83b1a05f) /* 756 */, U64_C(0x27b3ff7d9644f48b) /* 757 */,
+ U64_C(0xcc6b615c8db675b3) /* 758 */, U64_C(0x674f20b9bcebbe95) /* 759 */,
+ U64_C(0x6f31238275655982) /* 760 */, U64_C(0x5ae488713e45cf05) /* 761 */,
+ U64_C(0xbf619f9954c21157) /* 762 */, U64_C(0xeabac46040a8eae9) /* 763 */,
+ U64_C(0x454c6fe9f2c0c1cd) /* 764 */, U64_C(0x419cf6496412691c) /* 765 */,
+ U64_C(0xd3dc3bef265b0f70) /* 766 */, U64_C(0x6d0e60f5c3578a9e) /* 767 */
+};
+static u64 sbox4[256] = {
+ U64_C(0x5b0e608526323c55) /* 768 */, U64_C(0x1a46c1a9fa1b59f5) /* 769 */,
+ U64_C(0xa9e245a17c4c8ffa) /* 770 */, U64_C(0x65ca5159db2955d7) /* 771 */,
+ U64_C(0x05db0a76ce35afc2) /* 772 */, U64_C(0x81eac77ea9113d45) /* 773 */,
+ U64_C(0x528ef88ab6ac0a0d) /* 774 */, U64_C(0xa09ea253597be3ff) /* 775 */,
+ U64_C(0x430ddfb3ac48cd56) /* 776 */, U64_C(0xc4b3a67af45ce46f) /* 777 */,
+ U64_C(0x4ececfd8fbe2d05e) /* 778 */, U64_C(0x3ef56f10b39935f0) /* 779 */,
+ U64_C(0x0b22d6829cd619c6) /* 780 */, U64_C(0x17fd460a74df2069) /* 781 */,
+ U64_C(0x6cf8cc8e8510ed40) /* 782 */, U64_C(0xd6c824bf3a6ecaa7) /* 783 */,
+ U64_C(0x61243d581a817049) /* 784 */, U64_C(0x048bacb6bbc163a2) /* 785 */,
+ U64_C(0xd9a38ac27d44cc32) /* 786 */, U64_C(0x7fddff5baaf410ab) /* 787 */,
+ U64_C(0xad6d495aa804824b) /* 788 */, U64_C(0xe1a6a74f2d8c9f94) /* 789 */,
+ U64_C(0xd4f7851235dee8e3) /* 790 */, U64_C(0xfd4b7f886540d893) /* 791 */,
+ U64_C(0x247c20042aa4bfda) /* 792 */, U64_C(0x096ea1c517d1327c) /* 793 */,
+ U64_C(0xd56966b4361a6685) /* 794 */, U64_C(0x277da5c31221057d) /* 795 */,
+ U64_C(0x94d59893a43acff7) /* 796 */, U64_C(0x64f0c51ccdc02281) /* 797 */,
+ U64_C(0x3d33bcc4ff6189db) /* 798 */, U64_C(0xe005cb184ce66af1) /* 799 */,
+ U64_C(0xff5ccd1d1db99bea) /* 800 */, U64_C(0xb0b854a7fe42980f) /* 801 */,
+ U64_C(0x7bd46a6a718d4b9f) /* 802 */, U64_C(0xd10fa8cc22a5fd8c) /* 803 */,
+ U64_C(0xd31484952be4bd31) /* 804 */, U64_C(0xc7fa975fcb243847) /* 805 */,
+ U64_C(0x4886ed1e5846c407) /* 806 */, U64_C(0x28cddb791eb70b04) /* 807 */,
+ U64_C(0xc2b00be2f573417f) /* 808 */, U64_C(0x5c9590452180f877) /* 809 */,
+ U64_C(0x7a6bddfff370eb00) /* 810 */, U64_C(0xce509e38d6d9d6a4) /* 811 */,
+ U64_C(0xebeb0f00647fa702) /* 812 */, U64_C(0x1dcc06cf76606f06) /* 813 */,
+ U64_C(0xe4d9f28ba286ff0a) /* 814 */, U64_C(0xd85a305dc918c262) /* 815 */,
+ U64_C(0x475b1d8732225f54) /* 816 */, U64_C(0x2d4fb51668ccb5fe) /* 817 */,
+ U64_C(0xa679b9d9d72bba20) /* 818 */, U64_C(0x53841c0d912d43a5) /* 819 */,
+ U64_C(0x3b7eaa48bf12a4e8) /* 820 */, U64_C(0x781e0e47f22f1ddf) /* 821 */,
+ U64_C(0xeff20ce60ab50973) /* 822 */, U64_C(0x20d261d19dffb742) /* 823 */,
+ U64_C(0x16a12b03062a2e39) /* 824 */, U64_C(0x1960eb2239650495) /* 825 */,
+ U64_C(0x251c16fed50eb8b8) /* 826 */, U64_C(0x9ac0c330f826016e) /* 827 */,
+ U64_C(0xed152665953e7671) /* 828 */, U64_C(0x02d63194a6369570) /* 829 */,
+ U64_C(0x5074f08394b1c987) /* 830 */, U64_C(0x70ba598c90b25ce1) /* 831 */,
+ U64_C(0x794a15810b9742f6) /* 832 */, U64_C(0x0d5925e9fcaf8c6c) /* 833 */,
+ U64_C(0x3067716cd868744e) /* 834 */, U64_C(0x910ab077e8d7731b) /* 835 */,
+ U64_C(0x6a61bbdb5ac42f61) /* 836 */, U64_C(0x93513efbf0851567) /* 837 */,
+ U64_C(0xf494724b9e83e9d5) /* 838 */, U64_C(0xe887e1985c09648d) /* 839 */,
+ U64_C(0x34b1d3c675370cfd) /* 840 */, U64_C(0xdc35e433bc0d255d) /* 841 */,
+ U64_C(0xd0aab84234131be0) /* 842 */, U64_C(0x08042a50b48b7eaf) /* 843 */,
+ U64_C(0x9997c4ee44a3ab35) /* 844 */, U64_C(0x829a7b49201799d0) /* 845 */,
+ U64_C(0x263b8307b7c54441) /* 846 */, U64_C(0x752f95f4fd6a6ca6) /* 847 */,
+ U64_C(0x927217402c08c6e5) /* 848 */, U64_C(0x2a8ab754a795d9ee) /* 849 */,
+ U64_C(0xa442f7552f72943d) /* 850 */, U64_C(0x2c31334e19781208) /* 851 */,
+ U64_C(0x4fa98d7ceaee6291) /* 852 */, U64_C(0x55c3862f665db309) /* 853 */,
+ U64_C(0xbd0610175d53b1f3) /* 854 */, U64_C(0x46fe6cb840413f27) /* 855 */,
+ U64_C(0x3fe03792df0cfa59) /* 856 */, U64_C(0xcfe700372eb85e8f) /* 857 */,
+ U64_C(0xa7be29e7adbce118) /* 858 */, U64_C(0xe544ee5cde8431dd) /* 859 */,
+ U64_C(0x8a781b1b41f1873e) /* 860 */, U64_C(0xa5c94c78a0d2f0e7) /* 861 */,
+ U64_C(0x39412e2877b60728) /* 862 */, U64_C(0xa1265ef3afc9a62c) /* 863 */,
+ U64_C(0xbcc2770c6a2506c5) /* 864 */, U64_C(0x3ab66dd5dce1ce12) /* 865 */,
+ U64_C(0xe65499d04a675b37) /* 866 */, U64_C(0x7d8f523481bfd216) /* 867 */,
+ U64_C(0x0f6f64fcec15f389) /* 868 */, U64_C(0x74efbe618b5b13c8) /* 869 */,
+ U64_C(0xacdc82b714273e1d) /* 870 */, U64_C(0xdd40bfe003199d17) /* 871 */,
+ U64_C(0x37e99257e7e061f8) /* 872 */, U64_C(0xfa52626904775aaa) /* 873 */,
+ U64_C(0x8bbbf63a463d56f9) /* 874 */, U64_C(0xf0013f1543a26e64) /* 875 */,
+ U64_C(0xa8307e9f879ec898) /* 876 */, U64_C(0xcc4c27a4150177cc) /* 877 */,
+ U64_C(0x1b432f2cca1d3348) /* 878 */, U64_C(0xde1d1f8f9f6fa013) /* 879 */,
+ U64_C(0x606602a047a7ddd6) /* 880 */, U64_C(0xd237ab64cc1cb2c7) /* 881 */,
+ U64_C(0x9b938e7225fcd1d3) /* 882 */, U64_C(0xec4e03708e0ff476) /* 883 */,
+ U64_C(0xfeb2fbda3d03c12d) /* 884 */, U64_C(0xae0bced2ee43889a) /* 885 */,
+ U64_C(0x22cb8923ebfb4f43) /* 886 */, U64_C(0x69360d013cf7396d) /* 887 */,
+ U64_C(0x855e3602d2d4e022) /* 888 */, U64_C(0x073805bad01f784c) /* 889 */,
+ U64_C(0x33e17a133852f546) /* 890 */, U64_C(0xdf4874058ac7b638) /* 891 */,
+ U64_C(0xba92b29c678aa14a) /* 892 */, U64_C(0x0ce89fc76cfaadcd) /* 893 */,
+ U64_C(0x5f9d4e0908339e34) /* 894 */, U64_C(0xf1afe9291f5923b9) /* 895 */,
+ U64_C(0x6e3480f60f4a265f) /* 896 */, U64_C(0xeebf3a2ab29b841c) /* 897 */,
+ U64_C(0xe21938a88f91b4ad) /* 898 */, U64_C(0x57dfeff845c6d3c3) /* 899 */,
+ U64_C(0x2f006b0bf62caaf2) /* 900 */, U64_C(0x62f479ef6f75ee78) /* 901 */,
+ U64_C(0x11a55ad41c8916a9) /* 902 */, U64_C(0xf229d29084fed453) /* 903 */,
+ U64_C(0x42f1c27b16b000e6) /* 904 */, U64_C(0x2b1f76749823c074) /* 905 */,
+ U64_C(0x4b76eca3c2745360) /* 906 */, U64_C(0x8c98f463b91691bd) /* 907 */,
+ U64_C(0x14bcc93cf1ade66a) /* 908 */, U64_C(0x8885213e6d458397) /* 909 */,
+ U64_C(0x8e177df0274d4711) /* 910 */, U64_C(0xb49b73b5503f2951) /* 911 */,
+ U64_C(0x10168168c3f96b6b) /* 912 */, U64_C(0x0e3d963b63cab0ae) /* 913 */,
+ U64_C(0x8dfc4b5655a1db14) /* 914 */, U64_C(0xf789f1356e14de5c) /* 915 */,
+ U64_C(0x683e68af4e51dac1) /* 916 */, U64_C(0xc9a84f9d8d4b0fd9) /* 917 */,
+ U64_C(0x3691e03f52a0f9d1) /* 918 */, U64_C(0x5ed86e46e1878e80) /* 919 */,
+ U64_C(0x3c711a0e99d07150) /* 920 */, U64_C(0x5a0865b20c4e9310) /* 921 */,
+ U64_C(0x56fbfc1fe4f0682e) /* 922 */, U64_C(0xea8d5de3105edf9b) /* 923 */,
+ U64_C(0x71abfdb12379187a) /* 924 */, U64_C(0x2eb99de1bee77b9c) /* 925 */,
+ U64_C(0x21ecc0ea33cf4523) /* 926 */, U64_C(0x59a4d7521805c7a1) /* 927 */,
+ U64_C(0x3896f5eb56ae7c72) /* 928 */, U64_C(0xaa638f3db18f75dc) /* 929 */,
+ U64_C(0x9f39358dabe9808e) /* 930 */, U64_C(0xb7defa91c00b72ac) /* 931 */,
+ U64_C(0x6b5541fd62492d92) /* 932 */, U64_C(0x6dc6dee8f92e4d5b) /* 933 */,
+ U64_C(0x353f57abc4beea7e) /* 934 */, U64_C(0x735769d6da5690ce) /* 935 */,
+ U64_C(0x0a234aa642391484) /* 936 */, U64_C(0xf6f9508028f80d9d) /* 937 */,
+ U64_C(0xb8e319a27ab3f215) /* 938 */, U64_C(0x31ad9c1151341a4d) /* 939 */,
+ U64_C(0x773c22a57bef5805) /* 940 */, U64_C(0x45c7561a07968633) /* 941 */,
+ U64_C(0xf913da9e249dbe36) /* 942 */, U64_C(0xda652d9b78a64c68) /* 943 */,
+ U64_C(0x4c27a97f3bc334ef) /* 944 */, U64_C(0x76621220e66b17f4) /* 945 */,
+ U64_C(0x967743899acd7d0b) /* 946 */, U64_C(0xf3ee5bcae0ed6782) /* 947 */,
+ U64_C(0x409f753600c879fc) /* 948 */, U64_C(0x06d09a39b5926db6) /* 949 */,
+ U64_C(0x6f83aeb0317ac588) /* 950 */, U64_C(0x01e6ca4a86381f21) /* 951 */,
+ U64_C(0x66ff3462d19f3025) /* 952 */, U64_C(0x72207c24ddfd3bfb) /* 953 */,
+ U64_C(0x4af6b6d3e2ece2eb) /* 954 */, U64_C(0x9c994dbec7ea08de) /* 955 */,
+ U64_C(0x49ace597b09a8bc4) /* 956 */, U64_C(0xb38c4766cf0797ba) /* 957 */,
+ U64_C(0x131b9373c57c2a75) /* 958 */, U64_C(0xb1822cce61931e58) /* 959 */,
+ U64_C(0x9d7555b909ba1c0c) /* 960 */, U64_C(0x127fafdd937d11d2) /* 961 */,
+ U64_C(0x29da3badc66d92e4) /* 962 */, U64_C(0xa2c1d57154c2ecbc) /* 963 */,
+ U64_C(0x58c5134d82f6fe24) /* 964 */, U64_C(0x1c3ae3515b62274f) /* 965 */,
+ U64_C(0xe907c82e01cb8126) /* 966 */, U64_C(0xf8ed091913e37fcb) /* 967 */,
+ U64_C(0x3249d8f9c80046c9) /* 968 */, U64_C(0x80cf9bede388fb63) /* 969 */,
+ U64_C(0x1881539a116cf19e) /* 970 */, U64_C(0x5103f3f76bd52457) /* 971 */,
+ U64_C(0x15b7e6f5ae47f7a8) /* 972 */, U64_C(0xdbd7c6ded47e9ccf) /* 973 */,
+ U64_C(0x44e55c410228bb1a) /* 974 */, U64_C(0xb647d4255edb4e99) /* 975 */,
+ U64_C(0x5d11882bb8aafc30) /* 976 */, U64_C(0xf5098bbb29d3212a) /* 977 */,
+ U64_C(0x8fb5ea14e90296b3) /* 978 */, U64_C(0x677b942157dd025a) /* 979 */,
+ U64_C(0xfb58e7c0a390acb5) /* 980 */, U64_C(0x89d3674c83bd4a01) /* 981 */,
+ U64_C(0x9e2da4df4bf3b93b) /* 982 */, U64_C(0xfcc41e328cab4829) /* 983 */,
+ U64_C(0x03f38c96ba582c52) /* 984 */, U64_C(0xcad1bdbd7fd85db2) /* 985 */,
+ U64_C(0xbbb442c16082ae83) /* 986 */, U64_C(0xb95fe86ba5da9ab0) /* 987 */,
+ U64_C(0xb22e04673771a93f) /* 988 */, U64_C(0x845358c9493152d8) /* 989 */,
+ U64_C(0xbe2a488697b4541e) /* 990 */, U64_C(0x95a2dc2dd38e6966) /* 991 */,
+ U64_C(0xc02c11ac923c852b) /* 992 */, U64_C(0x2388b1990df2a87b) /* 993 */,
+ U64_C(0x7c8008fa1b4f37be) /* 994 */, U64_C(0x1f70d0c84d54e503) /* 995 */,
+ U64_C(0x5490adec7ece57d4) /* 996 */, U64_C(0x002b3c27d9063a3a) /* 997 */,
+ U64_C(0x7eaea3848030a2bf) /* 998 */, U64_C(0xc602326ded2003c0) /* 999 */,
+ U64_C(0x83a7287d69a94086) /* 1000 */, U64_C(0xc57a5fcb30f57a8a) /* 1001 */,
+ U64_C(0xb56844e479ebe779) /* 1002 */, U64_C(0xa373b40f05dcbce9) /* 1003 */,
+ U64_C(0xd71a786e88570ee2) /* 1004 */, U64_C(0x879cbacdbde8f6a0) /* 1005 */,
+ U64_C(0x976ad1bcc164a32f) /* 1006 */, U64_C(0xab21e25e9666d78b) /* 1007 */,
+ U64_C(0x901063aae5e5c33c) /* 1008 */, U64_C(0x9818b34448698d90) /* 1009 */,
+ U64_C(0xe36487ae3e1e8abb) /* 1010 */, U64_C(0xafbdf931893bdcb4) /* 1011 */,
+ U64_C(0x6345a0dc5fbbd519) /* 1012 */, U64_C(0x8628fe269b9465ca) /* 1013 */,
+ U64_C(0x1e5d01603f9c51ec) /* 1014 */, U64_C(0x4de44006a15049b7) /* 1015 */,
+ U64_C(0xbf6c70e5f776cbb1) /* 1016 */, U64_C(0x411218f2ef552bed) /* 1017 */,
+ U64_C(0xcb0c0708705a36a3) /* 1018 */, U64_C(0xe74d14754f986044) /* 1019 */,
+ U64_C(0xcd56d9430ea8280e) /* 1020 */, U64_C(0xc12591d7535f5065) /* 1021 */,
+ U64_C(0xc83223f1720aef96) /* 1022 */, U64_C(0xc3a0396f7363a51f) /* 1023 */
+};
+
+static void
+tiger_init( void *context )
+{
+ TIGER_CONTEXT *hd = context;
+
+ hd->a = 0x0123456789abcdefLL;
+ hd->b = 0xfedcba9876543210LL;
+ hd->c = 0xf096a5b4c3b2e187LL;
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+static void
+tiger_round( u64 *ra, u64 *rb, u64 *rc, u64 x, int mul )
+{
+ u64 a = *ra;
+ u64 b = *rb;
+ u64 c = *rc;
+
+ c ^= x;
+ a -= ( sbox1[ c & 0xff ] ^ sbox2[ (c >> 16) & 0xff ]
+ ^ sbox3[ (c >> 32) & 0xff ] ^ sbox4[ (c >> 48) & 0xff ]);
+ b += ( sbox4[ (c >> 8) & 0xff ] ^ sbox3[ (c >> 24) & 0xff ]
+ ^ sbox2[ (c >> 40) & 0xff ] ^ sbox1[ (c >> 56) & 0xff ]);
+ b *= mul;
+
+ *ra = a;
+ *rb = b;
+ *rc = c;
+}
+
+
+static void
+pass( u64 *ra, u64 *rb, u64 *rc, u64 *x, int mul )
+{
+ u64 a = *ra;
+ u64 b = *rb;
+ u64 c = *rc;
+
+ tiger_round( &a, &b, &c, x[0], mul );
+ tiger_round( &b, &c, &a, x[1], mul );
+ tiger_round( &c, &a, &b, x[2], mul );
+ tiger_round( &a, &b, &c, x[3], mul );
+ tiger_round( &b, &c, &a, x[4], mul );
+ tiger_round( &c, &a, &b, x[5], mul );
+ tiger_round( &a, &b, &c, x[6], mul );
+ tiger_round( &b, &c, &a, x[7], mul );
+
+ *ra = a;
+ *rb = b;
+ *rc = c;
+}
+
+
+static void
+key_schedule( u64 *x )
+{
+ x[0] -= x[7] ^ 0xa5a5a5a5a5a5a5a5LL;
+ x[1] ^= x[0];
+ x[2] += x[1];
+ x[3] -= x[2] ^ ((~x[1]) << 19 );
+ x[4] ^= x[3];
+ x[5] += x[4];
+ x[6] -= x[5] ^ ((~x[4]) >> 23 );
+ x[7] ^= x[6];
+ x[0] += x[7];
+ x[1] -= x[0] ^ ((~x[7]) << 19 );
+ x[2] ^= x[1];
+ x[3] += x[2];
+ x[4] -= x[3] ^ ((~x[2]) >> 23 );
+ x[5] ^= x[4];
+ x[6] += x[5];
+ x[7] -= x[6] ^ 0x0123456789abcdefLL;
+}
+
+
+/****************
+ * Transform the message DATA which consists of 512 bytes (8 words)
+ */
+static void
+transform ( TIGER_CONTEXT *hd, const unsigned char *data )
+{
+ u64 a,b,c,aa,bb,cc;
+ u64 x[8];
+#ifdef WORDS_BIGENDIAN
+#define MKWORD(d,n) \
+ ( ((u64)(d)[8*(n)+7]) << 56 | ((u64)(d)[8*(n)+6]) << 48 \
+ | ((u64)(d)[8*(n)+5]) << 40 | ((u64)(d)[8*(n)+4]) << 32 \
+ | ((u64)(d)[8*(n)+3]) << 24 | ((u64)(d)[8*(n)+2]) << 16 \
+ | ((u64)(d)[8*(n)+1]) << 8 | ((u64)(d)[8*(n) ]) )
+ x[0] = MKWORD(data, 0);
+ x[1] = MKWORD(data, 1);
+ x[2] = MKWORD(data, 2);
+ x[3] = MKWORD(data, 3);
+ x[4] = MKWORD(data, 4);
+ x[5] = MKWORD(data, 5);
+ x[6] = MKWORD(data, 6);
+ x[7] = MKWORD(data, 7);
+#undef MKWORD
+#else
+ memcpy( &x[0], data, 64 );
+#endif
+
+ /* save */
+ a = aa = hd->a;
+ b = bb = hd->b;
+ c = cc = hd->c;
+
+ pass( &a, &b, &c, x, 5);
+ key_schedule( x );
+ pass( &c, &a, &b, x, 7);
+ key_schedule( x );
+ pass( &b, &c, &a, x, 9);
+
+ /* feedforward */
+ a ^= aa;
+ b -= bb;
+ c += cc;
+ /* store */
+ hd->a = a;
+ hd->b = b;
+ hd->c = c;
+}
+
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+tiger_write ( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ TIGER_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (21*8+11*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ tiger_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ _gcry_burn_stack (21*8+11*sizeof(void*));
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+
+/* The routine terminates the computation
+ */
+static void
+tiger_final( void *context )
+{
+ TIGER_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ tiger_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x01; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x01; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ tiger_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (21*8+11*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u64*)p = hd->a ; p += 8; } while(0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->a >> 56; *p++ = hd->a >> 48; \
+ *p++ = hd->a >> 40; *p++ = hd->a >> 32; \
+ *p++ = hd->a >> 24; *p++ = hd->a >> 16; \
+ *p++ = hd->a >> 8; *p++ = hd->a; } while(0)
+#endif
+ X(a);
+ X(b);
+ X(c);
+#undef X
+}
+
+static byte *
+tiger_read( void *context )
+{
+ TIGER_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+static byte asn[19] = /* Object ID is 1.3.6.1.4.1.11591.12.2 */
+ { 0x30, 0x29, 0x30, 0x0d, 0x06, 0x09, 0x2b, 0x06,
+ 0x01, 0x04, 0x01, 0xda, 0x47, 0x0c, 0x02,
+ 0x05, 0x00, 0x04, 0x18 };
+
+static gcry_md_oid_spec_t oid_spec_tiger[] =
+ {
+ /* GNU.digestAlgorithm TIGER */
+ { "1.3.6.1.4.1.11591.12.2" },
+ { NULL }
+ };
+
+gcry_md_spec_t _gcry_digest_spec_tiger =
+ {
+ "TIGER192", asn, DIM (asn), oid_spec_tiger, 24,
+ tiger_init, tiger_write, tiger_final, tiger_read,
+ sizeof (TIGER_CONTEXT)
+ ,
+ .blocksize = 64
+ };
+
+#endif /* HAVE_U64_TYPEDEF */
+
+
+GRUB_MOD_INIT(gcry_tiger)
+{
+ grub_md_register (&_gcry_digest_spec_tiger);
+}
+
+GRUB_MOD_FINI(gcry_tiger)
+{
+ grub_md_unregister (&_gcry_digest_spec_tiger);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/twofish.c b/grub-core/lib/libgcrypt-grub/cipher/twofish.c
new file mode 100644
index 0000000..8065623
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/twofish.c
@@ -0,0 +1,993 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* Twofish for GPG
+ * Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
+ * Written by Matthew Skala <mskala@ansuz.sooke.bc.ca>, July 26, 1998
+ * 256-bit key length added March 20, 1999
+ * Some modifications to reduce the text size by Werner Koch, April, 1998
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ ********************************************************************
+ *
+ * This code is a "clean room" implementation, written from the paper
+ * _Twofish: A 128-Bit Block Cipher_ by Bruce Schneier, John Kelsey,
+ * Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson, available
+ * through http://www.counterpane.com/twofish.html
+ *
+ * For background information on multiplication in finite fields, used for
+ * the matrix operations in the key schedule, see the book _Contemporary
+ * Abstract Algebra_ by Joseph A. Gallian, especially chapter 22 in the
+ * Third Edition.
+ *
+ * Only the 128- and 256-bit key sizes are supported. This code is intended
+ * for GNU C on a 32-bit system, but it should work almost anywhere. Loops
+ * are unrolled, precomputation tables are used, etc., for maximum speed at
+ * some cost in memory consumption. */
+
+
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+/* Prototype for the self-test function. */
+
+/* Structure for an expanded Twofish key. s contains the key-dependent
+ * S-boxes composed with the MDS matrix; w contains the eight "whitening"
+ * subkeys, K[0] through K[7]. k holds the remaining, "round" subkeys. Note
+ * that k[i] corresponds to what the Twofish paper calls K[i+8]. */
+typedef struct {
+ u32 s[4][256], w[8], k[32];
+} TWOFISH_context;
+
+/* These two tables are the q0 and q1 permutations, exactly as described in
+ * the Twofish paper. */
+
+static const byte q0[256] = {
+ 0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78,
+ 0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C,
+ 0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30,
+ 0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82,
+ 0x63, 0x01, 0x83, 0x2E, 0xD9, 0x51, 0x9B, 0x7C, 0xA6, 0xEB, 0xA5, 0xBE,
+ 0x16, 0x0C, 0xE3, 0x61, 0xC0, 0x8C, 0x3A, 0xF5, 0x73, 0x2C, 0x25, 0x0B,
+ 0xBB, 0x4E, 0x89, 0x6B, 0x53, 0x6A, 0xB4, 0xF1, 0xE1, 0xE6, 0xBD, 0x45,
+ 0xE2, 0xF4, 0xB6, 0x66, 0xCC, 0x95, 0x03, 0x56, 0xD4, 0x1C, 0x1E, 0xD7,
+ 0xFB, 0xC3, 0x8E, 0xB5, 0xE9, 0xCF, 0xBF, 0xBA, 0xEA, 0x77, 0x39, 0xAF,
+ 0x33, 0xC9, 0x62, 0x71, 0x81, 0x79, 0x09, 0xAD, 0x24, 0xCD, 0xF9, 0xD8,
+ 0xE5, 0xC5, 0xB9, 0x4D, 0x44, 0x08, 0x86, 0xE7, 0xA1, 0x1D, 0xAA, 0xED,
+ 0x06, 0x70, 0xB2, 0xD2, 0x41, 0x7B, 0xA0, 0x11, 0x31, 0xC2, 0x27, 0x90,
+ 0x20, 0xF6, 0x60, 0xFF, 0x96, 0x5C, 0xB1, 0xAB, 0x9E, 0x9C, 0x52, 0x1B,
+ 0x5F, 0x93, 0x0A, 0xEF, 0x91, 0x85, 0x49, 0xEE, 0x2D, 0x4F, 0x8F, 0x3B,
+ 0x47, 0x87, 0x6D, 0x46, 0xD6, 0x3E, 0x69, 0x64, 0x2A, 0xCE, 0xCB, 0x2F,
+ 0xFC, 0x97, 0x05, 0x7A, 0xAC, 0x7F, 0xD5, 0x1A, 0x4B, 0x0E, 0xA7, 0x5A,
+ 0x28, 0x14, 0x3F, 0x29, 0x88, 0x3C, 0x4C, 0x02, 0xB8, 0xDA, 0xB0, 0x17,
+ 0x55, 0x1F, 0x8A, 0x7D, 0x57, 0xC7, 0x8D, 0x74, 0xB7, 0xC4, 0x9F, 0x72,
+ 0x7E, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, 0x6E, 0x50, 0xDE, 0x68,
+ 0x65, 0xBC, 0xDB, 0xF8, 0xC8, 0xA8, 0x2B, 0x40, 0xDC, 0xFE, 0x32, 0xA4,
+ 0xCA, 0x10, 0x21, 0xF0, 0xD3, 0x5D, 0x0F, 0x00, 0x6F, 0x9D, 0x36, 0x42,
+ 0x4A, 0x5E, 0xC1, 0xE0
+};
+
+static const byte q1[256] = {
+ 0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B,
+ 0x45, 0x7D, 0xE8, 0x4B, 0xD6, 0x32, 0xD8, 0xFD, 0x37, 0x71, 0xF1, 0xE1,
+ 0x30, 0x0F, 0xF8, 0x1B, 0x87, 0xFA, 0x06, 0x3F, 0x5E, 0xBA, 0xAE, 0x5B,
+ 0x8A, 0x00, 0xBC, 0x9D, 0x6D, 0xC1, 0xB1, 0x0E, 0x80, 0x5D, 0xD2, 0xD5,
+ 0xA0, 0x84, 0x07, 0x14, 0xB5, 0x90, 0x2C, 0xA3, 0xB2, 0x73, 0x4C, 0x54,
+ 0x92, 0x74, 0x36, 0x51, 0x38, 0xB0, 0xBD, 0x5A, 0xFC, 0x60, 0x62, 0x96,
+ 0x6C, 0x42, 0xF7, 0x10, 0x7C, 0x28, 0x27, 0x8C, 0x13, 0x95, 0x9C, 0xC7,
+ 0x24, 0x46, 0x3B, 0x70, 0xCA, 0xE3, 0x85, 0xCB, 0x11, 0xD0, 0x93, 0xB8,
+ 0xA6, 0x83, 0x20, 0xFF, 0x9F, 0x77, 0xC3, 0xCC, 0x03, 0x6F, 0x08, 0xBF,
+ 0x40, 0xE7, 0x2B, 0xE2, 0x79, 0x0C, 0xAA, 0x82, 0x41, 0x3A, 0xEA, 0xB9,
+ 0xE4, 0x9A, 0xA4, 0x97, 0x7E, 0xDA, 0x7A, 0x17, 0x66, 0x94, 0xA1, 0x1D,
+ 0x3D, 0xF0, 0xDE, 0xB3, 0x0B, 0x72, 0xA7, 0x1C, 0xEF, 0xD1, 0x53, 0x3E,
+ 0x8F, 0x33, 0x26, 0x5F, 0xEC, 0x76, 0x2A, 0x49, 0x81, 0x88, 0xEE, 0x21,
+ 0xC4, 0x1A, 0xEB, 0xD9, 0xC5, 0x39, 0x99, 0xCD, 0xAD, 0x31, 0x8B, 0x01,
+ 0x18, 0x23, 0xDD, 0x1F, 0x4E, 0x2D, 0xF9, 0x48, 0x4F, 0xF2, 0x65, 0x8E,
+ 0x78, 0x5C, 0x58, 0x19, 0x8D, 0xE5, 0x98, 0x57, 0x67, 0x7F, 0x05, 0x64,
+ 0xAF, 0x63, 0xB6, 0xFE, 0xF5, 0xB7, 0x3C, 0xA5, 0xCE, 0xE9, 0x68, 0x44,
+ 0xE0, 0x4D, 0x43, 0x69, 0x29, 0x2E, 0xAC, 0x15, 0x59, 0xA8, 0x0A, 0x9E,
+ 0x6E, 0x47, 0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B,
+ 0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9,
+ 0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56,
+ 0x55, 0x09, 0xBE, 0x91
+};
+
+/* These MDS tables are actually tables of MDS composed with q0 and q1,
+ * because it is only ever used that way and we can save some time by
+ * precomputing. Of course the main saving comes from precomputing the
+ * GF(2^8) multiplication involved in the MDS matrix multiply; by looking
+ * things up in these tables we reduce the matrix multiply to four lookups
+ * and three XORs. Semi-formally, the definition of these tables is:
+ * mds[0][i] = MDS (q1[i] 0 0 0)^T mds[1][i] = MDS (0 q0[i] 0 0)^T
+ * mds[2][i] = MDS (0 0 q1[i] 0)^T mds[3][i] = MDS (0 0 0 q0[i])^T
+ * where ^T means "transpose", the matrix multiply is performed in GF(2^8)
+ * represented as GF(2)[x]/v(x) where v(x)=x^8+x^6+x^5+x^3+1 as described
+ * by Schneier et al, and I'm casually glossing over the byte/word
+ * conversion issues. */
+
+static const u32 mds[4][256] = {
+ {0xBCBC3275, 0xECEC21F3, 0x202043C6, 0xB3B3C9F4, 0xDADA03DB, 0x02028B7B,
+ 0xE2E22BFB, 0x9E9EFAC8, 0xC9C9EC4A, 0xD4D409D3, 0x18186BE6, 0x1E1E9F6B,
+ 0x98980E45, 0xB2B2387D, 0xA6A6D2E8, 0x2626B74B, 0x3C3C57D6, 0x93938A32,
+ 0x8282EED8, 0x525298FD, 0x7B7BD437, 0xBBBB3771, 0x5B5B97F1, 0x474783E1,
+ 0x24243C30, 0x5151E20F, 0xBABAC6F8, 0x4A4AF31B, 0xBFBF4887, 0x0D0D70FA,
+ 0xB0B0B306, 0x7575DE3F, 0xD2D2FD5E, 0x7D7D20BA, 0x666631AE, 0x3A3AA35B,
+ 0x59591C8A, 0x00000000, 0xCDCD93BC, 0x1A1AE09D, 0xAEAE2C6D, 0x7F7FABC1,
+ 0x2B2BC7B1, 0xBEBEB90E, 0xE0E0A080, 0x8A8A105D, 0x3B3B52D2, 0x6464BAD5,
+ 0xD8D888A0, 0xE7E7A584, 0x5F5FE807, 0x1B1B1114, 0x2C2CC2B5, 0xFCFCB490,
+ 0x3131272C, 0x808065A3, 0x73732AB2, 0x0C0C8173, 0x79795F4C, 0x6B6B4154,
+ 0x4B4B0292, 0x53536974, 0x94948F36, 0x83831F51, 0x2A2A3638, 0xC4C49CB0,
+ 0x2222C8BD, 0xD5D5F85A, 0xBDBDC3FC, 0x48487860, 0xFFFFCE62, 0x4C4C0796,
+ 0x4141776C, 0xC7C7E642, 0xEBEB24F7, 0x1C1C1410, 0x5D5D637C, 0x36362228,
+ 0x6767C027, 0xE9E9AF8C, 0x4444F913, 0x1414EA95, 0xF5F5BB9C, 0xCFCF18C7,
+ 0x3F3F2D24, 0xC0C0E346, 0x7272DB3B, 0x54546C70, 0x29294CCA, 0xF0F035E3,
+ 0x0808FE85, 0xC6C617CB, 0xF3F34F11, 0x8C8CE4D0, 0xA4A45993, 0xCACA96B8,
+ 0x68683BA6, 0xB8B84D83, 0x38382820, 0xE5E52EFF, 0xADAD569F, 0x0B0B8477,
+ 0xC8C81DC3, 0x9999FFCC, 0x5858ED03, 0x19199A6F, 0x0E0E0A08, 0x95957EBF,
+ 0x70705040, 0xF7F730E7, 0x6E6ECF2B, 0x1F1F6EE2, 0xB5B53D79, 0x09090F0C,
+ 0x616134AA, 0x57571682, 0x9F9F0B41, 0x9D9D803A, 0x111164EA, 0x2525CDB9,
+ 0xAFAFDDE4, 0x4545089A, 0xDFDF8DA4, 0xA3A35C97, 0xEAEAD57E, 0x353558DA,
+ 0xEDEDD07A, 0x4343FC17, 0xF8F8CB66, 0xFBFBB194, 0x3737D3A1, 0xFAFA401D,
+ 0xC2C2683D, 0xB4B4CCF0, 0x32325DDE, 0x9C9C71B3, 0x5656E70B, 0xE3E3DA72,
+ 0x878760A7, 0x15151B1C, 0xF9F93AEF, 0x6363BFD1, 0x3434A953, 0x9A9A853E,
+ 0xB1B1428F, 0x7C7CD133, 0x88889B26, 0x3D3DA65F, 0xA1A1D7EC, 0xE4E4DF76,
+ 0x8181942A, 0x91910149, 0x0F0FFB81, 0xEEEEAA88, 0x161661EE, 0xD7D77321,
+ 0x9797F5C4, 0xA5A5A81A, 0xFEFE3FEB, 0x6D6DB5D9, 0x7878AEC5, 0xC5C56D39,
+ 0x1D1DE599, 0x7676A4CD, 0x3E3EDCAD, 0xCBCB6731, 0xB6B6478B, 0xEFEF5B01,
+ 0x12121E18, 0x6060C523, 0x6A6AB0DD, 0x4D4DF61F, 0xCECEE94E, 0xDEDE7C2D,
+ 0x55559DF9, 0x7E7E5A48, 0x2121B24F, 0x03037AF2, 0xA0A02665, 0x5E5E198E,
+ 0x5A5A6678, 0x65654B5C, 0x62624E58, 0xFDFD4519, 0x0606F48D, 0x404086E5,
+ 0xF2F2BE98, 0x3333AC57, 0x17179067, 0x05058E7F, 0xE8E85E05, 0x4F4F7D64,
+ 0x89896AAF, 0x10109563, 0x74742FB6, 0x0A0A75FE, 0x5C5C92F5, 0x9B9B74B7,
+ 0x2D2D333C, 0x3030D6A5, 0x2E2E49CE, 0x494989E9, 0x46467268, 0x77775544,
+ 0xA8A8D8E0, 0x9696044D, 0x2828BD43, 0xA9A92969, 0xD9D97929, 0x8686912E,
+ 0xD1D187AC, 0xF4F44A15, 0x8D8D1559, 0xD6D682A8, 0xB9B9BC0A, 0x42420D9E,
+ 0xF6F6C16E, 0x2F2FB847, 0xDDDD06DF, 0x23233934, 0xCCCC6235, 0xF1F1C46A,
+ 0xC1C112CF, 0x8585EBDC, 0x8F8F9E22, 0x7171A1C9, 0x9090F0C0, 0xAAAA539B,
+ 0x0101F189, 0x8B8BE1D4, 0x4E4E8CED, 0x8E8E6FAB, 0xABABA212, 0x6F6F3EA2,
+ 0xE6E6540D, 0xDBDBF252, 0x92927BBB, 0xB7B7B602, 0x6969CA2F, 0x3939D9A9,
+ 0xD3D30CD7, 0xA7A72361, 0xA2A2AD1E, 0xC3C399B4, 0x6C6C4450, 0x07070504,
+ 0x04047FF6, 0x272746C2, 0xACACA716, 0xD0D07625, 0x50501386, 0xDCDCF756,
+ 0x84841A55, 0xE1E15109, 0x7A7A25BE, 0x1313EF91},
+
+ {0xA9D93939, 0x67901717, 0xB3719C9C, 0xE8D2A6A6, 0x04050707, 0xFD985252,
+ 0xA3658080, 0x76DFE4E4, 0x9A084545, 0x92024B4B, 0x80A0E0E0, 0x78665A5A,
+ 0xE4DDAFAF, 0xDDB06A6A, 0xD1BF6363, 0x38362A2A, 0x0D54E6E6, 0xC6432020,
+ 0x3562CCCC, 0x98BEF2F2, 0x181E1212, 0xF724EBEB, 0xECD7A1A1, 0x6C774141,
+ 0x43BD2828, 0x7532BCBC, 0x37D47B7B, 0x269B8888, 0xFA700D0D, 0x13F94444,
+ 0x94B1FBFB, 0x485A7E7E, 0xF27A0303, 0xD0E48C8C, 0x8B47B6B6, 0x303C2424,
+ 0x84A5E7E7, 0x54416B6B, 0xDF06DDDD, 0x23C56060, 0x1945FDFD, 0x5BA33A3A,
+ 0x3D68C2C2, 0x59158D8D, 0xF321ECEC, 0xAE316666, 0xA23E6F6F, 0x82165757,
+ 0x63951010, 0x015BEFEF, 0x834DB8B8, 0x2E918686, 0xD9B56D6D, 0x511F8383,
+ 0x9B53AAAA, 0x7C635D5D, 0xA63B6868, 0xEB3FFEFE, 0xA5D63030, 0xBE257A7A,
+ 0x16A7ACAC, 0x0C0F0909, 0xE335F0F0, 0x6123A7A7, 0xC0F09090, 0x8CAFE9E9,
+ 0x3A809D9D, 0xF5925C5C, 0x73810C0C, 0x2C273131, 0x2576D0D0, 0x0BE75656,
+ 0xBB7B9292, 0x4EE9CECE, 0x89F10101, 0x6B9F1E1E, 0x53A93434, 0x6AC4F1F1,
+ 0xB499C3C3, 0xF1975B5B, 0xE1834747, 0xE66B1818, 0xBDC82222, 0x450E9898,
+ 0xE26E1F1F, 0xF4C9B3B3, 0xB62F7474, 0x66CBF8F8, 0xCCFF9999, 0x95EA1414,
+ 0x03ED5858, 0x56F7DCDC, 0xD4E18B8B, 0x1C1B1515, 0x1EADA2A2, 0xD70CD3D3,
+ 0xFB2BE2E2, 0xC31DC8C8, 0x8E195E5E, 0xB5C22C2C, 0xE9894949, 0xCF12C1C1,
+ 0xBF7E9595, 0xBA207D7D, 0xEA641111, 0x77840B0B, 0x396DC5C5, 0xAF6A8989,
+ 0x33D17C7C, 0xC9A17171, 0x62CEFFFF, 0x7137BBBB, 0x81FB0F0F, 0x793DB5B5,
+ 0x0951E1E1, 0xADDC3E3E, 0x242D3F3F, 0xCDA47676, 0xF99D5555, 0xD8EE8282,
+ 0xE5864040, 0xC5AE7878, 0xB9CD2525, 0x4D049696, 0x44557777, 0x080A0E0E,
+ 0x86135050, 0xE730F7F7, 0xA1D33737, 0x1D40FAFA, 0xAA346161, 0xED8C4E4E,
+ 0x06B3B0B0, 0x706C5454, 0xB22A7373, 0xD2523B3B, 0x410B9F9F, 0x7B8B0202,
+ 0xA088D8D8, 0x114FF3F3, 0x3167CBCB, 0xC2462727, 0x27C06767, 0x90B4FCFC,
+ 0x20283838, 0xF67F0404, 0x60784848, 0xFF2EE5E5, 0x96074C4C, 0x5C4B6565,
+ 0xB1C72B2B, 0xAB6F8E8E, 0x9E0D4242, 0x9CBBF5F5, 0x52F2DBDB, 0x1BF34A4A,
+ 0x5FA63D3D, 0x9359A4A4, 0x0ABCB9B9, 0xEF3AF9F9, 0x91EF1313, 0x85FE0808,
+ 0x49019191, 0xEE611616, 0x2D7CDEDE, 0x4FB22121, 0x8F42B1B1, 0x3BDB7272,
+ 0x47B82F2F, 0x8748BFBF, 0x6D2CAEAE, 0x46E3C0C0, 0xD6573C3C, 0x3E859A9A,
+ 0x6929A9A9, 0x647D4F4F, 0x2A948181, 0xCE492E2E, 0xCB17C6C6, 0x2FCA6969,
+ 0xFCC3BDBD, 0x975CA3A3, 0x055EE8E8, 0x7AD0EDED, 0xAC87D1D1, 0x7F8E0505,
+ 0xD5BA6464, 0x1AA8A5A5, 0x4BB72626, 0x0EB9BEBE, 0xA7608787, 0x5AF8D5D5,
+ 0x28223636, 0x14111B1B, 0x3FDE7575, 0x2979D9D9, 0x88AAEEEE, 0x3C332D2D,
+ 0x4C5F7979, 0x02B6B7B7, 0xB896CACA, 0xDA583535, 0xB09CC4C4, 0x17FC4343,
+ 0x551A8484, 0x1FF64D4D, 0x8A1C5959, 0x7D38B2B2, 0x57AC3333, 0xC718CFCF,
+ 0x8DF40606, 0x74695353, 0xB7749B9B, 0xC4F59797, 0x9F56ADAD, 0x72DAE3E3,
+ 0x7ED5EAEA, 0x154AF4F4, 0x229E8F8F, 0x12A2ABAB, 0x584E6262, 0x07E85F5F,
+ 0x99E51D1D, 0x34392323, 0x6EC1F6F6, 0x50446C6C, 0xDE5D3232, 0x68724646,
+ 0x6526A0A0, 0xBC93CDCD, 0xDB03DADA, 0xF8C6BABA, 0xC8FA9E9E, 0xA882D6D6,
+ 0x2BCF6E6E, 0x40507070, 0xDCEB8585, 0xFE750A0A, 0x328A9393, 0xA48DDFDF,
+ 0xCA4C2929, 0x10141C1C, 0x2173D7D7, 0xF0CCB4B4, 0xD309D4D4, 0x5D108A8A,
+ 0x0FE25151, 0x00000000, 0x6F9A1919, 0x9DE01A1A, 0x368F9494, 0x42E6C7C7,
+ 0x4AECC9C9, 0x5EFDD2D2, 0xC1AB7F7F, 0xE0D8A8A8},
+
+ {0xBC75BC32, 0xECF3EC21, 0x20C62043, 0xB3F4B3C9, 0xDADBDA03, 0x027B028B,
+ 0xE2FBE22B, 0x9EC89EFA, 0xC94AC9EC, 0xD4D3D409, 0x18E6186B, 0x1E6B1E9F,
+ 0x9845980E, 0xB27DB238, 0xA6E8A6D2, 0x264B26B7, 0x3CD63C57, 0x9332938A,
+ 0x82D882EE, 0x52FD5298, 0x7B377BD4, 0xBB71BB37, 0x5BF15B97, 0x47E14783,
+ 0x2430243C, 0x510F51E2, 0xBAF8BAC6, 0x4A1B4AF3, 0xBF87BF48, 0x0DFA0D70,
+ 0xB006B0B3, 0x753F75DE, 0xD25ED2FD, 0x7DBA7D20, 0x66AE6631, 0x3A5B3AA3,
+ 0x598A591C, 0x00000000, 0xCDBCCD93, 0x1A9D1AE0, 0xAE6DAE2C, 0x7FC17FAB,
+ 0x2BB12BC7, 0xBE0EBEB9, 0xE080E0A0, 0x8A5D8A10, 0x3BD23B52, 0x64D564BA,
+ 0xD8A0D888, 0xE784E7A5, 0x5F075FE8, 0x1B141B11, 0x2CB52CC2, 0xFC90FCB4,
+ 0x312C3127, 0x80A38065, 0x73B2732A, 0x0C730C81, 0x794C795F, 0x6B546B41,
+ 0x4B924B02, 0x53745369, 0x9436948F, 0x8351831F, 0x2A382A36, 0xC4B0C49C,
+ 0x22BD22C8, 0xD55AD5F8, 0xBDFCBDC3, 0x48604878, 0xFF62FFCE, 0x4C964C07,
+ 0x416C4177, 0xC742C7E6, 0xEBF7EB24, 0x1C101C14, 0x5D7C5D63, 0x36283622,
+ 0x672767C0, 0xE98CE9AF, 0x441344F9, 0x149514EA, 0xF59CF5BB, 0xCFC7CF18,
+ 0x3F243F2D, 0xC046C0E3, 0x723B72DB, 0x5470546C, 0x29CA294C, 0xF0E3F035,
+ 0x088508FE, 0xC6CBC617, 0xF311F34F, 0x8CD08CE4, 0xA493A459, 0xCAB8CA96,
+ 0x68A6683B, 0xB883B84D, 0x38203828, 0xE5FFE52E, 0xAD9FAD56, 0x0B770B84,
+ 0xC8C3C81D, 0x99CC99FF, 0x580358ED, 0x196F199A, 0x0E080E0A, 0x95BF957E,
+ 0x70407050, 0xF7E7F730, 0x6E2B6ECF, 0x1FE21F6E, 0xB579B53D, 0x090C090F,
+ 0x61AA6134, 0x57825716, 0x9F419F0B, 0x9D3A9D80, 0x11EA1164, 0x25B925CD,
+ 0xAFE4AFDD, 0x459A4508, 0xDFA4DF8D, 0xA397A35C, 0xEA7EEAD5, 0x35DA3558,
+ 0xED7AEDD0, 0x431743FC, 0xF866F8CB, 0xFB94FBB1, 0x37A137D3, 0xFA1DFA40,
+ 0xC23DC268, 0xB4F0B4CC, 0x32DE325D, 0x9CB39C71, 0x560B56E7, 0xE372E3DA,
+ 0x87A78760, 0x151C151B, 0xF9EFF93A, 0x63D163BF, 0x345334A9, 0x9A3E9A85,
+ 0xB18FB142, 0x7C337CD1, 0x8826889B, 0x3D5F3DA6, 0xA1ECA1D7, 0xE476E4DF,
+ 0x812A8194, 0x91499101, 0x0F810FFB, 0xEE88EEAA, 0x16EE1661, 0xD721D773,
+ 0x97C497F5, 0xA51AA5A8, 0xFEEBFE3F, 0x6DD96DB5, 0x78C578AE, 0xC539C56D,
+ 0x1D991DE5, 0x76CD76A4, 0x3EAD3EDC, 0xCB31CB67, 0xB68BB647, 0xEF01EF5B,
+ 0x1218121E, 0x602360C5, 0x6ADD6AB0, 0x4D1F4DF6, 0xCE4ECEE9, 0xDE2DDE7C,
+ 0x55F9559D, 0x7E487E5A, 0x214F21B2, 0x03F2037A, 0xA065A026, 0x5E8E5E19,
+ 0x5A785A66, 0x655C654B, 0x6258624E, 0xFD19FD45, 0x068D06F4, 0x40E54086,
+ 0xF298F2BE, 0x335733AC, 0x17671790, 0x057F058E, 0xE805E85E, 0x4F644F7D,
+ 0x89AF896A, 0x10631095, 0x74B6742F, 0x0AFE0A75, 0x5CF55C92, 0x9BB79B74,
+ 0x2D3C2D33, 0x30A530D6, 0x2ECE2E49, 0x49E94989, 0x46684672, 0x77447755,
+ 0xA8E0A8D8, 0x964D9604, 0x284328BD, 0xA969A929, 0xD929D979, 0x862E8691,
+ 0xD1ACD187, 0xF415F44A, 0x8D598D15, 0xD6A8D682, 0xB90AB9BC, 0x429E420D,
+ 0xF66EF6C1, 0x2F472FB8, 0xDDDFDD06, 0x23342339, 0xCC35CC62, 0xF16AF1C4,
+ 0xC1CFC112, 0x85DC85EB, 0x8F228F9E, 0x71C971A1, 0x90C090F0, 0xAA9BAA53,
+ 0x018901F1, 0x8BD48BE1, 0x4EED4E8C, 0x8EAB8E6F, 0xAB12ABA2, 0x6FA26F3E,
+ 0xE60DE654, 0xDB52DBF2, 0x92BB927B, 0xB702B7B6, 0x692F69CA, 0x39A939D9,
+ 0xD3D7D30C, 0xA761A723, 0xA21EA2AD, 0xC3B4C399, 0x6C506C44, 0x07040705,
+ 0x04F6047F, 0x27C22746, 0xAC16ACA7, 0xD025D076, 0x50865013, 0xDC56DCF7,
+ 0x8455841A, 0xE109E151, 0x7ABE7A25, 0x139113EF},
+
+ {0xD939A9D9, 0x90176790, 0x719CB371, 0xD2A6E8D2, 0x05070405, 0x9852FD98,
+ 0x6580A365, 0xDFE476DF, 0x08459A08, 0x024B9202, 0xA0E080A0, 0x665A7866,
+ 0xDDAFE4DD, 0xB06ADDB0, 0xBF63D1BF, 0x362A3836, 0x54E60D54, 0x4320C643,
+ 0x62CC3562, 0xBEF298BE, 0x1E12181E, 0x24EBF724, 0xD7A1ECD7, 0x77416C77,
+ 0xBD2843BD, 0x32BC7532, 0xD47B37D4, 0x9B88269B, 0x700DFA70, 0xF94413F9,
+ 0xB1FB94B1, 0x5A7E485A, 0x7A03F27A, 0xE48CD0E4, 0x47B68B47, 0x3C24303C,
+ 0xA5E784A5, 0x416B5441, 0x06DDDF06, 0xC56023C5, 0x45FD1945, 0xA33A5BA3,
+ 0x68C23D68, 0x158D5915, 0x21ECF321, 0x3166AE31, 0x3E6FA23E, 0x16578216,
+ 0x95106395, 0x5BEF015B, 0x4DB8834D, 0x91862E91, 0xB56DD9B5, 0x1F83511F,
+ 0x53AA9B53, 0x635D7C63, 0x3B68A63B, 0x3FFEEB3F, 0xD630A5D6, 0x257ABE25,
+ 0xA7AC16A7, 0x0F090C0F, 0x35F0E335, 0x23A76123, 0xF090C0F0, 0xAFE98CAF,
+ 0x809D3A80, 0x925CF592, 0x810C7381, 0x27312C27, 0x76D02576, 0xE7560BE7,
+ 0x7B92BB7B, 0xE9CE4EE9, 0xF10189F1, 0x9F1E6B9F, 0xA93453A9, 0xC4F16AC4,
+ 0x99C3B499, 0x975BF197, 0x8347E183, 0x6B18E66B, 0xC822BDC8, 0x0E98450E,
+ 0x6E1FE26E, 0xC9B3F4C9, 0x2F74B62F, 0xCBF866CB, 0xFF99CCFF, 0xEA1495EA,
+ 0xED5803ED, 0xF7DC56F7, 0xE18BD4E1, 0x1B151C1B, 0xADA21EAD, 0x0CD3D70C,
+ 0x2BE2FB2B, 0x1DC8C31D, 0x195E8E19, 0xC22CB5C2, 0x8949E989, 0x12C1CF12,
+ 0x7E95BF7E, 0x207DBA20, 0x6411EA64, 0x840B7784, 0x6DC5396D, 0x6A89AF6A,
+ 0xD17C33D1, 0xA171C9A1, 0xCEFF62CE, 0x37BB7137, 0xFB0F81FB, 0x3DB5793D,
+ 0x51E10951, 0xDC3EADDC, 0x2D3F242D, 0xA476CDA4, 0x9D55F99D, 0xEE82D8EE,
+ 0x8640E586, 0xAE78C5AE, 0xCD25B9CD, 0x04964D04, 0x55774455, 0x0A0E080A,
+ 0x13508613, 0x30F7E730, 0xD337A1D3, 0x40FA1D40, 0x3461AA34, 0x8C4EED8C,
+ 0xB3B006B3, 0x6C54706C, 0x2A73B22A, 0x523BD252, 0x0B9F410B, 0x8B027B8B,
+ 0x88D8A088, 0x4FF3114F, 0x67CB3167, 0x4627C246, 0xC06727C0, 0xB4FC90B4,
+ 0x28382028, 0x7F04F67F, 0x78486078, 0x2EE5FF2E, 0x074C9607, 0x4B655C4B,
+ 0xC72BB1C7, 0x6F8EAB6F, 0x0D429E0D, 0xBBF59CBB, 0xF2DB52F2, 0xF34A1BF3,
+ 0xA63D5FA6, 0x59A49359, 0xBCB90ABC, 0x3AF9EF3A, 0xEF1391EF, 0xFE0885FE,
+ 0x01914901, 0x6116EE61, 0x7CDE2D7C, 0xB2214FB2, 0x42B18F42, 0xDB723BDB,
+ 0xB82F47B8, 0x48BF8748, 0x2CAE6D2C, 0xE3C046E3, 0x573CD657, 0x859A3E85,
+ 0x29A96929, 0x7D4F647D, 0x94812A94, 0x492ECE49, 0x17C6CB17, 0xCA692FCA,
+ 0xC3BDFCC3, 0x5CA3975C, 0x5EE8055E, 0xD0ED7AD0, 0x87D1AC87, 0x8E057F8E,
+ 0xBA64D5BA, 0xA8A51AA8, 0xB7264BB7, 0xB9BE0EB9, 0x6087A760, 0xF8D55AF8,
+ 0x22362822, 0x111B1411, 0xDE753FDE, 0x79D92979, 0xAAEE88AA, 0x332D3C33,
+ 0x5F794C5F, 0xB6B702B6, 0x96CAB896, 0x5835DA58, 0x9CC4B09C, 0xFC4317FC,
+ 0x1A84551A, 0xF64D1FF6, 0x1C598A1C, 0x38B27D38, 0xAC3357AC, 0x18CFC718,
+ 0xF4068DF4, 0x69537469, 0x749BB774, 0xF597C4F5, 0x56AD9F56, 0xDAE372DA,
+ 0xD5EA7ED5, 0x4AF4154A, 0x9E8F229E, 0xA2AB12A2, 0x4E62584E, 0xE85F07E8,
+ 0xE51D99E5, 0x39233439, 0xC1F66EC1, 0x446C5044, 0x5D32DE5D, 0x72466872,
+ 0x26A06526, 0x93CDBC93, 0x03DADB03, 0xC6BAF8C6, 0xFA9EC8FA, 0x82D6A882,
+ 0xCF6E2BCF, 0x50704050, 0xEB85DCEB, 0x750AFE75, 0x8A93328A, 0x8DDFA48D,
+ 0x4C29CA4C, 0x141C1014, 0x73D72173, 0xCCB4F0CC, 0x09D4D309, 0x108A5D10,
+ 0xE2510FE2, 0x00000000, 0x9A196F9A, 0xE01A9DE0, 0x8F94368F, 0xE6C742E6,
+ 0xECC94AEC, 0xFDD25EFD, 0xAB7FC1AB, 0xD8A8E0D8}
+};
+
+/* The exp_to_poly and poly_to_exp tables are used to perform efficient
+ * operations in GF(2^8) represented as GF(2)[x]/w(x) where
+ * w(x)=x^8+x^6+x^3+x^2+1. We care about doing that because it's part of the
+ * definition of the RS matrix in the key schedule. Elements of that field
+ * are polynomials of degree not greater than 7 and all coefficients 0 or 1,
+ * which can be represented naturally by bytes (just substitute x=2). In that
+ * form, GF(2^8) addition is the same as bitwise XOR, but GF(2^8)
+ * multiplication is inefficient without hardware support. To multiply
+ * faster, I make use of the fact x is a generator for the nonzero elements,
+ * so that every element p of GF(2)[x]/w(x) is either 0 or equal to (x)^n for
+ * some n in 0..254. Note that that caret is exponentiation in GF(2^8),
+ * *not* polynomial notation. So if I want to compute pq where p and q are
+ * in GF(2^8), I can just say:
+ * 1. if p=0 or q=0 then pq=0
+ * 2. otherwise, find m and n such that p=x^m and q=x^n
+ * 3. pq=(x^m)(x^n)=x^(m+n), so add m and n and find pq
+ * The translations in steps 2 and 3 are looked up in the tables
+ * poly_to_exp (for step 2) and exp_to_poly (for step 3). To see this
+ * in action, look at the CALC_S macro. As additional wrinkles, note that
+ * one of my operands is always a constant, so the poly_to_exp lookup on it
+ * is done in advance; I included the original values in the comments so
+ * readers can have some chance of recognizing that this *is* the RS matrix
+ * from the Twofish paper. I've only included the table entries I actually
+ * need; I never do a lookup on a variable input of zero and the biggest
+ * exponents I'll ever see are 254 (variable) and 237 (constant), so they'll
+ * never sum to more than 491. I'm repeating part of the exp_to_poly table
+ * so that I don't have to do mod-255 reduction in the exponent arithmetic.
+ * Since I know my constant operands are never zero, I only have to worry
+ * about zero values in the variable operand, and I do it with a simple
+ * conditional branch. I know conditionals are expensive, but I couldn't
+ * see a non-horrible way of avoiding them, and I did manage to group the
+ * statements so that each if covers four group multiplications. */
+
+static const byte poly_to_exp[255] = {
+ 0x00, 0x01, 0x17, 0x02, 0x2E, 0x18, 0x53, 0x03, 0x6A, 0x2F, 0x93, 0x19,
+ 0x34, 0x54, 0x45, 0x04, 0x5C, 0x6B, 0xB6, 0x30, 0xA6, 0x94, 0x4B, 0x1A,
+ 0x8C, 0x35, 0x81, 0x55, 0xAA, 0x46, 0x0D, 0x05, 0x24, 0x5D, 0x87, 0x6C,
+ 0x9B, 0xB7, 0xC1, 0x31, 0x2B, 0xA7, 0xA3, 0x95, 0x98, 0x4C, 0xCA, 0x1B,
+ 0xE6, 0x8D, 0x73, 0x36, 0xCD, 0x82, 0x12, 0x56, 0x62, 0xAB, 0xF0, 0x47,
+ 0x4F, 0x0E, 0xBD, 0x06, 0xD4, 0x25, 0xD2, 0x5E, 0x27, 0x88, 0x66, 0x6D,
+ 0xD6, 0x9C, 0x79, 0xB8, 0x08, 0xC2, 0xDF, 0x32, 0x68, 0x2C, 0xFD, 0xA8,
+ 0x8A, 0xA4, 0x5A, 0x96, 0x29, 0x99, 0x22, 0x4D, 0x60, 0xCB, 0xE4, 0x1C,
+ 0x7B, 0xE7, 0x3B, 0x8E, 0x9E, 0x74, 0xF4, 0x37, 0xD8, 0xCE, 0xF9, 0x83,
+ 0x6F, 0x13, 0xB2, 0x57, 0xE1, 0x63, 0xDC, 0xAC, 0xC4, 0xF1, 0xAF, 0x48,
+ 0x0A, 0x50, 0x42, 0x0F, 0xBA, 0xBE, 0xC7, 0x07, 0xDE, 0xD5, 0x78, 0x26,
+ 0x65, 0xD3, 0xD1, 0x5F, 0xE3, 0x28, 0x21, 0x89, 0x59, 0x67, 0xFC, 0x6E,
+ 0xB1, 0xD7, 0xF8, 0x9D, 0xF3, 0x7A, 0x3A, 0xB9, 0xC6, 0x09, 0x41, 0xC3,
+ 0xAE, 0xE0, 0xDB, 0x33, 0x44, 0x69, 0x92, 0x2D, 0x52, 0xFE, 0x16, 0xA9,
+ 0x0C, 0x8B, 0x80, 0xA5, 0x4A, 0x5B, 0xB5, 0x97, 0xC9, 0x2A, 0xA2, 0x9A,
+ 0xC0, 0x23, 0x86, 0x4E, 0xBC, 0x61, 0xEF, 0xCC, 0x11, 0xE5, 0x72, 0x1D,
+ 0x3D, 0x7C, 0xEB, 0xE8, 0xE9, 0x3C, 0xEA, 0x8F, 0x7D, 0x9F, 0xEC, 0x75,
+ 0x1E, 0xF5, 0x3E, 0x38, 0xF6, 0xD9, 0x3F, 0xCF, 0x76, 0xFA, 0x1F, 0x84,
+ 0xA0, 0x70, 0xED, 0x14, 0x90, 0xB3, 0x7E, 0x58, 0xFB, 0xE2, 0x20, 0x64,
+ 0xD0, 0xDD, 0x77, 0xAD, 0xDA, 0xC5, 0x40, 0xF2, 0x39, 0xB0, 0xF7, 0x49,
+ 0xB4, 0x0B, 0x7F, 0x51, 0x15, 0x43, 0x91, 0x10, 0x71, 0xBB, 0xEE, 0xBF,
+ 0x85, 0xC8, 0xA1
+};
+
+static const byte exp_to_poly[492] = {
+ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x4D, 0x9A, 0x79, 0xF2,
+ 0xA9, 0x1F, 0x3E, 0x7C, 0xF8, 0xBD, 0x37, 0x6E, 0xDC, 0xF5, 0xA7, 0x03,
+ 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xCD, 0xD7, 0xE3, 0x8B, 0x5B, 0xB6,
+ 0x21, 0x42, 0x84, 0x45, 0x8A, 0x59, 0xB2, 0x29, 0x52, 0xA4, 0x05, 0x0A,
+ 0x14, 0x28, 0x50, 0xA0, 0x0D, 0x1A, 0x34, 0x68, 0xD0, 0xED, 0x97, 0x63,
+ 0xC6, 0xC1, 0xCF, 0xD3, 0xEB, 0x9B, 0x7B, 0xF6, 0xA1, 0x0F, 0x1E, 0x3C,
+ 0x78, 0xF0, 0xAD, 0x17, 0x2E, 0x5C, 0xB8, 0x3D, 0x7A, 0xF4, 0xA5, 0x07,
+ 0x0E, 0x1C, 0x38, 0x70, 0xE0, 0x8D, 0x57, 0xAE, 0x11, 0x22, 0x44, 0x88,
+ 0x5D, 0xBA, 0x39, 0x72, 0xE4, 0x85, 0x47, 0x8E, 0x51, 0xA2, 0x09, 0x12,
+ 0x24, 0x48, 0x90, 0x6D, 0xDA, 0xF9, 0xBF, 0x33, 0x66, 0xCC, 0xD5, 0xE7,
+ 0x83, 0x4B, 0x96, 0x61, 0xC2, 0xC9, 0xDF, 0xF3, 0xAB, 0x1B, 0x36, 0x6C,
+ 0xD8, 0xFD, 0xB7, 0x23, 0x46, 0x8C, 0x55, 0xAA, 0x19, 0x32, 0x64, 0xC8,
+ 0xDD, 0xF7, 0xA3, 0x0B, 0x16, 0x2C, 0x58, 0xB0, 0x2D, 0x5A, 0xB4, 0x25,
+ 0x4A, 0x94, 0x65, 0xCA, 0xD9, 0xFF, 0xB3, 0x2B, 0x56, 0xAC, 0x15, 0x2A,
+ 0x54, 0xA8, 0x1D, 0x3A, 0x74, 0xE8, 0x9D, 0x77, 0xEE, 0x91, 0x6F, 0xDE,
+ 0xF1, 0xAF, 0x13, 0x26, 0x4C, 0x98, 0x7D, 0xFA, 0xB9, 0x3F, 0x7E, 0xFC,
+ 0xB5, 0x27, 0x4E, 0x9C, 0x75, 0xEA, 0x99, 0x7F, 0xFE, 0xB1, 0x2F, 0x5E,
+ 0xBC, 0x35, 0x6A, 0xD4, 0xE5, 0x87, 0x43, 0x86, 0x41, 0x82, 0x49, 0x92,
+ 0x69, 0xD2, 0xE9, 0x9F, 0x73, 0xE6, 0x81, 0x4F, 0x9E, 0x71, 0xE2, 0x89,
+ 0x5F, 0xBE, 0x31, 0x62, 0xC4, 0xC5, 0xC7, 0xC3, 0xCB, 0xDB, 0xFB, 0xBB,
+ 0x3B, 0x76, 0xEC, 0x95, 0x67, 0xCE, 0xD1, 0xEF, 0x93, 0x6B, 0xD6, 0xE1,
+ 0x8F, 0x53, 0xA6, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x4D,
+ 0x9A, 0x79, 0xF2, 0xA9, 0x1F, 0x3E, 0x7C, 0xF8, 0xBD, 0x37, 0x6E, 0xDC,
+ 0xF5, 0xA7, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xCD, 0xD7, 0xE3,
+ 0x8B, 0x5B, 0xB6, 0x21, 0x42, 0x84, 0x45, 0x8A, 0x59, 0xB2, 0x29, 0x52,
+ 0xA4, 0x05, 0x0A, 0x14, 0x28, 0x50, 0xA0, 0x0D, 0x1A, 0x34, 0x68, 0xD0,
+ 0xED, 0x97, 0x63, 0xC6, 0xC1, 0xCF, 0xD3, 0xEB, 0x9B, 0x7B, 0xF6, 0xA1,
+ 0x0F, 0x1E, 0x3C, 0x78, 0xF0, 0xAD, 0x17, 0x2E, 0x5C, 0xB8, 0x3D, 0x7A,
+ 0xF4, 0xA5, 0x07, 0x0E, 0x1C, 0x38, 0x70, 0xE0, 0x8D, 0x57, 0xAE, 0x11,
+ 0x22, 0x44, 0x88, 0x5D, 0xBA, 0x39, 0x72, 0xE4, 0x85, 0x47, 0x8E, 0x51,
+ 0xA2, 0x09, 0x12, 0x24, 0x48, 0x90, 0x6D, 0xDA, 0xF9, 0xBF, 0x33, 0x66,
+ 0xCC, 0xD5, 0xE7, 0x83, 0x4B, 0x96, 0x61, 0xC2, 0xC9, 0xDF, 0xF3, 0xAB,
+ 0x1B, 0x36, 0x6C, 0xD8, 0xFD, 0xB7, 0x23, 0x46, 0x8C, 0x55, 0xAA, 0x19,
+ 0x32, 0x64, 0xC8, 0xDD, 0xF7, 0xA3, 0x0B, 0x16, 0x2C, 0x58, 0xB0, 0x2D,
+ 0x5A, 0xB4, 0x25, 0x4A, 0x94, 0x65, 0xCA, 0xD9, 0xFF, 0xB3, 0x2B, 0x56,
+ 0xAC, 0x15, 0x2A, 0x54, 0xA8, 0x1D, 0x3A, 0x74, 0xE8, 0x9D, 0x77, 0xEE,
+ 0x91, 0x6F, 0xDE, 0xF1, 0xAF, 0x13, 0x26, 0x4C, 0x98, 0x7D, 0xFA, 0xB9,
+ 0x3F, 0x7E, 0xFC, 0xB5, 0x27, 0x4E, 0x9C, 0x75, 0xEA, 0x99, 0x7F, 0xFE,
+ 0xB1, 0x2F, 0x5E, 0xBC, 0x35, 0x6A, 0xD4, 0xE5, 0x87, 0x43, 0x86, 0x41,
+ 0x82, 0x49, 0x92, 0x69, 0xD2, 0xE9, 0x9F, 0x73, 0xE6, 0x81, 0x4F, 0x9E,
+ 0x71, 0xE2, 0x89, 0x5F, 0xBE, 0x31, 0x62, 0xC4, 0xC5, 0xC7, 0xC3, 0xCB
+};
+
+
+/* The table constants are indices of
+ * S-box entries, preprocessed through q0 and q1. */
+static byte calc_sb_tbl[512] = {
+ 0xA9, 0x75, 0x67, 0xF3, 0xB3, 0xC6, 0xE8, 0xF4,
+ 0x04, 0xDB, 0xFD, 0x7B, 0xA3, 0xFB, 0x76, 0xC8,
+ 0x9A, 0x4A, 0x92, 0xD3, 0x80, 0xE6, 0x78, 0x6B,
+ 0xE4, 0x45, 0xDD, 0x7D, 0xD1, 0xE8, 0x38, 0x4B,
+ 0x0D, 0xD6, 0xC6, 0x32, 0x35, 0xD8, 0x98, 0xFD,
+ 0x18, 0x37, 0xF7, 0x71, 0xEC, 0xF1, 0x6C, 0xE1,
+ 0x43, 0x30, 0x75, 0x0F, 0x37, 0xF8, 0x26, 0x1B,
+ 0xFA, 0x87, 0x13, 0xFA, 0x94, 0x06, 0x48, 0x3F,
+ 0xF2, 0x5E, 0xD0, 0xBA, 0x8B, 0xAE, 0x30, 0x5B,
+ 0x84, 0x8A, 0x54, 0x00, 0xDF, 0xBC, 0x23, 0x9D,
+ 0x19, 0x6D, 0x5B, 0xC1, 0x3D, 0xB1, 0x59, 0x0E,
+ 0xF3, 0x80, 0xAE, 0x5D, 0xA2, 0xD2, 0x82, 0xD5,
+ 0x63, 0xA0, 0x01, 0x84, 0x83, 0x07, 0x2E, 0x14,
+ 0xD9, 0xB5, 0x51, 0x90, 0x9B, 0x2C, 0x7C, 0xA3,
+ 0xA6, 0xB2, 0xEB, 0x73, 0xA5, 0x4C, 0xBE, 0x54,
+ 0x16, 0x92, 0x0C, 0x74, 0xE3, 0x36, 0x61, 0x51,
+ 0xC0, 0x38, 0x8C, 0xB0, 0x3A, 0xBD, 0xF5, 0x5A,
+ 0x73, 0xFC, 0x2C, 0x60, 0x25, 0x62, 0x0B, 0x96,
+ 0xBB, 0x6C, 0x4E, 0x42, 0x89, 0xF7, 0x6B, 0x10,
+ 0x53, 0x7C, 0x6A, 0x28, 0xB4, 0x27, 0xF1, 0x8C,
+ 0xE1, 0x13, 0xE6, 0x95, 0xBD, 0x9C, 0x45, 0xC7,
+ 0xE2, 0x24, 0xF4, 0x46, 0xB6, 0x3B, 0x66, 0x70,
+ 0xCC, 0xCA, 0x95, 0xE3, 0x03, 0x85, 0x56, 0xCB,
+ 0xD4, 0x11, 0x1C, 0xD0, 0x1E, 0x93, 0xD7, 0xB8,
+ 0xFB, 0xA6, 0xC3, 0x83, 0x8E, 0x20, 0xB5, 0xFF,
+ 0xE9, 0x9F, 0xCF, 0x77, 0xBF, 0xC3, 0xBA, 0xCC,
+ 0xEA, 0x03, 0x77, 0x6F, 0x39, 0x08, 0xAF, 0xBF,
+ 0x33, 0x40, 0xC9, 0xE7, 0x62, 0x2B, 0x71, 0xE2,
+ 0x81, 0x79, 0x79, 0x0C, 0x09, 0xAA, 0xAD, 0x82,
+ 0x24, 0x41, 0xCD, 0x3A, 0xF9, 0xEA, 0xD8, 0xB9,
+ 0xE5, 0xE4, 0xC5, 0x9A, 0xB9, 0xA4, 0x4D, 0x97,
+ 0x44, 0x7E, 0x08, 0xDA, 0x86, 0x7A, 0xE7, 0x17,
+ 0xA1, 0x66, 0x1D, 0x94, 0xAA, 0xA1, 0xED, 0x1D,
+ 0x06, 0x3D, 0x70, 0xF0, 0xB2, 0xDE, 0xD2, 0xB3,
+ 0x41, 0x0B, 0x7B, 0x72, 0xA0, 0xA7, 0x11, 0x1C,
+ 0x31, 0xEF, 0xC2, 0xD1, 0x27, 0x53, 0x90, 0x3E,
+ 0x20, 0x8F, 0xF6, 0x33, 0x60, 0x26, 0xFF, 0x5F,
+ 0x96, 0xEC, 0x5C, 0x76, 0xB1, 0x2A, 0xAB, 0x49,
+ 0x9E, 0x81, 0x9C, 0x88, 0x52, 0xEE, 0x1B, 0x21,
+ 0x5F, 0xC4, 0x93, 0x1A, 0x0A, 0xEB, 0xEF, 0xD9,
+ 0x91, 0xC5, 0x85, 0x39, 0x49, 0x99, 0xEE, 0xCD,
+ 0x2D, 0xAD, 0x4F, 0x31, 0x8F, 0x8B, 0x3B, 0x01,
+ 0x47, 0x18, 0x87, 0x23, 0x6D, 0xDD, 0x46, 0x1F,
+ 0xD6, 0x4E, 0x3E, 0x2D, 0x69, 0xF9, 0x64, 0x48,
+ 0x2A, 0x4F, 0xCE, 0xF2, 0xCB, 0x65, 0x2F, 0x8E,
+ 0xFC, 0x78, 0x97, 0x5C, 0x05, 0x58, 0x7A, 0x19,
+ 0xAC, 0x8D, 0x7F, 0xE5, 0xD5, 0x98, 0x1A, 0x57,
+ 0x4B, 0x67, 0x0E, 0x7F, 0xA7, 0x05, 0x5A, 0x64,
+ 0x28, 0xAF, 0x14, 0x63, 0x3F, 0xB6, 0x29, 0xFE,
+ 0x88, 0xF5, 0x3C, 0xB7, 0x4C, 0x3C, 0x02, 0xA5,
+ 0xB8, 0xCE, 0xDA, 0xE9, 0xB0, 0x68, 0x17, 0x44,
+ 0x55, 0xE0, 0x1F, 0x4D, 0x8A, 0x43, 0x7D, 0x69,
+ 0x57, 0x29, 0xC7, 0x2E, 0x8D, 0xAC, 0x74, 0x15,
+ 0xB7, 0x59, 0xC4, 0xA8, 0x9F, 0x0A, 0x72, 0x9E,
+ 0x7E, 0x6E, 0x15, 0x47, 0x22, 0xDF, 0x12, 0x34,
+ 0x58, 0x35, 0x07, 0x6A, 0x99, 0xCF, 0x34, 0xDC,
+ 0x6E, 0x22, 0x50, 0xC9, 0xDE, 0xC0, 0x68, 0x9B,
+ 0x65, 0x89, 0xBC, 0xD4, 0xDB, 0xED, 0xF8, 0xAB,
+ 0xC8, 0x12, 0xA8, 0xA2, 0x2B, 0x0D, 0x40, 0x52,
+ 0xDC, 0xBB, 0xFE, 0x02, 0x32, 0x2F, 0xA4, 0xA9,
+ 0xCA, 0xD7, 0x10, 0x61, 0x21, 0x1E, 0xF0, 0xB4,
+ 0xD3, 0x50, 0x5D, 0x04, 0x0F, 0xF6, 0x00, 0xC2,
+ 0x6F, 0x16, 0x9D, 0x25, 0x36, 0x86, 0x42, 0x56,
+ 0x4A, 0x55, 0x5E, 0x09, 0xC1, 0xBE, 0xE0, 0x91
+};
+/* Macro to perform one column of the RS matrix multiplication. The
+ * parameters a, b, c, and d are the four bytes of output; i is the index
+ * of the key bytes, and w, x, y, and z, are the column of constants from
+ * the RS matrix, preprocessed through the poly_to_exp table. */
+
+#define CALC_S(a, b, c, d, i, w, x, y, z) \
+ if (key[i]) { \
+ tmp = poly_to_exp[key[i] - 1]; \
+ (a) ^= exp_to_poly[tmp + (w)]; \
+ (b) ^= exp_to_poly[tmp + (x)]; \
+ (c) ^= exp_to_poly[tmp + (y)]; \
+ (d) ^= exp_to_poly[tmp + (z)]; \
+ }
+
+/* Macros to calculate the key-dependent S-boxes for a 128-bit key using
+ * the S vector from CALC_S. CALC_SB_2 computes a single entry in all
+ * four S-boxes, where i is the index of the entry to compute, and a and b
+ * are the index numbers preprocessed through the q0 and q1 tables
+ * respectively. CALC_SB is simply a convenience to make the code shorter;
+ * it calls CALC_SB_2 four times with consecutive indices from i to i+3,
+ * using the remaining parameters two by two. */
+
+#define CALC_SB_2(i, a, b) \
+ ctx->s[0][i] = mds[0][q0[(a) ^ sa] ^ se]; \
+ ctx->s[1][i] = mds[1][q0[(b) ^ sb] ^ sf]; \
+ ctx->s[2][i] = mds[2][q1[(a) ^ sc] ^ sg]; \
+ ctx->s[3][i] = mds[3][q1[(b) ^ sd] ^ sh]
+
+#define CALC_SB(i, a, b, c, d, e, f, g, h) \
+ CALC_SB_2 (i, a, b); CALC_SB_2 ((i)+1, c, d); \
+ CALC_SB_2 ((i)+2, e, f); CALC_SB_2 ((i)+3, g, h)
+
+/* Macros exactly like CALC_SB and CALC_SB_2, but for 256-bit keys. */
+
+#define CALC_SB256_2(i, a, b) \
+ ctx->s[0][i] = mds[0][q0[q0[q1[(b) ^ sa] ^ se] ^ si] ^ sm]; \
+ ctx->s[1][i] = mds[1][q0[q1[q1[(a) ^ sb] ^ sf] ^ sj] ^ sn]; \
+ ctx->s[2][i] = mds[2][q1[q0[q0[(a) ^ sc] ^ sg] ^ sk] ^ so]; \
+ ctx->s[3][i] = mds[3][q1[q1[q0[(b) ^ sd] ^ sh] ^ sl] ^ sp];
+
+#define CALC_SB256(i, a, b, c, d, e, f, g, h) \
+ CALC_SB256_2 (i, a, b); CALC_SB256_2 ((i)+1, c, d); \
+ CALC_SB256_2 ((i)+2, e, f); CALC_SB256_2 ((i)+3, g, h)
+
+/* Macros to calculate the whitening and round subkeys. CALC_K_2 computes the
+ * last two stages of the h() function for a given index (either 2i or 2i+1).
+ * a, b, c, and d are the four bytes going into the last two stages. For
+ * 128-bit keys, this is the entire h() function and a and c are the index
+ * preprocessed through q0 and q1 respectively; for longer keys they are the
+ * output of previous stages. j is the index of the first key byte to use.
+ * CALC_K computes a pair of subkeys for 128-bit Twofish, by calling CALC_K_2
+ * twice, doing the Psuedo-Hadamard Transform, and doing the necessary
+ * rotations. Its parameters are: a, the array to write the results into,
+ * j, the index of the first output entry, k and l, the preprocessed indices
+ * for index 2i, and m and n, the preprocessed indices for index 2i+1.
+ * CALC_K256_2 expands CALC_K_2 to handle 256-bit keys, by doing two
+ * additional lookup-and-XOR stages. The parameters a and b are the index
+ * preprocessed through q0 and q1 respectively; j is the index of the first
+ * key byte to use. CALC_K256 is identical to CALC_K but for using the
+ * CALC_K256_2 macro instead of CALC_K_2. */
+
+#define CALC_K_2(a, b, c, d, j) \
+ mds[0][q0[a ^ key[(j) + 8]] ^ key[j]] \
+ ^ mds[1][q0[b ^ key[(j) + 9]] ^ key[(j) + 1]] \
+ ^ mds[2][q1[c ^ key[(j) + 10]] ^ key[(j) + 2]] \
+ ^ mds[3][q1[d ^ key[(j) + 11]] ^ key[(j) + 3]]
+
+#define CALC_K(a, j, k, l, m, n) \
+ x = CALC_K_2 (k, l, k, l, 0); \
+ y = CALC_K_2 (m, n, m, n, 4); \
+ y = (y << 8) + (y >> 24); \
+ x += y; y += x; ctx->a[j] = x; \
+ ctx->a[(j) + 1] = (y << 9) + (y >> 23)
+
+#define CALC_K256_2(a, b, j) \
+ CALC_K_2 (q0[q1[b ^ key[(j) + 24]] ^ key[(j) + 16]], \
+ q1[q1[a ^ key[(j) + 25]] ^ key[(j) + 17]], \
+ q0[q0[a ^ key[(j) + 26]] ^ key[(j) + 18]], \
+ q1[q0[b ^ key[(j) + 27]] ^ key[(j) + 19]], j)
+
+#define CALC_K256(a, j, k, l, m, n) \
+ x = CALC_K256_2 (k, l, 0); \
+ y = CALC_K256_2 (m, n, 4); \
+ y = (y << 8) + (y >> 24); \
+ x += y; y += x; ctx->a[j] = x; \
+ ctx->a[(j) + 1] = (y << 9) + (y >> 23)
+
+
+
+/* Perform the key setup. Note that this works only with 128- and 256-bit
+ * keys, despite the API that looks like it might support other sizes. */
+
+static gcry_err_code_t
+do_twofish_setkey (TWOFISH_context *ctx, const byte *key, const unsigned keylen)
+{
+ int i, j, k;
+
+ /* Temporaries for CALC_K. */
+ u32 x, y;
+
+ /* The S vector used to key the S-boxes, split up into individual bytes.
+ * 128-bit keys use only sa through sh; 256-bit use all of them. */
+ byte sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0;
+ byte si = 0, sj = 0, sk = 0, sl = 0, sm = 0, sn = 0, so = 0, sp = 0;
+
+ /* Temporary for CALC_S. */
+ byte tmp;
+
+ /* Flags for self-test. */
+ static int initialized = 0;
+ static const char *selftest_failed=0;
+
+ /* Check key length. */
+ if( ( ( keylen - 16 ) | 16 ) != 16 )
+ return GPG_ERR_INV_KEYLEN;
+
+ /* Do self-test if necessary. */
+ if (!initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if( selftest_failed )
+ log_error("%s\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ /* Compute the first two words of the S vector. The magic numbers are
+ * the entries of the RS matrix, preprocessed through poly_to_exp. The
+ * numbers in the comments are the original (polynomial form) matrix
+ * entries. */
+ CALC_S (sa, sb, sc, sd, 0, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (sa, sb, sc, sd, 1, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (sa, sb, sc, sd, 2, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (sa, sb, sc, sd, 3, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (sa, sb, sc, sd, 4, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (sa, sb, sc, sd, 5, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (sa, sb, sc, sd, 6, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (sa, sb, sc, sd, 7, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+ CALC_S (se, sf, sg, sh, 8, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (se, sf, sg, sh, 9, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (se, sf, sg, sh, 10, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (se, sf, sg, sh, 11, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (se, sf, sg, sh, 12, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (se, sf, sg, sh, 13, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (se, sf, sg, sh, 14, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (se, sf, sg, sh, 15, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+
+ if (keylen == 32) /* 256-bit key */
+ {
+ /* Calculate the remaining two words of the S vector */
+ CALC_S (si, sj, sk, sl, 16, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (si, sj, sk, sl, 17, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (si, sj, sk, sl, 18, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (si, sj, sk, sl, 19, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (si, sj, sk, sl, 20, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (si, sj, sk, sl, 21, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (si, sj, sk, sl, 22, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (si, sj, sk, sl, 23, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+ CALC_S (sm, sn, so, sp, 24, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (sm, sn, so, sp, 25, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (sm, sn, so, sp, 26, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (sm, sn, so, sp, 27, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (sm, sn, so, sp, 28, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (sm, sn, so, sp, 29, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (sm, sn, so, sp, 30, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (sm, sn, so, sp, 31, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+
+ /* Compute the S-boxes. */
+ for(i=j=0,k=1; i < 256; i++, j += 2, k += 2 )
+ {
+ CALC_SB256_2( i, calc_sb_tbl[j], calc_sb_tbl[k] );
+ }
+
+ /* Calculate whitening and round subkeys. The constants are
+ * indices of subkeys, preprocessed through q0 and q1. */
+ CALC_K256 (w, 0, 0xA9, 0x75, 0x67, 0xF3);
+ CALC_K256 (w, 2, 0xB3, 0xC6, 0xE8, 0xF4);
+ CALC_K256 (w, 4, 0x04, 0xDB, 0xFD, 0x7B);
+ CALC_K256 (w, 6, 0xA3, 0xFB, 0x76, 0xC8);
+ CALC_K256 (k, 0, 0x9A, 0x4A, 0x92, 0xD3);
+ CALC_K256 (k, 2, 0x80, 0xE6, 0x78, 0x6B);
+ CALC_K256 (k, 4, 0xE4, 0x45, 0xDD, 0x7D);
+ CALC_K256 (k, 6, 0xD1, 0xE8, 0x38, 0x4B);
+ CALC_K256 (k, 8, 0x0D, 0xD6, 0xC6, 0x32);
+ CALC_K256 (k, 10, 0x35, 0xD8, 0x98, 0xFD);
+ CALC_K256 (k, 12, 0x18, 0x37, 0xF7, 0x71);
+ CALC_K256 (k, 14, 0xEC, 0xF1, 0x6C, 0xE1);
+ CALC_K256 (k, 16, 0x43, 0x30, 0x75, 0x0F);
+ CALC_K256 (k, 18, 0x37, 0xF8, 0x26, 0x1B);
+ CALC_K256 (k, 20, 0xFA, 0x87, 0x13, 0xFA);
+ CALC_K256 (k, 22, 0x94, 0x06, 0x48, 0x3F);
+ CALC_K256 (k, 24, 0xF2, 0x5E, 0xD0, 0xBA);
+ CALC_K256 (k, 26, 0x8B, 0xAE, 0x30, 0x5B);
+ CALC_K256 (k, 28, 0x84, 0x8A, 0x54, 0x00);
+ CALC_K256 (k, 30, 0xDF, 0xBC, 0x23, 0x9D);
+ }
+ else
+ {
+ /* Compute the S-boxes. */
+ for(i=j=0,k=1; i < 256; i++, j += 2, k += 2 )
+ {
+ CALC_SB_2( i, calc_sb_tbl[j], calc_sb_tbl[k] );
+ }
+
+ /* Calculate whitening and round subkeys. The constants are
+ * indices of subkeys, preprocessed through q0 and q1. */
+ CALC_K (w, 0, 0xA9, 0x75, 0x67, 0xF3);
+ CALC_K (w, 2, 0xB3, 0xC6, 0xE8, 0xF4);
+ CALC_K (w, 4, 0x04, 0xDB, 0xFD, 0x7B);
+ CALC_K (w, 6, 0xA3, 0xFB, 0x76, 0xC8);
+ CALC_K (k, 0, 0x9A, 0x4A, 0x92, 0xD3);
+ CALC_K (k, 2, 0x80, 0xE6, 0x78, 0x6B);
+ CALC_K (k, 4, 0xE4, 0x45, 0xDD, 0x7D);
+ CALC_K (k, 6, 0xD1, 0xE8, 0x38, 0x4B);
+ CALC_K (k, 8, 0x0D, 0xD6, 0xC6, 0x32);
+ CALC_K (k, 10, 0x35, 0xD8, 0x98, 0xFD);
+ CALC_K (k, 12, 0x18, 0x37, 0xF7, 0x71);
+ CALC_K (k, 14, 0xEC, 0xF1, 0x6C, 0xE1);
+ CALC_K (k, 16, 0x43, 0x30, 0x75, 0x0F);
+ CALC_K (k, 18, 0x37, 0xF8, 0x26, 0x1B);
+ CALC_K (k, 20, 0xFA, 0x87, 0x13, 0xFA);
+ CALC_K (k, 22, 0x94, 0x06, 0x48, 0x3F);
+ CALC_K (k, 24, 0xF2, 0x5E, 0xD0, 0xBA);
+ CALC_K (k, 26, 0x8B, 0xAE, 0x30, 0x5B);
+ CALC_K (k, 28, 0x84, 0x8A, 0x54, 0x00);
+ CALC_K (k, 30, 0xDF, 0xBC, 0x23, 0x9D);
+ }
+
+ return 0;
+}
+
+static gcry_err_code_t
+twofish_setkey (void *context, const byte *key, unsigned int keylen)
+{
+ TWOFISH_context *ctx = context;
+ int rc = do_twofish_setkey (ctx, key, keylen);
+ _gcry_burn_stack (23+6*sizeof(void*));
+ return rc;
+}
+
+
+
+/* Macros to compute the g() function in the encryption and decryption
+ * rounds. G1 is the straight g() function; G2 includes the 8-bit
+ * rotation for the high 32-bit word. */
+
+#define G1(a) \
+ (ctx->s[0][(a) & 0xFF]) ^ (ctx->s[1][((a) >> 8) & 0xFF]) \
+ ^ (ctx->s[2][((a) >> 16) & 0xFF]) ^ (ctx->s[3][(a) >> 24])
+
+#define G2(b) \
+ (ctx->s[1][(b) & 0xFF]) ^ (ctx->s[2][((b) >> 8) & 0xFF]) \
+ ^ (ctx->s[3][((b) >> 16) & 0xFF]) ^ (ctx->s[0][(b) >> 24])
+
+/* Encryption and decryption Feistel rounds. Each one calls the two g()
+ * macros, does the PHT, and performs the XOR and the appropriate bit
+ * rotations. The parameters are the round number (used to select subkeys),
+ * and the four 32-bit chunks of the text. */
+
+#define ENCROUND(n, a, b, c, d) \
+ x = G1 (a); y = G2 (b); \
+ x += y; y += x + ctx->k[2 * (n) + 1]; \
+ (c) ^= x + ctx->k[2 * (n)]; \
+ (c) = ((c) >> 1) + ((c) << 31); \
+ (d) = (((d) << 1)+((d) >> 31)) ^ y
+
+#define DECROUND(n, a, b, c, d) \
+ x = G1 (a); y = G2 (b); \
+ x += y; y += x; \
+ (d) ^= y + ctx->k[2 * (n) + 1]; \
+ (d) = ((d) >> 1) + ((d) << 31); \
+ (c) = (((c) << 1)+((c) >> 31)); \
+ (c) ^= (x + ctx->k[2 * (n)])
+
+/* Encryption and decryption cycles; each one is simply two Feistel rounds
+ * with the 32-bit chunks re-ordered to simulate the "swap" */
+
+#define ENCCYCLE(n) \
+ ENCROUND (2 * (n), a, b, c, d); \
+ ENCROUND (2 * (n) + 1, c, d, a, b)
+
+#define DECCYCLE(n) \
+ DECROUND (2 * (n) + 1, c, d, a, b); \
+ DECROUND (2 * (n), a, b, c, d)
+
+/* Macros to convert the input and output bytes into 32-bit words,
+ * and simultaneously perform the whitening step. INPACK packs word
+ * number n into the variable named by x, using whitening subkey number m.
+ * OUTUNPACK unpacks word number n from the variable named by x, using
+ * whitening subkey number m. */
+
+#define INPACK(n, x, m) \
+ x = in[4 * (n)] ^ (in[4 * (n) + 1] << 8) \
+ ^ (in[4 * (n) + 2] << 16) ^ (in[4 * (n) + 3] << 24) ^ ctx->w[m]
+
+#define OUTUNPACK(n, x, m) \
+ x ^= ctx->w[m]; \
+ out[4 * (n)] = x; out[4 * (n) + 1] = x >> 8; \
+ out[4 * (n) + 2] = x >> 16; out[4 * (n) + 3] = x >> 24
+
+/* Encrypt one block. in and out may be the same. */
+
+static void
+do_twofish_encrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
+{
+ /* The four 32-bit chunks of the text. */
+ u32 a, b, c, d;
+
+ /* Temporaries used by the round function. */
+ u32 x, y;
+
+ /* Input whitening and packing. */
+ INPACK (0, a, 0);
+ INPACK (1, b, 1);
+ INPACK (2, c, 2);
+ INPACK (3, d, 3);
+
+ /* Encryption Feistel cycles. */
+ ENCCYCLE (0);
+ ENCCYCLE (1);
+ ENCCYCLE (2);
+ ENCCYCLE (3);
+ ENCCYCLE (4);
+ ENCCYCLE (5);
+ ENCCYCLE (6);
+ ENCCYCLE (7);
+
+ /* Output whitening and unpacking. */
+ OUTUNPACK (0, c, 4);
+ OUTUNPACK (1, d, 5);
+ OUTUNPACK (2, a, 6);
+ OUTUNPACK (3, b, 7);
+}
+
+static void
+twofish_encrypt (void *context, byte *out, const byte *in)
+{
+ TWOFISH_context *ctx = context;
+ do_twofish_encrypt (ctx, out, in);
+ _gcry_burn_stack (24+3*sizeof (void*));
+}
+
+
+/* Decrypt one block. in and out may be the same. */
+
+static void
+do_twofish_decrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
+{
+ /* The four 32-bit chunks of the text. */
+ u32 a, b, c, d;
+
+ /* Temporaries used by the round function. */
+ u32 x, y;
+
+ /* Input whitening and packing. */
+ INPACK (0, c, 4);
+ INPACK (1, d, 5);
+ INPACK (2, a, 6);
+ INPACK (3, b, 7);
+
+ /* Encryption Feistel cycles. */
+ DECCYCLE (7);
+ DECCYCLE (6);
+ DECCYCLE (5);
+ DECCYCLE (4);
+ DECCYCLE (3);
+ DECCYCLE (2);
+ DECCYCLE (1);
+ DECCYCLE (0);
+
+ /* Output whitening and unpacking. */
+ OUTUNPACK (0, a, 0);
+ OUTUNPACK (1, b, 1);
+ OUTUNPACK (2, c, 2);
+ OUTUNPACK (3, d, 3);
+}
+
+static void
+twofish_decrypt (void *context, byte *out, const byte *in)
+{
+ TWOFISH_context *ctx = context;
+
+ do_twofish_decrypt (ctx, out, in);
+ _gcry_burn_stack (24+3*sizeof (void*));
+}
+
+
+/* Test a single encryption and decryption with each key size. */
+
+
+/* More complete test program. This does 1000 encryptions and decryptions
+ * with each of 250 128-bit keys and 2000 encryptions and decryptions with
+ * each of 125 256-bit keys, using a feedback scheme similar to a Feistel
+ * cipher, so as to be sure of testing all the table entries pretty
+ * thoroughly. We keep changing the keys so as to get a more meaningful
+ * performance number, since the key setup is non-trivial for Twofish. */
+
+#ifdef TEST
+
+
+int
+main()
+{
+ TWOFISH_context ctx; /* Expanded key. */
+ int i, j; /* Loop counters. */
+
+ const char *encrypt_msg; /* Message to print regarding encryption test;
+ * the printf is done outside the loop to avoid
+ * stuffing up the timing. */
+ clock_t timer; /* For computing elapsed time. */
+
+ /* Test buffer. */
+ byte buffer[4][16] = {
+ {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+ 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF},
+ {0x0F, 0x1E, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, 0x78,
+ 0x87, 0x96, 0xA5, 0xB4, 0xC3, 0xD2 ,0xE1, 0xF0},
+ {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+ 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54 ,0x32, 0x10},
+ {0x01, 0x23, 0x45, 0x67, 0x76, 0x54 ,0x32, 0x10,
+ 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98}
+ };
+
+ /* Expected outputs for the million-operation test */
+ static const byte test_encrypt[4][16] = {
+ {0xC8, 0x23, 0xB8, 0xB7, 0x6B, 0xFE, 0x91, 0x13,
+ 0x2F, 0xA7, 0x5E, 0xE6, 0x94, 0x77, 0x6F, 0x6B},
+ {0x90, 0x36, 0xD8, 0x29, 0xD5, 0x96, 0xC2, 0x8E,
+ 0xE4, 0xFF, 0x76, 0xBC, 0xE5, 0x77, 0x88, 0x27},
+ {0xB8, 0x78, 0x69, 0xAF, 0x42, 0x8B, 0x48, 0x64,
+ 0xF7, 0xE9, 0xF3, 0x9C, 0x42, 0x18, 0x7B, 0x73},
+ {0x7A, 0x88, 0xFB, 0xEB, 0x90, 0xA4, 0xB4, 0xA8,
+ 0x43, 0xA3, 0x1D, 0xF1, 0x26, 0xC4, 0x53, 0x57}
+ };
+ static const byte test_decrypt[4][16] = {
+ {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+ 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF},
+ {0x0F, 0x1E, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, 0x78,
+ 0x87, 0x96, 0xA5, 0xB4, 0xC3, 0xD2 ,0xE1, 0xF0},
+ {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+ 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54 ,0x32, 0x10},
+ {0x01, 0x23, 0x45, 0x67, 0x76, 0x54 ,0x32, 0x10,
+ 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98}
+ };
+
+ /* Start the timer ticking. */
+ timer = clock ();
+
+ /* Encryption test. */
+ for (i = 0; i < 125; i++)
+ {
+ twofish_setkey (&ctx, buffer[0], sizeof (buffer[0]));
+ for (j = 0; j < 1000; j++)
+ twofish_encrypt (&ctx, buffer[2], buffer[2]);
+ twofish_setkey (&ctx, buffer[1], sizeof (buffer[1]));
+ for (j = 0; j < 1000; j++)
+ twofish_encrypt (&ctx, buffer[3], buffer[3]);
+ twofish_setkey (&ctx, buffer[2], sizeof (buffer[2])*2);
+ for (j = 0; j < 1000; j++) {
+ twofish_encrypt (&ctx, buffer[0], buffer[0]);
+ twofish_encrypt (&ctx, buffer[1], buffer[1]);
+ }
+ }
+ encrypt_msg = memcmp (buffer, test_encrypt, sizeof (test_encrypt)) ?
+ "encryption failure!\n" : "encryption OK!\n";
+
+ /* Decryption test. */
+ for (i = 0; i < 125; i++)
+ {
+ twofish_setkey (&ctx, buffer[2], sizeof (buffer[2])*2);
+ for (j = 0; j < 1000; j++) {
+ twofish_decrypt (&ctx, buffer[0], buffer[0]);
+ twofish_decrypt (&ctx, buffer[1], buffer[1]);
+ }
+ twofish_setkey (&ctx, buffer[1], sizeof (buffer[1]));
+ for (j = 0; j < 1000; j++)
+ twofish_decrypt (&ctx, buffer[3], buffer[3]);
+ twofish_setkey (&ctx, buffer[0], sizeof (buffer[0]));
+ for (j = 0; j < 1000; j++)
+ twofish_decrypt (&ctx, buffer[2], buffer[2]);
+ }
+
+ /* Stop the timer, and print results. */
+ timer = clock () - timer;
+ printf (encrypt_msg);
+ printf (memcmp (buffer, test_decrypt, sizeof (test_decrypt)) ?
+ "decryption failure!\n" : "decryption OK!\n");
+ printf ("elapsed time: %.1f s.\n", (float) timer / CLOCKS_PER_SEC);
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_twofish =
+ {
+ "TWOFISH", NULL, NULL, 16, 256, sizeof (TWOFISH_context),
+ twofish_setkey, twofish_encrypt, twofish_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_twofish128 =
+ {
+ "TWOFISH128", NULL, NULL, 16, 128, sizeof (TWOFISH_context),
+ twofish_setkey, twofish_encrypt, twofish_decrypt
+ };
+
+
+GRUB_MOD_INIT(gcry_twofish)
+{
+ grub_cipher_register (&_gcry_cipher_spec_twofish);
+ grub_cipher_register (&_gcry_cipher_spec_twofish128);
+}
+
+GRUB_MOD_FINI(gcry_twofish)
+{
+ grub_cipher_unregister (&_gcry_cipher_spec_twofish);
+ grub_cipher_unregister (&_gcry_cipher_spec_twofish128);
+}
diff --git a/grub-core/lib/libgcrypt-grub/cipher/types.h b/grub-core/lib/libgcrypt-grub/cipher/types.h
new file mode 100644
index 0000000..2ec78b6
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/types.h
@@ -0,0 +1,2 @@
+#include <grub/types.h>
+#include <cipher_wrap.h>
diff --git a/grub-core/lib/libgcrypt-grub/cipher/whirlpool.c b/grub-core/lib/libgcrypt-grub/cipher/whirlpool.c
new file mode 100644
index 0000000..d4ea993
--- /dev/null
+++ b/grub-core/lib/libgcrypt-grub/cipher/whirlpool.c
@@ -0,0 +1,1419 @@
+/* This file was automatically imported with
+ import_gcry.py. Please don't modify it */
+#include <grub/dl.h>
+GRUB_MOD_LICENSE ("GPLv3+");
+/* whirlpool.c - Whirlpool hashing algorithm
+ * Copyright (C) 2005 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ */
+
+/* This is an implementation of the Whirlpool hashing algorithm, which
+ has been developed by Vincent Rijmen and Paulo S. L. M. Barreto;
+ it's homepage is located at:
+ http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html.
+
+ The S-Boxes and the structure of the main transformation function,
+ which implements an optimized version of the algorithm, is taken
+ from the reference implementation available from
+ http://planeta.terra.com.br/informatica/paulobarreto/whirlpool.zip. */
+
+
+#include "types.h"
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+/* Size of a whirlpool block (in bytes). */
+#define BLOCK_SIZE 64
+
+/* Number of rounds. */
+#define R 10
+
+
+
+/* Types. */
+typedef u64 whirlpool_block_t[BLOCK_SIZE / 8];
+
+typedef struct {
+ whirlpool_block_t hash_state;
+ unsigned char buffer[BLOCK_SIZE];
+ size_t count;
+ unsigned char length[32];
+} whirlpool_context_t;
+
+
+
+/* Macros. */
+
+/* Convert the the buffer BUFFER into a block BLOCK, using I as
+ counter. */
+#define buffer_to_block(buffer, block, i) \
+ for (i = 0; i < 8; i++) \
+ (block)[i] = ((u64) (0 \
+ | (((u64) (buffer)[i * 8 + 0]) << 56) \
+ | (((u64) (buffer)[i * 8 + 1]) << 48) \
+ | (((u64) (buffer)[i * 8 + 2]) << 40) \
+ | (((u64) (buffer)[i * 8 + 3]) << 32) \
+ | (((u64) (buffer)[i * 8 + 4]) << 24) \
+ | (((u64) (buffer)[i * 8 + 5]) << 16) \
+ | (((u64) (buffer)[i * 8 + 6]) << 8) \
+ | (((u64) (buffer)[i * 8 + 7]) << 0)));
+
+/* Convert the block BLOCK into a buffer BUFFER, using I as
+ counter. */
+#define block_to_buffer(buffer, block, i) \
+ for (i = 0; i < 8; i++) \
+ { \
+ (buffer)[i * 8 + 0] = (block[i] >> 56) & 0xFF; \
+ (buffer)[i * 8 + 1] = (block[i] >> 48) & 0xFF; \
+ (buffer)[i * 8 + 2] = (block[i] >> 40) & 0xFF; \
+ (buffer)[i * 8 + 3] = (block[i] >> 32) & 0xFF; \
+ (buffer)[i * 8 + 4] = (block[i] >> 24) & 0xFF; \
+ (buffer)[i * 8 + 5] = (block[i] >> 16) & 0xFF; \
+ (buffer)[i * 8 + 6] = (block[i] >> 8) & 0xFF; \
+ (buffer)[i * 8 + 7] = (block[i] >> 0) & 0xFF; \
+ }
+
+/* Copy the block BLOCK_SRC to BLOCK_DST, using I as counter. */
+#define block_copy(block_dst, block_src, i) \
+ for (i = 0; i < 8; i++) \
+ block_dst[i] = block_src[i];
+
+/* XOR the block BLOCK_SRC into BLOCK_DST, using I as counter. */
+#define block_xor(block_dst, block_src, i) \
+ for (i = 0; i < 8; i++) \
+ block_dst[i] ^= block_src[i];
+
+
+
+/* Round constants. */
+static const u64 rc[R] =
+ {
+ U64_C (0x1823c6e887b8014f),
+ U64_C (0x36a6d2f5796f9152),
+ U64_C (0x60bc9b8ea30c7b35),
+ U64_C (0x1de0d7c22e4bfe57),
+ U64_C (0x157737e59ff04ada),
+ U64_C (0x58c9290ab1a06b85),
+ U64_C (0xbd5d10f4cb3e0567),
+ U64_C (0xe427418ba77d95d8),
+ U64_C (0xfbee7c66dd17479e),
+ U64_C (0xca2dbf07ad5a8333),
+ };
+
+
+
+/* Main lookup boxes. */
+static const u64 C0[256] =
+ {
+ U64_C (0x18186018c07830d8), U64_C (0x23238c2305af4626),
+ U64_C (0xc6c63fc67ef991b8), U64_C (0xe8e887e8136fcdfb),
+ U64_C (0x878726874ca113cb), U64_C (0xb8b8dab8a9626d11),
+ U64_C (0x0101040108050209), U64_C (0x4f4f214f426e9e0d),
+ U64_C (0x3636d836adee6c9b), U64_C (0xa6a6a2a6590451ff),
+ U64_C (0xd2d26fd2debdb90c), U64_C (0xf5f5f3f5fb06f70e),
+ U64_C (0x7979f979ef80f296), U64_C (0x6f6fa16f5fcede30),
+ U64_C (0x91917e91fcef3f6d), U64_C (0x52525552aa07a4f8),
+ U64_C (0x60609d6027fdc047), U64_C (0xbcbccabc89766535),
+ U64_C (0x9b9b569baccd2b37), U64_C (0x8e8e028e048c018a),
+ U64_C (0xa3a3b6a371155bd2), U64_C (0x0c0c300c603c186c),
+ U64_C (0x7b7bf17bff8af684), U64_C (0x3535d435b5e16a80),
+ U64_C (0x1d1d741de8693af5), U64_C (0xe0e0a7e05347ddb3),
+ U64_C (0xd7d77bd7f6acb321), U64_C (0xc2c22fc25eed999c),
+ U64_C (0x2e2eb82e6d965c43), U64_C (0x4b4b314b627a9629),
+ U64_C (0xfefedffea321e15d), U64_C (0x575741578216aed5),
+ U64_C (0x15155415a8412abd), U64_C (0x7777c1779fb6eee8),
+ U64_C (0x3737dc37a5eb6e92), U64_C (0xe5e5b3e57b56d79e),
+ U64_C (0x9f9f469f8cd92313), U64_C (0xf0f0e7f0d317fd23),
+ U64_C (0x4a4a354a6a7f9420), U64_C (0xdada4fda9e95a944),
+ U64_C (0x58587d58fa25b0a2), U64_C (0xc9c903c906ca8fcf),
+ U64_C (0x2929a429558d527c), U64_C (0x0a0a280a5022145a),
+ U64_C (0xb1b1feb1e14f7f50), U64_C (0xa0a0baa0691a5dc9),
+ U64_C (0x6b6bb16b7fdad614), U64_C (0x85852e855cab17d9),
+ U64_C (0xbdbdcebd8173673c), U64_C (0x5d5d695dd234ba8f),
+ U64_C (0x1010401080502090), U64_C (0xf4f4f7f4f303f507),
+ U64_C (0xcbcb0bcb16c08bdd), U64_C (0x3e3ef83eedc67cd3),
+ U64_C (0x0505140528110a2d), U64_C (0x676781671fe6ce78),
+ U64_C (0xe4e4b7e47353d597), U64_C (0x27279c2725bb4e02),
+ U64_C (0x4141194132588273), U64_C (0x8b8b168b2c9d0ba7),
+ U64_C (0xa7a7a6a7510153f6), U64_C (0x7d7de97dcf94fab2),
+ U64_C (0x95956e95dcfb3749), U64_C (0xd8d847d88e9fad56),
+ U64_C (0xfbfbcbfb8b30eb70), U64_C (0xeeee9fee2371c1cd),
+ U64_C (0x7c7ced7cc791f8bb), U64_C (0x6666856617e3cc71),
+ U64_C (0xdddd53dda68ea77b), U64_C (0x17175c17b84b2eaf),
+ U64_C (0x4747014702468e45), U64_C (0x9e9e429e84dc211a),
+ U64_C (0xcaca0fca1ec589d4), U64_C (0x2d2db42d75995a58),
+ U64_C (0xbfbfc6bf9179632e), U64_C (0x07071c07381b0e3f),
+ U64_C (0xadad8ead012347ac), U64_C (0x5a5a755aea2fb4b0),
+ U64_C (0x838336836cb51bef), U64_C (0x3333cc3385ff66b6),
+ U64_C (0x636391633ff2c65c), U64_C (0x02020802100a0412),
+ U64_C (0xaaaa92aa39384993), U64_C (0x7171d971afa8e2de),
+ U64_C (0xc8c807c80ecf8dc6), U64_C (0x19196419c87d32d1),
+ U64_C (0x494939497270923b), U64_C (0xd9d943d9869aaf5f),
+ U64_C (0xf2f2eff2c31df931), U64_C (0xe3e3abe34b48dba8),
+ U64_C (0x5b5b715be22ab6b9), U64_C (0x88881a8834920dbc),
+ U64_C (0x9a9a529aa4c8293e), U64_C (0x262698262dbe4c0b),
+ U64_C (0x3232c8328dfa64bf), U64_C (0xb0b0fab0e94a7d59),
+ U64_C (0xe9e983e91b6acff2), U64_C (0x0f0f3c0f78331e77),
+ U64_C (0xd5d573d5e6a6b733), U64_C (0x80803a8074ba1df4),
+ U64_C (0xbebec2be997c6127), U64_C (0xcdcd13cd26de87eb),
+ U64_C (0x3434d034bde46889), U64_C (0x48483d487a759032),
+ U64_C (0xffffdbffab24e354), U64_C (0x7a7af57af78ff48d),
+ U64_C (0x90907a90f4ea3d64), U64_C (0x5f5f615fc23ebe9d),
+ U64_C (0x202080201da0403d), U64_C (0x6868bd6867d5d00f),
+ U64_C (0x1a1a681ad07234ca), U64_C (0xaeae82ae192c41b7),
+ U64_C (0xb4b4eab4c95e757d), U64_C (0x54544d549a19a8ce),
+ U64_C (0x93937693ece53b7f), U64_C (0x222288220daa442f),
+ U64_C (0x64648d6407e9c863), U64_C (0xf1f1e3f1db12ff2a),
+ U64_C (0x7373d173bfa2e6cc), U64_C (0x12124812905a2482),
+ U64_C (0x40401d403a5d807a), U64_C (0x0808200840281048),
+ U64_C (0xc3c32bc356e89b95), U64_C (0xecec97ec337bc5df),
+ U64_C (0xdbdb4bdb9690ab4d), U64_C (0xa1a1bea1611f5fc0),
+ U64_C (0x8d8d0e8d1c830791), U64_C (0x3d3df43df5c97ac8),
+ U64_C (0x97976697ccf1335b), U64_C (0x0000000000000000),
+ U64_C (0xcfcf1bcf36d483f9), U64_C (0x2b2bac2b4587566e),
+ U64_C (0x7676c57697b3ece1), U64_C (0x8282328264b019e6),
+ U64_C (0xd6d67fd6fea9b128), U64_C (0x1b1b6c1bd87736c3),
+ U64_C (0xb5b5eeb5c15b7774), U64_C (0xafaf86af112943be),
+ U64_C (0x6a6ab56a77dfd41d), U64_C (0x50505d50ba0da0ea),
+ U64_C (0x45450945124c8a57), U64_C (0xf3f3ebf3cb18fb38),
+ U64_C (0x3030c0309df060ad), U64_C (0xefef9bef2b74c3c4),
+ U64_C (0x3f3ffc3fe5c37eda), U64_C (0x55554955921caac7),
+ U64_C (0xa2a2b2a2791059db), U64_C (0xeaea8fea0365c9e9),
+ U64_C (0x656589650fecca6a), U64_C (0xbabad2bab9686903),
+ U64_C (0x2f2fbc2f65935e4a), U64_C (0xc0c027c04ee79d8e),
+ U64_C (0xdede5fdebe81a160), U64_C (0x1c1c701ce06c38fc),
+ U64_C (0xfdfdd3fdbb2ee746), U64_C (0x4d4d294d52649a1f),
+ U64_C (0x92927292e4e03976), U64_C (0x7575c9758fbceafa),
+ U64_C (0x06061806301e0c36), U64_C (0x8a8a128a249809ae),
+ U64_C (0xb2b2f2b2f940794b), U64_C (0xe6e6bfe66359d185),
+ U64_C (0x0e0e380e70361c7e), U64_C (0x1f1f7c1ff8633ee7),
+ U64_C (0x6262956237f7c455), U64_C (0xd4d477d4eea3b53a),
+ U64_C (0xa8a89aa829324d81), U64_C (0x96966296c4f43152),
+ U64_C (0xf9f9c3f99b3aef62), U64_C (0xc5c533c566f697a3),
+ U64_C (0x2525942535b14a10), U64_C (0x59597959f220b2ab),
+ U64_C (0x84842a8454ae15d0), U64_C (0x7272d572b7a7e4c5),
+ U64_C (0x3939e439d5dd72ec), U64_C (0x4c4c2d4c5a619816),
+ U64_C (0x5e5e655eca3bbc94), U64_C (0x7878fd78e785f09f),
+ U64_C (0x3838e038ddd870e5), U64_C (0x8c8c0a8c14860598),
+ U64_C (0xd1d163d1c6b2bf17), U64_C (0xa5a5aea5410b57e4),
+ U64_C (0xe2e2afe2434dd9a1), U64_C (0x616199612ff8c24e),
+ U64_C (0xb3b3f6b3f1457b42), U64_C (0x2121842115a54234),
+ U64_C (0x9c9c4a9c94d62508), U64_C (0x1e1e781ef0663cee),
+ U64_C (0x4343114322528661), U64_C (0xc7c73bc776fc93b1),
+ U64_C (0xfcfcd7fcb32be54f), U64_C (0x0404100420140824),
+ U64_C (0x51515951b208a2e3), U64_C (0x99995e99bcc72f25),
+ U64_C (0x6d6da96d4fc4da22), U64_C (0x0d0d340d68391a65),
+ U64_C (0xfafacffa8335e979), U64_C (0xdfdf5bdfb684a369),
+ U64_C (0x7e7ee57ed79bfca9), U64_C (0x242490243db44819),
+ U64_C (0x3b3bec3bc5d776fe), U64_C (0xabab96ab313d4b9a),
+ U64_C (0xcece1fce3ed181f0), U64_C (0x1111441188552299),
+ U64_C (0x8f8f068f0c890383), U64_C (0x4e4e254e4a6b9c04),
+ U64_C (0xb7b7e6b7d1517366), U64_C (0xebeb8beb0b60cbe0),
+ U64_C (0x3c3cf03cfdcc78c1), U64_C (0x81813e817cbf1ffd),
+ U64_C (0x94946a94d4fe3540), U64_C (0xf7f7fbf7eb0cf31c),
+ U64_C (0xb9b9deb9a1676f18), U64_C (0x13134c13985f268b),
+ U64_C (0x2c2cb02c7d9c5851), U64_C (0xd3d36bd3d6b8bb05),
+ U64_C (0xe7e7bbe76b5cd38c), U64_C (0x6e6ea56e57cbdc39),
+ U64_C (0xc4c437c46ef395aa), U64_C (0x03030c03180f061b),
+ U64_C (0x565645568a13acdc), U64_C (0x44440d441a49885e),
+ U64_C (0x7f7fe17fdf9efea0), U64_C (0xa9a99ea921374f88),
+ U64_C (0x2a2aa82a4d825467), U64_C (0xbbbbd6bbb16d6b0a),
+ U64_C (0xc1c123c146e29f87), U64_C (0x53535153a202a6f1),
+ U64_C (0xdcdc57dcae8ba572), U64_C (0x0b0b2c0b58271653),
+ U64_C (0x9d9d4e9d9cd32701), U64_C (0x6c6cad6c47c1d82b),
+ U64_C (0x3131c43195f562a4), U64_C (0x7474cd7487b9e8f3),
+ U64_C (0xf6f6fff6e309f115), U64_C (0x464605460a438c4c),
+ U64_C (0xacac8aac092645a5), U64_C (0x89891e893c970fb5),
+ U64_C (0x14145014a04428b4), U64_C (0xe1e1a3e15b42dfba),
+ U64_C (0x16165816b04e2ca6), U64_C (0x3a3ae83acdd274f7),
+ U64_C (0x6969b9696fd0d206), U64_C (0x09092409482d1241),
+ U64_C (0x7070dd70a7ade0d7), U64_C (0xb6b6e2b6d954716f),
+ U64_C (0xd0d067d0ceb7bd1e), U64_C (0xeded93ed3b7ec7d6),
+ U64_C (0xcccc17cc2edb85e2), U64_C (0x424215422a578468),
+ U64_C (0x98985a98b4c22d2c), U64_C (0xa4a4aaa4490e55ed),
+ U64_C (0x2828a0285d885075), U64_C (0x5c5c6d5cda31b886),
+ U64_C (0xf8f8c7f8933fed6b), U64_C (0x8686228644a411c2),
+ };
+
+static const u64 C1[256] =
+ {
+ U64_C (0xd818186018c07830), U64_C (0x2623238c2305af46),
+ U64_C (0xb8c6c63fc67ef991), U64_C (0xfbe8e887e8136fcd),
+ U64_C (0xcb878726874ca113), U64_C (0x11b8b8dab8a9626d),
+ U64_C (0x0901010401080502), U64_C (0x0d4f4f214f426e9e),
+ U64_C (0x9b3636d836adee6c), U64_C (0xffa6a6a2a6590451),
+ U64_C (0x0cd2d26fd2debdb9), U64_C (0x0ef5f5f3f5fb06f7),
+ U64_C (0x967979f979ef80f2), U64_C (0x306f6fa16f5fcede),
+ U64_C (0x6d91917e91fcef3f), U64_C (0xf852525552aa07a4),
+ U64_C (0x4760609d6027fdc0), U64_C (0x35bcbccabc897665),
+ U64_C (0x379b9b569baccd2b), U64_C (0x8a8e8e028e048c01),
+ U64_C (0xd2a3a3b6a371155b), U64_C (0x6c0c0c300c603c18),
+ U64_C (0x847b7bf17bff8af6), U64_C (0x803535d435b5e16a),
+ U64_C (0xf51d1d741de8693a), U64_C (0xb3e0e0a7e05347dd),
+ U64_C (0x21d7d77bd7f6acb3), U64_C (0x9cc2c22fc25eed99),
+ U64_C (0x432e2eb82e6d965c), U64_C (0x294b4b314b627a96),
+ U64_C (0x5dfefedffea321e1), U64_C (0xd5575741578216ae),
+ U64_C (0xbd15155415a8412a), U64_C (0xe87777c1779fb6ee),
+ U64_C (0x923737dc37a5eb6e), U64_C (0x9ee5e5b3e57b56d7),
+ U64_C (0x139f9f469f8cd923), U64_C (0x23f0f0e7f0d317fd),
+ U64_C (0x204a4a354a6a7f94), U64_C (0x44dada4fda9e95a9),
+ U64_C (0xa258587d58fa25b0), U64_C (0xcfc9c903c906ca8f),
+ U64_C (0x7c2929a429558d52), U64_C (0x5a0a0a280a502214),
+ U64_C (0x50b1b1feb1e14f7f), U64_C (0xc9a0a0baa0691a5d),
+ U64_C (0x146b6bb16b7fdad6), U64_C (0xd985852e855cab17),
+ U64_C (0x3cbdbdcebd817367), U64_C (0x8f5d5d695dd234ba),
+ U64_C (0x9010104010805020), U64_C (0x07f4f4f7f4f303f5),
+ U64_C (0xddcbcb0bcb16c08b), U64_C (0xd33e3ef83eedc67c),
+ U64_C (0x2d0505140528110a), U64_C (0x78676781671fe6ce),
+ U64_C (0x97e4e4b7e47353d5), U64_C (0x0227279c2725bb4e),
+ U64_C (0x7341411941325882), U64_C (0xa78b8b168b2c9d0b),
+ U64_C (0xf6a7a7a6a7510153), U64_C (0xb27d7de97dcf94fa),
+ U64_C (0x4995956e95dcfb37), U64_C (0x56d8d847d88e9fad),
+ U64_C (0x70fbfbcbfb8b30eb), U64_C (0xcdeeee9fee2371c1),
+ U64_C (0xbb7c7ced7cc791f8), U64_C (0x716666856617e3cc),
+ U64_C (0x7bdddd53dda68ea7), U64_C (0xaf17175c17b84b2e),
+ U64_C (0x454747014702468e), U64_C (0x1a9e9e429e84dc21),
+ U64_C (0xd4caca0fca1ec589), U64_C (0x582d2db42d75995a),
+ U64_C (0x2ebfbfc6bf917963), U64_C (0x3f07071c07381b0e),
+ U64_C (0xacadad8ead012347), U64_C (0xb05a5a755aea2fb4),
+ U64_C (0xef838336836cb51b), U64_C (0xb63333cc3385ff66),
+ U64_C (0x5c636391633ff2c6), U64_C (0x1202020802100a04),
+ U64_C (0x93aaaa92aa393849), U64_C (0xde7171d971afa8e2),
+ U64_C (0xc6c8c807c80ecf8d), U64_C (0xd119196419c87d32),
+ U64_C (0x3b49493949727092), U64_C (0x5fd9d943d9869aaf),
+ U64_C (0x31f2f2eff2c31df9), U64_C (0xa8e3e3abe34b48db),
+ U64_C (0xb95b5b715be22ab6), U64_C (0xbc88881a8834920d),
+ U64_C (0x3e9a9a529aa4c829), U64_C (0x0b262698262dbe4c),
+ U64_C (0xbf3232c8328dfa64), U64_C (0x59b0b0fab0e94a7d),
+ U64_C (0xf2e9e983e91b6acf), U64_C (0x770f0f3c0f78331e),
+ U64_C (0x33d5d573d5e6a6b7), U64_C (0xf480803a8074ba1d),
+ U64_C (0x27bebec2be997c61), U64_C (0xebcdcd13cd26de87),
+ U64_C (0x893434d034bde468), U64_C (0x3248483d487a7590),
+ U64_C (0x54ffffdbffab24e3), U64_C (0x8d7a7af57af78ff4),
+ U64_C (0x6490907a90f4ea3d), U64_C (0x9d5f5f615fc23ebe),
+ U64_C (0x3d202080201da040), U64_C (0x0f6868bd6867d5d0),
+ U64_C (0xca1a1a681ad07234), U64_C (0xb7aeae82ae192c41),
+ U64_C (0x7db4b4eab4c95e75), U64_C (0xce54544d549a19a8),
+ U64_C (0x7f93937693ece53b), U64_C (0x2f222288220daa44),
+ U64_C (0x6364648d6407e9c8), U64_C (0x2af1f1e3f1db12ff),
+ U64_C (0xcc7373d173bfa2e6), U64_C (0x8212124812905a24),
+ U64_C (0x7a40401d403a5d80), U64_C (0x4808082008402810),
+ U64_C (0x95c3c32bc356e89b), U64_C (0xdfecec97ec337bc5),
+ U64_C (0x4ddbdb4bdb9690ab), U64_C (0xc0a1a1bea1611f5f),
+ U64_C (0x918d8d0e8d1c8307), U64_C (0xc83d3df43df5c97a),
+ U64_C (0x5b97976697ccf133), U64_C (0x0000000000000000),
+ U64_C (0xf9cfcf1bcf36d483), U64_C (0x6e2b2bac2b458756),
+ U64_C (0xe17676c57697b3ec), U64_C (0xe68282328264b019),
+ U64_C (0x28d6d67fd6fea9b1), U64_C (0xc31b1b6c1bd87736),
+ U64_C (0x74b5b5eeb5c15b77), U64_C (0xbeafaf86af112943),
+ U64_C (0x1d6a6ab56a77dfd4), U64_C (0xea50505d50ba0da0),
+ U64_C (0x5745450945124c8a), U64_C (0x38f3f3ebf3cb18fb),
+ U64_C (0xad3030c0309df060), U64_C (0xc4efef9bef2b74c3),
+ U64_C (0xda3f3ffc3fe5c37e), U64_C (0xc755554955921caa),
+ U64_C (0xdba2a2b2a2791059), U64_C (0xe9eaea8fea0365c9),
+ U64_C (0x6a656589650fecca), U64_C (0x03babad2bab96869),
+ U64_C (0x4a2f2fbc2f65935e), U64_C (0x8ec0c027c04ee79d),
+ U64_C (0x60dede5fdebe81a1), U64_C (0xfc1c1c701ce06c38),
+ U64_C (0x46fdfdd3fdbb2ee7), U64_C (0x1f4d4d294d52649a),
+ U64_C (0x7692927292e4e039), U64_C (0xfa7575c9758fbcea),
+ U64_C (0x3606061806301e0c), U64_C (0xae8a8a128a249809),
+ U64_C (0x4bb2b2f2b2f94079), U64_C (0x85e6e6bfe66359d1),
+ U64_C (0x7e0e0e380e70361c), U64_C (0xe71f1f7c1ff8633e),
+ U64_C (0x556262956237f7c4), U64_C (0x3ad4d477d4eea3b5),
+ U64_C (0x81a8a89aa829324d), U64_C (0x5296966296c4f431),
+ U64_C (0x62f9f9c3f99b3aef), U64_C (0xa3c5c533c566f697),
+ U64_C (0x102525942535b14a), U64_C (0xab59597959f220b2),
+ U64_C (0xd084842a8454ae15), U64_C (0xc57272d572b7a7e4),
+ U64_C (0xec3939e439d5dd72), U64_C (0x164c4c2d4c5a6198),
+ U64_C (0x945e5e655eca3bbc), U64_C (0x9f7878fd78e785f0),
+ U64_C (0xe53838e038ddd870), U64_C (0x988c8c0a8c148605),
+ U64_C (0x17d1d163d1c6b2bf), U64_C (0xe4a5a5aea5410b57),
+ U64_C (0xa1e2e2afe2434dd9), U64_C (0x4e616199612ff8c2),
+ U64_C (0x42b3b3f6b3f1457b), U64_C (0x342121842115a542),
+ U64_C (0x089c9c4a9c94d625), U64_C (0xee1e1e781ef0663c),
+ U64_C (0x6143431143225286), U64_C (0xb1c7c73bc776fc93),
+ U64_C (0x4ffcfcd7fcb32be5), U64_C (0x2404041004201408),
+ U64_C (0xe351515951b208a2), U64_C (0x2599995e99bcc72f),
+ U64_C (0x226d6da96d4fc4da), U64_C (0x650d0d340d68391a),
+ U64_C (0x79fafacffa8335e9), U64_C (0x69dfdf5bdfb684a3),
+ U64_C (0xa97e7ee57ed79bfc), U64_C (0x19242490243db448),
+ U64_C (0xfe3b3bec3bc5d776), U64_C (0x9aabab96ab313d4b),
+ U64_C (0xf0cece1fce3ed181), U64_C (0x9911114411885522),
+ U64_C (0x838f8f068f0c8903), U64_C (0x044e4e254e4a6b9c),
+ U64_C (0x66b7b7e6b7d15173), U64_C (0xe0ebeb8beb0b60cb),
+ U64_C (0xc13c3cf03cfdcc78), U64_C (0xfd81813e817cbf1f),
+ U64_C (0x4094946a94d4fe35), U64_C (0x1cf7f7fbf7eb0cf3),
+ U64_C (0x18b9b9deb9a1676f), U64_C (0x8b13134c13985f26),
+ U64_C (0x512c2cb02c7d9c58), U64_C (0x05d3d36bd3d6b8bb),
+ U64_C (0x8ce7e7bbe76b5cd3), U64_C (0x396e6ea56e57cbdc),
+ U64_C (0xaac4c437c46ef395), U64_C (0x1b03030c03180f06),
+ U64_C (0xdc565645568a13ac), U64_C (0x5e44440d441a4988),
+ U64_C (0xa07f7fe17fdf9efe), U64_C (0x88a9a99ea921374f),
+ U64_C (0x672a2aa82a4d8254), U64_C (0x0abbbbd6bbb16d6b),
+ U64_C (0x87c1c123c146e29f), U64_C (0xf153535153a202a6),
+ U64_C (0x72dcdc57dcae8ba5), U64_C (0x530b0b2c0b582716),
+ U64_C (0x019d9d4e9d9cd327), U64_C (0x2b6c6cad6c47c1d8),
+ U64_C (0xa43131c43195f562), U64_C (0xf37474cd7487b9e8),
+ U64_C (0x15f6f6fff6e309f1), U64_C (0x4c464605460a438c),
+ U64_C (0xa5acac8aac092645), U64_C (0xb589891e893c970f),
+ U64_C (0xb414145014a04428), U64_C (0xbae1e1a3e15b42df),
+ U64_C (0xa616165816b04e2c), U64_C (0xf73a3ae83acdd274),
+ U64_C (0x066969b9696fd0d2), U64_C (0x4109092409482d12),
+ U64_C (0xd77070dd70a7ade0), U64_C (0x6fb6b6e2b6d95471),
+ U64_C (0x1ed0d067d0ceb7bd), U64_C (0xd6eded93ed3b7ec7),
+ U64_C (0xe2cccc17cc2edb85), U64_C (0x68424215422a5784),
+ U64_C (0x2c98985a98b4c22d), U64_C (0xeda4a4aaa4490e55),
+ U64_C (0x752828a0285d8850), U64_C (0x865c5c6d5cda31b8),
+ U64_C (0x6bf8f8c7f8933fed), U64_C (0xc28686228644a411),
+ };
+
+static const u64 C2[256] =
+ {
+ U64_C (0x30d818186018c078), U64_C (0x462623238c2305af),
+ U64_C (0x91b8c6c63fc67ef9), U64_C (0xcdfbe8e887e8136f),
+ U64_C (0x13cb878726874ca1), U64_C (0x6d11b8b8dab8a962),
+ U64_C (0x0209010104010805), U64_C (0x9e0d4f4f214f426e),
+ U64_C (0x6c9b3636d836adee), U64_C (0x51ffa6a6a2a65904),
+ U64_C (0xb90cd2d26fd2debd), U64_C (0xf70ef5f5f3f5fb06),
+ U64_C (0xf2967979f979ef80), U64_C (0xde306f6fa16f5fce),
+ U64_C (0x3f6d91917e91fcef), U64_C (0xa4f852525552aa07),
+ U64_C (0xc04760609d6027fd), U64_C (0x6535bcbccabc8976),
+ U64_C (0x2b379b9b569baccd), U64_C (0x018a8e8e028e048c),
+ U64_C (0x5bd2a3a3b6a37115), U64_C (0x186c0c0c300c603c),
+ U64_C (0xf6847b7bf17bff8a), U64_C (0x6a803535d435b5e1),
+ U64_C (0x3af51d1d741de869), U64_C (0xddb3e0e0a7e05347),
+ U64_C (0xb321d7d77bd7f6ac), U64_C (0x999cc2c22fc25eed),
+ U64_C (0x5c432e2eb82e6d96), U64_C (0x96294b4b314b627a),
+ U64_C (0xe15dfefedffea321), U64_C (0xaed5575741578216),
+ U64_C (0x2abd15155415a841), U64_C (0xeee87777c1779fb6),
+ U64_C (0x6e923737dc37a5eb), U64_C (0xd79ee5e5b3e57b56),
+ U64_C (0x23139f9f469f8cd9), U64_C (0xfd23f0f0e7f0d317),
+ U64_C (0x94204a4a354a6a7f), U64_C (0xa944dada4fda9e95),
+ U64_C (0xb0a258587d58fa25), U64_C (0x8fcfc9c903c906ca),
+ U64_C (0x527c2929a429558d), U64_C (0x145a0a0a280a5022),
+ U64_C (0x7f50b1b1feb1e14f), U64_C (0x5dc9a0a0baa0691a),
+ U64_C (0xd6146b6bb16b7fda), U64_C (0x17d985852e855cab),
+ U64_C (0x673cbdbdcebd8173), U64_C (0xba8f5d5d695dd234),
+ U64_C (0x2090101040108050), U64_C (0xf507f4f4f7f4f303),
+ U64_C (0x8bddcbcb0bcb16c0), U64_C (0x7cd33e3ef83eedc6),
+ U64_C (0x0a2d050514052811), U64_C (0xce78676781671fe6),
+ U64_C (0xd597e4e4b7e47353), U64_C (0x4e0227279c2725bb),
+ U64_C (0x8273414119413258), U64_C (0x0ba78b8b168b2c9d),
+ U64_C (0x53f6a7a7a6a75101), U64_C (0xfab27d7de97dcf94),
+ U64_C (0x374995956e95dcfb), U64_C (0xad56d8d847d88e9f),
+ U64_C (0xeb70fbfbcbfb8b30), U64_C (0xc1cdeeee9fee2371),
+ U64_C (0xf8bb7c7ced7cc791), U64_C (0xcc716666856617e3),
+ U64_C (0xa77bdddd53dda68e), U64_C (0x2eaf17175c17b84b),
+ U64_C (0x8e45474701470246), U64_C (0x211a9e9e429e84dc),
+ U64_C (0x89d4caca0fca1ec5), U64_C (0x5a582d2db42d7599),
+ U64_C (0x632ebfbfc6bf9179), U64_C (0x0e3f07071c07381b),
+ U64_C (0x47acadad8ead0123), U64_C (0xb4b05a5a755aea2f),
+ U64_C (0x1bef838336836cb5), U64_C (0x66b63333cc3385ff),
+ U64_C (0xc65c636391633ff2), U64_C (0x041202020802100a),
+ U64_C (0x4993aaaa92aa3938), U64_C (0xe2de7171d971afa8),
+ U64_C (0x8dc6c8c807c80ecf), U64_C (0x32d119196419c87d),
+ U64_C (0x923b494939497270), U64_C (0xaf5fd9d943d9869a),
+ U64_C (0xf931f2f2eff2c31d), U64_C (0xdba8e3e3abe34b48),
+ U64_C (0xb6b95b5b715be22a), U64_C (0x0dbc88881a883492),
+ U64_C (0x293e9a9a529aa4c8), U64_C (0x4c0b262698262dbe),
+ U64_C (0x64bf3232c8328dfa), U64_C (0x7d59b0b0fab0e94a),
+ U64_C (0xcff2e9e983e91b6a), U64_C (0x1e770f0f3c0f7833),
+ U64_C (0xb733d5d573d5e6a6), U64_C (0x1df480803a8074ba),
+ U64_C (0x6127bebec2be997c), U64_C (0x87ebcdcd13cd26de),
+ U64_C (0x68893434d034bde4), U64_C (0x903248483d487a75),
+ U64_C (0xe354ffffdbffab24), U64_C (0xf48d7a7af57af78f),
+ U64_C (0x3d6490907a90f4ea), U64_C (0xbe9d5f5f615fc23e),
+ U64_C (0x403d202080201da0), U64_C (0xd00f6868bd6867d5),
+ U64_C (0x34ca1a1a681ad072), U64_C (0x41b7aeae82ae192c),
+ U64_C (0x757db4b4eab4c95e), U64_C (0xa8ce54544d549a19),
+ U64_C (0x3b7f93937693ece5), U64_C (0x442f222288220daa),
+ U64_C (0xc86364648d6407e9), U64_C (0xff2af1f1e3f1db12),
+ U64_C (0xe6cc7373d173bfa2), U64_C (0x248212124812905a),
+ U64_C (0x807a40401d403a5d), U64_C (0x1048080820084028),
+ U64_C (0x9b95c3c32bc356e8), U64_C (0xc5dfecec97ec337b),
+ U64_C (0xab4ddbdb4bdb9690), U64_C (0x5fc0a1a1bea1611f),
+ U64_C (0x07918d8d0e8d1c83), U64_C (0x7ac83d3df43df5c9),
+ U64_C (0x335b97976697ccf1), U64_C (0x0000000000000000),
+ U64_C (0x83f9cfcf1bcf36d4), U64_C (0x566e2b2bac2b4587),
+ U64_C (0xece17676c57697b3), U64_C (0x19e68282328264b0),
+ U64_C (0xb128d6d67fd6fea9), U64_C (0x36c31b1b6c1bd877),
+ U64_C (0x7774b5b5eeb5c15b), U64_C (0x43beafaf86af1129),
+ U64_C (0xd41d6a6ab56a77df), U64_C (0xa0ea50505d50ba0d),
+ U64_C (0x8a5745450945124c), U64_C (0xfb38f3f3ebf3cb18),
+ U64_C (0x60ad3030c0309df0), U64_C (0xc3c4efef9bef2b74),
+ U64_C (0x7eda3f3ffc3fe5c3), U64_C (0xaac755554955921c),
+ U64_C (0x59dba2a2b2a27910), U64_C (0xc9e9eaea8fea0365),
+ U64_C (0xca6a656589650fec), U64_C (0x6903babad2bab968),
+ U64_C (0x5e4a2f2fbc2f6593), U64_C (0x9d8ec0c027c04ee7),
+ U64_C (0xa160dede5fdebe81), U64_C (0x38fc1c1c701ce06c),
+ U64_C (0xe746fdfdd3fdbb2e), U64_C (0x9a1f4d4d294d5264),
+ U64_C (0x397692927292e4e0), U64_C (0xeafa7575c9758fbc),
+ U64_C (0x0c3606061806301e), U64_C (0x09ae8a8a128a2498),
+ U64_C (0x794bb2b2f2b2f940), U64_C (0xd185e6e6bfe66359),
+ U64_C (0x1c7e0e0e380e7036), U64_C (0x3ee71f1f7c1ff863),
+ U64_C (0xc4556262956237f7), U64_C (0xb53ad4d477d4eea3),
+ U64_C (0x4d81a8a89aa82932), U64_C (0x315296966296c4f4),
+ U64_C (0xef62f9f9c3f99b3a), U64_C (0x97a3c5c533c566f6),
+ U64_C (0x4a102525942535b1), U64_C (0xb2ab59597959f220),
+ U64_C (0x15d084842a8454ae), U64_C (0xe4c57272d572b7a7),
+ U64_C (0x72ec3939e439d5dd), U64_C (0x98164c4c2d4c5a61),
+ U64_C (0xbc945e5e655eca3b), U64_C (0xf09f7878fd78e785),
+ U64_C (0x70e53838e038ddd8), U64_C (0x05988c8c0a8c1486),
+ U64_C (0xbf17d1d163d1c6b2), U64_C (0x57e4a5a5aea5410b),
+ U64_C (0xd9a1e2e2afe2434d), U64_C (0xc24e616199612ff8),
+ U64_C (0x7b42b3b3f6b3f145), U64_C (0x42342121842115a5),
+ U64_C (0x25089c9c4a9c94d6), U64_C (0x3cee1e1e781ef066),
+ U64_C (0x8661434311432252), U64_C (0x93b1c7c73bc776fc),
+ U64_C (0xe54ffcfcd7fcb32b), U64_C (0x0824040410042014),
+ U64_C (0xa2e351515951b208), U64_C (0x2f2599995e99bcc7),
+ U64_C (0xda226d6da96d4fc4), U64_C (0x1a650d0d340d6839),
+ U64_C (0xe979fafacffa8335), U64_C (0xa369dfdf5bdfb684),
+ U64_C (0xfca97e7ee57ed79b), U64_C (0x4819242490243db4),
+ U64_C (0x76fe3b3bec3bc5d7), U64_C (0x4b9aabab96ab313d),
+ U64_C (0x81f0cece1fce3ed1), U64_C (0x2299111144118855),
+ U64_C (0x03838f8f068f0c89), U64_C (0x9c044e4e254e4a6b),
+ U64_C (0x7366b7b7e6b7d151), U64_C (0xcbe0ebeb8beb0b60),
+ U64_C (0x78c13c3cf03cfdcc), U64_C (0x1ffd81813e817cbf),
+ U64_C (0x354094946a94d4fe), U64_C (0xf31cf7f7fbf7eb0c),
+ U64_C (0x6f18b9b9deb9a167), U64_C (0x268b13134c13985f),
+ U64_C (0x58512c2cb02c7d9c), U64_C (0xbb05d3d36bd3d6b8),
+ U64_C (0xd38ce7e7bbe76b5c), U64_C (0xdc396e6ea56e57cb),
+ U64_C (0x95aac4c437c46ef3), U64_C (0x061b03030c03180f),
+ U64_C (0xacdc565645568a13), U64_C (0x885e44440d441a49),
+ U64_C (0xfea07f7fe17fdf9e), U64_C (0x4f88a9a99ea92137),
+ U64_C (0x54672a2aa82a4d82), U64_C (0x6b0abbbbd6bbb16d),
+ U64_C (0x9f87c1c123c146e2), U64_C (0xa6f153535153a202),
+ U64_C (0xa572dcdc57dcae8b), U64_C (0x16530b0b2c0b5827),
+ U64_C (0x27019d9d4e9d9cd3), U64_C (0xd82b6c6cad6c47c1),
+ U64_C (0x62a43131c43195f5), U64_C (0xe8f37474cd7487b9),
+ U64_C (0xf115f6f6fff6e309), U64_C (0x8c4c464605460a43),
+ U64_C (0x45a5acac8aac0926), U64_C (0x0fb589891e893c97),
+ U64_C (0x28b414145014a044), U64_C (0xdfbae1e1a3e15b42),
+ U64_C (0x2ca616165816b04e), U64_C (0x74f73a3ae83acdd2),
+ U64_C (0xd2066969b9696fd0), U64_C (0x124109092409482d),
+ U64_C (0xe0d77070dd70a7ad), U64_C (0x716fb6b6e2b6d954),
+ U64_C (0xbd1ed0d067d0ceb7), U64_C (0xc7d6eded93ed3b7e),
+ U64_C (0x85e2cccc17cc2edb), U64_C (0x8468424215422a57),
+ U64_C (0x2d2c98985a98b4c2), U64_C (0x55eda4a4aaa4490e),
+ U64_C (0x50752828a0285d88), U64_C (0xb8865c5c6d5cda31),
+ U64_C (0xed6bf8f8c7f8933f), U64_C (0x11c28686228644a4),
+ };
+
+static const u64 C3[256] =
+ {
+ U64_C (0x7830d818186018c0), U64_C (0xaf462623238c2305),
+ U64_C (0xf991b8c6c63fc67e), U64_C (0x6fcdfbe8e887e813),
+ U64_C (0xa113cb878726874c), U64_C (0x626d11b8b8dab8a9),
+ U64_C (0x0502090101040108), U64_C (0x6e9e0d4f4f214f42),
+ U64_C (0xee6c9b3636d836ad), U64_C (0x0451ffa6a6a2a659),
+ U64_C (0xbdb90cd2d26fd2de), U64_C (0x06f70ef5f5f3f5fb),
+ U64_C (0x80f2967979f979ef), U64_C (0xcede306f6fa16f5f),
+ U64_C (0xef3f6d91917e91fc), U64_C (0x07a4f852525552aa),
+ U64_C (0xfdc04760609d6027), U64_C (0x766535bcbccabc89),
+ U64_C (0xcd2b379b9b569bac), U64_C (0x8c018a8e8e028e04),
+ U64_C (0x155bd2a3a3b6a371), U64_C (0x3c186c0c0c300c60),
+ U64_C (0x8af6847b7bf17bff), U64_C (0xe16a803535d435b5),
+ U64_C (0x693af51d1d741de8), U64_C (0x47ddb3e0e0a7e053),
+ U64_C (0xacb321d7d77bd7f6), U64_C (0xed999cc2c22fc25e),
+ U64_C (0x965c432e2eb82e6d), U64_C (0x7a96294b4b314b62),
+ U64_C (0x21e15dfefedffea3), U64_C (0x16aed55757415782),
+ U64_C (0x412abd15155415a8), U64_C (0xb6eee87777c1779f),
+ U64_C (0xeb6e923737dc37a5), U64_C (0x56d79ee5e5b3e57b),
+ U64_C (0xd923139f9f469f8c), U64_C (0x17fd23f0f0e7f0d3),
+ U64_C (0x7f94204a4a354a6a), U64_C (0x95a944dada4fda9e),
+ U64_C (0x25b0a258587d58fa), U64_C (0xca8fcfc9c903c906),
+ U64_C (0x8d527c2929a42955), U64_C (0x22145a0a0a280a50),
+ U64_C (0x4f7f50b1b1feb1e1), U64_C (0x1a5dc9a0a0baa069),
+ U64_C (0xdad6146b6bb16b7f), U64_C (0xab17d985852e855c),
+ U64_C (0x73673cbdbdcebd81), U64_C (0x34ba8f5d5d695dd2),
+ U64_C (0x5020901010401080), U64_C (0x03f507f4f4f7f4f3),
+ U64_C (0xc08bddcbcb0bcb16), U64_C (0xc67cd33e3ef83eed),
+ U64_C (0x110a2d0505140528), U64_C (0xe6ce78676781671f),
+ U64_C (0x53d597e4e4b7e473), U64_C (0xbb4e0227279c2725),
+ U64_C (0x5882734141194132), U64_C (0x9d0ba78b8b168b2c),
+ U64_C (0x0153f6a7a7a6a751), U64_C (0x94fab27d7de97dcf),
+ U64_C (0xfb374995956e95dc), U64_C (0x9fad56d8d847d88e),
+ U64_C (0x30eb70fbfbcbfb8b), U64_C (0x71c1cdeeee9fee23),
+ U64_C (0x91f8bb7c7ced7cc7), U64_C (0xe3cc716666856617),
+ U64_C (0x8ea77bdddd53dda6), U64_C (0x4b2eaf17175c17b8),
+ U64_C (0x468e454747014702), U64_C (0xdc211a9e9e429e84),
+ U64_C (0xc589d4caca0fca1e), U64_C (0x995a582d2db42d75),
+ U64_C (0x79632ebfbfc6bf91), U64_C (0x1b0e3f07071c0738),
+ U64_C (0x2347acadad8ead01), U64_C (0x2fb4b05a5a755aea),
+ U64_C (0xb51bef838336836c), U64_C (0xff66b63333cc3385),
+ U64_C (0xf2c65c636391633f), U64_C (0x0a04120202080210),
+ U64_C (0x384993aaaa92aa39), U64_C (0xa8e2de7171d971af),
+ U64_C (0xcf8dc6c8c807c80e), U64_C (0x7d32d119196419c8),
+ U64_C (0x70923b4949394972), U64_C (0x9aaf5fd9d943d986),
+ U64_C (0x1df931f2f2eff2c3), U64_C (0x48dba8e3e3abe34b),
+ U64_C (0x2ab6b95b5b715be2), U64_C (0x920dbc88881a8834),
+ U64_C (0xc8293e9a9a529aa4), U64_C (0xbe4c0b262698262d),
+ U64_C (0xfa64bf3232c8328d), U64_C (0x4a7d59b0b0fab0e9),
+ U64_C (0x6acff2e9e983e91b), U64_C (0x331e770f0f3c0f78),
+ U64_C (0xa6b733d5d573d5e6), U64_C (0xba1df480803a8074),
+ U64_C (0x7c6127bebec2be99), U64_C (0xde87ebcdcd13cd26),
+ U64_C (0xe468893434d034bd), U64_C (0x75903248483d487a),
+ U64_C (0x24e354ffffdbffab), U64_C (0x8ff48d7a7af57af7),
+ U64_C (0xea3d6490907a90f4), U64_C (0x3ebe9d5f5f615fc2),
+ U64_C (0xa0403d202080201d), U64_C (0xd5d00f6868bd6867),
+ U64_C (0x7234ca1a1a681ad0), U64_C (0x2c41b7aeae82ae19),
+ U64_C (0x5e757db4b4eab4c9), U64_C (0x19a8ce54544d549a),
+ U64_C (0xe53b7f93937693ec), U64_C (0xaa442f222288220d),
+ U64_C (0xe9c86364648d6407), U64_C (0x12ff2af1f1e3f1db),
+ U64_C (0xa2e6cc7373d173bf), U64_C (0x5a24821212481290),
+ U64_C (0x5d807a40401d403a), U64_C (0x2810480808200840),
+ U64_C (0xe89b95c3c32bc356), U64_C (0x7bc5dfecec97ec33),
+ U64_C (0x90ab4ddbdb4bdb96), U64_C (0x1f5fc0a1a1bea161),
+ U64_C (0x8307918d8d0e8d1c), U64_C (0xc97ac83d3df43df5),
+ U64_C (0xf1335b97976697cc), U64_C (0x0000000000000000),
+ U64_C (0xd483f9cfcf1bcf36), U64_C (0x87566e2b2bac2b45),
+ U64_C (0xb3ece17676c57697), U64_C (0xb019e68282328264),
+ U64_C (0xa9b128d6d67fd6fe), U64_C (0x7736c31b1b6c1bd8),
+ U64_C (0x5b7774b5b5eeb5c1), U64_C (0x2943beafaf86af11),
+ U64_C (0xdfd41d6a6ab56a77), U64_C (0x0da0ea50505d50ba),
+ U64_C (0x4c8a574545094512), U64_C (0x18fb38f3f3ebf3cb),
+ U64_C (0xf060ad3030c0309d), U64_C (0x74c3c4efef9bef2b),
+ U64_C (0xc37eda3f3ffc3fe5), U64_C (0x1caac75555495592),
+ U64_C (0x1059dba2a2b2a279), U64_C (0x65c9e9eaea8fea03),
+ U64_C (0xecca6a656589650f), U64_C (0x686903babad2bab9),
+ U64_C (0x935e4a2f2fbc2f65), U64_C (0xe79d8ec0c027c04e),
+ U64_C (0x81a160dede5fdebe), U64_C (0x6c38fc1c1c701ce0),
+ U64_C (0x2ee746fdfdd3fdbb), U64_C (0x649a1f4d4d294d52),
+ U64_C (0xe0397692927292e4), U64_C (0xbceafa7575c9758f),
+ U64_C (0x1e0c360606180630), U64_C (0x9809ae8a8a128a24),
+ U64_C (0x40794bb2b2f2b2f9), U64_C (0x59d185e6e6bfe663),
+ U64_C (0x361c7e0e0e380e70), U64_C (0x633ee71f1f7c1ff8),
+ U64_C (0xf7c4556262956237), U64_C (0xa3b53ad4d477d4ee),
+ U64_C (0x324d81a8a89aa829), U64_C (0xf4315296966296c4),
+ U64_C (0x3aef62f9f9c3f99b), U64_C (0xf697a3c5c533c566),
+ U64_C (0xb14a102525942535), U64_C (0x20b2ab59597959f2),
+ U64_C (0xae15d084842a8454), U64_C (0xa7e4c57272d572b7),
+ U64_C (0xdd72ec3939e439d5), U64_C (0x6198164c4c2d4c5a),
+ U64_C (0x3bbc945e5e655eca), U64_C (0x85f09f7878fd78e7),
+ U64_C (0xd870e53838e038dd), U64_C (0x8605988c8c0a8c14),
+ U64_C (0xb2bf17d1d163d1c6), U64_C (0x0b57e4a5a5aea541),
+ U64_C (0x4dd9a1e2e2afe243), U64_C (0xf8c24e616199612f),
+ U64_C (0x457b42b3b3f6b3f1), U64_C (0xa542342121842115),
+ U64_C (0xd625089c9c4a9c94), U64_C (0x663cee1e1e781ef0),
+ U64_C (0x5286614343114322), U64_C (0xfc93b1c7c73bc776),
+ U64_C (0x2be54ffcfcd7fcb3), U64_C (0x1408240404100420),
+ U64_C (0x08a2e351515951b2), U64_C (0xc72f2599995e99bc),
+ U64_C (0xc4da226d6da96d4f), U64_C (0x391a650d0d340d68),
+ U64_C (0x35e979fafacffa83), U64_C (0x84a369dfdf5bdfb6),
+ U64_C (0x9bfca97e7ee57ed7), U64_C (0xb44819242490243d),
+ U64_C (0xd776fe3b3bec3bc5), U64_C (0x3d4b9aabab96ab31),
+ U64_C (0xd181f0cece1fce3e), U64_C (0x5522991111441188),
+ U64_C (0x8903838f8f068f0c), U64_C (0x6b9c044e4e254e4a),
+ U64_C (0x517366b7b7e6b7d1), U64_C (0x60cbe0ebeb8beb0b),
+ U64_C (0xcc78c13c3cf03cfd), U64_C (0xbf1ffd81813e817c),
+ U64_C (0xfe354094946a94d4), U64_C (0x0cf31cf7f7fbf7eb),
+ U64_C (0x676f18b9b9deb9a1), U64_C (0x5f268b13134c1398),
+ U64_C (0x9c58512c2cb02c7d), U64_C (0xb8bb05d3d36bd3d6),
+ U64_C (0x5cd38ce7e7bbe76b), U64_C (0xcbdc396e6ea56e57),
+ U64_C (0xf395aac4c437c46e), U64_C (0x0f061b03030c0318),
+ U64_C (0x13acdc565645568a), U64_C (0x49885e44440d441a),
+ U64_C (0x9efea07f7fe17fdf), U64_C (0x374f88a9a99ea921),
+ U64_C (0x8254672a2aa82a4d), U64_C (0x6d6b0abbbbd6bbb1),
+ U64_C (0xe29f87c1c123c146), U64_C (0x02a6f153535153a2),
+ U64_C (0x8ba572dcdc57dcae), U64_C (0x2716530b0b2c0b58),
+ U64_C (0xd327019d9d4e9d9c), U64_C (0xc1d82b6c6cad6c47),
+ U64_C (0xf562a43131c43195), U64_C (0xb9e8f37474cd7487),
+ U64_C (0x09f115f6f6fff6e3), U64_C (0x438c4c464605460a),
+ U64_C (0x2645a5acac8aac09), U64_C (0x970fb589891e893c),
+ U64_C (0x4428b414145014a0), U64_C (0x42dfbae1e1a3e15b),
+ U64_C (0x4e2ca616165816b0), U64_C (0xd274f73a3ae83acd),
+ U64_C (0xd0d2066969b9696f), U64_C (0x2d12410909240948),
+ U64_C (0xade0d77070dd70a7), U64_C (0x54716fb6b6e2b6d9),
+ U64_C (0xb7bd1ed0d067d0ce), U64_C (0x7ec7d6eded93ed3b),
+ U64_C (0xdb85e2cccc17cc2e), U64_C (0x578468424215422a),
+ U64_C (0xc22d2c98985a98b4), U64_C (0x0e55eda4a4aaa449),
+ U64_C (0x8850752828a0285d), U64_C (0x31b8865c5c6d5cda),
+ U64_C (0x3fed6bf8f8c7f893), U64_C (0xa411c28686228644),
+ };
+
+static const u64 C4[256] =
+ {
+ U64_C (0xc07830d818186018), U64_C (0x05af462623238c23),
+ U64_C (0x7ef991b8c6c63fc6), U64_C (0x136fcdfbe8e887e8),
+ U64_C (0x4ca113cb87872687), U64_C (0xa9626d11b8b8dab8),
+ U64_C (0x0805020901010401), U64_C (0x426e9e0d4f4f214f),
+ U64_C (0xadee6c9b3636d836), U64_C (0x590451ffa6a6a2a6),
+ U64_C (0xdebdb90cd2d26fd2), U64_C (0xfb06f70ef5f5f3f5),
+ U64_C (0xef80f2967979f979), U64_C (0x5fcede306f6fa16f),
+ U64_C (0xfcef3f6d91917e91), U64_C (0xaa07a4f852525552),
+ U64_C (0x27fdc04760609d60), U64_C (0x89766535bcbccabc),
+ U64_C (0xaccd2b379b9b569b), U64_C (0x048c018a8e8e028e),
+ U64_C (0x71155bd2a3a3b6a3), U64_C (0x603c186c0c0c300c),
+ U64_C (0xff8af6847b7bf17b), U64_C (0xb5e16a803535d435),
+ U64_C (0xe8693af51d1d741d), U64_C (0x5347ddb3e0e0a7e0),
+ U64_C (0xf6acb321d7d77bd7), U64_C (0x5eed999cc2c22fc2),
+ U64_C (0x6d965c432e2eb82e), U64_C (0x627a96294b4b314b),
+ U64_C (0xa321e15dfefedffe), U64_C (0x8216aed557574157),
+ U64_C (0xa8412abd15155415), U64_C (0x9fb6eee87777c177),
+ U64_C (0xa5eb6e923737dc37), U64_C (0x7b56d79ee5e5b3e5),
+ U64_C (0x8cd923139f9f469f), U64_C (0xd317fd23f0f0e7f0),
+ U64_C (0x6a7f94204a4a354a), U64_C (0x9e95a944dada4fda),
+ U64_C (0xfa25b0a258587d58), U64_C (0x06ca8fcfc9c903c9),
+ U64_C (0x558d527c2929a429), U64_C (0x5022145a0a0a280a),
+ U64_C (0xe14f7f50b1b1feb1), U64_C (0x691a5dc9a0a0baa0),
+ U64_C (0x7fdad6146b6bb16b), U64_C (0x5cab17d985852e85),
+ U64_C (0x8173673cbdbdcebd), U64_C (0xd234ba8f5d5d695d),
+ U64_C (0x8050209010104010), U64_C (0xf303f507f4f4f7f4),
+ U64_C (0x16c08bddcbcb0bcb), U64_C (0xedc67cd33e3ef83e),
+ U64_C (0x28110a2d05051405), U64_C (0x1fe6ce7867678167),
+ U64_C (0x7353d597e4e4b7e4), U64_C (0x25bb4e0227279c27),
+ U64_C (0x3258827341411941), U64_C (0x2c9d0ba78b8b168b),
+ U64_C (0x510153f6a7a7a6a7), U64_C (0xcf94fab27d7de97d),
+ U64_C (0xdcfb374995956e95), U64_C (0x8e9fad56d8d847d8),
+ U64_C (0x8b30eb70fbfbcbfb), U64_C (0x2371c1cdeeee9fee),
+ U64_C (0xc791f8bb7c7ced7c), U64_C (0x17e3cc7166668566),
+ U64_C (0xa68ea77bdddd53dd), U64_C (0xb84b2eaf17175c17),
+ U64_C (0x02468e4547470147), U64_C (0x84dc211a9e9e429e),
+ U64_C (0x1ec589d4caca0fca), U64_C (0x75995a582d2db42d),
+ U64_C (0x9179632ebfbfc6bf), U64_C (0x381b0e3f07071c07),
+ U64_C (0x012347acadad8ead), U64_C (0xea2fb4b05a5a755a),
+ U64_C (0x6cb51bef83833683), U64_C (0x85ff66b63333cc33),
+ U64_C (0x3ff2c65c63639163), U64_C (0x100a041202020802),
+ U64_C (0x39384993aaaa92aa), U64_C (0xafa8e2de7171d971),
+ U64_C (0x0ecf8dc6c8c807c8), U64_C (0xc87d32d119196419),
+ U64_C (0x7270923b49493949), U64_C (0x869aaf5fd9d943d9),
+ U64_C (0xc31df931f2f2eff2), U64_C (0x4b48dba8e3e3abe3),
+ U64_C (0xe22ab6b95b5b715b), U64_C (0x34920dbc88881a88),
+ U64_C (0xa4c8293e9a9a529a), U64_C (0x2dbe4c0b26269826),
+ U64_C (0x8dfa64bf3232c832), U64_C (0xe94a7d59b0b0fab0),
+ U64_C (0x1b6acff2e9e983e9), U64_C (0x78331e770f0f3c0f),
+ U64_C (0xe6a6b733d5d573d5), U64_C (0x74ba1df480803a80),
+ U64_C (0x997c6127bebec2be), U64_C (0x26de87ebcdcd13cd),
+ U64_C (0xbde468893434d034), U64_C (0x7a75903248483d48),
+ U64_C (0xab24e354ffffdbff), U64_C (0xf78ff48d7a7af57a),
+ U64_C (0xf4ea3d6490907a90), U64_C (0xc23ebe9d5f5f615f),
+ U64_C (0x1da0403d20208020), U64_C (0x67d5d00f6868bd68),
+ U64_C (0xd07234ca1a1a681a), U64_C (0x192c41b7aeae82ae),
+ U64_C (0xc95e757db4b4eab4), U64_C (0x9a19a8ce54544d54),
+ U64_C (0xece53b7f93937693), U64_C (0x0daa442f22228822),
+ U64_C (0x07e9c86364648d64), U64_C (0xdb12ff2af1f1e3f1),
+ U64_C (0xbfa2e6cc7373d173), U64_C (0x905a248212124812),
+ U64_C (0x3a5d807a40401d40), U64_C (0x4028104808082008),
+ U64_C (0x56e89b95c3c32bc3), U64_C (0x337bc5dfecec97ec),
+ U64_C (0x9690ab4ddbdb4bdb), U64_C (0x611f5fc0a1a1bea1),
+ U64_C (0x1c8307918d8d0e8d), U64_C (0xf5c97ac83d3df43d),
+ U64_C (0xccf1335b97976697), U64_C (0x0000000000000000),
+ U64_C (0x36d483f9cfcf1bcf), U64_C (0x4587566e2b2bac2b),
+ U64_C (0x97b3ece17676c576), U64_C (0x64b019e682823282),
+ U64_C (0xfea9b128d6d67fd6), U64_C (0xd87736c31b1b6c1b),
+ U64_C (0xc15b7774b5b5eeb5), U64_C (0x112943beafaf86af),
+ U64_C (0x77dfd41d6a6ab56a), U64_C (0xba0da0ea50505d50),
+ U64_C (0x124c8a5745450945), U64_C (0xcb18fb38f3f3ebf3),
+ U64_C (0x9df060ad3030c030), U64_C (0x2b74c3c4efef9bef),
+ U64_C (0xe5c37eda3f3ffc3f), U64_C (0x921caac755554955),
+ U64_C (0x791059dba2a2b2a2), U64_C (0x0365c9e9eaea8fea),
+ U64_C (0x0fecca6a65658965), U64_C (0xb9686903babad2ba),
+ U64_C (0x65935e4a2f2fbc2f), U64_C (0x4ee79d8ec0c027c0),
+ U64_C (0xbe81a160dede5fde), U64_C (0xe06c38fc1c1c701c),
+ U64_C (0xbb2ee746fdfdd3fd), U64_C (0x52649a1f4d4d294d),
+ U64_C (0xe4e0397692927292), U64_C (0x8fbceafa7575c975),
+ U64_C (0x301e0c3606061806), U64_C (0x249809ae8a8a128a),
+ U64_C (0xf940794bb2b2f2b2), U64_C (0x6359d185e6e6bfe6),
+ U64_C (0x70361c7e0e0e380e), U64_C (0xf8633ee71f1f7c1f),
+ U64_C (0x37f7c45562629562), U64_C (0xeea3b53ad4d477d4),
+ U64_C (0x29324d81a8a89aa8), U64_C (0xc4f4315296966296),
+ U64_C (0x9b3aef62f9f9c3f9), U64_C (0x66f697a3c5c533c5),
+ U64_C (0x35b14a1025259425), U64_C (0xf220b2ab59597959),
+ U64_C (0x54ae15d084842a84), U64_C (0xb7a7e4c57272d572),
+ U64_C (0xd5dd72ec3939e439), U64_C (0x5a6198164c4c2d4c),
+ U64_C (0xca3bbc945e5e655e), U64_C (0xe785f09f7878fd78),
+ U64_C (0xddd870e53838e038), U64_C (0x148605988c8c0a8c),
+ U64_C (0xc6b2bf17d1d163d1), U64_C (0x410b57e4a5a5aea5),
+ U64_C (0x434dd9a1e2e2afe2), U64_C (0x2ff8c24e61619961),
+ U64_C (0xf1457b42b3b3f6b3), U64_C (0x15a5423421218421),
+ U64_C (0x94d625089c9c4a9c), U64_C (0xf0663cee1e1e781e),
+ U64_C (0x2252866143431143), U64_C (0x76fc93b1c7c73bc7),
+ U64_C (0xb32be54ffcfcd7fc), U64_C (0x2014082404041004),
+ U64_C (0xb208a2e351515951), U64_C (0xbcc72f2599995e99),
+ U64_C (0x4fc4da226d6da96d), U64_C (0x68391a650d0d340d),
+ U64_C (0x8335e979fafacffa), U64_C (0xb684a369dfdf5bdf),
+ U64_C (0xd79bfca97e7ee57e), U64_C (0x3db4481924249024),
+ U64_C (0xc5d776fe3b3bec3b), U64_C (0x313d4b9aabab96ab),
+ U64_C (0x3ed181f0cece1fce), U64_C (0x8855229911114411),
+ U64_C (0x0c8903838f8f068f), U64_C (0x4a6b9c044e4e254e),
+ U64_C (0xd1517366b7b7e6b7), U64_C (0x0b60cbe0ebeb8beb),
+ U64_C (0xfdcc78c13c3cf03c), U64_C (0x7cbf1ffd81813e81),
+ U64_C (0xd4fe354094946a94), U64_C (0xeb0cf31cf7f7fbf7),
+ U64_C (0xa1676f18b9b9deb9), U64_C (0x985f268b13134c13),
+ U64_C (0x7d9c58512c2cb02c), U64_C (0xd6b8bb05d3d36bd3),
+ U64_C (0x6b5cd38ce7e7bbe7), U64_C (0x57cbdc396e6ea56e),
+ U64_C (0x6ef395aac4c437c4), U64_C (0x180f061b03030c03),
+ U64_C (0x8a13acdc56564556), U64_C (0x1a49885e44440d44),
+ U64_C (0xdf9efea07f7fe17f), U64_C (0x21374f88a9a99ea9),
+ U64_C (0x4d8254672a2aa82a), U64_C (0xb16d6b0abbbbd6bb),
+ U64_C (0x46e29f87c1c123c1), U64_C (0xa202a6f153535153),
+ U64_C (0xae8ba572dcdc57dc), U64_C (0x582716530b0b2c0b),
+ U64_C (0x9cd327019d9d4e9d), U64_C (0x47c1d82b6c6cad6c),
+ U64_C (0x95f562a43131c431), U64_C (0x87b9e8f37474cd74),
+ U64_C (0xe309f115f6f6fff6), U64_C (0x0a438c4c46460546),
+ U64_C (0x092645a5acac8aac), U64_C (0x3c970fb589891e89),
+ U64_C (0xa04428b414145014), U64_C (0x5b42dfbae1e1a3e1),
+ U64_C (0xb04e2ca616165816), U64_C (0xcdd274f73a3ae83a),
+ U64_C (0x6fd0d2066969b969), U64_C (0x482d124109092409),
+ U64_C (0xa7ade0d77070dd70), U64_C (0xd954716fb6b6e2b6),
+ U64_C (0xceb7bd1ed0d067d0), U64_C (0x3b7ec7d6eded93ed),
+ U64_C (0x2edb85e2cccc17cc), U64_C (0x2a57846842421542),
+ U64_C (0xb4c22d2c98985a98), U64_C (0x490e55eda4a4aaa4),
+ U64_C (0x5d8850752828a028), U64_C (0xda31b8865c5c6d5c),
+ U64_C (0x933fed6bf8f8c7f8), U64_C (0x44a411c286862286),
+ };
+
+static const u64 C5[256] =
+ {
+ U64_C (0x18c07830d8181860), U64_C (0x2305af462623238c),
+ U64_C (0xc67ef991b8c6c63f), U64_C (0xe8136fcdfbe8e887),
+ U64_C (0x874ca113cb878726), U64_C (0xb8a9626d11b8b8da),
+ U64_C (0x0108050209010104), U64_C (0x4f426e9e0d4f4f21),
+ U64_C (0x36adee6c9b3636d8), U64_C (0xa6590451ffa6a6a2),
+ U64_C (0xd2debdb90cd2d26f), U64_C (0xf5fb06f70ef5f5f3),
+ U64_C (0x79ef80f2967979f9), U64_C (0x6f5fcede306f6fa1),
+ U64_C (0x91fcef3f6d91917e), U64_C (0x52aa07a4f8525255),
+ U64_C (0x6027fdc04760609d), U64_C (0xbc89766535bcbcca),
+ U64_C (0x9baccd2b379b9b56), U64_C (0x8e048c018a8e8e02),
+ U64_C (0xa371155bd2a3a3b6), U64_C (0x0c603c186c0c0c30),
+ U64_C (0x7bff8af6847b7bf1), U64_C (0x35b5e16a803535d4),
+ U64_C (0x1de8693af51d1d74), U64_C (0xe05347ddb3e0e0a7),
+ U64_C (0xd7f6acb321d7d77b), U64_C (0xc25eed999cc2c22f),
+ U64_C (0x2e6d965c432e2eb8), U64_C (0x4b627a96294b4b31),
+ U64_C (0xfea321e15dfefedf), U64_C (0x578216aed5575741),
+ U64_C (0x15a8412abd151554), U64_C (0x779fb6eee87777c1),
+ U64_C (0x37a5eb6e923737dc), U64_C (0xe57b56d79ee5e5b3),
+ U64_C (0x9f8cd923139f9f46), U64_C (0xf0d317fd23f0f0e7),
+ U64_C (0x4a6a7f94204a4a35), U64_C (0xda9e95a944dada4f),
+ U64_C (0x58fa25b0a258587d), U64_C (0xc906ca8fcfc9c903),
+ U64_C (0x29558d527c2929a4), U64_C (0x0a5022145a0a0a28),
+ U64_C (0xb1e14f7f50b1b1fe), U64_C (0xa0691a5dc9a0a0ba),
+ U64_C (0x6b7fdad6146b6bb1), U64_C (0x855cab17d985852e),
+ U64_C (0xbd8173673cbdbdce), U64_C (0x5dd234ba8f5d5d69),
+ U64_C (0x1080502090101040), U64_C (0xf4f303f507f4f4f7),
+ U64_C (0xcb16c08bddcbcb0b), U64_C (0x3eedc67cd33e3ef8),
+ U64_C (0x0528110a2d050514), U64_C (0x671fe6ce78676781),
+ U64_C (0xe47353d597e4e4b7), U64_C (0x2725bb4e0227279c),
+ U64_C (0x4132588273414119), U64_C (0x8b2c9d0ba78b8b16),
+ U64_C (0xa7510153f6a7a7a6), U64_C (0x7dcf94fab27d7de9),
+ U64_C (0x95dcfb374995956e), U64_C (0xd88e9fad56d8d847),
+ U64_C (0xfb8b30eb70fbfbcb), U64_C (0xee2371c1cdeeee9f),
+ U64_C (0x7cc791f8bb7c7ced), U64_C (0x6617e3cc71666685),
+ U64_C (0xdda68ea77bdddd53), U64_C (0x17b84b2eaf17175c),
+ U64_C (0x4702468e45474701), U64_C (0x9e84dc211a9e9e42),
+ U64_C (0xca1ec589d4caca0f), U64_C (0x2d75995a582d2db4),
+ U64_C (0xbf9179632ebfbfc6), U64_C (0x07381b0e3f07071c),
+ U64_C (0xad012347acadad8e), U64_C (0x5aea2fb4b05a5a75),
+ U64_C (0x836cb51bef838336), U64_C (0x3385ff66b63333cc),
+ U64_C (0x633ff2c65c636391), U64_C (0x02100a0412020208),
+ U64_C (0xaa39384993aaaa92), U64_C (0x71afa8e2de7171d9),
+ U64_C (0xc80ecf8dc6c8c807), U64_C (0x19c87d32d1191964),
+ U64_C (0x497270923b494939), U64_C (0xd9869aaf5fd9d943),
+ U64_C (0xf2c31df931f2f2ef), U64_C (0xe34b48dba8e3e3ab),
+ U64_C (0x5be22ab6b95b5b71), U64_C (0x8834920dbc88881a),
+ U64_C (0x9aa4c8293e9a9a52), U64_C (0x262dbe4c0b262698),
+ U64_C (0x328dfa64bf3232c8), U64_C (0xb0e94a7d59b0b0fa),
+ U64_C (0xe91b6acff2e9e983), U64_C (0x0f78331e770f0f3c),
+ U64_C (0xd5e6a6b733d5d573), U64_C (0x8074ba1df480803a),
+ U64_C (0xbe997c6127bebec2), U64_C (0xcd26de87ebcdcd13),
+ U64_C (0x34bde468893434d0), U64_C (0x487a75903248483d),
+ U64_C (0xffab24e354ffffdb), U64_C (0x7af78ff48d7a7af5),
+ U64_C (0x90f4ea3d6490907a), U64_C (0x5fc23ebe9d5f5f61),
+ U64_C (0x201da0403d202080), U64_C (0x6867d5d00f6868bd),
+ U64_C (0x1ad07234ca1a1a68), U64_C (0xae192c41b7aeae82),
+ U64_C (0xb4c95e757db4b4ea), U64_C (0x549a19a8ce54544d),
+ U64_C (0x93ece53b7f939376), U64_C (0x220daa442f222288),
+ U64_C (0x6407e9c86364648d), U64_C (0xf1db12ff2af1f1e3),
+ U64_C (0x73bfa2e6cc7373d1), U64_C (0x12905a2482121248),
+ U64_C (0x403a5d807a40401d), U64_C (0x0840281048080820),
+ U64_C (0xc356e89b95c3c32b), U64_C (0xec337bc5dfecec97),
+ U64_C (0xdb9690ab4ddbdb4b), U64_C (0xa1611f5fc0a1a1be),
+ U64_C (0x8d1c8307918d8d0e), U64_C (0x3df5c97ac83d3df4),
+ U64_C (0x97ccf1335b979766), U64_C (0x0000000000000000),
+ U64_C (0xcf36d483f9cfcf1b), U64_C (0x2b4587566e2b2bac),
+ U64_C (0x7697b3ece17676c5), U64_C (0x8264b019e6828232),
+ U64_C (0xd6fea9b128d6d67f), U64_C (0x1bd87736c31b1b6c),
+ U64_C (0xb5c15b7774b5b5ee), U64_C (0xaf112943beafaf86),
+ U64_C (0x6a77dfd41d6a6ab5), U64_C (0x50ba0da0ea50505d),
+ U64_C (0x45124c8a57454509), U64_C (0xf3cb18fb38f3f3eb),
+ U64_C (0x309df060ad3030c0), U64_C (0xef2b74c3c4efef9b),
+ U64_C (0x3fe5c37eda3f3ffc), U64_C (0x55921caac7555549),
+ U64_C (0xa2791059dba2a2b2), U64_C (0xea0365c9e9eaea8f),
+ U64_C (0x650fecca6a656589), U64_C (0xbab9686903babad2),
+ U64_C (0x2f65935e4a2f2fbc), U64_C (0xc04ee79d8ec0c027),
+ U64_C (0xdebe81a160dede5f), U64_C (0x1ce06c38fc1c1c70),
+ U64_C (0xfdbb2ee746fdfdd3), U64_C (0x4d52649a1f4d4d29),
+ U64_C (0x92e4e03976929272), U64_C (0x758fbceafa7575c9),
+ U64_C (0x06301e0c36060618), U64_C (0x8a249809ae8a8a12),
+ U64_C (0xb2f940794bb2b2f2), U64_C (0xe66359d185e6e6bf),
+ U64_C (0x0e70361c7e0e0e38), U64_C (0x1ff8633ee71f1f7c),
+ U64_C (0x6237f7c455626295), U64_C (0xd4eea3b53ad4d477),
+ U64_C (0xa829324d81a8a89a), U64_C (0x96c4f43152969662),
+ U64_C (0xf99b3aef62f9f9c3), U64_C (0xc566f697a3c5c533),
+ U64_C (0x2535b14a10252594), U64_C (0x59f220b2ab595979),
+ U64_C (0x8454ae15d084842a), U64_C (0x72b7a7e4c57272d5),
+ U64_C (0x39d5dd72ec3939e4), U64_C (0x4c5a6198164c4c2d),
+ U64_C (0x5eca3bbc945e5e65), U64_C (0x78e785f09f7878fd),
+ U64_C (0x38ddd870e53838e0), U64_C (0x8c148605988c8c0a),
+ U64_C (0xd1c6b2bf17d1d163), U64_C (0xa5410b57e4a5a5ae),
+ U64_C (0xe2434dd9a1e2e2af), U64_C (0x612ff8c24e616199),
+ U64_C (0xb3f1457b42b3b3f6), U64_C (0x2115a54234212184),
+ U64_C (0x9c94d625089c9c4a), U64_C (0x1ef0663cee1e1e78),
+ U64_C (0x4322528661434311), U64_C (0xc776fc93b1c7c73b),
+ U64_C (0xfcb32be54ffcfcd7), U64_C (0x0420140824040410),
+ U64_C (0x51b208a2e3515159), U64_C (0x99bcc72f2599995e),
+ U64_C (0x6d4fc4da226d6da9), U64_C (0x0d68391a650d0d34),
+ U64_C (0xfa8335e979fafacf), U64_C (0xdfb684a369dfdf5b),
+ U64_C (0x7ed79bfca97e7ee5), U64_C (0x243db44819242490),
+ U64_C (0x3bc5d776fe3b3bec), U64_C (0xab313d4b9aabab96),
+ U64_C (0xce3ed181f0cece1f), U64_C (0x1188552299111144),
+ U64_C (0x8f0c8903838f8f06), U64_C (0x4e4a6b9c044e4e25),
+ U64_C (0xb7d1517366b7b7e6), U64_C (0xeb0b60cbe0ebeb8b),
+ U64_C (0x3cfdcc78c13c3cf0), U64_C (0x817cbf1ffd81813e),
+ U64_C (0x94d4fe354094946a), U64_C (0xf7eb0cf31cf7f7fb),
+ U64_C (0xb9a1676f18b9b9de), U64_C (0x13985f268b13134c),
+ U64_C (0x2c7d9c58512c2cb0), U64_C (0xd3d6b8bb05d3d36b),
+ U64_C (0xe76b5cd38ce7e7bb), U64_C (0x6e57cbdc396e6ea5),
+ U64_C (0xc46ef395aac4c437), U64_C (0x03180f061b03030c),
+ U64_C (0x568a13acdc565645), U64_C (0x441a49885e44440d),
+ U64_C (0x7fdf9efea07f7fe1), U64_C (0xa921374f88a9a99e),
+ U64_C (0x2a4d8254672a2aa8), U64_C (0xbbb16d6b0abbbbd6),
+ U64_C (0xc146e29f87c1c123), U64_C (0x53a202a6f1535351),
+ U64_C (0xdcae8ba572dcdc57), U64_C (0x0b582716530b0b2c),
+ U64_C (0x9d9cd327019d9d4e), U64_C (0x6c47c1d82b6c6cad),
+ U64_C (0x3195f562a43131c4), U64_C (0x7487b9e8f37474cd),
+ U64_C (0xf6e309f115f6f6ff), U64_C (0x460a438c4c464605),
+ U64_C (0xac092645a5acac8a), U64_C (0x893c970fb589891e),
+ U64_C (0x14a04428b4141450), U64_C (0xe15b42dfbae1e1a3),
+ U64_C (0x16b04e2ca6161658), U64_C (0x3acdd274f73a3ae8),
+ U64_C (0x696fd0d2066969b9), U64_C (0x09482d1241090924),
+ U64_C (0x70a7ade0d77070dd), U64_C (0xb6d954716fb6b6e2),
+ U64_C (0xd0ceb7bd1ed0d067), U64_C (0xed3b7ec7d6eded93),
+ U64_C (0xcc2edb85e2cccc17), U64_C (0x422a578468424215),
+ U64_C (0x98b4c22d2c98985a), U64_C (0xa4490e55eda4a4aa),
+ U64_C (0x285d8850752828a0), U64_C (0x5cda31b8865c5c6d),
+ U64_C (0xf8933fed6bf8f8c7), U64_C (0x8644a411c2868622),
+ };
+
+static const u64 C6[256] =
+ {
+ U64_C (0x6018c07830d81818), U64_C (0x8c2305af46262323),
+ U64_C (0x3fc67ef991b8c6c6), U64_C (0x87e8136fcdfbe8e8),
+ U64_C (0x26874ca113cb8787), U64_C (0xdab8a9626d11b8b8),
+ U64_C (0x0401080502090101), U64_C (0x214f426e9e0d4f4f),
+ U64_C (0xd836adee6c9b3636), U64_C (0xa2a6590451ffa6a6),
+ U64_C (0x6fd2debdb90cd2d2), U64_C (0xf3f5fb06f70ef5f5),
+ U64_C (0xf979ef80f2967979), U64_C (0xa16f5fcede306f6f),
+ U64_C (0x7e91fcef3f6d9191), U64_C (0x5552aa07a4f85252),
+ U64_C (0x9d6027fdc0476060), U64_C (0xcabc89766535bcbc),
+ U64_C (0x569baccd2b379b9b), U64_C (0x028e048c018a8e8e),
+ U64_C (0xb6a371155bd2a3a3), U64_C (0x300c603c186c0c0c),
+ U64_C (0xf17bff8af6847b7b), U64_C (0xd435b5e16a803535),
+ U64_C (0x741de8693af51d1d), U64_C (0xa7e05347ddb3e0e0),
+ U64_C (0x7bd7f6acb321d7d7), U64_C (0x2fc25eed999cc2c2),
+ U64_C (0xb82e6d965c432e2e), U64_C (0x314b627a96294b4b),
+ U64_C (0xdffea321e15dfefe), U64_C (0x41578216aed55757),
+ U64_C (0x5415a8412abd1515), U64_C (0xc1779fb6eee87777),
+ U64_C (0xdc37a5eb6e923737), U64_C (0xb3e57b56d79ee5e5),
+ U64_C (0x469f8cd923139f9f), U64_C (0xe7f0d317fd23f0f0),
+ U64_C (0x354a6a7f94204a4a), U64_C (0x4fda9e95a944dada),
+ U64_C (0x7d58fa25b0a25858), U64_C (0x03c906ca8fcfc9c9),
+ U64_C (0xa429558d527c2929), U64_C (0x280a5022145a0a0a),
+ U64_C (0xfeb1e14f7f50b1b1), U64_C (0xbaa0691a5dc9a0a0),
+ U64_C (0xb16b7fdad6146b6b), U64_C (0x2e855cab17d98585),
+ U64_C (0xcebd8173673cbdbd), U64_C (0x695dd234ba8f5d5d),
+ U64_C (0x4010805020901010), U64_C (0xf7f4f303f507f4f4),
+ U64_C (0x0bcb16c08bddcbcb), U64_C (0xf83eedc67cd33e3e),
+ U64_C (0x140528110a2d0505), U64_C (0x81671fe6ce786767),
+ U64_C (0xb7e47353d597e4e4), U64_C (0x9c2725bb4e022727),
+ U64_C (0x1941325882734141), U64_C (0x168b2c9d0ba78b8b),
+ U64_C (0xa6a7510153f6a7a7), U64_C (0xe97dcf94fab27d7d),
+ U64_C (0x6e95dcfb37499595), U64_C (0x47d88e9fad56d8d8),
+ U64_C (0xcbfb8b30eb70fbfb), U64_C (0x9fee2371c1cdeeee),
+ U64_C (0xed7cc791f8bb7c7c), U64_C (0x856617e3cc716666),
+ U64_C (0x53dda68ea77bdddd), U64_C (0x5c17b84b2eaf1717),
+ U64_C (0x014702468e454747), U64_C (0x429e84dc211a9e9e),
+ U64_C (0x0fca1ec589d4caca), U64_C (0xb42d75995a582d2d),
+ U64_C (0xc6bf9179632ebfbf), U64_C (0x1c07381b0e3f0707),
+ U64_C (0x8ead012347acadad), U64_C (0x755aea2fb4b05a5a),
+ U64_C (0x36836cb51bef8383), U64_C (0xcc3385ff66b63333),
+ U64_C (0x91633ff2c65c6363), U64_C (0x0802100a04120202),
+ U64_C (0x92aa39384993aaaa), U64_C (0xd971afa8e2de7171),
+ U64_C (0x07c80ecf8dc6c8c8), U64_C (0x6419c87d32d11919),
+ U64_C (0x39497270923b4949), U64_C (0x43d9869aaf5fd9d9),
+ U64_C (0xeff2c31df931f2f2), U64_C (0xabe34b48dba8e3e3),
+ U64_C (0x715be22ab6b95b5b), U64_C (0x1a8834920dbc8888),
+ U64_C (0x529aa4c8293e9a9a), U64_C (0x98262dbe4c0b2626),
+ U64_C (0xc8328dfa64bf3232), U64_C (0xfab0e94a7d59b0b0),
+ U64_C (0x83e91b6acff2e9e9), U64_C (0x3c0f78331e770f0f),
+ U64_C (0x73d5e6a6b733d5d5), U64_C (0x3a8074ba1df48080),
+ U64_C (0xc2be997c6127bebe), U64_C (0x13cd26de87ebcdcd),
+ U64_C (0xd034bde468893434), U64_C (0x3d487a7590324848),
+ U64_C (0xdbffab24e354ffff), U64_C (0xf57af78ff48d7a7a),
+ U64_C (0x7a90f4ea3d649090), U64_C (0x615fc23ebe9d5f5f),
+ U64_C (0x80201da0403d2020), U64_C (0xbd6867d5d00f6868),
+ U64_C (0x681ad07234ca1a1a), U64_C (0x82ae192c41b7aeae),
+ U64_C (0xeab4c95e757db4b4), U64_C (0x4d549a19a8ce5454),
+ U64_C (0x7693ece53b7f9393), U64_C (0x88220daa442f2222),
+ U64_C (0x8d6407e9c8636464), U64_C (0xe3f1db12ff2af1f1),
+ U64_C (0xd173bfa2e6cc7373), U64_C (0x4812905a24821212),
+ U64_C (0x1d403a5d807a4040), U64_C (0x2008402810480808),
+ U64_C (0x2bc356e89b95c3c3), U64_C (0x97ec337bc5dfecec),
+ U64_C (0x4bdb9690ab4ddbdb), U64_C (0xbea1611f5fc0a1a1),
+ U64_C (0x0e8d1c8307918d8d), U64_C (0xf43df5c97ac83d3d),
+ U64_C (0x6697ccf1335b9797), U64_C (0x0000000000000000),
+ U64_C (0x1bcf36d483f9cfcf), U64_C (0xac2b4587566e2b2b),
+ U64_C (0xc57697b3ece17676), U64_C (0x328264b019e68282),
+ U64_C (0x7fd6fea9b128d6d6), U64_C (0x6c1bd87736c31b1b),
+ U64_C (0xeeb5c15b7774b5b5), U64_C (0x86af112943beafaf),
+ U64_C (0xb56a77dfd41d6a6a), U64_C (0x5d50ba0da0ea5050),
+ U64_C (0x0945124c8a574545), U64_C (0xebf3cb18fb38f3f3),
+ U64_C (0xc0309df060ad3030), U64_C (0x9bef2b74c3c4efef),
+ U64_C (0xfc3fe5c37eda3f3f), U64_C (0x4955921caac75555),
+ U64_C (0xb2a2791059dba2a2), U64_C (0x8fea0365c9e9eaea),
+ U64_C (0x89650fecca6a6565), U64_C (0xd2bab9686903baba),
+ U64_C (0xbc2f65935e4a2f2f), U64_C (0x27c04ee79d8ec0c0),
+ U64_C (0x5fdebe81a160dede), U64_C (0x701ce06c38fc1c1c),
+ U64_C (0xd3fdbb2ee746fdfd), U64_C (0x294d52649a1f4d4d),
+ U64_C (0x7292e4e039769292), U64_C (0xc9758fbceafa7575),
+ U64_C (0x1806301e0c360606), U64_C (0x128a249809ae8a8a),
+ U64_C (0xf2b2f940794bb2b2), U64_C (0xbfe66359d185e6e6),
+ U64_C (0x380e70361c7e0e0e), U64_C (0x7c1ff8633ee71f1f),
+ U64_C (0x956237f7c4556262), U64_C (0x77d4eea3b53ad4d4),
+ U64_C (0x9aa829324d81a8a8), U64_C (0x6296c4f431529696),
+ U64_C (0xc3f99b3aef62f9f9), U64_C (0x33c566f697a3c5c5),
+ U64_C (0x942535b14a102525), U64_C (0x7959f220b2ab5959),
+ U64_C (0x2a8454ae15d08484), U64_C (0xd572b7a7e4c57272),
+ U64_C (0xe439d5dd72ec3939), U64_C (0x2d4c5a6198164c4c),
+ U64_C (0x655eca3bbc945e5e), U64_C (0xfd78e785f09f7878),
+ U64_C (0xe038ddd870e53838), U64_C (0x0a8c148605988c8c),
+ U64_C (0x63d1c6b2bf17d1d1), U64_C (0xaea5410b57e4a5a5),
+ U64_C (0xafe2434dd9a1e2e2), U64_C (0x99612ff8c24e6161),
+ U64_C (0xf6b3f1457b42b3b3), U64_C (0x842115a542342121),
+ U64_C (0x4a9c94d625089c9c), U64_C (0x781ef0663cee1e1e),
+ U64_C (0x1143225286614343), U64_C (0x3bc776fc93b1c7c7),
+ U64_C (0xd7fcb32be54ffcfc), U64_C (0x1004201408240404),
+ U64_C (0x5951b208a2e35151), U64_C (0x5e99bcc72f259999),
+ U64_C (0xa96d4fc4da226d6d), U64_C (0x340d68391a650d0d),
+ U64_C (0xcffa8335e979fafa), U64_C (0x5bdfb684a369dfdf),
+ U64_C (0xe57ed79bfca97e7e), U64_C (0x90243db448192424),
+ U64_C (0xec3bc5d776fe3b3b), U64_C (0x96ab313d4b9aabab),
+ U64_C (0x1fce3ed181f0cece), U64_C (0x4411885522991111),
+ U64_C (0x068f0c8903838f8f), U64_C (0x254e4a6b9c044e4e),
+ U64_C (0xe6b7d1517366b7b7), U64_C (0x8beb0b60cbe0ebeb),
+ U64_C (0xf03cfdcc78c13c3c), U64_C (0x3e817cbf1ffd8181),
+ U64_C (0x6a94d4fe35409494), U64_C (0xfbf7eb0cf31cf7f7),
+ U64_C (0xdeb9a1676f18b9b9), U64_C (0x4c13985f268b1313),
+ U64_C (0xb02c7d9c58512c2c), U64_C (0x6bd3d6b8bb05d3d3),
+ U64_C (0xbbe76b5cd38ce7e7), U64_C (0xa56e57cbdc396e6e),
+ U64_C (0x37c46ef395aac4c4), U64_C (0x0c03180f061b0303),
+ U64_C (0x45568a13acdc5656), U64_C (0x0d441a49885e4444),
+ U64_C (0xe17fdf9efea07f7f), U64_C (0x9ea921374f88a9a9),
+ U64_C (0xa82a4d8254672a2a), U64_C (0xd6bbb16d6b0abbbb),
+ U64_C (0x23c146e29f87c1c1), U64_C (0x5153a202a6f15353),
+ U64_C (0x57dcae8ba572dcdc), U64_C (0x2c0b582716530b0b),
+ U64_C (0x4e9d9cd327019d9d), U64_C (0xad6c47c1d82b6c6c),
+ U64_C (0xc43195f562a43131), U64_C (0xcd7487b9e8f37474),
+ U64_C (0xfff6e309f115f6f6), U64_C (0x05460a438c4c4646),
+ U64_C (0x8aac092645a5acac), U64_C (0x1e893c970fb58989),
+ U64_C (0x5014a04428b41414), U64_C (0xa3e15b42dfbae1e1),
+ U64_C (0x5816b04e2ca61616), U64_C (0xe83acdd274f73a3a),
+ U64_C (0xb9696fd0d2066969), U64_C (0x2409482d12410909),
+ U64_C (0xdd70a7ade0d77070), U64_C (0xe2b6d954716fb6b6),
+ U64_C (0x67d0ceb7bd1ed0d0), U64_C (0x93ed3b7ec7d6eded),
+ U64_C (0x17cc2edb85e2cccc), U64_C (0x15422a5784684242),
+ U64_C (0x5a98b4c22d2c9898), U64_C (0xaaa4490e55eda4a4),
+ U64_C (0xa0285d8850752828), U64_C (0x6d5cda31b8865c5c),
+ U64_C (0xc7f8933fed6bf8f8), U64_C (0x228644a411c28686),
+ };
+
+static const u64 C7[256] =
+ {
+ U64_C (0x186018c07830d818), U64_C (0x238c2305af462623),
+ U64_C (0xc63fc67ef991b8c6), U64_C (0xe887e8136fcdfbe8),
+ U64_C (0x8726874ca113cb87), U64_C (0xb8dab8a9626d11b8),
+ U64_C (0x0104010805020901), U64_C (0x4f214f426e9e0d4f),
+ U64_C (0x36d836adee6c9b36), U64_C (0xa6a2a6590451ffa6),
+ U64_C (0xd26fd2debdb90cd2), U64_C (0xf5f3f5fb06f70ef5),
+ U64_C (0x79f979ef80f29679), U64_C (0x6fa16f5fcede306f),
+ U64_C (0x917e91fcef3f6d91), U64_C (0x525552aa07a4f852),
+ U64_C (0x609d6027fdc04760), U64_C (0xbccabc89766535bc),
+ U64_C (0x9b569baccd2b379b), U64_C (0x8e028e048c018a8e),
+ U64_C (0xa3b6a371155bd2a3), U64_C (0x0c300c603c186c0c),
+ U64_C (0x7bf17bff8af6847b), U64_C (0x35d435b5e16a8035),
+ U64_C (0x1d741de8693af51d), U64_C (0xe0a7e05347ddb3e0),
+ U64_C (0xd77bd7f6acb321d7), U64_C (0xc22fc25eed999cc2),
+ U64_C (0x2eb82e6d965c432e), U64_C (0x4b314b627a96294b),
+ U64_C (0xfedffea321e15dfe), U64_C (0x5741578216aed557),
+ U64_C (0x155415a8412abd15), U64_C (0x77c1779fb6eee877),
+ U64_C (0x37dc37a5eb6e9237), U64_C (0xe5b3e57b56d79ee5),
+ U64_C (0x9f469f8cd923139f), U64_C (0xf0e7f0d317fd23f0),
+ U64_C (0x4a354a6a7f94204a), U64_C (0xda4fda9e95a944da),
+ U64_C (0x587d58fa25b0a258), U64_C (0xc903c906ca8fcfc9),
+ U64_C (0x29a429558d527c29), U64_C (0x0a280a5022145a0a),
+ U64_C (0xb1feb1e14f7f50b1), U64_C (0xa0baa0691a5dc9a0),
+ U64_C (0x6bb16b7fdad6146b), U64_C (0x852e855cab17d985),
+ U64_C (0xbdcebd8173673cbd), U64_C (0x5d695dd234ba8f5d),
+ U64_C (0x1040108050209010), U64_C (0xf4f7f4f303f507f4),
+ U64_C (0xcb0bcb16c08bddcb), U64_C (0x3ef83eedc67cd33e),
+ U64_C (0x05140528110a2d05), U64_C (0x6781671fe6ce7867),
+ U64_C (0xe4b7e47353d597e4), U64_C (0x279c2725bb4e0227),
+ U64_C (0x4119413258827341), U64_C (0x8b168b2c9d0ba78b),
+ U64_C (0xa7a6a7510153f6a7), U64_C (0x7de97dcf94fab27d),
+ U64_C (0x956e95dcfb374995), U64_C (0xd847d88e9fad56d8),
+ U64_C (0xfbcbfb8b30eb70fb), U64_C (0xee9fee2371c1cdee),
+ U64_C (0x7ced7cc791f8bb7c), U64_C (0x66856617e3cc7166),
+ U64_C (0xdd53dda68ea77bdd), U64_C (0x175c17b84b2eaf17),
+ U64_C (0x47014702468e4547), U64_C (0x9e429e84dc211a9e),
+ U64_C (0xca0fca1ec589d4ca), U64_C (0x2db42d75995a582d),
+ U64_C (0xbfc6bf9179632ebf), U64_C (0x071c07381b0e3f07),
+ U64_C (0xad8ead012347acad), U64_C (0x5a755aea2fb4b05a),
+ U64_C (0x8336836cb51bef83), U64_C (0x33cc3385ff66b633),
+ U64_C (0x6391633ff2c65c63), U64_C (0x020802100a041202),
+ U64_C (0xaa92aa39384993aa), U64_C (0x71d971afa8e2de71),
+ U64_C (0xc807c80ecf8dc6c8), U64_C (0x196419c87d32d119),
+ U64_C (0x4939497270923b49), U64_C (0xd943d9869aaf5fd9),
+ U64_C (0xf2eff2c31df931f2), U64_C (0xe3abe34b48dba8e3),
+ U64_C (0x5b715be22ab6b95b), U64_C (0x881a8834920dbc88),
+ U64_C (0x9a529aa4c8293e9a), U64_C (0x2698262dbe4c0b26),
+ U64_C (0x32c8328dfa64bf32), U64_C (0xb0fab0e94a7d59b0),
+ U64_C (0xe983e91b6acff2e9), U64_C (0x0f3c0f78331e770f),
+ U64_C (0xd573d5e6a6b733d5), U64_C (0x803a8074ba1df480),
+ U64_C (0xbec2be997c6127be), U64_C (0xcd13cd26de87ebcd),
+ U64_C (0x34d034bde4688934), U64_C (0x483d487a75903248),
+ U64_C (0xffdbffab24e354ff), U64_C (0x7af57af78ff48d7a),
+ U64_C (0x907a90f4ea3d6490), U64_C (0x5f615fc23ebe9d5f),
+ U64_C (0x2080201da0403d20), U64_C (0x68bd6867d5d00f68),
+ U64_C (0x1a681ad07234ca1a), U64_C (0xae82ae192c41b7ae),
+ U64_C (0xb4eab4c95e757db4), U64_C (0x544d549a19a8ce54),
+ U64_C (0x937693ece53b7f93), U64_C (0x2288220daa442f22),
+ U64_C (0x648d6407e9c86364), U64_C (0xf1e3f1db12ff2af1),
+ U64_C (0x73d173bfa2e6cc73), U64_C (0x124812905a248212),
+ U64_C (0x401d403a5d807a40), U64_C (0x0820084028104808),
+ U64_C (0xc32bc356e89b95c3), U64_C (0xec97ec337bc5dfec),
+ U64_C (0xdb4bdb9690ab4ddb), U64_C (0xa1bea1611f5fc0a1),
+ U64_C (0x8d0e8d1c8307918d), U64_C (0x3df43df5c97ac83d),
+ U64_C (0x976697ccf1335b97), U64_C (0x0000000000000000),
+ U64_C (0xcf1bcf36d483f9cf), U64_C (0x2bac2b4587566e2b),
+ U64_C (0x76c57697b3ece176), U64_C (0x82328264b019e682),
+ U64_C (0xd67fd6fea9b128d6), U64_C (0x1b6c1bd87736c31b),
+ U64_C (0xb5eeb5c15b7774b5), U64_C (0xaf86af112943beaf),
+ U64_C (0x6ab56a77dfd41d6a), U64_C (0x505d50ba0da0ea50),
+ U64_C (0x450945124c8a5745), U64_C (0xf3ebf3cb18fb38f3),
+ U64_C (0x30c0309df060ad30), U64_C (0xef9bef2b74c3c4ef),
+ U64_C (0x3ffc3fe5c37eda3f), U64_C (0x554955921caac755),
+ U64_C (0xa2b2a2791059dba2), U64_C (0xea8fea0365c9e9ea),
+ U64_C (0x6589650fecca6a65), U64_C (0xbad2bab9686903ba),
+ U64_C (0x2fbc2f65935e4a2f), U64_C (0xc027c04ee79d8ec0),
+ U64_C (0xde5fdebe81a160de), U64_C (0x1c701ce06c38fc1c),
+ U64_C (0xfdd3fdbb2ee746fd), U64_C (0x4d294d52649a1f4d),
+ U64_C (0x927292e4e0397692), U64_C (0x75c9758fbceafa75),
+ U64_C (0x061806301e0c3606), U64_C (0x8a128a249809ae8a),
+ U64_C (0xb2f2b2f940794bb2), U64_C (0xe6bfe66359d185e6),
+ U64_C (0x0e380e70361c7e0e), U64_C (0x1f7c1ff8633ee71f),
+ U64_C (0x62956237f7c45562), U64_C (0xd477d4eea3b53ad4),
+ U64_C (0xa89aa829324d81a8), U64_C (0x966296c4f4315296),
+ U64_C (0xf9c3f99b3aef62f9), U64_C (0xc533c566f697a3c5),
+ U64_C (0x25942535b14a1025), U64_C (0x597959f220b2ab59),
+ U64_C (0x842a8454ae15d084), U64_C (0x72d572b7a7e4c572),
+ U64_C (0x39e439d5dd72ec39), U64_C (0x4c2d4c5a6198164c),
+ U64_C (0x5e655eca3bbc945e), U64_C (0x78fd78e785f09f78),
+ U64_C (0x38e038ddd870e538), U64_C (0x8c0a8c148605988c),
+ U64_C (0xd163d1c6b2bf17d1), U64_C (0xa5aea5410b57e4a5),
+ U64_C (0xe2afe2434dd9a1e2), U64_C (0x6199612ff8c24e61),
+ U64_C (0xb3f6b3f1457b42b3), U64_C (0x21842115a5423421),
+ U64_C (0x9c4a9c94d625089c), U64_C (0x1e781ef0663cee1e),
+ U64_C (0x4311432252866143), U64_C (0xc73bc776fc93b1c7),
+ U64_C (0xfcd7fcb32be54ffc), U64_C (0x0410042014082404),
+ U64_C (0x515951b208a2e351), U64_C (0x995e99bcc72f2599),
+ U64_C (0x6da96d4fc4da226d), U64_C (0x0d340d68391a650d),
+ U64_C (0xfacffa8335e979fa), U64_C (0xdf5bdfb684a369df),
+ U64_C (0x7ee57ed79bfca97e), U64_C (0x2490243db4481924),
+ U64_C (0x3bec3bc5d776fe3b), U64_C (0xab96ab313d4b9aab),
+ U64_C (0xce1fce3ed181f0ce), U64_C (0x1144118855229911),
+ U64_C (0x8f068f0c8903838f), U64_C (0x4e254e4a6b9c044e),
+ U64_C (0xb7e6b7d1517366b7), U64_C (0xeb8beb0b60cbe0eb),
+ U64_C (0x3cf03cfdcc78c13c), U64_C (0x813e817cbf1ffd81),
+ U64_C (0x946a94d4fe354094), U64_C (0xf7fbf7eb0cf31cf7),
+ U64_C (0xb9deb9a1676f18b9), U64_C (0x134c13985f268b13),
+ U64_C (0x2cb02c7d9c58512c), U64_C (0xd36bd3d6b8bb05d3),
+ U64_C (0xe7bbe76b5cd38ce7), U64_C (0x6ea56e57cbdc396e),
+ U64_C (0xc437c46ef395aac4), U64_C (0x030c03180f061b03),
+ U64_C (0x5645568a13acdc56), U64_C (0x440d441a49885e44),
+ U64_C (0x7fe17fdf9efea07f), U64_C (0xa99ea921374f88a9),
+ U64_C (0x2aa82a4d8254672a), U64_C (0xbbd6bbb16d6b0abb),
+ U64_C (0xc123c146e29f87c1), U64_C (0x535153a202a6f153),
+ U64_C (0xdc57dcae8ba572dc), U64_C (0x0b2c0b582716530b),
+ U64_C (0x9d4e9d9cd327019d), U64_C (0x6cad6c47c1d82b6c),
+ U64_C (0x31c43195f562a431), U64_C (0x74cd7487b9e8f374),
+ U64_C (0xf6fff6e309f115f6), U64_C (0x4605460a438c4c46),
+ U64_C (0xac8aac092645a5ac), U64_C (0x891e893c970fb589),
+ U64_C (0x145014a04428b414), U64_C (0xe1a3e15b42dfbae1),
+ U64_C (0x165816b04e2ca616), U64_C (0x3ae83acdd274f73a),
+ U64_C (0x69b9696fd0d20669), U64_C (0x092409482d124109),
+ U64_C (0x70dd70a7ade0d770), U64_C (0xb6e2b6d954716fb6),
+ U64_C (0xd067d0ceb7bd1ed0), U64_C (0xed93ed3b7ec7d6ed),
+ U64_C (0xcc17cc2edb85e2cc), U64_C (0x4215422a57846842),
+ U64_C (0x985a98b4c22d2c98), U64_C (0xa4aaa4490e55eda4),
+ U64_C (0x28a0285d88507528), U64_C (0x5c6d5cda31b8865c),
+ U64_C (0xf8c7f8933fed6bf8), U64_C (0x86228644a411c286),
+ };
+
+
+
+static void
+whirlpool_init (void *ctx)
+{
+ whirlpool_context_t *context = ctx;
+
+ memset (context, 0, sizeof (*context));
+}
+
+
+/*
+ * Transform block.
+ */
+static void
+whirlpool_transform (whirlpool_context_t *context, const unsigned char *data)
+{
+ whirlpool_block_t data_block;
+ whirlpool_block_t key;
+ whirlpool_block_t state;
+ whirlpool_block_t block;
+ unsigned int r;
+ unsigned int i;
+
+ buffer_to_block (data, data_block, i);
+ block_copy (key, context->hash_state, i);
+ block_copy (state, context->hash_state, i);
+ block_xor (state, data_block, i);
+
+ for (r = 0; r < R; r++)
+ {
+ /* Compute round key K^r. */
+
+ block[0] = (C0[(key[0] >> 56) & 0xFF] ^ C1[(key[7] >> 48) & 0xFF] ^
+ C2[(key[6] >> 40) & 0xFF] ^ C3[(key[5] >> 32) & 0xFF] ^
+ C4[(key[4] >> 24) & 0xFF] ^ C5[(key[3] >> 16) & 0xFF] ^
+ C6[(key[2] >> 8) & 0xFF] ^ C7[(key[1] >> 0) & 0xFF] ^ rc[r]);
+ block[1] = (C0[(key[1] >> 56) & 0xFF] ^ C1[(key[0] >> 48) & 0xFF] ^
+ C2[(key[7] >> 40) & 0xFF] ^ C3[(key[6] >> 32) & 0xFF] ^
+ C4[(key[5] >> 24) & 0xFF] ^ C5[(key[4] >> 16) & 0xFF] ^
+ C6[(key[3] >> 8) & 0xFF] ^ C7[(key[2] >> 0) & 0xFF]);
+ block[2] = (C0[(key[2] >> 56) & 0xFF] ^ C1[(key[1] >> 48) & 0xFF] ^
+ C2[(key[0] >> 40) & 0xFF] ^ C3[(key[7] >> 32) & 0xFF] ^
+ C4[(key[6] >> 24) & 0xFF] ^ C5[(key[5] >> 16) & 0xFF] ^
+ C6[(key[4] >> 8) & 0xFF] ^ C7[(key[3] >> 0) & 0xFF]);
+ block[3] = (C0[(key[3] >> 56) & 0xFF] ^ C1[(key[2] >> 48) & 0xFF] ^
+ C2[(key[1] >> 40) & 0xFF] ^ C3[(key[0] >> 32) & 0xFF] ^
+ C4[(key[7] >> 24) & 0xFF] ^ C5[(key[6] >> 16) & 0xFF] ^
+ C6[(key[5] >> 8) & 0xFF] ^ C7[(key[4] >> 0) & 0xFF]);
+ block[4] = (C0[(key[4] >> 56) & 0xFF] ^ C1[(key[3] >> 48) & 0xFF] ^
+ C2[(key[2] >> 40) & 0xFF] ^ C3[(key[1] >> 32) & 0xFF] ^
+ C4[(key[0] >> 24) & 0xFF] ^ C5[(key[7] >> 16) & 0xFF] ^
+ C6[(key[6] >> 8) & 0xFF] ^ C7[(key[5] >> 0) & 0xFF]);
+ block[5] = (C0[(key[5] >> 56) & 0xFF] ^ C1[(key[4] >> 48) & 0xFF] ^
+ C2[(key[3] >> 40) & 0xFF] ^ C3[(key[2] >> 32) & 0xFF] ^
+ C4[(key[1] >> 24) & 0xFF] ^ C5[(key[0] >> 16) & 0xFF] ^
+ C6[(key[7] >> 8) & 0xFF] ^ C7[(key[6] >> 0) & 0xFF]);
+ block[6] = (C0[(key[6] >> 56) & 0xFF] ^ C1[(key[5] >> 48) & 0xFF] ^
+ C2[(key[4] >> 40) & 0xFF] ^ C3[(key[3] >> 32) & 0xFF] ^
+ C4[(key[2] >> 24) & 0xFF] ^ C5[(key[1] >> 16) & 0xFF] ^
+ C6[(key[0] >> 8) & 0xFF] ^ C7[(key[7] >> 0) & 0xFF]);
+ block[7] = (C0[(key[7] >> 56) & 0xFF] ^ C1[(key[6] >> 48) & 0xFF] ^
+ C2[(key[5] >> 40) & 0xFF] ^ C3[(key[4] >> 32) & 0xFF] ^
+ C4[(key[3] >> 24) & 0xFF] ^ C5[(key[2] >> 16) & 0xFF] ^
+ C6[(key[1] >> 8) & 0xFF] ^ C7[(key[0] >> 0) & 0xFF]);
+ block_copy (key, block, i);
+
+ /* Apply r-th round transformation. */
+
+ block[0] = (C0[(state[0] >> 56) & 0xFF] ^ C1[(state[7] >> 48) & 0xFF] ^
+ C2[(state[6] >> 40) & 0xFF] ^ C3[(state[5] >> 32) & 0xFF] ^
+ C4[(state[4] >> 24) & 0xFF] ^ C5[(state[3] >> 16) & 0xFF] ^
+ C6[(state[2] >> 8) & 0xFF] ^ C7[(state[1] >> 0) & 0xFF] ^ key[0]);
+ block[1] = (C0[(state[1] >> 56) & 0xFF] ^ C1[(state[0] >> 48) & 0xFF] ^
+ C2[(state[7] >> 40) & 0xFF] ^ C3[(state[6] >> 32) & 0xFF] ^
+ C4[(state[5] >> 24) & 0xFF] ^ C5[(state[4] >> 16) & 0xFF] ^
+ C6[(state[3] >> 8) & 0xFF] ^ C7[(state[2] >> 0) & 0xFF] ^ key[1]);
+ block[2] = (C0[(state[2] >> 56) & 0xFF] ^ C1[(state[1] >> 48) & 0xFF] ^
+ C2[(state[0] >> 40) & 0xFF] ^ C3[(state[7] >> 32) & 0xFF] ^
+ C4[(state[6] >> 24) & 0xFF] ^ C5[(state[5] >> 16) & 0xFF] ^
+ C6[(state[4] >> 8) & 0xFF] ^ C7[(state[3] >> 0) & 0xFF] ^ key[2]);
+ block[3] = (C0[(state[3] >> 56) & 0xFF] ^ C1[(state[2] >> 48) & 0xFF] ^
+ C2[(state[1] >> 40) & 0xFF] ^ C3[(state[0] >> 32) & 0xFF] ^
+ C4[(state[7] >> 24) & 0xFF] ^ C5[(state[6] >> 16) & 0xFF] ^
+ C6[(state[5] >> 8) & 0xFF] ^ C7[(state[4] >> 0) & 0xFF] ^ key[3]);
+ block[4] = (C0[(state[4] >> 56) & 0xFF] ^ C1[(state[3] >> 48) & 0xFF] ^
+ C2[(state[2] >> 40) & 0xFF] ^ C3[(state[1] >> 32) & 0xFF] ^
+ C4[(state[0] >> 24) & 0xFF] ^ C5[(state[7] >> 16) & 0xFF] ^
+ C6[(state[6] >> 8) & 0xFF] ^ C7[(state[5] >> 0) & 0xFF] ^ key[4]);
+ block[5] = (C0[(state[5] >> 56) & 0xFF] ^ C1[(state[4] >> 48) & 0xFF] ^
+ C2[(state[3] >> 40) & 0xFF] ^ C3[(state[2] >> 32) & 0xFF] ^
+ C4[(state[1] >> 24) & 0xFF] ^ C5[(state[0] >> 16) & 0xFF] ^
+ C6[(state[7] >> 8) & 0xFF] ^ C7[(state[6] >> 0) & 0xFF] ^ key[5]);
+ block[6] = (C0[(state[6] >> 56) & 0xFF] ^ C1[(state[5] >> 48) & 0xFF] ^
+ C2[(state[4] >> 40) & 0xFF] ^ C3[(state[3] >> 32) & 0xFF] ^
+ C4[(state[2] >> 24) & 0xFF] ^ C5[(state[1] >> 16) & 0xFF] ^
+ C6[(state[0] >> 8) & 0xFF] ^ C7[(state[7] >> 0) & 0xFF] ^ key[6]);
+ block[7] = (C0[(state[7] >> 56) & 0xFF] ^ C1[(state[6] >> 48) & 0xFF] ^
+ C2[(state[5] >> 40) & 0xFF] ^ C3[(state[4] >> 32) & 0xFF] ^
+ C4[(state[3] >> 24) & 0xFF] ^ C5[(state[2] >> 16) & 0xFF] ^
+ C6[(state[1] >> 8) & 0xFF] ^ C7[(state[0] >> 0) & 0xFF] ^ key[7]);
+ block_copy (state, block, i);
+ }
+
+ /* Compression. */
+
+ block_xor (context->hash_state, data_block, i);
+ block_xor (context->hash_state, state, i);
+}
+
+static void
+whirlpool_add (whirlpool_context_t *context,
+ const void *buffer_arg, size_t buffer_n)
+{
+ const unsigned char *buffer = buffer_arg;
+ u64 buffer_size;
+ unsigned int carry;
+ unsigned int i;
+
+ buffer_size = buffer_n;
+
+ if (context->count == BLOCK_SIZE)
+ {
+ /* Flush the buffer. */
+ whirlpool_transform (context, context->buffer);
+ /*_gcry_burn_stack (80+6*sizeof(void*));*/ /* FIXME */
+ context->count = 0;
+ }
+ if (! buffer)
+ return; /* Nothing to add. */
+
+ if (context->count)
+ {
+ while (buffer_n && (context->count < BLOCK_SIZE))
+ {
+ context->buffer[context->count++] = *buffer++;
+ buffer_n--;
+ }
+ whirlpool_add (context, NULL, 0);
+ if (!buffer_n)
+ /* Done. */
+ return;
+ }
+ /*_gcry_burn_stack (80+6*sizeof(void*));*/ /* FIXME */
+
+ while (buffer_n >= BLOCK_SIZE)
+ {
+ whirlpool_transform (context, buffer);
+ context->count = 0;
+ buffer_n -= BLOCK_SIZE;
+ buffer += BLOCK_SIZE;
+ }
+ while (buffer_n && (context->count < BLOCK_SIZE))
+ {
+ context->buffer[context->count++] = *buffer++;
+ buffer_n--;
+ }
+
+ /* Update bit counter. */
+ carry = 0;
+ buffer_size <<= 3;
+ for (i = 1; i <= 32; i++)
+ {
+ if (! (buffer_size || carry))
+ break;
+
+ carry += context->length[32 - i] + (buffer_size & 0xFF);
+ context->length[32 - i] = carry;
+ buffer_size >>= 8;
+ carry >>= 8;
+ }
+ gcry_assert (! (buffer_size || carry));
+}
+
+static void
+whirlpool_write (void *ctx, const void *buffer, size_t buffer_n)
+{
+ whirlpool_context_t *context = ctx;
+
+ whirlpool_add (context, buffer, buffer_n);
+}
+
+static void
+whirlpool_final (void *ctx)
+{
+ whirlpool_context_t *context = ctx;
+ unsigned int i;
+
+ /* Flush. */
+ whirlpool_add (context, NULL, 0);
+
+ /* Pad. */
+ context->buffer[context->count++] = 0x80;
+
+ if (context->count > 32)
+ {
+ /* An extra block is necessary. */
+ while (context->count < 64)
+ context->buffer[context->count++] = 0;
+ whirlpool_add (context, NULL, 0);
+ }
+ while (context->count < 32)
+ context->buffer[context->count++] = 0;
+
+ /* Add length of message. */
+ memcpy (context->buffer + context->count, context->length, 32);
+ context->count += 32;
+ whirlpool_add (context, NULL, 0);
+
+ block_to_buffer (context->buffer, context->hash_state, i);
+}
+
+static byte *
+whirlpool_read (void *ctx)
+{
+ whirlpool_context_t *context = ctx;
+
+ return context->buffer;
+}
+
+gcry_md_spec_t _gcry_digest_spec_whirlpool =
+ {
+ "WHIRLPOOL", NULL, 0, NULL, 64,
+ whirlpool_init, whirlpool_write, whirlpool_final, whirlpool_read,
+ sizeof (whirlpool_context_t)
+ ,
+ .blocksize = 64
+ };
+
+
+GRUB_MOD_INIT(gcry_whirlpool)
+{
+ grub_md_register (&_gcry_digest_spec_whirlpool);
+}
+
+GRUB_MOD_FINI(gcry_whirlpool)
+{
+ grub_md_unregister (&_gcry_digest_spec_whirlpool);
+}
diff --git a/grub-core/lib/libgcrypt/cipher/ChangeLog b/grub-core/lib/libgcrypt/cipher/ChangeLog
new file mode 100644
index 0000000..8924f17
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/ChangeLog
@@ -0,0 +1,3900 @@
+2009-01-22 Werner Koch <wk@g10code.com>
+
+ * ecc.c (compute_keygrip): Remove superfluous const.
+
+2009-01-06 Werner Koch <wk@g10code.com>
+
+ * rmd160.c (oid_spec_rmd160): Add TeleTrust identifier.
+
+2008-12-10 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate): Add arg DOMAIN and use it if specified.
+ (generate_fips186): Ditto.
+ (dsa_generate_ext): Parse and check the optional "domain"
+ parameter and pass them to the generate functions.
+
+ * rijndael.c (rijndael_names): Add "AES128" and "AES-128".
+ (rijndael192_names): Add "AES-192".
+ (rijndael256_names): Add "AES-256".
+
+2008-12-05 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate): Add arg TRANSIENT_KEY and use it to detrmine
+ the RNG quality needed.
+ (dsa_generate_ext): Parse the transient-key flag und pass it to
+ generate.
+
+2008-11-28 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate_fips186): Add arg DERIVEPARMS and use the seed
+ value if available.
+
+ * primegen.c (_gcry_generate_fips186_2_prime): Fix inner p loop.
+
+2008-11-26 Werner Koch <wk@g10code.com>
+
+ * primegen.c (_gcry_generate_fips186_3_prime): New.
+ * dsa.c (generate_fips186): Add arg USE_FIPS186_2.
+ (dsa_generate_ext): Parse new flag use-fips183-2.
+
+2008-11-25 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate_fips186): New.
+ (dsa_generate_ext): Use new function if derive-parms are given or
+ if in FIPS mode.
+ * primegen.c (_gcry_generate_fips186_2_prime): New.
+
+2008-11-24 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Insert code to output extrainfo.
+ (pubkey_generate): Add arg R_EXTRAINFO and pass it to the extended
+ key generation function.
+ * rsa.c (gen_x931_parm_xp, gen_x931_parm_xi): New.
+ (generate_x931): Generate params if not given.
+ (rsa_generate_ext): Parse use-x931 flag. Return p-q-swapped
+ indicator.
+ * dsa.c (dsa_generate_ext): Put RETFACTORS into R_EXTRAINFO if
+ possible.
+
+ * pubkey.c (gcry_pk_genkey): Remove parsing of almost all
+ parameters and pass the parameter S-expression to pubkey_generate.
+ (pubkey_generate): Simplify by requitring modules to parse the
+ parameters. Remove the special cases for Elgamal and ECC.
+ (sexp_elements_extract_ecc): Add arg EXTRASPEC and use it. Fix
+ small memory leak.
+ (sexp_to_key): Pass EXTRASPEC to sexp_elements_extract_ecc.
+ (pubkey_table) [USE_ELGAMAL]: Add real extraspec.
+ * rsa.c (rsa_generate_ext): Adjust for new calling convention.
+ * dsa.c (dsa_generate_ext): Ditto.
+ * elgamal.c (_gcry_elg_generate): Ditto. Rename to elg_generate_ext.
+ (elg_generate): New.
+ (_gcry_elg_generate_using_x): Remove after merging code with
+ elg_generate_ext.
+ (_gcry_pubkey_extraspec_elg): New.
+ (_gcry_elg_check_secret_key, _gcry_elg_encrypt, _gcry_elg_sign)
+ (_gcry_elg_verify, _gcry_elg_get_nbits): Make static and remove
+ _gcry_ prefix.
+ * ecc.c (_gcry_ecc_generate): Rename to ecc_generate_ext and
+ adjust for new calling convention.
+ (_gcry_ecc_get_param): Rename to ecc_get_param and make static.
+ (_gcry_pubkey_extraspec_ecdsa): Add ecc_generate_ext and
+ ecc_get_param.
+
+2008-11-20 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (pubkey_generate): Add arg DERIVEPARMS.
+ (gcry_pk_genkey): Parse derive-parms and pass it to above.
+ * rsa.c (generate_x931): New.
+ (rsa_generate_ext): Add arg DERIVEPARMS and call new function in
+ fips mode or if DERIVEPARMS is given.
+ * primegen.c (_gcry_derive_x931_prime, find_x931_prime): New.
+
+2008-11-19 Werner Koch <wk@g10code.com>
+
+ * rsa.c (rsa_decrypt): Use gcry_create_nonce for blinding.
+ (generate): Rename to generate_std.
+
+2008-11-05 Werner Koch <wk@g10code.com>
+
+ * md.c (md_open): Use a switch to set the Bsize.
+ (prepare_macpads): Fix long key case for SHA384 and SHA512.
+
+ * cipher.c (gcry_cipher_handle): Add field EXTRASPEC.
+ (gcry_cipher_open): Set it.
+ (gcry_cipher_ctl): Add private control code to disable weak key
+ detection and to return the current input block.
+ * des.c (_tripledes_ctx): Add field FLAGS.
+ (do_tripledes_set_extra_info): New.
+ (_gcry_cipher_extraspec_tripledes): Add new function.
+ (do_tripledes_setkey): Disable weak key detection.
+
+2008-10-24 Werner Koch <wk@g10code.com>
+
+ * md.c (digest_table): Allow MD5 in fips mode.
+ (md_register_default): Take special action for MD5.
+ (md_enable, gcry_md_hash_buffer): Ditto.
+
+2008-09-30 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (do_setkey): Properly align "t" and "tk".
+ (prepare_decryption): Properly align "w". Fixes bug #936.
+
+2008-09-18 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Parse domain parameter.
+ (pubkey_generate): Add new arg DOMAIN and remove special case for
+ DSA with qbits.
+ * rsa.c (rsa_generate): Add dummy args QBITS, NAME and DOMAIN and
+ rename to rsa_generate_ext. Change caller.
+ (_gcry_rsa_generate, _gcry_rsa_check_secret_key)
+ (_gcry_rsa_encrypt, _gcry_rsa_decrypt, _gcry_rsa_sign)
+ (_gcry_rsa_verify, _gcry_rsa_get_nbits): Make static and remove
+ _gcry_ prefix.
+ (_gcry_pubkey_spec_rsa, _gcry_pubkey_extraspec_rsa): Adjust names.
+ * dsa.c (dsa_generate_ext): New.
+ (_gcry_dsa_generate): Replace code by a call to dsa_generate.
+ (_gcry_dsa_check_secret_key, _gcry_dsa_sign, _gcry_dsa_verify)
+ (_gcry_dsa_get_nbits): Make static and remove _gcry prefix.
+ (_gcry_dsa_generate2): Remove.
+ (_gcry_pubkey_spec_dsa): Adjust to name changes.
+ (_gcry_pubkey_extraspec_rsa): Add dsa_generate_ext.
+
+2008-09-16 Werner Koch <wk@g10code.com>
+
+ * ecc.c (run_selftests): Add arg EXTENDED.
+
+2008-09-12 Werner Koch <wk@g10code.com>
+
+ * rsa.c (test_keys): Do a bad case signature check.
+ * dsa.c (test_keys): Do a bad case check.
+
+ * cipher.c (_gcry_cipher_selftest): Add arg EXTENDED and pass it
+ to the called tests.
+ * md.c (_gcry_md_selftest): Ditto.
+ * pubkey.c (_gcry_pk_selftest): Ditto.
+ * rijndael.c (run_selftests): Add arg EXTENDED and pass it to the
+ called tests.
+ (selftest_fips_128): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftest_fips_192): Add dummy arg EXTENDED.
+ (selftest_fips_256): Ditto.
+ * hmac-tests.c (_gcry_hmac_selftest): Ditto.
+ (run_selftests): Ditto.
+ (selftests_sha1): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftests_sha224, selftests_sha256): Ditto.
+ (selftests_sha384, selftests_sha512): Ditto.
+ * sha1.c (run_selftests): Add arg EXTENDED and pass it to the
+ called test.
+ (selftests_sha1): Add arg EXTENDED and run only one test
+ non-extended mode.
+ * sha256.c (run_selftests): Add arg EXTENDED and pass it to the
+ called tests.
+ (selftests_sha224): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftests_sha256): Ditto.
+ * sha512.c (run_selftests): Add arg EXTENDED and pass it to the
+ called tests.
+ (selftests_sha384): Add arg EXTENDED and run only one test
+ non-extended mode.
+ (selftests_sha512): Ditto.
+ * des.c (run_selftests): Add arg EXTENDED and pass it to the
+ called test.
+ (selftest_fips): Add dummy arg EXTENDED.
+ * rsa.c (run_selftests): Add dummy arg EXTENDED.
+
+ * dsa.c (run_selftests): Add dummy arg EXTENDED.
+
+ * rsa.c (extract_a_from_sexp): New.
+ (selftest_encr_1024): Check that the ciphertext does not match the
+ plaintext.
+ (test_keys): Improve tests and return an error status.
+ (generate): Return an error if test_keys fails.
+ * dsa.c (test_keys): Add comments and return an error status.
+ (generate): Return an error if test_keys failed.
+
+2008-09-11 Werner Koch <wk@g10code.com>
+
+ * rsa.c (_gcry_rsa_decrypt): Return an error instead of calling
+ BUG in case of a practically impossible condition.
+ (sample_secret_key, sample_public_key): New.
+ (selftest_sign_1024, selftest_encr_1024): New.
+ (selftests_rsa): Implement tests.
+ * dsa.c (sample_secret_key, sample_public_key): New.
+ (selftest_sign_1024): New.
+ (selftests_dsa): Implement tests.
+
+2008-09-09 Werner Koch <wk@g10code.com>
+
+ * hmac-tests.c (selftests_sha1): Add tests.
+ (selftests_sha224, selftests_sha384, selftests_sha512): Make up tests.
+
+ * hash-common.c, hash-common.h: New.
+ * sha1.c (selftests_sha1): Add 3 tests.
+ * sha256.c (selftests_sha256, selftests_sha224): Ditto.
+ * sha512.c (selftests_sha512, selftests_sha384): Ditto.
+
+2008-08-29 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_get_keygrip): Remove the special case for RSA
+ and check whether a custom computation function has been setup.
+ * rsa.c (compute_keygrip): New.
+ (_gcry_pubkey_extraspec_rsa): Setup this function.
+ * ecc.c (compute_keygrip): New.
+ (_gcry_pubkey_extraspec_ecdsa): Setup this function.
+
+2008-08-28 Werner Koch <wk@g10code.com>
+
+ * cipher.c (cipher_decrypt, cipher_encrypt): Return an error if
+ mode NONE is used.
+ (gcry_cipher_open): Allow mode NONE only with a debug flag set and
+ if not in FIPS mode.
+
+2008-08-26 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (pubkey_generate): Add arg KEYGEN_FLAGS.
+ (gcry_pk_genkey): Implement new parameter "transient-key" and
+ pass it as flags to pubkey_generate.
+ (pubkey_generate): Make use of an ext_generate function.
+ * rsa.c (generate): Add new arg transient_key and pass appropriate
+ args to the prime generator.
+ (_gcry_rsa_generate): Factor all code out to ...
+ (rsa_generate): .. new func with extra arg KEYGEN_FLAGS.
+ (_gcry_pubkey_extraspec_ecdsa): Setup rsa_generate.
+ * primegen.c (_gcry_generate_secret_prime)
+ (_gcry_generate_public_prime): Add new arg RANDOM_LEVEL.
+
+2008-08-21 Werner Koch <wk@g10code.com>
+
+ * primegen.c (_gcry_generate_secret_prime)
+ (_gcry_generate_public_prime): Use a constant macro for the random
+ level.
+
+2008-08-19 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_elements_extract_ecc) [!USE_ECC]: Do not allow
+ allow "curve" parameter.
+
+2008-08-15 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (_gcry_pk_selftest): New.
+ * dsa.c (selftests_dsa, run_selftests): New.
+ * rsa.c (selftests_rsa, run_selftests): New.
+ * ecc.c (selftests_ecdsa, run_selftests): New.
+
+ * md.c (_gcry_md_selftest): New.
+ * sha1.c (run_selftests, selftests_sha1): New.
+ * sha256.c (selftests_sha224, selftests_sha256, run_selftests): New.
+ * sha512.c (selftests_sha384, selftests_sha512, run_selftests): New.
+
+ * des.c (selftest): Remove static variable form selftest.
+ (des_setkey): No on-the-fly self test in fips mode.
+ (tripledes_set3keys): Ditto.
+
+ * cipher.c (_gcry_cipher_setkey, _gcry_cipher_setiv):
+
+ * dsa.c (generate): Bail out in fips mode if NBITS is less than 1024.
+ * rsa.c (generate): Return an error code if the the requested size
+ is less than 1024 and we are in fpis mode.
+ (_gcry_rsa_generate): Take care of that error code.
+
+ * ecc.c (generate_curve): In fips mode enable only NIST curves.
+
+ * cipher.c (_gcry_cipher_selftest): New.
+
+ * sha512.c (_gcry_digest_extraspec_sha384)
+ (_gcry_digest_extraspec_sha512): New.
+ * sha256.c (_gcry_digest_extraspec_sha224)
+ (_gcry_digest_extraspec_sha256): New.
+ * sha1.c (_gcry_digest_extraspec_sha1): New.
+ * ecc.c (_gcry_pubkey_extraspec_ecdsa): New.
+ * dsa.c (_gcry_pubkey_extraspec_dsa): New.
+ * rsa.c (_gcry_pubkey_extraspec_rsa): New.
+ * rijndael.c (_gcry_cipher_extraspec_aes)
+ (_gcry_cipher_extraspec_aes192, _gcry_cipher_extraspec_aes256): New.
+ * des.c (_gcry_cipher_extraspec_tripledes): New.
+
+ * cipher.c (gcry_cipher_register): Rename to _gcry_cipher_register.
+ Add arg EXTRASPEC.
+ (dummy_extra_spec): New.
+ (cipher_table_entry): Add extraspec field.
+ * md.c (_gcry_md_register): Rename to _gcry_md_register. Add
+ arg EXTRASPEC.
+ (dummy_extra_spec): New.
+ (digest_table_entry): Add extraspec field.
+ * pubkey.c (gcry_pk_register): Rename to _gcry_pk_register. Add
+ arg EXTRASPEC.
+ (dummy_extra_spec): New.
+ (pubkey_table_entry): Add extraspec field.
+
+ * ac.c: Let most public functions return GPG_ERR_UNSUPPORTED in
+ fips mode.
+
+ * pubkey.c (pubkey_table_entry): Add field FIPS_ALLOWED and mark
+ appropriate algorithms.
+ (dummy_generate, dummy_check_secret_key, dummy_encrypt)
+ (dummy_decrypt, dummy_sign, dummy_verify, dummy_get_nbits): Signal
+ a fips error when used.
+ (gcry_pk_register): In fips mode do not allow to register new
+ algorithms.
+
+ * md.c (digest_table): Add field FIPS_ALLOWED and mark appropriate
+ algorithms.
+ (md_register_default): In fips mode register only fips algorithms.
+ (gcry_md_register): In fips mode do not allow to register new
+ algorithms.
+ (gcry_md_get): Signal a fips error if called.
+ (gcry_md_hash_buffer): Do not allow rmd160 when not in fips mode.
+ (md_start_debug): Disable in fips_mode.
+
+ * md.c (gcry_md_register_default): Rename to ..
+ (md_register_default): .. this.
+ (md_digest): Remove this commented fucntion.
+ * pubkey.c (gcry_pk_register_default): Rename to ..
+ (pk_register_default): .. this.
+
+ * cipher.c (cipher_table_entry): Add field FIPS_ALLOWED.
+ (gcry_cipher_register_default): Register only fips approved
+ algorithms.
+ (gcry_cipher_register): Do not allow to register new ciphers.
+ (cipher_setiv): Signal fips error.
+
+ * cipher (gcry_cipher_register_default): Rename to ..
+ (cipher_register_default): .. this.
+ (REGISTER_DEFAULT_CIPHERS): Adjust for that change.
+
+2008-07-05 Werner Koch <wk@g10code.com>
+
+ * random-daemon.c, random.h, rndhw.c, rndunix.c, rand-internal.h
+ * random.c, rndegd.c, rndlinux.c, rndw32.c: Move to ../cipher.
+ * Makefile.am: Remove random stuff.
+
+2008-06-24 Szakats Istvan <szaki.ms@gmail.com> (wk)
+
+ * ac.c (_gcry_ac_key_destroy, _gcry_ac_key_pair_generate): Relase
+ some more memory.
+
+2008-04-22 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (_gcry_aes_cfb_enc, _gcry_aes_cbc_enc)
+ (_gcry_aes_cfb_dec, _gcry_aes_cbc_dec): Use Padlock if possible.
+
+2008-04-18 Werner Koch <wk@g10code.com>
+
+ * sha1.c (transform_aligned): Remove. That is will obviosuly not
+ work because we need a scratch working area and our internal API
+ does not allow to modify the buffers.
+
+ * rijndael.c: Factor tables out to ..
+ * rijndael-tables.h: .. new.
+
+ * ac.c (ac_data_extract): Make static.
+
+ * camellia.h [HAVE_CONFIG_H]: Include config.h.
+
+ * rndw32.c (registry_poll): Only print the performance data
+ problem warning once. Suggested by Simon Josefsson.
+
+2008-03-19 Werner Koch <wk@g10code.com>
+
+ * cipher.c (gcry_cipher_open) [USE_AES]: Init bulk encryption only
+ if requested. Suggested by Dirk Stoecker.
+
+2008-03-18 Werner Koch <wk@g10code.com>
+
+ * sha1.c: Include stdint.h.
+ (transform): Add arg NBLOCKS so that we can work on more than one
+ block and avoid updates of the chaining variables. Changed all
+ callers to use 1.
+ (sha1_write): Replace loop around transform.
+ (transform_aligned) [WORDS_BIGENDIAN]: New.
+ (TRANSFORM): New macro to replace all direct calls of transform.
+
+2008-03-17 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (_gcry_aes_cfb_dec): New.
+ (do_encrypt): Factor code out to ..
+ (do_encrypt_aligned): .. New.
+ (_gcry_aes_cfb_enc, _gcry_aes_cfb_dec): Use new function.
+ (do_decrypt): Factor code out to ..
+ (do_decrypt_aligned): .. new.
+ (_gcry_aes_cbc_enc, _gcry_aes_cbc_dec): New.
+ * cipher.c (struct gcry_cipher_handle): Put field IV into new
+ union U_IV to enforce proper alignment. Change all users.
+ (do_cfb_decrypt): Optimize.
+ (do_cbc_encrypt, do_cbc_decrypt): Optimize.
+
+2008-03-15 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (_gcry_aes_cfb_enc): New.
+ * cipher.c (struct gcry_cipher_handle): Add field ALGO and BULK.
+ (gcry_cipher_open): Set ALGO and BULK.
+ (do_cfb_encrypt): Optimize.
+
+2008-02-18 Werner Koch <wk@g10code.com>
+
+ * rsa.c (_gcry_rsa_verify) [IS_DEVELOPMENT_VERSION]: Print
+ intermediate results.
+
+2008-01-08 Werner Koch <wk@g10code.com>
+
+ * random.c (add_randomness): Do not just increment
+ POOL_FILLED_COUNTER but update it by the actual amount of data.
+
+2007-12-13 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_data_to_mpi): Support SHA-224.
+
+2007-12-05 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (USE_PADLOCK): Depend on ENABLE_PADLOCK_SUPPORT.
+ * rndhw.c (USE_PADLOCK): Ditto
+
+ * rsa.c (secret): Fixed condition test for using CRT. Reported by
+ Dean Scarff. Fixes bug#864.
+ (_gcry_rsa_check_secret_key): Return an erro if the optional
+ parameters are missing.
+ * pubkey.c (sexp_elements_extract): Add arg ALGO_NAME. Changed all
+ callers to pass NULL. Add hack to allow for optional RSA
+ parameters.
+ (sexp_to_key): Pass algo name to sexp_elements_extract.
+
+2007-12-03 Werner Koch <wk@g10code.com>
+
+ * random.c (gcry_random_add_bytes): Implement it.
+ * rand-internal.h (RANDOM_ORIGIN_EXTERNAL): New.
+
+2007-11-30 Werner Koch <wk@g10code.com>
+
+ * rndhw.c: New.
+ * rndlinux.c (_gcry_rndlinux_gather_random): Try to read 50%
+ directly from the hwrng.
+ * random.c (do_fast_random_poll): Also run the hw rng fast poll.
+ (_gcry_random_dump_stats): Tell whether the hw rng failed.
+
+2007-11-29 Werner Koch <wk@g10code.com>
+
+ * rijndael.c (USE_PADLOCK): Define new macro used for ia32.
+ (RIJNDAEL_context) [USE_PADLOCK]: Add fields USE_PADLOCK and
+ PADLOCK_KEY.
+ (do_setkey) [USE_PADLOCK]: Enable padlock if available for 128 bit
+ AES.
+ (do_padlock) [USE_PADLOCK]: New.
+ (rijndael_encrypt, rijndael_decrypt) [USE_PADLOCK]: Divert to
+ do_padlock.
+ * cipher.c (cipher_context_alignment_t): New. Use it in this
+ module in place of PROPERLY_ALIGNED_TYPE.
+ (NEED_16BYTE_ALIGNED_CONTEXT): Define macro for ia32.
+ (struct gcry_cipher_handle): Add field HANDLE_OFFSET.
+ (gcry_cipher_open): Take care of increased alignment requirements.
+ (gcry_cipher_close): Ditto.
+
+2007-11-28 Werner Koch <wk@g10code.com>
+
+ * sha256.c (asn224): Fixed wrong template. It happened due to a
+ bug in RFC4880. SHA-224 is not in the stable version of libgcrypt
+ so the consequences are limited to users of this devel version.
+
+2007-10-31 Werner Koch <wk@g10code.com>
+
+ * ac.c (gcry_ac_data_new): Remove due to the visibility wrapper.
+ (gcry_ac_data_destroy, gcry_ac_data_copy, gcry_ac_data_length)
+ (gcry_ac_data_set, gcry_ac_data_get_name, gcry_ac_data_get_index)
+ (gcry_ac_data_to_sexp, gcry_ac_data_from_sexp)
+ (gcry_ac_data_clear, gcry_ac_io_init, gcry_ac_open)
+ (gcry_ac_close, gcry_ac_key_init, gcry_ac_key_pair_generate)
+ (gcry_ac_key_pair_extract, gcry_ac_key_destroy)
+ (gcry_ac_key_pair_destroy, gcry_ac_key_data_get)
+ (gcry_ac_key_test, gcry_ac_key_get_nbits, gcry_ac_key_get_grip)
+ (gcry_ac_data_encrypt, gcry_ac_data_decrypt, gcry_ac_data_sign)
+ (gcry_ac_data_verify, gcry_ac_data_encode, gcry_ac_data_decode)
+ (gcry_ac_mpi_to_os, gcry_ac_mpi_to_os_alloc, gcry_ac_os_to_mpi)
+ (gcry_ac_data_encrypt_scheme, gcry_ac_data_decrypt_scheme)
+ (gcry_ac_data_sign_scheme, gcry_ac_data_verify_scheme)
+ (gcry_ac_io_init_va): Ditto.
+ (gcry_ac_id_to_name, gcry_ac_name_to_id): Remove as these
+ deprecated functions are now implemented by visibility.c.
+
+2007-10-26 Werner Koch <wk@g10code.com>
+
+ * rndw32.c: Disable debug flag.
+
+2007-10-25 Werner Koch <wk@g10code.com>
+
+ * rndw32.c: Updated from current cryptlib snapshot and modified
+ for our use. Removed support from pre NT systems.
+ (slow_gatherer_windows95): Remove.
+ (_gcry_rndw32_gather_random): Require an NT platform.
+ (init_system_rng, read_system_rng, read_mbm_data): New.
+ (slow_gatherer_windowsNT): Rename to ...
+ (slow_gatherer): .. this. Read system RNG and MBM.
+ (registry_poll): New with code factored out from slow_gatherer.
+
+2007-08-23 Werner Koch <wk@g10code.com>
+
+ * random.c (pool_filled_counter): New.
+ (add_randomness): Use it.
+
+2007-08-22 Werner Koch <wk@g10code.com>
+
+ * rndw32.c, rndunix.c: Switched to LGPL.
+
+2007-05-30 Werner Koch <wk@g10code.com>
+
+ * camellia.h, camellia.c: Replace by new LGPL version and adjusted
+ camellia.h.
+
+2007-05-09 Marcus Brinkmann <marcus@g10code.de>
+
+ * ac.c (_gcry_ac_io_init_va, _gcry_ac_io_write, _gcry_ac_io_read):
+ Adjust users of gcry_ac_io_t because union is not anonymous
+ anymore.
+
+2007-05-02 Werner Koch <wk@g10code.com>
+
+ * camellia-glue.c (camellia_setkey, camellia_encrypt)
+ (camellia_decrypt): Recalculated used stack size in called
+ functions.
+ * camellia.h: Redefine external symbols.
+
+2007-05-02 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am, cipher.c: Add Camellia.
+
+ * camellia-glue.c: New. The necessary glue to interface libgcrypt
+ to the stock NTT Camellia distribution.
+
+ * camellia.h, camellia.c: The stock NTT Camellia distribution
+ (GPL).
+
+2007-04-30 David Shaw <dshaw@jabberwocky.com>
+
+ * cipher.c: Use #if instead of #ifdef as configure defines the
+ USE_cipher defines as 0 for disabled.
+
+2007-04-30 Werner Koch <wk@g10code.com>
+
+ * rndegd.c (_gcry_rndegd_set_socket_name): New.
+
+2007-04-30 Marcus Brinkmann <marcus@g10code.de>
+
+ * ecc.c (ec2os): Fix relocation of short numbers.
+
+ * ecc.c (generate_key): Do not allocate D, which will be allocated
+ by GEN_K. Remove G. Fix test if g_x, g_y resp. q_x, q_y are
+ requested.
+ (_gcry_ecc_generate): Release unneeded members of SK.
+ * pubkey.c (sexp_to_key): Release NAME.
+
+2007-04-28 Marcus Brinkmann <marcus@g10code.de>
+
+ * ac.c (gcry_ac_mpi): Remove member NAME_PROVIDED.
+ (ac_data_mpi_copy, _gcry_ac_data_set, _gcry_ac_data_get_name)
+ (_gcry_ac_data_get_index, ac_data_construct): Adjust handling of
+ NAME accordingly.
+
+2007-04-20 Werner Koch <wk@g10code.com>
+
+ * ecc.c (domain_parms): Add standard brainpool curves.
+
+2007-04-18 Werner Koch <wk@g10code.com>
+
+ * ecc.c (generate_curve): Implement alias mechanism.
+
+ * pubkey.c (sexp_elements_extract_ecc): New.
+ (sexp_to_key): Add special case for ecc.
+ (sexp_to_key, sexp_to_sig, sexp_to_enc, gcry_pk_genkey): Replace
+ name_terminated stuff by a call to _gcry_sexp_nth_string.
+ (gcry_pk_get_keygrip): Ditto.
+
+2007-04-16 Werner Koch <wk@g10code.com>
+
+ * ecc.c (_gcry_ecc_generate): Renamed DUMMY to CURVE and use it.
+
+2007-04-13 Marcus Brinkmann <marcus@g10code.de>
+
+ * ac.c (ac_data_construct): Cast const away to suppress compiler
+ warning.
+
+ * ecc.c (ecc_generate): Avoid compiler warning for unused argument
+ DUMMY.
+ (ecc_verify): Avoid compiler warning for unused arguments CMP and
+ OPAQUEV.
+
+2007-04-06 Werner Koch <wk@g10code.com>
+
+ * sha1.c (oid_spec_sha1): Add another oid from X9.62.
+
+2007-03-28 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Do not issue misc-key-info if it is
+ empty.
+ (gcry_pk_genkey): New parameter "curve".
+
+ * ecc.c: Entirely rewritten with only a few traces of the old
+ code left.
+ (_gcry_ecc_generate): New.
+ (generate_key) New arg NAME.
+ (generate_curve): Ditto. Return actual number of NBITS.
+
+2007-03-26 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Increase size of SKEY array and add a
+ runtime bounds check.
+
+2007-03-23 Werner Koch <wk@g10code.com>
+
+ * ecc.c (ecc_ctx_init, ecc_ctx_free, ecc_mod, ecc_mulm): New.
+ (duplicate_point, sum_points, escalar_mult): Don't use a
+ copy of base->p. Replaced all mpi_mulm by ecc_mulm so that we can
+ experiment with different algorithms.
+ (generate_key, check_secret_key, sign, verify): Initialize a
+ computation context for use by ecc_mulm.
+
+2007-03-22 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (pubkey_table): Initialize ECC.
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Add ecc.c.
+ * ecc.c: New. Heavily reformatted and changed for use in libgcrypt.
+ (point_init): New.
+ (escalar_mult): Make arg R the first arg to be similar to the mpi
+ functions.
+ (duplicate_point): Ditto
+ (sum_points): Ditto
+ (sign, verify): Remove unneeded copy operations.
+ (sum_points): Removed memory leaks and optimized some compares.
+ (verify): Simplified input check.
+
+2007-03-14 Werner Koch <wk@g10code.com>
+
+ * random.c (MASK_LEVEL): Removed macro as it was used only at one
+ place. Open coded it there.
+ (gcry_randomize, _gcry_update_random_seed_file)
+ (_gcry_fast_random_poll): Factor lock code out to ..
+ (lock_pool, unlock_pool): .. new.
+ (initialize): Look the pool while allocating.
+ (read_random_source, do_fast_random_poll): Moved intialization to ...
+ (initialize): .. here.
+ (_gcry_enable_quick_random_gen): No more need for initialization.
+ (is_initialized): Moved this global flag to ..
+ (initialize): .. here and changed all users to unconditionally call
+ initialize.
+ (add_randomness): Remove initalization here. It simply can't
+ happen.
+
+ * random.c (enum random_origins): Moved to ..
+ * rand-internal.h: .. here.
+ * rndunix.c (_gcry_rndunix_gather_random): Use enum in prototype
+ for ORIGIN and renamed REQUESTOR to ORIGIN.
+ * rndegd.c (_gcry_rndegd_gather_random): Ditto.
+ * rndlinux.c (_gcry_rndlinux_gather_random): Ditto.
+ * rndw32.c (_gcry_rndw32_gather_random): Ditto.
+ (_gcry_rndw32_gather_random_fast): Ditto.
+
+2007-03-13 Werner Koch <wk@g10code.com>
+
+ * random.c (enum random_origins): New.
+ (add_randomness): Renamed arg SOURCE to ORIGIN.
+ (read_random_source): Renamed arg REQUESTOR to ORIGIN.
+ (getfnc_gather_random): Removed static variable because this
+ function is only called one and thus we don't need this
+ optimization.
+ (_gcry_quick_random_gen): Removed and replaced by..
+ (_gcry_enable_quick_random_gen): .. this. It is onlyu used to
+ enable it and it does not make sense to disable it later. Changed
+ the only one caller too.
+ (get_random_bytes): Removed.
+ (gcry_random_bytes, gcry_random_bytes_secure): Implement in terms
+ of gcry_randomize.
+ * random-daemon.c (_gcry_daemon_get_random_bytes): Removed.
+
+2007-02-23 Werner Koch <wk@g10code.com>
+
+ * elgamal.c (generate): Removed unused variable TEMP.
+ (test_keys): New arg NODIE.
+ (generate_using_x, _gcry_elg_generate_using_x): New.
+ * pubkey.c (pubkey_generate): New arg XVALUE and direct call to
+ the new elgamal generate fucntion.
+ (gcry_pk_genkey): Parse the new "xvalue" tag.
+
+2007-02-22 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_data_to_mpi): Handle dynamically allocated
+ algorithms. Suggested by Neil Dunbar. Fixes bug#596.
+
+ * rndw32.c (_gcry_rndw32_gather_random_fast): Make it return void.
+
+ * cipher.c (gcry_cipher_algo_name): Simplified.
+
+ * random.c: Use the daemon only if compiled with USE_RANDOM_DAEMON.
+
+ * Makefile.am (libcipher_la_SOURCES): Build random-daemon support
+ only if requested.
+
+2007-02-21 Werner Koch <wk@g10code.com>
+
+ * random.c (rndpool, keypool): Make unsigned.
+ (mix_pool): Change char* variables to unsigned char*.
+ (gcry_randomize): Make arg BUFFER a void*.
+ (gcry_create_nonce): Ditto.
+
+ * rmd160.c (gcry_rmd160_mixblock): Make BUFFER a void*.
+ (_gcry_rmd160_hash_buffer): Make OUTBUF and BUFFER void*.
+ * sha1.c (_gcry_sha1_hash_buffer): Ditto.
+
+ * cipher.c (gcry_cipher_encrypt, cry_cipher_decrypt): Change
+ buffer args to void*.
+ (gcry_cipher_register): Make ALGORITHM_ID a int *.
+
+ * md.c (md_start_debug): Make SUFFIX a const char*. Use snprintf.
+ (gcry_md_debug): New.
+ (gcry_md_ctl): Changed arg BUFFER from unsigned char*.
+
+ * md.c (md_write): Make INBUF a const void*.
+ (gcry_md_write): Remove needless cast.
+ * crc.c (crc32_write): Make INBUF a const void*
+ (update_crc32, crc24rfc2440_write): Ditto.
+ * sha512.c (sha512_write, transform): Ditto.
+ * sha256.c (sha256_write, transform): Ditto.
+ * rmd160.c (rmd160_write, transform): Ditto.
+ * md5.c (md5_write, transform): Ditto.
+ * md4.c (md4_write, transform): Ditto.
+ * sha1.c (sha1_write, transform): Ditto.
+
+ * tiger.c (tiger_write, transform): Ditto.
+ * whirlpool.c (whirlpool_write, whirlpool_add, transform): Ditto.
+
+ * elgamal.c (elg_names): Change to a const*.
+ * dsa.c (dsa_names): Ditto.
+ * rsa.c (rsa_names): Ditto.
+ * pubkey.c (gcry_pk_lookup_func_name): Make ALIASES a const.
+
+2007-02-20 Werner Koch <wk@g10code.com>
+
+ * rndlinux.c (open_device): Remove unsused arg MINOR.
+
+2007-01-30 Werner Koch <wk@g10code.com>
+
+ * sha256.c (oid_spec_sha256): Add alias from pkcs#1.
+ * sha512.c (oid_spec_sha512): Ditto.
+ (oid_spec_sha384): Ditto.
+
+2006-12-18 Werner Koch <wk@g10code.com>
+
+ * rndlinux.c (set_cloexec_flag): New.
+ (open_device): Set close-on-exit flags. Suggested by Max
+ Kellermann. Fixes Debian#403613.
+
+ * Makefile.am (AM_CPPFLAGS, AM_CFLAGS): Splitted and merged
+ Moritz' changes.
+ (INCLUDES): Removed.
+
+2006-11-30 Werner Koch <wk@g10code.com>
+
+ * serpent.c (byte_swap_32): Remove trailing semicolon.
+
+2006-11-15 Werner Koch <wk@g10code.com>
+
+ * Makefile.am (INCLUDES): Include ../src/
+
+2006-11-03 Werner Koch <wk@g10code.com>
+
+ * random.c [HAVE_GETTIMEOFDAY]: Included sys/time.h and not
+ sys/times.h. Reported by Rafaël Carré.
+
+2006-11-05 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (AM_CFLAGS): Added -I$(top_builddir)/src so that the
+ new gcrypt.h is used, not the one installed in the system.
+
+2006-10-25 Werner Koch <wk@g10code.com>
+
+ * primegen.c (prime_generate_internal): Tweaked use of secure
+ memory and entropy use. Safe unused primes from the pool. Allocate
+ at least a pool of 30.
+ (save_pool_prime, get_pool_prime): New.
+
+2006-10-23 Werner Koch <wk@g10code.com>
+
+ * ac.c (_gcry_ac_data_from_sexp): Reset sexp_tmp for failsafe
+ means. Release sexp_cur if needed. Reported by Dirk Stoecker.
+
+ * pubkey.c (pubkeys_registered_lock): Intialized it. It is not
+ realy needed because this is a mere initialization to 0 anyway.
+ Noted by Victor Stinner.
+
+2006-10-17 Werner Koch <wk@g10code.com>
+
+ * dsa.c (_gcry_dsa_generate2): New.
+ (generate): New arg QBITS. Add sanity checks for reasonable qbits
+ and nbits.
+ * pubkey.c (gcry_pk_genkey): Parse an qbits element.
+ (pubkey_generate): New arg QBITS. Pass it to the DSA generation.
+
+2006-10-05 Werner Koch <wk@g10code.com>
+
+ * md.c (gcry_md_algo_info) <get_asnoid>: Check that the algo is
+ available.
+
+2006-10-04 David Shaw <dshaw@jabberwocky.com> (wk)
+
+ * tiger.c (round): Rename to tiger_round as gcc 4 has a built-in
+ round function that this conflicts with.
+
+2006-09-11 Werner Koch <wk@g10code.com>
+
+ * rndw32.c (slow_gatherer_windowsNT): While adding data use the
+ size of the diskPerformance and not its address. Has been fixed in
+ GnuPG more than a year ago. Noted by Lee Fisher.
+
+2006-08-30 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (sexp_data_to_mpi): Need to allow "ripemd160" here as
+ this is the canonical name.
+
+2006-08-29 Hye-Shik Chang <perky@FreeBSD.org> (wk)
+
+ * seed.c: New.
+
+2006-08-03 Werner Koch <wk@g10code.com>
+
+ * random-daemon.c (_gcry_daemon_initialize_basics): Don't
+ initialize the socket. Remove arg SOCKETNAME.
+ (connect_to_socket): Make sure that daemon is set to -1 on error.
+ (call_daemon): Initialize the socket on the first call.
+ (_gcry_daemon_randomize, _gcry_daemon_get_random_bytes)
+ (_gcry_daemon_create_nonce): New arg SOCKETNAME.
+ * random.c (initialize): Call new daemon initializator.
+ (get_random_bytes, gcry_randomize, gcry_create_nonce): Pass socket
+ name to daemon call and reset allow_daemon on failure.
+
+2006-07-26 Werner Koch <wk@g10code.com>
+
+ * rmd160.c (_gcry_rmd160_mixblock): Add cast to transform call.
+
+ * blowfish.c (selftest): Cast string to usnigned char*.
+
+ * primegen.c (prime_generate_internal): Cast unsigned/char*
+ mismatch in calling m_out_of_n.
+ (is_prime): Changed COUNT to unsigned int *.
+
+ * ac.c (_gcry_ac_data_copy): Initialize DATA_MPIS.
+
+ * random.c (gcry_create_nonce): Update the pid after a fork.
+ Reported by Uoti Urpala.
+
+2006-07-04 Marcus Brinkmann <marcus@g10code.de>
+
+ * sha512.c: Fix typo in copyright notice.
+
+2006-06-21 Werner Koch <wk@g10code.com>
+
+ * rsa.c (_gcry_rsa_generate): Replace xcalloc by calloc.
+ * pubkey.c (gcry_pk_encrypt, gcry_pk_sign): Ditto.
+ (sexp_to_key, sexp_to_sig, sexp_to_enc, gcry_pk_encrypt)
+ (gcry_pk_sign, gcry_pk_genkey, gcry_pk_get_keygrip): Ditto.
+ * md.c (md_copy): Ditto.
+
+2006-04-22 Moritz Schulte <moritz@g10code.com>
+
+ * random-daemon.c (_gcry_daemon_initialize_basics): New argument:
+ SOCKETNAME. Passing on to connect_to_socket() if non-NULL.
+ (connect_to_socket, writen, readn, call_daemon): New functions.
+ (_gcry_daemon_randomize, _gcry_daemon_get_random_bytes)
+ (_gcry_daemon_create_nonce): Call call_daemon().
+ (RANDOM_DAEMON_SOCKET): New symbol.
+ (daemon_socket): New static variable.
+
+ * random.h (_gcry_daemon_initialize_basics): New parameter:
+ SOCKETNAME.
+ (_gcry_set_random_daemon_socket): New declaration.
+
+ * random.c (initialize_basics): Pass DAEMON_SOCKET_NAME to
+ _gcry_daemon_initialize_basics.
+ (_gcry_set_random_daemon_socket): New function, setting
+ DAEMON_SOCKET_NAME.
+
+2006-04-01 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (eme_pkcs_v1_5_encode): Use KEY_SIZE directly, no need to
+ call gcry_ac_key_get_nbits.
+ (eme_pkcs_v1_5_decode): Likewise.
+ (ac_es_dencode_prepare_pkcs_v1_5): Fill options_em structure with
+ key_size.
+ (_gcry_ac_data_dump, gcry_ac_data_dump): New functions.
+ (_gcry_ac_data_to_sexp, _gcry_ac_data_from_sexp): More or less
+ rewritten; changed S-Expression format so that it matches the one
+ used in pubkey.c.
+
+2006-03-15 Werner Koch <wk@g10code.com>
+
+ * random-daemon.c: New.
+ * random.c (_gcry_use_random_daemon): New.
+ (get_random_bytes, gcry_randomize, gcry_create_nonce): Try
+ diverting to the daemon functions.
+
+2006-03-14 Werner Koch <wk@g10code.com>
+
+ * random.c (lock_seed_file): New.
+ (read_seed_file, _gcry_update_random_seed_file): Use it.
+
+ * random.c (gcry_create_nonce): Detect a fork and re-seed.
+ (read_pool): Fixed the fork detection; it used to work only for
+ multi-threaded processes.
+
+2006-03-12 Brad Hards <bradh@frogmouth.net> (wk)
+
+ * md.c (md_open): Use new variable macpads_Bsize instead of
+ hardwiring the block size. Changed at all places.
+
+2006-03-10 Brad Hards <bradh@frogmouth.net> (wk, patch 2005-04-22)
+
+ * md.c, sha256.c: Add support for SHA-224.
+ (sha224_init): New.
+
+2006-01-18 Brad Hards <bradh@frogmouth.net> (wk 2006-03-07)
+
+ * cipher.c (cipher_encrypt, cipher_decrypt, do_ofb_encrypt)
+ (do_ofb_decrypt, gcry_cipher_open): Implement Output Feedback Mode.
+
+2005-11-02 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_algo_name): Return "?" instead of NULL for
+ unknown algorithm IDs.
+ * cipher.c (cipher_algo_to_string): Likewise.
+
+2005-11-01 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_algo_info): Don't forget to break after switch
+ case.
+
+2005-09-19 Werner Koch <wk@g10code.com>
+
+ * dsa.c (generate): Add preliminary support for 2 and 4 keys.
+ Return an error code if the key size is not supported.
+ (_gcry_dsa_generate): Return an error.
+
+2005-08-22 Werner Koch <wk@g10code.com>
+
+ * primegen.c (check_prime): New arg RM_ROUNDS.
+ (prime_generate_internal): Call it here with 5 rounds as used
+ before.
+ (gcry_prime_check): But here with 64 rounds.
+ (is_prime): Make sure never to use less than 5 rounds.
+
+2005-04-16 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_init): New function.
+
+2005-04-12 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_io_write, _gcry_ac_io_read): Initialize err to
+ make the compiler happy.
+ Always use errno, now that gcry_malloc() is guaranteed to set
+ errno on failure.
+ (_gcry_ac_data_to_sexp): Don't forget to goto out after error in
+ loop.
+ (_gcry_ac_data_to_sexp): Remove unused variable: mpi_list;
+ (_gcry_ac_data_to_sexp): Always deallocate sexp_buffer.
+ (_gcry_ac_data_from_sexp): Don't forget to initialize data_set_new.
+ (_gcry_ac_data_from_sexp): Handle special case, which is
+ necessary, since gcry_sexp_nth() does not distinguish between
+ "element does not exist" and "element is the empty list".
+ (_gcry_ac_io_init_va): Use assert to make sure that mode and type
+ are correct.
+ Use gcry_error_t types where gcry_err_code_t types have been used
+ before.
+
+2005-04-11 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_data_sign_scheme): Don't forget to initialize
+ buffer.
+
+ * whirlpool.c: New file.
+ * md.c (digest_table): Add whirlpool.
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Added: whirlpool.c.
+
+2005-03-30 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (_gcry_ac_data_from_sexp): Use length of SEXP_CUR, not
+ length of SEXP; do not forget to set SEXP_TMP to NULL after it has
+ been released.
+
+ (struct gcry_ac_mpi): New member: name_provided.
+ (_gcry_ac_data_set): Rename variable `name_final' to `name_cp';
+ remove const qualifier; change code to not cast away const
+ qualifiers; use name_provided member as well.
+ (_gcry_ac_data_set, _gcry_ac_data_get_name): Use name_provided
+ member of named mpi structure.
+
+ (gcry_ac_name_to_id): Do not forget to initialize err.
+ (_gcry_ac_data_get_index): Do not forget to initialize mpi_return;
+ use gcry_free() instead of free(); remove unnecessary cast; rename
+ mpi_return and name_return to mpi_cp and name_cp; adjust code.
+ (ac_data_mpi_copy): Do not cast away const qualifier.
+ (ac_data_values_destroy): Likewise.
+ (ac_data_construct): Likewise.
+
+ (ac_data_mpi_copy): Initialize flags to GCRY_AC_FLAG_DEALLOC.
+ (ac_data_extract): Use GCRY_AC_FLAG_DEALLOC instead of
+ GCRY_AC_FLAG_COPY.
+
+ (_gcry_ac_io_init_va, _gcry_ac_io_init, gcry_ac_io_init)
+ (gcry_ac_io_init_va, _gcry_ac_io_write, _gcry_ac_io_read)
+ (_gcry_ac_io_read_all, _gcry_ac_io_process): New functions.
+ (gry_ac_em_dencode_t): Use gcry_ac_io_t in prototype instead of
+ memroy strings directly; adjust encode/decode functions to use io
+ objects.
+ (emsa_pkcs_v1_5_encode_data_cb): New function ...
+ (emsa_pkcs_v1_5_encode): ... use it here.
+ (ac_data_dencode): Use io objects.
+ (_gcry_ac_data_encode, _gcry_ac_data_decode, gcry_ac_data_encode)
+ (gcry_ac_data_decode): Likewise.
+ (_gcry_ac_data_encrypt_scheme, gcry_ac_data_encrypt_scheme)
+ (_gcry_ac_data_decrypt_scheme, gcry_ac_data_decrypt_scheme)
+ (_gcry_ac_data_sign_scheme, gcry_ac_data_sign_scheme)
+ (_gcry_ac_data_verify_scheme, gcry_ac_data_verify_scheme):
+ Likewise.
+
+2005-03-23 Werner Koch <wk@g10code.com>
+
+ * rndw32.c (_gcry_rndw32_gather_random_fast): While adding data
+ use the size of the object and not the one of its address. Bug
+ reported by Sascha Kiefer.
+
+2005-03-19 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (do_cbc_encrypt): Be careful to not overwrite data,
+ which is to be used later on. This happend, in case CTS is
+ enabled and OUTBUF is equal to INBUF.
+
+2005-02-25 Werner Koch <wk@g10code.com>
+
+ * pubkey.c (gcry_pk_get_keygrip): Allow for shadowed-private-key.
+
+2005-02-13 Moritz Schulte <moritz@g10code.com>
+
+ * serpent.c: Updated from 1.2 branch:
+
+ s/u32_t/u32/ and s/byte_t/byte/. Too match what we have always
+ used and are using in all other files too
+ (serpent_test): Moved prototype out of a fucntion.
+
+2005-02-07 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: Major parts rewritten.
+ * pubkey.c (_gcry_pk_get_elements): New function.
+
+2004-12-09 Werner Koch <wk@g10code.com>
+
+ * serpent.c (serpent_setkey): Moved prototype of serpent_test to
+ outer scope.
+
+2004-09-11 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (pubkey_table): Added an alias entry for GCRY_PK_ELG_E.
+
+2004-08-23 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: Do not include <assert.h>.
+ * rndegd.c: Likewise.
+ * sha1.c: Likewise.
+ * rndunix.c: Likewise.
+ * rndlinux.c: Likewise.
+ * rmd160.c: Likewise.
+ * md5.c: Likewise.
+ * md4.c: Likewise.
+ * cipher.c: Likewise.
+ * crc.c: Likewise.
+ * blowfish.c: Likewise.
+
+ * pubkey.c (dummy_generate, dummy_check_secret_key)
+ (dummy_encrypt, dummy_decrypt, dummy_sign, dummy_verify): Return
+ err code GPG_ERR_NOT_IMPLEMENTED instead of aborting through
+ log_bug().
+ (dummy_get_nbits): Return 0 instead of aborting though log_bug().
+
+2004-08-19 Werner Koch <wk@g10code.de>
+
+ * pubkey.c (sexp_data_to_mpi): Changed the zero random byte
+ substituting code to actually do clever things. Thanks to
+ Matthias Urlichs for noting the implementation problem.
+
+2004-08-09 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_sign): Fixed memory leak; fix provided by
+ Modestas Vainius.
+
+2004-07-16 Werner Koch <wk@gnupg.org>
+
+ * rijndael.c (do_encrypt): Fix alignment problem. Bugs found by
+ Matthias Urlichs.
+ (do_decrypt): Ditto.
+ (keySched, keySched2): Use 2 macros along with unions in the key
+ schedule context.
+
+2004-07-14 Moritz Schulte <moritz@g10code.com>
+
+ * rsa.c (_gcry_rsa_decrypt): Don't forget to free "a". Thanks to
+ Nikos Mavroyanopoulos.
+
+2004-05-09 Werner Koch <wk@gnupg.org>
+
+ * random.c (read_pool): Mix the PID in to better protect after a
+ fork.
+
+2004-07-04 Moritz Schulte <moritz@g10code.com>
+
+ * serpent.c: Use "u32_t" instead of "unsigned long", do not
+ declare S-Box variables as "register". Fixes failure on
+ OpenBSD/sparc64, reported by Nikolay Sturm.
+
+2004-05-07 Werner Koch <wk@gnupg.org>
+
+ * random.c (initialize): Factored out some code to ..
+ (initialize_basics): .. new function.
+ (_gcry_random_initialize): Just call initialize_basics unless the
+ new arg FULL is set to TRUE.
+ (_gcry_fast_random_poll): Don't do anything unless the random
+ system has been really initialized.
+
+2004-05-07 Moritz Schulte <moritz@g10code.de>
+
+ * ac.c (gcry_ac_open): Do not dereference NULL pointer. Reported
+ by Umberto Salsi.
+
+2004-02-20 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (check_prime): New args CB_FUNC and CB_ARG; call them
+ at different stages. Pass these arguments through all callers.
+
+2004-02-06 Werner Koch <wk@gnupg.org>
+
+ * des.c: Add a new OID as used by pkcs#12.
+
+ * rfc2268.c: New. Taken from libgcrypt.
+ * cipher.c: Setup the rfc2268 algorithm.
+
+2004-01-25 Moritz Schulte <mo@g10code.com>
+
+ * primegen.c (prime_generate_internal): Do not forget to free
+ `q_factor'; fixed by Brieuc Jeunhomme.
+ (prime_generate_internal): Do not forget to free `prime'.
+
+2004-01-14 Moritz Schulte <mo@g10code.com>
+
+ * ac.c (gcry_ac_data_set): New argument: flags; slightly
+ rewritten.
+ (gcry_ac_data_get_name, gcry_ac_data_get_index): Likewise.
+ (gcry_ac_key_pair_generate): New argument: misc_data; modified
+ order of arguments.
+ (gcry_ac_key_test): New argument: handle.
+ (gcry_ac_key_get_nbits, gcry_ac_key_get_grip): Likewise.
+ Use GCRY_AC_FLAG_NO_BLINDING instead of
+ GCRY_AC_DATA_FLAG_NO_BLINDING.
+ (gcry_ac_mpi): New member: flags.
+ (gcry_ac_data_search, gcry_ac_data_add): Removed functions.
+
+2003-12-22 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (is_prime): Release A2.
+
+2003-12-19 Werner Koch <wk@gnupg.org>
+
+ * md.c: Moved a couple of functions down below the data structure
+ definitions.
+ (struct gcry_md_context): New field ACTUAL_HANDLE_SIZE.
+ (md_open): Set it here.
+ (strcut gcry_md_list): New field ACTUAL_STRUCT_SIZE.
+ (md_enable): Set it here.
+ (md_close): Wipe the context memory.
+ secure memory.
+ * cipher.c (struct gcry_cipher_handle): New field ACTUAL_HANDLE_SIZE.
+ (gcry_cipher_open): Set it here.
+ (gcry_cipher_close): Use it to always wipe out the handle data.
+
+ * ac.c (gcry_ac_open): Make sure HANDLE gets initialized even when
+ the function is not successful.
+ (gcry_ac_close): Allow a NULL handle.
+ (gcry_ac_key_destroy, gcry_ac_key_pair_destroy): Ditto.
+ (gcry_ac_key_get_grip): Return INV_OBJ on error.
+
+ * primegen.c (prime_generate_internal): Fixed error code for
+ failed malloc. Replaced the !err if chain by gotos.
+ (gcry_prime_group_generator): Remove the extra sanity check.
+
+ * md.c: Minor code and comment cleanups.
+
+2003-12-16 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): Doc fix. Thanks to Newton Hammet.
+
+2003-12-11 Werner Koch <wk@gnupg.org>
+
+ * rndunix.c (slow_poll): Don't use #warning but #error.
+
+ * rndegd.c: Changed indentation.
+ (my_make_filename): Removd the var_arg cruft becuase we
+ don't need it here. Changed caller.
+
+ * rndlinux.c: Changed indentation.
+ (open_device): Remove the superfluous stat call and clarify
+ comment.
+
+ * rsa.c: Changed indentation.
+ (secret): Use the standard algorithm if p, q and u are not
+ available.
+ (rsa_blind, rsa_unblind): Renamed from _gcry_rsa_blind,
+ _gcry_rsa_unblind and moved more to the top.
+
+ * md4.c: Changed indentation. Removed unnecessary casts.
+ * md5.c, rmd160.c, sha1.c, tiger.c: Ditto.
+ * rijndael.c, twofish.c: Ditto.
+ * serpent.c: Removed unnecessary casts.
+ * sha256.c, sha512.c: Ditto.
+
+2003-12-09 Werner Koch <wk@gnupg.org>
+
+ * dsa.c: Unified indentation style.
+ * elgamal.c: Ditto.
+ * des.c (des_key_schedule): Code beautifications.
+ * blowfish.c: Changed indentation style.
+ * cast5.c (do_cast_setkey): Ditto.
+
+ * pubkey.c (gcry_pk_encrypt): Replaced the chain of if(!err) tests
+ by straightforward gotos. Other cleanups.
+ (gcry_pk_decrypt): Ditto.
+ (gcry_pk_sign): Ditto.
+ (gcry_pk_verify): Ditto.
+ (gcry_pk_genkey): Ditto. Use strtoul instead of strtol.
+ (gcry_pk_ctl): Use GPG_ERR_INV_ARG to indicate bad arguments.
+
+2003-12-07 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_register_default): Undef the helper macro.
+ (gcry_pk_map_name): Allow NULL for string.
+ (sexp_to_key): Use memcpy and not strncpy. Use gcry_free and not
+ free.
+ (sexp_to_sig): Ditto.
+ (sexp_to_enc): Ditto. Replaced the chain of if(!err) tests by
+ straightforward gotos.
+
+2003-12-05 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Documentation cleanups.
+ (gcry_cipher_mode_from_oid): Allow NULL for STRING.
+
+2003-12-03 Werner Koch <wk@gnupg.org>
+
+ * elgamal.c (sign, do_encrypt, gen_k): Make sure that a small K is
+ only used for encryption.
+
+2003-11-18 Werner Koch <wk@gnupg.org>
+
+ * random.h (rndw32_set_dll_name): Removed unused prototype.
+
+ * Makefile.am (EXTRA_DIST): Added Manifest.
+
+2003-11-11 Werner Koch <wk@gnupg.org>
+
+ * Manifest: New.
+
+2003-11-04 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Use shortcut for SHA1
+ * sha1.c (_gcry_sha1_hash_buffer): New.
+
+ * random.c: Reformatted most functions.
+ (mix_pool): Moved the failsafe_digest from global
+ scope to here.
+ (do_fast_random_poll): Use the generic fucntions even if a fast
+ gathering function has been used.
+ (read_pool): Detect a fork and retry.
+ (gcry_randomize, get_random_bytes): Don't distinguish anymore
+ between weak and strong random.
+ (gcry_create_nonce): New.
+
+2003-10-31 Werner Koch <wk@gnupg.org>
+
+ * rndw32.c (slow_gatherer_windowsNT): Use a plain buffer for the
+ disk performance values and not the W32 API structure.
+
+ * dsa.c (verify): s/exp/ex/ due to shadowing of a builtin.
+ * elgamal.c (verify): Ditto.
+
+ * ac.c (gcry_ac_data_get_index): s/index/idx/
+ (gcry_ac_data_copy_internal): Remove the cast in _gcry_malloc.
+ (gcry_ac_data_add): Must use gcry_realloc instead of realloc.
+ * pubkey.c (sexp_elements_extract): s/index/idx/ as tribute to the
+ forehackers.
+ (gcry_pk_encrypt): Removed shadowed definition of I. Reordered
+ arguments to malloc for clarity.
+ (gcry_pk_sign, gcry_pk_genkey): Ditto.
+ * primegen.c (prime_generate_internal): s/random/randomlevel/.
+
+2003-10-27 Moritz Schulte <mo@g10code.com>
+
+ * pubkey.c (gcry_pk_encrypt): Don't forget to deallocate pkey.
+
+2003-10-27 Werner Koch <wk@gnupg.org>
+
+ * random.c (gcry_random_add_bytes): Return if buflen is zero to
+ avoid gcc warning about unsed parameter.
+ (MASK_LEVEL): Simplified; does now work for signed and unsigned
+ w/o warnings.
+
+ * md.c (md_start_debug): Removed the const from SUFFIX, because
+ this function is called from the control fucntion which does not
+ require const.
+
+ Prefixed all (pubkey,digest,cipher}_spec_* globale variables with
+ _gcry_.
+
+ * ac.c (ac_key_identifiers): Made static.
+
+ * random.c (getfnc_gather_random,getfnc_fast_random_poll): Move
+ prototypes to ..
+ * rand-internal.h: .. here
+ * random.c (getfnc_gather_random): Include rndw32 gatherer.
+ * rndunix.c, rndw32.c, rndegd.c: Include them here.
+ * rndlinux.c (_gcry_rndlinux_gather_random): Prepend the _gcry_
+ prefix. Changed all callers.
+ * rndegd.c (_gcry_rndegd_gather_random): Likewise.
+ (_gcry_rndegd_connect_socket): Likewise.
+ * rndunix.c (_gcry_rndunix_gather_random): Likewise.
+ (waitpid): Made static.
+ * rndw32.c: Removed the old and unused winseed.dll cruft.
+ (_gcry_rndw32_gather_random_fast): Renamed from
+ gather_random_fast.
+ (_gcry_rndw32_gather_random): Renamed from gather_random. Note,
+ that the changes 2003-04-08 somehow got lost.
+
+ * sha512.c (sha512_init, sha384_init): Made static.
+
+ * cipher.c (do_ctr_decrypt): Removed "return" from this void
+ function.
+
+2003-10-24 Moritz Schulte <mo@g10code.com>
+
+ * serpent.c: Fix an issue on big-endian systems.
+
+ * rndw32.c: Removed IS_MODULE -cruft.
+ * rndlinux.c (rndlinux_gather_random): Likewise.
+
+2003-10-10 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): Bail out if NBITS is less than 16.
+ (prime_generate_internal): Initialize prime variable to suppress
+ compiler warning. Check pbits, initialize qbits when passed as
+ zero.
+
+ * primegen.c (prime_generate_internal): New arg
+ ALL_FACTORS. Changed all callers.
+ (gcry_prime_generate): Make the factors arg optional. Request
+ all_factors. Make sure PRIME is set to NULL even on error.
+ (gcry_prime_group_generator): New.
+ (gcry_prime_release_factors): New.
+
+2003-10-06 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): Assert that NBITS is never zero, it
+ would cause a segv.
+
+2003-09-28 Moritz Schulte <mo@g10code.com>
+
+ * ac.c: Include "cipher.h".
+
+2003-09-27 Moritz Schulte <mo@g10code.com>
+
+ * rndegd.c (do_read): Return nread instead of nbytes; thanks to
+ Michael Caerwyn.
+
+2003-09-04 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (_gcry_pk_aliased_algo_name): New.
+ * ac.c (gcry_ac_open): Use it here.
+
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Add serpent.c
+
+2003-09-02 Moritz Schulte <mo@g10code.com>
+
+ * primegen.c (gcry_prime_check, gcry_prime_generate): New
+ functions.
+ (prime_generate_internal): New function, based on
+ _gcry_generate_elg_prime.
+ (_gcry_generate_elg_prime): Rewritten as a wrapper for
+ prime_generate_internal.
+
+2003-08-28 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_encrypt): Don't include the flags list in the
+ return value. This does not make sense and breaks any programs
+ parsing the output strictly (e.g. current gpgsm).
+ (gcry_pk_encrypt): If aliases for the algorithm name exists, take
+ the first one instead of the regular name to adhere to SPKI
+ conventions.
+ (gcry_pk_genkey): Ditto.
+ (gcry_pk_sign): Ditto. Removed unused KEY_ALGO_NAME.
+
+2003-08-19 Moritz Schulte <mo@g10code.com>
+
+ * cipher.c: Add support for Serpent
+ * serpent.c: New file.
+
+2003-08-10 Moritz Schulte <moritz@g10code.com>
+
+ * rsa.c (_gcry_rsa_blind, _gcry_rsa_unblind): Declare static.
+
+2003-08-09 Timo Schulz <twoaday@freakmail.de>
+
+ * random.c (getfnc_gather_random): Don't check NAME_OF_DEV_RANDOM
+ two times, but also the NAME_OF_DEV_URANDOM device.
+
+2003-08-08 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_to_enc): Fixed extraction of S-Expression: do not
+ fail if no `flags' sub S-Expression is found.
+
+2003-07-27 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_lookup_func_oid): Allow for empty OID lists.
+
+2003-07-23 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (gcry_ac_data_construct): New argument: include_flags, only
+ include `flags' S-expression, if include_flags is true. Adjust
+ callers. Thanks for triggering a bug caused by `flags'
+ sub-S-expression where they are not expected to Ralf Schneider.
+
+2003-07-21 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_lookup_func_name): Use new member name
+ `aliases' instead of `sexp_names'.
+
+ * ac.c (gcry_ac_key_data_get): New function.
+
+ * cipher.c (gcry_cipher_lookup_func_name): Fix return value.
+
+2003-07-20 Moritz Schulte <moritz@g10code.com>
+
+ * blowfish.c: Adjusted for new gcry_cipher_spec_t structure.
+ * cast5.c: Likewise.
+ * twofish.c: Likewise.
+ * arcfour.c: Likewise.
+ * rijndael.c (rijndael_oids, rijndael192_oids, rijndael256_oids):
+ New variables, adjust for new gcry_cipher_spec_t structure.
+ * des.c (oids_tripledes): New variable, adjust for new
+ gcry_cipher_spec_t structure.
+
+ * md.c (oid_table): Removed.
+
+ * tiger.c (oid_spec_tiger): New variable.
+ (digest_spec_tiger): Adjusted for new gry_md_spec_t structure.
+
+ * sha512.c (oid_spec_sha512): New variable.
+ (digest_spec_sha512): Adjusted for new gry_md_spec_t structure.
+
+ * sha512.c (oid_spec_sha384): New variable.
+ (digest_spec_sha384): Adjusted for new gry_md_spec_t structure.
+
+ * sha256.c (oid_spec_sha256): New variable.
+ (digest_spec_sha256): Adjusted for new gry_md_spec_t structure.
+
+ * sha1.c (oid_spec_sha1): New variable.
+ (digest_spec_sha1): Adjusted for new gry_md_spec_t structure.
+
+ * rmd160.c (oid_spec_rmd160): New variable.
+ (digest_spec_rnd160): Adjusted for new gry_md_spec_t structure.
+
+ * md5.c (oid_spec_md5): New variable.
+ (digest_spec_md5): Adjusted for new gry_md_spec_t structure.
+
+ * md4.c (oid_spec_md4): New variable.
+ (digest_spec_md4): Adjusted for new gry_md_spec_t structure.
+
+ * crc.c (digest_spec_crc32, digest_spec_crc32_rfc1510,
+ digest_spec_crc32_rfc2440): Adjusted for new gry_md_spec_t
+ structure.
+
+2003-07-19 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (gcry_md_lookup_func_oid): New function.
+ (search_oid): New function, copied from cipher.c.
+ (gcry_md_map_name): Adjust for new search_oid_interface.
+
+ * cipher.c (oid_table): Removed table.
+ (gcry_cipher_lookup_func_oid): New function.
+ (search_oid): Rewritten to use the module functions.
+ (gcry_cipher_map_name): Adjust for new search_oid interface.
+ (gcry_cipher_mode_from_oid): Likewise.
+
+2003-07-18 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Convert ERR to gpg_error_t in
+ gpg_strerror.
+
+2003-07-14 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (gcry_cipher_lookup_func_name): Also check the cipher
+ name aliases, not just the primary name.
+ (gcry_cipher_map_name): Remove kludge for aliasing Rijndael to
+ AES.
+
+ * arcfour.c, blowfish.c, cast5.c, des.c, twofish.c: Adjust cipher
+ specification structures.
+
+ * rijndael.c (rijndael_names, rijndael192_names,
+ rijndael256_names): New variables, use them in the cipher
+ specifications.
+
+ * rmd160test.c: Removed file.
+
+ * ac.c, arcfour.c, blowfish.c, cast5.c, cipher.c, des.c, dsa.c,
+ elgamal.c, md.c, pubkey.c, random.c, rijndael.c, rsa.c, twofish.c:
+ Used gcry_err* wrappers for libgpg symbols.
+
+ * primegen.c (gen_prime): Correct the order arguments to
+ extra_check.
+
+2003-07-12 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: Replaced all public occurences of gpg_error_t with
+ gcry_error_t.
+ * cipher.c: Likewise.
+ * md.c: Likewise.
+ * pubkey.c: Likewise.
+ * random.c: Likewise.
+
+ * cipher.c: Added support for TWOFISH128.
+
+2003-07-08 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (gcry_ac_data_copy_internal): New function, based on
+ gcry_ac_data_copy.
+ (gcry_ac_data_copy): Made public, use gcry_ac_data_copy_internal.
+ (gcry_ac_key_init): Use gcry_ac_data_copy_internal.
+
+2003-07-07 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c (gcry_ac_data_set): Only release old MPI value if it is
+ different from the new value. Bug reported by Simon Josefsson
+ <jas@extundo.com>.
+
+ * pubkey.c (gcry_pk_list): New function.
+ * md.c (gcry_md_list): New function.
+
+ * ac.c (gcry_ac_key_pair_generate): Fix calculation of format
+ string size.
+
+2003-07-05 Moritz Schulte <moritz@g10code.com>
+
+ * md.c: Named struct of digest_table `digest_table_entry'.
+ (digest_table_entry): New member: algorithm; filled in.
+ (digest_table_entry): Removed unused member: flags.
+ (gcry_md_register): New argument: algorithm_id, filled in.
+ (gcry_md_register_default): Used algorithm ID from module
+ structure.
+ (gcry_md_map_name): Likewise.
+ (md_enable): Likewise.
+ (md_read): Likewise.
+ (gcry_md_info): Likewise.
+
+ * pubkey.c: Named truct for pubkey_table `pubkey_table_entry'.
+ (pubkey_table_entry): New member: algorithm; filled in.
+ (gcry_pk_register_default): Used algorithm ID from pubkey_table.
+ (gcry_pk_register): New argument: algorithm_id, filled in.
+ (gcry_pk_map_name): Used algorithm ID from module structure.
+ (gcry_pk_decrypt): Likewise.
+ (gcry_pk_encrypt): Likewise.
+ (gcry_pk_verify): Likewise.
+ (gcry_pk_sign): Likewise.
+ (gcry_pk_testkey): Likewise.
+ (gcry_pk_genkey): Likewise.
+ (gcry_pk_get_nbits): Likewise.
+ (sexp_to_key): Removed unused variable: algo.
+ (sexp_to_sig): Likewise.
+
+ * cipher.c: Named struct for cipher_table `cipher_table_entry'.
+ (cipher_table_entry): New member: algorithm; filled in.
+ (gcry_cipher_register_default): Used algorithm ID from
+ cipher_table.
+ (gcry_cipher_register): New argument: algorithm_id, filled in.
+ (gcry_cipher_map_name): Used algorithm ID from module structure.
+
+ * arcfour.c (cipher_spec_arcfour): Removed algorithm ID.
+ * blowfish.c (cipher_spec_blowfish): Likewise.
+ * cast5.c (cipher_spec_cast5): Likewise.
+ * crc.c (digest_spec_crc32): Likewise.
+ * crc.c (digest_spec_crc32_rfc1510): Likewise.
+ * crc.c (digest_spec_crc32_rfc2440): Likewise.
+ * des.c (cipher_spec_des): Likewise.
+ * des.c (cipher_spec_tripledes): Likewise.
+ * dsa.c (pubkey_spec_dsa): Likewise.
+ * elgamal.c (pubkey_spec_elg): Likewise.
+ * md4.c (digest_spec_md4): Likewise.
+ * md5.c (digest_spec_md5): Likewise.
+ * aes.c (cipher_spec_aes): Likewise.
+ * aes.c (cipher_spec_aes192): Likewise.
+ * aes.c (cipher_spec_aes256): Likewise.
+ * rsa.c (pubkey_spec_rsa): Likewise.
+ * sha1.c (digest_spec_sha1): Likewise.
+ * sha256.c (digest_spec_sha256): Likewise.
+ * sha512.c (digest_spec_sha512): Likewise.
+ * tiger.c (digest_spec_tiger): Likewise.
+ * twofish.c (cipher_spec_twofish): Likewise.
+ * twofish.c (cipher_spec_twofish128): Likewise.
+
+ * Makefile.am (EXTRA_libcipher_la_SOURCES): Fix list of source
+ files; reported by Simon Josefsson <jas@extundo.com>.
+
+ * pubkey.c: Replaced all occurences of `id' with `algorithm',
+ since `id' is a keyword in obj-c.
+ * md.c: Likewise.
+ * cipher.c: Likewise.
+
+ * crc.c, md4.c, md5.c, rmd160.c, sha1.c, sha256.c, tiger.c:
+ Replaced all occurences of gcry_digest_spec_t with gcry_md_spec_t.
+
+ * dsa.c, rsa.c, elgamal.c: Replaced all occurencens of
+ gcry_pubkey_spec_t with gcry_pk_spec_t.
+
+ * md.c: Replaced all occurences of gcry_digest_spec_t with
+ gcry_md_spec_t.
+ (gcry_digest_register_default): Renamed to ...
+ (gcry_md_register_default): ... this; adjusted callers.
+ (gcry_digest_lookup_func_name): Renamed to ...
+ (gcry_md_lookup_func_name): ... this; adjusted callers.
+ (gcry_digest_lookup_name): Renamed to ...
+ (gcry_md_lookup_name): ... this; adjusted callers.
+ (gcry_digest_register): Renamed to ...
+ (gcry_md_register): ... this.
+ (gcry_digest_unregister): Renamed to ...
+ (gcry_md_unregister): ... this.
+
+ * pubkey.c (gcry_pubkey_register): Renamed to ...
+ (gcry_pk_register): ... this.
+ (gcry_pubkey_unregister): Renamed to ...
+ (gcry_pk_unregister): ... this.
+ Replaced all occurences of gcry_pubkey_spec_t with gcry_pk_spec_t.
+ (gcry_pubkey_register_default): Renamed to ...
+ (gcry_pk_register_default): ... this; adjusted callers.
+ (gcry_pubkey_lookup_func_name): Renamed to ...
+ (gcry_pk_lookup_func_name): ... this; adjusted callers.
+ (gcry_pubkey_lookup_name): Renamed to ...
+ (gcry_pk_lookup_name): ... this; adjusted callers.
+
+ * md.c (gcry_md_hash_buffer): Fix error checking. Thanks to Simon
+ Josefsson <jas@extunde.com>.
+
+2003-07-04 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (gcry_cipher_list): New function.
+
+2003-07-01 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_to_sig): Accept a `flags' S-expression to be more
+ consistent with sexp_to_enc.
+
+2003-06-30 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (libcipher_la_SOURCES): Added: ac.c.
+
+ * pubkey.c (_gcry_pk_module_lookup): New function.
+ (_gcry_pk_module_release): New function.
+
+2003-06-29 Moritz Schulte <moritz@g10code.com>
+
+ * ac.c: New file.
+
+2003-06-26 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Trigger BUG correcly with new API.
+
+2003-06-19 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_is_enabled): Fixed.
+
+2003-06-18 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_get_algo_keylen): New.
+ (gcry_cipher_get_algo_blklen): New.
+
+2003-06-18 Moritz Schulte <moritz@g10code.com>
+
+ * arcfour.c, cipher.c, blowfish.c, md.c, cast5.c, pubkey.c, crc.c,
+ des.c, dsa.c, elgamal.c, md4.c, md5.c, random.c, rijndael.c,
+ rmd160.c, rsa.c, sha1.c, sha256.c, sha512.c, tiger.c, twofish.c:
+ Replaced older types GcryDigestSpec, GcryCipherSpec and
+ GcryPubkeySpec with newer types: gcry_digest_spec_t,
+ gcry_cipher_spec_t and gcry_pubkey_spec_t.
+
+ * md.c (gcry_digest_id_new): Removed function.
+ (gcry_digest_register): Removed code for generating a new module
+ ID.
+
+ * pubkey.c (gcry_pubkey_id_new): Removed function.
+ (gcry_pubkey_register): Removed code for generating a new module
+ ID.
+
+ * cipher.c, md.c, pubkey.c: Replace old type GcryModule with newer
+ one: gcry_module_t.
+ (gcry_cipher_id_new): Removed function.
+ (gcry_cipher_register): Removed code for generating a new module
+ ID.
+
+ * cipher.c (gcry_cipher_register): Adjust call to
+ _gcry_module_add.
+ (gcry_cipher_register_default): Likewise.
+ * pubkey.c (gcry_pubkey_register_default): Likewise.
+ (gcry_pubkey_register): Likewise.
+ * md.c (gcry_digest_register_default): Likewise.
+ (gcry_digest_register): Likewise.
+
+ * md.c (gcry_digest_lookup_func_id): Removed function.
+ (gcry_digest_lookup_id): Likewise.
+ (gcry_digest_id_new): Use _gcry_module_lookup_id instead of
+ gcry_digest_lookup_id.
+ (digest_algo_to_string): Likewise.
+ (check_digest_algo): Likewise.
+ (md_enable): Likewise.
+ (md_digest_length): Likewise.
+ (md_asn_oid): Likewise.
+
+ * pubkey.c (gcry_pubkey_lookup_id): Removed function.
+ (gcry_pubkey_lookup_func_id): Likewise.
+ (gcry_pubkey_id_new): Use _gcry_module_lookup_id instead of
+ gcry_pubkey_id_new.
+ (gcry_pk_algo_name): Likewise.
+ (disable_pubkey_algo): Likewise.
+ (check_pubkey_algo): Likewise.
+ (pubkey_get_npkey): Likewise.
+ (pubkey_get_nskey): Likewise.
+ (pubkey_get_nsig): Likewise.
+ (pubkey_get_nenc): Likewise.
+ (pubkey_generate): Likewise.
+ (pubkey_check_secret_key): Likewise.
+ (pubkey_encrypt): Likewise.
+ (pubkey_decrypt): Likewise.
+ (pubkey_sign): Likewise.
+ (pubkey_verify): Likewise.
+ (gcry_pk_algo_info): Likewise.
+
+ * cipher.c (gcry_cipher_lookup_func_id): Removed function.
+ (gcry_cipher_lookup_id): Likewise.
+ (cipher_algo_to_string): use _gcry_module_lookup_id instead of
+ gcry_cipher_lookup_id.
+ (disable_cipher_algo): Likewise.
+ (check_cipher_algo): Likewise.
+ (cipher_get_blocksize): Likewise.
+ (gcry_cipher_open): Likewise.
+ (gcry_cipher_id_new): Likewise.
+
+2003-06-17 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (GCRYPT_MODULES): Set to @GCRYPT_CIPHERS@,
+ @GCRYPT_PUBKEY_CIPHERS@, @GCRYPT_DIGESTS@ and @GCRYPT_RANDOM@.
+ (libcipher_la_DEPENDENCIES): Set to $(GCRYPT_MODULES).
+ (libcipher_la_LIBADD): Likewise.
+ (AM_CFLAGS): Added: @GPG_ERROR_CFLAGS@.
+ (EXTRA_libcipher_la_SOURCES): Added all conditional sources.
+
+ * md.c (md_open): Use _gcry_fast_random_poll instead of
+ fast_random_poll.
+ * cipher.c (gcry_cipher_open): Likewise.
+
+ * random.h (fast_random_poll): Removed macro.
+
+ * blowfish.c, md4.c, md5.c, rmd160.c, sha1.c, sha256.c, sha512.c,
+ tiger.c: Use Autoconf's WORDS_BIGENDIAN instead of our own
+ BIG_ENDIAN_HOST.
+
+2003-06-16 Moritz Schulte <moritz@g10code.com>
+
+ * random.c (getfnc_gather_random): Do not special-case
+ USE_ALL_RANDOM_MODULES, make it the default.
+
+ * dsa.c: Replace last occurences of old type names with newer
+ names (i.e. replace MPI with gcry_mpi_t).
+ * elgamal.c: Likewise.
+ * primegen.c: Likewise.
+ * pubkey.c: Likewise.
+ * rsa.c: Likewise.
+
+2003-06-14 Moritz Schulte <moritz@g10code.com>
+
+ * des.c (des_setkey): Add selftest check.
+ (tripledes_set3keys): Likewise.
+ (do_tripledes_setkey): Remove selftest check.
+ (do_des_setkey): Likewise.
+
+2003-06-11 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (_gcry_md_init): New function.
+ * cipher.c (_gcry_cipher_init): New function.
+ * pubkey.c (_gcry_pk_init): New function.
+
+2003-06-13 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_get_algo): Reverted to old API. This is a
+ convenience function anyway and error checking is not approriate.
+ (gcry_md_is_secure): New.
+ (gcry_md_is_enabled): New.
+
+2003-06-12 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_open): Make sure HANDLE is set to NULL on
+ error.
+
+2003-06-11 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_open): Make sure H receives either NULL or an
+ valid handle.
+ (gcry_md_copy): Swapped arguments so that it is more in lione with
+ md_open and most other API fucntions like memcpy (destination
+ comes first). Make sure HANDLE is set to NULL on error.
+
+ * rijndael.c (do_encrypt): Hack to force correct alignment. It
+ seems not to be not sufficient, though. We should rework this
+ fucntions and remove all these ugly casts. Let the compiler
+ optimize or have an assembler implementation.
+
+2003-06-09 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am: Removed rules serpent, since that is not commited
+ yet.
+
+2003-06-08 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_encrypt): Improve calculation for size of the
+ format string.
+
+2003-06-07 Moritz Schulte <moritz@g10code.com>
+
+ * arcfour.c, bithelp.h, blowfish.c, cast5.c, cipher.c, crc.c,
+ des.c, dsa.c, elgamal.c, md4.c, md5.c, md.c, primegen.c, pubkey.c,
+ rand-internal.h, random.c, random.h, rijndael.c, rmd160.c,
+ rmd160test.c, rmd.h, rndeged.c, rndlinux.c, rndunix.c, rndw32.c,
+ rsa.c, sha1.c, sha256.c, sha512.c, tiger.c, twofish.c: Edited all
+ preprocessor instructions to remove whitespace before the '#'.
+ This is not required by C89, but there are some compilers out
+ there that don't like it. Replaced any occurence of the now
+ deprecated type names with the new ones.
+
+2003-06-04 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_encrypt): Construct an arg_list and use
+ gcry_sexp_build_array instead of gcry_sexp_build.
+ (gcry_pk_sign): Likewise.
+ (gcry_pk_genkey): Likewise.
+
+2003-06-01 Moritz Schulte <moritz@g10code.com>
+
+ * dsa.c (_gcry_dsa_generate): Do not check wether the algorithm ID
+ does indeed belong to DSA.
+ (_gcry_dsa_sign): Likewise.
+ (_gcry_dsa_verify): Likewise.
+ (_gcry_dsa_get_nbits): Likewise.
+
+ * elgamal.c (_gcry_elg_check_secret_key): Do not check wether the
+ algorithm ID does indeed belong to ElGamal.
+ (_gcry_elg_encrypt): Likewise.
+ (_gcry_elg_decrypt): Likewise.
+ (_gcry_elg_sign): Likewise.
+ (_gcry_elg_verify): Likewise.
+ (_gcry_elg_get_nbits): Likewise.
+ (_gcry_elg_generate): Likewise.
+
+ * rsa.c (_gcry_rsa_generate): Do not check wether the algorithm ID
+ does indeed belong to RSA.
+ (_gcry_rsa_encrypt): Likewise.
+ (_gcry_rsa_decrypt): Likewise.
+ (_gcry_rsa_sign): Likewise.
+ (_gcry_rsa_verify): Likewise.
+ (_gcry_rsa_get_nbits): Likewise.
+
+2003-05-30 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (md_get_algo): Return zero in case to algorithm is enabled.
+
+ * md.c (gcry_md_info): Adjusted for new no-errno-API.
+ (md_final): Likewise.
+ (gcry_md_get_algo): Likewise.
+ * pubkey.c (gcry_pk_get_keygrip): Likewise.
+ (gcry_pk_ctl): Likewise.
+ (gcry_pk_algo_info): Likewise.
+ * des.c (selftest): Likewise.
+
+2003-05-29 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (md_enable): Do not forget to release module on error.
+ (gcry_md_open): Adjusted for new no-errno-API.
+ (md_open): Likewise.
+ (md_copy): Likewise.
+ (gcry_md_copy): Likewise.
+ (gcry_md_setkey): Likewise.
+ (gcry_md_algo_info): Likewise.
+
+ * cipher.c (gcry_cipher_open): Adjusted for new no-errno-API and
+ also fixed a locking bug.
+ (gcry_cipher_encrypt): Adjusted for new no-errno-API.
+ (gcry_cipher_decrypt): Likewise.
+ (gcry_cipher_ctl): Likewise.
+ (gcry_cipher_info): Likewise.
+ (gcry_cipher_algo_info): Likewise.
+
+2003-05-28 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (md_enable): Adjusted for libgpg-error.
+ (gcry_md_enable): Likewise.
+ (gcry_digest_register_default): Likewise.
+ (gcry_digest_register): Likewise.
+ (check_digest_algo): Likewise.
+ (prepare_macpads): Likewise.
+ (gcry_md_setkey): Likewise.
+ (gcry_md_ctl): Likewise.
+ (gcry_md_get): Likewise.
+ (gcry_md_algo_info): Likewise.
+ (gcry_md_info): Likewise.
+ * dsa.c (_gcry_dsa_generate): Likewise.
+ (_gcry_dsa_check_secret_key): Likewise.
+ (_gcry_dsa_sign): Likewie.
+ (_gcry_dsa_verify): Likewise.
+ * twofish.c (do_twofish_setkey): Likewise.
+ (twofish_setkey): Likewise.
+ * cipher.c (gcry_cipher_register): Likewise.
+
+2003-05-25 Moritz Schulte <moritz@g10code.com>
+
+ * rijndael.c (do_setkey): Adjusted for libgpg-error.
+ (rijndael_setkey): Likewise.
+ * random.c (gcry_random_add_bytes): Likewise.
+ * elgamal.c (_gcry_elg_generate): Likewise.
+ (_gcry_elg_check_secret_key): Likewise.
+ (_gcry_elg_encrypt): Likewise.
+ (_gcry_elg_decrypt): Likewise.
+ (_gcry_elg_sign): Likewise.
+ (_gcry_elg_verify): Likewise.
+ * rsa.c (_gcry_rsa_generate): Likewise.
+ (_gcry_rsa_check_secret_key): Likewise.
+ (_gcry_rsa_encrypt): Likewise.
+ (_gcry_rsa_decrypt): Likewise.
+ (_gcry_rsa_sign): Likewise.
+ (_gcry_rsa_verify): Likewise.
+ * pubkey.c (dummy_generate, dummy_check_secret_key, dummy_encrypt,
+ dummy_decrypt, dummy_sign, dummy_verify): Likewise.
+ (gcry_pubkey_register): Likewise.
+ (check_pubkey_algo): Likewise.
+ (pubkey_generate): Likewise.
+ (pubkey_check_secret_key): Likewise.
+ (pubkey_encrypt): Likewise.
+ (pubkey_decrypt): Likewise.
+ (pubkey_sign): Likewise.
+ (pubkey_verify): Likewise.
+ (sexp_elements_extract): Likewise.
+ (sexp_to_key): Likewise.
+ (sexp_to_sig): Likewise.
+ (sexp_to_enc): Likewise.
+ (sexp_data_to_mpi): Likewise.
+ (gcry_pk_encrypt): Likewise.
+ (gcry_pk_decrypt): Likewise.
+ (gcry_pk_sign): Likewise.
+ (gcry_pk_verify): Likewise.
+ (gcry_pk_testkey): Likewise.
+ (gcry_pk_genkey): Likewise.
+ (gcry_pk_ctl): Likewise.
+ * cipher.c (dummy_setkey): Likewise.
+ (check_cipher_algo): Likewise.
+ (gcry_cipher_open): Likewise.
+ (cipher_setkey): Likewise.
+ (gcry_cipher_ctl): Likewise.
+ (cipher_encrypt): Likewise.
+ (gcry_cipher_encrypt): Likewise.
+ (cipher_decrypt): Likewise.
+ (gcry_cipher_decrypt): Likewise.
+ (gcry_cipher_info): Likewise.
+ (gcry_cipher_algo_info): Likewise.
+ * cast5.c (cast_setkey): Likewise.
+ (do_cast_setkey): Likewise.
+ * arcfour.c (arcfour_setkey): Likewise.
+ (do_arcfour_setkey): Likewise.
+ * blowfish.c (do_bf_setkey): Likewise.
+ (bf_setkey): Likewise.
+ * des.c (do_des_setkey): Likewise.
+ (do_tripledes_setkey): Likewise.
+
+2003-05-22 Moritz Schulte <moritz@g10code.com>
+
+ * tiger.c: Merged code ussing the U64_C macro from GnuPG.
+
+ * sha512.c: Likewise.
+
+2003-05-17 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Fix type: acquire a lock, instead of
+ releasing it.
+
+2003-05-11 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_testkey): Call REGISTER_DEFAULT_CIPHERS.
+ (gcry_pk_ctl): Likewise.
+
+2003-04-27 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (gcry_pk_genkey): Release sexp after extracted data has
+ been used.
+
+ * md.c (gcry_md_get_algo_dlen): Simplified, simply call
+ md_digest_length to do the job.
+
+ * des.c (do_des_setkey): Check for selftest failure not only
+ during initialization.
+ (do_tripledes_setkey): Include check for selftest failure.
+
+ * pubkey.c (gcry_pubkey_register_default): New macro
+ `pubkey_use_dummy', use it.
+
+ * elgamal.c (elg_names): New variable.
+ (pubkey_spec_elg): Include elg_names.
+
+ * dsa.c (dsa_names): New variable.
+ (pubkey_spec_dsa): Include dsa_names.
+
+ * rsa.c (rsa_names): New variable.
+ (pubkey_spec_rsa): Include rsa_names.
+
+ * pubkey.c (gcry_pubkey_lookup_func_name): Compare name also with
+ the names listed in `sexp_names'.
+
+2003-04-24 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_to_key): New variables: module, pubkey. Adjusted
+ to new module interface.
+ (sexp_to_key): Changend type of argument `retalgo' from `int *' to
+ `GcryModule **'. Adjusted all callers. Removed argument:
+ r_algotblidx.
+ (sexp_to_sig): Changend type of argument `retalgo' from `int *' to
+ `GcryModule **'. Adjusted all callers.
+ (sexp_to_enc): Likewise.
+
+ (pubkey_get_npkey, pubkey_get_nskey, pubkey_get_nsig,
+ pubkey_get_nenc): Use strlen to find out the number.
+
+ * rsa.c: Adjust pubkey_spec_rsa to new internal interface.
+ * dsa.c: Likewise.
+ * elgamal.c: Likewise.
+
+2003-04-17 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c (sexp_elements_extract): New function.
+ * pubkey.c (sexp_to_key): Removed variable `idx', added `err', use
+ sexp_elements_extract.
+ (sexp_to_sig): Likewise.
+ (sexp_to_enc): Likewise.
+
+ * pubkey.c: Terminate list correctly.
+ * md.c: Include sha512/sha384 in digest_table.
+
+2003-04-16 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am: Include support for sha512.c.
+
+ * sha512.c: New file, merged from GnuPG, with few modifications
+ for libgcrypt.
+
+ * rand-internal.h: Removed declarations for constructor functions.
+
+ * md.c (md_copy): Call _gcry_module_use for incrementing the usage
+ counter of the digest modules.
+
+ * rsa.c: Do not include "rsa.h".
+ * dsa.c: Do not include "dsa.h".
+ * elgamal.c: Do not include "elgamal.h".
+ * des.c: Do not include "des.h".
+ * cast5.c: Do not include "cast5.h".
+ * blowfish.c: Do not include "blowfish.h".
+ * arcfour.c: Do not include "arcfour.h".
+
+ * Makefile.am (libcipher_la_DEPENDENCIES): Removed.
+ (libcipher_la_LIBADD): Removed.
+ Use Automake conditionals for conditional compilation.
+
+2003-04-13 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (gcry_cipher_open): Call REGISTER_DEFAULT_CIPHERS.
+
+ * md.c (gcry_md_list): New member: module.
+ (md_enable): New variable: module, changed use of module and
+ digest.
+ (md_enable): Initialize member: module.
+ (md_close): Call _gcry_module_release.
+
+ * cipher.c (gcry_cipher_open): New variable: module, changed use of
+ module and cipher.
+ (struct gcry_cipher_handle): New member: module.
+ (gcry_cipher_open): Initialize member: module.
+ (gcry_cipher_close): Call _gcry_module_release.
+
+2003-04-09 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c: Include "ath.h".
+ * md.c: Likewise.
+ * pubkey.c: Likewise.
+
+ * cipher.c (ciphers_registered_lock): New variable.
+ * md.c (digests_registered_lock): New variable.
+ * pubkey.c (pubkeys_registered_lock): New variable.
+
+ * rndlinux.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndlinux_constructor): Removed function.
+
+ * rndegd.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndegd_constructor): Removed function.
+
+ * rndunix.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndunix_constructor): Removed function.
+
+ * rndw32.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rndw32_constructor): Removed function.
+
+ * rndegd.c (rndegd_connect_socket): Simplify code for creating the
+ egd socket address.
+ (rndegd_connect_socket): Call log_fatal use instead of
+ g10_log_fatal.
+ (egd_gather_random): Renamed to ...
+ (rndegd_gather_random): ... here.
+
+2003-04-08 Moritz Schulte <moritz@g10code.com>
+
+ * rndlinux.c: Do not include "dynload.h".
+ * rndunix.c: Likewise.
+ * rndw32.c: Likewise.
+
+ * rndegd.c (rndegd_connect_socket): Factored out from ...
+ (egd_gather_random): here; call it.
+ (egd_socket): New variable.
+ (egd_gather_random): Initialize fd with egd_socket, do not declare
+ fd static.
+ (do_read): Merged few changes from GnuPG. FIXME - not finished?
+ Do not include "dynload.h".
+
+ * rndw32.c (gather_random): Renamed to rndw32_gather_random, do
+ not declare static.
+ (gather_random_fast): Renamed to rndw32_gather_random_fast, do not
+ declare static.
+
+ * rndunix.c (gather_random): Renamed to rndunix_gather_random, do
+ not declare static.
+ * rndegd.c (gather_random): Renamed to rndegd_gather_random, do
+ not declare static.
+ * rndlinux.c (gather_random): Renamed to rndlinux_gather_random,
+ do not declare static.
+
+2003-04-07 Moritz Schulte <moritz@g10code.com>
+
+ * Makefile.am (libcipher_la_SOURCES): Removed construct.c.
+ (libcipher_la_SOURCES): Added sha1.c, sha256.c, rmd160.c, md4.c,
+ md5.c, tiger.c and crc.c
+ (EXTRA_PROGRAMS): Removed sha1, sha256, rmd160, md4, md5, tiger
+ and crc. Removed definitions: EXTRA_md4_SOURCES,
+ EXTRA_md5_SOURCES, EXTRA_rmd160_SOURCES, EXTRA_sha1_SOURCES,
+ EXTRA_sha256_SOURCES, EXTRA_tiger_SOURCES and EXTRA_crc_SOURCES,
+ BUILT_SOURCES, DISTCLEANFILES.
+
+ * pubkey.c: Do not include "elgamal.h", "dsa.h" and "rsa.h".
+
+ * Makefile.am (libcipher_la_SOURCES): Removed rsa.h, elgamal.h,
+ dsa.h, des.h, cast5.h, arcfour.h and blowfish.h.
+
+ * rsa.h: Removed file.
+ * elgamal.h: Removed file.
+ * dsa.h: Removed file.
+ * des.h: Removed file.
+ * cast5.h: Removed file.
+ * arcfour.h: Removed file.
+ * blowfish.h: Removed file.
+
+ * Makefile.am (libcipher_la_SOURCES): Removed dynload.c and
+ dynload.h.
+
+ * rsa.c (pubkey_spec_rsa): New variable.
+ * dsa.c (pubkey_spec_rsa): New variable.
+ * elgamal.c (pubkey_spec_elg): New variable.
+
+ * rsa.c (_gcry_rsa_get_info): Removed function.
+ * elgamal.c (_gcry_elg_get_info): Removed function.
+ * dsa.c (_gcry_dsa_get_info): Removed function.
+
+ * tiger.c (tiger_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_tiger_constructor): Removed function.
+
+ * sha1.c (sha1_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_sha1_constructor): Removed function.
+
+ * sha256.c (sha256_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_sha256_constructor): Removed function.
+
+ * rmd160.c (rmd160_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_rmd160_constructor): Removed function.
+
+ * md5.c (md5_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_md5_constructor): Removed function.
+
+ * md4.c (md4_get_info): Removed function.
+ (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func): Removed function.
+ (_gcry_md4_constructor): Removed function.
+
+ * crc.c (crc_get_info): Removed function.
+
+ * arcfour.c (do_arcfour_setkey): Changed type of context argument
+ to `void *', added local variable for cast, adjusted callers.
+ (arcfour_setkey): Likewise.
+ (encrypt_stream): Likewise.
+ * cast5.c (cast_setkey): Likewise.
+ (encrypt_block): Likewise.
+ * rijndael.c (rijndael_setkey): Likewise.
+ (rijndael_encrypt): Likewise.
+ (rijndael_decrypt): Likewise.
+ * twofish.c (twofish_setkey): Likewise.
+ (twofish_encrypt): Likewise.
+ (twofish_decrypt): Likewise.
+ * des.c (do_des_setkey): Likewise.
+ (do_des_encrypt): Likewise.
+ (do_des_encrypt): Likewise.
+ (do_tripledes_encrypt): Likewise.
+ (do_tripledes_encrypt): Likewise.
+ * blowfish.c (bf_setkey: Likewise.
+ (encrypt_block): Likewise.
+ (decrypt_block): Likewise.
+
+ * arcfour.c (encrypt_stream): Likewise.
+
+ * rijndael.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func) Removed function.
+
+ * twofish.c (gnupgext_version, func_table): Removed definitions.
+ (gnupgext_enum_func) Removed function.
+
+ * cast5.c (CIPHER_ALGO_CAST5): Removed.
+
+ * blowfish.c (FNCCAST_SETKEY, FNCCAST_CRYPT): Removed macros.
+ (CIPHER_ALGO_BLOWFISH): Removed symbol.
+ * cast5.c (FNCCAST_SETKEY, FNCCAST_CRYPT): Likewise.
+ * des.c (selftest_failed): Removed.
+ (initialized): New variable.
+ (do_des_setkey): Run selftest, if not yet done.
+ (FNCCAST_SETKEY, FNCCAST_CRYPT): Removed macros.
+
+ * arcfour.c (_gcry_arcfour_get_info): Removed function.
+ * blowfish.c (_gcry_blowfish_get_info): Removed function.
+ * cast5.c (_gcry_cast5_get_info): Removed function.
+ * des.c (_gcry_des_get_info): Removed function.
+ * rijndael.c (_gcry_rijndael_get_info): Removed function.
+ * twofish.c (_gcry_twofish_get_info): Removed function.
+
+ * arcfour.c (cipher_spec_arcfour): New variable.
+ * twofish.c (cipher_spec_twofish, cipher_spec_twofish128): New
+ variables.
+ * rijndael.c (cipher_spec_aes, cipher_spec_aes192,
+ cipher_spec256): New variables.
+ * des.c (cipher_spec_des, cipher_spec_tripledes): New variables.
+ * cast5.c (cipher_spec_cast5): New variable.
+ * blowfish.c (cipher_spec_blowfish): Likewise.
+
+ * twofish.c: Do not include "dynload.h".
+ * rijndael.c: Likewise.
+ * des.c: Likewise.
+ * cast5.c: Likewise.
+ * blowfish.c: Likewise.
+ * cipher.c: Likewise.
+ * crc.c: Likewise.
+ * md4.c: Likewise.
+ * md5.c: Likewise.
+ * md.c: Likewise.
+ * pubkey.c: Likewise.
+ * rijndael.c: Likewise.
+ * sha1.c: Likewise.
+ * sha256.c: Likewise.
+
+ * arcfour.c: Include "cipher.h".
+ * twofish.c: Likewise.
+ * rijndael.c: Likewise.
+ * des.c: Likewise.
+ * cast5.c: Likewise.
+ * blowfish.c: Likewise.
+
+ * twofish.c (twofish_setkey): Declared argument `key' const.
+ (twofish_encrypt): Declared argument `inbuf' const.
+ (twofish_decrypt): Likewise.
+
+ * rijndael.c (rijndael_setkey): Declared argument `key' const.
+ (rijndael_encrypt): Declared argument `inbuf' const.
+ (rijndael_decrypt): Likewise.
+
+ * des.c (do_des_setkey): Declared argument `key' const.
+ (do_tripledes_setkey): Likewise.
+ (do_des_encrypt): Declared argument `inbuf' const.
+ (do_des_decrypt): Likewise.
+ (do_tripledes_encrypt): Likewise.
+ (do_tripledes_decrypt): Likewise.
+
+ * cast5.c (encrypt_block): Declared argument `inbuf' const.
+ (decrypt_block): Likewise.
+ (cast_setkey): Declared argument `key' const.
+
+ * blowfish.c (do_bf_setkey): Declared argument `key' const.
+ (encrypt_block): Declared argument `inbuf' const.
+ (encrypt_block): Likewise.
+
+
+
+ * cipher.c: Remove CIPHER_ALGO_DUMMY related code.
+ Removed struct cipher_table_s.
+ Changed definition of cipher_table.
+ Removed definition of disabled_algos.
+ (ciphers_registered, default_ciphers_registered): New variables.
+ (REGISTER_DEFAULT_CIPHERS): New macro.
+ (dummy_setkey): Declared argument `key' const.
+ (dummy_encrypt_block): Declared argument `inbuf' const.
+ (dummy_encrypt_block): Likewise.
+ (dummy_encrypt_stream): Likewise.
+ (dummy_encrypt_stream): Likewise.
+ (dummy_setkey): Use `unsigned char' instead of `byte'.
+ (dummy_encrypt_block): Likewise.
+ (dummy_decrypt_block): Likewise.
+ (dummy_encrypt_stream): Likewise.
+ (dummy_decrypt_stream): Likewise.
+ (gcry_cipher_register_default): New function.
+ (gcry_cipher_lookup_func_id): New function.
+ (gcry_cipher_lookup_func_name): New function.
+ (gcry_cipher_lookup_id): New function.
+ (gcry_cipher_lookup_name): New function.
+ (gcry_cipher_id_new): New function.
+ (gcry_cipher_register): New function.
+ (gcry_cipher_unregister): New function.
+ (setup_cipher_table): Removed function.
+ (load_cipher_modules): Removed function.
+ (gcry_cipher_map_name): Adjusted to use new module management.
+ (cipher_algo_to_string): Likewise.
+ (disable_cipher_algo): Likewise.
+ (check_cipher_algo): Likewise.
+ (cipher_get_keylen): Likewise.
+ (cipher_get_blocksize): Likewise.
+ (gcry_cipher_open): Likewise.
+ (struct gcry_cipher_handle): Replaced members algo, algo_index,
+ blocksize, setkey, encrypt, decrypt, stencrypt, stdecrypt with one
+ member: cipher.
+ (gcry_cipher_open): Adjusted code for new handle structure.
+ (cipher_setkey): Likewise.
+ (cipher_setiv): Likewise.
+ (cipher_reset): Likewise.
+ (do_ecb_encrypt): Likewise.
+ (do_ecb_decrypt): Likewise.
+ (do_cbc_encrypt): Likewise.
+ (do_cbc_decrypt): Likewise.
+ (do_cfb_encrypt): Likewise.
+ (do_cfb_decrypt): Likewise.
+ (do_ctr_encrypt): Likewise.
+ (cipher_encrypt): Likewise.
+ (gcry_cipher_encrypt): Likewise.
+ (cipher_decrypt): Likewise.
+ (gcry_cipher_decrypt): Likewise.
+ (cipher_sync): Likewise.
+ (gcry_cipher_ctl): Likewise.
+
+ * pubkey.c: Removed struct pubkey_table_s.
+ Changed definition of pubkey_table.
+ Removed definition of disabled_algos.
+ (pubkeys_registered, default_pubkeys_registered): New variables.
+ (REGISTER_DEFAULT_PUBKEYS): New macro.
+ (setup_pubkey_table): Removed function.
+ (load_pubkey_modules): Removed function.
+ (gcry_pubkey_register_default): New function.
+ (gcry_pubkey_lookup_func_id): New function.
+ (gcry_pubkey_lookup_func_name): New function.
+ (gcry_pubkey_lookup_id): New function.
+ (gcry_pubkey_lookup_name): New function.
+ (gcry_pubkey_id_new): New function.
+ (gcry_pubkey_register): New function.
+ (gcry_pubkey_unregister): New function.
+ (gcry_pk_map_name): Adjusted to use new module management.
+ (gcry_pk_algo_name): Likewise.
+ (disable_pubkey_algo): Likewise.
+ (check_pubkey_algo): Likewise.
+ (pubkey_get_npkey): Likewise.
+ (pubkey_get_nskey): Likewise.
+ (pubkey_get_nsig): Likewise.
+ (pubkey_get_nenc): Likewise.
+ (pubkey_generate): Likewise.
+ (pubkey_check_secret_key): Likewise.
+ (pubkey_encrypt): Likewise.
+ (pubkey_decrypt): Likewise.
+ (pubkey_sign): Likewise.
+ (pubkey_verify): Likewise.
+ (gcry_pk_get_nbits): Likewise.
+ (gcry_pk_algo_info): Likewise.
+
+ * md.c: Removed struct md_digest_list_s.
+ (digest_list): Changed definition.
+ (digests_registered, default_digests_registered): New variables.
+ (REGISTER_DEFAULT_DIGESTS): New macro.
+ (new_list_item): Removed function.
+ (setup_md_table): Removed function.
+ (load_digest_module): Removed function.
+ (gcry_digest_register_default): New function.
+ (gcry_digest_lookup_func_id): New function.
+ (gcry_digest_lookup_func_name): New function.
+ (gcry_digest_lookup_id): New function.
+ (gcry_digest_lookup_name): New function.
+ (gcry_digest_id_new): New function.
+ (gcry_digest_register): New function.
+ (gcry_digest_unregister): New function.
+ (GcryDigestEntry): New type.
+ (struct gcry_md_context): Adjusted type of `list'.
+ (gcry_md_map_name): Adjusted to use new module management.
+ (digest_algo_to_string): Likewise.
+ (check_digest_algo): Likewise.
+ (md_enable): Likewise.
+ (md_digest_length): Likewise.
+ (md_asn_oid): Likewise.
+
+2003-04-07 Moritz Schulte <moritz@g10code.com>
+
+ * pubkey.c: Replaced PUBKEY_ALGO_DSA with GCRY_PK_DSA,
+ PUBKEY_ALGO_RSA with GCRY_PK_RSA and PUBKEY_ALGO_ELGAMAL with
+ GCRY_PK_ELG.
+
+ * dsa.c: Replaced PUBKEY_ALGO_DSA with GCRY_PK_DSA.
+
+2003-04-01 Moritz Schulte <moritz@g10code.com>
+
+ * des.c: Removed checks for GCRY_CIPHER_3DES and GCRY_CIPHER_DES.
+
+2003-03-31 Moritz Schulte <moritz@g10code.com>
+
+ * tiger.c (tiger_get_info): Do not declare static.
+ * sha256.c (sha256_get_info): Likewise.
+ * sha1.c (sha1_get_info): Likewise.
+ * rmd160.c (rmd160_get_info): Likewise.
+ * md5.c (md5_get_info): Likewise.
+ * md4.c (md4_get_info): Likewise.
+ * crc.c (crc_get_info): Likewise.
+
+ * md.c (load_digest_module): Call setup_md_table during
+ initialization.
+ (new_list_item): Link new element into digest_list.
+
+ * cipher.c (do_ctr_decrypt): Made do_ctr_encrypt act as a wrapper
+ for do_ctr_encrypt, since these functions are identical.
+
+2003-03-30 Simon Josefsson <jas@extundo.com>
+
+ * cipher.c (struct gcry_cipher_handle): Add counter field.
+ (gcry_cipher_open): Add CTR.
+ (cipher_reset): Clear counter field.
+ (do_ctr_encrypt, do_ctr_decrypt): New functions.
+ (cipher_encrypt, cipher_decrypt): Call CTR functions.
+ (gcry_cipher_ctl): Add SET_CTR to set counter.
+
+2003-03-30 Moritz Schulte <moritz@g10code.com>
+
+ * rsa.c (_gcry_rsa_blind): New function.
+ (_gcry_rsa_unblind): New function.
+ (_gcry_rsa_decrypt): Use _gcry_rsa_blind and _gcry_rsa_decrypt.
+
+2003-03-26 Moritz Schulte <moritz@g10code.com>
+
+ * dynload.c (_gcry_enum_gnupgext_pubkeys): Adjust `encrypt' and
+ `decrypt' function arguments.
+ (_gcry_enum_gnupgext_pubkeys): Likewise.
+ * dynload.h: Likewise.
+
+ * pubkey.c (dummy_decrypt): Add argument: int flags.
+ (dummy_encrypt): Likewise.
+
+ * elgamal.c (_gcry_elg_encrypt): Add argument: int flags.
+ (_gcry_elg_decrypt): Likewise.
+
+ * rsa.c (_gcry_rsa_encrypt): Add argument: int flags.
+ (_gcry_rsa_decrypt): Likewise.
+
+ * pubkey.c: Add `flags' argument to members `encrypt' and
+ `decrypt' of struct `pubkey_table_s'.
+
+ * rsa.h: Add `flags' argument to function declarations.
+ * elgamal.h: Likewise.
+
+ * pubkey.c (sexp_data_to_mpi): New variable: int parsed_flags.
+ (sexp_data_to_mpi): Set `parsed_flags'.
+ (sexp_data_to_mpi): New argument: int *flags.
+ (gcry_pk_encrypt): New variable: int flags.
+ (gcry_pk_encrypt): Pass `flags' to pubkey_encrypt.
+ (pubkey_encrypt): New variable: int flags.
+ (pubkey_encrypt): Pass `flags' to pubkey encrypt function.
+ (pubkey_decrypt): Likewise.
+ (pubkey_decrypt): Pass `flags' to pubkey encrypt function.
+ (gcry_pk_encrypt): Include `flags' s-exp in return list.
+ (sexp_to_enc): New argument: int *flags.
+ (gcry_pk_decrypt): New variable: int flags.
+ (gcry_pk_decrypt): Pass `flags' to pubkey_decrypt.
+ (sexp_to_enc): New variable: int parsed_flags.
+ (sexp_to_enc): Set `parsed_flags'.
+
+2003-03-22 Simon Josefsson <jas@extundo.com>
+
+ * cipher.c (gcry_cipher_open, do_cbc_encrypt)
+ (gcry_cipher_encrypt): Support GCRY_CIPHER_CBC_MAC.
+ (gcry_cipher_ctl): Support GCRYCTL_SET_CBC_MAC.
+
+2003-03-19 Werner Koch <wk@gnupg.org>
+
+ * primegen.c (gen_prime): New args EXTRA_CHECK and EXTRA_CHECK_ARG
+ to allow for a user callback. Changed all callers.
+ (_gcry_generate_secret_prime)
+ (_gcry_generate_public_prime): Ditto, pass them to gen_prime.
+ * rsa.c (check_exponent): New.
+ (generate): Use a callback to ensure that a given exponent is
+ actually generated.
+
+2003-03-12 Moritz Schulte <moritz@g10code.com>
+
+ * primegen.c: Initialize `no_of_small_prime_numbers' statically.
+ (gen_prime): Remove calculation of `no_of_small_prime_numbers'.
+
+2003-03-03 Moritz Schulte <moritz@g10code.com>
+
+ * md.c (gcry_md_ctl): Rewritten to use same style like the other
+ functions dispatchers.
+
+2003-03-02 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c (struct gcry_cipher_handle): New member: algo_index.
+ (gcry_cipher_open): Allocate memory for two cipher contexts.
+ Initialize algo_index.
+ (cipher_setkey): Duplicate context into reserved memory.
+ (cipher_reset): New function, which resets the context and clear
+ the IV.
+ (gcry_cipher_ctl): Call cipher_reset.
+
+2003-02-23 Moritz Schulte <moritz@g10code.com>
+
+ * cipher.c: Remove (bogus) `digitp' macro definition.
+ * md.c: Likewise.
+
+ * blowfish.c (burn_stack): Removed.
+ * arcfour.c (burn_stack): Likewise.
+ * cast5.c (burn_stack): Likewise.
+ * des.c (burn_stack): Likewise.
+ * md4.c (burn_stack): Likewise.
+ * md5.c (burn_stack): Likewise.
+ * random.c (burn_stack): Likewise.
+ * rijndael.c (burn_stack): Likewise.
+ * rmd160.c (burn_stack): Likewise.
+ * sha1.c (burn_stack): Likewise.
+ * sha256.c (burn_stack): Likewise.
+ * tiger.c (burn_stack): Likewise.
+ * twofish.c (burn_stack): Likewise.
+
+ * blowfish.c: Changed all occurences of burn_stack to
+ _gcry_burn_stack.
+ * arcfour.c: Likewise.
+ * cast5.c: Likewise.
+ * des.c: Likewise.
+ * md4.c: Likewise.
+ * md5.c: Likewise.
+ * random.c: Likewise.
+ * rijndael.c: Likewise.
+ * rmd160.c: Likewise.
+ * sha1.c: Likewise.
+ * sha256.c: Likewise.
+ * tiger.c: Likewise.
+ * twofish.c: Likewise.
+
+ * arcfour.c (_gcry_arcfour_get_info): Use GCRY_CIPHER_ARCFOUR
+ instead of hard-coded value `301'.
+
+2003-01-24 Werner Koch <wk@gnupg.org>
+
+ * random.c (_gcry_register_random_progress): New.
+ (_gcry_random_progress): New.
+
+ * rndlinux.c (gather_random): Call the random progress function.
+
+2003-01-23 Werner Koch <wk@gnupg.org>
+
+ * rsa.c (generate): New arg USE_E to request a specific public
+ exponent.
+ (_gcry_rsa_generate): Ditto.
+ * elgamal.c (_gcry_elg_generate): Must add an dummy argument
+ instead of USE_E.
+ * dsa.c (_gcry_dsa_generate): Ditto.
+ * pubkey.c (dummy_generate): Ditto.
+ (pubkey_generate): Add USE_E arg and pass it down.
+ (gcry_pk_genkey): Detect "rsa-use-e" parameter and pass it to generate.
+
+ * pubkey.c (sexp_to_enc): New arg RET_MODERN.
+ (gcry_pk_decrypt): Make use of it to return a real S-expression.
+ Return better error codes.
+ (gcry_pk_verify): Return better error codes.
+
+2003-01-21 Werner Koch <wk@gnupg.org>
+
+ * random.c (gcry_random_add_bytes): Add QUALITY argument, let
+ function return an error code and disable its core for now.
+
+2003-01-21 Timo Schulz <twoaday@freakmail.de>
+
+ * random.c (gcry_random_add_bytes): New. Function to add external
+ random to the pool.
+
+2003-01-20 Simon Josefsson <jas@extundo.com>
+
+ * crc.c: New.
+ * Makefile.am (EXTRA_PROGRAMS, EXTRA_crc_SOURCES): Add crc.c.
+ * md.c (gcry_md_get_algo_dlen): Add values for CRC.
+
+2003-01-20 Werner Koch <wk@gnupg.org>
+
+ * sha256.c: New.
+ * bithelp.h (ror): New.
+ * Makfile.am: Add sha256.c.
+ * md.c (oid_table): Add values for SHA256 et al.
+ (gcry_md_get_algo_dlen): Likewise
+
+2003-01-20 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_get_keygrip): Implemented keygrips for DSA
+ and ElGamal.
+
+2003-01-17 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_encrypt): Reworked so that the output will
+ never contain the plaintext even if the caller did not checked the
+ return value.
+
+ * md.c (gcry_md_get_algo): Changed error code to GCRYERR_GENERAL
+ because we don't have an invalid md algo but no algorithm enabled.
+
+ * pubkey.c (gcry_pk_genkey): Changed error code for bounds check
+ of table parameters to GCRYERR_INTERNAL.
+
+ * md.c (gcry_md_open): Partly reverted Timo's change from
+ 2002-10-10 by removing the check for the algorithm. An algorithm
+ of 0 is allowed and anyway we should not double check it or check
+ it using a different function. Also fixed the flags check.
+
+ * pubkey.c (gcry_pk_encrypt): Make sure that R_CIPH points to NULL
+ on error.
+ (gcry_pk_decrypt): Ditto for R_PLAIN.
+ (gcry_pk_sign): Ditto for R_SIG.
+ (gcry_pk_genkey): Ditto for R_KEY.
+
+2003-01-16 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_write): Changed 2nd argument type to void*.
+ (gcry_md_hash_buffer): Changed type of boths buffers to void*.
+ (gcry_md_setkey): Changed 2nd argument type to void*.
+
+2003-01-15 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (sexp_data_to_mpi): New. This handles pkcs1 padding.
+ (gcry_pk_sign, gcry_pk_verify): Use it here.
+ (gcry_pk_encrypt): And here.
+ (pubkey_verify): Add debug code.
+ (sexp_to_enc): Handle flags in the input and return the pkcs1 flag
+ in a new parameter.
+ (gcry_pk_decrypt): Prepare for future pkcs1 handling.
+
+2002-12-19 Werner Koch <wk@gnupg.org>
+
+ * random.c (_gcry_random_initialize): New.
+
+2002-12-16 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Added a Teletrust specific OID for 3DES.
+
+2002-12-12 Werner Koch <wk@gnupg.org>
+
+ * md.c: Added another oddball OIW OID (sha-1WithRSAEncryption).
+
+2002-11-23 Werner Koch <wk@gnupg.org>
+
+ * md.c (load_digest_module): Enlarged checked_algos bitmap.
+ * md4.c (func_table): Fixed entry for md4.
+ Both by Simon Josephson.
+ (transform): Copy data to get the alignment straight. Tested only
+ on i386.
+
+2002-11-10 Simon Josefsson <jas@extundo.com>
+
+ * cipher.c (gcry_cipher_open): Don't reject CTS flag.
+ (do_cbc_encrypt, do_cbc_decrypt, cipher_encrypt)
+ (gcry_cipher_encrypt, cipher_decrypt)
+ (gcry_cipher_decrypt): Support CTS flag.
+ (gcry_cipher_ctl): Toggle CTS flag.
+
+2002-11-10 Werner Koch <wk@gnupg.org>
+
+ * md4.c: New. By Simon Josefsson.
+ * Makefile.am (EXTRA_PROGRAMS): Add md4.c.
+ * md.c (oid_table,gcry_md_get_algo_dlen): MD4 support.
+
+2002-10-14 Werner Koch <wk@gnupg.org>
+
+ * arcfour.c (do_encrypt_stream): Don't use increment op when
+ assigning to the same variable.
+
+2002-10-10 Timo Schulz <ts@winpt.org>
+
+ * pubkey.c (gcry_pk_genkey): Check boundaries.
+
+ * md.c (gcry_md_open): Check that algo is available and only
+ valid flag values are used.
+ (gcry_md_get_algo): Add error handling.
+
+2002-09-26 Werner Koch <wk@gnupg.org>
+
+ * md.c: Include an OID for TIGER.
+ * tiger.c (tiger_get_info): Use a regular OID.
+
+2002-09-17 Werner Koch <wk@gnupg.org>
+
+ * random.c: Replaced mutex.h by the new ath.h. Changed all calls.
+
+2002-09-16 Werner Koch <wk@gnupg.org>
+
+ * arcfour.c (do_encrypt_stream): Use register modifier and modulo.
+ According to Nikos Mavroyanopoulos this increases perfromace on
+ i386 system noticable. And I always tought gcc is clever enough.
+ * md5.c (transform): Use register modifier.
+ * rmd160.c (transform): Ditto.
+ * sha1.c (transform): Ditto. We hope that there are 6 free registers.
+ * random.c (gcry_randomize): Rewrote to avoid malloc calls.
+
+ * rndlinux.c (gather_random): Replaced remaining fprintfs by log_*.
+ * arcfour.c (do_arcfour_setkey): Ditto.
+ * twofish.c (do_twofish_setkey): Ditto.
+ * rndegd.c (gather_random): Ditto.
+ * rijndael.c (do_setkey): Ditto.
+ * random.c (_gcry_random_dump_stats): Ditto.
+ * primegen.c (_gcry_generate_elg_prime): Ditto.
+ * des.c (_gcry_des_get_info): Ditto.
+ * cast5.c (do_cast_setkey): Ditto.
+ * blowfish.c (do_bf_setkey): Ditto.
+
+2002-08-26 Werner Koch <wk@gnupg.org>
+
+ * des.c (weak_keys): Fixed one entry in the table and compared
+ all entries against the literature.
+ (selftest): Checksum the weak key table.
+
+2002-08-21 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c: Enable keygrip calculation for "openpgp-rsa".
+
+2002-08-17 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (setup_cipher_table): Don't overwrite the DES entry
+ with the entry for DUMMY.
+
+2002-08-14 Werner Koch <wk@gnupg.org>
+
+ * des.c (do_des_setkey,do_des_encrypt, do_des_decrypt): New.
+ (_gcry_des_get_info): Support plain old DES.
+ * cipher.c (setup_cipher_table): Put DES into the table.
+
+2002-07-25 Werner Koch <wk@gnupg.org>
+
+ * rndunix.c (_gcry_rndunix_constructor): Prefixed with _gcry_.
+ Noted by Stephan Austermuehle.
+
+2002-07-08 Timo Schulz <ts@winpt.org>
+
+ * rndw32.c: Replaced the m_ memory functions with the real
+ gcry_ functions. Renamed all g10_ prefixed functions to log_.
+
+2002-06-12 Werner Koch <wk@gnupg.org>
+
+ * rsa.c (generate): Use e = 65537 for now.
+
+2002-06-11 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_get_keygrip): Allow a "protected-private-key".
+
+2002-06-05 Timo Schulz <ts@winpt.org>
+
+ * cipher.c (gcry_cipher_encrypt, gcry_cipher_decrypt):
+ Check that the input size is a multiple of the blocksize.
+
+2002-05-23 Werner Koch <wk@gnupg.org>
+
+ * md.c (oid_table): Add an rsadsi OID for MD5.
+
+2002-05-21 Werner Koch <wk@gnupg.org>
+
+ * primegen.c, elgamal.c, dsa.c (progress): Do not print anything
+ by default. Pass an extra identifying string to the callback and
+ reserved 2 argumenst for current and total counters. Changed the
+ register function prototype.
+
+2002-05-17 Werner Koch <wk@gnupg.org>
+
+ * rndegd.c (rndegd_constructor): Fixed name of register function
+ and prefixed the function name with _gcry_.
+ * rndw32.c (rndw32_constructor): Ditto.
+ * tiger.c (tiger_constructor): Ditto.
+
+ * Makefile.am: Removed all dynamic loading stuff.
+ * dynload.c: Ditto. Now only used for the constructor system.
+
+2002-05-15 Werner Koch <wk@gnupg.org>
+
+ * random.c (gcry_random_bytes,gcry_random_bytes_secure)
+ (gcry_randomize): Make sure we are initialized.
+
+2002-05-14 Werner Koch <wk@gnupg.org>
+
+ Changed license of most files to the LGPL.
+
+2002-05-02 Werner Koch <wk@gnupg.org>
+
+ * random.c (_gcry_fast_random_poll): Initialize the module so the
+ mutex can be used.
+
+ * primegen.c (small_prime_numbers): Moved table from smallprime.c
+ * smallprime.c: File removed.
+
+ * des.c (leftkey_swap, rightkey_swap, working_memcmp): Made static.
+
+ * cipher.c (gcry_cipher_map_name): Map "RIJNDAEL" to "AES".
+ * rijndael.c (rijndael_get_info): We do only support a 128 bit
+ blocksize so it makes sense to change the algorithm strings to
+ AES.
+
+ * tiger.c (tiger_final): Removed superfluous token pasting operators.
+ * md5.c (md5_final): Ditto.
+
+2002-04-30 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Fixed list of copyright years.
+
+2002-03-18 Werner Koch <wk@gnupg.org>
+
+ * random.c (initialize): Initialize the new pool lock mutex.
+ (_gcry_fast_random_poll): Add locking and moved main
+ code out to...
+ (do_fast_random_poll): new function.
+ (read_pool): Use the new function here.
+ (get_random_bytes): Add locking.
+ (_gcry_update_random_seed_file): Ditto.
+
+2002-03-11 Werner Koch <wk@gnupg.org>
+
+ * md.c: Add rsaSignatureWithripemd160 to OID table.
+
+2002-02-20 Werner Koch <wk@gnupg.org>
+
+ * sha1.c: Removed a left over comment note. The code has been
+ rewritten from scratch in 1998. Thanks to Niels Möller for
+ reporting this misleading comment.
+
+2002-02-18 Werner Koch <wk@gnupg.org>
+
+ * rndunix.c (rndunix_constructor): Use the the new prefixed
+ function name. Reported by Jordi Mallach.
+
+2002-02-10 Werner Koch <wk@gnupg.org>
+
+ * random.c (mix_pool): Carry an extra failsafe_digest buffer
+ around to make the function more robust.
+
+2002-02-08 Werner Koch <wk@gnupg.org>
+
+ * random.c (add_randomness): Xor new data into the pool and not
+ just copy it. This avoids any choosen input attacks which are not
+ serious in our setting because an outsider won't be able to mix
+ data in and even then we keep going with a PRNG. Thanks to Stefan
+ Keller for pointing this out.
+
+2002-01-04 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_genkey): Do not release skey - it is static.
+
+ * primegen.c (gen_prime): Of course we should use set_bit
+ and not set_highbit to set the second high bit.
+
+2001-12-18 Werner Koch <wk@gnupg.org>
+
+ * rsa.c (generate): Loop until we find the exact modulus size.
+ Changed the exponent to 41.
+ (rsa_get_info): s/usage/r_usage/ to avoid shadow warnings.
+ * primegen.c (gen_prime): Set 2 high order bits for secret primes.
+
+ * Makefile.am (DISTCLEANFILES): Include construct.c.
+
+2001-12-17 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_get_keygrip): New - experimental.
+
+2001-12-11 Werner Koch <wk@gnupg.org>
+
+ * cipher.c: Added OIDs for AES.
+ (gcry_cipher_mode_from_oid): New.
+ (gcry_cipher_map_name): Moved OID search code to ..
+ (search_oid): .. new function.
+
+2001-12-10 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (gcry_pk_encrypt): Find the signature algorithm by name
+ and not by number.
+
+ * pubkey.c (gcry_pk_encrypt,gcry_pk_decrypt,gcry_pk_sign)
+ (gcry_pk_verify,gcry_pk_testkey, gcry_pk_genkey)
+ (gcry_pk_get_nbits): Release the arrays. Noted by Nikos
+ Mavroyanopoulos.
+
+2001-12-06 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (gcry_cipher_map_name): Look also for OIDs prefixed
+ with "oid." or "OID.".
+
+2001-12-05 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c (algo_info_table): Fixed entry for openpgp-rsa.
+
+2001-11-24 Werner Koch <wk@gnupg.org>
+
+ * pubkey.c: Added the rsaEncryption OID to the tables.
+ (sexp_to_key): Add an arg to return the index of the algorithm,
+ changed all callers.
+ (gcry_pk_sign): Find the signature algorithm by name and not by
+ number.
+ (gcry_pk_get_nbits): Fixed so that we can now really pass a secret
+ key to get the result.
+
+ * md.c (gcry_md_map_name): Look also for OIDs prefixed with "oid."
+ or "OID." so that an OID string can be used as an S-Exp token.
+
+2001-11-20 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_map_name): Lookup by OID if the the name begins
+ with a digit.
+ (oid_table): New.
+
+2001-11-16 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_info): New operator GCRYCTL_IS_ALGO_ENABLED.
+
+2001-11-07 Werner Koch <wk@gnupg.org>
+
+ * md.c (gcry_md_hash_buffer): Close the handle which was left open
+ for algorithms other than rmd160.
+
+2001-08-08 Werner Koch <wk@gnupg.org>
+
+ * rndw32.c (gather_random): Use toolhelp in addition to the NT
+ gatherer for Windows2000. Suggested by Sami Tolvanen.
+
+ * random.c (read_pool): Fixed length check, this used to be one
+ byte to strict. Made an assert out of it because the caller has
+ already made sure that only poolsize bytes are requested.
+ Reported by Marcus Brinkmann.
+
+2001-08-03 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (cipher_encrypt, cipher_decrypt): Prepare to return
+ errors. We have to change the interface to all ciphers to make
+ this really work but we should do so to prepare for hardware
+ encryption modules.
+ (gcry_cipher_encrypt, gcry_cipher_decrypt): Return the error and
+ set lasterr.
+ (gcry_cipher_ctl): Make sure that errors from setkey are returned.
+
+2001-08-02 Werner Koch <wk@gnupg.org>
+
+ * rndlinux.c (gather_random): casted a size_t arg to int so that
+ the format string is correct. Casting is okay here and avoids
+ translation changes.
+
+ * random.c (fast_random_poll): Do not check the return code of
+ getrusage.
+
+ * rndunix.c: Add a signal.h header to avoid warnings on Solaris 7
+ and 8.
+
+ * tiger.c (print_abc,print_data): Removed.
+
+ * rijndael.c, des.c, blowfish.c, twofish.c, cast5.c, arcfour.c
+ (burn_stack): New. Add wrappers for most functions to be able to
+ call burn_stack after the function invocation. This methods seems
+ to be the most portable way to zeroise the stack used. It does
+ only work on stack frame based machines but it is highly portable
+ and has no side effects. Just setting the automatic variables at
+ the end of a function to zero does not work well because the
+ compiler will optimize them away - marking them as volatile would
+ be bad for performance.
+ * md5.c, sha1.c, rmd160.c, tiger.c (burn_stack): Likewise.
+ * random.c (burn_stack): New.
+ (mix_pool): Use it here to burn the stack of the mixblock function.
+
+ * primegen.c (_gcry_generate_elg_prime): Freed q at 3 places.
+ Thanks to Tommi Komulainen.
+
+ * arcfour.c (arcfour_setkey): Check the minimim keylength against
+ bytes and not bits.
+ (selftest): Must reset the key before decryption.
+
+2001-05-31 Werner Koch <wk@gnupg.org>
+
+ * sha1.c (sha1_init): Made static.
+
+ Changed all g10_ prefixed function names as well as some mpi_
+ function names to cope with the introduced naming changes.
+
+ * md.c (prepare_macpads): Made key const.
+
+2001-05-28 Werner Koch <wk@gnupg.org>
+
+ * rndegd.c (gather_random): Removed the use of tty_printf.
+
+2001-03-29 Werner Koch <wk@gnupg.org>
+
+ * md5.c (md5_final): Fixed calculation of hashed length. Thanks
+ to disastry@saiknes.lv for pointing out that it was horrible wrong
+ for more than 512MB of input.
+ * sha1.c (sha1_final): Ditto.
+ * rmd160.c (rmd160_final): Ditto.
+ * tiger.c (tiger_final): Ditto.
+
+ * blowfish.c (encrypt,do_encrypt): Changed name to do_encrypt to
+ avoid name clashes with an encrypt function in stdlib.h of
+ Dynix/PIX. Thanks to Gene Carter.
+ * elgamal.c (encrypt,do_encrypt): Ditto.
+
+ * twofish.c (gnupgext_enum_func): Use only when when compiled as a
+ module.
+ * rijndael.c (gnupgext_enum_func): Ditto.
+
+ * tiger.c (tiger_get_info): Return "TIGER192" and not just
+ "TIGER". By Edwin Woudt.
+
+ * random.c: Always include time.h - standard requirement. Thanks
+ to James Troup.
+
+ * rndw32.c: Fixes to the macros.
+
+2001-01-11 Werner Koch <wk@gnupg.org>
+
+ * cipher.c (cipher_encrypt,gcry_cipher_encrypt): Use blocksize and
+ not 8.
+
+2000-12-19 Werner Koch <wk@gnupg.org>
+
+ Major change:
+ Removed all GnuPG stuff and renamed this piece of software
+ to gcrypt.
+
+2000-11-14 Werner Koch <wk@gnupg.org>
+
+ * dsa.c (test_keys): Replaced mpi_alloc by gcry_mpi_new and
+ mpi_free by gcry_mpi_release.
+ * elgamal.c (test_keys,generate): Ditto, also for mpi_alloc_secure.
+ * rsa.c (test_keys,generate,rsa_verify): Ditto.
+ * primegen.c (generate_elg_prime): Ditto.
+ (gen_prime): Ditto and removed nlimbs.
+
+ * rsa.c (generate): Allocate 2 more vars in secure memory.
+
+ * Makefile.am (OMIT_DEPENDENCIES): Hack to work around dependency
+ problems.
+
+2000-10-09 Werner Koch <wk@gnupg.org>
+
+ * arcfour.c, arcfour.h: New.
+ * cipher.c (cipher_encrypt, cipher_decrypt): Add stream mode.
+ (setup_cipher_table): Add Arcfour.
+ (gcry_cipher_open): Kludge to allow stream mode.
+
+Wed Oct 4 13:16:18 CEST 2000 Werner Koch <wk@openit.de>
+
+ * sha1.c (transform): Use rol() macro. Actually this is not needed
+ for a newer gcc but there are still aoter compilers.
+
+ * rsa.c (test_keys): Use new random function.
+
+ * md.c (gcry_md_setkey): New function to overcome problems with
+ const conflics.
+ (gcry_md_ctl): Pass set key to the new functions.
+
+ * rijndael.c: New.
+ * cipher.c: Add Rijndael support.
+
+Mon Sep 18 16:35:45 CEST 2000 Werner Koch <wk@openit.de>
+
+ * rndlinux.c (open_device): Loose random device checking.
+ By Nils Ellmenreich.
+
+ * random.c (fast_random_poll): Check ENOSYS for getrusage.
+ * rndunix.c: Add 2 sources for QNX. By Sam Roberts.
+
+ * pubkey.c (gcry_pk_algo_info): Add GCRYCTL_GET_ALGO_USAGE.
+
+ * rsa.c: Changed the comment about the patent.
+ (secret): Speed up by using the CRT. For a 2k keys this
+ is about 3 times faster.
+ (stronger_key_check): New but unused code to check the secret key.
+ * Makefile.am: Included rsa.[ch].
+ * pubkey.c: Enabled RSA support.
+ (pubkey_get_npkey): Removed RSA workaround.
+
+Mon Jul 31 10:04:47 CEST 2000 Werner Koch <wk@openit.de>
+
+ * pubkey.c: Replaced all gcry_sexp_{car,cdr}_{data,mpi} by the new
+ gcry_sexp_nth_{data,mpi} functions.
+
+Tue Jul 25 17:44:15 CEST 2000 Werner Koch <wk@openit.de>
+
+ * pubkey.c (exp_to_key,sexp_to_sig,sexp_to_enc,gcry_pk_encrypt,
+ gcry_pk_decrypt,gcry_pk_sign,gcry_pk_genkey): Changed to work with
+ the new S-Exp interface.
+
+Mon Jul 17 16:35:47 CEST 2000 Werner Koch <wk@>
+
+ * random.c (gather_faked): Replaced make_timestamp by time(2) again.
+
+Fri Jul 14 19:38:23 CEST 2000 Werner Koch <wk@>
+
+ * md.c (gcry_md_ctl): Support GCRYCTL_{START,STOP}_DUMP.
+
+ * Makefile.am: Never compile mingw32 as module.
+
+ * Makefile.am: Tweaked module build and removed libtool
+
+ * Makefile.am: Replaced -O1 by -O. Suggested by Alec Habig.
+
+ * elgamal.c (sign): Removed inactive code.
+
+ * rsa.c, rsa.h: New based on the old module version (only in CVS for now).
+ * pubkey.c (setup_pubkey_table): Added commented support for RSA.
+
+ * rndunix.c (waitpid): New. For UTS 2.1. All by Dave Dykstra.
+ (my_popen): Do the FD_CLOEXEC only if it is available
+ (start_gatherer): Cope with missing _SC_OPEN_MAX
+
+ * rndunix.c: Add some more headers for QNX. By Sam Roberts.
+
+ * rndegd.c (gather_random): Shortcut level 0.
+ * rndunix.c (gather_random): Ditto.
+ * rndw32.c (gather_random): Ditto.
+
+ * rndw32.c: Replaced with code from Cryptlib and commented the old stuff.
+ * rndw32.c: Add some debuging code enabled by an environment variable.
+
+ * random.c (read_seed_file): Binary open for DOSish system
+ (update_random_seed_file): Ditto.
+ * random.c [MINGW32]: Include process.h for getpid.
+ * random.c (fast_random_poll): Add clock_gettime() as fallback for
+ system which support this POSIX.4 fucntion. By Sam Roberts.
+
+ * random.c (read_seed_file): Removed the S_ISLNK test becuase it
+ is already covered by !S_ISREG and is not defined in Unixware.
+ Reported by Dave Dykstra.
+ (update_random_seed_file): Silently ignore update request when pool
+ is not filled.
+
+ * random.c (read_seed_file): New.
+ (set_random_seed_file): New.
+ (read_pool): Try to read the seeding file.
+ (update_random_seed_file): New.
+
+ (read_pool): Do an initial extra seeding when level 2 quality random
+ is requested the first time. This requestes at least POOLSIZE/2 bytes
+ of entropy. Compined with the seeding file this should make normal
+ random bytes cheaper and increase the quality of the random bytes
+ used for key generation.
+
+ * random.c (read_pool): Print a more friendly error message in
+ cases when too much random is requested in one call.
+
+ * random.c (fast_random_poll): Check whether RUSAGE_SELF is defined;
+ this is not the case for some ESIX and Unixware, although they have
+ getrusage().
+
+ * primegen.c (generate_elg_prime): All primes are now generated with
+ the lowest random quality level. Because they are public anyway we
+ don't need stronger random and by this we do not drain the systems
+ entropy so much.
+
+ * primegen.c (register_primegen_progress): New.
+ * dsa.c (register_pk_dsa_progress): New.
+ * elgamal.c (register_pk_elg_progress): New.
+
+ * elgamal.c (wiener_map): New.
+ (gen_k): Use a much smaller k.
+ (generate): Calculate the qbits using the wiener map and
+ choose an x at a size comparable to the one choosen in gen_k
+
+ * rmd160.c (rmd160_get_info): Moved casting to the left side due to a
+ problem with UTS4.3. Suggested by Dave Dykstra.
+ * sha1.c (sha1_get_info): Ditto.
+ * tiger.c (tiger_get_info): Ditto.
+ * md5.c (md5_get_info): Ditto
+ * des.c (des_get_info): Ditto.
+ * blowfish.c (blowfish_get_info): Ditto.
+ * cast5.c (cast5_get_info): Ditto.
+ * twofish.c (twofish_get_info): Ditto.
+
+Fri Mar 24 11:25:45 CET 2000 Werner Koch <wk@openit.de>
+
+ * md.c (md_open): Add hmac arg and allocate space for the pads.
+ (md_finalize): Add HMAC support.
+ (md_copy): Ditto.
+ (md_close): Ditto.
+ (gcry_md_reset): Ditto.
+ (gcry_md_ctl): Ditto.
+ (prepare_macpdas): New.
+
+Mon Mar 13 19:22:46 CET 2000 Werner Koch <wk@openit.de>
+
+ * md.c (gcry_md_hash_buffer): Add support for the other algorithms.
+
+Mon Jan 31 16:37:34 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * genprime.c (generate_elg_prime): Fixed returned factors which never
+ worked for non-DSA keys.
+
+Thu Jan 27 18:00:44 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (sexp_to_key): Fixed mem leaks in case of errors.
+
+Mon Jan 24 22:24:38 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (gcry_pk_decrypt): Implemented.
+ (gcry_pk_encrypt): Implemented.
+ (gcry_pk_testkey): New.
+ (gcry_pk_genkey): New.
+ (pubkey_decrypt): Made static.
+ (pubkey_encrypt): Ditto.
+ (pubkey_check_secret_key): Ditto.
+ (pubkey_generate): Ditto.
+
+Mon Jan 24 13:04:28 CET 2000 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (pubkey_nbits): Removed and replaced by ...
+ (gcry_pk_get_nbits): this new one.
+
+Wed Dec 8 21:58:32 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * dsa.c: s/mpi_powm/gcry_mpi_powm/g
+ * elgamal.c: Ditto.
+ * primegen.c: Ditto.
+
+ * : Replaced g10_opt_verbose by g10_log_verbosity().
+
+ * Makefile.am (INCLUDES): removed intl, add ../gcrypt
+
+Fri Nov 19 17:15:20 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * dynload.c (cmp_filenames): New to replaced compare_filename() in
+ module.
+ (register_cipher_extension): Removed the tilde expansion stuff.
+ * rndeg.c (my_make_filename): New.
+
+ * : Replaced header util.h by g10lib.h
+
+ * random.c (gather_faked): Replaced make_timestamp by time(2).
+ Disabled wrning printed with tty_printf.
+ * rndlinux.c (gather_random): Always use fprintf instead of tty_xxx;
+ this should be replaced by a callback function.
+
+ * primegen.c (gen_prime): Use gcry_mpi_randomize.
+ (is_prime): Ditto.
+ * elgamal.c (test_keys): Ditto.
+ * dsa.c (test_keys): Ditto.
+
+ * cipher.c (gcry_cipher_close): Die on invalid handle.
+
+Mon Nov 15 21:36:02 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * elgamal.c (gen_k): Use the new random API.
+ (generate): Ditto.
+ * dsa.c (gen_k): Ditto.
+ (generate): Ditto.
+
+Sat Nov 13 17:44:23 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * pubkey.c (disable_pubkey_algo): Made static.
+ (gcry_pk_ctl): New.
+
+ * random.c (get_random_bits): Renamed to ...
+ (get_random_bytes): ... this and made static.
+ (gcry_random_bytes): New.
+ (gcry_random_bytes_secure): New.
+ (randomize_buffer): Renamed to ...
+ (gcry_randomize): ...this.
+
+ * md.c (gcry_md_hash_buffer): New.
+
+ * pubkey.c (gcry_pk_algo_info): 4 new commands.
+ (pubkey_get_npkey): Made static.
+ (pubkey_get_nskey): Made static.
+ (pubkey_get_nsig): Made static.
+ (pubkey_get_nenc): Made static.
+
+ * pubkey.c: Removed all G10ERR_xxx.
+ * cipher.c: Changed all GCRYERR_INV_ALGO to GCRYERR_INV_CIPHER_ALGO.
+ * md.c: Changed all GCRYERR_INV_ALGO to GCRYERR_INV_MD_ALGO.
+ * cast5.c (cast_setkey): Changed errocodes to GCRYERR_xxx.
+ * blowfish.c: Ditto.
+ * des.c: Ditto.
+ * twofish.c: Ditto.
+ * dsa.c: Ditto.
+ * elgamal.c: Ditto.
+
+ * g10c.c: Removed
+
+ * cipher.c (gcry_cipher_open): Replaced alloc functions and return NULL
+ if we are out of core.
+ * dynload.c: Replaced all memory allocation functions.
+ * md.c: Ditto.
+ * primegen.c: Ditto.
+ * pubkey.c: Ditto.
+ * random.c: Ditto.
+ * rndw32.c: Ditto.
+ * elgamal.c: Ditto.
+ * dsa.c: Ditto.
+
+Tue Oct 26 14:10:21 CEST 1999 Werner Koch <wk@gnupg.de>
+
+ * elgamal.c (sign): Hugh found strange code here. Replaced by BUG().
+
+ * cipher.c: Merged with gcrypt/symapi.c.
+
+ * pubkey.c (string_to_pubkey_algo): Renamed function to ...
+ (gcry_pk_map_name): ... this.
+ (pubkey_algo_to_string): Renamed function to ...
+ (gcry_pk_algo_name): ... this.
+ (gcry_pk_algo_info): New.
+ * pubkey.c: Merged with gcrypt/pkapi.c.
+
+ * md.c (md_reset): Clear finalized; thanks to Ulf Moeller for
+ fixing this bug.
+
+ * md.c: Merged with gcrypt/mdapi.c
+
+Wed Sep 15 14:39:59 CEST 1999 Michael Roth <mroth@nessie.de>
+
+ * des.c: Various speed improvements: One bit pre rotation
+ trick after initial permutation (Richard Outerbridge).
+ Finished test of SSLeay Tripple-DES patterns.
+
+Wed Sep 15 16:22:17 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndw32.c: New.
+
+Mon Sep 13 10:51:29 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * bithelp.h: New.
+ * rmd160.h, sha1.h, md5.h: Use the rol macro from bithelp.h
+
+Tue Sep 7 16:23:36 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * Makefile.am: Fixed seds for latest egcc. By Ollivier Robert.
+
+Mon Sep 6 19:59:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * des.c (selftest): Add some testpattern
+
+Mon Aug 30 20:38:33 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (do_cbc_encrypt): Fixed serious bug occuring when not using
+ in place encryption. Pointed out by Frank Stajano.
+
+Mon Jul 26 09:34:46 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md5.c (md5_final): Fix for a SCO cpp bug.
+
+Thu Jul 15 10:15:35 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * elgamal.c (elg_check_secret_key,elg_encrypt
+ elg_decrypt,elg_sign,elg_verify): Sanity check on the args.
+ * dsa.c (dsa_check_secret_key,dsa_sign,dsa_verify): Ditto.
+
+ * pubkey.c (disable_pubkey_algo): New.
+ (check_pubkey_algo2): Look at disabled algo table.
+ * cipher.c (disable_cipher_algo): New.
+ (check_cipher_algo): Look at disabled algo table.
+
+Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * Makefile.am: Support for libtool.
+
+Fri Jul 2 11:45:54 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dsa.c (gen_k): Changed algorithm to consume less random bytes
+ * elgamal.c (gen_k): Ditto.
+
+ * random.c (random_dump_stats): New.
+
+Thu Jul 1 12:47:31 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * primegen.c, elgamal.c, dsa.c (progess): New and replaced all
+ fputc with a call to this function.
+
+Sat Jun 26 12:15:59 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndegd.c (do_write): s/ssize_t/int/ due to SunOS 4.1 probs.
+
+ * cipher.c (do_cbc_encrypt, do_cbc_decrypt): New.
+
+ * dynload.c (HAVE_DL_SHL_LOAD): Map hpux API to dlopen (Dave Dykstra).
+ * Makefile.am (install-exec-hook): Removed.
+
+Sun May 23 14:20:22 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (setup_cipher_table): Enable Twofish
+
+ * random.c (fast_random_poll): Disable use of times() for mingw32.
+
+Mon May 17 21:54:43 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (register_internal_cipher_extension): Minor init fix.
+
+Tue May 4 15:47:53 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * primegen.c (gen_prime): Readded the Fermat test. Fixed the bug
+ that we didn't correct for step when passing the prime to the
+ Rabin-Miller test which led to bad performance (Stefan Keller).
+ (check_prime): Add a first Fermat test.
+
+Sun Apr 18 10:11:28 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (cipher_setiv): Add ivlen arg, changed all callers.
+
+ * random.c (randomize_buffer): alway use secure memory because
+ we can't use m_is_secure() on a statically allocated buffer.
+
+ * twofish.c: Replaced some macros by a loop to reduce text size.
+ * Makefile.am (twofish): No more need for sed editing.
+
+Fri Apr 9 12:26:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (cipher_open): Reversed the changes for AUTO_CFB.
+
+ * blowfish.c: Dropped the Blowfish 160 mode.
+ * cipher.c (cipher_open): Ditto.
+ (setup_cipher_table): Ditto. And removed support of twofish128
+
+Wed Apr 7 20:51:39 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (get_random_bits): Can now handle requests > POOLSIZE
+
+ * cipher.c (cipher_open): Now uses standard CFB for automode if
+ the blocksize is gt 8 (according to rfc2440).
+
+ * twofish.c: Applied Matthew Skala's patches for 256 bit key.
+
+Tue Apr 6 19:58:12 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (get_random_bits): Can now handle requests > POOLSIZE
+
+ * cipher.c (cipher_open): Now uses standard CFB for automode if
+ the blocksize is gt 8 (according to rfc2440).
+
+Sat Mar 20 11:44:21 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndlinux.c (tty_printf) [IS_MODULE]: Removed.
+
+ * rndegd.c (gather_random): Some fixes.
+
+Wed Mar 17 13:09:03 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndegd.c (do_read): New.
+ (gather_random): Changed the implementation.
+
+Mon Mar 8 20:47:17 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (DLSYM_NEEDS_UNDERSCORE): Renamed.
+
+Fri Feb 26 17:55:41 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md.c: Nearly a total rewrote.
+
+Wed Feb 24 11:07:27 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * cipher.c (context): Fixed alignment
+ * md.c: Ditto.
+
+ * rndegd.c: New
+
+Mon Feb 22 20:04:00 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndegd.c: New.
+
+Wed Feb 10 17:15:39 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * Makefile.am: Modules are now figured out by configure
+ * construct.c: New. Generated by configure. Changed all modules
+ to work with that.
+ * sha1.h: Removed.
+ * md5.h: Removed.
+
+ * twofish.c: Changed interface to allow Twofish/256
+
+ * rndunix.c (start_gatherer): Die on SIGPIPE.
+
+Wed Jan 20 18:59:49 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndunix.c (gather_random): Fix to avoid infinite loop.
+
+Sun Jan 17 11:04:33 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * des.c (is_weak_key): Replace system memcmp due to bugs
+ in SunOS's memcmp.
+ (des_get_info): Return error on failed selftest.
+ * twofish.c (twofish_setkey): Return error on failed selftest or
+ invalid keylength.
+ * cast5.c (cast_setkey): Ditto.
+ * blowfish.c (bf_setkey): Return error on failed selftest.
+
+Tue Jan 12 11:17:18 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (random_is_faked): New.
+
+ * tiger.c: Only compile if we have the u64 type
+
+Sat Jan 9 16:02:23 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndunix.c (gather_random): check for setuid.
+
+ * Makefile.am: Add a way to staically link random modules
+
+Thu Jan 7 18:00:58 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md.c (md_stop_debug): Do a flush first.
+ (md_open): size of buffer now depends on the secure parameter
+
+Sun Jan 3 15:28:44 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * rndunix.c (start_gatherer): Fixed stupid ==/= bug
+
+1998-12-31 Geoff Keating <geoffk@ozemail.com.au>
+
+ * des.c (is_weak_key): Rewrite loop end condition.
+
+Tue Dec 29 14:41:47 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c: add unistd.h for getpid().
+ (RAND_MAX): Fallback value for Sun.
+
+Wed Dec 23 17:12:24 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * md.c (md_copy): Reset debug.
+
+Mon Dec 14 21:18:49 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * random.c (read_random_source): Changed the interface to the
+ random gathering function.
+ (gather_faked): Use new interface.
+ * dynload.c (dynload_getfnc_fast_random_poll): Ditto.
+ (dynload_getfnc_gather_random): Ditto.
+ * rndlinux.c (gather_random): Ditto.
+ * rndunix.c (gather_random): Ditto.
+
+Sat Dec 12 18:40:32 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (SYMBOL_VERSION): New to cope with system which needs
+ underscores.
+
+ * rndunix.c: Rewrote large parts
+
+Thu Dec 10 20:15:36 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (load_extension): increased needed verbosity level.
+
+ * random.c (fast_random_poll): Fallback to a default fast random
+ poll function.
+ (read_random_source): Always use the faked entroy gatherer if no
+ gather module is available.
+ * rndlinux.c (fast_poll): Removed.
+ * rndunix.c (fast_poll): Removed.
+
+
+Wed Nov 25 12:33:41 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-*.c: Removed.
+ * rndlinux.c : New.
+ * rndunix.c : New.
+ * random.c : Restructured the interface to the gather modules.
+ (intialize): Call constructor functions
+ (read_radnom_source): Moved to here.
+ * dynload.c (dynload_getfnc_gather_random): New.
+ (dynload_getfnc_fast_random_poll): New.
+ (register_internal_cipher_extension): New.
+ (register_cipher_extension): Support of internal modules.
+
+Sun Nov 8 17:44:36 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-unix.c (read_random_source): Removed the assert.
+
+Mon Oct 19 18:34:30 1998 me,,, (wk@tobold)
+
+ * pubkey.c: Hack to allow us to give some info about RSA keys back.
+
+Thu Oct 15 11:47:57 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dynload.c: Support for DLD
+
+Wed Oct 14 12:13:07 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-unix.c: Now uses names from configure for /dev/random.
+
+1998-10-10 SL Baur <steve@altair.xemacs.org>
+
+ * Makefile.am: fix sed -O substitutions to catch -O6, etc.
+
+Tue Oct 6 10:06:32 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-unix.c (HAVE_GETTIMEOFDAY): Fixed (was ..GETTIMEOFTIME :-)
+ * rand-dummy.c (HAVE_GETTIMEOFDAY): Ditto.
+
+Mon Sep 28 13:23:09 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_digest): New.
+ (md_reset): New.
+
+Wed Sep 23 12:27:02 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c (TIGER_CONTEXT): moved "buf", so that it is 64 bit aligned.
+
+Mon Sep 21 06:22:53 1998 Werner Koch (wk@(none))
+
+ * des.c: Some patches from Michael.
+
+Thu Sep 17 19:00:06 1998 Werner Koch (wk@(none))
+
+ * des.c : New file from Michael Roth <mroth@nessie.de>
+
+Mon Sep 14 11:10:55 1998 Werner Koch (wk@(none))
+
+ * blowfish.c (bf_setkey): Niklas Hernaeus patch to detect weak keys.
+
+Mon Sep 14 09:19:25 1998 Werner Koch (wk@(none))
+
+ * dynload.c (RTLD_NOW): Now defined to 1 if it is undefined.
+
+Mon Sep 7 17:04:33 1998 Werner Koch (wk@(none))
+
+ * Makefile.am: Fixes to allow a different build directory
+
+Thu Aug 6 17:25:38 1998 Werner Koch,mobil,,, (wk@tobold)
+
+ * random.c (get_random_byte): Removed and changed all callers
+ to use get_random_bits()
+
+Mon Jul 27 10:30:22 1998 Werner Koch (wk@(none))
+
+ * cipher.c : Support for other blocksizes
+ (cipher_get_blocksize): New.
+ * twofish.c: New.
+ * Makefile.am: Add twofish module.
+
+Mon Jul 13 21:30:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (read_pool): Simple alloc if secure_alloc is not set.
+ (get_random_bits): Ditto.
+
+Thu Jul 9 13:01:14 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dynload.c (load_extension): Function now nbails out if
+ the program is run setuid.
+
+Wed Jul 8 18:58:23 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (rmd160_hash_buffer): New.
+
+Thu Jul 2 10:50:30 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c (cipher_open): algos >=100 use standard CFB
+
+Thu Jun 25 11:18:25 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * Makefile.am: Support for extensions
+
+Thu Jun 18 12:09:38 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (mix_pool): simpler handling for level 0
+
+Mon Jun 15 14:40:48 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c: Removed from dist, will reappear as dynload module
+
+Sat Jun 13 14:16:57 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * pubkey.c: Major changes to allow extensions. Changed the inteface
+ of all public key ciphers and added the ability to load extensions
+ on demand.
+
+ * misc.c: Removed.
+
+Wed Jun 10 07:52:08 1998 Werner Koch,mobil,,, (wk@tobold)
+
+ * dynload.c: New.
+ * cipher.c: Major changes to allow extensions.
+
+Mon Jun 8 22:43:00 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c: Major internal chnages to support extensions.
+ * blowfish.c (blowfish_get_info): New and made all internal
+ functions static, changed heder.
+ * cast5.c (cast5_get_info): Likewise.
+
+Mon Jun 8 12:27:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c (transform): Fix for big endian
+
+ * cipher.c (do_cfb_decrypt): Big endian fix.
+
+Fri May 22 07:30:39 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_get_oid): Add a new one for TIGER.
+
+Thu May 21 13:24:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c: Add support for a dummy cipher
+
+Thu May 14 15:40:36 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (transform): fixed sigbus - I should better
+ add Christian von Roques's new implemenation of rmd160_write.
+
+Fri May 8 18:07:44 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rand-internal.h, rand-unix.c, rand-w32.c, rand_dummy.c: New
+ * random.c: Moved system specific functions to rand-****.c
+
+Fri May 8 14:01:17 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (fast_random_poll): add call to gethrtime.
+
+Tue May 5 21:28:55 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * elgamal.c (elg_generate): choosing x was not correct, could
+ yield 6 bytes which are not from the random pool, tsss, tsss..
+
+Tue May 5 14:09:06 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * primegen.c (generate_elg_prime): Add arg mode, changed all
+ callers and implemented mode 1.
+
+Mon Apr 27 14:41:58 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c (cipher_get_keylen): New.
+
+Sun Apr 26 14:44:52 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * tiger.c, tiger.h: New.
+
+Wed Apr 8 14:57:11 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * misc.c (check_pubkey_algo2): New.
+
+Tue Apr 7 18:46:49 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cipher.c: New
+ * misc.c (check_cipher_algo): Moved to cipher.c
+ * cast5.c: Moved many functions to cipher.c
+ * blowfish.c: Likewise.
+
+Sat Apr 4 19:52:08 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * cast5.c: Implemented and tested.
+
+Wed Apr 1 16:38:27 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * elgamal.c (elg_generate): Faster generation of x in some cases.
+
+Thu Mar 19 13:54:48 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * blowfish.c (blowfish_decode_cfb): changed XOR operation
+ (blowfish_encode_cfb): Ditto.
+
+Thu Mar 12 14:04:05 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * sha1.c (transform): Rewrote
+
+ * blowfish.c (encrypt): Unrolled for rounds == 16
+ (decrypt): Ditto.
+
+Tue Mar 10 16:32:08 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (transform): Unrolled the loop.
+
+Tue Mar 10 13:05:14 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (read_pool): Add pool_balance stuff.
+ (get_random_bits): New.
+
+ * elgamal.c (elg_generate): Now uses get_random_bits to generate x.
+
+
+Tue Mar 10 11:33:51 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_digest_length): New.
+
+Tue Mar 10 11:27:41 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dsa.c (dsa_verify): Works.
+
+Mon Mar 9 12:59:08 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * dsa.c, dsa.h: Removed some unused code.
+
+Wed Mar 4 10:39:22 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_open): Add call to fast_random_poll.
+ blowfish.c (blowfish_setkey): Ditto.
+
+Tue Mar 3 13:32:54 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * rmd160.c (rmd160_mixblock): New.
+ * random.c: Restructured to start with a new RNG implementation.
+ * random.h: New.
+
+Mon Mar 2 19:21:46 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * gost.c, gost.h: Removed because they did only contain trash.
+
+Sun Mar 1 16:42:29 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * random.c (fill_buffer): removed error message if n == -1.
+
+Fri Feb 27 16:39:34 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c (md_enable): No init if called twice.
+
+Thu Feb 26 07:57:02 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * primegen.c (generate_elg_prime): Changed the progress printing.
+ (gen_prime): Ditto.
+
+Tue Feb 24 12:28:42 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md5.c, md.5 : Replaced by a modified version of md5.c from
+ GNU textutils 1.22.
+
+Wed Feb 18 14:08:30 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * md.c, md.h : New debugging support
+
+Mon Feb 16 10:08:47 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * misc.c (cipher_algo_to_string): New
+ (pubkey_algo_to_string): New.
+ (digest_algo_to_string): New.
+
+
+ Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006
+ 2007, 2008, 2009 Free Software Foundation, Inc.
+
+ This file is free software; as a special exception the author gives
+ unlimited permission to copy and/or distribute it, with or without
+ modifications, as long as this notice is preserved.
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/grub-core/lib/libgcrypt/cipher/ac.c b/grub-core/lib/libgcrypt/cipher/ac.c
new file mode 100644
index 0000000..ee9498b
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/ac.c
@@ -0,0 +1,3301 @@
+/* ac.c - Alternative interface for asymmetric cryptography.
+ Copyright (C) 2003, 2004, 2005, 2006
+ 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of Libgcrypt.
+
+ Libgcrypt is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser general Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ Libgcrypt is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#include "g10lib.h"
+#include "cipher.h"
+#include "mpi.h"
+
+
+
+/* At the moment the ac interface is a wrapper around the pk
+ interface, but this might change somewhen in the future, depending
+ on how many people prefer the ac interface. */
+
+/* Mapping of flag numbers to the according strings as it is expected
+ for S-expressions. */
+static struct number_string
+{
+ int number;
+ const char *string;
+} ac_flags[] =
+ {
+ { GCRY_AC_FLAG_NO_BLINDING, "no-blinding" },
+ };
+
+/* The positions in this list correspond to the values contained in
+ the gcry_ac_key_type_t enumeration list. */
+static const char *ac_key_identifiers[] =
+ {
+ "private-key",
+ "public-key"
+ };
+
+/* These specifications are needed for key-pair generation; the caller
+ is allowed to pass additional, algorithm-specific `specs' to
+ gcry_ac_key_pair_generate. This list is used for decoding the
+ provided values according to the selected algorithm. */
+struct gcry_ac_key_generate_spec
+{
+ int algorithm; /* Algorithm for which this flag is
+ relevant. */
+ const char *name; /* Name of this flag. */
+ size_t offset; /* Offset in the cipher-specific spec
+ structure at which the MPI value
+ associated with this flag is to be
+ found. */
+} ac_key_generate_specs[] =
+ {
+ { GCRY_AC_RSA, "rsa-use-e", offsetof (gcry_ac_key_spec_rsa_t, e) },
+ { 0 }
+ };
+
+/* Handle structure. */
+struct gcry_ac_handle
+{
+ int algorithm; /* Algorithm ID associated with this
+ handle. */
+ const char *algorithm_name; /* Name of the algorithm. */
+ unsigned int flags; /* Flags, not used yet. */
+ gcry_module_t module; /* Reference to the algorithm
+ module. */
+};
+
+/* A named MPI value. */
+typedef struct gcry_ac_mpi
+{
+ char *name; /* Self-maintained copy of name. */
+ gcry_mpi_t mpi; /* MPI value. */
+ unsigned int flags; /* Flags. */
+} gcry_ac_mpi_t;
+
+/* A data set, that is simply a list of named MPI values. */
+struct gcry_ac_data
+{
+ gcry_ac_mpi_t *data; /* List of named values. */
+ unsigned int data_n; /* Number of values in DATA. */
+};
+
+/* A single key. */
+struct gcry_ac_key
+{
+ gcry_ac_data_t data; /* Data in native ac structure. */
+ gcry_ac_key_type_t type; /* Type of the key. */
+};
+
+/* A key pair. */
+struct gcry_ac_key_pair
+{
+ gcry_ac_key_t public;
+ gcry_ac_key_t secret;
+};
+
+
+
+/*
+ * Functions for working with data sets.
+ */
+
+/* Creates a new, empty data set and store it in DATA. */
+gcry_error_t
+_gcry_ac_data_new (gcry_ac_data_t *data)
+{
+ gcry_ac_data_t data_new;
+ gcry_error_t err;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ data_new = gcry_malloc (sizeof (*data_new));
+ if (! data_new)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ data_new->data = NULL;
+ data_new->data_n = 0;
+ *data = data_new;
+ err = 0;
+
+ out:
+
+ return err;
+}
+
+/* Destroys all the entries in DATA, but not DATA itself. */
+static void
+ac_data_values_destroy (gcry_ac_data_t data)
+{
+ unsigned int i;
+
+ for (i = 0; i < data->data_n; i++)
+ if (data->data[i].flags & GCRY_AC_FLAG_DEALLOC)
+ {
+ gcry_mpi_release (data->data[i].mpi);
+ gcry_free (data->data[i].name);
+ }
+}
+
+/* Destroys the data set DATA. */
+void
+_gcry_ac_data_destroy (gcry_ac_data_t data)
+{
+ if (data)
+ {
+ ac_data_values_destroy (data);
+ gcry_free (data->data);
+ gcry_free (data);
+ }
+}
+
+/* This function creates a copy of the array of named MPIs DATA_MPIS,
+ which is of length DATA_MPIS_N; the copy is stored in
+ DATA_MPIS_CP. */
+static gcry_error_t
+ac_data_mpi_copy (gcry_ac_mpi_t *data_mpis, unsigned int data_mpis_n,
+ gcry_ac_mpi_t **data_mpis_cp)
+{
+ gcry_ac_mpi_t *data_mpis_new;
+ gcry_error_t err;
+ unsigned int i;
+ gcry_mpi_t mpi;
+ char *label;
+
+ data_mpis_new = gcry_malloc (sizeof (*data_mpis_new) * data_mpis_n);
+ if (! data_mpis_new)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+ memset (data_mpis_new, 0, sizeof (*data_mpis_new) * data_mpis_n);
+
+ err = 0;
+ for (i = 0; i < data_mpis_n; i++)
+ {
+ /* Copy values. */
+
+ label = gcry_strdup (data_mpis[i].name);
+ mpi = gcry_mpi_copy (data_mpis[i].mpi);
+ if (! (label && mpi))
+ {
+ err = gcry_error_from_errno (errno);
+ gcry_mpi_release (mpi);
+ gcry_free (label);
+ break;
+ }
+
+ data_mpis_new[i].flags = GCRY_AC_FLAG_DEALLOC;
+ data_mpis_new[i].name = label;
+ data_mpis_new[i].mpi = mpi;
+ }
+ if (err)
+ goto out;
+
+ *data_mpis_cp = data_mpis_new;
+ err = 0;
+
+ out:
+
+ if (err)
+ if (data_mpis_new)
+ {
+ for (i = 0; i < data_mpis_n; i++)
+ {
+ gcry_mpi_release (data_mpis_new[i].mpi);
+ gcry_free (data_mpis_new[i].name);
+ }
+ gcry_free (data_mpis_new);
+ }
+
+ return err;
+}
+
+/* Create a copy of the data set DATA and store it in DATA_CP. */
+gcry_error_t
+_gcry_ac_data_copy (gcry_ac_data_t *data_cp, gcry_ac_data_t data)
+{
+ gcry_ac_mpi_t *data_mpis = NULL;
+ gcry_ac_data_t data_new;
+ gcry_error_t err;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ /* Allocate data set. */
+ data_new = gcry_malloc (sizeof (*data_new));
+ if (! data_new)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ err = ac_data_mpi_copy (data->data, data->data_n, &data_mpis);
+ if (err)
+ goto out;
+
+ data_new->data_n = data->data_n;
+ data_new->data = data_mpis;
+ *data_cp = data_new;
+
+ out:
+
+ if (err)
+ gcry_free (data_new);
+
+ return err;
+}
+
+/* Returns the number of named MPI values inside of the data set
+ DATA. */
+unsigned int
+_gcry_ac_data_length (gcry_ac_data_t data)
+{
+ return data->data_n;
+}
+
+
+/* Add the value MPI to DATA with the label NAME. If FLAGS contains
+ GCRY_AC_FLAG_COPY, the data set will contain copies of NAME
+ and MPI. If FLAGS contains GCRY_AC_FLAG_DEALLOC or
+ GCRY_AC_FLAG_COPY, the values contained in the data set will
+ be deallocated when they are to be removed from the data set. */
+gcry_error_t
+_gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags,
+ const char *name, gcry_mpi_t mpi)
+{
+ gcry_error_t err;
+ gcry_mpi_t mpi_cp;
+ char *name_cp;
+ unsigned int i;
+
+ name_cp = NULL;
+ mpi_cp = NULL;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ if (flags & ~(GCRY_AC_FLAG_DEALLOC | GCRY_AC_FLAG_COPY))
+ {
+ err = gcry_error (GPG_ERR_INV_ARG);
+ goto out;
+ }
+
+ if (flags & GCRY_AC_FLAG_COPY)
+ {
+ /* Create copies. */
+
+ flags |= GCRY_AC_FLAG_DEALLOC;
+ name_cp = gcry_strdup (name);
+ mpi_cp = gcry_mpi_copy (mpi);
+ if (! (name_cp && mpi_cp))
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+ }
+
+ /* Search for existing entry. */
+ for (i = 0; i < data->data_n; i++)
+ if (! strcmp (name, data->data[i].name))
+ break;
+ if (i < data->data_n)
+ {
+ /* An entry for NAME does already exist. */
+ if (data->data[i].flags & GCRY_AC_FLAG_DEALLOC)
+ {
+ gcry_mpi_release (data->data[i].mpi);
+ gcry_free (data->data[i].name);
+ }
+ }
+ else
+ {
+ /* Create a new entry. */
+
+ gcry_ac_mpi_t *ac_mpis;
+
+ ac_mpis = gcry_realloc (data->data,
+ sizeof (*data->data) * (data->data_n + 1));
+ if (! ac_mpis)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ if (data->data != ac_mpis)
+ data->data = ac_mpis;
+ data->data_n++;
+ }
+
+ data->data[i].name = name_cp ? name_cp : ((char *) name);
+ data->data[i].mpi = mpi_cp ? mpi_cp : mpi;
+ data->data[i].flags = flags;
+ err = 0;
+
+ out:
+
+ if (err)
+ {
+ gcry_mpi_release (mpi_cp);
+ gcry_free (name_cp);
+ }
+
+ return err;
+}
+
+/* Stores the value labelled with NAME found in the data set DATA in
+ MPI. The returned MPI value will be released in case
+ gcry_ac_data_set is used to associate the label NAME with a
+ different MPI value. */
+gcry_error_t
+_gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags,
+ const char *name, gcry_mpi_t *mpi)
+{
+ gcry_mpi_t mpi_return;
+ gcry_error_t err;
+ unsigned int i;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ if (flags & ~(GCRY_AC_FLAG_COPY))
+ {
+ err = gcry_error (GPG_ERR_INV_ARG);
+ goto out;
+ }
+
+ for (i = 0; i < data->data_n; i++)
+ if (! strcmp (name, data->data[i].name))
+ break;
+ if (i == data->data_n)
+ {
+ err = gcry_error (GPG_ERR_NOT_FOUND);
+ goto out;
+ }
+
+ if (flags & GCRY_AC_FLAG_COPY)
+ {
+ mpi_return = gcry_mpi_copy (data->data[i].mpi);
+ if (! mpi_return)
+ {
+ err = gcry_error_from_errno (errno); /* FIXME? */
+ goto out;
+ }
+ }
+ else
+ mpi_return = data->data[i].mpi;
+
+ *mpi = mpi_return;
+ err = 0;
+
+ out:
+
+ return err;
+}
+
+/* Stores in NAME and MPI the named MPI value contained in the data
+ set DATA with the index IDX. NAME or MPI may be NULL. The
+ returned MPI value will be released in case gcry_ac_data_set is
+ used to associate the label NAME with a different MPI value. */
+gcry_error_t
+_gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags,
+ unsigned int idx,
+ const char **name, gcry_mpi_t *mpi)
+{
+ gcry_error_t err;
+ gcry_mpi_t mpi_cp;
+ char *name_cp;
+
+ name_cp = NULL;
+ mpi_cp = NULL;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ if (flags & ~(GCRY_AC_FLAG_COPY))
+ {
+ err = gcry_error (GPG_ERR_INV_ARG);
+ goto out;
+ }
+
+ if (idx >= data->data_n)
+ {
+ err = gcry_error (GPG_ERR_INV_ARG);
+ goto out;
+ }
+
+ if (flags & GCRY_AC_FLAG_COPY)
+ {
+ /* Return copies to the user. */
+ if (name)
+ {
+ name_cp = gcry_strdup (data->data[idx].name);
+ if (! name_cp)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+ }
+ if (mpi)
+ {
+ mpi_cp = gcry_mpi_copy (data->data[idx].mpi);
+ if (! mpi_cp)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+ }
+ }
+
+ if (name)
+ *name = name_cp ? name_cp : data->data[idx].name;
+ if (mpi)
+ *mpi = mpi_cp ? mpi_cp : data->data[idx].mpi;
+ err = 0;
+
+ out:
+
+ if (err)
+ {
+ gcry_mpi_release (mpi_cp);
+ gcry_free (name_cp);
+ }
+
+ return err;
+}
+
+/* Convert the data set DATA into a new S-Expression, which is to be
+ stored in SEXP, according to the identifiers contained in
+ IDENTIFIERS. */
+gcry_error_t
+_gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp,
+ const char **identifiers)
+{
+ gcry_sexp_t sexp_new;
+ gcry_error_t err;
+ char *sexp_buffer;
+ size_t sexp_buffer_n;
+ size_t identifiers_n;
+ const char *label;
+ gcry_mpi_t mpi;
+ void **arg_list;
+ size_t data_n;
+ unsigned int i;
+
+ sexp_buffer_n = 1;
+ sexp_buffer = NULL;
+ arg_list = NULL;
+ err = 0;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ /* Calculate size of S-expression representation. */
+
+ i = 0;
+ if (identifiers)
+ while (identifiers[i])
+ {
+ /* For each identifier, we add "(<IDENTIFIER>)". */
+ sexp_buffer_n += 1 + strlen (identifiers[i]) + 1;
+ i++;
+ }
+ identifiers_n = i;
+
+ if (! identifiers_n)
+ /* If there are NO identifiers, we still add surrounding braces so
+ that we have a list of named MPI value lists. Otherwise it
+ wouldn't be too much fun to process these lists. */
+ sexp_buffer_n += 2;
+
+ data_n = _gcry_ac_data_length (data);
+ for (i = 0; i < data_n; i++)
+ {
+ err = gcry_ac_data_get_index (data, 0, i, &label, NULL);
+ if (err)
+ break;
+ /* For each MPI we add "(<LABEL> %m)". */
+ sexp_buffer_n += 1 + strlen (label) + 4;
+ }
+ if (err)
+ goto out;
+
+ /* Allocate buffer. */
+
+ sexp_buffer = gcry_malloc (sexp_buffer_n);
+ if (! sexp_buffer)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Fill buffer. */
+
+ *sexp_buffer = 0;
+ sexp_buffer_n = 0;
+
+ /* Add identifiers: (<IDENTIFIER0>(<IDENTIFIER1>...)). */
+ if (identifiers_n)
+ {
+ /* Add nested identifier lists as usual. */
+ for (i = 0; i < identifiers_n; i++)
+ sexp_buffer_n += sprintf (sexp_buffer + sexp_buffer_n, "(%s",
+ identifiers[i]);
+ }
+ else
+ {
+ /* Add special list. */
+ sexp_buffer_n += sprintf (sexp_buffer + sexp_buffer_n, "(");
+ }
+
+ /* Add MPI list. */
+ arg_list = gcry_malloc (sizeof (*arg_list) * (data_n + 1));
+ if (! arg_list)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+ for (i = 0; i < data_n; i++)
+ {
+ err = gcry_ac_data_get_index (data, 0, i, &label, &mpi);
+ if (err)
+ break;
+ sexp_buffer_n += sprintf (sexp_buffer + sexp_buffer_n,
+ "(%s %%m)", label);
+ arg_list[i] = &data->data[i].mpi;
+ }
+ if (err)
+ goto out;
+
+ if (identifiers_n)
+ {
+ /* Add closing braces for identifier lists as usual. */
+ for (i = 0; i < identifiers_n; i++)
+ sexp_buffer_n += sprintf (sexp_buffer + sexp_buffer_n, ")");
+ }
+ else
+ {
+ /* Add closing braces for special list. */
+ sexp_buffer_n += sprintf (sexp_buffer + sexp_buffer_n, ")");
+ }
+
+ /* Construct. */
+ err = gcry_sexp_build_array (&sexp_new, NULL, sexp_buffer, arg_list);
+ if (err)
+ goto out;
+
+ *sexp = sexp_new;
+
+ out:
+
+ gcry_free (sexp_buffer);
+ gcry_free (arg_list);
+
+ return err;
+}
+
+/* Create a new data set, which is to be stored in DATA_SET, from the
+ S-Expression SEXP, according to the identifiers contained in
+ IDENTIFIERS. */
+gcry_error_t
+_gcry_ac_data_from_sexp (gcry_ac_data_t *data_set, gcry_sexp_t sexp,
+ const char **identifiers)
+{
+ gcry_ac_data_t data_set_new;
+ gcry_error_t err;
+ gcry_sexp_t sexp_cur;
+ gcry_sexp_t sexp_tmp;
+ gcry_mpi_t mpi;
+ char *string;
+ const char *data;
+ size_t data_n;
+ size_t sexp_n;
+ unsigned int i;
+ int skip_name;
+
+ data_set_new = NULL;
+ sexp_cur = sexp;
+ sexp_tmp = NULL;
+ string = NULL;
+ mpi = NULL;
+ err = 0;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ /* Process S-expression/identifiers. */
+
+ if (identifiers)
+ {
+ for (i = 0; identifiers[i]; i++)
+ {
+ /* Next identifier. Extract first data item from
+ SEXP_CUR. */
+ data = gcry_sexp_nth_data (sexp_cur, 0, &data_n);
+
+ if (! ((data_n == strlen (identifiers[i]))
+ && (! strncmp (data, identifiers[i], data_n))))
+ {
+ /* Identifier mismatch -> error. */
+ err = gcry_error (GPG_ERR_INV_SEXP);
+ break;
+ }
+
+ /* Identifier matches. Now we have to distinguish two
+ cases:
+
+ (i) we are at the last identifier:
+ leave loop
+
+ (ii) we are not at the last identifier:
+ extract next element, which is supposed to be a
+ sublist. */
+
+ if (! identifiers[i + 1])
+ /* Last identifier. */
+ break;
+ else
+ {
+ /* Not the last identifier, extract next sublist. */
+
+ sexp_tmp = gcry_sexp_nth (sexp_cur, 1);
+ if (! sexp_tmp)
+ {
+ /* Missing sublist. */
+ err = gcry_error (GPG_ERR_INV_SEXP);
+ break;
+ }
+
+ /* Release old SEXP_CUR, in case it is not equal to the
+ original SEXP. */
+ if (sexp_cur != sexp)
+ gcry_sexp_release (sexp_cur);
+
+ /* Make SEXP_CUR point to the new current sublist. */
+ sexp_cur = sexp_tmp;
+ sexp_tmp = NULL;
+ }
+ }
+ if (err)
+ goto out;
+
+ if (i)
+ {
+ /* We have at least one identifier in the list, this means
+ the the list of named MPI values is prefixed, this means
+ that we need to skip the first item (the list name), when
+ processing the MPI values. */
+ skip_name = 1;
+ }
+ else
+ {
+ /* Since there is no identifiers list, the list of named MPI
+ values is not prefixed with a list name, therefore the
+ offset to use is zero. */
+ skip_name = 0;
+ }
+ }
+ else
+ /* Since there is no identifiers list, the list of named MPI
+ values is not prefixed with a list name, therefore the offset
+ to use is zero. */
+ skip_name = 0;
+
+ /* Create data set from S-expression data. */
+
+ err = gcry_ac_data_new (&data_set_new);
+ if (err)
+ goto out;
+
+ /* Figure out amount of named MPIs in SEXP_CUR. */
+ if (sexp_cur)
+ sexp_n = gcry_sexp_length (sexp_cur) - skip_name;
+ else
+ sexp_n = 0;
+
+ /* Extracte the named MPIs sequentially. */
+ for (i = 0; i < sexp_n; i++)
+ {
+ /* Store next S-Expression pair, which is supposed to consist of
+ a name and an MPI value, in SEXP_TMP. */
+
+ sexp_tmp = gcry_sexp_nth (sexp_cur, i + skip_name);
+ if (! sexp_tmp)
+ {
+ err = gcry_error (GPG_ERR_INV_SEXP);
+ break;
+ }
+
+ /* Extract name from current S-Expression pair. */
+ data = gcry_sexp_nth_data (sexp_tmp, 0, &data_n);
+ string = gcry_malloc (data_n + 1);
+ if (! string)
+ {
+ err = gcry_error_from_errno (errno);
+ break;
+ }
+ memcpy (string, data, data_n);
+ string[data_n] = 0;
+
+ /* Extract MPI value. */
+ mpi = gcry_sexp_nth_mpi (sexp_tmp, 1, 0);
+ if (! mpi)
+ {
+ err = gcry_error (GPG_ERR_INV_SEXP); /* FIXME? */
+ break;
+ }
+
+ /* Store named MPI in data_set_new. */
+ err = gcry_ac_data_set (data_set_new, GCRY_AC_FLAG_DEALLOC, string, mpi);
+ if (err)
+ break;
+
+/* gcry_free (string); */
+ string = NULL;
+/* gcry_mpi_release (mpi); */
+ mpi = NULL;
+
+ gcry_sexp_release (sexp_tmp);
+ sexp_tmp = NULL;
+ }
+ if (err)
+ goto out;
+
+ *data_set = data_set_new;
+
+ out:
+
+ if (sexp_cur != sexp)
+ gcry_sexp_release (sexp_cur);
+ gcry_sexp_release (sexp_tmp);
+ gcry_mpi_release (mpi);
+ gcry_free (string);
+
+ if (err)
+ gcry_ac_data_destroy (data_set_new);
+
+ return err;
+}
+
+
+static void
+_gcry_ac_data_dump (const char *prefix, gcry_ac_data_t data)
+{
+ unsigned char *mpi_buffer;
+ size_t mpi_buffer_n;
+ unsigned int data_n;
+ gcry_error_t err;
+ const char *name;
+ gcry_mpi_t mpi;
+ unsigned int i;
+
+ if (! data)
+ return;
+
+ if (fips_mode ())
+ return;
+
+ mpi_buffer = NULL;
+
+ data_n = _gcry_ac_data_length (data);
+ for (i = 0; i < data_n; i++)
+ {
+ err = gcry_ac_data_get_index (data, 0, i, &name, &mpi);
+ if (err)
+ {
+ log_error ("failed to dump data set");
+ break;
+ }
+
+ err = gcry_mpi_aprint (GCRYMPI_FMT_HEX, &mpi_buffer, &mpi_buffer_n, mpi);
+ if (err)
+ {
+ log_error ("failed to dump data set");
+ break;
+ }
+
+ log_printf ("%s%s%s: %s\n",
+ prefix ? prefix : "",
+ prefix ? ": " : ""
+ , name, mpi_buffer);
+
+ gcry_free (mpi_buffer);
+ mpi_buffer = NULL;
+ }
+
+ gcry_free (mpi_buffer);
+}
+
+/* Dump the named MPI values contained in the data set DATA to
+ Libgcrypt's logging stream. */
+void
+gcry_ac_data_dump (const char *prefix, gcry_ac_data_t data)
+{
+ _gcry_ac_data_dump (prefix, data);
+}
+
+/* Destroys any values contained in the data set DATA. */
+void
+_gcry_ac_data_clear (gcry_ac_data_t data)
+{
+ ac_data_values_destroy (data);
+ gcry_free (data->data);
+ data->data = NULL;
+ data->data_n = 0;
+}
+
+
+
+/*
+ * Implementation of `ac io' objects.
+ */
+
+/* Initialize AC_IO according to MODE, TYPE and the variable list of
+ arguments AP. The list of variable arguments to specify depends on
+ the given TYPE. */
+void
+_gcry_ac_io_init_va (gcry_ac_io_t *ac_io,
+ gcry_ac_io_mode_t mode, gcry_ac_io_type_t type, va_list ap)
+{
+ memset (ac_io, 0, sizeof (*ac_io));
+
+ if (fips_mode ())
+ return;
+
+ gcry_assert ((mode == GCRY_AC_IO_READABLE) || (mode == GCRY_AC_IO_WRITABLE));
+ gcry_assert ((type == GCRY_AC_IO_STRING) || (type == GCRY_AC_IO_STRING));
+
+ ac_io->mode = mode;
+ ac_io->type = type;
+
+ switch (mode)
+ {
+ case GCRY_AC_IO_READABLE:
+ switch (type)
+ {
+ case GCRY_AC_IO_STRING:
+ ac_io->io.readable.string.data = va_arg (ap, unsigned char *);
+ ac_io->io.readable.string.data_n = va_arg (ap, size_t);
+ break;
+
+ case GCRY_AC_IO_CALLBACK:
+ ac_io->io.readable.callback.cb = va_arg (ap, gcry_ac_data_read_cb_t);
+ ac_io->io.readable.callback.opaque = va_arg (ap, void *);
+ break;
+ }
+ break;
+ case GCRY_AC_IO_WRITABLE:
+ switch (type)
+ {
+ case GCRY_AC_IO_STRING:
+ ac_io->io.writable.string.data = va_arg (ap, unsigned char **);
+ ac_io->io.writable.string.data_n = va_arg (ap, size_t *);
+ break;
+
+ case GCRY_AC_IO_CALLBACK:
+ ac_io->io.writable.callback.cb = va_arg (ap, gcry_ac_data_write_cb_t);
+ ac_io->io.writable.callback.opaque = va_arg (ap, void *);
+ break;
+ }
+ break;
+ }
+}
+
+/* Initialize AC_IO according to MODE, TYPE and the variable list of
+ arguments. The list of variable arguments to specify depends on
+ the given TYPE. */
+void
+_gcry_ac_io_init (gcry_ac_io_t *ac_io,
+ gcry_ac_io_mode_t mode, gcry_ac_io_type_t type, ...)
+{
+ va_list ap;
+
+ va_start (ap, type);
+ _gcry_ac_io_init_va (ac_io, mode, type, ap);
+ va_end (ap);
+}
+
+
+/* Write to the IO object AC_IO BUFFER_N bytes from BUFFER. Return
+ zero on success or error code. */
+static gcry_error_t
+_gcry_ac_io_write (gcry_ac_io_t *ac_io, unsigned char *buffer, size_t buffer_n)
+{
+ gcry_error_t err;
+
+ gcry_assert (ac_io->mode == GCRY_AC_IO_WRITABLE);
+ err = 0;
+
+ switch (ac_io->type)
+ {
+ case GCRY_AC_IO_STRING:
+ {
+ unsigned char *p;
+
+ if (*ac_io->io.writable.string.data)
+ {
+ p = gcry_realloc (*ac_io->io.writable.string.data,
+ *ac_io->io.writable.string.data_n + buffer_n);
+ if (! p)
+ err = gcry_error_from_errno (errno);
+ else
+ {
+ if (*ac_io->io.writable.string.data != p)
+ *ac_io->io.writable.string.data = p;
+ memcpy (p + *ac_io->io.writable.string.data_n, buffer, buffer_n);
+ *ac_io->io.writable.string.data_n += buffer_n;
+ }
+ }
+ else
+ {
+ if (gcry_is_secure (buffer))
+ p = gcry_malloc_secure (buffer_n);
+ else
+ p = gcry_malloc (buffer_n);
+ if (! p)
+ err = gcry_error_from_errno (errno);
+ else
+ {
+ memcpy (p, buffer, buffer_n);
+ *ac_io->io.writable.string.data = p;
+ *ac_io->io.writable.string.data_n = buffer_n;
+ }
+ }
+ }
+ break;
+
+ case GCRY_AC_IO_CALLBACK:
+ err = (*ac_io->io.writable.callback.cb) (ac_io->io.writable.callback.opaque,
+ buffer, buffer_n);
+ break;
+ }
+
+ return err;
+}
+
+/* Read *BUFFER_N bytes from the IO object AC_IO into BUFFER; NREAD
+ bytes have already been read from the object; on success, store the
+ amount of bytes read in *BUFFER_N; zero bytes read means EOF.
+ Return zero on success or error code. */
+static gcry_error_t
+_gcry_ac_io_read (gcry_ac_io_t *ac_io,
+ unsigned int nread, unsigned char *buffer, size_t *buffer_n)
+{
+ gcry_error_t err;
+
+ gcry_assert (ac_io->mode == GCRY_AC_IO_READABLE);
+ err = 0;
+
+ switch (ac_io->type)
+ {
+ case GCRY_AC_IO_STRING:
+ {
+ size_t bytes_available;
+ size_t bytes_to_read;
+ size_t bytes_wanted;
+
+ bytes_available = ac_io->io.readable.string.data_n - nread;
+ bytes_wanted = *buffer_n;
+
+ if (bytes_wanted > bytes_available)
+ bytes_to_read = bytes_available;
+ else
+ bytes_to_read = bytes_wanted;
+
+ memcpy (buffer, ac_io->io.readable.string.data + nread, bytes_to_read);
+ *buffer_n = bytes_to_read;
+ err = 0;
+ break;
+ }
+
+ case GCRY_AC_IO_CALLBACK:
+ err = (*ac_io->io.readable.callback.cb)
+ (ac_io->io.readable.callback.opaque, buffer, buffer_n);
+ break;
+ }
+
+ return err;
+}
+
+/* Read all data available from the IO object AC_IO into newly
+ allocated memory, storing an appropriate pointer in *BUFFER and the
+ amount of bytes read in *BUFFER_N. Return zero on success or error
+ code. */
+static gcry_error_t
+_gcry_ac_io_read_all (gcry_ac_io_t *ac_io, unsigned char **buffer, size_t *buffer_n)
+{
+ unsigned char *buffer_new;
+ size_t buffer_new_n;
+ unsigned char buf[BUFSIZ];
+ size_t buf_n;
+ unsigned char *p;
+ gcry_error_t err;
+
+ buffer_new = NULL;
+ buffer_new_n = 0;
+
+ while (1)
+ {
+ buf_n = sizeof (buf);
+ err = _gcry_ac_io_read (ac_io, buffer_new_n, buf, &buf_n);
+ if (err)
+ break;
+
+ if (buf_n)
+ {
+ p = gcry_realloc (buffer_new, buffer_new_n + buf_n);
+ if (! p)
+ {
+ err = gcry_error_from_errno (errno);
+ break;
+ }
+
+ if (buffer_new != p)
+ buffer_new = p;
+
+ memcpy (buffer_new + buffer_new_n, buf, buf_n);
+ buffer_new_n += buf_n;
+ }
+ else
+ break;
+ }
+ if (err)
+ goto out;
+
+ *buffer_n = buffer_new_n;
+ *buffer = buffer_new;
+
+ out:
+
+ if (err)
+ gcry_free (buffer_new);
+
+ return err;
+}
+
+/* Read data chunks from the IO object AC_IO until EOF, feeding them
+ to the callback function CB. Return zero on success or error
+ code. */
+static gcry_error_t
+_gcry_ac_io_process (gcry_ac_io_t *ac_io,
+ gcry_ac_data_write_cb_t cb, void *opaque)
+{
+ unsigned char buffer[BUFSIZ];
+ unsigned int nread;
+ size_t buffer_n;
+ gcry_error_t err;
+
+ nread = 0;
+
+ while (1)
+ {
+ buffer_n = sizeof (buffer);
+ err = _gcry_ac_io_read (ac_io, nread, buffer, &buffer_n);
+ if (err)
+ break;
+ if (buffer_n)
+ {
+ err = (*cb) (opaque, buffer, buffer_n);
+ if (err)
+ break;
+ nread += buffer_n;
+ }
+ else
+ break;
+ }
+
+ return err;
+}
+
+
+
+/*
+ * Functions for converting data between the native ac and the
+ * S-expression structure used by the pk interface.
+ */
+
+/* Extract the S-Expression DATA_SEXP into DATA under the control of
+ TYPE and NAME. This function assumes that S-Expressions are of the
+ following structure:
+
+ (IDENTIFIER [...]
+ (ALGORITHM <list of named MPI values>)) */
+static gcry_error_t
+ac_data_extract (const char *identifier, const char *algorithm,
+ gcry_sexp_t sexp, gcry_ac_data_t *data)
+{
+ gcry_error_t err;
+ gcry_sexp_t value_sexp;
+ gcry_sexp_t data_sexp;
+ size_t data_sexp_n;
+ gcry_mpi_t value_mpi;
+ char *value_name;
+ const char *data_raw;
+ size_t data_raw_n;
+ gcry_ac_data_t data_new;
+ unsigned int i;
+
+ value_sexp = NULL;
+ data_sexp = NULL;
+ value_name = NULL;
+ value_mpi = NULL;
+ data_new = NULL;
+
+ /* Verify that the S-expression contains the correct identifier. */
+ data_raw = gcry_sexp_nth_data (sexp, 0, &data_raw_n);
+ if ((! data_raw) || strncmp (identifier, data_raw, data_raw_n))
+ {
+ err = gcry_error (GPG_ERR_INV_SEXP);
+ goto out;
+ }
+
+ /* Extract inner S-expression. */
+ data_sexp = gcry_sexp_find_token (sexp, algorithm, 0);
+ if (! data_sexp)
+ {
+ err = gcry_error (GPG_ERR_INV_SEXP);
+ goto out;
+ }
+
+ /* Count data elements. */
+ data_sexp_n = gcry_sexp_length (data_sexp);
+ data_sexp_n--;
+
+ /* Allocate new data set. */
+ err = _gcry_ac_data_new (&data_new);
+ if (err)
+ goto out;
+
+ /* Iterate through list of data elements and add them to the data
+ set. */
+ for (i = 0; i < data_sexp_n; i++)
+ {
+ /* Get the S-expression of the named MPI, that contains the name
+ and the MPI value. */
+ value_sexp = gcry_sexp_nth (data_sexp, i + 1);
+ if (! value_sexp)
+ {
+ err = gcry_error (GPG_ERR_INV_SEXP);
+ break;
+ }
+
+ /* Extract the name. */
+ data_raw = gcry_sexp_nth_data (value_sexp, 0, &data_raw_n);
+ if (! data_raw)
+ {
+ err = gcry_error (GPG_ERR_INV_SEXP);
+ break;
+ }
+
+ /* Extract the MPI value. */
+ value_mpi = gcry_sexp_nth_mpi (value_sexp, 1, GCRYMPI_FMT_USG);
+ if (! value_mpi)
+ {
+ err = gcry_error (GPG_ERR_INTERNAL); /* FIXME? */
+ break;
+ }
+
+ /* Duplicate the name. */
+ value_name = gcry_malloc (data_raw_n + 1);
+ if (! value_name)
+ {
+ err = gcry_error_from_errno (errno);
+ break;
+ }
+ strncpy (value_name, data_raw, data_raw_n);
+ value_name[data_raw_n] = 0;
+
+ err = _gcry_ac_data_set (data_new, GCRY_AC_FLAG_DEALLOC, value_name, value_mpi);
+ if (err)
+ break;
+
+ gcry_sexp_release (value_sexp);
+ value_sexp = NULL;
+ value_name = NULL;
+ value_mpi = NULL;
+ }
+ if (err)
+ goto out;
+
+ /* Copy out. */
+ *data = data_new;
+
+ out:
+
+ /* Deallocate resources. */
+ if (err)
+ {
+ _gcry_ac_data_destroy (data_new);
+ gcry_mpi_release (value_mpi);
+ gcry_free (value_name);
+ gcry_sexp_release (value_sexp);
+ }
+ gcry_sexp_release (data_sexp);
+
+ return err;
+}
+
+/* Construct an S-expression from the DATA and store it in
+ DATA_SEXP. The S-expression will be of the following structure:
+
+ (IDENTIFIER [(flags [...])]
+ (ALGORITHM <list of named MPI values>)) */
+static gcry_error_t
+ac_data_construct (const char *identifier, int include_flags,
+ unsigned int flags, const char *algorithm,
+ gcry_ac_data_t data, gcry_sexp_t *sexp)
+{
+ unsigned int data_length;
+ gcry_sexp_t sexp_new;
+ gcry_error_t err;
+ size_t sexp_format_n;
+ char *sexp_format;
+ void **arg_list;
+ unsigned int i;
+
+ arg_list = NULL;
+ sexp_new = NULL;
+ sexp_format = NULL;
+
+ /* We build a list of arguments to pass to
+ gcry_sexp_build_array(). */
+ data_length = _gcry_ac_data_length (data);
+ arg_list = gcry_malloc (sizeof (*arg_list) * (data_length * 2));
+ if (! arg_list)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Fill list with MPIs. */
+ for (i = 0; i < data_length; i++)
+ {
+ char **nameaddr = &data->data[i].name;
+
+ arg_list[(i * 2) + 0] = nameaddr;
+ arg_list[(i * 2) + 1] = &data->data[i].mpi;
+ }
+
+ /* Calculate size of format string. */
+ sexp_format_n = (3
+ + (include_flags ? 7 : 0)
+ + (algorithm ? (2 + strlen (algorithm)) : 0)
+ + strlen (identifier));
+
+ for (i = 0; i < data_length; i++)
+ /* Per-element sizes. */
+ sexp_format_n += 6;
+
+ if (include_flags)
+ /* Add flags. */
+ for (i = 0; i < DIM (ac_flags); i++)
+ if (flags & ac_flags[i].number)
+ sexp_format_n += strlen (ac_flags[i].string) + 1;
+
+ /* Done. */
+ sexp_format = gcry_malloc (sexp_format_n);
+ if (! sexp_format)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Construct the format string. */
+
+ *sexp_format = 0;
+ strcat (sexp_format, "(");
+ strcat (sexp_format, identifier);
+ if (include_flags)
+ {
+ strcat (sexp_format, "(flags");
+ for (i = 0; i < DIM (ac_flags); i++)
+ if (flags & ac_flags[i].number)
+ {
+ strcat (sexp_format, " ");
+ strcat (sexp_format, ac_flags[i].string);
+ }
+ strcat (sexp_format, ")");
+ }
+ if (algorithm)
+ {
+ strcat (sexp_format, "(");
+ strcat (sexp_format, algorithm);
+ }
+ for (i = 0; i < data_length; i++)
+ strcat (sexp_format, "(%s%m)");
+ if (algorithm)
+ strcat (sexp_format, ")");
+ strcat (sexp_format, ")");
+
+ /* Create final S-expression. */
+ err = gcry_sexp_build_array (&sexp_new, NULL, sexp_format, arg_list);
+ if (err)
+ goto out;
+
+ *sexp = sexp_new;
+
+ out:
+
+ /* Deallocate resources. */
+ gcry_free (sexp_format);
+ gcry_free (arg_list);
+ if (err)
+ gcry_sexp_release (sexp_new);
+
+ return err;
+}
+
+
+
+/*
+ * Handle management.
+ */
+
+/* Creates a new handle for the algorithm ALGORITHM and stores it in
+ HANDLE. FLAGS is not used yet. */
+gcry_error_t
+_gcry_ac_open (gcry_ac_handle_t *handle,
+ gcry_ac_id_t algorithm, unsigned int flags)
+{
+ gcry_ac_handle_t handle_new;
+ const char *algorithm_name;
+ gcry_module_t module;
+ gcry_error_t err;
+
+ *handle = NULL;
+ module = NULL;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ /* Get name. */
+ algorithm_name = _gcry_pk_aliased_algo_name (algorithm);
+ if (! algorithm_name)
+ {
+ err = gcry_error (GPG_ERR_PUBKEY_ALGO);
+ goto out;
+ }
+
+ /* Acquire reference to the pubkey module. */
+ err = _gcry_pk_module_lookup (algorithm, &module);
+ if (err)
+ goto out;
+
+ /* Allocate. */
+ handle_new = gcry_malloc (sizeof (*handle_new));
+ if (! handle_new)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Done. */
+ handle_new->algorithm = algorithm;
+ handle_new->algorithm_name = algorithm_name;
+ handle_new->flags = flags;
+ handle_new->module = module;
+ *handle = handle_new;
+
+ out:
+
+ /* Deallocate resources. */
+ if (err)
+ _gcry_pk_module_release (module);
+
+ return err;
+}
+
+
+/* Destroys the handle HANDLE. */
+void
+_gcry_ac_close (gcry_ac_handle_t handle)
+{
+ /* Release reference to pubkey module. */
+ if (handle)
+ {
+ _gcry_pk_module_release (handle->module);
+ gcry_free (handle);
+ }
+}
+
+
+
+/*
+ * Key management.
+ */
+
+/* Initialize a key from a given data set. */
+/* FIXME/Damn: the argument HANDLE is not only unnecessary, it is
+ completely WRONG here. */
+gcry_error_t
+_gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle,
+ gcry_ac_key_type_t type, gcry_ac_data_t data)
+{
+ gcry_ac_data_t data_new;
+ gcry_ac_key_t key_new;
+ gcry_error_t err;
+
+ (void)handle;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ /* Allocate. */
+ key_new = gcry_malloc (sizeof (*key_new));
+ if (! key_new)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Copy data set. */
+ err = _gcry_ac_data_copy (&data_new, data);
+ if (err)
+ goto out;
+
+ /* Done. */
+ key_new->data = data_new;
+ key_new->type = type;
+ *key = key_new;
+
+ out:
+
+ if (err)
+ /* Deallocate resources. */
+ gcry_free (key_new);
+
+ return err;
+}
+
+
+/* Generates a new key pair via the handle HANDLE of NBITS bits and
+ stores it in KEY_PAIR. In case non-standard settings are wanted, a
+ pointer to a structure of type gcry_ac_key_spec_<algorithm>_t,
+ matching the selected algorithm, can be given as KEY_SPEC.
+ MISC_DATA is not used yet. */
+gcry_error_t
+_gcry_ac_key_pair_generate (gcry_ac_handle_t handle, unsigned int nbits,
+ void *key_spec,
+ gcry_ac_key_pair_t *key_pair,
+ gcry_mpi_t **misc_data)
+{
+ gcry_sexp_t genkey_sexp_request;
+ gcry_sexp_t genkey_sexp_reply;
+ gcry_ac_data_t key_data_secret;
+ gcry_ac_data_t key_data_public;
+ gcry_ac_key_pair_t key_pair_new;
+ gcry_ac_key_t key_secret;
+ gcry_ac_key_t key_public;
+ gcry_sexp_t key_sexp;
+ gcry_error_t err;
+ char *genkey_format;
+ size_t genkey_format_n;
+ void **arg_list;
+ size_t arg_list_n;
+ unsigned int i;
+ unsigned int j;
+
+ (void)misc_data;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ key_data_secret = NULL;
+ key_data_public = NULL;
+ key_secret = NULL;
+ key_public = NULL;
+ genkey_format = NULL;
+ arg_list = NULL;
+ genkey_sexp_request = NULL;
+ genkey_sexp_reply = NULL;
+ key_sexp = NULL;
+
+ /* Allocate key pair. */
+ key_pair_new = gcry_malloc (sizeof (struct gcry_ac_key_pair));
+ if (! key_pair_new)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Allocate keys. */
+ key_secret = gcry_malloc (sizeof (*key_secret));
+ if (! key_secret)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+ key_public = gcry_malloc (sizeof (*key_public));
+ if (! key_public)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Calculate size of the format string, that is used for creating
+ the request S-expression. */
+ genkey_format_n = 22;
+
+ /* Respect any relevant algorithm specific commands. */
+ if (key_spec)
+ for (i = 0; i < DIM (ac_key_generate_specs); i++)
+ if (handle->algorithm == ac_key_generate_specs[i].algorithm)
+ genkey_format_n += 6;
+
+ /* Create format string. */
+ genkey_format = gcry_malloc (genkey_format_n);
+ if (! genkey_format)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Fill format string. */
+ *genkey_format = 0;
+ strcat (genkey_format, "(genkey(%s(nbits%d)");
+ if (key_spec)
+ for (i = 0; i < DIM (ac_key_generate_specs); i++)
+ if (handle->algorithm == ac_key_generate_specs[i].algorithm)
+ strcat (genkey_format, "(%s%m)");
+ strcat (genkey_format, "))");
+
+ /* Build list of argument pointers, the algorithm name and the nbits
+ are always needed. */
+ arg_list_n = 2;
+
+ /* Now the algorithm specific arguments. */
+ if (key_spec)
+ for (i = 0; i < DIM (ac_key_generate_specs); i++)
+ if (handle->algorithm == ac_key_generate_specs[i].algorithm)
+ arg_list_n += 2;
+
+ /* Allocate list. */
+ arg_list = gcry_malloc (sizeof (*arg_list) * arg_list_n);
+ if (! arg_list)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ arg_list[0] = (void *) &handle->algorithm_name;
+ arg_list[1] = (void *) &nbits;
+ if (key_spec)
+ for (j = 2, i = 0; i < DIM (ac_key_generate_specs); i++)
+ if (handle->algorithm == ac_key_generate_specs[i].algorithm)
+ {
+ /* Add name of this specification flag and the
+ according member of the spec strucuture. */
+ arg_list[j++] = (void *)(&ac_key_generate_specs[i].name);
+ arg_list[j++] = (void *)
+ (((char *) key_spec)
+ + ac_key_generate_specs[i].offset);
+ /* FIXME: above seems to suck. */
+ }
+
+ /* Construct final request S-expression. */
+ err = gcry_sexp_build_array (&genkey_sexp_request,
+ NULL, genkey_format, arg_list);
+ if (err)
+ goto out;
+
+ /* Perform genkey operation. */
+ err = gcry_pk_genkey (&genkey_sexp_reply, genkey_sexp_request);
+ if (err)
+ goto out;
+
+ key_sexp = gcry_sexp_find_token (genkey_sexp_reply, "private-key", 0);
+ if (! key_sexp)
+ {
+ err = gcry_error (GPG_ERR_INTERNAL);
+ goto out;
+ }
+ err = ac_data_extract ("private-key", handle->algorithm_name,
+ key_sexp, &key_data_secret);
+ if (err)
+ goto out;
+
+ gcry_sexp_release (key_sexp);
+ key_sexp = gcry_sexp_find_token (genkey_sexp_reply, "public-key", 0);
+ if (! key_sexp)
+ {
+ err = gcry_error (GPG_ERR_INTERNAL);
+ goto out;
+ }
+ err = ac_data_extract ("public-key", handle->algorithm_name,
+ key_sexp, &key_data_public);
+ if (err)
+ goto out;
+
+ /* Done. */
+
+ key_secret->type = GCRY_AC_KEY_SECRET;
+ key_secret->data = key_data_secret;
+ key_public->type = GCRY_AC_KEY_PUBLIC;
+ key_public->data = key_data_public;
+ key_pair_new->secret = key_secret;
+ key_pair_new->public = key_public;
+ *key_pair = key_pair_new;
+
+ out:
+
+ /* Deallocate resources. */
+
+ gcry_free (genkey_format);
+ gcry_free (arg_list);
+ gcry_sexp_release (genkey_sexp_request);
+ gcry_sexp_release (genkey_sexp_reply);
+ gcry_sexp_release (key_sexp);
+ if (err)
+ {
+ _gcry_ac_data_destroy (key_data_secret);
+ _gcry_ac_data_destroy (key_data_public);
+ gcry_free (key_secret);
+ gcry_free (key_public);
+ gcry_free (key_pair_new);
+ }
+
+ return err;
+}
+
+/* Returns the key of type WHICH out of the key pair KEY_PAIR. */
+gcry_ac_key_t
+_gcry_ac_key_pair_extract (gcry_ac_key_pair_t key_pair,
+ gcry_ac_key_type_t which)
+{
+ gcry_ac_key_t key;
+
+ if (fips_mode ())
+ return NULL;
+
+ switch (which)
+ {
+ case GCRY_AC_KEY_SECRET:
+ key = key_pair->secret;
+ break;
+
+ case GCRY_AC_KEY_PUBLIC:
+ key = key_pair->public;
+ break;
+
+ default:
+ key = NULL;
+ break;
+ }
+
+ return key;
+}
+
+/* Destroys the key KEY. */
+void
+_gcry_ac_key_destroy (gcry_ac_key_t key)
+{
+ unsigned int i;
+
+ if (key)
+ {
+ if (key->data)
+ {
+ for (i = 0; i < key->data->data_n; i++)
+ {
+ if (key->data->data[i].mpi)
+ gcry_mpi_release (key->data->data[i].mpi);
+ if (key->data->data[i].name)
+ gcry_free (key->data->data[i].name);
+ }
+ gcry_free (key->data->data);
+ gcry_free (key->data);
+ }
+ gcry_free (key);
+ }
+}
+
+/* Destroys the key pair KEY_PAIR. */
+void
+_gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair)
+{
+ if (key_pair)
+ {
+ gcry_ac_key_destroy (key_pair->secret);
+ gcry_ac_key_destroy (key_pair->public);
+ gcry_free (key_pair);
+ }
+}
+
+/* Returns the data set contained in the key KEY. */
+gcry_ac_data_t
+_gcry_ac_key_data_get (gcry_ac_key_t key)
+{
+ if (fips_mode ())
+ return NULL;
+ return key->data;
+}
+
+/* Verifies that the key KEY is sane via HANDLE. */
+gcry_error_t
+_gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key)
+{
+ gcry_sexp_t key_sexp;
+ gcry_error_t err;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ key_sexp = NULL;
+ err = ac_data_construct (ac_key_identifiers[key->type], 0, 0,
+ handle->algorithm_name, key->data, &key_sexp);
+ if (err)
+ goto out;
+
+ err = gcry_pk_testkey (key_sexp);
+
+ out:
+
+ gcry_sexp_release (key_sexp);
+
+ return gcry_error (err);
+}
+
+/* Stores the number of bits of the key KEY in NBITS via HANDLE. */
+gcry_error_t
+_gcry_ac_key_get_nbits (gcry_ac_handle_t handle,
+ gcry_ac_key_t key, unsigned int *nbits)
+{
+ gcry_sexp_t key_sexp;
+ gcry_error_t err;
+ unsigned int n;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ key_sexp = NULL;
+
+ err = ac_data_construct (ac_key_identifiers[key->type],
+ 0, 0, handle->algorithm_name, key->data, &key_sexp);
+ if (err)
+ goto out;
+
+ n = gcry_pk_get_nbits (key_sexp);
+ if (! n)
+ {
+ err = gcry_error (GPG_ERR_PUBKEY_ALGO);
+ goto out;
+ }
+
+ *nbits = n;
+
+ out:
+
+ gcry_sexp_release (key_sexp);
+
+ return err;
+}
+
+/* Writes the 20 byte long key grip of the key KEY to KEY_GRIP via
+ HANDLE. */
+gcry_error_t
+_gcry_ac_key_get_grip (gcry_ac_handle_t handle,
+ gcry_ac_key_t key, unsigned char *key_grip)
+{
+ gcry_sexp_t key_sexp;
+ gcry_error_t err;
+ unsigned char *ret;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ key_sexp = NULL;
+ err = ac_data_construct (ac_key_identifiers[key->type], 0, 0,
+ handle->algorithm_name, key->data, &key_sexp);
+ if (err)
+ goto out;
+
+ ret = gcry_pk_get_keygrip (key_sexp, key_grip);
+ if (! ret)
+ {
+ err = gcry_error (GPG_ERR_INV_OBJ);
+ goto out;
+ }
+
+ err = 0;
+
+ out:
+
+ gcry_sexp_release (key_sexp);
+
+ return err;
+}
+
+
+
+
+/*
+ * Functions performing cryptographic operations.
+ */
+
+/* Encrypts the plain text MPI value DATA_PLAIN with the key public
+ KEY under the control of the flags FLAGS and stores the resulting
+ data set into DATA_ENCRYPTED. */
+gcry_error_t
+_gcry_ac_data_encrypt (gcry_ac_handle_t handle,
+ unsigned int flags,
+ gcry_ac_key_t key,
+ gcry_mpi_t data_plain,
+ gcry_ac_data_t *data_encrypted)
+{
+ gcry_ac_data_t data_encrypted_new;
+ gcry_ac_data_t data_value;
+ gcry_sexp_t sexp_request;
+ gcry_sexp_t sexp_reply;
+ gcry_sexp_t sexp_key;
+ gcry_error_t err;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ data_encrypted_new = NULL;
+ sexp_request = NULL;
+ sexp_reply = NULL;
+ data_value = NULL;
+ sexp_key = NULL;
+
+ if (key->type != GCRY_AC_KEY_PUBLIC)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ err = ac_data_construct (ac_key_identifiers[key->type], 0, 0,
+ handle->algorithm_name, key->data, &sexp_key);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_new (&data_value);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_set (data_value, 0, "value", data_plain);
+ if (err)
+ goto out;
+
+ err = ac_data_construct ("data", 1, flags, handle->algorithm_name,
+ data_value, &sexp_request);
+ if (err)
+ goto out;
+
+ /* FIXME: error vs. errcode? */
+
+ err = gcry_pk_encrypt (&sexp_reply, sexp_request, sexp_key);
+ if (err)
+ goto out;
+
+ /* Extract data. */
+ err = ac_data_extract ("enc-val", handle->algorithm_name,
+ sexp_reply, &data_encrypted_new);
+ if (err)
+ goto out;
+
+ *data_encrypted = data_encrypted_new;
+
+ out:
+
+ /* Deallocate resources. */
+
+ gcry_sexp_release (sexp_request);
+ gcry_sexp_release (sexp_reply);
+ gcry_sexp_release (sexp_key);
+ _gcry_ac_data_destroy (data_value);
+
+ return err;
+}
+
+/* Decrypts the encrypted data contained in the data set
+ DATA_ENCRYPTED with the secret key KEY under the control of the
+ flags FLAGS and stores the resulting plain text MPI value in
+ DATA_PLAIN. */
+gcry_error_t
+_gcry_ac_data_decrypt (gcry_ac_handle_t handle,
+ unsigned int flags,
+ gcry_ac_key_t key,
+ gcry_mpi_t *data_plain,
+ gcry_ac_data_t data_encrypted)
+{
+ gcry_mpi_t data_decrypted;
+ gcry_sexp_t sexp_request;
+ gcry_sexp_t sexp_reply;
+ gcry_sexp_t sexp_value;
+ gcry_sexp_t sexp_key;
+ gcry_error_t err;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ sexp_request = NULL;
+ sexp_reply = NULL;
+ sexp_value = NULL;
+ sexp_key = NULL;
+
+ if (key->type != GCRY_AC_KEY_SECRET)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ err = ac_data_construct (ac_key_identifiers[key->type], 0, 0,
+ handle->algorithm_name, key->data, &sexp_key);
+ if (err)
+ goto out;
+
+ /* Create S-expression from data. */
+ err = ac_data_construct ("enc-val", 1, flags, handle->algorithm_name,
+ data_encrypted, &sexp_request);
+ if (err)
+ goto out;
+
+ /* Decrypt. */
+ err = gcry_pk_decrypt (&sexp_reply, sexp_request, sexp_key);
+ if (err)
+ goto out;
+
+ /* Extract plain text. */
+ sexp_value = gcry_sexp_find_token (sexp_reply, "value", 0);
+ if (! sexp_value)
+ {
+ /* FIXME? */
+ err = gcry_error (GPG_ERR_GENERAL);
+ goto out;
+ }
+
+ data_decrypted = gcry_sexp_nth_mpi (sexp_value, 1, GCRYMPI_FMT_USG);
+ if (! data_decrypted)
+ {
+ err = gcry_error (GPG_ERR_GENERAL);
+ goto out;
+ }
+
+ *data_plain = data_decrypted;
+
+ out:
+
+ /* Deallocate resources. */
+ gcry_sexp_release (sexp_request);
+ gcry_sexp_release (sexp_reply);
+ gcry_sexp_release (sexp_value);
+ gcry_sexp_release (sexp_key);
+
+ return gcry_error (err);
+
+}
+
+/* Signs the data contained in DATA with the secret key KEY and stores
+ the resulting signature data set in DATA_SIGNATURE. */
+gcry_error_t
+_gcry_ac_data_sign (gcry_ac_handle_t handle,
+ gcry_ac_key_t key,
+ gcry_mpi_t data,
+ gcry_ac_data_t *data_signature)
+{
+ gcry_ac_data_t data_signed;
+ gcry_ac_data_t data_value;
+ gcry_sexp_t sexp_request;
+ gcry_sexp_t sexp_reply;
+ gcry_sexp_t sexp_key;
+ gcry_error_t err;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ data_signed = NULL;
+ data_value = NULL;
+ sexp_request = NULL;
+ sexp_reply = NULL;
+ sexp_key = NULL;
+
+ if (key->type != GCRY_AC_KEY_SECRET)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ err = ac_data_construct (ac_key_identifiers[key->type], 0, 0,
+ handle->algorithm_name, key->data, &sexp_key);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_new (&data_value);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_set (data_value, 0, "value", data);
+ if (err)
+ goto out;
+
+ /* Create S-expression holding the data. */
+ err = ac_data_construct ("data", 1, 0, NULL, data_value, &sexp_request);
+ if (err)
+ goto out;
+
+ /* Sign. */
+ err = gcry_pk_sign (&sexp_reply, sexp_request, sexp_key);
+ if (err)
+ goto out;
+
+ /* Extract data. */
+ err = ac_data_extract ("sig-val", handle->algorithm_name,
+ sexp_reply, &data_signed);
+ if (err)
+ goto out;
+
+ /* Done. */
+ *data_signature = data_signed;
+
+ out:
+
+ gcry_sexp_release (sexp_request);
+ gcry_sexp_release (sexp_reply);
+ gcry_sexp_release (sexp_key);
+ _gcry_ac_data_destroy (data_value);
+
+ return gcry_error (err);
+}
+
+
+/* Verifies that the signature contained in the data set
+ DATA_SIGNATURE is indeed the result of signing the data contained
+ in DATA with the secret key belonging to the public key KEY. */
+gcry_error_t
+_gcry_ac_data_verify (gcry_ac_handle_t handle,
+ gcry_ac_key_t key,
+ gcry_mpi_t data,
+ gcry_ac_data_t data_signature)
+{
+ gcry_sexp_t sexp_signature;
+ gcry_ac_data_t data_value;
+ gcry_sexp_t sexp_data;
+ gcry_sexp_t sexp_key;
+ gcry_error_t err;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ sexp_signature = NULL;
+ data_value = NULL;
+ sexp_data = NULL;
+ sexp_key = NULL;
+
+ err = ac_data_construct ("public-key", 0, 0,
+ handle->algorithm_name, key->data, &sexp_key);
+ if (err)
+ goto out;
+
+ if (key->type != GCRY_AC_KEY_PUBLIC)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ /* Construct S-expression holding the signature data. */
+ err = ac_data_construct ("sig-val", 1, 0, handle->algorithm_name,
+ data_signature, &sexp_signature);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_new (&data_value);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_set (data_value, 0, "value", data);
+ if (err)
+ goto out;
+
+ /* Construct S-expression holding the data. */
+ err = ac_data_construct ("data", 1, 0, NULL, data_value, &sexp_data);
+ if (err)
+ goto out;
+
+ /* Verify signature. */
+ err = gcry_pk_verify (sexp_signature, sexp_data, sexp_key);
+
+ out:
+
+ gcry_sexp_release (sexp_signature);
+ gcry_sexp_release (sexp_data);
+ gcry_sexp_release (sexp_key);
+ _gcry_ac_data_destroy (data_value);
+
+ return gcry_error (err);
+}
+
+
+
+
+/*
+ * Implementation of encoding methods (em).
+ */
+
+/* Type for functions that encode or decode (hence the name) a
+ message. */
+typedef gcry_error_t (*gcry_ac_em_dencode_t) (unsigned int flags,
+ void *options,
+ gcry_ac_io_t *ac_io_read,
+ gcry_ac_io_t *ac_io_write);
+
+/* Fill the buffer BUFFER which is BUFFER_N bytes long with non-zero
+ random bytes of random level LEVEL. */
+static void
+em_randomize_nonzero (unsigned char *buffer, size_t buffer_n,
+ gcry_random_level_t level)
+{
+ unsigned char *buffer_rand;
+ unsigned int buffer_rand_n;
+ unsigned int zeros;
+ unsigned int i;
+ unsigned int j;
+
+ for (i = 0; i < buffer_n; i++)
+ buffer[i] = 0;
+
+ do
+ {
+ /* Count zeros. */
+ for (i = zeros = 0; i < buffer_n; i++)
+ if (! buffer[i])
+ zeros++;
+
+ if (zeros)
+ {
+ /* Get random bytes. */
+ buffer_rand_n = zeros + (zeros / 128);
+ buffer_rand = gcry_random_bytes_secure (buffer_rand_n, level);
+
+ /* Substitute zeros with non-zero random bytes. */
+ for (i = j = 0; zeros && (i < buffer_n) && (j < buffer_rand_n); i++)
+ if (! buffer[i])
+ {
+ while ((j < buffer_rand_n) && (! buffer_rand[j]))
+ j++;
+ if (j < buffer_rand_n)
+ {
+ buffer[i] = buffer_rand[j++];
+ zeros--;
+ }
+ else
+ break;
+ }
+ gcry_free (buffer_rand);
+ }
+ }
+ while (zeros);
+}
+
+/* Encode a message according to the Encoding Method for Encryption
+ `PKCS-V1_5' (EME-PKCS-V1_5). */
+static gcry_error_t
+eme_pkcs_v1_5_encode (unsigned int flags, void *opts,
+ gcry_ac_io_t *ac_io_read,
+ gcry_ac_io_t *ac_io_write)
+{
+ gcry_ac_eme_pkcs_v1_5_t *options;
+ gcry_error_t err;
+ unsigned char *buffer;
+ unsigned char *ps;
+ unsigned char *m;
+ size_t m_n;
+ unsigned int ps_n;
+ unsigned int k;
+
+ (void)flags;
+
+ options = opts;
+ buffer = NULL;
+ m = NULL;
+
+ err = _gcry_ac_io_read_all (ac_io_read, &m, &m_n);
+ if (err)
+ goto out;
+
+ /* Figure out key length in bytes. */
+ k = options->key_size / 8;
+
+ if (m_n > k - 11)
+ {
+ /* Key is too short for message. */
+ err = gcry_error (GPG_ERR_TOO_SHORT);
+ goto out;
+ }
+
+ /* According to this encoding method, the first byte of the encoded
+ message is zero. This byte will be lost anyway, when the encoded
+ message is to be converted into an MPI, that's why we skip
+ it. */
+
+ /* Allocate buffer. */
+ buffer = gcry_malloc (k - 1);
+ if (! buffer)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ /* Generate an octet string PS of length k - mLen - 3 consisting
+ of pseudorandomly generated nonzero octets. The length of PS
+ will be at least eight octets. */
+ ps_n = k - m_n - 3;
+ ps = buffer + 1;
+ em_randomize_nonzero (ps, ps_n, GCRY_STRONG_RANDOM);
+
+ /* Concatenate PS, the message M, and other padding to form an
+ encoded message EM of length k octets as:
+
+ EM = 0x00 || 0x02 || PS || 0x00 || M. */
+
+ buffer[0] = 0x02;
+ buffer[ps_n + 1] = 0x00;
+ memcpy (buffer + ps_n + 2, m, m_n);
+
+ err = _gcry_ac_io_write (ac_io_write, buffer, k - 1);
+
+ out:
+
+ gcry_free (buffer);
+ gcry_free (m);
+
+ return err;
+}
+
+/* Decode a message according to the Encoding Method for Encryption
+ `PKCS-V1_5' (EME-PKCS-V1_5). */
+static gcry_error_t
+eme_pkcs_v1_5_decode (unsigned int flags, void *opts,
+ gcry_ac_io_t *ac_io_read,
+ gcry_ac_io_t *ac_io_write)
+{
+ gcry_ac_eme_pkcs_v1_5_t *options;
+ unsigned char *buffer;
+ unsigned char *em;
+ size_t em_n;
+ gcry_error_t err;
+ unsigned int i;
+ unsigned int k;
+
+ (void)flags;
+
+ options = opts;
+ buffer = NULL;
+ em = NULL;
+
+ err = _gcry_ac_io_read_all (ac_io_read, &em, &em_n);
+ if (err)
+ goto out;
+
+ /* Figure out key size. */
+ k = options->key_size / 8;
+
+ /* Search for zero byte. */
+ for (i = 0; (i < em_n) && em[i]; i++);
+
+ /* According to this encoding method, the first byte of the encoded
+ message should be zero. This byte is lost. */
+
+ if (! ((em_n >= 10)
+ && (em_n == (k - 1))
+ && (em[0] == 0x02)
+ && (i < em_n)
+ && ((i - 1) >= 8)))
+ {
+ err = gcry_error (GPG_ERR_DECRYPT_FAILED);
+ goto out;
+ }
+
+ i++;
+ buffer = gcry_malloc (em_n - i);
+ if (! buffer)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ memcpy (buffer, em + i, em_n - i);
+ err = _gcry_ac_io_write (ac_io_write, buffer, em_n - i);
+
+ out:
+
+ gcry_free (buffer);
+ gcry_free (em);
+
+ return err;
+}
+
+static gcry_error_t
+emsa_pkcs_v1_5_encode_data_cb (void *opaque,
+ unsigned char *buffer, size_t buffer_n)
+{
+ gcry_md_hd_t md_handle;
+
+ md_handle = opaque;
+ gcry_md_write (md_handle, buffer, buffer_n);
+
+ return 0;
+}
+
+
+/* Encode a message according to the Encoding Method for Signatures
+ with Appendix `PKCS-V1_5' (EMSA-PKCS-V1_5). */
+static gcry_error_t
+emsa_pkcs_v1_5_encode (unsigned int flags, void *opts,
+ gcry_ac_io_t *ac_io_read,
+ gcry_ac_io_t *ac_io_write)
+{
+ gcry_ac_emsa_pkcs_v1_5_t *options;
+ gcry_error_t err;
+ gcry_md_hd_t md;
+ unsigned char *t;
+ size_t t_n;
+ unsigned char *h;
+ size_t h_n;
+ unsigned char *ps;
+ size_t ps_n;
+ unsigned char *buffer;
+ size_t buffer_n;
+ unsigned char asn[100]; /* FIXME, always enough? */
+ size_t asn_n;
+ unsigned int i;
+
+ (void)flags;
+
+ options = opts;
+ buffer = NULL;
+ md = NULL;
+ ps = NULL;
+ t = NULL;
+
+ /* Create hashing handle and get the necessary information. */
+ err = gcry_md_open (&md, options->md, 0);
+ if (err)
+ goto out;
+
+ asn_n = DIM (asn);
+ err = gcry_md_algo_info (options->md, GCRYCTL_GET_ASNOID, asn, &asn_n);
+ if (err)
+ goto out;
+
+ h_n = gcry_md_get_algo_dlen (options->md);
+
+ err = _gcry_ac_io_process (ac_io_read, emsa_pkcs_v1_5_encode_data_cb, md);
+ if (err)
+ goto out;
+
+ h = gcry_md_read (md, 0);
+
+ /* Encode the algorithm ID for the hash function and the hash value
+ into an ASN.1 value of type DigestInfo with the Distinguished
+ Encoding Rules (DER), where the type DigestInfo has the syntax:
+
+ DigestInfo ::== SEQUENCE {
+ digestAlgorithm AlgorithmIdentifier,
+ digest OCTET STRING
+ }
+
+ The first field identifies the hash function and the second
+ contains the hash value. Let T be the DER encoding of the
+ DigestInfo value and let tLen be the length in octets of T. */
+
+ t_n = asn_n + h_n;
+ t = gcry_malloc (t_n);
+ if (! t)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ for (i = 0; i < asn_n; i++)
+ t[i] = asn[i];
+ for (i = 0; i < h_n; i++)
+ t[asn_n + i] = h[i];
+
+ /* If emLen < tLen + 11, output "intended encoded message length
+ too short" and stop. */
+ if (options->em_n < t_n + 11)
+ {
+ err = gcry_error (GPG_ERR_TOO_SHORT);
+ goto out;
+ }
+
+ /* Generate an octet string PS consisting of emLen - tLen - 3 octets
+ with hexadecimal value 0xFF. The length of PS will be at least 8
+ octets. */
+ ps_n = options->em_n - t_n - 3;
+ ps = gcry_malloc (ps_n);
+ if (! ps)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+ for (i = 0; i < ps_n; i++)
+ ps[i] = 0xFF;
+
+ /* Concatenate PS, the DER encoding T, and other padding to form the
+ encoded message EM as:
+
+ EM = 0x00 || 0x01 || PS || 0x00 || T. */
+
+ buffer_n = ps_n + t_n + 3;
+ buffer = gcry_malloc (buffer_n);
+ if (! buffer)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ buffer[0] = 0x00;
+ buffer[1] = 0x01;
+ for (i = 0; i < ps_n; i++)
+ buffer[2 + i] = ps[i];
+ buffer[2 + ps_n] = 0x00;
+ for (i = 0; i < t_n; i++)
+ buffer[3 + ps_n + i] = t[i];
+
+ err = _gcry_ac_io_write (ac_io_write, buffer, buffer_n);
+
+ out:
+
+ gcry_md_close (md);
+
+ gcry_free (buffer);
+ gcry_free (ps);
+ gcry_free (t);
+
+ return err;
+}
+
+/* `Actions' for data_dencode(). */
+typedef enum dencode_action
+ {
+ DATA_ENCODE,
+ DATA_DECODE,
+ }
+dencode_action_t;
+
+/* Encode or decode a message according to the the encoding method
+ METHOD; ACTION specifies wether the message that is contained in
+ BUFFER_IN and of length BUFFER_IN_N should be encoded or decoded.
+ The resulting message will be stored in a newly allocated buffer in
+ BUFFER_OUT and BUFFER_OUT_N. */
+static gcry_error_t
+ac_data_dencode (gcry_ac_em_t method, dencode_action_t action,
+ unsigned int flags, void *options,
+ gcry_ac_io_t *ac_io_read,
+ gcry_ac_io_t *ac_io_write)
+{
+ struct
+ {
+ gcry_ac_em_t method;
+ gcry_ac_em_dencode_t encode;
+ gcry_ac_em_dencode_t decode;
+ } methods[] =
+ {
+ { GCRY_AC_EME_PKCS_V1_5,
+ eme_pkcs_v1_5_encode, eme_pkcs_v1_5_decode },
+ { GCRY_AC_EMSA_PKCS_V1_5,
+ emsa_pkcs_v1_5_encode, NULL },
+ };
+ size_t methods_n;
+ gcry_error_t err;
+ unsigned int i;
+
+ methods_n = sizeof (methods) / sizeof (*methods);
+
+ for (i = 0; i < methods_n; i++)
+ if (methods[i].method == method)
+ break;
+ if (i == methods_n)
+ {
+ err = gcry_error (GPG_ERR_NOT_FOUND); /* FIXME? */
+ goto out;
+ }
+
+ err = 0;
+ switch (action)
+ {
+ case DATA_ENCODE:
+ if (methods[i].encode)
+ /* FIXME? */
+ err = (*methods[i].encode) (flags, options, ac_io_read, ac_io_write);
+ break;
+
+ case DATA_DECODE:
+ if (methods[i].decode)
+ /* FIXME? */
+ err = (*methods[i].decode) (flags, options, ac_io_read, ac_io_write);
+ break;
+
+ default:
+ err = gcry_error (GPG_ERR_INV_ARG);
+ break;
+ }
+
+ out:
+
+ return err;
+}
+
+/* Encode a message according to the encoding method METHOD. OPTIONS
+ must be a pointer to a method-specific structure
+ (gcry_ac_em*_t). */
+gcry_error_t
+_gcry_ac_data_encode (gcry_ac_em_t method,
+ unsigned int flags, void *options,
+ gcry_ac_io_t *ac_io_read,
+ gcry_ac_io_t *ac_io_write)
+{
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ return ac_data_dencode (method, DATA_ENCODE, flags, options,
+ ac_io_read, ac_io_write);
+}
+
+/* Dencode a message according to the encoding method METHOD. OPTIONS
+ must be a pointer to a method-specific structure
+ (gcry_ac_em*_t). */
+gcry_error_t
+_gcry_ac_data_decode (gcry_ac_em_t method,
+ unsigned int flags, void *options,
+ gcry_ac_io_t *ac_io_read,
+ gcry_ac_io_t *ac_io_write)
+{
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ return ac_data_dencode (method, DATA_DECODE, flags, options,
+ ac_io_read, ac_io_write);
+}
+
+/* Convert an MPI into an octet string. */
+void
+_gcry_ac_mpi_to_os (gcry_mpi_t mpi, unsigned char *os, size_t os_n)
+{
+ unsigned long digit;
+ gcry_mpi_t base;
+ unsigned int i;
+ unsigned int n;
+ gcry_mpi_t m;
+ gcry_mpi_t d;
+
+ if (fips_mode ())
+ return;
+
+ base = gcry_mpi_new (0);
+ gcry_mpi_set_ui (base, 256);
+
+ n = 0;
+ m = gcry_mpi_copy (mpi);
+ while (gcry_mpi_cmp_ui (m, 0))
+ {
+ n++;
+ gcry_mpi_div (m, NULL, m, base, 0);
+ }
+
+ gcry_mpi_set (m, mpi);
+ d = gcry_mpi_new (0);
+ for (i = 0; (i < n) && (i < os_n); i++)
+ {
+ gcry_mpi_mod (d, m, base);
+ _gcry_mpi_get_ui (d, &digit);
+ gcry_mpi_div (m, NULL, m, base, 0);
+ os[os_n - i - 1] = (digit & 0xFF);
+ }
+
+ for (; i < os_n; i++)
+ os[os_n - i - 1] = 0;
+
+ gcry_mpi_release (base);
+ gcry_mpi_release (d);
+ gcry_mpi_release (m);
+}
+
+/* Convert an MPI into an newly allocated octet string. */
+gcry_error_t
+_gcry_ac_mpi_to_os_alloc (gcry_mpi_t mpi, unsigned char **os, size_t *os_n)
+{
+ unsigned char *buffer;
+ size_t buffer_n;
+ gcry_error_t err;
+ unsigned int nbits;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ nbits = gcry_mpi_get_nbits (mpi);
+ buffer_n = (nbits + 7) / 8;
+ buffer = gcry_malloc (buffer_n);
+ if (! buffer)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ _gcry_ac_mpi_to_os (mpi, buffer, buffer_n);
+ *os = buffer;
+ *os_n = buffer_n;
+ err = 0;
+
+ out:
+
+ return err;
+}
+
+
+/* Convert an octet string into an MPI. */
+void
+_gcry_ac_os_to_mpi (gcry_mpi_t mpi, unsigned char *os, size_t os_n)
+{
+ unsigned int i;
+ gcry_mpi_t xi;
+ gcry_mpi_t x;
+ gcry_mpi_t a;
+
+ if (fips_mode ())
+ return;
+
+ a = gcry_mpi_new (0);
+ gcry_mpi_set_ui (a, 1);
+ x = gcry_mpi_new (0);
+ gcry_mpi_set_ui (x, 0);
+ xi = gcry_mpi_new (0);
+
+ for (i = 0; i < os_n; i++)
+ {
+ gcry_mpi_mul_ui (xi, a, os[os_n - i - 1]);
+ gcry_mpi_add (x, x, xi);
+ gcry_mpi_mul_ui (a, a, 256);
+ }
+
+ gcry_mpi_release (xi);
+ gcry_mpi_release (a);
+
+ gcry_mpi_set (mpi, x);
+ gcry_mpi_release (x); /* FIXME: correct? */
+}
+
+
+
+/*
+ * Implementation of Encryption Schemes (ES) and Signature Schemes
+ * with Appendix (SSA).
+ */
+
+/* Schemes consist of two things: encoding methods and cryptographic
+ primitives.
+
+ Since encoding methods are accessible through a common API with
+ method-specific options passed as an anonymous struct, schemes have
+ to provide functions that construct this method-specific structure;
+ this is what the functions of type `gcry_ac_dencode_prepare_t' are
+ there for. */
+
+typedef gcry_error_t (*gcry_ac_dencode_prepare_t) (gcry_ac_handle_t handle,
+ gcry_ac_key_t key,
+ void *opts,
+ void *opts_em);
+
+/* The `dencode_prepare' function for ES-PKCS-V1_5. */
+static gcry_error_t
+ac_es_dencode_prepare_pkcs_v1_5 (gcry_ac_handle_t handle, gcry_ac_key_t key,
+ void *opts, void *opts_em)
+{
+ gcry_ac_eme_pkcs_v1_5_t *options_em;
+ unsigned int nbits;
+ gcry_error_t err;
+
+ (void)opts;
+
+ err = _gcry_ac_key_get_nbits (handle, key, &nbits);
+ if (err)
+ goto out;
+
+ options_em = opts_em;
+ options_em->key_size = nbits;
+
+ out:
+
+ return err;
+}
+
+/* The `dencode_prepare' function for SSA-PKCS-V1_5. */
+static gcry_error_t
+ac_ssa_dencode_prepare_pkcs_v1_5 (gcry_ac_handle_t handle, gcry_ac_key_t key,
+ void *opts, void *opts_em)
+{
+ gcry_ac_emsa_pkcs_v1_5_t *options_em;
+ gcry_ac_ssa_pkcs_v1_5_t *options;
+ gcry_error_t err;
+ unsigned int k;
+
+ options_em = opts_em;
+ options = opts;
+
+ err = _gcry_ac_key_get_nbits (handle, key, &k);
+ if (err)
+ goto out;
+
+ k = (k + 7) / 8;
+ options_em->md = options->md;
+ options_em->em_n = k;
+
+ out:
+
+ return err;
+}
+
+/* Type holding the information about each supported
+ Encryption/Signature Scheme. */
+typedef struct ac_scheme
+{
+ gcry_ac_scheme_t scheme;
+ gcry_ac_em_t scheme_encoding;
+ gcry_ac_dencode_prepare_t dencode_prepare;
+ size_t options_em_n;
+} ac_scheme_t;
+
+/* List of supported Schemes. */
+static ac_scheme_t ac_schemes[] =
+ {
+ { GCRY_AC_ES_PKCS_V1_5, GCRY_AC_EME_PKCS_V1_5,
+ ac_es_dencode_prepare_pkcs_v1_5,
+ sizeof (gcry_ac_eme_pkcs_v1_5_t) },
+ { GCRY_AC_SSA_PKCS_V1_5, GCRY_AC_EMSA_PKCS_V1_5,
+ ac_ssa_dencode_prepare_pkcs_v1_5,
+ sizeof (gcry_ac_emsa_pkcs_v1_5_t) }
+ };
+
+/* Lookup a scheme by it's ID. */
+static ac_scheme_t *
+ac_scheme_get (gcry_ac_scheme_t scheme)
+{
+ ac_scheme_t *ac_scheme;
+ unsigned int i;
+
+ for (i = 0; i < DIM (ac_schemes); i++)
+ if (scheme == ac_schemes[i].scheme)
+ break;
+ if (i == DIM (ac_schemes))
+ ac_scheme = NULL;
+ else
+ ac_scheme = ac_schemes + i;
+
+ return ac_scheme;
+}
+
+/* Prepares the encoding/decoding by creating an according option
+ structure. */
+static gcry_error_t
+ac_dencode_prepare (gcry_ac_handle_t handle, gcry_ac_key_t key, void *opts,
+ ac_scheme_t scheme, void **opts_em)
+{
+ gcry_error_t err;
+ void *options_em;
+
+ options_em = gcry_malloc (scheme.options_em_n);
+ if (! options_em)
+ {
+ err = gcry_error_from_errno (errno);
+ goto out;
+ }
+
+ err = (*scheme.dencode_prepare) (handle, key, opts, options_em);
+ if (err)
+ goto out;
+
+ *opts_em = options_em;
+
+ out:
+
+ if (err)
+ free (options_em);
+
+ return err;
+}
+
+/* Convert a data set into a single MPI; currently, this is only
+ supported for data sets containing a single MPI. */
+static gcry_error_t
+ac_data_set_to_mpi (gcry_ac_data_t data, gcry_mpi_t *mpi)
+{
+ gcry_error_t err;
+ gcry_mpi_t mpi_new;
+ unsigned int elems;
+
+ elems = _gcry_ac_data_length (data);
+
+ if (elems != 1)
+ {
+ /* FIXME: I guess, we should be more flexible in this respect by
+ allowing the actual encryption/signature schemes to implement
+ this conversion mechanism. */
+ err = gcry_error (GPG_ERR_CONFLICT);
+ goto out;
+ }
+
+ err = _gcry_ac_data_get_index (data, GCRY_AC_FLAG_COPY, 0, NULL, &mpi_new);
+ if (err)
+ goto out;
+
+ *mpi = mpi_new;
+
+ out:
+
+ return err;
+}
+
+/* Encrypts the plain text message contained in M, which is of size
+ M_N, with the public key KEY_PUBLIC according to the Encryption
+ Scheme SCHEME_ID. HANDLE is used for accessing the low-level
+ cryptographic primitives. If OPTS is not NULL, it has to be an
+ anonymous structure specific to the chosen scheme (gcry_ac_es_*_t).
+ The encrypted message will be stored in C and C_N. */
+gcry_error_t
+_gcry_ac_data_encrypt_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme_id,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_message,
+ gcry_ac_io_t *io_cipher)
+{
+ gcry_error_t err;
+ gcry_ac_io_t io_em;
+ unsigned char *em;
+ size_t em_n;
+ gcry_mpi_t mpi_plain;
+ gcry_ac_data_t data_encrypted;
+ gcry_mpi_t mpi_encrypted;
+ unsigned char *buffer;
+ size_t buffer_n;
+ void *opts_em;
+ ac_scheme_t *scheme;
+
+ (void)flags;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ data_encrypted = NULL;
+ mpi_encrypted = NULL;
+ mpi_plain = NULL;
+ opts_em = NULL;
+ buffer = NULL;
+ em = NULL;
+
+ scheme = ac_scheme_get (scheme_id);
+ if (! scheme)
+ {
+ err = gcry_error (GPG_ERR_NO_ENCRYPTION_SCHEME);
+ goto out;
+ }
+
+ if (key->type != GCRY_AC_KEY_PUBLIC)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ err = ac_dencode_prepare (handle, key, opts, *scheme, &opts_em);
+ if (err)
+ goto out;
+
+ _gcry_ac_io_init (&io_em, GCRY_AC_IO_WRITABLE,
+ GCRY_AC_IO_STRING, &em, &em_n);
+
+ err = _gcry_ac_data_encode (scheme->scheme_encoding, 0, opts_em,
+ io_message, &io_em);
+ if (err)
+ goto out;
+
+ mpi_plain = gcry_mpi_snew (0);
+ gcry_ac_os_to_mpi (mpi_plain, em, em_n);
+
+ err = _gcry_ac_data_encrypt (handle, 0, key, mpi_plain, &data_encrypted);
+ if (err)
+ goto out;
+
+ err = ac_data_set_to_mpi (data_encrypted, &mpi_encrypted);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_mpi_to_os_alloc (mpi_encrypted, &buffer, &buffer_n);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_io_write (io_cipher, buffer, buffer_n);
+
+ out:
+
+ gcry_ac_data_destroy (data_encrypted);
+ gcry_mpi_release (mpi_encrypted);
+ gcry_mpi_release (mpi_plain);
+ gcry_free (opts_em);
+ gcry_free (buffer);
+ gcry_free (em);
+
+ return err;
+}
+
+/* Decryptes the cipher message contained in C, which is of size C_N,
+ with the secret key KEY_SECRET according to the Encryption Scheme
+ SCHEME_ID. Handle is used for accessing the low-level
+ cryptographic primitives. If OPTS is not NULL, it has to be an
+ anonymous structure specific to the chosen scheme (gcry_ac_es_*_t).
+ The decrypted message will be stored in M and M_N. */
+gcry_error_t
+_gcry_ac_data_decrypt_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme_id,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_cipher,
+ gcry_ac_io_t *io_message)
+{
+ gcry_ac_io_t io_em;
+ gcry_error_t err;
+ gcry_ac_data_t data_encrypted;
+ unsigned char *em;
+ size_t em_n;
+ gcry_mpi_t mpi_encrypted;
+ gcry_mpi_t mpi_decrypted;
+ void *opts_em;
+ ac_scheme_t *scheme;
+ char *elements_enc;
+ size_t elements_enc_n;
+ unsigned char *c;
+ size_t c_n;
+
+ (void)flags;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ data_encrypted = NULL;
+ mpi_encrypted = NULL;
+ mpi_decrypted = NULL;
+ elements_enc = NULL;
+ opts_em = NULL;
+ em = NULL;
+ c = NULL;
+
+ scheme = ac_scheme_get (scheme_id);
+ if (! scheme)
+ {
+ err = gcry_error (GPG_ERR_NO_ENCRYPTION_SCHEME);
+ goto out;
+ }
+
+ if (key->type != GCRY_AC_KEY_SECRET)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ err = _gcry_ac_io_read_all (io_cipher, &c, &c_n);
+ if (err)
+ goto out;
+
+ mpi_encrypted = gcry_mpi_snew (0);
+ gcry_ac_os_to_mpi (mpi_encrypted, c, c_n);
+
+ err = _gcry_pk_get_elements (handle->algorithm, &elements_enc, NULL);
+ if (err)
+ goto out;
+
+ elements_enc_n = strlen (elements_enc);
+ if (elements_enc_n != 1)
+ {
+ /* FIXME? */
+ err = gcry_error (GPG_ERR_CONFLICT);
+ goto out;
+ }
+
+ err = _gcry_ac_data_new (&data_encrypted);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_set (data_encrypted, GCRY_AC_FLAG_COPY | GCRY_AC_FLAG_DEALLOC,
+ elements_enc, mpi_encrypted);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_decrypt (handle, 0, key, &mpi_decrypted, data_encrypted);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_mpi_to_os_alloc (mpi_decrypted, &em, &em_n);
+ if (err)
+ goto out;
+
+ err = ac_dencode_prepare (handle, key, opts, *scheme, &opts_em);
+ if (err)
+ goto out;
+
+ _gcry_ac_io_init (&io_em, GCRY_AC_IO_READABLE,
+ GCRY_AC_IO_STRING, em, em_n);
+
+ err = _gcry_ac_data_decode (scheme->scheme_encoding, 0, opts_em,
+ &io_em, io_message);
+ if (err)
+ goto out;
+
+ out:
+
+ _gcry_ac_data_destroy (data_encrypted);
+ gcry_mpi_release (mpi_encrypted);
+ gcry_mpi_release (mpi_decrypted);
+ free (elements_enc);
+ gcry_free (opts_em);
+ gcry_free (em);
+ gcry_free (c);
+
+ return err;
+}
+
+
+/* Signs the message contained in M, which is of size M_N, with the
+ secret key KEY according to the Signature Scheme SCHEME_ID. Handle
+ is used for accessing the low-level cryptographic primitives. If
+ OPTS is not NULL, it has to be an anonymous structure specific to
+ the chosen scheme (gcry_ac_ssa_*_t). The signed message will be
+ stored in S and S_N. */
+gcry_error_t
+_gcry_ac_data_sign_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme_id,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_message,
+ gcry_ac_io_t *io_signature)
+{
+ gcry_ac_io_t io_em;
+ gcry_error_t err;
+ gcry_ac_data_t data_signed;
+ unsigned char *em;
+ size_t em_n;
+ gcry_mpi_t mpi;
+ void *opts_em;
+ unsigned char *buffer;
+ size_t buffer_n;
+ gcry_mpi_t mpi_signed;
+ ac_scheme_t *scheme;
+
+ (void)flags;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ data_signed = NULL;
+ mpi_signed = NULL;
+ opts_em = NULL;
+ buffer = NULL;
+ mpi = NULL;
+ em = NULL;
+
+ if (key->type != GCRY_AC_KEY_SECRET)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ scheme = ac_scheme_get (scheme_id);
+ if (! scheme)
+ {
+ /* FIXME: adjust api of scheme_get in respect to err codes. */
+ err = gcry_error (GPG_ERR_NO_SIGNATURE_SCHEME);
+ goto out;
+ }
+
+ err = ac_dencode_prepare (handle, key, opts, *scheme, &opts_em);
+ if (err)
+ goto out;
+
+ _gcry_ac_io_init (&io_em, GCRY_AC_IO_WRITABLE,
+ GCRY_AC_IO_STRING, &em, &em_n);
+
+ err = _gcry_ac_data_encode (scheme->scheme_encoding, 0, opts_em,
+ io_message, &io_em);
+ if (err)
+ goto out;
+
+ mpi = gcry_mpi_new (0);
+ _gcry_ac_os_to_mpi (mpi, em, em_n);
+
+ err = _gcry_ac_data_sign (handle, key, mpi, &data_signed);
+ if (err)
+ goto out;
+
+ err = ac_data_set_to_mpi (data_signed, &mpi_signed);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_mpi_to_os_alloc (mpi_signed, &buffer, &buffer_n);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_io_write (io_signature, buffer, buffer_n);
+
+ out:
+
+ _gcry_ac_data_destroy (data_signed);
+ gcry_mpi_release (mpi_signed);
+ gcry_mpi_release (mpi);
+ gcry_free (opts_em);
+ gcry_free (buffer);
+ gcry_free (em);
+
+ return err;
+}
+
+/* Verifies that the signature contained in S, which is of length S_N,
+ is indeed the result of signing the message contained in M, which
+ is of size M_N, with the secret key belonging to the public key
+ KEY_PUBLIC. If OPTS is not NULL, it has to be an anonymous
+ structure (gcry_ac_ssa_*_t) specific to the Signature Scheme, whose
+ ID is contained in SCHEME_ID. */
+gcry_error_t
+_gcry_ac_data_verify_scheme (gcry_ac_handle_t handle,
+ gcry_ac_scheme_t scheme_id,
+ unsigned int flags, void *opts,
+ gcry_ac_key_t key,
+ gcry_ac_io_t *io_message,
+ gcry_ac_io_t *io_signature)
+{
+ gcry_ac_io_t io_em;
+ gcry_error_t err;
+ gcry_ac_data_t data_signed;
+ unsigned char *em;
+ size_t em_n;
+ void *opts_em;
+ gcry_mpi_t mpi_signature;
+ gcry_mpi_t mpi_data;
+ ac_scheme_t *scheme;
+ char *elements_sig;
+ size_t elements_sig_n;
+ unsigned char *s;
+ size_t s_n;
+
+ (void)flags;
+
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ mpi_signature = NULL;
+ elements_sig = NULL;
+ data_signed = NULL;
+ mpi_data = NULL;
+ opts_em = NULL;
+ em = NULL;
+ s = NULL;
+
+ if (key->type != GCRY_AC_KEY_PUBLIC)
+ {
+ err = gcry_error (GPG_ERR_WRONG_KEY_USAGE);
+ goto out;
+ }
+
+ scheme = ac_scheme_get (scheme_id);
+ if (! scheme)
+ {
+ err = gcry_error (GPG_ERR_NO_SIGNATURE_SCHEME);
+ goto out;
+ }
+
+ err = ac_dencode_prepare (handle, key, opts, *scheme, &opts_em);
+ if (err)
+ goto out;
+
+ _gcry_ac_io_init (&io_em, GCRY_AC_IO_WRITABLE,
+ GCRY_AC_IO_STRING, &em, &em_n);
+
+ err = _gcry_ac_data_encode (scheme->scheme_encoding, 0, opts_em,
+ io_message, &io_em);
+ if (err)
+ goto out;
+
+ mpi_data = gcry_mpi_new (0);
+ _gcry_ac_os_to_mpi (mpi_data, em, em_n);
+
+ err = _gcry_ac_io_read_all (io_signature, &s, &s_n);
+ if (err)
+ goto out;
+
+ mpi_signature = gcry_mpi_new (0);
+ _gcry_ac_os_to_mpi (mpi_signature, s, s_n);
+
+ err = _gcry_pk_get_elements (handle->algorithm, NULL, &elements_sig);
+ if (err)
+ goto out;
+
+ elements_sig_n = strlen (elements_sig);
+ if (elements_sig_n != 1)
+ {
+ /* FIXME? */
+ err = gcry_error (GPG_ERR_CONFLICT);
+ goto out;
+ }
+
+ err = _gcry_ac_data_new (&data_signed);
+ if (err)
+ goto out;
+
+ err = _gcry_ac_data_set (data_signed, GCRY_AC_FLAG_COPY | GCRY_AC_FLAG_DEALLOC,
+ elements_sig, mpi_signature);
+ if (err)
+ goto out;
+
+ gcry_mpi_release (mpi_signature);
+ mpi_signature = NULL;
+
+ err = _gcry_ac_data_verify (handle, key, mpi_data, data_signed);
+
+ out:
+
+ _gcry_ac_data_destroy (data_signed);
+ gcry_mpi_release (mpi_signature);
+ gcry_mpi_release (mpi_data);
+ free (elements_sig);
+ gcry_free (opts_em);
+ gcry_free (em);
+ gcry_free (s);
+
+ return err;
+}
+
+
+/*
+ * General functions.
+ */
+
+gcry_err_code_t
+_gcry_ac_init (void)
+{
+ if (fips_mode ())
+ return GPG_ERR_NOT_SUPPORTED;
+
+ return 0;
+}
diff --git a/grub-core/lib/libgcrypt/cipher/arcfour.c b/grub-core/lib/libgcrypt/cipher/arcfour.c
new file mode 100644
index 0000000..6bb0555
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/arcfour.c
@@ -0,0 +1,156 @@
+/* arcfour.c - The arcfour stream cipher
+ * Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * For a description of the algorithm, see:
+ * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
+ * ISBN 0-471-11709-9. Pages 397 ff.
+ */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+
+static const char *selftest(void);
+
+typedef struct {
+ int idx_i, idx_j;
+ byte sbox[256];
+} ARCFOUR_context;
+
+static void
+do_encrypt_stream( ARCFOUR_context *ctx,
+ byte *outbuf, const byte *inbuf, unsigned int length )
+{
+ register int i = ctx->idx_i;
+ register int j = ctx->idx_j;
+ register byte *sbox = ctx->sbox;
+ register int t;
+
+ while ( length-- )
+ {
+ i++;
+ i = i & 255; /* The and-op seems to be faster than the mod-op. */
+ j += sbox[i];
+ j &= 255;
+ t = sbox[i]; sbox[i] = sbox[j]; sbox[j] = t;
+ *outbuf++ = *inbuf++ ^ sbox[(sbox[i] + sbox[j]) & 255];
+ }
+
+ ctx->idx_i = i;
+ ctx->idx_j = j;
+}
+
+static void
+encrypt_stream (void *context,
+ byte *outbuf, const byte *inbuf, unsigned int length)
+{
+ ARCFOUR_context *ctx = (ARCFOUR_context *) context;
+ do_encrypt_stream (ctx, outbuf, inbuf, length );
+ _gcry_burn_stack (64);
+}
+
+
+static gcry_err_code_t
+do_arcfour_setkey (void *context, const byte *key, unsigned int keylen)
+{
+ static int initialized;
+ static const char* selftest_failed;
+ int i, j;
+ byte karr[256];
+ ARCFOUR_context *ctx = (ARCFOUR_context *) context;
+
+ if (!initialized )
+ {
+ initialized = 1;
+ selftest_failed = selftest();
+ if( selftest_failed )
+ log_error ("ARCFOUR selftest failed (%s)\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if( keylen < 40/8 ) /* we want at least 40 bits */
+ return GPG_ERR_INV_KEYLEN;
+
+ ctx->idx_i = ctx->idx_j = 0;
+ for (i=0; i < 256; i++ )
+ ctx->sbox[i] = i;
+ for (i=0; i < 256; i++ )
+ karr[i] = key[i%keylen];
+ for (i=j=0; i < 256; i++ )
+ {
+ int t;
+ j = (j + ctx->sbox[i] + karr[i]) % 256;
+ t = ctx->sbox[i];
+ ctx->sbox[i] = ctx->sbox[j];
+ ctx->sbox[j] = t;
+ }
+ memset( karr, 0, 256 );
+
+ return GPG_ERR_NO_ERROR;
+}
+
+static gcry_err_code_t
+arcfour_setkey ( void *context, const byte *key, unsigned int keylen )
+{
+ ARCFOUR_context *ctx = (ARCFOUR_context *) context;
+ gcry_err_code_t rc = do_arcfour_setkey (ctx, key, keylen );
+ _gcry_burn_stack (300);
+ return rc;
+}
+
+
+static const char*
+selftest(void)
+{
+ ARCFOUR_context ctx;
+ byte scratch[16];
+
+ /* Test vector from Cryptlib labeled there: "from the
+ State/Commerce Department". */
+ static byte key_1[] =
+ { 0x61, 0x8A, 0x63, 0xD2, 0xFB };
+ static byte plaintext_1[] =
+ { 0xDC, 0xEE, 0x4C, 0xF9, 0x2C };
+ static const byte ciphertext_1[] =
+ { 0xF1, 0x38, 0x29, 0xC9, 0xDE };
+
+ arcfour_setkey( &ctx, key_1, sizeof(key_1));
+ encrypt_stream( &ctx, scratch, plaintext_1, sizeof(plaintext_1));
+ if ( memcmp (scratch, ciphertext_1, sizeof (ciphertext_1)))
+ return "Arcfour encryption test 1 failed.";
+ arcfour_setkey( &ctx, key_1, sizeof(key_1));
+ encrypt_stream(&ctx, scratch, scratch, sizeof(plaintext_1)); /* decrypt */
+ if ( memcmp (scratch, plaintext_1, sizeof (plaintext_1)))
+ return "Arcfour decryption test 1 failed.";
+ return NULL;
+}
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_arcfour =
+ {
+ "ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
+ arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/bithelp.h b/grub-core/lib/libgcrypt/cipher/bithelp.h
new file mode 100644
index 0000000..1505324
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/bithelp.h
@@ -0,0 +1,54 @@
+/* bithelp.h - Some bit manipulation helpers
+ * Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+#ifndef G10_BITHELP_H
+#define G10_BITHELP_H
+
+
+/****************
+ * Rotate the 32 bit unsigned integer X by N bits left/right
+ */
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+rol( u32 x, int n)
+{
+ __asm__("roll %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
+#endif
+
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+ror(u32 x, int n)
+{
+ __asm__("rorl %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+#define ror(x,n) ( ((x) >> (n)) | ((x) << (32-(n))) )
+#endif
+
+
+#endif /*G10_BITHELP_H*/
diff --git a/grub-core/lib/libgcrypt/cipher/blowfish.c b/grub-core/lib/libgcrypt/cipher/blowfish.c
new file mode 100644
index 0000000..6ef68e3
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/blowfish.c
@@ -0,0 +1,605 @@
+/* blowfish.c - Blowfish encryption
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * For a description of the algorithm, see:
+ * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
+ * ISBN 0-471-11709-9. Pages 336 ff.
+ */
+
+/* Test values:
+ * key "abcdefghijklmnopqrstuvwxyz";
+ * plain "BLOWFISH"
+ * cipher 32 4E D0 FE F4 13 A2 03
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+
+#define BLOWFISH_BLOCKSIZE 8
+#define BLOWFISH_ROUNDS 16
+
+typedef struct {
+ u32 s0[256];
+ u32 s1[256];
+ u32 s2[256];
+ u32 s3[256];
+ u32 p[BLOWFISH_ROUNDS+2];
+} BLOWFISH_context;
+
+static gcry_err_code_t bf_setkey (void *c, const byte *key, unsigned keylen);
+static void encrypt_block (void *bc, byte *outbuf, const byte *inbuf);
+static void decrypt_block (void *bc, byte *outbuf, const byte *inbuf);
+
+
+/* precomputed S boxes */
+static const u32 ks0[256] = {
+ 0xD1310BA6,0x98DFB5AC,0x2FFD72DB,0xD01ADFB7,0xB8E1AFED,0x6A267E96,
+ 0xBA7C9045,0xF12C7F99,0x24A19947,0xB3916CF7,0x0801F2E2,0x858EFC16,
+ 0x636920D8,0x71574E69,0xA458FEA3,0xF4933D7E,0x0D95748F,0x728EB658,
+ 0x718BCD58,0x82154AEE,0x7B54A41D,0xC25A59B5,0x9C30D539,0x2AF26013,
+ 0xC5D1B023,0x286085F0,0xCA417918,0xB8DB38EF,0x8E79DCB0,0x603A180E,
+ 0x6C9E0E8B,0xB01E8A3E,0xD71577C1,0xBD314B27,0x78AF2FDA,0x55605C60,
+ 0xE65525F3,0xAA55AB94,0x57489862,0x63E81440,0x55CA396A,0x2AAB10B6,
+ 0xB4CC5C34,0x1141E8CE,0xA15486AF,0x7C72E993,0xB3EE1411,0x636FBC2A,
+ 0x2BA9C55D,0x741831F6,0xCE5C3E16,0x9B87931E,0xAFD6BA33,0x6C24CF5C,
+ 0x7A325381,0x28958677,0x3B8F4898,0x6B4BB9AF,0xC4BFE81B,0x66282193,
+ 0x61D809CC,0xFB21A991,0x487CAC60,0x5DEC8032,0xEF845D5D,0xE98575B1,
+ 0xDC262302,0xEB651B88,0x23893E81,0xD396ACC5,0x0F6D6FF3,0x83F44239,
+ 0x2E0B4482,0xA4842004,0x69C8F04A,0x9E1F9B5E,0x21C66842,0xF6E96C9A,
+ 0x670C9C61,0xABD388F0,0x6A51A0D2,0xD8542F68,0x960FA728,0xAB5133A3,
+ 0x6EEF0B6C,0x137A3BE4,0xBA3BF050,0x7EFB2A98,0xA1F1651D,0x39AF0176,
+ 0x66CA593E,0x82430E88,0x8CEE8619,0x456F9FB4,0x7D84A5C3,0x3B8B5EBE,
+ 0xE06F75D8,0x85C12073,0x401A449F,0x56C16AA6,0x4ED3AA62,0x363F7706,
+ 0x1BFEDF72,0x429B023D,0x37D0D724,0xD00A1248,0xDB0FEAD3,0x49F1C09B,
+ 0x075372C9,0x80991B7B,0x25D479D8,0xF6E8DEF7,0xE3FE501A,0xB6794C3B,
+ 0x976CE0BD,0x04C006BA,0xC1A94FB6,0x409F60C4,0x5E5C9EC2,0x196A2463,
+ 0x68FB6FAF,0x3E6C53B5,0x1339B2EB,0x3B52EC6F,0x6DFC511F,0x9B30952C,
+ 0xCC814544,0xAF5EBD09,0xBEE3D004,0xDE334AFD,0x660F2807,0x192E4BB3,
+ 0xC0CBA857,0x45C8740F,0xD20B5F39,0xB9D3FBDB,0x5579C0BD,0x1A60320A,
+ 0xD6A100C6,0x402C7279,0x679F25FE,0xFB1FA3CC,0x8EA5E9F8,0xDB3222F8,
+ 0x3C7516DF,0xFD616B15,0x2F501EC8,0xAD0552AB,0x323DB5FA,0xFD238760,
+ 0x53317B48,0x3E00DF82,0x9E5C57BB,0xCA6F8CA0,0x1A87562E,0xDF1769DB,
+ 0xD542A8F6,0x287EFFC3,0xAC6732C6,0x8C4F5573,0x695B27B0,0xBBCA58C8,
+ 0xE1FFA35D,0xB8F011A0,0x10FA3D98,0xFD2183B8,0x4AFCB56C,0x2DD1D35B,
+ 0x9A53E479,0xB6F84565,0xD28E49BC,0x4BFB9790,0xE1DDF2DA,0xA4CB7E33,
+ 0x62FB1341,0xCEE4C6E8,0xEF20CADA,0x36774C01,0xD07E9EFE,0x2BF11FB4,
+ 0x95DBDA4D,0xAE909198,0xEAAD8E71,0x6B93D5A0,0xD08ED1D0,0xAFC725E0,
+ 0x8E3C5B2F,0x8E7594B7,0x8FF6E2FB,0xF2122B64,0x8888B812,0x900DF01C,
+ 0x4FAD5EA0,0x688FC31C,0xD1CFF191,0xB3A8C1AD,0x2F2F2218,0xBE0E1777,
+ 0xEA752DFE,0x8B021FA1,0xE5A0CC0F,0xB56F74E8,0x18ACF3D6,0xCE89E299,
+ 0xB4A84FE0,0xFD13E0B7,0x7CC43B81,0xD2ADA8D9,0x165FA266,0x80957705,
+ 0x93CC7314,0x211A1477,0xE6AD2065,0x77B5FA86,0xC75442F5,0xFB9D35CF,
+ 0xEBCDAF0C,0x7B3E89A0,0xD6411BD3,0xAE1E7E49,0x00250E2D,0x2071B35E,
+ 0x226800BB,0x57B8E0AF,0x2464369B,0xF009B91E,0x5563911D,0x59DFA6AA,
+ 0x78C14389,0xD95A537F,0x207D5BA2,0x02E5B9C5,0x83260376,0x6295CFA9,
+ 0x11C81968,0x4E734A41,0xB3472DCA,0x7B14A94A,0x1B510052,0x9A532915,
+ 0xD60F573F,0xBC9BC6E4,0x2B60A476,0x81E67400,0x08BA6FB5,0x571BE91F,
+ 0xF296EC6B,0x2A0DD915,0xB6636521,0xE7B9F9B6,0xFF34052E,0xC5855664,
+ 0x53B02D5D,0xA99F8FA1,0x08BA4799,0x6E85076A };
+
+static const u32 ks1[256] = {
+ 0x4B7A70E9,0xB5B32944,0xDB75092E,0xC4192623,0xAD6EA6B0,0x49A7DF7D,
+ 0x9CEE60B8,0x8FEDB266,0xECAA8C71,0x699A17FF,0x5664526C,0xC2B19EE1,
+ 0x193602A5,0x75094C29,0xA0591340,0xE4183A3E,0x3F54989A,0x5B429D65,
+ 0x6B8FE4D6,0x99F73FD6,0xA1D29C07,0xEFE830F5,0x4D2D38E6,0xF0255DC1,
+ 0x4CDD2086,0x8470EB26,0x6382E9C6,0x021ECC5E,0x09686B3F,0x3EBAEFC9,
+ 0x3C971814,0x6B6A70A1,0x687F3584,0x52A0E286,0xB79C5305,0xAA500737,
+ 0x3E07841C,0x7FDEAE5C,0x8E7D44EC,0x5716F2B8,0xB03ADA37,0xF0500C0D,
+ 0xF01C1F04,0x0200B3FF,0xAE0CF51A,0x3CB574B2,0x25837A58,0xDC0921BD,
+ 0xD19113F9,0x7CA92FF6,0x94324773,0x22F54701,0x3AE5E581,0x37C2DADC,
+ 0xC8B57634,0x9AF3DDA7,0xA9446146,0x0FD0030E,0xECC8C73E,0xA4751E41,
+ 0xE238CD99,0x3BEA0E2F,0x3280BBA1,0x183EB331,0x4E548B38,0x4F6DB908,
+ 0x6F420D03,0xF60A04BF,0x2CB81290,0x24977C79,0x5679B072,0xBCAF89AF,
+ 0xDE9A771F,0xD9930810,0xB38BAE12,0xDCCF3F2E,0x5512721F,0x2E6B7124,
+ 0x501ADDE6,0x9F84CD87,0x7A584718,0x7408DA17,0xBC9F9ABC,0xE94B7D8C,
+ 0xEC7AEC3A,0xDB851DFA,0x63094366,0xC464C3D2,0xEF1C1847,0x3215D908,
+ 0xDD433B37,0x24C2BA16,0x12A14D43,0x2A65C451,0x50940002,0x133AE4DD,
+ 0x71DFF89E,0x10314E55,0x81AC77D6,0x5F11199B,0x043556F1,0xD7A3C76B,
+ 0x3C11183B,0x5924A509,0xF28FE6ED,0x97F1FBFA,0x9EBABF2C,0x1E153C6E,
+ 0x86E34570,0xEAE96FB1,0x860E5E0A,0x5A3E2AB3,0x771FE71C,0x4E3D06FA,
+ 0x2965DCB9,0x99E71D0F,0x803E89D6,0x5266C825,0x2E4CC978,0x9C10B36A,
+ 0xC6150EBA,0x94E2EA78,0xA5FC3C53,0x1E0A2DF4,0xF2F74EA7,0x361D2B3D,
+ 0x1939260F,0x19C27960,0x5223A708,0xF71312B6,0xEBADFE6E,0xEAC31F66,
+ 0xE3BC4595,0xA67BC883,0xB17F37D1,0x018CFF28,0xC332DDEF,0xBE6C5AA5,
+ 0x65582185,0x68AB9802,0xEECEA50F,0xDB2F953B,0x2AEF7DAD,0x5B6E2F84,
+ 0x1521B628,0x29076170,0xECDD4775,0x619F1510,0x13CCA830,0xEB61BD96,
+ 0x0334FE1E,0xAA0363CF,0xB5735C90,0x4C70A239,0xD59E9E0B,0xCBAADE14,
+ 0xEECC86BC,0x60622CA7,0x9CAB5CAB,0xB2F3846E,0x648B1EAF,0x19BDF0CA,
+ 0xA02369B9,0x655ABB50,0x40685A32,0x3C2AB4B3,0x319EE9D5,0xC021B8F7,
+ 0x9B540B19,0x875FA099,0x95F7997E,0x623D7DA8,0xF837889A,0x97E32D77,
+ 0x11ED935F,0x16681281,0x0E358829,0xC7E61FD6,0x96DEDFA1,0x7858BA99,
+ 0x57F584A5,0x1B227263,0x9B83C3FF,0x1AC24696,0xCDB30AEB,0x532E3054,
+ 0x8FD948E4,0x6DBC3128,0x58EBF2EF,0x34C6FFEA,0xFE28ED61,0xEE7C3C73,
+ 0x5D4A14D9,0xE864B7E3,0x42105D14,0x203E13E0,0x45EEE2B6,0xA3AAABEA,
+ 0xDB6C4F15,0xFACB4FD0,0xC742F442,0xEF6ABBB5,0x654F3B1D,0x41CD2105,
+ 0xD81E799E,0x86854DC7,0xE44B476A,0x3D816250,0xCF62A1F2,0x5B8D2646,
+ 0xFC8883A0,0xC1C7B6A3,0x7F1524C3,0x69CB7492,0x47848A0B,0x5692B285,
+ 0x095BBF00,0xAD19489D,0x1462B174,0x23820E00,0x58428D2A,0x0C55F5EA,
+ 0x1DADF43E,0x233F7061,0x3372F092,0x8D937E41,0xD65FECF1,0x6C223BDB,
+ 0x7CDE3759,0xCBEE7460,0x4085F2A7,0xCE77326E,0xA6078084,0x19F8509E,
+ 0xE8EFD855,0x61D99735,0xA969A7AA,0xC50C06C2,0x5A04ABFC,0x800BCADC,
+ 0x9E447A2E,0xC3453484,0xFDD56705,0x0E1E9EC9,0xDB73DBD3,0x105588CD,
+ 0x675FDA79,0xE3674340,0xC5C43465,0x713E38D8,0x3D28F89E,0xF16DFF20,
+ 0x153E21E7,0x8FB03D4A,0xE6E39F2B,0xDB83ADF7 };
+
+static const u32 ks2[256] = {
+ 0xE93D5A68,0x948140F7,0xF64C261C,0x94692934,0x411520F7,0x7602D4F7,
+ 0xBCF46B2E,0xD4A20068,0xD4082471,0x3320F46A,0x43B7D4B7,0x500061AF,
+ 0x1E39F62E,0x97244546,0x14214F74,0xBF8B8840,0x4D95FC1D,0x96B591AF,
+ 0x70F4DDD3,0x66A02F45,0xBFBC09EC,0x03BD9785,0x7FAC6DD0,0x31CB8504,
+ 0x96EB27B3,0x55FD3941,0xDA2547E6,0xABCA0A9A,0x28507825,0x530429F4,
+ 0x0A2C86DA,0xE9B66DFB,0x68DC1462,0xD7486900,0x680EC0A4,0x27A18DEE,
+ 0x4F3FFEA2,0xE887AD8C,0xB58CE006,0x7AF4D6B6,0xAACE1E7C,0xD3375FEC,
+ 0xCE78A399,0x406B2A42,0x20FE9E35,0xD9F385B9,0xEE39D7AB,0x3B124E8B,
+ 0x1DC9FAF7,0x4B6D1856,0x26A36631,0xEAE397B2,0x3A6EFA74,0xDD5B4332,
+ 0x6841E7F7,0xCA7820FB,0xFB0AF54E,0xD8FEB397,0x454056AC,0xBA489527,
+ 0x55533A3A,0x20838D87,0xFE6BA9B7,0xD096954B,0x55A867BC,0xA1159A58,
+ 0xCCA92963,0x99E1DB33,0xA62A4A56,0x3F3125F9,0x5EF47E1C,0x9029317C,
+ 0xFDF8E802,0x04272F70,0x80BB155C,0x05282CE3,0x95C11548,0xE4C66D22,
+ 0x48C1133F,0xC70F86DC,0x07F9C9EE,0x41041F0F,0x404779A4,0x5D886E17,
+ 0x325F51EB,0xD59BC0D1,0xF2BCC18F,0x41113564,0x257B7834,0x602A9C60,
+ 0xDFF8E8A3,0x1F636C1B,0x0E12B4C2,0x02E1329E,0xAF664FD1,0xCAD18115,
+ 0x6B2395E0,0x333E92E1,0x3B240B62,0xEEBEB922,0x85B2A20E,0xE6BA0D99,
+ 0xDE720C8C,0x2DA2F728,0xD0127845,0x95B794FD,0x647D0862,0xE7CCF5F0,
+ 0x5449A36F,0x877D48FA,0xC39DFD27,0xF33E8D1E,0x0A476341,0x992EFF74,
+ 0x3A6F6EAB,0xF4F8FD37,0xA812DC60,0xA1EBDDF8,0x991BE14C,0xDB6E6B0D,
+ 0xC67B5510,0x6D672C37,0x2765D43B,0xDCD0E804,0xF1290DC7,0xCC00FFA3,
+ 0xB5390F92,0x690FED0B,0x667B9FFB,0xCEDB7D9C,0xA091CF0B,0xD9155EA3,
+ 0xBB132F88,0x515BAD24,0x7B9479BF,0x763BD6EB,0x37392EB3,0xCC115979,
+ 0x8026E297,0xF42E312D,0x6842ADA7,0xC66A2B3B,0x12754CCC,0x782EF11C,
+ 0x6A124237,0xB79251E7,0x06A1BBE6,0x4BFB6350,0x1A6B1018,0x11CAEDFA,
+ 0x3D25BDD8,0xE2E1C3C9,0x44421659,0x0A121386,0xD90CEC6E,0xD5ABEA2A,
+ 0x64AF674E,0xDA86A85F,0xBEBFE988,0x64E4C3FE,0x9DBC8057,0xF0F7C086,
+ 0x60787BF8,0x6003604D,0xD1FD8346,0xF6381FB0,0x7745AE04,0xD736FCCC,
+ 0x83426B33,0xF01EAB71,0xB0804187,0x3C005E5F,0x77A057BE,0xBDE8AE24,
+ 0x55464299,0xBF582E61,0x4E58F48F,0xF2DDFDA2,0xF474EF38,0x8789BDC2,
+ 0x5366F9C3,0xC8B38E74,0xB475F255,0x46FCD9B9,0x7AEB2661,0x8B1DDF84,
+ 0x846A0E79,0x915F95E2,0x466E598E,0x20B45770,0x8CD55591,0xC902DE4C,
+ 0xB90BACE1,0xBB8205D0,0x11A86248,0x7574A99E,0xB77F19B6,0xE0A9DC09,
+ 0x662D09A1,0xC4324633,0xE85A1F02,0x09F0BE8C,0x4A99A025,0x1D6EFE10,
+ 0x1AB93D1D,0x0BA5A4DF,0xA186F20F,0x2868F169,0xDCB7DA83,0x573906FE,
+ 0xA1E2CE9B,0x4FCD7F52,0x50115E01,0xA70683FA,0xA002B5C4,0x0DE6D027,
+ 0x9AF88C27,0x773F8641,0xC3604C06,0x61A806B5,0xF0177A28,0xC0F586E0,
+ 0x006058AA,0x30DC7D62,0x11E69ED7,0x2338EA63,0x53C2DD94,0xC2C21634,
+ 0xBBCBEE56,0x90BCB6DE,0xEBFC7DA1,0xCE591D76,0x6F05E409,0x4B7C0188,
+ 0x39720A3D,0x7C927C24,0x86E3725F,0x724D9DB9,0x1AC15BB4,0xD39EB8FC,
+ 0xED545578,0x08FCA5B5,0xD83D7CD3,0x4DAD0FC4,0x1E50EF5E,0xB161E6F8,
+ 0xA28514D9,0x6C51133C,0x6FD5C7E7,0x56E14EC4,0x362ABFCE,0xDDC6C837,
+ 0xD79A3234,0x92638212,0x670EFA8E,0x406000E0 };
+
+static const u32 ks3[256] = {
+ 0x3A39CE37,0xD3FAF5CF,0xABC27737,0x5AC52D1B,0x5CB0679E,0x4FA33742,
+ 0xD3822740,0x99BC9BBE,0xD5118E9D,0xBF0F7315,0xD62D1C7E,0xC700C47B,
+ 0xB78C1B6B,0x21A19045,0xB26EB1BE,0x6A366EB4,0x5748AB2F,0xBC946E79,
+ 0xC6A376D2,0x6549C2C8,0x530FF8EE,0x468DDE7D,0xD5730A1D,0x4CD04DC6,
+ 0x2939BBDB,0xA9BA4650,0xAC9526E8,0xBE5EE304,0xA1FAD5F0,0x6A2D519A,
+ 0x63EF8CE2,0x9A86EE22,0xC089C2B8,0x43242EF6,0xA51E03AA,0x9CF2D0A4,
+ 0x83C061BA,0x9BE96A4D,0x8FE51550,0xBA645BD6,0x2826A2F9,0xA73A3AE1,
+ 0x4BA99586,0xEF5562E9,0xC72FEFD3,0xF752F7DA,0x3F046F69,0x77FA0A59,
+ 0x80E4A915,0x87B08601,0x9B09E6AD,0x3B3EE593,0xE990FD5A,0x9E34D797,
+ 0x2CF0B7D9,0x022B8B51,0x96D5AC3A,0x017DA67D,0xD1CF3ED6,0x7C7D2D28,
+ 0x1F9F25CF,0xADF2B89B,0x5AD6B472,0x5A88F54C,0xE029AC71,0xE019A5E6,
+ 0x47B0ACFD,0xED93FA9B,0xE8D3C48D,0x283B57CC,0xF8D56629,0x79132E28,
+ 0x785F0191,0xED756055,0xF7960E44,0xE3D35E8C,0x15056DD4,0x88F46DBA,
+ 0x03A16125,0x0564F0BD,0xC3EB9E15,0x3C9057A2,0x97271AEC,0xA93A072A,
+ 0x1B3F6D9B,0x1E6321F5,0xF59C66FB,0x26DCF319,0x7533D928,0xB155FDF5,
+ 0x03563482,0x8ABA3CBB,0x28517711,0xC20AD9F8,0xABCC5167,0xCCAD925F,
+ 0x4DE81751,0x3830DC8E,0x379D5862,0x9320F991,0xEA7A90C2,0xFB3E7BCE,
+ 0x5121CE64,0x774FBE32,0xA8B6E37E,0xC3293D46,0x48DE5369,0x6413E680,
+ 0xA2AE0810,0xDD6DB224,0x69852DFD,0x09072166,0xB39A460A,0x6445C0DD,
+ 0x586CDECF,0x1C20C8AE,0x5BBEF7DD,0x1B588D40,0xCCD2017F,0x6BB4E3BB,
+ 0xDDA26A7E,0x3A59FF45,0x3E350A44,0xBCB4CDD5,0x72EACEA8,0xFA6484BB,
+ 0x8D6612AE,0xBF3C6F47,0xD29BE463,0x542F5D9E,0xAEC2771B,0xF64E6370,
+ 0x740E0D8D,0xE75B1357,0xF8721671,0xAF537D5D,0x4040CB08,0x4EB4E2CC,
+ 0x34D2466A,0x0115AF84,0xE1B00428,0x95983A1D,0x06B89FB4,0xCE6EA048,
+ 0x6F3F3B82,0x3520AB82,0x011A1D4B,0x277227F8,0x611560B1,0xE7933FDC,
+ 0xBB3A792B,0x344525BD,0xA08839E1,0x51CE794B,0x2F32C9B7,0xA01FBAC9,
+ 0xE01CC87E,0xBCC7D1F6,0xCF0111C3,0xA1E8AAC7,0x1A908749,0xD44FBD9A,
+ 0xD0DADECB,0xD50ADA38,0x0339C32A,0xC6913667,0x8DF9317C,0xE0B12B4F,
+ 0xF79E59B7,0x43F5BB3A,0xF2D519FF,0x27D9459C,0xBF97222C,0x15E6FC2A,
+ 0x0F91FC71,0x9B941525,0xFAE59361,0xCEB69CEB,0xC2A86459,0x12BAA8D1,
+ 0xB6C1075E,0xE3056A0C,0x10D25065,0xCB03A442,0xE0EC6E0E,0x1698DB3B,
+ 0x4C98A0BE,0x3278E964,0x9F1F9532,0xE0D392DF,0xD3A0342B,0x8971F21E,
+ 0x1B0A7441,0x4BA3348C,0xC5BE7120,0xC37632D8,0xDF359F8D,0x9B992F2E,
+ 0xE60B6F47,0x0FE3F11D,0xE54CDA54,0x1EDAD891,0xCE6279CF,0xCD3E7E6F,
+ 0x1618B166,0xFD2C1D05,0x848FD2C5,0xF6FB2299,0xF523F357,0xA6327623,
+ 0x93A83531,0x56CCCD02,0xACF08162,0x5A75EBB5,0x6E163697,0x88D273CC,
+ 0xDE966292,0x81B949D0,0x4C50901B,0x71C65614,0xE6C6C7BD,0x327A140A,
+ 0x45E1D006,0xC3F27B9A,0xC9AA53FD,0x62A80F00,0xBB25BFE2,0x35BDD2F6,
+ 0x71126905,0xB2040222,0xB6CBCF7C,0xCD769C2B,0x53113EC0,0x1640E3D3,
+ 0x38ABBD60,0x2547ADF0,0xBA38209C,0xF746CE76,0x77AFA1C5,0x20756060,
+ 0x85CBFE4E,0x8AE88DD8,0x7AAAF9B0,0x4CF9AA7E,0x1948C25C,0x02FB8A8C,
+ 0x01C36AE4,0xD6EBE1F9,0x90D4F869,0xA65CDEA0,0x3F09252D,0xC208E69F,
+ 0xB74E6132,0xCE77E25B,0x578FDFE3,0x3AC372E6 };
+
+static const u32 ps[BLOWFISH_ROUNDS+2] = {
+ 0x243F6A88,0x85A308D3,0x13198A2E,0x03707344,0xA4093822,0x299F31D0,
+ 0x082EFA98,0xEC4E6C89,0x452821E6,0x38D01377,0xBE5466CF,0x34E90C6C,
+ 0xC0AC29B7,0xC97C50DD,0x3F84D5B5,0xB5470917,0x9216D5D9,0x8979FB1B };
+
+
+
+#if BLOWFISH_ROUNDS != 16
+static inline u32
+function_F( BLOWFISH_context *bc, u32 x )
+{
+ u16 a, b, c, d;
+
+#ifdef WORDS_BIGENDIAN
+ a = ((byte*)&x)[0];
+ b = ((byte*)&x)[1];
+ c = ((byte*)&x)[2];
+ d = ((byte*)&x)[3];
+#else
+ a = ((byte*)&x)[3];
+ b = ((byte*)&x)[2];
+ c = ((byte*)&x)[1];
+ d = ((byte*)&x)[0];
+#endif
+
+ return ((bc->s0[a] + bc->s1[b]) ^ bc->s2[c] ) + bc->s3[d];
+}
+#endif
+
+#ifdef WORDS_BIGENDIAN
+#define F(x) ((( s0[((byte*)&x)[0]] + s1[((byte*)&x)[1]]) \
+ ^ s2[((byte*)&x)[2]]) + s3[((byte*)&x)[3]] )
+#else
+#define F(x) ((( s0[((byte*)&x)[3]] + s1[((byte*)&x)[2]]) \
+ ^ s2[((byte*)&x)[1]]) + s3[((byte*)&x)[0]] )
+#endif
+#define R(l,r,i) do { l ^= p[i]; r ^= F(l); } while(0)
+
+
+static void
+do_encrypt ( BLOWFISH_context *bc, u32 *ret_xl, u32 *ret_xr )
+{
+#if BLOWFISH_ROUNDS == 16
+ u32 xl, xr, *s0, *s1, *s2, *s3, *p;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+ s0 = bc->s0;
+ s1 = bc->s1;
+ s2 = bc->s2;
+ s3 = bc->s3;
+
+ R( xl, xr, 0);
+ R( xr, xl, 1);
+ R( xl, xr, 2);
+ R( xr, xl, 3);
+ R( xl, xr, 4);
+ R( xr, xl, 5);
+ R( xl, xr, 6);
+ R( xr, xl, 7);
+ R( xl, xr, 8);
+ R( xr, xl, 9);
+ R( xl, xr, 10);
+ R( xr, xl, 11);
+ R( xl, xr, 12);
+ R( xr, xl, 13);
+ R( xl, xr, 14);
+ R( xr, xl, 15);
+
+ xl ^= p[BLOWFISH_ROUNDS];
+ xr ^= p[BLOWFISH_ROUNDS+1];
+
+ *ret_xl = xr;
+ *ret_xr = xl;
+
+#else
+ u32 xl, xr, temp, *p;
+ int i;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+
+ for(i=0; i < BLOWFISH_ROUNDS; i++ )
+ {
+ xl ^= p[i];
+ xr ^= function_F(bc, xl);
+ temp = xl;
+ xl = xr;
+ xr = temp;
+ }
+ temp = xl;
+ xl = xr;
+ xr = temp;
+
+ xr ^= p[BLOWFISH_ROUNDS];
+ xl ^= p[BLOWFISH_ROUNDS+1];
+
+ *ret_xl = xl;
+ *ret_xr = xr;
+#endif
+}
+
+
+static void
+decrypt ( BLOWFISH_context *bc, u32 *ret_xl, u32 *ret_xr )
+{
+#if BLOWFISH_ROUNDS == 16
+ u32 xl, xr, *s0, *s1, *s2, *s3, *p;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+ s0 = bc->s0;
+ s1 = bc->s1;
+ s2 = bc->s2;
+ s3 = bc->s3;
+
+ R( xl, xr, 17);
+ R( xr, xl, 16);
+ R( xl, xr, 15);
+ R( xr, xl, 14);
+ R( xl, xr, 13);
+ R( xr, xl, 12);
+ R( xl, xr, 11);
+ R( xr, xl, 10);
+ R( xl, xr, 9);
+ R( xr, xl, 8);
+ R( xl, xr, 7);
+ R( xr, xl, 6);
+ R( xl, xr, 5);
+ R( xr, xl, 4);
+ R( xl, xr, 3);
+ R( xr, xl, 2);
+
+ xl ^= p[1];
+ xr ^= p[0];
+
+ *ret_xl = xr;
+ *ret_xr = xl;
+
+#else
+ u32 xl, xr, temp, *p;
+ int i;
+
+ xl = *ret_xl;
+ xr = *ret_xr;
+ p = bc->p;
+
+ for (i=BLOWFISH_ROUNDS+1; i > 1; i-- )
+ {
+ xl ^= p[i];
+ xr ^= function_F(bc, xl);
+ temp = xl;
+ xl = xr;
+ xr = temp;
+ }
+
+ temp = xl;
+ xl = xr;
+ xr = temp;
+
+ xr ^= p[1];
+ xl ^= p[0];
+
+ *ret_xl = xl;
+ *ret_xr = xr;
+#endif
+}
+
+#undef F
+#undef R
+
+static void
+do_encrypt_block ( BLOWFISH_context *bc, byte *outbuf, const byte *inbuf )
+{
+ u32 d1, d2;
+
+ d1 = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ d2 = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+ do_encrypt( bc, &d1, &d2 );
+ outbuf[0] = (d1 >> 24) & 0xff;
+ outbuf[1] = (d1 >> 16) & 0xff;
+ outbuf[2] = (d1 >> 8) & 0xff;
+ outbuf[3] = d1 & 0xff;
+ outbuf[4] = (d2 >> 24) & 0xff;
+ outbuf[5] = (d2 >> 16) & 0xff;
+ outbuf[6] = (d2 >> 8) & 0xff;
+ outbuf[7] = d2 & 0xff;
+}
+
+static void
+encrypt_block (void *context, byte *outbuf, const byte *inbuf)
+{
+ BLOWFISH_context *bc = (BLOWFISH_context *) context;
+ do_encrypt_block (bc, outbuf, inbuf);
+ _gcry_burn_stack (64);
+}
+
+
+static void
+do_decrypt_block (BLOWFISH_context *bc, byte *outbuf, const byte *inbuf)
+{
+ u32 d1, d2;
+
+ d1 = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ d2 = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+ decrypt( bc, &d1, &d2 );
+ outbuf[0] = (d1 >> 24) & 0xff;
+ outbuf[1] = (d1 >> 16) & 0xff;
+ outbuf[2] = (d1 >> 8) & 0xff;
+ outbuf[3] = d1 & 0xff;
+ outbuf[4] = (d2 >> 24) & 0xff;
+ outbuf[5] = (d2 >> 16) & 0xff;
+ outbuf[6] = (d2 >> 8) & 0xff;
+ outbuf[7] = d2 & 0xff;
+}
+
+static void
+decrypt_block (void *context, byte *outbuf, const byte *inbuf)
+{
+ BLOWFISH_context *bc = (BLOWFISH_context *) context;
+ do_decrypt_block (bc, outbuf, inbuf);
+ _gcry_burn_stack (64);
+}
+
+
+static const char*
+selftest(void)
+{
+ BLOWFISH_context c;
+ byte plain[] = "BLOWFISH";
+ byte buffer[8];
+ byte plain3[] = { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 };
+ byte key3[] = { 0x41, 0x79, 0x6E, 0xA0, 0x52, 0x61, 0x6E, 0xE4 };
+ byte cipher3[] = { 0xE1, 0x13, 0xF4, 0x10, 0x2C, 0xFC, 0xCE, 0x43 };
+
+ bf_setkey( (void *) &c,
+ (const unsigned char*)"abcdefghijklmnopqrstuvwxyz", 26 );
+ encrypt_block( (void *) &c, buffer, plain );
+ if( memcmp( buffer, "\x32\x4E\xD0\xFE\xF4\x13\xA2\x03", 8 ) )
+ return "Blowfish selftest failed (1).";
+ decrypt_block( (void *) &c, buffer, buffer );
+ if( memcmp( buffer, plain, 8 ) )
+ return "Blowfish selftest failed (2).";
+
+ bf_setkey( (void *) &c, key3, 8 );
+ encrypt_block( (void *) &c, buffer, plain3 );
+ if( memcmp( buffer, cipher3, 8 ) )
+ return "Blowfish selftest failed (3).";
+ decrypt_block( (void *) &c, buffer, buffer );
+ if( memcmp( buffer, plain3, 8 ) )
+ return "Blowfish selftest failed (4).";
+ return NULL;
+}
+
+
+
+static gcry_err_code_t
+do_bf_setkey (BLOWFISH_context *c, const byte *key, unsigned keylen)
+{
+ int i, j;
+ u32 data, datal, datar;
+ static int initialized;
+ static const char *selftest_failed;
+
+ if( !initialized )
+ {
+ initialized = 1;
+ selftest_failed = selftest();
+ if( selftest_failed )
+ log_error ("%s\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ for(i=0; i < BLOWFISH_ROUNDS+2; i++ )
+ c->p[i] = ps[i];
+ for(i=0; i < 256; i++ )
+ {
+ c->s0[i] = ks0[i];
+ c->s1[i] = ks1[i];
+ c->s2[i] = ks2[i];
+ c->s3[i] = ks3[i];
+ }
+
+ for(i=j=0; i < BLOWFISH_ROUNDS+2; i++ )
+ {
+#ifdef WORDS_BIGENDIAN
+ ((byte*)&data)[0] = key[j];
+ ((byte*)&data)[1] = key[(j+1)%keylen];
+ ((byte*)&data)[2] = key[(j+2)%keylen];
+ ((byte*)&data)[3] = key[(j+3)%keylen];
+#else
+ ((byte*)&data)[3] = key[j];
+ ((byte*)&data)[2] = key[(j+1)%keylen];
+ ((byte*)&data)[1] = key[(j+2)%keylen];
+ ((byte*)&data)[0] = key[(j+3)%keylen];
+#endif
+ c->p[i] ^= data;
+ j = (j+4) % keylen;
+ }
+
+ datal = datar = 0;
+ for(i=0; i < BLOWFISH_ROUNDS+2; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->p[i] = datal;
+ c->p[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s0[i] = datal;
+ c->s0[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s1[i] = datal;
+ c->s1[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s2[i] = datal;
+ c->s2[i+1] = datar;
+ }
+ for(i=0; i < 256; i += 2 )
+ {
+ do_encrypt( c, &datal, &datar );
+ c->s3[i] = datal;
+ c->s3[i+1] = datar;
+ }
+
+
+ /* Check for weak key. A weak key is a key in which a value in
+ the P-array (here c) occurs more than once per table. */
+ for(i=0; i < 255; i++ )
+ {
+ for( j=i+1; j < 256; j++)
+ {
+ if( (c->s0[i] == c->s0[j]) || (c->s1[i] == c->s1[j]) ||
+ (c->s2[i] == c->s2[j]) || (c->s3[i] == c->s3[j]) )
+ return GPG_ERR_WEAK_KEY;
+ }
+ }
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+bf_setkey (void *context, const byte *key, unsigned keylen)
+{
+ BLOWFISH_context *c = (BLOWFISH_context *) context;
+ gcry_err_code_t rc = do_bf_setkey (c, key, keylen);
+ _gcry_burn_stack (64);
+ return rc;
+}
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_blowfish =
+ {
+ "BLOWFISH", NULL, NULL, BLOWFISH_BLOCKSIZE, 128,
+ sizeof (BLOWFISH_context),
+ bf_setkey, encrypt_block, decrypt_block
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/camellia-glue.c b/grub-core/lib/libgcrypt/cipher/camellia-glue.c
new file mode 100644
index 0000000..067af85
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/camellia-glue.c
@@ -0,0 +1,253 @@
+/* camellia-glue.c - Glue for the Camellia cipher
+ * Copyright (C) 2007 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+/* I put all the libgcrypt-specific stuff in this file to keep the
+ camellia.c/camellia.h files exactly as provided by NTT. If they
+ update their code, this should make it easier to bring the changes
+ in. - dshaw
+
+ There is one small change which needs to be done: Include the
+ following code at the top of camellia.h: */
+#if 0
+
+/* To use Camellia with libraries it is often useful to keep the name
+ * space of the library clean. The following macro is thus useful:
+ *
+ * #define CAMELLIA_EXT_SYM_PREFIX foo_
+ *
+ * This prefixes all external symbols with "foo_".
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef CAMELLIA_EXT_SYM_PREFIX
+#define CAMELLIA_PREFIX1(x,y) x ## y
+#define CAMELLIA_PREFIX2(x,y) CAMELLIA_PREFIX1(x,y)
+#define CAMELLIA_PREFIX(x) CAMELLIA_PREFIX2(CAMELLIA_EXT_SYM_PREFIX,x)
+#define Camellia_Ekeygen CAMELLIA_PREFIX(Camellia_Ekeygen)
+#define Camellia_EncryptBlock CAMELLIA_PREFIX(Camellia_EncryptBlock)
+#define Camellia_DecryptBlock CAMELLIA_PREFIX(Camellia_DecryptBlock)
+#define camellia_decrypt128 CAMELLIA_PREFIX(camellia_decrypt128)
+#define camellia_decrypt256 CAMELLIA_PREFIX(camellia_decrypt256)
+#define camellia_encrypt128 CAMELLIA_PREFIX(camellia_encrypt128)
+#define camellia_encrypt256 CAMELLIA_PREFIX(camellia_encrypt256)
+#define camellia_setup128 CAMELLIA_PREFIX(camellia_setup128)
+#define camellia_setup192 CAMELLIA_PREFIX(camellia_setup192)
+#define camellia_setup256 CAMELLIA_PREFIX(camellia_setup256)
+#endif /*CAMELLIA_EXT_SYM_PREFIX*/
+
+#endif /* Code sample. */
+
+
+#include <config.h>
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+#include "camellia.h"
+
+typedef struct
+{
+ int keybitlength;
+ KEY_TABLE_TYPE keytable;
+} CAMELLIA_context;
+
+static const char *selftest(void);
+
+static gcry_err_code_t
+camellia_setkey(void *c, const byte *key, unsigned keylen)
+{
+ CAMELLIA_context *ctx=c;
+ static int initialized=0;
+ static const char *selftest_failed=NULL;
+
+ if(keylen!=16 && keylen!=24 && keylen!=32)
+ return GPG_ERR_INV_KEYLEN;
+
+ if(!initialized)
+ {
+ initialized=1;
+ selftest_failed=selftest();
+ if(selftest_failed)
+ log_error("%s\n",selftest_failed);
+ }
+
+ if(selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ ctx->keybitlength=keylen*8;
+ Camellia_Ekeygen(ctx->keybitlength,key,ctx->keytable);
+ _gcry_burn_stack
+ ((19+34+34)*sizeof(u32)+2*sizeof(void*) /* camellia_setup256 */
+ +(4+32)*sizeof(u32)+2*sizeof(void*) /* camellia_setup192 */
+ +0+sizeof(int)+2*sizeof(void*) /* Camellia_Ekeygen */
+ +3*2*sizeof(void*) /* Function calls. */
+ );
+
+ return 0;
+}
+
+static void
+camellia_encrypt(void *c, byte *outbuf, const byte *inbuf)
+{
+ CAMELLIA_context *ctx=c;
+
+ Camellia_EncryptBlock(ctx->keybitlength,inbuf,ctx->keytable,outbuf);
+ _gcry_burn_stack
+ (sizeof(int)+2*sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
+ +4*sizeof(u32)
+ +2*sizeof(u32*)+4*sizeof(u32)
+ +2*2*sizeof(void*) /* Function calls. */
+ );
+}
+
+static void
+camellia_decrypt(void *c, byte *outbuf, const byte *inbuf)
+{
+ CAMELLIA_context *ctx=c;
+
+ Camellia_DecryptBlock(ctx->keybitlength,inbuf,ctx->keytable,outbuf);
+ _gcry_burn_stack
+ (sizeof(int)+2*sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
+ +4*sizeof(u32)
+ +2*sizeof(u32*)+4*sizeof(u32)
+ +2*2*sizeof(void*) /* Function calls. */
+ );
+}
+
+static const char *
+selftest(void)
+{
+ CAMELLIA_context ctx;
+ byte scratch[16];
+
+ /* These test vectors are from RFC-3713 */
+ const byte plaintext[]=
+ {
+ 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
+ 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10
+ };
+ const byte key_128[]=
+ {
+ 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,
+ 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10
+ };
+ const byte ciphertext_128[]=
+ {
+ 0x67,0x67,0x31,0x38,0x54,0x96,0x69,0x73,
+ 0x08,0x57,0x06,0x56,0x48,0xea,0xbe,0x43
+ };
+ const byte key_192[]=
+ {
+ 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,
+ 0x76,0x54,0x32,0x10,0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77
+ };
+ const byte ciphertext_192[]=
+ {
+ 0xb4,0x99,0x34,0x01,0xb3,0xe9,0x96,0xf8,
+ 0x4e,0xe5,0xce,0xe7,0xd7,0x9b,0x09,0xb9
+ };
+ const byte key_256[]=
+ {
+ 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,
+ 0x98,0x76,0x54,0x32,0x10,0x00,0x11,0x22,0x33,0x44,0x55,
+ 0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff
+ };
+ const byte ciphertext_256[]=
+ {
+ 0x9a,0xcc,0x23,0x7d,0xff,0x16,0xd7,0x6c,
+ 0x20,0xef,0x7c,0x91,0x9e,0x3a,0x75,0x09
+ };
+
+ camellia_setkey(&ctx,key_128,sizeof(key_128));
+ camellia_encrypt(&ctx,scratch,plaintext);
+ if(memcmp(scratch,ciphertext_128,sizeof(ciphertext_128))!=0)
+ return "CAMELLIA-128 test encryption failed.";
+ camellia_decrypt(&ctx,scratch,scratch);
+ if(memcmp(scratch,plaintext,sizeof(plaintext))!=0)
+ return "CAMELLIA-128 test decryption failed.";
+
+ camellia_setkey(&ctx,key_192,sizeof(key_192));
+ camellia_encrypt(&ctx,scratch,plaintext);
+ if(memcmp(scratch,ciphertext_192,sizeof(ciphertext_192))!=0)
+ return "CAMELLIA-192 test encryption failed.";
+ camellia_decrypt(&ctx,scratch,scratch);
+ if(memcmp(scratch,plaintext,sizeof(plaintext))!=0)
+ return "CAMELLIA-192 test decryption failed.";
+
+ camellia_setkey(&ctx,key_256,sizeof(key_256));
+ camellia_encrypt(&ctx,scratch,plaintext);
+ if(memcmp(scratch,ciphertext_256,sizeof(ciphertext_256))!=0)
+ return "CAMELLIA-256 test encryption failed.";
+ camellia_decrypt(&ctx,scratch,scratch);
+ if(memcmp(scratch,plaintext,sizeof(plaintext))!=0)
+ return "CAMELLIA-256 test decryption failed.";
+
+ return NULL;
+}
+
+/* These oids are from
+ <http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications_oid.html>,
+ retrieved May 1, 2007. */
+
+static gcry_cipher_oid_spec_t camellia128_oids[] =
+ {
+ {"1.2.392.200011.61.1.1.1.2", GCRY_CIPHER_MODE_CBC},
+ {"0.3.4401.5.3.1.9.1", GCRY_CIPHER_MODE_ECB},
+ {"0.3.4401.5.3.1.9.3", GCRY_CIPHER_MODE_OFB},
+ {"0.3.4401.5.3.1.9.4", GCRY_CIPHER_MODE_CFB},
+ { NULL }
+ };
+
+static gcry_cipher_oid_spec_t camellia192_oids[] =
+ {
+ {"1.2.392.200011.61.1.1.1.3", GCRY_CIPHER_MODE_CBC},
+ {"0.3.4401.5.3.1.9.21", GCRY_CIPHER_MODE_ECB},
+ {"0.3.4401.5.3.1.9.23", GCRY_CIPHER_MODE_OFB},
+ {"0.3.4401.5.3.1.9.24", GCRY_CIPHER_MODE_CFB},
+ { NULL }
+ };
+
+static gcry_cipher_oid_spec_t camellia256_oids[] =
+ {
+ {"1.2.392.200011.61.1.1.1.4", GCRY_CIPHER_MODE_CBC},
+ {"0.3.4401.5.3.1.9.41", GCRY_CIPHER_MODE_ECB},
+ {"0.3.4401.5.3.1.9.43", GCRY_CIPHER_MODE_OFB},
+ {"0.3.4401.5.3.1.9.44", GCRY_CIPHER_MODE_CFB},
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_camellia128 =
+ {
+ "CAMELLIA128",NULL,camellia128_oids,CAMELLIA_BLOCK_SIZE,128,
+ sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_camellia192 =
+ {
+ "CAMELLIA192",NULL,camellia192_oids,CAMELLIA_BLOCK_SIZE,192,
+ sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_camellia256 =
+ {
+ "CAMELLIA256",NULL,camellia256_oids,CAMELLIA_BLOCK_SIZE,256,
+ sizeof(CAMELLIA_context),camellia_setkey,camellia_encrypt,camellia_decrypt
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/camellia.c b/grub-core/lib/libgcrypt/cipher/camellia.c
new file mode 100644
index 0000000..79cd49b
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/camellia.c
@@ -0,0 +1,1461 @@
+/* camellia.h ver 1.2.0
+ *
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * Algorithm Specification
+ * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
+ */
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "camellia.h"
+
+/* u32 must be 32bit word */
+typedef unsigned int u32;
+typedef unsigned char u8;
+
+/* key constants */
+
+#define CAMELLIA_SIGMA1L (0xA09E667FL)
+#define CAMELLIA_SIGMA1R (0x3BCC908BL)
+#define CAMELLIA_SIGMA2L (0xB67AE858L)
+#define CAMELLIA_SIGMA2R (0x4CAA73B2L)
+#define CAMELLIA_SIGMA3L (0xC6EF372FL)
+#define CAMELLIA_SIGMA3R (0xE94F82BEL)
+#define CAMELLIA_SIGMA4L (0x54FF53A5L)
+#define CAMELLIA_SIGMA4R (0xF1D36F1CL)
+#define CAMELLIA_SIGMA5L (0x10E527FAL)
+#define CAMELLIA_SIGMA5R (0xDE682D1DL)
+#define CAMELLIA_SIGMA6L (0xB05688C2L)
+#define CAMELLIA_SIGMA6R (0xB3E6C1FDL)
+
+/*
+ * macros
+ */
+
+
+#if defined(_MSC_VER)
+
+# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00)
+# define GETU32(p) SWAP(*((u32 *)(p)))
+# define PUTU32(ct, st) {*((u32 *)(ct)) = SWAP((st));}
+
+#else /* not MS-VC */
+
+# define GETU32(pt) \
+ (((u32)(pt)[0] << 24) \
+ ^ ((u32)(pt)[1] << 16) \
+ ^ ((u32)(pt)[2] << 8) \
+ ^ ((u32)(pt)[3]))
+
+# define PUTU32(ct, st) { \
+ (ct)[0] = (u8)((st) >> 24); \
+ (ct)[1] = (u8)((st) >> 16); \
+ (ct)[2] = (u8)((st) >> 8); \
+ (ct)[3] = (u8)(st); }
+
+#endif
+
+#define CamelliaSubkeyL(INDEX) (subkey[(INDEX)*2])
+#define CamelliaSubkeyR(INDEX) (subkey[(INDEX)*2 + 1])
+
+/* rotation right shift 1byte */
+#define CAMELLIA_RR8(x) (((x) >> 8) + ((x) << 24))
+/* rotation left shift 1bit */
+#define CAMELLIA_RL1(x) (((x) << 1) + ((x) >> 31))
+/* rotation left shift 1byte */
+#define CAMELLIA_RL8(x) (((x) << 8) + ((x) >> 24))
+
+#define CAMELLIA_ROLDQ(ll, lr, rl, rr, w0, w1, bits) \
+ do { \
+ w0 = ll; \
+ ll = (ll << bits) + (lr >> (32 - bits)); \
+ lr = (lr << bits) + (rl >> (32 - bits)); \
+ rl = (rl << bits) + (rr >> (32 - bits)); \
+ rr = (rr << bits) + (w0 >> (32 - bits)); \
+ } while(0)
+
+#define CAMELLIA_ROLDQo32(ll, lr, rl, rr, w0, w1, bits) \
+ do { \
+ w0 = ll; \
+ w1 = lr; \
+ ll = (lr << (bits - 32)) + (rl >> (64 - bits)); \
+ lr = (rl << (bits - 32)) + (rr >> (64 - bits)); \
+ rl = (rr << (bits - 32)) + (w0 >> (64 - bits)); \
+ rr = (w0 << (bits - 32)) + (w1 >> (64 - bits)); \
+ } while(0)
+
+#define CAMELLIA_SP1110(INDEX) (camellia_sp1110[(INDEX)])
+#define CAMELLIA_SP0222(INDEX) (camellia_sp0222[(INDEX)])
+#define CAMELLIA_SP3033(INDEX) (camellia_sp3033[(INDEX)])
+#define CAMELLIA_SP4404(INDEX) (camellia_sp4404[(INDEX)])
+
+#define CAMELLIA_F(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \
+ do { \
+ il = xl ^ kl; \
+ ir = xr ^ kr; \
+ t0 = il >> 16; \
+ t1 = ir >> 16; \
+ yl = CAMELLIA_SP1110(ir & 0xff) \
+ ^ CAMELLIA_SP0222((t1 >> 8) & 0xff) \
+ ^ CAMELLIA_SP3033(t1 & 0xff) \
+ ^ CAMELLIA_SP4404((ir >> 8) & 0xff); \
+ yr = CAMELLIA_SP1110((t0 >> 8) & 0xff) \
+ ^ CAMELLIA_SP0222(t0 & 0xff) \
+ ^ CAMELLIA_SP3033((il >> 8) & 0xff) \
+ ^ CAMELLIA_SP4404(il & 0xff); \
+ yl ^= yr; \
+ yr = CAMELLIA_RR8(yr); \
+ yr ^= yl; \
+ } while(0)
+
+
+/*
+ * for speed up
+ *
+ */
+#define CAMELLIA_FLS(ll, lr, rl, rr, kll, klr, krl, krr, t0, t1, t2, t3) \
+ do { \
+ t0 = kll; \
+ t0 &= ll; \
+ lr ^= CAMELLIA_RL1(t0); \
+ t1 = klr; \
+ t1 |= lr; \
+ ll ^= t1; \
+ \
+ t2 = krr; \
+ t2 |= rr; \
+ rl ^= t2; \
+ t3 = krl; \
+ t3 &= rl; \
+ rr ^= CAMELLIA_RL1(t3); \
+ } while(0)
+
+#define CAMELLIA_ROUNDSM(xl, xr, kl, kr, yl, yr, il, ir, t0, t1) \
+ do { \
+ ir = CAMELLIA_SP1110(xr & 0xff) \
+ ^ CAMELLIA_SP0222((xr >> 24) & 0xff) \
+ ^ CAMELLIA_SP3033((xr >> 16) & 0xff) \
+ ^ CAMELLIA_SP4404((xr >> 8) & 0xff); \
+ il = CAMELLIA_SP1110((xl >> 24) & 0xff) \
+ ^ CAMELLIA_SP0222((xl >> 16) & 0xff) \
+ ^ CAMELLIA_SP3033((xl >> 8) & 0xff) \
+ ^ CAMELLIA_SP4404(xl & 0xff); \
+ il ^= kl; \
+ ir ^= kr; \
+ ir ^= il; \
+ il = CAMELLIA_RR8(il); \
+ il ^= ir; \
+ yl ^= ir; \
+ yr ^= il; \
+ } while(0)
+
+
+static const u32 camellia_sp1110[256] = {
+ 0x70707000,0x82828200,0x2c2c2c00,0xececec00,
+ 0xb3b3b300,0x27272700,0xc0c0c000,0xe5e5e500,
+ 0xe4e4e400,0x85858500,0x57575700,0x35353500,
+ 0xeaeaea00,0x0c0c0c00,0xaeaeae00,0x41414100,
+ 0x23232300,0xefefef00,0x6b6b6b00,0x93939300,
+ 0x45454500,0x19191900,0xa5a5a500,0x21212100,
+ 0xededed00,0x0e0e0e00,0x4f4f4f00,0x4e4e4e00,
+ 0x1d1d1d00,0x65656500,0x92929200,0xbdbdbd00,
+ 0x86868600,0xb8b8b800,0xafafaf00,0x8f8f8f00,
+ 0x7c7c7c00,0xebebeb00,0x1f1f1f00,0xcecece00,
+ 0x3e3e3e00,0x30303000,0xdcdcdc00,0x5f5f5f00,
+ 0x5e5e5e00,0xc5c5c500,0x0b0b0b00,0x1a1a1a00,
+ 0xa6a6a600,0xe1e1e100,0x39393900,0xcacaca00,
+ 0xd5d5d500,0x47474700,0x5d5d5d00,0x3d3d3d00,
+ 0xd9d9d900,0x01010100,0x5a5a5a00,0xd6d6d600,
+ 0x51515100,0x56565600,0x6c6c6c00,0x4d4d4d00,
+ 0x8b8b8b00,0x0d0d0d00,0x9a9a9a00,0x66666600,
+ 0xfbfbfb00,0xcccccc00,0xb0b0b000,0x2d2d2d00,
+ 0x74747400,0x12121200,0x2b2b2b00,0x20202000,
+ 0xf0f0f000,0xb1b1b100,0x84848400,0x99999900,
+ 0xdfdfdf00,0x4c4c4c00,0xcbcbcb00,0xc2c2c200,
+ 0x34343400,0x7e7e7e00,0x76767600,0x05050500,
+ 0x6d6d6d00,0xb7b7b700,0xa9a9a900,0x31313100,
+ 0xd1d1d100,0x17171700,0x04040400,0xd7d7d700,
+ 0x14141400,0x58585800,0x3a3a3a00,0x61616100,
+ 0xdedede00,0x1b1b1b00,0x11111100,0x1c1c1c00,
+ 0x32323200,0x0f0f0f00,0x9c9c9c00,0x16161600,
+ 0x53535300,0x18181800,0xf2f2f200,0x22222200,
+ 0xfefefe00,0x44444400,0xcfcfcf00,0xb2b2b200,
+ 0xc3c3c300,0xb5b5b500,0x7a7a7a00,0x91919100,
+ 0x24242400,0x08080800,0xe8e8e800,0xa8a8a800,
+ 0x60606000,0xfcfcfc00,0x69696900,0x50505000,
+ 0xaaaaaa00,0xd0d0d000,0xa0a0a000,0x7d7d7d00,
+ 0xa1a1a100,0x89898900,0x62626200,0x97979700,
+ 0x54545400,0x5b5b5b00,0x1e1e1e00,0x95959500,
+ 0xe0e0e000,0xffffff00,0x64646400,0xd2d2d200,
+ 0x10101000,0xc4c4c400,0x00000000,0x48484800,
+ 0xa3a3a300,0xf7f7f700,0x75757500,0xdbdbdb00,
+ 0x8a8a8a00,0x03030300,0xe6e6e600,0xdadada00,
+ 0x09090900,0x3f3f3f00,0xdddddd00,0x94949400,
+ 0x87878700,0x5c5c5c00,0x83838300,0x02020200,
+ 0xcdcdcd00,0x4a4a4a00,0x90909000,0x33333300,
+ 0x73737300,0x67676700,0xf6f6f600,0xf3f3f300,
+ 0x9d9d9d00,0x7f7f7f00,0xbfbfbf00,0xe2e2e200,
+ 0x52525200,0x9b9b9b00,0xd8d8d800,0x26262600,
+ 0xc8c8c800,0x37373700,0xc6c6c600,0x3b3b3b00,
+ 0x81818100,0x96969600,0x6f6f6f00,0x4b4b4b00,
+ 0x13131300,0xbebebe00,0x63636300,0x2e2e2e00,
+ 0xe9e9e900,0x79797900,0xa7a7a700,0x8c8c8c00,
+ 0x9f9f9f00,0x6e6e6e00,0xbcbcbc00,0x8e8e8e00,
+ 0x29292900,0xf5f5f500,0xf9f9f900,0xb6b6b600,
+ 0x2f2f2f00,0xfdfdfd00,0xb4b4b400,0x59595900,
+ 0x78787800,0x98989800,0x06060600,0x6a6a6a00,
+ 0xe7e7e700,0x46464600,0x71717100,0xbababa00,
+ 0xd4d4d400,0x25252500,0xababab00,0x42424200,
+ 0x88888800,0xa2a2a200,0x8d8d8d00,0xfafafa00,
+ 0x72727200,0x07070700,0xb9b9b900,0x55555500,
+ 0xf8f8f800,0xeeeeee00,0xacacac00,0x0a0a0a00,
+ 0x36363600,0x49494900,0x2a2a2a00,0x68686800,
+ 0x3c3c3c00,0x38383800,0xf1f1f100,0xa4a4a400,
+ 0x40404000,0x28282800,0xd3d3d300,0x7b7b7b00,
+ 0xbbbbbb00,0xc9c9c900,0x43434300,0xc1c1c100,
+ 0x15151500,0xe3e3e300,0xadadad00,0xf4f4f400,
+ 0x77777700,0xc7c7c700,0x80808000,0x9e9e9e00,
+};
+
+static const u32 camellia_sp0222[256] = {
+ 0x00e0e0e0,0x00050505,0x00585858,0x00d9d9d9,
+ 0x00676767,0x004e4e4e,0x00818181,0x00cbcbcb,
+ 0x00c9c9c9,0x000b0b0b,0x00aeaeae,0x006a6a6a,
+ 0x00d5d5d5,0x00181818,0x005d5d5d,0x00828282,
+ 0x00464646,0x00dfdfdf,0x00d6d6d6,0x00272727,
+ 0x008a8a8a,0x00323232,0x004b4b4b,0x00424242,
+ 0x00dbdbdb,0x001c1c1c,0x009e9e9e,0x009c9c9c,
+ 0x003a3a3a,0x00cacaca,0x00252525,0x007b7b7b,
+ 0x000d0d0d,0x00717171,0x005f5f5f,0x001f1f1f,
+ 0x00f8f8f8,0x00d7d7d7,0x003e3e3e,0x009d9d9d,
+ 0x007c7c7c,0x00606060,0x00b9b9b9,0x00bebebe,
+ 0x00bcbcbc,0x008b8b8b,0x00161616,0x00343434,
+ 0x004d4d4d,0x00c3c3c3,0x00727272,0x00959595,
+ 0x00ababab,0x008e8e8e,0x00bababa,0x007a7a7a,
+ 0x00b3b3b3,0x00020202,0x00b4b4b4,0x00adadad,
+ 0x00a2a2a2,0x00acacac,0x00d8d8d8,0x009a9a9a,
+ 0x00171717,0x001a1a1a,0x00353535,0x00cccccc,
+ 0x00f7f7f7,0x00999999,0x00616161,0x005a5a5a,
+ 0x00e8e8e8,0x00242424,0x00565656,0x00404040,
+ 0x00e1e1e1,0x00636363,0x00090909,0x00333333,
+ 0x00bfbfbf,0x00989898,0x00979797,0x00858585,
+ 0x00686868,0x00fcfcfc,0x00ececec,0x000a0a0a,
+ 0x00dadada,0x006f6f6f,0x00535353,0x00626262,
+ 0x00a3a3a3,0x002e2e2e,0x00080808,0x00afafaf,
+ 0x00282828,0x00b0b0b0,0x00747474,0x00c2c2c2,
+ 0x00bdbdbd,0x00363636,0x00222222,0x00383838,
+ 0x00646464,0x001e1e1e,0x00393939,0x002c2c2c,
+ 0x00a6a6a6,0x00303030,0x00e5e5e5,0x00444444,
+ 0x00fdfdfd,0x00888888,0x009f9f9f,0x00656565,
+ 0x00878787,0x006b6b6b,0x00f4f4f4,0x00232323,
+ 0x00484848,0x00101010,0x00d1d1d1,0x00515151,
+ 0x00c0c0c0,0x00f9f9f9,0x00d2d2d2,0x00a0a0a0,
+ 0x00555555,0x00a1a1a1,0x00414141,0x00fafafa,
+ 0x00434343,0x00131313,0x00c4c4c4,0x002f2f2f,
+ 0x00a8a8a8,0x00b6b6b6,0x003c3c3c,0x002b2b2b,
+ 0x00c1c1c1,0x00ffffff,0x00c8c8c8,0x00a5a5a5,
+ 0x00202020,0x00898989,0x00000000,0x00909090,
+ 0x00474747,0x00efefef,0x00eaeaea,0x00b7b7b7,
+ 0x00151515,0x00060606,0x00cdcdcd,0x00b5b5b5,
+ 0x00121212,0x007e7e7e,0x00bbbbbb,0x00292929,
+ 0x000f0f0f,0x00b8b8b8,0x00070707,0x00040404,
+ 0x009b9b9b,0x00949494,0x00212121,0x00666666,
+ 0x00e6e6e6,0x00cecece,0x00ededed,0x00e7e7e7,
+ 0x003b3b3b,0x00fefefe,0x007f7f7f,0x00c5c5c5,
+ 0x00a4a4a4,0x00373737,0x00b1b1b1,0x004c4c4c,
+ 0x00919191,0x006e6e6e,0x008d8d8d,0x00767676,
+ 0x00030303,0x002d2d2d,0x00dedede,0x00969696,
+ 0x00262626,0x007d7d7d,0x00c6c6c6,0x005c5c5c,
+ 0x00d3d3d3,0x00f2f2f2,0x004f4f4f,0x00191919,
+ 0x003f3f3f,0x00dcdcdc,0x00797979,0x001d1d1d,
+ 0x00525252,0x00ebebeb,0x00f3f3f3,0x006d6d6d,
+ 0x005e5e5e,0x00fbfbfb,0x00696969,0x00b2b2b2,
+ 0x00f0f0f0,0x00313131,0x000c0c0c,0x00d4d4d4,
+ 0x00cfcfcf,0x008c8c8c,0x00e2e2e2,0x00757575,
+ 0x00a9a9a9,0x004a4a4a,0x00575757,0x00848484,
+ 0x00111111,0x00454545,0x001b1b1b,0x00f5f5f5,
+ 0x00e4e4e4,0x000e0e0e,0x00737373,0x00aaaaaa,
+ 0x00f1f1f1,0x00dddddd,0x00595959,0x00141414,
+ 0x006c6c6c,0x00929292,0x00545454,0x00d0d0d0,
+ 0x00787878,0x00707070,0x00e3e3e3,0x00494949,
+ 0x00808080,0x00505050,0x00a7a7a7,0x00f6f6f6,
+ 0x00777777,0x00939393,0x00868686,0x00838383,
+ 0x002a2a2a,0x00c7c7c7,0x005b5b5b,0x00e9e9e9,
+ 0x00eeeeee,0x008f8f8f,0x00010101,0x003d3d3d,
+};
+
+static const u32 camellia_sp3033[256] = {
+ 0x38003838,0x41004141,0x16001616,0x76007676,
+ 0xd900d9d9,0x93009393,0x60006060,0xf200f2f2,
+ 0x72007272,0xc200c2c2,0xab00abab,0x9a009a9a,
+ 0x75007575,0x06000606,0x57005757,0xa000a0a0,
+ 0x91009191,0xf700f7f7,0xb500b5b5,0xc900c9c9,
+ 0xa200a2a2,0x8c008c8c,0xd200d2d2,0x90009090,
+ 0xf600f6f6,0x07000707,0xa700a7a7,0x27002727,
+ 0x8e008e8e,0xb200b2b2,0x49004949,0xde00dede,
+ 0x43004343,0x5c005c5c,0xd700d7d7,0xc700c7c7,
+ 0x3e003e3e,0xf500f5f5,0x8f008f8f,0x67006767,
+ 0x1f001f1f,0x18001818,0x6e006e6e,0xaf00afaf,
+ 0x2f002f2f,0xe200e2e2,0x85008585,0x0d000d0d,
+ 0x53005353,0xf000f0f0,0x9c009c9c,0x65006565,
+ 0xea00eaea,0xa300a3a3,0xae00aeae,0x9e009e9e,
+ 0xec00ecec,0x80008080,0x2d002d2d,0x6b006b6b,
+ 0xa800a8a8,0x2b002b2b,0x36003636,0xa600a6a6,
+ 0xc500c5c5,0x86008686,0x4d004d4d,0x33003333,
+ 0xfd00fdfd,0x66006666,0x58005858,0x96009696,
+ 0x3a003a3a,0x09000909,0x95009595,0x10001010,
+ 0x78007878,0xd800d8d8,0x42004242,0xcc00cccc,
+ 0xef00efef,0x26002626,0xe500e5e5,0x61006161,
+ 0x1a001a1a,0x3f003f3f,0x3b003b3b,0x82008282,
+ 0xb600b6b6,0xdb00dbdb,0xd400d4d4,0x98009898,
+ 0xe800e8e8,0x8b008b8b,0x02000202,0xeb00ebeb,
+ 0x0a000a0a,0x2c002c2c,0x1d001d1d,0xb000b0b0,
+ 0x6f006f6f,0x8d008d8d,0x88008888,0x0e000e0e,
+ 0x19001919,0x87008787,0x4e004e4e,0x0b000b0b,
+ 0xa900a9a9,0x0c000c0c,0x79007979,0x11001111,
+ 0x7f007f7f,0x22002222,0xe700e7e7,0x59005959,
+ 0xe100e1e1,0xda00dada,0x3d003d3d,0xc800c8c8,
+ 0x12001212,0x04000404,0x74007474,0x54005454,
+ 0x30003030,0x7e007e7e,0xb400b4b4,0x28002828,
+ 0x55005555,0x68006868,0x50005050,0xbe00bebe,
+ 0xd000d0d0,0xc400c4c4,0x31003131,0xcb00cbcb,
+ 0x2a002a2a,0xad00adad,0x0f000f0f,0xca00caca,
+ 0x70007070,0xff00ffff,0x32003232,0x69006969,
+ 0x08000808,0x62006262,0x00000000,0x24002424,
+ 0xd100d1d1,0xfb00fbfb,0xba00baba,0xed00eded,
+ 0x45004545,0x81008181,0x73007373,0x6d006d6d,
+ 0x84008484,0x9f009f9f,0xee00eeee,0x4a004a4a,
+ 0xc300c3c3,0x2e002e2e,0xc100c1c1,0x01000101,
+ 0xe600e6e6,0x25002525,0x48004848,0x99009999,
+ 0xb900b9b9,0xb300b3b3,0x7b007b7b,0xf900f9f9,
+ 0xce00cece,0xbf00bfbf,0xdf00dfdf,0x71007171,
+ 0x29002929,0xcd00cdcd,0x6c006c6c,0x13001313,
+ 0x64006464,0x9b009b9b,0x63006363,0x9d009d9d,
+ 0xc000c0c0,0x4b004b4b,0xb700b7b7,0xa500a5a5,
+ 0x89008989,0x5f005f5f,0xb100b1b1,0x17001717,
+ 0xf400f4f4,0xbc00bcbc,0xd300d3d3,0x46004646,
+ 0xcf00cfcf,0x37003737,0x5e005e5e,0x47004747,
+ 0x94009494,0xfa00fafa,0xfc00fcfc,0x5b005b5b,
+ 0x97009797,0xfe00fefe,0x5a005a5a,0xac00acac,
+ 0x3c003c3c,0x4c004c4c,0x03000303,0x35003535,
+ 0xf300f3f3,0x23002323,0xb800b8b8,0x5d005d5d,
+ 0x6a006a6a,0x92009292,0xd500d5d5,0x21002121,
+ 0x44004444,0x51005151,0xc600c6c6,0x7d007d7d,
+ 0x39003939,0x83008383,0xdc00dcdc,0xaa00aaaa,
+ 0x7c007c7c,0x77007777,0x56005656,0x05000505,
+ 0x1b001b1b,0xa400a4a4,0x15001515,0x34003434,
+ 0x1e001e1e,0x1c001c1c,0xf800f8f8,0x52005252,
+ 0x20002020,0x14001414,0xe900e9e9,0xbd00bdbd,
+ 0xdd00dddd,0xe400e4e4,0xa100a1a1,0xe000e0e0,
+ 0x8a008a8a,0xf100f1f1,0xd600d6d6,0x7a007a7a,
+ 0xbb00bbbb,0xe300e3e3,0x40004040,0x4f004f4f,
+};
+
+static const u32 camellia_sp4404[256] = {
+ 0x70700070,0x2c2c002c,0xb3b300b3,0xc0c000c0,
+ 0xe4e400e4,0x57570057,0xeaea00ea,0xaeae00ae,
+ 0x23230023,0x6b6b006b,0x45450045,0xa5a500a5,
+ 0xeded00ed,0x4f4f004f,0x1d1d001d,0x92920092,
+ 0x86860086,0xafaf00af,0x7c7c007c,0x1f1f001f,
+ 0x3e3e003e,0xdcdc00dc,0x5e5e005e,0x0b0b000b,
+ 0xa6a600a6,0x39390039,0xd5d500d5,0x5d5d005d,
+ 0xd9d900d9,0x5a5a005a,0x51510051,0x6c6c006c,
+ 0x8b8b008b,0x9a9a009a,0xfbfb00fb,0xb0b000b0,
+ 0x74740074,0x2b2b002b,0xf0f000f0,0x84840084,
+ 0xdfdf00df,0xcbcb00cb,0x34340034,0x76760076,
+ 0x6d6d006d,0xa9a900a9,0xd1d100d1,0x04040004,
+ 0x14140014,0x3a3a003a,0xdede00de,0x11110011,
+ 0x32320032,0x9c9c009c,0x53530053,0xf2f200f2,
+ 0xfefe00fe,0xcfcf00cf,0xc3c300c3,0x7a7a007a,
+ 0x24240024,0xe8e800e8,0x60600060,0x69690069,
+ 0xaaaa00aa,0xa0a000a0,0xa1a100a1,0x62620062,
+ 0x54540054,0x1e1e001e,0xe0e000e0,0x64640064,
+ 0x10100010,0x00000000,0xa3a300a3,0x75750075,
+ 0x8a8a008a,0xe6e600e6,0x09090009,0xdddd00dd,
+ 0x87870087,0x83830083,0xcdcd00cd,0x90900090,
+ 0x73730073,0xf6f600f6,0x9d9d009d,0xbfbf00bf,
+ 0x52520052,0xd8d800d8,0xc8c800c8,0xc6c600c6,
+ 0x81810081,0x6f6f006f,0x13130013,0x63630063,
+ 0xe9e900e9,0xa7a700a7,0x9f9f009f,0xbcbc00bc,
+ 0x29290029,0xf9f900f9,0x2f2f002f,0xb4b400b4,
+ 0x78780078,0x06060006,0xe7e700e7,0x71710071,
+ 0xd4d400d4,0xabab00ab,0x88880088,0x8d8d008d,
+ 0x72720072,0xb9b900b9,0xf8f800f8,0xacac00ac,
+ 0x36360036,0x2a2a002a,0x3c3c003c,0xf1f100f1,
+ 0x40400040,0xd3d300d3,0xbbbb00bb,0x43430043,
+ 0x15150015,0xadad00ad,0x77770077,0x80800080,
+ 0x82820082,0xecec00ec,0x27270027,0xe5e500e5,
+ 0x85850085,0x35350035,0x0c0c000c,0x41410041,
+ 0xefef00ef,0x93930093,0x19190019,0x21210021,
+ 0x0e0e000e,0x4e4e004e,0x65650065,0xbdbd00bd,
+ 0xb8b800b8,0x8f8f008f,0xebeb00eb,0xcece00ce,
+ 0x30300030,0x5f5f005f,0xc5c500c5,0x1a1a001a,
+ 0xe1e100e1,0xcaca00ca,0x47470047,0x3d3d003d,
+ 0x01010001,0xd6d600d6,0x56560056,0x4d4d004d,
+ 0x0d0d000d,0x66660066,0xcccc00cc,0x2d2d002d,
+ 0x12120012,0x20200020,0xb1b100b1,0x99990099,
+ 0x4c4c004c,0xc2c200c2,0x7e7e007e,0x05050005,
+ 0xb7b700b7,0x31310031,0x17170017,0xd7d700d7,
+ 0x58580058,0x61610061,0x1b1b001b,0x1c1c001c,
+ 0x0f0f000f,0x16160016,0x18180018,0x22220022,
+ 0x44440044,0xb2b200b2,0xb5b500b5,0x91910091,
+ 0x08080008,0xa8a800a8,0xfcfc00fc,0x50500050,
+ 0xd0d000d0,0x7d7d007d,0x89890089,0x97970097,
+ 0x5b5b005b,0x95950095,0xffff00ff,0xd2d200d2,
+ 0xc4c400c4,0x48480048,0xf7f700f7,0xdbdb00db,
+ 0x03030003,0xdada00da,0x3f3f003f,0x94940094,
+ 0x5c5c005c,0x02020002,0x4a4a004a,0x33330033,
+ 0x67670067,0xf3f300f3,0x7f7f007f,0xe2e200e2,
+ 0x9b9b009b,0x26260026,0x37370037,0x3b3b003b,
+ 0x96960096,0x4b4b004b,0xbebe00be,0x2e2e002e,
+ 0x79790079,0x8c8c008c,0x6e6e006e,0x8e8e008e,
+ 0xf5f500f5,0xb6b600b6,0xfdfd00fd,0x59590059,
+ 0x98980098,0x6a6a006a,0x46460046,0xbaba00ba,
+ 0x25250025,0x42420042,0xa2a200a2,0xfafa00fa,
+ 0x07070007,0x55550055,0xeeee00ee,0x0a0a000a,
+ 0x49490049,0x68680068,0x38380038,0xa4a400a4,
+ 0x28280028,0x7b7b007b,0xc9c900c9,0xc1c100c1,
+ 0xe3e300e3,0xf4f400f4,0xc7c700c7,0x9e9e009e,
+};
+
+
+/**
+ * Stuff related to the Camellia key schedule
+ */
+#define subl(x) subL[(x)]
+#define subr(x) subR[(x)]
+
+void camellia_setup128(const unsigned char *key, u32 *subkey)
+{
+ u32 kll, klr, krl, krr;
+ u32 il, ir, t0, t1, w0, w1;
+ u32 kw4l, kw4r, dw, tl, tr;
+ u32 subL[26];
+ u32 subR[26];
+
+ /**
+ * k == kll || klr || krl || krr (|| is concatination)
+ */
+ kll = GETU32(key );
+ klr = GETU32(key + 4);
+ krl = GETU32(key + 8);
+ krr = GETU32(key + 12);
+ /**
+ * generate KL dependent subkeys
+ */
+ subl(0) = kll; subr(0) = klr;
+ subl(1) = krl; subr(1) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(4) = kll; subr(4) = klr;
+ subl(5) = krl; subr(5) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30);
+ subl(10) = kll; subr(10) = klr;
+ subl(11) = krl; subr(11) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(13) = krl; subr(13) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(16) = kll; subr(16) = klr;
+ subl(17) = krl; subr(17) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(18) = kll; subr(18) = klr;
+ subl(19) = krl; subr(19) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(22) = kll; subr(22) = klr;
+ subl(23) = krl; subr(23) = krr;
+
+ /* generate KA */
+ kll = subl(0); klr = subr(0);
+ krl = subl(1); krr = subr(1);
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R,
+ w0, w1, il, ir, t0, t1);
+ krl ^= w0; krr ^= w1;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R,
+ kll, klr, il, ir, t0, t1);
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R,
+ krl, krr, il, ir, t0, t1);
+ krl ^= w0; krr ^= w1;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R,
+ w0, w1, il, ir, t0, t1);
+ kll ^= w0; klr ^= w1;
+
+ /* generate KA dependent subkeys */
+ subl(2) = kll; subr(2) = klr;
+ subl(3) = krl; subr(3) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(6) = kll; subr(6) = klr;
+ subl(7) = krl; subr(7) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(8) = kll; subr(8) = klr;
+ subl(9) = krl; subr(9) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(12) = kll; subr(12) = klr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(14) = kll; subr(14) = klr;
+ subl(15) = krl; subr(15) = krr;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34);
+ subl(20) = kll; subr(20) = klr;
+ subl(21) = krl; subr(21) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(24) = kll; subr(24) = klr;
+ subl(25) = krl; subr(25) = krr;
+
+
+ /* absorb kw2 to other subkeys */
+ subl(3) ^= subl(1); subr(3) ^= subr(1);
+ subl(5) ^= subl(1); subr(5) ^= subr(1);
+ subl(7) ^= subl(1); subr(7) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(9);
+ dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(11) ^= subl(1); subr(11) ^= subr(1);
+ subl(13) ^= subl(1); subr(13) ^= subr(1);
+ subl(15) ^= subl(1); subr(15) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(17);
+ dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(19) ^= subl(1); subr(19) ^= subr(1);
+ subl(21) ^= subl(1); subr(21) ^= subr(1);
+ subl(23) ^= subl(1); subr(23) ^= subr(1);
+ subl(24) ^= subl(1); subr(24) ^= subr(1);
+
+ /* absorb kw4 to other subkeys */
+ kw4l = subl(25); kw4r = subr(25);
+ subl(22) ^= kw4l; subr(22) ^= kw4r;
+ subl(20) ^= kw4l; subr(20) ^= kw4r;
+ subl(18) ^= kw4l; subr(18) ^= kw4r;
+ kw4l ^= kw4r & ~subr(16);
+ dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
+ subl(14) ^= kw4l; subr(14) ^= kw4r;
+ subl(12) ^= kw4l; subr(12) ^= kw4r;
+ subl(10) ^= kw4l; subr(10) ^= kw4r;
+ kw4l ^= kw4r & ~subr(8);
+ dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
+ subl(6) ^= kw4l; subr(6) ^= kw4r;
+ subl(4) ^= kw4l; subr(4) ^= kw4r;
+ subl(2) ^= kw4l; subr(2) ^= kw4r;
+ subl(0) ^= kw4l; subr(0) ^= kw4r;
+
+ /* key XOR is end of F-function */
+ CamelliaSubkeyL(0) = subl(0) ^ subl(2);
+ CamelliaSubkeyR(0) = subr(0) ^ subr(2);
+ CamelliaSubkeyL(2) = subl(3);
+ CamelliaSubkeyR(2) = subr(3);
+ CamelliaSubkeyL(3) = subl(2) ^ subl(4);
+ CamelliaSubkeyR(3) = subr(2) ^ subr(4);
+ CamelliaSubkeyL(4) = subl(3) ^ subl(5);
+ CamelliaSubkeyR(4) = subr(3) ^ subr(5);
+ CamelliaSubkeyL(5) = subl(4) ^ subl(6);
+ CamelliaSubkeyR(5) = subr(4) ^ subr(6);
+ CamelliaSubkeyL(6) = subl(5) ^ subl(7);
+ CamelliaSubkeyR(6) = subr(5) ^ subr(7);
+ tl = subl(10) ^ (subr(10) & ~subr(8));
+ dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(7) = subl(6) ^ tl;
+ CamelliaSubkeyR(7) = subr(6) ^ tr;
+ CamelliaSubkeyL(8) = subl(8);
+ CamelliaSubkeyR(8) = subr(8);
+ CamelliaSubkeyL(9) = subl(9);
+ CamelliaSubkeyR(9) = subr(9);
+ tl = subl(7) ^ (subr(7) & ~subr(9));
+ dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(10) = tl ^ subl(11);
+ CamelliaSubkeyR(10) = tr ^ subr(11);
+ CamelliaSubkeyL(11) = subl(10) ^ subl(12);
+ CamelliaSubkeyR(11) = subr(10) ^ subr(12);
+ CamelliaSubkeyL(12) = subl(11) ^ subl(13);
+ CamelliaSubkeyR(12) = subr(11) ^ subr(13);
+ CamelliaSubkeyL(13) = subl(12) ^ subl(14);
+ CamelliaSubkeyR(13) = subr(12) ^ subr(14);
+ CamelliaSubkeyL(14) = subl(13) ^ subl(15);
+ CamelliaSubkeyR(14) = subr(13) ^ subr(15);
+ tl = subl(18) ^ (subr(18) & ~subr(16));
+ dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(15) = subl(14) ^ tl;
+ CamelliaSubkeyR(15) = subr(14) ^ tr;
+ CamelliaSubkeyL(16) = subl(16);
+ CamelliaSubkeyR(16) = subr(16);
+ CamelliaSubkeyL(17) = subl(17);
+ CamelliaSubkeyR(17) = subr(17);
+ tl = subl(15) ^ (subr(15) & ~subr(17));
+ dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(18) = tl ^ subl(19);
+ CamelliaSubkeyR(18) = tr ^ subr(19);
+ CamelliaSubkeyL(19) = subl(18) ^ subl(20);
+ CamelliaSubkeyR(19) = subr(18) ^ subr(20);
+ CamelliaSubkeyL(20) = subl(19) ^ subl(21);
+ CamelliaSubkeyR(20) = subr(19) ^ subr(21);
+ CamelliaSubkeyL(21) = subl(20) ^ subl(22);
+ CamelliaSubkeyR(21) = subr(20) ^ subr(22);
+ CamelliaSubkeyL(22) = subl(21) ^ subl(23);
+ CamelliaSubkeyR(22) = subr(21) ^ subr(23);
+ CamelliaSubkeyL(23) = subl(22);
+ CamelliaSubkeyR(23) = subr(22);
+ CamelliaSubkeyL(24) = subl(24) ^ subl(23);
+ CamelliaSubkeyR(24) = subr(24) ^ subr(23);
+
+ /* apply the inverse of the last half of P-function */
+ dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
+ dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
+ dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
+ dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
+ dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
+ dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
+ dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
+ dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
+ dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
+ dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
+ dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
+ dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
+ dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
+ dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
+ dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
+ dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
+ dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
+ dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
+
+ return;
+}
+
+void camellia_setup256(const unsigned char *key, u32 *subkey)
+{
+ u32 kll,klr,krl,krr; /* left half of key */
+ u32 krll,krlr,krrl,krrr; /* right half of key */
+ u32 il, ir, t0, t1, w0, w1; /* temporary variables */
+ u32 kw4l, kw4r, dw, tl, tr;
+ u32 subL[34];
+ u32 subR[34];
+
+ /**
+ * key = (kll || klr || krl || krr || krll || krlr || krrl || krrr)
+ * (|| is concatination)
+ */
+
+ kll = GETU32(key );
+ klr = GETU32(key + 4);
+ krl = GETU32(key + 8);
+ krr = GETU32(key + 12);
+ krll = GETU32(key + 16);
+ krlr = GETU32(key + 20);
+ krrl = GETU32(key + 24);
+ krrr = GETU32(key + 28);
+
+ /* generate KL dependent subkeys */
+ subl(0) = kll; subr(0) = klr;
+ subl(1) = krl; subr(1) = krr;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 45);
+ subl(12) = kll; subr(12) = klr;
+ subl(13) = krl; subr(13) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(16) = kll; subr(16) = klr;
+ subl(17) = krl; subr(17) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 17);
+ subl(22) = kll; subr(22) = klr;
+ subl(23) = krl; subr(23) = krr;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 34);
+ subl(30) = kll; subr(30) = klr;
+ subl(31) = krl; subr(31) = krr;
+
+ /* generate KR dependent subkeys */
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15);
+ subl(4) = krll; subr(4) = krlr;
+ subl(5) = krrl; subr(5) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 15);
+ subl(8) = krll; subr(8) = krlr;
+ subl(9) = krrl; subr(9) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
+ subl(18) = krll; subr(18) = krlr;
+ subl(19) = krrl; subr(19) = krrr;
+ CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34);
+ subl(26) = krll; subr(26) = krlr;
+ subl(27) = krrl; subr(27) = krrr;
+ CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 34);
+
+ /* generate KA */
+ kll = subl(0) ^ krll; klr = subr(0) ^ krlr;
+ krl = subl(1) ^ krrl; krr = subr(1) ^ krrr;
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA1L, CAMELLIA_SIGMA1R,
+ w0, w1, il, ir, t0, t1);
+ krl ^= w0; krr ^= w1;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA2L, CAMELLIA_SIGMA2R,
+ kll, klr, il, ir, t0, t1);
+ kll ^= krll; klr ^= krlr;
+ CAMELLIA_F(kll, klr,
+ CAMELLIA_SIGMA3L, CAMELLIA_SIGMA3R,
+ krl, krr, il, ir, t0, t1);
+ krl ^= w0 ^ krrl; krr ^= w1 ^ krrr;
+ CAMELLIA_F(krl, krr,
+ CAMELLIA_SIGMA4L, CAMELLIA_SIGMA4R,
+ w0, w1, il, ir, t0, t1);
+ kll ^= w0; klr ^= w1;
+
+ /* generate KB */
+ krll ^= kll; krlr ^= klr;
+ krrl ^= krl; krrr ^= krr;
+ CAMELLIA_F(krll, krlr,
+ CAMELLIA_SIGMA5L, CAMELLIA_SIGMA5R,
+ w0, w1, il, ir, t0, t1);
+ krrl ^= w0; krrr ^= w1;
+ CAMELLIA_F(krrl, krrr,
+ CAMELLIA_SIGMA6L, CAMELLIA_SIGMA6R,
+ w0, w1, il, ir, t0, t1);
+ krll ^= w0; krlr ^= w1;
+
+ /* generate KA dependent subkeys */
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 15);
+ subl(6) = kll; subr(6) = klr;
+ subl(7) = krl; subr(7) = krr;
+ CAMELLIA_ROLDQ(kll, klr, krl, krr, w0, w1, 30);
+ subl(14) = kll; subr(14) = klr;
+ subl(15) = krl; subr(15) = krr;
+ subl(24) = klr; subr(24) = krl;
+ subl(25) = krr; subr(25) = kll;
+ CAMELLIA_ROLDQo32(kll, klr, krl, krr, w0, w1, 49);
+ subl(28) = kll; subr(28) = klr;
+ subl(29) = krl; subr(29) = krr;
+
+ /* generate KB dependent subkeys */
+ subl(2) = krll; subr(2) = krlr;
+ subl(3) = krrl; subr(3) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
+ subl(10) = krll; subr(10) = krlr;
+ subl(11) = krrl; subr(11) = krrr;
+ CAMELLIA_ROLDQ(krll, krlr, krrl, krrr, w0, w1, 30);
+ subl(20) = krll; subr(20) = krlr;
+ subl(21) = krrl; subr(21) = krrr;
+ CAMELLIA_ROLDQo32(krll, krlr, krrl, krrr, w0, w1, 51);
+ subl(32) = krll; subr(32) = krlr;
+ subl(33) = krrl; subr(33) = krrr;
+
+ /* absorb kw2 to other subkeys */
+ subl(3) ^= subl(1); subr(3) ^= subr(1);
+ subl(5) ^= subl(1); subr(5) ^= subr(1);
+ subl(7) ^= subl(1); subr(7) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(9);
+ dw = subl(1) & subl(9), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(11) ^= subl(1); subr(11) ^= subr(1);
+ subl(13) ^= subl(1); subr(13) ^= subr(1);
+ subl(15) ^= subl(1); subr(15) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(17);
+ dw = subl(1) & subl(17), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(19) ^= subl(1); subr(19) ^= subr(1);
+ subl(21) ^= subl(1); subr(21) ^= subr(1);
+ subl(23) ^= subl(1); subr(23) ^= subr(1);
+ subl(1) ^= subr(1) & ~subr(25);
+ dw = subl(1) & subl(25), subr(1) ^= CAMELLIA_RL1(dw);
+ subl(27) ^= subl(1); subr(27) ^= subr(1);
+ subl(29) ^= subl(1); subr(29) ^= subr(1);
+ subl(31) ^= subl(1); subr(31) ^= subr(1);
+ subl(32) ^= subl(1); subr(32) ^= subr(1);
+
+ /* absorb kw4 to other subkeys */
+ kw4l = subl(33); kw4r = subr(33);
+ subl(30) ^= kw4l; subr(30) ^= kw4r;
+ subl(28) ^= kw4l; subr(28) ^= kw4r;
+ subl(26) ^= kw4l; subr(26) ^= kw4r;
+ kw4l ^= kw4r & ~subr(24);
+ dw = kw4l & subl(24), kw4r ^= CAMELLIA_RL1(dw);
+ subl(22) ^= kw4l; subr(22) ^= kw4r;
+ subl(20) ^= kw4l; subr(20) ^= kw4r;
+ subl(18) ^= kw4l; subr(18) ^= kw4r;
+ kw4l ^= kw4r & ~subr(16);
+ dw = kw4l & subl(16), kw4r ^= CAMELLIA_RL1(dw);
+ subl(14) ^= kw4l; subr(14) ^= kw4r;
+ subl(12) ^= kw4l; subr(12) ^= kw4r;
+ subl(10) ^= kw4l; subr(10) ^= kw4r;
+ kw4l ^= kw4r & ~subr(8);
+ dw = kw4l & subl(8), kw4r ^= CAMELLIA_RL1(dw);
+ subl(6) ^= kw4l; subr(6) ^= kw4r;
+ subl(4) ^= kw4l; subr(4) ^= kw4r;
+ subl(2) ^= kw4l; subr(2) ^= kw4r;
+ subl(0) ^= kw4l; subr(0) ^= kw4r;
+
+ /* key XOR is end of F-function */
+ CamelliaSubkeyL(0) = subl(0) ^ subl(2);
+ CamelliaSubkeyR(0) = subr(0) ^ subr(2);
+ CamelliaSubkeyL(2) = subl(3);
+ CamelliaSubkeyR(2) = subr(3);
+ CamelliaSubkeyL(3) = subl(2) ^ subl(4);
+ CamelliaSubkeyR(3) = subr(2) ^ subr(4);
+ CamelliaSubkeyL(4) = subl(3) ^ subl(5);
+ CamelliaSubkeyR(4) = subr(3) ^ subr(5);
+ CamelliaSubkeyL(5) = subl(4) ^ subl(6);
+ CamelliaSubkeyR(5) = subr(4) ^ subr(6);
+ CamelliaSubkeyL(6) = subl(5) ^ subl(7);
+ CamelliaSubkeyR(6) = subr(5) ^ subr(7);
+ tl = subl(10) ^ (subr(10) & ~subr(8));
+ dw = tl & subl(8), tr = subr(10) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(7) = subl(6) ^ tl;
+ CamelliaSubkeyR(7) = subr(6) ^ tr;
+ CamelliaSubkeyL(8) = subl(8);
+ CamelliaSubkeyR(8) = subr(8);
+ CamelliaSubkeyL(9) = subl(9);
+ CamelliaSubkeyR(9) = subr(9);
+ tl = subl(7) ^ (subr(7) & ~subr(9));
+ dw = tl & subl(9), tr = subr(7) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(10) = tl ^ subl(11);
+ CamelliaSubkeyR(10) = tr ^ subr(11);
+ CamelliaSubkeyL(11) = subl(10) ^ subl(12);
+ CamelliaSubkeyR(11) = subr(10) ^ subr(12);
+ CamelliaSubkeyL(12) = subl(11) ^ subl(13);
+ CamelliaSubkeyR(12) = subr(11) ^ subr(13);
+ CamelliaSubkeyL(13) = subl(12) ^ subl(14);
+ CamelliaSubkeyR(13) = subr(12) ^ subr(14);
+ CamelliaSubkeyL(14) = subl(13) ^ subl(15);
+ CamelliaSubkeyR(14) = subr(13) ^ subr(15);
+ tl = subl(18) ^ (subr(18) & ~subr(16));
+ dw = tl & subl(16), tr = subr(18) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(15) = subl(14) ^ tl;
+ CamelliaSubkeyR(15) = subr(14) ^ tr;
+ CamelliaSubkeyL(16) = subl(16);
+ CamelliaSubkeyR(16) = subr(16);
+ CamelliaSubkeyL(17) = subl(17);
+ CamelliaSubkeyR(17) = subr(17);
+ tl = subl(15) ^ (subr(15) & ~subr(17));
+ dw = tl & subl(17), tr = subr(15) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(18) = tl ^ subl(19);
+ CamelliaSubkeyR(18) = tr ^ subr(19);
+ CamelliaSubkeyL(19) = subl(18) ^ subl(20);
+ CamelliaSubkeyR(19) = subr(18) ^ subr(20);
+ CamelliaSubkeyL(20) = subl(19) ^ subl(21);
+ CamelliaSubkeyR(20) = subr(19) ^ subr(21);
+ CamelliaSubkeyL(21) = subl(20) ^ subl(22);
+ CamelliaSubkeyR(21) = subr(20) ^ subr(22);
+ CamelliaSubkeyL(22) = subl(21) ^ subl(23);
+ CamelliaSubkeyR(22) = subr(21) ^ subr(23);
+ tl = subl(26) ^ (subr(26) & ~subr(24));
+ dw = tl & subl(24), tr = subr(26) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(23) = subl(22) ^ tl;
+ CamelliaSubkeyR(23) = subr(22) ^ tr;
+ CamelliaSubkeyL(24) = subl(24);
+ CamelliaSubkeyR(24) = subr(24);
+ CamelliaSubkeyL(25) = subl(25);
+ CamelliaSubkeyR(25) = subr(25);
+ tl = subl(23) ^ (subr(23) & ~subr(25));
+ dw = tl & subl(25), tr = subr(23) ^ CAMELLIA_RL1(dw);
+ CamelliaSubkeyL(26) = tl ^ subl(27);
+ CamelliaSubkeyR(26) = tr ^ subr(27);
+ CamelliaSubkeyL(27) = subl(26) ^ subl(28);
+ CamelliaSubkeyR(27) = subr(26) ^ subr(28);
+ CamelliaSubkeyL(28) = subl(27) ^ subl(29);
+ CamelliaSubkeyR(28) = subr(27) ^ subr(29);
+ CamelliaSubkeyL(29) = subl(28) ^ subl(30);
+ CamelliaSubkeyR(29) = subr(28) ^ subr(30);
+ CamelliaSubkeyL(30) = subl(29) ^ subl(31);
+ CamelliaSubkeyR(30) = subr(29) ^ subr(31);
+ CamelliaSubkeyL(31) = subl(30);
+ CamelliaSubkeyR(31) = subr(30);
+ CamelliaSubkeyL(32) = subl(32) ^ subl(31);
+ CamelliaSubkeyR(32) = subr(32) ^ subr(31);
+
+ /* apply the inverse of the last half of P-function */
+ dw = CamelliaSubkeyL(2) ^ CamelliaSubkeyR(2), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(2) = CamelliaSubkeyL(2) ^ dw, CamelliaSubkeyL(2) = dw;
+ dw = CamelliaSubkeyL(3) ^ CamelliaSubkeyR(3), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(3) = CamelliaSubkeyL(3) ^ dw, CamelliaSubkeyL(3) = dw;
+ dw = CamelliaSubkeyL(4) ^ CamelliaSubkeyR(4), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(4) = CamelliaSubkeyL(4) ^ dw, CamelliaSubkeyL(4) = dw;
+ dw = CamelliaSubkeyL(5) ^ CamelliaSubkeyR(5), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(5) = CamelliaSubkeyL(5) ^ dw, CamelliaSubkeyL(5) = dw;
+ dw = CamelliaSubkeyL(6) ^ CamelliaSubkeyR(6), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(6) = CamelliaSubkeyL(6) ^ dw, CamelliaSubkeyL(6) = dw;
+ dw = CamelliaSubkeyL(7) ^ CamelliaSubkeyR(7), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(7) = CamelliaSubkeyL(7) ^ dw, CamelliaSubkeyL(7) = dw;
+ dw = CamelliaSubkeyL(10) ^ CamelliaSubkeyR(10), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(10) = CamelliaSubkeyL(10) ^ dw, CamelliaSubkeyL(10) = dw;
+ dw = CamelliaSubkeyL(11) ^ CamelliaSubkeyR(11), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(11) = CamelliaSubkeyL(11) ^ dw, CamelliaSubkeyL(11) = dw;
+ dw = CamelliaSubkeyL(12) ^ CamelliaSubkeyR(12), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(12) = CamelliaSubkeyL(12) ^ dw, CamelliaSubkeyL(12) = dw;
+ dw = CamelliaSubkeyL(13) ^ CamelliaSubkeyR(13), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(13) = CamelliaSubkeyL(13) ^ dw, CamelliaSubkeyL(13) = dw;
+ dw = CamelliaSubkeyL(14) ^ CamelliaSubkeyR(14), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(14) = CamelliaSubkeyL(14) ^ dw, CamelliaSubkeyL(14) = dw;
+ dw = CamelliaSubkeyL(15) ^ CamelliaSubkeyR(15), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(15) = CamelliaSubkeyL(15) ^ dw, CamelliaSubkeyL(15) = dw;
+ dw = CamelliaSubkeyL(18) ^ CamelliaSubkeyR(18), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(18) = CamelliaSubkeyL(18) ^ dw, CamelliaSubkeyL(18) = dw;
+ dw = CamelliaSubkeyL(19) ^ CamelliaSubkeyR(19), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(19) = CamelliaSubkeyL(19) ^ dw, CamelliaSubkeyL(19) = dw;
+ dw = CamelliaSubkeyL(20) ^ CamelliaSubkeyR(20), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(20) = CamelliaSubkeyL(20) ^ dw, CamelliaSubkeyL(20) = dw;
+ dw = CamelliaSubkeyL(21) ^ CamelliaSubkeyR(21), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(21) = CamelliaSubkeyL(21) ^ dw, CamelliaSubkeyL(21) = dw;
+ dw = CamelliaSubkeyL(22) ^ CamelliaSubkeyR(22), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(22) = CamelliaSubkeyL(22) ^ dw, CamelliaSubkeyL(22) = dw;
+ dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
+ dw = CamelliaSubkeyL(26) ^ CamelliaSubkeyR(26), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(26) = CamelliaSubkeyL(26) ^ dw, CamelliaSubkeyL(26) = dw;
+ dw = CamelliaSubkeyL(27) ^ CamelliaSubkeyR(27), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(27) = CamelliaSubkeyL(27) ^ dw, CamelliaSubkeyL(27) = dw;
+ dw = CamelliaSubkeyL(28) ^ CamelliaSubkeyR(28), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(28) = CamelliaSubkeyL(28) ^ dw, CamelliaSubkeyL(28) = dw;
+ dw = CamelliaSubkeyL(29) ^ CamelliaSubkeyR(29), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(29) = CamelliaSubkeyL(29) ^ dw, CamelliaSubkeyL(29) = dw;
+ dw = CamelliaSubkeyL(30) ^ CamelliaSubkeyR(30), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(30) = CamelliaSubkeyL(30) ^ dw, CamelliaSubkeyL(30) = dw;
+ dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw);
+ CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw,CamelliaSubkeyL(31) = dw;
+
+ return;
+}
+
+void camellia_setup192(const unsigned char *key, u32 *subkey)
+{
+ unsigned char kk[32];
+ u32 krll, krlr, krrl,krrr;
+
+ memcpy(kk, key, 24);
+ memcpy((unsigned char *)&krll, key+16,4);
+ memcpy((unsigned char *)&krlr, key+20,4);
+ krrl = ~krll;
+ krrr = ~krlr;
+ memcpy(kk+24, (unsigned char *)&krrl, 4);
+ memcpy(kk+28, (unsigned char *)&krrr, 4);
+ camellia_setup256(kk, subkey);
+ return;
+}
+
+
+/**
+ * Stuff related to camellia encryption/decryption
+ *
+ * "io" must be 4byte aligned and big-endian data.
+ */
+void camellia_encrypt128(const u32 *subkey, u32 *io)
+{
+ u32 il, ir, t0, t1;
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(0);
+ io[1] ^= CamelliaSubkeyR(0);
+ /* main iteration */
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(24);
+ io[3] ^= CamelliaSubkeyR(24);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+void camellia_decrypt128(const u32 *subkey, u32 *io)
+{
+ u32 il,ir,t0,t1; /* temporary valiables */
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(24);
+ io[1] ^= CamelliaSubkeyR(24);
+
+ /* main iteration */
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(0);
+ io[3] ^= CamelliaSubkeyR(0);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+/**
+ * stuff for 192 and 256bit encryption/decryption
+ */
+void camellia_encrypt256(const u32 *subkey, u32 *io)
+{
+ u32 il,ir,t0,t1; /* temporary valiables */
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(0);
+ io[1] ^= CamelliaSubkeyR(0);
+
+ /* main iteration */
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(24),CamelliaSubkeyR(24),
+ CamelliaSubkeyL(25),CamelliaSubkeyR(25),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(26),CamelliaSubkeyR(26),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(27),CamelliaSubkeyR(27),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(28),CamelliaSubkeyR(28),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(29),CamelliaSubkeyR(29),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(30),CamelliaSubkeyR(30),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(31),CamelliaSubkeyR(31),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(32);
+ io[3] ^= CamelliaSubkeyR(32);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+void camellia_decrypt256(const u32 *subkey, u32 *io)
+{
+ u32 il,ir,t0,t1; /* temporary valiables */
+
+ /* pre whitening but absorb kw2*/
+ io[0] ^= CamelliaSubkeyL(32);
+ io[1] ^= CamelliaSubkeyR(32);
+
+ /* main iteration */
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(31),CamelliaSubkeyR(31),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(30),CamelliaSubkeyR(30),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(29),CamelliaSubkeyR(29),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(28),CamelliaSubkeyR(28),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(27),CamelliaSubkeyR(27),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(26),CamelliaSubkeyR(26),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(25),CamelliaSubkeyR(25),
+ CamelliaSubkeyL(24),CamelliaSubkeyR(24),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(23),CamelliaSubkeyR(23),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(22),CamelliaSubkeyR(22),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(21),CamelliaSubkeyR(21),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(20),CamelliaSubkeyR(20),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(19),CamelliaSubkeyR(19),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(18),CamelliaSubkeyR(18),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(17),CamelliaSubkeyR(17),
+ CamelliaSubkeyL(16),CamelliaSubkeyR(16),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(15),CamelliaSubkeyR(15),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(14),CamelliaSubkeyR(14),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(13),CamelliaSubkeyR(13),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(12),CamelliaSubkeyR(12),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(11),CamelliaSubkeyR(11),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(10),CamelliaSubkeyR(10),
+ io[0],io[1],il,ir,t0,t1);
+
+ CAMELLIA_FLS(io[0],io[1],io[2],io[3],
+ CamelliaSubkeyL(9),CamelliaSubkeyR(9),
+ CamelliaSubkeyL(8),CamelliaSubkeyR(8),
+ t0,t1,il,ir);
+
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(7),CamelliaSubkeyR(7),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(6),CamelliaSubkeyR(6),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(5),CamelliaSubkeyR(5),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(4),CamelliaSubkeyR(4),
+ io[0],io[1],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[0],io[1],
+ CamelliaSubkeyL(3),CamelliaSubkeyR(3),
+ io[2],io[3],il,ir,t0,t1);
+ CAMELLIA_ROUNDSM(io[2],io[3],
+ CamelliaSubkeyL(2),CamelliaSubkeyR(2),
+ io[0],io[1],il,ir,t0,t1);
+
+ /* post whitening but kw4 */
+ io[2] ^= CamelliaSubkeyL(0);
+ io[3] ^= CamelliaSubkeyR(0);
+
+ t0 = io[0];
+ t1 = io[1];
+ io[0] = io[2];
+ io[1] = io[3];
+ io[2] = t0;
+ io[3] = t1;
+
+ return;
+}
+
+/***
+ *
+ * API for compatibility
+ */
+
+void Camellia_Ekeygen(const int keyBitLength,
+ const unsigned char *rawKey,
+ KEY_TABLE_TYPE keyTable)
+{
+ switch(keyBitLength) {
+ case 128:
+ camellia_setup128(rawKey, keyTable);
+ break;
+ case 192:
+ camellia_setup192(rawKey, keyTable);
+ break;
+ case 256:
+ camellia_setup256(rawKey, keyTable);
+ break;
+ default:
+ break;
+ }
+}
+
+
+void Camellia_EncryptBlock(const int keyBitLength,
+ const unsigned char *plaintext,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *ciphertext)
+{
+ u32 tmp[4];
+
+ tmp[0] = GETU32(plaintext);
+ tmp[1] = GETU32(plaintext + 4);
+ tmp[2] = GETU32(plaintext + 8);
+ tmp[3] = GETU32(plaintext + 12);
+
+ switch (keyBitLength) {
+ case 128:
+ camellia_encrypt128(keyTable, tmp);
+ break;
+ case 192:
+ /* fall through */
+ case 256:
+ camellia_encrypt256(keyTable, tmp);
+ break;
+ default:
+ break;
+ }
+
+ PUTU32(ciphertext, tmp[0]);
+ PUTU32(ciphertext + 4, tmp[1]);
+ PUTU32(ciphertext + 8, tmp[2]);
+ PUTU32(ciphertext + 12, tmp[3]);
+}
+
+void Camellia_DecryptBlock(const int keyBitLength,
+ const unsigned char *ciphertext,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *plaintext)
+{
+ u32 tmp[4];
+
+ tmp[0] = GETU32(ciphertext);
+ tmp[1] = GETU32(ciphertext + 4);
+ tmp[2] = GETU32(ciphertext + 8);
+ tmp[3] = GETU32(ciphertext + 12);
+
+ switch (keyBitLength) {
+ case 128:
+ camellia_decrypt128(keyTable, tmp);
+ break;
+ case 192:
+ /* fall through */
+ case 256:
+ camellia_decrypt256(keyTable, tmp);
+ break;
+ default:
+ break;
+ }
+ PUTU32(plaintext, tmp[0]);
+ PUTU32(plaintext + 4, tmp[1]);
+ PUTU32(plaintext + 8, tmp[2]);
+ PUTU32(plaintext + 12, tmp[3]);
+}
diff --git a/grub-core/lib/libgcrypt/cipher/camellia.h b/grub-core/lib/libgcrypt/cipher/camellia.h
new file mode 100644
index 0000000..4425a3a
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/camellia.h
@@ -0,0 +1,81 @@
+/* camellia.h ver 1.2.0
+ *
+ * Copyright (C) 2006,2007
+ * NTT (Nippon Telegraph and Telephone Corporation).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef HEADER_CAMELLIA_H
+#define HEADER_CAMELLIA_H
+
+/* To use Camellia with libraries it is often useful to keep the name
+ * space of the library clean. The following macro is thus useful:
+ *
+ * #define CAMELLIA_EXT_SYM_PREFIX foo_
+ *
+ * This prefixes all external symbols with "foo_".
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef CAMELLIA_EXT_SYM_PREFIX
+#define CAMELLIA_PREFIX1(x,y) x ## y
+#define CAMELLIA_PREFIX2(x,y) CAMELLIA_PREFIX1(x,y)
+#define CAMELLIA_PREFIX(x) CAMELLIA_PREFIX2(CAMELLIA_EXT_SYM_PREFIX,x)
+#define Camellia_Ekeygen CAMELLIA_PREFIX(Camellia_Ekeygen)
+#define Camellia_EncryptBlock CAMELLIA_PREFIX(Camellia_EncryptBlock)
+#define Camellia_DecryptBlock CAMELLIA_PREFIX(Camellia_DecryptBlock)
+#define camellia_decrypt128 CAMELLIA_PREFIX(camellia_decrypt128)
+#define camellia_decrypt256 CAMELLIA_PREFIX(camellia_decrypt256)
+#define camellia_encrypt128 CAMELLIA_PREFIX(camellia_encrypt128)
+#define camellia_encrypt256 CAMELLIA_PREFIX(camellia_encrypt256)
+#define camellia_setup128 CAMELLIA_PREFIX(camellia_setup128)
+#define camellia_setup192 CAMELLIA_PREFIX(camellia_setup192)
+#define camellia_setup256 CAMELLIA_PREFIX(camellia_setup256)
+#endif /*CAMELLIA_EXT_SYM_PREFIX*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CAMELLIA_BLOCK_SIZE 16
+#define CAMELLIA_TABLE_BYTE_LEN 272
+#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
+
+typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN];
+
+
+void Camellia_Ekeygen(const int keyBitLength,
+ const unsigned char *rawKey,
+ KEY_TABLE_TYPE keyTable);
+
+void Camellia_EncryptBlock(const int keyBitLength,
+ const unsigned char *plaintext,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *cipherText);
+
+void Camellia_DecryptBlock(const int keyBitLength,
+ const unsigned char *cipherText,
+ const KEY_TABLE_TYPE keyTable,
+ unsigned char *plaintext);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* HEADER_CAMELLIA_H */
diff --git a/grub-core/lib/libgcrypt/cipher/cast5.c b/grub-core/lib/libgcrypt/cipher/cast5.c
new file mode 100644
index 0000000..333d55e
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/cast5.c
@@ -0,0 +1,620 @@
+/* cast5.c - CAST5 cipher (RFC2144)
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+/* Test vectors:
+ *
+ * 128-bit key = 01 23 45 67 12 34 56 78 23 45 67 89 34 56 78 9A
+ * plaintext = 01 23 45 67 89 AB CD EF
+ * ciphertext = 23 8B 4F E5 84 7E 44 B2
+ *
+ * 80-bit key = 01 23 45 67 12 34 56 78 23 45
+ * = 01 23 45 67 12 34 56 78 23 45 00 00 00 00 00 00
+ * plaintext = 01 23 45 67 89 AB CD EF
+ * ciphertext = EB 6A 71 1A 2C 02 27 1B
+ *
+ * 40-bit key = 01 23 45 67 12
+ * = 01 23 45 67 12 00 00 00 00 00 00 00 00 00 00 00
+ * plaintext = 01 23 45 67 89 AB CD EF
+ * ciphertext = 7A C8 16 D1 6E 9B 30 2E
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "g10lib.h"
+#include "types.h"
+#include "cipher.h"
+
+#define CAST5_BLOCKSIZE 8
+
+typedef struct {
+ u32 Km[16];
+ byte Kr[16];
+} CAST5_context;
+
+static gcry_err_code_t cast_setkey (void *c, const byte *key, unsigned keylen);
+static void encrypt_block (void *c, byte *outbuf, const byte *inbuf);
+static void decrypt_block (void *c, byte *outbuf, const byte *inbuf);
+
+
+
+
+static const u32 s1[256] = {
+0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949,
+0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e,
+0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d,
+0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0,
+0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7,
+0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935,
+0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d,
+0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50,
+0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe,
+0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3,
+0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167,
+0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291,
+0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779,
+0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2,
+0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511,
+0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d,
+0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5,
+0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324,
+0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c,
+0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc,
+0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d,
+0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96,
+0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a,
+0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d,
+0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd,
+0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6,
+0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9,
+0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872,
+0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c,
+0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e,
+0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9,
+0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf
+};
+static const u32 s2[256] = {
+0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651,
+0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3,
+0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb,
+0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806,
+0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b,
+0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359,
+0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b,
+0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c,
+0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34,
+0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb,
+0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd,
+0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860,
+0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b,
+0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304,
+0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b,
+0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf,
+0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c,
+0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13,
+0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f,
+0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6,
+0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6,
+0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58,
+0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906,
+0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d,
+0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6,
+0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4,
+0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6,
+0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f,
+0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249,
+0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa,
+0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9,
+0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1
+};
+static const u32 s3[256] = {
+0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90,
+0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5,
+0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e,
+0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240,
+0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5,
+0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b,
+0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71,
+0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04,
+0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82,
+0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15,
+0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2,
+0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176,
+0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148,
+0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc,
+0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341,
+0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e,
+0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51,
+0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f,
+0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a,
+0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b,
+0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b,
+0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5,
+0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45,
+0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536,
+0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc,
+0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0,
+0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69,
+0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2,
+0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49,
+0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d,
+0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a,
+0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783
+};
+static const u32 s4[256] = {
+0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1,
+0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf,
+0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15,
+0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121,
+0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25,
+0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5,
+0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb,
+0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5,
+0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d,
+0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6,
+0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23,
+0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003,
+0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6,
+0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119,
+0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24,
+0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a,
+0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79,
+0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df,
+0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26,
+0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab,
+0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7,
+0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417,
+0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2,
+0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2,
+0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a,
+0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919,
+0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef,
+0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876,
+0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab,
+0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04,
+0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282,
+0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2
+};
+static const u32 s5[256] = {
+0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f,
+0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a,
+0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff,
+0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02,
+0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a,
+0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7,
+0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9,
+0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981,
+0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774,
+0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655,
+0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2,
+0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910,
+0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1,
+0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da,
+0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049,
+0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f,
+0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba,
+0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be,
+0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3,
+0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840,
+0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4,
+0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2,
+0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7,
+0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5,
+0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e,
+0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e,
+0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801,
+0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad,
+0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0,
+0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20,
+0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8,
+0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4
+};
+static const u32 s6[256] = {
+0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac,
+0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138,
+0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367,
+0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98,
+0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072,
+0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3,
+0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd,
+0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8,
+0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9,
+0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54,
+0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387,
+0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc,
+0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf,
+0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf,
+0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f,
+0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289,
+0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950,
+0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f,
+0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b,
+0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be,
+0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13,
+0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976,
+0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0,
+0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891,
+0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da,
+0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc,
+0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084,
+0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25,
+0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121,
+0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5,
+0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd,
+0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f
+};
+static const u32 s7[256] = {
+0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f,
+0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de,
+0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43,
+0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19,
+0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2,
+0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516,
+0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88,
+0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816,
+0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756,
+0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a,
+0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264,
+0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688,
+0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28,
+0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3,
+0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7,
+0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06,
+0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033,
+0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a,
+0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566,
+0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509,
+0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962,
+0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e,
+0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c,
+0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c,
+0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285,
+0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301,
+0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be,
+0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767,
+0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647,
+0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914,
+0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c,
+0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3
+};
+static const u32 s8[256] = {
+0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5,
+0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc,
+0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd,
+0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d,
+0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2,
+0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862,
+0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc,
+0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c,
+0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e,
+0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039,
+0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8,
+0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42,
+0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5,
+0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472,
+0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225,
+0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c,
+0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb,
+0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054,
+0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70,
+0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc,
+0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c,
+0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3,
+0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4,
+0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101,
+0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f,
+0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e,
+0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a,
+0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c,
+0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384,
+0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c,
+0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82,
+0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e
+};
+
+
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+rol(int n, u32 x)
+{
+ __asm__("roll %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+#define rol(n,x) ( ((x) << (n)) | ((x) >> (32-(n))) )
+#endif
+
+#define F1(D,m,r) ( (I = ((m) + (D))), (I=rol((r),I)), \
+ (((s1[I >> 24] ^ s2[(I>>16)&0xff]) - s3[(I>>8)&0xff]) + s4[I&0xff]) )
+#define F2(D,m,r) ( (I = ((m) ^ (D))), (I=rol((r),I)), \
+ (((s1[I >> 24] - s2[(I>>16)&0xff]) + s3[(I>>8)&0xff]) ^ s4[I&0xff]) )
+#define F3(D,m,r) ( (I = ((m) - (D))), (I=rol((r),I)), \
+ (((s1[I >> 24] + s2[(I>>16)&0xff]) ^ s3[(I>>8)&0xff]) - s4[I&0xff]) )
+
+static void
+do_encrypt_block( CAST5_context *c, byte *outbuf, const byte *inbuf )
+{
+ u32 l, r, t;
+ u32 I; /* used by the Fx macros */
+ u32 *Km;
+ byte *Kr;
+
+ Km = c->Km;
+ Kr = c->Kr;
+
+ /* (L0,R0) <-- (m1...m64). (Split the plaintext into left and
+ * right 32-bit halves L0 = m1...m32 and R0 = m33...m64.)
+ */
+ l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+
+ /* (16 rounds) for i from 1 to 16, compute Li and Ri as follows:
+ * Li = Ri-1;
+ * Ri = Li-1 ^ f(Ri-1,Kmi,Kri), where f is defined in Section 2.2
+ * Rounds 1, 4, 7, 10, 13, and 16 use f function Type 1.
+ * Rounds 2, 5, 8, 11, and 14 use f function Type 2.
+ * Rounds 3, 6, 9, 12, and 15 use f function Type 3.
+ */
+
+ t = l; l = r; r = t ^ F1(r, Km[ 0], Kr[ 0]);
+ t = l; l = r; r = t ^ F2(r, Km[ 1], Kr[ 1]);
+ t = l; l = r; r = t ^ F3(r, Km[ 2], Kr[ 2]);
+ t = l; l = r; r = t ^ F1(r, Km[ 3], Kr[ 3]);
+ t = l; l = r; r = t ^ F2(r, Km[ 4], Kr[ 4]);
+ t = l; l = r; r = t ^ F3(r, Km[ 5], Kr[ 5]);
+ t = l; l = r; r = t ^ F1(r, Km[ 6], Kr[ 6]);
+ t = l; l = r; r = t ^ F2(r, Km[ 7], Kr[ 7]);
+ t = l; l = r; r = t ^ F3(r, Km[ 8], Kr[ 8]);
+ t = l; l = r; r = t ^ F1(r, Km[ 9], Kr[ 9]);
+ t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]);
+ t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]);
+ t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]);
+ t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]);
+ t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]);
+ t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]);
+
+ /* c1...c64 <-- (R16,L16). (Exchange final blocks L16, R16 and
+ * concatenate to form the ciphertext.) */
+ outbuf[0] = (r >> 24) & 0xff;
+ outbuf[1] = (r >> 16) & 0xff;
+ outbuf[2] = (r >> 8) & 0xff;
+ outbuf[3] = r & 0xff;
+ outbuf[4] = (l >> 24) & 0xff;
+ outbuf[5] = (l >> 16) & 0xff;
+ outbuf[6] = (l >> 8) & 0xff;
+ outbuf[7] = l & 0xff;
+}
+
+static void
+encrypt_block (void *context , byte *outbuf, const byte *inbuf)
+{
+ CAST5_context *c = (CAST5_context *) context;
+ do_encrypt_block (c, outbuf, inbuf);
+ _gcry_burn_stack (20+4*sizeof(void*));
+}
+
+
+static void
+do_decrypt_block (CAST5_context *c, byte *outbuf, const byte *inbuf )
+{
+ u32 l, r, t;
+ u32 I;
+ u32 *Km;
+ byte *Kr;
+
+ Km = c->Km;
+ Kr = c->Kr;
+
+ l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
+ r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+
+ t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]);
+ t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]);
+ t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]);
+ t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]);
+ t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]);
+ t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]);
+ t = l; l = r; r = t ^ F1(r, Km[ 9], Kr[ 9]);
+ t = l; l = r; r = t ^ F3(r, Km[ 8], Kr[ 8]);
+ t = l; l = r; r = t ^ F2(r, Km[ 7], Kr[ 7]);
+ t = l; l = r; r = t ^ F1(r, Km[ 6], Kr[ 6]);
+ t = l; l = r; r = t ^ F3(r, Km[ 5], Kr[ 5]);
+ t = l; l = r; r = t ^ F2(r, Km[ 4], Kr[ 4]);
+ t = l; l = r; r = t ^ F1(r, Km[ 3], Kr[ 3]);
+ t = l; l = r; r = t ^ F3(r, Km[ 2], Kr[ 2]);
+ t = l; l = r; r = t ^ F2(r, Km[ 1], Kr[ 1]);
+ t = l; l = r; r = t ^ F1(r, Km[ 0], Kr[ 0]);
+
+ outbuf[0] = (r >> 24) & 0xff;
+ outbuf[1] = (r >> 16) & 0xff;
+ outbuf[2] = (r >> 8) & 0xff;
+ outbuf[3] = r & 0xff;
+ outbuf[4] = (l >> 24) & 0xff;
+ outbuf[5] = (l >> 16) & 0xff;
+ outbuf[6] = (l >> 8) & 0xff;
+ outbuf[7] = l & 0xff;
+}
+
+static void
+decrypt_block (void *context, byte *outbuf, const byte *inbuf)
+{
+ CAST5_context *c = (CAST5_context *) context;
+ do_decrypt_block (c, outbuf, inbuf);
+ _gcry_burn_stack (20+4*sizeof(void*));
+}
+
+
+static const char*
+selftest(void)
+{
+ CAST5_context c;
+ byte key[16] = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
+ 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A };
+ byte plain[8] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF };
+ byte cipher[8]= { 0x23, 0x8B, 0x4F, 0xE5, 0x84, 0x7E, 0x44, 0xB2 };
+ byte buffer[8];
+
+ cast_setkey( &c, key, 16 );
+ encrypt_block( &c, buffer, plain );
+ if( memcmp( buffer, cipher, 8 ) )
+ return "1";
+ decrypt_block( &c, buffer, buffer );
+ if( memcmp( buffer, plain, 8 ) )
+ return "2";
+
+#if 0 /* full maintenance test */
+ {
+ int i;
+ byte a0[16] = { 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78,
+ 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A };
+ byte b0[16] = { 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78,
+ 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A };
+ byte a1[16] = { 0xEE,0xA9,0xD0,0xA2,0x49,0xFD,0x3B,0xA6,
+ 0xB3,0x43,0x6F,0xB8,0x9D,0x6D,0xCA,0x92 };
+ byte b1[16] = { 0xB2,0xC9,0x5E,0xB0,0x0C,0x31,0xAD,0x71,
+ 0x80,0xAC,0x05,0xB8,0xE8,0x3D,0x69,0x6E };
+
+ for(i=0; i < 1000000; i++ ) {
+ cast_setkey( &c, b0, 16 );
+ encrypt_block( &c, a0, a0 );
+ encrypt_block( &c, a0+8, a0+8 );
+ cast_setkey( &c, a0, 16 );
+ encrypt_block( &c, b0, b0 );
+ encrypt_block( &c, b0+8, b0+8 );
+ }
+ if( memcmp( a0, a1, 16 ) || memcmp( b0, b1, 16 ) )
+ return "3";
+
+ }
+#endif
+ return NULL;
+}
+
+
+static void
+key_schedule( u32 *x, u32 *z, u32 *k )
+{
+
+#define xi(i) ((x[(i)/4] >> (8*(3-((i)%4)))) & 0xff)
+#define zi(i) ((z[(i)/4] >> (8*(3-((i)%4)))) & 0xff)
+
+ z[0] = x[0] ^ s5[xi(13)]^s6[xi(15)]^s7[xi(12)]^s8[xi(14)]^s7[xi( 8)];
+ z[1] = x[2] ^ s5[zi( 0)]^s6[zi( 2)]^s7[zi( 1)]^s8[zi( 3)]^s8[xi(10)];
+ z[2] = x[3] ^ s5[zi( 7)]^s6[zi( 6)]^s7[zi( 5)]^s8[zi( 4)]^s5[xi( 9)];
+ z[3] = x[1] ^ s5[zi(10)]^s6[zi( 9)]^s7[zi(11)]^s8[zi( 8)]^s6[xi(11)];
+ k[0] = s5[zi( 8)]^s6[zi( 9)]^s7[zi( 7)]^s8[zi( 6)]^s5[zi( 2)];
+ k[1] = s5[zi(10)]^s6[zi(11)]^s7[zi( 5)]^s8[zi( 4)]^s6[zi( 6)];
+ k[2] = s5[zi(12)]^s6[zi(13)]^s7[zi( 3)]^s8[zi( 2)]^s7[zi( 9)];
+ k[3] = s5[zi(14)]^s6[zi(15)]^s7[zi( 1)]^s8[zi( 0)]^s8[zi(12)];
+
+ x[0] = z[2] ^ s5[zi( 5)]^s6[zi( 7)]^s7[zi( 4)]^s8[zi( 6)]^s7[zi( 0)];
+ x[1] = z[0] ^ s5[xi( 0)]^s6[xi( 2)]^s7[xi( 1)]^s8[xi( 3)]^s8[zi( 2)];
+ x[2] = z[1] ^ s5[xi( 7)]^s6[xi( 6)]^s7[xi( 5)]^s8[xi( 4)]^s5[zi( 1)];
+ x[3] = z[3] ^ s5[xi(10)]^s6[xi( 9)]^s7[xi(11)]^s8[xi( 8)]^s6[zi( 3)];
+ k[4] = s5[xi( 3)]^s6[xi( 2)]^s7[xi(12)]^s8[xi(13)]^s5[xi( 8)];
+ k[5] = s5[xi( 1)]^s6[xi( 0)]^s7[xi(14)]^s8[xi(15)]^s6[xi(13)];
+ k[6] = s5[xi( 7)]^s6[xi( 6)]^s7[xi( 8)]^s8[xi( 9)]^s7[xi( 3)];
+ k[7] = s5[xi( 5)]^s6[xi( 4)]^s7[xi(10)]^s8[xi(11)]^s8[xi( 7)];
+
+ z[0] = x[0] ^ s5[xi(13)]^s6[xi(15)]^s7[xi(12)]^s8[xi(14)]^s7[xi( 8)];
+ z[1] = x[2] ^ s5[zi( 0)]^s6[zi( 2)]^s7[zi( 1)]^s8[zi( 3)]^s8[xi(10)];
+ z[2] = x[3] ^ s5[zi( 7)]^s6[zi( 6)]^s7[zi( 5)]^s8[zi( 4)]^s5[xi( 9)];
+ z[3] = x[1] ^ s5[zi(10)]^s6[zi( 9)]^s7[zi(11)]^s8[zi( 8)]^s6[xi(11)];
+ k[8] = s5[zi( 3)]^s6[zi( 2)]^s7[zi(12)]^s8[zi(13)]^s5[zi( 9)];
+ k[9] = s5[zi( 1)]^s6[zi( 0)]^s7[zi(14)]^s8[zi(15)]^s6[zi(12)];
+ k[10]= s5[zi( 7)]^s6[zi( 6)]^s7[zi( 8)]^s8[zi( 9)]^s7[zi( 2)];
+ k[11]= s5[zi( 5)]^s6[zi( 4)]^s7[zi(10)]^s8[zi(11)]^s8[zi( 6)];
+
+ x[0] = z[2] ^ s5[zi( 5)]^s6[zi( 7)]^s7[zi( 4)]^s8[zi( 6)]^s7[zi( 0)];
+ x[1] = z[0] ^ s5[xi( 0)]^s6[xi( 2)]^s7[xi( 1)]^s8[xi( 3)]^s8[zi( 2)];
+ x[2] = z[1] ^ s5[xi( 7)]^s6[xi( 6)]^s7[xi( 5)]^s8[xi( 4)]^s5[zi( 1)];
+ x[3] = z[3] ^ s5[xi(10)]^s6[xi( 9)]^s7[xi(11)]^s8[xi( 8)]^s6[zi( 3)];
+ k[12]= s5[xi( 8)]^s6[xi( 9)]^s7[xi( 7)]^s8[xi( 6)]^s5[xi( 3)];
+ k[13]= s5[xi(10)]^s6[xi(11)]^s7[xi( 5)]^s8[xi( 4)]^s6[xi( 7)];
+ k[14]= s5[xi(12)]^s6[xi(13)]^s7[xi( 3)]^s8[xi( 2)]^s7[xi( 8)];
+ k[15]= s5[xi(14)]^s6[xi(15)]^s7[xi( 1)]^s8[xi( 0)]^s8[xi(13)];
+
+#undef xi
+#undef zi
+}
+
+
+static gcry_err_code_t
+do_cast_setkey( CAST5_context *c, const byte *key, unsigned keylen )
+{
+ static int initialized;
+ static const char* selftest_failed;
+ int i;
+ u32 x[4];
+ u32 z[4];
+ u32 k[16];
+
+ if( !initialized )
+ {
+ initialized = 1;
+ selftest_failed = selftest();
+ if( selftest_failed )
+ log_error ("CAST5 selftest failed (%s).\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if( keylen != 16 )
+ return GPG_ERR_INV_KEYLEN;
+
+ x[0] = key[0] << 24 | key[1] << 16 | key[2] << 8 | key[3];
+ x[1] = key[4] << 24 | key[5] << 16 | key[6] << 8 | key[7];
+ x[2] = key[8] << 24 | key[9] << 16 | key[10] << 8 | key[11];
+ x[3] = key[12] << 24 | key[13] << 16 | key[14] << 8 | key[15];
+
+ key_schedule( x, z, k );
+ for(i=0; i < 16; i++ )
+ c->Km[i] = k[i];
+ key_schedule( x, z, k );
+ for(i=0; i < 16; i++ )
+ c->Kr[i] = k[i] & 0x1f;
+
+ memset(&x,0, sizeof x);
+ memset(&z,0, sizeof z);
+ memset(&k,0, sizeof k);
+
+#undef xi
+#undef zi
+ return GPG_ERR_NO_ERROR;
+}
+
+static gcry_err_code_t
+cast_setkey (void *context, const byte *key, unsigned keylen )
+{
+ CAST5_context *c = (CAST5_context *) context;
+ gcry_err_code_t rc = do_cast_setkey (c, key, keylen);
+ _gcry_burn_stack (96+7*sizeof(void*));
+ return rc;
+}
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_cast5 =
+ {
+ "CAST5", NULL, NULL, CAST5_BLOCKSIZE, 128, sizeof (CAST5_context),
+ cast_setkey, encrypt_block, decrypt_block
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/cipher.c b/grub-core/lib/libgcrypt/cipher/cipher.c
new file mode 100644
index 0000000..2c33ee9
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/cipher.c
@@ -0,0 +1,1932 @@
+/* cipher.c - cipher dispatcher
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ * 2005, 2007, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "g10lib.h"
+#include "cipher.h"
+#include "ath.h"
+
+#define MAX_BLOCKSIZE 16
+#define TABLE_SIZE 14
+#define CTX_MAGIC_NORMAL 0x24091964
+#define CTX_MAGIC_SECURE 0x46919042
+
+#undef NEED_16BYTE_ALIGNED_CONTEXT
+#if defined (__i386__) && SIZEOF_UNSIGNED_LONG == 4 && defined (__GNUC__)
+#define NEED_16BYTE_ALIGNED_CONTEXT 1
+#endif
+
+/* A dummy extraspec so that we do not need to tests the extraspec
+ field from the module specification against NULL and instead
+ directly test the respective fields of extraspecs. */
+static cipher_extra_spec_t dummy_extra_spec;
+
+/* This is the list of the default ciphers, which are included in
+ libgcrypt. */
+static struct cipher_table_entry
+{
+ gcry_cipher_spec_t *cipher;
+ cipher_extra_spec_t *extraspec;
+ unsigned int algorithm;
+ int fips_allowed;
+} cipher_table[] =
+ {
+#if USE_BLOWFISH
+ { &_gcry_cipher_spec_blowfish,
+ &dummy_extra_spec, GCRY_CIPHER_BLOWFISH },
+#endif
+#if USE_DES
+ { &_gcry_cipher_spec_des,
+ &dummy_extra_spec, GCRY_CIPHER_DES },
+ { &_gcry_cipher_spec_tripledes,
+ &_gcry_cipher_extraspec_tripledes, GCRY_CIPHER_3DES, 1 },
+#endif
+#if USE_ARCFOUR
+ { &_gcry_cipher_spec_arcfour,
+ &dummy_extra_spec, GCRY_CIPHER_ARCFOUR },
+#endif
+#if USE_CAST5
+ { &_gcry_cipher_spec_cast5,
+ &dummy_extra_spec, GCRY_CIPHER_CAST5 },
+#endif
+#if USE_AES
+ { &_gcry_cipher_spec_aes,
+ &_gcry_cipher_extraspec_aes, GCRY_CIPHER_AES, 1 },
+ { &_gcry_cipher_spec_aes192,
+ &_gcry_cipher_extraspec_aes192, GCRY_CIPHER_AES192, 1 },
+ { &_gcry_cipher_spec_aes256,
+ &_gcry_cipher_extraspec_aes256, GCRY_CIPHER_AES256, 1 },
+#endif
+#if USE_TWOFISH
+ { &_gcry_cipher_spec_twofish,
+ &dummy_extra_spec, GCRY_CIPHER_TWOFISH },
+ { &_gcry_cipher_spec_twofish128,
+ &dummy_extra_spec, GCRY_CIPHER_TWOFISH128 },
+#endif
+#if USE_SERPENT
+ { &_gcry_cipher_spec_serpent128,
+ &dummy_extra_spec, GCRY_CIPHER_SERPENT128 },
+ { &_gcry_cipher_spec_serpent192,
+ &dummy_extra_spec, GCRY_CIPHER_SERPENT192 },
+ { &_gcry_cipher_spec_serpent256,
+ &dummy_extra_spec, GCRY_CIPHER_SERPENT256 },
+#endif
+#if USE_RFC2268
+ { &_gcry_cipher_spec_rfc2268_40,
+ &dummy_extra_spec, GCRY_CIPHER_RFC2268_40 },
+#endif
+#if USE_SEED
+ { &_gcry_cipher_spec_seed,
+ &dummy_extra_spec, GCRY_CIPHER_SEED },
+#endif
+#if USE_CAMELLIA
+ { &_gcry_cipher_spec_camellia128,
+ &dummy_extra_spec, GCRY_CIPHER_CAMELLIA128 },
+ { &_gcry_cipher_spec_camellia192,
+ &dummy_extra_spec, GCRY_CIPHER_CAMELLIA192 },
+ { &_gcry_cipher_spec_camellia256,
+ &dummy_extra_spec, GCRY_CIPHER_CAMELLIA256 },
+#endif
+ { NULL }
+ };
+
+/* List of registered ciphers. */
+static gcry_module_t ciphers_registered;
+
+/* This is the lock protecting CIPHERS_REGISTERED. */
+static ath_mutex_t ciphers_registered_lock = ATH_MUTEX_INITIALIZER;
+
+/* Flag to check wether the default ciphers have already been
+ registered. */
+static int default_ciphers_registered;
+
+/* Convenient macro for registering the default ciphers. */
+#define REGISTER_DEFAULT_CIPHERS \
+ do \
+ { \
+ ath_mutex_lock (&ciphers_registered_lock); \
+ if (! default_ciphers_registered) \
+ { \
+ cipher_register_default (); \
+ default_ciphers_registered = 1; \
+ } \
+ ath_mutex_unlock (&ciphers_registered_lock); \
+ } \
+ while (0)
+
+
+/* A VIA processor with the Padlock engine requires an alignment of
+ most data on a 16 byte boundary. Because we trick out the compiler
+ while allocating the context, the align attribute as used in
+ rijndael.c does not work on its own. Thus we need to make sure
+ that the entire context structure is a aligned on that boundary.
+ We achieve this by defining a new type and use that instead of our
+ usual alignment type. */
+typedef union
+{
+ PROPERLY_ALIGNED_TYPE foo;
+#ifdef NEED_16BYTE_ALIGNED_CONTEXT
+ char bar[16] __attribute__ ((aligned (16)));
+#endif
+ char c[1];
+} cipher_context_alignment_t;
+
+
+/* The handle structure. */
+struct gcry_cipher_handle
+{
+ int magic;
+ size_t actual_handle_size; /* Allocated size of this handle. */
+ size_t handle_offset; /* Offset to the malloced block. */
+ gcry_cipher_spec_t *cipher;
+ cipher_extra_spec_t *extraspec;
+ gcry_module_t module;
+
+ /* The algorithm id. This is a hack required because the module
+ interface does not easily allow to retrieve this value. */
+ int algo;
+
+ /* A structure with function pointers for bulk operations. Due to
+ limitations of the module system (we don't want to change the
+ API) we need to keep these function pointers here. The cipher
+ open function intializes them and the actual encryption routines
+ use them if they are not NULL. */
+ struct {
+ void (*cfb_enc)(void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks);
+ void (*cfb_dec)(void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks);
+ void (*cbc_enc)(void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks, int cbc_mac);
+ void (*cbc_dec)(void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks);
+ } bulk;
+
+
+ int mode;
+ unsigned int flags;
+
+ /* The initialization vector. To help code optimization we make
+ sure that it is aligned on an unsigned long and u32 boundary. */
+ union {
+ unsigned long dummy_iv;
+ u32 dummy_u32_iv;
+ unsigned char iv[MAX_BLOCKSIZE];
+ } u_iv;
+
+ unsigned char lastiv[MAX_BLOCKSIZE];
+ int unused; /* Number of unused bytes in the IV. */
+
+ unsigned char ctr[MAX_BLOCKSIZE]; /* For Counter (CTR) mode. */
+
+
+ /* What follows are two contexts of the cipher in use. The first
+ one needs to be aligned well enough for the cipher operation
+ whereas the second one is a copy created by cipher_setkey and
+ used by cipher_reset. That second copy has no need for proper
+ aligment because it is only accessed by memcpy. */
+ cipher_context_alignment_t context;
+};
+
+
+
+/* These dummy functions are used in case a cipher implementation
+ refuses to provide it's own functions. */
+
+static gcry_err_code_t
+dummy_setkey (void *c, const unsigned char *key, unsigned int keylen)
+{
+ (void)c;
+ (void)key;
+ (void)keylen;
+ return GPG_ERR_NO_ERROR;
+}
+
+static void
+dummy_encrypt_block (void *c,
+ unsigned char *outbuf, const unsigned char *inbuf)
+{
+ (void)c;
+ (void)outbuf;
+ (void)inbuf;
+ BUG();
+}
+
+static void
+dummy_decrypt_block (void *c,
+ unsigned char *outbuf, const unsigned char *inbuf)
+{
+ (void)c;
+ (void)outbuf;
+ (void)inbuf;
+ BUG();
+}
+
+static void
+dummy_encrypt_stream (void *c,
+ unsigned char *outbuf, const unsigned char *inbuf,
+ unsigned int n)
+{
+ (void)c;
+ (void)outbuf;
+ (void)inbuf;
+ (void)n;
+ BUG();
+}
+
+static void
+dummy_decrypt_stream (void *c,
+ unsigned char *outbuf, const unsigned char *inbuf,
+ unsigned int n)
+{
+ (void)c;
+ (void)outbuf;
+ (void)inbuf;
+ (void)n;
+ BUG();
+}
+
+
+/* Internal function. Register all the ciphers included in
+ CIPHER_TABLE. Note, that this function gets only used by the macro
+ REGISTER_DEFAULT_CIPHERS which protects it using a mutex. */
+static void
+cipher_register_default (void)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ int i;
+
+ for (i = 0; !err && cipher_table[i].cipher; i++)
+ {
+ if (! cipher_table[i].cipher->setkey)
+ cipher_table[i].cipher->setkey = dummy_setkey;
+ if (! cipher_table[i].cipher->encrypt)
+ cipher_table[i].cipher->encrypt = dummy_encrypt_block;
+ if (! cipher_table[i].cipher->decrypt)
+ cipher_table[i].cipher->decrypt = dummy_decrypt_block;
+ if (! cipher_table[i].cipher->stencrypt)
+ cipher_table[i].cipher->stencrypt = dummy_encrypt_stream;
+ if (! cipher_table[i].cipher->stdecrypt)
+ cipher_table[i].cipher->stdecrypt = dummy_decrypt_stream;
+
+ if ( fips_mode () && !cipher_table[i].fips_allowed )
+ continue;
+
+ err = _gcry_module_add (&ciphers_registered,
+ cipher_table[i].algorithm,
+ (void *) cipher_table[i].cipher,
+ (void *) cipher_table[i].extraspec,
+ NULL);
+ }
+
+ if (err)
+ BUG ();
+}
+
+/* Internal callback function. Used via _gcry_module_lookup. */
+static int
+gcry_cipher_lookup_func_name (void *spec, void *data)
+{
+ gcry_cipher_spec_t *cipher = (gcry_cipher_spec_t *) spec;
+ char *name = (char *) data;
+ const char **aliases = cipher->aliases;
+ int i, ret = ! stricmp (name, cipher->name);
+
+ if (aliases)
+ for (i = 0; aliases[i] && (! ret); i++)
+ ret = ! stricmp (name, aliases[i]);
+
+ return ret;
+}
+
+/* Internal callback function. Used via _gcry_module_lookup. */
+static int
+gcry_cipher_lookup_func_oid (void *spec, void *data)
+{
+ gcry_cipher_spec_t *cipher = (gcry_cipher_spec_t *) spec;
+ char *oid = (char *) data;
+ gcry_cipher_oid_spec_t *oid_specs = cipher->oids;
+ int ret = 0, i;
+
+ if (oid_specs)
+ for (i = 0; oid_specs[i].oid && (! ret); i++)
+ if (! stricmp (oid, oid_specs[i].oid))
+ ret = 1;
+
+ return ret;
+}
+
+/* Internal function. Lookup a cipher entry by it's name. */
+static gcry_module_t
+gcry_cipher_lookup_name (const char *name)
+{
+ gcry_module_t cipher;
+
+ cipher = _gcry_module_lookup (ciphers_registered, (void *) name,
+ gcry_cipher_lookup_func_name);
+
+ return cipher;
+}
+
+/* Internal function. Lookup a cipher entry by it's oid. */
+static gcry_module_t
+gcry_cipher_lookup_oid (const char *oid)
+{
+ gcry_module_t cipher;
+
+ cipher = _gcry_module_lookup (ciphers_registered, (void *) oid,
+ gcry_cipher_lookup_func_oid);
+
+ return cipher;
+}
+
+/* Register a new cipher module whose specification can be found in
+ CIPHER. On success, a new algorithm ID is stored in ALGORITHM_ID
+ and a pointer representhing this module is stored in MODULE. */
+gcry_error_t
+_gcry_cipher_register (gcry_cipher_spec_t *cipher,
+ cipher_extra_spec_t *extraspec,
+ int *algorithm_id,
+ gcry_module_t *module)
+{
+ gcry_err_code_t err = 0;
+ gcry_module_t mod;
+
+ /* We do not support module loading in fips mode. */
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ err = _gcry_module_add (&ciphers_registered, 0,
+ (void *)cipher,
+ (void *)(extraspec? extraspec : &dummy_extra_spec),
+ &mod);
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ if (! err)
+ {
+ *module = mod;
+ *algorithm_id = mod->mod_id;
+ }
+
+ return gcry_error (err);
+}
+
+/* Unregister the cipher identified by MODULE, which must have been
+ registered with gcry_cipher_register. */
+void
+gcry_cipher_unregister (gcry_module_t module)
+{
+ ath_mutex_lock (&ciphers_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&ciphers_registered_lock);
+}
+
+/* Locate the OID in the oid table and return the index or -1 when not
+ found. An opitonal "oid." or "OID." prefix in OID is ignored, the
+ OID is expected to be in standard IETF dotted notation. The
+ internal algorithm number is returned in ALGORITHM unless it
+ ispassed as NULL. A pointer to the specification of the module
+ implementing this algorithm is return in OID_SPEC unless passed as
+ NULL.*/
+static int
+search_oid (const char *oid, int *algorithm, gcry_cipher_oid_spec_t *oid_spec)
+{
+ gcry_module_t module;
+ int ret = 0;
+
+ if (oid && ((! strncmp (oid, "oid.", 4))
+ || (! strncmp (oid, "OID.", 4))))
+ oid += 4;
+
+ module = gcry_cipher_lookup_oid (oid);
+ if (module)
+ {
+ gcry_cipher_spec_t *cipher = module->spec;
+ int i;
+
+ for (i = 0; cipher->oids[i].oid && !ret; i++)
+ if (! stricmp (oid, cipher->oids[i].oid))
+ {
+ if (algorithm)
+ *algorithm = module->mod_id;
+ if (oid_spec)
+ *oid_spec = cipher->oids[i];
+ ret = 1;
+ }
+ _gcry_module_release (module);
+ }
+
+ return ret;
+}
+
+/* Map STRING to the cipher algorithm identifier. Returns the
+ algorithm ID of the cipher for the given name or 0 if the name is
+ not known. It is valid to pass NULL for STRING which results in a
+ return value of 0. */
+int
+gcry_cipher_map_name (const char *string)
+{
+ gcry_module_t cipher;
+ int ret, algorithm = 0;
+
+ if (! string)
+ return 0;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ /* If the string starts with a digit (optionally prefixed with
+ either "OID." or "oid."), we first look into our table of ASN.1
+ object identifiers to figure out the algorithm */
+
+ ath_mutex_lock (&ciphers_registered_lock);
+
+ ret = search_oid (string, &algorithm, NULL);
+ if (! ret)
+ {
+ cipher = gcry_cipher_lookup_name (string);
+ if (cipher)
+ {
+ algorithm = cipher->mod_id;
+ _gcry_module_release (cipher);
+ }
+ }
+
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ return algorithm;
+}
+
+
+/* Given a STRING with an OID in dotted decimal notation, this
+ function returns the cipher mode (GCRY_CIPHER_MODE_*) associated
+ with that OID or 0 if no mode is known. Passing NULL for string
+ yields a return value of 0. */
+int
+gcry_cipher_mode_from_oid (const char *string)
+{
+ gcry_cipher_oid_spec_t oid_spec;
+ int ret = 0, mode = 0;
+
+ if (!string)
+ return 0;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ ret = search_oid (string, NULL, &oid_spec);
+ if (ret)
+ mode = oid_spec.mode;
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ return mode;
+}
+
+
+/* Map the cipher algorithm whose ID is contained in ALGORITHM to a
+ string representation of the algorithm name. For unknown algorithm
+ IDs this function returns "?". */
+static const char *
+cipher_algo_to_string (int algorithm)
+{
+ gcry_module_t cipher;
+ const char *name;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ cipher = _gcry_module_lookup_id (ciphers_registered, algorithm);
+ if (cipher)
+ {
+ name = ((gcry_cipher_spec_t *) cipher->spec)->name;
+ _gcry_module_release (cipher);
+ }
+ else
+ name = "?";
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ return name;
+}
+
+/* Map the cipher algorithm identifier ALGORITHM to a string
+ representing this algorithm. This string is the default name as
+ used by Libgcrypt. An pointer to an empty string is returned for
+ an unknown algorithm. NULL is never returned. */
+const char *
+gcry_cipher_algo_name (int algorithm)
+{
+ return cipher_algo_to_string (algorithm);
+}
+
+
+/* Flag the cipher algorithm with the identifier ALGORITHM as
+ disabled. There is no error return, the function does nothing for
+ unknown algorithms. Disabled algorithms are vitually not available
+ in Libgcrypt. */
+static void
+disable_cipher_algo (int algorithm)
+{
+ gcry_module_t cipher;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ cipher = _gcry_module_lookup_id (ciphers_registered, algorithm);
+ if (cipher)
+ {
+ if (! (cipher->flags & FLAG_MODULE_DISABLED))
+ cipher->flags |= FLAG_MODULE_DISABLED;
+ _gcry_module_release (cipher);
+ }
+ ath_mutex_unlock (&ciphers_registered_lock);
+}
+
+
+/* Return 0 if the cipher algorithm with identifier ALGORITHM is
+ available. Returns a basic error code value if it is not
+ available. */
+static gcry_err_code_t
+check_cipher_algo (int algorithm)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_module_t cipher;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ cipher = _gcry_module_lookup_id (ciphers_registered, algorithm);
+ if (cipher)
+ {
+ if (cipher->flags & FLAG_MODULE_DISABLED)
+ err = GPG_ERR_CIPHER_ALGO;
+ _gcry_module_release (cipher);
+ }
+ else
+ err = GPG_ERR_CIPHER_ALGO;
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ return err;
+}
+
+
+/* Return the standard length of the key for the cipher algorithm with
+ the identifier ALGORITHM. This function expects a valid algorithm
+ and will abort if the algorithm is not available or the length of
+ the key is not known. */
+static unsigned int
+cipher_get_keylen (int algorithm)
+{
+ gcry_module_t cipher;
+ unsigned len = 0;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ cipher = _gcry_module_lookup_id (ciphers_registered, algorithm);
+ if (cipher)
+ {
+ len = ((gcry_cipher_spec_t *) cipher->spec)->keylen;
+ if (!len)
+ log_bug ("cipher %d w/o key length\n", algorithm);
+ _gcry_module_release (cipher);
+ }
+ else
+ log_bug ("cipher %d not found\n", algorithm);
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ return len;
+}
+
+/* Return the block length of the cipher algorithm with the identifier
+ ALGORITHM. This function expects a valid algorithm and will abort
+ if the algorithm is not available or the length of the key is not
+ known. */
+static unsigned int
+cipher_get_blocksize (int algorithm)
+{
+ gcry_module_t cipher;
+ unsigned len = 0;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ cipher = _gcry_module_lookup_id (ciphers_registered, algorithm);
+ if (cipher)
+ {
+ len = ((gcry_cipher_spec_t *) cipher->spec)->blocksize;
+ if (! len)
+ log_bug ("cipher %d w/o blocksize\n", algorithm);
+ _gcry_module_release (cipher);
+ }
+ else
+ log_bug ("cipher %d not found\n", algorithm);
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ return len;
+}
+
+
+/*
+ Open a cipher handle for use with cipher algorithm ALGORITHM, using
+ the cipher mode MODE (one of the GCRY_CIPHER_MODE_*) and return a
+ handle in HANDLE. Put NULL into HANDLE and return an error code if
+ something goes wrong. FLAGS may be used to modify the
+ operation. The defined flags are:
+
+ GCRY_CIPHER_SECURE: allocate all internal buffers in secure memory.
+ GCRY_CIPHER_ENABLE_SYNC: Enable the sync operation as used in OpenPGP.
+ GCRY_CIPHER_CBC_CTS: Enable CTS mode.
+ GCRY_CIPHER_CBC_MAC: Enable MAC mode.
+
+ Values for these flags may be combined using OR.
+ */
+gcry_error_t
+gcry_cipher_open (gcry_cipher_hd_t *handle,
+ int algo, int mode, unsigned int flags)
+{
+ int secure = (flags & GCRY_CIPHER_SECURE);
+ gcry_cipher_spec_t *cipher = NULL;
+ cipher_extra_spec_t *extraspec = NULL;
+ gcry_module_t module = NULL;
+ gcry_cipher_hd_t h = NULL;
+ gcry_err_code_t err = 0;
+
+ /* If the application missed to call the random poll function, we do
+ it here to ensure that it is used once in a while. */
+ _gcry_fast_random_poll ();
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ /* Fetch the according module and check wether the cipher is marked
+ available for use. */
+ ath_mutex_lock (&ciphers_registered_lock);
+ module = _gcry_module_lookup_id (ciphers_registered, algo);
+ if (module)
+ {
+ /* Found module. */
+
+ if (module->flags & FLAG_MODULE_DISABLED)
+ {
+ /* Not available for use. */
+ err = GPG_ERR_CIPHER_ALGO;
+ _gcry_module_release (module);
+ }
+ else
+ {
+ cipher = (gcry_cipher_spec_t *) module->spec;
+ extraspec = module->extraspec;
+ }
+ }
+ else
+ err = GPG_ERR_CIPHER_ALGO;
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ /* check flags */
+ if ((! err)
+ && ((flags & ~(0
+ | GCRY_CIPHER_SECURE
+ | GCRY_CIPHER_ENABLE_SYNC
+ | GCRY_CIPHER_CBC_CTS
+ | GCRY_CIPHER_CBC_MAC))
+ || (flags & GCRY_CIPHER_CBC_CTS & GCRY_CIPHER_CBC_MAC)))
+ err = GPG_ERR_CIPHER_ALGO;
+
+ /* check that a valid mode has been requested */
+ if (! err)
+ switch (mode)
+ {
+ case GCRY_CIPHER_MODE_ECB:
+ case GCRY_CIPHER_MODE_CBC:
+ case GCRY_CIPHER_MODE_CFB:
+ case GCRY_CIPHER_MODE_OFB:
+ case GCRY_CIPHER_MODE_CTR:
+ if ((cipher->encrypt == dummy_encrypt_block)
+ || (cipher->decrypt == dummy_decrypt_block))
+ err = GPG_ERR_INV_CIPHER_MODE;
+ break;
+
+ case GCRY_CIPHER_MODE_STREAM:
+ if ((cipher->stencrypt == dummy_encrypt_stream)
+ || (cipher->stdecrypt == dummy_decrypt_stream))
+ err = GPG_ERR_INV_CIPHER_MODE;
+ break;
+
+ case GCRY_CIPHER_MODE_NONE:
+ /* This mode may be used for debugging. It copies the main
+ text verbatim to the ciphertext. We do not allow this in
+ fips mode or if no debug flag has been set. */
+ if (fips_mode () || !_gcry_get_debug_flag (0))
+ err = GPG_ERR_INV_CIPHER_MODE;
+ break;
+
+ default:
+ err = GPG_ERR_INV_CIPHER_MODE;
+ }
+
+ /* Perform selftest here and mark this with a flag in cipher_table?
+ No, we should not do this as it takes too long. Further it does
+ not make sense to exclude algorithms with failing selftests at
+ runtime: If a selftest fails there is something seriously wrong
+ with the system and thus we better die immediately. */
+
+ if (! err)
+ {
+ size_t size = (sizeof (*h)
+ + 2 * cipher->contextsize
+ - sizeof (cipher_context_alignment_t)
+#ifdef NEED_16BYTE_ALIGNED_CONTEXT
+ + 15 /* Space for leading alignment gap. */
+#endif /*NEED_16BYTE_ALIGNED_CONTEXT*/
+ );
+
+ if (secure)
+ h = gcry_calloc_secure (1, size);
+ else
+ h = gcry_calloc (1, size);
+
+ if (! h)
+ err = gpg_err_code_from_errno (errno);
+ else
+ {
+ size_t off = 0;
+
+#ifdef NEED_16BYTE_ALIGNED_CONTEXT
+ if ( ((unsigned long)h & 0x0f) )
+ {
+ /* The malloced block is not aligned on a 16 byte
+ boundary. Correct for this. */
+ off = 16 - ((unsigned long)h & 0x0f);
+ h = (void*)((char*)h + off);
+ }
+#endif /*NEED_16BYTE_ALIGNED_CONTEXT*/
+
+ h->magic = secure ? CTX_MAGIC_SECURE : CTX_MAGIC_NORMAL;
+ h->actual_handle_size = size - off;
+ h->handle_offset = off;
+ h->cipher = cipher;
+ h->extraspec = extraspec;
+ h->module = module;
+ h->algo = algo;
+ h->mode = mode;
+ h->flags = flags;
+
+ /* Setup bulk encryption routines. */
+ switch (algo)
+ {
+#ifdef USE_AES
+ case GCRY_CIPHER_AES128:
+ case GCRY_CIPHER_AES192:
+ case GCRY_CIPHER_AES256:
+ h->bulk.cfb_enc = _gcry_aes_cfb_enc;
+ h->bulk.cfb_dec = _gcry_aes_cfb_dec;
+ h->bulk.cbc_enc = _gcry_aes_cbc_enc;
+ h->bulk.cbc_dec = _gcry_aes_cbc_dec;
+ break;
+#endif /*USE_AES*/
+
+ default:
+ break;
+ }
+ }
+ }
+
+ /* Done. */
+
+ if (err)
+ {
+ if (module)
+ {
+ /* Release module. */
+ ath_mutex_lock (&ciphers_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&ciphers_registered_lock);
+ }
+ }
+
+ *handle = err ? NULL : h;
+
+ return gcry_error (err);
+}
+
+
+/* Release all resources associated with the cipher handle H. H may be
+ NULL in which case this is a no-operation. */
+void
+gcry_cipher_close (gcry_cipher_hd_t h)
+{
+ size_t off;
+
+ if (!h)
+ return;
+
+ if ((h->magic != CTX_MAGIC_SECURE)
+ && (h->magic != CTX_MAGIC_NORMAL))
+ _gcry_fatal_error(GPG_ERR_INTERNAL,
+ "gcry_cipher_close: already closed/invalid handle");
+ else
+ h->magic = 0;
+
+ /* Release module. */
+ ath_mutex_lock (&ciphers_registered_lock);
+ _gcry_module_release (h->module);
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ /* We always want to wipe out the memory even when the context has
+ been allocated in secure memory. The user might have disabled
+ secure memory or is using his own implementation which does not
+ do the wiping. To accomplish this we need to keep track of the
+ actual size of this structure because we have no way to known
+ how large the allocated area was when using a standard malloc. */
+ off = h->handle_offset;
+ wipememory (h, h->actual_handle_size);
+
+ gcry_free ((char*)h - off);
+}
+
+
+/* Set the key to be used for the encryption context C to KEY with
+ length KEYLEN. The length should match the required length. */
+static gcry_error_t
+cipher_setkey (gcry_cipher_hd_t c, byte *key, unsigned int keylen)
+{
+ gcry_err_code_t ret;
+
+ ret = (*c->cipher->setkey) (&c->context.c, key, keylen);
+ if (!ret)
+ {
+ /* Duplicate initial context. */
+ memcpy ((void *) ((char *) &c->context.c + c->cipher->contextsize),
+ (void *) &c->context.c,
+ c->cipher->contextsize);
+ }
+
+ return gcry_error (ret);
+}
+
+
+/* Set the IV to be used for the encryption context C to IV with
+ length IVLEN. The length should match the required length. */
+static void
+cipher_setiv( gcry_cipher_hd_t c, const byte *iv, unsigned ivlen )
+{
+ memset (c->u_iv.iv, 0, c->cipher->blocksize);
+ if (iv)
+ {
+ if (ivlen != c->cipher->blocksize)
+ {
+ log_info ("WARNING: cipher_setiv: ivlen=%u blklen=%u\n",
+ ivlen, (unsigned int)c->cipher->blocksize);
+ fips_signal_error ("IV length does not match blocklength");
+ }
+ if (ivlen > c->cipher->blocksize)
+ ivlen = c->cipher->blocksize;
+ memcpy (c->u_iv.iv, iv, ivlen);
+ }
+ c->unused = 0;
+}
+
+
+/* Reset the cipher context to the initial context. This is basically
+ the same as an release followed by a new. */
+static void
+cipher_reset (gcry_cipher_hd_t c)
+{
+ memcpy (&c->context.c,
+ (char *) &c->context.c + c->cipher->contextsize,
+ c->cipher->contextsize);
+ memset (c->u_iv.iv, 0, c->cipher->blocksize);
+ memset (c->lastiv, 0, c->cipher->blocksize);
+ memset (c->ctr, 0, c->cipher->blocksize);
+}
+
+
+static void
+do_ecb_encrypt( gcry_cipher_hd_t c, byte *outbuf, const byte *inbuf,
+ unsigned int nblocks )
+{
+ unsigned int n;
+
+ for (n=0; n < nblocks; n++ )
+ {
+ c->cipher->encrypt ( &c->context.c, outbuf, (byte*)/*arggg*/inbuf );
+ inbuf += c->cipher->blocksize;
+ outbuf += c->cipher->blocksize;
+ }
+}
+
+static void
+do_ecb_decrypt( gcry_cipher_hd_t c, byte *outbuf, const byte *inbuf,
+ unsigned int nblocks )
+{
+ unsigned int n;
+
+ for (n=0; n < nblocks; n++ )
+ {
+ c->cipher->decrypt ( &c->context.c, outbuf, (byte*)/*arggg*/inbuf );
+ inbuf += c->cipher->blocksize;
+ outbuf += c->cipher->blocksize;
+ }
+}
+
+
+static void
+do_cbc_encrypt (gcry_cipher_hd_t c, unsigned char *outbuf,
+ const unsigned char *inbuf, unsigned int nbytes )
+{
+ unsigned int n;
+ unsigned char *ivp;
+ int i;
+ size_t blocksize = c->cipher->blocksize;
+ unsigned nblocks = nbytes / blocksize;
+
+ if ((c->flags & GCRY_CIPHER_CBC_CTS) && nbytes > blocksize)
+ {
+ if ((nbytes % blocksize) == 0)
+ nblocks--;
+ }
+
+ if (c->bulk.cbc_enc)
+ {
+ c->bulk.cbc_enc (&c->context.c, c->u_iv.iv, outbuf, inbuf, nblocks,
+ (c->flags & GCRY_CIPHER_CBC_MAC));
+ inbuf += nblocks * blocksize;
+ if (!(c->flags & GCRY_CIPHER_CBC_MAC))
+ outbuf += nblocks * blocksize;
+ }
+ else
+ {
+ for (n=0; n < nblocks; n++ )
+ {
+ for (ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ outbuf[i] = inbuf[i] ^ *ivp++;
+ c->cipher->encrypt ( &c->context.c, outbuf, outbuf );
+ memcpy (c->u_iv.iv, outbuf, blocksize );
+ inbuf += blocksize;
+ if (!(c->flags & GCRY_CIPHER_CBC_MAC))
+ outbuf += blocksize;
+ }
+ }
+
+ if ((c->flags & GCRY_CIPHER_CBC_CTS) && nbytes > blocksize)
+ {
+ /* We have to be careful here, since outbuf might be equal to
+ inbuf. */
+ int restbytes;
+ unsigned char b;
+
+ if ((nbytes % blocksize) == 0)
+ restbytes = blocksize;
+ else
+ restbytes = nbytes % blocksize;
+
+ outbuf -= blocksize;
+ for (ivp = c->u_iv.iv, i = 0; i < restbytes; i++)
+ {
+ b = inbuf[i];
+ outbuf[blocksize + i] = outbuf[i];
+ outbuf[i] = b ^ *ivp++;
+ }
+ for (; i < blocksize; i++)
+ outbuf[i] = 0 ^ *ivp++;
+
+ c->cipher->encrypt (&c->context.c, outbuf, outbuf);
+ memcpy (c->u_iv.iv, outbuf, blocksize);
+ }
+}
+
+
+static void
+do_cbc_decrypt (gcry_cipher_hd_t c, unsigned char *outbuf,
+ const unsigned char *inbuf, unsigned int nbytes)
+{
+ unsigned int n;
+ unsigned char *ivp;
+ int i;
+ size_t blocksize = c->cipher->blocksize;
+ unsigned int nblocks = nbytes / blocksize;
+
+ if ((c->flags & GCRY_CIPHER_CBC_CTS) && nbytes > blocksize)
+ {
+ nblocks--;
+ if ((nbytes % blocksize) == 0)
+ nblocks--;
+ memcpy (c->lastiv, c->u_iv.iv, blocksize);
+ }
+
+ if (c->bulk.cbc_dec)
+ {
+ c->bulk.cbc_dec (&c->context.c, c->u_iv.iv, outbuf, inbuf, nblocks);
+ inbuf += nblocks * blocksize;
+ outbuf += nblocks * blocksize;
+ }
+ else
+ {
+ for (n=0; n < nblocks; n++ )
+ {
+ /* Because outbuf and inbuf might be the same, we have to
+ * save the original ciphertext block. We use LASTIV for
+ * this here because it is not used otherwise. */
+ memcpy (c->lastiv, inbuf, blocksize);
+ c->cipher->decrypt ( &c->context.c, outbuf, inbuf );
+ for (ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ outbuf[i] ^= *ivp++;
+ memcpy(c->u_iv.iv, c->lastiv, blocksize );
+ inbuf += c->cipher->blocksize;
+ outbuf += c->cipher->blocksize;
+ }
+ }
+
+ if ((c->flags & GCRY_CIPHER_CBC_CTS) && nbytes > blocksize)
+ {
+ int restbytes;
+
+ if ((nbytes % blocksize) == 0)
+ restbytes = blocksize;
+ else
+ restbytes = nbytes % blocksize;
+
+ memcpy (c->lastiv, c->u_iv.iv, blocksize ); /* Save Cn-2. */
+ memcpy (c->u_iv.iv, inbuf + blocksize, restbytes ); /* Save Cn. */
+
+ c->cipher->decrypt ( &c->context.c, outbuf, inbuf );
+ for (ivp=c->u_iv.iv,i=0; i < restbytes; i++ )
+ outbuf[i] ^= *ivp++;
+
+ memcpy(outbuf + blocksize, outbuf, restbytes);
+ for(i=restbytes; i < blocksize; i++)
+ c->u_iv.iv[i] = outbuf[i];
+ c->cipher->decrypt (&c->context.c, outbuf, c->u_iv.iv);
+ for(ivp=c->lastiv,i=0; i < blocksize; i++ )
+ outbuf[i] ^= *ivp++;
+ /* c->lastiv is now really lastlastiv, does this matter? */
+ }
+}
+
+
+static void
+do_cfb_encrypt( gcry_cipher_hd_t c, unsigned char *outbuf,
+ const unsigned char *inbuf, unsigned int nbytes )
+{
+ unsigned char *ivp;
+ size_t blocksize = c->cipher->blocksize;
+ size_t blocksize_x_2 = blocksize + blocksize;
+
+ if ( nbytes <= c->unused )
+ {
+ /* Short enough to be encoded by the remaining XOR mask. */
+ /* XOR the input with the IV and store input into IV. */
+ for (ivp=c->u_iv.iv+c->cipher->blocksize - c->unused;
+ nbytes;
+ nbytes--, c->unused-- )
+ *outbuf++ = (*ivp++ ^= *inbuf++);
+ return;
+ }
+
+ if ( c->unused )
+ {
+ /* XOR the input with the IV and store input into IV */
+ nbytes -= c->unused;
+ for(ivp=c->u_iv.iv+blocksize - c->unused; c->unused; c->unused-- )
+ *outbuf++ = (*ivp++ ^= *inbuf++);
+ }
+
+ /* Now we can process complete blocks. We use a loop as long as we
+ have at least 2 blocks and use conditions for the rest. This
+ also allows to use a bulk encryption function if available. */
+ if (nbytes >= blocksize_x_2 && c->bulk.cfb_enc)
+ {
+ unsigned int nblocks = nbytes / blocksize;
+ c->bulk.cfb_enc (&c->context.c, c->u_iv.iv, outbuf, inbuf, nblocks);
+ outbuf += nblocks * blocksize;
+ inbuf += nblocks * blocksize;
+ nbytes -= nblocks * blocksize;
+ }
+ else
+ {
+ while ( nbytes >= blocksize_x_2 )
+ {
+ int i;
+ /* Encrypt the IV. */
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ /* XOR the input with the IV and store input into IV. */
+ for(ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ *outbuf++ = (*ivp++ ^= *inbuf++);
+ nbytes -= blocksize;
+ }
+ }
+
+ if ( nbytes >= blocksize )
+ {
+ int i;
+ /* Save the current IV and then encrypt the IV. */
+ memcpy( c->lastiv, c->u_iv.iv, blocksize );
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ /* XOR the input with the IV and store input into IV */
+ for(ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ *outbuf++ = (*ivp++ ^= *inbuf++);
+ nbytes -= blocksize;
+ }
+ if ( nbytes )
+ {
+ /* Save the current IV and then encrypt the IV. */
+ memcpy( c->lastiv, c->u_iv.iv, blocksize );
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ c->unused = blocksize;
+ /* Apply the XOR. */
+ c->unused -= nbytes;
+ for(ivp=c->u_iv.iv; nbytes; nbytes-- )
+ *outbuf++ = (*ivp++ ^= *inbuf++);
+ }
+}
+
+
+static void
+do_cfb_decrypt( gcry_cipher_hd_t c, unsigned char *outbuf,
+ const unsigned char *inbuf, unsigned int nbytes )
+{
+ unsigned char *ivp;
+ unsigned long temp;
+ int i;
+ size_t blocksize = c->cipher->blocksize;
+ size_t blocksize_x_2 = blocksize + blocksize;
+
+ if (nbytes <= c->unused)
+ {
+ /* Short enough to be encoded by the remaining XOR mask. */
+ /* XOR the input with the IV and store input into IV. */
+ for (ivp=c->u_iv.iv+blocksize - c->unused;
+ nbytes;
+ nbytes--, c->unused--)
+ {
+ temp = *inbuf++;
+ *outbuf++ = *ivp ^ temp;
+ *ivp++ = temp;
+ }
+ return;
+ }
+
+ if (c->unused)
+ {
+ /* XOR the input with the IV and store input into IV. */
+ nbytes -= c->unused;
+ for (ivp=c->u_iv.iv+blocksize - c->unused; c->unused; c->unused-- )
+ {
+ temp = *inbuf++;
+ *outbuf++ = *ivp ^ temp;
+ *ivp++ = temp;
+ }
+ }
+
+ /* Now we can process complete blocks. We use a loop as long as we
+ have at least 2 blocks and use conditions for the rest. This
+ also allows to use a bulk encryption function if available. */
+ if (nbytes >= blocksize_x_2 && c->bulk.cfb_dec)
+ {
+ unsigned int nblocks = nbytes / blocksize;
+ c->bulk.cfb_dec (&c->context.c, c->u_iv.iv, outbuf, inbuf, nblocks);
+ outbuf += nblocks * blocksize;
+ inbuf += nblocks * blocksize;
+ nbytes -= nblocks * blocksize;
+ }
+ else
+ {
+ while (nbytes >= blocksize_x_2 )
+ {
+ /* Encrypt the IV. */
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ /* XOR the input with the IV and store input into IV. */
+ for (ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ {
+ temp = *inbuf++;
+ *outbuf++ = *ivp ^ temp;
+ *ivp++ = temp;
+ }
+ nbytes -= blocksize;
+ }
+ }
+
+ if (nbytes >= blocksize )
+ {
+ /* Save the current IV and then encrypt the IV. */
+ memcpy ( c->lastiv, c->u_iv.iv, blocksize);
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ /* XOR the input with the IV and store input into IV */
+ for (ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ {
+ temp = *inbuf++;
+ *outbuf++ = *ivp ^ temp;
+ *ivp++ = temp;
+ }
+ nbytes -= blocksize;
+ }
+
+ if (nbytes)
+ {
+ /* Save the current IV and then encrypt the IV. */
+ memcpy ( c->lastiv, c->u_iv.iv, blocksize );
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ c->unused = blocksize;
+ /* Apply the XOR. */
+ c->unused -= nbytes;
+ for (ivp=c->u_iv.iv; nbytes; nbytes-- )
+ {
+ temp = *inbuf++;
+ *outbuf++ = *ivp ^ temp;
+ *ivp++ = temp;
+ }
+ }
+}
+
+
+static void
+do_ofb_encrypt( gcry_cipher_hd_t c,
+ byte *outbuf, const byte *inbuf, unsigned nbytes )
+{
+ byte *ivp;
+ size_t blocksize = c->cipher->blocksize;
+
+ if ( nbytes <= c->unused )
+ {
+ /* Short enough to be encoded by the remaining XOR mask. */
+ /* XOR the input with the IV */
+ for (ivp=c->u_iv.iv+c->cipher->blocksize - c->unused;
+ nbytes;
+ nbytes--, c->unused-- )
+ *outbuf++ = (*ivp++ ^ *inbuf++);
+ return;
+ }
+
+ if( c->unused )
+ {
+ nbytes -= c->unused;
+ for(ivp=c->u_iv.iv+blocksize - c->unused; c->unused; c->unused-- )
+ *outbuf++ = (*ivp++ ^ *inbuf++);
+ }
+
+ /* Now we can process complete blocks. */
+ while ( nbytes >= blocksize )
+ {
+ int i;
+ /* Encrypt the IV (and save the current one). */
+ memcpy( c->lastiv, c->u_iv.iv, blocksize );
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+
+ for (ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ *outbuf++ = (*ivp++ ^ *inbuf++);
+ nbytes -= blocksize;
+ }
+ if ( nbytes )
+ { /* process the remaining bytes */
+ memcpy( c->lastiv, c->u_iv.iv, blocksize );
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ c->unused = blocksize;
+ c->unused -= nbytes;
+ for(ivp=c->u_iv.iv; nbytes; nbytes-- )
+ *outbuf++ = (*ivp++ ^ *inbuf++);
+ }
+}
+
+static void
+do_ofb_decrypt( gcry_cipher_hd_t c,
+ byte *outbuf, const byte *inbuf, unsigned int nbytes )
+{
+ byte *ivp;
+ size_t blocksize = c->cipher->blocksize;
+
+ if( nbytes <= c->unused )
+ {
+ /* Short enough to be encoded by the remaining XOR mask. */
+ for (ivp=c->u_iv.iv+blocksize - c->unused; nbytes; nbytes--,c->unused--)
+ *outbuf++ = *ivp++ ^ *inbuf++;
+ return;
+ }
+
+ if ( c->unused )
+ {
+ nbytes -= c->unused;
+ for (ivp=c->u_iv.iv+blocksize - c->unused; c->unused; c->unused-- )
+ *outbuf++ = *ivp++ ^ *inbuf++;
+ }
+
+ /* Now we can process complete blocks. */
+ while ( nbytes >= blocksize )
+ {
+ int i;
+ /* Encrypt the IV (and save the current one). */
+ memcpy( c->lastiv, c->u_iv.iv, blocksize );
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ for (ivp=c->u_iv.iv,i=0; i < blocksize; i++ )
+ *outbuf++ = *ivp++ ^ *inbuf++;
+ nbytes -= blocksize;
+ }
+ if ( nbytes )
+ { /* Process the remaining bytes. */
+ /* Encrypt the IV (and save the current one). */
+ memcpy( c->lastiv, c->u_iv.iv, blocksize );
+ c->cipher->encrypt ( &c->context.c, c->u_iv.iv, c->u_iv.iv );
+ c->unused = blocksize;
+ c->unused -= nbytes;
+ for (ivp=c->u_iv.iv; nbytes; nbytes-- )
+ *outbuf++ = *ivp++ ^ *inbuf++;
+ }
+}
+
+
+static void
+do_ctr_encrypt( gcry_cipher_hd_t c, byte *outbuf, const byte *inbuf,
+ unsigned int nbytes )
+{
+ unsigned int n;
+ byte tmp[MAX_BLOCKSIZE];
+ int i;
+
+ for(n=0; n < nbytes; n++)
+ {
+ if ((n % c->cipher->blocksize) == 0)
+ {
+ c->cipher->encrypt (&c->context.c, tmp, c->ctr);
+
+ for (i = c->cipher->blocksize; i > 0; i--)
+ {
+ c->ctr[i-1]++;
+ if (c->ctr[i-1] != 0)
+ break;
+ }
+ }
+
+ /* XOR input with encrypted counter and store in output. */
+ outbuf[n] = inbuf[n] ^ tmp[n % c->cipher->blocksize];
+ }
+}
+
+static void
+do_ctr_decrypt( gcry_cipher_hd_t c, byte *outbuf, const byte *inbuf,
+ unsigned int nbytes )
+{
+ do_ctr_encrypt (c, outbuf, inbuf, nbytes);
+}
+
+
+/****************
+ * Encrypt INBUF to OUTBUF with the mode selected at open.
+ * inbuf and outbuf may overlap or be the same.
+ * Depending on the mode some contraints apply to NBYTES.
+ */
+static gcry_err_code_t
+cipher_encrypt (gcry_cipher_hd_t c, byte *outbuf,
+ const byte *inbuf, unsigned int nbytes)
+{
+ gcry_err_code_t rc = GPG_ERR_NO_ERROR;
+
+ switch( c->mode ) {
+ case GCRY_CIPHER_MODE_ECB:
+ if (!(nbytes%c->cipher->blocksize))
+ do_ecb_encrypt(c, outbuf, inbuf, nbytes/c->cipher->blocksize );
+ else
+ rc = GPG_ERR_INV_ARG;
+ break;
+ case GCRY_CIPHER_MODE_CBC:
+ if (!(nbytes%c->cipher->blocksize)
+ || (nbytes > c->cipher->blocksize
+ && (c->flags & GCRY_CIPHER_CBC_CTS)))
+ do_cbc_encrypt(c, outbuf, inbuf, nbytes );
+ else
+ rc = GPG_ERR_INV_ARG;
+ break;
+ case GCRY_CIPHER_MODE_CFB:
+ do_cfb_encrypt(c, outbuf, inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_OFB:
+ do_ofb_encrypt(c, outbuf, inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_CTR:
+ do_ctr_encrypt(c, outbuf, inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_STREAM:
+ c->cipher->stencrypt ( &c->context.c,
+ outbuf, (byte*)/*arggg*/inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_NONE:
+ if (fips_mode () || !_gcry_get_debug_flag (0))
+ {
+ fips_signal_error ("cipher mode NONE used");
+ rc = GPG_ERR_INV_CIPHER_MODE;
+ }
+ else
+ {
+ if ( inbuf != outbuf )
+ memmove (outbuf, inbuf, nbytes);
+ }
+ break;
+ default:
+ log_fatal("cipher_encrypt: invalid mode %d\n", c->mode );
+ rc = GPG_ERR_INV_CIPHER_MODE;
+ break;
+ }
+ return rc;
+}
+
+
+/****************
+ * Encrypt IN and write it to OUT. If IN is NULL, in-place encryption has
+ * been requested.
+ */
+gcry_error_t
+gcry_cipher_encrypt (gcry_cipher_hd_t h, void *out, size_t outsize,
+ const void *in, size_t inlen)
+{
+ gcry_err_code_t err;
+
+ if (!in)
+ {
+ /* Caller requested in-place encryption. */
+ /* Actually cipher_encrypt() does not need to know about it, but
+ * we may change it in the future to get better performance. */
+ err = cipher_encrypt (h, out, out, outsize);
+ }
+ else if (outsize < ((h->flags & GCRY_CIPHER_CBC_MAC) ?
+ h->cipher->blocksize : inlen))
+ err = GPG_ERR_TOO_SHORT;
+ else if ((h->mode == GCRY_CIPHER_MODE_ECB
+ || (h->mode == GCRY_CIPHER_MODE_CBC
+ && (! ((h->flags & GCRY_CIPHER_CBC_CTS)
+ && (inlen > h->cipher->blocksize)))))
+ && (inlen % h->cipher->blocksize))
+ err = GPG_ERR_INV_ARG;
+ else
+ err = cipher_encrypt (h, out, in, inlen);
+
+ if (err && out)
+ memset (out, 0x42, outsize); /* Failsafe: Make sure that the
+ plaintext will never make it into
+ OUT. */
+
+ return gcry_error (err);
+}
+
+
+
+/****************
+ * Decrypt INBUF to OUTBUF with the mode selected at open.
+ * inbuf and outbuf may overlap or be the same.
+ * Depending on the mode some some contraints apply to NBYTES.
+ */
+static gcry_err_code_t
+cipher_decrypt (gcry_cipher_hd_t c, byte *outbuf, const byte *inbuf,
+ unsigned int nbytes)
+{
+ gcry_err_code_t rc = GPG_ERR_NO_ERROR;
+
+ switch( c->mode ) {
+ case GCRY_CIPHER_MODE_ECB:
+ if (!(nbytes%c->cipher->blocksize))
+ do_ecb_decrypt(c, outbuf, inbuf, nbytes/c->cipher->blocksize );
+ else
+ rc = GPG_ERR_INV_ARG;
+ break;
+ case GCRY_CIPHER_MODE_CBC:
+ if (!(nbytes%c->cipher->blocksize)
+ || (nbytes > c->cipher->blocksize
+ && (c->flags & GCRY_CIPHER_CBC_CTS)))
+ do_cbc_decrypt(c, outbuf, inbuf, nbytes );
+ else
+ rc = GPG_ERR_INV_ARG;
+ break;
+ case GCRY_CIPHER_MODE_CFB:
+ do_cfb_decrypt(c, outbuf, inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_OFB:
+ do_ofb_decrypt(c, outbuf, inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_CTR:
+ do_ctr_decrypt(c, outbuf, inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_STREAM:
+ c->cipher->stdecrypt ( &c->context.c,
+ outbuf, (byte*)/*arggg*/inbuf, nbytes );
+ break;
+ case GCRY_CIPHER_MODE_NONE:
+ if (fips_mode () || !_gcry_get_debug_flag (0))
+ {
+ fips_signal_error ("cipher mode NONE used");
+ rc = GPG_ERR_INV_CIPHER_MODE;
+ }
+ else
+ {
+ if (inbuf != outbuf)
+ memmove (outbuf, inbuf, nbytes);
+ }
+ break;
+ default:
+ log_fatal ("cipher_decrypt: invalid mode %d\n", c->mode );
+ rc = GPG_ERR_INV_CIPHER_MODE;
+ break;
+ }
+ return rc;
+}
+
+
+gcry_error_t
+gcry_cipher_decrypt (gcry_cipher_hd_t h, void *out, size_t outsize,
+ const void *in, size_t inlen)
+{
+ gcry_err_code_t err = 0;
+
+ if (!in)
+ {
+ /* Caller requested in-place encryption. */
+ /* Actually cipher_encrypt() does not need to know about it, but
+ * we may change it in the future to get better performance. */
+ err = cipher_decrypt (h, out, out, outsize);
+ }
+ else if (outsize < inlen)
+ err = GPG_ERR_TOO_SHORT;
+ else if (((h->mode == GCRY_CIPHER_MODE_ECB)
+ || ((h->mode == GCRY_CIPHER_MODE_CBC)
+ && (! ((h->flags & GCRY_CIPHER_CBC_CTS)
+ && (inlen > h->cipher->blocksize)))))
+ && (inlen % h->cipher->blocksize) != 0)
+ err = GPG_ERR_INV_ARG;
+ else
+ err = cipher_decrypt (h, out, in, inlen);
+
+ return gcry_error (err);
+}
+
+
+
+/****************
+ * Used for PGP's somewhat strange CFB mode. Only works if
+ * the corresponding flag is set.
+ */
+static void
+cipher_sync (gcry_cipher_hd_t c)
+{
+ if ((c->flags & GCRY_CIPHER_ENABLE_SYNC) && c->unused)
+ {
+ memmove (c->u_iv.iv + c->unused,
+ c->u_iv.iv, c->cipher->blocksize - c->unused);
+ memcpy (c->u_iv.iv,
+ c->lastiv + c->cipher->blocksize - c->unused, c->unused);
+ c->unused = 0;
+ }
+}
+
+
+gcry_error_t
+_gcry_cipher_setkey (gcry_cipher_hd_t hd, const void *key, size_t keylen)
+{
+ return cipher_setkey (hd, (void*)key, keylen);
+}
+
+
+gcry_error_t
+_gcry_cipher_setiv (gcry_cipher_hd_t hd, const void *iv, size_t ivlen)
+{
+ cipher_setiv (hd, iv, ivlen);
+ return 0;
+}
+
+/* Set counter for CTR mode. (CTR,CTRLEN) must denote a buffer of
+ block size length, or (NULL,0) to set the CTR to the all-zero
+ block. */
+gpg_error_t
+_gcry_cipher_setctr (gcry_cipher_hd_t hd, const void *ctr, size_t ctrlen)
+{
+ if (ctr && ctrlen == hd->cipher->blocksize)
+ memcpy (hd->ctr, ctr, hd->cipher->blocksize);
+ else if (!ctr || !ctrlen)
+ memset (hd->ctr, 0, hd->cipher->blocksize);
+ else
+ return gpg_error (GPG_ERR_INV_ARG);
+ return 0;
+}
+
+
+gcry_error_t
+gcry_cipher_ctl( gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen)
+{
+ gcry_err_code_t rc = GPG_ERR_NO_ERROR;
+
+ switch (cmd)
+ {
+ case GCRYCTL_SET_KEY: /* Deprecated; use gcry_cipher_setkey. */
+ rc = cipher_setkey( h, buffer, buflen );
+ break;
+
+ case GCRYCTL_SET_IV: /* Deprecated; use gcry_cipher_setiv. */
+ cipher_setiv( h, buffer, buflen );
+ break;
+
+ case GCRYCTL_RESET:
+ cipher_reset (h);
+ break;
+
+ case GCRYCTL_CFB_SYNC:
+ cipher_sync( h );
+ break;
+
+ case GCRYCTL_SET_CBC_CTS:
+ if (buflen)
+ if (h->flags & GCRY_CIPHER_CBC_MAC)
+ rc = GPG_ERR_INV_FLAG;
+ else
+ h->flags |= GCRY_CIPHER_CBC_CTS;
+ else
+ h->flags &= ~GCRY_CIPHER_CBC_CTS;
+ break;
+
+ case GCRYCTL_SET_CBC_MAC:
+ if (buflen)
+ if (h->flags & GCRY_CIPHER_CBC_CTS)
+ rc = GPG_ERR_INV_FLAG;
+ else
+ h->flags |= GCRY_CIPHER_CBC_MAC;
+ else
+ h->flags &= ~GCRY_CIPHER_CBC_MAC;
+ break;
+
+ case GCRYCTL_DISABLE_ALGO:
+ /* This command expects NULL for H and BUFFER to point to an
+ integer with the algo number. */
+ if( h || !buffer || buflen != sizeof(int) )
+ return gcry_error (GPG_ERR_CIPHER_ALGO);
+ disable_cipher_algo( *(int*)buffer );
+ break;
+
+ case GCRYCTL_SET_CTR: /* Deprecated; use gcry_cipher_setctr. */
+ if (buffer && buflen == h->cipher->blocksize)
+ memcpy (h->ctr, buffer, h->cipher->blocksize);
+ else if (buffer == NULL || buflen == 0)
+ memset (h->ctr, 0, h->cipher->blocksize);
+ else
+ rc = GPG_ERR_INV_ARG;
+ break;
+
+ case 61: /* Disable weak key detection (private). */
+ if (h->extraspec->set_extra_info)
+ rc = h->extraspec->set_extra_info
+ (&h->context.c, CIPHER_INFO_NO_WEAK_KEY, NULL, 0);
+ else
+ rc = GPG_ERR_NOT_SUPPORTED;
+ break;
+
+ case 62: /* Return current input vector (private). */
+ /* This is the input block as used in CFB and OFB mode which has
+ initially been set as IV. The returned format is:
+ 1 byte Actual length of the block in bytes.
+ n byte The block.
+ If the provided buffer is too short, an error is returned. */
+ if (buflen < (1 + h->cipher->blocksize))
+ rc = GPG_ERR_TOO_SHORT;
+ else
+ {
+ unsigned char *ivp;
+ unsigned char *dst = buffer;
+ int n = h->unused;
+
+ if (!n)
+ n = h->cipher->blocksize;
+ gcry_assert (n <= h->cipher->blocksize);
+ *dst++ = n;
+ ivp = h->u_iv.iv + h->cipher->blocksize - n;
+ while (n--)
+ *dst++ = *ivp++;
+ }
+ break;
+
+ default:
+ rc = GPG_ERR_INV_OP;
+ }
+
+ return gcry_error (rc);
+}
+
+
+/* Return information about the cipher handle H. CMD is the kind of
+ information requested. BUFFER and NBYTES are reserved for now.
+
+ There are no values for CMD yet defined.
+
+ The fucntion always returns GPG_ERR_INV_OP.
+
+ */
+gcry_error_t
+gcry_cipher_info (gcry_cipher_hd_t h, int cmd, void *buffer, size_t *nbytes)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ (void)h;
+ (void)buffer;
+ (void)nbytes;
+
+ switch (cmd)
+ {
+ default:
+ err = GPG_ERR_INV_OP;
+ }
+
+ return gcry_error (err);
+}
+
+/* Return information about the given cipher algorithm ALGO.
+
+ WHAT select the kind of information returned:
+
+ GCRYCTL_GET_KEYLEN:
+ Return the length of the key. If the algorithm ALGO
+ supports multiple key lengths, the maximum supported key length
+ is returned. The key length is returned as number of octets.
+ BUFFER and NBYTES must be zero.
+
+ GCRYCTL_GET_BLKLEN:
+ Return the blocklength of the algorithm ALGO counted in octets.
+ BUFFER and NBYTES must be zero.
+
+ GCRYCTL_TEST_ALGO:
+ Returns 0 if the specified algorithm ALGO is available for use.
+ BUFFER and NBYTES must be zero.
+
+ Note: Because this function is in most cases used to return an
+ integer value, we can make it easier for the caller to just look at
+ the return value. The caller will in all cases consult the value
+ and thereby detecting whether a error occured or not (i.e. while
+ checking the block size)
+ */
+gcry_error_t
+gcry_cipher_algo_info (int algo, int what, void *buffer, size_t *nbytes)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ unsigned int ui;
+
+ switch (what)
+ {
+ case GCRYCTL_GET_KEYLEN:
+ if (buffer || (! nbytes))
+ err = GPG_ERR_CIPHER_ALGO;
+ else
+ {
+ ui = cipher_get_keylen (algo);
+ if ((ui > 0) && (ui <= 512))
+ *nbytes = (size_t) ui / 8;
+ else
+ /* The only reason is an invalid algo or a strange
+ blocksize. */
+ err = GPG_ERR_CIPHER_ALGO;
+ }
+ break;
+
+ case GCRYCTL_GET_BLKLEN:
+ if (buffer || (! nbytes))
+ err = GPG_ERR_CIPHER_ALGO;
+ else
+ {
+ ui = cipher_get_blocksize (algo);
+ if ((ui > 0) && (ui < 10000))
+ *nbytes = ui;
+ else
+ /* The only reason is an invalid algo or a strange
+ blocksize. */
+ err = GPG_ERR_CIPHER_ALGO;
+ }
+ break;
+
+ case GCRYCTL_TEST_ALGO:
+ if (buffer || nbytes)
+ err = GPG_ERR_INV_ARG;
+ else
+ err = check_cipher_algo (algo);
+ break;
+
+ default:
+ err = GPG_ERR_INV_OP;
+ }
+
+ return gcry_error (err);
+}
+
+
+/* This function returns length of the key for algorithm ALGO. If the
+ algorithm supports multiple key lengths, the maximum supported key
+ length is returned. On error 0 is returned. The key length is
+ returned as number of octets.
+
+ This is a convenience functions which should be preferred over
+ gcry_cipher_algo_info because it allows for proper type
+ checking. */
+size_t
+gcry_cipher_get_algo_keylen (int algo)
+{
+ size_t n;
+
+ if (gcry_cipher_algo_info (algo, GCRYCTL_GET_KEYLEN, NULL, &n))
+ n = 0;
+ return n;
+}
+
+/* This functions returns the blocklength of the algorithm ALGO
+ counted in octets. On error 0 is returned.
+
+ This is a convenience functions which should be preferred over
+ gcry_cipher_algo_info because it allows for proper type
+ checking. */
+size_t
+gcry_cipher_get_algo_blklen (int algo)
+{
+ size_t n;
+
+ if (gcry_cipher_algo_info( algo, GCRYCTL_GET_BLKLEN, NULL, &n))
+ n = 0;
+ return n;
+}
+
+/* Explicitly initialize this module. */
+gcry_err_code_t
+_gcry_cipher_init (void)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ return err;
+}
+
+/* Get a list consisting of the IDs of the loaded cipher modules. If
+ LIST is zero, write the number of loaded cipher modules to
+ LIST_LENGTH and return. If LIST is non-zero, the first
+ *LIST_LENGTH algorithm IDs are stored in LIST, which must be of
+ according size. In case there are less cipher modules than
+ *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. */
+gcry_error_t
+gcry_cipher_list (int *list, int *list_length)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ err = _gcry_module_list (ciphers_registered, list, list_length);
+ ath_mutex_unlock (&ciphers_registered_lock);
+
+ return err;
+}
+
+
+/* Run the selftests for cipher algorithm ALGO with optional reporting
+ function REPORT. */
+gpg_error_t
+_gcry_cipher_selftest (int algo, int extended, selftest_report_func_t report)
+{
+ gcry_module_t module = NULL;
+ cipher_extra_spec_t *extraspec = NULL;
+ gcry_err_code_t ec = 0;
+
+ REGISTER_DEFAULT_CIPHERS;
+
+ ath_mutex_lock (&ciphers_registered_lock);
+ module = _gcry_module_lookup_id (ciphers_registered, algo);
+ if (module && !(module->flags & FLAG_MODULE_DISABLED))
+ extraspec = module->extraspec;
+ ath_mutex_unlock (&ciphers_registered_lock);
+ if (extraspec && extraspec->selftest)
+ ec = extraspec->selftest (algo, extended, report);
+ else
+ {
+ ec = GPG_ERR_CIPHER_ALGO;
+ if (report)
+ report ("cipher", algo, "module",
+ module && !(module->flags & FLAG_MODULE_DISABLED)?
+ "no selftest available" :
+ module? "algorithm disabled" : "algorithm not found");
+ }
+
+ if (module)
+ {
+ ath_mutex_lock (&ciphers_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&ciphers_registered_lock);
+ }
+ return gpg_error (ec);
+}
diff --git a/grub-core/lib/libgcrypt/cipher/crc.c b/grub-core/lib/libgcrypt/cipher/crc.c
new file mode 100644
index 0000000..d04fff8
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/crc.c
@@ -0,0 +1,297 @@
+/* crc.c - Cyclic redundancy checks.
+ * Copyright (C) 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+/* Table of CRCs of all 8-bit messages. Generated by running code
+ from RFC 1952 modified to print out the table. */
+static u32 crc32_table[256] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
+ 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
+ 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
+ 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
+ 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
+ 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
+ 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
+ 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
+ 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
+ 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
+ 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
+ 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
+ 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
+ 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
+ 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
+ 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
+ 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
+ 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
+};
+
+/*
+ * The following function was extracted from RFC 1952 by Simon
+ * Josefsson, for the Shishi project, and modified to be compatible
+ * with the modified CRC-32 used by RFC 1510, and subsequently
+ * modified for GNU Libgcrypt to allow it to be used for calculating
+ * both unmodified CRC-32 and modified CRC-32 values. Original
+ * copyright and notice from the document follows:
+ *
+ * Copyright (c) 1996 L. Peter Deutsch
+ *
+ * Permission is granted to copy and distribute this document for
+ * any purpose and without charge, including translations into
+ * other languages and incorporation into compilations, provided
+ * that the copyright notice and this notice are preserved, and
+ * that any substantive changes or deletions from the original are
+ * clearly marked.
+ *
+ * The copyright on RFCs, and consequently the function below, are
+ * supposedly also retroactively claimed by the Internet Society
+ * (according to rfc-editor@rfc-editor.org), with the following
+ * copyright notice:
+ *
+ * Copyright (C) The Internet Society. All Rights Reserved.
+ *
+ * This document and translations of it may be copied and furnished
+ * to others, and derivative works that comment on or otherwise
+ * explain it or assist in its implementation may be prepared,
+ * copied, published and distributed, in whole or in part, without
+ * restriction of any kind, provided that the above copyright
+ * notice and this paragraph are included on all such copies and
+ * derivative works. However, this document itself may not be
+ * modified in any way, such as by removing the copyright notice or
+ * references to the Internet Society or other Internet
+ * organizations, except as needed for the purpose of developing
+ * Internet standards in which case the procedures for copyrights
+ * defined in the Internet Standards process must be followed, or
+ * as required to translate it into languages other than English.
+ *
+ * The limited permissions granted above are perpetual and will not be
+ * revoked by the Internet Society or its successors or assigns.
+ *
+ * This document and the information contained herein is provided
+ * on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
+ * ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
+ * OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ */
+static u32
+update_crc32 (u32 crc, const void *buf_arg, size_t len)
+{
+ const char *buf = buf_arg;
+ size_t n;
+
+ for (n = 0; n < len; n++)
+ crc = crc32_table[(crc ^ buf[n]) & 0xff] ^ (crc >> 8);
+
+ return crc;
+}
+
+typedef struct
+{
+ u32 CRC;
+ byte buf[4];
+}
+CRC_CONTEXT;
+
+/* CRC32 */
+
+static void
+crc32_init (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC = 0 ^ 0xffffffffL;
+}
+
+static void
+crc32_write (void *context, const void *inbuf, size_t inlen)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ if (!inbuf)
+ return;
+ ctx->CRC = update_crc32 (ctx->CRC, inbuf, inlen);
+}
+
+static byte *
+crc32_read (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ return ctx->buf;
+}
+
+static void
+crc32_final (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC ^= 0xffffffffL;
+ ctx->buf[0] = (ctx->CRC >> 24) & 0xFF;
+ ctx->buf[1] = (ctx->CRC >> 16) & 0xFF;
+ ctx->buf[2] = (ctx->CRC >> 8) & 0xFF;
+ ctx->buf[3] = (ctx->CRC ) & 0xFF;
+}
+
+/* CRC32 a'la RFC 1510 */
+static void
+crc32rfc1510_init (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC = 0;
+}
+
+static void
+crc32rfc1510_final (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->buf[0] = (ctx->CRC >> 24) & 0xFF;
+ ctx->buf[1] = (ctx->CRC >> 16) & 0xFF;
+ ctx->buf[2] = (ctx->CRC >> 8) & 0xFF;
+ ctx->buf[3] = (ctx->CRC ) & 0xFF;
+}
+
+/* CRC24 a'la RFC 2440 */
+/*
+ * The following CRC 24 routines are adapted from RFC 2440, which has
+ * the following copyright notice:
+ *
+ * Copyright (C) The Internet Society (1998). All Rights Reserved.
+ *
+ * This document and translations of it may be copied and furnished
+ * to others, and derivative works that comment on or otherwise
+ * explain it or assist in its implementation may be prepared,
+ * copied, published and distributed, in whole or in part, without
+ * restriction of any kind, provided that the above copyright notice
+ * and this paragraph are included on all such copies and derivative
+ * works. However, this document itself may not be modified in any
+ * way, such as by removing the copyright notice or references to
+ * the Internet Society or other Internet organizations, except as
+ * needed for the purpose of developing Internet standards in which
+ * case the procedures for copyrights defined in the Internet
+ * Standards process must be followed, or as required to translate
+ * it into languages other than English.
+ *
+ * The limited permissions granted above are perpetual and will not be
+ * revoked by the Internet Society or its successors or assigns.
+ *
+ * This document and the information contained herein is provided on
+ * an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
+ * ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
+ * OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#define CRC24_INIT 0xb704ceL
+#define CRC24_POLY 0x1864cfbL
+
+static void
+crc24rfc2440_init (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->CRC = CRC24_INIT;
+}
+
+static void
+crc24rfc2440_write (void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ int i;
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+
+ if (!inbuf)
+ return;
+
+ while (inlen--) {
+ ctx->CRC ^= (*inbuf++) << 16;
+ for (i = 0; i < 8; i++) {
+ ctx->CRC <<= 1;
+ if (ctx->CRC & 0x1000000)
+ ctx->CRC ^= CRC24_POLY;
+ }
+ }
+}
+
+static void
+crc24rfc2440_final (void *context)
+{
+ CRC_CONTEXT *ctx = (CRC_CONTEXT *) context;
+ ctx->buf[0] = (ctx->CRC >> 16) & 0xFF;
+ ctx->buf[1] = (ctx->CRC >> 8) & 0xFF;
+ ctx->buf[2] = (ctx->CRC ) & 0xFF;
+}
+
+gcry_md_spec_t _gcry_digest_spec_crc32 =
+ {
+ "CRC32", NULL, 0, NULL, 4,
+ crc32_init, crc32_write, crc32_final, crc32_read,
+ sizeof (CRC_CONTEXT)
+ };
+
+gcry_md_spec_t _gcry_digest_spec_crc32_rfc1510 =
+ {
+ "CRC32RFC1510", NULL, 0, NULL, 4,
+ crc32rfc1510_init, crc32_write,
+ crc32rfc1510_final, crc32_read,
+ sizeof (CRC_CONTEXT)
+ };
+
+gcry_md_spec_t _gcry_digest_spec_crc24_rfc2440 =
+ {
+ "CRC24RFC2440", NULL, 0, NULL, 3,
+ crc24rfc2440_init, crc24rfc2440_write,
+ crc24rfc2440_final, crc32_read,
+ sizeof (CRC_CONTEXT)
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/des.c b/grub-core/lib/libgcrypt/cipher/des.c
new file mode 100644
index 0000000..f91df77
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/des.c
@@ -0,0 +1,1196 @@
+/* des.c - DES and Triple-DES encryption/decryption Algorithm
+ * Copyright (C) 1998, 1999, 2001, 2002, 2003,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * For a description of triple encryption, see:
+ * Bruce Schneier: Applied Cryptography. Second Edition.
+ * John Wiley & Sons, 1996. ISBN 0-471-12845-7. Pages 358 ff.
+ * This implementation is according to the definition of DES in FIPS
+ * PUB 46-2 from December 1993.
+ */
+
+
+/*
+ * Written by Michael Roth <mroth@nessie.de>, September 1998
+ */
+
+
+/*
+ * U S A G E
+ * ===========
+ *
+ * For DES or Triple-DES encryption/decryption you must initialize a proper
+ * encryption context with a key.
+ *
+ * A DES key is 64bit wide but only 56bits of the key are used. The remaining
+ * bits are parity bits and they will _not_ checked in this implementation, but
+ * simply ignored.
+ *
+ * For Triple-DES you could use either two 64bit keys or three 64bit keys.
+ * The parity bits will _not_ checked, too.
+ *
+ * After initializing a context with a key you could use this context to
+ * encrypt or decrypt data in 64bit blocks in Electronic Codebook Mode.
+ *
+ * (In the examples below the slashes at the beginning and ending of comments
+ * are omited.)
+ *
+ * DES Example
+ * -----------
+ * unsigned char key[8];
+ * unsigned char plaintext[8];
+ * unsigned char ciphertext[8];
+ * unsigned char recoverd[8];
+ * des_ctx context;
+ *
+ * * Fill 'key' and 'plaintext' with some data *
+ * ....
+ *
+ * * Set up the DES encryption context *
+ * des_setkey(context, key);
+ *
+ * * Encrypt the plaintext *
+ * des_ecb_encrypt(context, plaintext, ciphertext);
+ *
+ * * To recover the orginal plaintext from ciphertext use: *
+ * des_ecb_decrypt(context, ciphertext, recoverd);
+ *
+ *
+ * Triple-DES Example
+ * ------------------
+ * unsigned char key1[8];
+ * unsigned char key2[8];
+ * unsigned char key3[8];
+ * unsigned char plaintext[8];
+ * unsigned char ciphertext[8];
+ * unsigned char recoverd[8];
+ * tripledes_ctx context;
+ *
+ * * If you would like to use two 64bit keys, fill 'key1' and'key2'
+ * then setup the encryption context: *
+ * tripledes_set2keys(context, key1, key2);
+ *
+ * * To use three 64bit keys with Triple-DES use: *
+ * tripledes_set3keys(context, key1, key2, key3);
+ *
+ * * Encrypting plaintext with Triple-DES *
+ * tripledes_ecb_encrypt(context, plaintext, ciphertext);
+ *
+ * * Decrypting ciphertext to recover the plaintext with Triple-DES *
+ * tripledes_ecb_decrypt(context, ciphertext, recoverd);
+ *
+ *
+ * Selftest
+ * --------
+ * char *error_msg;
+ *
+ * * To perform a selftest of this DES/Triple-DES implementation use the
+ * function selftest(). It will return an error string if there are
+ * some problems with this library. *
+ *
+ * if ( (error_msg = selftest()) )
+ * {
+ * fprintf(stderr, "An error in the DES/Tripple-DES implementation occured: %s\n", error_msg);
+ * abort();
+ * }
+ */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <string.h> /* memcpy, memcmp */
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+#if defined(__GNUC__) && defined(__GNU_LIBRARY__)
+#define working_memcmp memcmp
+#else
+/*
+ * According to the SunOS man page, memcmp returns indeterminate sign
+ * depending on whether characters are signed or not.
+ */
+static int
+working_memcmp( const char *a, const char *b, size_t n )
+{
+ for( ; n; n--, a++, b++ )
+ if( *a != *b )
+ return (int)(*(byte*)a) - (int)(*(byte*)b);
+ return 0;
+}
+#endif
+
+/*
+ * Encryption/Decryption context of DES
+ */
+typedef struct _des_ctx
+ {
+ u32 encrypt_subkeys[32];
+ u32 decrypt_subkeys[32];
+ }
+des_ctx[1];
+
+/*
+ * Encryption/Decryption context of Triple-DES
+ */
+typedef struct _tripledes_ctx
+ {
+ u32 encrypt_subkeys[96];
+ u32 decrypt_subkeys[96];
+ struct {
+ int no_weak_key;
+ } flags;
+ }
+tripledes_ctx[1];
+
+static void des_key_schedule (const byte *, u32 *);
+static int des_setkey (struct _des_ctx *, const byte *);
+static int des_ecb_crypt (struct _des_ctx *, const byte *, byte *, int);
+static int tripledes_set2keys (struct _tripledes_ctx *,
+ const byte *, const byte *);
+static int tripledes_set3keys (struct _tripledes_ctx *,
+ const byte *, const byte *, const byte *);
+static int tripledes_ecb_crypt (struct _tripledes_ctx *,
+ const byte *, byte *, int);
+static int is_weak_key ( const byte *key );
+static const char *selftest (void);
+
+static int initialized;
+
+
+
+
+/*
+ * The s-box values are permuted according to the 'primitive function P'
+ * and are rotated one bit to the left.
+ */
+static u32 sbox1[64] =
+{
+ 0x01010400, 0x00000000, 0x00010000, 0x01010404, 0x01010004, 0x00010404, 0x00000004, 0x00010000,
+ 0x00000400, 0x01010400, 0x01010404, 0x00000400, 0x01000404, 0x01010004, 0x01000000, 0x00000004,
+ 0x00000404, 0x01000400, 0x01000400, 0x00010400, 0x00010400, 0x01010000, 0x01010000, 0x01000404,
+ 0x00010004, 0x01000004, 0x01000004, 0x00010004, 0x00000000, 0x00000404, 0x00010404, 0x01000000,
+ 0x00010000, 0x01010404, 0x00000004, 0x01010000, 0x01010400, 0x01000000, 0x01000000, 0x00000400,
+ 0x01010004, 0x00010000, 0x00010400, 0x01000004, 0x00000400, 0x00000004, 0x01000404, 0x00010404,
+ 0x01010404, 0x00010004, 0x01010000, 0x01000404, 0x01000004, 0x00000404, 0x00010404, 0x01010400,
+ 0x00000404, 0x01000400, 0x01000400, 0x00000000, 0x00010004, 0x00010400, 0x00000000, 0x01010004
+};
+
+static u32 sbox2[64] =
+{
+ 0x80108020, 0x80008000, 0x00008000, 0x00108020, 0x00100000, 0x00000020, 0x80100020, 0x80008020,
+ 0x80000020, 0x80108020, 0x80108000, 0x80000000, 0x80008000, 0x00100000, 0x00000020, 0x80100020,
+ 0x00108000, 0x00100020, 0x80008020, 0x00000000, 0x80000000, 0x00008000, 0x00108020, 0x80100000,
+ 0x00100020, 0x80000020, 0x00000000, 0x00108000, 0x00008020, 0x80108000, 0x80100000, 0x00008020,
+ 0x00000000, 0x00108020, 0x80100020, 0x00100000, 0x80008020, 0x80100000, 0x80108000, 0x00008000,
+ 0x80100000, 0x80008000, 0x00000020, 0x80108020, 0x00108020, 0x00000020, 0x00008000, 0x80000000,
+ 0x00008020, 0x80108000, 0x00100000, 0x80000020, 0x00100020, 0x80008020, 0x80000020, 0x00100020,
+ 0x00108000, 0x00000000, 0x80008000, 0x00008020, 0x80000000, 0x80100020, 0x80108020, 0x00108000
+};
+
+static u32 sbox3[64] =
+{
+ 0x00000208, 0x08020200, 0x00000000, 0x08020008, 0x08000200, 0x00000000, 0x00020208, 0x08000200,
+ 0x00020008, 0x08000008, 0x08000008, 0x00020000, 0x08020208, 0x00020008, 0x08020000, 0x00000208,
+ 0x08000000, 0x00000008, 0x08020200, 0x00000200, 0x00020200, 0x08020000, 0x08020008, 0x00020208,
+ 0x08000208, 0x00020200, 0x00020000, 0x08000208, 0x00000008, 0x08020208, 0x00000200, 0x08000000,
+ 0x08020200, 0x08000000, 0x00020008, 0x00000208, 0x00020000, 0x08020200, 0x08000200, 0x00000000,
+ 0x00000200, 0x00020008, 0x08020208, 0x08000200, 0x08000008, 0x00000200, 0x00000000, 0x08020008,
+ 0x08000208, 0x00020000, 0x08000000, 0x08020208, 0x00000008, 0x00020208, 0x00020200, 0x08000008,
+ 0x08020000, 0x08000208, 0x00000208, 0x08020000, 0x00020208, 0x00000008, 0x08020008, 0x00020200
+};
+
+static u32 sbox4[64] =
+{
+ 0x00802001, 0x00002081, 0x00002081, 0x00000080, 0x00802080, 0x00800081, 0x00800001, 0x00002001,
+ 0x00000000, 0x00802000, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00800080, 0x00800001,
+ 0x00000001, 0x00002000, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002001, 0x00002080,
+ 0x00800081, 0x00000001, 0x00002080, 0x00800080, 0x00002000, 0x00802080, 0x00802081, 0x00000081,
+ 0x00800080, 0x00800001, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00000000, 0x00802000,
+ 0x00002080, 0x00800080, 0x00800081, 0x00000001, 0x00802001, 0x00002081, 0x00002081, 0x00000080,
+ 0x00802081, 0x00000081, 0x00000001, 0x00002000, 0x00800001, 0x00002001, 0x00802080, 0x00800081,
+ 0x00002001, 0x00002080, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002000, 0x00802080
+};
+
+static u32 sbox5[64] =
+{
+ 0x00000100, 0x02080100, 0x02080000, 0x42000100, 0x00080000, 0x00000100, 0x40000000, 0x02080000,
+ 0x40080100, 0x00080000, 0x02000100, 0x40080100, 0x42000100, 0x42080000, 0x00080100, 0x40000000,
+ 0x02000000, 0x40080000, 0x40080000, 0x00000000, 0x40000100, 0x42080100, 0x42080100, 0x02000100,
+ 0x42080000, 0x40000100, 0x00000000, 0x42000000, 0x02080100, 0x02000000, 0x42000000, 0x00080100,
+ 0x00080000, 0x42000100, 0x00000100, 0x02000000, 0x40000000, 0x02080000, 0x42000100, 0x40080100,
+ 0x02000100, 0x40000000, 0x42080000, 0x02080100, 0x40080100, 0x00000100, 0x02000000, 0x42080000,
+ 0x42080100, 0x00080100, 0x42000000, 0x42080100, 0x02080000, 0x00000000, 0x40080000, 0x42000000,
+ 0x00080100, 0x02000100, 0x40000100, 0x00080000, 0x00000000, 0x40080000, 0x02080100, 0x40000100
+};
+
+static u32 sbox6[64] =
+{
+ 0x20000010, 0x20400000, 0x00004000, 0x20404010, 0x20400000, 0x00000010, 0x20404010, 0x00400000,
+ 0x20004000, 0x00404010, 0x00400000, 0x20000010, 0x00400010, 0x20004000, 0x20000000, 0x00004010,
+ 0x00000000, 0x00400010, 0x20004010, 0x00004000, 0x00404000, 0x20004010, 0x00000010, 0x20400010,
+ 0x20400010, 0x00000000, 0x00404010, 0x20404000, 0x00004010, 0x00404000, 0x20404000, 0x20000000,
+ 0x20004000, 0x00000010, 0x20400010, 0x00404000, 0x20404010, 0x00400000, 0x00004010, 0x20000010,
+ 0x00400000, 0x20004000, 0x20000000, 0x00004010, 0x20000010, 0x20404010, 0x00404000, 0x20400000,
+ 0x00404010, 0x20404000, 0x00000000, 0x20400010, 0x00000010, 0x00004000, 0x20400000, 0x00404010,
+ 0x00004000, 0x00400010, 0x20004010, 0x00000000, 0x20404000, 0x20000000, 0x00400010, 0x20004010
+};
+
+static u32 sbox7[64] =
+{
+ 0x00200000, 0x04200002, 0x04000802, 0x00000000, 0x00000800, 0x04000802, 0x00200802, 0x04200800,
+ 0x04200802, 0x00200000, 0x00000000, 0x04000002, 0x00000002, 0x04000000, 0x04200002, 0x00000802,
+ 0x04000800, 0x00200802, 0x00200002, 0x04000800, 0x04000002, 0x04200000, 0x04200800, 0x00200002,
+ 0x04200000, 0x00000800, 0x00000802, 0x04200802, 0x00200800, 0x00000002, 0x04000000, 0x00200800,
+ 0x04000000, 0x00200800, 0x00200000, 0x04000802, 0x04000802, 0x04200002, 0x04200002, 0x00000002,
+ 0x00200002, 0x04000000, 0x04000800, 0x00200000, 0x04200800, 0x00000802, 0x00200802, 0x04200800,
+ 0x00000802, 0x04000002, 0x04200802, 0x04200000, 0x00200800, 0x00000000, 0x00000002, 0x04200802,
+ 0x00000000, 0x00200802, 0x04200000, 0x00000800, 0x04000002, 0x04000800, 0x00000800, 0x00200002
+};
+
+static u32 sbox8[64] =
+{
+ 0x10001040, 0x00001000, 0x00040000, 0x10041040, 0x10000000, 0x10001040, 0x00000040, 0x10000000,
+ 0x00040040, 0x10040000, 0x10041040, 0x00041000, 0x10041000, 0x00041040, 0x00001000, 0x00000040,
+ 0x10040000, 0x10000040, 0x10001000, 0x00001040, 0x00041000, 0x00040040, 0x10040040, 0x10041000,
+ 0x00001040, 0x00000000, 0x00000000, 0x10040040, 0x10000040, 0x10001000, 0x00041040, 0x00040000,
+ 0x00041040, 0x00040000, 0x10041000, 0x00001000, 0x00000040, 0x10040040, 0x00001000, 0x00041040,
+ 0x10001000, 0x00000040, 0x10000040, 0x10040000, 0x10040040, 0x10000000, 0x00040000, 0x10001040,
+ 0x00000000, 0x10041040, 0x00040040, 0x10000040, 0x10040000, 0x10001000, 0x10001040, 0x00000000,
+ 0x10041040, 0x00041000, 0x00041000, 0x00001040, 0x00001040, 0x00040040, 0x10000000, 0x10041000
+};
+
+
+/*
+ * These two tables are part of the 'permuted choice 1' function.
+ * In this implementation several speed improvements are done.
+ */
+static u32 leftkey_swap[16] =
+{
+ 0x00000000, 0x00000001, 0x00000100, 0x00000101,
+ 0x00010000, 0x00010001, 0x00010100, 0x00010101,
+ 0x01000000, 0x01000001, 0x01000100, 0x01000101,
+ 0x01010000, 0x01010001, 0x01010100, 0x01010101
+};
+
+static u32 rightkey_swap[16] =
+{
+ 0x00000000, 0x01000000, 0x00010000, 0x01010000,
+ 0x00000100, 0x01000100, 0x00010100, 0x01010100,
+ 0x00000001, 0x01000001, 0x00010001, 0x01010001,
+ 0x00000101, 0x01000101, 0x00010101, 0x01010101,
+};
+
+
+
+/*
+ * Numbers of left shifts per round for encryption subkeys.
+ * To calculate the decryption subkeys we just reverse the
+ * ordering of the calculated encryption subkeys. So their
+ * is no need for a decryption rotate tab.
+ */
+static byte encrypt_rotate_tab[16] =
+{
+ 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
+};
+
+
+
+/*
+ * Table with weak DES keys sorted in ascending order.
+ * In DES their are 64 known keys which are weak. They are weak
+ * because they produce only one, two or four different
+ * subkeys in the subkey scheduling process.
+ * The keys in this table have all their parity bits cleared.
+ */
+static byte weak_keys[64][8] =
+{
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /*w*/
+ { 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e },
+ { 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0 },
+ { 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe },
+ { 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x0e }, /*sw*/
+ { 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e, 0x00 },
+ { 0x00, 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0, 0xfe },
+ { 0x00, 0x1e, 0xfe, 0xe0, 0x00, 0x0e, 0xfe, 0xf0 },
+ { 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf0 }, /*sw*/
+ { 0x00, 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e, 0xfe },
+ { 0x00, 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0, 0x00 },
+ { 0x00, 0xe0, 0xfe, 0x1e, 0x00, 0xf0, 0xfe, 0x0e },
+ { 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe }, /*sw*/
+ { 0x00, 0xfe, 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0 },
+ { 0x00, 0xfe, 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e },
+ { 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00 },
+ { 0x1e, 0x00, 0x00, 0x1e, 0x0e, 0x00, 0x00, 0x0e },
+ { 0x1e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x0e, 0x00 }, /*sw*/
+ { 0x1e, 0x00, 0xe0, 0xfe, 0x0e, 0x00, 0xf0, 0xfe },
+ { 0x1e, 0x00, 0xfe, 0xe0, 0x0e, 0x00, 0xfe, 0xf0 },
+ { 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00 },
+ { 0x1e, 0x1e, 0x1e, 0x1e, 0x0e, 0x0e, 0x0e, 0x0e }, /*w*/
+ { 0x1e, 0x1e, 0xe0, 0xe0, 0x0e, 0x0e, 0xf0, 0xf0 },
+ { 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e, 0xfe, 0xfe },
+ { 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0, 0x00, 0xfe },
+ { 0x1e, 0xe0, 0x1e, 0xe0, 0x0e, 0xf0, 0x0e, 0xf0 }, /*sw*/
+ { 0x1e, 0xe0, 0xe0, 0x1e, 0x0e, 0xf0, 0xf0, 0x0e },
+ { 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0, 0xfe, 0x00 },
+ { 0x1e, 0xfe, 0x00, 0xe0, 0x0e, 0xfe, 0x00, 0xf0 },
+ { 0x1e, 0xfe, 0x1e, 0xfe, 0x0e, 0xfe, 0x0e, 0xfe }, /*sw*/
+ { 0x1e, 0xfe, 0xe0, 0x00, 0x0e, 0xfe, 0xf0, 0x00 },
+ { 0x1e, 0xfe, 0xfe, 0x1e, 0x0e, 0xfe, 0xfe, 0x0e },
+ { 0xe0, 0x00, 0x00, 0xe0, 0xf0, 0x00, 0x00, 0xf0 },
+ { 0xe0, 0x00, 0x1e, 0xfe, 0xf0, 0x00, 0x0e, 0xfe },
+ { 0xe0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf0, 0x00 }, /*sw*/
+ { 0xe0, 0x00, 0xfe, 0x1e, 0xf0, 0x00, 0xfe, 0x0e },
+ { 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e, 0x00, 0xfe },
+ { 0xe0, 0x1e, 0x1e, 0xe0, 0xf0, 0x0e, 0x0e, 0xf0 },
+ { 0xe0, 0x1e, 0xe0, 0x1e, 0xf0, 0x0e, 0xf0, 0x0e }, /*sw*/
+ { 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e, 0xfe, 0x00 },
+ { 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00 },
+ { 0xe0, 0xe0, 0x1e, 0x1e, 0xf0, 0xf0, 0x0e, 0x0e },
+ { 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0 }, /*w*/
+ { 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0, 0xfe, 0xfe },
+ { 0xe0, 0xfe, 0x00, 0x1e, 0xf0, 0xfe, 0x00, 0x0e },
+ { 0xe0, 0xfe, 0x1e, 0x00, 0xf0, 0xfe, 0x0e, 0x00 },
+ { 0xe0, 0xfe, 0xe0, 0xfe, 0xf0, 0xfe, 0xf0, 0xfe }, /*sw*/
+ { 0xe0, 0xfe, 0xfe, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0 },
+ { 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe },
+ { 0xfe, 0x00, 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0 },
+ { 0xfe, 0x00, 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e },
+ { 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00 }, /*sw*/
+ { 0xfe, 0x1e, 0x00, 0xe0, 0xfe, 0x0e, 0x00, 0xf0 },
+ { 0xfe, 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e, 0xfe },
+ { 0xfe, 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0, 0x00 },
+ { 0xfe, 0x1e, 0xfe, 0x1e, 0xfe, 0x0e, 0xfe, 0x0e }, /*sw*/
+ { 0xfe, 0xe0, 0x00, 0x1e, 0xfe, 0xf0, 0x00, 0x0e },
+ { 0xfe, 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e, 0x00 },
+ { 0xfe, 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0, 0xfe },
+ { 0xfe, 0xe0, 0xfe, 0xe0, 0xfe, 0xf0, 0xfe, 0xf0 }, /*sw*/
+ { 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00 },
+ { 0xfe, 0xfe, 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e },
+ { 0xfe, 0xfe, 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0 },
+ { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe } /*w*/
+};
+static unsigned char weak_keys_chksum[20] = {
+ 0xD0, 0xCF, 0x07, 0x38, 0x93, 0x70, 0x8A, 0x83, 0x7D, 0xD7,
+ 0x8A, 0x36, 0x65, 0x29, 0x6C, 0x1F, 0x7C, 0x3F, 0xD3, 0x41
+};
+
+
+
+/*
+ * Macro to swap bits across two words.
+ */
+#define DO_PERMUTATION(a, temp, b, offset, mask) \
+ temp = ((a>>offset) ^ b) & mask; \
+ b ^= temp; \
+ a ^= temp<<offset;
+
+
+/*
+ * This performs the 'initial permutation' of the data to be encrypted
+ * or decrypted. Additionally the resulting two words are rotated one bit
+ * to the left.
+ */
+#define INITIAL_PERMUTATION(left, temp, right) \
+ DO_PERMUTATION(left, temp, right, 4, 0x0f0f0f0f) \
+ DO_PERMUTATION(left, temp, right, 16, 0x0000ffff) \
+ DO_PERMUTATION(right, temp, left, 2, 0x33333333) \
+ DO_PERMUTATION(right, temp, left, 8, 0x00ff00ff) \
+ right = (right << 1) | (right >> 31); \
+ temp = (left ^ right) & 0xaaaaaaaa; \
+ right ^= temp; \
+ left ^= temp; \
+ left = (left << 1) | (left >> 31);
+
+/*
+ * The 'inverse initial permutation'.
+ */
+#define FINAL_PERMUTATION(left, temp, right) \
+ left = (left << 31) | (left >> 1); \
+ temp = (left ^ right) & 0xaaaaaaaa; \
+ left ^= temp; \
+ right ^= temp; \
+ right = (right << 31) | (right >> 1); \
+ DO_PERMUTATION(right, temp, left, 8, 0x00ff00ff) \
+ DO_PERMUTATION(right, temp, left, 2, 0x33333333) \
+ DO_PERMUTATION(left, temp, right, 16, 0x0000ffff) \
+ DO_PERMUTATION(left, temp, right, 4, 0x0f0f0f0f)
+
+
+/*
+ * A full DES round including 'expansion function', 'sbox substitution'
+ * and 'primitive function P' but without swapping the left and right word.
+ * Please note: The data in 'from' and 'to' is already rotated one bit to
+ * the left, done in the initial permutation.
+ */
+#define DES_ROUND(from, to, work, subkey) \
+ work = from ^ *subkey++; \
+ to ^= sbox8[ work & 0x3f ]; \
+ to ^= sbox6[ (work>>8) & 0x3f ]; \
+ to ^= sbox4[ (work>>16) & 0x3f ]; \
+ to ^= sbox2[ (work>>24) & 0x3f ]; \
+ work = ((from << 28) | (from >> 4)) ^ *subkey++; \
+ to ^= sbox7[ work & 0x3f ]; \
+ to ^= sbox5[ (work>>8) & 0x3f ]; \
+ to ^= sbox3[ (work>>16) & 0x3f ]; \
+ to ^= sbox1[ (work>>24) & 0x3f ];
+
+/*
+ * Macros to convert 8 bytes from/to 32bit words.
+ */
+#define READ_64BIT_DATA(data, left, right) \
+ left = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]; \
+ right = (data[4] << 24) | (data[5] << 16) | (data[6] << 8) | data[7];
+
+#define WRITE_64BIT_DATA(data, left, right) \
+ data[0] = (left >> 24) &0xff; data[1] = (left >> 16) &0xff; \
+ data[2] = (left >> 8) &0xff; data[3] = left &0xff; \
+ data[4] = (right >> 24) &0xff; data[5] = (right >> 16) &0xff; \
+ data[6] = (right >> 8) &0xff; data[7] = right &0xff;
+
+/*
+ * Handy macros for encryption and decryption of data
+ */
+#define des_ecb_encrypt(ctx, from, to) des_ecb_crypt(ctx, from, to, 0)
+#define des_ecb_decrypt(ctx, from, to) des_ecb_crypt(ctx, from, to, 1)
+#define tripledes_ecb_encrypt(ctx, from, to) tripledes_ecb_crypt(ctx,from,to,0)
+#define tripledes_ecb_decrypt(ctx, from, to) tripledes_ecb_crypt(ctx,from,to,1)
+
+
+
+
+
+
+/*
+ * des_key_schedule(): Calculate 16 subkeys pairs (even/odd) for
+ * 16 encryption rounds.
+ * To calculate subkeys for decryption the caller
+ * have to reorder the generated subkeys.
+ *
+ * rawkey: 8 Bytes of key data
+ * subkey: Array of at least 32 u32s. Will be filled
+ * with calculated subkeys.
+ *
+ */
+static void
+des_key_schedule (const byte * rawkey, u32 * subkey)
+{
+ u32 left, right, work;
+ int round;
+
+ READ_64BIT_DATA (rawkey, left, right)
+
+ DO_PERMUTATION (right, work, left, 4, 0x0f0f0f0f)
+ DO_PERMUTATION (right, work, left, 0, 0x10101010)
+
+ left = ((leftkey_swap[(left >> 0) & 0xf] << 3)
+ | (leftkey_swap[(left >> 8) & 0xf] << 2)
+ | (leftkey_swap[(left >> 16) & 0xf] << 1)
+ | (leftkey_swap[(left >> 24) & 0xf])
+ | (leftkey_swap[(left >> 5) & 0xf] << 7)
+ | (leftkey_swap[(left >> 13) & 0xf] << 6)
+ | (leftkey_swap[(left >> 21) & 0xf] << 5)
+ | (leftkey_swap[(left >> 29) & 0xf] << 4));
+
+ left &= 0x0fffffff;
+
+ right = ((rightkey_swap[(right >> 1) & 0xf] << 3)
+ | (rightkey_swap[(right >> 9) & 0xf] << 2)
+ | (rightkey_swap[(right >> 17) & 0xf] << 1)
+ | (rightkey_swap[(right >> 25) & 0xf])
+ | (rightkey_swap[(right >> 4) & 0xf] << 7)
+ | (rightkey_swap[(right >> 12) & 0xf] << 6)
+ | (rightkey_swap[(right >> 20) & 0xf] << 5)
+ | (rightkey_swap[(right >> 28) & 0xf] << 4));
+
+ right &= 0x0fffffff;
+
+ for (round = 0; round < 16; ++round)
+ {
+ left = ((left << encrypt_rotate_tab[round])
+ | (left >> (28 - encrypt_rotate_tab[round]))) & 0x0fffffff;
+ right = ((right << encrypt_rotate_tab[round])
+ | (right >> (28 - encrypt_rotate_tab[round]))) & 0x0fffffff;
+
+ *subkey++ = (((left << 4) & 0x24000000)
+ | ((left << 28) & 0x10000000)
+ | ((left << 14) & 0x08000000)
+ | ((left << 18) & 0x02080000)
+ | ((left << 6) & 0x01000000)
+ | ((left << 9) & 0x00200000)
+ | ((left >> 1) & 0x00100000)
+ | ((left << 10) & 0x00040000)
+ | ((left << 2) & 0x00020000)
+ | ((left >> 10) & 0x00010000)
+ | ((right >> 13) & 0x00002000)
+ | ((right >> 4) & 0x00001000)
+ | ((right << 6) & 0x00000800)
+ | ((right >> 1) & 0x00000400)
+ | ((right >> 14) & 0x00000200)
+ | (right & 0x00000100)
+ | ((right >> 5) & 0x00000020)
+ | ((right >> 10) & 0x00000010)
+ | ((right >> 3) & 0x00000008)
+ | ((right >> 18) & 0x00000004)
+ | ((right >> 26) & 0x00000002)
+ | ((right >> 24) & 0x00000001));
+
+ *subkey++ = (((left << 15) & 0x20000000)
+ | ((left << 17) & 0x10000000)
+ | ((left << 10) & 0x08000000)
+ | ((left << 22) & 0x04000000)
+ | ((left >> 2) & 0x02000000)
+ | ((left << 1) & 0x01000000)
+ | ((left << 16) & 0x00200000)
+ | ((left << 11) & 0x00100000)
+ | ((left << 3) & 0x00080000)
+ | ((left >> 6) & 0x00040000)
+ | ((left << 15) & 0x00020000)
+ | ((left >> 4) & 0x00010000)
+ | ((right >> 2) & 0x00002000)
+ | ((right << 8) & 0x00001000)
+ | ((right >> 14) & 0x00000808)
+ | ((right >> 9) & 0x00000400)
+ | ((right) & 0x00000200)
+ | ((right << 7) & 0x00000100)
+ | ((right >> 7) & 0x00000020)
+ | ((right >> 3) & 0x00000011)
+ | ((right << 2) & 0x00000004)
+ | ((right >> 21) & 0x00000002));
+ }
+}
+
+
+/*
+ * Fill a DES context with subkeys calculated from a 64bit key.
+ * Does not check parity bits, but simply ignore them.
+ * Does not check for weak keys.
+ */
+static int
+des_setkey (struct _des_ctx *ctx, const byte * key)
+{
+ static const char *selftest_failed;
+ int i;
+
+ if (!fips_mode () && !initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+
+ if (selftest_failed)
+ log_error ("%s\n", selftest_failed);
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ des_key_schedule (key, ctx->encrypt_subkeys);
+ _gcry_burn_stack (32);
+
+ for(i=0; i<32; i+=2)
+ {
+ ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[30-i];
+ ctx->decrypt_subkeys[i+1] = ctx->encrypt_subkeys[31-i];
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * Electronic Codebook Mode DES encryption/decryption of data according
+ * to 'mode'.
+ */
+static int
+des_ecb_crypt (struct _des_ctx *ctx, const byte * from, byte * to, int mode)
+{
+ u32 left, right, work;
+ u32 *keys;
+
+ keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys;
+
+ READ_64BIT_DATA (from, left, right)
+ INITIAL_PERMUTATION (left, work, right)
+
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+
+ FINAL_PERMUTATION (right, work, left)
+ WRITE_64BIT_DATA (to, right, left)
+
+ return 0;
+}
+
+
+
+/*
+ * Fill a Triple-DES context with subkeys calculated from two 64bit keys.
+ * Does not check the parity bits of the keys, but simply ignore them.
+ * Does not check for weak keys.
+ */
+static int
+tripledes_set2keys (struct _tripledes_ctx *ctx,
+ const byte * key1,
+ const byte * key2)
+{
+ int i;
+
+ des_key_schedule (key1, ctx->encrypt_subkeys);
+ des_key_schedule (key2, &(ctx->decrypt_subkeys[32]));
+ _gcry_burn_stack (32);
+
+ for(i=0; i<32; i+=2)
+ {
+ ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[30-i];
+ ctx->decrypt_subkeys[i+1] = ctx->encrypt_subkeys[31-i];
+
+ ctx->encrypt_subkeys[i+32] = ctx->decrypt_subkeys[62-i];
+ ctx->encrypt_subkeys[i+33] = ctx->decrypt_subkeys[63-i];
+
+ ctx->encrypt_subkeys[i+64] = ctx->encrypt_subkeys[i];
+ ctx->encrypt_subkeys[i+65] = ctx->encrypt_subkeys[i+1];
+
+ ctx->decrypt_subkeys[i+64] = ctx->decrypt_subkeys[i];
+ ctx->decrypt_subkeys[i+65] = ctx->decrypt_subkeys[i+1];
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * Fill a Triple-DES context with subkeys calculated from three 64bit keys.
+ * Does not check the parity bits of the keys, but simply ignore them.
+ * Does not check for weak keys.
+ */
+static int
+tripledes_set3keys (struct _tripledes_ctx *ctx,
+ const byte * key1,
+ const byte * key2,
+ const byte * key3)
+{
+ static const char *selftest_failed;
+ int i;
+
+ if (!fips_mode () && !initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+
+ if (selftest_failed)
+ log_error ("%s\n", selftest_failed);
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ des_key_schedule (key1, ctx->encrypt_subkeys);
+ des_key_schedule (key2, &(ctx->decrypt_subkeys[32]));
+ des_key_schedule (key3, &(ctx->encrypt_subkeys[64]));
+ _gcry_burn_stack (32);
+
+ for(i=0; i<32; i+=2)
+ {
+ ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[94-i];
+ ctx->decrypt_subkeys[i+1] = ctx->encrypt_subkeys[95-i];
+
+ ctx->encrypt_subkeys[i+32] = ctx->decrypt_subkeys[62-i];
+ ctx->encrypt_subkeys[i+33] = ctx->decrypt_subkeys[63-i];
+
+ ctx->decrypt_subkeys[i+64] = ctx->encrypt_subkeys[30-i];
+ ctx->decrypt_subkeys[i+65] = ctx->encrypt_subkeys[31-i];
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * Electronic Codebook Mode Triple-DES encryption/decryption of data
+ * according to 'mode'. Sometimes this mode is named 'EDE' mode
+ * (Encryption-Decryption-Encryption).
+ */
+static int
+tripledes_ecb_crypt (struct _tripledes_ctx *ctx, const byte * from,
+ byte * to, int mode)
+{
+ u32 left, right, work;
+ u32 *keys;
+
+ keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys;
+
+ READ_64BIT_DATA (from, left, right)
+ INITIAL_PERMUTATION (left, work, right)
+
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+ DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys)
+
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+ DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys)
+
+ FINAL_PERMUTATION (right, work, left)
+ WRITE_64BIT_DATA (to, right, left)
+
+ return 0;
+}
+
+
+
+
+
+/*
+ * Check whether the 8 byte key is weak.
+ * Does not check the parity bits of the key but simple ignore them.
+ */
+static int
+is_weak_key ( const byte *key )
+{
+ byte work[8];
+ int i, left, right, middle, cmp_result;
+
+ /* clear parity bits */
+ for(i=0; i<8; ++i)
+ work[i] = key[i] & 0xfe;
+
+ /* binary search in the weak key table */
+ left = 0;
+ right = 63;
+ while(left <= right)
+ {
+ middle = (left + right) / 2;
+
+ if ( !(cmp_result=working_memcmp(work, weak_keys[middle], 8)) )
+ return -1;
+
+ if ( cmp_result > 0 )
+ left = middle + 1;
+ else
+ right = middle - 1;
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * Performs a selftest of this DES/Triple-DES implementation.
+ * Returns an string with the error text on failure.
+ * Returns NULL if all is ok.
+ */
+static const char *
+selftest (void)
+{
+ /*
+ * Check if 'u32' is really 32 bits wide. This DES / 3DES implementation
+ * need this.
+ */
+ if (sizeof (u32) != 4)
+ return "Wrong word size for DES configured.";
+
+ /*
+ * DES Maintenance Test
+ */
+ {
+ int i;
+ byte key[8] =
+ {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55};
+ byte input[8] =
+ {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+ byte result[8] =
+ {0x24, 0x6e, 0x9d, 0xb9, 0xc5, 0x50, 0x38, 0x1a};
+ byte temp1[8], temp2[8], temp3[8];
+ des_ctx des;
+
+ for (i = 0; i < 64; ++i)
+ {
+ des_setkey (des, key);
+ des_ecb_encrypt (des, input, temp1);
+ des_ecb_encrypt (des, temp1, temp2);
+ des_setkey (des, temp2);
+ des_ecb_decrypt (des, temp1, temp3);
+ memcpy (key, temp3, 8);
+ memcpy (input, temp1, 8);
+ }
+ if (memcmp (temp3, result, 8))
+ return "DES maintenance test failed.";
+ }
+
+
+ /*
+ * Self made Triple-DES test (Does somebody know an official test?)
+ */
+ {
+ int i;
+ byte input[8] =
+ {0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10};
+ byte key1[8] =
+ {0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0};
+ byte key2[8] =
+ {0x11, 0x22, 0x33, 0x44, 0xff, 0xaa, 0xcc, 0xdd};
+ byte result[8] =
+ {0x7b, 0x38, 0x3b, 0x23, 0xa2, 0x7d, 0x26, 0xd3};
+
+ tripledes_ctx des3;
+
+ for (i = 0; i < 16; ++i)
+ {
+ tripledes_set2keys (des3, key1, key2);
+ tripledes_ecb_encrypt (des3, input, key1);
+ tripledes_ecb_decrypt (des3, input, key2);
+ tripledes_set3keys (des3, key1, input, key2);
+ tripledes_ecb_encrypt (des3, input, input);
+ }
+ if (memcmp (input, result, 8))
+ return "Triple-DES test failed.";
+ }
+
+ /*
+ * More Triple-DES test. These are testvectors as used by SSLeay,
+ * thanks to Jeroen C. van Gelderen.
+ */
+ {
+ struct { byte key[24]; byte plain[8]; byte cipher[8]; } testdata[] = {
+ { { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 },
+ { 0x95,0xF8,0xA5,0xE5,0xDD,0x31,0xD9,0x00 },
+ { 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
+ },
+
+ { { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 },
+ { 0x9D,0x64,0x55,0x5A,0x9A,0x10,0xB8,0x52, },
+ { 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00 }
+ },
+ { { 0x38,0x49,0x67,0x4C,0x26,0x02,0x31,0x9E,
+ 0x38,0x49,0x67,0x4C,0x26,0x02,0x31,0x9E,
+ 0x38,0x49,0x67,0x4C,0x26,0x02,0x31,0x9E },
+ { 0x51,0x45,0x4B,0x58,0x2D,0xDF,0x44,0x0A },
+ { 0x71,0x78,0x87,0x6E,0x01,0xF1,0x9B,0x2A }
+ },
+ { { 0x04,0xB9,0x15,0xBA,0x43,0xFE,0xB5,0xB6,
+ 0x04,0xB9,0x15,0xBA,0x43,0xFE,0xB5,0xB6,
+ 0x04,0xB9,0x15,0xBA,0x43,0xFE,0xB5,0xB6 },
+ { 0x42,0xFD,0x44,0x30,0x59,0x57,0x7F,0xA2 },
+ { 0xAF,0x37,0xFB,0x42,0x1F,0x8C,0x40,0x95 }
+ },
+ { { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF,
+ 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF,
+ 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF },
+ { 0x73,0x6F,0x6D,0x65,0x64,0x61,0x74,0x61 },
+ { 0x3D,0x12,0x4F,0xE2,0x19,0x8B,0xA3,0x18 }
+ },
+ { { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF },
+ { 0x73,0x6F,0x6D,0x65,0x64,0x61,0x74,0x61 },
+ { 0xFB,0xAB,0xA1,0xFF,0x9D,0x05,0xE9,0xB1 }
+ },
+ { { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0xFE,0xDC,0xBA,0x98,0x76,0x54,0x32,0x10 },
+ { 0x73,0x6F,0x6D,0x65,0x64,0x61,0x74,0x61 },
+ { 0x18,0xd7,0x48,0xe5,0x63,0x62,0x05,0x72 }
+ },
+ { { 0x03,0x52,0x02,0x07,0x67,0x20,0x82,0x17,
+ 0x86,0x02,0x87,0x66,0x59,0x08,0x21,0x98,
+ 0x64,0x05,0x6A,0xBD,0xFE,0xA9,0x34,0x57 },
+ { 0x73,0x71,0x75,0x69,0x67,0x67,0x6C,0x65 },
+ { 0xc0,0x7d,0x2a,0x0f,0xa5,0x66,0xfa,0x30 }
+ },
+ { { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x80,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02 },
+ { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ { 0xe6,0xe6,0xdd,0x5b,0x7e,0x72,0x29,0x74 }
+ },
+ { { 0x10,0x46,0x10,0x34,0x89,0x98,0x80,0x20,
+ 0x91,0x07,0xD0,0x15,0x89,0x19,0x01,0x01,
+ 0x19,0x07,0x92,0x10,0x98,0x1A,0x01,0x01 },
+ { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
+ { 0xe1,0xef,0x62,0xc3,0x32,0xfe,0x82,0x5b }
+ }
+ };
+
+ byte result[8];
+ int i;
+ tripledes_ctx des3;
+
+ for (i=0; i<sizeof(testdata)/sizeof(*testdata); ++i)
+ {
+ tripledes_set3keys (des3, testdata[i].key,
+ testdata[i].key + 8, testdata[i].key + 16);
+
+ tripledes_ecb_encrypt (des3, testdata[i].plain, result);
+ if (memcmp (testdata[i].cipher, result, 8))
+ return "Triple-DES SSLeay test failed on encryption.";
+
+ tripledes_ecb_decrypt (des3, testdata[i].cipher, result);
+ if (memcmp (testdata[i].plain, result, 8))
+ return "Triple-DES SSLeay test failed on decryption.";;
+ }
+ }
+
+ /*
+ * Check the weak key detection. We simply assume that the table
+ * with weak keys is ok and check every key in the table if it is
+ * detected... (This test is a little bit stupid).
+ */
+ {
+ int i;
+ unsigned char *p;
+ gcry_md_hd_t h;
+
+ if (_gcry_md_open (&h, GCRY_MD_SHA1, 0))
+ return "SHA1 not available";
+
+ for (i = 0; i < 64; ++i)
+ _gcry_md_write (h, weak_keys[i], 8);
+ p = _gcry_md_read (h, GCRY_MD_SHA1);
+ i = memcmp (p, weak_keys_chksum, 20);
+ _gcry_md_close (h);
+ if (i)
+ return "weak key table defect";
+
+ for (i = 0; i < 64; ++i)
+ if (!is_weak_key(weak_keys[i]))
+ return "DES weak key detection failed";
+ }
+
+ return 0;
+}
+
+
+static gcry_err_code_t
+do_tripledes_setkey ( void *context, const byte *key, unsigned keylen )
+{
+ struct _tripledes_ctx *ctx = (struct _tripledes_ctx *) context;
+
+ if( keylen != 24 )
+ return GPG_ERR_INV_KEYLEN;
+
+ tripledes_set3keys ( ctx, key, key+8, key+16);
+
+ if (ctx->flags.no_weak_key)
+ ; /* Detection has been disabled. */
+ else if (is_weak_key (key) || is_weak_key (key+8) || is_weak_key (key+16))
+ {
+ _gcry_burn_stack (64);
+ return GPG_ERR_WEAK_KEY;
+ }
+ _gcry_burn_stack (64);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+do_tripledes_set_extra_info (void *context, int what,
+ const void *buffer, size_t buflen)
+{
+ struct _tripledes_ctx *ctx = (struct _tripledes_ctx *)context;
+ gpg_err_code_t ec = 0;
+
+ (void)buffer;
+ (void)buflen;
+
+ switch (what)
+ {
+ case CIPHER_INFO_NO_WEAK_KEY:
+ ctx->flags.no_weak_key = 1;
+ break;
+
+ default:
+ ec = GPG_ERR_INV_OP;
+ break;
+ }
+ return ec;
+}
+
+
+static void
+do_tripledes_encrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _tripledes_ctx *ctx = (struct _tripledes_ctx *) context;
+
+ tripledes_ecb_encrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+static void
+do_tripledes_decrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _tripledes_ctx *ctx = (struct _tripledes_ctx *) context;
+ tripledes_ecb_decrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+static gcry_err_code_t
+do_des_setkey (void *context, const byte *key, unsigned keylen)
+{
+ struct _des_ctx *ctx = (struct _des_ctx *) context;
+
+ if (keylen != 8)
+ return GPG_ERR_INV_KEYLEN;
+
+ des_setkey (ctx, key);
+
+ if (is_weak_key (key)) {
+ _gcry_burn_stack (64);
+ return GPG_ERR_WEAK_KEY;
+ }
+ _gcry_burn_stack (64);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static void
+do_des_encrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _des_ctx *ctx = (struct _des_ctx *) context;
+
+ des_ecb_encrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+static void
+do_des_decrypt( void *context, byte *outbuf, const byte *inbuf )
+{
+ struct _des_ctx *ctx = (struct _des_ctx *) context;
+
+ des_ecb_decrypt ( ctx, inbuf, outbuf );
+ _gcry_burn_stack (32);
+}
+
+
+
+
+/*
+ Self-test section.
+ */
+
+
+/* Selftest for TripleDES. */
+static gpg_err_code_t
+selftest_fips (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ (void)extended; /* No extended tests available. */
+
+ what = "low-level";
+ errtxt = selftest ();
+ if (errtxt)
+ goto failed;
+
+ /* The low-level self-tests are quite extensive and thus we can do
+ without high level tests. This is also justified because we have
+ no custom block code implementation for 3des but always use the
+ standard high level block code. */
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("cipher", GCRY_CIPHER_3DES, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ switch (algo)
+ {
+ case GCRY_CIPHER_3DES:
+ ec = selftest_fips (extended, report);
+ break;
+ default:
+ ec = GPG_ERR_CIPHER_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_des =
+ {
+ "DES", NULL, NULL, 8, 64, sizeof (struct _des_ctx),
+ do_des_setkey, do_des_encrypt, do_des_decrypt
+ };
+
+static gcry_cipher_oid_spec_t oids_tripledes[] =
+ {
+ { "1.2.840.113549.3.7", GCRY_CIPHER_MODE_CBC },
+ /* Teletrust specific OID for 3DES. */
+ { "1.3.36.3.1.3.2.1", GCRY_CIPHER_MODE_CBC },
+ /* pbeWithSHAAnd3_KeyTripleDES_CBC */
+ { "1.2.840.113549.1.12.1.3", GCRY_CIPHER_MODE_CBC },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_tripledes =
+ {
+ "3DES", NULL, oids_tripledes, 8, 192, sizeof (struct _tripledes_ctx),
+ do_tripledes_setkey, do_tripledes_encrypt, do_tripledes_decrypt
+ };
+
+cipher_extra_spec_t _gcry_cipher_extraspec_tripledes =
+ {
+ run_selftests,
+ do_tripledes_set_extra_info
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/dsa.c b/grub-core/lib/libgcrypt/cipher/dsa.c
new file mode 100644
index 0000000..100710f
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/dsa.c
@@ -0,0 +1,1181 @@
+/* dsa.c - DSA signature algorithm
+ * Copyright (C) 1998, 2000, 2001, 2002, 2003,
+ * 2006, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t q; /* group order */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+} DSA_public_key;
+
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t q; /* group order */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+ gcry_mpi_t x; /* secret exponent */
+} DSA_secret_key;
+
+
+/* A structure used to hold domain parameters. */
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t q; /* group order */
+ gcry_mpi_t g; /* group generator */
+} dsa_domain_t;
+
+
+/* A sample 1024 bit DSA key used for the selftests. */
+static const char sample_secret_key[] =
+"(private-key"
+" (dsa"
+" (p #00AD7C0025BA1A15F775F3F2D673718391D00456978D347B33D7B49E7F32EDAB"
+" 96273899DD8B2BB46CD6ECA263FAF04A28903503D59062A8865D2AE8ADFB5191"
+" CF36FFB562D0E2F5809801A1F675DAE59698A9E01EFE8D7DCFCA084F4C6F5A44"
+" 44D499A06FFAEA5E8EF5E01F2FD20A7B7EF3F6968AFBA1FB8D91F1559D52D8777B#)"
+" (q #00EB7B5751D25EBBB7BD59D920315FD840E19AEBF9#)"
+" (g #1574363387FDFD1DDF38F4FBE135BB20C7EE4772FB94C337AF86EA8E49666503"
+" AE04B6BE81A2F8DD095311E0217ACA698A11E6C5D33CCDAE71498ED35D13991E"
+" B02F09AB40BD8F4C5ED8C75DA779D0AE104BC34C960B002377068AB4B5A1F984"
+" 3FBA91F537F1B7CAC4D8DD6D89B0D863AF7025D549F9C765D2FC07EE208F8D15#)"
+" (y #64B11EF8871BE4AB572AA810D5D3CA11A6CDBC637A8014602C72960DB135BF46"
+" A1816A724C34F87330FC9E187C5D66897A04535CC2AC9164A7150ABFA8179827"
+" 6E45831AB811EEE848EBB24D9F5F2883B6E5DDC4C659DEF944DCFD80BF4D0A20"
+" 42CAA7DC289F0C5A9D155F02D3D551DB741A81695B74D4C8F477F9C7838EB0FB#)"
+" (x #11D54E4ADBD3034160F2CED4B7CD292A4EBF3EC0#)))";
+/* A sample 1024 bit DSA key used for the selftests (public only). */
+static const char sample_public_key[] =
+"(public-key"
+" (dsa"
+" (p #00AD7C0025BA1A15F775F3F2D673718391D00456978D347B33D7B49E7F32EDAB"
+" 96273899DD8B2BB46CD6ECA263FAF04A28903503D59062A8865D2AE8ADFB5191"
+" CF36FFB562D0E2F5809801A1F675DAE59698A9E01EFE8D7DCFCA084F4C6F5A44"
+" 44D499A06FFAEA5E8EF5E01F2FD20A7B7EF3F6968AFBA1FB8D91F1559D52D8777B#)"
+" (q #00EB7B5751D25EBBB7BD59D920315FD840E19AEBF9#)"
+" (g #1574363387FDFD1DDF38F4FBE135BB20C7EE4772FB94C337AF86EA8E49666503"
+" AE04B6BE81A2F8DD095311E0217ACA698A11E6C5D33CCDAE71498ED35D13991E"
+" B02F09AB40BD8F4C5ED8C75DA779D0AE104BC34C960B002377068AB4B5A1F984"
+" 3FBA91F537F1B7CAC4D8DD6D89B0D863AF7025D549F9C765D2FC07EE208F8D15#)"
+" (y #64B11EF8871BE4AB572AA810D5D3CA11A6CDBC637A8014602C72960DB135BF46"
+" A1816A724C34F87330FC9E187C5D66897A04535CC2AC9164A7150ABFA8179827"
+" 6E45831AB811EEE848EBB24D9F5F2883B6E5DDC4C659DEF944DCFD80BF4D0A20"
+" 42CAA7DC289F0C5A9D155F02D3D551DB741A81695B74D4C8F477F9C7838EB0FB#)))";
+
+
+
+
+static gcry_mpi_t gen_k (gcry_mpi_t q);
+static int test_keys (DSA_secret_key *sk, unsigned int qbits);
+static int check_secret_key (DSA_secret_key *sk);
+static gpg_err_code_t generate (DSA_secret_key *sk,
+ unsigned int nbits,
+ unsigned int qbits,
+ int transient_key,
+ dsa_domain_t *domain,
+ gcry_mpi_t **ret_factors);
+static void sign (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t input,
+ DSA_secret_key *skey);
+static int verify (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t input,
+ DSA_public_key *pkey);
+
+static void (*progress_cb) (void *,const char *, int, int, int );
+static void *progress_cb_data;
+
+
+void
+_gcry_register_pk_dsa_progress (void (*cb) (void *, const char *,
+ int, int, int),
+ void *cb_data)
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+
+static void
+progress (int c)
+{
+ if (progress_cb)
+ progress_cb (progress_cb_data, "pk_dsa", c, 0, 0);
+}
+
+
+/*
+ * Generate a random secret exponent k less than q.
+ */
+static gcry_mpi_t
+gen_k( gcry_mpi_t q )
+{
+ gcry_mpi_t k = mpi_alloc_secure( mpi_get_nlimbs(q) );
+ unsigned int nbits = mpi_get_nbits(q);
+ unsigned int nbytes = (nbits+7)/8;
+ char *rndbuf = NULL;
+
+ if ( DBG_CIPHER )
+ log_debug("choosing a random k ");
+ for (;;)
+ {
+ if( DBG_CIPHER )
+ progress('.');
+
+ if ( !rndbuf || nbits < 32 )
+ {
+ gcry_free(rndbuf);
+ rndbuf = gcry_random_bytes_secure( (nbits+7)/8, GCRY_STRONG_RANDOM );
+ }
+ else
+ { /* Change only some of the higher bits. We could improve
+ this by directly requesting more memory at the first call
+ to get_random_bytes() and use this the here maybe it is
+ easier to do this directly in random.c. */
+ char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
+ memcpy( rndbuf,pp, 4 );
+ gcry_free(pp);
+ }
+ _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
+ if ( mpi_test_bit( k, nbits-1 ) )
+ mpi_set_highbit( k, nbits-1 );
+ else
+ {
+ mpi_set_highbit( k, nbits-1 );
+ mpi_clear_bit( k, nbits-1 );
+ }
+
+ if( !(mpi_cmp( k, q ) < 0) ) /* check: k < q */
+ {
+ if( DBG_CIPHER )
+ progress('+');
+ continue; /* no */
+ }
+ if( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */
+ {
+ if( DBG_CIPHER )
+ progress('-');
+ continue; /* no */
+ }
+ break; /* okay */
+ }
+ gcry_free(rndbuf);
+ if( DBG_CIPHER )
+ progress('\n');
+
+ return k;
+}
+
+
+/* Check that a freshly generated key actually works. Returns 0 on success. */
+static int
+test_keys (DSA_secret_key *sk, unsigned int qbits)
+{
+ int result = -1; /* Default to failure. */
+ DSA_public_key pk;
+ gcry_mpi_t data = gcry_mpi_new (qbits);
+ gcry_mpi_t sig_a = gcry_mpi_new (qbits);
+ gcry_mpi_t sig_b = gcry_mpi_new (qbits);
+
+ /* Put the relevant parameters into a public key structure. */
+ pk.p = sk->p;
+ pk.q = sk->q;
+ pk.g = sk->g;
+ pk.y = sk->y;
+
+ /* Create a random plaintext. */
+ gcry_mpi_randomize (data, qbits, GCRY_WEAK_RANDOM);
+
+ /* Sign DATA using the secret key. */
+ sign (sig_a, sig_b, data, sk);
+
+ /* Verify the signature using the public key. */
+ if ( !verify (sig_a, sig_b, data, &pk) )
+ goto leave; /* Signature does not match. */
+
+ /* Modify the data and check that the signing fails. */
+ gcry_mpi_add_ui (data, data, 1);
+ if ( verify (sig_a, sig_b, data, &pk) )
+ goto leave; /* Signature matches but should not. */
+
+ result = 0; /* The test succeeded. */
+
+ leave:
+ gcry_mpi_release (sig_b);
+ gcry_mpi_release (sig_a);
+ gcry_mpi_release (data);
+ return result;
+}
+
+
+
+/*
+ Generate a DSA key pair with a key of size NBITS. If transient_key
+ is true the key is generated using the standard RNG and not the
+ very secure one.
+
+ Returns: 2 structures filled with all needed values
+ and an array with the n-1 factors of (p-1)
+ */
+static gpg_err_code_t
+generate (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits,
+ int transient_key, dsa_domain_t *domain, gcry_mpi_t **ret_factors )
+{
+ gcry_mpi_t p; /* the prime */
+ gcry_mpi_t q; /* the 160 bit prime factor */
+ gcry_mpi_t g; /* the generator */
+ gcry_mpi_t y; /* g^x mod p */
+ gcry_mpi_t x; /* the secret exponent */
+ gcry_mpi_t h, e; /* helper */
+ unsigned char *rndbuf;
+ gcry_random_level_t random_level;
+
+ if (qbits)
+ ; /* Caller supplied qbits. Use this value. */
+ else if ( nbits >= 512 && nbits <= 1024 )
+ qbits = 160;
+ else if ( nbits == 2048 )
+ qbits = 224;
+ else if ( nbits == 3072 )
+ qbits = 256;
+ else if ( nbits == 7680 )
+ qbits = 384;
+ else if ( nbits == 15360 )
+ qbits = 512;
+ else
+ return GPG_ERR_INV_VALUE;
+
+ if (qbits < 160 || qbits > 512 || (qbits%8) )
+ return GPG_ERR_INV_VALUE;
+ if (nbits < 2*qbits || nbits > 15360)
+ return GPG_ERR_INV_VALUE;
+
+ if (fips_mode ())
+ {
+ if (nbits < 1024)
+ return GPG_ERR_INV_VALUE;
+ if (transient_key)
+ return GPG_ERR_INV_VALUE;
+ }
+
+ if (domain->p && domain->q && domain->g)
+ {
+ /* Domain parameters are given; use them. */
+ p = mpi_copy (domain->p);
+ q = mpi_copy (domain->q);
+ g = mpi_copy (domain->g);
+ gcry_assert (mpi_get_nbits (p) == nbits);
+ gcry_assert (mpi_get_nbits (q) == qbits);
+ h = mpi_alloc (0);
+ e = NULL;
+ }
+ else
+ {
+ /* Generate new domain parameters. */
+ p = _gcry_generate_elg_prime (1, nbits, qbits, NULL, ret_factors);
+ /* Get q out of factors. */
+ q = mpi_copy ((*ret_factors)[0]);
+ gcry_assert (mpi_get_nbits (q) == qbits);
+
+ /* Find a generator g (h and e are helpers).
+ e = (p-1)/q */
+ e = mpi_alloc (mpi_get_nlimbs (p));
+ mpi_sub_ui (e, p, 1);
+ mpi_fdiv_q (e, e, q);
+ g = mpi_alloc (mpi_get_nlimbs (p));
+ h = mpi_alloc_set_ui (1); /* (We start with 2.) */
+ do
+ {
+ mpi_add_ui (h, h, 1);
+ /* g = h^e mod p */
+ gcry_mpi_powm (g, h, e, p);
+ }
+ while (!mpi_cmp_ui (g, 1)); /* Continue until g != 1. */
+ }
+
+ /* Select a random number X with the property:
+ * 0 < x < q-1
+ * This must be a very good random number because this is the secret
+ * part. The random quality depends on the transient_key flag. */
+ random_level = transient_key ? GCRY_STRONG_RANDOM : GCRY_VERY_STRONG_RANDOM;
+ if (DBG_CIPHER)
+ log_debug("choosing a random x%s", transient_key? " (transient-key)":"");
+ gcry_assert( qbits >= 160 );
+ x = mpi_alloc_secure( mpi_get_nlimbs(q) );
+ mpi_sub_ui( h, q, 1 ); /* put q-1 into h */
+ rndbuf = NULL;
+ do
+ {
+ if( DBG_CIPHER )
+ progress('.');
+ if( !rndbuf )
+ rndbuf = gcry_random_bytes_secure ((qbits+7)/8, random_level);
+ else
+ { /* Change only some of the higher bits (= 2 bytes)*/
+ char *r = gcry_random_bytes_secure (2, random_level);
+ memcpy(rndbuf, r, 2 );
+ gcry_free(r);
+ }
+
+ _gcry_mpi_set_buffer( x, rndbuf, (qbits+7)/8, 0 );
+ mpi_clear_highbit( x, qbits+1 );
+ }
+ while ( !( mpi_cmp_ui( x, 0 )>0 && mpi_cmp( x, h )<0 ) );
+ gcry_free(rndbuf);
+ mpi_free( e );
+ mpi_free( h );
+
+ /* y = g^x mod p */
+ y = mpi_alloc( mpi_get_nlimbs(p) );
+ gcry_mpi_powm( y, g, x, p );
+
+ if( DBG_CIPHER )
+ {
+ progress('\n');
+ log_mpidump("dsa p", p );
+ log_mpidump("dsa q", q );
+ log_mpidump("dsa g", g );
+ log_mpidump("dsa y", y );
+ log_mpidump("dsa x", x );
+ }
+
+ /* Copy the stuff to the key structures. */
+ sk->p = p;
+ sk->q = q;
+ sk->g = g;
+ sk->y = y;
+ sk->x = x;
+
+ /* Now we can test our keys (this should never fail!). */
+ if ( test_keys (sk, qbits) )
+ {
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->g); sk->g = NULL;
+ gcry_mpi_release (sk->y); sk->y = NULL;
+ gcry_mpi_release (sk->x); sk->x = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ return GPG_ERR_SELFTEST_FAILED;
+ }
+ return 0;
+}
+
+
+/* Generate a DSA key pair with a key of size NBITS using the
+ algorithm given in FIPS-186-3. If USE_FIPS186_2 is true,
+ FIPS-186-2 is used and thus the length is restricted to 1024/160.
+ If DERIVEPARMS is not NULL it may contain a seed value. If domain
+ parameters are specified in DOMAIN, DERIVEPARMS may not be given
+ and NBITS and QBITS must match the specified domain parameters. */
+static gpg_err_code_t
+generate_fips186 (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits,
+ gcry_sexp_t deriveparms, int use_fips186_2,
+ dsa_domain_t *domain,
+ int *r_counter, void **r_seed, size_t *r_seedlen,
+ gcry_mpi_t *r_h)
+{
+ gpg_err_code_t ec;
+ struct {
+ gcry_sexp_t sexp;
+ const void *seed;
+ size_t seedlen;
+ } initial_seed = { NULL, NULL, 0 };
+ gcry_mpi_t prime_q = NULL;
+ gcry_mpi_t prime_p = NULL;
+ gcry_mpi_t value_g = NULL; /* The generator. */
+ gcry_mpi_t value_y = NULL; /* g^x mod p */
+ gcry_mpi_t value_x = NULL; /* The secret exponent. */
+ gcry_mpi_t value_h = NULL; /* Helper. */
+ gcry_mpi_t value_e = NULL; /* Helper. */
+
+ /* Preset return values. */
+ *r_counter = 0;
+ *r_seed = NULL;
+ *r_seedlen = 0;
+ *r_h = NULL;
+
+ /* Derive QBITS from NBITS if requested */
+ if (!qbits)
+ {
+ if (nbits == 1024)
+ qbits = 160;
+ else if (nbits == 2048)
+ qbits = 224;
+ else if (nbits == 3072)
+ qbits = 256;
+ }
+
+ /* Check that QBITS and NBITS match the standard. Note that FIPS
+ 186-3 uses N for QBITS and L for NBITS. */
+ if (nbits == 1024 && qbits == 160)
+ ;
+ else if (nbits == 2048 && qbits == 224)
+ ;
+ else if (nbits == 2048 && qbits == 256)
+ ;
+ else if (nbits == 3072 && qbits == 256)
+ ;
+ else
+ return GPG_ERR_INV_VALUE;
+
+ if (domain->p && domain->q && domain->g)
+ {
+ /* Domain parameters are given; use them. */
+ prime_p = mpi_copy (domain->p);
+ prime_q = mpi_copy (domain->q);
+ value_g = mpi_copy (domain->g);
+ gcry_assert (mpi_get_nbits (prime_p) == nbits);
+ gcry_assert (mpi_get_nbits (prime_q) == qbits);
+ gcry_assert (!deriveparms);
+ ec = 0;
+ }
+ else
+ {
+ /* Generate new domain parameters. */
+
+ /* Get an initial seed value. */
+ if (deriveparms)
+ {
+ initial_seed.sexp = gcry_sexp_find_token (deriveparms, "seed", 0);
+ if (initial_seed.sexp)
+ initial_seed.seed = gcry_sexp_nth_data (initial_seed.sexp, 1,
+ &initial_seed.seedlen);
+ }
+
+ /* Fixme: Enable 186-3 after it has been approved and after fixing
+ the generation function. */
+ /* if (use_fips186_2) */
+ (void)use_fips186_2;
+ ec = _gcry_generate_fips186_2_prime (nbits, qbits,
+ initial_seed.seed,
+ initial_seed.seedlen,
+ &prime_q, &prime_p,
+ r_counter,
+ r_seed, r_seedlen);
+ /* else */
+ /* ec = _gcry_generate_fips186_3_prime (nbits, qbits, NULL, 0, */
+ /* &prime_q, &prime_p, */
+ /* r_counter, */
+ /* r_seed, r_seedlen, NULL); */
+ gcry_sexp_release (initial_seed.sexp);
+ if (ec)
+ goto leave;
+
+ /* Find a generator g (h and e are helpers).
+ e = (p-1)/q */
+ value_e = mpi_alloc_like (prime_p);
+ mpi_sub_ui (value_e, prime_p, 1);
+ mpi_fdiv_q (value_e, value_e, prime_q );
+ value_g = mpi_alloc_like (prime_p);
+ value_h = mpi_alloc_set_ui (1);
+ do
+ {
+ mpi_add_ui (value_h, value_h, 1);
+ /* g = h^e mod p */
+ mpi_powm (value_g, value_h, value_e, prime_p);
+ }
+ while (!mpi_cmp_ui (value_g, 1)); /* Continue until g != 1. */
+ }
+
+
+ /* Select a random number x with: 0 < x < q */
+ value_x = gcry_mpi_snew (qbits);
+ do
+ {
+ if( DBG_CIPHER )
+ progress('.');
+ gcry_mpi_randomize (value_x, qbits, GCRY_VERY_STRONG_RANDOM);
+ mpi_clear_highbit (value_x, qbits+1);
+ }
+ while (!(mpi_cmp_ui (value_x, 0) > 0 && mpi_cmp (value_x, prime_q) < 0));
+
+ /* y = g^x mod p */
+ value_y = mpi_alloc_like (prime_p);
+ gcry_mpi_powm (value_y, value_g, value_x, prime_p);
+
+ if (DBG_CIPHER)
+ {
+ progress('\n');
+ log_mpidump("dsa p", prime_p );
+ log_mpidump("dsa q", prime_q );
+ log_mpidump("dsa g", value_g );
+ log_mpidump("dsa y", value_y );
+ log_mpidump("dsa x", value_x );
+ log_mpidump("dsa h", value_h );
+ }
+
+ /* Copy the stuff to the key structures. */
+ sk->p = prime_p; prime_p = NULL;
+ sk->q = prime_q; prime_q = NULL;
+ sk->g = value_g; value_g = NULL;
+ sk->y = value_y; value_y = NULL;
+ sk->x = value_x; value_x = NULL;
+ *r_h = value_h; value_h = NULL;
+
+ leave:
+ gcry_mpi_release (prime_p);
+ gcry_mpi_release (prime_q);
+ gcry_mpi_release (value_g);
+ gcry_mpi_release (value_y);
+ gcry_mpi_release (value_x);
+ gcry_mpi_release (value_h);
+ gcry_mpi_release (value_e);
+
+ /* As a last step test this keys (this should never fail of course). */
+ if (!ec && test_keys (sk, qbits) )
+ {
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->g); sk->g = NULL;
+ gcry_mpi_release (sk->y); sk->y = NULL;
+ gcry_mpi_release (sk->x); sk->x = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ ec = GPG_ERR_SELFTEST_FAILED;
+ }
+
+ if (ec)
+ {
+ *r_counter = 0;
+ gcry_free (*r_seed); *r_seed = NULL;
+ *r_seedlen = 0;
+ gcry_mpi_release (*r_h); *r_h = NULL;
+ }
+
+ return ec;
+}
+
+
+
+/*
+ Test whether the secret key is valid.
+ Returns: if this is a valid key.
+ */
+static int
+check_secret_key( DSA_secret_key *sk )
+{
+ int rc;
+ gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs(sk->y) );
+
+ gcry_mpi_powm( y, sk->g, sk->x, sk->p );
+ rc = !mpi_cmp( y, sk->y );
+ mpi_free( y );
+ return rc;
+}
+
+
+
+/*
+ Make a DSA signature from HASH and put it into r and s.
+ */
+static void
+sign(gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t hash, DSA_secret_key *skey )
+{
+ gcry_mpi_t k;
+ gcry_mpi_t kinv;
+ gcry_mpi_t tmp;
+
+ /* Select a random k with 0 < k < q */
+ k = gen_k( skey->q );
+
+ /* r = (a^k mod p) mod q */
+ gcry_mpi_powm( r, skey->g, k, skey->p );
+ mpi_fdiv_r( r, r, skey->q );
+
+ /* kinv = k^(-1) mod q */
+ kinv = mpi_alloc( mpi_get_nlimbs(k) );
+ mpi_invm(kinv, k, skey->q );
+
+ /* s = (kinv * ( hash + x * r)) mod q */
+ tmp = mpi_alloc( mpi_get_nlimbs(skey->p) );
+ mpi_mul( tmp, skey->x, r );
+ mpi_add( tmp, tmp, hash );
+ mpi_mulm( s , kinv, tmp, skey->q );
+
+ mpi_free(k);
+ mpi_free(kinv);
+ mpi_free(tmp);
+}
+
+
+/*
+ Returns true if the signature composed from R and S is valid.
+ */
+static int
+verify (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t hash, DSA_public_key *pkey )
+{
+ int rc;
+ gcry_mpi_t w, u1, u2, v;
+ gcry_mpi_t base[3];
+ gcry_mpi_t ex[3];
+
+ if( !(mpi_cmp_ui( r, 0 ) > 0 && mpi_cmp( r, pkey->q ) < 0) )
+ return 0; /* assertion 0 < r < q failed */
+ if( !(mpi_cmp_ui( s, 0 ) > 0 && mpi_cmp( s, pkey->q ) < 0) )
+ return 0; /* assertion 0 < s < q failed */
+
+ w = mpi_alloc( mpi_get_nlimbs(pkey->q) );
+ u1 = mpi_alloc( mpi_get_nlimbs(pkey->q) );
+ u2 = mpi_alloc( mpi_get_nlimbs(pkey->q) );
+ v = mpi_alloc( mpi_get_nlimbs(pkey->p) );
+
+ /* w = s^(-1) mod q */
+ mpi_invm( w, s, pkey->q );
+
+ /* u1 = (hash * w) mod q */
+ mpi_mulm( u1, hash, w, pkey->q );
+
+ /* u2 = r * w mod q */
+ mpi_mulm( u2, r, w, pkey->q );
+
+ /* v = g^u1 * y^u2 mod p mod q */
+ base[0] = pkey->g; ex[0] = u1;
+ base[1] = pkey->y; ex[1] = u2;
+ base[2] = NULL; ex[2] = NULL;
+ mpi_mulpowm( v, base, ex, pkey->p );
+ mpi_fdiv_r( v, v, pkey->q );
+
+ rc = !mpi_cmp( v, r );
+
+ mpi_free(w);
+ mpi_free(u1);
+ mpi_free(u2);
+ mpi_free(v);
+
+ return rc;
+}
+
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+
+static gcry_err_code_t
+dsa_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ gpg_err_code_t ec;
+ DSA_secret_key sk;
+ gcry_sexp_t l1;
+ unsigned int qbits = 0;
+ gcry_sexp_t deriveparms = NULL;
+ gcry_sexp_t seedinfo = NULL;
+ int transient_key = 0;
+ int use_fips186_2 = 0;
+ int use_fips186 = 0;
+ dsa_domain_t domain;
+
+ (void)algo; /* No need to check it. */
+ (void)evalue; /* Not required for DSA. */
+
+ memset (&domain, 0, sizeof domain);
+
+ if (genparms)
+ {
+ gcry_sexp_t domainsexp;
+
+ /* Parse the optional qbits element. */
+ l1 = gcry_sexp_find_token (genparms, "qbits", 0);
+ if (l1)
+ {
+ char buf[50];
+ const char *s;
+ size_t n;
+
+ s = gcry_sexp_nth_data (l1, 1, &n);
+ if (!s || n >= DIM (buf) - 1 )
+ {
+ gcry_sexp_release (l1);
+ return GPG_ERR_INV_OBJ; /* No value or value too large. */
+ }
+ memcpy (buf, s, n);
+ buf[n] = 0;
+ qbits = (unsigned int)strtoul (buf, NULL, 0);
+ gcry_sexp_release (l1);
+ }
+
+ /* Parse the optional transient-key flag. */
+ l1 = gcry_sexp_find_token (genparms, "transient-key", 0);
+ if (l1)
+ {
+ transient_key = 1;
+ gcry_sexp_release (l1);
+ }
+
+ /* Get the optional derive parameters. */
+ deriveparms = gcry_sexp_find_token (genparms, "derive-parms", 0);
+
+ /* Parse the optional "use-fips186" flags. */
+ l1 = gcry_sexp_find_token (genparms, "use-fips186", 0);
+ if (l1)
+ {
+ use_fips186 = 1;
+ gcry_sexp_release (l1);
+ }
+ l1 = gcry_sexp_find_token (genparms, "use-fips186-2", 0);
+ if (l1)
+ {
+ use_fips186_2 = 1;
+ gcry_sexp_release (l1);
+ }
+
+ /* Check whether domain parameters are given. */
+ domainsexp = gcry_sexp_find_token (genparms, "domain", 0);
+ if (domainsexp)
+ {
+ /* DERIVEPARMS can't be used together with domain
+ parameters. NBITS abnd QBITS may not be specified
+ because there values are derived from the domain
+ parameters. */
+ if (deriveparms || qbits || nbits)
+ {
+ gcry_sexp_release (domainsexp);
+ gcry_sexp_release (deriveparms);
+ return GPG_ERR_INV_VALUE;
+ }
+
+ /* Put all domain parameters into the domain object. */
+ l1 = gcry_sexp_find_token (domainsexp, "p", 0);
+ domain.p = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ l1 = gcry_sexp_find_token (domainsexp, "q", 0);
+ domain.q = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ l1 = gcry_sexp_find_token (domainsexp, "g", 0);
+ domain.g = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ gcry_sexp_release (domainsexp);
+
+ /* Check that all domain parameters are available. */
+ if (!domain.p || !domain.q || !domain.g)
+ {
+ gcry_mpi_release (domain.p);
+ gcry_mpi_release (domain.q);
+ gcry_mpi_release (domain.g);
+ gcry_sexp_release (deriveparms);
+ return GPG_ERR_MISSING_VALUE;
+ }
+
+ /* Get NBITS and QBITS from the domain parameters. */
+ nbits = mpi_get_nbits (domain.p);
+ qbits = mpi_get_nbits (domain.q);
+ }
+ }
+
+ if (deriveparms || use_fips186 || use_fips186_2 || fips_mode ())
+ {
+ int counter;
+ void *seed;
+ size_t seedlen;
+ gcry_mpi_t h_value;
+
+ ec = generate_fips186 (&sk, nbits, qbits, deriveparms, use_fips186_2,
+ &domain,
+ &counter, &seed, &seedlen, &h_value);
+ gcry_sexp_release (deriveparms);
+ if (!ec && h_value)
+ {
+ /* Format the seed-values unless domain parameters are used
+ for which a H_VALUE of NULL is an indication. */
+ ec = gpg_err_code (gcry_sexp_build
+ (&seedinfo, NULL,
+ "(seed-values(counter %d)(seed %b)(h %m))",
+ counter, (int)seedlen, seed, h_value));
+ if (ec)
+ {
+ gcry_mpi_release (sk.p); sk.p = NULL;
+ gcry_mpi_release (sk.q); sk.q = NULL;
+ gcry_mpi_release (sk.g); sk.g = NULL;
+ gcry_mpi_release (sk.y); sk.y = NULL;
+ gcry_mpi_release (sk.x); sk.x = NULL;
+ }
+ gcry_free (seed);
+ gcry_mpi_release (h_value);
+ }
+ }
+ else
+ {
+ ec = generate (&sk, nbits, qbits, transient_key, &domain, retfactors);
+ }
+
+ gcry_mpi_release (domain.p);
+ gcry_mpi_release (domain.q);
+ gcry_mpi_release (domain.g);
+
+ if (!ec)
+ {
+ skey[0] = sk.p;
+ skey[1] = sk.q;
+ skey[2] = sk.g;
+ skey[3] = sk.y;
+ skey[4] = sk.x;
+
+ if (!r_extrainfo)
+ {
+ /* Old style interface - return the factors - if any - at
+ retfactors. */
+ }
+ else if (!*retfactors && !seedinfo)
+ {
+ /* No factors and no seedinfo, thus there is nothing to return. */
+ *r_extrainfo = NULL;
+ }
+ else
+ {
+ /* Put the factors into extrainfo and set retfactors to NULL
+ to make use of the new interface. Note that the factors
+ are not confidential thus we can store them in standard
+ memory. */
+ int nfactors, i, j;
+ char *p;
+ char *format = NULL;
+ void **arg_list = NULL;
+
+ for (nfactors=0; *retfactors && (*retfactors)[nfactors]; nfactors++)
+ ;
+ /* Allocate space for the format string:
+ "(misc-key-info%S(pm1-factors%m))"
+ with one "%m" for each factor and construct it. */
+ format = gcry_malloc (50 + 2*nfactors);
+ if (!format)
+ ec = gpg_err_code_from_syserror ();
+ else
+ {
+ p = stpcpy (format, "(misc-key-info");
+ if (seedinfo)
+ p = stpcpy (p, "%S");
+ if (nfactors)
+ {
+ p = stpcpy (p, "(pm1-factors");
+ for (i=0; i < nfactors; i++)
+ p = stpcpy (p, "%m");
+ p = stpcpy (p, ")");
+ }
+ p = stpcpy (p, ")");
+
+ /* Allocate space for the list of factors plus one for
+ an S-expression plus an extra NULL entry for safety
+ and fill it with the factors. */
+ arg_list = gcry_calloc (nfactors+1+1, sizeof *arg_list);
+ if (!arg_list)
+ ec = gpg_err_code_from_syserror ();
+ else
+ {
+ i = 0;
+ if (seedinfo)
+ arg_list[i++] = &seedinfo;
+ for (j=0; j < nfactors; j++)
+ arg_list[i++] = (*retfactors) + j;
+ arg_list[i] = NULL;
+
+ ec = gpg_err_code (gcry_sexp_build_array
+ (r_extrainfo, NULL, format, arg_list));
+ }
+ }
+
+ gcry_free (arg_list);
+ gcry_free (format);
+ for (i=0; i < nfactors; i++)
+ {
+ gcry_mpi_release ((*retfactors)[i]);
+ (*retfactors)[i] = NULL;
+ }
+ *retfactors = NULL;
+ if (ec)
+ {
+ for (i=0; i < 5; i++)
+ {
+ gcry_mpi_release (skey[i]);
+ skey[i] = NULL;
+ }
+ }
+ }
+ }
+
+ gcry_sexp_release (seedinfo);
+ return ec;
+}
+
+
+static gcry_err_code_t
+dsa_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ (void)evalue;
+ return dsa_generate_ext (algo, nbits, 0, NULL, skey, retfactors, NULL);
+}
+
+
+
+static gcry_err_code_t
+dsa_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ DSA_secret_key sk;
+
+ (void)algo;
+
+ if ((! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]) || (! skey[4]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.q = skey[1];
+ sk.g = skey[2];
+ sk.y = skey[3];
+ sk.x = skey[4];
+ if (! check_secret_key (&sk))
+ err = GPG_ERR_BAD_SECKEY;
+ }
+
+ return err;
+}
+
+
+static gcry_err_code_t
+dsa_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ DSA_secret_key sk;
+
+ (void)algo;
+
+ if ((! data)
+ || (! skey[0]) || (! skey[1]) || (! skey[2])
+ || (! skey[3]) || (! skey[4]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.q = skey[1];
+ sk.g = skey[2];
+ sk.y = skey[3];
+ sk.x = skey[4];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ sign (resarr[0], resarr[1], data, &sk);
+ }
+ return err;
+}
+
+static gcry_err_code_t
+dsa_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp) (void *, gcry_mpi_t), void *opaquev)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ DSA_public_key pk;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ if ((! data[0]) || (! data[1]) || (! hash)
+ || (! pkey[0]) || (! pkey[1]) || (! pkey[2]) || (! pkey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ pk.p = pkey[0];
+ pk.q = pkey[1];
+ pk.g = pkey[2];
+ pk.y = pkey[3];
+ if (! verify (data[0], data[1], hash, &pk))
+ err = GPG_ERR_BAD_SIGNATURE;
+ }
+ return err;
+}
+
+
+static unsigned int
+dsa_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+
+/*
+ Self-test section.
+ */
+
+static const char *
+selftest_sign_1024 (gcry_sexp_t pkey, gcry_sexp_t skey)
+{
+ static const char sample_data[] =
+ "(data (flags pkcs1)"
+ " (hash sha1 #a0b1c2d3e4f500102030405060708090a1b2c3d4#))";
+ static const char sample_data_bad[] =
+ "(data (flags pkcs1)"
+ " (hash sha1 #a0b1c2d3e4f510102030405060708090a1b2c3d4#))";
+
+ const char *errtxt = NULL;
+ gcry_error_t err;
+ gcry_sexp_t data = NULL;
+ gcry_sexp_t data_bad = NULL;
+ gcry_sexp_t sig = NULL;
+
+ err = gcry_sexp_sscan (&data, NULL,
+ sample_data, strlen (sample_data));
+ if (!err)
+ err = gcry_sexp_sscan (&data_bad, NULL,
+ sample_data_bad, strlen (sample_data_bad));
+ if (err)
+ {
+ errtxt = "converting data failed";
+ goto leave;
+ }
+
+ err = gcry_pk_sign (&sig, data, skey);
+ if (err)
+ {
+ errtxt = "signing failed";
+ goto leave;
+ }
+ err = gcry_pk_verify (sig, data, pkey);
+ if (err)
+ {
+ errtxt = "verify failed";
+ goto leave;
+ }
+ err = gcry_pk_verify (sig, data_bad, pkey);
+ if (gcry_err_code (err) != GPG_ERR_BAD_SIGNATURE)
+ {
+ errtxt = "bad signature not detected";
+ goto leave;
+ }
+
+
+ leave:
+ gcry_sexp_release (sig);
+ gcry_sexp_release (data_bad);
+ gcry_sexp_release (data);
+ return errtxt;
+}
+
+
+static gpg_err_code_t
+selftests_dsa (selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+ gcry_error_t err;
+ gcry_sexp_t skey = NULL;
+ gcry_sexp_t pkey = NULL;
+
+ /* Convert the S-expressions into the internal representation. */
+ what = "convert";
+ err = gcry_sexp_sscan (&skey, NULL,
+ sample_secret_key, strlen (sample_secret_key));
+ if (!err)
+ err = gcry_sexp_sscan (&pkey, NULL,
+ sample_public_key, strlen (sample_public_key));
+ if (err)
+ {
+ errtxt = gcry_strerror (err);
+ goto failed;
+ }
+
+ what = "key consistency";
+ err = gcry_pk_testkey (skey);
+ if (err)
+ {
+ errtxt = gcry_strerror (err);
+ goto failed;
+ }
+
+ what = "sign";
+ errtxt = selftest_sign_1024 (pkey, skey);
+ if (errtxt)
+ goto failed;
+
+ gcry_sexp_release (pkey);
+ gcry_sexp_release (skey);
+ return 0; /* Succeeded. */
+
+ failed:
+ gcry_sexp_release (pkey);
+ gcry_sexp_release (skey);
+ if (report)
+ report ("pubkey", GCRY_PK_DSA, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ (void)extended;
+
+ switch (algo)
+ {
+ case GCRY_PK_DSA:
+ ec = selftests_dsa (report);
+ break;
+ default:
+ ec = GPG_ERR_PUBKEY_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+
+static const char *dsa_names[] =
+ {
+ "dsa",
+ "openpgp-dsa",
+ NULL,
+ };
+
+gcry_pk_spec_t _gcry_pubkey_spec_dsa =
+ {
+ "DSA", dsa_names,
+ "pqgy", "pqgyx", "", "rs", "pqgy",
+ GCRY_PK_USAGE_SIGN,
+ dsa_generate,
+ dsa_check_secret_key,
+ NULL,
+ NULL,
+ dsa_sign,
+ dsa_verify,
+ dsa_get_nbits
+ };
+pk_extra_spec_t _gcry_pubkey_extraspec_dsa =
+ {
+ run_selftests,
+ dsa_generate_ext
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/ecc.c b/grub-core/lib/libgcrypt/cipher/ecc.c
new file mode 100644
index 0000000..fcbd8e3
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/ecc.c
@@ -0,0 +1,1390 @@
+/* ecc.c - Elliptic Curve Cryptography
+ Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of Libgcrypt.
+
+ Libgcrypt is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ Libgcrypt is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA. */
+
+/* This code is originally based on the Patch 0.1.6 for the gnupg
+ 1.4.x branch as retrieved on 2007-03-21 from
+ http://www.calcurco.cat/eccGnuPG/src/gnupg-1.4.6-ecc0.2.0beta1.diff.bz2
+ The original authors are:
+ Written by
+ Sergi Blanch i Torne <d4372211 at alumnes.eup.udl.es>,
+ Ramiro Moreno Chiral <ramiro at eup.udl.es>
+ Maintainers
+ Sergi Blanch i Torne
+ Ramiro Moreno Chiral
+ Mikael Mylnikov (mmr)
+ For use in Libgcrypt the code has been heavily modified and cleaned
+ up. In fact there is not much left of the orginally code except for
+ some variable names and the text book implementaion of the sign and
+ verification algorithms. The arithmetic functions have entirely
+ been rewritten and moved to mpi/ec.c. */
+
+
+/* TODO:
+
+ - If we support point compression we need to decide how to compute
+ the keygrip - it should not change due to compression.
+
+ - In mpi/ec.c we use mpi_powm for x^2 mod p: Either implement a
+ special case in mpi_powm or check whether mpi_mulm is faster.
+
+ - Decide whether we should hide the mpi_point_t definition.
+
+ - Support more than just ECDSA.
+*/
+
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+
+/* Definition of a curve. */
+typedef struct
+{
+ gcry_mpi_t p; /* Prime specifying the field GF(p). */
+ gcry_mpi_t a; /* First coefficient of the Weierstrass equation. */
+ gcry_mpi_t b; /* Second coefficient of the Weierstrass equation. */
+ mpi_point_t G; /* Base point (generator). */
+ gcry_mpi_t n; /* Order of G. */
+} elliptic_curve_t;
+
+
+typedef struct
+{
+ elliptic_curve_t E;
+ mpi_point_t Q; /* Q = [d]G */
+} ECC_public_key;
+
+typedef struct
+{
+ elliptic_curve_t E;
+ mpi_point_t Q;
+ gcry_mpi_t d;
+} ECC_secret_key;
+
+
+/* This tables defines aliases for curve names. */
+static const struct
+{
+ const char *name; /* Our name. */
+ const char *other; /* Other name. */
+} curve_aliases[] =
+ {
+ { "NIST P-192", "1.2.840.10045.3.1.1" }, /* X9.62 OID */
+ { "NIST P-192", "prime192v1" }, /* X9.62 name. */
+ { "NIST P-192", "secp192r1" }, /* SECP name. */
+
+ { "NIST P-224", "secp224r1" },
+ { "NIST P-224", "1.3.132.0.33" }, /* SECP OID. */
+
+ { "NIST P-256", "1.2.840.10045.3.1.7" }, /* From NIST SP 800-78-1. */
+ { "NIST P-256", "prime256v1" },
+ { "NIST P-256", "secp256r1" },
+
+ { "NIST P-384", "secp384r1" },
+ { "NIST P-384", "1.3.132.0.34" },
+
+ { "NIST P-521", "secp521r1" },
+ { "NIST P-521", "1.3.132.0.35" },
+
+ { "brainpoolP160r1", "1.3.36.3.3.2.8.1.1.1" },
+ { "brainpoolP192r1", "1.3.36.3.3.2.8.1.1.3" },
+ { "brainpoolP224r1", "1.3.36.3.3.2.8.1.1.5" },
+ { "brainpoolP256r1", "1.3.36.3.3.2.8.1.1.7" },
+ { "brainpoolP320r1", "1.3.36.3.3.2.8.1.1.9" },
+ { "brainpoolP384r1", "1.3.36.3.3.2.8.1.1.11"},
+ { "brainpoolP512r1", "1.3.36.3.3.2.8.1.1.13"},
+
+ { NULL, NULL}
+ };
+
+
+
+/* This static table defines all available curves. */
+static const struct
+{
+ const char *desc; /* Description of the curve. */
+ unsigned int nbits; /* Number of bits. */
+ unsigned int fips:1; /* True if this is a FIPS140-2 approved curve. */
+ const char *p; /* Order of the prime field. */
+ const char *a, *b; /* The coefficients. */
+ const char *n; /* The order of the base point. */
+ const char *g_x, *g_y; /* Base point. */
+} domain_parms[] =
+ {
+ {
+ "NIST P-192", 192, 1,
+ "0xfffffffffffffffffffffffffffffffeffffffffffffffff",
+ "0xfffffffffffffffffffffffffffffffefffffffffffffffc",
+ "0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",
+ "0xffffffffffffffffffffffff99def836146bc9b1b4d22831",
+
+ "0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",
+ "0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811"
+ },
+ {
+ "NIST P-224", 224, 1,
+ "0xffffffffffffffffffffffffffffffff000000000000000000000001",
+ "0xfffffffffffffffffffffffffffffffefffffffffffffffffffffffe",
+ "0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4",
+ "0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d" ,
+
+ "0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21",
+ "0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34"
+ },
+ {
+ "NIST P-256", 256, 1,
+ "0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
+ "0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc",
+ "0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",
+ "0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
+
+ "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",
+ "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"
+ },
+ {
+ "NIST P-384", 384, 1,
+ "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
+ "ffffffff0000000000000000ffffffff",
+ "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
+ "ffffffff0000000000000000fffffffc",
+ "0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875a"
+ "c656398d8a2ed19d2a85c8edd3ec2aef",
+ "0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf"
+ "581a0db248b0a77aecec196accc52973",
+
+ "0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a38"
+ "5502f25dbf55296c3a545e3872760ab7",
+ "0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c0"
+ "0a60b1ce1d7e819d7a431d7c90ea0e5f"
+ },
+ {
+ "NIST P-521", 521, 1,
+ "0x01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+ "0x01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc",
+ "0x051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef10"
+ "9e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00",
+ "0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ "ffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409",
+
+ "0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3d"
+ "baa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66",
+ "0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e6"
+ "62c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"
+ },
+
+ { "brainpoolP160r1", 160, 0,
+ "0xe95e4a5f737059dc60dfc7ad95b3d8139515620f",
+ "0x340e7be2a280eb74e2be61bada745d97e8f7c300",
+ "0x1e589a8595423412134faa2dbdec95c8d8675e58",
+ "0xe95e4a5f737059dc60df5991d45029409e60fc09",
+ "0xbed5af16ea3f6a4f62938c4631eb5af7bdbcdbc3",
+ "0x1667cb477a1a8ec338f94741669c976316da6321"
+ },
+
+ { "brainpoolP192r1", 192, 0,
+ "0xc302f41d932a36cda7a3463093d18db78fce476de1a86297",
+ "0x6a91174076b1e0e19c39c031fe8685c1cae040e5c69a28ef",
+ "0x469a28ef7c28cca3dc721d044f4496bcca7ef4146fbf25c9",
+ "0xc302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1",
+ "0xc0a0647eaab6a48753b033c56cb0f0900a2f5c4853375fd6",
+ "0x14b690866abd5bb88b5f4828c1490002e6773fa2fa299b8f"
+ },
+
+ { "brainpoolP224r1", 224, 0,
+ "0xd7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0ff",
+ "0x68a5e62ca9ce6c1c299803a6c1530b514e182ad8b0042a59cad29f43",
+ "0x2580f63ccfe44138870713b1a92369e33e2135d266dbb372386c400b",
+ "0xd7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f",
+ "0x0d9029ad2c7e5cf4340823b2a87dc68c9e4ce3174c1e6efdee12c07d",
+ "0x58aa56f772c0726f24c6b89e4ecdac24354b9e99caa3f6d3761402cd"
+ },
+
+ { "brainpoolP256r1", 256, 0,
+ "0xa9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377",
+ "0x7d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6ce94a4b44f330b5d9",
+ "0x26dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7e1ce6bccdc18ff8c07b6",
+ "0xa9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7",
+ "0x8bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27e1e3bd23c23a4453bd9ace3262",
+ "0x547ef835c3dac4fd97f8461a14611dc9c27745132ded8e545c1d54c72f046997"
+ },
+
+ { "brainpoolP320r1", 320, 0,
+ "0xd35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28"
+ "fcd412b1f1b32e27",
+ "0x3ee30b568fbab0f883ccebd46d3f3bb8a2a73513f5eb79da66190eb085ffa9f4"
+ "92f375a97d860eb4",
+ "0x520883949dfdbc42d3ad198640688a6fe13f41349554b49acc31dccd88453981"
+ "6f5eb4ac8fb1f1a6",
+ "0xd35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e9"
+ "8691555b44c59311",
+ "0x43bd7e9afb53d8b85289bcc48ee5bfe6f20137d10a087eb6e7871e2a10a599c7"
+ "10af8d0d39e20611",
+ "0x14fdd05545ec1cc8ab4093247f77275e0743ffed117182eaa9c77877aaac6ac7"
+ "d35245d1692e8ee1"
+ },
+
+ { "brainpoolP384r1", 384, 0,
+ "0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123"
+ "acd3a729901d1a71874700133107ec53",
+ "0x7bc382c63d8c150c3c72080ace05afa0c2bea28e4fb22787139165efba91f90f"
+ "8aa5814a503ad4eb04a8c7dd22ce2826",
+ "0x04a8c7dd22ce28268b39b55416f0447c2fb77de107dcd2a62e880ea53eeb62d5"
+ "7cb4390295dbc9943ab78696fa504c11",
+ "0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7"
+ "cf3ab6af6b7fc3103b883202e9046565",
+ "0x1d1c64f068cf45ffa2a63a81b7c13f6b8847a3e77ef14fe3db7fcafe0cbd10e8"
+ "e826e03436d646aaef87b2e247d4af1e",
+ "0x8abe1d7520f9c2a45cb1eb8e95cfd55262b70b29feec5864e19c054ff9912928"
+ "0e4646217791811142820341263c5315"
+ },
+
+ { "brainpoolP512r1", 512, 0,
+ "0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330871"
+ "7d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3",
+ "0x7830a3318b603b89e2327145ac234cc594cbdd8d3df91610a83441caea9863bc"
+ "2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94ca",
+ "0x3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a7"
+ "2bf2c7b9e7c1ac4d77fc94cadc083e67984050b75ebae5dd2809bd638016f723",
+ "0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870"
+ "553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90069",
+ "0x81aee4bdd82ed9645a21322e9c4c6a9385ed9f70b5d916c1b43b62eef4d0098e"
+ "ff3b1f78e2d0d48d50d1687b93b97d5f7c6d5047406a5e688b352209bcb9f822",
+ "0x7dde385d566332ecc0eabfa9cf7822fdf209f70024a57b1aa000c55b881f8111"
+ "b2dcde494a5f485e5bca4bd88a2763aed1ca2b2fa8f0540678cd1e0f3ad80892"
+ },
+
+ { NULL, 0, 0, NULL, NULL, NULL, NULL }
+ };
+
+
+/* Registered progress function and its callback value. */
+static void (*progress_cb) (void *, const char*, int, int, int);
+static void *progress_cb_data;
+
+
+#define point_init(a) _gcry_mpi_ec_point_init ((a))
+#define point_free(a) _gcry_mpi_ec_point_free ((a))
+
+
+
+/* Local prototypes. */
+static gcry_mpi_t gen_k (gcry_mpi_t p, int security_level);
+static void test_keys (ECC_secret_key * sk, unsigned int nbits);
+static int check_secret_key (ECC_secret_key * sk);
+static gpg_err_code_t sign (gcry_mpi_t input, ECC_secret_key *skey,
+ gcry_mpi_t r, gcry_mpi_t s);
+static gpg_err_code_t verify (gcry_mpi_t input, ECC_public_key *pkey,
+ gcry_mpi_t r, gcry_mpi_t s);
+
+
+static gcry_mpi_t gen_y_2 (gcry_mpi_t x, elliptic_curve_t * base);
+
+
+
+
+void
+_gcry_register_pk_ecc_progress (void (*cb) (void *, const char *,
+ int, int, int),
+ void *cb_data)
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+/* static void */
+/* progress (int c) */
+/* { */
+/* if (progress_cb) */
+/* progress_cb (progress_cb_data, "pk_ecc", c, 0, 0); */
+/* } */
+
+
+
+
+/* Set the value from S into D. */
+static void
+point_set (mpi_point_t *d, mpi_point_t *s)
+{
+ mpi_set (d->x, s->x);
+ mpi_set (d->y, s->y);
+ mpi_set (d->z, s->z);
+}
+
+
+/*
+ * Release a curve object.
+ */
+static void
+curve_free (elliptic_curve_t *E)
+{
+ mpi_free (E->p); E->p = NULL;
+ mpi_free (E->a); E->a = NULL;
+ mpi_free (E->b); E->b = NULL;
+ point_free (&E->G);
+ mpi_free (E->n); E->n = NULL;
+}
+
+
+/*
+ * Return a copy of a curve object.
+ */
+static elliptic_curve_t
+curve_copy (elliptic_curve_t E)
+{
+ elliptic_curve_t R;
+
+ R.p = mpi_copy (E.p);
+ R.a = mpi_copy (E.a);
+ R.b = mpi_copy (E.b);
+ point_init (&R.G);
+ point_set (&R.G, &E.G);
+ R.n = mpi_copy (E.n);
+
+ return R;
+}
+
+
+
+/* Helper to scan a hex string. */
+static gcry_mpi_t
+scanval (const char *string)
+{
+ gpg_error_t err;
+ gcry_mpi_t val;
+
+ err = gcry_mpi_scan (&val, GCRYMPI_FMT_HEX, string, 0, NULL);
+ if (err)
+ log_fatal ("scanning ECC parameter failed: %s\n", gpg_strerror (err));
+ return val;
+}
+
+
+
+
+
+/****************
+ * Solve the right side of the equation that defines a curve.
+ */
+static gcry_mpi_t
+gen_y_2 (gcry_mpi_t x, elliptic_curve_t *base)
+{
+ gcry_mpi_t three, x_3, axb, y;
+
+ three = mpi_alloc_set_ui (3);
+ x_3 = mpi_new (0);
+ axb = mpi_new (0);
+ y = mpi_new (0);
+
+ mpi_powm (x_3, x, three, base->p);
+ mpi_mulm (axb, base->a, x, base->p);
+ mpi_addm (axb, axb, base->b, base->p);
+ mpi_addm (y, x_3, axb, base->p);
+
+ mpi_free (x_3);
+ mpi_free (axb);
+ mpi_free (three);
+ return y; /* The quadratic value of the coordinate if it exist. */
+}
+
+
+
+
+
+/* Generate a random secret scalar k with an order of p
+
+ At the beginning this was identical to the code is in elgamal.c.
+ Later imporved by mmr. Further simplified by wk. */
+static gcry_mpi_t
+gen_k (gcry_mpi_t p, int security_level)
+{
+ gcry_mpi_t k;
+ unsigned int nbits;
+
+ nbits = mpi_get_nbits (p);
+ k = mpi_snew (nbits);
+ if (DBG_CIPHER)
+ log_debug ("choosing a random k of %u bits\n", nbits);
+
+ gcry_mpi_randomize (k, nbits, security_level);
+
+ mpi_mod (k, k, p); /* k = k mod p */
+
+ return k;
+}
+
+/****************
+ * Generate the crypto system setup.
+ * As of now the fix NIST recommended values are used.
+ * The subgroup generator point is in another function: gen_big_point.
+ */
+static gpg_err_code_t
+generate_curve (unsigned int nbits, const char *name,
+ elliptic_curve_t *curve, unsigned int *r_nbits)
+{
+ int idx, aliasno;
+
+ if (name)
+ {
+ /* First check nor native curves. */
+ for (idx = 0; domain_parms[idx].desc; idx++)
+ if (!strcmp (name, domain_parms[idx].desc))
+ break;
+ /* If not found consult the alias table. */
+ if (!domain_parms[idx].desc)
+ {
+ for (aliasno = 0; curve_aliases[aliasno].name; aliasno++)
+ if (!strcmp (name, curve_aliases[aliasno].other))
+ break;
+ if (curve_aliases[aliasno].name)
+ {
+ for (idx = 0; domain_parms[idx].desc; idx++)
+ if (!strcmp (curve_aliases[aliasno].name,
+ domain_parms[idx].desc))
+ break;
+ }
+ }
+ }
+ else
+ {
+ for (idx = 0; domain_parms[idx].desc; idx++)
+ if (nbits == domain_parms[idx].nbits)
+ break;
+ }
+ if (!domain_parms[idx].desc)
+ return GPG_ERR_INV_VALUE;
+
+ /* In fips mode we only support NIST curves. Note that it is
+ possible to bypass this check by specifying the curve parameters
+ directly. */
+ if (fips_mode () && !domain_parms[idx].fips )
+ return GPG_ERR_NOT_SUPPORTED;
+
+
+ *r_nbits = domain_parms[idx].nbits;
+ curve->p = scanval (domain_parms[idx].p);
+ curve->a = scanval (domain_parms[idx].a);
+ curve->b = scanval (domain_parms[idx].b);
+ curve->n = scanval (domain_parms[idx].n);
+ curve->G.x = scanval (domain_parms[idx].g_x);
+ curve->G.y = scanval (domain_parms[idx].g_y);
+ curve->G.z = mpi_alloc_set_ui (1);
+
+ return 0;
+}
+
+
+/*
+ * First obtain the setup. Over the finite field randomize an scalar
+ * secret value, and calculate the public point.
+ */
+static gpg_err_code_t
+generate_key (ECC_secret_key *sk, unsigned int nbits, const char *name,
+ gcry_mpi_t g_x, gcry_mpi_t g_y,
+ gcry_mpi_t q_x, gcry_mpi_t q_y)
+{
+ gpg_err_code_t err;
+ elliptic_curve_t E;
+ gcry_mpi_t d;
+ mpi_point_t Q;
+ mpi_ec_t ctx;
+
+ err = generate_curve (nbits, name, &E, &nbits);
+ if (err)
+ return err;
+
+ if (DBG_CIPHER)
+ {
+ log_mpidump ("ecc generation p", E.p);
+ log_mpidump ("ecc generation a", E.a);
+ log_mpidump ("ecc generation b", E.b);
+ log_mpidump ("ecc generation n", E.n);
+ log_mpidump ("ecc generation Gx", E.G.x);
+ log_mpidump ("ecc generation Gy", E.G.y);
+ log_mpidump ("ecc generation Gz", E.G.z);
+ }
+
+ if (DBG_CIPHER)
+ log_debug ("choosing a random x of size %u\n", nbits);
+ d = gen_k (E.n, GCRY_VERY_STRONG_RANDOM);
+
+ /* Compute Q. */
+ point_init (&Q);
+ ctx = _gcry_mpi_ec_init (E.p, E.a);
+ _gcry_mpi_ec_mul_point (&Q, d, &E.G, ctx);
+
+ /* Copy the stuff to the key structures. */
+ sk->E.p = mpi_copy (E.p);
+ sk->E.a = mpi_copy (E.a);
+ sk->E.b = mpi_copy (E.b);
+ point_init (&sk->E.G);
+ point_set (&sk->E.G, &E.G);
+ sk->E.n = mpi_copy (E.n);
+ point_init (&sk->Q);
+ point_set (&sk->Q, &Q);
+ sk->d = mpi_copy (d);
+ /* We also return copies of G and Q in affine coordinates if
+ requested. */
+ if (g_x && g_y)
+ {
+ if (_gcry_mpi_ec_get_affine (g_x, g_y, &sk->E.G, ctx))
+ log_fatal ("ecc generate: Failed to get affine coordinates\n");
+ }
+ if (q_x && q_y)
+ {
+ if (_gcry_mpi_ec_get_affine (q_x, q_y, &sk->Q, ctx))
+ log_fatal ("ecc generate: Failed to get affine coordinates\n");
+ }
+ _gcry_mpi_ec_free (ctx);
+
+ point_free (&Q);
+ mpi_free (d);
+ curve_free (&E);
+
+ /* Now we can test our keys (this should never fail!). */
+ test_keys (sk, nbits - 64);
+
+ return 0;
+}
+
+
+/****************
+ * To verify correct skey it use a random information.
+ * First, encrypt and decrypt this dummy value,
+ * test if the information is recuperated.
+ * Second, test with the sign and verify functions.
+ */
+static void
+test_keys (ECC_secret_key *sk, unsigned int nbits)
+{
+ ECC_public_key pk;
+ gcry_mpi_t test = mpi_new (nbits);
+ mpi_point_t R_;
+ gcry_mpi_t c = mpi_new (nbits);
+ gcry_mpi_t out = mpi_new (nbits);
+ gcry_mpi_t r = mpi_new (nbits);
+ gcry_mpi_t s = mpi_new (nbits);
+
+ if (DBG_CIPHER)
+ log_debug ("Testing key.\n");
+
+ point_init (&R_);
+
+ pk.E = curve_copy (sk->E);
+ point_init (&pk.Q);
+ point_set (&pk.Q, &sk->Q);
+
+ gcry_mpi_randomize (test, nbits, GCRY_WEAK_RANDOM);
+
+ if (sign (test, sk, r, s) )
+ log_fatal ("ECDSA operation: sign failed\n");
+
+ if (verify (test, &pk, r, s))
+ {
+ log_fatal ("ECDSA operation: sign, verify failed\n");
+ }
+
+ if (DBG_CIPHER)
+ log_debug ("ECDSA operation: sign, verify ok.\n");
+
+ point_free (&pk.Q);
+ curve_free (&pk.E);
+
+ point_free (&R_);
+ mpi_free (s);
+ mpi_free (r);
+ mpi_free (out);
+ mpi_free (c);
+ mpi_free (test);
+}
+
+/****************
+ * To check the validity of the value, recalculate the correspondence
+ * between the public value and the secret one.
+ */
+static int
+check_secret_key (ECC_secret_key * sk)
+{
+ mpi_point_t Q;
+ gcry_mpi_t y_2, y2 = mpi_alloc (0);
+ mpi_ec_t ctx;
+
+ /* ?primarity test of 'p' */
+ /* (...) //!! */
+ /* G in E(F_p) */
+ y_2 = gen_y_2 (sk->E.G.x, &sk->E); /* y^2=x^3+a*x+b */
+ mpi_mulm (y2, sk->E.G.y, sk->E.G.y, sk->E.p); /* y^2=y*y */
+ if (mpi_cmp (y_2, y2))
+ {
+ if (DBG_CIPHER)
+ log_debug ("Bad check: Point 'G' does not belong to curve 'E'!\n");
+ return (1);
+ }
+ /* G != PaI */
+ if (!mpi_cmp_ui (sk->E.G.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("Bad check: 'G' cannot be Point at Infinity!\n");
+ return (1);
+ }
+
+ point_init (&Q);
+ ctx = _gcry_mpi_ec_init (sk->E.p, sk->E.a);
+ _gcry_mpi_ec_mul_point (&Q, sk->E.n, &sk->E.G, ctx);
+ if (mpi_cmp_ui (Q.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("check_secret_key: E is not a curve of order n\n");
+ point_free (&Q);
+ _gcry_mpi_ec_free (ctx);
+ return 1;
+ }
+ /* pubkey cannot be PaI */
+ if (!mpi_cmp_ui (sk->Q.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("Bad check: Q can not be a Point at Infinity!\n");
+ _gcry_mpi_ec_free (ctx);
+ return (1);
+ }
+ /* pubkey = [d]G over E */
+ _gcry_mpi_ec_mul_point (&Q, sk->d, &sk->E.G, ctx);
+ if ((Q.x == sk->Q.x) && (Q.y == sk->Q.y) && (Q.z == sk->Q.z))
+ {
+ if (DBG_CIPHER)
+ log_debug
+ ("Bad check: There is NO correspondence between 'd' and 'Q'!\n");
+ _gcry_mpi_ec_free (ctx);
+ return (1);
+ }
+ _gcry_mpi_ec_free (ctx);
+ point_free (&Q);
+ return 0;
+}
+
+
+/*
+ * Return the signature struct (r,s) from the message hash. The caller
+ * must have allocated R and S.
+ */
+static gpg_err_code_t
+sign (gcry_mpi_t input, ECC_secret_key *skey, gcry_mpi_t r, gcry_mpi_t s)
+{
+ gpg_err_code_t err = 0;
+ gcry_mpi_t k, dr, sum, k_1, x;
+ mpi_point_t I;
+ mpi_ec_t ctx;
+
+ k = NULL;
+ dr = mpi_alloc (0);
+ sum = mpi_alloc (0);
+ k_1 = mpi_alloc (0);
+ x = mpi_alloc (0);
+ point_init (&I);
+
+ mpi_set_ui (s, 0);
+ mpi_set_ui (r, 0);
+
+ ctx = _gcry_mpi_ec_init (skey->E.p, skey->E.a);
+
+ while (!mpi_cmp_ui (s, 0)) /* s == 0 */
+ {
+ while (!mpi_cmp_ui (r, 0)) /* r == 0 */
+ {
+ /* Note, that we are guaranteed to enter this loop at least
+ once because r has been intialized to 0. We can't use a
+ do_while because we want to keep the value of R even if S
+ has to be recomputed. */
+ mpi_free (k);
+ k = gen_k (skey->E.n, GCRY_STRONG_RANDOM);
+ _gcry_mpi_ec_mul_point (&I, k, &skey->E.G, ctx);
+ if (_gcry_mpi_ec_get_affine (x, NULL, &I, ctx))
+ {
+ if (DBG_CIPHER)
+ log_debug ("ecc sign: Failed to get affine coordinates\n");
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ mpi_mod (r, x, skey->E.n); /* r = x mod n */
+ }
+ mpi_mulm (dr, skey->d, r, skey->E.n); /* dr = d*r mod n */
+ mpi_addm (sum, input, dr, skey->E.n); /* sum = hash + (d*r) mod n */
+ mpi_invm (k_1, k, skey->E.n); /* k_1 = k^(-1) mod n */
+ mpi_mulm (s, k_1, sum, skey->E.n); /* s = k^(-1)*(hash+(d*r)) mod n */
+ }
+
+ leave:
+ _gcry_mpi_ec_free (ctx);
+ point_free (&I);
+ mpi_free (x);
+ mpi_free (k_1);
+ mpi_free (sum);
+ mpi_free (dr);
+ mpi_free (k);
+
+ return err;
+}
+
+/*
+ * Check if R and S verifies INPUT.
+ */
+static gpg_err_code_t
+verify (gcry_mpi_t input, ECC_public_key *pkey, gcry_mpi_t r, gcry_mpi_t s)
+{
+ gpg_err_code_t err = 0;
+ gcry_mpi_t h, h1, h2, x, y;
+ mpi_point_t Q, Q1, Q2;
+ mpi_ec_t ctx;
+
+ if( !(mpi_cmp_ui (r, 0) > 0 && mpi_cmp (r, pkey->E.n) < 0) )
+ return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < r < n failed. */
+ if( !(mpi_cmp_ui (s, 0) > 0 && mpi_cmp (s, pkey->E.n) < 0) )
+ return GPG_ERR_BAD_SIGNATURE; /* Assertion 0 < s < n failed. */
+
+ h = mpi_alloc (0);
+ h1 = mpi_alloc (0);
+ h2 = mpi_alloc (0);
+ x = mpi_alloc (0);
+ y = mpi_alloc (0);
+ point_init (&Q);
+ point_init (&Q1);
+ point_init (&Q2);
+
+ ctx = _gcry_mpi_ec_init (pkey->E.p, pkey->E.a);
+
+ /* h = s^(-1) (mod n) */
+ mpi_invm (h, s, pkey->E.n);
+/* log_mpidump (" h", h); */
+ /* h1 = hash * s^(-1) (mod n) */
+ mpi_mulm (h1, input, h, pkey->E.n);
+/* log_mpidump (" h1", h1); */
+ /* Q1 = [ hash * s^(-1) ]G */
+ _gcry_mpi_ec_mul_point (&Q1, h1, &pkey->E.G, ctx);
+/* log_mpidump ("Q1.x", Q1.x); */
+/* log_mpidump ("Q1.y", Q1.y); */
+/* log_mpidump ("Q1.z", Q1.z); */
+ /* h2 = r * s^(-1) (mod n) */
+ mpi_mulm (h2, r, h, pkey->E.n);
+/* log_mpidump (" h2", h2); */
+ /* Q2 = [ r * s^(-1) ]Q */
+ _gcry_mpi_ec_mul_point (&Q2, h2, &pkey->Q, ctx);
+/* log_mpidump ("Q2.x", Q2.x); */
+/* log_mpidump ("Q2.y", Q2.y); */
+/* log_mpidump ("Q2.z", Q2.z); */
+ /* Q = ([hash * s^(-1)]G) + ([r * s^(-1)]Q) */
+ _gcry_mpi_ec_add_points (&Q, &Q1, &Q2, ctx);
+/* log_mpidump (" Q.x", Q.x); */
+/* log_mpidump (" Q.y", Q.y); */
+/* log_mpidump (" Q.z", Q.z); */
+
+ if (!mpi_cmp_ui (Q.z, 0))
+ {
+ if (DBG_CIPHER)
+ log_debug ("ecc verify: Rejected\n");
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ if (_gcry_mpi_ec_get_affine (x, y, &Q, ctx))
+ {
+ if (DBG_CIPHER)
+ log_debug ("ecc verify: Failed to get affine coordinates\n");
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ mpi_mod (x, x, pkey->E.n); /* x = x mod E_n */
+ if (mpi_cmp (x, r)) /* x != r */
+ {
+ if (DBG_CIPHER)
+ {
+ log_mpidump (" x", x);
+ log_mpidump (" y", y);
+ log_mpidump (" r", r);
+ log_mpidump (" s", s);
+ log_debug ("ecc verify: Not verified\n");
+ }
+ err = GPG_ERR_BAD_SIGNATURE;
+ goto leave;
+ }
+ if (DBG_CIPHER)
+ log_debug ("ecc verify: Accepted\n");
+
+ leave:
+ _gcry_mpi_ec_free (ctx);
+ point_free (&Q2);
+ point_free (&Q1);
+ point_free (&Q);
+ mpi_free (y);
+ mpi_free (x);
+ mpi_free (h2);
+ mpi_free (h1);
+ mpi_free (h);
+ return err;
+}
+
+
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+static gcry_mpi_t
+ec2os (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t p)
+{
+ gpg_error_t err;
+ int pbytes = (mpi_get_nbits (p)+7)/8;
+ size_t n;
+ unsigned char *buf, *ptr;
+ gcry_mpi_t result;
+
+ buf = gcry_xmalloc ( 1 + 2*pbytes );
+ *buf = 04; /* Uncompressed point. */
+ ptr = buf+1;
+ err = gcry_mpi_print (GCRYMPI_FMT_USG, ptr, pbytes, &n, x);
+ if (err)
+ log_fatal ("mpi_print failed: %s\n", gpg_strerror (err));
+ if (n < pbytes)
+ {
+ memmove (ptr+(pbytes-n), ptr, n);
+ memset (ptr, 0, (pbytes-n));
+ }
+ ptr += pbytes;
+ err = gcry_mpi_print (GCRYMPI_FMT_USG, ptr, pbytes, &n, y);
+ if (err)
+ log_fatal ("mpi_print failed: %s\n", gpg_strerror (err));
+ if (n < pbytes)
+ {
+ memmove (ptr+(pbytes-n), ptr, n);
+ memset (ptr, 0, (pbytes-n));
+ }
+
+ err = gcry_mpi_scan (&result, GCRYMPI_FMT_USG, buf, 1+2*pbytes, NULL);
+ if (err)
+ log_fatal ("mpi_scan failed: %s\n", gpg_strerror (err));
+ gcry_free (buf);
+
+ mpi_free (x);
+ mpi_free (y);
+
+ return result;
+}
+
+/* RESULT must have been initialized and is set on success to the
+ point given by VALUE. */
+static gcry_error_t
+os2ec (mpi_point_t *result, gcry_mpi_t value)
+{
+ gcry_error_t err;
+ size_t n;
+ unsigned char *buf;
+ gcry_mpi_t x, y;
+
+ n = (mpi_get_nbits (value)+7)/8;
+ buf = gcry_xmalloc (n);
+ err = gcry_mpi_print (GCRYMPI_FMT_USG, buf, n, &n, value);
+ if (err)
+ {
+ gcry_free (buf);
+ return err;
+ }
+ if (n < 1)
+ {
+ gcry_free (buf);
+ return GPG_ERR_INV_OBJ;
+ }
+ if (*buf != 4)
+ {
+ gcry_free (buf);
+ return GPG_ERR_NOT_IMPLEMENTED; /* No support for point compression. */
+ }
+ if ( ((n-1)%2) )
+ {
+ gcry_free (buf);
+ return GPG_ERR_INV_OBJ;
+ }
+ n = (n-1)/2;
+ err = gcry_mpi_scan (&x, GCRYMPI_FMT_USG, buf+1, n, NULL);
+ if (err)
+ {
+ gcry_free (buf);
+ return err;
+ }
+ err = gcry_mpi_scan (&y, GCRYMPI_FMT_USG, buf+1+n, n, NULL);
+ gcry_free (buf);
+ if (err)
+ {
+ mpi_free (x);
+ return err;
+ }
+
+ mpi_set (result->x, x);
+ mpi_set (result->y, y);
+ mpi_set_ui (result->z, 1);
+
+ mpi_free (x);
+ mpi_free (y);
+
+ return 0;
+}
+
+
+/* Extended version of ecc_generate. */
+static gcry_err_code_t
+ecc_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ gpg_err_code_t ec;
+ ECC_secret_key sk;
+ gcry_mpi_t g_x, g_y, q_x, q_y;
+ char *curve_name = NULL;
+ gcry_sexp_t l1;
+
+ (void)algo;
+ (void)evalue;
+ (void)r_extrainfo;
+
+ if (genparms)
+ {
+ /* Parse the optional "curve" parameter. */
+ l1 = gcry_sexp_find_token (genparms, "curve", 0);
+ if (l1)
+ {
+ curve_name = _gcry_sexp_nth_string (l1, 1);
+ gcry_sexp_release (l1);
+ if (!curve_name)
+ return GPG_ERR_INV_OBJ; /* No curve name or value too large. */
+ }
+ }
+
+ /* NBITS is required if no curve name has been given. */
+ if (!nbits && !curve_name)
+ return GPG_ERR_NO_OBJ; /* No NBITS parameter. */
+
+ g_x = mpi_new (0);
+ g_y = mpi_new (0);
+ q_x = mpi_new (0);
+ q_y = mpi_new (0);
+ ec = generate_key (&sk, nbits, curve_name, g_x, g_y, q_x, q_y);
+ gcry_free (curve_name);
+ if (ec)
+ return ec;
+
+ skey[0] = sk.E.p;
+ skey[1] = sk.E.a;
+ skey[2] = sk.E.b;
+ /* The function ec2os releases g_x and g_y. */
+ skey[3] = ec2os (g_x, g_y, sk.E.p);
+ skey[4] = sk.E.n;
+ /* The function ec2os releases g_x and g_y. */
+ skey[5] = ec2os (q_x, q_y, sk.E.p);
+ skey[6] = sk.d;
+
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+
+ /* Make an empty list of factors. */
+ *retfactors = gcry_calloc ( 1, sizeof **retfactors );
+ if (!*retfactors)
+ return gpg_err_code_from_syserror ();
+
+ return 0;
+}
+
+
+static gcry_err_code_t
+ecc_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ (void)evalue;
+ return ecc_generate_ext (algo, nbits, 0, NULL, skey, retfactors, NULL);
+}
+
+
+/* Return the parameters of the curve NAME. */
+static gcry_err_code_t
+ecc_get_param (const char *name, gcry_mpi_t *pkey)
+{
+ gpg_err_code_t err;
+ unsigned int nbits;
+ elliptic_curve_t E;
+ mpi_ec_t ctx;
+ gcry_mpi_t g_x, g_y;
+
+ err = generate_curve (0, name, &E, &nbits);
+ if (err)
+ return err;
+
+ g_x = mpi_new (0);
+ g_y = mpi_new (0);
+ ctx = _gcry_mpi_ec_init (E.p, E.a);
+ if (_gcry_mpi_ec_get_affine (g_x, g_y, &E.G, ctx))
+ log_fatal ("ecc get param: Failed to get affine coordinates\n");
+ _gcry_mpi_ec_free (ctx);
+ point_free (&E.G);
+
+ pkey[0] = E.p;
+ pkey[1] = E.a;
+ pkey[2] = E.b;
+ pkey[3] = ec2os (g_x, g_y, E.p);
+ pkey[4] = E.n;
+ pkey[5] = NULL;
+
+ return 0;
+}
+
+
+static gcry_err_code_t
+ecc_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gpg_err_code_t err;
+ ECC_secret_key sk;
+
+ (void)algo;
+
+ if (!skey[0] || !skey[1] || !skey[2] || !skey[3] || !skey[4] || !skey[5]
+ || !skey[6] || !skey[7] || !skey[8] || !skey[9] || !skey[10])
+ return GPG_ERR_BAD_MPI;
+
+ sk.E.p = skey[0];
+ sk.E.a = skey[1];
+ sk.E.b = skey[2];
+ point_init (&sk.E.G);
+ err = os2ec (&sk.E.G, skey[3]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ return err;
+ }
+ sk.E.n = skey[4];
+ point_init (&sk.Q);
+ err = os2ec (&sk.Q, skey[5]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return err;
+ }
+
+ sk.d = skey[6];
+
+ if (check_secret_key (&sk))
+ {
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return GPG_ERR_BAD_SECKEY;
+ }
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return 0;
+}
+
+
+static gcry_err_code_t
+ecc_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ gpg_err_code_t err;
+ ECC_secret_key sk;
+
+ (void)algo;
+
+ if (!data || !skey[0] || !skey[1] || !skey[2] || !skey[3] || !skey[4]
+ || !skey[5] || !skey[6] )
+ return GPG_ERR_BAD_MPI;
+
+ sk.E.p = skey[0];
+ sk.E.a = skey[1];
+ sk.E.b = skey[2];
+ point_init (&sk.E.G);
+ err = os2ec (&sk.E.G, skey[3]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ return err;
+ }
+ sk.E.n = skey[4];
+ point_init (&sk.Q);
+ err = os2ec (&sk.Q, skey[5]);
+ if (err)
+ {
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return err;
+ }
+ sk.d = skey[6];
+
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (sk.E.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (sk.E.p));
+ err = sign (data, &sk, resarr[0], resarr[1]);
+ if (err)
+ {
+ mpi_free (resarr[0]);
+ mpi_free (resarr[1]);
+ resarr[0] = NULL; /* Mark array as released. */
+ }
+ point_free (&sk.E.G);
+ point_free (&sk.Q);
+ return err;
+}
+
+static gcry_err_code_t
+ecc_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp)(void *, gcry_mpi_t), void *opaquev)
+{
+ gpg_err_code_t err;
+ ECC_public_key pk;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ if (!data[0] || !data[1] || !hash || !pkey[0] || !pkey[1] || !pkey[2]
+ || !pkey[3] || !pkey[4] || !pkey[5] )
+ return GPG_ERR_BAD_MPI;
+
+ pk.E.p = pkey[0];
+ pk.E.a = pkey[1];
+ pk.E.b = pkey[2];
+ point_init (&pk.E.G);
+ err = os2ec (&pk.E.G, pkey[3]);
+ if (err)
+ {
+ point_free (&pk.E.G);
+ return err;
+ }
+ pk.E.n = pkey[4];
+ point_init (&pk.Q);
+ err = os2ec (&pk.Q, pkey[5]);
+ if (err)
+ {
+ point_free (&pk.E.G);
+ point_free (&pk.Q);
+ return err;
+ }
+
+ err = verify (hash, &pk, data[0], data[1]);
+
+ point_free (&pk.E.G);
+ point_free (&pk.Q);
+ return err;
+}
+
+
+
+static unsigned int
+ecc_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+
+/* See rsa.c for a description of this function. */
+static gpg_err_code_t
+compute_keygrip (gcry_md_hd_t md, gcry_sexp_t keyparam)
+{
+ static const char names[] = "pabgnq";
+ gpg_err_code_t ec = 0;
+ gcry_sexp_t l1;
+ gcry_mpi_t values[6];
+ int idx;
+
+ /* Clear the values for easier error cleanup. */
+ for (idx=0; idx < 6; idx++)
+ values[idx] = NULL;
+
+ /* Fill values with all available parameters. */
+ for (idx=0; idx < 6; idx++)
+ {
+ l1 = gcry_sexp_find_token (keyparam, names+idx, 1);
+ if (l1)
+ {
+ values[idx] = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (l1);
+ if (!values[idx])
+ {
+ ec = GPG_ERR_INV_OBJ;
+ goto leave;
+ }
+ }
+ }
+
+ /* Check whether a curve parameter is available and use that to fill
+ in missing values. */
+ l1 = gcry_sexp_find_token (keyparam, "curve", 5);
+ if (l1)
+ {
+ char *curve;
+ gcry_mpi_t tmpvalues[6];
+
+ for (idx = 0; idx < 6; idx++)
+ tmpvalues[idx] = NULL;
+
+ curve = _gcry_sexp_nth_string (l1, 1);
+ if (!curve)
+ {
+ ec = GPG_ERR_INV_OBJ; /* Name missing or out of core. */
+ goto leave;
+ }
+ ec = ecc_get_param (curve, tmpvalues);
+ gcry_free (curve);
+ if (ec)
+ goto leave;
+
+ for (idx = 0; idx < 6; idx++)
+ {
+ if (!values[idx])
+ values[idx] = tmpvalues[idx];
+ else
+ mpi_free (tmpvalues[idx]);
+ }
+ }
+
+ /* Check that all parameters are known and normalize all MPIs (that
+ should not be required but we use an internal fucntion later and
+ thus we better make 100% sure that they are normalized). */
+ for (idx = 0; idx < 6; idx++)
+ if (!values[idx])
+ {
+ ec = GPG_ERR_NO_OBJ;
+ goto leave;
+ }
+ else
+ _gcry_mpi_normalize (values[idx]);
+
+ /* Hash them all. */
+ for (idx = 0; idx < 6; idx++)
+ {
+ char buf[30];
+ unsigned char *rawmpi;
+ unsigned int rawmpilen;
+
+ rawmpi = _gcry_mpi_get_buffer (values[idx], &rawmpilen, NULL);
+ if (!rawmpi)
+ {
+ ec = gpg_err_code_from_syserror ();
+ goto leave;
+ }
+ snprintf (buf, sizeof buf, "(1:%c%u:", names[idx], rawmpilen);
+ gcry_md_write (md, buf, strlen (buf));
+ gcry_md_write (md, rawmpi, rawmpilen);
+ gcry_md_write (md, ")", 1);
+ gcry_free (rawmpi);
+ }
+
+ leave:
+ for (idx = 0; idx < 6; idx++)
+ _gcry_mpi_release (values[idx]);
+
+ return ec;
+}
+
+
+
+
+
+/*
+ Self-test section.
+ */
+
+
+static gpg_err_code_t
+selftests_ecdsa (selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ what = "low-level";
+ errtxt = NULL; /*selftest ();*/
+ if (errtxt)
+ goto failed;
+
+ /* FIXME: need more tests. */
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("pubkey", GCRY_PK_ECDSA, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ (void)extended;
+
+ switch (algo)
+ {
+ case GCRY_PK_ECDSA:
+ ec = selftests_ecdsa (report);
+ break;
+ default:
+ ec = GPG_ERR_PUBKEY_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+
+static const char *ecdsa_names[] =
+ {
+ "ecdsa",
+ "ecc",
+ NULL,
+ };
+
+gcry_pk_spec_t _gcry_pubkey_spec_ecdsa =
+ {
+ "ECDSA", ecdsa_names,
+ "pabgnq", "pabgnqd", "", "rs", "pabgnq",
+ GCRY_PK_USAGE_SIGN,
+ ecc_generate,
+ ecc_check_secret_key,
+ NULL,
+ NULL,
+ ecc_sign,
+ ecc_verify,
+ ecc_get_nbits
+ };
+
+pk_extra_spec_t _gcry_pubkey_extraspec_ecdsa =
+ {
+ run_selftests,
+ ecc_generate_ext,
+ compute_keygrip,
+ ecc_get_param
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/elgamal.c b/grub-core/lib/libgcrypt/cipher/elgamal.c
new file mode 100644
index 0000000..0b0c07c
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/elgamal.c
@@ -0,0 +1,846 @@
+/* Elgamal.c - Elgamal Public Key encryption
+ * Copyright (C) 1998, 2000, 2001, 2002, 2003,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * For a description of the algorithm, see:
+ * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
+ * ISBN 0-471-11709-9. Pages 476 ff.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+} ELG_public_key;
+
+
+typedef struct
+{
+ gcry_mpi_t p; /* prime */
+ gcry_mpi_t g; /* group generator */
+ gcry_mpi_t y; /* g^x mod p */
+ gcry_mpi_t x; /* secret exponent */
+} ELG_secret_key;
+
+
+static int test_keys (ELG_secret_key *sk, unsigned int nbits, int nodie);
+static gcry_mpi_t gen_k (gcry_mpi_t p, int small_k);
+static void generate (ELG_secret_key *sk, unsigned nbits, gcry_mpi_t **factors);
+static int check_secret_key (ELG_secret_key *sk);
+static void do_encrypt (gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input,
+ ELG_public_key *pkey);
+static void decrypt (gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b,
+ ELG_secret_key *skey);
+static void sign (gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input,
+ ELG_secret_key *skey);
+static int verify (gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input,
+ ELG_public_key *pkey);
+
+
+static void (*progress_cb) (void *, const char *, int, int, int);
+static void *progress_cb_data;
+
+void
+_gcry_register_pk_elg_progress (void (*cb) (void *, const char *,
+ int, int, int),
+ void *cb_data)
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+
+static void
+progress (int c)
+{
+ if (progress_cb)
+ progress_cb (progress_cb_data, "pk_elg", c, 0, 0);
+}
+
+
+/****************
+ * Michael Wiener's table on subgroup sizes to match field sizes.
+ * (floating around somewhere, probably based on the paper from
+ * Eurocrypt 96, page 332)
+ */
+static unsigned int
+wiener_map( unsigned int n )
+{
+ static struct { unsigned int p_n, q_n; } t[] =
+ { /* p q attack cost */
+ { 512, 119 }, /* 9 x 10^17 */
+ { 768, 145 }, /* 6 x 10^21 */
+ { 1024, 165 }, /* 7 x 10^24 */
+ { 1280, 183 }, /* 3 x 10^27 */
+ { 1536, 198 }, /* 7 x 10^29 */
+ { 1792, 212 }, /* 9 x 10^31 */
+ { 2048, 225 }, /* 8 x 10^33 */
+ { 2304, 237 }, /* 5 x 10^35 */
+ { 2560, 249 }, /* 3 x 10^37 */
+ { 2816, 259 }, /* 1 x 10^39 */
+ { 3072, 269 }, /* 3 x 10^40 */
+ { 3328, 279 }, /* 8 x 10^41 */
+ { 3584, 288 }, /* 2 x 10^43 */
+ { 3840, 296 }, /* 4 x 10^44 */
+ { 4096, 305 }, /* 7 x 10^45 */
+ { 4352, 313 }, /* 1 x 10^47 */
+ { 4608, 320 }, /* 2 x 10^48 */
+ { 4864, 328 }, /* 2 x 10^49 */
+ { 5120, 335 }, /* 3 x 10^50 */
+ { 0, 0 }
+ };
+ int i;
+
+ for(i=0; t[i].p_n; i++ )
+ {
+ if( n <= t[i].p_n )
+ return t[i].q_n;
+ }
+ /* Not in table - use an arbitrary high number. */
+ return n / 8 + 200;
+}
+
+static int
+test_keys ( ELG_secret_key *sk, unsigned int nbits, int nodie )
+{
+ ELG_public_key pk;
+ gcry_mpi_t test = gcry_mpi_new ( 0 );
+ gcry_mpi_t out1_a = gcry_mpi_new ( nbits );
+ gcry_mpi_t out1_b = gcry_mpi_new ( nbits );
+ gcry_mpi_t out2 = gcry_mpi_new ( nbits );
+ int failed = 0;
+
+ pk.p = sk->p;
+ pk.g = sk->g;
+ pk.y = sk->y;
+
+ gcry_mpi_randomize ( test, nbits, GCRY_WEAK_RANDOM );
+
+ do_encrypt ( out1_a, out1_b, test, &pk );
+ decrypt ( out2, out1_a, out1_b, sk );
+ if ( mpi_cmp( test, out2 ) )
+ failed |= 1;
+
+ sign ( out1_a, out1_b, test, sk );
+ if ( !verify( out1_a, out1_b, test, &pk ) )
+ failed |= 2;
+
+ gcry_mpi_release ( test );
+ gcry_mpi_release ( out1_a );
+ gcry_mpi_release ( out1_b );
+ gcry_mpi_release ( out2 );
+
+ if (failed && !nodie)
+ log_fatal ("Elgamal test key for %s %s failed\n",
+ (failed & 1)? "encrypt+decrypt":"",
+ (failed & 2)? "sign+verify":"");
+ if (failed && DBG_CIPHER)
+ log_debug ("Elgamal test key for %s %s failed\n",
+ (failed & 1)? "encrypt+decrypt":"",
+ (failed & 2)? "sign+verify":"");
+
+ return failed;
+}
+
+
+/****************
+ * Generate a random secret exponent k from prime p, so that k is
+ * relatively prime to p-1. With SMALL_K set, k will be selected for
+ * better encryption performance - this must never be used signing!
+ */
+static gcry_mpi_t
+gen_k( gcry_mpi_t p, int small_k )
+{
+ gcry_mpi_t k = mpi_alloc_secure( 0 );
+ gcry_mpi_t temp = mpi_alloc( mpi_get_nlimbs(p) );
+ gcry_mpi_t p_1 = mpi_copy(p);
+ unsigned int orig_nbits = mpi_get_nbits(p);
+ unsigned int nbits, nbytes;
+ char *rndbuf = NULL;
+
+ if (small_k)
+ {
+ /* Using a k much lesser than p is sufficient for encryption and
+ * it greatly improves the encryption performance. We use
+ * Wiener's table and add a large safety margin. */
+ nbits = wiener_map( orig_nbits ) * 3 / 2;
+ if( nbits >= orig_nbits )
+ BUG();
+ }
+ else
+ nbits = orig_nbits;
+
+
+ nbytes = (nbits+7)/8;
+ if( DBG_CIPHER )
+ log_debug("choosing a random k ");
+ mpi_sub_ui( p_1, p, 1);
+ for(;;)
+ {
+ if( !rndbuf || nbits < 32 )
+ {
+ gcry_free(rndbuf);
+ rndbuf = gcry_random_bytes_secure( nbytes, GCRY_STRONG_RANDOM );
+ }
+ else
+ {
+ /* Change only some of the higher bits. We could improve
+ this by directly requesting more memory at the first call
+ to get_random_bytes() and use this the here maybe it is
+ easier to do this directly in random.c Anyway, it is
+ highly inlikely that we will ever reach this code. */
+ char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
+ memcpy( rndbuf, pp, 4 );
+ gcry_free(pp);
+ }
+ _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
+
+ for(;;)
+ {
+ if( !(mpi_cmp( k, p_1 ) < 0) ) /* check: k < (p-1) */
+ {
+ if( DBG_CIPHER )
+ progress('+');
+ break; /* no */
+ }
+ if( !(mpi_cmp_ui( k, 0 ) > 0) ) /* check: k > 0 */
+ {
+ if( DBG_CIPHER )
+ progress('-');
+ break; /* no */
+ }
+ if (gcry_mpi_gcd( temp, k, p_1 ))
+ goto found; /* okay, k is relative prime to (p-1) */
+ mpi_add_ui( k, k, 1 );
+ if( DBG_CIPHER )
+ progress('.');
+ }
+ }
+ found:
+ gcry_free(rndbuf);
+ if( DBG_CIPHER )
+ progress('\n');
+ mpi_free(p_1);
+ mpi_free(temp);
+
+ return k;
+}
+
+/****************
+ * Generate a key pair with a key of size NBITS
+ * Returns: 2 structures filled with all needed values
+ * and an array with n-1 factors of (p-1)
+ */
+static void
+generate ( ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t **ret_factors )
+{
+ gcry_mpi_t p; /* the prime */
+ gcry_mpi_t p_min1;
+ gcry_mpi_t g;
+ gcry_mpi_t x; /* the secret exponent */
+ gcry_mpi_t y;
+ unsigned int qbits;
+ unsigned int xbits;
+ byte *rndbuf;
+
+ p_min1 = gcry_mpi_new ( nbits );
+ qbits = wiener_map( nbits );
+ if( qbits & 1 ) /* better have a even one */
+ qbits++;
+ g = mpi_alloc(1);
+ p = _gcry_generate_elg_prime( 0, nbits, qbits, g, ret_factors );
+ mpi_sub_ui(p_min1, p, 1);
+
+
+ /* Select a random number which has these properties:
+ * 0 < x < p-1
+ * This must be a very good random number because this is the
+ * secret part. The prime is public and may be shared anyway,
+ * so a random generator level of 1 is used for the prime.
+ *
+ * I don't see a reason to have a x of about the same size
+ * as the p. It should be sufficient to have one about the size
+ * of q or the later used k plus a large safety margin. Decryption
+ * will be much faster with such an x.
+ */
+ xbits = qbits * 3 / 2;
+ if( xbits >= nbits )
+ BUG();
+ x = gcry_mpi_snew ( xbits );
+ if( DBG_CIPHER )
+ log_debug("choosing a random x of size %u", xbits );
+ rndbuf = NULL;
+ do
+ {
+ if( DBG_CIPHER )
+ progress('.');
+ if( rndbuf )
+ { /* Change only some of the higher bits */
+ if( xbits < 16 ) /* should never happen ... */
+ {
+ gcry_free(rndbuf);
+ rndbuf = gcry_random_bytes_secure( (xbits+7)/8,
+ GCRY_VERY_STRONG_RANDOM );
+ }
+ else
+ {
+ char *r = gcry_random_bytes_secure( 2,
+ GCRY_VERY_STRONG_RANDOM );
+ memcpy(rndbuf, r, 2 );
+ gcry_free(r);
+ }
+ }
+ else
+ {
+ rndbuf = gcry_random_bytes_secure( (xbits+7)/8,
+ GCRY_VERY_STRONG_RANDOM );
+ }
+ _gcry_mpi_set_buffer( x, rndbuf, (xbits+7)/8, 0 );
+ mpi_clear_highbit( x, xbits+1 );
+ }
+ while( !( mpi_cmp_ui( x, 0 )>0 && mpi_cmp( x, p_min1 )<0 ) );
+ gcry_free(rndbuf);
+
+ y = gcry_mpi_new (nbits);
+ gcry_mpi_powm( y, g, x, p );
+
+ if( DBG_CIPHER )
+ {
+ progress('\n');
+ log_mpidump("elg p= ", p );
+ log_mpidump("elg g= ", g );
+ log_mpidump("elg y= ", y );
+ log_mpidump("elg x= ", x );
+ }
+
+ /* Copy the stuff to the key structures */
+ sk->p = p;
+ sk->g = g;
+ sk->y = y;
+ sk->x = x;
+
+ gcry_mpi_release ( p_min1 );
+
+ /* Now we can test our keys (this should never fail!) */
+ test_keys ( sk, nbits - 64, 0 );
+}
+
+
+/* Generate a key pair with a key of size NBITS not using a random
+ value for the secret key but the one given as X. This is useful to
+ implement a passphrase based decryption for a public key based
+ encryption. It has appliactions in backup systems.
+
+ Returns: A structure filled with all needed values and an array
+ with n-1 factors of (p-1). */
+static gcry_err_code_t
+generate_using_x (ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t x,
+ gcry_mpi_t **ret_factors )
+{
+ gcry_mpi_t p; /* The prime. */
+ gcry_mpi_t p_min1; /* The prime minus 1. */
+ gcry_mpi_t g; /* The generator. */
+ gcry_mpi_t y; /* g^x mod p. */
+ unsigned int qbits;
+ unsigned int xbits;
+
+ sk->p = NULL;
+ sk->g = NULL;
+ sk->y = NULL;
+ sk->x = NULL;
+
+ /* Do a quick check to see whether X is suitable. */
+ xbits = mpi_get_nbits (x);
+ if ( xbits < 64 || xbits >= nbits )
+ return GPG_ERR_INV_VALUE;
+
+ p_min1 = gcry_mpi_new ( nbits );
+ qbits = wiener_map ( nbits );
+ if ( (qbits & 1) ) /* Better have an even one. */
+ qbits++;
+ g = mpi_alloc (1);
+ p = _gcry_generate_elg_prime ( 0, nbits, qbits, g, ret_factors );
+ mpi_sub_ui (p_min1, p, 1);
+
+ if (DBG_CIPHER)
+ log_debug ("using a supplied x of size %u", xbits );
+ if ( !(mpi_cmp_ui ( x, 0 ) > 0 && mpi_cmp ( x, p_min1 ) <0 ) )
+ {
+ gcry_mpi_release ( p_min1 );
+ gcry_mpi_release ( p );
+ gcry_mpi_release ( g );
+ return GPG_ERR_INV_VALUE;
+ }
+
+ y = gcry_mpi_new (nbits);
+ gcry_mpi_powm ( y, g, x, p );
+
+ if ( DBG_CIPHER )
+ {
+ progress ('\n');
+ log_mpidump ("elg p= ", p );
+ log_mpidump ("elg g= ", g );
+ log_mpidump ("elg y= ", y );
+ log_mpidump ("elg x= ", x );
+ }
+
+ /* Copy the stuff to the key structures */
+ sk->p = p;
+ sk->g = g;
+ sk->y = y;
+ sk->x = gcry_mpi_copy (x);
+
+ gcry_mpi_release ( p_min1 );
+
+ /* Now we can test our keys. */
+ if ( test_keys ( sk, nbits - 64, 1 ) )
+ {
+ gcry_mpi_release ( sk->p ); sk->p = NULL;
+ gcry_mpi_release ( sk->g ); sk->g = NULL;
+ gcry_mpi_release ( sk->y ); sk->y = NULL;
+ gcry_mpi_release ( sk->x ); sk->x = NULL;
+ return GPG_ERR_BAD_SECKEY;
+ }
+
+ return 0;
+}
+
+
+/****************
+ * Test whether the secret key is valid.
+ * Returns: if this is a valid key.
+ */
+static int
+check_secret_key( ELG_secret_key *sk )
+{
+ int rc;
+ gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs(sk->y) );
+
+ gcry_mpi_powm( y, sk->g, sk->x, sk->p );
+ rc = !mpi_cmp( y, sk->y );
+ mpi_free( y );
+ return rc;
+}
+
+
+static void
+do_encrypt(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey )
+{
+ gcry_mpi_t k;
+
+ /* Note: maybe we should change the interface, so that it
+ * is possible to check that input is < p and return an
+ * error code.
+ */
+
+ k = gen_k( pkey->p, 1 );
+ gcry_mpi_powm( a, pkey->g, k, pkey->p );
+ /* b = (y^k * input) mod p
+ * = ((y^k mod p) * (input mod p)) mod p
+ * and because input is < p
+ * = ((y^k mod p) * input) mod p
+ */
+ gcry_mpi_powm( b, pkey->y, k, pkey->p );
+ gcry_mpi_mulm( b, b, input, pkey->p );
+#if 0
+ if( DBG_CIPHER )
+ {
+ log_mpidump("elg encrypted y= ", pkey->y);
+ log_mpidump("elg encrypted p= ", pkey->p);
+ log_mpidump("elg encrypted k= ", k);
+ log_mpidump("elg encrypted M= ", input);
+ log_mpidump("elg encrypted a= ", a);
+ log_mpidump("elg encrypted b= ", b);
+ }
+#endif
+ mpi_free(k);
+}
+
+
+
+
+static void
+decrypt(gcry_mpi_t output, gcry_mpi_t a, gcry_mpi_t b, ELG_secret_key *skey )
+{
+ gcry_mpi_t t1 = mpi_alloc_secure( mpi_get_nlimbs( skey->p ) );
+
+ /* output = b/(a^x) mod p */
+ gcry_mpi_powm( t1, a, skey->x, skey->p );
+ mpi_invm( t1, t1, skey->p );
+ mpi_mulm( output, b, t1, skey->p );
+#if 0
+ if( DBG_CIPHER )
+ {
+ log_mpidump("elg decrypted x= ", skey->x);
+ log_mpidump("elg decrypted p= ", skey->p);
+ log_mpidump("elg decrypted a= ", a);
+ log_mpidump("elg decrypted b= ", b);
+ log_mpidump("elg decrypted M= ", output);
+ }
+#endif
+ mpi_free(t1);
+}
+
+
+/****************
+ * Make an Elgamal signature out of INPUT
+ */
+
+static void
+sign(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_secret_key *skey )
+{
+ gcry_mpi_t k;
+ gcry_mpi_t t = mpi_alloc( mpi_get_nlimbs(a) );
+ gcry_mpi_t inv = mpi_alloc( mpi_get_nlimbs(a) );
+ gcry_mpi_t p_1 = mpi_copy(skey->p);
+
+ /*
+ * b = (t * inv) mod (p-1)
+ * b = (t * inv(k,(p-1),(p-1)) mod (p-1)
+ * b = (((M-x*a) mod (p-1)) * inv(k,(p-1),(p-1))) mod (p-1)
+ *
+ */
+ mpi_sub_ui(p_1, p_1, 1);
+ k = gen_k( skey->p, 0 /* no small K ! */ );
+ gcry_mpi_powm( a, skey->g, k, skey->p );
+ mpi_mul(t, skey->x, a );
+ mpi_subm(t, input, t, p_1 );
+ mpi_invm(inv, k, p_1 );
+ mpi_mulm(b, t, inv, p_1 );
+
+#if 0
+ if( DBG_CIPHER )
+ {
+ log_mpidump("elg sign p= ", skey->p);
+ log_mpidump("elg sign g= ", skey->g);
+ log_mpidump("elg sign y= ", skey->y);
+ log_mpidump("elg sign x= ", skey->x);
+ log_mpidump("elg sign k= ", k);
+ log_mpidump("elg sign M= ", input);
+ log_mpidump("elg sign a= ", a);
+ log_mpidump("elg sign b= ", b);
+ }
+#endif
+ mpi_free(k);
+ mpi_free(t);
+ mpi_free(inv);
+ mpi_free(p_1);
+}
+
+
+/****************
+ * Returns true if the signature composed of A and B is valid.
+ */
+static int
+verify(gcry_mpi_t a, gcry_mpi_t b, gcry_mpi_t input, ELG_public_key *pkey )
+{
+ int rc;
+ gcry_mpi_t t1;
+ gcry_mpi_t t2;
+ gcry_mpi_t base[4];
+ gcry_mpi_t ex[4];
+
+ if( !(mpi_cmp_ui( a, 0 ) > 0 && mpi_cmp( a, pkey->p ) < 0) )
+ return 0; /* assertion 0 < a < p failed */
+
+ t1 = mpi_alloc( mpi_get_nlimbs(a) );
+ t2 = mpi_alloc( mpi_get_nlimbs(a) );
+
+#if 0
+ /* t1 = (y^a mod p) * (a^b mod p) mod p */
+ gcry_mpi_powm( t1, pkey->y, a, pkey->p );
+ gcry_mpi_powm( t2, a, b, pkey->p );
+ mpi_mulm( t1, t1, t2, pkey->p );
+
+ /* t2 = g ^ input mod p */
+ gcry_mpi_powm( t2, pkey->g, input, pkey->p );
+
+ rc = !mpi_cmp( t1, t2 );
+#elif 0
+ /* t1 = (y^a mod p) * (a^b mod p) mod p */
+ base[0] = pkey->y; ex[0] = a;
+ base[1] = a; ex[1] = b;
+ base[2] = NULL; ex[2] = NULL;
+ mpi_mulpowm( t1, base, ex, pkey->p );
+
+ /* t2 = g ^ input mod p */
+ gcry_mpi_powm( t2, pkey->g, input, pkey->p );
+
+ rc = !mpi_cmp( t1, t2 );
+#else
+ /* t1 = g ^ - input * y ^ a * a ^ b mod p */
+ mpi_invm(t2, pkey->g, pkey->p );
+ base[0] = t2 ; ex[0] = input;
+ base[1] = pkey->y; ex[1] = a;
+ base[2] = a; ex[2] = b;
+ base[3] = NULL; ex[3] = NULL;
+ mpi_mulpowm( t1, base, ex, pkey->p );
+ rc = !mpi_cmp_ui( t1, 1 );
+
+#endif
+
+ mpi_free(t1);
+ mpi_free(t2);
+ return rc;
+}
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+
+static gpg_err_code_t
+elg_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ gpg_err_code_t ec;
+ ELG_secret_key sk;
+ gcry_mpi_t xvalue = NULL;
+ gcry_sexp_t l1;
+
+ (void)algo;
+ (void)evalue;
+ (void)r_extrainfo;
+
+ if (genparms)
+ {
+ /* Parse the optional xvalue element. */
+ l1 = gcry_sexp_find_token (genparms, "xvalue", 0);
+ if (l1)
+ {
+ xvalue = gcry_sexp_nth_mpi (l1, 1, 0);
+ gcry_sexp_release (l1);
+ if (!xvalue)
+ return GPG_ERR_BAD_MPI;
+ }
+ }
+
+ if (xvalue)
+ ec = generate_using_x (&sk, nbits, xvalue, retfactors);
+ else
+ {
+ generate (&sk, nbits, retfactors);
+ ec = 0;
+ }
+
+ skey[0] = sk.p;
+ skey[1] = sk.g;
+ skey[2] = sk.y;
+ skey[3] = sk.x;
+
+ return ec;
+}
+
+
+static gcry_err_code_t
+elg_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ ELG_secret_key sk;
+
+ (void)algo;
+ (void)evalue;
+
+ generate (&sk, nbits, retfactors);
+ skey[0] = sk.p;
+ skey[1] = sk.g;
+ skey[2] = sk.y;
+ skey[3] = sk.x;
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+elg_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_secret_key sk;
+
+ (void)algo;
+
+ if ((! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.g = skey[1];
+ sk.y = skey[2];
+ sk.x = skey[3];
+
+ if (! check_secret_key (&sk))
+ err = GPG_ERR_BAD_SECKEY;
+ }
+
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_encrypt (int algo, gcry_mpi_t *resarr,
+ gcry_mpi_t data, gcry_mpi_t *pkey, int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_public_key pk;
+
+ (void)algo;
+ (void)flags;
+
+ if ((! data) || (! pkey[0]) || (! pkey[1]) || (! pkey[2]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ pk.p = pkey[0];
+ pk.g = pkey[1];
+ pk.y = pkey[2];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (pk.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (pk.p));
+ do_encrypt (resarr[0], resarr[1], data, &pk);
+ }
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_decrypt (int algo, gcry_mpi_t *result,
+ gcry_mpi_t *data, gcry_mpi_t *skey, int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_secret_key sk;
+
+ (void)algo;
+ (void)flags;
+
+ if ((! data[0]) || (! data[1])
+ || (! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.g = skey[1];
+ sk.y = skey[2];
+ sk.x = skey[3];
+ *result = mpi_alloc_secure (mpi_get_nlimbs (sk.p));
+ decrypt (*result, data[0], data[1], &sk);
+ }
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_secret_key sk;
+
+ (void)algo;
+
+ if ((! data)
+ || (! skey[0]) || (! skey[1]) || (! skey[2]) || (! skey[3]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ sk.p = skey[0];
+ sk.g = skey[1];
+ sk.y = skey[2];
+ sk.x = skey[3];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ resarr[1] = mpi_alloc (mpi_get_nlimbs (sk.p));
+ sign (resarr[0], resarr[1], data, &sk);
+ }
+
+ return err;
+}
+
+
+static gcry_err_code_t
+elg_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp) (void *, gcry_mpi_t), void *opaquev)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ ELG_public_key pk;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ if ((! data[0]) || (! data[1]) || (! hash)
+ || (! pkey[0]) || (! pkey[1]) || (! pkey[2]))
+ err = GPG_ERR_BAD_MPI;
+ else
+ {
+ pk.p = pkey[0];
+ pk.g = pkey[1];
+ pk.y = pkey[2];
+ if (! verify (data[0], data[1], hash, &pk))
+ err = GPG_ERR_BAD_SIGNATURE;
+ }
+
+ return err;
+}
+
+
+static unsigned int
+elg_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+static const char *elg_names[] =
+ {
+ "elg",
+ "openpgp-elg",
+ "openpgp-elg-sig",
+ NULL,
+ };
+
+
+gcry_pk_spec_t _gcry_pubkey_spec_elg =
+ {
+ "ELG", elg_names,
+ "pgy", "pgyx", "ab", "rs", "pgy",
+ GCRY_PK_USAGE_SIGN | GCRY_PK_USAGE_ENCR,
+ elg_generate,
+ elg_check_secret_key,
+ elg_encrypt,
+ elg_decrypt,
+ elg_sign,
+ elg_verify,
+ elg_get_nbits
+ };
+
+pk_extra_spec_t _gcry_pubkey_extraspec_elg =
+ {
+ NULL,
+ elg_generate_ext,
+ NULL
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/hash-common.c b/grub-core/lib/libgcrypt/cipher/hash-common.c
new file mode 100644
index 0000000..656e180
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/hash-common.c
@@ -0,0 +1,94 @@
+/* hash-common.c - Common code for hash algorithms
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "g10lib.h"
+#include "hash-common.h"
+
+
+/* Run a selftest for hash algorithm ALGO. If the resulting digest
+ matches EXPECT/EXPECTLEN and everything else is fine as well,
+ return NULL. If an error occurs, return a static text string
+ describing the error.
+
+ DATAMODE controls what will be hashed according to this table:
+
+ 0 - Hash the supplied DATA of DATALEN.
+ 1 - Hash one million times a 'a'. DATA and DATALEN are ignored.
+
+*/
+const char *
+_gcry_hash_selftest_check_one (int algo,
+ int datamode, const void *data, size_t datalen,
+ const void *expect, size_t expectlen)
+{
+ const char *result = NULL;
+ gcry_error_t err = 0;
+ gcry_md_hd_t hd;
+ unsigned char *digest;
+
+ if (_gcry_md_get_algo_dlen (algo) != expectlen)
+ return "digest size does not match expected size";
+
+ err = _gcry_md_open (&hd, algo, 0);
+ if (err)
+ return "gcry_md_open failed";
+
+ switch (datamode)
+ {
+ case 0:
+ _gcry_md_write (hd, data, datalen);
+ break;
+
+ case 1: /* Hash one million times an "a". */
+ {
+ char aaa[1000];
+ int i;
+
+ /* Write in odd size chunks so that we test the buffering. */
+ memset (aaa, 'a', 1000);
+ for (i = 0; i < 1000; i++)
+ _gcry_md_write (hd, aaa, 1000);
+ }
+ break;
+
+ default:
+ result = "invalid DATAMODE";
+ }
+
+ if (!result)
+ {
+ digest = _gcry_md_read (hd, algo);
+
+ if ( memcmp (digest, expect, expectlen) )
+ result = "digest mismatch";
+ }
+
+ _gcry_md_close (hd);
+
+ return result;
+}
+
diff --git a/grub-core/lib/libgcrypt/cipher/hash-common.h b/grub-core/lib/libgcrypt/cipher/hash-common.h
new file mode 100644
index 0000000..9c4e333
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/hash-common.h
@@ -0,0 +1,33 @@
+/* hash-common.h - Declarations of common code for hash algorithms.
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GCRY_HASH_COMMON_H
+#define GCRY_HASH_COMMON_H
+
+
+const char * _gcry_hash_selftest_check_one
+/**/ (int algo,
+ int datamode, const void *data, size_t datalen,
+ const void *expect, size_t expectlen);
+
+
+
+
+
+#endif /*GCRY_HASH_COMMON_H*/
diff --git a/grub-core/lib/libgcrypt/cipher/hmac-tests.c b/grub-core/lib/libgcrypt/cipher/hmac-tests.c
new file mode 100644
index 0000000..56c9b20
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/hmac-tests.c
@@ -0,0 +1,732 @@
+/* hmac-tests.c - HMAC selftests.
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ Although algorithm self-tests are usually implemented in the module
+ implementing the algorithm, the case for HMAC is different because
+ HMAC is implemnetd on a higher level using a special feature of the
+ gcry_md_ functions. It would be possible to do this also in the
+ digest algorithm modules, but that would blow up the code too much
+ and spread the hmac tests over several modules.
+
+ Thus we implement all HMAC tests in this test module and provide a
+ function to run the tests.
+*/
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "g10lib.h"
+#include "cipher.h"
+#include "hmac256.h"
+
+/* Check one HMAC with digest ALGO using the regualr HAMC
+ API. (DATA,DATALEN) is the data to be MACed, (KEY,KEYLEN) the key
+ and (EXPECT,EXPECTLEN) the expected result. Returns NULL on
+ succdess or a string describing the failure. */
+static const char *
+check_one (int algo,
+ const void *data, size_t datalen,
+ const void *key, size_t keylen,
+ const void *expect, size_t expectlen)
+{
+ gcry_md_hd_t hd;
+ const unsigned char *digest;
+
+/* printf ("HMAC algo %d\n", algo); */
+ if (_gcry_md_get_algo_dlen (algo) != expectlen)
+ return "invalid tests data";
+ if (_gcry_md_open (&hd, algo, GCRY_MD_FLAG_HMAC))
+ return "gcry_md_open failed";
+ if (_gcry_md_setkey (hd, key, keylen))
+ {
+ _gcry_md_close (hd);
+ return "gcry_md_setkey failed";
+ }
+ _gcry_md_write (hd, data, datalen);
+ digest = _gcry_md_read (hd, algo);
+ if (!digest)
+ {
+ _gcry_md_close (hd);
+ return "gcry_md_read failed";
+ }
+ if (memcmp (digest, expect, expectlen))
+ {
+/* int i; */
+
+/* fputs (" {", stdout); */
+/* for (i=0; i < expectlen-1; i++) */
+/* { */
+/* if (i && !(i % 8)) */
+/* fputs ("\n ", stdout); */
+/* printf (" 0x%02x,", digest[i]); */
+/* } */
+/* printf (" 0x%02x } },\n", digest[i]); */
+
+ _gcry_md_close (hd);
+ return "does not match";
+ }
+ _gcry_md_close (hd);
+ return NULL;
+}
+
+
+static gpg_err_code_t
+selftests_sha1 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+ unsigned char key[128];
+ int i, j;
+
+ what = "FIPS-198a, A.1";
+ for (i=0; i < 64; i++)
+ key[i] = i;
+ errtxt = check_one (GCRY_MD_SHA1,
+ "Sample #1", 9,
+ key, 64,
+ "\x4f\x4c\xa3\xd5\xd6\x8b\xa7\xcc\x0a\x12"
+ "\x08\xc9\xc6\x1e\x9c\x5d\xa0\x40\x3c\x0a", 20);
+ if (errtxt)
+ goto failed;
+
+ if (extended)
+ {
+ what = "FIPS-198a, A.2";
+ for (i=0, j=0x30; i < 20; i++)
+ key[i] = j++;
+ errtxt = check_one (GCRY_MD_SHA1,
+ "Sample #2", 9,
+ key, 20,
+ "\x09\x22\xd3\x40\x5f\xaa\x3d\x19\x4f\x82"
+ "\xa4\x58\x30\x73\x7d\x5c\xc6\xc7\x5d\x24", 20);
+ if (errtxt)
+ goto failed;
+
+ what = "FIPS-198a, A.3";
+ for (i=0, j=0x50; i < 100; i++)
+ key[i] = j++;
+ errtxt = check_one (GCRY_MD_SHA1,
+ "Sample #3", 9,
+ key, 100,
+ "\xbc\xf4\x1e\xab\x8b\xb2\xd8\x02\xf3\xd0"
+ "\x5c\xaf\x7c\xb0\x92\xec\xf8\xd1\xa3\xaa", 20 );
+ if (errtxt)
+ goto failed;
+
+ what = "FIPS-198a, A.4";
+ for (i=0, j=0x70; i < 49; i++)
+ key[i] = j++;
+ errtxt = check_one (GCRY_MD_SHA1,
+ "Sample #4", 9,
+ key, 49,
+ "\x9e\xa8\x86\xef\xe2\x68\xdb\xec\xce\x42"
+ "\x0c\x75\x24\xdf\x32\xe0\x75\x1a\x2a\x26", 20 );
+ if (errtxt)
+ goto failed;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("hmac", GCRY_MD_SHA1, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+
+static gpg_err_code_t
+selftests_sha224 (int extended, selftest_report_func_t report)
+{
+ static struct
+ {
+ const char * const desc;
+ const char * const data;
+ const char * const key;
+ const char expect[28];
+ } tv[] =
+ {
+ { "data-28 key-4",
+ "what do ya want for nothing?",
+ "Jefe",
+ { 0xa3, 0x0e, 0x01, 0x09, 0x8b, 0xc6, 0xdb, 0xbf,
+ 0x45, 0x69, 0x0f, 0x3a, 0x7e, 0x9e, 0x6d, 0x0f,
+ 0x8b, 0xbe, 0xa2, 0xa3, 0x9e, 0x61, 0x48, 0x00,
+ 0x8f, 0xd0, 0x5e, 0x44 } },
+
+ { "data-9 key-20",
+ "Hi There",
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b",
+ { 0x89, 0x6f, 0xb1, 0x12, 0x8a, 0xbb, 0xdf, 0x19,
+ 0x68, 0x32, 0x10, 0x7c, 0xd4, 0x9d, 0xf3, 0x3f,
+ 0x47, 0xb4, 0xb1, 0x16, 0x99, 0x12, 0xba, 0x4f,
+ 0x53, 0x68, 0x4b, 0x22 } },
+
+ { "data-50 key-20",
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa",
+ { 0x7f, 0xb3, 0xcb, 0x35, 0x88, 0xc6, 0xc1, 0xf6,
+ 0xff, 0xa9, 0x69, 0x4d, 0x7d, 0x6a, 0xd2, 0x64,
+ 0x93, 0x65, 0xb0, 0xc1, 0xf6, 0x5d, 0x69, 0xd1,
+ 0xec, 0x83, 0x33, 0xea } },
+
+ { "data-50 key-26",
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd",
+ "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
+ "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
+ { 0x6c, 0x11, 0x50, 0x68, 0x74, 0x01, 0x3c, 0xac,
+ 0x6a, 0x2a, 0xbc, 0x1b, 0xb3, 0x82, 0x62, 0x7c,
+ 0xec, 0x6a, 0x90, 0xd8, 0x6e, 0xfc, 0x01, 0x2d,
+ 0xe7, 0xaf, 0xec, 0x5a } },
+
+ { "data-54 key-131",
+ "Test Using Larger Than Block-Size Key - Hash Key First",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0x95, 0xe9, 0xa0, 0xdb, 0x96, 0x20, 0x95, 0xad,
+ 0xae, 0xbe, 0x9b, 0x2d, 0x6f, 0x0d, 0xbc, 0xe2,
+ 0xd4, 0x99, 0xf1, 0x12, 0xf2, 0xd2, 0xb7, 0x27,
+ 0x3f, 0xa6, 0x87, 0x0e } },
+
+ { "data-152 key-131",
+ "This is a test using a larger than block-size key and a larger "
+ "than block-size data. The key needs to be hashed before being "
+ "used by the HMAC algorithm.",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0x3a, 0x85, 0x41, 0x66, 0xac, 0x5d, 0x9f, 0x02,
+ 0x3f, 0x54, 0xd5, 0x17, 0xd0, 0xb3, 0x9d, 0xbd,
+ 0x94, 0x67, 0x70, 0xdb, 0x9c, 0x2b, 0x95, 0xc9,
+ 0xf6, 0xf5, 0x65, 0xd1 } },
+
+ { NULL }
+ };
+ const char *what;
+ const char *errtxt;
+ int tvidx;
+
+ for (tvidx=0; tv[tvidx].desc; tvidx++)
+ {
+ what = tv[tvidx].desc;
+ errtxt = check_one (GCRY_MD_SHA224,
+ tv[tvidx].data, strlen (tv[tvidx].data),
+ tv[tvidx].key, strlen (tv[tvidx].key),
+ tv[tvidx].expect, DIM (tv[tvidx].expect) );
+ if (errtxt)
+ goto failed;
+ if (!extended)
+ break;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("hmac", GCRY_MD_SHA224, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+static gpg_err_code_t
+selftests_sha256 (int extended, selftest_report_func_t report)
+{
+ static struct
+ {
+ const char * const desc;
+ const char * const data;
+ const char * const key;
+ const char expect[32];
+ } tv[] =
+ {
+ { "data-28 key-4",
+ "what do ya want for nothing?",
+ "Jefe",
+ { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e,
+ 0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7,
+ 0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83,
+ 0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 } },
+
+ { "data-9 key-20",
+ "Hi There",
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b",
+ { 0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53,
+ 0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b,
+ 0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7,
+ 0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7 } },
+
+ { "data-50 key-20",
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa",
+ { 0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46,
+ 0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7,
+ 0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22,
+ 0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe } },
+
+ { "data-50 key-26",
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd",
+ "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
+ "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
+ { 0x82, 0x55, 0x8a, 0x38, 0x9a, 0x44, 0x3c, 0x0e,
+ 0xa4, 0xcc, 0x81, 0x98, 0x99, 0xf2, 0x08, 0x3a,
+ 0x85, 0xf0, 0xfa, 0xa3, 0xe5, 0x78, 0xf8, 0x07,
+ 0x7a, 0x2e, 0x3f, 0xf4, 0x67, 0x29, 0x66, 0x5b } },
+
+ { "data-54 key-131",
+ "Test Using Larger Than Block-Size Key - Hash Key First",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0x60, 0xe4, 0x31, 0x59, 0x1e, 0xe0, 0xb6, 0x7f,
+ 0x0d, 0x8a, 0x26, 0xaa, 0xcb, 0xf5, 0xb7, 0x7f,
+ 0x8e, 0x0b, 0xc6, 0x21, 0x37, 0x28, 0xc5, 0x14,
+ 0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54 } },
+
+ { "data-152 key-131",
+ "This is a test using a larger than block-size key and a larger "
+ "than block-size data. The key needs to be hashed before being "
+ "used by the HMAC algorithm.",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb,
+ 0x27, 0x63, 0x5f, 0xbc, 0xd5, 0xb0, 0xe9, 0x44,
+ 0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93,
+ 0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2 } },
+
+ { NULL }
+ };
+ const char *what;
+ const char *errtxt;
+ int tvidx;
+
+ for (tvidx=0; tv[tvidx].desc; tvidx++)
+ {
+ hmac256_context_t hmachd;
+ const unsigned char *digest;
+ size_t dlen;
+
+ what = tv[tvidx].desc;
+ errtxt = check_one (GCRY_MD_SHA256,
+ tv[tvidx].data, strlen (tv[tvidx].data),
+ tv[tvidx].key, strlen (tv[tvidx].key),
+ tv[tvidx].expect, DIM (tv[tvidx].expect) );
+ if (errtxt)
+ goto failed;
+
+ hmachd = _gcry_hmac256_new (tv[tvidx].key, strlen (tv[tvidx].key));
+ if (!hmachd)
+ {
+ errtxt = "_gcry_hmac256_new failed";
+ goto failed;
+ }
+ _gcry_hmac256_update (hmachd, tv[tvidx].data, strlen (tv[tvidx].data));
+ digest = _gcry_hmac256_finalize (hmachd, &dlen);
+ if (!digest)
+ {
+ errtxt = "_gcry_hmac256_finalize failed";
+ _gcry_hmac256_release (hmachd);
+ goto failed;
+ }
+ if (dlen != DIM (tv[tvidx].expect)
+ || memcmp (digest, tv[tvidx].expect, DIM (tv[tvidx].expect)))
+ {
+ errtxt = "does not match in second implementation";
+ _gcry_hmac256_release (hmachd);
+ goto failed;
+ }
+ _gcry_hmac256_release (hmachd);
+
+ if (!extended)
+ break;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("hmac", GCRY_MD_SHA256, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+static gpg_err_code_t
+selftests_sha384 (int extended, selftest_report_func_t report)
+{
+ static struct
+ {
+ const char * const desc;
+ const char * const data;
+ const char * const key;
+ const char expect[48];
+ } tv[] =
+ {
+ { "data-28 key-4",
+ "what do ya want for nothing?",
+ "Jefe",
+ { 0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31,
+ 0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b,
+ 0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47,
+ 0xe4, 0x2e, 0xc3, 0x73, 0x63, 0x22, 0x44, 0x5e,
+ 0x8e, 0x22, 0x40, 0xca, 0x5e, 0x69, 0xe2, 0xc7,
+ 0x8b, 0x32, 0x39, 0xec, 0xfa, 0xb2, 0x16, 0x49 } },
+
+ { "data-9 key-20",
+ "Hi There",
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b",
+ { 0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62,
+ 0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f,
+ 0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6,
+ 0x82, 0xaa, 0x03, 0x4c, 0x7c, 0xeb, 0xc5, 0x9c,
+ 0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f,
+ 0x4a, 0xf1, 0x52, 0xe8, 0xb2, 0xfa, 0x9c, 0xb6 } },
+
+ { "data-50 key-20",
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa",
+ { 0x88, 0x06, 0x26, 0x08, 0xd3, 0xe6, 0xad, 0x8a,
+ 0x0a, 0xa2, 0xac, 0xe0, 0x14, 0xc8, 0xa8, 0x6f,
+ 0x0a, 0xa6, 0x35, 0xd9, 0x47, 0xac, 0x9f, 0xeb,
+ 0xe8, 0x3e, 0xf4, 0xe5, 0x59, 0x66, 0x14, 0x4b,
+ 0x2a, 0x5a, 0xb3, 0x9d, 0xc1, 0x38, 0x14, 0xb9,
+ 0x4e, 0x3a, 0xb6, 0xe1, 0x01, 0xa3, 0x4f, 0x27 } },
+
+ { "data-50 key-26",
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd",
+ "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
+ "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
+ { 0x3e, 0x8a, 0x69, 0xb7, 0x78, 0x3c, 0x25, 0x85,
+ 0x19, 0x33, 0xab, 0x62, 0x90, 0xaf, 0x6c, 0xa7,
+ 0x7a, 0x99, 0x81, 0x48, 0x08, 0x50, 0x00, 0x9c,
+ 0xc5, 0x57, 0x7c, 0x6e, 0x1f, 0x57, 0x3b, 0x4e,
+ 0x68, 0x01, 0xdd, 0x23, 0xc4, 0xa7, 0xd6, 0x79,
+ 0xcc, 0xf8, 0xa3, 0x86, 0xc6, 0x74, 0xcf, 0xfb } },
+
+ { "data-54 key-131",
+ "Test Using Larger Than Block-Size Key - Hash Key First",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0x4e, 0xce, 0x08, 0x44, 0x85, 0x81, 0x3e, 0x90,
+ 0x88, 0xd2, 0xc6, 0x3a, 0x04, 0x1b, 0xc5, 0xb4,
+ 0x4f, 0x9e, 0xf1, 0x01, 0x2a, 0x2b, 0x58, 0x8f,
+ 0x3c, 0xd1, 0x1f, 0x05, 0x03, 0x3a, 0xc4, 0xc6,
+ 0x0c, 0x2e, 0xf6, 0xab, 0x40, 0x30, 0xfe, 0x82,
+ 0x96, 0x24, 0x8d, 0xf1, 0x63, 0xf4, 0x49, 0x52 } },
+
+ { "data-152 key-131",
+ "This is a test using a larger than block-size key and a larger "
+ "than block-size data. The key needs to be hashed before being "
+ "used by the HMAC algorithm.",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0x66, 0x17, 0x17, 0x8e, 0x94, 0x1f, 0x02, 0x0d,
+ 0x35, 0x1e, 0x2f, 0x25, 0x4e, 0x8f, 0xd3, 0x2c,
+ 0x60, 0x24, 0x20, 0xfe, 0xb0, 0xb8, 0xfb, 0x9a,
+ 0xdc, 0xce, 0xbb, 0x82, 0x46, 0x1e, 0x99, 0xc5,
+ 0xa6, 0x78, 0xcc, 0x31, 0xe7, 0x99, 0x17, 0x6d,
+ 0x38, 0x60, 0xe6, 0x11, 0x0c, 0x46, 0x52, 0x3e } },
+
+ { NULL }
+ };
+ const char *what;
+ const char *errtxt;
+ int tvidx;
+
+ for (tvidx=0; tv[tvidx].desc; tvidx++)
+ {
+ what = tv[tvidx].desc;
+ errtxt = check_one (GCRY_MD_SHA384,
+ tv[tvidx].data, strlen (tv[tvidx].data),
+ tv[tvidx].key, strlen (tv[tvidx].key),
+ tv[tvidx].expect, DIM (tv[tvidx].expect) );
+ if (errtxt)
+ goto failed;
+ if (!extended)
+ break;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("hmac", GCRY_MD_SHA384, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+static gpg_err_code_t
+selftests_sha512 (int extended, selftest_report_func_t report)
+{
+ static struct
+ {
+ const char * const desc;
+ const char * const data;
+ const char * const key;
+ const char expect[64];
+ } tv[] =
+ {
+ { "data-28 key-4",
+ "what do ya want for nothing?",
+ "Jefe",
+ { 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2,
+ 0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3,
+ 0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6,
+ 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54,
+ 0x97, 0x58, 0xbf, 0x75, 0xc0, 0x5a, 0x99, 0x4a,
+ 0x6d, 0x03, 0x4f, 0x65, 0xf8, 0xf0, 0xe6, 0xfd,
+ 0xca, 0xea, 0xb1, 0xa3, 0x4d, 0x4a, 0x6b, 0x4b,
+ 0x63, 0x6e, 0x07, 0x0a, 0x38, 0xbc, 0xe7, 0x37 } },
+
+ { "data-9 key-20",
+ "Hi There",
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b",
+ { 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d,
+ 0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0,
+ 0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78,
+ 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde,
+ 0xda, 0xa8, 0x33, 0xb7, 0xd6, 0xb8, 0xa7, 0x02,
+ 0x03, 0x8b, 0x27, 0x4e, 0xae, 0xa3, 0xf4, 0xe4,
+ 0xbe, 0x9d, 0x91, 0x4e, 0xeb, 0x61, 0xf1, 0x70,
+ 0x2e, 0x69, 0x6c, 0x20, 0x3a, 0x12, 0x68, 0x54 } },
+
+ { "data-50 key-20",
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+ "\xdd\xdd",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa",
+ { 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84,
+ 0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9,
+ 0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36,
+ 0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39,
+ 0xbf, 0x3e, 0x84, 0x82, 0x79, 0xa7, 0x22, 0xc8,
+ 0x06, 0xb4, 0x85, 0xa4, 0x7e, 0x67, 0xc8, 0x07,
+ 0xb9, 0x46, 0xa3, 0x37, 0xbe, 0xe8, 0x94, 0x26,
+ 0x74, 0x27, 0x88, 0x59, 0xe1, 0x32, 0x92, 0xfb } },
+
+ { "data-50 key-26",
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd",
+ "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
+ "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
+ { 0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69,
+ 0x90, 0xe5, 0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7,
+ 0xe5, 0x76, 0xd9, 0x7f, 0xf9, 0x4b, 0x87, 0x2d,
+ 0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e, 0xe3, 0xdb,
+ 0xa9, 0x1c, 0xa5, 0xc1, 0x1a, 0xa2, 0x5e, 0xb4,
+ 0xd6, 0x79, 0x27, 0x5c, 0xc5, 0x78, 0x80, 0x63,
+ 0xa5, 0xf1, 0x97, 0x41, 0x12, 0x0c, 0x4f, 0x2d,
+ 0xe2, 0xad, 0xeb, 0xeb, 0x10, 0xa2, 0x98, 0xdd } },
+
+ { "data-54 key-131",
+ "Test Using Larger Than Block-Size Key - Hash Key First",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0x80, 0xb2, 0x42, 0x63, 0xc7, 0xc1, 0xa3, 0xeb,
+ 0xb7, 0x14, 0x93, 0xc1, 0xdd, 0x7b, 0xe8, 0xb4,
+ 0x9b, 0x46, 0xd1, 0xf4, 0x1b, 0x4a, 0xee, 0xc1,
+ 0x12, 0x1b, 0x01, 0x37, 0x83, 0xf8, 0xf3, 0x52,
+ 0x6b, 0x56, 0xd0, 0x37, 0xe0, 0x5f, 0x25, 0x98,
+ 0xbd, 0x0f, 0xd2, 0x21, 0x5d, 0x6a, 0x1e, 0x52,
+ 0x95, 0xe6, 0x4f, 0x73, 0xf6, 0x3f, 0x0a, 0xec,
+ 0x8b, 0x91, 0x5a, 0x98, 0x5d, 0x78, 0x65, 0x98 } },
+
+ { "data-152 key-131",
+ "This is a test using a larger than block-size key and a larger "
+ "than block-size data. The key needs to be hashed before being "
+ "used by the HMAC algorithm.",
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa",
+ { 0xe3, 0x7b, 0x6a, 0x77, 0x5d, 0xc8, 0x7d, 0xba,
+ 0xa4, 0xdf, 0xa9, 0xf9, 0x6e, 0x5e, 0x3f, 0xfd,
+ 0xde, 0xbd, 0x71, 0xf8, 0x86, 0x72, 0x89, 0x86,
+ 0x5d, 0xf5, 0xa3, 0x2d, 0x20, 0xcd, 0xc9, 0x44,
+ 0xb6, 0x02, 0x2c, 0xac, 0x3c, 0x49, 0x82, 0xb1,
+ 0x0d, 0x5e, 0xeb, 0x55, 0xc3, 0xe4, 0xde, 0x15,
+ 0x13, 0x46, 0x76, 0xfb, 0x6d, 0xe0, 0x44, 0x60,
+ 0x65, 0xc9, 0x74, 0x40, 0xfa, 0x8c, 0x6a, 0x58 } },
+
+ { NULL }
+ };
+ const char *what;
+ const char *errtxt;
+ int tvidx;
+
+ for (tvidx=0; tv[tvidx].desc; tvidx++)
+ {
+ what = tv[tvidx].desc;
+ errtxt = check_one (GCRY_MD_SHA512,
+ tv[tvidx].data, strlen (tv[tvidx].data),
+ tv[tvidx].key, strlen (tv[tvidx].key),
+ tv[tvidx].expect, DIM (tv[tvidx].expect) );
+ if (errtxt)
+ goto failed;
+ if (!extended)
+ break;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("hmac", GCRY_MD_SHA512, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ switch (algo)
+ {
+ case GCRY_MD_SHA1:
+ ec = selftests_sha1 (extended, report);
+ break;
+ case GCRY_MD_SHA224:
+ ec = selftests_sha224 (extended, report);
+ break;
+ case GCRY_MD_SHA256:
+ ec = selftests_sha256 (extended, report);
+ break;
+ case GCRY_MD_SHA384:
+ ec = selftests_sha384 (extended, report);
+ break;
+ case GCRY_MD_SHA512:
+ ec = selftests_sha512 (extended, report);
+ break;
+ default:
+ ec = GPG_ERR_DIGEST_ALGO;
+ break;
+ }
+ return ec;
+}
+
+
+
+
+/* Run the selftests for HMAC with digest algorithm ALGO with optional
+ reporting function REPORT. */
+gpg_error_t
+_gcry_hmac_selftest (int algo, int extended, selftest_report_func_t report)
+{
+ gcry_err_code_t ec = 0;
+
+ if (!gcry_md_test_algo (algo))
+ {
+ ec = run_selftests (algo, extended, report);
+ }
+ else
+ {
+ ec = GPG_ERR_DIGEST_ALGO;
+ if (report)
+ report ("hmac", algo, "module", "algorithm not available");
+ }
+ return gpg_error (ec);
+}
diff --git a/grub-core/lib/libgcrypt/cipher/md.c b/grub-core/lib/libgcrypt/cipher/md.c
new file mode 100644
index 0000000..5dfbbd9
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/md.c
@@ -0,0 +1,1375 @@
+/* md.c - message digest dispatcher
+ * Copyright (C) 1998, 1999, 2002, 2003, 2006,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "g10lib.h"
+#include "cipher.h"
+#include "ath.h"
+
+#include "rmd.h"
+
+/* A dummy extraspec so that we do not need to tests the extraspec
+ field from the module specification against NULL and instead
+ directly test the respective fields of extraspecs. */
+static md_extra_spec_t dummy_extra_spec;
+
+
+/* This is the list of the digest implementations included in
+ libgcrypt. */
+static struct digest_table_entry
+{
+ gcry_md_spec_t *digest;
+ md_extra_spec_t *extraspec;
+ unsigned int algorithm;
+ int fips_allowed;
+} digest_table[] =
+ {
+#if USE_CRC
+ /* We allow the CRC algorithms even in FIPS mode because they are
+ actually no cryptographic primitives. */
+ { &_gcry_digest_spec_crc32,
+ &dummy_extra_spec, GCRY_MD_CRC32, 1 },
+ { &_gcry_digest_spec_crc32_rfc1510,
+ &dummy_extra_spec, GCRY_MD_CRC32_RFC1510, 1 },
+ { &_gcry_digest_spec_crc24_rfc2440,
+ &dummy_extra_spec, GCRY_MD_CRC24_RFC2440, 1 },
+#endif
+#if USE_MD4
+ { &_gcry_digest_spec_md4,
+ &dummy_extra_spec, GCRY_MD_MD4 },
+#endif
+#if USE_MD5
+ { &_gcry_digest_spec_md5,
+ &dummy_extra_spec, GCRY_MD_MD5, 1 },
+#endif
+#if USE_RMD160
+ { &_gcry_digest_spec_rmd160,
+ &dummy_extra_spec, GCRY_MD_RMD160 },
+#endif
+#if USE_SHA1
+ { &_gcry_digest_spec_sha1,
+ &_gcry_digest_extraspec_sha1, GCRY_MD_SHA1, 1 },
+#endif
+#if USE_SHA256
+ { &_gcry_digest_spec_sha256,
+ &_gcry_digest_extraspec_sha256, GCRY_MD_SHA256, 1 },
+ { &_gcry_digest_spec_sha224,
+ &_gcry_digest_extraspec_sha224, GCRY_MD_SHA224, 1 },
+#endif
+#if USE_SHA512
+ { &_gcry_digest_spec_sha512,
+ &_gcry_digest_extraspec_sha512, GCRY_MD_SHA512, 1 },
+ { &_gcry_digest_spec_sha384,
+ &_gcry_digest_extraspec_sha384, GCRY_MD_SHA384, 1 },
+#endif
+#if USE_TIGER
+ { &_gcry_digest_spec_tiger,
+ &dummy_extra_spec, GCRY_MD_TIGER },
+#endif
+#if USE_WHIRLPOOL
+ { &_gcry_digest_spec_whirlpool,
+ &dummy_extra_spec, GCRY_MD_WHIRLPOOL },
+#endif
+ { NULL },
+ };
+
+/* List of registered digests. */
+static gcry_module_t digests_registered;
+
+/* This is the lock protecting DIGESTS_REGISTERED. */
+static ath_mutex_t digests_registered_lock = ATH_MUTEX_INITIALIZER;
+
+/* Flag to check wether the default ciphers have already been
+ registered. */
+static int default_digests_registered;
+
+typedef struct gcry_md_list
+{
+ gcry_md_spec_t *digest;
+ gcry_module_t module;
+ struct gcry_md_list *next;
+ size_t actual_struct_size; /* Allocated size of this structure. */
+ PROPERLY_ALIGNED_TYPE context;
+} GcryDigestEntry;
+
+/* this structure is put right after the gcry_md_hd_t buffer, so that
+ * only one memory block is needed. */
+struct gcry_md_context
+{
+ int magic;
+ size_t actual_handle_size; /* Allocated size of this handle. */
+ int secure;
+ FILE *debug;
+ int finalized;
+ GcryDigestEntry *list;
+ byte *macpads;
+ int macpads_Bsize; /* Blocksize as used for the HMAC pads. */
+};
+
+
+#define CTX_MAGIC_NORMAL 0x11071961
+#define CTX_MAGIC_SECURE 0x16917011
+
+/* Convenient macro for registering the default digests. */
+#define REGISTER_DEFAULT_DIGESTS \
+ do \
+ { \
+ ath_mutex_lock (&digests_registered_lock); \
+ if (! default_digests_registered) \
+ { \
+ md_register_default (); \
+ default_digests_registered = 1; \
+ } \
+ ath_mutex_unlock (&digests_registered_lock); \
+ } \
+ while (0)
+
+
+static const char * digest_algo_to_string( int algo );
+static gcry_err_code_t check_digest_algo (int algo);
+static gcry_err_code_t md_open (gcry_md_hd_t *h, int algo,
+ int secure, int hmac);
+static gcry_err_code_t md_enable (gcry_md_hd_t hd, int algo);
+static gcry_err_code_t md_copy (gcry_md_hd_t a, gcry_md_hd_t *b);
+static void md_close (gcry_md_hd_t a);
+static void md_write (gcry_md_hd_t a, const void *inbuf, size_t inlen);
+static void md_final(gcry_md_hd_t a);
+static byte *md_read( gcry_md_hd_t a, int algo );
+static int md_get_algo( gcry_md_hd_t a );
+static int md_digest_length( int algo );
+static const byte *md_asn_oid( int algo, size_t *asnlen, size_t *mdlen );
+static void md_start_debug ( gcry_md_hd_t a, const char *suffix );
+static void md_stop_debug ( gcry_md_hd_t a );
+
+
+
+
+/* Internal function. Register all the ciphers included in
+ CIPHER_TABLE. Returns zero on success or an error code. */
+static void
+md_register_default (void)
+{
+ gcry_err_code_t err = 0;
+ int i;
+
+ for (i = 0; !err && digest_table[i].digest; i++)
+ {
+ if ( fips_mode ())
+ {
+ if (!digest_table[i].fips_allowed)
+ continue;
+ if (digest_table[i].algorithm == GCRY_MD_MD5
+ && _gcry_enforced_fips_mode () )
+ continue; /* Do not register in enforced fips mode. */
+ }
+
+ err = _gcry_module_add (&digests_registered,
+ digest_table[i].algorithm,
+ (void *) digest_table[i].digest,
+ (void *) digest_table[i].extraspec,
+ NULL);
+ }
+
+ if (err)
+ BUG ();
+}
+
+/* Internal callback function. */
+static int
+gcry_md_lookup_func_name (void *spec, void *data)
+{
+ gcry_md_spec_t *digest = (gcry_md_spec_t *) spec;
+ char *name = (char *) data;
+
+ return (! stricmp (digest->name, name));
+}
+
+/* Internal callback function. Used via _gcry_module_lookup. */
+static int
+gcry_md_lookup_func_oid (void *spec, void *data)
+{
+ gcry_md_spec_t *digest = (gcry_md_spec_t *) spec;
+ char *oid = (char *) data;
+ gcry_md_oid_spec_t *oid_specs = digest->oids;
+ int ret = 0, i;
+
+ if (oid_specs)
+ {
+ for (i = 0; oid_specs[i].oidstring && (! ret); i++)
+ if (! stricmp (oid, oid_specs[i].oidstring))
+ ret = 1;
+ }
+
+ return ret;
+}
+
+/* Internal function. Lookup a digest entry by it's name. */
+static gcry_module_t
+gcry_md_lookup_name (const char *name)
+{
+ gcry_module_t digest;
+
+ digest = _gcry_module_lookup (digests_registered, (void *) name,
+ gcry_md_lookup_func_name);
+
+ return digest;
+}
+
+/* Internal function. Lookup a cipher entry by it's oid. */
+static gcry_module_t
+gcry_md_lookup_oid (const char *oid)
+{
+ gcry_module_t digest;
+
+ digest = _gcry_module_lookup (digests_registered, (void *) oid,
+ gcry_md_lookup_func_oid);
+
+ return digest;
+}
+
+/* Register a new digest module whose specification can be found in
+ DIGEST. On success, a new algorithm ID is stored in ALGORITHM_ID
+ and a pointer representhing this module is stored in MODULE. */
+gcry_error_t
+_gcry_md_register (gcry_md_spec_t *digest,
+ md_extra_spec_t *extraspec,
+ unsigned int *algorithm_id,
+ gcry_module_t *module)
+{
+ gcry_err_code_t err = 0;
+ gcry_module_t mod;
+
+ /* We do not support module loading in fips mode. */
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ ath_mutex_lock (&digests_registered_lock);
+ err = _gcry_module_add (&digests_registered, 0,
+ (void *) digest,
+ (void *)(extraspec? extraspec : &dummy_extra_spec),
+ &mod);
+ ath_mutex_unlock (&digests_registered_lock);
+
+ if (! err)
+ {
+ *module = mod;
+ *algorithm_id = mod->mod_id;
+ }
+
+ return gcry_error (err);
+}
+
+/* Unregister the digest identified by ID, which must have been
+ registered with gcry_digest_register. */
+void
+gcry_md_unregister (gcry_module_t module)
+{
+ ath_mutex_lock (&digests_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&digests_registered_lock);
+}
+
+
+static int
+search_oid (const char *oid, int *algorithm, gcry_md_oid_spec_t *oid_spec)
+{
+ gcry_module_t module;
+ int ret = 0;
+
+ if (oid && ((! strncmp (oid, "oid.", 4))
+ || (! strncmp (oid, "OID.", 4))))
+ oid += 4;
+
+ module = gcry_md_lookup_oid (oid);
+ if (module)
+ {
+ gcry_md_spec_t *digest = module->spec;
+ int i;
+
+ for (i = 0; digest->oids[i].oidstring && !ret; i++)
+ if (! stricmp (oid, digest->oids[i].oidstring))
+ {
+ if (algorithm)
+ *algorithm = module->mod_id;
+ if (oid_spec)
+ *oid_spec = digest->oids[i];
+ ret = 1;
+ }
+ _gcry_module_release (module);
+ }
+
+ return ret;
+}
+
+/****************
+ * Map a string to the digest algo
+ */
+int
+gcry_md_map_name (const char *string)
+{
+ gcry_module_t digest;
+ int ret, algorithm = 0;
+
+ if (! string)
+ return 0;
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ /* If the string starts with a digit (optionally prefixed with
+ either "OID." or "oid."), we first look into our table of ASN.1
+ object identifiers to figure out the algorithm */
+
+ ath_mutex_lock (&digests_registered_lock);
+
+ ret = search_oid (string, &algorithm, NULL);
+ if (! ret)
+ {
+ /* Not found, search a matching digest name. */
+ digest = gcry_md_lookup_name (string);
+ if (digest)
+ {
+ algorithm = digest->mod_id;
+ _gcry_module_release (digest);
+ }
+ }
+ ath_mutex_unlock (&digests_registered_lock);
+
+ return algorithm;
+}
+
+
+/****************
+ * Map a digest algo to a string
+ */
+static const char *
+digest_algo_to_string (int algorithm)
+{
+ const char *name = NULL;
+ gcry_module_t digest;
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ ath_mutex_lock (&digests_registered_lock);
+ digest = _gcry_module_lookup_id (digests_registered, algorithm);
+ if (digest)
+ {
+ name = ((gcry_md_spec_t *) digest->spec)->name;
+ _gcry_module_release (digest);
+ }
+ ath_mutex_unlock (&digests_registered_lock);
+
+ return name;
+}
+
+/****************
+ * This function simply returns the name of the algorithm or some constant
+ * string when there is no algo. It will never return NULL.
+ * Use the macro gcry_md_test_algo() to check whether the algorithm
+ * is valid.
+ */
+const char *
+gcry_md_algo_name (int algorithm)
+{
+ const char *s = digest_algo_to_string (algorithm);
+ return s ? s : "?";
+}
+
+
+static gcry_err_code_t
+check_digest_algo (int algorithm)
+{
+ gcry_err_code_t rc = 0;
+ gcry_module_t digest;
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ ath_mutex_lock (&digests_registered_lock);
+ digest = _gcry_module_lookup_id (digests_registered, algorithm);
+ if (digest)
+ _gcry_module_release (digest);
+ else
+ rc = GPG_ERR_DIGEST_ALGO;
+ ath_mutex_unlock (&digests_registered_lock);
+
+ return rc;
+}
+
+
+
+/****************
+ * Open a message digest handle for use with algorithm ALGO.
+ * More algorithms may be added by md_enable(). The initial algorithm
+ * may be 0.
+ */
+static gcry_err_code_t
+md_open (gcry_md_hd_t *h, int algo, int secure, int hmac)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ int bufsize = secure ? 512 : 1024;
+ struct gcry_md_context *ctx;
+ gcry_md_hd_t hd;
+ size_t n;
+
+ /* Allocate a memory area to hold the caller visible buffer with it's
+ * control information and the data required by this module. Set the
+ * context pointer at the beginning to this area.
+ * We have to use this strange scheme because we want to hide the
+ * internal data but have a variable sized buffer.
+ *
+ * +---+------+---........------+-------------+
+ * !ctx! bctl ! buffer ! private !
+ * +---+------+---........------+-------------+
+ * ! ^
+ * !---------------------------!
+ *
+ * We have to make sure that private is well aligned.
+ */
+ n = sizeof (struct gcry_md_handle) + bufsize;
+ n = ((n + sizeof (PROPERLY_ALIGNED_TYPE) - 1)
+ / sizeof (PROPERLY_ALIGNED_TYPE)) * sizeof (PROPERLY_ALIGNED_TYPE);
+
+ /* Allocate and set the Context pointer to the private data */
+ if (secure)
+ hd = gcry_malloc_secure (n + sizeof (struct gcry_md_context));
+ else
+ hd = gcry_malloc (n + sizeof (struct gcry_md_context));
+
+ if (! hd)
+ err = gpg_err_code_from_errno (errno);
+
+ if (! err)
+ {
+ hd->ctx = ctx = (struct gcry_md_context *) ((char *) hd + n);
+ /* Setup the globally visible data (bctl in the diagram).*/
+ hd->bufsize = n - sizeof (struct gcry_md_handle) + 1;
+ hd->bufpos = 0;
+
+ /* Initialize the private data. */
+ memset (hd->ctx, 0, sizeof *hd->ctx);
+ ctx->magic = secure ? CTX_MAGIC_SECURE : CTX_MAGIC_NORMAL;
+ ctx->actual_handle_size = n + sizeof (struct gcry_md_context);
+ ctx->secure = secure;
+
+ if (hmac)
+ {
+ switch (algo)
+ {
+ case GCRY_MD_SHA384:
+ case GCRY_MD_SHA512:
+ ctx->macpads_Bsize = 128;
+ break;
+ default:
+ ctx->macpads_Bsize = 64;
+ break;
+ }
+ ctx->macpads = gcry_malloc_secure (2*(ctx->macpads_Bsize));
+ if (!ctx->macpads)
+ {
+ err = gpg_err_code_from_errno (errno);
+ md_close (hd);
+ }
+ }
+ }
+
+ if (! err)
+ {
+ /* Hmmm, should we really do that? - yes [-wk] */
+ _gcry_fast_random_poll ();
+
+ if (algo)
+ {
+ err = md_enable (hd, algo);
+ if (err)
+ md_close (hd);
+ }
+ }
+
+ if (! err)
+ *h = hd;
+
+ return err;
+}
+
+/* Create a message digest object for algorithm ALGO. FLAGS may be
+ given as an bitwise OR of the gcry_md_flags values. ALGO may be
+ given as 0 if the algorithms to be used are later set using
+ gcry_md_enable. H is guaranteed to be a valid handle or NULL on
+ error. */
+gcry_error_t
+gcry_md_open (gcry_md_hd_t *h, int algo, unsigned int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_md_hd_t hd;
+
+ if ((flags & ~(GCRY_MD_FLAG_SECURE | GCRY_MD_FLAG_HMAC)))
+ err = GPG_ERR_INV_ARG;
+ else
+ {
+ err = md_open (&hd, algo, (flags & GCRY_MD_FLAG_SECURE),
+ (flags & GCRY_MD_FLAG_HMAC));
+ }
+
+ *h = err? NULL : hd;
+ return gcry_error (err);
+}
+
+
+
+static gcry_err_code_t
+md_enable (gcry_md_hd_t hd, int algorithm)
+{
+ struct gcry_md_context *h = hd->ctx;
+ gcry_md_spec_t *digest = NULL;
+ GcryDigestEntry *entry;
+ gcry_module_t module;
+ gcry_err_code_t err = 0;
+
+ for (entry = h->list; entry; entry = entry->next)
+ if (entry->module->mod_id == algorithm)
+ return err; /* already enabled */
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ ath_mutex_lock (&digests_registered_lock);
+ module = _gcry_module_lookup_id (digests_registered, algorithm);
+ ath_mutex_unlock (&digests_registered_lock);
+ if (! module)
+ {
+ log_debug ("md_enable: algorithm %d not available\n", algorithm);
+ err = GPG_ERR_DIGEST_ALGO;
+ }
+ else
+ digest = (gcry_md_spec_t *) module->spec;
+
+
+ if (!err && algorithm == GCRY_MD_MD5 && fips_mode ())
+ {
+ _gcry_inactivate_fips_mode ("MD5 used");
+ if (_gcry_enforced_fips_mode () )
+ {
+ /* We should never get to here because we do not register
+ MD5 in enforced fips mode. But better throw an error. */
+ err = GPG_ERR_DIGEST_ALGO;
+ }
+ }
+
+ if (!err)
+ {
+ size_t size = (sizeof (*entry)
+ + digest->contextsize
+ - sizeof (entry->context));
+
+ /* And allocate a new list entry. */
+ if (h->secure)
+ entry = gcry_malloc_secure (size);
+ else
+ entry = gcry_malloc (size);
+
+ if (! entry)
+ err = gpg_err_code_from_errno (errno);
+ else
+ {
+ entry->digest = digest;
+ entry->module = module;
+ entry->next = h->list;
+ entry->actual_struct_size = size;
+ h->list = entry;
+
+ /* And init this instance. */
+ entry->digest->init (&entry->context.c);
+ }
+ }
+
+ if (err)
+ {
+ if (module)
+ {
+ ath_mutex_lock (&digests_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&digests_registered_lock);
+ }
+ }
+
+ return err;
+}
+
+
+gcry_error_t
+gcry_md_enable (gcry_md_hd_t hd, int algorithm)
+{
+ return gcry_error (md_enable (hd, algorithm));
+}
+
+static gcry_err_code_t
+md_copy (gcry_md_hd_t ahd, gcry_md_hd_t *b_hd)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ struct gcry_md_context *a = ahd->ctx;
+ struct gcry_md_context *b;
+ GcryDigestEntry *ar, *br;
+ gcry_md_hd_t bhd;
+ size_t n;
+
+ if (ahd->bufpos)
+ md_write (ahd, NULL, 0);
+
+ n = (char *) ahd->ctx - (char *) ahd;
+ if (a->secure)
+ bhd = gcry_malloc_secure (n + sizeof (struct gcry_md_context));
+ else
+ bhd = gcry_malloc (n + sizeof (struct gcry_md_context));
+
+ if (! bhd)
+ err = gpg_err_code_from_errno (errno);
+
+ if (! err)
+ {
+ bhd->ctx = b = (struct gcry_md_context *) ((char *) bhd + n);
+ /* No need to copy the buffer due to the write above. */
+ gcry_assert (ahd->bufsize == (n - sizeof (struct gcry_md_handle) + 1));
+ bhd->bufsize = ahd->bufsize;
+ bhd->bufpos = 0;
+ gcry_assert (! ahd->bufpos);
+ memcpy (b, a, sizeof *a);
+ b->list = NULL;
+ b->debug = NULL;
+ if (a->macpads)
+ {
+ b->macpads = gcry_malloc_secure (2*(a->macpads_Bsize));
+ if (! b->macpads)
+ {
+ err = gpg_err_code_from_errno (errno);
+ md_close (bhd);
+ }
+ else
+ memcpy (b->macpads, a->macpads, (2*(a->macpads_Bsize)));
+ }
+ }
+
+ /* Copy the complete list of algorithms. The copied list is
+ reversed, but that doesn't matter. */
+ if (!err)
+ {
+ for (ar = a->list; ar; ar = ar->next)
+ {
+ if (a->secure)
+ br = gcry_malloc_secure (sizeof *br
+ + ar->digest->contextsize
+ - sizeof(ar->context));
+ else
+ br = gcry_malloc (sizeof *br
+ + ar->digest->contextsize
+ - sizeof (ar->context));
+ if (!br)
+ {
+ err = gpg_err_code_from_errno (errno);
+ md_close (bhd);
+ break;
+ }
+
+ memcpy (br, ar, (sizeof (*br) + ar->digest->contextsize
+ - sizeof (ar->context)));
+ br->next = b->list;
+ b->list = br;
+
+ /* Add a reference to the module. */
+ ath_mutex_lock (&digests_registered_lock);
+ _gcry_module_use (br->module);
+ ath_mutex_unlock (&digests_registered_lock);
+ }
+ }
+
+ if (a->debug && !err)
+ md_start_debug (bhd, "unknown");
+
+ if (!err)
+ *b_hd = bhd;
+
+ return err;
+}
+
+gcry_error_t
+gcry_md_copy (gcry_md_hd_t *handle, gcry_md_hd_t hd)
+{
+ gcry_err_code_t err;
+
+ err = md_copy (hd, handle);
+ if (err)
+ *handle = NULL;
+ return gcry_error (err);
+}
+
+/*
+ * Reset all contexts and discard any buffered stuff. This may be used
+ * instead of a md_close(); md_open().
+ */
+void
+gcry_md_reset (gcry_md_hd_t a)
+{
+ GcryDigestEntry *r;
+
+ /* Note: We allow this even in fips non operational mode. */
+
+ a->bufpos = a->ctx->finalized = 0;
+
+ for (r = a->ctx->list; r; r = r->next)
+ {
+ memset (r->context.c, 0, r->digest->contextsize);
+ (*r->digest->init) (&r->context.c);
+ }
+ if (a->ctx->macpads)
+ md_write (a, a->ctx->macpads, a->ctx->macpads_Bsize); /* inner pad */
+}
+
+static void
+md_close (gcry_md_hd_t a)
+{
+ GcryDigestEntry *r, *r2;
+
+ if (! a)
+ return;
+ if (a->ctx->debug)
+ md_stop_debug (a);
+ for (r = a->ctx->list; r; r = r2)
+ {
+ r2 = r->next;
+ ath_mutex_lock (&digests_registered_lock);
+ _gcry_module_release (r->module);
+ ath_mutex_unlock (&digests_registered_lock);
+ wipememory (r, r->actual_struct_size);
+ gcry_free (r);
+ }
+
+ if (a->ctx->macpads)
+ {
+ wipememory (a->ctx->macpads, 2*(a->ctx->macpads_Bsize));
+ gcry_free(a->ctx->macpads);
+ }
+
+ wipememory (a, a->ctx->actual_handle_size);
+ gcry_free(a);
+}
+
+void
+gcry_md_close (gcry_md_hd_t hd)
+{
+ /* Note: We allow this even in fips non operational mode. */
+ md_close (hd);
+}
+
+static void
+md_write (gcry_md_hd_t a, const void *inbuf, size_t inlen)
+{
+ GcryDigestEntry *r;
+
+ if (a->ctx->debug)
+ {
+ if (a->bufpos && fwrite (a->buf, a->bufpos, 1, a->ctx->debug) != 1)
+ BUG();
+ if (inlen && fwrite (inbuf, inlen, 1, a->ctx->debug) != 1)
+ BUG();
+ }
+
+ for (r = a->ctx->list; r; r = r->next)
+ {
+ if (a->bufpos)
+ (*r->digest->write) (&r->context.c, a->buf, a->bufpos);
+ (*r->digest->write) (&r->context.c, inbuf, inlen);
+ }
+ a->bufpos = 0;
+}
+
+void
+gcry_md_write (gcry_md_hd_t hd, const void *inbuf, size_t inlen)
+{
+ md_write (hd, inbuf, inlen);
+}
+
+static void
+md_final (gcry_md_hd_t a)
+{
+ GcryDigestEntry *r;
+
+ if (a->ctx->finalized)
+ return;
+
+ if (a->bufpos)
+ md_write (a, NULL, 0);
+
+ for (r = a->ctx->list; r; r = r->next)
+ (*r->digest->final) (&r->context.c);
+
+ a->ctx->finalized = 1;
+
+ if (a->ctx->macpads)
+ {
+ /* Finish the hmac. */
+ int algo = md_get_algo (a);
+ byte *p = md_read (a, algo);
+ size_t dlen = md_digest_length (algo);
+ gcry_md_hd_t om;
+ gcry_err_code_t err = md_open (&om, algo, a->ctx->secure, 0);
+
+ if (err)
+ _gcry_fatal_error (err, NULL);
+ md_write (om,
+ (a->ctx->macpads)+(a->ctx->macpads_Bsize),
+ a->ctx->macpads_Bsize);
+ md_write (om, p, dlen);
+ md_final (om);
+ /* Replace our digest with the mac (they have the same size). */
+ memcpy (p, md_read (om, algo), dlen);
+ md_close (om);
+ }
+}
+
+static gcry_err_code_t
+prepare_macpads (gcry_md_hd_t hd, const unsigned char *key, size_t keylen)
+{
+ int i;
+ int algo = md_get_algo (hd);
+ unsigned char *helpkey = NULL;
+ unsigned char *ipad, *opad;
+
+ if (!algo)
+ return GPG_ERR_DIGEST_ALGO; /* Might happen if no algo is enabled. */
+
+ if ( keylen > hd->ctx->macpads_Bsize )
+ {
+ helpkey = gcry_malloc_secure (md_digest_length (algo));
+ if (!helpkey)
+ return gpg_err_code_from_errno (errno);
+ gcry_md_hash_buffer (algo, helpkey, key, keylen);
+ key = helpkey;
+ keylen = md_digest_length (algo);
+ gcry_assert ( keylen <= hd->ctx->macpads_Bsize );
+ }
+
+ memset ( hd->ctx->macpads, 0, 2*(hd->ctx->macpads_Bsize) );
+ ipad = hd->ctx->macpads;
+ opad = (hd->ctx->macpads)+(hd->ctx->macpads_Bsize);
+ memcpy ( ipad, key, keylen );
+ memcpy ( opad, key, keylen );
+ for (i=0; i < hd->ctx->macpads_Bsize; i++ )
+ {
+ ipad[i] ^= 0x36;
+ opad[i] ^= 0x5c;
+ }
+ gcry_free (helpkey);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+gcry_error_t
+gcry_md_ctl (gcry_md_hd_t hd, int cmd, void *buffer, size_t buflen)
+{
+ gcry_err_code_t rc = 0;
+
+ switch (cmd)
+ {
+ case GCRYCTL_FINALIZE:
+ md_final (hd);
+ break;
+ case GCRYCTL_SET_KEY:
+ rc = gcry_err_code (gcry_md_setkey (hd, buffer, buflen));
+ break;
+ case GCRYCTL_START_DUMP:
+ md_start_debug (hd, buffer);
+ break;
+ case GCRYCTL_STOP_DUMP:
+ md_stop_debug ( hd );
+ break;
+ default:
+ rc = GPG_ERR_INV_OP;
+ }
+ return gcry_error (rc);
+}
+
+gcry_error_t
+gcry_md_setkey (gcry_md_hd_t hd, const void *key, size_t keylen)
+{
+ gcry_err_code_t rc = GPG_ERR_NO_ERROR;
+
+ if (!hd->ctx->macpads)
+ rc = GPG_ERR_CONFLICT;
+ else
+ {
+ rc = prepare_macpads (hd, key, keylen);
+ if (! rc)
+ gcry_md_reset (hd);
+ }
+
+ return gcry_error (rc);
+}
+
+/* The new debug interface. If SUFFIX is a string it creates an debug
+ file for the context HD. IF suffix is NULL, the file is closed and
+ debugging is stopped. */
+void
+gcry_md_debug (gcry_md_hd_t hd, const char *suffix)
+{
+ if (suffix)
+ md_start_debug (hd, suffix);
+ else
+ md_stop_debug (hd);
+}
+
+
+
+/****************
+ * if ALGO is null get the digest for the used algo (which should be only one)
+ */
+static byte *
+md_read( gcry_md_hd_t a, int algo )
+{
+ GcryDigestEntry *r = a->ctx->list;
+
+ if (! algo)
+ {
+ /* return the first algorithm */
+ if (r && r->next)
+ log_debug ("more than one algorithm in md_read(0)\n");
+ return r->digest->read( &r->context.c );
+ }
+ else
+ {
+ for (r = a->ctx->list; r; r = r->next)
+ if (r->module->mod_id == algo)
+ return r->digest->read (&r->context.c);
+ }
+ BUG();
+ return NULL;
+}
+
+/*
+ * Read out the complete digest, this function implictly finalizes
+ * the hash.
+ */
+byte *
+gcry_md_read (gcry_md_hd_t hd, int algo)
+{
+ /* This function is expected to always return a digest, thus we
+ can't return an error which we actually should do in
+ non-operational state. */
+ gcry_md_ctl (hd, GCRYCTL_FINALIZE, NULL, 0);
+ return md_read (hd, algo);
+}
+
+
+/*
+ * Read out an intermediate digest. Not yet functional.
+ */
+gcry_err_code_t
+gcry_md_get (gcry_md_hd_t hd, int algo, byte *buffer, int buflen)
+{
+ (void)hd;
+ (void)algo;
+ (void)buffer;
+ (void)buflen;
+
+ /*md_digest ... */
+ fips_signal_error ("unimplemented function called");
+ return GPG_ERR_INTERNAL;
+}
+
+
+/*
+ * Shortcut function to hash a buffer with a given algo. The only
+ * guaranteed supported algorithms are RIPE-MD160 and SHA-1. The
+ * supplied digest buffer must be large enough to store the resulting
+ * hash. No error is returned, the function will abort on an invalid
+ * algo. DISABLED_ALGOS are ignored here. */
+void
+gcry_md_hash_buffer (int algo, void *digest,
+ const void *buffer, size_t length)
+{
+ if (algo == GCRY_MD_SHA1)
+ _gcry_sha1_hash_buffer (digest, buffer, length);
+ else if (algo == GCRY_MD_RMD160 && !fips_mode () )
+ _gcry_rmd160_hash_buffer (digest, buffer, length);
+ else
+ {
+ /* For the others we do not have a fast function, so we use the
+ normal functions. */
+ gcry_md_hd_t h;
+ gpg_err_code_t err;
+
+ if (algo == GCRY_MD_MD5 && fips_mode ())
+ {
+ _gcry_inactivate_fips_mode ("MD5 used");
+ if (_gcry_enforced_fips_mode () )
+ {
+ /* We should never get to here because we do not register
+ MD5 in enforced fips mode. */
+ _gcry_fips_noreturn ();
+ }
+ }
+
+ err = md_open (&h, algo, 0, 0);
+ if (err)
+ log_bug ("gcry_md_open failed for algo %d: %s",
+ algo, gpg_strerror (gcry_error(err)));
+ md_write (h, (byte *) buffer, length);
+ md_final (h);
+ memcpy (digest, md_read (h, algo), md_digest_length (algo));
+ md_close (h);
+ }
+}
+
+static int
+md_get_algo (gcry_md_hd_t a)
+{
+ GcryDigestEntry *r = a->ctx->list;
+
+ if (r && r->next)
+ {
+ fips_signal_error ("possible usage error");
+ log_error ("WARNING: more than one algorithm in md_get_algo()\n");
+ }
+ return r ? r->module->mod_id : 0;
+}
+
+int
+gcry_md_get_algo (gcry_md_hd_t hd)
+{
+ return md_get_algo (hd);
+}
+
+
+/****************
+ * Return the length of the digest
+ */
+static int
+md_digest_length (int algorithm)
+{
+ gcry_module_t digest;
+ int mdlen = 0;
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ ath_mutex_lock (&digests_registered_lock);
+ digest = _gcry_module_lookup_id (digests_registered, algorithm);
+ if (digest)
+ {
+ mdlen = ((gcry_md_spec_t *) digest->spec)->mdlen;
+ _gcry_module_release (digest);
+ }
+ ath_mutex_unlock (&digests_registered_lock);
+
+ return mdlen;
+}
+
+/****************
+ * Return the length of the digest in bytes.
+ * This function will return 0 in case of errors.
+ */
+unsigned int
+gcry_md_get_algo_dlen (int algorithm)
+{
+ return md_digest_length (algorithm);
+}
+
+
+/* Hmmm: add a mode to enumerate the OIDs
+ * to make g10/sig-check.c more portable */
+static const byte *
+md_asn_oid (int algorithm, size_t *asnlen, size_t *mdlen)
+{
+ const byte *asnoid = NULL;
+ gcry_module_t digest;
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ ath_mutex_lock (&digests_registered_lock);
+ digest = _gcry_module_lookup_id (digests_registered, algorithm);
+ if (digest)
+ {
+ if (asnlen)
+ *asnlen = ((gcry_md_spec_t *) digest->spec)->asnlen;
+ if (mdlen)
+ *mdlen = ((gcry_md_spec_t *) digest->spec)->mdlen;
+ asnoid = ((gcry_md_spec_t *) digest->spec)->asnoid;
+ _gcry_module_release (digest);
+ }
+ else
+ log_bug ("no ASN.1 OID for md algo %d\n", algorithm);
+ ath_mutex_unlock (&digests_registered_lock);
+
+ return asnoid;
+}
+
+
+
+/****************
+ * Return information about the given cipher algorithm
+ * WHAT select the kind of information returned:
+ * GCRYCTL_TEST_ALGO:
+ * Returns 0 when the specified algorithm is available for use.
+ * buffer and nbytes must be zero.
+ * GCRYCTL_GET_ASNOID:
+ * Return the ASNOID of the algorithm in buffer. if buffer is NULL, only
+ * the required length is returned.
+ *
+ * Note: Because this function is in most cases used to return an
+ * integer value, we can make it easier for the caller to just look at
+ * the return value. The caller will in all cases consult the value
+ * and thereby detecting whether a error occured or not (i.e. while checking
+ * the block size)
+ */
+gcry_error_t
+gcry_md_algo_info (int algo, int what, void *buffer, size_t *nbytes)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ switch (what)
+ {
+ case GCRYCTL_TEST_ALGO:
+ if (buffer || nbytes)
+ err = GPG_ERR_INV_ARG;
+ else
+ err = check_digest_algo (algo);
+ break;
+
+ case GCRYCTL_GET_ASNOID:
+ /* We need to check that the algo is available because
+ md_asn_oid would otherwise raise an assertion. */
+ err = check_digest_algo (algo);
+ if (!err)
+ {
+ const char unsigned *asn;
+ size_t asnlen;
+
+ asn = md_asn_oid (algo, &asnlen, NULL);
+ if (buffer && (*nbytes >= asnlen))
+ {
+ memcpy (buffer, asn, asnlen);
+ *nbytes = asnlen;
+ }
+ else if (!buffer && nbytes)
+ *nbytes = asnlen;
+ else
+ {
+ if (buffer)
+ err = GPG_ERR_TOO_SHORT;
+ else
+ err = GPG_ERR_INV_ARG;
+ }
+ }
+ break;
+
+ default:
+ err = GPG_ERR_INV_OP;
+ }
+
+ return gcry_error (err);
+}
+
+
+static void
+md_start_debug ( gcry_md_hd_t md, const char *suffix )
+{
+ static int idx=0;
+ char buf[50];
+
+ if (fips_mode ())
+ return;
+
+ if ( md->ctx->debug )
+ {
+ log_debug("Oops: md debug already started\n");
+ return;
+ }
+ idx++;
+ snprintf (buf, DIM(buf)-1, "dbgmd-%05d.%.10s", idx, suffix );
+ md->ctx->debug = fopen(buf, "w");
+ if ( !md->ctx->debug )
+ log_debug("md debug: can't open %s\n", buf );
+}
+
+static void
+md_stop_debug( gcry_md_hd_t md )
+{
+ if ( md->ctx->debug )
+ {
+ if ( md->bufpos )
+ md_write ( md, NULL, 0 );
+ fclose (md->ctx->debug);
+ md->ctx->debug = NULL;
+ }
+
+#ifdef HAVE_U64_TYPEDEF
+ { /* a kludge to pull in the __muldi3 for Solaris */
+ volatile u32 a = (u32)(ulong)md;
+ volatile u64 b = 42;
+ volatile u64 c;
+ c = a * b;
+ }
+#endif
+}
+
+
+
+/*
+ * Return information about the digest handle.
+ * GCRYCTL_IS_SECURE:
+ * Returns 1 when the handle works on secured memory
+ * otherwise 0 is returned. There is no error return.
+ * GCRYCTL_IS_ALGO_ENABLED:
+ * Returns 1 if the algo is enabled for that handle.
+ * The algo must be passed as the address of an int.
+ */
+gcry_error_t
+gcry_md_info (gcry_md_hd_t h, int cmd, void *buffer, size_t *nbytes)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ switch (cmd)
+ {
+ case GCRYCTL_IS_SECURE:
+ *nbytes = h->ctx->secure;
+ break;
+
+ case GCRYCTL_IS_ALGO_ENABLED:
+ {
+ GcryDigestEntry *r;
+ int algo;
+
+ if ( !buffer || (nbytes && (*nbytes != sizeof (int))))
+ err = GPG_ERR_INV_ARG;
+ else
+ {
+ algo = *(int*)buffer;
+
+ *nbytes = 0;
+ for(r=h->ctx->list; r; r = r->next ) {
+ if (r->module->mod_id == algo)
+ {
+ *nbytes = 1;
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ default:
+ err = GPG_ERR_INV_OP;
+ }
+
+ return gcry_error (err);
+}
+
+
+/* Explicitly initialize this module. */
+gcry_err_code_t
+_gcry_md_init (void)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ return err;
+}
+
+
+int
+gcry_md_is_secure (gcry_md_hd_t a)
+{
+ size_t value;
+
+ if (gcry_md_info (a, GCRYCTL_IS_SECURE, NULL, &value))
+ value = 1; /* It seems to be better to assume secure memory on
+ error. */
+ return value;
+}
+
+
+int
+gcry_md_is_enabled (gcry_md_hd_t a, int algo)
+{
+ size_t value;
+
+ value = sizeof algo;
+ if (gcry_md_info (a, GCRYCTL_IS_ALGO_ENABLED, &algo, &value))
+ value = 0;
+ return value;
+}
+
+/* Get a list consisting of the IDs of the loaded message digest
+ modules. If LIST is zero, write the number of loaded message
+ digest modules to LIST_LENGTH and return. If LIST is non-zero, the
+ first *LIST_LENGTH algorithm IDs are stored in LIST, which must be
+ of according size. In case there are less message digest modules
+ than *LIST_LENGTH, *LIST_LENGTH is updated to the correct
+ number. */
+gcry_error_t
+gcry_md_list (int *list, int *list_length)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ ath_mutex_lock (&digests_registered_lock);
+ err = _gcry_module_list (digests_registered, list, list_length);
+ ath_mutex_unlock (&digests_registered_lock);
+
+ return err;
+}
+
+
+/* Run the selftests for digest algorithm ALGO with optional reporting
+ function REPORT. */
+gpg_error_t
+_gcry_md_selftest (int algo, int extended, selftest_report_func_t report)
+{
+ gcry_module_t module = NULL;
+ cipher_extra_spec_t *extraspec = NULL;
+ gcry_err_code_t ec = 0;
+
+ REGISTER_DEFAULT_DIGESTS;
+
+ ath_mutex_lock (&digests_registered_lock);
+ module = _gcry_module_lookup_id (digests_registered, algo);
+ if (module && !(module->flags & FLAG_MODULE_DISABLED))
+ extraspec = module->extraspec;
+ ath_mutex_unlock (&digests_registered_lock);
+ if (extraspec && extraspec->selftest)
+ ec = extraspec->selftest (algo, extended, report);
+ else
+ {
+ ec = GPG_ERR_DIGEST_ALGO;
+ if (report)
+ report ("digest", algo, "module",
+ module && !(module->flags & FLAG_MODULE_DISABLED)?
+ "no selftest available" :
+ module? "algorithm disabled" : "algorithm not found");
+ }
+
+ if (module)
+ {
+ ath_mutex_lock (&digests_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&digests_registered_lock);
+ }
+ return gpg_error (ec);
+}
diff --git a/grub-core/lib/libgcrypt/cipher/md4.c b/grub-core/lib/libgcrypt/cipher/md4.c
new file mode 100644
index 0000000..680cf87
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/md4.c
@@ -0,0 +1,328 @@
+/* md4.c - MD4 Message-Digest Algorithm
+ * Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * Based on md5.c in libgcrypt, but rewritten to compute md4 checksums
+ * using a public domain md4 implementation with the following comments:
+ *
+ * Modified by Wei Dai from Andrew M. Kuchling's md4.c
+ * The original code and all modifications are in the public domain.
+ *
+ * This is the original introductory comment:
+ *
+ * md4.c : MD4 hash algorithm.
+ *
+ * Part of the Python Cryptography Toolkit, version 1.1
+ *
+ * Distribute and use freely; there are no restrictions on further
+ * dissemination and usage except those imposed by the laws of your
+ * country of residence.
+ *
+ */
+
+/* MD4 test suite:
+ * MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
+ * MD4 ("a") = bde52cb31de33e46245e05fbdbd6fb24
+ * MD4 ("abc") = a448017aaf21d8525fc10ae87aa6729d
+ * MD4 ("message digest") = d9130a8164549fe818874806e1c7014b
+ * MD4 ("abcdefghijklmnopqrstuvwxyz") = d79e1c308aa5bbcdeea8ed63df412da9
+ * MD4 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =
+ * 043f8582f241db351ce627e153e7f0e4
+ * MD4 ("123456789012345678901234567890123456789012345678901234567890123456
+ * 78901234567890") = e33b4ddc9c38f2199c3e7b164fcc0536
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+
+typedef struct {
+ u32 A,B,C,D; /* chaining variables */
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} MD4_CONTEXT;
+
+
+static void
+md4_init( void *context )
+{
+ MD4_CONTEXT *ctx = context;
+
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
+
+ ctx->nblocks = 0;
+ ctx->count = 0;
+}
+
+#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+
+
+/****************
+ * transform 64 bytes
+ */
+static void
+transform ( MD4_CONTEXT *ctx, const unsigned char *data )
+{
+ u32 in[16];
+ register u32 A = ctx->A;
+ register u32 B = ctx->B;
+ register u32 C = ctx->C;
+ register u32 D = ctx->D;
+
+#ifdef WORDS_BIGENDIAN
+ {
+ int i;
+ byte *p2, *p1;
+ for(i=0, p1=data, p2=(byte*)in; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+#else
+ memcpy (in, data, 64);
+#endif
+
+ /* Round 1. */
+#define function(a,b,c,d,k,s) a=rol(a+F(b,c,d)+in[k],s);
+ function(A,B,C,D, 0, 3);
+ function(D,A,B,C, 1, 7);
+ function(C,D,A,B, 2,11);
+ function(B,C,D,A, 3,19);
+ function(A,B,C,D, 4, 3);
+ function(D,A,B,C, 5, 7);
+ function(C,D,A,B, 6,11);
+ function(B,C,D,A, 7,19);
+ function(A,B,C,D, 8, 3);
+ function(D,A,B,C, 9, 7);
+ function(C,D,A,B,10,11);
+ function(B,C,D,A,11,19);
+ function(A,B,C,D,12, 3);
+ function(D,A,B,C,13, 7);
+ function(C,D,A,B,14,11);
+ function(B,C,D,A,15,19);
+
+#undef function
+
+ /* Round 2. */
+#define function(a,b,c,d,k,s) a=rol(a+G(b,c,d)+in[k]+0x5a827999,s);
+
+ function(A,B,C,D, 0, 3);
+ function(D,A,B,C, 4, 5);
+ function(C,D,A,B, 8, 9);
+ function(B,C,D,A,12,13);
+ function(A,B,C,D, 1, 3);
+ function(D,A,B,C, 5, 5);
+ function(C,D,A,B, 9, 9);
+ function(B,C,D,A,13,13);
+ function(A,B,C,D, 2, 3);
+ function(D,A,B,C, 6, 5);
+ function(C,D,A,B,10, 9);
+ function(B,C,D,A,14,13);
+ function(A,B,C,D, 3, 3);
+ function(D,A,B,C, 7, 5);
+ function(C,D,A,B,11, 9);
+ function(B,C,D,A,15,13);
+
+#undef function
+
+ /* Round 3. */
+#define function(a,b,c,d,k,s) a=rol(a+H(b,c,d)+in[k]+0x6ed9eba1,s);
+
+ function(A,B,C,D, 0, 3);
+ function(D,A,B,C, 8, 9);
+ function(C,D,A,B, 4,11);
+ function(B,C,D,A,12,15);
+ function(A,B,C,D, 2, 3);
+ function(D,A,B,C,10, 9);
+ function(C,D,A,B, 6,11);
+ function(B,C,D,A,14,15);
+ function(A,B,C,D, 1, 3);
+ function(D,A,B,C, 9, 9);
+ function(C,D,A,B, 5,11);
+ function(B,C,D,A,13,15);
+ function(A,B,C,D, 3, 3);
+ function(D,A,B,C,11, 9);
+ function(C,D,A,B, 7,11);
+ function(B,C,D,A,15,15);
+
+
+ /* Put checksum in context given as argument. */
+ ctx->A += A;
+ ctx->B += B;
+ ctx->C += C;
+ ctx->D += D;
+}
+
+
+
+/* The routine updates the message-digest context to
+ * account for the presence of each of the characters inBuf[0..inLen-1]
+ * in the message whose digest is being computed.
+ */
+static void
+md4_write ( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ MD4_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ md4_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+
+/* The routine final terminates the message-digest computation and
+ * ends with the desired message digest in mdContext->digest[0...15].
+ * The handle is prepared for a new MD4 cycle.
+ * Returns 16 bytes representing the digest.
+ */
+
+static void
+md4_final( void *context )
+{
+ MD4_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ md4_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ md4_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
+ *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
+#else /* little endian */
+#define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0)
+#endif
+ X(A);
+ X(B);
+ X(C);
+ X(D);
+#undef X
+
+}
+
+static byte *
+md4_read (void *context)
+{
+ MD4_CONTEXT *hd = context;
+ return hd->buf;
+}
+
+static byte asn[18] = /* Object ID is 1.2.840.113549.2.4 */
+ { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86,0x48,
+ 0x86, 0xf7, 0x0d, 0x02, 0x04, 0x05, 0x00, 0x04, 0x10 };
+
+static gcry_md_oid_spec_t oid_spec_md4[] =
+ {
+ /* iso.member-body.us.rsadsi.digestAlgorithm.md4 */
+ { "1.2.840.113549.2.4" },
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_md4 =
+ {
+ "MD4", asn, DIM (asn), oid_spec_md4,16,
+ md4_init, md4_write, md4_final, md4_read,
+ sizeof (MD4_CONTEXT)
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/md5.c b/grub-core/lib/libgcrypt/cipher/md5.c
new file mode 100644
index 0000000..899dce8
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/md5.c
@@ -0,0 +1,355 @@
+/* md5.c - MD5 Message-Digest Algorithm
+ * Copyright (C) 1995,1996,1998,1999,2001,2002,
+ * 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * According to the definition of MD5 in RFC 1321 from April 1992.
+ * NOTE: This is *not* the same file as the one from glibc.
+ * Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ * heavily modified for GnuPG by Werner Koch <wk@gnupg.org>
+ */
+
+/* Test values:
+ * "" D4 1D 8C D9 8F 00 B2 04 E9 80 09 98 EC F8 42 7E
+ * "a" 0C C1 75 B9 C0 F1 B6 A8 31 C3 99 E2 69 77 26 61
+ * "abc 90 01 50 98 3C D2 4F B0 D6 96 3F 7D 28 E1 7F 72
+ * "message digest" F9 6B 69 7D 7C B7 93 8D 52 5A 2F 31 AA F1 61 D0
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+
+typedef struct {
+ u32 A,B,C,D; /* chaining variables */
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} MD5_CONTEXT;
+
+
+static void
+md5_init( void *context )
+{
+ MD5_CONTEXT *ctx = context;
+
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
+
+ ctx->nblocks = 0;
+ ctx->count = 0;
+}
+
+
+/* These are the four functions used in the four steps of the MD5 algorithm
+ and defined in the RFC 1321. The first function is a little bit optimized
+ (as found in Colin Plumbs public domain implementation). */
+/* #define FF(b, c, d) ((b & c) | (~b & d)) */
+#define FF(b, c, d) (d ^ (b & (c ^ d)))
+#define FG(b, c, d) FF (d, b, c)
+#define FH(b, c, d) (b ^ c ^ d)
+#define FI(b, c, d) (c ^ (b | ~d))
+
+
+/****************
+ * transform n*64 bytes
+ */
+static void
+transform ( MD5_CONTEXT *ctx, const unsigned char *data )
+{
+ u32 correct_words[16];
+ register u32 A = ctx->A;
+ register u32 B = ctx->B;
+ register u32 C = ctx->C;
+ register u32 D = ctx->D;
+ u32 *cwp = correct_words;
+
+#ifdef WORDS_BIGENDIAN
+ {
+ int i;
+ byte *p2, *p1;
+ for(i=0, p1=data, p2=(byte*)correct_words; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+#else
+ memcpy( correct_words, data, 64 );
+#endif
+
+
+#define OP(a, b, c, d, s, T) \
+ do \
+ { \
+ a += FF (b, c, d) + (*cwp++) + T; \
+ a = rol(a, s); \
+ a += b; \
+ } \
+ while (0)
+
+ /* Before we start, one word about the strange constants.
+ They are defined in RFC 1321 as
+
+ T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64
+ */
+
+ /* Round 1. */
+ OP (A, B, C, D, 7, 0xd76aa478);
+ OP (D, A, B, C, 12, 0xe8c7b756);
+ OP (C, D, A, B, 17, 0x242070db);
+ OP (B, C, D, A, 22, 0xc1bdceee);
+ OP (A, B, C, D, 7, 0xf57c0faf);
+ OP (D, A, B, C, 12, 0x4787c62a);
+ OP (C, D, A, B, 17, 0xa8304613);
+ OP (B, C, D, A, 22, 0xfd469501);
+ OP (A, B, C, D, 7, 0x698098d8);
+ OP (D, A, B, C, 12, 0x8b44f7af);
+ OP (C, D, A, B, 17, 0xffff5bb1);
+ OP (B, C, D, A, 22, 0x895cd7be);
+ OP (A, B, C, D, 7, 0x6b901122);
+ OP (D, A, B, C, 12, 0xfd987193);
+ OP (C, D, A, B, 17, 0xa679438e);
+ OP (B, C, D, A, 22, 0x49b40821);
+
+#undef OP
+#define OP(f, a, b, c, d, k, s, T) \
+ do \
+ { \
+ a += f (b, c, d) + correct_words[k] + T; \
+ a = rol(a, s); \
+ a += b; \
+ } \
+ while (0)
+
+ /* Round 2. */
+ OP (FG, A, B, C, D, 1, 5, 0xf61e2562);
+ OP (FG, D, A, B, C, 6, 9, 0xc040b340);
+ OP (FG, C, D, A, B, 11, 14, 0x265e5a51);
+ OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa);
+ OP (FG, A, B, C, D, 5, 5, 0xd62f105d);
+ OP (FG, D, A, B, C, 10, 9, 0x02441453);
+ OP (FG, C, D, A, B, 15, 14, 0xd8a1e681);
+ OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8);
+ OP (FG, A, B, C, D, 9, 5, 0x21e1cde6);
+ OP (FG, D, A, B, C, 14, 9, 0xc33707d6);
+ OP (FG, C, D, A, B, 3, 14, 0xf4d50d87);
+ OP (FG, B, C, D, A, 8, 20, 0x455a14ed);
+ OP (FG, A, B, C, D, 13, 5, 0xa9e3e905);
+ OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8);
+ OP (FG, C, D, A, B, 7, 14, 0x676f02d9);
+ OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
+
+ /* Round 3. */
+ OP (FH, A, B, C, D, 5, 4, 0xfffa3942);
+ OP (FH, D, A, B, C, 8, 11, 0x8771f681);
+ OP (FH, C, D, A, B, 11, 16, 0x6d9d6122);
+ OP (FH, B, C, D, A, 14, 23, 0xfde5380c);
+ OP (FH, A, B, C, D, 1, 4, 0xa4beea44);
+ OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9);
+ OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60);
+ OP (FH, B, C, D, A, 10, 23, 0xbebfbc70);
+ OP (FH, A, B, C, D, 13, 4, 0x289b7ec6);
+ OP (FH, D, A, B, C, 0, 11, 0xeaa127fa);
+ OP (FH, C, D, A, B, 3, 16, 0xd4ef3085);
+ OP (FH, B, C, D, A, 6, 23, 0x04881d05);
+ OP (FH, A, B, C, D, 9, 4, 0xd9d4d039);
+ OP (FH, D, A, B, C, 12, 11, 0xe6db99e5);
+ OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8);
+ OP (FH, B, C, D, A, 2, 23, 0xc4ac5665);
+
+ /* Round 4. */
+ OP (FI, A, B, C, D, 0, 6, 0xf4292244);
+ OP (FI, D, A, B, C, 7, 10, 0x432aff97);
+ OP (FI, C, D, A, B, 14, 15, 0xab9423a7);
+ OP (FI, B, C, D, A, 5, 21, 0xfc93a039);
+ OP (FI, A, B, C, D, 12, 6, 0x655b59c3);
+ OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92);
+ OP (FI, C, D, A, B, 10, 15, 0xffeff47d);
+ OP (FI, B, C, D, A, 1, 21, 0x85845dd1);
+ OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f);
+ OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0);
+ OP (FI, C, D, A, B, 6, 15, 0xa3014314);
+ OP (FI, B, C, D, A, 13, 21, 0x4e0811a1);
+ OP (FI, A, B, C, D, 4, 6, 0xf7537e82);
+ OP (FI, D, A, B, C, 11, 10, 0xbd3af235);
+ OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb);
+ OP (FI, B, C, D, A, 9, 21, 0xeb86d391);
+
+ /* Put checksum in context given as argument. */
+ ctx->A += A;
+ ctx->B += B;
+ ctx->C += C;
+ ctx->D += D;
+}
+
+
+
+/* The routine updates the message-digest context to
+ * account for the presence of each of the characters inBuf[0..inLen-1]
+ * in the message whose digest is being computed.
+ */
+static void
+md5_write( void *context, const void *inbuf_arg , size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ MD5_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ md5_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+
+}
+
+
+
+/* The routine final terminates the message-digest computation and
+ * ends with the desired message digest in mdContext->digest[0...15].
+ * The handle is prepared for a new MD5 cycle.
+ * Returns 16 bytes representing the digest.
+ */
+
+static void
+md5_final( void *context)
+{
+ MD5_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ md5_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ md5_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (80+6*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
+ *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
+#else /* little endian */
+#define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0)
+#endif
+ X(A);
+ X(B);
+ X(C);
+ X(D);
+#undef X
+
+}
+
+static byte *
+md5_read( void *context )
+{
+ MD5_CONTEXT *hd = (MD5_CONTEXT *) context;
+ return hd->buf;
+}
+
+static byte asn[18] = /* Object ID is 1.2.840.113549.2.5 */
+ { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86,0x48,
+ 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10 };
+
+static gcry_md_oid_spec_t oid_spec_md5[] =
+ {
+ /* iso.member-body.us.rsadsi.pkcs.pkcs-1.4 (md5WithRSAEncryption) */
+ { "1.2.840.113549.1.1.4" },
+ /* RSADSI digestAlgorithm MD5 */
+ { "1.2.840.113549.2.5" },
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_md5 =
+ {
+ "MD5", asn, DIM (asn), oid_spec_md5, 16,
+ md5_init, md5_write, md5_final, md5_read,
+ sizeof (MD5_CONTEXT)
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/primegen.c b/grub-core/lib/libgcrypt/cipher/primegen.c
new file mode 100644
index 0000000..b869bee
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/primegen.c
@@ -0,0 +1,1862 @@
+/* primegen.c - prime number generator
+ * Copyright (C) 1998, 2000, 2001, 2002, 2003
+ * 2004, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+#include "ath.h"
+
+static gcry_mpi_t gen_prime (unsigned int nbits, int secret, int randomlevel,
+ int (*extra_check)(void *, gcry_mpi_t),
+ void *extra_check_arg);
+static int check_prime( gcry_mpi_t prime, gcry_mpi_t val_2, int rm_rounds,
+ gcry_prime_check_func_t cb_func, void *cb_arg );
+static int is_prime (gcry_mpi_t n, int steps, unsigned int *count);
+static void m_out_of_n( char *array, int m, int n );
+
+static void (*progress_cb) (void *,const char*,int,int, int );
+static void *progress_cb_data;
+
+/* Note: 2 is not included because it can be tested more easily by
+ looking at bit 0. The last entry in this list is marked by a zero */
+static ushort small_prime_numbers[] = {
+ 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
+ 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101,
+ 103, 107, 109, 113, 127, 131, 137, 139, 149, 151,
+ 157, 163, 167, 173, 179, 181, 191, 193, 197, 199,
+ 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
+ 269, 271, 277, 281, 283, 293, 307, 311, 313, 317,
+ 331, 337, 347, 349, 353, 359, 367, 373, 379, 383,
+ 389, 397, 401, 409, 419, 421, 431, 433, 439, 443,
+ 449, 457, 461, 463, 467, 479, 487, 491, 499, 503,
+ 509, 521, 523, 541, 547, 557, 563, 569, 571, 577,
+ 587, 593, 599, 601, 607, 613, 617, 619, 631, 641,
+ 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
+ 709, 719, 727, 733, 739, 743, 751, 757, 761, 769,
+ 773, 787, 797, 809, 811, 821, 823, 827, 829, 839,
+ 853, 857, 859, 863, 877, 881, 883, 887, 907, 911,
+ 919, 929, 937, 941, 947, 953, 967, 971, 977, 983,
+ 991, 997, 1009, 1013, 1019, 1021, 1031, 1033,
+ 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091,
+ 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151,
+ 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213,
+ 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277,
+ 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307,
+ 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399,
+ 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451,
+ 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493,
+ 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559,
+ 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609,
+ 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667,
+ 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733,
+ 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789,
+ 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871,
+ 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931,
+ 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997,
+ 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053,
+ 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111,
+ 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161,
+ 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243,
+ 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297,
+ 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357,
+ 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411,
+ 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473,
+ 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551,
+ 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633,
+ 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687,
+ 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729,
+ 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791,
+ 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851,
+ 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917,
+ 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999,
+ 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061,
+ 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137,
+ 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209,
+ 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271,
+ 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331,
+ 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391,
+ 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467,
+ 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533,
+ 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583,
+ 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643,
+ 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709,
+ 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779,
+ 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851,
+ 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917,
+ 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989,
+ 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049,
+ 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111,
+ 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177,
+ 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243,
+ 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297,
+ 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391,
+ 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457,
+ 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519,
+ 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597,
+ 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657,
+ 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729,
+ 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799,
+ 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889,
+ 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951,
+ 4957, 4967, 4969, 4973, 4987, 4993, 4999,
+ 0
+};
+static int no_of_small_prime_numbers = DIM (small_prime_numbers) - 1;
+
+
+
+/* An object and a list to build up a global pool of primes. See
+ save_pool_prime and get_pool_prime. */
+struct primepool_s
+{
+ struct primepool_s *next;
+ gcry_mpi_t prime; /* If this is NULL the entry is not used. */
+ unsigned int nbits;
+ gcry_random_level_t randomlevel;
+};
+struct primepool_s *primepool;
+/* Mutex used to protect access to the primepool. */
+static ath_mutex_t primepool_lock = ATH_MUTEX_INITIALIZER;
+
+
+
+/* Save PRIME which has been generated at RANDOMLEVEL for later
+ use. Needs to be called while primepool_lock is being hold. Note
+ that PRIME should be considered released after calling this
+ function. */
+static void
+save_pool_prime (gcry_mpi_t prime, gcry_random_level_t randomlevel)
+{
+ struct primepool_s *item, *item2;
+ size_t n;
+
+ for (n=0, item = primepool; item; item = item->next, n++)
+ if (!item->prime)
+ break;
+ if (!item && n > 100)
+ {
+ /* Remove some of the entries. Our strategy is removing
+ the last third from the list. */
+ int i;
+
+ for (i=0, item2 = primepool; item2; item2 = item2->next)
+ {
+ if (i >= n/3*2)
+ {
+ gcry_mpi_release (item2->prime);
+ item2->prime = NULL;
+ if (!item)
+ item = item2;
+ }
+ }
+ }
+ if (!item)
+ {
+ item = gcry_calloc (1, sizeof *item);
+ if (!item)
+ {
+ /* Out of memory. Silently giving up. */
+ gcry_mpi_release (prime);
+ return;
+ }
+ item->next = primepool;
+ primepool = item;
+ }
+ item->prime = prime;
+ item->nbits = mpi_get_nbits (prime);
+ item->randomlevel = randomlevel;
+}
+
+
+/* Return a prime for the prime pool or NULL if none has been found.
+ The prime needs to match NBITS and randomlevel. This function needs
+ to be called why the primepool_look is being hold. */
+static gcry_mpi_t
+get_pool_prime (unsigned int nbits, gcry_random_level_t randomlevel)
+{
+ struct primepool_s *item;
+
+ for (item = primepool; item; item = item->next)
+ if (item->prime
+ && item->nbits == nbits && item->randomlevel == randomlevel)
+ {
+ gcry_mpi_t prime = item->prime;
+ item->prime = NULL;
+ gcry_assert (nbits == mpi_get_nbits (prime));
+ return prime;
+ }
+ return NULL;
+}
+
+
+
+
+
+
+void
+_gcry_register_primegen_progress ( void (*cb)(void *,const char*,int,int,int),
+ void *cb_data )
+{
+ progress_cb = cb;
+ progress_cb_data = cb_data;
+}
+
+
+static void
+progress( int c )
+{
+ if ( progress_cb )
+ progress_cb ( progress_cb_data, "primegen", c, 0, 0 );
+}
+
+
+/****************
+ * Generate a prime number (stored in secure memory)
+ */
+gcry_mpi_t
+_gcry_generate_secret_prime (unsigned int nbits,
+ gcry_random_level_t random_level,
+ int (*extra_check)(void*, gcry_mpi_t),
+ void *extra_check_arg)
+{
+ gcry_mpi_t prime;
+
+ prime = gen_prime (nbits, 1, random_level, extra_check, extra_check_arg);
+ progress('\n');
+ return prime;
+}
+
+
+/* Generate a prime number which may be public, i.e. not allocated in
+ secure memory. */
+gcry_mpi_t
+_gcry_generate_public_prime (unsigned int nbits,
+ gcry_random_level_t random_level,
+ int (*extra_check)(void*, gcry_mpi_t),
+ void *extra_check_arg)
+{
+ gcry_mpi_t prime;
+
+ prime = gen_prime (nbits, 0, random_level, extra_check, extra_check_arg);
+ progress('\n');
+ return prime;
+}
+
+
+/* Core prime generation function. The algorithm used to generate
+ practically save primes is due to Lim and Lee as described in the
+ CRYPTO '97 proceedings (ISBN3540633847) page 260.
+
+ NEED_Q_FACTOR: If true make sure that at least one factor is of
+ size qbits. This is for example required for DSA.
+ PRIME_GENERATED: Adresss of a variable where the resulting prime
+ number will be stored.
+ PBITS: Requested size of the prime number. At least 48.
+ QBITS: One factor of the prime needs to be of this size. Maybe 0
+ if this is not required. See also MODE.
+ G: If not NULL an MPI which will receive a generator for the prime
+ for use with Elgamal.
+ RET_FACTORS: if not NULL, an array with all factors are stored at
+ that address.
+ ALL_FACTORS: If set to true all factors of prime-1 are returned.
+ RANDOMLEVEL: How strong should the random numers be.
+ FLAGS: Prime generation bit flags. Currently supported:
+ GCRY_PRIME_FLAG_SECRET - The prime needs to be kept secret.
+ CB_FUNC, CB_ARG: Callback to be used for extra checks.
+
+ */
+static gcry_err_code_t
+prime_generate_internal (int need_q_factor,
+ gcry_mpi_t *prime_generated, unsigned int pbits,
+ unsigned int qbits, gcry_mpi_t g,
+ gcry_mpi_t **ret_factors,
+ gcry_random_level_t randomlevel, unsigned int flags,
+ int all_factors,
+ gcry_prime_check_func_t cb_func, void *cb_arg)
+{
+ gcry_err_code_t err = 0;
+ gcry_mpi_t *factors_new = NULL; /* Factors to return to the
+ caller. */
+ gcry_mpi_t *factors = NULL; /* Current factors. */
+ gcry_random_level_t poolrandomlevel; /* Random level used for pool primes. */
+ gcry_mpi_t *pool = NULL; /* Pool of primes. */
+ int *pool_in_use = NULL; /* Array with currently used POOL elements. */
+ unsigned char *perms = NULL; /* Permutations of POOL. */
+ gcry_mpi_t q_factor = NULL; /* Used if QBITS is non-zero. */
+ unsigned int fbits = 0; /* Length of prime factors. */
+ unsigned int n = 0; /* Number of factors. */
+ unsigned int m = 0; /* Number of primes in pool. */
+ gcry_mpi_t q = NULL; /* First prime factor. */
+ gcry_mpi_t prime = NULL; /* Prime candidate. */
+ unsigned int nprime = 0; /* Bits of PRIME. */
+ unsigned int req_qbits; /* The original QBITS value. */
+ gcry_mpi_t val_2; /* For check_prime(). */
+ int is_locked = 0; /* Flag to help unlocking the primepool. */
+ unsigned int is_secret = (flags & GCRY_PRIME_FLAG_SECRET);
+ unsigned int count1 = 0, count2 = 0;
+ unsigned int i = 0, j = 0;
+
+ if (pbits < 48)
+ return GPG_ERR_INV_ARG;
+
+ /* We won't use a too strong random elvel for the pooled subprimes. */
+ poolrandomlevel = (randomlevel > GCRY_STRONG_RANDOM?
+ GCRY_STRONG_RANDOM : randomlevel);
+
+
+ /* If QBITS is not given, assume a reasonable value. */
+ if (!qbits)
+ qbits = pbits / 3;
+
+ req_qbits = qbits;
+
+ /* Find number of needed prime factors N. */
+ for (n = 1; (pbits - qbits - 1) / n >= qbits; n++)
+ ;
+ n--;
+
+ val_2 = mpi_alloc_set_ui (2);
+
+ if ((! n) || ((need_q_factor) && (n < 2)))
+ {
+ err = GPG_ERR_INV_ARG;
+ goto leave;
+ }
+
+ if (need_q_factor)
+ {
+ n--; /* Need one factor less because we want a specific Q-FACTOR. */
+ fbits = (pbits - 2 * req_qbits -1) / n;
+ qbits = pbits - req_qbits - n * fbits;
+ }
+ else
+ {
+ fbits = (pbits - req_qbits -1) / n;
+ qbits = pbits - n * fbits;
+ }
+
+ if (DBG_CIPHER)
+ log_debug ("gen prime: pbits=%u qbits=%u fbits=%u/%u n=%d\n",
+ pbits, req_qbits, qbits, fbits, n);
+
+ /* Allocate an integer to old the new prime. */
+ prime = gcry_mpi_new (pbits);
+
+ /* Generate first prime factor. */
+ q = gen_prime (qbits, is_secret, randomlevel, NULL, NULL);
+
+ /* Generate a specific Q-Factor if requested. */
+ if (need_q_factor)
+ q_factor = gen_prime (req_qbits, is_secret, randomlevel, NULL, NULL);
+
+ /* Allocate an array to hold all factors + 2 for later usage. */
+ factors = gcry_calloc (n + 2, sizeof (*factors));
+ if (!factors)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ /* Allocate an array to track pool usage. */
+ pool_in_use = gcry_malloc (n * sizeof *pool_in_use);
+ if (!pool_in_use)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ for (i=0; i < n; i++)
+ pool_in_use[i] = -1;
+
+ /* Make a pool of 3n+5 primes (this is an arbitrary value). We
+ require at least 30 primes for are useful selection process.
+
+ Fixme: We need to research the best formula for sizing the pool.
+ */
+ m = n * 3 + 5;
+ if (need_q_factor) /* Need some more in this case. */
+ m += 5;
+ if (m < 30)
+ m = 30;
+ pool = gcry_calloc (m , sizeof (*pool));
+ if (! pool)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ /* Permutate over the pool of primes until we find a prime of the
+ requested length. */
+ do
+ {
+ next_try:
+ for (i=0; i < n; i++)
+ pool_in_use[i] = -1;
+
+ if (!perms)
+ {
+ /* Allocate new primes. This is done right at the beginning
+ of the loop and if we have later run out of primes. */
+ for (i = 0; i < m; i++)
+ {
+ mpi_free (pool[i]);
+ pool[i] = NULL;
+ }
+
+ /* Init m_out_of_n(). */
+ perms = gcry_calloc (1, m);
+ if (!perms)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ if (ath_mutex_lock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 1;
+ for (i = 0; i < n; i++)
+ {
+ perms[i] = 1;
+ /* At a maximum we use strong random for the factors.
+ This saves us a lot of entropy. Given that Q and
+ possible Q-factor are also used in the final prime
+ this should be acceptable. We also don't allocate in
+ secure memory to save on that scare resource too. If
+ Q has been allocated in secure memory, the final
+ prime will be saved there anyway. This is because
+ our MPI routines take care of that. GnuPG has worked
+ this way ever since. */
+ pool[i] = NULL;
+ if (is_locked)
+ {
+ pool[i] = get_pool_prime (fbits, poolrandomlevel);
+ if (!pool[i])
+ {
+ if (ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ }
+ }
+ if (!pool[i])
+ pool[i] = gen_prime (fbits, 0, poolrandomlevel, NULL, NULL);
+ pool_in_use[i] = i;
+ factors[i] = pool[i];
+ }
+ if (is_locked && ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ }
+ else
+ {
+ /* Get next permutation. */
+ m_out_of_n ( (char*)perms, n, m);
+ if (ath_mutex_lock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 1;
+ for (i = j = 0; (i < m) && (j < n); i++)
+ if (perms[i])
+ {
+ /* If the subprime has not yet beed generated do it now. */
+ if (!pool[i] && is_locked)
+ {
+ pool[i] = get_pool_prime (fbits, poolrandomlevel);
+ if (!pool[i])
+ {
+ if (ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ }
+ }
+ if (!pool[i])
+ pool[i] = gen_prime (fbits, 0, poolrandomlevel, NULL, NULL);
+ pool_in_use[j] = i;
+ factors[j++] = pool[i];
+ }
+ if (is_locked && ath_mutex_unlock (&primepool_lock))
+ {
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+ is_locked = 0;
+ if (i == n)
+ {
+ /* Ran out of permutations: Allocate new primes. */
+ gcry_free (perms);
+ perms = NULL;
+ progress ('!');
+ goto next_try;
+ }
+ }
+
+ /* Generate next prime candidate:
+ p = 2 * q [ * q_factor] * factor_0 * factor_1 * ... * factor_n + 1.
+ */
+ mpi_set (prime, q);
+ mpi_mul_ui (prime, prime, 2);
+ if (need_q_factor)
+ mpi_mul (prime, prime, q_factor);
+ for(i = 0; i < n; i++)
+ mpi_mul (prime, prime, factors[i]);
+ mpi_add_ui (prime, prime, 1);
+ nprime = mpi_get_nbits (prime);
+
+ if (nprime < pbits)
+ {
+ if (++count1 > 20)
+ {
+ count1 = 0;
+ qbits++;
+ progress('>');
+ mpi_free (q);
+ q = gen_prime (qbits, is_secret, randomlevel, NULL, NULL);
+ goto next_try;
+ }
+ }
+ else
+ count1 = 0;
+
+ if (nprime > pbits)
+ {
+ if (++count2 > 20)
+ {
+ count2 = 0;
+ qbits--;
+ progress('<');
+ mpi_free (q);
+ q = gen_prime (qbits, is_secret, randomlevel, NULL, NULL);
+ goto next_try;
+ }
+ }
+ else
+ count2 = 0;
+ }
+ while (! ((nprime == pbits) && check_prime (prime, val_2, 5,
+ cb_func, cb_arg)));
+
+ if (DBG_CIPHER)
+ {
+ progress ('\n');
+ log_mpidump ("prime : ", prime);
+ log_mpidump ("factor q: ", q);
+ if (need_q_factor)
+ log_mpidump ("factor q0: ", q_factor);
+ for (i = 0; i < n; i++)
+ log_mpidump ("factor pi: ", factors[i]);
+ log_debug ("bit sizes: prime=%u, q=%u",
+ mpi_get_nbits (prime), mpi_get_nbits (q));
+ if (need_q_factor)
+ log_debug (", q0=%u", mpi_get_nbits (q_factor));
+ for (i = 0; i < n; i++)
+ log_debug (", p%d=%u", i, mpi_get_nbits (factors[i]));
+ progress('\n');
+ }
+
+ if (ret_factors)
+ {
+ /* Caller wants the factors. */
+ factors_new = gcry_calloc (n + 4, sizeof (*factors_new));
+ if (! factors_new)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ if (all_factors)
+ {
+ i = 0;
+ factors_new[i++] = gcry_mpi_set_ui (NULL, 2);
+ factors_new[i++] = mpi_copy (q);
+ if (need_q_factor)
+ factors_new[i++] = mpi_copy (q_factor);
+ for(j=0; j < n; j++)
+ factors_new[i++] = mpi_copy (factors[j]);
+ }
+ else
+ {
+ i = 0;
+ if (need_q_factor)
+ {
+ factors_new[i++] = mpi_copy (q_factor);
+ for (; i <= n; i++)
+ factors_new[i] = mpi_copy (factors[i]);
+ }
+ else
+ for (; i < n; i++ )
+ factors_new[i] = mpi_copy (factors[i]);
+ }
+ }
+
+ if (g)
+ {
+ /* Create a generator (start with 3). */
+ gcry_mpi_t tmp = mpi_alloc (mpi_get_nlimbs (prime));
+ gcry_mpi_t b = mpi_alloc (mpi_get_nlimbs (prime));
+ gcry_mpi_t pmin1 = mpi_alloc (mpi_get_nlimbs (prime));
+
+ if (need_q_factor)
+ err = GPG_ERR_NOT_IMPLEMENTED;
+ else
+ {
+ factors[n] = q;
+ factors[n + 1] = mpi_alloc_set_ui (2);
+ mpi_sub_ui (pmin1, prime, 1);
+ mpi_set_ui (g, 2);
+ do
+ {
+ mpi_add_ui (g, g, 1);
+ if (DBG_CIPHER)
+ {
+ log_debug ("checking g:");
+ gcry_mpi_dump (g);
+ log_printf ("\n");
+ }
+ else
+ progress('^');
+ for (i = 0; i < n + 2; i++)
+ {
+ mpi_fdiv_q (tmp, pmin1, factors[i]);
+ /* No mpi_pow(), but it is okay to use this with mod
+ prime. */
+ gcry_mpi_powm (b, g, tmp, prime);
+ if (! mpi_cmp_ui (b, 1))
+ break;
+ }
+ if (DBG_CIPHER)
+ progress('\n');
+ }
+ while (i < n + 2);
+
+ mpi_free (factors[n+1]);
+ mpi_free (tmp);
+ mpi_free (b);
+ mpi_free (pmin1);
+ }
+ }
+
+ if (! DBG_CIPHER)
+ progress ('\n');
+
+
+ leave:
+ if (pool)
+ {
+ is_locked = !ath_mutex_lock (&primepool_lock);
+ for(i = 0; i < m; i++)
+ {
+ if (pool[i])
+ {
+ for (j=0; j < n; j++)
+ if (pool_in_use[j] == i)
+ break;
+ if (j == n && is_locked)
+ {
+ /* This pooled subprime has not been used. */
+ save_pool_prime (pool[i], poolrandomlevel);
+ }
+ else
+ mpi_free (pool[i]);
+ }
+ }
+ if (is_locked && ath_mutex_unlock (&primepool_lock))
+ err = GPG_ERR_INTERNAL;
+ is_locked = 0;
+ gcry_free (pool);
+ }
+ gcry_free (pool_in_use);
+ if (factors)
+ gcry_free (factors); /* Factors are shallow copies. */
+ if (perms)
+ gcry_free (perms);
+
+ mpi_free (val_2);
+ mpi_free (q);
+ mpi_free (q_factor);
+
+ if (! err)
+ {
+ *prime_generated = prime;
+ if (ret_factors)
+ *ret_factors = factors_new;
+ }
+ else
+ {
+ if (factors_new)
+ {
+ for (i = 0; factors_new[i]; i++)
+ mpi_free (factors_new[i]);
+ gcry_free (factors_new);
+ }
+ mpi_free (prime);
+ }
+
+ return err;
+}
+
+
+/* Generate a prime used for discrete logarithm algorithms; i.e. this
+ prime will be public and no strong random is required. */
+gcry_mpi_t
+_gcry_generate_elg_prime (int mode, unsigned pbits, unsigned qbits,
+ gcry_mpi_t g, gcry_mpi_t **ret_factors)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_mpi_t prime = NULL;
+
+ err = prime_generate_internal ((mode == 1), &prime, pbits, qbits, g,
+ ret_factors, GCRY_WEAK_RANDOM, 0, 0,
+ NULL, NULL);
+
+ return prime;
+}
+
+
+static gcry_mpi_t
+gen_prime (unsigned int nbits, int secret, int randomlevel,
+ int (*extra_check)(void *, gcry_mpi_t), void *extra_check_arg)
+{
+ gcry_mpi_t prime, ptest, pminus1, val_2, val_3, result;
+ int i;
+ unsigned int x, step;
+ unsigned int count1, count2;
+ int *mods;
+
+/* if ( DBG_CIPHER ) */
+/* log_debug ("generate a prime of %u bits ", nbits ); */
+
+ if (nbits < 16)
+ log_fatal ("can't generate a prime with less than %d bits\n", 16);
+
+ mods = gcry_xmalloc( no_of_small_prime_numbers * sizeof *mods );
+ /* Make nbits fit into gcry_mpi_t implementation. */
+ val_2 = mpi_alloc_set_ui( 2 );
+ val_3 = mpi_alloc_set_ui( 3);
+ prime = secret? gcry_mpi_snew ( nbits ): gcry_mpi_new ( nbits );
+ result = mpi_alloc_like( prime );
+ pminus1= mpi_alloc_like( prime );
+ ptest = mpi_alloc_like( prime );
+ count1 = count2 = 0;
+ for (;;)
+ { /* try forvever */
+ int dotcount=0;
+
+ /* generate a random number */
+ gcry_mpi_randomize( prime, nbits, randomlevel );
+
+ /* Set high order bit to 1, set low order bit to 1. If we are
+ generating a secret prime we are most probably doing that
+ for RSA, to make sure that the modulus does have the
+ requested key size we set the 2 high order bits. */
+ mpi_set_highbit (prime, nbits-1);
+ if (secret)
+ mpi_set_bit (prime, nbits-2);
+ mpi_set_bit(prime, 0);
+
+ /* Calculate all remainders. */
+ for (i=0; (x = small_prime_numbers[i]); i++ )
+ mods[i] = mpi_fdiv_r_ui(NULL, prime, x);
+
+ /* Now try some primes starting with prime. */
+ for(step=0; step < 20000; step += 2 )
+ {
+ /* Check against all the small primes we have in mods. */
+ count1++;
+ for (i=0; (x = small_prime_numbers[i]); i++ )
+ {
+ while ( mods[i] + step >= x )
+ mods[i] -= x;
+ if ( !(mods[i] + step) )
+ break;
+ }
+ if ( x )
+ continue; /* Found a multiple of an already known prime. */
+
+ mpi_add_ui( ptest, prime, step );
+
+ /* Do a fast Fermat test now. */
+ count2++;
+ mpi_sub_ui( pminus1, ptest, 1);
+ gcry_mpi_powm( result, val_2, pminus1, ptest );
+ if ( !mpi_cmp_ui( result, 1 ) )
+ {
+ /* Not composite, perform stronger tests */
+ if (is_prime(ptest, 5, &count2 ))
+ {
+ if (!mpi_test_bit( ptest, nbits-1-secret ))
+ {
+ progress('\n');
+ log_debug ("overflow in prime generation\n");
+ break; /* Stop loop, continue with a new prime. */
+ }
+
+ if (extra_check && extra_check (extra_check_arg, ptest))
+ {
+ /* The extra check told us that this prime is
+ not of the caller's taste. */
+ progress ('/');
+ }
+ else
+ {
+ /* Got it. */
+ mpi_free(val_2);
+ mpi_free(val_3);
+ mpi_free(result);
+ mpi_free(pminus1);
+ mpi_free(prime);
+ gcry_free(mods);
+ return ptest;
+ }
+ }
+ }
+ if (++dotcount == 10 )
+ {
+ progress('.');
+ dotcount = 0;
+ }
+ }
+ progress(':'); /* restart with a new random value */
+ }
+}
+
+/****************
+ * Returns: true if this may be a prime
+ * RM_ROUNDS gives the number of Rabin-Miller tests to run.
+ */
+static int
+check_prime( gcry_mpi_t prime, gcry_mpi_t val_2, int rm_rounds,
+ gcry_prime_check_func_t cb_func, void *cb_arg)
+{
+ int i;
+ unsigned int x;
+ unsigned int count=0;
+
+ /* Check against small primes. */
+ for (i=0; (x = small_prime_numbers[i]); i++ )
+ {
+ if ( mpi_divisible_ui( prime, x ) )
+ return 0;
+ }
+
+ /* A quick Fermat test. */
+ {
+ gcry_mpi_t result = mpi_alloc_like( prime );
+ gcry_mpi_t pminus1 = mpi_alloc_like( prime );
+ mpi_sub_ui( pminus1, prime, 1);
+ gcry_mpi_powm( result, val_2, pminus1, prime );
+ mpi_free( pminus1 );
+ if ( mpi_cmp_ui( result, 1 ) )
+ {
+ /* Is composite. */
+ mpi_free( result );
+ progress('.');
+ return 0;
+ }
+ mpi_free( result );
+ }
+
+ if (!cb_func || cb_func (cb_arg, GCRY_PRIME_CHECK_AT_MAYBE_PRIME, prime))
+ {
+ /* Perform stronger tests. */
+ if ( is_prime( prime, rm_rounds, &count ) )
+ {
+ if (!cb_func
+ || cb_func (cb_arg, GCRY_PRIME_CHECK_AT_GOT_PRIME, prime))
+ return 1; /* Probably a prime. */
+ }
+ }
+ progress('.');
+ return 0;
+}
+
+
+/*
+ * Return true if n is probably a prime
+ */
+static int
+is_prime (gcry_mpi_t n, int steps, unsigned int *count)
+{
+ gcry_mpi_t x = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t y = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t z = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t nminus1 = mpi_alloc( mpi_get_nlimbs( n ) );
+ gcry_mpi_t a2 = mpi_alloc_set_ui( 2 );
+ gcry_mpi_t q;
+ unsigned i, j, k;
+ int rc = 0;
+ unsigned nbits = mpi_get_nbits( n );
+
+ if (steps < 5) /* Make sure that we do at least 5 rounds. */
+ steps = 5;
+
+ mpi_sub_ui( nminus1, n, 1 );
+
+ /* Find q and k, so that n = 1 + 2^k * q . */
+ q = mpi_copy ( nminus1 );
+ k = mpi_trailing_zeros ( q );
+ mpi_tdiv_q_2exp (q, q, k);
+
+ for (i=0 ; i < steps; i++ )
+ {
+ ++*count;
+ if( !i )
+ {
+ mpi_set_ui( x, 2 );
+ }
+ else
+ {
+ gcry_mpi_randomize( x, nbits, GCRY_WEAK_RANDOM );
+
+ /* Make sure that the number is smaller than the prime and
+ keep the randomness of the high bit. */
+ if ( mpi_test_bit ( x, nbits-2) )
+ {
+ mpi_set_highbit ( x, nbits-2); /* Clear all higher bits. */
+ }
+ else
+ {
+ mpi_set_highbit( x, nbits-2 );
+ mpi_clear_bit( x, nbits-2 );
+ }
+ gcry_assert (mpi_cmp (x, nminus1) < 0 && mpi_cmp_ui (x, 1) > 0);
+ }
+ gcry_mpi_powm ( y, x, q, n);
+ if ( mpi_cmp_ui(y, 1) && mpi_cmp( y, nminus1 ) )
+ {
+ for ( j=1; j < k && mpi_cmp( y, nminus1 ); j++ )
+ {
+ gcry_mpi_powm(y, y, a2, n);
+ if( !mpi_cmp_ui( y, 1 ) )
+ goto leave; /* Not a prime. */
+ }
+ if (mpi_cmp( y, nminus1 ) )
+ goto leave; /* Not a prime. */
+ }
+ progress('+');
+ }
+ rc = 1; /* May be a prime. */
+
+ leave:
+ mpi_free( x );
+ mpi_free( y );
+ mpi_free( z );
+ mpi_free( nminus1 );
+ mpi_free( q );
+ mpi_free( a2 );
+
+ return rc;
+}
+
+
+/* Given ARRAY of size N with M elements set to true produce a
+ modified array with the next permutation of M elements. Note, that
+ ARRAY is used in a one-bit-per-byte approach. To detected the last
+ permutation it is useful to intialize the array with the first M
+ element set to true and use this test:
+ m_out_of_n (array, m, n);
+ for (i = j = 0; i < n && j < m; i++)
+ if (array[i])
+ j++;
+ if (j == m)
+ goto ready;
+
+ This code is based on the algorithm 452 from the "Collected
+ Algorithms From ACM, Volume II" by C. N. Liu and D. T. Tang.
+*/
+static void
+m_out_of_n ( char *array, int m, int n )
+{
+ int i=0, i1=0, j=0, jp=0, j1=0, k1=0, k2=0;
+
+ if( !m || m >= n )
+ return;
+
+ /* Need to handle this simple case separately. */
+ if( m == 1 )
+ {
+ for (i=0; i < n; i++ )
+ {
+ if ( array[i] )
+ {
+ array[i++] = 0;
+ if( i >= n )
+ i = 0;
+ array[i] = 1;
+ return;
+ }
+ }
+ BUG();
+ }
+
+
+ for (j=1; j < n; j++ )
+ {
+ if ( array[n-1] == array[n-j-1])
+ continue;
+ j1 = j;
+ break;
+ }
+
+ if ( (m & 1) )
+ {
+ /* M is odd. */
+ if( array[n-1] )
+ {
+ if( j1 & 1 )
+ {
+ k1 = n - j1;
+ k2 = k1+2;
+ if( k2 > n )
+ k2 = n;
+ goto leave;
+ }
+ goto scan;
+ }
+ k2 = n - j1 - 1;
+ if( k2 == 0 )
+ {
+ k1 = i;
+ k2 = n - j1;
+ }
+ else if( array[k2] && array[k2-1] )
+ k1 = n;
+ else
+ k1 = k2 + 1;
+ }
+ else
+ {
+ /* M is even. */
+ if( !array[n-1] )
+ {
+ k1 = n - j1;
+ k2 = k1 + 1;
+ goto leave;
+ }
+
+ if( !(j1 & 1) )
+ {
+ k1 = n - j1;
+ k2 = k1+2;
+ if( k2 > n )
+ k2 = n;
+ goto leave;
+ }
+ scan:
+ jp = n - j1 - 1;
+ for (i=1; i <= jp; i++ )
+ {
+ i1 = jp + 2 - i;
+ if( array[i1-1] )
+ {
+ if( array[i1-2] )
+ {
+ k1 = i1 - 1;
+ k2 = n - j1;
+ }
+ else
+ {
+ k1 = i1 - 1;
+ k2 = n + 1 - j1;
+ }
+ goto leave;
+ }
+ }
+ k1 = 1;
+ k2 = n + 1 - m;
+ }
+ leave:
+ /* Now complement the two selected bits. */
+ array[k1-1] = !array[k1-1];
+ array[k2-1] = !array[k2-1];
+}
+
+
+/* Generate a new prime number of PRIME_BITS bits and store it in
+ PRIME. If FACTOR_BITS is non-zero, one of the prime factors of
+ (prime - 1) / 2 must be FACTOR_BITS bits long. If FACTORS is
+ non-zero, allocate a new, NULL-terminated array holding the prime
+ factors and store it in FACTORS. FLAGS might be used to influence
+ the prime number generation process. */
+gcry_error_t
+gcry_prime_generate (gcry_mpi_t *prime, unsigned int prime_bits,
+ unsigned int factor_bits, gcry_mpi_t **factors,
+ gcry_prime_check_func_t cb_func, void *cb_arg,
+ gcry_random_level_t random_level,
+ unsigned int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_mpi_t *factors_generated = NULL;
+ gcry_mpi_t prime_generated = NULL;
+ unsigned int mode = 0;
+
+ if (!prime)
+ return gpg_error (GPG_ERR_INV_ARG);
+ *prime = NULL;
+
+ if (flags & GCRY_PRIME_FLAG_SPECIAL_FACTOR)
+ mode = 1;
+
+ /* Generate. */
+ err = prime_generate_internal ((mode==1), &prime_generated, prime_bits,
+ factor_bits, NULL,
+ factors? &factors_generated : NULL,
+ random_level, flags, 1,
+ cb_func, cb_arg);
+
+ if (! err)
+ if (cb_func)
+ {
+ /* Additional check. */
+ if ( !cb_func (cb_arg, GCRY_PRIME_CHECK_AT_FINISH, prime_generated))
+ {
+ /* Failed, deallocate resources. */
+ unsigned int i;
+
+ mpi_free (prime_generated);
+ if (factors)
+ {
+ for (i = 0; factors_generated[i]; i++)
+ mpi_free (factors_generated[i]);
+ gcry_free (factors_generated);
+ }
+ err = GPG_ERR_GENERAL;
+ }
+ }
+
+ if (! err)
+ {
+ if (factors)
+ *factors = factors_generated;
+ *prime = prime_generated;
+ }
+
+ return gcry_error (err);
+}
+
+/* Check wether the number X is prime. */
+gcry_error_t
+gcry_prime_check (gcry_mpi_t x, unsigned int flags)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_mpi_t val_2 = mpi_alloc_set_ui (2); /* Used by the Fermat test. */
+
+ (void)flags;
+
+ /* We use 64 rounds because the prime we are going to test is not
+ guaranteed to be a random one. */
+ if (! check_prime (x, val_2, 64, NULL, NULL))
+ err = GPG_ERR_NO_PRIME;
+
+ mpi_free (val_2);
+
+ return gcry_error (err);
+}
+
+/* Find a generator for PRIME where the factorization of (prime-1) is
+ in the NULL terminated array FACTORS. Return the generator as a
+ newly allocated MPI in R_G. If START_G is not NULL, use this as s
+ atart for the search. Returns 0 on success.*/
+gcry_error_t
+gcry_prime_group_generator (gcry_mpi_t *r_g,
+ gcry_mpi_t prime, gcry_mpi_t *factors,
+ gcry_mpi_t start_g)
+{
+ gcry_mpi_t tmp = gcry_mpi_new (0);
+ gcry_mpi_t b = gcry_mpi_new (0);
+ gcry_mpi_t pmin1 = gcry_mpi_new (0);
+ gcry_mpi_t g = start_g? gcry_mpi_copy (start_g) : gcry_mpi_set_ui (NULL, 3);
+ int first = 1;
+ int i, n;
+
+ if (!factors || !r_g || !prime)
+ return gpg_error (GPG_ERR_INV_ARG);
+ *r_g = NULL;
+
+ for (n=0; factors[n]; n++)
+ ;
+ if (n < 2)
+ return gpg_error (GPG_ERR_INV_ARG);
+
+ /* Extra sanity check - usually disabled. */
+/* mpi_set (tmp, factors[0]); */
+/* for(i = 1; i < n; i++) */
+/* mpi_mul (tmp, tmp, factors[i]); */
+/* mpi_add_ui (tmp, tmp, 1); */
+/* if (mpi_cmp (prime, tmp)) */
+/* return gpg_error (GPG_ERR_INV_ARG); */
+
+ gcry_mpi_sub_ui (pmin1, prime, 1);
+ do
+ {
+ if (first)
+ first = 0;
+ else
+ gcry_mpi_add_ui (g, g, 1);
+
+ if (DBG_CIPHER)
+ {
+ log_debug ("checking g:");
+ gcry_mpi_dump (g);
+ log_debug ("\n");
+ }
+ else
+ progress('^');
+
+ for (i = 0; i < n; i++)
+ {
+ mpi_fdiv_q (tmp, pmin1, factors[i]);
+ gcry_mpi_powm (b, g, tmp, prime);
+ if (! mpi_cmp_ui (b, 1))
+ break;
+ }
+ if (DBG_CIPHER)
+ progress('\n');
+ }
+ while (i < n);
+
+ gcry_mpi_release (tmp);
+ gcry_mpi_release (b);
+ gcry_mpi_release (pmin1);
+ *r_g = g;
+
+ return 0;
+}
+
+/* Convenience function to release the factors array. */
+void
+gcry_prime_release_factors (gcry_mpi_t *factors)
+{
+ if (factors)
+ {
+ int i;
+
+ for (i=0; factors[i]; i++)
+ mpi_free (factors[i]);
+ gcry_free (factors);
+ }
+}
+
+
+
+/* Helper for _gcry_derive_x931_prime. */
+static gcry_mpi_t
+find_x931_prime (const gcry_mpi_t pfirst)
+{
+ gcry_mpi_t val_2 = mpi_alloc_set_ui (2);
+ gcry_mpi_t prime;
+
+ prime = gcry_mpi_copy (pfirst);
+ /* If P is even add 1. */
+ mpi_set_bit (prime, 0);
+
+ /* We use 64 Rabin-Miller rounds which is better and thus
+ sufficient. We do not have a Lucas test implementaion thus we
+ can't do it in the X9.31 preferred way of running a few
+ Rabin-Miller followed by one Lucas test. */
+ while ( !check_prime (prime, val_2, 64, NULL, NULL) )
+ mpi_add_ui (prime, prime, 2);
+
+ mpi_free (val_2);
+
+ return prime;
+}
+
+
+/* Generate a prime using the algorithm from X9.31 appendix B.4.
+
+ This function requires that the provided public exponent E is odd.
+ XP, XP1 and XP2 are the seed values. All values are mandatory.
+
+ On success the prime is returned. If R_P1 or R_P2 are given the
+ internal values P1 and P2 are saved at these addresses. On error
+ NULL is returned. */
+gcry_mpi_t
+_gcry_derive_x931_prime (const gcry_mpi_t xp,
+ const gcry_mpi_t xp1, const gcry_mpi_t xp2,
+ const gcry_mpi_t e,
+ gcry_mpi_t *r_p1, gcry_mpi_t *r_p2)
+{
+ gcry_mpi_t p1, p2, p1p2, yp0;
+
+ if (!xp || !xp1 || !xp2)
+ return NULL;
+ if (!e || !mpi_test_bit (e, 0))
+ return NULL; /* We support only odd values for E. */
+
+ p1 = find_x931_prime (xp1);
+ p2 = find_x931_prime (xp2);
+ p1p2 = mpi_alloc_like (xp);
+ mpi_mul (p1p2, p1, p2);
+
+ {
+ gcry_mpi_t r1, tmp;
+
+ /* r1 = (p2^{-1} mod p1)p2 - (p1^{-1} mod p2) */
+ tmp = mpi_alloc_like (p1);
+ mpi_invm (tmp, p2, p1);
+ mpi_mul (tmp, tmp, p2);
+ r1 = tmp;
+
+ tmp = mpi_alloc_like (p2);
+ mpi_invm (tmp, p1, p2);
+ mpi_mul (tmp, tmp, p1);
+ mpi_sub (r1, r1, tmp);
+
+ /* Fixup a negative value. */
+ if (mpi_is_neg (r1))
+ mpi_add (r1, r1, p1p2);
+
+ /* yp0 = xp + (r1 - xp mod p1*p2) */
+ yp0 = tmp; tmp = NULL;
+ mpi_subm (yp0, r1, xp, p1p2);
+ mpi_add (yp0, yp0, xp);
+ mpi_free (r1);
+
+ /* Fixup a negative value. */
+ if (mpi_cmp (yp0, xp) < 0 )
+ mpi_add (yp0, yp0, p1p2);
+ }
+
+ /* yp0 is now the first integer greater than xp with p1 being a
+ large prime factor of yp0-1 and p2 a large prime factor of yp0+1. */
+
+ /* Note that the first example from X9.31 (D.1.1) which uses
+ (Xq1 #1A5CF72EE770DE50CB09ACCEA9#)
+ (Xq2 #134E4CAA16D2350A21D775C404#)
+ (Xq #CC1092495D867E64065DEE3E7955F2EBC7D47A2D
+ 7C9953388F97DDDC3E1CA19C35CA659EDC2FC325
+ 6D29C2627479C086A699A49C4C9CEE7EF7BD1B34
+ 321DE34A#))))
+ returns an yp0 of
+ #CC1092495D867E64065DEE3E7955F2EBC7D47A2D
+ 7C9953388F97DDDC3E1CA19C35CA659EDC2FC4E3
+ BF20CB896EE37E098A906313271422162CB6C642
+ 75C1201F#
+ and not
+ #CC1092495D867E64065DEE3E7955F2EBC7D47A2D
+ 7C9953388F97DDDC3E1CA19C35CA659EDC2FC2E6
+ C88FE299D52D78BE405A97E01FD71DD7819ECB91
+ FA85A076#
+ as stated in the standard. This seems to be a bug in X9.31.
+ */
+
+ {
+ gcry_mpi_t val_2 = mpi_alloc_set_ui (2);
+ gcry_mpi_t gcdtmp = mpi_alloc_like (yp0);
+ int gcdres;
+
+ mpi_sub_ui (p1p2, p1p2, 1); /* Adjust for loop body. */
+ mpi_sub_ui (yp0, yp0, 1); /* Ditto. */
+ for (;;)
+ {
+ gcdres = gcry_mpi_gcd (gcdtmp, e, yp0);
+ mpi_add_ui (yp0, yp0, 1);
+ if (!gcdres)
+ progress ('/'); /* gcd (e, yp0-1) != 1 */
+ else if (check_prime (yp0, val_2, 64, NULL, NULL))
+ break; /* Found. */
+ /* We add p1p2-1 because yp0 is incremented after the gcd test. */
+ mpi_add (yp0, yp0, p1p2);
+ }
+ mpi_free (gcdtmp);
+ mpi_free (val_2);
+ }
+
+ mpi_free (p1p2);
+
+ progress('\n');
+ if (r_p1)
+ *r_p1 = p1;
+ else
+ mpi_free (p1);
+ if (r_p2)
+ *r_p2 = p2;
+ else
+ mpi_free (p2);
+ return yp0;
+}
+
+
+
+/* Generate the two prime used for DSA using the algorithm specified
+ in FIPS 186-2. PBITS is the desired length of the prime P and a
+ QBITS the length of the prime Q. If SEED is not supplied and
+ SEEDLEN is 0 the function generates an appropriate SEED. On
+ success the generated primes are stored at R_Q and R_P, the counter
+ value is stored at R_COUNTER and the seed actually used for
+ generation is stored at R_SEED and R_SEEDVALUE. */
+gpg_err_code_t
+_gcry_generate_fips186_2_prime (unsigned int pbits, unsigned int qbits,
+ const void *seed, size_t seedlen,
+ gcry_mpi_t *r_q, gcry_mpi_t *r_p,
+ int *r_counter,
+ void **r_seed, size_t *r_seedlen)
+{
+ gpg_err_code_t ec;
+ unsigned char seed_help_buffer[160/8]; /* Used to hold a generated SEED. */
+ unsigned char *seed_plus; /* Malloced buffer to hold SEED+x. */
+ unsigned char digest[160/8]; /* Helper buffer for SHA-1 digest. */
+ gcry_mpi_t val_2 = NULL; /* Helper for the prime test. */
+ gcry_mpi_t tmpval = NULL; /* Helper variable. */
+ int i;
+
+ unsigned char value_u[160/8];
+ int value_n, value_b, value_k;
+ int counter;
+ gcry_mpi_t value_w = NULL;
+ gcry_mpi_t value_x = NULL;
+ gcry_mpi_t prime_q = NULL;
+ gcry_mpi_t prime_p = NULL;
+
+ /* FIPS 186-2 allows only for 1024/160 bit. */
+ if (pbits != 1024 || qbits != 160)
+ return GPG_ERR_INV_KEYLEN;
+
+ if (!seed && !seedlen)
+ ; /* No seed value given: We are asked to generate it. */
+ else if (!seed || seedlen < qbits/8)
+ return GPG_ERR_INV_ARG;
+
+ /* Allocate a buffer to later compute SEED+some_increment. */
+ seed_plus = gcry_malloc (seedlen < 20? 20:seedlen);
+ if (!seed_plus)
+ {
+ ec = gpg_err_code_from_syserror ();
+ goto leave;
+ }
+
+ val_2 = mpi_alloc_set_ui (2);
+ value_n = (pbits - 1) / qbits;
+ value_b = (pbits - 1) - value_n * qbits;
+ value_w = gcry_mpi_new (pbits);
+ value_x = gcry_mpi_new (pbits);
+
+ restart:
+ /* Generate Q. */
+ for (;;)
+ {
+ /* Step 1: Generate a (new) seed unless one has been supplied. */
+ if (!seed)
+ {
+ seedlen = sizeof seed_help_buffer;
+ gcry_create_nonce (seed_help_buffer, seedlen);
+ seed = seed_help_buffer;
+ }
+
+ /* Step 2: U = sha1(seed) ^ sha1((seed+1) mod 2^{qbits}) */
+ memcpy (seed_plus, seed, seedlen);
+ for (i=seedlen-1; i >= 0; i--)
+ {
+ seed_plus[i]++;
+ if (seed_plus[i])
+ break;
+ }
+ gcry_md_hash_buffer (GCRY_MD_SHA1, value_u, seed, seedlen);
+ gcry_md_hash_buffer (GCRY_MD_SHA1, digest, seed_plus, seedlen);
+ for (i=0; i < sizeof value_u; i++)
+ value_u[i] ^= digest[i];
+
+ /* Step 3: Form q from U */
+ gcry_mpi_release (prime_q); prime_q = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&prime_q, GCRYMPI_FMT_USG,
+ value_u, sizeof value_u, NULL));
+ if (ec)
+ goto leave;
+ mpi_set_highbit (prime_q, qbits-1 );
+ mpi_set_bit (prime_q, 0);
+
+ /* Step 4: Test whether Q is prime using 64 round of Rabin-Miller. */
+ if (check_prime (prime_q, val_2, 64, NULL, NULL))
+ break; /* Yes, Q is prime. */
+
+ /* Step 5. */
+ seed = NULL; /* Force a new seed at Step 1. */
+ }
+
+ /* Step 6. Note that we do no use an explicit offset but increment
+ SEED_PLUS accordingly. SEED_PLUS is currently SEED+1. */
+ counter = 0;
+
+ /* Generate P. */
+ prime_p = gcry_mpi_new (pbits);
+ for (;;)
+ {
+ /* Step 7: For k = 0,...n let
+ V_k = sha1(seed+offset+k) mod 2^{qbits}
+ Step 8: W = V_0 + V_1*2^160 +
+ ...
+ + V_{n-1}*2^{(n-1)*160}
+ + (V_{n} mod 2^b)*2^{n*160}
+ */
+ mpi_set_ui (value_w, 0);
+ for (value_k=0; value_k <= value_n; value_k++)
+ {
+ /* There is no need to have an explicit offset variable: In
+ the first round we shall have an offset of 2, this is
+ achieved by using SEED_PLUS which is already at SEED+1,
+ thus we just need to increment it once again. The
+ requirement for the next round is to update offset by N,
+ which we implictly did at the end of this loop, and then
+ to add one; this one is the same as in the first round. */
+ for (i=seedlen-1; i >= 0; i--)
+ {
+ seed_plus[i]++;
+ if (seed_plus[i])
+ break;
+ }
+ gcry_md_hash_buffer (GCRY_MD_SHA1, digest, seed_plus, seedlen);
+
+ gcry_mpi_release (tmpval); tmpval = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&tmpval, GCRYMPI_FMT_USG,
+ digest, sizeof digest, NULL));
+ if (ec)
+ goto leave;
+ if (value_k == value_n)
+ mpi_clear_highbit (tmpval, value_b); /* (V_n mod 2^b) */
+ mpi_lshift (tmpval, tmpval, value_k*qbits);
+ mpi_add (value_w, value_w, tmpval);
+ }
+
+ /* Step 8 continued: X = W + 2^{L-1} */
+ mpi_set_ui (value_x, 0);
+ mpi_set_highbit (value_x, pbits-1);
+ mpi_add (value_x, value_x, value_w);
+
+ /* Step 9: c = X mod 2q, p = X - (c - 1) */
+ mpi_mul_2exp (tmpval, prime_q, 1);
+ mpi_mod (tmpval, value_x, tmpval);
+ mpi_sub_ui (tmpval, tmpval, 1);
+ mpi_sub (prime_p, value_x, tmpval);
+
+ /* Step 10: If p < 2^{L-1} skip the primality test. */
+ /* Step 11 and 12: Primality test. */
+ if (mpi_get_nbits (prime_p) >= pbits-1
+ && check_prime (prime_p, val_2, 64, NULL, NULL) )
+ break; /* Yes, P is prime, continue with Step 15. */
+
+ /* Step 13: counter = counter + 1, offset = offset + n + 1. */
+ counter++;
+
+ /* Step 14: If counter >= 2^12 goto Step 1. */
+ if (counter >= 4096)
+ goto restart;
+ }
+
+ /* Step 15: Save p, q, counter and seed. */
+/* log_debug ("fips186-2 pbits p=%u q=%u counter=%d\n", */
+/* mpi_get_nbits (prime_p), mpi_get_nbits (prime_q), counter); */
+/* log_printhex("fips186-2 seed:", seed, seedlen); */
+/* log_mpidump ("fips186-2 prime p", prime_p); */
+/* log_mpidump ("fips186-2 prime q", prime_q); */
+ if (r_q)
+ {
+ *r_q = prime_q;
+ prime_q = NULL;
+ }
+ if (r_p)
+ {
+ *r_p = prime_p;
+ prime_p = NULL;
+ }
+ if (r_counter)
+ *r_counter = counter;
+ if (r_seed && r_seedlen)
+ {
+ memcpy (seed_plus, seed, seedlen);
+ *r_seed = seed_plus;
+ seed_plus = NULL;
+ *r_seedlen = seedlen;
+ }
+
+
+ leave:
+ gcry_mpi_release (tmpval);
+ gcry_mpi_release (value_x);
+ gcry_mpi_release (value_w);
+ gcry_mpi_release (prime_p);
+ gcry_mpi_release (prime_q);
+ gcry_free (seed_plus);
+ gcry_mpi_release (val_2);
+ return ec;
+}
+
+
+
+/* WARNING: The code below has not yet been tested! However, it is
+ not yet used. We need to wait for FIPS 186-3 final and for test
+ vectors.
+
+ Generate the two prime used for DSA using the algorithm specified
+ in FIPS 186-3, A.1.1.2. PBITS is the desired length of the prime P
+ and a QBITS the length of the prime Q. If SEED is not supplied and
+ SEEDLEN is 0 the function generates an appropriate SEED. On
+ success the generated primes are stored at R_Q and R_P, the counter
+ value is stored at R_COUNTER and the seed actually used for
+ generation is stored at R_SEED and R_SEEDVALUE. The hash algorithm
+ used is stored at R_HASHALGO.
+
+ Note that this function is very similar to the fips186_2 code. Due
+ to the minor differences, other buffer sizes and for documentarion,
+ we use a separate function.
+*/
+gpg_err_code_t
+_gcry_generate_fips186_3_prime (unsigned int pbits, unsigned int qbits,
+ const void *seed, size_t seedlen,
+ gcry_mpi_t *r_q, gcry_mpi_t *r_p,
+ int *r_counter,
+ void **r_seed, size_t *r_seedlen,
+ int *r_hashalgo)
+{
+ gpg_err_code_t ec;
+ unsigned char seed_help_buffer[256/8]; /* Used to hold a generated SEED. */
+ unsigned char *seed_plus; /* Malloced buffer to hold SEED+x. */
+ unsigned char digest[256/8]; /* Helper buffer for SHA-1 digest. */
+ gcry_mpi_t val_2 = NULL; /* Helper for the prime test. */
+ gcry_mpi_t tmpval = NULL; /* Helper variable. */
+ int hashalgo; /* The id of the Approved Hash Function. */
+ int i;
+
+ unsigned char value_u[256/8];
+ int value_n, value_b, value_j;
+ int counter;
+ gcry_mpi_t value_w = NULL;
+ gcry_mpi_t value_x = NULL;
+ gcry_mpi_t prime_q = NULL;
+ gcry_mpi_t prime_p = NULL;
+
+ gcry_assert (sizeof seed_help_buffer == sizeof digest
+ && sizeof seed_help_buffer == sizeof value_u);
+
+ /* Step 1: Check the requested prime lengths. */
+ /* Note that due to the size of our buffers QBITS is limited to 256. */
+ if (pbits == 1024 && qbits == 160)
+ hashalgo = GCRY_MD_SHA1;
+ else if (pbits == 2048 && qbits == 224)
+ hashalgo = GCRY_MD_SHA224;
+ else if (pbits == 2048 && qbits == 256)
+ hashalgo = GCRY_MD_SHA256;
+ else if (pbits == 3072 && qbits == 256)
+ hashalgo = GCRY_MD_SHA256;
+ else
+ return GPG_ERR_INV_KEYLEN;
+
+ /* Also check that the hash algorithm is available. */
+ ec = gpg_err_code (gcry_md_test_algo (hashalgo));
+ if (ec)
+ return ec;
+ gcry_assert (qbits/8 <= sizeof digest);
+ gcry_assert (gcry_md_get_algo_dlen (hashalgo) == qbits/8);
+
+
+ /* Step 2: Check seedlen. */
+ if (!seed && !seedlen)
+ ; /* No seed value given: We are asked to generate it. */
+ else if (!seed || seedlen < qbits/8)
+ return GPG_ERR_INV_ARG;
+
+ /* Allocate a buffer to later compute SEED+some_increment and a few
+ helper variables. */
+ seed_plus = gcry_malloc (seedlen < sizeof seed_help_buffer?
+ sizeof seed_help_buffer : seedlen);
+ if (!seed_plus)
+ {
+ ec = gpg_err_code_from_syserror ();
+ goto leave;
+ }
+ val_2 = mpi_alloc_set_ui (2);
+ value_w = gcry_mpi_new (pbits);
+ value_x = gcry_mpi_new (pbits);
+
+ /* Step 3: n = \lceil L / outlen \rceil - 1 */
+ value_n = (pbits + qbits - 1) / qbits - 1;
+ /* Step 4: b = L - 1 - (n * outlen) */
+ value_b = pbits - 1 - (value_n * qbits);
+
+ restart:
+ /* Generate Q. */
+ for (;;)
+ {
+ /* Step 5: Generate a (new) seed unless one has been supplied. */
+ if (!seed)
+ {
+ seedlen = qbits/8;
+ gcry_assert (seedlen <= sizeof seed_help_buffer);
+ gcry_create_nonce (seed_help_buffer, seedlen);
+ seed = seed_help_buffer;
+ }
+
+ /* Step 6: U = hash(seed) */
+ gcry_md_hash_buffer (hashalgo, value_u, seed, seedlen);
+
+ /* Step 7: q = 2^{N-1} + U + 1 - (U mod 2) */
+ if ( !(value_u[qbits/8-1] & 0x01) )
+ {
+ for (i=qbits/8-1; i >= 0; i--)
+ {
+ value_u[i]++;
+ if (value_u[i])
+ break;
+ }
+ }
+ gcry_mpi_release (prime_q); prime_q = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&prime_q, GCRYMPI_FMT_USG,
+ value_u, sizeof value_u, NULL));
+ if (ec)
+ goto leave;
+ mpi_set_highbit (prime_q, qbits-1 );
+
+ /* Step 8: Test whether Q is prime using 64 round of Rabin-Miller.
+ According to table C.1 this is sufficient for all
+ supported prime sizes (i.e. up 3072/256). */
+ if (check_prime (prime_q, val_2, 64, NULL, NULL))
+ break; /* Yes, Q is prime. */
+
+ /* Step 8. */
+ seed = NULL; /* Force a new seed at Step 5. */
+ }
+
+ /* Step 11. Note that we do no use an explicit offset but increment
+ SEED_PLUS accordingly. */
+ memcpy (seed_plus, seed, seedlen);
+ counter = 0;
+
+ /* Generate P. */
+ prime_p = gcry_mpi_new (pbits);
+ for (;;)
+ {
+ /* Step 11.1: For j = 0,...n let
+ V_j = hash(seed+offset+j)
+ Step 11.2: W = V_0 + V_1*2^outlen +
+ ...
+ + V_{n-1}*2^{(n-1)*outlen}
+ + (V_{n} mod 2^b)*2^{n*outlen}
+ */
+ mpi_set_ui (value_w, 0);
+ for (value_j=0; value_j <= value_n; value_j++)
+ {
+ /* There is no need to have an explicit offset variable: In
+ the first round we shall have an offset of 1 and a j of
+ 0. This is achieved by incrementing SEED_PLUS here. For
+ the next round offset is implicitly updated by using
+ SEED_PLUS again. */
+ for (i=seedlen-1; i >= 0; i--)
+ {
+ seed_plus[i]++;
+ if (seed_plus[i])
+ break;
+ }
+ gcry_md_hash_buffer (GCRY_MD_SHA1, digest, seed_plus, seedlen);
+
+ gcry_mpi_release (tmpval); tmpval = NULL;
+ ec = gpg_err_code (gcry_mpi_scan (&tmpval, GCRYMPI_FMT_USG,
+ digest, sizeof digest, NULL));
+ if (ec)
+ goto leave;
+ if (value_j == value_n)
+ mpi_clear_highbit (tmpval, value_b); /* (V_n mod 2^b) */
+ mpi_lshift (tmpval, tmpval, value_j*qbits);
+ mpi_add (value_w, value_w, tmpval);
+ }
+
+ /* Step 11.3: X = W + 2^{L-1} */
+ mpi_set_ui (value_x, 0);
+ mpi_set_highbit (value_x, pbits-1);
+ mpi_add (value_x, value_x, value_w);
+
+ /* Step 11.4: c = X mod 2q */
+ mpi_mul_2exp (tmpval, prime_q, 1);
+ mpi_mod (tmpval, value_x, tmpval);
+
+ /* Step 11.5: p = X - (c - 1) */
+ mpi_sub_ui (tmpval, tmpval, 1);
+ mpi_sub (prime_p, value_x, tmpval);
+
+ /* Step 11.6: If p < 2^{L-1} skip the primality test. */
+ /* Step 11.7 and 11.8: Primality test. */
+ if (mpi_get_nbits (prime_p) >= pbits-1
+ && check_prime (prime_p, val_2, 64, NULL, NULL) )
+ break; /* Yes, P is prime, continue with Step 15. */
+
+ /* Step 11.9: counter = counter + 1, offset = offset + n + 1.
+ If counter >= 4L goto Step 5. */
+ counter++;
+ if (counter >= 4*pbits)
+ goto restart;
+ }
+
+ /* Step 12: Save p, q, counter and seed. */
+ log_debug ("fips186-3 pbits p=%u q=%u counter=%d\n",
+ mpi_get_nbits (prime_p), mpi_get_nbits (prime_q), counter);
+ log_printhex("fips186-3 seed:", seed, seedlen);
+ log_mpidump ("fips186-3 prime p", prime_p);
+ log_mpidump ("fips186-3 prime q", prime_q);
+ if (r_q)
+ {
+ *r_q = prime_q;
+ prime_q = NULL;
+ }
+ if (r_p)
+ {
+ *r_p = prime_p;
+ prime_p = NULL;
+ }
+ if (r_counter)
+ *r_counter = counter;
+ if (r_seed && r_seedlen)
+ {
+ memcpy (seed_plus, seed, seedlen);
+ *r_seed = seed_plus;
+ seed_plus = NULL;
+ *r_seedlen = seedlen;
+ }
+ if (r_hashalgo)
+ *r_hashalgo = hashalgo;
+
+ leave:
+ gcry_mpi_release (tmpval);
+ gcry_mpi_release (value_x);
+ gcry_mpi_release (value_w);
+ gcry_mpi_release (prime_p);
+ gcry_mpi_release (prime_q);
+ gcry_free (seed_plus);
+ gcry_mpi_release (val_2);
+ return ec;
+}
+
diff --git a/grub-core/lib/libgcrypt/cipher/pubkey.c b/grub-core/lib/libgcrypt/cipher/pubkey.c
new file mode 100644
index 0000000..08abcbf
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/pubkey.c
@@ -0,0 +1,2749 @@
+/* pubkey.c - pubkey dispatcher
+ * Copyright (C) 1998, 1999, 2000, 2002, 2003, 2005,
+ * 2007, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+#include "ath.h"
+
+
+static gcry_err_code_t pubkey_decrypt (int algo, gcry_mpi_t *result,
+ gcry_mpi_t *data, gcry_mpi_t *skey,
+ int flags);
+static gcry_err_code_t pubkey_sign (int algo, gcry_mpi_t *resarr,
+ gcry_mpi_t hash, gcry_mpi_t *skey);
+static gcry_err_code_t pubkey_verify (int algo, gcry_mpi_t hash,
+ gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp) (void *, gcry_mpi_t),
+ void *opaque);
+
+
+/* A dummy extraspec so that we do not need to tests the extraspec
+ field from the module specification against NULL and instead
+ directly test the respective fields of extraspecs. */
+static pk_extra_spec_t dummy_extra_spec;
+
+
+/* This is the list of the default public-key ciphers included in
+ libgcrypt. FIPS_ALLOWED indicated whether the algorithm is used in
+ FIPS mode. */
+static struct pubkey_table_entry
+{
+ gcry_pk_spec_t *pubkey;
+ pk_extra_spec_t *extraspec;
+ unsigned int algorithm;
+ int fips_allowed;
+} pubkey_table[] =
+ {
+#if USE_RSA
+ { &_gcry_pubkey_spec_rsa,
+ &_gcry_pubkey_extraspec_rsa, GCRY_PK_RSA, 1},
+#endif
+#if USE_ELGAMAL
+ { &_gcry_pubkey_spec_elg,
+ &_gcry_pubkey_extraspec_elg, GCRY_PK_ELG },
+ { &_gcry_pubkey_spec_elg,
+ &_gcry_pubkey_extraspec_elg, GCRY_PK_ELG_E },
+#endif
+#if USE_DSA
+ { &_gcry_pubkey_spec_dsa,
+ &_gcry_pubkey_extraspec_dsa, GCRY_PK_DSA, 1 },
+#endif
+#if USE_ECC
+ { &_gcry_pubkey_spec_ecdsa,
+ &_gcry_pubkey_extraspec_ecdsa, GCRY_PK_ECDSA, 0 },
+#endif
+ { NULL, 0 },
+ };
+
+/* List of registered ciphers. */
+static gcry_module_t pubkeys_registered;
+
+/* This is the lock protecting PUBKEYS_REGISTERED. */
+static ath_mutex_t pubkeys_registered_lock = ATH_MUTEX_INITIALIZER;;
+
+/* Flag to check wether the default pubkeys have already been
+ registered. */
+static int default_pubkeys_registered;
+
+/* Convenient macro for registering the default digests. */
+#define REGISTER_DEFAULT_PUBKEYS \
+ do \
+ { \
+ ath_mutex_lock (&pubkeys_registered_lock); \
+ if (! default_pubkeys_registered) \
+ { \
+ pk_register_default (); \
+ default_pubkeys_registered = 1; \
+ } \
+ ath_mutex_unlock (&pubkeys_registered_lock); \
+ } \
+ while (0)
+
+/* These dummy functions are used in case a cipher implementation
+ refuses to provide it's own functions. */
+
+static gcry_err_code_t
+dummy_generate (int algorithm, unsigned int nbits, unsigned long dummy,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ (void)algorithm;
+ (void)nbits;
+ (void)dummy;
+ (void)skey;
+ (void)retfactors;
+ fips_signal_error ("using dummy public key function");
+ return GPG_ERR_NOT_IMPLEMENTED;
+}
+
+static gcry_err_code_t
+dummy_check_secret_key (int algorithm, gcry_mpi_t *skey)
+{
+ (void)algorithm;
+ (void)skey;
+ fips_signal_error ("using dummy public key function");
+ return GPG_ERR_NOT_IMPLEMENTED;
+}
+
+static gcry_err_code_t
+dummy_encrypt (int algorithm, gcry_mpi_t *resarr, gcry_mpi_t data,
+ gcry_mpi_t *pkey, int flags)
+{
+ (void)algorithm;
+ (void)resarr;
+ (void)data;
+ (void)pkey;
+ (void)flags;
+ fips_signal_error ("using dummy public key function");
+ return GPG_ERR_NOT_IMPLEMENTED;
+}
+
+static gcry_err_code_t
+dummy_decrypt (int algorithm, gcry_mpi_t *result, gcry_mpi_t *data,
+ gcry_mpi_t *skey, int flags)
+{
+ (void)algorithm;
+ (void)result;
+ (void)data;
+ (void)skey;
+ (void)flags;
+ fips_signal_error ("using dummy public key function");
+ return GPG_ERR_NOT_IMPLEMENTED;
+}
+
+static gcry_err_code_t
+dummy_sign (int algorithm, gcry_mpi_t *resarr, gcry_mpi_t data,
+ gcry_mpi_t *skey)
+{
+ (void)algorithm;
+ (void)resarr;
+ (void)data;
+ (void)skey;
+ fips_signal_error ("using dummy public key function");
+ return GPG_ERR_NOT_IMPLEMENTED;
+}
+
+static gcry_err_code_t
+dummy_verify (int algorithm, gcry_mpi_t hash, gcry_mpi_t *data,
+ gcry_mpi_t *pkey,
+ int (*cmp) (void *, gcry_mpi_t), void *opaquev)
+{
+ (void)algorithm;
+ (void)hash;
+ (void)data;
+ (void)pkey;
+ (void)cmp;
+ (void)opaquev;
+ fips_signal_error ("using dummy public key function");
+ return GPG_ERR_NOT_IMPLEMENTED;
+}
+
+static unsigned
+dummy_get_nbits (int algorithm, gcry_mpi_t *pkey)
+{
+ (void)algorithm;
+ (void)pkey;
+ fips_signal_error ("using dummy public key function");
+ return 0;
+}
+
+/* Internal function. Register all the pubkeys included in
+ PUBKEY_TABLE. Returns zero on success or an error code. */
+static void
+pk_register_default (void)
+{
+ gcry_err_code_t err = 0;
+ int i;
+
+ for (i = 0; (! err) && pubkey_table[i].pubkey; i++)
+ {
+#define pubkey_use_dummy(func) \
+ if (! pubkey_table[i].pubkey->func) \
+ pubkey_table[i].pubkey->func = dummy_##func;
+
+ pubkey_use_dummy (generate);
+ pubkey_use_dummy (check_secret_key);
+ pubkey_use_dummy (encrypt);
+ pubkey_use_dummy (decrypt);
+ pubkey_use_dummy (sign);
+ pubkey_use_dummy (verify);
+ pubkey_use_dummy (get_nbits);
+#undef pubkey_use_dummy
+
+ err = _gcry_module_add (&pubkeys_registered,
+ pubkey_table[i].algorithm,
+ (void *) pubkey_table[i].pubkey,
+ (void *) pubkey_table[i].extraspec,
+ NULL);
+ }
+
+ if (err)
+ BUG ();
+}
+
+/* Internal callback function. Used via _gcry_module_lookup. */
+static int
+gcry_pk_lookup_func_name (void *spec, void *data)
+{
+ gcry_pk_spec_t *pubkey = (gcry_pk_spec_t *) spec;
+ char *name = (char *) data;
+ const char **aliases = pubkey->aliases;
+ int ret = stricmp (name, pubkey->name);
+
+ while (ret && *aliases)
+ ret = stricmp (name, *aliases++);
+
+ return ! ret;
+}
+
+/* Internal function. Lookup a pubkey entry by it's name. */
+static gcry_module_t
+gcry_pk_lookup_name (const char *name)
+{
+ gcry_module_t pubkey;
+
+ pubkey = _gcry_module_lookup (pubkeys_registered, (void *) name,
+ gcry_pk_lookup_func_name);
+
+ return pubkey;
+}
+
+/* Register a new pubkey module whose specification can be found in
+ PUBKEY. On success, a new algorithm ID is stored in ALGORITHM_ID
+ and a pointer representhing this module is stored in MODULE. */
+gcry_error_t
+_gcry_pk_register (gcry_pk_spec_t *pubkey,
+ pk_extra_spec_t *extraspec,
+ unsigned int *algorithm_id,
+ gcry_module_t *module)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_module_t mod;
+
+ /* We do not support module loading in fips mode. */
+ if (fips_mode ())
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ err = _gcry_module_add (&pubkeys_registered, 0,
+ (void *) pubkey,
+ (void *)(extraspec? extraspec : &dummy_extra_spec),
+ &mod);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ if (! err)
+ {
+ *module = mod;
+ *algorithm_id = mod->mod_id;
+ }
+
+ return err;
+}
+
+/* Unregister the pubkey identified by ID, which must have been
+ registered with gcry_pk_register. */
+void
+gcry_pk_unregister (gcry_module_t module)
+{
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+}
+
+static void
+release_mpi_array (gcry_mpi_t *array)
+{
+ for (; *array; array++)
+ {
+ mpi_free(*array);
+ *array = NULL;
+ }
+}
+
+/****************
+ * Map a string to the pubkey algo
+ */
+int
+gcry_pk_map_name (const char *string)
+{
+ gcry_module_t pubkey;
+ int algorithm = 0;
+
+ if (!string)
+ return 0;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = gcry_pk_lookup_name (string);
+ if (pubkey)
+ {
+ algorithm = pubkey->mod_id;
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return algorithm;
+}
+
+
+/* Map the public key algorithm whose ID is contained in ALGORITHM to
+ a string representation of the algorithm name. For unknown
+ algorithm IDs this functions returns "?". */
+const char *
+gcry_pk_algo_name (int algorithm)
+{
+ gcry_module_t pubkey;
+ const char *name;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ name = ((gcry_pk_spec_t *) pubkey->spec)->name;
+ _gcry_module_release (pubkey);
+ }
+ else
+ name = "?";
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return name;
+}
+
+
+/* A special version of gcry_pk_algo name to return the first aliased
+ name of the algorithm. This is required to adhere to the spki
+ specs where the algorithm names are lowercase. */
+const char *
+_gcry_pk_aliased_algo_name (int algorithm)
+{
+ const char *name = NULL;
+ gcry_module_t module;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (module)
+ {
+ gcry_pk_spec_t *pubkey = (gcry_pk_spec_t *) module->spec;
+
+ name = pubkey->aliases? *pubkey->aliases : NULL;
+ if (!name || !*name)
+ name = pubkey->name;
+ _gcry_module_release (module);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return name;
+}
+
+
+static void
+disable_pubkey_algo (int algorithm)
+{
+ gcry_module_t pubkey;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ if (! (pubkey-> flags & FLAG_MODULE_DISABLED))
+ pubkey->flags |= FLAG_MODULE_DISABLED;
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+}
+
+
+/****************
+ * A USE of 0 means: don't care.
+ */
+static gcry_err_code_t
+check_pubkey_algo (int algorithm, unsigned use)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_pk_spec_t *pubkey;
+ gcry_module_t module;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (module)
+ {
+ pubkey = (gcry_pk_spec_t *) module->spec;
+
+ if (((use & GCRY_PK_USAGE_SIGN)
+ && (! (pubkey->use & GCRY_PK_USAGE_SIGN)))
+ || ((use & GCRY_PK_USAGE_ENCR)
+ && (! (pubkey->use & GCRY_PK_USAGE_ENCR))))
+ err = GPG_ERR_WRONG_PUBKEY_ALGO;
+ else if (module->flags & FLAG_MODULE_DISABLED)
+ err = GPG_ERR_PUBKEY_ALGO;
+ _gcry_module_release (module);
+ }
+ else
+ err = GPG_ERR_PUBKEY_ALGO;
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return err;
+}
+
+
+/****************
+ * Return the number of public key material numbers
+ */
+static int
+pubkey_get_npkey (int algorithm)
+{
+ gcry_module_t pubkey;
+ int npkey = 0;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ npkey = strlen (((gcry_pk_spec_t *) pubkey->spec)->elements_pkey);
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return npkey;
+}
+
+/****************
+ * Return the number of secret key material numbers
+ */
+static int
+pubkey_get_nskey (int algorithm)
+{
+ gcry_module_t pubkey;
+ int nskey = 0;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ nskey = strlen (((gcry_pk_spec_t *) pubkey->spec)->elements_skey);
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return nskey;
+}
+
+/****************
+ * Return the number of signature material numbers
+ */
+static int
+pubkey_get_nsig (int algorithm)
+{
+ gcry_module_t pubkey;
+ int nsig = 0;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ nsig = strlen (((gcry_pk_spec_t *) pubkey->spec)->elements_sig);
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return nsig;
+}
+
+/****************
+ * Return the number of encryption material numbers
+ */
+static int
+pubkey_get_nenc (int algorithm)
+{
+ gcry_module_t pubkey;
+ int nenc = 0;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ nenc = strlen (((gcry_pk_spec_t *) pubkey->spec)->elements_enc);
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return nenc;
+}
+
+
+/* Generate a new public key with algorithm ALGORITHM of size NBITS
+ and return it at SKEY. USE_E depends on the ALGORITHM. GENPARMS
+ is passed to the algorithm module if it features an extended
+ generation function. RETFACTOR is used by some algorithms to
+ return certain additional information which are in general not
+ required.
+
+ The function returns the error code number or 0 on success. */
+static gcry_err_code_t
+pubkey_generate (int algorithm,
+ unsigned int nbits,
+ unsigned long use_e,
+ gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ gcry_err_code_t ec = GPG_ERR_PUBKEY_ALGO;
+ gcry_module_t pubkey;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ pk_extra_spec_t *extraspec = pubkey->extraspec;
+
+ if (extraspec && extraspec->ext_generate)
+ {
+ /* Use the extended generate function. */
+ ec = extraspec->ext_generate
+ (algorithm, nbits, use_e, genparms, skey, retfactors, r_extrainfo);
+ }
+ else
+ {
+ /* Use the standard generate function. */
+ ec = ((gcry_pk_spec_t *) pubkey->spec)->generate
+ (algorithm, nbits, use_e, skey, retfactors);
+ }
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return ec;
+}
+
+
+static gcry_err_code_t
+pubkey_check_secret_key (int algorithm, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_PUBKEY_ALGO;
+ gcry_module_t pubkey;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ err = ((gcry_pk_spec_t *) pubkey->spec)->check_secret_key
+ (algorithm, skey);
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return err;
+}
+
+
+/****************
+ * This is the interface to the public key encryption. Encrypt DATA
+ * with PKEY and put it into RESARR which should be an array of MPIs
+ * of size PUBKEY_MAX_NENC (or less if the algorithm allows this -
+ * check with pubkey_get_nenc() )
+ */
+static gcry_err_code_t
+pubkey_encrypt (int algorithm, gcry_mpi_t *resarr, gcry_mpi_t data,
+ gcry_mpi_t *pkey, int flags)
+{
+ gcry_pk_spec_t *pubkey;
+ gcry_module_t module;
+ gcry_err_code_t rc;
+ int i;
+
+ /* Note: In fips mode DBG_CIPHER will enver evaluate to true but as
+ an extra failsafe protection we explicitly test for fips mode
+ here. */
+ if (DBG_CIPHER && !fips_mode ())
+ {
+ log_debug ("pubkey_encrypt: algo=%d\n", algorithm);
+ for(i = 0; i < pubkey_get_npkey (algorithm); i++)
+ log_mpidump (" pkey:", pkey[i]);
+ log_mpidump (" data:", data);
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (module)
+ {
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ rc = pubkey->encrypt (algorithm, resarr, data, pkey, flags);
+ _gcry_module_release (module);
+ goto ready;
+ }
+ rc = GPG_ERR_PUBKEY_ALGO;
+
+ ready:
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ if (!rc && DBG_CIPHER && !fips_mode ())
+ {
+ for(i = 0; i < pubkey_get_nenc (algorithm); i++)
+ log_mpidump(" encr:", resarr[i] );
+ }
+ return rc;
+}
+
+
+/****************
+ * This is the interface to the public key decryption.
+ * ALGO gives the algorithm to use and this implicitly determines
+ * the size of the arrays.
+ * result is a pointer to a mpi variable which will receive a
+ * newly allocated mpi or NULL in case of an error.
+ */
+static gcry_err_code_t
+pubkey_decrypt (int algorithm, gcry_mpi_t *result, gcry_mpi_t *data,
+ gcry_mpi_t *skey, int flags)
+{
+ gcry_pk_spec_t *pubkey;
+ gcry_module_t module;
+ gcry_err_code_t rc;
+ int i;
+
+ *result = NULL; /* so the caller can always do a mpi_free */
+ if (DBG_CIPHER && !fips_mode ())
+ {
+ log_debug ("pubkey_decrypt: algo=%d\n", algorithm);
+ for(i = 0; i < pubkey_get_nskey (algorithm); i++)
+ log_mpidump (" skey:", skey[i]);
+ for(i = 0; i < pubkey_get_nenc (algorithm); i++)
+ log_mpidump (" data:", data[i]);
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (module)
+ {
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ rc = pubkey->decrypt (algorithm, result, data, skey, flags);
+ _gcry_module_release (module);
+ goto ready;
+ }
+
+ rc = GPG_ERR_PUBKEY_ALGO;
+
+ ready:
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ if (!rc && DBG_CIPHER && !fips_mode ())
+ log_mpidump (" plain:", *result);
+
+ return rc;
+}
+
+
+/****************
+ * This is the interface to the public key signing.
+ * Sign data with skey and put the result into resarr which
+ * should be an array of MPIs of size PUBKEY_MAX_NSIG (or less if the
+ * algorithm allows this - check with pubkey_get_nsig() )
+ */
+static gcry_err_code_t
+pubkey_sign (int algorithm, gcry_mpi_t *resarr, gcry_mpi_t data,
+ gcry_mpi_t *skey)
+{
+ gcry_pk_spec_t *pubkey;
+ gcry_module_t module;
+ gcry_err_code_t rc;
+ int i;
+
+ if (DBG_CIPHER && !fips_mode ())
+ {
+ log_debug ("pubkey_sign: algo=%d\n", algorithm);
+ for(i = 0; i < pubkey_get_nskey (algorithm); i++)
+ log_mpidump (" skey:", skey[i]);
+ log_mpidump(" data:", data );
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (module)
+ {
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ rc = pubkey->sign (algorithm, resarr, data, skey);
+ _gcry_module_release (module);
+ goto ready;
+ }
+
+ rc = GPG_ERR_PUBKEY_ALGO;
+
+ ready:
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ if (!rc && DBG_CIPHER && !fips_mode ())
+ for (i = 0; i < pubkey_get_nsig (algorithm); i++)
+ log_mpidump (" sig:", resarr[i]);
+
+ return rc;
+}
+
+/****************
+ * Verify a public key signature.
+ * Return 0 if the signature is good
+ */
+static gcry_err_code_t
+pubkey_verify (int algorithm, gcry_mpi_t hash, gcry_mpi_t *data,
+ gcry_mpi_t *pkey,
+ int (*cmp)(void *, gcry_mpi_t), void *opaquev)
+{
+ gcry_pk_spec_t *pubkey;
+ gcry_module_t module;
+ gcry_err_code_t rc;
+ int i;
+
+ if (DBG_CIPHER && !fips_mode ())
+ {
+ log_debug ("pubkey_verify: algo=%d\n", algorithm);
+ for (i = 0; i < pubkey_get_npkey (algorithm); i++)
+ log_mpidump (" pkey:", pkey[i]);
+ for (i = 0; i < pubkey_get_nsig (algorithm); i++)
+ log_mpidump (" sig:", data[i]);
+ log_mpidump (" hash:", hash);
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (module)
+ {
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ rc = pubkey->verify (algorithm, hash, data, pkey, cmp, opaquev);
+ _gcry_module_release (module);
+ goto ready;
+ }
+
+ rc = GPG_ERR_PUBKEY_ALGO;
+
+ ready:
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ return rc;
+}
+
+
+/* Internal function. */
+static gcry_err_code_t
+sexp_elements_extract (gcry_sexp_t key_sexp, const char *element_names,
+ gcry_mpi_t *elements, const char *algo_name)
+{
+ gcry_err_code_t err = 0;
+ int i, idx;
+ const char *name;
+ gcry_sexp_t list;
+
+ for (name = element_names, idx = 0; *name && !err; name++, idx++)
+ {
+ list = gcry_sexp_find_token (key_sexp, name, 1);
+ if (!list)
+ elements[idx] = NULL;
+ else
+ {
+ elements[idx] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (list);
+ if (!elements[idx])
+ err = GPG_ERR_INV_OBJ;
+ }
+ }
+
+ if (!err)
+ {
+ /* Check that all elements are available. */
+ for (name = element_names, idx = 0; *name; name++, idx++)
+ if (!elements[idx])
+ break;
+ if (*name)
+ {
+ err = GPG_ERR_NO_OBJ;
+ /* Some are missing. Before bailing out we test for
+ optional parameters. */
+ if (algo_name && !strcmp (algo_name, "RSA")
+ && !strcmp (element_names, "nedpqu") )
+ {
+ /* This is RSA. Test whether we got N, E and D and that
+ the optional P, Q and U are all missing. */
+ if (elements[0] && elements[1] && elements[2]
+ && !elements[3] && !elements[4] && !elements[5])
+ err = 0;
+ }
+ }
+ }
+
+
+ if (err)
+ {
+ for (i = 0; i < idx; i++)
+ if (elements[i])
+ gcry_free (elements[i]);
+ }
+ return err;
+}
+
+
+/* Internal function used for ecc. Note, that this function makes use
+ of its intimate knowledge about the ECC parameters from ecc.c. */
+static gcry_err_code_t
+sexp_elements_extract_ecc (gcry_sexp_t key_sexp, const char *element_names,
+ gcry_mpi_t *elements, pk_extra_spec_t *extraspec)
+
+{
+ gcry_err_code_t err = 0;
+ int idx;
+ const char *name;
+ gcry_sexp_t list;
+
+ /* Clear the array for easier error cleanup. */
+ for (name = element_names, idx = 0; *name; name++, idx++)
+ elements[idx] = NULL;
+ gcry_assert (idx >= 6); /* We know that ECC has at least 6 elements. */
+
+ /* Init the array with the available curve parameters. */
+ for (name = element_names, idx = 0; *name && !err; name++, idx++)
+ {
+ list = gcry_sexp_find_token (key_sexp, name, 1);
+ if (!list)
+ elements[idx] = NULL;
+ else
+ {
+ elements[idx] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
+ gcry_sexp_release (list);
+ if (!elements[idx])
+ {
+ err = GPG_ERR_INV_OBJ;
+ goto leave;
+ }
+ }
+ }
+
+ /* Check whether a curve parameter has been given and then fill any
+ missing elements. */
+ list = gcry_sexp_find_token (key_sexp, "curve", 5);
+ if (list)
+ {
+ if (extraspec->get_param)
+ {
+ char *curve;
+ gcry_mpi_t params[6];
+
+ for (idx = 0; idx < DIM(params); idx++)
+ params[idx] = NULL;
+
+ curve = _gcry_sexp_nth_string (list, 1);
+ gcry_sexp_release (list);
+ if (!curve)
+ {
+ /* No curve name given (or out of core). */
+ err = GPG_ERR_INV_OBJ;
+ goto leave;
+ }
+ err = extraspec->get_param (curve, params);
+ gcry_free (curve);
+ if (err)
+ goto leave;
+
+ for (idx = 0; idx < DIM(params); idx++)
+ {
+ if (!elements[idx])
+ elements[idx] = params[idx];
+ else
+ mpi_free (params[idx]);
+ }
+ }
+ else
+ {
+ gcry_sexp_release (list);
+ err = GPG_ERR_INV_OBJ; /* "curve" given but ECC not supported. */
+ goto leave;
+ }
+ }
+
+ /* Check that all parameters are known. */
+ for (name = element_names, idx = 0; *name; name++, idx++)
+ if (!elements[idx])
+ {
+ err = GPG_ERR_NO_OBJ;
+ goto leave;
+ }
+
+ leave:
+ if (err)
+ {
+ for (name = element_names, idx = 0; *name; name++, idx++)
+ if (elements[idx])
+ gcry_free (elements[idx]);
+ }
+ return err;
+}
+
+
+
+/****************
+ * Convert a S-Exp with either a private or a public key to our
+ * internal format. Currently we do only support the following
+ * algorithms:
+ * dsa
+ * rsa
+ * openpgp-dsa
+ * openpgp-rsa
+ * openpgp-elg
+ * openpgp-elg-sig
+ * ecdsa
+ * Provide a SE with the first element be either "private-key" or
+ * or "public-key". It is followed by a list with its first element
+ * be one of the above algorithm identifiers and the remaning
+ * elements are pairs with parameter-id and value.
+ * NOTE: we look through the list to find a list beginning with
+ * "private-key" or "public-key" - the first one found is used.
+ *
+ * Returns: A pointer to an allocated array of MPIs if the return value is
+ * zero; the caller has to release this array.
+ *
+ * Example of a DSA public key:
+ * (private-key
+ * (dsa
+ * (p <mpi>)
+ * (g <mpi>)
+ * (y <mpi>)
+ * (x <mpi>)
+ * )
+ * )
+ * The <mpi> are expected to be in GCRYMPI_FMT_USG
+ */
+static gcry_err_code_t
+sexp_to_key (gcry_sexp_t sexp, int want_private, gcry_mpi_t **retarray,
+ gcry_module_t *retalgo)
+{
+ gcry_err_code_t err = 0;
+ gcry_sexp_t list, l2;
+ char *name;
+ const char *elems;
+ gcry_mpi_t *array;
+ gcry_module_t module;
+ gcry_pk_spec_t *pubkey;
+ pk_extra_spec_t *extraspec;
+ int is_ecc;
+
+ /* Check that the first element is valid. */
+ list = gcry_sexp_find_token (sexp,
+ want_private? "private-key":"public-key", 0);
+ if (!list)
+ return GPG_ERR_INV_OBJ; /* Does not contain a key object. */
+
+ l2 = gcry_sexp_cadr( list );
+ gcry_sexp_release ( list );
+ list = l2;
+ name = _gcry_sexp_nth_string (list, 0);
+ if (!name)
+ {
+ gcry_sexp_release ( list );
+ return GPG_ERR_INV_OBJ; /* Invalid structure of object. */
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = gcry_pk_lookup_name (name);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ /* Fixme: We should make sure that an ECC key is always named "ecc"
+ and not "ecdsa". "ecdsa" should be used for the signature
+ itself. We need a function to test whether an algorithm given
+ with a key is compatible with an application of the key (signing,
+ encryption). For RSA this is easy, but ECC is the first
+ algorithm which has many flavours. */
+ is_ecc = ( !strcmp (name, "ecdsa") || !strcmp (name, "ecc") );
+ gcry_free (name);
+
+ if (!module)
+ {
+ gcry_sexp_release (list);
+ return GPG_ERR_PUBKEY_ALGO; /* Unknown algorithm. */
+ }
+ else
+ {
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ extraspec = module->extraspec;
+ }
+
+ elems = want_private ? pubkey->elements_skey : pubkey->elements_pkey;
+ array = gcry_calloc (strlen (elems) + 1, sizeof (*array));
+ if (!array)
+ err = gpg_err_code_from_errno (errno);
+ if (!err)
+ {
+ if (is_ecc)
+ err = sexp_elements_extract_ecc (list, elems, array, extraspec);
+ else
+ err = sexp_elements_extract (list, elems, array, pubkey->name);
+ }
+
+ gcry_sexp_release (list);
+
+ if (err)
+ {
+ gcry_free (array);
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ }
+ else
+ {
+ *retarray = array;
+ *retalgo = module;
+ }
+
+ return err;
+}
+
+
+static gcry_err_code_t
+sexp_to_sig (gcry_sexp_t sexp, gcry_mpi_t **retarray,
+ gcry_module_t *retalgo)
+{
+ gcry_err_code_t err = 0;
+ gcry_sexp_t list, l2;
+ char *name;
+ const char *elems;
+ gcry_mpi_t *array;
+ gcry_module_t module;
+ gcry_pk_spec_t *pubkey;
+
+ /* Check that the first element is valid. */
+ list = gcry_sexp_find_token( sexp, "sig-val" , 0 );
+ if (!list)
+ return GPG_ERR_INV_OBJ; /* Does not contain a signature value object. */
+
+ l2 = gcry_sexp_nth (list, 1);
+ if (!l2)
+ {
+ gcry_sexp_release (list);
+ return GPG_ERR_NO_OBJ; /* No cadr for the sig object. */
+ }
+ name = _gcry_sexp_nth_string (l2, 0);
+ if (!name)
+ {
+ gcry_sexp_release (list);
+ gcry_sexp_release (l2);
+ return GPG_ERR_INV_OBJ; /* Invalid structure of object. */
+ }
+ else if (!strcmp (name, "flags"))
+ {
+ /* Skip flags, since they are not used but here just for the
+ sake of consistent S-expressions. */
+ gcry_free (name);
+ gcry_sexp_release (l2);
+ l2 = gcry_sexp_nth (list, 2);
+ if (!l2)
+ {
+ gcry_sexp_release (list);
+ return GPG_ERR_INV_OBJ;
+ }
+ name = _gcry_sexp_nth_string (l2, 0);
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = gcry_pk_lookup_name (name);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ gcry_free (name);
+ name = NULL;
+
+ if (!module)
+ {
+ gcry_sexp_release (l2);
+ gcry_sexp_release (list);
+ return GPG_ERR_PUBKEY_ALGO; /* Unknown algorithm. */
+ }
+ else
+ pubkey = (gcry_pk_spec_t *) module->spec;
+
+ elems = pubkey->elements_sig;
+ array = gcry_calloc (strlen (elems) + 1 , sizeof *array );
+ if (!array)
+ err = gpg_err_code_from_errno (errno);
+
+ if (!err)
+ err = sexp_elements_extract (list, elems, array, NULL);
+
+ gcry_sexp_release (l2);
+ gcry_sexp_release (list);
+
+ if (err)
+ {
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ gcry_free (array);
+ }
+ else
+ {
+ *retarray = array;
+ *retalgo = module;
+ }
+
+ return err;
+}
+
+
+/****************
+ * Take sexp and return an array of MPI as used for our internal decrypt
+ * function.
+ * s_data = (enc-val
+ * [(flags [pkcs1])]
+ * (<algo>
+ * (<param_name1> <mpi>)
+ * ...
+ * (<param_namen> <mpi>)
+ * ))
+ * RET_MODERN is set to true when at least an empty flags list has been found.
+ */
+static gcry_err_code_t
+sexp_to_enc (gcry_sexp_t sexp, gcry_mpi_t **retarray, gcry_module_t *retalgo,
+ int *ret_modern, int *ret_want_pkcs1, int *flags)
+{
+ gcry_err_code_t err = 0;
+ gcry_sexp_t list = NULL, l2 = NULL;
+ gcry_pk_spec_t *pubkey = NULL;
+ gcry_module_t module = NULL;
+ char *name = NULL;
+ size_t n;
+ int parsed_flags = 0;
+ const char *elems;
+ gcry_mpi_t *array = NULL;
+
+ *ret_want_pkcs1 = 0;
+ *ret_modern = 0;
+
+ /* Check that the first element is valid. */
+ list = gcry_sexp_find_token (sexp, "enc-val" , 0);
+ if (!list)
+ {
+ err = GPG_ERR_INV_OBJ; /* Does not contain an encrypted value object. */
+ goto leave;
+ }
+
+ l2 = gcry_sexp_nth (list, 1);
+ if (!l2)
+ {
+ err = GPG_ERR_NO_OBJ; /* No cdr for the data object. */
+ goto leave;
+ }
+
+ /* Extract identifier of sublist. */
+ name = _gcry_sexp_nth_string (l2, 0);
+ if (!name)
+ {
+ err = GPG_ERR_INV_OBJ; /* Invalid structure of object. */
+ goto leave;
+ }
+
+ if (!strcmp (name, "flags"))
+ {
+ /* There is a flags element - process it. */
+ const char *s;
+ int i;
+
+ *ret_modern = 1;
+ for (i = gcry_sexp_length (l2) - 1; i > 0; i--)
+ {
+ s = gcry_sexp_nth_data (l2, i, &n);
+ if (! s)
+ ; /* Not a data element - ignore. */
+ else if (n == 3 && !memcmp (s, "raw", 3))
+ ; /* This is just a dummy as it is the default. */
+ else if (n == 5 && !memcmp (s, "pkcs1", 5))
+ *ret_want_pkcs1 = 1;
+ else if (n == 11 && ! memcmp (s, "no-blinding", 11))
+ parsed_flags |= PUBKEY_FLAG_NO_BLINDING;
+ else
+ {
+ err = GPG_ERR_INV_FLAG;
+ goto leave;
+ }
+ }
+
+ /* Get the next which has the actual data. */
+ gcry_sexp_release (l2);
+ l2 = gcry_sexp_nth (list, 2);
+ if (!l2)
+ {
+ err = GPG_ERR_NO_OBJ; /* No cdr for the data object. */
+ goto leave;
+ }
+
+ /* Extract sublist identifier. */
+ gcry_free (name);
+ name = _gcry_sexp_nth_string (l2, 0);
+ if (!name)
+ {
+ err = GPG_ERR_INV_OBJ; /* Invalid structure of object. */
+ goto leave;
+ }
+
+ gcry_sexp_release (list);
+ list = l2;
+ l2 = NULL;
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = gcry_pk_lookup_name (name);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ if (!module)
+ {
+ err = GPG_ERR_PUBKEY_ALGO; /* Unknown algorithm. */
+ goto leave;
+ }
+ pubkey = (gcry_pk_spec_t *) module->spec;
+
+ elems = pubkey->elements_enc;
+ array = gcry_calloc (strlen (elems) + 1, sizeof (*array));
+ if (!array)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ err = sexp_elements_extract (list, elems, array, NULL);
+
+ leave:
+ gcry_sexp_release (list);
+ gcry_sexp_release (l2);
+ gcry_free (name);
+
+ if (err)
+ {
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ gcry_free (array);
+ }
+ else
+ {
+ *retarray = array;
+ *retalgo = module;
+ *flags = parsed_flags;
+ }
+
+ return err;
+}
+
+/* Take the hash value and convert into an MPI, suitable for
+ passing to the low level functions. We currently support the
+ old style way of passing just a MPI and the modern interface which
+ allows to pass flags so that we can choose between raw and pkcs1
+ padding - may be more padding options later.
+
+ (<mpi>)
+ or
+ (data
+ [(flags [pkcs1])]
+ [(hash <algo> <value>)]
+ [(value <text>)]
+ )
+
+ Either the VALUE or the HASH element must be present for use
+ with signatures. VALUE is used for encryption.
+
+ NBITS is the length of the key in bits.
+
+*/
+static gcry_err_code_t
+sexp_data_to_mpi (gcry_sexp_t input, unsigned int nbits, gcry_mpi_t *ret_mpi,
+ int for_encryption, int *flags)
+{
+ gcry_err_code_t rc = 0;
+ gcry_sexp_t ldata, lhash, lvalue;
+ int i;
+ size_t n;
+ const char *s;
+ int is_raw = 0, is_pkcs1 = 0, unknown_flag=0;
+ int parsed_flags = 0, dummy_flags;
+
+ if (! flags)
+ flags = &dummy_flags;
+
+ *ret_mpi = NULL;
+ ldata = gcry_sexp_find_token (input, "data", 0);
+ if (!ldata)
+ { /* assume old style */
+ *ret_mpi = gcry_sexp_nth_mpi (input, 0, 0);
+ return *ret_mpi ? GPG_ERR_NO_ERROR : GPG_ERR_INV_OBJ;
+ }
+
+ /* see whether there is a flags object */
+ {
+ gcry_sexp_t lflags = gcry_sexp_find_token (ldata, "flags", 0);
+ if (lflags)
+ { /* parse the flags list. */
+ for (i=gcry_sexp_length (lflags)-1; i > 0; i--)
+ {
+ s = gcry_sexp_nth_data (lflags, i, &n);
+ if (!s)
+ ; /* not a data element*/
+ else if ( n == 3 && !memcmp (s, "raw", 3))
+ is_raw = 1;
+ else if ( n == 5 && !memcmp (s, "pkcs1", 5))
+ is_pkcs1 = 1;
+ else if (n == 11 && ! memcmp (s, "no-blinding", 11))
+ parsed_flags |= PUBKEY_FLAG_NO_BLINDING;
+ else
+ unknown_flag = 1;
+ }
+ gcry_sexp_release (lflags);
+ }
+ }
+
+ if (!is_pkcs1 && !is_raw)
+ is_raw = 1; /* default to raw */
+
+ /* Get HASH or MPI */
+ lhash = gcry_sexp_find_token (ldata, "hash", 0);
+ lvalue = lhash? NULL : gcry_sexp_find_token (ldata, "value", 0);
+
+ if (!(!lhash ^ !lvalue))
+ rc = GPG_ERR_INV_OBJ; /* none or both given */
+ else if (unknown_flag)
+ rc = GPG_ERR_INV_FLAG;
+ else if (is_raw && is_pkcs1 && !for_encryption)
+ rc = GPG_ERR_CONFLICT;
+ else if (is_raw && lvalue)
+ {
+ *ret_mpi = gcry_sexp_nth_mpi (lvalue, 1, 0);
+ if (!*ret_mpi)
+ rc = GPG_ERR_INV_OBJ;
+ }
+ else if (is_pkcs1 && lvalue && for_encryption)
+ {
+ /* Create pkcs#1 block type 2 padding. */
+ unsigned char *frame = NULL;
+ size_t nframe = (nbits+7) / 8;
+ const void * value;
+ size_t valuelen;
+ unsigned char *p;
+
+ if ( !(value=gcry_sexp_nth_data (lvalue, 1, &valuelen)) || !valuelen )
+ rc = GPG_ERR_INV_OBJ;
+ else if (valuelen + 7 > nframe || !nframe)
+ {
+ /* Can't encode a VALUELEN value in a NFRAME bytes frame. */
+ rc = GPG_ERR_TOO_SHORT; /* the key is too short */
+ }
+ else if ( !(frame = gcry_malloc_secure (nframe)))
+ rc = gpg_err_code_from_errno (errno);
+ else
+ {
+ n = 0;
+ frame[n++] = 0;
+ frame[n++] = 2; /* block type */
+ i = nframe - 3 - valuelen;
+ gcry_assert (i > 0);
+ p = gcry_random_bytes_secure (i, GCRY_STRONG_RANDOM);
+ /* Replace zero bytes by new values. */
+ for (;;)
+ {
+ int j, k;
+ unsigned char *pp;
+
+ /* Count the zero bytes. */
+ for (j=k=0; j < i; j++)
+ {
+ if (!p[j])
+ k++;
+ }
+ if (!k)
+ break; /* Okay: no (more) zero bytes. */
+
+ k += k/128 + 3; /* Better get some more. */
+ pp = gcry_random_bytes_secure (k, GCRY_STRONG_RANDOM);
+ for (j=0; j < i && k; )
+ {
+ if (!p[j])
+ p[j] = pp[--k];
+ if (p[j])
+ j++;
+ }
+ gcry_free (pp);
+ }
+ memcpy (frame+n, p, i);
+ n += i;
+ gcry_free (p);
+
+ frame[n++] = 0;
+ memcpy (frame+n, value, valuelen);
+ n += valuelen;
+ gcry_assert (n == nframe);
+
+ /* FIXME, error checking? */
+ gcry_mpi_scan (ret_mpi, GCRYMPI_FMT_USG, frame, n, &nframe);
+ }
+
+ gcry_free(frame);
+ }
+ else if (is_pkcs1 && lhash && !for_encryption)
+ {
+ /* Create pkcs#1 block type 1 padding. */
+ if (gcry_sexp_length (lhash) != 3)
+ rc = GPG_ERR_INV_OBJ;
+ else if ( !(s=gcry_sexp_nth_data (lhash, 1, &n)) || !n )
+ rc = GPG_ERR_INV_OBJ;
+ else
+ {
+ static struct { const char *name; int algo; } hashnames[] =
+ { { "sha1", GCRY_MD_SHA1 },
+ { "md5", GCRY_MD_MD5 },
+ { "sha256", GCRY_MD_SHA256 },
+ { "ripemd160", GCRY_MD_RMD160 },
+ { "rmd160", GCRY_MD_RMD160 },
+ { "sha384", GCRY_MD_SHA384 },
+ { "sha512", GCRY_MD_SHA512 },
+ { "sha224", GCRY_MD_SHA224 },
+ { "md2", GCRY_MD_MD2 },
+ { "md4", GCRY_MD_MD4 },
+ { "tiger", GCRY_MD_TIGER },
+ { "haval", GCRY_MD_HAVAL },
+ { NULL, 0 }
+ };
+ int algo;
+ byte asn[100];
+ byte *frame = NULL;
+ size_t nframe = (nbits+7) / 8;
+ const void * value;
+ size_t valuelen;
+ size_t asnlen, dlen;
+
+ for (i=0; hashnames[i].name; i++)
+ {
+ if ( strlen (hashnames[i].name) == n
+ && !memcmp (hashnames[i].name, s, n))
+ break;
+ }
+ if (hashnames[i].name)
+ algo = hashnames[i].algo;
+ else
+ {
+ /* In case of not listed or dynamically allocated hash
+ algorithm we fall back to this somewhat slower
+ method. Further, it also allows to use OIDs as
+ algorithm names. */
+ char *tmpname;
+
+ tmpname = gcry_malloc (n+1);
+ if (!tmpname)
+ algo = 0; /* Out of core - silently give up. */
+ else
+ {
+ memcpy (tmpname, s, n);
+ tmpname[n] = 0;
+ algo = gcry_md_map_name (tmpname);
+ gcry_free (tmpname);
+ }
+ }
+
+ asnlen = DIM(asn);
+ dlen = gcry_md_get_algo_dlen (algo);
+
+ if (!algo)
+ rc = GPG_ERR_DIGEST_ALGO;
+ else if ( !(value=gcry_sexp_nth_data (lhash, 2, &valuelen))
+ || !valuelen )
+ rc = GPG_ERR_INV_OBJ;
+ else if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen))
+ {
+ /* We don't have yet all of the above algorithms. */
+ rc = GPG_ERR_NOT_IMPLEMENTED;
+ }
+ else if ( valuelen != dlen )
+ {
+ /* Hash value does not match the length of digest for
+ the given algorithm. */
+ rc = GPG_ERR_CONFLICT;
+ }
+ else if( !dlen || dlen + asnlen + 4 > nframe)
+ {
+ /* Can't encode an DLEN byte digest MD into a NFRAME
+ byte frame. */
+ rc = GPG_ERR_TOO_SHORT;
+ }
+ else if ( !(frame = gcry_malloc (nframe)) )
+ rc = gpg_err_code_from_errno (errno);
+ else
+ { /* Assemble the pkcs#1 block type 1. */
+ n = 0;
+ frame[n++] = 0;
+ frame[n++] = 1; /* block type */
+ i = nframe - valuelen - asnlen - 3 ;
+ gcry_assert (i > 1);
+ memset (frame+n, 0xff, i );
+ n += i;
+ frame[n++] = 0;
+ memcpy (frame+n, asn, asnlen);
+ n += asnlen;
+ memcpy (frame+n, value, valuelen );
+ n += valuelen;
+ gcry_assert (n == nframe);
+
+ /* Convert it into an MPI. FIXME: error checking? */
+ gcry_mpi_scan (ret_mpi, GCRYMPI_FMT_USG, frame, n, &nframe);
+ }
+
+ gcry_free (frame);
+ }
+ }
+ else
+ rc = GPG_ERR_CONFLICT;
+
+ gcry_sexp_release (ldata);
+ gcry_sexp_release (lhash);
+ gcry_sexp_release (lvalue);
+
+ if (!rc)
+ *flags = parsed_flags;
+
+ return rc;
+}
+
+
+/*
+ Do a PK encrypt operation
+
+ Caller has to provide a public key as the SEXP pkey and data as a
+ SEXP with just one MPI in it. Alternativly S_DATA might be a
+ complex S-Expression, similar to the one used for signature
+ verification. This provides a flag which allows to handle PKCS#1
+ block type 2 padding. The function returns a a sexp which may be
+ passed to to pk_decrypt.
+
+ Returns: 0 or an errorcode.
+
+ s_data = See comment for sexp_data_to_mpi
+ s_pkey = <key-as-defined-in-sexp_to_key>
+ r_ciph = (enc-val
+ (<algo>
+ (<param_name1> <mpi>)
+ ...
+ (<param_namen> <mpi>)
+ ))
+
+*/
+gcry_error_t
+gcry_pk_encrypt (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t s_pkey)
+{
+ gcry_mpi_t *pkey = NULL, data = NULL, *ciph = NULL;
+ const char *algo_name, *algo_elems;
+ int flags;
+ gcry_err_code_t rc;
+ gcry_pk_spec_t *pubkey = NULL;
+ gcry_module_t module = NULL;
+
+ *r_ciph = NULL;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ /* Get the key. */
+ rc = sexp_to_key (s_pkey, 0, &pkey, &module);
+ if (rc)
+ goto leave;
+
+ gcry_assert (module);
+ pubkey = (gcry_pk_spec_t *) module->spec;
+
+ /* If aliases for the algorithm name exists, take the first one
+ instead of the regular name to adhere to SPKI conventions. We
+ assume that the first alias name is the lowercase version of the
+ regular one. This change is required for compatibility with
+ 1.1.12 generated S-expressions. */
+ algo_name = pubkey->aliases? *pubkey->aliases : NULL;
+ if (!algo_name || !*algo_name)
+ algo_name = pubkey->name;
+
+ algo_elems = pubkey->elements_enc;
+
+ /* Get the stuff we want to encrypt. */
+ rc = sexp_data_to_mpi (s_data, gcry_pk_get_nbits (s_pkey), &data, 1,
+ &flags);
+ if (rc)
+ goto leave;
+
+ /* Now we can encrypt DATA to CIPH. */
+ ciph = gcry_calloc (strlen (algo_elems) + 1, sizeof (*ciph));
+ if (!ciph)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ rc = pubkey_encrypt (module->mod_id, ciph, data, pkey, flags);
+ mpi_free (data);
+ data = NULL;
+ if (rc)
+ goto leave;
+
+ /* We did it. Now build the return list */
+ {
+ char *string, *p;
+ int i;
+ size_t nelem = strlen (algo_elems);
+ size_t needed = 19 + strlen (algo_name) + (nelem * 5);
+ void **arg_list;
+
+ /* Build the string. */
+ string = p = gcry_malloc (needed);
+ if (!string)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ p = stpcpy ( p, "(enc-val(" );
+ p = stpcpy ( p, algo_name );
+ for (i=0; algo_elems[i]; i++ )
+ {
+ *p++ = '(';
+ *p++ = algo_elems[i];
+ p = stpcpy ( p, "%m)" );
+ }
+ strcpy ( p, "))" );
+
+ /* And now the ugly part: We don't have a function to pass an
+ * array to a format string, so we have to do it this way :-(. */
+ /* FIXME: There is now such a format specifier, so we can
+ change the code to be more clear. */
+ arg_list = malloc (nelem * sizeof *arg_list);
+ if (!arg_list)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ for (i = 0; i < nelem; i++)
+ arg_list[i] = ciph + i;
+
+ rc = gcry_sexp_build_array (r_ciph, NULL, string, arg_list);
+ free (arg_list);
+ if (rc)
+ BUG ();
+ gcry_free (string);
+ }
+
+ leave:
+ if (pkey)
+ {
+ release_mpi_array (pkey);
+ gcry_free (pkey);
+ }
+
+ if (ciph)
+ {
+ release_mpi_array (ciph);
+ gcry_free (ciph);
+ }
+
+ if (module)
+ {
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ }
+
+ return gcry_error (rc);
+}
+
+/*
+ Do a PK decrypt operation
+
+ Caller has to provide a secret key as the SEXP skey and data in a
+ format as created by gcry_pk_encrypt. For historic reasons the
+ function returns simply an MPI as an S-expression part; this is
+ deprecated and the new method should be used which returns a real
+ S-expressionl this is selected by adding at least an empty flags
+ list to S_DATA.
+
+ Returns: 0 or an errorcode.
+
+ s_data = (enc-val
+ [(flags)]
+ (<algo>
+ (<param_name1> <mpi>)
+ ...
+ (<param_namen> <mpi>)
+ ))
+ s_skey = <key-as-defined-in-sexp_to_key>
+ r_plain= Either an incomplete S-expression without the parentheses
+ or if the flags list is used (even if empty) a real S-expression:
+ (value PLAIN).
+ */
+gcry_error_t
+gcry_pk_decrypt (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t s_skey)
+{
+ gcry_mpi_t *skey = NULL, *data = NULL, plain = NULL;
+ int modern, want_pkcs1, flags;
+ gcry_err_code_t rc;
+ gcry_module_t module_enc = NULL, module_key = NULL;
+ gcry_pk_spec_t *pubkey = NULL;
+
+ *r_plain = NULL;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ rc = sexp_to_key (s_skey, 1, &skey, &module_key);
+ if (rc)
+ goto leave;
+
+ rc = sexp_to_enc (s_data, &data, &module_enc, &modern, &want_pkcs1, &flags);
+ if (rc)
+ goto leave;
+
+ if (module_key->mod_id != module_enc->mod_id)
+ {
+ rc = GPG_ERR_CONFLICT; /* Key algo does not match data algo. */
+ goto leave;
+ }
+
+ pubkey = (gcry_pk_spec_t *) module_key->spec;
+
+ rc = pubkey_decrypt (module_key->mod_id, &plain, data, skey, flags);
+ if (rc)
+ goto leave;
+
+ if (gcry_sexp_build (r_plain, NULL, modern? "(value %m)" : "%m", plain))
+ BUG ();
+
+ leave:
+ if (skey)
+ {
+ release_mpi_array (skey);
+ gcry_free (skey);
+ }
+
+ if (plain)
+ mpi_free (plain);
+
+ if (data)
+ {
+ release_mpi_array (data);
+ gcry_free (data);
+ }
+
+ if (module_key || module_enc)
+ {
+ ath_mutex_lock (&pubkeys_registered_lock);
+ if (module_key)
+ _gcry_module_release (module_key);
+ if (module_enc)
+ _gcry_module_release (module_enc);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ }
+
+ return gcry_error (rc);
+}
+
+
+
+/*
+ Create a signature.
+
+ Caller has to provide a secret key as the SEXP skey and data
+ expressed as a SEXP list hash with only one element which should
+ instantly be available as a MPI. Alternatively the structure given
+ below may be used for S_HASH, it provides the abiliy to pass flags
+ to the operation; the only flag defined by now is "pkcs1" which
+ does PKCS#1 block type 1 style padding.
+
+ Returns: 0 or an errorcode.
+ In case of 0 the function returns a new SEXP with the
+ signature value; the structure of this signature depends on the
+ other arguments but is always suitable to be passed to
+ gcry_pk_verify
+
+ s_hash = See comment for sexp_data_to_mpi
+
+ s_skey = <key-as-defined-in-sexp_to_key>
+ r_sig = (sig-val
+ (<algo>
+ (<param_name1> <mpi>)
+ ...
+ (<param_namen> <mpi>))
+ [(hash algo)])
+
+ Note that (hash algo) in R_SIG is not used.
+*/
+gcry_error_t
+gcry_pk_sign (gcry_sexp_t *r_sig, gcry_sexp_t s_hash, gcry_sexp_t s_skey)
+{
+ gcry_mpi_t *skey = NULL, hash = NULL, *result = NULL;
+ gcry_pk_spec_t *pubkey = NULL;
+ gcry_module_t module = NULL;
+ const char *algo_name, *algo_elems;
+ int i;
+ gcry_err_code_t rc;
+
+ *r_sig = NULL;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ rc = sexp_to_key (s_skey, 1, &skey, &module);
+ if (rc)
+ goto leave;
+
+ gcry_assert (module);
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ algo_name = pubkey->aliases? *pubkey->aliases : NULL;
+ if (!algo_name || !*algo_name)
+ algo_name = pubkey->name;
+
+ algo_elems = pubkey->elements_sig;
+
+ /* Get the stuff we want to sign. Note that pk_get_nbits does also
+ work on a private key. */
+ rc = sexp_data_to_mpi (s_hash, gcry_pk_get_nbits (s_skey),
+ &hash, 0, NULL);
+ if (rc)
+ goto leave;
+
+ result = gcry_calloc (strlen (algo_elems) + 1, sizeof (*result));
+ if (!result)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ rc = pubkey_sign (module->mod_id, result, hash, skey);
+ if (rc)
+ goto leave;
+
+ {
+ char *string, *p;
+ size_t nelem, needed = strlen (algo_name) + 20;
+ void **arg_list;
+
+ nelem = strlen (algo_elems);
+
+ /* Count elements, so that we can allocate enough space. */
+ needed += 10 * nelem;
+
+ /* Build the string. */
+ string = p = gcry_malloc (needed);
+ if (!string)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ p = stpcpy (p, "(sig-val(");
+ p = stpcpy (p, algo_name);
+ for (i = 0; algo_elems[i]; i++)
+ {
+ *p++ = '(';
+ *p++ = algo_elems[i];
+ p = stpcpy (p, "%m)");
+ }
+ strcpy (p, "))");
+
+ arg_list = malloc (nelem * sizeof *arg_list);
+ if (!arg_list)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+
+ for (i = 0; i < nelem; i++)
+ arg_list[i] = result + i;
+
+ rc = gcry_sexp_build_array (r_sig, NULL, string, arg_list);
+ free (arg_list);
+ if (rc)
+ BUG ();
+ gcry_free (string);
+ }
+
+ leave:
+ if (skey)
+ {
+ release_mpi_array (skey);
+ gcry_free (skey);
+ }
+
+ if (hash)
+ mpi_free (hash);
+
+ if (result)
+ {
+ release_mpi_array (result);
+ gcry_free (result);
+ }
+
+ return gcry_error (rc);
+}
+
+
+/*
+ Verify a signature.
+
+ Caller has to supply the public key pkey, the signature sig and his
+ hashvalue data. Public key has to be a standard public key given
+ as an S-Exp, sig is a S-Exp as returned from gcry_pk_sign and data
+ must be an S-Exp like the one in sign too. */
+gcry_error_t
+gcry_pk_verify (gcry_sexp_t s_sig, gcry_sexp_t s_hash, gcry_sexp_t s_pkey)
+{
+ gcry_module_t module_key = NULL, module_sig = NULL;
+ gcry_mpi_t *pkey = NULL, hash = NULL, *sig = NULL;
+ gcry_err_code_t rc;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ rc = sexp_to_key (s_pkey, 0, &pkey, &module_key);
+ if (rc)
+ goto leave;
+
+ rc = sexp_to_sig (s_sig, &sig, &module_sig);
+ if (rc)
+ goto leave;
+
+ /* Fixme: Check that the algorithm of S_SIG is compatible to the one
+ of S_PKEY. */
+
+ if (module_key->mod_id != module_sig->mod_id)
+ {
+ rc = GPG_ERR_CONFLICT;
+ goto leave;
+ }
+
+ rc = sexp_data_to_mpi (s_hash, gcry_pk_get_nbits (s_pkey), &hash, 0, 0);
+ if (rc)
+ goto leave;
+
+ rc = pubkey_verify (module_key->mod_id, hash, sig, pkey, NULL, NULL);
+
+ leave:
+ if (pkey)
+ {
+ release_mpi_array (pkey);
+ gcry_free (pkey);
+ }
+ if (sig)
+ {
+ release_mpi_array (sig);
+ gcry_free (sig);
+ }
+ if (hash)
+ mpi_free (hash);
+
+ if (module_key || module_sig)
+ {
+ ath_mutex_lock (&pubkeys_registered_lock);
+ if (module_key)
+ _gcry_module_release (module_key);
+ if (module_sig)
+ _gcry_module_release (module_sig);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ }
+
+ return gcry_error (rc);
+}
+
+
+/*
+ Test a key.
+
+ This may be used either for a public or a secret key to see whether
+ the internal structure is okay.
+
+ Returns: 0 or an errorcode.
+
+ s_key = <key-as-defined-in-sexp_to_key> */
+gcry_error_t
+gcry_pk_testkey (gcry_sexp_t s_key)
+{
+ gcry_module_t module = NULL;
+ gcry_mpi_t *key = NULL;
+ gcry_err_code_t rc;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ /* Note we currently support only secret key checking. */
+ rc = sexp_to_key (s_key, 1, &key, &module);
+ if (! rc)
+ {
+ rc = pubkey_check_secret_key (module->mod_id, key);
+ release_mpi_array (key);
+ gcry_free (key);
+ }
+ return gcry_error (rc);
+}
+
+
+/*
+ Create a public key pair and return it in r_key.
+ How the key is created depends on s_parms:
+ (genkey
+ (algo
+ (parameter_name_1 ....)
+ ....
+ (parameter_name_n ....)
+ ))
+ The key is returned in a format depending on the
+ algorithm. Both, private and secret keys are returned
+ and optionally some additional informatin.
+ For elgamal we return this structure:
+ (key-data
+ (public-key
+ (elg
+ (p <mpi>)
+ (g <mpi>)
+ (y <mpi>)
+ )
+ )
+ (private-key
+ (elg
+ (p <mpi>)
+ (g <mpi>)
+ (y <mpi>)
+ (x <mpi>)
+ )
+ )
+ (misc-key-info
+ (pm1-factors n1 n2 ... nn)
+ ))
+ */
+gcry_error_t
+gcry_pk_genkey (gcry_sexp_t *r_key, gcry_sexp_t s_parms)
+{
+ gcry_pk_spec_t *pubkey = NULL;
+ gcry_module_t module = NULL;
+ gcry_sexp_t list = NULL;
+ gcry_sexp_t l2 = NULL;
+ gcry_sexp_t l3 = NULL;
+ char *name = NULL;
+ size_t n;
+ gcry_err_code_t rc = GPG_ERR_NO_ERROR;
+ int i;
+ const char *algo_name = NULL;
+ int algo;
+ const char *sec_elems = NULL, *pub_elems = NULL;
+ gcry_mpi_t skey[12];
+ gcry_mpi_t *factors = NULL;
+ gcry_sexp_t extrainfo = NULL;
+ unsigned int nbits = 0;
+ unsigned long use_e = 0;
+
+ skey[0] = NULL;
+ *r_key = NULL;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ list = gcry_sexp_find_token (s_parms, "genkey", 0);
+ if (!list)
+ {
+ rc = GPG_ERR_INV_OBJ; /* Does not contain genkey data. */
+ goto leave;
+ }
+
+ l2 = gcry_sexp_cadr (list);
+ gcry_sexp_release (list);
+ list = l2;
+ l2 = NULL;
+ if (! list)
+ {
+ rc = GPG_ERR_NO_OBJ; /* No cdr for the genkey. */
+ goto leave;
+ }
+
+ name = _gcry_sexp_nth_string (list, 0);
+ if (!name)
+ {
+ rc = GPG_ERR_INV_OBJ; /* Algo string missing. */
+ goto leave;
+ }
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = gcry_pk_lookup_name (name);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ gcry_free (name);
+ name = NULL;
+ if (!module)
+ {
+ rc = GPG_ERR_PUBKEY_ALGO; /* Unknown algorithm. */
+ goto leave;
+ }
+
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ algo = module->mod_id;
+ algo_name = pubkey->aliases? *pubkey->aliases : NULL;
+ if (!algo_name || !*algo_name)
+ algo_name = pubkey->name;
+ pub_elems = pubkey->elements_pkey;
+ sec_elems = pubkey->elements_skey;
+ if (strlen (sec_elems) >= DIM(skey))
+ BUG ();
+
+ /* Handle the optional rsa-use-e element. Actually this belong into
+ the algorithm module but we have this parameter in the public
+ module API, so we need to parse it right here. */
+ l2 = gcry_sexp_find_token (list, "rsa-use-e", 0);
+ if (l2)
+ {
+ char buf[50];
+ const char *s;
+
+ s = gcry_sexp_nth_data (l2, 1, &n);
+ if ( !s || n >= DIM (buf) - 1 )
+ {
+ rc = GPG_ERR_INV_OBJ; /* No value or value too large. */
+ goto leave;
+ }
+ memcpy (buf, s, n);
+ buf[n] = 0;
+ use_e = strtoul (buf, NULL, 0);
+ gcry_sexp_release (l2);
+ l2 = NULL;
+ }
+ else
+ use_e = 65537; /* Not given, use the value generated by old versions. */
+
+
+ /* Get the "nbits" parameter. */
+ l2 = gcry_sexp_find_token (list, "nbits", 0);
+ if (l2)
+ {
+ char buf[50];
+ const char *s;
+
+ s = gcry_sexp_nth_data (l2, 1, &n);
+ if (!s || n >= DIM (buf) - 1 )
+ {
+ rc = GPG_ERR_INV_OBJ; /* NBITS given without a cdr. */
+ goto leave;
+ }
+ memcpy (buf, s, n);
+ buf[n] = 0;
+ nbits = (unsigned int)strtoul (buf, NULL, 0);
+ gcry_sexp_release (l2); l2 = NULL;
+ }
+ else
+ nbits = 0;
+
+ /* Pass control to the algorithm module. */
+ rc = pubkey_generate (module->mod_id, nbits, use_e, list, skey,
+ &factors, &extrainfo);
+ gcry_sexp_release (list); list = NULL;
+ if (rc)
+ goto leave;
+
+ /* Key generation succeeded: Build an S-expression. */
+ {
+ char *string, *p;
+ size_t nelem=0, nelem_cp = 0, needed=0;
+ gcry_mpi_t mpis[30];
+
+ /* Estimate size of format string. */
+ nelem = strlen (pub_elems) + strlen (sec_elems);
+ if (factors)
+ {
+ for (i = 0; factors[i]; i++)
+ nelem++;
+ }
+ nelem_cp = nelem;
+
+ needed += nelem * 10;
+ /* (+5 is for EXTRAINFO ("%S")). */
+ needed += 2 * strlen (algo_name) + 300 + 5;
+ if (nelem > DIM (mpis))
+ BUG ();
+
+ /* Build the string. */
+ nelem = 0;
+ string = p = gcry_malloc (needed);
+ if (!string)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ p = stpcpy (p, "(key-data");
+ p = stpcpy (p, "(public-key(");
+ p = stpcpy (p, algo_name);
+ for(i = 0; pub_elems[i]; i++)
+ {
+ *p++ = '(';
+ *p++ = pub_elems[i];
+ p = stpcpy (p, "%m)");
+ mpis[nelem++] = skey[i];
+ }
+ p = stpcpy (p, "))");
+ p = stpcpy (p, "(private-key(");
+ p = stpcpy (p, algo_name);
+ for (i = 0; sec_elems[i]; i++)
+ {
+ *p++ = '(';
+ *p++ = sec_elems[i];
+ p = stpcpy (p, "%m)");
+ mpis[nelem++] = skey[i];
+ }
+ p = stpcpy (p, "))");
+
+ /* Hack to make release_mpi_array() work. */
+ skey[i] = NULL;
+
+ if (extrainfo)
+ {
+ /* If we have extrainfo we should not have any factors. */
+ p = stpcpy (p, "%S");
+ }
+ else if (factors && factors[0])
+ {
+ p = stpcpy (p, "(misc-key-info(pm1-factors");
+ for(i = 0; factors[i]; i++)
+ {
+ p = stpcpy (p, "%m");
+ mpis[nelem++] = factors[i];
+ }
+ p = stpcpy (p, "))");
+ }
+ strcpy (p, ")");
+ gcry_assert (p - string < needed);
+
+ while (nelem < DIM (mpis))
+ mpis[nelem++] = NULL;
+
+ {
+ int elem_n = strlen (pub_elems) + strlen (sec_elems);
+ void **arg_list;
+
+ /* Allocate one extra for EXTRAINFO ("%S"). */
+ arg_list = gcry_calloc (nelem_cp+1, sizeof *arg_list);
+ if (!arg_list)
+ {
+ rc = gpg_err_code_from_errno (errno);
+ goto leave;
+ }
+ for (i = 0; i < elem_n; i++)
+ arg_list[i] = mpis + i;
+ if (extrainfo)
+ arg_list[i] = &extrainfo;
+ else if (factors && factors[0])
+ {
+ for (; i < nelem_cp; i++)
+ arg_list[i] = factors + i - elem_n;
+ }
+
+ rc = gcry_sexp_build_array (r_key, NULL, string, arg_list);
+ gcry_free (arg_list);
+ if (rc)
+ BUG ();
+ gcry_assert (DIM (mpis) == 30); /* Reminder to make sure that
+ the array gets increased if
+ new parameters are added. */
+ }
+ gcry_free (string);
+ }
+
+ leave:
+ gcry_free (name);
+ gcry_sexp_release (extrainfo);
+ release_mpi_array (skey);
+ /* Don't free SKEY itself, it is an stack allocated array. */
+
+ if (factors)
+ {
+ release_mpi_array ( factors );
+ gcry_free (factors);
+ }
+
+ gcry_sexp_release (l3);
+ gcry_sexp_release (l2);
+ gcry_sexp_release (list);
+
+ if (module)
+ {
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ }
+
+ return gcry_error (rc);
+}
+
+
+/*
+ Get the number of nbits from the public key.
+
+ Hmmm: Should we have really this function or is it better to have a
+ more general function to retrieve different properties of the key? */
+unsigned int
+gcry_pk_get_nbits (gcry_sexp_t key)
+{
+ gcry_module_t module = NULL;
+ gcry_pk_spec_t *pubkey;
+ gcry_mpi_t *keyarr = NULL;
+ unsigned int nbits = 0;
+ gcry_err_code_t rc;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ rc = sexp_to_key (key, 0, &keyarr, &module);
+ if (rc == GPG_ERR_INV_OBJ)
+ rc = sexp_to_key (key, 1, &keyarr, &module);
+ if (rc)
+ return 0; /* Error - 0 is a suitable indication for that. */
+
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ nbits = (*pubkey->get_nbits) (module->mod_id, keyarr);
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ release_mpi_array (keyarr);
+ gcry_free (keyarr);
+
+ return nbits;
+}
+
+
+/* Return the so called KEYGRIP which is the SHA-1 hash of the public
+ key parameters expressed in a way depended on the algorithm.
+
+ ARRAY must either be 20 bytes long or NULL; in the latter case a
+ newly allocated array of that size is returned, otherwise ARRAY or
+ NULL is returned to indicate an error which is most likely an
+ unknown algorithm. The function accepts public or secret keys. */
+unsigned char *
+gcry_pk_get_keygrip (gcry_sexp_t key, unsigned char *array)
+{
+ gcry_sexp_t list = NULL, l2 = NULL;
+ gcry_pk_spec_t *pubkey = NULL;
+ gcry_module_t module = NULL;
+ pk_extra_spec_t *extraspec;
+ const char *s;
+ char *name = NULL;
+ int idx;
+ const char *elems;
+ gcry_md_hd_t md = NULL;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ /* Check that the first element is valid. */
+ list = gcry_sexp_find_token (key, "public-key", 0);
+ if (! list)
+ list = gcry_sexp_find_token (key, "private-key", 0);
+ if (! list)
+ list = gcry_sexp_find_token (key, "protected-private-key", 0);
+ if (! list)
+ list = gcry_sexp_find_token (key, "shadowed-private-key", 0);
+ if (! list)
+ return NULL; /* No public- or private-key object. */
+
+ l2 = gcry_sexp_cadr (list);
+ gcry_sexp_release (list);
+ list = l2;
+ l2 = NULL;
+
+ name = _gcry_sexp_nth_string (list, 0);
+ if (!name)
+ goto fail; /* Invalid structure of object. */
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = gcry_pk_lookup_name (name);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ if (!module)
+ goto fail; /* Unknown algorithm. */
+
+ pubkey = (gcry_pk_spec_t *) module->spec;
+ extraspec = module->extraspec;
+
+ elems = pubkey->elements_grip;
+ if (!elems)
+ goto fail; /* No grip parameter. */
+
+ if (gcry_md_open (&md, GCRY_MD_SHA1, 0))
+ goto fail;
+
+ if (extraspec && extraspec->comp_keygrip)
+ {
+ /* Module specific method to compute a keygrip. */
+ if (extraspec->comp_keygrip (md, list))
+ goto fail;
+ }
+ else
+ {
+ /* Generic method to compute a keygrip. */
+ for (idx = 0, s = elems; *s; s++, idx++)
+ {
+ const char *data;
+ size_t datalen;
+ char buf[30];
+
+ l2 = gcry_sexp_find_token (list, s, 1);
+ if (! l2)
+ goto fail;
+ data = gcry_sexp_nth_data (l2, 1, &datalen);
+ if (! data)
+ goto fail;
+
+ snprintf (buf, sizeof buf, "(1:%c%u:", *s, (unsigned int)datalen);
+ gcry_md_write (md, buf, strlen (buf));
+ gcry_md_write (md, data, datalen);
+ gcry_sexp_release (l2);
+ gcry_md_write (md, ")", 1);
+ }
+ }
+
+ if (!array)
+ {
+ array = gcry_malloc (20);
+ if (! array)
+ goto fail;
+ }
+
+ memcpy (array, gcry_md_read (md, GCRY_MD_SHA1), 20);
+ gcry_md_close (md);
+ gcry_sexp_release (list);
+ return array;
+
+ fail:
+ gcry_free (name);
+ gcry_sexp_release (l2);
+ gcry_md_close (md);
+ gcry_sexp_release (list);
+ return NULL;
+}
+
+
+gcry_error_t
+gcry_pk_ctl (int cmd, void *buffer, size_t buflen)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ switch (cmd)
+ {
+ case GCRYCTL_DISABLE_ALGO:
+ /* This one expects a buffer pointing to an integer with the
+ algo number. */
+ if ((! buffer) || (buflen != sizeof (int)))
+ err = GPG_ERR_INV_ARG;
+ else
+ disable_pubkey_algo (*((int *) buffer));
+ break;
+
+ default:
+ err = GPG_ERR_INV_OP;
+ }
+
+ return gcry_error (err);
+}
+
+
+/* Return information about the given algorithm
+
+ WHAT selects the kind of information returned:
+
+ GCRYCTL_TEST_ALGO:
+ Returns 0 when the specified algorithm is available for use.
+ Buffer must be NULL, nbytes may have the address of a variable
+ with the required usage of the algorithm. It may be 0 for don't
+ care or a combination of the GCRY_PK_USAGE_xxx flags;
+
+ GCRYCTL_GET_ALGO_USAGE:
+ Return the usage glafs for the give algo. An invalid alog
+ does return 0. Disabled algos are ignored here becuase we
+ only want to know whether the algo is at all capable of
+ the usage.
+
+ Note: Because this function is in most cases used to return an
+ integer value, we can make it easier for the caller to just look at
+ the return value. The caller will in all cases consult the value
+ and thereby detecting whether a error occured or not (i.e. while
+ checking the block size) */
+gcry_error_t
+gcry_pk_algo_info (int algorithm, int what, void *buffer, size_t *nbytes)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ switch (what)
+ {
+ case GCRYCTL_TEST_ALGO:
+ {
+ int use = nbytes ? *nbytes : 0;
+ if (buffer)
+ err = GPG_ERR_INV_ARG;
+ else if (check_pubkey_algo (algorithm, use))
+ err = GPG_ERR_PUBKEY_ALGO;
+ break;
+ }
+
+ case GCRYCTL_GET_ALGO_USAGE:
+ {
+ gcry_module_t pubkey;
+ int use = 0;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ {
+ use = ((gcry_pk_spec_t *) pubkey->spec)->use;
+ _gcry_module_release (pubkey);
+ }
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ /* FIXME? */
+ *nbytes = use;
+
+ break;
+ }
+
+ case GCRYCTL_GET_ALGO_NPKEY:
+ {
+ /* FIXME? */
+ int npkey = pubkey_get_npkey (algorithm);
+ *nbytes = npkey;
+ break;
+ }
+ case GCRYCTL_GET_ALGO_NSKEY:
+ {
+ /* FIXME? */
+ int nskey = pubkey_get_nskey (algorithm);
+ *nbytes = nskey;
+ break;
+ }
+ case GCRYCTL_GET_ALGO_NSIGN:
+ {
+ /* FIXME? */
+ int nsign = pubkey_get_nsig (algorithm);
+ *nbytes = nsign;
+ break;
+ }
+ case GCRYCTL_GET_ALGO_NENCR:
+ {
+ /* FIXME? */
+ int nencr = pubkey_get_nenc (algorithm);
+ *nbytes = nencr;
+ break;
+ }
+
+ default:
+ err = GPG_ERR_INV_OP;
+ }
+
+ return gcry_error (err);
+}
+
+
+/* Explicitly initialize this module. */
+gcry_err_code_t
+_gcry_pk_init (void)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ return err;
+}
+
+
+gcry_err_code_t
+_gcry_pk_module_lookup (int algorithm, gcry_module_t *module)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ gcry_module_t pubkey;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algorithm);
+ if (pubkey)
+ *module = pubkey;
+ else
+ err = GPG_ERR_PUBKEY_ALGO;
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return err;
+}
+
+
+void
+_gcry_pk_module_release (gcry_module_t module)
+{
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+}
+
+/* Get a list consisting of the IDs of the loaded pubkey modules. If
+ LIST is zero, write the number of loaded pubkey modules to
+ LIST_LENGTH and return. If LIST is non-zero, the first
+ *LIST_LENGTH algorithm IDs are stored in LIST, which must be of
+ according size. In case there are less pubkey modules than
+ *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. */
+gcry_error_t
+gcry_pk_list (int *list, int *list_length)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ err = _gcry_module_list (pubkeys_registered, list, list_length);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+
+ return err;
+}
+
+
+/* Run the selftests for pubkey algorithm ALGO with optional reporting
+ function REPORT. */
+gpg_error_t
+_gcry_pk_selftest (int algo, int extended, selftest_report_func_t report)
+{
+ gcry_module_t module = NULL;
+ pk_extra_spec_t *extraspec = NULL;
+ gcry_err_code_t ec = 0;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ ath_mutex_lock (&pubkeys_registered_lock);
+ module = _gcry_module_lookup_id (pubkeys_registered, algo);
+ if (module && !(module->flags & FLAG_MODULE_DISABLED))
+ extraspec = module->extraspec;
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ if (extraspec && extraspec->selftest)
+ ec = extraspec->selftest (algo, extended, report);
+ else
+ {
+ ec = GPG_ERR_PUBKEY_ALGO;
+ if (report)
+ report ("pubkey", algo, "module",
+ module && !(module->flags & FLAG_MODULE_DISABLED)?
+ "no selftest available" :
+ module? "algorithm disabled" : "algorithm not found");
+ }
+
+ if (module)
+ {
+ ath_mutex_lock (&pubkeys_registered_lock);
+ _gcry_module_release (module);
+ ath_mutex_unlock (&pubkeys_registered_lock);
+ }
+ return gpg_error (ec);
+}
+
+
+/* This function is only used by ac.c! */
+gcry_err_code_t
+_gcry_pk_get_elements (int algo, char **enc, char **sig)
+{
+ gcry_module_t pubkey;
+ gcry_pk_spec_t *spec;
+ gcry_err_code_t err;
+ char *enc_cp;
+ char *sig_cp;
+
+ REGISTER_DEFAULT_PUBKEYS;
+
+ enc_cp = NULL;
+ sig_cp = NULL;
+ spec = NULL;
+
+ pubkey = _gcry_module_lookup_id (pubkeys_registered, algo);
+ if (! pubkey)
+ {
+ err = GPG_ERR_INTERNAL;
+ goto out;
+ }
+ spec = pubkey->spec;
+
+ if (enc)
+ {
+ enc_cp = strdup (spec->elements_enc);
+ if (! enc_cp)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto out;
+ }
+ }
+
+ if (sig)
+ {
+ sig_cp = strdup (spec->elements_sig);
+ if (! sig_cp)
+ {
+ err = gpg_err_code_from_errno (errno);
+ goto out;
+ }
+ }
+
+ if (enc)
+ *enc = enc_cp;
+ if (sig)
+ *sig = sig_cp;
+ err = 0;
+
+ out:
+
+ _gcry_module_release (pubkey);
+ if (err)
+ {
+ free (enc_cp);
+ free (sig_cp);
+ }
+
+ return err;
+}
diff --git a/grub-core/lib/libgcrypt/cipher/rfc2268.c b/grub-core/lib/libgcrypt/cipher/rfc2268.c
new file mode 100644
index 0000000..7d63fce
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/rfc2268.c
@@ -0,0 +1,345 @@
+/* rfc2268.c - The cipher described in rfc2268; aka Ron's Cipher 2.
+ * Copyright (C) 2003 Nikos Mavroyanopoulos
+ * Copyright (C) 2004 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+/* This implementation was written by Nikos Mavroyanopoulos for GNUTLS
+ * as a Libgcrypt module (gnutls/lib/x509/rc2.c) and later adapted for
+ * direct use by Libgcrypt by Werner Koch. This implementation is
+ * only useful for pkcs#12 descryption.
+ *
+ * The implementation here is based on Peter Gutmann's RRC.2 paper.
+ */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "g10lib.h"
+#include "types.h"
+#include "cipher.h"
+
+#define RFC2268_BLOCKSIZE 8
+
+typedef struct
+{
+ u16 S[64];
+} RFC2268_context;
+
+static const unsigned char rfc2268_sbox[] = {
+ 217, 120, 249, 196, 25, 221, 181, 237,
+ 40, 233, 253, 121, 74, 160, 216, 157,
+ 198, 126, 55, 131, 43, 118, 83, 142,
+ 98, 76, 100, 136, 68, 139, 251, 162,
+ 23, 154, 89, 245, 135, 179, 79, 19,
+ 97, 69, 109, 141, 9, 129, 125, 50,
+ 189, 143, 64, 235, 134, 183, 123, 11,
+ 240, 149, 33, 34, 92, 107, 78, 130,
+ 84, 214, 101, 147, 206, 96, 178, 28,
+ 115, 86, 192, 20, 167, 140, 241, 220,
+ 18, 117, 202, 31, 59, 190, 228, 209,
+ 66, 61, 212, 48, 163, 60, 182, 38,
+ 111, 191, 14, 218, 70, 105, 7, 87,
+ 39, 242, 29, 155, 188, 148, 67, 3,
+ 248, 17, 199, 246, 144, 239, 62, 231,
+ 6, 195, 213, 47, 200, 102, 30, 215,
+ 8, 232, 234, 222, 128, 82, 238, 247,
+ 132, 170, 114, 172, 53, 77, 106, 42,
+ 150, 26, 210, 113, 90, 21, 73, 116,
+ 75, 159, 208, 94, 4, 24, 164, 236,
+ 194, 224, 65, 110, 15, 81, 203, 204,
+ 36, 145, 175, 80, 161, 244, 112, 57,
+ 153, 124, 58, 133, 35, 184, 180, 122,
+ 252, 2, 54, 91, 37, 85, 151, 49,
+ 45, 93, 250, 152, 227, 138, 146, 174,
+ 5, 223, 41, 16, 103, 108, 186, 201,
+ 211, 0, 230, 207, 225, 158, 168, 44,
+ 99, 22, 1, 63, 88, 226, 137, 169,
+ 13, 56, 52, 27, 171, 51, 255, 176,
+ 187, 72, 12, 95, 185, 177, 205, 46,
+ 197, 243, 219, 71, 229, 165, 156, 119,
+ 10, 166, 32, 104, 254, 127, 193, 173
+};
+
+#define rotl16(x,n) (((x) << ((u16)(n))) | ((x) >> (16 - (u16)(n))))
+#define rotr16(x,n) (((x) >> ((u16)(n))) | ((x) << (16 - (u16)(n))))
+
+static const char *selftest (void);
+
+
+static void
+do_encrypt (void *context, unsigned char *outbuf, const unsigned char *inbuf)
+{
+ RFC2268_context *ctx = context;
+ register int i, j;
+ u16 word0 = 0, word1 = 0, word2 = 0, word3 = 0;
+
+ word0 = (word0 << 8) | inbuf[1];
+ word0 = (word0 << 8) | inbuf[0];
+ word1 = (word1 << 8) | inbuf[3];
+ word1 = (word1 << 8) | inbuf[2];
+ word2 = (word2 << 8) | inbuf[5];
+ word2 = (word2 << 8) | inbuf[4];
+ word3 = (word3 << 8) | inbuf[7];
+ word3 = (word3 << 8) | inbuf[6];
+
+ for (i = 0; i < 16; i++)
+ {
+ j = i * 4;
+ /* For some reason I cannot combine those steps. */
+ word0 += (word1 & ~word3) + (word2 & word3) + ctx->S[j];
+ word0 = rotl16(word0, 1);
+
+ word1 += (word2 & ~word0) + (word3 & word0) + ctx->S[j + 1];
+ word1 = rotl16(word1, 2);
+
+ word2 += (word3 & ~word1) + (word0 & word1) + ctx->S[j + 2];
+ word2 = rotl16(word2, 3);
+
+ word3 += (word0 & ~word2) + (word1 & word2) + ctx->S[j + 3];
+ word3 = rotl16(word3, 5);
+
+ if (i == 4 || i == 10)
+ {
+ word0 += ctx->S[word3 & 63];
+ word1 += ctx->S[word0 & 63];
+ word2 += ctx->S[word1 & 63];
+ word3 += ctx->S[word2 & 63];
+ }
+
+ }
+
+ outbuf[0] = word0 & 255;
+ outbuf[1] = word0 >> 8;
+ outbuf[2] = word1 & 255;
+ outbuf[3] = word1 >> 8;
+ outbuf[4] = word2 & 255;
+ outbuf[5] = word2 >> 8;
+ outbuf[6] = word3 & 255;
+ outbuf[7] = word3 >> 8;
+}
+
+static void
+do_decrypt (void *context, unsigned char *outbuf, const unsigned char *inbuf)
+{
+ RFC2268_context *ctx = context;
+ register int i, j;
+ u16 word0 = 0, word1 = 0, word2 = 0, word3 = 0;
+
+ word0 = (word0 << 8) | inbuf[1];
+ word0 = (word0 << 8) | inbuf[0];
+ word1 = (word1 << 8) | inbuf[3];
+ word1 = (word1 << 8) | inbuf[2];
+ word2 = (word2 << 8) | inbuf[5];
+ word2 = (word2 << 8) | inbuf[4];
+ word3 = (word3 << 8) | inbuf[7];
+ word3 = (word3 << 8) | inbuf[6];
+
+ for (i = 15; i >= 0; i--)
+ {
+ j = i * 4;
+
+ word3 = rotr16(word3, 5);
+ word3 -= (word0 & ~word2) + (word1 & word2) + ctx->S[j + 3];
+
+ word2 = rotr16(word2, 3);
+ word2 -= (word3 & ~word1) + (word0 & word1) + ctx->S[j + 2];
+
+ word1 = rotr16(word1, 2);
+ word1 -= (word2 & ~word0) + (word3 & word0) + ctx->S[j + 1];
+
+ word0 = rotr16(word0, 1);
+ word0 -= (word1 & ~word3) + (word2 & word3) + ctx->S[j];
+
+ if (i == 5 || i == 11)
+ {
+ word3 = word3 - ctx->S[word2 & 63];
+ word2 = word2 - ctx->S[word1 & 63];
+ word1 = word1 - ctx->S[word0 & 63];
+ word0 = word0 - ctx->S[word3 & 63];
+ }
+
+ }
+
+ outbuf[0] = word0 & 255;
+ outbuf[1] = word0 >> 8;
+ outbuf[2] = word1 & 255;
+ outbuf[3] = word1 >> 8;
+ outbuf[4] = word2 & 255;
+ outbuf[5] = word2 >> 8;
+ outbuf[6] = word3 & 255;
+ outbuf[7] = word3 >> 8;
+}
+
+
+static gpg_err_code_t
+setkey_core (void *context, const unsigned char *key, unsigned int keylen, int with_phase2)
+{
+ static int initialized;
+ static const char *selftest_failed;
+ RFC2268_context *ctx = context;
+ unsigned int i;
+ unsigned char *S, x;
+ int len;
+ int bits = keylen * 8;
+
+ if (!initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if (selftest_failed)
+ log_error ("RFC2268 selftest failed (%s).\n", selftest_failed);
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if (keylen < 40 / 8) /* We want at least 40 bits. */
+ return GPG_ERR_INV_KEYLEN;
+
+ S = (unsigned char *) ctx->S;
+
+ for (i = 0; i < keylen; i++)
+ S[i] = key[i];
+
+ for (i = keylen; i < 128; i++)
+ S[i] = rfc2268_sbox[(S[i - keylen] + S[i - 1]) & 255];
+
+ S[0] = rfc2268_sbox[S[0]];
+
+ /* Phase 2 - reduce effective key size to "bits". This was not
+ * discussed in Gutmann's paper. I've copied that from the public
+ * domain code posted in sci.crypt. */
+ if (with_phase2)
+ {
+ len = (bits + 7) >> 3;
+ i = 128 - len;
+ x = rfc2268_sbox[S[i] & (255 >> (7 & -bits))];
+ S[i] = x;
+
+ while (i--)
+ {
+ x = rfc2268_sbox[x ^ S[i + len]];
+ S[i] = x;
+ }
+ }
+
+ /* Make the expanded key, endian independent. */
+ for (i = 0; i < 64; i++)
+ ctx->S[i] = ( (u16) S[i * 2] | (((u16) S[i * 2 + 1]) << 8));
+
+ return 0;
+}
+
+static gpg_err_code_t
+do_setkey (void *context, const unsigned char *key, unsigned int keylen)
+{
+ return setkey_core (context, key, keylen, 1);
+}
+
+static const char *
+selftest (void)
+{
+ RFC2268_context ctx;
+ unsigned char scratch[16];
+
+ /* Test vectors from Peter Gutmann's paper. */
+ static unsigned char key_1[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ static unsigned char plaintext_1[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ static const unsigned char ciphertext_1[] =
+ { 0x1C, 0x19, 0x8A, 0x83, 0x8D, 0xF0, 0x28, 0xB7 };
+
+ static unsigned char key_2[] =
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
+ };
+ static unsigned char plaintext_2[] =
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ static unsigned char ciphertext_2[] =
+ { 0x50, 0xDC, 0x01, 0x62, 0xBD, 0x75, 0x7F, 0x31 };
+
+ /* This one was checked against libmcrypt's RFC2268. */
+ static unsigned char key_3[] =
+ { 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ static unsigned char plaintext_3[] =
+ { 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ static unsigned char ciphertext_3[] =
+ { 0x8f, 0xd1, 0x03, 0x89, 0x33, 0x6b, 0xf9, 0x5e };
+
+
+ /* First test. */
+ setkey_core (&ctx, key_1, sizeof(key_1), 0);
+ do_encrypt (&ctx, scratch, plaintext_1);
+
+ if (memcmp (scratch, ciphertext_1, sizeof(ciphertext_1)))
+ return "RFC2268 encryption test 1 failed.";
+
+ setkey_core (&ctx, key_1, sizeof(key_1), 0);
+ do_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext_1, sizeof(plaintext_1)))
+ return "RFC2268 decryption test 1 failed.";
+
+ /* Second test. */
+ setkey_core (&ctx, key_2, sizeof(key_2), 0);
+ do_encrypt (&ctx, scratch, plaintext_2);
+ if (memcmp (scratch, ciphertext_2, sizeof(ciphertext_2)))
+ return "RFC2268 encryption test 2 failed.";
+
+ setkey_core (&ctx, key_2, sizeof(key_2), 0);
+ do_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext_2, sizeof(plaintext_2)))
+ return "RFC2268 decryption test 2 failed.";
+
+ /* Third test. */
+ setkey_core(&ctx, key_3, sizeof(key_3), 0);
+ do_encrypt(&ctx, scratch, plaintext_3);
+
+ if (memcmp(scratch, ciphertext_3, sizeof(ciphertext_3)))
+ return "RFC2268 encryption test 3 failed.";
+
+ setkey_core (&ctx, key_3, sizeof(key_3), 0);
+ do_decrypt (&ctx, scratch, scratch);
+ if (memcmp(scratch, plaintext_3, sizeof(plaintext_3)))
+ return "RFC2268 decryption test 3 failed.";
+
+ return NULL;
+}
+
+
+
+static gcry_cipher_oid_spec_t oids_rfc2268_40[] =
+ {
+ /*{ "1.2.840.113549.3.2", GCRY_CIPHER_MODE_CBC },*/
+ /* pbeWithSHAAnd40BitRC2_CBC */
+ { "1.2.840.113549.1.12.1.6", GCRY_CIPHER_MODE_CBC },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_rfc2268_40 = {
+ "RFC2268_40", NULL, oids_rfc2268_40,
+ RFC2268_BLOCKSIZE, 40, sizeof(RFC2268_context),
+ do_setkey, do_encrypt, do_decrypt
+};
+
diff --git a/grub-core/lib/libgcrypt/cipher/rijndael-tables.h b/grub-core/lib/libgcrypt/cipher/rijndael-tables.h
new file mode 100644
index 0000000..c9b6d77
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/rijndael-tables.h
@@ -0,0 +1,1687 @@
+/* rijndael-tables.h - Rijndael (AES) for GnuPG,
+ * Copyright (C) 2000, 2001, 2002, 2003, 2007,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* To keep the actual implementation at a readable size we use this
+ include file to define the tables. */
+
+static const unsigned char S[256] =
+ {
+ 99, 124, 119, 123, 242, 107, 111, 197,
+ 48, 1, 103, 43, 254, 215, 171, 118,
+ 202, 130, 201, 125, 250, 89, 71, 240,
+ 173, 212, 162, 175, 156, 164, 114, 192,
+ 183, 253, 147, 38, 54, 63, 247, 204,
+ 52, 165, 229, 241, 113, 216, 49, 21,
+ 4, 199, 35, 195, 24, 150, 5, 154,
+ 7, 18, 128, 226, 235, 39, 178, 117,
+ 9, 131, 44, 26, 27, 110, 90, 160,
+ 82, 59, 214, 179, 41, 227, 47, 132,
+ 83, 209, 0, 237, 32, 252, 177, 91,
+ 106, 203, 190, 57, 74, 76, 88, 207,
+ 208, 239, 170, 251, 67, 77, 51, 133,
+ 69, 249, 2, 127, 80, 60, 159, 168,
+ 81, 163, 64, 143, 146, 157, 56, 245,
+ 188, 182, 218, 33, 16, 255, 243, 210,
+ 205, 12, 19, 236, 95, 151, 68, 23,
+ 196, 167, 126, 61, 100, 93, 25, 115,
+ 96, 129, 79, 220, 34, 42, 144, 136,
+ 70, 238, 184, 20, 222, 94, 11, 219,
+ 224, 50, 58, 10, 73, 6, 36, 92,
+ 194, 211, 172, 98, 145, 149, 228, 121,
+ 231, 200, 55, 109, 141, 213, 78, 169,
+ 108, 86, 244, 234, 101, 122, 174, 8,
+ 186, 120, 37, 46, 28, 166, 180, 198,
+ 232, 221, 116, 31, 75, 189, 139, 138,
+ 112, 62, 181, 102, 72, 3, 246, 14,
+ 97, 53, 87, 185, 134, 193, 29, 158,
+ 225, 248, 152, 17, 105, 217, 142, 148,
+ 155, 30, 135, 233, 206, 85, 40, 223,
+ 140, 161, 137, 13, 191, 230, 66, 104,
+ 65, 153, 45, 15, 176, 84, 187, 22
+ };
+
+
+static const unsigned char T1[256][4] =
+ {
+ { 0xc6,0x63,0x63,0xa5 }, { 0xf8,0x7c,0x7c,0x84 },
+ { 0xee,0x77,0x77,0x99 }, { 0xf6,0x7b,0x7b,0x8d },
+ { 0xff,0xf2,0xf2,0x0d }, { 0xd6,0x6b,0x6b,0xbd },
+ { 0xde,0x6f,0x6f,0xb1 }, { 0x91,0xc5,0xc5,0x54 },
+ { 0x60,0x30,0x30,0x50 }, { 0x02,0x01,0x01,0x03 },
+ { 0xce,0x67,0x67,0xa9 }, { 0x56,0x2b,0x2b,0x7d },
+ { 0xe7,0xfe,0xfe,0x19 }, { 0xb5,0xd7,0xd7,0x62 },
+ { 0x4d,0xab,0xab,0xe6 }, { 0xec,0x76,0x76,0x9a },
+ { 0x8f,0xca,0xca,0x45 }, { 0x1f,0x82,0x82,0x9d },
+ { 0x89,0xc9,0xc9,0x40 }, { 0xfa,0x7d,0x7d,0x87 },
+ { 0xef,0xfa,0xfa,0x15 }, { 0xb2,0x59,0x59,0xeb },
+ { 0x8e,0x47,0x47,0xc9 }, { 0xfb,0xf0,0xf0,0x0b },
+ { 0x41,0xad,0xad,0xec }, { 0xb3,0xd4,0xd4,0x67 },
+ { 0x5f,0xa2,0xa2,0xfd }, { 0x45,0xaf,0xaf,0xea },
+ { 0x23,0x9c,0x9c,0xbf }, { 0x53,0xa4,0xa4,0xf7 },
+ { 0xe4,0x72,0x72,0x96 }, { 0x9b,0xc0,0xc0,0x5b },
+ { 0x75,0xb7,0xb7,0xc2 }, { 0xe1,0xfd,0xfd,0x1c },
+ { 0x3d,0x93,0x93,0xae }, { 0x4c,0x26,0x26,0x6a },
+ { 0x6c,0x36,0x36,0x5a }, { 0x7e,0x3f,0x3f,0x41 },
+ { 0xf5,0xf7,0xf7,0x02 }, { 0x83,0xcc,0xcc,0x4f },
+ { 0x68,0x34,0x34,0x5c }, { 0x51,0xa5,0xa5,0xf4 },
+ { 0xd1,0xe5,0xe5,0x34 }, { 0xf9,0xf1,0xf1,0x08 },
+ { 0xe2,0x71,0x71,0x93 }, { 0xab,0xd8,0xd8,0x73 },
+ { 0x62,0x31,0x31,0x53 }, { 0x2a,0x15,0x15,0x3f },
+ { 0x08,0x04,0x04,0x0c }, { 0x95,0xc7,0xc7,0x52 },
+ { 0x46,0x23,0x23,0x65 }, { 0x9d,0xc3,0xc3,0x5e },
+ { 0x30,0x18,0x18,0x28 }, { 0x37,0x96,0x96,0xa1 },
+ { 0x0a,0x05,0x05,0x0f }, { 0x2f,0x9a,0x9a,0xb5 },
+ { 0x0e,0x07,0x07,0x09 }, { 0x24,0x12,0x12,0x36 },
+ { 0x1b,0x80,0x80,0x9b }, { 0xdf,0xe2,0xe2,0x3d },
+ { 0xcd,0xeb,0xeb,0x26 }, { 0x4e,0x27,0x27,0x69 },
+ { 0x7f,0xb2,0xb2,0xcd }, { 0xea,0x75,0x75,0x9f },
+ { 0x12,0x09,0x09,0x1b }, { 0x1d,0x83,0x83,0x9e },
+ { 0x58,0x2c,0x2c,0x74 }, { 0x34,0x1a,0x1a,0x2e },
+ { 0x36,0x1b,0x1b,0x2d }, { 0xdc,0x6e,0x6e,0xb2 },
+ { 0xb4,0x5a,0x5a,0xee }, { 0x5b,0xa0,0xa0,0xfb },
+ { 0xa4,0x52,0x52,0xf6 }, { 0x76,0x3b,0x3b,0x4d },
+ { 0xb7,0xd6,0xd6,0x61 }, { 0x7d,0xb3,0xb3,0xce },
+ { 0x52,0x29,0x29,0x7b }, { 0xdd,0xe3,0xe3,0x3e },
+ { 0x5e,0x2f,0x2f,0x71 }, { 0x13,0x84,0x84,0x97 },
+ { 0xa6,0x53,0x53,0xf5 }, { 0xb9,0xd1,0xd1,0x68 },
+ { 0x00,0x00,0x00,0x00 }, { 0xc1,0xed,0xed,0x2c },
+ { 0x40,0x20,0x20,0x60 }, { 0xe3,0xfc,0xfc,0x1f },
+ { 0x79,0xb1,0xb1,0xc8 }, { 0xb6,0x5b,0x5b,0xed },
+ { 0xd4,0x6a,0x6a,0xbe }, { 0x8d,0xcb,0xcb,0x46 },
+ { 0x67,0xbe,0xbe,0xd9 }, { 0x72,0x39,0x39,0x4b },
+ { 0x94,0x4a,0x4a,0xde }, { 0x98,0x4c,0x4c,0xd4 },
+ { 0xb0,0x58,0x58,0xe8 }, { 0x85,0xcf,0xcf,0x4a },
+ { 0xbb,0xd0,0xd0,0x6b }, { 0xc5,0xef,0xef,0x2a },
+ { 0x4f,0xaa,0xaa,0xe5 }, { 0xed,0xfb,0xfb,0x16 },
+ { 0x86,0x43,0x43,0xc5 }, { 0x9a,0x4d,0x4d,0xd7 },
+ { 0x66,0x33,0x33,0x55 }, { 0x11,0x85,0x85,0x94 },
+ { 0x8a,0x45,0x45,0xcf }, { 0xe9,0xf9,0xf9,0x10 },
+ { 0x04,0x02,0x02,0x06 }, { 0xfe,0x7f,0x7f,0x81 },
+ { 0xa0,0x50,0x50,0xf0 }, { 0x78,0x3c,0x3c,0x44 },
+ { 0x25,0x9f,0x9f,0xba }, { 0x4b,0xa8,0xa8,0xe3 },
+ { 0xa2,0x51,0x51,0xf3 }, { 0x5d,0xa3,0xa3,0xfe },
+ { 0x80,0x40,0x40,0xc0 }, { 0x05,0x8f,0x8f,0x8a },
+ { 0x3f,0x92,0x92,0xad }, { 0x21,0x9d,0x9d,0xbc },
+ { 0x70,0x38,0x38,0x48 }, { 0xf1,0xf5,0xf5,0x04 },
+ { 0x63,0xbc,0xbc,0xdf }, { 0x77,0xb6,0xb6,0xc1 },
+ { 0xaf,0xda,0xda,0x75 }, { 0x42,0x21,0x21,0x63 },
+ { 0x20,0x10,0x10,0x30 }, { 0xe5,0xff,0xff,0x1a },
+ { 0xfd,0xf3,0xf3,0x0e }, { 0xbf,0xd2,0xd2,0x6d },
+ { 0x81,0xcd,0xcd,0x4c }, { 0x18,0x0c,0x0c,0x14 },
+ { 0x26,0x13,0x13,0x35 }, { 0xc3,0xec,0xec,0x2f },
+ { 0xbe,0x5f,0x5f,0xe1 }, { 0x35,0x97,0x97,0xa2 },
+ { 0x88,0x44,0x44,0xcc }, { 0x2e,0x17,0x17,0x39 },
+ { 0x93,0xc4,0xc4,0x57 }, { 0x55,0xa7,0xa7,0xf2 },
+ { 0xfc,0x7e,0x7e,0x82 }, { 0x7a,0x3d,0x3d,0x47 },
+ { 0xc8,0x64,0x64,0xac }, { 0xba,0x5d,0x5d,0xe7 },
+ { 0x32,0x19,0x19,0x2b }, { 0xe6,0x73,0x73,0x95 },
+ { 0xc0,0x60,0x60,0xa0 }, { 0x19,0x81,0x81,0x98 },
+ { 0x9e,0x4f,0x4f,0xd1 }, { 0xa3,0xdc,0xdc,0x7f },
+ { 0x44,0x22,0x22,0x66 }, { 0x54,0x2a,0x2a,0x7e },
+ { 0x3b,0x90,0x90,0xab }, { 0x0b,0x88,0x88,0x83 },
+ { 0x8c,0x46,0x46,0xca }, { 0xc7,0xee,0xee,0x29 },
+ { 0x6b,0xb8,0xb8,0xd3 }, { 0x28,0x14,0x14,0x3c },
+ { 0xa7,0xde,0xde,0x79 }, { 0xbc,0x5e,0x5e,0xe2 },
+ { 0x16,0x0b,0x0b,0x1d }, { 0xad,0xdb,0xdb,0x76 },
+ { 0xdb,0xe0,0xe0,0x3b }, { 0x64,0x32,0x32,0x56 },
+ { 0x74,0x3a,0x3a,0x4e }, { 0x14,0x0a,0x0a,0x1e },
+ { 0x92,0x49,0x49,0xdb }, { 0x0c,0x06,0x06,0x0a },
+ { 0x48,0x24,0x24,0x6c }, { 0xb8,0x5c,0x5c,0xe4 },
+ { 0x9f,0xc2,0xc2,0x5d }, { 0xbd,0xd3,0xd3,0x6e },
+ { 0x43,0xac,0xac,0xef }, { 0xc4,0x62,0x62,0xa6 },
+ { 0x39,0x91,0x91,0xa8 }, { 0x31,0x95,0x95,0xa4 },
+ { 0xd3,0xe4,0xe4,0x37 }, { 0xf2,0x79,0x79,0x8b },
+ { 0xd5,0xe7,0xe7,0x32 }, { 0x8b,0xc8,0xc8,0x43 },
+ { 0x6e,0x37,0x37,0x59 }, { 0xda,0x6d,0x6d,0xb7 },
+ { 0x01,0x8d,0x8d,0x8c }, { 0xb1,0xd5,0xd5,0x64 },
+ { 0x9c,0x4e,0x4e,0xd2 }, { 0x49,0xa9,0xa9,0xe0 },
+ { 0xd8,0x6c,0x6c,0xb4 }, { 0xac,0x56,0x56,0xfa },
+ { 0xf3,0xf4,0xf4,0x07 }, { 0xcf,0xea,0xea,0x25 },
+ { 0xca,0x65,0x65,0xaf }, { 0xf4,0x7a,0x7a,0x8e },
+ { 0x47,0xae,0xae,0xe9 }, { 0x10,0x08,0x08,0x18 },
+ { 0x6f,0xba,0xba,0xd5 }, { 0xf0,0x78,0x78,0x88 },
+ { 0x4a,0x25,0x25,0x6f }, { 0x5c,0x2e,0x2e,0x72 },
+ { 0x38,0x1c,0x1c,0x24 }, { 0x57,0xa6,0xa6,0xf1 },
+ { 0x73,0xb4,0xb4,0xc7 }, { 0x97,0xc6,0xc6,0x51 },
+ { 0xcb,0xe8,0xe8,0x23 }, { 0xa1,0xdd,0xdd,0x7c },
+ { 0xe8,0x74,0x74,0x9c }, { 0x3e,0x1f,0x1f,0x21 },
+ { 0x96,0x4b,0x4b,0xdd }, { 0x61,0xbd,0xbd,0xdc },
+ { 0x0d,0x8b,0x8b,0x86 }, { 0x0f,0x8a,0x8a,0x85 },
+ { 0xe0,0x70,0x70,0x90 }, { 0x7c,0x3e,0x3e,0x42 },
+ { 0x71,0xb5,0xb5,0xc4 }, { 0xcc,0x66,0x66,0xaa },
+ { 0x90,0x48,0x48,0xd8 }, { 0x06,0x03,0x03,0x05 },
+ { 0xf7,0xf6,0xf6,0x01 }, { 0x1c,0x0e,0x0e,0x12 },
+ { 0xc2,0x61,0x61,0xa3 }, { 0x6a,0x35,0x35,0x5f },
+ { 0xae,0x57,0x57,0xf9 }, { 0x69,0xb9,0xb9,0xd0 },
+ { 0x17,0x86,0x86,0x91 }, { 0x99,0xc1,0xc1,0x58 },
+ { 0x3a,0x1d,0x1d,0x27 }, { 0x27,0x9e,0x9e,0xb9 },
+ { 0xd9,0xe1,0xe1,0x38 }, { 0xeb,0xf8,0xf8,0x13 },
+ { 0x2b,0x98,0x98,0xb3 }, { 0x22,0x11,0x11,0x33 },
+ { 0xd2,0x69,0x69,0xbb }, { 0xa9,0xd9,0xd9,0x70 },
+ { 0x07,0x8e,0x8e,0x89 }, { 0x33,0x94,0x94,0xa7 },
+ { 0x2d,0x9b,0x9b,0xb6 }, { 0x3c,0x1e,0x1e,0x22 },
+ { 0x15,0x87,0x87,0x92 }, { 0xc9,0xe9,0xe9,0x20 },
+ { 0x87,0xce,0xce,0x49 }, { 0xaa,0x55,0x55,0xff },
+ { 0x50,0x28,0x28,0x78 }, { 0xa5,0xdf,0xdf,0x7a },
+ { 0x03,0x8c,0x8c,0x8f }, { 0x59,0xa1,0xa1,0xf8 },
+ { 0x09,0x89,0x89,0x80 }, { 0x1a,0x0d,0x0d,0x17 },
+ { 0x65,0xbf,0xbf,0xda }, { 0xd7,0xe6,0xe6,0x31 },
+ { 0x84,0x42,0x42,0xc6 }, { 0xd0,0x68,0x68,0xb8 },
+ { 0x82,0x41,0x41,0xc3 }, { 0x29,0x99,0x99,0xb0 },
+ { 0x5a,0x2d,0x2d,0x77 }, { 0x1e,0x0f,0x0f,0x11 },
+ { 0x7b,0xb0,0xb0,0xcb }, { 0xa8,0x54,0x54,0xfc },
+ { 0x6d,0xbb,0xbb,0xd6 }, { 0x2c,0x16,0x16,0x3a }
+ };
+
+static const unsigned char T2[256][4] =
+ {
+ { 0xa5,0xc6,0x63,0x63 }, { 0x84,0xf8,0x7c,0x7c },
+ { 0x99,0xee,0x77,0x77 }, { 0x8d,0xf6,0x7b,0x7b },
+ { 0x0d,0xff,0xf2,0xf2 }, { 0xbd,0xd6,0x6b,0x6b },
+ { 0xb1,0xde,0x6f,0x6f }, { 0x54,0x91,0xc5,0xc5 },
+ { 0x50,0x60,0x30,0x30 }, { 0x03,0x02,0x01,0x01 },
+ { 0xa9,0xce,0x67,0x67 }, { 0x7d,0x56,0x2b,0x2b },
+ { 0x19,0xe7,0xfe,0xfe }, { 0x62,0xb5,0xd7,0xd7 },
+ { 0xe6,0x4d,0xab,0xab }, { 0x9a,0xec,0x76,0x76 },
+ { 0x45,0x8f,0xca,0xca }, { 0x9d,0x1f,0x82,0x82 },
+ { 0x40,0x89,0xc9,0xc9 }, { 0x87,0xfa,0x7d,0x7d },
+ { 0x15,0xef,0xfa,0xfa }, { 0xeb,0xb2,0x59,0x59 },
+ { 0xc9,0x8e,0x47,0x47 }, { 0x0b,0xfb,0xf0,0xf0 },
+ { 0xec,0x41,0xad,0xad }, { 0x67,0xb3,0xd4,0xd4 },
+ { 0xfd,0x5f,0xa2,0xa2 }, { 0xea,0x45,0xaf,0xaf },
+ { 0xbf,0x23,0x9c,0x9c }, { 0xf7,0x53,0xa4,0xa4 },
+ { 0x96,0xe4,0x72,0x72 }, { 0x5b,0x9b,0xc0,0xc0 },
+ { 0xc2,0x75,0xb7,0xb7 }, { 0x1c,0xe1,0xfd,0xfd },
+ { 0xae,0x3d,0x93,0x93 }, { 0x6a,0x4c,0x26,0x26 },
+ { 0x5a,0x6c,0x36,0x36 }, { 0x41,0x7e,0x3f,0x3f },
+ { 0x02,0xf5,0xf7,0xf7 }, { 0x4f,0x83,0xcc,0xcc },
+ { 0x5c,0x68,0x34,0x34 }, { 0xf4,0x51,0xa5,0xa5 },
+ { 0x34,0xd1,0xe5,0xe5 }, { 0x08,0xf9,0xf1,0xf1 },
+ { 0x93,0xe2,0x71,0x71 }, { 0x73,0xab,0xd8,0xd8 },
+ { 0x53,0x62,0x31,0x31 }, { 0x3f,0x2a,0x15,0x15 },
+ { 0x0c,0x08,0x04,0x04 }, { 0x52,0x95,0xc7,0xc7 },
+ { 0x65,0x46,0x23,0x23 }, { 0x5e,0x9d,0xc3,0xc3 },
+ { 0x28,0x30,0x18,0x18 }, { 0xa1,0x37,0x96,0x96 },
+ { 0x0f,0x0a,0x05,0x05 }, { 0xb5,0x2f,0x9a,0x9a },
+ { 0x09,0x0e,0x07,0x07 }, { 0x36,0x24,0x12,0x12 },
+ { 0x9b,0x1b,0x80,0x80 }, { 0x3d,0xdf,0xe2,0xe2 },
+ { 0x26,0xcd,0xeb,0xeb }, { 0x69,0x4e,0x27,0x27 },
+ { 0xcd,0x7f,0xb2,0xb2 }, { 0x9f,0xea,0x75,0x75 },
+ { 0x1b,0x12,0x09,0x09 }, { 0x9e,0x1d,0x83,0x83 },
+ { 0x74,0x58,0x2c,0x2c }, { 0x2e,0x34,0x1a,0x1a },
+ { 0x2d,0x36,0x1b,0x1b }, { 0xb2,0xdc,0x6e,0x6e },
+ { 0xee,0xb4,0x5a,0x5a }, { 0xfb,0x5b,0xa0,0xa0 },
+ { 0xf6,0xa4,0x52,0x52 }, { 0x4d,0x76,0x3b,0x3b },
+ { 0x61,0xb7,0xd6,0xd6 }, { 0xce,0x7d,0xb3,0xb3 },
+ { 0x7b,0x52,0x29,0x29 }, { 0x3e,0xdd,0xe3,0xe3 },
+ { 0x71,0x5e,0x2f,0x2f }, { 0x97,0x13,0x84,0x84 },
+ { 0xf5,0xa6,0x53,0x53 }, { 0x68,0xb9,0xd1,0xd1 },
+ { 0x00,0x00,0x00,0x00 }, { 0x2c,0xc1,0xed,0xed },
+ { 0x60,0x40,0x20,0x20 }, { 0x1f,0xe3,0xfc,0xfc },
+ { 0xc8,0x79,0xb1,0xb1 }, { 0xed,0xb6,0x5b,0x5b },
+ { 0xbe,0xd4,0x6a,0x6a }, { 0x46,0x8d,0xcb,0xcb },
+ { 0xd9,0x67,0xbe,0xbe }, { 0x4b,0x72,0x39,0x39 },
+ { 0xde,0x94,0x4a,0x4a }, { 0xd4,0x98,0x4c,0x4c },
+ { 0xe8,0xb0,0x58,0x58 }, { 0x4a,0x85,0xcf,0xcf },
+ { 0x6b,0xbb,0xd0,0xd0 }, { 0x2a,0xc5,0xef,0xef },
+ { 0xe5,0x4f,0xaa,0xaa }, { 0x16,0xed,0xfb,0xfb },
+ { 0xc5,0x86,0x43,0x43 }, { 0xd7,0x9a,0x4d,0x4d },
+ { 0x55,0x66,0x33,0x33 }, { 0x94,0x11,0x85,0x85 },
+ { 0xcf,0x8a,0x45,0x45 }, { 0x10,0xe9,0xf9,0xf9 },
+ { 0x06,0x04,0x02,0x02 }, { 0x81,0xfe,0x7f,0x7f },
+ { 0xf0,0xa0,0x50,0x50 }, { 0x44,0x78,0x3c,0x3c },
+ { 0xba,0x25,0x9f,0x9f }, { 0xe3,0x4b,0xa8,0xa8 },
+ { 0xf3,0xa2,0x51,0x51 }, { 0xfe,0x5d,0xa3,0xa3 },
+ { 0xc0,0x80,0x40,0x40 }, { 0x8a,0x05,0x8f,0x8f },
+ { 0xad,0x3f,0x92,0x92 }, { 0xbc,0x21,0x9d,0x9d },
+ { 0x48,0x70,0x38,0x38 }, { 0x04,0xf1,0xf5,0xf5 },
+ { 0xdf,0x63,0xbc,0xbc }, { 0xc1,0x77,0xb6,0xb6 },
+ { 0x75,0xaf,0xda,0xda }, { 0x63,0x42,0x21,0x21 },
+ { 0x30,0x20,0x10,0x10 }, { 0x1a,0xe5,0xff,0xff },
+ { 0x0e,0xfd,0xf3,0xf3 }, { 0x6d,0xbf,0xd2,0xd2 },
+ { 0x4c,0x81,0xcd,0xcd }, { 0x14,0x18,0x0c,0x0c },
+ { 0x35,0x26,0x13,0x13 }, { 0x2f,0xc3,0xec,0xec },
+ { 0xe1,0xbe,0x5f,0x5f }, { 0xa2,0x35,0x97,0x97 },
+ { 0xcc,0x88,0x44,0x44 }, { 0x39,0x2e,0x17,0x17 },
+ { 0x57,0x93,0xc4,0xc4 }, { 0xf2,0x55,0xa7,0xa7 },
+ { 0x82,0xfc,0x7e,0x7e }, { 0x47,0x7a,0x3d,0x3d },
+ { 0xac,0xc8,0x64,0x64 }, { 0xe7,0xba,0x5d,0x5d },
+ { 0x2b,0x32,0x19,0x19 }, { 0x95,0xe6,0x73,0x73 },
+ { 0xa0,0xc0,0x60,0x60 }, { 0x98,0x19,0x81,0x81 },
+ { 0xd1,0x9e,0x4f,0x4f }, { 0x7f,0xa3,0xdc,0xdc },
+ { 0x66,0x44,0x22,0x22 }, { 0x7e,0x54,0x2a,0x2a },
+ { 0xab,0x3b,0x90,0x90 }, { 0x83,0x0b,0x88,0x88 },
+ { 0xca,0x8c,0x46,0x46 }, { 0x29,0xc7,0xee,0xee },
+ { 0xd3,0x6b,0xb8,0xb8 }, { 0x3c,0x28,0x14,0x14 },
+ { 0x79,0xa7,0xde,0xde }, { 0xe2,0xbc,0x5e,0x5e },
+ { 0x1d,0x16,0x0b,0x0b }, { 0x76,0xad,0xdb,0xdb },
+ { 0x3b,0xdb,0xe0,0xe0 }, { 0x56,0x64,0x32,0x32 },
+ { 0x4e,0x74,0x3a,0x3a }, { 0x1e,0x14,0x0a,0x0a },
+ { 0xdb,0x92,0x49,0x49 }, { 0x0a,0x0c,0x06,0x06 },
+ { 0x6c,0x48,0x24,0x24 }, { 0xe4,0xb8,0x5c,0x5c },
+ { 0x5d,0x9f,0xc2,0xc2 }, { 0x6e,0xbd,0xd3,0xd3 },
+ { 0xef,0x43,0xac,0xac }, { 0xa6,0xc4,0x62,0x62 },
+ { 0xa8,0x39,0x91,0x91 }, { 0xa4,0x31,0x95,0x95 },
+ { 0x37,0xd3,0xe4,0xe4 }, { 0x8b,0xf2,0x79,0x79 },
+ { 0x32,0xd5,0xe7,0xe7 }, { 0x43,0x8b,0xc8,0xc8 },
+ { 0x59,0x6e,0x37,0x37 }, { 0xb7,0xda,0x6d,0x6d },
+ { 0x8c,0x01,0x8d,0x8d }, { 0x64,0xb1,0xd5,0xd5 },
+ { 0xd2,0x9c,0x4e,0x4e }, { 0xe0,0x49,0xa9,0xa9 },
+ { 0xb4,0xd8,0x6c,0x6c }, { 0xfa,0xac,0x56,0x56 },
+ { 0x07,0xf3,0xf4,0xf4 }, { 0x25,0xcf,0xea,0xea },
+ { 0xaf,0xca,0x65,0x65 }, { 0x8e,0xf4,0x7a,0x7a },
+ { 0xe9,0x47,0xae,0xae }, { 0x18,0x10,0x08,0x08 },
+ { 0xd5,0x6f,0xba,0xba }, { 0x88,0xf0,0x78,0x78 },
+ { 0x6f,0x4a,0x25,0x25 }, { 0x72,0x5c,0x2e,0x2e },
+ { 0x24,0x38,0x1c,0x1c }, { 0xf1,0x57,0xa6,0xa6 },
+ { 0xc7,0x73,0xb4,0xb4 }, { 0x51,0x97,0xc6,0xc6 },
+ { 0x23,0xcb,0xe8,0xe8 }, { 0x7c,0xa1,0xdd,0xdd },
+ { 0x9c,0xe8,0x74,0x74 }, { 0x21,0x3e,0x1f,0x1f },
+ { 0xdd,0x96,0x4b,0x4b }, { 0xdc,0x61,0xbd,0xbd },
+ { 0x86,0x0d,0x8b,0x8b }, { 0x85,0x0f,0x8a,0x8a },
+ { 0x90,0xe0,0x70,0x70 }, { 0x42,0x7c,0x3e,0x3e },
+ { 0xc4,0x71,0xb5,0xb5 }, { 0xaa,0xcc,0x66,0x66 },
+ { 0xd8,0x90,0x48,0x48 }, { 0x05,0x06,0x03,0x03 },
+ { 0x01,0xf7,0xf6,0xf6 }, { 0x12,0x1c,0x0e,0x0e },
+ { 0xa3,0xc2,0x61,0x61 }, { 0x5f,0x6a,0x35,0x35 },
+ { 0xf9,0xae,0x57,0x57 }, { 0xd0,0x69,0xb9,0xb9 },
+ { 0x91,0x17,0x86,0x86 }, { 0x58,0x99,0xc1,0xc1 },
+ { 0x27,0x3a,0x1d,0x1d }, { 0xb9,0x27,0x9e,0x9e },
+ { 0x38,0xd9,0xe1,0xe1 }, { 0x13,0xeb,0xf8,0xf8 },
+ { 0xb3,0x2b,0x98,0x98 }, { 0x33,0x22,0x11,0x11 },
+ { 0xbb,0xd2,0x69,0x69 }, { 0x70,0xa9,0xd9,0xd9 },
+ { 0x89,0x07,0x8e,0x8e }, { 0xa7,0x33,0x94,0x94 },
+ { 0xb6,0x2d,0x9b,0x9b }, { 0x22,0x3c,0x1e,0x1e },
+ { 0x92,0x15,0x87,0x87 }, { 0x20,0xc9,0xe9,0xe9 },
+ { 0x49,0x87,0xce,0xce }, { 0xff,0xaa,0x55,0x55 },
+ { 0x78,0x50,0x28,0x28 }, { 0x7a,0xa5,0xdf,0xdf },
+ { 0x8f,0x03,0x8c,0x8c }, { 0xf8,0x59,0xa1,0xa1 },
+ { 0x80,0x09,0x89,0x89 }, { 0x17,0x1a,0x0d,0x0d },
+ { 0xda,0x65,0xbf,0xbf }, { 0x31,0xd7,0xe6,0xe6 },
+ { 0xc6,0x84,0x42,0x42 }, { 0xb8,0xd0,0x68,0x68 },
+ { 0xc3,0x82,0x41,0x41 }, { 0xb0,0x29,0x99,0x99 },
+ { 0x77,0x5a,0x2d,0x2d }, { 0x11,0x1e,0x0f,0x0f },
+ { 0xcb,0x7b,0xb0,0xb0 }, { 0xfc,0xa8,0x54,0x54 },
+ { 0xd6,0x6d,0xbb,0xbb }, { 0x3a,0x2c,0x16,0x16 }
+ };
+
+static const unsigned char T3[256][4] =
+ {
+ { 0x63,0xa5,0xc6,0x63 }, { 0x7c,0x84,0xf8,0x7c },
+ { 0x77,0x99,0xee,0x77 }, { 0x7b,0x8d,0xf6,0x7b },
+ { 0xf2,0x0d,0xff,0xf2 }, { 0x6b,0xbd,0xd6,0x6b },
+ { 0x6f,0xb1,0xde,0x6f }, { 0xc5,0x54,0x91,0xc5 },
+ { 0x30,0x50,0x60,0x30 }, { 0x01,0x03,0x02,0x01 },
+ { 0x67,0xa9,0xce,0x67 }, { 0x2b,0x7d,0x56,0x2b },
+ { 0xfe,0x19,0xe7,0xfe }, { 0xd7,0x62,0xb5,0xd7 },
+ { 0xab,0xe6,0x4d,0xab }, { 0x76,0x9a,0xec,0x76 },
+ { 0xca,0x45,0x8f,0xca }, { 0x82,0x9d,0x1f,0x82 },
+ { 0xc9,0x40,0x89,0xc9 }, { 0x7d,0x87,0xfa,0x7d },
+ { 0xfa,0x15,0xef,0xfa }, { 0x59,0xeb,0xb2,0x59 },
+ { 0x47,0xc9,0x8e,0x47 }, { 0xf0,0x0b,0xfb,0xf0 },
+ { 0xad,0xec,0x41,0xad }, { 0xd4,0x67,0xb3,0xd4 },
+ { 0xa2,0xfd,0x5f,0xa2 }, { 0xaf,0xea,0x45,0xaf },
+ { 0x9c,0xbf,0x23,0x9c }, { 0xa4,0xf7,0x53,0xa4 },
+ { 0x72,0x96,0xe4,0x72 }, { 0xc0,0x5b,0x9b,0xc0 },
+ { 0xb7,0xc2,0x75,0xb7 }, { 0xfd,0x1c,0xe1,0xfd },
+ { 0x93,0xae,0x3d,0x93 }, { 0x26,0x6a,0x4c,0x26 },
+ { 0x36,0x5a,0x6c,0x36 }, { 0x3f,0x41,0x7e,0x3f },
+ { 0xf7,0x02,0xf5,0xf7 }, { 0xcc,0x4f,0x83,0xcc },
+ { 0x34,0x5c,0x68,0x34 }, { 0xa5,0xf4,0x51,0xa5 },
+ { 0xe5,0x34,0xd1,0xe5 }, { 0xf1,0x08,0xf9,0xf1 },
+ { 0x71,0x93,0xe2,0x71 }, { 0xd8,0x73,0xab,0xd8 },
+ { 0x31,0x53,0x62,0x31 }, { 0x15,0x3f,0x2a,0x15 },
+ { 0x04,0x0c,0x08,0x04 }, { 0xc7,0x52,0x95,0xc7 },
+ { 0x23,0x65,0x46,0x23 }, { 0xc3,0x5e,0x9d,0xc3 },
+ { 0x18,0x28,0x30,0x18 }, { 0x96,0xa1,0x37,0x96 },
+ { 0x05,0x0f,0x0a,0x05 }, { 0x9a,0xb5,0x2f,0x9a },
+ { 0x07,0x09,0x0e,0x07 }, { 0x12,0x36,0x24,0x12 },
+ { 0x80,0x9b,0x1b,0x80 }, { 0xe2,0x3d,0xdf,0xe2 },
+ { 0xeb,0x26,0xcd,0xeb }, { 0x27,0x69,0x4e,0x27 },
+ { 0xb2,0xcd,0x7f,0xb2 }, { 0x75,0x9f,0xea,0x75 },
+ { 0x09,0x1b,0x12,0x09 }, { 0x83,0x9e,0x1d,0x83 },
+ { 0x2c,0x74,0x58,0x2c }, { 0x1a,0x2e,0x34,0x1a },
+ { 0x1b,0x2d,0x36,0x1b }, { 0x6e,0xb2,0xdc,0x6e },
+ { 0x5a,0xee,0xb4,0x5a }, { 0xa0,0xfb,0x5b,0xa0 },
+ { 0x52,0xf6,0xa4,0x52 }, { 0x3b,0x4d,0x76,0x3b },
+ { 0xd6,0x61,0xb7,0xd6 }, { 0xb3,0xce,0x7d,0xb3 },
+ { 0x29,0x7b,0x52,0x29 }, { 0xe3,0x3e,0xdd,0xe3 },
+ { 0x2f,0x71,0x5e,0x2f }, { 0x84,0x97,0x13,0x84 },
+ { 0x53,0xf5,0xa6,0x53 }, { 0xd1,0x68,0xb9,0xd1 },
+ { 0x00,0x00,0x00,0x00 }, { 0xed,0x2c,0xc1,0xed },
+ { 0x20,0x60,0x40,0x20 }, { 0xfc,0x1f,0xe3,0xfc },
+ { 0xb1,0xc8,0x79,0xb1 }, { 0x5b,0xed,0xb6,0x5b },
+ { 0x6a,0xbe,0xd4,0x6a }, { 0xcb,0x46,0x8d,0xcb },
+ { 0xbe,0xd9,0x67,0xbe }, { 0x39,0x4b,0x72,0x39 },
+ { 0x4a,0xde,0x94,0x4a }, { 0x4c,0xd4,0x98,0x4c },
+ { 0x58,0xe8,0xb0,0x58 }, { 0xcf,0x4a,0x85,0xcf },
+ { 0xd0,0x6b,0xbb,0xd0 }, { 0xef,0x2a,0xc5,0xef },
+ { 0xaa,0xe5,0x4f,0xaa }, { 0xfb,0x16,0xed,0xfb },
+ { 0x43,0xc5,0x86,0x43 }, { 0x4d,0xd7,0x9a,0x4d },
+ { 0x33,0x55,0x66,0x33 }, { 0x85,0x94,0x11,0x85 },
+ { 0x45,0xcf,0x8a,0x45 }, { 0xf9,0x10,0xe9,0xf9 },
+ { 0x02,0x06,0x04,0x02 }, { 0x7f,0x81,0xfe,0x7f },
+ { 0x50,0xf0,0xa0,0x50 }, { 0x3c,0x44,0x78,0x3c },
+ { 0x9f,0xba,0x25,0x9f }, { 0xa8,0xe3,0x4b,0xa8 },
+ { 0x51,0xf3,0xa2,0x51 }, { 0xa3,0xfe,0x5d,0xa3 },
+ { 0x40,0xc0,0x80,0x40 }, { 0x8f,0x8a,0x05,0x8f },
+ { 0x92,0xad,0x3f,0x92 }, { 0x9d,0xbc,0x21,0x9d },
+ { 0x38,0x48,0x70,0x38 }, { 0xf5,0x04,0xf1,0xf5 },
+ { 0xbc,0xdf,0x63,0xbc }, { 0xb6,0xc1,0x77,0xb6 },
+ { 0xda,0x75,0xaf,0xda }, { 0x21,0x63,0x42,0x21 },
+ { 0x10,0x30,0x20,0x10 }, { 0xff,0x1a,0xe5,0xff },
+ { 0xf3,0x0e,0xfd,0xf3 }, { 0xd2,0x6d,0xbf,0xd2 },
+ { 0xcd,0x4c,0x81,0xcd }, { 0x0c,0x14,0x18,0x0c },
+ { 0x13,0x35,0x26,0x13 }, { 0xec,0x2f,0xc3,0xec },
+ { 0x5f,0xe1,0xbe,0x5f }, { 0x97,0xa2,0x35,0x97 },
+ { 0x44,0xcc,0x88,0x44 }, { 0x17,0x39,0x2e,0x17 },
+ { 0xc4,0x57,0x93,0xc4 }, { 0xa7,0xf2,0x55,0xa7 },
+ { 0x7e,0x82,0xfc,0x7e }, { 0x3d,0x47,0x7a,0x3d },
+ { 0x64,0xac,0xc8,0x64 }, { 0x5d,0xe7,0xba,0x5d },
+ { 0x19,0x2b,0x32,0x19 }, { 0x73,0x95,0xe6,0x73 },
+ { 0x60,0xa0,0xc0,0x60 }, { 0x81,0x98,0x19,0x81 },
+ { 0x4f,0xd1,0x9e,0x4f }, { 0xdc,0x7f,0xa3,0xdc },
+ { 0x22,0x66,0x44,0x22 }, { 0x2a,0x7e,0x54,0x2a },
+ { 0x90,0xab,0x3b,0x90 }, { 0x88,0x83,0x0b,0x88 },
+ { 0x46,0xca,0x8c,0x46 }, { 0xee,0x29,0xc7,0xee },
+ { 0xb8,0xd3,0x6b,0xb8 }, { 0x14,0x3c,0x28,0x14 },
+ { 0xde,0x79,0xa7,0xde }, { 0x5e,0xe2,0xbc,0x5e },
+ { 0x0b,0x1d,0x16,0x0b }, { 0xdb,0x76,0xad,0xdb },
+ { 0xe0,0x3b,0xdb,0xe0 }, { 0x32,0x56,0x64,0x32 },
+ { 0x3a,0x4e,0x74,0x3a }, { 0x0a,0x1e,0x14,0x0a },
+ { 0x49,0xdb,0x92,0x49 }, { 0x06,0x0a,0x0c,0x06 },
+ { 0x24,0x6c,0x48,0x24 }, { 0x5c,0xe4,0xb8,0x5c },
+ { 0xc2,0x5d,0x9f,0xc2 }, { 0xd3,0x6e,0xbd,0xd3 },
+ { 0xac,0xef,0x43,0xac }, { 0x62,0xa6,0xc4,0x62 },
+ { 0x91,0xa8,0x39,0x91 }, { 0x95,0xa4,0x31,0x95 },
+ { 0xe4,0x37,0xd3,0xe4 }, { 0x79,0x8b,0xf2,0x79 },
+ { 0xe7,0x32,0xd5,0xe7 }, { 0xc8,0x43,0x8b,0xc8 },
+ { 0x37,0x59,0x6e,0x37 }, { 0x6d,0xb7,0xda,0x6d },
+ { 0x8d,0x8c,0x01,0x8d }, { 0xd5,0x64,0xb1,0xd5 },
+ { 0x4e,0xd2,0x9c,0x4e }, { 0xa9,0xe0,0x49,0xa9 },
+ { 0x6c,0xb4,0xd8,0x6c }, { 0x56,0xfa,0xac,0x56 },
+ { 0xf4,0x07,0xf3,0xf4 }, { 0xea,0x25,0xcf,0xea },
+ { 0x65,0xaf,0xca,0x65 }, { 0x7a,0x8e,0xf4,0x7a },
+ { 0xae,0xe9,0x47,0xae }, { 0x08,0x18,0x10,0x08 },
+ { 0xba,0xd5,0x6f,0xba }, { 0x78,0x88,0xf0,0x78 },
+ { 0x25,0x6f,0x4a,0x25 }, { 0x2e,0x72,0x5c,0x2e },
+ { 0x1c,0x24,0x38,0x1c }, { 0xa6,0xf1,0x57,0xa6 },
+ { 0xb4,0xc7,0x73,0xb4 }, { 0xc6,0x51,0x97,0xc6 },
+ { 0xe8,0x23,0xcb,0xe8 }, { 0xdd,0x7c,0xa1,0xdd },
+ { 0x74,0x9c,0xe8,0x74 }, { 0x1f,0x21,0x3e,0x1f },
+ { 0x4b,0xdd,0x96,0x4b }, { 0xbd,0xdc,0x61,0xbd },
+ { 0x8b,0x86,0x0d,0x8b }, { 0x8a,0x85,0x0f,0x8a },
+ { 0x70,0x90,0xe0,0x70 }, { 0x3e,0x42,0x7c,0x3e },
+ { 0xb5,0xc4,0x71,0xb5 }, { 0x66,0xaa,0xcc,0x66 },
+ { 0x48,0xd8,0x90,0x48 }, { 0x03,0x05,0x06,0x03 },
+ { 0xf6,0x01,0xf7,0xf6 }, { 0x0e,0x12,0x1c,0x0e },
+ { 0x61,0xa3,0xc2,0x61 }, { 0x35,0x5f,0x6a,0x35 },
+ { 0x57,0xf9,0xae,0x57 }, { 0xb9,0xd0,0x69,0xb9 },
+ { 0x86,0x91,0x17,0x86 }, { 0xc1,0x58,0x99,0xc1 },
+ { 0x1d,0x27,0x3a,0x1d }, { 0x9e,0xb9,0x27,0x9e },
+ { 0xe1,0x38,0xd9,0xe1 }, { 0xf8,0x13,0xeb,0xf8 },
+ { 0x98,0xb3,0x2b,0x98 }, { 0x11,0x33,0x22,0x11 },
+ { 0x69,0xbb,0xd2,0x69 }, { 0xd9,0x70,0xa9,0xd9 },
+ { 0x8e,0x89,0x07,0x8e }, { 0x94,0xa7,0x33,0x94 },
+ { 0x9b,0xb6,0x2d,0x9b }, { 0x1e,0x22,0x3c,0x1e },
+ { 0x87,0x92,0x15,0x87 }, { 0xe9,0x20,0xc9,0xe9 },
+ { 0xce,0x49,0x87,0xce }, { 0x55,0xff,0xaa,0x55 },
+ { 0x28,0x78,0x50,0x28 }, { 0xdf,0x7a,0xa5,0xdf },
+ { 0x8c,0x8f,0x03,0x8c }, { 0xa1,0xf8,0x59,0xa1 },
+ { 0x89,0x80,0x09,0x89 }, { 0x0d,0x17,0x1a,0x0d },
+ { 0xbf,0xda,0x65,0xbf }, { 0xe6,0x31,0xd7,0xe6 },
+ { 0x42,0xc6,0x84,0x42 }, { 0x68,0xb8,0xd0,0x68 },
+ { 0x41,0xc3,0x82,0x41 }, { 0x99,0xb0,0x29,0x99 },
+ { 0x2d,0x77,0x5a,0x2d }, { 0x0f,0x11,0x1e,0x0f },
+ { 0xb0,0xcb,0x7b,0xb0 }, { 0x54,0xfc,0xa8,0x54 },
+ { 0xbb,0xd6,0x6d,0xbb }, { 0x16,0x3a,0x2c,0x16 }
+ };
+
+static const unsigned char T4[256][4] =
+ {
+ { 0x63,0x63,0xa5,0xc6 }, { 0x7c,0x7c,0x84,0xf8 },
+ { 0x77,0x77,0x99,0xee }, { 0x7b,0x7b,0x8d,0xf6 },
+ { 0xf2,0xf2,0x0d,0xff }, { 0x6b,0x6b,0xbd,0xd6 },
+ { 0x6f,0x6f,0xb1,0xde }, { 0xc5,0xc5,0x54,0x91 },
+ { 0x30,0x30,0x50,0x60 }, { 0x01,0x01,0x03,0x02 },
+ { 0x67,0x67,0xa9,0xce }, { 0x2b,0x2b,0x7d,0x56 },
+ { 0xfe,0xfe,0x19,0xe7 }, { 0xd7,0xd7,0x62,0xb5 },
+ { 0xab,0xab,0xe6,0x4d }, { 0x76,0x76,0x9a,0xec },
+ { 0xca,0xca,0x45,0x8f }, { 0x82,0x82,0x9d,0x1f },
+ { 0xc9,0xc9,0x40,0x89 }, { 0x7d,0x7d,0x87,0xfa },
+ { 0xfa,0xfa,0x15,0xef }, { 0x59,0x59,0xeb,0xb2 },
+ { 0x47,0x47,0xc9,0x8e }, { 0xf0,0xf0,0x0b,0xfb },
+ { 0xad,0xad,0xec,0x41 }, { 0xd4,0xd4,0x67,0xb3 },
+ { 0xa2,0xa2,0xfd,0x5f }, { 0xaf,0xaf,0xea,0x45 },
+ { 0x9c,0x9c,0xbf,0x23 }, { 0xa4,0xa4,0xf7,0x53 },
+ { 0x72,0x72,0x96,0xe4 }, { 0xc0,0xc0,0x5b,0x9b },
+ { 0xb7,0xb7,0xc2,0x75 }, { 0xfd,0xfd,0x1c,0xe1 },
+ { 0x93,0x93,0xae,0x3d }, { 0x26,0x26,0x6a,0x4c },
+ { 0x36,0x36,0x5a,0x6c }, { 0x3f,0x3f,0x41,0x7e },
+ { 0xf7,0xf7,0x02,0xf5 }, { 0xcc,0xcc,0x4f,0x83 },
+ { 0x34,0x34,0x5c,0x68 }, { 0xa5,0xa5,0xf4,0x51 },
+ { 0xe5,0xe5,0x34,0xd1 }, { 0xf1,0xf1,0x08,0xf9 },
+ { 0x71,0x71,0x93,0xe2 }, { 0xd8,0xd8,0x73,0xab },
+ { 0x31,0x31,0x53,0x62 }, { 0x15,0x15,0x3f,0x2a },
+ { 0x04,0x04,0x0c,0x08 }, { 0xc7,0xc7,0x52,0x95 },
+ { 0x23,0x23,0x65,0x46 }, { 0xc3,0xc3,0x5e,0x9d },
+ { 0x18,0x18,0x28,0x30 }, { 0x96,0x96,0xa1,0x37 },
+ { 0x05,0x05,0x0f,0x0a }, { 0x9a,0x9a,0xb5,0x2f },
+ { 0x07,0x07,0x09,0x0e }, { 0x12,0x12,0x36,0x24 },
+ { 0x80,0x80,0x9b,0x1b }, { 0xe2,0xe2,0x3d,0xdf },
+ { 0xeb,0xeb,0x26,0xcd }, { 0x27,0x27,0x69,0x4e },
+ { 0xb2,0xb2,0xcd,0x7f }, { 0x75,0x75,0x9f,0xea },
+ { 0x09,0x09,0x1b,0x12 }, { 0x83,0x83,0x9e,0x1d },
+ { 0x2c,0x2c,0x74,0x58 }, { 0x1a,0x1a,0x2e,0x34 },
+ { 0x1b,0x1b,0x2d,0x36 }, { 0x6e,0x6e,0xb2,0xdc },
+ { 0x5a,0x5a,0xee,0xb4 }, { 0xa0,0xa0,0xfb,0x5b },
+ { 0x52,0x52,0xf6,0xa4 }, { 0x3b,0x3b,0x4d,0x76 },
+ { 0xd6,0xd6,0x61,0xb7 }, { 0xb3,0xb3,0xce,0x7d },
+ { 0x29,0x29,0x7b,0x52 }, { 0xe3,0xe3,0x3e,0xdd },
+ { 0x2f,0x2f,0x71,0x5e }, { 0x84,0x84,0x97,0x13 },
+ { 0x53,0x53,0xf5,0xa6 }, { 0xd1,0xd1,0x68,0xb9 },
+ { 0x00,0x00,0x00,0x00 }, { 0xed,0xed,0x2c,0xc1 },
+ { 0x20,0x20,0x60,0x40 }, { 0xfc,0xfc,0x1f,0xe3 },
+ { 0xb1,0xb1,0xc8,0x79 }, { 0x5b,0x5b,0xed,0xb6 },
+ { 0x6a,0x6a,0xbe,0xd4 }, { 0xcb,0xcb,0x46,0x8d },
+ { 0xbe,0xbe,0xd9,0x67 }, { 0x39,0x39,0x4b,0x72 },
+ { 0x4a,0x4a,0xde,0x94 }, { 0x4c,0x4c,0xd4,0x98 },
+ { 0x58,0x58,0xe8,0xb0 }, { 0xcf,0xcf,0x4a,0x85 },
+ { 0xd0,0xd0,0x6b,0xbb }, { 0xef,0xef,0x2a,0xc5 },
+ { 0xaa,0xaa,0xe5,0x4f }, { 0xfb,0xfb,0x16,0xed },
+ { 0x43,0x43,0xc5,0x86 }, { 0x4d,0x4d,0xd7,0x9a },
+ { 0x33,0x33,0x55,0x66 }, { 0x85,0x85,0x94,0x11 },
+ { 0x45,0x45,0xcf,0x8a }, { 0xf9,0xf9,0x10,0xe9 },
+ { 0x02,0x02,0x06,0x04 }, { 0x7f,0x7f,0x81,0xfe },
+ { 0x50,0x50,0xf0,0xa0 }, { 0x3c,0x3c,0x44,0x78 },
+ { 0x9f,0x9f,0xba,0x25 }, { 0xa8,0xa8,0xe3,0x4b },
+ { 0x51,0x51,0xf3,0xa2 }, { 0xa3,0xa3,0xfe,0x5d },
+ { 0x40,0x40,0xc0,0x80 }, { 0x8f,0x8f,0x8a,0x05 },
+ { 0x92,0x92,0xad,0x3f }, { 0x9d,0x9d,0xbc,0x21 },
+ { 0x38,0x38,0x48,0x70 }, { 0xf5,0xf5,0x04,0xf1 },
+ { 0xbc,0xbc,0xdf,0x63 }, { 0xb6,0xb6,0xc1,0x77 },
+ { 0xda,0xda,0x75,0xaf }, { 0x21,0x21,0x63,0x42 },
+ { 0x10,0x10,0x30,0x20 }, { 0xff,0xff,0x1a,0xe5 },
+ { 0xf3,0xf3,0x0e,0xfd }, { 0xd2,0xd2,0x6d,0xbf },
+ { 0xcd,0xcd,0x4c,0x81 }, { 0x0c,0x0c,0x14,0x18 },
+ { 0x13,0x13,0x35,0x26 }, { 0xec,0xec,0x2f,0xc3 },
+ { 0x5f,0x5f,0xe1,0xbe }, { 0x97,0x97,0xa2,0x35 },
+ { 0x44,0x44,0xcc,0x88 }, { 0x17,0x17,0x39,0x2e },
+ { 0xc4,0xc4,0x57,0x93 }, { 0xa7,0xa7,0xf2,0x55 },
+ { 0x7e,0x7e,0x82,0xfc }, { 0x3d,0x3d,0x47,0x7a },
+ { 0x64,0x64,0xac,0xc8 }, { 0x5d,0x5d,0xe7,0xba },
+ { 0x19,0x19,0x2b,0x32 }, { 0x73,0x73,0x95,0xe6 },
+ { 0x60,0x60,0xa0,0xc0 }, { 0x81,0x81,0x98,0x19 },
+ { 0x4f,0x4f,0xd1,0x9e }, { 0xdc,0xdc,0x7f,0xa3 },
+ { 0x22,0x22,0x66,0x44 }, { 0x2a,0x2a,0x7e,0x54 },
+ { 0x90,0x90,0xab,0x3b }, { 0x88,0x88,0x83,0x0b },
+ { 0x46,0x46,0xca,0x8c }, { 0xee,0xee,0x29,0xc7 },
+ { 0xb8,0xb8,0xd3,0x6b }, { 0x14,0x14,0x3c,0x28 },
+ { 0xde,0xde,0x79,0xa7 }, { 0x5e,0x5e,0xe2,0xbc },
+ { 0x0b,0x0b,0x1d,0x16 }, { 0xdb,0xdb,0x76,0xad },
+ { 0xe0,0xe0,0x3b,0xdb }, { 0x32,0x32,0x56,0x64 },
+ { 0x3a,0x3a,0x4e,0x74 }, { 0x0a,0x0a,0x1e,0x14 },
+ { 0x49,0x49,0xdb,0x92 }, { 0x06,0x06,0x0a,0x0c },
+ { 0x24,0x24,0x6c,0x48 }, { 0x5c,0x5c,0xe4,0xb8 },
+ { 0xc2,0xc2,0x5d,0x9f }, { 0xd3,0xd3,0x6e,0xbd },
+ { 0xac,0xac,0xef,0x43 }, { 0x62,0x62,0xa6,0xc4 },
+ { 0x91,0x91,0xa8,0x39 }, { 0x95,0x95,0xa4,0x31 },
+ { 0xe4,0xe4,0x37,0xd3 }, { 0x79,0x79,0x8b,0xf2 },
+ { 0xe7,0xe7,0x32,0xd5 }, { 0xc8,0xc8,0x43,0x8b },
+ { 0x37,0x37,0x59,0x6e }, { 0x6d,0x6d,0xb7,0xda },
+ { 0x8d,0x8d,0x8c,0x01 }, { 0xd5,0xd5,0x64,0xb1 },
+ { 0x4e,0x4e,0xd2,0x9c }, { 0xa9,0xa9,0xe0,0x49 },
+ { 0x6c,0x6c,0xb4,0xd8 }, { 0x56,0x56,0xfa,0xac },
+ { 0xf4,0xf4,0x07,0xf3 }, { 0xea,0xea,0x25,0xcf },
+ { 0x65,0x65,0xaf,0xca }, { 0x7a,0x7a,0x8e,0xf4 },
+ { 0xae,0xae,0xe9,0x47 }, { 0x08,0x08,0x18,0x10 },
+ { 0xba,0xba,0xd5,0x6f }, { 0x78,0x78,0x88,0xf0 },
+ { 0x25,0x25,0x6f,0x4a }, { 0x2e,0x2e,0x72,0x5c },
+ { 0x1c,0x1c,0x24,0x38 }, { 0xa6,0xa6,0xf1,0x57 },
+ { 0xb4,0xb4,0xc7,0x73 }, { 0xc6,0xc6,0x51,0x97 },
+ { 0xe8,0xe8,0x23,0xcb }, { 0xdd,0xdd,0x7c,0xa1 },
+ { 0x74,0x74,0x9c,0xe8 }, { 0x1f,0x1f,0x21,0x3e },
+ { 0x4b,0x4b,0xdd,0x96 }, { 0xbd,0xbd,0xdc,0x61 },
+ { 0x8b,0x8b,0x86,0x0d }, { 0x8a,0x8a,0x85,0x0f },
+ { 0x70,0x70,0x90,0xe0 }, { 0x3e,0x3e,0x42,0x7c },
+ { 0xb5,0xb5,0xc4,0x71 }, { 0x66,0x66,0xaa,0xcc },
+ { 0x48,0x48,0xd8,0x90 }, { 0x03,0x03,0x05,0x06 },
+ { 0xf6,0xf6,0x01,0xf7 }, { 0x0e,0x0e,0x12,0x1c },
+ { 0x61,0x61,0xa3,0xc2 }, { 0x35,0x35,0x5f,0x6a },
+ { 0x57,0x57,0xf9,0xae }, { 0xb9,0xb9,0xd0,0x69 },
+ { 0x86,0x86,0x91,0x17 }, { 0xc1,0xc1,0x58,0x99 },
+ { 0x1d,0x1d,0x27,0x3a }, { 0x9e,0x9e,0xb9,0x27 },
+ { 0xe1,0xe1,0x38,0xd9 }, { 0xf8,0xf8,0x13,0xeb },
+ { 0x98,0x98,0xb3,0x2b }, { 0x11,0x11,0x33,0x22 },
+ { 0x69,0x69,0xbb,0xd2 }, { 0xd9,0xd9,0x70,0xa9 },
+ { 0x8e,0x8e,0x89,0x07 }, { 0x94,0x94,0xa7,0x33 },
+ { 0x9b,0x9b,0xb6,0x2d }, { 0x1e,0x1e,0x22,0x3c },
+ { 0x87,0x87,0x92,0x15 }, { 0xe9,0xe9,0x20,0xc9 },
+ { 0xce,0xce,0x49,0x87 }, { 0x55,0x55,0xff,0xaa },
+ { 0x28,0x28,0x78,0x50 }, { 0xdf,0xdf,0x7a,0xa5 },
+ { 0x8c,0x8c,0x8f,0x03 }, { 0xa1,0xa1,0xf8,0x59 },
+ { 0x89,0x89,0x80,0x09 }, { 0x0d,0x0d,0x17,0x1a },
+ { 0xbf,0xbf,0xda,0x65 }, { 0xe6,0xe6,0x31,0xd7 },
+ { 0x42,0x42,0xc6,0x84 }, { 0x68,0x68,0xb8,0xd0 },
+ { 0x41,0x41,0xc3,0x82 }, { 0x99,0x99,0xb0,0x29 },
+ { 0x2d,0x2d,0x77,0x5a }, { 0x0f,0x0f,0x11,0x1e },
+ { 0xb0,0xb0,0xcb,0x7b }, { 0x54,0x54,0xfc,0xa8 },
+ { 0xbb,0xbb,0xd6,0x6d }, { 0x16,0x16,0x3a,0x2c }
+ };
+
+static const unsigned char T5[256][4] =
+ {
+ { 0x51,0xf4,0xa7,0x50 }, { 0x7e,0x41,0x65,0x53 },
+ { 0x1a,0x17,0xa4,0xc3 }, { 0x3a,0x27,0x5e,0x96 },
+ { 0x3b,0xab,0x6b,0xcb }, { 0x1f,0x9d,0x45,0xf1 },
+ { 0xac,0xfa,0x58,0xab }, { 0x4b,0xe3,0x03,0x93 },
+ { 0x20,0x30,0xfa,0x55 }, { 0xad,0x76,0x6d,0xf6 },
+ { 0x88,0xcc,0x76,0x91 }, { 0xf5,0x02,0x4c,0x25 },
+ { 0x4f,0xe5,0xd7,0xfc }, { 0xc5,0x2a,0xcb,0xd7 },
+ { 0x26,0x35,0x44,0x80 }, { 0xb5,0x62,0xa3,0x8f },
+ { 0xde,0xb1,0x5a,0x49 }, { 0x25,0xba,0x1b,0x67 },
+ { 0x45,0xea,0x0e,0x98 }, { 0x5d,0xfe,0xc0,0xe1 },
+ { 0xc3,0x2f,0x75,0x02 }, { 0x81,0x4c,0xf0,0x12 },
+ { 0x8d,0x46,0x97,0xa3 }, { 0x6b,0xd3,0xf9,0xc6 },
+ { 0x03,0x8f,0x5f,0xe7 }, { 0x15,0x92,0x9c,0x95 },
+ { 0xbf,0x6d,0x7a,0xeb }, { 0x95,0x52,0x59,0xda },
+ { 0xd4,0xbe,0x83,0x2d }, { 0x58,0x74,0x21,0xd3 },
+ { 0x49,0xe0,0x69,0x29 }, { 0x8e,0xc9,0xc8,0x44 },
+ { 0x75,0xc2,0x89,0x6a }, { 0xf4,0x8e,0x79,0x78 },
+ { 0x99,0x58,0x3e,0x6b }, { 0x27,0xb9,0x71,0xdd },
+ { 0xbe,0xe1,0x4f,0xb6 }, { 0xf0,0x88,0xad,0x17 },
+ { 0xc9,0x20,0xac,0x66 }, { 0x7d,0xce,0x3a,0xb4 },
+ { 0x63,0xdf,0x4a,0x18 }, { 0xe5,0x1a,0x31,0x82 },
+ { 0x97,0x51,0x33,0x60 }, { 0x62,0x53,0x7f,0x45 },
+ { 0xb1,0x64,0x77,0xe0 }, { 0xbb,0x6b,0xae,0x84 },
+ { 0xfe,0x81,0xa0,0x1c }, { 0xf9,0x08,0x2b,0x94 },
+ { 0x70,0x48,0x68,0x58 }, { 0x8f,0x45,0xfd,0x19 },
+ { 0x94,0xde,0x6c,0x87 }, { 0x52,0x7b,0xf8,0xb7 },
+ { 0xab,0x73,0xd3,0x23 }, { 0x72,0x4b,0x02,0xe2 },
+ { 0xe3,0x1f,0x8f,0x57 }, { 0x66,0x55,0xab,0x2a },
+ { 0xb2,0xeb,0x28,0x07 }, { 0x2f,0xb5,0xc2,0x03 },
+ { 0x86,0xc5,0x7b,0x9a }, { 0xd3,0x37,0x08,0xa5 },
+ { 0x30,0x28,0x87,0xf2 }, { 0x23,0xbf,0xa5,0xb2 },
+ { 0x02,0x03,0x6a,0xba }, { 0xed,0x16,0x82,0x5c },
+ { 0x8a,0xcf,0x1c,0x2b }, { 0xa7,0x79,0xb4,0x92 },
+ { 0xf3,0x07,0xf2,0xf0 }, { 0x4e,0x69,0xe2,0xa1 },
+ { 0x65,0xda,0xf4,0xcd }, { 0x06,0x05,0xbe,0xd5 },
+ { 0xd1,0x34,0x62,0x1f }, { 0xc4,0xa6,0xfe,0x8a },
+ { 0x34,0x2e,0x53,0x9d }, { 0xa2,0xf3,0x55,0xa0 },
+ { 0x05,0x8a,0xe1,0x32 }, { 0xa4,0xf6,0xeb,0x75 },
+ { 0x0b,0x83,0xec,0x39 }, { 0x40,0x60,0xef,0xaa },
+ { 0x5e,0x71,0x9f,0x06 }, { 0xbd,0x6e,0x10,0x51 },
+ { 0x3e,0x21,0x8a,0xf9 }, { 0x96,0xdd,0x06,0x3d },
+ { 0xdd,0x3e,0x05,0xae }, { 0x4d,0xe6,0xbd,0x46 },
+ { 0x91,0x54,0x8d,0xb5 }, { 0x71,0xc4,0x5d,0x05 },
+ { 0x04,0x06,0xd4,0x6f }, { 0x60,0x50,0x15,0xff },
+ { 0x19,0x98,0xfb,0x24 }, { 0xd6,0xbd,0xe9,0x97 },
+ { 0x89,0x40,0x43,0xcc }, { 0x67,0xd9,0x9e,0x77 },
+ { 0xb0,0xe8,0x42,0xbd }, { 0x07,0x89,0x8b,0x88 },
+ { 0xe7,0x19,0x5b,0x38 }, { 0x79,0xc8,0xee,0xdb },
+ { 0xa1,0x7c,0x0a,0x47 }, { 0x7c,0x42,0x0f,0xe9 },
+ { 0xf8,0x84,0x1e,0xc9 }, { 0x00,0x00,0x00,0x00 },
+ { 0x09,0x80,0x86,0x83 }, { 0x32,0x2b,0xed,0x48 },
+ { 0x1e,0x11,0x70,0xac }, { 0x6c,0x5a,0x72,0x4e },
+ { 0xfd,0x0e,0xff,0xfb }, { 0x0f,0x85,0x38,0x56 },
+ { 0x3d,0xae,0xd5,0x1e }, { 0x36,0x2d,0x39,0x27 },
+ { 0x0a,0x0f,0xd9,0x64 }, { 0x68,0x5c,0xa6,0x21 },
+ { 0x9b,0x5b,0x54,0xd1 }, { 0x24,0x36,0x2e,0x3a },
+ { 0x0c,0x0a,0x67,0xb1 }, { 0x93,0x57,0xe7,0x0f },
+ { 0xb4,0xee,0x96,0xd2 }, { 0x1b,0x9b,0x91,0x9e },
+ { 0x80,0xc0,0xc5,0x4f }, { 0x61,0xdc,0x20,0xa2 },
+ { 0x5a,0x77,0x4b,0x69 }, { 0x1c,0x12,0x1a,0x16 },
+ { 0xe2,0x93,0xba,0x0a }, { 0xc0,0xa0,0x2a,0xe5 },
+ { 0x3c,0x22,0xe0,0x43 }, { 0x12,0x1b,0x17,0x1d },
+ { 0x0e,0x09,0x0d,0x0b }, { 0xf2,0x8b,0xc7,0xad },
+ { 0x2d,0xb6,0xa8,0xb9 }, { 0x14,0x1e,0xa9,0xc8 },
+ { 0x57,0xf1,0x19,0x85 }, { 0xaf,0x75,0x07,0x4c },
+ { 0xee,0x99,0xdd,0xbb }, { 0xa3,0x7f,0x60,0xfd },
+ { 0xf7,0x01,0x26,0x9f }, { 0x5c,0x72,0xf5,0xbc },
+ { 0x44,0x66,0x3b,0xc5 }, { 0x5b,0xfb,0x7e,0x34 },
+ { 0x8b,0x43,0x29,0x76 }, { 0xcb,0x23,0xc6,0xdc },
+ { 0xb6,0xed,0xfc,0x68 }, { 0xb8,0xe4,0xf1,0x63 },
+ { 0xd7,0x31,0xdc,0xca }, { 0x42,0x63,0x85,0x10 },
+ { 0x13,0x97,0x22,0x40 }, { 0x84,0xc6,0x11,0x20 },
+ { 0x85,0x4a,0x24,0x7d }, { 0xd2,0xbb,0x3d,0xf8 },
+ { 0xae,0xf9,0x32,0x11 }, { 0xc7,0x29,0xa1,0x6d },
+ { 0x1d,0x9e,0x2f,0x4b }, { 0xdc,0xb2,0x30,0xf3 },
+ { 0x0d,0x86,0x52,0xec }, { 0x77,0xc1,0xe3,0xd0 },
+ { 0x2b,0xb3,0x16,0x6c }, { 0xa9,0x70,0xb9,0x99 },
+ { 0x11,0x94,0x48,0xfa }, { 0x47,0xe9,0x64,0x22 },
+ { 0xa8,0xfc,0x8c,0xc4 }, { 0xa0,0xf0,0x3f,0x1a },
+ { 0x56,0x7d,0x2c,0xd8 }, { 0x22,0x33,0x90,0xef },
+ { 0x87,0x49,0x4e,0xc7 }, { 0xd9,0x38,0xd1,0xc1 },
+ { 0x8c,0xca,0xa2,0xfe }, { 0x98,0xd4,0x0b,0x36 },
+ { 0xa6,0xf5,0x81,0xcf }, { 0xa5,0x7a,0xde,0x28 },
+ { 0xda,0xb7,0x8e,0x26 }, { 0x3f,0xad,0xbf,0xa4 },
+ { 0x2c,0x3a,0x9d,0xe4 }, { 0x50,0x78,0x92,0x0d },
+ { 0x6a,0x5f,0xcc,0x9b }, { 0x54,0x7e,0x46,0x62 },
+ { 0xf6,0x8d,0x13,0xc2 }, { 0x90,0xd8,0xb8,0xe8 },
+ { 0x2e,0x39,0xf7,0x5e }, { 0x82,0xc3,0xaf,0xf5 },
+ { 0x9f,0x5d,0x80,0xbe }, { 0x69,0xd0,0x93,0x7c },
+ { 0x6f,0xd5,0x2d,0xa9 }, { 0xcf,0x25,0x12,0xb3 },
+ { 0xc8,0xac,0x99,0x3b }, { 0x10,0x18,0x7d,0xa7 },
+ { 0xe8,0x9c,0x63,0x6e }, { 0xdb,0x3b,0xbb,0x7b },
+ { 0xcd,0x26,0x78,0x09 }, { 0x6e,0x59,0x18,0xf4 },
+ { 0xec,0x9a,0xb7,0x01 }, { 0x83,0x4f,0x9a,0xa8 },
+ { 0xe6,0x95,0x6e,0x65 }, { 0xaa,0xff,0xe6,0x7e },
+ { 0x21,0xbc,0xcf,0x08 }, { 0xef,0x15,0xe8,0xe6 },
+ { 0xba,0xe7,0x9b,0xd9 }, { 0x4a,0x6f,0x36,0xce },
+ { 0xea,0x9f,0x09,0xd4 }, { 0x29,0xb0,0x7c,0xd6 },
+ { 0x31,0xa4,0xb2,0xaf }, { 0x2a,0x3f,0x23,0x31 },
+ { 0xc6,0xa5,0x94,0x30 }, { 0x35,0xa2,0x66,0xc0 },
+ { 0x74,0x4e,0xbc,0x37 }, { 0xfc,0x82,0xca,0xa6 },
+ { 0xe0,0x90,0xd0,0xb0 }, { 0x33,0xa7,0xd8,0x15 },
+ { 0xf1,0x04,0x98,0x4a }, { 0x41,0xec,0xda,0xf7 },
+ { 0x7f,0xcd,0x50,0x0e }, { 0x17,0x91,0xf6,0x2f },
+ { 0x76,0x4d,0xd6,0x8d }, { 0x43,0xef,0xb0,0x4d },
+ { 0xcc,0xaa,0x4d,0x54 }, { 0xe4,0x96,0x04,0xdf },
+ { 0x9e,0xd1,0xb5,0xe3 }, { 0x4c,0x6a,0x88,0x1b },
+ { 0xc1,0x2c,0x1f,0xb8 }, { 0x46,0x65,0x51,0x7f },
+ { 0x9d,0x5e,0xea,0x04 }, { 0x01,0x8c,0x35,0x5d },
+ { 0xfa,0x87,0x74,0x73 }, { 0xfb,0x0b,0x41,0x2e },
+ { 0xb3,0x67,0x1d,0x5a }, { 0x92,0xdb,0xd2,0x52 },
+ { 0xe9,0x10,0x56,0x33 }, { 0x6d,0xd6,0x47,0x13 },
+ { 0x9a,0xd7,0x61,0x8c }, { 0x37,0xa1,0x0c,0x7a },
+ { 0x59,0xf8,0x14,0x8e }, { 0xeb,0x13,0x3c,0x89 },
+ { 0xce,0xa9,0x27,0xee }, { 0xb7,0x61,0xc9,0x35 },
+ { 0xe1,0x1c,0xe5,0xed }, { 0x7a,0x47,0xb1,0x3c },
+ { 0x9c,0xd2,0xdf,0x59 }, { 0x55,0xf2,0x73,0x3f },
+ { 0x18,0x14,0xce,0x79 }, { 0x73,0xc7,0x37,0xbf },
+ { 0x53,0xf7,0xcd,0xea }, { 0x5f,0xfd,0xaa,0x5b },
+ { 0xdf,0x3d,0x6f,0x14 }, { 0x78,0x44,0xdb,0x86 },
+ { 0xca,0xaf,0xf3,0x81 }, { 0xb9,0x68,0xc4,0x3e },
+ { 0x38,0x24,0x34,0x2c }, { 0xc2,0xa3,0x40,0x5f },
+ { 0x16,0x1d,0xc3,0x72 }, { 0xbc,0xe2,0x25,0x0c },
+ { 0x28,0x3c,0x49,0x8b }, { 0xff,0x0d,0x95,0x41 },
+ { 0x39,0xa8,0x01,0x71 }, { 0x08,0x0c,0xb3,0xde },
+ { 0xd8,0xb4,0xe4,0x9c }, { 0x64,0x56,0xc1,0x90 },
+ { 0x7b,0xcb,0x84,0x61 }, { 0xd5,0x32,0xb6,0x70 },
+ { 0x48,0x6c,0x5c,0x74 }, { 0xd0,0xb8,0x57,0x42 }
+ };
+
+static const unsigned char T6[256][4] =
+ {
+ { 0x50,0x51,0xf4,0xa7 }, { 0x53,0x7e,0x41,0x65 },
+ { 0xc3,0x1a,0x17,0xa4 }, { 0x96,0x3a,0x27,0x5e },
+ { 0xcb,0x3b,0xab,0x6b }, { 0xf1,0x1f,0x9d,0x45 },
+ { 0xab,0xac,0xfa,0x58 }, { 0x93,0x4b,0xe3,0x03 },
+ { 0x55,0x20,0x30,0xfa }, { 0xf6,0xad,0x76,0x6d },
+ { 0x91,0x88,0xcc,0x76 }, { 0x25,0xf5,0x02,0x4c },
+ { 0xfc,0x4f,0xe5,0xd7 }, { 0xd7,0xc5,0x2a,0xcb },
+ { 0x80,0x26,0x35,0x44 }, { 0x8f,0xb5,0x62,0xa3 },
+ { 0x49,0xde,0xb1,0x5a }, { 0x67,0x25,0xba,0x1b },
+ { 0x98,0x45,0xea,0x0e }, { 0xe1,0x5d,0xfe,0xc0 },
+ { 0x02,0xc3,0x2f,0x75 }, { 0x12,0x81,0x4c,0xf0 },
+ { 0xa3,0x8d,0x46,0x97 }, { 0xc6,0x6b,0xd3,0xf9 },
+ { 0xe7,0x03,0x8f,0x5f }, { 0x95,0x15,0x92,0x9c },
+ { 0xeb,0xbf,0x6d,0x7a }, { 0xda,0x95,0x52,0x59 },
+ { 0x2d,0xd4,0xbe,0x83 }, { 0xd3,0x58,0x74,0x21 },
+ { 0x29,0x49,0xe0,0x69 }, { 0x44,0x8e,0xc9,0xc8 },
+ { 0x6a,0x75,0xc2,0x89 }, { 0x78,0xf4,0x8e,0x79 },
+ { 0x6b,0x99,0x58,0x3e }, { 0xdd,0x27,0xb9,0x71 },
+ { 0xb6,0xbe,0xe1,0x4f }, { 0x17,0xf0,0x88,0xad },
+ { 0x66,0xc9,0x20,0xac }, { 0xb4,0x7d,0xce,0x3a },
+ { 0x18,0x63,0xdf,0x4a }, { 0x82,0xe5,0x1a,0x31 },
+ { 0x60,0x97,0x51,0x33 }, { 0x45,0x62,0x53,0x7f },
+ { 0xe0,0xb1,0x64,0x77 }, { 0x84,0xbb,0x6b,0xae },
+ { 0x1c,0xfe,0x81,0xa0 }, { 0x94,0xf9,0x08,0x2b },
+ { 0x58,0x70,0x48,0x68 }, { 0x19,0x8f,0x45,0xfd },
+ { 0x87,0x94,0xde,0x6c }, { 0xb7,0x52,0x7b,0xf8 },
+ { 0x23,0xab,0x73,0xd3 }, { 0xe2,0x72,0x4b,0x02 },
+ { 0x57,0xe3,0x1f,0x8f }, { 0x2a,0x66,0x55,0xab },
+ { 0x07,0xb2,0xeb,0x28 }, { 0x03,0x2f,0xb5,0xc2 },
+ { 0x9a,0x86,0xc5,0x7b }, { 0xa5,0xd3,0x37,0x08 },
+ { 0xf2,0x30,0x28,0x87 }, { 0xb2,0x23,0xbf,0xa5 },
+ { 0xba,0x02,0x03,0x6a }, { 0x5c,0xed,0x16,0x82 },
+ { 0x2b,0x8a,0xcf,0x1c }, { 0x92,0xa7,0x79,0xb4 },
+ { 0xf0,0xf3,0x07,0xf2 }, { 0xa1,0x4e,0x69,0xe2 },
+ { 0xcd,0x65,0xda,0xf4 }, { 0xd5,0x06,0x05,0xbe },
+ { 0x1f,0xd1,0x34,0x62 }, { 0x8a,0xc4,0xa6,0xfe },
+ { 0x9d,0x34,0x2e,0x53 }, { 0xa0,0xa2,0xf3,0x55 },
+ { 0x32,0x05,0x8a,0xe1 }, { 0x75,0xa4,0xf6,0xeb },
+ { 0x39,0x0b,0x83,0xec }, { 0xaa,0x40,0x60,0xef },
+ { 0x06,0x5e,0x71,0x9f }, { 0x51,0xbd,0x6e,0x10 },
+ { 0xf9,0x3e,0x21,0x8a }, { 0x3d,0x96,0xdd,0x06 },
+ { 0xae,0xdd,0x3e,0x05 }, { 0x46,0x4d,0xe6,0xbd },
+ { 0xb5,0x91,0x54,0x8d }, { 0x05,0x71,0xc4,0x5d },
+ { 0x6f,0x04,0x06,0xd4 }, { 0xff,0x60,0x50,0x15 },
+ { 0x24,0x19,0x98,0xfb }, { 0x97,0xd6,0xbd,0xe9 },
+ { 0xcc,0x89,0x40,0x43 }, { 0x77,0x67,0xd9,0x9e },
+ { 0xbd,0xb0,0xe8,0x42 }, { 0x88,0x07,0x89,0x8b },
+ { 0x38,0xe7,0x19,0x5b }, { 0xdb,0x79,0xc8,0xee },
+ { 0x47,0xa1,0x7c,0x0a }, { 0xe9,0x7c,0x42,0x0f },
+ { 0xc9,0xf8,0x84,0x1e }, { 0x00,0x00,0x00,0x00 },
+ { 0x83,0x09,0x80,0x86 }, { 0x48,0x32,0x2b,0xed },
+ { 0xac,0x1e,0x11,0x70 }, { 0x4e,0x6c,0x5a,0x72 },
+ { 0xfb,0xfd,0x0e,0xff }, { 0x56,0x0f,0x85,0x38 },
+ { 0x1e,0x3d,0xae,0xd5 }, { 0x27,0x36,0x2d,0x39 },
+ { 0x64,0x0a,0x0f,0xd9 }, { 0x21,0x68,0x5c,0xa6 },
+ { 0xd1,0x9b,0x5b,0x54 }, { 0x3a,0x24,0x36,0x2e },
+ { 0xb1,0x0c,0x0a,0x67 }, { 0x0f,0x93,0x57,0xe7 },
+ { 0xd2,0xb4,0xee,0x96 }, { 0x9e,0x1b,0x9b,0x91 },
+ { 0x4f,0x80,0xc0,0xc5 }, { 0xa2,0x61,0xdc,0x20 },
+ { 0x69,0x5a,0x77,0x4b }, { 0x16,0x1c,0x12,0x1a },
+ { 0x0a,0xe2,0x93,0xba }, { 0xe5,0xc0,0xa0,0x2a },
+ { 0x43,0x3c,0x22,0xe0 }, { 0x1d,0x12,0x1b,0x17 },
+ { 0x0b,0x0e,0x09,0x0d }, { 0xad,0xf2,0x8b,0xc7 },
+ { 0xb9,0x2d,0xb6,0xa8 }, { 0xc8,0x14,0x1e,0xa9 },
+ { 0x85,0x57,0xf1,0x19 }, { 0x4c,0xaf,0x75,0x07 },
+ { 0xbb,0xee,0x99,0xdd }, { 0xfd,0xa3,0x7f,0x60 },
+ { 0x9f,0xf7,0x01,0x26 }, { 0xbc,0x5c,0x72,0xf5 },
+ { 0xc5,0x44,0x66,0x3b }, { 0x34,0x5b,0xfb,0x7e },
+ { 0x76,0x8b,0x43,0x29 }, { 0xdc,0xcb,0x23,0xc6 },
+ { 0x68,0xb6,0xed,0xfc }, { 0x63,0xb8,0xe4,0xf1 },
+ { 0xca,0xd7,0x31,0xdc }, { 0x10,0x42,0x63,0x85 },
+ { 0x40,0x13,0x97,0x22 }, { 0x20,0x84,0xc6,0x11 },
+ { 0x7d,0x85,0x4a,0x24 }, { 0xf8,0xd2,0xbb,0x3d },
+ { 0x11,0xae,0xf9,0x32 }, { 0x6d,0xc7,0x29,0xa1 },
+ { 0x4b,0x1d,0x9e,0x2f }, { 0xf3,0xdc,0xb2,0x30 },
+ { 0xec,0x0d,0x86,0x52 }, { 0xd0,0x77,0xc1,0xe3 },
+ { 0x6c,0x2b,0xb3,0x16 }, { 0x99,0xa9,0x70,0xb9 },
+ { 0xfa,0x11,0x94,0x48 }, { 0x22,0x47,0xe9,0x64 },
+ { 0xc4,0xa8,0xfc,0x8c }, { 0x1a,0xa0,0xf0,0x3f },
+ { 0xd8,0x56,0x7d,0x2c }, { 0xef,0x22,0x33,0x90 },
+ { 0xc7,0x87,0x49,0x4e }, { 0xc1,0xd9,0x38,0xd1 },
+ { 0xfe,0x8c,0xca,0xa2 }, { 0x36,0x98,0xd4,0x0b },
+ { 0xcf,0xa6,0xf5,0x81 }, { 0x28,0xa5,0x7a,0xde },
+ { 0x26,0xda,0xb7,0x8e }, { 0xa4,0x3f,0xad,0xbf },
+ { 0xe4,0x2c,0x3a,0x9d }, { 0x0d,0x50,0x78,0x92 },
+ { 0x9b,0x6a,0x5f,0xcc }, { 0x62,0x54,0x7e,0x46 },
+ { 0xc2,0xf6,0x8d,0x13 }, { 0xe8,0x90,0xd8,0xb8 },
+ { 0x5e,0x2e,0x39,0xf7 }, { 0xf5,0x82,0xc3,0xaf },
+ { 0xbe,0x9f,0x5d,0x80 }, { 0x7c,0x69,0xd0,0x93 },
+ { 0xa9,0x6f,0xd5,0x2d }, { 0xb3,0xcf,0x25,0x12 },
+ { 0x3b,0xc8,0xac,0x99 }, { 0xa7,0x10,0x18,0x7d },
+ { 0x6e,0xe8,0x9c,0x63 }, { 0x7b,0xdb,0x3b,0xbb },
+ { 0x09,0xcd,0x26,0x78 }, { 0xf4,0x6e,0x59,0x18 },
+ { 0x01,0xec,0x9a,0xb7 }, { 0xa8,0x83,0x4f,0x9a },
+ { 0x65,0xe6,0x95,0x6e }, { 0x7e,0xaa,0xff,0xe6 },
+ { 0x08,0x21,0xbc,0xcf }, { 0xe6,0xef,0x15,0xe8 },
+ { 0xd9,0xba,0xe7,0x9b }, { 0xce,0x4a,0x6f,0x36 },
+ { 0xd4,0xea,0x9f,0x09 }, { 0xd6,0x29,0xb0,0x7c },
+ { 0xaf,0x31,0xa4,0xb2 }, { 0x31,0x2a,0x3f,0x23 },
+ { 0x30,0xc6,0xa5,0x94 }, { 0xc0,0x35,0xa2,0x66 },
+ { 0x37,0x74,0x4e,0xbc }, { 0xa6,0xfc,0x82,0xca },
+ { 0xb0,0xe0,0x90,0xd0 }, { 0x15,0x33,0xa7,0xd8 },
+ { 0x4a,0xf1,0x04,0x98 }, { 0xf7,0x41,0xec,0xda },
+ { 0x0e,0x7f,0xcd,0x50 }, { 0x2f,0x17,0x91,0xf6 },
+ { 0x8d,0x76,0x4d,0xd6 }, { 0x4d,0x43,0xef,0xb0 },
+ { 0x54,0xcc,0xaa,0x4d }, { 0xdf,0xe4,0x96,0x04 },
+ { 0xe3,0x9e,0xd1,0xb5 }, { 0x1b,0x4c,0x6a,0x88 },
+ { 0xb8,0xc1,0x2c,0x1f }, { 0x7f,0x46,0x65,0x51 },
+ { 0x04,0x9d,0x5e,0xea }, { 0x5d,0x01,0x8c,0x35 },
+ { 0x73,0xfa,0x87,0x74 }, { 0x2e,0xfb,0x0b,0x41 },
+ { 0x5a,0xb3,0x67,0x1d }, { 0x52,0x92,0xdb,0xd2 },
+ { 0x33,0xe9,0x10,0x56 }, { 0x13,0x6d,0xd6,0x47 },
+ { 0x8c,0x9a,0xd7,0x61 }, { 0x7a,0x37,0xa1,0x0c },
+ { 0x8e,0x59,0xf8,0x14 }, { 0x89,0xeb,0x13,0x3c },
+ { 0xee,0xce,0xa9,0x27 }, { 0x35,0xb7,0x61,0xc9 },
+ { 0xed,0xe1,0x1c,0xe5 }, { 0x3c,0x7a,0x47,0xb1 },
+ { 0x59,0x9c,0xd2,0xdf }, { 0x3f,0x55,0xf2,0x73 },
+ { 0x79,0x18,0x14,0xce }, { 0xbf,0x73,0xc7,0x37 },
+ { 0xea,0x53,0xf7,0xcd }, { 0x5b,0x5f,0xfd,0xaa },
+ { 0x14,0xdf,0x3d,0x6f }, { 0x86,0x78,0x44,0xdb },
+ { 0x81,0xca,0xaf,0xf3 }, { 0x3e,0xb9,0x68,0xc4 },
+ { 0x2c,0x38,0x24,0x34 }, { 0x5f,0xc2,0xa3,0x40 },
+ { 0x72,0x16,0x1d,0xc3 }, { 0x0c,0xbc,0xe2,0x25 },
+ { 0x8b,0x28,0x3c,0x49 }, { 0x41,0xff,0x0d,0x95 },
+ { 0x71,0x39,0xa8,0x01 }, { 0xde,0x08,0x0c,0xb3 },
+ { 0x9c,0xd8,0xb4,0xe4 }, { 0x90,0x64,0x56,0xc1 },
+ { 0x61,0x7b,0xcb,0x84 }, { 0x70,0xd5,0x32,0xb6 },
+ { 0x74,0x48,0x6c,0x5c }, { 0x42,0xd0,0xb8,0x57 }
+ };
+
+static const unsigned char T7[256][4] =
+ {
+ { 0xa7,0x50,0x51,0xf4 }, { 0x65,0x53,0x7e,0x41 },
+ { 0xa4,0xc3,0x1a,0x17 }, { 0x5e,0x96,0x3a,0x27 },
+ { 0x6b,0xcb,0x3b,0xab }, { 0x45,0xf1,0x1f,0x9d },
+ { 0x58,0xab,0xac,0xfa }, { 0x03,0x93,0x4b,0xe3 },
+ { 0xfa,0x55,0x20,0x30 }, { 0x6d,0xf6,0xad,0x76 },
+ { 0x76,0x91,0x88,0xcc }, { 0x4c,0x25,0xf5,0x02 },
+ { 0xd7,0xfc,0x4f,0xe5 }, { 0xcb,0xd7,0xc5,0x2a },
+ { 0x44,0x80,0x26,0x35 }, { 0xa3,0x8f,0xb5,0x62 },
+ { 0x5a,0x49,0xde,0xb1 }, { 0x1b,0x67,0x25,0xba },
+ { 0x0e,0x98,0x45,0xea }, { 0xc0,0xe1,0x5d,0xfe },
+ { 0x75,0x02,0xc3,0x2f }, { 0xf0,0x12,0x81,0x4c },
+ { 0x97,0xa3,0x8d,0x46 }, { 0xf9,0xc6,0x6b,0xd3 },
+ { 0x5f,0xe7,0x03,0x8f }, { 0x9c,0x95,0x15,0x92 },
+ { 0x7a,0xeb,0xbf,0x6d }, { 0x59,0xda,0x95,0x52 },
+ { 0x83,0x2d,0xd4,0xbe }, { 0x21,0xd3,0x58,0x74 },
+ { 0x69,0x29,0x49,0xe0 }, { 0xc8,0x44,0x8e,0xc9 },
+ { 0x89,0x6a,0x75,0xc2 }, { 0x79,0x78,0xf4,0x8e },
+ { 0x3e,0x6b,0x99,0x58 }, { 0x71,0xdd,0x27,0xb9 },
+ { 0x4f,0xb6,0xbe,0xe1 }, { 0xad,0x17,0xf0,0x88 },
+ { 0xac,0x66,0xc9,0x20 }, { 0x3a,0xb4,0x7d,0xce },
+ { 0x4a,0x18,0x63,0xdf }, { 0x31,0x82,0xe5,0x1a },
+ { 0x33,0x60,0x97,0x51 }, { 0x7f,0x45,0x62,0x53 },
+ { 0x77,0xe0,0xb1,0x64 }, { 0xae,0x84,0xbb,0x6b },
+ { 0xa0,0x1c,0xfe,0x81 }, { 0x2b,0x94,0xf9,0x08 },
+ { 0x68,0x58,0x70,0x48 }, { 0xfd,0x19,0x8f,0x45 },
+ { 0x6c,0x87,0x94,0xde }, { 0xf8,0xb7,0x52,0x7b },
+ { 0xd3,0x23,0xab,0x73 }, { 0x02,0xe2,0x72,0x4b },
+ { 0x8f,0x57,0xe3,0x1f }, { 0xab,0x2a,0x66,0x55 },
+ { 0x28,0x07,0xb2,0xeb }, { 0xc2,0x03,0x2f,0xb5 },
+ { 0x7b,0x9a,0x86,0xc5 }, { 0x08,0xa5,0xd3,0x37 },
+ { 0x87,0xf2,0x30,0x28 }, { 0xa5,0xb2,0x23,0xbf },
+ { 0x6a,0xba,0x02,0x03 }, { 0x82,0x5c,0xed,0x16 },
+ { 0x1c,0x2b,0x8a,0xcf }, { 0xb4,0x92,0xa7,0x79 },
+ { 0xf2,0xf0,0xf3,0x07 }, { 0xe2,0xa1,0x4e,0x69 },
+ { 0xf4,0xcd,0x65,0xda }, { 0xbe,0xd5,0x06,0x05 },
+ { 0x62,0x1f,0xd1,0x34 }, { 0xfe,0x8a,0xc4,0xa6 },
+ { 0x53,0x9d,0x34,0x2e }, { 0x55,0xa0,0xa2,0xf3 },
+ { 0xe1,0x32,0x05,0x8a }, { 0xeb,0x75,0xa4,0xf6 },
+ { 0xec,0x39,0x0b,0x83 }, { 0xef,0xaa,0x40,0x60 },
+ { 0x9f,0x06,0x5e,0x71 }, { 0x10,0x51,0xbd,0x6e },
+ { 0x8a,0xf9,0x3e,0x21 }, { 0x06,0x3d,0x96,0xdd },
+ { 0x05,0xae,0xdd,0x3e }, { 0xbd,0x46,0x4d,0xe6 },
+ { 0x8d,0xb5,0x91,0x54 }, { 0x5d,0x05,0x71,0xc4 },
+ { 0xd4,0x6f,0x04,0x06 }, { 0x15,0xff,0x60,0x50 },
+ { 0xfb,0x24,0x19,0x98 }, { 0xe9,0x97,0xd6,0xbd },
+ { 0x43,0xcc,0x89,0x40 }, { 0x9e,0x77,0x67,0xd9 },
+ { 0x42,0xbd,0xb0,0xe8 }, { 0x8b,0x88,0x07,0x89 },
+ { 0x5b,0x38,0xe7,0x19 }, { 0xee,0xdb,0x79,0xc8 },
+ { 0x0a,0x47,0xa1,0x7c }, { 0x0f,0xe9,0x7c,0x42 },
+ { 0x1e,0xc9,0xf8,0x84 }, { 0x00,0x00,0x00,0x00 },
+ { 0x86,0x83,0x09,0x80 }, { 0xed,0x48,0x32,0x2b },
+ { 0x70,0xac,0x1e,0x11 }, { 0x72,0x4e,0x6c,0x5a },
+ { 0xff,0xfb,0xfd,0x0e }, { 0x38,0x56,0x0f,0x85 },
+ { 0xd5,0x1e,0x3d,0xae }, { 0x39,0x27,0x36,0x2d },
+ { 0xd9,0x64,0x0a,0x0f }, { 0xa6,0x21,0x68,0x5c },
+ { 0x54,0xd1,0x9b,0x5b }, { 0x2e,0x3a,0x24,0x36 },
+ { 0x67,0xb1,0x0c,0x0a }, { 0xe7,0x0f,0x93,0x57 },
+ { 0x96,0xd2,0xb4,0xee }, { 0x91,0x9e,0x1b,0x9b },
+ { 0xc5,0x4f,0x80,0xc0 }, { 0x20,0xa2,0x61,0xdc },
+ { 0x4b,0x69,0x5a,0x77 }, { 0x1a,0x16,0x1c,0x12 },
+ { 0xba,0x0a,0xe2,0x93 }, { 0x2a,0xe5,0xc0,0xa0 },
+ { 0xe0,0x43,0x3c,0x22 }, { 0x17,0x1d,0x12,0x1b },
+ { 0x0d,0x0b,0x0e,0x09 }, { 0xc7,0xad,0xf2,0x8b },
+ { 0xa8,0xb9,0x2d,0xb6 }, { 0xa9,0xc8,0x14,0x1e },
+ { 0x19,0x85,0x57,0xf1 }, { 0x07,0x4c,0xaf,0x75 },
+ { 0xdd,0xbb,0xee,0x99 }, { 0x60,0xfd,0xa3,0x7f },
+ { 0x26,0x9f,0xf7,0x01 }, { 0xf5,0xbc,0x5c,0x72 },
+ { 0x3b,0xc5,0x44,0x66 }, { 0x7e,0x34,0x5b,0xfb },
+ { 0x29,0x76,0x8b,0x43 }, { 0xc6,0xdc,0xcb,0x23 },
+ { 0xfc,0x68,0xb6,0xed }, { 0xf1,0x63,0xb8,0xe4 },
+ { 0xdc,0xca,0xd7,0x31 }, { 0x85,0x10,0x42,0x63 },
+ { 0x22,0x40,0x13,0x97 }, { 0x11,0x20,0x84,0xc6 },
+ { 0x24,0x7d,0x85,0x4a }, { 0x3d,0xf8,0xd2,0xbb },
+ { 0x32,0x11,0xae,0xf9 }, { 0xa1,0x6d,0xc7,0x29 },
+ { 0x2f,0x4b,0x1d,0x9e }, { 0x30,0xf3,0xdc,0xb2 },
+ { 0x52,0xec,0x0d,0x86 }, { 0xe3,0xd0,0x77,0xc1 },
+ { 0x16,0x6c,0x2b,0xb3 }, { 0xb9,0x99,0xa9,0x70 },
+ { 0x48,0xfa,0x11,0x94 }, { 0x64,0x22,0x47,0xe9 },
+ { 0x8c,0xc4,0xa8,0xfc }, { 0x3f,0x1a,0xa0,0xf0 },
+ { 0x2c,0xd8,0x56,0x7d }, { 0x90,0xef,0x22,0x33 },
+ { 0x4e,0xc7,0x87,0x49 }, { 0xd1,0xc1,0xd9,0x38 },
+ { 0xa2,0xfe,0x8c,0xca }, { 0x0b,0x36,0x98,0xd4 },
+ { 0x81,0xcf,0xa6,0xf5 }, { 0xde,0x28,0xa5,0x7a },
+ { 0x8e,0x26,0xda,0xb7 }, { 0xbf,0xa4,0x3f,0xad },
+ { 0x9d,0xe4,0x2c,0x3a }, { 0x92,0x0d,0x50,0x78 },
+ { 0xcc,0x9b,0x6a,0x5f }, { 0x46,0x62,0x54,0x7e },
+ { 0x13,0xc2,0xf6,0x8d }, { 0xb8,0xe8,0x90,0xd8 },
+ { 0xf7,0x5e,0x2e,0x39 }, { 0xaf,0xf5,0x82,0xc3 },
+ { 0x80,0xbe,0x9f,0x5d }, { 0x93,0x7c,0x69,0xd0 },
+ { 0x2d,0xa9,0x6f,0xd5 }, { 0x12,0xb3,0xcf,0x25 },
+ { 0x99,0x3b,0xc8,0xac }, { 0x7d,0xa7,0x10,0x18 },
+ { 0x63,0x6e,0xe8,0x9c }, { 0xbb,0x7b,0xdb,0x3b },
+ { 0x78,0x09,0xcd,0x26 }, { 0x18,0xf4,0x6e,0x59 },
+ { 0xb7,0x01,0xec,0x9a }, { 0x9a,0xa8,0x83,0x4f },
+ { 0x6e,0x65,0xe6,0x95 }, { 0xe6,0x7e,0xaa,0xff },
+ { 0xcf,0x08,0x21,0xbc }, { 0xe8,0xe6,0xef,0x15 },
+ { 0x9b,0xd9,0xba,0xe7 }, { 0x36,0xce,0x4a,0x6f },
+ { 0x09,0xd4,0xea,0x9f }, { 0x7c,0xd6,0x29,0xb0 },
+ { 0xb2,0xaf,0x31,0xa4 }, { 0x23,0x31,0x2a,0x3f },
+ { 0x94,0x30,0xc6,0xa5 }, { 0x66,0xc0,0x35,0xa2 },
+ { 0xbc,0x37,0x74,0x4e }, { 0xca,0xa6,0xfc,0x82 },
+ { 0xd0,0xb0,0xe0,0x90 }, { 0xd8,0x15,0x33,0xa7 },
+ { 0x98,0x4a,0xf1,0x04 }, { 0xda,0xf7,0x41,0xec },
+ { 0x50,0x0e,0x7f,0xcd }, { 0xf6,0x2f,0x17,0x91 },
+ { 0xd6,0x8d,0x76,0x4d }, { 0xb0,0x4d,0x43,0xef },
+ { 0x4d,0x54,0xcc,0xaa }, { 0x04,0xdf,0xe4,0x96 },
+ { 0xb5,0xe3,0x9e,0xd1 }, { 0x88,0x1b,0x4c,0x6a },
+ { 0x1f,0xb8,0xc1,0x2c }, { 0x51,0x7f,0x46,0x65 },
+ { 0xea,0x04,0x9d,0x5e }, { 0x35,0x5d,0x01,0x8c },
+ { 0x74,0x73,0xfa,0x87 }, { 0x41,0x2e,0xfb,0x0b },
+ { 0x1d,0x5a,0xb3,0x67 }, { 0xd2,0x52,0x92,0xdb },
+ { 0x56,0x33,0xe9,0x10 }, { 0x47,0x13,0x6d,0xd6 },
+ { 0x61,0x8c,0x9a,0xd7 }, { 0x0c,0x7a,0x37,0xa1 },
+ { 0x14,0x8e,0x59,0xf8 }, { 0x3c,0x89,0xeb,0x13 },
+ { 0x27,0xee,0xce,0xa9 }, { 0xc9,0x35,0xb7,0x61 },
+ { 0xe5,0xed,0xe1,0x1c }, { 0xb1,0x3c,0x7a,0x47 },
+ { 0xdf,0x59,0x9c,0xd2 }, { 0x73,0x3f,0x55,0xf2 },
+ { 0xce,0x79,0x18,0x14 }, { 0x37,0xbf,0x73,0xc7 },
+ { 0xcd,0xea,0x53,0xf7 }, { 0xaa,0x5b,0x5f,0xfd },
+ { 0x6f,0x14,0xdf,0x3d }, { 0xdb,0x86,0x78,0x44 },
+ { 0xf3,0x81,0xca,0xaf }, { 0xc4,0x3e,0xb9,0x68 },
+ { 0x34,0x2c,0x38,0x24 }, { 0x40,0x5f,0xc2,0xa3 },
+ { 0xc3,0x72,0x16,0x1d }, { 0x25,0x0c,0xbc,0xe2 },
+ { 0x49,0x8b,0x28,0x3c }, { 0x95,0x41,0xff,0x0d },
+ { 0x01,0x71,0x39,0xa8 }, { 0xb3,0xde,0x08,0x0c },
+ { 0xe4,0x9c,0xd8,0xb4 }, { 0xc1,0x90,0x64,0x56 },
+ { 0x84,0x61,0x7b,0xcb }, { 0xb6,0x70,0xd5,0x32 },
+ { 0x5c,0x74,0x48,0x6c }, { 0x57,0x42,0xd0,0xb8 }
+ };
+
+static const unsigned char T8[256][4] =
+ {
+ { 0xf4,0xa7,0x50,0x51 }, { 0x41,0x65,0x53,0x7e },
+ { 0x17,0xa4,0xc3,0x1a }, { 0x27,0x5e,0x96,0x3a },
+ { 0xab,0x6b,0xcb,0x3b }, { 0x9d,0x45,0xf1,0x1f },
+ { 0xfa,0x58,0xab,0xac }, { 0xe3,0x03,0x93,0x4b },
+ { 0x30,0xfa,0x55,0x20 }, { 0x76,0x6d,0xf6,0xad },
+ { 0xcc,0x76,0x91,0x88 }, { 0x02,0x4c,0x25,0xf5 },
+ { 0xe5,0xd7,0xfc,0x4f }, { 0x2a,0xcb,0xd7,0xc5 },
+ { 0x35,0x44,0x80,0x26 }, { 0x62,0xa3,0x8f,0xb5 },
+ { 0xb1,0x5a,0x49,0xde }, { 0xba,0x1b,0x67,0x25 },
+ { 0xea,0x0e,0x98,0x45 }, { 0xfe,0xc0,0xe1,0x5d },
+ { 0x2f,0x75,0x02,0xc3 }, { 0x4c,0xf0,0x12,0x81 },
+ { 0x46,0x97,0xa3,0x8d }, { 0xd3,0xf9,0xc6,0x6b },
+ { 0x8f,0x5f,0xe7,0x03 }, { 0x92,0x9c,0x95,0x15 },
+ { 0x6d,0x7a,0xeb,0xbf }, { 0x52,0x59,0xda,0x95 },
+ { 0xbe,0x83,0x2d,0xd4 }, { 0x74,0x21,0xd3,0x58 },
+ { 0xe0,0x69,0x29,0x49 }, { 0xc9,0xc8,0x44,0x8e },
+ { 0xc2,0x89,0x6a,0x75 }, { 0x8e,0x79,0x78,0xf4 },
+ { 0x58,0x3e,0x6b,0x99 }, { 0xb9,0x71,0xdd,0x27 },
+ { 0xe1,0x4f,0xb6,0xbe }, { 0x88,0xad,0x17,0xf0 },
+ { 0x20,0xac,0x66,0xc9 }, { 0xce,0x3a,0xb4,0x7d },
+ { 0xdf,0x4a,0x18,0x63 }, { 0x1a,0x31,0x82,0xe5 },
+ { 0x51,0x33,0x60,0x97 }, { 0x53,0x7f,0x45,0x62 },
+ { 0x64,0x77,0xe0,0xb1 }, { 0x6b,0xae,0x84,0xbb },
+ { 0x81,0xa0,0x1c,0xfe }, { 0x08,0x2b,0x94,0xf9 },
+ { 0x48,0x68,0x58,0x70 }, { 0x45,0xfd,0x19,0x8f },
+ { 0xde,0x6c,0x87,0x94 }, { 0x7b,0xf8,0xb7,0x52 },
+ { 0x73,0xd3,0x23,0xab }, { 0x4b,0x02,0xe2,0x72 },
+ { 0x1f,0x8f,0x57,0xe3 }, { 0x55,0xab,0x2a,0x66 },
+ { 0xeb,0x28,0x07,0xb2 }, { 0xb5,0xc2,0x03,0x2f },
+ { 0xc5,0x7b,0x9a,0x86 }, { 0x37,0x08,0xa5,0xd3 },
+ { 0x28,0x87,0xf2,0x30 }, { 0xbf,0xa5,0xb2,0x23 },
+ { 0x03,0x6a,0xba,0x02 }, { 0x16,0x82,0x5c,0xed },
+ { 0xcf,0x1c,0x2b,0x8a }, { 0x79,0xb4,0x92,0xa7 },
+ { 0x07,0xf2,0xf0,0xf3 }, { 0x69,0xe2,0xa1,0x4e },
+ { 0xda,0xf4,0xcd,0x65 }, { 0x05,0xbe,0xd5,0x06 },
+ { 0x34,0x62,0x1f,0xd1 }, { 0xa6,0xfe,0x8a,0xc4 },
+ { 0x2e,0x53,0x9d,0x34 }, { 0xf3,0x55,0xa0,0xa2 },
+ { 0x8a,0xe1,0x32,0x05 }, { 0xf6,0xeb,0x75,0xa4 },
+ { 0x83,0xec,0x39,0x0b }, { 0x60,0xef,0xaa,0x40 },
+ { 0x71,0x9f,0x06,0x5e }, { 0x6e,0x10,0x51,0xbd },
+ { 0x21,0x8a,0xf9,0x3e }, { 0xdd,0x06,0x3d,0x96 },
+ { 0x3e,0x05,0xae,0xdd }, { 0xe6,0xbd,0x46,0x4d },
+ { 0x54,0x8d,0xb5,0x91 }, { 0xc4,0x5d,0x05,0x71 },
+ { 0x06,0xd4,0x6f,0x04 }, { 0x50,0x15,0xff,0x60 },
+ { 0x98,0xfb,0x24,0x19 }, { 0xbd,0xe9,0x97,0xd6 },
+ { 0x40,0x43,0xcc,0x89 }, { 0xd9,0x9e,0x77,0x67 },
+ { 0xe8,0x42,0xbd,0xb0 }, { 0x89,0x8b,0x88,0x07 },
+ { 0x19,0x5b,0x38,0xe7 }, { 0xc8,0xee,0xdb,0x79 },
+ { 0x7c,0x0a,0x47,0xa1 }, { 0x42,0x0f,0xe9,0x7c },
+ { 0x84,0x1e,0xc9,0xf8 }, { 0x00,0x00,0x00,0x00 },
+ { 0x80,0x86,0x83,0x09 }, { 0x2b,0xed,0x48,0x32 },
+ { 0x11,0x70,0xac,0x1e }, { 0x5a,0x72,0x4e,0x6c },
+ { 0x0e,0xff,0xfb,0xfd }, { 0x85,0x38,0x56,0x0f },
+ { 0xae,0xd5,0x1e,0x3d }, { 0x2d,0x39,0x27,0x36 },
+ { 0x0f,0xd9,0x64,0x0a }, { 0x5c,0xa6,0x21,0x68 },
+ { 0x5b,0x54,0xd1,0x9b }, { 0x36,0x2e,0x3a,0x24 },
+ { 0x0a,0x67,0xb1,0x0c }, { 0x57,0xe7,0x0f,0x93 },
+ { 0xee,0x96,0xd2,0xb4 }, { 0x9b,0x91,0x9e,0x1b },
+ { 0xc0,0xc5,0x4f,0x80 }, { 0xdc,0x20,0xa2,0x61 },
+ { 0x77,0x4b,0x69,0x5a }, { 0x12,0x1a,0x16,0x1c },
+ { 0x93,0xba,0x0a,0xe2 }, { 0xa0,0x2a,0xe5,0xc0 },
+ { 0x22,0xe0,0x43,0x3c }, { 0x1b,0x17,0x1d,0x12 },
+ { 0x09,0x0d,0x0b,0x0e }, { 0x8b,0xc7,0xad,0xf2 },
+ { 0xb6,0xa8,0xb9,0x2d }, { 0x1e,0xa9,0xc8,0x14 },
+ { 0xf1,0x19,0x85,0x57 }, { 0x75,0x07,0x4c,0xaf },
+ { 0x99,0xdd,0xbb,0xee }, { 0x7f,0x60,0xfd,0xa3 },
+ { 0x01,0x26,0x9f,0xf7 }, { 0x72,0xf5,0xbc,0x5c },
+ { 0x66,0x3b,0xc5,0x44 }, { 0xfb,0x7e,0x34,0x5b },
+ { 0x43,0x29,0x76,0x8b }, { 0x23,0xc6,0xdc,0xcb },
+ { 0xed,0xfc,0x68,0xb6 }, { 0xe4,0xf1,0x63,0xb8 },
+ { 0x31,0xdc,0xca,0xd7 }, { 0x63,0x85,0x10,0x42 },
+ { 0x97,0x22,0x40,0x13 }, { 0xc6,0x11,0x20,0x84 },
+ { 0x4a,0x24,0x7d,0x85 }, { 0xbb,0x3d,0xf8,0xd2 },
+ { 0xf9,0x32,0x11,0xae }, { 0x29,0xa1,0x6d,0xc7 },
+ { 0x9e,0x2f,0x4b,0x1d }, { 0xb2,0x30,0xf3,0xdc },
+ { 0x86,0x52,0xec,0x0d }, { 0xc1,0xe3,0xd0,0x77 },
+ { 0xb3,0x16,0x6c,0x2b }, { 0x70,0xb9,0x99,0xa9 },
+ { 0x94,0x48,0xfa,0x11 }, { 0xe9,0x64,0x22,0x47 },
+ { 0xfc,0x8c,0xc4,0xa8 }, { 0xf0,0x3f,0x1a,0xa0 },
+ { 0x7d,0x2c,0xd8,0x56 }, { 0x33,0x90,0xef,0x22 },
+ { 0x49,0x4e,0xc7,0x87 }, { 0x38,0xd1,0xc1,0xd9 },
+ { 0xca,0xa2,0xfe,0x8c }, { 0xd4,0x0b,0x36,0x98 },
+ { 0xf5,0x81,0xcf,0xa6 }, { 0x7a,0xde,0x28,0xa5 },
+ { 0xb7,0x8e,0x26,0xda }, { 0xad,0xbf,0xa4,0x3f },
+ { 0x3a,0x9d,0xe4,0x2c }, { 0x78,0x92,0x0d,0x50 },
+ { 0x5f,0xcc,0x9b,0x6a }, { 0x7e,0x46,0x62,0x54 },
+ { 0x8d,0x13,0xc2,0xf6 }, { 0xd8,0xb8,0xe8,0x90 },
+ { 0x39,0xf7,0x5e,0x2e }, { 0xc3,0xaf,0xf5,0x82 },
+ { 0x5d,0x80,0xbe,0x9f }, { 0xd0,0x93,0x7c,0x69 },
+ { 0xd5,0x2d,0xa9,0x6f }, { 0x25,0x12,0xb3,0xcf },
+ { 0xac,0x99,0x3b,0xc8 }, { 0x18,0x7d,0xa7,0x10 },
+ { 0x9c,0x63,0x6e,0xe8 }, { 0x3b,0xbb,0x7b,0xdb },
+ { 0x26,0x78,0x09,0xcd }, { 0x59,0x18,0xf4,0x6e },
+ { 0x9a,0xb7,0x01,0xec }, { 0x4f,0x9a,0xa8,0x83 },
+ { 0x95,0x6e,0x65,0xe6 }, { 0xff,0xe6,0x7e,0xaa },
+ { 0xbc,0xcf,0x08,0x21 }, { 0x15,0xe8,0xe6,0xef },
+ { 0xe7,0x9b,0xd9,0xba }, { 0x6f,0x36,0xce,0x4a },
+ { 0x9f,0x09,0xd4,0xea }, { 0xb0,0x7c,0xd6,0x29 },
+ { 0xa4,0xb2,0xaf,0x31 }, { 0x3f,0x23,0x31,0x2a },
+ { 0xa5,0x94,0x30,0xc6 }, { 0xa2,0x66,0xc0,0x35 },
+ { 0x4e,0xbc,0x37,0x74 }, { 0x82,0xca,0xa6,0xfc },
+ { 0x90,0xd0,0xb0,0xe0 }, { 0xa7,0xd8,0x15,0x33 },
+ { 0x04,0x98,0x4a,0xf1 }, { 0xec,0xda,0xf7,0x41 },
+ { 0xcd,0x50,0x0e,0x7f }, { 0x91,0xf6,0x2f,0x17 },
+ { 0x4d,0xd6,0x8d,0x76 }, { 0xef,0xb0,0x4d,0x43 },
+ { 0xaa,0x4d,0x54,0xcc }, { 0x96,0x04,0xdf,0xe4 },
+ { 0xd1,0xb5,0xe3,0x9e }, { 0x6a,0x88,0x1b,0x4c },
+ { 0x2c,0x1f,0xb8,0xc1 }, { 0x65,0x51,0x7f,0x46 },
+ { 0x5e,0xea,0x04,0x9d }, { 0x8c,0x35,0x5d,0x01 },
+ { 0x87,0x74,0x73,0xfa }, { 0x0b,0x41,0x2e,0xfb },
+ { 0x67,0x1d,0x5a,0xb3 }, { 0xdb,0xd2,0x52,0x92 },
+ { 0x10,0x56,0x33,0xe9 }, { 0xd6,0x47,0x13,0x6d },
+ { 0xd7,0x61,0x8c,0x9a }, { 0xa1,0x0c,0x7a,0x37 },
+ { 0xf8,0x14,0x8e,0x59 }, { 0x13,0x3c,0x89,0xeb },
+ { 0xa9,0x27,0xee,0xce }, { 0x61,0xc9,0x35,0xb7 },
+ { 0x1c,0xe5,0xed,0xe1 }, { 0x47,0xb1,0x3c,0x7a },
+ { 0xd2,0xdf,0x59,0x9c }, { 0xf2,0x73,0x3f,0x55 },
+ { 0x14,0xce,0x79,0x18 }, { 0xc7,0x37,0xbf,0x73 },
+ { 0xf7,0xcd,0xea,0x53 }, { 0xfd,0xaa,0x5b,0x5f },
+ { 0x3d,0x6f,0x14,0xdf }, { 0x44,0xdb,0x86,0x78 },
+ { 0xaf,0xf3,0x81,0xca }, { 0x68,0xc4,0x3e,0xb9 },
+ { 0x24,0x34,0x2c,0x38 }, { 0xa3,0x40,0x5f,0xc2 },
+ { 0x1d,0xc3,0x72,0x16 }, { 0xe2,0x25,0x0c,0xbc },
+ { 0x3c,0x49,0x8b,0x28 }, { 0x0d,0x95,0x41,0xff },
+ { 0xa8,0x01,0x71,0x39 }, { 0x0c,0xb3,0xde,0x08 },
+ { 0xb4,0xe4,0x9c,0xd8 }, { 0x56,0xc1,0x90,0x64 },
+ { 0xcb,0x84,0x61,0x7b }, { 0x32,0xb6,0x70,0xd5 },
+ { 0x6c,0x5c,0x74,0x48 }, { 0xb8,0x57,0x42,0xd0 }
+ };
+
+static const unsigned char S5[256] =
+ {
+ 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38,
+ 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb,
+ 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87,
+ 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb,
+ 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d,
+ 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e,
+ 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2,
+ 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25,
+ 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16,
+ 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92,
+ 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda,
+ 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84,
+ 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a,
+ 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06,
+ 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02,
+ 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b,
+ 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea,
+ 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73,
+ 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85,
+ 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e,
+ 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89,
+ 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b,
+ 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20,
+ 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4,
+ 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31,
+ 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f,
+ 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d,
+ 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef,
+ 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0,
+ 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61,
+ 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26,
+ 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+ };
+
+static const unsigned char U1[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x0e,0x09,0x0d,0x0b },
+ { 0x1c,0x12,0x1a,0x16 }, { 0x12,0x1b,0x17,0x1d },
+ { 0x38,0x24,0x34,0x2c }, { 0x36,0x2d,0x39,0x27 },
+ { 0x24,0x36,0x2e,0x3a }, { 0x2a,0x3f,0x23,0x31 },
+ { 0x70,0x48,0x68,0x58 }, { 0x7e,0x41,0x65,0x53 },
+ { 0x6c,0x5a,0x72,0x4e }, { 0x62,0x53,0x7f,0x45 },
+ { 0x48,0x6c,0x5c,0x74 }, { 0x46,0x65,0x51,0x7f },
+ { 0x54,0x7e,0x46,0x62 }, { 0x5a,0x77,0x4b,0x69 },
+ { 0xe0,0x90,0xd0,0xb0 }, { 0xee,0x99,0xdd,0xbb },
+ { 0xfc,0x82,0xca,0xa6 }, { 0xf2,0x8b,0xc7,0xad },
+ { 0xd8,0xb4,0xe4,0x9c }, { 0xd6,0xbd,0xe9,0x97 },
+ { 0xc4,0xa6,0xfe,0x8a }, { 0xca,0xaf,0xf3,0x81 },
+ { 0x90,0xd8,0xb8,0xe8 }, { 0x9e,0xd1,0xb5,0xe3 },
+ { 0x8c,0xca,0xa2,0xfe }, { 0x82,0xc3,0xaf,0xf5 },
+ { 0xa8,0xfc,0x8c,0xc4 }, { 0xa6,0xf5,0x81,0xcf },
+ { 0xb4,0xee,0x96,0xd2 }, { 0xba,0xe7,0x9b,0xd9 },
+ { 0xdb,0x3b,0xbb,0x7b }, { 0xd5,0x32,0xb6,0x70 },
+ { 0xc7,0x29,0xa1,0x6d }, { 0xc9,0x20,0xac,0x66 },
+ { 0xe3,0x1f,0x8f,0x57 }, { 0xed,0x16,0x82,0x5c },
+ { 0xff,0x0d,0x95,0x41 }, { 0xf1,0x04,0x98,0x4a },
+ { 0xab,0x73,0xd3,0x23 }, { 0xa5,0x7a,0xde,0x28 },
+ { 0xb7,0x61,0xc9,0x35 }, { 0xb9,0x68,0xc4,0x3e },
+ { 0x93,0x57,0xe7,0x0f }, { 0x9d,0x5e,0xea,0x04 },
+ { 0x8f,0x45,0xfd,0x19 }, { 0x81,0x4c,0xf0,0x12 },
+ { 0x3b,0xab,0x6b,0xcb }, { 0x35,0xa2,0x66,0xc0 },
+ { 0x27,0xb9,0x71,0xdd }, { 0x29,0xb0,0x7c,0xd6 },
+ { 0x03,0x8f,0x5f,0xe7 }, { 0x0d,0x86,0x52,0xec },
+ { 0x1f,0x9d,0x45,0xf1 }, { 0x11,0x94,0x48,0xfa },
+ { 0x4b,0xe3,0x03,0x93 }, { 0x45,0xea,0x0e,0x98 },
+ { 0x57,0xf1,0x19,0x85 }, { 0x59,0xf8,0x14,0x8e },
+ { 0x73,0xc7,0x37,0xbf }, { 0x7d,0xce,0x3a,0xb4 },
+ { 0x6f,0xd5,0x2d,0xa9 }, { 0x61,0xdc,0x20,0xa2 },
+ { 0xad,0x76,0x6d,0xf6 }, { 0xa3,0x7f,0x60,0xfd },
+ { 0xb1,0x64,0x77,0xe0 }, { 0xbf,0x6d,0x7a,0xeb },
+ { 0x95,0x52,0x59,0xda }, { 0x9b,0x5b,0x54,0xd1 },
+ { 0x89,0x40,0x43,0xcc }, { 0x87,0x49,0x4e,0xc7 },
+ { 0xdd,0x3e,0x05,0xae }, { 0xd3,0x37,0x08,0xa5 },
+ { 0xc1,0x2c,0x1f,0xb8 }, { 0xcf,0x25,0x12,0xb3 },
+ { 0xe5,0x1a,0x31,0x82 }, { 0xeb,0x13,0x3c,0x89 },
+ { 0xf9,0x08,0x2b,0x94 }, { 0xf7,0x01,0x26,0x9f },
+ { 0x4d,0xe6,0xbd,0x46 }, { 0x43,0xef,0xb0,0x4d },
+ { 0x51,0xf4,0xa7,0x50 }, { 0x5f,0xfd,0xaa,0x5b },
+ { 0x75,0xc2,0x89,0x6a }, { 0x7b,0xcb,0x84,0x61 },
+ { 0x69,0xd0,0x93,0x7c }, { 0x67,0xd9,0x9e,0x77 },
+ { 0x3d,0xae,0xd5,0x1e }, { 0x33,0xa7,0xd8,0x15 },
+ { 0x21,0xbc,0xcf,0x08 }, { 0x2f,0xb5,0xc2,0x03 },
+ { 0x05,0x8a,0xe1,0x32 }, { 0x0b,0x83,0xec,0x39 },
+ { 0x19,0x98,0xfb,0x24 }, { 0x17,0x91,0xf6,0x2f },
+ { 0x76,0x4d,0xd6,0x8d }, { 0x78,0x44,0xdb,0x86 },
+ { 0x6a,0x5f,0xcc,0x9b }, { 0x64,0x56,0xc1,0x90 },
+ { 0x4e,0x69,0xe2,0xa1 }, { 0x40,0x60,0xef,0xaa },
+ { 0x52,0x7b,0xf8,0xb7 }, { 0x5c,0x72,0xf5,0xbc },
+ { 0x06,0x05,0xbe,0xd5 }, { 0x08,0x0c,0xb3,0xde },
+ { 0x1a,0x17,0xa4,0xc3 }, { 0x14,0x1e,0xa9,0xc8 },
+ { 0x3e,0x21,0x8a,0xf9 }, { 0x30,0x28,0x87,0xf2 },
+ { 0x22,0x33,0x90,0xef }, { 0x2c,0x3a,0x9d,0xe4 },
+ { 0x96,0xdd,0x06,0x3d }, { 0x98,0xd4,0x0b,0x36 },
+ { 0x8a,0xcf,0x1c,0x2b }, { 0x84,0xc6,0x11,0x20 },
+ { 0xae,0xf9,0x32,0x11 }, { 0xa0,0xf0,0x3f,0x1a },
+ { 0xb2,0xeb,0x28,0x07 }, { 0xbc,0xe2,0x25,0x0c },
+ { 0xe6,0x95,0x6e,0x65 }, { 0xe8,0x9c,0x63,0x6e },
+ { 0xfa,0x87,0x74,0x73 }, { 0xf4,0x8e,0x79,0x78 },
+ { 0xde,0xb1,0x5a,0x49 }, { 0xd0,0xb8,0x57,0x42 },
+ { 0xc2,0xa3,0x40,0x5f }, { 0xcc,0xaa,0x4d,0x54 },
+ { 0x41,0xec,0xda,0xf7 }, { 0x4f,0xe5,0xd7,0xfc },
+ { 0x5d,0xfe,0xc0,0xe1 }, { 0x53,0xf7,0xcd,0xea },
+ { 0x79,0xc8,0xee,0xdb }, { 0x77,0xc1,0xe3,0xd0 },
+ { 0x65,0xda,0xf4,0xcd }, { 0x6b,0xd3,0xf9,0xc6 },
+ { 0x31,0xa4,0xb2,0xaf }, { 0x3f,0xad,0xbf,0xa4 },
+ { 0x2d,0xb6,0xa8,0xb9 }, { 0x23,0xbf,0xa5,0xb2 },
+ { 0x09,0x80,0x86,0x83 }, { 0x07,0x89,0x8b,0x88 },
+ { 0x15,0x92,0x9c,0x95 }, { 0x1b,0x9b,0x91,0x9e },
+ { 0xa1,0x7c,0x0a,0x47 }, { 0xaf,0x75,0x07,0x4c },
+ { 0xbd,0x6e,0x10,0x51 }, { 0xb3,0x67,0x1d,0x5a },
+ { 0x99,0x58,0x3e,0x6b }, { 0x97,0x51,0x33,0x60 },
+ { 0x85,0x4a,0x24,0x7d }, { 0x8b,0x43,0x29,0x76 },
+ { 0xd1,0x34,0x62,0x1f }, { 0xdf,0x3d,0x6f,0x14 },
+ { 0xcd,0x26,0x78,0x09 }, { 0xc3,0x2f,0x75,0x02 },
+ { 0xe9,0x10,0x56,0x33 }, { 0xe7,0x19,0x5b,0x38 },
+ { 0xf5,0x02,0x4c,0x25 }, { 0xfb,0x0b,0x41,0x2e },
+ { 0x9a,0xd7,0x61,0x8c }, { 0x94,0xde,0x6c,0x87 },
+ { 0x86,0xc5,0x7b,0x9a }, { 0x88,0xcc,0x76,0x91 },
+ { 0xa2,0xf3,0x55,0xa0 }, { 0xac,0xfa,0x58,0xab },
+ { 0xbe,0xe1,0x4f,0xb6 }, { 0xb0,0xe8,0x42,0xbd },
+ { 0xea,0x9f,0x09,0xd4 }, { 0xe4,0x96,0x04,0xdf },
+ { 0xf6,0x8d,0x13,0xc2 }, { 0xf8,0x84,0x1e,0xc9 },
+ { 0xd2,0xbb,0x3d,0xf8 }, { 0xdc,0xb2,0x30,0xf3 },
+ { 0xce,0xa9,0x27,0xee }, { 0xc0,0xa0,0x2a,0xe5 },
+ { 0x7a,0x47,0xb1,0x3c }, { 0x74,0x4e,0xbc,0x37 },
+ { 0x66,0x55,0xab,0x2a }, { 0x68,0x5c,0xa6,0x21 },
+ { 0x42,0x63,0x85,0x10 }, { 0x4c,0x6a,0x88,0x1b },
+ { 0x5e,0x71,0x9f,0x06 }, { 0x50,0x78,0x92,0x0d },
+ { 0x0a,0x0f,0xd9,0x64 }, { 0x04,0x06,0xd4,0x6f },
+ { 0x16,0x1d,0xc3,0x72 }, { 0x18,0x14,0xce,0x79 },
+ { 0x32,0x2b,0xed,0x48 }, { 0x3c,0x22,0xe0,0x43 },
+ { 0x2e,0x39,0xf7,0x5e }, { 0x20,0x30,0xfa,0x55 },
+ { 0xec,0x9a,0xb7,0x01 }, { 0xe2,0x93,0xba,0x0a },
+ { 0xf0,0x88,0xad,0x17 }, { 0xfe,0x81,0xa0,0x1c },
+ { 0xd4,0xbe,0x83,0x2d }, { 0xda,0xb7,0x8e,0x26 },
+ { 0xc8,0xac,0x99,0x3b }, { 0xc6,0xa5,0x94,0x30 },
+ { 0x9c,0xd2,0xdf,0x59 }, { 0x92,0xdb,0xd2,0x52 },
+ { 0x80,0xc0,0xc5,0x4f }, { 0x8e,0xc9,0xc8,0x44 },
+ { 0xa4,0xf6,0xeb,0x75 }, { 0xaa,0xff,0xe6,0x7e },
+ { 0xb8,0xe4,0xf1,0x63 }, { 0xb6,0xed,0xfc,0x68 },
+ { 0x0c,0x0a,0x67,0xb1 }, { 0x02,0x03,0x6a,0xba },
+ { 0x10,0x18,0x7d,0xa7 }, { 0x1e,0x11,0x70,0xac },
+ { 0x34,0x2e,0x53,0x9d }, { 0x3a,0x27,0x5e,0x96 },
+ { 0x28,0x3c,0x49,0x8b }, { 0x26,0x35,0x44,0x80 },
+ { 0x7c,0x42,0x0f,0xe9 }, { 0x72,0x4b,0x02,0xe2 },
+ { 0x60,0x50,0x15,0xff }, { 0x6e,0x59,0x18,0xf4 },
+ { 0x44,0x66,0x3b,0xc5 }, { 0x4a,0x6f,0x36,0xce },
+ { 0x58,0x74,0x21,0xd3 }, { 0x56,0x7d,0x2c,0xd8 },
+ { 0x37,0xa1,0x0c,0x7a }, { 0x39,0xa8,0x01,0x71 },
+ { 0x2b,0xb3,0x16,0x6c }, { 0x25,0xba,0x1b,0x67 },
+ { 0x0f,0x85,0x38,0x56 }, { 0x01,0x8c,0x35,0x5d },
+ { 0x13,0x97,0x22,0x40 }, { 0x1d,0x9e,0x2f,0x4b },
+ { 0x47,0xe9,0x64,0x22 }, { 0x49,0xe0,0x69,0x29 },
+ { 0x5b,0xfb,0x7e,0x34 }, { 0x55,0xf2,0x73,0x3f },
+ { 0x7f,0xcd,0x50,0x0e }, { 0x71,0xc4,0x5d,0x05 },
+ { 0x63,0xdf,0x4a,0x18 }, { 0x6d,0xd6,0x47,0x13 },
+ { 0xd7,0x31,0xdc,0xca }, { 0xd9,0x38,0xd1,0xc1 },
+ { 0xcb,0x23,0xc6,0xdc }, { 0xc5,0x2a,0xcb,0xd7 },
+ { 0xef,0x15,0xe8,0xe6 }, { 0xe1,0x1c,0xe5,0xed },
+ { 0xf3,0x07,0xf2,0xf0 }, { 0xfd,0x0e,0xff,0xfb },
+ { 0xa7,0x79,0xb4,0x92 }, { 0xa9,0x70,0xb9,0x99 },
+ { 0xbb,0x6b,0xae,0x84 }, { 0xb5,0x62,0xa3,0x8f },
+ { 0x9f,0x5d,0x80,0xbe }, { 0x91,0x54,0x8d,0xb5 },
+ { 0x83,0x4f,0x9a,0xa8 }, { 0x8d,0x46,0x97,0xa3 }
+ };
+
+static const unsigned char U2[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x0b,0x0e,0x09,0x0d },
+ { 0x16,0x1c,0x12,0x1a }, { 0x1d,0x12,0x1b,0x17 },
+ { 0x2c,0x38,0x24,0x34 }, { 0x27,0x36,0x2d,0x39 },
+ { 0x3a,0x24,0x36,0x2e }, { 0x31,0x2a,0x3f,0x23 },
+ { 0x58,0x70,0x48,0x68 }, { 0x53,0x7e,0x41,0x65 },
+ { 0x4e,0x6c,0x5a,0x72 }, { 0x45,0x62,0x53,0x7f },
+ { 0x74,0x48,0x6c,0x5c }, { 0x7f,0x46,0x65,0x51 },
+ { 0x62,0x54,0x7e,0x46 }, { 0x69,0x5a,0x77,0x4b },
+ { 0xb0,0xe0,0x90,0xd0 }, { 0xbb,0xee,0x99,0xdd },
+ { 0xa6,0xfc,0x82,0xca }, { 0xad,0xf2,0x8b,0xc7 },
+ { 0x9c,0xd8,0xb4,0xe4 }, { 0x97,0xd6,0xbd,0xe9 },
+ { 0x8a,0xc4,0xa6,0xfe }, { 0x81,0xca,0xaf,0xf3 },
+ { 0xe8,0x90,0xd8,0xb8 }, { 0xe3,0x9e,0xd1,0xb5 },
+ { 0xfe,0x8c,0xca,0xa2 }, { 0xf5,0x82,0xc3,0xaf },
+ { 0xc4,0xa8,0xfc,0x8c }, { 0xcf,0xa6,0xf5,0x81 },
+ { 0xd2,0xb4,0xee,0x96 }, { 0xd9,0xba,0xe7,0x9b },
+ { 0x7b,0xdb,0x3b,0xbb }, { 0x70,0xd5,0x32,0xb6 },
+ { 0x6d,0xc7,0x29,0xa1 }, { 0x66,0xc9,0x20,0xac },
+ { 0x57,0xe3,0x1f,0x8f }, { 0x5c,0xed,0x16,0x82 },
+ { 0x41,0xff,0x0d,0x95 }, { 0x4a,0xf1,0x04,0x98 },
+ { 0x23,0xab,0x73,0xd3 }, { 0x28,0xa5,0x7a,0xde },
+ { 0x35,0xb7,0x61,0xc9 }, { 0x3e,0xb9,0x68,0xc4 },
+ { 0x0f,0x93,0x57,0xe7 }, { 0x04,0x9d,0x5e,0xea },
+ { 0x19,0x8f,0x45,0xfd }, { 0x12,0x81,0x4c,0xf0 },
+ { 0xcb,0x3b,0xab,0x6b }, { 0xc0,0x35,0xa2,0x66 },
+ { 0xdd,0x27,0xb9,0x71 }, { 0xd6,0x29,0xb0,0x7c },
+ { 0xe7,0x03,0x8f,0x5f }, { 0xec,0x0d,0x86,0x52 },
+ { 0xf1,0x1f,0x9d,0x45 }, { 0xfa,0x11,0x94,0x48 },
+ { 0x93,0x4b,0xe3,0x03 }, { 0x98,0x45,0xea,0x0e },
+ { 0x85,0x57,0xf1,0x19 }, { 0x8e,0x59,0xf8,0x14 },
+ { 0xbf,0x73,0xc7,0x37 }, { 0xb4,0x7d,0xce,0x3a },
+ { 0xa9,0x6f,0xd5,0x2d }, { 0xa2,0x61,0xdc,0x20 },
+ { 0xf6,0xad,0x76,0x6d }, { 0xfd,0xa3,0x7f,0x60 },
+ { 0xe0,0xb1,0x64,0x77 }, { 0xeb,0xbf,0x6d,0x7a },
+ { 0xda,0x95,0x52,0x59 }, { 0xd1,0x9b,0x5b,0x54 },
+ { 0xcc,0x89,0x40,0x43 }, { 0xc7,0x87,0x49,0x4e },
+ { 0xae,0xdd,0x3e,0x05 }, { 0xa5,0xd3,0x37,0x08 },
+ { 0xb8,0xc1,0x2c,0x1f }, { 0xb3,0xcf,0x25,0x12 },
+ { 0x82,0xe5,0x1a,0x31 }, { 0x89,0xeb,0x13,0x3c },
+ { 0x94,0xf9,0x08,0x2b }, { 0x9f,0xf7,0x01,0x26 },
+ { 0x46,0x4d,0xe6,0xbd }, { 0x4d,0x43,0xef,0xb0 },
+ { 0x50,0x51,0xf4,0xa7 }, { 0x5b,0x5f,0xfd,0xaa },
+ { 0x6a,0x75,0xc2,0x89 }, { 0x61,0x7b,0xcb,0x84 },
+ { 0x7c,0x69,0xd0,0x93 }, { 0x77,0x67,0xd9,0x9e },
+ { 0x1e,0x3d,0xae,0xd5 }, { 0x15,0x33,0xa7,0xd8 },
+ { 0x08,0x21,0xbc,0xcf }, { 0x03,0x2f,0xb5,0xc2 },
+ { 0x32,0x05,0x8a,0xe1 }, { 0x39,0x0b,0x83,0xec },
+ { 0x24,0x19,0x98,0xfb }, { 0x2f,0x17,0x91,0xf6 },
+ { 0x8d,0x76,0x4d,0xd6 }, { 0x86,0x78,0x44,0xdb },
+ { 0x9b,0x6a,0x5f,0xcc }, { 0x90,0x64,0x56,0xc1 },
+ { 0xa1,0x4e,0x69,0xe2 }, { 0xaa,0x40,0x60,0xef },
+ { 0xb7,0x52,0x7b,0xf8 }, { 0xbc,0x5c,0x72,0xf5 },
+ { 0xd5,0x06,0x05,0xbe }, { 0xde,0x08,0x0c,0xb3 },
+ { 0xc3,0x1a,0x17,0xa4 }, { 0xc8,0x14,0x1e,0xa9 },
+ { 0xf9,0x3e,0x21,0x8a }, { 0xf2,0x30,0x28,0x87 },
+ { 0xef,0x22,0x33,0x90 }, { 0xe4,0x2c,0x3a,0x9d },
+ { 0x3d,0x96,0xdd,0x06 }, { 0x36,0x98,0xd4,0x0b },
+ { 0x2b,0x8a,0xcf,0x1c }, { 0x20,0x84,0xc6,0x11 },
+ { 0x11,0xae,0xf9,0x32 }, { 0x1a,0xa0,0xf0,0x3f },
+ { 0x07,0xb2,0xeb,0x28 }, { 0x0c,0xbc,0xe2,0x25 },
+ { 0x65,0xe6,0x95,0x6e }, { 0x6e,0xe8,0x9c,0x63 },
+ { 0x73,0xfa,0x87,0x74 }, { 0x78,0xf4,0x8e,0x79 },
+ { 0x49,0xde,0xb1,0x5a }, { 0x42,0xd0,0xb8,0x57 },
+ { 0x5f,0xc2,0xa3,0x40 }, { 0x54,0xcc,0xaa,0x4d },
+ { 0xf7,0x41,0xec,0xda }, { 0xfc,0x4f,0xe5,0xd7 },
+ { 0xe1,0x5d,0xfe,0xc0 }, { 0xea,0x53,0xf7,0xcd },
+ { 0xdb,0x79,0xc8,0xee }, { 0xd0,0x77,0xc1,0xe3 },
+ { 0xcd,0x65,0xda,0xf4 }, { 0xc6,0x6b,0xd3,0xf9 },
+ { 0xaf,0x31,0xa4,0xb2 }, { 0xa4,0x3f,0xad,0xbf },
+ { 0xb9,0x2d,0xb6,0xa8 }, { 0xb2,0x23,0xbf,0xa5 },
+ { 0x83,0x09,0x80,0x86 }, { 0x88,0x07,0x89,0x8b },
+ { 0x95,0x15,0x92,0x9c }, { 0x9e,0x1b,0x9b,0x91 },
+ { 0x47,0xa1,0x7c,0x0a }, { 0x4c,0xaf,0x75,0x07 },
+ { 0x51,0xbd,0x6e,0x10 }, { 0x5a,0xb3,0x67,0x1d },
+ { 0x6b,0x99,0x58,0x3e }, { 0x60,0x97,0x51,0x33 },
+ { 0x7d,0x85,0x4a,0x24 }, { 0x76,0x8b,0x43,0x29 },
+ { 0x1f,0xd1,0x34,0x62 }, { 0x14,0xdf,0x3d,0x6f },
+ { 0x09,0xcd,0x26,0x78 }, { 0x02,0xc3,0x2f,0x75 },
+ { 0x33,0xe9,0x10,0x56 }, { 0x38,0xe7,0x19,0x5b },
+ { 0x25,0xf5,0x02,0x4c }, { 0x2e,0xfb,0x0b,0x41 },
+ { 0x8c,0x9a,0xd7,0x61 }, { 0x87,0x94,0xde,0x6c },
+ { 0x9a,0x86,0xc5,0x7b }, { 0x91,0x88,0xcc,0x76 },
+ { 0xa0,0xa2,0xf3,0x55 }, { 0xab,0xac,0xfa,0x58 },
+ { 0xb6,0xbe,0xe1,0x4f }, { 0xbd,0xb0,0xe8,0x42 },
+ { 0xd4,0xea,0x9f,0x09 }, { 0xdf,0xe4,0x96,0x04 },
+ { 0xc2,0xf6,0x8d,0x13 }, { 0xc9,0xf8,0x84,0x1e },
+ { 0xf8,0xd2,0xbb,0x3d }, { 0xf3,0xdc,0xb2,0x30 },
+ { 0xee,0xce,0xa9,0x27 }, { 0xe5,0xc0,0xa0,0x2a },
+ { 0x3c,0x7a,0x47,0xb1 }, { 0x37,0x74,0x4e,0xbc },
+ { 0x2a,0x66,0x55,0xab }, { 0x21,0x68,0x5c,0xa6 },
+ { 0x10,0x42,0x63,0x85 }, { 0x1b,0x4c,0x6a,0x88 },
+ { 0x06,0x5e,0x71,0x9f }, { 0x0d,0x50,0x78,0x92 },
+ { 0x64,0x0a,0x0f,0xd9 }, { 0x6f,0x04,0x06,0xd4 },
+ { 0x72,0x16,0x1d,0xc3 }, { 0x79,0x18,0x14,0xce },
+ { 0x48,0x32,0x2b,0xed }, { 0x43,0x3c,0x22,0xe0 },
+ { 0x5e,0x2e,0x39,0xf7 }, { 0x55,0x20,0x30,0xfa },
+ { 0x01,0xec,0x9a,0xb7 }, { 0x0a,0xe2,0x93,0xba },
+ { 0x17,0xf0,0x88,0xad }, { 0x1c,0xfe,0x81,0xa0 },
+ { 0x2d,0xd4,0xbe,0x83 }, { 0x26,0xda,0xb7,0x8e },
+ { 0x3b,0xc8,0xac,0x99 }, { 0x30,0xc6,0xa5,0x94 },
+ { 0x59,0x9c,0xd2,0xdf }, { 0x52,0x92,0xdb,0xd2 },
+ { 0x4f,0x80,0xc0,0xc5 }, { 0x44,0x8e,0xc9,0xc8 },
+ { 0x75,0xa4,0xf6,0xeb }, { 0x7e,0xaa,0xff,0xe6 },
+ { 0x63,0xb8,0xe4,0xf1 }, { 0x68,0xb6,0xed,0xfc },
+ { 0xb1,0x0c,0x0a,0x67 }, { 0xba,0x02,0x03,0x6a },
+ { 0xa7,0x10,0x18,0x7d }, { 0xac,0x1e,0x11,0x70 },
+ { 0x9d,0x34,0x2e,0x53 }, { 0x96,0x3a,0x27,0x5e },
+ { 0x8b,0x28,0x3c,0x49 }, { 0x80,0x26,0x35,0x44 },
+ { 0xe9,0x7c,0x42,0x0f }, { 0xe2,0x72,0x4b,0x02 },
+ { 0xff,0x60,0x50,0x15 }, { 0xf4,0x6e,0x59,0x18 },
+ { 0xc5,0x44,0x66,0x3b }, { 0xce,0x4a,0x6f,0x36 },
+ { 0xd3,0x58,0x74,0x21 }, { 0xd8,0x56,0x7d,0x2c },
+ { 0x7a,0x37,0xa1,0x0c }, { 0x71,0x39,0xa8,0x01 },
+ { 0x6c,0x2b,0xb3,0x16 }, { 0x67,0x25,0xba,0x1b },
+ { 0x56,0x0f,0x85,0x38 }, { 0x5d,0x01,0x8c,0x35 },
+ { 0x40,0x13,0x97,0x22 }, { 0x4b,0x1d,0x9e,0x2f },
+ { 0x22,0x47,0xe9,0x64 }, { 0x29,0x49,0xe0,0x69 },
+ { 0x34,0x5b,0xfb,0x7e }, { 0x3f,0x55,0xf2,0x73 },
+ { 0x0e,0x7f,0xcd,0x50 }, { 0x05,0x71,0xc4,0x5d },
+ { 0x18,0x63,0xdf,0x4a }, { 0x13,0x6d,0xd6,0x47 },
+ { 0xca,0xd7,0x31,0xdc }, { 0xc1,0xd9,0x38,0xd1 },
+ { 0xdc,0xcb,0x23,0xc6 }, { 0xd7,0xc5,0x2a,0xcb },
+ { 0xe6,0xef,0x15,0xe8 }, { 0xed,0xe1,0x1c,0xe5 },
+ { 0xf0,0xf3,0x07,0xf2 }, { 0xfb,0xfd,0x0e,0xff },
+ { 0x92,0xa7,0x79,0xb4 }, { 0x99,0xa9,0x70,0xb9 },
+ { 0x84,0xbb,0x6b,0xae }, { 0x8f,0xb5,0x62,0xa3 },
+ { 0xbe,0x9f,0x5d,0x80 }, { 0xb5,0x91,0x54,0x8d },
+ { 0xa8,0x83,0x4f,0x9a }, { 0xa3,0x8d,0x46,0x97 }
+ };
+
+static const unsigned char U3[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x0d,0x0b,0x0e,0x09 },
+ { 0x1a,0x16,0x1c,0x12 }, { 0x17,0x1d,0x12,0x1b },
+ { 0x34,0x2c,0x38,0x24 }, { 0x39,0x27,0x36,0x2d },
+ { 0x2e,0x3a,0x24,0x36 }, { 0x23,0x31,0x2a,0x3f },
+ { 0x68,0x58,0x70,0x48 }, { 0x65,0x53,0x7e,0x41 },
+ { 0x72,0x4e,0x6c,0x5a }, { 0x7f,0x45,0x62,0x53 },
+ { 0x5c,0x74,0x48,0x6c }, { 0x51,0x7f,0x46,0x65 },
+ { 0x46,0x62,0x54,0x7e }, { 0x4b,0x69,0x5a,0x77 },
+ { 0xd0,0xb0,0xe0,0x90 }, { 0xdd,0xbb,0xee,0x99 },
+ { 0xca,0xa6,0xfc,0x82 }, { 0xc7,0xad,0xf2,0x8b },
+ { 0xe4,0x9c,0xd8,0xb4 }, { 0xe9,0x97,0xd6,0xbd },
+ { 0xfe,0x8a,0xc4,0xa6 }, { 0xf3,0x81,0xca,0xaf },
+ { 0xb8,0xe8,0x90,0xd8 }, { 0xb5,0xe3,0x9e,0xd1 },
+ { 0xa2,0xfe,0x8c,0xca }, { 0xaf,0xf5,0x82,0xc3 },
+ { 0x8c,0xc4,0xa8,0xfc }, { 0x81,0xcf,0xa6,0xf5 },
+ { 0x96,0xd2,0xb4,0xee }, { 0x9b,0xd9,0xba,0xe7 },
+ { 0xbb,0x7b,0xdb,0x3b }, { 0xb6,0x70,0xd5,0x32 },
+ { 0xa1,0x6d,0xc7,0x29 }, { 0xac,0x66,0xc9,0x20 },
+ { 0x8f,0x57,0xe3,0x1f }, { 0x82,0x5c,0xed,0x16 },
+ { 0x95,0x41,0xff,0x0d }, { 0x98,0x4a,0xf1,0x04 },
+ { 0xd3,0x23,0xab,0x73 }, { 0xde,0x28,0xa5,0x7a },
+ { 0xc9,0x35,0xb7,0x61 }, { 0xc4,0x3e,0xb9,0x68 },
+ { 0xe7,0x0f,0x93,0x57 }, { 0xea,0x04,0x9d,0x5e },
+ { 0xfd,0x19,0x8f,0x45 }, { 0xf0,0x12,0x81,0x4c },
+ { 0x6b,0xcb,0x3b,0xab }, { 0x66,0xc0,0x35,0xa2 },
+ { 0x71,0xdd,0x27,0xb9 }, { 0x7c,0xd6,0x29,0xb0 },
+ { 0x5f,0xe7,0x03,0x8f }, { 0x52,0xec,0x0d,0x86 },
+ { 0x45,0xf1,0x1f,0x9d }, { 0x48,0xfa,0x11,0x94 },
+ { 0x03,0x93,0x4b,0xe3 }, { 0x0e,0x98,0x45,0xea },
+ { 0x19,0x85,0x57,0xf1 }, { 0x14,0x8e,0x59,0xf8 },
+ { 0x37,0xbf,0x73,0xc7 }, { 0x3a,0xb4,0x7d,0xce },
+ { 0x2d,0xa9,0x6f,0xd5 }, { 0x20,0xa2,0x61,0xdc },
+ { 0x6d,0xf6,0xad,0x76 }, { 0x60,0xfd,0xa3,0x7f },
+ { 0x77,0xe0,0xb1,0x64 }, { 0x7a,0xeb,0xbf,0x6d },
+ { 0x59,0xda,0x95,0x52 }, { 0x54,0xd1,0x9b,0x5b },
+ { 0x43,0xcc,0x89,0x40 }, { 0x4e,0xc7,0x87,0x49 },
+ { 0x05,0xae,0xdd,0x3e }, { 0x08,0xa5,0xd3,0x37 },
+ { 0x1f,0xb8,0xc1,0x2c }, { 0x12,0xb3,0xcf,0x25 },
+ { 0x31,0x82,0xe5,0x1a }, { 0x3c,0x89,0xeb,0x13 },
+ { 0x2b,0x94,0xf9,0x08 }, { 0x26,0x9f,0xf7,0x01 },
+ { 0xbd,0x46,0x4d,0xe6 }, { 0xb0,0x4d,0x43,0xef },
+ { 0xa7,0x50,0x51,0xf4 }, { 0xaa,0x5b,0x5f,0xfd },
+ { 0x89,0x6a,0x75,0xc2 }, { 0x84,0x61,0x7b,0xcb },
+ { 0x93,0x7c,0x69,0xd0 }, { 0x9e,0x77,0x67,0xd9 },
+ { 0xd5,0x1e,0x3d,0xae }, { 0xd8,0x15,0x33,0xa7 },
+ { 0xcf,0x08,0x21,0xbc }, { 0xc2,0x03,0x2f,0xb5 },
+ { 0xe1,0x32,0x05,0x8a }, { 0xec,0x39,0x0b,0x83 },
+ { 0xfb,0x24,0x19,0x98 }, { 0xf6,0x2f,0x17,0x91 },
+ { 0xd6,0x8d,0x76,0x4d }, { 0xdb,0x86,0x78,0x44 },
+ { 0xcc,0x9b,0x6a,0x5f }, { 0xc1,0x90,0x64,0x56 },
+ { 0xe2,0xa1,0x4e,0x69 }, { 0xef,0xaa,0x40,0x60 },
+ { 0xf8,0xb7,0x52,0x7b }, { 0xf5,0xbc,0x5c,0x72 },
+ { 0xbe,0xd5,0x06,0x05 }, { 0xb3,0xde,0x08,0x0c },
+ { 0xa4,0xc3,0x1a,0x17 }, { 0xa9,0xc8,0x14,0x1e },
+ { 0x8a,0xf9,0x3e,0x21 }, { 0x87,0xf2,0x30,0x28 },
+ { 0x90,0xef,0x22,0x33 }, { 0x9d,0xe4,0x2c,0x3a },
+ { 0x06,0x3d,0x96,0xdd }, { 0x0b,0x36,0x98,0xd4 },
+ { 0x1c,0x2b,0x8a,0xcf }, { 0x11,0x20,0x84,0xc6 },
+ { 0x32,0x11,0xae,0xf9 }, { 0x3f,0x1a,0xa0,0xf0 },
+ { 0x28,0x07,0xb2,0xeb }, { 0x25,0x0c,0xbc,0xe2 },
+ { 0x6e,0x65,0xe6,0x95 }, { 0x63,0x6e,0xe8,0x9c },
+ { 0x74,0x73,0xfa,0x87 }, { 0x79,0x78,0xf4,0x8e },
+ { 0x5a,0x49,0xde,0xb1 }, { 0x57,0x42,0xd0,0xb8 },
+ { 0x40,0x5f,0xc2,0xa3 }, { 0x4d,0x54,0xcc,0xaa },
+ { 0xda,0xf7,0x41,0xec }, { 0xd7,0xfc,0x4f,0xe5 },
+ { 0xc0,0xe1,0x5d,0xfe }, { 0xcd,0xea,0x53,0xf7 },
+ { 0xee,0xdb,0x79,0xc8 }, { 0xe3,0xd0,0x77,0xc1 },
+ { 0xf4,0xcd,0x65,0xda }, { 0xf9,0xc6,0x6b,0xd3 },
+ { 0xb2,0xaf,0x31,0xa4 }, { 0xbf,0xa4,0x3f,0xad },
+ { 0xa8,0xb9,0x2d,0xb6 }, { 0xa5,0xb2,0x23,0xbf },
+ { 0x86,0x83,0x09,0x80 }, { 0x8b,0x88,0x07,0x89 },
+ { 0x9c,0x95,0x15,0x92 }, { 0x91,0x9e,0x1b,0x9b },
+ { 0x0a,0x47,0xa1,0x7c }, { 0x07,0x4c,0xaf,0x75 },
+ { 0x10,0x51,0xbd,0x6e }, { 0x1d,0x5a,0xb3,0x67 },
+ { 0x3e,0x6b,0x99,0x58 }, { 0x33,0x60,0x97,0x51 },
+ { 0x24,0x7d,0x85,0x4a }, { 0x29,0x76,0x8b,0x43 },
+ { 0x62,0x1f,0xd1,0x34 }, { 0x6f,0x14,0xdf,0x3d },
+ { 0x78,0x09,0xcd,0x26 }, { 0x75,0x02,0xc3,0x2f },
+ { 0x56,0x33,0xe9,0x10 }, { 0x5b,0x38,0xe7,0x19 },
+ { 0x4c,0x25,0xf5,0x02 }, { 0x41,0x2e,0xfb,0x0b },
+ { 0x61,0x8c,0x9a,0xd7 }, { 0x6c,0x87,0x94,0xde },
+ { 0x7b,0x9a,0x86,0xc5 }, { 0x76,0x91,0x88,0xcc },
+ { 0x55,0xa0,0xa2,0xf3 }, { 0x58,0xab,0xac,0xfa },
+ { 0x4f,0xb6,0xbe,0xe1 }, { 0x42,0xbd,0xb0,0xe8 },
+ { 0x09,0xd4,0xea,0x9f }, { 0x04,0xdf,0xe4,0x96 },
+ { 0x13,0xc2,0xf6,0x8d }, { 0x1e,0xc9,0xf8,0x84 },
+ { 0x3d,0xf8,0xd2,0xbb }, { 0x30,0xf3,0xdc,0xb2 },
+ { 0x27,0xee,0xce,0xa9 }, { 0x2a,0xe5,0xc0,0xa0 },
+ { 0xb1,0x3c,0x7a,0x47 }, { 0xbc,0x37,0x74,0x4e },
+ { 0xab,0x2a,0x66,0x55 }, { 0xa6,0x21,0x68,0x5c },
+ { 0x85,0x10,0x42,0x63 }, { 0x88,0x1b,0x4c,0x6a },
+ { 0x9f,0x06,0x5e,0x71 }, { 0x92,0x0d,0x50,0x78 },
+ { 0xd9,0x64,0x0a,0x0f }, { 0xd4,0x6f,0x04,0x06 },
+ { 0xc3,0x72,0x16,0x1d }, { 0xce,0x79,0x18,0x14 },
+ { 0xed,0x48,0x32,0x2b }, { 0xe0,0x43,0x3c,0x22 },
+ { 0xf7,0x5e,0x2e,0x39 }, { 0xfa,0x55,0x20,0x30 },
+ { 0xb7,0x01,0xec,0x9a }, { 0xba,0x0a,0xe2,0x93 },
+ { 0xad,0x17,0xf0,0x88 }, { 0xa0,0x1c,0xfe,0x81 },
+ { 0x83,0x2d,0xd4,0xbe }, { 0x8e,0x26,0xda,0xb7 },
+ { 0x99,0x3b,0xc8,0xac }, { 0x94,0x30,0xc6,0xa5 },
+ { 0xdf,0x59,0x9c,0xd2 }, { 0xd2,0x52,0x92,0xdb },
+ { 0xc5,0x4f,0x80,0xc0 }, { 0xc8,0x44,0x8e,0xc9 },
+ { 0xeb,0x75,0xa4,0xf6 }, { 0xe6,0x7e,0xaa,0xff },
+ { 0xf1,0x63,0xb8,0xe4 }, { 0xfc,0x68,0xb6,0xed },
+ { 0x67,0xb1,0x0c,0x0a }, { 0x6a,0xba,0x02,0x03 },
+ { 0x7d,0xa7,0x10,0x18 }, { 0x70,0xac,0x1e,0x11 },
+ { 0x53,0x9d,0x34,0x2e }, { 0x5e,0x96,0x3a,0x27 },
+ { 0x49,0x8b,0x28,0x3c }, { 0x44,0x80,0x26,0x35 },
+ { 0x0f,0xe9,0x7c,0x42 }, { 0x02,0xe2,0x72,0x4b },
+ { 0x15,0xff,0x60,0x50 }, { 0x18,0xf4,0x6e,0x59 },
+ { 0x3b,0xc5,0x44,0x66 }, { 0x36,0xce,0x4a,0x6f },
+ { 0x21,0xd3,0x58,0x74 }, { 0x2c,0xd8,0x56,0x7d },
+ { 0x0c,0x7a,0x37,0xa1 }, { 0x01,0x71,0x39,0xa8 },
+ { 0x16,0x6c,0x2b,0xb3 }, { 0x1b,0x67,0x25,0xba },
+ { 0x38,0x56,0x0f,0x85 }, { 0x35,0x5d,0x01,0x8c },
+ { 0x22,0x40,0x13,0x97 }, { 0x2f,0x4b,0x1d,0x9e },
+ { 0x64,0x22,0x47,0xe9 }, { 0x69,0x29,0x49,0xe0 },
+ { 0x7e,0x34,0x5b,0xfb }, { 0x73,0x3f,0x55,0xf2 },
+ { 0x50,0x0e,0x7f,0xcd }, { 0x5d,0x05,0x71,0xc4 },
+ { 0x4a,0x18,0x63,0xdf }, { 0x47,0x13,0x6d,0xd6 },
+ { 0xdc,0xca,0xd7,0x31 }, { 0xd1,0xc1,0xd9,0x38 },
+ { 0xc6,0xdc,0xcb,0x23 }, { 0xcb,0xd7,0xc5,0x2a },
+ { 0xe8,0xe6,0xef,0x15 }, { 0xe5,0xed,0xe1,0x1c },
+ { 0xf2,0xf0,0xf3,0x07 }, { 0xff,0xfb,0xfd,0x0e },
+ { 0xb4,0x92,0xa7,0x79 }, { 0xb9,0x99,0xa9,0x70 },
+ { 0xae,0x84,0xbb,0x6b }, { 0xa3,0x8f,0xb5,0x62 },
+ { 0x80,0xbe,0x9f,0x5d }, { 0x8d,0xb5,0x91,0x54 },
+ { 0x9a,0xa8,0x83,0x4f }, { 0x97,0xa3,0x8d,0x46 }
+ };
+
+static const unsigned char U4[256][4] =
+ {
+ { 0x00,0x00,0x00,0x00 }, { 0x09,0x0d,0x0b,0x0e },
+ { 0x12,0x1a,0x16,0x1c }, { 0x1b,0x17,0x1d,0x12 },
+ { 0x24,0x34,0x2c,0x38 }, { 0x2d,0x39,0x27,0x36 },
+ { 0x36,0x2e,0x3a,0x24 }, { 0x3f,0x23,0x31,0x2a },
+ { 0x48,0x68,0x58,0x70 }, { 0x41,0x65,0x53,0x7e },
+ { 0x5a,0x72,0x4e,0x6c }, { 0x53,0x7f,0x45,0x62 },
+ { 0x6c,0x5c,0x74,0x48 }, { 0x65,0x51,0x7f,0x46 },
+ { 0x7e,0x46,0x62,0x54 }, { 0x77,0x4b,0x69,0x5a },
+ { 0x90,0xd0,0xb0,0xe0 }, { 0x99,0xdd,0xbb,0xee },
+ { 0x82,0xca,0xa6,0xfc }, { 0x8b,0xc7,0xad,0xf2 },
+ { 0xb4,0xe4,0x9c,0xd8 }, { 0xbd,0xe9,0x97,0xd6 },
+ { 0xa6,0xfe,0x8a,0xc4 }, { 0xaf,0xf3,0x81,0xca },
+ { 0xd8,0xb8,0xe8,0x90 }, { 0xd1,0xb5,0xe3,0x9e },
+ { 0xca,0xa2,0xfe,0x8c }, { 0xc3,0xaf,0xf5,0x82 },
+ { 0xfc,0x8c,0xc4,0xa8 }, { 0xf5,0x81,0xcf,0xa6 },
+ { 0xee,0x96,0xd2,0xb4 }, { 0xe7,0x9b,0xd9,0xba },
+ { 0x3b,0xbb,0x7b,0xdb }, { 0x32,0xb6,0x70,0xd5 },
+ { 0x29,0xa1,0x6d,0xc7 }, { 0x20,0xac,0x66,0xc9 },
+ { 0x1f,0x8f,0x57,0xe3 }, { 0x16,0x82,0x5c,0xed },
+ { 0x0d,0x95,0x41,0xff }, { 0x04,0x98,0x4a,0xf1 },
+ { 0x73,0xd3,0x23,0xab }, { 0x7a,0xde,0x28,0xa5 },
+ { 0x61,0xc9,0x35,0xb7 }, { 0x68,0xc4,0x3e,0xb9 },
+ { 0x57,0xe7,0x0f,0x93 }, { 0x5e,0xea,0x04,0x9d },
+ { 0x45,0xfd,0x19,0x8f }, { 0x4c,0xf0,0x12,0x81 },
+ { 0xab,0x6b,0xcb,0x3b }, { 0xa2,0x66,0xc0,0x35 },
+ { 0xb9,0x71,0xdd,0x27 }, { 0xb0,0x7c,0xd6,0x29 },
+ { 0x8f,0x5f,0xe7,0x03 }, { 0x86,0x52,0xec,0x0d },
+ { 0x9d,0x45,0xf1,0x1f }, { 0x94,0x48,0xfa,0x11 },
+ { 0xe3,0x03,0x93,0x4b }, { 0xea,0x0e,0x98,0x45 },
+ { 0xf1,0x19,0x85,0x57 }, { 0xf8,0x14,0x8e,0x59 },
+ { 0xc7,0x37,0xbf,0x73 }, { 0xce,0x3a,0xb4,0x7d },
+ { 0xd5,0x2d,0xa9,0x6f }, { 0xdc,0x20,0xa2,0x61 },
+ { 0x76,0x6d,0xf6,0xad }, { 0x7f,0x60,0xfd,0xa3 },
+ { 0x64,0x77,0xe0,0xb1 }, { 0x6d,0x7a,0xeb,0xbf },
+ { 0x52,0x59,0xda,0x95 }, { 0x5b,0x54,0xd1,0x9b },
+ { 0x40,0x43,0xcc,0x89 }, { 0x49,0x4e,0xc7,0x87 },
+ { 0x3e,0x05,0xae,0xdd }, { 0x37,0x08,0xa5,0xd3 },
+ { 0x2c,0x1f,0xb8,0xc1 }, { 0x25,0x12,0xb3,0xcf },
+ { 0x1a,0x31,0x82,0xe5 }, { 0x13,0x3c,0x89,0xeb },
+ { 0x08,0x2b,0x94,0xf9 }, { 0x01,0x26,0x9f,0xf7 },
+ { 0xe6,0xbd,0x46,0x4d }, { 0xef,0xb0,0x4d,0x43 },
+ { 0xf4,0xa7,0x50,0x51 }, { 0xfd,0xaa,0x5b,0x5f },
+ { 0xc2,0x89,0x6a,0x75 }, { 0xcb,0x84,0x61,0x7b },
+ { 0xd0,0x93,0x7c,0x69 }, { 0xd9,0x9e,0x77,0x67 },
+ { 0xae,0xd5,0x1e,0x3d }, { 0xa7,0xd8,0x15,0x33 },
+ { 0xbc,0xcf,0x08,0x21 }, { 0xb5,0xc2,0x03,0x2f },
+ { 0x8a,0xe1,0x32,0x05 }, { 0x83,0xec,0x39,0x0b },
+ { 0x98,0xfb,0x24,0x19 }, { 0x91,0xf6,0x2f,0x17 },
+ { 0x4d,0xd6,0x8d,0x76 }, { 0x44,0xdb,0x86,0x78 },
+ { 0x5f,0xcc,0x9b,0x6a }, { 0x56,0xc1,0x90,0x64 },
+ { 0x69,0xe2,0xa1,0x4e }, { 0x60,0xef,0xaa,0x40 },
+ { 0x7b,0xf8,0xb7,0x52 }, { 0x72,0xf5,0xbc,0x5c },
+ { 0x05,0xbe,0xd5,0x06 }, { 0x0c,0xb3,0xde,0x08 },
+ { 0x17,0xa4,0xc3,0x1a }, { 0x1e,0xa9,0xc8,0x14 },
+ { 0x21,0x8a,0xf9,0x3e }, { 0x28,0x87,0xf2,0x30 },
+ { 0x33,0x90,0xef,0x22 }, { 0x3a,0x9d,0xe4,0x2c },
+ { 0xdd,0x06,0x3d,0x96 }, { 0xd4,0x0b,0x36,0x98 },
+ { 0xcf,0x1c,0x2b,0x8a }, { 0xc6,0x11,0x20,0x84 },
+ { 0xf9,0x32,0x11,0xae }, { 0xf0,0x3f,0x1a,0xa0 },
+ { 0xeb,0x28,0x07,0xb2 }, { 0xe2,0x25,0x0c,0xbc },
+ { 0x95,0x6e,0x65,0xe6 }, { 0x9c,0x63,0x6e,0xe8 },
+ { 0x87,0x74,0x73,0xfa }, { 0x8e,0x79,0x78,0xf4 },
+ { 0xb1,0x5a,0x49,0xde }, { 0xb8,0x57,0x42,0xd0 },
+ { 0xa3,0x40,0x5f,0xc2 }, { 0xaa,0x4d,0x54,0xcc },
+ { 0xec,0xda,0xf7,0x41 }, { 0xe5,0xd7,0xfc,0x4f },
+ { 0xfe,0xc0,0xe1,0x5d }, { 0xf7,0xcd,0xea,0x53 },
+ { 0xc8,0xee,0xdb,0x79 }, { 0xc1,0xe3,0xd0,0x77 },
+ { 0xda,0xf4,0xcd,0x65 }, { 0xd3,0xf9,0xc6,0x6b },
+ { 0xa4,0xb2,0xaf,0x31 }, { 0xad,0xbf,0xa4,0x3f },
+ { 0xb6,0xa8,0xb9,0x2d }, { 0xbf,0xa5,0xb2,0x23 },
+ { 0x80,0x86,0x83,0x09 }, { 0x89,0x8b,0x88,0x07 },
+ { 0x92,0x9c,0x95,0x15 }, { 0x9b,0x91,0x9e,0x1b },
+ { 0x7c,0x0a,0x47,0xa1 }, { 0x75,0x07,0x4c,0xaf },
+ { 0x6e,0x10,0x51,0xbd }, { 0x67,0x1d,0x5a,0xb3 },
+ { 0x58,0x3e,0x6b,0x99 }, { 0x51,0x33,0x60,0x97 },
+ { 0x4a,0x24,0x7d,0x85 }, { 0x43,0x29,0x76,0x8b },
+ { 0x34,0x62,0x1f,0xd1 }, { 0x3d,0x6f,0x14,0xdf },
+ { 0x26,0x78,0x09,0xcd }, { 0x2f,0x75,0x02,0xc3 },
+ { 0x10,0x56,0x33,0xe9 }, { 0x19,0x5b,0x38,0xe7 },
+ { 0x02,0x4c,0x25,0xf5 }, { 0x0b,0x41,0x2e,0xfb },
+ { 0xd7,0x61,0x8c,0x9a }, { 0xde,0x6c,0x87,0x94 },
+ { 0xc5,0x7b,0x9a,0x86 }, { 0xcc,0x76,0x91,0x88 },
+ { 0xf3,0x55,0xa0,0xa2 }, { 0xfa,0x58,0xab,0xac },
+ { 0xe1,0x4f,0xb6,0xbe }, { 0xe8,0x42,0xbd,0xb0 },
+ { 0x9f,0x09,0xd4,0xea }, { 0x96,0x04,0xdf,0xe4 },
+ { 0x8d,0x13,0xc2,0xf6 }, { 0x84,0x1e,0xc9,0xf8 },
+ { 0xbb,0x3d,0xf8,0xd2 }, { 0xb2,0x30,0xf3,0xdc },
+ { 0xa9,0x27,0xee,0xce }, { 0xa0,0x2a,0xe5,0xc0 },
+ { 0x47,0xb1,0x3c,0x7a }, { 0x4e,0xbc,0x37,0x74 },
+ { 0x55,0xab,0x2a,0x66 }, { 0x5c,0xa6,0x21,0x68 },
+ { 0x63,0x85,0x10,0x42 }, { 0x6a,0x88,0x1b,0x4c },
+ { 0x71,0x9f,0x06,0x5e }, { 0x78,0x92,0x0d,0x50 },
+ { 0x0f,0xd9,0x64,0x0a }, { 0x06,0xd4,0x6f,0x04 },
+ { 0x1d,0xc3,0x72,0x16 }, { 0x14,0xce,0x79,0x18 },
+ { 0x2b,0xed,0x48,0x32 }, { 0x22,0xe0,0x43,0x3c },
+ { 0x39,0xf7,0x5e,0x2e }, { 0x30,0xfa,0x55,0x20 },
+ { 0x9a,0xb7,0x01,0xec }, { 0x93,0xba,0x0a,0xe2 },
+ { 0x88,0xad,0x17,0xf0 }, { 0x81,0xa0,0x1c,0xfe },
+ { 0xbe,0x83,0x2d,0xd4 }, { 0xb7,0x8e,0x26,0xda },
+ { 0xac,0x99,0x3b,0xc8 }, { 0xa5,0x94,0x30,0xc6 },
+ { 0xd2,0xdf,0x59,0x9c }, { 0xdb,0xd2,0x52,0x92 },
+ { 0xc0,0xc5,0x4f,0x80 }, { 0xc9,0xc8,0x44,0x8e },
+ { 0xf6,0xeb,0x75,0xa4 }, { 0xff,0xe6,0x7e,0xaa },
+ { 0xe4,0xf1,0x63,0xb8 }, { 0xed,0xfc,0x68,0xb6 },
+ { 0x0a,0x67,0xb1,0x0c }, { 0x03,0x6a,0xba,0x02 },
+ { 0x18,0x7d,0xa7,0x10 }, { 0x11,0x70,0xac,0x1e },
+ { 0x2e,0x53,0x9d,0x34 }, { 0x27,0x5e,0x96,0x3a },
+ { 0x3c,0x49,0x8b,0x28 }, { 0x35,0x44,0x80,0x26 },
+ { 0x42,0x0f,0xe9,0x7c }, { 0x4b,0x02,0xe2,0x72 },
+ { 0x50,0x15,0xff,0x60 }, { 0x59,0x18,0xf4,0x6e },
+ { 0x66,0x3b,0xc5,0x44 }, { 0x6f,0x36,0xce,0x4a },
+ { 0x74,0x21,0xd3,0x58 }, { 0x7d,0x2c,0xd8,0x56 },
+ { 0xa1,0x0c,0x7a,0x37 }, { 0xa8,0x01,0x71,0x39 },
+ { 0xb3,0x16,0x6c,0x2b }, { 0xba,0x1b,0x67,0x25 },
+ { 0x85,0x38,0x56,0x0f }, { 0x8c,0x35,0x5d,0x01 },
+ { 0x97,0x22,0x40,0x13 }, { 0x9e,0x2f,0x4b,0x1d },
+ { 0xe9,0x64,0x22,0x47 }, { 0xe0,0x69,0x29,0x49 },
+ { 0xfb,0x7e,0x34,0x5b }, { 0xf2,0x73,0x3f,0x55 },
+ { 0xcd,0x50,0x0e,0x7f }, { 0xc4,0x5d,0x05,0x71 },
+ { 0xdf,0x4a,0x18,0x63 }, { 0xd6,0x47,0x13,0x6d },
+ { 0x31,0xdc,0xca,0xd7 }, { 0x38,0xd1,0xc1,0xd9 },
+ { 0x23,0xc6,0xdc,0xcb }, { 0x2a,0xcb,0xd7,0xc5 },
+ { 0x15,0xe8,0xe6,0xef }, { 0x1c,0xe5,0xed,0xe1 },
+ { 0x07,0xf2,0xf0,0xf3 }, { 0x0e,0xff,0xfb,0xfd },
+ { 0x79,0xb4,0x92,0xa7 }, { 0x70,0xb9,0x99,0xa9 },
+ { 0x6b,0xae,0x84,0xbb }, { 0x62,0xa3,0x8f,0xb5 },
+ { 0x5d,0x80,0xbe,0x9f }, { 0x54,0x8d,0xb5,0x91 },
+ { 0x4f,0x9a,0xa8,0x83 }, { 0x46,0x97,0xa3,0x8d }
+ };
+
+static const u32 rcon[30] =
+ {
+ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
+ 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35,
+ 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/rijndael.c b/grub-core/lib/libgcrypt/cipher/rijndael.c
new file mode 100644
index 0000000..d43b349
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/rijndael.c
@@ -0,0 +1,1253 @@
+/* Rijndael (AES) for GnuPG
+ * Copyright (C) 2000, 2001, 2002, 2003, 2007,
+ * 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *******************************************************************
+ * The code here is based on the optimized implementation taken from
+ * http://www.esat.kuleuven.ac.be/~rijmen/rijndael/ on Oct 2, 2000,
+ * which carries this notice:
+ *------------------------------------------
+ * rijndael-alg-fst.c v2.3 April '2000
+ *
+ * Optimised ANSI C code
+ *
+ * authors: v1.0: Antoon Bosselaers
+ * v2.0: Vincent Rijmen
+ * v2.3: Paulo Barreto
+ *
+ * This code is placed in the public domain.
+ *------------------------------------------
+ *
+ * The SP800-38a document is available at:
+ * http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h> /* for memcmp() */
+
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+#define MAXKC (256/32)
+#define MAXROUNDS 14
+#define BLOCKSIZE (128/8)
+
+
+/* USE_PADLOCK indicates whether to compile the padlock specific
+ code. */
+#undef USE_PADLOCK
+#ifdef ENABLE_PADLOCK_SUPPORT
+# if defined (__i386__) && SIZEOF_UNSIGNED_LONG == 4 && defined (__GNUC__)
+# define USE_PADLOCK
+# endif
+#endif /*ENABLE_PADLOCK_SUPPORT*/
+
+static const char *selftest(void);
+
+typedef struct
+{
+ int ROUNDS; /* Key-length-dependent number of rounds. */
+ int decryption_prepared; /* The decryption key schedule is available. */
+#ifdef USE_PADLOCK
+ int use_padlock; /* Padlock shall be used. */
+ /* The key as passed to the padlock engine. */
+ unsigned char padlock_key[16] __attribute__ ((aligned (16)));
+#endif
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte keyschedule[MAXROUNDS+1][4][4];
+ } u1;
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte keyschedule[MAXROUNDS+1][4][4];
+ } u2;
+} RIJNDAEL_context;
+
+#define keySched u1.keyschedule
+#define keySched2 u2.keyschedule
+
+/* All the numbers. */
+#include "rijndael-tables.h"
+
+
+/* Perform the key setup. */
+static gcry_err_code_t
+do_setkey (RIJNDAEL_context *ctx, const byte *key, const unsigned keylen)
+{
+ static int initialized = 0;
+ static const char *selftest_failed=0;
+ int ROUNDS;
+ int i,j, r, t, rconpointer = 0;
+ int KC;
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte k[MAXKC][4];
+ } k;
+#define k k.k
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte tk[MAXKC][4];
+ } tk;
+#define tk tk.tk
+
+ /* The on-the-fly self tests are only run in non-fips mode. In fips
+ mode explicit self-tests are required. Actually the on-the-fly
+ self-tests are not fully thread-safe and it might happen that a
+ failed self-test won't get noticed in another thread.
+
+ FIXME: We might want to have a central registry of succeeded
+ self-tests. */
+ if (!fips_mode () && !initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if (selftest_failed)
+ log_error ("%s\n", selftest_failed );
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ ctx->decryption_prepared = 0;
+#ifdef USE_PADLOCK
+ ctx->use_padlock = 0;
+#endif
+
+ if( keylen == 128/8 )
+ {
+ ROUNDS = 10;
+ KC = 4;
+#ifdef USE_PADLOCK
+ if ((_gcry_get_hw_features () & HWF_PADLOCK_AES))
+ {
+ ctx->use_padlock = 1;
+ memcpy (ctx->padlock_key, key, keylen);
+ }
+#endif
+ }
+ else if ( keylen == 192/8 )
+ {
+ ROUNDS = 12;
+ KC = 6;
+ }
+ else if ( keylen == 256/8 )
+ {
+ ROUNDS = 14;
+ KC = 8;
+ }
+ else
+ return GPG_ERR_INV_KEYLEN;
+
+ ctx->ROUNDS = ROUNDS;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ /* Nothing to do as we support only hardware key generation for
+ now. */
+ }
+ else
+#endif /*USE_PADLOCK*/
+ {
+#define W (ctx->keySched)
+ for (i = 0; i < keylen; i++)
+ {
+ k[i >> 2][i & 3] = key[i];
+ }
+
+ for (j = KC-1; j >= 0; j--)
+ {
+ *((u32*)tk[j]) = *((u32*)k[j]);
+ }
+ r = 0;
+ t = 0;
+ /* Copy values into round key array. */
+ for (j = 0; (j < KC) && (r < ROUNDS + 1); )
+ {
+ for (; (j < KC) && (t < 4); j++, t++)
+ {
+ *((u32*)W[r][t]) = *((u32*)tk[j]);
+ }
+ if (t == 4)
+ {
+ r++;
+ t = 0;
+ }
+ }
+
+ while (r < ROUNDS + 1)
+ {
+ /* While not enough round key material calculated calculate
+ new values. */
+ tk[0][0] ^= S[tk[KC-1][1]];
+ tk[0][1] ^= S[tk[KC-1][2]];
+ tk[0][2] ^= S[tk[KC-1][3]];
+ tk[0][3] ^= S[tk[KC-1][0]];
+ tk[0][0] ^= rcon[rconpointer++];
+
+ if (KC != 8)
+ {
+ for (j = 1; j < KC; j++)
+ {
+ *((u32*)tk[j]) ^= *((u32*)tk[j-1]);
+ }
+ }
+ else
+ {
+ for (j = 1; j < KC/2; j++)
+ {
+ *((u32*)tk[j]) ^= *((u32*)tk[j-1]);
+ }
+ tk[KC/2][0] ^= S[tk[KC/2 - 1][0]];
+ tk[KC/2][1] ^= S[tk[KC/2 - 1][1]];
+ tk[KC/2][2] ^= S[tk[KC/2 - 1][2]];
+ tk[KC/2][3] ^= S[tk[KC/2 - 1][3]];
+ for (j = KC/2 + 1; j < KC; j++)
+ {
+ *((u32*)tk[j]) ^= *((u32*)tk[j-1]);
+ }
+ }
+
+ /* Copy values into round key array. */
+ for (j = 0; (j < KC) && (r < ROUNDS + 1); )
+ {
+ for (; (j < KC) && (t < 4); j++, t++)
+ {
+ *((u32*)W[r][t]) = *((u32*)tk[j]);
+ }
+ if (t == 4)
+ {
+ r++;
+ t = 0;
+ }
+ }
+ }
+#undef W
+ }
+
+ return 0;
+#undef tk
+#undef k
+}
+
+
+static gcry_err_code_t
+rijndael_setkey (void *context, const byte *key, const unsigned keylen)
+{
+ RIJNDAEL_context *ctx = context;
+
+ int rc = do_setkey (ctx, key, keylen);
+ _gcry_burn_stack ( 100 + 16*sizeof(int));
+ return rc;
+}
+
+
+/* Make a decryption key from an encryption key. */
+static void
+prepare_decryption( RIJNDAEL_context *ctx )
+{
+ int r;
+ union
+ {
+ PROPERLY_ALIGNED_TYPE dummy;
+ byte *w;
+ } w;
+#define w w.w
+
+ for (r=0; r < MAXROUNDS+1; r++ )
+ {
+ *((u32*)ctx->keySched2[r][0]) = *((u32*)ctx->keySched[r][0]);
+ *((u32*)ctx->keySched2[r][1]) = *((u32*)ctx->keySched[r][1]);
+ *((u32*)ctx->keySched2[r][2]) = *((u32*)ctx->keySched[r][2]);
+ *((u32*)ctx->keySched2[r][3]) = *((u32*)ctx->keySched[r][3]);
+ }
+#define W (ctx->keySched2)
+ for (r = 1; r < ctx->ROUNDS; r++)
+ {
+ w = W[r][0];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+
+ w = W[r][1];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+
+ w = W[r][2];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+
+ w = W[r][3];
+ *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
+ ^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
+ }
+#undef W
+#undef w
+}
+
+
+
+/* Encrypt one block. A and B need to be aligned on a 4 byte
+ boundary. A and B may be the same. */
+static void
+do_encrypt_aligned (const RIJNDAEL_context *ctx,
+ unsigned char *b, const unsigned char *a)
+{
+#define rk (ctx->keySched)
+ int ROUNDS = ctx->ROUNDS;
+ int r;
+ union
+ {
+ u32 tempu32[4]; /* Force correct alignment. */
+ byte temp[4][4];
+ } u;
+
+ *((u32*)u.temp[0]) = *((u32*)(a )) ^ *((u32*)rk[0][0]);
+ *((u32*)u.temp[1]) = *((u32*)(a+ 4)) ^ *((u32*)rk[0][1]);
+ *((u32*)u.temp[2]) = *((u32*)(a+ 8)) ^ *((u32*)rk[0][2]);
+ *((u32*)u.temp[3]) = *((u32*)(a+12)) ^ *((u32*)rk[0][3]);
+ *((u32*)(b )) = (*((u32*)T1[u.temp[0][0]])
+ ^ *((u32*)T2[u.temp[1][1]])
+ ^ *((u32*)T3[u.temp[2][2]])
+ ^ *((u32*)T4[u.temp[3][3]]));
+ *((u32*)(b + 4)) = (*((u32*)T1[u.temp[1][0]])
+ ^ *((u32*)T2[u.temp[2][1]])
+ ^ *((u32*)T3[u.temp[3][2]])
+ ^ *((u32*)T4[u.temp[0][3]]));
+ *((u32*)(b + 8)) = (*((u32*)T1[u.temp[2][0]])
+ ^ *((u32*)T2[u.temp[3][1]])
+ ^ *((u32*)T3[u.temp[0][2]])
+ ^ *((u32*)T4[u.temp[1][3]]));
+ *((u32*)(b +12)) = (*((u32*)T1[u.temp[3][0]])
+ ^ *((u32*)T2[u.temp[0][1]])
+ ^ *((u32*)T3[u.temp[1][2]])
+ ^ *((u32*)T4[u.temp[2][3]]));
+
+ for (r = 1; r < ROUNDS-1; r++)
+ {
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[r][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[r][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[r][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[r][3]);
+
+ *((u32*)(b )) = (*((u32*)T1[u.temp[0][0]])
+ ^ *((u32*)T2[u.temp[1][1]])
+ ^ *((u32*)T3[u.temp[2][2]])
+ ^ *((u32*)T4[u.temp[3][3]]));
+ *((u32*)(b + 4)) = (*((u32*)T1[u.temp[1][0]])
+ ^ *((u32*)T2[u.temp[2][1]])
+ ^ *((u32*)T3[u.temp[3][2]])
+ ^ *((u32*)T4[u.temp[0][3]]));
+ *((u32*)(b + 8)) = (*((u32*)T1[u.temp[2][0]])
+ ^ *((u32*)T2[u.temp[3][1]])
+ ^ *((u32*)T3[u.temp[0][2]])
+ ^ *((u32*)T4[u.temp[1][3]]));
+ *((u32*)(b +12)) = (*((u32*)T1[u.temp[3][0]])
+ ^ *((u32*)T2[u.temp[0][1]])
+ ^ *((u32*)T3[u.temp[1][2]])
+ ^ *((u32*)T4[u.temp[2][3]]));
+ }
+
+ /* Last round is special. */
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[ROUNDS-1][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[ROUNDS-1][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[ROUNDS-1][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[ROUNDS-1][3]);
+ b[ 0] = T1[u.temp[0][0]][1];
+ b[ 1] = T1[u.temp[1][1]][1];
+ b[ 2] = T1[u.temp[2][2]][1];
+ b[ 3] = T1[u.temp[3][3]][1];
+ b[ 4] = T1[u.temp[1][0]][1];
+ b[ 5] = T1[u.temp[2][1]][1];
+ b[ 6] = T1[u.temp[3][2]][1];
+ b[ 7] = T1[u.temp[0][3]][1];
+ b[ 8] = T1[u.temp[2][0]][1];
+ b[ 9] = T1[u.temp[3][1]][1];
+ b[10] = T1[u.temp[0][2]][1];
+ b[11] = T1[u.temp[1][3]][1];
+ b[12] = T1[u.temp[3][0]][1];
+ b[13] = T1[u.temp[0][1]][1];
+ b[14] = T1[u.temp[1][2]][1];
+ b[15] = T1[u.temp[2][3]][1];
+ *((u32*)(b )) ^= *((u32*)rk[ROUNDS][0]);
+ *((u32*)(b+ 4)) ^= *((u32*)rk[ROUNDS][1]);
+ *((u32*)(b+ 8)) ^= *((u32*)rk[ROUNDS][2]);
+ *((u32*)(b+12)) ^= *((u32*)rk[ROUNDS][3]);
+#undef rk
+}
+
+
+static void
+do_encrypt (const RIJNDAEL_context *ctx,
+ unsigned char *bx, const unsigned char *ax)
+{
+ /* BX and AX are not necessary correctly aligned. Thus we need to
+ copy them here. */
+ union
+ {
+ u32 dummy[4];
+ byte a[16];
+ } a;
+ union
+ {
+ u32 dummy[4];
+ byte b[16];
+ } b;
+
+ memcpy (a.a, ax, 16);
+ do_encrypt_aligned (ctx, b.b, a.a);
+ memcpy (bx, b.b, 16);
+}
+
+
+/* Encrypt or decrypt one block using the padlock engine. A and B may
+ be the same. */
+#ifdef USE_PADLOCK
+static void
+do_padlock (const RIJNDAEL_context *ctx, int decrypt_flag,
+ unsigned char *bx, const unsigned char *ax)
+{
+ /* BX and AX are not necessary correctly aligned. Thus we need to
+ copy them here. */
+ unsigned char a[16] __attribute__ ((aligned (16)));
+ unsigned char b[16] __attribute__ ((aligned (16)));
+ unsigned int cword[4] __attribute__ ((aligned (16)));
+
+ /* The control word fields are:
+ 127:12 11:10 9 8 7 6 5 4 3:0
+ RESERVED KSIZE CRYPT INTER KEYGN CIPHR ALIGN DGEST ROUND */
+ cword[0] = (ctx->ROUNDS & 15); /* (The mask is just a safeguard.) */
+ cword[1] = 0;
+ cword[2] = 0;
+ cword[3] = 0;
+ if (decrypt_flag)
+ cword[0] |= 0x00000200;
+
+ memcpy (a, ax, 16);
+
+ asm volatile
+ ("pushfl\n\t" /* Force key reload. */
+ "popfl\n\t"
+ "xchg %3, %%ebx\n\t" /* Load key. */
+ "movl $1, %%ecx\n\t" /* Init counter for just one block. */
+ ".byte 0xf3, 0x0f, 0xa7, 0xc8\n\t" /* REP XSTORE ECB. */
+ "xchg %3, %%ebx\n" /* Restore GOT register. */
+ : /* No output */
+ : "S" (a), "D" (b), "d" (cword), "r" (ctx->padlock_key)
+ : "%ecx", "cc", "memory"
+ );
+
+ memcpy (bx, b, 16);
+
+}
+#endif /*USE_PADLOCK*/
+
+
+static void
+rijndael_encrypt (void *context, byte *b, const byte *a)
+{
+ RIJNDAEL_context *ctx = context;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ do_padlock (ctx, 0, b, a);
+ _gcry_burn_stack (48 + 15 /* possible padding for alignment */);
+ }
+ else
+#endif /*USE_PADLOCK*/
+ {
+ do_encrypt (ctx, b, a);
+ _gcry_burn_stack (48 + 2*sizeof(int));
+ }
+}
+
+
+/* Bulk encryption of complete blocks in CFB mode. Caller needs to
+ make sure that IV is aligned on an unsigned long boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+void
+_gcry_aes_cfb_enc (void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks)
+{
+ RIJNDAEL_context *ctx = context;
+ unsigned char *outbuf = outbuf_arg;
+ const unsigned char *inbuf = inbuf_arg;
+ unsigned char *ivp;
+ int i;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ /* Fixme: Let Padlock do the CFBing. */
+ for ( ;nblocks; nblocks-- )
+ {
+ /* Encrypt the IV. */
+ do_padlock (ctx, 0, iv, iv);
+ /* XOR the input with the IV and store input into IV. */
+ for (ivp=iv,i=0; i < BLOCKSIZE; i++ )
+ *outbuf++ = (*ivp++ ^= *inbuf++);
+ }
+ }
+ else
+#endif /* USE_PADLOCK*/
+ {
+ for ( ;nblocks; nblocks-- )
+ {
+ /* Encrypt the IV. */
+ do_encrypt_aligned (ctx, iv, iv);
+ /* XOR the input with the IV and store input into IV. */
+ for (ivp=iv,i=0; i < BLOCKSIZE; i++ )
+ *outbuf++ = (*ivp++ ^= *inbuf++);
+ }
+ }
+
+ _gcry_burn_stack (48 + 2*sizeof(int));
+}
+
+
+/* Bulk encryption of complete blocks in CBC mode. Caller needs to
+ make sure that IV is aligned on an unsigned long boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+void
+_gcry_aes_cbc_enc (void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks, int cbc_mac)
+{
+ RIJNDAEL_context *ctx = context;
+ unsigned char *outbuf = outbuf_arg;
+ const unsigned char *inbuf = inbuf_arg;
+ unsigned char *ivp;
+ int i;
+
+ for ( ;nblocks; nblocks-- )
+ {
+ for (ivp=iv, i=0; i < BLOCKSIZE; i++ )
+ outbuf[i] = inbuf[i] ^ *ivp++;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ do_padlock (ctx, 0, outbuf, outbuf);
+ else
+#endif /*USE_PADLOCK*/
+ do_encrypt (ctx, outbuf, outbuf );
+
+ memcpy (iv, outbuf, BLOCKSIZE);
+ inbuf += BLOCKSIZE;
+ if (!cbc_mac)
+ outbuf += BLOCKSIZE;
+ }
+
+ _gcry_burn_stack (48 + 2*sizeof(int));
+}
+
+
+
+/* Decrypt one block. A and B need to be aligned on a 4 byte boundary
+ and the decryption must have been prepared. A and B may be the
+ same. */
+static void
+do_decrypt_aligned (RIJNDAEL_context *ctx,
+ unsigned char *b, const unsigned char *a)
+{
+#define rk (ctx->keySched2)
+ int ROUNDS = ctx->ROUNDS;
+ int r;
+ union
+ {
+ u32 tempu32[4]; /* Force correct alignment. */
+ byte temp[4][4];
+ } u;
+
+
+ *((u32*)u.temp[0]) = *((u32*)(a )) ^ *((u32*)rk[ROUNDS][0]);
+ *((u32*)u.temp[1]) = *((u32*)(a+ 4)) ^ *((u32*)rk[ROUNDS][1]);
+ *((u32*)u.temp[2]) = *((u32*)(a+ 8)) ^ *((u32*)rk[ROUNDS][2]);
+ *((u32*)u.temp[3]) = *((u32*)(a+12)) ^ *((u32*)rk[ROUNDS][3]);
+
+ *((u32*)(b )) = (*((u32*)T5[u.temp[0][0]])
+ ^ *((u32*)T6[u.temp[3][1]])
+ ^ *((u32*)T7[u.temp[2][2]])
+ ^ *((u32*)T8[u.temp[1][3]]));
+ *((u32*)(b+ 4)) = (*((u32*)T5[u.temp[1][0]])
+ ^ *((u32*)T6[u.temp[0][1]])
+ ^ *((u32*)T7[u.temp[3][2]])
+ ^ *((u32*)T8[u.temp[2][3]]));
+ *((u32*)(b+ 8)) = (*((u32*)T5[u.temp[2][0]])
+ ^ *((u32*)T6[u.temp[1][1]])
+ ^ *((u32*)T7[u.temp[0][2]])
+ ^ *((u32*)T8[u.temp[3][3]]));
+ *((u32*)(b+12)) = (*((u32*)T5[u.temp[3][0]])
+ ^ *((u32*)T6[u.temp[2][1]])
+ ^ *((u32*)T7[u.temp[1][2]])
+ ^ *((u32*)T8[u.temp[0][3]]));
+
+ for (r = ROUNDS-1; r > 1; r--)
+ {
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[r][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[r][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[r][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[r][3]);
+ *((u32*)(b )) = (*((u32*)T5[u.temp[0][0]])
+ ^ *((u32*)T6[u.temp[3][1]])
+ ^ *((u32*)T7[u.temp[2][2]])
+ ^ *((u32*)T8[u.temp[1][3]]));
+ *((u32*)(b+ 4)) = (*((u32*)T5[u.temp[1][0]])
+ ^ *((u32*)T6[u.temp[0][1]])
+ ^ *((u32*)T7[u.temp[3][2]])
+ ^ *((u32*)T8[u.temp[2][3]]));
+ *((u32*)(b+ 8)) = (*((u32*)T5[u.temp[2][0]])
+ ^ *((u32*)T6[u.temp[1][1]])
+ ^ *((u32*)T7[u.temp[0][2]])
+ ^ *((u32*)T8[u.temp[3][3]]));
+ *((u32*)(b+12)) = (*((u32*)T5[u.temp[3][0]])
+ ^ *((u32*)T6[u.temp[2][1]])
+ ^ *((u32*)T7[u.temp[1][2]])
+ ^ *((u32*)T8[u.temp[0][3]]));
+ }
+
+ /* Last round is special. */
+ *((u32*)u.temp[0]) = *((u32*)(b )) ^ *((u32*)rk[1][0]);
+ *((u32*)u.temp[1]) = *((u32*)(b+ 4)) ^ *((u32*)rk[1][1]);
+ *((u32*)u.temp[2]) = *((u32*)(b+ 8)) ^ *((u32*)rk[1][2]);
+ *((u32*)u.temp[3]) = *((u32*)(b+12)) ^ *((u32*)rk[1][3]);
+ b[ 0] = S5[u.temp[0][0]];
+ b[ 1] = S5[u.temp[3][1]];
+ b[ 2] = S5[u.temp[2][2]];
+ b[ 3] = S5[u.temp[1][3]];
+ b[ 4] = S5[u.temp[1][0]];
+ b[ 5] = S5[u.temp[0][1]];
+ b[ 6] = S5[u.temp[3][2]];
+ b[ 7] = S5[u.temp[2][3]];
+ b[ 8] = S5[u.temp[2][0]];
+ b[ 9] = S5[u.temp[1][1]];
+ b[10] = S5[u.temp[0][2]];
+ b[11] = S5[u.temp[3][3]];
+ b[12] = S5[u.temp[3][0]];
+ b[13] = S5[u.temp[2][1]];
+ b[14] = S5[u.temp[1][2]];
+ b[15] = S5[u.temp[0][3]];
+ *((u32*)(b )) ^= *((u32*)rk[0][0]);
+ *((u32*)(b+ 4)) ^= *((u32*)rk[0][1]);
+ *((u32*)(b+ 8)) ^= *((u32*)rk[0][2]);
+ *((u32*)(b+12)) ^= *((u32*)rk[0][3]);
+#undef rk
+}
+
+
+/* Decrypt one block. AX and BX may be the same. */
+static void
+do_decrypt (RIJNDAEL_context *ctx, byte *bx, const byte *ax)
+{
+ /* BX and AX are not necessary correctly aligned. Thus we need to
+ copy them here. */
+ union
+ {
+ u32 dummy[4];
+ byte a[16];
+ } a;
+ union
+ {
+ u32 dummy[4];
+ byte b[16];
+ } b;
+
+ if ( !ctx->decryption_prepared )
+ {
+ prepare_decryption ( ctx );
+ _gcry_burn_stack (64);
+ ctx->decryption_prepared = 1;
+ }
+
+ memcpy (a.a, ax, 16);
+ do_decrypt_aligned (ctx, b.b, a.a);
+ memcpy (bx, b.b, 16);
+#undef rk
+}
+
+
+
+
+static void
+rijndael_decrypt (void *context, byte *b, const byte *a)
+{
+ RIJNDAEL_context *ctx = context;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ do_padlock (ctx, 1, b, a);
+ _gcry_burn_stack (48 + 2*sizeof(int) /* FIXME */);
+ }
+ else
+#endif /*USE_PADLOCK*/
+ {
+ do_decrypt (ctx, b, a);
+ _gcry_burn_stack (48+2*sizeof(int));
+ }
+}
+
+
+/* Bulk decryption of complete blocks in CFB mode. Caller needs to
+ make sure that IV is aligned on an unisgned lonhg boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+void
+_gcry_aes_cfb_dec (void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks)
+{
+ RIJNDAEL_context *ctx = context;
+ unsigned char *outbuf = outbuf_arg;
+ const unsigned char *inbuf = inbuf_arg;
+ unsigned char *ivp;
+ unsigned char temp;
+ int i;
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ {
+ /* Fixme: Let Padlock do the CFBing. */
+ for ( ;nblocks; nblocks-- )
+ {
+ do_padlock (ctx, 0, iv, iv);
+ for (ivp=iv,i=0; i < BLOCKSIZE; i++ )
+ {
+ temp = *inbuf++;
+ *outbuf++ = *ivp ^ temp;
+ *ivp++ = temp;
+ }
+ }
+ }
+ else
+#endif /*USE_PADLOCK*/
+ {
+ for ( ;nblocks; nblocks-- )
+ {
+ do_encrypt_aligned (ctx, iv, iv);
+ for (ivp=iv,i=0; i < BLOCKSIZE; i++ )
+ {
+ temp = *inbuf++;
+ *outbuf++ = *ivp ^ temp;
+ *ivp++ = temp;
+ }
+ }
+ }
+
+ _gcry_burn_stack (48 + 2*sizeof(int));
+}
+
+
+/* Bulk decryption of complete blocks in CBC mode. Caller needs to
+ make sure that IV is aligned on an unsigned long boundary. This
+ function is only intended for the bulk encryption feature of
+ cipher.c. */
+void
+_gcry_aes_cbc_dec (void *context, unsigned char *iv,
+ void *outbuf_arg, const void *inbuf_arg,
+ unsigned int nblocks)
+{
+ RIJNDAEL_context *ctx = context;
+ unsigned char *outbuf = outbuf_arg;
+ const unsigned char *inbuf = inbuf_arg;
+ unsigned char *ivp;
+ int i;
+ unsigned char savebuf[BLOCKSIZE];
+
+ for ( ;nblocks; nblocks-- )
+ {
+ /* We need to save INBUF away because it may be identical to
+ OUTBUF. */
+ memcpy (savebuf, inbuf, BLOCKSIZE);
+
+#ifdef USE_PADLOCK
+ if (ctx->use_padlock)
+ do_padlock (ctx, 1, outbuf, inbuf);
+ else
+#endif /*USE_PADLOCK*/
+ do_decrypt (ctx, outbuf, inbuf);
+
+ for (ivp=iv, i=0; i < BLOCKSIZE; i++ )
+ outbuf[i] ^= *ivp++;
+ memcpy (iv, savebuf, BLOCKSIZE);
+ inbuf += BLOCKSIZE;
+ outbuf += BLOCKSIZE;
+ }
+
+ _gcry_burn_stack (48 + 2*sizeof(int) + BLOCKSIZE + 4*sizeof (char*));
+}
+
+
+
+
+/* Run the self-tests for AES 128. Returns NULL on success. */
+static const char*
+selftest_basic_128 (void)
+{
+ RIJNDAEL_context ctx;
+ unsigned char scratch[16];
+
+ /* The test vectors are from the AES supplied ones; more or less
+ randomly taken from ecb_tbl.txt (I=42,81,14) */
+ static const unsigned char plaintext_128[16] =
+ {
+ 0x01,0x4B,0xAF,0x22,0x78,0xA6,0x9D,0x33,
+ 0x1D,0x51,0x80,0x10,0x36,0x43,0xE9,0x9A
+ };
+ static const unsigned char key_128[16] =
+ {
+ 0xE8,0xE9,0xEA,0xEB,0xED,0xEE,0xEF,0xF0,
+ 0xF2,0xF3,0xF4,0xF5,0xF7,0xF8,0xF9,0xFA
+ };
+ static const unsigned char ciphertext_128[16] =
+ {
+ 0x67,0x43,0xC3,0xD1,0x51,0x9A,0xB4,0xF2,
+ 0xCD,0x9A,0x78,0xAB,0x09,0xA5,0x11,0xBD
+ };
+
+ rijndael_setkey (&ctx, key_128, sizeof (key_128));
+ rijndael_encrypt (&ctx, scratch, plaintext_128);
+ if (memcmp (scratch, ciphertext_128, sizeof (ciphertext_128)))
+ return "AES-128 test encryption failed.";
+ rijndael_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext_128, sizeof (plaintext_128)))
+ return "AES-128 test decryption failed.";
+
+ return NULL;
+}
+
+/* Run the self-tests for AES 192. Returns NULL on success. */
+static const char*
+selftest_basic_192 (void)
+{
+ RIJNDAEL_context ctx;
+ unsigned char scratch[16];
+
+ static unsigned char plaintext_192[16] =
+ {
+ 0x76,0x77,0x74,0x75,0xF1,0xF2,0xF3,0xF4,
+ 0xF8,0xF9,0xE6,0xE7,0x77,0x70,0x71,0x72
+ };
+ static unsigned char key_192[24] =
+ {
+ 0x04,0x05,0x06,0x07,0x09,0x0A,0x0B,0x0C,
+ 0x0E,0x0F,0x10,0x11,0x13,0x14,0x15,0x16,
+ 0x18,0x19,0x1A,0x1B,0x1D,0x1E,0x1F,0x20
+ };
+ static const unsigned char ciphertext_192[16] =
+ {
+ 0x5D,0x1E,0xF2,0x0D,0xCE,0xD6,0xBC,0xBC,
+ 0x12,0x13,0x1A,0xC7,0xC5,0x47,0x88,0xAA
+ };
+
+ rijndael_setkey (&ctx, key_192, sizeof(key_192));
+ rijndael_encrypt (&ctx, scratch, plaintext_192);
+ if (memcmp (scratch, ciphertext_192, sizeof (ciphertext_192)))
+ return "AES-192 test encryption failed.";
+ rijndael_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext_192, sizeof (plaintext_192)))
+ return "AES-192 test decryption failed.";
+
+ return NULL;
+}
+
+
+/* Run the self-tests for AES 256. Returns NULL on success. */
+static const char*
+selftest_basic_256 (void)
+{
+ RIJNDAEL_context ctx;
+ unsigned char scratch[16];
+
+ static unsigned char plaintext_256[16] =
+ {
+ 0x06,0x9A,0x00,0x7F,0xC7,0x6A,0x45,0x9F,
+ 0x98,0xBA,0xF9,0x17,0xFE,0xDF,0x95,0x21
+ };
+ static unsigned char key_256[32] =
+ {
+ 0x08,0x09,0x0A,0x0B,0x0D,0x0E,0x0F,0x10,
+ 0x12,0x13,0x14,0x15,0x17,0x18,0x19,0x1A,
+ 0x1C,0x1D,0x1E,0x1F,0x21,0x22,0x23,0x24,
+ 0x26,0x27,0x28,0x29,0x2B,0x2C,0x2D,0x2E
+ };
+ static const unsigned char ciphertext_256[16] =
+ {
+ 0x08,0x0E,0x95,0x17,0xEB,0x16,0x77,0x71,
+ 0x9A,0xCF,0x72,0x80,0x86,0x04,0x0A,0xE3
+ };
+
+ rijndael_setkey (&ctx, key_256, sizeof(key_256));
+ rijndael_encrypt (&ctx, scratch, plaintext_256);
+ if (memcmp (scratch, ciphertext_256, sizeof (ciphertext_256)))
+ return "AES-256 test encryption failed.";
+ rijndael_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext_256, sizeof (plaintext_256)))
+ return "AES-256 test decryption failed.";
+
+ return NULL;
+}
+
+/* Run all the self-tests and return NULL on success. This function
+ is used for the on-the-fly self-tests. */
+static const char *
+selftest (void)
+{
+ const char *r;
+
+ if ( (r = selftest_basic_128 ())
+ || (r = selftest_basic_192 ())
+ || (r = selftest_basic_256 ()) )
+ return r;
+
+ return r;
+}
+
+
+/* SP800-38a.pdf for AES-128. */
+static const char *
+selftest_fips_128_38a (int requested_mode)
+{
+ struct tv
+ {
+ int mode;
+ const unsigned char key[16];
+ const unsigned char iv[16];
+ struct
+ {
+ const unsigned char input[16];
+ const unsigned char output[16];
+ } data[4];
+ } tv[2] =
+ {
+ {
+ GCRY_CIPHER_MODE_CFB, /* F.3.13, CFB128-AES128 */
+ { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
+ 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ {
+ { { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
+ 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a },
+ { 0x3b, 0x3f, 0xd9, 0x2e, 0xb7, 0x2d, 0xad, 0x20,
+ 0x33, 0x34, 0x49, 0xf8, 0xe8, 0x3c, 0xfb, 0x4a } },
+
+ { { 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
+ 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51 },
+ { 0xc8, 0xa6, 0x45, 0x37, 0xa0, 0xb3, 0xa9, 0x3f,
+ 0xcd, 0xe3, 0xcd, 0xad, 0x9f, 0x1c, 0xe5, 0x8b } },
+
+ { { 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
+ 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef },
+ { 0x26, 0x75, 0x1f, 0x67, 0xa3, 0xcb, 0xb1, 0x40,
+ 0xb1, 0x80, 0x8c, 0xf1, 0x87, 0xa4, 0xf4, 0xdf } },
+
+ { { 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
+ 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
+ { 0xc0, 0x4b, 0x05, 0x35, 0x7c, 0x5d, 0x1c, 0x0e,
+ 0xea, 0xc4, 0xc6, 0x6f, 0x9f, 0xf7, 0xf2, 0xe6 } }
+ }
+ },
+ {
+ GCRY_CIPHER_MODE_OFB,
+ { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
+ 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ {
+ { { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
+ 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a },
+ { 0x3b, 0x3f, 0xd9, 0x2e, 0xb7, 0x2d, 0xad, 0x20,
+ 0x33, 0x34, 0x49, 0xf8, 0xe8, 0x3c, 0xfb, 0x4a } },
+
+ { { 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
+ 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51 },
+ { 0x77, 0x89, 0x50, 0x8d, 0x16, 0x91, 0x8f, 0x03,
+ 0xf5, 0x3c, 0x52, 0xda, 0xc5, 0x4e, 0xd8, 0x25 } },
+
+ { { 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
+ 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef },
+ { 0x97, 0x40, 0x05, 0x1e, 0x9c, 0x5f, 0xec, 0xf6,
+ 0x43, 0x44, 0xf7, 0xa8, 0x22, 0x60, 0xed, 0xcc } },
+
+ { { 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
+ 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 },
+ { 0x30, 0x4c, 0x65, 0x28, 0xf6, 0x59, 0xc7, 0x78,
+ 0x66, 0xa5, 0x10, 0xd9, 0xc1, 0xd6, 0xae, 0x5e } },
+ }
+ }
+ };
+ unsigned char scratch[16];
+ gpg_error_t err;
+ int tvi, idx;
+ gcry_cipher_hd_t hdenc = NULL;
+ gcry_cipher_hd_t hddec = NULL;
+
+#define Fail(a) do { \
+ _gcry_cipher_close (hdenc); \
+ _gcry_cipher_close (hddec); \
+ return a; \
+ } while (0)
+
+ gcry_assert (sizeof tv[0].data[0].input == sizeof scratch);
+ gcry_assert (sizeof tv[0].data[0].output == sizeof scratch);
+
+ for (tvi=0; tvi < DIM (tv); tvi++)
+ if (tv[tvi].mode == requested_mode)
+ break;
+ if (tvi == DIM (tv))
+ Fail ("no test data for this mode");
+
+ err = _gcry_cipher_open (&hdenc, GCRY_CIPHER_AES, tv[tvi].mode, 0);
+ if (err)
+ Fail ("open");
+ err = _gcry_cipher_open (&hddec, GCRY_CIPHER_AES, tv[tvi].mode, 0);
+ if (err)
+ Fail ("open");
+ err = _gcry_cipher_setkey (hdenc, tv[tvi].key, sizeof tv[tvi].key);
+ if (!err)
+ err = _gcry_cipher_setkey (hddec, tv[tvi].key, sizeof tv[tvi].key);
+ if (err)
+ Fail ("set key");
+ err = _gcry_cipher_setiv (hdenc, tv[tvi].iv, sizeof tv[tvi].iv);
+ if (!err)
+ err = _gcry_cipher_setiv (hddec, tv[tvi].iv, sizeof tv[tvi].iv);
+ if (err)
+ Fail ("set IV");
+ for (idx=0; idx < DIM (tv[tvi].data); idx++)
+ {
+ err = _gcry_cipher_encrypt (hdenc, scratch, sizeof scratch,
+ tv[tvi].data[idx].input,
+ sizeof tv[tvi].data[idx].input);
+ if (err)
+ Fail ("encrypt command");
+ if (memcmp (scratch, tv[tvi].data[idx].output, sizeof scratch))
+ Fail ("encrypt mismatch");
+ err = _gcry_cipher_decrypt (hddec, scratch, sizeof scratch,
+ tv[tvi].data[idx].output,
+ sizeof tv[tvi].data[idx].output);
+ if (err)
+ Fail ("decrypt command");
+ if (memcmp (scratch, tv[tvi].data[idx].input, sizeof scratch))
+ Fail ("decrypt mismatch");
+ }
+
+#undef Fail
+ _gcry_cipher_close (hdenc);
+ _gcry_cipher_close (hddec);
+ return NULL;
+}
+
+
+/* Complete selftest for AES-128 with all modes and driver code. */
+static gpg_err_code_t
+selftest_fips_128 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ what = "low-level";
+ errtxt = selftest_basic_128 ();
+ if (errtxt)
+ goto failed;
+
+ if (extended)
+ {
+ what = "cfb";
+ errtxt = selftest_fips_128_38a (GCRY_CIPHER_MODE_CFB);
+ if (errtxt)
+ goto failed;
+
+ what = "ofb";
+ errtxt = selftest_fips_128_38a (GCRY_CIPHER_MODE_OFB);
+ if (errtxt)
+ goto failed;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("cipher", GCRY_CIPHER_AES128, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+/* Complete selftest for AES-192. */
+static gpg_err_code_t
+selftest_fips_192 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ (void)extended; /* No extended tests available. */
+
+ what = "low-level";
+ errtxt = selftest_basic_192 ();
+ if (errtxt)
+ goto failed;
+
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("cipher", GCRY_CIPHER_AES192, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+/* Complete selftest for AES-256. */
+static gpg_err_code_t
+selftest_fips_256 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ (void)extended; /* No extended tests available. */
+
+ what = "low-level";
+ errtxt = selftest_basic_256 ();
+ if (errtxt)
+ goto failed;
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("cipher", GCRY_CIPHER_AES256, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ switch (algo)
+ {
+ case GCRY_CIPHER_AES128:
+ ec = selftest_fips_128 (extended, report);
+ break;
+ case GCRY_CIPHER_AES192:
+ ec = selftest_fips_192 (extended, report);
+ break;
+ case GCRY_CIPHER_AES256:
+ ec = selftest_fips_256 (extended, report);
+ break;
+ default:
+ ec = GPG_ERR_CIPHER_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+
+static const char *rijndael_names[] =
+ {
+ "RIJNDAEL",
+ "AES128",
+ "AES-128",
+ NULL
+ };
+
+static gcry_cipher_oid_spec_t rijndael_oids[] =
+ {
+ { "2.16.840.1.101.3.4.1.1", GCRY_CIPHER_MODE_ECB },
+ { "2.16.840.1.101.3.4.1.2", GCRY_CIPHER_MODE_CBC },
+ { "2.16.840.1.101.3.4.1.3", GCRY_CIPHER_MODE_OFB },
+ { "2.16.840.1.101.3.4.1.4", GCRY_CIPHER_MODE_CFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_aes =
+ {
+ "AES", rijndael_names, rijndael_oids, 16, 128, sizeof (RIJNDAEL_context),
+ rijndael_setkey, rijndael_encrypt, rijndael_decrypt
+ };
+cipher_extra_spec_t _gcry_cipher_extraspec_aes =
+ {
+ run_selftests
+ };
+
+static const char *rijndael192_names[] =
+ {
+ "RIJNDAEL192",
+ "AES-192",
+ NULL
+ };
+
+static gcry_cipher_oid_spec_t rijndael192_oids[] =
+ {
+ { "2.16.840.1.101.3.4.1.21", GCRY_CIPHER_MODE_ECB },
+ { "2.16.840.1.101.3.4.1.22", GCRY_CIPHER_MODE_CBC },
+ { "2.16.840.1.101.3.4.1.23", GCRY_CIPHER_MODE_OFB },
+ { "2.16.840.1.101.3.4.1.24", GCRY_CIPHER_MODE_CFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_aes192 =
+ {
+ "AES192", rijndael192_names, rijndael192_oids, 16, 192, sizeof (RIJNDAEL_context),
+ rijndael_setkey, rijndael_encrypt, rijndael_decrypt
+ };
+cipher_extra_spec_t _gcry_cipher_extraspec_aes192 =
+ {
+ run_selftests
+ };
+
+static const char *rijndael256_names[] =
+ {
+ "RIJNDAEL256",
+ "AES-256",
+ NULL
+ };
+
+static gcry_cipher_oid_spec_t rijndael256_oids[] =
+ {
+ { "2.16.840.1.101.3.4.1.41", GCRY_CIPHER_MODE_ECB },
+ { "2.16.840.1.101.3.4.1.42", GCRY_CIPHER_MODE_CBC },
+ { "2.16.840.1.101.3.4.1.43", GCRY_CIPHER_MODE_OFB },
+ { "2.16.840.1.101.3.4.1.44", GCRY_CIPHER_MODE_CFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_aes256 =
+ {
+ "AES256", rijndael256_names, rijndael256_oids, 16, 256,
+ sizeof (RIJNDAEL_context),
+ rijndael_setkey, rijndael_encrypt, rijndael_decrypt
+ };
+
+cipher_extra_spec_t _gcry_cipher_extraspec_aes256 =
+ {
+ run_selftests
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/rmd.h b/grub-core/lib/libgcrypt/cipher/rmd.h
new file mode 100644
index 0000000..f4ce9c6
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/rmd.h
@@ -0,0 +1,37 @@
+/* rmd.h - RIPE-MD hash functions
+ * Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+#ifndef G10_RMD_H
+#define G10_RMD_H
+
+
+/* We need this here because random.c must have direct access. */
+typedef struct
+{
+ u32 h0,h1,h2,h3,h4;
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} RMD160_CONTEXT;
+
+void _gcry_rmd160_init ( void *context );
+void _gcry_rmd160_mixblock ( RMD160_CONTEXT *hd, void *blockof64byte );
+
+#endif /*G10_RMD_H*/
+
diff --git a/grub-core/lib/libgcrypt/cipher/rmd160.c b/grub-core/lib/libgcrypt/cipher/rmd160.c
new file mode 100644
index 0000000..7805bf5
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/rmd160.c
@@ -0,0 +1,572 @@
+/* rmd160.c - RIPE-MD160
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "memory.h"
+#include "rmd.h"
+#include "cipher.h" /* Only used for the rmd160_hash_buffer() prototype. */
+
+#include "bithelp.h"
+
+/*********************************
+ * RIPEMD-160 is not patented, see (as of 25.10.97)
+ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
+ * Note that the code uses Little Endian byteorder, which is good for
+ * 386 etc, but we must add some conversion when used on a big endian box.
+ *
+ *
+ * Pseudo-code for RIPEMD-160
+ *
+ * RIPEMD-160 is an iterative hash function that operates on 32-bit words.
+ * The round function takes as input a 5-word chaining variable and a 16-word
+ * message block and maps this to a new chaining variable. All operations are
+ * defined on 32-bit words. Padding is identical to that of MD4.
+ *
+ *
+ * RIPEMD-160: definitions
+ *
+ *
+ * nonlinear functions at bit level: exor, mux, -, mux, -
+ *
+ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15)
+ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31)
+ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47)
+ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63)
+ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79)
+ *
+ *
+ * added constants (hexadecimal)
+ *
+ * K(j) = 0x00000000 (0 <= j <= 15)
+ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2))
+ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3))
+ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5))
+ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7))
+ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2))
+ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3))
+ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5))
+ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7))
+ * K'(j) = 0x00000000 (64 <= j <= 79)
+ *
+ *
+ * selection of message word
+ *
+ * r(j) = j (0 <= j <= 15)
+ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8
+ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12
+ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2
+ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
+ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12
+ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2
+ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13
+ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14
+ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
+ *
+ *
+ * amount for rotate left (rol)
+ *
+ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8
+ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12
+ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5
+ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12
+ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
+ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6
+ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11
+ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5
+ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8
+ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
+ *
+ *
+ * initial value (hexadecimal)
+ *
+ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476;
+ * h4 = 0xC3D2E1F0;
+ *
+ *
+ * RIPEMD-160: pseudo-code
+ *
+ * It is assumed that the message after padding consists of t 16-word blocks
+ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15.
+ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left
+ * shift (rotate) over s positions.
+ *
+ *
+ * for i := 0 to t-1 {
+ * A := h0; B := h1; C := h2; D = h3; E = h4;
+ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4;
+ * for j := 0 to 79 {
+ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E;
+ * A := E; E := D; D := rol_10(C); C := B; B := T;
+ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)]
+ [+] K'(j)) [+] E';
+ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T;
+ * }
+ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A';
+ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T;
+ * }
+ */
+
+/* Some examples:
+ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31
+ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
+ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc
+ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36
+ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc
+ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b
+ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189
+ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb
+ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528
+ */
+
+
+void
+_gcry_rmd160_init (void *context)
+{
+ RMD160_CONTEXT *hd = context;
+
+ hd->h0 = 0x67452301;
+ hd->h1 = 0xEFCDAB89;
+ hd->h2 = 0x98BADCFE;
+ hd->h3 = 0x10325476;
+ hd->h4 = 0xC3D2E1F0;
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+
+/****************
+ * Transform the message X which consists of 16 32-bit-words
+ */
+static void
+transform ( RMD160_CONTEXT *hd, const unsigned char *data )
+{
+ register u32 a,b,c,d,e;
+ u32 aa,bb,cc,dd,ee,t;
+#ifdef WORDS_BIGENDIAN
+ u32 x[16];
+ {
+ int i;
+ byte *p2, *p1;
+ for (i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+#else
+ /* This version is better because it is always aligned;
+ * The performance penalty on a 586-100 is about 6% which
+ * is acceptable - because the data is more local it might
+ * also be possible that this is faster on some machines.
+ * This function (when compiled with -02 on gcc 2.7.2)
+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */
+ u32 x[16];
+ memcpy( x, data, 64 );
+#endif
+
+
+#define K0 0x00000000
+#define K1 0x5A827999
+#define K2 0x6ED9EBA1
+#define K3 0x8F1BBCDC
+#define K4 0xA953FD4E
+#define KK0 0x50A28BE6
+#define KK1 0x5C4DD124
+#define KK2 0x6D703EF3
+#define KK3 0x7A6D76E9
+#define KK4 0x00000000
+#define F0(x,y,z) ( (x) ^ (y) ^ (z) )
+#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) )
+#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) )
+#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) )
+#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) )
+#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \
+ a = rol(t,s) + e; \
+ c = rol(c,10); \
+ } while(0)
+
+ /* left lane */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ R( a, b, c, d, e, F0, K0, 0, 11 );
+ R( e, a, b, c, d, F0, K0, 1, 14 );
+ R( d, e, a, b, c, F0, K0, 2, 15 );
+ R( c, d, e, a, b, F0, K0, 3, 12 );
+ R( b, c, d, e, a, F0, K0, 4, 5 );
+ R( a, b, c, d, e, F0, K0, 5, 8 );
+ R( e, a, b, c, d, F0, K0, 6, 7 );
+ R( d, e, a, b, c, F0, K0, 7, 9 );
+ R( c, d, e, a, b, F0, K0, 8, 11 );
+ R( b, c, d, e, a, F0, K0, 9, 13 );
+ R( a, b, c, d, e, F0, K0, 10, 14 );
+ R( e, a, b, c, d, F0, K0, 11, 15 );
+ R( d, e, a, b, c, F0, K0, 12, 6 );
+ R( c, d, e, a, b, F0, K0, 13, 7 );
+ R( b, c, d, e, a, F0, K0, 14, 9 );
+ R( a, b, c, d, e, F0, K0, 15, 8 );
+ R( e, a, b, c, d, F1, K1, 7, 7 );
+ R( d, e, a, b, c, F1, K1, 4, 6 );
+ R( c, d, e, a, b, F1, K1, 13, 8 );
+ R( b, c, d, e, a, F1, K1, 1, 13 );
+ R( a, b, c, d, e, F1, K1, 10, 11 );
+ R( e, a, b, c, d, F1, K1, 6, 9 );
+ R( d, e, a, b, c, F1, K1, 15, 7 );
+ R( c, d, e, a, b, F1, K1, 3, 15 );
+ R( b, c, d, e, a, F1, K1, 12, 7 );
+ R( a, b, c, d, e, F1, K1, 0, 12 );
+ R( e, a, b, c, d, F1, K1, 9, 15 );
+ R( d, e, a, b, c, F1, K1, 5, 9 );
+ R( c, d, e, a, b, F1, K1, 2, 11 );
+ R( b, c, d, e, a, F1, K1, 14, 7 );
+ R( a, b, c, d, e, F1, K1, 11, 13 );
+ R( e, a, b, c, d, F1, K1, 8, 12 );
+ R( d, e, a, b, c, F2, K2, 3, 11 );
+ R( c, d, e, a, b, F2, K2, 10, 13 );
+ R( b, c, d, e, a, F2, K2, 14, 6 );
+ R( a, b, c, d, e, F2, K2, 4, 7 );
+ R( e, a, b, c, d, F2, K2, 9, 14 );
+ R( d, e, a, b, c, F2, K2, 15, 9 );
+ R( c, d, e, a, b, F2, K2, 8, 13 );
+ R( b, c, d, e, a, F2, K2, 1, 15 );
+ R( a, b, c, d, e, F2, K2, 2, 14 );
+ R( e, a, b, c, d, F2, K2, 7, 8 );
+ R( d, e, a, b, c, F2, K2, 0, 13 );
+ R( c, d, e, a, b, F2, K2, 6, 6 );
+ R( b, c, d, e, a, F2, K2, 13, 5 );
+ R( a, b, c, d, e, F2, K2, 11, 12 );
+ R( e, a, b, c, d, F2, K2, 5, 7 );
+ R( d, e, a, b, c, F2, K2, 12, 5 );
+ R( c, d, e, a, b, F3, K3, 1, 11 );
+ R( b, c, d, e, a, F3, K3, 9, 12 );
+ R( a, b, c, d, e, F3, K3, 11, 14 );
+ R( e, a, b, c, d, F3, K3, 10, 15 );
+ R( d, e, a, b, c, F3, K3, 0, 14 );
+ R( c, d, e, a, b, F3, K3, 8, 15 );
+ R( b, c, d, e, a, F3, K3, 12, 9 );
+ R( a, b, c, d, e, F3, K3, 4, 8 );
+ R( e, a, b, c, d, F3, K3, 13, 9 );
+ R( d, e, a, b, c, F3, K3, 3, 14 );
+ R( c, d, e, a, b, F3, K3, 7, 5 );
+ R( b, c, d, e, a, F3, K3, 15, 6 );
+ R( a, b, c, d, e, F3, K3, 14, 8 );
+ R( e, a, b, c, d, F3, K3, 5, 6 );
+ R( d, e, a, b, c, F3, K3, 6, 5 );
+ R( c, d, e, a, b, F3, K3, 2, 12 );
+ R( b, c, d, e, a, F4, K4, 4, 9 );
+ R( a, b, c, d, e, F4, K4, 0, 15 );
+ R( e, a, b, c, d, F4, K4, 5, 5 );
+ R( d, e, a, b, c, F4, K4, 9, 11 );
+ R( c, d, e, a, b, F4, K4, 7, 6 );
+ R( b, c, d, e, a, F4, K4, 12, 8 );
+ R( a, b, c, d, e, F4, K4, 2, 13 );
+ R( e, a, b, c, d, F4, K4, 10, 12 );
+ R( d, e, a, b, c, F4, K4, 14, 5 );
+ R( c, d, e, a, b, F4, K4, 1, 12 );
+ R( b, c, d, e, a, F4, K4, 3, 13 );
+ R( a, b, c, d, e, F4, K4, 8, 14 );
+ R( e, a, b, c, d, F4, K4, 11, 11 );
+ R( d, e, a, b, c, F4, K4, 6, 8 );
+ R( c, d, e, a, b, F4, K4, 15, 5 );
+ R( b, c, d, e, a, F4, K4, 13, 6 );
+
+ aa = a; bb = b; cc = c; dd = d; ee = e;
+
+ /* right lane */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ R( a, b, c, d, e, F4, KK0, 5, 8);
+ R( e, a, b, c, d, F4, KK0, 14, 9);
+ R( d, e, a, b, c, F4, KK0, 7, 9);
+ R( c, d, e, a, b, F4, KK0, 0, 11);
+ R( b, c, d, e, a, F4, KK0, 9, 13);
+ R( a, b, c, d, e, F4, KK0, 2, 15);
+ R( e, a, b, c, d, F4, KK0, 11, 15);
+ R( d, e, a, b, c, F4, KK0, 4, 5);
+ R( c, d, e, a, b, F4, KK0, 13, 7);
+ R( b, c, d, e, a, F4, KK0, 6, 7);
+ R( a, b, c, d, e, F4, KK0, 15, 8);
+ R( e, a, b, c, d, F4, KK0, 8, 11);
+ R( d, e, a, b, c, F4, KK0, 1, 14);
+ R( c, d, e, a, b, F4, KK0, 10, 14);
+ R( b, c, d, e, a, F4, KK0, 3, 12);
+ R( a, b, c, d, e, F4, KK0, 12, 6);
+ R( e, a, b, c, d, F3, KK1, 6, 9);
+ R( d, e, a, b, c, F3, KK1, 11, 13);
+ R( c, d, e, a, b, F3, KK1, 3, 15);
+ R( b, c, d, e, a, F3, KK1, 7, 7);
+ R( a, b, c, d, e, F3, KK1, 0, 12);
+ R( e, a, b, c, d, F3, KK1, 13, 8);
+ R( d, e, a, b, c, F3, KK1, 5, 9);
+ R( c, d, e, a, b, F3, KK1, 10, 11);
+ R( b, c, d, e, a, F3, KK1, 14, 7);
+ R( a, b, c, d, e, F3, KK1, 15, 7);
+ R( e, a, b, c, d, F3, KK1, 8, 12);
+ R( d, e, a, b, c, F3, KK1, 12, 7);
+ R( c, d, e, a, b, F3, KK1, 4, 6);
+ R( b, c, d, e, a, F3, KK1, 9, 15);
+ R( a, b, c, d, e, F3, KK1, 1, 13);
+ R( e, a, b, c, d, F3, KK1, 2, 11);
+ R( d, e, a, b, c, F2, KK2, 15, 9);
+ R( c, d, e, a, b, F2, KK2, 5, 7);
+ R( b, c, d, e, a, F2, KK2, 1, 15);
+ R( a, b, c, d, e, F2, KK2, 3, 11);
+ R( e, a, b, c, d, F2, KK2, 7, 8);
+ R( d, e, a, b, c, F2, KK2, 14, 6);
+ R( c, d, e, a, b, F2, KK2, 6, 6);
+ R( b, c, d, e, a, F2, KK2, 9, 14);
+ R( a, b, c, d, e, F2, KK2, 11, 12);
+ R( e, a, b, c, d, F2, KK2, 8, 13);
+ R( d, e, a, b, c, F2, KK2, 12, 5);
+ R( c, d, e, a, b, F2, KK2, 2, 14);
+ R( b, c, d, e, a, F2, KK2, 10, 13);
+ R( a, b, c, d, e, F2, KK2, 0, 13);
+ R( e, a, b, c, d, F2, KK2, 4, 7);
+ R( d, e, a, b, c, F2, KK2, 13, 5);
+ R( c, d, e, a, b, F1, KK3, 8, 15);
+ R( b, c, d, e, a, F1, KK3, 6, 5);
+ R( a, b, c, d, e, F1, KK3, 4, 8);
+ R( e, a, b, c, d, F1, KK3, 1, 11);
+ R( d, e, a, b, c, F1, KK3, 3, 14);
+ R( c, d, e, a, b, F1, KK3, 11, 14);
+ R( b, c, d, e, a, F1, KK3, 15, 6);
+ R( a, b, c, d, e, F1, KK3, 0, 14);
+ R( e, a, b, c, d, F1, KK3, 5, 6);
+ R( d, e, a, b, c, F1, KK3, 12, 9);
+ R( c, d, e, a, b, F1, KK3, 2, 12);
+ R( b, c, d, e, a, F1, KK3, 13, 9);
+ R( a, b, c, d, e, F1, KK3, 9, 12);
+ R( e, a, b, c, d, F1, KK3, 7, 5);
+ R( d, e, a, b, c, F1, KK3, 10, 15);
+ R( c, d, e, a, b, F1, KK3, 14, 8);
+ R( b, c, d, e, a, F0, KK4, 12, 8);
+ R( a, b, c, d, e, F0, KK4, 15, 5);
+ R( e, a, b, c, d, F0, KK4, 10, 12);
+ R( d, e, a, b, c, F0, KK4, 4, 9);
+ R( c, d, e, a, b, F0, KK4, 1, 12);
+ R( b, c, d, e, a, F0, KK4, 5, 5);
+ R( a, b, c, d, e, F0, KK4, 8, 14);
+ R( e, a, b, c, d, F0, KK4, 7, 6);
+ R( d, e, a, b, c, F0, KK4, 6, 8);
+ R( c, d, e, a, b, F0, KK4, 2, 13);
+ R( b, c, d, e, a, F0, KK4, 13, 6);
+ R( a, b, c, d, e, F0, KK4, 14, 5);
+ R( e, a, b, c, d, F0, KK4, 0, 15);
+ R( d, e, a, b, c, F0, KK4, 3, 13);
+ R( c, d, e, a, b, F0, KK4, 9, 11);
+ R( b, c, d, e, a, F0, KK4, 11, 11);
+
+
+ t = hd->h1 + d + cc;
+ hd->h1 = hd->h2 + e + dd;
+ hd->h2 = hd->h3 + a + ee;
+ hd->h3 = hd->h4 + b + aa;
+ hd->h4 = hd->h0 + c + bb;
+ hd->h0 = t;
+}
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+rmd160_write ( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ RMD160_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (108+5*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ rmd160_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ _gcry_burn_stack (108+5*sizeof(void*));
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+/****************
+ * Apply the rmd160 transform function on the buffer which must have
+ * a length 64 bytes. Do not use this function together with the
+ * other functions, use rmd160_init to initialize internal variables.
+ * Returns: 16 bytes in buffer with the mixed contentes of buffer.
+ */
+void
+_gcry_rmd160_mixblock ( RMD160_CONTEXT *hd, void *blockof64byte )
+{
+ char *p = blockof64byte;
+
+ transform ( hd, blockof64byte );
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+#undef X
+}
+
+
+/* The routine terminates the computation
+ */
+
+static void
+rmd160_final( void *context )
+{
+ RMD160_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ rmd160_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ rmd160_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (108+5*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \
+ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
+#else /* little endian */
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#endif
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+#undef X
+}
+
+static byte *
+rmd160_read( void *context )
+{
+ RMD160_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+
+
+/****************
+ * Shortcut functions which puts the hash value of the supplied buffer
+ * into outbuf which must have a size of 20 bytes.
+ */
+void
+_gcry_rmd160_hash_buffer (void *outbuf, const void *buffer, size_t length )
+{
+ RMD160_CONTEXT hd;
+
+ _gcry_rmd160_init ( &hd );
+ rmd160_write ( &hd, buffer, length );
+ rmd160_final ( &hd );
+ memcpy ( outbuf, hd.buf, 20 );
+}
+
+static byte asn[15] = /* Object ID is 1.3.36.3.2.1 */
+ { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x24, 0x03,
+ 0x02, 0x01, 0x05, 0x00, 0x04, 0x14 };
+
+static gcry_md_oid_spec_t oid_spec_rmd160[] =
+ {
+ /* rsaSignatureWithripemd160 */
+ { "1.3.36.3.3.1.2" },
+ /* TeleTrust hash algorithm. */
+ { "1.3.36.3.2.1" },
+ { NULL }
+ };
+
+gcry_md_spec_t _gcry_digest_spec_rmd160 =
+ {
+ "RIPEMD160", asn, DIM (asn), oid_spec_rmd160, 20,
+ _gcry_rmd160_init, rmd160_write, rmd160_final, rmd160_read,
+ sizeof (RMD160_CONTEXT)
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/rsa.c b/grub-core/lib/libgcrypt/cipher/rsa.c
new file mode 100644
index 0000000..cf278c2
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/rsa.c
@@ -0,0 +1,1379 @@
+/* rsa.c - RSA implementation
+ * Copyright (C) 1997, 1998, 1999 by Werner Koch (dd9jn)
+ * Copyright (C) 2000, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* This code uses an algorithm protected by U.S. Patent #4,405,829
+ which expired on September 20, 2000. The patent holder placed that
+ patent into the public domain on Sep 6th, 2000.
+*/
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "g10lib.h"
+#include "mpi.h"
+#include "cipher.h"
+
+
+typedef struct
+{
+ gcry_mpi_t n; /* modulus */
+ gcry_mpi_t e; /* exponent */
+} RSA_public_key;
+
+
+typedef struct
+{
+ gcry_mpi_t n; /* public modulus */
+ gcry_mpi_t e; /* public exponent */
+ gcry_mpi_t d; /* exponent */
+ gcry_mpi_t p; /* prime p. */
+ gcry_mpi_t q; /* prime q. */
+ gcry_mpi_t u; /* inverse of p mod q. */
+} RSA_secret_key;
+
+
+/* A sample 1024 bit RSA key used for the selftests. */
+static const char sample_secret_key[] =
+"(private-key"
+" (rsa"
+" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa"
+" 2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291"
+" ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7"
+" 891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)"
+" (e #010001#)"
+" (d #046129f2489d71579be0a75fe029bd6cdb574ebf57ea8a5b0fda942cab943b11"
+" 7d7bb95e5d28875e0f9fc5fcc06a72f6d502464dabded78ef6b716177b83d5bd"
+" c543dc5d3fed932e59f5897e92e6f58a0f33424106a3b6fa2cbf877510e4ac21"
+" c3ee47851e97d12996222ac3566d4ccb0b83d164074abf7de655fc2446da1781#)"
+" (p #00e861b700e17e8afe6837e7512e35b6ca11d0ae47d8b85161c67baf64377213"
+" fe52d772f2035b3ca830af41d8a4120e1c1c70d12cc22f00d28d31dd48a8d424f1#)"
+" (q #00f7a7ca5367c661f8e62df34f0d05c10c88e5492348dd7bddc942c9a8f369f9"
+" 35a07785d2db805215ed786e4285df1658eed3ce84f469b81b50d358407b4ad361#)"
+" (u #304559a9ead56d2309d203811a641bb1a09626bc8eb36fffa23c968ec5bd891e"
+" ebbafc73ae666e01ba7c8990bae06cc2bbe10b75e69fcacb353a6473079d8e9b#)))";
+/* A sample 1024 bit RSA key used for the selftests (public only). */
+static const char sample_public_key[] =
+"(public-key"
+" (rsa"
+" (n #00e0ce96f90b6c9e02f3922beada93fe50a875eac6bcc18bb9a9cf2e84965caa"
+" 2d1ff95a7f542465c6c0c19d276e4526ce048868a7a914fd343cc3a87dd74291"
+" ffc565506d5bbb25cbac6a0e2dd1f8bcaab0d4a29c2f37c950f363484bf269f7"
+" 891440464baf79827e03a36e70b814938eebdc63e964247be75dc58b014b7ea251#)"
+" (e #010001#)))";
+
+
+
+
+static int test_keys (RSA_secret_key *sk, unsigned nbits);
+static int check_secret_key (RSA_secret_key *sk);
+static void public (gcry_mpi_t output, gcry_mpi_t input, RSA_public_key *skey);
+static void secret (gcry_mpi_t output, gcry_mpi_t input, RSA_secret_key *skey);
+
+
+/* Check that a freshly generated key actually works. Returns 0 on success. */
+static int
+test_keys (RSA_secret_key *sk, unsigned int nbits)
+{
+ int result = -1; /* Default to failure. */
+ RSA_public_key pk;
+ gcry_mpi_t plaintext = gcry_mpi_new (nbits);
+ gcry_mpi_t ciphertext = gcry_mpi_new (nbits);
+ gcry_mpi_t decr_plaintext = gcry_mpi_new (nbits);
+ gcry_mpi_t signature = gcry_mpi_new (nbits);
+
+ /* Put the relevant parameters into a public key structure. */
+ pk.n = sk->n;
+ pk.e = sk->e;
+
+ /* Create a random plaintext. */
+ gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
+
+ /* Encrypt using the public key. */
+ public (ciphertext, plaintext, &pk);
+
+ /* Check that the cipher text does not match the plaintext. */
+ if (!gcry_mpi_cmp (ciphertext, plaintext))
+ goto leave; /* Ciphertext is identical to the plaintext. */
+
+ /* Decrypt using the secret key. */
+ secret (decr_plaintext, ciphertext, sk);
+
+ /* Check that the decrypted plaintext matches the original plaintext. */
+ if (gcry_mpi_cmp (decr_plaintext, plaintext))
+ goto leave; /* Plaintext does not match. */
+
+ /* Create another random plaintext as data for signature checking. */
+ gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
+
+ /* Use the RSA secret function to create a signature of the plaintext. */
+ secret (signature, plaintext, sk);
+
+ /* Use the RSA public function to verify this signature. */
+ public (decr_plaintext, signature, &pk);
+ if (gcry_mpi_cmp (decr_plaintext, plaintext))
+ goto leave; /* Signature does not match. */
+
+ /* Modify the signature and check that the signing fails. */
+ gcry_mpi_add_ui (signature, signature, 1);
+ public (decr_plaintext, signature, &pk);
+ if (!gcry_mpi_cmp (decr_plaintext, plaintext))
+ goto leave; /* Signature matches but should not. */
+
+ result = 0; /* All tests succeeded. */
+
+ leave:
+ gcry_mpi_release (signature);
+ gcry_mpi_release (decr_plaintext);
+ gcry_mpi_release (ciphertext);
+ gcry_mpi_release (plaintext);
+ return result;
+}
+
+
+/* Callback used by the prime generation to test whether the exponent
+ is suitable. Returns 0 if the test has been passed. */
+static int
+check_exponent (void *arg, gcry_mpi_t a)
+{
+ gcry_mpi_t e = arg;
+ gcry_mpi_t tmp;
+ int result;
+
+ mpi_sub_ui (a, a, 1);
+ tmp = _gcry_mpi_alloc_like (a);
+ result = !gcry_mpi_gcd(tmp, e, a); /* GCD is not 1. */
+ gcry_mpi_release (tmp);
+ mpi_add_ui (a, a, 1);
+ return result;
+}
+
+/****************
+ * Generate a key pair with a key of size NBITS.
+ * USE_E = 0 let Libcgrypt decide what exponent to use.
+ * = 1 request the use of a "secure" exponent; this is required by some
+ * specification to be 65537.
+ * > 2 Use this public exponent. If the given exponent
+ * is not odd one is internally added to it.
+ * TRANSIENT_KEY: If true, generate the primes using the standard RNG.
+ * Returns: 2 structures filled with all needed values
+ */
+static gpg_err_code_t
+generate_std (RSA_secret_key *sk, unsigned int nbits, unsigned long use_e,
+ int transient_key)
+{
+ gcry_mpi_t p, q; /* the two primes */
+ gcry_mpi_t d; /* the private key */
+ gcry_mpi_t u;
+ gcry_mpi_t t1, t2;
+ gcry_mpi_t n; /* the public key */
+ gcry_mpi_t e; /* the exponent */
+ gcry_mpi_t phi; /* helper: (p-1)(q-1) */
+ gcry_mpi_t g;
+ gcry_mpi_t f;
+ gcry_random_level_t random_level;
+
+ if (fips_mode ())
+ {
+ if (nbits < 1024)
+ return GPG_ERR_INV_VALUE;
+ if (transient_key)
+ return GPG_ERR_INV_VALUE;
+ }
+
+ /* The random quality depends on the transient_key flag. */
+ random_level = transient_key ? GCRY_STRONG_RANDOM : GCRY_VERY_STRONG_RANDOM;
+
+ /* Make sure that nbits is even so that we generate p, q of equal size. */
+ if ( (nbits&1) )
+ nbits++;
+
+ if (use_e == 1) /* Alias for a secure value */
+ use_e = 65537; /* as demanded by Sphinx. */
+
+ /* Public exponent:
+ In general we use 41 as this is quite fast and more secure than the
+ commonly used 17. Benchmarking the RSA verify function
+ with a 1024 bit key yields (2001-11-08):
+ e=17 0.54 ms
+ e=41 0.75 ms
+ e=257 0.95 ms
+ e=65537 1.80 ms
+ */
+ e = mpi_alloc( (32+BITS_PER_MPI_LIMB-1)/BITS_PER_MPI_LIMB );
+ if (!use_e)
+ mpi_set_ui (e, 41); /* This is a reasonable secure and fast value */
+ else
+ {
+ use_e |= 1; /* make sure this is odd */
+ mpi_set_ui (e, use_e);
+ }
+
+ n = gcry_mpi_new (nbits);
+
+ p = q = NULL;
+ do
+ {
+ /* select two (very secret) primes */
+ if (p)
+ gcry_mpi_release (p);
+ if (q)
+ gcry_mpi_release (q);
+ if (use_e)
+ { /* Do an extra test to ensure that the given exponent is
+ suitable. */
+ p = _gcry_generate_secret_prime (nbits/2, random_level,
+ check_exponent, e);
+ q = _gcry_generate_secret_prime (nbits/2, random_level,
+ check_exponent, e);
+ }
+ else
+ { /* We check the exponent later. */
+ p = _gcry_generate_secret_prime (nbits/2, random_level, NULL, NULL);
+ q = _gcry_generate_secret_prime (nbits/2, random_level, NULL, NULL);
+ }
+ if (mpi_cmp (p, q) > 0 ) /* p shall be smaller than q (for calc of u)*/
+ mpi_swap(p,q);
+ /* calculate the modulus */
+ mpi_mul( n, p, q );
+ }
+ while ( mpi_get_nbits(n) != nbits );
+
+ /* calculate Euler totient: phi = (p-1)(q-1) */
+ t1 = mpi_alloc_secure( mpi_get_nlimbs(p) );
+ t2 = mpi_alloc_secure( mpi_get_nlimbs(p) );
+ phi = gcry_mpi_snew ( nbits );
+ g = gcry_mpi_snew ( nbits );
+ f = gcry_mpi_snew ( nbits );
+ mpi_sub_ui( t1, p, 1 );
+ mpi_sub_ui( t2, q, 1 );
+ mpi_mul( phi, t1, t2 );
+ gcry_mpi_gcd(g, t1, t2);
+ mpi_fdiv_q(f, phi, g);
+
+ while (!gcry_mpi_gcd(t1, e, phi)) /* (while gcd is not 1) */
+ {
+ if (use_e)
+ BUG (); /* The prime generator already made sure that we
+ never can get to here. */
+ mpi_add_ui (e, e, 2);
+ }
+
+ /* calculate the secret key d = e^1 mod phi */
+ d = gcry_mpi_snew ( nbits );
+ mpi_invm(d, e, f );
+ /* calculate the inverse of p and q (used for chinese remainder theorem)*/
+ u = gcry_mpi_snew ( nbits );
+ mpi_invm(u, p, q );
+
+ if( DBG_CIPHER )
+ {
+ log_mpidump(" p= ", p );
+ log_mpidump(" q= ", q );
+ log_mpidump("phi= ", phi );
+ log_mpidump(" g= ", g );
+ log_mpidump(" f= ", f );
+ log_mpidump(" n= ", n );
+ log_mpidump(" e= ", e );
+ log_mpidump(" d= ", d );
+ log_mpidump(" u= ", u );
+ }
+
+ gcry_mpi_release (t1);
+ gcry_mpi_release (t2);
+ gcry_mpi_release (phi);
+ gcry_mpi_release (f);
+ gcry_mpi_release (g);
+
+ sk->n = n;
+ sk->e = e;
+ sk->p = p;
+ sk->q = q;
+ sk->d = d;
+ sk->u = u;
+
+ /* Now we can test our keys. */
+ if (test_keys (sk, nbits - 64))
+ {
+ gcry_mpi_release (sk->n); sk->n = NULL;
+ gcry_mpi_release (sk->e); sk->e = NULL;
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->d); sk->d = NULL;
+ gcry_mpi_release (sk->u); sk->u = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ return GPG_ERR_SELFTEST_FAILED;
+ }
+
+ return 0;
+}
+
+
+/* Helper for generate_x931. */
+static gcry_mpi_t
+gen_x931_parm_xp (unsigned int nbits)
+{
+ gcry_mpi_t xp;
+
+ xp = gcry_mpi_snew (nbits);
+ gcry_mpi_randomize (xp, nbits, GCRY_VERY_STRONG_RANDOM);
+
+ /* The requirement for Xp is:
+
+ sqrt{2}*2^{nbits-1} <= xp <= 2^{nbits} - 1
+
+ We set the two high order bits to 1 to satisfy the lower bound.
+ By using mpi_set_highbit we make sure that the upper bound is
+ satisfied as well. */
+ mpi_set_highbit (xp, nbits-1);
+ mpi_set_bit (xp, nbits-2);
+ gcry_assert ( mpi_get_nbits (xp) == nbits );
+
+ return xp;
+}
+
+
+/* Helper for generate_x931. */
+static gcry_mpi_t
+gen_x931_parm_xi (void)
+{
+ gcry_mpi_t xi;
+
+ xi = gcry_mpi_snew (101);
+ gcry_mpi_randomize (xi, 101, GCRY_VERY_STRONG_RANDOM);
+ mpi_set_highbit (xi, 100);
+ gcry_assert ( mpi_get_nbits (xi) == 101 );
+
+ return xi;
+}
+
+
+
+/* Variant of the standard key generation code using the algorithm
+ from X9.31. Using this algorithm has the advantage that the
+ generation can be made deterministic which is required for CAVS
+ testing. */
+static gpg_err_code_t
+generate_x931 (RSA_secret_key *sk, unsigned int nbits, unsigned long e_value,
+ gcry_sexp_t deriveparms, int *swapped)
+{
+ gcry_mpi_t p, q; /* The two primes. */
+ gcry_mpi_t e; /* The public exponent. */
+ gcry_mpi_t n; /* The public key. */
+ gcry_mpi_t d; /* The private key */
+ gcry_mpi_t u; /* The inverse of p and q. */
+ gcry_mpi_t pm1; /* p - 1 */
+ gcry_mpi_t qm1; /* q - 1 */
+ gcry_mpi_t phi; /* Euler totient. */
+ gcry_mpi_t f, g; /* Helper. */
+
+ *swapped = 0;
+
+ if (e_value == 1) /* Alias for a secure value. */
+ e_value = 65537;
+
+ /* Point 1 of section 4.1: k = 1024 + 256s with S >= 0 */
+ if (nbits < 1024 || (nbits % 256))
+ return GPG_ERR_INV_VALUE;
+
+ /* Point 2: 2 <= bitlength(e) < 2^{k-2}
+ Note that we do not need to check the upper bound because we use
+ an unsigned long for E and thus there is no way for E to reach
+ that limit. */
+ if (e_value < 3)
+ return GPG_ERR_INV_VALUE;
+
+ /* Our implementaion requires E to be odd. */
+ if (!(e_value & 1))
+ return GPG_ERR_INV_VALUE;
+
+ /* Point 3: e > 0 or e 0 if it is to be randomly generated.
+ We support only a fixed E and thus there is no need for an extra test. */
+
+
+ /* Compute or extract the derive parameters. */
+ {
+ gcry_mpi_t xp1 = NULL;
+ gcry_mpi_t xp2 = NULL;
+ gcry_mpi_t xp = NULL;
+ gcry_mpi_t xq1 = NULL;
+ gcry_mpi_t xq2 = NULL;
+ gcry_mpi_t xq = NULL;
+ gcry_mpi_t tmpval;
+
+ if (!deriveparms)
+ {
+ /* Not given: Generate them. */
+ xp = gen_x931_parm_xp (nbits/2);
+ /* Make sure that |xp - xq| > 2^{nbits - 100} holds. */
+ tmpval = gcry_mpi_snew (nbits/2);
+ do
+ {
+ gcry_mpi_release (xq);
+ xq = gen_x931_parm_xp (nbits/2);
+ mpi_sub (tmpval, xp, xq);
+ }
+ while (mpi_get_nbits (tmpval) <= (nbits/2 - 100));
+ gcry_mpi_release (tmpval);
+
+ xp1 = gen_x931_parm_xi ();
+ xp2 = gen_x931_parm_xi ();
+ xq1 = gen_x931_parm_xi ();
+ xq2 = gen_x931_parm_xi ();
+
+ }
+ else
+ {
+ /* Parameters to derive the key are given. */
+ struct { const char *name; gcry_mpi_t *value; } tbl[] = {
+ { "Xp1", &xp1 },
+ { "Xp2", &xp2 },
+ { "Xp", &xp },
+ { "Xq1", &xq1 },
+ { "Xq2", &xq2 },
+ { "Xq", &xq },
+ { NULL, NULL }
+ };
+ int idx;
+ gcry_sexp_t oneparm;
+
+ for (idx=0; tbl[idx].name; idx++)
+ {
+ oneparm = gcry_sexp_find_token (deriveparms, tbl[idx].name, 0);
+ if (oneparm)
+ {
+ *tbl[idx].value = gcry_sexp_nth_mpi (oneparm, 1,
+ GCRYMPI_FMT_USG);
+ gcry_sexp_release (oneparm);
+ }
+ }
+ for (idx=0; tbl[idx].name; idx++)
+ if (!*tbl[idx].value)
+ break;
+ if (tbl[idx].name)
+ {
+ /* At least one parameter is missing. */
+ for (idx=0; tbl[idx].name; idx++)
+ gcry_mpi_release (*tbl[idx].value);
+ return GPG_ERR_MISSING_VALUE;
+ }
+ }
+
+ e = mpi_alloc_set_ui (e_value);
+
+ /* Find two prime numbers. */
+ p = _gcry_derive_x931_prime (xp, xp1, xp2, e, NULL, NULL);
+ q = _gcry_derive_x931_prime (xq, xq1, xq2, e, NULL, NULL);
+ gcry_mpi_release (xp); xp = NULL;
+ gcry_mpi_release (xp1); xp1 = NULL;
+ gcry_mpi_release (xp2); xp2 = NULL;
+ gcry_mpi_release (xq); xq = NULL;
+ gcry_mpi_release (xq1); xq1 = NULL;
+ gcry_mpi_release (xq2); xq2 = NULL;
+ if (!p || !q)
+ {
+ gcry_mpi_release (p);
+ gcry_mpi_release (q);
+ gcry_mpi_release (e);
+ return GPG_ERR_NO_PRIME;
+ }
+ }
+
+
+ /* Compute the public modulus. We make sure that p is smaller than
+ q to allow the use of the CRT. */
+ if (mpi_cmp (p, q) > 0 )
+ {
+ mpi_swap (p, q);
+ *swapped = 1;
+ }
+ n = gcry_mpi_new (nbits);
+ mpi_mul (n, p, q);
+
+ /* Compute the Euler totient: phi = (p-1)(q-1) */
+ pm1 = gcry_mpi_snew (nbits/2);
+ qm1 = gcry_mpi_snew (nbits/2);
+ phi = gcry_mpi_snew (nbits);
+ mpi_sub_ui (pm1, p, 1);
+ mpi_sub_ui (qm1, q, 1);
+ mpi_mul (phi, pm1, qm1);
+
+ g = gcry_mpi_snew (nbits);
+ gcry_assert (gcry_mpi_gcd (g, e, phi));
+
+ /* Compute: f = lcm(p-1,q-1) = phi / gcd(p-1,q-1) */
+ gcry_mpi_gcd (g, pm1, qm1);
+ f = pm1; pm1 = NULL;
+ gcry_mpi_release (qm1); qm1 = NULL;
+ mpi_fdiv_q (f, phi, g);
+ gcry_mpi_release (phi); phi = NULL;
+ d = g; g = NULL;
+ /* Compute the secret key: d = e^{-1} mod lcm(p-1,q-1) */
+ mpi_invm (d, e, f);
+
+ /* Compute the inverse of p and q. */
+ u = f; f = NULL;
+ mpi_invm (u, p, q );
+
+ if( DBG_CIPHER )
+ {
+ if (*swapped)
+ log_debug ("p and q are swapped\n");
+ log_mpidump(" p", p );
+ log_mpidump(" q", q );
+ log_mpidump(" n", n );
+ log_mpidump(" e", e );
+ log_mpidump(" d", d );
+ log_mpidump(" u", u );
+ }
+
+
+ sk->n = n;
+ sk->e = e;
+ sk->p = p;
+ sk->q = q;
+ sk->d = d;
+ sk->u = u;
+
+ /* Now we can test our keys. */
+ if (test_keys (sk, nbits - 64))
+ {
+ gcry_mpi_release (sk->n); sk->n = NULL;
+ gcry_mpi_release (sk->e); sk->e = NULL;
+ gcry_mpi_release (sk->p); sk->p = NULL;
+ gcry_mpi_release (sk->q); sk->q = NULL;
+ gcry_mpi_release (sk->d); sk->d = NULL;
+ gcry_mpi_release (sk->u); sk->u = NULL;
+ fips_signal_error ("self-test after key generation failed");
+ return GPG_ERR_SELFTEST_FAILED;
+ }
+
+ return 0;
+}
+
+
+/****************
+ * Test wether the secret key is valid.
+ * Returns: true if this is a valid key.
+ */
+static int
+check_secret_key( RSA_secret_key *sk )
+{
+ int rc;
+ gcry_mpi_t temp = mpi_alloc( mpi_get_nlimbs(sk->p)*2 );
+
+ mpi_mul(temp, sk->p, sk->q );
+ rc = mpi_cmp( temp, sk->n );
+ mpi_free(temp);
+ return !rc;
+}
+
+
+
+/****************
+ * Public key operation. Encrypt INPUT with PKEY and put result into OUTPUT.
+ *
+ * c = m^e mod n
+ *
+ * Where c is OUTPUT, m is INPUT and e,n are elements of PKEY.
+ */
+static void
+public(gcry_mpi_t output, gcry_mpi_t input, RSA_public_key *pkey )
+{
+ if( output == input ) /* powm doesn't like output and input the same */
+ {
+ gcry_mpi_t x = mpi_alloc( mpi_get_nlimbs(input)*2 );
+ mpi_powm( x, input, pkey->e, pkey->n );
+ mpi_set(output, x);
+ mpi_free(x);
+ }
+ else
+ mpi_powm( output, input, pkey->e, pkey->n );
+}
+
+#if 0
+static void
+stronger_key_check ( RSA_secret_key *skey )
+{
+ gcry_mpi_t t = mpi_alloc_secure ( 0 );
+ gcry_mpi_t t1 = mpi_alloc_secure ( 0 );
+ gcry_mpi_t t2 = mpi_alloc_secure ( 0 );
+ gcry_mpi_t phi = mpi_alloc_secure ( 0 );
+
+ /* check that n == p * q */
+ mpi_mul( t, skey->p, skey->q);
+ if (mpi_cmp( t, skey->n) )
+ log_info ( "RSA Oops: n != p * q\n" );
+
+ /* check that p is less than q */
+ if( mpi_cmp( skey->p, skey->q ) > 0 )
+ {
+ log_info ("RSA Oops: p >= q - fixed\n");
+ _gcry_mpi_swap ( skey->p, skey->q);
+ }
+
+ /* check that e divides neither p-1 nor q-1 */
+ mpi_sub_ui(t, skey->p, 1 );
+ mpi_fdiv_r(t, t, skey->e );
+ if ( !mpi_cmp_ui( t, 0) )
+ log_info ( "RSA Oops: e divides p-1\n" );
+ mpi_sub_ui(t, skey->q, 1 );
+ mpi_fdiv_r(t, t, skey->e );
+ if ( !mpi_cmp_ui( t, 0) )
+ log_info ( "RSA Oops: e divides q-1\n" );
+
+ /* check that d is correct */
+ mpi_sub_ui( t1, skey->p, 1 );
+ mpi_sub_ui( t2, skey->q, 1 );
+ mpi_mul( phi, t1, t2 );
+ gcry_mpi_gcd(t, t1, t2);
+ mpi_fdiv_q(t, phi, t);
+ mpi_invm(t, skey->e, t );
+ if ( mpi_cmp(t, skey->d ) )
+ {
+ log_info ( "RSA Oops: d is wrong - fixed\n");
+ mpi_set (skey->d, t);
+ _gcry_log_mpidump (" fixed d", skey->d);
+ }
+
+ /* check for correctness of u */
+ mpi_invm(t, skey->p, skey->q );
+ if ( mpi_cmp(t, skey->u ) )
+ {
+ log_info ( "RSA Oops: u is wrong - fixed\n");
+ mpi_set (skey->u, t);
+ _gcry_log_mpidump (" fixed u", skey->u);
+ }
+
+ log_info ( "RSA secret key check finished\n");
+
+ mpi_free (t);
+ mpi_free (t1);
+ mpi_free (t2);
+ mpi_free (phi);
+}
+#endif
+
+
+
+/****************
+ * Secret key operation. Encrypt INPUT with SKEY and put result into OUTPUT.
+ *
+ * m = c^d mod n
+ *
+ * Or faster:
+ *
+ * m1 = c ^ (d mod (p-1)) mod p
+ * m2 = c ^ (d mod (q-1)) mod q
+ * h = u * (m2 - m1) mod q
+ * m = m1 + h * p
+ *
+ * Where m is OUTPUT, c is INPUT and d,n,p,q,u are elements of SKEY.
+ */
+static void
+secret(gcry_mpi_t output, gcry_mpi_t input, RSA_secret_key *skey )
+{
+ if (!skey->p || !skey->q || !skey->u)
+ {
+ mpi_powm (output, input, skey->d, skey->n);
+ }
+ else
+ {
+ gcry_mpi_t m1 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+ gcry_mpi_t m2 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+ gcry_mpi_t h = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+
+ /* m1 = c ^ (d mod (p-1)) mod p */
+ mpi_sub_ui( h, skey->p, 1 );
+ mpi_fdiv_r( h, skey->d, h );
+ mpi_powm( m1, input, h, skey->p );
+ /* m2 = c ^ (d mod (q-1)) mod q */
+ mpi_sub_ui( h, skey->q, 1 );
+ mpi_fdiv_r( h, skey->d, h );
+ mpi_powm( m2, input, h, skey->q );
+ /* h = u * ( m2 - m1 ) mod q */
+ mpi_sub( h, m2, m1 );
+ if ( mpi_is_neg( h ) )
+ mpi_add ( h, h, skey->q );
+ mpi_mulm( h, skey->u, h, skey->q );
+ /* m = m2 + h * p */
+ mpi_mul ( h, h, skey->p );
+ mpi_add ( output, m1, h );
+
+ mpi_free ( h );
+ mpi_free ( m1 );
+ mpi_free ( m2 );
+ }
+}
+
+
+
+/* Perform RSA blinding. */
+static gcry_mpi_t
+rsa_blind (gcry_mpi_t x, gcry_mpi_t r, gcry_mpi_t e, gcry_mpi_t n)
+{
+ /* A helper. */
+ gcry_mpi_t a;
+
+ /* Result. */
+ gcry_mpi_t y;
+
+ a = gcry_mpi_snew (gcry_mpi_get_nbits (n));
+ y = gcry_mpi_snew (gcry_mpi_get_nbits (n));
+
+ /* Now we calculate: y = (x * r^e) mod n, where r is the random
+ number, e is the public exponent, x is the non-blinded data and n
+ is the RSA modulus. */
+ gcry_mpi_powm (a, r, e, n);
+ gcry_mpi_mulm (y, a, x, n);
+
+ gcry_mpi_release (a);
+
+ return y;
+}
+
+/* Undo RSA blinding. */
+static gcry_mpi_t
+rsa_unblind (gcry_mpi_t x, gcry_mpi_t ri, gcry_mpi_t n)
+{
+ gcry_mpi_t y;
+
+ y = gcry_mpi_snew (gcry_mpi_get_nbits (n));
+
+ /* Here we calculate: y = (x * r^-1) mod n, where x is the blinded
+ decrypted data, ri is the modular multiplicative inverse of r and
+ n is the RSA modulus. */
+
+ gcry_mpi_mulm (y, ri, x, n);
+
+ return y;
+}
+
+/*********************************************
+ ************** interface ******************
+ *********************************************/
+
+static gcry_err_code_t
+rsa_generate_ext (int algo, unsigned int nbits, unsigned long evalue,
+ const gcry_sexp_t genparms,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors,
+ gcry_sexp_t *r_extrainfo)
+{
+ RSA_secret_key sk;
+ gpg_err_code_t ec;
+ gcry_sexp_t deriveparms;
+ int transient_key = 0;
+ int use_x931 = 0;
+ gcry_sexp_t l1;
+
+ (void)algo;
+
+ *retfactors = NULL; /* We don't return them. */
+
+ deriveparms = (genparms?
+ gcry_sexp_find_token (genparms, "derive-parms", 0) : NULL);
+ if (!deriveparms)
+ {
+ /* Parse the optional "use-x931" flag. */
+ l1 = gcry_sexp_find_token (genparms, "use-x931", 0);
+ if (l1)
+ {
+ use_x931 = 1;
+ gcry_sexp_release (l1);
+ }
+ }
+
+ if (deriveparms || use_x931 || fips_mode ())
+ {
+ int swapped;
+ ec = generate_x931 (&sk, nbits, evalue, deriveparms, &swapped);
+ gcry_sexp_release (deriveparms);
+ if (!ec && r_extrainfo && swapped)
+ {
+ ec = gcry_sexp_new (r_extrainfo,
+ "(misc-key-info(p-q-swapped))", 0, 1);
+ if (ec)
+ {
+ gcry_mpi_release (sk.n); sk.n = NULL;
+ gcry_mpi_release (sk.e); sk.e = NULL;
+ gcry_mpi_release (sk.p); sk.p = NULL;
+ gcry_mpi_release (sk.q); sk.q = NULL;
+ gcry_mpi_release (sk.d); sk.d = NULL;
+ gcry_mpi_release (sk.u); sk.u = NULL;
+ }
+ }
+ }
+ else
+ {
+ /* Parse the optional "transient-key" flag. */
+ l1 = gcry_sexp_find_token (genparms, "transient-key", 0);
+ if (l1)
+ {
+ transient_key = 1;
+ gcry_sexp_release (l1);
+ }
+ /* Generate. */
+ ec = generate_std (&sk, nbits, evalue, transient_key);
+ }
+
+ if (!ec)
+ {
+ skey[0] = sk.n;
+ skey[1] = sk.e;
+ skey[2] = sk.d;
+ skey[3] = sk.p;
+ skey[4] = sk.q;
+ skey[5] = sk.u;
+ }
+
+ return ec;
+}
+
+
+static gcry_err_code_t
+rsa_generate (int algo, unsigned int nbits, unsigned long evalue,
+ gcry_mpi_t *skey, gcry_mpi_t **retfactors)
+{
+ return rsa_generate_ext (algo, nbits, evalue, NULL, skey, retfactors, NULL);
+}
+
+
+static gcry_err_code_t
+rsa_check_secret_key (int algo, gcry_mpi_t *skey)
+{
+ gcry_err_code_t err = GPG_ERR_NO_ERROR;
+ RSA_secret_key sk;
+
+ (void)algo;
+
+ sk.n = skey[0];
+ sk.e = skey[1];
+ sk.d = skey[2];
+ sk.p = skey[3];
+ sk.q = skey[4];
+ sk.u = skey[5];
+
+ if (!sk.p || !sk.q || !sk.u)
+ err = GPG_ERR_NO_OBJ; /* To check the key we need the optional
+ parameters. */
+ else if (!check_secret_key (&sk))
+ err = GPG_ERR_PUBKEY_ALGO;
+
+ return err;
+}
+
+
+static gcry_err_code_t
+rsa_encrypt (int algo, gcry_mpi_t *resarr, gcry_mpi_t data,
+ gcry_mpi_t *pkey, int flags)
+{
+ RSA_public_key pk;
+
+ (void)algo;
+ (void)flags;
+
+ pk.n = pkey[0];
+ pk.e = pkey[1];
+ resarr[0] = mpi_alloc (mpi_get_nlimbs (pk.n));
+ public (resarr[0], data, &pk);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+rsa_decrypt (int algo, gcry_mpi_t *result, gcry_mpi_t *data,
+ gcry_mpi_t *skey, int flags)
+{
+ RSA_secret_key sk;
+ gcry_mpi_t r = MPI_NULL; /* Random number needed for blinding. */
+ gcry_mpi_t ri = MPI_NULL; /* Modular multiplicative inverse of
+ r. */
+ gcry_mpi_t x = MPI_NULL; /* Data to decrypt. */
+ gcry_mpi_t y; /* Result. */
+
+ (void)algo;
+
+ /* Extract private key. */
+ sk.n = skey[0];
+ sk.e = skey[1];
+ sk.d = skey[2];
+ sk.p = skey[3]; /* Optional. */
+ sk.q = skey[4]; /* Optional. */
+ sk.u = skey[5]; /* Optional. */
+
+ y = gcry_mpi_snew (gcry_mpi_get_nbits (sk.n));
+
+ /* We use blinding by default to mitigate timing attacks which can
+ be practically mounted over the network as shown by Brumley and
+ Boney in 2003. */
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ {
+ /* Initialize blinding. */
+
+ /* First, we need a random number r between 0 and n - 1, which
+ is relatively prime to n (i.e. it is neither p nor q). The
+ random number needs to be only unpredictable, thus we employ
+ the gcry_create_nonce function by using GCRY_WEAK_RANDOM with
+ gcry_mpi_randomize. */
+ r = gcry_mpi_snew (gcry_mpi_get_nbits (sk.n));
+ ri = gcry_mpi_snew (gcry_mpi_get_nbits (sk.n));
+
+ gcry_mpi_randomize (r, gcry_mpi_get_nbits (sk.n), GCRY_WEAK_RANDOM);
+ gcry_mpi_mod (r, r, sk.n);
+
+ /* Calculate inverse of r. It practically impossible that the
+ follwing test fails, thus we do not add code to release
+ allocated resources. */
+ if (!gcry_mpi_invm (ri, r, sk.n))
+ return GPG_ERR_INTERNAL;
+ }
+
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ x = rsa_blind (data[0], r, sk.e, sk.n);
+ else
+ x = data[0];
+
+ /* Do the encryption. */
+ secret (y, x, &sk);
+
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ {
+ /* Undo blinding. */
+ gcry_mpi_t a = gcry_mpi_copy (y);
+
+ gcry_mpi_release (y);
+ y = rsa_unblind (a, ri, sk.n);
+
+ gcry_mpi_release (a);
+ }
+
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING))
+ {
+ /* Deallocate resources needed for blinding. */
+ gcry_mpi_release (x);
+ gcry_mpi_release (r);
+ gcry_mpi_release (ri);
+ }
+
+ /* Copy out result. */
+ *result = y;
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+rsa_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey)
+{
+ RSA_secret_key sk;
+
+ (void)algo;
+
+ sk.n = skey[0];
+ sk.e = skey[1];
+ sk.d = skey[2];
+ sk.p = skey[3];
+ sk.q = skey[4];
+ sk.u = skey[5];
+ resarr[0] = mpi_alloc( mpi_get_nlimbs (sk.n));
+ secret (resarr[0], data, &sk);
+
+ return GPG_ERR_NO_ERROR;
+}
+
+
+static gcry_err_code_t
+rsa_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
+ int (*cmp) (void *opaque, gcry_mpi_t tmp),
+ void *opaquev)
+{
+ RSA_public_key pk;
+ gcry_mpi_t result;
+ gcry_err_code_t rc;
+
+ (void)algo;
+ (void)cmp;
+ (void)opaquev;
+
+ pk.n = pkey[0];
+ pk.e = pkey[1];
+ result = gcry_mpi_new ( 160 );
+ public( result, data[0], &pk );
+#ifdef IS_DEVELOPMENT_VERSION
+ if (DBG_CIPHER)
+ {
+ log_mpidump ("rsa verify result:", result );
+ log_mpidump (" hash:", hash );
+ }
+#endif /*IS_DEVELOPMENT_VERSION*/
+ /*rc = (*cmp)( opaquev, result );*/
+ rc = mpi_cmp (result, hash) ? GPG_ERR_BAD_SIGNATURE : GPG_ERR_NO_ERROR;
+ gcry_mpi_release (result);
+
+ return rc;
+}
+
+
+static unsigned int
+rsa_get_nbits (int algo, gcry_mpi_t *pkey)
+{
+ (void)algo;
+
+ return mpi_get_nbits (pkey[0]);
+}
+
+
+/* Compute a keygrip. MD is the hash context which we are going to
+ update. KEYPARAM is an S-expression with the key parameters, this
+ is usually a public key but may also be a secret key. An example
+ of such an S-expression is:
+
+ (rsa
+ (n #00B...#)
+ (e #010001#))
+
+ PKCS-15 says that for RSA only the modulus should be hashed -
+ however, it is not clear wether this is meant to use the raw bytes
+ (assuming this is an unsigned integer) or whether the DER required
+ 0 should be prefixed. We hash the raw bytes. */
+static gpg_err_code_t
+compute_keygrip (gcry_md_hd_t md, gcry_sexp_t keyparam)
+{
+ gcry_sexp_t l1;
+ const char *data;
+ size_t datalen;
+
+ l1 = gcry_sexp_find_token (keyparam, "n", 1);
+ if (!l1)
+ return GPG_ERR_NO_OBJ;
+
+ data = gcry_sexp_nth_data (l1, 1, &datalen);
+ if (!data)
+ {
+ gcry_sexp_release (l1);
+ return GPG_ERR_NO_OBJ;
+ }
+
+ gcry_md_write (md, data, datalen);
+ gcry_sexp_release (l1);
+
+ return 0;
+}
+
+
+
+
+/*
+ Self-test section.
+ */
+
+static const char *
+selftest_sign_1024 (gcry_sexp_t pkey, gcry_sexp_t skey)
+{
+ static const char sample_data[] =
+ "(data (flags pkcs1)"
+ " (hash sha1 #11223344556677889900aabbccddeeff10203040#))";
+ static const char sample_data_bad[] =
+ "(data (flags pkcs1)"
+ " (hash sha1 #11223344556677889900aabbccddeeff80203040#))";
+
+ const char *errtxt = NULL;
+ gcry_error_t err;
+ gcry_sexp_t data = NULL;
+ gcry_sexp_t data_bad = NULL;
+ gcry_sexp_t sig = NULL;
+
+ err = gcry_sexp_sscan (&data, NULL,
+ sample_data, strlen (sample_data));
+ if (!err)
+ err = gcry_sexp_sscan (&data_bad, NULL,
+ sample_data_bad, strlen (sample_data_bad));
+ if (err)
+ {
+ errtxt = "converting data failed";
+ goto leave;
+ }
+
+ err = gcry_pk_sign (&sig, data, skey);
+ if (err)
+ {
+ errtxt = "signing failed";
+ goto leave;
+ }
+ err = gcry_pk_verify (sig, data, pkey);
+ if (err)
+ {
+ errtxt = "verify failed";
+ goto leave;
+ }
+ err = gcry_pk_verify (sig, data_bad, pkey);
+ if (gcry_err_code (err) != GPG_ERR_BAD_SIGNATURE)
+ {
+ errtxt = "bad signature not detected";
+ goto leave;
+ }
+
+
+ leave:
+ gcry_sexp_release (sig);
+ gcry_sexp_release (data_bad);
+ gcry_sexp_release (data);
+ return errtxt;
+}
+
+
+
+/* Given an S-expression ENCR_DATA of the form:
+
+ (enc-val
+ (rsa
+ (a a-value)))
+
+ as returned by gcry_pk_decrypt, return the the A-VALUE. On error,
+ return NULL. */
+static gcry_mpi_t
+extract_a_from_sexp (gcry_sexp_t encr_data)
+{
+ gcry_sexp_t l1, l2, l3;
+ gcry_mpi_t a_value;
+
+ l1 = gcry_sexp_find_token (encr_data, "enc-val", 0);
+ if (!l1)
+ return NULL;
+ l2 = gcry_sexp_find_token (l1, "rsa", 0);
+ gcry_sexp_release (l1);
+ if (!l2)
+ return NULL;
+ l3 = gcry_sexp_find_token (l2, "a", 0);
+ gcry_sexp_release (l2);
+ if (!l3)
+ return NULL;
+ a_value = gcry_sexp_nth_mpi (l3, 1, 0);
+ gcry_sexp_release (l3);
+
+ return a_value;
+}
+
+
+static const char *
+selftest_encr_1024 (gcry_sexp_t pkey, gcry_sexp_t skey)
+{
+ const char *errtxt = NULL;
+ gcry_error_t err;
+ const unsigned int nbits = 1000; /* Encrypt 1000 random bits. */
+ gcry_mpi_t plaintext = NULL;
+ gcry_sexp_t plain = NULL;
+ gcry_sexp_t encr = NULL;
+ gcry_mpi_t ciphertext = NULL;
+ gcry_sexp_t decr = NULL;
+ gcry_mpi_t decr_plaintext = NULL;
+ gcry_sexp_t tmplist = NULL;
+
+ /* Create plaintext. The plaintext is actually a big integer number. */
+ plaintext = gcry_mpi_new (nbits);
+ gcry_mpi_randomize (plaintext, nbits, GCRY_WEAK_RANDOM);
+
+ /* Put the plaintext into an S-expression. */
+ err = gcry_sexp_build (&plain, NULL,
+ "(data (flags raw) (value %m))", plaintext);
+ if (err)
+ {
+ errtxt = "converting data failed";
+ goto leave;
+ }
+
+ /* Encrypt. */
+ err = gcry_pk_encrypt (&encr, plain, pkey);
+ if (err)
+ {
+ errtxt = "encrypt failed";
+ goto leave;
+ }
+
+ /* Extraxt the ciphertext from the returned S-expression. */
+ /*gcry_sexp_dump (encr);*/
+ ciphertext = extract_a_from_sexp (encr);
+ if (!ciphertext)
+ {
+ errtxt = "gcry_pk_decrypt returned garbage";
+ goto leave;
+ }
+
+ /* Check that the ciphertext does no match the plaintext. */
+ /* _gcry_log_mpidump ("plaintext", plaintext); */
+ /* _gcry_log_mpidump ("ciphertxt", ciphertext); */
+ if (!gcry_mpi_cmp (plaintext, ciphertext))
+ {
+ errtxt = "ciphertext matches plaintext";
+ goto leave;
+ }
+
+ /* Decrypt. */
+ err = gcry_pk_decrypt (&decr, encr, skey);
+ if (err)
+ {
+ errtxt = "decrypt failed";
+ goto leave;
+ }
+
+ /* Extract the decrypted data from the S-expression. Note that the
+ output of gcry_pk_decrypt depends on whether a flags lists occurs
+ in its input data. Because we passed the output of
+ gcry_pk_encrypt directly to gcry_pk_decrypt, such a flag value
+ won't be there as of today. To be prepared for future changes we
+ take care of it anyway. */
+ tmplist = gcry_sexp_find_token (decr, "value", 0);
+ if (tmplist)
+ decr_plaintext = gcry_sexp_nth_mpi (tmplist, 1, GCRYMPI_FMT_USG);
+ else
+ decr_plaintext = gcry_sexp_nth_mpi (decr, 0, GCRYMPI_FMT_USG);
+ if (!decr_plaintext)
+ {
+ errtxt = "decrypt returned no plaintext";
+ goto leave;
+ }
+
+ /* Check that the decrypted plaintext matches the original plaintext. */
+ if (gcry_mpi_cmp (plaintext, decr_plaintext))
+ {
+ errtxt = "mismatch";
+ goto leave;
+ }
+
+ leave:
+ gcry_sexp_release (tmplist);
+ gcry_mpi_release (decr_plaintext);
+ gcry_sexp_release (decr);
+ gcry_mpi_release (ciphertext);
+ gcry_sexp_release (encr);
+ gcry_sexp_release (plain);
+ gcry_mpi_release (plaintext);
+ return errtxt;
+}
+
+
+static gpg_err_code_t
+selftests_rsa (selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+ gcry_error_t err;
+ gcry_sexp_t skey = NULL;
+ gcry_sexp_t pkey = NULL;
+
+ /* Convert the S-expressions into the internal representation. */
+ what = "convert";
+ err = gcry_sexp_sscan (&skey, NULL,
+ sample_secret_key, strlen (sample_secret_key));
+ if (!err)
+ err = gcry_sexp_sscan (&pkey, NULL,
+ sample_public_key, strlen (sample_public_key));
+ if (err)
+ {
+ errtxt = gcry_strerror (err);
+ goto failed;
+ }
+
+ what = "key consistency";
+ err = gcry_pk_testkey (skey);
+ if (err)
+ {
+ errtxt = gcry_strerror (err);
+ goto failed;
+ }
+
+ what = "sign";
+ errtxt = selftest_sign_1024 (pkey, skey);
+ if (errtxt)
+ goto failed;
+
+ what = "encrypt";
+ errtxt = selftest_encr_1024 (pkey, skey);
+ if (errtxt)
+ goto failed;
+
+ gcry_sexp_release (pkey);
+ gcry_sexp_release (skey);
+ return 0; /* Succeeded. */
+
+ failed:
+ gcry_sexp_release (pkey);
+ gcry_sexp_release (skey);
+ if (report)
+ report ("pubkey", GCRY_PK_RSA, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ (void)extended;
+
+ switch (algo)
+ {
+ case GCRY_PK_RSA:
+ ec = selftests_rsa (report);
+ break;
+ default:
+ ec = GPG_ERR_PUBKEY_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+
+static const char *rsa_names[] =
+ {
+ "rsa",
+ "openpgp-rsa",
+ "oid.1.2.840.113549.1.1.1",
+ NULL,
+ };
+
+gcry_pk_spec_t _gcry_pubkey_spec_rsa =
+ {
+ "RSA", rsa_names,
+ "ne", "nedpqu", "a", "s", "n",
+ GCRY_PK_USAGE_SIGN | GCRY_PK_USAGE_ENCR,
+ rsa_generate,
+ rsa_check_secret_key,
+ rsa_encrypt,
+ rsa_decrypt,
+ rsa_sign,
+ rsa_verify,
+ rsa_get_nbits,
+ };
+pk_extra_spec_t _gcry_pubkey_extraspec_rsa =
+ {
+ run_selftests,
+ rsa_generate_ext,
+ compute_keygrip
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/seed.c b/grub-core/lib/libgcrypt/cipher/seed.c
new file mode 100644
index 0000000..b0980d6
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/seed.c
@@ -0,0 +1,478 @@
+/* SEED for libgcrypt
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * --
+ * This implementation was provided for libgcrypt in public domain
+ * by Hye-Shik Chang <perky@FreeBSD.org>, July 2006.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+#define NUMKC 16
+
+#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ \
+ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
+#define PUTU32(ct, st) { (ct)[0] = (byte)((st) >> 24); \
+ (ct)[1] = (byte)((st) >> 16); \
+ (ct)[2] = (byte)((st) >> 8); \
+ (ct)[3] = (byte)(st); }
+
+union wordbuf
+{
+ u32 w;
+ byte b[4];
+};
+
+#ifdef WORDS_BIGENDIAN
+#define b0 b[3]
+#define b1 b[2]
+#define b2 b[1]
+#define b3 b[0]
+#else
+#define b0 b[0]
+#define b1 b[1]
+#define b2 b[2]
+#define b3 b[3]
+#endif
+
+static const char *selftest(void);
+
+typedef struct
+{
+ u32 keyschedule[32];
+} SEED_context;
+
+static const u32 SS0[256] = {
+ 0x2989a1a8, 0x05858184, 0x16c6d2d4, 0x13c3d3d0, 0x14445054, 0x1d0d111c,
+ 0x2c8ca0ac, 0x25052124, 0x1d4d515c, 0x03434340, 0x18081018, 0x1e0e121c,
+ 0x11415150, 0x3cccf0fc, 0x0acac2c8, 0x23436360, 0x28082028, 0x04444044,
+ 0x20002020, 0x1d8d919c, 0x20c0e0e0, 0x22c2e2e0, 0x08c8c0c8, 0x17071314,
+ 0x2585a1a4, 0x0f8f838c, 0x03030300, 0x3b4b7378, 0x3b8bb3b8, 0x13031310,
+ 0x12c2d2d0, 0x2ecee2ec, 0x30407070, 0x0c8c808c, 0x3f0f333c, 0x2888a0a8,
+ 0x32023230, 0x1dcdd1dc, 0x36c6f2f4, 0x34447074, 0x2ccce0ec, 0x15859194,
+ 0x0b0b0308, 0x17475354, 0x1c4c505c, 0x1b4b5358, 0x3d8db1bc, 0x01010100,
+ 0x24042024, 0x1c0c101c, 0x33437370, 0x18889098, 0x10001010, 0x0cccc0cc,
+ 0x32c2f2f0, 0x19c9d1d8, 0x2c0c202c, 0x27c7e3e4, 0x32427270, 0x03838380,
+ 0x1b8b9398, 0x11c1d1d0, 0x06868284, 0x09c9c1c8, 0x20406060, 0x10405050,
+ 0x2383a3a0, 0x2bcbe3e8, 0x0d0d010c, 0x3686b2b4, 0x1e8e929c, 0x0f4f434c,
+ 0x3787b3b4, 0x1a4a5258, 0x06c6c2c4, 0x38487078, 0x2686a2a4, 0x12021210,
+ 0x2f8fa3ac, 0x15c5d1d4, 0x21416160, 0x03c3c3c0, 0x3484b0b4, 0x01414140,
+ 0x12425250, 0x3d4d717c, 0x0d8d818c, 0x08080008, 0x1f0f131c, 0x19899198,
+ 0x00000000, 0x19091118, 0x04040004, 0x13435350, 0x37c7f3f4, 0x21c1e1e0,
+ 0x3dcdf1fc, 0x36467274, 0x2f0f232c, 0x27072324, 0x3080b0b0, 0x0b8b8388,
+ 0x0e0e020c, 0x2b8ba3a8, 0x2282a2a0, 0x2e4e626c, 0x13839390, 0x0d4d414c,
+ 0x29496168, 0x3c4c707c, 0x09090108, 0x0a0a0208, 0x3f8fb3bc, 0x2fcfe3ec,
+ 0x33c3f3f0, 0x05c5c1c4, 0x07878384, 0x14041014, 0x3ecef2fc, 0x24446064,
+ 0x1eced2dc, 0x2e0e222c, 0x0b4b4348, 0x1a0a1218, 0x06060204, 0x21012120,
+ 0x2b4b6368, 0x26466264, 0x02020200, 0x35c5f1f4, 0x12829290, 0x0a8a8288,
+ 0x0c0c000c, 0x3383b3b0, 0x3e4e727c, 0x10c0d0d0, 0x3a4a7278, 0x07474344,
+ 0x16869294, 0x25c5e1e4, 0x26062224, 0x00808080, 0x2d8da1ac, 0x1fcfd3dc,
+ 0x2181a1a0, 0x30003030, 0x37073334, 0x2e8ea2ac, 0x36063234, 0x15051114,
+ 0x22022220, 0x38083038, 0x34c4f0f4, 0x2787a3a4, 0x05454144, 0x0c4c404c,
+ 0x01818180, 0x29c9e1e8, 0x04848084, 0x17879394, 0x35053134, 0x0bcbc3c8,
+ 0x0ecec2cc, 0x3c0c303c, 0x31417170, 0x11011110, 0x07c7c3c4, 0x09898188,
+ 0x35457174, 0x3bcbf3f8, 0x1acad2d8, 0x38c8f0f8, 0x14849094, 0x19495158,
+ 0x02828280, 0x04c4c0c4, 0x3fcff3fc, 0x09494148, 0x39093138, 0x27476364,
+ 0x00c0c0c0, 0x0fcfc3cc, 0x17c7d3d4, 0x3888b0b8, 0x0f0f030c, 0x0e8e828c,
+ 0x02424240, 0x23032320, 0x11819190, 0x2c4c606c, 0x1bcbd3d8, 0x2484a0a4,
+ 0x34043034, 0x31c1f1f0, 0x08484048, 0x02c2c2c0, 0x2f4f636c, 0x3d0d313c,
+ 0x2d0d212c, 0x00404040, 0x3e8eb2bc, 0x3e0e323c, 0x3c8cb0bc, 0x01c1c1c0,
+ 0x2a8aa2a8, 0x3a8ab2b8, 0x0e4e424c, 0x15455154, 0x3b0b3338, 0x1cccd0dc,
+ 0x28486068, 0x3f4f737c, 0x1c8c909c, 0x18c8d0d8, 0x0a4a4248, 0x16465254,
+ 0x37477374, 0x2080a0a0, 0x2dcde1ec, 0x06464244, 0x3585b1b4, 0x2b0b2328,
+ 0x25456164, 0x3acaf2f8, 0x23c3e3e0, 0x3989b1b8, 0x3181b1b0, 0x1f8f939c,
+ 0x1e4e525c, 0x39c9f1f8, 0x26c6e2e4, 0x3282b2b0, 0x31013130, 0x2acae2e8,
+ 0x2d4d616c, 0x1f4f535c, 0x24c4e0e4, 0x30c0f0f0, 0x0dcdc1cc, 0x08888088,
+ 0x16061214, 0x3a0a3238, 0x18485058, 0x14c4d0d4, 0x22426260, 0x29092128,
+ 0x07070304, 0x33033330, 0x28c8e0e8, 0x1b0b1318, 0x05050104, 0x39497178,
+ 0x10809090, 0x2a4a6268, 0x2a0a2228, 0x1a8a9298,
+};
+
+static const u32 SS1[256] = {
+ 0x38380830, 0xe828c8e0, 0x2c2d0d21, 0xa42686a2, 0xcc0fcfc3, 0xdc1eced2,
+ 0xb03383b3, 0xb83888b0, 0xac2f8fa3, 0x60204060, 0x54154551, 0xc407c7c3,
+ 0x44044440, 0x6c2f4f63, 0x682b4b63, 0x581b4b53, 0xc003c3c3, 0x60224262,
+ 0x30330333, 0xb43585b1, 0x28290921, 0xa02080a0, 0xe022c2e2, 0xa42787a3,
+ 0xd013c3d3, 0x90118191, 0x10110111, 0x04060602, 0x1c1c0c10, 0xbc3c8cb0,
+ 0x34360632, 0x480b4b43, 0xec2fcfe3, 0x88088880, 0x6c2c4c60, 0xa82888a0,
+ 0x14170713, 0xc404c4c0, 0x14160612, 0xf434c4f0, 0xc002c2c2, 0x44054541,
+ 0xe021c1e1, 0xd416c6d2, 0x3c3f0f33, 0x3c3d0d31, 0x8c0e8e82, 0x98188890,
+ 0x28280820, 0x4c0e4e42, 0xf436c6f2, 0x3c3e0e32, 0xa42585a1, 0xf839c9f1,
+ 0x0c0d0d01, 0xdc1fcfd3, 0xd818c8d0, 0x282b0b23, 0x64264662, 0x783a4a72,
+ 0x24270723, 0x2c2f0f23, 0xf031c1f1, 0x70324272, 0x40024242, 0xd414c4d0,
+ 0x40014141, 0xc000c0c0, 0x70334373, 0x64274763, 0xac2c8ca0, 0x880b8b83,
+ 0xf437c7f3, 0xac2d8da1, 0x80008080, 0x1c1f0f13, 0xc80acac2, 0x2c2c0c20,
+ 0xa82a8aa2, 0x34340430, 0xd012c2d2, 0x080b0b03, 0xec2ecee2, 0xe829c9e1,
+ 0x5c1d4d51, 0x94148490, 0x18180810, 0xf838c8f0, 0x54174753, 0xac2e8ea2,
+ 0x08080800, 0xc405c5c1, 0x10130313, 0xcc0dcdc1, 0x84068682, 0xb83989b1,
+ 0xfc3fcff3, 0x7c3d4d71, 0xc001c1c1, 0x30310131, 0xf435c5f1, 0x880a8a82,
+ 0x682a4a62, 0xb03181b1, 0xd011c1d1, 0x20200020, 0xd417c7d3, 0x00020202,
+ 0x20220222, 0x04040400, 0x68284860, 0x70314171, 0x04070703, 0xd81bcbd3,
+ 0x9c1d8d91, 0x98198991, 0x60214161, 0xbc3e8eb2, 0xe426c6e2, 0x58194951,
+ 0xdc1dcdd1, 0x50114151, 0x90108090, 0xdc1cccd0, 0x981a8a92, 0xa02383a3,
+ 0xa82b8ba3, 0xd010c0d0, 0x80018181, 0x0c0f0f03, 0x44074743, 0x181a0a12,
+ 0xe023c3e3, 0xec2ccce0, 0x8c0d8d81, 0xbc3f8fb3, 0x94168692, 0x783b4b73,
+ 0x5c1c4c50, 0xa02282a2, 0xa02181a1, 0x60234363, 0x20230323, 0x4c0d4d41,
+ 0xc808c8c0, 0x9c1e8e92, 0x9c1c8c90, 0x383a0a32, 0x0c0c0c00, 0x2c2e0e22,
+ 0xb83a8ab2, 0x6c2e4e62, 0x9c1f8f93, 0x581a4a52, 0xf032c2f2, 0x90128292,
+ 0xf033c3f3, 0x48094941, 0x78384870, 0xcc0cccc0, 0x14150511, 0xf83bcbf3,
+ 0x70304070, 0x74354571, 0x7c3f4f73, 0x34350531, 0x10100010, 0x00030303,
+ 0x64244460, 0x6c2d4d61, 0xc406c6c2, 0x74344470, 0xd415c5d1, 0xb43484b0,
+ 0xe82acae2, 0x08090901, 0x74364672, 0x18190911, 0xfc3ecef2, 0x40004040,
+ 0x10120212, 0xe020c0e0, 0xbc3d8db1, 0x04050501, 0xf83acaf2, 0x00010101,
+ 0xf030c0f0, 0x282a0a22, 0x5c1e4e52, 0xa82989a1, 0x54164652, 0x40034343,
+ 0x84058581, 0x14140410, 0x88098981, 0x981b8b93, 0xb03080b0, 0xe425c5e1,
+ 0x48084840, 0x78394971, 0x94178793, 0xfc3cccf0, 0x1c1e0e12, 0x80028282,
+ 0x20210121, 0x8c0c8c80, 0x181b0b13, 0x5c1f4f53, 0x74374773, 0x54144450,
+ 0xb03282b2, 0x1c1d0d11, 0x24250521, 0x4c0f4f43, 0x00000000, 0x44064642,
+ 0xec2dcde1, 0x58184850, 0x50124252, 0xe82bcbe3, 0x7c3e4e72, 0xd81acad2,
+ 0xc809c9c1, 0xfc3dcdf1, 0x30300030, 0x94158591, 0x64254561, 0x3c3c0c30,
+ 0xb43686b2, 0xe424c4e0, 0xb83b8bb3, 0x7c3c4c70, 0x0c0e0e02, 0x50104050,
+ 0x38390931, 0x24260622, 0x30320232, 0x84048480, 0x68294961, 0x90138393,
+ 0x34370733, 0xe427c7e3, 0x24240420, 0xa42484a0, 0xc80bcbc3, 0x50134353,
+ 0x080a0a02, 0x84078783, 0xd819c9d1, 0x4c0c4c40, 0x80038383, 0x8c0f8f83,
+ 0xcc0ecec2, 0x383b0b33, 0x480a4a42, 0xb43787b3,
+};
+
+static const u32 SS2[256] = {
+ 0xa1a82989, 0x81840585, 0xd2d416c6, 0xd3d013c3, 0x50541444, 0x111c1d0d,
+ 0xa0ac2c8c, 0x21242505, 0x515c1d4d, 0x43400343, 0x10181808, 0x121c1e0e,
+ 0x51501141, 0xf0fc3ccc, 0xc2c80aca, 0x63602343, 0x20282808, 0x40440444,
+ 0x20202000, 0x919c1d8d, 0xe0e020c0, 0xe2e022c2, 0xc0c808c8, 0x13141707,
+ 0xa1a42585, 0x838c0f8f, 0x03000303, 0x73783b4b, 0xb3b83b8b, 0x13101303,
+ 0xd2d012c2, 0xe2ec2ece, 0x70703040, 0x808c0c8c, 0x333c3f0f, 0xa0a82888,
+ 0x32303202, 0xd1dc1dcd, 0xf2f436c6, 0x70743444, 0xe0ec2ccc, 0x91941585,
+ 0x03080b0b, 0x53541747, 0x505c1c4c, 0x53581b4b, 0xb1bc3d8d, 0x01000101,
+ 0x20242404, 0x101c1c0c, 0x73703343, 0x90981888, 0x10101000, 0xc0cc0ccc,
+ 0xf2f032c2, 0xd1d819c9, 0x202c2c0c, 0xe3e427c7, 0x72703242, 0x83800383,
+ 0x93981b8b, 0xd1d011c1, 0x82840686, 0xc1c809c9, 0x60602040, 0x50501040,
+ 0xa3a02383, 0xe3e82bcb, 0x010c0d0d, 0xb2b43686, 0x929c1e8e, 0x434c0f4f,
+ 0xb3b43787, 0x52581a4a, 0xc2c406c6, 0x70783848, 0xa2a42686, 0x12101202,
+ 0xa3ac2f8f, 0xd1d415c5, 0x61602141, 0xc3c003c3, 0xb0b43484, 0x41400141,
+ 0x52501242, 0x717c3d4d, 0x818c0d8d, 0x00080808, 0x131c1f0f, 0x91981989,
+ 0x00000000, 0x11181909, 0x00040404, 0x53501343, 0xf3f437c7, 0xe1e021c1,
+ 0xf1fc3dcd, 0x72743646, 0x232c2f0f, 0x23242707, 0xb0b03080, 0x83880b8b,
+ 0x020c0e0e, 0xa3a82b8b, 0xa2a02282, 0x626c2e4e, 0x93901383, 0x414c0d4d,
+ 0x61682949, 0x707c3c4c, 0x01080909, 0x02080a0a, 0xb3bc3f8f, 0xe3ec2fcf,
+ 0xf3f033c3, 0xc1c405c5, 0x83840787, 0x10141404, 0xf2fc3ece, 0x60642444,
+ 0xd2dc1ece, 0x222c2e0e, 0x43480b4b, 0x12181a0a, 0x02040606, 0x21202101,
+ 0x63682b4b, 0x62642646, 0x02000202, 0xf1f435c5, 0x92901282, 0x82880a8a,
+ 0x000c0c0c, 0xb3b03383, 0x727c3e4e, 0xd0d010c0, 0x72783a4a, 0x43440747,
+ 0x92941686, 0xe1e425c5, 0x22242606, 0x80800080, 0xa1ac2d8d, 0xd3dc1fcf,
+ 0xa1a02181, 0x30303000, 0x33343707, 0xa2ac2e8e, 0x32343606, 0x11141505,
+ 0x22202202, 0x30383808, 0xf0f434c4, 0xa3a42787, 0x41440545, 0x404c0c4c,
+ 0x81800181, 0xe1e829c9, 0x80840484, 0x93941787, 0x31343505, 0xc3c80bcb,
+ 0xc2cc0ece, 0x303c3c0c, 0x71703141, 0x11101101, 0xc3c407c7, 0x81880989,
+ 0x71743545, 0xf3f83bcb, 0xd2d81aca, 0xf0f838c8, 0x90941484, 0x51581949,
+ 0x82800282, 0xc0c404c4, 0xf3fc3fcf, 0x41480949, 0x31383909, 0x63642747,
+ 0xc0c000c0, 0xc3cc0fcf, 0xd3d417c7, 0xb0b83888, 0x030c0f0f, 0x828c0e8e,
+ 0x42400242, 0x23202303, 0x91901181, 0x606c2c4c, 0xd3d81bcb, 0xa0a42484,
+ 0x30343404, 0xf1f031c1, 0x40480848, 0xc2c002c2, 0x636c2f4f, 0x313c3d0d,
+ 0x212c2d0d, 0x40400040, 0xb2bc3e8e, 0x323c3e0e, 0xb0bc3c8c, 0xc1c001c1,
+ 0xa2a82a8a, 0xb2b83a8a, 0x424c0e4e, 0x51541545, 0x33383b0b, 0xd0dc1ccc,
+ 0x60682848, 0x737c3f4f, 0x909c1c8c, 0xd0d818c8, 0x42480a4a, 0x52541646,
+ 0x73743747, 0xa0a02080, 0xe1ec2dcd, 0x42440646, 0xb1b43585, 0x23282b0b,
+ 0x61642545, 0xf2f83aca, 0xe3e023c3, 0xb1b83989, 0xb1b03181, 0x939c1f8f,
+ 0x525c1e4e, 0xf1f839c9, 0xe2e426c6, 0xb2b03282, 0x31303101, 0xe2e82aca,
+ 0x616c2d4d, 0x535c1f4f, 0xe0e424c4, 0xf0f030c0, 0xc1cc0dcd, 0x80880888,
+ 0x12141606, 0x32383a0a, 0x50581848, 0xd0d414c4, 0x62602242, 0x21282909,
+ 0x03040707, 0x33303303, 0xe0e828c8, 0x13181b0b, 0x01040505, 0x71783949,
+ 0x90901080, 0x62682a4a, 0x22282a0a, 0x92981a8a,
+};
+
+static const u32 SS3[256] = {
+ 0x08303838, 0xc8e0e828, 0x0d212c2d, 0x86a2a426, 0xcfc3cc0f, 0xced2dc1e,
+ 0x83b3b033, 0x88b0b838, 0x8fa3ac2f, 0x40606020, 0x45515415, 0xc7c3c407,
+ 0x44404404, 0x4f636c2f, 0x4b63682b, 0x4b53581b, 0xc3c3c003, 0x42626022,
+ 0x03333033, 0x85b1b435, 0x09212829, 0x80a0a020, 0xc2e2e022, 0x87a3a427,
+ 0xc3d3d013, 0x81919011, 0x01111011, 0x06020406, 0x0c101c1c, 0x8cb0bc3c,
+ 0x06323436, 0x4b43480b, 0xcfe3ec2f, 0x88808808, 0x4c606c2c, 0x88a0a828,
+ 0x07131417, 0xc4c0c404, 0x06121416, 0xc4f0f434, 0xc2c2c002, 0x45414405,
+ 0xc1e1e021, 0xc6d2d416, 0x0f333c3f, 0x0d313c3d, 0x8e828c0e, 0x88909818,
+ 0x08202828, 0x4e424c0e, 0xc6f2f436, 0x0e323c3e, 0x85a1a425, 0xc9f1f839,
+ 0x0d010c0d, 0xcfd3dc1f, 0xc8d0d818, 0x0b23282b, 0x46626426, 0x4a72783a,
+ 0x07232427, 0x0f232c2f, 0xc1f1f031, 0x42727032, 0x42424002, 0xc4d0d414,
+ 0x41414001, 0xc0c0c000, 0x43737033, 0x47636427, 0x8ca0ac2c, 0x8b83880b,
+ 0xc7f3f437, 0x8da1ac2d, 0x80808000, 0x0f131c1f, 0xcac2c80a, 0x0c202c2c,
+ 0x8aa2a82a, 0x04303434, 0xc2d2d012, 0x0b03080b, 0xcee2ec2e, 0xc9e1e829,
+ 0x4d515c1d, 0x84909414, 0x08101818, 0xc8f0f838, 0x47535417, 0x8ea2ac2e,
+ 0x08000808, 0xc5c1c405, 0x03131013, 0xcdc1cc0d, 0x86828406, 0x89b1b839,
+ 0xcff3fc3f, 0x4d717c3d, 0xc1c1c001, 0x01313031, 0xc5f1f435, 0x8a82880a,
+ 0x4a62682a, 0x81b1b031, 0xc1d1d011, 0x00202020, 0xc7d3d417, 0x02020002,
+ 0x02222022, 0x04000404, 0x48606828, 0x41717031, 0x07030407, 0xcbd3d81b,
+ 0x8d919c1d, 0x89919819, 0x41616021, 0x8eb2bc3e, 0xc6e2e426, 0x49515819,
+ 0xcdd1dc1d, 0x41515011, 0x80909010, 0xccd0dc1c, 0x8a92981a, 0x83a3a023,
+ 0x8ba3a82b, 0xc0d0d010, 0x81818001, 0x0f030c0f, 0x47434407, 0x0a12181a,
+ 0xc3e3e023, 0xcce0ec2c, 0x8d818c0d, 0x8fb3bc3f, 0x86929416, 0x4b73783b,
+ 0x4c505c1c, 0x82a2a022, 0x81a1a021, 0x43636023, 0x03232023, 0x4d414c0d,
+ 0xc8c0c808, 0x8e929c1e, 0x8c909c1c, 0x0a32383a, 0x0c000c0c, 0x0e222c2e,
+ 0x8ab2b83a, 0x4e626c2e, 0x8f939c1f, 0x4a52581a, 0xc2f2f032, 0x82929012,
+ 0xc3f3f033, 0x49414809, 0x48707838, 0xccc0cc0c, 0x05111415, 0xcbf3f83b,
+ 0x40707030, 0x45717435, 0x4f737c3f, 0x05313435, 0x00101010, 0x03030003,
+ 0x44606424, 0x4d616c2d, 0xc6c2c406, 0x44707434, 0xc5d1d415, 0x84b0b434,
+ 0xcae2e82a, 0x09010809, 0x46727436, 0x09111819, 0xcef2fc3e, 0x40404000,
+ 0x02121012, 0xc0e0e020, 0x8db1bc3d, 0x05010405, 0xcaf2f83a, 0x01010001,
+ 0xc0f0f030, 0x0a22282a, 0x4e525c1e, 0x89a1a829, 0x46525416, 0x43434003,
+ 0x85818405, 0x04101414, 0x89818809, 0x8b93981b, 0x80b0b030, 0xc5e1e425,
+ 0x48404808, 0x49717839, 0x87939417, 0xccf0fc3c, 0x0e121c1e, 0x82828002,
+ 0x01212021, 0x8c808c0c, 0x0b13181b, 0x4f535c1f, 0x47737437, 0x44505414,
+ 0x82b2b032, 0x0d111c1d, 0x05212425, 0x4f434c0f, 0x00000000, 0x46424406,
+ 0xcde1ec2d, 0x48505818, 0x42525012, 0xcbe3e82b, 0x4e727c3e, 0xcad2d81a,
+ 0xc9c1c809, 0xcdf1fc3d, 0x00303030, 0x85919415, 0x45616425, 0x0c303c3c,
+ 0x86b2b436, 0xc4e0e424, 0x8bb3b83b, 0x4c707c3c, 0x0e020c0e, 0x40505010,
+ 0x09313839, 0x06222426, 0x02323032, 0x84808404, 0x49616829, 0x83939013,
+ 0x07333437, 0xc7e3e427, 0x04202424, 0x84a0a424, 0xcbc3c80b, 0x43535013,
+ 0x0a02080a, 0x87838407, 0xc9d1d819, 0x4c404c0c, 0x83838003, 0x8f838c0f,
+ 0xcec2cc0e, 0x0b33383b, 0x4a42480a, 0x87b3b437,
+};
+
+static const u32 KC[NUMKC] = {
+ 0x9e3779b9, 0x3c6ef373, 0x78dde6e6, 0xf1bbcdcc,
+ 0xe3779b99, 0xc6ef3733, 0x8dde6e67, 0x1bbcdccf,
+ 0x3779b99e, 0x6ef3733c, 0xdde6e678, 0xbbcdccf1,
+ 0x779b99e3, 0xef3733c6, 0xde6e678d, 0xbcdccf1b,
+};
+
+
+
+/* Perform the key setup.
+ */
+static gcry_err_code_t
+do_setkey (SEED_context *ctx, const byte *key, const unsigned keylen)
+{
+ static int initialized = 0;
+ static const char *selftest_failed=0;
+ u32 x1, x2, x3, x4;
+ union wordbuf t0, t1;
+ u32 *keyout = ctx->keyschedule;
+ int i;
+
+ if (!initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if( selftest_failed )
+ log_error ("%s\n", selftest_failed );
+ }
+ if (selftest_failed)
+ return GPG_ERR_SELFTEST_FAILED;
+
+ if (keylen != 16)
+ return GPG_ERR_INV_KEYLEN;
+
+ x1 = GETU32 (key);
+ x2 = GETU32 (key+4);
+ x3 = GETU32 (key+8);
+ x4 = GETU32 (key+12);
+
+ for (i = 0; i < NUMKC; i++)
+ {
+ t0.w = x1 + x3 - KC[i];
+ t1.w = x2 + KC[i] - x4;
+ *(keyout++) = SS0[t0.b0] ^ SS1[t0.b1] ^ SS2[t0.b2] ^ SS3[t0.b3];
+ *(keyout++) = SS0[t1.b0] ^ SS1[t1.b1] ^ SS2[t1.b2] ^ SS3[t1.b3];
+
+ if (i % 2 == 0)
+ {
+ t0.w = x1;
+ x1 = (x1>>8) ^ (x2<<24);
+ x2 = (x2>>8) ^ (t0.w<<24);
+ }
+ else
+ {
+ t0.w = x3;
+ x3 = (x3<<8) ^ (x4>>24);
+ x4 = (x4<<8) ^ (t0.w>>24);
+ }
+ }
+
+ return 0;
+}
+
+static gcry_err_code_t
+seed_setkey (void *context, const byte *key, const unsigned keylen)
+{
+ SEED_context *ctx = context;
+
+ int rc = do_setkey (ctx, key, keylen);
+ _gcry_burn_stack (4*6 + sizeof(void*)*2 + sizeof(int)*2);
+ return rc;
+}
+
+
+
+#define OP(X1, X2, X3, X4, rbase) \
+ t0.w = X3 ^ ctx->keyschedule[rbase]; \
+ t1.w = X4 ^ ctx->keyschedule[rbase+1]; \
+ t1.w ^= t0.w; \
+ t1.w = SS0[t1.b0] ^ SS1[t1.b1] ^ SS2[t1.b2] ^ SS3[t1.b3]; \
+ t0.w += t1.w; \
+ t0.w = SS0[t0.b0] ^ SS1[t0.b1] ^ SS2[t0.b2] ^ SS3[t0.b3]; \
+ t1.w += t0.w; \
+ t1.w = SS0[t1.b0] ^ SS1[t1.b1] ^ SS2[t1.b2] ^ SS3[t1.b3]; \
+ t0.w += t1.w; \
+ X1 ^= t0.w; \
+ X2 ^= t1.w;
+
+/* Encrypt one block. inbuf and outbuf may be the same. */
+static void
+do_encrypt (const SEED_context *ctx, byte *outbuf, const byte *inbuf)
+{
+ u32 x1, x2, x3, x4;
+ union wordbuf t0, t1;
+
+ x1 = GETU32 (inbuf);
+ x2 = GETU32 (inbuf+4);
+ x3 = GETU32 (inbuf+8);
+ x4 = GETU32 (inbuf+12);
+
+ OP (x1, x2, x3, x4, 0);
+ OP (x3, x4, x1, x2, 2);
+ OP (x1, x2, x3, x4, 4);
+ OP (x3, x4, x1, x2, 6);
+ OP (x1, x2, x3, x4, 8);
+ OP (x3, x4, x1, x2, 10);
+ OP (x1, x2, x3, x4, 12);
+ OP (x3, x4, x1, x2, 14);
+ OP (x1, x2, x3, x4, 16);
+ OP (x3, x4, x1, x2, 18);
+ OP (x1, x2, x3, x4, 20);
+ OP (x3, x4, x1, x2, 22);
+ OP (x1, x2, x3, x4, 24);
+ OP (x3, x4, x1, x2, 26);
+ OP (x1, x2, x3, x4, 28);
+ OP (x3, x4, x1, x2, 30);
+
+ PUTU32 (outbuf, x3);
+ PUTU32 (outbuf+4, x4);
+ PUTU32 (outbuf+8, x1);
+ PUTU32 (outbuf+12, x2);
+}
+
+static void
+seed_encrypt (void *context, byte *outbuf, const byte *inbuf)
+{
+ SEED_context *ctx = context;
+
+ do_encrypt (ctx, outbuf, inbuf);
+ _gcry_burn_stack (4*6);
+}
+
+
+
+/* Decrypt one block. inbuf and outbuf may be the same. */
+static void
+do_decrypt (SEED_context *ctx, byte *outbuf, const byte *inbuf)
+{
+ u32 x1, x2, x3, x4;
+ union wordbuf t0, t1;
+
+ x1 = GETU32 (inbuf);
+ x2 = GETU32 (inbuf+4);
+ x3 = GETU32 (inbuf+8);
+ x4 = GETU32 (inbuf+12);
+
+ OP (x1, x2, x3, x4, 30);
+ OP (x3, x4, x1, x2, 28);
+ OP (x1, x2, x3, x4, 26);
+ OP (x3, x4, x1, x2, 24);
+ OP (x1, x2, x3, x4, 22);
+ OP (x3, x4, x1, x2, 20);
+ OP (x1, x2, x3, x4, 18);
+ OP (x3, x4, x1, x2, 16);
+ OP (x1, x2, x3, x4, 14);
+ OP (x3, x4, x1, x2, 12);
+ OP (x1, x2, x3, x4, 10);
+ OP (x3, x4, x1, x2, 8);
+ OP (x1, x2, x3, x4, 6);
+ OP (x3, x4, x1, x2, 4);
+ OP (x1, x2, x3, x4, 2);
+ OP (x3, x4, x1, x2, 0);
+
+ PUTU32 (outbuf, x3);
+ PUTU32 (outbuf+4, x4);
+ PUTU32 (outbuf+8, x1);
+ PUTU32 (outbuf+12, x2);
+}
+
+static void
+seed_decrypt (void *context, byte *outbuf, const byte *inbuf)
+{
+ SEED_context *ctx = context;
+
+ do_decrypt (ctx, outbuf, inbuf);
+ _gcry_burn_stack (4*6);
+}
+
+
+/* Test a single encryption and decryption with each key size. */
+static const char*
+selftest (void)
+{
+ SEED_context ctx;
+ byte scratch[16];
+
+ /* The test vector is taken from the appendix section B.3 of RFC4269.
+ */
+ static const byte plaintext[16] = {
+ 0x83, 0xA2, 0xF8, 0xA2, 0x88, 0x64, 0x1F, 0xB9,
+ 0xA4, 0xE9, 0xA5, 0xCC, 0x2F, 0x13, 0x1C, 0x7D
+ };
+ static const byte key[16] = {
+ 0x47, 0x06, 0x48, 0x08, 0x51, 0xE6, 0x1B, 0xE8,
+ 0x5D, 0x74, 0xBF, 0xB3, 0xFD, 0x95, 0x61, 0x85
+ };
+ static const byte ciphertext[16] = {
+ 0xEE, 0x54, 0xD1, 0x3E, 0xBC, 0xAE, 0x70, 0x6D,
+ 0x22, 0x6B, 0xC3, 0x14, 0x2C, 0xD4, 0x0D, 0x4A,
+ };
+
+ seed_setkey (&ctx, key, sizeof(key));
+ seed_encrypt (&ctx, scratch, plaintext);
+ if (memcmp (scratch, ciphertext, sizeof (ciphertext)))
+ return "SEED test encryption failed.";
+ seed_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext, sizeof (plaintext)))
+ return "SEED test decryption failed.";
+
+ return NULL;
+}
+
+
+
+static gcry_cipher_oid_spec_t seed_oids[] =
+ {
+ { "1.2.410.200004.1.3", GCRY_CIPHER_MODE_ECB },
+ { "1.2.410.200004.1.4", GCRY_CIPHER_MODE_CBC },
+ { "1.2.410.200004.1.5", GCRY_CIPHER_MODE_CFB },
+ { "1.2.410.200004.1.6", GCRY_CIPHER_MODE_OFB },
+ { NULL }
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_seed =
+ {
+ "SEED", NULL, seed_oids, 16, 128, sizeof (SEED_context),
+ seed_setkey, seed_encrypt, seed_decrypt,
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/serpent.c b/grub-core/lib/libgcrypt/cipher/serpent.c
new file mode 100644
index 0000000..6b7e655
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/serpent.c
@@ -0,0 +1,978 @@
+/* serpent.c - Implementation of the Serpent encryption algorithm.
+ * Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include <config.h>
+
+#include <string.h>
+#include <stdio.h>
+
+#include "types.h"
+#include "g10lib.h"
+#include "cipher.h"
+#include "bithelp.h"
+
+/* Number of rounds per Serpent encrypt/decrypt operation. */
+#define ROUNDS 32
+
+/* Magic number, used during generating of the subkeys. */
+#define PHI 0x9E3779B9
+
+/* Serpent works on 128 bit blocks. */
+typedef u32 serpent_block_t[4];
+
+/* Serpent key, provided by the user. If the original key is shorter
+ than 256 bits, it is padded. */
+typedef u32 serpent_key_t[8];
+
+/* The key schedule consists of 33 128 bit subkeys. */
+typedef u32 serpent_subkeys_t[ROUNDS + 1][4];
+
+/* A Serpent context. */
+typedef struct serpent_context
+{
+ serpent_subkeys_t keys; /* Generated subkeys. */
+} serpent_context_t;
+
+
+/* A prototype. */
+static const char *serpent_test (void);
+
+
+#define byte_swap_32(x) \
+ (0 \
+ | (((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) \
+ | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+
+/* These are the S-Boxes of Serpent. They are copied from Serpents
+ reference implementation (the optimized one, contained in
+ `floppy2') and are therefore:
+
+ Copyright (C) 1998 Ross Anderson, Eli Biham, Lars Knudsen.
+
+ To quote the Serpent homepage
+ (http://www.cl.cam.ac.uk/~rja14/serpent.html):
+
+ "Serpent is now completely in the public domain, and we impose no
+ restrictions on its use. This was announced on the 21st August at
+ the First AES Candidate Conference. The optimised implementations
+ in the submission package are now under the GNU PUBLIC LICENSE
+ (GPL), although some comments in the code still say otherwise. You
+ are welcome to use Serpent for any application." */
+
+#define SBOX0(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t05, t06, t07, t08, t09; \
+ u32 t11, t12, t13, t14, t15, t17, t01; \
+ t01 = b ^ c ; \
+ t02 = a | d ; \
+ t03 = a ^ b ; \
+ z = t02 ^ t01; \
+ t05 = c | z ; \
+ t06 = a ^ d ; \
+ t07 = b | c ; \
+ t08 = d & t05; \
+ t09 = t03 & t07; \
+ y = t09 ^ t08; \
+ t11 = t09 & y ; \
+ t12 = c ^ d ; \
+ t13 = t07 ^ t11; \
+ t14 = b & t06; \
+ t15 = t06 ^ t13; \
+ w = ~ t15; \
+ t17 = w ^ t14; \
+ x = t12 ^ t17; \
+ }
+
+#define SBOX0_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t08, t09, t10; \
+ u32 t12, t13, t14, t15, t17, t18, t01; \
+ t01 = c ^ d ; \
+ t02 = a | b ; \
+ t03 = b | c ; \
+ t04 = c & t01; \
+ t05 = t02 ^ t01; \
+ t06 = a | t04; \
+ y = ~ t05; \
+ t08 = b ^ d ; \
+ t09 = t03 & t08; \
+ t10 = d | y ; \
+ x = t09 ^ t06; \
+ t12 = a | t05; \
+ t13 = x ^ t12; \
+ t14 = t03 ^ t10; \
+ t15 = a ^ c ; \
+ z = t14 ^ t13; \
+ t17 = t05 & t13; \
+ t18 = t14 | t17; \
+ w = t15 ^ t18; \
+ }
+
+#define SBOX1(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08; \
+ u32 t10, t11, t12, t13, t16, t17, t01; \
+ t01 = a | d ; \
+ t02 = c ^ d ; \
+ t03 = ~ b ; \
+ t04 = a ^ c ; \
+ t05 = a | t03; \
+ t06 = d & t04; \
+ t07 = t01 & t02; \
+ t08 = b | t06; \
+ y = t02 ^ t05; \
+ t10 = t07 ^ t08; \
+ t11 = t01 ^ t10; \
+ t12 = y ^ t11; \
+ t13 = b & d ; \
+ z = ~ t10; \
+ x = t13 ^ t12; \
+ t16 = t10 | x ; \
+ t17 = t05 & t16; \
+ w = c ^ t17; \
+ }
+
+#define SBOX1_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08; \
+ u32 t09, t10, t11, t14, t15, t17, t01; \
+ t01 = a ^ b ; \
+ t02 = b | d ; \
+ t03 = a & c ; \
+ t04 = c ^ t02; \
+ t05 = a | t04; \
+ t06 = t01 & t05; \
+ t07 = d | t03; \
+ t08 = b ^ t06; \
+ t09 = t07 ^ t06; \
+ t10 = t04 | t03; \
+ t11 = d & t08; \
+ y = ~ t09; \
+ x = t10 ^ t11; \
+ t14 = a | y ; \
+ t15 = t06 ^ x ; \
+ z = t01 ^ t04; \
+ t17 = c ^ t15; \
+ w = t14 ^ t17; \
+ }
+
+#define SBOX2(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t05, t06, t07, t08; \
+ u32 t09, t10, t12, t13, t14, t01; \
+ t01 = a | c ; \
+ t02 = a ^ b ; \
+ t03 = d ^ t01; \
+ w = t02 ^ t03; \
+ t05 = c ^ w ; \
+ t06 = b ^ t05; \
+ t07 = b | t05; \
+ t08 = t01 & t06; \
+ t09 = t03 ^ t07; \
+ t10 = t02 | t09; \
+ x = t10 ^ t08; \
+ t12 = a | d ; \
+ t13 = t09 ^ x ; \
+ t14 = b ^ t13; \
+ z = ~ t09; \
+ y = t12 ^ t14; \
+ }
+
+#define SBOX2_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t06, t07, t08, t09; \
+ u32 t10, t11, t12, t15, t16, t17, t01; \
+ t01 = a ^ d ; \
+ t02 = c ^ d ; \
+ t03 = a & c ; \
+ t04 = b | t02; \
+ w = t01 ^ t04; \
+ t06 = a | c ; \
+ t07 = d | w ; \
+ t08 = ~ d ; \
+ t09 = b & t06; \
+ t10 = t08 | t03; \
+ t11 = b & t07; \
+ t12 = t06 & t02; \
+ z = t09 ^ t10; \
+ x = t12 ^ t11; \
+ t15 = c & z ; \
+ t16 = w ^ x ; \
+ t17 = t10 ^ t15; \
+ y = t16 ^ t17; \
+ }
+
+#define SBOX3(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08; \
+ u32 t09, t10, t11, t13, t14, t15, t01; \
+ t01 = a ^ c ; \
+ t02 = a | d ; \
+ t03 = a & d ; \
+ t04 = t01 & t02; \
+ t05 = b | t03; \
+ t06 = a & b ; \
+ t07 = d ^ t04; \
+ t08 = c | t06; \
+ t09 = b ^ t07; \
+ t10 = d & t05; \
+ t11 = t02 ^ t10; \
+ z = t08 ^ t09; \
+ t13 = d | z ; \
+ t14 = a | t07; \
+ t15 = b & t13; \
+ y = t08 ^ t11; \
+ w = t14 ^ t15; \
+ x = t05 ^ t04; \
+ }
+
+#define SBOX3_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t09; \
+ u32 t11, t12, t13, t14, t16, t01; \
+ t01 = c | d ; \
+ t02 = a | d ; \
+ t03 = c ^ t02; \
+ t04 = b ^ t02; \
+ t05 = a ^ d ; \
+ t06 = t04 & t03; \
+ t07 = b & t01; \
+ y = t05 ^ t06; \
+ t09 = a ^ t03; \
+ w = t07 ^ t03; \
+ t11 = w | t05; \
+ t12 = t09 & t11; \
+ t13 = a & y ; \
+ t14 = t01 ^ t05; \
+ x = b ^ t12; \
+ t16 = b | t13; \
+ z = t14 ^ t16; \
+ }
+
+#define SBOX4(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t08, t09; \
+ u32 t10, t11, t12, t13, t14, t15, t16, t01; \
+ t01 = a | b ; \
+ t02 = b | c ; \
+ t03 = a ^ t02; \
+ t04 = b ^ d ; \
+ t05 = d | t03; \
+ t06 = d & t01; \
+ z = t03 ^ t06; \
+ t08 = z & t04; \
+ t09 = t04 & t05; \
+ t10 = c ^ t06; \
+ t11 = b & c ; \
+ t12 = t04 ^ t08; \
+ t13 = t11 | t03; \
+ t14 = t10 ^ t09; \
+ t15 = a & t05; \
+ t16 = t11 | t12; \
+ y = t13 ^ t08; \
+ x = t15 ^ t16; \
+ w = ~ t14; \
+ }
+
+#define SBOX4_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t09; \
+ u32 t10, t11, t12, t13, t15, t01; \
+ t01 = b | d ; \
+ t02 = c | d ; \
+ t03 = a & t01; \
+ t04 = b ^ t02; \
+ t05 = c ^ d ; \
+ t06 = ~ t03; \
+ t07 = a & t04; \
+ x = t05 ^ t07; \
+ t09 = x | t06; \
+ t10 = a ^ t07; \
+ t11 = t01 ^ t09; \
+ t12 = d ^ t04; \
+ t13 = c | t10; \
+ z = t03 ^ t12; \
+ t15 = a ^ t04; \
+ y = t11 ^ t13; \
+ w = t15 ^ t09; \
+ }
+
+#define SBOX5(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t07, t08, t09; \
+ u32 t10, t11, t12, t13, t14, t01; \
+ t01 = b ^ d ; \
+ t02 = b | d ; \
+ t03 = a & t01; \
+ t04 = c ^ t02; \
+ t05 = t03 ^ t04; \
+ w = ~ t05; \
+ t07 = a ^ t01; \
+ t08 = d | w ; \
+ t09 = b | t05; \
+ t10 = d ^ t08; \
+ t11 = b | t07; \
+ t12 = t03 | w ; \
+ t13 = t07 | t10; \
+ t14 = t01 ^ t11; \
+ y = t09 ^ t13; \
+ x = t07 ^ t08; \
+ z = t12 ^ t14; \
+ }
+
+#define SBOX5_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t07, t08, t09; \
+ u32 t10, t12, t13, t15, t16, t01; \
+ t01 = a & d ; \
+ t02 = c ^ t01; \
+ t03 = a ^ d ; \
+ t04 = b & t02; \
+ t05 = a & c ; \
+ w = t03 ^ t04; \
+ t07 = a & w ; \
+ t08 = t01 ^ w ; \
+ t09 = b | t05; \
+ t10 = ~ b ; \
+ x = t08 ^ t09; \
+ t12 = t10 | t07; \
+ t13 = w | x ; \
+ z = t02 ^ t12; \
+ t15 = t02 ^ t13; \
+ t16 = b ^ d ; \
+ y = t16 ^ t15; \
+ }
+
+#define SBOX6(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t07, t08, t09, t10; \
+ u32 t11, t12, t13, t15, t17, t18, t01; \
+ t01 = a & d ; \
+ t02 = b ^ c ; \
+ t03 = a ^ d ; \
+ t04 = t01 ^ t02; \
+ t05 = b | c ; \
+ x = ~ t04; \
+ t07 = t03 & t05; \
+ t08 = b & x ; \
+ t09 = a | c ; \
+ t10 = t07 ^ t08; \
+ t11 = b | d ; \
+ t12 = c ^ t11; \
+ t13 = t09 ^ t10; \
+ y = ~ t13; \
+ t15 = x & t03; \
+ z = t12 ^ t07; \
+ t17 = a ^ b ; \
+ t18 = y ^ t15; \
+ w = t17 ^ t18; \
+ }
+
+#define SBOX6_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t07, t08, t09; \
+ u32 t12, t13, t14, t15, t16, t17, t01; \
+ t01 = a ^ c ; \
+ t02 = ~ c ; \
+ t03 = b & t01; \
+ t04 = b | t02; \
+ t05 = d | t03; \
+ t06 = b ^ d ; \
+ t07 = a & t04; \
+ t08 = a | t02; \
+ t09 = t07 ^ t05; \
+ x = t06 ^ t08; \
+ w = ~ t09; \
+ t12 = b & w ; \
+ t13 = t01 & t05; \
+ t14 = t01 ^ t12; \
+ t15 = t07 ^ t13; \
+ t16 = d | t02; \
+ t17 = a ^ x ; \
+ z = t17 ^ t15; \
+ y = t16 ^ t14; \
+ }
+
+#define SBOX7(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t05, t06, t08, t09, t10; \
+ u32 t11, t13, t14, t15, t16, t17, t01; \
+ t01 = a & c ; \
+ t02 = ~ d ; \
+ t03 = a & t02; \
+ t04 = b | t01; \
+ t05 = a & b ; \
+ t06 = c ^ t04; \
+ z = t03 ^ t06; \
+ t08 = c | z ; \
+ t09 = d | t05; \
+ t10 = a ^ t08; \
+ t11 = t04 & z ; \
+ x = t09 ^ t10; \
+ t13 = b ^ x ; \
+ t14 = t01 ^ x ; \
+ t15 = c ^ t05; \
+ t16 = t11 | t13; \
+ t17 = t02 | t14; \
+ w = t15 ^ t17; \
+ y = a ^ t16; \
+ }
+
+#define SBOX7_INVERSE(a, b, c, d, w, x, y, z) \
+ { \
+ u32 t02, t03, t04, t06, t07, t08, t09; \
+ u32 t10, t11, t13, t14, t15, t16, t01; \
+ t01 = a & b ; \
+ t02 = a | b ; \
+ t03 = c | t01; \
+ t04 = d & t02; \
+ z = t03 ^ t04; \
+ t06 = b ^ t04; \
+ t07 = d ^ z ; \
+ t08 = ~ t07; \
+ t09 = t06 | t08; \
+ t10 = b ^ d ; \
+ t11 = a | d ; \
+ x = a ^ t09; \
+ t13 = c ^ t06; \
+ t14 = c & t11; \
+ t15 = d | x ; \
+ t16 = t01 | t10; \
+ w = t13 ^ t15; \
+ y = t14 ^ t16; \
+ }
+
+/* XOR BLOCK1 into BLOCK0. */
+#define BLOCK_XOR(block0, block1) \
+ { \
+ block0[0] ^= block1[0]; \
+ block0[1] ^= block1[1]; \
+ block0[2] ^= block1[2]; \
+ block0[3] ^= block1[3]; \
+ }
+
+/* Copy BLOCK_SRC to BLOCK_DST. */
+#define BLOCK_COPY(block_dst, block_src) \
+ { \
+ block_dst[0] = block_src[0]; \
+ block_dst[1] = block_src[1]; \
+ block_dst[2] = block_src[2]; \
+ block_dst[3] = block_src[3]; \
+ }
+
+/* Apply SBOX number WHICH to to the block found in ARRAY0 at index
+ INDEX, writing the output to the block found in ARRAY1 at index
+ INDEX. */
+#define SBOX(which, array0, array1, index) \
+ SBOX##which (array0[index + 0], array0[index + 1], \
+ array0[index + 2], array0[index + 3], \
+ array1[index + 0], array1[index + 1], \
+ array1[index + 2], array1[index + 3]);
+
+/* Apply inverse SBOX number WHICH to to the block found in ARRAY0 at
+ index INDEX, writing the output to the block found in ARRAY1 at
+ index INDEX. */
+#define SBOX_INVERSE(which, array0, array1, index) \
+ SBOX##which##_INVERSE (array0[index + 0], array0[index + 1], \
+ array0[index + 2], array0[index + 3], \
+ array1[index + 0], array1[index + 1], \
+ array1[index + 2], array1[index + 3]);
+
+/* Apply the linear transformation to BLOCK. */
+#define LINEAR_TRANSFORMATION(block) \
+ { \
+ block[0] = rol (block[0], 13); \
+ block[2] = rol (block[2], 3); \
+ block[1] = block[1] ^ block[0] ^ block[2]; \
+ block[3] = block[3] ^ block[2] ^ (block[0] << 3); \
+ block[1] = rol (block[1], 1); \
+ block[3] = rol (block[3], 7); \
+ block[0] = block[0] ^ block[1] ^ block[3]; \
+ block[2] = block[2] ^ block[3] ^ (block[1] << 7); \
+ block[0] = rol (block[0], 5); \
+ block[2] = rol (block[2], 22); \
+ }
+
+/* Apply the inverse linear transformation to BLOCK. */
+#define LINEAR_TRANSFORMATION_INVERSE(block) \
+ { \
+ block[2] = ror (block[2], 22); \
+ block[0] = ror (block[0] , 5); \
+ block[2] = block[2] ^ block[3] ^ (block[1] << 7); \
+ block[0] = block[0] ^ block[1] ^ block[3]; \
+ block[3] = ror (block[3], 7); \
+ block[1] = ror (block[1], 1); \
+ block[3] = block[3] ^ block[2] ^ (block[0] << 3); \
+ block[1] = block[1] ^ block[0] ^ block[2]; \
+ block[2] = ror (block[2], 3); \
+ block[0] = ror (block[0], 13); \
+ }
+
+/* Apply a Serpent round to BLOCK, using the SBOX number WHICH and the
+ subkeys contained in SUBKEYS. Use BLOCK_TMP as temporary storage.
+ This macro increments `round'. */
+#define ROUND(which, subkeys, block, block_tmp) \
+ { \
+ BLOCK_XOR (block, subkeys[round]); \
+ round++; \
+ SBOX (which, block, block_tmp, 0); \
+ LINEAR_TRANSFORMATION (block_tmp); \
+ BLOCK_COPY (block, block_tmp); \
+ }
+
+/* Apply the last Serpent round to BLOCK, using the SBOX number WHICH
+ and the subkeys contained in SUBKEYS. Use BLOCK_TMP as temporary
+ storage. The result will be stored in BLOCK_TMP. This macro
+ increments `round'. */
+#define ROUND_LAST(which, subkeys, block, block_tmp) \
+ { \
+ BLOCK_XOR (block, subkeys[round]); \
+ round++; \
+ SBOX (which, block, block_tmp, 0); \
+ BLOCK_XOR (block_tmp, subkeys[round]); \
+ round++; \
+ }
+
+/* Apply an inverse Serpent round to BLOCK, using the SBOX number
+ WHICH and the subkeys contained in SUBKEYS. Use BLOCK_TMP as
+ temporary storage. This macro increments `round'. */
+#define ROUND_INVERSE(which, subkey, block, block_tmp) \
+ { \
+ LINEAR_TRANSFORMATION_INVERSE (block); \
+ SBOX_INVERSE (which, block, block_tmp, 0); \
+ BLOCK_XOR (block_tmp, subkey[round]); \
+ round--; \
+ BLOCK_COPY (block, block_tmp); \
+ }
+
+/* Apply the first Serpent round to BLOCK, using the SBOX number WHICH
+ and the subkeys contained in SUBKEYS. Use BLOCK_TMP as temporary
+ storage. The result will be stored in BLOCK_TMP. This macro
+ increments `round'. */
+#define ROUND_FIRST_INVERSE(which, subkeys, block, block_tmp) \
+ { \
+ BLOCK_XOR (block, subkeys[round]); \
+ round--; \
+ SBOX_INVERSE (which, block, block_tmp, 0); \
+ BLOCK_XOR (block_tmp, subkeys[round]); \
+ round--; \
+ }
+
+/* Convert the user provided key KEY of KEY_LENGTH bytes into the
+ internally used format. */
+static void
+serpent_key_prepare (const byte *key, unsigned int key_length,
+ serpent_key_t key_prepared)
+{
+ int i;
+
+ /* Copy key. */
+ for (i = 0; i < key_length / 4; i++)
+ {
+#ifdef WORDS_BIGENDIAN
+ key_prepared[i] = byte_swap_32 (((u32 *) key)[i]);
+#else
+ key_prepared[i] = ((u32 *) key)[i];
+#endif
+ }
+
+ if (i < 8)
+ {
+ /* Key must be padded according to the Serpent
+ specification. */
+ key_prepared[i] = 0x00000001;
+
+ for (i++; i < 8; i++)
+ key_prepared[i] = 0;
+ }
+}
+
+/* Derive the 33 subkeys from KEY and store them in SUBKEYS. */
+static void
+serpent_subkeys_generate (serpent_key_t key, serpent_subkeys_t subkeys)
+{
+ u32 w_real[140]; /* The `prekey'. */
+ u32 k[132];
+ u32 *w = &w_real[8];
+ int i, j;
+
+ /* Initialize with key values. */
+ for (i = 0; i < 8; i++)
+ w[i - 8] = key[i];
+
+ /* Expand to intermediate key using the affine recurrence. */
+ for (i = 0; i < 132; i++)
+ w[i] = rol (w[i - 8] ^ w[i - 5] ^ w[i - 3] ^ w[i - 1] ^ PHI ^ i, 11);
+
+ /* Calculate subkeys via S-Boxes, in bitslice mode. */
+ SBOX (3, w, k, 0);
+ SBOX (2, w, k, 4);
+ SBOX (1, w, k, 8);
+ SBOX (0, w, k, 12);
+ SBOX (7, w, k, 16);
+ SBOX (6, w, k, 20);
+ SBOX (5, w, k, 24);
+ SBOX (4, w, k, 28);
+ SBOX (3, w, k, 32);
+ SBOX (2, w, k, 36);
+ SBOX (1, w, k, 40);
+ SBOX (0, w, k, 44);
+ SBOX (7, w, k, 48);
+ SBOX (6, w, k, 52);
+ SBOX (5, w, k, 56);
+ SBOX (4, w, k, 60);
+ SBOX (3, w, k, 64);
+ SBOX (2, w, k, 68);
+ SBOX (1, w, k, 72);
+ SBOX (0, w, k, 76);
+ SBOX (7, w, k, 80);
+ SBOX (6, w, k, 84);
+ SBOX (5, w, k, 88);
+ SBOX (4, w, k, 92);
+ SBOX (3, w, k, 96);
+ SBOX (2, w, k, 100);
+ SBOX (1, w, k, 104);
+ SBOX (0, w, k, 108);
+ SBOX (7, w, k, 112);
+ SBOX (6, w, k, 116);
+ SBOX (5, w, k, 120);
+ SBOX (4, w, k, 124);
+ SBOX (3, w, k, 128);
+
+ /* Renumber subkeys. */
+ for (i = 0; i < ROUNDS + 1; i++)
+ for (j = 0; j < 4; j++)
+ subkeys[i][j] = k[4 * i + j];
+}
+
+/* Initialize CONTEXT with the key KEY of KEY_LENGTH bits. */
+static void
+serpent_setkey_internal (serpent_context_t *context,
+ const byte *key, unsigned int key_length)
+{
+ serpent_key_t key_prepared;
+
+ serpent_key_prepare (key, key_length, key_prepared);
+ serpent_subkeys_generate (key_prepared, context->keys);
+ _gcry_burn_stack (272 * sizeof (u32));
+}
+
+/* Initialize CTX with the key KEY of KEY_LENGTH bytes. */
+static gcry_err_code_t
+serpent_setkey (void *ctx,
+ const byte *key, unsigned int key_length)
+{
+ serpent_context_t *context = ctx;
+ static const char *serpent_test_ret;
+ static int serpent_init_done;
+ gcry_err_code_t ret = GPG_ERR_NO_ERROR;
+
+ if (! serpent_init_done)
+ {
+ /* Execute a self-test the first time, Serpent is used. */
+ serpent_test_ret = serpent_test ();
+ if (serpent_test_ret)
+ log_error ("Serpent test failure: %s\n", serpent_test_ret);
+ serpent_init_done = 1;
+ }
+
+ if (serpent_test_ret)
+ ret = GPG_ERR_SELFTEST_FAILED;
+ else
+ {
+ serpent_setkey_internal (context, key, key_length);
+ _gcry_burn_stack (sizeof (serpent_key_t));
+ }
+
+ return ret;
+}
+
+static void
+serpent_encrypt_internal (serpent_context_t *context,
+ const serpent_block_t input, serpent_block_t output)
+{
+ serpent_block_t b, b_next;
+ int round = 0;
+
+#ifdef WORDS_BIGENDIAN
+ b[0] = byte_swap_32 (input[0]);
+ b[1] = byte_swap_32 (input[1]);
+ b[2] = byte_swap_32 (input[2]);
+ b[3] = byte_swap_32 (input[3]);
+#else
+ b[0] = input[0];
+ b[1] = input[1];
+ b[2] = input[2];
+ b[3] = input[3];
+#endif
+
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+ ROUND (7, context->keys, b, b_next);
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+ ROUND (7, context->keys, b, b_next);
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+ ROUND (7, context->keys, b, b_next);
+ ROUND (0, context->keys, b, b_next);
+ ROUND (1, context->keys, b, b_next);
+ ROUND (2, context->keys, b, b_next);
+ ROUND (3, context->keys, b, b_next);
+ ROUND (4, context->keys, b, b_next);
+ ROUND (5, context->keys, b, b_next);
+ ROUND (6, context->keys, b, b_next);
+
+ ROUND_LAST (7, context->keys, b, b_next);
+
+#ifdef WORDS_BIGENDIAN
+ output[0] = byte_swap_32 (b_next[0]);
+ output[1] = byte_swap_32 (b_next[1]);
+ output[2] = byte_swap_32 (b_next[2]);
+ output[3] = byte_swap_32 (b_next[3]);
+#else
+ output[0] = b_next[0];
+ output[1] = b_next[1];
+ output[2] = b_next[2];
+ output[3] = b_next[3];
+#endif
+}
+
+static void
+serpent_decrypt_internal (serpent_context_t *context,
+ const serpent_block_t input, serpent_block_t output)
+{
+ serpent_block_t b, b_next;
+ int round = ROUNDS;
+
+#ifdef WORDS_BIGENDIAN
+ b_next[0] = byte_swap_32 (input[0]);
+ b_next[1] = byte_swap_32 (input[1]);
+ b_next[2] = byte_swap_32 (input[2]);
+ b_next[3] = byte_swap_32 (input[3]);
+#else
+ b_next[0] = input[0];
+ b_next[1] = input[1];
+ b_next[2] = input[2];
+ b_next[3] = input[3];
+#endif
+
+ ROUND_FIRST_INVERSE (7, context->keys, b_next, b);
+
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+ ROUND_INVERSE (7, context->keys, b, b_next);
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+ ROUND_INVERSE (7, context->keys, b, b_next);
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+ ROUND_INVERSE (7, context->keys, b, b_next);
+ ROUND_INVERSE (6, context->keys, b, b_next);
+ ROUND_INVERSE (5, context->keys, b, b_next);
+ ROUND_INVERSE (4, context->keys, b, b_next);
+ ROUND_INVERSE (3, context->keys, b, b_next);
+ ROUND_INVERSE (2, context->keys, b, b_next);
+ ROUND_INVERSE (1, context->keys, b, b_next);
+ ROUND_INVERSE (0, context->keys, b, b_next);
+
+
+#ifdef WORDS_BIGENDIAN
+ output[0] = byte_swap_32 (b_next[0]);
+ output[1] = byte_swap_32 (b_next[1]);
+ output[2] = byte_swap_32 (b_next[2]);
+ output[3] = byte_swap_32 (b_next[3]);
+#else
+ output[0] = b_next[0];
+ output[1] = b_next[1];
+ output[2] = b_next[2];
+ output[3] = b_next[3];
+#endif
+}
+
+static void
+serpent_encrypt (void *ctx, byte *buffer_out, const byte *buffer_in)
+{
+ serpent_context_t *context = ctx;
+
+ serpent_encrypt_internal (context,
+ (const u32 *) buffer_in, (u32 *) buffer_out);
+ _gcry_burn_stack (2 * sizeof (serpent_block_t));
+}
+
+static void
+serpent_decrypt (void *ctx, byte *buffer_out, const byte *buffer_in)
+{
+ serpent_context_t *context = ctx;
+
+ serpent_decrypt_internal (context,
+ (const u32 *) buffer_in,
+ (u32 *) buffer_out);
+ _gcry_burn_stack (2 * sizeof (serpent_block_t));
+}
+
+
+
+/* Serpent test. */
+
+static const char *
+serpent_test (void)
+{
+ serpent_context_t context;
+ unsigned char scratch[16];
+ unsigned int i;
+
+ static struct test
+ {
+ int key_length;
+ unsigned char key[32];
+ unsigned char text_plain[16];
+ unsigned char text_cipher[16];
+ } test_data[] =
+ {
+ {
+ 16,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\xD2\x9D\x57\x6F\xCE\xA3\xA3\xA7\xED\x90\x99\xF2\x92\x73\xD7\x8E",
+ "\xB2\x28\x8B\x96\x8A\xE8\xB0\x86\x48\xD1\xCE\x96\x06\xFD\x99\x2D"
+ },
+ {
+ 24,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\xD2\x9D\x57\x6F\xCE\xAB\xA3\xA7\xED\x98\x99\xF2\x92\x7B\xD7\x8E",
+ "\x13\x0E\x35\x3E\x10\x37\xC2\x24\x05\xE8\xFA\xEF\xB2\xC3\xC3\xE9"
+ },
+ {
+ 32,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\xD0\x95\x57\x6F\xCE\xA3\xE3\xA7\xED\x98\xD9\xF2\x90\x73\xD7\x8E",
+ "\xB9\x0E\xE5\x86\x2D\xE6\x91\x68\xF2\xBD\xD5\x12\x5B\x45\x47\x2B"
+ },
+ {
+ 32,
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00",
+ "\x20\x61\xA4\x27\x82\xBD\x52\xEC\x69\x1E\xC3\x83\xB0\x3B\xA7\x7C"
+ },
+ {
+ 0
+ },
+ };
+
+ for (i = 0; test_data[i].key_length; i++)
+ {
+ serpent_setkey_internal (&context, test_data[i].key,
+ test_data[i].key_length);
+ serpent_encrypt_internal (&context,
+ (const u32 *) test_data[i].text_plain,
+ (u32 *) scratch);
+
+ if (memcmp (scratch, test_data[i].text_cipher, sizeof (serpent_block_t)))
+ switch (test_data[i].key_length)
+ {
+ case 16:
+ return "Serpent-128 test encryption failed.";
+ case 24:
+ return "Serpent-192 test encryption failed.";
+ case 32:
+ return "Serpent-256 test encryption failed.";
+ }
+
+ serpent_decrypt_internal (&context,
+ (const u32 *) test_data[i].text_cipher,
+ (u32 *) scratch);
+ if (memcmp (scratch, test_data[i].text_plain, sizeof (serpent_block_t)))
+ switch (test_data[i].key_length)
+ {
+ case 16:
+ return "Serpent-128 test decryption failed.";
+ case 24:
+ return "Serpent-192 test decryption failed.";
+ case 32:
+ return "Serpent-256 test decryption failed.";
+ }
+ }
+
+ return NULL;
+}
+
+
+
+/* "SERPENT" is an alias for "SERPENT128". */
+static const char *cipher_spec_serpent128_aliases[] =
+ {
+ "SERPENT",
+ NULL
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_serpent128 =
+ {
+ "SERPENT128", cipher_spec_serpent128_aliases, NULL, 16, 128,
+ sizeof (serpent_context_t),
+ serpent_setkey, serpent_encrypt, serpent_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_serpent192 =
+ {
+ "SERPENT192", NULL, NULL, 16, 192,
+ sizeof (serpent_context_t),
+ serpent_setkey, serpent_encrypt, serpent_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_serpent256 =
+ {
+ "SERPENT256", NULL, NULL, 16, 256,
+ sizeof (serpent_context_t),
+ serpent_setkey, serpent_encrypt, serpent_decrypt
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/sha1.c b/grub-core/lib/libgcrypt/cipher/sha1.c
new file mode 100644
index 0000000..8862c64
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/sha1.c
@@ -0,0 +1,479 @@
+/* sha1.c - SHA1 hash function
+ * Copyright (C) 1998, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* Test vectors:
+ *
+ * "abc"
+ * A999 3E36 4706 816A BA3E 2571 7850 C26C 9CD0 D89D
+ *
+ * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ * 8498 3E44 1C3B D26E BAAE 4AA1 F951 29E5 E546 70F1
+ */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#include "g10lib.h"
+#include "memory.h"
+#include "bithelp.h"
+#include "cipher.h"
+#include "hash-common.h"
+
+
+/* A macro to test whether P is properly aligned for an u32 type.
+ Note that config.h provides a suitable replacement for uintptr_t if
+ it does not exist in stdint.h. */
+/* #if __GNUC__ >= 2 */
+/* # define U32_ALIGNED_P(p) (!(((uintptr_t)p) % __alignof__ (u32))) */
+/* #else */
+/* # define U32_ALIGNED_P(p) (!(((uintptr_t)p) % sizeof (u32))) */
+/* #endif */
+
+#define TRANSFORM(x,d,n) transform ((x), (d), (n))
+
+
+typedef struct
+{
+ u32 h0,h1,h2,h3,h4;
+ u32 nblocks;
+ unsigned char buf[64];
+ int count;
+} SHA1_CONTEXT;
+
+
+
+static void
+sha1_init (void *context)
+{
+ SHA1_CONTEXT *hd = context;
+
+ hd->h0 = 0x67452301;
+ hd->h1 = 0xefcdab89;
+ hd->h2 = 0x98badcfe;
+ hd->h3 = 0x10325476;
+ hd->h4 = 0xc3d2e1f0;
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+/* Round function macros. */
+#define K1 0x5A827999L
+#define K2 0x6ED9EBA1L
+#define K3 0x8F1BBCDCL
+#define K4 0xCA62C1D6L
+#define F1(x,y,z) ( z ^ ( x & ( y ^ z ) ) )
+#define F2(x,y,z) ( x ^ y ^ z )
+#define F3(x,y,z) ( ( x & y ) | ( z & ( x | y ) ) )
+#define F4(x,y,z) ( x ^ y ^ z )
+#define M(i) ( tm = x[ i &0x0f] \
+ ^ x[(i-14)&0x0f] \
+ ^ x[(i-8) &0x0f] \
+ ^ x[(i-3) &0x0f], \
+ (x[i&0x0f] = rol(tm, 1)))
+#define R(a,b,c,d,e,f,k,m) do { e += rol( a, 5 ) \
+ + f( b, c, d ) \
+ + k \
+ + m; \
+ b = rol( b, 30 ); \
+ } while(0)
+
+
+/*
+ * Transform NBLOCKS of each 64 bytes (16 32-bit words) at DATA.
+ */
+static void
+transform (SHA1_CONTEXT *hd, const unsigned char *data, size_t nblocks)
+{
+ register u32 a, b, c, d, e; /* Local copies of the chaining variables. */
+ register u32 tm; /* Helper. */
+ u32 x[16]; /* The array we work on. */
+
+ /* Loop over all blocks. */
+ for ( ;nblocks; nblocks--)
+ {
+#ifdef WORDS_BIGENDIAN
+ memcpy (x, data, 64);
+ data += 64;
+#else
+ {
+ int i;
+ unsigned char *p;
+
+ for(i=0, p=(unsigned char*)x; i < 16; i++, p += 4 )
+ {
+ p[3] = *data++;
+ p[2] = *data++;
+ p[1] = *data++;
+ p[0] = *data++;
+ }
+ }
+#endif
+ /* Get the values of the chaining variables. */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+
+ /* Transform. */
+ R( a, b, c, d, e, F1, K1, x[ 0] );
+ R( e, a, b, c, d, F1, K1, x[ 1] );
+ R( d, e, a, b, c, F1, K1, x[ 2] );
+ R( c, d, e, a, b, F1, K1, x[ 3] );
+ R( b, c, d, e, a, F1, K1, x[ 4] );
+ R( a, b, c, d, e, F1, K1, x[ 5] );
+ R( e, a, b, c, d, F1, K1, x[ 6] );
+ R( d, e, a, b, c, F1, K1, x[ 7] );
+ R( c, d, e, a, b, F1, K1, x[ 8] );
+ R( b, c, d, e, a, F1, K1, x[ 9] );
+ R( a, b, c, d, e, F1, K1, x[10] );
+ R( e, a, b, c, d, F1, K1, x[11] );
+ R( d, e, a, b, c, F1, K1, x[12] );
+ R( c, d, e, a, b, F1, K1, x[13] );
+ R( b, c, d, e, a, F1, K1, x[14] );
+ R( a, b, c, d, e, F1, K1, x[15] );
+ R( e, a, b, c, d, F1, K1, M(16) );
+ R( d, e, a, b, c, F1, K1, M(17) );
+ R( c, d, e, a, b, F1, K1, M(18) );
+ R( b, c, d, e, a, F1, K1, M(19) );
+ R( a, b, c, d, e, F2, K2, M(20) );
+ R( e, a, b, c, d, F2, K2, M(21) );
+ R( d, e, a, b, c, F2, K2, M(22) );
+ R( c, d, e, a, b, F2, K2, M(23) );
+ R( b, c, d, e, a, F2, K2, M(24) );
+ R( a, b, c, d, e, F2, K2, M(25) );
+ R( e, a, b, c, d, F2, K2, M(26) );
+ R( d, e, a, b, c, F2, K2, M(27) );
+ R( c, d, e, a, b, F2, K2, M(28) );
+ R( b, c, d, e, a, F2, K2, M(29) );
+ R( a, b, c, d, e, F2, K2, M(30) );
+ R( e, a, b, c, d, F2, K2, M(31) );
+ R( d, e, a, b, c, F2, K2, M(32) );
+ R( c, d, e, a, b, F2, K2, M(33) );
+ R( b, c, d, e, a, F2, K2, M(34) );
+ R( a, b, c, d, e, F2, K2, M(35) );
+ R( e, a, b, c, d, F2, K2, M(36) );
+ R( d, e, a, b, c, F2, K2, M(37) );
+ R( c, d, e, a, b, F2, K2, M(38) );
+ R( b, c, d, e, a, F2, K2, M(39) );
+ R( a, b, c, d, e, F3, K3, M(40) );
+ R( e, a, b, c, d, F3, K3, M(41) );
+ R( d, e, a, b, c, F3, K3, M(42) );
+ R( c, d, e, a, b, F3, K3, M(43) );
+ R( b, c, d, e, a, F3, K3, M(44) );
+ R( a, b, c, d, e, F3, K3, M(45) );
+ R( e, a, b, c, d, F3, K3, M(46) );
+ R( d, e, a, b, c, F3, K3, M(47) );
+ R( c, d, e, a, b, F3, K3, M(48) );
+ R( b, c, d, e, a, F3, K3, M(49) );
+ R( a, b, c, d, e, F3, K3, M(50) );
+ R( e, a, b, c, d, F3, K3, M(51) );
+ R( d, e, a, b, c, F3, K3, M(52) );
+ R( c, d, e, a, b, F3, K3, M(53) );
+ R( b, c, d, e, a, F3, K3, M(54) );
+ R( a, b, c, d, e, F3, K3, M(55) );
+ R( e, a, b, c, d, F3, K3, M(56) );
+ R( d, e, a, b, c, F3, K3, M(57) );
+ R( c, d, e, a, b, F3, K3, M(58) );
+ R( b, c, d, e, a, F3, K3, M(59) );
+ R( a, b, c, d, e, F4, K4, M(60) );
+ R( e, a, b, c, d, F4, K4, M(61) );
+ R( d, e, a, b, c, F4, K4, M(62) );
+ R( c, d, e, a, b, F4, K4, M(63) );
+ R( b, c, d, e, a, F4, K4, M(64) );
+ R( a, b, c, d, e, F4, K4, M(65) );
+ R( e, a, b, c, d, F4, K4, M(66) );
+ R( d, e, a, b, c, F4, K4, M(67) );
+ R( c, d, e, a, b, F4, K4, M(68) );
+ R( b, c, d, e, a, F4, K4, M(69) );
+ R( a, b, c, d, e, F4, K4, M(70) );
+ R( e, a, b, c, d, F4, K4, M(71) );
+ R( d, e, a, b, c, F4, K4, M(72) );
+ R( c, d, e, a, b, F4, K4, M(73) );
+ R( b, c, d, e, a, F4, K4, M(74) );
+ R( a, b, c, d, e, F4, K4, M(75) );
+ R( e, a, b, c, d, F4, K4, M(76) );
+ R( d, e, a, b, c, F4, K4, M(77) );
+ R( c, d, e, a, b, F4, K4, M(78) );
+ R( b, c, d, e, a, F4, K4, M(79) );
+
+ /* Update the chaining variables. */
+ hd->h0 += a;
+ hd->h1 += b;
+ hd->h2 += c;
+ hd->h3 += d;
+ hd->h4 += e;
+ }
+}
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+sha1_write( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ SHA1_CONTEXT *hd = context;
+ size_t nblocks;
+
+ if (hd->count == 64) /* Flush the buffer. */
+ {
+ TRANSFORM( hd, hd->buf, 1 );
+ _gcry_burn_stack (88+4*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if (!inbuf)
+ return;
+
+ if (hd->count)
+ {
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+ sha1_write (hd, NULL, 0);
+ if (!inlen)
+ return;
+ }
+
+ nblocks = inlen / 64;
+ if (nblocks)
+ {
+ TRANSFORM (hd, inbuf, nblocks);
+ hd->count = 0;
+ hd->nblocks += nblocks;
+ inlen -= nblocks * 64;
+ inbuf += nblocks * 64;
+ }
+ _gcry_burn_stack (88+4*sizeof(void*));
+
+ /* Save remaining bytes. */
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+/* The routine final terminates the computation and
+ * returns the digest.
+ * The handle is prepared for a new cycle, but adding bytes to the
+ * handle will the destroy the returned buffer.
+ * Returns: 20 bytes representing the digest.
+ */
+
+static void
+sha1_final(void *context)
+{
+ SHA1_CONTEXT *hd = context;
+
+ u32 t, msb, lsb;
+ unsigned char *p;
+
+ sha1_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ sha1_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = msb >> 24;
+ hd->buf[57] = msb >> 16;
+ hd->buf[58] = msb >> 8;
+ hd->buf[59] = msb ;
+ hd->buf[60] = lsb >> 24;
+ hd->buf[61] = lsb >> 16;
+ hd->buf[62] = lsb >> 8;
+ hd->buf[63] = lsb ;
+ TRANSFORM( hd, hd->buf, 1 );
+ _gcry_burn_stack (88+4*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
+ *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while(0)
+#endif
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+#undef X
+
+}
+
+static unsigned char *
+sha1_read( void *context )
+{
+ SHA1_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+/****************
+ * Shortcut functions which puts the hash value of the supplied buffer
+ * into outbuf which must have a size of 20 bytes.
+ */
+void
+_gcry_sha1_hash_buffer (void *outbuf, const void *buffer, size_t length)
+{
+ SHA1_CONTEXT hd;
+
+ sha1_init (&hd);
+ sha1_write (&hd, buffer, length);
+ sha1_final (&hd);
+ memcpy (outbuf, hd.buf, 20);
+}
+
+
+
+/*
+ Self-test section.
+ */
+
+
+static gpg_err_code_t
+selftests_sha1 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ what = "short string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA1, 0,
+ "abc", 3,
+ "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E"
+ "\x25\x71\x78\x50\xC2\x6C\x9C\xD0\xD8\x9D", 20);
+ if (errtxt)
+ goto failed;
+
+ if (extended)
+ {
+ what = "long string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA1, 0,
+ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 56,
+ "\x84\x98\x3E\x44\x1C\x3B\xD2\x6E\xBA\xAE"
+ "\x4A\xA1\xF9\x51\x29\xE5\xE5\x46\x70\xF1", 20);
+ if (errtxt)
+ goto failed;
+
+ what = "one million \"a\"";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA1, 1,
+ NULL, 0,
+ "\x34\xAA\x97\x3C\xD4\xC4\xDA\xA4\xF6\x1E"
+ "\xEB\x2B\xDB\xAD\x27\x31\x65\x34\x01\x6F", 20);
+ if (errtxt)
+ goto failed;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("digest", GCRY_MD_SHA1, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ switch (algo)
+ {
+ case GCRY_MD_SHA1:
+ ec = selftests_sha1 (extended, report);
+ break;
+ default:
+ ec = GPG_ERR_DIGEST_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+
+static unsigned char asn[15] = /* Object ID is 1.3.14.3.2.26 */
+ { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03,
+ 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 };
+
+static gcry_md_oid_spec_t oid_spec_sha1[] =
+ {
+ /* iso.member-body.us.rsadsi.pkcs.pkcs-1.5 (sha1WithRSAEncryption) */
+ { "1.2.840.113549.1.1.5" },
+ /* iso.member-body.us.x9-57.x9cm.3 (dsaWithSha1)*/
+ { "1.2.840.10040.4.3" },
+ /* from NIST's OIW (sha1) */
+ { "1.3.14.3.2.26" },
+ /* from NIST OIW (sha-1WithRSAEncryption) */
+ { "1.3.14.3.2.29" },
+ /* iso.member-body.us.ansi-x9-62.signatures.ecdsa-with-sha1 */
+ { "1.2.840.10045.4.1" },
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha1 =
+ {
+ "SHA1", asn, DIM (asn), oid_spec_sha1, 20,
+ sha1_init, sha1_write, sha1_final, sha1_read,
+ sizeof (SHA1_CONTEXT)
+ };
+md_extra_spec_t _gcry_digest_extraspec_sha1 =
+ {
+ run_selftests
+ };
+
diff --git a/grub-core/lib/libgcrypt/cipher/sha256.c b/grub-core/lib/libgcrypt/cipher/sha256.c
new file mode 100644
index 0000000..5d61d2f
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/sha256.c
@@ -0,0 +1,487 @@
+/* sha256.c - SHA256 hash function
+ * Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* Test vectors:
+
+ "abc"
+ SHA224: 23097d22 3405d822 8642a477 bda255b3 2aadbce4 bda0b3f7 e36c9da7
+ SHA256: ba7816bf 8f01cfea 414140de 5dae2223 b00361a3 96177a9c b410ff61 f20015ad
+
+ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ SHA224: 75388b16 512776cc 5dba5da1 fd890150 b0c6455c b4f58b19 52522525
+ SHA256: 248d6a61 d20638b8 e5c02693 0c3e6039 a33ce459 64ff2167 f6ecedd4 19db06c1
+
+ "a" one million times
+ SHA224: 20794655 980c91d8 bbb4c1ea 97618a4b f03f4258 1948b2ee 4ee7ad67
+ SHA256: cdc76e5c 9914fb92 81a1c7e2 84d73e67 f1809a48 a497200e 046d39cc c7112cd0
+
+ */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "memory.h"
+#include "bithelp.h"
+#include "cipher.h"
+#include "hash-common.h"
+
+typedef struct {
+ u32 h0,h1,h2,h3,h4,h5,h6,h7;
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} SHA256_CONTEXT;
+
+
+static void
+sha256_init (void *context)
+{
+ SHA256_CONTEXT *hd = context;
+
+ hd->h0 = 0x6a09e667;
+ hd->h1 = 0xbb67ae85;
+ hd->h2 = 0x3c6ef372;
+ hd->h3 = 0xa54ff53a;
+ hd->h4 = 0x510e527f;
+ hd->h5 = 0x9b05688c;
+ hd->h6 = 0x1f83d9ab;
+ hd->h7 = 0x5be0cd19;
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+static void
+sha224_init (void *context)
+{
+ SHA256_CONTEXT *hd = context;
+
+ hd->h0 = 0xc1059ed8;
+ hd->h1 = 0x367cd507;
+ hd->h2 = 0x3070dd17;
+ hd->h3 = 0xf70e5939;
+ hd->h4 = 0xffc00b31;
+ hd->h5 = 0x68581511;
+ hd->h6 = 0x64f98fa7;
+ hd->h7 = 0xbefa4fa4;
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+/*
+ Transform the message X which consists of 16 32-bit-words. See FIPS
+ 180-2 for details. */
+#define Cho(x,y,z) (z ^ (x & (y ^ z))) /* (4.2) same as SHA-1's F1 */
+#define Maj(x,y,z) ((x & y) | (z & (x|y))) /* (4.3) same as SHA-1's F3 */
+#define Sum0(x) (ror ((x), 2) ^ ror ((x), 13) ^ ror ((x), 22)) /* (4.4) */
+#define Sum1(x) (ror ((x), 6) ^ ror ((x), 11) ^ ror ((x), 25)) /* (4.5) */
+#define S0(x) (ror ((x), 7) ^ ror ((x), 18) ^ ((x) >> 3)) /* (4.6) */
+#define S1(x) (ror ((x), 17) ^ ror ((x), 19) ^ ((x) >> 10)) /* (4.7) */
+#define R(a,b,c,d,e,f,g,h,k,w) do \
+ { \
+ t1 = (h) + Sum1((e)) + Cho((e),(f),(g)) + (k) + (w); \
+ t2 = Sum0((a)) + Maj((a),(b),(c)); \
+ h = g; \
+ g = f; \
+ f = e; \
+ e = d + t1; \
+ d = c; \
+ c = b; \
+ b = a; \
+ a = t1 + t2; \
+ } while (0)
+
+static void
+transform (SHA256_CONTEXT *hd, const unsigned char *data)
+{
+ static const u32 K[64] = {
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+ 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+ 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+ 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+ 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+ 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+ 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+ 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+ 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+ 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+ };
+
+ u32 a,b,c,d,e,f,g,h,t1,t2;
+ u32 x[16];
+ u32 w[64];
+ int i;
+
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ f = hd->h5;
+ g = hd->h6;
+ h = hd->h7;
+
+#ifdef WORDS_BIGENDIAN
+ memcpy (x, data, 64);
+#else
+ {
+ byte *p2;
+
+ for (i=0, p2=(byte*)x; i < 16; i++, p2 += 4 )
+ {
+ p2[3] = *data++;
+ p2[2] = *data++;
+ p2[1] = *data++;
+ p2[0] = *data++;
+ }
+ }
+#endif
+
+ for (i=0; i < 16; i++)
+ w[i] = x[i];
+ for (; i < 64; i++)
+ w[i] = S1(w[i-2]) + w[i-7] + S0(w[i-15]) + w[i-16];
+
+ for (i=0; i < 64; i++)
+ R(a,b,c,d,e,f,g,h,K[i],w[i]);
+
+ hd->h0 += a;
+ hd->h1 += b;
+ hd->h2 += c;
+ hd->h3 += d;
+ hd->h4 += e;
+ hd->h5 += f;
+ hd->h6 += g;
+ hd->h7 += h;
+}
+#undef Cho
+#undef Maj
+#undef Sum0
+#undef Sum1
+#undef S0
+#undef S1
+#undef R
+
+
+/* Update the message digest with the contents of INBUF with length
+ INLEN. */
+static void
+sha256_write (void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ SHA256_CONTEXT *hd = context;
+
+ if (hd->count == 64)
+ { /* flush the buffer */
+ transform (hd, hd->buf);
+ _gcry_burn_stack (74*4+32);
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if (!inbuf)
+ return;
+ if (hd->count)
+ {
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+ sha256_write (hd, NULL, 0);
+ if (!inlen)
+ return;
+ }
+
+ while (inlen >= 64)
+ {
+ transform (hd, inbuf);
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ _gcry_burn_stack (74*4+32);
+ for (; inlen && hd->count < 64; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+/*
+ The routine finally terminates the computation and returns the
+ digest. The handle is prepared for a new cycle, but adding bytes
+ to the handle will the destroy the returned buffer. Returns: 32
+ bytes with the message the digest. */
+static void
+sha256_final(void *context)
+{
+ SHA256_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ sha256_write (hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if ((lsb += hd->count) < t)
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if (hd->count < 56)
+ { /* enough room */
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while (hd->count < 56)
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else
+ { /* need one extra block */
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while (hd->count < 64)
+ hd->buf[hd->count++] = 0;
+ sha256_write (hd, NULL, 0); /* flush */;
+ memset (hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = msb >> 24;
+ hd->buf[57] = msb >> 16;
+ hd->buf[58] = msb >> 8;
+ hd->buf[59] = msb;
+ hd->buf[60] = lsb >> 24;
+ hd->buf[61] = lsb >> 16;
+ hd->buf[62] = lsb >> 8;
+ hd->buf[63] = lsb;
+ transform (hd, hd->buf);
+ _gcry_burn_stack (74*4+32);
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
+ *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while(0)
+#endif
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+ X(5);
+ X(6);
+ X(7);
+#undef X
+}
+
+static byte *
+sha256_read (void *context)
+{
+ SHA256_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+
+
+/*
+ Self-test section.
+ */
+
+
+static gpg_err_code_t
+selftests_sha224 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ what = "short string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA224, 0,
+ "abc", 3,
+ "\x23\x09\x7d\x22\x34\x05\xd8\x22\x86\x42\xa4\x77\xbd\xa2\x55\xb3"
+ "\x2a\xad\xbc\xe4\xbd\xa0\xb3\xf7\xe3\x6c\x9d\xa7", 28);
+ if (errtxt)
+ goto failed;
+
+ if (extended)
+ {
+ what = "long string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA224, 0,
+ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 56,
+ "\x75\x38\x8b\x16\x51\x27\x76\xcc\x5d\xba\x5d\xa1\xfd\x89\x01\x50"
+ "\xb0\xc6\x45\x5c\xb4\xf5\x8b\x19\x52\x52\x25\x25", 28);
+ if (errtxt)
+ goto failed;
+
+ what = "one million \"a\"";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA224, 1,
+ NULL, 0,
+ "\x20\x79\x46\x55\x98\x0c\x91\xd8\xbb\xb4\xc1\xea\x97\x61\x8a\x4b"
+ "\xf0\x3f\x42\x58\x19\x48\xb2\xee\x4e\xe7\xad\x67", 28);
+ if (errtxt)
+ goto failed;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("digest", GCRY_MD_SHA224, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+static gpg_err_code_t
+selftests_sha256 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ what = "short string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA256, 0,
+ "abc", 3,
+ "\xba\x78\x16\xbf\x8f\x01\xcf\xea\x41\x41\x40\xde\x5d\xae\x22\x23"
+ "\xb0\x03\x61\xa3\x96\x17\x7a\x9c\xb4\x10\xff\x61\xf2\x00\x15\xad", 32);
+ if (errtxt)
+ goto failed;
+
+ if (extended)
+ {
+ what = "long string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA256, 0,
+ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 56,
+ "\x24\x8d\x6a\x61\xd2\x06\x38\xb8\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
+ "\xa3\x3c\xe4\x59\x64\xff\x21\x67\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
+ 32);
+ if (errtxt)
+ goto failed;
+
+ what = "one million \"a\"";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA256, 1,
+ NULL, 0,
+ "\xcd\xc7\x6e\x5c\x99\x14\xfb\x92\x81\xa1\xc7\xe2\x84\xd7\x3e\x67"
+ "\xf1\x80\x9a\x48\xa4\x97\x20\x0e\x04\x6d\x39\xcc\xc7\x11\x2c\xd0",
+ 32);
+ if (errtxt)
+ goto failed;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("digest", GCRY_MD_SHA256, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ switch (algo)
+ {
+ case GCRY_MD_SHA224:
+ ec = selftests_sha224 (extended, report);
+ break;
+ case GCRY_MD_SHA256:
+ ec = selftests_sha256 (extended, report);
+ break;
+ default:
+ ec = GPG_ERR_DIGEST_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+
+static byte asn224[19] = /* Object ID is 2.16.840.1.101.3.4.2.4 */
+ { 0x30, 0x2D, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48,
+ 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, 0x05, 0x00, 0x04,
+ 0x1C
+ };
+
+static gcry_md_oid_spec_t oid_spec_sha224[] =
+ {
+ /* From RFC3874, Section 4 */
+ { "2.16.840.1.101.3.4.2.4" },
+ { NULL },
+ };
+
+static byte asn256[19] = /* Object ID is 2.16.840.1.101.3.4.2.1 */
+ { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05,
+ 0x00, 0x04, 0x20 };
+
+static gcry_md_oid_spec_t oid_spec_sha256[] =
+ {
+ /* According to the OpenPGP draft rfc2440-bis06 */
+ { "2.16.840.1.101.3.4.2.1" },
+ /* PKCS#1 sha256WithRSAEncryption */
+ { "1.2.840.113549.1.1.11" },
+
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha224 =
+ {
+ "SHA224", asn224, DIM (asn224), oid_spec_sha224, 28,
+ sha224_init, sha256_write, sha256_final, sha256_read,
+ sizeof (SHA256_CONTEXT)
+ };
+md_extra_spec_t _gcry_digest_extraspec_sha224 =
+ {
+ run_selftests
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha256 =
+ {
+ "SHA256", asn256, DIM (asn256), oid_spec_sha256, 32,
+ sha256_init, sha256_write, sha256_final, sha256_read,
+ sizeof (SHA256_CONTEXT)
+ };
+md_extra_spec_t _gcry_digest_extraspec_sha256 =
+ {
+ run_selftests
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/sha512.c b/grub-core/lib/libgcrypt/cipher/sha512.c
new file mode 100644
index 0000000..bbbd4c5
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/sha512.c
@@ -0,0 +1,553 @@
+/* sha512.c - SHA384 and SHA512 hash functions
+ * Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser general Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* Test vectors from FIPS-180-2:
+ *
+ * "abc"
+ * 384:
+ * CB00753F 45A35E8B B5A03D69 9AC65007 272C32AB 0EDED163
+ * 1A8B605A 43FF5BED 8086072B A1E7CC23 58BAECA1 34C825A7
+ * 512:
+ * DDAF35A1 93617ABA CC417349 AE204131 12E6FA4E 89A97EA2 0A9EEEE6 4B55D39A
+ * 2192992A 274FC1A8 36BA3C23 A3FEEBBD 454D4423 643CE80E 2A9AC94F A54CA49F
+ *
+ * "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"
+ * 384:
+ * 09330C33 F71147E8 3D192FC7 82CD1B47 53111B17 3B3B05D2
+ * 2FA08086 E3B0F712 FCC7C71A 557E2DB9 66C3E9FA 91746039
+ * 512:
+ * 8E959B75 DAE313DA 8CF4F728 14FC143F 8F7779C6 EB9F7FA1 7299AEAD B6889018
+ * 501D289E 4900F7E4 331B99DE C4B5433A C7D329EE B6DD2654 5E96E55B 874BE909
+ *
+ * "a" x 1000000
+ * 384:
+ * 9D0E1809 716474CB 086E834E 310A4A1C ED149E9C 00F24852
+ * 7972CEC5 704C2A5B 07B8B3DC 38ECC4EB AE97DDD8 7F3D8985
+ * 512:
+ * E718483D 0CE76964 4E2E42C7 BC15B463 8E1F98B1 3B204428 5632A803 AFA973EB
+ * DE0FF244 877EA60A 4CB0432C E577C31B EB009C5C 2C49AA2E 4EADB217 AD8CC09B
+ */
+
+
+#include <config.h>
+#include <string.h>
+#include "g10lib.h"
+#include "bithelp.h"
+#include "cipher.h"
+#include "hash-common.h"
+
+typedef struct
+{
+ u64 h0, h1, h2, h3, h4, h5, h6, h7;
+ u64 nblocks;
+ byte buf[128];
+ int count;
+} SHA512_CONTEXT;
+
+static void
+sha512_init (void *context)
+{
+ SHA512_CONTEXT *hd = context;
+
+ hd->h0 = U64_C(0x6a09e667f3bcc908);
+ hd->h1 = U64_C(0xbb67ae8584caa73b);
+ hd->h2 = U64_C(0x3c6ef372fe94f82b);
+ hd->h3 = U64_C(0xa54ff53a5f1d36f1);
+ hd->h4 = U64_C(0x510e527fade682d1);
+ hd->h5 = U64_C(0x9b05688c2b3e6c1f);
+ hd->h6 = U64_C(0x1f83d9abfb41bd6b);
+ hd->h7 = U64_C(0x5be0cd19137e2179);
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+static void
+sha384_init (void *context)
+{
+ SHA512_CONTEXT *hd = context;
+
+ hd->h0 = U64_C(0xcbbb9d5dc1059ed8);
+ hd->h1 = U64_C(0x629a292a367cd507);
+ hd->h2 = U64_C(0x9159015a3070dd17);
+ hd->h3 = U64_C(0x152fecd8f70e5939);
+ hd->h4 = U64_C(0x67332667ffc00b31);
+ hd->h5 = U64_C(0x8eb44a8768581511);
+ hd->h6 = U64_C(0xdb0c2e0d64f98fa7);
+ hd->h7 = U64_C(0x47b5481dbefa4fa4);
+
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+/****************
+ * Transform the message W which consists of 16 64-bit-words
+ */
+static void
+transform (SHA512_CONTEXT *hd, const unsigned char *data)
+{
+ u64 a, b, c, d, e, f, g, h;
+ u64 w[80];
+ int t;
+ static const u64 k[] =
+ {
+ U64_C(0x428a2f98d728ae22), U64_C(0x7137449123ef65cd),
+ U64_C(0xb5c0fbcfec4d3b2f), U64_C(0xe9b5dba58189dbbc),
+ U64_C(0x3956c25bf348b538), U64_C(0x59f111f1b605d019),
+ U64_C(0x923f82a4af194f9b), U64_C(0xab1c5ed5da6d8118),
+ U64_C(0xd807aa98a3030242), U64_C(0x12835b0145706fbe),
+ U64_C(0x243185be4ee4b28c), U64_C(0x550c7dc3d5ffb4e2),
+ U64_C(0x72be5d74f27b896f), U64_C(0x80deb1fe3b1696b1),
+ U64_C(0x9bdc06a725c71235), U64_C(0xc19bf174cf692694),
+ U64_C(0xe49b69c19ef14ad2), U64_C(0xefbe4786384f25e3),
+ U64_C(0x0fc19dc68b8cd5b5), U64_C(0x240ca1cc77ac9c65),
+ U64_C(0x2de92c6f592b0275), U64_C(0x4a7484aa6ea6e483),
+ U64_C(0x5cb0a9dcbd41fbd4), U64_C(0x76f988da831153b5),
+ U64_C(0x983e5152ee66dfab), U64_C(0xa831c66d2db43210),
+ U64_C(0xb00327c898fb213f), U64_C(0xbf597fc7beef0ee4),
+ U64_C(0xc6e00bf33da88fc2), U64_C(0xd5a79147930aa725),
+ U64_C(0x06ca6351e003826f), U64_C(0x142929670a0e6e70),
+ U64_C(0x27b70a8546d22ffc), U64_C(0x2e1b21385c26c926),
+ U64_C(0x4d2c6dfc5ac42aed), U64_C(0x53380d139d95b3df),
+ U64_C(0x650a73548baf63de), U64_C(0x766a0abb3c77b2a8),
+ U64_C(0x81c2c92e47edaee6), U64_C(0x92722c851482353b),
+ U64_C(0xa2bfe8a14cf10364), U64_C(0xa81a664bbc423001),
+ U64_C(0xc24b8b70d0f89791), U64_C(0xc76c51a30654be30),
+ U64_C(0xd192e819d6ef5218), U64_C(0xd69906245565a910),
+ U64_C(0xf40e35855771202a), U64_C(0x106aa07032bbd1b8),
+ U64_C(0x19a4c116b8d2d0c8), U64_C(0x1e376c085141ab53),
+ U64_C(0x2748774cdf8eeb99), U64_C(0x34b0bcb5e19b48a8),
+ U64_C(0x391c0cb3c5c95a63), U64_C(0x4ed8aa4ae3418acb),
+ U64_C(0x5b9cca4f7763e373), U64_C(0x682e6ff3d6b2b8a3),
+ U64_C(0x748f82ee5defb2fc), U64_C(0x78a5636f43172f60),
+ U64_C(0x84c87814a1f0ab72), U64_C(0x8cc702081a6439ec),
+ U64_C(0x90befffa23631e28), U64_C(0xa4506cebde82bde9),
+ U64_C(0xbef9a3f7b2c67915), U64_C(0xc67178f2e372532b),
+ U64_C(0xca273eceea26619c), U64_C(0xd186b8c721c0c207),
+ U64_C(0xeada7dd6cde0eb1e), U64_C(0xf57d4f7fee6ed178),
+ U64_C(0x06f067aa72176fba), U64_C(0x0a637dc5a2c898a6),
+ U64_C(0x113f9804bef90dae), U64_C(0x1b710b35131c471b),
+ U64_C(0x28db77f523047d84), U64_C(0x32caab7b40c72493),
+ U64_C(0x3c9ebe0a15c9bebc), U64_C(0x431d67c49c100d4c),
+ U64_C(0x4cc5d4becb3e42b6), U64_C(0x597f299cfc657e2a),
+ U64_C(0x5fcb6fab3ad6faec), U64_C(0x6c44198c4a475817)
+ };
+
+ /* get values from the chaining vars */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ f = hd->h5;
+ g = hd->h6;
+ h = hd->h7;
+
+#ifdef WORDS_BIGENDIAN
+ memcpy (w, data, 128);
+#else
+ {
+ int i;
+ byte *p2;
+
+ for (i = 0, p2 = (byte *) w; i < 16; i++, p2 += 8)
+ {
+ p2[7] = *data++;
+ p2[6] = *data++;
+ p2[5] = *data++;
+ p2[4] = *data++;
+ p2[3] = *data++;
+ p2[2] = *data++;
+ p2[1] = *data++;
+ p2[0] = *data++;
+ }
+ }
+#endif
+
+#define ROTR(x,n) (((x)>>(n)) | ((x)<<(64-(n))))
+#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
+#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
+#define Sum0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
+#define Sum1(x) (ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41))
+#define S0(x) (ROTR((x),1) ^ ROTR((x),8) ^ ((x)>>7))
+#define S1(x) (ROTR((x),19) ^ ROTR((x),61) ^ ((x)>>6))
+
+ for (t = 16; t < 80; t++)
+ w[t] = S1 (w[t - 2]) + w[t - 7] + S0 (w[t - 15]) + w[t - 16];
+
+ for (t = 0; t < 80; t++)
+ {
+ u64 t1, t2;
+
+ t1 = h + Sum1 (e) + Ch (e, f, g) + k[t] + w[t];
+ t2 = Sum0 (a) + Maj (a, b, c);
+ h = g;
+ g = f;
+ f = e;
+ e = d + t1;
+ d = c;
+ c = b;
+ b = a;
+ a = t1 + t2;
+
+ /* printf("t=%d a=%016llX b=%016llX c=%016llX d=%016llX "
+ "e=%016llX f=%016llX g=%016llX h=%016llX\n",t,a,b,c,d,e,f,g,h); */
+ }
+
+ /* update chaining vars */
+ hd->h0 += a;
+ hd->h1 += b;
+ hd->h2 += c;
+ hd->h3 += d;
+ hd->h4 += e;
+ hd->h5 += f;
+ hd->h6 += g;
+ hd->h7 += h;
+}
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+sha512_write (void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ SHA512_CONTEXT *hd = context;
+
+ if (hd->count == 128)
+ { /* flush the buffer */
+ transform (hd, hd->buf);
+ _gcry_burn_stack (768);
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if (!inbuf)
+ return;
+ if (hd->count)
+ {
+ for (; inlen && hd->count < 128; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+ sha512_write (context, NULL, 0);
+ if (!inlen)
+ return;
+ }
+
+ while (inlen >= 128)
+ {
+ transform (hd, inbuf);
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 128;
+ inbuf += 128;
+ }
+ _gcry_burn_stack (768);
+ for (; inlen && hd->count < 128; inlen--)
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+/* The routine final terminates the computation and
+ * returns the digest.
+ * The handle is prepared for a new cycle, but adding bytes to the
+ * handle will the destroy the returned buffer.
+ * Returns: 64 bytes representing the digest. When used for sha384,
+ * we take the leftmost 48 of those bytes.
+ */
+
+static void
+sha512_final (void *context)
+{
+ SHA512_CONTEXT *hd = context;
+ u64 t, msb, lsb;
+ byte *p;
+
+ sha512_write (context, NULL, 0); /* flush */ ;
+
+ t = hd->nblocks;
+ /* multiply by 128 to make a byte count */
+ lsb = t << 7;
+ msb = t >> 57;
+ /* add the count */
+ t = lsb;
+ if ((lsb += hd->count) < t)
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 61;
+
+ if (hd->count < 112)
+ { /* enough room */
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while (hd->count < 112)
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else
+ { /* need one extra block */
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while (hd->count < 128)
+ hd->buf[hd->count++] = 0;
+ sha512_write (context, NULL, 0); /* flush */ ;
+ memset (hd->buf, 0, 112); /* fill next block with zeroes */
+ }
+ /* append the 128 bit count */
+ hd->buf[112] = msb >> 56;
+ hd->buf[113] = msb >> 48;
+ hd->buf[114] = msb >> 40;
+ hd->buf[115] = msb >> 32;
+ hd->buf[116] = msb >> 24;
+ hd->buf[117] = msb >> 16;
+ hd->buf[118] = msb >> 8;
+ hd->buf[119] = msb;
+
+ hd->buf[120] = lsb >> 56;
+ hd->buf[121] = lsb >> 48;
+ hd->buf[122] = lsb >> 40;
+ hd->buf[123] = lsb >> 32;
+ hd->buf[124] = lsb >> 24;
+ hd->buf[125] = lsb >> 16;
+ hd->buf[126] = lsb >> 8;
+ hd->buf[127] = lsb;
+ transform (hd, hd->buf);
+ _gcry_burn_stack (768);
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u64*)p = hd->h##a ; p += 8; } while (0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->h##a >> 56; *p++ = hd->h##a >> 48; \
+ *p++ = hd->h##a >> 40; *p++ = hd->h##a >> 32; \
+ *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
+ *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while (0)
+#endif
+ X (0);
+ X (1);
+ X (2);
+ X (3);
+ X (4);
+ X (5);
+ /* Note that these last two chunks are included even for SHA384.
+ We just ignore them. */
+ X (6);
+ X (7);
+#undef X
+}
+
+static byte *
+sha512_read (void *context)
+{
+ SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context;
+ return hd->buf;
+}
+
+
+
+/*
+ Self-test section.
+ */
+
+
+static gpg_err_code_t
+selftests_sha384 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ what = "short string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA384, 0,
+ "abc", 3,
+ "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
+ "\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
+ "\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34\xc8\x25\xa7", 48);
+ if (errtxt)
+ goto failed;
+
+ if (extended)
+ {
+ what = "long string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA384, 0,
+ "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
+ "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", 112,
+ "\x09\x33\x0C\x33\xF7\x11\x47\xE8\x3D\x19\x2F\xC7\x82\xCD\x1B\x47"
+ "\x53\x11\x1B\x17\x3B\x3B\x05\xD2\x2F\xA0\x80\x86\xE3\xB0\xF7\x12"
+ "\xFC\xC7\xC7\x1A\x55\x7E\x2D\xB9\x66\xC3\xE9\xFA\x91\x74\x60\x39",
+ 48);
+ if (errtxt)
+ goto failed;
+
+ what = "one million \"a\"";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA384, 1,
+ NULL, 0,
+ "\x9D\x0E\x18\x09\x71\x64\x74\xCB\x08\x6E\x83\x4E\x31\x0A\x4A\x1C"
+ "\xED\x14\x9E\x9C\x00\xF2\x48\x52\x79\x72\xCE\xC5\x70\x4C\x2A\x5B"
+ "\x07\xB8\xB3\xDC\x38\xEC\xC4\xEB\xAE\x97\xDD\xD8\x7F\x3D\x89\x85",
+ 48);
+ if (errtxt)
+ goto failed;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("digest", GCRY_MD_SHA384, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+static gpg_err_code_t
+selftests_sha512 (int extended, selftest_report_func_t report)
+{
+ const char *what;
+ const char *errtxt;
+
+ what = "short string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA512, 0,
+ "abc", 3,
+ "\xDD\xAF\x35\xA1\x93\x61\x7A\xBA\xCC\x41\x73\x49\xAE\x20\x41\x31"
+ "\x12\xE6\xFA\x4E\x89\xA9\x7E\xA2\x0A\x9E\xEE\xE6\x4B\x55\xD3\x9A"
+ "\x21\x92\x99\x2A\x27\x4F\xC1\xA8\x36\xBA\x3C\x23\xA3\xFE\xEB\xBD"
+ "\x45\x4D\x44\x23\x64\x3C\xE8\x0E\x2A\x9A\xC9\x4F\xA5\x4C\xA4\x9F", 64);
+ if (errtxt)
+ goto failed;
+
+ if (extended)
+ {
+ what = "long string";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA512, 0,
+ "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
+ "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", 112,
+ "\x8E\x95\x9B\x75\xDA\xE3\x13\xDA\x8C\xF4\xF7\x28\x14\xFC\x14\x3F"
+ "\x8F\x77\x79\xC6\xEB\x9F\x7F\xA1\x72\x99\xAE\xAD\xB6\x88\x90\x18"
+ "\x50\x1D\x28\x9E\x49\x00\xF7\xE4\x33\x1B\x99\xDE\xC4\xB5\x43\x3A"
+ "\xC7\xD3\x29\xEE\xB6\xDD\x26\x54\x5E\x96\xE5\x5B\x87\x4B\xE9\x09",
+ 64);
+ if (errtxt)
+ goto failed;
+
+ what = "one million \"a\"";
+ errtxt = _gcry_hash_selftest_check_one
+ (GCRY_MD_SHA512, 1,
+ NULL, 0,
+ "\xE7\x18\x48\x3D\x0C\xE7\x69\x64\x4E\x2E\x42\xC7\xBC\x15\xB4\x63"
+ "\x8E\x1F\x98\xB1\x3B\x20\x44\x28\x56\x32\xA8\x03\xAF\xA9\x73\xEB"
+ "\xDE\x0F\xF2\x44\x87\x7E\xA6\x0A\x4C\xB0\x43\x2C\xE5\x77\xC3\x1B"
+ "\xEB\x00\x9C\x5C\x2C\x49\xAA\x2E\x4E\xAD\xB2\x17\xAD\x8C\xC0\x9B",
+ 64);
+ if (errtxt)
+ goto failed;
+ }
+
+ return 0; /* Succeeded. */
+
+ failed:
+ if (report)
+ report ("digest", GCRY_MD_SHA512, what, errtxt);
+ return GPG_ERR_SELFTEST_FAILED;
+}
+
+
+/* Run a full self-test for ALGO and return 0 on success. */
+static gpg_err_code_t
+run_selftests (int algo, int extended, selftest_report_func_t report)
+{
+ gpg_err_code_t ec;
+
+ switch (algo)
+ {
+ case GCRY_MD_SHA384:
+ ec = selftests_sha384 (extended, report);
+ break;
+ case GCRY_MD_SHA512:
+ ec = selftests_sha512 (extended, report);
+ break;
+ default:
+ ec = GPG_ERR_DIGEST_ALGO;
+ break;
+
+ }
+ return ec;
+}
+
+
+
+
+static byte sha512_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.3 */
+ {
+ 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05,
+ 0x00, 0x04, 0x40
+ };
+
+static gcry_md_oid_spec_t oid_spec_sha512[] =
+ {
+ { "2.16.840.1.101.3.4.2.3" },
+
+ /* PKCS#1 sha512WithRSAEncryption */
+ { "1.2.840.113549.1.1.13" },
+
+ { NULL }
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha512 =
+ {
+ "SHA512", sha512_asn, DIM (sha512_asn), oid_spec_sha512, 64,
+ sha512_init, sha512_write, sha512_final, sha512_read,
+ sizeof (SHA512_CONTEXT),
+ };
+md_extra_spec_t _gcry_digest_extraspec_sha512 =
+ {
+ run_selftests
+ };
+
+static byte sha384_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.2 */
+ {
+ 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05,
+ 0x00, 0x04, 0x30
+ };
+
+static gcry_md_oid_spec_t oid_spec_sha384[] =
+ {
+ { "2.16.840.1.101.3.4.2.2" },
+
+ /* PKCS#1 sha384WithRSAEncryption */
+ { "1.2.840.113549.1.1.12" },
+
+ { NULL },
+ };
+
+gcry_md_spec_t _gcry_digest_spec_sha384 =
+ {
+ "SHA384", sha384_asn, DIM (sha384_asn), oid_spec_sha384, 48,
+ sha384_init, sha512_write, sha512_final, sha512_read,
+ sizeof (SHA512_CONTEXT),
+ };
+md_extra_spec_t _gcry_digest_extraspec_sha384 =
+ {
+ run_selftests
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/tiger.c b/grub-core/lib/libgcrypt/cipher/tiger.c
new file mode 100644
index 0000000..a620045
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/tiger.c
@@ -0,0 +1,851 @@
+/* tiger.c - The TIGER hash function
+ * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#ifdef HAVE_U64_TYPEDEF
+
+/* we really need it here, but as this is only experiment we
+ * can live without Tiger */
+
+typedef struct {
+ u64 a, b, c;
+ byte buf[64];
+ int count;
+ u32 nblocks;
+} TIGER_CONTEXT;
+
+
+/*********************************
+ * Okay, okay, this is not the fastest code - improvements are welcome.
+ *
+ */
+
+/* Some test vectors:
+ * "" 24F0130C63AC9332 16166E76B1BB925F F373DE2D49584E7A
+ * "abc" F258C1E88414AB2A 527AB541FFC5B8BF 935F7B951C132951
+ * "Tiger" 9F00F599072300DD 276ABB38C8EB6DEC 37790C116F9D2BDF
+ * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"
+ * 87FB2A9083851CF7 470D2CF810E6DF9E B586445034A5A386
+ * "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789"
+ * 467DB80863EBCE48 8DF1CD1261655DE9 57896565975F9197
+ * "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham"
+ * 0C410A042968868A 1671DA5A3FD29A72 5EC1E457D3CDB303
+ * "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham, proc"
+ * "eedings of Fast Software Encryption 3, Cambridge."
+ * EBF591D5AFA655CE 7F22894FF87F54AC 89C811B6B0DA3193
+ * "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham, proc"
+ * "eedings of Fast Software Encryption 3, Cambridge, 1996."
+ * 3D9AEB03D1BD1A63 57B2774DFD6D5B24 DD68151D503974FC
+ * "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-ABCDEF"
+ * "GHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"
+ * 00B83EB4E53440C5 76AC6AAEE0A74858 25FD15E70A59FFE4
+ */
+
+static u64 sbox1[256] = {
+ U64_C(0x02aab17cf7e90c5e) /* 0 */, U64_C(0xac424b03e243a8ec) /* 1 */,
+ U64_C(0x72cd5be30dd5fcd3) /* 2 */, U64_C(0x6d019b93f6f97f3a) /* 3 */,
+ U64_C(0xcd9978ffd21f9193) /* 4 */, U64_C(0x7573a1c9708029e2) /* 5 */,
+ U64_C(0xb164326b922a83c3) /* 6 */, U64_C(0x46883eee04915870) /* 7 */,
+ U64_C(0xeaace3057103ece6) /* 8 */, U64_C(0xc54169b808a3535c) /* 9 */,
+ U64_C(0x4ce754918ddec47c) /* 10 */, U64_C(0x0aa2f4dfdc0df40c) /* 11 */,
+ U64_C(0x10b76f18a74dbefa) /* 12 */, U64_C(0xc6ccb6235ad1ab6a) /* 13 */,
+ U64_C(0x13726121572fe2ff) /* 14 */, U64_C(0x1a488c6f199d921e) /* 15 */,
+ U64_C(0x4bc9f9f4da0007ca) /* 16 */, U64_C(0x26f5e6f6e85241c7) /* 17 */,
+ U64_C(0x859079dbea5947b6) /* 18 */, U64_C(0x4f1885c5c99e8c92) /* 19 */,
+ U64_C(0xd78e761ea96f864b) /* 20 */, U64_C(0x8e36428c52b5c17d) /* 21 */,
+ U64_C(0x69cf6827373063c1) /* 22 */, U64_C(0xb607c93d9bb4c56e) /* 23 */,
+ U64_C(0x7d820e760e76b5ea) /* 24 */, U64_C(0x645c9cc6f07fdc42) /* 25 */,
+ U64_C(0xbf38a078243342e0) /* 26 */, U64_C(0x5f6b343c9d2e7d04) /* 27 */,
+ U64_C(0xf2c28aeb600b0ec6) /* 28 */, U64_C(0x6c0ed85f7254bcac) /* 29 */,
+ U64_C(0x71592281a4db4fe5) /* 30 */, U64_C(0x1967fa69ce0fed9f) /* 31 */,
+ U64_C(0xfd5293f8b96545db) /* 32 */, U64_C(0xc879e9d7f2a7600b) /* 33 */,
+ U64_C(0x860248920193194e) /* 34 */, U64_C(0xa4f9533b2d9cc0b3) /* 35 */,
+ U64_C(0x9053836c15957613) /* 36 */, U64_C(0xdb6dcf8afc357bf1) /* 37 */,
+ U64_C(0x18beea7a7a370f57) /* 38 */, U64_C(0x037117ca50b99066) /* 39 */,
+ U64_C(0x6ab30a9774424a35) /* 40 */, U64_C(0xf4e92f02e325249b) /* 41 */,
+ U64_C(0x7739db07061ccae1) /* 42 */, U64_C(0xd8f3b49ceca42a05) /* 43 */,
+ U64_C(0xbd56be3f51382f73) /* 44 */, U64_C(0x45faed5843b0bb28) /* 45 */,
+ U64_C(0x1c813d5c11bf1f83) /* 46 */, U64_C(0x8af0e4b6d75fa169) /* 47 */,
+ U64_C(0x33ee18a487ad9999) /* 48 */, U64_C(0x3c26e8eab1c94410) /* 49 */,
+ U64_C(0xb510102bc0a822f9) /* 50 */, U64_C(0x141eef310ce6123b) /* 51 */,
+ U64_C(0xfc65b90059ddb154) /* 52 */, U64_C(0xe0158640c5e0e607) /* 53 */,
+ U64_C(0x884e079826c3a3cf) /* 54 */, U64_C(0x930d0d9523c535fd) /* 55 */,
+ U64_C(0x35638d754e9a2b00) /* 56 */, U64_C(0x4085fccf40469dd5) /* 57 */,
+ U64_C(0xc4b17ad28be23a4c) /* 58 */, U64_C(0xcab2f0fc6a3e6a2e) /* 59 */,
+ U64_C(0x2860971a6b943fcd) /* 60 */, U64_C(0x3dde6ee212e30446) /* 61 */,
+ U64_C(0x6222f32ae01765ae) /* 62 */, U64_C(0x5d550bb5478308fe) /* 63 */,
+ U64_C(0xa9efa98da0eda22a) /* 64 */, U64_C(0xc351a71686c40da7) /* 65 */,
+ U64_C(0x1105586d9c867c84) /* 66 */, U64_C(0xdcffee85fda22853) /* 67 */,
+ U64_C(0xccfbd0262c5eef76) /* 68 */, U64_C(0xbaf294cb8990d201) /* 69 */,
+ U64_C(0xe69464f52afad975) /* 70 */, U64_C(0x94b013afdf133e14) /* 71 */,
+ U64_C(0x06a7d1a32823c958) /* 72 */, U64_C(0x6f95fe5130f61119) /* 73 */,
+ U64_C(0xd92ab34e462c06c0) /* 74 */, U64_C(0xed7bde33887c71d2) /* 75 */,
+ U64_C(0x79746d6e6518393e) /* 76 */, U64_C(0x5ba419385d713329) /* 77 */,
+ U64_C(0x7c1ba6b948a97564) /* 78 */, U64_C(0x31987c197bfdac67) /* 79 */,
+ U64_C(0xde6c23c44b053d02) /* 80 */, U64_C(0x581c49fed002d64d) /* 81 */,
+ U64_C(0xdd474d6338261571) /* 82 */, U64_C(0xaa4546c3e473d062) /* 83 */,
+ U64_C(0x928fce349455f860) /* 84 */, U64_C(0x48161bbacaab94d9) /* 85 */,
+ U64_C(0x63912430770e6f68) /* 86 */, U64_C(0x6ec8a5e602c6641c) /* 87 */,
+ U64_C(0x87282515337ddd2b) /* 88 */, U64_C(0x2cda6b42034b701b) /* 89 */,
+ U64_C(0xb03d37c181cb096d) /* 90 */, U64_C(0xe108438266c71c6f) /* 91 */,
+ U64_C(0x2b3180c7eb51b255) /* 92 */, U64_C(0xdf92b82f96c08bbc) /* 93 */,
+ U64_C(0x5c68c8c0a632f3ba) /* 94 */, U64_C(0x5504cc861c3d0556) /* 95 */,
+ U64_C(0xabbfa4e55fb26b8f) /* 96 */, U64_C(0x41848b0ab3baceb4) /* 97 */,
+ U64_C(0xb334a273aa445d32) /* 98 */, U64_C(0xbca696f0a85ad881) /* 99 */,
+ U64_C(0x24f6ec65b528d56c) /* 100 */, U64_C(0x0ce1512e90f4524a) /* 101 */,
+ U64_C(0x4e9dd79d5506d35a) /* 102 */, U64_C(0x258905fac6ce9779) /* 103 */,
+ U64_C(0x2019295b3e109b33) /* 104 */, U64_C(0xf8a9478b73a054cc) /* 105 */,
+ U64_C(0x2924f2f934417eb0) /* 106 */, U64_C(0x3993357d536d1bc4) /* 107 */,
+ U64_C(0x38a81ac21db6ff8b) /* 108 */, U64_C(0x47c4fbf17d6016bf) /* 109 */,
+ U64_C(0x1e0faadd7667e3f5) /* 110 */, U64_C(0x7abcff62938beb96) /* 111 */,
+ U64_C(0xa78dad948fc179c9) /* 112 */, U64_C(0x8f1f98b72911e50d) /* 113 */,
+ U64_C(0x61e48eae27121a91) /* 114 */, U64_C(0x4d62f7ad31859808) /* 115 */,
+ U64_C(0xeceba345ef5ceaeb) /* 116 */, U64_C(0xf5ceb25ebc9684ce) /* 117 */,
+ U64_C(0xf633e20cb7f76221) /* 118 */, U64_C(0xa32cdf06ab8293e4) /* 119 */,
+ U64_C(0x985a202ca5ee2ca4) /* 120 */, U64_C(0xcf0b8447cc8a8fb1) /* 121 */,
+ U64_C(0x9f765244979859a3) /* 122 */, U64_C(0xa8d516b1a1240017) /* 123 */,
+ U64_C(0x0bd7ba3ebb5dc726) /* 124 */, U64_C(0xe54bca55b86adb39) /* 125 */,
+ U64_C(0x1d7a3afd6c478063) /* 126 */, U64_C(0x519ec608e7669edd) /* 127 */,
+ U64_C(0x0e5715a2d149aa23) /* 128 */, U64_C(0x177d4571848ff194) /* 129 */,
+ U64_C(0xeeb55f3241014c22) /* 130 */, U64_C(0x0f5e5ca13a6e2ec2) /* 131 */,
+ U64_C(0x8029927b75f5c361) /* 132 */, U64_C(0xad139fabc3d6e436) /* 133 */,
+ U64_C(0x0d5df1a94ccf402f) /* 134 */, U64_C(0x3e8bd948bea5dfc8) /* 135 */,
+ U64_C(0xa5a0d357bd3ff77e) /* 136 */, U64_C(0xa2d12e251f74f645) /* 137 */,
+ U64_C(0x66fd9e525e81a082) /* 138 */, U64_C(0x2e0c90ce7f687a49) /* 139 */,
+ U64_C(0xc2e8bcbeba973bc5) /* 140 */, U64_C(0x000001bce509745f) /* 141 */,
+ U64_C(0x423777bbe6dab3d6) /* 142 */, U64_C(0xd1661c7eaef06eb5) /* 143 */,
+ U64_C(0xa1781f354daacfd8) /* 144 */, U64_C(0x2d11284a2b16affc) /* 145 */,
+ U64_C(0xf1fc4f67fa891d1f) /* 146 */, U64_C(0x73ecc25dcb920ada) /* 147 */,
+ U64_C(0xae610c22c2a12651) /* 148 */, U64_C(0x96e0a810d356b78a) /* 149 */,
+ U64_C(0x5a9a381f2fe7870f) /* 150 */, U64_C(0xd5ad62ede94e5530) /* 151 */,
+ U64_C(0xd225e5e8368d1427) /* 152 */, U64_C(0x65977b70c7af4631) /* 153 */,
+ U64_C(0x99f889b2de39d74f) /* 154 */, U64_C(0x233f30bf54e1d143) /* 155 */,
+ U64_C(0x9a9675d3d9a63c97) /* 156 */, U64_C(0x5470554ff334f9a8) /* 157 */,
+ U64_C(0x166acb744a4f5688) /* 158 */, U64_C(0x70c74caab2e4aead) /* 159 */,
+ U64_C(0xf0d091646f294d12) /* 160 */, U64_C(0x57b82a89684031d1) /* 161 */,
+ U64_C(0xefd95a5a61be0b6b) /* 162 */, U64_C(0x2fbd12e969f2f29a) /* 163 */,
+ U64_C(0x9bd37013feff9fe8) /* 164 */, U64_C(0x3f9b0404d6085a06) /* 165 */,
+ U64_C(0x4940c1f3166cfe15) /* 166 */, U64_C(0x09542c4dcdf3defb) /* 167 */,
+ U64_C(0xb4c5218385cd5ce3) /* 168 */, U64_C(0xc935b7dc4462a641) /* 169 */,
+ U64_C(0x3417f8a68ed3b63f) /* 170 */, U64_C(0xb80959295b215b40) /* 171 */,
+ U64_C(0xf99cdaef3b8c8572) /* 172 */, U64_C(0x018c0614f8fcb95d) /* 173 */,
+ U64_C(0x1b14accd1a3acdf3) /* 174 */, U64_C(0x84d471f200bb732d) /* 175 */,
+ U64_C(0xc1a3110e95e8da16) /* 176 */, U64_C(0x430a7220bf1a82b8) /* 177 */,
+ U64_C(0xb77e090d39df210e) /* 178 */, U64_C(0x5ef4bd9f3cd05e9d) /* 179 */,
+ U64_C(0x9d4ff6da7e57a444) /* 180 */, U64_C(0xda1d60e183d4a5f8) /* 181 */,
+ U64_C(0xb287c38417998e47) /* 182 */, U64_C(0xfe3edc121bb31886) /* 183 */,
+ U64_C(0xc7fe3ccc980ccbef) /* 184 */, U64_C(0xe46fb590189bfd03) /* 185 */,
+ U64_C(0x3732fd469a4c57dc) /* 186 */, U64_C(0x7ef700a07cf1ad65) /* 187 */,
+ U64_C(0x59c64468a31d8859) /* 188 */, U64_C(0x762fb0b4d45b61f6) /* 189 */,
+ U64_C(0x155baed099047718) /* 190 */, U64_C(0x68755e4c3d50baa6) /* 191 */,
+ U64_C(0xe9214e7f22d8b4df) /* 192 */, U64_C(0x2addbf532eac95f4) /* 193 */,
+ U64_C(0x32ae3909b4bd0109) /* 194 */, U64_C(0x834df537b08e3450) /* 195 */,
+ U64_C(0xfa209da84220728d) /* 196 */, U64_C(0x9e691d9b9efe23f7) /* 197 */,
+ U64_C(0x0446d288c4ae8d7f) /* 198 */, U64_C(0x7b4cc524e169785b) /* 199 */,
+ U64_C(0x21d87f0135ca1385) /* 200 */, U64_C(0xcebb400f137b8aa5) /* 201 */,
+ U64_C(0x272e2b66580796be) /* 202 */, U64_C(0x3612264125c2b0de) /* 203 */,
+ U64_C(0x057702bdad1efbb2) /* 204 */, U64_C(0xd4babb8eacf84be9) /* 205 */,
+ U64_C(0x91583139641bc67b) /* 206 */, U64_C(0x8bdc2de08036e024) /* 207 */,
+ U64_C(0x603c8156f49f68ed) /* 208 */, U64_C(0xf7d236f7dbef5111) /* 209 */,
+ U64_C(0x9727c4598ad21e80) /* 210 */, U64_C(0xa08a0896670a5fd7) /* 211 */,
+ U64_C(0xcb4a8f4309eba9cb) /* 212 */, U64_C(0x81af564b0f7036a1) /* 213 */,
+ U64_C(0xc0b99aa778199abd) /* 214 */, U64_C(0x959f1ec83fc8e952) /* 215 */,
+ U64_C(0x8c505077794a81b9) /* 216 */, U64_C(0x3acaaf8f056338f0) /* 217 */,
+ U64_C(0x07b43f50627a6778) /* 218 */, U64_C(0x4a44ab49f5eccc77) /* 219 */,
+ U64_C(0x3bc3d6e4b679ee98) /* 220 */, U64_C(0x9cc0d4d1cf14108c) /* 221 */,
+ U64_C(0x4406c00b206bc8a0) /* 222 */, U64_C(0x82a18854c8d72d89) /* 223 */,
+ U64_C(0x67e366b35c3c432c) /* 224 */, U64_C(0xb923dd61102b37f2) /* 225 */,
+ U64_C(0x56ab2779d884271d) /* 226 */, U64_C(0xbe83e1b0ff1525af) /* 227 */,
+ U64_C(0xfb7c65d4217e49a9) /* 228 */, U64_C(0x6bdbe0e76d48e7d4) /* 229 */,
+ U64_C(0x08df828745d9179e) /* 230 */, U64_C(0x22ea6a9add53bd34) /* 231 */,
+ U64_C(0xe36e141c5622200a) /* 232 */, U64_C(0x7f805d1b8cb750ee) /* 233 */,
+ U64_C(0xafe5c7a59f58e837) /* 234 */, U64_C(0xe27f996a4fb1c23c) /* 235 */,
+ U64_C(0xd3867dfb0775f0d0) /* 236 */, U64_C(0xd0e673de6e88891a) /* 237 */,
+ U64_C(0x123aeb9eafb86c25) /* 238 */, U64_C(0x30f1d5d5c145b895) /* 239 */,
+ U64_C(0xbb434a2dee7269e7) /* 240 */, U64_C(0x78cb67ecf931fa38) /* 241 */,
+ U64_C(0xf33b0372323bbf9c) /* 242 */, U64_C(0x52d66336fb279c74) /* 243 */,
+ U64_C(0x505f33ac0afb4eaa) /* 244 */, U64_C(0xe8a5cd99a2cce187) /* 245 */,
+ U64_C(0x534974801e2d30bb) /* 246 */, U64_C(0x8d2d5711d5876d90) /* 247 */,
+ U64_C(0x1f1a412891bc038e) /* 248 */, U64_C(0xd6e2e71d82e56648) /* 249 */,
+ U64_C(0x74036c3a497732b7) /* 250 */, U64_C(0x89b67ed96361f5ab) /* 251 */,
+ U64_C(0xffed95d8f1ea02a2) /* 252 */, U64_C(0xe72b3bd61464d43d) /* 253 */,
+ U64_C(0xa6300f170bdc4820) /* 254 */, U64_C(0xebc18760ed78a77a) /* 255 */
+};
+static u64 sbox2[256] = {
+ U64_C(0xe6a6be5a05a12138) /* 256 */, U64_C(0xb5a122a5b4f87c98) /* 257 */,
+ U64_C(0x563c6089140b6990) /* 258 */, U64_C(0x4c46cb2e391f5dd5) /* 259 */,
+ U64_C(0xd932addbc9b79434) /* 260 */, U64_C(0x08ea70e42015aff5) /* 261 */,
+ U64_C(0xd765a6673e478cf1) /* 262 */, U64_C(0xc4fb757eab278d99) /* 263 */,
+ U64_C(0xdf11c6862d6e0692) /* 264 */, U64_C(0xddeb84f10d7f3b16) /* 265 */,
+ U64_C(0x6f2ef604a665ea04) /* 266 */, U64_C(0x4a8e0f0ff0e0dfb3) /* 267 */,
+ U64_C(0xa5edeef83dbcba51) /* 268 */, U64_C(0xfc4f0a2a0ea4371e) /* 269 */,
+ U64_C(0xe83e1da85cb38429) /* 270 */, U64_C(0xdc8ff882ba1b1ce2) /* 271 */,
+ U64_C(0xcd45505e8353e80d) /* 272 */, U64_C(0x18d19a00d4db0717) /* 273 */,
+ U64_C(0x34a0cfeda5f38101) /* 274 */, U64_C(0x0be77e518887caf2) /* 275 */,
+ U64_C(0x1e341438b3c45136) /* 276 */, U64_C(0xe05797f49089ccf9) /* 277 */,
+ U64_C(0xffd23f9df2591d14) /* 278 */, U64_C(0x543dda228595c5cd) /* 279 */,
+ U64_C(0x661f81fd99052a33) /* 280 */, U64_C(0x8736e641db0f7b76) /* 281 */,
+ U64_C(0x15227725418e5307) /* 282 */, U64_C(0xe25f7f46162eb2fa) /* 283 */,
+ U64_C(0x48a8b2126c13d9fe) /* 284 */, U64_C(0xafdc541792e76eea) /* 285 */,
+ U64_C(0x03d912bfc6d1898f) /* 286 */, U64_C(0x31b1aafa1b83f51b) /* 287 */,
+ U64_C(0xf1ac2796e42ab7d9) /* 288 */, U64_C(0x40a3a7d7fcd2ebac) /* 289 */,
+ U64_C(0x1056136d0afbbcc5) /* 290 */, U64_C(0x7889e1dd9a6d0c85) /* 291 */,
+ U64_C(0xd33525782a7974aa) /* 292 */, U64_C(0xa7e25d09078ac09b) /* 293 */,
+ U64_C(0xbd4138b3eac6edd0) /* 294 */, U64_C(0x920abfbe71eb9e70) /* 295 */,
+ U64_C(0xa2a5d0f54fc2625c) /* 296 */, U64_C(0xc054e36b0b1290a3) /* 297 */,
+ U64_C(0xf6dd59ff62fe932b) /* 298 */, U64_C(0x3537354511a8ac7d) /* 299 */,
+ U64_C(0xca845e9172fadcd4) /* 300 */, U64_C(0x84f82b60329d20dc) /* 301 */,
+ U64_C(0x79c62ce1cd672f18) /* 302 */, U64_C(0x8b09a2add124642c) /* 303 */,
+ U64_C(0xd0c1e96a19d9e726) /* 304 */, U64_C(0x5a786a9b4ba9500c) /* 305 */,
+ U64_C(0x0e020336634c43f3) /* 306 */, U64_C(0xc17b474aeb66d822) /* 307 */,
+ U64_C(0x6a731ae3ec9baac2) /* 308 */, U64_C(0x8226667ae0840258) /* 309 */,
+ U64_C(0x67d4567691caeca5) /* 310 */, U64_C(0x1d94155c4875adb5) /* 311 */,
+ U64_C(0x6d00fd985b813fdf) /* 312 */, U64_C(0x51286efcb774cd06) /* 313 */,
+ U64_C(0x5e8834471fa744af) /* 314 */, U64_C(0xf72ca0aee761ae2e) /* 315 */,
+ U64_C(0xbe40e4cdaee8e09a) /* 316 */, U64_C(0xe9970bbb5118f665) /* 317 */,
+ U64_C(0x726e4beb33df1964) /* 318 */, U64_C(0x703b000729199762) /* 319 */,
+ U64_C(0x4631d816f5ef30a7) /* 320 */, U64_C(0xb880b5b51504a6be) /* 321 */,
+ U64_C(0x641793c37ed84b6c) /* 322 */, U64_C(0x7b21ed77f6e97d96) /* 323 */,
+ U64_C(0x776306312ef96b73) /* 324 */, U64_C(0xae528948e86ff3f4) /* 325 */,
+ U64_C(0x53dbd7f286a3f8f8) /* 326 */, U64_C(0x16cadce74cfc1063) /* 327 */,
+ U64_C(0x005c19bdfa52c6dd) /* 328 */, U64_C(0x68868f5d64d46ad3) /* 329 */,
+ U64_C(0x3a9d512ccf1e186a) /* 330 */, U64_C(0x367e62c2385660ae) /* 331 */,
+ U64_C(0xe359e7ea77dcb1d7) /* 332 */, U64_C(0x526c0773749abe6e) /* 333 */,
+ U64_C(0x735ae5f9d09f734b) /* 334 */, U64_C(0x493fc7cc8a558ba8) /* 335 */,
+ U64_C(0xb0b9c1533041ab45) /* 336 */, U64_C(0x321958ba470a59bd) /* 337 */,
+ U64_C(0x852db00b5f46c393) /* 338 */, U64_C(0x91209b2bd336b0e5) /* 339 */,
+ U64_C(0x6e604f7d659ef19f) /* 340 */, U64_C(0xb99a8ae2782ccb24) /* 341 */,
+ U64_C(0xccf52ab6c814c4c7) /* 342 */, U64_C(0x4727d9afbe11727b) /* 343 */,
+ U64_C(0x7e950d0c0121b34d) /* 344 */, U64_C(0x756f435670ad471f) /* 345 */,
+ U64_C(0xf5add442615a6849) /* 346 */, U64_C(0x4e87e09980b9957a) /* 347 */,
+ U64_C(0x2acfa1df50aee355) /* 348 */, U64_C(0xd898263afd2fd556) /* 349 */,
+ U64_C(0xc8f4924dd80c8fd6) /* 350 */, U64_C(0xcf99ca3d754a173a) /* 351 */,
+ U64_C(0xfe477bacaf91bf3c) /* 352 */, U64_C(0xed5371f6d690c12d) /* 353 */,
+ U64_C(0x831a5c285e687094) /* 354 */, U64_C(0xc5d3c90a3708a0a4) /* 355 */,
+ U64_C(0x0f7f903717d06580) /* 356 */, U64_C(0x19f9bb13b8fdf27f) /* 357 */,
+ U64_C(0xb1bd6f1b4d502843) /* 358 */, U64_C(0x1c761ba38fff4012) /* 359 */,
+ U64_C(0x0d1530c4e2e21f3b) /* 360 */, U64_C(0x8943ce69a7372c8a) /* 361 */,
+ U64_C(0xe5184e11feb5ce66) /* 362 */, U64_C(0x618bdb80bd736621) /* 363 */,
+ U64_C(0x7d29bad68b574d0b) /* 364 */, U64_C(0x81bb613e25e6fe5b) /* 365 */,
+ U64_C(0x071c9c10bc07913f) /* 366 */, U64_C(0xc7beeb7909ac2d97) /* 367 */,
+ U64_C(0xc3e58d353bc5d757) /* 368 */, U64_C(0xeb017892f38f61e8) /* 369 */,
+ U64_C(0xd4effb9c9b1cc21a) /* 370 */, U64_C(0x99727d26f494f7ab) /* 371 */,
+ U64_C(0xa3e063a2956b3e03) /* 372 */, U64_C(0x9d4a8b9a4aa09c30) /* 373 */,
+ U64_C(0x3f6ab7d500090fb4) /* 374 */, U64_C(0x9cc0f2a057268ac0) /* 375 */,
+ U64_C(0x3dee9d2dedbf42d1) /* 376 */, U64_C(0x330f49c87960a972) /* 377 */,
+ U64_C(0xc6b2720287421b41) /* 378 */, U64_C(0x0ac59ec07c00369c) /* 379 */,
+ U64_C(0xef4eac49cb353425) /* 380 */, U64_C(0xf450244eef0129d8) /* 381 */,
+ U64_C(0x8acc46e5caf4deb6) /* 382 */, U64_C(0x2ffeab63989263f7) /* 383 */,
+ U64_C(0x8f7cb9fe5d7a4578) /* 384 */, U64_C(0x5bd8f7644e634635) /* 385 */,
+ U64_C(0x427a7315bf2dc900) /* 386 */, U64_C(0x17d0c4aa2125261c) /* 387 */,
+ U64_C(0x3992486c93518e50) /* 388 */, U64_C(0xb4cbfee0a2d7d4c3) /* 389 */,
+ U64_C(0x7c75d6202c5ddd8d) /* 390 */, U64_C(0xdbc295d8e35b6c61) /* 391 */,
+ U64_C(0x60b369d302032b19) /* 392 */, U64_C(0xce42685fdce44132) /* 393 */,
+ U64_C(0x06f3ddb9ddf65610) /* 394 */, U64_C(0x8ea4d21db5e148f0) /* 395 */,
+ U64_C(0x20b0fce62fcd496f) /* 396 */, U64_C(0x2c1b912358b0ee31) /* 397 */,
+ U64_C(0xb28317b818f5a308) /* 398 */, U64_C(0xa89c1e189ca6d2cf) /* 399 */,
+ U64_C(0x0c6b18576aaadbc8) /* 400 */, U64_C(0xb65deaa91299fae3) /* 401 */,
+ U64_C(0xfb2b794b7f1027e7) /* 402 */, U64_C(0x04e4317f443b5beb) /* 403 */,
+ U64_C(0x4b852d325939d0a6) /* 404 */, U64_C(0xd5ae6beefb207ffc) /* 405 */,
+ U64_C(0x309682b281c7d374) /* 406 */, U64_C(0xbae309a194c3b475) /* 407 */,
+ U64_C(0x8cc3f97b13b49f05) /* 408 */, U64_C(0x98a9422ff8293967) /* 409 */,
+ U64_C(0x244b16b01076ff7c) /* 410 */, U64_C(0xf8bf571c663d67ee) /* 411 */,
+ U64_C(0x1f0d6758eee30da1) /* 412 */, U64_C(0xc9b611d97adeb9b7) /* 413 */,
+ U64_C(0xb7afd5887b6c57a2) /* 414 */, U64_C(0x6290ae846b984fe1) /* 415 */,
+ U64_C(0x94df4cdeacc1a5fd) /* 416 */, U64_C(0x058a5bd1c5483aff) /* 417 */,
+ U64_C(0x63166cc142ba3c37) /* 418 */, U64_C(0x8db8526eb2f76f40) /* 419 */,
+ U64_C(0xe10880036f0d6d4e) /* 420 */, U64_C(0x9e0523c9971d311d) /* 421 */,
+ U64_C(0x45ec2824cc7cd691) /* 422 */, U64_C(0x575b8359e62382c9) /* 423 */,
+ U64_C(0xfa9e400dc4889995) /* 424 */, U64_C(0xd1823ecb45721568) /* 425 */,
+ U64_C(0xdafd983b8206082f) /* 426 */, U64_C(0xaa7d29082386a8cb) /* 427 */,
+ U64_C(0x269fcd4403b87588) /* 428 */, U64_C(0x1b91f5f728bdd1e0) /* 429 */,
+ U64_C(0xe4669f39040201f6) /* 430 */, U64_C(0x7a1d7c218cf04ade) /* 431 */,
+ U64_C(0x65623c29d79ce5ce) /* 432 */, U64_C(0x2368449096c00bb1) /* 433 */,
+ U64_C(0xab9bf1879da503ba) /* 434 */, U64_C(0xbc23ecb1a458058e) /* 435 */,
+ U64_C(0x9a58df01bb401ecc) /* 436 */, U64_C(0xa070e868a85f143d) /* 437 */,
+ U64_C(0x4ff188307df2239e) /* 438 */, U64_C(0x14d565b41a641183) /* 439 */,
+ U64_C(0xee13337452701602) /* 440 */, U64_C(0x950e3dcf3f285e09) /* 441 */,
+ U64_C(0x59930254b9c80953) /* 442 */, U64_C(0x3bf299408930da6d) /* 443 */,
+ U64_C(0xa955943f53691387) /* 444 */, U64_C(0xa15edecaa9cb8784) /* 445 */,
+ U64_C(0x29142127352be9a0) /* 446 */, U64_C(0x76f0371fff4e7afb) /* 447 */,
+ U64_C(0x0239f450274f2228) /* 448 */, U64_C(0xbb073af01d5e868b) /* 449 */,
+ U64_C(0xbfc80571c10e96c1) /* 450 */, U64_C(0xd267088568222e23) /* 451 */,
+ U64_C(0x9671a3d48e80b5b0) /* 452 */, U64_C(0x55b5d38ae193bb81) /* 453 */,
+ U64_C(0x693ae2d0a18b04b8) /* 454 */, U64_C(0x5c48b4ecadd5335f) /* 455 */,
+ U64_C(0xfd743b194916a1ca) /* 456 */, U64_C(0x2577018134be98c4) /* 457 */,
+ U64_C(0xe77987e83c54a4ad) /* 458 */, U64_C(0x28e11014da33e1b9) /* 459 */,
+ U64_C(0x270cc59e226aa213) /* 460 */, U64_C(0x71495f756d1a5f60) /* 461 */,
+ U64_C(0x9be853fb60afef77) /* 462 */, U64_C(0xadc786a7f7443dbf) /* 463 */,
+ U64_C(0x0904456173b29a82) /* 464 */, U64_C(0x58bc7a66c232bd5e) /* 465 */,
+ U64_C(0xf306558c673ac8b2) /* 466 */, U64_C(0x41f639c6b6c9772a) /* 467 */,
+ U64_C(0x216defe99fda35da) /* 468 */, U64_C(0x11640cc71c7be615) /* 469 */,
+ U64_C(0x93c43694565c5527) /* 470 */, U64_C(0xea038e6246777839) /* 471 */,
+ U64_C(0xf9abf3ce5a3e2469) /* 472 */, U64_C(0x741e768d0fd312d2) /* 473 */,
+ U64_C(0x0144b883ced652c6) /* 474 */, U64_C(0xc20b5a5ba33f8552) /* 475 */,
+ U64_C(0x1ae69633c3435a9d) /* 476 */, U64_C(0x97a28ca4088cfdec) /* 477 */,
+ U64_C(0x8824a43c1e96f420) /* 478 */, U64_C(0x37612fa66eeea746) /* 479 */,
+ U64_C(0x6b4cb165f9cf0e5a) /* 480 */, U64_C(0x43aa1c06a0abfb4a) /* 481 */,
+ U64_C(0x7f4dc26ff162796b) /* 482 */, U64_C(0x6cbacc8e54ed9b0f) /* 483 */,
+ U64_C(0xa6b7ffefd2bb253e) /* 484 */, U64_C(0x2e25bc95b0a29d4f) /* 485 */,
+ U64_C(0x86d6a58bdef1388c) /* 486 */, U64_C(0xded74ac576b6f054) /* 487 */,
+ U64_C(0x8030bdbc2b45805d) /* 488 */, U64_C(0x3c81af70e94d9289) /* 489 */,
+ U64_C(0x3eff6dda9e3100db) /* 490 */, U64_C(0xb38dc39fdfcc8847) /* 491 */,
+ U64_C(0x123885528d17b87e) /* 492 */, U64_C(0xf2da0ed240b1b642) /* 493 */,
+ U64_C(0x44cefadcd54bf9a9) /* 494 */, U64_C(0x1312200e433c7ee6) /* 495 */,
+ U64_C(0x9ffcc84f3a78c748) /* 496 */, U64_C(0xf0cd1f72248576bb) /* 497 */,
+ U64_C(0xec6974053638cfe4) /* 498 */, U64_C(0x2ba7b67c0cec4e4c) /* 499 */,
+ U64_C(0xac2f4df3e5ce32ed) /* 500 */, U64_C(0xcb33d14326ea4c11) /* 501 */,
+ U64_C(0xa4e9044cc77e58bc) /* 502 */, U64_C(0x5f513293d934fcef) /* 503 */,
+ U64_C(0x5dc9645506e55444) /* 504 */, U64_C(0x50de418f317de40a) /* 505 */,
+ U64_C(0x388cb31a69dde259) /* 506 */, U64_C(0x2db4a83455820a86) /* 507 */,
+ U64_C(0x9010a91e84711ae9) /* 508 */, U64_C(0x4df7f0b7b1498371) /* 509 */,
+ U64_C(0xd62a2eabc0977179) /* 510 */, U64_C(0x22fac097aa8d5c0e) /* 511 */
+};
+static u64 sbox3[256] = {
+ U64_C(0xf49fcc2ff1daf39b) /* 512 */, U64_C(0x487fd5c66ff29281) /* 513 */,
+ U64_C(0xe8a30667fcdca83f) /* 514 */, U64_C(0x2c9b4be3d2fcce63) /* 515 */,
+ U64_C(0xda3ff74b93fbbbc2) /* 516 */, U64_C(0x2fa165d2fe70ba66) /* 517 */,
+ U64_C(0xa103e279970e93d4) /* 518 */, U64_C(0xbecdec77b0e45e71) /* 519 */,
+ U64_C(0xcfb41e723985e497) /* 520 */, U64_C(0xb70aaa025ef75017) /* 521 */,
+ U64_C(0xd42309f03840b8e0) /* 522 */, U64_C(0x8efc1ad035898579) /* 523 */,
+ U64_C(0x96c6920be2b2abc5) /* 524 */, U64_C(0x66af4163375a9172) /* 525 */,
+ U64_C(0x2174abdcca7127fb) /* 526 */, U64_C(0xb33ccea64a72ff41) /* 527 */,
+ U64_C(0xf04a4933083066a5) /* 528 */, U64_C(0x8d970acdd7289af5) /* 529 */,
+ U64_C(0x8f96e8e031c8c25e) /* 530 */, U64_C(0xf3fec02276875d47) /* 531 */,
+ U64_C(0xec7bf310056190dd) /* 532 */, U64_C(0xf5adb0aebb0f1491) /* 533 */,
+ U64_C(0x9b50f8850fd58892) /* 534 */, U64_C(0x4975488358b74de8) /* 535 */,
+ U64_C(0xa3354ff691531c61) /* 536 */, U64_C(0x0702bbe481d2c6ee) /* 537 */,
+ U64_C(0x89fb24057deded98) /* 538 */, U64_C(0xac3075138596e902) /* 539 */,
+ U64_C(0x1d2d3580172772ed) /* 540 */, U64_C(0xeb738fc28e6bc30d) /* 541 */,
+ U64_C(0x5854ef8f63044326) /* 542 */, U64_C(0x9e5c52325add3bbe) /* 543 */,
+ U64_C(0x90aa53cf325c4623) /* 544 */, U64_C(0xc1d24d51349dd067) /* 545 */,
+ U64_C(0x2051cfeea69ea624) /* 546 */, U64_C(0x13220f0a862e7e4f) /* 547 */,
+ U64_C(0xce39399404e04864) /* 548 */, U64_C(0xd9c42ca47086fcb7) /* 549 */,
+ U64_C(0x685ad2238a03e7cc) /* 550 */, U64_C(0x066484b2ab2ff1db) /* 551 */,
+ U64_C(0xfe9d5d70efbf79ec) /* 552 */, U64_C(0x5b13b9dd9c481854) /* 553 */,
+ U64_C(0x15f0d475ed1509ad) /* 554 */, U64_C(0x0bebcd060ec79851) /* 555 */,
+ U64_C(0xd58c6791183ab7f8) /* 556 */, U64_C(0xd1187c5052f3eee4) /* 557 */,
+ U64_C(0xc95d1192e54e82ff) /* 558 */, U64_C(0x86eea14cb9ac6ca2) /* 559 */,
+ U64_C(0x3485beb153677d5d) /* 560 */, U64_C(0xdd191d781f8c492a) /* 561 */,
+ U64_C(0xf60866baa784ebf9) /* 562 */, U64_C(0x518f643ba2d08c74) /* 563 */,
+ U64_C(0x8852e956e1087c22) /* 564 */, U64_C(0xa768cb8dc410ae8d) /* 565 */,
+ U64_C(0x38047726bfec8e1a) /* 566 */, U64_C(0xa67738b4cd3b45aa) /* 567 */,
+ U64_C(0xad16691cec0dde19) /* 568 */, U64_C(0xc6d4319380462e07) /* 569 */,
+ U64_C(0xc5a5876d0ba61938) /* 570 */, U64_C(0x16b9fa1fa58fd840) /* 571 */,
+ U64_C(0x188ab1173ca74f18) /* 572 */, U64_C(0xabda2f98c99c021f) /* 573 */,
+ U64_C(0x3e0580ab134ae816) /* 574 */, U64_C(0x5f3b05b773645abb) /* 575 */,
+ U64_C(0x2501a2be5575f2f6) /* 576 */, U64_C(0x1b2f74004e7e8ba9) /* 577 */,
+ U64_C(0x1cd7580371e8d953) /* 578 */, U64_C(0x7f6ed89562764e30) /* 579 */,
+ U64_C(0xb15926ff596f003d) /* 580 */, U64_C(0x9f65293da8c5d6b9) /* 581 */,
+ U64_C(0x6ecef04dd690f84c) /* 582 */, U64_C(0x4782275fff33af88) /* 583 */,
+ U64_C(0xe41433083f820801) /* 584 */, U64_C(0xfd0dfe409a1af9b5) /* 585 */,
+ U64_C(0x4325a3342cdb396b) /* 586 */, U64_C(0x8ae77e62b301b252) /* 587 */,
+ U64_C(0xc36f9e9f6655615a) /* 588 */, U64_C(0x85455a2d92d32c09) /* 589 */,
+ U64_C(0xf2c7dea949477485) /* 590 */, U64_C(0x63cfb4c133a39eba) /* 591 */,
+ U64_C(0x83b040cc6ebc5462) /* 592 */, U64_C(0x3b9454c8fdb326b0) /* 593 */,
+ U64_C(0x56f56a9e87ffd78c) /* 594 */, U64_C(0x2dc2940d99f42bc6) /* 595 */,
+ U64_C(0x98f7df096b096e2d) /* 596 */, U64_C(0x19a6e01e3ad852bf) /* 597 */,
+ U64_C(0x42a99ccbdbd4b40b) /* 598 */, U64_C(0xa59998af45e9c559) /* 599 */,
+ U64_C(0x366295e807d93186) /* 600 */, U64_C(0x6b48181bfaa1f773) /* 601 */,
+ U64_C(0x1fec57e2157a0a1d) /* 602 */, U64_C(0x4667446af6201ad5) /* 603 */,
+ U64_C(0xe615ebcacfb0f075) /* 604 */, U64_C(0xb8f31f4f68290778) /* 605 */,
+ U64_C(0x22713ed6ce22d11e) /* 606 */, U64_C(0x3057c1a72ec3c93b) /* 607 */,
+ U64_C(0xcb46acc37c3f1f2f) /* 608 */, U64_C(0xdbb893fd02aaf50e) /* 609 */,
+ U64_C(0x331fd92e600b9fcf) /* 610 */, U64_C(0xa498f96148ea3ad6) /* 611 */,
+ U64_C(0xa8d8426e8b6a83ea) /* 612 */, U64_C(0xa089b274b7735cdc) /* 613 */,
+ U64_C(0x87f6b3731e524a11) /* 614 */, U64_C(0x118808e5cbc96749) /* 615 */,
+ U64_C(0x9906e4c7b19bd394) /* 616 */, U64_C(0xafed7f7e9b24a20c) /* 617 */,
+ U64_C(0x6509eadeeb3644a7) /* 618 */, U64_C(0x6c1ef1d3e8ef0ede) /* 619 */,
+ U64_C(0xb9c97d43e9798fb4) /* 620 */, U64_C(0xa2f2d784740c28a3) /* 621 */,
+ U64_C(0x7b8496476197566f) /* 622 */, U64_C(0x7a5be3e6b65f069d) /* 623 */,
+ U64_C(0xf96330ed78be6f10) /* 624 */, U64_C(0xeee60de77a076a15) /* 625 */,
+ U64_C(0x2b4bee4aa08b9bd0) /* 626 */, U64_C(0x6a56a63ec7b8894e) /* 627 */,
+ U64_C(0x02121359ba34fef4) /* 628 */, U64_C(0x4cbf99f8283703fc) /* 629 */,
+ U64_C(0x398071350caf30c8) /* 630 */, U64_C(0xd0a77a89f017687a) /* 631 */,
+ U64_C(0xf1c1a9eb9e423569) /* 632 */, U64_C(0x8c7976282dee8199) /* 633 */,
+ U64_C(0x5d1737a5dd1f7abd) /* 634 */, U64_C(0x4f53433c09a9fa80) /* 635 */,
+ U64_C(0xfa8b0c53df7ca1d9) /* 636 */, U64_C(0x3fd9dcbc886ccb77) /* 637 */,
+ U64_C(0xc040917ca91b4720) /* 638 */, U64_C(0x7dd00142f9d1dcdf) /* 639 */,
+ U64_C(0x8476fc1d4f387b58) /* 640 */, U64_C(0x23f8e7c5f3316503) /* 641 */,
+ U64_C(0x032a2244e7e37339) /* 642 */, U64_C(0x5c87a5d750f5a74b) /* 643 */,
+ U64_C(0x082b4cc43698992e) /* 644 */, U64_C(0xdf917becb858f63c) /* 645 */,
+ U64_C(0x3270b8fc5bf86dda) /* 646 */, U64_C(0x10ae72bb29b5dd76) /* 647 */,
+ U64_C(0x576ac94e7700362b) /* 648 */, U64_C(0x1ad112dac61efb8f) /* 649 */,
+ U64_C(0x691bc30ec5faa427) /* 650 */, U64_C(0xff246311cc327143) /* 651 */,
+ U64_C(0x3142368e30e53206) /* 652 */, U64_C(0x71380e31e02ca396) /* 653 */,
+ U64_C(0x958d5c960aad76f1) /* 654 */, U64_C(0xf8d6f430c16da536) /* 655 */,
+ U64_C(0xc8ffd13f1be7e1d2) /* 656 */, U64_C(0x7578ae66004ddbe1) /* 657 */,
+ U64_C(0x05833f01067be646) /* 658 */, U64_C(0xbb34b5ad3bfe586d) /* 659 */,
+ U64_C(0x095f34c9a12b97f0) /* 660 */, U64_C(0x247ab64525d60ca8) /* 661 */,
+ U64_C(0xdcdbc6f3017477d1) /* 662 */, U64_C(0x4a2e14d4decad24d) /* 663 */,
+ U64_C(0xbdb5e6d9be0a1eeb) /* 664 */, U64_C(0x2a7e70f7794301ab) /* 665 */,
+ U64_C(0xdef42d8a270540fd) /* 666 */, U64_C(0x01078ec0a34c22c1) /* 667 */,
+ U64_C(0xe5de511af4c16387) /* 668 */, U64_C(0x7ebb3a52bd9a330a) /* 669 */,
+ U64_C(0x77697857aa7d6435) /* 670 */, U64_C(0x004e831603ae4c32) /* 671 */,
+ U64_C(0xe7a21020ad78e312) /* 672 */, U64_C(0x9d41a70c6ab420f2) /* 673 */,
+ U64_C(0x28e06c18ea1141e6) /* 674 */, U64_C(0xd2b28cbd984f6b28) /* 675 */,
+ U64_C(0x26b75f6c446e9d83) /* 676 */, U64_C(0xba47568c4d418d7f) /* 677 */,
+ U64_C(0xd80badbfe6183d8e) /* 678 */, U64_C(0x0e206d7f5f166044) /* 679 */,
+ U64_C(0xe258a43911cbca3e) /* 680 */, U64_C(0x723a1746b21dc0bc) /* 681 */,
+ U64_C(0xc7caa854f5d7cdd3) /* 682 */, U64_C(0x7cac32883d261d9c) /* 683 */,
+ U64_C(0x7690c26423ba942c) /* 684 */, U64_C(0x17e55524478042b8) /* 685 */,
+ U64_C(0xe0be477656a2389f) /* 686 */, U64_C(0x4d289b5e67ab2da0) /* 687 */,
+ U64_C(0x44862b9c8fbbfd31) /* 688 */, U64_C(0xb47cc8049d141365) /* 689 */,
+ U64_C(0x822c1b362b91c793) /* 690 */, U64_C(0x4eb14655fb13dfd8) /* 691 */,
+ U64_C(0x1ecbba0714e2a97b) /* 692 */, U64_C(0x6143459d5cde5f14) /* 693 */,
+ U64_C(0x53a8fbf1d5f0ac89) /* 694 */, U64_C(0x97ea04d81c5e5b00) /* 695 */,
+ U64_C(0x622181a8d4fdb3f3) /* 696 */, U64_C(0xe9bcd341572a1208) /* 697 */,
+ U64_C(0x1411258643cce58a) /* 698 */, U64_C(0x9144c5fea4c6e0a4) /* 699 */,
+ U64_C(0x0d33d06565cf620f) /* 700 */, U64_C(0x54a48d489f219ca1) /* 701 */,
+ U64_C(0xc43e5eac6d63c821) /* 702 */, U64_C(0xa9728b3a72770daf) /* 703 */,
+ U64_C(0xd7934e7b20df87ef) /* 704 */, U64_C(0xe35503b61a3e86e5) /* 705 */,
+ U64_C(0xcae321fbc819d504) /* 706 */, U64_C(0x129a50b3ac60bfa6) /* 707 */,
+ U64_C(0xcd5e68ea7e9fb6c3) /* 708 */, U64_C(0xb01c90199483b1c7) /* 709 */,
+ U64_C(0x3de93cd5c295376c) /* 710 */, U64_C(0xaed52edf2ab9ad13) /* 711 */,
+ U64_C(0x2e60f512c0a07884) /* 712 */, U64_C(0xbc3d86a3e36210c9) /* 713 */,
+ U64_C(0x35269d9b163951ce) /* 714 */, U64_C(0x0c7d6e2ad0cdb5fa) /* 715 */,
+ U64_C(0x59e86297d87f5733) /* 716 */, U64_C(0x298ef221898db0e7) /* 717 */,
+ U64_C(0x55000029d1a5aa7e) /* 718 */, U64_C(0x8bc08ae1b5061b45) /* 719 */,
+ U64_C(0xc2c31c2b6c92703a) /* 720 */, U64_C(0x94cc596baf25ef42) /* 721 */,
+ U64_C(0x0a1d73db22540456) /* 722 */, U64_C(0x04b6a0f9d9c4179a) /* 723 */,
+ U64_C(0xeffdafa2ae3d3c60) /* 724 */, U64_C(0xf7c8075bb49496c4) /* 725 */,
+ U64_C(0x9cc5c7141d1cd4e3) /* 726 */, U64_C(0x78bd1638218e5534) /* 727 */,
+ U64_C(0xb2f11568f850246a) /* 728 */, U64_C(0xedfabcfa9502bc29) /* 729 */,
+ U64_C(0x796ce5f2da23051b) /* 730 */, U64_C(0xaae128b0dc93537c) /* 731 */,
+ U64_C(0x3a493da0ee4b29ae) /* 732 */, U64_C(0xb5df6b2c416895d7) /* 733 */,
+ U64_C(0xfcabbd25122d7f37) /* 734 */, U64_C(0x70810b58105dc4b1) /* 735 */,
+ U64_C(0xe10fdd37f7882a90) /* 736 */, U64_C(0x524dcab5518a3f5c) /* 737 */,
+ U64_C(0x3c9e85878451255b) /* 738 */, U64_C(0x4029828119bd34e2) /* 739 */,
+ U64_C(0x74a05b6f5d3ceccb) /* 740 */, U64_C(0xb610021542e13eca) /* 741 */,
+ U64_C(0x0ff979d12f59e2ac) /* 742 */, U64_C(0x6037da27e4f9cc50) /* 743 */,
+ U64_C(0x5e92975a0df1847d) /* 744 */, U64_C(0xd66de190d3e623fe) /* 745 */,
+ U64_C(0x5032d6b87b568048) /* 746 */, U64_C(0x9a36b7ce8235216e) /* 747 */,
+ U64_C(0x80272a7a24f64b4a) /* 748 */, U64_C(0x93efed8b8c6916f7) /* 749 */,
+ U64_C(0x37ddbff44cce1555) /* 750 */, U64_C(0x4b95db5d4b99bd25) /* 751 */,
+ U64_C(0x92d3fda169812fc0) /* 752 */, U64_C(0xfb1a4a9a90660bb6) /* 753 */,
+ U64_C(0x730c196946a4b9b2) /* 754 */, U64_C(0x81e289aa7f49da68) /* 755 */,
+ U64_C(0x64669a0f83b1a05f) /* 756 */, U64_C(0x27b3ff7d9644f48b) /* 757 */,
+ U64_C(0xcc6b615c8db675b3) /* 758 */, U64_C(0x674f20b9bcebbe95) /* 759 */,
+ U64_C(0x6f31238275655982) /* 760 */, U64_C(0x5ae488713e45cf05) /* 761 */,
+ U64_C(0xbf619f9954c21157) /* 762 */, U64_C(0xeabac46040a8eae9) /* 763 */,
+ U64_C(0x454c6fe9f2c0c1cd) /* 764 */, U64_C(0x419cf6496412691c) /* 765 */,
+ U64_C(0xd3dc3bef265b0f70) /* 766 */, U64_C(0x6d0e60f5c3578a9e) /* 767 */
+};
+static u64 sbox4[256] = {
+ U64_C(0x5b0e608526323c55) /* 768 */, U64_C(0x1a46c1a9fa1b59f5) /* 769 */,
+ U64_C(0xa9e245a17c4c8ffa) /* 770 */, U64_C(0x65ca5159db2955d7) /* 771 */,
+ U64_C(0x05db0a76ce35afc2) /* 772 */, U64_C(0x81eac77ea9113d45) /* 773 */,
+ U64_C(0x528ef88ab6ac0a0d) /* 774 */, U64_C(0xa09ea253597be3ff) /* 775 */,
+ U64_C(0x430ddfb3ac48cd56) /* 776 */, U64_C(0xc4b3a67af45ce46f) /* 777 */,
+ U64_C(0x4ececfd8fbe2d05e) /* 778 */, U64_C(0x3ef56f10b39935f0) /* 779 */,
+ U64_C(0x0b22d6829cd619c6) /* 780 */, U64_C(0x17fd460a74df2069) /* 781 */,
+ U64_C(0x6cf8cc8e8510ed40) /* 782 */, U64_C(0xd6c824bf3a6ecaa7) /* 783 */,
+ U64_C(0x61243d581a817049) /* 784 */, U64_C(0x048bacb6bbc163a2) /* 785 */,
+ U64_C(0xd9a38ac27d44cc32) /* 786 */, U64_C(0x7fddff5baaf410ab) /* 787 */,
+ U64_C(0xad6d495aa804824b) /* 788 */, U64_C(0xe1a6a74f2d8c9f94) /* 789 */,
+ U64_C(0xd4f7851235dee8e3) /* 790 */, U64_C(0xfd4b7f886540d893) /* 791 */,
+ U64_C(0x247c20042aa4bfda) /* 792 */, U64_C(0x096ea1c517d1327c) /* 793 */,
+ U64_C(0xd56966b4361a6685) /* 794 */, U64_C(0x277da5c31221057d) /* 795 */,
+ U64_C(0x94d59893a43acff7) /* 796 */, U64_C(0x64f0c51ccdc02281) /* 797 */,
+ U64_C(0x3d33bcc4ff6189db) /* 798 */, U64_C(0xe005cb184ce66af1) /* 799 */,
+ U64_C(0xff5ccd1d1db99bea) /* 800 */, U64_C(0xb0b854a7fe42980f) /* 801 */,
+ U64_C(0x7bd46a6a718d4b9f) /* 802 */, U64_C(0xd10fa8cc22a5fd8c) /* 803 */,
+ U64_C(0xd31484952be4bd31) /* 804 */, U64_C(0xc7fa975fcb243847) /* 805 */,
+ U64_C(0x4886ed1e5846c407) /* 806 */, U64_C(0x28cddb791eb70b04) /* 807 */,
+ U64_C(0xc2b00be2f573417f) /* 808 */, U64_C(0x5c9590452180f877) /* 809 */,
+ U64_C(0x7a6bddfff370eb00) /* 810 */, U64_C(0xce509e38d6d9d6a4) /* 811 */,
+ U64_C(0xebeb0f00647fa702) /* 812 */, U64_C(0x1dcc06cf76606f06) /* 813 */,
+ U64_C(0xe4d9f28ba286ff0a) /* 814 */, U64_C(0xd85a305dc918c262) /* 815 */,
+ U64_C(0x475b1d8732225f54) /* 816 */, U64_C(0x2d4fb51668ccb5fe) /* 817 */,
+ U64_C(0xa679b9d9d72bba20) /* 818 */, U64_C(0x53841c0d912d43a5) /* 819 */,
+ U64_C(0x3b7eaa48bf12a4e8) /* 820 */, U64_C(0x781e0e47f22f1ddf) /* 821 */,
+ U64_C(0xeff20ce60ab50973) /* 822 */, U64_C(0x20d261d19dffb742) /* 823 */,
+ U64_C(0x16a12b03062a2e39) /* 824 */, U64_C(0x1960eb2239650495) /* 825 */,
+ U64_C(0x251c16fed50eb8b8) /* 826 */, U64_C(0x9ac0c330f826016e) /* 827 */,
+ U64_C(0xed152665953e7671) /* 828 */, U64_C(0x02d63194a6369570) /* 829 */,
+ U64_C(0x5074f08394b1c987) /* 830 */, U64_C(0x70ba598c90b25ce1) /* 831 */,
+ U64_C(0x794a15810b9742f6) /* 832 */, U64_C(0x0d5925e9fcaf8c6c) /* 833 */,
+ U64_C(0x3067716cd868744e) /* 834 */, U64_C(0x910ab077e8d7731b) /* 835 */,
+ U64_C(0x6a61bbdb5ac42f61) /* 836 */, U64_C(0x93513efbf0851567) /* 837 */,
+ U64_C(0xf494724b9e83e9d5) /* 838 */, U64_C(0xe887e1985c09648d) /* 839 */,
+ U64_C(0x34b1d3c675370cfd) /* 840 */, U64_C(0xdc35e433bc0d255d) /* 841 */,
+ U64_C(0xd0aab84234131be0) /* 842 */, U64_C(0x08042a50b48b7eaf) /* 843 */,
+ U64_C(0x9997c4ee44a3ab35) /* 844 */, U64_C(0x829a7b49201799d0) /* 845 */,
+ U64_C(0x263b8307b7c54441) /* 846 */, U64_C(0x752f95f4fd6a6ca6) /* 847 */,
+ U64_C(0x927217402c08c6e5) /* 848 */, U64_C(0x2a8ab754a795d9ee) /* 849 */,
+ U64_C(0xa442f7552f72943d) /* 850 */, U64_C(0x2c31334e19781208) /* 851 */,
+ U64_C(0x4fa98d7ceaee6291) /* 852 */, U64_C(0x55c3862f665db309) /* 853 */,
+ U64_C(0xbd0610175d53b1f3) /* 854 */, U64_C(0x46fe6cb840413f27) /* 855 */,
+ U64_C(0x3fe03792df0cfa59) /* 856 */, U64_C(0xcfe700372eb85e8f) /* 857 */,
+ U64_C(0xa7be29e7adbce118) /* 858 */, U64_C(0xe544ee5cde8431dd) /* 859 */,
+ U64_C(0x8a781b1b41f1873e) /* 860 */, U64_C(0xa5c94c78a0d2f0e7) /* 861 */,
+ U64_C(0x39412e2877b60728) /* 862 */, U64_C(0xa1265ef3afc9a62c) /* 863 */,
+ U64_C(0xbcc2770c6a2506c5) /* 864 */, U64_C(0x3ab66dd5dce1ce12) /* 865 */,
+ U64_C(0xe65499d04a675b37) /* 866 */, U64_C(0x7d8f523481bfd216) /* 867 */,
+ U64_C(0x0f6f64fcec15f389) /* 868 */, U64_C(0x74efbe618b5b13c8) /* 869 */,
+ U64_C(0xacdc82b714273e1d) /* 870 */, U64_C(0xdd40bfe003199d17) /* 871 */,
+ U64_C(0x37e99257e7e061f8) /* 872 */, U64_C(0xfa52626904775aaa) /* 873 */,
+ U64_C(0x8bbbf63a463d56f9) /* 874 */, U64_C(0xf0013f1543a26e64) /* 875 */,
+ U64_C(0xa8307e9f879ec898) /* 876 */, U64_C(0xcc4c27a4150177cc) /* 877 */,
+ U64_C(0x1b432f2cca1d3348) /* 878 */, U64_C(0xde1d1f8f9f6fa013) /* 879 */,
+ U64_C(0x606602a047a7ddd6) /* 880 */, U64_C(0xd237ab64cc1cb2c7) /* 881 */,
+ U64_C(0x9b938e7225fcd1d3) /* 882 */, U64_C(0xec4e03708e0ff476) /* 883 */,
+ U64_C(0xfeb2fbda3d03c12d) /* 884 */, U64_C(0xae0bced2ee43889a) /* 885 */,
+ U64_C(0x22cb8923ebfb4f43) /* 886 */, U64_C(0x69360d013cf7396d) /* 887 */,
+ U64_C(0x855e3602d2d4e022) /* 888 */, U64_C(0x073805bad01f784c) /* 889 */,
+ U64_C(0x33e17a133852f546) /* 890 */, U64_C(0xdf4874058ac7b638) /* 891 */,
+ U64_C(0xba92b29c678aa14a) /* 892 */, U64_C(0x0ce89fc76cfaadcd) /* 893 */,
+ U64_C(0x5f9d4e0908339e34) /* 894 */, U64_C(0xf1afe9291f5923b9) /* 895 */,
+ U64_C(0x6e3480f60f4a265f) /* 896 */, U64_C(0xeebf3a2ab29b841c) /* 897 */,
+ U64_C(0xe21938a88f91b4ad) /* 898 */, U64_C(0x57dfeff845c6d3c3) /* 899 */,
+ U64_C(0x2f006b0bf62caaf2) /* 900 */, U64_C(0x62f479ef6f75ee78) /* 901 */,
+ U64_C(0x11a55ad41c8916a9) /* 902 */, U64_C(0xf229d29084fed453) /* 903 */,
+ U64_C(0x42f1c27b16b000e6) /* 904 */, U64_C(0x2b1f76749823c074) /* 905 */,
+ U64_C(0x4b76eca3c2745360) /* 906 */, U64_C(0x8c98f463b91691bd) /* 907 */,
+ U64_C(0x14bcc93cf1ade66a) /* 908 */, U64_C(0x8885213e6d458397) /* 909 */,
+ U64_C(0x8e177df0274d4711) /* 910 */, U64_C(0xb49b73b5503f2951) /* 911 */,
+ U64_C(0x10168168c3f96b6b) /* 912 */, U64_C(0x0e3d963b63cab0ae) /* 913 */,
+ U64_C(0x8dfc4b5655a1db14) /* 914 */, U64_C(0xf789f1356e14de5c) /* 915 */,
+ U64_C(0x683e68af4e51dac1) /* 916 */, U64_C(0xc9a84f9d8d4b0fd9) /* 917 */,
+ U64_C(0x3691e03f52a0f9d1) /* 918 */, U64_C(0x5ed86e46e1878e80) /* 919 */,
+ U64_C(0x3c711a0e99d07150) /* 920 */, U64_C(0x5a0865b20c4e9310) /* 921 */,
+ U64_C(0x56fbfc1fe4f0682e) /* 922 */, U64_C(0xea8d5de3105edf9b) /* 923 */,
+ U64_C(0x71abfdb12379187a) /* 924 */, U64_C(0x2eb99de1bee77b9c) /* 925 */,
+ U64_C(0x21ecc0ea33cf4523) /* 926 */, U64_C(0x59a4d7521805c7a1) /* 927 */,
+ U64_C(0x3896f5eb56ae7c72) /* 928 */, U64_C(0xaa638f3db18f75dc) /* 929 */,
+ U64_C(0x9f39358dabe9808e) /* 930 */, U64_C(0xb7defa91c00b72ac) /* 931 */,
+ U64_C(0x6b5541fd62492d92) /* 932 */, U64_C(0x6dc6dee8f92e4d5b) /* 933 */,
+ U64_C(0x353f57abc4beea7e) /* 934 */, U64_C(0x735769d6da5690ce) /* 935 */,
+ U64_C(0x0a234aa642391484) /* 936 */, U64_C(0xf6f9508028f80d9d) /* 937 */,
+ U64_C(0xb8e319a27ab3f215) /* 938 */, U64_C(0x31ad9c1151341a4d) /* 939 */,
+ U64_C(0x773c22a57bef5805) /* 940 */, U64_C(0x45c7561a07968633) /* 941 */,
+ U64_C(0xf913da9e249dbe36) /* 942 */, U64_C(0xda652d9b78a64c68) /* 943 */,
+ U64_C(0x4c27a97f3bc334ef) /* 944 */, U64_C(0x76621220e66b17f4) /* 945 */,
+ U64_C(0x967743899acd7d0b) /* 946 */, U64_C(0xf3ee5bcae0ed6782) /* 947 */,
+ U64_C(0x409f753600c879fc) /* 948 */, U64_C(0x06d09a39b5926db6) /* 949 */,
+ U64_C(0x6f83aeb0317ac588) /* 950 */, U64_C(0x01e6ca4a86381f21) /* 951 */,
+ U64_C(0x66ff3462d19f3025) /* 952 */, U64_C(0x72207c24ddfd3bfb) /* 953 */,
+ U64_C(0x4af6b6d3e2ece2eb) /* 954 */, U64_C(0x9c994dbec7ea08de) /* 955 */,
+ U64_C(0x49ace597b09a8bc4) /* 956 */, U64_C(0xb38c4766cf0797ba) /* 957 */,
+ U64_C(0x131b9373c57c2a75) /* 958 */, U64_C(0xb1822cce61931e58) /* 959 */,
+ U64_C(0x9d7555b909ba1c0c) /* 960 */, U64_C(0x127fafdd937d11d2) /* 961 */,
+ U64_C(0x29da3badc66d92e4) /* 962 */, U64_C(0xa2c1d57154c2ecbc) /* 963 */,
+ U64_C(0x58c5134d82f6fe24) /* 964 */, U64_C(0x1c3ae3515b62274f) /* 965 */,
+ U64_C(0xe907c82e01cb8126) /* 966 */, U64_C(0xf8ed091913e37fcb) /* 967 */,
+ U64_C(0x3249d8f9c80046c9) /* 968 */, U64_C(0x80cf9bede388fb63) /* 969 */,
+ U64_C(0x1881539a116cf19e) /* 970 */, U64_C(0x5103f3f76bd52457) /* 971 */,
+ U64_C(0x15b7e6f5ae47f7a8) /* 972 */, U64_C(0xdbd7c6ded47e9ccf) /* 973 */,
+ U64_C(0x44e55c410228bb1a) /* 974 */, U64_C(0xb647d4255edb4e99) /* 975 */,
+ U64_C(0x5d11882bb8aafc30) /* 976 */, U64_C(0xf5098bbb29d3212a) /* 977 */,
+ U64_C(0x8fb5ea14e90296b3) /* 978 */, U64_C(0x677b942157dd025a) /* 979 */,
+ U64_C(0xfb58e7c0a390acb5) /* 980 */, U64_C(0x89d3674c83bd4a01) /* 981 */,
+ U64_C(0x9e2da4df4bf3b93b) /* 982 */, U64_C(0xfcc41e328cab4829) /* 983 */,
+ U64_C(0x03f38c96ba582c52) /* 984 */, U64_C(0xcad1bdbd7fd85db2) /* 985 */,
+ U64_C(0xbbb442c16082ae83) /* 986 */, U64_C(0xb95fe86ba5da9ab0) /* 987 */,
+ U64_C(0xb22e04673771a93f) /* 988 */, U64_C(0x845358c9493152d8) /* 989 */,
+ U64_C(0xbe2a488697b4541e) /* 990 */, U64_C(0x95a2dc2dd38e6966) /* 991 */,
+ U64_C(0xc02c11ac923c852b) /* 992 */, U64_C(0x2388b1990df2a87b) /* 993 */,
+ U64_C(0x7c8008fa1b4f37be) /* 994 */, U64_C(0x1f70d0c84d54e503) /* 995 */,
+ U64_C(0x5490adec7ece57d4) /* 996 */, U64_C(0x002b3c27d9063a3a) /* 997 */,
+ U64_C(0x7eaea3848030a2bf) /* 998 */, U64_C(0xc602326ded2003c0) /* 999 */,
+ U64_C(0x83a7287d69a94086) /* 1000 */, U64_C(0xc57a5fcb30f57a8a) /* 1001 */,
+ U64_C(0xb56844e479ebe779) /* 1002 */, U64_C(0xa373b40f05dcbce9) /* 1003 */,
+ U64_C(0xd71a786e88570ee2) /* 1004 */, U64_C(0x879cbacdbde8f6a0) /* 1005 */,
+ U64_C(0x976ad1bcc164a32f) /* 1006 */, U64_C(0xab21e25e9666d78b) /* 1007 */,
+ U64_C(0x901063aae5e5c33c) /* 1008 */, U64_C(0x9818b34448698d90) /* 1009 */,
+ U64_C(0xe36487ae3e1e8abb) /* 1010 */, U64_C(0xafbdf931893bdcb4) /* 1011 */,
+ U64_C(0x6345a0dc5fbbd519) /* 1012 */, U64_C(0x8628fe269b9465ca) /* 1013 */,
+ U64_C(0x1e5d01603f9c51ec) /* 1014 */, U64_C(0x4de44006a15049b7) /* 1015 */,
+ U64_C(0xbf6c70e5f776cbb1) /* 1016 */, U64_C(0x411218f2ef552bed) /* 1017 */,
+ U64_C(0xcb0c0708705a36a3) /* 1018 */, U64_C(0xe74d14754f986044) /* 1019 */,
+ U64_C(0xcd56d9430ea8280e) /* 1020 */, U64_C(0xc12591d7535f5065) /* 1021 */,
+ U64_C(0xc83223f1720aef96) /* 1022 */, U64_C(0xc3a0396f7363a51f) /* 1023 */
+};
+
+static void
+tiger_init( void *context )
+{
+ TIGER_CONTEXT *hd = context;
+
+ hd->a = 0x0123456789abcdefLL;
+ hd->b = 0xfedcba9876543210LL;
+ hd->c = 0xf096a5b4c3b2e187LL;
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+static void
+tiger_round( u64 *ra, u64 *rb, u64 *rc, u64 x, int mul )
+{
+ u64 a = *ra;
+ u64 b = *rb;
+ u64 c = *rc;
+
+ c ^= x;
+ a -= ( sbox1[ c & 0xff ] ^ sbox2[ (c >> 16) & 0xff ]
+ ^ sbox3[ (c >> 32) & 0xff ] ^ sbox4[ (c >> 48) & 0xff ]);
+ b += ( sbox4[ (c >> 8) & 0xff ] ^ sbox3[ (c >> 24) & 0xff ]
+ ^ sbox2[ (c >> 40) & 0xff ] ^ sbox1[ (c >> 56) & 0xff ]);
+ b *= mul;
+
+ *ra = a;
+ *rb = b;
+ *rc = c;
+}
+
+
+static void
+pass( u64 *ra, u64 *rb, u64 *rc, u64 *x, int mul )
+{
+ u64 a = *ra;
+ u64 b = *rb;
+ u64 c = *rc;
+
+ tiger_round( &a, &b, &c, x[0], mul );
+ tiger_round( &b, &c, &a, x[1], mul );
+ tiger_round( &c, &a, &b, x[2], mul );
+ tiger_round( &a, &b, &c, x[3], mul );
+ tiger_round( &b, &c, &a, x[4], mul );
+ tiger_round( &c, &a, &b, x[5], mul );
+ tiger_round( &a, &b, &c, x[6], mul );
+ tiger_round( &b, &c, &a, x[7], mul );
+
+ *ra = a;
+ *rb = b;
+ *rc = c;
+}
+
+
+static void
+key_schedule( u64 *x )
+{
+ x[0] -= x[7] ^ 0xa5a5a5a5a5a5a5a5LL;
+ x[1] ^= x[0];
+ x[2] += x[1];
+ x[3] -= x[2] ^ ((~x[1]) << 19 );
+ x[4] ^= x[3];
+ x[5] += x[4];
+ x[6] -= x[5] ^ ((~x[4]) >> 23 );
+ x[7] ^= x[6];
+ x[0] += x[7];
+ x[1] -= x[0] ^ ((~x[7]) << 19 );
+ x[2] ^= x[1];
+ x[3] += x[2];
+ x[4] -= x[3] ^ ((~x[2]) >> 23 );
+ x[5] ^= x[4];
+ x[6] += x[5];
+ x[7] -= x[6] ^ 0x0123456789abcdefLL;
+}
+
+
+/****************
+ * Transform the message DATA which consists of 512 bytes (8 words)
+ */
+static void
+transform ( TIGER_CONTEXT *hd, const unsigned char *data )
+{
+ u64 a,b,c,aa,bb,cc;
+ u64 x[8];
+#ifdef WORDS_BIGENDIAN
+#define MKWORD(d,n) \
+ ( ((u64)(d)[8*(n)+7]) << 56 | ((u64)(d)[8*(n)+6]) << 48 \
+ | ((u64)(d)[8*(n)+5]) << 40 | ((u64)(d)[8*(n)+4]) << 32 \
+ | ((u64)(d)[8*(n)+3]) << 24 | ((u64)(d)[8*(n)+2]) << 16 \
+ | ((u64)(d)[8*(n)+1]) << 8 | ((u64)(d)[8*(n) ]) )
+ x[0] = MKWORD(data, 0);
+ x[1] = MKWORD(data, 1);
+ x[2] = MKWORD(data, 2);
+ x[3] = MKWORD(data, 3);
+ x[4] = MKWORD(data, 4);
+ x[5] = MKWORD(data, 5);
+ x[6] = MKWORD(data, 6);
+ x[7] = MKWORD(data, 7);
+#undef MKWORD
+#else
+ memcpy( &x[0], data, 64 );
+#endif
+
+ /* save */
+ a = aa = hd->a;
+ b = bb = hd->b;
+ c = cc = hd->c;
+
+ pass( &a, &b, &c, x, 5);
+ key_schedule( x );
+ pass( &c, &a, &b, x, 7);
+ key_schedule( x );
+ pass( &b, &c, &a, x, 9);
+
+ /* feedforward */
+ a ^= aa;
+ b -= bb;
+ c += cc;
+ /* store */
+ hd->a = a;
+ hd->b = b;
+ hd->c = c;
+}
+
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+tiger_write ( void *context, const void *inbuf_arg, size_t inlen)
+{
+ const unsigned char *inbuf = inbuf_arg;
+ TIGER_CONTEXT *hd = context;
+
+ if( hd->count == 64 ) /* flush the buffer */
+ {
+ transform( hd, hd->buf );
+ _gcry_burn_stack (21*8+11*sizeof(void*));
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+ if( hd->count )
+ {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ tiger_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+
+ while( inlen >= 64 )
+ {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ _gcry_burn_stack (21*8+11*sizeof(void*));
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+
+
+/* The routine terminates the computation
+ */
+static void
+tiger_final( void *context )
+{
+ TIGER_CONTEXT *hd = context;
+ u32 t, msb, lsb;
+ byte *p;
+
+ tiger_write(hd, NULL, 0); /* flush */;
+
+ t = hd->nblocks;
+ /* multiply by 64 to make a byte count */
+ lsb = t << 6;
+ msb = t >> 26;
+ /* add the count */
+ t = lsb;
+ if( (lsb += hd->count) < t )
+ msb++;
+ /* multiply by 8 to make a bit count */
+ t = lsb;
+ lsb <<= 3;
+ msb <<= 3;
+ msb |= t >> 29;
+
+ if( hd->count < 56 ) /* enough room */
+ {
+ hd->buf[hd->count++] = 0x01; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else /* need one extra block */
+ {
+ hd->buf[hd->count++] = 0x01; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ tiger_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+ _gcry_burn_stack (21*8+11*sizeof(void*));
+
+ p = hd->buf;
+#ifdef WORDS_BIGENDIAN
+#define X(a) do { *(u64*)p = hd->a ; p += 8; } while(0)
+#else /* little endian */
+#define X(a) do { *p++ = hd->a >> 56; *p++ = hd->a >> 48; \
+ *p++ = hd->a >> 40; *p++ = hd->a >> 32; \
+ *p++ = hd->a >> 24; *p++ = hd->a >> 16; \
+ *p++ = hd->a >> 8; *p++ = hd->a; } while(0)
+#endif
+ X(a);
+ X(b);
+ X(c);
+#undef X
+}
+
+static byte *
+tiger_read( void *context )
+{
+ TIGER_CONTEXT *hd = context;
+
+ return hd->buf;
+}
+
+static byte asn[19] = /* Object ID is 1.3.6.1.4.1.11591.12.2 */
+ { 0x30, 0x29, 0x30, 0x0d, 0x06, 0x09, 0x2b, 0x06,
+ 0x01, 0x04, 0x01, 0xda, 0x47, 0x0c, 0x02,
+ 0x05, 0x00, 0x04, 0x18 };
+
+static gcry_md_oid_spec_t oid_spec_tiger[] =
+ {
+ /* GNU.digestAlgorithm TIGER */
+ { "1.3.6.1.4.1.11591.12.2" },
+ { NULL }
+ };
+
+gcry_md_spec_t _gcry_digest_spec_tiger =
+ {
+ "TIGER192", asn, DIM (asn), oid_spec_tiger, 24,
+ tiger_init, tiger_write, tiger_final, tiger_read,
+ sizeof (TIGER_CONTEXT)
+ };
+
+#endif /* HAVE_U64_TYPEDEF */
diff --git a/grub-core/lib/libgcrypt/cipher/twofish.c b/grub-core/lib/libgcrypt/cipher/twofish.c
new file mode 100644
index 0000000..5274c40
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/twofish.c
@@ -0,0 +1,1040 @@
+/* Twofish for GPG
+ * Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
+ * Written by Matthew Skala <mskala@ansuz.sooke.bc.ca>, July 26, 1998
+ * 256-bit key length added March 20, 1999
+ * Some modifications to reduce the text size by Werner Koch, April, 1998
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ ********************************************************************
+ *
+ * This code is a "clean room" implementation, written from the paper
+ * _Twofish: A 128-Bit Block Cipher_ by Bruce Schneier, John Kelsey,
+ * Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson, available
+ * through http://www.counterpane.com/twofish.html
+ *
+ * For background information on multiplication in finite fields, used for
+ * the matrix operations in the key schedule, see the book _Contemporary
+ * Abstract Algebra_ by Joseph A. Gallian, especially chapter 22 in the
+ * Third Edition.
+ *
+ * Only the 128- and 256-bit key sizes are supported. This code is intended
+ * for GNU C on a 32-bit system, but it should work almost anywhere. Loops
+ * are unrolled, precomputation tables are used, etc., for maximum speed at
+ * some cost in memory consumption. */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h> /* for memcmp() */
+
+#include "types.h" /* for byte and u32 typedefs */
+#include "g10lib.h"
+#include "cipher.h"
+
+/* Prototype for the self-test function. */
+static const char *selftest(void);
+
+/* Structure for an expanded Twofish key. s contains the key-dependent
+ * S-boxes composed with the MDS matrix; w contains the eight "whitening"
+ * subkeys, K[0] through K[7]. k holds the remaining, "round" subkeys. Note
+ * that k[i] corresponds to what the Twofish paper calls K[i+8]. */
+typedef struct {
+ u32 s[4][256], w[8], k[32];
+} TWOFISH_context;
+
+/* These two tables are the q0 and q1 permutations, exactly as described in
+ * the Twofish paper. */
+
+static const byte q0[256] = {
+ 0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78,
+ 0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C,
+ 0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30,
+ 0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82,
+ 0x63, 0x01, 0x83, 0x2E, 0xD9, 0x51, 0x9B, 0x7C, 0xA6, 0xEB, 0xA5, 0xBE,
+ 0x16, 0x0C, 0xE3, 0x61, 0xC0, 0x8C, 0x3A, 0xF5, 0x73, 0x2C, 0x25, 0x0B,
+ 0xBB, 0x4E, 0x89, 0x6B, 0x53, 0x6A, 0xB4, 0xF1, 0xE1, 0xE6, 0xBD, 0x45,
+ 0xE2, 0xF4, 0xB6, 0x66, 0xCC, 0x95, 0x03, 0x56, 0xD4, 0x1C, 0x1E, 0xD7,
+ 0xFB, 0xC3, 0x8E, 0xB5, 0xE9, 0xCF, 0xBF, 0xBA, 0xEA, 0x77, 0x39, 0xAF,
+ 0x33, 0xC9, 0x62, 0x71, 0x81, 0x79, 0x09, 0xAD, 0x24, 0xCD, 0xF9, 0xD8,
+ 0xE5, 0xC5, 0xB9, 0x4D, 0x44, 0x08, 0x86, 0xE7, 0xA1, 0x1D, 0xAA, 0xED,
+ 0x06, 0x70, 0xB2, 0xD2, 0x41, 0x7B, 0xA0, 0x11, 0x31, 0xC2, 0x27, 0x90,
+ 0x20, 0xF6, 0x60, 0xFF, 0x96, 0x5C, 0xB1, 0xAB, 0x9E, 0x9C, 0x52, 0x1B,
+ 0x5F, 0x93, 0x0A, 0xEF, 0x91, 0x85, 0x49, 0xEE, 0x2D, 0x4F, 0x8F, 0x3B,
+ 0x47, 0x87, 0x6D, 0x46, 0xD6, 0x3E, 0x69, 0x64, 0x2A, 0xCE, 0xCB, 0x2F,
+ 0xFC, 0x97, 0x05, 0x7A, 0xAC, 0x7F, 0xD5, 0x1A, 0x4B, 0x0E, 0xA7, 0x5A,
+ 0x28, 0x14, 0x3F, 0x29, 0x88, 0x3C, 0x4C, 0x02, 0xB8, 0xDA, 0xB0, 0x17,
+ 0x55, 0x1F, 0x8A, 0x7D, 0x57, 0xC7, 0x8D, 0x74, 0xB7, 0xC4, 0x9F, 0x72,
+ 0x7E, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, 0x6E, 0x50, 0xDE, 0x68,
+ 0x65, 0xBC, 0xDB, 0xF8, 0xC8, 0xA8, 0x2B, 0x40, 0xDC, 0xFE, 0x32, 0xA4,
+ 0xCA, 0x10, 0x21, 0xF0, 0xD3, 0x5D, 0x0F, 0x00, 0x6F, 0x9D, 0x36, 0x42,
+ 0x4A, 0x5E, 0xC1, 0xE0
+};
+
+static const byte q1[256] = {
+ 0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B,
+ 0x45, 0x7D, 0xE8, 0x4B, 0xD6, 0x32, 0xD8, 0xFD, 0x37, 0x71, 0xF1, 0xE1,
+ 0x30, 0x0F, 0xF8, 0x1B, 0x87, 0xFA, 0x06, 0x3F, 0x5E, 0xBA, 0xAE, 0x5B,
+ 0x8A, 0x00, 0xBC, 0x9D, 0x6D, 0xC1, 0xB1, 0x0E, 0x80, 0x5D, 0xD2, 0xD5,
+ 0xA0, 0x84, 0x07, 0x14, 0xB5, 0x90, 0x2C, 0xA3, 0xB2, 0x73, 0x4C, 0x54,
+ 0x92, 0x74, 0x36, 0x51, 0x38, 0xB0, 0xBD, 0x5A, 0xFC, 0x60, 0x62, 0x96,
+ 0x6C, 0x42, 0xF7, 0x10, 0x7C, 0x28, 0x27, 0x8C, 0x13, 0x95, 0x9C, 0xC7,
+ 0x24, 0x46, 0x3B, 0x70, 0xCA, 0xE3, 0x85, 0xCB, 0x11, 0xD0, 0x93, 0xB8,
+ 0xA6, 0x83, 0x20, 0xFF, 0x9F, 0x77, 0xC3, 0xCC, 0x03, 0x6F, 0x08, 0xBF,
+ 0x40, 0xE7, 0x2B, 0xE2, 0x79, 0x0C, 0xAA, 0x82, 0x41, 0x3A, 0xEA, 0xB9,
+ 0xE4, 0x9A, 0xA4, 0x97, 0x7E, 0xDA, 0x7A, 0x17, 0x66, 0x94, 0xA1, 0x1D,
+ 0x3D, 0xF0, 0xDE, 0xB3, 0x0B, 0x72, 0xA7, 0x1C, 0xEF, 0xD1, 0x53, 0x3E,
+ 0x8F, 0x33, 0x26, 0x5F, 0xEC, 0x76, 0x2A, 0x49, 0x81, 0x88, 0xEE, 0x21,
+ 0xC4, 0x1A, 0xEB, 0xD9, 0xC5, 0x39, 0x99, 0xCD, 0xAD, 0x31, 0x8B, 0x01,
+ 0x18, 0x23, 0xDD, 0x1F, 0x4E, 0x2D, 0xF9, 0x48, 0x4F, 0xF2, 0x65, 0x8E,
+ 0x78, 0x5C, 0x58, 0x19, 0x8D, 0xE5, 0x98, 0x57, 0x67, 0x7F, 0x05, 0x64,
+ 0xAF, 0x63, 0xB6, 0xFE, 0xF5, 0xB7, 0x3C, 0xA5, 0xCE, 0xE9, 0x68, 0x44,
+ 0xE0, 0x4D, 0x43, 0x69, 0x29, 0x2E, 0xAC, 0x15, 0x59, 0xA8, 0x0A, 0x9E,
+ 0x6E, 0x47, 0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B,
+ 0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9,
+ 0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56,
+ 0x55, 0x09, 0xBE, 0x91
+};
+
+/* These MDS tables are actually tables of MDS composed with q0 and q1,
+ * because it is only ever used that way and we can save some time by
+ * precomputing. Of course the main saving comes from precomputing the
+ * GF(2^8) multiplication involved in the MDS matrix multiply; by looking
+ * things up in these tables we reduce the matrix multiply to four lookups
+ * and three XORs. Semi-formally, the definition of these tables is:
+ * mds[0][i] = MDS (q1[i] 0 0 0)^T mds[1][i] = MDS (0 q0[i] 0 0)^T
+ * mds[2][i] = MDS (0 0 q1[i] 0)^T mds[3][i] = MDS (0 0 0 q0[i])^T
+ * where ^T means "transpose", the matrix multiply is performed in GF(2^8)
+ * represented as GF(2)[x]/v(x) where v(x)=x^8+x^6+x^5+x^3+1 as described
+ * by Schneier et al, and I'm casually glossing over the byte/word
+ * conversion issues. */
+
+static const u32 mds[4][256] = {
+ {0xBCBC3275, 0xECEC21F3, 0x202043C6, 0xB3B3C9F4, 0xDADA03DB, 0x02028B7B,
+ 0xE2E22BFB, 0x9E9EFAC8, 0xC9C9EC4A, 0xD4D409D3, 0x18186BE6, 0x1E1E9F6B,
+ 0x98980E45, 0xB2B2387D, 0xA6A6D2E8, 0x2626B74B, 0x3C3C57D6, 0x93938A32,
+ 0x8282EED8, 0x525298FD, 0x7B7BD437, 0xBBBB3771, 0x5B5B97F1, 0x474783E1,
+ 0x24243C30, 0x5151E20F, 0xBABAC6F8, 0x4A4AF31B, 0xBFBF4887, 0x0D0D70FA,
+ 0xB0B0B306, 0x7575DE3F, 0xD2D2FD5E, 0x7D7D20BA, 0x666631AE, 0x3A3AA35B,
+ 0x59591C8A, 0x00000000, 0xCDCD93BC, 0x1A1AE09D, 0xAEAE2C6D, 0x7F7FABC1,
+ 0x2B2BC7B1, 0xBEBEB90E, 0xE0E0A080, 0x8A8A105D, 0x3B3B52D2, 0x6464BAD5,
+ 0xD8D888A0, 0xE7E7A584, 0x5F5FE807, 0x1B1B1114, 0x2C2CC2B5, 0xFCFCB490,
+ 0x3131272C, 0x808065A3, 0x73732AB2, 0x0C0C8173, 0x79795F4C, 0x6B6B4154,
+ 0x4B4B0292, 0x53536974, 0x94948F36, 0x83831F51, 0x2A2A3638, 0xC4C49CB0,
+ 0x2222C8BD, 0xD5D5F85A, 0xBDBDC3FC, 0x48487860, 0xFFFFCE62, 0x4C4C0796,
+ 0x4141776C, 0xC7C7E642, 0xEBEB24F7, 0x1C1C1410, 0x5D5D637C, 0x36362228,
+ 0x6767C027, 0xE9E9AF8C, 0x4444F913, 0x1414EA95, 0xF5F5BB9C, 0xCFCF18C7,
+ 0x3F3F2D24, 0xC0C0E346, 0x7272DB3B, 0x54546C70, 0x29294CCA, 0xF0F035E3,
+ 0x0808FE85, 0xC6C617CB, 0xF3F34F11, 0x8C8CE4D0, 0xA4A45993, 0xCACA96B8,
+ 0x68683BA6, 0xB8B84D83, 0x38382820, 0xE5E52EFF, 0xADAD569F, 0x0B0B8477,
+ 0xC8C81DC3, 0x9999FFCC, 0x5858ED03, 0x19199A6F, 0x0E0E0A08, 0x95957EBF,
+ 0x70705040, 0xF7F730E7, 0x6E6ECF2B, 0x1F1F6EE2, 0xB5B53D79, 0x09090F0C,
+ 0x616134AA, 0x57571682, 0x9F9F0B41, 0x9D9D803A, 0x111164EA, 0x2525CDB9,
+ 0xAFAFDDE4, 0x4545089A, 0xDFDF8DA4, 0xA3A35C97, 0xEAEAD57E, 0x353558DA,
+ 0xEDEDD07A, 0x4343FC17, 0xF8F8CB66, 0xFBFBB194, 0x3737D3A1, 0xFAFA401D,
+ 0xC2C2683D, 0xB4B4CCF0, 0x32325DDE, 0x9C9C71B3, 0x5656E70B, 0xE3E3DA72,
+ 0x878760A7, 0x15151B1C, 0xF9F93AEF, 0x6363BFD1, 0x3434A953, 0x9A9A853E,
+ 0xB1B1428F, 0x7C7CD133, 0x88889B26, 0x3D3DA65F, 0xA1A1D7EC, 0xE4E4DF76,
+ 0x8181942A, 0x91910149, 0x0F0FFB81, 0xEEEEAA88, 0x161661EE, 0xD7D77321,
+ 0x9797F5C4, 0xA5A5A81A, 0xFEFE3FEB, 0x6D6DB5D9, 0x7878AEC5, 0xC5C56D39,
+ 0x1D1DE599, 0x7676A4CD, 0x3E3EDCAD, 0xCBCB6731, 0xB6B6478B, 0xEFEF5B01,
+ 0x12121E18, 0x6060C523, 0x6A6AB0DD, 0x4D4DF61F, 0xCECEE94E, 0xDEDE7C2D,
+ 0x55559DF9, 0x7E7E5A48, 0x2121B24F, 0x03037AF2, 0xA0A02665, 0x5E5E198E,
+ 0x5A5A6678, 0x65654B5C, 0x62624E58, 0xFDFD4519, 0x0606F48D, 0x404086E5,
+ 0xF2F2BE98, 0x3333AC57, 0x17179067, 0x05058E7F, 0xE8E85E05, 0x4F4F7D64,
+ 0x89896AAF, 0x10109563, 0x74742FB6, 0x0A0A75FE, 0x5C5C92F5, 0x9B9B74B7,
+ 0x2D2D333C, 0x3030D6A5, 0x2E2E49CE, 0x494989E9, 0x46467268, 0x77775544,
+ 0xA8A8D8E0, 0x9696044D, 0x2828BD43, 0xA9A92969, 0xD9D97929, 0x8686912E,
+ 0xD1D187AC, 0xF4F44A15, 0x8D8D1559, 0xD6D682A8, 0xB9B9BC0A, 0x42420D9E,
+ 0xF6F6C16E, 0x2F2FB847, 0xDDDD06DF, 0x23233934, 0xCCCC6235, 0xF1F1C46A,
+ 0xC1C112CF, 0x8585EBDC, 0x8F8F9E22, 0x7171A1C9, 0x9090F0C0, 0xAAAA539B,
+ 0x0101F189, 0x8B8BE1D4, 0x4E4E8CED, 0x8E8E6FAB, 0xABABA212, 0x6F6F3EA2,
+ 0xE6E6540D, 0xDBDBF252, 0x92927BBB, 0xB7B7B602, 0x6969CA2F, 0x3939D9A9,
+ 0xD3D30CD7, 0xA7A72361, 0xA2A2AD1E, 0xC3C399B4, 0x6C6C4450, 0x07070504,
+ 0x04047FF6, 0x272746C2, 0xACACA716, 0xD0D07625, 0x50501386, 0xDCDCF756,
+ 0x84841A55, 0xE1E15109, 0x7A7A25BE, 0x1313EF91},
+
+ {0xA9D93939, 0x67901717, 0xB3719C9C, 0xE8D2A6A6, 0x04050707, 0xFD985252,
+ 0xA3658080, 0x76DFE4E4, 0x9A084545, 0x92024B4B, 0x80A0E0E0, 0x78665A5A,
+ 0xE4DDAFAF, 0xDDB06A6A, 0xD1BF6363, 0x38362A2A, 0x0D54E6E6, 0xC6432020,
+ 0x3562CCCC, 0x98BEF2F2, 0x181E1212, 0xF724EBEB, 0xECD7A1A1, 0x6C774141,
+ 0x43BD2828, 0x7532BCBC, 0x37D47B7B, 0x269B8888, 0xFA700D0D, 0x13F94444,
+ 0x94B1FBFB, 0x485A7E7E, 0xF27A0303, 0xD0E48C8C, 0x8B47B6B6, 0x303C2424,
+ 0x84A5E7E7, 0x54416B6B, 0xDF06DDDD, 0x23C56060, 0x1945FDFD, 0x5BA33A3A,
+ 0x3D68C2C2, 0x59158D8D, 0xF321ECEC, 0xAE316666, 0xA23E6F6F, 0x82165757,
+ 0x63951010, 0x015BEFEF, 0x834DB8B8, 0x2E918686, 0xD9B56D6D, 0x511F8383,
+ 0x9B53AAAA, 0x7C635D5D, 0xA63B6868, 0xEB3FFEFE, 0xA5D63030, 0xBE257A7A,
+ 0x16A7ACAC, 0x0C0F0909, 0xE335F0F0, 0x6123A7A7, 0xC0F09090, 0x8CAFE9E9,
+ 0x3A809D9D, 0xF5925C5C, 0x73810C0C, 0x2C273131, 0x2576D0D0, 0x0BE75656,
+ 0xBB7B9292, 0x4EE9CECE, 0x89F10101, 0x6B9F1E1E, 0x53A93434, 0x6AC4F1F1,
+ 0xB499C3C3, 0xF1975B5B, 0xE1834747, 0xE66B1818, 0xBDC82222, 0x450E9898,
+ 0xE26E1F1F, 0xF4C9B3B3, 0xB62F7474, 0x66CBF8F8, 0xCCFF9999, 0x95EA1414,
+ 0x03ED5858, 0x56F7DCDC, 0xD4E18B8B, 0x1C1B1515, 0x1EADA2A2, 0xD70CD3D3,
+ 0xFB2BE2E2, 0xC31DC8C8, 0x8E195E5E, 0xB5C22C2C, 0xE9894949, 0xCF12C1C1,
+ 0xBF7E9595, 0xBA207D7D, 0xEA641111, 0x77840B0B, 0x396DC5C5, 0xAF6A8989,
+ 0x33D17C7C, 0xC9A17171, 0x62CEFFFF, 0x7137BBBB, 0x81FB0F0F, 0x793DB5B5,
+ 0x0951E1E1, 0xADDC3E3E, 0x242D3F3F, 0xCDA47676, 0xF99D5555, 0xD8EE8282,
+ 0xE5864040, 0xC5AE7878, 0xB9CD2525, 0x4D049696, 0x44557777, 0x080A0E0E,
+ 0x86135050, 0xE730F7F7, 0xA1D33737, 0x1D40FAFA, 0xAA346161, 0xED8C4E4E,
+ 0x06B3B0B0, 0x706C5454, 0xB22A7373, 0xD2523B3B, 0x410B9F9F, 0x7B8B0202,
+ 0xA088D8D8, 0x114FF3F3, 0x3167CBCB, 0xC2462727, 0x27C06767, 0x90B4FCFC,
+ 0x20283838, 0xF67F0404, 0x60784848, 0xFF2EE5E5, 0x96074C4C, 0x5C4B6565,
+ 0xB1C72B2B, 0xAB6F8E8E, 0x9E0D4242, 0x9CBBF5F5, 0x52F2DBDB, 0x1BF34A4A,
+ 0x5FA63D3D, 0x9359A4A4, 0x0ABCB9B9, 0xEF3AF9F9, 0x91EF1313, 0x85FE0808,
+ 0x49019191, 0xEE611616, 0x2D7CDEDE, 0x4FB22121, 0x8F42B1B1, 0x3BDB7272,
+ 0x47B82F2F, 0x8748BFBF, 0x6D2CAEAE, 0x46E3C0C0, 0xD6573C3C, 0x3E859A9A,
+ 0x6929A9A9, 0x647D4F4F, 0x2A948181, 0xCE492E2E, 0xCB17C6C6, 0x2FCA6969,
+ 0xFCC3BDBD, 0x975CA3A3, 0x055EE8E8, 0x7AD0EDED, 0xAC87D1D1, 0x7F8E0505,
+ 0xD5BA6464, 0x1AA8A5A5, 0x4BB72626, 0x0EB9BEBE, 0xA7608787, 0x5AF8D5D5,
+ 0x28223636, 0x14111B1B, 0x3FDE7575, 0x2979D9D9, 0x88AAEEEE, 0x3C332D2D,
+ 0x4C5F7979, 0x02B6B7B7, 0xB896CACA, 0xDA583535, 0xB09CC4C4, 0x17FC4343,
+ 0x551A8484, 0x1FF64D4D, 0x8A1C5959, 0x7D38B2B2, 0x57AC3333, 0xC718CFCF,
+ 0x8DF40606, 0x74695353, 0xB7749B9B, 0xC4F59797, 0x9F56ADAD, 0x72DAE3E3,
+ 0x7ED5EAEA, 0x154AF4F4, 0x229E8F8F, 0x12A2ABAB, 0x584E6262, 0x07E85F5F,
+ 0x99E51D1D, 0x34392323, 0x6EC1F6F6, 0x50446C6C, 0xDE5D3232, 0x68724646,
+ 0x6526A0A0, 0xBC93CDCD, 0xDB03DADA, 0xF8C6BABA, 0xC8FA9E9E, 0xA882D6D6,
+ 0x2BCF6E6E, 0x40507070, 0xDCEB8585, 0xFE750A0A, 0x328A9393, 0xA48DDFDF,
+ 0xCA4C2929, 0x10141C1C, 0x2173D7D7, 0xF0CCB4B4, 0xD309D4D4, 0x5D108A8A,
+ 0x0FE25151, 0x00000000, 0x6F9A1919, 0x9DE01A1A, 0x368F9494, 0x42E6C7C7,
+ 0x4AECC9C9, 0x5EFDD2D2, 0xC1AB7F7F, 0xE0D8A8A8},
+
+ {0xBC75BC32, 0xECF3EC21, 0x20C62043, 0xB3F4B3C9, 0xDADBDA03, 0x027B028B,
+ 0xE2FBE22B, 0x9EC89EFA, 0xC94AC9EC, 0xD4D3D409, 0x18E6186B, 0x1E6B1E9F,
+ 0x9845980E, 0xB27DB238, 0xA6E8A6D2, 0x264B26B7, 0x3CD63C57, 0x9332938A,
+ 0x82D882EE, 0x52FD5298, 0x7B377BD4, 0xBB71BB37, 0x5BF15B97, 0x47E14783,
+ 0x2430243C, 0x510F51E2, 0xBAF8BAC6, 0x4A1B4AF3, 0xBF87BF48, 0x0DFA0D70,
+ 0xB006B0B3, 0x753F75DE, 0xD25ED2FD, 0x7DBA7D20, 0x66AE6631, 0x3A5B3AA3,
+ 0x598A591C, 0x00000000, 0xCDBCCD93, 0x1A9D1AE0, 0xAE6DAE2C, 0x7FC17FAB,
+ 0x2BB12BC7, 0xBE0EBEB9, 0xE080E0A0, 0x8A5D8A10, 0x3BD23B52, 0x64D564BA,
+ 0xD8A0D888, 0xE784E7A5, 0x5F075FE8, 0x1B141B11, 0x2CB52CC2, 0xFC90FCB4,
+ 0x312C3127, 0x80A38065, 0x73B2732A, 0x0C730C81, 0x794C795F, 0x6B546B41,
+ 0x4B924B02, 0x53745369, 0x9436948F, 0x8351831F, 0x2A382A36, 0xC4B0C49C,
+ 0x22BD22C8, 0xD55AD5F8, 0xBDFCBDC3, 0x48604878, 0xFF62FFCE, 0x4C964C07,
+ 0x416C4177, 0xC742C7E6, 0xEBF7EB24, 0x1C101C14, 0x5D7C5D63, 0x36283622,
+ 0x672767C0, 0xE98CE9AF, 0x441344F9, 0x149514EA, 0xF59CF5BB, 0xCFC7CF18,
+ 0x3F243F2D, 0xC046C0E3, 0x723B72DB, 0x5470546C, 0x29CA294C, 0xF0E3F035,
+ 0x088508FE, 0xC6CBC617, 0xF311F34F, 0x8CD08CE4, 0xA493A459, 0xCAB8CA96,
+ 0x68A6683B, 0xB883B84D, 0x38203828, 0xE5FFE52E, 0xAD9FAD56, 0x0B770B84,
+ 0xC8C3C81D, 0x99CC99FF, 0x580358ED, 0x196F199A, 0x0E080E0A, 0x95BF957E,
+ 0x70407050, 0xF7E7F730, 0x6E2B6ECF, 0x1FE21F6E, 0xB579B53D, 0x090C090F,
+ 0x61AA6134, 0x57825716, 0x9F419F0B, 0x9D3A9D80, 0x11EA1164, 0x25B925CD,
+ 0xAFE4AFDD, 0x459A4508, 0xDFA4DF8D, 0xA397A35C, 0xEA7EEAD5, 0x35DA3558,
+ 0xED7AEDD0, 0x431743FC, 0xF866F8CB, 0xFB94FBB1, 0x37A137D3, 0xFA1DFA40,
+ 0xC23DC268, 0xB4F0B4CC, 0x32DE325D, 0x9CB39C71, 0x560B56E7, 0xE372E3DA,
+ 0x87A78760, 0x151C151B, 0xF9EFF93A, 0x63D163BF, 0x345334A9, 0x9A3E9A85,
+ 0xB18FB142, 0x7C337CD1, 0x8826889B, 0x3D5F3DA6, 0xA1ECA1D7, 0xE476E4DF,
+ 0x812A8194, 0x91499101, 0x0F810FFB, 0xEE88EEAA, 0x16EE1661, 0xD721D773,
+ 0x97C497F5, 0xA51AA5A8, 0xFEEBFE3F, 0x6DD96DB5, 0x78C578AE, 0xC539C56D,
+ 0x1D991DE5, 0x76CD76A4, 0x3EAD3EDC, 0xCB31CB67, 0xB68BB647, 0xEF01EF5B,
+ 0x1218121E, 0x602360C5, 0x6ADD6AB0, 0x4D1F4DF6, 0xCE4ECEE9, 0xDE2DDE7C,
+ 0x55F9559D, 0x7E487E5A, 0x214F21B2, 0x03F2037A, 0xA065A026, 0x5E8E5E19,
+ 0x5A785A66, 0x655C654B, 0x6258624E, 0xFD19FD45, 0x068D06F4, 0x40E54086,
+ 0xF298F2BE, 0x335733AC, 0x17671790, 0x057F058E, 0xE805E85E, 0x4F644F7D,
+ 0x89AF896A, 0x10631095, 0x74B6742F, 0x0AFE0A75, 0x5CF55C92, 0x9BB79B74,
+ 0x2D3C2D33, 0x30A530D6, 0x2ECE2E49, 0x49E94989, 0x46684672, 0x77447755,
+ 0xA8E0A8D8, 0x964D9604, 0x284328BD, 0xA969A929, 0xD929D979, 0x862E8691,
+ 0xD1ACD187, 0xF415F44A, 0x8D598D15, 0xD6A8D682, 0xB90AB9BC, 0x429E420D,
+ 0xF66EF6C1, 0x2F472FB8, 0xDDDFDD06, 0x23342339, 0xCC35CC62, 0xF16AF1C4,
+ 0xC1CFC112, 0x85DC85EB, 0x8F228F9E, 0x71C971A1, 0x90C090F0, 0xAA9BAA53,
+ 0x018901F1, 0x8BD48BE1, 0x4EED4E8C, 0x8EAB8E6F, 0xAB12ABA2, 0x6FA26F3E,
+ 0xE60DE654, 0xDB52DBF2, 0x92BB927B, 0xB702B7B6, 0x692F69CA, 0x39A939D9,
+ 0xD3D7D30C, 0xA761A723, 0xA21EA2AD, 0xC3B4C399, 0x6C506C44, 0x07040705,
+ 0x04F6047F, 0x27C22746, 0xAC16ACA7, 0xD025D076, 0x50865013, 0xDC56DCF7,
+ 0x8455841A, 0xE109E151, 0x7ABE7A25, 0x139113EF},
+
+ {0xD939A9D9, 0x90176790, 0x719CB371, 0xD2A6E8D2, 0x05070405, 0x9852FD98,
+ 0x6580A365, 0xDFE476DF, 0x08459A08, 0x024B9202, 0xA0E080A0, 0x665A7866,
+ 0xDDAFE4DD, 0xB06ADDB0, 0xBF63D1BF, 0x362A3836, 0x54E60D54, 0x4320C643,
+ 0x62CC3562, 0xBEF298BE, 0x1E12181E, 0x24EBF724, 0xD7A1ECD7, 0x77416C77,
+ 0xBD2843BD, 0x32BC7532, 0xD47B37D4, 0x9B88269B, 0x700DFA70, 0xF94413F9,
+ 0xB1FB94B1, 0x5A7E485A, 0x7A03F27A, 0xE48CD0E4, 0x47B68B47, 0x3C24303C,
+ 0xA5E784A5, 0x416B5441, 0x06DDDF06, 0xC56023C5, 0x45FD1945, 0xA33A5BA3,
+ 0x68C23D68, 0x158D5915, 0x21ECF321, 0x3166AE31, 0x3E6FA23E, 0x16578216,
+ 0x95106395, 0x5BEF015B, 0x4DB8834D, 0x91862E91, 0xB56DD9B5, 0x1F83511F,
+ 0x53AA9B53, 0x635D7C63, 0x3B68A63B, 0x3FFEEB3F, 0xD630A5D6, 0x257ABE25,
+ 0xA7AC16A7, 0x0F090C0F, 0x35F0E335, 0x23A76123, 0xF090C0F0, 0xAFE98CAF,
+ 0x809D3A80, 0x925CF592, 0x810C7381, 0x27312C27, 0x76D02576, 0xE7560BE7,
+ 0x7B92BB7B, 0xE9CE4EE9, 0xF10189F1, 0x9F1E6B9F, 0xA93453A9, 0xC4F16AC4,
+ 0x99C3B499, 0x975BF197, 0x8347E183, 0x6B18E66B, 0xC822BDC8, 0x0E98450E,
+ 0x6E1FE26E, 0xC9B3F4C9, 0x2F74B62F, 0xCBF866CB, 0xFF99CCFF, 0xEA1495EA,
+ 0xED5803ED, 0xF7DC56F7, 0xE18BD4E1, 0x1B151C1B, 0xADA21EAD, 0x0CD3D70C,
+ 0x2BE2FB2B, 0x1DC8C31D, 0x195E8E19, 0xC22CB5C2, 0x8949E989, 0x12C1CF12,
+ 0x7E95BF7E, 0x207DBA20, 0x6411EA64, 0x840B7784, 0x6DC5396D, 0x6A89AF6A,
+ 0xD17C33D1, 0xA171C9A1, 0xCEFF62CE, 0x37BB7137, 0xFB0F81FB, 0x3DB5793D,
+ 0x51E10951, 0xDC3EADDC, 0x2D3F242D, 0xA476CDA4, 0x9D55F99D, 0xEE82D8EE,
+ 0x8640E586, 0xAE78C5AE, 0xCD25B9CD, 0x04964D04, 0x55774455, 0x0A0E080A,
+ 0x13508613, 0x30F7E730, 0xD337A1D3, 0x40FA1D40, 0x3461AA34, 0x8C4EED8C,
+ 0xB3B006B3, 0x6C54706C, 0x2A73B22A, 0x523BD252, 0x0B9F410B, 0x8B027B8B,
+ 0x88D8A088, 0x4FF3114F, 0x67CB3167, 0x4627C246, 0xC06727C0, 0xB4FC90B4,
+ 0x28382028, 0x7F04F67F, 0x78486078, 0x2EE5FF2E, 0x074C9607, 0x4B655C4B,
+ 0xC72BB1C7, 0x6F8EAB6F, 0x0D429E0D, 0xBBF59CBB, 0xF2DB52F2, 0xF34A1BF3,
+ 0xA63D5FA6, 0x59A49359, 0xBCB90ABC, 0x3AF9EF3A, 0xEF1391EF, 0xFE0885FE,
+ 0x01914901, 0x6116EE61, 0x7CDE2D7C, 0xB2214FB2, 0x42B18F42, 0xDB723BDB,
+ 0xB82F47B8, 0x48BF8748, 0x2CAE6D2C, 0xE3C046E3, 0x573CD657, 0x859A3E85,
+ 0x29A96929, 0x7D4F647D, 0x94812A94, 0x492ECE49, 0x17C6CB17, 0xCA692FCA,
+ 0xC3BDFCC3, 0x5CA3975C, 0x5EE8055E, 0xD0ED7AD0, 0x87D1AC87, 0x8E057F8E,
+ 0xBA64D5BA, 0xA8A51AA8, 0xB7264BB7, 0xB9BE0EB9, 0x6087A760, 0xF8D55AF8,
+ 0x22362822, 0x111B1411, 0xDE753FDE, 0x79D92979, 0xAAEE88AA, 0x332D3C33,
+ 0x5F794C5F, 0xB6B702B6, 0x96CAB896, 0x5835DA58, 0x9CC4B09C, 0xFC4317FC,
+ 0x1A84551A, 0xF64D1FF6, 0x1C598A1C, 0x38B27D38, 0xAC3357AC, 0x18CFC718,
+ 0xF4068DF4, 0x69537469, 0x749BB774, 0xF597C4F5, 0x56AD9F56, 0xDAE372DA,
+ 0xD5EA7ED5, 0x4AF4154A, 0x9E8F229E, 0xA2AB12A2, 0x4E62584E, 0xE85F07E8,
+ 0xE51D99E5, 0x39233439, 0xC1F66EC1, 0x446C5044, 0x5D32DE5D, 0x72466872,
+ 0x26A06526, 0x93CDBC93, 0x03DADB03, 0xC6BAF8C6, 0xFA9EC8FA, 0x82D6A882,
+ 0xCF6E2BCF, 0x50704050, 0xEB85DCEB, 0x750AFE75, 0x8A93328A, 0x8DDFA48D,
+ 0x4C29CA4C, 0x141C1014, 0x73D72173, 0xCCB4F0CC, 0x09D4D309, 0x108A5D10,
+ 0xE2510FE2, 0x00000000, 0x9A196F9A, 0xE01A9DE0, 0x8F94368F, 0xE6C742E6,
+ 0xECC94AEC, 0xFDD25EFD, 0xAB7FC1AB, 0xD8A8E0D8}
+};
+
+/* The exp_to_poly and poly_to_exp tables are used to perform efficient
+ * operations in GF(2^8) represented as GF(2)[x]/w(x) where
+ * w(x)=x^8+x^6+x^3+x^2+1. We care about doing that because it's part of the
+ * definition of the RS matrix in the key schedule. Elements of that field
+ * are polynomials of degree not greater than 7 and all coefficients 0 or 1,
+ * which can be represented naturally by bytes (just substitute x=2). In that
+ * form, GF(2^8) addition is the same as bitwise XOR, but GF(2^8)
+ * multiplication is inefficient without hardware support. To multiply
+ * faster, I make use of the fact x is a generator for the nonzero elements,
+ * so that every element p of GF(2)[x]/w(x) is either 0 or equal to (x)^n for
+ * some n in 0..254. Note that that caret is exponentiation in GF(2^8),
+ * *not* polynomial notation. So if I want to compute pq where p and q are
+ * in GF(2^8), I can just say:
+ * 1. if p=0 or q=0 then pq=0
+ * 2. otherwise, find m and n such that p=x^m and q=x^n
+ * 3. pq=(x^m)(x^n)=x^(m+n), so add m and n and find pq
+ * The translations in steps 2 and 3 are looked up in the tables
+ * poly_to_exp (for step 2) and exp_to_poly (for step 3). To see this
+ * in action, look at the CALC_S macro. As additional wrinkles, note that
+ * one of my operands is always a constant, so the poly_to_exp lookup on it
+ * is done in advance; I included the original values in the comments so
+ * readers can have some chance of recognizing that this *is* the RS matrix
+ * from the Twofish paper. I've only included the table entries I actually
+ * need; I never do a lookup on a variable input of zero and the biggest
+ * exponents I'll ever see are 254 (variable) and 237 (constant), so they'll
+ * never sum to more than 491. I'm repeating part of the exp_to_poly table
+ * so that I don't have to do mod-255 reduction in the exponent arithmetic.
+ * Since I know my constant operands are never zero, I only have to worry
+ * about zero values in the variable operand, and I do it with a simple
+ * conditional branch. I know conditionals are expensive, but I couldn't
+ * see a non-horrible way of avoiding them, and I did manage to group the
+ * statements so that each if covers four group multiplications. */
+
+static const byte poly_to_exp[255] = {
+ 0x00, 0x01, 0x17, 0x02, 0x2E, 0x18, 0x53, 0x03, 0x6A, 0x2F, 0x93, 0x19,
+ 0x34, 0x54, 0x45, 0x04, 0x5C, 0x6B, 0xB6, 0x30, 0xA6, 0x94, 0x4B, 0x1A,
+ 0x8C, 0x35, 0x81, 0x55, 0xAA, 0x46, 0x0D, 0x05, 0x24, 0x5D, 0x87, 0x6C,
+ 0x9B, 0xB7, 0xC1, 0x31, 0x2B, 0xA7, 0xA3, 0x95, 0x98, 0x4C, 0xCA, 0x1B,
+ 0xE6, 0x8D, 0x73, 0x36, 0xCD, 0x82, 0x12, 0x56, 0x62, 0xAB, 0xF0, 0x47,
+ 0x4F, 0x0E, 0xBD, 0x06, 0xD4, 0x25, 0xD2, 0x5E, 0x27, 0x88, 0x66, 0x6D,
+ 0xD6, 0x9C, 0x79, 0xB8, 0x08, 0xC2, 0xDF, 0x32, 0x68, 0x2C, 0xFD, 0xA8,
+ 0x8A, 0xA4, 0x5A, 0x96, 0x29, 0x99, 0x22, 0x4D, 0x60, 0xCB, 0xE4, 0x1C,
+ 0x7B, 0xE7, 0x3B, 0x8E, 0x9E, 0x74, 0xF4, 0x37, 0xD8, 0xCE, 0xF9, 0x83,
+ 0x6F, 0x13, 0xB2, 0x57, 0xE1, 0x63, 0xDC, 0xAC, 0xC4, 0xF1, 0xAF, 0x48,
+ 0x0A, 0x50, 0x42, 0x0F, 0xBA, 0xBE, 0xC7, 0x07, 0xDE, 0xD5, 0x78, 0x26,
+ 0x65, 0xD3, 0xD1, 0x5F, 0xE3, 0x28, 0x21, 0x89, 0x59, 0x67, 0xFC, 0x6E,
+ 0xB1, 0xD7, 0xF8, 0x9D, 0xF3, 0x7A, 0x3A, 0xB9, 0xC6, 0x09, 0x41, 0xC3,
+ 0xAE, 0xE0, 0xDB, 0x33, 0x44, 0x69, 0x92, 0x2D, 0x52, 0xFE, 0x16, 0xA9,
+ 0x0C, 0x8B, 0x80, 0xA5, 0x4A, 0x5B, 0xB5, 0x97, 0xC9, 0x2A, 0xA2, 0x9A,
+ 0xC0, 0x23, 0x86, 0x4E, 0xBC, 0x61, 0xEF, 0xCC, 0x11, 0xE5, 0x72, 0x1D,
+ 0x3D, 0x7C, 0xEB, 0xE8, 0xE9, 0x3C, 0xEA, 0x8F, 0x7D, 0x9F, 0xEC, 0x75,
+ 0x1E, 0xF5, 0x3E, 0x38, 0xF6, 0xD9, 0x3F, 0xCF, 0x76, 0xFA, 0x1F, 0x84,
+ 0xA0, 0x70, 0xED, 0x14, 0x90, 0xB3, 0x7E, 0x58, 0xFB, 0xE2, 0x20, 0x64,
+ 0xD0, 0xDD, 0x77, 0xAD, 0xDA, 0xC5, 0x40, 0xF2, 0x39, 0xB0, 0xF7, 0x49,
+ 0xB4, 0x0B, 0x7F, 0x51, 0x15, 0x43, 0x91, 0x10, 0x71, 0xBB, 0xEE, 0xBF,
+ 0x85, 0xC8, 0xA1
+};
+
+static const byte exp_to_poly[492] = {
+ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x4D, 0x9A, 0x79, 0xF2,
+ 0xA9, 0x1F, 0x3E, 0x7C, 0xF8, 0xBD, 0x37, 0x6E, 0xDC, 0xF5, 0xA7, 0x03,
+ 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xCD, 0xD7, 0xE3, 0x8B, 0x5B, 0xB6,
+ 0x21, 0x42, 0x84, 0x45, 0x8A, 0x59, 0xB2, 0x29, 0x52, 0xA4, 0x05, 0x0A,
+ 0x14, 0x28, 0x50, 0xA0, 0x0D, 0x1A, 0x34, 0x68, 0xD0, 0xED, 0x97, 0x63,
+ 0xC6, 0xC1, 0xCF, 0xD3, 0xEB, 0x9B, 0x7B, 0xF6, 0xA1, 0x0F, 0x1E, 0x3C,
+ 0x78, 0xF0, 0xAD, 0x17, 0x2E, 0x5C, 0xB8, 0x3D, 0x7A, 0xF4, 0xA5, 0x07,
+ 0x0E, 0x1C, 0x38, 0x70, 0xE0, 0x8D, 0x57, 0xAE, 0x11, 0x22, 0x44, 0x88,
+ 0x5D, 0xBA, 0x39, 0x72, 0xE4, 0x85, 0x47, 0x8E, 0x51, 0xA2, 0x09, 0x12,
+ 0x24, 0x48, 0x90, 0x6D, 0xDA, 0xF9, 0xBF, 0x33, 0x66, 0xCC, 0xD5, 0xE7,
+ 0x83, 0x4B, 0x96, 0x61, 0xC2, 0xC9, 0xDF, 0xF3, 0xAB, 0x1B, 0x36, 0x6C,
+ 0xD8, 0xFD, 0xB7, 0x23, 0x46, 0x8C, 0x55, 0xAA, 0x19, 0x32, 0x64, 0xC8,
+ 0xDD, 0xF7, 0xA3, 0x0B, 0x16, 0x2C, 0x58, 0xB0, 0x2D, 0x5A, 0xB4, 0x25,
+ 0x4A, 0x94, 0x65, 0xCA, 0xD9, 0xFF, 0xB3, 0x2B, 0x56, 0xAC, 0x15, 0x2A,
+ 0x54, 0xA8, 0x1D, 0x3A, 0x74, 0xE8, 0x9D, 0x77, 0xEE, 0x91, 0x6F, 0xDE,
+ 0xF1, 0xAF, 0x13, 0x26, 0x4C, 0x98, 0x7D, 0xFA, 0xB9, 0x3F, 0x7E, 0xFC,
+ 0xB5, 0x27, 0x4E, 0x9C, 0x75, 0xEA, 0x99, 0x7F, 0xFE, 0xB1, 0x2F, 0x5E,
+ 0xBC, 0x35, 0x6A, 0xD4, 0xE5, 0x87, 0x43, 0x86, 0x41, 0x82, 0x49, 0x92,
+ 0x69, 0xD2, 0xE9, 0x9F, 0x73, 0xE6, 0x81, 0x4F, 0x9E, 0x71, 0xE2, 0x89,
+ 0x5F, 0xBE, 0x31, 0x62, 0xC4, 0xC5, 0xC7, 0xC3, 0xCB, 0xDB, 0xFB, 0xBB,
+ 0x3B, 0x76, 0xEC, 0x95, 0x67, 0xCE, 0xD1, 0xEF, 0x93, 0x6B, 0xD6, 0xE1,
+ 0x8F, 0x53, 0xA6, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x4D,
+ 0x9A, 0x79, 0xF2, 0xA9, 0x1F, 0x3E, 0x7C, 0xF8, 0xBD, 0x37, 0x6E, 0xDC,
+ 0xF5, 0xA7, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xCD, 0xD7, 0xE3,
+ 0x8B, 0x5B, 0xB6, 0x21, 0x42, 0x84, 0x45, 0x8A, 0x59, 0xB2, 0x29, 0x52,
+ 0xA4, 0x05, 0x0A, 0x14, 0x28, 0x50, 0xA0, 0x0D, 0x1A, 0x34, 0x68, 0xD0,
+ 0xED, 0x97, 0x63, 0xC6, 0xC1, 0xCF, 0xD3, 0xEB, 0x9B, 0x7B, 0xF6, 0xA1,
+ 0x0F, 0x1E, 0x3C, 0x78, 0xF0, 0xAD, 0x17, 0x2E, 0x5C, 0xB8, 0x3D, 0x7A,
+ 0xF4, 0xA5, 0x07, 0x0E, 0x1C, 0x38, 0x70, 0xE0, 0x8D, 0x57, 0xAE, 0x11,
+ 0x22, 0x44, 0x88, 0x5D, 0xBA, 0x39, 0x72, 0xE4, 0x85, 0x47, 0x8E, 0x51,
+ 0xA2, 0x09, 0x12, 0x24, 0x48, 0x90, 0x6D, 0xDA, 0xF9, 0xBF, 0x33, 0x66,
+ 0xCC, 0xD5, 0xE7, 0x83, 0x4B, 0x96, 0x61, 0xC2, 0xC9, 0xDF, 0xF3, 0xAB,
+ 0x1B, 0x36, 0x6C, 0xD8, 0xFD, 0xB7, 0x23, 0x46, 0x8C, 0x55, 0xAA, 0x19,
+ 0x32, 0x64, 0xC8, 0xDD, 0xF7, 0xA3, 0x0B, 0x16, 0x2C, 0x58, 0xB0, 0x2D,
+ 0x5A, 0xB4, 0x25, 0x4A, 0x94, 0x65, 0xCA, 0xD9, 0xFF, 0xB3, 0x2B, 0x56,
+ 0xAC, 0x15, 0x2A, 0x54, 0xA8, 0x1D, 0x3A, 0x74, 0xE8, 0x9D, 0x77, 0xEE,
+ 0x91, 0x6F, 0xDE, 0xF1, 0xAF, 0x13, 0x26, 0x4C, 0x98, 0x7D, 0xFA, 0xB9,
+ 0x3F, 0x7E, 0xFC, 0xB5, 0x27, 0x4E, 0x9C, 0x75, 0xEA, 0x99, 0x7F, 0xFE,
+ 0xB1, 0x2F, 0x5E, 0xBC, 0x35, 0x6A, 0xD4, 0xE5, 0x87, 0x43, 0x86, 0x41,
+ 0x82, 0x49, 0x92, 0x69, 0xD2, 0xE9, 0x9F, 0x73, 0xE6, 0x81, 0x4F, 0x9E,
+ 0x71, 0xE2, 0x89, 0x5F, 0xBE, 0x31, 0x62, 0xC4, 0xC5, 0xC7, 0xC3, 0xCB
+};
+
+
+/* The table constants are indices of
+ * S-box entries, preprocessed through q0 and q1. */
+static byte calc_sb_tbl[512] = {
+ 0xA9, 0x75, 0x67, 0xF3, 0xB3, 0xC6, 0xE8, 0xF4,
+ 0x04, 0xDB, 0xFD, 0x7B, 0xA3, 0xFB, 0x76, 0xC8,
+ 0x9A, 0x4A, 0x92, 0xD3, 0x80, 0xE6, 0x78, 0x6B,
+ 0xE4, 0x45, 0xDD, 0x7D, 0xD1, 0xE8, 0x38, 0x4B,
+ 0x0D, 0xD6, 0xC6, 0x32, 0x35, 0xD8, 0x98, 0xFD,
+ 0x18, 0x37, 0xF7, 0x71, 0xEC, 0xF1, 0x6C, 0xE1,
+ 0x43, 0x30, 0x75, 0x0F, 0x37, 0xF8, 0x26, 0x1B,
+ 0xFA, 0x87, 0x13, 0xFA, 0x94, 0x06, 0x48, 0x3F,
+ 0xF2, 0x5E, 0xD0, 0xBA, 0x8B, 0xAE, 0x30, 0x5B,
+ 0x84, 0x8A, 0x54, 0x00, 0xDF, 0xBC, 0x23, 0x9D,
+ 0x19, 0x6D, 0x5B, 0xC1, 0x3D, 0xB1, 0x59, 0x0E,
+ 0xF3, 0x80, 0xAE, 0x5D, 0xA2, 0xD2, 0x82, 0xD5,
+ 0x63, 0xA0, 0x01, 0x84, 0x83, 0x07, 0x2E, 0x14,
+ 0xD9, 0xB5, 0x51, 0x90, 0x9B, 0x2C, 0x7C, 0xA3,
+ 0xA6, 0xB2, 0xEB, 0x73, 0xA5, 0x4C, 0xBE, 0x54,
+ 0x16, 0x92, 0x0C, 0x74, 0xE3, 0x36, 0x61, 0x51,
+ 0xC0, 0x38, 0x8C, 0xB0, 0x3A, 0xBD, 0xF5, 0x5A,
+ 0x73, 0xFC, 0x2C, 0x60, 0x25, 0x62, 0x0B, 0x96,
+ 0xBB, 0x6C, 0x4E, 0x42, 0x89, 0xF7, 0x6B, 0x10,
+ 0x53, 0x7C, 0x6A, 0x28, 0xB4, 0x27, 0xF1, 0x8C,
+ 0xE1, 0x13, 0xE6, 0x95, 0xBD, 0x9C, 0x45, 0xC7,
+ 0xE2, 0x24, 0xF4, 0x46, 0xB6, 0x3B, 0x66, 0x70,
+ 0xCC, 0xCA, 0x95, 0xE3, 0x03, 0x85, 0x56, 0xCB,
+ 0xD4, 0x11, 0x1C, 0xD0, 0x1E, 0x93, 0xD7, 0xB8,
+ 0xFB, 0xA6, 0xC3, 0x83, 0x8E, 0x20, 0xB5, 0xFF,
+ 0xE9, 0x9F, 0xCF, 0x77, 0xBF, 0xC3, 0xBA, 0xCC,
+ 0xEA, 0x03, 0x77, 0x6F, 0x39, 0x08, 0xAF, 0xBF,
+ 0x33, 0x40, 0xC9, 0xE7, 0x62, 0x2B, 0x71, 0xE2,
+ 0x81, 0x79, 0x79, 0x0C, 0x09, 0xAA, 0xAD, 0x82,
+ 0x24, 0x41, 0xCD, 0x3A, 0xF9, 0xEA, 0xD8, 0xB9,
+ 0xE5, 0xE4, 0xC5, 0x9A, 0xB9, 0xA4, 0x4D, 0x97,
+ 0x44, 0x7E, 0x08, 0xDA, 0x86, 0x7A, 0xE7, 0x17,
+ 0xA1, 0x66, 0x1D, 0x94, 0xAA, 0xA1, 0xED, 0x1D,
+ 0x06, 0x3D, 0x70, 0xF0, 0xB2, 0xDE, 0xD2, 0xB3,
+ 0x41, 0x0B, 0x7B, 0x72, 0xA0, 0xA7, 0x11, 0x1C,
+ 0x31, 0xEF, 0xC2, 0xD1, 0x27, 0x53, 0x90, 0x3E,
+ 0x20, 0x8F, 0xF6, 0x33, 0x60, 0x26, 0xFF, 0x5F,
+ 0x96, 0xEC, 0x5C, 0x76, 0xB1, 0x2A, 0xAB, 0x49,
+ 0x9E, 0x81, 0x9C, 0x88, 0x52, 0xEE, 0x1B, 0x21,
+ 0x5F, 0xC4, 0x93, 0x1A, 0x0A, 0xEB, 0xEF, 0xD9,
+ 0x91, 0xC5, 0x85, 0x39, 0x49, 0x99, 0xEE, 0xCD,
+ 0x2D, 0xAD, 0x4F, 0x31, 0x8F, 0x8B, 0x3B, 0x01,
+ 0x47, 0x18, 0x87, 0x23, 0x6D, 0xDD, 0x46, 0x1F,
+ 0xD6, 0x4E, 0x3E, 0x2D, 0x69, 0xF9, 0x64, 0x48,
+ 0x2A, 0x4F, 0xCE, 0xF2, 0xCB, 0x65, 0x2F, 0x8E,
+ 0xFC, 0x78, 0x97, 0x5C, 0x05, 0x58, 0x7A, 0x19,
+ 0xAC, 0x8D, 0x7F, 0xE5, 0xD5, 0x98, 0x1A, 0x57,
+ 0x4B, 0x67, 0x0E, 0x7F, 0xA7, 0x05, 0x5A, 0x64,
+ 0x28, 0xAF, 0x14, 0x63, 0x3F, 0xB6, 0x29, 0xFE,
+ 0x88, 0xF5, 0x3C, 0xB7, 0x4C, 0x3C, 0x02, 0xA5,
+ 0xB8, 0xCE, 0xDA, 0xE9, 0xB0, 0x68, 0x17, 0x44,
+ 0x55, 0xE0, 0x1F, 0x4D, 0x8A, 0x43, 0x7D, 0x69,
+ 0x57, 0x29, 0xC7, 0x2E, 0x8D, 0xAC, 0x74, 0x15,
+ 0xB7, 0x59, 0xC4, 0xA8, 0x9F, 0x0A, 0x72, 0x9E,
+ 0x7E, 0x6E, 0x15, 0x47, 0x22, 0xDF, 0x12, 0x34,
+ 0x58, 0x35, 0x07, 0x6A, 0x99, 0xCF, 0x34, 0xDC,
+ 0x6E, 0x22, 0x50, 0xC9, 0xDE, 0xC0, 0x68, 0x9B,
+ 0x65, 0x89, 0xBC, 0xD4, 0xDB, 0xED, 0xF8, 0xAB,
+ 0xC8, 0x12, 0xA8, 0xA2, 0x2B, 0x0D, 0x40, 0x52,
+ 0xDC, 0xBB, 0xFE, 0x02, 0x32, 0x2F, 0xA4, 0xA9,
+ 0xCA, 0xD7, 0x10, 0x61, 0x21, 0x1E, 0xF0, 0xB4,
+ 0xD3, 0x50, 0x5D, 0x04, 0x0F, 0xF6, 0x00, 0xC2,
+ 0x6F, 0x16, 0x9D, 0x25, 0x36, 0x86, 0x42, 0x56,
+ 0x4A, 0x55, 0x5E, 0x09, 0xC1, 0xBE, 0xE0, 0x91
+};
+/* Macro to perform one column of the RS matrix multiplication. The
+ * parameters a, b, c, and d are the four bytes of output; i is the index
+ * of the key bytes, and w, x, y, and z, are the column of constants from
+ * the RS matrix, preprocessed through the poly_to_exp table. */
+
+#define CALC_S(a, b, c, d, i, w, x, y, z) \
+ if (key[i]) { \
+ tmp = poly_to_exp[key[i] - 1]; \
+ (a) ^= exp_to_poly[tmp + (w)]; \
+ (b) ^= exp_to_poly[tmp + (x)]; \
+ (c) ^= exp_to_poly[tmp + (y)]; \
+ (d) ^= exp_to_poly[tmp + (z)]; \
+ }
+
+/* Macros to calculate the key-dependent S-boxes for a 128-bit key using
+ * the S vector from CALC_S. CALC_SB_2 computes a single entry in all
+ * four S-boxes, where i is the index of the entry to compute, and a and b
+ * are the index numbers preprocessed through the q0 and q1 tables
+ * respectively. CALC_SB is simply a convenience to make the code shorter;
+ * it calls CALC_SB_2 four times with consecutive indices from i to i+3,
+ * using the remaining parameters two by two. */
+
+#define CALC_SB_2(i, a, b) \
+ ctx->s[0][i] = mds[0][q0[(a) ^ sa] ^ se]; \
+ ctx->s[1][i] = mds[1][q0[(b) ^ sb] ^ sf]; \
+ ctx->s[2][i] = mds[2][q1[(a) ^ sc] ^ sg]; \
+ ctx->s[3][i] = mds[3][q1[(b) ^ sd] ^ sh]
+
+#define CALC_SB(i, a, b, c, d, e, f, g, h) \
+ CALC_SB_2 (i, a, b); CALC_SB_2 ((i)+1, c, d); \
+ CALC_SB_2 ((i)+2, e, f); CALC_SB_2 ((i)+3, g, h)
+
+/* Macros exactly like CALC_SB and CALC_SB_2, but for 256-bit keys. */
+
+#define CALC_SB256_2(i, a, b) \
+ ctx->s[0][i] = mds[0][q0[q0[q1[(b) ^ sa] ^ se] ^ si] ^ sm]; \
+ ctx->s[1][i] = mds[1][q0[q1[q1[(a) ^ sb] ^ sf] ^ sj] ^ sn]; \
+ ctx->s[2][i] = mds[2][q1[q0[q0[(a) ^ sc] ^ sg] ^ sk] ^ so]; \
+ ctx->s[3][i] = mds[3][q1[q1[q0[(b) ^ sd] ^ sh] ^ sl] ^ sp];
+
+#define CALC_SB256(i, a, b, c, d, e, f, g, h) \
+ CALC_SB256_2 (i, a, b); CALC_SB256_2 ((i)+1, c, d); \
+ CALC_SB256_2 ((i)+2, e, f); CALC_SB256_2 ((i)+3, g, h)
+
+/* Macros to calculate the whitening and round subkeys. CALC_K_2 computes the
+ * last two stages of the h() function for a given index (either 2i or 2i+1).
+ * a, b, c, and d are the four bytes going into the last two stages. For
+ * 128-bit keys, this is the entire h() function and a and c are the index
+ * preprocessed through q0 and q1 respectively; for longer keys they are the
+ * output of previous stages. j is the index of the first key byte to use.
+ * CALC_K computes a pair of subkeys for 128-bit Twofish, by calling CALC_K_2
+ * twice, doing the Psuedo-Hadamard Transform, and doing the necessary
+ * rotations. Its parameters are: a, the array to write the results into,
+ * j, the index of the first output entry, k and l, the preprocessed indices
+ * for index 2i, and m and n, the preprocessed indices for index 2i+1.
+ * CALC_K256_2 expands CALC_K_2 to handle 256-bit keys, by doing two
+ * additional lookup-and-XOR stages. The parameters a and b are the index
+ * preprocessed through q0 and q1 respectively; j is the index of the first
+ * key byte to use. CALC_K256 is identical to CALC_K but for using the
+ * CALC_K256_2 macro instead of CALC_K_2. */
+
+#define CALC_K_2(a, b, c, d, j) \
+ mds[0][q0[a ^ key[(j) + 8]] ^ key[j]] \
+ ^ mds[1][q0[b ^ key[(j) + 9]] ^ key[(j) + 1]] \
+ ^ mds[2][q1[c ^ key[(j) + 10]] ^ key[(j) + 2]] \
+ ^ mds[3][q1[d ^ key[(j) + 11]] ^ key[(j) + 3]]
+
+#define CALC_K(a, j, k, l, m, n) \
+ x = CALC_K_2 (k, l, k, l, 0); \
+ y = CALC_K_2 (m, n, m, n, 4); \
+ y = (y << 8) + (y >> 24); \
+ x += y; y += x; ctx->a[j] = x; \
+ ctx->a[(j) + 1] = (y << 9) + (y >> 23)
+
+#define CALC_K256_2(a, b, j) \
+ CALC_K_2 (q0[q1[b ^ key[(j) + 24]] ^ key[(j) + 16]], \
+ q1[q1[a ^ key[(j) + 25]] ^ key[(j) + 17]], \
+ q0[q0[a ^ key[(j) + 26]] ^ key[(j) + 18]], \
+ q1[q0[b ^ key[(j) + 27]] ^ key[(j) + 19]], j)
+
+#define CALC_K256(a, j, k, l, m, n) \
+ x = CALC_K256_2 (k, l, 0); \
+ y = CALC_K256_2 (m, n, 4); \
+ y = (y << 8) + (y >> 24); \
+ x += y; y += x; ctx->a[j] = x; \
+ ctx->a[(j) + 1] = (y << 9) + (y >> 23)
+
+
+
+/* Perform the key setup. Note that this works only with 128- and 256-bit
+ * keys, despite the API that looks like it might support other sizes. */
+
+static gcry_err_code_t
+do_twofish_setkey (TWOFISH_context *ctx, const byte *key, const unsigned keylen)
+{
+ int i, j, k;
+
+ /* Temporaries for CALC_K. */
+ u32 x, y;
+
+ /* The S vector used to key the S-boxes, split up into individual bytes.
+ * 128-bit keys use only sa through sh; 256-bit use all of them. */
+ byte sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0;
+ byte si = 0, sj = 0, sk = 0, sl = 0, sm = 0, sn = 0, so = 0, sp = 0;
+
+ /* Temporary for CALC_S. */
+ byte tmp;
+
+ /* Flags for self-test. */
+ static int initialized = 0;
+ static const char *selftest_failed=0;
+
+ /* Check key length. */
+ if( ( ( keylen - 16 ) | 16 ) != 16 )
+ return GPG_ERR_INV_KEYLEN;
+
+ /* Do self-test if necessary. */
+ if (!initialized)
+ {
+ initialized = 1;
+ selftest_failed = selftest ();
+ if( selftest_failed )
+ log_error("%s\n", selftest_failed );
+ }
+ if( selftest_failed )
+ return GPG_ERR_SELFTEST_FAILED;
+
+ /* Compute the first two words of the S vector. The magic numbers are
+ * the entries of the RS matrix, preprocessed through poly_to_exp. The
+ * numbers in the comments are the original (polynomial form) matrix
+ * entries. */
+ CALC_S (sa, sb, sc, sd, 0, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (sa, sb, sc, sd, 1, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (sa, sb, sc, sd, 2, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (sa, sb, sc, sd, 3, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (sa, sb, sc, sd, 4, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (sa, sb, sc, sd, 5, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (sa, sb, sc, sd, 6, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (sa, sb, sc, sd, 7, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+ CALC_S (se, sf, sg, sh, 8, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (se, sf, sg, sh, 9, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (se, sf, sg, sh, 10, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (se, sf, sg, sh, 11, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (se, sf, sg, sh, 12, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (se, sf, sg, sh, 13, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (se, sf, sg, sh, 14, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (se, sf, sg, sh, 15, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+
+ if (keylen == 32) /* 256-bit key */
+ {
+ /* Calculate the remaining two words of the S vector */
+ CALC_S (si, sj, sk, sl, 16, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (si, sj, sk, sl, 17, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (si, sj, sk, sl, 18, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (si, sj, sk, sl, 19, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (si, sj, sk, sl, 20, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (si, sj, sk, sl, 21, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (si, sj, sk, sl, 22, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (si, sj, sk, sl, 23, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+ CALC_S (sm, sn, so, sp, 24, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */
+ CALC_S (sm, sn, so, sp, 25, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */
+ CALC_S (sm, sn, so, sp, 26, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */
+ CALC_S (sm, sn, so, sp, 27, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */
+ CALC_S (sm, sn, so, sp, 28, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */
+ CALC_S (sm, sn, so, sp, 29, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */
+ CALC_S (sm, sn, so, sp, 30, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */
+ CALC_S (sm, sn, so, sp, 31, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */
+
+ /* Compute the S-boxes. */
+ for(i=j=0,k=1; i < 256; i++, j += 2, k += 2 )
+ {
+ CALC_SB256_2( i, calc_sb_tbl[j], calc_sb_tbl[k] );
+ }
+
+ /* Calculate whitening and round subkeys. The constants are
+ * indices of subkeys, preprocessed through q0 and q1. */
+ CALC_K256 (w, 0, 0xA9, 0x75, 0x67, 0xF3);
+ CALC_K256 (w, 2, 0xB3, 0xC6, 0xE8, 0xF4);
+ CALC_K256 (w, 4, 0x04, 0xDB, 0xFD, 0x7B);
+ CALC_K256 (w, 6, 0xA3, 0xFB, 0x76, 0xC8);
+ CALC_K256 (k, 0, 0x9A, 0x4A, 0x92, 0xD3);
+ CALC_K256 (k, 2, 0x80, 0xE6, 0x78, 0x6B);
+ CALC_K256 (k, 4, 0xE4, 0x45, 0xDD, 0x7D);
+ CALC_K256 (k, 6, 0xD1, 0xE8, 0x38, 0x4B);
+ CALC_K256 (k, 8, 0x0D, 0xD6, 0xC6, 0x32);
+ CALC_K256 (k, 10, 0x35, 0xD8, 0x98, 0xFD);
+ CALC_K256 (k, 12, 0x18, 0x37, 0xF7, 0x71);
+ CALC_K256 (k, 14, 0xEC, 0xF1, 0x6C, 0xE1);
+ CALC_K256 (k, 16, 0x43, 0x30, 0x75, 0x0F);
+ CALC_K256 (k, 18, 0x37, 0xF8, 0x26, 0x1B);
+ CALC_K256 (k, 20, 0xFA, 0x87, 0x13, 0xFA);
+ CALC_K256 (k, 22, 0x94, 0x06, 0x48, 0x3F);
+ CALC_K256 (k, 24, 0xF2, 0x5E, 0xD0, 0xBA);
+ CALC_K256 (k, 26, 0x8B, 0xAE, 0x30, 0x5B);
+ CALC_K256 (k, 28, 0x84, 0x8A, 0x54, 0x00);
+ CALC_K256 (k, 30, 0xDF, 0xBC, 0x23, 0x9D);
+ }
+ else
+ {
+ /* Compute the S-boxes. */
+ for(i=j=0,k=1; i < 256; i++, j += 2, k += 2 )
+ {
+ CALC_SB_2( i, calc_sb_tbl[j], calc_sb_tbl[k] );
+ }
+
+ /* Calculate whitening and round subkeys. The constants are
+ * indices of subkeys, preprocessed through q0 and q1. */
+ CALC_K (w, 0, 0xA9, 0x75, 0x67, 0xF3);
+ CALC_K (w, 2, 0xB3, 0xC6, 0xE8, 0xF4);
+ CALC_K (w, 4, 0x04, 0xDB, 0xFD, 0x7B);
+ CALC_K (w, 6, 0xA3, 0xFB, 0x76, 0xC8);
+ CALC_K (k, 0, 0x9A, 0x4A, 0x92, 0xD3);
+ CALC_K (k, 2, 0x80, 0xE6, 0x78, 0x6B);
+ CALC_K (k, 4, 0xE4, 0x45, 0xDD, 0x7D);
+ CALC_K (k, 6, 0xD1, 0xE8, 0x38, 0x4B);
+ CALC_K (k, 8, 0x0D, 0xD6, 0xC6, 0x32);
+ CALC_K (k, 10, 0x35, 0xD8, 0x98, 0xFD);
+ CALC_K (k, 12, 0x18, 0x37, 0xF7, 0x71);
+ CALC_K (k, 14, 0xEC, 0xF1, 0x6C, 0xE1);
+ CALC_K (k, 16, 0x43, 0x30, 0x75, 0x0F);
+ CALC_K (k, 18, 0x37, 0xF8, 0x26, 0x1B);
+ CALC_K (k, 20, 0xFA, 0x87, 0x13, 0xFA);
+ CALC_K (k, 22, 0x94, 0x06, 0x48, 0x3F);
+ CALC_K (k, 24, 0xF2, 0x5E, 0xD0, 0xBA);
+ CALC_K (k, 26, 0x8B, 0xAE, 0x30, 0x5B);
+ CALC_K (k, 28, 0x84, 0x8A, 0x54, 0x00);
+ CALC_K (k, 30, 0xDF, 0xBC, 0x23, 0x9D);
+ }
+
+ return 0;
+}
+
+static gcry_err_code_t
+twofish_setkey (void *context, const byte *key, unsigned int keylen)
+{
+ TWOFISH_context *ctx = context;
+ int rc = do_twofish_setkey (ctx, key, keylen);
+ _gcry_burn_stack (23+6*sizeof(void*));
+ return rc;
+}
+
+
+
+/* Macros to compute the g() function in the encryption and decryption
+ * rounds. G1 is the straight g() function; G2 includes the 8-bit
+ * rotation for the high 32-bit word. */
+
+#define G1(a) \
+ (ctx->s[0][(a) & 0xFF]) ^ (ctx->s[1][((a) >> 8) & 0xFF]) \
+ ^ (ctx->s[2][((a) >> 16) & 0xFF]) ^ (ctx->s[3][(a) >> 24])
+
+#define G2(b) \
+ (ctx->s[1][(b) & 0xFF]) ^ (ctx->s[2][((b) >> 8) & 0xFF]) \
+ ^ (ctx->s[3][((b) >> 16) & 0xFF]) ^ (ctx->s[0][(b) >> 24])
+
+/* Encryption and decryption Feistel rounds. Each one calls the two g()
+ * macros, does the PHT, and performs the XOR and the appropriate bit
+ * rotations. The parameters are the round number (used to select subkeys),
+ * and the four 32-bit chunks of the text. */
+
+#define ENCROUND(n, a, b, c, d) \
+ x = G1 (a); y = G2 (b); \
+ x += y; y += x + ctx->k[2 * (n) + 1]; \
+ (c) ^= x + ctx->k[2 * (n)]; \
+ (c) = ((c) >> 1) + ((c) << 31); \
+ (d) = (((d) << 1)+((d) >> 31)) ^ y
+
+#define DECROUND(n, a, b, c, d) \
+ x = G1 (a); y = G2 (b); \
+ x += y; y += x; \
+ (d) ^= y + ctx->k[2 * (n) + 1]; \
+ (d) = ((d) >> 1) + ((d) << 31); \
+ (c) = (((c) << 1)+((c) >> 31)); \
+ (c) ^= (x + ctx->k[2 * (n)])
+
+/* Encryption and decryption cycles; each one is simply two Feistel rounds
+ * with the 32-bit chunks re-ordered to simulate the "swap" */
+
+#define ENCCYCLE(n) \
+ ENCROUND (2 * (n), a, b, c, d); \
+ ENCROUND (2 * (n) + 1, c, d, a, b)
+
+#define DECCYCLE(n) \
+ DECROUND (2 * (n) + 1, c, d, a, b); \
+ DECROUND (2 * (n), a, b, c, d)
+
+/* Macros to convert the input and output bytes into 32-bit words,
+ * and simultaneously perform the whitening step. INPACK packs word
+ * number n into the variable named by x, using whitening subkey number m.
+ * OUTUNPACK unpacks word number n from the variable named by x, using
+ * whitening subkey number m. */
+
+#define INPACK(n, x, m) \
+ x = in[4 * (n)] ^ (in[4 * (n) + 1] << 8) \
+ ^ (in[4 * (n) + 2] << 16) ^ (in[4 * (n) + 3] << 24) ^ ctx->w[m]
+
+#define OUTUNPACK(n, x, m) \
+ x ^= ctx->w[m]; \
+ out[4 * (n)] = x; out[4 * (n) + 1] = x >> 8; \
+ out[4 * (n) + 2] = x >> 16; out[4 * (n) + 3] = x >> 24
+
+/* Encrypt one block. in and out may be the same. */
+
+static void
+do_twofish_encrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
+{
+ /* The four 32-bit chunks of the text. */
+ u32 a, b, c, d;
+
+ /* Temporaries used by the round function. */
+ u32 x, y;
+
+ /* Input whitening and packing. */
+ INPACK (0, a, 0);
+ INPACK (1, b, 1);
+ INPACK (2, c, 2);
+ INPACK (3, d, 3);
+
+ /* Encryption Feistel cycles. */
+ ENCCYCLE (0);
+ ENCCYCLE (1);
+ ENCCYCLE (2);
+ ENCCYCLE (3);
+ ENCCYCLE (4);
+ ENCCYCLE (5);
+ ENCCYCLE (6);
+ ENCCYCLE (7);
+
+ /* Output whitening and unpacking. */
+ OUTUNPACK (0, c, 4);
+ OUTUNPACK (1, d, 5);
+ OUTUNPACK (2, a, 6);
+ OUTUNPACK (3, b, 7);
+}
+
+static void
+twofish_encrypt (void *context, byte *out, const byte *in)
+{
+ TWOFISH_context *ctx = context;
+ do_twofish_encrypt (ctx, out, in);
+ _gcry_burn_stack (24+3*sizeof (void*));
+}
+
+
+/* Decrypt one block. in and out may be the same. */
+
+static void
+do_twofish_decrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
+{
+ /* The four 32-bit chunks of the text. */
+ u32 a, b, c, d;
+
+ /* Temporaries used by the round function. */
+ u32 x, y;
+
+ /* Input whitening and packing. */
+ INPACK (0, c, 4);
+ INPACK (1, d, 5);
+ INPACK (2, a, 6);
+ INPACK (3, b, 7);
+
+ /* Encryption Feistel cycles. */
+ DECCYCLE (7);
+ DECCYCLE (6);
+ DECCYCLE (5);
+ DECCYCLE (4);
+ DECCYCLE (3);
+ DECCYCLE (2);
+ DECCYCLE (1);
+ DECCYCLE (0);
+
+ /* Output whitening and unpacking. */
+ OUTUNPACK (0, a, 0);
+ OUTUNPACK (1, b, 1);
+ OUTUNPACK (2, c, 2);
+ OUTUNPACK (3, d, 3);
+}
+
+static void
+twofish_decrypt (void *context, byte *out, const byte *in)
+{
+ TWOFISH_context *ctx = context;
+
+ do_twofish_decrypt (ctx, out, in);
+ _gcry_burn_stack (24+3*sizeof (void*));
+}
+
+
+/* Test a single encryption and decryption with each key size. */
+
+static const char*
+selftest (void)
+{
+ TWOFISH_context ctx; /* Expanded key. */
+ byte scratch[16]; /* Encryption/decryption result buffer. */
+
+ /* Test vectors for single encryption/decryption. Note that I am using
+ * the vectors from the Twofish paper's "known answer test", I=3 for
+ * 128-bit and I=4 for 256-bit, instead of the all-0 vectors from the
+ * "intermediate value test", because an all-0 key would trigger all the
+ * special cases in the RS matrix multiply, leaving the math untested. */
+ static byte plaintext[16] = {
+ 0xD4, 0x91, 0xDB, 0x16, 0xE7, 0xB1, 0xC3, 0x9E,
+ 0x86, 0xCB, 0x08, 0x6B, 0x78, 0x9F, 0x54, 0x19
+ };
+ static byte key[16] = {
+ 0x9F, 0x58, 0x9F, 0x5C, 0xF6, 0x12, 0x2C, 0x32,
+ 0xB6, 0xBF, 0xEC, 0x2F, 0x2A, 0xE8, 0xC3, 0x5A
+ };
+ static const byte ciphertext[16] = {
+ 0x01, 0x9F, 0x98, 0x09, 0xDE, 0x17, 0x11, 0x85,
+ 0x8F, 0xAA, 0xC3, 0xA3, 0xBA, 0x20, 0xFB, 0xC3
+ };
+ static byte plaintext_256[16] = {
+ 0x90, 0xAF, 0xE9, 0x1B, 0xB2, 0x88, 0x54, 0x4F,
+ 0x2C, 0x32, 0xDC, 0x23, 0x9B, 0x26, 0x35, 0xE6
+ };
+ static byte key_256[32] = {
+ 0xD4, 0x3B, 0xB7, 0x55, 0x6E, 0xA3, 0x2E, 0x46,
+ 0xF2, 0xA2, 0x82, 0xB7, 0xD4, 0x5B, 0x4E, 0x0D,
+ 0x57, 0xFF, 0x73, 0x9D, 0x4D, 0xC9, 0x2C, 0x1B,
+ 0xD7, 0xFC, 0x01, 0x70, 0x0C, 0xC8, 0x21, 0x6F
+ };
+ static const byte ciphertext_256[16] = {
+ 0x6C, 0xB4, 0x56, 0x1C, 0x40, 0xBF, 0x0A, 0x97,
+ 0x05, 0x93, 0x1C, 0xB6, 0xD4, 0x08, 0xE7, 0xFA
+ };
+
+ twofish_setkey (&ctx, key, sizeof(key));
+ twofish_encrypt (&ctx, scratch, plaintext);
+ if (memcmp (scratch, ciphertext, sizeof (ciphertext)))
+ return "Twofish-128 test encryption failed.";
+ twofish_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext, sizeof (plaintext)))
+ return "Twofish-128 test decryption failed.";
+
+ twofish_setkey (&ctx, key_256, sizeof(key_256));
+ twofish_encrypt (&ctx, scratch, plaintext_256);
+ if (memcmp (scratch, ciphertext_256, sizeof (ciphertext_256)))
+ return "Twofish-256 test encryption failed.";
+ twofish_decrypt (&ctx, scratch, scratch);
+ if (memcmp (scratch, plaintext_256, sizeof (plaintext_256)))
+ return "Twofish-256 test decryption failed.";
+
+ return NULL;
+}
+
+/* More complete test program. This does 1000 encryptions and decryptions
+ * with each of 250 128-bit keys and 2000 encryptions and decryptions with
+ * each of 125 256-bit keys, using a feedback scheme similar to a Feistel
+ * cipher, so as to be sure of testing all the table entries pretty
+ * thoroughly. We keep changing the keys so as to get a more meaningful
+ * performance number, since the key setup is non-trivial for Twofish. */
+
+#ifdef TEST
+
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+
+int
+main()
+{
+ TWOFISH_context ctx; /* Expanded key. */
+ int i, j; /* Loop counters. */
+
+ const char *encrypt_msg; /* Message to print regarding encryption test;
+ * the printf is done outside the loop to avoid
+ * stuffing up the timing. */
+ clock_t timer; /* For computing elapsed time. */
+
+ /* Test buffer. */
+ byte buffer[4][16] = {
+ {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+ 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF},
+ {0x0F, 0x1E, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, 0x78,
+ 0x87, 0x96, 0xA5, 0xB4, 0xC3, 0xD2 ,0xE1, 0xF0},
+ {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+ 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54 ,0x32, 0x10},
+ {0x01, 0x23, 0x45, 0x67, 0x76, 0x54 ,0x32, 0x10,
+ 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98}
+ };
+
+ /* Expected outputs for the million-operation test */
+ static const byte test_encrypt[4][16] = {
+ {0xC8, 0x23, 0xB8, 0xB7, 0x6B, 0xFE, 0x91, 0x13,
+ 0x2F, 0xA7, 0x5E, 0xE6, 0x94, 0x77, 0x6F, 0x6B},
+ {0x90, 0x36, 0xD8, 0x29, 0xD5, 0x96, 0xC2, 0x8E,
+ 0xE4, 0xFF, 0x76, 0xBC, 0xE5, 0x77, 0x88, 0x27},
+ {0xB8, 0x78, 0x69, 0xAF, 0x42, 0x8B, 0x48, 0x64,
+ 0xF7, 0xE9, 0xF3, 0x9C, 0x42, 0x18, 0x7B, 0x73},
+ {0x7A, 0x88, 0xFB, 0xEB, 0x90, 0xA4, 0xB4, 0xA8,
+ 0x43, 0xA3, 0x1D, 0xF1, 0x26, 0xC4, 0x53, 0x57}
+ };
+ static const byte test_decrypt[4][16] = {
+ {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+ 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF},
+ {0x0F, 0x1E, 0x2D, 0x3C, 0x4B, 0x5A, 0x69, 0x78,
+ 0x87, 0x96, 0xA5, 0xB4, 0xC3, 0xD2 ,0xE1, 0xF0},
+ {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+ 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54 ,0x32, 0x10},
+ {0x01, 0x23, 0x45, 0x67, 0x76, 0x54 ,0x32, 0x10,
+ 0x89, 0xAB, 0xCD, 0xEF, 0xFE, 0xDC, 0xBA, 0x98}
+ };
+
+ /* Start the timer ticking. */
+ timer = clock ();
+
+ /* Encryption test. */
+ for (i = 0; i < 125; i++)
+ {
+ twofish_setkey (&ctx, buffer[0], sizeof (buffer[0]));
+ for (j = 0; j < 1000; j++)
+ twofish_encrypt (&ctx, buffer[2], buffer[2]);
+ twofish_setkey (&ctx, buffer[1], sizeof (buffer[1]));
+ for (j = 0; j < 1000; j++)
+ twofish_encrypt (&ctx, buffer[3], buffer[3]);
+ twofish_setkey (&ctx, buffer[2], sizeof (buffer[2])*2);
+ for (j = 0; j < 1000; j++) {
+ twofish_encrypt (&ctx, buffer[0], buffer[0]);
+ twofish_encrypt (&ctx, buffer[1], buffer[1]);
+ }
+ }
+ encrypt_msg = memcmp (buffer, test_encrypt, sizeof (test_encrypt)) ?
+ "encryption failure!\n" : "encryption OK!\n";
+
+ /* Decryption test. */
+ for (i = 0; i < 125; i++)
+ {
+ twofish_setkey (&ctx, buffer[2], sizeof (buffer[2])*2);
+ for (j = 0; j < 1000; j++) {
+ twofish_decrypt (&ctx, buffer[0], buffer[0]);
+ twofish_decrypt (&ctx, buffer[1], buffer[1]);
+ }
+ twofish_setkey (&ctx, buffer[1], sizeof (buffer[1]));
+ for (j = 0; j < 1000; j++)
+ twofish_decrypt (&ctx, buffer[3], buffer[3]);
+ twofish_setkey (&ctx, buffer[0], sizeof (buffer[0]));
+ for (j = 0; j < 1000; j++)
+ twofish_decrypt (&ctx, buffer[2], buffer[2]);
+ }
+
+ /* Stop the timer, and print results. */
+ timer = clock () - timer;
+ printf (encrypt_msg);
+ printf (memcmp (buffer, test_decrypt, sizeof (test_decrypt)) ?
+ "decryption failure!\n" : "decryption OK!\n");
+ printf ("elapsed time: %.1f s.\n", (float) timer / CLOCKS_PER_SEC);
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+
+gcry_cipher_spec_t _gcry_cipher_spec_twofish =
+ {
+ "TWOFISH", NULL, NULL, 16, 256, sizeof (TWOFISH_context),
+ twofish_setkey, twofish_encrypt, twofish_decrypt
+ };
+
+gcry_cipher_spec_t _gcry_cipher_spec_twofish128 =
+ {
+ "TWOFISH128", NULL, NULL, 16, 128, sizeof (TWOFISH_context),
+ twofish_setkey, twofish_encrypt, twofish_decrypt
+ };
diff --git a/grub-core/lib/libgcrypt/cipher/whirlpool.c b/grub-core/lib/libgcrypt/cipher/whirlpool.c
new file mode 100644
index 0000000..9b029ee
--- /dev/null
+++ b/grub-core/lib/libgcrypt/cipher/whirlpool.c
@@ -0,0 +1,1406 @@
+/* whirlpool.c - Whirlpool hashing algorithm
+ * Copyright (C) 2005 Free Software Foundation, Inc.
+ *
+ * This file is part of Libgcrypt.
+ *
+ * Libgcrypt is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * Libgcrypt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ */
+
+/* This is an implementation of the Whirlpool hashing algorithm, which
+ has been developed by Vincent Rijmen and Paulo S. L. M. Barreto;
+ it's homepage is located at:
+ http://planeta.terra.com.br/informatica/paulobarreto/WhirlpoolPage.html.
+
+ The S-Boxes and the structure of the main transformation function,
+ which implements an optimized version of the algorithm, is taken
+ from the reference implementation available from
+ http://planeta.terra.com.br/informatica/paulobarreto/whirlpool.zip. */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "types.h"
+#include "g10lib.h"
+#include "memory.h"
+#include "cipher.h"
+
+#include "bithelp.h"
+
+/* Size of a whirlpool block (in bytes). */
+#define BLOCK_SIZE 64
+
+/* Number of rounds. */
+#define R 10
+
+
+
+/* Types. */
+typedef u64 whirlpool_block_t[BLOCK_SIZE / 8];
+
+typedef struct {
+ whirlpool_block_t hash_state;
+ unsigned char buffer[BLOCK_SIZE];
+ size_t count;
+ unsigned char length[32];
+} whirlpool_context_t;
+
+
+
+/* Macros. */
+
+/* Convert the the buffer BUFFER into a block BLOCK, using I as
+ counter. */
+#define buffer_to_block(buffer, block, i) \
+ for (i = 0; i < 8; i++) \
+ (block)[i] = ((u64) (0 \
+ | (((u64) (buffer)[i * 8 + 0]) << 56) \
+ | (((u64) (buffer)[i * 8 + 1]) << 48) \
+ | (((u64) (buffer)[i * 8 + 2]) << 40) \
+ | (((u64) (buffer)[i * 8 + 3]) << 32) \
+ | (((u64) (buffer)[i * 8 + 4]) << 24) \
+ | (((u64) (buffer)[i * 8 + 5]) << 16) \
+ | (((u64) (buffer)[i * 8 + 6]) << 8) \
+ | (((u64) (buffer)[i * 8 + 7]) << 0)));
+
+/* Convert the block BLOCK into a buffer BUFFER, using I as
+ counter. */
+#define block_to_buffer(buffer, block, i) \
+ for (i = 0; i < 8; i++) \
+ { \
+ (buffer)[i * 8 + 0] = (block[i] >> 56) & 0xFF; \
+ (buffer)[i * 8 + 1] = (block[i] >> 48) & 0xFF; \
+ (buffer)[i * 8 + 2] = (block[i] >> 40) & 0xFF; \
+ (buffer)[i * 8 + 3] = (block[i] >> 32) & 0xFF; \
+ (buffer)[i * 8 + 4] = (block[i] >> 24) & 0xFF; \
+ (buffer)[i * 8 + 5] = (block[i] >> 16) & 0xFF; \
+ (buffer)[i * 8 + 6] = (block[i] >> 8) & 0xFF; \
+ (buffer)[i * 8 + 7] = (block[i] >> 0) & 0xFF; \
+ }
+
+/* Copy the block BLOCK_SRC to BLOCK_DST, using I as counter. */
+#define block_copy(block_dst, block_src, i) \
+ for (i = 0; i < 8; i++) \
+ block_dst[i] = block_src[i];
+
+/* XOR the block BLOCK_SRC into BLOCK_DST, using I as counter. */
+#define block_xor(block_dst, block_src, i) \
+ for (i = 0; i < 8; i++) \
+ block_dst[i] ^= block_src[i];
+
+
+
+/* Round constants. */
+static const u64 rc[R] =
+ {
+ U64_C (0x1823c6e887b8014f),
+ U64_C (0x36a6d2f5796f9152),
+ U64_C (0x60bc9b8ea30c7b35),
+ U64_C (0x1de0d7c22e4bfe57),
+ U64_C (0x157737e59ff04ada),
+ U64_C (0x58c9290ab1a06b85),
+ U64_C (0xbd5d10f4cb3e0567),
+ U64_C (0xe427418ba77d95d8),
+ U64_C (0xfbee7c66dd17479e),
+ U64_C (0xca2dbf07ad5a8333),
+ };
+
+
+
+/* Main lookup boxes. */
+static const u64 C0[256] =
+ {
+ U64_C (0x18186018c07830d8), U64_C (0x23238c2305af4626),
+ U64_C (0xc6c63fc67ef991b8), U64_C (0xe8e887e8136fcdfb),
+ U64_C (0x878726874ca113cb), U64_C (0xb8b8dab8a9626d11),
+ U64_C (0x0101040108050209), U64_C (0x4f4f214f426e9e0d),
+ U64_C (0x3636d836adee6c9b), U64_C (0xa6a6a2a6590451ff),
+ U64_C (0xd2d26fd2debdb90c), U64_C (0xf5f5f3f5fb06f70e),
+ U64_C (0x7979f979ef80f296), U64_C (0x6f6fa16f5fcede30),
+ U64_C (0x91917e91fcef3f6d), U64_C (0x52525552aa07a4f8),
+ U64_C (0x60609d6027fdc047), U64_C (0xbcbccabc89766535),
+ U64_C (0x9b9b569baccd2b37), U64_C (0x8e8e028e048c018a),
+ U64_C (0xa3a3b6a371155bd2), U64_C (0x0c0c300c603c186c),
+ U64_C (0x7b7bf17bff8af684), U64_C (0x3535d435b5e16a80),
+ U64_C (0x1d1d741de8693af5), U64_C (0xe0e0a7e05347ddb3),
+ U64_C (0xd7d77bd7f6acb321), U64_C (0xc2c22fc25eed999c),
+ U64_C (0x2e2eb82e6d965c43), U64_C (0x4b4b314b627a9629),
+ U64_C (0xfefedffea321e15d), U64_C (0x575741578216aed5),
+ U64_C (0x15155415a8412abd), U64_C (0x7777c1779fb6eee8),
+ U64_C (0x3737dc37a5eb6e92), U64_C (0xe5e5b3e57b56d79e),
+ U64_C (0x9f9f469f8cd92313), U64_C (0xf0f0e7f0d317fd23),
+ U64_C (0x4a4a354a6a7f9420), U64_C (0xdada4fda9e95a944),
+ U64_C (0x58587d58fa25b0a2), U64_C (0xc9c903c906ca8fcf),
+ U64_C (0x2929a429558d527c), U64_C (0x0a0a280a5022145a),
+ U64_C (0xb1b1feb1e14f7f50), U64_C (0xa0a0baa0691a5dc9),
+ U64_C (0x6b6bb16b7fdad614), U64_C (0x85852e855cab17d9),
+ U64_C (0xbdbdcebd8173673c), U64_C (0x5d5d695dd234ba8f),
+ U64_C (0x1010401080502090), U64_C (0xf4f4f7f4f303f507),
+ U64_C (0xcbcb0bcb16c08bdd), U64_C (0x3e3ef83eedc67cd3),
+ U64_C (0x0505140528110a2d), U64_C (0x676781671fe6ce78),
+ U64_C (0xe4e4b7e47353d597), U64_C (0x27279c2725bb4e02),
+ U64_C (0x4141194132588273), U64_C (0x8b8b168b2c9d0ba7),
+ U64_C (0xa7a7a6a7510153f6), U64_C (0x7d7de97dcf94fab2),
+ U64_C (0x95956e95dcfb3749), U64_C (0xd8d847d88e9fad56),
+ U64_C (0xfbfbcbfb8b30eb70), U64_C (0xeeee9fee2371c1cd),
+ U64_C (0x7c7ced7cc791f8bb), U64_C (0x6666856617e3cc71),
+ U64_C (0xdddd53dda68ea77b), U64_C (0x17175c17b84b2eaf),
+ U64_C (0x4747014702468e45), U64_C (0x9e9e429e84dc211a),
+ U64_C (0xcaca0fca1ec589d4), U64_C (0x2d2db42d75995a58),
+ U64_C (0xbfbfc6bf9179632e), U64_C (0x07071c07381b0e3f),
+ U64_C (0xadad8ead012347ac), U64_C (0x5a5a755aea2fb4b0),
+ U64_C (0x838336836cb51bef), U64_C (0x3333cc3385ff66b6),
+ U64_C (0x636391633ff2c65c), U64_C (0x02020802100a0412),
+ U64_C (0xaaaa92aa39384993), U64_C (0x7171d971afa8e2de),
+ U64_C (0xc8c807c80ecf8dc6), U64_C (0x19196419c87d32d1),
+ U64_C (0x494939497270923b), U64_C (0xd9d943d9869aaf5f),
+ U64_C (0xf2f2eff2c31df931), U64_C (0xe3e3abe34b48dba8),
+ U64_C (0x5b5b715be22ab6b9), U64_C (0x88881a8834920dbc),
+ U64_C (0x9a9a529aa4c8293e), U64_C (0x262698262dbe4c0b),
+ U64_C (0x3232c8328dfa64bf), U64_C (0xb0b0fab0e94a7d59),
+ U64_C (0xe9e983e91b6acff2), U64_C (0x0f0f3c0f78331e77),
+ U64_C (0xd5d573d5e6a6b733), U64_C (0x80803a8074ba1df4),
+ U64_C (0xbebec2be997c6127), U64_C (0xcdcd13cd26de87eb),
+ U64_C (0x3434d034bde46889), U64_C (0x48483d487a759032),
+ U64_C (0xffffdbffab24e354), U64_C (0x7a7af57af78ff48d),
+ U64_C (0x90907a90f4ea3d64), U64_C (0x5f5f615fc23ebe9d),
+ U64_C (0x202080201da0403d), U64_C (0x6868bd6867d5d00f),
+ U64_C (0x1a1a681ad07234ca), U64_C (0xaeae82ae192c41b7),
+ U64_C (0xb4b4eab4c95e757d), U64_C (0x54544d549a19a8ce),
+ U64_C (0x93937693ece53b7f), U64_C (0x222288220daa442f),
+ U64_C (0x64648d6407e9c863), U64_C (0xf1f1e3f1db12ff2a),
+ U64_C (0x7373d173bfa2e6cc), U64_C (0x12124812905a2482),
+ U64_C (0x40401d403a5d807a), U64_C (0x0808200840281048),
+ U64_C (0xc3c32bc356e89b95), U64_C (0xecec97ec337bc5df),
+ U64_C (0xdbdb4bdb9690ab4d), U64_C (0xa1a1bea1611f5fc0),
+ U64_C (0x8d8d0e8d1c830791), U64_C (0x3d3df43df5c97ac8),
+ U64_C (0x97976697ccf1335b), U64_C (0x0000000000000000),
+ U64_C (0xcfcf1bcf36d483f9), U64_C (0x2b2bac2b4587566e),
+ U64_C (0x7676c57697b3ece1), U64_C (0x8282328264b019e6),
+ U64_C (0xd6d67fd6fea9b128), U64_C (0x1b1b6c1bd87736c3),
+ U64_C (0xb5b5eeb5c15b7774), U64_C (0xafaf86af112943be),
+ U64_C (0x6a6ab56a77dfd41d), U64_C (0x50505d50ba0da0ea),
+ U64_C (0x45450945124c8a57), U64_C (0xf3f3ebf3cb18fb38),
+ U64_C (0x3030c0309df060ad), U64_C (0xefef9bef2b74c3c4),
+ U64_C (0x3f3ffc3fe5c37eda), U64_C (0x55554955921caac7),
+ U64_C (0xa2a2b2a2791059db), U64_C (0xeaea8fea0365c9e9),
+ U64_C (0x656589650fecca6a), U64_C (0xbabad2bab9686903),
+ U64_C (0x2f2fbc2f65935e4a), U64_C (0xc0c027c04ee79d8e),
+ U64_C (0xdede5fdebe81a160), U64_C (0x1c1c701ce06c38fc),
+ U64_C (0xfdfdd3fdbb2ee746), U64_C (0x4d4d294d52649a1f),
+ U64_C (0x92927292e4e03976), U64_C (0x7575c9758fbceafa),
+ U64_C (0x06061806301e0c36), U64_C (0x8a8a128a249809ae),
+ U64_C (0xb2b2f2b2f940794b), U64_C (0xe6e6bfe66359d185),
+ U64_C (0x0e0e380e70361c7e), U64_C (0x1f1f7c1ff8633ee7),
+ U64_C (0x6262956237f7c455), U64_C (0xd4d477d4eea3b53a),
+ U64_C (0xa8a89aa829324d81), U64_C (0x96966296c4f43152),
+ U64_C (0xf9f9c3f99b3aef62), U64_C (0xc5c533c566f697a3),
+ U64_C (0x2525942535b14a10), U64_C (0x59597959f220b2ab),
+ U64_C (0x84842a8454ae15d0), U64_C (0x7272d572b7a7e4c5),
+ U64_C (0x3939e439d5dd72ec), U64_C (0x4c4c2d4c5a619816),
+ U64_C (0x5e5e655eca3bbc94), U64_C (0x7878fd78e785f09f),
+ U64_C (0x3838e038ddd870e5), U64_C (0x8c8c0a8c14860598),
+ U64_C (0xd1d163d1c6b2bf17), U64_C (0xa5a5aea5410b57e4),
+ U64_C (0xe2e2afe2434dd9a1), U64_C (0x616199612ff8c24e),
+ U64_C (0xb3b3f6b3f1457b42), U64_C (0x2121842115a54234),
+ U64_C (0x9c9c4a9c94d62508), U64_C (0x1e1e781ef0663cee),
+ U64_C (0x4343114322528661), U64_C (0xc7c73bc776fc93b1),
+ U64_C (0xfcfcd7fcb32be54f), U64_C (0x0404100420140824),
+ U64_C (0x51515951b208a2e3), U64_C (0x99995e99bcc72f25),
+ U64_C (0x6d6da96d4fc4da22), U64_C (0x0d0d340d68391a65),
+ U64_C (0xfafacffa8335e979), U64_C (0xdfdf5bdfb684a369),
+ U64_C (0x7e7ee57ed79bfca9), U64_C (0x242490243db44819),
+ U64_C (0x3b3bec3bc5d776fe), U64_C (0xabab96ab313d4b9a),
+ U64_C (0xcece1fce3ed181f0), U64_C (0x1111441188552299),
+ U64_C (0x8f8f068f0c890383), U64_C (0x4e4e254e4a6b9c04),
+ U64_C (0xb7b7e6b7d1517366), U64_C (0xebeb8beb0b60cbe0),
+ U64_C (0x3c3cf03cfdcc78c1), U64_C (0x81813e817cbf1ffd),
+ U64_C (0x94946a94d4fe3540), U64_C (0xf7f7fbf7eb0cf31c),
+ U64_C (0xb9b9deb9a1676f18), U64_C (0x13134c13985f268b),
+ U64_C (0x2c2cb02c7d9c5851), U64_C (0xd3d36bd3d6b8bb05),
+ U64_C (0xe7e7bbe76b5cd38c), U64_C (0x6e6ea56e57cbdc39),
+ U64_C (0xc4c437c46ef395aa), U64_C (0x03030c03180f061b),
+ U64_C (0x565645568a13acdc), U64_C (0x44440d441a49885e),
+ U64_C (0x7f7fe17fdf9efea0), U64_C (0xa9a99ea921374f88),
+ U64_C (0x2a2aa82a4d825467), U64_C (0xbbbbd6bbb16d6b0a),
+ U64_C (0xc1c123c146e29f87), U64_C (0x53535153a202a6f1),
+ U64_C (0xdcdc57dcae8ba572), U64_C (0x0b0b2c0b58271653),
+ U64_C (0x9d9d4e9d9cd32701), U64_C (0x6c6cad6c47c1d82b),
+ U64_C (0x3131c43195f562a4), U64_C (0x7474cd7487b9e8f3),
+ U64_C (0xf6f6fff6e309f115), U64_C (0x464605460a438c4c),
+ U64_C (0xacac8aac092645a5), U64_C (0x89891e893c970fb5),
+ U64_C (0x14145014a04428b4), U64_C (0xe1e1a3e15b42dfba),
+ U64_C (0x16165816b04e2ca6), U64_C (0x3a3ae83acdd274f7),
+ U64_C (0x6969b9696fd0d206), U64_C (0x09092409482d1241),
+ U64_C (0x7070dd70a7ade0d7), U64_C (0xb6b6e2b6d954716f),
+ U64_C (0xd0d067d0ceb7bd1e), U64_C (0xeded93ed3b7ec7d6),
+ U64_C (0xcccc17cc2edb85e2), U64_C (0x424215422a578468),
+ U64_C (0x98985a98b4c22d2c), U64_C (0xa4a4aaa4490e55ed),
+ U64_C (0x2828a0285d885075), U64_C (0x5c5c6d5cda31b886),
+ U64_C (0xf8f8c7f8933fed6b), U64_C (0x8686228644a411c2),
+ };
+
+static const u64 C1[256] =
+ {
+ U64_C (0xd818186018c07830), U64_C (0x2623238c2305af46),
+ U64_C (0xb8c6c63fc67ef991), U64_C (0xfbe8e887e8136fcd),
+ U64_C (0xcb878726874ca113), U64_C (0x11b8b8dab8a9626d),
+ U64_C (0x0901010401080502), U64_C (0x0d4f4f214f426e9e),
+ U64_C (0x9b3636d836adee6c), U64_C (0xffa6a6a2a6590451),
+ U64_C (0x0cd2d26fd2debdb9), U64_C (0x0ef5f5f3f5fb06f7),
+ U64_C (0x967979f979ef80f2), U64_C (0x306f6fa16f5fcede),
+ U64_C (0x6d91917e91fcef3f), U64_C (0xf852525552aa07a4),
+ U64_C (0x4760609d6027fdc0), U64_C (0x35bcbccabc897665),
+ U64_C (0x379b9b569baccd2b), U64_C (0x8a8e8e028e048c01),
+ U64_C (0xd2a3a3b6a371155b), U64_C (0x6c0c0c300c603c18),
+ U64_C (0x847b7bf17bff8af6), U64_C (0x803535d435b5e16a),
+ U64_C (0xf51d1d741de8693a), U64_C (0xb3e0e0a7e05347dd),
+ U64_C (0x21d7d77bd7f6acb3), U64_C (0x9cc2c22fc25eed99),
+ U64_C (0x432e2eb82e6d965c), U64_C (0x294b4b314b627a96),
+ U64_C (0x5dfefedffea321e1), U64_C (0xd5575741578216ae),
+ U64_C (0xbd15155415a8412a), U64_C (0xe87777c1779fb6ee),
+ U64_C (0x923737dc37a5eb6e), U64_C (0x9ee5e5b3e57b56d7),
+ U64_C (0x139f9f469f8cd923), U64_C (0x23f0f0e7f0d317fd),
+ U64_C (0x204a4a354a6a7f94), U64_C (0x44dada4fda9e95a9),
+ U64_C (0xa258587d58fa25b0), U64_C (0xcfc9c903c906ca8f),
+ U64_C (0x7c2929a429558d52), U64_C (0x5a0a0a280a502214),
+ U64_C (0x50b1b1feb1e14f7f), U64_C (0xc9a0a0baa0691a5d),
+ U64_C (0x146b6bb16b7fdad6), U64_C (0xd985852e855cab17),
+ U64_C (0x3cbdbdcebd817367), U64_C (0x8f5d5d695dd234ba),
+ U64_C (0x9010104010805020), U64_C (0x07f4f4f7f4f303f5),
+ U64_C (0xddcbcb0bcb16c08b), U64_C (0xd33e3ef83eedc67c),
+ U64_C (0x2d0505140528110a), U64_C (0x78676781671fe6ce),
+ U64_C (0x97e4e4b7e47353d5), U64_C (0x0227279c2725bb4e),
+ U64_C (0x7341411941325882), U64_C (0xa78b8b168b2c9d0b),
+ U64_C (0xf6a7a7a6a7510153), U64_C (0xb27d7de97dcf94fa),
+ U64_C (0x4995956e95dcfb37), U64_C (0x56d8d847d88e9fad),
+ U64_C (0x70fbfbcbfb8b30eb), U64_C (0xcdeeee9fee2371c1),
+ U64_C (0xbb7c7ced7cc791f8), U64_C (0x716666856617e3cc),
+ U64_C (0x7bdddd53dda68ea7), U64_C (0xaf17175c17b84b2e),
+ U64_C (0x454747014702468e), U64_C (0x1a9e9e429e84dc21),
+ U64_C (0xd4caca0fca1ec589), U64_C (0x582d2db42d75995a),
+ U64_C (0x2ebfbfc6bf917963), U64_C (0x3f07071c07381b0e),
+ U64_C (0xacadad8ead012347), U64_C (0xb05a5a755aea2fb4),
+ U64_C (0xef838336836cb51b), U64_C (0xb63333cc3385ff66),
+ U64_C (0x5c636391633ff2c6), U64_C (0x1202020802100a04),
+ U64_C (0x93aaaa92aa393849), U64_C (0xde7171d971afa8e2),
+ U64_C (0xc6c8c807c80ecf8d), U64_C (0xd119196419c87d32),
+ U64_C (0x3b49493949727092), U64_C (0x5fd9d943d9869aaf),
+ U64_C (0x31f2f2eff2c31df9), U64_C (0xa8e3e3abe34b48db),
+ U64_C (0xb95b5b715be22ab6), U64_C (0xbc88881a8834920d),
+ U64_C (0x3e9a9a529aa4c829), U64_C (0x0b262698262dbe4c),
+ U64_C (0xbf3232c8328dfa64), U64_C (0x59b0b0fab0e94a7d),
+ U64_C (0xf2e9e983e91b6acf), U64_C (0x770f0f3c0f78331e),
+ U64_C (0x33d5d573d5e6a6b7), U64_C (0xf480803a8074ba1d),
+ U64_C (0x27bebec2be997c61), U64_C (0xebcdcd13cd26de87),
+ U64_C (0x893434d034bde468), U64_C (0x3248483d487a7590),
+ U64_C (0x54ffffdbffab24e3), U64_C (0x8d7a7af57af78ff4),
+ U64_C (0x6490907a90f4ea3d), U64_C (0x9d5f5f615fc23ebe),
+ U64_C (0x3d202080201da040), U64_C (0x0f6868bd6867d5d0),
+ U64_C (0xca1a1a681ad07234), U64_C (0xb7aeae82ae192c41),
+ U64_C (0x7db4b4eab4c95e75), U64_C (0xce54544d549a19a8),
+ U64_C (0x7f93937693ece53b), U64_C (0x2f222288220daa44),
+ U64_C (0x6364648d6407e9c8), U64_C (0x2af1f1e3f1db12ff),
+ U64_C (0xcc7373d173bfa2e6), U64_C (0x8212124812905a24),
+ U64_C (0x7a40401d403a5d80), U64_C (0x4808082008402810),
+ U64_C (0x95c3c32bc356e89b), U64_C (0xdfecec97ec337bc5),
+ U64_C (0x4ddbdb4bdb9690ab), U64_C (0xc0a1a1bea1611f5f),
+ U64_C (0x918d8d0e8d1c8307), U64_C (0xc83d3df43df5c97a),
+ U64_C (0x5b97976697ccf133), U64_C (0x0000000000000000),
+ U64_C (0xf9cfcf1bcf36d483), U64_C (0x6e2b2bac2b458756),
+ U64_C (0xe17676c57697b3ec), U64_C (0xe68282328264b019),
+ U64_C (0x28d6d67fd6fea9b1), U64_C (0xc31b1b6c1bd87736),
+ U64_C (0x74b5b5eeb5c15b77), U64_C (0xbeafaf86af112943),
+ U64_C (0x1d6a6ab56a77dfd4), U64_C (0xea50505d50ba0da0),
+ U64_C (0x5745450945124c8a), U64_C (0x38f3f3ebf3cb18fb),
+ U64_C (0xad3030c0309df060), U64_C (0xc4efef9bef2b74c3),
+ U64_C (0xda3f3ffc3fe5c37e), U64_C (0xc755554955921caa),
+ U64_C (0xdba2a2b2a2791059), U64_C (0xe9eaea8fea0365c9),
+ U64_C (0x6a656589650fecca), U64_C (0x03babad2bab96869),
+ U64_C (0x4a2f2fbc2f65935e), U64_C (0x8ec0c027c04ee79d),
+ U64_C (0x60dede5fdebe81a1), U64_C (0xfc1c1c701ce06c38),
+ U64_C (0x46fdfdd3fdbb2ee7), U64_C (0x1f4d4d294d52649a),
+ U64_C (0x7692927292e4e039), U64_C (0xfa7575c9758fbcea),
+ U64_C (0x3606061806301e0c), U64_C (0xae8a8a128a249809),
+ U64_C (0x4bb2b2f2b2f94079), U64_C (0x85e6e6bfe66359d1),
+ U64_C (0x7e0e0e380e70361c), U64_C (0xe71f1f7c1ff8633e),
+ U64_C (0x556262956237f7c4), U64_C (0x3ad4d477d4eea3b5),
+ U64_C (0x81a8a89aa829324d), U64_C (0x5296966296c4f431),
+ U64_C (0x62f9f9c3f99b3aef), U64_C (0xa3c5c533c566f697),
+ U64_C (0x102525942535b14a), U64_C (0xab59597959f220b2),
+ U64_C (0xd084842a8454ae15), U64_C (0xc57272d572b7a7e4),
+ U64_C (0xec3939e439d5dd72), U64_C (0x164c4c2d4c5a6198),
+ U64_C (0x945e5e655eca3bbc), U64_C (0x9f7878fd78e785f0),
+ U64_C (0xe53838e038ddd870), U64_C (0x988c8c0a8c148605),
+ U64_C (0x17d1d163d1c6b2bf), U64_C (0xe4a5a5aea5410b57),
+ U64_C (0xa1e2e2afe2434dd9), U64_C (0x4e616199612ff8c2),
+ U64_C (0x42b3b3f6b3f1457b), U64_C (0x342121842115a542),
+ U64_C (0x089c9c4a9c94d625), U64_C (0xee1e1e781ef0663c),
+ U64_C (0x6143431143225286), U64_C (0xb1c7c73bc776fc93),
+ U64_C (0x4ffcfcd7fcb32be5), U64_C (0x2404041004201408),
+ U64_C (0xe351515951b208a2), U64_C (0x2599995e99bcc72f),
+ U64_C (0x226d6da96d4fc4da), U64_C (0x650d0d340d68391a),
+ U64_C (0x79fafacffa8335e9), U64_C (0x69dfdf5bdfb684a3),
+ U64_C (0xa97e7ee57ed79bfc), U64_C (0x19242490243db448),
+ U64_C (0xfe3b3bec3bc5d776), U64_C (0x9aabab96ab313d4b),
+ U64_C (0xf0cece1fce3ed181), U64_C (0x9911114411885522),
+ U64_C (0x838f8f068f0c8903), U64_C (0x044e4e254e4a6b9c),
+ U64_C (0x66b7b7e6b7d15173), U64_C (0xe0ebeb8beb0b60cb),
+ U64_C (0xc13c3cf03cfdcc78), U64_C (0xfd81813e817cbf1f),
+ U64_C (0x4094946a94d4fe35), U64_C (0x1cf7f7fbf7eb0cf3),
+ U64_C (0x18b9b9deb9a1676f), U64_C (0x8b13134c13985f26),
+ U64_C (0x512c2cb02c7d9c58), U64_C (0x05d3d36bd3d6b8bb),
+ U64_C (0x8ce7e7bbe76b5cd3), U64_C (0x396e6ea56e57cbdc),
+ U64_C (0xaac4c437c46ef395), U64_C (0x1b03030c03180f06),
+ U64_C (0xdc565645568a13ac), U64_C (0x5e44440d441a4988),
+ U64_C (0xa07f7fe17fdf9efe), U64_C (0x88a9a99ea921374f),
+ U64_C (0x672a2aa82a4d8254), U64_C (0x0abbbbd6bbb16d6b),
+ U64_C (0x87c1c123c146e29f), U64_C (0xf153535153a202a6),
+ U64_C (0x72dcdc57dcae8ba5), U64_C (0x530b0b2c0b582716),
+ U64_C (0x019d9d4e9d9cd327), U64_C (0x2b6c6cad6c47c1d8),
+ U64_C (0xa43131c43195f562), U64_C (0xf37474cd7487b9e8),
+ U64_C (0x15f6f6fff6e309f1), U64_C (0x4c464605460a438c),
+ U64_C (0xa5acac8aac092645), U64_C (0xb589891e893c970f),
+ U64_C (0xb414145014a04428), U64_C (0xbae1e1a3e15b42df),
+ U64_C (0xa616165816b04e2c), U64_C (0xf73a3ae83acdd274),
+ U64_C (0x066969b9696fd0d2), U64_C (0x4109092409482d12),
+ U64_C (0xd77070dd70a7ade0), U64_C (0x6fb6b6e2b6d95471),
+ U64_C (0x1ed0d067d0ceb7bd), U64_C (0xd6eded93ed3b7ec7),
+ U64_C (0xe2cccc17cc2edb85), U64_C (0x68424215422a5784),
+ U64_C (0x2c98985a98b4c22d), U64_C (0xeda4a4aaa4490e55),
+ U64_C (0x752828a0285d8850), U64_C (0x865c5c6d5cda31b8),
+ U64_C (0x6bf8f8c7f8933fed), U64_C (0xc28686228644a411),
+ };
+
+static const u64 C2[256] =
+ {
+ U64_C (0x30d818186018c078), U64_C (0x462623238c2305af),
+ U64_C (0x91b8c6c63fc67ef9), U64_C (0xcdfbe8e887e8136f),
+ U64_C (0x13cb878726874ca1), U64_C (0x6d11b8b8dab8a962),
+ U64_C (0x0209010104010805), U64_C (0x9e0d4f4f214f426e),
+ U64_C (0x6c9b3636d836adee), U64_C (0x51ffa6a6a2a65904),
+ U64_C (0xb90cd2d26fd2debd), U64_C (0xf70ef5f5f3f5fb06),
+ U64_C (0xf2967979f979ef80), U64_C (0xde306f6fa16f5fce),
+ U64_C (0x3f6d91917e91fcef), U64_C (0xa4f852525552aa07),
+ U64_C (0xc04760609d6027fd), U64_C (0x6535bcbccabc8976),
+ U64_C (0x2b379b9b569baccd), U64_C (0x018a8e8e028e048c),
+ U64_C (0x5bd2a3a3b6a37115), U64_C (0x186c0c0c300c603c),
+ U64_C (0xf6847b7bf17bff8a), U64_C (0x6a803535d435b5e1),
+ U64_C (0x3af51d1d741de869), U64_C (0xddb3e0e0a7e05347),
+ U64_C (0xb321d7d77bd7f6ac), U64_C (0x999cc2c22fc25eed),
+ U64_C (0x5c432e2eb82e6d96), U64_C (0x96294b4b314b627a),
+ U64_C (0xe15dfefedffea321), U64_C (0xaed5575741578216),
+ U64_C (0x2abd15155415a841), U64_C (0xeee87777c1779fb6),
+ U64_C (0x6e923737dc37a5eb), U64_C (0xd79ee5e5b3e57b56),
+ U64_C (0x23139f9f469f8cd9), U64_C (0xfd23f0f0e7f0d317),
+ U64_C (0x94204a4a354a6a7f), U64_C (0xa944dada4fda9e95),
+ U64_C (0xb0a258587d58fa25), U64_C (0x8fcfc9c903c906ca),
+ U64_C (0x527c2929a429558d), U64_C (0x145a0a0a280a5022),
+ U64_C (0x7f50b1b1feb1e14f), U64_C (0x5dc9a0a0baa0691a),
+ U64_C (0xd6146b6bb16b7fda), U64_C (0x17d985852e855cab),
+ U64_C (0x673cbdbdcebd8173), U64_C (0xba8f5d5d695dd234),
+ U64_C (0x2090101040108050), U64_C (0xf507f4f4f7f4f303),
+ U64_C (0x8bddcbcb0bcb16c0), U64_C (0x7cd33e3ef83eedc6),
+ U64_C (0x0a2d050514052811), U64_C (0xce78676781671fe6),
+ U64_C (0xd597e4e4b7e47353), U64_C (0x4e0227279c2725bb),
+ U64_C (0x8273414119413258), U64_C (0x0ba78b8b168b2c9d),
+ U64_C (0x53f6a7a7a6a75101), U64_C (0xfab27d7de97dcf94),
+ U64_C (0x374995956e95dcfb), U64_C (0xad56d8d847d88e9f),
+ U64_C (0xeb70fbfbcbfb8b30), U64_C (0xc1cdeeee9fee2371),
+ U64_C (0xf8bb7c7ced7cc791), U64_C (0xcc716666856617e3),
+ U64_C (0xa77bdddd53dda68e), U64_C (0x2eaf17175c17b84b),
+ U64_C (0x8e45474701470246), U64_C (0x211a9e9e429e84dc),
+ U64_C (0x89d4caca0fca1ec5), U64_C (0x5a582d2db42d7599),
+ U64_C (0x632ebfbfc6bf9179), U64_C (0x0e3f07071c07381b),
+ U64_C (0x47acadad8ead0123), U64_C (0xb4b05a5a755aea2f),
+ U64_C (0x1bef838336836cb5), U64_C (0x66b63333cc3385ff),
+ U64_C (0xc65c636391633ff2), U64_C (0x041202020802100a),
+ U64_C (0x4993aaaa92aa3938), U64_C (0xe2de7171d971afa8),
+ U64_C (0x8dc6c8c807c80ecf), U64_C (0x32d119196419c87d),
+ U64_C (0x923b494939497270), U64_C (0xaf5fd9d943d9869a),
+ U64_C (0xf931f2f2eff2c31d), U64_C (0xdba8e3e3abe34b48),
+ U64_C (0xb6b95b5b715be22a), U64_C (0x0dbc88881a883492),
+ U64_C (0x293e9a9a529aa4c8), U64_C (0x4c0b262698262dbe),
+ U64_C (0x64bf3232c8328dfa), U64_C (0x7d59b0b0fab0e94a),
+ U64_C (0xcff2e9e983e91b6a), U64_C (0x1e770f0f3c0f7833),
+ U64_C (0xb733d5d573d5e6a6), U64_C (0x1df480803a8074ba),
+ U64_C (0x6127bebec2be997c), U64_C (0x87ebcdcd13cd26de),
+ U64_C (0x68893434d034bde4), U64_C (0x903248483d487a75),
+ U64_C (0xe354ffffdbffab24), U64_C (0xf48d7a7af57af78f),
+ U64_C (0x3d6490907a90f4ea), U64_C (0xbe9d5f5f615fc23e),
+ U64_C (0x403d202080201da0), U64_C (0xd00f6868bd6867d5),
+ U64_C (0x34ca1a1a681ad072), U64_C (0x41b7aeae82ae192c),
+ U64_C (0x757db4b4eab4c95e), U64_C (0xa8ce54544d549a19),
+ U64_C (0x3b7f93937693ece5), U64_C (0x442f222288220daa),
+ U64_C (0xc86364648d6407e9), U64_C (0xff2af1f1e3f1db12),
+ U64_C (0xe6cc7373d173bfa2), U64_C (0x248212124812905a),
+ U64_C (0x807a40401d403a5d), U64_C (0x1048080820084028),
+ U64_C (0x9b95c3c32bc356e8), U64_C (0xc5dfecec97ec337b),
+ U64_C (0xab4ddbdb4bdb9690), U64_C (0x5fc0a1a1bea1611f),
+ U64_C (0x07918d8d0e8d1c83), U64_C (0x7ac83d3df43df5c9),
+ U64_C (0x335b97976697ccf1), U64_C (0x0000000000000000),
+ U64_C (0x83f9cfcf1bcf36d4), U64_C (0x566e2b2bac2b4587),
+ U64_C (0xece17676c57697b3), U64_C (0x19e68282328264b0),
+ U64_C (0xb128d6d67fd6fea9), U64_C (0x36c31b1b6c1bd877),
+ U64_C (0x7774b5b5eeb5c15b), U64_C (0x43beafaf86af1129),
+ U64_C (0xd41d6a6ab56a77df), U64_C (0xa0ea50505d50ba0d),
+ U64_C (0x8a5745450945124c), U64_C (0xfb38f3f3ebf3cb18),
+ U64_C (0x60ad3030c0309df0), U64_C (0xc3c4efef9bef2b74),
+ U64_C (0x7eda3f3ffc3fe5c3), U64_C (0xaac755554955921c),
+ U64_C (0x59dba2a2b2a27910), U64_C (0xc9e9eaea8fea0365),
+ U64_C (0xca6a656589650fec), U64_C (0x6903babad2bab968),
+ U64_C (0x5e4a2f2fbc2f6593), U64_C (0x9d8ec0c027c04ee7),
+ U64_C (0xa160dede5fdebe81), U64_C (0x38fc1c1c701ce06c),
+ U64_C (0xe746fdfdd3fdbb2e), U64_C (0x9a1f4d4d294d5264),
+ U64_C (0x397692927292e4e0), U64_C (0xeafa7575c9758fbc),
+ U64_C (0x0c3606061806301e), U64_C (0x09ae8a8a128a2498),
+ U64_C (0x794bb2b2f2b2f940), U64_C (0xd185e6e6bfe66359),
+ U64_C (0x1c7e0e0e380e7036), U64_C (0x3ee71f1f7c1ff863),
+ U64_C (0xc4556262956237f7), U64_C (0xb53ad4d477d4eea3),
+ U64_C (0x4d81a8a89aa82932), U64_C (0x315296966296c4f4),
+ U64_C (0xef62f9f9c3f99b3a), U64_C (0x97a3c5c533c566f6),
+ U64_C (0x4a102525942535b1), U64_C (0xb2ab59597959f220),
+ U64_C (0x15d084842a8454ae), U64_C (0xe4c57272d572b7a7),
+ U64_C (0x72ec3939e439d5dd), U64_C (0x98164c4c2d4c5a61),
+ U64_C (0xbc945e5e655eca3b), U64_C (0xf09f7878fd78e785),
+ U64_C (0x70e53838e038ddd8), U64_C (0x05988c8c0a8c1486),
+ U64_C (0xbf17d1d163d1c6b2), U64_C (0x57e4a5a5aea5410b),
+ U64_C (0xd9a1e2e2afe2434d), U64_C (0xc24e616199612ff8),
+ U64_C (0x7b42b3b3f6b3f145), U64_C (0x42342121842115a5),
+ U64_C (0x25089c9c4a9c94d6), U64_C (0x3cee1e1e781ef066),
+ U64_C (0x8661434311432252), U64_C (0x93b1c7c73bc776fc),
+ U64_C (0xe54ffcfcd7fcb32b), U64_C (0x0824040410042014),
+ U64_C (0xa2e351515951b208), U64_C (0x2f2599995e99bcc7),
+ U64_C (0xda226d6da96d4fc4), U64_C (0x1a650d0d340d6839),
+ U64_C (0xe979fafacffa8335), U64_C (0xa369dfdf5bdfb684),
+ U64_C (0xfca97e7ee57ed79b), U64_C (0x4819242490243db4),
+ U64_C (0x76fe3b3bec3bc5d7), U64_C (0x4b9aabab96ab313d),
+ U64_C (0x81f0cece1fce3ed1), U64_C (0x2299111144118855),
+ U64_C (0x03838f8f068f0c89), U64_C (0x9c044e4e254e4a6b),
+ U64_C (0x7366b7b7e6b7d151), U64_C (0xcbe0ebeb8beb0b60),
+ U64_C (0x78c13c3cf03cfdcc), U64_C (0x1ffd81813e817cbf),
+ U64_C (0x354094946a94d4fe), U64_C (0xf31cf7f7fbf7eb0c),
+ U64_C (0x6f18b9b9deb9a167), U64_C (0x268b13134c13985f),
+ U64_C (0x58512c2cb02c7d9c), U64_C (0xbb05d3d36bd3d6b8),
+ U64_C (0xd38ce7e7bbe76b5c), U64_C (0xdc396e6ea56e57cb),
+ U64_C (0x95aac4c437c46ef3), U64_C (0x061b03030c03180f),
+ U64_C (0xacdc565645568a13), U64_C (0x885e44440d441a49),
+ U64_C (0xfea07f7fe17fdf9e), U64_C (0x4f88a9a99ea92137),
+ U64_C (0x54672a2aa82a4d82), U64_C (0x6b0abbbbd6bbb16d),
+ U64_C (0x9f87c1c123c146e2), U64_C (0xa6f153535153a202),
+ U64_C (0xa572dcdc57dcae8b), U64_C (0x16530b0b2c0b5827),
+ U64_C (0x27019d9d4e9d9cd3), U64_C (0xd82b6c6cad6c47c1),
+ U64_C (0x62a43131c43195f5), U64_C (0xe8f37474cd7487b9),
+ U64_C (0xf115f6f6fff6e309), U64_C (0x8c4c464605460a43),
+ U64_C (0x45a5acac8aac0926), U64_C (0x0fb589891e893c97),
+ U64_C (0x28b414145014a044), U64_C (0xdfbae1e1a3e15b42),
+ U64_C (0x2ca616165816b04e), U64_C (0x74f73a3ae83acdd2),
+ U64_C (0xd2066969b9696fd0), U64_C (0x124109092409482d),
+ U64_C (0xe0d77070dd70a7ad), U64_C (0x716fb6b6e2b6d954),
+ U64_C (0xbd1ed0d067d0ceb7), U64_C (0xc7d6eded93ed3b7e),
+ U64_C (0x85e2cccc17cc2edb), U64_C (0x8468424215422a57),
+ U64_C (0x2d2c98985a98b4c2), U64_C (0x55eda4a4aaa4490e),
+ U64_C (0x50752828a0285d88), U64_C (0xb8865c5c6d5cda31),
+ U64_C (0xed6bf8f8c7f8933f), U64_C (0x11c28686228644a4),
+ };
+
+static const u64 C3[256] =
+ {
+ U64_C (0x7830d818186018c0), U64_C (0xaf462623238c2305),
+ U64_C (0xf991b8c6c63fc67e), U64_C (0x6fcdfbe8e887e813),
+ U64_C (0xa113cb878726874c), U64_C (0x626d11b8b8dab8a9),
+ U64_C (0x0502090101040108), U64_C (0x6e9e0d4f4f214f42),
+ U64_C (0xee6c9b3636d836ad), U64_C (0x0451ffa6a6a2a659),
+ U64_C (0xbdb90cd2d26fd2de), U64_C (0x06f70ef5f5f3f5fb),
+ U64_C (0x80f2967979f979ef), U64_C (0xcede306f6fa16f5f),
+ U64_C (0xef3f6d91917e91fc), U64_C (0x07a4f852525552aa),
+ U64_C (0xfdc04760609d6027), U64_C (0x766535bcbccabc89),
+ U64_C (0xcd2b379b9b569bac), U64_C (0x8c018a8e8e028e04),
+ U64_C (0x155bd2a3a3b6a371), U64_C (0x3c186c0c0c300c60),
+ U64_C (0x8af6847b7bf17bff), U64_C (0xe16a803535d435b5),
+ U64_C (0x693af51d1d741de8), U64_C (0x47ddb3e0e0a7e053),
+ U64_C (0xacb321d7d77bd7f6), U64_C (0xed999cc2c22fc25e),
+ U64_C (0x965c432e2eb82e6d), U64_C (0x7a96294b4b314b62),
+ U64_C (0x21e15dfefedffea3), U64_C (0x16aed55757415782),
+ U64_C (0x412abd15155415a8), U64_C (0xb6eee87777c1779f),
+ U64_C (0xeb6e923737dc37a5), U64_C (0x56d79ee5e5b3e57b),
+ U64_C (0xd923139f9f469f8c), U64_C (0x17fd23f0f0e7f0d3),
+ U64_C (0x7f94204a4a354a6a), U64_C (0x95a944dada4fda9e),
+ U64_C (0x25b0a258587d58fa), U64_C (0xca8fcfc9c903c906),
+ U64_C (0x8d527c2929a42955), U64_C (0x22145a0a0a280a50),
+ U64_C (0x4f7f50b1b1feb1e1), U64_C (0x1a5dc9a0a0baa069),
+ U64_C (0xdad6146b6bb16b7f), U64_C (0xab17d985852e855c),
+ U64_C (0x73673cbdbdcebd81), U64_C (0x34ba8f5d5d695dd2),
+ U64_C (0x5020901010401080), U64_C (0x03f507f4f4f7f4f3),
+ U64_C (0xc08bddcbcb0bcb16), U64_C (0xc67cd33e3ef83eed),
+ U64_C (0x110a2d0505140528), U64_C (0xe6ce78676781671f),
+ U64_C (0x53d597e4e4b7e473), U64_C (0xbb4e0227279c2725),
+ U64_C (0x5882734141194132), U64_C (0x9d0ba78b8b168b2c),
+ U64_C (0x0153f6a7a7a6a751), U64_C (0x94fab27d7de97dcf),
+ U64_C (0xfb374995956e95dc), U64_C (0x9fad56d8d847d88e),
+ U64_C (0x30eb70fbfbcbfb8b), U64_C (0x71c1cdeeee9fee23),
+ U64_C (0x91f8bb7c7ced7cc7), U64_C (0xe3cc716666856617),
+ U64_C (0x8ea77bdddd53dda6), U64_C (0x4b2eaf17175c17b8),
+ U64_C (0x468e454747014702), U64_C (0xdc211a9e9e429e84),
+ U64_C (0xc589d4caca0fca1e), U64_C (0x995a582d2db42d75),
+ U64_C (0x79632ebfbfc6bf91), U64_C (0x1b0e3f07071c0738),
+ U64_C (0x2347acadad8ead01), U64_C (0x2fb4b05a5a755aea),
+ U64_C (0xb51bef838336836c), U64_C (0xff66b63333cc3385),
+ U64_C (0xf2c65c636391633f), U64_C (0x0a04120202080210),
+ U64_C (0x384993aaaa92aa39), U64_C (0xa8e2de7171d971af),
+ U64_C (0xcf8dc6c8c807c80e), U64_C (0x7d32d119196419c8),
+ U64_C (0x70923b4949394972), U64_C (0x9aaf5fd9d943d986),
+ U64_C (0x1df931f2f2eff2c3), U64_C (0x48dba8e3e3abe34b),
+ U64_C (0x2ab6b95b5b715be2), U64_C (0x920dbc88881a8834),
+ U64_C (0xc8293e9a9a529aa4), U64_C (0xbe4c0b262698262d),
+ U64_C (0xfa64bf3232c8328d), U64_C (0x4a7d59b0b0fab0e9),
+ U64_C (0x6acff2e9e983e91b), U64_C (0x331e770f0f3c0f78),
+ U64_C (0xa6b733d5d573d5e6), U64_C (0xba1df480803a8074),
+ U64_C (0x7c6127bebec2be99), U64_C (0xde87ebcdcd13cd26),
+ U64_C (0xe468893434d034bd), U64_C (0x75903248483d487a),
+ U64_C (0x24e354ffffdbffab), U64_C (0x8ff48d7a7af57af7),
+ U64_C (0xea3d6490907a90f4), U64_C (0x3ebe9d5f5f615fc2),
+ U64_C (0xa0403d202080201d), U64_C (0xd5d00f6868bd6867),
+ U64_C (0x7234ca1a1a681ad0), U64_C (0x2c41b7aeae82ae19),
+ U64_C (0x5e757db4b4eab4c9), U64_C (0x19a8ce54544d549a),
+ U64_C (0xe53b7f93937693ec), U64_C (0xaa442f222288220d),
+ U64_C (0xe9c86364648d6407), U64_C (0x12ff2af1f1e3f1db),
+ U64_C (0xa2e6cc7373d173bf), U64_C (0x5a24821212481290),
+ U64_C (0x5d807a40401d403a), U64_C (0x2810480808200840),
+ U64_C (0xe89b95c3c32bc356), U64_C (0x7bc5dfecec97ec33),
+ U64_C (0x90ab4ddbdb4bdb96), U64_C (0x1f5fc0a1a1bea161),
+ U64_C (0x8307918d8d0e8d1c), U64_C (0xc97ac83d3df43df5),
+ U64_C (0xf1335b97976697cc), U64_C (0x0000000000000000),
+ U64_C (0xd483f9cfcf1bcf36), U64_C (0x87566e2b2bac2b45),
+ U64_C (0xb3ece17676c57697), U64_C (0xb019e68282328264),
+ U64_C (0xa9b128d6d67fd6fe), U64_C (0x7736c31b1b6c1bd8),
+ U64_C (0x5b7774b5b5eeb5c1), U64_C (0x2943beafaf86af11),
+ U64_C (0xdfd41d6a6ab56a77), U64_C (0x0da0ea50505d50ba),
+ U64_C (0x4c8a574545094512), U64_C (0x18fb38f3f3ebf3cb),
+ U64_C (0xf060ad3030c0309d), U64_C (0x74c3c4efef9bef2b),
+ U64_C (0xc37eda3f3ffc3fe5), U64_C (0x1caac75555495592),
+ U64_C (0x1059dba2a2b2a279), U64_C (0x65c9e9eaea8fea03),
+ U64_C (0xecca6a656589650f), U64_C (0x686903babad2bab9),
+ U64_C (0x935e4a2f2fbc2f65), U64_C (0xe79d8ec0c027c04e),
+ U64_C (0x81a160dede5fdebe), U64_C (0x6c38fc1c1c701ce0),
+ U64_C (0x2ee746fdfdd3fdbb), U64_C (0x649a1f4d4d294d52),
+ U64_C (0xe0397692927292e4), U64_C (0xbceafa7575c9758f),
+ U64_C (0x1e0c360606180630), U64_C (0x9809ae8a8a128a24),
+ U64_C (0x40794bb2b2f2b2f9), U64_C (0x59d185e6e6bfe663),
+ U64_C (0x361c7e0e0e380e70), U64_C (0x633ee71f1f7c1ff8),
+ U64_C (0xf7c4556262956237), U64_C (0xa3b53ad4d477d4ee),
+ U64_C (0x324d81a8a89aa829), U64_C (0xf4315296966296c4),
+ U64_C (0x3aef62f9f9c3f99b), U64_C (0xf697a3c5c533c566),
+ U64_C (0xb14a102525942535), U64_C (0x20b2ab59597959f2),
+ U64_C (0xae15d084842a8454), U64_C (0xa7e4c57272d572b7),
+ U64_C (0xdd72ec3939e439d5), U64_C (0x6198164c4c2d4c5a),
+ U64_C (0x3bbc945e5e655eca), U64_C (0x85f09f7878fd78e7),
+ U64_C (0xd870e53838e038dd), U64_C (0x8605988c8c0a8c14),
+ U64_C (0xb2bf17d1d163d1c6), U64_C (0x0b57e4a5a5aea541),
+ U64_C (0x4dd9a1e2e2afe243), U64_C (0xf8c24e616199612f),
+ U64_C (0x457b42b3b3f6b3f1), U64_C (0xa542342121842115),
+ U64_C (0xd625089c9c4a9c94), U64_C (0x663cee1e1e781ef0),
+ U64_C (0x5286614343114322), U64_C (0xfc93b1c7c73bc776),
+ U64_C (0x2be54ffcfcd7fcb3), U64_C (0x1408240404100420),
+ U64_C (0x08a2e351515951b2), U64_C (0xc72f2599995e99bc),
+ U64_C (0xc4da226d6da96d4f), U64_C (0x391a650d0d340d68),
+ U64_C (0x35e979fafacffa83), U64_C (0x84a369dfdf5bdfb6),
+ U64_C (0x9bfca97e7ee57ed7), U64_C (0xb44819242490243d),
+ U64_C (0xd776fe3b3bec3bc5), U64_C (0x3d4b9aabab96ab31),
+ U64_C (0xd181f0cece1fce3e), U64_C (0x5522991111441188),
+ U64_C (0x8903838f8f068f0c), U64_C (0x6b9c044e4e254e4a),
+ U64_C (0x517366b7b7e6b7d1), U64_C (0x60cbe0ebeb8beb0b),
+ U64_C (0xcc78c13c3cf03cfd), U64_C (0xbf1ffd81813e817c),
+ U64_C (0xfe354094946a94d4), U64_C (0x0cf31cf7f7fbf7eb),
+ U64_C (0x676f18b9b9deb9a1), U64_C (0x5f268b13134c1398),
+ U64_C (0x9c58512c2cb02c7d), U64_C (0xb8bb05d3d36bd3d6),
+ U64_C (0x5cd38ce7e7bbe76b), U64_C (0xcbdc396e6ea56e57),
+ U64_C (0xf395aac4c437c46e), U64_C (0x0f061b03030c0318),
+ U64_C (0x13acdc565645568a), U64_C (0x49885e44440d441a),
+ U64_C (0x9efea07f7fe17fdf), U64_C (0x374f88a9a99ea921),
+ U64_C (0x8254672a2aa82a4d), U64_C (0x6d6b0abbbbd6bbb1),
+ U64_C (0xe29f87c1c123c146), U64_C (0x02a6f153535153a2),
+ U64_C (0x8ba572dcdc57dcae), U64_C (0x2716530b0b2c0b58),
+ U64_C (0xd327019d9d4e9d9c), U64_C (0xc1d82b6c6cad6c47),
+ U64_C (0xf562a43131c43195), U64_C (0xb9e8f37474cd7487),
+ U64_C (0x09f115f6f6fff6e3), U64_C (0x438c4c464605460a),
+ U64_C (0x2645a5acac8aac09), U64_C (0x970fb589891e893c),
+ U64_C (0x4428b414145014a0), U64_C (0x42dfbae1e1a3e15b),
+ U64_C (0x4e2ca616165816b0), U64_C (0xd274f73a3ae83acd),
+ U64_C (0xd0d2066969b9696f), U64_C (0x2d12410909240948),
+ U64_C (0xade0d77070dd70a7), U64_C (0x54716fb6b6e2b6d9),
+ U64_C (0xb7bd1ed0d067d0ce), U64_C (0x7ec7d6eded93ed3b),
+ U64_C (0xdb85e2cccc17cc2e), U64_C (0x578468424215422a),
+ U64_C (0xc22d2c98985a98b4), U64_C (0x0e55eda4a4aaa449),
+ U64_C (0x8850752828a0285d), U64_C (0x31b8865c5c6d5cda),
+ U64_C (0x3fed6bf8f8c7f893), U64_C (0xa411c28686228644),
+ };
+
+static const u64 C4[256] =
+ {
+ U64_C (0xc07830d818186018), U64_C (0x05af462623238c23),
+ U64_C (0x7ef991b8c6c63fc6), U64_C (0x136fcdfbe8e887e8),
+ U64_C (0x4ca113cb87872687), U64_C (0xa9626d11b8b8dab8),
+ U64_C (0x0805020901010401), U64_C (0x426e9e0d4f4f214f),
+ U64_C (0xadee6c9b3636d836), U64_C (0x590451ffa6a6a2a6),
+ U64_C (0xdebdb90cd2d26fd2), U64_C (0xfb06f70ef5f5f3f5),
+ U64_C (0xef80f2967979f979), U64_C (0x5fcede306f6fa16f),
+ U64_C (0xfcef3f6d91917e91), U64_C (0xaa07a4f852525552),
+ U64_C (0x27fdc04760609d60), U64_C (0x89766535bcbccabc),
+ U64_C (0xaccd2b379b9b569b), U64_C (0x048c018a8e8e028e),
+ U64_C (0x71155bd2a3a3b6a3), U64_C (0x603c186c0c0c300c),
+ U64_C (0xff8af6847b7bf17b), U64_C (0xb5e16a803535d435),
+ U64_C (0xe8693af51d1d741d), U64_C (0x5347ddb3e0e0a7e0),
+ U64_C (0xf6acb321d7d77bd7), U64_C (0x5eed999cc2c22fc2),
+ U64_C (0x6d965c432e2eb82e), U64_C (0x627a96294b4b314b),
+ U64_C (0xa321e15dfefedffe), U64_C (0x8216aed557574157),
+ U64_C (0xa8412abd15155415), U64_C (0x9fb6eee87777c177),
+ U64_C (0xa5eb6e923737dc37), U64_C (0x7b56d79ee5e5b3e5),
+ U64_C (0x8cd923139f9f469f), U64_C (0xd317fd23f0f0e7f0),
+ U64_C (0x6a7f94204a4a354a), U64_C (0x9e95a944dada4fda),
+ U64_C (0xfa25b0a258587d58), U64_C (0x06ca8fcfc9c903c9),
+ U64_C (0x558d527c2929a429), U64_C (0x5022145a0a0a280a),
+ U64_C (0xe14f7f50b1b1feb1), U64_C (0x691a5dc9a0a0baa0),
+ U64_C (0x7fdad6146b6bb16b), U64_C (0x5cab17d985852e85),
+ U64_C (0x8173673cbdbdcebd), U64_C (0xd234ba8f5d5d695d),
+ U64_C (0x8050209010104010), U64_C (0xf303f507f4f4f7f4),
+ U64_C (0x16c08bddcbcb0bcb), U64_C (0xedc67cd33e3ef83e),
+ U64_C (0x28110a2d05051405), U64_C (0x1fe6ce7867678167),
+ U64_C (0x7353d597e4e4b7e4), U64_C (0x25bb4e0227279c27),
+ U64_C (0x3258827341411941), U64_C (0x2c9d0ba78b8b168b),
+ U64_C (0x510153f6a7a7a6a7), U64_C (0xcf94fab27d7de97d),
+ U64_C (0xdcfb374995956e95), U64_C (0x8e9fad56d8d847d8),
+ U64_C (0x8b30eb70fbfbcbfb), U64_C (0x2371c1cdeeee9fee),
+ U64_C (0xc791f8bb7c7ced7c), U64_C (0x17e3cc7166668566),
+ U64_C (0xa68ea77bdddd53dd), U64_C (0xb84b2eaf17175c17),
+ U64_C (0x02468e4547470147), U64_C (0x84dc211a9e9e429e),
+ U64_C (0x1ec589d4caca0fca), U64_C (0x75995a582d2db42d),
+ U64_C (0x9179632ebfbfc6bf), U64_C (0x381b0e3f07071c07),
+ U64_C (0x012347acadad8ead), U64_C (0xea2fb4b05a5a755a),
+ U64_C (0x6cb51bef83833683), U64_C (0x85ff66b63333cc33),
+ U64_C (0x3ff2c65c63639163), U64_C (0x100a041202020802),
+ U64_C (0x39384993aaaa92aa), U64_C (0xafa8e2de7171d971),
+ U64_C (0x0ecf8dc6c8c807c8), U64_C (0xc87d32d119196419),
+ U64_C (0x7270923b49493949), U64_C (0x869aaf5fd9d943d9),
+ U64_C (0xc31df931f2f2eff2), U64_C (0x4b48dba8e3e3abe3),
+ U64_C (0xe22ab6b95b5b715b), U64_C (0x34920dbc88881a88),
+ U64_C (0xa4c8293e9a9a529a), U64_C (0x2dbe4c0b26269826),
+ U64_C (0x8dfa64bf3232c832), U64_C (0xe94a7d59b0b0fab0),
+ U64_C (0x1b6acff2e9e983e9), U64_C (0x78331e770f0f3c0f),
+ U64_C (0xe6a6b733d5d573d5), U64_C (0x74ba1df480803a80),
+ U64_C (0x997c6127bebec2be), U64_C (0x26de87ebcdcd13cd),
+ U64_C (0xbde468893434d034), U64_C (0x7a75903248483d48),
+ U64_C (0xab24e354ffffdbff), U64_C (0xf78ff48d7a7af57a),
+ U64_C (0xf4ea3d6490907a90), U64_C (0xc23ebe9d5f5f615f),
+ U64_C (0x1da0403d20208020), U64_C (0x67d5d00f6868bd68),
+ U64_C (0xd07234ca1a1a681a), U64_C (0x192c41b7aeae82ae),
+ U64_C (0xc95e757db4b4eab4), U64_C (0x9a19a8ce54544d54),
+ U64_C (0xece53b7f93937693), U64_C (0x0daa442f22228822),
+ U64_C (0x07e9c86364648d64), U64_C (0xdb12ff2af1f1e3f1),
+ U64_C (0xbfa2e6cc7373d173), U64_C (0x905a248212124812),
+ U64_C (0x3a5d807a40401d40), U64_C (0x4028104808082008),
+ U64_C (0x56e89b95c3c32bc3), U64_C (0x337bc5dfecec97ec),
+ U64_C (0x9690ab4ddbdb4bdb), U64_C (0x611f5fc0a1a1bea1),
+ U64_C (0x1c8307918d8d0e8d), U64_C (0xf5c97ac83d3df43d),
+ U64_C (0xccf1335b97976697), U64_C (0x0000000000000000),
+ U64_C (0x36d483f9cfcf1bcf), U64_C (0x4587566e2b2bac2b),
+ U64_C (0x97b3ece17676c576), U64_C (0x64b019e682823282),
+ U64_C (0xfea9b128d6d67fd6), U64_C (0xd87736c31b1b6c1b),
+ U64_C (0xc15b7774b5b5eeb5), U64_C (0x112943beafaf86af),
+ U64_C (0x77dfd41d6a6ab56a), U64_C (0xba0da0ea50505d50),
+ U64_C (0x124c8a5745450945), U64_C (0xcb18fb38f3f3ebf3),
+ U64_C (0x9df060ad3030c030), U64_C (0x2b74c3c4efef9bef),
+ U64_C (0xe5c37eda3f3ffc3f), U64_C (0x921caac755554955),
+ U64_C (0x791059dba2a2b2a2), U64_C (0x0365c9e9eaea8fea),
+ U64_C (0x0fecca6a65658965), U64_C (0xb9686903babad2ba),
+ U64_C (0x65935e4a2f2fbc2f), U64_C (0x4ee79d8ec0c027c0),
+ U64_C (0xbe81a160dede5fde), U64_C (0xe06c38fc1c1c701c),
+ U64_C (0xbb2ee746fdfdd3fd), U64_C (0x52649a1f4d4d294d),
+ U64_C (0xe4e0397692927292), U64_C (0x8fbceafa7575c975),
+ U64_C (0x301e0c3606061806), U64_C (0x249809ae8a8a128a),
+ U64_C (0xf940794bb2b2f2b2), U64_C (0x6359d185e6e6bfe6),
+ U64_C (0x70361c7e0e0e380e), U64_C (0xf8633ee71f1f7c1f),
+ U64_C (0x37f7c45562629562), U64_C (0xeea3b53ad4d477d4),
+ U64_C (0x29324d81a8a89aa8), U64_C (0xc4f4315296966296),
+ U64_C (0x9b3aef62f9f9c3f9), U64_C (0x66f697a3c5c533c5),
+ U64_C (0x35b14a1025259425), U64_C (0xf220b2ab59597959),
+ U64_C (0x54ae15d084842a84), U64_C (0xb7a7e4c57272d572),
+ U64_C (0xd5dd72ec3939e439), U64_C (0x5a6198164c4c2d4c),
+ U64_C (0xca3bbc945e5e655e), U64_C (0xe785f09f7878fd78),
+ U64_C (0xddd870e53838e038), U64_C (0x148605988c8c0a8c),
+ U64_C (0xc6b2bf17d1d163d1), U64_C (0x410b57e4a5a5aea5),
+ U64_C (0x434dd9a1e2e2afe2), U64_C (0x2ff8c24e61619961),
+ U64_C (0xf1457b42b3b3f6b3), U64_C (0x15a5423421218421),
+ U64_C (0x94d625089c9c4a9c), U64_C (0xf0663cee1e1e781e),
+ U64_C (0x2252866143431143), U64_C (0x76fc93b1c7c73bc7),
+ U64_C (0xb32be54ffcfcd7fc), U64_C (0x2014082404041004),
+ U64_C (0xb208a2e351515951), U64_C (0xbcc72f2599995e99),
+ U64_C (0x4fc4da226d6da96d), U64_C (0x68391a650d0d340d),
+ U64_C (0x8335e979fafacffa), U64_C (0xb684a369dfdf5bdf),
+ U64_C (0xd79bfca97e7ee57e), U64_C (0x3db4481924249024),
+ U64_C (0xc5d776fe3b3bec3b), U64_C (0x313d4b9aabab96ab),
+ U64_C (0x3ed181f0cece1fce), U64_C (0x8855229911114411),
+ U64_C (0x0c8903838f8f068f), U64_C (0x4a6b9c044e4e254e),
+ U64_C (0xd1517366b7b7e6b7), U64_C (0x0b60cbe0ebeb8beb),
+ U64_C (0xfdcc78c13c3cf03c), U64_C (0x7cbf1ffd81813e81),
+ U64_C (0xd4fe354094946a94), U64_C (0xeb0cf31cf7f7fbf7),
+ U64_C (0xa1676f18b9b9deb9), U64_C (0x985f268b13134c13),
+ U64_C (0x7d9c58512c2cb02c), U64_C (0xd6b8bb05d3d36bd3),
+ U64_C (0x6b5cd38ce7e7bbe7), U64_C (0x57cbdc396e6ea56e),
+ U64_C (0x6ef395aac4c437c4), U64_C (0x180f061b03030c03),
+ U64_C (0x8a13acdc56564556), U64_C (0x1a49885e44440d44),
+ U64_C (0xdf9efea07f7fe17f), U64_C (0x21374f88a9a99ea9),
+ U64_C (0x4d8254672a2aa82a), U64_C (0xb16d6b0abbbbd6bb),
+ U64_C (0x46e29f87c1c123c1), U64_C (0xa202a6f153535153),
+ U64_C (0xae8ba572dcdc57dc), U64_C (0x582716530b0b2c0b),
+ U64_C (0x9cd327019d9d4e9d), U64_C (0x47c1d82b6c6cad6c),
+ U64_C (0x95f562a43131c431), U64_C (0x87b9e8f37474cd74),
+ U64_C (0xe309f115f6f6fff6), U64_C (0x0a438c4c46460546),
+ U64_C (0x092645a5acac8aac), U64_C (0x3c970fb589891e89),
+ U64_C (0xa04428b414145014), U64_C (0x5b42dfbae1e1a3e1),
+ U64_C (0xb04e2ca616165816), U64_C (0xcdd274f73a3ae83a),
+ U64_C (0x6fd0d2066969b969), U64_C (0x482d124109092409),
+ U64_C (0xa7ade0d77070dd70), U64_C (0xd954716fb6b6e2b6),
+ U64_C (0xceb7bd1ed0d067d0), U64_C (0x3b7ec7d6eded93ed),
+ U64_C (0x2edb85e2cccc17cc), U64_C (0x2a57846842421542),
+ U64_C (0xb4c22d2c98985a98), U64_C (0x490e55eda4a4aaa4),
+ U64_C (0x5d8850752828a028), U64_C (0xda31b8865c5c6d5c),
+ U64_C (0x933fed6bf8f8c7f8), U64_C (0x44a411c286862286),
+ };
+
+static const u64 C5[256] =
+ {
+ U64_C (0x18c07830d8181860), U64_C (0x2305af462623238c),
+ U64_C (0xc67ef991b8c6c63f), U64_C (0xe8136fcdfbe8e887),
+ U64_C (0x874ca113cb878726), U64_C (0xb8a9626d11b8b8da),
+ U64_C (0x0108050209010104), U64_C (0x4f426e9e0d4f4f21),
+ U64_C (0x36adee6c9b3636d8), U64_C (0xa6590451ffa6a6a2),
+ U64_C (0xd2debdb90cd2d26f), U64_C (0xf5fb06f70ef5f5f3),
+ U64_C (0x79ef80f2967979f9), U64_C (0x6f5fcede306f6fa1),
+ U64_C (0x91fcef3f6d91917e), U64_C (0x52aa07a4f8525255),
+ U64_C (0x6027fdc04760609d), U64_C (0xbc89766535bcbcca),
+ U64_C (0x9baccd2b379b9b56), U64_C (0x8e048c018a8e8e02),
+ U64_C (0xa371155bd2a3a3b6), U64_C (0x0c603c186c0c0c30),
+ U64_C (0x7bff8af6847b7bf1), U64_C (0x35b5e16a803535d4),
+ U64_C (0x1de8693af51d1d74), U64_C (0xe05347ddb3e0e0a7),
+ U64_C (0xd7f6acb321d7d77b), U64_C (0xc25eed999cc2c22f),
+ U64_C (0x2e6d965c432e2eb8), U64_C (0x4b627a96294b4b31),
+ U64_C (0xfea321e15dfefedf), U64_C (0x578216aed5575741),
+ U64_C (0x15a8412abd151554), U64_C (0x779fb6eee87777c1),
+ U64_C (0x37a5eb6e923737dc), U64_C (0xe57b56d79ee5e5b3),
+ U64_C (0x9f8cd923139f9f46), U64_C (0xf0d317fd23f0f0e7),
+ U64_C (0x4a6a7f94204a4a35), U64_C (0xda9e95a944dada4f),
+ U64_C (0x58fa25b0a258587d), U64_C (0xc906ca8fcfc9c903),
+ U64_C (0x29558d527c2929a4), U64_C (0x0a5022145a0a0a28),
+ U64_C (0xb1e14f7f50b1b1fe), U64_C (0xa0691a5dc9a0a0ba),
+ U64_C (0x6b7fdad6146b6bb1), U64_C (0x855cab17d985852e),
+ U64_C (0xbd8173673cbdbdce), U64_C (0x5dd234ba8f5d5d69),
+ U64_C (0x1080502090101040), U64_C (0xf4f303f507f4f4f7),
+ U64_C (0xcb16c08bddcbcb0b), U64_C (0x3eedc67cd33e3ef8),
+ U64_C (0x0528110a2d050514), U64_C (0x671fe6ce78676781),
+ U64_C (0xe47353d597e4e4b7), U64_C (0x2725bb4e0227279c),
+ U64_C (0x4132588273414119), U64_C (0x8b2c9d0ba78b8b16),
+ U64_C (0xa7510153f6a7a7a6), U64_C (0x7dcf94fab27d7de9),
+ U64_C (0x95dcfb374995956e), U64_C (0xd88e9fad56d8d847),
+ U64_C (0xfb8b30eb70fbfbcb), U64_C (0xee2371c1cdeeee9f),
+ U64_C (0x7cc791f8bb7c7ced), U64_C (0x6617e3cc71666685),
+ U64_C (0xdda68ea77bdddd53), U64_C (0x17b84b2eaf17175c),
+ U64_C (0x4702468e45474701), U64_C (0x9e84dc211a9e9e42),
+ U64_C (0xca1ec589d4caca0f), U64_C (0x2d75995a582d2db4),
+ U64_C (0xbf9179632ebfbfc6), U64_C (0x07381b0e3f07071c),
+ U64_C (0xad012347acadad8e), U64_C (0x5aea2fb4b05a5a75),
+ U64_C (0x836cb51bef838336), U64_C (0x3385ff66b63333cc),
+ U64_C (0x633ff2c65c636391), U64_C (0x02100a0412020208),
+ U64_C (0xaa39384993aaaa92), U64_C (0x71afa8e2de7171d9),
+ U64_C (0xc80ecf8dc6c8c807), U64_C (0x19c87d32d1191964),
+ U64_C (0x497270923b494939), U64_C (0xd9869aaf5fd9d943),
+ U64_C (0xf2c31df931f2f2ef), U64_C (0xe34b48dba8e3e3ab),
+ U64_C (0x5be22ab6b95b5b71), U64_C (0x8834920dbc88881a),
+ U64_C (0x9aa4c8293e9a9a52), U64_C (0x262dbe4c0b262698),
+ U64_C (0x328dfa64bf3232c8), U64_C (0xb0e94a7d59b0b0fa),
+ U64_C (0xe91b6acff2e9e983), U64_C (0x0f78331e770f0f3c),
+ U64_C (0xd5e6a6b733d5d573), U64_C (0x8074ba1df480803a),
+ U64_C (0xbe997c6127bebec2), U64_C (0xcd26de87ebcdcd13),
+ U64_C (0x34bde468893434d0), U64_C (0x487a75903248483d),
+ U64_C (0xffab24e354ffffdb), U64_C (0x7af78ff48d7a7af5),
+ U64_C (0x90f4ea3d6490907a), U64_C (0x5fc23ebe9d5f5f61),
+ U64_C (0x201da0403d202080), U64_C (0x6867d5d00f6868bd),
+ U64_C (0x1ad07234ca1a1a68), U64_C (0xae192c41b7aeae82),
+ U64_C (0xb4c95e757db4b4ea), U64_C (0x549a19a8ce54544d),
+ U64_C (0x93ece53b7f939376), U64_C (0x220daa442f222288),
+ U64_C (0x6407e9c86364648d), U64_C (0xf1db12ff2af1f1e3),
+ U64_C (0x73bfa2e6cc7373d1), U64_C (0x12905a2482121248),
+ U64_C (0x403a5d807a40401d), U64_C (0x0840281048080820),
+ U64_C (0xc356e89b95c3c32b), U64_C (0xec337bc5dfecec97),
+ U64_C (0xdb9690ab4ddbdb4b), U64_C (0xa1611f5fc0a1a1be),
+ U64_C (0x8d1c8307918d8d0e), U64_C (0x3df5c97ac83d3df4),
+ U64_C (0x97ccf1335b979766), U64_C (0x0000000000000000),
+ U64_C (0xcf36d483f9cfcf1b), U64_C (0x2b4587566e2b2bac),
+ U64_C (0x7697b3ece17676c5), U64_C (0x8264b019e6828232),
+ U64_C (0xd6fea9b128d6d67f), U64_C (0x1bd87736c31b1b6c),
+ U64_C (0xb5c15b7774b5b5ee), U64_C (0xaf112943beafaf86),
+ U64_C (0x6a77dfd41d6a6ab5), U64_C (0x50ba0da0ea50505d),
+ U64_C (0x45124c8a57454509), U64_C (0xf3cb18fb38f3f3eb),
+ U64_C (0x309df060ad3030c0), U64_C (0xef2b74c3c4efef9b),
+ U64_C (0x3fe5c37eda3f3ffc), U64_C (0x55921caac7555549),
+ U64_C (0xa2791059dba2a2b2), U64_C (0xea0365c9e9eaea8f),
+ U64_C (0x650fecca6a656589), U64_C (0xbab9686903babad2),
+ U64_C (0x2f65935e4a2f2fbc), U64_C (0xc04ee79d8ec0c027),
+ U64_C (0xdebe81a160dede5f), U64_C (0x1ce06c38fc1c1c70),
+ U64_C (0xfdbb2ee746fdfdd3), U64_C (0x4d52649a1f4d4d29),
+ U64_C (0x92e4e03976929272), U64_C (0x758fbceafa7575c9),
+ U64_C (0x06301e0c36060618), U64_C (0x8a249809ae8a8a12),
+ U64_C (0xb2f940794bb2b2f2), U64_C (0xe66359d185e6e6bf),
+ U64_C (0x0e70361c7e0e0e38), U64_C (0x1ff8633ee71f1f7c),
+ U64_C (0x6237f7c455626295), U64_C (0xd4eea3b53ad4d477),
+ U64_C (0xa829324d81a8a89a), U64_C (0x96c4f43152969662),
+ U64_C (0xf99b3aef62f9f9c3), U64_C (0xc566f697a3c5c533),
+ U64_C (0x2535b14a10252594), U64_C (0x59f220b2ab595979),
+ U64_C (0x8454ae15d084842a), U64_C (0x72b7a7e4c57272d5),
+ U64_C (0x39d5dd72ec3939e4), U64_C (0x4c5a6198164c4c2d),
+ U64_C (0x5eca3bbc945e5e65), U64_C (0x78e785f09f7878fd),
+ U64_C (0x38ddd870e53838e0), U64_C (0x8c148605988c8c0a),
+ U64_C (0xd1c6b2bf17d1d163), U64_C (0xa5410b57e4a5a5ae),
+ U64_C (0xe2434dd9a1e2e2af), U64_C (0x612ff8c24e616199),
+ U64_C (0xb3f1457b42b3b3f6), U64_C (0x2115a54234212184),
+ U64_C (0x9c94d625089c9c4a), U64_C (0x1ef0663cee1e1e78),
+ U64_C (0x4322528661434311), U64_C (0xc776fc93b1c7c73b),
+ U64_C (0xfcb32be54ffcfcd7), U64_C (0x0420140824040410),
+ U64_C (0x51b208a2e3515159), U64_C (0x99bcc72f2599995e),
+ U64_C (0x6d4fc4da226d6da9), U64_C (0x0d68391a650d0d34),
+ U64_C (0xfa8335e979fafacf), U64_C (0xdfb684a369dfdf5b),
+ U64_C (0x7ed79bfca97e7ee5), U64_C (0x243db44819242490),
+ U64_C (0x3bc5d776fe3b3bec), U64_C (0xab313d4b9aabab96),
+ U64_C (0xce3ed181f0cece1f), U64_C (0x1188552299111144),
+ U64_C (0x8f0c8903838f8f06), U64_C (0x4e4a6b9c044e4e25),
+ U64_C (0xb7d1517366b7b7e6), U64_C (0xeb0b60cbe0ebeb8b),
+ U64_C (0x3cfdcc78c13c3cf0), U64_C (0x817cbf1ffd81813e),
+ U64_C (0x94d4fe354094946a), U64_C (0xf7eb0cf31cf7f7fb),
+ U64_C (0xb9a1676f18b9b9de), U64_C (0x13985f268b13134c),
+ U64_C (0x2c7d9c58512c2cb0), U64_C (0xd3d6b8bb05d3d36b),
+ U64_C (0xe76b5cd38ce7e7bb), U64_C (0x6e57cbdc396e6ea5),
+ U64_C (0xc46ef395aac4c437), U64_C (0x03180f061b03030c),
+ U64_C (0x568a13acdc565645), U64_C (0x441a49885e44440d),
+ U64_C (0x7fdf9efea07f7fe1), U64_C (0xa921374f88a9a99e),
+ U64_C (0x2a4d8254672a2aa8), U64_C (0xbbb16d6b0abbbbd6),
+ U64_C (0xc146e29f87c1c123), U64_C (0x53a202a6f1535351),
+ U64_C (0xdcae8ba572dcdc57), U64_C (0x0b582716530b0b2c),
+ U64_C (0x9d9cd327019d9d4e), U64_C (0x6c47c1d82b6c6cad),
+ U64_C (0x3195f562a43131c4), U64_C (0x7487b9e8f37474cd),
+ U64_C (0xf6e309f115f6f6ff), U64_C (0x460a438c4c464605),
+ U64_C (0xac092645a5acac8a), U64_C (0x893c970fb589891e),
+ U64_C (0x14a04428b4141450), U64_C (0xe15b42dfbae1e1a3),
+ U64_C (0x16b04e2ca6161658), U64_C (0x3acdd274f73a3ae8),
+ U64_C (0x696fd0d2066969b9), U64_C (0x09482d1241090924),
+ U64_C (0x70a7ade0d77070dd), U64_C (0xb6d954716fb6b6e2),
+ U64_C (0xd0ceb7bd1ed0d067), U64_C (0xed3b7ec7d6eded93),
+ U64_C (0xcc2edb85e2cccc17), U64_C (0x422a578468424215),
+ U64_C (0x98b4c22d2c98985a), U64_C (0xa4490e55eda4a4aa),
+ U64_C (0x285d8850752828a0), U64_C (0x5cda31b8865c5c6d),
+ U64_C (0xf8933fed6bf8f8c7), U64_C (0x8644a411c2868622),
+ };
+
+static const u64 C6[256] =
+ {
+ U64_C (0x6018c07830d81818), U64_C (0x8c2305af46262323),
+ U64_C (0x3fc67ef991b8c6c6), U64_C (0x87e8136fcdfbe8e8),
+ U64_C (0x26874ca113cb8787), U64_C (0xdab8a9626d11b8b8),
+ U64_C (0x0401080502090101), U64_C (0x214f426e9e0d4f4f),
+ U64_C (0xd836adee6c9b3636), U64_C (0xa2a6590451ffa6a6),
+ U64_C (0x6fd2debdb90cd2d2), U64_C (0xf3f5fb06f70ef5f5),
+ U64_C (0xf979ef80f2967979), U64_C (0xa16f5fcede306f6f),
+ U64_C (0x7e91fcef3f6d9191), U64_C (0x5552aa07a4f85252),
+ U64_C (0x9d6027fdc0476060), U64_C (0xcabc89766535bcbc),
+ U64_C (0x569baccd2b379b9b), U64_C (0x028e048c018a8e8e),
+ U64_C (0xb6a371155bd2a3a3), U64_C (0x300c603c186c0c0c),
+ U64_C (0xf17bff8af6847b7b), U64_C (0xd435b5e16a803535),
+ U64_C (0x741de8693af51d1d), U64_C (0xa7e05347ddb3e0e0),
+ U64_C (0x7bd7f6acb321d7d7), U64_C (0x2fc25eed999cc2c2),
+ U64_C (0xb82e6d965c432e2e), U64_C (0x314b627a96294b4b),
+ U64_C (0xdffea321e15dfefe), U64_C (0x41578216aed55757),
+ U64_C (0x5415a8412abd1515), U64_C (0xc1779fb6eee87777),
+ U64_C (0xdc37a5eb6e923737), U64_C (0xb3e57b56d79ee5e5),
+ U64_C (0x469f8cd923139f9f), U64_C (0xe7f0d317fd23f0f0),
+ U64_C (0x354a6a7f94204a4a), U64_C (0x4fda9e95a944dada),
+ U64_C (0x7d58fa25b0a25858), U64_C (0x03c906ca8fcfc9c9),
+ U64_C (0xa429558d527c2929), U64_C (0x280a5022145a0a0a),
+ U64_C (0xfeb1e14f7f50b1b1), U64_C (0xbaa0691a5dc9a0a0),
+ U64_C (0xb16b7fdad6146b6b), U64_C (0x2e855cab17d98585),
+ U64_C (0xcebd8173673cbdbd), U64_C (0x695dd234ba8f5d5d),
+ U64_C (0x4010805020901010), U64_C (0xf7f4f303f507f4f4),
+ U64_C (0x0bcb16c08bddcbcb), U64_C (0xf83eedc67cd33e3e),
+ U64_C (0x140528110a2d0505), U64_C (0x81671fe6ce786767),
+ U64_C (0xb7e47353d597e4e4), U64_C (0x9c2725bb4e022727),
+ U64_C (0x1941325882734141), U64_C (0x168b2c9d0ba78b8b),
+ U64_C (0xa6a7510153f6a7a7), U64_C (0xe97dcf94fab27d7d),
+ U64_C (0x6e95dcfb37499595), U64_C (0x47d88e9fad56d8d8),
+ U64_C (0xcbfb8b30eb70fbfb), U64_C (0x9fee2371c1cdeeee),
+ U64_C (0xed7cc791f8bb7c7c), U64_C (0x856617e3cc716666),
+ U64_C (0x53dda68ea77bdddd), U64_C (0x5c17b84b2eaf1717),
+ U64_C (0x014702468e454747), U64_C (0x429e84dc211a9e9e),
+ U64_C (0x0fca1ec589d4caca), U64_C (0xb42d75995a582d2d),
+ U64_C (0xc6bf9179632ebfbf), U64_C (0x1c07381b0e3f0707),
+ U64_C (0x8ead012347acadad), U64_C (0x755aea2fb4b05a5a),
+ U64_C (0x36836cb51bef8383), U64_C (0xcc3385ff66b63333),
+ U64_C (0x91633ff2c65c6363), U64_C (0x0802100a04120202),
+ U64_C (0x92aa39384993aaaa), U64_C (0xd971afa8e2de7171),
+ U64_C (0x07c80ecf8dc6c8c8), U64_C (0x6419c87d32d11919),
+ U64_C (0x39497270923b4949), U64_C (0x43d9869aaf5fd9d9),
+ U64_C (0xeff2c31df931f2f2), U64_C (0xabe34b48dba8e3e3),
+ U64_C (0x715be22ab6b95b5b), U64_C (0x1a8834920dbc8888),
+ U64_C (0x529aa4c8293e9a9a), U64_C (0x98262dbe4c0b2626),
+ U64_C (0xc8328dfa64bf3232), U64_C (0xfab0e94a7d59b0b0),
+ U64_C (0x83e91b6acff2e9e9), U64_C (0x3c0f78331e770f0f),
+ U64_C (0x73d5e6a6b733d5d5), U64_C (0x3a8074ba1df48080),
+ U64_C (0xc2be997c6127bebe), U64_C (0x13cd26de87ebcdcd),
+ U64_C (0xd034bde468893434), U64_C (0x3d487a7590324848),
+ U64_C (0xdbffab24e354ffff), U64_C (0xf57af78ff48d7a7a),
+ U64_C (0x7a90f4ea3d649090), U64_C (0x615fc23ebe9d5f5f),
+ U64_C (0x80201da0403d2020), U64_C (0xbd6867d5d00f6868),
+ U64_C (0x681ad07234ca1a1a), U64_C (0x82ae192c41b7aeae),
+ U64_C (0xeab4c95e757db4b4), U64_C (0x4d549a19a8ce5454),
+ U64_C (0x7693ece53b7f9393), U64_C (0x88220daa442f2222),
+ U64_C (0x8d6407e9c8636464), U64_C (0xe3f1db12ff2af1f1),
+ U64_C (0xd173bfa2e6cc7373), U64_C (0x4812905a24821212),
+ U64_C (0x1d403a5d807a4040), U64_C (0x2008402810480808),
+ U64_C (0x2bc356e89b95c3c3), U64_C (0x97ec337bc5dfecec),
+ U64_C (0x4bdb9690ab4ddbdb), U64_C (0xbea1611f5fc0a1a1),
+ U64_C (0x0e8d1c8307918d8d), U64_C (0xf43df5c97ac83d3d),
+ U64_C (0x6697ccf1335b9797), U64_C (0x0000000000000000),
+ U64_C (0x1bcf36d483f9cfcf), U64_C (0xac2b4587566e2b2b),
+ U64_C (0xc57697b3ece17676), U64_C (0x328264b019e68282),
+ U64_C (0x7fd6fea9b128d6d6), U64_C (0x6c1bd87736c31b1b),
+ U64_C (0xeeb5c15b7774b5b5), U64_C (0x86af112943beafaf),
+ U64_C (0xb56a77dfd41d6a6a), U64_C (0x5d50ba0da0ea5050),
+ U64_C (0x0945124c8a574545), U64_C (0xebf3cb18fb38f3f3),
+ U64_C (0xc0309df060ad3030), U64_C (0x9bef2b74c3c4efef),
+ U64_C (0xfc3fe5c37eda3f3f), U64_C (0x4955921caac75555),
+ U64_C (0xb2a2791059dba2a2), U64_C (0x8fea0365c9e9eaea),
+ U64_C (0x89650fecca6a6565), U64_C (0xd2bab9686903baba),
+ U64_C (0xbc2f65935e4a2f2f), U64_C (0x27c04ee79d8ec0c0),
+ U64_C (0x5fdebe81a160dede), U64_C (0x701ce06c38fc1c1c),
+ U64_C (0xd3fdbb2ee746fdfd), U64_C (0x294d52649a1f4d4d),
+ U64_C (0x7292e4e039769292), U64_C (0xc9758fbceafa7575),
+ U64_C (0x1806301e0c360606), U64_C (0x128a249809ae8a8a),
+ U64_C (0xf2b2f940794bb2b2), U64_C (0xbfe66359d185e6e6),
+ U64_C (0x380e70361c7e0e0e), U64_C (0x7c1ff8633ee71f1f),
+ U64_C (0x956237f7c4556262), U64_C (0x77d4eea3b53ad4d4),
+ U64_C (0x9aa829324d81a8a8), U64_C (0x6296c4f431529696),
+ U64_C (0xc3f99b3aef62f9f9), U64_C (0x33c566f697a3c5c5),
+ U64_C (0x942535b14a102525), U64_C (0x7959f220b2ab5959),
+ U64_C (0x2a8454ae15d08484), U64_C (0xd572b7a7e4c57272),
+ U64_C (0xe439d5dd72ec3939), U64_C (0x2d4c5a6198164c4c),
+ U64_C (0x655eca3bbc945e5e), U64_C (0xfd78e785f09f7878),
+ U64_C (0xe038ddd870e53838), U64_C (0x0a8c148605988c8c),
+ U64_C (0x63d1c6b2bf17d1d1), U64_C (0xaea5410b57e4a5a5),
+ U64_C (0xafe2434dd9a1e2e2), U64_C (0x99612ff8c24e6161),
+ U64_C (0xf6b3f1457b42b3b3), U64_C (0x842115a542342121),
+ U64_C (0x4a9c94d625089c9c), U64_C (0x781ef0663cee1e1e),
+ U64_C (0x1143225286614343), U64_C (0x3bc776fc93b1c7c7),
+ U64_C (0xd7fcb32be54ffcfc), U64_C (0x1004201408240404),
+ U64_C (0x5951b208a2e35151), U64_C (0x5e99bcc72f259999),
+ U64_C (0xa96d4fc4da226d6d), U64_C (0x340d68391a650d0d),
+ U64_C (0xcffa8335e979fafa), U64_C (0x5bdfb684a369dfdf),
+ U64_C (0xe57ed79bfca97e7e), U64_C (0x90243db448192424),
+ U64_C (0xec3bc5d776fe3b3b), U64_C (0x96ab313d4b9aabab),
+ U64_C (0x1fce3ed181f0cece), U64_C (0x4411885522991111),
+ U64_C (0x068f0c8903838f8f), U64_C (0x254e4a6b9c044e4e),
+ U64_C (0xe6b7d1517366b7b7), U64_C (0x8beb0b60cbe0ebeb),
+ U64_C (0xf03cfdcc78c13c3c), U64_C (0x3e817cbf1ffd8181),
+ U64_C (0x6a94d4fe35409494), U64_C (0xfbf7eb0cf31cf7f7),
+ U64_C (0xdeb9a1676f18b9b9), U64_C (0x4c13985f268b1313),
+ U64_C (0xb02c7d9c58512c2c), U64_C (0x6bd3d6b8bb05d3d3),
+ U64_C (0xbbe76b5cd38ce7e7), U64_C (0xa56e57cbdc396e6e),
+ U64_C (0x37c46ef395aac4c4), U64_C (0x0c03180f061b0303),
+ U64_C (0x45568a13acdc5656), U64_C (0x0d441a49885e4444),
+ U64_C (0xe17fdf9efea07f7f), U64_C (0x9ea921374f88a9a9),
+ U64_C (0xa82a4d8254672a2a), U64_C (0xd6bbb16d6b0abbbb),
+ U64_C (0x23c146e29f87c1c1), U64_C (0x5153a202a6f15353),
+ U64_C (0x57dcae8ba572dcdc), U64_C (0x2c0b582716530b0b),
+ U64_C (0x4e9d9cd327019d9d), U64_C (0xad6c47c1d82b6c6c),
+ U64_C (0xc43195f562a43131), U64_C (0xcd7487b9e8f37474),
+ U64_C (0xfff6e309f115f6f6), U64_C (0x05460a438c4c4646),
+ U64_C (0x8aac092645a5acac), U64_C (0x1e893c970fb58989),
+ U64_C (0x5014a04428b41414), U64_C (0xa3e15b42dfbae1e1),
+ U64_C (0x5816b04e2ca61616), U64_C (0xe83acdd274f73a3a),
+ U64_C (0xb9696fd0d2066969), U64_C (0x2409482d12410909),
+ U64_C (0xdd70a7ade0d77070), U64_C (0xe2b6d954716fb6b6),
+ U64_C (0x67d0ceb7bd1ed0d0), U64_C (0x93ed3b7ec7d6eded),
+ U64_C (0x17cc2edb85e2cccc), U64_C (0x15422a5784684242),
+ U64_C (0x5a98b4c22d2c9898), U64_C (0xaaa4490e55eda4a4),
+ U64_C (0xa0285d8850752828), U64_C (0x6d5cda31b8865c5c),
+ U64_C (0xc7f8933fed6bf8f8), U64_C (0x228644a411c28686),
+ };
+
+static const u64 C7[256] =
+ {
+ U64_C (0x186018c07830d818), U64_C (0x238c2305af462623),
+ U64_C (0xc63fc67ef991b8c6), U64_C (0xe887e8136fcdfbe8),
+ U64_C (0x8726874ca113cb87), U64_C (0xb8dab8a9626d11b8),
+ U64_C (0x0104010805020901), U64_C (0x4f214f426e9e0d4f),
+ U64_C (0x36d836adee6c9b36), U64_C (0xa6a2a6590451ffa6),
+ U64_C (0xd26fd2debdb90cd2), U64_C (0xf5f3f5fb06f70ef5),
+ U64_C (0x79f979ef80f29679), U64_C (0x6fa16f5fcede306f),
+ U64_C (0x917e91fcef3f6d91), U64_C (0x525552aa07a4f852),
+ U64_C (0x609d6027fdc04760), U64_C (0xbccabc89766535bc),
+ U64_C (0x9b569baccd2b379b), U64_C (0x8e028e048c018a8e),
+ U64_C (0xa3b6a371155bd2a3), U64_C (0x0c300c603c186c0c),
+ U64_C (0x7bf17bff8af6847b), U64_C (0x35d435b5e16a8035),
+ U64_C (0x1d741de8693af51d), U64_C (0xe0a7e05347ddb3e0),
+ U64_C (0xd77bd7f6acb321d7), U64_C (0xc22fc25eed999cc2),
+ U64_C (0x2eb82e6d965c432e), U64_C (0x4b314b627a96294b),
+ U64_C (0xfedffea321e15dfe), U64_C (0x5741578216aed557),
+ U64_C (0x155415a8412abd15), U64_C (0x77c1779fb6eee877),
+ U64_C (0x37dc37a5eb6e9237), U64_C (0xe5b3e57b56d79ee5),
+ U64_C (0x9f469f8cd923139f), U64_C (0xf0e7f0d317fd23f0),
+ U64_C (0x4a354a6a7f94204a), U64_C (0xda4fda9e95a944da),
+ U64_C (0x587d58fa25b0a258), U64_C (0xc903c906ca8fcfc9),
+ U64_C (0x29a429558d527c29), U64_C (0x0a280a5022145a0a),
+ U64_C (0xb1feb1e14f7f50b1), U64_C (0xa0baa0691a5dc9a0),
+ U64_C (0x6bb16b7fdad6146b), U64_C (0x852e855cab17d985),
+ U64_C (0xbdcebd8173673cbd), U64_C (0x5d695dd234ba8f5d),
+ U64_C (0x1040108050209010), U64_C (0xf4f7f4f303f507f4),
+ U64_C (0xcb0bcb16c08bddcb), U64_C (0x3ef83eedc67cd33e),
+ U64_C (0x05140528110a2d05), U64_C (0x6781671fe6ce7867),
+ U64_C (0xe4b7e47353d597e4), U64_C (0x279c2725bb4e0227),
+ U64_C (0x4119413258827341), U64_C (0x8b168b2c9d0ba78b),
+ U64_C (0xa7a6a7510153f6a7), U64_C (0x7de97dcf94fab27d),
+ U64_C (0x956e95dcfb374995), U64_C (0xd847d88e9fad56d8),
+ U64_C (0xfbcbfb8b30eb70fb), U64_C (0xee9fee2371c1cdee),
+ U64_C (0x7ced7cc791f8bb7c), U64_C (0x66856617e3cc7166),
+ U64_C (0xdd53dda68ea77bdd), U64_C (0x175c17b84b2eaf17),
+ U64_C (0x47014702468e4547), U64_C (0x9e429e84dc211a9e),
+ U64_C (0xca0fca1ec589d4ca), U64_C (0x2db42d75995a582d),
+ U64_C (0xbfc6bf9179632ebf), U64_C (0x071c07381b0e3f07),
+ U64_C (0xad8ead012347acad), U64_C (0x5a755aea2fb4b05a),
+ U64_C (0x8336836cb51bef83), U64_C (0x33cc3385ff66b633),
+ U64_C (0x6391633ff2c65c63), U64_C (0x020802100a041202),
+ U64_C (0xaa92aa39384993aa), U64_C (0x71d971afa8e2de71),
+ U64_C (0xc807c80ecf8dc6c8), U64_C (0x196419c87d32d119),
+ U64_C (0x4939497270923b49), U64_C (0xd943d9869aaf5fd9),
+ U64_C (0xf2eff2c31df931f2), U64_C (0xe3abe34b48dba8e3),
+ U64_C (0x5b715be22ab6b95b), U64_C (0x881a8834920dbc88),
+ U64_C (0x9a529aa4c8293e9a), U64_C (0x2698262dbe4c0b26),
+ U64_C (0x32c8328dfa64bf32), U64_C (0xb0fab0e94a7d59b0),
+ U64_C (0xe983e91b6acff2e9), U64_C (0x0f3c0f78331e770f),
+ U64_C (0xd573d5e6a6b733d5), U64_C (0x803a8074ba1df480),
+ U64_C (0xbec2be997c6127be), U64_C (0xcd13cd26de87ebcd),
+ U64_C (0x34d034bde4688934), U64_C (0x483d487a75903248),
+ U64_C (0xffdbffab24e354ff), U64_C (0x7af57af78ff48d7a),
+ U64_C (0x907a90f4ea3d6490), U64_C (0x5f615fc23ebe9d5f),
+ U64_C (0x2080201da0403d20), U64_C (0x68bd6867d5d00f68),
+ U64_C (0x1a681ad07234ca1a), U64_C (0xae82ae192c41b7ae),
+ U64_C (0xb4eab4c95e757db4), U64_C (0x544d549a19a8ce54),
+ U64_C (0x937693ece53b7f93), U64_C (0x2288220daa442f22),
+ U64_C (0x648d6407e9c86364), U64_C (0xf1e3f1db12ff2af1),
+ U64_C (0x73d173bfa2e6cc73), U64_C (0x124812905a248212),
+ U64_C (0x401d403a5d807a40), U64_C (0x0820084028104808),
+ U64_C (0xc32bc356e89b95c3), U64_C (0xec97ec337bc5dfec),
+ U64_C (0xdb4bdb9690ab4ddb), U64_C (0xa1bea1611f5fc0a1),
+ U64_C (0x8d0e8d1c8307918d), U64_C (0x3df43df5c97ac83d),
+ U64_C (0x976697ccf1335b97), U64_C (0x0000000000000000),
+ U64_C (0xcf1bcf36d483f9cf), U64_C (0x2bac2b4587566e2b),
+ U64_C (0x76c57697b3ece176), U64_C (0x82328264b019e682),
+ U64_C (0xd67fd6fea9b128d6), U64_C (0x1b6c1bd87736c31b),
+ U64_C (0xb5eeb5c15b7774b5), U64_C (0xaf86af112943beaf),
+ U64_C (0x6ab56a77dfd41d6a), U64_C (0x505d50ba0da0ea50),
+ U64_C (0x450945124c8a5745), U64_C (0xf3ebf3cb18fb38f3),
+ U64_C (0x30c0309df060ad30), U64_C (0xef9bef2b74c3c4ef),
+ U64_C (0x3ffc3fe5c37eda3f), U64_C (0x554955921caac755),
+ U64_C (0xa2b2a2791059dba2), U64_C (0xea8fea0365c9e9ea),
+ U64_C (0x6589650fecca6a65), U64_C (0xbad2bab9686903ba),
+ U64_C (0x2fbc2f65935e4a2f), U64_C (0xc027c04ee79d8ec0),
+ U64_C (0xde5fdebe81a160de), U64_C (0x1c701ce06c38fc1c),
+ U64_C (0xfdd3fdbb2ee746fd), U64_C (0x4d294d52649a1f4d),
+ U64_C (0x927292e4e0397692), U64_C (0x75c9758fbceafa75),
+ U64_C (0x061806301e0c3606), U64_C (0x8a128a249809ae8a),
+ U64_C (0xb2f2b2f940794bb2), U64_C (0xe6bfe66359d185e6),
+ U64_C (0x0e380e70361c7e0e), U64_C (0x1f7c1ff8633ee71f),
+ U64_C (0x62956237f7c45562), U64_C (0xd477d4eea3b53ad4),
+ U64_C (0xa89aa829324d81a8), U64_C (0x966296c4f4315296),
+ U64_C (0xf9c3f99b3aef62f9), U64_C (0xc533c566f697a3c5),
+ U64_C (0x25942535b14a1025), U64_C (0x597959f220b2ab59),
+ U64_C (0x842a8454ae15d084), U64_C (0x72d572b7a7e4c572),
+ U64_C (0x39e439d5dd72ec39), U64_C (0x4c2d4c5a6198164c),
+ U64_C (0x5e655eca3bbc945e), U64_C (0x78fd78e785f09f78),
+ U64_C (0x38e038ddd870e538), U64_C (0x8c0a8c148605988c),
+ U64_C (0xd163d1c6b2bf17d1), U64_C (0xa5aea5410b57e4a5),
+ U64_C (0xe2afe2434dd9a1e2), U64_C (0x6199612ff8c24e61),
+ U64_C (0xb3f6b3f1457b42b3), U64_C (0x21842115a5423421),
+ U64_C (0x9c4a9c94d625089c), U64_C (0x1e781ef0663cee1e),
+ U64_C (0x4311432252866143), U64_C (0xc73bc776fc93b1c7),
+ U64_C (0xfcd7fcb32be54ffc), U64_C (0x0410042014082404),
+ U64_C (0x515951b208a2e351), U64_C (0x995e99bcc72f2599),
+ U64_C (0x6da96d4fc4da226d), U64_C (0x0d340d68391a650d),
+ U64_C (0xfacffa8335e979fa), U64_C (0xdf5bdfb684a369df),
+ U64_C (0x7ee57ed79bfca97e), U64_C (0x2490243db4481924),
+ U64_C (0x3bec3bc5d776fe3b), U64_C (0xab96ab313d4b9aab),
+ U64_C (0xce1fce3ed181f0ce), U64_C (0x1144118855229911),
+ U64_C (0x8f068f0c8903838f), U64_C (0x4e254e4a6b9c044e),
+ U64_C (0xb7e6b7d1517366b7), U64_C (0xeb8beb0b60cbe0eb),
+ U64_C (0x3cf03cfdcc78c13c), U64_C (0x813e817cbf1ffd81),
+ U64_C (0x946a94d4fe354094), U64_C (0xf7fbf7eb0cf31cf7),
+ U64_C (0xb9deb9a1676f18b9), U64_C (0x134c13985f268b13),
+ U64_C (0x2cb02c7d9c58512c), U64_C (0xd36bd3d6b8bb05d3),
+ U64_C (0xe7bbe76b5cd38ce7), U64_C (0x6ea56e57cbdc396e),
+ U64_C (0xc437c46ef395aac4), U64_C (0x030c03180f061b03),
+ U64_C (0x5645568a13acdc56), U64_C (0x440d441a49885e44),
+ U64_C (0x7fe17fdf9efea07f), U64_C (0xa99ea921374f88a9),
+ U64_C (0x2aa82a4d8254672a), U64_C (0xbbd6bbb16d6b0abb),
+ U64_C (0xc123c146e29f87c1), U64_C (0x535153a202a6f153),
+ U64_C (0xdc57dcae8ba572dc), U64_C (0x0b2c0b582716530b),
+ U64_C (0x9d4e9d9cd327019d), U64_C (0x6cad6c47c1d82b6c),
+ U64_C (0x31c43195f562a431), U64_C (0x74cd7487b9e8f374),
+ U64_C (0xf6fff6e309f115f6), U64_C (0x4605460a438c4c46),
+ U64_C (0xac8aac092645a5ac), U64_C (0x891e893c970fb589),
+ U64_C (0x145014a04428b414), U64_C (0xe1a3e15b42dfbae1),
+ U64_C (0x165816b04e2ca616), U64_C (0x3ae83acdd274f73a),
+ U64_C (0x69b9696fd0d20669), U64_C (0x092409482d124109),
+ U64_C (0x70dd70a7ade0d770), U64_C (0xb6e2b6d954716fb6),
+ U64_C (0xd067d0ceb7bd1ed0), U64_C (0xed93ed3b7ec7d6ed),
+ U64_C (0xcc17cc2edb85e2cc), U64_C (0x4215422a57846842),
+ U64_C (0x985a98b4c22d2c98), U64_C (0xa4aaa4490e55eda4),
+ U64_C (0x28a0285d88507528), U64_C (0x5c6d5cda31b8865c),
+ U64_C (0xf8c7f8933fed6bf8), U64_C (0x86228644a411c286),
+ };
+
+
+
+static void
+whirlpool_init (void *ctx)
+{
+ whirlpool_context_t *context = ctx;
+
+ memset (context, 0, sizeof (*context));
+}
+
+
+/*
+ * Transform block.
+ */
+static void
+whirlpool_transform (whirlpool_context_t *context, const unsigned char *data)
+{
+ whirlpool_block_t data_block;
+ whirlpool_block_t key;
+ whirlpool_block_t state;
+ whirlpool_block_t block;
+ unsigned int r;
+ unsigned int i;
+
+ buffer_to_block (data, data_block, i);
+ block_copy (key, context->hash_state, i);
+ block_copy (state, context->hash_state, i);
+ block_xor (state, data_block, i);
+
+ for (r = 0; r < R; r++)
+ {
+ /* Compute round key K^r. */
+
+ block[0] = (C0[(key[0] >> 56) & 0xFF] ^ C1[(key[7] >> 48) & 0xFF] ^
+ C2[(key[6] >> 40) & 0xFF] ^ C3[(key[5] >> 32) & 0xFF] ^
+ C4[(key[4] >> 24) & 0xFF] ^ C5[(key[3] >> 16) & 0xFF] ^
+ C6[(key[2] >> 8) & 0xFF] ^ C7[(key[1] >> 0) & 0xFF] ^ rc[r]);
+ block[1] = (C0[(key[1] >> 56) & 0xFF] ^ C1[(key[0] >> 48) & 0xFF] ^
+ C2[(key[7] >> 40) & 0xFF] ^ C3[(key[6] >> 32) & 0xFF] ^
+ C4[(key[5] >> 24) & 0xFF] ^ C5[(key[4] >> 16) & 0xFF] ^
+ C6[(key[3] >> 8) & 0xFF] ^ C7[(key[2] >> 0) & 0xFF]);
+ block[2] = (C0[(key[2] >> 56) & 0xFF] ^ C1[(key[1] >> 48) & 0xFF] ^
+ C2[(key[0] >> 40) & 0xFF] ^ C3[(key[7] >> 32) & 0xFF] ^
+ C4[(key[6] >> 24) & 0xFF] ^ C5[(key[5] >> 16) & 0xFF] ^
+ C6[(key[4] >> 8) & 0xFF] ^ C7[(key[3] >> 0) & 0xFF]);
+ block[3] = (C0[(key[3] >> 56) & 0xFF] ^ C1[(key[2] >> 48) & 0xFF] ^
+ C2[(key[1] >> 40) & 0xFF] ^ C3[(key[0] >> 32) & 0xFF] ^
+ C4[(key[7] >> 24) & 0xFF] ^ C5[(key[6] >> 16) & 0xFF] ^
+ C6[(key[5] >> 8) & 0xFF] ^ C7[(key[4] >> 0) & 0xFF]);
+ block[4] = (C0[(key[4] >> 56) & 0xFF] ^ C1[(key[3] >> 48) & 0xFF] ^
+ C2[(key[2] >> 40) & 0xFF] ^ C3[(key[1] >> 32) & 0xFF] ^
+ C4[(key[0] >> 24) & 0xFF] ^ C5[(key[7] >> 16) & 0xFF] ^
+ C6[(key[6] >> 8) & 0xFF] ^ C7[(key[5] >> 0) & 0xFF]);
+ block[5] = (C0[(key[5] >> 56) & 0xFF] ^ C1[(key[4] >> 48) & 0xFF] ^
+ C2[(key[3] >> 40) & 0xFF] ^ C3[(key[2] >> 32) & 0xFF] ^
+ C4[(key[1] >> 24) & 0xFF] ^ C5[(key[0] >> 16) & 0xFF] ^
+ C6[(key[7] >> 8) & 0xFF] ^ C7[(key[6] >> 0) & 0xFF]);
+ block[6] = (C0[(key[6] >> 56) & 0xFF] ^ C1[(key[5] >> 48) & 0xFF] ^
+ C2[(key[4] >> 40) & 0xFF] ^ C3[(key[3] >> 32) & 0xFF] ^
+ C4[(key[2] >> 24) & 0xFF] ^ C5[(key[1] >> 16) & 0xFF] ^
+ C6[(key[0] >> 8) & 0xFF] ^ C7[(key[7] >> 0) & 0xFF]);
+ block[7] = (C0[(key[7] >> 56) & 0xFF] ^ C1[(key[6] >> 48) & 0xFF] ^
+ C2[(key[5] >> 40) & 0xFF] ^ C3[(key[4] >> 32) & 0xFF] ^
+ C4[(key[3] >> 24) & 0xFF] ^ C5[(key[2] >> 16) & 0xFF] ^
+ C6[(key[1] >> 8) & 0xFF] ^ C7[(key[0] >> 0) & 0xFF]);
+ block_copy (key, block, i);
+
+ /* Apply r-th round transformation. */
+
+ block[0] = (C0[(state[0] >> 56) & 0xFF] ^ C1[(state[7] >> 48) & 0xFF] ^
+ C2[(state[6] >> 40) & 0xFF] ^ C3[(state[5] >> 32) & 0xFF] ^
+ C4[(state[4] >> 24) & 0xFF] ^ C5[(state[3] >> 16) & 0xFF] ^
+ C6[(state[2] >> 8) & 0xFF] ^ C7[(state[1] >> 0) & 0xFF] ^ key[0]);
+ block[1] = (C0[(state[1] >> 56) & 0xFF] ^ C1[(state[0] >> 48) & 0xFF] ^
+ C2[(state[7] >> 40) & 0xFF] ^ C3[(state[6] >> 32) & 0xFF] ^
+ C4[(state[5] >> 24) & 0xFF] ^ C5[(state[4] >> 16) & 0xFF] ^
+ C6[(state[3] >> 8) & 0xFF] ^ C7[(state[2] >> 0) & 0xFF] ^ key[1]);
+ block[2] = (C0[(state[2] >> 56) & 0xFF] ^ C1[(state[1] >> 48) & 0xFF] ^
+ C2[(state[0] >> 40) & 0xFF] ^ C3[(state[7] >> 32) & 0xFF] ^
+ C4[(state[6] >> 24) & 0xFF] ^ C5[(state[5] >> 16) & 0xFF] ^
+ C6[(state[4] >> 8) & 0xFF] ^ C7[(state[3] >> 0) & 0xFF] ^ key[2]);
+ block[3] = (C0[(state[3] >> 56) & 0xFF] ^ C1[(state[2] >> 48) & 0xFF] ^
+ C2[(state[1] >> 40) & 0xFF] ^ C3[(state[0] >> 32) & 0xFF] ^
+ C4[(state[7] >> 24) & 0xFF] ^ C5[(state[6] >> 16) & 0xFF] ^
+ C6[(state[5] >> 8) & 0xFF] ^ C7[(state[4] >> 0) & 0xFF] ^ key[3]);
+ block[4] = (C0[(state[4] >> 56) & 0xFF] ^ C1[(state[3] >> 48) & 0xFF] ^
+ C2[(state[2] >> 40) & 0xFF] ^ C3[(state[1] >> 32) & 0xFF] ^
+ C4[(state[0] >> 24) & 0xFF] ^ C5[(state[7] >> 16) & 0xFF] ^
+ C6[(state[6] >> 8) & 0xFF] ^ C7[(state[5] >> 0) & 0xFF] ^ key[4]);
+ block[5] = (C0[(state[5] >> 56) & 0xFF] ^ C1[(state[4] >> 48) & 0xFF] ^
+ C2[(state[3] >> 40) & 0xFF] ^ C3[(state[2] >> 32) & 0xFF] ^
+ C4[(state[1] >> 24) & 0xFF] ^ C5[(state[0] >> 16) & 0xFF] ^
+ C6[(state[7] >> 8) & 0xFF] ^ C7[(state[6] >> 0) & 0xFF] ^ key[5]);
+ block[6] = (C0[(state[6] >> 56) & 0xFF] ^ C1[(state[5] >> 48) & 0xFF] ^
+ C2[(state[4] >> 40) & 0xFF] ^ C3[(state[3] >> 32) & 0xFF] ^
+ C4[(state[2] >> 24) & 0xFF] ^ C5[(state[1] >> 16) & 0xFF] ^
+ C6[(state[0] >> 8) & 0xFF] ^ C7[(state[7] >> 0) & 0xFF] ^ key[6]);
+ block[7] = (C0[(state[7] >> 56) & 0xFF] ^ C1[(state[6] >> 48) & 0xFF] ^
+ C2[(state[5] >> 40) & 0xFF] ^ C3[(state[4] >> 32) & 0xFF] ^
+ C4[(state[3] >> 24) & 0xFF] ^ C5[(state[2] >> 16) & 0xFF] ^
+ C6[(state[1] >> 8) & 0xFF] ^ C7[(state[0] >> 0) & 0xFF] ^ key[7]);
+ block_copy (state, block, i);
+ }
+
+ /* Compression. */
+
+ block_xor (context->hash_state, data_block, i);
+ block_xor (context->hash_state, state, i);
+}
+
+static void
+whirlpool_add (whirlpool_context_t *context,
+ const void *buffer_arg, size_t buffer_n)
+{
+ const unsigned char *buffer = buffer_arg;
+ u64 buffer_size;
+ unsigned int carry;
+ unsigned int i;
+
+ buffer_size = buffer_n;
+
+ if (context->count == BLOCK_SIZE)
+ {
+ /* Flush the buffer. */
+ whirlpool_transform (context, context->buffer);
+ /*_gcry_burn_stack (80+6*sizeof(void*));*/ /* FIXME */
+ context->count = 0;
+ }
+ if (! buffer)
+ return; /* Nothing to add. */
+
+ if (context->count)
+ {
+ while (buffer_n && (context->count < BLOCK_SIZE))
+ {
+ context->buffer[context->count++] = *buffer++;
+ buffer_n--;
+ }
+ whirlpool_add (context, NULL, 0);
+ if (!buffer_n)
+ /* Done. */
+ return;
+ }
+ /*_gcry_burn_stack (80+6*sizeof(void*));*/ /* FIXME */
+
+ while (buffer_n >= BLOCK_SIZE)
+ {
+ whirlpool_transform (context, buffer);
+ context->count = 0;
+ buffer_n -= BLOCK_SIZE;
+ buffer += BLOCK_SIZE;
+ }
+ while (buffer_n && (context->count < BLOCK_SIZE))
+ {
+ context->buffer[context->count++] = *buffer++;
+ buffer_n--;
+ }
+
+ /* Update bit counter. */
+ carry = 0;
+ buffer_size <<= 3;
+ for (i = 1; i <= 32; i++)
+ {
+ if (! (buffer_size || carry))
+ break;
+
+ carry += context->length[32 - i] + (buffer_size & 0xFF);
+ context->length[32 - i] = carry;
+ buffer_size >>= 8;
+ carry >>= 8;
+ }
+ gcry_assert (! (buffer_size || carry));
+}
+
+static void
+whirlpool_write (void *ctx, const void *buffer, size_t buffer_n)
+{
+ whirlpool_context_t *context = ctx;
+
+ whirlpool_add (context, buffer, buffer_n);
+}
+
+static void
+whirlpool_final (void *ctx)
+{
+ whirlpool_context_t *context = ctx;
+ unsigned int i;
+
+ /* Flush. */
+ whirlpool_add (context, NULL, 0);
+
+ /* Pad. */
+ context->buffer[context->count++] = 0x80;
+
+ if (context->count > 32)
+ {
+ /* An extra block is necessary. */
+ while (context->count < 64)
+ context->buffer[context->count++] = 0;
+ whirlpool_add (context, NULL, 0);
+ }
+ while (context->count < 32)
+ context->buffer[context->count++] = 0;
+
+ /* Add length of message. */
+ memcpy (context->buffer + context->count, context->length, 32);
+ context->count += 32;
+ whirlpool_add (context, NULL, 0);
+
+ block_to_buffer (context->buffer, context->hash_state, i);
+}
+
+static byte *
+whirlpool_read (void *ctx)
+{
+ whirlpool_context_t *context = ctx;
+
+ return context->buffer;
+}
+
+gcry_md_spec_t _gcry_digest_spec_whirlpool =
+ {
+ "WHIRLPOOL", NULL, 0, NULL, 64,
+ whirlpool_init, whirlpool_write, whirlpool_final, whirlpool_read,
+ sizeof (whirlpool_context_t)
+ };
diff --git a/grub-core/lib/libgcrypt_wrap/cipher_wrap.h b/grub-core/lib/libgcrypt_wrap/cipher_wrap.h
new file mode 100644
index 0000000..59febae
--- /dev/null
+++ b/grub-core/lib/libgcrypt_wrap/cipher_wrap.h
@@ -0,0 +1,92 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_GCRY_WRAP_HEADER
+#define GRUB_GCRY_WRAP_HEADER 1
+
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+#include <grub/crypto.h>
+
+#ifdef GRUB_CPU_WORDS_BIGENDIAN
+#define WORDS_BIGENDIAN
+#else
+#undef WORDS_BIGENDIAN
+#endif
+
+#define __GNU_LIBRARY__
+
+#define DIM ARRAY_SIZE
+
+typedef grub_uint64_t u64;
+typedef grub_uint32_t u32;
+typedef grub_uint16_t u16;
+typedef grub_uint8_t byte;
+typedef grub_size_t size_t;
+
+#define U64_C(c) (c ## ULL)
+
+#define _gcry_burn_stack grub_burn_stack
+#define log_error(fmt, args...) grub_dprintf ("crypto", fmt, ## args)
+
+
+#define PUBKEY_FLAG_NO_BLINDING (1 << 0)
+
+#define CIPHER_INFO_NO_WEAK_KEY 1
+
+#define HAVE_U64_TYPEDEF 1
+
+typedef union {
+ int a;
+ short b;
+ char c[1];
+ long d;
+#ifdef HAVE_U64_TYPEDEF
+ u64 e;
+#endif
+ float f;
+ double g;
+} PROPERLY_ALIGNED_TYPE;
+
+#define gcry_assert(x) grub_assert_real(GRUB_FILE, __LINE__, x)
+
+static inline void
+grub_assert_real (const char *file, int line, int cond)
+{
+ if (!cond)
+ grub_fatal ("Assertion failed at %s:%d\n", file, line);
+}
+
+/* Selftests are in separate modules. */
+static inline char *
+selftest (void)
+{
+ return NULL;
+}
+
+static inline int
+fips_mode (void)
+{
+ return 0;
+}
+
+#define memset grub_memset
+
+#endif
diff --git a/grub-core/lib/mips/relocator.c b/grub-core/lib/mips/relocator.c
new file mode 100644
index 0000000..537b0af
--- /dev/null
+++ b/grub-core/lib/mips/relocator.c
@@ -0,0 +1,149 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+#include <grub/types.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/cache.h>
+
+#include <grub/mips/relocator.h>
+#include <grub/relocator_private.h>
+
+/* Do we need mips64? */
+
+extern grub_uint8_t grub_relocator_forward_start;
+extern grub_uint8_t grub_relocator_forward_end;
+extern grub_uint8_t grub_relocator_backward_start;
+extern grub_uint8_t grub_relocator_backward_end;
+
+#define REGW_SIZEOF (2 * sizeof (grub_uint32_t))
+#define JUMP_SIZEOF (2 * sizeof (grub_uint32_t))
+
+#define RELOCATOR_SRC_SIZEOF(x) (&grub_relocator_##x##_end \
+ - &grub_relocator_##x##_start)
+#define RELOCATOR_SIZEOF(x) (RELOCATOR_SRC_SIZEOF(x) \
+ + REGW_SIZEOF * 3)
+grub_size_t grub_relocator_align = sizeof (grub_uint32_t);
+grub_size_t grub_relocator_forward_size;
+grub_size_t grub_relocator_backward_size;
+grub_size_t grub_relocator_jumper_size = JUMP_SIZEOF + REGW_SIZEOF;
+
+void
+grub_cpu_relocator_init (void)
+{
+ grub_relocator_forward_size = RELOCATOR_SIZEOF(forward);
+ grub_relocator_backward_size = RELOCATOR_SIZEOF(backward);
+}
+
+static void
+write_reg (int regn, grub_uint32_t val, void **target)
+{
+ /* lui $r, (val+0x8000). */
+ *(grub_uint32_t *) *target = ((0x3c00 | regn) << 16) | ((val + 0x8000) >> 16);
+ *target = ((grub_uint32_t *) *target) + 1;
+ /* addiu $r, $r, val. */
+ *(grub_uint32_t *) *target = (((0x2400 | regn << 5 | regn) << 16)
+ | (val & 0xffff));
+ *target = ((grub_uint32_t *) *target) + 1;
+}
+
+static void
+write_jump (int regn, void **target)
+{
+ /* j $r. */
+ *(grub_uint32_t *) *target = (regn<<21) | 0x8;
+ *target = ((grub_uint32_t *) *target) + 1;
+ /* nop. */
+ *(grub_uint32_t *) *target = 0;
+ *target = ((grub_uint32_t *) *target) + 1;
+}
+
+void
+grub_cpu_relocator_jumper (void *rels, grub_addr_t addr)
+{
+ write_reg (1, addr, &rels);
+ write_jump (1, &rels);
+}
+
+void
+grub_cpu_relocator_backward (void *ptr0, void *src, void *dest,
+ grub_size_t size)
+{
+ void *ptr = ptr0;
+ write_reg (8, (grub_uint32_t) src, &ptr);
+ write_reg (9, (grub_uint32_t) dest, &ptr);
+ write_reg (10, (grub_uint32_t) size, &ptr);
+ grub_memcpy (ptr, &grub_relocator_backward_start,
+ RELOCATOR_SRC_SIZEOF (backward));
+}
+
+void
+grub_cpu_relocator_forward (void *ptr0, void *src, void *dest,
+ grub_size_t size)
+{
+ void *ptr = ptr0;
+ write_reg (8, (grub_uint32_t) src, &ptr);
+ write_reg (9, (grub_uint32_t) dest, &ptr);
+ write_reg (10, (grub_uint32_t) size, &ptr);
+ grub_memcpy (ptr, &grub_relocator_forward_start,
+ RELOCATOR_SRC_SIZEOF (forward));
+}
+
+grub_err_t
+grub_relocator32_boot (struct grub_relocator *rel,
+ struct grub_relocator32_state state)
+{
+ grub_relocator_chunk_t ch;
+ void *ptr;
+ grub_err_t err;
+ void *relst;
+ grub_size_t relsize;
+ grub_size_t stateset_size = 31 * REGW_SIZEOF + JUMP_SIZEOF;
+ unsigned i;
+ grub_addr_t vtarget;
+
+ err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
+ (0xffffffff - stateset_size)
+ + 1, stateset_size,
+ sizeof (grub_uint32_t),
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+
+ ptr = get_virtual_current_address (ch);
+ for (i = 1; i < 32; i++)
+ write_reg (i, state.gpr[i], &ptr);
+ write_jump (state.jumpreg, &ptr);
+
+ vtarget = (grub_addr_t) grub_map_memory (get_physical_target_address (ch),
+ stateset_size);
+
+ err = grub_relocator_prepare_relocs (rel, vtarget, &relst, &relsize);
+ if (err)
+ return err;
+
+ grub_arch_sync_caches ((void *) relst, relsize);
+
+ ((void (*) (void)) relst) ();
+
+ /* Not reached. */
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/lib/mips/relocator_asm.S b/grub-core/lib/mips/relocator_asm.S
new file mode 100644
index 0000000..1d142a4
--- /dev/null
+++ b/grub-core/lib/mips/relocator_asm.S
@@ -0,0 +1,61 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+
+ .p2align 4 /* force 16-byte alignment */
+
+ .set noreorder
+ .set nomacro
+
+VARIABLE (grub_relocator_forward_start)
+ move $a0, $9
+ move $a1, $10
+
+copycont1:
+ lb $11,0($8)
+ sb $11,0($9)
+ addiu $8, $8, 1
+ addiu $10, $10, -1
+ bne $10, $0, copycont1
+ addiu $9, $9, 1
+
+#include "../../kern/mips/cache_flush.S"
+
+VARIABLE (grub_relocator_forward_end)
+
+VARIABLE (grub_relocator_backward_start)
+ move $a0, $9
+ move $a1, $10
+
+ addu $9, $9, $10
+ addu $8, $8, $10
+ /* Backward movsl is implicitly off-by-one. compensate that. */
+ addiu $9, $9, -1
+ addiu $8, $8, -1
+copycont2:
+ lb $11,0($8)
+ sb $11,0($9)
+ addiu $8, $8, -1
+ addiu $10, $10, -1
+ bne $10, $0, copycont2
+ addiu $9, $9, -1
+
+#include "../../kern/mips/cache_flush.S"
+
+VARIABLE (grub_relocator_backward_end)
diff --git a/grub-core/lib/mips/setjmp.S b/grub-core/lib/mips/setjmp.S
new file mode 100644
index 0000000..8259c9d
--- /dev/null
+++ b/grub-core/lib/mips/setjmp.S
@@ -0,0 +1,68 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/dl.h>
+
+ .file "setjmp.S"
+
+GRUB_MOD_LICENSE ("GPLv3+")
+
+ .text
+
+/*
+ * int grub_setjmp (grub_jmp_buf env)
+ */
+FUNCTION(grub_setjmp)
+ sw $s0, 0($a0)
+ sw $s1, 4($a0)
+ sw $s2, 8($a0)
+ sw $s3, 12($a0)
+ sw $s4, 16($a0)
+ sw $s5, 20($a0)
+ sw $s6, 24($a0)
+ sw $s7, 28($a0)
+ sw $s8, 32($a0)
+ sw $gp, 36($a0)
+ sw $sp, 40($a0)
+ sw $ra, 44($a0)
+ move $v0, $zero
+ move $v1, $zero
+ jr $ra
+/*
+ * int grub_longjmp (grub_jmp_buf env, int val)
+ */
+FUNCTION(grub_longjmp)
+ lw $s0, 0($a0)
+ lw $s1, 4($a0)
+ lw $s2, 8($a0)
+ lw $s3, 12($a0)
+ lw $s4, 16($a0)
+ lw $s5, 20($a0)
+ lw $s6, 24($a0)
+ lw $s7, 28($a0)
+ lw $s8, 32($a0)
+ lw $gp, 36($a0)
+ lw $sp, 40($a0)
+ lw $ra, 44($a0)
+ move $v0, $a1
+ bne $v0, $zero, 1f
+ addiu $v0, $v0, 1
+1:
+ move $v1, $zero
+ jr $ra
diff --git a/grub-core/lib/pbkdf2.c b/grub-core/lib/pbkdf2.c
new file mode 100644
index 0000000..09b8c73
--- /dev/null
+++ b/grub-core/lib/pbkdf2.c
@@ -0,0 +1,105 @@
+/* gc-pbkdf2-sha1.c --- Password-Based Key Derivation Function a'la PKCS#5
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Simon Josefsson. */
+/* Imported from gnulib. */
+
+#include <grub/crypto.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv2+");
+
+/* Implement PKCS#5 PBKDF2 as per RFC 2898. The PRF to use is HMAC variant
+ of digest supplied by MD. Inputs are the password P of length PLEN,
+ the salt S of length SLEN, the iteration counter C (> 0), and the
+ desired derived output length DKLEN. Output buffer is DK which
+ must have room for at least DKLEN octets. The output buffer will
+ be filled with the derived data. */
+gcry_err_code_t
+grub_crypto_pbkdf2 (const struct gcry_md_spec *md,
+ const grub_uint8_t *P, grub_size_t Plen,
+ const grub_uint8_t *S, grub_size_t Slen,
+ unsigned int c,
+ grub_uint8_t *DK, grub_size_t dkLen)
+{
+ unsigned int hLen = md->mdlen;
+ grub_uint8_t U[md->mdlen];
+ grub_uint8_t T[md->mdlen];
+ unsigned int u;
+ unsigned int l;
+ unsigned int r;
+ unsigned int i;
+ unsigned int k;
+ gcry_err_code_t rc;
+ grub_uint8_t *tmp;
+ grub_size_t tmplen = Slen + 4;
+
+ if (c == 0)
+ return GPG_ERR_INV_ARG;
+
+ if (dkLen == 0)
+ return GPG_ERR_INV_ARG;
+
+ if (dkLen > 4294967295U)
+ return GPG_ERR_INV_ARG;
+
+ l = ((dkLen - 1) / hLen) + 1;
+ r = dkLen - (l - 1) * hLen;
+
+ tmp = grub_malloc (tmplen);
+ if (tmp == NULL)
+ return GPG_ERR_OUT_OF_MEMORY;
+
+ grub_memcpy (tmp, S, Slen);
+
+ for (i = 1; i <= l; i++)
+ {
+ grub_memset (T, 0, hLen);
+
+ for (u = 1; u <= c; u++)
+ {
+ if (u == 1)
+ {
+ tmp[Slen + 0] = (i & 0xff000000) >> 24;
+ tmp[Slen + 1] = (i & 0x00ff0000) >> 16;
+ tmp[Slen + 2] = (i & 0x0000ff00) >> 8;
+ tmp[Slen + 3] = (i & 0x000000ff) >> 0;
+
+ rc = grub_crypto_hmac_buffer (md, P, Plen, tmp, tmplen, U);
+ }
+ else
+ rc = grub_crypto_hmac_buffer (md, P, Plen, U, hLen, U);
+
+ if (rc != GPG_ERR_NO_ERROR)
+ {
+ grub_free (tmp);
+ return rc;
+ }
+
+ for (k = 0; k < hLen; k++)
+ T[k] ^= U[k];
+ }
+
+ grub_memcpy (DK + (i - 1) * hLen, T, i == l ? r : hLen);
+ }
+
+ grub_free (tmp);
+
+ return GPG_ERR_NO_ERROR;
+}
diff --git a/grub-core/lib/posix_wrap/assert.h b/grub-core/lib/posix_wrap/assert.h
new file mode 100644
index 0000000..94cfdd5
--- /dev/null
+++ b/grub-core/lib/posix_wrap/assert.h
@@ -0,0 +1,33 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_ASSERT_H
+#define GRUB_POSIX_ASSERT_H 1
+
+#include <grub/misc.h>
+
+#define assert(x) assert_real(__FILE__, __LINE__, x)
+
+static inline void
+assert_real (const char *file, int line, int cond)
+{
+ if (!cond)
+ grub_fatal ("Assertion failed at %s:%d\n", file, line);
+}
+
+#endif
diff --git a/grub-core/lib/posix_wrap/ctype.h b/grub-core/lib/posix_wrap/ctype.h
new file mode 100644
index 0000000..2dc3e53
--- /dev/null
+++ b/grub-core/lib/posix_wrap/ctype.h
@@ -0,0 +1,103 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_CTYPE_H
+#define GRUB_POSIX_CTYPE_H 1
+
+#include <grub/misc.h>
+
+static inline int
+toupper (int c)
+{
+ return grub_toupper (c);
+}
+
+static inline int
+isspace (int c)
+{
+ return grub_isspace (c);
+}
+
+static inline int
+isdigit (int c)
+{
+ return grub_isdigit (c);
+}
+
+static inline int
+islower (int c)
+{
+ return (c >= 'a' && c <= 'z');
+}
+
+static inline int
+isupper (int c)
+{
+ return (c >= 'A' && c <= 'Z');
+}
+
+static inline int
+isxdigit (int c)
+{
+ return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')
+ || (c >= '0' && c <= '9');
+}
+
+static inline int
+isprint (int c)
+{
+ return grub_isprint (c);
+}
+
+static inline int
+iscntrl (int c)
+{
+ return !grub_isprint (c);
+}
+
+static inline int
+isgraph (int c)
+{
+ return grub_isprint (c) && !grub_isspace (c);
+}
+
+static inline int
+isalnum (int c)
+{
+ return grub_isalpha (c) || grub_isdigit (c);
+}
+
+static inline int
+ispunct (int c)
+{
+ return grub_isprint (c) && !grub_isspace (c) && !isalnum (c);
+}
+
+static inline int
+isalpha (int c)
+{
+ return grub_isalpha (c);
+}
+
+static inline int
+tolower (int c)
+{
+ return grub_tolower (c);
+}
+
+#endif
diff --git a/grub-core/lib/posix_wrap/errno.h b/grub-core/lib/posix_wrap/errno.h
new file mode 100644
index 0000000..9031722
--- /dev/null
+++ b/grub-core/lib/posix_wrap/errno.h
@@ -0,0 +1,28 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_ERRNO_H
+#define GRUB_POSIX_ERRNO_H 1
+
+#include <grub/err.h>
+
+#define errno grub_errno
+#define EINVAL GRUB_ERR_BAD_NUMBER
+#define ENOMEM GRUB_ERR_OUT_OF_MEMORY
+
+#endif
diff --git a/grub-core/lib/posix_wrap/inttypes.h b/grub-core/lib/posix_wrap/inttypes.h
new file mode 100644
index 0000000..a12c43b
--- /dev/null
+++ b/grub-core/lib/posix_wrap/inttypes.h
@@ -0,0 +1 @@
+#include <sys/types.h>
diff --git a/grub-core/lib/posix_wrap/langinfo.h b/grub-core/lib/posix_wrap/langinfo.h
new file mode 100644
index 0000000..72b5b96
--- /dev/null
+++ b/grub-core/lib/posix_wrap/langinfo.h
@@ -0,0 +1,38 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_LANGINFO_H
+#define GRUB_POSIX_LANGINFO_H 1
+
+#include <localcharset.h>
+
+typedef enum { CODESET } nl_item;
+
+static inline char *
+nl_langinfo (nl_item item)
+{
+ switch (item)
+ {
+ case CODESET:
+ return "UTF-8";
+ default:
+ return "";
+ }
+}
+
+#endif
diff --git a/grub-core/lib/posix_wrap/limits.h b/grub-core/lib/posix_wrap/limits.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/grub-core/lib/posix_wrap/limits.h
diff --git a/grub-core/lib/posix_wrap/localcharset.h b/grub-core/lib/posix_wrap/localcharset.h
new file mode 100644
index 0000000..502d860
--- /dev/null
+++ b/grub-core/lib/posix_wrap/localcharset.h
@@ -0,0 +1,28 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_LOCALCHARSET_H
+#define GRUB_POSIX_LOCALCHARSET_H 1
+
+static inline const char *
+locale_charset (void)
+{
+ return "UTF-8";
+}
+
+#endif
diff --git a/grub-core/lib/posix_wrap/locale.h b/grub-core/lib/posix_wrap/locale.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/grub-core/lib/posix_wrap/locale.h
diff --git a/grub-core/lib/posix_wrap/stdint.h b/grub-core/lib/posix_wrap/stdint.h
new file mode 100644
index 0000000..a12c43b
--- /dev/null
+++ b/grub-core/lib/posix_wrap/stdint.h
@@ -0,0 +1 @@
+#include <sys/types.h>
diff --git a/grub-core/lib/posix_wrap/stdio.h b/grub-core/lib/posix_wrap/stdio.h
new file mode 100644
index 0000000..701fcea
--- /dev/null
+++ b/grub-core/lib/posix_wrap/stdio.h
@@ -0,0 +1,29 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_STDIO_H
+#define GRUB_POSIX_STDIO_H 1
+
+#include <grub/misc.h>
+#include <grub/file.h>
+
+typedef struct grub_file FILE;
+
+#define EOF -1
+
+#endif
diff --git a/grub-core/lib/posix_wrap/stdlib.h b/grub-core/lib/posix_wrap/stdlib.h
new file mode 100644
index 0000000..4c725f6
--- /dev/null
+++ b/grub-core/lib/posix_wrap/stdlib.h
@@ -0,0 +1,57 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_STDLIB_H
+#define GRUB_POSIX_STDLIB_H 1
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+static inline void
+free (void *ptr)
+{
+ grub_free (ptr);
+}
+
+static inline void *
+malloc (grub_size_t size)
+{
+ return grub_malloc (size);
+}
+
+static inline void *
+calloc (grub_size_t size, grub_size_t nelem)
+{
+ return grub_zalloc (size * nelem);
+}
+
+static inline void *
+realloc (void *ptr, grub_size_t size)
+{
+ return grub_realloc (ptr, size);
+}
+
+static inline void
+abort (void)
+{
+ grub_abort ();
+}
+
+#define MB_CUR_MAX 6
+
+#endif
diff --git a/grub-core/lib/posix_wrap/string.h b/grub-core/lib/posix_wrap/string.h
new file mode 100644
index 0000000..4224836
--- /dev/null
+++ b/grub-core/lib/posix_wrap/string.h
@@ -0,0 +1,42 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_STRING_H
+#define GRUB_POSIX_STRING_H 1
+
+#include <grub/misc.h>
+
+static inline grub_size_t
+strlen (const char *s)
+{
+ return grub_strlen (s);
+}
+
+static inline int
+strcmp (const char *s1, const char *s2)
+{
+ return grub_strcmp (s1, s2);
+}
+
+static inline int
+strcasecmp (const char *s1, const char *s2)
+{
+ return grub_strcasecmp (s1, s2);
+}
+
+#endif
diff --git a/grub-core/lib/posix_wrap/sys/types.h b/grub-core/lib/posix_wrap/sys/types.h
new file mode 100644
index 0000000..69e4950
--- /dev/null
+++ b/grub-core/lib/posix_wrap/sys/types.h
@@ -0,0 +1,46 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_SYS_TYPES_H
+#define GRUB_POSIX_SYS_TYPES_H 1
+
+#include <grub/misc.h>
+
+typedef grub_size_t size_t;
+typedef enum { false = 0, true = 1 } bool;
+
+#define ULONG_MAX GRUB_ULONG_MAX
+#define UCHAR_MAX 0xff
+
+typedef grub_uint8_t uint8_t;
+typedef grub_uint16_t uint16_t;
+typedef grub_uint32_t uint32_t;
+typedef grub_uint64_t uint64_t;
+
+typedef grub_int8_t int8_t;
+typedef grub_int16_t int16_t;
+typedef grub_int32_t int32_t;
+typedef grub_int64_t int64_t;
+
+#ifdef GRUB_CPU_WORDS_BIGENDIAN
+#define WORDS_BIGENDIAN
+#else
+#undef WORDS_BIGENDIAN
+#endif
+
+#endif
diff --git a/grub-core/lib/posix_wrap/unistd.h b/grub-core/lib/posix_wrap/unistd.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/grub-core/lib/posix_wrap/unistd.h
diff --git a/grub-core/lib/posix_wrap/wchar.h b/grub-core/lib/posix_wrap/wchar.h
new file mode 100644
index 0000000..fd56fd3
--- /dev/null
+++ b/grub-core/lib/posix_wrap/wchar.h
@@ -0,0 +1,25 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_POSIX_WCHAR_H
+#define GRUB_POSIX_WCHAR_H 1
+
+/* UCS-4. */
+typedef grub_uint32_t wchar_t;
+
+#endif
diff --git a/grub-core/lib/posix_wrap/wctype.h b/grub-core/lib/posix_wrap/wctype.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/grub-core/lib/posix_wrap/wctype.h
diff --git a/grub-core/lib/powerpc/relocator.c b/grub-core/lib/powerpc/relocator.c
new file mode 100644
index 0000000..85dfbea
--- /dev/null
+++ b/grub-core/lib/powerpc/relocator.c
@@ -0,0 +1,142 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+#include <grub/types.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/cache.h>
+
+#include <grub/powerpc/relocator.h>
+#include <grub/relocator_private.h>
+
+extern grub_uint8_t grub_relocator_forward_start;
+extern grub_uint8_t grub_relocator_forward_end;
+extern grub_uint8_t grub_relocator_backward_start;
+extern grub_uint8_t grub_relocator_backward_end;
+
+#define REGW_SIZEOF (2 * sizeof (grub_uint32_t))
+#define JUMP_SIZEOF (sizeof (grub_uint32_t))
+
+#define RELOCATOR_SRC_SIZEOF(x) (&grub_relocator_##x##_end \
+ - &grub_relocator_##x##_start)
+#define RELOCATOR_SIZEOF(x) (RELOCATOR_SRC_SIZEOF(x) \
+ + REGW_SIZEOF * 3)
+grub_size_t grub_relocator_align = sizeof (grub_uint32_t);
+grub_size_t grub_relocator_forward_size;
+grub_size_t grub_relocator_backward_size;
+grub_size_t grub_relocator_jumper_size = JUMP_SIZEOF + REGW_SIZEOF;
+
+void
+grub_cpu_relocator_init (void)
+{
+ grub_relocator_forward_size = RELOCATOR_SIZEOF(forward);
+ grub_relocator_backward_size = RELOCATOR_SIZEOF(backward);
+}
+
+static void
+write_reg (int regn, grub_uint32_t val, void **target)
+{
+ /* lis r, val >> 16 */
+ *(grub_uint32_t *) *target =
+ ((0x3c00 | (regn << 5)) << 16) | (val >> 16);
+ *target = ((grub_uint32_t *) *target) + 1;
+ /* ori r, r, val & 0xffff. */
+ *(grub_uint32_t *) *target = (((0x6000 | regn << 5 | regn) << 16)
+ | (val & 0xffff));
+ *target = ((grub_uint32_t *) *target) + 1;
+}
+
+static void
+write_jump (void **target)
+{
+ /* blr. */
+ *(grub_uint32_t *) *target = 0x4e800020;
+ *target = ((grub_uint32_t *) *target) + 1;
+}
+
+void
+grub_cpu_relocator_jumper (void *rels, grub_addr_t addr)
+{
+ write_reg (GRUB_PPC_JUMP_REGISTER, addr, &rels);
+ write_jump (&rels);
+}
+
+void
+grub_cpu_relocator_backward (void *ptr0, void *src, void *dest,
+ grub_size_t size)
+{
+ void *ptr = ptr0;
+ write_reg (8, (grub_uint32_t) src, &ptr);
+ write_reg (9, (grub_uint32_t) dest, &ptr);
+ write_reg (10, (grub_uint32_t) size, &ptr);
+ grub_memcpy (ptr, &grub_relocator_backward_start,
+ RELOCATOR_SRC_SIZEOF (backward));
+}
+
+void
+grub_cpu_relocator_forward (void *ptr0, void *src, void *dest,
+ grub_size_t size)
+{
+ void *ptr = ptr0;
+ write_reg (8, (grub_uint32_t) src, &ptr);
+ write_reg (9, (grub_uint32_t) dest, &ptr);
+ write_reg (10, (grub_uint32_t) size, &ptr);
+ grub_memcpy (ptr, &grub_relocator_forward_start,
+ RELOCATOR_SRC_SIZEOF (forward));
+}
+
+grub_err_t
+grub_relocator32_boot (struct grub_relocator *rel,
+ struct grub_relocator32_state state)
+{
+ void *ptr;
+ grub_err_t err;
+ void *relst;
+ grub_size_t relsize;
+ grub_size_t stateset_size = 32 * REGW_SIZEOF + JUMP_SIZEOF;
+ unsigned i;
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
+ (0xffffffff - stateset_size)
+ + 1, stateset_size,
+ sizeof (grub_uint32_t),
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+
+ ptr = get_virtual_current_address (ch);
+ for (i = 0; i < 32; i++)
+ write_reg (i, state.gpr[i], &ptr);
+ write_jump (&ptr);
+
+ err = grub_relocator_prepare_relocs (rel, get_physical_target_address (ch),
+ &relst, &relsize);
+ if (err)
+ return err;
+
+ grub_arch_sync_caches ((void *) relst, relsize);
+
+ ((void (*) (void)) relst) ();
+
+ /* Not reached. */
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/lib/powerpc/relocator_asm.S b/grub-core/lib/powerpc/relocator_asm.S
new file mode 100644
index 0000000..355e9c8
--- /dev/null
+++ b/grub-core/lib/powerpc/relocator_asm.S
@@ -0,0 +1,60 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+
+ .p2align 4 /* force 16-byte alignment */
+
+VARIABLE (grub_relocator_forward_start)
+ mr 3, 9
+ mr 4, 10
+
+copycont1:
+ lbz 11,0(8)
+ stb 11,0(9)
+ addi 8, 8, 0x1
+ addi 9, 9, 0x1
+ addi 10, 10, -1
+ cmpwi 10, 0
+ bne copycont1
+
+#include "../../kern/powerpc/cache_flush.S"
+
+VARIABLE (grub_relocator_forward_end)
+
+VARIABLE (grub_relocator_backward_start)
+ mr 3, 9
+ mr 4, 10
+
+ add 9, 9, 10
+ add 8, 8, 10
+ /* Backward movsl is implicitly off-by-one. compensate that. */
+ addi 9, 9, -1
+ addi 8, 8, -1
+copycont2:
+ lbz 11,0(8)
+ stb 11,0(9)
+ addi 8, 8, -1
+ addi 9, 9, -1
+ addi 10, 10, -1
+ cmpwi 10, 0
+ bne copycont2
+
+#include "../../kern/powerpc/cache_flush.S"
+
+VARIABLE (grub_relocator_backward_end)
diff --git a/grub-core/lib/powerpc/setjmp.S b/grub-core/lib/powerpc/setjmp.S
new file mode 100644
index 0000000..8c7540e
--- /dev/null
+++ b/grub-core/lib/powerpc/setjmp.S
@@ -0,0 +1,87 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2004,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/dl.h>
+
+ .file "setjmp.S"
+
+GRUB_MOD_LICENSE ("GPLv3+")
+
+ .text
+
+/*
+ * int grub_setjmp (grub_jmp_buf env)
+ */
+FUNCTION(grub_setjmp)
+ stw 1, 0(3)
+ stw 14, 4(3)
+ stw 15, 8(3)
+ stw 16, 12(3)
+ stw 17, 16(3)
+ stw 18, 20(3)
+ stw 19, 24(3)
+ stw 20, 28(3)
+ stw 21, 32(3)
+ stw 22, 36(3)
+ stw 23, 40(3)
+ stw 24, 44(3)
+ stw 25, 48(3)
+ stw 26, 52(3)
+ stw 27, 56(3)
+ stw 28, 60(3)
+ stw 29, 64(3)
+ stw 30, 68(3)
+ mflr 4
+ stw 4, 72(3)
+ mfcr 4
+ stw 4, 76(3)
+ li 3, 0
+ blr
+
+/*
+ * int grub_longjmp (grub_jmp_buf env, int val)
+ */
+FUNCTION(grub_longjmp)
+ lwz 1, 0(3)
+ lwz 14, 4(3)
+ lwz 15, 8(3)
+ lwz 16, 12(3)
+ lwz 17, 16(3)
+ lwz 18, 20(3)
+ lwz 19, 24(3)
+ lwz 20, 28(3)
+ lwz 21, 32(3)
+ lwz 22, 36(3)
+ lwz 23, 40(3)
+ lwz 24, 44(3)
+ lwz 25, 48(3)
+ lwz 26, 52(3)
+ lwz 27, 56(3)
+ lwz 28, 60(3)
+ lwz 29, 64(3)
+ lwz 30, 68(3)
+ lwz 5, 72(3)
+ mtlr 5
+ lwz 5, 76(3)
+ mtcr 5
+ mr. 3, 4
+ bne 1f
+ li 3, 1
+1: blr
+
diff --git a/grub-core/lib/reed_solomon.c b/grub-core/lib/reed_solomon.c
new file mode 100644
index 0000000..e500ba3
--- /dev/null
+++ b/grub-core/lib/reed_solomon.c
@@ -0,0 +1,527 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef TEST
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#define xmalloc malloc
+#define grub_memset memset
+#define grub_memcpy memcpy
+#endif
+
+#ifndef STANDALONE
+#ifdef TEST
+typedef unsigned int grub_size_t;
+typedef unsigned char grub_uint8_t;
+typedef unsigned short grub_uint16_t;
+#else
+#include <grub/types.h>
+#include <grub/reed_solomon.h>
+#include <grub/util/misc.h>
+#include <grub/misc.h>
+#endif
+#endif
+
+#ifdef STANDALONE
+#ifdef TEST
+typedef unsigned int grub_size_t;
+typedef unsigned char grub_uint8_t;
+typedef unsigned short grub_uint16_t;
+#else
+#include <grub/types.h>
+#include <grub/misc.h>
+#endif
+void
+grub_reed_solomon_recover (void *ptr_, grub_size_t s, grub_size_t rs);
+#endif
+
+#define GF_SIZE 8
+typedef grub_uint8_t gf_single_t;
+typedef grub_uint16_t gf_double_t;
+#define GF_POLYNOMIAL 0x1d
+#define GF_INVERT2 0x8e
+#if defined (STANDALONE) && !defined (TEST)
+static char *gf_invert __attribute__ ((section(".text"))) = (void *) 0x100000;
+static char *scratch __attribute__ ((section(".text"))) = (void *) 0x100100;
+#else
+#if defined (STANDALONE)
+static char *scratch;
+#endif
+static grub_uint8_t gf_invert[256];
+#endif
+
+#define SECTOR_SIZE 512
+#define MAX_BLOCK_SIZE (200 * SECTOR_SIZE)
+
+static gf_single_t
+gf_reduce (gf_double_t a)
+{
+ int i;
+ for (i = GF_SIZE - 1; i >= 0; i--)
+ if (a & (1ULL << (i + GF_SIZE)))
+ a ^= (((gf_double_t) GF_POLYNOMIAL) << i);
+ return a & ((1ULL << GF_SIZE) - 1);
+}
+
+static gf_single_t
+gf_mul (gf_single_t a, gf_single_t b)
+{
+ gf_double_t res = 0;
+ int i;
+ for (i = 0; i < GF_SIZE; i++)
+ if (b & (1 << i))
+ res ^= ((gf_double_t) a) << i;
+ return gf_reduce (res);
+}
+
+static void
+init_inverts (void)
+{
+ gf_single_t a = 1, ai = 1;
+ do
+ {
+ a = gf_mul (a, 2);
+ ai = gf_mul (ai, GF_INVERT2);
+ gf_invert[a] = ai;
+ }
+ while (a != 1);
+}
+
+static gf_single_t
+pol_evaluate (gf_single_t *pol, grub_size_t degree, gf_single_t x)
+{
+ int i;
+ gf_single_t xn = 1, s = 0;
+ for (i = degree; i >= 0; i--)
+ {
+ s ^= gf_mul (pol[i], xn);
+ xn = gf_mul (x, xn);
+ }
+ return s;
+}
+
+#if !defined (STANDALONE)
+static void
+rs_encode (gf_single_t *data, grub_size_t s, grub_size_t rs)
+{
+ gf_single_t *rs_polynomial, a = 1;
+ int i, j;
+ gf_single_t *m;
+ m = xmalloc ((s + rs) * sizeof (gf_single_t));
+ grub_memcpy (m, data, s * sizeof (gf_single_t));
+ grub_memset (m + s, 0, rs * sizeof (gf_single_t));
+ rs_polynomial = xmalloc ((rs + 1) * sizeof (gf_single_t));
+ grub_memset (rs_polynomial, 0, (rs + 1) * sizeof (gf_single_t));
+ rs_polynomial[rs] = 1;
+ /* Multiply with X - a^r */
+ for (j = 0; j < rs; j++)
+ {
+ if (a & (1 << (GF_SIZE - 1)))
+ {
+ a <<= 1;
+ a ^= GF_POLYNOMIAL;
+ }
+ else
+ a <<= 1;
+ for (i = 0; i < rs; i++)
+ rs_polynomial[i] = rs_polynomial[i + 1] ^ gf_mul (a, rs_polynomial[i]);
+ rs_polynomial[rs] = gf_mul (a, rs_polynomial[rs]);
+ }
+ for (j = 0; j < s; j++)
+ if (m[j])
+ {
+ gf_single_t f = m[j];
+ for (i = 0; i <= rs; i++)
+ m[i+j] ^= gf_mul (rs_polynomial[i], f);
+ }
+ free (rs_polynomial);
+ grub_memcpy (data + s, m + s, rs * sizeof (gf_single_t));
+ free (m);
+}
+#endif
+
+static void
+syndroms (gf_single_t *m, grub_size_t s, grub_size_t rs,
+ gf_single_t *sy)
+{
+ gf_single_t xn = 1;
+ unsigned i;
+ for (i = 0; i < rs; i++)
+ {
+ if (xn & (1 << (GF_SIZE - 1)))
+ {
+ xn <<= 1;
+ xn ^= GF_POLYNOMIAL;
+ }
+ else
+ xn <<= 1;
+ sy[i] = pol_evaluate (m, s + rs - 1, xn);
+ }
+}
+
+static void
+gauss_eliminate (gf_single_t *eq, int n, int m, int *chosen)
+{
+ int i, j;
+
+ for (i = 0 ; i < n; i++)
+ {
+ int nzidx;
+ int k;
+ gf_single_t r;
+ for (nzidx = 0; nzidx < m && (eq[i * (m + 1) + nzidx] == 0);
+ nzidx++);
+ if (nzidx == m)
+ continue;
+ chosen[i] = nzidx;
+ r = gf_invert [eq[i * (m + 1) + nzidx]];
+ for (j = 0; j < m + 1; j++)
+ eq[i * (m + 1) + j] = gf_mul (eq[i * (m + 1) + j], r);
+ for (j = i + 1; j < n; j++)
+ {
+ gf_single_t rr = eq[j * (m + 1) + nzidx];
+ for (k = 0; k < m + 1; k++)
+ eq[j * (m + 1) + k] ^= gf_mul (eq[i * (m + 1) + k], rr);
+ }
+ }
+}
+
+static void
+gauss_solve (gf_single_t *eq, int n, int m, gf_single_t *sol)
+{
+ int *chosen;
+ int i, j;
+
+#ifndef STANDALONE
+ chosen = xmalloc (n * sizeof (int));
+#else
+ chosen = (void *) scratch;
+ scratch += n * sizeof (int);
+#endif
+ for (i = 0; i < n; i++)
+ chosen[i] = -1;
+ for (i = 0; i < m; i++)
+ sol[i] = 0;
+ gauss_eliminate (eq, n, m, chosen);
+ for (i = n - 1; i >= 0; i--)
+ {
+ gf_single_t s = 0;
+ if (chosen[i] == -1)
+ continue;
+ for (j = 0; j < m; j++)
+ s ^= gf_mul (eq[i * (m + 1) + j], sol[j]);
+ s ^= eq[i * (m + 1) + m];
+ sol[chosen[i]] = s;
+ }
+#ifndef STANDALONE
+ free (chosen);
+#else
+ scratch -= n * sizeof (int);
+#endif
+}
+
+static void
+rs_recover (gf_single_t *m, grub_size_t s, grub_size_t rs)
+{
+ grub_size_t rs2 = rs / 2;
+ gf_single_t *sigma;
+ gf_single_t *errpot;
+ int *errpos;
+ gf_single_t *sy;
+ int errnum = 0;
+ int i, j;
+
+#ifndef STANDALONE
+ sigma = xmalloc (rs2 * sizeof (gf_single_t));
+ errpot = xmalloc (rs2 * sizeof (gf_single_t));
+ errpos = xmalloc (rs2 * sizeof (int));
+ sy = xmalloc (rs * sizeof (gf_single_t));
+#else
+ sigma = (void *) scratch;
+ scratch += rs2 * sizeof (gf_single_t);
+ errpot = (void *) scratch;
+ scratch += rs2 * sizeof (gf_single_t);
+ errpos = (void *) scratch;
+ scratch += rs2 * sizeof (int);
+ sy = (void *) scratch;
+ scratch += rs * sizeof (gf_single_t);
+#endif
+
+ syndroms (m, s, rs, sy);
+
+ {
+ gf_single_t *eq;
+
+#ifndef STANDALONE
+ eq = xmalloc (rs2 * (rs2 + 1) * sizeof (gf_single_t));
+#else
+ eq = (void *) scratch;
+ scratch += rs2 * (rs2 + 1) * sizeof (gf_single_t);
+#endif
+
+ for (i = 0; i < (int) rs; i++)
+ if (sy[i] != 0)
+ break;
+
+ /* No error detected. */
+ if (i == (int) rs)
+ return;
+
+ for (i = 0; i < (int) rs2; i++)
+ for (j = 0; j < (int) rs2 + 1; j++)
+ eq[i * (rs2 + 1) + j] = sy[i+j];
+
+ for (i = 0; i < (int) rs2; i++)
+ sigma[i] = 0;
+
+ gauss_solve (eq, rs2, rs2, sigma);
+
+#ifndef STANDALONE
+ free (eq);
+#else
+ scratch -= rs2 * (rs2 + 1) * sizeof (gf_single_t);
+#endif
+ }
+
+ {
+ gf_single_t xn = 1, yn = 1;
+ for (i = 0; i < (int) (rs + s); i++)
+ {
+ gf_single_t ev = (gf_mul (pol_evaluate (sigma, rs2 - 1, xn), xn) ^ 1);
+ if (ev == 0)
+ {
+ errpot[errnum] = yn;
+ errpos[errnum++] = s + rs - i - 1;
+ }
+ yn = gf_mul (yn, 2);
+ xn = gf_mul (xn, GF_INVERT2);
+ }
+ }
+ {
+ gf_single_t *errvals;
+ gf_single_t *eq;
+
+#ifndef STANDALONE
+ eq = xmalloc (rs * (errnum + 1) * sizeof (gf_single_t));
+ errvals = xmalloc (errnum * sizeof (int));
+#else
+ eq = (void *) scratch;
+ scratch += rs * (errnum + 1) * sizeof (gf_single_t);
+ errvals = (void *) scratch;
+ scratch += errnum * sizeof (int);
+#endif
+
+ for (j = 0; j < errnum; j++)
+ eq[j] = errpot[j];
+ eq[errnum] = sy[0];
+ for (i = 1; i < (int) rs; i++)
+ {
+ for (j = 0; j < (int) errnum; j++)
+ eq[(errnum + 1) * i + j] = gf_mul (errpot[j],
+ eq[(errnum + 1) * (i - 1) + j]);
+ eq[(errnum + 1) * i + errnum] = sy[i];
+ }
+
+ gauss_solve (eq, rs, errnum, errvals);
+
+ for (i = 0; i < (int) errnum; i++)
+ m[errpos[i]] ^= errvals[i];
+#ifndef STANDALONE
+ free (eq);
+ free (errvals);
+#else
+ scratch -= rs * (errnum + 1) * sizeof (gf_single_t);
+ scratch -= errnum * sizeof (int);
+#endif
+ }
+#ifndef STANDALONE
+ free (sigma);
+ free (errpot);
+ free (errpos);
+ free (sy);
+#else
+ scratch -= rs2 * sizeof (gf_single_t);
+ scratch -= rs2 * sizeof (gf_single_t);
+ scratch -= rs2 * sizeof (int);
+ scratch -= rs * sizeof (gf_single_t);
+#endif
+}
+
+static void
+decode_block (gf_single_t *ptr, grub_size_t s,
+ gf_single_t *rptr, grub_size_t rs)
+{
+ int i, j;
+ for (i = 0; i < SECTOR_SIZE; i++)
+ {
+ grub_size_t ds = (s + SECTOR_SIZE - 1 - i) / SECTOR_SIZE;
+ grub_size_t rr = (rs + SECTOR_SIZE - 1 - i) / SECTOR_SIZE;
+ gf_single_t m[ds + rr];
+
+ /* Nothing to do. */
+ if (!ds || !rr)
+ continue;
+
+ for (j = 0; j < (int) ds; j++)
+ m[j] = ptr[SECTOR_SIZE * j + i];
+ for (j = 0; j < (int) rr; j++)
+ m[j + ds] = rptr[SECTOR_SIZE * j + i];
+
+ rs_recover (m, ds, rr);
+
+ for (j = 0; j < (int) ds; j++)
+ ptr[SECTOR_SIZE * j + i] = m[j];
+ }
+}
+
+#if !defined (STANDALONE)
+static void
+encode_block (gf_single_t *ptr, grub_size_t s,
+ gf_single_t *rptr, grub_size_t rs)
+{
+ int i, j;
+ for (i = 0; i < SECTOR_SIZE; i++)
+ {
+ grub_size_t ds = (s + SECTOR_SIZE - 1 - i) / SECTOR_SIZE;
+ grub_size_t rr = (rs + SECTOR_SIZE - 1 - i) / SECTOR_SIZE;
+ gf_single_t m[ds + rr];
+ for (j = 0; j < ds; j++)
+ m[j] = ptr[SECTOR_SIZE * j + i];
+ rs_encode (m, ds, rr);
+ for (j = 0; j < rr; j++)
+ rptr[SECTOR_SIZE * j + i] = m[j + ds];
+ }
+}
+#endif
+
+#if !defined (STANDALONE)
+void
+grub_reed_solomon_add_redundancy (void *buffer, grub_size_t data_size,
+ grub_size_t redundancy)
+{
+ grub_size_t s = data_size;
+ grub_size_t rs = redundancy;
+ gf_single_t *ptr = buffer;
+ gf_single_t *rptr = ptr + s;
+
+ /* Nothing to do. */
+ if (!rs)
+ return;
+
+ while (s > 0)
+ {
+ grub_size_t tt;
+ grub_size_t cs, crs;
+ cs = s;
+ crs = rs;
+ tt = cs + crs;
+ if (tt > MAX_BLOCK_SIZE)
+ {
+ cs = ((cs * (MAX_BLOCK_SIZE / 512)) / tt) * 512;
+ crs = ((crs * (MAX_BLOCK_SIZE / 512)) / tt) * 512;
+ }
+ encode_block (ptr, cs, rptr, crs);
+ ptr += cs;
+ rptr += crs;
+ s -= cs;
+ rs -= crs;
+ }
+}
+#endif
+
+void
+grub_reed_solomon_recover (void *ptr_, grub_size_t s, grub_size_t rs)
+{
+ gf_single_t *ptr = ptr_;
+ gf_single_t *rptr = ptr + s;
+
+ /* Nothing to do. */
+ if (!rs)
+ return;
+
+#if defined (STANDALONE)
+ init_inverts ();
+#endif
+
+ while (s > 0)
+ {
+ grub_size_t tt;
+ grub_size_t cs, crs;
+ cs = s;
+ crs = rs;
+ tt = cs + crs;
+ if (tt > MAX_BLOCK_SIZE)
+ {
+ cs = ((cs * (MAX_BLOCK_SIZE / 512)) / tt) * 512;
+ crs = ((crs * (MAX_BLOCK_SIZE / 512)) / tt) * 512;
+ }
+ decode_block (ptr, cs, rptr, crs);
+ ptr += cs;
+ rptr += crs;
+ s -= cs;
+ rs -= crs;
+ }
+}
+
+#ifdef TEST
+int
+main (int argc, char **argv)
+{
+ FILE *in, *out;
+ grub_size_t s, rs;
+ char *buf;
+
+#ifdef STANDALONE
+ scratch = xmalloc (1048576);
+#endif
+
+#ifndef STANDALONE
+ init_inverts ();
+#endif
+
+ in = fopen ("tst.bin", "rb");
+ if (!in)
+ return 1;
+ fseek (in, 0, SEEK_END);
+ s = ftell (in);
+ fseek (in, 0, SEEK_SET);
+ rs = s / 3;
+ buf = xmalloc (s + rs + SECTOR_SIZE);
+ fread (buf, 1, s, in);
+
+ grub_reed_solomon_add_redundancy (buf, s, rs);
+
+ out = fopen ("tst_rs.bin", "wb");
+ fwrite (buf, 1, s + rs, out);
+ fclose (out);
+
+ grub_memset (buf + 512 * 15, 0, 512);
+
+ out = fopen ("tst_dam.bin", "wb");
+ fwrite (buf, 1, s + rs, out);
+ fclose (out);
+ grub_reed_solomon_recover (buf, s, rs);
+
+ out = fopen ("tst_rec.bin", "wb");
+ fwrite (buf, 1, s, out);
+ fclose (out);
+
+ return 0;
+}
+#endif
diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
new file mode 100644
index 0000000..6eb20b8
--- /dev/null
+++ b/grub-core/lib/relocator.c
@@ -0,0 +1,1602 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/relocator.h>
+#include <grub/relocator_private.h>
+#include <grub/mm_private.h>
+#include <grub/misc.h>
+#include <grub/cache.h>
+#include <grub/memory.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_relocator
+{
+ struct grub_relocator_chunk *chunks;
+ grub_phys_addr_t postchunks;
+ grub_phys_addr_t highestaddr;
+ grub_phys_addr_t highestnonpostaddr;
+ grub_size_t relocators_size;
+};
+
+struct grub_relocator_subchunk
+{
+ enum {CHUNK_TYPE_IN_REGION, CHUNK_TYPE_REGION_START,
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ CHUNK_TYPE_FIRMWARE, CHUNK_TYPE_LEFTOVER
+#endif
+ } type;
+ grub_mm_region_t reg;
+ grub_phys_addr_t start;
+ grub_size_t size;
+ grub_size_t pre_size;
+ struct grub_relocator_extra_block *extra;
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ struct grub_relocator_fw_leftover *pre, *post;
+#endif
+};
+
+struct grub_relocator_chunk
+{
+ struct grub_relocator_chunk *next;
+ grub_phys_addr_t src;
+ void *srcv;
+ grub_phys_addr_t target;
+ grub_size_t size;
+ struct grub_relocator_subchunk *subchunks;
+ unsigned nsubchunks;
+};
+
+struct grub_relocator_extra_block
+{
+ struct grub_relocator_extra_block *next;
+ struct grub_relocator_extra_block **prev;
+ grub_phys_addr_t start;
+ grub_phys_addr_t end;
+};
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+struct grub_relocator_fw_leftover
+{
+ struct grub_relocator_fw_leftover *next;
+ struct grub_relocator_fw_leftover **prev;
+ grub_phys_addr_t quantstart;
+ grub_uint8_t freebytes[GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT / 8];
+};
+
+static struct grub_relocator_fw_leftover *leftovers;
+#endif
+
+static struct grub_relocator_extra_block *extra_blocks;
+
+void *
+get_virtual_current_address (grub_relocator_chunk_t in)
+{
+ return in->srcv;
+}
+
+grub_phys_addr_t
+get_physical_target_address (grub_relocator_chunk_t in)
+{
+ return in->target;
+}
+
+struct grub_relocator *
+grub_relocator_new (void)
+{
+ struct grub_relocator *ret;
+
+ grub_cpu_relocator_init ();
+
+ ret = grub_zalloc (sizeof (struct grub_relocator));
+ if (!ret)
+ return NULL;
+
+ ret->postchunks = ~(grub_phys_addr_t) 0;
+ ret->relocators_size = grub_relocator_jumper_size;
+ grub_dprintf ("relocator", "relocators_size=%lu\n",
+ (unsigned long) ret->relocators_size);
+ return ret;
+}
+
+#define DIGITSORT_BITS 8
+#define DIGITSORT_MASK ((1 << DIGITSORT_BITS) - 1)
+#define BITS_IN_BYTE 8
+
+#define max(a, b) (((a) > (b)) ? (a) : (b))
+#define min(a, b) (((a) < (b)) ? (a) : (b))
+
+static inline int
+is_start (int type)
+{
+ return !(type & 1) && (type != COLLISION_START);
+}
+
+static void
+allocate_regstart (grub_phys_addr_t addr, grub_size_t size, grub_mm_region_t rb,
+ grub_mm_region_t *regancestor, grub_mm_header_t hancestor)
+{
+ grub_addr_t newreg_start, newreg_raw_start
+ = (grub_addr_t) rb + (addr - grub_vtop (rb)) + size;
+ grub_addr_t newreg_size, newreg_presize;
+ grub_mm_header_t new_header;
+ grub_mm_header_t hb = (grub_mm_header_t) (rb + 1);
+
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
+ grub_dprintf ("relocator", "ra = %p, rb = %p\n", regancestor, rb);
+#endif
+ newreg_start = ALIGN_UP (newreg_raw_start, GRUB_MM_ALIGN);
+ newreg_presize = newreg_start - newreg_raw_start;
+ newreg_size = rb->size - (newreg_start - (grub_addr_t) rb);
+ if ((hb->size << GRUB_MM_ALIGN_LOG2) >= newreg_start
+ - (grub_addr_t) rb)
+ {
+ grub_mm_header_t newhnext = hb->next;
+ grub_size_t newhsize = ((hb->size << GRUB_MM_ALIGN_LOG2)
+ - (newreg_start
+ - (grub_addr_t) rb)) >> GRUB_MM_ALIGN_LOG2;
+ new_header = (void *) (newreg_start + sizeof (*rb));
+ if (newhnext == hb)
+ newhnext = new_header;
+ new_header->next = newhnext;
+ new_header->size = newhsize;
+ new_header->magic = GRUB_MM_FREE_MAGIC;
+ }
+ else
+ {
+ new_header = hb->next;
+ if (new_header == hb)
+ new_header = (void *) (newreg_start + sizeof (*rb));
+ }
+ {
+ struct grub_mm_header *newregfirst = rb->first;
+ struct grub_mm_region *newregnext = rb->next;
+ struct grub_mm_region *newreg = (void *) newreg_start;
+ hancestor->next = new_header;
+ if (newregfirst == hb)
+ newregfirst = new_header;
+ newreg->first = newregfirst;
+ newreg->next = newregnext;
+ newreg->pre_size = newreg_presize;
+ newreg->size = newreg_size;
+ *regancestor = newreg;
+ {
+ grub_mm_header_t h = newreg->first, hp = NULL;
+ do
+ {
+ if ((void *) h < (void *) (newreg + 1))
+ grub_fatal ("Failed to adjust memory region: %p, %p, %p, %p, %p",
+ newreg, newreg->first, h, hp, hb);
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
+ if ((void *) h == (void *) (newreg + 1))
+ grub_dprintf ("relocator",
+ "Free start memory region: %p, %p, %p, %p, %p",
+ newreg, newreg->first, h, hp, hb);
+#endif
+ hp = h;
+ h = h->next;
+ }
+ while (h != newreg->first);
+ }
+ }
+}
+
+static void
+allocate_inreg (grub_phys_addr_t paddr, grub_size_t size,
+ grub_mm_header_t hb, grub_mm_header_t hbp,
+ grub_mm_region_t rb)
+{
+ struct grub_mm_header *foll = NULL;
+ grub_addr_t vaddr = (grub_addr_t) hb + (paddr - grub_vtop (hb));
+
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
+ grub_dprintf ("relocator", "inreg paddr = 0x%lx, size = %lu,"
+ " hb = %p, hbp = %p, rb = %p, vaddr = 0x%lx\n",
+ (unsigned long) paddr, (unsigned long) size, hb, hbp,
+ rb, (unsigned long) vaddr);
+#endif
+
+ if (ALIGN_UP (vaddr + size, GRUB_MM_ALIGN) + GRUB_MM_ALIGN
+ <= (grub_addr_t) (hb + hb->size))
+ {
+ foll = (void *) ALIGN_UP (vaddr + size, GRUB_MM_ALIGN);
+ foll->magic = GRUB_MM_FREE_MAGIC;
+ foll->size = hb + hb->size - foll;
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
+ grub_dprintf ("relocator", "foll = %p, foll->size = %lu\n", foll,
+ (unsigned long) foll->size);
+#endif
+ }
+
+ if (vaddr - (grub_addr_t) hb >= sizeof (*hb))
+ {
+ hb->size = ((vaddr - (grub_addr_t) hb) >> GRUB_MM_ALIGN_LOG2);
+ if (foll)
+ {
+ foll->next = hb;
+ hbp->next = foll;
+ if (rb->first == hb)
+ {
+ rb->first = foll;
+ }
+ }
+ }
+ else
+ {
+ if (foll)
+ {
+ foll->next = hb->next;
+ }
+ else
+ foll = hb->next;
+
+ hbp->next = foll;
+ if (rb->first == hb)
+ {
+ rb->first = foll;
+ }
+ if (rb->first == hb)
+ {
+ rb->first = (void *) (rb + 1);
+ }
+ }
+}
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+static void
+check_leftover (struct grub_relocator_fw_leftover *lo)
+{
+ unsigned i;
+ for (i = 0; i < sizeof (lo->freebytes); i++)
+ if (lo->freebytes[i] != 0xff)
+ return;
+ grub_relocator_firmware_free_region (lo->quantstart,
+ GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+ *lo->prev = lo->next;
+ if (lo->next)
+ lo->next->prev = lo->prev;
+}
+#endif
+
+static void
+free_subchunk (const struct grub_relocator_subchunk *subchu)
+{
+ switch (subchu->type)
+ {
+ case CHUNK_TYPE_REGION_START:
+ {
+ grub_mm_region_t r1, r2, *rp;
+ grub_mm_header_t h;
+ grub_size_t pre_size;
+ r1 = subchu->reg;
+ r2 = (grub_mm_region_t) ALIGN_UP ((grub_addr_t) subchu->reg
+ + (grub_vtop (subchu->reg)
+ - subchu->start) + subchu->size,
+ GRUB_MM_ALIGN);
+ for (rp = &grub_mm_base; *rp && *rp != r2; rp = &((*rp)->next));
+ pre_size = subchu->pre_size;
+
+ if (*rp)
+ {
+ grub_mm_header_t h2, *hp;
+ r1->first = r2->first;
+ r1->next = r2->next;
+ r1->pre_size = pre_size;
+ r1->size = r2->size + (r2 - r1) * sizeof (*r2);
+ *rp = r1;
+ h = (grub_mm_header_t) (r1 + 1);
+ h->next = r2->first;
+ h->magic = GRUB_MM_FREE_MAGIC;
+ h->size = (r2 - r1 - 1);
+ for (hp = &r2->first, h2 = *hp; h2->next != r2->first;
+ hp = &(h2->next), h2 = *hp)
+ if (h2 == (grub_mm_header_t) (r2 + 1))
+ break;
+ if (h2 == (grub_mm_header_t) (r2 + 1))
+ {
+ h->size = h2->size + (h2 - h);
+ h->next = h2->next;
+ *hp = h;
+ if (hp == &r2->first)
+ {
+ for (h2 = r2->first; h2->next != r2->first; h2 = h2->next);
+ h2->next = h;
+ }
+ }
+ else
+ {
+ h2->next = h;
+ }
+ }
+ else
+ {
+ r1->pre_size = pre_size;
+ r1->size = (r2 - r1) * sizeof (*r2);
+ /* Find where to insert this region.
+ Put a smaller one before bigger ones,
+ to prevent fragmentation. */
+ for (rp = &grub_mm_base; *rp; rp = &((*rp)->next))
+ if ((*rp)->size > r1->size)
+ break;
+ r1->next = *rp;
+ *rp = r1->next;
+ h = (grub_mm_header_t) (r1 + 1);
+ r1->first = h;
+ h->next = h;
+ h->magic = GRUB_MM_FREE_MAGIC;
+ h->size = (r2 - r1 - 1);
+ }
+ for (r2 = grub_mm_base; r2; r2 = r2->next)
+ if ((grub_addr_t) r2 + r2->size == (grub_addr_t) r1)
+ break;
+ if (r2)
+ {
+ grub_mm_header_t hl2, hl, g;
+ g = (grub_mm_header_t) ((grub_addr_t) r2 + r2->size);
+ g->size = (grub_mm_header_t) r1 - g;
+ r2->size += r1->size;
+ for (hl = r2->first; hl->next != r2->first; hl = hl->next);
+ for (hl2 = r1->first; hl2->next != r1->first; hl2 = hl2->next);
+ hl2->next = r2->first;
+ r2->first = r1->first;
+ hl->next = r2->first;
+ *rp = (*rp)->next;
+ grub_free (g + 1);
+ }
+ break;
+ }
+ case CHUNK_TYPE_IN_REGION:
+ {
+ grub_mm_header_t h = (grub_mm_header_t) ALIGN_DOWN ((grub_addr_t) subchu->start,
+ GRUB_MM_ALIGN);
+ h->size
+ = ((subchu->start + subchu->size + GRUB_MM_ALIGN - 1) / GRUB_MM_ALIGN)
+ - (subchu->start / GRUB_MM_ALIGN) - 1;
+ h->next = h;
+ h->magic = GRUB_MM_ALLOC_MAGIC;
+ grub_free (h + 1);
+ break;
+ }
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ case CHUNK_TYPE_FIRMWARE:
+ case CHUNK_TYPE_LEFTOVER:
+ {
+ grub_addr_t fstart, fend;
+ fstart = ALIGN_UP (subchu->start,
+ GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+ fend = ALIGN_DOWN (subchu->start + subchu->size,
+ GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+ if (fstart < fend)
+ grub_relocator_firmware_free_region (fstart, fend - fstart);
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ if (subchu->pre)
+ {
+ int off = subchu->start - fstart
+ - GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
+ grub_memset (subchu->pre->freebytes + off / 8 + 1,
+ 0xff, sizeof (subchu->pre->freebytes) - off / 8 - 1);
+ subchu->pre->freebytes[off / 8] |= ~((1 << (off % 8)) - 1);
+ check_leftover (subchu->pre);
+ }
+ if (subchu->post)
+ {
+ int off = subchu->start + subchu->size - fend;
+ grub_memset (subchu->pre->freebytes,
+ 0xff, sizeof (subchu->pre->freebytes) - off / 8);
+ subchu->pre->freebytes[off / 8] |= ((1 << (8 - (off % 8))) - 1);
+ check_leftover (subchu->post);
+ }
+#endif
+ *subchu->extra->prev = subchu->extra->next;
+ grub_free (subchu->extra);
+ }
+ break;
+#endif
+ }
+}
+
+static int
+malloc_in_range (struct grub_relocator *rel,
+ grub_addr_t start, grub_addr_t end, grub_addr_t align,
+ grub_size_t size, struct grub_relocator_chunk *res,
+ int from_low_priv, int collisioncheck)
+{
+ grub_mm_region_t r, *ra, base_saved;
+ struct grub_relocator_mmap_event *events = NULL, *eventt = NULL, *t;
+ /* 128 is just in case of additional malloc (shouldn't happen). */
+ unsigned maxevents = 2 + 128;
+ grub_mm_header_t p, pa;
+ unsigned *counter;
+ int nallocs = 0;
+ unsigned j, N = 0;
+ grub_addr_t target = 0;
+
+ grub_dprintf ("relocator",
+ "trying to allocate in 0x%lx-0x%lx aligned 0x%lx size 0x%lx\n",
+ (unsigned long) start, (unsigned long) end,
+ (unsigned long) align, (unsigned long) size);
+
+ start = ALIGN_UP (start, align);
+ end = ALIGN_DOWN (end - size, align) + size;
+
+ if (end < start + size)
+ return 0;
+
+ /* We have to avoid any allocations when filling scanline events.
+ Hence 2-stages.
+ */
+ for (r = grub_mm_base; r; r = r->next)
+ {
+ p = r->first;
+ do
+ {
+ if ((grub_addr_t) p < (grub_addr_t) (r + 1)
+ || (grub_addr_t) p >= (grub_addr_t) (r + 1) + r->size)
+ grub_fatal ("%d: out of range pointer: %p\n", __LINE__, p);
+ maxevents += 2;
+ p = p->next;
+ }
+ while (p != r->first);
+ maxevents += 4;
+ }
+
+ if (collisioncheck && rel)
+ {
+ struct grub_relocator_chunk *chunk;
+ for (chunk = rel->chunks; chunk; chunk = chunk->next)
+ maxevents += 2;
+ }
+
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ {
+ struct grub_relocator_extra_block *cur;
+ for (cur = extra_blocks; cur; cur = cur->next)
+ maxevents += 2;
+ }
+ for (r = grub_mm_base; r; r = r->next)
+ maxevents += 2;
+
+ maxevents += grub_relocator_firmware_get_max_events ();
+#endif
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ {
+ struct grub_relocator_fw_leftover *cur;
+ for (cur = leftovers; cur; cur = cur->next)
+ {
+ int l = 0;
+ unsigned i;
+ for (i = 0; i < GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT; i++)
+ {
+ if (l != ((cur->freebytes[i / 8] >> (i % 8)) & 1))
+ maxevents++;
+ l = ((cur->freebytes[i / 8] >> (i % 8)) & 1);
+ }
+ if (l)
+ maxevents++;
+ }
+ }
+#endif
+
+ events = grub_malloc (maxevents * sizeof (events[0]));
+ eventt = grub_malloc (maxevents * sizeof (events[0]));
+ counter = grub_malloc ((DIGITSORT_MASK + 2) * sizeof (counter[0]));
+ if (!events || !eventt || !counter)
+ {
+ grub_dprintf ("relocator", "events or counter allocation failed %d\n",
+ maxevents);
+ grub_free (events);
+ grub_free (eventt);
+ grub_free (counter);
+ return 0;
+ }
+
+ if (collisioncheck && rel)
+ {
+ struct grub_relocator_chunk *chunk;
+ for (chunk = rel->chunks; chunk; chunk = chunk->next)
+ {
+ events[N].type = COLLISION_START;
+ events[N].pos = chunk->target;
+ N++;
+ events[N].type = COLLISION_END;
+ events[N].pos = chunk->target + chunk->size;
+ N++;
+ }
+ }
+
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ for (r = grub_mm_base; r; r = r->next)
+ {
+ grub_dprintf ("relocator", "Blocking at 0x%lx-0x%lx\n",
+ (unsigned long) r - r->pre_size,
+ (unsigned long) (r + 1) + r->size);
+ events[N].type = FIRMWARE_BLOCK_START;
+ events[N].pos = (grub_addr_t) r - r->pre_size;
+ N++;
+ events[N].type = FIRMWARE_BLOCK_END;
+ events[N].pos = (grub_addr_t) (r + 1) + r->size;
+ N++;
+ }
+ {
+ struct grub_relocator_extra_block *cur;
+ for (cur = extra_blocks; cur; cur = cur->next)
+ {
+ grub_dprintf ("relocator", "Blocking at 0x%lx-0x%lx\n",
+ (unsigned long) cur->start, (unsigned long) cur->end);
+ events[N].type = FIRMWARE_BLOCK_START;
+ events[N].pos = cur->start;
+ N++;
+ events[N].type = FIRMWARE_BLOCK_END;
+ events[N].pos = cur->end;
+ N++;
+ }
+ }
+
+ N += grub_relocator_firmware_fill_events (events + N);
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ {
+ struct grub_relocator_fw_leftover *cur;
+ for (cur = leftovers; cur; cur = cur->next)
+ {
+ unsigned i;
+ int l = 0;
+ for (i = 0; i < GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT; i++)
+ {
+ if (l != ((cur->freebytes[i / 8] >> (i % 8)) & 1))
+ {
+ events[N].type = l ? REG_LEFTOVER_END : REG_LEFTOVER_START;
+ events[N].pos = cur->quantstart + i;
+ events[N].leftover = cur;
+ N++;
+ }
+ l = ((cur->freebytes[i / 8] >> (i % 8)) & 1);
+ }
+ if (l)
+ {
+ events[N].type = REG_LEFTOVER_END;
+ events[N].pos = cur->quantstart + i;
+ events[N].leftover = cur;
+ N++;
+ }
+ }
+ }
+#endif
+#endif
+
+ /* No malloc from this point. */
+ base_saved = grub_mm_base;
+ grub_mm_base = NULL;
+
+ for (ra = &base_saved, r = *ra; r; ra = &(r->next), r = *ra)
+ {
+ pa = r->first;
+ p = pa->next;
+ if (p->magic == GRUB_MM_ALLOC_MAGIC)
+ continue;
+ do
+ {
+ if (p->magic != GRUB_MM_FREE_MAGIC)
+ grub_fatal (__FILE__":%d free magic broken at %p (0x%x)\n",
+ __LINE__, p, p->magic);
+ if (p == (grub_mm_header_t) (r + 1))
+ {
+ events[N].type = REG_BEG_START;
+ events[N].pos = grub_vtop (r) - r->pre_size;
+ events[N].reg = r;
+ events[N].regancestor = ra;
+ events[N].head = p;
+ events[N].hancestor = pa;
+ N++;
+ events[N].type = REG_BEG_END;
+ events[N].pos = grub_vtop (p + p->size) - sizeof (*r)
+ - sizeof (struct grub_mm_header);
+ N++;
+ }
+ else
+ {
+ events[N].type = IN_REG_START;
+ events[N].pos = grub_vtop (p);
+ events[N].head = p;
+ events[N].hancestor = pa;
+ events[N].reg = r;
+ N++;
+ events[N].type = IN_REG_END;
+ events[N].pos = grub_vtop (p + p->size);
+ N++;
+ }
+ pa = p;
+ p = pa->next;
+ }
+ while (pa != r->first);
+ }
+
+ /* Put ending events after starting events. */
+ {
+ int st = 0, e = N / 2;
+ for (j = 0; j < N; j++)
+ if (is_start (events[j].type) || events[j].type == COLLISION_START)
+ eventt[st++] = events[j];
+ else
+ eventt[e++] = events[j];
+ t = eventt;
+ eventt = events;
+ events = t;
+ }
+
+ {
+ unsigned i;
+ for (i = 0; i < (BITS_IN_BYTE * sizeof (grub_addr_t) / DIGITSORT_BITS);
+ i++)
+ {
+ memset (counter, 0, (1 + (1 << DIGITSORT_BITS)) * sizeof (counter[0]));
+ for (j = 0; j < N; j++)
+ counter[((events[j].pos >> (DIGITSORT_BITS * i))
+ & DIGITSORT_MASK) + 1]++;
+ for (j = 0; j <= DIGITSORT_MASK; j++)
+ counter[j+1] += counter[j];
+ for (j = 0; j < N; j++)
+ eventt[counter[((events[j].pos >> (DIGITSORT_BITS * i))
+ & DIGITSORT_MASK)]++] = events[j];
+ t = eventt;
+ eventt = events;
+ events = t;
+ }
+ }
+
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ retry:
+#endif
+
+ /* Now events are nicely sorted. */
+ {
+ int nstarted = 0, ncollisions = 0, nstartedfw = 0, nblockfw = 0;
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ int nlefto = 0;
+#else
+ const int nlefto = 0;
+#endif
+ grub_addr_t starta = 0;
+ for (j = from_low_priv ? 0 : N - 1; from_low_priv ? j < N : (j + 1);
+ from_low_priv ? j++ : j--)
+ {
+ int isinsidebefore, isinsideafter;
+ isinsidebefore = (!ncollisions && (nstarted || (((nlefto || nstartedfw)
+ && !nblockfw))));
+ switch (events[j].type)
+ {
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ case REG_FIRMWARE_START:
+ nstartedfw++;
+ break;
+
+ case REG_FIRMWARE_END:
+ nstartedfw--;
+ break;
+
+ case FIRMWARE_BLOCK_START:
+ nblockfw++;
+ break;
+
+ case FIRMWARE_BLOCK_END:
+ nblockfw--;
+ break;
+#endif
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ case REG_LEFTOVER_START:
+ nlefto++;
+ break;
+
+ case REG_LEFTOVER_END:
+ nlefto--;
+ break;
+#endif
+
+ case COLLISION_START:
+ ncollisions++;
+ break;
+
+ case COLLISION_END:
+ ncollisions--;
+ break;
+
+ case IN_REG_START:
+ case REG_BEG_START:
+ nstarted++;
+ break;
+
+ case IN_REG_END:
+ case REG_BEG_END:
+ nstarted--;
+ break;
+ }
+ isinsideafter = (!ncollisions && (nstarted || ((nlefto || nstartedfw)
+ && !nblockfw)));
+ if (!isinsidebefore && isinsideafter)
+ starta = from_low_priv ? ALIGN_UP (events[j].pos, align)
+ : ALIGN_DOWN (events[j].pos - size, align) + size;
+ if (isinsidebefore && !isinsideafter && from_low_priv)
+ {
+ target = starta;
+ if (target < start)
+ target = start;
+ if (target + size <= end && target + size <= events[j].pos)
+ /* Found an usable address. */
+ goto found;
+ }
+ if (isinsidebefore && !isinsideafter && !from_low_priv)
+ {
+ target = starta - size;
+ if (target > end - size)
+ target = end - size;
+ if (target >= start && target >= events[j].pos)
+ goto found;
+ }
+ }
+ }
+
+ grub_mm_base = base_saved;
+ grub_free (events);
+ grub_free (eventt);
+ grub_free (counter);
+ return 0;
+
+ found:
+ {
+ int inreg = 0, regbeg = 0, ncol = 0;
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ int fwin = 0, fwb = 0, fwlefto = 0;
+#endif
+ int last_start = 0;
+ for (j = 0; j < N; j++)
+ {
+ int typepre;
+ if (ncol)
+ typepre = -1;
+ else if (regbeg)
+ typepre = CHUNK_TYPE_REGION_START;
+ else if (inreg)
+ typepre = CHUNK_TYPE_IN_REGION;
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ else if (fwin && !fwb)
+ typepre = CHUNK_TYPE_FIRMWARE;
+ else if (fwlefto && !fwb)
+ typepre = CHUNK_TYPE_LEFTOVER;
+#endif
+ else
+ typepre = -1;
+
+ if (j != 0 && events[j - 1].pos != events[j].pos)
+ {
+ grub_addr_t alloc_start, alloc_end;
+ alloc_start = max (events[j - 1].pos, target);
+ alloc_end = min (events[j].pos, target + size);
+ if (alloc_end > alloc_start)
+ {
+ switch (typepre)
+ {
+ case CHUNK_TYPE_REGION_START:
+ allocate_regstart (alloc_start, alloc_end - alloc_start,
+ events[last_start].reg,
+ events[last_start].regancestor,
+ events[last_start].hancestor);
+ /* TODO: maintain a reverse lookup tree for hancestor. */
+ {
+ unsigned k;
+ for (k = 0; k < N; k++)
+ if (events[k].hancestor == events[last_start].head)
+ events[k].hancestor = events[last_start].hancestor;
+ }
+ break;
+ case CHUNK_TYPE_IN_REGION:
+ allocate_inreg (alloc_start, alloc_end - alloc_start,
+ events[last_start].head,
+ events[last_start].hancestor,
+ events[last_start].reg);
+ {
+ unsigned k;
+ for (k = 0; k < N; k++)
+ if (events[k].hancestor == events[last_start].head)
+ events[k].hancestor = events[last_start].hancestor;
+ }
+ break;
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ case CHUNK_TYPE_FIRMWARE:
+ {
+ grub_addr_t fstart, fend;
+ fstart
+ = ALIGN_DOWN (alloc_start,
+ GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+ fend
+ = ALIGN_UP (alloc_end,
+ GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+#ifdef DEBUG_RELOCATOR_NOMEM_DPRINTF
+ grub_dprintf ("relocator", "requesting %lx-%lx\n",
+ (unsigned long) fstart,
+ (unsigned long) fend);
+#endif
+ /* The failure here can be very expensive. */
+ if (!grub_relocator_firmware_alloc_region (fstart,
+ fend - fstart))
+ {
+ if (from_low_priv)
+ start = fend;
+ else
+ end = fstart;
+ goto retry;
+ }
+ break;
+ }
+#endif
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ case CHUNK_TYPE_LEFTOVER:
+ {
+ unsigned offstart = alloc_start
+ % GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
+ unsigned offend = alloc_end
+ % GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
+ struct grub_relocator_fw_leftover *lo
+ = events[last_start].leftover;
+ lo->freebytes[offstart / 8]
+ &= ((1 << (8 - (start % 8))) - 1);
+ grub_memset (lo->freebytes + (offstart + 7) / 8, 0,
+ offend / 8 - (offstart + 7) / 8);
+ lo->freebytes[offend / 8] &= ~((1 << (offend % 8)) - 1);
+ }
+ break;
+#endif
+ }
+ nallocs++;
+ }
+ }
+
+ switch (events[j].type)
+ {
+ case REG_BEG_START:
+ case IN_REG_START:
+ if (events[j].type == REG_BEG_START &&
+ (grub_addr_t) (events[j].reg + 1) > target)
+ regbeg++;
+ else
+ inreg++;
+ last_start = j;
+ break;
+
+ case REG_BEG_END:
+ case IN_REG_END:
+ if (regbeg)
+ regbeg--;
+ else
+ inreg--;
+ break;
+
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ case REG_FIRMWARE_START:
+ fwin++;
+ break;
+
+ case REG_FIRMWARE_END:
+ fwin--;
+ break;
+
+ case FIRMWARE_BLOCK_START:
+ fwb++;
+ break;
+
+ case FIRMWARE_BLOCK_END:
+ fwb--;
+ break;
+#endif
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ case REG_LEFTOVER_START:
+ fwlefto++;
+ break;
+
+ case REG_LEFTOVER_END:
+ fwlefto--;
+ break;
+#endif
+ case COLLISION_START:
+ ncol++;
+ break;
+ case COLLISION_END:
+ ncol--;
+ break;
+ }
+
+ }
+ }
+
+ /* Malloc is available again. */
+ grub_mm_base = base_saved;
+
+ {
+ int last_start = 0;
+ int inreg = 0, regbeg = 0, ncol = 0;
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ int fwin = 0, fwlefto = 0, fwb = 0;
+#endif
+ unsigned cural = 0;
+ int oom = 0;
+ res->subchunks = grub_malloc (sizeof (res->subchunks[0]) * nallocs);
+ if (!res->subchunks)
+ oom = 1;
+ res->nsubchunks = nallocs;
+
+ for (j = 0; j < N; j++)
+ {
+ int typepre;
+ if (ncol)
+ typepre = -1;
+ else if (regbeg)
+ typepre = CHUNK_TYPE_REGION_START;
+ else if (inreg)
+ typepre = CHUNK_TYPE_IN_REGION;
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ else if (fwin && !fwb)
+ typepre = CHUNK_TYPE_FIRMWARE;
+ else if (fwlefto && !fwb)
+ typepre = CHUNK_TYPE_LEFTOVER;
+#endif
+ else
+ typepre = -1;
+
+ if (j != 0 && events[j - 1].pos != events[j].pos)
+ {
+ grub_addr_t alloc_start, alloc_end;
+ struct grub_relocator_subchunk tofree;
+ struct grub_relocator_subchunk *curschu = &tofree;
+ if (!oom)
+ curschu = &res->subchunks[cural];
+ alloc_start = max (events[j - 1].pos, target);
+ alloc_end = min (events[j].pos, target + size);
+ if (alloc_end > alloc_start)
+ {
+ grub_dprintf ("relocator", "subchunk 0x%lx-0x%lx, %d\n",
+ (unsigned long) alloc_start,
+ (unsigned long) alloc_end, typepre);
+ curschu->type = typepre;
+ curschu->start = alloc_start;
+ curschu->size = alloc_end - alloc_start;
+ if (typepre == CHUNK_TYPE_REGION_START
+ || typepre == CHUNK_TYPE_IN_REGION)
+ {
+ curschu->reg = events[last_start].reg;
+ curschu->pre_size = alloc_start - events[j - 1].pos;
+ }
+ if (!oom && (typepre == CHUNK_TYPE_REGION_START
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ || typepre == CHUNK_TYPE_FIRMWARE
+#endif
+ ))
+ {
+ struct grub_relocator_extra_block *ne;
+ ne = grub_malloc (sizeof (*ne));
+ if (!ne)
+ {
+ oom = 1;
+ grub_memcpy (&tofree, curschu, sizeof (tofree));
+ }
+ else
+ {
+ ne->start = alloc_start;
+ ne->end = alloc_end;
+ ne->next = extra_blocks;
+ ne->prev = &extra_blocks;
+ if (extra_blocks)
+ extra_blocks->prev = &(ne->next);
+ extra_blocks = ne;
+ curschu->extra = ne;
+ }
+ }
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ if (!oom && typepre == CHUNK_TYPE_FIRMWARE)
+ {
+ grub_addr_t fstart, fend;
+
+ fstart
+ = ALIGN_DOWN (alloc_start,
+ GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+ fend
+ = ALIGN_UP (alloc_end,
+ GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ {
+ struct grub_relocator_fw_leftover *lo1 = NULL;
+ struct grub_relocator_fw_leftover *lo2 = NULL;
+ if (fstart != alloc_start)
+ lo1 = grub_malloc (sizeof (*lo1));
+ if (fend != alloc_end)
+ lo2 = grub_malloc (sizeof (*lo2));
+ if ((!lo1 && fstart != alloc_start)
+ || (!lo2 && fend != alloc_end))
+ {
+ struct grub_relocator_extra_block *ne;
+ grub_free (lo1);
+ grub_free (lo2);
+ lo1 = NULL;
+ lo2 = NULL;
+ oom = 1;
+ grub_memcpy (&tofree, curschu, sizeof (tofree));
+ ne = extra_blocks;
+ extra_blocks = extra_blocks->next;
+ grub_free (ne);
+ }
+ if (lo1)
+ {
+ lo1->quantstart = fstart;
+ grub_memset (lo1->freebytes, 0xff,
+ (alloc_start - fstart) / 8);
+ lo1->freebytes[(alloc_start - fstart) / 8]
+ = (1 << ((alloc_start - fstart) % 8)) - 1;
+ grub_memset (lo1->freebytes
+ + ((alloc_start - fstart) / 8) + 1, 0,
+ sizeof (lo1->freebytes)
+ - (alloc_start - fstart) / 8 - 1);
+ lo1->next = leftovers;
+ lo1->prev = &leftovers;
+ if (leftovers)
+ leftovers->prev = &lo1->next;
+ leftovers = lo1;
+ }
+ if (lo2)
+ {
+ lo2->quantstart
+ = fend - GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT;
+ grub_memset (lo2->freebytes, 0,
+ (alloc_end - lo2->quantstart) / 8);
+ lo2->freebytes[(alloc_end - lo2->quantstart) / 8]
+ = ~((1 << ((alloc_end - lo2->quantstart) % 8)) - 1);
+ grub_memset (lo2->freebytes
+ + ((alloc_end - lo2->quantstart) / 8)
+ + 1, 0, sizeof (lo2->freebytes)
+ - (alloc_end - lo2->quantstart) / 8 - 1);
+ lo2->prev = &leftovers;
+ if (leftovers)
+ leftovers->prev = &lo2->next;
+ lo2->next = leftovers;
+ leftovers = lo2;
+ }
+ curschu->pre = lo1;
+ curschu->post = lo2;
+ }
+#endif
+ }
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ if (typepre == CHUNK_TYPE_LEFTOVER)
+ {
+ curschu->pre = events[last_start].leftover;
+ curschu->post = events[last_start].leftover;
+ }
+#endif
+
+#endif
+ if (!oom)
+ cural++;
+ else
+ free_subchunk (&tofree);
+ }
+ }
+
+ switch (events[j].type)
+ {
+ case REG_BEG_START:
+ case IN_REG_START:
+ if (events[j].type == REG_BEG_START &&
+ (grub_addr_t) (events[j].reg + 1) > target)
+ regbeg++;
+ else
+ inreg++;
+ last_start = j;
+ break;
+
+ case REG_BEG_END:
+ case IN_REG_END:
+ inreg = regbeg = 0;
+ break;
+
+#if GRUB_RELOCATOR_HAVE_FIRMWARE_REQUESTS
+ case REG_FIRMWARE_START:
+ fwin++;
+ break;
+
+ case REG_FIRMWARE_END:
+ fwin--;
+ break;
+
+ case FIRMWARE_BLOCK_START:
+ fwb++;
+ break;
+
+ case FIRMWARE_BLOCK_END:
+ fwb--;
+ break;
+#endif
+
+#if GRUB_RELOCATOR_HAVE_LEFTOVERS
+ case REG_LEFTOVER_START:
+ fwlefto++;
+ break;
+
+ case REG_LEFTOVER_END:
+ fwlefto--;
+ break;
+#endif
+ case COLLISION_START:
+ ncol++;
+ break;
+ case COLLISION_END:
+ ncol--;
+ break;
+ }
+ }
+ if (oom)
+ {
+ unsigned i;
+ for (i = 0; i < cural; i++)
+ free_subchunk (&res->subchunks[i]);
+ grub_free (res->subchunks);
+ grub_dprintf ("relocator", "allocation failed with out-of-memory\n");
+ return 0;
+ }
+ }
+
+ res->src = target;
+ res->size = size;
+ grub_dprintf ("relocator", "allocated: 0x%lx+0x%lx\n", (unsigned long) target,
+ (unsigned long) size);
+
+ return 1;
+}
+
+static void
+adjust_limits (struct grub_relocator *rel,
+ grub_phys_addr_t *min_addr, grub_phys_addr_t *max_addr,
+ grub_phys_addr_t in_min, grub_phys_addr_t in_max)
+{
+ struct grub_relocator_chunk *chunk;
+
+ *min_addr = 0;
+ *max_addr = rel->postchunks;
+
+ /* Keep chunks in memory in the same order as they'll be after relocation. */
+ for (chunk = rel->chunks; chunk; chunk = chunk->next)
+ {
+ if (chunk->target > in_max && chunk->src < *max_addr
+ && chunk->src < rel->postchunks)
+ *max_addr = chunk->src;
+ if (chunk->target + chunk->size <= in_min
+ && chunk->src + chunk->size > *min_addr
+ && chunk->src < rel->postchunks)
+ *min_addr = chunk->src + chunk->size;
+ }
+}
+
+grub_err_t
+grub_relocator_alloc_chunk_addr (struct grub_relocator *rel,
+ grub_relocator_chunk_t *out,
+ grub_phys_addr_t target, grub_size_t size)
+{
+ struct grub_relocator_chunk *chunk;
+ grub_phys_addr_t min_addr = 0, max_addr;
+
+ if (target > ~size)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "address is out of range");
+
+ adjust_limits (rel, &min_addr, &max_addr, target, target);
+
+ for (chunk = rel->chunks; chunk; chunk = chunk->next)
+ if ((chunk->target <= target && target < chunk->target + chunk->size)
+ || (target <= chunk->target && chunk->target < target + size))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "overlap detected");
+
+ chunk = grub_malloc (sizeof (struct grub_relocator_chunk));
+ if (!chunk)
+ return grub_errno;
+
+ grub_dprintf ("relocator",
+ "min_addr = 0x%llx, max_addr = 0x%llx, target = 0x%llx\n",
+ (unsigned long long) min_addr, (unsigned long long) max_addr,
+ (unsigned long long) target);
+
+ do
+ {
+ /* A trick to improve Linux allocation. */
+#if defined (__i386__) || defined (__x86_64__)
+ if (target < 0x100000)
+ if (malloc_in_range (rel, rel->highestnonpostaddr, ~(grub_addr_t)0, 1,
+ size, chunk, 0, 1))
+ {
+ if (rel->postchunks > chunk->src)
+ rel->postchunks = chunk->src;
+ break;
+ }
+#endif
+ if (malloc_in_range (rel, target, max_addr, 1, size, chunk, 1, 0))
+ break;
+
+ if (malloc_in_range (rel, min_addr, target, 1, size, chunk, 0, 0))
+ break;
+
+ if (malloc_in_range (rel, rel->highestnonpostaddr, ~(grub_addr_t)0, 1,
+ size, chunk, 0, 1))
+ {
+ if (rel->postchunks > chunk->src)
+ rel->postchunks = chunk->src;
+ break;
+ }
+
+ grub_dprintf ("relocator", "not allocated\n");
+ grub_free (chunk);
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+ }
+ while (0);
+
+ grub_dprintf ("relocator", "allocated 0x%llx/0x%llx\n",
+ (unsigned long long) chunk->src, (unsigned long long) target);
+
+ if (rel->highestaddr < target + size)
+ rel->highestaddr = target + size;
+
+ if (rel->highestaddr < chunk->src + size)
+ rel->highestaddr = chunk->src + size;
+
+ if (chunk->src < rel->postchunks)
+ {
+ if (rel->highestnonpostaddr < target + size)
+ rel->highestnonpostaddr = target + size;
+
+ if (rel->highestnonpostaddr < chunk->src + size)
+ rel->highestnonpostaddr = chunk->src + size;
+ }
+
+ grub_dprintf ("relocator", "relocators_size=%ld\n",
+ (unsigned long) rel->relocators_size);
+
+ if (chunk->src < target)
+ rel->relocators_size += grub_relocator_backward_size;
+ if (chunk->src > target)
+ rel->relocators_size += grub_relocator_forward_size;
+
+ grub_dprintf ("relocator", "relocators_size=%ld\n",
+ (unsigned long) rel->relocators_size);
+
+ chunk->target = target;
+ chunk->size = size;
+ chunk->next = rel->chunks;
+ rel->chunks = chunk;
+ grub_dprintf ("relocator", "cur = %p, next = %p\n", rel->chunks,
+ rel->chunks->next);
+
+ chunk->srcv = grub_map_memory (chunk->src, chunk->size);
+ *out = chunk;
+#ifdef DEBUG_RELOCATOR
+ grub_memset (chunk->srcv, 0xfa, chunk->size);
+ grub_mm_check ();
+#endif
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
+ grub_relocator_chunk_t *out,
+ grub_phys_addr_t min_addr,
+ grub_phys_addr_t max_addr,
+ grub_size_t size, grub_size_t align,
+ int preference)
+{
+ grub_addr_t min_addr2 = 0, max_addr2;
+ struct grub_relocator_chunk *chunk;
+
+ if (max_addr > ~size)
+ max_addr = ~size;
+
+#ifdef GRUB_MACHINE_PCBIOS
+ if (min_addr < 0x1000)
+ min_addr = 0x1000;
+#endif
+
+ grub_dprintf ("relocator", "chunks = %p\n", rel->chunks);
+
+ chunk = grub_malloc (sizeof (struct grub_relocator_chunk));
+ if (!chunk)
+ return grub_errno;
+
+ if (malloc_in_range (rel, min_addr, max_addr, align,
+ size, chunk,
+ preference != GRUB_RELOCATOR_PREFERENCE_HIGH, 1))
+ {
+ grub_dprintf ("relocator", "allocated 0x%llx/0x%llx\n",
+ (unsigned long long) chunk->src,
+ (unsigned long long) chunk->src);
+ grub_dprintf ("relocator", "chunks = %p\n", rel->chunks);
+ chunk->target = chunk->src;
+ chunk->size = size;
+ chunk->next = rel->chunks;
+ rel->chunks = chunk;
+ chunk->srcv = grub_map_memory (chunk->src, chunk->size);
+ *out = chunk;
+ return GRUB_ERR_NONE;
+ }
+
+ adjust_limits (rel, &min_addr2, &max_addr2, min_addr, max_addr);
+ grub_dprintf ("relocator", "Adjusted limits from %lx-%lx to %lx-%lx\n",
+ (unsigned long) min_addr, (unsigned long) max_addr,
+ (unsigned long) min_addr2, (unsigned long) max_addr2);
+
+ do
+ {
+ if (malloc_in_range (rel, min_addr2, max_addr2, align,
+ size, chunk, 1, 1))
+ break;
+
+ if (malloc_in_range (rel, rel->highestnonpostaddr, ~(grub_addr_t)0, 1,
+ size, chunk, 0, 1))
+ {
+ if (rel->postchunks > chunk->src)
+ rel->postchunks = chunk->src;
+ break;
+ }
+
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+ }
+ while (0);
+
+ {
+ int found = 0;
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t sz,
+ grub_memory_type_t type)
+ {
+ grub_uint64_t candidate;
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ candidate = ALIGN_UP (addr, align);
+ if (candidate < min_addr)
+ candidate = ALIGN_UP (min_addr, align);
+ if (candidate + size > addr + sz
+ || candidate > ALIGN_DOWN (max_addr, align))
+ return 0;
+ if (preference == GRUB_RELOCATOR_PREFERENCE_HIGH)
+ candidate = ALIGN_DOWN (min (addr + sz - size, max_addr), align);
+ if (!found || (preference == GRUB_RELOCATOR_PREFERENCE_HIGH
+ && candidate > chunk->target))
+ chunk->target = candidate;
+ if (!found || (preference == GRUB_RELOCATOR_PREFERENCE_LOW
+ && candidate < chunk->target))
+ chunk->target = candidate;
+ found = 1;
+ return 0;
+ }
+
+ grub_machine_mmap_iterate (hook);
+ if (!found)
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't find suitable memory target");
+ }
+ while (1)
+ {
+ struct grub_relocator_chunk *chunk2;
+ for (chunk2 = rel->chunks; chunk2; chunk2 = chunk2->next)
+ if ((chunk2->target <= chunk->target
+ && chunk->target < chunk2->target + chunk2->size)
+ || (chunk2->target <= chunk->target + size
+ && chunk->target + size < chunk2->target + chunk2->size)
+ || (chunk->target <= chunk2->target && chunk2->target
+ < chunk->target + size)
+ || (chunk->target <= chunk2->target + chunk2->size
+ && chunk2->target + chunk2->size < chunk->target + size))
+ {
+ if (preference == GRUB_RELOCATOR_PREFERENCE_HIGH)
+ chunk->target = ALIGN_DOWN (chunk2->target, align);
+ else
+ chunk->target = ALIGN_UP (chunk2->target + chunk2->size, align);
+ break;
+ }
+ if (!chunk2)
+ break;
+ }
+
+ grub_dprintf ("relocator", "relocators_size=%ld\n",
+ (unsigned long) rel->relocators_size);
+
+ if (chunk->src < chunk->target)
+ rel->relocators_size += grub_relocator_backward_size;
+ if (chunk->src > chunk->target)
+ rel->relocators_size += grub_relocator_forward_size;
+
+ grub_dprintf ("relocator", "relocators_size=%ld\n",
+ (unsigned long) rel->relocators_size);
+
+ chunk->size = size;
+ chunk->next = rel->chunks;
+ rel->chunks = chunk;
+ grub_dprintf ("relocator", "cur = %p, next = %p\n", rel->chunks,
+ rel->chunks->next);
+ chunk->srcv = grub_map_memory (chunk->src, chunk->size);
+ *out = chunk;
+#ifdef DEBUG_RELOCATOR
+ grub_memset (chunk->srcv, 0xfa, chunk->size);
+ grub_mm_check ();
+#endif
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_relocator_unload (struct grub_relocator *rel)
+{
+ struct grub_relocator_chunk *chunk, *next;
+ if (!rel)
+ return;
+ for (chunk = rel->chunks; chunk; chunk = next)
+ {
+ unsigned i;
+ for (i = 0; i < chunk->nsubchunks; i++)
+ free_subchunk (&chunk->subchunks[i]);
+ grub_unmap_memory (chunk->srcv, chunk->size);
+ next = chunk->next;
+ grub_free (chunk->subchunks);
+ grub_free (chunk);
+ }
+ grub_free (rel);
+}
+
+grub_err_t
+grub_relocator_prepare_relocs (struct grub_relocator *rel, grub_addr_t addr,
+ void **relstart, grub_size_t *relsize)
+{
+ grub_uint8_t *rels;
+ grub_uint8_t *rels0;
+ struct grub_relocator_chunk *sorted;
+ grub_size_t nchunks = 0;
+ unsigned j;
+ struct grub_relocator_chunk movers_chunk;
+
+ grub_dprintf ("relocator", "Preparing relocs (size=%ld)\n",
+ (unsigned long) rel->relocators_size);
+
+ if (!malloc_in_range (rel, 0, ~(grub_addr_t)0 - rel->relocators_size + 1,
+ grub_relocator_align,
+ rel->relocators_size, &movers_chunk, 1, 1))
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+ movers_chunk.srcv = rels = rels0
+ = grub_map_memory (movers_chunk.src, movers_chunk.size);
+
+ if (relsize)
+ *relsize = rel->relocators_size;
+
+ grub_dprintf ("relocator", "Relocs allocated at %p\n", movers_chunk.srcv);
+
+ {
+ unsigned i;
+ grub_size_t count[257];
+ struct grub_relocator_chunk *from, *to, *tmp;
+
+ grub_memset (count, 0, sizeof (count));
+
+ {
+ struct grub_relocator_chunk *chunk;
+ for (chunk = rel->chunks; chunk; chunk = chunk->next)
+ {
+ grub_dprintf ("relocator", "chunk %p->%p, 0x%lx\n",
+ (void *) chunk->src, (void *) chunk->target,
+ (unsigned long) chunk->size);
+ nchunks++;
+ count[(chunk->src & 0xff) + 1]++;
+ }
+ }
+ from = grub_malloc (nchunks * sizeof (sorted[0]));
+ to = grub_malloc (nchunks * sizeof (sorted[0]));
+ if (!from || !to)
+ {
+ grub_free (from);
+ grub_free (to);
+ return grub_errno;
+ }
+
+ for (j = 0; j < 256; j++)
+ count[j+1] += count[j];
+
+ {
+ struct grub_relocator_chunk *chunk;
+ for (chunk = rel->chunks; chunk; chunk = chunk->next)
+ from[count[chunk->src & 0xff]++] = *chunk;
+ }
+
+ for (i = 1; i < GRUB_CPU_SIZEOF_VOID_P; i++)
+ {
+ grub_memset (count, 0, sizeof (count));
+ for (j = 0; j < nchunks; j++)
+ count[((from[j].src >> (8 * i)) & 0xff) + 1]++;
+ for (j = 0; j < 256; j++)
+ count[j+1] += count[j];
+ for (j = 0; j < nchunks; j++)
+ to[count[(from[j].src >> (8 * i)) & 0xff]++] = from[j];
+ tmp = to;
+ to = from;
+ from = tmp;
+ }
+ sorted = from;
+ grub_free (to);
+ }
+
+ for (j = 0; j < nchunks; j++)
+ {
+ grub_dprintf ("relocator", "sorted chunk %p->%p, 0x%lx\n",
+ (void *) sorted[j].src, (void *) sorted[j].target,
+ (unsigned long) sorted[j].size);
+ if (sorted[j].src < sorted[j].target)
+ {
+ grub_cpu_relocator_backward ((void *) rels,
+ sorted[j].srcv,
+ grub_map_memory (sorted[j].target,
+ sorted[j].size),
+ sorted[j].size);
+ rels += grub_relocator_backward_size;
+ }
+ if (sorted[j].src > sorted[j].target)
+ {
+ grub_cpu_relocator_forward ((void *) rels,
+ sorted[j].srcv,
+ grub_map_memory (sorted[j].target,
+ sorted[j].size),
+ sorted[j].size);
+ rels += grub_relocator_forward_size;
+ }
+ if (sorted[j].src == sorted[j].target)
+ grub_arch_sync_caches (sorted[j].srcv, sorted[j].size);
+ }
+ grub_cpu_relocator_jumper ((void *) rels, (grub_addr_t) addr);
+ *relstart = rels0;
+ grub_free (sorted);
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_mm_check_real (char *file, int line)
+{
+ grub_mm_region_t r;
+ grub_mm_header_t p, pa;
+
+ for (r = grub_mm_base; r; r = r->next)
+ {
+ pa = r->first;
+ p = pa->next;
+ if (p->magic == GRUB_MM_ALLOC_MAGIC)
+ continue;
+ do
+ {
+ if ((grub_addr_t) p < (grub_addr_t) (r + 1)
+ || (grub_addr_t) p >= (grub_addr_t) (r + 1) + r->size)
+ grub_fatal ("%s:%d: out of range pointer: %p\n", file, line, p);
+ if (p->magic != GRUB_MM_FREE_MAGIC)
+ grub_fatal ("%s:%d free magic broken at %p (0x%x)\n", file,
+ line, p, p->magic);
+ pa = p;
+ p = pa->next;
+ }
+ while (pa != r->first);
+ }
+}
diff --git a/grub-core/lib/setjmp.S b/grub-core/lib/setjmp.S
new file mode 100644
index 0000000..c39c91b
--- /dev/null
+++ b/grub-core/lib/setjmp.S
@@ -0,0 +1,13 @@
+#if defined(__i386__)
+#include "./i386/setjmp.S"
+#elif defined(__x86_64__)
+#include "./x86_64/setjmp.S"
+#elif defined(__sparc__)
+#include "./sparc64/setjmp.S"
+#elif defined(__mips__)
+#include "./mips/setjmp.S"
+#elif defined(__powerpc__)
+#include "./powerpc/setjmp.S"
+#else
+#error "Unknwon target cpu type"
+#endif
diff --git a/grub-core/lib/sparc64/setjmp.S b/grub-core/lib/sparc64/setjmp.S
new file mode 100644
index 0000000..5c2ec2c
--- /dev/null
+++ b/grub-core/lib/sparc64/setjmp.S
@@ -0,0 +1,50 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/dl.h>
+
+ .file "setjmp.S"
+
+GRUB_MOD_LICENSE ("GPLv3+")
+
+ .text
+
+/*
+ * int grub_setjmp (grub_jmp_buf env)
+ */
+FUNCTION(grub_setjmp)
+ stx %o7, [%o0 + 0x00]
+ stx %sp, [%o0 + 0x08]
+ stx %fp, [%o0 + 0x10]
+ retl
+ clr %o0
+
+/*
+ * int grub_longjmp (grub_jmp_buf env, int val)
+ */
+FUNCTION(grub_longjmp)
+ ldx [%o0 + 0x10], %g1
+ movrz %o1, 1, %o1
+ flushw
+ ldx [%o0 + 0x00], %o7
+ ldx [%o0 + 0x08], %fp
+ sub %fp, 192, %sp
+ stx %g1, [%sp + 2047 + (14 * 8)]
+ retl
+ restore %o1, 0, %o0
diff --git a/grub-core/lib/x86_64/relocator_asm.S b/grub-core/lib/x86_64/relocator_asm.S
new file mode 100644
index 0000000..2ab6d8c
--- /dev/null
+++ b/grub-core/lib/x86_64/relocator_asm.S
@@ -0,0 +1,85 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/i386/memory.h>
+
+ .p2align 2
+
+VARIABLE(grub_relocator_backward_start)
+ /* mov imm32, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator_backward_dest)
+ .long 0, 0
+ movq %rax, %rdi
+
+ /* mov imm64, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator_backward_src)
+ .long 0, 0
+ movq %rax, %rsi
+
+ /* mov imm64, %rcx */
+ .byte 0x48
+ .byte 0xb9
+VARIABLE(grub_relocator_backward_chunk_size)
+ .long 0, 0
+
+ add %rcx, %rsi
+ add %rcx, %rdi
+
+ /* Backward movsb is implicitly off-by-one. compensate that. */
+ sub $1, %rsi
+ sub $1, %rdi
+
+ /* Backward copy. */
+ std
+
+ rep
+ movsb
+VARIABLE(grub_relocator_backward_end)
+
+
+VARIABLE(grub_relocator_forward_start)
+ /* mov imm64, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator_forward_dest)
+ .long 0, 0
+ movq %rax, %rdi
+
+ /* mov imm64, %rax */
+ .byte 0x48
+ .byte 0xb8
+VARIABLE(grub_relocator_forward_src)
+ .long 0, 0
+ movq %rax, %rsi
+
+ /* mov imm64, %rcx */
+ .byte 0x48
+ .byte 0xb9
+VARIABLE(grub_relocator_forward_chunk_size)
+ .long 0, 0
+
+ /* Forward copy. */
+ cld
+ rep
+ movsb
+VARIABLE(grub_relocator_forward_end)
diff --git a/grub-core/lib/x86_64/setjmp.S b/grub-core/lib/x86_64/setjmp.S
new file mode 100644
index 0000000..b1f1b22
--- /dev/null
+++ b/grub-core/lib/x86_64/setjmp.S
@@ -0,0 +1,68 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+#include <grub/dl.h>
+
+ .file "setjmp.S"
+
+GRUB_MOD_LICENSE ("GPLv3+")
+
+ .text
+
+/*
+ * jmp_buf:
+ * rbx rsp rbp r12 r13 r14 r15 rip
+ * 0 8 16 24 32 40 48 56
+ */
+
+/*
+ * int grub_setjmp (grub_jmp_buf env)
+ */
+FUNCTION(grub_setjmp)
+ pop %rsi /* Return address, and adjust the stack */
+ xorq %rax, %rax
+ movq %rbx, 0(%rdi) /* RBX */
+ movq %rsp, 8(%rdi) /* RSP */
+ push %rsi
+ movq %rbp, 16(%rdi) /* RBP */
+ movq %r12, 24(%rdi) /* R12 */
+ movq %r13, 32(%rdi) /* R13 */
+ movq %r14, 40(%rdi) /* R14 */
+ movq %r15, 48(%rdi) /* R15 */
+ movq %rsi, 56(%rdi) /* RSI */
+ ret
+
+/*
+ * int grub_longjmp (grub_jmp_buf env, int val)
+ */
+FUNCTION(grub_longjmp)
+ movl %esi, %eax
+ orl %eax, %eax
+ jnz 1f
+ incl %eax
+1:
+
+ movq (%rdi), %rbx
+ movq 8(%rdi), %rsp
+ movq 16(%rdi), %rbp
+ movq 24(%rdi), %r12
+ movq 32(%rdi), %r13
+ movq 40(%rdi), %r14
+ movq 48(%rdi), %r15
+ jmp *56(%rdi)
diff --git a/grub-core/lib/xzembed/xz.h b/grub-core/lib/xzembed/xz.h
new file mode 100644
index 0000000..f0a7dbb
--- /dev/null
+++ b/grub-core/lib/xzembed/xz.h
@@ -0,0 +1,180 @@
+/* xz.h - XZ decompressor */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#ifndef XZ_H
+#define XZ_H
+
+#include <stdint.h>
+
+/**
+ * enum xz_ret - Return codes
+ * @XZ_OK: Everything is OK so far. More input or more output
+ * space is required to continue.
+ * @XZ_STREAM_END: Operation finished successfully.
+ * @XZ_MEMLIMIT_ERROR: Not enough memory was preallocated at decoder
+ * initialization time.
+ * @XZ_FORMAT_ERROR: File format was not recognized (wrong magic bytes).
+ * @XZ_OPTIONS_ERROR: This implementation doesn't support the requested
+ * compression options. In the decoder this means that
+ * the header CRC32 matches, but the header itself
+ * specifies something that we don't support.
+ * @XZ_DATA_ERROR: Compressed data is corrupt.
+ * @XZ_BUF_ERROR: Cannot make any progress. Details are slightly
+ * different between multi-call and single-call mode;
+ * more information below.
+ *
+ * In multi-call mode, XZ_BUF_ERROR is returned when two consecutive calls
+ * to XZ code cannot consume any input and cannot produce any new output.
+ * This happens when there is no new input available, or the output buffer
+ * is full while at least one output byte is still pending. Assuming your
+ * code is not buggy, you can get this error only when decoding a compressed
+ * stream that is truncated or otherwise corrupt.
+ *
+ * In single-call mode, XZ_BUF_ERROR is returned only when the output buffer
+ * is too small, or the compressed input is corrupt in a way that makes the
+ * decoder produce more output than the caller expected. When it is
+ * (relatively) clear that the compressed input is truncated, XZ_DATA_ERROR
+ * is used instead of XZ_BUF_ERROR.
+ */
+enum xz_ret {
+ XZ_OK,
+ XZ_STREAM_END,
+ XZ_MEMLIMIT_ERROR,
+ XZ_FORMAT_ERROR,
+ XZ_OPTIONS_ERROR,
+ XZ_DATA_ERROR,
+ XZ_BUF_ERROR
+};
+
+/**
+ * struct xz_buf - Passing input and output buffers to XZ code
+ * @in: Beginning of the input buffer. This may be NULL if and only
+ * if in_pos is equal to in_size.
+ * @in_pos: Current position in the input buffer. This must not exceed
+ * in_size.
+ * @in_size: Size of the input buffer
+ * @out: Beginning of the output buffer. This may be NULL if and only
+ * if out_pos is equal to out_size.
+ * @out_pos: Current position in the output buffer. This must not exceed
+ * out_size.
+ * @out_size: Size of the output buffer
+ *
+ * Only the contents of the output buffer from out[out_pos] onward, and
+ * the variables in_pos and out_pos are modified by the XZ code.
+ */
+struct xz_buf {
+ const uint8_t *in;
+ size_t in_pos;
+ size_t in_size;
+
+ uint8_t *out;
+ size_t out_pos;
+ size_t out_size;
+};
+
+/**
+ * struct xz_dec - Opaque type to hold the XZ decoder state
+ */
+struct xz_dec;
+
+/**
+ * xz_dec_init() - Allocate and initialize a XZ decoder state
+ * @dict_max: Maximum size of the LZMA2 dictionary (history buffer) for
+ * multi-call decoding, or special value of zero to indicate
+ * single-call decoding mode.
+ *
+ * If dict_max > 0, the decoder is initialized to work in multi-call mode.
+ * dict_max number of bytes of memory is preallocated for the LZMA2
+ * dictionary. This way there is no risk that xz_dec_run() could run out
+ * of memory, since xz_dec_run() will never allocate any memory. Instead,
+ * if the preallocated dictionary is too small for decoding the given input
+ * stream, xz_dec_run() will return XZ_MEMLIMIT_ERROR. Thus, it is important
+ * to know what kind of data will be decoded to avoid allocating excessive
+ * amount of memory for the dictionary.
+ *
+ * LZMA2 dictionary is always 2^n bytes or 2^n + 2^(n-1) bytes (the latter
+ * sizes are less common in practice). In the kernel, dictionary sizes of
+ * 64 KiB, 128 KiB, 256 KiB, 512 KiB, and 1 MiB are probably the only
+ * reasonable values.
+ *
+ * If dict_max == 0, the decoder is initialized to work in single-call mode.
+ * In single-call mode, xz_dec_run() decodes the whole stream at once. The
+ * caller must provide enough output space or the decoding will fail. The
+ * output space is used as the dictionary buffer, which is why there is
+ * no need to allocate the dictionary as part of the decoder's internal
+ * state.
+ *
+ * Because the output buffer is used as the workspace, streams encoded using
+ * a big dictionary are not a problem in single-call. It is enough that the
+ * output buffer is is big enough to hold the actual uncompressed data; it
+ * can be smaller than the dictionary size stored in the stream headers.
+ *
+ * On success, xz_dec_init() returns a pointer to struct xz_dec, which is
+ * ready to be used with xz_dec_run(). On error, xz_dec_init() returns NULL.
+ */
+struct xz_dec * xz_dec_init(uint32_t dict_max);
+
+/**
+ * xz_dec_run() - Run the XZ decoder
+ * @s: Decoder state allocated using xz_dec_init()
+ * @b: Input and output buffers
+ *
+ * In multi-call mode, this function may return any of the values listed in
+ * enum xz_ret.
+ *
+ * In single-call mode, this function never returns XZ_OK. If an error occurs
+ * in single-call mode (return value is not XZ_STREAM_END), b->in_pos and
+ * b->out_pos are not modified, and the contents of the output buffer from
+ * b->out[b->out_pos] onward are undefined.
+ *
+ * NOTE: In single-call mode, the contents of the output buffer are undefined
+ * also after XZ_BUF_ERROR. This is because with some filter chains, there
+ * may be a second pass over the output buffer, and this pass cannot be
+ * properly done if the output buffer is truncated. Thus, you cannot give
+ * the single-call decoder a too small buffer and then expect to get that
+ * amount valid data from the beginning of the stream. You must use the
+ * multi-call decoder if you don't want to uncompress the whole stream.
+ */
+enum xz_ret xz_dec_run(struct xz_dec *s, struct xz_buf *b);
+
+/**
+ * xz_dec_reset() - Reset an already allocated decoder state
+ * @s: Decoder state allocated using xz_dec_init()
+ *
+ * This function can be used to reset the multi-call decoder state without
+ * freeing and reallocating memory with xz_dec_end() and xz_dec_init().
+ *
+ * In single-call mode, xz_dec_reset() is always called in the beginning of
+ * xz_dec_run(). Thus, explicit call to xz_dec_reset() is useful only in
+ * multi-call mode.
+ */
+void xz_dec_reset(struct xz_dec *s);
+
+/**
+ * xz_dec_end() - Free the memory allocated for the decoder state
+ * @s: Decoder state allocated using xz_dec_init(). If s is NULL,
+ * this function does nothing.
+ */
+void xz_dec_end(struct xz_dec *s);
+
+#endif
diff --git a/grub-core/lib/xzembed/xz_config.h b/grub-core/lib/xzembed/xz_config.h
new file mode 100644
index 0000000..0af0d2b
--- /dev/null
+++ b/grub-core/lib/xzembed/xz_config.h
@@ -0,0 +1,141 @@
+/* xz_config.h - Private includes and definitions for userspace use */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#ifndef XZ_CONFIG_H
+#define XZ_CONFIG_H
+
+/* Enable BCJ filter decoders. */
+
+#if defined(__i386__) || defined(__x86_64__)
+ #define XZ_DEC_X86
+#endif
+
+#ifdef __powerpc__
+ #define XZ_DEC_POWERPC
+#endif
+
+#ifdef __ia64__
+ #define XZ_DEC_IA64
+#endif
+
+#ifdef __arm__
+ #define XZ_DEC_ARM
+#endif
+
+#ifdef __thumb__
+ #define XZ_DEC_ARMTHUMB
+#endif
+
+#ifdef __sparc__
+ #define XZ_DEC_SPARC
+#endif
+
+
+#include "xz.h"
+#include <stdlib.h>
+
+#define kmalloc(size, flags) malloc(size)
+#define kfree(ptr) free(ptr)
+#define vmalloc(size) malloc(size)
+#define vfree(ptr) free(ptr)
+
+#define memeq(a, b, size) (memcmp(a, b, size) == 0)
+#define memzero(buf, size) memset(buf, 0, size)
+
+#define min(x, y) ((x) < (y) ? (x) : (y))
+#define min_t(type, x, y) min(x, y)
+
+/*
+ * Some functions have been marked with __always_inline to keep the
+ * performance reasonable even when the compiler is optimizing for
+ * small code size. You may be able to save a few bytes by #defining
+ * __always_inline to plain inline, but don't complain if the code
+ * becomes slow.
+ *
+ * NOTE: System headers on GNU/Linux may #define this macro already,
+ * so if you want to change it, it you need to #undef it first.
+ */
+#ifndef __always_inline
+# ifdef __GNUC__
+# define __always_inline \
+ inline __attribute__((__always_inline__))
+# else
+# define __always_inline inline
+# endif
+#endif
+
+/*
+ * Some functions are marked to never be inlined to reduce stack usage.
+ * If you don't care about stack usage, you may want to modify this so
+ * that noinline_for_stack is #defined to be empty even when using GCC.
+ * Doing so may save a few bytes in binary size.
+ */
+#ifndef noinline_for_stack
+# ifdef __GNUC__
+# define noinline_for_stack __attribute__((__noinline__))
+# else
+# define noinline_for_stack
+# endif
+#endif
+
+/* Inline functions to access unaligned unsigned 32-bit integers */
+static inline uint32_t get_unaligned_le32(const uint8_t *buf)
+{
+ return (uint32_t)buf[0]
+ | ((uint32_t)buf[1] << 8)
+ | ((uint32_t)buf[2] << 16)
+ | ((uint32_t)buf[3] << 24);
+}
+
+static inline uint32_t get_unaligned_be32(const uint8_t *buf)
+{
+ return (uint32_t)(buf[0] << 24)
+ | ((uint32_t)buf[1] << 16)
+ | ((uint32_t)buf[2] << 8)
+ | (uint32_t)buf[3];
+}
+
+static inline void put_unaligned_le32(uint32_t val, uint8_t *buf)
+{
+ buf[0] = (uint8_t)val;
+ buf[1] = (uint8_t)(val >> 8);
+ buf[2] = (uint8_t)(val >> 16);
+ buf[3] = (uint8_t)(val >> 24);
+}
+
+static inline void put_unaligned_be32(uint32_t val, uint8_t *buf)
+{
+ buf[0] = (uint8_t)(val >> 24);
+ buf[1] = (uint8_t)(val >> 16);
+ buf[2] = (uint8_t)(val >> 8);
+ buf[3] = (uint8_t)val;
+}
+
+/*
+ * Use get_unaligned_le32() also for aligned access for simplicity. On
+ * little endian systems, #define get_le32(ptr) (*(const uint32_t *)(ptr))
+ * could save a few bytes in code size.
+ */
+#define get_le32 get_unaligned_le32
+
+#endif
diff --git a/grub-core/lib/xzembed/xz_dec_bcj.c b/grub-core/lib/xzembed/xz_dec_bcj.c
new file mode 100644
index 0000000..f517b0a
--- /dev/null
+++ b/grub-core/lib/xzembed/xz_dec_bcj.c
@@ -0,0 +1,578 @@
+/* xz_dec_bcj.c - Branch/Call/Jump (BCJ) filter decoders */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#include "xz_private.h"
+
+struct xz_dec_bcj {
+ /* Type of the BCJ filter being used */
+ enum {
+ BCJ_X86 = 4, /* x86 or x86-64 */
+ BCJ_POWERPC = 5, /* Big endian only */
+ BCJ_IA64 = 6, /* Big or little endian */
+ BCJ_ARM = 7, /* Little endian only */
+ BCJ_ARMTHUMB = 8, /* Little endian only */
+ BCJ_SPARC = 9 /* Big or little endian */
+ } type;
+
+ /*
+ * Return value of the next filter in the chain. We need to preserve
+ * this information across calls, because we must not call the next
+ * filter anymore once it has returned XZ_STREAM_END.
+ */
+ enum xz_ret ret;
+
+ /* True if we are operating in single-call mode. */
+ bool single_call;
+
+ /*
+ * Absolute position relative to the beginning of the uncompressed
+ * data (in a single .xz Block). We care only about the lowest 32
+ * bits so this doesn't need to be uint64_t even with big files.
+ */
+ uint32_t pos;
+
+ /* x86 filter state */
+ uint32_t x86_prev_mask;
+
+ /* Temporary space to hold the variables from struct xz_buf */
+ uint8_t *out;
+ size_t out_pos;
+ size_t out_size;
+
+ struct {
+ /* Amount of already filtered data in the beginning of buf */
+ size_t filtered;
+
+ /* Total amount of data currently stored in buf */
+ size_t size;
+
+ /*
+ * Buffer to hold a mix of filtered and unfiltered data. This
+ * needs to be big enough to hold Alignment + 2 * Look-ahead:
+ *
+ * Type Alignment Look-ahead
+ * x86 1 4
+ * PowerPC 4 0
+ * IA-64 16 0
+ * ARM 4 0
+ * ARM-Thumb 2 2
+ * SPARC 4 0
+ */
+ uint8_t buf[16];
+ } temp;
+};
+
+#ifdef XZ_DEC_X86
+/*
+ * This is macro used to test the most significant byte of a memory address
+ * in an x86 instruction.
+ */
+#define bcj_x86_test_msbyte(b) ((b) == 0x00 || (b) == 0xFF)
+
+static noinline_for_stack size_t bcj_x86(
+ struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ static const bool mask_to_allowed_status[8]
+ = { true, true, true, false, true, false, false, false };
+
+ static const uint8_t mask_to_bit_num[8] = { 0, 1, 2, 2, 3, 3, 3, 3 };
+
+ size_t i;
+ size_t prev_pos = (size_t)-1;
+ uint32_t prev_mask = s->x86_prev_mask;
+ uint32_t src;
+ uint32_t dest;
+ uint32_t j;
+ uint8_t b;
+
+ if (size <= 4)
+ return 0;
+
+ size -= 4;
+ for (i = 0; i < size; ++i) {
+ if ((buf[i] & 0xFE) != 0xE8)
+ continue;
+
+ prev_pos = i - prev_pos;
+ if (prev_pos > 3) {
+ prev_mask = 0;
+ } else {
+ prev_mask = (prev_mask << (prev_pos - 1)) & 7;
+ if (prev_mask != 0) {
+ b = buf[i + 4 - mask_to_bit_num[prev_mask]];
+ if (!mask_to_allowed_status[prev_mask]
+ || bcj_x86_test_msbyte(b)) {
+ prev_pos = i;
+ prev_mask = (prev_mask << 1) | 1;
+ continue;
+ }
+ }
+ }
+
+ prev_pos = i;
+
+ if (bcj_x86_test_msbyte(buf[i + 4])) {
+ src = get_unaligned_le32(buf + i + 1);
+ while (true) {
+ dest = src - (s->pos + (uint32_t)i + 5);
+ if (prev_mask == 0)
+ break;
+
+ j = mask_to_bit_num[prev_mask] * 8;
+ b = (uint8_t)(dest >> (24 - j));
+ if (!bcj_x86_test_msbyte(b))
+ break;
+
+ src = dest ^ (((uint32_t)1 << (32 - j)) - 1);
+ }
+
+ dest &= 0x01FFFFFF;
+ dest |= (uint32_t)0 - (dest & 0x01000000);
+ put_unaligned_le32(dest, buf + i + 1);
+ i += 4;
+ } else {
+ prev_mask = (prev_mask << 1) | 1;
+ }
+ }
+
+ prev_pos = i - prev_pos;
+ s->x86_prev_mask = prev_pos > 3 ? 0 : prev_mask << (prev_pos - 1);
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_POWERPC
+static noinline_for_stack size_t bcj_powerpc(
+ struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t instr;
+
+ for (i = 0; i + 4 <= size; i += 4) {
+ instr = get_unaligned_be32(buf + i);
+ if ((instr & 0xFC000003) == 0x48000001) {
+ instr &= 0x03FFFFFC;
+ instr -= s->pos + (uint32_t)i;
+ instr &= 0x03FFFFFC;
+ instr |= 0x48000001;
+ put_unaligned_be32(instr, buf + i);
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_IA64
+static noinline_for_stack size_t bcj_ia64(
+ struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ static const uint8_t branch_table[32] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 4, 6, 6, 0, 0, 7, 7,
+ 4, 4, 0, 0, 4, 4, 0, 0
+ };
+
+ /*
+ * The local variables take a little bit stack space, but it's less
+ * than what LZMA2 decoder takes, so it doesn't make sense to reduce
+ * stack usage here without doing that for the LZMA2 decoder too.
+ */
+
+ /* Loop counters */
+ size_t i;
+ size_t j;
+
+ /* Instruction slot (0, 1, or 2) in the 128-bit instruction word */
+ uint32_t slot;
+
+ /* Bitwise offset of the instruction indicated by slot */
+ uint32_t bit_pos;
+
+ /* bit_pos split into byte and bit parts */
+ uint32_t byte_pos;
+ uint32_t bit_res;
+
+ /* Address part of an instruction */
+ uint32_t addr;
+
+ /* Mask used to detect which instructions to convert */
+ uint32_t mask;
+
+ /* 41-bit instruction stored somewhere in the lowest 48 bits */
+ uint64_t instr;
+
+ /* Instruction normalized with bit_res for easier manipulation */
+ uint64_t norm;
+
+ for (i = 0; i + 16 <= size; i += 16) {
+ mask = branch_table[buf[i] & 0x1F];
+ for (slot = 0, bit_pos = 5; slot < 3; ++slot, bit_pos += 41) {
+ if (((mask >> slot) & 1) == 0)
+ continue;
+
+ byte_pos = bit_pos >> 3;
+ bit_res = bit_pos & 7;
+ instr = 0;
+ for (j = 0; j < 6; ++j)
+ instr |= (uint64_t)(buf[i + j + byte_pos])
+ << (8 * j);
+
+ norm = instr >> bit_res;
+
+ if (((norm >> 37) & 0x0F) == 0x05
+ && ((norm >> 9) & 0x07) == 0) {
+ addr = (norm >> 13) & 0x0FFFFF;
+ addr |= ((uint32_t)(norm >> 36) & 1) << 20;
+ addr <<= 4;
+ addr -= s->pos + (uint32_t)i;
+ addr >>= 4;
+
+ norm &= ~((uint64_t)0x8FFFFF << 13);
+ norm |= (uint64_t)(addr & 0x0FFFFF) << 13;
+ norm |= (uint64_t)(addr & 0x100000)
+ << (36 - 20);
+
+ instr &= (1 << bit_res) - 1;
+ instr |= norm << bit_res;
+
+ for (j = 0; j < 6; j++)
+ buf[i + j + byte_pos]
+ = (uint8_t)(instr >> (8 * j));
+ }
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_ARM
+static noinline_for_stack size_t bcj_arm(
+ struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t addr;
+
+ for (i = 0; i + 4 <= size; i += 4) {
+ if (buf[i + 3] == 0xEB) {
+ addr = (uint32_t)buf[i] | ((uint32_t)buf[i + 1] << 8)
+ | ((uint32_t)buf[i + 2] << 16);
+ addr <<= 2;
+ addr -= s->pos + (uint32_t)i + 8;
+ addr >>= 2;
+ buf[i] = (uint8_t)addr;
+ buf[i + 1] = (uint8_t)(addr >> 8);
+ buf[i + 2] = (uint8_t)(addr >> 16);
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_ARMTHUMB
+static noinline_for_stack size_t bcj_armthumb(
+ struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t addr;
+
+ for (i = 0; i + 4 <= size; i += 2) {
+ if ((buf[i + 1] & 0xF8) == 0xF0
+ && (buf[i + 3] & 0xF8) == 0xF8) {
+ addr = (((uint32_t)buf[i + 1] & 0x07) << 19)
+ | ((uint32_t)buf[i] << 11)
+ | (((uint32_t)buf[i + 3] & 0x07) << 8)
+ | (uint32_t)buf[i + 2];
+ addr <<= 1;
+ addr -= s->pos + (uint32_t)i + 4;
+ addr >>= 1;
+ buf[i + 1] = (uint8_t)(0xF0 | ((addr >> 19) & 0x07));
+ buf[i] = (uint8_t)(addr >> 11);
+ buf[i + 3] = (uint8_t)(0xF8 | ((addr >> 8) & 0x07));
+ buf[i + 2] = (uint8_t)addr;
+ i += 2;
+ }
+ }
+
+ return i;
+}
+#endif
+
+#ifdef XZ_DEC_SPARC
+static noinline_for_stack size_t bcj_sparc(
+ struct xz_dec_bcj *s, uint8_t *buf, size_t size)
+{
+ size_t i;
+ uint32_t instr;
+
+ for (i = 0; i + 4 <= size; i += 4) {
+ instr = get_unaligned_be32(buf + i);
+ if ((instr >> 22) == 0x100 || (instr >> 22) == 0x1FF) {
+ instr <<= 2;
+ instr -= s->pos + (uint32_t)i;
+ instr >>= 2;
+ instr = ((uint32_t)0x40000000 - (instr & 0x400000))
+ | 0x40000000 | (instr & 0x3FFFFF);
+ put_unaligned_be32(instr, buf + i);
+ }
+ }
+
+ return i;
+}
+#endif
+
+/*
+ * Apply the selected BCJ filter. Update *pos and s->pos to match the amount
+ * of data that got filtered.
+ *
+ * NOTE: This is implemented as a switch statement to avoid using function
+ * pointers, which could be problematic in the kernel boot code, which must
+ * avoid pointers to static data (at least on x86).
+ */
+static void bcj_apply(struct xz_dec_bcj *s,
+ uint8_t *buf, size_t *pos, size_t size)
+{
+ size_t filtered;
+
+ buf += *pos;
+ size -= *pos;
+
+ switch (s->type) {
+#ifdef XZ_DEC_X86
+ case BCJ_X86:
+ filtered = bcj_x86(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_POWERPC
+ case BCJ_POWERPC:
+ filtered = bcj_powerpc(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_IA64
+ case BCJ_IA64:
+ filtered = bcj_ia64(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_ARM
+ case BCJ_ARM:
+ filtered = bcj_arm(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_ARMTHUMB
+ case BCJ_ARMTHUMB:
+ filtered = bcj_armthumb(s, buf, size);
+ break;
+#endif
+#ifdef XZ_DEC_SPARC
+ case BCJ_SPARC:
+ filtered = bcj_sparc(s, buf, size);
+ break;
+#endif
+ default:
+ /* Never reached but silence compiler warnings. */
+ filtered = 0;
+ break;
+ }
+
+ *pos += filtered;
+ s->pos += filtered;
+}
+
+/*
+ * Flush pending filtered data from temp to the output buffer.
+ * Move the remaining mixture of possibly filtered and unfiltered
+ * data to the beginning of temp.
+ */
+static void bcj_flush(struct xz_dec_bcj *s, struct xz_buf *b)
+{
+ size_t copy_size;
+
+ copy_size = min_t(size_t, s->temp.filtered, b->out_size - b->out_pos);
+ memcpy(b->out + b->out_pos, s->temp.buf, copy_size);
+ b->out_pos += copy_size;
+
+ s->temp.filtered -= copy_size;
+ s->temp.size -= copy_size;
+ memmove(s->temp.buf, s->temp.buf + copy_size, s->temp.size);
+}
+
+/*
+ * The BCJ filter functions are primitive in sense that they process the
+ * data in chunks of 1-16 bytes. To hide this issue, this function does
+ * some buffering.
+ */
+enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s,
+ struct xz_dec_lzma2 *lzma2, struct xz_buf *b)
+{
+ size_t out_start;
+
+ /*
+ * Flush pending already filtered data to the output buffer. Return
+ * immediatelly if we couldn't flush everything, or if the next
+ * filter in the chain had already returned XZ_STREAM_END.
+ */
+ if (s->temp.filtered > 0) {
+ bcj_flush(s, b);
+ if (s->temp.filtered > 0)
+ return XZ_OK;
+
+ if (s->ret == XZ_STREAM_END)
+ return XZ_STREAM_END;
+ }
+
+ /*
+ * If we have more output space than what is currently pending in
+ * temp, copy the unfiltered data from temp to the output buffer
+ * and try to fill the output buffer by decoding more data from the
+ * next filter in the chain. Apply the BCJ filter on the new data
+ * in the output buffer. If everything cannot be filtered, copy it
+ * to temp and rewind the output buffer position accordingly.
+ */
+ if (s->temp.size < b->out_size - b->out_pos) {
+ out_start = b->out_pos;
+ memcpy(b->out + b->out_pos, s->temp.buf, s->temp.size);
+ b->out_pos += s->temp.size;
+
+ s->ret = xz_dec_lzma2_run(lzma2, b);
+ if (s->ret != XZ_STREAM_END
+ && (s->ret != XZ_OK || s->single_call))
+ return s->ret;
+
+ bcj_apply(s, b->out, &out_start, b->out_pos);
+
+ /*
+ * As an exception, if the next filter returned XZ_STREAM_END,
+ * we can do that too, since the last few bytes that remain
+ * unfiltered are meant to remain unfiltered.
+ */
+ if (s->ret == XZ_STREAM_END)
+ return XZ_STREAM_END;
+
+ s->temp.size = b->out_pos - out_start;
+ b->out_pos -= s->temp.size;
+ memcpy(s->temp.buf, b->out + b->out_pos, s->temp.size);
+ }
+
+ /*
+ * If we have unfiltered data in temp, try to fill by decoding more
+ * data from the next filter. Apply the BCJ filter on temp. Then we
+ * hopefully can fill the actual output buffer by copying filtered
+ * data from temp. A mix of filtered and unfiltered data may be left
+ * in temp; it will be taken care on the next call to this function.
+ */
+ if (s->temp.size > 0) {
+ /* Make b->out{,_pos,_size} temporarily point to s->temp. */
+ s->out = b->out;
+ s->out_pos = b->out_pos;
+ s->out_size = b->out_size;
+ b->out = s->temp.buf;
+ b->out_pos = s->temp.size;
+ b->out_size = sizeof(s->temp.buf);
+
+ s->ret = xz_dec_lzma2_run(lzma2, b);
+
+ s->temp.size = b->out_pos;
+ b->out = s->out;
+ b->out_pos = s->out_pos;
+ b->out_size = s->out_size;
+
+ if (s->ret != XZ_OK && s->ret != XZ_STREAM_END)
+ return s->ret;
+
+ bcj_apply(s, s->temp.buf, &s->temp.filtered, s->temp.size);
+
+ /*
+ * If the next filter returned XZ_STREAM_END, we mark that
+ * everything is filtered, since the last unfiltered bytes
+ * of the stream are meant to be left as is.
+ */
+ if (s->ret == XZ_STREAM_END)
+ s->temp.filtered = s->temp.size;
+
+ bcj_flush(s, b);
+ if (s->temp.filtered > 0)
+ return XZ_OK;
+ }
+
+ return s->ret;
+}
+
+#ifdef GRUB_EMBED_DECOMPRESSOR
+struct xz_dec_bcj bcj;
+#endif
+
+struct xz_dec_bcj * xz_dec_bcj_create(bool single_call)
+{
+ struct xz_dec_bcj *s;
+#ifdef GRUB_EMBED_DECOMPRESSOR
+ s = &bcj;
+#else
+ s = kmalloc(sizeof(*s), GFP_KERNEL);
+#endif
+ if (s != NULL)
+ s->single_call = single_call;
+
+ return s;
+}
+
+enum xz_ret xz_dec_bcj_reset(
+ struct xz_dec_bcj *s, uint8_t id)
+{
+ switch (id) {
+#ifdef XZ_DEC_X86
+ case BCJ_X86:
+#endif
+#ifdef XZ_DEC_POWERPC
+ case BCJ_POWERPC:
+#endif
+#ifdef XZ_DEC_IA64
+ case BCJ_IA64:
+#endif
+#ifdef XZ_DEC_ARM
+ case BCJ_ARM:
+#endif
+#ifdef XZ_DEC_ARMTHUMB
+ case BCJ_ARMTHUMB:
+#endif
+#ifdef XZ_DEC_SPARC
+ case BCJ_SPARC:
+#endif
+ break;
+
+ default:
+ /* Unsupported Filter ID */
+ return XZ_OPTIONS_ERROR;
+ }
+
+ s->type = id;
+ s->ret = XZ_OK;
+ s->pos = 0;
+ s->x86_prev_mask = 0;
+ s->temp.filtered = 0;
+ s->temp.size = 0;
+
+ return XZ_OK;
+}
diff --git a/grub-core/lib/xzembed/xz_dec_lzma2.c b/grub-core/lib/xzembed/xz_dec_lzma2.c
new file mode 100644
index 0000000..7899e9e
--- /dev/null
+++ b/grub-core/lib/xzembed/xz_dec_lzma2.c
@@ -0,0 +1,1182 @@
+/* xz_dec_lzma2.c - LZMA2 decoder */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#include "xz_private.h"
+#include "xz_lzma2.h"
+
+/*
+ * Range decoder initialization eats the first five bytes of each LZMA chunk.
+ */
+#define RC_INIT_BYTES 5
+
+/*
+ * Minimum number of usable input buffer to safely decode one LZMA symbol.
+ * The worst case is that we decode 22 bits using probabilities and 26
+ * direct bits. This may decode at maximum of 20 bytes of input. However,
+ * lzma_main() does an extra normalization before returning, thus we
+ * need to put 21 here.
+ */
+#define LZMA_IN_REQUIRED 21
+
+/*
+ * Dictionary (history buffer)
+ *
+ * These are always true:
+ * start <= pos <= full <= end
+ * pos <= limit <= end
+ *
+ * In multi-call mode, also these are true:
+ * end == size
+ * size <= allocated
+ *
+ * Most of these variables are size_t to support single-call mode,
+ * in which the dictionary variables address the actual output
+ * buffer directly.
+ */
+struct dictionary {
+ /* Beginning of the history buffer */
+ uint8_t *buf;
+
+ /* Old position in buf (before decoding more data) */
+ size_t start;
+
+ /* Position in buf */
+ size_t pos;
+
+ /*
+ * How full dictionary is. This is used to detect corrupt input that
+ * would read beyond the beginning of the uncompressed stream.
+ */
+ size_t full;
+
+ /* Write limit; we don't write to buf[limit] or later bytes. */
+ size_t limit;
+
+ /*
+ * End of the dictionary buffer. In multi-call mode, this is
+ * the same as the dictionary size. In single-call mode, this
+ * indicates the size of the output buffer.
+ */
+ size_t end;
+
+ /*
+ * Size of the dictionary as specified in Block Header. This is used
+ * together with "full" to detect corrupt input that would make us
+ * read beyond the beginning of the uncompressed stream.
+ */
+ uint32_t size;
+
+ /*
+ * Amount of memory allocated for the dictionary. A special
+ * value of zero indicates that we are in single-call mode,
+ * where the output buffer works as the dictionary.
+ */
+ uint32_t allocated;
+};
+
+/* Range decoder */
+struct rc_dec {
+ uint32_t range;
+ uint32_t code;
+
+ /*
+ * Number of initializing bytes remaining to be read
+ * by rc_read_init().
+ */
+ uint32_t init_bytes_left;
+
+ /*
+ * Buffer from which we read our input. It can be either
+ * temp.buf or the caller-provided input buffer.
+ */
+ const uint8_t *in;
+ size_t in_pos;
+ size_t in_limit;
+};
+
+/* Probabilities for a length decoder. */
+struct lzma_len_dec {
+ /* Probability of match length being at least 10 */
+ uint16_t choice;
+
+ /* Probability of match length being at least 18 */
+ uint16_t choice2;
+
+ /* Probabilities for match lengths 2-9 */
+ uint16_t low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
+
+ /* Probabilities for match lengths 10-17 */
+ uint16_t mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
+
+ /* Probabilities for match lengths 18-273 */
+ uint16_t high[LEN_HIGH_SYMBOLS];
+};
+
+struct lzma_dec {
+ /*
+ * LZMA properties or related bit masks (number of literal
+ * context bits, a mask dervied from the number of literal
+ * position bits, and a mask dervied from the number
+ * position bits)
+ */
+ uint32_t lc;
+ uint32_t literal_pos_mask; /* (1 << lp) - 1 */
+ uint32_t pos_mask; /* (1 << pb) - 1 */
+
+ /* Types of the most recently seen LZMA symbols */
+ enum lzma_state state;
+
+ /* Distances of latest four matches */
+ uint32_t rep0;
+ uint32_t rep1;
+ uint32_t rep2;
+ uint32_t rep3;
+
+ /*
+ * Length of a match. This is updated so that dict_repeat can
+ * be called again to finish repeating the whole match.
+ */
+ uint32_t len;
+
+ /* If 1, it's a match. Otherwise it's a single 8-bit literal. */
+ uint16_t is_match[STATES][POS_STATES_MAX];
+
+ /* If 1, it's a repeated match. The distance is one of rep0 .. rep3. */
+ uint16_t is_rep[STATES];
+
+ /*
+ * If 0, distance of a repeated match is rep0.
+ * Otherwise check is_rep1.
+ */
+ uint16_t is_rep0[STATES];
+
+ /*
+ * If 0, distance of a repeated match is rep1.
+ * Otherwise check is_rep2.
+ */
+ uint16_t is_rep1[STATES];
+
+ /* If 0, distance of a repeated match is rep2. Otherwise it is rep3. */
+ uint16_t is_rep2[STATES];
+
+ /*
+ * If 1, the repeated match has length of one byte. Otherwise
+ * the length is decoded from rep_len_decoder.
+ */
+ uint16_t is_rep0_long[STATES][POS_STATES_MAX];
+
+ /*
+ * Probability tree for the highest two bits of the match
+ * distance. There is a separate probability tree for match
+ * lengths of 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
+ */
+ uint16_t dist_slot[DIST_STATES][DIST_SLOTS];
+
+ /*
+ * Probility trees for additional bits for match distance
+ * when the distance is in the range [4, 127].
+ */
+ uint16_t dist_special[FULL_DISTANCES - DIST_MODEL_END];
+
+ /*
+ * Probability tree for the lowest four bits of a match
+ * distance that is equal to or greater than 128.
+ */
+ uint16_t dist_align[ALIGN_SIZE];
+
+ /* Length of a normal match */
+ struct lzma_len_dec match_len_dec;
+
+ /* Length of a repeated match */
+ struct lzma_len_dec rep_len_dec;
+
+ /* Probabilities of literals */
+ uint16_t literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
+};
+
+struct xz_dec_lzma2 {
+ /* LZMA2 */
+ struct {
+ /* Position in xz_dec_lzma2_run(). */
+ enum lzma2_seq {
+ SEQ_CONTROL,
+ SEQ_UNCOMPRESSED_1,
+ SEQ_UNCOMPRESSED_2,
+ SEQ_COMPRESSED_0,
+ SEQ_COMPRESSED_1,
+ SEQ_PROPERTIES,
+ SEQ_LZMA_PREPARE,
+ SEQ_LZMA_RUN,
+ SEQ_COPY
+ } sequence;
+
+ /*
+ * Next position after decoding the compressed size of
+ * the chunk.
+ */
+ enum lzma2_seq next_sequence;
+
+ /* Uncompressed size of LZMA chunk (2 MiB at maximum) */
+ uint32_t uncompressed;
+
+ /*
+ * Compressed size of LZMA chunk or compressed/uncompressed
+ * size of uncompressed chunk (64 KiB at maximum)
+ */
+ uint32_t compressed;
+
+ /*
+ * True if dictionary reset is needed. This is false before
+ * the first chunk (LZMA or uncompressed).
+ */
+ bool need_dict_reset;
+
+ /*
+ * True if new LZMA properties are needed. This is false
+ * before the first LZMA chunk.
+ */
+ bool need_props;
+ } lzma2;
+
+ /*
+ * Temporary buffer which holds small number of input bytes between
+ * decoder calls. See lzma2_lzma() for details.
+ */
+ struct {
+ uint32_t size;
+ uint8_t buf[3 * LZMA_IN_REQUIRED];
+ } temp;
+
+ struct dictionary dict;
+ struct rc_dec rc;
+ struct lzma_dec lzma;
+};
+
+/**************
+ * Dictionary *
+ **************/
+
+/*
+ * Reset the dictionary state. When in single-call mode, set up the beginning
+ * of the dictionary to point to the actual output buffer.
+ */
+static void dict_reset(struct dictionary *dict, struct xz_buf *b)
+{
+ if (dict->allocated == 0) {
+ dict->buf = b->out + b->out_pos;
+ dict->end = b->out_size - b->out_pos;
+ }
+ dict->start = 0;
+ dict->pos = 0;
+ dict->limit = 0;
+ dict->full = 0;
+}
+
+/* Set dictionary write limit */
+static void dict_limit(struct dictionary *dict, size_t out_max)
+{
+ if (dict->end - dict->pos <= out_max)
+ dict->limit = dict->end;
+ else
+ dict->limit = dict->pos + out_max;
+}
+
+/* Return true if at least one byte can be written into the dictionary. */
+static inline bool dict_has_space(const struct dictionary *dict)
+{
+ return dict->pos < dict->limit;
+}
+
+/*
+ * Get a byte from the dictionary at the given distance. The distance is
+ * assumed to valid, or as a special case, zero when the dictionary is
+ * still empty. This special case is needed for single-call decoding to
+ * avoid writing a '\0' to the end of the destination buffer.
+ */
+static inline uint32_t dict_get(
+ const struct dictionary *dict, uint32_t dist)
+{
+ size_t offset = dict->pos - dist - 1;
+
+ if (dist >= dict->pos)
+ offset += dict->end;
+
+ return dict->full > 0 ? dict->buf[offset] : 0;
+}
+
+/*
+ * Put one byte into the dictionary. It is assumed that there is space for it.
+ */
+static inline void dict_put(struct dictionary *dict, uint8_t byte)
+{
+ dict->buf[dict->pos++] = byte;
+
+ if (dict->full < dict->pos)
+ dict->full = dict->pos;
+}
+
+/*
+ * Repeat given number of bytes from the given distance. If the distance is
+ * invalid, false is returned. On success, true is returned and *len is
+ * updated to indicate how many bytes were left to be repeated.
+ */
+static bool dict_repeat(
+ struct dictionary *dict, uint32_t *len, uint32_t dist)
+{
+ size_t back;
+ uint32_t left;
+
+ if (dist >= dict->full || dist >= dict->size)
+ return false;
+
+ left = min_t(size_t, dict->limit - dict->pos, *len);
+ *len -= left;
+
+ back = dict->pos - dist - 1;
+ if (dist >= dict->pos)
+ back += dict->end;
+
+ do {
+ dict->buf[dict->pos++] = dict->buf[back++];
+ if (back == dict->end)
+ back = 0;
+ } while (--left > 0);
+
+ if (dict->full < dict->pos)
+ dict->full = dict->pos;
+
+ return true;
+}
+
+/* Copy uncompressed data as is from input to dictionary and output buffers. */
+static void dict_uncompressed(
+ struct dictionary *dict, struct xz_buf *b, uint32_t *left)
+{
+ size_t copy_size;
+
+ while (*left > 0 && b->in_pos < b->in_size
+ && b->out_pos < b->out_size) {
+ copy_size = min(b->in_size - b->in_pos,
+ b->out_size - b->out_pos);
+ if (copy_size > dict->end - dict->pos)
+ copy_size = dict->end - dict->pos;
+ if (copy_size > *left)
+ copy_size = *left;
+
+ *left -= copy_size;
+
+ memcpy(dict->buf + dict->pos, b->in + b->in_pos, copy_size);
+ dict->pos += copy_size;
+
+ if (dict->full < dict->pos)
+ dict->full = dict->pos;
+
+ if (dict->allocated != 0) {
+ if (dict->pos == dict->end)
+ dict->pos = 0;
+
+ memcpy(b->out + b->out_pos, b->in + b->in_pos,
+ copy_size);
+ }
+
+ dict->start = dict->pos;
+
+ b->out_pos += copy_size;
+ b->in_pos += copy_size;
+
+ }
+}
+
+/*
+ * Flush pending data from dictionary to b->out. It is assumed that there is
+ * enough space in b->out. This is guaranteed because caller uses dict_limit()
+ * before decoding data into the dictionary.
+ */
+static uint32_t dict_flush(struct dictionary *dict, struct xz_buf *b)
+{
+ size_t copy_size = dict->pos - dict->start;
+
+ if (dict->allocated != 0) {
+ if (dict->pos == dict->end)
+ dict->pos = 0;
+
+ memcpy(b->out + b->out_pos, dict->buf + dict->start,
+ copy_size);
+ }
+
+ dict->start = dict->pos;
+ b->out_pos += copy_size;
+ return copy_size;
+}
+
+/*****************
+ * Range decoder *
+ *****************/
+
+/* Reset the range decoder. */
+static void rc_reset(struct rc_dec *rc)
+{
+ rc->range = (uint32_t)-1;
+ rc->code = 0;
+ rc->init_bytes_left = RC_INIT_BYTES;
+}
+
+/*
+ * Read the first five initial bytes into rc->code if they haven't been
+ * read already. (Yes, the first byte gets completely ignored.)
+ */
+static bool rc_read_init(struct rc_dec *rc, struct xz_buf *b)
+{
+ while (rc->init_bytes_left > 0) {
+ if (b->in_pos == b->in_size)
+ return false;
+
+ rc->code = (rc->code << 8) + b->in[b->in_pos++];
+ --rc->init_bytes_left;
+ }
+
+ return true;
+}
+
+/* Return true if there may not be enough input for the next decoding loop. */
+static inline bool rc_limit_exceeded(const struct rc_dec *rc)
+{
+ return rc->in_pos > rc->in_limit;
+}
+
+/*
+ * Return true if it is possible (from point of view of range decoder) that
+ * we have reached the end of the LZMA chunk.
+ */
+static inline bool rc_is_finished(const struct rc_dec *rc)
+{
+ return rc->code == 0;
+}
+
+/* Read the next input byte if needed. */
+static __always_inline void rc_normalize(struct rc_dec *rc)
+{
+ if (rc->range < RC_TOP_VALUE) {
+ rc->range <<= RC_SHIFT_BITS;
+ rc->code = (rc->code << RC_SHIFT_BITS) + rc->in[rc->in_pos++];
+ }
+}
+
+/*
+ * Decode one bit. In some versions, this function has been splitted in three
+ * functions so that the compiler is supposed to be able to more easily avoid
+ * an extra branch. In this particular version of the LZMA decoder, this
+ * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3
+ * on x86). Using a non-splitted version results in nicer looking code too.
+ *
+ * NOTE: This must return an int. Do not make it return a bool or the speed
+ * of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,
+ * and it generates 10-20 % faster code than GCC 3.x from this file anyway.)
+ */
+static __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)
+{
+ uint32_t bound;
+ int bit;
+
+ rc_normalize(rc);
+ bound = (rc->range >> RC_BIT_MODEL_TOTAL_BITS) * *prob;
+ if (rc->code < bound) {
+ rc->range = bound;
+ *prob += (RC_BIT_MODEL_TOTAL - *prob) >> RC_MOVE_BITS;
+ bit = 0;
+ } else {
+ rc->range -= bound;
+ rc->code -= bound;
+ *prob -= *prob >> RC_MOVE_BITS;
+ bit = 1;
+ }
+
+ return bit;
+}
+
+/* Decode a bittree starting from the most significant bit. */
+static __always_inline uint32_t rc_bittree(
+ struct rc_dec *rc, uint16_t *probs, uint32_t limit)
+{
+ uint32_t symbol = 1;
+
+ do {
+ if (rc_bit(rc, &probs[symbol]))
+ symbol = (symbol << 1) + 1;
+ else
+ symbol <<= 1;
+ } while (symbol < limit);
+
+ return symbol;
+}
+
+/* Decode a bittree starting from the least significant bit. */
+static __always_inline void rc_bittree_reverse(struct rc_dec *rc,
+ uint16_t *probs, uint32_t *dest, uint32_t limit)
+{
+ uint32_t symbol = 1;
+ uint32_t i = 0;
+
+ do {
+ if (rc_bit(rc, &probs[symbol])) {
+ symbol = (symbol << 1) + 1;
+ *dest += 1 << i;
+ } else {
+ symbol <<= 1;
+ }
+ } while (++i < limit);
+}
+
+/* Decode direct bits (fixed fifty-fifty probability) */
+static inline void rc_direct(
+ struct rc_dec *rc, uint32_t *dest, uint32_t limit)
+{
+ uint32_t mask;
+
+ do {
+ rc_normalize(rc);
+ rc->range >>= 1;
+ rc->code -= rc->range;
+ mask = (uint32_t)0 - (rc->code >> 31);
+ rc->code += rc->range & mask;
+ *dest = (*dest << 1) + (mask + 1);
+ } while (--limit > 0);
+}
+
+/********
+ * LZMA *
+ ********/
+
+/* Get pointer to literal coder probability array. */
+static uint16_t * lzma_literal_probs(struct xz_dec_lzma2 *s)
+{
+ uint32_t prev_byte = dict_get(&s->dict, 0);
+ uint32_t low = prev_byte >> (8 - s->lzma.lc);
+ uint32_t high = (s->dict.pos & s->lzma.literal_pos_mask) << s->lzma.lc;
+ return s->lzma.literal[low + high];
+}
+
+/* Decode a literal (one 8-bit byte) */
+static void lzma_literal(struct xz_dec_lzma2 *s)
+{
+ uint16_t *probs;
+ uint32_t symbol;
+ uint32_t match_byte;
+ uint32_t match_bit;
+ uint32_t offset;
+ uint32_t i;
+
+ probs = lzma_literal_probs(s);
+
+ if (lzma_state_is_literal(s->lzma.state)) {
+ symbol = rc_bittree(&s->rc, probs, 0x100);
+ } else {
+ symbol = 1;
+ match_byte = dict_get(&s->dict, s->lzma.rep0) << 1;
+ offset = 0x100;
+
+ do {
+ match_bit = match_byte & offset;
+ match_byte <<= 1;
+ i = offset + match_bit + symbol;
+
+ if (rc_bit(&s->rc, &probs[i])) {
+ symbol = (symbol << 1) + 1;
+ offset &= match_bit;
+ } else {
+ symbol <<= 1;
+ offset &= ~match_bit;
+ }
+ } while (symbol < 0x100);
+ }
+
+ dict_put(&s->dict, (uint8_t)symbol);
+ lzma_state_literal(&s->lzma.state);
+}
+
+/* Decode the length of the match into s->lzma.len. */
+static void lzma_len(struct xz_dec_lzma2 *s, struct lzma_len_dec *l,
+ uint32_t pos_state)
+{
+ uint16_t *probs;
+ uint32_t limit;
+
+ if (!rc_bit(&s->rc, &l->choice)) {
+ probs = l->low[pos_state];
+ limit = LEN_LOW_SYMBOLS;
+ s->lzma.len = MATCH_LEN_MIN;
+ } else {
+ if (!rc_bit(&s->rc, &l->choice2)) {
+ probs = l->mid[pos_state];
+ limit = LEN_MID_SYMBOLS;
+ s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS;
+ } else {
+ probs = l->high;
+ limit = LEN_HIGH_SYMBOLS;
+ s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS
+ + LEN_MID_SYMBOLS;
+ }
+ }
+
+ s->lzma.len += rc_bittree(&s->rc, probs, limit) - limit;
+}
+
+/* Decode a match. The distance will be stored in s->lzma.rep0. */
+static void lzma_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
+{
+ uint16_t *probs;
+ uint32_t dist_slot;
+ uint32_t limit;
+
+ lzma_state_match(&s->lzma.state);
+
+ s->lzma.rep3 = s->lzma.rep2;
+ s->lzma.rep2 = s->lzma.rep1;
+ s->lzma.rep1 = s->lzma.rep0;
+
+ lzma_len(s, &s->lzma.match_len_dec, pos_state);
+
+ probs = s->lzma.dist_slot[lzma_get_dist_state(s->lzma.len)];
+ dist_slot = rc_bittree(&s->rc, probs, DIST_SLOTS) - DIST_SLOTS;
+
+ if (dist_slot < DIST_MODEL_START) {
+ s->lzma.rep0 = dist_slot;
+ } else {
+ limit = (dist_slot >> 1) - 1;
+ s->lzma.rep0 = 2 + (dist_slot & 1);
+
+ if (dist_slot < DIST_MODEL_END) {
+ s->lzma.rep0 <<= limit;
+ probs = s->lzma.dist_special + s->lzma.rep0
+ - dist_slot - 1;
+ rc_bittree_reverse(&s->rc, probs,
+ &s->lzma.rep0, limit);
+ } else {
+ rc_direct(&s->rc, &s->lzma.rep0, limit - ALIGN_BITS);
+ s->lzma.rep0 <<= ALIGN_BITS;
+ rc_bittree_reverse(&s->rc, s->lzma.dist_align,
+ &s->lzma.rep0, ALIGN_BITS);
+ }
+ }
+}
+
+/*
+ * Decode a repeated match. The distance is one of the four most recently
+ * seen matches. The distance will be stored in s->lzma.rep0.
+ */
+static void lzma_rep_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
+{
+ uint32_t tmp;
+
+ if (!rc_bit(&s->rc, &s->lzma.is_rep0[s->lzma.state])) {
+ if (!rc_bit(&s->rc, &s->lzma.is_rep0_long[
+ s->lzma.state][pos_state])) {
+ lzma_state_short_rep(&s->lzma.state);
+ s->lzma.len = 1;
+ return;
+ }
+ } else {
+ if (!rc_bit(&s->rc, &s->lzma.is_rep1[s->lzma.state])) {
+ tmp = s->lzma.rep1;
+ } else {
+ if (!rc_bit(&s->rc, &s->lzma.is_rep2[s->lzma.state])) {
+ tmp = s->lzma.rep2;
+ } else {
+ tmp = s->lzma.rep3;
+ s->lzma.rep3 = s->lzma.rep2;
+ }
+
+ s->lzma.rep2 = s->lzma.rep1;
+ }
+
+ s->lzma.rep1 = s->lzma.rep0;
+ s->lzma.rep0 = tmp;
+ }
+
+ lzma_state_long_rep(&s->lzma.state);
+ lzma_len(s, &s->lzma.rep_len_dec, pos_state);
+}
+
+/* LZMA decoder core */
+static bool lzma_main(struct xz_dec_lzma2 *s)
+{
+ uint32_t pos_state;
+
+ /*
+ * If the dictionary was reached during the previous call, try to
+ * finish the possibly pending repeat in the dictionary.
+ */
+ if (dict_has_space(&s->dict) && s->lzma.len > 0)
+ dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0);
+
+ /*
+ * Decode more LZMA symbols. One iteration may consume up to
+ * LZMA_IN_REQUIRED - 1 bytes.
+ */
+ while (dict_has_space(&s->dict) && !rc_limit_exceeded(&s->rc)) {
+ pos_state = s->dict.pos & s->lzma.pos_mask;
+
+ if (!rc_bit(&s->rc, &s->lzma.is_match[
+ s->lzma.state][pos_state])) {
+ lzma_literal(s);
+ } else {
+ if (rc_bit(&s->rc, &s->lzma.is_rep[s->lzma.state]))
+ lzma_rep_match(s, pos_state);
+ else
+ lzma_match(s, pos_state);
+
+ if (!dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0))
+ return false;
+ }
+ }
+
+ /*
+ * Having the range decoder always normalized when we are outside
+ * this function makes it easier to correctly handle end of the chunk.
+ */
+ rc_normalize(&s->rc);
+
+ return true;
+}
+
+/*
+ * Reset the LZMA decoder and range decoder state. Dictionary is nore reset
+ * here, because LZMA state may be reset without resetting the dictionary.
+ */
+static void lzma_reset(struct xz_dec_lzma2 *s)
+{
+ uint16_t *probs;
+ size_t i;
+
+ s->lzma.state = STATE_LIT_LIT;
+ s->lzma.rep0 = 0;
+ s->lzma.rep1 = 0;
+ s->lzma.rep2 = 0;
+ s->lzma.rep3 = 0;
+
+ /*
+ * All probabilities are initialized to the same value. This hack
+ * makes the code smaller by avoiding a separate loop for each
+ * probability array.
+ *
+ * This could be optimized so that only that part of literal
+ * probabilities that are actually required. In the common case
+ * we would write 12 KiB less.
+ */
+ probs = s->lzma.is_match[0];
+ for (i = 0; i < PROBS_TOTAL; ++i)
+ probs[i] = RC_BIT_MODEL_TOTAL / 2;
+
+ rc_reset(&s->rc);
+}
+
+/*
+ * Decode and validate LZMA properties (lc/lp/pb) and calculate the bit masks
+ * from the decoded lp and pb values. On success, the LZMA decoder state is
+ * reset and true is returned.
+ */
+static bool lzma_props(struct xz_dec_lzma2 *s, uint8_t props)
+{
+ if (props > (4 * 5 + 4) * 9 + 8)
+ return false;
+
+ s->lzma.pos_mask = 0;
+ while (props >= 9 * 5) {
+ props -= 9 * 5;
+ ++s->lzma.pos_mask;
+ }
+
+ s->lzma.pos_mask = (1 << s->lzma.pos_mask) - 1;
+
+ s->lzma.literal_pos_mask = 0;
+ while (props >= 9) {
+ props -= 9;
+ ++s->lzma.literal_pos_mask;
+ }
+
+ s->lzma.lc = props;
+
+ if (s->lzma.lc + s->lzma.literal_pos_mask > 4)
+ return false;
+
+ s->lzma.literal_pos_mask = (1 << s->lzma.literal_pos_mask) - 1;
+
+ lzma_reset(s);
+
+ return true;
+}
+
+/*********
+ * LZMA2 *
+ *********/
+
+/*
+ * The LZMA decoder assumes that if the input limit (s->rc.in_limit) hasn't
+ * been exceeded, it is safe to read up to LZMA_IN_REQUIRED bytes. This
+ * wrapper function takes care of making the LZMA decoder's assumption safe.
+ *
+ * As long as there is plenty of input left to be decoded in the current LZMA
+ * chunk, we decode directly from the caller-supplied input buffer until
+ * there's LZMA_IN_REQUIRED bytes left. Those remaining bytes are copied into
+ * s->temp.buf, which (hopefully) gets filled on the next call to this
+ * function. We decode a few bytes from the temporary buffer so that we can
+ * continue decoding from the caller-supplied input buffer again.
+ */
+static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
+{
+ size_t in_avail;
+ uint32_t tmp;
+
+ in_avail = b->in_size - b->in_pos;
+ if (s->temp.size > 0 || s->lzma2.compressed == 0) {
+ tmp = 2 * LZMA_IN_REQUIRED - s->temp.size;
+ if (tmp > s->lzma2.compressed - s->temp.size)
+ tmp = s->lzma2.compressed - s->temp.size;
+ if (tmp > in_avail)
+ tmp = in_avail;
+
+ memcpy(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp);
+
+ if (s->temp.size + tmp == s->lzma2.compressed) {
+ memzero(s->temp.buf + s->temp.size + tmp,
+ sizeof(s->temp.buf)
+ - s->temp.size - tmp);
+ s->rc.in_limit = s->temp.size + tmp;
+ } else if (s->temp.size + tmp < LZMA_IN_REQUIRED) {
+ s->temp.size += tmp;
+ b->in_pos += tmp;
+ return true;
+ } else {
+ s->rc.in_limit = s->temp.size + tmp - LZMA_IN_REQUIRED;
+ }
+
+ s->rc.in = s->temp.buf;
+ s->rc.in_pos = 0;
+
+ if (!lzma_main(s) || s->rc.in_pos > s->temp.size + tmp)
+ return false;
+
+ s->lzma2.compressed -= s->rc.in_pos;
+
+ if (s->rc.in_pos < s->temp.size) {
+ s->temp.size -= s->rc.in_pos;
+ memmove(s->temp.buf, s->temp.buf + s->rc.in_pos,
+ s->temp.size);
+ return true;
+ }
+
+ b->in_pos += s->rc.in_pos - s->temp.size;
+ s->temp.size = 0;
+ }
+
+ in_avail = b->in_size - b->in_pos;
+ if (in_avail >= LZMA_IN_REQUIRED) {
+ s->rc.in = b->in;
+ s->rc.in_pos = b->in_pos;
+
+ if (in_avail >= s->lzma2.compressed + LZMA_IN_REQUIRED)
+ s->rc.in_limit = b->in_pos + s->lzma2.compressed;
+ else
+ s->rc.in_limit = b->in_size - LZMA_IN_REQUIRED;
+
+ if (!lzma_main(s))
+ return false;
+
+ in_avail = s->rc.in_pos - b->in_pos;
+ if (in_avail > s->lzma2.compressed)
+ return false;
+
+ s->lzma2.compressed -= in_avail;
+ b->in_pos = s->rc.in_pos;
+ }
+
+ in_avail = b->in_size - b->in_pos;
+ if (in_avail < LZMA_IN_REQUIRED) {
+ if (in_avail > s->lzma2.compressed)
+ in_avail = s->lzma2.compressed;
+
+ memcpy(s->temp.buf, b->in + b->in_pos, in_avail);
+ s->temp.size = in_avail;
+ b->in_pos += in_avail;
+ }
+
+ return true;
+}
+
+/*
+ * Take care of the LZMA2 control layer, and forward the job of actual LZMA
+ * decoding or copying of uncompressed chunks to other functions.
+ */
+enum xz_ret xz_dec_lzma2_run(
+ struct xz_dec_lzma2 *s, struct xz_buf *b)
+{
+ uint32_t tmp;
+
+ while (b->in_pos < b->in_size || s->lzma2.sequence == SEQ_LZMA_RUN) {
+ switch (s->lzma2.sequence) {
+ case SEQ_CONTROL:
+ /*
+ * LZMA2 control byte
+ *
+ * Exact values:
+ * 0x00 End marker
+ * 0x01 Dictionary reset followed by
+ * an uncompressed chunk
+ * 0x02 Uncompressed chunk (no dictionary reset)
+ *
+ * Highest three bits (s->control & 0xE0):
+ * 0xE0 Dictionary reset, new properties and state
+ * reset, followed by LZMA compressed chunk
+ * 0xC0 New properties and state reset, followed
+ * by LZMA compressed chunk (no dictionary
+ * reset)
+ * 0xA0 State reset using old properties,
+ * followed by LZMA compressed chunk (no
+ * dictionary reset)
+ * 0x80 LZMA chunk (no dictionary or state reset)
+ *
+ * For LZMA compressed chunks, the lowest five bits
+ * (s->control & 1F) are the highest bits of the
+ * uncompressed size (bits 16-20).
+ *
+ * A new LZMA2 stream must begin with a dictionary
+ * reset. The first LZMA chunk must set new
+ * properties and reset the LZMA state.
+ *
+ * Values that don't match anything described above
+ * are invalid and we return XZ_DATA_ERROR.
+ */
+ tmp = b->in[b->in_pos++];
+
+ if (tmp >= 0xE0 || tmp == 0x01) {
+ s->lzma2.need_props = true;
+ s->lzma2.need_dict_reset = false;
+ dict_reset(&s->dict, b);
+ } else if (s->lzma2.need_dict_reset) {
+ return XZ_DATA_ERROR;
+ }
+
+ if (tmp >= 0x80) {
+ s->lzma2.uncompressed = (tmp & 0x1F) << 16;
+ s->lzma2.sequence = SEQ_UNCOMPRESSED_1;
+
+ if (tmp >= 0xC0) {
+ /*
+ * When there are new properties,
+ * state reset is done at
+ * SEQ_PROPERTIES.
+ */
+ s->lzma2.need_props = false;
+ s->lzma2.next_sequence
+ = SEQ_PROPERTIES;
+
+ } else if (s->lzma2.need_props) {
+ return XZ_DATA_ERROR;
+
+ } else {
+ s->lzma2.next_sequence
+ = SEQ_LZMA_PREPARE;
+ if (tmp >= 0xA0)
+ lzma_reset(s);
+ }
+ } else {
+ if (tmp == 0x00)
+ return XZ_STREAM_END;
+
+ if (tmp > 0x02)
+ return XZ_DATA_ERROR;
+
+ s->lzma2.sequence = SEQ_COMPRESSED_0;
+ s->lzma2.next_sequence = SEQ_COPY;
+ }
+
+ break;
+
+ case SEQ_UNCOMPRESSED_1:
+ s->lzma2.uncompressed
+ += (uint32_t)b->in[b->in_pos++] << 8;
+ s->lzma2.sequence = SEQ_UNCOMPRESSED_2;
+ break;
+
+ case SEQ_UNCOMPRESSED_2:
+ s->lzma2.uncompressed
+ += (uint32_t)b->in[b->in_pos++] + 1;
+ s->lzma2.sequence = SEQ_COMPRESSED_0;
+ break;
+
+ case SEQ_COMPRESSED_0:
+ s->lzma2.compressed
+ = (uint32_t)b->in[b->in_pos++] << 8;
+ s->lzma2.sequence = SEQ_COMPRESSED_1;
+ break;
+
+ case SEQ_COMPRESSED_1:
+ s->lzma2.compressed
+ += (uint32_t)b->in[b->in_pos++] + 1;
+ s->lzma2.sequence = s->lzma2.next_sequence;
+ break;
+
+ case SEQ_PROPERTIES:
+ if (!lzma_props(s, b->in[b->in_pos++]))
+ return XZ_DATA_ERROR;
+
+ s->lzma2.sequence = SEQ_LZMA_PREPARE;
+
+ case SEQ_LZMA_PREPARE:
+ if (s->lzma2.compressed < RC_INIT_BYTES)
+ return XZ_DATA_ERROR;
+
+ if (!rc_read_init(&s->rc, b))
+ return XZ_OK;
+
+ s->lzma2.compressed -= RC_INIT_BYTES;
+ s->lzma2.sequence = SEQ_LZMA_RUN;
+
+ case SEQ_LZMA_RUN:
+ /*
+ * Set dictionary limit to indicate how much we want
+ * to be encoded at maximum. Decode new data into the
+ * dictionary. Flush the new data from dictionary to
+ * b->out. Check if we finished decoding this chunk.
+ * In case the dictionary got full but we didn't fill
+ * the output buffer yet, we may run this loop
+ * multiple times without changing s->lzma2.sequence.
+ */
+ dict_limit(&s->dict, min_t(size_t,
+ b->out_size - b->out_pos,
+ s->lzma2.uncompressed));
+ if (!lzma2_lzma(s, b))
+ return XZ_DATA_ERROR;
+
+ s->lzma2.uncompressed -= dict_flush(&s->dict, b);
+
+ if (s->lzma2.uncompressed == 0) {
+ if (s->lzma2.compressed > 0 || s->lzma.len > 0
+ || !rc_is_finished(&s->rc))
+ return XZ_DATA_ERROR;
+
+ rc_reset(&s->rc);
+ s->lzma2.sequence = SEQ_CONTROL;
+
+ } else if (b->out_pos == b->out_size
+ || (b->in_pos == b->in_size
+ && s->temp.size
+ < s->lzma2.compressed)) {
+ return XZ_OK;
+ }
+
+ break;
+
+ case SEQ_COPY:
+ dict_uncompressed(&s->dict, b, &s->lzma2.compressed);
+ if (s->lzma2.compressed > 0)
+ return XZ_OK;
+
+ s->lzma2.sequence = SEQ_CONTROL;
+ break;
+ }
+ }
+
+ return XZ_OK;
+}
+
+#ifdef GRUB_EMBED_DECOMPRESSOR
+#include <grub/decompressor.h>
+static struct xz_dec_lzma2 lzma2;
+#endif
+
+struct xz_dec_lzma2 * xz_dec_lzma2_create(uint32_t dict_max)
+{
+ struct xz_dec_lzma2 *s;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ /* Maximum supported dictionary by this implementation is 3 GiB. */
+ if (dict_max > ((uint32_t)3 << 30))
+ return NULL;
+
+ s = kmalloc(sizeof(*s), GFP_KERNEL);
+ if (s == NULL)
+ return NULL;
+
+ if (dict_max > 0) {
+ s->dict.buf = vmalloc(dict_max);
+ if (s->dict.buf == NULL) {
+ kfree(s);
+ return NULL;
+ }
+ }
+
+#else
+ s = &lzma2;
+ s->dict.buf = grub_decompressor_scratch;
+#endif
+
+ s->dict.allocated = dict_max;
+
+ return s;
+}
+
+enum xz_ret xz_dec_lzma2_reset(
+ struct xz_dec_lzma2 *s, uint8_t props)
+{
+ /* This limits dictionary size to 3 GiB (39) to keep parsing simpler. */
+ if (props > ( min (DICT_BIT_SIZE,39)) )
+ return XZ_OPTIONS_ERROR;
+
+ s->dict.size = 2 + (props & 1);
+ s->dict.size <<= (props >> 1) + 11;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ if (s->dict.allocated > 0 && s->dict.allocated < s->dict.size)
+ {
+ /* enlarge dictionary buffer */
+ uint8_t * newdict = realloc(s->dict.buf,s->dict.size);
+
+ if (! newdict)
+ return XZ_MEMLIMIT_ERROR;
+
+ s->dict.buf = newdict;
+ s->dict.allocated = s->dict.size;
+ }
+#endif
+ s->dict.end = s->dict.size;
+
+ s->lzma.len = 0;
+
+ s->lzma2.sequence = SEQ_CONTROL;
+ s->lzma2.need_dict_reset = true;
+
+ s->temp.size = 0;
+
+ return XZ_OK;
+}
+
+void xz_dec_lzma2_end(struct xz_dec_lzma2 *s __attribute__ ((unused)))
+{
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ if (s->dict.allocated > 0)
+ vfree(s->dict.buf);
+
+ kfree(s);
+#endif
+}
diff --git a/grub-core/lib/xzembed/xz_dec_stream.c b/grub-core/lib/xzembed/xz_dec_stream.c
new file mode 100644
index 0000000..3bf201d
--- /dev/null
+++ b/grub-core/lib/xzembed/xz_dec_stream.c
@@ -0,0 +1,919 @@
+/* xz_dec_stream.c - .xz Stream decoder */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#include "xz_config.h"
+#include "xz_private.h"
+#include "xz_stream.h"
+
+#include <grub/crypto.h>
+
+/* Hash used to validate the Index field */
+struct xz_dec_hash {
+ vli_type unpadded;
+ vli_type uncompressed;
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ uint8_t *crc32_context;
+#endif
+};
+
+struct xz_dec {
+ /* Position in dec_main() */
+ enum {
+ SEQ_STREAM_HEADER,
+ SEQ_BLOCK_START,
+ SEQ_BLOCK_HEADER,
+ SEQ_BLOCK_UNCOMPRESS,
+ SEQ_BLOCK_PADDING,
+ SEQ_BLOCK_CHECK,
+ SEQ_INDEX,
+ SEQ_INDEX_PADDING,
+ SEQ_INDEX_CRC32,
+ SEQ_STREAM_FOOTER
+ } sequence;
+
+ /* Position in variable-length integers and Check fields */
+ uint32_t pos;
+
+ /* Variable-length integer decoded by dec_vli() */
+ vli_type vli;
+
+ /* Saved in_pos and out_pos */
+ size_t in_start;
+ size_t out_start;
+
+ /* CRC32 value in Block or Index */
+ uint32_t crc32_temp; /* need for crc32_validate*/
+ uint8_t *crc32_context;
+
+ /* True if CRC32 is calculated from uncompressed data */
+ bool has_crc32;
+
+ /* True if we are operating in single-call mode. */
+ bool single_call;
+
+ /*
+ * True if the next call to xz_dec_run() is allowed to return
+ * XZ_BUF_ERROR.
+ */
+ bool allow_buf_error;
+
+ /* Information stored in Block Header */
+ struct {
+ /*
+ * Value stored in the Compressed Size field, or
+ * VLI_UNKNOWN if Compressed Size is not present.
+ */
+ vli_type compressed;
+
+ /*
+ * Value stored in the Uncompressed Size field, or
+ * VLI_UNKNOWN if Uncompressed Size is not present.
+ */
+ vli_type uncompressed;
+
+ /* Size of the Block Header field */
+ uint32_t size;
+ } block_header;
+
+ /* Information collected when decoding Blocks */
+ struct {
+ /* Observed compressed size of the current Block */
+ vli_type compressed;
+
+ /* Observed uncompressed size of the current Block */
+ vli_type uncompressed;
+
+ /* Number of Blocks decoded so far */
+ vli_type count;
+
+ /*
+ * Hash calculated from the Block sizes. This is used to
+ * validate the Index field.
+ */
+ struct xz_dec_hash hash;
+ } block;
+
+ /* Variables needed when verifying the Index field */
+ struct {
+ /* Position in dec_index() */
+ enum {
+ SEQ_INDEX_COUNT,
+ SEQ_INDEX_UNPADDED,
+ SEQ_INDEX_UNCOMPRESSED
+ } sequence;
+
+ /* Size of the Index in bytes */
+ vli_type size;
+
+ /* Number of Records (matches block.count in valid files) */
+ vli_type count;
+
+ /*
+ * Hash calculated from the Records (matches block.hash in
+ * valid files).
+ */
+ struct xz_dec_hash hash;
+ } index;
+
+ /*
+ * Temporary buffer needed to hold Stream Header, Block Header,
+ * and Stream Footer. The Block Header is the biggest (1 KiB)
+ * so we reserve space according to that. buf[] has to be aligned
+ * to a multiple of four bytes; the size_t variables before it
+ * should guarantee this.
+ */
+ struct {
+ size_t pos;
+ size_t size;
+ uint8_t buf[1024];
+ } temp;
+
+ struct xz_dec_lzma2 *lzma2;
+
+#ifdef XZ_DEC_BCJ
+ struct xz_dec_bcj *bcj;
+ bool bcj_active;
+#endif
+};
+
+/*
+ * Fill s->temp by copying data starting from b->in[b->in_pos]. Caller
+ * must have set s->temp.pos to indicate how much data we are supposed
+ * to copy into s->temp.buf. Return true once s->temp.pos has reached
+ * s->temp.size.
+ */
+static bool fill_temp(struct xz_dec *s, struct xz_buf *b)
+{
+ size_t copy_size = min_t(size_t,
+ b->in_size - b->in_pos, s->temp.size - s->temp.pos);
+
+ memcpy(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size);
+ b->in_pos += copy_size;
+ s->temp.pos += copy_size;
+
+ if (s->temp.pos == s->temp.size) {
+ s->temp.pos = 0;
+ return true;
+ }
+
+ return false;
+}
+
+/* Decode a variable-length integer (little-endian base-128 encoding) */
+static enum xz_ret dec_vli(struct xz_dec *s,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+{
+ uint8_t byte;
+
+ if (s->pos == 0)
+ s->vli = 0;
+
+ while (*in_pos < in_size) {
+ byte = in[*in_pos];
+ ++*in_pos;
+
+ s->vli |= (vli_type)(byte & 0x7F) << s->pos;
+
+ if ((byte & 0x80) == 0) {
+ /* Don't allow non-minimal encodings. */
+ if (byte == 0 && s->pos != 0)
+ return XZ_DATA_ERROR;
+
+ s->pos = 0;
+ return XZ_STREAM_END;
+ }
+
+ s->pos += 7;
+ if (s->pos == 7 * VLI_BYTES_MAX)
+ return XZ_DATA_ERROR;
+ }
+
+ return XZ_OK;
+}
+
+/*
+ * Decode the Compressed Data field from a Block. Update and validate
+ * the observed compressed and uncompressed sizes of the Block so that
+ * they don't exceed the values possibly stored in the Block Header
+ * (validation assumes that no integer overflow occurs, since vli_type
+ * is normally uint64_t). Update the CRC32 if presence of the CRC32
+ * field was indicated in Stream Header.
+ *
+ * Once the decoding is finished, validate that the observed sizes match
+ * the sizes possibly stored in the Block Header. Update the hash and
+ * Block count, which are later used to validate the Index field.
+ */
+static enum xz_ret dec_block(struct xz_dec *s, struct xz_buf *b)
+{
+ enum xz_ret ret;
+
+ s->in_start = b->in_pos;
+ s->out_start = b->out_pos;
+
+#ifdef XZ_DEC_BCJ
+ if (s->bcj_active)
+ ret = xz_dec_bcj_run(s->bcj, s->lzma2, b);
+ else
+#endif
+ ret = xz_dec_lzma2_run(s->lzma2, b);
+
+ s->block.compressed += b->in_pos - s->in_start;
+ s->block.uncompressed += b->out_pos - s->out_start;
+
+ /*
+ * There is no need to separately check for VLI_UNKNOWN, since
+ * the observed sizes are always smaller than VLI_UNKNOWN.
+ */
+ if (s->block.compressed > s->block_header.compressed
+ || s->block.uncompressed
+ > s->block_header.uncompressed)
+ return XZ_DATA_ERROR;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ if (s->has_crc32)
+ GRUB_MD_CRC32->write(s->crc32_context,b->out + s->out_start,
+ b->out_pos - s->out_start);
+#endif
+
+ if (ret == XZ_STREAM_END) {
+ if (s->block_header.compressed != VLI_UNKNOWN
+ && s->block_header.compressed
+ != s->block.compressed)
+ return XZ_DATA_ERROR;
+
+ if (s->block_header.uncompressed != VLI_UNKNOWN
+ && s->block_header.uncompressed
+ != s->block.uncompressed)
+ return XZ_DATA_ERROR;
+
+ s->block.hash.unpadded += s->block_header.size
+ + s->block.compressed;
+ if (s->has_crc32)
+ s->block.hash.unpadded += 4;
+
+ s->block.hash.uncompressed += s->block.uncompressed;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ GRUB_MD_CRC32->write(s->block.hash.crc32_context,
+ (const uint8_t *)&s->block.hash, 2 * sizeof(vli_type));
+#endif
+
+ ++s->block.count;
+ }
+
+ return ret;
+}
+
+/* Update the Index size and the CRC32 value. */
+static void index_update(struct xz_dec *s, const struct xz_buf *b)
+{
+ size_t in_used = b->in_pos - s->in_start;
+ s->index.size += in_used;
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ GRUB_MD_CRC32->write(s->crc32_context,b->in + s->in_start, in_used);
+#endif
+}
+
+/*
+ * Decode the Number of Records, Unpadded Size, and Uncompressed Size
+ * fields from the Index field. That is, Index Padding and CRC32 are not
+ * decoded by this function.
+ *
+ * This can return XZ_OK (more input needed), XZ_STREAM_END (everything
+ * successfully decoded), or XZ_DATA_ERROR (input is corrupt).
+ */
+static enum xz_ret dec_index(struct xz_dec *s, struct xz_buf *b)
+{
+ enum xz_ret ret;
+
+ do {
+ ret = dec_vli(s, b->in, &b->in_pos, b->in_size);
+ if (ret != XZ_STREAM_END) {
+ index_update(s, b);
+ return ret;
+ }
+
+ switch (s->index.sequence) {
+ case SEQ_INDEX_COUNT:
+ s->index.count = s->vli;
+
+ /*
+ * Validate that the Number of Records field
+ * indicates the same number of Records as
+ * there were Blocks in the Stream.
+ */
+ if (s->index.count != s->block.count)
+ return XZ_DATA_ERROR;
+
+ s->index.sequence = SEQ_INDEX_UNPADDED;
+ break;
+
+ case SEQ_INDEX_UNPADDED:
+ s->index.hash.unpadded += s->vli;
+ s->index.sequence = SEQ_INDEX_UNCOMPRESSED;
+ break;
+
+ case SEQ_INDEX_UNCOMPRESSED:
+ s->index.hash.uncompressed += s->vli;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ GRUB_MD_CRC32->write(s->index.hash.crc32_context,
+ (const uint8_t *)&s->index.hash, 2 * sizeof(vli_type));
+#endif
+
+ --s->index.count;
+ s->index.sequence = SEQ_INDEX_UNPADDED;
+ break;
+ }
+ } while (s->index.count > 0);
+
+ return XZ_STREAM_END;
+}
+
+/*
+ * Validate that the next four input bytes match the value of s->crc32.
+ * s->pos must be zero when starting to validate the first byte.
+ */
+static enum xz_ret crc32_validate(struct xz_dec *s, struct xz_buf *b)
+{
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ if(s->crc32_temp == 0)
+ {
+ GRUB_MD_CRC32->final(s->crc32_context);
+ s->crc32_temp = get_unaligned_be32(GRUB_MD_CRC32->read(s->crc32_context));
+ }
+#endif
+
+ do {
+ if (b->in_pos == b->in_size)
+ return XZ_OK;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ if (((s->crc32_temp >> s->pos) & 0xFF) != b->in[b->in_pos++])
+ return XZ_DATA_ERROR;
+#endif
+
+ s->pos += 8;
+
+ } while (s->pos < 32);
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ GRUB_MD_CRC32->init(s->crc32_context);
+#endif
+ s->crc32_temp = 0;
+ s->pos = 0;
+
+ return XZ_STREAM_END;
+}
+
+/* Decode the Stream Header field (the first 12 bytes of the .xz Stream). */
+static enum xz_ret dec_stream_header(struct xz_dec *s)
+{
+ if (! memeq(s->temp.buf, HEADER_MAGIC, HEADER_MAGIC_SIZE))
+ return XZ_FORMAT_ERROR;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ uint8_t crc32_context[GRUB_MD_CRC32->contextsize];
+
+ GRUB_MD_CRC32->init(crc32_context);
+ GRUB_MD_CRC32->write(crc32_context,s->temp.buf + HEADER_MAGIC_SIZE, 2);
+ GRUB_MD_CRC32->final(crc32_context);
+
+ uint32_t resultcrc = get_unaligned_be32(GRUB_MD_CRC32->read(crc32_context));
+ uint32_t readcrc = get_unaligned_le32(s->temp.buf + HEADER_MAGIC_SIZE + 2);
+
+ if(resultcrc != readcrc)
+ return XZ_DATA_ERROR;
+#endif
+
+ /*
+ * Decode the Stream Flags field. Of integrity checks, we support
+ * only none (Check ID = 0) and CRC32 (Check ID = 1).
+ */
+ if (s->temp.buf[HEADER_MAGIC_SIZE] != 0
+ || s->temp.buf[HEADER_MAGIC_SIZE + 1] > 1)
+ return XZ_OPTIONS_ERROR;
+
+ s->has_crc32 = s->temp.buf[HEADER_MAGIC_SIZE + 1];
+
+ return XZ_OK;
+}
+
+/* Decode the Stream Footer field (the last 12 bytes of the .xz Stream) */
+static enum xz_ret dec_stream_footer(struct xz_dec *s)
+{
+ if (! memeq(s->temp.buf + 10, FOOTER_MAGIC, FOOTER_MAGIC_SIZE))
+ return XZ_DATA_ERROR;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ uint8_t crc32_context[GRUB_MD_CRC32->contextsize];
+
+ GRUB_MD_CRC32->init(crc32_context);
+ GRUB_MD_CRC32->write(crc32_context, s->temp.buf + 4, 6);
+ GRUB_MD_CRC32->final(crc32_context);
+
+ uint32_t resultcrc = get_unaligned_be32(GRUB_MD_CRC32->read(crc32_context));
+ uint32_t readcrc = get_unaligned_le32(s->temp.buf);
+
+ if(resultcrc != readcrc)
+ return XZ_DATA_ERROR;
+#endif
+
+ /*
+ * Validate Backward Size. Note that we never added the size of the
+ * Index CRC32 field to s->index.size, thus we use s->index.size / 4
+ * instead of s->index.size / 4 - 1.
+ */
+ if ((s->index.size >> 2) != get_le32(s->temp.buf + 4))
+ return XZ_DATA_ERROR;
+
+ if (s->temp.buf[8] != 0 || s->temp.buf[9] != s->has_crc32)
+ return XZ_DATA_ERROR;
+
+ /*
+ * Use XZ_STREAM_END instead of XZ_OK to be more convenient
+ * for the caller.
+ */
+ return XZ_STREAM_END;
+}
+
+/* Decode the Block Header and initialize the filter chain. */
+static enum xz_ret dec_block_header(struct xz_dec *s)
+{
+ enum xz_ret ret;
+
+ /*
+ * Validate the CRC32. We know that the temp buffer is at least
+ * eight bytes so this is safe.
+ */
+ s->temp.size -= 4;
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ uint8_t crc32_context[GRUB_MD_CRC32->contextsize];
+
+ GRUB_MD_CRC32->init(crc32_context);
+ GRUB_MD_CRC32->write(crc32_context, s->temp.buf, s->temp.size);
+ GRUB_MD_CRC32->final(crc32_context);
+
+ uint32_t resultcrc = get_unaligned_be32(GRUB_MD_CRC32->read(crc32_context));
+ uint32_t readcrc = get_unaligned_le32(s->temp.buf + s->temp.size);
+
+ if (resultcrc != readcrc)
+ return XZ_DATA_ERROR;
+#endif
+
+ s->temp.pos = 2;
+
+ /*
+ * Catch unsupported Block Flags. We support only one or two filters
+ * in the chain, so we catch that with the same test.
+ */
+#ifdef XZ_DEC_BCJ
+ if (s->temp.buf[1] & 0x3E)
+#else
+ if (s->temp.buf[1] & 0x3F)
+#endif
+ return XZ_OPTIONS_ERROR;
+
+ /* Compressed Size */
+ if (s->temp.buf[1] & 0x40) {
+ if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size)
+ != XZ_STREAM_END)
+ return XZ_DATA_ERROR;
+
+ s->block_header.compressed = s->vli;
+ } else {
+ s->block_header.compressed = VLI_UNKNOWN;
+ }
+
+ /* Uncompressed Size */
+ if (s->temp.buf[1] & 0x80) {
+ if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size)
+ != XZ_STREAM_END)
+ return XZ_DATA_ERROR;
+
+ s->block_header.uncompressed = s->vli;
+ } else {
+ s->block_header.uncompressed = VLI_UNKNOWN;
+ }
+
+#ifdef XZ_DEC_BCJ
+ /* If there are two filters, the first one must be a BCJ filter. */
+ s->bcj_active = s->temp.buf[1] & 0x01;
+ if (s->bcj_active) {
+ if (s->temp.size - s->temp.pos < 2)
+ return XZ_OPTIONS_ERROR;
+
+ ret = xz_dec_bcj_reset(s->bcj, s->temp.buf[s->temp.pos++]);
+ if (ret != XZ_OK)
+ return ret;
+
+ /*
+ * We don't support custom start offset,
+ * so Size of Properties must be zero.
+ */
+ if (s->temp.buf[s->temp.pos++] != 0x00)
+ return XZ_OPTIONS_ERROR;
+ }
+#endif
+
+ /* Valid Filter Flags always take at least two bytes. */
+ if (s->temp.size - s->temp.pos < 2)
+ return XZ_DATA_ERROR;
+
+ /* Filter ID = LZMA2 */
+ if (s->temp.buf[s->temp.pos++] != 0x21)
+ return XZ_OPTIONS_ERROR;
+
+ /* Size of Properties = 1-byte Filter Properties */
+ if (s->temp.buf[s->temp.pos++] != 0x01)
+ return XZ_OPTIONS_ERROR;
+
+ /* Filter Properties contains LZMA2 dictionary size. */
+ if (s->temp.size - s->temp.pos < 1)
+ return XZ_DATA_ERROR;
+
+ ret = xz_dec_lzma2_reset(s->lzma2, s->temp.buf[s->temp.pos++]);
+ if (ret != XZ_OK)
+ return ret;
+
+ /* The rest must be Header Padding. */
+ while (s->temp.pos < s->temp.size)
+ if (s->temp.buf[s->temp.pos++] != 0x00)
+ return XZ_OPTIONS_ERROR;
+
+ s->temp.pos = 0;
+ s->block.compressed = 0;
+ s->block.uncompressed = 0;
+
+ return XZ_OK;
+}
+
+static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
+{
+ enum xz_ret ret;
+
+ /*
+ * Store the start position for the case when we are in the middle
+ * of the Index field.
+ */
+ s->in_start = b->in_pos;
+
+ while (true) {
+ switch (s->sequence) {
+ case SEQ_STREAM_HEADER:
+ /*
+ * Stream Header is copied to s->temp, and then
+ * decoded from there. This way if the caller
+ * gives us only little input at a time, we can
+ * still keep the Stream Header decoding code
+ * simple. Similar approach is used in many places
+ * in this file.
+ */
+ if (!fill_temp(s, b))
+ return XZ_OK;
+
+ ret = dec_stream_header(s);
+ if (ret != XZ_OK)
+ return ret;
+
+ s->sequence = SEQ_BLOCK_START;
+
+ case SEQ_BLOCK_START:
+ /* We need one byte of input to continue. */
+ if (b->in_pos == b->in_size)
+ return XZ_OK;
+
+ /* See if this is the beginning of the Index field. */
+ if (b->in[b->in_pos] == 0) {
+ s->in_start = b->in_pos++;
+ s->sequence = SEQ_INDEX;
+ break;
+ }
+
+ /*
+ * Calculate the size of the Block Header and
+ * prepare to decode it.
+ */
+ s->block_header.size
+ = ((uint32_t)b->in[b->in_pos] + 1) * 4;
+
+ s->temp.size = s->block_header.size;
+ s->temp.pos = 0;
+ s->sequence = SEQ_BLOCK_HEADER;
+
+ case SEQ_BLOCK_HEADER:
+ if (!fill_temp(s, b))
+ return XZ_OK;
+
+ ret = dec_block_header(s);
+ if (ret != XZ_OK)
+ return ret;
+
+ s->sequence = SEQ_BLOCK_UNCOMPRESS;
+
+ case SEQ_BLOCK_UNCOMPRESS:
+ ret = dec_block(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+
+ s->sequence = SEQ_BLOCK_PADDING;
+
+ case SEQ_BLOCK_PADDING:
+ /*
+ * Size of Compressed Data + Block Padding
+ * must be a multiple of four. We don't need
+ * s->block.compressed for anything else
+ * anymore, so we use it here to test the size
+ * of the Block Padding field.
+ */
+ while (s->block.compressed & 3) {
+ if (b->in_pos == b->in_size)
+ return XZ_OK;
+
+ if (b->in[b->in_pos++] != 0)
+ return XZ_DATA_ERROR;
+
+ ++s->block.compressed;
+ }
+
+ s->sequence = SEQ_BLOCK_CHECK;
+
+ case SEQ_BLOCK_CHECK:
+ if (s->has_crc32) {
+ ret = crc32_validate(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+ }
+
+ s->sequence = SEQ_BLOCK_START;
+ break;
+
+ case SEQ_INDEX:
+ ret = dec_index(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+
+ s->sequence = SEQ_INDEX_PADDING;
+
+ case SEQ_INDEX_PADDING:
+ while ((s->index.size + (b->in_pos - s->in_start))
+ & 3) {
+ if (b->in_pos == b->in_size) {
+ index_update(s, b);
+ return XZ_OK;
+ }
+
+ if (b->in[b->in_pos++] != 0)
+ return XZ_DATA_ERROR;
+ }
+
+ /* Finish the CRC32 value and Index size. */
+ index_update(s, b);
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ /* Compare the hashes to validate the Index field. */
+ GRUB_MD_CRC32->final(s->block.hash.crc32_context);
+ GRUB_MD_CRC32->final(s->index.hash.crc32_context);
+ uint32_t block_crc = *(uint32_t*)GRUB_MD_CRC32->read(s->block.hash.crc32_context);
+ uint32_t index_crc = *(uint32_t*)GRUB_MD_CRC32->read(s->index.hash.crc32_context);
+
+ if (s->block.hash.unpadded != s->index.hash.unpadded
+ || s->block.hash.uncompressed != s->index.hash.uncompressed
+ || block_crc != index_crc)
+ {
+ return XZ_DATA_ERROR;
+ }
+#endif
+
+ s->sequence = SEQ_INDEX_CRC32;
+
+ case SEQ_INDEX_CRC32:
+ ret = crc32_validate(s, b);
+ if (ret != XZ_STREAM_END)
+ return ret;
+
+ s->temp.size = STREAM_HEADER_SIZE;
+ s->sequence = SEQ_STREAM_FOOTER;
+
+ case SEQ_STREAM_FOOTER:
+ if (!fill_temp(s, b))
+ return XZ_OK;
+
+ return dec_stream_footer(s);
+ }
+ }
+
+ /* Never reached */
+}
+
+/*
+ * xz_dec_run() is a wrapper for dec_main() to handle some special cases in
+ * multi-call and single-call decoding.
+ *
+ * In multi-call mode, we must return XZ_BUF_ERROR when it seems clear that we
+ * are not going to make any progress anymore. This is to prevent the caller
+ * from calling us infinitely when the input file is truncated or otherwise
+ * corrupt. Since zlib-style API allows that the caller fills the input buffer
+ * only when the decoder doesn't produce any new output, we have to be careful
+ * to avoid returning XZ_BUF_ERROR too easily: XZ_BUF_ERROR is returned only
+ * after the second consecutive call to xz_dec_run() that makes no progress.
+ *
+ * In single-call mode, if we couldn't decode everything and no error
+ * occurred, either the input is truncated or the output buffer is too small.
+ * Since we know that the last input byte never produces any output, we know
+ * that if all the input was consumed and decoding wasn't finished, the file
+ * must be corrupt. Otherwise the output buffer has to be too small or the
+ * file is corrupt in a way that decoding it produces too big output.
+ *
+ * If single-call decoding fails, we reset b->in_pos and b->out_pos back to
+ * their original values. This is because with some filter chains there won't
+ * be any valid uncompressed data in the output buffer unless the decoding
+ * actually succeeds (that's the price to pay of using the output buffer as
+ * the workspace).
+ */
+enum xz_ret xz_dec_run(struct xz_dec *s, struct xz_buf *b)
+{
+ size_t in_start;
+ size_t out_start;
+ enum xz_ret ret;
+
+ if (s->single_call)
+ xz_dec_reset(s);
+
+ in_start = b->in_pos;
+ out_start = b->out_pos;
+ ret = dec_main(s, b);
+
+ if (s->single_call) {
+ if (ret == XZ_OK)
+ ret = b->in_pos == b->in_size
+ ? XZ_DATA_ERROR : XZ_BUF_ERROR;
+
+ if (ret != XZ_STREAM_END) {
+ b->in_pos = in_start;
+ b->out_pos = out_start;
+ }
+
+ } else if (ret == XZ_OK && in_start == b->in_pos
+ && out_start == b->out_pos) {
+ if (s->allow_buf_error)
+ ret = XZ_BUF_ERROR;
+
+ s->allow_buf_error = true;
+ } else {
+ s->allow_buf_error = false;
+ }
+
+ return ret;
+}
+
+#ifdef GRUB_EMBED_DECOMPRESSOR
+struct xz_dec decoder;
+#endif
+
+struct xz_dec * xz_dec_init(uint32_t dict_max)
+{
+ struct xz_dec *s;
+#ifdef GRUB_EMBED_DECOMPRESSOR
+ s = &decoder;
+#else
+ s = kmalloc(sizeof(*s), GFP_KERNEL);
+ if (s == NULL)
+ return NULL;
+#endif
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ /* prepare CRC32 calculators */
+ if(GRUB_MD_CRC32 == NULL)
+ {
+ kfree(s);
+ return NULL;
+ }
+
+ s->crc32_context = kmalloc(GRUB_MD_CRC32->contextsize, GFP_KERNEL);
+ if (s->crc32_context == NULL)
+ {
+ kfree(s);
+ return NULL;
+ }
+
+ s->index.hash.crc32_context = kmalloc(GRUB_MD_CRC32->contextsize, GFP_KERNEL);
+ if (s->index.hash.crc32_context == NULL)
+ {
+ kfree(s->crc32_context);
+ kfree(s);
+ return NULL;
+ }
+
+ s->block.hash.crc32_context = kmalloc(GRUB_MD_CRC32->contextsize, GFP_KERNEL);
+ if (s->block.hash.crc32_context == NULL)
+ {
+ kfree(s->index.hash.crc32_context);
+ kfree(s->crc32_context);
+ kfree(s);
+ return NULL;
+ }
+
+
+ GRUB_MD_CRC32->init(s->crc32_context);
+ GRUB_MD_CRC32->init(s->index.hash.crc32_context);
+ GRUB_MD_CRC32->init(s->block.hash.crc32_context);
+#endif
+
+ s->crc32_temp = 0;
+
+ s->single_call = dict_max == 0;
+
+#ifdef XZ_DEC_BCJ
+ s->bcj = xz_dec_bcj_create(s->single_call);
+ if (s->bcj == NULL)
+ goto error_bcj;
+#endif
+
+ s->lzma2 = xz_dec_lzma2_create(dict_max);
+ if (s->lzma2 == NULL)
+ goto error_lzma2;
+
+ xz_dec_reset(s);
+ return s;
+
+error_lzma2:
+#ifdef XZ_DEC_BCJ
+ xz_dec_bcj_end(s->bcj);
+error_bcj:
+#endif
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ kfree(s);
+#endif
+ return NULL;
+}
+
+void xz_dec_reset(struct xz_dec *s)
+{
+ s->sequence = SEQ_STREAM_HEADER;
+ s->allow_buf_error = false;
+ s->pos = 0;
+
+ {
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ uint8_t *t;
+ t = s->block.hash.crc32_context;
+#endif
+ memzero(&s->block, sizeof(s->block));
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ s->block.hash.crc32_context = t;
+ t = s->index.hash.crc32_context;
+#endif
+ memzero(&s->index, sizeof(s->index));
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ s->index.hash.crc32_context = t;
+#endif
+ }
+ s->temp.pos = 0;
+ s->temp.size = STREAM_HEADER_SIZE;
+
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ GRUB_MD_CRC32->init(s->crc32_context);
+ GRUB_MD_CRC32->init(s->index.hash.crc32_context);
+ GRUB_MD_CRC32->init(s->block.hash.crc32_context);
+#endif
+ s->crc32_temp = 0;
+}
+
+void xz_dec_end(struct xz_dec *s)
+{
+ if (s != NULL) {
+ xz_dec_lzma2_end(s->lzma2);
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ kfree(s->index.hash.crc32_context);
+ kfree(s->block.hash.crc32_context);
+ kfree(s->crc32_context);
+#endif
+#ifdef XZ_DEC_BCJ
+ xz_dec_bcj_end(s->bcj);
+#endif
+#ifndef GRUB_EMBED_DECOMPRESSOR
+ kfree(s);
+#endif
+ }
+}
diff --git a/grub-core/lib/xzembed/xz_lzma2.h b/grub-core/lib/xzembed/xz_lzma2.h
new file mode 100644
index 0000000..15e553d
--- /dev/null
+++ b/grub-core/lib/xzembed/xz_lzma2.h
@@ -0,0 +1,236 @@
+/* xz_lzma2.h - LZMA2 definitions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#ifndef XZ_LZMA2_H
+#define XZ_LZMA2_H
+
+/* dictionary size hard limit
+ * actual size limit is calculated as shown in 5.3.1
+ * http://tukaani.org/xz/xz-file-format.txt
+ *
+ * if bits > 39 dictionary_size = UINT32_MAX
+ * else
+ * dictionary_size = 2 | (bits & 1);
+ * dictionary_size <<= bits / 2 + 11;
+ *
+ * i.e.
+ * 0 - 4 KiB
+ * 6 - 32 KiB
+ * 30 - 128MiB
+ * 39 - 3072 MiB
+ * 40 - 4096 MiB - 1 B
+ * note: implementation supports 39 at maximum
+ */
+#define DICT_BIT_SIZE 30
+
+/* Range coder constants */
+#define RC_SHIFT_BITS 8
+#define RC_TOP_BITS 24
+#define RC_TOP_VALUE (1 << RC_TOP_BITS)
+#define RC_BIT_MODEL_TOTAL_BITS 11
+#define RC_BIT_MODEL_TOTAL (1 << RC_BIT_MODEL_TOTAL_BITS)
+#define RC_MOVE_BITS 5
+
+/*
+ * Maximum number of position states. A position state is the lowest pb
+ * number of bits of the current uncompressed offset. In some places there
+ * are different sets of probabilities for different position states.
+ */
+#define POS_STATES_MAX (1 << 4)
+
+/*
+ * This enum is used to track which LZMA symbols have occurred most recently
+ * and in which order. This information is used to predict the next symbol.
+ *
+ * Symbols:
+ * - Literal: One 8-bit byte
+ * - Match: Repeat a chunk of data at some distance
+ * - Long repeat: Multi-byte match at a recently seen distance
+ * - Short repeat: One-byte repeat at a recently seen distance
+ *
+ * The symbol names are in from STATE_oldest_older_previous. REP means
+ * either short or long repeated match, and NONLIT means any non-literal.
+ */
+enum lzma_state {
+ STATE_LIT_LIT,
+ STATE_MATCH_LIT_LIT,
+ STATE_REP_LIT_LIT,
+ STATE_SHORTREP_LIT_LIT,
+ STATE_MATCH_LIT,
+ STATE_REP_LIT,
+ STATE_SHORTREP_LIT,
+ STATE_LIT_MATCH,
+ STATE_LIT_LONGREP,
+ STATE_LIT_SHORTREP,
+ STATE_NONLIT_MATCH,
+ STATE_NONLIT_REP
+};
+
+/* Total number of states */
+#define STATES 12
+
+/* The lowest 7 states indicate that the previous state was a literal. */
+#define LIT_STATES 7
+
+/* Indicate that the latest symbol was a literal. */
+static inline void lzma_state_literal(enum lzma_state *state)
+{
+ if (*state <= STATE_SHORTREP_LIT_LIT)
+ *state = STATE_LIT_LIT;
+ else if (*state <= STATE_LIT_SHORTREP)
+ *state -= 3;
+ else
+ *state -= 6;
+}
+
+/* Indicate that the latest symbol was a match. */
+static inline void lzma_state_match(enum lzma_state *state)
+{
+ *state = *state < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH;
+}
+
+/* Indicate that the latest state was a long repeated match. */
+static inline void lzma_state_long_rep(enum lzma_state *state)
+{
+ *state = *state < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP;
+}
+
+/* Indicate that the latest symbol was a short match. */
+static inline void lzma_state_short_rep(enum lzma_state *state)
+{
+ *state = *state < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP;
+}
+
+/* Test if the previous symbol was a literal. */
+static inline bool lzma_state_is_literal(enum lzma_state state)
+{
+ return state < LIT_STATES;
+}
+
+/* Each literal coder is divided in three sections:
+ * - 0x001-0x0FF: Without match byte
+ * - 0x101-0x1FF: With match byte; match bit is 0
+ * - 0x201-0x2FF: With match byte; match bit is 1
+ *
+ * Match byte is used when the previous LZMA symbol was something else than
+ * a literal (that is, it was some kind of match).
+ */
+#define LITERAL_CODER_SIZE 0x300
+
+/* Maximum number of literal coders */
+#define LITERAL_CODERS_MAX (1 << 4)
+
+/* Minimum length of a match is two bytes. */
+#define MATCH_LEN_MIN 2
+
+/* Match length is encoded with 4, 5, or 10 bits.
+ *
+ * Length Bits
+ * 2-9 4 = Choice=0 + 3 bits
+ * 10-17 5 = Choice=1 + Choice2=0 + 3 bits
+ * 18-273 10 = Choice=1 + Choice2=1 + 8 bits
+ */
+#define LEN_LOW_BITS 3
+#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)
+#define LEN_MID_BITS 3
+#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)
+#define LEN_HIGH_BITS 8
+#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)
+#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)
+
+/*
+ * Maximum length of a match is 273 which is a result of the encoding
+ * described above.
+ */
+#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)
+
+/*
+ * Different sets of probabilities are used for match distances that have
+ * very short match length: Lengths of 2, 3, and 4 bytes have a separate
+ * set of probabilities for each length. The matches with longer length
+ * use a shared set of probabilities.
+ */
+#define DIST_STATES 4
+
+/*
+ * Get the index of the appropriate probability array for decoding
+ * the distance slot.
+ */
+static inline uint32_t lzma_get_dist_state(uint32_t len)
+{
+ return len < DIST_STATES + MATCH_LEN_MIN
+ ? len - MATCH_LEN_MIN : DIST_STATES - 1;
+}
+
+/*
+ * The highest two bits of a 32-bit match distance are encoded using six bits.
+ * This six-bit value is called a distance slot. This way encoding a 32-bit
+ * value takes 6-36 bits, larger values taking more bits.
+ */
+#define DIST_SLOT_BITS 6
+#define DIST_SLOTS (1 << DIST_SLOT_BITS)
+
+/* Match distances up to 127 are fully encoded using probabilities. Since
+ * the highest two bits (distance slot) are always encoded using six bits,
+ * the distances 0-3 don't need any additional bits to encode, since the
+ * distance slot itself is the same as the actual distance. DIST_MODEL_START
+ * indicates the first distance slot where at least one additional bit is
+ * needed.
+ */
+#define DIST_MODEL_START 4
+
+/*
+ * Match distances greater than 127 are encoded in three pieces:
+ * - distance slot: the highest two bits
+ * - direct bits: 2-26 bits below the highest two bits
+ * - alignment bits: four lowest bits
+ *
+ * Direct bits don't use any probabilities.
+ *
+ * The distance slot value of 14 is for distances 128-191.
+ */
+#define DIST_MODEL_END 14
+
+/* Distance slots that indicate a distance <= 127. */
+#define FULL_DISTANCES_BITS (DIST_MODEL_END / 2)
+#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)
+
+/*
+ * For match distances greater than 127, only the highest two bits and the
+ * lowest four bits (alignment) is encoded using probabilities.
+ */
+#define ALIGN_BITS 4
+#define ALIGN_SIZE (1 << ALIGN_BITS)
+#define ALIGN_MASK (ALIGN_SIZE - 1)
+
+/* Total number of all probability variables */
+#define PROBS_TOTAL (1846 + LITERAL_CODERS_MAX * LITERAL_CODER_SIZE)
+
+/*
+ * LZMA remembers the four most recent match distances. Reusing these
+ * distances tends to take less space than re-encoding the actual
+ * distance value.
+ */
+#define REPS 4
+
+#endif
diff --git a/grub-core/lib/xzembed/xz_private.h b/grub-core/lib/xzembed/xz_private.h
new file mode 100644
index 0000000..fc845c9
--- /dev/null
+++ b/grub-core/lib/xzembed/xz_private.h
@@ -0,0 +1,96 @@
+/* xz_private.h - Private includes and definitions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#ifndef XZ_PRIVATE_H
+#define XZ_PRIVATE_H
+
+/*
+ * For userspace builds, use a separate header to define the required
+ * macros and functions. This makes it easier to adapt the code into
+ * different environments and avoids clutter in the Linux kernel tree.
+ */
+#include "xz_config.h"
+
+/*
+ * If any of the BCJ filter decoders are wanted, define XZ_DEC_BCJ.
+ * XZ_DEC_BCJ is used to enable generic support for BCJ decoders.
+ */
+#ifndef XZ_DEC_BCJ
+# if defined(XZ_DEC_X86) || defined(XZ_DEC_POWERPC) \
+ || defined(XZ_DEC_IA64) || defined(XZ_DEC_ARM) \
+ || defined(XZ_DEC_ARM) || defined(XZ_DEC_ARMTHUMB) \
+ || defined(XZ_DEC_SPARC)
+# define XZ_DEC_BCJ
+# endif
+#endif
+
+/*
+ * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used
+ * before calling xz_dec_lzma2_run().
+ */
+struct xz_dec_lzma2 * xz_dec_lzma2_create(
+ uint32_t dict_max);
+
+/*
+ * Decode the LZMA2 properties (one byte) and reset the decoder. Return
+ * XZ_OK on success, XZ_MEMLIMIT_ERROR if the preallocated dictionary is not
+ * big enough, and XZ_OPTIONS_ERROR if props indicates something that this
+ * decoder doesn't support.
+ */
+enum xz_ret xz_dec_lzma2_reset(
+ struct xz_dec_lzma2 *s, uint8_t props);
+
+/* Decode raw LZMA2 stream from b->in to b->out. */
+enum xz_ret xz_dec_lzma2_run(
+ struct xz_dec_lzma2 *s, struct xz_buf *b);
+
+/* Free the memory allocated for the LZMA2 decoder. */
+void xz_dec_lzma2_end(struct xz_dec_lzma2 *s);
+
+/*
+ * Allocate memory for BCJ decoders. xz_dec_bcj_reset() must be used before
+ * calling xz_dec_bcj_run().
+ */
+struct xz_dec_bcj * xz_dec_bcj_create(bool single_call);
+
+/*
+ * Decode the Filter ID of a BCJ filter. This implementation doesn't
+ * support custom start offsets, so no decoding of Filter Properties
+ * is needed. Returns XZ_OK if the given Filter ID is supported.
+ * Otherwise XZ_OPTIONS_ERROR is returned.
+ */
+enum xz_ret xz_dec_bcj_reset(
+ struct xz_dec_bcj *s, uint8_t id);
+
+/*
+ * Decode raw BCJ + LZMA2 stream. This must be used only if there actually is
+ * a BCJ filter in the chain. If the chain has only LZMA2, xz_dec_lzma2_run()
+ * must be called directly.
+ */
+enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s,
+ struct xz_dec_lzma2 *lzma2, struct xz_buf *b);
+
+/* Free the memory allocated for the BCJ filters. */
+#define xz_dec_bcj_end(s) kfree(s)
+
+#endif
diff --git a/grub-core/lib/xzembed/xz_stream.h b/grub-core/lib/xzembed/xz_stream.h
new file mode 100644
index 0000000..f58397a
--- /dev/null
+++ b/grub-core/lib/xzembed/xz_stream.h
@@ -0,0 +1,53 @@
+/* xz_stream.h - Definitions for handling the .xz file format */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * This file is based on code from XZ embedded project
+ * http://tukaani.org/xz/embedded.html
+ */
+
+#ifndef XZ_STREAM_H
+#define XZ_STREAM_H
+
+/*
+ * See the .xz file format specification at
+ * http://tukaani.org/xz/xz-file-format.txt
+ * to understand the container format.
+ */
+
+#define STREAM_HEADER_SIZE 12
+
+#define HEADER_MAGIC "\3757zXZ\0"
+#define HEADER_MAGIC_SIZE 6
+
+#define FOOTER_MAGIC "YZ"
+#define FOOTER_MAGIC_SIZE 2
+
+/*
+ * Variable-length integer can hold a 63-bit unsigned integer, or a special
+ * value to indicate that the value is unknown.
+ */
+typedef uint64_t vli_type;
+
+#define VLI_MAX ((vli_type)-1 / 2)
+#define VLI_UNKNOWN ((vli_type)-1)
+
+/* Maximum encoded size of a VLI */
+#define VLI_BYTES_MAX (sizeof(vli_type) * 8 / 7)
+
+#endif
diff --git a/grub-core/loader/aout.c b/grub-core/loader/aout.c
new file mode 100644
index 0000000..69bf6e6
--- /dev/null
+++ b/grub-core/loader/aout.c
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/aout.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+int
+grub_aout_get_type (union grub_aout_header *header)
+{
+ int magic;
+
+ magic = AOUT_GETMAGIC (header->aout32);
+ if ((magic == AOUT32_OMAGIC) || (magic == AOUT32_NMAGIC) ||
+ (magic == AOUT32_ZMAGIC) || (magic == AOUT32_QMAGIC))
+ return AOUT_TYPE_AOUT32;
+ else if ((magic == AOUT64_OMAGIC) || (magic == AOUT64_NMAGIC) ||
+ (magic == AOUT64_ZMAGIC))
+ return AOUT_TYPE_AOUT64;
+ else
+ return AOUT_TYPE_NONE;
+}
+
+grub_err_t
+grub_aout_load (grub_file_t file, int offset,
+ void *load_addr,
+ int load_size, grub_size_t bss_size)
+{
+ if ((grub_file_seek (file, offset)) == (grub_off_t) - 1)
+ return grub_errno;
+
+ if (!load_size)
+ load_size = file->size - offset;
+
+ grub_file_read (file, load_addr, load_size);
+
+ if (grub_errno)
+ return grub_errno;
+
+ if (bss_size)
+ grub_memset ((char *) load_addr + load_size, 0, bss_size);
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c
new file mode 100644
index 0000000..db57a57
--- /dev/null
+++ b/grub-core/loader/efi/appleloader.c
@@ -0,0 +1,230 @@
+/* appleloader.c - apple legacy boot loader. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/loader.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+
+static grub_efi_handle_t image_handle;
+static grub_efi_char16_t *cmdline;
+
+static grub_err_t
+grub_appleloader_unload (void)
+{
+ grub_efi_boot_services_t *b;
+
+ b = grub_efi_system_table->boot_services;
+ efi_call_1 (b->unload_image, image_handle);
+
+ grub_free (cmdline);
+ cmdline = 0;
+
+ grub_dl_unref (my_mod);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_appleloader_boot (void)
+{
+ grub_efi_boot_services_t *b;
+
+ b = grub_efi_system_table->boot_services;
+ efi_call_3 (b->start_image, image_handle, 0, 0);
+
+ grub_appleloader_unload ();
+
+ return grub_errno;
+}
+
+struct piwg_full_device_path
+{
+ struct grub_efi_memory_mapped_device_path comp1;
+ struct grub_efi_piwg_device_path comp2;
+ struct grub_efi_device_path end;
+};
+
+#define MAKE_PIWG_PATH(st, en) \
+ { \
+ .comp1 = \
+ { \
+ .header = { \
+ .type = GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE, \
+ .subtype = GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE, \
+ .length = {sizeof (struct grub_efi_memory_mapped_device_path), 0} \
+ }, \
+ .memory_type = GRUB_EFI_MEMORY_MAPPED_IO, \
+ .start_address = st, \
+ .end_address = en \
+ }, \
+ .comp2 = \
+ { \
+ .header = { \
+ .type = GRUB_EFI_MEDIA_DEVICE_PATH_TYPE, \
+ .subtype = GRUB_EFI_PIWG_DEVICE_PATH_SUBTYPE, \
+ .length = {sizeof (struct grub_efi_piwg_device_path), 0} \
+ }, \
+ .guid = {0x2B0585EB, 0xD8B8, 0x49A9, {0x8B, 0x8C, 0xE2, 0x1B, \
+ 0x01, 0xAE, 0xF2, 0xB7}} \
+ }, \
+ .end = \
+ { \
+ .type = GRUB_EFI_END_DEVICE_PATH_TYPE, \
+ .subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE, \
+ .length = {sizeof (struct grub_efi_device_path), 0} \
+ } \
+ }
+
+/* early 2006 Core Duo / Core Solo models */
+static struct piwg_full_device_path devpath_1 = MAKE_PIWG_PATH (0xffe00000,
+ 0xfff9ffff);
+
+/* mid-2006 Mac Pro (and probably other Core 2 models) */
+static struct piwg_full_device_path devpath_2 = MAKE_PIWG_PATH (0xffe00000,
+ 0xfff7ffff);
+
+/* mid-2007 MBP ("Santa Rosa" based models) */
+static struct piwg_full_device_path devpath_3 = MAKE_PIWG_PATH (0xffe00000,
+ 0xfff8ffff);
+
+/* early-2008 MBA */
+static struct piwg_full_device_path devpath_4 = MAKE_PIWG_PATH (0xffc00000,
+ 0xfff8ffff);
+
+/* late-2008 MB/MBP (NVidia chipset) */
+static struct piwg_full_device_path devpath_5 = MAKE_PIWG_PATH (0xffcb4000,
+ 0xffffbfff);
+
+/* mid-2010 MB/MBP (NVidia chipset) */
+static struct piwg_full_device_path devpath_6 = MAKE_PIWG_PATH (0xffcc4000,
+ 0xffffbfff);
+
+struct devdata
+{
+ char *model;
+ grub_efi_device_path_t *devpath;
+};
+
+struct devdata devs[] =
+{
+ {"Core Duo/Solo", (grub_efi_device_path_t *) &devpath_1},
+ {"Mac Pro", (grub_efi_device_path_t *) &devpath_2},
+ {"MBP", (grub_efi_device_path_t *) &devpath_3},
+ {"MBA", (grub_efi_device_path_t *) &devpath_4},
+ {"MB NV", (grub_efi_device_path_t *) &devpath_5},
+ {"MB NV2", (grub_efi_device_path_t *) &devpath_6},
+ {NULL, NULL},
+};
+
+static grub_err_t
+grub_cmd_appleloader (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_efi_boot_services_t *b;
+ grub_efi_loaded_image_t *loaded_image;
+ struct devdata *pdev;
+
+ grub_dl_ref (my_mod);
+
+ /* Initialize some global variables. */
+ image_handle = 0;
+
+ b = grub_efi_system_table->boot_services;
+
+ for (pdev = devs ; pdev->devpath ; pdev++)
+ if (efi_call_6 (b->load_image, 0, grub_efi_image_handle, pdev->devpath,
+ NULL, 0, &image_handle) == GRUB_EFI_SUCCESS)
+ break;
+
+ if (! pdev->devpath)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "can't find model");
+ goto fail;
+ }
+
+ grub_printf ("Model : %s\n", pdev->model);
+
+ loaded_image = grub_efi_get_loaded_image (image_handle);
+ if (! loaded_image)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "no loaded image available");
+ goto fail;
+ }
+
+ if (argc > 0)
+ {
+ int i, len;
+ grub_efi_char16_t *p16;
+
+ for (i = 0, len = 0; i < argc; i++)
+ len += grub_strlen (argv[i]) + 1;
+
+ len *= sizeof (grub_efi_char16_t);
+ cmdline = p16 = grub_malloc (len);
+ if (! cmdline)
+ goto fail;
+
+ for (i = 0; i < argc; i++)
+ {
+ char *p8;
+
+ p8 = argv[i];
+ while (*p8)
+ *(p16++) = *(p8++);
+
+ *(p16++) = ' ';
+ }
+ *(--p16) = 0;
+
+ loaded_image->load_options = cmdline;
+ loaded_image->load_options_size = len;
+ }
+
+ grub_loader_set (grub_appleloader_boot, grub_appleloader_unload, 0);
+
+ return 0;
+
+ fail:
+
+ grub_dl_unref (my_mod);
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(appleloader)
+{
+ cmd = grub_register_command ("appleloader", grub_cmd_appleloader,
+ "[OPTS]", N_("Boot legacy system."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(appleloader)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
new file mode 100644
index 0000000..5dd5ada
--- /dev/null
+++ b/grub-core/loader/efi/chainloader.c
@@ -0,0 +1,355 @@
+/* chainloader.c - boot another boot loader */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* TODO: support load options. */
+
+#include <grub/loader.h>
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/charset.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/disk.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+
+static grub_efi_physical_address_t address;
+static grub_efi_uintn_t pages;
+static grub_efi_device_path_t *file_path;
+static grub_efi_handle_t image_handle;
+static grub_efi_char16_t *cmdline;
+
+static grub_err_t
+grub_chainloader_unload (void)
+{
+ grub_efi_boot_services_t *b;
+
+ b = grub_efi_system_table->boot_services;
+ efi_call_1 (b->unload_image, image_handle);
+ efi_call_2 (b->free_pages, address, pages);
+
+ grub_free (file_path);
+ grub_free (cmdline);
+ cmdline = 0;
+ file_path = 0;
+
+ grub_dl_unref (my_mod);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_chainloader_boot (void)
+{
+ grub_efi_boot_services_t *b;
+ grub_efi_status_t status;
+ grub_efi_uintn_t exit_data_size;
+ grub_efi_char16_t *exit_data = NULL;
+
+ b = grub_efi_system_table->boot_services;
+ status = efi_call_3 (b->start_image, image_handle, &exit_data_size, &exit_data);
+ if (status != GRUB_EFI_SUCCESS)
+ {
+ if (exit_data)
+ {
+ char *buf;
+
+ buf = grub_malloc (exit_data_size * 4 + 1);
+ if (buf)
+ {
+ *grub_utf16_to_utf8 ((grub_uint8_t *) buf,
+ exit_data, exit_data_size) = 0;
+
+ grub_error (GRUB_ERR_BAD_OS, buf);
+ grub_free (buf);
+ }
+ else
+ grub_error (GRUB_ERR_BAD_OS, "unknown error");
+ }
+ }
+
+ if (exit_data)
+ efi_call_1 (b->free_pool, exit_data);
+
+ grub_loader_unset ();
+
+ return grub_errno;
+}
+
+static void
+copy_file_path (grub_efi_file_path_device_path_t *fp,
+ const char *str, grub_efi_uint16_t len)
+{
+ grub_efi_char16_t *p;
+ grub_efi_uint16_t size;
+
+ fp->header.type = GRUB_EFI_MEDIA_DEVICE_PATH_TYPE;
+ fp->header.subtype = GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE;
+ size = len * sizeof (grub_efi_char16_t) + sizeof (*fp);
+ fp->header.length[0] = (grub_efi_uint8_t) (size & 0xff);
+ fp->header.length[1] = (grub_efi_uint8_t) (size >> 8);
+ for (p = fp->path_name; len > 0; len--, p++, str++)
+ {
+ /* FIXME: this assumes that the path is in ASCII. */
+ *p = (grub_efi_char16_t) (*str == '/' ? '\\' : *str);
+ }
+}
+
+static grub_efi_device_path_t *
+make_file_path (grub_efi_device_path_t *dp, const char *filename)
+{
+ char *dir_start;
+ char *dir_end;
+ grub_size_t size;
+ grub_efi_device_path_t *d;
+
+ dir_start = grub_strchr (filename, ')');
+ if (! dir_start)
+ dir_start = (char *) filename;
+ else
+ dir_start++;
+
+ dir_end = grub_strrchr (dir_start, '/');
+ if (! dir_end)
+ {
+ grub_error (GRUB_ERR_BAD_FILENAME, "invalid EFI file path");
+ return 0;
+ }
+
+ size = 0;
+ d = dp;
+ while (1)
+ {
+ size += GRUB_EFI_DEVICE_PATH_LENGTH (d);
+ if ((GRUB_EFI_END_ENTIRE_DEVICE_PATH (d)))
+ break;
+ d = GRUB_EFI_NEXT_DEVICE_PATH (d);
+ }
+
+ file_path = grub_malloc (size
+ + ((grub_strlen (dir_start) + 1)
+ * sizeof (grub_efi_char16_t))
+ + sizeof (grub_efi_file_path_device_path_t) * 2);
+ if (! file_path)
+ return 0;
+
+ grub_memcpy (file_path, dp, size);
+
+ /* Fill the file path for the directory. */
+ d = (grub_efi_device_path_t *) ((char *) file_path
+ + ((char *) d - (char *) dp));
+ grub_efi_print_device_path (d);
+ copy_file_path ((grub_efi_file_path_device_path_t *) d,
+ dir_start, dir_end - dir_start);
+
+ /* Fill the file path for the file. */
+ d = GRUB_EFI_NEXT_DEVICE_PATH (d);
+ copy_file_path ((grub_efi_file_path_device_path_t *) d,
+ dir_end + 1, grub_strlen (dir_end + 1));
+
+ /* Fill the end of device path nodes. */
+ d = GRUB_EFI_NEXT_DEVICE_PATH (d);
+ d->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
+ d->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
+ d->length[0] = sizeof (*d);
+ d->length[1] = 0;
+
+ return file_path;
+}
+
+static grub_err_t
+grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_ssize_t size;
+ grub_efi_status_t status;
+ grub_efi_boot_services_t *b;
+ grub_efi_handle_t dev_handle = 0;
+ grub_device_t dev = 0;
+ grub_efi_device_path_t *dp = 0;
+ grub_efi_loaded_image_t *loaded_image;
+ char *filename;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
+ filename = argv[0];
+
+ grub_dl_ref (my_mod);
+
+ /* Initialize some global variables. */
+ address = 0;
+ image_handle = 0;
+ file_path = 0;
+
+ b = grub_efi_system_table->boot_services;
+
+ file = grub_file_open (filename);
+ if (! file)
+ goto fail;
+
+ /* Get the root device's device path. */
+ dev = grub_device_open (0);
+ if (! dev)
+ goto fail;
+
+ if (dev->disk)
+ {
+ dev_handle = grub_efidisk_get_device_handle (dev->disk);
+ if (dev_handle)
+ dp = grub_efi_get_device_path (dev_handle);
+ }
+
+ if (! dev->disk || ! dev_handle || ! dp)
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "not a valid root device");
+ goto fail;
+ }
+
+ file_path = make_file_path (dp, filename);
+ if (! file_path)
+ goto fail;
+
+ grub_printf ("file path: ");
+ grub_efi_print_device_path (file_path);
+
+ size = grub_file_size (file);
+ if (!size)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "file is empty");
+ goto fail;
+ }
+ pages = (((grub_efi_uintn_t) size + ((1 << 12) - 1)) >> 12);
+
+ status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES,
+ GRUB_EFI_LOADER_CODE,
+ pages, &address);
+ if (status != GRUB_EFI_SUCCESS)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate %u pages", pages);
+ goto fail;
+ }
+
+ if (grub_file_read (file, (void *) ((grub_addr_t) address), size) != size)
+ {
+ if (grub_errno == GRUB_ERR_NONE)
+ grub_error (GRUB_ERR_BAD_OS, "too small");
+
+ goto fail;
+ }
+
+ status = efi_call_6 (b->load_image, 0, grub_efi_image_handle, file_path,
+ (void *) ((grub_addr_t) address), size,
+ &image_handle);
+ if (status != GRUB_EFI_SUCCESS)
+ {
+ if (status == GRUB_EFI_OUT_OF_RESOURCES)
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of resources");
+ else
+ grub_error (GRUB_ERR_BAD_OS, "cannot load image");
+
+ goto fail;
+ }
+
+ /* LoadImage does not set a device handler when the image is
+ loaded from memory, so it is necessary to set it explicitly here.
+ This is a mess. */
+ loaded_image = grub_efi_get_loaded_image (image_handle);
+ if (! loaded_image)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "no loaded image available");
+ goto fail;
+ }
+ loaded_image->device_handle = dev_handle;
+
+ grub_file_close (file);
+
+ if (argc > 1)
+ {
+ int i, len;
+ grub_efi_char16_t *p16;
+
+ for (i = 1, len = 0; i < argc; i++)
+ len += grub_strlen (argv[i]) + 1;
+
+ len *= sizeof (grub_efi_char16_t);
+ cmdline = p16 = grub_malloc (len);
+ if (! cmdline)
+ goto fail;
+
+ for (i = 1; i < argc; i++)
+ {
+ char *p8;
+
+ p8 = argv[i];
+ while (*p8)
+ *(p16++) = *(p8++);
+
+ *(p16++) = ' ';
+ }
+ *(--p16) = 0;
+
+ loaded_image->load_options = cmdline;
+ loaded_image->load_options_size = len;
+ }
+
+ grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0);
+ return 0;
+
+ fail:
+
+ if (dev)
+ grub_device_close (dev);
+
+ if (file)
+ grub_file_close (file);
+
+ if (file_path)
+ grub_free (file_path);
+
+ if (address)
+ efi_call_2 (b->free_pages, address, pages);
+
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(chainloader)
+{
+ cmd = grub_register_command ("chainloader", grub_cmd_chainloader,
+ 0, N_("Load another boot loader."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(chainloader)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
new file mode 100644
index 0000000..6487dc3
--- /dev/null
+++ b/grub-core/loader/i386/bsd.c
@@ -0,0 +1,1992 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/loader.h>
+#include <grub/i386/bsd.h>
+#include <grub/i386/cpuid.h>
+#include <grub/memory.h>
+#include <grub/i386/memory.h>
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/elfload.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/aout.h>
+#include <grub/command.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/ns8250.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#include <grub/video.h>
+#ifdef GRUB_MACHINE_PCBIOS
+#include <grub/machine/biosnum.h>
+#endif
+#ifdef GRUB_MACHINE_EFI
+#include <grub/efi/efi.h>
+#define NETBSD_DEFAULT_VIDEO_MODE "800x600"
+#else
+#define NETBSD_DEFAULT_VIDEO_MODE "text"
+#include <grub/i386/pc/vbe.h>
+#endif
+#include <grub/video.h>
+
+#include <grub/disk.h>
+#include <grub/device.h>
+#include <grub/partition.h>
+#include <grub/relocator.h>
+#include <grub/i386/relocator.h>
+
+#define ALIGN_DWORD(a) ALIGN_UP (a, 4)
+#define ALIGN_QWORD(a) ALIGN_UP (a, 8)
+#define ALIGN_VAR(a) ((is_64bit) ? (ALIGN_QWORD(a)) : (ALIGN_DWORD(a)))
+#define ALIGN_PAGE(a) ALIGN_UP (a, 4096)
+
+static int kernel_type = KERNEL_TYPE_NONE;
+static grub_dl_t my_mod;
+static grub_addr_t entry, entry_hi, kern_start, kern_end;
+static void *kern_chunk_src;
+static grub_uint32_t bootflags;
+static int is_elf_kernel, is_64bit;
+static grub_uint32_t openbsd_root;
+static struct grub_relocator *relocator = NULL;
+static struct grub_openbsd_ramdisk_descriptor openbsd_ramdisk;
+
+struct bsd_tag
+{
+ struct bsd_tag *next;
+ grub_size_t len;
+ grub_uint32_t type;
+ union {
+ grub_uint8_t a;
+ grub_uint16_t b;
+ grub_uint32_t c;
+ } data[0];
+};
+
+static struct bsd_tag *tags, *tags_last;
+
+struct netbsd_module
+{
+ struct netbsd_module *next;
+ struct grub_netbsd_btinfo_module mod;
+};
+
+static struct netbsd_module *netbsd_mods, *netbsd_mods_last;
+
+static const struct grub_arg_option freebsd_opts[] =
+ {
+ {"dual", 'D', 0, N_("Display output on all consoles."), 0, 0},
+ {"serial", 'h', 0, N_("Use serial console."), 0, 0},
+ {"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0},
+ {"cdrom", 'C', 0, N_("Use CDROM as root."), 0, 0},
+ {"config", 'c', 0, N_("Invoke user configuration routing."), 0, 0},
+ {"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0},
+ {"gdb", 'g', 0, N_("Use GDB remote debugger instead of DDB."), 0, 0},
+ {"mute", 'm', 0, N_("Disable all boot output."), 0, 0},
+ {"nointr", 'n', 0, "", 0, 0},
+ {"pause", 'p', 0, N_("Wait for keypress after every line of output."), 0, 0},
+ {"quiet", 'q', 0, "", 0, 0},
+ {"dfltroot", 'r', 0, N_("Use compiled-in rootdev."), 0, 0},
+ {"single", 's', 0, N_("Boot into single mode."), 0, 0},
+ {"verbose", 'v', 0, N_("Boot with verbose messages."), 0, 0},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static const grub_uint32_t freebsd_flags[] =
+{
+ FREEBSD_RB_DUAL, FREEBSD_RB_SERIAL, FREEBSD_RB_ASKNAME,
+ FREEBSD_RB_CDROM, FREEBSD_RB_CONFIG, FREEBSD_RB_KDB,
+ FREEBSD_RB_GDB, FREEBSD_RB_MUTE, FREEBSD_RB_NOINTR,
+ FREEBSD_RB_PAUSE, FREEBSD_RB_QUIET, FREEBSD_RB_DFLTROOT,
+ FREEBSD_RB_SINGLE, FREEBSD_RB_VERBOSE, 0
+};
+
+static const struct grub_arg_option openbsd_opts[] =
+ {
+ {"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0},
+ {"halt", 'b', 0, N_("Don't reboot, just halt."), 0, 0},
+ {"config", 'c', 0, N_("Change configured devices."), 0, 0},
+ {"single", 's', 0, N_("Boot into single mode."), 0, 0},
+ {"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0},
+ {"root", 'r', 0, N_("Set root device."), "wdXY", ARG_TYPE_STRING},
+ {"serial", 'h', GRUB_ARG_OPTION_OPTIONAL,
+ N_("Use serial console."), N_("comUNIT[,SPEED]"), ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static const grub_uint32_t openbsd_flags[] =
+{
+ OPENBSD_RB_ASKNAME, OPENBSD_RB_HALT, OPENBSD_RB_CONFIG,
+ OPENBSD_RB_SINGLE, OPENBSD_RB_KDB, 0
+};
+
+#define OPENBSD_ROOT_ARG (ARRAY_SIZE (openbsd_flags) - 1)
+#define OPENBSD_SERIAL_ARG (ARRAY_SIZE (openbsd_flags))
+
+static const struct grub_arg_option netbsd_opts[] =
+ {
+ {"no-smp", '1', 0, N_("Disable SMP."), 0, 0},
+ {"no-acpi", '2', 0, N_("Disable ACPI."), 0, 0},
+ {"askname", 'a', 0, N_("Ask for file name to reboot from."), 0, 0},
+ {"halt", 'b', 0, N_("Don't reboot, just halt."), 0, 0},
+ {"config", 'c', 0, N_("Change configured devices."), 0, 0},
+ {"kdb", 'd', 0, N_("Enter in KDB on boot."), 0, 0},
+ {"miniroot", 'm', 0, "", 0, 0},
+ {"quiet", 'q', 0, N_("Don't display boot diagnostic messages."), 0, 0},
+ {"single", 's', 0, N_("Boot into single mode."), 0, 0},
+ {"verbose", 'v', 0, N_("Boot with verbose messages."), 0, 0},
+ {"debug", 'x', 0, N_("Boot with debug messages."), 0, 0},
+ {"silent", 'z', 0, N_("Supress normal output (warnings remain)."), 0, 0},
+ {"root", 'r', 0, N_("Set root device."), N_("DEVICE"), ARG_TYPE_STRING},
+ {"serial", 'h', GRUB_ARG_OPTION_OPTIONAL,
+ N_("Use serial console."), N_("[ADDR|comUNIT][,SPEED]"), ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static const grub_uint32_t netbsd_flags[] =
+{
+ NETBSD_AB_NOSMP, NETBSD_AB_NOACPI, NETBSD_RB_ASKNAME,
+ NETBSD_RB_HALT, NETBSD_RB_USERCONFIG, NETBSD_RB_KDB,
+ NETBSD_RB_MINIROOT, NETBSD_AB_QUIET, NETBSD_RB_SINGLE,
+ NETBSD_AB_VERBOSE, NETBSD_AB_DEBUG, NETBSD_AB_SILENT, 0
+};
+
+#define NETBSD_ROOT_ARG (ARRAY_SIZE (netbsd_flags) - 1)
+#define NETBSD_SERIAL_ARG (ARRAY_SIZE (netbsd_flags))
+
+static void
+grub_bsd_get_device (grub_uint32_t * biosdev,
+ grub_uint32_t * unit,
+ grub_uint32_t * slice, grub_uint32_t * part)
+{
+ grub_device_t dev;
+
+#ifdef GRUB_MACHINE_PCBIOS
+ *biosdev = grub_get_root_biosnumber () & 0xff;
+#else
+ *biosdev = 0xff;
+#endif
+ *unit = (*biosdev & 0x7f);
+ *slice = 0xff;
+ *part = 0xff;
+ dev = grub_device_open (0);
+ if (dev && dev->disk && dev->disk->partition)
+ {
+ if (dev->disk->partition->parent)
+ {
+ *part = dev->disk->partition->number;
+ *slice = dev->disk->partition->parent->number + 1;
+ }
+ else
+ *slice = dev->disk->partition->number + 1;
+ }
+ if (dev)
+ grub_device_close (dev);
+}
+
+grub_err_t
+grub_bsd_add_meta (grub_uint32_t type, void *data, grub_uint32_t len)
+{
+ struct bsd_tag *newtag;
+
+ newtag = grub_malloc (len + sizeof (struct bsd_tag));
+ if (!newtag)
+ return grub_errno;
+ newtag->len = len;
+ newtag->type = type;
+ newtag->next = NULL;
+ if (len)
+ grub_memcpy (newtag->data, data, len);
+
+ if (kernel_type == KERNEL_TYPE_FREEBSD
+ && type == (FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_SMAP))
+ {
+ struct bsd_tag *p;
+ for (p = tags;
+ p->type != (FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_KERNEND);
+ p = p->next);
+
+ if (p)
+ {
+ newtag->next = p->next;
+ p->next = newtag;
+ if (newtag->next == NULL)
+ tags_last = newtag;
+ return GRUB_ERR_NONE;
+ }
+ }
+
+ if (tags_last)
+ tags_last->next = newtag;
+ else
+ tags = newtag;
+ tags_last = newtag;
+
+ return GRUB_ERR_NONE;
+}
+
+struct grub_e820_mmap
+{
+ grub_uint64_t addr;
+ grub_uint64_t size;
+ grub_uint32_t type;
+} __attribute__((packed));
+#define GRUB_E820_RAM 1
+#define GRUB_E820_RESERVED 2
+#define GRUB_E820_ACPI 3
+#define GRUB_E820_NVS 4
+#define GRUB_E820_BADRAM 5
+
+static void
+generate_e820_mmap (grub_size_t *len, grub_size_t *cnt, void *buf)
+{
+ int count = 0;
+ struct grub_e820_mmap *mmap = buf;
+ struct grub_e820_mmap prev, cur;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ cur.addr = addr;
+ cur.size = size;
+ switch (type)
+ {
+ case GRUB_MEMORY_AVAILABLE:
+ cur.type = GRUB_E820_RAM;
+ break;
+
+ case GRUB_MEMORY_ACPI:
+ cur.type = GRUB_E820_ACPI;
+ break;
+
+ case GRUB_MEMORY_NVS:
+ cur.type = GRUB_E820_NVS;
+ break;
+
+ default:
+ case GRUB_MEMORY_CODE:
+ case GRUB_MEMORY_RESERVED:
+ cur.type = GRUB_E820_RESERVED;
+ break;
+ }
+
+ /* Merge regions if possible. */
+ if (count && cur.type == prev.type && cur.addr == prev.addr + prev.size)
+ {
+ prev.size += cur.size;
+ if (mmap)
+ mmap[-1] = prev;
+ }
+ else
+ {
+ if (mmap)
+ *mmap++ = cur;
+ prev = cur;
+ count++;
+ }
+
+ if (kernel_type == KERNEL_TYPE_OPENBSD && prev.addr < 0x100000
+ && prev.addr + prev.size > 0x100000)
+ {
+ cur.addr = 0x100000;
+ cur.size = prev.addr + prev.size - 0x100000;
+ cur.type = prev.type;
+ prev.size = 0x100000 - prev.addr;
+ if (mmap)
+ {
+ mmap[-1] = prev;
+ mmap[0] = cur;
+ mmap++;
+ }
+ prev = cur;
+ count++;
+ }
+
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+
+ if (len)
+ *len = count * sizeof (struct grub_e820_mmap);
+ *cnt = count;
+
+ return;
+}
+
+static grub_err_t
+grub_bsd_add_mmap (void)
+{
+ grub_size_t len, cnt;
+ void *buf = NULL, *buf0;
+
+ generate_e820_mmap (&len, &cnt, buf);
+
+ if (kernel_type == KERNEL_TYPE_NETBSD)
+ len += sizeof (grub_uint32_t);
+
+ if (kernel_type == KERNEL_TYPE_OPENBSD)
+ len += sizeof (struct grub_e820_mmap);
+
+ buf = grub_malloc (len);
+ if (!buf)
+ return grub_errno;
+
+ buf0 = buf;
+ if (kernel_type == KERNEL_TYPE_NETBSD)
+ {
+ *(grub_uint32_t *) buf = cnt;
+ buf = ((grub_uint32_t *) buf + 1);
+ }
+
+ generate_e820_mmap (NULL, &cnt, buf);
+
+ if (kernel_type == KERNEL_TYPE_OPENBSD)
+ grub_memset ((grub_uint8_t *) buf + len - sizeof (struct grub_e820_mmap), 0,
+ sizeof (struct grub_e820_mmap));
+
+ grub_dprintf ("bsd", "%u entries in smap\n", (unsigned) cnt);
+ if (kernel_type == KERNEL_TYPE_NETBSD)
+ grub_bsd_add_meta (NETBSD_BTINFO_MEMMAP, buf0, len);
+ else if (kernel_type == KERNEL_TYPE_OPENBSD)
+ grub_bsd_add_meta (OPENBSD_BOOTARG_MMAP, buf0, len);
+ else
+ grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_SMAP, buf0, len);
+
+ grub_free (buf0);
+
+ return grub_errno;
+}
+
+grub_err_t
+grub_freebsd_add_meta_module (char *filename, char *type, int argc, char **argv,
+ grub_addr_t addr, grub_uint32_t size)
+{
+ char *name;
+ name = grub_strrchr (filename, '/');
+ if (name)
+ name++;
+ else
+ name = filename;
+ if (grub_strcmp (type, "/boot/zfs/zpool.cache") == 0)
+ name = "/boot/zfs/zpool.cache";
+
+ if (grub_bsd_add_meta (FREEBSD_MODINFO_NAME, name, grub_strlen (name) + 1))
+ return grub_errno;
+
+ if (is_64bit)
+ {
+ grub_uint64_t addr64 = addr, size64 = size;
+ if (grub_bsd_add_meta (FREEBSD_MODINFO_TYPE, type, grub_strlen (type) + 1)
+ || grub_bsd_add_meta (FREEBSD_MODINFO_ADDR, &addr64, sizeof (addr64))
+ || grub_bsd_add_meta (FREEBSD_MODINFO_SIZE, &size64, sizeof (size64)))
+ return grub_errno;
+ }
+ else
+ {
+ if (grub_bsd_add_meta (FREEBSD_MODINFO_TYPE, type, grub_strlen (type) + 1)
+ || grub_bsd_add_meta (FREEBSD_MODINFO_ADDR, &addr, sizeof (addr))
+ || grub_bsd_add_meta (FREEBSD_MODINFO_SIZE, &size, sizeof (size)))
+ return grub_errno;
+ }
+
+ if (argc)
+ {
+ int i, n;
+
+ n = 0;
+ for (i = 0; i < argc; i++)
+ {
+ n += grub_strlen (argv[i]) + 1;
+ }
+
+ if (n)
+ {
+ char cmdline[n], *p;
+
+ p = cmdline;
+ for (i = 0; i < argc; i++)
+ {
+ grub_strcpy (p, argv[i]);
+ p += grub_strlen (argv[i]);
+ *(p++) = ' ';
+ }
+ *p = 0;
+
+ if (grub_bsd_add_meta (FREEBSD_MODINFO_ARGS, cmdline, n))
+ return grub_errno;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_freebsd_list_modules (void)
+{
+ struct bsd_tag *tag;
+
+ grub_printf (" %-18s %-18s%14s%14s\n", "name", "type", "addr", "size");
+
+ for (tag = tags; tag; tag = tag->next)
+ {
+ switch (tag->type)
+ {
+ case FREEBSD_MODINFO_NAME:
+ case FREEBSD_MODINFO_TYPE:
+ grub_printf (" %-18s", (char *) tag->data);
+ break;
+ case FREEBSD_MODINFO_ADDR:
+ {
+ grub_uint32_t addr;
+
+ addr = *((grub_uint32_t *) tag->data);
+ grub_printf (" 0x%08x", addr);
+ break;
+ }
+ case FREEBSD_MODINFO_SIZE:
+ {
+ grub_uint32_t len;
+
+ len = *((grub_uint32_t *) tag->data);
+ grub_printf (" 0x%08x\n", len);
+ }
+ }
+ }
+}
+
+static grub_err_t
+grub_netbsd_add_meta_module (char *filename, grub_uint32_t type,
+ grub_addr_t addr, grub_uint32_t size)
+{
+ char *name;
+ struct netbsd_module *mod;
+ name = grub_strrchr (filename, '/');
+
+ if (name)
+ name++;
+ else
+ name = filename;
+
+ mod = grub_zalloc (sizeof (*mod));
+ if (!mod)
+ return grub_errno;
+
+ grub_strncpy (mod->mod.name, name, sizeof (mod->mod.name) - 1);
+ mod->mod.addr = addr;
+ mod->mod.type = type;
+ mod->mod.size = size;
+
+ if (netbsd_mods_last)
+ netbsd_mods_last->next = mod;
+ else
+ netbsd_mods = mod;
+ netbsd_mods_last = mod;
+
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_netbsd_list_modules (void)
+{
+ struct netbsd_module *mod;
+
+ grub_printf (" %-18s%14s%14s%14s\n", "name", "type", "addr", "size");
+
+ for (mod = netbsd_mods; mod; mod = mod->next)
+ grub_printf (" %-18s 0x%08x 0x%08x 0x%08x", mod->mod.name,
+ mod->mod.type, mod->mod.addr, mod->mod.size);
+}
+
+/* This function would be here but it's under different license. */
+#include "bsd_pagetable.c"
+
+static grub_uint32_t freebsd_bootdev, freebsd_biosdev;
+
+static grub_err_t
+grub_freebsd_boot (void)
+{
+ struct grub_freebsd_bootinfo bi;
+ grub_uint8_t *p, *p0;
+ grub_addr_t p_target;
+ grub_size_t p_size = 0;
+ grub_err_t err;
+ grub_size_t tag_buf_len = 0;
+
+ auto int iterate_env (struct grub_env_var *var);
+ int iterate_env (struct grub_env_var *var)
+ {
+ if ((!grub_memcmp (var->name, "kFreeBSD.", sizeof("kFreeBSD.") - 1)) && (var->name[sizeof("kFreeBSD.") - 1]))
+ {
+ grub_strcpy ((char *) p, &var->name[sizeof("kFreeBSD.") - 1]);
+ p += grub_strlen ((char *) p);
+ *(p++) = '=';
+ grub_strcpy ((char *) p, var->value);
+ p += grub_strlen ((char *) p) + 1;
+ }
+
+ return 0;
+ }
+
+ auto int iterate_env_count (struct grub_env_var *var);
+ int iterate_env_count (struct grub_env_var *var)
+ {
+ if ((!grub_memcmp (var->name, "kFreeBSD.", sizeof("kFreeBSD.") - 1)) && (var->name[sizeof("kFreeBSD.") - 1]))
+ {
+ p_size += grub_strlen (&var->name[sizeof("kFreeBSD.") - 1]);
+ p_size++;
+ p_size += grub_strlen (var->value) + 1;
+ }
+
+ return 0;
+ }
+
+ grub_memset (&bi, 0, sizeof (bi));
+ bi.version = FREEBSD_BOOTINFO_VERSION;
+ bi.length = sizeof (bi);
+
+ bi.boot_device = freebsd_biosdev;
+
+ p_size = 0;
+ grub_env_iterate (iterate_env_count);
+
+ if (p_size)
+ p_size = ALIGN_PAGE (kern_end + p_size + 1) - kern_end;
+
+ if (is_elf_kernel)
+ {
+ struct bsd_tag *tag;
+
+ err = grub_bsd_add_mmap ();
+ if (err)
+ return err;
+
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_END, 0, 0);
+ if (err)
+ return err;
+
+ tag_buf_len = 0;
+ for (tag = tags; tag; tag = tag->next)
+ tag_buf_len = ALIGN_VAR (tag_buf_len
+ + sizeof (struct freebsd_tag_header)
+ + tag->len);
+ p_size = ALIGN_PAGE (kern_end + p_size + tag_buf_len) - kern_end;
+ }
+
+ if (is_64bit)
+ p_size += 4096 * 3;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ kern_end, p_size);
+ if (err)
+ return err;
+ p = get_virtual_current_address (ch);
+ }
+ p_target = kern_end;
+ p0 = p;
+ kern_end += p_size;
+
+ grub_env_iterate (iterate_env);
+
+ if (p != p0)
+ {
+ *(p++) = 0;
+
+ bi.environment = p_target;
+ }
+
+ if (is_elf_kernel)
+ {
+ grub_uint8_t *p_tag = p;
+ struct bsd_tag *tag;
+
+ for (tag = tags; tag; tag = tag->next)
+ {
+ struct freebsd_tag_header *head
+ = (struct freebsd_tag_header *) p_tag;
+ head->type = tag->type;
+ head->len = tag->len;
+ p_tag += sizeof (struct freebsd_tag_header);
+ switch (tag->type)
+ {
+ case FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_HOWTO:
+ if (is_64bit)
+ *(grub_uint64_t *) p_tag = bootflags;
+ else
+ *(grub_uint32_t *) p_tag = bootflags;
+ break;
+
+ case FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_ENVP:
+ if (is_64bit)
+ *(grub_uint64_t *) p_tag = bi.environment;
+ else
+ *(grub_uint32_t *) p_tag = bi.environment;
+ break;
+
+ case FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_KERNEND:
+ if (is_64bit)
+ *(grub_uint64_t *) p_tag = kern_end;
+ else
+ *(grub_uint32_t *) p_tag = kern_end;
+ break;
+
+ default:
+ grub_memcpy (p_tag, tag->data, tag->len);
+ break;
+ }
+ p_tag += tag->len;
+ p_tag = ALIGN_VAR (p_tag - p) + p;
+ }
+
+ bi.tags = (p - p0) + p_target;
+
+ p = (ALIGN_PAGE ((p_tag - p0) + p_target) - p_target) + p0;
+ }
+
+ bi.kern_end = kern_end;
+
+ grub_video_set_mode ("text", 0, 0);
+
+ if (is_64bit)
+ {
+ struct grub_relocator64_state state;
+ grub_uint8_t *pagetable;
+ grub_uint32_t *stack;
+ grub_addr_t stack_target;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (relocator, &ch,
+ 0x10000, 0x90000,
+ 3 * sizeof (grub_uint32_t)
+ + sizeof (bi), 4,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+ stack = get_virtual_current_address (ch);
+ stack_target = get_physical_target_address (ch);
+ }
+
+#ifdef GRUB_MACHINE_EFI
+ err = grub_efi_finish_boot_services (NULL, NULL, NULL, NULL, NULL);
+ if (err)
+ return err;
+#endif
+
+ pagetable = p;
+ fill_bsd64_pagetable (pagetable, (pagetable - p0) + p_target);
+
+ state.cr3 = (pagetable - p0) + p_target;
+ state.rsp = stack_target;
+ state.rip = (((grub_uint64_t) entry_hi) << 32) | entry;
+
+ stack[0] = entry;
+ stack[1] = bi.tags;
+ stack[2] = kern_end;
+ return grub_relocator64_boot (relocator, state, 0, 0x40000000);
+ }
+ else
+ {
+ struct grub_relocator32_state state;
+ grub_uint32_t *stack;
+ grub_addr_t stack_target;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (relocator, &ch,
+ 0x10000, 0x90000,
+ 9 * sizeof (grub_uint32_t)
+ + sizeof (bi), 4,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+ stack = get_virtual_current_address (ch);
+ stack_target = get_physical_target_address (ch);
+ }
+
+#ifdef GRUB_MACHINE_EFI
+ err = grub_efi_finish_boot_services (NULL, NULL, NULL, NULL, NULL);
+ if (err)
+ return err;
+#endif
+
+ grub_memcpy (&stack[9], &bi, sizeof (bi));
+ state.eip = entry;
+ state.esp = stack_target;
+ state.ebp = stack_target;
+ stack[0] = entry; /* "Return" address. */
+ stack[1] = bootflags | FREEBSD_RB_BOOTINFO;
+ stack[2] = freebsd_bootdev;
+ stack[3] = 0;
+ stack[4] = 0;
+ stack[5] = 0;
+ stack[6] = stack_target + 9 * sizeof (grub_uint32_t);
+ stack[7] = bi.tags;
+ stack[8] = kern_end;
+ return grub_relocator32_boot (relocator, state);
+ }
+
+ /* Not reached. */
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_openbsd_boot (void)
+{
+ grub_uint32_t *stack;
+ struct grub_relocator32_state state;
+ void *curarg, *buf0, *arg0;
+ grub_addr_t buf_target;
+ grub_err_t err;
+ grub_size_t tag_buf_len;
+
+ err = grub_bsd_add_mmap ();
+ if (err)
+ return err;
+
+ {
+ struct bsd_tag *tag;
+ tag_buf_len = 0;
+ for (tag = tags; tag; tag = tag->next)
+ tag_buf_len = ALIGN_VAR (tag_buf_len
+ + sizeof (struct grub_openbsd_bootargs)
+ + tag->len);
+ }
+
+ buf_target = GRUB_BSD_TEMP_BUFFER - 9 * sizeof (grub_uint32_t);
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch, buf_target,
+ tag_buf_len
+ + sizeof (struct grub_openbsd_bootargs)
+ + 9 * sizeof (grub_uint32_t));
+ if (err)
+ return err;
+ buf0 = get_virtual_current_address (ch);
+ }
+
+ stack = (grub_uint32_t *) buf0;
+ arg0 = curarg = stack + 9;
+
+ {
+ struct bsd_tag *tag;
+ struct grub_openbsd_bootargs *head;
+
+ for (tag = tags; tag; tag = tag->next)
+ {
+ head = curarg;
+ head->ba_type = tag->type;
+ head->ba_size = tag->len + sizeof (*head);
+ curarg = head + 1;
+ grub_memcpy (curarg, tag->data, tag->len);
+ curarg = (grub_uint8_t *) curarg + tag->len;
+ head->ba_next = (grub_uint8_t *) curarg - (grub_uint8_t *) buf0
+ + buf_target;
+ }
+ head = curarg;
+ head->ba_type = OPENBSD_BOOTARG_END;
+ head->ba_size = 0;
+ head->ba_next = 0;
+ }
+
+ grub_video_set_mode ("text", 0, 0);
+
+#ifdef GRUB_MACHINE_EFI
+ err = grub_efi_finish_boot_services (NULL, NULL, NULL, NULL, NULL);
+ if (err)
+ return err;
+#endif
+
+ state.eip = entry;
+ state.ebp = state.esp
+ = ((grub_uint8_t *) stack - (grub_uint8_t *) buf0) + buf_target;
+ stack[0] = entry;
+ stack[1] = bootflags;
+ stack[2] = openbsd_root;
+ stack[3] = OPENBSD_BOOTARG_APIVER;
+ stack[4] = 0;
+ stack[5] = grub_mmap_get_upper () >> 10;
+ stack[6] = grub_mmap_get_lower () >> 10;
+ stack[7] = (grub_uint8_t *) curarg - (grub_uint8_t *) arg0;
+ stack[8] = ((grub_uint8_t *) arg0 - (grub_uint8_t *) buf0) + buf_target;
+
+ return grub_relocator32_boot (relocator, state);
+}
+
+static grub_err_t
+grub_netbsd_setup_video (void)
+{
+ struct grub_video_mode_info mode_info;
+ void *framebuffer;
+ const char *modevar;
+ struct grub_netbsd_btinfo_framebuf params;
+ grub_err_t err;
+ grub_video_driver_id_t driv_id;
+
+ modevar = grub_env_get ("gfxpayload");
+
+ /* Now all graphical modes are acceptable.
+ May change in future if we have modes without framebuffer. */
+ if (modevar && *modevar != 0)
+ {
+ char *tmp;
+ tmp = grub_xasprintf ("%s;" NETBSD_DEFAULT_VIDEO_MODE, modevar);
+ if (! tmp)
+ return grub_errno;
+ err = grub_video_set_mode (tmp, 0, 0);
+ grub_free (tmp);
+ }
+ else
+ err = grub_video_set_mode (NETBSD_DEFAULT_VIDEO_MODE, 0, 0);
+
+ if (err)
+ return err;
+
+ driv_id = grub_video_get_driver_id ();
+ if (driv_id == GRUB_VIDEO_DRIVER_NONE)
+ return GRUB_ERR_NONE;
+
+ err = grub_video_get_info_and_fini (&mode_info, &framebuffer);
+
+ if (err)
+ return err;
+
+ params.width = mode_info.width;
+ params.height = mode_info.height;
+ params.bpp = mode_info.bpp;
+ params.pitch = mode_info.pitch;
+ params.flags = 0;
+
+ params.fbaddr = (grub_addr_t) framebuffer;
+
+ params.red_mask_size = mode_info.red_mask_size;
+ params.red_field_pos = mode_info.red_field_pos;
+ params.green_mask_size = mode_info.green_mask_size;
+ params.green_field_pos = mode_info.green_field_pos;
+ params.blue_mask_size = mode_info.blue_mask_size;
+ params.blue_field_pos = mode_info.blue_field_pos;
+
+#ifdef GRUB_MACHINE_PCBIOS
+ /* VESA packed modes may come with zeroed mask sizes, which need
+ to be set here according to DAC Palette width. If we don't,
+ this results in Linux displaying a black screen. */
+ if (mode_info.bpp <= 8 && driv_id == GRUB_VIDEO_DRIVER_VBE)
+ {
+ struct grub_vbe_info_block controller_info;
+ int status;
+ int width = 8;
+
+ status = grub_vbe_bios_get_controller_info (&controller_info);
+
+ if (status == GRUB_VBE_STATUS_OK &&
+ (controller_info.capabilities & GRUB_VBE_CAPABILITY_DACWIDTH))
+ status = grub_vbe_bios_set_dac_palette_width (&width);
+
+ if (status != GRUB_VBE_STATUS_OK)
+ /* 6 is default after mode reset. */
+ width = 6;
+
+ params.red_mask_size = params.green_mask_size
+ = params.blue_mask_size = width;
+ }
+#endif
+
+ err = grub_bsd_add_meta (NETBSD_BTINFO_FRAMEBUF, &params, sizeof (params));
+ return err;
+}
+
+static grub_err_t
+grub_netbsd_add_modules (void)
+{
+ struct netbsd_module *mod;
+ unsigned modcnt = 0;
+ struct grub_netbsd_btinfo_modules *mods;
+ unsigned i;
+ grub_err_t err;
+
+ for (mod = netbsd_mods; mod; mod = mod->next)
+ modcnt++;
+
+ mods = grub_malloc (sizeof (*mods) + sizeof (mods->mods[0]) * modcnt);
+ if (!mods)
+ return grub_errno;
+
+ mods->num = modcnt;
+ mods->last_addr = kern_end;
+ for (mod = netbsd_mods, i = 0; mod; i++, mod = mod->next)
+ mods->mods[i] = mod->mod;
+
+ err = grub_bsd_add_meta (NETBSD_BTINFO_MODULES, mods,
+ sizeof (*mods) + sizeof (mods->mods[0]) * modcnt);
+ grub_free (mods);
+ return err;
+}
+
+static grub_err_t
+grub_netbsd_boot (void)
+{
+ struct grub_netbsd_bootinfo *bootinfo;
+ void *curarg, *arg0;
+ grub_addr_t arg_target, stack_target;
+ grub_uint32_t *stack;
+ grub_err_t err;
+ struct grub_relocator32_state state;
+ grub_size_t tag_buf_len = 0;
+ int tag_count = 0;
+
+ err = grub_bsd_add_mmap ();
+ if (err)
+ return err;
+
+ err = grub_netbsd_setup_video ();
+ if (err)
+ {
+ grub_print_error ();
+ grub_printf ("Booting however\n");
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ err = grub_netbsd_add_modules ();
+ if (err)
+ return err;
+
+ {
+ struct bsd_tag *tag;
+ tag_buf_len = 0;
+ for (tag = tags; tag; tag = tag->next)
+ {
+ tag_buf_len = ALIGN_VAR (tag_buf_len
+ + sizeof (struct grub_netbsd_btinfo_common)
+ + tag->len);
+ tag_count++;
+ }
+ }
+
+ arg_target = kern_end;
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ arg_target, tag_buf_len
+ + sizeof (struct grub_netbsd_bootinfo)
+ + tag_count * sizeof (grub_uint32_t));
+ if (err)
+ return err;
+ curarg = get_virtual_current_address (ch);
+ }
+
+ arg0 = curarg;
+ bootinfo = (void *) ((grub_uint8_t *) arg0 + tag_buf_len);
+
+ {
+ struct bsd_tag *tag;
+ unsigned i;
+
+ bootinfo->bi_count = tag_count;
+ for (tag = tags, i = 0; tag; i++, tag = tag->next)
+ {
+ struct grub_netbsd_btinfo_common *head = curarg;
+ bootinfo->bi_data[i] = ((grub_uint8_t *) curarg - (grub_uint8_t *) arg0)
+ + arg_target;
+ head->type = tag->type;
+ head->len = tag->len + sizeof (*head);
+ curarg = head + 1;
+ grub_memcpy (curarg, tag->data, tag->len);
+ curarg = (grub_uint8_t *) curarg + tag->len;
+ }
+ }
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (relocator, &ch, 0x10000, 0x90000,
+ 7 * sizeof (grub_uint32_t), 4,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+ stack = get_virtual_current_address (ch);
+ stack_target = get_physical_target_address (ch);
+ }
+
+#ifdef GRUB_MACHINE_EFI
+ err = grub_efi_finish_boot_services (NULL, NULL, NULL, NULL, NULL);
+ if (err)
+ return err;
+#endif
+
+ state.eip = entry;
+ state.esp = stack_target;
+ state.ebp = stack_target;
+ stack[0] = entry;
+ stack[1] = bootflags;
+ stack[2] = 0;
+ stack[3] = ((grub_uint8_t *) bootinfo - (grub_uint8_t *) arg0) + arg_target;
+ stack[4] = 0;
+ stack[5] = grub_mmap_get_upper () >> 10;
+ stack[6] = grub_mmap_get_lower () >> 10;
+
+ return grub_relocator32_boot (relocator, state);
+}
+
+static grub_err_t
+grub_bsd_unload (void)
+{
+ struct bsd_tag *tag, *next;
+ for (tag = tags; tag; tag = next)
+ {
+ next = tag->next;
+ grub_free (tag);
+ }
+ tags = NULL;
+ tags_last = NULL;
+
+ kernel_type = KERNEL_TYPE_NONE;
+ grub_dl_unref (my_mod);
+
+ grub_relocator_unload (relocator);
+ relocator = NULL;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_bsd_load_aout (grub_file_t file)
+{
+ grub_addr_t load_addr, load_end;
+ int ofs, align_page;
+ union grub_aout_header ah;
+ grub_err_t err;
+ grub_size_t bss_size;
+
+ if ((grub_file_seek (file, 0)) == (grub_off_t) - 1)
+ return grub_errno;
+
+ if (grub_file_read (file, &ah, sizeof (ah)) != sizeof (ah))
+ return grub_error (GRUB_ERR_READ_ERROR, "cannot read the a.out header");
+
+ if (grub_aout_get_type (&ah) != AOUT_TYPE_AOUT32)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid a.out header");
+
+ entry = ah.aout32.a_entry & 0xFFFFFF;
+
+ if (AOUT_GETMAGIC (ah.aout32) == AOUT32_ZMAGIC)
+ {
+ load_addr = entry;
+ ofs = 0x1000;
+ align_page = 0;
+ }
+ else
+ {
+ load_addr = entry & 0xF00000;
+ ofs = sizeof (struct grub_aout32_header);
+ align_page = 1;
+ }
+
+ if (load_addr < 0x100000)
+ return grub_error (GRUB_ERR_BAD_OS, "load address below 1M");
+
+ kern_start = load_addr;
+ load_end = kern_end = load_addr + ah.aout32.a_text + ah.aout32.a_data;
+ if (align_page)
+ kern_end = ALIGN_PAGE (kern_end);
+
+ if (ah.aout32.a_bss)
+ {
+ kern_end += ah.aout32.a_bss;
+ if (align_page)
+ kern_end = ALIGN_PAGE (kern_end);
+
+ bss_size = kern_end - load_end;
+ }
+ else
+ bss_size = 0;
+
+ {
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ kern_start, kern_end - kern_start);
+ if (err)
+ return err;
+ kern_chunk_src = get_virtual_current_address (ch);
+ }
+
+ return grub_aout_load (file, ofs, kern_chunk_src,
+ ah.aout32.a_text + ah.aout32.a_data,
+ bss_size);
+}
+
+static int NESTED_FUNC_ATTR
+grub_bsd_elf32_size_hook (grub_elf_t elf __attribute__ ((unused)),
+ Elf32_Phdr *phdr, void *arg __attribute__ ((unused)))
+{
+ Elf32_Addr paddr;
+
+ if (phdr->p_type != PT_LOAD
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+ paddr = phdr->p_paddr & 0xFFFFFF;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+
+ if (paddr + phdr->p_memsz > kern_end)
+ kern_end = paddr + phdr->p_memsz;
+
+ return 0;
+}
+
+static grub_err_t
+grub_bsd_elf32_hook (Elf32_Phdr * phdr, grub_addr_t * addr, int *do_load)
+{
+ Elf32_Addr paddr;
+
+ if (phdr->p_type != PT_LOAD
+ && phdr->p_type != PT_DYNAMIC)
+ {
+ *do_load = 0;
+ return 0;
+ }
+
+ *do_load = 1;
+ phdr->p_paddr &= 0xFFFFFF;
+ paddr = phdr->p_paddr;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+
+ return GRUB_ERR_NONE;
+}
+
+static int NESTED_FUNC_ATTR
+grub_bsd_elf64_size_hook (grub_elf_t elf __attribute__ ((unused)),
+ Elf64_Phdr *phdr, void *arg __attribute__ ((unused)))
+{
+ Elf64_Addr paddr;
+
+ if (phdr->p_type != PT_LOAD
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+ paddr = phdr->p_paddr & 0xffffff;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+
+ if (paddr + phdr->p_memsz > kern_end)
+ kern_end = paddr + phdr->p_memsz;
+
+ return 0;
+}
+
+static grub_err_t
+grub_bsd_elf64_hook (Elf64_Phdr * phdr, grub_addr_t * addr, int *do_load)
+{
+ Elf64_Addr paddr;
+
+ if (phdr->p_type != PT_LOAD
+ && phdr->p_type != PT_DYNAMIC)
+ {
+ *do_load = 0;
+ return 0;
+ }
+
+ *do_load = 1;
+ paddr = phdr->p_paddr & 0xffffff;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_bsd_load_elf (grub_elf_t elf)
+{
+ grub_err_t err;
+
+ kern_end = 0;
+ kern_start = ~0;
+
+ if (grub_elf_is_elf32 (elf))
+ {
+ grub_relocator_chunk_t ch;
+
+ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
+ err = grub_elf32_phdr_iterate (elf, grub_bsd_elf32_size_hook, NULL);
+ if (err)
+ return err;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ kern_start, kern_end - kern_start);
+ if (err)
+ return err;
+
+ kern_chunk_src = get_virtual_current_address (ch);
+
+ err = grub_elf32_load (elf, grub_bsd_elf32_hook, 0, 0);
+ if (err)
+ return err;
+ if (kernel_type != KERNEL_TYPE_OPENBSD)
+ return GRUB_ERR_NONE;
+ return grub_openbsd_find_ramdisk32 (elf->file, kern_start,
+ kern_chunk_src, &openbsd_ramdisk);
+ }
+ else if (grub_elf_is_elf64 (elf))
+ {
+ is_64bit = 1;
+
+ if (! grub_cpuid_has_longmode)
+ return grub_error (GRUB_ERR_BAD_OS, "your CPU does not implement AMD64 architecture");
+
+ /* FreeBSD has 64-bit entry point. */
+ if (kernel_type == KERNEL_TYPE_FREEBSD)
+ {
+ entry = elf->ehdr.ehdr64.e_entry & 0xffffffff;
+ entry_hi = (elf->ehdr.ehdr64.e_entry >> 32) & 0xffffffff;
+ }
+ else
+ {
+ entry = elf->ehdr.ehdr64.e_entry & 0x0fffffff;
+ entry_hi = 0;
+ }
+
+ err = grub_elf64_phdr_iterate (elf, grub_bsd_elf64_size_hook, NULL);
+ if (err)
+ return err;
+
+ grub_dprintf ("bsd", "kern_start = %lx, kern_end = %lx\n",
+ (unsigned long) kern_start, (unsigned long) kern_end);
+ {
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch, kern_start,
+ kern_end - kern_start);
+ if (err)
+ return err;
+ kern_chunk_src = get_virtual_current_address (ch);
+ }
+
+ err = grub_elf64_load (elf, grub_bsd_elf64_hook, 0, 0);
+ if (err)
+ return err;
+ if (kernel_type != KERNEL_TYPE_OPENBSD)
+ return GRUB_ERR_NONE;
+ return grub_openbsd_find_ramdisk64 (elf->file, kern_start,
+ kern_chunk_src, &openbsd_ramdisk);
+ }
+ else
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF");
+}
+
+static grub_err_t
+grub_bsd_load (int argc, char *argv[])
+{
+ grub_file_t file;
+ grub_elf_t elf;
+
+ grub_dl_ref (my_mod);
+
+ grub_loader_unset ();
+
+ grub_memset (&openbsd_ramdisk, 0, sizeof (openbsd_ramdisk));
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
+ goto fail;
+ }
+
+ file = grub_file_open (argv[0]);
+ if (!file)
+ goto fail;
+
+ relocator = grub_relocator_new ();
+
+ elf = grub_elf_file (file);
+ if (elf)
+ {
+ is_elf_kernel = 1;
+ grub_bsd_load_elf (elf);
+ grub_elf_close (elf);
+ }
+ else
+ {
+ is_elf_kernel = 0;
+ grub_errno = 0;
+ grub_bsd_load_aout (file);
+ grub_file_close (file);
+ }
+
+ kern_end = ALIGN_PAGE (kern_end);
+
+fail:
+
+ if (grub_errno != GRUB_ERR_NONE)
+ grub_dl_unref (my_mod);
+
+ return grub_errno;
+}
+
+static grub_uint32_t
+grub_bsd_parse_flags (const struct grub_arg_list *state,
+ const grub_uint32_t * flags)
+{
+ grub_uint32_t result = 0;
+ unsigned i;
+
+ for (i = 0; flags[i]; i++)
+ if (state[i].set)
+ result |= flags[i];
+
+ return result;
+}
+
+static grub_err_t
+grub_cmd_freebsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
+{
+ kernel_type = KERNEL_TYPE_FREEBSD;
+ bootflags = grub_bsd_parse_flags (ctxt->state, freebsd_flags);
+
+ if (grub_bsd_load (argc, argv) == GRUB_ERR_NONE)
+ {
+ grub_uint32_t unit, slice, part;
+
+ kern_end = ALIGN_PAGE (kern_end);
+ if (is_elf_kernel)
+ {
+ grub_err_t err;
+ grub_uint64_t data = 0;
+ grub_file_t file;
+ int len = is_64bit ? 8 : 4;
+
+ err = grub_freebsd_add_meta_module (argv[0], is_64bit
+ ? FREEBSD_MODTYPE_KERNEL64
+ : FREEBSD_MODTYPE_KERNEL,
+ argc - 1, argv + 1,
+ kern_start,
+ kern_end - kern_start);
+ if (err)
+ return err;
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_errno;
+
+ if (is_64bit)
+ err = grub_freebsd_load_elf_meta64 (relocator, file, &kern_end);
+ else
+ err = grub_freebsd_load_elf_meta32 (relocator, file, &kern_end);
+ if (err)
+ return err;
+
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_HOWTO, &data, 4);
+ if (err)
+ return err;
+
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_ENVP, &data, len);
+ if (err)
+ return err;
+
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_KERNEND, &data, len);
+ if (err)
+ return err;
+ }
+ grub_bsd_get_device (&freebsd_biosdev, &unit, &slice, &part);
+ freebsd_bootdev = (FREEBSD_B_DEVMAGIC + ((slice + 1) << FREEBSD_B_SLICESHIFT) +
+ (unit << FREEBSD_B_UNITSHIFT) + (part << FREEBSD_B_PARTSHIFT));
+
+ grub_loader_set (grub_freebsd_boot, grub_bsd_unload, 0);
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_openbsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
+{
+ grub_uint32_t bootdev;
+
+ kernel_type = KERNEL_TYPE_OPENBSD;
+ bootflags = grub_bsd_parse_flags (ctxt->state, openbsd_flags);
+
+ if (ctxt->state[OPENBSD_ROOT_ARG].set)
+ {
+ const char *arg = ctxt->state[OPENBSD_ROOT_ARG].arg;
+ int unit, part;
+ if (*(arg++) != 'w' || *(arg++) != 'd')
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only device specifications of form "
+ "wd<number><lowercase letter> are supported");
+
+ unit = grub_strtoul (arg, (char **) &arg, 10);
+ if (! (arg && *arg >= 'a' && *arg <= 'z'))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only device specifications of form "
+ "wd<number><lowercase letter> are supported");
+
+ part = *arg - 'a';
+
+ bootdev = (OPENBSD_B_DEVMAGIC + (unit << OPENBSD_B_UNITSHIFT) +
+ (part << OPENBSD_B_PARTSHIFT));
+ }
+ else
+ bootdev = 0;
+
+ if (ctxt->state[OPENBSD_SERIAL_ARG].set)
+ {
+ struct grub_openbsd_bootarg_console serial;
+ char *ptr;
+ unsigned port = 0;
+ unsigned speed = 9600;
+
+ grub_memset (&serial, 0, sizeof (serial));
+
+ if (ctxt->state[OPENBSD_SERIAL_ARG].arg)
+ {
+ ptr = ctxt->state[OPENBSD_SERIAL_ARG].arg;
+ if (grub_memcmp (ptr, "com", sizeof ("com") - 1) != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only com0-com3 are supported");
+ ptr += sizeof ("com") - 1;
+ port = grub_strtoul (ptr, &ptr, 0);
+ if (port >= 4)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only com0-com3 are supported");
+ if (*ptr == ',')
+ {
+ ptr++;
+ speed = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ }
+ }
+
+ serial.device = (GRUB_OPENBSD_COM_MAJOR << 8) | port;
+ serial.speed = speed;
+
+ grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial));
+ bootflags |= OPENBSD_RB_SERCONS;
+ }
+ else
+ {
+ struct grub_openbsd_bootarg_console serial;
+
+ grub_memset (&serial, 0, sizeof (serial));
+ serial.device = (GRUB_OPENBSD_VGA_MAJOR << 8);
+ grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial));
+ bootflags &= ~OPENBSD_RB_SERCONS;
+ }
+
+ if (grub_bsd_load (argc, argv) == GRUB_ERR_NONE)
+ {
+ grub_loader_set (grub_openbsd_boot, grub_bsd_unload, 0);
+ openbsd_root = bootdev;
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_netbsd (grub_extcmd_context_t ctxt, int argc, char *argv[])
+{
+ grub_err_t err;
+ kernel_type = KERNEL_TYPE_NETBSD;
+ bootflags = grub_bsd_parse_flags (ctxt->state, netbsd_flags);
+
+ if (grub_bsd_load (argc, argv) == GRUB_ERR_NONE)
+ {
+ if (is_elf_kernel)
+ {
+ grub_file_t file;
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_errno;
+
+ if (is_64bit)
+ err = grub_netbsd_load_elf_meta64 (relocator, file, &kern_end);
+ else
+ err = grub_netbsd_load_elf_meta32 (relocator, file, &kern_end);
+ if (err)
+ return err;
+ }
+
+ {
+ char bootpath[GRUB_NETBSD_MAX_BOOTPATH_LEN];
+ char *name;
+ name = grub_strrchr (argv[0], '/');
+ if (name)
+ name++;
+ else
+ name = argv[0];
+ grub_memset (bootpath, 0, sizeof (bootpath));
+ grub_strncpy (bootpath, name, sizeof (bootpath) - 1);
+ grub_bsd_add_meta (NETBSD_BTINFO_BOOTPATH, bootpath, sizeof (bootpath));
+ }
+
+ if (ctxt->state[NETBSD_ROOT_ARG].set)
+ {
+ char root[GRUB_NETBSD_MAX_ROOTDEVICE_LEN];
+ grub_memset (root, 0, sizeof (root));
+ grub_strncpy (root, ctxt->state[NETBSD_ROOT_ARG].arg,
+ sizeof (root) - 1);
+ grub_bsd_add_meta (NETBSD_BTINFO_ROOTDEVICE, root, sizeof (root));
+ }
+ if (ctxt->state[NETBSD_SERIAL_ARG].set)
+ {
+ struct grub_netbsd_btinfo_serial serial;
+ char *ptr;
+
+ grub_memset (&serial, 0, sizeof (serial));
+ grub_strcpy (serial.devname, "com");
+
+ serial.addr = grub_ns8250_hw_get_port (0);
+ serial.speed = 9600;
+
+ if (ctxt->state[NETBSD_SERIAL_ARG].arg)
+ {
+ ptr = ctxt->state[NETBSD_SERIAL_ARG].arg;
+ if (grub_memcmp (ptr, "com", sizeof ("com") - 1) == 0)
+ {
+ ptr += sizeof ("com") - 1;
+ serial.addr
+ = grub_ns8250_hw_get_port (grub_strtoul (ptr, &ptr, 0));
+ }
+ else
+ serial.addr = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+
+ if (*ptr == ',')
+ {
+ ptr++;
+ serial.speed = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ }
+ }
+
+ grub_bsd_add_meta (NETBSD_BTINFO_CONSOLE, &serial, sizeof (serial));
+ }
+ else
+ {
+ struct grub_netbsd_btinfo_serial cons;
+
+ grub_memset (&cons, 0, sizeof (cons));
+ grub_strcpy (cons.devname, "pc");
+
+ grub_bsd_add_meta (NETBSD_BTINFO_CONSOLE, &cons, sizeof (cons));
+ }
+
+ grub_loader_set (grub_netbsd_boot, grub_bsd_unload, 0);
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_freebsd_loadenv (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ char *buf = 0, *curr, *next;
+ int len;
+
+ if (! grub_loader_is_loaded ())
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "you need to load the kernel first");
+
+ if (kernel_type != KERNEL_TYPE_FREEBSD)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only FreeBSD supports environment");
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no filename");
+ goto fail;
+ }
+
+ file = grub_file_open (argv[0]);
+ if ((!file) || (!file->size))
+ goto fail;
+
+ len = file->size;
+ buf = grub_malloc (len + 1);
+ if (!buf)
+ goto fail;
+
+ if (grub_file_read (file, buf, len) != len)
+ goto fail;
+
+ buf[len] = 0;
+
+ next = buf;
+ while (next)
+ {
+ char *p;
+
+ curr = next;
+ next = grub_strchr (curr, '\n');
+ if (next)
+ {
+
+ p = next - 1;
+ while (p > curr)
+ {
+ if ((*p != '\r') && (*p != ' ') && (*p != '\t'))
+ break;
+ p--;
+ }
+
+ if ((p > curr) && (*p == '"'))
+ p--;
+
+ *(p + 1) = 0;
+ next++;
+ }
+
+ if (*curr == '#')
+ continue;
+
+ p = grub_strchr (curr, '=');
+ if (!p)
+ continue;
+
+ *(p++) = 0;
+
+ if (*curr)
+ {
+ char *name;
+
+ if (*p == '"')
+ p++;
+
+ name = grub_xasprintf ("kFreeBSD.%s", curr);
+ if (!name)
+ goto fail;
+ if (grub_env_set (name, p))
+ {
+ grub_free (name);
+ goto fail;
+ }
+ grub_free (name);
+ }
+ }
+
+fail:
+ grub_free (buf);
+
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_freebsd_module (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ int modargc;
+ char **modargv;
+ char *type;
+ grub_err_t err;
+ void *src;
+
+ if (kernel_type != KERNEL_TYPE_FREEBSD)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no FreeBSD loaded");
+
+ if (!is_elf_kernel)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only ELF kernel supports module");
+
+ /* List the current modules if no parameter. */
+ if (!argc)
+ {
+ grub_freebsd_list_modules ();
+ return 0;
+ }
+
+ file = grub_file_open (argv[0]);
+ if ((!file) || (!file->size))
+ goto fail;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch, kern_end,
+ file->size);
+ if (err)
+ goto fail;
+ src = get_virtual_current_address (ch);
+ }
+
+
+ grub_file_read (file, src, file->size);
+ if (grub_errno)
+ goto fail;
+
+ modargc = argc - 1;
+ modargv = argv + 1;
+
+ if (modargc && (! grub_memcmp (modargv[0], "type=", 5)))
+ {
+ type = &modargv[0][5];
+ modargc--;
+ modargv++;
+ }
+ else
+ type = FREEBSD_MODTYPE_RAW;
+
+ err = grub_freebsd_add_meta_module (argv[0], type, modargc, modargv,
+ kern_end, file->size);
+ if (err)
+ goto fail;
+
+ kern_end = ALIGN_PAGE (kern_end + file->size);
+
+fail:
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_netbsd_module_load (char *filename, grub_uint32_t type)
+{
+ grub_file_t file = 0;
+ void *src;
+ grub_err_t err;
+
+ file = grub_file_open (filename);
+ if ((!file) || (!file->size))
+ goto fail;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch, kern_end,
+ file->size);
+ if (err)
+ goto fail;
+
+ src = get_virtual_current_address (ch);
+ }
+
+ grub_file_read (file, src, file->size);
+ if (grub_errno)
+ goto fail;
+
+ err = grub_netbsd_add_meta_module (filename, type, kern_end, file->size);
+
+ if (err)
+ goto fail;
+
+ kern_end = ALIGN_PAGE (kern_end + file->size);
+
+fail:
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_netbsd_module (grub_command_t cmd,
+ int argc, char *argv[])
+{
+ grub_uint32_t type;
+
+ if (kernel_type != KERNEL_TYPE_NETBSD)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no NetBSD loaded");
+
+ if (!is_elf_kernel)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only ELF kernel supports module");
+
+ /* List the current modules if no parameter. */
+ if (!argc)
+ {
+ grub_netbsd_list_modules ();
+ return 0;
+ }
+
+ if (grub_strcmp (cmd->name, "knetbsd_module_elf") == 0)
+ type = GRUB_NETBSD_MODULE_ELF;
+ else
+ type = GRUB_NETBSD_MODULE_RAW;
+
+ return grub_netbsd_module_load (argv[0], type);
+}
+
+static grub_err_t
+grub_cmd_freebsd_module_elf (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_err_t err;
+
+ if (! grub_loader_is_loaded ())
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "you need to load the kernel first");
+
+ if (kernel_type != KERNEL_TYPE_FREEBSD)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only FreeBSD supports module");
+
+ if (! is_elf_kernel)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "only ELF kernel supports module");
+
+ /* List the current modules if no parameter. */
+ if (! argc)
+ {
+ grub_freebsd_list_modules ();
+ return 0;
+ }
+
+ file = grub_file_open (argv[0]);
+ if (!file)
+ return grub_errno;
+ if (!file->size)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+
+ if (is_64bit)
+ err = grub_freebsd_load_elfmodule_obj64 (relocator, file,
+ argc, argv, &kern_end);
+ else
+ err = grub_freebsd_load_elfmodule32 (relocator, file,
+ argc, argv, &kern_end);
+ grub_file_close (file);
+
+ return err;
+}
+
+static grub_err_t
+grub_cmd_openbsd_ramdisk (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_file_t file;
+ grub_size_t size;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ if (kernel_type != KERNEL_TYPE_OPENBSD)
+ return grub_error (GRUB_ERR_BAD_OS, "no kOpenBSD loaded");
+
+ if (!openbsd_ramdisk.max_size)
+ return grub_error (GRUB_ERR_BAD_OS, "your kOpenBSD doesn't support ramdisk");
+
+ file = grub_file_open (args[0]);
+ if (! file)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "couldn't load ramdisk");
+
+ size = grub_file_size (file);
+
+ if (size > openbsd_ramdisk.max_size)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_BAD_OS, "your kOpenBSD supports ramdisk only"
+ " up to %u bytes, however you supplied a %u bytes one",
+ openbsd_ramdisk.max_size, size);
+ }
+
+ if (grub_file_read (file, openbsd_ramdisk.target, size)
+ != (grub_ssize_t) (size))
+ {
+ grub_file_close (file);
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[0]);
+ }
+ grub_memset (openbsd_ramdisk.target + size, 0,
+ openbsd_ramdisk.max_size - size);
+ *openbsd_ramdisk.size = ALIGN_UP (size, 512);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd_freebsd, cmd_openbsd, cmd_netbsd;
+static grub_command_t cmd_freebsd_loadenv, cmd_freebsd_module;
+static grub_command_t cmd_netbsd_module, cmd_freebsd_module_elf;
+static grub_command_t cmd_netbsd_module_elf, cmd_openbsd_ramdisk;
+
+GRUB_MOD_INIT (bsd)
+{
+ /* Net and OpenBSD kernels are often compressed. */
+ grub_dl_load ("gzio");
+
+ cmd_freebsd = grub_register_extcmd ("kfreebsd", grub_cmd_freebsd, 0,
+ N_("FILE"), N_("Load kernel of FreeBSD."),
+ freebsd_opts);
+ cmd_openbsd = grub_register_extcmd ("kopenbsd", grub_cmd_openbsd, 0,
+ N_("FILE"), N_("Load kernel of OpenBSD."),
+ openbsd_opts);
+ cmd_netbsd = grub_register_extcmd ("knetbsd", grub_cmd_netbsd, 0,
+ N_("FILE"), N_("Load kernel of NetBSD."),
+ netbsd_opts);
+ cmd_freebsd_loadenv =
+ grub_register_command ("kfreebsd_loadenv", grub_cmd_freebsd_loadenv,
+ 0, N_("Load FreeBSD env."));
+ cmd_freebsd_module =
+ grub_register_command ("kfreebsd_module", grub_cmd_freebsd_module,
+ 0, N_("Load FreeBSD kernel module."));
+ cmd_netbsd_module =
+ grub_register_command ("knetbsd_module", grub_cmd_netbsd_module,
+ 0, N_("Load NetBSD kernel module."));
+ cmd_netbsd_module_elf =
+ grub_register_command ("knetbsd_module_elf", grub_cmd_netbsd_module,
+ 0, N_("Load NetBSD kernel module (ELF)."));
+ cmd_freebsd_module_elf =
+ grub_register_command ("kfreebsd_module_elf", grub_cmd_freebsd_module_elf,
+ 0, N_("Load FreeBSD kernel module (ELF)."));
+
+ cmd_openbsd_ramdisk = grub_register_command ("kopenbsd_ramdisk",
+ grub_cmd_openbsd_ramdisk, 0,
+ "Load kOpenBSD ramdisk. ");
+
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI (bsd)
+{
+ grub_unregister_extcmd (cmd_freebsd);
+ grub_unregister_extcmd (cmd_openbsd);
+ grub_unregister_extcmd (cmd_netbsd);
+
+ grub_unregister_command (cmd_freebsd_loadenv);
+ grub_unregister_command (cmd_freebsd_module);
+ grub_unregister_command (cmd_netbsd_module);
+ grub_unregister_command (cmd_freebsd_module_elf);
+ grub_unregister_command (cmd_netbsd_module_elf);
+ grub_unregister_command (cmd_openbsd_ramdisk);
+
+ grub_bsd_unload ();
+}
diff --git a/grub-core/loader/i386/bsd32.c b/grub-core/loader/i386/bsd32.c
new file mode 100644
index 0000000..26704c4
--- /dev/null
+++ b/grub-core/loader/i386/bsd32.c
@@ -0,0 +1,6 @@
+#define SUFFIX(x) x ## 32
+#define GRUB_TARGET_WORDSIZE 32
+#define OBJSYM 0
+#include <grub/types.h>
+typedef grub_uint32_t grub_freebsd_addr_t;
+#include "bsdXX.c"
diff --git a/grub-core/loader/i386/bsd64.c b/grub-core/loader/i386/bsd64.c
new file mode 100644
index 0000000..f8aad1c
--- /dev/null
+++ b/grub-core/loader/i386/bsd64.c
@@ -0,0 +1,6 @@
+#define SUFFIX(x) x ## 64
+#define GRUB_TARGET_WORDSIZE 64
+#define OBJSYM 1
+#include <grub/types.h>
+typedef grub_uint64_t grub_freebsd_addr_t;
+#include "bsdXX.c"
diff --git a/grub-core/loader/i386/bsdXX.c b/grub-core/loader/i386/bsdXX.c
new file mode 100644
index 0000000..92d2675
--- /dev/null
+++ b/grub-core/loader/i386/bsdXX.c
@@ -0,0 +1,621 @@
+#include <grub/loader.h>
+#include <grub/i386/bsd.h>
+#include <grub/mm.h>
+#include <grub/elf.h>
+#include <grub/misc.h>
+#include <grub/i386/relocator.h>
+
+#define ALIGN_PAGE(a) ALIGN_UP (a, 4096)
+
+static inline grub_err_t
+load (grub_file_t file, void *where, grub_off_t off, grub_size_t size)
+{
+ if (grub_file_seek (file, off) == (grub_off_t) -1)
+ return grub_errno;
+ if (grub_file_read (file, where, size) != (grub_ssize_t) size)
+ {
+ if (grub_errno)
+ return grub_errno;
+ else
+ return grub_error (GRUB_ERR_BAD_OS, "file is truncated");
+ }
+ return GRUB_ERR_NONE;
+}
+
+static inline grub_err_t
+read_headers (grub_file_t file, Elf_Ehdr *e, char **shdr)
+{
+ if (grub_file_seek (file, 0) == (grub_off_t) -1)
+ return grub_errno;
+
+ if (grub_file_read (file, (char *) e, sizeof (*e)) != sizeof (*e))
+ {
+ if (grub_errno)
+ return grub_errno;
+ else
+ return grub_error (GRUB_ERR_BAD_OS, "file is too short");
+ }
+
+ if (e->e_ident[EI_MAG0] != ELFMAG0
+ || e->e_ident[EI_MAG1] != ELFMAG1
+ || e->e_ident[EI_MAG2] != ELFMAG2
+ || e->e_ident[EI_MAG3] != ELFMAG3
+ || e->e_ident[EI_VERSION] != EV_CURRENT
+ || e->e_version != EV_CURRENT)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch independent ELF magic");
+
+ if (e->e_ident[EI_CLASS] != SUFFIX (ELFCLASS))
+ return grub_error (GRUB_ERR_BAD_OS, "invalid arch dependent ELF magic");
+
+ *shdr = grub_malloc (e->e_shnum * e->e_shentsize);
+ if (! *shdr)
+ return grub_errno;
+
+ if (grub_file_seek (file, e->e_shoff) == (grub_off_t) -1)
+ return grub_errno;
+
+ if (grub_file_read (file, *shdr, e->e_shnum * e->e_shentsize)
+ != e->e_shnum * e->e_shentsize)
+ {
+ if (grub_errno)
+ return grub_errno;
+ else
+ return grub_error (GRUB_ERR_BAD_OS, "file is truncated");
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* On i386 FreeBSD uses "elf module" approarch for 32-bit variant
+ and "elf obj module" for 64-bit variant. However it may differ on other
+ platforms. So I keep both versions. */
+#if OBJSYM
+grub_err_t
+SUFFIX (grub_freebsd_load_elfmodule_obj) (struct grub_relocator *relocator,
+ grub_file_t file, int argc,
+ char *argv[], grub_addr_t *kern_end)
+{
+ Elf_Ehdr e;
+ Elf_Shdr *s;
+ char *shdr = 0;
+ grub_addr_t curload, module;
+ grub_err_t err;
+ grub_size_t chunk_size = 0;
+ void *chunk_src;
+
+ err = read_headers (file, &e, &shdr);
+ if (err)
+ return err;
+
+ curload = module = ALIGN_PAGE (*kern_end);
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) ((char *) shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ {
+ if (s->sh_size == 0)
+ continue;
+
+ if (s->sh_addralign)
+ chunk_size = ALIGN_UP (chunk_size + *kern_end, s->sh_addralign)
+ - *kern_end;
+
+ chunk_size += s->sh_size;
+ }
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ module, chunk_size);
+ if (err)
+ return err;
+ chunk_src = get_virtual_current_address (ch);
+ }
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) ((char *) shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ {
+ if (s->sh_size == 0)
+ continue;
+
+ if (s->sh_addralign)
+ curload = ALIGN_UP (curload, s->sh_addralign);
+ s->sh_addr = curload;
+
+ grub_dprintf ("bsd", "loading section to %x, size %d, align %d\n",
+ (unsigned) curload, (int) s->sh_size,
+ (int) s->sh_addralign);
+
+ switch (s->sh_type)
+ {
+ default:
+ case SHT_PROGBITS:
+ err = load (file, (grub_uint8_t *) chunk_src + curload - *kern_end,
+ s->sh_offset, s->sh_size);
+ if (err)
+ return err;
+ break;
+ case SHT_NOBITS:
+ grub_memset ((grub_uint8_t *) chunk_src + curload - *kern_end, 0,
+ s->sh_size);
+ break;
+ }
+ curload += s->sh_size;
+ }
+
+ *kern_end = ALIGN_PAGE (curload);
+
+ err = grub_freebsd_add_meta_module (argv[0], FREEBSD_MODTYPE_ELF_MODULE_OBJ,
+ argc - 1, argv + 1, module,
+ curload - module);
+ if (! err)
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA
+ | FREEBSD_MODINFOMD_ELFHDR,
+ &e, sizeof (e));
+ if (! err)
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA
+ | FREEBSD_MODINFOMD_SHDR,
+ shdr, e.e_shnum * e.e_shentsize);
+
+ return err;
+}
+
+#else
+
+grub_err_t
+SUFFIX (grub_freebsd_load_elfmodule) (struct grub_relocator *relocator,
+ grub_file_t file, int argc, char *argv[],
+ grub_addr_t *kern_end)
+{
+ Elf_Ehdr e;
+ Elf_Shdr *s;
+ char *shdr = 0;
+ grub_addr_t curload, module;
+ grub_err_t err;
+ grub_size_t chunk_size = 0;
+ void *chunk_src;
+
+ err = read_headers (file, &e, &shdr);
+ if (err)
+ return err;
+
+ curload = module = ALIGN_PAGE (*kern_end);
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) ((char *) shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ {
+ if (s->sh_size == 0)
+ continue;
+
+ if (! (s->sh_flags & SHF_ALLOC))
+ continue;
+ if (chunk_size < s->sh_addr + s->sh_size)
+ chunk_size = s->sh_addr + s->sh_size;
+ }
+
+ if (chunk_size < sizeof (e))
+ chunk_size = sizeof (e);
+ chunk_size += e.e_phnum * e.e_phentsize;
+ chunk_size += e.e_shnum * e.e_shentsize;
+
+ {
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ module, chunk_size);
+ if (err)
+ return err;
+
+ chunk_src = get_virtual_current_address (ch);
+ }
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) ((char *) shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ {
+ if (s->sh_size == 0)
+ continue;
+
+ if (! (s->sh_flags & SHF_ALLOC))
+ continue;
+
+ grub_dprintf ("bsd", "loading section to %x, size %d, align %d\n",
+ (unsigned) curload, (int) s->sh_size,
+ (int) s->sh_addralign);
+
+ switch (s->sh_type)
+ {
+ default:
+ case SHT_PROGBITS:
+ err = load (file, (grub_uint8_t *) chunk_src + module
+ + s->sh_addr - *kern_end,
+ s->sh_offset, s->sh_size);
+ if (err)
+ return err;
+ break;
+ case SHT_NOBITS:
+ grub_memset ((grub_uint8_t *) chunk_src + module
+ + s->sh_addr - *kern_end, 0, s->sh_size);
+ break;
+ }
+ if (curload < module + s->sh_addr + s->sh_size)
+ curload = module + s->sh_addr + s->sh_size;
+ }
+
+ load (file, UINT_TO_PTR (module), 0, sizeof (e));
+ if (curload < module + sizeof (e))
+ curload = module + sizeof (e);
+
+ load (file, UINT_TO_PTR (curload), e.e_shoff,
+ e.e_shnum * e.e_shentsize);
+ e.e_shoff = curload - module;
+ curload += e.e_shnum * e.e_shentsize;
+
+ load (file, UINT_TO_PTR (curload), e.e_phoff,
+ e.e_phnum * e.e_phentsize);
+ e.e_phoff = curload - module;
+ curload += e.e_phnum * e.e_phentsize;
+
+ *kern_end = curload;
+
+ grub_freebsd_add_meta_module (argv[0], FREEBSD_MODTYPE_ELF_MODULE,
+ argc - 1, argv + 1, module,
+ curload - module);
+ return SUFFIX (grub_freebsd_load_elf_meta) (relocator, file, kern_end);
+}
+
+#endif
+
+grub_err_t
+SUFFIX (grub_freebsd_load_elf_meta) (struct grub_relocator *relocator,
+ grub_file_t file, grub_addr_t *kern_end)
+{
+ grub_err_t err;
+ Elf_Ehdr e;
+ Elf_Shdr *s;
+ char *shdr = 0;
+ unsigned symoff, stroff, symsize, strsize;
+ grub_freebsd_addr_t symstart, symend, symentsize, dynamic;
+ Elf_Sym *sym;
+ void *sym_chunk;
+ grub_uint8_t *curload;
+ grub_freebsd_addr_t symtarget;
+ const char *str;
+ unsigned i;
+ grub_size_t chunk_size;
+
+ err = read_headers (file, &e, &shdr);
+ if (err)
+ return err;
+
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_ELFHDR, &e,
+ sizeof (e));
+ if (err)
+ return err;
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) (shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+ if (s >= (Elf_Shdr *) ((char *) shdr
+ + e.e_shnum * e.e_shentsize))
+ return grub_error (GRUB_ERR_BAD_OS, "no symbol table");
+ symoff = s->sh_offset;
+ symsize = s->sh_size;
+ symentsize = s->sh_entsize;
+ s = (Elf_Shdr *) (shdr + e.e_shentsize * s->sh_link);
+ stroff = s->sh_offset;
+ strsize = s->sh_size;
+
+ chunk_size = ALIGN_UP (symsize + strsize, sizeof (grub_freebsd_addr_t))
+ + 2 * sizeof (grub_freebsd_addr_t);
+
+ symtarget = ALIGN_UP (*kern_end, sizeof (grub_freebsd_addr_t));
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ symtarget, chunk_size);
+ if (err)
+ return err;
+ sym_chunk = get_virtual_current_address (ch);
+ }
+
+ symstart = symtarget;
+ symend = symstart + chunk_size;
+
+ curload = sym_chunk;
+ *((grub_freebsd_addr_t *) curload) = symsize;
+ curload += sizeof (grub_freebsd_addr_t);
+
+ if (grub_file_seek (file, symoff) == (grub_off_t) -1)
+ return grub_errno;
+ sym = (Elf_Sym *) curload;
+ if (grub_file_read (file, curload, symsize) != (grub_ssize_t) symsize)
+ {
+ if (! grub_errno)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF");
+ return grub_errno;
+ }
+ curload += symsize;
+
+ *((grub_freebsd_addr_t *) curload) = strsize;
+ curload += sizeof (grub_freebsd_addr_t);
+ if (grub_file_seek (file, stroff) == (grub_off_t) -1)
+ return grub_errno;
+ str = (char *) curload;
+ if (grub_file_read (file, curload, strsize) != (grub_ssize_t) strsize)
+ {
+ if (! grub_errno)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF");
+ return grub_errno;
+ }
+
+ for (i = 0;
+ i * symentsize < symsize;
+ i++, sym = (Elf_Sym *) ((char *) sym + symentsize))
+ {
+ const char *name = str + sym->st_name;
+ if (grub_strcmp (name, "_DYNAMIC") == 0)
+ break;
+ }
+
+ if (i * symentsize < symsize)
+ {
+ dynamic = sym->st_value;
+ grub_dprintf ("bsd", "dynamic = %llx\n", (unsigned long long) dynamic);
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_DYNAMIC, &dynamic,
+ sizeof (dynamic));
+ if (err)
+ return err;
+ }
+
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_SSYM, &symstart,
+ sizeof (symstart));
+ if (err)
+ return err;
+
+ err = grub_bsd_add_meta (FREEBSD_MODINFO_METADATA |
+ FREEBSD_MODINFOMD_ESYM, &symend,
+ sizeof (symend));
+ if (err)
+ return err;
+
+ *kern_end = ALIGN_PAGE (symend);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+SUFFIX (grub_netbsd_load_elf_meta) (struct grub_relocator *relocator,
+ grub_file_t file, grub_addr_t *kern_end)
+{
+ grub_err_t err;
+ Elf_Ehdr e;
+ Elf_Shdr *s, *symsh, *strsh;
+ char *shdr = NULL;
+ unsigned symsize, strsize;
+ void *sym_chunk;
+ grub_uint8_t *curload;
+ grub_size_t chunk_size;
+ Elf_Ehdr *e2;
+ struct grub_netbsd_btinfo_symtab symtab;
+ grub_addr_t symtarget;
+
+ err = read_headers (file, &e, &shdr);
+ if (err)
+ return err;
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) (shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+ if (s >= (Elf_Shdr *) ((char *) shdr
+ + e.e_shnum * e.e_shentsize))
+ return GRUB_ERR_NONE;
+ symsize = s->sh_size;
+ symsh = s;
+ s = (Elf_Shdr *) (shdr + e.e_shentsize * s->sh_link);
+ strsize = s->sh_size;
+ strsh = s;
+
+ chunk_size = ALIGN_UP (symsize, sizeof (grub_freebsd_addr_t))
+ + ALIGN_UP (strsize, sizeof (grub_freebsd_addr_t))
+ + sizeof (e) + e.e_shnum * e.e_shentsize;
+
+ symtarget = ALIGN_UP (*kern_end, sizeof (grub_freebsd_addr_t));
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ symtarget, chunk_size);
+ if (err)
+ return err;
+ sym_chunk = get_virtual_current_address (ch);
+ }
+
+ symtab.nsyms = 1;
+ symtab.ssyms = symtarget;
+ symtab.esyms = symtarget + chunk_size;
+
+ curload = sym_chunk;
+
+ e2 = (Elf_Ehdr *) curload;
+ grub_memcpy (curload, &e, sizeof (e));
+ e2->e_phoff = 0;
+ e2->e_phnum = 0;
+ e2->e_phentsize = 0;
+ e2->e_shstrndx = 0;
+ e2->e_shoff = sizeof (e);
+
+ curload += sizeof (e);
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) (shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ {
+ Elf_Shdr *s2;
+ s2 = (Elf_Shdr *) curload;
+ grub_memcpy (curload, s, e.e_shentsize);
+ if (s == symsh)
+ s2->sh_offset = sizeof (e) + e.e_shnum * e.e_shentsize;
+ else if (s == strsh)
+ s2->sh_offset = ALIGN_UP (symsize, sizeof (grub_freebsd_addr_t))
+ + sizeof (e) + e.e_shnum * e.e_shentsize;
+ else
+ s2->sh_offset = 0;
+ s2->sh_addr = s2->sh_offset;
+ curload += e.e_shentsize;
+ }
+
+ if (grub_file_seek (file, symsh->sh_offset) == (grub_off_t) -1)
+ return grub_errno;
+ if (grub_file_read (file, curload, symsize) != (grub_ssize_t) symsize)
+ {
+ if (! grub_errno)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF");
+ return grub_errno;
+ }
+ curload += ALIGN_UP (symsize, sizeof (grub_freebsd_addr_t));
+
+ if (grub_file_seek (file, strsh->sh_offset) == (grub_off_t) -1)
+ return grub_errno;
+ if (grub_file_read (file, curload, strsize) != (grub_ssize_t) strsize)
+ {
+ if (! grub_errno)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF");
+ return grub_errno;
+ }
+
+ err = grub_bsd_add_meta (NETBSD_BTINFO_SYMTAB,
+ &symtab,
+ sizeof (symtab));
+ if (err)
+ return err;
+
+ *kern_end = ALIGN_PAGE (symtarget + chunk_size);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+SUFFIX(grub_openbsd_find_ramdisk) (grub_file_t file,
+ grub_addr_t kern_start,
+ void *kern_chunk_src,
+ struct grub_openbsd_ramdisk_descriptor *desc)
+{
+ unsigned symoff, stroff, symsize, strsize, symentsize;
+
+ {
+ grub_err_t err;
+ Elf_Ehdr e;
+ Elf_Shdr *s;
+ char *shdr = NULL;
+
+ err = read_headers (file, &e, &shdr);
+ if (err)
+ return err;
+
+ for (s = (Elf_Shdr *) shdr; s < (Elf_Shdr *) (shdr
+ + e.e_shnum * e.e_shentsize);
+ s = (Elf_Shdr *) ((char *) s + e.e_shentsize))
+ if (s->sh_type == SHT_SYMTAB)
+ break;
+ if (s >= (Elf_Shdr *) ((char *) shdr + e.e_shnum * e.e_shentsize))
+ {
+ grub_free (shdr);
+ return GRUB_ERR_NONE;
+ }
+
+ symsize = s->sh_size;
+ symentsize = s->sh_entsize;
+ symoff = s->sh_offset;
+
+ s = (Elf_Shdr *) (shdr + e.e_shentsize * s->sh_link);
+ stroff = s->sh_offset;
+ strsize = s->sh_size;
+ grub_free (shdr);
+ }
+ {
+ Elf_Sym *syms, *sym, *imagesym = NULL, *sizesym = NULL;
+ unsigned i;
+ char *strs;
+
+ syms = grub_malloc (symsize);
+ if (!syms)
+ return grub_errno;
+
+ if (grub_file_seek (file, symoff) == (grub_off_t) -1)
+ {
+ grub_free (syms);
+ return grub_errno;
+ }
+ if (grub_file_read (file, syms, symsize) != (grub_ssize_t) symsize)
+ {
+ grub_free (syms);
+ if (! grub_errno)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF");
+ return grub_errno;
+ }
+
+ strs = grub_malloc (strsize);
+ if (!strs)
+ {
+ grub_free (syms);
+ return grub_errno;
+ }
+
+ if (grub_file_seek (file, stroff) == (grub_off_t) -1)
+ return grub_errno;
+ if (grub_file_read (file, strs, strsize) != (grub_ssize_t) strsize)
+ {
+ grub_free (syms);
+ grub_free (strs);
+ if (! grub_errno)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid ELF");
+ return grub_errno;
+ }
+
+ for (i = 0, sym = syms; i < symsize / symentsize;
+ i++, sym = (Elf_Sym *) ((char *) sym + symentsize))
+ {
+ if (ELF_ST_TYPE (sym->st_info) != STT_OBJECT)
+ continue;
+ if (!sym->st_name)
+ continue;
+ if (grub_strcmp (strs + sym->st_name, "rd_root_image") == 0)
+ imagesym = sym;
+ if (grub_strcmp (strs + sym->st_name, "rd_root_size") == 0)
+ sizesym = sym;
+ if (imagesym && sizesym)
+ break;
+ }
+ if (!imagesym || !sizesym)
+ {
+ grub_free (syms);
+ grub_free (strs);
+ return GRUB_ERR_NONE;
+ }
+ if (sizeof (*desc->size) != sizesym->st_size)
+ {
+ grub_free (syms);
+ grub_free (strs);
+ return grub_error (GRUB_ERR_BAD_OS, "unexpected size of rd_root_size");
+ }
+ desc->max_size = imagesym->st_size;
+ desc->target = (imagesym->st_value & 0xFFFFFF) - kern_start
+ + (grub_uint8_t *) kern_chunk_src;
+ desc->size = (grub_uint32_t *) ((sizesym->st_value & 0xFFFFFF) - kern_start
+ + (grub_uint8_t *) kern_chunk_src);
+ grub_free (syms);
+ grub_free (strs);
+
+ return GRUB_ERR_NONE;
+ }
+}
diff --git a/grub-core/loader/i386/bsd_pagetable.c b/grub-core/loader/i386/bsd_pagetable.c
new file mode 100644
index 0000000..9ec5abf
--- /dev/null
+++ b/grub-core/loader/i386/bsd_pagetable.c
@@ -0,0 +1,92 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Based on the code from FreeBSD originally distributed under the
+ following terms: */
+
+/*-
+ * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+
+static void
+fill_bsd64_pagetable (grub_uint8_t *src, grub_addr_t target)
+{
+ grub_uint64_t *pt2, *pt3, *pt4;
+ grub_addr_t pt2t, pt3t;
+ int i;
+
+#define PG_V 0x001
+#define PG_RW 0x002
+#define PG_U 0x004
+#define PG_PS 0x080
+
+ pt4 = (grub_uint64_t *) src;
+ pt3 = (grub_uint64_t *) (src + 4096);
+ pt2 = (grub_uint64_t *) (src + 8192);
+
+ pt3t = target + 4096;
+ pt2t = target + 8192;
+
+ grub_memset (src, 0, 4096 * 3);
+
+ /*
+ * This is kinda brutal, but every single 1GB VM memory segment points to
+ * the same first 1GB of physical memory. But it is how BSD expects
+ * it to be.
+ */
+ for (i = 0; i < 512; i++)
+ {
+ /* Each slot of the level 4 pages points to the same level 3 page */
+ pt4[i] = (grub_addr_t) pt3t;
+ pt4[i] |= PG_V | PG_RW | PG_U;
+
+ /* Each slot of the level 3 pages points to the same level 2 page */
+ pt3[i] = (grub_addr_t) pt2t;
+ pt3[i] |= PG_V | PG_RW | PG_U;
+
+ /* The level 2 page slots are mapped with 2MB pages for 1GB. */
+ pt2[i] = i * (2 * 1024 * 1024);
+ pt2[i] |= PG_V | PG_RW | PG_PS | PG_U;
+ }
+}
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
new file mode 100644
index 0000000..f19f471
--- /dev/null
+++ b/grub-core/loader/i386/linux.c
@@ -0,0 +1,1016 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/loader.h>
+#include <grub/memory.h>
+#include <grub/normal.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/term.h>
+#include <grub/cpu/linux.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/command.h>
+#include <grub/i386/relocator.h>
+#include <grub/i18n.h>
+#include <grub/lib/cmdline.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifdef GRUB_MACHINE_PCBIOS
+#include <grub/i386/pc/vesa_modes_table.h>
+#endif
+
+#ifdef GRUB_MACHINE_EFI
+#include <grub/efi/efi.h>
+#define HAS_VGA_TEXT 0
+#define DEFAULT_VIDEO_MODE "auto"
+#elif defined (GRUB_MACHINE_IEEE1275)
+#include <grub/ieee1275/ieee1275.h>
+#define HAS_VGA_TEXT 0
+#define DEFAULT_VIDEO_MODE "text"
+#else
+#include <grub/i386/pc/vbe.h>
+#include <grub/i386/pc/console.h>
+#define HAS_VGA_TEXT 1
+#define DEFAULT_VIDEO_MODE "text"
+#endif
+
+#define GRUB_LINUX_CL_OFFSET 0x1000
+#define GRUB_LINUX_CL_END_OFFSET 0x2000
+
+static grub_dl_t my_mod;
+
+static grub_size_t linux_mem_size;
+static int loaded;
+static void *real_mode_mem;
+static grub_addr_t real_mode_target;
+static void *prot_mode_mem;
+static grub_addr_t prot_mode_target;
+static void *initrd_mem;
+static grub_addr_t initrd_mem_target;
+static grub_uint32_t real_mode_pages;
+static grub_uint32_t prot_mode_pages;
+static grub_uint32_t initrd_pages;
+static struct grub_relocator *relocator = NULL;
+static void *efi_mmap_buf;
+#ifdef GRUB_MACHINE_EFI
+static grub_efi_uintn_t efi_mmap_size;
+#else
+static const grub_size_t efi_mmap_size = 0;
+#endif
+
+/* FIXME */
+#if 0
+struct idt_descriptor
+{
+ grub_uint16_t limit;
+ void *base;
+} __attribute__ ((packed));
+
+static struct idt_descriptor idt_desc =
+ {
+ 0,
+ 0
+ };
+#endif
+
+static inline grub_size_t
+page_align (grub_size_t size)
+{
+ return (size + (1 << 12) - 1) & (~((1 << 12) - 1));
+}
+
+#ifdef GRUB_MACHINE_EFI
+/* Find the optimal number of pages for the memory map. Is it better to
+ move this code to efi/mm.c? */
+static grub_efi_uintn_t
+find_efi_mmap_size (void)
+{
+ static grub_efi_uintn_t mmap_size = 0;
+
+ if (mmap_size != 0)
+ return mmap_size;
+
+ mmap_size = (1 << 12);
+ while (1)
+ {
+ int ret;
+ grub_efi_memory_descriptor_t *mmap;
+ grub_efi_uintn_t desc_size;
+
+ mmap = grub_malloc (mmap_size);
+ if (! mmap)
+ return 0;
+
+ ret = grub_efi_get_memory_map (&mmap_size, mmap, 0, &desc_size, 0);
+ grub_free (mmap);
+
+ if (ret < 0)
+ grub_fatal ("cannot get memory map");
+ else if (ret > 0)
+ break;
+
+ mmap_size += (1 << 12);
+ }
+
+ /* Increase the size a bit for safety, because GRUB allocates more on
+ later, and EFI itself may allocate more. */
+ mmap_size += (1 << 12);
+
+ mmap_size = page_align (mmap_size);
+ return mmap_size;
+}
+
+#endif
+
+/* Find the optimal number of pages for the memory map. */
+static grub_size_t
+find_mmap_size (void)
+{
+ grub_size_t count = 0, mmap_size;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr __attribute__ ((unused)),
+ grub_uint64_t size __attribute__ ((unused)),
+ grub_memory_type_t type __attribute__ ((unused)))
+ {
+ count++;
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+
+ mmap_size = count * sizeof (struct grub_e820_mmap);
+
+ /* Increase the size a bit for safety, because GRUB allocates more on
+ later. */
+ mmap_size += (1 << 12);
+
+ return page_align (mmap_size);
+}
+
+static void
+free_pages (void)
+{
+ grub_relocator_unload (relocator);
+ relocator = NULL;
+ real_mode_mem = prot_mode_mem = initrd_mem = 0;
+ real_mode_target = prot_mode_target = initrd_mem_target = 0;
+}
+
+/* Allocate pages for the real mode code and the protected mode code
+ for linux as well as a memory map buffer. */
+static grub_err_t
+allocate_pages (grub_size_t prot_size)
+{
+ grub_size_t real_size, mmap_size;
+ grub_err_t err;
+
+ /* Make sure that each size is aligned to a page boundary. */
+ real_size = GRUB_LINUX_CL_END_OFFSET;
+ prot_size = page_align (prot_size);
+ mmap_size = find_mmap_size ();
+
+#ifdef GRUB_MACHINE_EFI
+ efi_mmap_size = find_efi_mmap_size ();
+#endif
+
+ grub_dprintf ("linux", "real_size = %x, prot_size = %x, mmap_size = %x\n",
+ (unsigned) real_size, (unsigned) prot_size, (unsigned) mmap_size);
+
+ /* Calculate the number of pages; Combine the real mode code with
+ the memory map buffer for simplicity. */
+ real_mode_pages = ((real_size + mmap_size + efi_mmap_size) >> 12);
+ prot_mode_pages = (prot_size >> 12);
+
+ /* Initialize the memory pointers with NULL for convenience. */
+ free_pages ();
+
+ relocator = grub_relocator_new ();
+ if (!relocator)
+ {
+ err = grub_errno;
+ goto fail;
+ }
+
+ /* FIXME: Should request low memory from the heap when this feature is
+ implemented. */
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ /* We must put real mode code in the traditional space. */
+
+ if (type == GRUB_MEMORY_AVAILABLE
+ && addr <= 0x90000)
+ {
+ if (addr < 0x10000)
+ {
+ size += addr - 0x10000;
+ addr = 0x10000;
+ }
+
+ if (addr + size > 0x90000)
+ size = 0x90000 - addr;
+
+ if (real_size + mmap_size + efi_mmap_size > size)
+ return 0;
+
+ real_mode_target = ((addr + size) - (real_size + mmap_size + efi_mmap_size));
+ return 1;
+ }
+
+ return 0;
+ }
+ grub_mmap_iterate (hook);
+ if (! real_mode_target)
+ {
+ err = grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate real mode pages");
+ goto fail;
+ }
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ real_mode_target,
+ (real_size + mmap_size
+ + efi_mmap_size));
+ if (err)
+ goto fail;
+ real_mode_mem = get_virtual_current_address (ch);
+ }
+ efi_mmap_buf = (grub_uint8_t *) real_mode_mem + real_size + mmap_size;
+
+ prot_mode_target = GRUB_LINUX_BZIMAGE_ADDR;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ prot_mode_target, prot_size);
+ if (err)
+ goto fail;
+ prot_mode_mem = get_virtual_current_address (ch);
+ }
+
+ grub_dprintf ("linux", "real_mode_mem = %lx, real_mode_pages = %x, "
+ "prot_mode_mem = %lx, prot_mode_pages = %x\n",
+ (unsigned long) real_mode_mem, (unsigned) real_mode_pages,
+ (unsigned long) prot_mode_mem, (unsigned) prot_mode_pages);
+
+ return GRUB_ERR_NONE;
+
+ fail:
+ free_pages ();
+ return err;
+}
+
+static void
+grub_e820_add_region (struct grub_e820_mmap *e820_map, int *e820_num,
+ grub_uint64_t start, grub_uint64_t size,
+ grub_uint32_t type)
+{
+ int n = *e820_num;
+
+ if (n >= GRUB_E820_MAX_ENTRY)
+ grub_fatal ("Too many e820 memory map entries");
+
+ if ((n > 0) && (e820_map[n - 1].addr + e820_map[n - 1].size == start) &&
+ (e820_map[n - 1].type == type))
+ e820_map[n - 1].size += size;
+ else
+ {
+ e820_map[n].addr = start;
+ e820_map[n].size = size;
+ e820_map[n].type = type;
+ (*e820_num)++;
+ }
+}
+
+static grub_err_t
+grub_linux_setup_video (struct linux_kernel_params *params)
+{
+ struct grub_video_mode_info mode_info;
+ void *framebuffer;
+ grub_err_t err;
+ grub_video_driver_id_t driver_id;
+ char *gfxlfbvar = grub_env_get ("gfxpayloadforcelfb");
+
+ driver_id = grub_video_get_driver_id ();
+
+ if (driver_id == GRUB_VIDEO_DRIVER_NONE)
+ return 1;
+
+ err = grub_video_get_info_and_fini (&mode_info, &framebuffer);
+
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return 1;
+ }
+
+ params->lfb_width = mode_info.width;
+ params->lfb_height = mode_info.height;
+ params->lfb_depth = mode_info.bpp;
+ params->lfb_line_len = mode_info.pitch;
+
+ params->lfb_base = (grub_size_t) framebuffer;
+ params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
+
+ params->red_mask_size = mode_info.red_mask_size;
+ params->red_field_pos = mode_info.red_field_pos;
+ params->green_mask_size = mode_info.green_mask_size;
+ params->green_field_pos = mode_info.green_field_pos;
+ params->blue_mask_size = mode_info.blue_mask_size;
+ params->blue_field_pos = mode_info.blue_field_pos;
+ params->reserved_mask_size = mode_info.reserved_mask_size;
+ params->reserved_field_pos = mode_info.reserved_field_pos;
+
+ if (gfxlfbvar && (gfxlfbvar[0] == '1' || gfxlfbvar[0] == 'y'))
+ params->have_vga = GRUB_VIDEO_LINUX_TYPE_SIMPLE;
+ else
+ {
+ switch (driver_id)
+ {
+ case GRUB_VIDEO_DRIVER_VBE:
+ params->lfb_size >>= 16;
+ params->have_vga = GRUB_VIDEO_LINUX_TYPE_VESA;
+ break;
+
+ case GRUB_VIDEO_DRIVER_EFI_UGA:
+ case GRUB_VIDEO_DRIVER_EFI_GOP:
+ params->have_vga = GRUB_VIDEO_LINUX_TYPE_EFIFB;
+ break;
+
+ /* FIXME: check if better id is available. */
+ case GRUB_VIDEO_DRIVER_SM712:
+ case GRUB_VIDEO_DRIVER_VGA:
+ case GRUB_VIDEO_DRIVER_CIRRUS:
+ case GRUB_VIDEO_DRIVER_BOCHS:
+ /* Make gcc happy. */
+ case GRUB_VIDEO_DRIVER_SDL:
+ case GRUB_VIDEO_DRIVER_NONE:
+ params->have_vga = GRUB_VIDEO_LINUX_TYPE_SIMPLE;
+ break;
+ }
+ }
+
+#ifdef GRUB_MACHINE_PCBIOS
+ /* VESA packed modes may come with zeroed mask sizes, which need
+ to be set here according to DAC Palette width. If we don't,
+ this results in Linux displaying a black screen. */
+ if (driver_id == GRUB_VIDEO_DRIVER_VBE && mode_info.bpp <= 8)
+ {
+ struct grub_vbe_info_block controller_info;
+ int status;
+ int width = 8;
+
+ status = grub_vbe_bios_get_controller_info (&controller_info);
+
+ if (status == GRUB_VBE_STATUS_OK &&
+ (controller_info.capabilities & GRUB_VBE_CAPABILITY_DACWIDTH))
+ status = grub_vbe_bios_set_dac_palette_width (&width);
+
+ if (status != GRUB_VBE_STATUS_OK)
+ /* 6 is default after mode reset. */
+ width = 6;
+
+ params->red_mask_size = params->green_mask_size
+ = params->blue_mask_size = width;
+ params->reserved_mask_size = 0;
+ }
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_linux_boot (void)
+{
+ struct linux_kernel_params *params;
+ int e820_num;
+ grub_err_t err = 0;
+ char *modevar, *tmp;
+ struct grub_relocator32_state state;
+
+ params = real_mode_mem;
+
+#ifdef GRUB_MACHINE_IEEE1275
+ {
+ char *bootpath;
+ grub_ssize_t len;
+
+ bootpath = grub_env_get ("root");
+ if (bootpath)
+ grub_ieee1275_set_property (grub_ieee1275_chosen,
+ "bootpath", bootpath,
+ grub_strlen (bootpath) + 1,
+ &len);
+ }
+#endif
+
+ grub_dprintf ("linux", "code32_start = %x\n",
+ (unsigned) params->code32_start);
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ switch (type)
+ {
+ case GRUB_MEMORY_AVAILABLE:
+ grub_e820_add_region (params->e820_map, &e820_num,
+ addr, size, GRUB_E820_RAM);
+ break;
+
+ case GRUB_MEMORY_ACPI:
+ grub_e820_add_region (params->e820_map, &e820_num,
+ addr, size, GRUB_E820_ACPI);
+ break;
+
+ case GRUB_MEMORY_NVS:
+ grub_e820_add_region (params->e820_map, &e820_num,
+ addr, size, GRUB_E820_NVS);
+ break;
+
+ case GRUB_MEMORY_BADRAM:
+ grub_e820_add_region (params->e820_map, &e820_num,
+ addr, size, GRUB_E820_BADRAM);
+ break;
+
+ default:
+ grub_e820_add_region (params->e820_map, &e820_num,
+ addr, size, GRUB_E820_RESERVED);
+ }
+ return 0;
+ }
+
+ e820_num = 0;
+ grub_mmap_iterate (hook);
+ params->mmap_size = e820_num;
+
+ modevar = grub_env_get ("gfxpayload");
+
+ /* Now all graphical modes are acceptable.
+ May change in future if we have modes without framebuffer. */
+ if (modevar && *modevar != 0)
+ {
+ tmp = grub_xasprintf ("%s;" DEFAULT_VIDEO_MODE, modevar);
+ if (! tmp)
+ return grub_errno;
+ err = grub_video_set_mode (tmp, 0, 0);
+ grub_free (tmp);
+ }
+ else
+ err = grub_video_set_mode (DEFAULT_VIDEO_MODE, 0, 0);
+
+ if (err)
+ {
+ grub_print_error ();
+ grub_printf ("Booting however\n");
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if (grub_linux_setup_video (params))
+ {
+#if defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU)
+ params->have_vga = GRUB_VIDEO_LINUX_TYPE_TEXT;
+ params->video_mode = 0x3;
+#else
+ params->have_vga = 0;
+ params->video_mode = 0;
+ params->video_width = 0;
+ params->video_height = 0;
+#endif
+ }
+
+ /* Initialize these last, because terminal position could be affected by printfs above. */
+#ifndef GRUB_MACHINE_IEEE1275
+ if (params->have_vga == GRUB_VIDEO_LINUX_TYPE_TEXT)
+#endif
+ {
+ grub_term_output_t term;
+ int found = 0;
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ if (grub_strcmp (term->name, "vga_text") == 0
+ || grub_strcmp (term->name, "console") == 0
+ || grub_strcmp (term->name, "ofconsole") == 0)
+ {
+ grub_uint16_t pos = grub_term_getxy (term);
+ params->video_cursor_x = pos >> 8;
+ params->video_cursor_y = pos & 0xff;
+ params->video_width = grub_term_width (term);
+ params->video_height = grub_term_height (term);
+ found = 1;
+ break;
+ }
+ if (!found)
+ {
+ params->video_cursor_x = 0;
+ params->video_cursor_y = 0;
+ params->video_width = 80;
+ params->video_height = 25;
+ }
+ }
+
+#ifdef GRUB_MACHINE_IEEE1275
+ {
+ params->ofw_signature = GRUB_LINUX_OFW_SIGNATURE;
+ params->ofw_num_items = 1;
+ params->ofw_cif_handler = (grub_uint32_t) grub_ieee1275_entry_fn;
+ params->ofw_idt = 0;
+ }
+#endif
+
+#ifdef GRUB_MACHINE_EFI
+ {
+ grub_efi_uintn_t efi_desc_size;
+ grub_size_t efi_mmap_target;
+ grub_efi_uint32_t efi_desc_version;
+ err = grub_efi_finish_boot_services (&efi_mmap_size, efi_mmap_buf, NULL,
+ &efi_desc_size, &efi_desc_version);
+ if (err)
+ return err;
+
+ /* Note that no boot services are available from here. */
+ efi_mmap_target = real_mode_target
+ + ((grub_uint8_t *) efi_mmap_buf - (grub_uint8_t *) real_mode_mem);
+ /* Pass EFI parameters. */
+ if (grub_le_to_cpu16 (params->version) >= 0x0206)
+ {
+ params->v0206.efi_mem_desc_size = efi_desc_size;
+ params->v0206.efi_mem_desc_version = efi_desc_version;
+ params->v0206.efi_mmap = efi_mmap_target;
+ params->v0206.efi_mmap_size = efi_mmap_size;
+#ifdef __x86_64__
+ params->v0206.efi_mmap_hi = (efi_mmap_target >> 32);
+#endif
+ }
+ else if (grub_le_to_cpu16 (params->version) >= 0x0204)
+ {
+ params->v0204.efi_mem_desc_size = efi_desc_size;
+ params->v0204.efi_mem_desc_version = efi_desc_version;
+ params->v0204.efi_mmap = efi_mmap_target;
+ params->v0204.efi_mmap_size = efi_mmap_size;
+ }
+ }
+#endif
+
+ /* FIXME. */
+ /* asm volatile ("lidt %0" : : "m" (idt_desc)); */
+ state.ebp = state.edi = state.ebx = 0;
+ state.esi = real_mode_target;
+ state.esp = real_mode_target;
+ state.eip = params->code32_start;
+ return grub_relocator32_boot (relocator, state);
+}
+
+static grub_err_t
+grub_linux_unload (void)
+{
+ grub_dl_unref (my_mod);
+ loaded = 0;
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ struct linux_kernel_header lh;
+ struct linux_kernel_params *params;
+ grub_uint8_t setup_sects;
+ grub_size_t real_size, prot_size;
+ grub_ssize_t len;
+ int i;
+
+ grub_dl_ref (my_mod);
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
+ goto fail;
+ }
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ goto fail;
+
+ if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
+ {
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read the Linux header");
+ goto fail;
+ }
+
+ if (lh.boot_flag != grub_cpu_to_le16 (0xaa55))
+ {
+ grub_error (GRUB_ERR_BAD_OS, "invalid magic number");
+ goto fail;
+ }
+
+ if (lh.setup_sects > GRUB_LINUX_MAX_SETUP_SECTS)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "too many setup sectors");
+ goto fail;
+ }
+
+ if (! (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL))
+ {
+ grub_error (GRUB_ERR_BAD_OS, "zImage doesn't support 32-bit boot"
+#ifdef GRUB_MACHINE_PCBIOS
+ " (try with `linux16')"
+#endif
+ );
+ goto fail;
+ }
+
+ /* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and
+ still not support 32-bit boot. */
+ if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
+ || grub_le_to_cpu16 (lh.version) < 0x0203)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "version too old for 32-bit boot"
+#ifdef GRUB_MACHINE_PCBIOS
+ " (try with `linux16')"
+#endif
+ );
+ goto fail;
+ }
+
+ setup_sects = lh.setup_sects;
+
+ /* If SETUP_SECTS is not set, set it to the default (4). */
+ if (! setup_sects)
+ setup_sects = GRUB_LINUX_DEFAULT_SETUP_SECTS;
+
+ real_size = setup_sects << GRUB_DISK_SECTOR_BITS;
+ prot_size = grub_file_size (file) - real_size - GRUB_DISK_SECTOR_SIZE;
+
+ if (allocate_pages (prot_size))
+ goto fail;
+
+ params = (struct linux_kernel_params *) real_mode_mem;
+ grub_memset (params, 0, GRUB_LINUX_CL_END_OFFSET);
+ grub_memcpy (&params->setup_sects, &lh.setup_sects, sizeof (lh) - 0x1F1);
+
+ params->ps_mouse = params->padding10 = 0;
+
+ len = 0x400 - sizeof (lh);
+ if (grub_file_read (file, (char *) real_mode_mem + sizeof (lh), len) != len)
+ {
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ goto fail;
+ }
+
+ params->type_of_loader = GRUB_LINUX_BOOT_LOADER_TYPE;
+
+ /* These two are used (instead of cmd_line_ptr) by older versions of Linux,
+ and otherwise ignored. */
+ params->cl_magic = GRUB_LINUX_CL_MAGIC;
+ params->cl_offset = 0x1000;
+
+ params->cmd_line_ptr = real_mode_target + 0x1000;
+ params->ramdisk_image = 0;
+ params->ramdisk_size = 0;
+
+ params->heap_end_ptr = GRUB_LINUX_HEAP_END_OFFSET;
+ params->loadflags |= GRUB_LINUX_FLAG_CAN_USE_HEAP;
+
+ /* These are not needed to be precise, because Linux uses these values
+ only to raise an error when the decompression code cannot find good
+ space. */
+ params->ext_mem = ((32 * 0x100000) >> 10);
+ params->alt_mem = ((32 * 0x100000) >> 10);
+
+ /* Ignored by Linux. */
+ params->video_page = 0;
+
+ /* Only used when `video_mode == 0x7', otherwise ignored. */
+ params->video_ega_bx = 0;
+
+ params->font_size = 16; /* XXX */
+
+#ifdef GRUB_MACHINE_EFI
+ if (grub_le_to_cpu16 (params->version) >= 0x0206)
+ {
+ params->v0206.efi_signature = GRUB_LINUX_EFI_SIGNATURE;
+ params->v0206.efi_system_table = (grub_uint32_t) (unsigned long) grub_efi_system_table;
+#ifdef __x86_64__
+ params->v0206.efi_system_table_hi = (grub_uint32_t) ((grub_uint64_t) grub_efi_system_table >> 32);
+#endif
+ }
+ else if (grub_le_to_cpu16 (params->version) >= 0x0204)
+ {
+ params->v0204.efi_signature = GRUB_LINUX_EFI_SIGNATURE_0204;
+ params->v0204.efi_system_table = (grub_uint32_t) (unsigned long) grub_efi_system_table;
+ }
+#endif
+
+ /* The other parameters are filled when booting. */
+
+ grub_file_seek (file, real_size + GRUB_DISK_SECTOR_SIZE);
+
+ grub_dprintf ("linux", "bzImage, setup=0x%x, size=0x%x\n",
+ (unsigned) real_size, (unsigned) prot_size);
+
+ /* Look for memory size and video mode specified on the command line. */
+ linux_mem_size = 0;
+ for (i = 1; i < argc; i++)
+#ifdef GRUB_MACHINE_PCBIOS
+ if (grub_memcmp (argv[i], "vga=", 4) == 0)
+ {
+ /* Video mode selection support. */
+ char *val = argv[i] + 4;
+ unsigned vid_mode = GRUB_LINUX_VID_MODE_NORMAL;
+ struct grub_vesa_mode_table_entry *linux_mode;
+ grub_err_t err;
+ char *buf;
+
+ grub_dl_load ("vbe");
+
+ if (grub_strcmp (val, "normal") == 0)
+ vid_mode = GRUB_LINUX_VID_MODE_NORMAL;
+ else if (grub_strcmp (val, "ext") == 0)
+ vid_mode = GRUB_LINUX_VID_MODE_EXTENDED;
+ else if (grub_strcmp (val, "ask") == 0)
+ {
+ grub_printf ("Legacy `ask' parameter no longer supported.\n");
+
+ /* We usually would never do this in a loader, but "vga=ask" means user
+ requested interaction, so it can't hurt to request keyboard input. */
+ grub_wait_after_message ();
+
+ goto fail;
+ }
+ else
+ vid_mode = (grub_uint16_t) grub_strtoul (val, 0, 0);
+
+ switch (vid_mode)
+ {
+ case 0:
+ case GRUB_LINUX_VID_MODE_NORMAL:
+ grub_env_set ("gfxpayload", "text");
+ grub_printf ("%s is deprecated. "
+ "Use set gfxpayload=text before "
+ "linux command instead.\n",
+ argv[i]);
+ break;
+
+ case 1:
+ case GRUB_LINUX_VID_MODE_EXTENDED:
+ /* FIXME: support 80x50 text. */
+ grub_env_set ("gfxpayload", "text");
+ grub_printf ("%s is deprecated. "
+ "Use set gfxpayload=text before "
+ "linux command instead.\n",
+ argv[i]);
+ break;
+ default:
+ /* Ignore invalid values. */
+ if (vid_mode < GRUB_VESA_MODE_TABLE_START ||
+ vid_mode > GRUB_VESA_MODE_TABLE_END)
+ {
+ grub_env_set ("gfxpayload", "text");
+ grub_printf ("%s is deprecated. Mode %d isn't recognized. "
+ "Use set gfxpayload=WIDTHxHEIGHT[xDEPTH] before "
+ "linux command instead.\n",
+ argv[i], vid_mode);
+ break;
+ }
+
+ linux_mode = &grub_vesa_mode_table[vid_mode
+ - GRUB_VESA_MODE_TABLE_START];
+
+ buf = grub_xasprintf ("%ux%ux%u,%ux%u",
+ linux_mode->width, linux_mode->height,
+ linux_mode->depth,
+ linux_mode->width, linux_mode->height);
+ if (! buf)
+ goto fail;
+
+ grub_printf ("%s is deprecated. "
+ "Use set gfxpayload=%s before "
+ "linux command instead.\n",
+ argv[i], buf);
+ err = grub_env_set ("gfxpayload", buf);
+ grub_free (buf);
+ if (err)
+ goto fail;
+ }
+ }
+ else
+#endif /* GRUB_MACHINE_PCBIOS */
+ if (grub_memcmp (argv[i], "mem=", 4) == 0)
+ {
+ char *val = argv[i] + 4;
+
+ linux_mem_size = grub_strtoul (val, &val, 0);
+
+ if (grub_errno)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ linux_mem_size = 0;
+ }
+ else
+ {
+ int shift = 0;
+
+ switch (grub_tolower (val[0]))
+ {
+ case 'g':
+ shift += 10;
+ case 'm':
+ shift += 10;
+ case 'k':
+ shift += 10;
+ default:
+ break;
+ }
+
+ /* Check an overflow. */
+ if (linux_mem_size > (~0UL >> shift))
+ linux_mem_size = 0;
+ else
+ linux_mem_size <<= shift;
+ }
+ }
+ else if (grub_memcmp (argv[i], "quiet", sizeof ("quiet") - 1) == 0)
+ {
+ params->loadflags |= GRUB_LINUX_FLAG_QUIET;
+ }
+
+ /* Create kernel command line. */
+ grub_memcpy ((char *)real_mode_mem + GRUB_LINUX_CL_OFFSET, LINUX_IMAGE,
+ sizeof (LINUX_IMAGE));
+ grub_create_loader_cmdline (argc, argv,
+ (char *)real_mode_mem + GRUB_LINUX_CL_OFFSET
+ + sizeof (LINUX_IMAGE) - 1,
+ GRUB_LINUX_CL_END_OFFSET - GRUB_LINUX_CL_OFFSET
+ - (sizeof (LINUX_IMAGE) - 1));
+
+ len = prot_size;
+ if (grub_file_read (file, prot_mode_mem, len) != len)
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ grub_loader_set (grub_linux_boot, grub_linux_unload,
+ 0 /* set noreturn=0 in order to avoid grub_console_fini() */);
+ loaded = 1;
+ }
+
+ fail:
+
+ if (file)
+ grub_file_close (file);
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_dl_unref (my_mod);
+ loaded = 0;
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_ssize_t size;
+ grub_addr_t addr_min, addr_max;
+ grub_addr_t addr;
+ grub_err_t err;
+ struct linux_kernel_header *lh;
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
+ goto fail;
+ }
+
+ if (! loaded)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
+ goto fail;
+ }
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (argv[0]);
+ if (! file)
+ goto fail;
+
+ size = grub_file_size (file);
+ initrd_pages = (page_align (size) >> 12);
+
+ lh = (struct linux_kernel_header *) real_mode_mem;
+
+ /* Get the highest address available for the initrd. */
+ if (grub_le_to_cpu16 (lh->version) >= 0x0203)
+ {
+ addr_max = grub_cpu_to_le32 (lh->initrd_addr_max);
+
+ /* XXX in reality, Linux specifies a bogus value, so
+ it is necessary to make sure that ADDR_MAX does not exceed
+ 0x3fffffff. */
+ if (addr_max > GRUB_LINUX_INITRD_MAX_ADDRESS)
+ addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
+ }
+ else
+ addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
+
+ if (linux_mem_size != 0 && linux_mem_size < addr_max)
+ addr_max = linux_mem_size;
+
+ /* Linux 2.3.xx has a bug in the memory range check, so avoid
+ the last page.
+ Linux 2.2.xx has a bug in the memory range check, which is
+ worse than that of Linux 2.3.xx, so avoid the last 64kb. */
+ addr_max -= 0x10000;
+
+ /* Usually, the compression ratio is about 50%. */
+ addr_min = (grub_addr_t) prot_mode_target + ((prot_mode_pages * 3) << 12)
+ + page_align (size);
+
+ /* Put the initrd as high as possible, 4KiB aligned. */
+ addr = (addr_max - size) & ~0xFFF;
+
+ if (addr < addr_min)
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, "the initrd is too big");
+ goto fail;
+ }
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (relocator, &ch,
+ addr_min, addr, size, 0x1000,
+ GRUB_RELOCATOR_PREFERENCE_HIGH);
+ if (err)
+ return err;
+ initrd_mem = get_virtual_current_address (ch);
+ initrd_mem_target = get_physical_target_address (ch);
+ }
+
+ if (grub_file_read (file, initrd_mem, size) != size)
+ {
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ goto fail;
+ }
+
+ grub_dprintf ("linux", "Initrd, addr=0x%x, size=0x%x\n",
+ (unsigned) addr, (unsigned) size);
+
+ lh->ramdisk_image = initrd_mem_target;
+ lh->ramdisk_size = size;
+ lh->root_dev = 0x0100; /* XXX */
+
+ fail:
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd_linux, cmd_initrd;
+
+GRUB_MOD_INIT(linux)
+{
+ cmd_linux = grub_register_command ("linux", grub_cmd_linux,
+ 0, N_("Load Linux."));
+ cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
+ 0, N_("Load initrd."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(linux)
+{
+ grub_unregister_command (cmd_linux);
+ grub_unregister_command (cmd_initrd);
+}
diff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c
new file mode 100644
index 0000000..bef5342
--- /dev/null
+++ b/grub-core/loader/i386/multiboot_mbi.c
@@ -0,0 +1,731 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/memory.h>
+#ifdef GRUB_MACHINE_PCBIOS
+#include <grub/machine/biosnum.h>
+#include <grub/machine/apm.h>
+#include <grub/machine/memory.h>
+#endif
+#include <grub/multiboot.h>
+#include <grub/cpu/relocator.h>
+#include <grub/disk.h>
+#include <grub/device.h>
+#include <grub/partition.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/relocator.h>
+#include <grub/video.h>
+#include <grub/file.h>
+
+/* The bits in the required part of flags field we don't support. */
+#define UNSUPPORTED_FLAGS 0x0000fff8
+
+struct module
+{
+ struct module *next;
+ grub_addr_t start;
+ grub_size_t size;
+ char *cmdline;
+ int cmdline_size;
+};
+
+static struct module *modules, *modules_last;
+static grub_size_t cmdline_size;
+static grub_size_t total_modcmd;
+static unsigned modcnt;
+static char *cmdline = NULL;
+static grub_uint32_t bootdev;
+static int bootdev_set;
+static grub_size_t elf_sec_num, elf_sec_entsize;
+static unsigned elf_sec_shstrndx;
+static void *elf_sections;
+
+
+grub_err_t
+grub_multiboot_load (grub_file_t file)
+{
+ char *buffer;
+ grub_ssize_t len;
+ struct multiboot_header *header;
+ grub_err_t err;
+
+ buffer = grub_malloc (MULTIBOOT_SEARCH);
+ if (!buffer)
+ return grub_errno;
+
+ len = grub_file_read (file, buffer, MULTIBOOT_SEARCH);
+ if (len < 32)
+ {
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_BAD_OS, "file too small");
+ }
+
+ /* Look for the multiboot header in the buffer. The header should
+ be at least 12 bytes and aligned on a 4-byte boundary. */
+ for (header = (struct multiboot_header *) buffer;
+ ((char *) header <= buffer + len - 12) || (header = 0);
+ header = (struct multiboot_header *) ((char *) header + MULTIBOOT_HEADER_ALIGN))
+ {
+ if (header->magic == MULTIBOOT_HEADER_MAGIC
+ && !(header->magic + header->flags + header->checksum))
+ break;
+ }
+
+ if (header == 0)
+ {
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no multiboot header found");
+ }
+
+ if (header->flags & UNSUPPORTED_FLAGS)
+ {
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_UNKNOWN_OS,
+ "unsupported flag: 0x%x", header->flags);
+ }
+
+ if (header->flags & MULTIBOOT_AOUT_KLUDGE)
+ {
+ int offset = ((char *) header - buffer -
+ (header->header_addr - header->load_addr));
+ int load_size = ((header->load_end_addr == 0) ? file->size - offset :
+ header->load_end_addr - header->load_addr);
+ grub_size_t code_size;
+ void *source;
+ grub_relocator_chunk_t ch;
+
+ if (header->bss_end_addr)
+ code_size = (header->bss_end_addr - header->load_addr);
+ else
+ code_size = load_size;
+
+ err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator,
+ &ch, header->load_addr,
+ code_size);
+ if (err)
+ {
+ grub_dprintf ("multiboot_loader", "Error loading aout kludge\n");
+ grub_free (buffer);
+ return err;
+ }
+ source = get_virtual_current_address (ch);
+
+ if ((grub_file_seek (file, offset)) == (grub_off_t) -1)
+ {
+ grub_free (buffer);
+ return grub_errno;
+ }
+
+ grub_file_read (file, source, load_size);
+ if (grub_errno)
+ {
+ grub_free (buffer);
+ return grub_errno;
+ }
+
+ if (header->bss_end_addr)
+ grub_memset ((grub_uint8_t *) source + load_size, 0,
+ header->bss_end_addr - header->load_addr - load_size);
+
+ grub_multiboot_payload_eip = header->entry_addr;
+ }
+ else
+ {
+ err = grub_multiboot_load_elf (file, buffer);
+ if (err)
+ {
+ grub_free (buffer);
+ return err;
+ }
+ }
+
+ if (header->flags & MULTIBOOT_VIDEO_MODE)
+ {
+ switch (header->mode_type)
+ {
+ case 1:
+ err = grub_multiboot_set_console (GRUB_MULTIBOOT_CONSOLE_EGA_TEXT,
+ GRUB_MULTIBOOT_CONSOLE_EGA_TEXT
+ | GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER,
+ 0, 0, 0, 0);
+ break;
+ case 0:
+ err = grub_multiboot_set_console (GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER,
+ GRUB_MULTIBOOT_CONSOLE_EGA_TEXT
+ | GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER,
+ header->width, header->height,
+ header->depth, 0);
+ break;
+ default:
+ err = grub_error (GRUB_ERR_BAD_OS,
+ "unsupported graphical mode type %d",
+ header->mode_type);
+ break;
+ }
+ }
+ else
+ err = grub_multiboot_set_console (GRUB_MULTIBOOT_CONSOLE_EGA_TEXT,
+ GRUB_MULTIBOOT_CONSOLE_EGA_TEXT,
+ 0, 0, 0, 0);
+ return err;
+}
+
+#if GRUB_MACHINE_HAS_VBE || GRUB_MACHINE_HAS_VGA_TEXT
+#include <grub/i386/pc/vbe.h>
+#endif
+
+static grub_size_t
+grub_multiboot_get_mbi_size (void)
+{
+ return sizeof (struct multiboot_info) + ALIGN_UP (cmdline_size, 4)
+ + modcnt * sizeof (struct multiboot_mod_list) + total_modcmd
+ + ALIGN_UP (sizeof(PACKAGE_STRING), 4)
+ + grub_get_multiboot_mmap_count () * sizeof (struct multiboot_mmap_entry)
+ + elf_sec_entsize * elf_sec_num
+ + 256 * sizeof (struct multiboot_color)
+#if GRUB_MACHINE_HAS_VBE || GRUB_MACHINE_HAS_VGA_TEXT
+ + sizeof (struct grub_vbe_info_block)
+ + sizeof (struct grub_vbe_mode_info_block)
+#endif
+ + ALIGN_UP (sizeof (struct multiboot_apm_info), 4);
+}
+
+/* Fill previously allocated Multiboot mmap. */
+static void
+grub_fill_multiboot_mmap (struct multiboot_mmap_entry *first_entry)
+{
+ struct multiboot_mmap_entry *mmap_entry = (struct multiboot_mmap_entry *) first_entry;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ mmap_entry->addr = addr;
+ mmap_entry->len = size;
+ switch (type)
+ {
+ case GRUB_MEMORY_AVAILABLE:
+ mmap_entry->type = MULTIBOOT_MEMORY_AVAILABLE;
+ break;
+
+ case GRUB_MEMORY_ACPI:
+ mmap_entry->type = MULTIBOOT_MEMORY_ACPI_RECLAIMABLE;
+ break;
+
+ case GRUB_MEMORY_NVS:
+ mmap_entry->type = MULTIBOOT_MEMORY_NVS;
+ break;
+
+ case GRUB_MEMORY_BADRAM:
+ mmap_entry->type = MULTIBOOT_MEMORY_BADRAM;
+ break;
+
+ default:
+ mmap_entry->type = MULTIBOOT_MEMORY_RESERVED;
+ break;
+ }
+ mmap_entry->size = sizeof (struct multiboot_mmap_entry) - sizeof (mmap_entry->size);
+ mmap_entry++;
+
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+}
+
+#if GRUB_MACHINE_HAS_VBE || GRUB_MACHINE_HAS_VGA_TEXT
+
+static grub_err_t
+fill_vbe_info (struct multiboot_info *mbi, grub_uint8_t *ptrorig,
+ grub_uint32_t ptrdest, int fill_generic)
+{
+ grub_uint32_t vbe_mode;
+ struct grub_vbe_mode_info_block *mode_info;
+#if GRUB_MACHINE_HAS_VBE
+ grub_vbe_status_t status;
+ void *scratch = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+
+ status = grub_vbe_bios_get_controller_info (scratch);
+ if (status != GRUB_VBE_STATUS_OK)
+ return grub_error (GRUB_ERR_IO, "Can't get controller info.");
+
+ mbi->vbe_control_info = ptrdest;
+ grub_memcpy (ptrorig, scratch, sizeof (struct grub_vbe_info_block));
+ ptrorig += sizeof (struct grub_vbe_info_block);
+ ptrdest += sizeof (struct grub_vbe_info_block);
+#else
+ mbi->vbe_control_info = 0;
+#endif
+
+#if GRUB_MACHINE_HAS_VBE
+ status = grub_vbe_bios_get_mode (scratch);
+ vbe_mode = *(grub_uint32_t *) scratch;
+ if (status != GRUB_VBE_STATUS_OK)
+ return grub_error (GRUB_ERR_IO, "can't get VBE mode");
+#else
+ vbe_mode = 3;
+#endif
+ mbi->vbe_mode = vbe_mode;
+
+ mode_info = (struct grub_vbe_mode_info_block *) ptrorig;
+ mbi->vbe_mode_info = ptrdest;
+ /* get_mode_info isn't available for mode 3. */
+ if (vbe_mode == 3)
+ {
+ grub_memset (mode_info, 0, sizeof (struct grub_vbe_mode_info_block));
+ mode_info->memory_model = GRUB_VBE_MEMORY_MODEL_TEXT;
+ mode_info->x_resolution = 80;
+ mode_info->y_resolution = 25;
+ }
+ else
+ {
+#if GRUB_MACHINE_HAS_VBE
+ status = grub_vbe_bios_get_mode_info (vbe_mode, scratch);
+ if (status != GRUB_VBE_STATUS_OK)
+ return grub_error (GRUB_ERR_IO, "can't get mode info");
+ grub_memcpy (mode_info, scratch,
+ sizeof (struct grub_vbe_mode_info_block));
+#endif
+ }
+ ptrorig += sizeof (struct grub_vbe_mode_info_block);
+ ptrdest += sizeof (struct grub_vbe_mode_info_block);
+
+#if GRUB_MACHINE_HAS_VBE
+ grub_vbe_bios_get_pm_interface (&mbi->vbe_interface_seg,
+ &mbi->vbe_interface_off,
+ &mbi->vbe_interface_len);
+#endif
+
+ mbi->flags |= MULTIBOOT_INFO_VBE_INFO;
+
+ if (fill_generic && mode_info->memory_model == GRUB_VBE_MEMORY_MODEL_TEXT)
+ {
+ mbi->framebuffer_addr = 0xb8000;
+
+ mbi->framebuffer_pitch = 2 * mode_info->x_resolution;
+ mbi->framebuffer_width = mode_info->x_resolution;
+ mbi->framebuffer_height = mode_info->y_resolution;
+
+ mbi->framebuffer_bpp = 16;
+
+ mbi->framebuffer_type = MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT;
+
+ mbi->flags |= MULTIBOOT_INFO_FRAMEBUFFER_INFO;
+ }
+
+ return GRUB_ERR_NONE;
+}
+#endif
+
+static grub_err_t
+retrieve_video_parameters (struct multiboot_info *mbi,
+ grub_uint8_t *ptrorig, grub_uint32_t ptrdest)
+{
+ grub_err_t err;
+ struct grub_video_mode_info mode_info;
+ void *framebuffer;
+ grub_video_driver_id_t driv_id;
+ struct grub_video_palette_data palette[256];
+
+ err = grub_multiboot_set_video_mode ();
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ grub_video_get_palette (0, ARRAY_SIZE (palette), palette);
+
+ driv_id = grub_video_get_driver_id ();
+#if GRUB_MACHINE_HAS_VGA_TEXT
+ if (driv_id == GRUB_VIDEO_DRIVER_NONE)
+ return fill_vbe_info (mbi, ptrorig, ptrdest, 1);
+#else
+ if (driv_id == GRUB_VIDEO_DRIVER_NONE)
+ return GRUB_ERR_NONE;
+#endif
+
+ err = grub_video_get_info_and_fini (&mode_info, &framebuffer);
+ if (err)
+ return err;
+
+ mbi->framebuffer_addr = (grub_addr_t) framebuffer;
+ mbi->framebuffer_pitch = mode_info.pitch;
+
+ mbi->framebuffer_width = mode_info.width;
+ mbi->framebuffer_height = mode_info.height;
+
+ mbi->framebuffer_bpp = mode_info.bpp;
+
+ if (mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)
+ {
+ struct multiboot_color *mb_palette;
+ unsigned i;
+ mbi->framebuffer_type = MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED;
+ mbi->framebuffer_palette_addr = ptrdest;
+ mbi->framebuffer_palette_num_colors = mode_info.number_of_colors;
+ if (mbi->framebuffer_palette_num_colors > ARRAY_SIZE (palette))
+ mbi->framebuffer_palette_num_colors = ARRAY_SIZE (palette);
+ mb_palette = (struct multiboot_color *) ptrorig;
+ for (i = 0; i < mbi->framebuffer_palette_num_colors; i++)
+ {
+ mb_palette[i].red = palette[i].r;
+ mb_palette[i].green = palette[i].g;
+ mb_palette[i].blue = palette[i].b;
+ }
+ ptrorig += mbi->framebuffer_palette_num_colors
+ * sizeof (struct multiboot_color);
+ ptrdest += mbi->framebuffer_palette_num_colors
+ * sizeof (struct multiboot_color);
+ }
+ else
+ {
+ mbi->framebuffer_type = MULTIBOOT_FRAMEBUFFER_TYPE_RGB;
+ mbi->framebuffer_red_field_position = mode_info.red_field_pos;
+ mbi->framebuffer_red_mask_size = mode_info.red_mask_size;
+ mbi->framebuffer_green_field_position = mode_info.green_field_pos;
+ mbi->framebuffer_green_mask_size = mode_info.green_mask_size;
+ mbi->framebuffer_blue_field_position = mode_info.blue_field_pos;
+ mbi->framebuffer_blue_mask_size = mode_info.blue_mask_size;
+ }
+
+ mbi->flags |= MULTIBOOT_INFO_FRAMEBUFFER_INFO;
+
+#if GRUB_MACHINE_HAS_VBE
+ if (driv_id == GRUB_VIDEO_DRIVER_VBE)
+ return fill_vbe_info (mbi, ptrorig, ptrdest, 0);
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_multiboot_make_mbi (grub_uint32_t *target)
+{
+ struct multiboot_info *mbi;
+ struct multiboot_mod_list *modlist;
+ unsigned i;
+ struct module *cur;
+ grub_size_t mmap_size;
+ grub_uint8_t *ptrorig;
+ grub_addr_t ptrdest;
+
+ grub_err_t err;
+ grub_size_t bufsize;
+ grub_relocator_chunk_t ch;
+
+ bufsize = grub_multiboot_get_mbi_size ();
+
+ err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch,
+ 0x10000, 0x100000 - bufsize,
+ bufsize, 4,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+ ptrorig = get_virtual_current_address (ch);
+ ptrdest = get_physical_target_address (ch);
+
+ *target = ptrdest;
+
+ mbi = (struct multiboot_info *) ptrorig;
+ ptrorig += sizeof (*mbi);
+ ptrdest += sizeof (*mbi);
+ grub_memset (mbi, 0, sizeof (*mbi));
+
+ grub_memcpy (ptrorig, cmdline, cmdline_size);
+ mbi->flags |= MULTIBOOT_INFO_CMDLINE;
+ mbi->cmdline = ptrdest;
+ ptrorig += ALIGN_UP (cmdline_size, 4);
+ ptrdest += ALIGN_UP (cmdline_size, 4);
+
+ grub_memcpy (ptrorig, PACKAGE_STRING, sizeof(PACKAGE_STRING));
+ mbi->flags |= MULTIBOOT_INFO_BOOT_LOADER_NAME;
+ mbi->boot_loader_name = ptrdest;
+ ptrorig += ALIGN_UP (sizeof(PACKAGE_STRING), 4);
+ ptrdest += ALIGN_UP (sizeof(PACKAGE_STRING), 4);
+
+#ifdef GRUB_MACHINE_PCBIOS
+ {
+ struct grub_apm_info info;
+ if (grub_apm_get_info (&info))
+ {
+ struct multiboot_apm_info *mbinfo = (void *) ptrorig;
+
+ mbinfo->cseg = info.cseg;
+ mbinfo->offset = info.offset;
+ mbinfo->cseg_16 = info.cseg_16;
+ mbinfo->dseg = info.dseg;
+ mbinfo->flags = info.flags;
+ mbinfo->cseg_len = info.cseg_len;
+ mbinfo->dseg_len = info.dseg_len;
+ mbinfo->cseg_16_len = info.cseg_16_len;
+ mbinfo->version = info.version;
+
+ ptrorig += ALIGN_UP (sizeof (struct multiboot_apm_info), 4);
+ ptrdest += ALIGN_UP (sizeof (struct multiboot_apm_info), 4);
+ }
+ }
+#endif
+
+ if (modcnt)
+ {
+ mbi->flags |= MULTIBOOT_INFO_MODS;
+ mbi->mods_addr = ptrdest;
+ mbi->mods_count = modcnt;
+ modlist = (struct multiboot_mod_list *) ptrorig;
+ ptrorig += modcnt * sizeof (struct multiboot_mod_list);
+ ptrdest += modcnt * sizeof (struct multiboot_mod_list);
+
+ for (i = 0, cur = modules; i < modcnt; i++, cur = cur->next)
+ {
+ modlist[i].mod_start = cur->start;
+ modlist[i].mod_end = modlist[i].mod_start + cur->size;
+ modlist[i].cmdline = ptrdest;
+ grub_memcpy (ptrorig, cur->cmdline, cur->cmdline_size);
+ ptrorig += ALIGN_UP (cur->cmdline_size, 4);
+ ptrdest += ALIGN_UP (cur->cmdline_size, 4);
+ }
+ }
+ else
+ {
+ mbi->mods_addr = 0;
+ mbi->mods_count = 0;
+ }
+
+ mmap_size = grub_get_multiboot_mmap_count ()
+ * sizeof (struct multiboot_mmap_entry);
+ grub_fill_multiboot_mmap ((struct multiboot_mmap_entry *) ptrorig);
+ mbi->mmap_length = mmap_size;
+ mbi->mmap_addr = ptrdest;
+ mbi->flags |= MULTIBOOT_INFO_MEM_MAP;
+ ptrorig += mmap_size;
+ ptrdest += mmap_size;
+
+ /* Convert from bytes to kilobytes. */
+ mbi->mem_lower = grub_mmap_get_lower () / 1024;
+ mbi->mem_upper = grub_mmap_get_upper () / 1024;
+ mbi->flags |= MULTIBOOT_INFO_MEMORY;
+
+ if (bootdev_set)
+ {
+ mbi->boot_device = bootdev;
+ mbi->flags |= MULTIBOOT_INFO_BOOTDEV;
+ }
+
+ if (elf_sec_num)
+ {
+ mbi->u.elf_sec.addr = ptrdest;
+ grub_memcpy (ptrorig, elf_sections, elf_sec_entsize * elf_sec_num);
+ mbi->u.elf_sec.num = elf_sec_num;
+ mbi->u.elf_sec.size = elf_sec_entsize;
+ mbi->u.elf_sec.shndx = elf_sec_shstrndx;
+
+ mbi->flags |= MULTIBOOT_INFO_ELF_SHDR;
+
+ ptrorig += elf_sec_entsize * elf_sec_num;
+ ptrdest += elf_sec_entsize * elf_sec_num;
+ }
+
+ err = retrieve_video_parameters (mbi, ptrorig, ptrdest);
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if ((mbi->flags & MULTIBOOT_INFO_FRAMEBUFFER_INFO)
+ && mbi->framebuffer_type == MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED)
+ {
+ ptrorig += mbi->framebuffer_palette_num_colors
+ * sizeof (struct multiboot_color);
+ ptrdest += mbi->framebuffer_palette_num_colors
+ * sizeof (struct multiboot_color);
+ }
+
+#if GRUB_MACHINE_HAS_VBE
+ ptrorig += sizeof (struct grub_vbe_info_block);
+ ptrdest += sizeof (struct grub_vbe_info_block);
+ ptrorig += sizeof (struct grub_vbe_mode_info_block);
+ ptrdest += sizeof (struct grub_vbe_mode_info_block);
+#endif
+
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_multiboot_add_elfsyms (grub_size_t num, grub_size_t entsize,
+ unsigned shndx, void *data)
+{
+ elf_sec_num = num;
+ elf_sec_shstrndx = shndx;
+ elf_sec_entsize = entsize;
+ elf_sections = data;
+}
+
+void
+grub_multiboot_free_mbi (void)
+{
+ struct module *cur, *next;
+
+ cmdline_size = 0;
+ total_modcmd = 0;
+ modcnt = 0;
+ grub_free (cmdline);
+ cmdline = NULL;
+ bootdev_set = 0;
+
+ for (cur = modules; cur; cur = next)
+ {
+ next = cur->next;
+ grub_free (cur->cmdline);
+ grub_free (cur);
+ }
+ modules = NULL;
+ modules_last = NULL;
+
+ grub_free (elf_sections);
+ elf_sections = NULL;
+ elf_sec_entsize = 0;
+ elf_sec_num = 0;
+}
+
+grub_err_t
+grub_multiboot_init_mbi (int argc, char *argv[])
+{
+ grub_ssize_t len = 0;
+ char *p;
+ int i;
+
+ grub_multiboot_free_mbi ();
+
+ for (i = 0; i < argc; i++)
+ len += grub_strlen (argv[i]) + 1;
+ if (len == 0)
+ len = 1;
+
+ cmdline = p = grub_malloc (len);
+ if (! cmdline)
+ return grub_errno;
+ cmdline_size = len;
+
+ for (i = 0; i < argc; i++)
+ {
+ p = grub_stpcpy (p, argv[i]);
+ *(p++) = ' ';
+ }
+
+ /* Remove the space after the last word. */
+ if (p != cmdline)
+ p--;
+ *p = '\0';
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_multiboot_add_module (grub_addr_t start, grub_size_t size,
+ int argc, char *argv[])
+{
+ struct module *newmod;
+ char *p;
+ grub_ssize_t len = 0;
+ int i;
+
+ newmod = grub_malloc (sizeof (*newmod));
+ if (!newmod)
+ return grub_errno;
+ newmod->start = start;
+ newmod->size = size;
+ newmod->next = 0;
+
+ for (i = 0; i < argc; i++)
+ len += grub_strlen (argv[i]) + 1;
+
+ if (len == 0)
+ len = 1;
+
+ newmod->cmdline = p = grub_malloc (len);
+ if (! newmod->cmdline)
+ {
+ grub_free (newmod);
+ return grub_errno;
+ }
+ newmod->cmdline_size = len;
+ total_modcmd += ALIGN_UP (len, 4);
+
+ for (i = 0; i < argc; i++)
+ {
+ p = grub_stpcpy (p, argv[i]);
+ *(p++) = ' ';
+ }
+
+ /* Remove the space after the last word. */
+ if (p != newmod->cmdline)
+ p--;
+ *p = '\0';
+
+ if (modules_last)
+ modules_last->next = newmod;
+ else
+ {
+ modules = newmod;
+ modules_last->next = NULL;
+ }
+ modules_last = newmod;
+
+ modcnt++;
+
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_multiboot_set_bootdev (void)
+{
+ grub_uint32_t biosdev, slice = ~0, part = ~0;
+ grub_device_t dev;
+
+#ifdef GRUB_MACHINE_PCBIOS
+ biosdev = grub_get_root_biosnumber ();
+#else
+ biosdev = 0xffffffff;
+#endif
+
+ if (biosdev == 0xffffffff)
+ return;
+
+ dev = grub_device_open (0);
+ if (dev && dev->disk && dev->disk->partition)
+ {
+ if (dev->disk->partition->parent)
+ {
+ part = dev->disk->partition->number;
+ slice = dev->disk->partition->parent->number;
+ }
+ else
+ slice = dev->disk->partition->number;
+ }
+ if (dev)
+ grub_device_close (dev);
+
+ bootdev = ((biosdev & 0xff) << 24) | ((slice & 0xff) << 16)
+ | ((part & 0xff) << 8) | 0xff;
+ bootdev_set = 1;
+}
diff --git a/grub-core/loader/i386/pc/chainloader.c b/grub-core/loader/i386/pc/chainloader.c
new file mode 100644
index 0000000..794316b
--- /dev/null
+++ b/grub-core/loader/i386/pc/chainloader.c
@@ -0,0 +1,177 @@
+/* chainloader.c - boot another boot loader */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/loader.h>
+#include <grub/machine/loader.h>
+#include <grub/machine/chainloader.h>
+#include <grub/machine/memory.h>
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/partition.h>
+#include <grub/memory.h>
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/msdos_partition.h>
+#include <grub/machine/biosnum.h>
+#include <grub/cpu/floppy.h>
+#include <grub/i18n.h>
+#include <grub/video.h>
+#include <grub/mm.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+static int boot_drive;
+static void *boot_part_addr;
+
+static grub_err_t
+grub_chainloader_boot (void)
+{
+ grub_video_set_mode ("text", 0, 0);
+ grub_chainloader_real_boot (boot_drive, boot_part_addr);
+
+ /* Never reach here. */
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_chainloader_unload (void)
+{
+ grub_dl_unref (my_mod);
+ return GRUB_ERR_NONE;
+}
+
+static void
+grub_chainloader_cmd (const char *filename, grub_chainloader_flags_t flags)
+{
+ grub_file_t file = 0;
+ grub_uint16_t signature;
+ grub_device_t dev;
+ int drive = -1;
+ void *part_addr = 0;
+
+ grub_dl_ref (my_mod);
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (filename);
+ if (! file)
+ goto fail;
+
+ /* Read the first block. */
+ if (grub_file_read (file, (void *) 0x7C00, GRUB_DISK_SECTOR_SIZE)
+ != GRUB_DISK_SECTOR_SIZE)
+ {
+ if (grub_errno == GRUB_ERR_NONE)
+ grub_error (GRUB_ERR_BAD_OS, "too small");
+
+ goto fail;
+ }
+
+ /* Check the signature. */
+ signature = *((grub_uint16_t *) (0x7C00 + GRUB_DISK_SECTOR_SIZE - 2));
+ if (signature != grub_le_to_cpu16 (0xaa55)
+ && ! (flags & GRUB_CHAINLOADER_FORCE))
+ {
+ grub_error (GRUB_ERR_BAD_OS, "invalid signature");
+ goto fail;
+ }
+
+ grub_file_close (file);
+
+ /* Obtain the partition table from the root device. */
+ drive = grub_get_root_biosnumber ();
+ dev = grub_device_open (0);
+ if (dev && dev->disk && dev->disk->partition)
+ {
+ grub_disk_t disk = dev->disk;
+
+ if (disk)
+ {
+ grub_partition_t p = disk->partition;
+
+ if (p && grub_strcmp (p->partmap->name, "msdos") == 0)
+ {
+ disk->partition = p->parent;
+ grub_disk_read (disk, p->offset, 446, 64,
+ (void *) GRUB_MEMORY_MACHINE_PART_TABLE_ADDR);
+ part_addr = (void *) (GRUB_MEMORY_MACHINE_PART_TABLE_ADDR
+ + (p->index << 4));
+ disk->partition = p;
+ }
+ }
+ }
+
+ if (dev)
+ grub_device_close (dev);
+
+ /* Ignore errors. Perhaps it's not fatal. */
+ grub_errno = GRUB_ERR_NONE;
+
+ boot_drive = drive;
+ boot_part_addr = part_addr;
+
+ grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 1);
+ return;
+
+ fail:
+
+ if (file)
+ grub_file_close (file);
+
+ grub_dl_unref (my_mod);
+}
+
+static grub_err_t
+grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_chainloader_flags_t flags = 0;
+
+ if (argc > 0 && grub_strcmp (argv[0], "--force") == 0)
+ {
+ flags |= GRUB_CHAINLOADER_FORCE;
+ argc--;
+ argv++;
+ }
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
+ else
+ grub_chainloader_cmd (argv[0], flags);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(chainloader)
+{
+ cmd = grub_register_command ("chainloader", grub_cmd_chainloader,
+ 0, N_("Load another boot loader."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(chainloader)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
new file mode 100644
index 0000000..c6e6b67
--- /dev/null
+++ b/grub-core/loader/i386/pc/linux.c
@@ -0,0 +1,450 @@
+/* linux.c - boot Linux zImage or bzImage */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/loader.h>
+#include <grub/machine/loader.h>
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/memory.h>
+#include <grub/dl.h>
+#include <grub/cpu/linux.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/mm.h>
+#include <grub/cpu/relocator.h>
+#include <grub/video.h>
+#include <grub/i386/floppy.h>
+#include <grub/lib/cmdline.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_LINUX_CL_OFFSET 0x9000
+#define GRUB_LINUX_CL_END_OFFSET 0x90FF
+
+static grub_dl_t my_mod;
+
+static grub_size_t linux_mem_size;
+static int loaded;
+static struct grub_relocator *relocator = NULL;
+static grub_addr_t grub_linux_real_target;
+static char *grub_linux_real_chunk;
+static grub_size_t grub_linux16_prot_size;
+
+static grub_err_t
+grub_linux16_boot (void)
+{
+ grub_uint16_t segment;
+ struct grub_relocator16_state state;
+
+ segment = grub_linux_real_target >> 4;
+ state.gs = state.fs = state.es = state.ds = state.ss = segment;
+ state.sp = GRUB_LINUX_SETUP_STACK;
+ state.cs = segment + 0x20;
+ state.ip = 0;
+
+ grub_video_set_mode ("text", 0, 0);
+
+ grub_stop_floppy ();
+
+ return grub_relocator16_boot (relocator, state);
+}
+
+static grub_err_t
+grub_linux_unload (void)
+{
+ grub_dl_unref (my_mod);
+ loaded = 0;
+ grub_relocator_unload (relocator);
+ relocator = NULL;
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ struct linux_kernel_header lh;
+ grub_uint8_t setup_sects;
+ grub_size_t real_size;
+ grub_ssize_t len;
+ int i;
+ char *grub_linux_prot_chunk;
+ int grub_linux_is_bzimage;
+ grub_addr_t grub_linux_prot_target;
+ grub_err_t err;
+
+ grub_dl_ref (my_mod);
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
+ goto fail;
+ }
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ goto fail;
+
+ if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
+ {
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read the Linux header");
+ goto fail;
+ }
+
+ if (lh.boot_flag != grub_cpu_to_le16 (0xaa55))
+ {
+ grub_error (GRUB_ERR_BAD_OS, "invalid magic number");
+ goto fail;
+ }
+
+ if (lh.setup_sects > GRUB_LINUX_MAX_SETUP_SECTS)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "too many setup sectors");
+ goto fail;
+ }
+
+ grub_linux_is_bzimage = 0;
+ setup_sects = lh.setup_sects;
+ linux_mem_size = 0;
+
+ if (lh.header == grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
+ && grub_le_to_cpu16 (lh.version) >= 0x0200)
+ {
+ grub_linux_is_bzimage = (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL);
+ lh.type_of_loader = GRUB_LINUX_BOOT_LOADER_TYPE;
+
+ /* Put the real mode part at as a high location as possible. */
+ grub_linux_real_target = grub_mmap_get_lower ()
+ - GRUB_LINUX_SETUP_MOVE_SIZE;
+ /* But it must not exceed the traditional area. */
+ if (grub_linux_real_target > GRUB_LINUX_OLD_REAL_MODE_ADDR)
+ grub_linux_real_target = GRUB_LINUX_OLD_REAL_MODE_ADDR;
+
+ if (grub_le_to_cpu16 (lh.version) >= 0x0201)
+ {
+ lh.heap_end_ptr = grub_cpu_to_le16 (GRUB_LINUX_HEAP_END_OFFSET);
+ lh.loadflags |= GRUB_LINUX_FLAG_CAN_USE_HEAP;
+ }
+
+ if (grub_le_to_cpu16 (lh.version) >= 0x0202)
+ lh.cmd_line_ptr = grub_linux_real_target + GRUB_LINUX_CL_OFFSET;
+ else
+ {
+ lh.cl_magic = grub_cpu_to_le16 (GRUB_LINUX_CL_MAGIC);
+ lh.cl_offset = grub_cpu_to_le16 (GRUB_LINUX_CL_OFFSET);
+ lh.setup_move_size = grub_cpu_to_le16 (GRUB_LINUX_SETUP_MOVE_SIZE);
+ }
+ }
+ else
+ {
+ /* Your kernel is quite old... */
+ lh.cl_magic = grub_cpu_to_le16 (GRUB_LINUX_CL_MAGIC);
+ lh.cl_offset = grub_cpu_to_le16 (GRUB_LINUX_CL_OFFSET);
+
+ setup_sects = GRUB_LINUX_DEFAULT_SETUP_SECTS;
+
+ grub_linux_real_target = GRUB_LINUX_OLD_REAL_MODE_ADDR;
+ }
+
+ /* If SETUP_SECTS is not set, set it to the default (4). */
+ if (! setup_sects)
+ setup_sects = GRUB_LINUX_DEFAULT_SETUP_SECTS;
+
+ real_size = setup_sects << GRUB_DISK_SECTOR_BITS;
+ grub_linux16_prot_size = grub_file_size (file)
+ - real_size - GRUB_DISK_SECTOR_SIZE;
+
+ if (! grub_linux_is_bzimage
+ && GRUB_LINUX_ZIMAGE_ADDR + grub_linux16_prot_size
+ > grub_linux_real_target)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "too big zImage (0x%x > 0x%x), use bzImage instead",
+ (char *) GRUB_LINUX_ZIMAGE_ADDR + grub_linux16_prot_size,
+ (grub_size_t) grub_linux_real_target);
+ goto fail;
+ }
+
+ if (grub_linux_real_target + GRUB_LINUX_SETUP_MOVE_SIZE
+ > grub_mmap_get_lower ())
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "too small lower memory (0x%x > 0x%x)",
+ grub_linux_real_target + GRUB_LINUX_SETUP_MOVE_SIZE,
+ (int) grub_mmap_get_lower ());
+ goto fail;
+ }
+
+ grub_printf (" [Linux-%s, setup=0x%x, size=0x%x]\n",
+ grub_linux_is_bzimage ? "bzImage" : "zImage", real_size,
+ grub_linux16_prot_size);
+
+ relocator = grub_relocator_new ();
+ if (!relocator)
+ goto fail;
+
+ for (i = 1; i < argc; i++)
+ if (grub_memcmp (argv[i], "vga=", 4) == 0)
+ {
+ /* Video mode selection support. */
+ grub_uint16_t vid_mode;
+ char *val = argv[i] + 4;
+
+ if (grub_strcmp (val, "normal") == 0)
+ vid_mode = GRUB_LINUX_VID_MODE_NORMAL;
+ else if (grub_strcmp (val, "ext") == 0)
+ vid_mode = GRUB_LINUX_VID_MODE_EXTENDED;
+ else if (grub_strcmp (val, "ask") == 0)
+ vid_mode = GRUB_LINUX_VID_MODE_ASK;
+ else
+ vid_mode = (grub_uint16_t) grub_strtoul (val, 0, 0);
+
+ if (grub_errno)
+ goto fail;
+
+ lh.vid_mode = grub_cpu_to_le16 (vid_mode);
+ }
+ else if (grub_memcmp (argv[i], "mem=", 4) == 0)
+ {
+ char *val = argv[i] + 4;
+
+ linux_mem_size = grub_strtoul (val, &val, 0);
+
+ if (grub_errno)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ linux_mem_size = 0;
+ }
+ else
+ {
+ int shift = 0;
+
+ switch (grub_tolower (val[0]))
+ {
+ case 'g':
+ shift += 10;
+ case 'm':
+ shift += 10;
+ case 'k':
+ shift += 10;
+ default:
+ break;
+ }
+
+ /* Check an overflow. */
+ if (linux_mem_size > (~0UL >> shift))
+ linux_mem_size = 0;
+ else
+ linux_mem_size <<= shift;
+ }
+ }
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ grub_linux_real_target,
+ GRUB_LINUX_SETUP_MOVE_SIZE);
+ if (err)
+ return err;
+ grub_linux_real_chunk = get_virtual_current_address (ch);
+ }
+
+ /* Put the real mode code at the temporary address. */
+ grub_memmove (grub_linux_real_chunk, &lh, sizeof (lh));
+
+ len = real_size + GRUB_DISK_SECTOR_SIZE - sizeof (lh);
+ if (grub_file_read (file, grub_linux_real_chunk + sizeof (lh), len) != len)
+ {
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ goto fail;
+ }
+
+ if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
+ || grub_le_to_cpu16 (lh.version) < 0x0200)
+ /* Clear the heap space. */
+ grub_memset (grub_linux_real_chunk
+ + ((setup_sects + 1) << GRUB_DISK_SECTOR_BITS),
+ 0,
+ ((GRUB_LINUX_MAX_SETUP_SECTS - setup_sects - 1)
+ << GRUB_DISK_SECTOR_BITS));
+
+ /* Create kernel command line. */
+ grub_memcpy ((char *)grub_linux_real_chunk + GRUB_LINUX_CL_OFFSET,
+ LINUX_IMAGE, sizeof (LINUX_IMAGE));
+ grub_create_loader_cmdline (argc, argv,
+ (char *)grub_linux_real_chunk
+ + GRUB_LINUX_CL_OFFSET + sizeof (LINUX_IMAGE) - 1,
+ GRUB_LINUX_CL_END_OFFSET - GRUB_LINUX_CL_OFFSET
+ - (sizeof (LINUX_IMAGE) - 1));
+
+ if (grub_linux_is_bzimage)
+ grub_linux_prot_target = GRUB_LINUX_BZIMAGE_ADDR;
+ else
+ grub_linux_prot_target = GRUB_LINUX_ZIMAGE_ADDR;
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ grub_linux_prot_target,
+ grub_linux16_prot_size);
+ if (err)
+ return err;
+ grub_linux_prot_chunk = get_virtual_current_address (ch);
+ }
+
+ len = grub_linux16_prot_size;
+ if (grub_file_read (file, grub_linux_prot_chunk, grub_linux16_prot_size)
+ != (grub_ssize_t) grub_linux16_prot_size)
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ grub_loader_set (grub_linux16_boot, grub_linux_unload, 0);
+ loaded = 1;
+ }
+
+ fail:
+
+ if (file)
+ grub_file_close (file);
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_dl_unref (my_mod);
+ loaded = 0;
+ grub_relocator_unload (relocator);
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_ssize_t size;
+ grub_addr_t addr_max, addr_min;
+ struct linux_kernel_header *lh;
+ grub_uint8_t *initrd_chunk;
+ grub_addr_t initrd_addr;
+ grub_err_t err;
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
+ goto fail;
+ }
+
+ if (!loaded)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
+ goto fail;
+ }
+
+ lh = (struct linux_kernel_header *) grub_linux_real_chunk;
+
+ if (!(lh->header == grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
+ && grub_le_to_cpu16 (lh->version) >= 0x0200))
+ {
+ grub_error (GRUB_ERR_BAD_OS, "the kernel is too old for initrd");
+ goto fail;
+ }
+
+ /* Get the highest address available for the initrd. */
+ if (grub_le_to_cpu16 (lh->version) >= 0x0203)
+ {
+ addr_max = grub_cpu_to_le32 (lh->initrd_addr_max);
+
+ /* XXX in reality, Linux specifies a bogus value, so
+ it is necessary to make sure that ADDR_MAX does not exceed
+ 0x3fffffff. */
+ if (addr_max > GRUB_LINUX_INITRD_MAX_ADDRESS)
+ addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
+ }
+ else
+ addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
+
+ if (linux_mem_size != 0 && linux_mem_size < addr_max)
+ addr_max = linux_mem_size;
+
+ /* Linux 2.3.xx has a bug in the memory range check, so avoid
+ the last page.
+ Linux 2.2.xx has a bug in the memory range check, which is
+ worse than that of Linux 2.3.xx, so avoid the last 64kb. */
+ addr_max -= 0x10000;
+
+ addr_min = GRUB_LINUX_BZIMAGE_ADDR + grub_linux16_prot_size;
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (argv[0]);
+ if (!file)
+ goto fail;
+
+ size = grub_file_size (file);
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (relocator, &ch,
+ addr_min, addr_max - size,
+ size, 0x1000,
+ GRUB_RELOCATOR_PREFERENCE_HIGH);
+ if (err)
+ return err;
+ initrd_chunk = get_virtual_current_address (ch);
+ initrd_addr = get_physical_target_address (ch);
+ }
+
+ if (grub_file_read (file, initrd_chunk, size) != size)
+ {
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ goto fail;
+ }
+
+ lh->ramdisk_image = initrd_addr;
+ lh->ramdisk_size = size;
+
+ fail:
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd_linux, cmd_initrd;
+
+GRUB_MOD_INIT(linux16)
+{
+ cmd_linux =
+ grub_register_command ("linux16", grub_cmd_linux,
+ 0, N_("Load Linux."));
+ cmd_initrd =
+ grub_register_command ("initrd16", grub_cmd_initrd,
+ 0, N_("Load initrd."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(linux16)
+{
+ grub_unregister_command (cmd_linux);
+ grub_unregister_command (cmd_initrd);
+}
diff --git a/grub-core/loader/i386/pc/ntldr.c b/grub-core/loader/i386/pc/ntldr.c
new file mode 100644
index 0000000..4a08b54
--- /dev/null
+++ b/grub-core/loader/i386/pc/ntldr.c
@@ -0,0 +1,159 @@
+/* chainloader.c - boot another boot loader */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/loader.h>
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/partition.h>
+#include <grub/dl.h>
+#include <grub/command.h>
+#include <grub/machine/biosnum.h>
+#include <grub/i18n.h>
+#include <grub/video.h>
+#include <grub/mm.h>
+#include <grub/cpu/relocator.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+static struct grub_relocator *rel;
+static grub_uint32_t edx = 0xffffffff;
+
+#define GRUB_NTLDR_SEGMENT 0x2000
+
+static grub_err_t
+grub_ntldr_boot (void)
+{
+ struct grub_relocator16_state state = {
+ .cs = GRUB_NTLDR_SEGMENT,
+ .ip = 0,
+ .ds = 0,
+ .es = 0,
+ .fs = 0,
+ .gs = 0,
+ .ss = 0,
+ .sp = 0x7c00,
+ .edx = edx
+ };
+ grub_video_set_mode ("text", 0, 0);
+
+ return grub_relocator16_boot (rel, state);
+}
+
+static grub_err_t
+grub_ntldr_unload (void)
+{
+ grub_relocator_unload (rel);
+ rel = NULL;
+ grub_dl_unref (my_mod);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_ntldr (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_err_t err;
+ void *bs, *ntldr;
+ grub_size_t ntldrsize;
+ grub_device_t dev;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no file specified");
+
+ grub_dl_ref (my_mod);
+
+ rel = grub_relocator_new ();
+ if (!rel)
+ goto fail;
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ goto fail;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (rel, &ch, 0x7C00,
+ GRUB_DISK_SECTOR_SIZE);
+ if (err)
+ goto fail;
+ bs = get_virtual_current_address (ch);
+ }
+
+ edx = grub_get_root_biosnumber ();
+ dev = grub_device_open (0);
+
+ if (dev && dev->disk)
+ {
+ err = grub_disk_read (dev->disk, 0, 0, GRUB_DISK_SECTOR_SIZE, bs);
+ if (err)
+ {
+ grub_device_close (dev);
+ goto fail;
+ }
+ }
+
+ if (dev)
+ grub_device_close (dev);
+
+ ntldrsize = grub_file_size (file);
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (rel, &ch, GRUB_NTLDR_SEGMENT << 4,
+ ntldrsize);
+ if (err)
+ goto fail;
+ ntldr = get_virtual_current_address (ch);
+ }
+
+ if (grub_file_read (file, ntldr, ntldrsize)
+ != (grub_ssize_t) ntldrsize)
+ goto fail;
+
+ grub_loader_set (grub_ntldr_boot, grub_ntldr_unload, 1);
+ return GRUB_ERR_NONE;
+
+ fail:
+
+ if (file)
+ grub_file_close (file);
+
+ grub_ntldr_unload ();
+
+ return grub_errno;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(ntldr)
+{
+ cmd = grub_register_command ("ntldr", grub_cmd_ntldr,
+ 0, N_("Load NTLDR or BootMGR."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(ntldr)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c
new file mode 100644
index 0000000..b877b0e
--- /dev/null
+++ b/grub-core/loader/i386/xnu.c
@@ -0,0 +1,1137 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/env.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/xnu.h>
+#include <grub/cpu/xnu.h>
+#include <grub/mm.h>
+#include <grub/loader.h>
+#include <grub/autoefi.h>
+#include <grub/i386/tsc.h>
+#include <grub/efi/api.h>
+#include <grub/i386/pit.h>
+#include <grub/misc.h>
+#include <grub/charset.h>
+#include <grub/term.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/bitmap_scale.h>
+
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+
+#define DEFAULT_VIDEO_MODE "auto"
+
+char grub_xnu_cmdline[1024];
+grub_uint32_t grub_xnu_entry_point, grub_xnu_arg1, grub_xnu_stack;
+
+/* Aliases set for some tables. */
+struct tbl_alias
+{
+ grub_efi_guid_t guid;
+ char *name;
+};
+
+static struct tbl_alias table_aliases[] =
+ {
+ {GRUB_EFI_ACPI_20_TABLE_GUID, "ACPI_20"},
+ {GRUB_EFI_ACPI_TABLE_GUID, "ACPI"},
+ };
+
+struct grub_xnu_devprop_device_descriptor
+{
+ struct grub_xnu_devprop_device_descriptor *next;
+ struct property_descriptor *properties;
+ struct grub_efi_device_path *path;
+ int pathlen;
+};
+
+static int
+utf16_strlen (grub_uint16_t *in)
+{
+ int i;
+ for (i = 0; in[i]; i++);
+ return i;
+}
+
+/* Read frequency from a string in MHz and return it in Hz. */
+static grub_uint64_t
+readfrequency (const char *str)
+{
+ grub_uint64_t num = 0;
+ int mul = 1000000;
+ int found = 0;
+
+ while (*str)
+ {
+ unsigned long digit;
+
+ digit = grub_tolower (*str) - '0';
+ if (digit > 9)
+ break;
+
+ found = 1;
+
+ num = num * 10 + digit;
+ str++;
+ }
+ num *= 1000000;
+ if (*str == '.')
+ {
+ str++;
+ while (*str)
+ {
+ unsigned long digit;
+
+ digit = grub_tolower (*str) - '0';
+ if (digit > 9)
+ break;
+
+ found = 1;
+
+ mul /= 10;
+ num = num + mul * digit;
+ str++;
+ }
+ }
+ if (! found)
+ return 0;
+
+ return num;
+}
+
+/* Thanks to Kabyl for precious information about Intel architecture. */
+static grub_uint64_t
+guessfsb (void)
+{
+ const grub_uint64_t sane_value = 100000000;
+ grub_uint32_t manufacturer[3], max_cpuid, capabilities, msrlow;
+ grub_uint64_t start_tsc;
+ grub_uint64_t end_tsc;
+ grub_uint64_t tsc_ticks_per_ms;
+
+ if (! grub_cpu_is_cpuid_supported ())
+ return sane_value;
+
+#ifdef APPLE_CC
+ asm volatile ("movl $0, %%eax\n"
+#ifdef __x86_64__
+ "push %%rbx\n"
+#else
+ "push %%ebx\n"
+#endif
+ "cpuid\n"
+#ifdef __x86_64__
+ "pop %%rbx\n"
+#else
+ "pop %%ebx\n"
+#endif
+ : "=a" (max_cpuid),
+ "=d" (manufacturer[1]), "=c" (manufacturer[2]));
+
+ /* Only Intel for now is done. */
+ if (grub_memcmp (manufacturer + 1, "ineIntel", 12) != 0)
+ return sane_value;
+
+#else
+ asm volatile ("movl $0, %%eax\n"
+ "cpuid"
+ : "=a" (max_cpuid), "=b" (manufacturer[0]),
+ "=d" (manufacturer[1]), "=c" (manufacturer[2]));
+
+ /* Only Intel for now is done. */
+ if (grub_memcmp (manufacturer, "GenuineIntel", 12) != 0)
+ return sane_value;
+#endif
+
+ /* Check Speedstep. */
+ if (max_cpuid < 1)
+ return sane_value;
+
+#ifdef APPLE_CC
+ asm volatile ("movl $1, %%eax\n"
+#ifdef __x86_64__
+ "push %%rbx\n"
+#else
+ "push %%ebx\n"
+#endif
+ "cpuid\n"
+#ifdef __x86_64__
+ "pop %%rbx\n"
+#else
+ "pop %%ebx\n"
+#endif
+ : "=c" (capabilities):
+ : "%rax", "%rdx");
+#else
+ asm volatile ("movl $1, %%eax\n"
+ "cpuid"
+ : "=c" (capabilities):
+ : "%rax", "%rbx", "%rdx");
+#endif
+
+ if (! (capabilities & (1 << 7)))
+ return sane_value;
+
+ /* Calibrate the TSC rate. */
+
+ start_tsc = grub_get_tsc ();
+ grub_pit_wait (0xffff);
+ end_tsc = grub_get_tsc ();
+
+ tsc_ticks_per_ms = grub_divmod64 (end_tsc - start_tsc, 55, 0);
+
+ /* Read the multiplier. */
+ asm volatile ("movl $0x198, %%ecx\n"
+ "rdmsr"
+ : "=d" (msrlow)
+ :
+ : "%ecx", "%eax");
+
+ return grub_divmod64 (2000 * tsc_ticks_per_ms,
+ ((msrlow >> 7) & 0x3e) + ((msrlow >> 14) & 1), 0);
+}
+
+struct property_descriptor
+{
+ struct property_descriptor *next;
+ grub_uint8_t *name;
+ grub_uint16_t *name16;
+ int name16len;
+ int length;
+ void *data;
+};
+
+static struct grub_xnu_devprop_device_descriptor *devices = 0;
+
+grub_err_t
+grub_xnu_devprop_remove_property (struct grub_xnu_devprop_device_descriptor *dev,
+ char *name)
+{
+ struct property_descriptor *prop;
+ prop = grub_named_list_find (GRUB_AS_NAMED_LIST_P (&dev->properties), name);
+ if (!prop)
+ return GRUB_ERR_NONE;
+
+ grub_free (prop->name);
+ grub_free (prop->name16);
+ grub_free (prop->data);
+
+ grub_list_remove (GRUB_AS_LIST_P (&dev->properties), GRUB_AS_LIST (prop));
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_xnu_devprop_remove_device (struct grub_xnu_devprop_device_descriptor *dev)
+{
+ void *t;
+ struct property_descriptor *prop;
+
+ grub_list_remove (GRUB_AS_LIST_P (&devices), GRUB_AS_LIST (dev));
+
+ for (prop = dev->properties; prop; )
+ {
+ grub_free (prop->name);
+ grub_free (prop->name16);
+ grub_free (prop->data);
+ t = prop;
+ prop = prop->next;
+ grub_free (t);
+ }
+
+ grub_free (dev->path);
+ grub_free (dev);
+
+ return GRUB_ERR_NONE;
+}
+
+struct grub_xnu_devprop_device_descriptor *
+grub_xnu_devprop_add_device (struct grub_efi_device_path *path, int length)
+{
+ struct grub_xnu_devprop_device_descriptor *ret;
+
+ ret = grub_zalloc (sizeof (*ret));
+ if (!ret)
+ return 0;
+
+ ret->path = grub_malloc (length);
+ if (!ret->path)
+ {
+ grub_free (ret);
+ return 0;
+ }
+ ret->pathlen = length;
+ grub_memcpy (ret->path, path, length);
+
+ grub_list_push (GRUB_AS_LIST_P (&devices), GRUB_AS_LIST (ret));
+
+ return ret;
+}
+
+static grub_err_t
+grub_xnu_devprop_add_property (struct grub_xnu_devprop_device_descriptor *dev,
+ grub_uint8_t *utf8, grub_uint16_t *utf16,
+ int utf16len, void *data, int datalen)
+{
+ struct property_descriptor *prop;
+
+ prop = grub_malloc (sizeof (*prop));
+ if (!prop)
+ return grub_errno;
+
+ prop->name = utf8;
+ prop->name16 = utf16;
+ prop->name16len = utf16len;
+
+ prop->length = datalen;
+ prop->data = grub_malloc (prop->length);
+ if (!prop->data)
+ {
+ grub_free (prop);
+ grub_free (prop->name);
+ grub_free (prop->name16);
+ return grub_errno;
+ }
+ grub_memcpy (prop->data, data, prop->length);
+ grub_list_push (GRUB_AS_LIST_P (&dev->properties),
+ GRUB_AS_LIST (prop));
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_xnu_devprop_add_property_utf8 (struct grub_xnu_devprop_device_descriptor *dev,
+ char *name, void *data, int datalen)
+{
+ grub_uint8_t *utf8;
+ grub_uint16_t *utf16;
+ int len, utf16len;
+ grub_err_t err;
+
+ utf8 = (grub_uint8_t *) grub_strdup (name);
+ if (!utf8)
+ return grub_errno;
+
+ len = grub_strlen (name);
+ utf16 = grub_malloc (sizeof (grub_uint16_t) * len);
+ if (!utf16)
+ {
+ grub_free (utf8);
+ return grub_errno;
+ }
+
+ utf16len = grub_utf8_to_utf16 (utf16, len, utf8, len, NULL);
+ if (utf16len < 0)
+ {
+ grub_free (utf8);
+ grub_free (utf16);
+ return grub_errno;
+ }
+
+ err = grub_xnu_devprop_add_property (dev, utf8, utf16,
+ utf16len, data, datalen);
+ if (err)
+ {
+ grub_free (utf8);
+ grub_free (utf16);
+ return err;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_xnu_devprop_add_property_utf16 (struct grub_xnu_devprop_device_descriptor *dev,
+ grub_uint16_t *name, int namelen,
+ void *data, int datalen)
+{
+ grub_uint8_t *utf8;
+ grub_uint16_t *utf16;
+ grub_err_t err;
+
+ utf16 = grub_malloc (sizeof (grub_uint16_t) * namelen);
+ if (!utf16)
+ return grub_errno;
+ grub_memcpy (utf16, name, sizeof (grub_uint16_t) * namelen);
+
+ utf8 = grub_malloc (namelen * 4 + 1);
+ if (!utf8)
+ {
+ grub_free (utf8);
+ return grub_errno;
+ }
+
+ *grub_utf16_to_utf8 ((grub_uint8_t *) utf8, name, namelen) = '\0';
+
+ err = grub_xnu_devprop_add_property (dev, utf8, utf16,
+ namelen, data, datalen);
+ if (err)
+ {
+ grub_free (utf8);
+ grub_free (utf16);
+ return err;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static inline int
+hextoval (char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ if (c >= 'a' && c <= 'z')
+ return c - 'a' + 10;
+ if (c >= 'A' && c <= 'Z')
+ return c - 'A' + 10;
+ return 0;
+}
+
+void
+grub_cpu_xnu_unload (void)
+{
+ struct grub_xnu_devprop_device_descriptor *dev1, *dev2;
+
+ for (dev1 = devices; dev1; )
+ {
+ dev2 = dev1->next;
+ grub_xnu_devprop_remove_device (dev1);
+ dev1 = dev2;
+ }
+}
+
+static grub_err_t
+grub_cpu_xnu_fill_devprop (void)
+{
+ struct grub_xnu_devtree_key *efikey;
+ int total_length = sizeof (struct grub_xnu_devprop_header);
+ struct grub_xnu_devtree_key *devprop;
+ struct grub_xnu_devprop_device_descriptor *device;
+ void *ptr;
+ struct grub_xnu_devprop_header *head;
+ void *t;
+ int numdevs = 0;
+
+ /* The key "efi". */
+ efikey = grub_xnu_create_key (&grub_xnu_devtree_root, "efi");
+ if (! efikey)
+ return grub_errno;
+
+ for (device = devices; device; device = device->next)
+ {
+ struct property_descriptor *propdesc;
+ total_length += sizeof (struct grub_xnu_devprop_device_header);
+ total_length += device->pathlen;
+
+ for (propdesc = device->properties; propdesc; propdesc = propdesc->next)
+ {
+ total_length += sizeof (grub_uint32_t);
+ total_length += sizeof (grub_uint16_t)
+ * (propdesc->name16len + 1);
+ total_length += sizeof (grub_uint32_t);
+ total_length += propdesc->length;
+ }
+ numdevs++;
+ }
+
+ devprop = grub_xnu_create_value (&(efikey->first_child), "device-properties");
+ if (devprop)
+ {
+ devprop->data = grub_malloc (total_length);
+ devprop->datasize = total_length;
+ }
+
+ ptr = devprop->data;
+ head = ptr;
+ ptr = head + 1;
+ head->length = total_length;
+ head->alwaysone = 1;
+ head->num_devices = numdevs;
+ for (device = devices; device; )
+ {
+ struct grub_xnu_devprop_device_header *devhead;
+ struct property_descriptor *propdesc;
+ devhead = ptr;
+ devhead->num_values = 0;
+ ptr = devhead + 1;
+
+ grub_memcpy (ptr, device->path, device->pathlen);
+ ptr = (char *) ptr + device->pathlen;
+
+ for (propdesc = device->properties; propdesc; )
+ {
+ grub_uint32_t *len;
+ grub_uint16_t *name;
+ void *data;
+
+ len = ptr;
+ *len = 2 * propdesc->name16len + sizeof (grub_uint16_t)
+ + sizeof (grub_uint32_t);
+ ptr = len + 1;
+
+ name = ptr;
+ grub_memcpy (name, propdesc->name16, 2 * propdesc->name16len);
+ name += propdesc->name16len;
+
+ /* NUL terminator. */
+ *name = 0;
+ ptr = name + 1;
+
+ len = ptr;
+ *len = propdesc->length + sizeof (grub_uint32_t);
+ data = len + 1;
+ ptr = data;
+ grub_memcpy (ptr, propdesc->data, propdesc->length);
+ ptr = (char *) ptr + propdesc->length;
+
+ grub_free (propdesc->name);
+ grub_free (propdesc->name16);
+ grub_free (propdesc->data);
+ t = propdesc;
+ propdesc = propdesc->next;
+ grub_free (t);
+ devhead->num_values++;
+ }
+
+ devhead->length = (char *) ptr - (char *) devhead;
+ t = device;
+ device = device->next;
+ grub_free (t);
+ }
+
+ devices = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_file_t file;
+ void *buf, *bufstart, *bufend;
+ struct grub_xnu_devprop_header *head;
+ grub_size_t size;
+ unsigned i, j;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ file = grub_file_open (args[0]);
+ if (! file)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "couldn't load device-propertie dump");
+ size = grub_file_size (file);
+ buf = grub_malloc (size);
+ if (!buf)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+ if (grub_file_read (file, buf, size) != (grub_ssize_t) size)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+ grub_file_close (file);
+
+ bufstart = buf;
+ bufend = (char *) buf + size;
+ head = buf;
+ buf = head + 1;
+ for (i = 0; i < grub_le_to_cpu32 (head->num_devices) && buf < bufend; i++)
+ {
+ struct grub_efi_device_path *dp, *dpstart;
+ struct grub_xnu_devprop_device_descriptor *dev;
+ struct grub_xnu_devprop_device_header *devhead;
+
+ devhead = buf;
+ buf = devhead + 1;
+ dpstart = buf;
+
+ do
+ {
+ dp = buf;
+ buf = (char *) buf + GRUB_EFI_DEVICE_PATH_LENGTH (dp);
+ }
+ while (!GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp) && buf < bufend);
+
+ dev = grub_xnu_devprop_add_device (dpstart, (char *) buf
+ - (char *) dpstart);
+
+ for (j = 0; j < grub_le_to_cpu32 (devhead->num_values) && buf < bufend;
+ j++)
+ {
+ grub_uint32_t *namelen;
+ grub_uint32_t *datalen;
+ grub_uint16_t *utf16;
+ void *data;
+ grub_err_t err;
+
+ namelen = buf;
+ buf = namelen + 1;
+ if (buf >= bufend)
+ break;
+
+ utf16 = buf;
+ buf = (char *) buf + *namelen - sizeof (grub_uint32_t);
+ if (buf >= bufend)
+ break;
+
+ datalen = buf;
+ buf = datalen + 1;
+ if (buf >= bufend)
+ break;
+
+ data = buf;
+ buf = (char *) buf + *datalen - sizeof (grub_uint32_t);
+ if (buf >= bufend)
+ break;
+ err = grub_xnu_devprop_add_property_utf16
+ (dev, utf16, (*namelen - sizeof (grub_uint32_t)
+ - sizeof (grub_uint16_t)) / sizeof (grub_uint16_t),
+ data, *datalen - sizeof (grub_uint32_t));
+ if (err)
+ {
+ grub_free (bufstart);
+ return err;
+ }
+ }
+ }
+
+ grub_free (bufstart);
+ return GRUB_ERR_NONE;
+}
+
+/* Fill device tree. */
+/* FIXME: some entries may be platform-agnostic. Move them to loader/xnu.c. */
+grub_err_t
+grub_cpu_xnu_fill_devicetree (void)
+{
+ struct grub_xnu_devtree_key *efikey;
+ struct grub_xnu_devtree_key *cfgtablekey;
+ struct grub_xnu_devtree_key *curval;
+ struct grub_xnu_devtree_key *runtimesrvkey;
+ struct grub_xnu_devtree_key *platformkey;
+ unsigned i, j;
+
+ /* The value "model". */
+ /* FIXME: may this value be sometimes different? */
+ curval = grub_xnu_create_value (&grub_xnu_devtree_root, "model");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = sizeof ("ACPI");
+ curval->data = grub_strdup ("ACPI");
+ curval = grub_xnu_create_value (&grub_xnu_devtree_root, "compatible");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = sizeof ("ACPI");
+ curval->data = grub_strdup ("ACPI");
+
+ /* The key "efi". */
+ efikey = grub_xnu_create_key (&grub_xnu_devtree_root, "efi");
+ if (! efikey)
+ return grub_errno;
+
+ /* Information about firmware. */
+ curval = grub_xnu_create_value (&(efikey->first_child), "firmware-revision");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = (SYSTEM_TABLE_SIZEOF (firmware_revision));
+ curval->data = grub_malloc (curval->datasize);
+ if (! curval->data)
+ return grub_errno;
+ grub_memcpy (curval->data, (SYSTEM_TABLE_VAR(firmware_revision)),
+ curval->datasize);
+
+ curval = grub_xnu_create_value (&(efikey->first_child), "firmware-vendor");
+ if (! curval)
+ return grub_errno;
+ curval->datasize =
+ 2 * (utf16_strlen (SYSTEM_TABLE_PTR (firmware_vendor)) + 1);
+ curval->data = grub_malloc (curval->datasize);
+ if (! curval->data)
+ return grub_errno;
+ grub_memcpy (curval->data, SYSTEM_TABLE_PTR (firmware_vendor),
+ curval->datasize);
+
+ curval = grub_xnu_create_value (&(efikey->first_child), "firmware-abi");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = sizeof ("EFI32");
+ curval->data = grub_malloc (curval->datasize);
+ if (! curval->data)
+ return grub_errno;
+ if (SIZEOF_OF_UINTN == 4)
+ grub_memcpy (curval->data, "EFI32", curval->datasize);
+ else
+ grub_memcpy (curval->data, "EFI64", curval->datasize);
+
+ /* The key "platform". */
+ platformkey = grub_xnu_create_key (&(efikey->first_child),
+ "platform");
+ if (! platformkey)
+ return grub_errno;
+
+ /* Pass FSB frequency to the kernel. */
+ curval = grub_xnu_create_value (&(platformkey->first_child), "FSBFrequency");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = sizeof (grub_uint64_t);
+ curval->data = grub_malloc (curval->datasize);
+ if (!curval->data)
+ return grub_errno;
+
+ /* First see if user supplies the value. */
+ char *fsbvar = grub_env_get ("fsb");
+ if (! fsbvar)
+ *((grub_uint64_t *) curval->data) = 0;
+ else
+ *((grub_uint64_t *) curval->data) = readfrequency (fsbvar);
+ /* Try autodetect. */
+ if (! *((grub_uint64_t *) curval->data))
+ *((grub_uint64_t *) curval->data) = guessfsb ();
+ grub_dprintf ("xnu", "fsb autodetected as %llu\n",
+ (unsigned long long) *((grub_uint64_t *) curval->data));
+
+ cfgtablekey = grub_xnu_create_key (&(efikey->first_child),
+ "configuration-table");
+ if (!cfgtablekey)
+ return grub_errno;
+
+ /* Fill "configuration-table" key. */
+ for (i = 0; i < SYSTEM_TABLE (num_table_entries); i++)
+ {
+ void *ptr;
+ struct grub_xnu_devtree_key *curkey;
+ grub_efi_guid_t guid;
+ char guidbuf[64];
+
+ /* Retrieve current key. */
+#ifdef GRUB_MACHINE_EFI
+ {
+ ptr = (void *)
+ grub_efi_system_table->configuration_table[i].vendor_table;
+ guid = grub_efi_system_table->configuration_table[i].vendor_guid;
+ }
+#else
+ if (SIZEOF_OF_UINTN == 4)
+ {
+ ptr = UINT_TO_PTR (((grub_efiemu_configuration_table32_t *)
+ SYSTEM_TABLE_PTR (configuration_table))[i]
+ .vendor_table);
+ guid =
+ ((grub_efiemu_configuration_table32_t *)
+ SYSTEM_TABLE_PTR (configuration_table))[i].vendor_guid;
+ }
+ else
+ {
+ ptr = UINT_TO_PTR (((grub_efiemu_configuration_table64_t *)
+ SYSTEM_TABLE_PTR (configuration_table))[i]
+ .vendor_table);
+ guid =
+ ((grub_efiemu_configuration_table64_t *)
+ SYSTEM_TABLE_PTR (configuration_table))[i].vendor_guid;
+ }
+#endif
+
+ /* The name of key for new table. */
+ grub_snprintf (guidbuf, sizeof (guidbuf), "%08x-%04x-%04x-%02x%02x-",
+ guid.data1, guid.data2, guid.data3, guid.data4[0],
+ guid.data4[1]);
+ for (j = 2; j < 8; j++)
+ grub_snprintf (guidbuf + grub_strlen (guidbuf),
+ sizeof (guidbuf) - grub_strlen (guidbuf),
+ "%02x", guid.data4[j]);
+ /* For some reason GUID has to be in uppercase. */
+ for (j = 0; guidbuf[j] ; j++)
+ if (guidbuf[j] >= 'a' && guidbuf[j] <= 'f')
+ guidbuf[j] += 'A' - 'a';
+ curkey = grub_xnu_create_key (&(cfgtablekey->first_child), guidbuf);
+ if (! curkey)
+ return grub_errno;
+
+ curval = grub_xnu_create_value (&(curkey->first_child), "guid");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = sizeof (guid);
+ curval->data = grub_malloc (curval->datasize);
+ if (! curval->data)
+ return grub_errno;
+ grub_memcpy (curval->data, &guid, curval->datasize);
+
+ /* The value "table". */
+ curval = grub_xnu_create_value (&(curkey->first_child), "table");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = SIZEOF_OF_UINTN;
+ curval->data = grub_malloc (curval->datasize);
+ if (! curval->data)
+ return grub_errno;
+ if (SIZEOF_OF_UINTN == 4)
+ *((grub_uint32_t *)curval->data) = PTR_TO_UINT32 (ptr);
+ else
+ *((grub_uint64_t *)curval->data) = PTR_TO_UINT64 (ptr);
+
+ /* Create alias. */
+ for (j = 0; j < sizeof (table_aliases) / sizeof (table_aliases[0]); j++)
+ if (grub_memcmp (&table_aliases[j].guid, &guid, sizeof (guid)) == 0)
+ break;
+ if (j != sizeof (table_aliases) / sizeof (table_aliases[0]))
+ {
+ curval = grub_xnu_create_value (&(curkey->first_child), "alias");
+ if (!curval)
+ return grub_errno;
+ curval->datasize = grub_strlen (table_aliases[j].name) + 1;
+ curval->data = grub_malloc (curval->datasize);
+ if (!curval->data)
+ return grub_errno;
+ grub_memcpy (curval->data, table_aliases[j].name, curval->datasize);
+ }
+ }
+
+ /* Create and fill "runtime-services" key. */
+ runtimesrvkey = grub_xnu_create_key (&(efikey->first_child),
+ "runtime-services");
+ if (! runtimesrvkey)
+ return grub_errno;
+ curval = grub_xnu_create_value (&(runtimesrvkey->first_child), "table");
+ if (! curval)
+ return grub_errno;
+ curval->datasize = SIZEOF_OF_UINTN;
+ curval->data = grub_malloc (curval->datasize);
+ if (! curval->data)
+ return grub_errno;
+ if (SIZEOF_OF_UINTN == 4)
+ *((grub_uint32_t *) curval->data)
+ = PTR_TO_UINT32 (SYSTEM_TABLE_PTR (runtime_services));
+ else
+ *((grub_uint64_t *) curval->data)
+ = PTR_TO_UINT64 (SYSTEM_TABLE_PTR (runtime_services));
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_xnu_boot_resume (void)
+{
+ struct grub_relocator32_state state;
+
+ state.esp = grub_xnu_stack;
+ state.ebp = grub_xnu_stack;
+ state.eip = grub_xnu_entry_point;
+ state.eax = grub_xnu_arg1;
+
+ return grub_relocator32_boot (grub_xnu_relocator, state);
+}
+
+/* Setup video for xnu. */
+static grub_err_t
+grub_xnu_set_video (struct grub_xnu_boot_params *params)
+{
+ struct grub_video_mode_info mode_info;
+ int ret;
+ char *tmp;
+ const char *modevar;
+ void *framebuffer;
+ grub_err_t err;
+ struct grub_video_bitmap *bitmap = NULL;
+
+ modevar = grub_env_get ("gfxpayload");
+ /* Consider only graphical 32-bit deep modes. */
+ if (! modevar || *modevar == 0)
+ err = grub_video_set_mode (DEFAULT_VIDEO_MODE,
+ GRUB_VIDEO_MODE_TYPE_PURE_TEXT
+ | GRUB_VIDEO_MODE_TYPE_DEPTH_MASK,
+ 32 << GRUB_VIDEO_MODE_TYPE_DEPTH_POS);
+ else
+ {
+ tmp = grub_xasprintf ("%s;" DEFAULT_VIDEO_MODE, modevar);
+ if (! tmp)
+ return grub_errno;
+ err = grub_video_set_mode (tmp,
+ GRUB_VIDEO_MODE_TYPE_PURE_TEXT
+ | GRUB_VIDEO_MODE_TYPE_DEPTH_MASK,
+ 32 << GRUB_VIDEO_MODE_TYPE_DEPTH_POS);
+ grub_free (tmp);
+ }
+
+ if (err)
+ return err;
+
+ ret = grub_video_get_info (&mode_info);
+ if (ret)
+ return grub_error (GRUB_ERR_IO, "couldn't retrieve video parameters");
+
+ if (grub_xnu_bitmap)
+ {
+ if (grub_xnu_bitmap_mode == GRUB_XNU_BITMAP_STRETCH)
+ err = grub_video_bitmap_create_scaled (&bitmap,
+ mode_info.width,
+ mode_info.height,
+ grub_xnu_bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ else
+ bitmap = grub_xnu_bitmap;
+ }
+
+ if (bitmap)
+ {
+ if (grub_xnu_bitmap_mode == GRUB_XNU_BITMAP_STRETCH)
+ err = grub_video_bitmap_create_scaled (&bitmap,
+ mode_info.width,
+ mode_info.height,
+ grub_xnu_bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ else
+ bitmap = grub_xnu_bitmap;
+ }
+
+ if (bitmap)
+ {
+ int x, y;
+
+ x = mode_info.width - bitmap->mode_info.width;
+ x /= 2;
+ y = mode_info.height - bitmap->mode_info.height;
+ y /= 2;
+ err = grub_video_blit_bitmap (bitmap,
+ GRUB_VIDEO_BLIT_REPLACE,
+ x > 0 ? x : 0,
+ y > 0 ? y : 0,
+ x < 0 ? -x : 0,
+ y < 0 ? -y : 0,
+ min (bitmap->mode_info.width,
+ mode_info.width),
+ min (bitmap->mode_info.height,
+ mode_info.height));
+ }
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ bitmap = 0;
+ }
+
+ ret = grub_video_get_info_and_fini (&mode_info, &framebuffer);
+ if (ret)
+ return grub_error (GRUB_ERR_IO, "couldn't retrieve video parameters");
+
+ params->lfb_width = mode_info.width;
+ params->lfb_height = mode_info.height;
+ params->lfb_depth = mode_info.bpp;
+ params->lfb_line_len = mode_info.pitch;
+
+ params->lfb_base = PTR_TO_UINT32 (framebuffer);
+ params->lfb_mode = bitmap ? GRUB_XNU_VIDEO_SPLASH
+ : GRUB_XNU_VIDEO_TEXT_IN_VIDEO;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Boot xnu. */
+grub_err_t
+grub_xnu_boot (void)
+{
+ struct grub_xnu_boot_params *bootparams;
+ void *bp_in;
+ grub_addr_t bootparams_target;
+ grub_err_t err;
+ grub_efi_uintn_t memory_map_size = 0;
+ void *memory_map;
+ grub_addr_t memory_map_target;
+ grub_efi_uintn_t map_key = 0;
+ grub_efi_uintn_t descriptor_size = 0;
+ grub_efi_uint32_t descriptor_version = 0;
+ grub_uint64_t firstruntimepage, lastruntimepage;
+ grub_uint64_t curruntimepage;
+ grub_addr_t devtree_target;
+ grub_size_t devtreelen;
+ int i;
+ struct grub_relocator32_state state;
+
+ err = grub_autoefi_prepare ();
+ if (err)
+ return err;
+
+ err = grub_cpu_xnu_fill_devprop ();
+ if (err)
+ return err;
+
+ err = grub_cpu_xnu_fill_devicetree ();
+ if (err)
+ return err;
+
+ err = grub_xnu_fill_devicetree ();
+ if (err)
+ return err;
+
+ /* Page-align to avoid following parts to be inadvertently freed. */
+ err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
+ if (err)
+ return err;
+
+ /* Pass memory map to kernel. */
+ memory_map_size = 0;
+ memory_map = 0;
+ map_key = 0;
+ descriptor_size = 0;
+ descriptor_version = 0;
+
+ grub_dprintf ("xnu", "eip=%x\n", grub_xnu_entry_point);
+
+ const char *debug = grub_env_get ("debug");
+
+ if (debug && (grub_strword (debug, "all") || grub_strword (debug, "xnu")))
+ {
+ grub_printf ("Press any key to launch xnu\n");
+ grub_getkey ();
+ }
+
+ /* Relocate the boot parameters to heap. */
+ err = grub_xnu_heap_malloc (sizeof (*bootparams),
+ &bp_in, &bootparams_target);
+ if (err)
+ return err;
+ bootparams = bp_in;
+
+ /* Set video. */
+ err = grub_xnu_set_video (bootparams);
+ if (err != GRUB_ERR_NONE)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ grub_printf ("Booting in blind mode\n");
+
+ bootparams->lfb_mode = 0;
+ bootparams->lfb_width = 0;
+ bootparams->lfb_height = 0;
+ bootparams->lfb_depth = 0;
+ bootparams->lfb_line_len = 0;
+ bootparams->lfb_base = 0;
+ }
+
+ if (grub_autoefi_get_memory_map (&memory_map_size, memory_map,
+ &map_key, &descriptor_size,
+ &descriptor_version) < 0)
+ return grub_errno;
+
+ /* We will do few allocations later. Reserve some space for possible
+ memory map growth. */
+ memory_map_size += 20 * descriptor_size;
+ err = grub_xnu_heap_malloc (memory_map_size,
+ &memory_map, &memory_map_target);
+ if (err)
+ return err;
+
+ err = grub_xnu_writetree_toheap (&devtree_target, &devtreelen);
+ if (err)
+ return err;
+
+ grub_memcpy (bootparams->cmdline, grub_xnu_cmdline,
+ sizeof (bootparams->cmdline));
+
+ bootparams->devtree = devtree_target;
+ bootparams->devtreelen = devtreelen;
+
+ err = grub_autoefi_finish_boot_services (&memory_map_size, memory_map,
+ &map_key, &descriptor_size,
+ &descriptor_version);
+ if (err)
+ return err;
+
+ bootparams->efi_system_table = PTR_TO_UINT32 (grub_autoefi_system_table);
+
+ firstruntimepage = (((grub_addr_t) grub_xnu_heap_target_start
+ + grub_xnu_heap_size + GRUB_XNU_PAGESIZE - 1)
+ / GRUB_XNU_PAGESIZE) + 20;
+ curruntimepage = firstruntimepage;
+
+ for (i = 0; (unsigned) i < memory_map_size / descriptor_size; i++)
+ {
+ grub_efi_memory_descriptor_t *curdesc = (grub_efi_memory_descriptor_t *)
+ ((char *) memory_map + descriptor_size * i);
+
+ curdesc->virtual_start = curdesc->physical_start;
+
+ if (curdesc->type == GRUB_EFI_RUNTIME_SERVICES_DATA
+ || curdesc->type == GRUB_EFI_RUNTIME_SERVICES_CODE)
+ {
+ curdesc->virtual_start = curruntimepage << 12;
+ curruntimepage += curdesc->num_pages;
+ if (curdesc->physical_start
+ <= PTR_TO_UINT64 (grub_autoefi_system_table)
+ && curdesc->physical_start + (curdesc->num_pages << 12)
+ > PTR_TO_UINT64 (grub_autoefi_system_table))
+ bootparams->efi_system_table
+ = PTR_TO_UINT64 (grub_autoefi_system_table)
+ - curdesc->physical_start + curdesc->virtual_start;
+ if (SIZEOF_OF_UINTN == 8 && grub_xnu_is_64bit)
+ curdesc->virtual_start |= 0xffffff8000000000ULL;
+ }
+ }
+
+ lastruntimepage = curruntimepage;
+
+ bootparams->efi_mmap = memory_map_target;
+ bootparams->efi_mmap_size = memory_map_size;
+ bootparams->efi_mem_desc_size = descriptor_size;
+ bootparams->efi_mem_desc_version = descriptor_version;
+
+ bootparams->heap_start = grub_xnu_heap_target_start;
+ bootparams->heap_size = grub_xnu_heap_size;
+ bootparams->efi_runtime_first_page = firstruntimepage;
+
+ bootparams->efi_runtime_npages = lastruntimepage - firstruntimepage;
+ bootparams->efi_uintnbits = SIZEOF_OF_UINTN * 8;
+
+ bootparams->verminor = GRUB_XNU_BOOTARGS_VERMINOR;
+ bootparams->vermajor = GRUB_XNU_BOOTARGS_VERMAJOR;
+
+ /* Parameters for asm helper. */
+ grub_xnu_stack = bootparams->heap_start
+ + bootparams->heap_size + GRUB_XNU_PAGESIZE;
+ grub_xnu_arg1 = bootparams_target;
+
+ grub_autoefi_set_virtual_address_map (memory_map_size, descriptor_size,
+ descriptor_version, memory_map);
+
+ state.eip = grub_xnu_entry_point;
+ state.eax = grub_xnu_arg1;
+ state.esp = grub_xnu_stack;
+ state.ebp = grub_xnu_stack;
+ return grub_relocator32_boot (grub_xnu_relocator, state);
+}
+
+static grub_command_t cmd_devprop_load;
+
+void
+grub_cpu_xnu_init (void)
+{
+ cmd_devprop_load = grub_register_command ("xnu_devprop_load",
+ grub_cmd_devprop_load,
+ 0, N_("Load device-properties dump."));
+}
+
+void
+grub_cpu_xnu_fini (void)
+{
+ grub_unregister_command (cmd_devprop_load);
+}
diff --git a/grub-core/loader/macho.c b/grub-core/loader/macho.c
new file mode 100644
index 0000000..ecf0d8c
--- /dev/null
+++ b/grub-core/loader/macho.c
@@ -0,0 +1,160 @@
+/* macho.c - load Mach-O files. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* This Mach-O loader is incomplete and can load only non-relocatable segments.
+ This is however enough to boot xnu (otool -l and Mach-O specs for more info).
+*/
+
+#include <grub/err.h>
+#include <grub/macho.h>
+#include <grub/cpu/macho.h>
+#include <grub/machoload.h>
+#include <grub/file.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+
+grub_err_t
+grub_macho_close (grub_macho_t macho)
+{
+ grub_file_t file = macho->file;
+
+ grub_free (macho->cmds32);
+ grub_free (macho->cmds64);
+
+ grub_free (macho);
+
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+grub_macho_t
+grub_macho_file (grub_file_t file)
+{
+ grub_macho_t macho;
+ union grub_macho_filestart filestart;
+
+ macho = grub_malloc (sizeof (*macho));
+ if (! macho)
+ return 0;
+
+ macho->file = file;
+ macho->offset32 = -1;
+ macho->offset64 = -1;
+ macho->end32 = -1;
+ macho->end64 = -1;
+ macho->cmds32 = 0;
+ macho->cmds64 = 0;
+
+ if (grub_file_seek (macho->file, 0) == (grub_off_t) -1)
+ goto fail;
+
+ if (grub_file_read (macho->file, &filestart, sizeof (filestart))
+ != sizeof (filestart))
+ {
+ grub_error_push ();
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
+ goto fail;
+ }
+
+ /* Is it a fat file? */
+ if (filestart.fat.magic == grub_be_to_cpu32 (GRUB_MACHO_FAT_MAGIC))
+ {
+ struct grub_macho_fat_arch *archs;
+ int i, narchs;
+
+ /* Load architecture description. */
+ narchs = grub_be_to_cpu32 (filestart.fat.nfat_arch);
+ if (grub_file_seek (macho->file, sizeof (struct grub_macho_fat_header))
+ == (grub_off_t) -1)
+ goto fail;
+ archs = grub_malloc (sizeof (struct grub_macho_fat_arch) * narchs);
+ if (!archs)
+ goto fail;
+ if (grub_file_read (macho->file, archs,
+ sizeof (struct grub_macho_fat_arch) * narchs)
+ != (grub_ssize_t)sizeof(struct grub_macho_fat_arch) * narchs)
+ {
+ grub_free (archs);
+ grub_error_push ();
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
+ goto fail;
+ }
+
+ for (i = 0; i < narchs; i++)
+ {
+ if (GRUB_MACHO_CPUTYPE_IS_HOST32
+ (grub_be_to_cpu32 (archs[i].cputype)))
+ {
+ macho->offset32 = grub_be_to_cpu32 (archs[i].offset);
+ macho->end32 = grub_be_to_cpu32 (archs[i].offset)
+ + grub_be_to_cpu32 (archs[i].size);
+ }
+ if (GRUB_MACHO_CPUTYPE_IS_HOST64
+ (grub_be_to_cpu32 (archs[i].cputype)))
+ {
+ macho->offset64 = grub_be_to_cpu32 (archs[i].offset);
+ macho->end64 = grub_be_to_cpu32 (archs[i].offset)
+ + grub_be_to_cpu32 (archs[i].size);
+ }
+ }
+ grub_free (archs);
+ }
+
+ /* Is it a thin 32-bit file? */
+ if (filestart.thin32.magic == GRUB_MACHO_MAGIC32)
+ {
+ macho->offset32 = 0;
+ macho->end32 = grub_file_size (file);
+ }
+
+ /* Is it a thin 64-bit file? */
+ if (filestart.thin64.magic == GRUB_MACHO_MAGIC64)
+ {
+ macho->offset64 = 0;
+ macho->end64 = grub_file_size (file);
+ }
+
+ grub_macho_parse32 (macho);
+ grub_macho_parse64 (macho);
+
+ return macho;
+
+fail:
+ grub_macho_close (macho);
+ return 0;
+}
+
+grub_macho_t
+grub_macho_open (const char *name)
+{
+ grub_file_t file;
+ grub_macho_t macho;
+
+ file = grub_file_open (name);
+ if (! file)
+ return 0;
+
+ macho = grub_macho_file (file);
+ if (! macho)
+ grub_file_close (file);
+
+ return macho;
+}
diff --git a/grub-core/loader/macho32.c b/grub-core/loader/macho32.c
new file mode 100644
index 0000000..0d740ed
--- /dev/null
+++ b/grub-core/loader/macho32.c
@@ -0,0 +1,18 @@
+#include <grub/cpu/macho.h>
+#include <grub/machoload.h>
+
+#define SUFFIX(x) x ## 32
+typedef struct grub_macho_header32 grub_macho_header_t;
+typedef struct grub_macho_segment32 grub_macho_segment_t;
+typedef grub_uint32_t grub_macho_addr_t;
+typedef struct grub_macho_thread32 grub_macho_thread_t;
+#define offsetXX offset32
+#define ncmdsXX ncmds32
+#define cmdsizeXX cmdsize32
+#define cmdsXX cmds32
+#define endXX end32
+#define XX "32"
+#define GRUB_MACHO_MAGIC GRUB_MACHO_MAGIC32
+#define GRUB_MACHO_CMD_SEGMENT GRUB_MACHO_CMD_SEGMENT32
+#include "machoXX.c"
+
diff --git a/grub-core/loader/macho64.c b/grub-core/loader/macho64.c
new file mode 100644
index 0000000..17a8021
--- /dev/null
+++ b/grub-core/loader/macho64.c
@@ -0,0 +1,18 @@
+#include <grub/cpu/macho.h>
+#include <grub/machoload.h>
+
+#define SUFFIX(x) x ## 64
+typedef struct grub_macho_header64 grub_macho_header_t;
+typedef struct grub_macho_segment64 grub_macho_segment_t;
+typedef grub_uint64_t grub_macho_addr_t;
+typedef struct grub_macho_thread64 grub_macho_thread_t;
+#define offsetXX offset64
+#define ncmdsXX ncmds64
+#define cmdsizeXX cmdsize64
+#define cmdsXX cmds64
+#define endXX end64
+#define XX "64"
+#define GRUB_MACHO_MAGIC GRUB_MACHO_MAGIC64
+#define GRUB_MACHO_CMD_SEGMENT GRUB_MACHO_CMD_SEGMENT64
+#include "machoXX.c"
+
diff --git a/grub-core/loader/machoXX.c b/grub-core/loader/machoXX.c
new file mode 100644
index 0000000..918ddbb
--- /dev/null
+++ b/grub-core/loader/machoXX.c
@@ -0,0 +1,239 @@
+
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+
+int
+SUFFIX (grub_macho_contains_macho) (grub_macho_t macho)
+{
+ return macho->offsetXX != -1;
+}
+
+void
+SUFFIX (grub_macho_parse) (grub_macho_t macho)
+{
+ grub_macho_header_t head;
+
+ /* Is there any candidate at all? */
+ if (macho->offsetXX == -1)
+ return;
+
+ /* Read header and check magic*/
+ if (grub_file_seek (macho->file, macho->offsetXX) == (grub_off_t) -1
+ || grub_file_read (macho->file, &head, sizeof (head))
+ != sizeof(head))
+ {
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
+ macho->offsetXX = -1;
+ return;
+ }
+ if (head.magic != GRUB_MACHO_MAGIC)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "invalid Mach-O " XX "-bit header");
+ macho->offsetXX = -1;
+ return;
+ }
+
+ /* Read commands. */
+ macho->ncmdsXX = head.ncmds;
+ macho->cmdsizeXX = head.sizeofcmds;
+ macho->cmdsXX = grub_malloc(macho->cmdsizeXX);
+ if (! macho->cmdsXX)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "not enough memory to read commands");
+ return;
+ }
+ if (grub_file_read (macho->file, macho->cmdsXX,
+ (grub_size_t) macho->cmdsizeXX)
+ != (grub_ssize_t) macho->cmdsizeXX)
+ {
+ grub_error (GRUB_ERR_READ_ERROR, "cannot read Mach-O header");
+ macho->offsetXX = -1;
+ }
+}
+
+typedef int NESTED_FUNC_ATTR (*grub_macho_iter_hook_t)
+(grub_macho_t , struct grub_macho_cmd *,
+ void *);
+
+static grub_err_t
+grub_macho_cmds_iterate (grub_macho_t macho,
+ grub_macho_iter_hook_t hook,
+ void *hook_arg)
+{
+ grub_uint8_t *hdrs = macho->cmdsXX;
+ int i;
+ if (! macho->cmdsXX)
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't find " XX "-bit Mach-O");
+ for (i = 0; i < macho->ncmdsXX; i++)
+ {
+ struct grub_macho_cmd *hdr = (struct grub_macho_cmd *) hdrs;
+ if (hook (macho, hdr, hook_arg))
+ break;
+ hdrs += hdr->cmdsize;
+ }
+
+ return grub_errno;
+}
+
+grub_size_t
+SUFFIX (grub_macho_filesize) (grub_macho_t macho)
+{
+ if (SUFFIX (grub_macho_contains_macho) (macho))
+ return macho->endXX - macho->offsetXX;
+ return 0;
+}
+
+grub_err_t
+SUFFIX (grub_macho_readfile) (grub_macho_t macho, void *dest)
+{
+ grub_ssize_t read;
+ if (! SUFFIX (grub_macho_contains_macho) (macho))
+ return grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read architecture-specific part");
+
+ if (grub_file_seek (macho->file, macho->offsetXX) == (grub_off_t) -1)
+ {
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS,
+ "invalid offset in program header");
+ }
+
+ read = grub_file_read (macho->file, dest,
+ macho->endXX - macho->offsetXX);
+ if (read != (grub_ssize_t) (macho->endXX - macho->offsetXX))
+ {
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read architecture-specific part");
+ }
+ return GRUB_ERR_NONE;
+}
+
+/* Calculate the amount of memory spanned by the segments. */
+grub_err_t
+SUFFIX (grub_macho_size) (grub_macho_t macho, grub_macho_addr_t *segments_start,
+ grub_macho_addr_t *segments_end, int flags)
+{
+ int nr_phdrs = 0;
+
+ /* Run through the program headers to calculate the total memory size we
+ should claim. */
+ auto int NESTED_FUNC_ATTR calcsize (grub_macho_t _macho,
+ struct grub_macho_cmd *phdr, void *_arg);
+ int NESTED_FUNC_ATTR calcsize (grub_macho_t _macho __attribute__ ((unused)),
+ struct grub_macho_cmd *hdr0,
+ void *_arg __attribute__ ((unused)))
+ {
+ grub_macho_segment_t *hdr = (grub_macho_segment_t *) hdr0;
+ if (hdr->cmd != GRUB_MACHO_CMD_SEGMENT)
+ return 0;
+
+ if (! hdr->vmsize)
+ return 0;
+
+ if (! hdr->filesize && (flags & GRUB_MACHO_NOBSS))
+ return 0;
+
+ nr_phdrs++;
+ if (hdr->vmaddr < *segments_start)
+ *segments_start = hdr->vmaddr;
+ if (hdr->vmaddr + hdr->vmsize > *segments_end)
+ *segments_end = hdr->vmaddr + hdr->vmsize;
+ return 0;
+ }
+
+ *segments_start = (grub_macho_addr_t) -1;
+ *segments_end = 0;
+
+ grub_macho_cmds_iterate (macho, calcsize, 0);
+
+ if (nr_phdrs == 0)
+ return grub_error (GRUB_ERR_BAD_OS, "no program headers present");
+
+ if (*segments_end < *segments_start)
+ /* Very bad addresses. */
+ return grub_error (GRUB_ERR_BAD_OS, "bad program header load addresses");
+
+ return GRUB_ERR_NONE;
+}
+
+/* Load every loadable segment into memory specified by `_load_hook'. */
+grub_err_t
+SUFFIX (grub_macho_load) (grub_macho_t macho, char *offset, int flags)
+{
+ grub_err_t err = 0;
+ auto int NESTED_FUNC_ATTR do_load(grub_macho_t _macho,
+ struct grub_macho_cmd *hdr0,
+ void *_arg __attribute__ ((unused)));
+ int NESTED_FUNC_ATTR do_load(grub_macho_t _macho,
+ struct grub_macho_cmd *hdr0,
+ void *_arg __attribute__ ((unused)))
+ {
+ grub_macho_segment_t *hdr = (grub_macho_segment_t *) hdr0;
+
+ if (hdr->cmd != GRUB_MACHO_CMD_SEGMENT)
+ return 0;
+
+ if (! hdr->filesize && (flags & GRUB_MACHO_NOBSS))
+ return 0;
+ if (! hdr->vmsize)
+ return 0;
+
+ if (grub_file_seek (_macho->file, hdr->fileoff
+ + _macho->offsetXX) == (grub_off_t) -1)
+ {
+ grub_error_push ();
+ grub_error (GRUB_ERR_BAD_OS,
+ "invalid offset in program header");
+ return 1;
+ }
+
+ if (hdr->filesize)
+ {
+ grub_ssize_t read;
+ read = grub_file_read (_macho->file, offset + hdr->vmaddr,
+ min (hdr->filesize, hdr->vmsize));
+ if (read != (grub_ssize_t) min (hdr->filesize, hdr->vmsize))
+ {
+ /* XXX How can we free memory from `load_hook'? */
+ grub_error_push ();
+ err=grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read segment from file: "
+ "wanted 0x%lx bytes; read 0x%lx bytes",
+ hdr->filesize, read);
+ return 1;
+ }
+ }
+
+ if (hdr->filesize < hdr->vmsize)
+ grub_memset (offset + hdr->vmaddr + hdr->filesize,
+ 0, hdr->vmsize - hdr->filesize);
+ return 0;
+ }
+
+ grub_macho_cmds_iterate (macho, do_load, 0);
+
+ return err;
+}
+
+grub_macho_addr_t
+SUFFIX (grub_macho_get_entry_point) (grub_macho_t macho)
+{
+ grub_macho_addr_t entry_point = 0;
+ auto int NESTED_FUNC_ATTR hook(grub_macho_t _macho,
+ struct grub_macho_cmd *hdr,
+ void *_arg __attribute__ ((unused)));
+ int NESTED_FUNC_ATTR hook(grub_macho_t _macho __attribute__ ((unused)),
+ struct grub_macho_cmd *hdr,
+ void *_arg __attribute__ ((unused)))
+ {
+ if (hdr->cmd == GRUB_MACHO_CMD_THREAD)
+ entry_point = ((grub_macho_thread_t *) hdr)->entry_point;
+ return 0;
+ }
+ grub_macho_cmds_iterate (macho, hook, 0);
+ return entry_point;
+}
diff --git a/grub-core/loader/mips/linux.c b/grub-core/loader/mips/linux.c
new file mode 100644
index 0000000..0bf7b1f
--- /dev/null
+++ b/grub-core/loader/mips/linux.c
@@ -0,0 +1,443 @@
+/* linux.c - boot Linux */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/elf.h>
+#include <grub/elfload.h>
+#include <grub/loader.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/command.h>
+#include <grub/mips/relocator.h>
+#include <grub/memory.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* For frequencies. */
+#include <grub/pci.h>
+#include <grub/machine/time.h>
+
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+/* This can be detected on runtime from PMON, but:
+ a) it wouldn't work when GRUB is the firmware
+ and
+ b) for now we only support Yeeloong anyway. */
+#define LOONGSON_MACHTYPE "machtype=lemote-yeeloong-2f-8.9inches"
+#endif
+
+static grub_dl_t my_mod;
+
+static int loaded;
+
+static grub_size_t linux_size;
+
+static struct grub_relocator *relocator;
+static grub_uint8_t *playground;
+static grub_addr_t target_addr, entry_addr;
+static int linux_argc;
+static grub_off_t argv_off, envp_off;
+static grub_off_t rd_addr_arg_off, rd_size_arg_off;
+static int initrd_loaded = 0;
+
+static grub_err_t
+grub_linux_boot (void)
+{
+ struct grub_relocator32_state state;
+
+ /* Boot the kernel. */
+ state.gpr[1] = entry_addr;
+ state.gpr[4] = linux_argc;
+ state.gpr[5] = target_addr + argv_off;
+ state.gpr[6] = target_addr + envp_off;
+ state.jumpreg = 1;
+ grub_relocator32_boot (relocator, state);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_linux_unload (void)
+{
+ grub_relocator_unload (relocator);
+ grub_dl_unref (my_mod);
+
+ loaded = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_linux_load32 (grub_elf_t elf, void **extra_mem, grub_size_t extra_size)
+{
+ Elf32_Addr base;
+ int extraoff;
+ grub_err_t err;
+
+ /* Linux's entry point incorrectly contains a virtual address. */
+ entry_addr = elf->ehdr.ehdr32.e_entry;
+
+ linux_size = grub_elf32_size (elf, &base, 0);
+ if (linux_size == 0)
+ return grub_errno;
+ target_addr = base;
+ /* Pad it; the kernel scribbles over memory beyond its load address. */
+ linux_size += 0x100000;
+ linux_size = ALIGN_UP (base + linux_size, 4) - base;
+ extraoff = linux_size;
+ linux_size += extra_size;
+
+ relocator = grub_relocator_new ();
+ if (!relocator)
+ return grub_errno;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ target_addr & 0x1fffffff,
+ linux_size);
+ if (err)
+ return err;
+ playground = get_virtual_current_address (ch);
+ }
+
+ *extra_mem = playground + extraoff;
+
+ /* Now load the segments into the area we claimed. */
+ auto grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load);
+ grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load)
+ {
+ if (phdr->p_type != PT_LOAD)
+ {
+ *do_load = 0;
+ return 0;
+ }
+ *do_load = 1;
+
+ /* Linux's program headers incorrectly contain virtual addresses.
+ * Translate those to physical, and offset to the area we claimed. */
+ *addr = (grub_addr_t) (phdr->p_paddr - base + playground);
+ return 0;
+ }
+ return grub_elf32_load (elf, offset_phdr, 0, 0);
+}
+
+static grub_err_t
+grub_linux_load64 (grub_elf_t elf, void **extra_mem, grub_size_t extra_size)
+{
+ Elf64_Addr base;
+ int extraoff;
+ grub_err_t err;
+
+ /* Linux's entry point incorrectly contains a virtual address. */
+ entry_addr = elf->ehdr.ehdr64.e_entry;
+
+ linux_size = grub_elf64_size (elf, &base, 0);
+ if (linux_size == 0)
+ return grub_errno;
+ target_addr = base;
+ /* Pad it; the kernel scribbles over memory beyond its load address. */
+ linux_size += 0x100000;
+ linux_size = ALIGN_UP (base + linux_size, 4) - base;
+ extraoff = linux_size;
+ linux_size += extra_size;
+
+ relocator = grub_relocator_new ();
+ if (!relocator)
+ return grub_errno;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (relocator, &ch,
+ target_addr & 0x1fffffff,
+ linux_size);
+ if (err)
+ return err;
+ playground = get_virtual_current_address (ch);
+ }
+
+ *extra_mem = playground + extraoff;
+
+ /* Now load the segments into the area we claimed. */
+ auto grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load);
+ grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load)
+ {
+ if (phdr->p_type != PT_LOAD)
+ {
+ *do_load = 0;
+ return 0;
+ }
+ *do_load = 1;
+ /* Linux's program headers incorrectly contain virtual addresses.
+ * Translate those to physical, and offset to the area we claimed. */
+ *addr = (grub_addr_t) (phdr->p_paddr - base + playground);
+ return 0;
+ }
+ return grub_elf64_load (elf, offset_phdr, 0, 0);
+}
+
+static grub_err_t
+grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_elf_t elf = 0;
+ int i;
+ int size;
+ void *extra = NULL;
+ grub_uint32_t *linux_argv, *linux_envp;
+ char *linux_args, *linux_envs;
+ grub_err_t err;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
+
+ elf = grub_elf_open (argv[0]);
+ if (! elf)
+ return grub_errno;
+
+ if (elf->ehdr.ehdr32.e_type != ET_EXEC)
+ {
+ grub_elf_close (elf);
+ return grub_error (GRUB_ERR_UNKNOWN_OS,
+ "this ELF file is not of the right type\n");
+ }
+
+ /* Release the previously used memory. */
+ grub_loader_unset ();
+ loaded = 0;
+
+ /* For arguments. */
+ linux_argc = argc;
+#ifdef LOONGSON_MACHTYPE
+ linux_argc++;
+#endif
+ /* Main arguments. */
+ size = (linux_argc) * sizeof (grub_uint32_t);
+ /* Initrd address and size. */
+ size += 2 * sizeof (grub_uint32_t);
+ /* NULL terminator. */
+ size += sizeof (grub_uint32_t);
+
+ /* First argument is always "a0". */
+ size += ALIGN_UP (sizeof ("a0"), 4);
+ /* Normal arguments. */
+ for (i = 1; i < argc; i++)
+ size += ALIGN_UP (grub_strlen (argv[i]) + 1, 4);
+#ifdef LOONGSON_MACHTYPE
+ size += ALIGN_UP (sizeof (LOONGSON_MACHTYPE), 4);
+#endif
+
+ /* rd arguments. */
+ size += ALIGN_UP (sizeof ("rd_start=0xXXXXXXXXXXXXXXXX"), 4);
+ size += ALIGN_UP (sizeof ("rd_size=0xXXXXXXXXXXXXXXXX"), 4);
+
+ /* For the environment. */
+ size += sizeof (grub_uint32_t);
+ size += 4 * sizeof (grub_uint32_t);
+ size += ALIGN_UP (sizeof ("memsize=XXXXXXXXXXXXXXXXXXXX"), 4)
+ + ALIGN_UP (sizeof ("highmemsize=XXXXXXXXXXXXXXXXXXXX"), 4)
+ + ALIGN_UP (sizeof ("busclock=XXXXXXXXXX"), 4)
+ + ALIGN_UP (sizeof ("cpuclock=XXXXXXXXXX"), 4);
+
+ if (grub_elf_is_elf32 (elf))
+ err = grub_linux_load32 (elf, &extra, size);
+ else
+ if (grub_elf_is_elf64 (elf))
+ err = grub_linux_load64 (elf, &extra, size);
+ else
+ err = grub_error (GRUB_ERR_BAD_FILE_TYPE, "unknown ELF class");
+
+ grub_elf_close (elf);
+
+ if (err)
+ return err;
+
+ linux_argv = extra;
+ argv_off = (grub_uint8_t *) linux_argv - (grub_uint8_t *) playground;
+ extra = linux_argv + (linux_argc + 1 + 2);
+ linux_args = extra;
+
+ grub_memcpy (linux_args, "a0", sizeof ("a0"));
+ *linux_argv = (grub_uint8_t *) linux_args - (grub_uint8_t *) playground
+ + target_addr;
+ linux_argv++;
+ linux_args += ALIGN_UP (sizeof ("a0"), 4);
+
+#ifdef LOONGSON_MACHTYPE
+ /* In Loongson platform, it is the responsibility of the bootloader/firmware
+ to supply the OS kernel with machine type information. */
+ grub_memcpy (linux_args, LOONGSON_MACHTYPE, sizeof (LOONGSON_MACHTYPE));
+ *linux_argv = (grub_uint8_t *) linux_args - (grub_uint8_t *) playground
+ + target_addr;
+ linux_argv++;
+ linux_args += ALIGN_UP (sizeof (LOONGSON_MACHTYPE), 4);
+#endif
+
+ for (i = 1; i < argc; i++)
+ {
+ grub_memcpy (linux_args, argv[i], grub_strlen (argv[i]) + 1);
+ *linux_argv = (grub_uint8_t *) linux_args - (grub_uint8_t *) playground
+ + target_addr;
+ linux_argv++;
+ linux_args += ALIGN_UP (grub_strlen (argv[i]) + 1, 4);
+ }
+
+ /* Reserve space for rd arguments. */
+ rd_addr_arg_off = (grub_uint8_t *) linux_args - (grub_uint8_t *) playground;
+ linux_args += ALIGN_UP (sizeof ("rd_start=0xXXXXXXXXXXXXXXXX"), 4);
+ *linux_argv = 0;
+ linux_argv++;
+
+ rd_size_arg_off = (grub_uint8_t *) linux_args - (grub_uint8_t *) playground;
+ linux_args += ALIGN_UP (sizeof ("rd_size=0xXXXXXXXXXXXXXXXX"), 4);
+ *linux_argv = 0;
+ linux_argv++;
+
+ *linux_argv = 0;
+
+ extra = linux_args;
+
+ linux_envp = extra;
+ envp_off = (grub_uint8_t *) linux_envp - (grub_uint8_t *) playground;
+ linux_envs = (char *) (linux_envp + 5);
+ grub_snprintf (linux_envs, sizeof ("memsize=XXXXXXXXXXXXXXXXXXXX"),
+ "memsize=%lld",
+ (unsigned long long) grub_mmap_get_lower () >> 20);
+ linux_envp[0] = (grub_uint8_t *) linux_envs - (grub_uint8_t *) playground
+ + target_addr;
+ linux_envs += ALIGN_UP (grub_strlen (linux_envs) + 1, 4);
+ grub_snprintf (linux_envs, sizeof ("highmemsize=XXXXXXXXXXXXXXXXXXXX"),
+ "highmemsize=%lld",
+ (unsigned long long) grub_mmap_get_upper () >> 20);
+ linux_envp[1] = (grub_uint8_t *) linux_envs - (grub_uint8_t *) playground
+ + target_addr;
+ linux_envs += ALIGN_UP (grub_strlen (linux_envs) + 1, 4);
+
+ grub_snprintf (linux_envs, sizeof ("busclock=XXXXXXXXXX"),
+ "busclock=%d", grub_arch_busclock);
+ linux_envp[2] = (grub_uint8_t *) linux_envs - (grub_uint8_t *) playground
+ + target_addr;
+ linux_envs += ALIGN_UP (grub_strlen (linux_envs) + 1, 4);
+ grub_snprintf (linux_envs, sizeof ("cpuclock=XXXXXXXXXX"),
+ "cpuclock=%d", grub_arch_cpuclock);
+ linux_envp[3] = (grub_uint8_t *) linux_envs - (grub_uint8_t *) playground
+ + target_addr;
+ linux_envs += ALIGN_UP (grub_strlen (linux_envs) + 1, 4);
+
+
+ linux_envp[4] = 0;
+
+ grub_loader_set (grub_linux_boot, grub_linux_unload, 1);
+ initrd_loaded = 0;
+ loaded = 1;
+ grub_dl_ref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_ssize_t size;
+ void *initrd_src;
+ grub_addr_t initrd_dest;
+ grub_err_t err;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no initrd specified");
+
+ if (!loaded)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load Linux first.");
+
+ if (initrd_loaded)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "only one initrd can be loaded.");
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_errno;
+
+ size = grub_file_size (file);
+
+ {
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_align (relocator, &ch,
+ (target_addr & 0x1fffffff)
+ + linux_size + 0x10000,
+ (0x10000000 - size),
+ size, 0x10000,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+
+ if (err)
+ {
+ grub_file_close (file);
+ return err;
+ }
+ initrd_src = get_virtual_current_address (ch);
+ initrd_dest = get_physical_target_address (ch) | 0x80000000;
+ }
+
+ if (grub_file_read (file, initrd_src, size) != size)
+ {
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ grub_file_close (file);
+
+ return grub_errno;
+ }
+
+ grub_snprintf ((char *) playground + rd_addr_arg_off,
+ sizeof ("rd_start=0xXXXXXXXXXXXXXXXX"), "rd_start=0x%llx",
+ (unsigned long long) initrd_dest);
+ ((grub_uint32_t *) (playground + argv_off))[linux_argc]
+ = target_addr + rd_addr_arg_off;
+ linux_argc++;
+
+ grub_snprintf ((char *) playground + rd_size_arg_off,
+ sizeof ("rd_size=0xXXXXXXXXXXXXXXXXX"), "rd_size=0x%llx",
+ (unsigned long long) size);
+ ((grub_uint32_t *) (playground + argv_off))[linux_argc]
+ = target_addr + rd_size_arg_off;
+ linux_argc++;
+
+ initrd_loaded = 1;
+
+ grub_file_close (file);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd_linux, cmd_initrd;
+
+GRUB_MOD_INIT(linux)
+{
+ cmd_linux = grub_register_command ("linux", grub_cmd_linux,
+ 0, N_("Load Linux."));
+ cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
+ 0, N_("Load initrd."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(linux)
+{
+ grub_unregister_command (cmd_linux);
+ grub_unregister_command (cmd_initrd);
+}
diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
new file mode 100644
index 0000000..d9e74b3
--- /dev/null
+++ b/grub-core/loader/multiboot.c
@@ -0,0 +1,358 @@
+/* multiboot.c - boot a multiboot OS image. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * FIXME: The following features from the Multiboot specification still
+ * need to be implemented:
+ * - drives table
+ * - ROM configuration table
+ * - SMBIOS tables
+ * - Networking information
+ */
+
+#include <grub/loader.h>
+#include <grub/command.h>
+#include <grub/multiboot.h>
+#include <grub/cpu/multiboot.h>
+#include <grub/elf.h>
+#include <grub/aout.h>
+#include <grub/file.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/cpu/relocator.h>
+#include <grub/video.h>
+#include <grub/memory.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifdef GRUB_MACHINE_EFI
+#include <grub/efi/efi.h>
+#endif
+
+struct grub_relocator *grub_multiboot_relocator = NULL;
+grub_uint32_t grub_multiboot_payload_eip;
+#if defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_MULTIBOOT) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU)
+#define DEFAULT_VIDEO_MODE "text"
+#else
+#define DEFAULT_VIDEO_MODE "auto"
+#endif
+
+static int accepts_video;
+static int accepts_ega_text;
+static int console_required;
+static grub_dl_t my_mod;
+
+
+/* Return the length of the Multiboot mmap that will be needed to allocate
+ our platform's map. */
+grub_uint32_t
+grub_get_multiboot_mmap_count (void)
+{
+ grub_size_t count = 0;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr __attribute__ ((unused)),
+ grub_uint64_t size __attribute__ ((unused)),
+ grub_memory_type_t type __attribute__ ((unused)))
+ {
+ count++;
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+
+ return count;
+}
+
+grub_err_t
+grub_multiboot_set_video_mode (void)
+{
+ grub_err_t err;
+ const char *modevar;
+
+ if (accepts_video || !GRUB_MACHINE_HAS_VGA_TEXT)
+ {
+ modevar = grub_env_get ("gfxpayload");
+ if (! modevar || *modevar == 0)
+ err = grub_video_set_mode (DEFAULT_VIDEO_MODE, 0, 0);
+ else
+ {
+ char *tmp;
+ tmp = grub_xasprintf ("%s;" DEFAULT_VIDEO_MODE, modevar);
+ if (! tmp)
+ return grub_errno;
+ err = grub_video_set_mode (tmp, 0, 0);
+ grub_free (tmp);
+ }
+ }
+ else
+ err = grub_video_set_mode ("text", 0, 0);
+
+ return err;
+}
+
+static grub_err_t
+grub_multiboot_boot (void)
+{
+ grub_err_t err;
+ struct grub_relocator32_state state = MULTIBOOT_INITIAL_STATE;
+
+ state.MULTIBOOT_ENTRY_REGISTER = grub_multiboot_payload_eip;
+
+ err = grub_multiboot_make_mbi (&state.MULTIBOOT_MBI_REGISTER);
+
+ if (err)
+ return err;
+
+#ifdef GRUB_MACHINE_EFI
+ err = grub_efi_finish_boot_services (NULL, NULL, NULL, NULL, NULL);
+ if (err)
+ return err;
+#endif
+
+ grub_relocator32_boot (grub_multiboot_relocator, state);
+
+ /* Not reached. */
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_multiboot_unload (void)
+{
+ grub_multiboot_free_mbi ();
+
+ grub_relocator_unload (grub_multiboot_relocator);
+ grub_multiboot_relocator = NULL;
+
+ grub_dl_unref (my_mod);
+
+ return GRUB_ERR_NONE;
+}
+
+#define MULTIBOOT_LOAD_ELF64
+#include "multiboot_elfxx.c"
+#undef MULTIBOOT_LOAD_ELF64
+
+#define MULTIBOOT_LOAD_ELF32
+#include "multiboot_elfxx.c"
+#undef MULTIBOOT_LOAD_ELF32
+
+/* Load ELF32 or ELF64. */
+grub_err_t
+grub_multiboot_load_elf (grub_file_t file, void *buffer)
+{
+ if (grub_multiboot_is_elf32 (buffer))
+ return grub_multiboot_load_elf32 (file, buffer);
+ else if (grub_multiboot_is_elf64 (buffer))
+ return grub_multiboot_load_elf64 (file, buffer);
+
+ return grub_error (GRUB_ERR_UNKNOWN_OS, "unknown ELF class");
+}
+
+grub_err_t
+grub_multiboot_set_console (int console_type, int accepted_consoles,
+ int width, int height, int depth,
+ int console_req)
+{
+ console_required = console_req;
+ if (!(accepted_consoles
+ & (GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER
+ | (GRUB_MACHINE_HAS_VGA_TEXT ? GRUB_MULTIBOOT_CONSOLE_EGA_TEXT : 0))))
+ {
+ if (console_required)
+ return grub_error (GRUB_ERR_BAD_OS,
+ "OS requires a console but none is available");
+ grub_printf ("WARNING: no console will be available to OS");
+ accepts_video = 0;
+ accepts_ega_text = 0;
+ return GRUB_ERR_NONE;
+ }
+
+ if (console_type == GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER)
+ {
+ char *buf;
+ if (depth && width && height)
+ buf = grub_xasprintf ("%dx%dx%d,%dx%d,auto", width,
+ height, depth, width, height);
+ else if (width && height)
+ buf = grub_xasprintf ("%dx%d,auto", width, height);
+ else
+ buf = grub_strdup ("auto");
+
+ if (!buf)
+ return grub_errno;
+ grub_env_set ("gfxpayload", buf);
+ grub_free (buf);
+ }
+ else
+ grub_env_set ("gfxpayload", "text");
+
+ accepts_video = !!(accepted_consoles & GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER);
+ accepts_ega_text = !!(accepted_consoles & GRUB_MULTIBOOT_CONSOLE_EGA_TEXT);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_multiboot (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_err_t err;
+
+ grub_loader_unset ();
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "couldn't open file");
+
+ grub_dl_ref (my_mod);
+
+ /* Skip filename. */
+ grub_multiboot_init_mbi (argc - 1, argv + 1);
+
+ grub_relocator_unload (grub_multiboot_relocator);
+ grub_multiboot_relocator = grub_relocator_new ();
+
+ if (!grub_multiboot_relocator)
+ goto fail;
+
+ err = grub_multiboot_load (file);
+ if (err)
+ goto fail;
+
+ grub_multiboot_set_bootdev ();
+
+ grub_loader_set (grub_multiboot_boot, grub_multiboot_unload, 0);
+
+ fail:
+ if (file)
+ grub_file_close (file);
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_relocator_unload (grub_multiboot_relocator);
+ grub_multiboot_relocator = NULL;
+ grub_dl_unref (my_mod);
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_ssize_t size;
+ void *module = NULL;
+ grub_addr_t target;
+ grub_err_t err;
+ int nounzip = 0;
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
+
+ if (grub_strcmp (argv[0], "--nounzip") == 0)
+ {
+ argv++;
+ argc--;
+ nounzip = 1;
+ }
+
+ if (argc == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
+
+ if (!grub_multiboot_relocator)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "you need to load the multiboot kernel first");
+
+ if (nounzip)
+ grub_file_filter_disable_compression ();
+
+ file = grub_file_open (argv[0]);
+ if (! file)
+ return grub_errno;
+
+ size = grub_file_size (file);
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch,
+ 0, (0xffffffff - size) + 1,
+ size, MULTIBOOT_MOD_ALIGN,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ {
+ grub_file_close (file);
+ return err;
+ }
+ module = get_virtual_current_address (ch);
+ target = (grub_addr_t) get_virtual_current_address (ch);
+ }
+
+ err = grub_multiboot_add_module (target, size, argc - 1, argv + 1);
+ if (err)
+ {
+ grub_file_close (file);
+ return err;
+ }
+
+ if (grub_file_read (file, module, size) != size)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ }
+
+ grub_file_close (file);
+ return GRUB_ERR_NONE;;
+}
+
+static grub_command_t cmd_multiboot, cmd_module;
+
+GRUB_MOD_INIT(multiboot)
+{
+ cmd_multiboot =
+#ifdef GRUB_USE_MULTIBOOT2
+ grub_register_command ("multiboot2", grub_cmd_multiboot,
+ 0, N_("Load a multiboot 2 kernel."));
+ cmd_module =
+ grub_register_command ("module2", grub_cmd_module,
+ 0, N_("Load a multiboot 2 module."));
+#else
+ grub_register_command ("multiboot", grub_cmd_multiboot,
+ 0, N_("Load a multiboot kernel."));
+ cmd_module =
+ grub_register_command ("module", grub_cmd_module,
+ 0, N_("Load a multiboot module."));
+#endif
+
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(multiboot)
+{
+ grub_unregister_command (cmd_multiboot);
+ grub_unregister_command (cmd_module);
+}
diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c
new file mode 100644
index 0000000..0c29fe9
--- /dev/null
+++ b/grub-core/loader/multiboot_elfxx.c
@@ -0,0 +1,225 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if defined(MULTIBOOT_LOAD_ELF32)
+# define XX 32
+# define E_MACHINE MULTIBOOT_ELF32_MACHINE
+# define ELFCLASSXX ELFCLASS32
+# define Elf_Ehdr Elf32_Ehdr
+# define Elf_Phdr Elf32_Phdr
+#elif defined(MULTIBOOT_LOAD_ELF64)
+# define XX 64
+# define E_MACHINE MULTIBOOT_ELF64_MACHINE
+# define ELFCLASSXX ELFCLASS64
+# define Elf_Ehdr Elf64_Ehdr
+# define Elf_Phdr Elf64_Phdr
+#else
+#error "I'm confused"
+#endif
+
+#include <grub/i386/relocator.h>
+
+#define CONCAT(a,b) CONCAT_(a, b)
+#define CONCAT_(a,b) a ## b
+
+/* Check if BUFFER contains ELF32 (or ELF64). */
+static int
+CONCAT(grub_multiboot_is_elf, XX) (void *buffer)
+{
+ Elf_Ehdr *ehdr = (Elf_Ehdr *) buffer;
+
+ return ehdr->e_ident[EI_CLASS] == ELFCLASSXX;
+}
+
+static grub_err_t
+CONCAT(grub_multiboot_load_elf, XX) (grub_file_t file, void *buffer)
+{
+ Elf_Ehdr *ehdr = (Elf_Ehdr *) buffer;
+ char *phdr_base;
+ int i;
+
+ if (ehdr->e_ident[EI_CLASS] != ELFCLASSXX)
+ return grub_error (GRUB_ERR_UNKNOWN_OS, "invalid ELF class");
+
+ if (ehdr->e_ident[EI_MAG0] != ELFMAG0
+ || ehdr->e_ident[EI_MAG1] != ELFMAG1
+ || ehdr->e_ident[EI_MAG2] != ELFMAG2
+ || ehdr->e_ident[EI_MAG3] != ELFMAG3
+ || ehdr->e_version != EV_CURRENT
+ || ehdr->e_ident[EI_DATA] != ELFDATA2LSB
+ || ehdr->e_machine != E_MACHINE)
+ return grub_error(GRUB_ERR_UNKNOWN_OS, "no valid ELF header found");
+
+ if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
+ return grub_error (GRUB_ERR_UNKNOWN_OS, "invalid ELF file type");
+
+ /* FIXME: Should we support program headers at strange locations? */
+ if (ehdr->e_phoff + ehdr->e_phnum * ehdr->e_phentsize > MULTIBOOT_SEARCH)
+ return grub_error (GRUB_ERR_BAD_OS, "program header at a too high offset");
+
+#if defined (MULTIBOOT_LOAD_ELF64) && defined (__mips)
+ /* We still in 32-bit mode. */
+ if (ehdr->e_entry < 0xffffffff80000000ULL)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid entry point for ELF64");
+#else
+ /* We still in 32-bit mode. */
+ if (ehdr->e_entry > 0xffffffff)
+ return grub_error (GRUB_ERR_BAD_OS, "invalid entry point for ELF64");
+#endif
+
+ phdr_base = (char *) buffer + ehdr->e_phoff;
+#define phdr(i) ((Elf_Phdr *) (phdr_base + (i) * ehdr->e_phentsize))
+
+ /* Load every loadable segment in memory. */
+ for (i = 0; i < ehdr->e_phnum; i++)
+ {
+ if (phdr(i)->p_type == PT_LOAD)
+ {
+ grub_err_t err;
+ void *source;
+
+ grub_dprintf ("multiboot_loader", "segment %d: paddr=0x%lx, memsz=0x%lx, vaddr=0x%lx\n",
+ i, (long) phdr(i)->p_paddr, (long) phdr(i)->p_memsz, (long) phdr(i)->p_vaddr);
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator,
+ &ch, phdr(i)->p_paddr,
+ phdr(i)->p_memsz);
+ if (err)
+ {
+ grub_dprintf ("multiboot_loader", "Error loading phdr %d\n", i);
+ return err;
+ }
+ source = get_virtual_current_address (ch);
+ }
+
+ if (phdr(i)->p_filesz != 0)
+ {
+ if (grub_file_seek (file, (grub_off_t) phdr(i)->p_offset)
+ == (grub_off_t) -1)
+ return grub_error (GRUB_ERR_BAD_OS,
+ "invalid offset in program header");
+
+ if (grub_file_read (file, source, phdr(i)->p_filesz)
+ != (grub_ssize_t) phdr(i)->p_filesz)
+ return grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read segment from file");
+ }
+
+ if (phdr(i)->p_filesz < phdr(i)->p_memsz)
+ grub_memset ((grub_uint8_t *) source + phdr(i)->p_filesz, 0,
+ phdr(i)->p_memsz - phdr(i)->p_filesz);
+ }
+ }
+
+ for (i = 0; i < ehdr->e_phnum; i++)
+ if (phdr(i)->p_vaddr <= ehdr->e_entry
+ && phdr(i)->p_vaddr + phdr(i)->p_memsz > ehdr->e_entry)
+ {
+ grub_multiboot_payload_eip = (ehdr->e_entry - phdr(i)->p_vaddr)
+ + phdr(i)->p_paddr;
+ break;
+ }
+
+ if (i == ehdr->e_phnum)
+ return grub_error (GRUB_ERR_BAD_OS, "entry point isn't in a segment");
+
+#if defined (__i386__) || defined (__x86_64__)
+
+#elif defined (__mips)
+ grub_multiboot_payload_eip |= 0x80000000;
+#else
+#error Please complete this
+#endif
+
+ if (ehdr->e_shnum)
+ {
+ grub_uint8_t *shdr, *shdrptr;
+
+ shdr = grub_malloc (ehdr->e_shnum * ehdr->e_shentsize);
+ if (!shdr)
+ return grub_errno;
+
+ if (grub_file_seek (file, ehdr->e_shoff) == (grub_off_t) -1)
+ return grub_error (GRUB_ERR_BAD_OS,
+ "invalid offset to section headers");
+
+ if (grub_file_read (file, shdr, ehdr->e_shnum * ehdr->e_shentsize)
+ != (grub_ssize_t) ehdr->e_shnum * ehdr->e_shentsize)
+ return grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read sections headers from file");
+
+ for (shdrptr = shdr, i = 0; i < ehdr->e_shnum;
+ shdrptr += ehdr->e_shentsize, i++)
+ {
+ Elf_Shdr *sh = (Elf_Shdr *) shdrptr;
+ void *src;
+ grub_addr_t target;
+ grub_err_t err;
+
+ /* This section is a loaded section,
+ so we don't care. */
+ if (sh->sh_addr != 0)
+ continue;
+
+ /* This section is empty, so we don't care. */
+ if (sh->sh_size == 0)
+ continue;
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator,
+ &ch, 0,
+ (0xffffffff - sh->sh_size)
+ + 1, sh->sh_size,
+ sh->sh_addralign,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ {
+ grub_dprintf ("multiboot_loader", "Error loading shdr %d\n", i);
+ return err;
+ }
+ src = get_virtual_current_address (ch);
+ target = get_physical_target_address (ch);
+ }
+
+ if (grub_file_seek (file, sh->sh_offset) == (grub_off_t) -1)
+ return grub_error (GRUB_ERR_BAD_OS,
+ "invalid offset in section header");
+
+ if (grub_file_read (file, src, sh->sh_size)
+ != (grub_ssize_t) sh->sh_size)
+ return grub_error (GRUB_ERR_BAD_OS,
+ "couldn't read segment from file");
+ sh->sh_addr = target;
+ }
+ grub_multiboot_add_elfsyms (ehdr->e_shnum, ehdr->e_shentsize,
+ ehdr->e_shstrndx, shdr);
+ }
+
+#undef phdr
+
+ return grub_errno;
+}
+
+#undef XX
+#undef E_MACHINE
+#undef ELFCLASSXX
+#undef Elf_Ehdr
+#undef Elf_Phdr
diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c
new file mode 100644
index 0000000..05f581b
--- /dev/null
+++ b/grub-core/loader/multiboot_mbi2.c
@@ -0,0 +1,911 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/memory.h>
+#ifdef GRUB_MACHINE_PCBIOS
+#include <grub/machine/biosnum.h>
+#include <grub/machine/apm.h>
+#include <grub/machine/memory.h>
+#endif
+#include <grub/multiboot.h>
+#include <grub/cpu/multiboot.h>
+#include <grub/cpu/relocator.h>
+#include <grub/disk.h>
+#include <grub/device.h>
+#include <grub/partition.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/video.h>
+#include <grub/acpi.h>
+
+#if defined (GRUB_MACHINE_EFI)
+#include <grub/efi/efi.h>
+#endif
+
+#if defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_MULTIBOOT) || defined (GRUB_MACHINE_QEMU)
+#include <grub/i386/pc/vbe.h>
+#define HAS_VGA_TEXT 1
+#else
+#define HAS_VGA_TEXT 0
+#endif
+
+struct module
+{
+ struct module *next;
+ grub_addr_t start;
+ grub_size_t size;
+ char *cmdline;
+ int cmdline_size;
+};
+
+static struct module *modules, *modules_last;
+static grub_size_t cmdline_size;
+static grub_size_t total_modcmd;
+static unsigned modcnt;
+static char *cmdline = NULL;
+static int bootdev_set;
+static grub_uint32_t biosdev, slice, part;
+static grub_size_t elf_sec_num, elf_sec_entsize;
+static unsigned elf_sec_shstrndx;
+static void *elf_sections;
+
+void
+grub_multiboot_add_elfsyms (grub_size_t num, grub_size_t entsize,
+ unsigned shndx, void *data)
+{
+ elf_sec_num = num;
+ elf_sec_shstrndx = shndx;
+ elf_sec_entsize = entsize;
+ elf_sections = data;
+}
+
+grub_err_t
+grub_multiboot_load (grub_file_t file)
+{
+ char *buffer;
+ grub_ssize_t len;
+ struct multiboot_header *header;
+ grub_err_t err;
+ struct multiboot_header_tag *tag;
+ struct multiboot_header_tag_address *addr_tag = NULL;
+ int entry_specified = 0;
+ grub_addr_t entry = 0;
+ grub_uint32_t console_required = 0;
+ struct multiboot_header_tag_framebuffer *fbtag = NULL;
+ int accepted_consoles = GRUB_MULTIBOOT_CONSOLE_EGA_TEXT;
+
+ buffer = grub_malloc (MULTIBOOT_SEARCH);
+ if (!buffer)
+ return grub_errno;
+
+ len = grub_file_read (file, buffer, MULTIBOOT_SEARCH);
+ if (len < 32)
+ {
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_BAD_OS, "file too small");
+ }
+
+ /* Look for the multiboot header in the buffer. The header should
+ be at least 12 bytes and aligned on a 4-byte boundary. */
+ for (header = (struct multiboot_header *) buffer;
+ ((char *) header <= buffer + len - 12) || (header = 0);
+ header = (struct multiboot_header *) ((char *) header + MULTIBOOT_HEADER_ALIGN))
+ {
+ if (header->magic == MULTIBOOT_HEADER_MAGIC
+ && !(header->magic + header->architecture
+ + header->header_length + header->checksum)
+ && header->architecture == MULTIBOOT_ARCHITECTURE_CURRENT)
+ break;
+ }
+
+ if (header == 0)
+ {
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no multiboot header found");
+ }
+
+ for (tag = (struct multiboot_header_tag *) (header + 1);
+ tag->type != MULTIBOOT_TAG_TYPE_END;
+ tag = (struct multiboot_header_tag *) ((char *) tag + tag->size))
+ switch (tag->type)
+ {
+ case MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST:
+ {
+ unsigned i;
+ struct multiboot_header_tag_information_request *request_tag
+ = (struct multiboot_header_tag_information_request *) tag;
+ if (request_tag->flags & MULTIBOOT_HEADER_TAG_OPTIONAL)
+ break;
+ for (i = 0; i < (request_tag->size - sizeof (request_tag))
+ / sizeof (request_tag->requests[0]); i++)
+ switch (request_tag->requests[i])
+ {
+ case MULTIBOOT_TAG_TYPE_END:
+ case MULTIBOOT_TAG_TYPE_CMDLINE:
+ case MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME:
+ case MULTIBOOT_TAG_TYPE_MODULE:
+ case MULTIBOOT_TAG_TYPE_BASIC_MEMINFO:
+ case MULTIBOOT_TAG_TYPE_BOOTDEV:
+ case MULTIBOOT_TAG_TYPE_MMAP:
+ case MULTIBOOT_TAG_TYPE_FRAMEBUFFER:
+ case MULTIBOOT_TAG_TYPE_VBE:
+ case MULTIBOOT_TAG_TYPE_ELF_SECTIONS:
+ case MULTIBOOT_TAG_TYPE_APM:
+ case MULTIBOOT_TAG_TYPE_EFI32:
+ case MULTIBOOT_TAG_TYPE_EFI64:
+ case MULTIBOOT_TAG_TYPE_ACPI_OLD:
+ case MULTIBOOT_TAG_TYPE_ACPI_NEW:
+ break;
+
+ default:
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_UNKNOWN_OS,
+ "unsupported information tag: 0x%x",
+ request_tag->requests[i]);
+ }
+ break;
+ }
+
+ case MULTIBOOT_HEADER_TAG_ADDRESS:
+ addr_tag = (struct multiboot_header_tag_address *) tag;
+ break;
+
+ case MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS:
+ entry_specified = 1;
+ entry = ((struct multiboot_header_tag_entry_address *) tag)->entry_addr;
+ break;
+
+ case MULTIBOOT_HEADER_TAG_CONSOLE_FLAGS:
+ if (!(((struct multiboot_header_tag_console_flags *) tag)->console_flags
+ & MULTIBOOT_CONSOLE_FLAGS_EGA_TEXT_SUPPORTED))
+ accepted_consoles &= ~GRUB_MULTIBOOT_CONSOLE_EGA_TEXT;
+ if (((struct multiboot_header_tag_console_flags *) tag)->console_flags
+ & MULTIBOOT_CONSOLE_FLAGS_CONSOLE_REQUIRED)
+ console_required = 1;
+ break;
+
+ case MULTIBOOT_HEADER_TAG_FRAMEBUFFER:
+ fbtag = (struct multiboot_header_tag_framebuffer *) tag;
+ accepted_consoles |= GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER;
+ break;
+
+ /* GRUB always page-aligns modules. */
+ case MULTIBOOT_HEADER_TAG_MODULE_ALIGN:
+ break;
+
+ default:
+ if (! (tag->flags & MULTIBOOT_HEADER_TAG_OPTIONAL))
+ {
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_UNKNOWN_OS,
+ "unsupported tag: 0x%x", tag->type);
+ }
+ break;
+ }
+
+ if (addr_tag && !entry_specified)
+ {
+ grub_free (buffer);
+ return grub_error (GRUB_ERR_UNKNOWN_OS,
+ "load address tag without entry address tag");
+ }
+
+ if (addr_tag)
+ {
+ int offset = ((char *) header - buffer -
+ (addr_tag->header_addr - addr_tag->load_addr));
+ int load_size = ((addr_tag->load_end_addr == 0) ? file->size - offset :
+ addr_tag->load_end_addr - addr_tag->load_addr);
+ grub_size_t code_size;
+ void *source;
+ grub_relocator_chunk_t ch;
+
+ if (addr_tag->bss_end_addr)
+ code_size = (addr_tag->bss_end_addr - addr_tag->load_addr);
+ else
+ code_size = load_size;
+
+ err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator,
+ &ch, addr_tag->load_addr,
+ code_size);
+ if (err)
+ {
+ grub_dprintf ("multiboot_loader", "Error loading aout kludge\n");
+ grub_free (buffer);
+ return err;
+ }
+ source = get_virtual_current_address (ch);
+
+ if ((grub_file_seek (file, offset)) == (grub_off_t) -1)
+ {
+ grub_free (buffer);
+ return grub_errno;
+ }
+
+ grub_file_read (file, source, load_size);
+ if (grub_errno)
+ {
+ grub_free (buffer);
+ return grub_errno;
+ }
+
+ if (addr_tag->bss_end_addr)
+ grub_memset ((grub_uint32_t *) source + load_size, 0,
+ addr_tag->bss_end_addr - addr_tag->load_addr - load_size);
+ }
+ else
+ {
+ err = grub_multiboot_load_elf (file, buffer);
+ if (err)
+ {
+ grub_free (buffer);
+ return err;
+ }
+ }
+
+ if (entry_specified)
+ grub_multiboot_payload_eip = entry;
+
+ if (fbtag)
+ err = grub_multiboot_set_console (GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER,
+ accepted_consoles,
+ fbtag->width, fbtag->height,
+ fbtag->depth, console_required);
+ else
+ err = grub_multiboot_set_console (GRUB_MULTIBOOT_CONSOLE_EGA_TEXT,
+ accepted_consoles,
+ 0, 0, 0, console_required);
+ return err;
+}
+
+static grub_size_t
+acpiv2_size (void)
+{
+#if GRUB_MACHINE_HAS_ACPI
+ struct grub_acpi_rsdp_v20 *p = grub_acpi_get_rsdpv2 ();
+
+ if (!p)
+ return 0;
+
+ return ALIGN_UP (sizeof (struct multiboot_tag_old_acpi)
+ + p->length, MULTIBOOT_TAG_ALIGN);
+#else
+ return 0;
+#endif
+}
+
+static grub_size_t
+grub_multiboot_get_mbi_size (void)
+{
+ return 2 * sizeof (grub_uint32_t) + sizeof (struct multiboot_tag)
+ + (sizeof (struct multiboot_tag_string)
+ + ALIGN_UP (cmdline_size, MULTIBOOT_TAG_ALIGN))
+ + (sizeof (struct multiboot_tag_string)
+ + ALIGN_UP (sizeof (PACKAGE_STRING), MULTIBOOT_TAG_ALIGN))
+ + (modcnt * sizeof (struct multiboot_tag_module) + total_modcmd)
+ + ALIGN_UP (sizeof (struct multiboot_tag_basic_meminfo),
+ MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP (sizeof (struct multiboot_tag_bootdev), MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP (sizeof (struct multiboot_tag_elf_sections), MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP (elf_sec_entsize * elf_sec_num, MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP ((sizeof (struct multiboot_tag_mmap)
+ + grub_get_multiboot_mmap_count ()
+ * sizeof (struct multiboot_mmap_entry)), MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP (sizeof (struct multiboot_tag_framebuffer), MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP (sizeof (struct multiboot_tag_efi32), MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP (sizeof (struct multiboot_tag_efi64), MULTIBOOT_TAG_ALIGN)
+ + ALIGN_UP (sizeof (struct multiboot_tag_old_acpi)
+ + sizeof (struct grub_acpi_rsdp_v10), MULTIBOOT_TAG_ALIGN)
+ + acpiv2_size ()
+ + sizeof (struct multiboot_tag_vbe) + MULTIBOOT_TAG_ALIGN - 1
+ + sizeof (struct multiboot_tag_apm) + MULTIBOOT_TAG_ALIGN - 1;
+}
+
+/* Fill previously allocated Multiboot mmap. */
+static void
+grub_fill_multiboot_mmap (struct multiboot_tag_mmap *tag)
+{
+ struct multiboot_mmap_entry *mmap_entry = tag->entries;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ mmap_entry->addr = addr;
+ mmap_entry->len = size;
+ switch (type)
+ {
+ case GRUB_MEMORY_AVAILABLE:
+ mmap_entry->type = MULTIBOOT_MEMORY_AVAILABLE;
+ break;
+
+ case GRUB_MEMORY_ACPI:
+ mmap_entry->type = MULTIBOOT_MEMORY_ACPI_RECLAIMABLE;
+ break;
+
+ case GRUB_MEMORY_NVS:
+ mmap_entry->type = MULTIBOOT_MEMORY_NVS;
+ break;
+
+ case GRUB_MEMORY_BADRAM:
+ mmap_entry->type = MULTIBOOT_MEMORY_BADRAM;
+ break;
+
+ default:
+ mmap_entry->type = MULTIBOOT_MEMORY_RESERVED;
+ break;
+ }
+ mmap_entry++;
+
+ return 0;
+ }
+
+ tag->type = MULTIBOOT_TAG_TYPE_MMAP;
+ tag->size = sizeof (struct multiboot_tag_mmap)
+ + sizeof (struct multiboot_mmap_entry) * grub_get_multiboot_mmap_count ();
+ tag->entry_size = sizeof (struct multiboot_mmap_entry);
+ tag->entry_version = 0;
+
+ grub_mmap_iterate (hook);
+}
+
+#if defined (GRUB_MACHINE_PCBIOS)
+static void
+fill_vbe_tag (struct multiboot_tag_vbe *tag)
+{
+ grub_vbe_status_t status;
+ void *scratch = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+
+ tag->type = MULTIBOOT_TAG_TYPE_VBE;
+ tag->size = 0;
+
+ status = grub_vbe_bios_get_controller_info (scratch);
+ if (status != GRUB_VBE_STATUS_OK)
+ return;
+
+ grub_memcpy (&tag->vbe_control_info, scratch,
+ sizeof (struct grub_vbe_info_block));
+
+ status = grub_vbe_bios_get_mode (scratch);
+ tag->vbe_mode = *(grub_uint32_t *) scratch;
+ if (status != GRUB_VBE_STATUS_OK)
+ return;
+
+ /* get_mode_info isn't available for mode 3. */
+ if (tag->vbe_mode == 3)
+ {
+ struct grub_vbe_mode_info_block *mode_info = (void *) &tag->vbe_mode_info;
+ grub_memset (mode_info, 0,
+ sizeof (struct grub_vbe_mode_info_block));
+ mode_info->memory_model = GRUB_VBE_MEMORY_MODEL_TEXT;
+ mode_info->x_resolution = 80;
+ mode_info->y_resolution = 25;
+ }
+ else
+ {
+ status = grub_vbe_bios_get_mode_info (tag->vbe_mode, scratch);
+ if (status != GRUB_VBE_STATUS_OK)
+ return;
+ grub_memcpy (&tag->vbe_mode_info, scratch,
+ sizeof (struct grub_vbe_mode_info_block));
+ }
+ grub_vbe_bios_get_pm_interface (&tag->vbe_interface_seg,
+ &tag->vbe_interface_off,
+ &tag->vbe_interface_len);
+
+ tag->size = sizeof (*tag);
+}
+#endif
+
+static grub_err_t
+retrieve_video_parameters (grub_uint8_t **ptrorig)
+{
+ grub_err_t err;
+ struct grub_video_mode_info mode_info;
+ void *framebuffer;
+ grub_video_driver_id_t driv_id;
+ struct grub_video_palette_data palette[256];
+ struct multiboot_tag_framebuffer *tag
+ = (struct multiboot_tag_framebuffer *) *ptrorig;
+
+ err = grub_multiboot_set_video_mode ();
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ grub_video_get_palette (0, ARRAY_SIZE (palette), palette);
+
+ driv_id = grub_video_get_driver_id ();
+#if HAS_VGA_TEXT
+ if (driv_id == GRUB_VIDEO_DRIVER_NONE)
+ {
+ struct grub_vbe_mode_info_block vbe_mode_info;
+ grub_uint32_t vbe_mode;
+
+#if defined (GRUB_MACHINE_PCBIOS)
+ {
+ grub_vbe_status_t status;
+ void *scratch = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+ status = grub_vbe_bios_get_mode (scratch);
+ vbe_mode = *(grub_uint32_t *) scratch;
+ if (status != GRUB_VBE_STATUS_OK)
+ return GRUB_ERR_NONE;
+ }
+#else
+ vbe_mode = 3;
+#endif
+
+ /* get_mode_info isn't available for mode 3. */
+ if (vbe_mode == 3)
+ {
+ grub_memset (&vbe_mode_info, 0,
+ sizeof (struct grub_vbe_mode_info_block));
+ vbe_mode_info.memory_model = GRUB_VBE_MEMORY_MODEL_TEXT;
+ vbe_mode_info.x_resolution = 80;
+ vbe_mode_info.y_resolution = 25;
+ }
+#if defined (GRUB_MACHINE_PCBIOS)
+ else
+ {
+ grub_vbe_status_t status;
+ void *scratch = (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+ status = grub_vbe_bios_get_mode_info (vbe_mode, scratch);
+ if (status != GRUB_VBE_STATUS_OK)
+ return GRUB_ERR_NONE;
+ grub_memcpy (&vbe_mode_info, scratch,
+ sizeof (struct grub_vbe_mode_info_block));
+ }
+#endif
+
+ if (vbe_mode_info.memory_model == GRUB_VBE_MEMORY_MODEL_TEXT)
+ {
+ tag = (struct multiboot_tag_framebuffer *) *ptrorig;
+ tag->common.type = MULTIBOOT_TAG_TYPE_FRAMEBUFFER;
+ tag->common.size = 0;
+
+ tag->common.framebuffer_addr = 0xb8000;
+
+ tag->common.framebuffer_pitch = 2 * vbe_mode_info.x_resolution;
+ tag->common.framebuffer_width = vbe_mode_info.x_resolution;
+ tag->common.framebuffer_height = vbe_mode_info.y_resolution;
+
+ tag->common.framebuffer_bpp = 16;
+
+ tag->common.framebuffer_type = MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT;
+ tag->common.size = sizeof (tag->common);
+ tag->common.reserved = 0;
+ *ptrorig += ALIGN_UP (tag->common.size, MULTIBOOT_TAG_ALIGN);
+ }
+ return GRUB_ERR_NONE;
+ }
+#else
+ if (driv_id == GRUB_VIDEO_DRIVER_NONE)
+ return GRUB_ERR_NONE;
+#endif
+
+#if GRUB_MACHINE_HAS_VBE
+ {
+ struct multiboot_tag_vbe *tag_vbe = (struct multiboot_tag_vbe *) *ptrorig;
+
+ fill_vbe_tag (tag_vbe);
+
+ *ptrorig += ALIGN_UP (tag_vbe->size, MULTIBOOT_TAG_ALIGN);
+ }
+#endif
+
+ err = grub_video_get_info_and_fini (&mode_info, &framebuffer);
+ if (err)
+ return err;
+
+ tag = (struct multiboot_tag_framebuffer *) *ptrorig;
+ tag->common.type = MULTIBOOT_TAG_TYPE_FRAMEBUFFER;
+ tag->common.size = 0;
+
+ tag->common.framebuffer_addr = (grub_addr_t) framebuffer;
+ tag->common.framebuffer_pitch = mode_info.pitch;
+
+ tag->common.framebuffer_width = mode_info.width;
+ tag->common.framebuffer_height = mode_info.height;
+
+ tag->common.framebuffer_bpp = mode_info.bpp;
+
+ tag->common.reserved = 0;
+
+ if (mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)
+ {
+ unsigned i;
+ tag->common.framebuffer_type = MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED;
+ tag->framebuffer_palette_num_colors = mode_info.number_of_colors;
+ if (tag->framebuffer_palette_num_colors > ARRAY_SIZE (palette))
+ tag->framebuffer_palette_num_colors = ARRAY_SIZE (palette);
+ tag->common.size = sizeof (struct multiboot_tag_framebuffer_common)
+ + sizeof (multiboot_uint16_t) + tag->framebuffer_palette_num_colors
+ * sizeof (struct multiboot_color);
+ for (i = 0; i < tag->framebuffer_palette_num_colors; i++)
+ {
+ tag->framebuffer_palette[i].red = palette[i].r;
+ tag->framebuffer_palette[i].green = palette[i].g;
+ tag->framebuffer_palette[i].blue = palette[i].b;
+ }
+ }
+ else
+ {
+ tag->common.framebuffer_type = MULTIBOOT_FRAMEBUFFER_TYPE_RGB;
+ tag->framebuffer_red_field_position = mode_info.red_field_pos;
+ tag->framebuffer_red_mask_size = mode_info.red_mask_size;
+ tag->framebuffer_green_field_position = mode_info.green_field_pos;
+ tag->framebuffer_green_mask_size = mode_info.green_mask_size;
+ tag->framebuffer_blue_field_position = mode_info.blue_field_pos;
+ tag->framebuffer_blue_mask_size = mode_info.blue_mask_size;
+
+ tag->common.size = sizeof (struct multiboot_tag_framebuffer_common) + 6;
+ }
+ *ptrorig += ALIGN_UP (tag->common.size, MULTIBOOT_TAG_ALIGN);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_multiboot_make_mbi (grub_uint32_t *target)
+{
+ grub_uint8_t *ptrorig;
+ grub_uint8_t *mbistart;
+ grub_err_t err;
+ grub_size_t bufsize;
+ grub_relocator_chunk_t ch;
+
+ bufsize = grub_multiboot_get_mbi_size ();
+
+ err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch,
+ 0, 0xffffffff - bufsize,
+ bufsize, MULTIBOOT_TAG_ALIGN,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ return err;
+
+ ptrorig = get_virtual_current_address (ch);
+#if defined (__i386__) || defined (__x86_64__)
+ *target = get_physical_target_address (ch);
+#elif defined (__mips)
+ *target = get_physical_target_address (ch) | 0x80000000;
+#else
+#error Please complete this
+#endif
+
+ mbistart = ptrorig;
+ ptrorig += 2 * sizeof (grub_uint32_t);
+
+ {
+ struct multiboot_tag_string *tag = (struct multiboot_tag_string *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_CMDLINE;
+ tag->size = sizeof (struct multiboot_tag_string) + cmdline_size;
+ grub_memcpy (tag->string, cmdline, cmdline_size);
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+
+ {
+ struct multiboot_tag_string *tag = (struct multiboot_tag_string *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME;
+ tag->size = sizeof (struct multiboot_tag_string) + sizeof (PACKAGE_STRING);
+ grub_memcpy (tag->string, PACKAGE_STRING, sizeof (PACKAGE_STRING));
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+
+#ifdef GRUB_MACHINE_PCBIOS
+ {
+ struct grub_apm_info info;
+ if (grub_apm_get_info (&info))
+ {
+ struct multiboot_tag_apm *tag = (struct multiboot_tag_apm *) ptrorig;
+
+ tag->type = MULTIBOOT_TAG_TYPE_APM;
+ tag->size = sizeof (struct multiboot_tag_apm);
+
+ tag->cseg = info.cseg;
+ tag->offset = info.offset;
+ tag->cseg_16 = info.cseg_16;
+ tag->dseg = info.dseg;
+ tag->flags = info.flags;
+ tag->cseg_len = info.cseg_len;
+ tag->dseg_len = info.dseg_len;
+ tag->cseg_16_len = info.cseg_16_len;
+ tag->version = info.version;
+
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+ }
+#endif
+
+ {
+ unsigned i;
+ struct module *cur;
+
+ for (i = 0, cur = modules; i < modcnt; i++, cur = cur->next)
+ {
+ struct multiboot_tag_module *tag
+ = (struct multiboot_tag_module *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_MODULE;
+ tag->size = sizeof (struct multiboot_tag_module) + cur->cmdline_size;
+ tag->mod_start = cur->start;
+ tag->mod_end = tag->mod_start + cur->size;
+ grub_memcpy (tag->cmdline, cur->cmdline, cur->cmdline_size);
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+ }
+
+ {
+ struct multiboot_tag_mmap *tag = (struct multiboot_tag_mmap *) ptrorig;
+ grub_fill_multiboot_mmap (tag);
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+
+ {
+ struct multiboot_tag_elf_sections *tag
+ = (struct multiboot_tag_elf_sections *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_ELF_SECTIONS;
+ tag->size = sizeof (struct multiboot_tag_elf_sections)
+ + elf_sec_entsize * elf_sec_num;
+ grub_memcpy (tag->sections, elf_sections, elf_sec_entsize * elf_sec_num);
+ tag->num = elf_sec_num;
+ tag->entsize = elf_sec_entsize;
+ tag->shndx = elf_sec_shstrndx;
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+
+ {
+ struct multiboot_tag_basic_meminfo *tag
+ = (struct multiboot_tag_basic_meminfo *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_BASIC_MEMINFO;
+ tag->size = sizeof (struct multiboot_tag_basic_meminfo);
+
+ /* Convert from bytes to kilobytes. */
+ tag->mem_lower = grub_mmap_get_lower () / 1024;
+ tag->mem_upper = grub_mmap_get_upper () / 1024;
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+
+ if (bootdev_set)
+ {
+ struct multiboot_tag_bootdev *tag
+ = (struct multiboot_tag_bootdev *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_BOOTDEV;
+ tag->size = sizeof (struct multiboot_tag_bootdev);
+
+ tag->biosdev = biosdev;
+ tag->slice = slice;
+ tag->part = part;
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+
+ {
+ err = retrieve_video_parameters (&ptrorig);
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+
+#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
+ {
+ struct multiboot_tag_efi64 *tag = (struct multiboot_tag_efi64 *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_EFI64;
+ tag->size = sizeof (*tag);
+ tag->pointer = (grub_addr_t) grub_efi_system_table;
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+#endif
+
+#if defined (GRUB_MACHINE_EFI) && defined (__i386__)
+ {
+ struct multiboot_tag_efi32 *tag = (struct multiboot_tag_efi32 *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_EFI32;
+ tag->size = sizeof (*tag);
+ tag->pointer = (grub_addr_t) grub_efi_system_table;
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+#endif
+
+#if GRUB_MACHINE_HAS_ACPI
+ {
+ struct multiboot_tag_old_acpi *tag = (struct multiboot_tag_old_acpi *)
+ ptrorig;
+ struct grub_acpi_rsdp_v10 *a = grub_acpi_get_rsdpv1 ();
+ if (a)
+ {
+ tag->type = MULTIBOOT_TAG_TYPE_ACPI_OLD;
+ tag->size = sizeof (*tag) + sizeof (*a);
+ grub_memcpy (tag->rsdp, a, sizeof (*a));
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+ }
+
+ {
+ struct multiboot_tag_new_acpi *tag = (struct multiboot_tag_new_acpi *)
+ ptrorig;
+ struct grub_acpi_rsdp_v20 *a = grub_acpi_get_rsdpv2 ();
+ if (a)
+ {
+ tag->type = MULTIBOOT_TAG_TYPE_ACPI_NEW;
+ tag->size = sizeof (*tag) + a->length;
+ grub_memcpy (tag->rsdp, a, a->length);
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+ }
+#endif
+
+ {
+ struct multiboot_tag *tag = (struct multiboot_tag *) ptrorig;
+ tag->type = MULTIBOOT_TAG_TYPE_END;
+ tag->size = sizeof (struct multiboot_tag);
+ ptrorig += ALIGN_UP (tag->size, MULTIBOOT_TAG_ALIGN);
+ }
+
+ ((grub_uint32_t *) mbistart)[0] = ptrorig - mbistart;
+ ((grub_uint32_t *) mbistart)[1] = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_multiboot_free_mbi (void)
+{
+ struct module *cur, *next;
+
+ cmdline_size = 0;
+ total_modcmd = 0;
+ modcnt = 0;
+ grub_free (cmdline);
+ cmdline = NULL;
+ bootdev_set = 0;
+
+ for (cur = modules; cur; cur = next)
+ {
+ next = cur->next;
+ grub_free (cur->cmdline);
+ grub_free (cur);
+ }
+ modules = NULL;
+ modules_last = NULL;
+}
+
+grub_err_t
+grub_multiboot_init_mbi (int argc, char *argv[])
+{
+ grub_ssize_t len = 0;
+ char *p;
+ int i;
+
+ grub_multiboot_free_mbi ();
+
+ for (i = 0; i < argc; i++)
+ len += grub_strlen (argv[i]) + 1;
+ if (len == 0)
+ len = 1;
+
+ cmdline = p = grub_malloc (len);
+ if (! cmdline)
+ return grub_errno;
+ cmdline_size = len;
+
+ for (i = 0; i < argc; i++)
+ {
+ p = grub_stpcpy (p, argv[i]);
+ *(p++) = ' ';
+ }
+
+ /* Remove the space after the last word. */
+ if (p != cmdline)
+ p--;
+ *p = '\0';
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_multiboot_add_module (grub_addr_t start, grub_size_t size,
+ int argc, char *argv[])
+{
+ struct module *newmod;
+ char *p;
+ grub_ssize_t len = 0;
+ int i;
+
+ newmod = grub_malloc (sizeof (*newmod));
+ if (!newmod)
+ return grub_errno;
+ newmod->start = start;
+ newmod->size = size;
+
+ for (i = 0; i < argc; i++)
+ len += grub_strlen (argv[i]) + 1;
+
+ if (len == 0)
+ len = 1;
+
+ newmod->cmdline = p = grub_malloc (len);
+ if (! newmod->cmdline)
+ {
+ grub_free (newmod);
+ return grub_errno;
+ }
+ newmod->cmdline_size = len;
+ total_modcmd += ALIGN_UP (len, MULTIBOOT_TAG_ALIGN);
+
+ for (i = 0; i < argc; i++)
+ {
+ p = grub_stpcpy (p, argv[i]);
+ *(p++) = ' ';
+ }
+
+ /* Remove the space after the last word. */
+ if (p != newmod->cmdline)
+ p--;
+ *p = '\0';
+
+ if (modules_last)
+ modules_last->next = newmod;
+ else
+ {
+ modules = newmod;
+ modules_last->next = NULL;
+ }
+ modules_last = newmod;
+
+ modcnt++;
+
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_multiboot_set_bootdev (void)
+{
+ grub_device_t dev;
+
+ slice = ~0;
+ part = ~0;
+
+#ifdef GRUB_MACHINE_PCBIOS
+ biosdev = grub_get_root_biosnumber ();
+#else
+ biosdev = 0xffffffff;
+#endif
+
+ if (biosdev == 0xffffffff)
+ return;
+
+ dev = grub_device_open (0);
+ if (dev && dev->disk && dev->disk->partition)
+ {
+ if (dev->disk->partition->parent)
+ {
+ part = dev->disk->partition->number;
+ slice = dev->disk->partition->parent->number;
+ }
+ else
+ slice = dev->disk->partition->number;
+ }
+ if (dev)
+ grub_device_close (dev);
+
+ bootdev_set = 1;
+}
diff --git a/grub-core/loader/powerpc/ieee1275/linux.c b/grub-core/loader/powerpc/ieee1275/linux.c
new file mode 100644
index 0000000..12a3fa9
--- /dev/null
+++ b/grub-core/loader/powerpc/ieee1275/linux.c
@@ -0,0 +1,385 @@
+/* linux.c - boot Linux */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/elf.h>
+#include <grub/elfload.h>
+#include <grub/loader.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/memory.h>
+#include <grub/lib/cmdline.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define ELF32_LOADMASK (0xc0000000UL)
+#define ELF64_LOADMASK (0xc000000000000000ULL)
+
+static grub_dl_t my_mod;
+
+static int loaded;
+
+static grub_addr_t initrd_addr;
+static grub_size_t initrd_size;
+
+static grub_addr_t linux_addr;
+static grub_size_t linux_size;
+
+static char *linux_args;
+
+typedef void (*kernel_entry_t) (void *, unsigned long, int (void *),
+ unsigned long, unsigned long);
+
+static grub_addr_t
+grub_linux_claimmap_iterate (grub_addr_t target, grub_size_t size,
+ grub_size_t align)
+{
+ grub_addr_t found_addr = (grub_addr_t) -1;
+
+ auto int NESTED_FUNC_ATTR alloc_mem (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type);
+ int NESTED_FUNC_ATTR alloc_mem (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type)
+ {
+ grub_uint64_t end = addr + len;
+ addr = ALIGN_UP (addr, align);
+ target = ALIGN_UP (target, align);
+
+ /* Target above the memory chunk. */
+ if (type != GRUB_MEMORY_AVAILABLE || target > end)
+ return 0;
+
+ /* Target inside the memory chunk. */
+ if (target >= addr && target < end && size <= end - target)
+ {
+ if (grub_claimmap (target, size) == GRUB_ERR_NONE)
+ {
+ found_addr = target;
+ return 1;
+ }
+ }
+ /* Target below the memory chunk. */
+ if (target < addr && addr + size <= end)
+ {
+ if (grub_claimmap (addr, size) == GRUB_ERR_NONE)
+ {
+ found_addr = addr;
+ return 1;
+ }
+ }
+ return 0;
+ }
+
+ grub_machine_mmap_iterate (alloc_mem);
+
+ return found_addr;
+}
+
+static grub_err_t
+grub_linux_boot (void)
+{
+ kernel_entry_t linuxmain;
+ grub_ssize_t actual;
+
+ /* Set the command line arguments. */
+ grub_ieee1275_set_property (grub_ieee1275_chosen, "bootargs", linux_args,
+ grub_strlen (linux_args) + 1, &actual);
+
+ grub_dprintf ("loader", "Entry point: 0x%x\n", linux_addr);
+ grub_dprintf ("loader", "Initrd at: 0x%x, size 0x%x\n", initrd_addr,
+ initrd_size);
+ grub_dprintf ("loader", "Boot arguments: %s\n", linux_args);
+ grub_dprintf ("loader", "Jumping to Linux...\n");
+
+ /* Boot the kernel. */
+ linuxmain = (kernel_entry_t) linux_addr;
+ linuxmain ((void *) initrd_addr, initrd_size, grub_ieee1275_entry_fn, 0, 0);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_linux_release_mem (void)
+{
+ grub_free (linux_args);
+ linux_args = 0;
+
+ if (linux_addr && grub_ieee1275_release (linux_addr, linux_size))
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot release memory");
+
+ if (initrd_addr && grub_ieee1275_release (initrd_addr, initrd_size))
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot release memory");
+
+ linux_addr = 0;
+ initrd_addr = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_linux_unload (void)
+{
+ grub_err_t err;
+
+ err = grub_linux_release_mem ();
+ grub_dl_unref (my_mod);
+
+ loaded = 0;
+
+ return err;
+}
+
+static grub_err_t
+grub_linux_load32 (grub_elf_t elf)
+{
+ Elf32_Addr base_addr;
+ grub_addr_t seg_addr;
+ grub_uint32_t align;
+ grub_uint32_t offset;
+ Elf32_Addr entry;
+
+ linux_size = grub_elf32_size (elf, &base_addr, &align);
+ if (linux_size == 0)
+ return grub_errno;
+ /* Pad it; the kernel scribbles over memory beyond its load address. */
+ linux_size += 0x100000;
+
+ /* Linux's entry point incorrectly contains a virtual address. */
+ entry = elf->ehdr.ehdr32.e_entry & ~ELF32_LOADMASK;
+
+ /* Linux's incorrectly contains a virtual address. */
+ base_addr &= ~ELF32_LOADMASK;
+ offset = entry - base_addr;
+
+ /* On some systems, firmware occupies the memory we're trying to use.
+ * Happily, Linux can be loaded anywhere (it relocates itself). Iterate
+ * until we find an open area. */
+ seg_addr = grub_linux_claimmap_iterate (base_addr & ~ELF32_LOADMASK, linux_size, align);
+ if (seg_addr == (grub_addr_t) -1)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't claim memory");
+
+ linux_addr = seg_addr + offset;
+
+ /* Now load the segments into the area we claimed. */
+ auto grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load);
+ grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr, int *do_load)
+ {
+ if (phdr->p_type != PT_LOAD)
+ {
+ *do_load = 0;
+ return 0;
+ }
+ *do_load = 1;
+
+ *addr = (phdr->p_paddr - base_addr) + seg_addr;
+ return 0;
+ }
+ return grub_elf32_load (elf, offset_phdr, 0, 0);
+}
+
+static grub_err_t
+grub_linux_load64 (grub_elf_t elf)
+{
+ Elf64_Addr base_addr;
+ grub_addr_t seg_addr;
+ grub_uint64_t align;
+ grub_uint64_t offset;
+ Elf64_Addr entry;
+
+ linux_size = grub_elf64_size (elf, &base_addr, &align);
+ if (linux_size == 0)
+ return grub_errno;
+ /* Pad it; the kernel scribbles over memory beyond its load address. */
+ linux_size += 0x100000;
+
+ base_addr &= ~ELF64_LOADMASK;
+ entry = elf->ehdr.ehdr64.e_entry & ~ELF64_LOADMASK;
+ offset = entry - base_addr;
+ /* Linux's incorrectly contains a virtual address. */
+
+ /* On some systems, firmware occupies the memory we're trying to use.
+ * Happily, Linux can be loaded anywhere (it relocates itself). Iterate
+ * until we find an open area. */
+ seg_addr = grub_linux_claimmap_iterate (base_addr & ~ELF64_LOADMASK, linux_size, align);
+ if (seg_addr == (grub_addr_t) -1)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't claim memory");
+
+ linux_addr = seg_addr + offset;
+
+ /* Now load the segments into the area we claimed. */
+ auto grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load);
+ grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load)
+ {
+ if (phdr->p_type != PT_LOAD)
+ {
+ *do_load = 0;
+ return 0;
+ }
+ *do_load = 1;
+
+ *addr = (phdr->p_paddr - base_addr) + seg_addr;
+ return 0;
+ }
+ return grub_elf64_load (elf, offset_phdr, 0, 0);
+}
+
+static grub_err_t
+grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_elf_t elf = 0;
+ int size;
+
+ grub_dl_ref (my_mod);
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
+ goto out;
+ }
+
+ elf = grub_elf_open (argv[0]);
+ if (! elf)
+ goto out;
+
+ if (elf->ehdr.ehdr32.e_type != ET_EXEC && elf->ehdr.ehdr32.e_type != ET_DYN)
+ {
+ grub_error (GRUB_ERR_UNKNOWN_OS,
+ "this ELF file is not of the right type");
+ goto out;
+ }
+
+ /* Release the previously used memory. */
+ grub_loader_unset ();
+
+ if (grub_elf_is_elf32 (elf))
+ grub_linux_load32 (elf);
+ else
+ if (grub_elf_is_elf64 (elf))
+ grub_linux_load64 (elf);
+ else
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "unknown ELF class");
+ goto out;
+ }
+
+ size = grub_loader_cmdline_size(argc, argv);
+ linux_args = grub_malloc (size + sizeof (LINUX_IMAGE));
+ if (! linux_args)
+ goto out;
+
+ /* Create kernel command line. */
+ grub_memcpy (linux_args, LINUX_IMAGE, sizeof (LINUX_IMAGE));
+ grub_create_loader_cmdline (argc, argv, linux_args + sizeof (LINUX_IMAGE) - 1,
+ size);
+
+out:
+
+ if (elf)
+ grub_elf_close (elf);
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_linux_release_mem ();
+ grub_dl_unref (my_mod);
+ loaded = 0;
+ }
+ else
+ {
+ grub_loader_set (grub_linux_boot, grub_linux_unload, 1);
+ initrd_addr = 0;
+ loaded = 1;
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_ssize_t size;
+ grub_addr_t first_addr;
+ grub_addr_t addr;
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no initrd specified");
+ goto fail;
+ }
+
+ if (!loaded)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
+ goto fail;
+ }
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (argv[0]);
+ if (! file)
+ goto fail;
+
+ first_addr = linux_addr + linux_size;
+ size = grub_file_size (file);
+
+ /* Attempt to claim at a series of addresses until successful in
+ the same way that grub_rescue_cmd_linux does. */
+ addr = grub_linux_claimmap_iterate (first_addr, size, 0x100000);
+ if (addr == (grub_addr_t) -1)
+ goto fail;
+
+ grub_dprintf ("loader", "Loading initrd at 0x%x, size 0x%x\n", addr, size);
+
+ if (grub_file_read (file, (void *) addr, size) != size)
+ {
+ grub_ieee1275_release (addr, size);
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ goto fail;
+ }
+
+ initrd_addr = addr;
+ initrd_size = size;
+
+ fail:
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static grub_command_t cmd_linux, cmd_initrd;
+
+GRUB_MOD_INIT(linux)
+{
+ cmd_linux = grub_register_command ("linux", grub_cmd_linux,
+ 0, N_("Load Linux."));
+ cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
+ 0, N_("Load initrd."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(linux)
+{
+ grub_unregister_command (cmd_linux);
+ grub_unregister_command (cmd_initrd);
+}
diff --git a/grub-core/loader/sparc64/ieee1275/linux.c b/grub-core/loader/sparc64/ieee1275/linux.c
new file mode 100644
index 0000000..8ed61f8
--- /dev/null
+++ b/grub-core/loader/sparc64/ieee1275/linux.c
@@ -0,0 +1,525 @@
+/* linux.c - boot Linux */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/elf.h>
+#include <grub/elfload.h>
+#include <grub/loader.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/ieee1275/ieee1275.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+#include <grub/memory.h>
+#include <grub/lib/cmdline.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_dl_t my_mod;
+
+static int loaded;
+
+/* /virtual-memory/translations property layout */
+struct grub_ieee1275_translation {
+ grub_uint64_t vaddr;
+ grub_uint64_t size;
+ grub_uint64_t data;
+};
+
+static struct grub_ieee1275_translation *of_trans;
+static int of_num_trans;
+
+static grub_addr_t phys_base;
+static grub_addr_t grub_phys_start;
+static grub_addr_t grub_phys_end;
+
+static grub_addr_t initrd_addr;
+static grub_addr_t initrd_paddr;
+static grub_size_t initrd_size;
+
+static Elf64_Addr linux_entry;
+static grub_addr_t linux_addr;
+static grub_addr_t linux_paddr;
+static grub_size_t linux_size;
+
+static char *linux_args;
+
+struct linux_bootstr_info {
+ int len, valid;
+ char buf[];
+};
+
+struct linux_hdrs {
+ /* All HdrS versions support these fields. */
+ unsigned int start_insns[2];
+ char magic[4]; /* "HdrS" */
+ unsigned int linux_kernel_version; /* LINUX_VERSION_CODE */
+ unsigned short hdrs_version;
+ unsigned short root_flags;
+ unsigned short root_dev;
+ unsigned short ram_flags;
+ unsigned int __deprecated_ramdisk_image;
+ unsigned int ramdisk_size;
+
+ /* HdrS versions 0x0201 and higher only */
+ char *reboot_command;
+
+ /* HdrS versions 0x0202 and higher only */
+ struct linux_bootstr_info *bootstr_info;
+
+ /* HdrS versions 0x0301 and higher only */
+ unsigned long ramdisk_image;
+};
+
+static grub_err_t
+grub_linux_boot (void)
+{
+ struct linux_bootstr_info *bp;
+ struct linux_hdrs *hp;
+ grub_addr_t addr;
+
+ hp = (struct linux_hdrs *) linux_addr;
+
+ /* Any pointer we dereference in the kernel image must be relocated
+ to where we actually loaded the kernel. */
+ addr = (grub_addr_t) hp->bootstr_info;
+ addr += (linux_addr - linux_entry);
+ bp = (struct linux_bootstr_info *) addr;
+
+ /* Set the command line arguments, unless the kernel has been
+ built with a fixed CONFIG_CMDLINE. */
+ if (!bp->valid)
+ {
+ int len = grub_strlen (linux_args) + 1;
+ if (bp->len < len)
+ len = bp->len;
+ memcpy(bp->buf, linux_args, len);
+ bp->buf[len-1] = '\0';
+ bp->valid = 1;
+ }
+
+ if (initrd_addr)
+ {
+ /* The kernel expects the physical address, adjusted relative
+ to the lowest address advertised in "/memory"'s available
+ property.
+
+ The history of this is that back when the kernel only supported
+ specifying a 32-bit ramdisk address, this was the way to still
+ be able to specify the ramdisk physical address even if memory
+ started at some place above 4GB.
+
+ The magic 0x400000 is KERNBASE, I have no idea why SILO adds
+ that term into the address, but it does and thus we have to do
+ it too as this is what the kernel expects. */
+ hp->ramdisk_image = initrd_paddr - phys_base + 0x400000;
+ hp->ramdisk_size = initrd_size;
+ }
+
+ grub_dprintf ("loader", "Entry point: 0x%lx\n", linux_addr);
+ grub_dprintf ("loader", "Initrd at: 0x%lx, size 0x%lx\n", initrd_addr,
+ initrd_size);
+ grub_dprintf ("loader", "Boot arguments: %s\n", linux_args);
+ grub_dprintf ("loader", "Jumping to Linux...\n");
+
+ /* Boot the kernel. */
+ asm volatile ("sethi %hi(grub_ieee1275_entry_fn), %o1\n"
+ "ldx [%o1 + %lo(grub_ieee1275_entry_fn)], %o4\n"
+ "sethi %hi(grub_ieee1275_original_stack), %o1\n"
+ "ldx [%o1 + %lo(grub_ieee1275_original_stack)], %o6\n"
+ "sethi %hi(linux_addr), %o1\n"
+ "ldx [%o1 + %lo(linux_addr)], %o5\n"
+ "mov %g0, %o0\n"
+ "mov %g0, %o2\n"
+ "mov %g0, %o3\n"
+ "jmp %o5\n"
+ "mov %g0, %o1\n");
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_linux_release_mem (void)
+{
+ grub_free (linux_args);
+ linux_args = 0;
+ linux_addr = 0;
+ initrd_addr = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_linux_unload (void)
+{
+ grub_err_t err;
+
+ err = grub_linux_release_mem ();
+ grub_dl_unref (my_mod);
+
+ loaded = 0;
+
+ return err;
+}
+
+#define FOUR_MB (4 * 1024 * 1024)
+
+static grub_addr_t
+alloc_phys (grub_addr_t size)
+{
+ grub_addr_t ret = (grub_addr_t) -1;
+
+ auto int NESTED_FUNC_ATTR choose (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type);
+ int NESTED_FUNC_ATTR choose (grub_uint64_t addr, grub_uint64_t len,
+ grub_memory_type_t type)
+ {
+ grub_addr_t end = addr + len;
+
+ if (type != 1)
+ return 0;
+
+ addr = ALIGN_UP (addr, FOUR_MB);
+ if (addr + size >= end)
+ return 0;
+
+ if (addr >= grub_phys_start && addr < grub_phys_end)
+ {
+ addr = ALIGN_UP (grub_phys_end, FOUR_MB);
+ if (addr + size >= end)
+ return 0;
+ }
+ if ((addr + size) >= grub_phys_start
+ && (addr + size) < grub_phys_end)
+ {
+ addr = ALIGN_UP (grub_phys_end, FOUR_MB);
+ if (addr + size >= end)
+ return 0;
+ }
+
+ if (loaded)
+ {
+ grub_addr_t linux_end = ALIGN_UP (linux_paddr + linux_size, FOUR_MB);
+
+ if (addr >= linux_paddr && addr < linux_end)
+ {
+ addr = linux_end;
+ if (addr + size >= end)
+ return 0;
+ }
+ if ((addr + size) >= linux_paddr
+ && (addr + size) < linux_end)
+ {
+ addr = linux_end;
+ if (addr + size >= end)
+ return 0;
+ }
+ }
+
+ ret = addr;
+ return 1;
+ }
+
+ grub_machine_mmap_iterate (choose);
+
+ return ret;
+}
+
+static grub_err_t
+grub_linux_load64 (grub_elf_t elf)
+{
+ grub_addr_t off, paddr, base;
+ int ret;
+
+ linux_entry = elf->ehdr.ehdr64.e_entry;
+ linux_addr = 0x40004000;
+ off = 0x4000;
+ linux_size = grub_elf64_size (elf, 0, 0);
+ if (linux_size == 0)
+ return grub_errno;
+
+ grub_dprintf ("loader", "Attempting to claim at 0x%lx, size 0x%lx.\n",
+ linux_addr, linux_size);
+
+ paddr = alloc_phys (linux_size + off);
+ if (paddr == (grub_addr_t) -1)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate physical memory");
+ ret = grub_ieee1275_map (paddr, linux_addr - off,
+ linux_size + off, IEEE1275_MAP_DEFAULT);
+ if (ret)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't map physical memory");
+
+ grub_dprintf ("loader", "Loading Linux at vaddr 0x%lx, paddr 0x%lx, size 0x%lx\n",
+ linux_addr, paddr, linux_size);
+
+ linux_paddr = paddr;
+
+ base = linux_entry - off;
+
+ /* Now load the segments into the area we claimed. */
+ auto grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load);
+ grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr, int *do_load)
+ {
+ if (phdr->p_type != PT_LOAD)
+ {
+ *do_load = 0;
+ return 0;
+ }
+ *do_load = 1;
+
+ /* Adjust the program load address to linux_addr. */
+ *addr = (phdr->p_paddr - base) + (linux_addr - off);
+ return 0;
+ }
+ return grub_elf64_load (elf, offset_phdr, 0, 0);
+}
+
+static grub_err_t
+grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_elf_t elf = 0;
+ int size;
+
+ grub_dl_ref (my_mod);
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no kernel specified");
+ goto out;
+ }
+
+ file = grub_file_open (argv[0]);
+ if (!file)
+ goto out;
+
+ elf = grub_elf_file (file);
+ if (! elf)
+ goto out;
+
+ if (elf->ehdr.ehdr32.e_type != ET_EXEC)
+ {
+ grub_error (GRUB_ERR_UNKNOWN_OS,
+ "this ELF file is not of the right type");
+ goto out;
+ }
+
+ /* Release the previously used memory. */
+ grub_loader_unset ();
+
+ if (grub_elf_is_elf64 (elf))
+ grub_linux_load64 (elf);
+ else
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "unknown ELF class");
+ goto out;
+ }
+
+ size = grub_loader_cmdline_size(argc, argv);
+
+ linux_args = grub_malloc (size + sizeof (LINUX_IMAGE));
+ if (! linux_args)
+ goto out;
+
+ /* Create kernel command line. */
+ grub_memcpy (linux_args, LINUX_IMAGE, sizeof (LINUX_IMAGE));
+ grub_create_loader_cmdline (argc, argv, linux_args + sizeof (LINUX_IMAGE) - 1,
+ size);
+
+out:
+ if (elf)
+ grub_elf_close (elf);
+ else if (file)
+ grub_file_close (file);
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_linux_release_mem ();
+ grub_dl_unref (my_mod);
+ loaded = 0;
+ }
+ else
+ {
+ grub_loader_set (grub_linux_boot, grub_linux_unload, 1);
+ initrd_addr = 0;
+ loaded = 1;
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ grub_file_t file = 0;
+ grub_ssize_t size;
+ grub_addr_t paddr;
+ grub_addr_t addr;
+ int ret;
+
+ if (argc == 0)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "no initrd specified");
+ goto fail;
+ }
+
+ if (!loaded)
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT, "you need to load the kernel first");
+ goto fail;
+ }
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (argv[0]);
+ if (! file)
+ goto fail;
+
+ addr = 0x60000000;
+ size = grub_file_size (file);
+
+ paddr = alloc_phys (size);
+ if (paddr == (grub_addr_t) -1)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate physical memory");
+ goto fail;
+ }
+ ret = grub_ieee1275_map (paddr, addr, size, IEEE1275_MAP_DEFAULT);
+ if (ret)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't map physical memory");
+ goto fail;
+ }
+
+ grub_dprintf ("loader", "Loading initrd at vaddr 0x%lx, paddr 0x%lx, size 0x%lx\n",
+ addr, paddr, size);
+
+ if (grub_file_read (file, (void *) addr, size) != size)
+ {
+ grub_error (GRUB_ERR_FILE_READ_ERROR, "couldn't read file");
+ goto fail;
+ }
+
+ initrd_addr = addr;
+ initrd_paddr = paddr;
+ initrd_size = size;
+
+ fail:
+ if (file)
+ grub_file_close (file);
+
+ return grub_errno;
+}
+
+static void
+determine_phys_base (void)
+{
+ auto int NESTED_FUNC_ATTR get_physbase (grub_uint64_t addr, grub_uint64_t len __attribute__((unused)), grub_uint32_t type);
+ int NESTED_FUNC_ATTR get_physbase (grub_uint64_t addr, grub_uint64_t len __attribute__((unused)), grub_uint32_t type)
+ {
+ if (type != 1)
+ return 0;
+ if (addr < phys_base)
+ phys_base = addr;
+ return 0;
+ }
+
+ phys_base = ~(grub_uint64_t) 0;
+ grub_machine_mmap_iterate (get_physbase);
+}
+
+static void
+fetch_translations (void)
+{
+ grub_ieee1275_phandle_t node;
+ grub_ssize_t actual;
+ int i;
+
+ if (grub_ieee1275_finddevice ("/virtual-memory", &node))
+ {
+ grub_printf ("Cannot find /virtual-memory node.\n");
+ return;
+ }
+
+ if (grub_ieee1275_get_property_length (node, "translations", &actual))
+ {
+ grub_printf ("Cannot find /virtual-memory/translations size.\n");
+ return;
+ }
+
+ of_trans = grub_malloc (actual);
+ if (!of_trans)
+ {
+ grub_printf ("Cannot allocate translations buffer.\n");
+ return;
+ }
+
+ if (grub_ieee1275_get_property (node, "translations", of_trans, actual, &actual))
+ {
+ grub_printf ("Cannot fetch /virtual-memory/translations property.\n");
+ return;
+ }
+
+ of_num_trans = actual / sizeof(struct grub_ieee1275_translation);
+
+ for (i = 0; i < of_num_trans; i++)
+ {
+ struct grub_ieee1275_translation *p = &of_trans[i];
+
+ if (p->vaddr == 0x2000)
+ {
+ grub_addr_t phys, tte = p->data;
+
+ phys = tte & ~(0xff00000000001fffULL);
+
+ grub_phys_start = phys;
+ grub_phys_end = grub_phys_start + p->size;
+ grub_dprintf ("loader", "Grub lives at phys_start[%lx] phys_end[%lx]\n",
+ (unsigned long) grub_phys_start,
+ (unsigned long) grub_phys_end);
+ break;
+ }
+ }
+}
+
+
+static grub_command_t cmd_linux, cmd_initrd;
+
+GRUB_MOD_INIT(linux)
+{
+ determine_phys_base ();
+ fetch_translations ();
+
+ cmd_linux = grub_register_command ("linux", grub_cmd_linux,
+ 0, N_("Load Linux."));
+ cmd_initrd = grub_register_command ("initrd", grub_cmd_initrd,
+ 0, N_("Load initrd."));
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(linux)
+{
+ grub_unregister_command (cmd_linux);
+ grub_unregister_command (cmd_initrd);
+}
diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
new file mode 100644
index 0000000..a98d60c
--- /dev/null
+++ b/grub-core/loader/xnu.c
@@ -0,0 +1,1498 @@
+/* xnu.c - load xnu kernel. Thanks to Florian Idelberger for all the
+ time he spent testing this
+ */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/file.h>
+#include <grub/xnu.h>
+#include <grub/cpu/xnu.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/loader.h>
+#include <grub/machoload.h>
+#include <grub/macho.h>
+#include <grub/cpu/macho.h>
+#include <grub/command.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/env.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#if defined (__i386) && !defined (GRUB_MACHINE_EFI)
+#include <grub/autoefi.h>
+#endif
+
+struct grub_xnu_devtree_key *grub_xnu_devtree_root = 0;
+static int driverspackagenum = 0;
+static int driversnum = 0;
+int grub_xnu_is_64bit = 0;
+
+grub_addr_t grub_xnu_heap_target_start = 0;
+grub_size_t grub_xnu_heap_size = 0;
+struct grub_relocator *grub_xnu_relocator;
+
+static grub_err_t
+grub_xnu_register_memory (char *prefix, int *suffix,
+ grub_addr_t addr, grub_size_t size);
+grub_err_t
+grub_xnu_heap_malloc (int size, void **src, grub_addr_t *target)
+{
+ grub_err_t err;
+ grub_relocator_chunk_t ch;
+
+ err = grub_relocator_alloc_chunk_addr (grub_xnu_relocator, &ch,
+ grub_xnu_heap_target_start
+ + grub_xnu_heap_size, size);
+ if (err)
+ return err;
+
+ *src = get_virtual_current_address (ch);
+ *target = grub_xnu_heap_target_start + grub_xnu_heap_size;
+ grub_xnu_heap_size += size;
+ grub_dprintf ("xnu", "val=%p\n", *src);
+ return GRUB_ERR_NONE;
+}
+
+/* Make sure next block of the heap will be aligned.
+ Please notice: aligned are pointers AFTER relocation
+ and not the current ones. */
+grub_err_t
+grub_xnu_align_heap (int align)
+{
+ grub_xnu_heap_size
+ = ALIGN_UP (grub_xnu_heap_target_start+ grub_xnu_heap_size, align)
+ - grub_xnu_heap_target_start;
+ return GRUB_ERR_NONE;
+}
+
+/* Free subtree pointed by CUR. */
+void
+grub_xnu_free_devtree (struct grub_xnu_devtree_key *cur)
+{
+ struct grub_xnu_devtree_key *d;
+ while (cur)
+ {
+ grub_free (cur->name);
+ if (cur->datasize == -1)
+ grub_xnu_free_devtree (cur->first_child);
+ else if (cur->data)
+ grub_free (cur->data);
+ d = cur->next;
+ grub_free (cur);
+ cur = d;
+ }
+}
+
+/* Compute the size of device tree in xnu format. */
+static grub_size_t
+grub_xnu_writetree_get_size (struct grub_xnu_devtree_key *start, char *name)
+{
+ grub_size_t ret;
+ struct grub_xnu_devtree_key *cur;
+
+ /* Key header. */
+ ret = 2 * sizeof (grub_uint32_t);
+
+ /* "name" value. */
+ ret += 32 + sizeof (grub_uint32_t)
+ + grub_strlen (name) + 4
+ - (grub_strlen (name) % 4);
+
+ for (cur = start; cur; cur = cur->next)
+ if (cur->datasize != -1)
+ {
+ int align_overhead;
+
+ align_overhead = 4 - (cur->datasize % 4);
+ if (align_overhead == 4)
+ align_overhead = 0;
+ ret += 32 + sizeof (grub_uint32_t) + cur->datasize + align_overhead;
+ }
+ else
+ ret += grub_xnu_writetree_get_size (cur->first_child, cur->name);
+ return ret;
+}
+
+/* Write devtree in XNU format at curptr assuming the head is named NAME.*/
+static void *
+grub_xnu_writetree_toheap_real (void *curptr,
+ struct grub_xnu_devtree_key *start, char *name)
+{
+ struct grub_xnu_devtree_key *cur;
+ int nkeys = 0, nvals = 0;
+ for (cur = start; cur; cur = cur->next)
+ {
+ if (cur->datasize == -1)
+ nkeys++;
+ else
+ nvals++;
+ }
+ /* For the name. */
+ nvals++;
+
+ *((grub_uint32_t *) curptr) = nvals;
+ curptr = ((grub_uint32_t *) curptr) + 1;
+ *((grub_uint32_t *) curptr) = nkeys;
+ curptr = ((grub_uint32_t *) curptr) + 1;
+
+ /* First comes "name" value. */
+ grub_memset (curptr, 0, 32);
+ grub_memcpy (curptr, "name", 4);
+ curptr = ((grub_uint8_t *) curptr) + 32;
+ *((grub_uint32_t *)curptr) = grub_strlen (name) + 1;
+ curptr = ((grub_uint32_t *) curptr) + 1;
+ grub_memcpy (curptr, name, grub_strlen (name));
+ curptr = ((grub_uint8_t *) curptr) + grub_strlen (name);
+ grub_memset (curptr, 0, 4 - (grub_strlen (name) % 4));
+ curptr = ((grub_uint8_t *) curptr) + (4 - (grub_strlen (name) % 4));
+
+ /* Then the other values. */
+ for (cur = start; cur; cur = cur->next)
+ if (cur->datasize != -1)
+ {
+ int align_overhead;
+
+ align_overhead = 4 - (cur->datasize % 4);
+ if (align_overhead == 4)
+ align_overhead = 0;
+ grub_memset (curptr, 0, 32);
+ grub_strncpy (curptr, cur->name, 31);
+ curptr = ((grub_uint8_t *) curptr) + 32;
+ *((grub_uint32_t *) curptr) = cur->datasize;
+ curptr = ((grub_uint32_t *) curptr) + 1;
+ grub_memcpy (curptr, cur->data, cur->datasize);
+ curptr = ((grub_uint8_t *) curptr) + cur->datasize;
+ grub_memset (curptr, 0, align_overhead);
+ curptr = ((grub_uint8_t *) curptr) + align_overhead;
+ }
+
+ /* And then the keys. Recursively use this function. */
+ for (cur = start; cur; cur = cur->next)
+ if (cur->datasize == -1)
+ if (!(curptr = grub_xnu_writetree_toheap_real (curptr,
+ cur->first_child,
+ cur->name)))
+ return 0;
+ return curptr;
+}
+
+grub_err_t
+grub_xnu_writetree_toheap (grub_addr_t *target, grub_size_t *size)
+{
+ struct grub_xnu_devtree_key *chosen;
+ struct grub_xnu_devtree_key *memorymap;
+ struct grub_xnu_devtree_key *driverkey;
+ struct grub_xnu_extdesc *extdesc;
+ grub_err_t err;
+ void *src;
+
+ err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
+ if (err)
+ return err;
+
+ /* Device tree itself is in the memory map of device tree. */
+ /* Create a dummy value in memory-map. */
+ chosen = grub_xnu_create_key (&grub_xnu_devtree_root, "chosen");
+ if (! chosen)
+ return grub_errno;
+ memorymap = grub_xnu_create_key (&(chosen->first_child), "memory-map");
+ if (! memorymap)
+ return grub_errno;
+
+ driverkey = (struct grub_xnu_devtree_key *) grub_malloc (sizeof (*driverkey));
+ if (! driverkey)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't write device tree");
+ driverkey->name = grub_strdup ("DeviceTree");
+ if (! driverkey->name)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't write device tree");
+ driverkey->datasize = sizeof (*extdesc);
+ driverkey->next = memorymap->first_child;
+ memorymap->first_child = driverkey;
+ driverkey->data = extdesc
+ = (struct grub_xnu_extdesc *) grub_malloc (sizeof (*extdesc));
+ if (! driverkey->data)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't write device tree");
+
+ /* Allocate the space based on the size with dummy value. */
+ *size = grub_xnu_writetree_get_size (grub_xnu_devtree_root, "/");
+ err = grub_xnu_heap_malloc (ALIGN_UP (*size + 1, GRUB_XNU_PAGESIZE),
+ &src, target);
+ if (err)
+ return err;
+
+ /* Put real data in the dummy. */
+ extdesc->addr = *target;
+ extdesc->size = (grub_uint32_t) *size;
+
+ /* Write the tree to heap. */
+ grub_xnu_writetree_toheap_real (src, grub_xnu_devtree_root, "/");
+ return GRUB_ERR_NONE;
+}
+
+/* Find a key or value in parent key. */
+struct grub_xnu_devtree_key *
+grub_xnu_find_key (struct grub_xnu_devtree_key *parent, char *name)
+{
+ struct grub_xnu_devtree_key *cur;
+ for (cur = parent; cur; cur = cur->next)
+ if (grub_strcmp (cur->name, name) == 0)
+ return cur;
+ return 0;
+}
+
+struct grub_xnu_devtree_key *
+grub_xnu_create_key (struct grub_xnu_devtree_key **parent, char *name)
+{
+ struct grub_xnu_devtree_key *ret;
+ ret = grub_xnu_find_key (*parent, name);
+ if (ret)
+ return ret;
+ ret = (struct grub_xnu_devtree_key *) grub_zalloc (sizeof (*ret));
+ if (! ret)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't create key %s", name);
+ return 0;
+ }
+ ret->name = grub_strdup (name);
+ if (! ret->name)
+ {
+ grub_free (ret);
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't create key %s", name);
+ return 0;
+ }
+ ret->datasize = -1;
+ ret->next = *parent;
+ *parent = ret;
+ return ret;
+}
+
+struct grub_xnu_devtree_key *
+grub_xnu_create_value (struct grub_xnu_devtree_key **parent, char *name)
+{
+ struct grub_xnu_devtree_key *ret;
+ ret = grub_xnu_find_key (*parent, name);
+ if (ret)
+ {
+ if (ret->datasize == -1)
+ grub_xnu_free_devtree (ret->first_child);
+ else if (ret->datasize)
+ grub_free (ret->data);
+ ret->datasize = 0;
+ ret->data = 0;
+ return ret;
+ }
+ ret = (struct grub_xnu_devtree_key *) grub_zalloc (sizeof (*ret));
+ if (! ret)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't create value %s", name);
+ return 0;
+ }
+ ret->name = grub_strdup (name);
+ if (! ret->name)
+ {
+ grub_free (ret);
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't create value %s", name);
+ return 0;
+ }
+ ret->next = *parent;
+ *parent = ret;
+ return ret;
+}
+
+static grub_err_t
+grub_xnu_unload (void)
+{
+ grub_cpu_xnu_unload ();
+
+ grub_xnu_free_devtree (grub_xnu_devtree_root);
+ grub_xnu_devtree_root = 0;
+
+ /* Free loaded image. */
+ driversnum = 0;
+ driverspackagenum = 0;
+ grub_relocator_unload (grub_xnu_relocator);
+ grub_xnu_relocator = NULL;
+ grub_xnu_heap_target_start = 0;
+ grub_xnu_heap_size = 0;
+ grub_xnu_unlock ();
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_xnu_kernel (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_err_t err;
+ grub_macho_t macho;
+ grub_uint32_t startcode, endcode;
+ int i;
+ char *ptr;
+ void *loadaddr;
+ grub_addr_t loadaddr_target;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ grub_xnu_unload ();
+
+ macho = grub_macho_open (args[0]);
+ if (! macho)
+ return grub_errno;
+ if (! grub_macho_contains_macho32 (macho))
+ {
+ grub_macho_close (macho);
+ return grub_error (GRUB_ERR_BAD_OS,
+ "kernel doesn't contain suitable 32-bit architecture");
+ }
+
+ err = grub_macho_size32 (macho, &startcode, &endcode, GRUB_MACHO_NOBSS);
+ if (err)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return err;
+ }
+
+ grub_dprintf ("xnu", "endcode = %lx, startcode = %lx\n",
+ (unsigned long) endcode, (unsigned long) startcode);
+
+ grub_xnu_relocator = grub_relocator_new ();
+ if (!grub_xnu_relocator)
+ return grub_errno;
+ grub_xnu_heap_target_start = startcode;
+ err = grub_xnu_heap_malloc (endcode - startcode, &loadaddr,
+ &loadaddr_target);
+
+ if (err)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return err;
+ }
+
+ /* Load kernel. */
+ err = grub_macho_load32 (macho, (char *) loadaddr - startcode,
+ GRUB_MACHO_NOBSS);
+ if (err)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return err;
+ }
+
+ grub_xnu_entry_point = grub_macho_get_entry_point32 (macho);
+ if (! grub_xnu_entry_point)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't find entry point");
+ }
+
+ grub_macho_close (macho);
+
+ err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
+ if (err)
+ {
+ grub_xnu_unload ();
+ return err;
+ }
+
+ /* Copy parameters to kernel command line. */
+ ptr = grub_xnu_cmdline;
+ for (i = 1; i < argc; i++)
+ {
+ if (ptr + grub_strlen (args[i]) + 1
+ >= grub_xnu_cmdline + sizeof (grub_xnu_cmdline))
+ break;
+ grub_memcpy (ptr, args[i], grub_strlen (args[i]));
+ ptr += grub_strlen (args[i]);
+ *ptr = ' ';
+ ptr++;
+ }
+
+ /* Replace last space by '\0'. */
+ if (ptr != grub_xnu_cmdline)
+ *(ptr - 1) = 0;
+
+#if defined (__i386) && !defined (GRUB_MACHINE_EFI)
+ err = grub_efiemu_autocore ();
+ if (err)
+ return err;
+#endif
+
+ grub_loader_set (grub_xnu_boot, grub_xnu_unload, 0);
+
+ grub_xnu_lock ();
+ grub_xnu_is_64bit = 0;
+
+ return 0;
+}
+
+static grub_err_t
+grub_cmd_xnu_kernel64 (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_err_t err;
+ grub_macho_t macho;
+ grub_uint64_t startcode, endcode;
+ int i;
+ char *ptr;
+ void *loadaddr;
+ grub_addr_t loadaddr_target;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ grub_xnu_unload ();
+
+ macho = grub_macho_open (args[0]);
+ if (! macho)
+ return grub_errno;
+ if (! grub_macho_contains_macho64 (macho))
+ {
+ grub_macho_close (macho);
+ return grub_error (GRUB_ERR_BAD_OS,
+ "kernel doesn't contain suitable 64-bit architecture");
+ }
+
+ err = grub_macho_size64 (macho, &startcode, &endcode, GRUB_MACHO_NOBSS);
+ if (err)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return err;
+ }
+
+ startcode &= 0x0fffffff;
+ endcode &= 0x0fffffff;
+
+ grub_dprintf ("xnu", "endcode = %lx, startcode = %lx\n",
+ (unsigned long) endcode, (unsigned long) startcode);
+
+ grub_xnu_relocator = grub_relocator_new ();
+ if (!grub_xnu_relocator)
+ return grub_errno;
+ grub_xnu_heap_target_start = startcode;
+ err = grub_xnu_heap_malloc (endcode - startcode, &loadaddr,
+ &loadaddr_target);
+
+ if (err)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return err;
+ }
+
+ /* Load kernel. */
+ err = grub_macho_load64 (macho, (char *) loadaddr - startcode,
+ GRUB_MACHO_NOBSS);
+ if (err)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return err;
+ }
+
+ grub_xnu_entry_point = grub_macho_get_entry_point64 (macho) & 0x0fffffff;
+ if (! grub_xnu_entry_point)
+ {
+ grub_macho_close (macho);
+ grub_xnu_unload ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't find entry point");
+ }
+
+ grub_macho_close (macho);
+
+ err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
+ if (err)
+ {
+ grub_xnu_unload ();
+ return err;
+ }
+
+ /* Copy parameters to kernel command line. */
+ ptr = grub_xnu_cmdline;
+ for (i = 1; i < argc; i++)
+ {
+ if (ptr + grub_strlen (args[i]) + 1
+ >= grub_xnu_cmdline + sizeof (grub_xnu_cmdline))
+ break;
+ grub_memcpy (ptr, args[i], grub_strlen (args[i]));
+ ptr += grub_strlen (args[i]);
+ *ptr = ' ';
+ ptr++;
+ }
+
+ /* Replace last space by '\0'. */
+ if (ptr != grub_xnu_cmdline)
+ *(ptr - 1) = 0;
+
+#if defined (__i386) && !defined (GRUB_MACHINE_EFI)
+ err = grub_efiemu_autocore ();
+ if (err)
+ return err;
+#endif
+
+ grub_loader_set (grub_xnu_boot, grub_xnu_unload, 0);
+
+ grub_xnu_lock ();
+ grub_xnu_is_64bit = 1;
+
+ return 0;
+}
+
+/* Register a memory in a memory map under name PREFIXSUFFIX
+ and increment SUFFIX. */
+static grub_err_t
+grub_xnu_register_memory (char *prefix, int *suffix,
+ grub_addr_t addr, grub_size_t size)
+{
+ struct grub_xnu_devtree_key *chosen;
+ struct grub_xnu_devtree_key *memorymap;
+ struct grub_xnu_devtree_key *driverkey;
+ struct grub_xnu_extdesc *extdesc;
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ chosen = grub_xnu_create_key (&grub_xnu_devtree_root, "chosen");
+ if (! chosen)
+ return grub_errno;
+ memorymap = grub_xnu_create_key (&(chosen->first_child), "memory-map");
+ if (! memorymap)
+ return grub_errno;
+
+ driverkey = (struct grub_xnu_devtree_key *) grub_malloc (sizeof (*driverkey));
+ if (! driverkey)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't register memory");
+ if (suffix)
+ {
+ driverkey->name = grub_xasprintf ("%s%d", prefix, (*suffix)++);
+ if (!driverkey->name)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't register memory");
+ }
+ else
+ driverkey->name = grub_strdup (prefix);
+ if (! driverkey->name)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't register extension");
+ driverkey->datasize = sizeof (*extdesc);
+ driverkey->next = memorymap->first_child;
+ memorymap->first_child = driverkey;
+ driverkey->data = extdesc
+ = (struct grub_xnu_extdesc *) grub_malloc (sizeof (*extdesc));
+ if (! driverkey->data)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "can't register extension");
+ extdesc->addr = addr;
+ extdesc->size = (grub_uint32_t) size;
+ return GRUB_ERR_NONE;
+}
+
+static inline char *
+get_name_ptr (char *name)
+{
+ char *p = name, *p2;
+ /* Skip Info.plist. */
+ p2 = grub_strrchr (p, '/');
+ if (!p2)
+ return name;
+ if (p2 == name)
+ return name + 1;
+ p = p2 - 1;
+
+ p2 = grub_strrchr (p, '/');
+ if (!p2)
+ return name;
+ if (p2 == name)
+ return name + 1;
+ if (grub_memcmp (p2, "/Contents/", sizeof ("/Contents/") - 1) != 0)
+ return p2 + 1;
+
+ p = p2 - 1;
+
+ p2 = grub_strrchr (p, '/');
+ if (!p2)
+ return name;
+ return p2 + 1;
+}
+
+/* Load .kext. */
+static grub_err_t
+grub_xnu_load_driver (char *infoplistname, grub_file_t binaryfile)
+{
+ grub_macho_t macho;
+ grub_err_t err;
+ grub_file_t infoplist;
+ struct grub_xnu_extheader *exthead;
+ int neededspace = sizeof (*exthead);
+ grub_uint8_t *buf;
+ void *buf0;
+ grub_addr_t buf_target;
+ grub_size_t infoplistsize = 0, machosize = 0;
+ char *name, *nameend;
+ int namelen;
+
+ name = get_name_ptr (infoplistname);
+ nameend = grub_strchr (name, '/');
+
+ if (nameend)
+ namelen = nameend - name;
+ else
+ namelen = grub_strlen (name);
+
+ neededspace += namelen + 1;
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ /* Compute the needed space. */
+ if (binaryfile)
+ {
+ macho = grub_macho_file (binaryfile);
+ if (! macho || ! grub_macho_contains_macho32 (macho))
+ {
+ if (macho)
+ grub_macho_close (macho);
+ return grub_error (GRUB_ERR_BAD_OS,
+ "extension doesn't contain suitable architecture");
+ }
+ if (grub_xnu_is_64bit)
+ machosize = grub_macho_filesize64 (macho);
+ else
+ machosize = grub_macho_filesize32 (macho);
+ neededspace += machosize;
+ }
+ else
+ macho = 0;
+
+ if (infoplistname)
+ infoplist = grub_file_open (infoplistname);
+ else
+ infoplist = 0;
+ grub_errno = GRUB_ERR_NONE;
+ if (infoplist)
+ {
+ infoplistsize = grub_file_size (infoplist);
+ neededspace += infoplistsize + 1;
+ }
+ else
+ infoplistsize = 0;
+
+ /* Allocate the space. */
+ err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
+ if (err)
+ return err;
+ err = grub_xnu_heap_malloc (neededspace, &buf0, &buf_target);
+ if (err)
+ return err;
+ buf = buf0;
+
+ exthead = (struct grub_xnu_extheader *) buf;
+ grub_memset (exthead, 0, sizeof (*exthead));
+ buf += sizeof (*exthead);
+
+ /* Load the binary. */
+ if (macho)
+ {
+ exthead->binaryaddr = buf_target + (buf - (grub_uint8_t *) buf0);
+ exthead->binarysize = machosize;
+ if (grub_xnu_is_64bit)
+ err = grub_macho_readfile64 (macho, buf);
+ else
+ err = grub_macho_readfile32 (macho, buf);
+ if (err)
+ {
+ grub_macho_close (macho);
+ return err;
+ }
+ grub_macho_close (macho);
+ buf += machosize;
+ }
+ grub_errno = GRUB_ERR_NONE;
+
+ /* Load the plist. */
+ if (infoplist)
+ {
+ exthead->infoplistaddr = buf_target + (buf - (grub_uint8_t *) buf0);
+ exthead->infoplistsize = infoplistsize + 1;
+ if (grub_file_read (infoplist, buf, infoplistsize)
+ != (grub_ssize_t) (infoplistsize))
+ {
+ grub_file_close (infoplist);
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s: ",
+ infoplistname);
+ }
+ grub_file_close (infoplist);
+ buf[infoplistsize] = 0;
+ buf += infoplistsize + 1;
+ }
+ grub_errno = GRUB_ERR_NONE;
+
+ exthead->nameaddr = (buf - (grub_uint8_t *) buf0) + buf_target;
+ exthead->namesize = namelen + 1;
+ grub_memcpy (buf, name, namelen);
+ buf[namelen] = 0;
+ buf += namelen + 1;
+
+ /* Announce to kernel */
+ return grub_xnu_register_memory ("Driver-", &driversnum, buf_target,
+ neededspace);
+}
+
+/* Load mkext. */
+static grub_err_t
+grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_file_t file;
+ void *loadto;
+ grub_addr_t loadto_target;
+ grub_err_t err;
+ grub_off_t readoff = 0;
+ grub_ssize_t readlen = -1;
+ struct grub_macho_fat_header head;
+ struct grub_macho_fat_arch *archs;
+ int narchs, i;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ file = grub_file_open (args[0]);
+ if (! file)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "couldn't load driver package");
+
+ /* Sometimes caches are fat binary. Errgh. */
+ if (grub_file_read (file, &head, sizeof (head))
+ != (grub_ssize_t) (sizeof (head)))
+ {
+ /* I don't know the internal structure of package but
+ can hardly imagine a valid package shorter than 20 bytes. */
+ grub_file_close (file);
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[0]);
+ }
+
+ /* Find the corresponding architecture. */
+ if (grub_be_to_cpu32 (head.magic) == GRUB_MACHO_FAT_MAGIC)
+ {
+ narchs = grub_be_to_cpu32 (head.nfat_arch);
+ archs = grub_malloc (sizeof (struct grub_macho_fat_arch) * narchs);
+ if (! archs)
+ {
+ grub_file_close (file);
+ grub_error_push ();
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't read file %s", args[0]);
+
+ }
+ if (grub_file_read (file, archs,
+ sizeof (struct grub_macho_fat_arch) * narchs)
+ != (grub_ssize_t) sizeof(struct grub_macho_fat_arch) * narchs)
+ {
+ grub_free (archs);
+ grub_error_push ();
+ return grub_error (GRUB_ERR_READ_ERROR, "cannot read fat header");
+ }
+ for (i = 0; i < narchs; i++)
+ {
+ if (!grub_xnu_is_64bit && GRUB_MACHO_CPUTYPE_IS_HOST32
+ (grub_be_to_cpu32 (archs[i].cputype)))
+ {
+ readoff = grub_be_to_cpu32 (archs[i].offset);
+ readlen = grub_be_to_cpu32 (archs[i].size);
+ }
+ if (grub_xnu_is_64bit && GRUB_MACHO_CPUTYPE_IS_HOST64
+ (grub_be_to_cpu32 (archs[i].cputype)))
+ {
+ readoff = grub_be_to_cpu32 (archs[i].offset);
+ readlen = grub_be_to_cpu32 (archs[i].size);
+ }
+ }
+ grub_free (archs);
+ }
+ else
+ {
+ /* It's a flat file. Some sane people still exist. */
+ readoff = 0;
+ readlen = grub_file_size (file);
+ }
+
+ if (readlen == -1)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_BAD_OS, "no suitable architecture is found");
+ }
+
+ /* Allocate space. */
+ err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
+ if (err)
+ {
+ grub_file_close (file);
+ return err;
+ }
+
+ err = grub_xnu_heap_malloc (readlen, &loadto, &loadto_target);
+ if (err)
+ {
+ grub_file_close (file);
+ return err;
+ }
+
+ /* Read the file. */
+ grub_file_seek (file, readoff);
+ if (grub_file_read (file, loadto, readlen) != (grub_ssize_t) (readlen))
+ {
+ grub_file_close (file);
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[0]);
+ }
+ grub_file_close (file);
+
+ /* Pass it to kernel. */
+ return grub_xnu_register_memory ("DriversPackage-", &driverspackagenum,
+ loadto_target, readlen);
+}
+
+static grub_err_t
+grub_cmd_xnu_ramdisk (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_file_t file;
+ void *loadto;
+ grub_addr_t loadto_target;
+ grub_err_t err;
+ grub_size_t size;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ file = grub_file_open (args[0]);
+ if (! file)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "couldn't load ramdisk");
+
+ err = grub_xnu_align_heap (GRUB_XNU_PAGESIZE);
+ if (err)
+ return err;
+
+ size = grub_file_size (file);
+
+ err = grub_xnu_heap_malloc (size, &loadto, &loadto_target);
+ if (err)
+ return err;
+ if (grub_file_read (file, loadto, size)
+ != (grub_ssize_t) (size))
+ {
+ grub_file_close (file);
+ grub_error_push ();
+ return grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", args[0]);
+ }
+ return grub_xnu_register_memory ("RAMDisk", 0, loadto_target, size);
+}
+
+/* Returns true if the kext should be loaded according to plist
+ and osbundlereq. Also fill BINNAME. */
+static int
+grub_xnu_check_os_bundle_required (char *plistname, char *osbundlereq,
+ char **binname)
+{
+ grub_file_t file;
+ char *buf = 0, *tagstart = 0, *ptr1 = 0, *keyptr = 0;
+ char *stringptr = 0, *ptr2 = 0;
+ grub_size_t size;
+ int depth = 0;
+ int ret;
+ int osbundlekeyfound = 0, binnamekeyfound = 0;
+ if (binname)
+ *binname = 0;
+
+ file = grub_file_open (plistname);
+ if (! file)
+ {
+ grub_file_close (file);
+ grub_error_push ();
+ grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", plistname);
+ return 0;
+ }
+
+ size = grub_file_size (file);
+ buf = grub_malloc (size);
+ if (! buf)
+ {
+ grub_file_close (file);
+ grub_error_push ();
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't read file %s", plistname);
+ return 0;
+ }
+ if (grub_file_read (file, buf, size) != (grub_ssize_t) (size))
+ {
+ grub_file_close (file);
+ grub_error_push ();
+ grub_error (GRUB_ERR_BAD_OS, "couldn't read file %s", plistname);
+ return 0;
+ }
+ grub_file_close (file);
+
+ /* Set the return value for the case when no OSBundleRequired tag is found. */
+ if (osbundlereq)
+ ret = grub_strword (osbundlereq, "all") || grub_strword (osbundlereq, "-");
+ else
+ ret = 1;
+
+ /* Parse plist. It's quite dirty and inextensible but does its job. */
+ for (ptr1 = buf; ptr1 < buf + size; ptr1++)
+ switch (*ptr1)
+ {
+ case '<':
+ tagstart = ptr1;
+ *ptr1 = 0;
+ if (keyptr && depth == 4
+ && grub_strcmp (keyptr, "OSBundleRequired") == 0)
+ osbundlekeyfound = 1;
+ if (keyptr && depth == 4 &&
+ grub_strcmp (keyptr, "CFBundleExecutable") == 0)
+ binnamekeyfound = 1;
+ if (stringptr && osbundlekeyfound && osbundlereq && depth == 4)
+ {
+ for (ptr2 = stringptr; *ptr2; ptr2++)
+ *ptr2 = grub_tolower (*ptr2);
+ ret = grub_strword (osbundlereq, stringptr)
+ || grub_strword (osbundlereq, "all");
+ }
+ if (stringptr && binnamekeyfound && binname && depth == 4)
+ {
+ if (*binname)
+ grub_free (*binname);
+ *binname = grub_strdup (stringptr);
+ }
+
+ *ptr1 = '<';
+ keyptr = 0;
+ stringptr = 0;
+ break;
+ case '>':
+ if (! tagstart)
+ {
+ grub_free (buf);
+ grub_error (GRUB_ERR_BAD_OS, "can't parse %s", plistname);
+ return 0;
+ }
+ *ptr1 = 0;
+ if (tagstart[1] == '?' || ptr1[-1] == '/')
+ {
+ osbundlekeyfound = 0;
+ *ptr1 = '>';
+ break;
+ }
+ if (depth == 3 && grub_strcmp (tagstart + 1, "key") == 0)
+ keyptr = ptr1 + 1;
+ if (depth == 3 && grub_strcmp (tagstart + 1, "string") == 0)
+ stringptr = ptr1 + 1;
+ else if (grub_strcmp (tagstart + 1, "/key") != 0)
+ {
+ osbundlekeyfound = 0;
+ binnamekeyfound = 0;
+ }
+ *ptr1 = '>';
+
+ if (tagstart[1] == '/')
+ depth--;
+ else
+ depth++;
+ break;
+ }
+ grub_free (buf);
+
+ return ret;
+}
+
+/* Load all loadable kexts placed under DIRNAME and matching OSBUNDLEREQUIRED */
+grub_err_t
+grub_xnu_scan_dir_for_kexts (char *dirname, char *osbundlerequired,
+ int maxrecursion)
+{
+ grub_device_t dev;
+ char *device_name;
+ grub_fs_t fs;
+ const char *path;
+
+ auto int load_hook (const char *filename,
+ const struct grub_dirhook_info *info);
+ int load_hook (const char *filename, const struct grub_dirhook_info *info)
+ {
+ char *newdirname;
+ if (! info->dir)
+ return 0;
+ if (filename[0] == '.')
+ return 0;
+
+ if (grub_strlen (filename) < 5 ||
+ grub_memcmp (filename + grub_strlen (filename) - 5, ".kext", 5) != 0)
+ return 0;
+
+ newdirname
+ = grub_malloc (grub_strlen (dirname) + grub_strlen (filename) + 2);
+
+ /* It's a .kext. Try to load it. */
+ if (newdirname)
+ {
+ grub_strcpy (newdirname, dirname);
+ newdirname[grub_strlen (newdirname) + 1] = 0;
+ newdirname[grub_strlen (newdirname)] = '/';
+ grub_strcpy (newdirname + grub_strlen (newdirname), filename);
+ grub_xnu_load_kext_from_dir (newdirname, osbundlerequired,
+ maxrecursion);
+ if (grub_errno == GRUB_ERR_BAD_OS)
+ grub_errno = GRUB_ERR_NONE;
+ grub_free (newdirname);
+ }
+ return 0;
+ }
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ device_name = grub_file_get_device_name (dirname);
+ dev = grub_device_open (device_name);
+ if (dev)
+ {
+ fs = grub_fs_probe (dev);
+ path = grub_strchr (dirname, ')');
+ if (! path)
+ path = dirname;
+ else
+ path++;
+
+ if (fs)
+ (fs->dir) (dev, path, load_hook);
+ grub_device_close (dev);
+ }
+ grub_free (device_name);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Load extension DIRNAME. (extensions are directories in xnu) */
+grub_err_t
+grub_xnu_load_kext_from_dir (char *dirname, char *osbundlerequired,
+ int maxrecursion)
+{
+ grub_device_t dev;
+ char *plistname = 0;
+ char *newdirname;
+ char *newpath;
+ char *device_name;
+ grub_fs_t fs;
+ const char *path;
+ char *binsuffix;
+ int usemacos = 0;
+ grub_file_t binfile;
+
+ auto int load_hook (const char *filename,
+ const struct grub_dirhook_info *info);
+
+ int load_hook (const char *filename, const struct grub_dirhook_info *info)
+ {
+ if (grub_strlen (filename) > 15)
+ return 0;
+ grub_strcpy (newdirname + grub_strlen (dirname) + 1, filename);
+
+ /* If the kext contains directory "Contents" all real stuff is in
+ this directory. */
+ if (info->dir && grub_strcasecmp (filename, "Contents") == 0)
+ grub_xnu_load_kext_from_dir (newdirname, osbundlerequired,
+ maxrecursion - 1);
+
+ /* Directory "Plugins" contains nested kexts. */
+ if (info->dir && grub_strcasecmp (filename, "Plugins") == 0)
+ grub_xnu_scan_dir_for_kexts (newdirname, osbundlerequired,
+ maxrecursion - 1);
+
+ /* Directory "MacOS" contains executable, otherwise executable is
+ on the top. */
+ if (info->dir && grub_strcasecmp (filename, "MacOS") == 0)
+ usemacos = 1;
+
+ /* Info.plist is the file which governs our future actions. */
+ if (! info->dir && grub_strcasecmp (filename, "Info.plist") == 0
+ && ! plistname)
+ plistname = grub_strdup (newdirname);
+ return 0;
+ }
+
+ newdirname = grub_malloc (grub_strlen (dirname) + 20);
+ if (! newdirname)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "couldn't allocate buffer");
+ grub_strcpy (newdirname, dirname);
+ newdirname[grub_strlen (dirname)] = '/';
+ newdirname[grub_strlen (dirname) + 1] = 0;
+ device_name = grub_file_get_device_name (dirname);
+ dev = grub_device_open (device_name);
+ if (dev)
+ {
+ fs = grub_fs_probe (dev);
+ path = grub_strchr (dirname, ')');
+ if (! path)
+ path = dirname;
+ else
+ path++;
+
+ newpath = grub_strchr (newdirname, ')');
+ if (! newpath)
+ newpath = newdirname;
+ else
+ newpath++;
+
+ /* Look at the directory. */
+ if (fs)
+ (fs->dir) (dev, path, load_hook);
+
+ if (plistname && grub_xnu_check_os_bundle_required
+ (plistname, osbundlerequired, &binsuffix))
+ {
+ if (binsuffix)
+ {
+ /* Open the binary. */
+ char *binname = grub_malloc (grub_strlen (dirname)
+ + grub_strlen (binsuffix)
+ + sizeof ("/MacOS/"));
+ grub_strcpy (binname, dirname);
+ if (usemacos)
+ grub_strcpy (binname + grub_strlen (binname), "/MacOS/");
+ else
+ grub_strcpy (binname + grub_strlen (binname), "/");
+ grub_strcpy (binname + grub_strlen (binname), binsuffix);
+ grub_dprintf ("xnu", "%s:%s\n", plistname, binname);
+ binfile = grub_file_open (binname);
+ if (! binfile)
+ grub_errno = GRUB_ERR_NONE;
+
+ /* Load the extension. */
+ grub_xnu_load_driver (plistname, binfile);
+ grub_free (binname);
+ grub_free (binsuffix);
+ }
+ else
+ {
+ grub_dprintf ("xnu", "%s:0\n", plistname);
+ grub_xnu_load_driver (plistname, 0);
+ }
+ }
+ grub_free (plistname);
+ grub_device_close (dev);
+ }
+ grub_free (device_name);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static int locked=0;
+static grub_dl_t my_mod;
+
+/* Load the kext. */
+static grub_err_t
+grub_cmd_xnu_kext (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ grub_file_t binfile = 0;
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ if (argc == 2)
+ {
+ /* User explicitly specified plist and binary. */
+ if (grub_strcmp (args[1], "-") != 0)
+ {
+ binfile = grub_file_open (args[1]);
+ if (! binfile)
+ {
+ grub_error (GRUB_ERR_BAD_OS, "can't open file");
+ return GRUB_ERR_NONE;
+ }
+ }
+ return grub_xnu_load_driver (grub_strcmp (args[0], "-") ? args[0] : 0,
+ binfile);
+ }
+
+ /* load kext normally. */
+ if (argc == 1)
+ return grub_xnu_load_kext_from_dir (args[0], 0, 10);
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+}
+
+/* Load a directory containing kexts. */
+static grub_err_t
+grub_cmd_xnu_kextdir (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ if (argc != 1 && argc != 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "directory name required");
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ if (argc == 1)
+ return grub_xnu_scan_dir_for_kexts (args[0],
+ "console,root,local-root,network-root",
+ 10);
+ else
+ {
+ char *osbundlerequired = grub_strdup (args[1]), *ptr;
+ grub_err_t err;
+ if (! osbundlerequired)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate string temporary space");
+ for (ptr = osbundlerequired; *ptr; ptr++)
+ *ptr = grub_tolower (*ptr);
+ err = grub_xnu_scan_dir_for_kexts (args[0], osbundlerequired, 10);
+ grub_free (osbundlerequired);
+ return err;
+ }
+}
+
+static inline int
+hextoval (char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ if (c >= 'a' && c <= 'z')
+ return c - 'a' + 10;
+ if (c >= 'A' && c <= 'Z')
+ return c - 'A' + 10;
+ return 0;
+}
+
+static inline void
+unescape (char *name, char *curdot, char *nextdot, int *len)
+{
+ char *ptr, *dptr;
+ dptr = name;
+ for (ptr = curdot; ptr < nextdot;)
+ if (ptr + 2 < nextdot && *ptr == '%')
+ {
+ *dptr = (hextoval (ptr[1]) << 4) | (hextoval (ptr[2]));
+ ptr += 3;
+ dptr++;
+ }
+ else
+ {
+ *dptr = *ptr;
+ ptr++;
+ dptr++;
+ }
+ *len = dptr - name;
+}
+
+grub_err_t
+grub_xnu_fill_devicetree (void)
+{
+ auto int iterate_env (struct grub_env_var *var);
+ int iterate_env (struct grub_env_var *var)
+ {
+ char *nextdot = 0, *curdot;
+ struct grub_xnu_devtree_key **curkey = &grub_xnu_devtree_root;
+ struct grub_xnu_devtree_key *curvalue;
+ char *name = 0, *data;
+ int len;
+
+ if (grub_memcmp (var->name, "XNU.DeviceTree.",
+ sizeof ("XNU.DeviceTree.") - 1) != 0)
+ return 0;
+
+ curdot = var->name + sizeof ("XNU.DeviceTree.") - 1;
+ nextdot = grub_strchr (curdot, '.');
+ if (nextdot)
+ nextdot++;
+ while (nextdot)
+ {
+ name = grub_realloc (name, nextdot - curdot + 1);
+
+ if (!name)
+ return 1;
+
+ unescape (name, curdot, nextdot, &len);
+ name[len - 1] = 0;
+
+ curkey = &(grub_xnu_create_key (curkey, name)->first_child);
+
+ curdot = nextdot;
+ nextdot = grub_strchr (nextdot, '.');
+ if (nextdot)
+ nextdot++;
+ }
+
+ nextdot = curdot + grub_strlen (curdot) + 1;
+
+ name = grub_realloc (name, nextdot - curdot + 1);
+
+ if (!name)
+ return 1;
+
+ unescape (name, curdot, nextdot, &len);
+ name[len] = 0;
+
+ curvalue = grub_xnu_create_value (curkey, name);
+ grub_free (name);
+
+ data = grub_malloc (grub_strlen (var->value) + 1);
+ if (!data)
+ return 1;
+
+ unescape (data, var->value, var->value + grub_strlen (var->value),
+ &len);
+ curvalue->datasize = len;
+ curvalue->data = data;
+
+ return 0;
+ }
+
+ grub_env_iterate (iterate_env);
+
+ return grub_errno;
+}
+
+struct grub_video_bitmap *grub_xnu_bitmap = 0;
+grub_xnu_bitmap_mode_t grub_xnu_bitmap_mode;
+
+/* Option array indices. */
+#define XNU_SPLASH_CMD_ARGINDEX_MODE 0
+
+static const struct grub_arg_option xnu_splash_cmd_options[] =
+ {
+ {"mode", 'm', 0, "Background image mode.", "stretch|normal",
+ ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_err_t
+grub_cmd_xnu_splash (grub_extcmd_context_t ctxt,
+ int argc, char *args[])
+{
+ grub_err_t err;
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ if (! grub_xnu_heap_size)
+ return grub_error (GRUB_ERR_BAD_OS, "no xnu kernel loaded");
+
+ if (ctxt->state[XNU_SPLASH_CMD_ARGINDEX_MODE].set &&
+ grub_strcmp (ctxt->state[XNU_SPLASH_CMD_ARGINDEX_MODE].arg,
+ "stretch") == 0)
+ grub_xnu_bitmap_mode = GRUB_XNU_BITMAP_STRETCH;
+ else
+ grub_xnu_bitmap_mode = GRUB_XNU_BITMAP_CENTER;
+
+ err = grub_video_bitmap_load (&grub_xnu_bitmap, args[0]);
+ if (err)
+ grub_xnu_bitmap = 0;
+
+ return err;
+}
+
+
+#ifndef GRUB_MACHINE_EMU
+static grub_err_t
+grub_cmd_xnu_resume (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char *args[])
+{
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ return grub_xnu_resume (args[0]);
+}
+#endif
+
+void
+grub_xnu_lock (void)
+{
+ if (!locked)
+ grub_dl_ref (my_mod);
+ locked = 1;
+}
+
+void
+grub_xnu_unlock (void)
+{
+ if (locked)
+ grub_dl_unref (my_mod);
+ locked = 0;
+}
+
+static grub_command_t cmd_kernel64, cmd_kernel, cmd_mkext, cmd_kext;
+static grub_command_t cmd_kextdir, cmd_ramdisk, cmd_resume;
+static grub_extcmd_t cmd_splash;
+
+GRUB_MOD_INIT(xnu)
+{
+ cmd_kernel = grub_register_command ("xnu_kernel", grub_cmd_xnu_kernel, 0,
+ N_("Load XNU image."));
+ cmd_kernel64 = grub_register_command ("xnu_kernel64", grub_cmd_xnu_kernel64,
+ 0, N_("Load 64-bit XNU image."));
+ cmd_mkext = grub_register_command ("xnu_mkext", grub_cmd_xnu_mkext, 0,
+ N_("Load XNU extension package."));
+ cmd_kext = grub_register_command ("xnu_kext", grub_cmd_xnu_kext, 0,
+ N_("Load XNU extension."));
+ cmd_kextdir = grub_register_command ("xnu_kextdir", grub_cmd_xnu_kextdir,
+ N_("DIRECTORY [OSBundleRequired]"),
+ N_("Load XNU extension directory."));
+ cmd_ramdisk = grub_register_command ("xnu_ramdisk", grub_cmd_xnu_ramdisk, 0,
+ "Load XNU ramdisk. "
+ "It will be seen as md0.");
+ cmd_splash = grub_register_extcmd ("xnu_splash",
+ grub_cmd_xnu_splash, 0, 0,
+ N_("Load a splash image for XNU."),
+ xnu_splash_cmd_options);
+
+#ifndef GRUB_MACHINE_EMU
+ cmd_resume = grub_register_command ("xnu_resume", grub_cmd_xnu_resume,
+ 0, N_("Load XNU hibernate image."));
+#endif
+
+ grub_cpu_xnu_init ();
+
+ my_mod = mod;
+}
+
+GRUB_MOD_FINI(xnu)
+{
+#ifndef GRUB_MACHINE_EMU
+ grub_unregister_command (cmd_resume);
+#endif
+ grub_unregister_command (cmd_mkext);
+ grub_unregister_command (cmd_kext);
+ grub_unregister_command (cmd_kextdir);
+ grub_unregister_command (cmd_ramdisk);
+ grub_unregister_command (cmd_kernel);
+ grub_unregister_extcmd (cmd_splash);
+ grub_unregister_command (cmd_kernel64);
+
+ grub_cpu_xnu_fini ();
+}
diff --git a/grub-core/loader/xnu_resume.c b/grub-core/loader/xnu_resume.c
new file mode 100644
index 0000000..8f0e244
--- /dev/null
+++ b/grub-core/loader/xnu_resume.c
@@ -0,0 +1,172 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/file.h>
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/xnu.h>
+#include <grub/cpu/xnu.h>
+#include <grub/mm.h>
+#include <grub/loader.h>
+
+static void *grub_xnu_hibernate_image;
+
+static grub_err_t
+grub_xnu_resume_unload (void)
+{
+ /* Free loaded image */
+ if (grub_xnu_hibernate_image)
+ grub_free (grub_xnu_hibernate_image);
+ grub_xnu_hibernate_image = 0;
+ grub_xnu_unlock ();
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_xnu_resume (char *imagename)
+{
+ grub_file_t file;
+ grub_size_t total_header_size;
+ struct grub_xnu_hibernate_header hibhead;
+ void *code;
+ void *image;
+ grub_uint32_t codedest;
+ grub_uint32_t codesize;
+ grub_addr_t target_image;
+ grub_err_t err;
+
+ grub_file_filter_disable_compression ();
+ file = grub_file_open (imagename);
+ if (! file)
+ return 0;
+
+ /* Read the header. */
+ if (grub_file_read (file, &hibhead, sizeof (hibhead))
+ !=sizeof (hibhead))
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_READ_ERROR,
+ "cannot read the hibernate header");
+ }
+
+ /* Check the header. */
+ if (hibhead.magic != GRUB_XNU_HIBERNATE_MAGIC)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_BAD_OS,
+ "hibernate header has incorrect magic number");
+ }
+ if (hibhead.encoffset)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_BAD_OS,
+ "encrypted images aren't supported yet");
+ }
+
+ codedest = hibhead.launchcode_target_page;
+ codedest *= GRUB_XNU_PAGESIZE;
+ codesize = hibhead.launchcode_numpages;
+ codesize *= GRUB_XNU_PAGESIZE;
+
+ /* FIXME: check that codedest..codedest+codesize is available. */
+
+ /* Calculate total size before pages to copy. */
+ total_header_size = hibhead.extmapsize + sizeof (hibhead);
+
+ /* Unload image if any. */
+ if (grub_xnu_hibernate_image)
+ grub_free (grub_xnu_hibernate_image);
+
+ /* Try to allocate necessary space.
+ FIXME: mm isn't good enough yet to handle huge allocations.
+ */
+ grub_xnu_relocator = grub_relocator_new ();
+ if (!grub_xnu_relocator)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_addr (grub_xnu_relocator, &ch, codedest,
+ codesize + GRUB_XNU_PAGESIZE);
+ if (err)
+ {
+ grub_file_close (file);
+ return err;
+ }
+ code = get_virtual_current_address (ch);
+ }
+
+ {
+ grub_relocator_chunk_t ch;
+ err = grub_relocator_alloc_chunk_align (grub_xnu_relocator, &ch, 0,
+ (0xffffffff - hibhead.image_size) + 1,
+ hibhead.image_size,
+ GRUB_XNU_PAGESIZE,
+ GRUB_RELOCATOR_PREFERENCE_NONE);
+ if (err)
+ {
+ grub_file_close (file);
+ return err;
+ }
+ image = get_virtual_current_address (ch);
+ target_image = get_physical_target_address (ch);
+ }
+
+ /* Read code part. */
+ if (grub_file_seek (file, total_header_size) == (grub_off_t) -1
+ || grub_file_read (file, code, codesize)
+ != (grub_ssize_t) codesize)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_READ_ERROR, "cannot read resume image");
+ }
+
+ /* Read image. */
+ if (grub_file_seek (file, 0) == (grub_off_t) -1
+ || grub_file_read (file, image, hibhead.image_size)
+ != (grub_ssize_t) hibhead.image_size)
+ {
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_READ_ERROR, "cannot read resume image");
+ }
+ grub_file_close (file);
+
+ /* Setup variables needed by asm helper. */
+ grub_xnu_heap_target_start = codedest;
+ grub_xnu_heap_size = target_image + hibhead.image_size - codedest;
+ grub_xnu_stack = (codedest + hibhead.stack);
+ grub_xnu_entry_point = (codedest + hibhead.entry_point);
+ grub_xnu_arg1 = target_image;
+
+ grub_dprintf ("xnu", "entry point 0x%x\n", codedest + hibhead.entry_point);
+ grub_dprintf ("xnu", "image at 0x%x\n",
+ codedest + codesize + GRUB_XNU_PAGESIZE);
+
+ /* We're ready now. */
+ grub_loader_set (grub_xnu_boot_resume,
+ grub_xnu_resume_unload, 0);
+
+ /* Prevent module from unloading. */
+ grub_xnu_lock ();
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/mmap/efi/mmap.c b/grub-core/mmap/efi/mmap.c
new file mode 100644
index 0000000..8e5cce0
--- /dev/null
+++ b/grub-core/mmap/efi/mmap.c
@@ -0,0 +1,282 @@
+/* Mmap management. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/memory.h>
+#include <grub/memory.h>
+#include <grub/err.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+#define NEXT_MEMORY_DESCRIPTOR(desc, size) \
+ ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
+
+grub_err_t
+grub_machine_mmap_iterate (grub_memory_hook_t hook)
+{
+ grub_efi_uintn_t mmap_size = 0;
+ grub_efi_memory_descriptor_t *map_buf = 0;
+ grub_efi_uintn_t map_key = 0;
+ grub_efi_uintn_t desc_size = 0;
+ grub_efi_uint32_t desc_version = 0;
+ grub_efi_memory_descriptor_t *desc;
+
+ if (grub_efi_get_memory_map (&mmap_size, map_buf,
+ &map_key, &desc_size,
+ &desc_version) < 0)
+ return grub_errno;
+
+ map_buf = grub_malloc (mmap_size);
+ if (! map_buf)
+ return grub_errno;
+
+ if (grub_efi_get_memory_map (&mmap_size, map_buf,
+ &map_key, &desc_size,
+ &desc_version) <= 0)
+ {
+ grub_free (map_buf);
+ return grub_errno;
+ }
+
+ for (desc = map_buf;
+ desc < NEXT_MEMORY_DESCRIPTOR (map_buf, mmap_size);
+ desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
+ {
+ grub_dprintf ("mmap", "EFI memory region 0x%llx-0x%llx: %d\n",
+ (unsigned long long) desc->physical_start,
+ (unsigned long long) desc->physical_start
+ + desc->num_pages * 4096, desc->type);
+ switch (desc->type)
+ {
+ case GRUB_EFI_RUNTIME_SERVICES_CODE:
+ hook (desc->physical_start, desc->num_pages * 4096,
+ GRUB_MEMORY_CODE);
+ break;
+
+ case GRUB_EFI_UNUSABLE_MEMORY:
+ hook (desc->physical_start, desc->num_pages * 4096,
+ GRUB_MEMORY_BADRAM);
+ break;
+
+ default:
+ grub_printf ("Unknown memory type %d, considering reserved\n",
+ desc->type);
+
+ case GRUB_EFI_RESERVED_MEMORY_TYPE:
+ case GRUB_EFI_RUNTIME_SERVICES_DATA:
+ case GRUB_EFI_MEMORY_MAPPED_IO:
+ case GRUB_EFI_MEMORY_MAPPED_IO_PORT_SPACE:
+ case GRUB_EFI_PAL_CODE:
+ hook (desc->physical_start, desc->num_pages * 4096,
+ GRUB_MEMORY_RESERVED);
+ break;
+
+ case GRUB_EFI_LOADER_CODE:
+ case GRUB_EFI_LOADER_DATA:
+ case GRUB_EFI_BOOT_SERVICES_CODE:
+ case GRUB_EFI_BOOT_SERVICES_DATA:
+ case GRUB_EFI_CONVENTIONAL_MEMORY:
+ hook (desc->physical_start, desc->num_pages * 4096,
+ GRUB_MEMORY_AVAILABLE);
+ break;
+
+ case GRUB_EFI_ACPI_RECLAIM_MEMORY:
+ hook (desc->physical_start, desc->num_pages * 4096,
+ GRUB_MEMORY_ACPI);
+ break;
+
+ case GRUB_EFI_ACPI_MEMORY_NVS:
+ hook (desc->physical_start, desc->num_pages * 4096,
+ GRUB_MEMORY_NVS);
+ break;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static inline grub_efi_memory_type_t
+make_efi_memtype (int type)
+{
+ switch (type)
+ {
+ case GRUB_MEMORY_CODE:
+ return GRUB_EFI_RUNTIME_SERVICES_CODE;
+
+ /* No way to remove a chunk of memory from EFI mmap.
+ So mark it as unusable. */
+ case GRUB_MEMORY_HOLE:
+ case GRUB_MEMORY_RESERVED:
+ return GRUB_EFI_UNUSABLE_MEMORY;
+
+ case GRUB_MEMORY_AVAILABLE:
+ return GRUB_EFI_CONVENTIONAL_MEMORY;
+
+ case GRUB_MEMORY_ACPI:
+ return GRUB_EFI_ACPI_RECLAIM_MEMORY;
+
+ case GRUB_MEMORY_NVS:
+ return GRUB_EFI_ACPI_MEMORY_NVS;
+ }
+
+ return GRUB_EFI_UNUSABLE_MEMORY;
+}
+
+struct overlay
+{
+ struct overlay *next;
+ grub_efi_physical_address_t address;
+ grub_efi_uintn_t pages;
+ int handle;
+};
+
+static struct overlay *overlays = 0;
+static int curhandle = 1;
+
+int
+grub_mmap_register (grub_uint64_t start, grub_uint64_t size, int type)
+{
+ grub_uint64_t end = start + size;
+ grub_efi_physical_address_t address;
+ grub_efi_boot_services_t *b;
+ grub_efi_uintn_t pages;
+ grub_efi_status_t status;
+ struct overlay *curover;
+
+ curover = (struct overlay *) grub_malloc (sizeof (struct overlay));
+ if (! curover)
+ return 0;
+
+ b = grub_efi_system_table->boot_services;
+ address = start & (~0x3ffULL);
+ pages = (end - address + 0x3ff) >> 12;
+ status = efi_call_2 (b->free_pages, address, pages);
+ if (status != GRUB_EFI_SUCCESS && status != GRUB_EFI_NOT_FOUND)
+ {
+ grub_free (curover);
+ return 0;
+ }
+ status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ADDRESS,
+ make_efi_memtype (type), pages, &address);
+ if (status != GRUB_EFI_SUCCESS)
+ {
+ grub_free (curover);
+ return 0;
+ }
+ curover->next = overlays;
+ curover->handle = curhandle++;
+ curover->address = address;
+ curover->pages = pages;
+ overlays = curover;
+
+ return curover->handle;
+}
+
+grub_err_t
+grub_mmap_unregister (int handle)
+{
+ struct overlay *curover, *prevover;
+ grub_efi_boot_services_t *b;
+
+ b = grub_efi_system_table->boot_services;
+
+
+ for (curover = overlays, prevover = 0; curover;
+ prevover = curover, curover = curover->next)
+ {
+ if (curover->handle == handle)
+ {
+ efi_call_2 (b->free_pages, curover->address, curover->pages);
+ if (prevover != 0)
+ prevover->next = curover->next;
+ else
+ overlays = curover->next;
+ grub_free (curover);
+ return GRUB_ERR_NONE;
+ }
+ }
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "handle %d not found", handle);
+}
+
+/* Result is always page-aligned. */
+void *
+grub_mmap_malign_and_register (grub_uint64_t align __attribute__ ((unused)),
+ grub_uint64_t size,
+ int *handle, int type,
+ int flags __attribute__ ((unused)))
+{
+ grub_efi_physical_address_t address;
+ grub_efi_boot_services_t *b;
+ grub_efi_uintn_t pages;
+ grub_efi_status_t status;
+ struct overlay *curover;
+ grub_efi_allocate_type_t atype;
+
+ curover = (struct overlay *) grub_malloc (sizeof (struct overlay));
+ if (! curover)
+ return 0;
+
+ b = grub_efi_system_table->boot_services;
+
+ address = 0xffffffff;
+
+#if GRUB_TARGET_SIZEOF_VOID_P < 8
+ /* Limit the memory access to less than 4GB for 32-bit platforms. */
+ atype = GRUB_EFI_ALLOCATE_MAX_ADDRESS;
+#else
+ atype = GRUB_EFI_ALLOCATE_ANY_PAGES;
+#endif
+
+ pages = (size + 0x3ff) >> 12;
+ status = efi_call_4 (b->allocate_pages, atype,
+ make_efi_memtype (type), pages, &address);
+ if (status != GRUB_EFI_SUCCESS)
+ {
+ grub_free (curover);
+ return 0;
+ }
+
+ if (address == 0)
+ {
+ /* Uggh, the address 0 was allocated... This is too annoying,
+ so reallocate another one. */
+ address = 0xffffffff;
+ status = efi_call_4 (b->allocate_pages, atype,
+ make_efi_memtype (type), pages, &address);
+ grub_efi_free_pages (0, pages);
+ if (status != GRUB_EFI_SUCCESS)
+ return 0;
+ }
+
+ curover->next = overlays;
+ curover->handle = curhandle++;
+ curover->address = address;
+ curover->pages = pages;
+ overlays = curover;
+ *handle = curover->handle;
+
+ return UINT_TO_PTR (curover->address);
+}
+
+void
+grub_mmap_free_and_unregister (int handle)
+{
+ grub_mmap_unregister (handle);
+}
diff --git a/grub-core/mmap/i386/mmap.c b/grub-core/mmap/i386/mmap.c
new file mode 100644
index 0000000..e9c030b
--- /dev/null
+++ b/grub-core/mmap/i386/mmap.c
@@ -0,0 +1,99 @@
+/* Mmap management. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/memory.h>
+#include <grub/i386/memory.h>
+#include <grub/memory.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+
+
+#ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
+
+void *
+grub_mmap_malign_and_register (grub_uint64_t align, grub_uint64_t size,
+ int *handle, int type, int flags)
+{
+ grub_uint64_t highestlow = 0;
+
+ auto int NESTED_FUNC_ATTR find_hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR find_hook (grub_uint64_t start, grub_uint64_t rangesize,
+ grub_memory_type_t memtype)
+ {
+ grub_uint64_t end = start + rangesize;
+ if (memtype != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ if (end > 0x100000)
+ end = 0x100000;
+ if (end > start + size
+ && highestlow < ((end - size) - ((end - size) & (align - 1))))
+ highestlow = (end - size) - ((end - size) & (align - 1));
+ return 0;
+ }
+
+ void *ret;
+ if (flags & GRUB_MMAP_MALLOC_LOW)
+ {
+ /* FIXME: use low-memory mm allocation once it's available. */
+ grub_mmap_iterate (find_hook);
+ ret = UINT_TO_PTR (highestlow);
+ }
+ else
+ ret = grub_memalign (align, size);
+
+ if (! ret)
+ {
+ *handle = 0;
+ return 0;
+ }
+
+ *handle = grub_mmap_register (PTR_TO_UINT64 (ret), size, type);
+ if (! *handle)
+ {
+ grub_free (ret);
+ return 0;
+ }
+
+ return ret;
+}
+
+void
+grub_mmap_free_and_unregister (int handle)
+{
+ struct grub_mmap_region *cur;
+ grub_uint64_t addr;
+
+ for (cur = grub_mmap_overlays; cur; cur = cur->next)
+ if (cur->handle == handle)
+ break;
+
+ if (! cur)
+ return;
+
+ addr = cur->start;
+
+ grub_mmap_unregister (handle);
+
+ if (addr >= 0x100000)
+ grub_free (UINT_TO_PTR (addr));
+}
+
+#endif
diff --git a/grub-core/mmap/i386/pc/mmap.c b/grub-core/mmap/i386/pc/mmap.c
new file mode 100644
index 0000000..8dec083
--- /dev/null
+++ b/grub-core/mmap/i386/pc/mmap.c
@@ -0,0 +1,216 @@
+/* Mmap management. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/memory.h>
+#include <grub/memory.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/loader.h>
+
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+
+static void *hooktarget = 0;
+
+extern grub_uint8_t grub_machine_mmaphook_start;
+extern grub_uint8_t grub_machine_mmaphook_end;
+extern grub_uint8_t grub_machine_mmaphook_int12;
+extern grub_uint8_t grub_machine_mmaphook_int15;
+
+static grub_uint16_t grub_machine_mmaphook_int12offset = 0;
+static grub_uint16_t grub_machine_mmaphook_int12segment = 0;
+extern grub_uint16_t grub_machine_mmaphook_int15offset;
+extern grub_uint16_t grub_machine_mmaphook_int15segment;
+
+extern grub_uint16_t grub_machine_mmaphook_mmap_num;
+extern grub_uint16_t grub_machine_mmaphook_kblow;
+extern grub_uint16_t grub_machine_mmaphook_kbin16mb;
+extern grub_uint16_t grub_machine_mmaphook_64kbin4gb;
+
+struct grub_e820_mmap_entry
+{
+ grub_uint64_t addr;
+ grub_uint64_t len;
+ grub_uint32_t type;
+} __attribute__((packed));
+
+
+static grub_err_t
+preboot (int noreturn __attribute__ ((unused)))
+{
+ struct grub_e820_mmap_entry *hookmmap, *hookmmapcur;
+ auto int NESTED_FUNC_ATTR fill_hook (grub_uint64_t, grub_uint64_t,
+ grub_uint32_t);
+ int NESTED_FUNC_ATTR fill_hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ grub_dprintf ("mmap", "mmap chunk %llx-%llx:%x\n", addr, addr + size, type);
+ hookmmapcur->addr = addr;
+ hookmmapcur->len = size;
+ hookmmapcur->type = type;
+ hookmmapcur++;
+ return 0;
+ }
+
+ if (! hooktarget)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "no space is allocated for memory hook");
+
+ grub_dprintf ("mmap", "installing preboot handlers\n");
+
+ hookmmapcur = hookmmap = (struct grub_e820_mmap_entry *)
+ ((grub_uint8_t *) hooktarget + (&grub_machine_mmaphook_end
+ - &grub_machine_mmaphook_start));
+
+ grub_mmap_iterate (fill_hook);
+ grub_machine_mmaphook_mmap_num = hookmmapcur - hookmmap;
+
+ grub_machine_mmaphook_kblow = grub_mmap_get_lower () >> 10;
+ grub_machine_mmaphook_kbin16mb
+ = min (grub_mmap_get_upper (),0x3f00000ULL) >> 10;
+ grub_machine_mmaphook_64kbin4gb
+ = min (grub_mmap_get_post64 (), 0xfc000000ULL) >> 16;
+
+ /* Correct BDA. */
+ *((grub_uint16_t *) 0x413) = grub_mmap_get_lower () >> 10;
+
+ /* Save old interrupt handlers. */
+ grub_machine_mmaphook_int12offset = *((grub_uint16_t *) 0x48);
+ grub_machine_mmaphook_int12segment = *((grub_uint16_t *) 0x4a);
+ grub_machine_mmaphook_int15offset = *((grub_uint16_t *) 0x54);
+ grub_machine_mmaphook_int15segment = *((grub_uint16_t *) 0x56);
+
+ grub_dprintf ("mmap", "hooktarget = %p\n", hooktarget);
+
+ /* Install the interrupt handlers. */
+ grub_memcpy (hooktarget, &grub_machine_mmaphook_start,
+ &grub_machine_mmaphook_end - &grub_machine_mmaphook_start);
+
+ *((grub_uint16_t *) 0x4a) = PTR_TO_UINT32 (hooktarget) >> 4;
+ *((grub_uint16_t *) 0x56) = PTR_TO_UINT32 (hooktarget) >> 4;
+ *((grub_uint16_t *) 0x48) = &grub_machine_mmaphook_int12
+ - &grub_machine_mmaphook_start;
+ *((grub_uint16_t *) 0x54) = &grub_machine_mmaphook_int15
+ - &grub_machine_mmaphook_start;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+preboot_rest (void)
+{
+ /* Restore old interrupt handlers. */
+ *((grub_uint16_t *) 0x48) = grub_machine_mmaphook_int12offset;
+ *((grub_uint16_t *) 0x4a) = grub_machine_mmaphook_int12segment;
+ *((grub_uint16_t *) 0x54) = grub_machine_mmaphook_int15offset;
+ *((grub_uint16_t *) 0x56) = grub_machine_mmaphook_int15segment;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+malloc_hook (void)
+{
+ static int reentry = 0;
+ static int mmapregion = 0;
+ static int slots_available = 0;
+ int hooksize;
+ int regcount = 0;
+ auto int NESTED_FUNC_ATTR count_hook (grub_uint64_t, grub_uint64_t,
+ grub_uint32_t);
+ int NESTED_FUNC_ATTR count_hook (grub_uint64_t addr __attribute__ ((unused)),
+ grub_uint64_t size __attribute__ ((unused)),
+ grub_memory_type_t type __attribute__ ((unused)))
+ {
+ regcount++;
+ return 0;
+ }
+
+ if (reentry)
+ return GRUB_ERR_NONE;
+
+ grub_dprintf ("mmap", "registering\n");
+
+ grub_mmap_iterate (count_hook);
+
+ /* Mapping hook itself may introduce up to 2 additional regions. */
+ regcount += 2;
+
+ if (regcount <= slots_available)
+ return GRUB_ERR_NONE;
+
+ if (mmapregion)
+ {
+ grub_mmap_free_and_unregister (mmapregion);
+ mmapregion = 0;
+ hooktarget = 0;
+ }
+
+ hooksize = &grub_machine_mmaphook_end - &grub_machine_mmaphook_start
+ + regcount * sizeof (struct grub_e820_mmap_entry);
+ /* Allocate an integer number of KiB. */
+ hooksize = ((hooksize - 1) | 0x3ff) + 1;
+ slots_available = (hooksize - (&grub_machine_mmaphook_end
+ - &grub_machine_mmaphook_start))
+ / sizeof (struct grub_e820_mmap_entry);
+
+ reentry = 1;
+ hooktarget
+ = grub_mmap_malign_and_register (16, hooksize, &mmapregion,
+ GRUB_MEMORY_RESERVED,
+ GRUB_MMAP_MALLOC_LOW);
+ reentry = 0;
+
+ if (! hooktarget)
+ {
+ slots_available = 0;
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "no space for mmap hook");
+ }
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_machine_mmap_register (grub_uint64_t start __attribute__ ((unused)),
+ grub_uint64_t size __attribute__ ((unused)),
+ int type __attribute__ ((unused)),
+ int handle __attribute__ ((unused)))
+{
+ grub_err_t err;
+ static void *preb_handle = 0;
+
+ err = malloc_hook ();
+ if (err)
+ return err;
+
+ if (! preb_handle)
+ {
+ grub_dprintf ("mmap", "adding preboot\n");
+ preb_handle
+ = grub_loader_register_preboot_hook (preboot, preboot_rest,
+ GRUB_LOADER_PREBOOT_HOOK_PRIO_MEMORY);
+ if (! preb_handle)
+ return grub_errno;
+ }
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_machine_mmap_unregister (int handle __attribute__ ((unused)))
+{
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/mmap/i386/pc/mmap_helper.S b/grub-core/mmap/i386/pc/mmap_helper.S
new file mode 100644
index 0000000..3302a9a
--- /dev/null
+++ b/grub-core/mmap/i386/pc/mmap_helper.S
@@ -0,0 +1,133 @@
+/* Mmap management. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+
+#define DS(x) ((x) - LOCAL (segstart))
+
+LOCAL (segstart):
+VARIABLE(grub_machine_mmaphook_start)
+ .code16
+VARIABLE(grub_machine_mmaphook_int12)
+ push %ds
+ push %cs
+ pop %ds
+ movw DS (LOCAL (kblow)), %ax
+ pop %ds
+ iret
+
+VARIABLE(grub_machine_mmaphook_int15)
+ pushf
+ cmpw $0xe801, %ax
+ jz LOCAL (e801)
+ cmpw $0xe820, %ax
+ jz LOCAL (e820)
+ cmpb $0x88, %ah
+ jz LOCAL (h88)
+ popf
+ /* ljmp */
+ .byte 0xea
+VARIABLE (grub_machine_mmaphook_int15offset)
+ .word 0
+VARIABLE (grub_machine_mmaphook_int15segment)
+ .word 0
+
+LOCAL (e801):
+ popf
+ push %ds
+ push %cs
+ pop %ds
+ movw DS (LOCAL (kbin16mb)), %ax
+ movw DS (LOCAL (m64kbin4gb)), %bx
+ movw %ax, %cx
+ movw %bx, %dx
+ pop %ds
+ clc
+ jmp LOCAL (iret_cf)
+
+LOCAL (h88):
+ popf
+ push %ds
+ push %cs
+ pop %ds
+ movw DS (LOCAL (kbin16mb)), %ax
+ pop %ds
+ clc
+ jmp LOCAL (iret_cf)
+
+LOCAL (e820):
+ popf
+ push %ds
+ push %cs
+ pop %ds
+ cmpw $20, %cx
+ jb LOCAL (errexit)
+ cmpw DS (LOCAL (mmap_num)), %bx
+ jae LOCAL (errexit)
+ cmp $0x534d4150, %edx
+ jne LOCAL (errexit)
+ push %si
+ push %di
+ movw $20, %cx
+ movw $(DS(LOCAL (mmaphook_mmap))), %si
+ mov %bx, %ax
+ imul $20, %ax
+ add %ax, %si
+ rep movsb
+ pop %di
+ pop %si
+ movl $20, %ecx
+ inc %bx
+ cmpw DS(LOCAL (mmap_num)), %bx
+ jb LOCAL (noclean)
+ xor %bx, %bx
+LOCAL (noclean):
+ mov $0x534d4150, %eax
+ pop %ds
+ clc
+ jmp LOCAL (iret_cf)
+LOCAL (errexit):
+ mov $0x534d4150, %eax
+ pop %ds
+ xor %bx, %bx
+ stc
+
+LOCAL (iret_cf):
+ push %bp
+ mov %sp, %bp
+ setc 6(%bp)
+ pop %bp
+ iret
+
+VARIABLE(grub_machine_mmaphook_mmap_num)
+LOCAL (mmap_num):
+ .word 0
+VARIABLE(grub_machine_mmaphook_kblow)
+LOCAL (kblow):
+ .word 0
+VARIABLE (grub_machine_mmaphook_kbin16mb)
+LOCAL (kbin16mb):
+ .word 0
+VARIABLE (grub_machine_mmaphook_64kbin4gb)
+LOCAL (m64kbin4gb):
+ .word 0
+LOCAL (mmaphook_mmap):
+ /* Memory map is placed just after the interrupt handlers. */
+VARIABLE(grub_machine_mmaphook_end)
+ .byte 0
diff --git a/grub-core/mmap/i386/uppermem.c b/grub-core/mmap/i386/uppermem.c
new file mode 100644
index 0000000..2aa4301
--- /dev/null
+++ b/grub-core/mmap/i386/uppermem.c
@@ -0,0 +1,89 @@
+/* Compute amount of lower and upper memory till the first hole. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/memory.h>
+#include <grub/i386/memory.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+grub_uint64_t
+grub_mmap_get_lower (void)
+{
+ grub_uint64_t lower = 0;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ if (addr == 0)
+ lower = size;
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+ if (lower > 0x100000)
+ lower = 0x100000;
+ return lower;
+}
+
+grub_uint64_t
+grub_mmap_get_upper (void)
+{
+ grub_uint64_t upper = 0;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ if (addr <= 0x100000 && addr + size > 0x100000)
+ upper = addr + size - 0x100000;
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+ return upper;
+}
+
+/* Count the continuous bytes after 64 MiB. */
+grub_uint64_t
+grub_mmap_get_post64 (void)
+{
+ grub_uint64_t post64 = 0;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ if (addr <= 0x4000000 && addr + size > 0x4000000)
+ post64 = addr + size - 0x4000000;
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+ return post64;
+}
diff --git a/grub-core/mmap/mips/yeeloong/uppermem.c b/grub-core/mmap/mips/yeeloong/uppermem.c
new file mode 100644
index 0000000..723b6a8
--- /dev/null
+++ b/grub-core/mmap/mips/yeeloong/uppermem.c
@@ -0,0 +1,68 @@
+/* Compute amount of lower and upper memory till the first hole. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/memory.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/machine/memory.h>
+
+grub_uint64_t
+grub_mmap_get_lower (void)
+{
+ grub_uint64_t lower = 0;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ if (addr == 0)
+ lower = size;
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+ if (lower > GRUB_ARCH_LOWMEMMAXSIZE)
+ lower = GRUB_ARCH_LOWMEMMAXSIZE;
+ return lower;
+}
+
+grub_uint64_t
+grub_mmap_get_upper (void)
+{
+ grub_uint64_t upper = 0;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ if (type != GRUB_MEMORY_AVAILABLE)
+ return 0;
+ if (addr <= GRUB_ARCH_HIGHMEMPSTART && addr + size
+ > GRUB_ARCH_HIGHMEMPSTART)
+ upper = addr + size - GRUB_ARCH_HIGHMEMPSTART;
+ return 0;
+ }
+
+ grub_mmap_iterate (hook);
+ return upper;
+}
diff --git a/grub-core/mmap/mmap.c b/grub-core/mmap/mmap.c
new file mode 100644
index 0000000..07a7133
--- /dev/null
+++ b/grub-core/mmap/mmap.c
@@ -0,0 +1,486 @@
+/* Mmap management. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/memory.h>
+#include <grub/machine/memory.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/command.h>
+#include <grub/dl.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
+
+struct grub_mmap_region *grub_mmap_overlays = 0;
+static int curhandle = 1;
+
+#endif
+
+grub_err_t
+grub_mmap_iterate (grub_memory_hook_t hook)
+{
+
+ /* This function resolves overlapping regions and sorts the memory map.
+ It uses scanline (sweeping) algorithm.
+ */
+ /* If same page is used by multiple types it's resolved
+ according to priority:
+ 1 - free memory
+ 2 - memory usable by firmware-aware code
+ 3 - unusable memory
+ 4 - a range deliberately empty
+ */
+ int priority[] =
+ {
+ [GRUB_MEMORY_AVAILABLE] = 1,
+ [GRUB_MEMORY_RESERVED] = 3,
+ [GRUB_MEMORY_ACPI] = 2,
+ [GRUB_MEMORY_CODE] = 3,
+ [GRUB_MEMORY_NVS] = 3,
+ [GRUB_MEMORY_HOLE] = 4,
+ };
+
+ int i, done;
+
+ /* Scanline events. */
+ struct grub_mmap_scan
+ {
+ /* At which memory address. */
+ grub_uint64_t pos;
+ /* 0 = region starts, 1 = region ends. */
+ int type;
+ /* Which type of memory region? */
+ int memtype;
+ };
+ struct grub_mmap_scan *scanline_events;
+ struct grub_mmap_scan t;
+
+ /* Previous scanline event. */
+ grub_uint64_t lastaddr;
+ int lasttype;
+ /* Current scanline event. */
+ int curtype;
+ /* How many regions of given type overlap at current location? */
+ int present[ARRAY_SIZE (priority)];
+ /* Number of mmap chunks. */
+ int mmap_num;
+
+#ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
+ struct grub_mmap_region *cur;
+#endif
+
+ auto int NESTED_FUNC_ATTR count_hook (grub_uint64_t, grub_uint64_t,
+ grub_uint32_t);
+ int NESTED_FUNC_ATTR count_hook (grub_uint64_t addr __attribute__ ((unused)),
+ grub_uint64_t size __attribute__ ((unused)),
+ grub_memory_type_t type __attribute__ ((unused)))
+ {
+ mmap_num++;
+ return 0;
+ }
+
+ auto int NESTED_FUNC_ATTR fill_hook (grub_uint64_t, grub_uint64_t,
+ grub_uint32_t);
+ int NESTED_FUNC_ATTR fill_hook (grub_uint64_t addr,
+ grub_uint64_t size,
+ grub_memory_type_t type)
+ {
+ scanline_events[i].pos = addr;
+ scanline_events[i].type = 0;
+ if (type < ARRAY_SIZE (priority) && priority[type])
+ scanline_events[i].memtype = type;
+ else
+ {
+ grub_dprintf ("mmap", "Unknown memory type %d. Assuming unusable\n",
+ type);
+ scanline_events[i].memtype = GRUB_MEMORY_RESERVED;
+ }
+ i++;
+
+ scanline_events[i].pos = addr + size;
+ scanline_events[i].type = 1;
+ scanline_events[i].memtype = scanline_events[i - 1].memtype;
+ i++;
+
+ return 0;
+ }
+
+ mmap_num = 0;
+
+#ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
+ for (cur = grub_mmap_overlays; cur; cur = cur->next)
+ mmap_num++;
+#endif
+
+ grub_machine_mmap_iterate (count_hook);
+
+ /* Initialize variables. */
+ grub_memset (present, 0, sizeof (present));
+ scanline_events = (struct grub_mmap_scan *)
+ grub_malloc (sizeof (struct grub_mmap_scan) * 2 * mmap_num);
+
+ if (! scanline_events)
+ {
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate space for new memory map");
+ }
+
+ i = 0;
+#ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
+ /* Register scanline events. */
+ for (cur = grub_mmap_overlays; cur; cur = cur->next)
+ {
+ scanline_events[i].pos = cur->start;
+ scanline_events[i].type = 0;
+ if (cur->type < ARRAY_SIZE (priority) && priority[cur->type])
+ scanline_events[i].memtype = cur->type;
+ else
+ scanline_events[i].memtype = GRUB_MEMORY_RESERVED;
+ i++;
+
+ scanline_events[i].pos = cur->end;
+ scanline_events[i].type = 1;
+ scanline_events[i].memtype = scanline_events[i - 1].memtype;
+ i++;
+ }
+#endif /* ! GRUB_MMAP_REGISTER_BY_FIRMWARE */
+
+ grub_machine_mmap_iterate (fill_hook);
+
+ /* Primitive bubble sort. It has complexity O(n^2) but since we're
+ unlikely to have more than 100 chunks it's probably one of the
+ fastest for one purpose. */
+ done = 1;
+ while (done)
+ {
+ done = 0;
+ for (i = 0; i < 2 * mmap_num - 1; i++)
+ if (scanline_events[i + 1].pos < scanline_events[i].pos
+ || (scanline_events[i + 1].pos == scanline_events[i].pos
+ && scanline_events[i + 1].type == 0
+ && scanline_events[i].type == 1))
+ {
+ t = scanline_events[i + 1];
+ scanline_events[i + 1] = scanline_events[i];
+ scanline_events[i] = t;
+ done = 1;
+ }
+ }
+
+ lastaddr = scanline_events[0].pos;
+ lasttype = scanline_events[0].memtype;
+ for (i = 0; i < 2 * mmap_num; i++)
+ {
+ unsigned k;
+ /* Process event. */
+ if (scanline_events[i].type)
+ present[scanline_events[i].memtype]--;
+ else
+ present[scanline_events[i].memtype]++;
+
+ /* Determine current region type. */
+ curtype = -1;
+ for (k = 0; k < ARRAY_SIZE (priority); k++)
+ if (present[k] && (curtype == -1 || priority[k] > priority[curtype]))
+ curtype = k;
+
+ /* Announce region to the hook if necessary. */
+ if ((curtype == -1 || curtype != lasttype)
+ && lastaddr != scanline_events[i].pos
+ && lasttype != -1
+ && lasttype != GRUB_MEMORY_HOLE
+ && hook (lastaddr, scanline_events[i].pos - lastaddr, lasttype))
+ {
+ grub_free (scanline_events);
+ return GRUB_ERR_NONE;
+ }
+
+ /* Update last values if necessary. */
+ if (curtype == -1 || curtype != lasttype)
+ {
+ lasttype = curtype;
+ lastaddr = scanline_events[i].pos;
+ }
+ }
+
+ grub_free (scanline_events);
+ return GRUB_ERR_NONE;
+}
+
+#ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
+int
+grub_mmap_register (grub_uint64_t start, grub_uint64_t size, int type)
+{
+ struct grub_mmap_region *cur;
+
+ grub_dprintf ("mmap", "registering\n");
+
+ cur = (struct grub_mmap_region *)
+ grub_malloc (sizeof (struct grub_mmap_region));
+ if (! cur)
+ {
+ grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate memory map overlay");
+ return 0;
+ }
+
+ cur->next = grub_mmap_overlays;
+ cur->start = start;
+ cur->end = start + size;
+ cur->type = type;
+ cur->handle = curhandle++;
+ grub_mmap_overlays = cur;
+
+ if (grub_machine_mmap_register (start, size, type, curhandle))
+ {
+ grub_mmap_overlays = cur->next;
+ grub_free (cur);
+ return 0;
+ }
+
+ return cur->handle;
+}
+
+grub_err_t
+grub_mmap_unregister (int handle)
+{
+ struct grub_mmap_region *cur, *prev;
+
+ for (cur = grub_mmap_overlays, prev = 0; cur; prev= cur, cur = cur->next)
+ if (handle == cur->handle)
+ {
+ grub_err_t err;
+ if ((err = grub_machine_mmap_unregister (handle)))
+ return err;
+
+ if (prev)
+ prev->next = cur->next;
+ else
+ grub_mmap_overlays = cur->next;
+ grub_free (cur);
+ return GRUB_ERR_NONE;
+ }
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "mmap overlay not found");
+}
+
+#endif /* ! GRUB_MMAP_REGISTER_BY_FIRMWARE */
+
+#define CHUNK_SIZE 0x400
+
+static inline grub_uint64_t
+fill_mask (grub_uint64_t addr, grub_uint64_t mask, grub_uint64_t iterator)
+{
+ int i, j;
+ grub_uint64_t ret = (addr & mask);
+
+ /* Find first fixed bit. */
+ for (i = 0; i < 64; i++)
+ if ((mask & (1ULL << i)) != 0)
+ break;
+ j = 0;
+ for (; i < 64; i++)
+ if ((mask & (1ULL << i)) == 0)
+ {
+ if ((iterator & (1ULL << j)) != 0)
+ ret |= 1ULL << i;
+ j++;
+ }
+ return ret;
+}
+
+static grub_err_t
+grub_cmd_badram (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ char * str;
+ grub_uint64_t badaddr, badmask;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr,
+ grub_uint64_t size,
+ grub_memory_type_t type __attribute__ ((unused)))
+ {
+ grub_uint64_t iterator, low, high, cur;
+ int tail, var;
+ int i;
+ grub_dprintf ("badram", "hook %llx+%llx\n", (unsigned long long) addr,
+ (unsigned long long) size);
+
+ /* How many trailing zeros? */
+ for (tail = 0; ! (badmask & (1ULL << tail)); tail++);
+
+ /* How many zeros in mask? */
+ var = 0;
+ for (i = 0; i < 64; i++)
+ if (! (badmask & (1ULL << i)))
+ var++;
+
+ if (fill_mask (badaddr, badmask, 0) >= addr)
+ iterator = 0;
+ else
+ {
+ low = 0;
+ high = ~0ULL;
+ /* Find starting value. Keep low and high such that
+ fill_mask (low) < addr and fill_mask (high) >= addr;
+ */
+ while (high - low > 1)
+ {
+ cur = (low + high) / 2;
+ if (fill_mask (badaddr, badmask, cur) >= addr)
+ high = cur;
+ else
+ low = cur;
+ }
+ iterator = high;
+ }
+
+ for (; iterator < (1ULL << (var - tail))
+ && (cur = fill_mask (badaddr, badmask, iterator)) < addr + size;
+ iterator++)
+ {
+ grub_dprintf ("badram", "%llx (size %llx) is a badram range\n",
+ (unsigned long long) cur, (1ULL << tail));
+ grub_mmap_register (cur, (1ULL << tail), GRUB_MEMORY_HOLE);
+ }
+ return 0;
+ }
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "badram string required");
+
+ grub_dprintf ("badram", "executing badram\n");
+
+ str = args[0];
+
+ while (1)
+ {
+ /* Parse address and mask. */
+ badaddr = grub_strtoull (str, &str, 16);
+ if (*str == ',')
+ str++;
+ badmask = grub_strtoull (str, &str, 16);
+ if (*str == ',')
+ str++;
+
+ if (grub_errno == GRUB_ERR_BAD_NUMBER)
+ {
+ grub_errno = 0;
+ return GRUB_ERR_NONE;
+ }
+
+ /* When part of a page is tainted, we discard the whole of it. There's
+ no point in providing sub-page chunks. */
+ badmask &= ~(CHUNK_SIZE - 1);
+
+ grub_dprintf ("badram", "badram %llx:%llx\n",
+ (unsigned long long) badaddr, (unsigned long long) badmask);
+
+ grub_mmap_iterate (hook);
+ }
+}
+
+static grub_uint64_t
+parsemem (const char *str)
+{
+ grub_uint64_t ret;
+ char *ptr;
+
+ ret = grub_strtoul (str, &ptr, 0);
+
+ switch (*ptr)
+ {
+ case 'K':
+ return ret << 10;
+ case 'M':
+ return ret << 20;
+ case 'G':
+ return ret << 30;
+ case 'T':
+ return ret << 40;
+ }
+ return ret;
+}
+
+static grub_err_t
+grub_cmd_cutmem (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ grub_uint64_t from, to;
+
+ auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t,
+ grub_memory_type_t);
+ int NESTED_FUNC_ATTR hook (grub_uint64_t addr,
+ grub_uint64_t size,
+ grub_memory_type_t type __attribute__ ((unused)))
+ {
+ grub_uint64_t end = addr + size;
+
+ if (addr <= from)
+ addr = from;
+ if (end >= to)
+ end = to;
+
+ if (end <= addr)
+ return 0;
+
+ grub_mmap_register (addr, end - addr, GRUB_MEMORY_HOLE);
+ return 0;
+ }
+
+ if (argc != 2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "argements required");
+
+ from = parsemem (args[0]);
+ if (grub_errno)
+ return grub_errno;
+
+ to = parsemem (args[1]);
+ if (grub_errno)
+ return grub_errno;
+
+ grub_mmap_iterate (hook);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_command_t cmd, cmd_cut;
+
+
+GRUB_MOD_INIT(mmap)
+{
+ cmd = grub_register_command ("badram", grub_cmd_badram,
+ N_("ADDR1,MASK1[,ADDR2,MASK2[,...]]"),
+ N_("Declare memory regions as badram."));
+ cmd_cut = grub_register_command ("cutmem", grub_cmd_cutmem,
+ N_("FROM[K|M|G] TO[K|M|G]"),
+ N_("Remove any memory regions in specified range."));
+
+}
+
+GRUB_MOD_FINI(mmap)
+{
+ grub_unregister_command (cmd);
+ grub_unregister_command (cmd_cut);
+}
+
diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
new file mode 100644
index 0000000..8e19568
--- /dev/null
+++ b/grub-core/normal/auth.c
@@ -0,0 +1,273 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/auth.h>
+#include <grub/list.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/env.h>
+#include <grub/normal.h>
+#include <grub/time.h>
+#include <grub/i18n.h>
+
+struct grub_auth_user
+{
+ struct grub_auth_user *next;
+ char *name;
+ grub_auth_callback_t callback;
+ void *arg;
+ int authenticated;
+};
+
+static struct grub_auth_user *users = NULL;
+
+grub_err_t
+grub_auth_register_authentication (const char *user,
+ grub_auth_callback_t callback,
+ void *arg)
+{
+ struct grub_auth_user *cur;
+
+ cur = grub_named_list_find (GRUB_AS_NAMED_LIST (users), user);
+ if (!cur)
+ cur = grub_zalloc (sizeof (*cur));
+ if (!cur)
+ return grub_errno;
+ cur->callback = callback;
+ cur->arg = arg;
+ if (! cur->name)
+ {
+ cur->name = grub_strdup (user);
+ if (!cur->name)
+ {
+ grub_free (cur);
+ return grub_errno;
+ }
+ grub_list_push (GRUB_AS_LIST_P (&users), GRUB_AS_LIST (cur));
+ }
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_auth_unregister_authentication (const char *user)
+{
+ struct grub_auth_user *cur;
+ cur = grub_named_list_find (GRUB_AS_NAMED_LIST (users), user);
+ if (!cur)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "user '%s' not found", user);
+ if (!cur->authenticated)
+ {
+ grub_free (cur->name);
+ grub_list_remove (GRUB_AS_LIST_P (&users), GRUB_AS_LIST (cur));
+ grub_free (cur);
+ }
+ else
+ {
+ cur->callback = NULL;
+ cur->arg = NULL;
+ }
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_auth_authenticate (const char *user)
+{
+ struct grub_auth_user *cur;
+
+ cur = grub_named_list_find (GRUB_AS_NAMED_LIST (users), user);
+ if (!cur)
+ cur = grub_zalloc (sizeof (*cur));
+ if (!cur)
+ return grub_errno;
+
+ cur->authenticated = 1;
+
+ if (! cur->name)
+ {
+ cur->name = grub_strdup (user);
+ if (!cur->name)
+ {
+ grub_free (cur);
+ return grub_errno;
+ }
+ grub_list_push (GRUB_AS_LIST_P (&users), GRUB_AS_LIST (cur));
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_auth_deauthenticate (const char *user)
+{
+ struct grub_auth_user *cur;
+ cur = grub_named_list_find (GRUB_AS_NAMED_LIST (users), user);
+ if (!cur)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "user '%s' not found", user);
+ if (!cur->callback)
+ {
+ grub_free (cur->name);
+ grub_list_remove (GRUB_AS_LIST_P (&users), GRUB_AS_LIST (cur));
+ grub_free (cur);
+ }
+ else
+ cur->authenticated = 0;
+ return GRUB_ERR_NONE;
+}
+
+static int
+is_authenticated (const char *userlist)
+{
+ const char *superusers;
+ struct grub_auth_user *user;
+
+ superusers = grub_env_get ("superusers");
+
+ if (!superusers)
+ return 1;
+
+ FOR_LIST_ELEMENTS (user, users)
+ {
+ if (!(user->authenticated))
+ continue;
+
+ if ((userlist && grub_strword (userlist, user->name))
+ || grub_strword (superusers, user->name))
+ return 1;
+ }
+
+ return 0;
+}
+
+static int
+grub_username_get (char buf[], unsigned buf_size)
+{
+ unsigned cur_len = 0;
+ int key;
+
+ while (1)
+ {
+ key = grub_getkey ();
+ if (key == '\n' || key == '\r')
+ break;
+
+ if (key == '\e')
+ {
+ cur_len = 0;
+ break;
+ }
+
+ if (key == '\b')
+ {
+ cur_len--;
+ grub_printf ("\b");
+ continue;
+ }
+
+ if (!grub_isprint (key))
+ continue;
+
+ if (cur_len + 2 < buf_size)
+ {
+ buf[cur_len++] = key;
+ grub_printf ("%c", key);
+ }
+ }
+
+ grub_memset (buf + cur_len, 0, buf_size - cur_len);
+
+ grub_xputs ("\n");
+ grub_refresh ();
+
+ return (key != '\e');
+}
+
+grub_err_t
+grub_auth_check_authentication (const char *userlist)
+{
+ char login[1024];
+ struct grub_auth_user *cur = NULL;
+ static unsigned long punishment_delay = 1;
+ char entered[GRUB_AUTH_MAX_PASSLEN];
+ struct grub_auth_user *user;
+
+ grub_memset (login, 0, sizeof (login));
+
+ if (is_authenticated (userlist))
+ {
+ punishment_delay = 1;
+ return GRUB_ERR_NONE;
+ }
+
+ grub_puts_ (N_("Enter username: "));
+
+ if (!grub_username_get (login, sizeof (login) - 1))
+ goto access_denied;
+
+ grub_puts_ (N_("Enter password: "));
+
+ if (!grub_password_get (entered, GRUB_AUTH_MAX_PASSLEN))
+ goto access_denied;
+
+ FOR_LIST_ELEMENTS (user, users)
+ {
+ if (grub_strcmp (login, user->name) == 0)
+ cur = user;
+ }
+
+ if (!cur || ! cur->callback)
+ goto access_denied;
+
+ cur->callback (login, entered, cur->arg);
+ if (is_authenticated (userlist))
+ {
+ punishment_delay = 1;
+ return GRUB_ERR_NONE;
+ }
+
+ access_denied:
+ grub_sleep (punishment_delay);
+
+ if (punishment_delay < GRUB_ULONG_MAX / 2)
+ punishment_delay *= 2;
+
+ return GRUB_ACCESS_DENIED;
+}
+
+static grub_err_t
+grub_cmd_authenticate (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ return grub_auth_check_authentication ((argc >= 1) ? args[0] : "");
+}
+
+static grub_command_t cmd;
+
+void
+grub_normal_auth_init (void)
+{
+ cmd = grub_register_command ("authenticate",
+ grub_cmd_authenticate,
+ N_("[USERLIST]"), N_("Authenticate users"));
+
+}
+
+void
+grub_normal_auth_fini (void)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/normal/autofs.c b/grub-core/normal/autofs.c
new file mode 100644
index 0000000..e1d4c01
--- /dev/null
+++ b/grub-core/normal/autofs.c
@@ -0,0 +1,136 @@
+/* autofs.c - support auto-loading from fs.lst */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/fs.h>
+#include <grub/normal.h>
+
+/* This is used to store the names of filesystem modules for auto-loading. */
+static grub_named_list_t fs_module_list;
+
+/* The auto-loading hook for filesystems. */
+static int
+autoload_fs_module (void)
+{
+ grub_named_list_t p;
+
+ while ((p = fs_module_list) != NULL)
+ {
+ if (! grub_dl_get (p->name) && grub_dl_load (p->name))
+ return 1;
+
+ if (grub_errno)
+ grub_print_error ();
+
+ fs_module_list = p->next;
+ grub_free (p->name);
+ grub_free (p);
+ }
+
+ return 0;
+}
+
+/* Read the file fs.lst for auto-loading. */
+void
+read_fs_list (const char *prefix)
+{
+ if (prefix)
+ {
+ char *filename;
+
+ filename = grub_xasprintf ("%s/fs.lst", prefix);
+ if (filename)
+ {
+ grub_file_t file;
+ grub_fs_autoload_hook_t tmp_autoload_hook;
+
+ /* This rules out the possibility that read_fs_list() is invoked
+ recursively when we call grub_file_open() below. */
+ tmp_autoload_hook = grub_fs_autoload_hook;
+ grub_fs_autoload_hook = NULL;
+
+ file = grub_file_open (filename);
+ if (file)
+ {
+ /* Override previous fs.lst. */
+ while (fs_module_list)
+ {
+ grub_named_list_t tmp;
+ tmp = fs_module_list->next;
+ grub_free (fs_module_list);
+ fs_module_list = tmp;
+ }
+
+ while (1)
+ {
+ char *buf;
+ char *p;
+ char *q;
+ grub_named_list_t fs_mod;
+
+ buf = grub_file_getline (file);
+ if (! buf)
+ break;
+
+ p = buf;
+ q = buf + grub_strlen (buf) - 1;
+
+ /* Ignore space. */
+ while (grub_isspace (*p))
+ p++;
+
+ while (p < q && grub_isspace (*q))
+ *q-- = '\0';
+
+ /* If the line is empty, skip it. */
+ if (p >= q)
+ continue;
+
+ fs_mod = grub_malloc (sizeof (*fs_mod));
+ if (! fs_mod)
+ continue;
+
+ fs_mod->name = grub_strdup (p);
+ if (! fs_mod->name)
+ {
+ grub_free (fs_mod);
+ continue;
+ }
+
+ fs_mod->next = fs_module_list;
+ fs_module_list = fs_mod;
+ }
+
+ grub_file_close (file);
+ grub_fs_autoload_hook = tmp_autoload_hook;
+ }
+
+ grub_free (filename);
+ }
+ }
+
+ /* Ignore errors. */
+ grub_errno = GRUB_ERR_NONE;
+
+ /* Set the hook. */
+ grub_fs_autoload_hook = autoload_fs_module;
+}
diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c
new file mode 100644
index 0000000..85ead53
--- /dev/null
+++ b/grub-core/normal/charset.c
@@ -0,0 +1,1274 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ Current problems with Unicode rendering:
+ - B and BN bidi type characters (ignored)
+ - Mc type characters with combining class 0 (poorly combined)
+ - Mn type characters with combining class 0 (poorly combined)
+ - Me type characters with combining class 0 (poorly combined)
+ - Cf type characters (ignored)
+ - Cc type characters (ignored)
+ - Line-breaking rules (e.g. Zs type characters)
+ - Indic languages
+ - non-Semitic shaping (rarely used)
+ - Zl and Zp characters
+ - Combining characters of types 7, 8, 9, 21, 35, 36, 84, 91, 103, 107,
+ 118, 122, 129, 130, 132, 218, 224, 226, 233, 234
+ - Private use characters (not really a problem)
+ - Variations (no font support)
+ - Vertical text
+ - Ligatures
+ Font information ignored:
+ - Kerning
+ - Justification data
+ - Glyph posititioning
+ - Baseline data
+ Most underline diacritics aren't displayed in gfxterm
+ */
+
+/* Convert a (possibly null-terminated) UTF-8 string of at most SRCSIZE
+ bytes (if SRCSIZE is -1, it is ignored) in length to a UTF-16 string.
+ Return the number of characters converted. DEST must be able to hold
+ at least DESTSIZE characters. If an invalid sequence is found, return -1.
+ If SRCEND is not NULL, then *SRCEND is set to the next byte after the
+ last byte used in SRC. */
+
+#include <grub/charset.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/unicode.h>
+#include <grub/term.h>
+#include <grub/normal.h>
+
+#ifdef HAVE_UNIFONT_WIDTHSPEC
+#include "widthspec.h"
+#endif
+
+grub_ssize_t
+grub_utf8_to_utf16 (grub_uint16_t *dest, grub_size_t destsize,
+ const grub_uint8_t *src, grub_size_t srcsize,
+ const grub_uint8_t **srcend)
+{
+ grub_uint16_t *p = dest;
+ int count = 0;
+ grub_uint32_t code = 0;
+
+ if (srcend)
+ *srcend = src;
+
+ while (srcsize && destsize)
+ {
+ grub_uint32_t c = *src++;
+ if (srcsize != (grub_size_t)-1)
+ srcsize--;
+ if (count)
+ {
+ if ((c & GRUB_UINT8_2_LEADINGBITS) != GRUB_UINT8_1_LEADINGBIT)
+ {
+ /* invalid */
+ return -1;
+ }
+ else
+ {
+ code <<= 6;
+ code |= (c & GRUB_UINT8_6_TRAILINGBITS);
+ count--;
+ }
+ }
+ else
+ {
+ if (c == 0)
+ break;
+
+ if ((c & GRUB_UINT8_1_LEADINGBIT) == 0)
+ code = c;
+ else if ((c & GRUB_UINT8_3_LEADINGBITS) == GRUB_UINT8_2_LEADINGBITS)
+ {
+ count = 1;
+ code = c & GRUB_UINT8_5_TRAILINGBITS;
+ }
+ else if ((c & GRUB_UINT8_4_LEADINGBITS) == GRUB_UINT8_3_LEADINGBITS)
+ {
+ count = 2;
+ code = c & GRUB_UINT8_4_TRAILINGBITS;
+ }
+ else if ((c & GRUB_UINT8_5_LEADINGBITS) == GRUB_UINT8_4_LEADINGBITS)
+ {
+ count = 3;
+ code = c & GRUB_UINT8_3_TRAILINGBITS;
+ }
+ else
+ return -1;
+ }
+
+ if (count == 0)
+ {
+ if (destsize < 2 && code >= GRUB_UCS2_LIMIT)
+ break;
+ if (code >= GRUB_UCS2_LIMIT)
+ {
+ *p++ = GRUB_UTF16_UPPER_SURROGATE (code);
+ *p++ = GRUB_UTF16_LOWER_SURROGATE (code);
+ destsize -= 2;
+ }
+ else
+ {
+ *p++ = code;
+ destsize--;
+ }
+ }
+ }
+
+ if (srcend)
+ *srcend = src;
+ return p - dest;
+}
+
+/* Convert UCS-4 to UTF-8. */
+void
+grub_ucs4_to_utf8 (grub_uint32_t *src, grub_size_t size,
+ grub_uint8_t *dest, grub_size_t destsize)
+{
+ /* Keep last char for \0. */
+ grub_uint8_t *destend = dest + destsize - 1;
+
+ while (size-- && dest < destend)
+ {
+ grub_uint32_t code = *src++;
+
+ if (code <= 0x007F)
+ *dest++ = code;
+ else if (code <= 0x07FF)
+ {
+ if (dest + 1 >= destend)
+ break;
+ *dest++ = (code >> 6) | 0xC0;
+ *dest++ = (code & 0x3F) | 0x80;
+ }
+ else if ((code >= 0xDC00 && code <= 0xDFFF)
+ || (code >= 0xD800 && code <= 0xDBFF))
+ {
+ /* No surrogates in UCS-4... */
+ *dest++ = '?';
+ }
+ else if (code < 0x10000)
+ {
+ if (dest + 2 >= destend)
+ break;
+ *dest++ = (code >> 12) | 0xE0;
+ *dest++ = ((code >> 6) & 0x3F) | 0x80;
+ *dest++ = (code & 0x3F) | 0x80;
+ }
+ else
+ {
+ if (dest + 3 >= destend)
+ break;
+ *dest++ = (code >> 18) | 0xF0;
+ *dest++ = ((code >> 12) & 0x3F) | 0x80;
+ *dest++ = ((code >> 6) & 0x3F) | 0x80;
+ *dest++ = (code & 0x3F) | 0x80;
+ }
+ }
+ *dest = 0;
+}
+
+/* Convert UCS-4 to UTF-8. */
+char *
+grub_ucs4_to_utf8_alloc (grub_uint32_t *src, grub_size_t size)
+{
+ grub_size_t remaining;
+ grub_uint32_t *ptr;
+ grub_size_t cnt = 0;
+ grub_uint8_t *ret;
+
+ remaining = size;
+ ptr = src;
+ while (remaining--)
+ {
+ grub_uint32_t code = *ptr++;
+
+ if (code <= 0x007F)
+ cnt++;
+ else if (code <= 0x07FF)
+ cnt += 2;
+ else if ((code >= 0xDC00 && code <= 0xDFFF)
+ || (code >= 0xD800 && code <= 0xDBFF))
+ /* No surrogates in UCS-4... */
+ cnt++;
+ else if (code < 0x10000)
+ cnt += 3;
+ else
+ cnt += 4;
+ }
+ cnt++;
+
+ ret = grub_malloc (cnt);
+ if (!ret)
+ return 0;
+
+ grub_ucs4_to_utf8 (src, size, ret, cnt);
+
+ return (char *) ret;
+}
+
+int
+grub_is_valid_utf8 (const grub_uint8_t *src, grub_size_t srcsize)
+{
+ grub_uint32_t code = 0;
+ int count = 0;
+
+ while (srcsize)
+ {
+ grub_uint32_t c = *src++;
+ if (srcsize != (grub_size_t)-1)
+ srcsize--;
+ if (count)
+ {
+ if ((c & 0xc0) != 0x80)
+ {
+ /* invalid */
+ return 0;
+ }
+ else
+ {
+ code <<= 6;
+ code |= (c & 0x3f);
+ count--;
+ }
+ }
+ else
+ {
+ if (c == 0)
+ break;
+
+ if ((c & 0x80) == 0x00)
+ code = c;
+ else if ((c & 0xe0) == 0xc0)
+ {
+ count = 1;
+ code = c & 0x1f;
+ }
+ else if ((c & 0xf0) == 0xe0)
+ {
+ count = 2;
+ code = c & 0x0f;
+ }
+ else if ((c & 0xf8) == 0xf0)
+ {
+ count = 3;
+ code = c & 0x07;
+ }
+ else
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+int
+grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg,
+ grub_uint32_t **last_position)
+{
+ grub_size_t msg_len = grub_strlen (msg);
+
+ *unicode_msg = grub_malloc (msg_len * sizeof (grub_uint32_t));
+
+ if (!*unicode_msg)
+ return -1;
+
+ msg_len = grub_utf8_to_ucs4 (*unicode_msg, msg_len,
+ (grub_uint8_t *) msg, -1, 0);
+
+ if (last_position)
+ *last_position = *unicode_msg + msg_len;
+
+ return msg_len;
+}
+
+/* Convert a (possibly null-terminated) UTF-8 string of at most SRCSIZE
+ bytes (if SRCSIZE is -1, it is ignored) in length to a UCS-4 string.
+ Return the number of characters converted. DEST must be able to hold
+ at least DESTSIZE characters.
+ If SRCEND is not NULL, then *SRCEND is set to the next byte after the
+ last byte used in SRC. */
+grub_size_t
+grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_size_t destsize,
+ const grub_uint8_t *src, grub_size_t srcsize,
+ const grub_uint8_t **srcend)
+{
+ grub_uint32_t *p = dest;
+ int count = 0;
+ grub_uint32_t code = 0;
+
+ if (srcend)
+ *srcend = src;
+
+ while (srcsize && destsize)
+ {
+ grub_uint32_t c = *src++;
+ if (srcsize != (grub_size_t)-1)
+ srcsize--;
+ if (count)
+ {
+ if ((c & 0xc0) != 0x80)
+ {
+ /* invalid */
+ code = '?';
+ /* Character c may be valid, don't eat it. */
+ src--;
+ if (srcsize != (grub_size_t)-1)
+ srcsize++;
+ count = 0;
+ }
+ else
+ {
+ code <<= 6;
+ code |= (c & 0x3f);
+ count--;
+ }
+ }
+ else
+ {
+ if (c == 0)
+ break;
+
+ if ((c & 0x80) == 0x00)
+ code = c;
+ else if ((c & 0xe0) == 0xc0)
+ {
+ count = 1;
+ code = c & 0x1f;
+ }
+ else if ((c & 0xf0) == 0xe0)
+ {
+ count = 2;
+ code = c & 0x0f;
+ }
+ else if ((c & 0xf8) == 0xf0)
+ {
+ count = 3;
+ code = c & 0x07;
+ }
+ else
+ {
+ /* invalid */
+ code = '?';
+ count = 0;
+ }
+ }
+
+ if (count == 0)
+ {
+ *p++ = code;
+ destsize--;
+ }
+ }
+
+ if (srcend)
+ *srcend = src;
+ return p - dest;
+}
+
+static grub_uint8_t *join_types = NULL;
+
+static void
+unpack_join (void)
+{
+ unsigned i;
+ struct grub_unicode_compact_range *cur;
+
+ join_types = grub_zalloc (GRUB_UNICODE_MAX_CACHED_CHAR);
+ if (!join_types)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+ for (cur = grub_unicode_compact; cur->end; cur++)
+ for (i = cur->start; i <= cur->end
+ && i < GRUB_UNICODE_MAX_CACHED_CHAR; i++)
+ join_types[i] = cur->join_type;
+}
+
+static grub_uint8_t *bidi_types = NULL;
+
+static void
+unpack_bidi (void)
+{
+ unsigned i;
+ struct grub_unicode_compact_range *cur;
+
+ bidi_types = grub_zalloc (GRUB_UNICODE_MAX_CACHED_CHAR);
+ if (!bidi_types)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+ for (cur = grub_unicode_compact; cur->end; cur++)
+ for (i = cur->start; i <= cur->end
+ && i < GRUB_UNICODE_MAX_CACHED_CHAR; i++)
+ if (cur->bidi_mirror)
+ bidi_types[i] = cur->bidi_type | 0x80;
+ else
+ bidi_types[i] = cur->bidi_type | 0x00;
+}
+
+static inline enum grub_bidi_type
+get_bidi_type (grub_uint32_t c)
+{
+ struct grub_unicode_compact_range *cur;
+
+ if (!bidi_types)
+ unpack_bidi ();
+
+ if (bidi_types && c < GRUB_UNICODE_MAX_CACHED_CHAR)
+ return bidi_types[c] & 0x7f;
+
+ for (cur = grub_unicode_compact; cur->end; cur++)
+ if (cur->start <= c && c <= cur->end)
+ return cur->bidi_type;
+
+ return GRUB_BIDI_TYPE_L;
+}
+
+static inline enum grub_join_type
+get_join_type (grub_uint32_t c)
+{
+ struct grub_unicode_compact_range *cur;
+
+ if (!join_types)
+ unpack_join ();
+
+ if (join_types && c < GRUB_UNICODE_MAX_CACHED_CHAR)
+ return join_types[c];
+
+ for (cur = grub_unicode_compact; cur->end; cur++)
+ if (cur->start <= c && c <= cur->end)
+ return cur->join_type;
+
+ return GRUB_JOIN_TYPE_NONJOINING;
+}
+
+static inline int
+is_mirrored (grub_uint32_t c)
+{
+ struct grub_unicode_compact_range *cur;
+
+ if (!bidi_types)
+ unpack_bidi ();
+
+ if (bidi_types && c < GRUB_UNICODE_MAX_CACHED_CHAR)
+ return !!(bidi_types[c] & 0x80);
+
+ for (cur = grub_unicode_compact; cur->end; cur++)
+ if (cur->start <= c && c <= cur->end)
+ return cur->bidi_mirror;
+
+ return 0;
+}
+
+enum grub_comb_type
+grub_unicode_get_comb_type (grub_uint32_t c)
+{
+ static grub_uint8_t *comb_types = NULL;
+ struct grub_unicode_compact_range *cur;
+
+ if (!comb_types)
+ {
+ unsigned i;
+ comb_types = grub_zalloc (GRUB_UNICODE_MAX_CACHED_CHAR);
+ if (comb_types)
+ for (cur = grub_unicode_compact; cur->end; cur++)
+ for (i = cur->start; i <= cur->end
+ && i < GRUB_UNICODE_MAX_CACHED_CHAR; i++)
+ comb_types[i] = cur->comb_type;
+ else
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if (comb_types && c < GRUB_UNICODE_MAX_CACHED_CHAR)
+ return comb_types[c];
+
+ for (cur = grub_unicode_compact; cur->end; cur++)
+ if (cur->start <= c && c <= cur->end)
+ return cur->comb_type;
+
+ return GRUB_UNICODE_COMB_NONE;
+}
+
+#ifdef HAVE_UNIFONT_WIDTHSPEC
+
+grub_ssize_t
+grub_unicode_estimate_width (const struct grub_unicode_glyph *c)
+{
+ if (grub_unicode_get_comb_type (c->base))
+ return 0;
+ if (widthspec[c->base >> 3] & (1 << (c->base & 7)))
+ return 2;
+ else
+ return 1;
+}
+
+#endif
+
+static inline int
+is_type_after (enum grub_comb_type a, enum grub_comb_type b)
+{
+ /* Shadda is numerically higher than most of Arabic diacritics but has
+ to be rendered before them. */
+ if (a == GRUB_UNICODE_COMB_ARABIC_SHADDA
+ && b <= GRUB_UNICODE_COMB_ARABIC_KASRA
+ && b >= GRUB_UNICODE_COMB_ARABIC_FATHATAN)
+ return 0;
+ if (b == GRUB_UNICODE_COMB_ARABIC_SHADDA
+ && a <= GRUB_UNICODE_COMB_ARABIC_KASRA
+ && a >= GRUB_UNICODE_COMB_ARABIC_FATHATAN)
+ return 1;
+ return a > b;
+}
+
+grub_size_t
+grub_unicode_aglomerate_comb (const grub_uint32_t *in, grub_size_t inlen,
+ struct grub_unicode_glyph *out)
+{
+ int haveout = 0;
+ const grub_uint32_t *ptr;
+ unsigned last_comb_pointer = 0;
+
+ grub_memset (out, 0, sizeof (*out));
+
+ for (ptr = in; ptr < in + inlen; ptr++)
+ {
+ /* Variation selectors >= 17 are outside of BMP and SMP.
+ Handle variation selectors first to avoid potentially costly lookups.
+ */
+ if (*ptr >= GRUB_UNICODE_VARIATION_SELECTOR_1
+ && *ptr <= GRUB_UNICODE_VARIATION_SELECTOR_16)
+ {
+ if (haveout)
+ out->variant = *ptr - GRUB_UNICODE_VARIATION_SELECTOR_1 + 1;
+ continue;
+
+ }
+ if (*ptr >= GRUB_UNICODE_VARIATION_SELECTOR_17
+ && *ptr <= GRUB_UNICODE_VARIATION_SELECTOR_256)
+ {
+ if (haveout)
+ out->variant = *ptr - GRUB_UNICODE_VARIATION_SELECTOR_17 + 17;
+ continue;
+ }
+
+ enum grub_comb_type comb_type;
+ comb_type = grub_unicode_get_comb_type (*ptr);
+ if (comb_type)
+ {
+ struct grub_unicode_combining *n;
+ unsigned j;
+
+ if (!haveout)
+ continue;
+
+ if (comb_type == GRUB_UNICODE_COMB_MC
+ || comb_type == GRUB_UNICODE_COMB_ME
+ || comb_type == GRUB_UNICODE_COMB_MN)
+ last_comb_pointer = out->ncomb;
+ n = grub_realloc (out->combining,
+ sizeof (n[0]) * (out->ncomb + 1));
+ if (!n)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+ out->combining = n;
+
+ for (j = last_comb_pointer; j < out->ncomb; j++)
+ if (is_type_after (out->combining[j].type, comb_type))
+ break;
+ grub_memmove (out->combining + j + 1,
+ out->combining + j,
+ (out->ncomb - j)
+ * sizeof (out->combining[0]));
+ out->combining = n;
+ out->combining[j].code = *ptr;
+ out->combining[j].type = comb_type;
+ out->ncomb++;
+ continue;
+ }
+ if (haveout)
+ return ptr - in;
+ haveout = 1;
+ out->base = *ptr;
+ out->variant = 0;
+ out->attributes = 0;
+ out->ncomb = 0;
+ out->estimated_width = 1;
+ out->combining = NULL;
+ }
+ return ptr - in;
+}
+
+static grub_ssize_t
+bidi_line_wrap (struct grub_unicode_glyph *visual_out,
+ struct grub_unicode_glyph *visual,
+ grub_size_t visual_len, unsigned *levels,
+ grub_ssize_t (*getcharwidth) (const struct grub_unicode_glyph *visual),
+ grub_size_t maxwidth, grub_size_t startwidth)
+{
+ struct grub_unicode_glyph *outptr = visual_out;
+ unsigned line_start = 0;
+ grub_ssize_t line_width = startwidth;
+ unsigned k;
+ grub_ssize_t last_space = -1;
+ grub_ssize_t last_space_width = 0;
+
+ auto void revert (unsigned start, unsigned end);
+ void revert (unsigned start, unsigned end)
+ {
+ struct grub_unicode_glyph t;
+ unsigned i, tl;
+ for (i = 0; i <= (end - start) / 2; i++)
+ {
+ t = visual[start + i];
+ visual[start + i] = visual[end - i];
+ visual[end - i] = t;
+ tl = levels[start + i];
+ levels[start + i] = levels[end - i];
+ levels[end - i] = tl;
+ }
+ }
+
+ if (!visual_len)
+ return 0;
+
+ for (k = 0; k <= visual_len; k++)
+ {
+ grub_ssize_t last_width = 0;
+
+ if (getcharwidth && k != visual_len)
+ line_width += last_width = getcharwidth (&visual[k]);
+
+ if (k != visual_len && visual[k].base == ' ')
+ {
+ last_space = k;
+ last_space_width = line_width;
+ }
+
+ if (((grub_ssize_t) maxwidth > 0
+ && line_width > (grub_ssize_t) maxwidth) || k == visual_len)
+ {
+ unsigned min_odd_level = 0xffffffff;
+ unsigned max_level = 0;
+
+ if (k != visual_len && last_space > (signed) line_start)
+ k = last_space;
+ else if (k != visual_len && line_start == 0 && startwidth != 0)
+ {
+ k = 0;
+ last_space_width = startwidth;
+ }
+ else
+ last_space_width = line_width - last_width;
+
+ {
+ unsigned i;
+ for (i = line_start; i < k; i++)
+ {
+ if (levels[i] > max_level)
+ max_level = levels[i];
+ if (levels[i] < min_odd_level && (levels[i] & 1))
+ min_odd_level = levels[i];
+ }
+ }
+
+ {
+ unsigned j;
+ /* FIXME: can be optimized. */
+ for (j = max_level; j >= min_odd_level; j--)
+ {
+ unsigned in = 0;
+ unsigned i;
+ for (i = line_start; i < k; i++)
+ {
+ if (i != line_start && levels[i] >= j && levels[i-1] < j)
+ in = i;
+ if (levels[i] >= j && (i + 1 == k || levels[i+1] < j))
+ revert (in, i);
+ }
+ }
+ }
+
+ {
+ unsigned i;
+ for (i = line_start; i < k; i++)
+ {
+ if (is_mirrored (visual[i].base) && levels[i])
+ visual[i].attributes |= GRUB_UNICODE_GLYPH_ATTRIBUTE_MIRROR;
+ if ((visual[i].attributes & GRUB_UNICODE_GLYPH_ATTRIBUTES_JOIN)
+ && levels[i])
+ {
+ int left, right;
+ left = visual[i].attributes
+ & (GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED
+ | GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED_EXPLICIT);
+ right = visual[i].attributes
+ & (GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED
+ | GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED_EXPLICIT);
+ visual[i].attributes &= ~GRUB_UNICODE_GLYPH_ATTRIBUTES_JOIN;
+ left <<= GRUB_UNICODE_GLYPH_ATTRIBUTES_JOIN_LEFT_TO_RIGHT_SHIFT;
+ right >>= GRUB_UNICODE_GLYPH_ATTRIBUTES_JOIN_LEFT_TO_RIGHT_SHIFT;
+ visual[i].attributes |= (left | right);
+ }
+ }
+ }
+
+ {
+ int left_join = 0;
+ unsigned i;
+ for (i = line_start; i < k; i++)
+ {
+ enum grub_join_type join_type = get_join_type (visual[i].base);
+ if (!(visual[i].attributes
+ & GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED_EXPLICIT)
+ && (join_type == GRUB_JOIN_TYPE_LEFT
+ || join_type == GRUB_JOIN_TYPE_DUAL))
+ {
+ if (left_join)
+ visual[i].attributes
+ |= GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED;
+ else
+ visual[i].attributes
+ &= ~GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED;
+ }
+ if (join_type == GRUB_JOIN_TYPE_NONJOINING
+ || join_type == GRUB_JOIN_TYPE_LEFT)
+ left_join = 0;
+ if (join_type == GRUB_JOIN_TYPE_RIGHT
+ || join_type == GRUB_JOIN_TYPE_DUAL
+ || join_type == GRUB_JOIN_TYPE_CAUSING)
+ left_join = 1;
+ }
+ }
+
+ {
+ int right_join = 0;
+ signed i;
+ for (i = k - 1; i >= (signed) line_start; i--)
+ {
+ enum grub_join_type join_type = get_join_type (visual[i].base);
+ if (!(visual[i].attributes
+ & GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED_EXPLICIT)
+ && (join_type == GRUB_JOIN_TYPE_RIGHT
+ || join_type == GRUB_JOIN_TYPE_DUAL))
+ {
+ if (right_join)
+ visual[i].attributes
+ |= GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED;
+ else
+ visual[i].attributes
+ &= ~GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED;
+ }
+ if (join_type == GRUB_JOIN_TYPE_NONJOINING
+ || join_type == GRUB_JOIN_TYPE_RIGHT)
+ right_join = 0;
+ if (join_type == GRUB_JOIN_TYPE_LEFT
+ || join_type == GRUB_JOIN_TYPE_DUAL
+ || join_type == GRUB_JOIN_TYPE_CAUSING)
+ right_join = 1;
+ }
+ }
+
+ grub_memcpy (outptr, &visual[line_start],
+ (k - line_start) * sizeof (visual[0]));
+ outptr += k - line_start;
+ if (k != visual_len)
+ {
+ grub_memset (outptr, 0, sizeof (visual[0]));
+ outptr->base = '\n';
+ outptr++;
+ }
+
+ if ((signed) k == last_space)
+ k++;
+
+ line_start = k;
+ line_width -= last_space_width;
+ }
+ }
+
+ return outptr - visual_out;
+}
+
+
+static grub_ssize_t
+grub_bidi_line_logical_to_visual (const grub_uint32_t *logical,
+ grub_size_t logical_len,
+ struct grub_unicode_glyph *visual_out,
+ grub_ssize_t (*getcharwidth) (const struct grub_unicode_glyph *visual),
+ grub_size_t maxwidth, grub_size_t startwidth)
+{
+ enum grub_bidi_type type = GRUB_BIDI_TYPE_L;
+ enum override_status {OVERRIDE_NEUTRAL = 0, OVERRIDE_R, OVERRIDE_L};
+ unsigned *levels;
+ enum grub_bidi_type *resolved_types;
+ unsigned base_level;
+ enum override_status cur_override;
+ unsigned i;
+ unsigned stack_level[GRUB_BIDI_MAX_EXPLICIT_LEVEL + 3];
+ enum override_status stack_override[GRUB_BIDI_MAX_EXPLICIT_LEVEL + 3];
+ unsigned stack_depth = 0;
+ unsigned invalid_pushes = 0;
+ unsigned visual_len = 0;
+ unsigned run_start, run_end;
+ struct grub_unicode_glyph *visual;
+ unsigned cur_level;
+ int bidi_needed = 0;
+
+ auto void push_stack (unsigned new_override, unsigned new_level);
+ void push_stack (unsigned new_override, unsigned new_level)
+ {
+ if (new_level > GRUB_BIDI_MAX_EXPLICIT_LEVEL)
+ {
+ invalid_pushes++;
+ return;
+ }
+ stack_level[stack_depth] = cur_level;
+ stack_override[stack_depth] = cur_override;
+ stack_depth++;
+ cur_level = new_level;
+ cur_override = new_override;
+ }
+
+ auto void pop_stack (void);
+ void pop_stack (void)
+ {
+ if (invalid_pushes)
+ {
+ invalid_pushes--;
+ return;
+ }
+ if (!stack_depth)
+ return;
+ stack_depth--;
+ cur_level = stack_level[stack_depth];
+ cur_override = stack_override[stack_depth];
+ }
+
+ levels = grub_malloc (sizeof (levels[0]) * logical_len);
+ if (!levels)
+ return -1;
+
+ resolved_types = grub_malloc (sizeof (resolved_types[0]) * logical_len);
+ if (!resolved_types)
+ {
+ grub_free (levels);
+ return -1;
+ }
+
+ visual = grub_malloc (sizeof (visual[0]) * logical_len);
+ if (!visual)
+ {
+ grub_free (resolved_types);
+ grub_free (levels);
+ return -1;
+ }
+
+ for (i = 0; i < logical_len; i++)
+ {
+ type = get_bidi_type (logical[i]);
+ if (type == GRUB_BIDI_TYPE_L || type == GRUB_BIDI_TYPE_AL
+ || type == GRUB_BIDI_TYPE_R)
+ break;
+ }
+ if (type == GRUB_BIDI_TYPE_R || type == GRUB_BIDI_TYPE_AL)
+ base_level = 1;
+ else
+ base_level = 0;
+
+ cur_level = base_level;
+ cur_override = OVERRIDE_NEUTRAL;
+ {
+ const grub_uint32_t *lptr;
+ enum {JOIN_DEFAULT, NOJOIN, JOIN_FORCE} join_state = JOIN_DEFAULT;
+ int zwj_propagate_to_previous = 0;
+ for (lptr = logical; lptr < logical + logical_len;)
+ {
+ grub_size_t p;
+
+ if (*lptr == GRUB_UNICODE_ZWJ)
+ {
+ if (zwj_propagate_to_previous)
+ {
+ visual[visual_len - 1].attributes
+ |= GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED_EXPLICIT
+ | GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED;
+ }
+ zwj_propagate_to_previous = 0;
+ join_state = JOIN_FORCE;
+ lptr++;
+ continue;
+ }
+
+ if (*lptr == GRUB_UNICODE_ZWNJ)
+ {
+ if (zwj_propagate_to_previous)
+ {
+ visual[visual_len - 1].attributes
+ |= GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED_EXPLICIT;
+ visual[visual_len - 1].attributes
+ &= ~GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED;
+ }
+ zwj_propagate_to_previous = 0;
+ join_state = NOJOIN;
+ lptr++;
+ continue;
+ }
+
+ p = grub_unicode_aglomerate_comb (lptr, logical + logical_len - lptr,
+ &visual[visual_len]);
+
+ type = get_bidi_type (visual[visual_len].base);
+ switch (type)
+ {
+ case GRUB_BIDI_TYPE_RLE:
+ bidi_needed = 1;
+ push_stack (cur_override, (cur_level | 1) + 1);
+ break;
+ case GRUB_BIDI_TYPE_RLO:
+ bidi_needed = 1;
+ push_stack (OVERRIDE_R, (cur_level | 1) + 1);
+ break;
+ case GRUB_BIDI_TYPE_LRE:
+ push_stack (cur_override, (cur_level & ~1) + 2);
+ break;
+ case GRUB_BIDI_TYPE_LRO:
+ push_stack (OVERRIDE_L, (cur_level & ~1) + 2);
+ break;
+ case GRUB_BIDI_TYPE_PDF:
+ pop_stack ();
+ break;
+ case GRUB_BIDI_TYPE_BN:
+ break;
+ case GRUB_BIDI_TYPE_R:
+ case GRUB_BIDI_TYPE_AL:
+ bidi_needed = 1;
+ default:
+ {
+ if (join_state == JOIN_FORCE)
+ {
+ visual[visual_len].attributes
+ |= GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED_EXPLICIT
+ | GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED;
+ }
+
+ if (join_state == NOJOIN)
+ {
+ visual[visual_len].attributes
+ |= GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED_EXPLICIT;
+ visual[visual_len].attributes
+ &= ~GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED;
+ }
+
+ join_state = JOIN_DEFAULT;
+ zwj_propagate_to_previous = 1;
+
+ levels[visual_len] = cur_level;
+ if (cur_override != OVERRIDE_NEUTRAL)
+ resolved_types[visual_len] =
+ (cur_override == OVERRIDE_L) ? GRUB_BIDI_TYPE_L
+ : GRUB_BIDI_TYPE_R;
+ else
+ resolved_types[visual_len] = type;
+ visual_len++;
+ }
+ }
+ lptr += p;
+ }
+ }
+
+ if (bidi_needed)
+ {
+ for (run_start = 0; run_start < visual_len; run_start = run_end)
+ {
+ unsigned prev_level, next_level, cur_run_level;
+ unsigned last_type, last_strong_type;
+ for (run_end = run_start; run_end < visual_len &&
+ levels[run_end] == levels[run_start]; run_end++);
+ if (run_start == 0)
+ prev_level = base_level;
+ else
+ prev_level = levels[run_start - 1];
+ if (run_end == visual_len)
+ next_level = base_level;
+ else
+ next_level = levels[run_end];
+ cur_run_level = levels[run_start];
+ if (prev_level & 1)
+ last_type = GRUB_BIDI_TYPE_R;
+ else
+ last_type = GRUB_BIDI_TYPE_L;
+ last_strong_type = last_type;
+ for (i = run_start; i < run_end; i++)
+ {
+ switch (resolved_types[i])
+ {
+ case GRUB_BIDI_TYPE_NSM:
+ resolved_types[i] = last_type;
+ break;
+ case GRUB_BIDI_TYPE_EN:
+ if (last_strong_type == GRUB_BIDI_TYPE_AL)
+ resolved_types[i] = GRUB_BIDI_TYPE_AN;
+ break;
+ case GRUB_BIDI_TYPE_L:
+ case GRUB_BIDI_TYPE_R:
+ last_strong_type = resolved_types[i];
+ break;
+ case GRUB_BIDI_TYPE_ES:
+ if (last_type == GRUB_BIDI_TYPE_EN
+ && i + 1 < run_end
+ && resolved_types[i + 1] == GRUB_BIDI_TYPE_EN)
+ resolved_types[i] = GRUB_BIDI_TYPE_EN;
+ else
+ resolved_types[i] = GRUB_BIDI_TYPE_ON;
+ break;
+ case GRUB_BIDI_TYPE_ET:
+ {
+ unsigned j;
+ if (last_type == GRUB_BIDI_TYPE_EN)
+ {
+ resolved_types[i] = GRUB_BIDI_TYPE_EN;
+ break;
+ }
+ for (j = i; j < run_end
+ && resolved_types[j] == GRUB_BIDI_TYPE_ET; j++);
+ if (j != run_end && resolved_types[j] == GRUB_BIDI_TYPE_EN)
+ {
+ for (; i < run_end
+ && resolved_types[i] == GRUB_BIDI_TYPE_ET; i++)
+ resolved_types[i] = GRUB_BIDI_TYPE_EN;
+ i--;
+ break;
+ }
+ for (; i < run_end
+ && resolved_types[i] == GRUB_BIDI_TYPE_ET; i++)
+ resolved_types[i] = GRUB_BIDI_TYPE_ON;
+ i--;
+ break;
+ }
+ break;
+ case GRUB_BIDI_TYPE_CS:
+ if (last_type == GRUB_BIDI_TYPE_EN
+ && i + 1 < run_end
+ && resolved_types[i + 1] == GRUB_BIDI_TYPE_EN)
+ {
+ resolved_types[i] = GRUB_BIDI_TYPE_EN;
+ break;
+ }
+ if (last_type == GRUB_BIDI_TYPE_AN
+ && i + 1 < run_end
+ && (resolved_types[i + 1] == GRUB_BIDI_TYPE_AN
+ || (resolved_types[i + 1] == GRUB_BIDI_TYPE_EN
+ && last_strong_type == GRUB_BIDI_TYPE_AL)))
+ {
+ resolved_types[i] = GRUB_BIDI_TYPE_EN;
+ break;
+ }
+ resolved_types[i] = GRUB_BIDI_TYPE_ON;
+ break;
+ case GRUB_BIDI_TYPE_AL:
+ last_strong_type = resolved_types[i];
+ resolved_types[i] = GRUB_BIDI_TYPE_R;
+ break;
+ default: /* Make GCC happy. */
+ break;
+ }
+ last_type = resolved_types[i];
+ if (resolved_types[i] == GRUB_BIDI_TYPE_EN
+ && last_strong_type == GRUB_BIDI_TYPE_L)
+ resolved_types[i] = GRUB_BIDI_TYPE_L;
+ }
+ if (prev_level & 1)
+ last_type = GRUB_BIDI_TYPE_R;
+ else
+ last_type = GRUB_BIDI_TYPE_L;
+ for (i = run_start; i < run_end; )
+ {
+ unsigned j;
+ unsigned next_type;
+ for (j = i; j < run_end &&
+ (resolved_types[j] == GRUB_BIDI_TYPE_B
+ || resolved_types[j] == GRUB_BIDI_TYPE_S
+ || resolved_types[j] == GRUB_BIDI_TYPE_WS
+ || resolved_types[j] == GRUB_BIDI_TYPE_ON); j++);
+ if (j == i)
+ {
+ if (resolved_types[i] == GRUB_BIDI_TYPE_L)
+ last_type = GRUB_BIDI_TYPE_L;
+ else
+ last_type = GRUB_BIDI_TYPE_R;
+ i++;
+ continue;
+ }
+ if (j == run_end)
+ next_type = (next_level & 1) ? GRUB_BIDI_TYPE_R : GRUB_BIDI_TYPE_L;
+ else
+ {
+ if (resolved_types[j] == GRUB_BIDI_TYPE_L)
+ next_type = GRUB_BIDI_TYPE_L;
+ else
+ next_type = GRUB_BIDI_TYPE_R;
+ }
+ if (next_type == last_type)
+ for (; i < j; i++)
+ resolved_types[i] = last_type;
+ else
+ for (; i < j; i++)
+ resolved_types[i] = (cur_run_level & 1) ? GRUB_BIDI_TYPE_R
+ : GRUB_BIDI_TYPE_L;
+ }
+ }
+
+ for (i = 0; i < visual_len; i++)
+ {
+ if (!(levels[i] & 1) && resolved_types[i] == GRUB_BIDI_TYPE_R)
+ {
+ levels[i]++;
+ continue;
+ }
+ if (!(levels[i] & 1) && (resolved_types[i] == GRUB_BIDI_TYPE_AN
+ || resolved_types[i] == GRUB_BIDI_TYPE_EN))
+ {
+ levels[i] += 2;
+ continue;
+ }
+ if ((levels[i] & 1) && (resolved_types[i] == GRUB_BIDI_TYPE_L
+ || resolved_types[i] == GRUB_BIDI_TYPE_AN
+ || resolved_types[i] == GRUB_BIDI_TYPE_EN))
+ {
+ levels[i]++;
+ continue;
+ }
+ }
+ }
+ else
+ {
+ for (i = 0; i < visual_len; i++)
+ levels[i] = 0;
+ }
+ grub_free (resolved_types);
+
+ {
+ grub_ssize_t ret;
+ ret = bidi_line_wrap (visual_out, visual, visual_len, levels,
+ getcharwidth, maxwidth, startwidth);
+ grub_free (levels);
+ grub_free (visual);
+ return ret;
+ }
+}
+
+grub_ssize_t
+grub_bidi_logical_to_visual (const grub_uint32_t *logical,
+ grub_size_t logical_len,
+ struct grub_unicode_glyph **visual_out,
+ grub_ssize_t (*getcharwidth) (const struct grub_unicode_glyph *visual),
+ grub_size_t max_length, grub_size_t startwidth)
+{
+ const grub_uint32_t *line_start = logical, *ptr;
+ struct grub_unicode_glyph *visual_ptr;
+ *visual_out = visual_ptr = grub_malloc (2 * sizeof (visual_ptr[0])
+ * logical_len);
+ if (!visual_ptr)
+ return -1;
+ for (ptr = logical; ptr <= logical + logical_len; ptr++)
+ {
+ if (ptr == logical + logical_len || *ptr == '\n')
+ {
+ grub_ssize_t ret;
+ ret = grub_bidi_line_logical_to_visual (line_start,
+ ptr - line_start,
+ visual_ptr,
+ getcharwidth,
+ max_length,
+ startwidth);
+ startwidth = 0;
+
+ if (ret < 0)
+ {
+ grub_free (*visual_out);
+ return ret;
+ }
+ visual_ptr += ret;
+ line_start = ptr;
+ if (ptr != logical + logical_len)
+ {
+ grub_memset (visual_ptr, 0, sizeof (visual_ptr[0]));
+ visual_ptr->base = '\n';
+ visual_ptr++;
+ line_start++;
+ }
+ }
+ }
+ return visual_ptr - *visual_out;
+}
+
+grub_uint32_t
+grub_unicode_mirror_code (grub_uint32_t in)
+{
+ int i;
+ for (i = 0; grub_unicode_bidi_pairs[i].key; i++)
+ if (grub_unicode_bidi_pairs[i].key == in)
+ return grub_unicode_bidi_pairs[i].replace;
+ return in;
+}
+
+grub_uint32_t
+grub_unicode_shape_code (grub_uint32_t in, grub_uint8_t attr)
+{
+ int i;
+ if (!(in >= GRUB_UNICODE_ARABIC_START
+ && in < GRUB_UNICODE_ARABIC_END))
+ return in;
+
+ for (i = 0; grub_unicode_arabic_shapes[i].code; i++)
+ if (grub_unicode_arabic_shapes[i].code == in)
+ {
+ grub_uint32_t out = 0;
+ switch (attr & (GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED
+ | GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED))
+ {
+ case 0:
+ out = grub_unicode_arabic_shapes[i].isolated;
+ break;
+ case GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED:
+ out = grub_unicode_arabic_shapes[i].right_linked;
+ break;
+ case GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED:
+ out = grub_unicode_arabic_shapes[i].left_linked;
+ break;
+ case GRUB_UNICODE_GLYPH_ATTRIBUTE_RIGHT_JOINED
+ |GRUB_UNICODE_GLYPH_ATTRIBUTE_LEFT_JOINED:
+ out = grub_unicode_arabic_shapes[i].both_linked;
+ break;
+ }
+ if (out)
+ return out;
+ }
+
+ return in;
+}
diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c
new file mode 100644
index 0000000..09f2271
--- /dev/null
+++ b/grub-core/normal/cmdline.c
@@ -0,0 +1,650 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+#include <grub/disk.h>
+#include <grub/file.h>
+#include <grub/env.h>
+#include <grub/i18n.h>
+#include <grub/charset.h>
+
+static grub_uint32_t *kill_buf;
+
+static int hist_size;
+static grub_uint32_t **hist_lines = 0;
+static int hist_pos = 0;
+static int hist_end = 0;
+static int hist_used = 0;
+
+grub_err_t
+grub_set_history (int newsize)
+{
+ grub_uint32_t **old_hist_lines = hist_lines;
+ hist_lines = grub_malloc (sizeof (grub_uint32_t *) * newsize);
+
+ /* Copy the old lines into the new buffer. */
+ if (old_hist_lines)
+ {
+ /* Remove the lines that don't fit in the new buffer. */
+ if (newsize < hist_used)
+ {
+ int i;
+ int delsize = hist_used - newsize;
+ hist_used = newsize;
+
+ for (i = 1; i <= delsize; i++)
+ {
+ int pos = hist_end - i;
+ if (pos < 0)
+ pos += hist_size;
+ grub_free (old_hist_lines[pos]);
+ }
+
+ hist_end -= delsize;
+ if (hist_end < 0)
+ hist_end += hist_size;
+ }
+
+ if (hist_pos < hist_end)
+ grub_memmove (hist_lines, old_hist_lines + hist_pos,
+ (hist_end - hist_pos) * sizeof (grub_uint32_t *));
+ else if (hist_used)
+ {
+ /* Copy the older part. */
+ grub_memmove (hist_lines, old_hist_lines + hist_pos,
+ (hist_size - hist_pos) * sizeof (grub_uint32_t *));
+
+ /* Copy the newer part. */
+ grub_memmove (hist_lines + hist_size - hist_pos, old_hist_lines,
+ hist_end * sizeof (grub_uint32_t *));
+ }
+ }
+
+ grub_free (old_hist_lines);
+
+ hist_size = newsize;
+ hist_pos = 0;
+ hist_end = hist_used;
+ return 0;
+}
+
+/* Get the entry POS from the history where `0' is the newest
+ entry. */
+static grub_uint32_t *
+grub_history_get (int pos)
+{
+ pos = (hist_pos + pos) % hist_size;
+ return hist_lines[pos];
+}
+
+static grub_size_t
+strlen_ucs4 (const grub_uint32_t *s)
+{
+ const grub_uint32_t *p = s;
+
+ while (*p)
+ p++;
+
+ return p - s;
+}
+
+/* Replace the history entry on position POS with the string S. */
+static void
+grub_history_set (int pos, grub_uint32_t *s, grub_size_t len)
+{
+ grub_free (hist_lines[pos]);
+ hist_lines[pos] = grub_malloc ((len + 1) * sizeof (grub_uint32_t));
+ if (!hist_lines[pos])
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return ;
+ }
+ grub_memcpy (hist_lines[pos], s, len * sizeof (grub_uint32_t));
+ hist_lines[pos][len] = 0;
+}
+
+/* Insert a new history line S on the top of the history. */
+static void
+grub_history_add (grub_uint32_t *s, grub_size_t len)
+{
+ /* Remove the oldest entry in the history to make room for a new
+ entry. */
+ if (hist_used + 1 > hist_size)
+ {
+ hist_end--;
+ if (hist_end < 0)
+ hist_end = hist_size + hist_end;
+
+ grub_free (hist_lines[hist_end]);
+ }
+ else
+ hist_used++;
+
+ /* Move to the next position. */
+ hist_pos--;
+ if (hist_pos < 0)
+ hist_pos = hist_size + hist_pos;
+
+ /* Insert into history. */
+ hist_lines[hist_pos] = NULL;
+ grub_history_set (hist_pos, s, len);
+}
+
+/* Replace the history entry on position POS with the string S. */
+static void
+grub_history_replace (int pos, grub_uint32_t *s, grub_size_t len)
+{
+ grub_history_set ((hist_pos + pos) % hist_size, s, len);
+}
+
+/* A completion hook to print items. */
+static void
+print_completion (const char *item, grub_completion_type_t type, int count)
+{
+ if (count == 0)
+ {
+ /* If this is the first time, print a label. */
+
+ grub_puts ("");
+ switch (type)
+ {
+ case GRUB_COMPLETION_TYPE_COMMAND:
+ grub_puts_ (N_("Possible commands are:"));
+ break;
+ case GRUB_COMPLETION_TYPE_DEVICE:
+ grub_puts_ (N_("Possible devices are:"));
+ break;
+ case GRUB_COMPLETION_TYPE_FILE:
+ grub_puts_ (N_("Possible files are:"));
+ break;
+ case GRUB_COMPLETION_TYPE_PARTITION:
+ grub_puts_ (N_("Possible partitions are:"));
+ break;
+ case GRUB_COMPLETION_TYPE_ARGUMENT:
+ grub_puts_ (N_("Possible arguments are:"));
+ break;
+ default:
+ grub_puts_ (N_("Possible things are:"));
+ break;
+ }
+ grub_puts ("");
+ }
+
+ if (type == GRUB_COMPLETION_TYPE_PARTITION)
+ {
+ grub_normal_print_device_info (item);
+ grub_errno = GRUB_ERR_NONE;
+ }
+ else
+ grub_printf (" %s", item);
+}
+
+struct cmdline_term
+{
+ unsigned xpos, ypos, ystart, width, height;
+ struct grub_term_output *term;
+};
+
+/* Get a command-line. If ESC is pushed, return zero,
+ otherwise return command line. */
+/* FIXME: The dumb interface is not supported yet. */
+char *
+grub_cmdline_get (const char *prompt)
+{
+ grub_size_t lpos, llen;
+ grub_size_t plen;
+ grub_uint32_t *buf;
+ grub_size_t max_len = 256;
+ int key;
+ int histpos = 0;
+ auto void cl_insert (const grub_uint32_t *str);
+ auto void cl_delete (unsigned len);
+ auto inline void __attribute__ ((always_inline)) cl_print (struct cmdline_term *cl_term, int pos,
+ grub_uint32_t c);
+ auto void cl_set_pos (struct cmdline_term *cl_term);
+ auto void cl_print_all (int pos, grub_uint32_t c);
+ auto void cl_set_pos_all (void);
+ auto void init_clterm (struct cmdline_term *cl_term_cur);
+ auto void init_clterm_all (void);
+ const char *prompt_translated = _(prompt);
+ struct cmdline_term *cl_terms;
+ char *ret;
+ unsigned nterms;
+
+ void cl_set_pos (struct cmdline_term *cl_term)
+ {
+ cl_term->xpos = (plen + lpos) % (cl_term->width - 1);
+ cl_term->ypos = cl_term->ystart + (plen + lpos) / (cl_term->width - 1);
+ grub_term_gotoxy (cl_term->term, cl_term->xpos, cl_term->ypos);
+ }
+
+ void cl_set_pos_all (void)
+ {
+ unsigned i;
+ for (i = 0; i < nterms; i++)
+ cl_set_pos (&cl_terms[i]);
+ }
+
+ inline void __attribute__ ((always_inline)) cl_print (struct cmdline_term *cl_term, int pos, grub_uint32_t c)
+ {
+ grub_uint32_t *p;
+
+ for (p = buf + pos; p < buf + llen; p++)
+ {
+ if (c)
+ grub_putcode (c, cl_term->term);
+ else
+ grub_putcode (*p, cl_term->term);
+ cl_term->xpos++;
+ if (cl_term->xpos >= cl_term->width - 1)
+ {
+ cl_term->xpos = 0;
+ if (cl_term->ypos >= (unsigned) (cl_term->height - 1))
+ cl_term->ystart--;
+ else
+ cl_term->ypos++;
+ grub_putcode ('\n', cl_term->term);
+ }
+ }
+ }
+
+ void cl_print_all (int pos, grub_uint32_t c)
+ {
+ unsigned i;
+ for (i = 0; i < nterms; i++)
+ cl_print (&cl_terms[i], pos, c);
+ }
+
+ void cl_insert (const grub_uint32_t *str)
+ {
+ grub_size_t len = strlen_ucs4 (str);
+
+ if (len + llen >= max_len)
+ {
+ grub_uint32_t *nbuf;
+ max_len *= 2;
+ nbuf = grub_realloc (buf, sizeof (grub_uint32_t) * max_len);
+ if (nbuf)
+ buf = nbuf;
+ else
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ max_len /= 2;
+ }
+ }
+
+ if (len + llen < max_len)
+ {
+ grub_memmove (buf + lpos + len, buf + lpos,
+ (llen - lpos + 1) * sizeof (grub_uint32_t));
+ grub_memmove (buf + lpos, str, len * sizeof (grub_uint32_t));
+
+ llen += len;
+ cl_set_pos_all ();
+ cl_print_all (lpos, 0);
+ lpos += len;
+ cl_set_pos_all ();
+ }
+ }
+
+ void cl_delete (unsigned len)
+ {
+ if (lpos + len <= llen)
+ {
+ grub_size_t saved_lpos = lpos;
+
+ lpos = llen - len;
+ cl_set_pos_all ();
+ cl_print_all (lpos, ' ');
+ lpos = saved_lpos;
+ cl_set_pos_all ();
+
+ grub_memmove (buf + lpos, buf + lpos + len,
+ sizeof (grub_uint32_t) * (llen - lpos + 1));
+ llen -= len;
+ cl_print_all (lpos, 0);
+ cl_set_pos_all ();
+ }
+ }
+
+ void init_clterm (struct cmdline_term *cl_term_cur)
+ {
+ cl_term_cur->xpos = plen;
+ cl_term_cur->ypos = (grub_term_getxy (cl_term_cur->term) & 0xFF);
+ cl_term_cur->ystart = cl_term_cur->ypos;
+ cl_term_cur->width = grub_term_width (cl_term_cur->term);
+ cl_term_cur->height = grub_term_height (cl_term_cur->term);
+ }
+
+ void init_clterm_all (void)
+ {
+ unsigned i;
+ for (i = 0; i < nterms; i++)
+ init_clterm (&cl_terms[i]);
+ }
+
+ buf = grub_malloc (max_len * sizeof (grub_uint32_t));
+ if (!buf)
+ return 0;
+
+ plen = grub_strlen (prompt_translated) + sizeof (" ") - 1;
+ lpos = llen = 0;
+ buf[0] = '\0';
+
+ {
+ grub_term_output_t term;
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ if ((grub_term_getxy (term) >> 8) != 0)
+ grub_putcode ('\n', term);
+ }
+ grub_printf ("%s ", prompt_translated);
+ grub_normal_reset_more ();
+
+ {
+ struct cmdline_term *cl_term_cur;
+ struct grub_term_output *cur;
+ nterms = 0;
+ FOR_ACTIVE_TERM_OUTPUTS(cur)
+ nterms++;
+
+ cl_terms = grub_malloc (sizeof (cl_terms[0]) * nterms);
+ if (!cl_terms)
+ return 0;
+ cl_term_cur = cl_terms;
+ FOR_ACTIVE_TERM_OUTPUTS(cur)
+ {
+ cl_term_cur->term = cur;
+ init_clterm (cl_term_cur);
+ cl_term_cur++;
+ }
+ }
+
+ if (hist_used == 0)
+ grub_history_add (buf, llen);
+
+ grub_refresh ();
+
+ while ((key = grub_getkey ()) != '\n' && key != '\r')
+ {
+ switch (key)
+ {
+ case GRUB_TERM_CTRL | 'a':
+ case GRUB_TERM_KEY_HOME:
+ lpos = 0;
+ cl_set_pos_all ();
+ break;
+
+ case GRUB_TERM_CTRL | 'b':
+ case GRUB_TERM_KEY_LEFT:
+ if (lpos > 0)
+ {
+ lpos--;
+ cl_set_pos_all ();
+ }
+ break;
+
+ case GRUB_TERM_CTRL | 'e':
+ case GRUB_TERM_KEY_END:
+ lpos = llen;
+ cl_set_pos_all ();
+ break;
+
+ case GRUB_TERM_CTRL | 'f':
+ case GRUB_TERM_KEY_RIGHT:
+ if (lpos < llen)
+ {
+ lpos++;
+ cl_set_pos_all ();
+ }
+ break;
+
+ case GRUB_TERM_CTRL | 'i':
+ case '\t':
+ {
+ int restore;
+ char *insertu8;
+ char *bufu8;
+ grub_uint32_t c;
+
+ c = buf[lpos];
+ buf[lpos] = '\0';
+
+ bufu8 = grub_ucs4_to_utf8_alloc (buf, lpos);
+ buf[lpos] = c;
+ if (!bufu8)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ break;
+ }
+
+ insertu8 = grub_normal_do_completion (bufu8, &restore,
+ print_completion);
+ grub_free (bufu8);
+
+ grub_normal_reset_more ();
+
+ if (restore)
+ {
+ /* Restore the prompt. */
+ grub_printf ("\n%s ", prompt_translated);
+ init_clterm_all ();
+ cl_print_all (0, 0);
+ }
+
+ if (insertu8)
+ {
+ grub_size_t insertlen;
+ grub_ssize_t t;
+ grub_uint32_t *insert;
+
+ insertlen = grub_strlen (insertu8);
+ insert = grub_malloc ((insertlen + 1) * sizeof (grub_uint32_t));
+ if (!insert)
+ {
+ grub_free (insertu8);
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ break;
+ }
+ t = grub_utf8_to_ucs4 (insert, insertlen,
+ (grub_uint8_t *) insertu8,
+ insertlen, 0);
+ if (t > 0)
+ {
+ if (insert[t-1] == ' ' && buf[lpos] == ' ')
+ {
+ insert[t-1] = 0;
+ if (t != 1)
+ cl_insert (insert);
+ lpos++;
+ }
+ else
+ {
+ insert[t] = 0;
+ cl_insert (insert);
+ }
+ }
+
+ grub_free (insertu8);
+ grub_free (insert);
+ }
+ cl_set_pos_all ();
+ }
+ break;
+
+ case GRUB_TERM_CTRL | 'k':
+ if (lpos < llen)
+ {
+ if (kill_buf)
+ grub_free (kill_buf);
+
+ kill_buf = grub_malloc ((llen - lpos + 1)
+ * sizeof (grub_uint32_t));
+ if (grub_errno)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+ else
+ {
+ grub_memcpy (kill_buf, buf + lpos,
+ (llen - lpos + 1) * sizeof (grub_uint32_t));
+ kill_buf[llen - lpos] = 0;
+ }
+
+ cl_delete (llen - lpos);
+ }
+ break;
+
+ case GRUB_TERM_CTRL | 'n':
+ case GRUB_TERM_KEY_DOWN:
+ {
+ grub_uint32_t *hist;
+
+ lpos = 0;
+
+ if (histpos > 0)
+ {
+ grub_history_replace (histpos, buf, llen);
+ histpos--;
+ }
+
+ cl_delete (llen);
+ hist = grub_history_get (histpos);
+ cl_insert (hist);
+
+ break;
+ }
+
+ case GRUB_TERM_KEY_UP:
+ case GRUB_TERM_CTRL | 'p':
+ {
+ grub_uint32_t *hist;
+
+ lpos = 0;
+
+ if (histpos < hist_used - 1)
+ {
+ grub_history_replace (histpos, buf, llen);
+ histpos++;
+ }
+
+ cl_delete (llen);
+ hist = grub_history_get (histpos);
+
+ cl_insert (hist);
+ }
+ break;
+
+ case GRUB_TERM_CTRL | 'u':
+ if (lpos > 0)
+ {
+ grub_size_t n = lpos;
+
+ if (kill_buf)
+ grub_free (kill_buf);
+
+ kill_buf = grub_malloc (n + 1);
+ if (grub_errno)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (kill_buf)
+ {
+ grub_memcpy (kill_buf, buf, n);
+ kill_buf[n] = '\0';
+ }
+
+ lpos = 0;
+ cl_set_pos_all ();
+ cl_delete (n);
+ }
+ break;
+
+ case GRUB_TERM_CTRL | 'y':
+ if (kill_buf)
+ cl_insert (kill_buf);
+ break;
+
+ case '\e':
+ grub_free (cl_terms);
+ return 0;
+
+ case '\b':
+ if (lpos > 0)
+ {
+ lpos--;
+ cl_set_pos_all ();
+ }
+ else
+ break;
+ /* fall through */
+
+ case GRUB_TERM_CTRL | 'd':
+ case GRUB_TERM_KEY_DC:
+ if (lpos < llen)
+ cl_delete (1);
+ break;
+
+ default:
+ if (grub_isprint (key))
+ {
+ grub_uint32_t str[2];
+
+ str[0] = key;
+ str[1] = '\0';
+ cl_insert (str);
+ }
+ break;
+ }
+
+ grub_refresh ();
+ }
+
+ grub_xputs ("\n");
+ grub_refresh ();
+
+ /* Remove leading spaces. */
+ lpos = 0;
+ while (buf[lpos] == ' ')
+ lpos++;
+
+ histpos = 0;
+ if (strlen_ucs4 (buf) > 0)
+ {
+ grub_uint32_t empty[] = { 0 };
+ grub_history_replace (histpos, buf, llen);
+ grub_history_add (empty, 0);
+ }
+
+ ret = grub_ucs4_to_utf8_alloc (buf + lpos, llen - lpos + 1);
+ grub_free (buf);
+ grub_free (cl_terms);
+ return ret;
+}
diff --git a/grub-core/normal/color.c b/grub-core/normal/color.c
new file mode 100644
index 0000000..2e6c80b
--- /dev/null
+++ b/grub-core/normal/color.c
@@ -0,0 +1,150 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/normal.h>
+#include <grub/term.h>
+#include <grub/i18n.h>
+
+/* Borrowed from GRUB Legacy */
+static char *color_list[16] =
+{
+ "black",
+ "blue",
+ "green",
+ "cyan",
+ "red",
+ "magenta",
+ "brown",
+ "light-gray",
+ "dark-gray",
+ "light-blue",
+ "light-green",
+ "light-cyan",
+ "light-red",
+ "light-magenta",
+ "yellow",
+ "white"
+};
+
+static int
+parse_color_name (grub_uint8_t *ret, char *name)
+{
+ grub_uint8_t i;
+ for (i = 0; i < sizeof (color_list) / sizeof (*color_list); i++)
+ if (! grub_strcmp (name, color_list[i]))
+ {
+ *ret = i;
+ return 0;
+ }
+ return -1;
+}
+
+int
+grub_parse_color_name_pair (grub_uint8_t *color, const char *name)
+{
+ int result = 1;
+ grub_uint8_t fg, bg;
+ char *fg_name, *bg_name;
+
+ /* nothing specified by user */
+ if (name == NULL)
+ return result;
+
+ fg_name = grub_strdup (name);
+ if (fg_name == NULL)
+ {
+ /* "out of memory" message was printed by grub_strdup() */
+ grub_wait_after_message ();
+ return result;
+ }
+
+ bg_name = grub_strchr (fg_name, '/');
+ if (bg_name == NULL)
+ {
+ grub_printf_ (N_("Warning: syntax error (missing slash) in `%s'\n"), fg_name);
+ grub_wait_after_message ();
+ goto free_and_return;
+ }
+
+ *(bg_name++) = '\0';
+
+ if (parse_color_name (&fg, fg_name) == -1)
+ {
+ grub_printf_ (N_("Warning: invalid foreground color `%s'\n"), fg_name);
+ grub_wait_after_message ();
+ goto free_and_return;
+ }
+ if (parse_color_name (&bg, bg_name) == -1)
+ {
+ grub_printf_ (N_("Warning: invalid background color `%s'\n"), bg_name);
+ grub_wait_after_message ();
+ goto free_and_return;
+ }
+
+ *color = (bg << 4) | fg;
+ result = 0;
+
+free_and_return:
+ grub_free (fg_name);
+ return result;
+}
+
+static grub_uint8_t color_normal, color_highlight;
+
+static void
+set_colors (void)
+{
+ struct grub_term_output *term;
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ /* Reloads terminal `normal' and `highlight' colors. */
+ grub_term_setcolor (term, color_normal, color_highlight);
+
+ /* Propagates `normal' color to terminal current color. */
+ grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
+ }
+}
+
+/* Replace default `normal' colors with the ones specified by user (if any). */
+char *
+grub_env_write_color_normal (struct grub_env_var *var __attribute__ ((unused)),
+ const char *val)
+{
+ if (grub_parse_color_name_pair (&color_normal, val))
+ return NULL;
+
+ set_colors ();
+
+ return grub_strdup (val);
+}
+
+/* Replace default `highlight' colors with the ones specified by user (if any). */
+char *
+grub_env_write_color_highlight (struct grub_env_var *var __attribute__ ((unused)),
+ const char *val)
+{
+ if (grub_parse_color_name_pair (&color_highlight, val))
+ return NULL;
+
+ set_colors ();
+
+ return grub_strdup (val);
+}
diff --git a/grub-core/normal/completion.c b/grub-core/normal/completion.c
new file mode 100644
index 0000000..67676df
--- /dev/null
+++ b/grub-core/normal/completion.c
@@ -0,0 +1,518 @@
+/* completion.c - complete a command, a disk, a partition or a file */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/misc.h>
+#include <grub/err.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+#include <grub/disk.h>
+#include <grub/file.h>
+#include <grub/parser.h>
+#include <grub/extcmd.h>
+
+/* The current word. */
+static char *current_word;
+
+/* The matched string. */
+static char *match;
+
+/* The count of candidates. */
+static int num_found;
+
+/* The string to be appended. */
+static const char *suffix;
+
+/* The callback function to print items. */
+static void (*print_func) (const char *, grub_completion_type_t, int);
+
+/* The state the command line is in. */
+static grub_parser_state_t cmdline_state;
+
+
+/* Add a string to the list of possible completions. COMPLETION is the
+ string that should be added. EXTRA will be appended if COMPLETION
+ matches uniquely. The type TYPE specifies what kind of data is added. */
+static int
+add_completion (const char *completion, const char *extra,
+ grub_completion_type_t type)
+{
+ if (grub_strncmp (current_word, completion, grub_strlen (current_word)) == 0)
+ {
+ num_found++;
+
+ switch (num_found)
+ {
+ case 1:
+ match = grub_strdup (completion);
+ if (! match)
+ return 1;
+ suffix = extra;
+ break;
+
+ case 2:
+ if (print_func)
+ print_func (match, type, 0);
+
+ /* Fall through. */
+
+ default:
+ {
+ char *s = match;
+ const char *t = completion;
+
+ if (print_func)
+ print_func (completion, type, num_found - 1);
+
+ /* Detect the matched portion. */
+ while (*s && *t && *s == *t)
+ {
+ s++;
+ t++;
+ }
+
+ *s = '\0';
+ }
+ break;
+ }
+ }
+
+ return 0;
+}
+
+static int
+iterate_partition (grub_disk_t disk, const grub_partition_t p)
+{
+ const char *disk_name = disk->name;
+ char *name;
+ int ret;
+ char *part_name;
+
+ part_name = grub_partition_get_name (p);
+ if (! part_name)
+ return 1;
+
+ name = grub_xasprintf ("%s,%s", disk_name, part_name);
+ grub_free (part_name);
+
+ if (! name)
+ return 1;
+
+ ret = add_completion (name, ")", GRUB_COMPLETION_TYPE_PARTITION);
+ grub_free (name);
+ return ret;
+}
+
+static int
+iterate_dir (const char *filename, const struct grub_dirhook_info *info)
+{
+ if (! info->dir)
+ {
+ const char *prefix;
+ if (cmdline_state == GRUB_PARSER_STATE_DQUOTE)
+ prefix = "\" ";
+ else if (cmdline_state == GRUB_PARSER_STATE_QUOTE)
+ prefix = "\' ";
+ else
+ prefix = " ";
+
+ if (add_completion (filename, prefix, GRUB_COMPLETION_TYPE_FILE))
+ return 1;
+ }
+ else if (grub_strcmp (filename, ".") && grub_strcmp (filename, ".."))
+ {
+ char *fname;
+
+ fname = grub_xasprintf ("%s/", filename);
+ if (add_completion (fname, "", GRUB_COMPLETION_TYPE_FILE))
+ {
+ grub_free (fname);
+ return 1;
+ }
+ grub_free (fname);
+ }
+
+ return 0;
+}
+
+static int
+iterate_dev (const char *devname)
+{
+ grub_device_t dev;
+
+ /* Complete the partition part. */
+ dev = grub_device_open (devname);
+
+ if (dev)
+ {
+ char tmp[grub_strlen (devname) + sizeof (",")];
+
+ grub_memcpy (tmp, devname, grub_strlen (devname));
+
+ if (grub_strcmp (devname, current_word) == 0)
+ {
+ if (add_completion (devname, ")", GRUB_COMPLETION_TYPE_PARTITION))
+ return 1;
+
+ if (dev->disk)
+ if (grub_partition_iterate (dev->disk, iterate_partition))
+ return 1;
+ }
+ else
+ {
+ grub_memcpy (tmp + grub_strlen (devname), "", sizeof (""));
+ if (add_completion (tmp, "", GRUB_COMPLETION_TYPE_DEVICE))
+ return 1;
+ }
+ }
+
+ grub_errno = GRUB_ERR_NONE;
+ return 0;
+}
+
+/* Complete a device. */
+static int
+complete_device (void)
+{
+ /* Check if this is a device or a partition. */
+ char *p = grub_strchr (++current_word, ',');
+ grub_device_t dev;
+
+ if (! p)
+ {
+ /* Complete the disk part. */
+ if (grub_disk_dev_iterate (iterate_dev))
+ return 1;
+ }
+ else
+ {
+ /* Complete the partition part. */
+ *p = '\0';
+ dev = grub_device_open (current_word);
+ *p = ',';
+ grub_errno = GRUB_ERR_NONE;
+
+ if (dev)
+ {
+ if (dev->disk)
+ {
+ if (grub_partition_iterate (dev->disk, iterate_partition))
+ {
+ grub_device_close (dev);
+ return 1;
+ }
+ }
+
+ grub_device_close (dev);
+ }
+ else
+ return 1;
+ }
+
+ return 0;
+}
+
+/* Complete a file. */
+static int
+complete_file (void)
+{
+ char *device;
+ char *dir;
+ char *last_dir;
+ grub_fs_t fs;
+ grub_device_t dev;
+ int ret = 0;
+
+ device = grub_file_get_device_name (current_word);
+ if (grub_errno != GRUB_ERR_NONE)
+ return 1;
+
+ dev = grub_device_open (device);
+ if (! dev)
+ {
+ ret = 1;
+ goto fail;
+ }
+
+ fs = grub_fs_probe (dev);
+ if (! fs)
+ {
+ ret = 1;
+ goto fail;
+ }
+
+ dir = grub_strchr (current_word + (device ? 2 + grub_strlen (device) : 0),
+ '/');
+ last_dir = grub_strrchr (current_word, '/');
+ if (dir)
+ {
+ char *dirfile;
+
+ current_word = last_dir + 1;
+
+ dir = grub_strdup (dir);
+ if (! dir)
+ {
+ ret = 1;
+ goto fail;
+ }
+
+ /* Cut away the filename part. */
+ dirfile = grub_strrchr (dir, '/');
+ dirfile[1] = '\0';
+
+ /* Iterate the directory. */
+ (fs->dir) (dev, dir, iterate_dir);
+
+ grub_free (dir);
+
+ if (grub_errno)
+ {
+ ret = 1;
+ goto fail;
+ }
+ }
+ else
+ {
+ current_word += grub_strlen (current_word);
+ match = grub_strdup ("/");
+ if (! match)
+ {
+ ret = 1;
+ goto fail;
+ }
+
+ suffix = "";
+ num_found = 1;
+ }
+
+ fail:
+ if (dev)
+ grub_device_close (dev);
+ grub_free (device);
+ return ret;
+}
+
+/* Complete an argument. */
+static int
+complete_arguments (char *command)
+{
+ grub_command_t cmd;
+ grub_extcmd_t ext;
+ const struct grub_arg_option *option;
+ char shortarg[] = "- ";
+
+ cmd = grub_command_find (command);
+
+ if (!cmd || !(cmd->flags & GRUB_COMMAND_FLAG_EXTCMD))
+ return 0;
+
+ ext = cmd->data;
+ if (!ext->options)
+ return 0;
+
+ if (add_completion ("-u", " ", GRUB_COMPLETION_TYPE_ARGUMENT))
+ return 1;
+
+ /* Add the short arguments. */
+ for (option = ext->options; option->doc; option++)
+ {
+ if (! option->shortarg)
+ continue;
+
+ shortarg[1] = option->shortarg;
+ if (add_completion (shortarg, " ", GRUB_COMPLETION_TYPE_ARGUMENT))
+ return 1;
+
+ }
+
+ /* First add the built-in arguments. */
+ if (add_completion ("--help", " ", GRUB_COMPLETION_TYPE_ARGUMENT))
+ return 1;
+ if (add_completion ("--usage", " ", GRUB_COMPLETION_TYPE_ARGUMENT))
+ return 1;
+
+ /* Add the long arguments. */
+ for (option = ext->options; option->doc; option++)
+ {
+ char *longarg;
+ if (!option->longarg)
+ continue;
+
+ longarg = grub_xasprintf ("--%s", option->longarg);
+ if (!longarg)
+ return 1;
+
+ if (add_completion (longarg, " ", GRUB_COMPLETION_TYPE_ARGUMENT))
+ {
+ grub_free (longarg);
+ return 1;
+ }
+ grub_free (longarg);
+ }
+
+ return 0;
+}
+
+
+static grub_parser_state_t
+get_state (const char *cmdline)
+{
+ grub_parser_state_t state = GRUB_PARSER_STATE_TEXT;
+ char use;
+
+ while (*cmdline)
+ state = grub_parser_cmdline_state (state, *(cmdline++), &use);
+ return state;
+}
+
+
+/* Try to complete the string in BUF. Return the characters that
+ should be added to the string. This command outputs the possible
+ completions by calling HOOK, in that case set RESTORE to 1 so the
+ caller can restore the prompt. */
+char *
+grub_normal_do_completion (char *buf, int *restore,
+ void (*hook) (const char *, grub_completion_type_t, int))
+{
+ int argc;
+ char **argv;
+
+ /* Initialize variables. */
+ match = 0;
+ num_found = 0;
+ suffix = "";
+ print_func = hook;
+
+ *restore = 1;
+
+ if (grub_parser_split_cmdline (buf, 0, &argc, &argv))
+ return 0;
+
+ if (argc == 0)
+ current_word = "";
+ else
+ current_word = argv[argc - 1];
+
+ if (argc > 1 && ! grub_strcmp (argv[0], "set"))
+ {
+ char *equals = grub_strchr (current_word, '=');
+ if (equals)
+ /* Complete the value of the variable. */
+ current_word = equals + 1;
+ }
+
+ /* Determine the state the command line is in, depending on the
+ state, it can be determined how to complete. */
+ cmdline_state = get_state (buf);
+
+ if (argc == 1 || argc == 0)
+ {
+ /* Complete a command. */
+ grub_command_t cmd;
+ FOR_COMMANDS(cmd)
+ {
+ if (cmd->prio & GRUB_PRIO_LIST_FLAG_ACTIVE)
+ {
+ if (add_completion (cmd->name, " ", GRUB_COMPLETION_TYPE_COMMAND))
+ goto fail;
+ }
+ }
+ }
+ else if (*current_word == '-')
+ {
+ if (complete_arguments (buf))
+ goto fail;
+ }
+ else if (*current_word == '(' && ! grub_strchr (current_word, ')'))
+ {
+ /* Complete a device. */
+ if (complete_device ())
+ goto fail;
+ }
+ else
+ {
+ /* Complete a file. */
+ if (complete_file ())
+ goto fail;
+ }
+
+ /* If more than one match is found those matches will be printed and
+ the prompt should be restored. */
+ if (num_found > 1)
+ *restore = 1;
+ else
+ *restore = 0;
+
+ /* Return the part that matches. */
+ if (match)
+ {
+ char *ret;
+ char *escstr;
+ char *newstr;
+ int current_len;
+ int match_len;
+ int spaces = 0;
+
+ current_len = grub_strlen (current_word);
+ match_len = grub_strlen (match);
+
+ /* Count the number of spaces that have to be escaped. XXX:
+ More than just spaces have to be escaped. */
+ for (escstr = match + current_len; *escstr; escstr++)
+ if (*escstr == ' ')
+ spaces++;
+
+ ret = grub_malloc (match_len - current_len + grub_strlen (suffix) + spaces + 1);
+ newstr = ret;
+ for (escstr = match + current_len; *escstr; escstr++)
+ {
+ if (*escstr == ' ' && cmdline_state != GRUB_PARSER_STATE_QUOTE
+ && cmdline_state != GRUB_PARSER_STATE_QUOTE)
+ *(newstr++) = '\\';
+ *(newstr++) = *escstr;
+ }
+ *newstr = '\0';
+
+ if (num_found == 1)
+ grub_strcat (ret, suffix);
+
+ if (*ret == '\0')
+ {
+ grub_free (ret);
+ goto fail;
+ }
+
+ if (argc != 0)
+ grub_free (argv[0]);
+ grub_free (match);
+ return ret;
+ }
+
+ fail:
+ if (argc != 0)
+ {
+ grub_free (argv[0]);
+ grub_free (argv);
+ }
+ grub_free (match);
+ grub_errno = GRUB_ERR_NONE;
+
+ return 0;
+}
diff --git a/grub-core/normal/context.c b/grub-core/normal/context.c
new file mode 100644
index 0000000..5813166
--- /dev/null
+++ b/grub-core/normal/context.c
@@ -0,0 +1,209 @@
+/* env.c - Environment variables */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/env.h>
+#include <grub/env_private.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/command.h>
+#include <grub/normal.h>
+#include <grub/i18n.h>
+
+struct menu_pointer
+{
+ grub_menu_t menu;
+ struct menu_pointer *prev;
+};
+
+static struct menu_pointer initial_menu;
+static struct menu_pointer *current_menu = &initial_menu;
+
+void
+grub_env_unset_menu (void)
+{
+ current_menu->menu = NULL;
+}
+
+grub_menu_t
+grub_env_get_menu (void)
+{
+ return current_menu->menu;
+}
+
+void
+grub_env_set_menu (grub_menu_t nmenu)
+{
+ current_menu->menu = nmenu;
+}
+
+static grub_err_t
+grub_env_new_context (int export_all)
+{
+ struct grub_env_context *context;
+ int i;
+ struct menu_pointer *menu;
+
+ context = grub_zalloc (sizeof (*context));
+ if (! context)
+ return grub_errno;
+ menu = grub_zalloc (sizeof (*menu));
+ if (! menu)
+ return grub_errno;
+
+ context->prev = grub_current_context;
+ grub_current_context = context;
+
+ menu->prev = current_menu;
+ current_menu = menu;
+
+ /* Copy exported variables. */
+ for (i = 0; i < HASHSZ; i++)
+ {
+ struct grub_env_var *var;
+
+ for (var = context->prev->vars[i]; var; var = var->next)
+ if (var->global || export_all)
+ {
+ if (grub_env_set (var->name, var->value) != GRUB_ERR_NONE)
+ {
+ grub_env_context_close ();
+ return grub_errno;
+ }
+ grub_env_export (var->name);
+ grub_register_variable_hook (var->name, var->read_hook, var->write_hook);
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_env_context_open (void)
+{
+ return grub_env_new_context (0);
+}
+
+int grub_extractor_level = 0;
+
+grub_err_t
+grub_env_extractor_open (int source)
+{
+ grub_extractor_level++;
+ return grub_env_new_context (source);
+}
+
+grub_err_t
+grub_env_context_close (void)
+{
+ struct grub_env_context *context;
+ int i;
+ struct menu_pointer *menu;
+
+ if (! grub_current_context->prev)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "cannot close the initial context");
+
+ /* Free the variables associated with this context. */
+ for (i = 0; i < HASHSZ; i++)
+ {
+ struct grub_env_var *p, *q;
+
+ for (p = grub_current_context->vars[i]; p; p = q)
+ {
+ q = p->next;
+ grub_free (p->name);
+ grub_free (p->value);
+ grub_free (p);
+ }
+ }
+
+ /* Restore the previous context. */
+ context = grub_current_context->prev;
+ grub_free (grub_current_context);
+ grub_current_context = context;
+
+ menu = current_menu->prev;
+ grub_free (current_menu);
+ current_menu = menu;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_env_extractor_close (int source)
+{
+ grub_menu_t menu = NULL;
+ grub_menu_entry_t *last;
+ grub_err_t err;
+
+ if (source)
+ {
+ menu = grub_env_get_menu ();
+ grub_env_unset_menu ();
+ }
+ err = grub_env_context_close ();
+
+ if (source)
+ {
+ grub_menu_t menu2;
+ menu2 = grub_env_get_menu ();
+
+ last = &menu2->entry_list;
+ while (*last)
+ last = &(*last)->next;
+
+ *last = menu->entry_list;
+ menu2->size += menu->size;
+ }
+
+ grub_extractor_level--;
+ return err;
+}
+
+static grub_command_t export_cmd;
+
+static grub_err_t
+grub_cmd_export (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ int i;
+
+ if (argc < 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "no environment variable specified");
+
+ for (i = 0; i < argc; i++)
+ grub_env_export (args[i]);
+
+ return 0;
+}
+
+void
+grub_context_init (void)
+{
+ export_cmd = grub_register_command ("export", grub_cmd_export,
+ N_("ENVVAR [ENVVAR] ..."),
+ N_("Export variables."));
+}
+
+void
+grub_context_fini (void)
+{
+ grub_unregister_command (export_cmd);
+}
diff --git a/grub-core/normal/crypto.c b/grub-core/normal/crypto.c
new file mode 100644
index 0000000..19dafd8
--- /dev/null
+++ b/grub-core/normal/crypto.c
@@ -0,0 +1,151 @@
+/* crypto.c - support crypto autoload */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/crypto.h>
+#include <grub/normal.h>
+
+struct load_spec
+{
+ struct load_spec *next;
+ char *name;
+ char *modname;
+};
+
+static struct load_spec *crypto_specs = NULL;
+
+static void
+grub_crypto_autoload (const char *name)
+{
+ struct load_spec *cur;
+ grub_dl_t mod;
+
+ for (cur = crypto_specs; cur; cur = cur->next)
+ if (grub_strcasecmp (name, cur->name) == 0)
+ {
+ mod = grub_dl_load (cur->modname);
+ if (mod)
+ grub_dl_ref (mod);
+ grub_errno = GRUB_ERR_NONE;
+ }
+}
+
+static void
+grub_crypto_spec_free (void)
+{
+ struct load_spec *cur, *next;
+ for (cur = crypto_specs; cur; cur = next)
+ {
+ next = cur->next;
+ grub_free (cur->name);
+ grub_free (cur->modname);
+ grub_free (cur);
+ }
+ crypto_specs = NULL;
+}
+
+
+/* Read the file crypto.lst for auto-loading. */
+void
+read_crypto_list (const char *prefix)
+{
+ char *filename;
+ grub_file_t file;
+ char *buf = NULL;
+
+ if (!prefix)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ filename = grub_xasprintf ("%s/crypto.lst", prefix);
+ if (!filename)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ file = grub_file_open (filename);
+ grub_free (filename);
+ if (!file)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ /* Override previous crypto.lst. */
+ grub_crypto_spec_free ();
+
+ for (;; grub_free (buf))
+ {
+ char *p, *name;
+ struct load_spec *cur;
+
+ buf = grub_file_getline (file);
+
+ if (! buf)
+ break;
+
+ name = buf;
+
+ p = grub_strchr (name, ':');
+ if (! p)
+ continue;
+
+ *p = '\0';
+ while (*++p == ' ')
+ ;
+
+ cur = grub_malloc (sizeof (*cur));
+ if (!cur)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ cur->name = grub_strdup (name);
+ if (! name)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ grub_free (cur);
+ continue;
+ }
+
+ cur->modname = grub_strdup (p);
+ if (! cur->modname)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ grub_free (cur);
+ grub_free (cur->name);
+ continue;
+ }
+ cur->next = crypto_specs;
+ crypto_specs = cur;
+ }
+
+ grub_file_close (file);
+
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_crypto_autoload_hook = grub_crypto_autoload;
+}
diff --git a/grub-core/normal/datetime.c b/grub-core/normal/datetime.c
new file mode 100644
index 0000000..44791e1
--- /dev/null
+++ b/grub-core/normal/datetime.c
@@ -0,0 +1,100 @@
+/* datetime.c - Module for common datetime function. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/datetime.h>
+
+static char *grub_weekday_names[] =
+{
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+};
+
+int
+grub_get_weekday (struct grub_datetime *datetime)
+{
+ int a, y, m;
+
+ a = (14 - datetime->month) / 12;
+ y = datetime->year - a;
+ m = datetime->month + 12 * a - 2;
+
+ return (datetime->day + y + y / 4 - y / 100 + y / 400 + (31 * m / 12)) % 7;
+}
+
+char *
+grub_get_weekday_name (struct grub_datetime *datetime)
+{
+ return grub_weekday_names[grub_get_weekday (datetime)];
+}
+
+#define SECPERMIN 60
+#define SECPERHOUR (60*SECPERMIN)
+#define SECPERDAY (24*SECPERHOUR)
+#define SECPERYEAR (365*SECPERDAY)
+#define SECPER4YEARS (4*SECPERYEAR+SECPERDAY)
+
+
+void
+grub_unixtime2datetime (grub_int32_t nix, struct grub_datetime *datetime)
+{
+ int i;
+ int div;
+ grub_uint8_t months[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+ /* In the period of validity of unixtime all years divisible by 4
+ are bissextile*/
+ /* Convenience: let's have 3 consecutive non-bissextile years
+ at the beginning of the epoch. So count from 1973 instead of 1970 */
+ nix -= 3*SECPERYEAR + SECPERDAY;
+ /* Transform C divisions and modulos to mathematical ones */
+ div = nix / SECPER4YEARS;
+ if (nix < 0)
+ div--;
+ datetime->year = 1973 + 4 * div;
+ nix -= div * SECPER4YEARS;
+
+ /* On 31st December of bissextile years 365 days from the beginning
+ of the year elapsed but year isn't finished yet */
+ if (nix / SECPERYEAR == 4)
+ {
+ datetime->year += 3;
+ nix -= 3*SECPERYEAR;
+ }
+ else
+ {
+ datetime->year += nix / SECPERYEAR;
+ nix %= SECPERYEAR;
+ }
+ for (i = 0; i < 12
+ && nix >= ((grub_int32_t) (i==1 && datetime->year % 4 == 0
+ ? 29 : months[i]))*SECPERDAY; i++)
+ nix -= ((grub_int32_t) (i==1 && datetime->year % 4 == 0
+ ? 29 : months[i]))*SECPERDAY;
+ datetime->month = i + 1;
+ datetime->day = 1 + (nix / SECPERDAY);
+ nix %= SECPERDAY;
+ datetime->hour = (nix / SECPERHOUR);
+ nix %= SECPERHOUR;
+ datetime->minute = nix / SECPERMIN;
+ datetime->second = nix % SECPERMIN;
+}
diff --git a/grub-core/normal/dyncmd.c b/grub-core/normal/dyncmd.c
new file mode 100644
index 0000000..ed98855
--- /dev/null
+++ b/grub-core/normal/dyncmd.c
@@ -0,0 +1,182 @@
+/* dyncmd.c - support dynamic command */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/misc.h>
+#include <grub/command.h>
+#include <grub/normal.h>
+#include <grub/extcmd.h>
+#include <grub/script_sh.h>
+#include <grub/i18n.h>
+
+static grub_err_t
+grub_dyncmd_dispatcher (struct grub_extcmd_context *ctxt,
+ int argc, char **args)
+{
+ char *modname;
+ grub_dl_t mod;
+ grub_err_t ret;
+ grub_extcmd_t extcmd = ctxt->extcmd;
+ grub_command_t cmd = extcmd->cmd;
+
+ modname = extcmd->data;
+ mod = grub_dl_load (modname);
+ if (mod)
+ {
+ char *name;
+
+ grub_free (modname);
+ grub_dl_ref (mod);
+
+ name = (char *) cmd->name;
+ grub_unregister_extcmd (extcmd);
+
+ cmd = grub_command_find (name);
+ if (cmd)
+ {
+ if (cmd->flags & GRUB_COMMAND_FLAG_BLOCKS &&
+ cmd->flags & GRUB_COMMAND_FLAG_EXTCMD)
+ ret = grub_extcmd_dispatcher (cmd, argc, args, ctxt->script);
+ else
+ ret = (cmd->func) (cmd, argc, args);
+ }
+ else
+ ret = grub_errno;
+
+ grub_free (name);
+ }
+ else
+ ret = grub_errno;
+
+ return ret;
+}
+
+/* Read the file command.lst for auto-loading. */
+void
+read_command_list (const char *prefix)
+{
+ if (prefix)
+ {
+ char *filename;
+
+ filename = grub_xasprintf ("%s/command.lst", prefix);
+ if (filename)
+ {
+ grub_file_t file;
+
+ file = grub_file_open (filename);
+ if (file)
+ {
+ char *buf = NULL;
+ grub_command_t ptr, last = 0, next;
+
+ /* Override previous commands.lst. */
+ for (ptr = grub_command_list; ptr; ptr = next)
+ {
+ next = ptr->next;
+ if (ptr->flags & GRUB_COMMAND_FLAG_DYNCMD)
+ {
+ if (last)
+ last->next = ptr->next;
+ else
+ grub_command_list = ptr->next;
+ grub_free (ptr);
+ grub_free (ptr->data); /* extcmd struct */
+ }
+ else
+ last = ptr;
+ }
+
+ for (;; grub_free (buf))
+ {
+ char *p, *name, *modname;
+ grub_extcmd_t cmd;
+ int prio = 0;
+
+ buf = grub_file_getline (file);
+
+ if (! buf)
+ break;
+
+ name = buf;
+ if (*name == '*')
+ {
+ name++;
+ prio++;
+ }
+
+ if (! grub_isgraph (name[0]))
+ continue;
+
+ p = grub_strchr (name, ':');
+ if (! p)
+ continue;
+
+ *p = '\0';
+ while (*++p == ' ')
+ ;
+
+ if (! grub_isgraph (*p))
+ continue;
+
+ if (grub_dl_get (p))
+ continue;
+
+ name = grub_strdup (name);
+ if (! name)
+ continue;
+
+ modname = grub_strdup (p);
+ if (! modname)
+ {
+ grub_free (name);
+ continue;
+ }
+
+ cmd = grub_register_extcmd_prio (name,
+ grub_dyncmd_dispatcher,
+ GRUB_COMMAND_FLAG_BLOCKS
+ | GRUB_COMMAND_FLAG_EXTCMD
+ | GRUB_COMMAND_FLAG_DYNCMD,
+ 0, N_("not loaded"), 0,
+ prio);
+ if (! cmd)
+ {
+ grub_free (name);
+ grub_free (modname);
+ continue;
+ }
+ cmd->data = modname;
+
+ /* Update the active flag. */
+ grub_command_find (name);
+ }
+
+ grub_file_close (file);
+ }
+
+ grub_free (filename);
+ }
+ }
+
+ /* Ignore errors. */
+ grub_errno = GRUB_ERR_NONE;
+}
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
new file mode 100644
index 0000000..837fcb9
--- /dev/null
+++ b/grub-core/normal/main.c
@@ -0,0 +1,535 @@
+/* main.c - the normal mode main routine */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/kernel.h>
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/term.h>
+#include <grub/env.h>
+#include <grub/parser.h>
+#include <grub/reader.h>
+#include <grub/menu_viewer.h>
+#include <grub/auth.h>
+#include <grub/i18n.h>
+#include <grub/charset.h>
+#include <grub/script_sh.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_DEFAULT_HISTORY_SIZE 50
+
+static int nested_level = 0;
+int grub_normal_exit_level = 0;
+
+/* Read a line from the file FILE. */
+char *
+grub_file_getline (grub_file_t file)
+{
+ char c;
+ int pos = 0;
+ int literal = 0;
+ char *cmdline;
+ int max_len = 64;
+
+ /* Initially locate some space. */
+ cmdline = grub_malloc (max_len);
+ if (! cmdline)
+ return 0;
+
+ while (1)
+ {
+ if (grub_file_read (file, &c, 1) != 1)
+ break;
+
+ /* Skip all carriage returns. */
+ if (c == '\r')
+ continue;
+
+ /* Replace tabs with spaces. */
+ if (c == '\t')
+ c = ' ';
+
+ /* The previous is a backslash, then... */
+ if (literal)
+ {
+ /* If it is a newline, replace it with a space and continue. */
+ if (c == '\n')
+ {
+ c = ' ';
+
+ /* Go back to overwrite the backslash. */
+ if (pos > 0)
+ pos--;
+ }
+
+ literal = 0;
+ }
+
+ if (c == '\\')
+ literal = 1;
+
+ if (pos == 0)
+ {
+ if (! grub_isspace (c))
+ cmdline[pos++] = c;
+ }
+ else
+ {
+ if (pos >= max_len)
+ {
+ char *old_cmdline = cmdline;
+ max_len = max_len * 2;
+ cmdline = grub_realloc (cmdline, max_len);
+ if (! cmdline)
+ {
+ grub_free (old_cmdline);
+ return 0;
+ }
+ }
+
+ if (c == '\n')
+ break;
+
+ cmdline[pos++] = c;
+ }
+ }
+
+ cmdline[pos] = '\0';
+
+ /* If the buffer is empty, don't return anything at all. */
+ if (pos == 0)
+ {
+ grub_free (cmdline);
+ cmdline = 0;
+ }
+
+ return cmdline;
+}
+
+void
+grub_normal_free_menu (grub_menu_t menu)
+{
+ grub_menu_entry_t entry = menu->entry_list;
+
+ while (entry)
+ {
+ grub_menu_entry_t next_entry = entry->next;
+
+ grub_free ((void *) entry->title);
+ grub_free ((void *) entry->sourcecode);
+ entry = next_entry;
+ }
+
+ grub_free (menu);
+ grub_env_unset_menu ();
+}
+
+static grub_menu_t
+read_config_file (const char *config)
+{
+ grub_file_t file;
+
+ auto grub_err_t getline (char **line, int cont);
+ grub_err_t getline (char **line, int cont __attribute__ ((unused)))
+ {
+ while (1)
+ {
+ char *buf;
+
+ *line = buf = grub_file_getline (file);
+ if (! buf)
+ return grub_errno;
+
+ if (buf[0] == '#')
+ grub_free (*line);
+ else
+ break;
+ }
+
+ return GRUB_ERR_NONE;
+ }
+
+ grub_menu_t newmenu;
+
+ newmenu = grub_env_get_menu ();
+ if (! newmenu)
+ {
+ newmenu = grub_zalloc (sizeof (*newmenu));
+ if (! newmenu)
+ return 0;
+
+ grub_env_set_menu (newmenu);
+ }
+
+ /* Try to open the config file. */
+ file = grub_file_open (config);
+ if (! file)
+ return 0;
+
+ while (1)
+ {
+ char *line;
+
+ /* Print an error, if any. */
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+
+ if ((getline (&line, 0)) || (! line))
+ break;
+
+ grub_normal_parse_line (line, getline);
+ grub_free (line);
+ }
+
+ grub_file_close (file);
+
+ return newmenu;
+}
+
+/* Initialize the screen. */
+void
+grub_normal_init_page (struct grub_term_output *term)
+{
+ int msg_len;
+ int posx;
+ const char *msg = _("GNU GRUB version %s");
+ char *msg_formatted;
+ grub_uint32_t *unicode_msg;
+ grub_uint32_t *last_position;
+
+ grub_term_cls (term);
+
+ msg_formatted = grub_xasprintf (msg, PACKAGE_VERSION);
+ if (!msg_formatted)
+ return;
+
+ msg_len = grub_utf8_to_ucs4_alloc (msg_formatted,
+ &unicode_msg, &last_position);
+ grub_free (msg_formatted);
+
+ if (msg_len < 0)
+ {
+ return;
+ }
+
+ posx = grub_getstringwidth (unicode_msg, last_position, term);
+ posx = (grub_term_width (term) - posx) / 2;
+ grub_term_gotoxy (term, posx, 1);
+
+ grub_print_ucs4 (unicode_msg, last_position, 0, 0, term);
+ grub_putcode ('\n', term);
+ grub_putcode ('\n', term);
+ grub_free (unicode_msg);
+}
+
+static void
+read_lists (const char *val)
+{
+ if (! grub_no_autoload)
+ {
+ read_command_list (val);
+ read_fs_list (val);
+ read_crypto_list (val);
+ read_terminal_list (val);
+ }
+}
+
+static char *
+read_lists_hook (struct grub_env_var *var __attribute__ ((unused)),
+ const char *val)
+{
+ read_lists (val);
+ return val ? grub_strdup (val) : NULL;
+}
+
+/* Read the config file CONFIG and execute the menu interface or
+ the command line interface if BATCH is false. */
+void
+grub_normal_execute (const char *config, int nested, int batch)
+{
+ grub_menu_t menu = 0;
+ const char *prefix;
+
+ if (! nested)
+ {
+ prefix = grub_env_get ("prefix");
+ read_lists (prefix);
+ grub_register_variable_hook ("prefix", NULL, read_lists_hook);
+ grub_command_execute ("parser.grub", 0, 0);
+ }
+
+ if (config)
+ {
+ menu = read_config_file (config);
+
+ /* Ignore any error. */
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if (! batch)
+ {
+ if (menu && menu->size)
+ {
+ grub_show_menu (menu, nested, 0);
+ if (nested)
+ grub_normal_free_menu (menu);
+ }
+ }
+}
+
+/* This starts the normal mode. */
+void
+grub_enter_normal_mode (const char *config)
+{
+ nested_level++;
+ grub_normal_execute (config, 0, 0);
+ grub_cmdline_run (0);
+ nested_level--;
+ if (grub_normal_exit_level)
+ grub_normal_exit_level--;
+}
+
+/* Enter normal mode from rescue mode. */
+static grub_err_t
+grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
+ int argc, char *argv[])
+{
+ if (argc == 0)
+ {
+ /* Guess the config filename. It is necessary to make CONFIG static,
+ so that it won't get broken by longjmp. */
+ char *config;
+ const char *prefix;
+
+ prefix = grub_env_get ("prefix");
+ if (prefix)
+ {
+ config = grub_xasprintf ("%s/grub.cfg", prefix);
+ if (! config)
+ goto quit;
+
+ grub_enter_normal_mode (config);
+ grub_free (config);
+ }
+ else
+ grub_enter_normal_mode (0);
+ }
+ else
+ grub_enter_normal_mode (argv[0]);
+
+quit:
+ return 0;
+}
+
+/* Exit from normal mode to rescue mode. */
+static grub_err_t
+grub_cmd_normal_exit (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ if (nested_level <= grub_normal_exit_level)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "not in normal environment");
+ grub_normal_exit_level++;
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_normal_reader_init (int nested)
+{
+ struct grub_term_output *term;
+ const char *msg = _("Minimal BASH-like line editing is supported. For "
+ "the first word, TAB lists possible command completions. Anywhere "
+ "else TAB lists possible device or file completions. %s");
+ const char *msg_esc = _("ESC at any time exits.");
+ char *msg_formatted;
+
+ msg_formatted = grub_xasprintf (msg, nested ? msg_esc : "");
+ if (!msg_formatted)
+ return grub_errno;
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ grub_normal_init_page (term);
+ grub_term_setcursor (term, 1);
+
+ grub_print_message_indented (msg_formatted, 3, STANDARD_MARGIN, term);
+ grub_putcode ('\n', term);
+ grub_putcode ('\n', term);
+ }
+ grub_free (msg_formatted);
+
+ return 0;
+}
+
+static grub_err_t
+grub_normal_read_line_real (char **line, int cont, int nested)
+{
+ const char *prompt;
+
+ if (cont)
+ prompt = ">";
+ else
+ prompt = "grub>";
+
+ if (!prompt)
+ return grub_errno;
+
+ while (1)
+ {
+ *line = grub_cmdline_get (prompt);
+ if (*line)
+ break;
+
+ if (cont || nested)
+ {
+ grub_free (*line);
+ *line = 0;
+ return grub_errno;
+ }
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_normal_read_line (char **line, int cont)
+{
+ return grub_normal_read_line_real (line, cont, 0);
+}
+
+void
+grub_cmdline_run (int nested)
+{
+ grub_err_t err = GRUB_ERR_NONE;
+
+ err = grub_auth_check_authentication (NULL);
+
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ grub_normal_reader_init (nested);
+
+ while (1)
+ {
+ char *line;
+
+ if (grub_normal_exit_level)
+ break;
+
+ /* Print an error, if any. */
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_normal_read_line_real (&line, 0, nested);
+ if (! line)
+ break;
+
+ grub_normal_parse_line (line, grub_normal_read_line);
+ grub_free (line);
+ }
+}
+
+static char *
+grub_env_write_pager (struct grub_env_var *var __attribute__ ((unused)),
+ const char *val)
+{
+ grub_set_more ((*val == '1'));
+ return grub_strdup (val);
+}
+
+/* clear */
+static grub_err_t
+grub_mini_cmd_clear (struct grub_command *cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char *argv[] __attribute__ ((unused)))
+{
+ grub_cls ();
+ return 0;
+}
+
+static grub_command_t cmd_clear;
+
+static void (*grub_xputs_saved) (const char *str);
+
+GRUB_MOD_INIT(normal)
+{
+ /* Previously many modules depended on gzio. Be nice to user and load it. */
+ grub_dl_load ("gzio");
+
+ grub_normal_auth_init ();
+ grub_context_init ();
+ grub_script_init ();
+ grub_menu_init ();
+
+ grub_xputs_saved = grub_xputs;
+ grub_xputs = grub_xputs_normal;
+
+ /* Normal mode shouldn't be unloaded. */
+ if (mod)
+ grub_dl_ref (mod);
+
+ cmd_clear =
+ grub_register_command ("clear", grub_mini_cmd_clear,
+ 0, N_("Clear the screen."));
+
+ grub_set_history (GRUB_DEFAULT_HISTORY_SIZE);
+
+ grub_register_variable_hook ("pager", 0, grub_env_write_pager);
+ grub_env_export ("pager");
+
+ /* Register a command "normal" for the rescue mode. */
+ grub_register_command ("normal", grub_cmd_normal,
+ 0, N_("Enter normal mode."));
+ grub_register_command ("normal_exit", grub_cmd_normal_exit,
+ 0, N_("Exit from normal mode."));
+
+ /* Reload terminal colors when these variables are written to. */
+ grub_register_variable_hook ("color_normal", NULL, grub_env_write_color_normal);
+ grub_register_variable_hook ("color_highlight", NULL, grub_env_write_color_highlight);
+
+ /* Preserve hooks after context changes. */
+ grub_env_export ("color_normal");
+ grub_env_export ("color_highlight");
+
+ /* Set default color names. */
+ grub_env_set ("color_normal", "white/black");
+ grub_env_set ("color_highlight", "black/white");
+}
+
+GRUB_MOD_FINI(normal)
+{
+ grub_context_fini ();
+ grub_script_fini ();
+ grub_menu_fini ();
+ grub_normal_auth_fini ();
+
+ grub_xputs = grub_xputs_saved;
+
+ grub_set_history (0);
+ grub_register_variable_hook ("pager", 0, 0);
+ grub_fs_autoload_hook = 0;
+ grub_unregister_command (cmd_clear);
+}
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
new file mode 100644
index 0000000..5844cb2
--- /dev/null
+++ b/grub-core/normal/menu.c
@@ -0,0 +1,773 @@
+/* menu.c - General supporting functionality for menus. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/misc.h>
+#include <grub/loader.h>
+#include <grub/mm.h>
+#include <grub/time.h>
+#include <grub/env.h>
+#include <grub/menu_viewer.h>
+#include <grub/command.h>
+#include <grub/parser.h>
+#include <grub/auth.h>
+#include <grub/i18n.h>
+#include <grub/term.h>
+#include <grub/script_sh.h>
+#include <grub/gfxterm.h>
+#include <grub/dl.h>
+
+/* Time to delay after displaying an error message about a default/fallback
+ entry failing to boot. */
+#define DEFAULT_ENTRY_ERROR_DELAY_MS 2500
+
+grub_err_t (*grub_gfxmenu_try_hook) (int entry, grub_menu_t menu,
+ int nested) = NULL;
+
+/* Wait until the user pushes any key so that the user
+ can see what happened. */
+void
+grub_wait_after_message (void)
+{
+ grub_uint64_t endtime;
+ grub_xputs ("\n");
+ grub_printf_ (N_("Press any key to continue..."));
+ grub_refresh ();
+
+ endtime = grub_get_time_ms () + 10000;
+
+ while (grub_get_time_ms () < endtime)
+ if (grub_checkkey () >= 0)
+ {
+ grub_getkey ();
+ break;
+ }
+
+ grub_xputs ("\n");
+}
+
+/* Get a menu entry by its index in the entry list. */
+grub_menu_entry_t
+grub_menu_get_entry (grub_menu_t menu, int no)
+{
+ grub_menu_entry_t e;
+
+ for (e = menu->entry_list; e && no > 0; e = e->next, no--)
+ ;
+
+ return e;
+}
+
+/* Return the current timeout. If the variable "timeout" is not set or
+ invalid, return -1. */
+int
+grub_menu_get_timeout (void)
+{
+ char *val;
+ int timeout;
+
+ val = grub_env_get ("timeout");
+ if (! val)
+ return -1;
+
+ grub_error_push ();
+
+ timeout = (int) grub_strtoul (val, 0, 0);
+
+ /* If the value is invalid, unset the variable. */
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_env_unset ("timeout");
+ grub_errno = GRUB_ERR_NONE;
+ timeout = -1;
+ }
+
+ grub_error_pop ();
+
+ return timeout;
+}
+
+/* Set current timeout in the variable "timeout". */
+void
+grub_menu_set_timeout (int timeout)
+{
+ /* Ignore TIMEOUT if it is zero, because it will be unset really soon. */
+ if (timeout > 0)
+ {
+ char buf[16];
+
+ grub_snprintf (buf, sizeof (buf), "%d", timeout);
+ grub_env_set ("timeout", buf);
+ }
+}
+
+/* Get the first entry number from the value of the environment variable NAME,
+ which is a space-separated list of non-negative integers. The entry number
+ which is returned is stripped from the value of NAME. If no entry number
+ can be found, -1 is returned. */
+static int
+get_and_remove_first_entry_number (const char *name)
+{
+ char *val;
+ char *tail;
+ int entry;
+
+ val = grub_env_get (name);
+ if (! val)
+ return -1;
+
+ grub_error_push ();
+
+ entry = (int) grub_strtoul (val, &tail, 0);
+
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ /* Skip whitespace to find the next digit. */
+ while (*tail && grub_isspace (*tail))
+ tail++;
+ grub_env_set (name, tail);
+ }
+ else
+ {
+ grub_env_unset (name);
+ grub_errno = GRUB_ERR_NONE;
+ entry = -1;
+ }
+
+ grub_error_pop ();
+
+ return entry;
+}
+
+/* Run a menu entry. */
+static void
+grub_menu_execute_entry(grub_menu_entry_t entry, int auto_boot)
+{
+ grub_err_t err = GRUB_ERR_NONE;
+ int errs_before;
+ grub_menu_t menu = NULL;
+ char *optr, *buf, *oldchosen = NULL, *olddefault = NULL;
+ const char *ptr, *chosen, *def;
+ grub_size_t sz = 0;
+
+ if (entry->restricted)
+ err = grub_auth_check_authentication (entry->users);
+
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ errs_before = grub_err_printed_errors;
+
+ chosen = grub_env_get ("chosen");
+ def = grub_env_get ("default");
+
+ if (entry->submenu)
+ {
+ grub_env_context_open ();
+ menu = grub_zalloc (sizeof (*menu));
+ if (! menu)
+ return;
+ grub_env_set_menu (menu);
+ if (auto_boot)
+ grub_env_set ("timeout", "0");
+ }
+
+ for (ptr = entry->title; *ptr; ptr++)
+ sz += (*ptr == '>') ? 2 : 1;
+ if (chosen)
+ {
+ oldchosen = grub_strdup (chosen);
+ if (!oldchosen)
+ grub_print_error ();
+ }
+ if (def)
+ {
+ olddefault = grub_strdup (def);
+ if (!olddefault)
+ grub_print_error ();
+ }
+ sz++;
+ if (chosen)
+ sz += grub_strlen (chosen);
+ sz++;
+ buf = grub_malloc (sz);
+ if (!buf)
+ grub_print_error ();
+ else
+ {
+ optr = buf;
+ if (chosen)
+ {
+ optr = grub_stpcpy (optr, chosen);
+ *optr++ = '>';
+ }
+ for (ptr = entry->title; *ptr; ptr++)
+ {
+ if (*ptr == '>')
+ *optr++ = '>';
+ *optr++ = *ptr;
+ }
+ *optr = 0;
+ grub_env_set ("chosen", buf);
+ grub_env_export ("chosen");
+ grub_free (buf);
+ }
+ for (ptr = def; *ptr; ptr++)
+ {
+ if (ptr[0] == '>' && ptr[1] == '>')
+ {
+ ptr++;
+ continue;
+ }
+ if (ptr[0] == '>')
+ break;
+ }
+ if (ptr[0] && ptr[1])
+ grub_env_set ("default", ptr + 1);
+ else
+ grub_env_unset ("default");
+ grub_script_execute_sourcecode (entry->sourcecode, entry->argc, entry->args);
+
+ if (errs_before != grub_err_printed_errors)
+ grub_wait_after_message ();
+
+ if (grub_errno == GRUB_ERR_NONE && grub_loader_is_loaded ())
+ /* Implicit execution of boot, only if something is loaded. */
+ grub_command_execute ("boot", 0, 0);
+
+ if (entry->submenu)
+ {
+ if (menu && menu->size)
+ {
+ grub_show_menu (menu, 1, auto_boot);
+ grub_normal_free_menu (menu);
+ }
+ grub_env_context_close ();
+ }
+ if (oldchosen)
+ grub_env_set ("chosen", oldchosen);
+ else
+ grub_env_unset ("chosen");
+ if (olddefault)
+ grub_env_set ("default", olddefault);
+ else
+ grub_env_unset ("default");
+ grub_env_unset ("timeout");
+}
+
+/* Execute ENTRY from the menu MENU, falling back to entries specified
+ in the environment variable "fallback" if it fails. CALLBACK is a
+ pointer to a struct of function pointers which are used to allow the
+ caller provide feedback to the user. */
+static void
+grub_menu_execute_with_fallback (grub_menu_t menu,
+ grub_menu_entry_t entry,
+ int autobooted,
+ grub_menu_execute_callback_t callback,
+ void *callback_data)
+{
+ int fallback_entry;
+
+ callback->notify_booting (entry, callback_data);
+
+ grub_menu_execute_entry (entry, 1);
+
+ /* Deal with fallback entries. */
+ while ((fallback_entry = get_and_remove_first_entry_number ("fallback"))
+ >= 0)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+
+ entry = grub_menu_get_entry (menu, fallback_entry);
+ callback->notify_fallback (entry, callback_data);
+ grub_menu_execute_entry (entry, 1);
+ /* If the function call to execute the entry returns at all, then this is
+ taken to indicate a boot failure. For menu entries that do something
+ other than actually boot an operating system, this could assume
+ incorrectly that something failed. */
+ }
+
+ if (!autobooted)
+ callback->notify_failure (callback_data);
+}
+
+static struct grub_menu_viewer *viewers;
+
+static void
+menu_set_chosen_entry (int entry)
+{
+ struct grub_menu_viewer *cur;
+ for (cur = viewers; cur; cur = cur->next)
+ cur->set_chosen_entry (entry, cur->data);
+}
+
+static void
+menu_print_timeout (int timeout)
+{
+ struct grub_menu_viewer *cur;
+ for (cur = viewers; cur; cur = cur->next)
+ cur->print_timeout (timeout, cur->data);
+}
+
+static void
+menu_fini (void)
+{
+ struct grub_menu_viewer *cur, *next;
+ for (cur = viewers; cur; cur = next)
+ {
+ next = cur->next;
+ cur->fini (cur->data);
+ grub_free (cur);
+ }
+ viewers = NULL;
+}
+
+static void
+menu_init (int entry, grub_menu_t menu, int nested)
+{
+ struct grub_term_output *term;
+ int gfxmenu = 0;
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ if (grub_strcmp (term->name, "gfxterm") == 0)
+ {
+ if (grub_env_get ("theme"))
+ {
+ if (!grub_gfxmenu_try_hook)
+ {
+ grub_dl_load ("gfxmenu");
+ grub_print_error ();
+ }
+ if (grub_gfxmenu_try_hook)
+ {
+ grub_err_t err;
+ err = grub_gfxmenu_try_hook (entry, menu, nested);
+ if(!err)
+ {
+ gfxmenu = 1;
+ break;
+ }
+ }
+ else
+ grub_error (GRUB_ERR_BAD_MODULE, "no gfxmenu found");
+ grub_print_error ();
+ grub_wait_after_message ();
+ }
+ grub_errno = GRUB_ERR_NONE;
+ grub_gfxterm_fullscreen ();
+ break;
+ }
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ grub_err_t err;
+
+ if (grub_strcmp (term->name, "gfxterm") == 0 && gfxmenu)
+ break;
+
+ err = grub_menu_try_text (term, entry, menu, nested);
+ if(!err)
+ continue;
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+}
+
+static void
+clear_timeout (void)
+{
+ struct grub_menu_viewer *cur;
+ for (cur = viewers; cur; cur = cur->next)
+ cur->clear_timeout (cur->data);
+}
+
+void
+grub_menu_register_viewer (struct grub_menu_viewer *viewer)
+{
+ viewer->next = viewers;
+ viewers = viewer;
+}
+
+static int
+menuentry_eq (const char *title, const char *spec)
+{
+ const char *ptr1, *ptr2;
+ ptr1 = title;
+ ptr2 = spec;
+ while (1)
+ {
+ if (*ptr2 == '>' && ptr2[1] != '>' && *ptr1 == 0)
+ return 1;
+ if (*ptr2 == '>' && ptr2[1] != '>')
+ return 0;
+ if (*ptr2 == '>')
+ ptr2++;
+ if (*ptr1 != *ptr2)
+ return 0;
+ if (*ptr1 == 0)
+ return 1;
+ ptr1++;
+ ptr2++;
+ }
+}
+
+
+/* Get the entry number from the variable NAME. */
+static int
+get_entry_number (grub_menu_t menu, const char *name)
+{
+ const char *val;
+ int entry;
+
+ val = grub_env_get (name);
+ if (! val)
+ return -1;
+
+ grub_error_push ();
+
+ entry = (int) grub_strtoul (val, 0, 0);
+
+ if (grub_errno == GRUB_ERR_BAD_NUMBER)
+ {
+ /* See if the variable matches the title of a menu entry. */
+ grub_menu_entry_t e = menu->entry_list;
+ int i;
+
+ grub_errno = GRUB_ERR_NONE;
+
+ for (i = 0; e; i++)
+ {
+ if (menuentry_eq (e->title, val))
+ {
+ entry = i;
+ break;
+ }
+ e = e->next;
+ }
+
+ if (! e)
+ entry = -1;
+ }
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ entry = -1;
+ }
+
+ grub_error_pop ();
+
+ return entry;
+}
+
+#define GRUB_MENU_PAGE_SIZE 10
+
+/* Show the menu and handle menu entry selection. Returns the menu entry
+ index that should be executed or -1 if no entry should be executed (e.g.,
+ Esc pressed to exit a sub-menu or switching menu viewers).
+ If the return value is not -1, then *AUTO_BOOT is nonzero iff the menu
+ entry to be executed is a result of an automatic default selection because
+ of the timeout. */
+static int
+run_menu (grub_menu_t menu, int nested, int *auto_boot)
+{
+ grub_uint64_t saved_time;
+ int default_entry, current_entry;
+ int timeout;
+
+ default_entry = get_entry_number (menu, "default");
+
+ /* If DEFAULT_ENTRY is not within the menu entries, fall back to
+ the first entry. */
+ if (default_entry < 0 || default_entry >= menu->size)
+ default_entry = 0;
+
+ /* If timeout is 0, drawing is pointless (and ugly). */
+ if (grub_menu_get_timeout () == 0)
+ {
+ *auto_boot = 1;
+ return default_entry;
+ }
+
+ current_entry = default_entry;
+
+ /* Initialize the time. */
+ saved_time = grub_get_time_ms ();
+
+ refresh:
+ menu_init (current_entry, menu, nested);
+
+ timeout = grub_menu_get_timeout ();
+
+ if (timeout > 0)
+ menu_print_timeout (timeout);
+ else
+ clear_timeout ();
+
+ while (1)
+ {
+ int c;
+ timeout = grub_menu_get_timeout ();
+
+ if (grub_normal_exit_level)
+ return -1;
+
+ if (timeout > 0)
+ {
+ grub_uint64_t current_time;
+
+ current_time = grub_get_time_ms ();
+ if (current_time - saved_time >= 1000)
+ {
+ timeout--;
+ grub_menu_set_timeout (timeout);
+ saved_time = current_time;
+ menu_print_timeout (timeout);
+ }
+ }
+
+ if (timeout == 0)
+ {
+ grub_env_unset ("timeout");
+ *auto_boot = 1;
+ menu_fini ();
+ return default_entry;
+ }
+
+ if (grub_checkkey () >= 0 || timeout < 0)
+ {
+ c = grub_getkey ();
+
+ if (timeout >= 0)
+ {
+ grub_env_unset ("timeout");
+ grub_env_unset ("fallback");
+ clear_timeout ();
+ }
+
+ switch (c)
+ {
+ case GRUB_TERM_KEY_HOME:
+ case GRUB_TERM_CTRL | 'a':
+ current_entry = 0;
+ menu_set_chosen_entry (current_entry);
+ break;
+
+ case GRUB_TERM_KEY_END:
+ case GRUB_TERM_CTRL | 'e':
+ current_entry = menu->size - 1;
+ menu_set_chosen_entry (current_entry);
+ break;
+
+ case GRUB_TERM_KEY_UP:
+ case GRUB_TERM_CTRL | 'p':
+ case '^':
+ if (current_entry > 0)
+ current_entry--;
+ menu_set_chosen_entry (current_entry);
+ break;
+
+ case GRUB_TERM_CTRL | 'n':
+ case GRUB_TERM_KEY_DOWN:
+ case 'v':
+ if (current_entry < menu->size - 1)
+ current_entry++;
+ menu_set_chosen_entry (current_entry);
+ break;
+
+ case GRUB_TERM_CTRL | 'g':
+ case GRUB_TERM_KEY_PPAGE:
+ if (current_entry < GRUB_MENU_PAGE_SIZE)
+ current_entry = 0;
+ else
+ current_entry -= GRUB_MENU_PAGE_SIZE;
+ menu_set_chosen_entry (current_entry);
+ break;
+
+ case GRUB_TERM_CTRL | 'c':
+ case GRUB_TERM_KEY_NPAGE:
+ if (current_entry + GRUB_MENU_PAGE_SIZE < menu->size)
+ current_entry += GRUB_MENU_PAGE_SIZE;
+ else
+ current_entry = menu->size - 1;
+ menu_set_chosen_entry (current_entry);
+ break;
+
+ case '\n':
+ case '\r':
+ case GRUB_TERM_KEY_RIGHT:
+ case GRUB_TERM_CTRL | 'f':
+ menu_fini ();
+ *auto_boot = 0;
+ return current_entry;
+
+ case '\e':
+ if (nested)
+ {
+ menu_fini ();
+ return -1;
+ }
+ break;
+
+ case 'c':
+ menu_fini ();
+ grub_cmdline_run (1);
+ goto refresh;
+
+ case 'e':
+ menu_fini ();
+ {
+ grub_menu_entry_t e = grub_menu_get_entry (menu, current_entry);
+ if (e)
+ grub_menu_entry_run (e);
+ }
+ goto refresh;
+
+ default:
+ {
+ grub_menu_entry_t entry;
+ int i;
+ for (i = 0, entry = menu->entry_list; i < menu->size;
+ i++, entry = entry->next)
+ if (entry->hotkey == c)
+ {
+ menu_fini ();
+ *auto_boot = 0;
+ return i;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /* Never reach here. */
+ return -1;
+}
+
+/* Callback invoked immediately before a menu entry is executed. */
+static void
+notify_booting (grub_menu_entry_t entry,
+ void *userdata __attribute__((unused)))
+{
+ grub_printf (" ");
+ grub_printf_ (N_("Booting \'%s\'"), entry->title);
+ grub_printf ("\n\n");
+}
+
+/* Callback invoked when a default menu entry executed because of a timeout
+ has failed and an attempt will be made to execute the next fallback
+ entry, ENTRY. */
+static void
+notify_fallback (grub_menu_entry_t entry,
+ void *userdata __attribute__((unused)))
+{
+ grub_printf ("\n ");
+ grub_printf_ (N_("Falling back to \'%s\'"), entry->title);
+ grub_printf ("\n\n");
+ grub_millisleep (DEFAULT_ENTRY_ERROR_DELAY_MS);
+}
+
+/* Callback invoked when a menu entry has failed and there is no remaining
+ fallback entry to attempt. */
+static void
+notify_execution_failure (void *userdata __attribute__((unused)))
+{
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ }
+ grub_printf ("\n ");
+ grub_printf_ (N_("Failed to boot both default and fallback entries.\n"));
+ grub_wait_after_message ();
+}
+
+/* Callbacks used by the text menu to provide user feedback when menu entries
+ are executed. */
+static struct grub_menu_execute_callback execution_callback =
+{
+ .notify_booting = notify_booting,
+ .notify_fallback = notify_fallback,
+ .notify_failure = notify_execution_failure
+};
+
+static grub_err_t
+show_menu (grub_menu_t menu, int nested, int autobooted)
+{
+ while (1)
+ {
+ int boot_entry;
+ grub_menu_entry_t e;
+ int auto_boot;
+
+ boot_entry = run_menu (menu, nested, &auto_boot);
+ if (boot_entry < 0)
+ break;
+
+ e = grub_menu_get_entry (menu, boot_entry);
+ if (! e)
+ continue; /* Menu is empty. */
+
+ grub_cls ();
+
+ if (auto_boot)
+ grub_menu_execute_with_fallback (menu, e, autobooted,
+ &execution_callback, 0);
+ else
+ grub_menu_execute_entry (e, 0);
+ if (autobooted)
+ break;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_show_menu (grub_menu_t menu, int nested, int autoboot)
+{
+ grub_err_t err1, err2;
+
+ while (1)
+ {
+ err1 = show_menu (menu, nested, autoboot);
+ autoboot = 0;
+ grub_print_error ();
+
+ if (grub_normal_exit_level)
+ break;
+
+ err2 = grub_auth_check_authentication (NULL);
+ if (err2)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ break;
+ }
+
+ return err1;
+}
diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c
new file mode 100644
index 0000000..dc5ab52
--- /dev/null
+++ b/grub-core/normal/menu_entry.c
@@ -0,0 +1,1447 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/loader.h>
+#include <grub/command.h>
+#include <grub/parser.h>
+#include <grub/script_sh.h>
+#include <grub/auth.h>
+#include <grub/i18n.h>
+#include <grub/charset.h>
+
+enum update_mode
+ {
+ NO_LINE,
+ SINGLE_LINE,
+ ALL_LINES
+ };
+
+struct line
+{
+ /* The line buffer. */
+ char *buf;
+ /* The length of the line. */
+ int len;
+ /* The maximum length of the line. */
+ int max_len;
+};
+
+struct per_term_screen
+{
+ struct grub_term_output *term;
+ /* The X coordinate. */
+ int x;
+ /* The Y coordinate. */
+ int y;
+ /* Number of entries. */
+ int num_entries;
+};
+
+struct screen
+{
+ /* The array of lines. */
+ struct line *lines;
+ /* The number of lines. */
+ int num_lines;
+ /* The current column. */
+ int column;
+ /* The real column. */
+ int real_column;
+ /* The current line. */
+ int line;
+ /* The kill buffer. */
+ char *killed_text;
+ /* The flag of a completion window. */
+ int completion_shown;
+
+ int submenu;
+
+ struct per_term_screen *terms;
+ unsigned nterms;
+};
+
+/* Used for storing completion items temporarily. */
+static struct line completion_buffer;
+static int completion_type;
+
+/* Initialize a line. */
+static int
+init_line (struct line *linep)
+{
+ linep->len = 0;
+ linep->max_len = 80; /* XXX */
+ linep->buf = grub_malloc (linep->max_len + 1);
+ if (! linep->buf)
+ return 0;
+
+ return 1;
+}
+
+/* Allocate extra space if necessary. */
+static int
+ensure_space (struct line *linep, int extra)
+{
+ if (linep->max_len < linep->len + extra)
+ {
+ linep->max_len = linep->len + extra + 80; /* XXX */
+ linep->buf = grub_realloc (linep->buf, linep->max_len + 1);
+ if (! linep->buf)
+ return 0;
+ }
+
+ return 1;
+}
+
+/* Return the number of lines occupied by this line on the screen. */
+static int
+get_logical_num_lines (struct line *linep, struct per_term_screen *term_screen)
+{
+ return (linep->len / grub_term_entry_width (term_screen->term)) + 1;
+}
+
+/* Print a line. */
+static void
+print_line (struct line *linep, int offset, int start, int y,
+ struct per_term_screen *term_screen)
+{
+ grub_term_gotoxy (term_screen->term,
+ GRUB_TERM_LEFT_BORDER_X + GRUB_TERM_MARGIN + start + 1,
+ y + GRUB_TERM_FIRST_ENTRY_Y);
+
+ if (linep->len >= offset + grub_term_entry_width (term_screen->term))
+ {
+ char *p, c;
+ p = linep->buf + offset + grub_term_entry_width (term_screen->term);
+ c = *p;
+ *p = 0;
+ grub_puts_terminal (linep->buf + offset + start, term_screen->term);
+ *p = c;
+ grub_putcode ('\\', term_screen->term);
+ }
+ else
+ {
+ int i;
+ char *p, c;
+
+ p = linep->buf + linep->len;
+ c = *p;
+ *p = 0;
+ grub_puts_terminal (linep->buf + offset + start, term_screen->term);
+ *p = c;
+
+ for (i = 0;
+ i <= grub_term_entry_width (term_screen->term) - linep->len + offset;
+ i++)
+ grub_putcode (' ', term_screen->term);
+ }
+}
+
+/* Print an empty line. */
+static void
+print_empty_line (int y, struct per_term_screen *term_screen)
+{
+ int i;
+
+ grub_term_gotoxy (term_screen->term,
+ GRUB_TERM_LEFT_BORDER_X + GRUB_TERM_MARGIN + 1,
+ y + GRUB_TERM_FIRST_ENTRY_Y);
+
+ for (i = 0; i < grub_term_entry_width (term_screen->term) + 1; i++)
+ grub_putcode (' ', term_screen->term);
+}
+
+/* Print an up arrow. */
+static void
+print_up (int flag, struct per_term_screen *term_screen)
+{
+ grub_term_gotoxy (term_screen->term, GRUB_TERM_LEFT_BORDER_X
+ + grub_term_border_width (term_screen->term),
+ GRUB_TERM_FIRST_ENTRY_Y);
+
+ if (flag)
+ grub_putcode (GRUB_UNICODE_UPARROW, term_screen->term);
+ else
+ grub_putcode (' ', term_screen->term);
+}
+
+/* Print a down arrow. */
+static void
+print_down (int flag, struct per_term_screen *term_screen)
+{
+ grub_term_gotoxy (term_screen->term, GRUB_TERM_LEFT_BORDER_X
+ + grub_term_border_width (term_screen->term),
+ GRUB_TERM_TOP_BORDER_Y
+ + term_screen->num_entries);
+
+ if (flag)
+ grub_putcode (GRUB_UNICODE_DOWNARROW, term_screen->term);
+ else
+ grub_putcode (' ', term_screen->term);
+}
+
+/* Draw the lines of the screen SCREEN. */
+static void
+update_screen (struct screen *screen, struct per_term_screen *term_screen,
+ int region_start, int region_column,
+ int up, int down, enum update_mode mode)
+{
+ int up_flag = 0;
+ int down_flag = 0;
+ int y;
+ int i;
+ struct line *linep;
+
+ /* Check if scrolling is necessary. */
+ if (term_screen->y < 0 || term_screen->y >= term_screen->num_entries)
+ {
+ if (term_screen->y < 0)
+ term_screen->y = 0;
+ else
+ term_screen->y = term_screen->num_entries - 1;
+
+ region_start = 0;
+ region_column = 0;
+ up = 1;
+ down = 1;
+ mode = ALL_LINES;
+ }
+
+ if (mode != NO_LINE)
+ {
+ /* Draw lines. This code is tricky, because this must calculate logical
+ positions. */
+ y = term_screen->y - screen->column
+ / grub_term_entry_width (term_screen->term);
+ i = screen->line;
+ linep = screen->lines + i;
+ while (y > 0)
+ {
+ i--;
+ linep--;
+ y -= get_logical_num_lines (linep, term_screen);
+ }
+
+ if (y < 0 || i > 0)
+ up_flag = 1;
+
+ do
+ {
+ int column;
+
+ if (linep >= screen->lines + screen->num_lines)
+ break;
+
+ for (column = 0;
+ column <= linep->len
+ && y < term_screen->num_entries;
+ column += grub_term_entry_width (term_screen->term), y++)
+ {
+ if (y < 0)
+ continue;
+
+ if (i == region_start)
+ {
+ if (region_column >= column
+ && region_column
+ < (column
+ + grub_term_entry_width (term_screen->term)))
+ print_line (linep, column, region_column - column, y,
+ term_screen);
+ else if (region_column < column)
+ print_line (linep, column, 0, y, term_screen);
+ }
+ else if (i > region_start && mode == ALL_LINES)
+ print_line (linep, column, 0, y, term_screen);
+ }
+
+ if (y == term_screen->num_entries)
+ {
+ if (column <= linep->len || i + 1 < screen->num_lines)
+ down_flag = 1;
+ }
+
+ linep++;
+ i++;
+
+ if (mode == ALL_LINES && i == screen->num_lines)
+ for (; y < term_screen->num_entries; y++)
+ print_empty_line (y, term_screen);
+
+ }
+ while (y < term_screen->num_entries);
+
+ /* Draw up and down arrows. */
+ if (up)
+ print_up (up_flag, term_screen);
+ if (down)
+ print_down (down_flag, term_screen);
+ }
+
+ /* Place the cursor. */
+ grub_term_gotoxy (term_screen->term,
+ GRUB_TERM_LEFT_BORDER_X + GRUB_TERM_MARGIN + 1
+ + term_screen->x,
+ GRUB_TERM_FIRST_ENTRY_Y + term_screen->y);
+
+ grub_term_refresh (term_screen->term);
+}
+
+static void
+update_screen_all (struct screen *screen,
+ int region_start, int region_column,
+ int up, int down, enum update_mode mode)
+{
+ unsigned i;
+ for (i = 0; i < screen->nterms; i++)
+ update_screen (screen, &screen->terms[i], region_start, region_column,
+ up, down, mode);
+}
+
+static int
+insert_string (struct screen *screen, char *s, int update)
+{
+ int region_start = screen->num_lines;
+ int region_column = 0;
+ int down[screen->nterms];
+ enum update_mode mode[screen->nterms];
+ unsigned i;
+
+ for (i = 0; i < screen->nterms; i++)
+ {
+ down[i] = 0;
+ mode[i] = NO_LINE;
+ }
+
+ while (*s)
+ {
+ if (*s == '\n')
+ {
+ /* LF is special because it creates a new line. */
+ struct line *current_linep;
+ struct line *next_linep;
+ int size;
+
+ /* Make a new line. */
+ screen->num_lines++;
+ screen->lines = grub_realloc (screen->lines,
+ screen->num_lines
+ * sizeof (screen->lines[0]));
+ if (! screen->lines)
+ return 0;
+
+ /* Scroll down. */
+ grub_memmove (screen->lines + screen->line + 2,
+ screen->lines + screen->line + 1,
+ ((screen->num_lines - screen->line - 2)
+ * sizeof (struct line)));
+
+ if (! init_line (screen->lines + screen->line + 1))
+ return 0;
+
+ /* Fold the line. */
+ current_linep = screen->lines + screen->line;
+ next_linep = current_linep + 1;
+ size = current_linep->len - screen->column;
+
+ if (! ensure_space (next_linep, size))
+ return 0;
+
+ grub_memmove (next_linep->buf,
+ current_linep->buf + screen->column,
+ size);
+ current_linep->len = screen->column;
+ next_linep->len = size;
+
+ /* Update a dirty region. */
+ if (region_start > screen->line)
+ {
+ region_start = screen->line;
+ region_column = screen->column;
+ }
+
+ for (i = 0; i < screen->nterms; i++)
+ {
+ mode[i] = ALL_LINES;
+ down[i] = 1; /* XXX not optimal. */
+ }
+
+ /* Move the cursor. */
+ screen->column = screen->real_column = 0;
+ screen->line++;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x = 0;
+ screen->terms[i].y++;
+ }
+ s++;
+ }
+ else
+ {
+ /* All but LF. */
+ char *p;
+ struct line *current_linep;
+ int size;
+ int orig_num[screen->nterms], new_num[screen->nterms];
+
+ /* Find a string delimited by LF. */
+ p = grub_strchr (s, '\n');
+ if (! p)
+ p = s + grub_strlen (s);
+
+ /* Insert the string. */
+ current_linep = screen->lines + screen->line;
+ size = p - s;
+ if (! ensure_space (current_linep, size))
+ return 0;
+
+ grub_memmove (current_linep->buf + screen->column + size,
+ current_linep->buf + screen->column,
+ current_linep->len - screen->column);
+ grub_memmove (current_linep->buf + screen->column,
+ s,
+ size);
+ for (i = 0; i < screen->nterms; i++)
+ orig_num[i] = get_logical_num_lines (current_linep,
+ &screen->terms[i]);
+ current_linep->len += size;
+ for (i = 0; i < screen->nterms; i++)
+ new_num[i] = get_logical_num_lines (current_linep,
+ &screen->terms[i]);
+
+ /* Update the dirty region. */
+ if (region_start > screen->line)
+ {
+ region_start = screen->line;
+ region_column = screen->column;
+ }
+
+ for (i = 0; i < screen->nterms; i++)
+ if (orig_num[i] != new_num[i])
+ {
+ mode[i] = ALL_LINES;
+ down[i] = 1; /* XXX not optimal. */
+ }
+ else if (mode[i] != ALL_LINES)
+ mode[i] = SINGLE_LINE;
+
+ /* Move the cursor. */
+ screen->column += size;
+ screen->real_column = screen->column;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x += size;
+ screen->terms[i].y += screen->terms[i].x
+ / grub_term_entry_width (screen->terms[i].term);
+ screen->terms[i].x
+ %= grub_term_entry_width (screen->terms[i].term);
+ }
+ s = p;
+ }
+ }
+
+ if (update)
+ for (i = 0; i < screen->nterms; i++)
+ update_screen (screen, &screen->terms[i],
+ region_start, region_column, 0, down[i], mode[i]);
+
+ return 1;
+}
+
+/* Release the resource allocated for SCREEN. */
+static void
+destroy_screen (struct screen *screen)
+{
+ int i;
+
+ if (screen->lines)
+ for (i = 0; i < screen->num_lines; i++)
+ {
+ struct line *linep = screen->lines + i;
+
+ if (linep)
+ grub_free (linep->buf);
+ }
+
+ grub_free (screen->killed_text);
+ grub_free (screen->lines);
+ grub_free (screen->terms);
+ grub_free (screen);
+}
+
+/* Make a new screen. */
+static struct screen *
+make_screen (grub_menu_entry_t entry)
+{
+ struct screen *screen;
+ unsigned i;
+
+ /* Initialize the screen. */
+ screen = grub_zalloc (sizeof (*screen));
+ if (! screen)
+ return 0;
+
+ screen->submenu = entry->submenu;
+
+ screen->num_lines = 1;
+ screen->lines = grub_malloc (sizeof (struct line));
+ if (! screen->lines)
+ goto fail;
+
+ /* Initialize the first line which must be always present. */
+ if (! init_line (screen->lines))
+ goto fail;
+
+ insert_string (screen, (char *) entry->sourcecode, 0);
+
+ /* Reset the cursor position. */
+ screen->column = 0;
+ screen->real_column = 0;
+ screen->line = 0;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x = 0;
+ screen->terms[i].y = 0;
+ }
+
+ return screen;
+
+ fail:
+ destroy_screen (screen);
+ return 0;
+}
+
+static int
+forward_char (struct screen *screen, int update)
+{
+ struct line *linep;
+ unsigned i;
+
+ linep = screen->lines + screen->line;
+ if (screen->column < linep->len)
+ {
+ screen->column++;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x++;
+ if (screen->terms[i].x
+ == grub_term_entry_width (screen->terms[i].term))
+ {
+ screen->terms[i].x = 0;
+ screen->terms[i].y++;
+ }
+ }
+ }
+ else if (screen->num_lines > screen->line + 1)
+ {
+ screen->column = 0;
+ screen->line++;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x = 0;
+ screen->terms[i].y++;
+ }
+ }
+
+ screen->real_column = screen->column;
+
+ if (update)
+ update_screen_all (screen, screen->num_lines, 0, 0, 0, NO_LINE);
+ return 1;
+}
+
+static int
+backward_char (struct screen *screen, int update)
+{
+ unsigned i;
+
+ if (screen->column > 0)
+ {
+ screen->column--;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x--;
+ if (screen->terms[i].x == -1)
+ {
+ screen->terms[i].x
+ = grub_term_entry_width (screen->terms[i].term) - 1;
+ screen->terms[i].y--;
+ }
+ }
+ }
+ else if (screen->line > 0)
+ {
+ struct line *linep;
+
+ screen->line--;
+ linep = screen->lines + screen->line;
+ screen->column = linep->len;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x = screen->column
+ % grub_term_entry_width (screen->terms[i].term);
+ screen->terms[i].y--;
+ }
+ }
+
+ screen->real_column = screen->column;
+
+ if (update)
+ update_screen_all (screen, screen->num_lines, 0, 0, 0, NO_LINE);
+
+ return 1;
+}
+
+static int
+previous_line (struct screen *screen, int update)
+{
+ unsigned i;
+
+ if (screen->line > 0)
+ {
+ struct line *linep;
+ int col;
+
+ /* How many physical lines from the current position
+ to the first physical line? */
+ col = screen->column;
+
+ screen->line--;
+
+ linep = screen->lines + screen->line;
+ if (linep->len < screen->real_column)
+ screen->column = linep->len;
+ else
+ screen->column = screen->real_column;
+
+ for (i = 0; i < screen->nterms; i++)
+ {
+ int dy;
+ dy = col / grub_term_entry_width (screen->terms[i].term);
+
+ /* How many physical lines from the current position
+ to the last physical line? */
+ dy += (linep->len / grub_term_entry_width (screen->terms[i].term)
+ - screen->column
+ / grub_term_entry_width (screen->terms[i].term));
+
+ screen->terms[i].y -= dy + 1;
+ screen->terms[i].x
+ = screen->column % grub_term_entry_width (screen->terms[i].term);
+ }
+ }
+ else
+ {
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].y
+ -= screen->column / grub_term_entry_width (screen->terms[i].term);
+ screen->terms[i].x = 0;
+ }
+ screen->column = 0;
+ }
+
+ if (update)
+ update_screen_all (screen, screen->num_lines, 0, 0, 0, NO_LINE);
+
+ return 1;
+}
+
+static int
+next_line (struct screen *screen, int update)
+{
+ unsigned i;
+
+ if (screen->line < screen->num_lines - 1)
+ {
+ struct line *linep;
+ int l1, c1;
+
+ /* How many physical lines from the current position
+ to the last physical line? */
+ linep = screen->lines + screen->line;
+ l1 = linep->len;
+ c1 = screen->column;
+
+ screen->line++;
+
+ linep++;
+ if (linep->len < screen->real_column)
+ screen->column = linep->len;
+ else
+ screen->column = screen->real_column;
+
+ for (i = 0; i < screen->nterms; i++)
+ {
+ int dy;
+ dy = l1 / grub_term_entry_width (screen->terms[i].term)
+ - c1 / grub_term_entry_width (screen->terms[i].term);
+ /* How many physical lines from the current position
+ to the first physical line? */
+ dy += screen->column / grub_term_entry_width (screen->terms[i].term);
+ screen->terms[i].y += dy + 1;
+ screen->terms[i].x = screen->column
+ % grub_term_entry_width (screen->terms[i].term);
+ }
+ }
+ else
+ {
+ struct line *linep;
+ int l, s;
+
+ linep = screen->lines + screen->line;
+ l = linep->len;
+ s = screen->column;
+ screen->column = linep->len;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].y
+ += (l / grub_term_entry_width (screen->terms[i].term)
+ - s / grub_term_entry_width (screen->terms[i].term));
+ screen->terms[i].x
+ = screen->column % grub_term_entry_width (screen->terms[i].term);
+ }
+ }
+
+ if (update)
+ update_screen_all (screen, screen->num_lines, 0, 0, 0, NO_LINE);
+
+ return 1;
+}
+
+static int
+beginning_of_line (struct screen *screen, int update)
+{
+ unsigned i;
+ int col;
+
+ col = screen->column;
+ screen->column = screen->real_column = 0;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].x = 0;
+ screen->terms[i].y -= col / grub_term_entry_width (screen->terms[i].term);
+ }
+
+ if (update)
+ update_screen_all (screen, screen->num_lines, 0, 0, 0, NO_LINE);
+
+ return 1;
+}
+
+static int
+end_of_line (struct screen *screen, int update)
+{
+ struct line *linep;
+ unsigned i;
+ int col;
+
+ linep = screen->lines + screen->line;
+ col = screen->column;
+ screen->column = screen->real_column = linep->len;
+ for (i = 0; i < screen->nterms; i++)
+ {
+ screen->terms[i].y
+ += (linep->len / grub_term_entry_width (screen->terms->term)
+ - col / grub_term_entry_width (screen->terms->term));
+ screen->terms[i].x
+ = screen->column % grub_term_entry_width (screen->terms->term);
+ }
+
+ if (update)
+ update_screen_all (screen, screen->num_lines, 0, 0, 0, NO_LINE);
+
+ return 1;
+}
+
+static int
+delete_char (struct screen *screen, int update)
+{
+ struct line *linep;
+ int start = screen->num_lines;
+ int column = 0;
+
+ linep = screen->lines + screen->line;
+ if (linep->len > screen->column)
+ {
+ int orig_num[screen->nterms], new_num;
+ unsigned i;
+
+ for (i = 0; i < screen->nterms; i++)
+ orig_num[i] = get_logical_num_lines (linep, &screen->terms[i]);
+
+ grub_memmove (linep->buf + screen->column,
+ linep->buf + screen->column + 1,
+ linep->len - screen->column - 1);
+ linep->len--;
+
+ start = screen->line;
+ column = screen->column;
+
+ screen->real_column = screen->column;
+
+ if (update)
+ {
+ for (i = 0; i < screen->nterms; i++)
+ {
+ new_num = get_logical_num_lines (linep, &screen->terms[i]);
+ if (orig_num[i] != new_num)
+ update_screen (screen, &screen->terms[i],
+ start, column, 0, 0, ALL_LINES);
+ else
+ update_screen (screen, &screen->terms[i],
+ start, column, 0, 0, SINGLE_LINE);
+ }
+ }
+ }
+ else if (screen->num_lines > screen->line + 1)
+ {
+ struct line *next_linep;
+
+ next_linep = linep + 1;
+ if (! ensure_space (linep, next_linep->len))
+ return 0;
+
+ grub_memmove (linep->buf + linep->len, next_linep->buf, next_linep->len);
+ linep->len += next_linep->len;
+
+ grub_free (next_linep->buf);
+ grub_memmove (next_linep,
+ next_linep + 1,
+ (screen->num_lines - screen->line - 2)
+ * sizeof (struct line));
+ screen->num_lines--;
+
+ start = screen->line;
+ column = screen->column;
+
+ screen->real_column = screen->column;
+ if (update)
+ update_screen_all (screen, start, column, 0, 1, ALL_LINES);
+ }
+
+ return 1;
+}
+
+static int
+backward_delete_char (struct screen *screen, int update)
+{
+ int saved_column;
+ int saved_line;
+
+ saved_column = screen->column;
+ saved_line = screen->line;
+
+ if (! backward_char (screen, 0))
+ return 0;
+
+ if (saved_column != screen->column || saved_line != screen->line)
+ if (! delete_char (screen, update))
+ return 0;
+
+ return 1;
+}
+
+static int
+kill_line (struct screen *screen, int continuous, int update)
+{
+ struct line *linep;
+ char *p;
+ int size;
+ int offset;
+
+ p = screen->killed_text;
+ if (! continuous && p)
+ p[0] = '\0';
+
+ linep = screen->lines + screen->line;
+ size = linep->len - screen->column;
+
+ if (p)
+ offset = grub_strlen (p);
+ else
+ offset = 0;
+
+ if (size > 0)
+ {
+ int orig_num[screen->nterms], new_num;
+ unsigned i;
+
+ p = grub_realloc (p, offset + size + 1);
+ if (! p)
+ return 0;
+
+ grub_memmove (p + offset, linep->buf + screen->column, size);
+ p[offset + size - 1] = '\0';
+
+ screen->killed_text = p;
+
+ for (i = 0; i < screen->nterms; i++)
+ orig_num[i] = get_logical_num_lines (linep, &screen->terms[i]);
+ linep->len = screen->column;
+
+ if (update)
+ {
+ new_num = get_logical_num_lines (linep, &screen->terms[i]);
+ for (i = 0; i < screen->nterms; i++)
+ {
+ if (orig_num[i] != new_num)
+ update_screen (screen, &screen->terms[i],
+ screen->line, screen->column, 0, 1, ALL_LINES);
+ else
+ update_screen (screen, &screen->terms[i],
+ screen->line, screen->column, 0, 0, SINGLE_LINE);
+ }
+ }
+ }
+ else if (screen->line + 1 < screen->num_lines)
+ {
+ p = grub_realloc (p, offset + 1 + 1);
+ if (! p)
+ return 0;
+
+ p[offset] = '\n';
+ p[offset + 1] = '\0';
+
+ screen->killed_text = p;
+
+ return delete_char (screen, update);
+ }
+
+ return 1;
+}
+
+static int
+yank (struct screen *screen, int update)
+{
+ if (screen->killed_text)
+ return insert_string (screen, screen->killed_text, update);
+
+ return 1;
+}
+
+static int
+open_line (struct screen *screen, int update)
+{
+ int saved_y[screen->nterms];
+ unsigned i;
+
+ for (i = 0; i < screen->nterms; i++)
+ saved_y[i] = screen->terms[i].y;
+
+ if (! insert_string (screen, "\n", 0))
+ return 0;
+
+ if (! backward_char (screen, 0))
+ return 0;
+
+ for (i = 0; i < screen->nterms; i++)
+ screen->terms[i].y = saved_y[i];
+
+ if (update)
+ update_screen_all (screen, screen->line, screen->column, 0, 1, ALL_LINES);
+
+ return 1;
+}
+
+/* A completion hook to print items. */
+static void
+store_completion (const char *item, grub_completion_type_t type,
+ int count __attribute__ ((unused)))
+{
+ char *p;
+
+ completion_type = type;
+
+ /* Make sure that the completion buffer has enough room. */
+ if (completion_buffer.max_len < (completion_buffer.len
+ + (int) grub_strlen (item) + 1 + 1))
+ {
+ grub_size_t new_len;
+
+ new_len = completion_buffer.len + grub_strlen (item) + 80;
+ p = grub_realloc (completion_buffer.buf, new_len);
+ if (! p)
+ {
+ /* Possibly not fatal. */
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+ p[completion_buffer.len] = 0;
+ completion_buffer.buf = p;
+ completion_buffer.max_len = new_len;
+ }
+
+ p = completion_buffer.buf + completion_buffer.len;
+ if (completion_buffer.len != 0)
+ {
+ *p++ = ' ';
+ completion_buffer.len++;
+ }
+ grub_strcpy (p, item);
+ completion_buffer.len += grub_strlen (item);
+}
+
+static int
+complete (struct screen *screen, int continuous, int update)
+{
+ char saved_char;
+ struct line *linep;
+ int restore;
+ char *insert;
+ static int count = -1;
+ unsigned i;
+ grub_uint32_t *ucs4;
+ grub_size_t buflen;
+ grub_ssize_t ucs4len;
+
+ if (continuous)
+ count++;
+ else
+ count = 0;
+
+ completion_buffer.buf = 0;
+ completion_buffer.len = 0;
+ completion_buffer.max_len = 0;
+
+ linep = screen->lines + screen->line;
+ saved_char = linep->buf[screen->column];
+ linep->buf[screen->column] = '\0';
+
+ insert = grub_normal_do_completion (linep->buf, &restore, store_completion);
+
+ linep->buf[screen->column] = saved_char;
+
+ if (completion_buffer.buf)
+ {
+ buflen = grub_strlen (completion_buffer.buf);
+ ucs4 = grub_malloc (sizeof (grub_uint32_t) * (buflen + 1));
+
+ if (!ucs4)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return 1;
+ }
+
+ ucs4len = grub_utf8_to_ucs4 (ucs4, buflen,
+ (grub_uint8_t *) completion_buffer.buf,
+ buflen, 0);
+ ucs4[ucs4len] = 0;
+
+ if (restore)
+ for (i = 0; i < screen->nterms; i++)
+ {
+ int num_sections = ((completion_buffer.len
+ + grub_term_width (screen->terms[i].term)
+ - 8 - 1)
+ / (grub_term_width (screen->terms[i].term)
+ - 8));
+ grub_uint32_t *endp;
+ grub_uint16_t pos;
+ grub_uint32_t *p = ucs4;
+
+ pos = grub_term_getxy (screen->terms[i].term);
+ grub_term_gotoxy (screen->terms[i].term, 0,
+ grub_term_height (screen->terms[i].term) - 3);
+
+ screen->completion_shown = 1;
+
+ grub_term_gotoxy (screen->terms[i].term, 0,
+ grub_term_height (screen->terms[i].term) - 3);
+ grub_puts_terminal (" ", screen->terms[i].term);
+ switch (completion_type)
+ {
+ case GRUB_COMPLETION_TYPE_COMMAND:
+ grub_puts_terminal (_("Possible commands are:"),
+ screen->terms[i].term);
+ break;
+ case GRUB_COMPLETION_TYPE_DEVICE:
+ grub_puts_terminal (_("Possible devices are:"),
+ screen->terms[i].term);
+ break;
+ case GRUB_COMPLETION_TYPE_FILE:
+ grub_puts_terminal (_("Possible files are:"),
+ screen->terms[i].term);
+ break;
+ case GRUB_COMPLETION_TYPE_PARTITION:
+ grub_puts_terminal (_("Possible partitions are:"),
+ screen->terms[i].term);
+ break;
+ case GRUB_COMPLETION_TYPE_ARGUMENT:
+ grub_puts_terminal (_("Possible arguments are:"),
+ screen->terms[i].term);
+ break;
+ default:
+ grub_puts_terminal (_("Possible things are:"),
+ screen->terms[i].term);
+ break;
+ }
+
+ grub_puts_terminal ("\n ", screen->terms[i].term);
+
+ p += (count % num_sections)
+ * (grub_term_width (screen->terms[i].term) - 8);
+ endp = p + (grub_term_width (screen->terms[i].term) - 8);
+
+ if (p != ucs4)
+ grub_putcode (GRUB_UNICODE_LEFTARROW, screen->terms[i].term);
+ else
+ grub_putcode (' ', screen->terms[i].term);
+
+ grub_print_ucs4 (p, ucs4 + ucs4len < endp ? ucs4 + ucs4len : endp,
+ 0, 0, screen->terms[i].term);
+
+ if (ucs4 + ucs4len > endp)
+ grub_putcode (GRUB_UNICODE_RIGHTARROW, screen->terms[i].term);
+ grub_term_gotoxy (screen->terms[i].term, pos >> 8, pos & 0xFF);
+ }
+ }
+
+ if (insert)
+ {
+ insert_string (screen, insert, update);
+ count = -1;
+ grub_free (insert);
+ }
+ else if (update)
+ grub_refresh ();
+
+ grub_free (completion_buffer.buf);
+ return 1;
+}
+
+/* Clear displayed completions. */
+static void
+clear_completions (struct per_term_screen *term_screen)
+{
+ grub_uint16_t pos;
+ unsigned i, j;
+
+ pos = grub_term_getxy (term_screen->term);
+ grub_term_gotoxy (term_screen->term, 0,
+ grub_term_height (term_screen->term) - 3);
+
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < grub_term_width (term_screen->term) - 1; j++)
+ grub_putcode (' ', term_screen->term);
+ grub_putcode ('\n', term_screen->term);
+ }
+
+ grub_term_gotoxy (term_screen->term, pos >> 8, pos & 0xFF);
+ grub_term_refresh (term_screen->term);
+}
+
+static void
+clear_completions_all (struct screen *screen)
+{
+ unsigned i;
+
+ for (i = 0; i < screen->nterms; i++)
+ clear_completions (&screen->terms[i]);
+}
+
+/* Execute the command list in the screen SCREEN. */
+static int
+run (struct screen *screen)
+{
+ char *script;
+ int errs_before;
+ grub_menu_t menu = NULL;
+ char *dummy[1] = { NULL };
+
+ auto char * editor_getsource (void);
+ char * editor_getsource (void)
+ {
+ int i;
+ int size = 0;
+ char *source;
+
+ for (i = 0; i < screen->num_lines; i++)
+ size += screen->lines[i].len + 1;
+
+ source = grub_malloc (size + 1);
+ if (! source)
+ return NULL;
+
+ size = 0;
+ for (i = 0; i < screen->num_lines; i++)
+ {
+ grub_memcpy (source + size, screen->lines[i].buf, screen->lines[i].len);
+ size += screen->lines[i].len;
+ source[size++] = '\n';
+ }
+ source[size] = '\0';
+ return source;
+ }
+
+ grub_cls ();
+ grub_printf (" ");
+ grub_printf_ (N_("Booting a command list"));
+ grub_printf ("\n\n");
+
+ errs_before = grub_err_printed_errors;
+
+ if (screen->submenu)
+ {
+ grub_env_context_open ();
+ menu = grub_zalloc (sizeof (*menu));
+ if (! menu)
+ return 0;
+ grub_env_set_menu (menu);
+ }
+
+ /* Execute the script, line for line. */
+ script = editor_getsource ();
+ if (! script)
+ return 0;
+ grub_script_execute_sourcecode (script, 0, dummy);
+ grub_free (script);
+
+ if (errs_before != grub_err_printed_errors)
+ grub_wait_after_message ();
+
+ if (grub_errno == GRUB_ERR_NONE && grub_loader_is_loaded ())
+ /* Implicit execution of boot, only if something is loaded. */
+ grub_command_execute ("boot", 0, 0);
+
+ if (screen->submenu)
+ {
+ if (menu && menu->size)
+ {
+ grub_show_menu (menu, 1, 0);
+ grub_normal_free_menu (menu);
+ }
+ grub_env_context_close ();
+ }
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ grub_wait_after_message ();
+ }
+
+ return 1;
+}
+
+/* Edit a menu entry with an Emacs-like interface. */
+void
+grub_menu_entry_run (grub_menu_entry_t entry)
+{
+ struct screen *screen;
+ int prev_c;
+ grub_err_t err = GRUB_ERR_NONE;
+ unsigned i;
+ grub_term_output_t term;
+
+ err = grub_auth_check_authentication (NULL);
+
+ if (err)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ screen = make_screen (entry);
+ if (! screen)
+ return;
+
+ screen->terms = NULL;
+
+ refresh:
+ grub_free (screen->terms);
+ screen->nterms = 0;
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ screen->nterms++;
+ screen->terms = grub_malloc (screen->nterms * sizeof (screen->terms[0]));
+ if (!screen->terms)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+ i = 0;
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ screen->terms[i].term = term;
+ screen->terms[i].x = 0;
+ screen->terms[i].y = 0;
+ i++;
+ }
+ /* Draw the screen. */
+ for (i = 0; i < screen->nterms; i++)
+ grub_menu_init_page (0, 1, &screen->terms[i].num_entries,
+ screen->terms[i].term);
+ update_screen_all (screen, 0, 0, 1, 1, ALL_LINES);
+ for (i = 0; i < screen->nterms; i++)
+ grub_term_setcursor (screen->terms[i].term, 1);
+ prev_c = '\0';
+
+ while (1)
+ {
+ int c = grub_getkey ();
+
+ if (screen->completion_shown)
+ {
+ clear_completions_all (screen);
+ screen->completion_shown = 0;
+ }
+
+ if (grub_normal_exit_level)
+ {
+ destroy_screen (screen);
+ return;
+ }
+
+ switch (c)
+ {
+ case GRUB_TERM_KEY_UP:
+ case GRUB_TERM_CTRL | 'p':
+ if (! previous_line (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'n':
+ case GRUB_TERM_KEY_DOWN:
+ if (! next_line (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'f':
+ case GRUB_TERM_KEY_RIGHT:
+ if (! forward_char (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'b':
+ case GRUB_TERM_KEY_LEFT:
+ if (! backward_char (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'a':
+ case GRUB_TERM_KEY_HOME:
+ if (! beginning_of_line (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'e':
+ case GRUB_TERM_KEY_END:
+ if (! end_of_line (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'i':
+ case '\t':
+ if (! complete (screen, prev_c == c, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'd':
+ case GRUB_TERM_KEY_DC:
+ if (! delete_char (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'h':
+ case '\b':
+ if (! backward_delete_char (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'k':
+ if (! kill_line (screen, prev_c == c, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'u':
+ /* FIXME: What behavior is good for this key? */
+ break;
+
+ case GRUB_TERM_CTRL | 'y':
+ if (! yank (screen, 1))
+ goto fail;
+ break;
+
+ case GRUB_TERM_CTRL | 'l':
+ /* FIXME: centering. */
+ goto refresh;
+
+ case GRUB_TERM_CTRL | 'o':
+ if (! open_line (screen, 1))
+ goto fail;
+ break;
+
+ case '\n':
+ case '\r':
+ if (! insert_string (screen, "\n", 1))
+ goto fail;
+ break;
+
+ case '\e':
+ destroy_screen (screen);
+ return;
+
+ case GRUB_TERM_CTRL | 'c':
+ case GRUB_TERM_KEY_F2:
+ grub_cmdline_run (1);
+ goto refresh;
+
+ case GRUB_TERM_CTRL | 'x':
+ case GRUB_TERM_KEY_F10:
+ run (screen);
+ goto refresh;
+
+ case GRUB_TERM_CTRL | 'r':
+ case GRUB_TERM_CTRL | 's':
+ case GRUB_TERM_CTRL | 't':
+ /* FIXME */
+ break;
+
+ default:
+ if (grub_isprint (c))
+ {
+ char buf[2];
+
+ buf[0] = c;
+ buf[1] = '\0';
+ if (! insert_string (screen, buf, 1))
+ goto fail;
+ }
+ break;
+ }
+
+ prev_c = c;
+ }
+
+ fail:
+ destroy_screen (screen);
+
+ grub_cls ();
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ grub_xputs ("\n");
+ grub_printf_ (N_("Press any key to continue..."));
+ (void) grub_getkey ();
+}
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
new file mode 100644
index 0000000..93f0492
--- /dev/null
+++ b/grub-core/normal/menu_text.c
@@ -0,0 +1,491 @@
+/* menu_text.c - Basic text menu implementation. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/loader.h>
+#include <grub/mm.h>
+#include <grub/time.h>
+#include <grub/env.h>
+#include <grub/menu_viewer.h>
+#include <grub/i18n.h>
+#include <grub/charset.h>
+
+static grub_uint8_t grub_color_menu_normal;
+static grub_uint8_t grub_color_menu_highlight;
+
+struct menu_viewer_data
+{
+ int first, offset;
+ /* The number of entries shown at a time. */
+ int num_entries;
+ grub_menu_t menu;
+ struct grub_term_output *term;
+};
+
+static inline int
+grub_term_cursor_x (struct grub_term_output *term)
+{
+ return (GRUB_TERM_LEFT_BORDER_X + grub_term_border_width (term)
+ - GRUB_TERM_MARGIN - 1);
+}
+
+grub_ssize_t
+grub_getstringwidth (grub_uint32_t * str, const grub_uint32_t * last_position,
+ struct grub_term_output *term)
+{
+ grub_ssize_t width = 0;
+
+ while (str < last_position)
+ {
+ struct grub_unicode_glyph glyph;
+ str += grub_unicode_aglomerate_comb (str, last_position - str, &glyph);
+ width += grub_term_getcharwidth (term, &glyph);
+ }
+ return width;
+}
+
+static int
+grub_print_message_indented_real (const char *msg, int margin_left,
+ int margin_right,
+ struct grub_term_output *term, int dry_run)
+{
+ grub_uint32_t *unicode_msg;
+ grub_uint32_t *last_position;
+
+ int msg_len;
+ int ret = 0;
+
+ msg_len = grub_utf8_to_ucs4_alloc (msg, &unicode_msg, &last_position);
+
+ if (msg_len < 0)
+ {
+ return 0;
+ }
+
+ if (dry_run)
+ ret = grub_ucs4_count_lines (unicode_msg, last_position, margin_left,
+ margin_right, term);
+ else
+ grub_print_ucs4 (unicode_msg, last_position, margin_left,
+ margin_right, term);
+
+ grub_free (unicode_msg);
+
+ return ret;
+}
+
+void
+grub_print_message_indented (const char *msg, int margin_left, int margin_right,
+ struct grub_term_output *term)
+{
+ grub_print_message_indented_real (msg, margin_left, margin_right, term, 0);
+}
+
+static void
+draw_border (struct grub_term_output *term, int num_entries)
+{
+ unsigned i;
+
+ grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
+
+ grub_term_gotoxy (term, GRUB_TERM_MARGIN, GRUB_TERM_TOP_BORDER_Y);
+ grub_putcode (GRUB_UNICODE_CORNER_UL, term);
+ for (i = 0; i < (unsigned) grub_term_border_width (term) - 2; i++)
+ grub_putcode (GRUB_UNICODE_HLINE, term);
+ grub_putcode (GRUB_UNICODE_CORNER_UR, term);
+
+ for (i = 0; i < (unsigned) num_entries; i++)
+ {
+ grub_term_gotoxy (term, GRUB_TERM_MARGIN, GRUB_TERM_TOP_BORDER_Y + i + 1);
+ grub_putcode (GRUB_UNICODE_VLINE, term);
+ grub_term_gotoxy (term, GRUB_TERM_MARGIN + grub_term_border_width (term)
+ - 1,
+ GRUB_TERM_TOP_BORDER_Y + i + 1);
+ grub_putcode (GRUB_UNICODE_VLINE, term);
+ }
+
+ grub_term_gotoxy (term, GRUB_TERM_MARGIN,
+ GRUB_TERM_TOP_BORDER_Y + num_entries + 1);
+ grub_putcode (GRUB_UNICODE_CORNER_LL, term);
+ for (i = 0; i < (unsigned) grub_term_border_width (term) - 2; i++)
+ grub_putcode (GRUB_UNICODE_HLINE, term);
+ grub_putcode (GRUB_UNICODE_CORNER_LR, term);
+
+ grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
+
+ grub_term_gotoxy (term, GRUB_TERM_MARGIN,
+ (GRUB_TERM_TOP_BORDER_Y + num_entries
+ + GRUB_TERM_MARGIN + 1));
+}
+
+static int
+print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
+{
+ int ret = 0;
+ grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
+
+ if (edit)
+ {
+ if(dry_run)
+ ret++;
+ else
+ grub_putcode ('\n', term);
+ ret += grub_print_message_indented_real (_("Minimum Emacs-like screen editing is \
+supported. TAB lists completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for a \
+command-line or ESC to discard edits and return to the GRUB menu."),
+ STANDARD_MARGIN, STANDARD_MARGIN,
+ term, dry_run);
+ }
+ else
+ {
+ const char *msg = _("Use the %C and %C keys to select which "
+ "entry is highlighted.\n");
+ char *msg_translated;
+
+ msg_translated = grub_xasprintf (msg, GRUB_UNICODE_UPARROW,
+ GRUB_UNICODE_DOWNARROW);
+ if (!msg_translated)
+ return 0;
+ if(dry_run)
+ ret++;
+ else
+ grub_putcode ('\n', term);
+ ret += grub_print_message_indented_real (msg_translated, STANDARD_MARGIN,
+ STANDARD_MARGIN, term, dry_run);
+
+ grub_free (msg_translated);
+
+ if (nested)
+ {
+ ret += grub_print_message_indented_real
+ (_("Press enter to boot the selected OS, "
+ "\'e\' to edit the commands before booting "
+ "or \'c\' for a command-line. ESC to return previous menu.\n"),
+ STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run);
+ }
+ else
+ {
+ ret += grub_print_message_indented_real
+ (_("Press enter to boot the selected OS, "
+ "\'e\' to edit the commands before booting "
+ "or \'c\' for a command-line.\n"),
+ STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run);
+ }
+ }
+ return ret;
+}
+
+static void
+print_entry (int y, int highlight, grub_menu_entry_t entry,
+ struct grub_term_output *term)
+{
+ int x;
+ const char *title;
+ grub_size_t title_len;
+ grub_ssize_t len;
+ grub_uint32_t *unicode_title;
+ grub_ssize_t i;
+ grub_uint8_t old_color_normal, old_color_highlight;
+
+ title = entry ? entry->title : "";
+ title_len = grub_strlen (title);
+ unicode_title = grub_malloc (title_len * sizeof (*unicode_title));
+ if (! unicode_title)
+ /* XXX How to show this error? */
+ return;
+
+ len = grub_utf8_to_ucs4 (unicode_title, title_len,
+ (grub_uint8_t *) title, -1, 0);
+ if (len < 0)
+ {
+ /* It is an invalid sequence. */
+ grub_free (unicode_title);
+ return;
+ }
+
+ grub_term_getcolor (term, &old_color_normal, &old_color_highlight);
+ grub_term_setcolor (term, grub_color_menu_normal, grub_color_menu_highlight);
+ grub_term_setcolorstate (term, highlight
+ ? GRUB_TERM_COLOR_HIGHLIGHT
+ : GRUB_TERM_COLOR_NORMAL);
+
+ grub_term_gotoxy (term, GRUB_TERM_LEFT_BORDER_X + GRUB_TERM_MARGIN, y);
+
+ int last_printed = 0;
+ for (x = GRUB_TERM_LEFT_BORDER_X + GRUB_TERM_MARGIN + 1, i = 0;
+ x < (int) (GRUB_TERM_LEFT_BORDER_X + grub_term_border_width (term)
+ - GRUB_TERM_MARGIN);)
+ {
+ if (i < len
+ && x <= (int) (GRUB_TERM_LEFT_BORDER_X + grub_term_border_width (term)
+ - GRUB_TERM_MARGIN - 1))
+ {
+ grub_ssize_t width;
+ struct grub_unicode_glyph glyph;
+
+ i += grub_unicode_aglomerate_comb (unicode_title + i,
+ len - i, &glyph);
+
+ width = grub_term_getcharwidth (term, &glyph);
+ grub_free (glyph.combining);
+
+ if (x + width <= (int) (GRUB_TERM_LEFT_BORDER_X
+ + grub_term_border_width (term)
+ - GRUB_TERM_MARGIN - 1))
+ last_printed = i;
+ x += width;
+ }
+ else
+ break;
+ }
+
+ grub_print_ucs4 (unicode_title,
+ unicode_title + last_printed, 0, 0, term);
+
+ if (last_printed != len)
+ {
+ grub_putcode (GRUB_UNICODE_RIGHTARROW, term);
+ struct grub_unicode_glyph pseudo_glyph = {
+ .base = GRUB_UNICODE_RIGHTARROW,
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0,
+ .estimated_width = 1
+ };
+ x += grub_term_getcharwidth (term, &pseudo_glyph);
+ }
+
+ for (; x < (int) (GRUB_TERM_LEFT_BORDER_X + grub_term_border_width (term)
+ - GRUB_TERM_MARGIN); x++)
+ grub_putcode (' ', term);
+
+ grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
+ grub_putcode (' ', term);
+
+ grub_term_gotoxy (term, grub_term_cursor_x (term), y);
+
+ grub_term_setcolor (term, old_color_normal, old_color_highlight);
+ grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
+ grub_free (unicode_title);
+}
+
+static void
+print_entries (grub_menu_t menu, const struct menu_viewer_data *data)
+{
+ grub_menu_entry_t e;
+ int i;
+
+ grub_term_gotoxy (data->term,
+ GRUB_TERM_LEFT_BORDER_X + grub_term_border_width (data->term),
+ GRUB_TERM_FIRST_ENTRY_Y);
+
+ if (data->first)
+ grub_putcode (GRUB_UNICODE_UPARROW, data->term);
+ else
+ grub_putcode (' ', data->term);
+
+ e = grub_menu_get_entry (menu, data->first);
+
+ for (i = 0; i < data->num_entries; i++)
+ {
+ print_entry (GRUB_TERM_FIRST_ENTRY_Y + i, data->offset == i,
+ e, data->term);
+ if (e)
+ e = e->next;
+ }
+
+ grub_term_gotoxy (data->term, GRUB_TERM_LEFT_BORDER_X
+ + grub_term_border_width (data->term),
+ GRUB_TERM_TOP_BORDER_Y + data->num_entries);
+
+ if (e)
+ grub_putcode (GRUB_UNICODE_DOWNARROW, data->term);
+ else
+ grub_putcode (' ', data->term);
+
+ grub_term_gotoxy (data->term, grub_term_cursor_x (data->term),
+ GRUB_TERM_FIRST_ENTRY_Y + data->offset);
+}
+
+/* Initialize the screen. If NESTED is non-zero, assume that this menu
+ is run from another menu or a command-line. If EDIT is non-zero, show
+ a message for the menu entry editor. */
+void
+grub_menu_init_page (int nested, int edit, int *num_entries,
+ struct grub_term_output *term)
+{
+ grub_uint8_t old_color_normal, old_color_highlight;
+
+ /* 3 lines for timeout message and bottom margin. 2 lines for the border. */
+ *num_entries = grub_term_height (term) - GRUB_TERM_TOP_BORDER_Y
+ - (print_message (nested, edit, term, 1) + 3) - 2;
+
+ grub_term_getcolor (term, &old_color_normal, &old_color_highlight);
+
+ /* By default, use the same colors for the menu. */
+ grub_color_menu_normal = old_color_normal;
+ grub_color_menu_highlight = old_color_highlight;
+
+ /* Then give user a chance to replace them. */
+ grub_parse_color_name_pair (&grub_color_menu_normal,
+ grub_env_get ("menu_color_normal"));
+ grub_parse_color_name_pair (&grub_color_menu_highlight,
+ grub_env_get ("menu_color_highlight"));
+
+ grub_normal_init_page (term);
+ grub_term_setcolor (term, grub_color_menu_normal, grub_color_menu_highlight);
+ draw_border (term, *num_entries);
+ grub_term_setcolor (term, old_color_normal, old_color_highlight);
+ print_message (nested, edit, term, 0);
+}
+
+static void
+menu_text_print_timeout (int timeout, void *dataptr)
+{
+ const char *msg =
+ _("The highlighted entry will be executed automatically in %ds.");
+ struct menu_viewer_data *data = dataptr;
+ char *msg_translated;
+ int posx;
+
+ grub_term_gotoxy (data->term, 0, grub_term_height (data->term) - 3);
+
+ msg_translated = grub_xasprintf (msg, timeout);
+ if (!msg_translated)
+ {
+ grub_print_error ();
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ grub_print_message_indented (msg_translated, 3, 0, data->term);
+
+ posx = grub_term_getxy (data->term) >> 8;
+ grub_print_spaces (data->term, grub_term_width (data->term) - posx - 1);
+
+ grub_term_gotoxy (data->term,
+ grub_term_cursor_x (data->term),
+ GRUB_TERM_FIRST_ENTRY_Y + data->offset);
+ grub_term_refresh (data->term);
+}
+
+static void
+menu_text_set_chosen_entry (int entry, void *dataptr)
+{
+ struct menu_viewer_data *data = dataptr;
+ int oldoffset = data->offset;
+ int complete_redraw = 0;
+
+ data->offset = entry - data->first;
+ if (data->offset > data->num_entries - 1)
+ {
+ data->first = entry - (data->num_entries - 1);
+ data->offset = data->num_entries - 1;
+ complete_redraw = 1;
+ }
+ if (data->offset < 0)
+ {
+ data->offset = 0;
+ data->first = entry;
+ complete_redraw = 1;
+ }
+ if (complete_redraw)
+ print_entries (data->menu, data);
+ else
+ {
+ print_entry (GRUB_TERM_FIRST_ENTRY_Y + oldoffset, 0,
+ grub_menu_get_entry (data->menu, data->first + oldoffset),
+ data->term);
+ print_entry (GRUB_TERM_FIRST_ENTRY_Y + data->offset, 1,
+ grub_menu_get_entry (data->menu, data->first + data->offset),
+ data->term);
+ }
+ grub_term_refresh (data->term);
+}
+
+static void
+menu_text_fini (void *dataptr)
+{
+ struct menu_viewer_data *data = dataptr;
+
+ grub_term_setcursor (data->term, 1);
+ grub_term_cls (data->term);
+
+}
+
+static void
+menu_text_clear_timeout (void *dataptr)
+{
+ struct menu_viewer_data *data = dataptr;
+
+ grub_term_gotoxy (data->term, 0, grub_term_height (data->term) - 3);
+ grub_print_spaces (data->term, grub_term_width (data->term) - 1);
+ grub_term_gotoxy (data->term, grub_term_cursor_x (data->term),
+ GRUB_TERM_FIRST_ENTRY_Y + data->offset);
+ grub_term_refresh (data->term);
+}
+
+grub_err_t
+grub_menu_try_text (struct grub_term_output *term,
+ int entry, grub_menu_t menu, int nested)
+{
+ struct menu_viewer_data *data;
+ struct grub_menu_viewer *instance;
+
+ instance = grub_zalloc (sizeof (*instance));
+ if (!instance)
+ return grub_errno;
+
+ data = grub_zalloc (sizeof (*data));
+ if (!data)
+ {
+ grub_free (instance);
+ return grub_errno;
+ }
+
+ data->term = term;
+ instance->data = data;
+ instance->set_chosen_entry = menu_text_set_chosen_entry;
+ instance->print_timeout = menu_text_print_timeout;
+ instance->clear_timeout = menu_text_clear_timeout;
+ instance->fini = menu_text_fini;
+
+ data->menu = menu;
+
+ data->offset = entry;
+ data->first = 0;
+
+ grub_term_setcursor (data->term, 0);
+ grub_menu_init_page (nested, 0, &data->num_entries, data->term);
+
+ if (data->offset > data->num_entries - 1)
+ {
+ data->first = data->offset - (data->num_entries - 1);
+ data->offset = data->num_entries - 1;
+ }
+
+ print_entries (menu, data);
+ grub_term_refresh (data->term);
+ grub_menu_register_viewer (instance);
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/normal/misc.c b/grub-core/normal/misc.c
new file mode 100644
index 0000000..4a7e6a3
--- /dev/null
+++ b/grub-core/normal/misc.c
@@ -0,0 +1,128 @@
+/* misc.c - miscellaneous functions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/normal.h>
+#include <grub/disk.h>
+#include <grub/fs.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/datetime.h>
+#include <grub/term.h>
+#include <grub/i18n.h>
+#include <grub/partition.h>
+
+/* Print the information on the device NAME. */
+grub_err_t
+grub_normal_print_device_info (const char *name)
+{
+ grub_device_t dev;
+ char *p;
+
+ p = grub_strchr (name, ',');
+ if (p)
+ {
+ grub_xputs ("\t");
+ grub_printf_ (N_("Partition %s:"), name);
+ grub_xputs (" ");
+ }
+ else
+ {
+ grub_printf_ (N_("Device %s:"), name);
+ grub_xputs (" ");
+ }
+
+ dev = grub_device_open (name);
+ if (! dev)
+ grub_printf ("%s", _("Filesystem cannot be accessed"));
+ else if (dev->disk)
+ {
+ grub_fs_t fs;
+
+ fs = grub_fs_probe (dev);
+ /* Ignore all errors. */
+ grub_errno = 0;
+
+ if (fs)
+ {
+ grub_printf_ (N_("Filesystem type %s"), fs->name);
+ if (fs->label)
+ {
+ char *label;
+ (fs->label) (dev, &label);
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ if (label && grub_strlen (label))
+ {
+ grub_xputs (" ");
+ grub_printf_ (N_("- Label \"%s\""), label);
+ }
+ grub_free (label);
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (fs->mtime)
+ {
+ grub_int32_t tm;
+ struct grub_datetime datetime;
+ (fs->mtime) (dev, &tm);
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ grub_unixtime2datetime (tm, &datetime);
+ grub_xputs (" ");
+ grub_printf_ (N_("- Last modification time %d-%02d-%02d "
+ "%02d:%02d:%02d %s"),
+ datetime.year, datetime.month, datetime.day,
+ datetime.hour, datetime.minute, datetime.second,
+ grub_get_weekday_name (&datetime));
+
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if (fs->uuid)
+ {
+ char *uuid;
+ (fs->uuid) (dev, &uuid);
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ if (uuid && grub_strlen (uuid))
+ grub_printf (", UUID %s", uuid);
+ grub_free (uuid);
+ }
+ grub_errno = GRUB_ERR_NONE;
+ }
+ }
+ else
+ grub_printf ("%s", _("Not a known filesystem"));
+
+ if (dev->disk->partition)
+ grub_printf (_(" - Partition start at %llu"),
+ (unsigned long long) grub_partition_get_start (dev->disk->partition));
+ if (grub_disk_get_size (dev->disk) == GRUB_DISK_SIZE_UNKNOWN)
+ grub_puts_ (" - Total size unknown");
+ else
+ grub_printf (_(" - Total size %llu sectors"),
+ (unsigned long long) grub_disk_get_size (dev->disk));
+
+ grub_device_close (dev);
+ }
+
+ grub_xputs ("\n");
+ return grub_errno;
+}
diff --git a/grub-core/normal/term.c b/grub-core/normal/term.c
new file mode 100644
index 0000000..a8b9e66
--- /dev/null
+++ b/grub-core/normal/term.c
@@ -0,0 +1,888 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/file.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+#include <grub/normal.h>
+#include <grub/charset.h>
+
+struct term_state
+{
+ struct term_state *next;
+ const struct grub_unicode_glyph *backlog_glyphs;
+ const grub_uint32_t *backlog_ucs4;
+ grub_size_t backlog_len;
+
+ void *free;
+ int num_lines;
+ char *term_name;
+};
+
+static struct term_state *term_states = NULL;
+
+/* If the more pager is active. */
+static int grub_more;
+
+static void
+putcode_real (grub_uint32_t code, struct grub_term_output *term);
+
+void
+grub_normal_reset_more (void)
+{
+ static struct term_state *state;
+ for (state = term_states; state; state = state->next)
+ state->num_lines = 0;
+}
+
+static void
+print_more (void)
+{
+ char key;
+ grub_uint16_t *pos;
+ grub_term_output_t term;
+ grub_uint32_t *unicode_str, *unicode_last_position;
+
+ pos = grub_term_save_pos ();
+
+ grub_utf8_to_ucs4_alloc ("--MORE--", &unicode_str,
+ &unicode_last_position);
+
+ if (!unicode_str)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ grub_print_ucs4 (unicode_str, unicode_last_position, 0, 0, term);
+ }
+ grub_setcolorstate (GRUB_TERM_COLOR_NORMAL);
+
+ grub_free (unicode_str);
+
+ key = grub_getkey ();
+
+ /* Remove the message. */
+ grub_term_restore_pos (pos);
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ grub_print_spaces (term, 8);
+ grub_term_restore_pos (pos);
+ grub_free (pos);
+
+ /* Scroll one line or an entire page, depending on the key. */
+
+ if (key == '\r' || key =='\n')
+ {
+ static struct term_state *state;
+ for (state = term_states; state; state = state->next)
+ state->num_lines--;
+ }
+ else
+ grub_normal_reset_more ();
+}
+
+void
+grub_set_more (int onoff)
+{
+ if (onoff == 1)
+ grub_more++;
+ else
+ grub_more--;
+ grub_normal_reset_more ();
+}
+
+enum
+ {
+ GRUB_CP437_UPARROW = 0x18,
+ GRUB_CP437_DOWNARROW = 0x19,
+ GRUB_CP437_RIGHTARROW = 0x1a,
+ GRUB_CP437_LEFTARROW = 0x1b,
+ GRUB_CP437_VLINE = 0xb3,
+ GRUB_CP437_CORNER_UR = 0xbf,
+ GRUB_CP437_CORNER_LL = 0xc0,
+ GRUB_CP437_HLINE = 0xc4,
+ GRUB_CP437_CORNER_LR = 0xd9,
+ GRUB_CP437_CORNER_UL = 0xda,
+ };
+
+static grub_uint32_t
+map_code (grub_uint32_t in, struct grub_term_output *term)
+{
+ if (in <= 0x7f)
+ return in;
+
+ switch (term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ {
+ case GRUB_TERM_CODE_TYPE_CP437:
+ switch (in)
+ {
+ case GRUB_UNICODE_LEFTARROW:
+ return GRUB_CP437_LEFTARROW;
+ case GRUB_UNICODE_UPARROW:
+ return GRUB_CP437_UPARROW;
+ case GRUB_UNICODE_RIGHTARROW:
+ return GRUB_CP437_RIGHTARROW;
+ case GRUB_UNICODE_DOWNARROW:
+ return GRUB_CP437_DOWNARROW;
+ case GRUB_UNICODE_HLINE:
+ return GRUB_CP437_HLINE;
+ case GRUB_UNICODE_VLINE:
+ return GRUB_CP437_VLINE;
+ case GRUB_UNICODE_CORNER_UL:
+ return GRUB_CP437_CORNER_UL;
+ case GRUB_UNICODE_CORNER_UR:
+ return GRUB_CP437_CORNER_UR;
+ case GRUB_UNICODE_CORNER_LL:
+ return GRUB_CP437_CORNER_LL;
+ case GRUB_UNICODE_CORNER_LR:
+ return GRUB_CP437_CORNER_LR;
+ }
+ return '?';
+ case GRUB_TERM_CODE_TYPE_ASCII:
+ /* Better than nothing. */
+ switch (in)
+ {
+ case GRUB_UNICODE_LEFTARROW:
+ return '<';
+
+ case GRUB_UNICODE_UPARROW:
+ return '^';
+
+ case GRUB_UNICODE_RIGHTARROW:
+ return '>';
+
+ case GRUB_UNICODE_DOWNARROW:
+ return 'v';
+
+ case GRUB_UNICODE_HLINE:
+ return '-';
+
+ case GRUB_UNICODE_VLINE:
+ return '|';
+
+ case GRUB_UNICODE_CORNER_UL:
+ case GRUB_UNICODE_CORNER_UR:
+ case GRUB_UNICODE_CORNER_LL:
+ case GRUB_UNICODE_CORNER_LR:
+ return '+';
+
+ }
+ return '?';
+ }
+ return in;
+}
+
+void
+grub_puts_terminal (const char *str, struct grub_term_output *term)
+{
+ grub_uint32_t *unicode_str, *unicode_last_position;
+ grub_error_push ();
+ grub_utf8_to_ucs4_alloc (str, &unicode_str,
+ &unicode_last_position);
+ grub_error_pop ();
+ if (!unicode_str)
+ {
+ for (; *str; str++)
+ {
+ struct grub_unicode_glyph c =
+ {
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0,
+ .estimated_width = 1,
+ .base = *str
+ };
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ (term->putchar) (term, &c);
+ }
+ if (*str == '\n')
+ {
+ c.base = '\r';
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ (term->putchar) (term, &c);
+ }
+ }
+ }
+ return;
+ }
+
+ grub_print_ucs4 (unicode_str, unicode_last_position, 0, 0, term);
+ grub_free (unicode_str);
+}
+
+grub_uint16_t *
+grub_term_save_pos (void)
+{
+ struct grub_term_output *cur;
+ unsigned cnt = 0;
+ grub_uint16_t *ret, *ptr;
+
+ FOR_ACTIVE_TERM_OUTPUTS(cur)
+ cnt++;
+
+ ret = grub_malloc (cnt * sizeof (ret[0]));
+ if (!ret)
+ return NULL;
+
+ ptr = ret;
+ FOR_ACTIVE_TERM_OUTPUTS(cur)
+ *ptr++ = grub_term_getxy (cur);
+
+ return ret;
+}
+
+void
+grub_term_restore_pos (grub_uint16_t *pos)
+{
+ struct grub_term_output *cur;
+ grub_uint16_t *ptr = pos;
+
+ if (!pos)
+ return;
+
+ FOR_ACTIVE_TERM_OUTPUTS(cur)
+ {
+ grub_term_gotoxy (cur, (*ptr & 0xff00) >> 8, *ptr & 0xff);
+ ptr++;
+ }
+}
+
+static void
+grub_terminal_autoload_free (void)
+{
+ struct grub_term_autoload *cur, *next;
+ unsigned i;
+ for (i = 0; i < 2; i++)
+ for (cur = i ? grub_term_input_autoload : grub_term_output_autoload;
+ cur; cur = next)
+ {
+ next = cur->next;
+ grub_free (cur->name);
+ grub_free (cur->modname);
+ grub_free (cur);
+ }
+ grub_term_input_autoload = NULL;
+ grub_term_output_autoload = NULL;
+}
+
+/* Read the file terminal.lst for auto-loading. */
+void
+read_terminal_list (const char *prefix)
+{
+ char *filename;
+ grub_file_t file;
+ char *buf = NULL;
+
+ if (!prefix)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ filename = grub_xasprintf ("%s/terminal.lst", prefix);
+ if (!filename)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ file = grub_file_open (filename);
+ grub_free (filename);
+ if (!file)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+
+ /* Override previous terminal.lst. */
+ grub_terminal_autoload_free ();
+
+ for (;; grub_free (buf))
+ {
+ char *p, *name;
+ struct grub_term_autoload *cur;
+ struct grub_term_autoload **target = NULL;
+
+ buf = grub_file_getline (file);
+
+ if (! buf)
+ break;
+
+ switch (buf[0])
+ {
+ case 'i':
+ target = &grub_term_input_autoload;
+ break;
+
+ case 'o':
+ target = &grub_term_output_autoload;
+ break;
+ }
+ if (!target)
+ continue;
+
+ name = buf + 1;
+
+ p = grub_strchr (name, ':');
+ if (! p)
+ continue;
+
+ *p = '\0';
+ while (*++p == ' ')
+ ;
+
+ cur = grub_malloc (sizeof (*cur));
+ if (!cur)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ cur->name = grub_strdup (name);
+ if (! name)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ grub_free (cur);
+ continue;
+ }
+
+ cur->modname = grub_strdup (p);
+ if (! cur->modname)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ grub_free (cur->name);
+ grub_free (cur);
+ continue;
+ }
+ cur->next = *target;
+ *target = cur;
+ }
+
+ grub_file_close (file);
+
+ grub_errno = GRUB_ERR_NONE;
+}
+
+static void
+putglyph (const struct grub_unicode_glyph *c, struct grub_term_output *term)
+{
+ struct grub_unicode_glyph c2 =
+ {
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0,
+ .estimated_width = 1
+ };
+
+ if (c->base == '\t' && term->getxy)
+ {
+ int n;
+
+ n = 8 - ((term->getxy (term) >> 8) & 7);
+ c2.base = ' ';
+ while (n--)
+ (term->putchar) (term, &c2);
+
+ return;
+ }
+
+ if ((term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ == GRUB_TERM_CODE_TYPE_UTF8_LOGICAL
+ || (term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ == GRUB_TERM_CODE_TYPE_UTF8_VISUAL)
+ {
+ int i;
+ c2.estimated_width = grub_term_getcharwidth (term, c);
+ for (i = -1; i < (int) c->ncomb; i++)
+ {
+ grub_uint8_t u8[20], *ptr;
+ grub_uint32_t code;
+
+ if (i == -1)
+ {
+ code = c->base;
+ if ((term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ == GRUB_TERM_CODE_TYPE_UTF8_VISUAL)
+ {
+ if ((c->attributes & GRUB_UNICODE_GLYPH_ATTRIBUTE_MIRROR))
+ code = grub_unicode_mirror_code (code);
+ code = grub_unicode_shape_code (code, c->attributes);
+ }
+ }
+ else
+ code = c->combining[i].code;
+
+ grub_ucs4_to_utf8 (&code, 1, u8, sizeof (u8));
+
+ for (ptr = u8; *ptr; ptr++)
+ {
+ c2.base = *ptr;
+ (term->putchar) (term, &c2);
+ c2.estimated_width = 0;
+ }
+ }
+ c2.estimated_width = 1;
+ }
+ else
+ (term->putchar) (term, c);
+
+ if (c->base == '\n')
+ {
+ c2.base = '\r';
+ (term->putchar) (term, &c2);
+ }
+}
+
+static void
+putcode_real (grub_uint32_t code, struct grub_term_output *term)
+{
+ struct grub_unicode_glyph c =
+ {
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0,
+ .estimated_width = 1
+ };
+
+ c.base = map_code (code, term);
+ putglyph (&c, term);
+}
+
+/* Put a Unicode character. */
+void
+grub_putcode (grub_uint32_t code, struct grub_term_output *term)
+{
+ /* Combining character by itself? */
+ if (grub_unicode_get_comb_type (code) != GRUB_UNICODE_COMB_NONE)
+ return;
+
+ putcode_real (code, term);
+}
+
+static grub_ssize_t
+get_maxwidth (struct grub_term_output *term,
+ int margin_left, int margin_right)
+{
+ struct grub_unicode_glyph space_glyph = {
+ .base = ' ',
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0
+ };
+ return (grub_term_width (term)
+ - grub_term_getcharwidth (term, &space_glyph)
+ * (margin_left + margin_right) - 1);
+}
+
+static grub_ssize_t
+get_startwidth (struct grub_term_output *term,
+ int margin_left)
+{
+ return ((term->getxy (term) >> 8) & 0xff) - margin_left;
+}
+
+static int
+print_ucs4_terminal (const grub_uint32_t * str,
+ const grub_uint32_t * last_position,
+ int margin_left, int margin_right,
+ struct grub_term_output *term,
+ struct term_state *state,
+ int dry_run)
+{
+ const grub_uint32_t *ptr;
+ grub_ssize_t startwidth = dry_run ? 0 : get_startwidth (term, margin_left);
+ grub_ssize_t line_width = startwidth;
+ grub_ssize_t lastspacewidth = 0;
+ grub_ssize_t max_width = get_maxwidth (term, margin_left, margin_right);
+ const grub_uint32_t *line_start = str, *last_space = str - 1;
+ int lines = 0;
+
+ for (ptr = str; ptr < last_position; ptr++)
+ {
+ grub_ssize_t last_width = 0;
+ if (grub_unicode_get_comb_type (*ptr) == GRUB_UNICODE_COMB_NONE)
+ {
+ struct grub_unicode_glyph c = {
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0
+ };
+ c.base = *ptr;
+ line_width += last_width = grub_term_getcharwidth (term, &c);
+ }
+
+ if (*ptr == ' ')
+ {
+ lastspacewidth = line_width;
+ last_space = ptr;
+ }
+
+ if (line_width > max_width || *ptr == '\n')
+ {
+ const grub_uint32_t *ptr2;
+
+ if (line_width > max_width && last_space > line_start)
+ ptr = last_space;
+ else if (line_width > max_width
+ && line_start == str && line_width - lastspacewidth < max_width - 5)
+ {
+ ptr = str;
+ lastspacewidth = startwidth;
+ }
+ else
+ lastspacewidth = line_width - last_width;
+
+ lines++;
+
+ if (!dry_run)
+ {
+ for (ptr2 = line_start; ptr2 < ptr; ptr2++)
+ {
+ /* Skip combining characters on non-UTF8 terminals. */
+ if ((term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ != GRUB_TERM_CODE_TYPE_UTF8_LOGICAL
+ && grub_unicode_get_comb_type (*ptr2)
+ != GRUB_UNICODE_COMB_NONE)
+ continue;
+ putcode_real (*ptr2, term);
+ }
+
+ grub_print_spaces (term, margin_right);
+ grub_putcode ('\n', term);
+ if (state && ++state->num_lines
+ >= (grub_ssize_t) grub_term_height (term) - 2)
+ {
+ state->backlog_ucs4 = (ptr == last_space || *ptr == '\n')
+ ? ptr + 1 : ptr;
+ state->backlog_len = last_position - state->backlog_ucs4;
+ return 1;
+ }
+ }
+
+ line_width -= lastspacewidth;
+ if (!dry_run)
+ grub_print_spaces (term, margin_left);
+ if (ptr == last_space || *ptr == '\n')
+ ptr++;
+ line_start = ptr;
+ }
+ }
+
+ if (line_start < last_position)
+ lines++;
+ if (!dry_run)
+ {
+ const grub_uint32_t *ptr2;
+ for (ptr2 = line_start; ptr2 < last_position; ptr2++)
+ {
+ /* Skip combining characters on non-UTF8 terminals. */
+ if ((term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ != GRUB_TERM_CODE_TYPE_UTF8_LOGICAL
+ && grub_unicode_get_comb_type (*ptr2)
+ != GRUB_UNICODE_COMB_NONE)
+ continue;
+ putcode_real (*ptr2, term);
+ }
+ }
+ return dry_run ? lines : 0;
+}
+
+static struct term_state *
+find_term_state (struct grub_term_output *term)
+{
+ struct term_state *state;
+ for (state = term_states; state; state = state->next)
+ if (grub_strcmp (state->term_name, term->name) == 0)
+ return state;
+
+ state = grub_zalloc (sizeof (*state));
+ if (!state)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return NULL;
+ }
+
+ state->term_name = grub_strdup (term->name);
+ state->next = term_states;
+ term_states = state;
+
+ return state;
+}
+
+static int
+put_glyphs_terminal (const struct grub_unicode_glyph *visual,
+ grub_ssize_t visual_len,
+ int margin_left, int margin_right,
+ struct grub_term_output *term,
+ struct term_state *state)
+{
+ const struct grub_unicode_glyph *visual_ptr;
+ for (visual_ptr = visual; visual_ptr < visual + visual_len; visual_ptr++)
+ {
+ if (visual_ptr->base == '\n')
+ grub_print_spaces (term, margin_right);
+ putglyph (visual_ptr, term);
+ if (visual_ptr->base == '\n')
+ {
+ if (state && ++state->num_lines
+ >= (grub_ssize_t) grub_term_height (term) - 2)
+ {
+ state->backlog_glyphs = visual_ptr + 1;
+ state->backlog_len = visual_len - (visual_ptr - visual) - 1;
+ return 1;
+ }
+
+ grub_print_spaces (term, margin_left);
+ }
+ grub_free (visual_ptr->combining);
+ }
+ return 0;
+}
+
+static int
+print_backlog (struct grub_term_output *term,
+ int margin_left, int margin_right)
+{
+ struct term_state *state = find_term_state (term);
+
+ if (!state)
+ return 0;
+
+ if (state->backlog_ucs4)
+ {
+ int ret;
+ ret = print_ucs4_terminal (state->backlog_ucs4,
+ state->backlog_ucs4 + state->backlog_len,
+ margin_left, margin_right, term, state, 0);
+ if (!ret)
+ {
+ grub_free (state->free);
+ state->free = NULL;
+ state->backlog_len = 0;
+ state->backlog_ucs4 = 0;
+ }
+ return ret;
+ }
+
+ if (state->backlog_glyphs)
+ {
+ int ret;
+ ret = put_glyphs_terminal (state->backlog_glyphs,
+ state->backlog_len,
+ margin_left, margin_right, term, state);
+ if (!ret)
+ {
+ grub_free (state->free);
+ state->free = NULL;
+ state->backlog_len = 0;
+ state->backlog_glyphs = 0;
+ }
+ return ret;
+ }
+
+ return 0;
+}
+
+static int
+print_ucs4_real (const grub_uint32_t * str,
+ const grub_uint32_t * last_position,
+ int margin_left, int margin_right,
+ struct grub_term_output *term, int backlog,
+ int dry_run)
+{
+ struct term_state *state = NULL;
+
+ if (!dry_run)
+ {
+ if (backlog)
+ state = find_term_state (term);
+
+ if (((term->getxy (term) >> 8) & 0xff) < margin_left)
+ grub_print_spaces (term, margin_left - ((term->getxy (term) >> 8) & 0xff));
+ }
+
+ if ((term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ == GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS
+ || (term->flags & GRUB_TERM_CODE_TYPE_MASK)
+ == GRUB_TERM_CODE_TYPE_UTF8_VISUAL)
+ {
+ grub_ssize_t visual_len;
+ struct grub_unicode_glyph *visual;
+ int ret;
+
+ auto grub_ssize_t getcharwidth (const struct grub_unicode_glyph *c);
+ grub_ssize_t getcharwidth (const struct grub_unicode_glyph *c)
+ {
+ return grub_term_getcharwidth (term, c);
+ }
+
+ visual_len = grub_bidi_logical_to_visual (str, last_position - str,
+ &visual, getcharwidth,
+ get_maxwidth (term,
+ margin_left,
+ margin_right),
+ get_startwidth (term,
+ margin_left));
+ if (visual_len < 0)
+ {
+ grub_print_error ();
+ return 0;
+ }
+ if (dry_run)
+ {
+ struct grub_unicode_glyph *vptr;
+ ret = 0;
+ for (vptr = visual; vptr < visual + visual_len; vptr++)
+ if (vptr->base == '\n')
+ ret++;
+ if (visual_len && visual[visual_len - 1].base != '\n')
+ ret++;
+ grub_free (visual);
+ }
+ else
+ {
+ ret = put_glyphs_terminal (visual, visual_len, margin_left,
+ margin_right, term, state);
+ if (!ret)
+ grub_free (visual);
+ else
+ state->free = visual;
+ }
+ return ret;
+ }
+ return print_ucs4_terminal (str, last_position, margin_left, margin_right,
+ term, state, dry_run);
+}
+
+void
+grub_print_ucs4 (const grub_uint32_t * str,
+ const grub_uint32_t * last_position,
+ int margin_left, int margin_right,
+ struct grub_term_output *term)
+{
+ print_ucs4_real (str, last_position, margin_left, margin_right,
+ term, 0, 0);
+}
+
+int
+grub_ucs4_count_lines (const grub_uint32_t * str,
+ const grub_uint32_t * last_position,
+ int margin_left, int margin_right,
+ struct grub_term_output *term)
+{
+ return print_ucs4_real (str, last_position, margin_left, margin_right,
+ term, 0, 1);
+}
+
+void
+grub_xputs_normal (const char *str)
+{
+ grub_uint32_t *unicode_str = NULL, *unicode_last_position;
+ int backlog = 0;
+ grub_term_output_t term;
+
+ grub_error_push ();
+ grub_utf8_to_ucs4_alloc (str, &unicode_str,
+ &unicode_last_position);
+ grub_error_pop ();
+
+ if (!unicode_str)
+ {
+ for (; *str; str++)
+ {
+ struct grub_unicode_glyph c =
+ {
+ .variant = 0,
+ .attributes = 0,
+ .ncomb = 0,
+ .combining = 0,
+ .estimated_width = 1,
+ .base = *str
+ };
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ (term->putchar) (term, &c);
+ }
+ if (*str == '\n')
+ {
+ c.base = '\r';
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ (term->putchar) (term, &c);
+ }
+ }
+ }
+
+ return;
+ }
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ int cur;
+ cur = print_ucs4_real (unicode_str, unicode_last_position, 0, 0,
+ term, grub_more, 0);
+ if (cur)
+ backlog = 1;
+ }
+ while (backlog)
+ {
+ print_more ();
+ backlog = 0;
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ int cur;
+ cur = print_backlog (term, 0, 0);
+ if (cur)
+ backlog = 1;
+ }
+ }
+ grub_free (unicode_str);
+}
+
+void
+grub_cls (void)
+{
+ struct grub_term_output *term;
+
+ FOR_ACTIVE_TERM_OUTPUTS(term)
+ {
+ if ((term->flags & GRUB_TERM_DUMB) || (grub_env_get ("debug")))
+ {
+ grub_putcode ('\n', term);
+ grub_term_refresh (term);
+ }
+ else
+ (term->cls) (term);
+ }
+}
diff --git a/grub-core/partmap/acorn.c b/grub-core/partmap/acorn.c
new file mode 100644
index 0000000..9a68ddd
--- /dev/null
+++ b/grub-core/partmap/acorn.c
@@ -0,0 +1,147 @@
+/* acorn.c - Read Linux/ADFS partition tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+#include <grub/acorn_filecore.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define LINUX_NATIVE_MAGIC grub_cpu_to_le32 (0xdeafa1de)
+#define LINUX_SWAP_MAGIC grub_cpu_to_le32 (0xdeafab1e)
+#define LINUX_MAP_ENTRIES (512 / 12)
+
+#define NONADFS_PARTITION_TYPE_LINUX 9
+#define NONADFS_PARTITION_TYPE_MASK 15
+
+struct grub_acorn_boot_block
+{
+ grub_uint8_t misc[0x1C0];
+ struct grub_filecore_disc_record disc_record;
+ grub_uint8_t flags;
+ grub_uint16_t start_cylinder;
+ grub_uint8_t checksum;
+} __attribute__ ((packed, aligned));
+
+struct linux_part
+{
+ grub_uint32_t magic;
+ grub_uint32_t start;
+ grub_uint32_t size;
+};
+
+static struct grub_partition_map grub_acorn_partition_map;
+
+static grub_err_t
+acorn_partition_map_find (grub_disk_t disk, struct linux_part *m,
+ grub_disk_addr_t *sector)
+{
+ struct grub_acorn_boot_block boot;
+ grub_err_t err;
+ unsigned int checksum = 0;
+ unsigned int heads;
+ unsigned int sectors_per_cylinder;
+ int i;
+
+ err = grub_disk_read (disk, 0xC00 / GRUB_DISK_SECTOR_SIZE, 0,
+ sizeof (struct grub_acorn_boot_block),
+ &boot);
+ if (err)
+ return err;
+
+ if ((boot.flags & NONADFS_PARTITION_TYPE_MASK) != NONADFS_PARTITION_TYPE_LINUX)
+ goto fail;
+
+ for (i = 0; i != 0x1ff; ++i)
+ checksum = (checksum & 0xff) + (checksum >> 8) + boot.misc[i];
+
+ if ((grub_uint8_t) checksum != boot.checksum)
+ goto fail;
+
+ heads = (boot.disc_record.heads
+ + ((boot.disc_record.lowsector >> 6) & 1));
+ sectors_per_cylinder = boot.disc_record.secspertrack * heads;
+ *sector = grub_le_to_cpu16 (boot.start_cylinder) * sectors_per_cylinder;
+
+ return grub_disk_read (disk, *sector, 0,
+ sizeof (struct linux_part) * LINUX_MAP_ENTRIES,
+ m);
+
+fail:
+ return grub_error (GRUB_ERR_BAD_PART_TABLE,
+ "Linux/ADFS partition map not found");
+
+}
+
+
+static grub_err_t
+acorn_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ struct grub_partition part;
+ struct linux_part map[LINUX_MAP_ENTRIES];
+ int i;
+ grub_disk_addr_t sector = 0;
+ grub_err_t err;
+
+ err = acorn_partition_map_find (disk, map, &sector);
+ if (err)
+ return err;
+
+ part.partmap = &grub_acorn_partition_map;
+
+ for (i = 0; i != LINUX_MAP_ENTRIES; ++i)
+ {
+ if (map[i].magic != LINUX_NATIVE_MAGIC
+ && map[i].magic != LINUX_SWAP_MAGIC)
+ return GRUB_ERR_NONE;
+
+ part.start = sector + map[i].start;
+ part.len = map[i].size;
+ part.offset = 6;
+ part.number = part.index = i;
+
+ if (hook (disk, &part))
+ return grub_errno;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+
+
+/* Partition map type. */
+static struct grub_partition_map grub_acorn_partition_map =
+{
+ .name = "acorn",
+ .iterate = acorn_partition_map_iterate,
+};
+
+GRUB_MOD_INIT(part_acorn)
+{
+ grub_partition_map_register (&grub_acorn_partition_map);
+}
+
+GRUB_MOD_FINI(part_acorn)
+{
+ grub_partition_map_unregister (&grub_acorn_partition_map);
+}
diff --git a/grub-core/partmap/amiga.c b/grub-core/partmap/amiga.c
new file mode 100644
index 0000000..36e318b
--- /dev/null
+++ b/grub-core/partmap/amiga.c
@@ -0,0 +1,160 @@
+/* amiga.c - Read amiga partition tables (RDB). */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2005,2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct grub_amiga_rdsk
+{
+ /* "RDSK". */
+ grub_uint8_t magic[4];
+#define GRUB_AMIGA_RDSK_MAGIC "RDSK"
+ grub_uint32_t size;
+ grub_int32_t checksum;
+ grub_uint32_t scsihost;
+ grub_uint32_t blksz;
+ grub_uint32_t flags;
+ grub_uint32_t badblcklst;
+ grub_uint32_t partitionlst;
+ grub_uint32_t fslst;
+
+ /* The other information is not important for us. */
+} __attribute__ ((packed));
+
+struct grub_amiga_partition
+{
+ /* "PART". */
+ grub_uint8_t magic[4];
+#define GRUB_AMIGA_PART_MAGIC "PART"
+ grub_int32_t size;
+ grub_int32_t checksum;
+ grub_uint32_t scsihost;
+ grub_uint32_t next;
+ grub_uint32_t flags;
+ grub_uint32_t unused1[2];
+ grub_uint32_t devflags;
+ grub_uint8_t namelen;
+ grub_uint8_t name[31];
+ grub_uint32_t unused2[15];
+
+ grub_uint32_t unused3[3];
+ grub_uint32_t heads;
+ grub_uint32_t unused4;
+ grub_uint32_t block_per_track;
+ grub_uint32_t unused5[3];
+ grub_uint32_t lowcyl;
+ grub_uint32_t highcyl;
+
+ grub_uint32_t firstcyl;
+} __attribute__ ((packed));
+
+static struct grub_partition_map grub_amiga_partition_map;
+
+
+
+static grub_err_t
+amiga_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ struct grub_partition part;
+ struct grub_amiga_rdsk rdsk;
+ int partno = 0;
+ int next = -1;
+ unsigned pos;
+
+ /* The RDSK block is one of the first 15 blocks. */
+ for (pos = 0; pos < 15; pos++)
+ {
+ /* Read the RDSK block which is a descriptor for the entire disk. */
+ if (grub_disk_read (disk, pos, 0, sizeof (rdsk), &rdsk))
+ return grub_errno;
+
+ if (grub_memcmp (rdsk.magic, GRUB_AMIGA_RDSK_MAGIC,
+ sizeof (rdsk.magic)) == 0)
+ {
+ /* Found the first PART block. */
+ next = grub_be_to_cpu32 (rdsk.partitionlst);
+ break;
+ }
+ }
+
+ if (next == -1)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE,
+ "Amiga partition map not found");
+
+ /* The end of the partition list is marked using "-1". */
+ while (next != -1)
+ {
+ struct grub_amiga_partition apart;
+
+ /* Read the RDSK block which is a descriptor for the entire disk. */
+ if (grub_disk_read (disk, next, 0, sizeof (apart), &apart))
+ return grub_errno;
+
+ if (grub_memcmp (apart.magic, GRUB_AMIGA_PART_MAGIC,
+ sizeof (apart.magic)) != 0)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE,
+ "invalid Amiga partition map");
+ /* Calculate the first block and the size of the partition. */
+ part.start = (grub_be_to_cpu32 (apart.lowcyl)
+ * grub_be_to_cpu32 (apart.heads)
+ * grub_be_to_cpu32 (apart.block_per_track));
+ part.len = ((grub_be_to_cpu32 (apart.highcyl)
+ - grub_be_to_cpu32 (apart.lowcyl) + 1)
+ * grub_be_to_cpu32 (apart.heads)
+ * grub_be_to_cpu32 (apart.block_per_track));
+
+ part.offset = (grub_off_t) next * 512;
+ part.number = partno;
+ part.index = 0;
+ part.partmap = &grub_amiga_partition_map;
+
+ if (hook (disk, &part))
+ return grub_errno;
+
+ next = grub_be_to_cpu32 (apart.next);
+ partno++;
+ }
+
+ return 0;
+}
+
+
+/* Partition map type. */
+static struct grub_partition_map grub_amiga_partition_map =
+ {
+ .name = "amiga",
+ .iterate = amiga_partition_map_iterate,
+ };
+
+GRUB_MOD_INIT(part_amiga)
+{
+ grub_partition_map_register (&grub_amiga_partition_map);
+}
+
+GRUB_MOD_FINI(part_amiga)
+{
+ grub_partition_map_unregister (&grub_amiga_partition_map);
+}
diff --git a/grub-core/partmap/apple.c b/grub-core/partmap/apple.c
new file mode 100644
index 0000000..c08cae5
--- /dev/null
+++ b/grub-core/partmap/apple.c
@@ -0,0 +1,199 @@
+/* apple.c - Read macintosh partition tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_APPLE_HEADER_MAGIC 0x4552
+#define GRUB_APPLE_PART_MAGIC 0x504D
+
+struct grub_apple_header
+{
+ /* The magic number to identify the partition map, it should have
+ the value `0x4552'. */
+ grub_uint16_t magic;
+ grub_uint16_t blocksize;
+};
+
+struct grub_apple_part
+{
+ /* The magic number to identify this as a partition, it should have
+ the value `0x504D'. */
+ grub_uint16_t magic;
+
+ /* Reserved. */
+ grub_uint16_t reserved;
+
+ /* The size of the partition map in blocks. */
+ grub_uint32_t partmap_size;
+
+ /* The first physical block of the partition. */
+ grub_uint32_t first_phys_block;
+
+ /* The amount of blocks. */
+ grub_uint32_t blockcnt;
+
+ /* The partition name. */
+ char partname[32];
+
+ /* The partition type. */
+ char parttype[32];
+
+ /* The first datablock of the partition. */
+ grub_uint32_t datablocks_first;
+
+ /* The amount datablocks. */
+ grub_uint32_t datablocks_count;
+
+ /* The status of the partition. (???) */
+ grub_uint32_t status;
+
+ /* The first block on which the bootcode can be found. */
+ grub_uint32_t bootcode_pos;
+
+ /* The size of the bootcode in bytes. */
+ grub_uint32_t bootcode_size;
+
+ /* The load address of the bootcode. */
+ grub_uint32_t bootcode_loadaddr;
+
+ /* Reserved. */
+ grub_uint32_t reserved2;
+
+ /* The entry point of the bootcode. */
+ grub_uint32_t bootcode_entrypoint;
+
+ /* Reserved. */
+ grub_uint32_t reserved3;
+
+ /* A checksum of the bootcode. */
+ grub_uint32_t bootcode_checksum;
+
+ /* The processor type. */
+ char processor[16];
+
+ /* Padding. */
+ grub_uint16_t pad[187];
+};
+
+static struct grub_partition_map grub_apple_partition_map;
+
+
+static grub_err_t
+apple_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ struct grub_partition part;
+ struct grub_apple_header aheader;
+ struct grub_apple_part apart;
+ int partno = 0, partnum = 0;
+ unsigned pos;
+
+ part.partmap = &grub_apple_partition_map;
+
+ if (grub_disk_read (disk, 0, 0, sizeof (aheader), &aheader))
+ return grub_errno;
+
+ if (grub_be_to_cpu16 (aheader.magic) != GRUB_APPLE_HEADER_MAGIC)
+ {
+ grub_dprintf ("partition",
+ "bad magic (found 0x%x; wanted 0x%x\n",
+ grub_be_to_cpu16 (aheader.magic),
+ GRUB_APPLE_HEADER_MAGIC);
+ goto fail;
+ }
+
+ pos = grub_be_to_cpu16 (aheader.blocksize);
+
+ do
+ {
+ part.offset = pos / GRUB_DISK_SECTOR_SIZE;
+ part.index = pos % GRUB_DISK_SECTOR_SIZE;
+
+ if (grub_disk_read (disk, part.offset, part.index,
+ sizeof (struct grub_apple_part), &apart))
+ return grub_errno;
+
+ if (grub_be_to_cpu16 (apart.magic) != GRUB_APPLE_PART_MAGIC)
+ {
+ grub_dprintf ("partition",
+ "partition %d: bad magic (found 0x%x; wanted 0x%x\n",
+ partno, grub_be_to_cpu16 (apart.magic),
+ GRUB_APPLE_PART_MAGIC);
+ break;
+ }
+
+ if (partnum == 0)
+ partnum = grub_be_to_cpu32 (apart.partmap_size);
+
+ part.start = ((grub_disk_addr_t) grub_be_to_cpu32 (apart.first_phys_block)
+ * grub_be_to_cpu16 (aheader.blocksize))
+ / GRUB_DISK_SECTOR_SIZE;
+ part.len = ((grub_disk_addr_t) grub_be_to_cpu32 (apart.blockcnt)
+ * grub_be_to_cpu16 (aheader.blocksize))
+ / GRUB_DISK_SECTOR_SIZE;
+ part.offset = pos;
+ part.index = partno;
+ part.number = partno;
+
+ grub_dprintf ("partition",
+ "partition %d: name %s, type %s, start 0x%x, len 0x%x\n",
+ partno, apart.partname, apart.parttype,
+ grub_be_to_cpu32 (apart.first_phys_block),
+ grub_be_to_cpu32 (apart.blockcnt));
+
+ if (hook (disk, &part))
+ return grub_errno;
+
+ pos += grub_be_to_cpu16 (aheader.blocksize);
+ partno++;
+ }
+ while (partno < partnum);
+
+ if (partno != 0)
+ return 0;
+
+ fail:
+ return grub_error (GRUB_ERR_BAD_PART_TABLE,
+ "Apple partition map not found");
+}
+
+
+/* Partition map type. */
+static struct grub_partition_map grub_apple_partition_map =
+ {
+ .name = "apple",
+ .iterate = apple_partition_map_iterate,
+ };
+
+GRUB_MOD_INIT(part_apple)
+{
+ grub_partition_map_register (&grub_apple_partition_map);
+}
+
+GRUB_MOD_FINI(part_apple)
+{
+ grub_partition_map_unregister (&grub_apple_partition_map);
+}
+
diff --git a/grub-core/partmap/bsdlabel.c b/grub-core/partmap/bsdlabel.c
new file mode 100644
index 0000000..888100a
--- /dev/null
+++ b/grub-core/partmap/bsdlabel.c
@@ -0,0 +1,254 @@
+/* bsdlabel.c - Read BSD style partition tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/partition.h>
+#include <grub/bsdlabel.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+#include <grub/msdos_partition.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#ifdef GRUB_UTIL
+#include <grub/emu/misc.h>
+#endif
+
+static struct grub_partition_map grub_bsdlabel_partition_map;
+static struct grub_partition_map grub_netbsdlabel_partition_map;
+static struct grub_partition_map grub_openbsdlabel_partition_map;
+
+
+
+static grub_err_t
+iterate_real (grub_disk_t disk, grub_disk_addr_t sector, int freebsd,
+ struct grub_partition_map *pmap,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ struct grub_partition_bsd_disk_label label;
+ struct grub_partition p;
+ grub_disk_addr_t delta = 0;
+ grub_disk_addr_t pos;
+
+ /* Read the BSD label. */
+ if (grub_disk_read (disk, sector, 0, sizeof (label), &label))
+ return grub_errno;
+
+ /* Check if it is valid. */
+ if (label.magic != grub_cpu_to_le32 (GRUB_PC_PARTITION_BSD_LABEL_MAGIC))
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature");
+
+ /* A kludge to determine a base of be.offset. */
+ if (GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION
+ < grub_cpu_to_le16 (label.num_partitions) && freebsd)
+ {
+ struct grub_partition_bsd_entry whole_disk_be;
+
+ pos = sizeof (label) + sector * GRUB_DISK_SECTOR_SIZE
+ + sizeof (struct grub_partition_bsd_entry)
+ * GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION;
+
+ if (grub_disk_read (disk, pos / GRUB_DISK_SECTOR_SIZE,
+ pos % GRUB_DISK_SECTOR_SIZE, sizeof (whole_disk_be),
+ &whole_disk_be))
+ return grub_errno;
+
+ delta = grub_le_to_cpu32 (whole_disk_be.offset);
+ }
+
+ pos = sizeof (label) + sector * GRUB_DISK_SECTOR_SIZE;
+
+ for (p.number = 0;
+ p.number < grub_cpu_to_le16 (label.num_partitions);
+ p.number++, pos += sizeof (struct grub_partition_bsd_entry))
+ {
+ struct grub_partition_bsd_entry be;
+
+ if (p.number == GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION)
+ continue;
+
+ p.offset = pos / GRUB_DISK_SECTOR_SIZE;
+ p.index = pos % GRUB_DISK_SECTOR_SIZE;
+
+ if (grub_disk_read (disk, p.offset, p.index, sizeof (be), &be))
+ return grub_errno;
+
+ p.start = grub_le_to_cpu32 (be.offset);
+ p.len = grub_le_to_cpu32 (be.size);
+ p.partmap = pmap;
+
+ if (p.len == 0)
+ continue;
+
+ if (p.start < delta)
+ {
+#ifdef GRUB_UTIL
+ char *partname;
+ /* disk->partition != NULL as 0 < delta */
+ partname = disk->partition ? grub_partition_get_name (disk->partition)
+ : "";
+ grub_util_warn ("Discarding improperly nested partition (%s,%s,%s%d)",
+ disk->name, partname, p.partmap->name, p.number + 1);
+ grub_free (partname);
+#endif
+ continue;
+ }
+
+ p.start -= delta;
+
+ if (hook (disk, &p))
+ return grub_errno;
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+bsdlabel_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+
+ if (disk->partition && grub_strcmp (disk->partition->partmap->name, "msdos")
+ == 0 && disk->partition->msdostype == GRUB_PC_PARTITION_TYPE_FREEBSD)
+ return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 1,
+ &grub_bsdlabel_partition_map, hook);
+
+ if (disk->partition
+ && (grub_strcmp (disk->partition->partmap->name, "msdos") == 0
+ || disk->partition->partmap == &grub_bsdlabel_partition_map
+ || disk->partition->partmap == &grub_netbsdlabel_partition_map
+ || disk->partition->partmap == &grub_openbsdlabel_partition_map))
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported");
+
+ return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 0,
+ &grub_bsdlabel_partition_map, hook);
+}
+
+/* This is a total breakage. Even when net-/openbsd label is inside partition
+ it actually describes the whole disk.
+ */
+static grub_err_t
+netopenbsdlabel_partition_map_iterate (grub_disk_t disk, grub_uint8_t type,
+ struct grub_partition_map *pmap,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ int count = 0;
+
+ auto int check_msdos (grub_disk_t dsk,
+ const grub_partition_t partition);
+
+ int check_msdos (grub_disk_t dsk,
+ const grub_partition_t partition)
+ {
+ grub_err_t err;
+
+ if (partition->msdostype != type)
+ return 0;
+
+ err = iterate_real (dsk, partition->start
+ + GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 0, pmap, hook);
+ if (err == GRUB_ERR_NONE)
+ {
+ count++;
+ return 1;
+ }
+ if (err == GRUB_ERR_BAD_PART_TABLE)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return 0;
+ }
+ grub_print_error ();
+ return 0;
+ }
+
+ if (disk->partition && grub_strcmp (disk->partition->partmap->name, "msdos")
+ == 0)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported");
+
+ {
+ grub_err_t err;
+ err = grub_partition_msdos_iterate (disk, check_msdos);
+
+ if (err)
+ return err;
+ if (!count)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no bsdlabel found");
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+netbsdlabel_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ return netopenbsdlabel_partition_map_iterate (disk,
+ GRUB_PC_PARTITION_TYPE_NETBSD,
+ &grub_netbsdlabel_partition_map,
+ hook);
+}
+
+static grub_err_t
+openbsdlabel_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ return netopenbsdlabel_partition_map_iterate (disk,
+ GRUB_PC_PARTITION_TYPE_OPENBSD,
+ &grub_openbsdlabel_partition_map,
+ hook);
+}
+
+
+static struct grub_partition_map grub_bsdlabel_partition_map =
+ {
+ .name = "bsd",
+ .iterate = bsdlabel_partition_map_iterate,
+ };
+
+static struct grub_partition_map grub_openbsdlabel_partition_map =
+ {
+ .name = "openbsd",
+ .iterate = openbsdlabel_partition_map_iterate,
+ };
+
+static struct grub_partition_map grub_netbsdlabel_partition_map =
+ {
+ .name = "netbsd",
+ .iterate = netbsdlabel_partition_map_iterate,
+ };
+
+
+
+GRUB_MOD_INIT(part_bsd)
+{
+ grub_partition_map_register (&grub_bsdlabel_partition_map);
+ grub_partition_map_register (&grub_netbsdlabel_partition_map);
+ grub_partition_map_register (&grub_openbsdlabel_partition_map);
+}
+
+GRUB_MOD_FINI(part_bsd)
+{
+ grub_partition_map_unregister (&grub_bsdlabel_partition_map);
+ grub_partition_map_unregister (&grub_netbsdlabel_partition_map);
+ grub_partition_map_unregister (&grub_openbsdlabel_partition_map);
+}
diff --git a/grub-core/partmap/gpt.c b/grub-core/partmap/gpt.c
new file mode 100644
index 0000000..73a1c3b
--- /dev/null
+++ b/grub-core/partmap/gpt.c
@@ -0,0 +1,208 @@
+/* gpt.c - Read GUID Partition Tables (GPT). */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/disk.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/partition.h>
+#include <grub/dl.h>
+#include <grub/msdos_partition.h>
+#include <grub/gpt_partition.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_uint8_t grub_gpt_magic[8] =
+ {
+ 0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54
+ };
+
+static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;
+
+#ifdef GRUB_UTIL
+static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
+#endif
+
+/* 512 << 7 = 65536 byte sectors. */
+#define MAX_SECTOR_LOG 7
+
+static struct grub_partition_map grub_gpt_partition_map;
+
+
+
+static grub_err_t
+gpt_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ struct grub_partition part;
+ struct grub_gpt_header gpt;
+ struct grub_gpt_partentry entry;
+ struct grub_msdos_partition_mbr mbr;
+ grub_uint64_t entries;
+ unsigned int i;
+ int last_offset = 0;
+ int sector_log = 0;
+
+ /* Read the protective MBR. */
+ if (grub_disk_read (disk, 0, 0, sizeof (mbr), &mbr))
+ return grub_errno;
+
+ /* Check if it is valid. */
+ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE))
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature");
+
+ /* Make sure the MBR is a protective MBR and not a normal MBR. */
+ if (mbr.entries[0].type != GRUB_PC_PARTITION_TYPE_GPT_DISK)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map found");
+
+ /* Read the GPT header. */
+ for (sector_log = 0; sector_log < MAX_SECTOR_LOG; sector_log++)
+ {
+ if (grub_disk_read (disk, 1 << sector_log, 0, sizeof (gpt), &gpt))
+ return grub_errno;
+
+ if (grub_memcmp (gpt.magic, grub_gpt_magic, sizeof (grub_gpt_magic)) == 0)
+ break;
+ }
+ if (sector_log == MAX_SECTOR_LOG)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no valid GPT header");
+
+ grub_dprintf ("gpt", "Read a valid GPT header\n");
+
+ entries = grub_le_to_cpu64 (gpt.partitions) << sector_log;
+ for (i = 0; i < grub_le_to_cpu32 (gpt.maxpart); i++)
+ {
+ if (grub_disk_read (disk, entries, last_offset,
+ sizeof (entry), &entry))
+ return grub_errno;
+
+ if (grub_memcmp (&grub_gpt_partition_type_empty, &entry.type,
+ sizeof (grub_gpt_partition_type_empty)))
+ {
+ /* Calculate the first block and the size of the partition. */
+ part.start = grub_le_to_cpu64 (entry.start) << sector_log;
+ part.len = (grub_le_to_cpu64 (entry.end)
+ - grub_le_to_cpu64 (entry.start) + 1) << sector_log;
+ part.offset = entries;
+ part.number = i;
+ part.index = last_offset;
+ part.partmap = &grub_gpt_partition_map;
+ part.parent = disk->partition;
+
+ grub_dprintf ("gpt", "GPT entry %d: start=%lld, length=%lld\n", i,
+ (unsigned long long) part.start,
+ (unsigned long long) part.len);
+
+ if (hook (disk, &part))
+ return grub_errno;
+ }
+
+ last_offset += grub_le_to_cpu32 (gpt.partentry_size);
+ if (last_offset == GRUB_DISK_SECTOR_SIZE)
+ {
+ last_offset = 0;
+ entries++;
+ }
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+#ifdef GRUB_UTIL
+static grub_err_t
+gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
+ grub_embed_type_t embed_type,
+ grub_disk_addr_t **sectors)
+{
+ grub_disk_addr_t start = 0, len = 0;
+ unsigned i;
+ grub_err_t err;
+
+ auto int NESTED_FUNC_ATTR find_usable_region (grub_disk_t disk,
+ const grub_partition_t p);
+ int NESTED_FUNC_ATTR find_usable_region (grub_disk_t disk __attribute__ ((unused)),
+ const grub_partition_t p)
+ {
+ struct grub_gpt_partentry gptdata;
+
+ disk->partition = p->parent;
+ if (grub_disk_read (disk, p->offset, p->index,
+ sizeof (gptdata), &gptdata))
+ return 0;
+
+ /* If there's an embed region, it is in a dedicated partition. */
+ if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
+ {
+ start = p->start;
+ len = p->len;
+ return 1;
+ }
+
+ return 0;
+ }
+
+ if (embed_type != GRUB_EMBED_PCBIOS)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "GPT curently supports only PC-BIOS embedding");
+
+ err = gpt_partition_map_iterate (disk, find_usable_region);
+ if (err)
+ return err;
+
+ if (len == 0)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "This GPT partition label has no BIOS Boot Partition;"
+ " embedding won't be possible!");
+
+ if (len < *nsectors)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "Your BIOS Boot Partition is too small;"
+ " embedding won't be possible!");
+
+ *nsectors = len;
+ *sectors = grub_malloc (*nsectors * sizeof (**sectors));
+ if (!*sectors)
+ return grub_errno;
+ for (i = 0; i < *nsectors; i++)
+ (*sectors)[i] = start + i;
+
+ return GRUB_ERR_NONE;
+}
+#endif
+
+
+/* Partition map type. */
+static struct grub_partition_map grub_gpt_partition_map =
+ {
+ .name = "gpt",
+ .iterate = gpt_partition_map_iterate,
+#ifdef GRUB_UTIL
+ .embed = gpt_partition_map_embed
+#endif
+ };
+
+GRUB_MOD_INIT(part_gpt)
+{
+ grub_partition_map_register (&grub_gpt_partition_map);
+}
+
+GRUB_MOD_FINI(part_gpt)
+{
+ grub_partition_map_unregister (&grub_gpt_partition_map);
+}
diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c
new file mode 100644
index 0000000..1b71c69
--- /dev/null
+++ b/grub-core/partmap/msdos.c
@@ -0,0 +1,284 @@
+/* pc.c - Read PC style partition tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/partition.h>
+#include <grub/msdos_partition.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct grub_partition_map grub_msdos_partition_map;
+
+
+grub_err_t
+grub_partition_msdos_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ struct grub_partition p;
+ struct grub_msdos_partition_mbr mbr;
+ int labeln = 0;
+ grub_disk_addr_t lastaddr;
+ grub_disk_addr_t ext_offset;
+ grub_disk_addr_t delta = 0;
+
+ if (disk->partition && disk->partition->partmap == &grub_msdos_partition_map)
+ {
+ if (disk->partition->msdostype == GRUB_PC_PARTITION_TYPE_LINUX_MINIX)
+ delta = disk->partition->start;
+ else
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported");
+ }
+
+ p.offset = 0;
+ ext_offset = 0;
+ p.number = -1;
+ p.partmap = &grub_msdos_partition_map;
+
+ /* Any value different than `p.offset' will satisfy the check during
+ first loop. */
+ lastaddr = !p.offset;
+
+ while (1)
+ {
+ int i;
+ struct grub_msdos_partition_entry *e;
+
+ /* Read the MBR. */
+ if (grub_disk_read (disk, p.offset, 0, sizeof (mbr), &mbr))
+ goto finish;
+
+ /* This is our loop-detection algorithm. It works the following way:
+ It saves last position which was a power of two. Then it compares the
+ saved value with a current one. This way it's guaranteed that the loop
+ will be broken by at most third walk.
+ */
+ if (labeln && lastaddr == p.offset)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected");
+
+ labeln++;
+ if ((labeln & (labeln - 1)) == 0)
+ lastaddr = p.offset;
+
+ /* Check if it is valid. */
+ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE))
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature");
+
+ for (i = 0; i < 4; i++)
+ if (mbr.entries[i].flag & 0x7f)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag");
+
+ /* Analyze DOS partitions. */
+ for (p.index = 0; p.index < 4; p.index++)
+ {
+ e = mbr.entries + p.index;
+
+ p.start = p.offset + grub_le_to_cpu32 (e->start) - delta;
+ p.len = grub_le_to_cpu32 (e->length);
+ p.msdostype = e->type;
+
+ grub_dprintf ("partition",
+ "partition %d: flag 0x%x, type 0x%x, start 0x%llx, len 0x%llx\n",
+ p.index, e->flag, e->type,
+ (unsigned long long) p.start,
+ (unsigned long long) p.len);
+
+ /* If this is a GPT partition, this MBR is just a dummy. */
+ if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK && p.index == 0)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr");
+
+ /* If this partition is a normal one, call the hook. */
+ if (! grub_msdos_partition_is_empty (e->type)
+ && ! grub_msdos_partition_is_extended (e->type))
+ {
+ p.number++;
+
+ if (hook (disk, &p))
+ return grub_errno;
+ }
+ else if (p.number < 4)
+ /* If this partition is a logical one, shouldn't increase the
+ partition number. */
+ p.number++;
+ }
+
+ /* Find an extended partition. */
+ for (i = 0; i < 4; i++)
+ {
+ e = mbr.entries + i;
+
+ if (grub_msdos_partition_is_extended (e->type))
+ {
+ p.offset = ext_offset + grub_le_to_cpu32 (e->start);
+ if (! ext_offset)
+ ext_offset = p.offset;
+
+ break;
+ }
+ }
+
+ /* If no extended partition, the end. */
+ if (i == 4)
+ break;
+ }
+
+ finish:
+ return grub_errno;
+}
+
+#ifdef GRUB_UTIL
+static grub_err_t
+pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
+ grub_embed_type_t embed_type,
+ grub_disk_addr_t **sectors)
+{
+ grub_disk_addr_t end = ~0ULL;
+ struct grub_msdos_partition_mbr mbr;
+ int labeln = 0;
+ /* Any value different than `p.offset' will satisfy the check during
+ first loop. */
+ grub_disk_addr_t lastaddr = 1;
+ grub_disk_addr_t ext_offset = 0;
+ grub_disk_addr_t offset = 0;
+
+ if (embed_type != GRUB_EMBED_PCBIOS)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "PC-style partitions curently support "
+ "only PC-BIOS embedding");
+
+ if (disk->partition)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "Embedding on MSDOS subpartition isn't supported");
+
+ while (1)
+ {
+ int i;
+ struct grub_msdos_partition_entry *e;
+ grub_err_t err;
+
+ /* Read the MBR. */
+ err = grub_disk_read (disk, offset, 0, sizeof (mbr), &mbr);
+ if (err)
+ return err;
+
+ /* This is our loop-detection algorithm. It works the following way:
+ It saves last position which was a power of two. Then it compares the
+ saved value with a current one. This way it's guaranteed that the loop
+ will be broken by at most third walk.
+ */
+ if (labeln && lastaddr == offset)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected");
+
+ labeln++;
+ if ((labeln & (labeln - 1)) == 0)
+ lastaddr = offset;
+
+ /* Check if it is valid. */
+ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE))
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature");
+
+ for (i = 0; i < 4; i++)
+ if (mbr.entries[i].flag & 0x7f)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag");
+
+ /* Analyze DOS partitions. */
+ for (i = 0; i < 4; i++)
+ {
+ e = mbr.entries + i;
+
+ if (!grub_msdos_partition_is_empty (e->type)
+ && end > offset + grub_le_to_cpu32 (e->start))
+ end = offset + grub_le_to_cpu32 (e->start);
+
+ /* If this is a GPT partition, this MBR is just a dummy. */
+ if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK && i == 0)
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr");
+ }
+
+ /* Find an extended partition. */
+ for (i = 0; i < 4; i++)
+ {
+ e = mbr.entries + i;
+
+ if (grub_msdos_partition_is_extended (e->type))
+ {
+ offset = ext_offset + grub_le_to_cpu32 (e->start);
+ if (! ext_offset)
+ ext_offset = offset;
+
+ break;
+ }
+ }
+
+ /* If no extended partition, the end. */
+ if (i == 4)
+ break;
+ }
+
+ if (end >= *nsectors + 2)
+ {
+ unsigned i;
+ *nsectors = end - 2;
+ *sectors = grub_malloc (*nsectors * sizeof (**sectors));
+ if (!*sectors)
+ return grub_errno;
+ for (i = 0; i < *nsectors; i++)
+ (*sectors)[i] = 1 + i;
+ return GRUB_ERR_NONE;
+ }
+
+ if (end <= 1)
+ return grub_error (GRUB_ERR_FILE_NOT_FOUND,
+ "This msdos-style partition label has no "
+ "post-MBR gap; embedding won't be possible!");
+
+ if (*nsectors > 62)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "Your core.img is unusually large. "
+ "It won't fit in the embedding area.");
+
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ "Your embedding area is unusually small. "
+ "core.img won't fit in it.");
+}
+#endif
+
+
+/* Partition map type. */
+static struct grub_partition_map grub_msdos_partition_map =
+ {
+ .name = "msdos",
+ .iterate = grub_partition_msdos_iterate,
+#ifdef GRUB_UTIL
+ .embed = pc_partition_map_embed
+#endif
+ };
+
+GRUB_MOD_INIT(part_msdos)
+{
+ grub_partition_map_register (&grub_msdos_partition_map);
+}
+
+GRUB_MOD_FINI(part_msdos)
+{
+ grub_partition_map_unregister (&grub_msdos_partition_map);
+}
diff --git a/grub-core/partmap/sun.c b/grub-core/partmap/sun.c
new file mode 100644
index 0000000..c7ef681
--- /dev/null
+++ b/grub-core/partmap/sun.c
@@ -0,0 +1,151 @@
+/* sun.c - Read SUN style partition tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/partition.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+#include <grub/symbol.h>
+#include <grub/types.h>
+#include <grub/err.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_PARTMAP_SUN_MAGIC 0xDABE
+#define GRUB_PARTMAP_SUN_MAX_PARTS 8
+#define GRUB_PARTMAP_SUN_WHOLE_DISK_ID 0x05
+
+struct grub_sun_partition_info
+{
+ grub_uint8_t spare1;
+ grub_uint8_t id;
+ grub_uint8_t spare2;
+ grub_uint8_t flags;
+} __attribute__ ((packed));
+
+struct grub_sun_partition_descriptor
+{
+ grub_uint32_t start_cylinder;
+ grub_uint32_t num_sectors;
+} __attribute__ ((packed));
+
+struct grub_sun_block
+{
+ grub_uint8_t info[128]; /* Informative text string. */
+ grub_uint8_t spare0[14];
+ struct grub_sun_partition_info infos[8];
+ grub_uint8_t spare1[246]; /* Boot information etc. */
+ grub_uint16_t rspeed; /* Disk rotational speed. */
+ grub_uint16_t pcylcount; /* Physical cylinder count. */
+ grub_uint16_t sparecyl; /* extra sects per cylinder. */
+ grub_uint8_t spare2[4]; /* More magic... */
+ grub_uint16_t ilfact; /* Interleave factor. */
+ grub_uint16_t ncyl; /* Data cylinder count. */
+ grub_uint16_t nacyl; /* Alt. cylinder count. */
+ grub_uint16_t ntrks; /* Tracks per cylinder. */
+ grub_uint16_t nsect; /* Sectors per track. */
+ grub_uint8_t spare3[4]; /* Even more magic... */
+ struct grub_sun_partition_descriptor partitions[8];
+ grub_uint16_t magic; /* Magic number. */
+ grub_uint16_t csum; /* Label xor'd checksum. */
+} __attribute__ ((packed));
+
+static struct grub_partition_map grub_sun_partition_map;
+
+/* Verify checksum (true=ok). */
+static int
+grub_sun_is_valid (struct grub_sun_block *label)
+{
+ grub_uint16_t *pos;
+ grub_uint16_t sum = 0;
+
+ for (pos = (grub_uint16_t *) label;
+ pos < (grub_uint16_t *) (label + 1);
+ pos++)
+ sum ^= *pos;
+
+ return ! sum;
+}
+
+static grub_err_t
+sun_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ struct grub_partition p;
+ struct grub_sun_block block;
+ int partnum;
+ grub_err_t err;
+
+ p.partmap = &grub_sun_partition_map;
+ err = grub_disk_read (disk, 0, 0, sizeof (struct grub_sun_block),
+ &block);
+ if (err)
+ return err;
+
+ if (GRUB_PARTMAP_SUN_MAGIC != grub_be_to_cpu16 (block.magic))
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "not a sun partition table");
+
+ if (! grub_sun_is_valid (&block))
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum");
+
+ /* Maybe another error value would be better, because partition
+ table _is_ recognized but invalid. */
+ for (partnum = 0; partnum < GRUB_PARTMAP_SUN_MAX_PARTS; partnum++)
+ {
+ struct grub_sun_partition_descriptor *desc;
+
+ if (block.infos[partnum].id == 0
+ || block.infos[partnum].id == GRUB_PARTMAP_SUN_WHOLE_DISK_ID)
+ continue;
+
+ desc = &block.partitions[partnum];
+ p.start = ((grub_uint64_t) grub_be_to_cpu32 (desc->start_cylinder)
+ * grub_be_to_cpu16 (block.ntrks)
+ * grub_be_to_cpu16 (block.nsect));
+ p.len = grub_be_to_cpu32 (desc->num_sectors);
+ p.number = p.index = partnum;
+ if (p.len)
+ {
+ if (hook (disk, &p))
+ partnum = GRUB_PARTMAP_SUN_MAX_PARTS;
+ }
+ }
+
+ return grub_errno;
+}
+
+/* Partition map type. */
+static struct grub_partition_map grub_sun_partition_map =
+ {
+ .name = "sun",
+ .iterate = sun_partition_map_iterate,
+ };
+
+GRUB_MOD_INIT(part_sun)
+{
+ grub_partition_map_register (&grub_sun_partition_map);
+}
+
+GRUB_MOD_FINI(part_sun)
+{
+ grub_partition_map_unregister (&grub_sun_partition_map);
+}
+
diff --git a/grub-core/partmap/sunpc.c b/grub-core/partmap/sunpc.c
new file mode 100644
index 0000000..28dc4f5
--- /dev/null
+++ b/grub-core/partmap/sunpc.c
@@ -0,0 +1,146 @@
+/* sunpc.c - Read SUN PC style partition tables. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2005,2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/partition.h>
+#include <grub/disk.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/dl.h>
+#include <grub/symbol.h>
+#include <grub/types.h>
+#include <grub/err.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define GRUB_PARTMAP_SUN_PC_MAGIC 0xDABE
+#define GRUB_PARTMAP_SUN_PC_MAX_PARTS 16
+#define GRUB_PARTMAP_SUN_PC_WHOLE_DISK_ID 0x05
+
+struct grub_sun_pc_partition_descriptor
+{
+ grub_uint16_t id;
+ grub_uint16_t unused;
+ grub_uint32_t start_sector;
+ grub_uint32_t num_sectors;
+} __attribute__ ((packed));
+
+struct grub_sun_pc_block
+{
+ grub_uint8_t unused[72];
+ struct grub_sun_pc_partition_descriptor partitions[GRUB_PARTMAP_SUN_PC_MAX_PARTS];
+ grub_uint8_t unused2[244];
+ grub_uint16_t magic; /* Magic number. */
+ grub_uint16_t csum; /* Label xor'd checksum. */
+} __attribute__ ((packed));
+
+static struct grub_partition_map grub_sun_pc_partition_map;
+
+/* Verify checksum (true=ok). */
+static int
+grub_sun_is_valid (struct grub_sun_pc_block *label)
+{
+ grub_uint16_t *pos;
+ grub_uint16_t sum = 0;
+
+ for (pos = (grub_uint16_t *) label;
+ pos < (grub_uint16_t *) (label + 1);
+ pos++)
+ sum ^= *pos;
+
+ return ! sum;
+}
+
+static grub_err_t
+sun_pc_partition_map_iterate (grub_disk_t disk,
+ int (*hook) (grub_disk_t disk,
+ const grub_partition_t partition))
+{
+ grub_partition_t p;
+ struct grub_sun_pc_block block;
+ int partnum;
+ grub_err_t err;
+
+ p = (grub_partition_t) grub_zalloc (sizeof (struct grub_partition));
+ if (! p)
+ return grub_errno;
+
+ p->partmap = &grub_sun_pc_partition_map;
+ err = grub_disk_read (disk, 1, 0, sizeof (struct grub_sun_pc_block), &block);
+ if (err)
+ {
+ grub_free (p);
+ return err;
+ }
+
+ if (GRUB_PARTMAP_SUN_PC_MAGIC != grub_le_to_cpu16 (block.magic))
+ {
+ grub_free (p);
+ return grub_error (GRUB_ERR_BAD_PART_TABLE,
+ "not a sun_pc partition table");
+ }
+
+ if (! grub_sun_is_valid (&block))
+ {
+ grub_free (p);
+ return grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum");
+ }
+
+ /* Maybe another error value would be better, because partition
+ table _is_ recognized but invalid. */
+ for (partnum = 0; partnum < GRUB_PARTMAP_SUN_PC_MAX_PARTS; partnum++)
+ {
+ struct grub_sun_pc_partition_descriptor *desc;
+
+ if (block.partitions[partnum].id == 0
+ || block.partitions[partnum].id == GRUB_PARTMAP_SUN_PC_WHOLE_DISK_ID)
+ continue;
+
+ desc = &block.partitions[partnum];
+ p->start = grub_le_to_cpu32 (desc->start_sector);
+ p->len = grub_le_to_cpu32 (desc->num_sectors);
+ p->number = partnum;
+ if (p->len)
+ {
+ if (hook (disk, p))
+ partnum = GRUB_PARTMAP_SUN_PC_MAX_PARTS;
+ }
+ }
+
+ grub_free (p);
+
+ return grub_errno;
+}
+
+/* Partition map type. */
+static struct grub_partition_map grub_sun_pc_partition_map =
+ {
+ .name = "sunpc",
+ .iterate = sun_pc_partition_map_iterate,
+ };
+
+GRUB_MOD_INIT(part_sunpc)
+{
+ grub_partition_map_register (&grub_sun_pc_partition_map);
+}
+
+GRUB_MOD_FINI(part_sunpc)
+{
+ grub_partition_map_unregister (&grub_sun_pc_partition_map);
+}
+
diff --git a/grub-core/parttool/msdospart.c b/grub-core/parttool/msdospart.c
new file mode 100644
index 0000000..ecaca14
--- /dev/null
+++ b/grub-core/parttool/msdospart.c
@@ -0,0 +1,157 @@
+/* pcpart.c - manipulate fdisk partitions */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/msdos_partition.h>
+#include <grub/device.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/parttool.h>
+
+GRUB_MOD_LICENSE ("GPLv2+");
+
+static int activate_table_handle = -1;
+static int type_table_handle = -1;
+
+static struct grub_parttool_argdesc grub_pcpart_bootargs[] =
+{
+ {"boot", "Make partition active", GRUB_PARTTOOL_ARG_BOOL},
+ {0, 0, 0}
+};
+
+static grub_err_t grub_pcpart_boot (const grub_device_t dev,
+ const struct grub_parttool_args *args)
+{
+ int i, index;
+ grub_partition_t part;
+ struct grub_msdos_partition_mbr mbr;
+
+ if (dev->disk->partition->offset)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "not a primary partition");
+
+ index = dev->disk->partition->index;
+ part = dev->disk->partition;
+ dev->disk->partition = part->parent;
+
+ /* Read the MBR. */
+ if (grub_disk_read (dev->disk, 0, 0, sizeof (mbr), &mbr))
+ {
+ dev->disk->partition = part;
+ return grub_errno;
+ }
+
+ if (args[0].set && args[0].bool)
+ {
+ for (i = 0; i < 4; i++)
+ mbr.entries[i].flag = 0x0;
+ mbr.entries[index].flag = 0x80;
+ grub_printf ("Partition %d is active now. \n", index);
+ }
+ else
+ {
+ mbr.entries[index].flag = 0x0;
+ grub_printf ("Cleared active flag on %d. \n", index);
+ }
+
+ /* Write the MBR. */
+ grub_disk_write (dev->disk, 0, 0, sizeof (mbr), &mbr);
+
+ dev->disk->partition = part;
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_parttool_argdesc grub_pcpart_typeargs[] =
+{
+ {"type", "Change partition type", GRUB_PARTTOOL_ARG_VAL},
+ {"hidden", "Make partition hidden", GRUB_PARTTOOL_ARG_BOOL},
+ {0, 0, 0}
+};
+
+static grub_err_t grub_pcpart_type (const grub_device_t dev,
+ const struct grub_parttool_args *args)
+{
+ int index;
+ grub_uint8_t type;
+ grub_partition_t part;
+ struct grub_msdos_partition_mbr mbr;
+
+ index = dev->disk->partition->index;
+ part = dev->disk->partition;
+ dev->disk->partition = part->parent;
+
+ /* Read the parttable. */
+ if (grub_disk_read (dev->disk, part->offset, 0,
+ sizeof (mbr), &mbr))
+ {
+ dev->disk->partition = part;
+ return grub_errno;
+ }
+
+ if (args[0].set)
+ type = grub_strtoul (args[0].str, 0, 0);
+ else
+ type = mbr.entries[index].type;
+
+ if (args[1].set)
+ {
+ if (args[1].bool)
+ type |= GRUB_PC_PARTITION_TYPE_HIDDEN_FLAG;
+ else
+ type &= ~GRUB_PC_PARTITION_TYPE_HIDDEN_FLAG;
+ }
+
+ if (grub_msdos_partition_is_empty (type)
+ || grub_msdos_partition_is_extended (type))
+ {
+ dev->disk->partition = part;
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid type");
+ }
+
+ mbr.entries[index].type = type;
+ grub_printf ("Setting partition type to 0x%x\n", type);
+
+ /* Write the parttable. */
+ grub_disk_write (dev->disk, part->offset, 0,
+ sizeof (mbr), &mbr);
+
+ dev->disk->partition = part;
+
+ return GRUB_ERR_NONE;
+}
+
+GRUB_MOD_INIT (msdospart)
+{
+ activate_table_handle = grub_parttool_register ("msdos",
+ grub_pcpart_boot,
+ grub_pcpart_bootargs);
+ type_table_handle = grub_parttool_register ("msdos",
+ grub_pcpart_type,
+ grub_pcpart_typeargs);
+
+}
+GRUB_MOD_FINI(msdospart)
+{
+ grub_parttool_unregister (activate_table_handle);
+ grub_parttool_unregister (type_table_handle);
+}
diff --git a/grub-core/script/argv.c b/grub-core/script/argv.c
new file mode 100644
index 0000000..856828d
--- /dev/null
+++ b/grub-core/script/argv.c
@@ -0,0 +1,153 @@
+/* argv.c - methods for constructing argument vector */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/script_sh.h>
+
+/* Return nearest power of two that is >= v. */
+static unsigned
+round_up_exp (unsigned v)
+{
+ COMPILE_TIME_ASSERT (sizeof (v) == 4);
+
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+
+ v++;
+ v += (v == 0);
+
+ return v;
+}
+
+void
+grub_script_argv_free (struct grub_script_argv *argv)
+{
+ unsigned i;
+
+ if (argv->args)
+ {
+ for (i = 0; i < argv->argc; i++)
+ grub_free (argv->args[i]);
+
+ grub_free (argv->args);
+ }
+
+ argv->argc = 0;
+ argv->args = 0;
+ argv->script = 0;
+}
+
+/* Make argv from argc, args pair. */
+int
+grub_script_argv_make (struct grub_script_argv *argv, int argc, char **args)
+{
+ int i;
+ struct grub_script_argv r = { 0, 0, 0 };
+
+ for (i = 0; i < argc; i++)
+ if (grub_script_argv_next (&r) || grub_script_argv_append (&r, args[i]))
+ {
+ grub_script_argv_free (&r);
+ return 1;
+ }
+ *argv = r;
+ return 0;
+}
+
+/* Prepare for next argc. */
+int
+grub_script_argv_next (struct grub_script_argv *argv)
+{
+ char **p = argv->args;
+
+ if (argv->args && argv->argc && argv->args[argv->argc - 1] == 0)
+ return 0;
+
+ p = grub_realloc (p, round_up_exp ((argv->argc + 2) * sizeof (char *)));
+ if (! p)
+ return 1;
+
+ argv->argc++;
+ argv->args = p;
+
+ if (argv->argc == 1)
+ argv->args[0] = 0;
+ argv->args[argv->argc] = 0;
+ return 0;
+}
+
+/* Append `s' to the last argument. */
+int
+grub_script_argv_append (struct grub_script_argv *argv, const char *s)
+{
+ int a;
+ int b;
+ char *p = argv->args[argv->argc - 1];
+
+ if (! s)
+ return 0;
+
+ a = p ? grub_strlen (p) : 0;
+ b = grub_strlen (s);
+
+ p = grub_realloc (p, round_up_exp ((a + b + 1) * sizeof (char)));
+ if (! p)
+ return 1;
+
+ grub_strcpy (p + a, s);
+ argv->args[argv->argc - 1] = p;
+
+ return 0;
+}
+
+/* Split `s' and append words as multiple arguments. */
+int
+grub_script_argv_split_append (struct grub_script_argv *argv, char *s)
+{
+ char ch;
+ char *p;
+ int errors = 0;
+
+ if (! s)
+ return 0;
+
+ while (! errors && *s)
+ {
+ p = s;
+ while (*s && ! grub_isspace (*s))
+ s++;
+
+ ch = *s;
+ *s = '\0';
+ errors += grub_script_argv_append (argv, p);
+ *s = ch;
+
+ while (*s && grub_isspace (*s))
+ s++;
+
+ if (*s)
+ errors += grub_script_argv_next (argv);
+ }
+ return errors;
+}
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
new file mode 100644
index 0000000..72d1997
--- /dev/null
+++ b/grub-core/script/execute.c
@@ -0,0 +1,783 @@
+/* execute.c -- Execute a GRUB script. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/script_sh.h>
+#include <grub/command.h>
+#include <grub/menu.h>
+#include <grub/lib/arg.h>
+#include <grub/normal.h>
+#include <grub/extcmd.h>
+
+/* Max digits for a char is 3 (0xFF is 255), similarly for an int it
+ is sizeof (int) * 3, and one extra for a possible -ve sign. */
+#define ERRNO_DIGITS_MAX (sizeof (int) * 3 + 1)
+
+static unsigned long is_continue;
+static unsigned long active_loops;
+static unsigned long active_breaks;
+static unsigned long function_return;
+
+#define GRUB_SCRIPT_SCOPE_MALLOCED 1
+#define GRUB_SCRIPT_SCOPE_ARGS_MALLOCED 2
+
+/* Scope for grub script functions. */
+struct grub_script_scope
+{
+ unsigned flags;
+ unsigned shifts;
+ struct grub_script_argv argv;
+};
+static struct grub_script_scope *scope = 0;
+
+/* Wildcard translator for GRUB script. */
+struct grub_script_wildcard_translator *grub_wildcard_translator;
+
+static void
+replace_scope (struct grub_script_scope *new_scope)
+{
+ if (scope)
+ {
+ scope->argv.argc += scope->shifts;
+ scope->argv.args -= scope->shifts;
+
+ if (scope->flags & GRUB_SCRIPT_SCOPE_ARGS_MALLOCED)
+ grub_script_argv_free (&scope->argv);
+
+ if (scope->flags & GRUB_SCRIPT_SCOPE_MALLOCED)
+ grub_free (scope);
+ }
+ scope = new_scope;
+}
+
+grub_err_t
+grub_script_break (grub_command_t cmd, int argc, char *argv[])
+{
+ char *p = 0;
+ unsigned long count;
+
+ if (argc == 0)
+ count = 1;
+
+ else if ((argc > 1) || (count = grub_strtoul (argv[0], &p, 10)) == 0 ||
+ (*p != '\0'))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad break");
+
+ is_continue = grub_strcmp (cmd->name, "break") ? 1 : 0;
+ active_breaks = grub_min (active_loops, count);
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_script_shift (grub_command_t cmd __attribute__((unused)),
+ int argc, char *argv[])
+{
+ char *p = 0;
+ unsigned long n = 0;
+
+ if (! scope)
+ return GRUB_ERR_NONE;
+
+ if (argc == 0)
+ n = 1;
+
+ else if (argc > 1)
+ return GRUB_ERR_BAD_ARGUMENT;
+
+ else
+ {
+ n = grub_strtoul (argv[0], &p, 10);
+ if (*p != '\0')
+ return GRUB_ERR_BAD_ARGUMENT;
+ }
+
+ if (n > scope->argv.argc)
+ return GRUB_ERR_BAD_ARGUMENT;
+
+ scope->shifts += n;
+ scope->argv.argc -= n;
+ scope->argv.args += n;
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_script_setparams (grub_command_t cmd __attribute__((unused)),
+ int argc, char **args)
+{
+ struct grub_script_scope *new_scope;
+ struct grub_script_argv argv = { 0, 0, 0 };
+
+ if (! scope)
+ return GRUB_ERR_INVALID_COMMAND;
+
+ new_scope = grub_malloc (sizeof (*new_scope));
+ if (! new_scope)
+ return grub_errno;
+
+ if (grub_script_argv_make (&argv, argc, args))
+ {
+ grub_free (new_scope);
+ return grub_errno;
+ }
+
+ new_scope->shifts = 0;
+ new_scope->argv = argv;
+ new_scope->flags = GRUB_SCRIPT_SCOPE_MALLOCED |
+ GRUB_SCRIPT_SCOPE_ARGS_MALLOCED;
+
+ replace_scope (new_scope);
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_script_return (grub_command_t cmd __attribute__((unused)),
+ int argc, char *argv[])
+{
+ char *p;
+ unsigned long n;
+
+ if (! scope || argc > 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "not in function scope");
+
+ if (argc == 0)
+ {
+ function_return = 1;
+ return grub_strtoul (grub_env_get ("?"), NULL, 10);
+ }
+
+ n = grub_strtoul (argv[0], &p, 10);
+ if (*p != '\0')
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad argument");
+
+ function_return = 1;
+ return n ? grub_error (GRUB_ERR_TEST_FAILURE, "false") : GRUB_ERR_NONE;
+}
+
+static int
+grub_env_special (const char *name)
+{
+ if (grub_isdigit (name[0]) ||
+ grub_strcmp (name, "#") == 0 ||
+ grub_strcmp (name, "*") == 0 ||
+ grub_strcmp (name, "@") == 0)
+ return 1;
+ return 0;
+}
+
+static char **
+grub_script_env_get (const char *name, grub_script_arg_type_t type)
+{
+ unsigned i;
+ struct grub_script_argv result = { 0, 0, 0 };
+
+ if (grub_script_argv_next (&result))
+ goto fail;
+
+ if (! grub_env_special (name))
+ {
+ char *v = grub_env_get (name);
+ if (v && v[0])
+ {
+ if (type == GRUB_SCRIPT_ARG_TYPE_VAR)
+ {
+ if (grub_script_argv_split_append (&result, v))
+ goto fail;
+ }
+ else
+ if (grub_script_argv_append (&result, v))
+ goto fail;
+ }
+ }
+ else if (! scope)
+ {
+ if (grub_script_argv_append (&result, 0))
+ goto fail;
+ }
+ else if (grub_strcmp (name, "#") == 0)
+ {
+ char buffer[ERRNO_DIGITS_MAX + 1];
+ grub_snprintf (buffer, sizeof (buffer), "%u", scope->argv.argc);
+ if (grub_script_argv_append (&result, buffer))
+ goto fail;
+ }
+ else if (grub_strcmp (name, "*") == 0)
+ {
+ for (i = 0; i < scope->argv.argc; i++)
+ if (type == GRUB_SCRIPT_ARG_TYPE_VAR)
+ {
+ if (i != 0 && grub_script_argv_next (&result))
+ goto fail;
+
+ if (grub_script_argv_split_append (&result, scope->argv.args[i]))
+ goto fail;
+ }
+ else
+ {
+ if (i != 0 && grub_script_argv_append (&result, " "))
+ goto fail;
+
+ if (grub_script_argv_append (&result, scope->argv.args[i]))
+ goto fail;
+ }
+ }
+ else if (grub_strcmp (name, "@") == 0)
+ {
+ for (i = 0; i < scope->argv.argc; i++)
+ {
+ if (i != 0 && grub_script_argv_next (&result))
+ goto fail;
+
+ if (type == GRUB_SCRIPT_ARG_TYPE_VAR)
+ {
+ if (grub_script_argv_split_append (&result, scope->argv.args[i]))
+ goto fail;
+ }
+ else
+ if (grub_script_argv_append (&result, scope->argv.args[i]))
+ goto fail;
+ }
+ }
+ else
+ {
+ unsigned long num = grub_strtoul (name, 0, 10);
+ if (num == 0)
+ ; /* XXX no file name, for now. */
+
+ else if (num <= scope->argv.argc)
+ {
+ if (type == GRUB_SCRIPT_ARG_TYPE_VAR)
+ {
+ if (grub_script_argv_split_append (&result,
+ scope->argv.args[num - 1]))
+ goto fail;
+ }
+ else
+ if (grub_script_argv_append (&result, scope->argv.args[num - 1]))
+ goto fail;
+ }
+ }
+
+ return result.args;
+
+ fail:
+
+ grub_script_argv_free (&result);
+ return 0;
+}
+
+static grub_err_t
+grub_script_env_set (const char *name, const char *val)
+{
+ if (grub_env_special (name))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad variable name");
+
+ return grub_env_set (name, val);
+}
+
+/* Convert arguments in ARGLIST into ARGV form. */
+static int
+grub_script_arglist_to_argv (struct grub_script_arglist *arglist,
+ struct grub_script_argv *argv)
+{
+ int i;
+ char **values = 0;
+ struct grub_script_arg *arg = 0;
+ struct grub_script_argv result = { 0, 0, 0 };
+
+ auto int append (char *s, int escape_type);
+ int append (char *s, int escape_type)
+ {
+ int r;
+ char *p = 0;
+
+ if (! grub_wildcard_translator || escape_type == 0)
+ return grub_script_argv_append (&result, s);
+
+ if (escape_type > 0)
+ p = grub_wildcard_translator->escape (s);
+ else if (escape_type < 0)
+ p = grub_wildcard_translator->unescape (s);
+
+ if (! p)
+ return 1;
+
+ r = grub_script_argv_append (&result, p);
+ grub_free (p);
+ return r;
+ }
+
+ for (; arglist && arglist->arg; arglist = arglist->next)
+ {
+ if (grub_script_argv_next (&result))
+ goto fail;
+
+ arg = arglist->arg;
+ while (arg)
+ {
+ switch (arg->type)
+ {
+ case GRUB_SCRIPT_ARG_TYPE_VAR:
+ case GRUB_SCRIPT_ARG_TYPE_DQVAR:
+ values = grub_script_env_get (arg->str, arg->type);
+ for (i = 0; values && values[i]; i++)
+ {
+ if (i != 0 && grub_script_argv_next (&result))
+ goto fail;
+
+ if (arg->type == GRUB_SCRIPT_ARG_TYPE_VAR)
+ {
+ if (grub_script_argv_append (&result, values[i]))
+ goto fail;
+ }
+ else
+ {
+ if (append (values[i], 1))
+ goto fail;
+ }
+
+ grub_free (values[i]);
+ }
+ grub_free (values);
+ break;
+
+ case GRUB_SCRIPT_ARG_TYPE_BLOCK:
+ if (grub_script_argv_append (&result, "{") ||
+ grub_script_argv_append (&result, arg->str) ||
+ grub_script_argv_append (&result, "}"))
+ goto fail;
+ result.script = arg->script;
+ break;
+
+ case GRUB_SCRIPT_ARG_TYPE_TEXT:
+ if (grub_strlen (arg->str) &&
+ grub_script_argv_append (&result, arg->str))
+ goto fail;
+ break;
+
+ case GRUB_SCRIPT_ARG_TYPE_DQSTR:
+ case GRUB_SCRIPT_ARG_TYPE_SQSTR:
+ if (append (arg->str, 1))
+ goto fail;
+ break;
+ }
+ arg = arg->next;
+ }
+ }
+
+ if (! result.args[result.argc - 1])
+ result.argc--;
+
+ /* Perform wildcard expansion. */
+
+ if (grub_wildcard_translator)
+ {
+ int j;
+ int failed = 0;
+ char **expansions = 0;
+ struct grub_script_argv unexpanded = result;
+
+ result.argc = 0;
+ result.args = 0;
+ for (i = 0; unexpanded.args[i]; i++)
+ {
+ if (grub_wildcard_translator->expand (unexpanded.args[i],
+ &expansions))
+ {
+ grub_script_argv_free (&unexpanded);
+ goto fail;
+ }
+
+ if (! expansions)
+ {
+ grub_script_argv_next (&result);
+ append (unexpanded.args[i], -1);
+ }
+ else
+ {
+ for (j = 0; expansions[j]; j++)
+ {
+ failed = (failed || grub_script_argv_next (&result) ||
+ append (expansions[j], -1));
+ grub_free (expansions[j]);
+ }
+ grub_free (expansions);
+
+ if (failed)
+ {
+ grub_script_argv_free (&unexpanded);
+ goto fail;
+ }
+ }
+ }
+ grub_script_argv_free (&unexpanded);
+ }
+
+ *argv = result;
+ return 0;
+
+ fail:
+
+ grub_script_argv_free (&result);
+ return 1;
+}
+
+static grub_err_t
+grub_script_execute_cmd (struct grub_script_cmd *cmd)
+{
+ int ret;
+ char errnobuf[ERRNO_DIGITS_MAX + 1];
+
+ if (cmd == 0)
+ return 0;
+
+ ret = cmd->exec (cmd);
+
+ grub_snprintf (errnobuf, sizeof (errnobuf), "%d", ret);
+ grub_env_set ("?", errnobuf);
+ return ret;
+}
+
+/* Execute a function call. */
+grub_err_t
+grub_script_function_call (grub_script_function_t func, int argc, char **args)
+{
+ grub_err_t ret = 0;
+ unsigned long loops = active_loops;
+ struct grub_script_scope *old_scope;
+ struct grub_script_scope new_scope;
+
+ active_loops = 0;
+ new_scope.flags = 0;
+ new_scope.shifts = 0;
+ new_scope.argv.argc = argc;
+ new_scope.argv.args = args;
+
+ old_scope = scope;
+ scope = &new_scope;
+
+ ret = grub_script_execute (func->func);
+
+ function_return = 0;
+ active_loops = loops;
+ replace_scope (old_scope); /* free any scopes by setparams */
+ return ret;
+}
+
+/* Execute a source script. */
+grub_err_t
+grub_script_execute_sourcecode (const char *source, int argc, char **args)
+{
+ grub_err_t ret = 0;
+ struct grub_script *parsed_script;
+ struct grub_script_scope new_scope;
+ struct grub_script_scope *old_scope;
+
+ auto grub_err_t getline (char **line, int cont);
+ grub_err_t getline (char **line, int cont __attribute__ ((unused)))
+ {
+ const char *p;
+
+ if (! source)
+ {
+ *line = 0;
+ return 0;
+ }
+
+ p = grub_strchr (source, '\n');
+
+ if (p)
+ *line = grub_strndup (source, p - source);
+ else
+ *line = grub_strdup (source);
+ source = p ? p + 1 : 0;
+ return 0;
+ }
+
+ new_scope.argv.argc = argc;
+ new_scope.argv.args = args;
+ new_scope.flags = 0;
+
+ old_scope = scope;
+ scope = &new_scope;
+
+ while (source)
+ {
+ char *line;
+
+ getline (&line, 0);
+ parsed_script = grub_script_parse (line, getline);
+ if (! parsed_script)
+ {
+ ret = grub_errno;
+ break;
+ }
+
+ ret = grub_script_execute (parsed_script);
+ grub_free (line);
+ }
+
+ scope = old_scope;
+ return ret;
+}
+
+/* Execute a single command line. */
+grub_err_t
+grub_script_execute_cmdline (struct grub_script_cmd *cmd)
+{
+ struct grub_script_cmdline *cmdline = (struct grub_script_cmdline *) cmd;
+ grub_command_t grubcmd;
+ grub_err_t ret = 0;
+ grub_script_function_t func = 0;
+ char errnobuf[18];
+ char *cmdname;
+ int argc;
+ char **args;
+ int invert;
+ struct grub_script_argv argv = { 0, 0, 0 };
+
+ /* Lookup the command. */
+ if (grub_script_arglist_to_argv (cmdline->arglist, &argv) || ! argv.args[0])
+ return grub_errno;
+
+ invert = 0;
+ argc = argv.argc - 1;
+ args = argv.args + 1;
+ cmdname = argv.args[0];
+ if (grub_strcmp (cmdname, "!") == 0)
+ {
+ if (argv.argc < 2 || ! argv.args[1])
+ {
+ grub_script_argv_free (&argv);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "missing arguments");
+ }
+
+ invert = 1;
+ argc = argv.argc - 2;
+ args = argv.args + 2;
+ cmdname = argv.args[1];
+ }
+ grubcmd = grub_command_find (cmdname);
+ if (! grubcmd)
+ {
+ grub_errno = GRUB_ERR_NONE;
+
+ /* It's not a GRUB command, try all functions. */
+ func = grub_script_function_find (cmdname);
+ if (! func)
+ {
+ /* As a last resort, try if it is an assignment. */
+ char *assign = grub_strdup (cmdname);
+ char *eq = grub_strchr (assign, '=');
+
+ if (eq)
+ {
+ /* This was set because the command was not found. */
+ grub_errno = GRUB_ERR_NONE;
+
+ /* Create two strings and set the variable. */
+ *eq = '\0';
+ eq++;
+ grub_script_env_set (assign, eq);
+ }
+ grub_free (assign);
+
+ grub_snprintf (errnobuf, sizeof (errnobuf), "%d", grub_errno);
+ grub_script_env_set ("?", errnobuf);
+
+ grub_script_argv_free (&argv);
+ grub_print_error ();
+
+ return 0;
+ }
+ }
+
+ /* Execute the GRUB command or function. */
+ if (grubcmd)
+ {
+ if (grub_extractor_level && !(grubcmd->flags
+ & GRUB_COMMAND_FLAG_EXTRACTOR))
+ ret = grub_error (GRUB_ERR_EXTRACTOR,
+ "%s isn't allowed to execute in an extractor",
+ cmdname);
+ else if ((grubcmd->flags & GRUB_COMMAND_FLAG_BLOCKS) &&
+ (grubcmd->flags & GRUB_COMMAND_FLAG_EXTCMD))
+ ret = grub_extcmd_dispatcher (grubcmd, argc, args, argv.script);
+ else
+ ret = (grubcmd->func) (grubcmd, argc, args);
+ }
+ else
+ ret = grub_script_function_call (func, argc, args);
+
+ if (invert)
+ {
+ if (ret == GRUB_ERR_TEST_FAILURE)
+ grub_errno = ret = GRUB_ERR_NONE;
+ else if (ret == GRUB_ERR_NONE)
+ ret = grub_error (GRUB_ERR_TEST_FAILURE, "false");
+ else
+ {
+ grub_print_error ();
+ ret = GRUB_ERR_NONE;
+ }
+ }
+
+ /* Free arguments. */
+ grub_script_argv_free (&argv);
+
+ if (grub_errno == GRUB_ERR_TEST_FAILURE)
+ grub_errno = GRUB_ERR_NONE;
+
+ grub_print_error ();
+
+ grub_snprintf (errnobuf, sizeof (errnobuf), "%d", ret);
+ grub_env_set ("?", errnobuf);
+
+ return ret;
+}
+
+/* Execute a block of one or more commands. */
+grub_err_t
+grub_script_execute_cmdlist (struct grub_script_cmd *list)
+{
+ int ret = 0;
+ struct grub_script_cmd *cmd;
+
+ /* Loop over every command and execute it. */
+ for (cmd = list->next; cmd; cmd = cmd->next)
+ {
+ if (active_breaks)
+ break;
+
+ ret = grub_script_execute_cmd (cmd);
+
+ if (function_return)
+ break;
+ }
+
+ return ret;
+}
+
+/* Execute an if statement. */
+grub_err_t
+grub_script_execute_cmdif (struct grub_script_cmd *cmd)
+{
+ int ret;
+ char *result;
+ struct grub_script_cmdif *cmdif = (struct grub_script_cmdif *) cmd;
+
+ /* Check if the commands results in a true or a false. The value is
+ read from the env variable `?'. */
+ ret = grub_script_execute_cmd (cmdif->exec_to_evaluate);
+ if (function_return)
+ return ret;
+
+ result = grub_env_get ("?");
+ grub_errno = GRUB_ERR_NONE;
+
+ /* Execute the `if' or the `else' part depending on the value of
+ `?'. */
+ if (result && ! grub_strcmp (result, "0"))
+ return grub_script_execute_cmd (cmdif->exec_on_true);
+ else
+ return grub_script_execute_cmd (cmdif->exec_on_false);
+}
+
+/* Execute a for statement. */
+grub_err_t
+grub_script_execute_cmdfor (struct grub_script_cmd *cmd)
+{
+ unsigned i;
+ grub_err_t result;
+ struct grub_script_argv argv = { 0, 0, 0 };
+ struct grub_script_cmdfor *cmdfor = (struct grub_script_cmdfor *) cmd;
+
+ if (grub_script_arglist_to_argv (cmdfor->words, &argv))
+ return grub_errno;
+
+ active_loops++;
+ result = 0;
+ for (i = 0; i < argv.argc; i++)
+ {
+ if (is_continue && active_breaks == 1)
+ active_breaks = 0;
+
+ if (! active_breaks)
+ {
+ grub_script_env_set (cmdfor->name->str, argv.args[i]);
+ result = grub_script_execute_cmd (cmdfor->list);
+ if (function_return)
+ break;
+ }
+ }
+
+ if (active_breaks)
+ active_breaks--;
+
+ active_loops--;
+ grub_script_argv_free (&argv);
+ return result;
+}
+
+/* Execute a "while" or "until" command. */
+grub_err_t
+grub_script_execute_cmdwhile (struct grub_script_cmd *cmd)
+{
+ int result;
+ struct grub_script_cmdwhile *cmdwhile = (struct grub_script_cmdwhile *) cmd;
+
+ active_loops++;
+ do {
+ result = grub_script_execute_cmd (cmdwhile->cond);
+ if (function_return)
+ break;
+
+ if (cmdwhile->until ? !result : result)
+ break;
+
+ result = grub_script_execute_cmd (cmdwhile->list);
+ if (function_return)
+ break;
+
+ if (active_breaks == 1 && is_continue)
+ active_breaks = 0;
+
+ if (active_breaks)
+ break;
+
+ } while (1); /* XXX Put a check for ^C here */
+
+ if (active_breaks)
+ active_breaks--;
+
+ active_loops--;
+ return result;
+}
+
+/* Execute any GRUB pre-parsed command or script. */
+grub_err_t
+grub_script_execute (struct grub_script *script)
+{
+ if (script == 0)
+ return 0;
+
+ return grub_script_execute_cmd (script->cmd);
+}
+
diff --git a/grub-core/script/function.c b/grub-core/script/function.c
new file mode 100644
index 0000000..47b2366
--- /dev/null
+++ b/grub-core/script/function.c
@@ -0,0 +1,105 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/script_sh.h>
+#include <grub/parser.h>
+#include <grub/mm.h>
+
+grub_script_function_t grub_script_function_list;
+
+grub_script_function_t
+grub_script_function_create (struct grub_script_arg *functionname_arg,
+ struct grub_script *cmd)
+{
+ grub_script_function_t func;
+ grub_script_function_t *p;
+
+ func = (grub_script_function_t) grub_malloc (sizeof (*func));
+ if (! func)
+ return 0;
+
+ func->name = grub_strdup (functionname_arg->str);
+ if (! func->name)
+ {
+ grub_free (func);
+ return 0;
+ }
+
+ func->func = cmd;
+
+ /* Keep the list sorted for simplicity. */
+ p = &grub_script_function_list;
+ while (*p)
+ {
+ if (grub_strcmp ((*p)->name, func->name) >= 0)
+ break;
+
+ p = &((*p)->next);
+ }
+
+ /* If the function already exists, overwrite the old function. */
+ if (*p && grub_strcmp ((*p)->name, func->name) == 0)
+ {
+ grub_script_function_t q;
+
+ q = *p;
+ grub_script_free (q->func);
+ q->func = cmd;
+ grub_free (func);
+ func = q;
+ }
+ else
+ {
+ func->next = *p;
+ *p = func;
+ }
+
+ return func;
+}
+
+void
+grub_script_function_remove (const char *name)
+{
+ grub_script_function_t *p, q;
+
+ for (p = &grub_script_function_list, q = *p; q; p = &(q->next), q = q->next)
+ if (grub_strcmp (name, q->name) == 0)
+ {
+ *p = q->next;
+ grub_free (q->name);
+ grub_script_free (q->func);
+ grub_free (q);
+ break;
+ }
+}
+
+grub_script_function_t
+grub_script_function_find (char *functionname)
+{
+ grub_script_function_t func;
+
+ for (func = grub_script_function_list; func; func = func->next)
+ if (grub_strcmp (functionname, func->name) == 0)
+ break;
+
+ if (! func)
+ grub_error (GRUB_ERR_UNKNOWN_COMMAND, "unknown command `%.20s'", functionname);
+
+ return func;
+}
diff --git a/grub-core/script/lexer.c b/grub-core/script/lexer.c
new file mode 100644
index 0000000..9827907
--- /dev/null
+++ b/grub-core/script/lexer.c
@@ -0,0 +1,327 @@
+/* lexer.c - The scripting lexer. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+
+#include <grub/parser.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/script_sh.h>
+
+#include "grub_script.tab.h"
+#include "grub_script.yy.h"
+
+void
+grub_script_lexer_ref (struct grub_lexer_param *state)
+{
+ state->refs++;
+}
+
+void
+grub_script_lexer_deref (struct grub_lexer_param *state)
+{
+ state->refs--;
+}
+
+/* Start recording all characters passing through the lexer. */
+unsigned
+grub_script_lexer_record_start (struct grub_parser_param *parser)
+{
+ struct grub_lexer_param *lexer = parser->lexerstate;
+
+ lexer->record++;
+ if (lexer->recording)
+ return lexer->recordpos;
+
+ lexer->recordpos = 0;
+ lexer->recordlen = GRUB_LEXER_INITIAL_RECORD_SIZE;
+ lexer->recording = grub_malloc (lexer->recordlen);
+ if (!lexer->recording)
+ {
+ grub_script_yyerror (parser, 0);
+ lexer->recordlen = 0;
+ }
+ return lexer->recordpos;
+}
+
+char *
+grub_script_lexer_record_stop (struct grub_parser_param *parser, unsigned offset)
+{
+ int count;
+ char *result;
+ struct grub_lexer_param *lexer = parser->lexerstate;
+
+ if (!lexer->record)
+ return 0;
+
+ lexer->record--;
+ if (!lexer->recording)
+ return 0;
+
+ count = lexer->recordpos - offset;
+ result = grub_script_malloc (parser, count + 1);
+ if (result) {
+ grub_strncpy (result, lexer->recording + offset, count);
+ result[count] = '\0';
+ }
+
+ if (lexer->record == 0)
+ {
+ grub_free (lexer->recording);
+ lexer->recording = 0;
+ lexer->recordlen = 0;
+ lexer->recordpos = 0;
+ }
+ return result;
+}
+
+/* Record STR if input recording is enabled. */
+void
+grub_script_lexer_record (struct grub_parser_param *parser, char *str)
+{
+ int len;
+ char *old;
+ struct grub_lexer_param *lexer = parser->lexerstate;
+
+ if (!lexer->record || !lexer->recording)
+ return;
+
+ len = grub_strlen (str);
+ if (lexer->recordpos + len + 1 > lexer->recordlen)
+ {
+ old = lexer->recording;
+ lexer->recordlen = grub_max (len, lexer->recordlen) * 2;
+ lexer->recording = grub_realloc (lexer->recording, lexer->recordlen);
+ if (!lexer->recording)
+ {
+ grub_free (old);
+ lexer->recordpos = 0;
+ lexer->recordlen = 0;
+ grub_script_yyerror (parser, 0);
+ return;
+ }
+ }
+ grub_strcpy (lexer->recording + lexer->recordpos, str);
+ lexer->recordpos += len;
+}
+
+/* Read next line of input if necessary, and set yyscanner buffers. */
+int
+grub_script_lexer_yywrap (struct grub_parser_param *parserstate,
+ const char *input)
+{
+ int len = 0;
+ char *p = 0;
+ char *line = 0;
+ YY_BUFFER_STATE buffer;
+ struct grub_lexer_param *lexerstate = parserstate->lexerstate;
+
+ if (! lexerstate->refs && ! lexerstate->prefix && ! input)
+ return 1;
+
+ if (! lexerstate->getline && ! input)
+ {
+ grub_script_yyerror (parserstate, "unexpected end of file");
+ return 1;
+ }
+
+ line = 0;
+ if (! input)
+ lexerstate->getline (&line, 1);
+ else
+ line = grub_strdup (input);
+
+ /* Ensure '\n' at the end. */
+ if (line && line[0] == '\0')
+ {
+ grub_free (line);
+ line = grub_strdup ("\n");
+ }
+
+ if (line && (len = grub_strlen(line)) && line[len - 1] != '\n')
+ {
+ p = grub_realloc (line, len + 2);
+ if (p)
+ {
+ p[len++] = '\n';
+ p[len] = '\0';
+ }
+ line = p;
+ }
+
+ if (! line)
+ {
+ grub_script_yyerror (parserstate, "out of memory");
+ return 1;
+ }
+
+ /* Prepend any left over unput-text. */
+ if (lexerstate->prefix)
+ {
+ int plen = grub_strlen (lexerstate->prefix);
+
+ p = grub_malloc (len + plen + 1);
+ if (! p)
+ {
+ grub_free (line);
+ return 1;
+ }
+ grub_strcpy (p, lexerstate->prefix);
+ lexerstate->prefix = 0;
+
+ grub_strcpy (p + plen, line);
+ grub_free (line);
+
+ line = p;
+ len = len + plen;
+ }
+
+ buffer = yy_scan_string (line, lexerstate->yyscanner);
+ grub_free (line);
+
+ if (! buffer)
+ {
+ grub_script_yyerror (parserstate, 0);
+ return 1;
+ }
+ return 0;
+}
+
+struct grub_lexer_param *
+grub_script_lexer_init (struct grub_parser_param *parser, char *script,
+ grub_reader_getline_t getline)
+{
+ struct grub_lexer_param *lexerstate;
+
+ lexerstate = grub_zalloc (sizeof (*lexerstate));
+ if (!lexerstate)
+ return 0;
+
+ lexerstate->size = GRUB_LEXER_INITIAL_TEXT_SIZE;
+ lexerstate->text = grub_malloc (lexerstate->size);
+ if (!lexerstate->text)
+ {
+ grub_free (lexerstate);
+ return 0;
+ }
+
+ lexerstate->getline = getline; /* rest are all zeros already */
+ if (yylex_init (&lexerstate->yyscanner))
+ {
+ grub_free (lexerstate->text);
+ grub_free (lexerstate);
+ return 0;
+ }
+
+ yyset_extra (parser, lexerstate->yyscanner);
+ parser->lexerstate = lexerstate;
+
+ if (grub_script_lexer_yywrap (parser, script ?: "\n"))
+ {
+ parser->lexerstate = 0;
+ yylex_destroy (lexerstate->yyscanner);
+ grub_free (lexerstate->yyscanner);
+ grub_free (lexerstate->text);
+ grub_free (lexerstate);
+ return 0;
+ }
+
+ return lexerstate;
+}
+
+void
+grub_script_lexer_fini (struct grub_lexer_param *lexerstate)
+{
+ if (!lexerstate)
+ return;
+
+ yylex_destroy (lexerstate->yyscanner);
+
+ grub_free (lexerstate->recording);
+ grub_free (lexerstate->text);
+ grub_free (lexerstate);
+}
+
+int
+grub_script_yylex (union YYSTYPE *value,
+ struct grub_parser_param *parserstate)
+{
+ char *str;
+ int token;
+ grub_script_arg_type_t type;
+ struct grub_lexer_param *lexerstate = parserstate->lexerstate;
+
+ value->arg = 0;
+ if (parserstate->err)
+ return GRUB_PARSER_TOKEN_BAD;
+
+ if (lexerstate->eof)
+ return GRUB_PARSER_TOKEN_EOF;
+
+ /*
+ * Words with environment variables, like foo${bar}baz needs
+ * multiple tokens to be merged into a single grub_script_arg. We
+ * use two variables to achieve this: lexerstate->merge_start and
+ * lexerstate->merge_end
+ */
+
+ lexerstate->merge_start = 0;
+ lexerstate->merge_end = 0;
+ do
+ {
+ /* Empty lexerstate->text. */
+ lexerstate->used = 1;
+ lexerstate->text[0] = '\0';
+
+ token = yylex (value, lexerstate->yyscanner);
+ if (token == GRUB_PARSER_TOKEN_BAD)
+ break;
+
+ /* Merging feature uses lexerstate->text instead of yytext. */
+ if (lexerstate->merge_start)
+ {
+ str = lexerstate->text;
+ type = lexerstate->type;
+ }
+ else
+ {
+ str = yyget_text (lexerstate->yyscanner);
+ type = GRUB_SCRIPT_ARG_TYPE_TEXT;
+ }
+ grub_dprintf("lexer", "token %u text [%s]\n", token, str);
+
+ value->arg = grub_script_arg_add (parserstate, value->arg, type, str);
+ }
+ while (lexerstate->merge_start && !lexerstate->merge_end);
+
+ if (!value->arg || parserstate->err)
+ return GRUB_PARSER_TOKEN_BAD;
+
+ return token;
+}
+
+void
+grub_script_yyerror (struct grub_parser_param *state, char const *err)
+{
+ if (err)
+ grub_error (GRUB_ERR_INVALID_COMMAND, err);
+
+ grub_print_error ();
+ state->err++;
+}
diff --git a/grub-core/script/main.c b/grub-core/script/main.c
new file mode 100644
index 0000000..482bb3f
--- /dev/null
+++ b/grub-core/script/main.c
@@ -0,0 +1,88 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/i18n.h>
+#include <grub/parser.h>
+#include <grub/script_sh.h>
+
+grub_err_t
+grub_normal_parse_line (char *line, grub_reader_getline_t getline)
+{
+ struct grub_script *parsed_script;
+
+ /* Parse the script. */
+ parsed_script = grub_script_parse (line, getline);
+
+ if (parsed_script)
+ {
+ /* Execute the command(s). */
+ grub_script_execute (parsed_script);
+
+ /* The parsed script was executed, throw it away. */
+ grub_script_unref (parsed_script);
+ }
+
+ return grub_errno;
+}
+
+static grub_command_t cmd_break;
+static grub_command_t cmd_continue;
+static grub_command_t cmd_shift;
+static grub_command_t cmd_setparams;
+static grub_command_t cmd_return;
+
+void
+grub_script_init (void)
+{
+ cmd_break = grub_register_command ("break", grub_script_break,
+ N_("[n]"), N_("Exit from loops"));
+ cmd_continue = grub_register_command ("continue", grub_script_break,
+ N_("[n]"), N_("Continue loops"));
+ cmd_shift = grub_register_command ("shift", grub_script_shift,
+ N_("[n]"), N_("Shift positional parameters."));
+ cmd_setparams = grub_register_command ("setparams", grub_script_setparams,
+ N_("[VALUE]..."),
+ N_("Set positional parameters."));
+ cmd_return = grub_register_command ("return", grub_script_return,
+ N_("[n]"), N_("Return from a function."));
+}
+
+void
+grub_script_fini (void)
+{
+ if (cmd_break)
+ grub_unregister_command (cmd_break);
+ cmd_break = 0;
+
+ if (cmd_continue)
+ grub_unregister_command (cmd_continue);
+ cmd_continue = 0;
+
+ if (cmd_shift)
+ grub_unregister_command (cmd_shift);
+ cmd_shift = 0;
+
+ if (cmd_setparams)
+ grub_unregister_command (cmd_setparams);
+ cmd_setparams = 0;
+
+ if (cmd_return)
+ grub_unregister_command (cmd_return);
+ cmd_return = 0;
+}
diff --git a/grub-core/script/parser.y b/grub-core/script/parser.y
new file mode 100644
index 0000000..683b3ac
--- /dev/null
+++ b/grub-core/script/parser.y
@@ -0,0 +1,353 @@
+/* parser.y - The scripting parser. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+%{
+#include <grub/script_sh.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+#define YYFREE grub_free
+#define YYMALLOC grub_malloc
+#define YYLTYPE_IS_TRIVIAL 0
+#define YYENABLE_NLS 0
+
+#include "grub_script.tab.h"
+%}
+
+%union {
+ struct grub_script_cmd *cmd;
+ struct grub_script_arglist *arglist;
+ struct grub_script_arg *arg;
+ char *string;
+ struct {
+ unsigned offset;
+ struct grub_script_mem *memory;
+ struct grub_script *scripts;
+ };
+}
+
+%token GRUB_PARSER_TOKEN_BAD
+%token GRUB_PARSER_TOKEN_EOF 0 "end-of-input"
+
+%token GRUB_PARSER_TOKEN_NEWLINE "\n"
+%token GRUB_PARSER_TOKEN_AND "&&"
+%token GRUB_PARSER_TOKEN_OR "||"
+%token GRUB_PARSER_TOKEN_SEMI2 ";;"
+%token GRUB_PARSER_TOKEN_PIPE "|"
+%token GRUB_PARSER_TOKEN_AMP "&"
+%token GRUB_PARSER_TOKEN_SEMI ";"
+%token GRUB_PARSER_TOKEN_LBR "{"
+%token GRUB_PARSER_TOKEN_RBR "}"
+%token GRUB_PARSER_TOKEN_NOT "!"
+%token GRUB_PARSER_TOKEN_LSQBR2 "["
+%token GRUB_PARSER_TOKEN_RSQBR2 "]"
+%token GRUB_PARSER_TOKEN_LT "<"
+%token GRUB_PARSER_TOKEN_GT ">"
+
+%token <arg> GRUB_PARSER_TOKEN_CASE "case"
+%token <arg> GRUB_PARSER_TOKEN_DO "do"
+%token <arg> GRUB_PARSER_TOKEN_DONE "done"
+%token <arg> GRUB_PARSER_TOKEN_ELIF "elif"
+%token <arg> GRUB_PARSER_TOKEN_ELSE "else"
+%token <arg> GRUB_PARSER_TOKEN_ESAC "esac"
+%token <arg> GRUB_PARSER_TOKEN_FI "fi"
+%token <arg> GRUB_PARSER_TOKEN_FOR "for"
+%token <arg> GRUB_PARSER_TOKEN_IF "if"
+%token <arg> GRUB_PARSER_TOKEN_IN "in"
+%token <arg> GRUB_PARSER_TOKEN_SELECT "select"
+%token <arg> GRUB_PARSER_TOKEN_THEN "then"
+%token <arg> GRUB_PARSER_TOKEN_UNTIL "until"
+%token <arg> GRUB_PARSER_TOKEN_WHILE "while"
+%token <arg> GRUB_PARSER_TOKEN_TIME "time"
+%token <arg> GRUB_PARSER_TOKEN_FUNCTION "function"
+%token <arg> GRUB_PARSER_TOKEN_NAME "name"
+%token <arg> GRUB_PARSER_TOKEN_WORD "word"
+
+%type <arg> block block0
+%type <arglist> word argument arguments0 arguments1
+
+%type <cmd> script_init script
+%type <cmd> grubcmd ifclause ifcmd forcmd whilecmd untilcmd
+%type <cmd> command commands1 statement
+
+%pure-parser
+%lex-param { struct grub_parser_param *state };
+%parse-param { struct grub_parser_param *state };
+
+%start script_init
+
+%%
+/* It should be possible to do this in a clean way... */
+script_init: { state->err = 0; } script { state->parsed = $2; state->err = 0; }
+;
+
+script: newlines0
+ {
+ $$ = 0;
+ }
+ | script statement delimiter newlines0
+ {
+ $$ = grub_script_append_cmd (state, $1, $2);
+ }
+ | error
+ {
+ $$ = 0;
+ yyerror (state, "Incorrect command");
+ yyerrok;
+ }
+;
+
+newlines0: /* Empty */ | newlines1 ;
+newlines1: newlines0 "\n" ;
+
+delimiter: ";"
+ | "\n"
+;
+delimiters0: /* Empty */ | delimiters1 ;
+delimiters1: delimiter
+ | delimiters1 "\n"
+;
+
+word: GRUB_PARSER_TOKEN_NAME { $$ = grub_script_add_arglist (state, 0, $1); }
+ | GRUB_PARSER_TOKEN_WORD { $$ = grub_script_add_arglist (state, 0, $1); }
+;
+
+statement: command { $$ = $1; }
+ | function { $$ = 0; }
+;
+
+argument : "case" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "do" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "done" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "elif" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "else" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "esac" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "fi" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "for" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "if" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "in" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "select" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "then" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "until" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "while" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "function" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | "time" { $$ = grub_script_add_arglist (state, 0, $1); }
+ | word { $$ = $1; }
+;
+
+/*
+ Block parameter is passed to commands in two forms: as unparsed
+ string and as pre-parsed grub_script object. Passing as grub_script
+ object makes memory management difficult, because:
+
+ (1) Command may want to keep a reference to grub_script objects for
+ later use, so script framework may not free the grub_script
+ object after command completes.
+
+ (2) Command may get called multiple times with same grub_script
+ object under loops, so we should not let command implementation
+ to free the grub_script object.
+
+ To solve above problems, we rely on reference counting for
+ grub_script objects. Commands that want to keep the grub_script
+ object must take a reference to it.
+
+ Other complexity comes with arbitrary nesting of grub_script
+ objects: a grub_script object may have commands with several block
+ parameters, and each block parameter may further contain multiple
+ block parameters nested. We use temporary variable, state->scripts
+ to collect nested child scripts (that are linked by siblings and
+ children members), and will build grub_scripts tree from bottom.
+ */
+block: "{"
+ {
+ grub_script_lexer_ref (state->lexerstate);
+ $<offset>$ = grub_script_lexer_record_start (state);
+ $<memory>$ = grub_script_mem_record (state);
+
+ /* save currently known scripts. */
+ $<scripts>$ = state->scripts;
+ state->scripts = 0;
+ }
+ commands1 delimiters0 "}"
+ {
+ char *p;
+ struct grub_script_mem *memory;
+ struct grub_script *s = $<scripts>2;
+
+ memory = grub_script_mem_record_stop (state, $<memory>2);
+ if ((p = grub_script_lexer_record_stop (state, $<offset>2)))
+ *grub_strrchr (p, '}') = '\0';
+
+ $$ = grub_script_arg_add (state, 0, GRUB_SCRIPT_ARG_TYPE_BLOCK, p);
+ if (! $$ || ! ($$->script = grub_script_create ($3, memory)))
+ grub_script_mem_free (memory);
+
+ else {
+ /* attach nested scripts to $$->script as children */
+ $$->script->children = state->scripts;
+
+ /* restore old scripts; append $$->script to siblings. */
+ state->scripts = $<scripts>2 ?: $$->script;
+ if (s) {
+ while (s->next_siblings)
+ s = s->next_siblings;
+ s->next_siblings = $$->script;
+ }
+ }
+
+ grub_script_lexer_deref (state->lexerstate);
+ }
+;
+block0: /* Empty */ { $$ = 0; }
+ | block { $$ = $1; }
+;
+
+arguments0: /* Empty */ { $$ = 0; }
+ | arguments1 { $$ = $1; }
+;
+arguments1: argument arguments0
+ {
+ if ($1 && $2)
+ {
+ $1->next = $2;
+ $1->argcount += $2->argcount;
+ $2->argcount = 0;
+ }
+ $$ = $1;
+ }
+;
+
+grubcmd: word arguments0 block0
+ {
+ struct grub_script_arglist *x = $2;
+
+ if ($3)
+ x = grub_script_add_arglist (state, $2, $3);
+
+ if ($1 && x) {
+ $1->next = x;
+ $1->argcount += x->argcount;
+ x->argcount = 0;
+ }
+ $$ = grub_script_create_cmdline (state, $1);
+ }
+;
+
+/* A single command. */
+command: grubcmd { $$ = $1; }
+ | ifcmd { $$ = $1; }
+ | forcmd { $$ = $1; }
+ | whilecmd { $$ = $1; }
+ | untilcmd { $$ = $1; }
+;
+
+/* A list of commands. */
+commands1: newlines0 command
+ {
+ $$ = grub_script_append_cmd (state, 0, $2);
+ }
+ | commands1 delimiters1 command
+ {
+ $$ = grub_script_append_cmd (state, $1, $3);
+ }
+;
+
+function: "function" "name"
+ {
+ grub_script_lexer_ref (state->lexerstate);
+ state->func_mem = grub_script_mem_record (state);
+
+ $<scripts>$ = state->scripts;
+ state->scripts = 0;
+ }
+ delimiters0 "{" commands1 delimiters1 "}"
+ {
+ struct grub_script *script;
+ state->func_mem = grub_script_mem_record_stop (state,
+ state->func_mem);
+ script = grub_script_create ($6, state->func_mem);
+ if (! script)
+ grub_script_mem_free (state->func_mem);
+ else {
+ script->children = state->scripts;
+ grub_script_function_create ($2, script);
+ }
+
+ state->scripts = $<scripts>3;
+ grub_script_lexer_deref (state->lexerstate);
+ }
+;
+
+ifcmd: "if"
+ {
+ grub_script_lexer_ref (state->lexerstate);
+ }
+ ifclause "fi"
+ {
+ $$ = $3;
+ grub_script_lexer_deref (state->lexerstate);
+ }
+;
+ifclause: commands1 delimiters1 "then" commands1 delimiters1
+ {
+ $$ = grub_script_create_cmdif (state, $1, $4, 0);
+ }
+ | commands1 delimiters1 "then" commands1 delimiters1 "else" commands1 delimiters1
+ {
+ $$ = grub_script_create_cmdif (state, $1, $4, $7);
+ }
+ | commands1 delimiters1 "then" commands1 delimiters1 "elif" ifclause
+ {
+ $$ = grub_script_create_cmdif (state, $1, $4, $7);
+ }
+;
+
+forcmd: "for" "name"
+ {
+ grub_script_lexer_ref (state->lexerstate);
+ }
+ "in" arguments0 delimiters1 "do" commands1 delimiters1 "done"
+ {
+ $$ = grub_script_create_cmdfor (state, $2, $5, $8);
+ grub_script_lexer_deref (state->lexerstate);
+ }
+;
+
+whilecmd: "while"
+ {
+ grub_script_lexer_ref (state->lexerstate);
+ }
+ commands1 delimiters1 "do" commands1 delimiters1 "done"
+ {
+ $$ = grub_script_create_cmdwhile (state, $3, $6, 0);
+ grub_script_lexer_deref (state->lexerstate);
+ }
+;
+
+untilcmd: "until"
+ {
+ grub_script_lexer_ref (state->lexerstate);
+ }
+ commands1 delimiters1 "do" commands1 delimiters1 "done"
+ {
+ $$ = grub_script_create_cmdwhile (state, $3, $6, 1);
+ grub_script_lexer_deref (state->lexerstate);
+ }
+;
diff --git a/grub-core/script/script.c b/grub-core/script/script.c
new file mode 100644
index 0000000..ad30183
--- /dev/null
+++ b/grub-core/script/script.c
@@ -0,0 +1,394 @@
+/* script.c -- Functions to create an in memory description of the script. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/misc.h>
+#include <grub/script_sh.h>
+#include <grub/parser.h>
+#include <grub/mm.h>
+
+/* It is not possible to deallocate the memory when a syntax error was
+ found. Because of that it is required to keep track of all memory
+ allocations. The memory is freed in case of an error, or assigned
+ to the parsed script when parsing was successful.
+
+ In case of the normal malloc, some additional bytes are allocated
+ for this datastructure. All reserved memory is stored in a linked
+ list so it can be easily freed. The original memory can be found
+ from &mem. */
+struct grub_script_mem
+{
+ struct grub_script_mem *next;
+ char mem;
+};
+
+/* Return malloc'ed memory and keep track of the allocation. */
+void *
+grub_script_malloc (struct grub_parser_param *state, grub_size_t size)
+{
+ struct grub_script_mem *mem;
+ mem = (struct grub_script_mem *) grub_malloc (size + sizeof (*mem)
+ - sizeof (char));
+ if (!mem)
+ return 0;
+
+ grub_dprintf ("scripting", "malloc %p\n", mem);
+ mem->next = state->memused;
+ state->memused = mem;
+ return (void *) &mem->mem;
+}
+
+/* Free all memory described by MEM. */
+void
+grub_script_mem_free (struct grub_script_mem *mem)
+{
+ struct grub_script_mem *memfree;
+
+ while (mem)
+ {
+ memfree = mem->next;
+ grub_dprintf ("scripting", "free %p\n", mem);
+ grub_free (mem);
+ mem = memfree;
+ }
+}
+
+/* Start recording memory usage. Returns the memory that should be
+ restored when calling stop. */
+struct grub_script_mem *
+grub_script_mem_record (struct grub_parser_param *state)
+{
+ struct grub_script_mem *mem = state->memused;
+ state->memused = 0;
+
+ return mem;
+}
+
+/* Stop recording memory usage. Restore previous recordings using
+ RESTORE. Return the recorded memory. */
+struct grub_script_mem *
+grub_script_mem_record_stop (struct grub_parser_param *state,
+ struct grub_script_mem *restore)
+{
+ struct grub_script_mem *mem = state->memused;
+ state->memused = restore;
+ return mem;
+}
+
+/* Free the memory reserved for CMD and all of it's children. */
+void
+grub_script_free (struct grub_script *script)
+{
+ struct grub_script *s;
+ struct grub_script *t;
+
+ if (! script)
+ return;
+
+ if (script->mem)
+ grub_script_mem_free (script->mem);
+
+ s = script->children;
+ while (s) {
+ t = s->next_siblings;
+ grub_script_unref (s);
+ s = t;
+ }
+ grub_free (script);
+}
+
+
+
+/* Extend the argument arg with a variable or string of text. If ARG
+ is zero a new list is created. */
+struct grub_script_arg *
+grub_script_arg_add (struct grub_parser_param *state,
+ struct grub_script_arg *arg, grub_script_arg_type_t type,
+ char *str)
+{
+ struct grub_script_arg *argpart;
+ struct grub_script_arg *ll;
+ int len;
+
+ argpart =
+ (struct grub_script_arg *) grub_script_malloc (state, sizeof (*arg));
+ if (!argpart)
+ return arg;
+
+ argpart->type = type;
+ argpart->script = 0;
+
+ len = grub_strlen (str) + 1;
+ argpart->str = grub_script_malloc (state, len);
+ if (!argpart->str)
+ return arg; /* argpart is freed later, during grub_script_free. */
+
+ grub_memcpy (argpart->str, str, len);
+ argpart->next = 0;
+
+ if (!arg)
+ return argpart;
+
+ for (ll = arg; ll->next; ll = ll->next);
+ ll->next = argpart;
+
+ return arg;
+}
+
+/* Add the argument ARG to the end of the argument list LIST. If LIST
+ is zero, a new list will be created. */
+struct grub_script_arglist *
+grub_script_add_arglist (struct grub_parser_param *state,
+ struct grub_script_arglist *list,
+ struct grub_script_arg *arg)
+{
+ struct grub_script_arglist *link;
+ struct grub_script_arglist *ll;
+
+ grub_dprintf ("scripting", "arglist\n");
+
+ link =
+ (struct grub_script_arglist *) grub_script_malloc (state, sizeof (*link));
+ if (!link)
+ return list;
+
+ link->next = 0;
+ link->arg = arg;
+ link->argcount = 0;
+
+ if (!list)
+ {
+ link->argcount++;
+ return link;
+ }
+
+ list->argcount++;
+
+ /* Look up the last link in the chain. */
+ for (ll = list; ll->next; ll = ll->next);
+ ll->next = link;
+
+ return list;
+}
+
+/* Create a command that describes a single command line. CMDLINE
+ contains the name of the command that should be executed. ARGLIST
+ holds all arguments for this command. */
+struct grub_script_cmd *
+grub_script_create_cmdline (struct grub_parser_param *state,
+ struct grub_script_arglist *arglist)
+{
+ struct grub_script_cmdline *cmd;
+
+ grub_dprintf ("scripting", "cmdline\n");
+
+ cmd = grub_script_malloc (state, sizeof (*cmd));
+ if (!cmd)
+ return 0;
+
+ cmd->cmd.exec = grub_script_execute_cmdline;
+ cmd->cmd.next = 0;
+ cmd->arglist = arglist;
+
+ return (struct grub_script_cmd *) cmd;
+}
+
+/* Create a command that functions as an if statement. If BOOL is
+ evaluated to true (the value is returned in envvar '?'), the
+ interpreter will run the command TRUE, otherwise the interpreter
+ runs the command FALSE. */
+struct grub_script_cmd *
+grub_script_create_cmdif (struct grub_parser_param *state,
+ struct grub_script_cmd *exec_to_evaluate,
+ struct grub_script_cmd *exec_on_true,
+ struct grub_script_cmd *exec_on_false)
+{
+ struct grub_script_cmdif *cmd;
+
+ grub_dprintf ("scripting", "cmdif\n");
+
+ cmd = grub_script_malloc (state, sizeof (*cmd));
+ if (!cmd)
+ return 0;
+
+ cmd->cmd.exec = grub_script_execute_cmdif;
+ cmd->cmd.next = 0;
+ cmd->exec_to_evaluate = exec_to_evaluate;
+ cmd->exec_on_true = exec_on_true;
+ cmd->exec_on_false = exec_on_false;
+
+ return (struct grub_script_cmd *) cmd;
+}
+
+/* Create a command that functions as a for statement. */
+struct grub_script_cmd *
+grub_script_create_cmdfor (struct grub_parser_param *state,
+ struct grub_script_arg *name,
+ struct grub_script_arglist *words,
+ struct grub_script_cmd *list)
+{
+ struct grub_script_cmdfor *cmd;
+
+ grub_dprintf ("scripting", "cmdfor\n");
+
+ cmd = grub_script_malloc (state, sizeof (*cmd));
+ if (! cmd)
+ return 0;
+
+ cmd->cmd.exec = grub_script_execute_cmdfor;
+ cmd->cmd.next = 0;
+ cmd->name = name;
+ cmd->words = words;
+ cmd->list = list;
+
+ return (struct grub_script_cmd *) cmd;
+}
+
+/* Create a "while" or "until" command. */
+struct grub_script_cmd *
+grub_script_create_cmdwhile (struct grub_parser_param *state,
+ struct grub_script_cmd *cond,
+ struct grub_script_cmd *list,
+ int is_an_until_loop)
+{
+ struct grub_script_cmdwhile *cmd;
+
+ cmd = grub_script_malloc (state, sizeof (*cmd));
+ if (! cmd)
+ return 0;
+
+ cmd->cmd.exec = grub_script_execute_cmdwhile;
+ cmd->cmd.next = 0;
+ cmd->cond = cond;
+ cmd->list = list;
+ cmd->until = is_an_until_loop;
+
+ return (struct grub_script_cmd *) cmd;
+}
+
+/* Create a chain of commands. LAST contains the command that should
+ be added at the end of LIST's list. If LIST is zero, a new list
+ will be created. */
+struct grub_script_cmd *
+grub_script_append_cmd (struct grub_parser_param *state,
+ struct grub_script_cmd *list,
+ struct grub_script_cmd *last)
+{
+ struct grub_script_cmd *ptr;
+
+ grub_dprintf ("scripting", "append command\n");
+
+ if (! last)
+ return list;
+
+ if (! list)
+ {
+ list = grub_script_malloc (state, sizeof (*list));
+ if (! list)
+ return 0;
+
+ list->exec = grub_script_execute_cmdlist;
+ list->next = last;
+ }
+ else
+ {
+ ptr = list;
+ while (ptr->next)
+ ptr = ptr->next;
+
+ ptr->next = last;
+ }
+
+ return list;
+}
+
+
+
+struct grub_script *
+grub_script_create (struct grub_script_cmd *cmd, struct grub_script_mem *mem)
+{
+ struct grub_script *parsed;
+
+ parsed = grub_malloc (sizeof (*parsed));
+ if (! parsed)
+ return 0;
+
+ parsed->mem = mem;
+ parsed->cmd = cmd;
+ parsed->refcnt = 0;
+ parsed->children = 0;
+ parsed->next_siblings = 0;
+
+ return parsed;
+}
+
+/* Parse the script passed in SCRIPT and return the parsed
+ datastructure that is ready to be interpreted. */
+struct grub_script *
+grub_script_parse (char *script, grub_reader_getline_t getline)
+{
+ struct grub_script *parsed;
+ struct grub_script_mem *membackup;
+ struct grub_lexer_param *lexstate;
+ struct grub_parser_param *parsestate;
+
+ parsed = grub_script_create (0, 0);
+ if (!parsed)
+ return 0;
+
+ parsestate = grub_zalloc (sizeof (*parsestate));
+ if (!parsestate)
+ {
+ grub_free (parsed);
+ return 0;
+ }
+
+ /* Initialize the lexer. */
+ lexstate = grub_script_lexer_init (parsestate, script, getline);
+ if (!lexstate)
+ {
+ grub_free (parsed);
+ grub_free (parsestate);
+ return 0;
+ }
+
+ parsestate->lexerstate = lexstate;
+
+ membackup = grub_script_mem_record (parsestate);
+
+ /* Parse the script. */
+ if (grub_script_yyparse (parsestate) || parsestate->err)
+ {
+ struct grub_script_mem *memfree;
+ memfree = grub_script_mem_record_stop (parsestate, membackup);
+ grub_script_mem_free (memfree);
+ grub_script_lexer_fini (lexstate);
+ grub_free (parsestate);
+ grub_free (parsed);
+ return 0;
+ }
+
+ parsed->mem = grub_script_mem_record_stop (parsestate, membackup);
+ parsed->cmd = parsestate->parsed;
+ parsed->children = parsestate->scripts;
+
+ grub_script_lexer_fini (lexstate);
+ grub_free (parsestate);
+
+ return parsed;
+}
diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
new file mode 100644
index 0000000..53ae4c5
--- /dev/null
+++ b/grub-core/script/yylex.l
@@ -0,0 +1,368 @@
+%{
+/* yylex.l The scripting lexer. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/parser.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/script_sh.h>
+#include "grub_script.tab.h"
+
+#define yyfree grub_lexer_yyfree
+#define yyalloc grub_lexer_yyalloc
+#define yyrealloc grub_lexer_yyrealloc
+
+/*
+ * As we don't have access to yyscanner, we cannot do much except to
+ * print the fatal error.
+ */
+#define YY_FATAL_ERROR(msg) \
+ do { \
+ grub_printf ("fatal error: %s\n", msg); \
+ } while (0)
+
+#define COPY(str, hint) \
+ do { \
+ copy_string (yyextra, str, hint); \
+ } while (0)
+
+
+#define RECORD \
+ do { \
+ grub_script_lexer_record (yyextra, yytext); \
+ } while (0)
+
+#define ARG(t) \
+ do { \
+ yyextra->lexerstate->type = t; \
+ return GRUB_PARSER_TOKEN_WORD; \
+ } while (0)
+
+/* We don't need YY_INPUT, as we rely on yy_scan_strings */
+#define YY_INPUT(buf,res,max) do { res = 0; } while (0)
+
+/* forward declarations */
+static int grub_lexer_unput (const char *input, yyscan_t yyscanner);
+static int grub_lexer_resplit (const char *input, yyscan_t yyscanner);
+
+static void grub_lexer_yyfree (void *, yyscan_t yyscanner);
+static void* grub_lexer_yyalloc (yy_size_t, yyscan_t yyscanner);
+static void* grub_lexer_yyrealloc (void*, yy_size_t, yyscan_t yyscanner);
+static void copy_string (struct grub_parser_param *, const char *,
+ unsigned hint);
+
+%}
+
+%top{
+
+#include <config.h>
+
+#include <sys/types.h>
+
+typedef size_t yy_size_t;
+#define YY_TYPEDEF_YY_SIZE_T 1
+
+/*
+ * Some flex hacks for -nostdinc; XXX We need to fix these when libc
+ * support becomes availble in GRUB.
+ */
+
+#ifndef GRUB_UTIL
+#define stdin 0
+#define stdout 0
+
+#define fprintf(...) 0
+#define exit(...)
+#endif
+
+}
+
+%option ecs
+%option meta-ecs
+
+%option warn
+%option array
+%option stack
+%option reentrant
+%option bison-bridge
+%option never-interactive
+
+%option noyyfree noyyalloc noyyrealloc
+%option nounistd nostdinit nodefault noyylineno
+
+/* Reduce lexer size, by not defining these. */
+%option noyy_top_state
+%option noinput nounput
+%option noyyget_in noyyset_in
+%option noyyget_out noyyset_out
+%option noyyget_debug noyyset_debug
+%option noyyget_lineno noyyset_lineno
+
+%option extra-type="struct grub_parser_param*"
+
+BLANK [ \t]
+COMMENT #.*$
+
+CHAR [^{}|&$;<> \t\n\'\"\\]
+DIGITS [[:digit:]]+
+NAME [[:alpha:]_][[:alnum:]_]*
+
+ESC \\(.|\n)
+SQCHR [^\']
+DQCHR {ESC}|[^\\\"]
+DQSTR \"{DQCHR}*\"
+SQSTR \'{SQCHR}*\'
+SPECIAL \?|\#|\*|\@
+VARIABLE ${NAME}|$\{{NAME}\}|${DIGITS}|$\{{DIGITS}\}|${SPECIAL}|$\{{SPECIAL}\}
+WORD ({CHAR}|{DQSTR}|{SQSTR}|{ESC}|{VARIABLE})+
+
+MULTILINE {WORD}?((\"{DQCHR}*)|(\'{SQCHR}*)|(\\\n))
+
+%x SPLIT
+%x DQUOTE
+%x SQUOTE
+%x VAR
+
+%%
+
+ /* White spaces */
+{BLANK}+ { RECORD; }
+{COMMENT} { RECORD; }
+
+ /* Special symbols */
+"\n" { RECORD; return GRUB_PARSER_TOKEN_NEWLINE; }
+"||" { RECORD; return GRUB_PARSER_TOKEN_OR; }
+"&&" { RECORD; return GRUB_PARSER_TOKEN_AND; }
+";;" { RECORD; return GRUB_PARSER_TOKEN_SEMI2; }
+"|" { RECORD; return GRUB_PARSER_TOKEN_PIPE; }
+"&" { RECORD; return GRUB_PARSER_TOKEN_AMP; }
+";" { RECORD; return GRUB_PARSER_TOKEN_SEMI; }
+"<" { RECORD; return GRUB_PARSER_TOKEN_LT; }
+">" { RECORD; return GRUB_PARSER_TOKEN_GT; }
+
+ /* Reserved words */
+"{" { RECORD; return GRUB_PARSER_TOKEN_LBR; }
+"}" { RECORD; return GRUB_PARSER_TOKEN_RBR; }
+"[[" { RECORD; return GRUB_PARSER_TOKEN_RSQBR2; }
+"]]" { RECORD; return GRUB_PARSER_TOKEN_LSQBR2; }
+"time" { RECORD; return GRUB_PARSER_TOKEN_TIME; }
+"case" { RECORD; return GRUB_PARSER_TOKEN_CASE; }
+"do" { RECORD; return GRUB_PARSER_TOKEN_DO; }
+"done" { RECORD; return GRUB_PARSER_TOKEN_DONE; }
+"elif" { RECORD; return GRUB_PARSER_TOKEN_ELIF; }
+"else" { RECORD; return GRUB_PARSER_TOKEN_ELSE; }
+"esac" { RECORD; return GRUB_PARSER_TOKEN_ESAC; }
+"fi" { RECORD; return GRUB_PARSER_TOKEN_FI; }
+"for" { RECORD; return GRUB_PARSER_TOKEN_FOR; }
+"if" { RECORD; return GRUB_PARSER_TOKEN_IF; }
+"in" { RECORD; return GRUB_PARSER_TOKEN_IN; }
+"select" { RECORD; return GRUB_PARSER_TOKEN_SELECT; }
+"then" { RECORD; return GRUB_PARSER_TOKEN_THEN; }
+"until" { RECORD; return GRUB_PARSER_TOKEN_UNTIL; }
+"while" { RECORD; return GRUB_PARSER_TOKEN_WHILE; }
+"function" { RECORD; return GRUB_PARSER_TOKEN_FUNCTION; }
+
+{MULTILINE} {
+ if (grub_lexer_unput (yytext, yyscanner))
+ return GRUB_PARSER_TOKEN_BAD;
+ }
+
+{NAME} { RECORD; return GRUB_PARSER_TOKEN_NAME; }
+{WORD} {
+ RECORD;
+ yypush_buffer_state (YY_CURRENT_BUFFER, yyscanner);
+ if (grub_lexer_resplit (yytext, yyscanner))
+ {
+ yypop_buffer_state (yyscanner);
+ return GRUB_PARSER_TOKEN_WORD;
+ }
+ yyextra->lexerstate->resplit = 1;
+ }
+. {
+ grub_script_yyerror (yyextra, yytext);
+ return GRUB_PARSER_TOKEN_BAD;
+ }
+
+ /* Split word into multiple args */
+
+<SPLIT>{
+ \\. { COPY (yytext + 1, yyleng - 1); }
+ \\\n { /* ignore */ }
+ \" {
+ yy_push_state (DQUOTE, yyscanner);
+ ARG (GRUB_SCRIPT_ARG_TYPE_TEXT);
+ }
+ \' {
+ yy_push_state (SQUOTE, yyscanner);
+ ARG (GRUB_SCRIPT_ARG_TYPE_TEXT);
+ }
+ \$ {
+ yy_push_state (VAR, yyscanner);
+ ARG (GRUB_SCRIPT_ARG_TYPE_TEXT);
+ }
+ \\ |
+ [^\"\'\$\\]+ { COPY (yytext, yyleng); }
+ <<EOF>> {
+ yy_pop_state (yyscanner);
+ yypop_buffer_state (yyscanner);
+ yyextra->lexerstate->resplit = 0;
+ yyextra->lexerstate->merge_end = 1;
+ ARG (GRUB_SCRIPT_ARG_TYPE_TEXT);
+ }
+}
+
+<VAR>{
+ {SPECIAL} |
+ {DIGITS} |
+ {NAME} {
+ COPY (yytext, yyleng);
+ yy_pop_state (yyscanner);
+ if (YY_START == SPLIT)
+ ARG (GRUB_SCRIPT_ARG_TYPE_VAR);
+ else
+ ARG (GRUB_SCRIPT_ARG_TYPE_DQVAR);
+ }
+ \{{SPECIAL}\} |
+ \{{DIGITS}\} |
+ \{{NAME}\} {
+ yytext[yyleng - 1] = '\0';
+ COPY (yytext + 1, yyleng - 2);
+ yy_pop_state (yyscanner);
+ if (YY_START == SPLIT)
+ ARG (GRUB_SCRIPT_ARG_TYPE_VAR);
+ else
+ ARG (GRUB_SCRIPT_ARG_TYPE_DQVAR);
+ }
+ .|\n { return GRUB_PARSER_TOKEN_BAD; }
+}
+
+<SQUOTE>{
+ \' {
+ yy_pop_state (yyscanner);
+ ARG (GRUB_SCRIPT_ARG_TYPE_SQSTR);
+ }
+ [^\']+ { COPY (yytext, yyleng); }
+}
+
+<DQUOTE>{
+ \\\$ { COPY ("$", 1); }
+ \\\\ { COPY ("\\", 1); }
+ \\\" { COPY ("\"", 1); }
+ \\\n { /* ignore */ }
+ [^\"\$\\\n]+ { COPY (yytext, yyleng); }
+ \" {
+ yy_pop_state (yyscanner);
+ ARG (GRUB_SCRIPT_ARG_TYPE_DQSTR);
+ }
+ \$ {
+ yy_push_state (VAR, yyscanner);
+ ARG (GRUB_SCRIPT_ARG_TYPE_DQSTR);
+ }
+ (.|\n) { COPY (yytext, yyleng); }
+}
+
+<<EOF>> {
+ yypop_buffer_state (yyscanner);
+ yyextra->lexerstate->eof = 1;
+ return GRUB_PARSER_TOKEN_EOF;
+ }
+%%
+
+int
+yywrap (yyscan_t yyscanner)
+{
+ if (yyget_extra (yyscanner)->lexerstate->resplit)
+ return 1;
+
+ return grub_script_lexer_yywrap (yyget_extra (yyscanner), 0);
+}
+
+static void
+grub_lexer_yyfree (void *ptr, yyscan_t yyscanner __attribute__ ((unused)))
+{
+ grub_free(ptr);
+}
+
+static void*
+grub_lexer_yyalloc (yy_size_t size, yyscan_t yyscanner __attribute__ ((unused)))
+{
+ return grub_malloc (size);
+}
+
+static void*
+grub_lexer_yyrealloc (void *ptr, yy_size_t size,
+ yyscan_t yyscanner __attribute__ ((unused)))
+{
+ return grub_realloc (ptr, size);
+}
+
+static void copy_string (struct grub_parser_param *parser, const char *str, unsigned hint)
+{
+ int size;
+ char *ptr;
+ unsigned len;
+
+ len = hint ? hint : grub_strlen (str);
+ if (parser->lexerstate->used + len >= parser->lexerstate->size)
+ {
+ size = grub_max (len, parser->lexerstate->size) * 2;
+ ptr = grub_realloc (parser->lexerstate->text, size);
+ if (!ptr)
+ {
+ grub_script_yyerror (parser, 0);
+ return;
+ }
+
+ parser->lexerstate->text = ptr;
+ parser->lexerstate->size = size;
+ }
+ grub_strcpy (parser->lexerstate->text + parser->lexerstate->used - 1, str);
+ parser->lexerstate->used += len;
+}
+
+static int
+grub_lexer_resplit (const char *text, yyscan_t yyscanner)
+{
+ /* resplit text */
+ if (yy_scan_string (text, yyscanner))
+ {
+ yyget_extra (yyscanner)->lexerstate->merge_start = 1;
+ yy_push_state (SPLIT, yyscanner);
+ return 0;
+ }
+ grub_script_yyerror (yyget_extra (yyscanner), 0);
+ return 1;
+}
+
+static int
+grub_lexer_unput (const char *text, yyscan_t yyscanner)
+{
+ struct grub_lexer_param *lexerstate = yyget_extra (yyscanner)->lexerstate;
+
+ if (lexerstate->prefix)
+ grub_free (lexerstate->prefix);
+
+ lexerstate->prefix = grub_strdup (text);
+ if (! lexerstate->prefix)
+ {
+ grub_script_yyerror (yyget_extra (yyscanner), "out of memory");
+ return 1;
+ }
+ return 0;
+}
diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
new file mode 100644
index 0000000..f0f346b
--- /dev/null
+++ b/grub-core/term/at_keyboard.c
@@ -0,0 +1,638 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/at_keyboard.h>
+#include <grub/cpu/at_keyboard.h>
+#include <grub/cpu/io.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/keyboard_layouts.h>
+#include <grub/time.h>
+#include <grub/loader.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static short at_keyboard_status = 0;
+static int e0_received = 0;
+static int f0_received = 0;
+
+static grub_uint8_t led_status;
+
+#define KEYBOARD_LED_SCROLL (1 << 0)
+#define KEYBOARD_LED_NUM (1 << 1)
+#define KEYBOARD_LED_CAPS (1 << 2)
+
+static grub_uint8_t grub_keyboard_controller_orig;
+static grub_uint8_t grub_keyboard_orig_set;
+static grub_uint8_t current_set;
+
+static const grub_uint8_t set1_mapping[128] =
+ {
+ /* 0x00 */ 0 /* Unused */, GRUB_KEYBOARD_KEY_ESCAPE,
+ /* 0x02 */ GRUB_KEYBOARD_KEY_1, GRUB_KEYBOARD_KEY_2,
+ /* 0x04 */ GRUB_KEYBOARD_KEY_3, GRUB_KEYBOARD_KEY_4,
+ /* 0x06 */ GRUB_KEYBOARD_KEY_5, GRUB_KEYBOARD_KEY_6,
+ /* 0x08 */ GRUB_KEYBOARD_KEY_7, GRUB_KEYBOARD_KEY_8,
+ /* 0x0a */ GRUB_KEYBOARD_KEY_9, GRUB_KEYBOARD_KEY_0,
+ /* 0x0c */ GRUB_KEYBOARD_KEY_DASH, GRUB_KEYBOARD_KEY_EQUAL,
+ /* 0x0e */ GRUB_KEYBOARD_KEY_BACKSPACE, GRUB_KEYBOARD_KEY_TAB,
+ /* 0x10 */ GRUB_KEYBOARD_KEY_Q, GRUB_KEYBOARD_KEY_W,
+ /* 0x12 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_R,
+ /* 0x14 */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_Y,
+ /* 0x16 */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_I,
+ /* 0x18 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_P,
+ /* 0x1a */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_RBRACKET,
+ /* 0x1c */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_LEFT_CTRL,
+ /* 0x1e */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_S,
+ /* 0x20 */ GRUB_KEYBOARD_KEY_D, GRUB_KEYBOARD_KEY_F,
+ /* 0x22 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_H,
+ /* 0x24 */ GRUB_KEYBOARD_KEY_J, GRUB_KEYBOARD_KEY_K,
+ /* 0x26 */ GRUB_KEYBOARD_KEY_L, GRUB_KEYBOARD_KEY_SEMICOLON,
+ /* 0x28 */ GRUB_KEYBOARD_KEY_DQUOTE, GRUB_KEYBOARD_KEY_RQUOTE,
+ /* 0x2a */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, GRUB_KEYBOARD_KEY_BACKSLASH,
+ /* 0x2c */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_X,
+ /* 0x2e */ GRUB_KEYBOARD_KEY_C, GRUB_KEYBOARD_KEY_V,
+ /* 0x30 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_N,
+ /* 0x32 */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_COMMA,
+ /* 0x34 */ GRUB_KEYBOARD_KEY_DOT, GRUB_KEYBOARD_KEY_SLASH,
+ /* 0x36 */ GRUB_KEYBOARD_KEY_RIGHT_SHIFT, GRUB_KEYBOARD_KEY_NUMMUL,
+ /* 0x38 */ GRUB_KEYBOARD_KEY_LEFT_ALT, GRUB_KEYBOARD_KEY_SPACE,
+ /* 0x3a */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_F1,
+ /* 0x3c */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F3,
+ /* 0x3e */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_F5,
+ /* 0x40 */ GRUB_KEYBOARD_KEY_F6, GRUB_KEYBOARD_KEY_F7,
+ /* 0x42 */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F9,
+ /* 0x44 */ GRUB_KEYBOARD_KEY_F10, GRUB_KEYBOARD_KEY_NUM_LOCK,
+ /* 0x46 */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, GRUB_KEYBOARD_KEY_NUM7,
+ /* 0x48 */ GRUB_KEYBOARD_KEY_NUM8, GRUB_KEYBOARD_KEY_NUM9,
+ /* 0x4a */ GRUB_KEYBOARD_KEY_NUMMINUS, GRUB_KEYBOARD_KEY_NUM4,
+ /* 0x4c */ GRUB_KEYBOARD_KEY_NUM5, GRUB_KEYBOARD_KEY_NUM6,
+ /* 0x4e */ GRUB_KEYBOARD_KEY_NUMPLUS, GRUB_KEYBOARD_KEY_NUM1,
+ /* 0x50 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM3,
+ /* 0x52 */ GRUB_KEYBOARD_KEY_NUMDOT, GRUB_KEYBOARD_KEY_NUMDOT,
+ /* 0x54 */ 0, 0,
+ /* 0x56 */ GRUB_KEYBOARD_KEY_102ND, GRUB_KEYBOARD_KEY_F11,
+ /* 0x58 */ GRUB_KEYBOARD_KEY_F12, 0,
+ /* 0x5a */ 0, 0,
+ /* 0x5c */ 0, 0,
+ /* 0x5e */ 0, 0,
+ /* 0x60 */ 0, 0,
+ /* 0x62 */ 0, 0,
+ /* OLPC keys. Just mapped to normal keys. */
+ /* 0x64 */ 0, GRUB_KEYBOARD_KEY_UP,
+ /* 0x66 */ GRUB_KEYBOARD_KEY_DOWN, GRUB_KEYBOARD_KEY_LEFT,
+ /* 0x68 */ GRUB_KEYBOARD_KEY_RIGHT
+ };
+
+static const struct
+{
+ grub_uint8_t from, to;
+} set1_e0_mapping[] =
+ {
+ {0x1c, GRUB_KEYBOARD_KEY_NUMENTER},
+ {0x1d, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
+ {0x35, GRUB_KEYBOARD_KEY_NUMSLASH },
+ {0x38, GRUB_KEYBOARD_KEY_RIGHT_ALT},
+ {0x47, GRUB_KEYBOARD_KEY_HOME},
+ {0x48, GRUB_KEYBOARD_KEY_UP},
+ {0x49, GRUB_KEYBOARD_KEY_PPAGE},
+ {0x4b, GRUB_KEYBOARD_KEY_LEFT},
+ {0x4d, GRUB_KEYBOARD_KEY_RIGHT},
+ {0x4f, GRUB_KEYBOARD_KEY_END},
+ {0x50, GRUB_KEYBOARD_KEY_DOWN},
+ {0x51, GRUB_KEYBOARD_KEY_NPAGE},
+ {0x52, GRUB_KEYBOARD_KEY_INSERT},
+ {0x53, GRUB_KEYBOARD_KEY_DELETE},
+ };
+
+static const grub_uint8_t set2_mapping[256] =
+ {
+ /* 0x00 */ 0, GRUB_KEYBOARD_KEY_F9,
+ /* 0x02 */ 0, GRUB_KEYBOARD_KEY_F5,
+ /* 0x04 */ GRUB_KEYBOARD_KEY_F3, GRUB_KEYBOARD_KEY_F1,
+ /* 0x06 */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F12,
+ /* 0x08 */ 0, GRUB_KEYBOARD_KEY_F10,
+ /* 0x0a */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F6,
+ /* 0x0c */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_TAB,
+ /* 0x0e */ GRUB_KEYBOARD_KEY_RQUOTE, 0,
+ /* 0x10 */ 0, GRUB_KEYBOARD_KEY_LEFT_ALT,
+ /* 0x12 */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, 0,
+ /* 0x14 */ GRUB_KEYBOARD_KEY_LEFT_CTRL, GRUB_KEYBOARD_KEY_Q,
+ /* 0x16 */ GRUB_KEYBOARD_KEY_1, 0,
+ /* 0x18 */ 0, 0,
+ /* 0x1a */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_S,
+ /* 0x1c */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_W,
+ /* 0x1e */ GRUB_KEYBOARD_KEY_2, 0,
+ /* 0x20 */ 0, GRUB_KEYBOARD_KEY_C,
+ /* 0x22 */ GRUB_KEYBOARD_KEY_X, GRUB_KEYBOARD_KEY_D,
+ /* 0x24 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_4,
+ /* 0x26 */ GRUB_KEYBOARD_KEY_3, 0,
+ /* 0x28 */ 0, GRUB_KEYBOARD_KEY_SPACE,
+ /* 0x2a */ GRUB_KEYBOARD_KEY_V, GRUB_KEYBOARD_KEY_F,
+ /* 0x2c */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_R,
+ /* 0x2e */ GRUB_KEYBOARD_KEY_5, 0,
+ /* 0x30 */ 0, GRUB_KEYBOARD_KEY_N,
+ /* 0x32 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_H,
+ /* 0x34 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_Y,
+ /* 0x36 */ GRUB_KEYBOARD_KEY_6, 0,
+ /* 0x38 */ 0, 0,
+ /* 0x3a */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_J,
+ /* 0x3c */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_7,
+ /* 0x3e */ GRUB_KEYBOARD_KEY_8, 0,
+ /* 0x40 */ 0, GRUB_KEYBOARD_KEY_COMMA,
+ /* 0x42 */ GRUB_KEYBOARD_KEY_K, GRUB_KEYBOARD_KEY_I,
+ /* 0x44 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_0,
+ /* 0x46 */ GRUB_KEYBOARD_KEY_9, 0,
+ /* 0x48 */ 0, GRUB_KEYBOARD_KEY_DOT,
+ /* 0x4a */ GRUB_KEYBOARD_KEY_SLASH, GRUB_KEYBOARD_KEY_L,
+ /* 0x4c */ GRUB_KEYBOARD_KEY_SEMICOLON, GRUB_KEYBOARD_KEY_P,
+ /* 0x4e */ GRUB_KEYBOARD_KEY_DASH, 0,
+ /* 0x50 */ 0, 0,
+ /* 0x52 */ GRUB_KEYBOARD_KEY_DQUOTE, 0,
+ /* 0x54 */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_EQUAL,
+ /* 0x56 */ 0, 0,
+ /* 0x58 */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_RIGHT_SHIFT,
+ /* 0x5a */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_RBRACKET,
+ /* 0x5c */ 0, GRUB_KEYBOARD_KEY_BACKSLASH,
+ /* 0x5e */ 0, 0,
+ /* 0x60 */ 0, GRUB_KEYBOARD_KEY_102ND,
+ /* 0x62 */ 0, 0,
+ /* 0x64 */ 0, 0,
+ /* 0x66 */ GRUB_KEYBOARD_KEY_BACKSPACE, 0,
+ /* 0x68 */ 0, GRUB_KEYBOARD_KEY_NUM1,
+ /* 0x6a */ 0, GRUB_KEYBOARD_KEY_NUM4,
+ /* 0x6c */ GRUB_KEYBOARD_KEY_NUM7, 0,
+ /* 0x6e */ 0, 0,
+ /* 0x70 */ GRUB_KEYBOARD_KEY_NUMDOT, GRUB_KEYBOARD_KEY_NUM0,
+ /* 0x72 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM5,
+ /* 0x74 */ GRUB_KEYBOARD_KEY_NUM6, GRUB_KEYBOARD_KEY_NUM8,
+ /* 0x76 */ GRUB_KEYBOARD_KEY_ESCAPE, GRUB_KEYBOARD_KEY_NUM_LOCK,
+ /* 0x78 */ GRUB_KEYBOARD_KEY_F11, GRUB_KEYBOARD_KEY_NUMPLUS,
+ /* 0x7a */ GRUB_KEYBOARD_KEY_NUM3, GRUB_KEYBOARD_KEY_NUMMINUS,
+ /* 0x7c */ GRUB_KEYBOARD_KEY_NUMMUL, GRUB_KEYBOARD_KEY_NUM9,
+ /* 0x7e */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, 0,
+ /* 0x80 */ 0, 0,
+ /* 0x82 */ 0, GRUB_KEYBOARD_KEY_F7,
+ };
+
+static const struct
+{
+ grub_uint8_t from, to;
+} set2_e0_mapping[] =
+ {
+ {0x11, GRUB_KEYBOARD_KEY_RIGHT_ALT},
+ {0x14, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
+ {0x4a, GRUB_KEYBOARD_KEY_NUMSLASH},
+ {0x5a, GRUB_KEYBOARD_KEY_NUMENTER},
+ {0x69, GRUB_KEYBOARD_KEY_END},
+ {0x6b, GRUB_KEYBOARD_KEY_LEFT},
+ {0x6c, GRUB_KEYBOARD_KEY_HOME},
+ {0x70, GRUB_KEYBOARD_KEY_INSERT},
+ {0x71, GRUB_KEYBOARD_KEY_DELETE},
+ {0x72, GRUB_KEYBOARD_KEY_DOWN},
+ {0x74, GRUB_KEYBOARD_KEY_RIGHT},
+ {0x75, GRUB_KEYBOARD_KEY_UP},
+ {0x7a, GRUB_KEYBOARD_KEY_NPAGE},
+ {0x7d, GRUB_KEYBOARD_KEY_PPAGE},
+ };
+
+static void
+keyboard_controller_wait_until_ready (void)
+{
+ while (! KEYBOARD_COMMAND_ISREADY (grub_inb (KEYBOARD_REG_STATUS)));
+}
+
+static grub_uint8_t
+wait_ack (void)
+{
+ grub_uint64_t endtime;
+ grub_uint8_t ack;
+
+ endtime = grub_get_time_ms () + 20;
+ do
+ ack = grub_inb (KEYBOARD_REG_DATA);
+ while (ack != GRUB_AT_ACK && ack != GRUB_AT_NACK
+ && grub_get_time_ms () < endtime);
+ return ack;
+}
+
+static int
+at_command (grub_uint8_t data)
+{
+ unsigned i;
+ for (i = 0; i < GRUB_AT_TRIES; i++)
+ {
+ grub_uint8_t ack;
+ keyboard_controller_wait_until_ready ();
+ grub_outb (data, KEYBOARD_REG_STATUS);
+ ack = wait_ack ();
+ if (ack == GRUB_AT_NACK)
+ continue;
+ if (ack == GRUB_AT_ACK)
+ break;
+ return 0;
+ }
+ return (i != GRUB_AT_TRIES);
+}
+
+static void
+grub_keyboard_controller_write (grub_uint8_t c)
+{
+ at_command (KEYBOARD_COMMAND_WRITE);
+ keyboard_controller_wait_until_ready ();
+ grub_outb (c, KEYBOARD_REG_DATA);
+}
+
+#if !defined (GRUB_MACHINE_MIPS_YEELOONG) && !defined (GRUB_MACHINE_QEMU)
+
+static grub_uint8_t
+grub_keyboard_controller_read (void)
+{
+ at_command (KEYBOARD_COMMAND_READ);
+ keyboard_controller_wait_until_ready ();
+ return grub_inb (KEYBOARD_REG_DATA);
+}
+
+#endif
+
+static int
+write_mode (int mode)
+{
+ unsigned i;
+ for (i = 0; i < GRUB_AT_TRIES; i++)
+ {
+ grub_uint8_t ack;
+ keyboard_controller_wait_until_ready ();
+ grub_outb (0xf0, KEYBOARD_REG_DATA);
+ keyboard_controller_wait_until_ready ();
+ grub_outb (mode, KEYBOARD_REG_DATA);
+ keyboard_controller_wait_until_ready ();
+ ack = wait_ack ();
+ if (ack == GRUB_AT_NACK)
+ continue;
+ if (ack == GRUB_AT_ACK)
+ break;
+ return 0;
+ }
+
+ return (i != GRUB_AT_TRIES);
+}
+
+static int
+query_mode (void)
+{
+ grub_uint8_t ret;
+ int e;
+
+ e = write_mode (0);
+ if (!e)
+ return 0;
+
+ keyboard_controller_wait_until_ready ();
+
+ do
+ ret = grub_inb (KEYBOARD_REG_DATA);
+ while (ret == GRUB_AT_ACK);
+
+ /* QEMU translates the set even in no-translate mode. */
+ if (ret == 0x43 || ret == 1)
+ return 1;
+ if (ret == 0x41 || ret == 2)
+ return 2;
+ if (ret == 0x3f || ret == 3)
+ return 3;
+ return 0;
+}
+
+static void
+set_scancodes (void)
+{
+ /* You must have visited computer museum. Keyboard without scancode set
+ knowledge. Assume XT. */
+ if (!grub_keyboard_orig_set)
+ {
+ grub_dprintf ("atkeyb", "No sets support assumed\n");
+ current_set = 1;
+ return;
+ }
+
+#if !(defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_QEMU))
+ current_set = 1;
+ return;
+#endif
+
+ grub_keyboard_controller_write (grub_keyboard_controller_orig
+ & ~KEYBOARD_AT_TRANSLATE);
+
+ write_mode (2);
+ current_set = query_mode ();
+ grub_dprintf ("atkeyb", "returned set %d\n", current_set);
+ if (current_set == 2)
+ return;
+
+ write_mode (1);
+ current_set = query_mode ();
+ grub_dprintf ("atkeyb", "returned set %d\n", current_set);
+ if (current_set == 1)
+ return;
+ grub_printf ("No supported scancode set found\n");
+}
+
+static void
+keyboard_controller_led (grub_uint8_t leds)
+{
+ keyboard_controller_wait_until_ready ();
+ grub_outb (0xed, KEYBOARD_REG_DATA);
+ keyboard_controller_wait_until_ready ();
+ grub_outb (leds & 0x7, KEYBOARD_REG_DATA);
+}
+
+static int
+fetch_key (int *is_break)
+{
+ int was_ext = 0;
+ grub_uint8_t at_key;
+ int ret = 0;
+
+ if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
+ return -1;
+ at_key = grub_inb (KEYBOARD_REG_DATA);
+ if (at_key == 0xe0)
+ {
+ e0_received = 1;
+ return -1;
+ }
+
+ if ((current_set == 2 || current_set == 3) && at_key == 0xf0)
+ {
+ f0_received = 1;
+ return -1;
+ }
+
+ /* Setting LEDs may generate ACKs. */
+ if (at_key == GRUB_AT_ACK)
+ return -1;
+
+ was_ext = e0_received;
+ e0_received = 0;
+
+ switch (current_set)
+ {
+ case 1:
+ *is_break = !!(at_key & 0x80);
+ if (!was_ext)
+ ret = set1_mapping[at_key & 0x7f];
+ else
+ {
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (set1_e0_mapping); i++)
+ if (set1_e0_mapping[i].from == (at_key & 0x7f))
+ {
+ ret = set1_e0_mapping[i].to;
+ break;
+ }
+ }
+ break;
+ case 2:
+ *is_break = f0_received;
+ f0_received = 0;
+ if (!was_ext)
+ ret = set2_mapping[at_key];
+ else
+ {
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (set2_e0_mapping); i++)
+ if (set2_e0_mapping[i].from == at_key)
+ {
+ ret = set2_e0_mapping[i].to;
+ break;
+ }
+ }
+ break;
+ default:
+ return -1;
+ }
+ if (!ret)
+ {
+ if (was_ext)
+ grub_dprintf ("atkeyb", "Unknown key 0xe0+0x%02x from set %d\n",
+ at_key, current_set);
+ else
+ grub_dprintf ("atkeyb", "Unknown key 0x%02x from set %d\n",
+ at_key, current_set);
+ return -1;
+ }
+ return ret;
+}
+
+/* FIXME: This should become an interrupt service routine. For now
+ it's just used to catch events from control keys. */
+static int
+grub_keyboard_isr (grub_keyboard_key_t key, int is_break)
+{
+ if (!is_break)
+ switch (key)
+ {
+ case GRUB_KEYBOARD_KEY_LEFT_SHIFT:
+ at_keyboard_status |= GRUB_TERM_STATUS_LSHIFT;
+ return 1;
+ case GRUB_KEYBOARD_KEY_RIGHT_SHIFT:
+ at_keyboard_status |= GRUB_TERM_STATUS_RSHIFT;
+ return 1;
+ case GRUB_KEYBOARD_KEY_LEFT_CTRL:
+ at_keyboard_status |= GRUB_TERM_STATUS_LCTRL;
+ return 1;
+ case GRUB_KEYBOARD_KEY_RIGHT_CTRL:
+ at_keyboard_status |= GRUB_TERM_STATUS_RCTRL;
+ return 1;
+ case GRUB_KEYBOARD_KEY_RIGHT_ALT:
+ at_keyboard_status |= GRUB_TERM_STATUS_RALT;
+ return 1;
+ case GRUB_KEYBOARD_KEY_LEFT_ALT:
+ at_keyboard_status |= GRUB_TERM_STATUS_LALT;
+ return 1;
+ default:
+ return 0;
+ }
+ else
+ switch (key)
+ {
+ case GRUB_KEYBOARD_KEY_LEFT_SHIFT:
+ at_keyboard_status &= ~GRUB_TERM_STATUS_LSHIFT;
+ return 1;
+ case GRUB_KEYBOARD_KEY_RIGHT_SHIFT:
+ at_keyboard_status &= ~GRUB_TERM_STATUS_RSHIFT;
+ return 1;
+ case GRUB_KEYBOARD_KEY_LEFT_CTRL:
+ at_keyboard_status &= ~GRUB_TERM_STATUS_LCTRL;
+ return 1;
+ case GRUB_KEYBOARD_KEY_RIGHT_CTRL:
+ at_keyboard_status &= ~GRUB_TERM_STATUS_RCTRL;
+ return 1;
+ case GRUB_KEYBOARD_KEY_RIGHT_ALT:
+ at_keyboard_status &= ~GRUB_TERM_STATUS_RALT;
+ return 1;
+ case GRUB_KEYBOARD_KEY_LEFT_ALT:
+ at_keyboard_status &= ~GRUB_TERM_STATUS_LALT;
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+/* If there is a raw key pending, return it; otherwise return -1. */
+static int
+grub_keyboard_getkey (void)
+{
+ int key;
+ int is_break = 0;
+
+ key = fetch_key (&is_break);
+ if (key == -1)
+ return -1;
+
+ if (grub_keyboard_isr (key, is_break))
+ return -1;
+ if (is_break)
+ return -1;
+ return key;
+}
+
+/* If there is a character pending, return it;
+ otherwise return GRUB_TERM_NO_KEY. */
+static int
+grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
+{
+ int code;
+ code = grub_keyboard_getkey ();
+ if (code == -1)
+ return GRUB_TERM_NO_KEY;
+#ifdef DEBUG_AT_KEYBOARD
+ grub_dprintf ("atkeyb", "Detected key 0x%x\n", key);
+#endif
+ switch (code)
+ {
+ case GRUB_KEYBOARD_KEY_CAPS_LOCK:
+ at_keyboard_status ^= GRUB_TERM_STATUS_CAPS;
+ led_status ^= KEYBOARD_LED_CAPS;
+ keyboard_controller_led (led_status);
+
+#ifdef DEBUG_AT_KEYBOARD
+ grub_dprintf ("atkeyb", "caps_lock = %d\n", !!(at_keyboard_status & KEYBOARD_STATUS_CAPS_LOCK));
+#endif
+ return GRUB_TERM_NO_KEY;
+ case GRUB_KEYBOARD_KEY_NUM_LOCK:
+ at_keyboard_status ^= GRUB_TERM_STATUS_NUM;
+ led_status ^= KEYBOARD_LED_NUM;
+ keyboard_controller_led (led_status);
+
+#ifdef DEBUG_AT_KEYBOARD
+ grub_dprintf ("atkeyb", "num_lock = %d\n", !!(at_keyboard_status & KEYBOARD_STATUS_NUM_LOCK));
+#endif
+ return GRUB_TERM_NO_KEY;
+ case GRUB_KEYBOARD_KEY_SCROLL_LOCK:
+ at_keyboard_status ^= GRUB_TERM_STATUS_SCROLL;
+ led_status ^= KEYBOARD_LED_SCROLL;
+ keyboard_controller_led (led_status);
+ return GRUB_TERM_NO_KEY;
+ default:
+ return grub_term_map_key (code, at_keyboard_status);
+ }
+}
+
+static grub_err_t
+grub_keyboard_controller_init (struct grub_term_input *term __attribute__ ((unused)))
+{
+ at_keyboard_status = 0;
+ /* Drain input buffer. */
+ while (1)
+ {
+ keyboard_controller_wait_until_ready ();
+ if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
+ break;
+ keyboard_controller_wait_until_ready ();
+ grub_inb (KEYBOARD_REG_DATA);
+ }
+#if defined (GRUB_MACHINE_MIPS_YEELOONG) || defined (GRUB_MACHINE_QEMU)
+ grub_keyboard_controller_orig = 0;
+ grub_keyboard_orig_set = 2;
+#else
+ grub_keyboard_controller_orig = grub_keyboard_controller_read ();
+ grub_keyboard_orig_set = query_mode ();
+#endif
+ set_scancodes ();
+ keyboard_controller_led (led_status);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_keyboard_controller_fini (struct grub_term_input *term __attribute__ ((unused)))
+{
+ if (grub_keyboard_orig_set)
+ write_mode (grub_keyboard_orig_set);
+ grub_keyboard_controller_write (grub_keyboard_controller_orig);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_at_fini_hw (int noreturn __attribute__ ((unused)))
+{
+ return grub_keyboard_controller_fini (NULL);
+}
+
+static grub_err_t
+grub_at_restore_hw (void)
+{
+ /* Drain input buffer. */
+ while (1)
+ {
+ keyboard_controller_wait_until_ready ();
+ if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
+ break;
+ keyboard_controller_wait_until_ready ();
+ grub_inb (KEYBOARD_REG_DATA);
+ }
+ set_scancodes ();
+ keyboard_controller_led (led_status);
+
+ return GRUB_ERR_NONE;
+}
+
+
+static struct grub_term_input grub_at_keyboard_term =
+ {
+ .name = "at_keyboard",
+ .init = grub_keyboard_controller_init,
+ .fini = grub_keyboard_controller_fini,
+ .getkey = grub_at_keyboard_getkey
+ };
+
+GRUB_MOD_INIT(at_keyboard)
+{
+ grub_term_register_input ("at_keyboard", &grub_at_keyboard_term);
+ grub_loader_register_preboot_hook (grub_at_fini_hw, grub_at_restore_hw,
+ GRUB_LOADER_PREBOOT_HOOK_PRIO_CONSOLE);
+}
+
+GRUB_MOD_FINI(at_keyboard)
+{
+ grub_keyboard_controller_fini (NULL);
+ grub_term_unregister_input (&grub_at_keyboard_term);
+}
diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c
new file mode 100644
index 0000000..8fd89b0
--- /dev/null
+++ b/grub-core/term/efi/console.c
@@ -0,0 +1,291 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/term.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/api.h>
+#include <grub/efi/console.h>
+
+static grub_uint32_t
+map_char (grub_uint32_t c)
+{
+ /* Map some unicode characters to the EFI character. */
+ switch (c)
+ {
+ case GRUB_UNICODE_LEFTARROW:
+ c = GRUB_UNICODE_BLACK_LEFT_TRIANGLE;
+ break;
+ case GRUB_UNICODE_UPARROW:
+ c = GRUB_UNICODE_BLACK_UP_TRIANGLE;
+ break;
+ case GRUB_UNICODE_RIGHTARROW:
+ c = GRUB_UNICODE_BLACK_RIGHT_TRIANGLE;
+ break;
+ case GRUB_UNICODE_DOWNARROW:
+ c = GRUB_UNICODE_BLACK_DOWN_TRIANGLE;
+ break;
+ case GRUB_UNICODE_HLINE:
+ c = GRUB_UNICODE_LIGHT_HLINE;
+ break;
+ case GRUB_UNICODE_VLINE:
+ c = GRUB_UNICODE_LIGHT_VLINE;
+ break;
+ case GRUB_UNICODE_CORNER_UL:
+ c = GRUB_UNICODE_LIGHT_CORNER_UL;
+ break;
+ case GRUB_UNICODE_CORNER_UR:
+ c = GRUB_UNICODE_LIGHT_CORNER_UR;
+ break;
+ case GRUB_UNICODE_CORNER_LL:
+ c = GRUB_UNICODE_LIGHT_CORNER_LL;
+ break;
+ case GRUB_UNICODE_CORNER_LR:
+ c = GRUB_UNICODE_LIGHT_CORNER_LR;
+ break;
+ }
+
+ return c;
+}
+
+static void
+grub_console_putchar (struct grub_term_output *term __attribute__ ((unused)),
+ const struct grub_unicode_glyph *c)
+{
+ grub_efi_char16_t str[2 + c->ncomb];
+ grub_efi_simple_text_output_interface_t *o;
+ unsigned i, j;
+
+ if (grub_efi_is_finished)
+ return;
+
+ o = grub_efi_system_table->con_out;
+
+ /* For now, do not try to use a surrogate pair. */
+ if (c->base > 0xffff)
+ str[0] = '?';
+ else
+ str[0] = (grub_efi_char16_t) map_char (c->base & 0xffff);
+ j = 1;
+ for (i = 0; i < c->ncomb; i++)
+ if (c->base < 0xffff)
+ str[j++] = c->combining[i].code;
+ str[j] = 0;
+
+ /* Should this test be cached? */
+ if ((c->base > 0x7f || c->ncomb)
+ && efi_call_2 (o->test_string, o, str) != GRUB_EFI_SUCCESS)
+ return;
+
+ efi_call_2 (o->output_string, o, str);
+}
+
+const unsigned efi_codes[] =
+ {
+ 0, GRUB_TERM_KEY_UP, GRUB_TERM_KEY_DOWN, GRUB_TERM_KEY_RIGHT,
+ GRUB_TERM_KEY_LEFT, GRUB_TERM_KEY_HOME, GRUB_TERM_KEY_END, GRUB_TERM_KEY_INSERT,
+ GRUB_TERM_KEY_DC, GRUB_TERM_KEY_PPAGE, GRUB_TERM_KEY_NPAGE, GRUB_TERM_KEY_F1,
+ GRUB_TERM_KEY_F2, GRUB_TERM_KEY_F3, GRUB_TERM_KEY_F4, GRUB_TERM_KEY_F5,
+ GRUB_TERM_KEY_F6, GRUB_TERM_KEY_F7, GRUB_TERM_KEY_F8, GRUB_TERM_KEY_F9,
+ GRUB_TERM_KEY_F10, 0, 0, '\e'
+ };
+
+
+static int
+grub_console_getkey (struct grub_term_input *term __attribute__ ((unused)))
+{
+ grub_efi_simple_input_interface_t *i;
+ grub_efi_input_key_t key;
+ grub_efi_status_t status;
+
+ if (grub_efi_is_finished)
+ return 0;
+
+ i = grub_efi_system_table->con_in;
+ status = efi_call_2 (i->read_key_stroke, i, &key);
+
+ if (status != GRUB_EFI_SUCCESS)
+ return GRUB_TERM_NO_KEY;
+
+ if (key.scan_code == 0)
+ return key.unicode_char;
+ else if (key.scan_code < ARRAY_SIZE (efi_codes))
+ return efi_codes[key.scan_code];
+
+ return GRUB_TERM_NO_KEY;
+}
+
+static grub_uint16_t
+grub_console_getwh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ grub_efi_simple_text_output_interface_t *o;
+ grub_efi_uintn_t columns, rows;
+
+ o = grub_efi_system_table->con_out;
+ if (grub_efi_is_finished || efi_call_4 (o->query_mode, o, o->mode->mode,
+ &columns, &rows) != GRUB_EFI_SUCCESS)
+ {
+ /* Why does this fail? */
+ columns = 80;
+ rows = 25;
+ }
+
+ return ((columns << 8) | rows);
+}
+
+static grub_uint16_t
+grub_console_getxy (struct grub_term_output *term __attribute__ ((unused)))
+{
+ grub_efi_simple_text_output_interface_t *o;
+
+ if (grub_efi_is_finished)
+ return 0;
+
+ o = grub_efi_system_table->con_out;
+ return ((o->mode->cursor_column << 8) | o->mode->cursor_row);
+}
+
+static void
+grub_console_gotoxy (struct grub_term_output *term __attribute__ ((unused)),
+ grub_uint8_t x, grub_uint8_t y)
+{
+ grub_efi_simple_text_output_interface_t *o;
+
+ if (grub_efi_is_finished)
+ return;
+
+ o = grub_efi_system_table->con_out;
+ efi_call_3 (o->set_cursor_position, o, x, y);
+}
+
+static void
+grub_console_cls (struct grub_term_output *term __attribute__ ((unused)))
+{
+ grub_efi_simple_text_output_interface_t *o;
+ grub_efi_int32_t orig_attr;
+
+ if (grub_efi_is_finished)
+ return;
+
+ o = grub_efi_system_table->con_out;
+ orig_attr = o->mode->attribute;
+ efi_call_2 (o->set_attributes, o, GRUB_EFI_BACKGROUND_BLACK);
+ efi_call_1 (o->clear_screen, o);
+ efi_call_2 (o->set_attributes, o, orig_attr);
+}
+
+static void
+grub_console_setcolorstate (struct grub_term_output *term,
+ grub_term_color_state state)
+{
+ grub_efi_simple_text_output_interface_t *o;
+
+ if (grub_efi_is_finished)
+ return;
+
+ o = grub_efi_system_table->con_out;
+
+ switch (state) {
+ case GRUB_TERM_COLOR_STANDARD:
+ efi_call_2 (o->set_attributes, o, GRUB_TERM_DEFAULT_STANDARD_COLOR
+ & 0x7f);
+ break;
+ case GRUB_TERM_COLOR_NORMAL:
+ efi_call_2 (o->set_attributes, o, term->normal_color & 0x7f);
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ efi_call_2 (o->set_attributes, o, term->highlight_color & 0x7f);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+grub_console_setcursor (struct grub_term_output *term __attribute__ ((unused)),
+ int on)
+{
+ grub_efi_simple_text_output_interface_t *o;
+
+ if (grub_efi_is_finished)
+ return;
+
+ o = grub_efi_system_table->con_out;
+ efi_call_2 (o->enable_cursor, o, on);
+}
+
+static grub_err_t
+grub_efi_console_init (struct grub_term_output *term)
+{
+ grub_console_setcursor (term, 1);
+ return 0;
+}
+
+static grub_err_t
+grub_efi_console_fini (struct grub_term_output *term)
+{
+ grub_console_setcursor (term, 0);
+ return 0;
+}
+
+static struct grub_term_input grub_console_term_input =
+ {
+ .name = "console",
+ .getkey = grub_console_getkey,
+ };
+
+static struct grub_term_output grub_console_term_output =
+ {
+ .name = "console",
+ .init = grub_efi_console_init,
+ .fini = grub_efi_console_fini,
+ .putchar = grub_console_putchar,
+ .getwh = grub_console_getwh,
+ .getxy = grub_console_getxy,
+ .gotoxy = grub_console_gotoxy,
+ .cls = grub_console_cls,
+ .setcolorstate = grub_console_setcolorstate,
+ .setcursor = grub_console_setcursor,
+ .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
+ .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
+ .flags = GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS
+ };
+
+void
+grub_console_init (void)
+{
+ /* FIXME: it is necessary to consider the case where no console control
+ is present but the default is already in text mode. */
+ if (! grub_efi_set_text_mode (1))
+ {
+ grub_error (GRUB_ERR_BAD_DEVICE, "cannot set text mode");
+ return;
+ }
+
+ grub_term_register_input ("console", &grub_console_term_input);
+ grub_term_register_output ("console", &grub_console_term_output);
+}
+
+void
+grub_console_fini (void)
+{
+ grub_term_unregister_input (&grub_console_term_input);
+ grub_term_unregister_output (&grub_console_term_output);
+}
diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c
new file mode 100644
index 0000000..e58d672
--- /dev/null
+++ b/grub-core/term/gfxterm.c
@@ -0,0 +1,1220 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/term.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/font.h>
+#include <grub/mm.h>
+#include <grub/env.h>
+#include <grub/video.h>
+#include <grub/gfxterm.h>
+#include <grub/bitmap.h>
+#include <grub/command.h>
+#include <grub/extcmd.h>
+#include <grub/bitmap_scale.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define DEFAULT_VIDEO_MODE "auto"
+#define DEFAULT_BORDER_WIDTH 10
+
+#define DEFAULT_STANDARD_COLOR 0x07
+
+struct grub_dirty_region
+{
+ int top_left_x;
+ int top_left_y;
+ int bottom_right_x;
+ int bottom_right_y;
+};
+
+struct grub_colored_char
+{
+ /* An Unicode codepoint. */
+ struct grub_unicode_glyph *code;
+
+ /* Color values. */
+ grub_video_color_t fg_color;
+ grub_video_color_t bg_color;
+
+ /* The width of this character minus one. */
+ unsigned char width;
+
+ /* The column index of this character. */
+ unsigned char index;
+};
+
+struct grub_virtual_screen
+{
+ /* Dimensions of the virtual screen in pixels. */
+ unsigned int width;
+ unsigned int height;
+
+ /* Offset in the display in pixels. */
+ unsigned int offset_x;
+ unsigned int offset_y;
+
+ /* TTY Character sizes in pixes. */
+ unsigned int normal_char_width;
+ unsigned int normal_char_height;
+
+ /* Virtual screen TTY size in characters. */
+ unsigned int columns;
+ unsigned int rows;
+
+ /* Current cursor location in characters. */
+ unsigned int cursor_x;
+ unsigned int cursor_y;
+
+ /* Current cursor state. */
+ int cursor_state;
+
+ /* Font settings. */
+ grub_font_t font;
+
+ /* Terminal color settings. */
+ grub_uint8_t standard_color_setting;
+ grub_uint8_t term_color;
+
+ /* Color settings. */
+ grub_video_color_t fg_color;
+ grub_video_color_t bg_color;
+ grub_video_color_t bg_color_display;
+
+ /* Text buffer for virtual screen. Contains (columns * rows) number
+ of entries. */
+ struct grub_colored_char *text_buffer;
+
+ int total_scroll;
+};
+
+struct grub_gfxterm_window
+{
+ unsigned x;
+ unsigned y;
+ unsigned width;
+ unsigned height;
+ int double_repaint;
+};
+
+static struct grub_video_render_target *render_target;
+void (*grub_gfxterm_decorator_hook) (void) = NULL;
+static struct grub_gfxterm_window window;
+static struct grub_virtual_screen virtual_screen;
+static grub_gfxterm_repaint_callback_t repaint_callback;
+static int repaint_scheduled = 0;
+static int repaint_was_scheduled = 0;
+
+static void destroy_window (void);
+
+static struct grub_video_render_target *text_layer;
+
+static unsigned int bitmap_width;
+static unsigned int bitmap_height;
+static struct grub_video_bitmap *bitmap;
+
+static struct grub_dirty_region dirty_region;
+
+static void dirty_region_reset (void);
+
+static int dirty_region_is_empty (void);
+
+static void dirty_region_add (int x, int y,
+ unsigned int width, unsigned int height);
+
+static unsigned int calculate_normal_character_width (grub_font_t font);
+
+static unsigned char calculate_character_width (struct grub_font_glyph *glyph);
+
+static void grub_gfxterm_refresh (struct grub_term_output *term __attribute__ ((unused)));
+
+static grub_ssize_t
+grub_gfxterm_getcharwidth (struct grub_term_output *term __attribute__ ((unused)),
+ const struct grub_unicode_glyph *c);
+
+static void
+set_term_color (grub_uint8_t term_color)
+{
+ struct grub_video_render_target *old_target;
+
+ /* Save previous target and switch to text layer. */
+ grub_video_get_active_render_target (&old_target);
+ grub_video_set_active_render_target (text_layer);
+
+ /* Map terminal color to text layer compatible video colors. */
+ virtual_screen.fg_color = grub_video_map_color(term_color & 0x0f);
+
+ /* Special case: use black as transparent color. */
+ if (((term_color >> 4) & 0x0f) == 0)
+ {
+ virtual_screen.bg_color = grub_video_map_rgba(0, 0, 0, 0);
+ }
+ else
+ {
+ virtual_screen.bg_color = grub_video_map_color((term_color >> 4) & 0x0f);
+ }
+
+ /* Restore previous target. */
+ grub_video_set_active_render_target (old_target);
+}
+
+static void
+clear_char (struct grub_colored_char *c)
+{
+ grub_free (c->code);
+ c->code = grub_unicode_glyph_from_code (' ');
+ if (!c->code)
+ grub_errno = GRUB_ERR_NONE;
+ c->fg_color = virtual_screen.fg_color;
+ c->bg_color = virtual_screen.bg_color;
+ c->width = 0;
+ c->index = 0;
+}
+
+static void
+grub_virtual_screen_free (void)
+{
+ /* If virtual screen has been allocated, free it. */
+ if (virtual_screen.text_buffer != 0)
+ grub_free (virtual_screen.text_buffer);
+
+ /* Reset virtual screen data. */
+ grub_memset (&virtual_screen, 0, sizeof (virtual_screen));
+
+ /* Free render targets. */
+ grub_video_delete_render_target (text_layer);
+ text_layer = 0;
+}
+
+static grub_err_t
+grub_virtual_screen_setup (unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
+ const char *font_name)
+{
+ unsigned int i;
+
+ /* Free old virtual screen. */
+ grub_virtual_screen_free ();
+
+ /* Initialize with default data. */
+ virtual_screen.font = grub_font_get (font_name);
+ if (!virtual_screen.font)
+ return grub_error (GRUB_ERR_BAD_FONT,
+ "no font loaded");
+ virtual_screen.width = width;
+ virtual_screen.height = height;
+ virtual_screen.offset_x = x;
+ virtual_screen.offset_y = y;
+ virtual_screen.normal_char_width =
+ calculate_normal_character_width (virtual_screen.font);
+ virtual_screen.normal_char_height =
+ grub_font_get_max_char_height (virtual_screen.font);
+ virtual_screen.cursor_x = 0;
+ virtual_screen.cursor_y = 0;
+ virtual_screen.cursor_state = 1;
+ virtual_screen.total_scroll = 0;
+
+ /* Calculate size of text buffer. */
+ virtual_screen.columns = virtual_screen.width / virtual_screen.normal_char_width;
+ virtual_screen.rows = virtual_screen.height / virtual_screen.normal_char_height;
+
+ /* Allocate memory for text buffer. */
+ virtual_screen.text_buffer =
+ (struct grub_colored_char *) grub_malloc (virtual_screen.columns
+ * virtual_screen.rows
+ * sizeof (*virtual_screen.text_buffer));
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Create new render target for text layer. */
+ grub_video_create_render_target (&text_layer,
+ virtual_screen.width,
+ virtual_screen.height,
+ GRUB_VIDEO_MODE_TYPE_RGB
+ | GRUB_VIDEO_MODE_TYPE_ALPHA);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* As we want to have colors compatible with rendering target,
+ we can only have those after mode is initialized. */
+ grub_video_set_active_render_target (text_layer);
+
+ virtual_screen.standard_color_setting = DEFAULT_STANDARD_COLOR;
+
+ virtual_screen.term_color = GRUB_TERM_DEFAULT_NORMAL_COLOR;
+
+ set_term_color (virtual_screen.term_color);
+
+ grub_video_set_active_render_target (render_target);
+
+ virtual_screen.bg_color_display = grub_video_map_rgba(0, 0, 0, 0);
+
+ /* Clear out text buffer. */
+ for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
+ {
+ virtual_screen.text_buffer[i].code = 0;
+ clear_char (&(virtual_screen.text_buffer[i]));
+ }
+
+ return grub_errno;
+}
+
+void
+grub_gfxterm_schedule_repaint (void)
+{
+ repaint_scheduled = 1;
+}
+
+grub_err_t
+grub_gfxterm_set_window (struct grub_video_render_target *target,
+ int x, int y, int width, int height,
+ int double_repaint,
+ const char *font_name, int border_width)
+{
+ /* Clean up any prior instance. */
+ destroy_window ();
+
+ /* Set the render target. */
+ render_target = target;
+
+ /* Create virtual screen. */
+ if (grub_virtual_screen_setup (border_width, border_width,
+ width - 2 * border_width,
+ height - 2 * border_width,
+ font_name)
+ != GRUB_ERR_NONE)
+ {
+ return grub_errno;
+ }
+
+ /* Set window bounds. */
+ window.x = x;
+ window.y = y;
+ window.width = width;
+ window.height = height;
+ window.double_repaint = double_repaint;
+
+ dirty_region_reset ();
+ grub_gfxterm_schedule_repaint ();
+
+ return grub_errno;
+}
+
+grub_err_t
+grub_gfxterm_fullscreen (void)
+{
+ const char *font_name;
+ struct grub_video_mode_info mode_info;
+ grub_video_color_t color;
+ grub_err_t err;
+ int double_redraw;
+
+ err = grub_video_get_info (&mode_info);
+ /* Figure out what mode we ended up. */
+ if (err)
+ return err;
+
+ grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
+
+ double_redraw = mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED
+ && !(mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP);
+
+ /* Make sure screen is black. */
+ color = grub_video_map_rgb (0, 0, 0);
+ grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
+ if (double_redraw)
+ {
+ grub_video_swap_buffers ();
+ grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
+ }
+
+ /* Select the font to use. */
+ font_name = grub_env_get ("gfxterm_font");
+ if (! font_name)
+ font_name = ""; /* Allow fallback to any font. */
+
+ grub_gfxterm_decorator_hook = NULL;
+
+ return grub_gfxterm_set_window (GRUB_VIDEO_RENDER_TARGET_DISPLAY,
+ 0, 0, mode_info.width, mode_info.height,
+ double_redraw,
+ font_name, DEFAULT_BORDER_WIDTH);
+}
+
+static grub_err_t
+grub_gfxterm_term_init (struct grub_term_output *term __attribute__ ((unused)))
+{
+ char *tmp;
+ grub_err_t err;
+ const char *modevar;
+
+ /* Parse gfxmode environment variable if set. */
+ modevar = grub_env_get ("gfxmode");
+ if (! modevar || *modevar == 0)
+ err = grub_video_set_mode (DEFAULT_VIDEO_MODE,
+ GRUB_VIDEO_MODE_TYPE_PURE_TEXT, 0);
+ else
+ {
+ tmp = grub_xasprintf ("%s;" DEFAULT_VIDEO_MODE, modevar);
+ if (!tmp)
+ return grub_errno;
+ err = grub_video_set_mode (tmp, GRUB_VIDEO_MODE_TYPE_PURE_TEXT, 0);
+ grub_free (tmp);
+ }
+
+ if (err)
+ return err;
+
+ err = grub_gfxterm_fullscreen ();
+ if (err)
+ grub_video_restore ();
+
+ return err;
+}
+
+static void
+destroy_window (void)
+{
+ repaint_callback = 0;
+ grub_virtual_screen_free ();
+}
+
+static grub_err_t
+grub_gfxterm_term_fini (struct grub_term_output *term __attribute__ ((unused)))
+{
+ unsigned i;
+ destroy_window ();
+ grub_video_restore ();
+
+ for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
+ {
+ grub_free (virtual_screen.text_buffer[i].code);
+ virtual_screen.text_buffer[i].code = 0;
+ }
+
+ /* Clear error state. */
+ grub_errno = GRUB_ERR_NONE;
+ return GRUB_ERR_NONE;
+}
+
+static void
+redraw_screen_rect (unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height)
+{
+ grub_video_color_t color;
+ grub_video_rect_t saved_view;
+
+ grub_video_set_active_render_target (render_target);
+ /* Save viewport and set it to our window. */
+ grub_video_get_viewport ((unsigned *) &saved_view.x,
+ (unsigned *) &saved_view.y,
+ (unsigned *) &saved_view.width,
+ (unsigned *) &saved_view.height);
+ grub_video_set_viewport (window.x, window.y, window.width, window.height);
+
+ if (bitmap)
+ {
+ /* Render bitmap as background. */
+ grub_video_blit_bitmap (bitmap, GRUB_VIDEO_BLIT_REPLACE, x, y,
+ x, y,
+ width, height);
+
+ /* If bitmap is smaller than requested blit area, use background
+ color. */
+ color = virtual_screen.bg_color_display;
+
+ /* Fill right side of the bitmap if needed. */
+ if ((x + width >= bitmap_width) && (y < bitmap_height))
+ {
+ int w = (x + width) - bitmap_width;
+ int h = height;
+ unsigned int tx = x;
+
+ if (y + height >= bitmap_height)
+ {
+ h = bitmap_height - y;
+ }
+
+ if (bitmap_width > tx)
+ {
+ tx = bitmap_width;
+ }
+
+ /* Render background layer. */
+ grub_video_fill_rect (color, tx, y, w, h);
+ }
+
+ /* Fill bottom side of the bitmap if needed. */
+ if (y + height >= bitmap_height)
+ {
+ int h = (y + height) - bitmap_height;
+ unsigned int ty = y;
+
+ if (bitmap_height > ty)
+ {
+ ty = bitmap_height;
+ }
+
+ /* Render background layer. */
+ grub_video_fill_rect (color, x, ty, width, h);
+ }
+
+ /* Render text layer as blended. */
+ grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_BLEND, x, y,
+ x - virtual_screen.offset_x,
+ y - virtual_screen.offset_y,
+ width, height);
+ }
+ else
+ {
+ /* Render background layer. */
+ color = virtual_screen.bg_color_display;
+ grub_video_fill_rect (color, x, y, width, height);
+
+ /* Render text layer as replaced (to get texts background color). */
+ grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_REPLACE, x, y,
+ x - virtual_screen.offset_x,
+ y - virtual_screen.offset_y,
+ width, height);
+ }
+
+ /* Restore saved viewport. */
+ grub_video_set_viewport (saved_view.x, saved_view.y,
+ saved_view.width, saved_view.height);
+ grub_video_set_active_render_target (render_target);
+
+ if (repaint_callback)
+ repaint_callback (x, y, width, height);
+}
+
+static void
+dirty_region_reset (void)
+{
+ dirty_region.top_left_x = -1;
+ dirty_region.top_left_y = -1;
+ dirty_region.bottom_right_x = -1;
+ dirty_region.bottom_right_y = -1;
+ repaint_was_scheduled = 0;
+}
+
+static int
+dirty_region_is_empty (void)
+{
+ if ((dirty_region.top_left_x == -1)
+ || (dirty_region.top_left_y == -1)
+ || (dirty_region.bottom_right_x == -1)
+ || (dirty_region.bottom_right_y == -1))
+ return 1;
+ return 0;
+}
+
+static void
+dirty_region_add_real (int x, int y, unsigned int width, unsigned int height)
+{
+ if (dirty_region_is_empty ())
+ {
+ dirty_region.top_left_x = x;
+ dirty_region.top_left_y = y;
+ dirty_region.bottom_right_x = x + width - 1;
+ dirty_region.bottom_right_y = y + height - 1;
+ }
+ else
+ {
+ if (x < dirty_region.top_left_x)
+ dirty_region.top_left_x = x;
+ if (y < dirty_region.top_left_y)
+ dirty_region.top_left_y = y;
+ if ((x + (int)width - 1) > dirty_region.bottom_right_x)
+ dirty_region.bottom_right_x = x + width - 1;
+ if ((y + (int)height - 1) > dirty_region.bottom_right_y)
+ dirty_region.bottom_right_y = y + height - 1;
+ }
+}
+
+static void
+dirty_region_add (int x, int y, unsigned int width, unsigned int height)
+{
+ if ((width == 0) || (height == 0))
+ return;
+
+ if (repaint_scheduled)
+ {
+ dirty_region_add_real (virtual_screen.offset_x, virtual_screen.offset_y,
+ virtual_screen.width, virtual_screen.height);
+ repaint_scheduled = 0;
+ repaint_was_scheduled = 1;
+ }
+ dirty_region_add_real (x, y, width, height);
+}
+
+static void
+dirty_region_add_virtualscreen (void)
+{
+ /* Mark virtual screen as dirty. */
+ dirty_region_add (virtual_screen.offset_x, virtual_screen.offset_y,
+ virtual_screen.width, virtual_screen.height);
+}
+
+
+static void
+dirty_region_redraw (void)
+{
+ int x;
+ int y;
+ int width;
+ int height;
+
+ if (dirty_region_is_empty ())
+ return;
+
+ x = dirty_region.top_left_x;
+ y = dirty_region.top_left_y;
+
+ width = dirty_region.bottom_right_x - x + 1;
+ height = dirty_region.bottom_right_y - y + 1;
+
+ if (repaint_was_scheduled && grub_gfxterm_decorator_hook)
+ grub_gfxterm_decorator_hook ();
+
+ redraw_screen_rect (x, y, width, height);
+}
+
+static inline void
+paint_char (unsigned cx, unsigned cy)
+{
+ struct grub_colored_char *p;
+ struct grub_font_glyph *glyph;
+ grub_video_color_t color;
+ grub_video_color_t bgcolor;
+ unsigned int x;
+ unsigned int y;
+ int ascent;
+ unsigned int height;
+ unsigned int width;
+
+ if (cy + virtual_screen.total_scroll >= virtual_screen.rows)
+ return;
+
+ /* Find out active character. */
+ p = (virtual_screen.text_buffer
+ + cx + (cy * virtual_screen.columns));
+
+ p -= p->index;
+
+ /* Get glyph for character. */
+ glyph = grub_font_construct_glyph (virtual_screen.font, p->code);
+ if (!glyph)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return;
+ }
+ ascent = grub_font_get_ascent (virtual_screen.font);
+
+ width = virtual_screen.normal_char_width * calculate_character_width(glyph);
+ height = virtual_screen.normal_char_height;
+
+ color = p->fg_color;
+ bgcolor = p->bg_color;
+
+ x = cx * virtual_screen.normal_char_width;
+ y = (cy + virtual_screen.total_scroll) * virtual_screen.normal_char_height;
+
+ /* Render glyph to text layer. */
+ grub_video_set_active_render_target (text_layer);
+ grub_video_fill_rect (bgcolor, x, y, width, height);
+ grub_font_draw_glyph (glyph, color, x, y + ascent);
+ grub_video_set_active_render_target (render_target);
+
+ /* Mark character to be drawn. */
+ dirty_region_add (virtual_screen.offset_x + x, virtual_screen.offset_y + y,
+ width, height);
+ grub_free (glyph);
+}
+
+static inline void
+write_char (void)
+{
+ paint_char (virtual_screen.cursor_x, virtual_screen.cursor_y);
+}
+
+static inline void
+draw_cursor (int show)
+{
+ unsigned int x;
+ unsigned int y;
+ unsigned int width;
+ unsigned int height;
+ grub_video_color_t color;
+
+ write_char ();
+
+ if (!show)
+ return;
+
+ if (virtual_screen.cursor_y + virtual_screen.total_scroll
+ >= virtual_screen.rows)
+ return;
+
+ /* Determine cursor properties and position on text layer. */
+ x = virtual_screen.cursor_x * virtual_screen.normal_char_width;
+ width = virtual_screen.normal_char_width;
+ color = virtual_screen.fg_color;
+ y = ((virtual_screen.cursor_y + virtual_screen.total_scroll)
+ * virtual_screen.normal_char_height
+ + grub_font_get_ascent (virtual_screen.font));
+ height = 2;
+
+ /* Render cursor to text layer. */
+ grub_video_set_active_render_target (text_layer);
+ grub_video_fill_rect (color, x, y, width, height);
+ grub_video_set_active_render_target (render_target);
+
+ /* Mark cursor to be redrawn. */
+ dirty_region_add (virtual_screen.offset_x + x,
+ virtual_screen.offset_y + y,
+ width, height);
+}
+
+static void
+real_scroll (void)
+{
+ unsigned int i, j, was_scroll;
+ grub_video_color_t color;
+
+ if (!virtual_screen.total_scroll)
+ return;
+
+ /* If we have bitmap, re-draw screen, otherwise scroll physical screen too. */
+ if (bitmap)
+ {
+ /* Scroll physical screen. */
+ grub_video_set_active_render_target (text_layer);
+ color = virtual_screen.bg_color;
+ grub_video_scroll (color, 0, -virtual_screen.normal_char_height
+ * virtual_screen.total_scroll);
+
+ /* Mark virtual screen to be redrawn. */
+ dirty_region_add_virtualscreen ();
+ }
+ else
+ {
+ grub_video_rect_t saved_view;
+
+ /* Remove cursor. */
+ draw_cursor (0);
+
+ grub_video_set_active_render_target (render_target);
+
+ i = window.double_repaint ? 2 : 1;
+
+ color = virtual_screen.bg_color;
+
+ while (i--)
+ {
+ /* Save viewport and set it to our window. */
+ grub_video_get_viewport ((unsigned *) &saved_view.x,
+ (unsigned *) &saved_view.y,
+ (unsigned *) &saved_view.width,
+ (unsigned *) &saved_view.height);
+
+ grub_video_set_viewport (window.x, window.y, window.width,
+ window.height);
+
+ /* Clear new border area. */
+ grub_video_fill_rect (color,
+ virtual_screen.offset_x,
+ virtual_screen.offset_y,
+ virtual_screen.width,
+ virtual_screen.normal_char_height
+ * virtual_screen.total_scroll);
+
+ grub_video_set_active_render_target (render_target);
+ dirty_region_redraw ();
+
+ /* Scroll physical screen. */
+ grub_video_scroll (color, 0, -virtual_screen.normal_char_height
+ * virtual_screen.total_scroll);
+
+ /* Restore saved viewport. */
+ grub_video_set_viewport (saved_view.x, saved_view.y,
+ saved_view.width, saved_view.height);
+
+ if (i)
+ grub_video_swap_buffers ();
+ }
+ dirty_region_reset ();
+
+ /* Scroll physical screen. */
+ grub_video_set_active_render_target (text_layer);
+ color = virtual_screen.bg_color;
+ grub_video_scroll (color, 0, -virtual_screen.normal_char_height
+ * virtual_screen.total_scroll);
+
+ grub_video_set_active_render_target (render_target);
+
+ }
+
+ was_scroll = virtual_screen.total_scroll;
+ virtual_screen.total_scroll = 0;
+
+ if (was_scroll > virtual_screen.rows)
+ was_scroll = virtual_screen.rows;
+
+ /* Draw shadow part. */
+ for (i = virtual_screen.rows - was_scroll;
+ i < virtual_screen.rows; i++)
+ for (j = 0; j < virtual_screen.columns; j++)
+ paint_char (j, i);
+
+ /* Draw cursor if visible. */
+ if (virtual_screen.cursor_state)
+ draw_cursor (1);
+
+ if (repaint_callback)
+ repaint_callback (window.x, window.y, window.width, window.height);
+}
+
+static void
+scroll_up (void)
+{
+ unsigned int i;
+
+ /* Clear first line in text buffer. */
+ for (i = 0; i < virtual_screen.columns; i++)
+ grub_free (virtual_screen.text_buffer[i].code);
+
+ /* Scroll text buffer with one line to up. */
+ grub_memmove (virtual_screen.text_buffer,
+ virtual_screen.text_buffer + virtual_screen.columns,
+ sizeof (*virtual_screen.text_buffer)
+ * virtual_screen.columns
+ * (virtual_screen.rows - 1));
+
+ /* Clear last line in text buffer. */
+ for (i = virtual_screen.columns * (virtual_screen.rows - 1);
+ i < virtual_screen.columns * virtual_screen.rows;
+ i++)
+ {
+ virtual_screen.text_buffer[i].code = 0;
+ clear_char (&(virtual_screen.text_buffer[i]));
+ }
+
+ virtual_screen.total_scroll++;
+}
+
+static void
+grub_gfxterm_putchar (struct grub_term_output *term,
+ const struct grub_unicode_glyph *c)
+{
+ if (c->base == '\a')
+ /* FIXME */
+ return;
+
+ /* Erase current cursor, if any. */
+ if (virtual_screen.cursor_state)
+ draw_cursor (0);
+
+ if (c->base == '\b' || c->base == '\n' || c->base == '\r')
+ {
+ switch (c->base)
+ {
+ case '\b':
+ if (virtual_screen.cursor_x > 0)
+ virtual_screen.cursor_x--;
+ break;
+
+ case '\n':
+ if (virtual_screen.cursor_y >= virtual_screen.rows - 1)
+ scroll_up ();
+ else
+ virtual_screen.cursor_y++;
+ break;
+
+ case '\r':
+ virtual_screen.cursor_x = 0;
+ break;
+ }
+ }
+ else
+ {
+ struct grub_colored_char *p;
+ unsigned char char_width;
+
+ /* Calculate actual character width for glyph. This is number of
+ times of normal_font_width. */
+ char_width = grub_gfxterm_getcharwidth (term, c);
+
+ /* If we are about to exceed line length, wrap to next line. */
+ if (virtual_screen.cursor_x + char_width > virtual_screen.columns)
+ {
+ if (virtual_screen.cursor_y >= virtual_screen.rows - 1)
+ scroll_up ();
+ else
+ virtual_screen.cursor_y++;
+ }
+
+ /* Find position on virtual screen, and fill information. */
+ p = (virtual_screen.text_buffer +
+ virtual_screen.cursor_x +
+ virtual_screen.cursor_y * virtual_screen.columns);
+ grub_free (p->code);
+ p->code = grub_unicode_glyph_dup (c);
+ if (!p->code)
+ grub_errno = GRUB_ERR_NONE;
+ p->fg_color = virtual_screen.fg_color;
+ p->bg_color = virtual_screen.bg_color;
+ p->width = char_width - 1;
+ p->index = 0;
+
+ /* If we have large glyph, add fixup info. */
+ if (char_width > 1)
+ {
+ unsigned i;
+
+ for (i = 1; i < char_width; i++)
+ {
+ grub_free (p[i].code);
+ p[i].code = grub_unicode_glyph_from_code (' ');
+ if (!p[i].code)
+ grub_errno = GRUB_ERR_NONE;
+ p[i].width = char_width - 1;
+ p[i].index = i;
+ }
+ }
+
+ /* Draw glyph. */
+ write_char ();
+
+ /* Make sure we scroll screen when needed and wrap line correctly. */
+ virtual_screen.cursor_x += char_width;
+ if (virtual_screen.cursor_x >= virtual_screen.columns)
+ {
+ virtual_screen.cursor_x = 0;
+
+ if (virtual_screen.cursor_y >= virtual_screen.rows - 1)
+ scroll_up ();
+ else
+ virtual_screen.cursor_y++;
+ }
+ }
+
+ /* Redraw cursor if it should be visible. */
+ /* Note: This will redraw the character as well, which means that the
+ above call to write_char is redundant when the cursor is showing. */
+ if (virtual_screen.cursor_state)
+ draw_cursor (1);
+}
+
+/* Use ASCII characters to determine normal character width. */
+static unsigned int
+calculate_normal_character_width (grub_font_t font)
+{
+ struct grub_font_glyph *glyph;
+ unsigned int width = 0;
+ unsigned int i;
+
+ /* Get properties of every printable ASCII character. */
+ for (i = 32; i < 127; i++)
+ {
+ glyph = grub_font_get_glyph (font, i);
+
+ /* Skip unknown characters. Should never happen on normal conditions. */
+ if (! glyph)
+ continue;
+
+ if (glyph->device_width > width)
+ width = glyph->device_width;
+ }
+ if (!width)
+ return 8;
+
+ return width;
+}
+
+static unsigned char
+calculate_character_width (struct grub_font_glyph *glyph)
+{
+ if (! glyph || glyph->device_width == 0)
+ return 1;
+
+ return (glyph->device_width
+ + (virtual_screen.normal_char_width - 1))
+ / virtual_screen.normal_char_width;
+}
+
+static grub_ssize_t
+grub_gfxterm_getcharwidth (struct grub_term_output *term __attribute__ ((unused)),
+ const struct grub_unicode_glyph *c)
+{
+ int dev_width;
+ dev_width = grub_font_get_constructed_device_width (virtual_screen.font, c);
+
+ if (dev_width == 0)
+ return 1;
+
+ return (dev_width + (virtual_screen.normal_char_width - 1))
+ / virtual_screen.normal_char_width;
+}
+
+static grub_uint16_t
+grub_virtual_screen_getwh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ return (virtual_screen.columns << 8) | virtual_screen.rows;
+}
+
+static grub_uint16_t
+grub_virtual_screen_getxy (struct grub_term_output *term __attribute__ ((unused)))
+{
+ return ((virtual_screen.cursor_x << 8) | virtual_screen.cursor_y);
+}
+
+static void
+grub_gfxterm_gotoxy (struct grub_term_output *term __attribute__ ((unused)),
+ grub_uint8_t x, grub_uint8_t y)
+{
+ if (x >= virtual_screen.columns)
+ x = virtual_screen.columns - 1;
+
+ if (y >= virtual_screen.rows)
+ y = virtual_screen.rows - 1;
+
+ /* Erase current cursor, if any. */
+ if (virtual_screen.cursor_state)
+ draw_cursor (0);
+
+ virtual_screen.cursor_x = x;
+ virtual_screen.cursor_y = y;
+
+ /* Draw cursor if visible. */
+ if (virtual_screen.cursor_state)
+ draw_cursor (1);
+}
+
+static void
+grub_virtual_screen_cls (struct grub_term_output *term __attribute__ ((unused)))
+{
+ grub_uint32_t i;
+
+ for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
+ clear_char (&(virtual_screen.text_buffer[i]));
+
+ virtual_screen.cursor_x = virtual_screen.cursor_y = 0;
+}
+
+static void
+grub_gfxterm_cls (struct grub_term_output *term)
+{
+ grub_video_color_t color;
+
+ /* Clear virtual screen. */
+ grub_virtual_screen_cls (term);
+
+ /* Clear text layer. */
+ grub_video_set_active_render_target (text_layer);
+ color = virtual_screen.bg_color;
+ grub_video_fill_rect (color, 0, 0,
+ virtual_screen.width, virtual_screen.height);
+ grub_video_set_active_render_target (render_target);
+
+ /* Mark virtual screen to be redrawn. */
+ dirty_region_add_virtualscreen ();
+
+ grub_gfxterm_refresh (term);
+}
+
+static void
+grub_virtual_screen_setcolorstate (struct grub_term_output *term,
+ grub_term_color_state state)
+{
+ switch (state)
+ {
+ case GRUB_TERM_COLOR_STANDARD:
+ virtual_screen.term_color = virtual_screen.standard_color_setting;
+ break;
+
+ case GRUB_TERM_COLOR_NORMAL:
+ virtual_screen.term_color = term->normal_color;
+ break;
+
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ virtual_screen.term_color = term->highlight_color;
+ break;
+
+ default:
+ break;
+ }
+
+ /* Change color to virtual terminal. */
+ set_term_color (virtual_screen.term_color);
+}
+
+static void
+grub_gfxterm_setcursor (struct grub_term_output *term __attribute__ ((unused)),
+ int on)
+{
+ if (virtual_screen.cursor_state != on)
+ {
+ if (virtual_screen.cursor_state)
+ draw_cursor (0);
+ else
+ draw_cursor (1);
+
+ virtual_screen.cursor_state = on;
+ }
+}
+
+static void
+grub_gfxterm_refresh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ real_scroll ();
+
+ /* Redraw only changed regions. */
+ dirty_region_redraw ();
+
+ grub_video_swap_buffers ();
+
+ if (window.double_repaint)
+ dirty_region_redraw ();
+ dirty_region_reset ();
+}
+
+void
+grub_gfxterm_set_repaint_callback (grub_gfxterm_repaint_callback_t func)
+{
+ repaint_callback = func;
+}
+
+/* Option array indices. */
+#define BACKGROUND_CMD_ARGINDEX_MODE 0
+
+static const struct grub_arg_option background_image_cmd_options[] =
+ {
+ {"mode", 'm', 0, "Background image mode.", "stretch|normal",
+ ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+ };
+
+static grub_err_t
+grub_gfxterm_background_image_cmd (grub_extcmd_context_t ctxt,
+ int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+
+ /* Check that we have video adapter active. */
+ if (grub_video_get_info(NULL) != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Destroy existing background bitmap if loaded. */
+ if (bitmap)
+ {
+ grub_video_bitmap_destroy (bitmap);
+ bitmap = 0;
+
+ /* Mark whole screen as dirty. */
+ dirty_region_add (0, 0, window.width, window.height);
+ }
+
+ /* If filename was provided, try to load that. */
+ if (argc >= 1)
+ {
+ /* Try to load new one. */
+ grub_video_bitmap_load (&bitmap, args[0]);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Determine if the bitmap should be scaled to fit the screen. */
+ if (!state[BACKGROUND_CMD_ARGINDEX_MODE].set
+ || grub_strcmp (state[BACKGROUND_CMD_ARGINDEX_MODE].arg,
+ "stretch") == 0)
+ {
+ if (window.width != grub_video_bitmap_get_width (bitmap)
+ || window.height != grub_video_bitmap_get_height (bitmap))
+ {
+ struct grub_video_bitmap *scaled_bitmap;
+ grub_video_bitmap_create_scaled (&scaled_bitmap,
+ window.width,
+ window.height,
+ bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ if (grub_errno == GRUB_ERR_NONE)
+ {
+ /* Replace the original bitmap with the scaled one. */
+ grub_video_bitmap_destroy (bitmap);
+ bitmap = scaled_bitmap;
+ }
+ }
+ }
+
+ /* If bitmap was loaded correctly, display it. */
+ if (bitmap)
+ {
+ /* Determine bitmap dimensions. */
+ bitmap_width = grub_video_bitmap_get_width (bitmap);
+ bitmap_height = grub_video_bitmap_get_height (bitmap);
+
+ /* Mark whole screen as dirty. */
+ dirty_region_add (0, 0, window.width, window.height);
+ }
+ }
+
+ /* All was ok. */
+ grub_errno = GRUB_ERR_NONE;
+ return grub_errno;
+}
+
+static struct grub_term_output grub_video_term =
+ {
+ .name = "gfxterm",
+ .init = grub_gfxterm_term_init,
+ .fini = grub_gfxterm_term_fini,
+ .putchar = grub_gfxterm_putchar,
+ .getcharwidth = grub_gfxterm_getcharwidth,
+ .getwh = grub_virtual_screen_getwh,
+ .getxy = grub_virtual_screen_getxy,
+ .gotoxy = grub_gfxterm_gotoxy,
+ .cls = grub_gfxterm_cls,
+ .setcolorstate = grub_virtual_screen_setcolorstate,
+ .setcursor = grub_gfxterm_setcursor,
+ .refresh = grub_gfxterm_refresh,
+ .flags = GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS,
+ .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
+ .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
+ .next = 0
+ };
+
+static grub_extcmd_t background_image_cmd_handle;
+
+GRUB_MOD_INIT(gfxterm)
+{
+ grub_term_register_output ("gfxterm", &grub_video_term);
+ background_image_cmd_handle =
+ grub_register_extcmd ("background_image",
+ grub_gfxterm_background_image_cmd, 0,
+ N_("[-m (stretch|normal)] FILE"),
+ N_("Load background image for active terminal."),
+ background_image_cmd_options);
+}
+
+GRUB_MOD_FINI(gfxterm)
+{
+ grub_unregister_extcmd (background_image_cmd_handle);
+ grub_term_unregister_output (&grub_video_term);
+}
diff --git a/grub-core/term/i386/pc/console.c b/grub-core/term/i386/pc/console.c
new file mode 100644
index 0000000..0efeafe
--- /dev/null
+++ b/grub-core/term/i386/pc/console.c
@@ -0,0 +1,68 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/machine/memory.h>
+#include <grub/machine/console.h>
+#include <grub/term.h>
+#include <grub/types.h>
+
+static const struct grub_machine_bios_data_area *bios_data_area =
+ (struct grub_machine_bios_data_area *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;
+
+static int
+grub_console_getkeystatus (struct grub_term_input *term __attribute__ ((unused)))
+{
+ /* conveniently GRUB keystatus is modelled after BIOS one. */
+ return bios_data_area->keyboard_flag_lower & ~0x80;
+}
+
+static struct grub_term_input grub_console_term_input =
+ {
+ .name = "console",
+ .getkey = grub_console_getkey,
+ .getkeystatus = grub_console_getkeystatus
+ };
+
+static struct grub_term_output grub_console_term_output =
+ {
+ .name = "console",
+ .putchar = grub_console_putchar,
+ .getwh = grub_console_getwh,
+ .getxy = grub_console_getxy,
+ .gotoxy = grub_console_gotoxy,
+ .cls = grub_console_cls,
+ .setcolorstate = grub_console_setcolorstate,
+ .setcursor = grub_console_setcursor,
+ .flags = GRUB_TERM_CODE_TYPE_CP437,
+ .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
+ .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
+ };
+
+void
+grub_console_init (void)
+{
+ grub_term_register_output ("console", &grub_console_term_output);
+ grub_term_register_input ("console", &grub_console_term_input);
+}
+
+void
+grub_console_fini (void)
+{
+ grub_term_unregister_input (&grub_console_term_input);
+ grub_term_unregister_output (&grub_console_term_output);
+}
diff --git a/grub-core/term/i386/pc/vga_text.c b/grub-core/term/i386/pc/vga_text.c
new file mode 100644
index 0000000..1816bfa
--- /dev/null
+++ b/grub-core/term/i386/pc/vga_text.c
@@ -0,0 +1,175 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/i386/vga_common.h>
+#include <grub/i386/io.h>
+#include <grub/types.h>
+#include <grub/vga.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define COLS 80
+#define ROWS 25
+
+static int grub_curr_x, grub_curr_y;
+
+#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb8000)
+
+static void
+screen_write_char (int x, int y, short c)
+{
+ VGA_TEXT_SCREEN[y * COLS + x] = c;
+}
+
+static short
+screen_read_char (int x, int y)
+{
+ return VGA_TEXT_SCREEN[y * COLS + x];
+}
+
+static void
+update_cursor (void)
+{
+ unsigned int pos = grub_curr_y * COLS + grub_curr_x;
+ grub_vga_cr_write (pos >> 8, GRUB_VGA_CR_CURSOR_ADDR_HIGH);
+ grub_vga_cr_write (pos & 0xFF, GRUB_VGA_CR_CURSOR_ADDR_LOW);
+}
+
+static void
+inc_y (void)
+{
+ grub_curr_x = 0;
+ if (grub_curr_y < ROWS - 1)
+ grub_curr_y++;
+ else
+ {
+ int x, y;
+ for (y = 0; y < ROWS - 1; y++)
+ for (x = 0; x < COLS; x++)
+ screen_write_char (x, y, screen_read_char (x, y + 1));
+ for (x = 0; x < COLS; x++)
+ screen_write_char (x, ROWS - 1, ' ' | (grub_console_cur_color << 8));
+ }
+}
+
+static void
+inc_x (void)
+{
+ if (grub_curr_x >= COLS - 1)
+ inc_y ();
+ else
+ grub_curr_x++;
+}
+
+static void
+grub_vga_text_putchar (struct grub_term_output *term __attribute__ ((unused)),
+ const struct grub_unicode_glyph *c)
+{
+ switch (c->base)
+ {
+ case '\b':
+ if (grub_curr_x != 0)
+ screen_write_char (grub_curr_x--, grub_curr_y, ' ');
+ break;
+ case '\n':
+ inc_y ();
+ break;
+ case '\r':
+ grub_curr_x = 0;
+ break;
+ default:
+ screen_write_char (grub_curr_x, grub_curr_y,
+ c->base | (grub_console_cur_color << 8));
+ inc_x ();
+ }
+
+ update_cursor ();
+}
+
+static grub_uint16_t
+grub_vga_text_getxy (struct grub_term_output *term __attribute__ ((unused)))
+{
+ return (grub_curr_x << 8) | grub_curr_y;
+}
+
+static void
+grub_vga_text_gotoxy (struct grub_term_output *term __attribute__ ((unused)),
+ grub_uint8_t x, grub_uint8_t y)
+{
+ grub_curr_x = x;
+ grub_curr_y = y;
+ update_cursor ();
+}
+
+static void
+grub_vga_text_cls (struct grub_term_output *term)
+{
+ int i;
+ for (i = 0; i < ROWS * COLS; i++)
+ VGA_TEXT_SCREEN[i] = ' ' | (grub_console_cur_color << 8);
+ grub_vga_text_gotoxy (term, 0, 0);
+}
+
+static void
+grub_vga_text_setcursor (struct grub_term_output *term __attribute__ ((unused)),
+ int on)
+{
+ grub_uint8_t old;
+ old = grub_vga_cr_read (GRUB_VGA_CR_CURSOR_START);
+ if (on)
+ grub_vga_cr_write (old & ~GRUB_VGA_CR_CURSOR_START_DISABLE,
+ GRUB_VGA_CR_CURSOR_START);
+ else
+ grub_vga_cr_write (old | GRUB_VGA_CR_CURSOR_START_DISABLE,
+ GRUB_VGA_CR_CURSOR_START);
+}
+
+static grub_err_t
+grub_vga_text_init_fini (struct grub_term_output *term)
+{
+ grub_vga_text_cls (term);
+ return 0;
+}
+
+static struct grub_term_output grub_vga_text_term =
+ {
+ .name = "vga_text",
+ .init = grub_vga_text_init_fini,
+ .fini = grub_vga_text_init_fini,
+ .putchar = grub_vga_text_putchar,
+ .getwh = grub_console_getwh,
+ .getxy = grub_vga_text_getxy,
+ .gotoxy = grub_vga_text_gotoxy,
+ .cls = grub_vga_text_cls,
+ .setcolorstate = grub_console_setcolorstate,
+ .setcursor = grub_vga_text_setcursor,
+ .flags = GRUB_TERM_CODE_TYPE_CP437,
+ .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
+ .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
+ };
+
+GRUB_MOD_INIT(vga_text)
+{
+ grub_term_register_output ("vga_text", &grub_vga_text_term);
+}
+
+GRUB_MOD_FINI(vga_text)
+{
+ grub_term_unregister_output (&grub_vga_text_term);
+}
diff --git a/grub-core/term/i386/vga_common.c b/grub-core/term/i386/vga_common.c
new file mode 100644
index 0000000..0c21769
--- /dev/null
+++ b/grub-core/term/i386/vga_common.c
@@ -0,0 +1,48 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2002,2003,2005,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/i386/vga_common.h>
+#include <grub/term.h>
+#include <grub/types.h>
+
+grub_uint8_t grub_console_cur_color = 0x7;
+
+grub_uint16_t
+grub_console_getwh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ return (80 << 8) | 25;
+}
+
+void
+grub_console_setcolorstate (struct grub_term_output *term,
+ grub_term_color_state state)
+{
+ switch (state) {
+ case GRUB_TERM_COLOR_STANDARD:
+ grub_console_cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR & 0x7f;
+ break;
+ case GRUB_TERM_COLOR_NORMAL:
+ grub_console_cur_color = term->normal_color & 0x7f;
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ grub_console_cur_color = term->highlight_color & 0x7f;
+ break;
+ default:
+ break;
+ }
+}
diff --git a/grub-core/term/ieee1275/ofconsole.c b/grub-core/term/ieee1275/ofconsole.c
new file mode 100644
index 0000000..ab74f21
--- /dev/null
+++ b/grub-core/term/ieee1275/ofconsole.c
@@ -0,0 +1,249 @@
+/* ofconsole.c -- Open Firmware console for GRUB. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/term.h>
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/time.h>
+#include <grub/terminfo.h>
+#include <grub/ieee1275/console.h>
+#include <grub/ieee1275/ieee1275.h>
+
+static grub_ieee1275_ihandle_t stdout_ihandle;
+static grub_ieee1275_ihandle_t stdin_ihandle;
+
+extern struct grub_terminfo_output_state grub_ofconsole_terminfo_output;
+
+struct color
+{
+ int red;
+ int green;
+ int blue;
+};
+
+/* Use serial colors as they are default on most firmwares and some firmwares
+ ignore set-color!. Additionally output may be redirected to serial. */
+static struct color colors[] =
+ {
+ // {R, G, B}
+ {0x00, 0x00, 0x00}, // 0 = black
+ {0xA8, 0x00, 0x00}, // 1 = red
+ {0x00, 0xA8, 0x00}, // 2 = green
+ {0xFE, 0xFE, 0x54}, // 3 = yellow
+ {0x00, 0x00, 0xA8}, // 4 = blue
+ {0xA8, 0x00, 0xA8}, // 5 = magenta
+ {0x00, 0xA8, 0xA8}, // 6 = cyan
+ {0xFE, 0xFE, 0xFE} // 7 = white
+ };
+
+static void
+put (struct grub_term_output *term __attribute__ ((unused)), const int c)
+{
+ char chr = c;
+
+ grub_ieee1275_write (stdout_ihandle, &chr, 1, 0);
+}
+
+static int
+readkey (struct grub_term_input *term __attribute__ ((unused)))
+{
+ grub_uint8_t c;
+ grub_ssize_t actual = 0;
+
+ grub_ieee1275_read (stdin_ihandle, &c, 1, &actual);
+ if (actual > 0)
+ return c;
+ return -1;
+}
+
+static void
+grub_ofconsole_dimensions (void)
+{
+ grub_ieee1275_ihandle_t options;
+ grub_ssize_t lval;
+
+ if (! grub_ieee1275_finddevice ("/options", &options)
+ && options != (grub_ieee1275_ihandle_t) -1)
+ {
+ if (! grub_ieee1275_get_property_length (options, "screen-#columns",
+ &lval)
+ && lval >= 0 && lval < 1024)
+ {
+ char val[lval];
+
+ if (! grub_ieee1275_get_property (options, "screen-#columns",
+ val, lval, 0))
+ grub_ofconsole_terminfo_output.width
+ = (grub_uint8_t) grub_strtoul (val, 0, 10);
+ }
+ if (! grub_ieee1275_get_property_length (options, "screen-#rows", &lval)
+ && lval >= 0 && lval < 1024)
+ {
+ char val[lval];
+ if (! grub_ieee1275_get_property (options, "screen-#rows",
+ val, lval, 0))
+ grub_ofconsole_terminfo_output.height
+ = (grub_uint8_t) grub_strtoul (val, 0, 10);
+ }
+ }
+
+ /* Use a small console by default. */
+ if (! grub_ofconsole_terminfo_output.width)
+ grub_ofconsole_terminfo_output.width = 80;
+ if (! grub_ofconsole_terminfo_output.height)
+ grub_ofconsole_terminfo_output.height = 24;
+}
+
+static void
+grub_ofconsole_setcursor (struct grub_term_output *term,
+ int on)
+{
+ grub_terminfo_setcursor (term, on);
+
+ if (!grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_HAS_CURSORONOFF))
+ return;
+
+ /* Understood by the Open Firmware flavour in OLPC. */
+ if (on)
+ grub_ieee1275_interpret ("cursor-on", 0);
+ else
+ grub_ieee1275_interpret ("cursor-off", 0);
+}
+
+static grub_err_t
+grub_ofconsole_init_input (struct grub_term_input *term)
+{
+ grub_ssize_t actual;
+
+ if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdin", &stdin_ihandle,
+ sizeof stdin_ihandle, &actual)
+ || actual != sizeof stdin_ihandle)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot find stdin");
+
+ return grub_terminfo_input_init (term);
+}
+
+static grub_err_t
+grub_ofconsole_init_output (struct grub_term_output *term)
+{
+ grub_ssize_t actual;
+
+ /* The latest PowerMacs don't actually initialize the screen for us, so we
+ * use this trick to re-open the output device (but we avoid doing this on
+ * platforms where it's known to be broken). */
+ if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT))
+ grub_ieee1275_interpret ("output-device output", 0);
+
+ if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdout", &stdout_ihandle,
+ sizeof stdout_ihandle, &actual)
+ || actual != sizeof stdout_ihandle)
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot find stdout");
+
+ /* Initialize colors. */
+ if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS))
+ {
+ unsigned col;
+ for (col = 0; col < ARRAY_SIZE (colors); col++)
+ grub_ieee1275_set_color (stdout_ihandle, col, colors[col].red,
+ colors[col].green, colors[col].blue);
+
+ /* Set the right fg and bg colors. */
+ grub_terminfo_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
+ }
+
+ grub_ofconsole_dimensions ();
+
+ grub_terminfo_output_init (term);
+
+ return 0;
+}
+
+
+
+struct grub_terminfo_input_state grub_ofconsole_terminfo_input =
+ {
+ .readkey = readkey
+ };
+
+struct grub_terminfo_output_state grub_ofconsole_terminfo_output =
+ {
+ .put = put,
+ .width = 80,
+ .height = 24
+ };
+
+static struct grub_term_input grub_ofconsole_term_input =
+ {
+ .name = "ofconsole",
+ .init = grub_ofconsole_init_input,
+ .getkey = grub_terminfo_getkey,
+ .data = &grub_ofconsole_terminfo_input
+ };
+
+static struct grub_term_output grub_ofconsole_term_output =
+ {
+ .name = "ofconsole",
+ .init = grub_ofconsole_init_output,
+ .putchar = grub_terminfo_putchar,
+ .getxy = grub_terminfo_getxy,
+ .getwh = grub_terminfo_getwh,
+ .gotoxy = grub_terminfo_gotoxy,
+ .cls = grub_terminfo_cls,
+ .setcolorstate = grub_terminfo_setcolorstate,
+ .setcursor = grub_ofconsole_setcursor,
+ .flags = GRUB_TERM_CODE_TYPE_ASCII,
+ .data = &grub_ofconsole_terminfo_output,
+ .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
+ .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
+ };
+
+void grub_terminfo_fini (void);
+void grub_terminfo_init (void);
+
+void
+grub_console_init_early (void)
+{
+ grub_term_register_input ("ofconsole", &grub_ofconsole_term_input);
+ grub_term_register_output ("ofconsole", &grub_ofconsole_term_output);
+}
+
+void
+grub_console_init_lately (void)
+{
+ const char *type;
+
+ if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_ANSI))
+ type = "dumb";
+ else
+ type = "ieee1275";
+
+ grub_terminfo_init ();
+ grub_terminfo_output_register (&grub_ofconsole_term_output, type);
+}
+
+void
+grub_console_fini (void)
+{
+ grub_term_unregister_input (&grub_ofconsole_term_input);
+ grub_term_unregister_output (&grub_ofconsole_term_output);
+ grub_terminfo_output_unregister (&grub_ofconsole_term_output);
+
+ grub_terminfo_fini ();
+}
diff --git a/grub-core/term/ns8250.c b/grub-core/term/ns8250.c
new file mode 100644
index 0000000..4be528d
--- /dev/null
+++ b/grub-core/term/ns8250.c
@@ -0,0 +1,278 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/serial.h>
+#include <grub/ns8250.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/cpu/io.h>
+#include <grub/mm.h>
+#include <grub/time.h>
+
+#ifdef GRUB_MACHINE_PCBIOS
+#include <grub/machine/memory.h>
+static const unsigned short *serial_hw_io_addr = (const unsigned short *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;
+#define GRUB_SERIAL_PORT_NUM 4
+#else
+#include <grub/machine/serial.h>
+static const grub_port_t serial_hw_io_addr[] = GRUB_MACHINE_SERIAL_PORTS;
+#define GRUB_SERIAL_PORT_NUM (ARRAY_SIZE(serial_hw_io_addr))
+#endif
+
+/* Convert speed to divisor. */
+static unsigned short
+serial_get_divisor (unsigned int speed)
+{
+ unsigned int i;
+
+ /* The structure for speed vs. divisor. */
+ struct divisor
+ {
+ unsigned int speed;
+ unsigned short div;
+ };
+
+ /* The table which lists common configurations. */
+ /* 1843200 / (speed * 16) */
+ static struct divisor divisor_tab[] =
+ {
+ { 2400, 0x0030 },
+ { 4800, 0x0018 },
+ { 9600, 0x000C },
+ { 19200, 0x0006 },
+ { 38400, 0x0003 },
+ { 57600, 0x0002 },
+ { 115200, 0x0001 }
+ };
+
+ /* Set the baud rate. */
+ for (i = 0; i < ARRAY_SIZE (divisor_tab); i++)
+ if (divisor_tab[i].speed == speed)
+ /* UART in Yeeloong runs twice the usual rate. */
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+ return 2 * divisor_tab[i].div;
+#else
+ return divisor_tab[i].div;
+#endif
+ return 0;
+}
+
+static void
+do_real_config (struct grub_serial_port *port)
+{
+ int divisor;
+ unsigned char status = 0;
+ const unsigned char parities[] = {
+ [GRUB_SERIAL_PARITY_NONE] = UART_NO_PARITY,
+ [GRUB_SERIAL_PARITY_ODD] = UART_ODD_PARITY,
+ [GRUB_SERIAL_PARITY_EVEN] = UART_EVEN_PARITY
+ };
+ const unsigned char stop_bits[] = {
+ [GRUB_SERIAL_STOP_BITS_1] = UART_1_STOP_BIT,
+ [GRUB_SERIAL_STOP_BITS_2] = UART_2_STOP_BITS,
+ };
+
+ if (port->configured)
+ return;
+
+ port->broken = 0;
+
+ divisor = serial_get_divisor (port->config.speed);
+
+ /* Turn off the interrupt. */
+ grub_outb (0, port->port + UART_IER);
+
+ /* Set DLAB. */
+ grub_outb (UART_DLAB, port->port + UART_LCR);
+
+ /* Set the baud rate. */
+ grub_outb (divisor & 0xFF, port->port + UART_DLL);
+ grub_outb (divisor >> 8, port->port + UART_DLH);
+
+ /* Set the line status. */
+ status |= (parities[port->config.parity]
+ | (port->config.word_len - 5)
+ | stop_bits[port->config.stop_bits]);
+ grub_outb (status, port->port + UART_LCR);
+
+ /* In Yeeloong serial port has only 3 wires. */
+#ifndef GRUB_MACHINE_MIPS_YEELOONG
+ /* Enable the FIFO. */
+ grub_outb (UART_ENABLE_FIFO_TRIGGER1, port->port + UART_FCR);
+
+ /* Turn on DTR and RTS. */
+ grub_outb (UART_ENABLE_DTRRTS, port->port + UART_MCR);
+#else
+ /* Enable the FIFO. */
+ grub_outb (UART_ENABLE_FIFO_TRIGGER14, port->port + UART_FCR);
+
+ /* Turn on DTR, RTS, and OUT2. */
+ grub_outb (UART_ENABLE_DTRRTS | UART_ENABLE_OUT2, port->port + UART_MCR);
+#endif
+
+ /* Drain the input buffer. */
+ while (grub_inb (port->port + UART_LSR) & UART_DATA_READY)
+ grub_inb (port->port + UART_RX);
+
+ port->configured = 1;
+}
+
+/* Fetch a key. */
+static int
+serial_hw_fetch (struct grub_serial_port *port)
+{
+ do_real_config (port);
+ if (grub_inb (port->port + UART_LSR) & UART_DATA_READY)
+ return grub_inb (port->port + UART_RX);
+
+ return -1;
+}
+
+/* Put a character. */
+static void
+serial_hw_put (struct grub_serial_port *port, const int c)
+{
+ grub_uint64_t endtime;
+
+ do_real_config (port);
+
+ if (port->broken > 5)
+ endtime = grub_get_time_ms ();
+ else if (port->broken > 1)
+ endtime = grub_get_time_ms () + 50;
+ else
+ endtime = grub_get_time_ms () + 200;
+ /* Wait until the transmitter holding register is empty. */
+ while ((grub_inb (port->port + UART_LSR) & UART_EMPTY_TRANSMITTER) == 0)
+ {
+ if (grub_get_time_ms () > endtime)
+ {
+ port->broken++;
+ /* There is something wrong. But what can I do? */
+ return;
+ }
+ }
+
+ if (port->broken)
+ port->broken--;
+
+ grub_outb (c, port->port + UART_TX);
+}
+
+/* Initialize a serial device. PORT is the port number for a serial device.
+ SPEED is a DTE-DTE speed which must be one of these: 2400, 4800, 9600,
+ 19200, 38400, 57600 and 115200. WORD_LEN is the word length to be used
+ for the device. Likewise, PARITY is the type of the parity and
+ STOP_BIT_LEN is the length of the stop bit. The possible values for
+ WORD_LEN, PARITY and STOP_BIT_LEN are defined in the header file as
+ macros. */
+static grub_err_t
+serial_hw_configure (struct grub_serial_port *port,
+ struct grub_serial_config *config)
+{
+ unsigned short divisor;
+
+ divisor = serial_get_divisor (config->speed);
+ if (divisor == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
+
+ if (config->parity != GRUB_SERIAL_PARITY_NONE
+ && config->parity != GRUB_SERIAL_PARITY_ODD
+ && config->parity != GRUB_SERIAL_PARITY_EVEN)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported parity");
+
+ if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
+ && config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported stop bits");
+
+ if (config->word_len < 5 || config->word_len > 8)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported word length");
+
+ port->config = *config;
+ port->configured = 0;
+
+ /* FIXME: should check if the serial terminal was found. */
+
+ return GRUB_ERR_NONE;
+}
+
+struct grub_serial_driver grub_ns8250_driver =
+ {
+ .configure = serial_hw_configure,
+ .fetch = serial_hw_fetch,
+ .put = serial_hw_put
+ };
+
+static char com_names[GRUB_SERIAL_PORT_NUM][20];
+static struct grub_serial_port com_ports[GRUB_SERIAL_PORT_NUM];
+
+void
+grub_ns8250_init (void)
+{
+ unsigned i;
+ for (i = 0; i < GRUB_SERIAL_PORT_NUM; i++)
+ if (serial_hw_io_addr[i])
+ {
+ grub_err_t err;
+ grub_snprintf (com_names[i], sizeof (com_names[i]), "com%d", i);
+ com_ports[i].name = com_names[i];
+ com_ports[i].driver = &grub_ns8250_driver;
+ com_ports[i].port = serial_hw_io_addr[i];
+ err = grub_serial_config_defaults (&com_ports[i]);
+ if (err)
+ grub_print_error ();
+
+ grub_serial_register (&com_ports[i]);
+ }
+}
+
+/* Return the port number for the UNITth serial device. */
+grub_port_t
+grub_ns8250_hw_get_port (const unsigned int unit)
+{
+ if (unit < GRUB_SERIAL_PORT_NUM)
+ return serial_hw_io_addr[unit];
+ else
+ return 0;
+}
+
+char *
+grub_serial_ns8250_add_port (grub_port_t port)
+{
+ struct grub_serial_port *p;
+ unsigned i;
+ for (i = 0; i < GRUB_SERIAL_PORT_NUM; i++)
+ if (com_ports[i].port == port)
+ return com_names[i];
+ p = grub_malloc (sizeof (*p));
+ if (!p)
+ return NULL;
+ p->name = grub_xasprintf ("port%lx", (unsigned long) port);
+ if (!p->name)
+ {
+ grub_free (p);
+ return NULL;
+ }
+ p->driver = &grub_ns8250_driver;
+ grub_serial_config_defaults (p);
+ p->port = port;
+ grub_serial_register (p);
+
+ return p->name;
+}
diff --git a/grub-core/term/serial.c b/grub-core/term/serial.c
new file mode 100644
index 0000000..073c27a
--- /dev/null
+++ b/grub-core/term/serial.c
@@ -0,0 +1,372 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/serial.h>
+#include <grub/term.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/terminfo.h>
+#include <grub/cpu/io.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/list.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define FOR_SERIAL_PORTS(var) FOR_LIST_ELEMENTS((var), (grub_serial_ports))
+
+/* Argument options. */
+static const struct grub_arg_option options[] =
+{
+ {"unit", 'u', 0, N_("Set the serial unit."), 0, ARG_TYPE_INT},
+ {"port", 'p', 0, N_("Set the serial port address."), 0, ARG_TYPE_STRING},
+ {"speed", 's', 0, N_("Set the serial port speed."), 0, ARG_TYPE_INT},
+ {"word", 'w', 0, N_("Set the serial port word length."), 0, ARG_TYPE_INT},
+ {"parity", 'r', 0, N_("Set the serial port parity."), 0, ARG_TYPE_STRING},
+ {"stop", 't', 0, N_("Set the serial port stop bits."), 0, ARG_TYPE_INT},
+ {0, 0, 0, 0, 0, 0}
+};
+
+static struct grub_serial_port *grub_serial_ports;
+
+struct grub_serial_output_state
+{
+ struct grub_terminfo_output_state tinfo;
+ struct grub_serial_port *port;
+};
+
+struct grub_serial_input_state
+{
+ struct grub_terminfo_input_state tinfo;
+ struct grub_serial_port *port;
+};
+
+static void
+serial_put (grub_term_output_t term, const int c)
+{
+ struct grub_serial_output_state *data = term->data;
+ data->port->driver->put (data->port, c);
+}
+
+static int
+serial_fetch (grub_term_input_t term)
+{
+ struct grub_serial_input_state *data = term->data;
+ return data->port->driver->fetch (data->port);
+}
+
+static const struct grub_serial_input_state grub_serial_terminfo_input_template =
+ {
+ .tinfo =
+ {
+ .readkey = serial_fetch
+ }
+ };
+
+static const struct grub_serial_output_state grub_serial_terminfo_output_template =
+ {
+ .tinfo =
+ {
+ .put = serial_put,
+ .width = 80,
+ .height = 24
+ }
+ };
+
+static struct grub_serial_input_state grub_serial_terminfo_input;
+
+static struct grub_serial_output_state grub_serial_terminfo_output;
+
+static int registered = 0;
+
+static struct grub_term_input grub_serial_term_input =
+{
+ .name = "serial",
+ .init = grub_terminfo_input_init,
+ .getkey = grub_terminfo_getkey,
+ .data = &grub_serial_terminfo_input
+};
+
+static struct grub_term_output grub_serial_term_output =
+{
+ .name = "serial",
+ .init = grub_terminfo_output_init,
+ .putchar = grub_terminfo_putchar,
+ .getwh = grub_terminfo_getwh,
+ .getxy = grub_terminfo_getxy,
+ .gotoxy = grub_terminfo_gotoxy,
+ .cls = grub_terminfo_cls,
+ .setcolorstate = grub_terminfo_setcolorstate,
+ .setcursor = grub_terminfo_setcursor,
+ .flags = GRUB_TERM_CODE_TYPE_ASCII,
+ .data = &grub_serial_terminfo_output,
+ .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
+ .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
+};
+
+
+
+static struct grub_serial_port *
+grub_serial_find (char *name)
+{
+ struct grub_serial_port *port;
+
+ FOR_SERIAL_PORTS (port)
+ if (grub_strcmp (port->name, name) == 0)
+ break;
+
+#ifndef GRUB_MACHINE_EMU
+ if (!port && grub_memcmp (name, "port", sizeof ("port") - 1) == 0
+ && grub_isdigit (name [sizeof ("port") - 1]))
+ {
+ name = grub_serial_ns8250_add_port (grub_strtoul (&name[sizeof ("port") - 1],
+ 0, 16));
+ if (!name)
+ return NULL;
+
+ FOR_SERIAL_PORTS (port)
+ if (grub_strcmp (port->name, name) == 0)
+ break;
+ }
+#endif
+
+ return port;
+}
+
+static grub_err_t
+grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_arg_list *state = ctxt->state;
+ char pname[40];
+ char *name = NULL;
+ struct grub_serial_port *port;
+ struct grub_serial_config config;
+ grub_err_t err;
+
+ if (state[0].set)
+ {
+ grub_snprintf (pname, sizeof (pname), "com%ld",
+ grub_strtoul (state[0].arg, 0, 0));
+ name = pname;
+ }
+
+ if (state[1].set)
+ {
+ grub_snprintf (pname, sizeof (pname), "port%lx",
+ grub_strtoul (state[1].arg, 0, 0));
+ name = pname;
+ }
+
+ if (argc >= 1)
+ name = args[0];
+
+ if (!name)
+ name = "com0";
+
+ port = grub_serial_find (name);
+ if (!port)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown serial port");
+
+ config = port->config;
+
+ if (state[2].set)
+ config.speed = grub_strtoul (state[2].arg, 0, 0);
+
+ if (state[3].set)
+ config.word_len = grub_strtoul (state[3].arg, 0, 0);
+
+ if (state[4].set)
+ {
+ if (! grub_strcmp (state[4].arg, "no"))
+ config.parity = GRUB_SERIAL_PARITY_NONE;
+ else if (! grub_strcmp (state[4].arg, "odd"))
+ config.parity = GRUB_SERIAL_PARITY_ODD;
+ else if (! grub_strcmp (state[4].arg, "even"))
+ config.parity = GRUB_SERIAL_PARITY_EVEN;
+ else
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad parity");
+ }
+
+ if (state[5].set)
+ {
+ if (! grub_strcmp (state[5].arg, "1"))
+ config.stop_bits = GRUB_SERIAL_STOP_BITS_1;
+ else if (! grub_strcmp (state[5].arg, "2"))
+ config.stop_bits = GRUB_SERIAL_STOP_BITS_2;
+ else
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad number of stop bits");
+ }
+
+ /* Initialize with new settings. */
+ err = port->driver->configure (port, &config);
+ if (err)
+ return err;
+#ifndef GRUB_MACHINE_EMU
+ /* Compatibility kludge. */
+ if (port->driver == &grub_ns8250_driver)
+ {
+ if (!registered)
+ {
+ grub_terminfo_output_register (&grub_serial_term_output, "vt100");
+
+ grub_term_register_input ("serial", &grub_serial_term_input);
+ grub_term_register_output ("serial", &grub_serial_term_output);
+ }
+ grub_serial_terminfo_output.port = port;
+ grub_serial_terminfo_input.port = port;
+ registered = 1;
+ }
+#endif
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_serial_register (struct grub_serial_port *port)
+{
+ struct grub_term_input *in;
+ struct grub_term_output *out;
+ struct grub_serial_input_state *indata;
+ struct grub_serial_output_state *outdata;
+
+ in = grub_malloc (sizeof (*in));
+ if (!in)
+ return grub_errno;
+
+ indata = grub_malloc (sizeof (*indata));
+ if (!indata)
+ {
+ grub_free (in);
+ return grub_errno;
+ }
+
+ grub_memcpy (in, &grub_serial_term_input, sizeof (*in));
+ in->data = indata;
+ in->name = grub_xasprintf ("serial_%s", port->name);
+ grub_memcpy (indata, &grub_serial_terminfo_input, sizeof (*indata));
+
+ if (!in->name)
+ {
+ grub_free (in);
+ grub_free (indata);
+ return grub_errno;
+ }
+
+ out = grub_malloc (sizeof (*out));
+ if (!out)
+ {
+ grub_free (in);
+ grub_free (indata);
+ grub_free ((char *) in->name);
+ return grub_errno;
+ }
+
+ outdata = grub_malloc (sizeof (*outdata));
+ if (!outdata)
+ {
+ grub_free (in);
+ grub_free (indata);
+ grub_free ((char *) in->name);
+ grub_free (out);
+ return grub_errno;
+ }
+
+ grub_memcpy (out, &grub_serial_term_output, sizeof (*out));
+ out->data = outdata;
+ out->name = in->name;
+ grub_memcpy (outdata, &grub_serial_terminfo_output, sizeof (*outdata));
+
+ grub_list_push (GRUB_AS_LIST_P (&grub_serial_ports), GRUB_AS_LIST (port));
+ ((struct grub_serial_input_state *) in->data)->port = port;
+ ((struct grub_serial_output_state *) out->data)->port = port;
+ port->term_in = in;
+ port->term_out = out;
+ grub_terminfo_output_register (out, "vt100");
+#ifdef GRUB_MACHINE_MIPS_YEELOONG
+ if (grub_strcmp (port->name, "com0") == 0)
+ {
+ grub_term_register_input_active ("serial_*", in);
+ grub_term_register_output_active ("serial_*", out);
+ }
+ else
+#endif
+ {
+ grub_term_register_input ("serial_*", in);
+ grub_term_register_output ("serial_*", out);
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+void
+grub_serial_unregister (struct grub_serial_port *port)
+{
+ if (port->driver->fini)
+ port->driver->fini (port);
+
+ if (port->term_in)
+ grub_term_unregister_input (port->term_in);
+ if (port->term_out)
+ grub_term_unregister_output (port->term_out);
+
+ grub_list_remove (GRUB_AS_LIST_P (&grub_serial_ports), GRUB_AS_LIST (port));
+}
+
+void
+grub_serial_unregister_driver (struct grub_serial_driver *driver)
+{
+ struct grub_serial_port *port, *next;
+ for (port = grub_serial_ports; port; port = next)
+ {
+ next = port->next;
+ if (port->driver == driver)
+ grub_serial_unregister (port);
+ }
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(serial)
+{
+ cmd = grub_register_extcmd ("serial", grub_cmd_serial, 0,
+ N_("[OPTIONS...]"),
+ N_("Configure serial port."), options);
+ grub_memcpy (&grub_serial_terminfo_output,
+ &grub_serial_terminfo_output_template,
+ sizeof (grub_serial_terminfo_output));
+
+ grub_memcpy (&grub_serial_terminfo_input,
+ &grub_serial_terminfo_input_template,
+ sizeof (grub_serial_terminfo_input));
+
+#ifndef GRUB_MACHINE_EMU
+ grub_ns8250_init ();
+#endif
+}
+
+GRUB_MOD_FINI(serial)
+{
+ while (grub_serial_ports)
+ grub_serial_unregister (grub_serial_ports);
+ if (registered)
+ {
+ grub_term_unregister_input (&grub_serial_term_input);
+ grub_term_unregister_output (&grub_serial_term_output);
+ }
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
new file mode 100644
index 0000000..1615813
--- /dev/null
+++ b/grub-core/term/terminfo.c
@@ -0,0 +1,652 @@
+/* terminfo.c - simple terminfo module */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2003,2004,2005,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file contains various functions dealing with different
+ * terminal capabilities. For example, vt52 and vt100.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/term.h>
+#include <grub/terminfo.h>
+#include <grub/tparm.h>
+#include <grub/extcmd.h>
+#include <grub/i18n.h>
+#include <grub/time.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct grub_term_output *terminfo_outputs;
+
+/* Get current terminfo name. */
+char *
+grub_terminfo_get_current (struct grub_term_output *term)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+ return data->name;
+}
+
+/* Free *PTR and set *PTR to NULL, to prevent double-free. */
+static void
+grub_terminfo_free (char **ptr)
+{
+ grub_free (*ptr);
+ *ptr = 0;
+}
+
+static void
+grub_terminfo_all_free (struct grub_term_output *term)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ /* Free previously allocated memory. */
+ grub_terminfo_free (&data->name);
+ grub_terminfo_free (&data->gotoxy);
+ grub_terminfo_free (&data->cls);
+ grub_terminfo_free (&data->reverse_video_on);
+ grub_terminfo_free (&data->reverse_video_off);
+ grub_terminfo_free (&data->cursor_on);
+ grub_terminfo_free (&data->cursor_off);
+}
+
+/* Set current terminfo type. */
+grub_err_t
+grub_terminfo_set_current (struct grub_term_output *term,
+ const char *str)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+ /* TODO
+ * Lookup user specified terminfo type. If found, set term variables
+ * as appropriate. Otherwise return an error.
+ *
+ * How should this be done?
+ * a. A static table included in this module.
+ * - I do not like this idea.
+ * b. A table stored in the configuration directory.
+ * - Users must convert their terminfo settings if we have not already.
+ * c. Look for terminfo files in the configuration directory.
+ * - /usr/share/terminfo is 6.3M on my system.
+ * - /usr/share/terminfo is not on most users boot partition.
+ * + Copying the terminfo files you want to use to the grub
+ * configuration directory is easier then (b).
+ * d. Your idea here.
+ */
+
+ grub_terminfo_all_free (term);
+
+ if (grub_strcmp ("vt100", str) == 0)
+ {
+ data->name = grub_strdup ("vt100");
+ data->gotoxy = grub_strdup ("\e[%i%p1%d;%p2%dH");
+ data->cls = grub_strdup ("\e[H\e[J");
+ data->reverse_video_on = grub_strdup ("\e[7m");
+ data->reverse_video_off = grub_strdup ("\e[m");
+ data->cursor_on = grub_strdup ("\e[?25h");
+ data->cursor_off = grub_strdup ("\e[?25l");
+ data->setcolor = NULL;
+ return grub_errno;
+ }
+
+ if (grub_strcmp ("vt100-color", str) == 0)
+ {
+ data->name = grub_strdup ("vt100-color");
+ data->gotoxy = grub_strdup ("\e[%i%p1%d;%p2%dH");
+ data->cls = grub_strdup ("\e[H\e[J");
+ data->reverse_video_on = grub_strdup ("\e[7m");
+ data->reverse_video_off = grub_strdup ("\e[m");
+ data->cursor_on = grub_strdup ("\e[?25h");
+ data->cursor_off = grub_strdup ("\e[?25l");
+ data->setcolor = grub_strdup ("\e[3%p1%dm\e[4%p2%dm");
+ return grub_errno;
+ }
+
+ if (grub_strcmp ("ieee1275", str) == 0)
+ {
+ data->name = grub_strdup ("ieee1275");
+ data->gotoxy = grub_strdup ("\e[%i%p1%d;%p2%dH");
+ /* Clear the screen. Using serial console, screen(1) only recognizes the
+ * ANSI escape sequence. Using video console, Apple Open Firmware
+ * (version 3.1.1) only recognizes the literal ^L. So use both. */
+ data->cls = grub_strdup (" \e[2J");
+ data->reverse_video_on = grub_strdup ("\e[7m");
+ data->reverse_video_off = grub_strdup ("\e[m");
+ data->cursor_on = grub_strdup ("\e[?25h");
+ data->cursor_off = grub_strdup ("\e[?25l");
+ data->setcolor = grub_strdup ("\e[3%p1%dm\e[4%p2%dm");
+ return grub_errno;
+ }
+
+ if (grub_strcmp ("dumb", str) == 0)
+ {
+ data->name = grub_strdup ("dumb");
+ data->gotoxy = NULL;
+ data->cls = NULL;
+ data->reverse_video_on = NULL;
+ data->reverse_video_off = NULL;
+ data->cursor_on = NULL;
+ data->cursor_off = NULL;
+ data->setcolor = NULL;
+ return grub_errno;
+ }
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminfo type");
+}
+
+grub_err_t
+grub_terminfo_output_register (struct grub_term_output *term,
+ const char *type)
+{
+ grub_err_t err;
+ struct grub_terminfo_output_state *data;
+
+ err = grub_terminfo_set_current (term, type);
+
+ if (err)
+ return err;
+
+ data = (struct grub_terminfo_output_state *) term->data;
+ data->next = terminfo_outputs;
+ terminfo_outputs = term;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_terminfo_output_unregister (struct grub_term_output *term)
+{
+ struct grub_term_output **ptr;
+
+ for (ptr = &terminfo_outputs; *ptr;
+ ptr = &((struct grub_terminfo_output_state *) (*ptr)->data)->next)
+ if (*ptr == term)
+ {
+ grub_terminfo_all_free (term);
+ *ptr = ((struct grub_terminfo_output_state *) (*ptr)->data)->next;
+ return GRUB_ERR_NONE;
+ }
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "terminal not found");
+}
+
+/* Wrapper for grub_putchar to write strings. */
+static void
+putstr (struct grub_term_output *term, const char *str)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+ while (*str)
+ data->put (term, *str++);
+}
+
+grub_uint16_t
+grub_terminfo_getxy (struct grub_term_output *term)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ return ((data->xpos << 8) | data->ypos);
+}
+
+void
+grub_terminfo_gotoxy (struct grub_term_output *term,
+ grub_uint8_t x, grub_uint8_t y)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ if (x > grub_term_width (term) || y > grub_term_height (term))
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, "invalid point (%u,%u)", x, y);
+ return;
+ }
+
+ if (data->gotoxy)
+ putstr (term, grub_terminfo_tparm (data->gotoxy, y, x));
+ else
+ {
+ if ((y == data->ypos) && (x == data->xpos - 1))
+ data->put (term, '\b');
+ }
+
+ data->xpos = x;
+ data->ypos = y;
+}
+
+/* Clear the screen. */
+void
+grub_terminfo_cls (struct grub_term_output *term)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ putstr (term, grub_terminfo_tparm (data->cls));
+
+ data->xpos = data->ypos = 0;
+}
+
+void
+grub_terminfo_setcolorstate (struct grub_term_output *term,
+ const grub_term_color_state state)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ if (data->setcolor)
+ {
+ int fg;
+ int bg;
+ /* Map from VGA to terminal colors. */
+ const int colormap[8]
+ = { 0, /* Black. */
+ 4, /* Blue. */
+ 2, /* Green. */
+ 6, /* Cyan. */
+ 1, /* Red. */
+ 5, /* Magenta. */
+ 3, /* Yellow. */
+ 7, /* White. */
+ };
+
+ switch (state)
+ {
+ case GRUB_TERM_COLOR_STANDARD:
+ case GRUB_TERM_COLOR_NORMAL:
+ fg = term->normal_color & 0x0f;
+ bg = term->normal_color >> 4;
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ fg = term->highlight_color & 0x0f;
+ bg = term->highlight_color >> 4;
+ break;
+ default:
+ return;
+ }
+
+ putstr (term, grub_terminfo_tparm (data->setcolor, colormap[fg & 7],
+ colormap[bg & 7]));
+ return;
+ }
+
+ switch (state)
+ {
+ case GRUB_TERM_COLOR_STANDARD:
+ case GRUB_TERM_COLOR_NORMAL:
+ putstr (term, grub_terminfo_tparm (data->reverse_video_off));
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ putstr (term, grub_terminfo_tparm (data->reverse_video_on));
+ break;
+ default:
+ break;
+ }
+}
+
+void
+grub_terminfo_setcursor (struct grub_term_output *term, const int on)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ if (on)
+ putstr (term, grub_terminfo_tparm (data->cursor_on));
+ else
+ putstr (term, grub_terminfo_tparm (data->cursor_off));
+}
+
+/* The terminfo version of putchar. */
+void
+grub_terminfo_putchar (struct grub_term_output *term,
+ const struct grub_unicode_glyph *c)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ /* Keep track of the cursor. */
+ switch (c->base)
+ {
+ case '\a':
+ break;
+
+ case '\b':
+ case 127:
+ if (data->xpos > 0)
+ data->xpos--;
+ break;
+
+ case '\n':
+ if (data->ypos < grub_term_height (term) - 1)
+ data->ypos++;
+ break;
+
+ case '\r':
+ data->xpos = 0;
+ break;
+
+ default:
+ if (data->xpos + c->estimated_width >= grub_term_width (term) + 1)
+ {
+ data->xpos = 0;
+ if (data->ypos < grub_term_height (term) - 1)
+ data->ypos++;
+ data->put (term, '\r');
+ data->put (term, '\n');
+ }
+ data->xpos += c->estimated_width;
+ break;
+ }
+
+ data->put (term, c->base);
+}
+
+grub_uint16_t
+grub_terminfo_getwh (struct grub_term_output *term)
+{
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) term->data;
+
+ return (data->width << 8) | data->height;
+}
+
+#define ANSI_C0 0x9b
+
+static void
+grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len,
+ int (*readkey) (struct grub_term_input *term))
+{
+ int c;
+
+#define CONTINUE_READ \
+ { \
+ grub_uint64_t start; \
+ /* On 9600 we have to wait up to 12 milliseconds. */ \
+ start = grub_get_time_ms (); \
+ do \
+ c = readkey (term); \
+ while (c == -1 && grub_get_time_ms () - start < 12); \
+ if (c == -1) \
+ return; \
+ \
+ keys[*len] = c; \
+ (*len)++; \
+ }
+
+ c = readkey (term);
+ if (c < 0)
+ {
+ *len = 0;
+ return;
+ }
+ *len = 1;
+ keys[0] = c;
+ if (c != ANSI_C0 && c != '\e')
+ {
+ /* Backspace: Ctrl-h. */
+ if (c == 0x7f)
+ c = '\b';
+ if (c < 0x20 && c != '\t' && c!= '\b' && c != '\n' && c != '\r')
+ c = GRUB_TERM_CTRL | (c - 1 + 'a');
+ *len = 1;
+ keys[0] = c;
+ return;
+ }
+
+ {
+ static struct
+ {
+ char key;
+ unsigned ascii;
+ }
+ three_code_table[] =
+ {
+ {'4', GRUB_TERM_KEY_DC},
+ {'A', GRUB_TERM_KEY_UP},
+ {'B', GRUB_TERM_KEY_DOWN},
+ {'C', GRUB_TERM_KEY_RIGHT},
+ {'D', GRUB_TERM_KEY_LEFT},
+ {'F', GRUB_TERM_KEY_END},
+ {'H', GRUB_TERM_KEY_HOME},
+ {'K', GRUB_TERM_KEY_END},
+ {'P', GRUB_TERM_KEY_DC},
+ {'?', GRUB_TERM_KEY_PPAGE},
+ {'/', GRUB_TERM_KEY_NPAGE}
+ };
+
+ static struct
+ {
+ char key;
+ unsigned ascii;
+ }
+ four_code_table[] =
+ {
+ {'1', GRUB_TERM_KEY_HOME},
+ {'3', GRUB_TERM_KEY_DC},
+ {'5', GRUB_TERM_KEY_PPAGE},
+ {'6', GRUB_TERM_KEY_NPAGE}
+ };
+ unsigned i;
+
+ if (c == '\e')
+ {
+ CONTINUE_READ;
+
+ if (c != '[')
+ return;
+ }
+
+ CONTINUE_READ;
+
+ for (i = 0; i < ARRAY_SIZE (three_code_table); i++)
+ if (three_code_table[i].key == c)
+ {
+ keys[0] = three_code_table[i].ascii;
+ *len = 1;
+ return;
+ }
+
+ for (i = 0; i < ARRAY_SIZE (four_code_table); i++)
+ if (four_code_table[i].key == c)
+ {
+ CONTINUE_READ;
+ if (c != '~')
+ return;
+ keys[0] = three_code_table[i].ascii;
+ *len = 1;
+ return;
+ }
+ return;
+ }
+#undef CONTINUE_READ
+}
+
+/* The terminfo version of getkey. */
+int
+grub_terminfo_getkey (struct grub_term_input *termi)
+{
+ struct grub_terminfo_input_state *data
+ = (struct grub_terminfo_input_state *) (termi->data);
+ if (data->npending)
+ {
+ data->npending--;
+ grub_memmove (data->input_buf, data->input_buf + 1, data->npending);
+ return data->input_buf[0];
+ }
+
+ grub_terminfo_readkey (termi, data->input_buf,
+ &data->npending, data->readkey);
+
+ if (data->npending)
+ {
+ data->npending--;
+ grub_memmove (data->input_buf, data->input_buf + 1, data->npending);
+ return data->input_buf[0];
+ }
+
+ return GRUB_TERM_NO_KEY;
+}
+
+grub_err_t
+grub_terminfo_input_init (struct grub_term_input *termi)
+{
+ struct grub_terminfo_input_state *data
+ = (struct grub_terminfo_input_state *) (termi->data);
+ data->npending = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_terminfo_output_init (struct grub_term_output *term)
+{
+ grub_terminfo_cls (term);
+ return GRUB_ERR_NONE;
+}
+
+/* GRUB Command. */
+
+static grub_err_t
+print_terminfo (void)
+{
+ const char *encoding_names[(GRUB_TERM_CODE_TYPE_MASK
+ >> GRUB_TERM_CODE_TYPE_SHIFT) + 1]
+ = {
+ /* VGA and glyph descriptor types are just for completeness,
+ they are not used on terminfo terminals.
+ */
+ [GRUB_TERM_CODE_TYPE_ASCII >> GRUB_TERM_CODE_TYPE_SHIFT] = _("ASCII"),
+ [GRUB_TERM_CODE_TYPE_CP437 >> GRUB_TERM_CODE_TYPE_SHIFT] = "CP-437",
+ [GRUB_TERM_CODE_TYPE_UTF8_LOGICAL >> GRUB_TERM_CODE_TYPE_SHIFT]
+ = _("UTF-8"),
+ [GRUB_TERM_CODE_TYPE_UTF8_VISUAL >> GRUB_TERM_CODE_TYPE_SHIFT]
+ = _("UTF-8 visual"),
+ [GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS >> GRUB_TERM_CODE_TYPE_SHIFT]
+ = "Glyph descriptors",
+ _("Unknown"), _("Unknown"), _("Unknown")
+ };
+ struct grub_term_output *cur;
+
+ grub_printf ("Current terminfo types: \n");
+ for (cur = terminfo_outputs; cur;
+ cur = ((struct grub_terminfo_output_state *) cur->data)->next)
+ grub_printf ("%s: %s\t%s\n", cur->name,
+ grub_terminfo_get_current(cur),
+ encoding_names[(cur->flags & GRUB_TERM_CODE_TYPE_MASK)
+ >> GRUB_TERM_CODE_TYPE_SHIFT]);
+
+ return GRUB_ERR_NONE;
+}
+
+static const struct grub_arg_option options[] =
+{
+ {"ascii", 'a', 0, N_("Terminal is ASCII-only [default]."), 0, ARG_TYPE_NONE},
+ {"utf8", 'u', 0, N_("Terminal is logical-ordered UTF-8."), 0, ARG_TYPE_NONE},
+ {"visual-utf8", 'v', 0, N_("Terminal is visually-ordered UTF-8."), 0,
+ ARG_TYPE_NONE},
+ {"geometry", 'g', 0, N_("Terminal has given geometry."),
+ N_("WIDTHxHEIGHT."), ARG_TYPE_STRING},
+ {0, 0, 0, 0, 0, 0}
+};
+
+enum
+ {
+ OPTION_ASCII,
+ OPTION_UTF8,
+ OPTION_VISUAL_UTF8,
+ OPTION_GEOMETRY
+ };
+
+static grub_err_t
+grub_cmd_terminfo (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ struct grub_term_output *cur;
+ int encoding = GRUB_TERM_CODE_TYPE_ASCII;
+ struct grub_arg_list *state = ctxt->state;
+ int w = 0, h = 0;
+
+ if (argc == 0)
+ return print_terminfo ();
+
+ if (state[OPTION_ASCII].set)
+ encoding = GRUB_TERM_CODE_TYPE_ASCII;
+
+ if (state[OPTION_UTF8].set)
+ encoding = GRUB_TERM_CODE_TYPE_UTF8_LOGICAL;
+
+ if (state[OPTION_VISUAL_UTF8].set)
+ encoding = GRUB_TERM_CODE_TYPE_UTF8_VISUAL;
+
+ if (state[OPTION_GEOMETRY].set)
+ {
+ char *ptr = state[OPTION_GEOMETRY].arg;
+ w = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ if (*ptr != 'x')
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "incorrect geometry specification");
+ ptr++;
+ h = grub_strtoul (ptr, &ptr, 0);
+ if (grub_errno)
+ return grub_errno;
+ }
+
+ for (cur = terminfo_outputs; cur;
+ cur = ((struct grub_terminfo_output_state *) cur->data)->next)
+ if (grub_strcmp (args[0], cur->name) == 0)
+ {
+ cur->flags = (cur->flags & ~GRUB_TERM_CODE_TYPE_MASK) | encoding;
+
+ if (w && h)
+ {
+ struct grub_terminfo_output_state *data
+ = (struct grub_terminfo_output_state *) cur->data;
+ data->width = w;
+ data->height = h;
+ }
+
+ if (argc == 1)
+ return GRUB_ERR_NONE;
+
+ return grub_terminfo_set_current (cur, args[1]);
+ }
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "no terminal %s found or it's not handled by terminfo",
+ args[0]);
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(terminfo)
+{
+ cmd = grub_register_extcmd ("terminfo", grub_cmd_terminfo, 0,
+ N_("[[-a|-u|-v] [-g WxH] TERM [TYPE]]"),
+ N_("Set terminfo type of TERM to TYPE.\n"),
+ options);
+}
+
+GRUB_MOD_FINI(terminfo)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/term/tparm.c b/grub-core/term/tparm.c
new file mode 100644
index 0000000..076a192
--- /dev/null
+++ b/grub-core/term/tparm.c
@@ -0,0 +1,761 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1998-2003,2004,2005 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**********************************************************************
+ * This code is a modification of lib_tparm.c found in ncurses-5.2. The
+ * modification are for use in grub by replacing all libc function through
+ * special grub functions. This also meant to delete all dynamic memory
+ * allocation and replace it by a number of fixed buffers.
+ *
+ * Modifications by Tilmann Bubeck <t.bubeck@reinform.de> 2002
+ *
+ * Resync with ncurses-5.4 by Omniflux <omniflux+devel@omniflux.com> 2005
+ **********************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey, 1996 on *
+ ****************************************************************************/
+
+/*
+ * tparm.c
+ *
+ */
+
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/types.h>
+#include <grub/tparm.h>
+
+/*
+ * Common/troublesome character definitions
+ */
+typedef char grub_bool_t;
+#ifndef FALSE
+# define FALSE (0)
+#endif
+#ifndef TRUE
+# define TRUE (!FALSE)
+#endif
+
+#define NUM_PARM 9
+#define NUM_VARS 26
+#define STACKSIZE 20
+#define MAX_FORMAT_LEN 256
+
+#define max(a,b) ((a) > (b) ? (a) : (b))
+#define isdigit(c) ((c) >= '0' && (c) <= '9')
+#define isUPPER(c) ((c) >= 'A' && (c) <= 'Z')
+#define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
+
+#define UChar(c) ((unsigned char)(c))
+
+//MODULE_ID("$Id$")
+
+/*
+ * char *
+ * tparm(string, ...)
+ *
+ * Substitute the given parameters into the given string by the following
+ * rules (taken from terminfo(5)):
+ *
+ * Cursor addressing and other strings requiring parame-
+ * ters in the terminal are described by a parameterized string
+ * capability, with like escapes %x in it. For example, to
+ * address the cursor, the cup capability is given, using two
+ * parameters: the row and column to address to. (Rows and
+ * columns are numbered from zero and refer to the physical
+ * screen visible to the user, not to any unseen memory.) If
+ * the terminal has memory relative cursor addressing, that can
+ * be indicated by
+ *
+ * The parameter mechanism uses a stack and special %
+ * codes to manipulate it. Typically a sequence will push one
+ * of the parameters onto the stack and then print it in some
+ * format. Often more complex operations are necessary.
+ *
+ * The % encodings have the following meanings:
+ *
+ * %% outputs `%'
+ * %c print pop() like %c in printf()
+ * %s print pop() like %s in printf()
+ * %[[:]flags][width[.precision]][doxXs]
+ * as in printf, flags are [-+#] and space
+ * The ':' is used to avoid making %+ or %-
+ * patterns (see below).
+ *
+ * %p[1-9] push ith parm
+ * %P[a-z] set dynamic variable [a-z] to pop()
+ * %g[a-z] get dynamic variable [a-z] and push it
+ * %P[A-Z] set static variable [A-Z] to pop()
+ * %g[A-Z] get static variable [A-Z] and push it
+ * %l push strlen(pop)
+ * %'c' push char constant c
+ * %{nn} push integer constant nn
+ *
+ * %+ %- %* %/ %m
+ * arithmetic (%m is mod): push(pop() op pop())
+ * %& %| %^ bit operations: push(pop() op pop())
+ * %= %> %< logical operations: push(pop() op pop())
+ * %A %O logical and & or operations for conditionals
+ * %! %~ unary operations push(op pop())
+ * %i add 1 to first two parms (for ANSI terminals)
+ *
+ * %? expr %t thenpart %e elsepart %;
+ * if-then-else, %e elsepart is optional.
+ * else-if's are possible ala Algol 68:
+ * %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e b5 %;
+ *
+ * For those of the above operators which are binary and not commutative,
+ * the stack works in the usual way, with
+ * %gx %gy %m
+ * resulting in x mod y, not the reverse.
+ */
+
+typedef struct {
+ union {
+ int num;
+ char *str;
+ } data;
+ grub_bool_t num_type;
+} stack_frame;
+
+static stack_frame stack[STACKSIZE];
+static int stack_ptr;
+static const char *tparam_base = "";
+
+static char *out_buff;
+static grub_size_t out_size;
+static grub_size_t out_used;
+
+static char *fmt_buff;
+static grub_size_t fmt_size;
+
+static inline void
+get_space(grub_size_t need)
+{
+ need += out_used;
+ if (need > out_size) {
+ out_size = need * 2;
+ out_buff = grub_realloc(out_buff, out_size*sizeof(char));
+ /* FIX ME! handle out_buff == 0. */
+ }
+}
+
+static inline void
+save_text(const char *fmt, const char *s, int len)
+{
+ grub_size_t s_len = grub_strlen(s);
+ if (len > (int) s_len)
+ s_len = len;
+
+ get_space(s_len + 1);
+
+ (void) grub_snprintf(out_buff + out_used, s_len + 1, fmt, s);
+ out_used += grub_strlen(out_buff + out_used);
+}
+
+static inline void
+save_number(const char *fmt, int number, int len)
+{
+ if (len < 30)
+ len = 30; /* actually log10(MAX_INT)+1 */
+
+ get_space((unsigned) len + 1);
+
+ (void) grub_snprintf(out_buff + out_used, len + 1, fmt, number);
+ out_used += grub_strlen(out_buff + out_used);
+}
+
+static inline void
+save_char(int c)
+{
+ if (c == 0)
+ c = 0200;
+ get_space(1);
+ out_buff[out_used++] = c;
+}
+
+static inline void
+npush(int x)
+{
+ if (stack_ptr < STACKSIZE) {
+ stack[stack_ptr].num_type = TRUE;
+ stack[stack_ptr].data.num = x;
+ stack_ptr++;
+ }
+}
+
+static inline int
+npop(void)
+{
+ int result = 0;
+ if (stack_ptr > 0) {
+ stack_ptr--;
+ if (stack[stack_ptr].num_type)
+ result = stack[stack_ptr].data.num;
+ }
+ return result;
+}
+
+static inline void
+spush(char *x)
+{
+ if (stack_ptr < STACKSIZE) {
+ stack[stack_ptr].num_type = FALSE;
+ stack[stack_ptr].data.str = x;
+ stack_ptr++;
+ }
+}
+
+static inline char *
+spop(void)
+{
+ static char dummy[] = ""; /* avoid const-cast */
+ char *result = dummy;
+ if (stack_ptr > 0) {
+ stack_ptr--;
+ if (!stack[stack_ptr].num_type && stack[stack_ptr].data.str != 0)
+ result = stack[stack_ptr].data.str;
+ }
+ return result;
+}
+
+static inline const char *
+parse_format(const char *s, char *format, int *len)
+{
+ *len = 0;
+ if (format != 0) {
+ grub_bool_t done = FALSE;
+ grub_bool_t allowminus = FALSE;
+ grub_bool_t dot = FALSE;
+ grub_bool_t err = FALSE;
+ char *fmt = format;
+ int my_width = 0;
+ int my_prec = 0;
+ int value = 0;
+
+ *len = 0;
+ *format++ = '%';
+ while (*s != '\0' && !done) {
+ switch (*s) {
+ case 'c': /* FALLTHRU */
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ case 's':
+ *format++ = *s;
+ done = TRUE;
+ break;
+ case '.':
+ *format++ = *s++;
+ if (dot) {
+ err = TRUE;
+ } else { /* value before '.' is the width */
+ dot = TRUE;
+ my_width = value;
+ }
+ value = 0;
+ break;
+ case '#':
+ *format++ = *s++;
+ break;
+ case ' ':
+ *format++ = *s++;
+ break;
+ case ':':
+ s++;
+ allowminus = TRUE;
+ break;
+ case '-':
+ if (allowminus) {
+ *format++ = *s++;
+ } else {
+ done = TRUE;
+ }
+ break;
+ default:
+ if (isdigit(UChar(*s))) {
+ value = (value * 10) + (*s - '0');
+ if (value > 10000)
+ err = TRUE;
+ *format++ = *s++;
+ } else {
+ done = TRUE;
+ }
+ }
+ }
+
+ /*
+ * If we found an error, ignore (and remove) the flags.
+ */
+ if (err) {
+ my_width = my_prec = value = 0;
+ format = fmt;
+ *format++ = '%';
+ *format++ = *s;
+ }
+
+ /*
+ * Any value after '.' is the precision. If we did not see '.', then
+ * the value is the width.
+ */
+ if (dot)
+ my_prec = value;
+ else
+ my_width = value;
+
+ *format = '\0';
+ /* return maximum string length in print */
+ *len = (my_width > my_prec) ? my_width : my_prec;
+ }
+ return s;
+}
+
+/*
+ * Analyze the string to see how many parameters we need from the varargs list,
+ * and what their types are. We will only accept string parameters if they
+ * appear as a %l or %s format following an explicit parameter reference (e.g.,
+ * %p2%s). All other parameters are numbers.
+ *
+ * 'number' counts coarsely the number of pop's we see in the string, and
+ * 'popcount' shows the highest parameter number in the string. We would like
+ * to simply use the latter count, but if we are reading termcap strings, there
+ * may be cases that we cannot see the explicit parameter numbers.
+ */
+static inline int
+analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount)
+{
+ grub_size_t len2;
+ int i;
+ int lastpop = -1;
+ int len;
+ int number = 0;
+ const char *cp = string;
+ static char dummy[] = "";
+
+ *popcount = 0;
+
+ if (cp == 0)
+ return 0;
+
+ if ((len2 = grub_strlen(cp)) > fmt_size) {
+ fmt_size = len2 + fmt_size + 2;
+ if ((fmt_buff = grub_realloc(fmt_buff, fmt_size*sizeof(char))) == 0)
+ return 0;
+ }
+
+ grub_memset(p_is_s, 0, sizeof(p_is_s[0]) * NUM_PARM);
+
+ while ((cp - string) < (int) len2) {
+ if (*cp == '%') {
+ cp++;
+ cp = parse_format(cp, fmt_buff, &len);
+ switch (*cp) {
+ default:
+ break;
+
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ case 'c': /* FALLTHRU */
+ if (lastpop <= 0)
+ number++;
+ lastpop = -1;
+ break;
+
+ case 'l':
+ case 's':
+ if (lastpop > 0)
+ p_is_s[lastpop - 1] = dummy;
+ ++number;
+ break;
+
+ case 'p':
+ cp++;
+ i = (UChar(*cp) - '0');
+ if (i >= 0 && i <= NUM_PARM) {
+ lastpop = i;
+ if (lastpop > *popcount)
+ *popcount = lastpop;
+ }
+ break;
+
+ case 'P':
+ ++number;
+ ++cp;
+ break;
+
+ case 'g':
+ cp++;
+ break;
+
+ case '\'':
+ cp += 2;
+ lastpop = -1;
+ break;
+
+ case '{':
+ cp++;
+ while (isdigit(UChar(*cp))) {
+ cp++;
+ }
+ break;
+
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case 'm':
+ case 'A':
+ case 'O':
+ case '&':
+ case '|':
+ case '^':
+ case '=':
+ case '<':
+ case '>':
+ lastpop = -1;
+ number += 2;
+ break;
+
+ case '!':
+ case '~':
+ lastpop = -1;
+ ++number;
+ break;
+
+ case 'i':
+ /* will add 1 to first (usually two) parameters */
+ break;
+ }
+ }
+ if (*cp != '\0')
+ cp++;
+ }
+
+ if (number > NUM_PARM)
+ number = NUM_PARM;
+ return number;
+}
+
+static inline char *
+tparam_internal(const char *string, va_list ap)
+{
+ char *p_is_s[NUM_PARM];
+ long param[NUM_PARM];
+ int popcount;
+ int number;
+ int len;
+ int level;
+ int x, y;
+ int i;
+ const char *cp = string;
+ grub_size_t len2;
+ static int dynamic_var[NUM_VARS];
+ static int static_vars[NUM_VARS];
+
+ if (cp == 0)
+ return 0;
+
+ out_used = out_size = fmt_size = 0;
+
+ len2 = (int) grub_strlen(cp);
+
+ /*
+ * Find the highest parameter-number referred to in the format string.
+ * Use this value to limit the number of arguments copied from the
+ * variable-length argument list.
+ */
+ number = analyze(cp, p_is_s, &popcount);
+ if (fmt_buff == 0)
+ return 0;
+
+ for (i = 0; i < max(popcount, number); i++) {
+ /*
+ * A few caps (such as plab_norm) have string-valued parms.
+ * We'll have to assume that the caller knows the difference, since
+ * a char* and an int may not be the same size on the stack.
+ */
+ if (p_is_s[i] != 0) {
+ p_is_s[i] = va_arg(ap, char *);
+ } else {
+ param[i] = va_arg(ap, long int);
+ }
+ }
+
+ /*
+ * This is a termcap compatibility hack. If there are no explicit pop
+ * operations in the string, load the stack in such a way that
+ * successive pops will grab successive parameters. That will make
+ * the expansion of (for example) \E[%d;%dH work correctly in termcap
+ * style, which means tparam() will expand termcap strings OK.
+ */
+ stack_ptr = 0;
+ if (popcount == 0) {
+ popcount = number;
+ for (i = number - 1; i >= 0; i--)
+ npush(param[i]);
+ }
+
+ while ((cp - string) < (int) len2) {
+ if (*cp != '%') {
+ save_char(UChar(*cp));
+ } else {
+ tparam_base = cp++;
+ cp = parse_format(cp, fmt_buff, &len);
+ switch (*cp) {
+ default:
+ break;
+ case '%':
+ save_char('%');
+ break;
+
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ save_number(fmt_buff, npop(), len);
+ break;
+
+ case 'c': /* FALLTHRU */
+ save_char(npop());
+ break;
+
+ case 'l':
+ save_number("%d", (int) grub_strlen(spop()), 0);
+ break;
+
+ case 's':
+ save_text(fmt_buff, spop(), len);
+ break;
+
+ case 'p':
+ cp++;
+ i = (UChar(*cp) - '1');
+ if (i >= 0 && i < NUM_PARM) {
+ if (p_is_s[i])
+ spush(p_is_s[i]);
+ else
+ npush(param[i]);
+ }
+ break;
+
+ case 'P':
+ cp++;
+ if (isUPPER(*cp)) {
+ i = (UChar(*cp) - 'A');
+ static_vars[i] = npop();
+ } else if (isLOWER(*cp)) {
+ i = (UChar(*cp) - 'a');
+ dynamic_var[i] = npop();
+ }
+ break;
+
+ case 'g':
+ cp++;
+ if (isUPPER(*cp)) {
+ i = (UChar(*cp) - 'A');
+ npush(static_vars[i]);
+ } else if (isLOWER(*cp)) {
+ i = (UChar(*cp) - 'a');
+ npush(dynamic_var[i]);
+ }
+ break;
+
+ case '\'':
+ cp++;
+ npush(UChar(*cp));
+ cp++;
+ break;
+
+ case '{':
+ number = 0;
+ cp++;
+ while (isdigit(UChar(*cp))) {
+ number = (number * 10) + (UChar(*cp) - '0');
+ cp++;
+ }
+ npush(number);
+ break;
+
+ case '+':
+ npush(npop() + npop());
+ break;
+
+ case '-':
+ y = npop();
+ x = npop();
+ npush(x - y);
+ break;
+
+ case '*':
+ npush(npop() * npop());
+ break;
+
+ case '/':
+ y = npop();
+ x = npop();
+ npush(y ? (x / y) : 0);
+ break;
+
+ case 'm':
+ y = npop();
+ x = npop();
+ npush(y ? (x % y) : 0);
+ break;
+
+ case 'A':
+ npush(npop() && npop());
+ break;
+
+ case 'O':
+ npush(npop() || npop());
+ break;
+
+ case '&':
+ npush(npop() & npop());
+ break;
+
+ case '|':
+ npush(npop() | npop());
+ break;
+
+ case '^':
+ npush(npop() ^ npop());
+ break;
+
+ case '=':
+ y = npop();
+ x = npop();
+ npush(x == y);
+ break;
+
+ case '<':
+ y = npop();
+ x = npop();
+ npush(x < y);
+ break;
+
+ case '>':
+ y = npop();
+ x = npop();
+ npush(x > y);
+ break;
+
+ case '!':
+ npush(!npop());
+ break;
+
+ case '~':
+ npush(~npop());
+ break;
+
+ case 'i':
+ if (p_is_s[0] == 0)
+ param[0]++;
+ if (p_is_s[1] == 0)
+ param[1]++;
+ break;
+
+ case '?':
+ break;
+
+ case 't':
+ x = npop();
+ if (!x) {
+ /* scan forward for %e or %; at level zero */
+ cp++;
+ level = 0;
+ while (*cp) {
+ if (*cp == '%') {
+ cp++;
+ if (*cp == '?')
+ level++;
+ else if (*cp == ';') {
+ if (level > 0)
+ level--;
+ else
+ break;
+ } else if (*cp == 'e' && level == 0)
+ break;
+ }
+
+ if (*cp)
+ cp++;
+ }
+ }
+ break;
+
+ case 'e':
+ /* scan forward for a %; at level zero */
+ cp++;
+ level = 0;
+ while (*cp) {
+ if (*cp == '%') {
+ cp++;
+ if (*cp == '?')
+ level++;
+ else if (*cp == ';') {
+ if (level > 0)
+ level--;
+ else
+ break;
+ }
+ }
+
+ if (*cp)
+ cp++;
+ }
+ break;
+
+ case ';':
+ break;
+
+ } /* endswitch (*cp) */
+ } /* endelse (*cp == '%') */
+
+ if (*cp == '\0')
+ break;
+
+ cp++;
+ } /* endwhile (*cp) */
+
+ get_space(1);
+ out_buff[out_used] = '\0';
+
+ return (out_buff);
+}
+
+char *
+grub_terminfo_tparm (const char *string, ...)
+{
+ va_list ap;
+ char *result;
+
+ if (!string)
+ return "";
+
+ va_start (ap, string);
+ result = tparam_internal (string, ap);
+ va_end (ap);
+ return result;
+}
diff --git a/grub-core/term/usb_keyboard.c b/grub-core/term/usb_keyboard.c
new file mode 100644
index 0000000..ae00936
--- /dev/null
+++ b/grub-core/term/usb_keyboard.c
@@ -0,0 +1,472 @@
+/* Support for the HID Boot Protocol. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/term.h>
+#include <grub/time.h>
+#include <grub/cpu/io.h>
+#include <grub/misc.h>
+#include <grub/term.h>
+#include <grub/usb.h>
+#include <grub/dl.h>
+#include <grub/time.h>
+#include <grub/keyboard_layouts.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+
+
+enum
+ {
+ KEY_NO_KEY = 0x00,
+ KEY_ERR_BUFFER = 0x01,
+ KEY_ERR_POST = 0x02,
+ KEY_ERR_UNDEF = 0x03,
+ KEY_CAPS_LOCK = 0x39,
+ KEY_NUM_LOCK = 0x53,
+ };
+
+enum
+ {
+ LED_NUM_LOCK = 0x01,
+ LED_CAPS_LOCK = 0x02
+ };
+
+/* Valid values for bRequest. See HID definition version 1.11 section 7.2. */
+#define USB_HID_GET_REPORT 0x01
+#define USB_HID_GET_IDLE 0x02
+#define USB_HID_GET_PROTOCOL 0x03
+#define USB_HID_SET_REPORT 0x09
+#define USB_HID_SET_IDLE 0x0A
+#define USB_HID_SET_PROTOCOL 0x0B
+
+#define USB_HID_BOOT_SUBCLASS 0x01
+#define USB_HID_KBD_PROTOCOL 0x01
+
+#define GRUB_USB_KEYBOARD_LEFT_CTRL 0x01
+#define GRUB_USB_KEYBOARD_LEFT_SHIFT 0x02
+#define GRUB_USB_KEYBOARD_LEFT_ALT 0x04
+#define GRUB_USB_KEYBOARD_RIGHT_CTRL 0x10
+#define GRUB_USB_KEYBOARD_RIGHT_SHIFT 0x20
+#define GRUB_USB_KEYBOARD_RIGHT_ALT 0x40
+
+struct grub_usb_keyboard_data
+{
+ grub_usb_device_t usbdev;
+ grub_uint8_t status;
+ grub_uint16_t mods;
+ int interfno;
+ struct grub_usb_desc_endp *endp;
+ grub_usb_transfer_t transfer;
+ grub_uint8_t report[8];
+ int dead;
+ int last_key;
+ grub_uint64_t repeat_time;
+ grub_uint8_t current_report[8];
+ grub_uint8_t last_report[8];
+ int index;
+ int max_index;
+};
+
+static int grub_usb_keyboard_getkey (struct grub_term_input *term);
+static int grub_usb_keyboard_getkeystatus (struct grub_term_input *term);
+
+static struct grub_term_input grub_usb_keyboard_term =
+ {
+ .getkey = grub_usb_keyboard_getkey,
+ .getkeystatus = grub_usb_keyboard_getkeystatus,
+ .next = 0
+ };
+
+static struct grub_term_input grub_usb_keyboards[16];
+
+static int
+interpret_status (grub_uint8_t data0)
+{
+ int mods = 0;
+
+ /* Check Shift, Control, and Alt status. */
+ if (data0 & GRUB_USB_KEYBOARD_LEFT_SHIFT)
+ mods |= GRUB_TERM_STATUS_LSHIFT;
+ if (data0 & GRUB_USB_KEYBOARD_RIGHT_SHIFT)
+ mods |= GRUB_TERM_STATUS_RSHIFT;
+ if (data0 & GRUB_USB_KEYBOARD_LEFT_CTRL)
+ mods |= GRUB_TERM_STATUS_LCTRL;
+ if (data0 & GRUB_USB_KEYBOARD_RIGHT_CTRL)
+ mods |= GRUB_TERM_STATUS_RCTRL;
+ if (data0 & GRUB_USB_KEYBOARD_LEFT_ALT)
+ mods |= GRUB_TERM_STATUS_LALT;
+ if (data0 & GRUB_USB_KEYBOARD_RIGHT_ALT)
+ mods |= GRUB_TERM_STATUS_RALT;
+
+ return mods;
+}
+
+static void
+grub_usb_keyboard_detach (grub_usb_device_t usbdev,
+ int config __attribute__ ((unused)),
+ int interface __attribute__ ((unused)))
+{
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (grub_usb_keyboards); i++)
+ {
+ struct grub_usb_keyboard_data *data = grub_usb_keyboards[i].data;
+
+ if (!data)
+ continue;
+
+ if (data->usbdev != usbdev)
+ continue;
+
+ if (data->transfer)
+ grub_usb_cancel_transfer (data->transfer);
+
+ grub_term_unregister_input (&grub_usb_keyboards[i]);
+ grub_free ((char *) grub_usb_keyboards[i].name);
+ grub_usb_keyboards[i].name = NULL;
+ grub_free (grub_usb_keyboards[i].data);
+ grub_usb_keyboards[i].data = 0;
+ }
+}
+
+static int
+grub_usb_keyboard_attach (grub_usb_device_t usbdev, int configno, int interfno)
+{
+ unsigned curnum;
+ struct grub_usb_keyboard_data *data;
+ struct grub_usb_desc_endp *endp = NULL;
+ int j;
+
+ grub_dprintf ("usb_keyboard", "%x %x %x %d %d\n",
+ usbdev->descdev.class, usbdev->descdev.subclass,
+ usbdev->descdev.protocol, configno, interfno);
+
+ for (curnum = 0; curnum < ARRAY_SIZE (grub_usb_keyboards); curnum++)
+ if (!grub_usb_keyboards[curnum].data)
+ break;
+
+ if (curnum == ARRAY_SIZE (grub_usb_keyboards))
+ return 0;
+
+ if (usbdev->descdev.class != 0
+ || usbdev->descdev.subclass != 0 || usbdev->descdev.protocol != 0)
+ return 0;
+
+ if (usbdev->config[configno].interf[interfno].descif->subclass
+ != USB_HID_BOOT_SUBCLASS
+ || usbdev->config[configno].interf[interfno].descif->protocol
+ != USB_HID_KBD_PROTOCOL)
+ return 0;
+
+ for (j = 0; j < usbdev->config[configno].interf[interfno].descif->endpointcnt;
+ j++)
+ {
+ endp = &usbdev->config[configno].interf[interfno].descendp[j];
+
+ if ((endp->endp_addr & 128) && grub_usb_get_ep_type(endp)
+ == GRUB_USB_EP_INTERRUPT)
+ break;
+ }
+ if (j == usbdev->config[configno].interf[interfno].descif->endpointcnt)
+ return 0;
+
+ grub_dprintf ("usb_keyboard", "HID found!\n");
+
+ data = grub_malloc (sizeof (*data));
+ if (!data)
+ {
+ grub_print_error ();
+ return 0;
+ }
+
+ data->usbdev = usbdev;
+ data->interfno = interfno;
+ data->endp = endp;
+
+ /* Configure device */
+ grub_usb_set_configuration (usbdev, configno + 1);
+
+ /* Place the device in boot mode. */
+ grub_usb_control_msg (usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT,
+ USB_HID_SET_PROTOCOL, 0, interfno, 0, 0);
+
+ /* Reports every time an event occurs and not more often than that. */
+ grub_usb_control_msg (usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT,
+ USB_HID_SET_IDLE, 0<<8, interfno, 0, 0);
+
+ grub_memcpy (&grub_usb_keyboards[curnum], &grub_usb_keyboard_term,
+ sizeof (grub_usb_keyboards[curnum]));
+ grub_usb_keyboards[curnum].data = data;
+ usbdev->config[configno].interf[interfno].detach_hook
+ = grub_usb_keyboard_detach;
+ grub_usb_keyboards[curnum].name = grub_xasprintf ("usb_keyboard%d", curnum);
+ if (!grub_usb_keyboards[curnum].name)
+ {
+ grub_print_error ();
+ return 0;
+ }
+
+ /* Test showed that getting report may make the keyboard go nuts.
+ Moreover since we're reattaching keyboard it usually sends
+ an initial message on interrupt pipe and so we retrieve
+ the same keystatus.
+ */
+#if 0
+ {
+ grub_uint8_t report[8];
+ grub_usb_err_t err;
+ grub_memset (report, 0, sizeof (report));
+ err = grub_usb_control_msg (usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_IN,
+ USB_HID_GET_REPORT, 0x0100, interfno,
+ sizeof (report), (char *) report);
+ if (err)
+ data->status = 0;
+ else
+ data->status = report[0];
+ }
+#else
+ data->status = 0;
+#endif
+
+ data->transfer = grub_usb_bulk_read_background (usbdev,
+ data->endp->endp_addr,
+ sizeof (data->report),
+ (char *) data->report);
+ if (!data->transfer)
+ {
+ grub_print_error ();
+ return 0;
+ }
+
+ data->last_key = -1;
+ data->mods = 0;
+ data->dead = 0;
+
+ grub_term_register_input_active ("usb_keyboard", &grub_usb_keyboards[curnum]);
+
+ return 1;
+}
+
+
+
+static void
+send_leds (struct grub_usb_keyboard_data *termdata)
+{
+ char report[1];
+ report[0] = 0;
+ if (termdata->mods & GRUB_TERM_STATUS_CAPS)
+ report[0] |= LED_CAPS_LOCK;
+ if (termdata->mods & GRUB_TERM_STATUS_NUM)
+ report[0] |= LED_NUM_LOCK;
+ grub_usb_control_msg (termdata->usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT,
+ USB_HID_SET_REPORT, 0x0200, termdata->interfno,
+ sizeof (report), (char *) report);
+ grub_errno = GRUB_ERR_NONE;
+}
+
+static int
+parse_keycode (struct grub_usb_keyboard_data *termdata)
+{
+ int index = termdata->index;
+ int i, keycode;
+
+ /* Sanity check */
+ if (index < 2)
+ index = 2;
+
+ for ( ; index < termdata->max_index; index++)
+ {
+ keycode = termdata->current_report[index];
+
+ if (keycode == KEY_NO_KEY
+ || keycode == KEY_ERR_BUFFER
+ || keycode == KEY_ERR_POST
+ || keycode == KEY_ERR_UNDEF)
+ {
+ /* Don't parse (rest of) this report */
+ termdata->index = 0;
+ if (keycode != KEY_NO_KEY)
+ /* Don't replace last report with current faulty report
+ * in future ! */
+ grub_memcpy (termdata->current_report,
+ termdata->last_report,
+ sizeof (termdata->report));
+ return GRUB_TERM_NO_KEY;
+ }
+
+ /* Try to find current keycode in last report. */
+ for (i = 2; i < 8; i++)
+ if (keycode == termdata->last_report[i])
+ break;
+ if (i < 8)
+ /* Keycode is in last report, it means it was not released,
+ * ignore it. */
+ continue;
+
+ if (keycode == KEY_CAPS_LOCK)
+ {
+ termdata->mods ^= GRUB_TERM_STATUS_CAPS;
+ send_leds (termdata);
+ continue;
+ }
+
+ if (keycode == KEY_NUM_LOCK)
+ {
+ termdata->mods ^= GRUB_TERM_STATUS_NUM;
+ send_leds (termdata);
+ continue;
+ }
+
+ termdata->last_key = grub_term_map_key (keycode,
+ interpret_status (termdata->current_report[0])
+ | termdata->mods);
+ termdata->repeat_time = grub_get_time_ms () + GRUB_TERM_REPEAT_PRE_INTERVAL;
+
+ grub_errno = GRUB_ERR_NONE;
+
+ index++;
+ if (index >= termdata->max_index)
+ termdata->index = 0;
+ else
+ termdata->index = index;
+
+ return termdata->last_key;
+ }
+
+ /* All keycodes parsed */
+ termdata->index = 0;
+ return GRUB_TERM_NO_KEY;
+}
+
+static int
+grub_usb_keyboard_getkey (struct grub_term_input *term)
+{
+ grub_usb_err_t err;
+ struct grub_usb_keyboard_data *termdata = term->data;
+ grub_size_t actual;
+ int keycode = GRUB_TERM_NO_KEY;
+
+ if (termdata->dead)
+ return GRUB_TERM_NO_KEY;
+
+ if (termdata->index)
+ keycode = parse_keycode (termdata);
+ if (keycode != GRUB_TERM_NO_KEY)
+ return keycode;
+
+ /* Poll interrupt pipe. */
+ err = grub_usb_check_transfer (termdata->transfer, &actual);
+
+ if (err == GRUB_USB_ERR_WAIT)
+ {
+ if (termdata->last_key != -1
+ && grub_get_time_ms () > termdata->repeat_time)
+ {
+ termdata->repeat_time = grub_get_time_ms ()
+ + GRUB_TERM_REPEAT_INTERVAL;
+ return termdata->last_key;
+ }
+ return GRUB_TERM_NO_KEY;
+ }
+
+ if (!err && (actual >= 3))
+ grub_memcpy (termdata->last_report,
+ termdata->current_report,
+ sizeof (termdata->report));
+
+ grub_memcpy (termdata->current_report,
+ termdata->report,
+ sizeof (termdata->report));
+
+ termdata->transfer = grub_usb_bulk_read_background (termdata->usbdev,
+ termdata->endp->endp_addr,
+ sizeof (termdata->report),
+ (char *) termdata->report);
+ if (!termdata->transfer)
+ {
+ grub_printf ("%s failed. Stopped\n", term->name);
+ termdata->dead = 1;
+ }
+
+ termdata->last_key = -1;
+
+ grub_dprintf ("usb_keyboard",
+ "err = %d, actual = %" PRIuGRUB_SIZE
+ " report: 0x%02x 0x%02x 0x%02x 0x%02x"
+ " 0x%02x 0x%02x 0x%02x 0x%02x\n",
+ err, actual,
+ termdata->current_report[0], termdata->current_report[1],
+ termdata->current_report[2], termdata->current_report[3],
+ termdata->current_report[4], termdata->current_report[5],
+ termdata->current_report[6], termdata->current_report[7]);
+
+ if (err || actual < 1)
+ return GRUB_TERM_NO_KEY;
+
+ termdata->status = termdata->current_report[0];
+
+ if (actual < 3)
+ return GRUB_TERM_NO_KEY;
+
+ termdata->index = 2; /* New data received. */
+ termdata->max_index = actual;
+
+ return parse_keycode (termdata);
+}
+
+static int
+grub_usb_keyboard_getkeystatus (struct grub_term_input *term)
+{
+ struct grub_usb_keyboard_data *termdata = term->data;
+
+ return interpret_status (termdata->status) | termdata->mods;
+}
+
+static struct grub_usb_attach_desc attach_hook =
+{
+ .class = GRUB_USB_CLASS_HID,
+ .hook = grub_usb_keyboard_attach
+};
+
+GRUB_MOD_INIT(usb_keyboard)
+{
+ grub_usb_register_attach_hook_class (&attach_hook);
+}
+
+GRUB_MOD_FINI(usb_keyboard)
+{
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (grub_usb_keyboards); i++)
+ if (grub_usb_keyboards[i].data)
+ {
+ struct grub_usb_keyboard_data *data = grub_usb_keyboards[i].data;
+
+ if (!data)
+ continue;
+
+ if (data->transfer)
+ grub_usb_cancel_transfer (data->transfer);
+
+ grub_term_unregister_input (&grub_usb_keyboards[i]);
+ grub_free ((char *) grub_usb_keyboards[i].name);
+ grub_usb_keyboards[i].name = NULL;
+ grub_free (grub_usb_keyboards[i].data);
+ grub_usb_keyboards[i].data = 0;
+ }
+ grub_usb_unregister_attach_hook_class (&attach_hook);
+}
diff --git a/grub-core/tests/boot/kbsd.init-i386.S b/grub-core/tests/boot/kbsd.init-i386.S
new file mode 100644
index 0000000..7011c79
--- /dev/null
+++ b/grub-core/tests/boot/kbsd.init-i386.S
@@ -0,0 +1,125 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef TARGET_NETBSD
+#define SYSCALL_RESET 208
+#elif defined (TARGET_OPENBSD)
+#define SYSCALL_RESET 55
+#else
+#error unknown target
+#endif
+
+#define MODE_RDRW 2
+#define FLAGS_NONE 0
+#define SYSCALL_OPEN 5
+#define SYSCALL_WRITE 4
+#define SYSCALL_EXIT 1
+#define SYSCALL_ARCH 165
+#define SYSCALL_INT 0x80
+#define SYSCALL_ARCH_IOPL 2
+
+#define RESET_NOSYNC 0x4
+#define RESET_HALT 0x8
+#define RESET_POWEROFF 0x800
+
+#define SHUTDOWN_PORT 0x8900
+
+ .section ".init", "ax"
+ .global start,_start
+start:
+_start:
+ /* open. */
+ movl $SYSCALL_OPEN, %eax
+ pushl $FLAGS_NONE
+ pushl $MODE_RDRW
+ leal device, %ebx
+ pushl %ebx
+ pushl $0
+ int $SYSCALL_INT
+ addl $16, %esp
+ movl %eax, %ecx
+
+ /* write. */
+ movl $SYSCALL_WRITE, %eax
+ pushl $(messageend-message)
+ leal message, %ebx
+ pushl %ebx
+ pushl %ecx
+ pushl $0
+ int $SYSCALL_INT
+ addl $16, %esp
+
+ /* IOPL. */
+ movl $SYSCALL_ARCH, %eax
+ pushl $iopl_arg
+ pushl $SYSCALL_ARCH_IOPL
+ pushl $0
+ int $SYSCALL_INT
+ addl $12, %esp
+
+ movw $SHUTDOWN_PORT, %dx
+ movb $'S', %al
+ outb %al, %dx
+ movb $'h', %al
+ outb %al, %dx
+ movb $'u', %al
+ outb %al, %dx
+ movb $'t', %al
+ outb %al, %dx
+ movb $'d', %al
+ outb %al, %dx
+ movb $'o', %al
+ outb %al, %dx
+ movb $'w', %al
+ outb %al, %dx
+ movb $'n', %al
+ outb %al, %dx
+
+ /* shutdown. */
+ movl $SYSCALL_RESET, %eax
+ pushl $0
+ pushl $(RESET_POWEROFF|RESET_HALT|RESET_NOSYNC)
+ pushl $0
+ int $SYSCALL_INT
+ addl $8, %esp
+
+ /* exit (1). Shouldn't be reached. */
+ movl $SYSCALL_EXIT, %eax
+ pushl $1
+ pushl $0
+ int $SYSCALL_INT
+ .section ".fini", "ax"
+1: jmp 1b
+ .section ".text", "ax"
+1: jmp 1b
+ /* This section is needed for NetBSD to identify the binary. */
+ .section ".note.netbsd.ident", "a"
+ .long 0x7
+ .long 0x4
+ .long 0x1
+ .ascii "NetBSD"
+ .byte 0
+ .data
+device:
+ .ascii "/dev/console"
+ .byte 0
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+messageend:
+iopl_arg:
+ .long 3
diff --git a/grub-core/tests/boot/kbsd.init-x86_64.S b/grub-core/tests/boot/kbsd.init-x86_64.S
new file mode 100644
index 0000000..81f810e
--- /dev/null
+++ b/grub-core/tests/boot/kbsd.init-x86_64.S
@@ -0,0 +1,111 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define MODE_RDRW 2
+#define FLAGS_NONE 0
+#define SYSCALL_OPEN 5
+#define SYSCALL_WRITE 4
+#ifdef TARGET_NETBSD
+#define SYSCALL_RESET 208
+#elif defined (TARGET_OPENBSD)
+#define SYSCALL_RESET 55
+#else
+#error unknown target
+#endif
+#define SYSCALL_EXIT 1
+#define SYSCALL_ARCH 165
+#define SYSCALL_INT 0x80
+#define SYSCALL_ARCH_IOPL 2
+
+#define RESET_NOSYNC 0x4
+#define RESET_HALT 0x8
+#define RESET_POWEROFF 0x800
+#define SHUTDOWN_PORT 0x8900
+
+ .section ".init", "ax"
+ .global start,_start
+start:
+_start:
+ /* open. */
+ movq $SYSCALL_OPEN, %rax
+ leaq device, %rdi
+ movq $MODE_RDRW, %rsi
+ movq $FLAGS_NONE, %rdx
+ syscall
+ movq %rax, %rdi
+
+ /* write. */
+ movq $SYSCALL_WRITE, %rax
+ movq $(messageend-message), %rdx
+ leaq message, %rsi
+ syscall
+
+ /* IOPL. */
+ movq $SYSCALL_ARCH, %rax
+ movq $SYSCALL_ARCH_IOPL, %rdi
+ leaq iopl_arg, %rsi
+ syscall
+
+ movw $SHUTDOWN_PORT, %dx
+ movb $'S', %al
+ outb %al, %dx
+ movb $'h', %al
+ outb %al, %dx
+ movb $'u', %al
+ outb %al, %dx
+ movb $'t', %al
+ outb %al, %dx
+ movb $'d', %al
+ outb %al, %dx
+ movb $'o', %al
+ outb %al, %dx
+ movb $'w', %al
+ outb %al, %dx
+ movb $'n', %al
+ outb %al, %dx
+
+ /* shutdown. */
+ movq $SYSCALL_RESET, %rax
+ movq $(RESET_POWEROFF|RESET_HALT|RESET_NOSYNC), %rdi
+ movq $0, %rsi
+ syscall
+
+ /* exit (1). Shouldn't be reached. */
+ movq $SYSCALL_EXIT, %rax
+ movq $1, %rdi
+ syscall
+ .section ".fini", "ax"
+1: jmp 1b
+ .section ".text", "ax"
+1: jmp 1b
+ /* This section is needed for NetBSD to identify the binary. */
+ .section ".note.netbsd.ident", "a"
+ .long 0x7
+ .long 0x4
+ .long 0x1
+ .ascii "NetBSD"
+ .byte 0
+ .data
+device:
+ .ascii "/dev/console"
+ .byte 0
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+messageend:
+iopl_arg:
+ .long 3
diff --git a/grub-core/tests/boot/kbsd.spec.txt b/grub-core/tests/boot/kbsd.spec.txt
new file mode 100644
index 0000000..af171bc
--- /dev/null
+++ b/grub-core/tests/boot/kbsd.spec.txt
@@ -0,0 +1,3 @@
+. type=dir
+ dev type=dir
+ console type=char device=0 mode=666 gid=0 uid=0
diff --git a/grub-core/tests/boot/kernel-8086.S b/grub-core/tests/boot/kernel-8086.S
new file mode 100644
index 0000000..20040da
--- /dev/null
+++ b/grub-core/tests/boot/kernel-8086.S
@@ -0,0 +1,69 @@
+
+#define SHUTDOWN_PORT 0x8900
+
+ .text
+ .globl _start
+_start:
+base:
+ .code16
+ jmp cont
+
+portmsg:
+ xorw %ax, %ax
+1:
+ movb 0(%si), %al
+ test %ax, %ax
+ jz 1f
+ outb %al, %dx
+ incw %si
+ jmp 1b
+1:
+ ret
+
+serialmsg:
+1:
+ movb 0(%si), %bl
+ testb %bl, %bl
+ jz 1f
+ movw $0x3fd, %dx
+2:
+ inb %dx, %al
+ testb $0x20, %al
+ jz 2b
+
+ movw $0x3f8, %dx
+ movb %bl, %al
+ outb %al, %dx
+ incw %si
+ jmp 1b
+1:
+ ret
+
+cont:
+#ifdef TARGET_NTLDR
+ movw $0x2000, %ax
+#elif defined (TARGET_CHAINLOADER)
+ xorw %ax, %ax
+#else
+#error unsupported target
+#endif
+ movw %ax, %ds
+ lea message, %si
+ call serialmsg
+ lea shutdown, %si
+ movw $SHUTDOWN_PORT, %dx
+ call portmsg
+
+1:
+ hlt
+ jmp 1b
+
+shutdown:
+ .ascii "Shutdown"
+ .byte 0
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+ .byte 0
+
+ . = base + 510
+ .short 0xaa55 \ No newline at end of file
diff --git a/grub-core/tests/boot/kernel-i386.S b/grub-core/tests/boot/kernel-i386.S
new file mode 100644
index 0000000..904b0d4
--- /dev/null
+++ b/grub-core/tests/boot/kernel-i386.S
@@ -0,0 +1,89 @@
+#define ASM_FILE 1
+#ifdef TARGET_MULTIBOOT2
+#include <multiboot2.h>
+#elif defined (TARGET_MULTIBOOT)
+#include <multiboot.h>
+#endif
+
+#define SHUTDOWN_PORT 0x8900
+
+ .text
+ /* Align 32 bits boundary. */
+ .align 8
+
+#ifdef TARGET_MULTIBOOT2
+ /* Multiboot header. */
+multiboot_header:
+ /* magic */
+ .long MULTIBOOT2_HEADER_MAGIC
+ /* ISA: i386 */
+ .long MULTIBOOT_ARCHITECTURE_I386
+ /* Header length. */
+ .long multiboot_header_end - multiboot_header
+ /* checksum */
+ .long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT_ARCHITECTURE_I386 + (multiboot_header_end - multiboot_header))
+ .short MULTIBOOT_HEADER_TAG_END
+ .short 0
+ .long 8
+multiboot_header_end:
+#elif defined (TARGET_MULTIBOOT)
+ /* Multiboot header. */
+multiboot_header:
+ /* magic */
+ .long MULTIBOOT_HEADER_MAGIC
+ /* flags */
+ .long 0
+ /* checksum */
+ .long -MULTIBOOT_HEADER_MAGIC
+#endif
+
+ .global start
+portmsg:
+ xorl %eax, %eax
+1:
+ movb 0(%esi), %al
+ test %eax, %eax
+ jz 1f
+ outb %al, %dx
+ incl %esi
+ jmp 1b
+1:
+ ret
+
+serialmsg:
+1:
+ movb 0(%esi), %bl
+ testb %bl, %bl
+ jz 1f
+ movw $0x3fd, %dx
+2:
+ inb %dx, %al
+ testb $0x20, %al
+ jz 2b
+
+ movw $0x3f8, %dx
+ movb %bl, %al
+ outb %al, %dx
+ incl %esi
+ jmp 1b
+1:
+ ret
+
+ .globl _start
+_start:
+ lea message, %esi
+ call serialmsg
+ lea shutdown, %esi
+ movw $SHUTDOWN_PORT, %dx
+ call portmsg
+
+1:
+ hlt
+ jmp 1b
+
+shutdown:
+ .ascii "Shutdown"
+ .byte 0
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+ .byte 0
diff --git a/grub-core/tests/boot/kfreebsd-aout.cfg b/grub-core/tests/boot/kfreebsd-aout.cfg
new file mode 100644
index 0000000..31e34b4
--- /dev/null
+++ b/grub-core/tests/boot/kfreebsd-aout.cfg
@@ -0,0 +1,4 @@
+kfreebsd /kfreebsd.aout
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/kfreebsd.cfg b/grub-core/tests/boot/kfreebsd.cfg
new file mode 100644
index 0000000..f28ee79
--- /dev/null
+++ b/grub-core/tests/boot/kfreebsd.cfg
@@ -0,0 +1,8 @@
+kfreebsd /kfreebsd -hv
+kfreebsd_loadenv /kfreebsd_env
+kfreebsd_module /mfsroot.gz type=mfs_root
+set kFreeBSD.hw.hasbrokenint12=1
+fakebios
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/kfreebsd.init-i386.S b/grub-core/tests/boot/kfreebsd.init-i386.S
new file mode 100644
index 0000000..12c94a0
--- /dev/null
+++ b/grub-core/tests/boot/kfreebsd.init-i386.S
@@ -0,0 +1,114 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define MODE_RDRW 2
+#define FLAGS_NONE 0
+#define SYSCALL_OPEN 5
+#define SYSCALL_WRITE 4
+#define SYSCALL_RESET 55
+#define SYSCALL_FSYNC 95
+#define SYSCALL_ARCH 165
+#define SYSCALL_EXIT 1
+#define SYSCALL_ARCH_IOPL 4
+#define SYSCALL_INT 0x80
+
+#define RESET_NOSYNC 0x4
+#define RESET_HALT 0x8
+#define RESET_POWEROFF 0x4000
+#define SHUTDOWN_PORT 0x8900
+
+ .section ".init", "ax"
+ .global start,_start
+start:
+_start:
+ /* open. */
+ movl $SYSCALL_OPEN, %eax
+ pushl $FLAGS_NONE
+ pushl $MODE_RDRW
+ leal device, %ebx
+ pushl %ebx
+ pushl $0
+ int $SYSCALL_INT
+ addl $16, %esp
+ movl %eax, %ecx
+
+ /* write. */
+ movl $SYSCALL_WRITE, %eax
+ pushl $(messageend-message)
+ leal message, %ebx
+ pushl %ebx
+ pushl %ecx
+ pushl $0
+ int $SYSCALL_INT
+ addl $16, %esp
+
+ /* fsync. */
+ movl $SYSCALL_FSYNC, %eax
+ pushl %ecx
+ pushl $0
+ int $SYSCALL_INT
+ addl $8, %esp
+
+ /* IOPL. */
+ movl $SYSCALL_ARCH, %eax
+ pushl $iopl_arg
+ pushl $SYSCALL_ARCH_IOPL
+ pushl $0
+ int $SYSCALL_INT
+ addl $12, %esp
+
+ movw $SHUTDOWN_PORT, %dx
+ movb $'S', %al
+ outb %al, %dx
+ movb $'h', %al
+ outb %al, %dx
+ movb $'u', %al
+ outb %al, %dx
+ movb $'t', %al
+ outb %al, %dx
+ movb $'d', %al
+ outb %al, %dx
+ movb $'o', %al
+ outb %al, %dx
+ movb $'w', %al
+ outb %al, %dx
+ movb $'n', %al
+ outb %al, %dx
+
+ /* shutdown. */
+ movl $SYSCALL_RESET, %eax
+ pushl $(RESET_POWEROFF|RESET_HALT|RESET_NOSYNC)
+ pushl $0
+ int $SYSCALL_INT
+ addl $8, %esp
+
+ /* exit (1). Shouldn't be reached. */
+ movl $SYSCALL_EXIT, %eax
+ pushl $1
+ pushl $0
+ int $SYSCALL_INT
+device:
+ .ascii "/dev/console"
+ .byte 0
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+messageend:
+iopl_arg:
+ .long SHUTDOWN_PORT
+ .long 1
+ .long 1
diff --git a/grub-core/tests/boot/kfreebsd.init-x86_64.S b/grub-core/tests/boot/kfreebsd.init-x86_64.S
new file mode 100644
index 0000000..0a9ff51
--- /dev/null
+++ b/grub-core/tests/boot/kfreebsd.init-x86_64.S
@@ -0,0 +1,98 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define MODE_RDRW 2
+#define FLAGS_NONE 0
+#define SYSCALL_ARCH 165
+#define SYSCALL_OPEN 5
+#define SYSCALL_WRITE 4
+#define SYSCALL_RESET 55
+#define SYSCALL_EXIT 1
+#define SYSCALL_ARCH_IOPL 4
+#define SYSCALL_FSYNC 95
+
+#define RESET_NOSYNC 0x4
+#define RESET_HALT 0x8
+#define RESET_POWEROFF 0x4000
+#define SHUTDOWN_PORT 0x8900
+
+ .section ".init", "ax"
+ .global start,_start
+start:
+_start:
+ /* open. */
+ movq $SYSCALL_OPEN, %rax
+ leaq device, %rdi
+ movq $MODE_RDRW, %rsi
+ movq $FLAGS_NONE, %rdx
+ syscall
+ movq %rax, %rdi
+
+ /* write. */
+ leaq message, %rsi
+ movq $SYSCALL_WRITE, %rax
+ movq $(messageend - message), %rdx
+ syscall
+
+ /* fsync. */
+ movq $SYSCALL_FSYNC, %rax
+ syscall
+
+ /* IOPL. */
+ movq $SYSCALL_ARCH, %rax
+ movq $SYSCALL_ARCH_IOPL, %rdi
+ leaq iopl_arg, %rsi
+ syscall
+
+ movw $SHUTDOWN_PORT, %dx
+ movb $'S', %al
+ outb %al, %dx
+ movb $'h', %al
+ outb %al, %dx
+ movb $'u', %al
+ outb %al, %dx
+ movb $'t', %al
+ outb %al, %dx
+ movb $'d', %al
+ outb %al, %dx
+ movb $'o', %al
+ outb %al, %dx
+ movb $'w', %al
+ outb %al, %dx
+ movb $'n', %al
+ outb %al, %dx
+
+ /* shutdown. */
+ movq $SYSCALL_RESET, %rax
+ movq $(RESET_POWEROFF|RESET_HALT|RESET_NOSYNC), %rdi
+ syscall
+
+ /* exit (1). Shouldn't be reached. */
+ movq $SYSCALL_EXIT, %rax
+ movq $1, %rdi
+ syscall
+device:
+ .ascii "/dev/console"
+ .byte 0
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+messageend:
+iopl_arg:
+ .long SHUTDOWN_PORT
+ .long 1
+ .long 1
diff --git a/grub-core/tests/boot/knetbsd.cfg b/grub-core/tests/boot/knetbsd.cfg
new file mode 100644
index 0000000..f88a846
--- /dev/null
+++ b/grub-core/tests/boot/knetbsd.cfg
@@ -0,0 +1,5 @@
+knetbsd /knetbsd -h
+knetbsd_module_elf /miniroot.gz
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/kopenbsd.cfg b/grub-core/tests/boot/kopenbsd.cfg
new file mode 100644
index 0000000..132bec4
--- /dev/null
+++ b/grub-core/tests/boot/kopenbsd.cfg
@@ -0,0 +1,5 @@
+kopenbsd /kopenbsd -h
+kopenbsd_ramdisk /ramdisk
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/kopenbsdlabel.txt b/grub-core/tests/boot/kopenbsdlabel.txt
new file mode 100644
index 0000000..bb14113
--- /dev/null
+++ b/grub-core/tests/boot/kopenbsdlabel.txt
@@ -0,0 +1,3 @@
+# size offset fstype [fsize bsize bps/cpg]
+ a: 256 0 4.2BSD 0 0 1
+ c: 256 0 unused 0 0 # "raw" part, don't edit
diff --git a/grub-core/tests/boot/linux.cfg b/grub-core/tests/boot/linux.cfg
new file mode 100644
index 0000000..f5bf6ac
--- /dev/null
+++ b/grub-core/tests/boot/linux.cfg
@@ -0,0 +1,5 @@
+linux /linux console=ttyS0 root=/dev/ram0
+initrd /initrd
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/linux.init-i386.S b/grub-core/tests/boot/linux.init-i386.S
new file mode 100644
index 0000000..5b0088e
--- /dev/null
+++ b/grub-core/tests/boot/linux.init-i386.S
@@ -0,0 +1,79 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define SYSCALL_WRITE 4
+#define SYSCALL_RESET 88
+#define SYSCALL_IOPL 110
+#define SYSCALL_EXIT 1
+#define SYSCALL_INT 0x80
+
+#define STDOUT 1
+#define SHUTDOWN_MAGIC1 0xfee1dead
+#define SHUTDOWN_MAGIC2 0x28121969
+#define SHUTDOWN_MAGIC3 0x4321fedc
+
+#define SHUTDOWN_PORT 0x8900
+
+ .text
+ .global start, _start
+_start:
+start:
+ /* write. */
+ movl $SYSCALL_WRITE, %eax
+ movl $STDOUT, %ebx
+ leal message, %ecx
+ movl $(messageend-message), %edx
+ int $SYSCALL_INT
+
+ movl $SYSCALL_IOPL, %eax
+ movl $3, %ebx
+ int $SYSCALL_INT
+
+ movw $SHUTDOWN_PORT, %dx
+ movb $'S', %al
+ outb %al, %dx
+ movb $'h', %al
+ outb %al, %dx
+ movb $'u', %al
+ outb %al, %dx
+ movb $'t', %al
+ outb %al, %dx
+ movb $'d', %al
+ outb %al, %dx
+ movb $'o', %al
+ outb %al, %dx
+ movb $'w', %al
+ outb %al, %dx
+ movb $'n', %al
+ outb %al, %dx
+
+ /* shutdown. */
+ movl $SYSCALL_RESET, %eax
+ movl $SHUTDOWN_MAGIC1, %ebx
+ movl $SHUTDOWN_MAGIC2, %ecx
+ movl $SHUTDOWN_MAGIC3, %edx
+ int $SYSCALL_INT
+
+ /* exit (1). Shouldn't be reached. */
+ movl $SYSCALL_EXIT, %eax
+ movl $1, %ebx
+ int $SYSCALL_INT
+ .data
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+messageend:
diff --git a/grub-core/tests/boot/linux.init-x86_64.S b/grub-core/tests/boot/linux.init-x86_64.S
new file mode 100644
index 0000000..fc32dfd
--- /dev/null
+++ b/grub-core/tests/boot/linux.init-x86_64.S
@@ -0,0 +1,78 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define SYSCALL_WRITE 1
+#define SYSCALL_RESET 169
+#define SYSCALL_IOPL 172
+#define SYSCALL_EXIT 60
+
+#define STDOUT 1
+#define SHUTDOWN_MAGIC1 0xfee1dead
+#define SHUTDOWN_MAGIC2 0x28121969
+#define SHUTDOWN_MAGIC3 0x4321fedc
+
+#define SHUTDOWN_PORT 0x8900
+
+ .text
+ .global start, _start
+_start:
+start:
+ /* write. */
+ movq $SYSCALL_WRITE, %rax
+ movq $STDOUT, %rdi
+ leaq message, %rsi
+ movq $(messageend-message), %rdx
+ syscall
+
+ movq $SYSCALL_IOPL, %rax
+ movq $3, %rdi
+ syscall
+
+ movw $SHUTDOWN_PORT, %dx
+ movb $'S', %al
+ outb %al, %dx
+ movb $'h', %al
+ outb %al, %dx
+ movb $'u', %al
+ outb %al, %dx
+ movb $'t', %al
+ outb %al, %dx
+ movb $'d', %al
+ outb %al, %dx
+ movb $'o', %al
+ outb %al, %dx
+ movb $'w', %al
+ outb %al, %dx
+ movb $'n', %al
+ outb %al, %dx
+
+ /* shutdown. */
+ movq $SYSCALL_RESET, %rax
+ movq $SHUTDOWN_MAGIC1, %rdi
+ movq $SHUTDOWN_MAGIC2, %rsi
+ movq $SHUTDOWN_MAGIC3, %rdx
+ syscall
+
+ /* exit(1). Shouldn't be reached. */
+ movq $SYSCALL_EXIT, %rax
+ movq $1, %rdi
+ syscall
+ .data
+message:
+ .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
+messageend:
diff --git a/grub-core/tests/boot/linux16.cfg b/grub-core/tests/boot/linux16.cfg
new file mode 100644
index 0000000..d7fbf96
--- /dev/null
+++ b/grub-core/tests/boot/linux16.cfg
@@ -0,0 +1,5 @@
+linux16 /linux console=ttyS0 root=/dev/ram0
+initrd16 /initrd
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/multiboot.cfg b/grub-core/tests/boot/multiboot.cfg
new file mode 100644
index 0000000..0942ec6
--- /dev/null
+++ b/grub-core/tests/boot/multiboot.cfg
@@ -0,0 +1,4 @@
+multiboot /multiboot.elf
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/multiboot2.cfg b/grub-core/tests/boot/multiboot2.cfg
new file mode 100644
index 0000000..2bec9e6
--- /dev/null
+++ b/grub-core/tests/boot/multiboot2.cfg
@@ -0,0 +1,4 @@
+multiboot2 /multiboot2.elf
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/ntldr.cfg b/grub-core/tests/boot/ntldr.cfg
new file mode 100644
index 0000000..cd438a4
--- /dev/null
+++ b/grub-core/tests/boot/ntldr.cfg
@@ -0,0 +1,4 @@
+ntldr /ntldr.bin
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/boot/pc-chainloader.cfg b/grub-core/tests/boot/pc-chainloader.cfg
new file mode 100644
index 0000000..1e80a5b
--- /dev/null
+++ b/grub-core/tests/boot/pc-chainloader.cfg
@@ -0,0 +1,4 @@
+chainloader /pc-chainloader.bin
+boot
+# Shouln't happen
+halt
diff --git a/grub-core/tests/example_functional_test.c b/grub-core/tests/example_functional_test.c
new file mode 100644
index 0000000..8020887
--- /dev/null
+++ b/grub-core/tests/example_functional_test.c
@@ -0,0 +1,38 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* All tests need to include test.h for GRUB testing framework. */
+#include <grub/test.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Functional test main method. */
+static void
+example_test (void)
+{
+ /* Check if 1st argument is true and report with default error message. */
+ grub_test_assert (1 == 1);
+
+ /* Check if 1st argument is true and report with custom error message. */
+ grub_test_assert (2 == 2, "2 equal 2 expected");
+ grub_test_assert (2 != 3, "2 matches %d", 3);
+}
+
+/* Register example_test method as a functional test. */
+GRUB_FUNCTIONAL_TEST (example_functional_test, example_test);
diff --git a/grub-core/tests/lib/functional_test.c b/grub-core/tests/lib/functional_test.c
new file mode 100644
index 0000000..fd199bd
--- /dev/null
+++ b/grub-core/tests/lib/functional_test.c
@@ -0,0 +1,50 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/extcmd.h>
+#include <grub/test.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_functional_test (grub_extcmd_context_t ctxt __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_test_t test;
+
+ FOR_LIST_ELEMENTS (test, grub_test_list)
+ grub_test_run (test);
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT (functional_test)
+{
+ cmd = grub_register_extcmd ("functional_test", grub_functional_test, 0, 0,
+ "Run all functional tests.", 0);
+}
+
+GRUB_MOD_FINI (functional_test)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/tests/lib/test.c b/grub-core/tests/lib/test.c
new file mode 100644
index 0000000..06d78b7
--- /dev/null
+++ b/grub-core/tests/lib/test.c
@@ -0,0 +1,157 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/test.h>
+
+struct grub_test_failure
+{
+ /* The next failure. */
+ struct grub_test_failure *next;
+
+ /* The test source file name. */
+ char *file;
+
+ /* The test function name. */
+ char *funp;
+
+ /* The test call line number. */
+ grub_uint32_t line;
+
+ /* The test failure message. */
+ char *message;
+};
+typedef struct grub_test_failure *grub_test_failure_t;
+
+grub_test_t grub_test_list;
+static grub_test_failure_t failure_list;
+
+static void
+add_failure (const char *file,
+ const char *funp,
+ grub_uint32_t line, const char *fmt, va_list args)
+{
+ grub_test_failure_t failure;
+
+ failure = (grub_test_failure_t) grub_malloc (sizeof (*failure));
+ if (!failure)
+ return;
+
+ failure->file = grub_strdup (file ? : "<unknown_file>");
+ failure->funp = grub_strdup (funp ? : "<unknown_function>");
+ failure->line = line;
+ failure->message = grub_xvasprintf (fmt, args);
+
+ grub_list_push (GRUB_AS_LIST_P (&failure_list), GRUB_AS_LIST (failure));
+}
+
+static void
+free_failures (void)
+{
+ grub_test_failure_t item;
+
+ while (failure_list)
+ {
+ item = failure_list;
+ failure_list = item->next;
+ if (item->message)
+ grub_free (item->message);
+
+ if (item->funp)
+ grub_free (item->funp);
+
+ if (item->file)
+ grub_free (item->file);
+
+ grub_free (item);
+ }
+ failure_list = 0;
+}
+
+void
+grub_test_nonzero (int cond,
+ const char *file,
+ const char *funp, grub_uint32_t line, const char *fmt, ...)
+{
+ va_list ap;
+
+ if (cond)
+ return;
+
+ va_start (ap, fmt);
+ add_failure (file, funp, line, fmt, ap);
+ va_end (ap);
+}
+
+void
+grub_test_register (const char *name, void (*test_main) (void))
+{
+ grub_test_t test;
+
+ test = (grub_test_t) grub_malloc (sizeof (*test));
+ if (!test)
+ return;
+
+ test->name = grub_strdup (name);
+ test->main = test_main;
+
+ grub_list_push (GRUB_AS_LIST_P (&grub_test_list), GRUB_AS_LIST (test));
+}
+
+void
+grub_test_unregister (const char *name)
+{
+ grub_test_t test;
+
+ test = (grub_test_t) grub_named_list_find
+ (GRUB_AS_NAMED_LIST (grub_test_list), name);
+
+ if (test)
+ {
+ grub_list_remove (GRUB_AS_LIST_P (&grub_test_list), GRUB_AS_LIST (test));
+
+ if (test->name)
+ grub_free (test->name);
+
+ grub_free (test);
+ }
+}
+
+int
+grub_test_run (grub_test_t test)
+{
+ grub_test_failure_t failure;
+
+ test->main ();
+
+ grub_printf ("%s:\n", test->name);
+ FOR_LIST_ELEMENTS (failure, failure_list)
+ grub_printf (" %s:%s:%u: %s\n",
+ (failure->file ? : "<unknown_file>"),
+ (failure->funp ? : "<unknown_function>"),
+ failure->line, (failure->message ? : "<no message>"));
+
+ if (!failure_list)
+ grub_printf ("%s: PASS\n", test->name);
+ else
+ grub_printf ("%s: FAIL\n", test->name);
+
+ free_failures ();
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/tests/test_blockarg.c b/grub-core/tests/test_blockarg.c
new file mode 100644
index 0000000..ddd46e1
--- /dev/null
+++ b/grub-core/tests/test_blockarg.c
@@ -0,0 +1,53 @@
+/* test_blockarg.c - print and execute block argument */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/dl.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/i18n.h>
+#include <grub/extcmd.h>
+#include <grub/script_sh.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+test_blockarg (grub_extcmd_context_t ctxt, int argc, char **args)
+{
+ if (! ctxt->script)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "no block parameter");
+
+ grub_printf ("%s\n", args[argc - 1]);
+ grub_script_execute (ctxt->script);
+ return GRUB_ERR_NONE;
+}
+
+static grub_extcmd_t cmd;
+
+GRUB_MOD_INIT(test_blockarg)
+{
+ cmd = grub_register_extcmd ("test_blockarg", test_blockarg,
+ GRUB_COMMAND_FLAG_BLOCKS,
+ N_("BLOCK"),
+ N_("Print and execute block argument."), 0);
+}
+
+GRUB_MOD_FINI(test_blockarg)
+{
+ grub_unregister_extcmd (cmd);
+}
diff --git a/grub-core/unidata.c b/grub-core/unidata.c
new file mode 100644
index 0000000..3740b10
--- /dev/null
+++ b/grub-core/unidata.c
@@ -0,0 +1,1494 @@
+#include <grub/unicode.h>
+
+struct grub_unicode_compact_range grub_unicode_compact[] = {
+{0x0, 0x8, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x9, 0x9, GRUB_BIDI_TYPE_S, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa, 0xa, GRUB_BIDI_TYPE_B, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb, 0xb, GRUB_BIDI_TYPE_S, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xc, 0xc, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd, 0xd, GRUB_BIDI_TYPE_B, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xe, 0x1b, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1c, 0x1e, GRUB_BIDI_TYPE_B, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1f, 0x1f, GRUB_BIDI_TYPE_S, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x20, 0x20, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x21, 0x22, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x23, 0x25, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x26, 0x27, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x28, 0x29, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a, 0x2a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2b, 0x2b, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2c, 0x2c, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2d, 0x2d, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e, 0x2f, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x30, 0x39, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3a, 0x3a, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3b, 0x3b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3c, 0x3c, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x3d, 0x3d, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3e, 0x3e, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x3f, 0x40, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x5b, 0x5b, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x5c, 0x5c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x5d, 0x5d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x5e, 0x60, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7b, 0x7b, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x7c, 0x7c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7d, 0x7d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x7e, 0x7e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7f, 0x84, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x85, 0x85, GRUB_BIDI_TYPE_B, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x86, 0x9f, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa0, 0xa0, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa1, 0xa1, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa2, 0xa5, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa6, 0xa9, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xab, 0xab, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xac, 0xac, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xad, 0xad, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xae, 0xaf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb0, 0xb1, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb2, 0xb3, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb4, 0xb4, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb6, 0xb8, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb9, 0xb9, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbb, 0xbb, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xbc, 0xbf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd7, 0xd7, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xf7, 0xf7, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2b9, 0x2ba, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2c2, 0x2cf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2d2, 0x2df, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e5, 0x2ed, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2ef, 0x2ff, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x300, 0x314, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x315, 0x315, GRUB_BIDI_TYPE_NSM, 232, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x316, 0x319, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x31a, 0x31a, GRUB_BIDI_TYPE_NSM, 232, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x31b, 0x31b, GRUB_BIDI_TYPE_NSM, 216, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x31c, 0x320, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x321, 0x322, GRUB_BIDI_TYPE_NSM, 202, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x323, 0x326, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x327, 0x328, GRUB_BIDI_TYPE_NSM, 202, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x329, 0x333, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x334, 0x338, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x339, 0x33c, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x33d, 0x344, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x345, 0x345, GRUB_BIDI_TYPE_NSM, 240, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x346, 0x346, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x347, 0x349, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x34a, 0x34c, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x34d, 0x34e, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x34f, 0x34f, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x350, 0x352, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x353, 0x356, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x357, 0x357, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x358, 0x358, GRUB_BIDI_TYPE_NSM, 232, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x359, 0x35a, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x35b, 0x35b, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x35c, 0x35c, GRUB_BIDI_TYPE_NSM, 233, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x35d, 0x35e, GRUB_BIDI_TYPE_NSM, 234, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x35f, 0x35f, GRUB_BIDI_TYPE_NSM, 233, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x360, 0x361, GRUB_BIDI_TYPE_NSM, 234, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x362, 0x362, GRUB_BIDI_TYPE_NSM, 233, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x363, 0x36f, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x374, 0x375, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x37e, 0x37e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x384, 0x385, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x387, 0x387, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3f6, 0x3f6, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x483, 0x487, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x488, 0x489, GRUB_BIDI_TYPE_NSM, 253, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x58a, 0x58a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x591, 0x591, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x592, 0x595, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x596, 0x596, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x597, 0x599, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x59a, 0x59a, GRUB_BIDI_TYPE_NSM, 222, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x59b, 0x59b, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x59c, 0x5a1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5a2, 0x5a7, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5a8, 0x5a9, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5aa, 0x5aa, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5ab, 0x5ac, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5ad, 0x5ad, GRUB_BIDI_TYPE_NSM, 222, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5ae, 0x5ae, GRUB_BIDI_TYPE_NSM, 228, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5af, 0x5af, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b0, 0x5b0, GRUB_BIDI_TYPE_NSM, 10, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b1, 0x5b1, GRUB_BIDI_TYPE_NSM, 11, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b2, 0x5b2, GRUB_BIDI_TYPE_NSM, 12, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b3, 0x5b3, GRUB_BIDI_TYPE_NSM, 13, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b4, 0x5b4, GRUB_BIDI_TYPE_NSM, 14, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b5, 0x5b5, GRUB_BIDI_TYPE_NSM, 15, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b6, 0x5b6, GRUB_BIDI_TYPE_NSM, 16, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b7, 0x5b7, GRUB_BIDI_TYPE_NSM, 17, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b8, 0x5b8, GRUB_BIDI_TYPE_NSM, 18, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5b9, 0x5ba, GRUB_BIDI_TYPE_NSM, 19, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5bb, 0x5bb, GRUB_BIDI_TYPE_NSM, 20, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5bc, 0x5bc, GRUB_BIDI_TYPE_NSM, 21, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5bd, 0x5bd, GRUB_BIDI_TYPE_NSM, 22, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5be, 0x5be, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x5bf, 0x5bf, GRUB_BIDI_TYPE_NSM, 23, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5c0, 0x5c0, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x5c1, 0x5c1, GRUB_BIDI_TYPE_NSM, 24, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5c2, 0x5c2, GRUB_BIDI_TYPE_NSM, 25, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5c3, 0x5c3, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x5c4, 0x5c4, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5c5, 0x5c5, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5c6, 0x5c6, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x5c7, 0x5c7, GRUB_BIDI_TYPE_NSM, 18, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x5d0, 0x5ea, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x5f0, 0x5f4, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x600, 0x603, GRUB_BIDI_TYPE_AN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x606, 0x607, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x608, 0x608, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x609, 0x60a, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x60b, 0x60b, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x60c, 0x60c, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x60d, 0x60d, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x60e, 0x60f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x610, 0x617, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x618, 0x618, GRUB_BIDI_TYPE_NSM, 30, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x619, 0x619, GRUB_BIDI_TYPE_NSM, 31, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x61a, 0x61a, GRUB_BIDI_TYPE_NSM, 32, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x61b, 0x61b, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x61e, 0x61f, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x621, 0x621, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x622, 0x625, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x626, 0x626, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x627, 0x627, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x628, 0x628, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x629, 0x629, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x62a, 0x62e, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x62f, 0x632, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x633, 0x63f, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x640, 0x640, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_CAUSING},
+{0x641, 0x647, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x648, 0x648, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x649, 0x64a, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x64b, 0x64b, GRUB_BIDI_TYPE_NSM, 27, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x64c, 0x64c, GRUB_BIDI_TYPE_NSM, 28, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x64d, 0x64d, GRUB_BIDI_TYPE_NSM, 29, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x64e, 0x64e, GRUB_BIDI_TYPE_NSM, 30, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x64f, 0x64f, GRUB_BIDI_TYPE_NSM, 31, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x650, 0x650, GRUB_BIDI_TYPE_NSM, 32, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x651, 0x651, GRUB_BIDI_TYPE_NSM, 33, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x652, 0x652, GRUB_BIDI_TYPE_NSM, 34, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x653, 0x654, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x655, 0x656, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x657, 0x65b, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x65c, 0x65c, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x65d, 0x65e, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x660, 0x669, GRUB_BIDI_TYPE_AN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x66a, 0x66a, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x66b, 0x66c, GRUB_BIDI_TYPE_AN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x66d, 0x66d, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x66e, 0x66f, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x670, 0x670, GRUB_BIDI_TYPE_NSM, 35, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x671, 0x673, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x674, 0x674, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x675, 0x677, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x678, 0x687, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x688, 0x699, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x69a, 0x6bf, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x6c0, 0x6c0, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x6c1, 0x6c2, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x6c3, 0x6cb, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x6cc, 0x6cc, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x6cd, 0x6cd, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x6ce, 0x6ce, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x6cf, 0x6cf, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x6d0, 0x6d1, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x6d2, 0x6d3, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x6d4, 0x6d4, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x6d5, 0x6d5, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x6d6, 0x6dc, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6dd, 0x6dd, GRUB_BIDI_TYPE_AN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x6de, 0x6de, GRUB_BIDI_TYPE_NSM, 253, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6df, 0x6e2, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6e3, 0x6e3, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6e4, 0x6e4, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6e5, 0x6e6, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x6e7, 0x6e8, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6e9, 0x6e9, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x6ea, 0x6ea, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6eb, 0x6ec, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6ed, 0x6ed, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x6ee, 0x6ef, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x6f0, 0x6f9, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x6fa, 0x6fc, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x6fd, 0x6fe, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x6ff, 0x6ff, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x700, 0x70d, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x70f, 0x70f, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x710, 0x710, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x711, 0x711, GRUB_BIDI_TYPE_NSM, 36, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x712, 0x714, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x715, 0x719, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x71a, 0x71d, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x71e, 0x71e, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x71f, 0x727, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x728, 0x728, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x729, 0x729, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x72a, 0x72a, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x72b, 0x72b, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x72c, 0x72c, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x72d, 0x72e, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x72f, 0x72f, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x730, 0x730, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x731, 0x731, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x732, 0x733, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x734, 0x734, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x735, 0x736, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x737, 0x739, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x73a, 0x73a, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x73b, 0x73c, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x73d, 0x73d, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x73e, 0x73e, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x73f, 0x741, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x742, 0x742, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x743, 0x743, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x744, 0x744, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x745, 0x745, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x746, 0x746, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x747, 0x747, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x748, 0x748, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x749, 0x74a, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x74d, 0x74d, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x74e, 0x758, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x759, 0x75b, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x75c, 0x76a, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x76b, 0x76c, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x76d, 0x770, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x771, 0x771, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x772, 0x772, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x773, 0x774, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x775, 0x777, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x778, 0x779, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_RIGHT},
+{0x77a, 0x77f, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x780, 0x7a5, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7a6, 0x7b0, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x7b1, 0x7b1, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7c0, 0x7c9, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7ca, 0x7ea, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_DUAL},
+{0x7eb, 0x7f1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x7f2, 0x7f2, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x7f3, 0x7f3, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x7f4, 0x7f5, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7f6, 0x7f9, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x7fa, 0x7fa, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_CAUSING},
+{0x800, 0x815, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x816, 0x819, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x81a, 0x81a, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x81b, 0x823, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x824, 0x824, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x825, 0x827, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x828, 0x828, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x829, 0x82d, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x830, 0x83e, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x900, 0x902, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x903, 0x903, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x93c, 0x93c, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x93e, 0x940, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x941, 0x948, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x949, 0x94c, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x94d, 0x94d, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x94e, 0x94e, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x951, 0x951, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x952, 0x952, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x953, 0x954, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x955, 0x955, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x962, 0x963, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x981, 0x981, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x982, 0x983, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x9bc, 0x9bc, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x9be, 0x9c0, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x9c1, 0x9c4, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x9c7, 0x9c8, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x9cb, 0x9cc, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x9cd, 0x9cd, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x9d7, 0x9d7, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x9e2, 0x9e3, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x9f2, 0x9f3, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x9fb, 0x9fb, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa01, 0xa02, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa03, 0xa03, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa3c, 0xa3c, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa3e, 0xa40, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa41, 0xa42, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa47, 0xa48, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa4b, 0xa4c, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa4d, 0xa4d, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa51, 0xa51, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa70, 0xa71, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa75, 0xa75, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa81, 0xa82, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa83, 0xa83, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xabc, 0xabc, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xabe, 0xac0, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xac1, 0xac5, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xac7, 0xac8, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xac9, 0xac9, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xacb, 0xacc, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xacd, 0xacd, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xae2, 0xae3, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaf1, 0xaf1, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb01, 0xb01, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xb02, 0xb03, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb3c, 0xb3c, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xb3e, 0xb3e, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb3f, 0xb3f, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xb40, 0xb40, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb41, 0xb44, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xb47, 0xb48, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb4b, 0xb4c, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb4d, 0xb4d, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xb56, 0xb56, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xb57, 0xb57, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xb62, 0xb63, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xb82, 0xb82, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xbbe, 0xbbf, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbc0, 0xbc0, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xbc1, 0xbc2, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbc6, 0xbc8, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbca, 0xbcc, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbcd, 0xbcd, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xbd7, 0xbd7, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbf3, 0xbf8, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbf9, 0xbf9, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xbfa, 0xbfa, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xc01, 0xc03, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xc3e, 0xc40, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xc41, 0xc44, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xc46, 0xc48, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xc4a, 0xc4c, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xc4d, 0xc4d, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xc55, 0xc55, GRUB_BIDI_TYPE_NSM, 84, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xc56, 0xc56, GRUB_BIDI_TYPE_NSM, 91, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xc62, 0xc63, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xc78, 0xc7e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xc82, 0xc83, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xcbc, 0xcbc, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xcbe, 0xcbe, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xcbf, 0xcbf, GRUB_BIDI_TYPE_L, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xcc0, 0xcc4, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xcc6, 0xcc6, GRUB_BIDI_TYPE_L, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xcc7, 0xcc8, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xcca, 0xccb, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xccc, 0xccc, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xccd, 0xccd, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xcd5, 0xcd6, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xce2, 0xce3, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xcf1, 0xcf2, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd02, 0xd03, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd3e, 0xd40, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd41, 0xd44, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xd46, 0xd48, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd4a, 0xd4c, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd4d, 0xd4d, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xd57, 0xd57, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xd62, 0xd63, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xd82, 0xd83, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xdca, 0xdca, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xdcf, 0xdd1, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xdd2, 0xdd4, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xdd6, 0xdd6, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xdd8, 0xddf, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xdf2, 0xdf3, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xe31, 0xe31, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe34, 0xe37, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe38, 0xe39, GRUB_BIDI_TYPE_NSM, 103, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe3a, 0xe3a, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe3f, 0xe3f, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xe47, 0xe47, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe48, 0xe4b, GRUB_BIDI_TYPE_NSM, 107, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe4c, 0xe4e, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xeb1, 0xeb1, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xeb4, 0xeb7, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xeb8, 0xeb9, GRUB_BIDI_TYPE_NSM, 118, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xebb, 0xebc, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xec8, 0xecb, GRUB_BIDI_TYPE_NSM, 122, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xecc, 0xecd, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf18, 0xf19, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf35, 0xf35, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf37, 0xf37, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf39, 0xf39, GRUB_BIDI_TYPE_NSM, 216, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf3a, 0xf3d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xf3e, 0xf3f, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xf71, 0xf71, GRUB_BIDI_TYPE_NSM, 129, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf72, 0xf72, GRUB_BIDI_TYPE_NSM, 130, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf73, 0xf73, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf74, 0xf74, GRUB_BIDI_TYPE_NSM, 132, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf75, 0xf79, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf7a, 0xf7d, GRUB_BIDI_TYPE_NSM, 130, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf7e, 0xf7e, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf7f, 0xf7f, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xf80, 0xf80, GRUB_BIDI_TYPE_NSM, 130, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf81, 0xf81, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf82, 0xf83, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf84, 0xf84, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf86, 0xf87, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf90, 0xf97, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xf99, 0xfbc, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xfc6, 0xfc6, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x102b, 0x102c, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x102d, 0x1030, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1031, 0x1031, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1032, 0x1036, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1037, 0x1037, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1038, 0x1038, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1039, 0x103a, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x103b, 0x103c, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x103d, 0x103e, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1056, 0x1057, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1058, 0x1059, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x105e, 0x1060, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1062, 0x1064, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1067, 0x106d, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1071, 0x1074, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1082, 0x1082, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1083, 0x1084, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1085, 0x1086, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1087, 0x108c, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x108d, 0x108d, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x108f, 0x108f, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x109a, 0x109c, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x109d, 0x109d, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x135f, 0x135f, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1390, 0x1399, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1400, 0x1400, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1680, 0x1680, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x169b, 0x169c, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x1712, 0x1713, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1714, 0x1714, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1732, 0x1733, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1734, 0x1734, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1752, 0x1753, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1772, 0x1773, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x17b6, 0x17b6, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x17b7, 0x17bd, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x17be, 0x17c5, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x17c6, 0x17c6, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x17c7, 0x17c8, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x17c9, 0x17d1, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x17d2, 0x17d2, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x17d3, 0x17d3, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x17db, 0x17db, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x17dd, 0x17dd, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x17f0, 0x17f9, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1800, 0x180a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x180b, 0x180d, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x180e, 0x180e, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x18a9, 0x18a9, GRUB_BIDI_TYPE_NSM, 228, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1920, 0x1922, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1923, 0x1926, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1927, 0x1928, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1929, 0x192b, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1930, 0x1931, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1932, 0x1932, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1933, 0x1938, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1939, 0x1939, GRUB_BIDI_TYPE_NSM, 222, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x193a, 0x193a, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x193b, 0x193b, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1940, 0x1940, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1944, 0x1945, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x19b0, 0x19c0, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x19c8, 0x19c9, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x19de, 0x19ff, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1a17, 0x1a17, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a18, 0x1a18, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a19, 0x1a1b, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1a55, 0x1a55, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1a56, 0x1a56, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a57, 0x1a57, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1a58, 0x1a5e, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a60, 0x1a60, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a61, 0x1a61, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1a62, 0x1a62, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a63, 0x1a64, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1a65, 0x1a6c, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a6d, 0x1a72, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1a73, 0x1a74, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a75, 0x1a7c, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1a7f, 0x1a7f, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b00, 0x1b03, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b04, 0x1b04, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1b34, 0x1b34, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b35, 0x1b35, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1b36, 0x1b3a, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b3b, 0x1b3b, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1b3c, 0x1b3c, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b3d, 0x1b41, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1b42, 0x1b42, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b43, 0x1b43, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1b44, 0x1b44, GRUB_BIDI_TYPE_L, 9, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1b6b, 0x1b6b, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b6c, 0x1b6c, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b6d, 0x1b73, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b80, 0x1b81, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1b82, 0x1b82, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1ba1, 0x1ba1, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1ba2, 0x1ba5, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1ba6, 0x1ba7, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1ba8, 0x1ba9, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1baa, 0x1baa, GRUB_BIDI_TYPE_L, 9, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1c24, 0x1c2b, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1c2c, 0x1c33, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1c34, 0x1c35, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1c36, 0x1c36, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1c37, 0x1c37, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1cd0, 0x1cd2, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1cd4, 0x1cd4, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1cd5, 0x1cd9, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1cda, 0x1cdb, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1cdc, 0x1cdf, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1ce0, 0x1ce0, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1ce1, 0x1ce1, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1ce2, 0x1ce8, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1ced, 0x1ced, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1cf2, 0x1cf2, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1dc0, 0x1dc1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dc2, 0x1dc2, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dc3, 0x1dc9, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dca, 0x1dca, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dcb, 0x1dcc, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dcd, 0x1dcd, GRUB_BIDI_TYPE_NSM, 234, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dce, 0x1dce, GRUB_BIDI_TYPE_NSM, 214, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dcf, 0x1dcf, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dd0, 0x1dd0, GRUB_BIDI_TYPE_NSM, 202, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dd1, 0x1de6, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dfd, 0x1dfd, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dfe, 0x1dfe, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1dff, 0x1dff, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1fbd, 0x1fbd, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1fbf, 0x1fc1, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1fcd, 0x1fcf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1fdd, 0x1fdf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1fed, 0x1fef, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1ffd, 0x1ffe, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2000, 0x200a, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x200b, 0x200b, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x200c, 0x200c, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x200d, 0x200d, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_CAUSING},
+{0x200f, 0x200f, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x2010, 0x2027, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2028, 0x2028, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2029, 0x2029, GRUB_BIDI_TYPE_B, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x202a, 0x202a, GRUB_BIDI_TYPE_LRE, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x202b, 0x202b, GRUB_BIDI_TYPE_RLE, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x202c, 0x202c, GRUB_BIDI_TYPE_PDF, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x202d, 0x202d, GRUB_BIDI_TYPE_LRO, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x202e, 0x202e, GRUB_BIDI_TYPE_RLO, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x202f, 0x202f, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2030, 0x2034, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2035, 0x2038, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2039, 0x203a, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x203b, 0x2043, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2044, 0x2044, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2045, 0x2046, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2047, 0x205e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x205f, 0x205f, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2060, 0x2064, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x206a, 0x206f, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x2070, 0x2070, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2074, 0x2079, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x207a, 0x207b, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x207c, 0x207c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x207d, 0x207e, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2080, 0x2089, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x208a, 0x208b, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x208c, 0x208c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x208d, 0x208e, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x20a0, 0x20b8, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x20d0, 0x20d1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20d2, 0x20d3, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20d4, 0x20d7, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20d8, 0x20da, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20db, 0x20dc, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20dd, 0x20e0, GRUB_BIDI_TYPE_NSM, 253, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20e1, 0x20e1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20e2, 0x20e4, GRUB_BIDI_TYPE_NSM, 253, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20e5, 0x20e6, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20e7, 0x20e7, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20e8, 0x20e8, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20e9, 0x20e9, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20ea, 0x20eb, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20ec, 0x20ef, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x20f0, 0x20f0, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x2100, 0x2101, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2103, 0x2106, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2108, 0x2109, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2114, 0x2114, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2116, 0x2118, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x211e, 0x2123, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2125, 0x2125, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2127, 0x2127, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2129, 0x2129, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x212e, 0x212e, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x213a, 0x213b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2140, 0x2140, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2141, 0x2144, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x214a, 0x214d, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2150, 0x215f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2189, 0x2189, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2190, 0x2200, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2201, 0x2204, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2205, 0x2207, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2208, 0x220d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x220e, 0x2210, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2211, 0x2211, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2212, 0x2212, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2213, 0x2213, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2214, 0x2214, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2215, 0x2216, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2217, 0x2219, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x221a, 0x221d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x221e, 0x221e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x221f, 0x2222, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2223, 0x2223, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2224, 0x2224, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2225, 0x2225, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2226, 0x2226, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2227, 0x222a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x222b, 0x2233, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2234, 0x2238, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2239, 0x2239, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x223a, 0x223a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x223b, 0x224c, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x224d, 0x2251, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2252, 0x2255, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2256, 0x225e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x225f, 0x2260, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2261, 0x2261, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2262, 0x2262, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2263, 0x2263, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2264, 0x226b, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x226c, 0x226d, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x226e, 0x228c, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x228d, 0x228e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x228f, 0x2292, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2293, 0x2297, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2298, 0x2298, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2299, 0x22a1, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x22a2, 0x22a3, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x22a4, 0x22a5, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x22a6, 0x22b8, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x22b9, 0x22bd, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x22be, 0x22bf, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x22c0, 0x22c8, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x22c9, 0x22cd, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x22ce, 0x22cf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x22d0, 0x22d1, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x22d2, 0x22d5, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x22d6, 0x22ed, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x22ee, 0x22ef, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x22f0, 0x22ff, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2300, 0x2307, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2308, 0x230b, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x230c, 0x231f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2320, 0x2321, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2322, 0x2328, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2329, 0x232a, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x232b, 0x2335, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x237b, 0x2394, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2396, 0x23e8, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2400, 0x2426, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2440, 0x244a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2460, 0x2487, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2488, 0x249b, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x24ea, 0x26ab, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x26ad, 0x26cd, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x26cf, 0x26e1, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x26e3, 0x26e3, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x26e8, 0x26ff, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2701, 0x2704, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2706, 0x2709, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x270c, 0x2727, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2729, 0x274b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x274d, 0x274d, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x274f, 0x2752, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2756, 0x275e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2761, 0x2767, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2768, 0x2775, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2776, 0x2794, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2798, 0x27af, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27b1, 0x27be, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27c0, 0x27c0, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x27c1, 0x27c2, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27c3, 0x27c6, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x27c7, 0x27c7, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27c8, 0x27c9, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x27ca, 0x27ca, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27cc, 0x27cc, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x27d0, 0x27d2, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27d3, 0x27d6, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x27d7, 0x27db, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27dc, 0x27de, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x27df, 0x27e1, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x27e2, 0x27ef, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x27f0, 0x27ff, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2900, 0x2982, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2983, 0x2998, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2999, 0x299a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x299b, 0x29af, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29b0, 0x29b7, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29b8, 0x29b8, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29b9, 0x29bf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29c0, 0x29c5, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29c6, 0x29c8, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29c9, 0x29c9, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29ca, 0x29cd, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29ce, 0x29d2, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29d3, 0x29d3, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29d4, 0x29d5, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29d6, 0x29d7, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29d8, 0x29dc, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29dd, 0x29e0, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29e1, 0x29e1, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29e2, 0x29e2, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29e3, 0x29e5, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29e6, 0x29e7, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29e8, 0x29e9, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29ea, 0x29f3, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29f4, 0x29f9, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29fa, 0x29fb, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x29fc, 0x29fd, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x29fe, 0x2a09, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a0a, 0x2a1c, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a1d, 0x2a1d, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a1e, 0x2a21, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a22, 0x2a23, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a24, 0x2a24, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a25, 0x2a25, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a26, 0x2a26, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a27, 0x2a28, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a29, 0x2a29, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a2a, 0x2a2a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a2b, 0x2a2e, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a2f, 0x2a33, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a34, 0x2a35, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a36, 0x2a3b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a3c, 0x2a3e, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a3f, 0x2a56, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a57, 0x2a58, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a59, 0x2a63, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a64, 0x2a65, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a66, 0x2a69, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a6a, 0x2a6d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a6e, 0x2a6e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a6f, 0x2a70, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a71, 0x2a72, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a73, 0x2a74, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a75, 0x2a78, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2a79, 0x2aa3, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2aa4, 0x2aa5, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2aa6, 0x2aad, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2aae, 0x2aae, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2aaf, 0x2ad6, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2ad7, 0x2adb, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2adc, 0x2adc, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2add, 0x2add, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2ade, 0x2ade, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2adf, 0x2ae1, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2ae2, 0x2ae6, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2ae7, 0x2aeb, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2aec, 0x2aee, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2aef, 0x2af2, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2af3, 0x2af3, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2af4, 0x2af6, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2af7, 0x2afb, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2afc, 0x2afc, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2afd, 0x2afd, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2afe, 0x2b4c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2b50, 0x2b59, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2ce5, 0x2cea, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2cef, 0x2cf1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x2cf9, 0x2cff, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2de0, 0x2dff, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x2e00, 0x2e01, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e02, 0x2e05, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e06, 0x2e08, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e09, 0x2e0a, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e0b, 0x2e0b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e0c, 0x2e0d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e0e, 0x2e1b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e1c, 0x2e1d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e1e, 0x2e1f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e20, 0x2e29, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e2a, 0x2e31, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e80, 0x2e99, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2e9b, 0x2ef3, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2f00, 0x2fd5, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x2ff0, 0x2ffb, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3000, 0x3000, GRUB_BIDI_TYPE_WS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3001, 0x3004, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3008, 0x3011, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x3012, 0x3013, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3014, 0x301b, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x301c, 0x3020, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x302a, 0x302a, GRUB_BIDI_TYPE_NSM, 218, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x302b, 0x302b, GRUB_BIDI_TYPE_NSM, 228, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x302c, 0x302c, GRUB_BIDI_TYPE_NSM, 232, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x302d, 0x302d, GRUB_BIDI_TYPE_NSM, 222, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x302e, 0x302f, GRUB_BIDI_TYPE_NSM, 224, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x3030, 0x3030, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3036, 0x3037, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x303d, 0x303f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3099, 0x309a, GRUB_BIDI_TYPE_NSM, 8, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x309b, 0x309c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x30a0, 0x30a0, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x30fb, 0x30fb, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x31c0, 0x31e3, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x321d, 0x321e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3250, 0x325f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x327c, 0x327e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x32b1, 0x32bf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x32cc, 0x32cf, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x3377, 0x337a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x33de, 0x33df, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x33ff, 0x33ff, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x4dc0, 0x4dff, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa490, 0xa4c6, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa60d, 0xa60f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa66f, 0xa66f, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa670, 0xa672, GRUB_BIDI_TYPE_NSM, 253, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa673, 0xa673, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa67c, 0xa67d, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa67e, 0xa67f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa6f0, 0xa6f1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa700, 0xa721, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa788, 0xa788, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa802, 0xa802, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa806, 0xa806, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa80b, 0xa80b, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa823, 0xa824, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa825, 0xa826, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa827, 0xa827, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa828, 0xa82b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa838, 0xa839, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa874, 0xa877, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa880, 0xa881, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa8b4, 0xa8c3, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa8c4, 0xa8c4, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa8e0, 0xa8f1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa926, 0xa92a, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa92b, 0xa92d, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa947, 0xa951, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa952, 0xa952, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa953, 0xa953, GRUB_BIDI_TYPE_L, 9, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa980, 0xa982, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa983, 0xa983, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa9b3, 0xa9b3, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa9b4, 0xa9b5, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa9b6, 0xa9b9, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa9ba, 0xa9bb, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa9bc, 0xa9bc, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xa9bd, 0xa9bf, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xa9c0, 0xa9c0, GRUB_BIDI_TYPE_L, 9, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xaa29, 0xaa2e, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaa2f, 0xaa30, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xaa31, 0xaa32, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaa33, 0xaa34, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xaa35, 0xaa36, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaa43, 0xaa43, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaa4c, 0xaa4c, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaa4d, 0xaa4d, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xaa7b, 0xaa7b, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xaab0, 0xaab0, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaab2, 0xaab3, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaab4, 0xaab4, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaab7, 0xaab8, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaabe, 0xaabf, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xaac1, 0xaac1, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xabe3, 0xabe4, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xabe5, 0xabe5, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xabe6, 0xabe7, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xabe8, 0xabe8, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xabe9, 0xabea, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xabec, 0xabec, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xabed, 0xabed, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xfb1d, 0xfb1d, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb1e, 0xfb1e, GRUB_BIDI_TYPE_NSM, 26, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xfb1f, 0xfb28, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb29, 0xfb29, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb2a, 0xfb36, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb38, 0xfb3c, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb3e, 0xfb3e, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb40, 0xfb41, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb43, 0xfb44, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb46, 0xfb4f, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfb50, 0xfbb1, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfbd3, 0xfd3d, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfd3e, 0xfd3f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfd50, 0xfd8f, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfd92, 0xfdc7, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfdf0, 0xfdfc, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfdfd, 0xfdfd, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe00, 0xfe0f, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xfe10, 0xfe19, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe20, 0xfe26, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xfe30, 0xfe4f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe50, 0xfe50, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe51, 0xfe51, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe52, 0xfe52, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe54, 0xfe54, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe55, 0xfe55, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe56, 0xfe58, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe59, 0xfe5e, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe5f, 0xfe5f, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe60, 0xfe61, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe62, 0xfe63, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe64, 0xfe65, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe66, 0xfe66, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe68, 0xfe68, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe69, 0xfe6a, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe6b, 0xfe6b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe70, 0xfe74, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfe76, 0xfefc, GRUB_BIDI_TYPE_AL, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfeff, 0xfeff, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xff01, 0xff02, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff03, 0xff05, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff06, 0xff07, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff08, 0xff09, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff0a, 0xff0a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff0b, 0xff0b, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff0c, 0xff0c, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff0d, 0xff0d, GRUB_BIDI_TYPE_ES, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff0e, 0xff0f, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff10, 0xff19, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff1a, 0xff1a, GRUB_BIDI_TYPE_CS, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff1b, 0xff1b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff1c, 0xff1c, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff1d, 0xff1d, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff1e, 0xff1e, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff1f, 0xff20, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff3b, 0xff3b, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff3c, 0xff3c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff3d, 0xff3d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff3e, 0xff40, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff5b, 0xff5b, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff5c, 0xff5c, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff5d, 0xff5d, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff5e, 0xff5e, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff5f, 0xff60, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff61, 0xff61, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xff62, 0xff63, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0xff64, 0xff65, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xffe0, 0xffe1, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xffe2, 0xffe4, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xffe5, 0xffe6, GRUB_BIDI_TYPE_ET, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xffe8, 0xffee, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xfff9, 0xfffb, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xfffc, 0xfffd, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10101, 0x10101, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10140, 0x1018a, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10190, 0x1019b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x101fd, 0x101fd, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10800, 0x10805, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10808, 0x10808, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1080a, 0x10835, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10837, 0x10838, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1083c, 0x1083c, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1083f, 0x10855, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10857, 0x1085f, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10900, 0x1091b, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1091f, 0x1091f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10920, 0x10939, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1093f, 0x1093f, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10a00, 0x10a00, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10a01, 0x10a03, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a05, 0x10a06, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a0c, 0x10a0c, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a0d, 0x10a0d, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a0e, 0x10a0e, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a0f, 0x10a0f, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a10, 0x10a13, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10a15, 0x10a17, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10a19, 0x10a33, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10a38, 0x10a38, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a39, 0x10a39, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a3a, 0x10a3a, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a3f, 0x10a3f, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x10a40, 0x10a47, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10a50, 0x10a58, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10a60, 0x10a7f, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10b00, 0x10b35, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10b39, 0x10b3f, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10b40, 0x10b55, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10b58, 0x10b72, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10b78, 0x10b7f, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10c00, 0x10c48, GRUB_BIDI_TYPE_R, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x10e60, 0x10e7e, GRUB_BIDI_TYPE_AN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x11080, 0x11081, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x11082, 0x11082, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x110b0, 0x110b2, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x110b3, 0x110b6, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x110b7, 0x110b8, GRUB_BIDI_TYPE_L, 254, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x110b9, 0x110b9, GRUB_BIDI_TYPE_NSM, 9, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x110ba, 0x110ba, GRUB_BIDI_TYPE_NSM, 7, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d165, 0x1d166, GRUB_BIDI_TYPE_L, 216, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d167, 0x1d169, GRUB_BIDI_TYPE_NSM, 1, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d16d, 0x1d16d, GRUB_BIDI_TYPE_L, 226, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d16e, 0x1d172, GRUB_BIDI_TYPE_L, 216, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d173, 0x1d17a, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d17b, 0x1d182, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d185, 0x1d189, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d18a, 0x1d18b, GRUB_BIDI_TYPE_NSM, 220, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d1aa, 0x1d1ad, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d200, 0x1d241, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d242, 0x1d244, GRUB_BIDI_TYPE_NSM, 230, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0x1d245, 0x1d245, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d300, 0x1d356, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d6db, 0x1d6db, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d715, 0x1d715, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d74f, 0x1d74f, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d789, 0x1d789, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d7c3, 0x1d7c3, GRUB_BIDI_TYPE_ON, 0, 1, GRUB_JOIN_TYPE_NONJOINING},
+{0x1d7ce, 0x1d7ff, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1f000, 0x1f02b, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1f030, 0x1f093, GRUB_BIDI_TYPE_ON, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0x1f100, 0x1f10a, GRUB_BIDI_TYPE_EN, 0, 0, GRUB_JOIN_TYPE_NONJOINING},
+{0xe0001, 0xe0001, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe0020, 0xe007f, GRUB_BIDI_TYPE_BN, 0, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0xe0100, 0xe01ef, GRUB_BIDI_TYPE_NSM, 255, 0, GRUB_JOIN_TYPE_TRANSPARENT},
+{0, 0, 0, 0, 0, 0},
+};
+struct grub_unicode_bidi_pair grub_unicode_bidi_pairs[] = {
+{0x28, 0x29},
+{0x29, 0x28},
+{0x3c, 0x3e},
+{0x3e, 0x3c},
+{0x5b, 0x5d},
+{0x5d, 0x5b},
+{0x7b, 0x7d},
+{0x7d, 0x7b},
+{0xab, 0xbb},
+{0xbb, 0xab},
+{0xf3a, 0xf3b},
+{0xf3b, 0xf3a},
+{0xf3c, 0xf3d},
+{0xf3d, 0xf3c},
+{0x169b, 0x169c},
+{0x169c, 0x169b},
+{0x2039, 0x203a},
+{0x203a, 0x2039},
+{0x2045, 0x2046},
+{0x2046, 0x2045},
+{0x207d, 0x207e},
+{0x207e, 0x207d},
+{0x208d, 0x208e},
+{0x208e, 0x208d},
+{0x2208, 0x220b},
+{0x2209, 0x220c},
+{0x220a, 0x220d},
+{0x220b, 0x2208},
+{0x220c, 0x2209},
+{0x220d, 0x220a},
+{0x2215, 0x29f5},
+{0x223c, 0x223d},
+{0x223d, 0x223c},
+{0x2243, 0x22cd},
+{0x2252, 0x2253},
+{0x2253, 0x2252},
+{0x2254, 0x2255},
+{0x2255, 0x2254},
+{0x2264, 0x2265},
+{0x2265, 0x2264},
+{0x2266, 0x2267},
+{0x2267, 0x2266},
+{0x2268, 0x2269},
+{0x2269, 0x2268},
+{0x226a, 0x226b},
+{0x226b, 0x226a},
+{0x226e, 0x226f},
+{0x226f, 0x226e},
+{0x2270, 0x2271},
+{0x2271, 0x2270},
+{0x2272, 0x2273},
+{0x2273, 0x2272},
+{0x2274, 0x2275},
+{0x2275, 0x2274},
+{0x2276, 0x2277},
+{0x2277, 0x2276},
+{0x2278, 0x2279},
+{0x2279, 0x2278},
+{0x227a, 0x227b},
+{0x227b, 0x227a},
+{0x227c, 0x227d},
+{0x227d, 0x227c},
+{0x227e, 0x227f},
+{0x227f, 0x227e},
+{0x2280, 0x2281},
+{0x2281, 0x2280},
+{0x2282, 0x2283},
+{0x2283, 0x2282},
+{0x2284, 0x2285},
+{0x2285, 0x2284},
+{0x2286, 0x2287},
+{0x2287, 0x2286},
+{0x2288, 0x2289},
+{0x2289, 0x2288},
+{0x228a, 0x228b},
+{0x228b, 0x228a},
+{0x228f, 0x2290},
+{0x2290, 0x228f},
+{0x2291, 0x2292},
+{0x2292, 0x2291},
+{0x2298, 0x29b8},
+{0x22a2, 0x22a3},
+{0x22a3, 0x22a2},
+{0x22a6, 0x2ade},
+{0x22a8, 0x2ae4},
+{0x22a9, 0x2ae3},
+{0x22ab, 0x2ae5},
+{0x22b0, 0x22b1},
+{0x22b1, 0x22b0},
+{0x22b2, 0x22b3},
+{0x22b3, 0x22b2},
+{0x22b4, 0x22b5},
+{0x22b5, 0x22b4},
+{0x22b6, 0x22b7},
+{0x22b7, 0x22b6},
+{0x22c9, 0x22ca},
+{0x22ca, 0x22c9},
+{0x22cb, 0x22cc},
+{0x22cc, 0x22cb},
+{0x22cd, 0x2243},
+{0x22d0, 0x22d1},
+{0x22d1, 0x22d0},
+{0x22d6, 0x22d7},
+{0x22d7, 0x22d6},
+{0x22d8, 0x22d9},
+{0x22d9, 0x22d8},
+{0x22da, 0x22db},
+{0x22db, 0x22da},
+{0x22dc, 0x22dd},
+{0x22dd, 0x22dc},
+{0x22de, 0x22df},
+{0x22df, 0x22de},
+{0x22e0, 0x22e1},
+{0x22e1, 0x22e0},
+{0x22e2, 0x22e3},
+{0x22e3, 0x22e2},
+{0x22e4, 0x22e5},
+{0x22e5, 0x22e4},
+{0x22e6, 0x22e7},
+{0x22e7, 0x22e6},
+{0x22e8, 0x22e9},
+{0x22e9, 0x22e8},
+{0x22ea, 0x22eb},
+{0x22eb, 0x22ea},
+{0x22ec, 0x22ed},
+{0x22ed, 0x22ec},
+{0x22f0, 0x22f1},
+{0x22f1, 0x22f0},
+{0x22f2, 0x22fa},
+{0x22f3, 0x22fb},
+{0x22f4, 0x22fc},
+{0x22f6, 0x22fd},
+{0x22f7, 0x22fe},
+{0x22fa, 0x22f2},
+{0x22fb, 0x22f3},
+{0x22fc, 0x22f4},
+{0x22fd, 0x22f6},
+{0x22fe, 0x22f7},
+{0x2308, 0x2309},
+{0x2309, 0x2308},
+{0x230a, 0x230b},
+{0x230b, 0x230a},
+{0x2329, 0x232a},
+{0x232a, 0x2329},
+{0x2768, 0x2769},
+{0x2769, 0x2768},
+{0x276a, 0x276b},
+{0x276b, 0x276a},
+{0x276c, 0x276d},
+{0x276d, 0x276c},
+{0x276e, 0x276f},
+{0x276f, 0x276e},
+{0x2770, 0x2771},
+{0x2771, 0x2770},
+{0x2772, 0x2773},
+{0x2773, 0x2772},
+{0x2774, 0x2775},
+{0x2775, 0x2774},
+{0x27c3, 0x27c4},
+{0x27c4, 0x27c3},
+{0x27c5, 0x27c6},
+{0x27c6, 0x27c5},
+{0x27c8, 0x27c9},
+{0x27c9, 0x27c8},
+{0x27d5, 0x27d6},
+{0x27d6, 0x27d5},
+{0x27dd, 0x27de},
+{0x27de, 0x27dd},
+{0x27e2, 0x27e3},
+{0x27e3, 0x27e2},
+{0x27e4, 0x27e5},
+{0x27e5, 0x27e4},
+{0x27e6, 0x27e7},
+{0x27e7, 0x27e6},
+{0x27e8, 0x27e9},
+{0x27e9, 0x27e8},
+{0x27ea, 0x27eb},
+{0x27eb, 0x27ea},
+{0x27ec, 0x27ed},
+{0x27ed, 0x27ec},
+{0x27ee, 0x27ef},
+{0x27ef, 0x27ee},
+{0x2983, 0x2984},
+{0x2984, 0x2983},
+{0x2985, 0x2986},
+{0x2986, 0x2985},
+{0x2987, 0x2988},
+{0x2988, 0x2987},
+{0x2989, 0x298a},
+{0x298a, 0x2989},
+{0x298b, 0x298c},
+{0x298c, 0x298b},
+{0x298d, 0x2990},
+{0x298e, 0x298f},
+{0x298f, 0x298e},
+{0x2990, 0x298d},
+{0x2991, 0x2992},
+{0x2992, 0x2991},
+{0x2993, 0x2994},
+{0x2994, 0x2993},
+{0x2995, 0x2996},
+{0x2996, 0x2995},
+{0x2997, 0x2998},
+{0x2998, 0x2997},
+{0x29b8, 0x2298},
+{0x29c0, 0x29c1},
+{0x29c1, 0x29c0},
+{0x29c4, 0x29c5},
+{0x29c5, 0x29c4},
+{0x29cf, 0x29d0},
+{0x29d0, 0x29cf},
+{0x29d1, 0x29d2},
+{0x29d2, 0x29d1},
+{0x29d4, 0x29d5},
+{0x29d5, 0x29d4},
+{0x29d8, 0x29d9},
+{0x29d9, 0x29d8},
+{0x29da, 0x29db},
+{0x29db, 0x29da},
+{0x29f5, 0x2215},
+{0x29f8, 0x29f9},
+{0x29f9, 0x29f8},
+{0x29fc, 0x29fd},
+{0x29fd, 0x29fc},
+{0x2a2b, 0x2a2c},
+{0x2a2c, 0x2a2b},
+{0x2a2d, 0x2a2e},
+{0x2a2e, 0x2a2d},
+{0x2a34, 0x2a35},
+{0x2a35, 0x2a34},
+{0x2a3c, 0x2a3d},
+{0x2a3d, 0x2a3c},
+{0x2a64, 0x2a65},
+{0x2a65, 0x2a64},
+{0x2a79, 0x2a7a},
+{0x2a7a, 0x2a79},
+{0x2a7d, 0x2a7e},
+{0x2a7e, 0x2a7d},
+{0x2a7f, 0x2a80},
+{0x2a80, 0x2a7f},
+{0x2a81, 0x2a82},
+{0x2a82, 0x2a81},
+{0x2a83, 0x2a84},
+{0x2a84, 0x2a83},
+{0x2a8b, 0x2a8c},
+{0x2a8c, 0x2a8b},
+{0x2a91, 0x2a92},
+{0x2a92, 0x2a91},
+{0x2a93, 0x2a94},
+{0x2a94, 0x2a93},
+{0x2a95, 0x2a96},
+{0x2a96, 0x2a95},
+{0x2a97, 0x2a98},
+{0x2a98, 0x2a97},
+{0x2a99, 0x2a9a},
+{0x2a9a, 0x2a99},
+{0x2a9b, 0x2a9c},
+{0x2a9c, 0x2a9b},
+{0x2aa1, 0x2aa2},
+{0x2aa2, 0x2aa1},
+{0x2aa6, 0x2aa7},
+{0x2aa7, 0x2aa6},
+{0x2aa8, 0x2aa9},
+{0x2aa9, 0x2aa8},
+{0x2aaa, 0x2aab},
+{0x2aab, 0x2aaa},
+{0x2aac, 0x2aad},
+{0x2aad, 0x2aac},
+{0x2aaf, 0x2ab0},
+{0x2ab0, 0x2aaf},
+{0x2ab3, 0x2ab4},
+{0x2ab4, 0x2ab3},
+{0x2abb, 0x2abc},
+{0x2abc, 0x2abb},
+{0x2abd, 0x2abe},
+{0x2abe, 0x2abd},
+{0x2abf, 0x2ac0},
+{0x2ac0, 0x2abf},
+{0x2ac1, 0x2ac2},
+{0x2ac2, 0x2ac1},
+{0x2ac3, 0x2ac4},
+{0x2ac4, 0x2ac3},
+{0x2ac5, 0x2ac6},
+{0x2ac6, 0x2ac5},
+{0x2acd, 0x2ace},
+{0x2ace, 0x2acd},
+{0x2acf, 0x2ad0},
+{0x2ad0, 0x2acf},
+{0x2ad1, 0x2ad2},
+{0x2ad2, 0x2ad1},
+{0x2ad3, 0x2ad4},
+{0x2ad4, 0x2ad3},
+{0x2ad5, 0x2ad6},
+{0x2ad6, 0x2ad5},
+{0x2ade, 0x22a6},
+{0x2ae3, 0x22a9},
+{0x2ae4, 0x22a8},
+{0x2ae5, 0x22ab},
+{0x2aec, 0x2aed},
+{0x2aed, 0x2aec},
+{0x2af7, 0x2af8},
+{0x2af8, 0x2af7},
+{0x2af9, 0x2afa},
+{0x2afa, 0x2af9},
+{0x2e02, 0x2e03},
+{0x2e03, 0x2e02},
+{0x2e04, 0x2e05},
+{0x2e05, 0x2e04},
+{0x2e09, 0x2e0a},
+{0x2e0a, 0x2e09},
+{0x2e0c, 0x2e0d},
+{0x2e0d, 0x2e0c},
+{0x2e1c, 0x2e1d},
+{0x2e1d, 0x2e1c},
+{0x2e20, 0x2e21},
+{0x2e21, 0x2e20},
+{0x2e22, 0x2e23},
+{0x2e23, 0x2e22},
+{0x2e24, 0x2e25},
+{0x2e25, 0x2e24},
+{0x2e26, 0x2e27},
+{0x2e27, 0x2e26},
+{0x2e28, 0x2e29},
+{0x2e29, 0x2e28},
+{0x3008, 0x3009},
+{0x3009, 0x3008},
+{0x300a, 0x300b},
+{0x300b, 0x300a},
+{0x300c, 0x300d},
+{0x300d, 0x300c},
+{0x300e, 0x300f},
+{0x300f, 0x300e},
+{0x3010, 0x3011},
+{0x3011, 0x3010},
+{0x3014, 0x3015},
+{0x3015, 0x3014},
+{0x3016, 0x3017},
+{0x3017, 0x3016},
+{0x3018, 0x3019},
+{0x3019, 0x3018},
+{0x301a, 0x301b},
+{0x301b, 0x301a},
+{0xfe59, 0xfe5a},
+{0xfe5a, 0xfe59},
+{0xfe5b, 0xfe5c},
+{0xfe5c, 0xfe5b},
+{0xfe5d, 0xfe5e},
+{0xfe5e, 0xfe5d},
+{0xfe64, 0xfe65},
+{0xfe65, 0xfe64},
+{0xff08, 0xff09},
+{0xff09, 0xff08},
+{0xff1c, 0xff1e},
+{0xff1e, 0xff1c},
+{0xff3b, 0xff3d},
+{0xff3d, 0xff3b},
+{0xff5b, 0xff5d},
+{0xff5d, 0xff5b},
+{0xff5f, 0xff60},
+{0xff60, 0xff5f},
+{0xff62, 0xff63},
+{0xff63, 0xff62},
+{0, 0},
+};
+struct grub_unicode_arabic_shape grub_unicode_arabic_shapes[] = {
+ {0x6ad, 0xfbd3, 0xfbd4, 0xfbd6, 0xfbd5},
+ {0x67f, 0xfb62, 0xfb63, 0xfb65, 0xfb64},
+ {0x6c0, 0xfba4, 0xfba5, 0x0, 0x0},
+ {0x642, 0xfed5, 0xfed6, 0xfed8, 0xfed7},
+ {0x630, 0xfeab, 0xfeac, 0x0, 0x0},
+ {0x635, 0xfeb9, 0xfeba, 0xfebc, 0xfebb},
+ {0x637, 0xfec1, 0xfec2, 0xfec4, 0xfec3},
+ {0x62d, 0xfea1, 0xfea2, 0xfea4, 0xfea3},
+ {0x644, 0xfedd, 0xfede, 0xfee0, 0xfedf},
+ {0x6a9, 0xfb8e, 0xfb8f, 0xfb91, 0xfb90},
+ {0x6c1, 0xfba6, 0xfba7, 0xfba9, 0xfba8},
+ {0x68d, 0xfb82, 0xfb83, 0x0, 0x0},
+ {0x680, 0xfb5a, 0xfb5b, 0xfb5d, 0xfb5c},
+ {0x64a, 0xfef1, 0xfef2, 0xfef4, 0xfef3},
+ {0x643, 0xfed9, 0xfeda, 0xfedc, 0xfedb},
+ {0x638, 0xfec5, 0xfec6, 0xfec8, 0xfec7},
+ {0x6c6, 0xfbd9, 0xfbda, 0x0, 0x0},
+ {0x6d2, 0xfbae, 0xfbaf, 0x0, 0x0},
+ {0x67e, 0xfb56, 0xfb57, 0xfb59, 0xfb58},
+ {0x627, 0xfe8d, 0xfe8e, 0x0, 0x0},
+ {0x622, 0xfe81, 0xfe82, 0x0, 0x0},
+ {0x628, 0xfe8f, 0xfe90, 0xfe92, 0xfe91},
+ {0x688, 0xfb88, 0xfb89, 0x0, 0x0},
+ {0x687, 0xfb7e, 0xfb7f, 0xfb81, 0xfb80},
+ {0x6b1, 0xfb9a, 0xfb9b, 0xfb9d, 0xfb9c},
+ {0x645, 0xfee1, 0xfee2, 0xfee4, 0xfee3},
+ {0x62c, 0xfe9d, 0xfe9e, 0xfea0, 0xfe9f},
+ {0x6c5, 0xfbe0, 0xfbe1, 0x0, 0x0},
+ {0x671, 0xfb50, 0xfb51, 0x0, 0x0},
+ {0x634, 0xfeb5, 0xfeb6, 0xfeb8, 0xfeb7},
+ {0x625, 0xfe87, 0xfe88, 0x0, 0x0},
+ {0x67b, 0xfb52, 0xfb53, 0xfb55, 0xfb54},
+ {0x646, 0xfee5, 0xfee6, 0xfee8, 0xfee7},
+ {0x68c, 0xfb84, 0xfb85, 0x0, 0x0},
+ {0x62b, 0xfe99, 0xfe9a, 0xfe9c, 0xfe9b},
+ {0x631, 0xfead, 0xfeae, 0x0, 0x0},
+ {0x6b3, 0xfb96, 0xfb97, 0xfb99, 0xfb98},
+ {0x683, 0xfb76, 0xfb77, 0xfb79, 0xfb78},
+ {0x62a, 0xfe95, 0xfe96, 0xfe98, 0xfe97},
+ {0x63a, 0xfecd, 0xfece, 0xfed0, 0xfecf},
+ {0x624, 0xfe85, 0xfe86, 0x0, 0x0},
+ {0x679, 0xfb66, 0xfb67, 0xfb69, 0xfb68},
+ {0x68e, 0xfb86, 0xfb87, 0x0, 0x0},
+ {0x623, 0xfe83, 0xfe84, 0x0, 0x0},
+ {0x6c9, 0xfbe2, 0xfbe3, 0x0, 0x0},
+ {0x641, 0xfed1, 0xfed2, 0xfed4, 0xfed3},
+ {0x648, 0xfeed, 0xfeee, 0x0, 0x0},
+ {0x698, 0xfb8a, 0xfb8b, 0x0, 0x0},
+ {0x647, 0xfee9, 0xfeea, 0xfeec, 0xfeeb},
+ {0x6a4, 0xfb6a, 0xfb6b, 0xfb6d, 0xfb6c},
+ {0x62e, 0xfea5, 0xfea6, 0xfea8, 0xfea7},
+ {0x6bb, 0xfba0, 0xfba1, 0xfba3, 0xfba2},
+ {0x686, 0xfb7a, 0xfb7b, 0xfb7d, 0xfb7c},
+ {0x6cc, 0xfbfc, 0xfbfd, 0xfbff, 0xfbfe},
+ {0x6a6, 0xfb6e, 0xfb6f, 0xfb71, 0xfb70},
+ {0x639, 0xfec9, 0xfeca, 0xfecc, 0xfecb},
+ {0x633, 0xfeb1, 0xfeb2, 0xfeb4, 0xfeb3},
+ {0x6c8, 0xfbdb, 0xfbdc, 0x0, 0x0},
+ {0x636, 0xfebd, 0xfebe, 0xfec0, 0xfebf},
+ {0x6be, 0xfbaa, 0xfbab, 0xfbad, 0xfbac},
+ {0x62f, 0xfea9, 0xfeaa, 0x0, 0x0},
+ {0x6af, 0xfb92, 0xfb93, 0xfb95, 0xfb94},
+ {0x6d0, 0xfbe4, 0xfbe5, 0xfbe7, 0xfbe6},
+ {0x6cb, 0xfbde, 0xfbdf, 0x0, 0x0},
+ {0x626, 0xfe89, 0xfe8a, 0xfe8c, 0xfe8b},
+ {0x6c7, 0xfbd7, 0xfbd8, 0x0, 0x0},
+ {0x684, 0xfb72, 0xfb73, 0xfb75, 0xfb74},
+ {0x6d3, 0xfbb0, 0xfbb1, 0x0, 0x0},
+ {0x67a, 0xfb5e, 0xfb5f, 0xfb61, 0xfb60},
+ {0x632, 0xfeaf, 0xfeb0, 0x0, 0x0},
+ {0x691, 0xfb8c, 0xfb8d, 0x0, 0x0},
+ {0x629, 0xfe93, 0xfe94, 0x0, 0x0},
+ {0, 0, 0, 0, 0},
+};
diff --git a/grub-core/video/bitmap.c b/grub-core/video/bitmap.c
new file mode 100644
index 0000000..32e9358
--- /dev/null
+++ b/grub-core/video/bitmap.c
@@ -0,0 +1,255 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/video.h>
+#include <grub/bitmap.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* List of bitmap readers registered to system. */
+static grub_video_bitmap_reader_t bitmap_readers_list;
+
+/* Register bitmap reader. */
+void
+grub_video_bitmap_reader_register (grub_video_bitmap_reader_t reader)
+{
+ reader->next = bitmap_readers_list;
+ bitmap_readers_list = reader;
+}
+
+/* Unregister bitmap reader. */
+void
+grub_video_bitmap_reader_unregister (grub_video_bitmap_reader_t reader)
+{
+ grub_video_bitmap_reader_t *p, q;
+
+ for (p = &bitmap_readers_list, q = *p; q; p = &(q->next), q = q->next)
+ if (q == reader)
+ {
+ *p = q->next;
+ break;
+ }
+}
+
+/* Creates new bitmap, saves created bitmap on success to *bitmap. */
+grub_err_t
+grub_video_bitmap_create (struct grub_video_bitmap **bitmap,
+ unsigned int width, unsigned int height,
+ enum grub_video_blit_format blit_format)
+{
+ struct grub_video_mode_info *mode_info;
+ unsigned int size;
+
+ if (!bitmap)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
+
+ *bitmap = 0;
+
+ if (width == 0 || height == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
+
+ *bitmap = (struct grub_video_bitmap *)grub_malloc (sizeof (struct grub_video_bitmap));
+ if (! *bitmap)
+ return grub_errno;
+
+ mode_info = &((*bitmap)->mode_info);
+
+ /* Populate mode_info. */
+ mode_info->width = width;
+ mode_info->height = height;
+ mode_info->blit_format = blit_format;
+
+ switch (blit_format)
+ {
+ case GRUB_VIDEO_BLIT_FORMAT_RGBA_8888:
+ mode_info->mode_type = GRUB_VIDEO_MODE_TYPE_RGB
+ | GRUB_VIDEO_MODE_TYPE_ALPHA;
+ mode_info->bpp = 32;
+ mode_info->bytes_per_pixel = 4;
+ mode_info->number_of_colors = 256;
+ mode_info->red_mask_size = 8;
+ mode_info->red_field_pos = 0;
+ mode_info->green_mask_size = 8;
+ mode_info->green_field_pos = 8;
+ mode_info->blue_mask_size = 8;
+ mode_info->blue_field_pos = 16;
+ mode_info->reserved_mask_size = 8;
+ mode_info->reserved_field_pos = 24;
+ break;
+
+ case GRUB_VIDEO_BLIT_FORMAT_RGB_888:
+ mode_info->mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
+ mode_info->bpp = 24;
+ mode_info->bytes_per_pixel = 3;
+ mode_info->number_of_colors = 256;
+ mode_info->red_mask_size = 8;
+ mode_info->red_field_pos = 0;
+ mode_info->green_mask_size = 8;
+ mode_info->green_field_pos = 8;
+ mode_info->blue_mask_size = 8;
+ mode_info->blue_field_pos = 16;
+ mode_info->reserved_mask_size = 0;
+ mode_info->reserved_field_pos = 0;
+ break;
+
+ case GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR:
+ mode_info->mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+ mode_info->bpp = 8;
+ mode_info->bytes_per_pixel = 1;
+ mode_info->number_of_colors = 256;
+ mode_info->red_mask_size = 0;
+ mode_info->red_field_pos = 0;
+ mode_info->green_mask_size = 0;
+ mode_info->green_field_pos = 0;
+ mode_info->blue_mask_size = 0;
+ mode_info->blue_field_pos = 0;
+ mode_info->reserved_mask_size = 0;
+ mode_info->reserved_field_pos = 0;
+ break;
+
+ default:
+ grub_free (*bitmap);
+ *bitmap = 0;
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "unsupported bitmap format");
+ }
+
+ mode_info->pitch = width * mode_info->bytes_per_pixel;
+
+ /* Calculate size needed for the data. */
+ size = (width * mode_info->bytes_per_pixel) * height;
+
+ (*bitmap)->data = grub_zalloc (size);
+ if (! (*bitmap)->data)
+ {
+ grub_free (*bitmap);
+ *bitmap = 0;
+
+ return grub_errno;
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+/* Frees all resources allocated by bitmap. */
+grub_err_t
+grub_video_bitmap_destroy (struct grub_video_bitmap *bitmap)
+{
+ if (! bitmap)
+ return GRUB_ERR_NONE;
+
+ grub_free (bitmap->data);
+ grub_free (bitmap);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Match extension to filename. */
+static int
+match_extension (const char *filename, const char *ext)
+{
+ int pos;
+ int ext_len;
+
+ pos = grub_strlen (filename);
+ ext_len = grub_strlen (ext);
+
+ if (! pos || ! ext_len || ext_len > pos)
+ return 0;
+
+ pos -= ext_len;
+
+ return grub_strcasecmp (filename + pos, ext) == 0;
+}
+
+/* Loads bitmap using registered bitmap readers. */
+grub_err_t
+grub_video_bitmap_load (struct grub_video_bitmap **bitmap,
+ const char *filename)
+{
+ grub_video_bitmap_reader_t reader = bitmap_readers_list;
+
+ if (!bitmap)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
+
+ *bitmap = 0;
+
+ while (reader)
+ {
+ if (match_extension (filename, reader->extension))
+ return reader->reader (bitmap, filename);
+
+ reader = reader->next;
+ }
+
+ return grub_error(GRUB_ERR_BAD_FILE_TYPE, "unsupported bitmap format");
+}
+
+/* Return bitmap width. */
+unsigned int
+grub_video_bitmap_get_width (struct grub_video_bitmap *bitmap)
+{
+ if (!bitmap)
+ return 0;
+
+ return bitmap->mode_info.width;
+}
+
+/* Return bitmap height. */
+unsigned int
+grub_video_bitmap_get_height (struct grub_video_bitmap *bitmap)
+{
+ if (!bitmap)
+ return 0;
+
+ return bitmap->mode_info.height;
+}
+
+/* Return mode info for bitmap. */
+void grub_video_bitmap_get_mode_info (struct grub_video_bitmap *bitmap,
+ struct grub_video_mode_info *mode_info)
+{
+ if (!bitmap)
+ return;
+
+ *mode_info = bitmap->mode_info;
+}
+
+/* Return pointer to bitmap's raw data. */
+void *grub_video_bitmap_get_data (struct grub_video_bitmap *bitmap)
+{
+ if (!bitmap)
+ return 0;
+
+ return bitmap->data;
+}
+
+/* Initialize bitmap module. */
+GRUB_MOD_INIT(bitmap)
+{
+}
+
+/* Finalize bitmap module. */
+GRUB_MOD_FINI(bitmap)
+{
+}
diff --git a/grub-core/video/bitmap_scale.c b/grub-core/video/bitmap_scale.c
new file mode 100644
index 0000000..8da5697
--- /dev/null
+++ b/grub-core/video/bitmap_scale.c
@@ -0,0 +1,311 @@
+/* bitmap_scale.c - Bitmap scaling. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/video.h>
+#include <grub/bitmap.h>
+#include <grub/bitmap_scale.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Prototypes for module-local functions. */
+static grub_err_t scale_nn (struct grub_video_bitmap *dst,
+ struct grub_video_bitmap *src);
+static grub_err_t scale_bilinear (struct grub_video_bitmap *dst,
+ struct grub_video_bitmap *src);
+
+/* This function creates a new scaled version of the bitmap SRC. The new
+ bitmap has dimensions DST_WIDTH by DST_HEIGHT. The scaling algorithm
+ is given by SCALE_METHOD. If an error is encountered, the return code is
+ not equal to GRUB_ERR_NONE, and the bitmap DST is either not created, or
+ it is destroyed before this function returns.
+
+ Supports only direct color modes which have components separated
+ into bytes (e.g., RGBA 8:8:8:8 or BGR 8:8:8 true color).
+ But because of this simplifying assumption, the implementation is
+ greatly simplified. */
+grub_err_t
+grub_video_bitmap_create_scaled (struct grub_video_bitmap **dst,
+ int dst_width, int dst_height,
+ struct grub_video_bitmap *src,
+ enum grub_video_bitmap_scale_method
+ scale_method)
+{
+ *dst = 0;
+
+ /* Verify the simplifying assumptions. */
+ if (src == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "null src bitmap in grub_video_bitmap_create_scaled");
+ if (src->mode_info.red_field_pos % 8 != 0
+ || src->mode_info.green_field_pos % 8 != 0
+ || src->mode_info.blue_field_pos % 8 != 0
+ || src->mode_info.reserved_field_pos % 8 != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "src format not supported for scale");
+ if (src->mode_info.width == 0 || src->mode_info.height == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "source bitmap has a zero dimension");
+ if (dst_width <= 0 || dst_height <= 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "requested to scale to a size w/ a zero dimension");
+ if (src->mode_info.bytes_per_pixel * 8 != src->mode_info.bpp)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "bitmap to scale has inconsistent Bpp and bpp");
+
+ /* Create the new bitmap. */
+ grub_err_t ret;
+ ret = grub_video_bitmap_create (dst, dst_width, dst_height,
+ src->mode_info.blit_format);
+ if (ret != GRUB_ERR_NONE)
+ return ret; /* Error. */
+
+ switch (scale_method)
+ {
+ case GRUB_VIDEO_BITMAP_SCALE_METHOD_FASTEST:
+ case GRUB_VIDEO_BITMAP_SCALE_METHOD_NEAREST:
+ ret = scale_nn (*dst, src);
+ break;
+ case GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST:
+ case GRUB_VIDEO_BITMAP_SCALE_METHOD_BILINEAR:
+ ret = scale_bilinear (*dst, src);
+ break;
+ default:
+ ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid scale_method value");
+ break;
+ }
+
+ if (ret == GRUB_ERR_NONE)
+ {
+ /* Success: *dst is now a pointer to the scaled bitmap. */
+ return GRUB_ERR_NONE;
+ }
+ else
+ {
+ /* Destroy the bitmap and return the error code. */
+ grub_video_bitmap_destroy (*dst);
+ *dst = 0;
+ return ret;
+ }
+}
+
+/* Nearest neighbor bitmap scaling algorithm.
+
+ Copy the bitmap SRC to the bitmap DST, scaling the bitmap to fit the
+ dimensions of DST. This function uses the nearest neighbor algorithm to
+ interpolate the pixels.
+
+ Supports only direct color modes which have components separated
+ into bytes (e.g., RGBA 8:8:8:8 or BGR 8:8:8 true color).
+ But because of this simplifying assumption, the implementation is
+ greatly simplified. */
+static grub_err_t
+scale_nn (struct grub_video_bitmap *dst, struct grub_video_bitmap *src)
+{
+ /* Verify the simplifying assumptions. */
+ if (dst == 0 || src == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "null bitmap in scale_nn");
+ if (dst->mode_info.red_field_pos % 8 != 0
+ || dst->mode_info.green_field_pos % 8 != 0
+ || dst->mode_info.blue_field_pos % 8 != 0
+ || dst->mode_info.reserved_field_pos % 8 != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "dst format not supported");
+ if (src->mode_info.red_field_pos % 8 != 0
+ || src->mode_info.green_field_pos % 8 != 0
+ || src->mode_info.blue_field_pos % 8 != 0
+ || src->mode_info.reserved_field_pos % 8 != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "src format not supported");
+ if (dst->mode_info.red_field_pos != src->mode_info.red_field_pos
+ || dst->mode_info.red_mask_size != src->mode_info.red_mask_size
+ || dst->mode_info.green_field_pos != src->mode_info.green_field_pos
+ || dst->mode_info.green_mask_size != src->mode_info.green_mask_size
+ || dst->mode_info.blue_field_pos != src->mode_info.blue_field_pos
+ || dst->mode_info.blue_mask_size != src->mode_info.blue_mask_size
+ || dst->mode_info.reserved_field_pos !=
+ src->mode_info.reserved_field_pos
+ || dst->mode_info.reserved_mask_size !=
+ src->mode_info.reserved_mask_size)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "dst and src not compatible");
+ if (dst->mode_info.bytes_per_pixel != src->mode_info.bytes_per_pixel)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "dst and src not compatible");
+ if (dst->mode_info.width == 0 || dst->mode_info.height == 0
+ || src->mode_info.width == 0 || src->mode_info.height == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bitmap has a zero dimension");
+
+ grub_uint8_t *ddata = dst->data;
+ grub_uint8_t *sdata = src->data;
+ int dw = dst->mode_info.width;
+ int dh = dst->mode_info.height;
+ int sw = src->mode_info.width;
+ int sh = src->mode_info.height;
+ int dstride = dst->mode_info.pitch;
+ int sstride = src->mode_info.pitch;
+ /* bytes_per_pixel is the same for both src and dst. */
+ int bytes_per_pixel = dst->mode_info.bytes_per_pixel;
+
+ int dy;
+ for (dy = 0; dy < dh; dy++)
+ {
+ int dx;
+ for (dx = 0; dx < dw; dx++)
+ {
+ grub_uint8_t *dptr;
+ grub_uint8_t *sptr;
+ int sx;
+ int sy;
+ int comp;
+
+ /* Compute the source coordinate that the destination coordinate
+ maps to. Note: sx/sw = dx/dw => sx = sw*dx/dw. */
+ sx = sw * dx / dw;
+ sy = sh * dy / dh;
+
+ /* Get the address of the pixels in src and dst. */
+ dptr = ddata + dy * dstride + dx * bytes_per_pixel;
+ sptr = sdata + sy * sstride + sx * bytes_per_pixel;
+
+ /* Copy the pixel color value. */
+ for (comp = 0; comp < bytes_per_pixel; comp++)
+ dptr[comp] = sptr[comp];
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+/* Bilinear interpolation image scaling algorithm.
+
+ Copy the bitmap SRC to the bitmap DST, scaling the bitmap to fit the
+ dimensions of DST. This function uses the bilinear interpolation algorithm
+ to interpolate the pixels.
+
+ Supports only direct color modes which have components separated
+ into bytes (e.g., RGBA 8:8:8:8 or BGR 8:8:8 true color).
+ But because of this simplifying assumption, the implementation is
+ greatly simplified. */
+static grub_err_t
+scale_bilinear (struct grub_video_bitmap *dst, struct grub_video_bitmap *src)
+{
+ /* Verify the simplifying assumptions. */
+ if (dst == 0 || src == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "null bitmap in scale func");
+ if (dst->mode_info.red_field_pos % 8 != 0
+ || dst->mode_info.green_field_pos % 8 != 0
+ || dst->mode_info.blue_field_pos % 8 != 0
+ || dst->mode_info.reserved_field_pos % 8 != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "dst format not supported");
+ if (src->mode_info.red_field_pos % 8 != 0
+ || src->mode_info.green_field_pos % 8 != 0
+ || src->mode_info.blue_field_pos % 8 != 0
+ || src->mode_info.reserved_field_pos % 8 != 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "src format not supported");
+ if (dst->mode_info.red_field_pos != src->mode_info.red_field_pos
+ || dst->mode_info.red_mask_size != src->mode_info.red_mask_size
+ || dst->mode_info.green_field_pos != src->mode_info.green_field_pos
+ || dst->mode_info.green_mask_size != src->mode_info.green_mask_size
+ || dst->mode_info.blue_field_pos != src->mode_info.blue_field_pos
+ || dst->mode_info.blue_mask_size != src->mode_info.blue_mask_size
+ || dst->mode_info.reserved_field_pos !=
+ src->mode_info.reserved_field_pos
+ || dst->mode_info.reserved_mask_size !=
+ src->mode_info.reserved_mask_size)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "dst and src not compatible");
+ if (dst->mode_info.bytes_per_pixel != src->mode_info.bytes_per_pixel)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "dst and src not compatible");
+ if (dst->mode_info.width == 0 || dst->mode_info.height == 0
+ || src->mode_info.width == 0 || src->mode_info.height == 0)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "bitmap has a zero dimension");
+
+ grub_uint8_t *ddata = dst->data;
+ grub_uint8_t *sdata = src->data;
+ int dw = dst->mode_info.width;
+ int dh = dst->mode_info.height;
+ int sw = src->mode_info.width;
+ int sh = src->mode_info.height;
+ int dstride = dst->mode_info.pitch;
+ int sstride = src->mode_info.pitch;
+ /* bytes_per_pixel is the same for both src and dst. */
+ int bytes_per_pixel = dst->mode_info.bytes_per_pixel;
+
+ int dy;
+ for (dy = 0; dy < dh; dy++)
+ {
+ int dx;
+ for (dx = 0; dx < dw; dx++)
+ {
+ grub_uint8_t *dptr;
+ grub_uint8_t *sptr;
+ int sx;
+ int sy;
+ int comp;
+
+ /* Compute the source coordinate that the destination coordinate
+ maps to. Note: sx/sw = dx/dw => sx = sw*dx/dw. */
+ sx = sw * dx / dw;
+ sy = sh * dy / dh;
+
+ /* Get the address of the pixels in src and dst. */
+ dptr = ddata + dy * dstride + dx * bytes_per_pixel;
+ sptr = sdata + sy * sstride + sx * bytes_per_pixel;
+
+ /* If we have enough space to do so, use bilinear interpolation.
+ Otherwise, fall back to nearest neighbor for this pixel. */
+ if (sx < sw - 1 && sy < sh - 1)
+ {
+ /* Do bilinear interpolation. */
+
+ /* Fixed-point .8 numbers representing the fraction of the
+ distance in the x (u) and y (v) direction within the
+ box of 4 pixels in the source. */
+ int u = (256 * sw * dx / dw) - (sx * 256);
+ int v = (256 * sh * dy / dh) - (sy * 256);
+
+ for (comp = 0; comp < bytes_per_pixel; comp++)
+ {
+ /* Get the component's values for the
+ four source corner pixels. */
+ grub_uint8_t f00 = sptr[comp];
+ grub_uint8_t f10 = sptr[comp + bytes_per_pixel];
+ grub_uint8_t f01 = sptr[comp + sstride];
+ grub_uint8_t f11 = sptr[comp + sstride + bytes_per_pixel];
+
+ /* Do linear interpolations along the top and bottom
+ rows of the box. */
+ grub_uint8_t f0y = (256 - v) * f00 / 256 + v * f01 / 256;
+ grub_uint8_t f1y = (256 - v) * f10 / 256 + v * f11 / 256;
+
+ /* Interpolate vertically. */
+ grub_uint8_t fxy = (256 - u) * f0y / 256 + u * f1y / 256;
+
+ dptr[comp] = fxy;
+ }
+ }
+ else
+ {
+ /* Fall back to nearest neighbor interpolation. */
+ /* Copy the pixel color value. */
+ for (comp = 0; comp < bytes_per_pixel; comp++)
+ dptr[comp] = sptr[comp];
+ }
+ }
+ }
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/video/bochs.c b/grub-core/video/bochs.c
new file mode 100644
index 0000000..79cae65
--- /dev/null
+++ b/grub-core/video/bochs.c
@@ -0,0 +1,426 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/pci.h>
+#include <grub/vga.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+
+ grub_uint8_t *ptr;
+ int mapped;
+ grub_uint32_t base;
+ grub_pci_device_t dev;
+} framebuffer;
+
+#define BOCHS_APERTURE_SIZE 0x800000
+#define BOCHS_MAX_WIDTH 1600
+#define BOCHS_MAX_HEIGHT 1200
+#define BOCHS_WIDTH_ALIGN 8
+
+enum
+ {
+ BOCHS_VBE_INDEX = 0x1ce,
+ BOCHS_VBE_DATA = 0x1cf,
+ };
+
+enum
+ {
+ BOCHS_VBE_WIDTH = 1,
+ BOCHS_VBE_HEIGHT = 2,
+ BOCHS_VBE_BPP = 3,
+ BOCHS_VBE_ENABLE = 4,
+ BOCHS_VBE_Y_OFFSET = 9,
+ BOCHS_VBE_MAX
+ };
+
+static void
+vbe_write (grub_uint16_t val, grub_uint16_t addr)
+{
+ grub_outw (addr, BOCHS_VBE_INDEX);
+ grub_outw (val, BOCHS_VBE_DATA);
+}
+
+static grub_uint16_t
+vbe_read (grub_uint16_t addr)
+{
+ grub_outw (addr, BOCHS_VBE_INDEX);
+ return grub_inw (BOCHS_VBE_DATA);
+}
+
+struct saved_state
+{
+ grub_uint8_t cr[256];
+ grub_uint8_t gr[256];
+ grub_uint8_t sr[256];
+ grub_uint8_t r[256];
+ grub_uint8_t g[256];
+ grub_uint8_t b[256];
+ grub_uint8_t vbe[BOCHS_VBE_MAX];
+ int vbe_enable;
+ /* We need to preserve VGA font and VGA text. */
+ grub_uint8_t vram[32 * 4 * 256];
+};
+
+static struct saved_state initial_state;
+static int state_saved = 0;
+
+static void
+save_state (struct saved_state *st)
+{
+ unsigned i;
+
+ for (i = 0; i < ARRAY_SIZE (st->cr); i++)
+ st->cr[i] = grub_vga_cr_read (i);
+ for (i = 0; i < ARRAY_SIZE (st->gr); i++)
+ st->gr[i] = grub_vga_gr_read (i);
+ for (i = 0; i < ARRAY_SIZE (st->sr); i++)
+ st->sr[i] = grub_vga_sr_read (i);
+
+ for (i = 0; i < 256; i++)
+ grub_vga_palette_read (i, st->r + i, st->g + i, st->b + i);
+
+ st->vbe_enable = vbe_read (BOCHS_VBE_ENABLE) & 1;
+ if (st->vbe_enable)
+ for (i = 0; i < ARRAY_SIZE (st->vbe); i++)
+ st->vbe[i] = vbe_read (i);
+
+ grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_CHAIN4, GRUB_VGA_SR_MEMORY_MODE);
+ grub_memcpy (st->vram, framebuffer.ptr, sizeof (st->vram));
+ grub_vga_sr_write (st->sr[GRUB_VGA_SR_MEMORY_MODE], GRUB_VGA_SR_MEMORY_MODE);
+}
+
+static void
+restore_state (struct saved_state *st)
+{
+ unsigned i;
+
+ if (st->vbe_enable)
+ for (i = 0; i < ARRAY_SIZE (st->vbe); i++)
+ vbe_write (st->vbe[i], i);
+ else
+ vbe_write (0, BOCHS_VBE_ENABLE);
+
+ grub_vga_cr_write (0, 0x11);
+ for (i = 0; i < ARRAY_SIZE (st->cr); i++)
+ grub_vga_cr_write (st->cr[i], i);
+ for (i = 0; i < ARRAY_SIZE (st->sr); i++)
+ grub_vga_sr_write (st->sr[i], i);
+ for (i = 0; i < ARRAY_SIZE (st->gr); i++)
+ grub_vga_gr_write (st->gr[i], i);
+
+ for (i = 0; i < 256; i++)
+ grub_vga_palette_write (i, st->r[i], st->g[i], st->b[i]);
+
+ grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_CHAIN4, GRUB_VGA_SR_MEMORY_MODE);
+ grub_memcpy (framebuffer.ptr, st->vram, sizeof (st->vram));
+ grub_vga_sr_write (st->sr[GRUB_VGA_SR_MEMORY_MODE], GRUB_VGA_SR_MEMORY_MODE);
+}
+
+static grub_err_t
+grub_video_bochs_video_init (void)
+{
+ /* Reset frame buffer. */
+ grub_memset (&framebuffer, 0, sizeof(framebuffer));
+
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_bochs_video_fini (void)
+{
+ if (framebuffer.mapped)
+ grub_pci_device_unmap_range (framebuffer.dev, framebuffer.ptr,
+ BOCHS_APERTURE_SIZE);
+
+ if (state_saved)
+ {
+ restore_state (&initial_state);
+ state_saved = 0;
+ }
+
+ return grub_video_fb_fini ();
+}
+
+static grub_err_t
+doublebuf_pageflipping_set_page (int page)
+{
+ int start = framebuffer.mode_info.height * page;
+
+ vbe_write (start, BOCHS_VBE_Y_OFFSET);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_bochs_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ if (framebuffer.mode_info.mode_type == GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)
+ {
+ unsigned i;
+ if (start >= 0x100)
+ return GRUB_ERR_NONE;
+ if (start + count >= 0x100)
+ count = 0x100 - start;
+
+ for (i = 0; i < count; i++)
+ grub_vga_palette_write (start + i, palette_data[i].r, palette_data[i].g,
+ palette_data[i].b);
+ }
+
+ /* Then set color to emulated palette. */
+ return grub_video_fb_set_palette (start, count, palette_data);
+}
+
+static grub_err_t
+grub_video_bochs_setup (unsigned int width, unsigned int height,
+ grub_video_mode_type_t mode_type,
+ grub_video_mode_type_t mode_mask)
+{
+ int depth;
+ grub_err_t err;
+ int found = 0;
+ int pitch, bytes_per_pixel;
+ grub_size_t page_size; /* The size of a page in bytes. */
+
+ auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__ ((unused)));
+ int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid)
+ {
+ grub_pci_address_t addr;
+ grub_uint32_t class;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class = grub_pci_read (addr);
+
+ if (((class >> 16) & 0xffff) != 0x0300 || pciid != 0x11111234)
+ return 0;
+
+ found = 1;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
+ framebuffer.base = grub_pci_read (addr) & GRUB_PCI_ADDR_MEM_MASK;
+ framebuffer.dev = dev;
+
+ return 1;
+ }
+
+ /* Decode depth from mode_type. If it is zero, then autodetect. */
+ depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ >> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
+
+ if (width == 0 || height == 0)
+ {
+ width = 800;
+ height = 600;
+ }
+
+ if (width > BOCHS_MAX_WIDTH)
+ return grub_error (GRUB_ERR_IO, "width must be at most",
+ BOCHS_MAX_WIDTH);
+
+ if (height > BOCHS_MAX_HEIGHT)
+ return grub_error (GRUB_ERR_IO, "height must be at most",
+ BOCHS_MAX_HEIGHT);
+
+ if (width & (BOCHS_WIDTH_ALIGN - 1))
+ return grub_error (GRUB_ERR_IO, "width must be a multiple of %d",
+ BOCHS_WIDTH_ALIGN);
+
+ if (depth == 0
+ && !grub_video_check_mode_flag (mode_type, mode_mask,
+ GRUB_VIDEO_MODE_TYPE_INDEX_COLOR, 0))
+ depth = 24;
+
+ if (depth == 0)
+ depth = 8;
+
+ if (depth != 32 && depth != 24 && depth != 16 && depth != 15 && depth != 8
+ && depth != 4)
+ return grub_error (GRUB_ERR_IO, "only 32, 24, 16, 15 and 8-bpp are"
+ " supported by bochs video");
+
+ if (depth == 4)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "4-bpp isn't cupported");
+
+ bytes_per_pixel = (depth + 7) / 8;
+ if (depth == 4)
+ pitch = width / 2;
+ else
+ pitch = width * bytes_per_pixel;
+
+ page_size = pitch * height;
+
+ if (page_size > BOCHS_APERTURE_SIZE)
+ return grub_error (GRUB_ERR_IO, "Not enough video memory for this mode");
+
+ grub_pci_iterate (find_card);
+ if (!found)
+ return grub_error (GRUB_ERR_IO, "Couldn't find graphics card");
+
+ if (found && framebuffer.base == 0)
+ {
+ /* FIXME: change framebuffer base */
+ return grub_error (GRUB_ERR_IO, "PCI BAR not set");
+ }
+
+ /* We can safely discard volatile attribute. */
+ framebuffer.ptr = (void *) grub_pci_device_map_range (framebuffer.dev,
+ framebuffer.base,
+ BOCHS_APERTURE_SIZE);
+ framebuffer.mapped = 1;
+
+ if (!state_saved)
+ {
+ save_state (&initial_state);
+ state_saved = 1;
+ }
+
+ {
+ vbe_write (0, BOCHS_VBE_ENABLE);
+
+ vbe_write (width, BOCHS_VBE_WIDTH);
+ vbe_write (height, BOCHS_VBE_HEIGHT);
+ vbe_write (depth, BOCHS_VBE_BPP);
+
+ vbe_write (1, BOCHS_VBE_ENABLE);
+ doublebuf_pageflipping_set_page (0);
+ }
+
+ /* Fill mode info details. */
+ framebuffer.mode_info.width = width;
+ framebuffer.mode_info.height = height;
+ framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
+ framebuffer.mode_info.bpp = depth;
+ framebuffer.mode_info.bytes_per_pixel = bytes_per_pixel;
+ framebuffer.mode_info.pitch = pitch;
+ framebuffer.mode_info.number_of_colors = 256;
+ framebuffer.mode_info.reserved_mask_size = 0;
+ framebuffer.mode_info.reserved_field_pos = 0;
+
+ switch (depth)
+ {
+ case 4:
+ case 8:
+ framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+ break;
+ case 16:
+ framebuffer.mode_info.red_mask_size = 5;
+ framebuffer.mode_info.red_field_pos = 11;
+ framebuffer.mode_info.green_mask_size = 6;
+ framebuffer.mode_info.green_field_pos = 5;
+ framebuffer.mode_info.blue_mask_size = 5;
+ framebuffer.mode_info.blue_field_pos = 0;
+ break;
+
+ case 15:
+ framebuffer.mode_info.red_mask_size = 5;
+ framebuffer.mode_info.red_field_pos = 10;
+ framebuffer.mode_info.green_mask_size = 5;
+ framebuffer.mode_info.green_field_pos = 5;
+ framebuffer.mode_info.blue_mask_size = 5;
+ framebuffer.mode_info.blue_field_pos = 0;
+ break;
+
+ case 32:
+ framebuffer.mode_info.reserved_mask_size = 8;
+ framebuffer.mode_info.reserved_field_pos = 24;
+
+ case 24:
+ framebuffer.mode_info.red_mask_size = 8;
+ framebuffer.mode_info.red_field_pos = 16;
+ framebuffer.mode_info.green_mask_size = 8;
+ framebuffer.mode_info.green_field_pos = 8;
+ framebuffer.mode_info.blue_mask_size = 8;
+ framebuffer.mode_info.blue_field_pos = 0;
+ break;
+ }
+
+ framebuffer.mode_info.blit_format = grub_video_get_blit_format (&framebuffer.mode_info);
+
+ if (BOCHS_APERTURE_SIZE >= 2 * page_size)
+ err = grub_video_fb_setup (mode_type, mode_mask,
+ &framebuffer.mode_info,
+ framebuffer.ptr,
+ doublebuf_pageflipping_set_page,
+ framebuffer.ptr + page_size);
+ else
+ err = grub_video_fb_setup (mode_type, mode_mask,
+ &framebuffer.mode_info,
+ framebuffer.ptr, 0, 0);
+
+
+ /* Copy default palette to initialize emulated palette. */
+ err = grub_video_bochs_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+ return err;
+}
+
+static struct grub_video_adapter grub_video_bochs_adapter =
+ {
+ .name = "Bochs PCI Video Driver",
+ .id = GRUB_VIDEO_DRIVER_BOCHS,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_NATIVE,
+
+ .init = grub_video_bochs_video_init,
+ .fini = grub_video_bochs_video_fini,
+ .setup = grub_video_bochs_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_fb_get_info_and_fini,
+ .set_palette = grub_video_bochs_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_fb_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_fb_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(video_bochs)
+{
+ grub_video_register (&grub_video_bochs_adapter);
+}
+
+GRUB_MOD_FINI(video_bochs)
+{
+ grub_video_unregister (&grub_video_bochs_adapter);
+}
diff --git a/grub-core/video/cirrus.c b/grub-core/video/cirrus.c
new file mode 100644
index 0000000..7fad50e
--- /dev/null
+++ b/grub-core/video/cirrus.c
@@ -0,0 +1,506 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/pci.h>
+#include <grub/vga.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+ grub_size_t page_size; /* The size of a page in bytes. */
+
+ grub_uint8_t *ptr;
+ int mapped;
+ grub_uint32_t base;
+ grub_pci_device_t dev;
+} framebuffer;
+
+#define CIRRUS_APERTURE_SIZE 0x1000000
+
+#define CIRRUS_MAX_WIDTH 0x800
+#define CIRRUS_MAX_HEIGHT 0x800
+#define CIRRUS_MAX_PITCH (0x1ff * GRUB_VGA_CR_PITCH_DIVISOR)
+
+enum
+ {
+ CIRRUS_CR_EXTENDED_DISPLAY = 0x1b,
+ CIRRUS_CR_EXTENDED_OVERLAY = 0x1d,
+ CIRRUS_CR_MAX
+ };
+
+#define CIRRUS_CR_EXTENDED_DISPLAY_PITCH_MASK 0x10
+#define CIRRUS_CR_EXTENDED_DISPLAY_PITCH_SHIFT 4
+#define CIRRUS_CR_EXTENDED_DISPLAY_START_MASK1 0x1
+#define CIRRUS_CR_EXTENDED_DISPLAY_START_SHIFT1 16
+#define CIRRUS_CR_EXTENDED_DISPLAY_START_MASK2 0xc
+#define CIRRUS_CR_EXTENDED_DISPLAY_START_SHIFT2 15
+
+#define CIRRUS_CR_EXTENDED_OVERLAY_DISPLAY_START_MASK 0x80
+#define CIRRUS_CR_EXTENDED_OVERLAY_DISPLAY_START_SHIFT 12
+
+enum
+ {
+ CIRRUS_SR_EXTENDED_MODE = 7,
+ CIRRUS_SR_MAX
+ };
+
+#define CIRRUS_SR_EXTENDED_MODE_LFB_ENABLE 0xf0
+#define CIRRUS_SR_EXTENDED_MODE_ENABLE_EXT 0x01
+#define CIRRUS_SR_EXTENDED_MODE_8BPP 0x00
+#define CIRRUS_SR_EXTENDED_MODE_16BPP 0x06
+#define CIRRUS_SR_EXTENDED_MODE_24BPP 0x04
+#define CIRRUS_SR_EXTENDED_MODE_32BPP 0x08
+
+#define CIRRUS_HIDDEN_DAC_ENABLE_EXT 0x80
+#define CIRRUS_HIDDEN_DAC_ENABLE_ALL 0x40
+#define CIRRUS_HIDDEN_DAC_8BPP 0
+#define CIRRUS_HIDDEN_DAC_15BPP (CIRRUS_HIDDEN_DAC_ENABLE_EXT \
+ | CIRRUS_HIDDEN_DAC_ENABLE_ALL | 0)
+#define CIRRUS_HIDDEN_DAC_16BPP (CIRRUS_HIDDEN_DAC_ENABLE_EXT \
+ | CIRRUS_HIDDEN_DAC_ENABLE_ALL | 1)
+#define CIRRUS_HIDDEN_DAC_888COLOR (CIRRUS_HIDDEN_DAC_ENABLE_EXT \
+ | CIRRUS_HIDDEN_DAC_ENABLE_ALL | 5)
+
+static void
+write_hidden_dac (grub_uint8_t data)
+{
+ grub_inb (GRUB_VGA_IO_PALLETTE_WRITE_INDEX);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ grub_outb (data, GRUB_VGA_IO_PIXEL_MASK);
+}
+
+static grub_uint8_t
+read_hidden_dac (void)
+{
+ grub_inb (GRUB_VGA_IO_PALLETTE_WRITE_INDEX);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+ return grub_inb (GRUB_VGA_IO_PIXEL_MASK);
+}
+
+struct saved_state
+{
+ grub_uint8_t cr[CIRRUS_CR_MAX];
+ grub_uint8_t gr[GRUB_VGA_GR_MAX];
+ grub_uint8_t sr[CIRRUS_SR_MAX];
+ grub_uint8_t hidden_dac;
+ /* We need to preserve VGA font and VGA text. */
+ grub_uint8_t vram[32 * 4 * 256];
+ grub_uint8_t r[256];
+ grub_uint8_t g[256];
+ grub_uint8_t b[256];
+};
+
+static struct saved_state initial_state;
+static int state_saved = 0;
+
+static void
+save_state (struct saved_state *st)
+{
+ unsigned i;
+ for (i = 0; i < ARRAY_SIZE (st->cr); i++)
+ st->cr[i] = grub_vga_cr_read (i);
+ for (i = 0; i < ARRAY_SIZE (st->sr); i++)
+ st->sr[i] = grub_vga_sr_read (i);
+ for (i = 0; i < ARRAY_SIZE (st->gr); i++)
+ st->gr[i] = grub_vga_gr_read (i);
+ for (i = 0; i < 256; i++)
+ grub_vga_palette_read (i, st->r + i, st->g + i, st->b + i);
+
+ st->hidden_dac = read_hidden_dac ();
+ grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_CHAIN4, GRUB_VGA_SR_MEMORY_MODE);
+ grub_memcpy (st->vram, framebuffer.ptr, sizeof (st->vram));
+}
+
+static void
+restore_state (struct saved_state *st)
+{
+ unsigned i;
+ grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_CHAIN4, GRUB_VGA_SR_MEMORY_MODE);
+ grub_memcpy (framebuffer.ptr, st->vram, sizeof (st->vram));
+ for (i = 0; i < ARRAY_SIZE (st->cr); i++)
+ grub_vga_cr_write (st->cr[i], i);
+ for (i = 0; i < ARRAY_SIZE (st->sr); i++)
+ grub_vga_sr_write (st->sr[i], i);
+ for (i = 0; i < ARRAY_SIZE (st->gr); i++)
+ grub_vga_gr_write (st->gr[i], i);
+ for (i = 0; i < 256; i++)
+ grub_vga_palette_write (i, st->r[i], st->g[i], st->b[i]);
+
+ write_hidden_dac (st->hidden_dac);
+}
+
+static grub_err_t
+grub_video_cirrus_video_init (void)
+{
+ /* Reset frame buffer. */
+ grub_memset (&framebuffer, 0, sizeof(framebuffer));
+
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_cirrus_video_fini (void)
+{
+ if (framebuffer.mapped)
+ grub_pci_device_unmap_range (framebuffer.dev, framebuffer.ptr,
+ CIRRUS_APERTURE_SIZE);
+
+ if (state_saved)
+ {
+ restore_state (&initial_state);
+ state_saved = 0;
+ }
+
+ return grub_video_fb_fini ();
+}
+
+static grub_err_t
+doublebuf_pageflipping_set_page (int page)
+{
+ int start = framebuffer.page_size * page / 4;
+ grub_uint8_t cr_ext, cr_overlay;
+
+ grub_vga_cr_write (start & 0xff, GRUB_VGA_CR_START_ADDR_LOW_REGISTER);
+ grub_vga_cr_write ((start & 0xff00) >> 8,
+ GRUB_VGA_CR_START_ADDR_HIGH_REGISTER);
+
+ cr_ext = grub_vga_cr_read (CIRRUS_CR_EXTENDED_DISPLAY);
+ cr_ext &= ~(CIRRUS_CR_EXTENDED_DISPLAY_START_MASK1
+ | CIRRUS_CR_EXTENDED_DISPLAY_START_MASK2);
+ cr_ext |= ((start >> CIRRUS_CR_EXTENDED_DISPLAY_START_SHIFT1)
+ & CIRRUS_CR_EXTENDED_DISPLAY_START_MASK1);
+ cr_ext |= ((start >> CIRRUS_CR_EXTENDED_DISPLAY_START_SHIFT2)
+ & CIRRUS_CR_EXTENDED_DISPLAY_START_MASK2);
+ grub_vga_cr_write (cr_ext, CIRRUS_CR_EXTENDED_DISPLAY);
+
+ cr_overlay = grub_vga_cr_read (CIRRUS_CR_EXTENDED_OVERLAY);
+ cr_overlay &= ~(CIRRUS_CR_EXTENDED_OVERLAY_DISPLAY_START_MASK);
+ cr_overlay |= ((start >> CIRRUS_CR_EXTENDED_OVERLAY_DISPLAY_START_SHIFT)
+ & CIRRUS_CR_EXTENDED_OVERLAY_DISPLAY_START_MASK);
+ grub_vga_cr_write (cr_overlay, CIRRUS_CR_EXTENDED_OVERLAY);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_cirrus_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ if (framebuffer.mode_info.mode_type == GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)
+ {
+ unsigned i;
+ if (start >= 0x100)
+ return GRUB_ERR_NONE;
+ if (start + count >= 0x100)
+ count = 0x100 - start;
+
+ for (i = 0; i < count; i++)
+ grub_vga_palette_write (start + i, palette_data[i].r, palette_data[i].g,
+ palette_data[i].b);
+ }
+
+ /* Then set color to emulated palette. */
+ return grub_video_fb_set_palette (start, count, palette_data);
+}
+
+static grub_err_t
+grub_video_cirrus_setup (unsigned int width, unsigned int height,
+ grub_video_mode_type_t mode_type,
+ grub_video_mode_type_t mode_mask)
+{
+ int depth;
+ grub_err_t err;
+ int found = 0;
+ int pitch, bytes_per_pixel;
+
+ auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__ ((unused)));
+ int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid)
+ {
+ grub_pci_address_t addr;
+ grub_uint32_t class;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class = grub_pci_read (addr);
+
+ if (((class >> 16) & 0xffff) != 0x0300 || pciid != 0x00b81013)
+ return 0;
+
+ found = 1;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
+ framebuffer.base = grub_pci_read (addr) & GRUB_PCI_ADDR_MEM_MASK;
+ framebuffer.dev = dev;
+
+ return 1;
+ }
+
+ /* Decode depth from mode_type. If it is zero, then autodetect. */
+ depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ >> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
+
+ if (width == 0 || height == 0)
+ {
+ width = 800;
+ height = 600;
+ }
+
+ if (width & (GRUB_VGA_CR_WIDTH_DIVISOR - 1))
+ return grub_error (GRUB_ERR_IO,
+ "screen width must be a multiple of %d",
+ GRUB_VGA_CR_WIDTH_DIVISOR);
+
+ if (width > CIRRUS_MAX_WIDTH)
+ return grub_error (GRUB_ERR_IO,
+ "screen width must be at most %d", CIRRUS_MAX_WIDTH);
+
+ if (height > CIRRUS_MAX_HEIGHT)
+ return grub_error (GRUB_ERR_IO,
+ "screen height must be at most %d", CIRRUS_MAX_HEIGHT);
+
+ if (depth == 0
+ && !grub_video_check_mode_flag (mode_type, mode_mask,
+ GRUB_VIDEO_MODE_TYPE_INDEX_COLOR, 0))
+ depth = 24;
+
+ if (depth == 0)
+ depth = 8;
+
+ if (depth != 32 && depth != 24 && depth != 16 && depth != 15 && depth != 8)
+ return grub_error (GRUB_ERR_IO, "only 32, 24, 16, 15 and 8-bit bpp are"
+ " supported by cirrus video");
+
+ bytes_per_pixel = (depth + 7) / 8;
+ pitch = width * bytes_per_pixel;
+
+ if (pitch > CIRRUS_MAX_PITCH)
+ return grub_error (GRUB_ERR_IO,
+ "screen width must be at most %d at bitdepth %d",
+ CIRRUS_MAX_PITCH / bytes_per_pixel, depth);
+
+ framebuffer.page_size = pitch * height;
+
+ if (framebuffer.page_size > CIRRUS_APERTURE_SIZE)
+ return grub_error (GRUB_ERR_IO, "Not enough video memory for this mode");
+
+ grub_pci_iterate (find_card);
+ if (!found)
+ return grub_error (GRUB_ERR_IO, "Couldn't find graphics card");
+
+ if (found && framebuffer.base == 0)
+ {
+ /* FIXME: change framebuffer base */
+ return grub_error (GRUB_ERR_IO, "PCI BAR not set");
+ }
+
+ /* We can safely discard volatile attribute. */
+ framebuffer.ptr = (void *) grub_pci_device_map_range (framebuffer.dev,
+ framebuffer.base,
+ CIRRUS_APERTURE_SIZE);
+ framebuffer.mapped = 1;
+
+ if (!state_saved)
+ {
+ save_state (&initial_state);
+ state_saved = 1;
+ }
+
+ {
+ struct grub_video_hw_config config = {
+ .pitch = pitch / GRUB_VGA_CR_PITCH_DIVISOR,
+ .line_compare = 0x3ff,
+ .vdisplay_end = height - 1,
+ .horizontal_end = width / GRUB_VGA_CR_WIDTH_DIVISOR
+ };
+ grub_uint8_t sr_ext = 0, hidden_dac = 0;
+
+ grub_vga_set_geometry (&config, grub_vga_cr_write);
+
+ grub_vga_gr_write (GRUB_VGA_GR_MODE_256_COLOR | GRUB_VGA_GR_MODE_READ_MODE1,
+ GRUB_VGA_GR_MODE);
+ grub_vga_gr_write (GRUB_VGA_GR_GR6_GRAPHICS_MODE, GRUB_VGA_GR_GR6);
+
+ grub_vga_sr_write (GRUB_VGA_SR_MEMORY_MODE_NORMAL, GRUB_VGA_SR_MEMORY_MODE);
+
+ grub_vga_cr_write ((config.pitch >> CIRRUS_CR_EXTENDED_DISPLAY_PITCH_SHIFT)
+ & CIRRUS_CR_EXTENDED_DISPLAY_PITCH_MASK,
+ CIRRUS_CR_EXTENDED_DISPLAY);
+
+ grub_vga_cr_write (GRUB_VGA_CR_MODE_TIMING_ENABLE
+ | GRUB_VGA_CR_MODE_BYTE_MODE
+ | GRUB_VGA_CR_MODE_NO_HERCULES | GRUB_VGA_CR_MODE_NO_CGA,
+ GRUB_VGA_CR_MODE);
+
+ doublebuf_pageflipping_set_page (0);
+
+ sr_ext = CIRRUS_SR_EXTENDED_MODE_LFB_ENABLE
+ | CIRRUS_SR_EXTENDED_MODE_ENABLE_EXT;
+ switch (depth)
+ {
+ /* FIXME: support 8-bit grayscale and 8-bit RGB. */
+ case 32:
+ hidden_dac = CIRRUS_HIDDEN_DAC_888COLOR;
+ sr_ext |= CIRRUS_SR_EXTENDED_MODE_32BPP;
+ break;
+ case 24:
+ hidden_dac = CIRRUS_HIDDEN_DAC_888COLOR;
+ sr_ext |= CIRRUS_SR_EXTENDED_MODE_24BPP;
+ break;
+ case 16:
+ hidden_dac = CIRRUS_HIDDEN_DAC_16BPP;
+ sr_ext |= CIRRUS_SR_EXTENDED_MODE_16BPP;
+ break;
+ case 15:
+ hidden_dac = CIRRUS_HIDDEN_DAC_15BPP;
+ sr_ext |= CIRRUS_SR_EXTENDED_MODE_16BPP;
+ break;
+ case 8:
+ hidden_dac = CIRRUS_HIDDEN_DAC_8BPP;
+ sr_ext |= CIRRUS_SR_EXTENDED_MODE_8BPP;
+ break;
+ }
+ grub_vga_sr_write (sr_ext, CIRRUS_SR_EXTENDED_MODE);
+ write_hidden_dac (hidden_dac);
+ }
+
+ /* Fill mode info details. */
+ framebuffer.mode_info.width = width;
+ framebuffer.mode_info.height = height;
+ framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
+ framebuffer.mode_info.bpp = depth;
+ framebuffer.mode_info.bytes_per_pixel = bytes_per_pixel;
+ framebuffer.mode_info.pitch = pitch;
+ framebuffer.mode_info.number_of_colors = 256;
+ framebuffer.mode_info.reserved_mask_size = 0;
+ framebuffer.mode_info.reserved_field_pos = 0;
+
+ switch (depth)
+ {
+ case 8:
+ framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+ break;
+ case 16:
+ framebuffer.mode_info.red_mask_size = 5;
+ framebuffer.mode_info.red_field_pos = 11;
+ framebuffer.mode_info.green_mask_size = 6;
+ framebuffer.mode_info.green_field_pos = 5;
+ framebuffer.mode_info.blue_mask_size = 5;
+ framebuffer.mode_info.blue_field_pos = 0;
+ break;
+
+ case 15:
+ framebuffer.mode_info.red_mask_size = 5;
+ framebuffer.mode_info.red_field_pos = 10;
+ framebuffer.mode_info.green_mask_size = 5;
+ framebuffer.mode_info.green_field_pos = 5;
+ framebuffer.mode_info.blue_mask_size = 5;
+ framebuffer.mode_info.blue_field_pos = 0;
+ break;
+
+ case 32:
+ framebuffer.mode_info.reserved_mask_size = 8;
+ framebuffer.mode_info.reserved_field_pos = 24;
+
+ case 24:
+ framebuffer.mode_info.red_mask_size = 8;
+ framebuffer.mode_info.red_field_pos = 16;
+ framebuffer.mode_info.green_mask_size = 8;
+ framebuffer.mode_info.green_field_pos = 8;
+ framebuffer.mode_info.blue_mask_size = 8;
+ framebuffer.mode_info.blue_field_pos = 0;
+ break;
+ }
+
+ framebuffer.mode_info.blit_format = grub_video_get_blit_format (&framebuffer.mode_info);
+
+ if (CIRRUS_APERTURE_SIZE >= 2 * framebuffer.page_size)
+ err = grub_video_fb_setup (mode_type, mode_mask,
+ &framebuffer.mode_info,
+ framebuffer.ptr,
+ doublebuf_pageflipping_set_page,
+ framebuffer.ptr + framebuffer.page_size);
+ else
+ err = grub_video_fb_setup (mode_type, mode_mask,
+ &framebuffer.mode_info,
+ framebuffer.ptr, 0, 0);
+
+
+ /* Copy default palette to initialize emulated palette. */
+ err = grub_video_cirrus_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+ return err;
+}
+
+static struct grub_video_adapter grub_video_cirrus_adapter =
+ {
+ .name = "Cirrus CLGD 5446 PCI Video Driver",
+ .id = GRUB_VIDEO_DRIVER_CIRRUS,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_NATIVE,
+
+ .init = grub_video_cirrus_video_init,
+ .fini = grub_video_cirrus_video_fini,
+ .setup = grub_video_cirrus_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_fb_get_info_and_fini,
+ .set_palette = grub_video_cirrus_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_fb_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_fb_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(video_cirrus)
+{
+ grub_video_register (&grub_video_cirrus_adapter);
+}
+
+GRUB_MOD_FINI(video_cirrus)
+{
+ grub_video_unregister (&grub_video_cirrus_adapter);
+}
diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c
new file mode 100644
index 0000000..d14ae98
--- /dev/null
+++ b/grub-core/video/efi_gop.c
@@ -0,0 +1,441 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/graphics_output.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_efi_guid_t graphics_output_guid = GRUB_EFI_GOP_GUID;
+static struct grub_efi_gop *gop;
+static unsigned old_mode;
+static int restore_needed;
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+ struct grub_video_render_target *render_target;
+ grub_uint8_t *ptr;
+} framebuffer;
+
+
+static int
+check_protocol (void)
+{
+ gop = grub_efi_locate_protocol (&graphics_output_guid, 0);
+ if (gop)
+ return 1;
+
+ return 0;
+}
+
+static grub_err_t
+grub_video_gop_init (void)
+{
+ grub_memset (&framebuffer, 0, sizeof(framebuffer));
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_gop_fini (void)
+{
+ if (restore_needed)
+ {
+ efi_call_2 (gop->set_mode, gop, old_mode);
+ restore_needed = 0;
+ }
+ return grub_video_fb_fini ();
+}
+
+static int
+grub_video_gop_get_bpp (struct grub_efi_gop_mode_info *in)
+{
+ grub_uint32_t total_mask;
+ int i;
+ switch (in->pixel_format)
+ {
+ case GRUB_EFI_GOT_BGRA8:
+ case GRUB_EFI_GOT_RGBA8:
+ return 32;
+
+ case GRUB_EFI_GOT_BITMASK:
+ /* Check overlaps. */
+ if ((in->pixel_bitmask.r & in->pixel_bitmask.g)
+ || (in->pixel_bitmask.r & in->pixel_bitmask.b)
+ || (in->pixel_bitmask.g & in->pixel_bitmask.b)
+ || (in->pixel_bitmask.r & in->pixel_bitmask.a)
+ || (in->pixel_bitmask.g & in->pixel_bitmask.a)
+ || (in->pixel_bitmask.b & in->pixel_bitmask.a))
+ return 0;
+
+ total_mask = in->pixel_bitmask.r | in->pixel_bitmask.g
+ | in->pixel_bitmask.b | in->pixel_bitmask.a;
+
+ for (i = 31; i >= 0; i--)
+ if (total_mask & (1 << i))
+ return i + 1;
+
+ /* Fall through. */
+ default:
+ return 0;
+ }
+}
+
+static void
+grub_video_gop_get_bitmask (grub_uint32_t mask, unsigned int *mask_size,
+ unsigned int *field_pos)
+{
+ int i;
+ int last_p;
+ for (i = 31; i >= 0; i--)
+ if (mask & (1 << i))
+ break;
+ if (i == -1)
+ {
+ *mask_size = *field_pos = 0;
+ return;
+ }
+ last_p = i;
+ for (; i >= 0; i--)
+ if (!(mask & (1 << i)))
+ break;
+ *field_pos = i + 1;
+ *mask_size = last_p - *field_pos + 1;
+}
+
+static grub_err_t
+grub_video_gop_fill_mode_info (unsigned mode,
+ struct grub_efi_gop_mode_info *in,
+ struct grub_video_mode_info *out)
+{
+ out->mode_number = mode;
+ out->number_of_colors = 256;
+ out->width = in->width;
+ out->height = in->height;
+ out->mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
+ out->bpp = grub_video_gop_get_bpp (in);
+ out->bytes_per_pixel = out->bpp >> 3;
+ if (!out->bpp)
+ return grub_error (GRUB_ERR_IO, "unsupported video mode");
+ out->pitch = in->pixels_per_scanline * out->bytes_per_pixel;
+
+ switch (in->pixel_format)
+ {
+ case GRUB_EFI_GOT_RGBA8:
+ out->red_mask_size = 8;
+ out->red_field_pos = 0;
+ out->green_mask_size = 8;
+ out->green_field_pos = 8;
+ out->blue_mask_size = 8;
+ out->blue_field_pos = 16;
+ out->reserved_mask_size = 8;
+ out->reserved_field_pos = 24;
+ break;
+
+ case GRUB_EFI_GOT_BGRA8:
+ out->red_mask_size = 8;
+ out->red_field_pos = 16;
+ out->green_mask_size = 8;
+ out->green_field_pos = 8;
+ out->blue_mask_size = 8;
+ out->blue_field_pos = 0;
+ out->reserved_mask_size = 8;
+ out->reserved_field_pos = 24;
+ break;
+
+ case GRUB_EFI_GOT_BITMASK:
+ grub_video_gop_get_bitmask (in->pixel_bitmask.r, &out->red_mask_size,
+ &out->red_field_pos);
+ grub_video_gop_get_bitmask (in->pixel_bitmask.g, &out->green_mask_size,
+ &out->green_field_pos);
+ grub_video_gop_get_bitmask (in->pixel_bitmask.b, &out->blue_mask_size,
+ &out->blue_field_pos);
+ grub_video_gop_get_bitmask (in->pixel_bitmask.a, &out->reserved_mask_size,
+ &out->reserved_field_pos);
+ break;
+
+ default:
+ return grub_error (GRUB_ERR_IO, "unsupported video mode");
+ }
+
+ out->blit_format = grub_video_get_blit_format (out);
+ return GRUB_ERR_NONE;
+}
+
+static int
+grub_video_gop_iterate (int (*hook) (const struct grub_video_mode_info *info))
+{
+ unsigned mode;
+
+ for (mode = 0; mode < gop->mode->max_mode; mode++)
+ {
+ grub_efi_uintn_t size;
+ grub_efi_status_t status;
+ struct grub_efi_gop_mode_info *info = NULL;
+ grub_err_t err;
+ struct grub_video_mode_info mode_info;
+
+ status = efi_call_4 (gop->query_mode, gop, mode, &size, &info);
+
+ if (status)
+ {
+ info = 0;
+ continue;
+ }
+
+ err = grub_video_gop_fill_mode_info (mode, info, &mode_info);
+ if (err)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+ if (hook (&mode_info))
+ return 1;
+ }
+ return 0;
+}
+
+static grub_err_t
+grub_video_gop_setup (unsigned int width, unsigned int height,
+ unsigned int mode_type,
+ unsigned int mode_mask __attribute__ ((unused)))
+{
+ unsigned int depth;
+ struct grub_efi_gop_mode_info *info = NULL;
+ unsigned best_mode = 0;
+ grub_err_t err;
+ unsigned bpp;
+ int found = 0;
+ unsigned long long best_volume = 0;
+
+ depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ >> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
+
+ /* Keep current mode if possible. */
+ if (gop->mode->info)
+ {
+ bpp = grub_video_gop_get_bpp (gop->mode->info);
+ if (bpp && ((width == gop->mode->info->width
+ && height == gop->mode->info->height)
+ || (width == 0 && height == 0))
+ && (depth == bpp || depth == 0))
+ {
+ grub_dprintf ("video", "GOP: keeping mode %d\n", gop->mode->mode);
+ best_mode = gop->mode->mode;
+ found = 1;
+ }
+ }
+
+ if (!found)
+ {
+ unsigned mode;
+ grub_dprintf ("video", "GOP: %d modes detected\n", gop->mode->max_mode);
+ for (mode = 0; mode < gop->mode->max_mode; mode++)
+ {
+ grub_efi_uintn_t size;
+ grub_efi_status_t status;
+
+ status = efi_call_4 (gop->query_mode, gop, mode, &size, &info);
+ if (status)
+ {
+ info = 0;
+ continue;
+ }
+
+ grub_dprintf ("video", "GOP: mode %d: %dx%d\n", mode, info->width,
+ info->height);
+
+ bpp = grub_video_gop_get_bpp (info);
+ if (!bpp)
+ {
+ grub_dprintf ("video", "GOP: mode %d: incompatible pixel mode\n",
+ mode);
+ continue;
+ }
+
+ grub_dprintf ("video", "GOP: mode %d: depth %d\n", mode, bpp);
+
+ if (!(((info->width == width && info->height == height)
+ || (width == 0 && height == 0))
+ && (bpp == depth || depth == 0)))
+ {
+ grub_dprintf ("video", "GOP: mode %d: rejected\n", mode);
+ continue;
+ }
+
+ if (best_volume < ((unsigned long long) info->width)
+ * ((unsigned long long) info->height)
+ * ((unsigned long long) bpp))
+ {
+ best_volume = ((unsigned long long) info->width)
+ * ((unsigned long long) info->height)
+ * ((unsigned long long) bpp);
+ best_mode = mode;
+ }
+ found = 1;
+ }
+ }
+
+ if (!found)
+ {
+ grub_dprintf ("video", "GOP: no mode found\n");
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
+ }
+
+ if (best_mode != gop->mode->mode)
+ {
+ if (!restore_needed)
+ {
+ old_mode = gop->mode->mode;
+ restore_needed = 1;
+ }
+ efi_call_2 (gop->set_mode, gop, best_mode);
+ }
+
+ info = gop->mode->info;
+
+ err = grub_video_gop_fill_mode_info (gop->mode->mode, info,
+ &framebuffer.mode_info);
+ if (err)
+ {
+ grub_dprintf ("video", "GOP: couldn't fill mode info\n");
+ return err;
+ }
+
+ framebuffer.ptr = (void *) (grub_addr_t) gop->mode->fb_base;
+
+ grub_dprintf ("video", "GOP: initialising FB @ %p %dx%dx%d\n",
+ framebuffer.ptr, framebuffer.mode_info.width,
+ framebuffer.mode_info.height, framebuffer.mode_info.bpp);
+
+ err = grub_video_fb_create_render_target_from_pointer
+ (&framebuffer.render_target, &framebuffer.mode_info, framebuffer.ptr);
+
+ if (err)
+ {
+ grub_dprintf ("video", "GOP: Couldn't create FB target\n");
+ return err;
+ }
+
+ err = grub_video_fb_set_active_render_target (framebuffer.render_target);
+
+ if (err)
+ {
+ grub_dprintf ("video", "GOP: Couldn't set FB target\n");
+ return err;
+ }
+
+ err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+
+ if (err)
+ grub_dprintf ("video", "GOP: Couldn't set palette\n");
+ else
+ grub_dprintf ("video", "GOP: Success\n");
+
+ return err;
+}
+
+static grub_err_t
+grub_video_gop_swap_buffers (void)
+{
+ /* TODO: Implement buffer swapping. */
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_gop_set_active_render_target (struct grub_video_render_target *target)
+{
+ if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
+ target = framebuffer.render_target;
+
+ return grub_video_fb_set_active_render_target (target);
+}
+
+static grub_err_t
+grub_video_gop_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuf)
+{
+ grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
+ *framebuf = (char *) framebuffer.ptr;
+
+ grub_video_fb_fini ();
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_video_adapter grub_video_gop_adapter =
+ {
+ .name = "EFI GOP driver",
+ .id = GRUB_VIDEO_DRIVER_EFI_GOP,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_FIRMWARE,
+
+ .init = grub_video_gop_init,
+ .fini = grub_video_gop_fini,
+ .setup = grub_video_gop_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_gop_get_info_and_fini,
+ .set_palette = grub_video_fb_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_gop_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_gop_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+ .iterate = grub_video_gop_iterate,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(efi_gop)
+{
+ if (check_protocol ())
+ grub_video_register (&grub_video_gop_adapter);
+}
+
+GRUB_MOD_FINI(efi_gop)
+{
+ if (restore_needed)
+ {
+ efi_call_2 (gop->set_mode, gop, old_mode);
+ restore_needed = 0;
+ }
+ if (gop)
+ grub_video_unregister (&grub_video_gop_adapter);
+}
diff --git a/grub-core/video/efi_uga.c b/grub-core/video/efi_uga.c
new file mode 100644
index 0000000..1e709a5
--- /dev/null
+++ b/grub-core/video/efi_uga.c
@@ -0,0 +1,344 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/uga_draw.h>
+#include <grub/pci.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_efi_guid_t uga_draw_guid = GRUB_EFI_UGA_DRAW_GUID;
+static struct grub_efi_uga_draw_protocol *uga;
+static grub_uint32_t uga_fb;
+static grub_uint32_t uga_pitch;
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+ struct grub_video_render_target *render_target;
+ grub_uint8_t *ptr;
+} framebuffer;
+
+#define RGB_MASK 0xffffff
+#define RGB_MAGIC 0x121314
+#define LINE_MIN 800
+#define LINE_MAX 4096
+#define FBTEST_STEP (0x10000 >> 2)
+#define FBTEST_COUNT 8
+
+static int
+find_line_len (grub_uint32_t *fb_base, grub_uint32_t *line_len)
+{
+ grub_uint32_t *base = (grub_uint32_t *) (grub_target_addr_t) *fb_base;
+ int i;
+
+ for (i = 0; i < FBTEST_COUNT; i++, base += FBTEST_STEP)
+ {
+ if ((*base & RGB_MASK) == RGB_MAGIC)
+ {
+ int j;
+
+ for (j = LINE_MIN; j <= LINE_MAX; j++)
+ {
+ if ((base[j] & RGB_MASK) == RGB_MAGIC)
+ {
+ *fb_base = (grub_uint32_t) (grub_target_addr_t) base;
+ *line_len = j << 2;
+
+ return 1;
+ }
+ }
+
+ break;
+ }
+ }
+
+ return 0;
+}
+
+static int
+find_framebuf (grub_uint32_t *fb_base, grub_uint32_t *line_len)
+{
+ int found = 0;
+
+ auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev,
+ grub_pci_id_t pciid);
+
+ int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev,
+ grub_pci_id_t pciid)
+ {
+ grub_pci_address_t addr;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ if (grub_pci_read (addr) >> 24 == 0x3)
+ {
+ int i;
+
+ grub_dprintf ("fb", "Display controller: %d:%d.%d\nDevice id: %x\n",
+ grub_pci_get_bus (dev), grub_pci_get_device (dev),
+ grub_pci_get_function (dev), pciid);
+ addr += 8;
+ for (i = 0; i < 6; i++, addr += 4)
+ {
+ grub_uint32_t old_bar1, old_bar2, type;
+ grub_uint64_t base64;
+
+ old_bar1 = grub_pci_read (addr);
+ if ((! old_bar1) || (old_bar1 & GRUB_PCI_ADDR_SPACE_IO))
+ continue;
+
+ type = old_bar1 & GRUB_PCI_ADDR_MEM_TYPE_MASK;
+ if (type == GRUB_PCI_ADDR_MEM_TYPE_64)
+ {
+ if (i == 5)
+ break;
+
+ old_bar2 = grub_pci_read (addr + 4);
+ }
+ else
+ old_bar2 = 0;
+
+ base64 = old_bar2;
+ base64 <<= 32;
+ base64 |= (old_bar1 & GRUB_PCI_ADDR_MEM_MASK);
+
+ grub_dprintf ("fb", "%s(%d): 0x%llx\n",
+ ((old_bar1 & GRUB_PCI_ADDR_MEM_PREFETCH) ?
+ "VMEM" : "MMIO"), i,
+ (unsigned long long) base64);
+
+ if ((old_bar1 & GRUB_PCI_ADDR_MEM_PREFETCH) && (! found))
+ {
+ *fb_base = base64;
+ if (find_line_len (fb_base, line_len))
+ found++;
+ }
+
+ if (type == GRUB_PCI_ADDR_MEM_TYPE_64)
+ {
+ i++;
+ addr += 4;
+ }
+ }
+ }
+
+ return found;
+ }
+
+ grub_pci_iterate (find_card);
+ return found;
+}
+
+static int
+check_protocol (void)
+{
+ grub_efi_uga_draw_protocol_t *c;
+
+ c = grub_efi_locate_protocol (&uga_draw_guid, 0);
+ if (c)
+ {
+ grub_uint32_t width, height, depth, rate, pixel;
+ int ret;
+
+ if (efi_call_5 (c->get_mode, c, &width, &height, &depth, &rate))
+ return 0;
+
+ grub_efi_set_text_mode (0);
+ pixel = RGB_MAGIC;
+ efi_call_10 (c->blt, c, (struct grub_efi_uga_pixel *) &pixel,
+ GRUB_EFI_UGA_VIDEO_FILL, 0, 0, 0, 0, 1, height, 0);
+ ret = find_framebuf (&uga_fb, &uga_pitch);
+ grub_efi_set_text_mode (1);
+
+ if (ret)
+ {
+ uga = c;
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static grub_err_t
+grub_video_uga_init (void)
+{
+ grub_memset (&framebuffer, 0, sizeof(framebuffer));
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_uga_fini (void)
+{
+ return grub_video_fb_fini ();
+}
+
+static grub_err_t
+grub_video_uga_setup (unsigned int width, unsigned int height,
+ unsigned int mode_type,
+ unsigned int mode_mask __attribute__ ((unused)))
+{
+ unsigned int depth;
+ int found = 0;
+
+ depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ >> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
+
+ {
+ grub_uint32_t w;
+ grub_uint32_t h;
+ grub_uint32_t d;
+ grub_uint32_t r;
+
+ if ((! efi_call_5 (uga->get_mode, uga, &w, &h, &d, &r)) &&
+ ((! width) || (width == w)) &&
+ ((! height) || (height == h)) &&
+ ((! depth) || (depth == d)))
+ {
+ framebuffer.mode_info.width = w;
+ framebuffer.mode_info.height = h;
+ framebuffer.mode_info.pitch = uga_pitch;
+ framebuffer.ptr = (grub_uint8_t *) (grub_target_addr_t) uga_fb;
+
+ found = 1;
+ }
+ }
+
+ if (found)
+ {
+ grub_err_t err;
+
+ framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
+ framebuffer.mode_info.bpp = 32;
+ framebuffer.mode_info.bytes_per_pixel = 4;
+ framebuffer.mode_info.number_of_colors = 256; /* TODO: fix me. */
+ framebuffer.mode_info.red_mask_size = 8;
+ framebuffer.mode_info.red_field_pos = 16;
+ framebuffer.mode_info.green_mask_size = 8;
+ framebuffer.mode_info.green_field_pos = 8;
+ framebuffer.mode_info.blue_mask_size = 8;
+ framebuffer.mode_info.blue_field_pos = 0;
+ framebuffer.mode_info.reserved_mask_size = 8;
+ framebuffer.mode_info.reserved_field_pos = 24;
+
+ framebuffer.mode_info.blit_format =
+ grub_video_get_blit_format (&framebuffer.mode_info);
+
+ err = grub_video_fb_create_render_target_from_pointer
+ (&framebuffer.render_target,
+ &framebuffer.mode_info,
+ framebuffer.ptr);
+
+ if (err)
+ return err;
+
+ err = grub_video_fb_set_active_render_target
+ (framebuffer.render_target);
+
+ if (err)
+ return err;
+
+ err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+
+ return err;
+ }
+
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
+}
+
+static grub_err_t
+grub_video_uga_swap_buffers (void)
+{
+ /* TODO: Implement buffer swapping. */
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_uga_set_active_render_target (struct grub_video_render_target *target)
+{
+ if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
+ target = framebuffer.render_target;
+
+ return grub_video_fb_set_active_render_target (target);
+}
+
+static grub_err_t
+grub_video_uga_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuf)
+{
+ grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
+ *framebuf = (char *) framebuffer.ptr;
+
+ grub_video_fb_fini ();
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_video_adapter grub_video_uga_adapter =
+ {
+ .name = "EFI UGA driver",
+ .id = GRUB_VIDEO_DRIVER_EFI_UGA,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_FIRMWARE_DIRTY,
+
+ .init = grub_video_uga_init,
+ .fini = grub_video_uga_fini,
+ .setup = grub_video_uga_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_uga_get_info_and_fini,
+ .set_palette = grub_video_fb_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_uga_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_uga_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+ };
+
+GRUB_MOD_INIT(efi_uga)
+{
+ if (check_protocol ())
+ grub_video_register (&grub_video_uga_adapter);
+}
+
+GRUB_MOD_FINI(efi_uga)
+{
+ if (uga)
+ grub_video_unregister (&grub_video_uga_adapter);
+}
diff --git a/grub-core/video/emu/sdl.c b/grub-core/video/emu/sdl.c
new file mode 100644
index 0000000..f4c1a6a
--- /dev/null
+++ b/grub-core/video/emu/sdl.c
@@ -0,0 +1,242 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <SDL/SDL.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static SDL_Surface *window = 0;
+static struct grub_video_render_target *sdl_render_target;
+static struct grub_video_mode_info mode_info;
+
+static grub_err_t
+grub_video_sdl_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data);
+
+static grub_err_t
+grub_video_sdl_init (void)
+{
+ window = 0;
+
+ if (SDL_Init (SDL_INIT_VIDEO) < 0)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "Couldn't init SDL: %s",
+ SDL_GetError ());
+
+ grub_memset (&mode_info, 0, sizeof (mode_info));
+
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_sdl_fini (void)
+{
+ SDL_Quit ();
+ window = 0;
+
+ grub_memset (&mode_info, 0, sizeof (mode_info));
+
+ return grub_video_fb_fini ();
+}
+
+static inline unsigned int
+get_mask_size (grub_uint32_t mask)
+{
+ unsigned i;
+ for (i = 0; mask > 1U << i; i++);
+ return i;
+}
+
+static grub_err_t
+grub_video_sdl_setup (unsigned int width, unsigned int height,
+ unsigned int mode_type, unsigned int mode_mask)
+{
+ int depth;
+ int flags = 0;
+ grub_err_t err;
+
+ /* Decode depth from mode_type. If it is zero, then autodetect. */
+ depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ >> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
+
+ if (depth == 0)
+ depth = 32;
+
+ if (width == 0 && height == 0)
+ {
+ width = 800;
+ height = 600;
+ }
+
+ if ((mode_type & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED)
+ || !(mode_mask & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED))
+ flags |= SDL_DOUBLEBUF;
+
+ window = SDL_SetVideoMode (width, height, depth, flags | SDL_HWSURFACE);
+ if (! window)
+ window = SDL_SetVideoMode (width, height, depth, flags | SDL_SWSURFACE);
+ if (! window)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "Couldn't open window: %s",
+ SDL_GetError ());
+
+ grub_memset (&sdl_render_target, 0, sizeof (sdl_render_target));
+
+ mode_info.width = window->w;
+ mode_info.height = window->h;
+ mode_info.mode_type = 0;
+ if (window->flags & SDL_DOUBLEBUF)
+ mode_info.mode_type
+ |= GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED;
+ if (window->format->palette)
+ mode_info.mode_type |= GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+ else
+ mode_info.mode_type |= GRUB_VIDEO_MODE_TYPE_RGB;
+
+ mode_info.bpp = window->format->BitsPerPixel;
+ mode_info.bytes_per_pixel = window->format->BytesPerPixel;
+ mode_info.pitch = window->pitch;
+
+ /* In index color mode, number of colors. In RGB mode this is 256. */
+ if (window->format->palette)
+ mode_info.number_of_colors
+ = 1 << window->format->BitsPerPixel;
+ else
+ mode_info.number_of_colors = 256;
+
+ if (! window->format->palette)
+ {
+ mode_info.red_mask_size
+ = get_mask_size (window->format->Rmask >> window->format->Rshift);
+ mode_info.red_field_pos = window->format->Rshift;
+ mode_info.green_mask_size
+ = get_mask_size (window->format->Gmask >> window->format->Gshift);
+ mode_info.green_field_pos = window->format->Gshift;
+ mode_info.blue_mask_size
+ = get_mask_size (window->format->Bmask >> window->format->Bshift);
+ mode_info.blue_field_pos = window->format->Bshift;
+ mode_info.reserved_mask_size
+ = get_mask_size (window->format->Amask >> window->format->Ashift);
+ mode_info.reserved_field_pos = window->format->Ashift;
+ mode_info.blit_format
+ = grub_video_get_blit_format (&mode_info);
+ }
+
+ err = grub_video_fb_create_render_target_from_pointer (&sdl_render_target,
+ &mode_info,
+ window->pixels);
+ if (err)
+ return err;
+
+ /* Copy default palette to initialize emulated palette. */
+ grub_video_sdl_set_palette (0, (sizeof (grub_video_fbstd_colors)
+ / sizeof (grub_video_fbstd_colors[0])),
+ grub_video_fbstd_colors);
+
+ /* Reset render target to SDL one. */
+ return grub_video_fb_set_active_render_target (sdl_render_target);
+}
+
+static grub_err_t
+grub_video_sdl_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ unsigned i;
+ if (window->format->palette)
+ {
+ SDL_Color *tmp = grub_malloc (count * sizeof (tmp[0]));
+ for (i = 0; i < count; i++)
+ {
+ tmp[i].r = palette_data[i].r;
+ tmp[i].g = palette_data[i].g;
+ tmp[i].b = palette_data[i].b;
+ tmp[i].unused = palette_data[i].a;
+ }
+ SDL_SetColors (window, tmp, start, count);
+ grub_free (tmp);
+ }
+
+ return grub_video_fb_set_palette (start, count, palette_data);
+}
+
+static grub_err_t
+grub_video_sdl_swap_buffers (void)
+{
+ if (SDL_Flip (window) < 0)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "couldn't swap buffers: %s",
+ SDL_GetError ());
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_sdl_set_active_render_target (struct grub_video_render_target *target)
+{
+ if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
+ return grub_video_fb_set_active_render_target (sdl_render_target);
+
+ return grub_video_fb_set_active_render_target (target);
+}
+
+static struct grub_video_adapter grub_video_sdl_adapter =
+ {
+ .name = "SDL Video Driver",
+ .id = GRUB_VIDEO_DRIVER_SDL,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_FIRMWARE,
+
+ .init = grub_video_sdl_init,
+ .fini = grub_video_sdl_fini,
+ .setup = grub_video_sdl_setup,
+ .get_info = grub_video_fb_get_info,
+ .set_palette = grub_video_sdl_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_sdl_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_sdl_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(sdl)
+{
+ grub_video_register (&grub_video_sdl_adapter);
+}
+
+GRUB_MOD_FINI(sdl)
+{
+ grub_video_unregister (&grub_video_sdl_adapter);
+}
diff --git a/grub-core/video/fb/fbblit.c b/grub-core/video/fb/fbblit.c
new file mode 100644
index 0000000..15797be
--- /dev/null
+++ b/grub-core/video/fb/fbblit.c
@@ -0,0 +1,1420 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* SPECIAL NOTES!
+
+ Please note following when reading the code below:
+
+ - In this driver we assume that every memory can be accessed by same memory
+ bus. If there are different address spaces do not use this code as a base
+ code for other archs.
+
+ - Every function in this code assumes that bounds checking has been done in
+ previous phase and they are opted out in here. */
+
+#include <grub/video_fb.h>
+#include <grub/fbblit.h>
+#include <grub/fbutil.h>
+#include <grub/misc.h>
+#include <grub/types.h>
+#include <grub/video.h>
+
+/* Generic replacing blitter (slow). Works for every supported format. */
+void
+grub_video_fbblit_replace (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y, int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t src_red;
+ grub_uint8_t src_green;
+ grub_uint8_t src_blue;
+ grub_uint8_t src_alpha;
+ grub_video_color_t src_color;
+ grub_video_color_t dst_color;
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ src_color = get_pixel (src, i + offset_x, j + offset_y);
+
+ grub_video_fb_unmap_color_int (src, src_color, &src_red, &src_green,
+ &src_blue, &src_alpha);
+
+ dst_color = grub_video_fb_map_rgba (src_red, src_green,
+ src_blue, src_alpha);
+
+ set_pixel (dst, x + i, y + j, dst_color);
+ }
+ }
+}
+
+/* Block copy replacing blitter. Works with modes multiple of 8 bits. */
+void
+grub_video_fbblit_replace_directN (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y, int width, int height,
+ int offset_x, int offset_y)
+{
+ int j;
+ grub_uint32_t *srcptr;
+ grub_uint32_t *dstptr;
+ int bpp;
+
+ bpp = src->mode_info->bytes_per_pixel;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ grub_memmove (dstptr, srcptr, width * bpp);
+ }
+}
+
+/* Optimized replacing blitter for 1-bit to 32bit. */
+void
+grub_video_fbblit_replace_32bit_1bit (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ grub_uint8_t srcmask;
+ unsigned int dstrowskip;
+ unsigned int srcrowskipbyte, srcrowskipbit;
+ grub_uint32_t fgcolor, bgcolor;
+ int bit_index;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+ srcrowskipbyte = (src->mode_info->width - width) >> 3;
+ srcrowskipbit = (src->mode_info->width - width) & 7;
+
+ bit_index = offset_y * src->mode_info->width + offset_x;
+ srcptr = (grub_uint8_t *) src->data + (bit_index >> 3);
+ srcmask = 1 << (~bit_index & 7);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green,
+ src->mode_info->fg_blue,
+ src->mode_info->fg_alpha);
+
+ bgcolor = grub_video_fb_map_rgba (src->mode_info->bg_red,
+ src->mode_info->bg_green,
+ src->mode_info->bg_blue,
+ src->mode_info->bg_alpha);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ if (*srcptr & srcmask)
+ *(grub_uint32_t *) dstptr = fgcolor;
+ else
+ *(grub_uint32_t *) dstptr = bgcolor;
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ dstptr += 4;
+ }
+
+ srcptr += srcrowskipbyte;
+ if (srcmask >> srcrowskipbit)
+ srcmask >>= srcrowskipbit;
+ else
+ {
+ srcptr++;
+ srcmask <<= 8 - srcrowskipbit;
+ }
+ dstptr += dstrowskip;
+ }
+}
+
+
+/* Optimized replacing blitter for 1-bit to 24-bit. */
+void
+grub_video_fbblit_replace_24bit_1bit (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ grub_uint8_t srcmask;
+ unsigned int dstrowskip;
+ unsigned int srcrowskipbyte, srcrowskipbit;
+ grub_uint32_t fgcolor, bgcolor;
+ int bit_index;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+ srcrowskipbyte = (src->mode_info->width - width) >> 3;
+ srcrowskipbit = (src->mode_info->width - width) & 7;
+
+ bit_index = offset_y * src->mode_info->width + offset_x;
+ srcptr = (grub_uint8_t *) src->data + (bit_index >> 3);
+ srcmask = 1 << (~bit_index & 7);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green,
+ src->mode_info->fg_blue,
+ src->mode_info->fg_alpha);
+
+ bgcolor = grub_video_fb_map_rgba (src->mode_info->bg_red,
+ src->mode_info->bg_green,
+ src->mode_info->bg_blue,
+ src->mode_info->bg_alpha);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width - 1; i++)
+ {
+ if (*srcptr & srcmask)
+ *(grub_uint32_t *) dstptr = fgcolor;
+ else
+ *(grub_uint32_t *) dstptr = bgcolor;
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ dstptr += 3;
+ }
+
+ if (*srcptr & srcmask)
+ {
+ *dstptr++ = fgcolor & 0xff;
+ *dstptr++ = (fgcolor & 0xff00) >> 8;
+ *dstptr++ = (fgcolor & 0xff0000) >> 16;
+ }
+ else
+ {
+ *dstptr++ = bgcolor & 0xff;
+ *dstptr++ = (bgcolor & 0xff00) >> 8;
+ *dstptr++ = (bgcolor & 0xff0000) >> 16;
+ }
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ srcptr += srcrowskipbyte;
+ if (srcmask >> srcrowskipbit)
+ srcmask >>= srcrowskipbit;
+ else
+ {
+ srcptr++;
+ srcmask <<= 8 - srcrowskipbit;
+ }
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized replacing blitter for 1-bit to 16-bit. */
+void
+grub_video_fbblit_replace_16bit_1bit (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ grub_uint8_t srcmask;
+ unsigned int dstrowskip;
+ unsigned int srcrowskipbyte, srcrowskipbit;
+ grub_uint16_t fgcolor, bgcolor;
+ int bit_index;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+ srcrowskipbyte = (src->mode_info->width - width) >> 3;
+ srcrowskipbit = (src->mode_info->width - width) & 7;
+
+ bit_index = offset_y * src->mode_info->width + offset_x;
+ srcptr = (grub_uint8_t *) src->data + (bit_index >> 3);
+ srcmask = 1 << (~bit_index & 7);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green,
+ src->mode_info->fg_blue,
+ src->mode_info->fg_alpha);
+
+ bgcolor = grub_video_fb_map_rgba (src->mode_info->bg_red,
+ src->mode_info->bg_green,
+ src->mode_info->bg_blue,
+ src->mode_info->bg_alpha);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ if (*srcptr & srcmask)
+ *(grub_uint16_t *) dstptr = fgcolor;
+ else
+ *(grub_uint16_t *) dstptr = bgcolor;
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ dstptr += 2;
+ }
+
+ srcptr += srcrowskipbyte;
+ if (srcmask >> srcrowskipbit)
+ srcmask >>= srcrowskipbit;
+ else
+ {
+ srcptr++;
+ srcmask <<= 8 - srcrowskipbit;
+ }
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized replacing blitter for 1-bit to 8-bit. */
+void
+grub_video_fbblit_replace_8bit_1bit (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ grub_uint8_t srcmask;
+ unsigned int dstrowskip;
+ unsigned int srcrowskipbyte, srcrowskipbit;
+ grub_uint8_t fgcolor, bgcolor;
+ int bit_index;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+ srcrowskipbyte = (src->mode_info->width - width) >> 3;
+ srcrowskipbit = (src->mode_info->width - width) & 7;
+
+ bit_index = offset_y * src->mode_info->width + offset_x;
+ srcptr = (grub_uint8_t *) src->data + (bit_index >> 3);
+ srcmask = 1 << (~bit_index & 7);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green,
+ src->mode_info->fg_blue,
+ src->mode_info->fg_alpha);
+
+ bgcolor = grub_video_fb_map_rgba (src->mode_info->bg_red,
+ src->mode_info->bg_green,
+ src->mode_info->bg_blue,
+ src->mode_info->bg_alpha);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ if (*srcptr & srcmask)
+ *(grub_uint8_t *) dstptr = fgcolor;
+ else
+ *(grub_uint8_t *) dstptr = bgcolor;
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ dstptr++;
+ }
+
+ srcptr += srcrowskipbyte;
+ if (srcmask >> srcrowskipbit)
+ srcmask >>= srcrowskipbit;
+ else
+ {
+ srcptr++;
+ srcmask <<= 8 - srcrowskipbit;
+ }
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized replacing blitter for RGBX8888 to BGRX8888. */
+void
+grub_video_fbblit_replace_BGRX8888_RGBX8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int srcrowskip;
+ unsigned int dstrowskip;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ srcrowskip = src->mode_info->pitch - src->mode_info->bytes_per_pixel * width;
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ srcptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (src, offset_x, offset_y);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint8_t r = *srcptr++;
+ grub_uint8_t g = *srcptr++;
+ grub_uint8_t b = *srcptr++;
+ grub_uint8_t a = *srcptr++;
+
+ *dstptr++ = b;
+ *dstptr++ = g;
+ *dstptr++ = r;
+ *dstptr++ = a;
+ }
+
+ srcptr += srcrowskip;
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized replacing blitter for RGB888 to BGRX8888. */
+void
+grub_video_fbblit_replace_BGRX8888_RGB888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int srcrowskip;
+ unsigned int dstrowskip;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ srcrowskip = src->mode_info->pitch - src->mode_info->bytes_per_pixel * width;
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ srcptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (src, offset_x, offset_y);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint8_t r = *srcptr++;
+ grub_uint8_t g = *srcptr++;
+ grub_uint8_t b = *srcptr++;
+
+ *dstptr++ = b;
+ *dstptr++ = g;
+ *dstptr++ = r;
+
+ /* Set alpha component as opaque. */
+ *dstptr++ = 255;
+ }
+
+ srcptr += srcrowskip;
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized replacing blitter for RGBX8888 to BGR888. */
+void
+grub_video_fbblit_replace_BGR888_RGBX8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int srcrowskip;
+ unsigned int dstrowskip;
+ int i;
+ int j;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ srcrowskip = src->mode_info->pitch - src->mode_info->bytes_per_pixel * width;
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ srcptr = (grub_uint32_t *) grub_video_fb_get_video_ptr (src, offset_x, offset_y);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint32_t color;
+ grub_uint8_t sr;
+ grub_uint8_t sg;
+ grub_uint8_t sb;
+
+ color = *srcptr++;
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ *dstptr++ = sb;
+ *dstptr++ = sg;
+ *dstptr++ = sr;
+ }
+
+ srcptr = (grub_uint32_t *) (((grub_uint8_t *) srcptr) + srcrowskip);
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized replacing blitter for RGB888 to BGR888. */
+void
+grub_video_fbblit_replace_BGR888_RGB888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int srcrowskip;
+ unsigned int dstrowskip;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ srcrowskip = src->mode_info->pitch - src->mode_info->bytes_per_pixel * width;
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ srcptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (src, offset_x, offset_y);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint8_t r = *srcptr++;
+ grub_uint8_t g = *srcptr++;
+ grub_uint8_t b = *srcptr++;
+
+ *dstptr++ = b;
+ *dstptr++ = g;
+ *dstptr++ = r;
+ }
+
+ srcptr += srcrowskip;
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized replacing blitter for RGB888 to RGBX8888. */
+void
+grub_video_fbblit_replace_RGBX8888_RGB888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t color;
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint32_t *dstptr;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ for (i = 0; i < width; i++)
+ {
+ sr = *srcptr++;
+ sg = *srcptr++;
+ sb = *srcptr++;
+
+ /* Set alpha as opaque. */
+ color = 0xFF000000 | (sb << 16) | (sg << 8) | sr;
+
+ *dstptr++ = color;
+ }
+ }
+}
+
+/* Optimized replacing blitter for RGBX8888 to RGB888. */
+void
+grub_video_fbblit_replace_RGB888_RGBX8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t color;
+ int i;
+ int j;
+ grub_uint32_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ for (i = 0; i < width; i++)
+ {
+ color = *srcptr++;
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ *dstptr++ = sr;
+ *dstptr++ = sg;
+ *dstptr++ = sb;
+ }
+ }
+}
+
+/* Optimized replacing blitter for RGBX8888 to indexed color. */
+void
+grub_video_fbblit_replace_index_RGBX8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t color;
+ int i;
+ int j;
+ grub_uint32_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ for (i = 0; i < width; i++)
+ {
+ color = *srcptr++;
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ color = grub_video_fb_map_rgb(sr, sg, sb);
+ *dstptr++ = color & 0xFF;
+ }
+ }
+}
+
+/* Optimized replacing blitter for RGB888 to indexed color. */
+void
+grub_video_fbblit_replace_index_RGB888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t color;
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ for (i = 0; i < width; i++)
+ {
+ sr = *srcptr++;
+ sg = *srcptr++;
+ sb = *srcptr++;
+
+ color = grub_video_fb_map_rgb(sr, sg, sb);
+
+ *dstptr++ = color & 0xFF;
+ }
+ }
+}
+
+/* Generic blending blitter. Works for every supported format. */
+void
+grub_video_fbblit_blend (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y, int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint8_t src_red;
+ grub_uint8_t src_green;
+ grub_uint8_t src_blue;
+ grub_uint8_t src_alpha;
+ grub_uint8_t dst_red;
+ grub_uint8_t dst_green;
+ grub_uint8_t dst_blue;
+ grub_uint8_t dst_alpha;
+ grub_video_color_t src_color;
+ grub_video_color_t dst_color;
+
+ src_color = get_pixel (src, i + offset_x, j + offset_y);
+ grub_video_fb_unmap_color_int (src, src_color, &src_red, &src_green,
+ &src_blue, &src_alpha);
+
+ if (src_alpha == 0)
+ continue;
+
+ if (src_alpha == 255)
+ {
+ dst_color = grub_video_fb_map_rgba (src_red, src_green,
+ src_blue, src_alpha);
+ set_pixel (dst, x + i, y + j, dst_color);
+ continue;
+ }
+
+ dst_color = get_pixel (dst, x + i, y + j);
+
+ grub_video_fb_unmap_color_int (dst, dst_color, &dst_red,
+ &dst_green, &dst_blue, &dst_alpha);
+
+ dst_red = (((src_red * src_alpha)
+ + (dst_red * (255 - src_alpha))) / 255);
+ dst_green = (((src_green * src_alpha)
+ + (dst_green * (255 - src_alpha))) / 255);
+ dst_blue = (((src_blue * src_alpha)
+ + (dst_blue * (255 - src_alpha))) / 255);
+
+ dst_alpha = src_alpha;
+ dst_color = grub_video_fb_map_rgba (dst_red, dst_green, dst_blue,
+ dst_alpha);
+
+ set_pixel (dst, x + i, y + j, dst_color);
+ }
+ }
+}
+
+/* Optimized blending blitter for RGBA8888 to BGRA8888. */
+void
+grub_video_fbblit_blend_BGRA8888_RGBA8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t *srcptr;
+ grub_uint32_t *dstptr;
+ unsigned int srcrowskip;
+ unsigned int dstrowskip;
+ int i;
+ int j;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ srcrowskip = src->mode_info->pitch - src->mode_info->bytes_per_pixel * width;
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ srcptr = (grub_uint32_t *) grub_video_fb_get_video_ptr (src, offset_x, offset_y);
+ dstptr = (grub_uint32_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint32_t color;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+ unsigned int a;
+ unsigned int dr;
+ unsigned int dg;
+ unsigned int db;
+
+ color = *srcptr++;
+
+ a = color >> 24;
+
+ if (a == 0)
+ {
+ /* Skip transparent source pixels. */
+ dstptr++;
+ continue;
+ }
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ if (a == 255)
+ {
+ /* Opaque pixel shortcut. */
+ dr = sr;
+ dg = sg;
+ db = sb;
+ }
+ else
+ {
+ /* General pixel color blending. */
+ color = *dstptr;
+
+ dr = (color >> 16) & 0xFF;
+ dr = (dr * (255 - a) + sr * a) / 255;
+ dg = (color >> 8) & 0xFF;
+ dg = (dg * (255 - a) + sg * a) / 255;
+ db = (color >> 0) & 0xFF;
+ db = (db * (255 - a) + sb * a) / 255;
+ }
+
+ color = (a << 24) | (dr << 16) | (dg << 8) | db;
+
+ *dstptr++ = color;
+ }
+
+ srcptr = (grub_uint32_t *) (((grub_uint8_t *) srcptr) + srcrowskip);
+ dstptr = (grub_uint32_t *) (((grub_uint8_t *) dstptr) + dstrowskip);
+ }
+}
+
+/* Optimized blending blitter for RGBA8888 to BGR888. */
+void
+grub_video_fbblit_blend_BGR888_RGBA8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int srcrowskip;
+ unsigned int dstrowskip;
+ int i;
+ int j;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ srcrowskip = src->mode_info->pitch - src->mode_info->bytes_per_pixel * width;
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ srcptr = (grub_uint32_t *) grub_video_fb_get_video_ptr (src, offset_x, offset_y);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint32_t color;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+ unsigned int a;
+ unsigned int dr;
+ unsigned int dg;
+ unsigned int db;
+
+ color = *srcptr++;
+
+ a = color >> 24;
+
+ if (a == 0)
+ {
+ /* Skip transparent source pixels. */
+ dstptr += 3;
+ continue;
+ }
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ if (a == 255)
+ {
+ /* Opaque pixel shortcut. */
+ dr = sr;
+ dg = sg;
+ db = sb;
+ }
+ else
+ {
+ /* General pixel color blending. */
+ color = *dstptr;
+
+ db = dstptr[0];
+ db = (db * (255 - a) + sb * a) / 255;
+ dg = dstptr[1];
+ dg = (dg * (255 - a) + sg * a) / 255;
+ dr = dstptr[2];
+ dr = (dr * (255 - a) + sr * a) / 255;
+ }
+
+ *dstptr++ = db;
+ *dstptr++ = dg;
+ *dstptr++ = dr;
+ }
+
+ srcptr = (grub_uint32_t *) (((grub_uint8_t *) srcptr) + srcrowskip);
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized blending blitter for RGBA888 to RGBA8888. */
+void
+grub_video_fbblit_blend_RGBA8888_RGBA8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t color;
+ int i;
+ int j;
+ grub_uint32_t *srcptr;
+ grub_uint32_t *dstptr;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+ unsigned int a;
+ unsigned int dr;
+ unsigned int dg;
+ unsigned int db;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ for (i = 0; i < width; i++)
+ {
+ color = *srcptr++;
+
+ a = color >> 24;
+
+ if (a == 0)
+ {
+ dstptr++;
+ continue;
+ }
+
+ if (a == 255)
+ {
+ *dstptr++ = color;
+ continue;
+ }
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ color = *dstptr;
+
+ dr = (color >> 0) & 0xFF;
+ dg = (color >> 8) & 0xFF;
+ db = (color >> 16) & 0xFF;
+
+ dr = (dr * (255 - a) + sr * a) / 255;
+ dg = (dg * (255 - a) + sg * a) / 255;
+ db = (db * (255 - a) + sb * a) / 255;
+
+ color = (a << 24) | (db << 16) | (dg << 8) | dr;
+
+ *dstptr++ = color;
+ }
+ }
+}
+
+/* Optimized blending blitter for RGBA8888 to RGB888. */
+void
+grub_video_fbblit_blend_RGB888_RGBA8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t color;
+ int i;
+ int j;
+ grub_uint32_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+ unsigned int a;
+ unsigned int dr;
+ unsigned int dg;
+ unsigned int db;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ for (i = 0; i < width; i++)
+ {
+ color = *srcptr++;
+
+ a = color >> 24;
+
+ if (a == 0)
+ {
+ dstptr += 3;
+ continue;
+ }
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ if (a == 255)
+ {
+ *dstptr++ = sr;
+ *dstptr++ = sg;
+ *dstptr++ = sb;
+
+ continue;
+ }
+
+ dr = dstptr[0];
+ dg = dstptr[1];
+ db = dstptr[2];
+
+ dr = (dr * (255 - a) + sr * a) / 255;
+ dg = (dg * (255 - a) + sg * a) / 255;
+ db = (db * (255 - a) + sb * a) / 255;
+
+ *dstptr++ = dr;
+ *dstptr++ = dg;
+ *dstptr++ = db;
+ }
+ }
+}
+
+/* Optimized blending blitter for RGBA8888 to indexed color. */
+void
+grub_video_fbblit_blend_index_RGBA8888 (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ grub_uint32_t color;
+ int i;
+ int j;
+ grub_uint32_t *srcptr;
+ grub_uint8_t *dstptr;
+ unsigned int sr;
+ unsigned int sg;
+ unsigned int sb;
+ unsigned int a;
+ unsigned char dr;
+ unsigned char dg;
+ unsigned char db;
+ unsigned char da;
+
+ for (j = 0; j < height; j++)
+ {
+ srcptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (src, offset_x, j + offset_y);
+ dstptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (dst, x, y + j);
+
+ for (i = 0; i < width; i++)
+ {
+ color = *srcptr++;
+
+ a = color >> 24;
+
+ if (a == 0)
+ {
+ dstptr++;
+ continue;
+ }
+
+ sr = (color >> 0) & 0xFF;
+ sg = (color >> 8) & 0xFF;
+ sb = (color >> 16) & 0xFF;
+
+ if (a == 255)
+ {
+ color = grub_video_fb_map_rgb(sr, sg, sb);
+ *dstptr++ = color & 0xFF;
+ continue;
+ }
+
+ grub_video_fb_unmap_color_int (dst, *dstptr, &dr, &dg, &db, &da);
+
+ dr = (dr * (255 - a) + sr * a) / 255;
+ dg = (dg * (255 - a) + sg * a) / 255;
+ db = (db * (255 - a) + sb * a) / 255;
+
+ color = grub_video_fb_map_rgb(dr, dg, db);
+
+ *dstptr++ = color & 0xFF;
+ }
+ }
+}
+
+/* Optimized blending blitter for 1-bit to XXXA8888. */
+void
+grub_video_fbblit_blend_XXXA8888_1bit (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ grub_uint8_t srcmask;
+ unsigned int dstrowskip;
+ unsigned int srcrowskipbyte, srcrowskipbit;
+ grub_uint32_t fgcolor, bgcolor;
+ int bit_index;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+ srcrowskipbyte = (src->mode_info->width - width) >> 3;
+ srcrowskipbit = (src->mode_info->width - width) & 7;
+
+ bit_index = offset_y * src->mode_info->width + offset_x;
+ srcptr = (grub_uint8_t *) src->data + (bit_index >> 3);
+ srcmask = 1 << (~bit_index & 7);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green,
+ src->mode_info->fg_blue,
+ src->mode_info->fg_alpha);
+
+ bgcolor = grub_video_fb_map_rgba (src->mode_info->bg_red,
+ src->mode_info->bg_green,
+ src->mode_info->bg_blue,
+ src->mode_info->bg_alpha);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint32_t color;
+ grub_uint8_t a;
+
+ if (*srcptr & srcmask)
+ {
+ color = fgcolor;
+ a = src->mode_info->fg_alpha;
+ }
+ else
+ {
+ color = bgcolor;
+ a = src->mode_info->bg_alpha;
+ }
+
+ if (a == 255)
+ *(grub_uint32_t *) dstptr = color;
+ else if (a != 0)
+ {
+ grub_uint8_t s1 = (color >> 0) & 0xFF;
+ grub_uint8_t s2 = (color >> 8) & 0xFF;
+ grub_uint8_t s3 = (color >> 16) & 0xFF;
+
+ grub_uint8_t d1 = (*(grub_uint32_t *) dstptr >> 0) & 0xFF;
+ grub_uint8_t d2 = (*(grub_uint32_t *) dstptr >> 8) & 0xFF;
+ grub_uint8_t d3 = (*(grub_uint32_t *) dstptr >> 16) & 0xFF;
+
+ d1 = (d1 * (255 - a) + s1 * a) / 255;
+ d2 = (d2 * (255 - a) + s2 * a) / 255;
+ d3 = (d3 * (255 - a) + s3 * a) / 255;
+
+ *(grub_uint32_t *) dstptr = (a << 24) | (d3 << 16) | (d2 << 8)
+ | d1;
+ }
+
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ dstptr += 4;
+ }
+
+ srcptr += srcrowskipbyte;
+ if (srcmask >> srcrowskipbit)
+ srcmask >>= srcrowskipbit;
+ else
+ {
+ srcptr++;
+ srcmask <<= 8 - srcrowskipbit;
+ }
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized blending blitter for 1-bit to XXX888. */
+void
+grub_video_fbblit_blend_XXX888_1bit (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ grub_uint8_t srcmask;
+ unsigned int dstrowskip;
+ unsigned int srcrowskipbyte, srcrowskipbit;
+ grub_uint32_t fgcolor, bgcolor;
+ int bit_index;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+ srcrowskipbyte = (src->mode_info->width - width) >> 3;
+ srcrowskipbit = (src->mode_info->width - width) & 7;
+
+ bit_index = offset_y * src->mode_info->width + offset_x;
+ srcptr = (grub_uint8_t *) src->data + (bit_index >> 3);
+ srcmask = 1 << (~bit_index & 7);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green,
+ src->mode_info->fg_blue,
+ src->mode_info->fg_alpha);
+
+ bgcolor = grub_video_fb_map_rgba (src->mode_info->bg_red,
+ src->mode_info->bg_green,
+ src->mode_info->bg_blue,
+ src->mode_info->bg_alpha);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint32_t color;
+ grub_uint8_t a;
+ if (*srcptr & srcmask)
+ {
+ color = fgcolor;
+ a = src->mode_info->fg_alpha;
+ }
+ else
+ {
+ color = bgcolor;
+ a = src->mode_info->bg_alpha;
+ }
+
+ if (a == 255)
+ {
+ ((grub_uint8_t *) dstptr)[0] = color & 0xff;
+ ((grub_uint8_t *) dstptr)[1] = (color & 0xff00) >> 8;
+ ((grub_uint8_t *) dstptr)[2] = (color & 0xff0000) >> 16;
+ }
+ else if (a != 0)
+ {
+ grub_uint8_t s1 = (color >> 0) & 0xFF;
+ grub_uint8_t s2 = (color >> 8) & 0xFF;
+ grub_uint8_t s3 = (color >> 16) & 0xFF;
+
+ grub_uint8_t d1 = (*(grub_uint32_t *) dstptr >> 0) & 0xFF;
+ grub_uint8_t d2 = (*(grub_uint32_t *) dstptr >> 8) & 0xFF;
+ grub_uint8_t d3 = (*(grub_uint32_t *) dstptr >> 16) & 0xFF;
+
+ ((grub_uint8_t *) dstptr)[0] = (d1 * (255 - a) + s1 * a) / 255;
+ ((grub_uint8_t *) dstptr)[1] = (d2 * (255 - a) + s2 * a) / 255;
+ ((grub_uint8_t *) dstptr)[2] = (d3 * (255 - a) + s3 * a) / 255;
+ }
+
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ dstptr += 3;
+ }
+
+ srcptr += srcrowskipbyte;
+ if (srcmask >> srcrowskipbit)
+ srcmask >>= srcrowskipbit;
+ else
+ {
+ srcptr++;
+ srcmask <<= 8 - srcrowskipbit;
+ }
+ dstptr += dstrowskip;
+ }
+}
+
+/* Optimized blending blitter for 1-bit to XXX888. */
+void
+grub_video_fbblit_blend_XXX565_1bit (struct grub_video_fbblit_info *dst,
+ struct grub_video_fbblit_info *src,
+ int x, int y,
+ int width, int height,
+ int offset_x, int offset_y)
+{
+ int i;
+ int j;
+ grub_uint8_t *srcptr;
+ grub_uint8_t *dstptr;
+ grub_uint8_t srcmask;
+ unsigned int dstrowskip;
+ unsigned int srcrowskipbyte, srcrowskipbit;
+ grub_uint16_t fgcolor, bgcolor;
+ int bit_index;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ dstrowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+ srcrowskipbyte = (src->mode_info->width - width) >> 3;
+ srcrowskipbit = (src->mode_info->width - width) & 7;
+
+ bit_index = offset_y * src->mode_info->width + offset_x;
+ srcptr = (grub_uint8_t *) src->data + (bit_index >> 3);
+ srcmask = 1 << (~bit_index & 7);
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green,
+ src->mode_info->fg_blue,
+ src->mode_info->fg_alpha);
+
+ bgcolor = grub_video_fb_map_rgba (src->mode_info->bg_red,
+ src->mode_info->bg_green,
+ src->mode_info->bg_blue,
+ src->mode_info->bg_alpha);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ grub_uint32_t color;
+ grub_uint8_t a;
+ if (*srcptr & srcmask)
+ {
+ color = fgcolor;
+ a = src->mode_info->fg_alpha;
+ }
+ else
+ {
+ color = bgcolor;
+ a = src->mode_info->bg_alpha;
+ }
+
+ if (a == 255)
+ *(grub_uint16_t *) dstptr = color;
+ else if (a != 0)
+ {
+ grub_uint8_t s1 = (color >> 0) & 0x1F;
+ grub_uint8_t s2 = (color >> 5) & 0x3F;
+ grub_uint8_t s3 = (color >> 11) & 0x1F;
+
+ grub_uint8_t d1 = (*(grub_uint16_t *) dstptr >> 0) & 0x1F;
+ grub_uint8_t d2 = (*(grub_uint16_t *) dstptr >> 5) & 0x3F;
+ grub_uint8_t d3 = (*(grub_uint16_t *) dstptr >> 11) & 0x1F;
+
+ d1 = (d1 * (255 - a) + s1 * a) / 255;
+ d2 = (d2 * (255 - a) + s2 * a) / 255;
+ d3 = (d3 * (255 - a) + s3 * a) / 255;
+
+ *(grub_uint16_t *) dstptr = (d1 & 0x1f) | ((d2 & 0x3f) << 5)
+ | ((d3 & 0x1f) << 11);
+ }
+
+ srcmask >>= 1;
+ if (!srcmask)
+ {
+ srcptr++;
+ srcmask = 0x80;
+ }
+
+ dstptr += 2;
+ }
+
+ srcptr += srcrowskipbyte;
+ if (srcmask >> srcrowskipbit)
+ srcmask >>= srcrowskipbit;
+ else
+ {
+ srcptr++;
+ srcmask <<= 8 - srcrowskipbit;
+ }
+ dstptr += dstrowskip;
+ }
+}
diff --git a/grub-core/video/fb/fbfill.c b/grub-core/video/fb/fbfill.c
new file mode 100644
index 0000000..a4ca7c2
--- /dev/null
+++ b/grub-core/video/fb/fbfill.c
@@ -0,0 +1,177 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* SPECIAL NOTES!
+
+ Please note following when reading the code below:
+
+ - In this driver we assume that every memory can be accessed by same memory
+ bus. If there are different address spaces do not use this code as a base
+ code for other archs.
+
+ - Every function in this code assumes that bounds checking has been done in
+ previous phase and they are opted out in here. */
+
+#include <grub/video_fb.h>
+#include <grub/fbfill.h>
+#include <grub/fbutil.h>
+#include <grub/types.h>
+#include <grub/video.h>
+
+/* Generic filler that works for every supported mode. */
+void
+grub_video_fbfill (struct grub_video_fbblit_info *dst,
+ grub_video_color_t color, int x, int y,
+ int width, int height)
+{
+ int i;
+ int j;
+
+ for (j = 0; j < height; j++)
+ for (i = 0; i < width; i++)
+ set_pixel (dst, x + i, y + j, color);
+}
+
+/* Optimized filler for direct color 32 bit modes. It is assumed that color
+ is already mapped to destination format. */
+void
+grub_video_fbfill_direct32 (struct grub_video_fbblit_info *dst,
+ grub_video_color_t color, int x, int y,
+ int width, int height)
+{
+ int i;
+ int j;
+ grub_uint32_t *dstptr;
+ grub_size_t rowskip;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ rowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ /* Get the start address. */
+ dstptr = (grub_uint32_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ *dstptr++ = color;
+
+ /* Advance the dest pointer to the right location on the next line. */
+ dstptr = (grub_uint32_t *) (((char *) dstptr) + rowskip);
+ }
+}
+
+/* Optimized filler for direct color 24 bit modes. It is assumed that color
+ is already mapped to destination format. */
+void
+grub_video_fbfill_direct24 (struct grub_video_fbblit_info *dst,
+ grub_video_color_t color, int x, int y,
+ int width, int height)
+{
+ int i;
+ int j;
+ grub_size_t rowskip;
+ grub_uint8_t *dstptr;
+ grub_uint8_t fill0 = (grub_uint8_t)((color >> 0) & 0xFF);
+ grub_uint8_t fill1 = (grub_uint8_t)((color >> 8) & 0xFF);
+ grub_uint8_t fill2 = (grub_uint8_t)((color >> 16) & 0xFF);
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ rowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ /* Get the start address. */
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ *dstptr++ = fill0;
+ *dstptr++ = fill1;
+ *dstptr++ = fill2;
+ }
+
+ /* Advance the dest pointer to the right location on the next line. */
+ dstptr += rowskip;
+ }
+}
+
+/* Optimized filler for direct color 16 bit modes. It is assumed that color
+ is already mapped to destination format. */
+void
+grub_video_fbfill_direct16 (struct grub_video_fbblit_info *dst,
+ grub_video_color_t color, int x, int y,
+ int width, int height)
+{
+ int i;
+ int j;
+ grub_size_t rowskip;
+ grub_uint8_t *dstptr;
+ grub_uint8_t fill0 = (grub_uint8_t)((color >> 0) & 0xFF);
+ grub_uint8_t fill1 = (grub_uint8_t)((color >> 8) & 0xFF);
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ rowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ /* Get the start address. */
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+ *dstptr++ = fill0;
+ *dstptr++ = fill1;
+ }
+
+ /* Advance the dest pointer to the right location on the next line. */
+ dstptr += rowskip;
+ }
+}
+
+/* Optimized filler for index color. It is assumed that color
+ is already mapped to destination format. */
+void
+grub_video_fbfill_direct8 (struct grub_video_fbblit_info *dst,
+ grub_video_color_t color, int x, int y,
+ int width, int height)
+{
+ int i;
+ int j;
+ grub_size_t rowskip;
+ grub_uint8_t *dstptr;
+ grub_uint8_t fill = (grub_uint8_t)color & 0xFF;
+
+ /* Calculate the number of bytes to advance from the end of one line
+ to the beginning of the next line. */
+ rowskip = dst->mode_info->pitch - dst->mode_info->bytes_per_pixel * width;
+
+ /* Get the start address. */
+ dstptr = (grub_uint8_t *) grub_video_fb_get_video_ptr (dst, x, y);
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ *dstptr++ = fill;
+
+ /* Advance the dest pointer to the right location on the next line. */
+ dstptr += rowskip;
+ }
+}
diff --git a/grub-core/video/fb/fbutil.c b/grub-core/video/fb/fbutil.c
new file mode 100644
index 0000000..511beaa
--- /dev/null
+++ b/grub-core/video/fb/fbutil.c
@@ -0,0 +1,178 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* SPECIAL NOTES!
+
+ Please note following when reading the code below:
+
+ - In this driver we assume that every memory can be accessed by same memory
+ bus. If there are different address spaces do not use this code as a base
+ code for other archs.
+
+ - Every function in this code assumes that bounds checking has been done in
+ previous phase and they are opted out in here. */
+
+#include <grub/fbutil.h>
+#include <grub/types.h>
+#include <grub/video.h>
+
+grub_uint8_t *
+grub_video_fb_get_video_ptr (struct grub_video_fbblit_info *source,
+ unsigned int x, unsigned int y)
+{
+ grub_uint8_t *ptr = 0;
+
+ switch (source->mode_info->bpp)
+ {
+ case 32:
+ ptr = source->data + y * source->mode_info->pitch + x * 4;
+ break;
+
+ case 24:
+ ptr = source->data + y * source->mode_info->pitch + x * 3;
+ break;
+
+ case 16:
+ case 15:
+ ptr = source->data + y * source->mode_info->pitch + x * 2;
+ break;
+
+ case 8:
+ ptr = source->data + y * source->mode_info->pitch + x;
+ break;
+
+ case 1:
+ /* For 1-bit bitmaps, addressing needs to be done at the bit level
+ and it doesn't make sense, in general, to ask for a pointer
+ to a particular pixel's data. */
+ break;
+ }
+
+ return ptr;
+}
+
+grub_video_color_t
+get_pixel (struct grub_video_fbblit_info *source,
+ unsigned int x, unsigned int y)
+{
+ grub_video_color_t color = 0;
+
+ switch (source->mode_info->bpp)
+ {
+ case 32:
+ color = *(grub_uint32_t *)grub_video_fb_get_video_ptr (source, x, y);
+ break;
+
+ case 24:
+ {
+ grub_uint8_t *ptr;
+ ptr = grub_video_fb_get_video_ptr (source, x, y);
+ color = ptr[0] | (ptr[1] << 8) | (ptr[2] << 16);
+ }
+ break;
+
+ case 16:
+ case 15:
+ color = *(grub_uint16_t *)grub_video_fb_get_video_ptr (source, x, y);
+ break;
+
+ case 8:
+ color = *(grub_uint8_t *)grub_video_fb_get_video_ptr (source, x, y);
+ break;
+
+ case 1:
+ if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED)
+ {
+ int bit_index = y * source->mode_info->width + x;
+ grub_uint8_t *ptr = source->data + bit_index / 8;
+ int bit_pos = 7 - bit_index % 8;
+ color = (*ptr >> bit_pos) & 0x01;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return color;
+}
+
+void
+set_pixel (struct grub_video_fbblit_info *source,
+ unsigned int x, unsigned int y, grub_video_color_t color)
+{
+ switch (source->mode_info->bpp)
+ {
+ case 32:
+ {
+ grub_uint32_t *ptr;
+
+ ptr = (grub_uint32_t *)grub_video_fb_get_video_ptr (source, x, y);
+
+ *ptr = color;
+ }
+ break;
+
+ case 24:
+ {
+ grub_uint8_t *ptr;
+ grub_uint8_t *colorptr = (grub_uint8_t *)&color;
+
+ ptr = grub_video_fb_get_video_ptr (source, x, y);
+
+ ptr[0] = colorptr[0];
+ ptr[1] = colorptr[1];
+ ptr[2] = colorptr[2];
+ }
+ break;
+
+ case 16:
+ case 15:
+ {
+ grub_uint16_t *ptr;
+
+ ptr = (grub_uint16_t *)grub_video_fb_get_video_ptr (source, x, y);
+
+ *ptr = (grub_uint16_t) (color & 0xFFFF);
+ }
+ break;
+
+ case 8:
+ {
+ grub_uint8_t *ptr;
+
+ ptr = (grub_uint8_t *)grub_video_fb_get_video_ptr (source, x, y);
+
+ *ptr = (grub_uint8_t) (color & 0xFF);
+ }
+ break;
+
+ case 1:
+ if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED)
+ {
+ int bit_index = y * source->mode_info->width + x;
+ grub_uint8_t *ptr = source->data + bit_index / 8;
+ int bit_pos = 7 - bit_index % 8;
+ *ptr = (*ptr & ~(1 << bit_pos)) | ((color & 0x01) << bit_pos);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
diff --git a/grub-core/video/fb/video_fb.c b/grub-core/video/fb/video_fb.c
new file mode 100644
index 0000000..2cffcb3
--- /dev/null
+++ b/grub-core/video/fb/video_fb.c
@@ -0,0 +1,1533 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/fbblit.h>
+#include <grub/fbfill.h>
+#include <grub/fbutil.h>
+#include <grub/bitmap.h>
+#include <grub/dl.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static struct
+{
+ struct grub_video_fbrender_target *render_target;
+ struct grub_video_fbrender_target *front_target;
+ struct grub_video_fbrender_target *back_target;
+ struct grub_video_palette_data *palette;
+ unsigned int palette_size;
+ /* For page flipping strategy. */
+ int displayed_page; /* The page # that is the front buffer. */
+ int render_page; /* The page # that is the back buffer. */
+ grub_video_fb_set_page_t set_page;
+ char *offscreen_buffer;
+ grub_video_fb_doublebuf_update_screen_t update_screen;
+} framebuffer;
+
+/* Specify "standard" VGA palette, some video cards may
+ need this and this will also be used when using RGB modes. */
+struct grub_video_palette_data grub_video_fbstd_colors[GRUB_VIDEO_FBSTD_NUMCOLORS] =
+ {
+ // {R, G, B, A}
+ {0x00, 0x00, 0x00, 0xFF}, // 0 = black
+ {0x00, 0x00, 0xA8, 0xFF}, // 1 = blue
+ {0x00, 0xA8, 0x00, 0xFF}, // 2 = green
+ {0x00, 0xA8, 0xA8, 0xFF}, // 3 = cyan
+ {0xA8, 0x00, 0x00, 0xFF}, // 4 = red
+ {0xA8, 0x00, 0xA8, 0xFF}, // 5 = magenta
+ {0xA8, 0x54, 0x00, 0xFF}, // 6 = brown
+ {0xA8, 0xA8, 0xA8, 0xFF}, // 7 = light gray
+
+ {0x54, 0x54, 0x54, 0xFF}, // 8 = dark gray
+ {0x54, 0x54, 0xFE, 0xFF}, // 9 = bright blue
+ {0x54, 0xFE, 0x54, 0xFF}, // 10 = bright green
+ {0x54, 0xFE, 0xFE, 0xFF}, // 11 = bright cyan
+ {0xFE, 0x54, 0x54, 0xFF}, // 12 = bright red
+ {0xFE, 0x54, 0xFE, 0xFF}, // 13 = bright magenta
+ {0xFE, 0xFE, 0x54, 0xFF}, // 14 = yellow
+ {0xFE, 0xFE, 0xFE, 0xFF} // 15 = white
+ };
+
+grub_err_t
+grub_video_fb_init (void)
+{
+ grub_free (framebuffer.palette);
+ framebuffer.render_target = 0;
+ framebuffer.front_target = 0;
+ framebuffer.back_target = 0;
+ framebuffer.palette = 0;
+ framebuffer.palette_size = 0;
+ framebuffer.set_page = 0;
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_fini (void)
+{
+ /* TODO: destroy render targets. */
+
+ grub_free (framebuffer.offscreen_buffer);
+ grub_free (framebuffer.palette);
+ framebuffer.render_target = 0;
+ framebuffer.front_target = 0;
+ framebuffer.back_target = 0;
+ framebuffer.palette = 0;
+ framebuffer.palette_size = 0;
+ framebuffer.set_page = 0;
+ framebuffer.offscreen_buffer = 0;
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_get_info (struct grub_video_mode_info *mode_info)
+{
+ /* Copy mode info from active render target. */
+ grub_memcpy (mode_info, &framebuffer.render_target->mode_info,
+ sizeof (struct grub_video_mode_info));
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_get_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ unsigned int i;
+
+ /* Assume that we know everything from index color palette. */
+ for (i = 0; (i < count) && ((i + start) < framebuffer.palette_size); i++)
+ palette_data[i] = framebuffer.palette[start + i];
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ unsigned i;
+ if (start + count > framebuffer.palette_size)
+ {
+ framebuffer.palette_size = start + count;
+ framebuffer.palette = grub_realloc (framebuffer.palette,
+ sizeof (framebuffer.palette[0])
+ * framebuffer.palette_size);
+ if (!framebuffer.palette)
+ {
+ grub_video_fb_fini ();
+ return grub_errno;
+ }
+ }
+ for (i = 0; (i < count) && ((i + start) < framebuffer.palette_size); i++)
+ framebuffer.palette[start + i] = palette_data[i];
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_set_viewport (unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height)
+{
+ /* Make sure viewport is withing screen dimensions. If viewport was set
+ to be out of the region, mark its size as zero. */
+ if (x > framebuffer.render_target->mode_info.width)
+ {
+ x = 0;
+ width = 0;
+ }
+
+ if (y > framebuffer.render_target->mode_info.height)
+ {
+ y = 0;
+ height = 0;
+ }
+
+ if (x + width > framebuffer.render_target->mode_info.width)
+ width = framebuffer.render_target->mode_info.width - x;
+
+ if (y + height > framebuffer.render_target->mode_info.height)
+ height = framebuffer.render_target->mode_info.height - y;
+
+ framebuffer.render_target->viewport.x = x;
+ framebuffer.render_target->viewport.y = y;
+ framebuffer.render_target->viewport.width = width;
+ framebuffer.render_target->viewport.height = height;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_get_viewport (unsigned int *x, unsigned int *y,
+ unsigned int *width, unsigned int *height)
+{
+ if (x) *x = framebuffer.render_target->viewport.x;
+ if (y) *y = framebuffer.render_target->viewport.y;
+ if (width) *width = framebuffer.render_target->viewport.width;
+ if (height) *height = framebuffer.render_target->viewport.height;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Maps color name to target optimized color format. */
+grub_video_color_t
+grub_video_fb_map_color (grub_uint32_t color_name)
+{
+ /* TODO: implement color theme mapping code. */
+
+ if (color_name < framebuffer.palette_size)
+ {
+ if ((framebuffer.render_target->mode_info.mode_type
+ & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR) != 0)
+ return color_name;
+ else
+ {
+ grub_video_color_t color;
+
+ color = grub_video_fb_map_rgb (framebuffer.palette[color_name].r,
+ framebuffer.palette[color_name].g,
+ framebuffer.palette[color_name].b);
+
+ return color;
+ }
+ }
+
+ return 0;
+}
+
+/* Maps RGB to target optimized color format. */
+grub_video_color_t
+grub_video_fb_map_rgb (grub_uint8_t red, grub_uint8_t green,
+ grub_uint8_t blue)
+{
+ if ((framebuffer.render_target->mode_info.mode_type
+ & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR) != 0)
+ {
+ int minindex = 0;
+ int delta = 0;
+ int tmp;
+ int val;
+ unsigned i;
+
+ /* Find best matching color. */
+ for (i = 0; i < framebuffer.palette_size; i++)
+ {
+ val = framebuffer.palette[i].r - red;
+ tmp = val * val;
+ val = framebuffer.palette[i].g - green;
+ tmp += val * val;
+ val = framebuffer.palette[i].b - blue;
+ tmp += val * val;
+
+ if (i == 0)
+ delta = tmp;
+
+ if (tmp < delta)
+ {
+ delta = tmp;
+ minindex = i;
+ if (tmp == 0)
+ break;
+ }
+ }
+
+ return minindex;
+ }
+ else if ((framebuffer.render_target->mode_info.mode_type
+ & GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP) != 0)
+ {
+ if (red == framebuffer.render_target->mode_info.fg_red
+ && green == framebuffer.render_target->mode_info.fg_green
+ && blue == framebuffer.render_target->mode_info.fg_blue)
+ return 1;
+ else
+ return 0;
+ }
+ else
+ {
+ grub_uint32_t value;
+ grub_uint8_t alpha = 255; /* Opaque color. */
+
+ red >>= 8 - framebuffer.render_target->mode_info.red_mask_size;
+ green >>= 8 - framebuffer.render_target->mode_info.green_mask_size;
+ blue >>= 8 - framebuffer.render_target->mode_info.blue_mask_size;
+ alpha >>= 8 - framebuffer.render_target->mode_info.reserved_mask_size;
+
+ value = red << framebuffer.render_target->mode_info.red_field_pos;
+ value |= green << framebuffer.render_target->mode_info.green_field_pos;
+ value |= blue << framebuffer.render_target->mode_info.blue_field_pos;
+ value |= alpha << framebuffer.render_target->mode_info.reserved_field_pos;
+
+ return value;
+ }
+
+}
+
+/* Maps RGBA to target optimized color format. */
+grub_video_color_t
+grub_video_fb_map_rgba (grub_uint8_t red, grub_uint8_t green,
+ grub_uint8_t blue, grub_uint8_t alpha)
+{
+ if ((framebuffer.render_target->mode_info.mode_type
+ & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR) != 0)
+ /* No alpha available in index color modes, just use
+ same value as in only RGB modes. */
+ return grub_video_fb_map_rgb (red, green, blue);
+ else if ((framebuffer.render_target->mode_info.mode_type
+ & GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP) != 0)
+ {
+ if (red == framebuffer.render_target->mode_info.fg_red
+ && green == framebuffer.render_target->mode_info.fg_green
+ && blue == framebuffer.render_target->mode_info.fg_blue
+ && alpha == framebuffer.render_target->mode_info.fg_alpha)
+ return 1;
+ else
+ return 0;
+ }
+ else
+ {
+ grub_uint32_t value;
+
+ red >>= 8 - framebuffer.render_target->mode_info.red_mask_size;
+ green >>= 8 - framebuffer.render_target->mode_info.green_mask_size;
+ blue >>= 8 - framebuffer.render_target->mode_info.blue_mask_size;
+ alpha >>= 8 - framebuffer.render_target->mode_info.reserved_mask_size;
+
+ value = red << framebuffer.render_target->mode_info.red_field_pos;
+ value |= green << framebuffer.render_target->mode_info.green_field_pos;
+ value |= blue << framebuffer.render_target->mode_info.blue_field_pos;
+ value |= alpha << framebuffer.render_target->mode_info.reserved_field_pos;
+
+ return value;
+ }
+}
+
+/* Splits target optimized format to components. */
+grub_err_t
+grub_video_fb_unmap_color (grub_video_color_t color,
+ grub_uint8_t *red, grub_uint8_t *green,
+ grub_uint8_t *blue, grub_uint8_t *alpha)
+{
+ struct grub_video_fbblit_info target_info;
+
+ target_info.mode_info = &framebuffer.render_target->mode_info;
+ target_info.data = framebuffer.render_target->data;
+
+ grub_video_fb_unmap_color_int (&target_info, color, red, green, blue, alpha);
+
+ return GRUB_ERR_NONE;
+}
+
+/* Splits color in source format to components. */
+void
+grub_video_fb_unmap_color_int (struct grub_video_fbblit_info * source,
+ grub_video_color_t color,
+ grub_uint8_t *red, grub_uint8_t *green,
+ grub_uint8_t *blue, grub_uint8_t *alpha)
+{
+ struct grub_video_mode_info *mode_info;
+ mode_info = source->mode_info;
+
+ if ((mode_info->mode_type
+ & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR) != 0)
+ {
+ /* If we have an out-of-bounds color, return transparent black. */
+ if (color > 255)
+ {
+ *red = 0;
+ *green = 0;
+ *blue = 0;
+ *alpha = 0;
+ return;
+ }
+
+ *red = framebuffer.palette[color].r;
+ *green = framebuffer.palette[color].g;
+ *blue = framebuffer.palette[color].b;
+ *alpha = framebuffer.palette[color].a;
+ return;
+ }
+ else if ((mode_info->mode_type
+ & GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP) != 0)
+ {
+ if (color & 1)
+ {
+ *red = mode_info->fg_red;
+ *green = mode_info->fg_green;
+ *blue = mode_info->fg_blue;
+ *alpha = mode_info->fg_alpha;
+ }
+ else
+ {
+ *red = mode_info->bg_red;
+ *green = mode_info->bg_green;
+ *blue = mode_info->bg_blue;
+ *alpha = mode_info->bg_alpha;
+ }
+ }
+ else
+ {
+ grub_uint32_t tmp;
+
+ /* Get red component. */
+ tmp = color >> mode_info->red_field_pos;
+ tmp &= (1 << mode_info->red_mask_size) - 1;
+ tmp <<= 8 - mode_info->red_mask_size;
+ tmp |= (1 << (8 - mode_info->red_mask_size)) - 1;
+ *red = tmp & 0xFF;
+
+ /* Get green component. */
+ tmp = color >> mode_info->green_field_pos;
+ tmp &= (1 << mode_info->green_mask_size) - 1;
+ tmp <<= 8 - mode_info->green_mask_size;
+ tmp |= (1 << (8 - mode_info->green_mask_size)) - 1;
+ *green = tmp & 0xFF;
+
+ /* Get blue component. */
+ tmp = color >> mode_info->blue_field_pos;
+ tmp &= (1 << mode_info->blue_mask_size) - 1;
+ tmp <<= 8 - mode_info->blue_mask_size;
+ tmp |= (1 << (8 - mode_info->blue_mask_size)) - 1;
+ *blue = tmp & 0xFF;
+
+ /* Get alpha component. */
+ if (source->mode_info->reserved_mask_size > 0)
+ {
+ tmp = color >> mode_info->reserved_field_pos;
+ tmp &= (1 << mode_info->reserved_mask_size) - 1;
+ tmp <<= 8 - mode_info->reserved_mask_size;
+ tmp |= (1 << (8 - mode_info->reserved_mask_size)) - 1;
+ }
+ else
+ /* If there is no alpha component, assume it opaque. */
+ tmp = 255;
+
+ *alpha = tmp & 0xFF;
+ }
+}
+
+grub_err_t
+grub_video_fb_fill_rect (grub_video_color_t color, int x, int y,
+ unsigned int width, unsigned int height)
+{
+ struct grub_video_fbblit_info target;
+
+ /* Make sure there is something to do. */
+ if ((x >= (int)framebuffer.render_target->viewport.width) || (x + (int)width < 0))
+ return GRUB_ERR_NONE;
+ if ((y >= (int)framebuffer.render_target->viewport.height) || (y + (int)height < 0))
+ return GRUB_ERR_NONE;
+
+ /* Do not allow drawing out of viewport. */
+ if (x < 0)
+ {
+ width += x;
+ x = 0;
+ }
+ if (y < 0)
+ {
+ height += y;
+ y = 0;
+ }
+
+ if ((x + width) > framebuffer.render_target->viewport.width)
+ width = framebuffer.render_target->viewport.width - x;
+ if ((y + height) > framebuffer.render_target->viewport.height)
+ height = framebuffer.render_target->viewport.height - y;
+
+ /* Add viewport offset. */
+ x += framebuffer.render_target->viewport.x;
+ y += framebuffer.render_target->viewport.y;
+
+ /* Use fbblit_info to encapsulate rendering. */
+ target.mode_info = &framebuffer.render_target->mode_info;
+ target.data = framebuffer.render_target->data;
+
+ /* Try to figure out more optimized version. Note that color is already
+ mapped to target format so we can make assumptions based on that. */
+ if (target.mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888)
+ {
+ grub_video_fbfill_direct32 (&target, color, x, y,
+ width, height);
+ return GRUB_ERR_NONE;
+ }
+ else if (target.mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ grub_video_fbfill_direct32 (&target, color, x, y,
+ width, height);
+ return GRUB_ERR_NONE;
+ }
+ else if (target.mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ grub_video_fbfill_direct24 (&target, color, x, y,
+ width, height);
+ return GRUB_ERR_NONE;
+ }
+ else if (target.mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_565)
+ {
+ grub_video_fbfill_direct16 (&target, color, x, y,
+ width, height);
+ return GRUB_ERR_NONE;
+ }
+ else if (target.mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGR_565)
+ {
+ grub_video_fbfill_direct16 (&target, color, x, y,
+ width, height);
+ return GRUB_ERR_NONE;
+ }
+ else if (target.mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR)
+ {
+ grub_video_fbfill_direct8 (&target, color, x, y,
+ width, height);
+ return GRUB_ERR_NONE;
+ }
+
+ /* No optimized version found, use default (slow) filler. */
+ grub_video_fbfill (&target, color, x, y, width, height);
+
+ return GRUB_ERR_NONE;
+}
+
+/* NOTE: This function assumes that given coordinates are within bounds of
+ handled data. */
+static void
+common_blitter (struct grub_video_fbblit_info *target,
+ struct grub_video_fbblit_info *source,
+ enum grub_video_blit_operators oper, int x, int y,
+ unsigned int width, unsigned int height,
+ int offset_x, int offset_y)
+{
+ if (oper == GRUB_VIDEO_BLIT_REPLACE)
+ {
+ /* Try to figure out more optimized version for replace operator. */
+ if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ grub_video_fbblit_replace_directN (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888)
+ {
+ grub_video_fbblit_replace_BGRX8888_RGBX8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGR_888)
+ {
+ grub_video_fbblit_replace_BGR888_RGBX8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ grub_video_fbblit_replace_RGB888_RGBX8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR)
+ {
+ grub_video_fbblit_replace_index_RGBX8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ }
+ else if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888)
+ {
+ grub_video_fbblit_replace_BGRX8888_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ grub_video_fbblit_replace_RGBX8888_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGR_888)
+ {
+ grub_video_fbblit_replace_BGR888_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ grub_video_fbblit_replace_directN (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR)
+ {
+ grub_video_fbblit_replace_index_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ }
+ else if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888)
+ {
+ if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888)
+ {
+ grub_video_fbblit_replace_directN (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ }
+ else if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR)
+ {
+ if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR)
+ {
+ grub_video_fbblit_replace_directN (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ }
+ else if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED)
+ {
+ if (target->mode_info->bpp == 32)
+ {
+ grub_video_fbblit_replace_32bit_1bit (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->bpp == 24)
+ {
+ grub_video_fbblit_replace_24bit_1bit (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->bpp == 16)
+ {
+ grub_video_fbblit_replace_16bit_1bit (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->bpp == 8)
+ {
+ grub_video_fbblit_replace_8bit_1bit (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ }
+
+ /* No optimized replace operator found, use default (slow) blitter. */
+ grub_video_fbblit_replace (target, source, x, y, width, height,
+ offset_x, offset_y);
+ }
+ else
+ {
+ /* Try to figure out more optimized blend operator. */
+ if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888)
+ {
+ grub_video_fbblit_blend_BGRA8888_RGBA8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ grub_video_fbblit_blend_RGBA8888_RGBA8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGR_888)
+ {
+ grub_video_fbblit_blend_BGR888_RGBA8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ grub_video_fbblit_blend_RGB888_RGBA8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR)
+ {
+ grub_video_fbblit_blend_index_RGBA8888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ }
+ else if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ /* Note: There is really no alpha information here, so blend is
+ changed to replace. */
+
+ if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888)
+ {
+ grub_video_fbblit_replace_BGRX8888_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ grub_video_fbblit_replace_RGBX8888_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_BGR_888)
+ {
+ grub_video_fbblit_replace_BGR888_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ grub_video_fbblit_replace_directN (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR)
+ {
+ grub_video_fbblit_replace_index_RGB888 (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ }
+ else if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED)
+ {
+ if (target->mode_info->blit_format
+ == GRUB_VIDEO_BLIT_FORMAT_BGRA_8888
+ || target->mode_info->blit_format
+ == GRUB_VIDEO_BLIT_FORMAT_RGBA_8888)
+ {
+ grub_video_fbblit_blend_XXXA8888_1bit (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format
+ == GRUB_VIDEO_BLIT_FORMAT_BGR_888
+ || target->mode_info->blit_format
+ == GRUB_VIDEO_BLIT_FORMAT_RGB_888)
+ {
+ grub_video_fbblit_blend_XXX888_1bit (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+ else if (target->mode_info->blit_format
+ == GRUB_VIDEO_BLIT_FORMAT_BGR_565
+ || target->mode_info->blit_format
+ == GRUB_VIDEO_BLIT_FORMAT_RGB_565)
+ {
+ grub_video_fbblit_blend_XXX565_1bit (target, source,
+ x, y, width, height,
+ offset_x, offset_y);
+ return;
+ }
+
+ }
+
+
+ /* No optimized blend operation found, use default (slow) blitter. */
+ grub_video_fbblit_blend (target, source, x, y, width, height,
+ offset_x, offset_y);
+ }
+}
+
+grub_err_t
+grub_video_fb_blit_bitmap (struct grub_video_bitmap *bitmap,
+ enum grub_video_blit_operators oper, int x, int y,
+ int offset_x, int offset_y,
+ unsigned int width, unsigned int height)
+{
+ struct grub_video_fbblit_info source;
+ struct grub_video_fbblit_info target;
+
+ /* Make sure there is something to do. */
+ if ((width == 0) || (height == 0))
+ return GRUB_ERR_NONE;
+ if ((x >= (int)framebuffer.render_target->viewport.width) || (x + (int)width < 0))
+ return GRUB_ERR_NONE;
+ if ((y >= (int)framebuffer.render_target->viewport.height) || (y + (int)height < 0))
+ return GRUB_ERR_NONE;
+ if ((x + (int)bitmap->mode_info.width) < 0)
+ return GRUB_ERR_NONE;
+ if ((y + (int)bitmap->mode_info.height) < 0)
+ return GRUB_ERR_NONE;
+ if ((offset_x >= (int)bitmap->mode_info.width)
+ || (offset_x + (int)width < 0))
+ return GRUB_ERR_NONE;
+ if ((offset_y >= (int)bitmap->mode_info.height)
+ || (offset_y + (int)height < 0))
+ return GRUB_ERR_NONE;
+
+ /* If we have negative coordinates, optimize drawing to minimum. */
+ if (offset_x < 0)
+ {
+ width += offset_x;
+ x -= offset_x;
+ offset_x = 0;
+ }
+
+ if (offset_y < 0)
+ {
+ height += offset_y;
+ y -= offset_y;
+ offset_y = 0;
+ }
+
+ if (x < 0)
+ {
+ width += x;
+ offset_x -= x;
+ x = 0;
+ }
+
+ if (y < 0)
+ {
+ height += y;
+ offset_y -= y;
+ y = 0;
+ }
+
+ /* Do not allow drawing out of viewport. */
+ if ((x + width) > framebuffer.render_target->viewport.width)
+ width = framebuffer.render_target->viewport.width - x;
+ if ((y + height) > framebuffer.render_target->viewport.height)
+ height = framebuffer.render_target->viewport.height - y;
+
+ if ((offset_x + width) > bitmap->mode_info.width)
+ width = bitmap->mode_info.width - offset_x;
+ if ((offset_y + height) > bitmap->mode_info.height)
+ height = bitmap->mode_info.height - offset_y;
+
+ /* Limit drawing to source render target dimensions. */
+ if (width > bitmap->mode_info.width)
+ width = bitmap->mode_info.width;
+
+ if (height > bitmap->mode_info.height)
+ height = bitmap->mode_info.height;
+
+ /* Add viewport offset. */
+ x += framebuffer.render_target->viewport.x;
+ y += framebuffer.render_target->viewport.y;
+
+ /* Use fbblit_info to encapsulate rendering. */
+ source.mode_info = &bitmap->mode_info;
+ source.data = bitmap->data;
+ target.mode_info = &framebuffer.render_target->mode_info;
+ target.data = framebuffer.render_target->data;
+
+ /* Do actual blitting. */
+ common_blitter (&target, &source, oper, x, y, width, height,
+ offset_x, offset_y);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_blit_render_target (struct grub_video_fbrender_target *source,
+ enum grub_video_blit_operators oper,
+ int x, int y, int offset_x, int offset_y,
+ unsigned int width, unsigned int height)
+{
+ struct grub_video_fbblit_info source_info;
+ struct grub_video_fbblit_info target_info;
+
+ /* Make sure there is something to do. */
+ if ((width == 0) || (height == 0))
+ return GRUB_ERR_NONE;
+ if ((x >= (int)framebuffer.render_target->viewport.width) || (x + (int)width < 0))
+ return GRUB_ERR_NONE;
+ if ((y >= (int)framebuffer.render_target->viewport.height) || (y + (int)height < 0))
+ return GRUB_ERR_NONE;
+ if ((x + (int)source->mode_info.width) < 0)
+ return GRUB_ERR_NONE;
+ if ((y + (int)source->mode_info.height) < 0)
+ return GRUB_ERR_NONE;
+ if ((offset_x >= (int)source->mode_info.width)
+ || (offset_x + (int)width < 0))
+ return GRUB_ERR_NONE;
+ if ((offset_y >= (int)source->mode_info.height)
+ || (offset_y + (int)height < 0))
+ return GRUB_ERR_NONE;
+
+ /* If we have negative coordinates, optimize drawing to minimum. */
+ if (offset_x < 0)
+ {
+ width += offset_x;
+ x -= offset_x;
+ offset_x = 0;
+ }
+
+ if (offset_y < 0)
+ {
+ height += offset_y;
+ y -= offset_y;
+ offset_y = 0;
+ }
+
+ if (x < 0)
+ {
+ width += x;
+ offset_x -= x;
+ x = 0;
+ }
+
+ if (y < 0)
+ {
+ height += y;
+ offset_y -= y;
+ y = 0;
+ }
+
+ /* Do not allow drawing out of viewport. */
+ if ((x + width) > framebuffer.render_target->viewport.width)
+ width = framebuffer.render_target->viewport.width - x;
+ if ((y + height) > framebuffer.render_target->viewport.height)
+ height = framebuffer.render_target->viewport.height - y;
+
+ if ((offset_x + width) > source->mode_info.width)
+ width = source->mode_info.width - offset_x;
+ if ((offset_y + height) > source->mode_info.height)
+ height = source->mode_info.height - offset_y;
+
+ /* Limit drawing to source render target dimensions. */
+ if (width > source->mode_info.width)
+ width = source->mode_info.width;
+
+ if (height > source->mode_info.height)
+ height = source->mode_info.height;
+
+ /* Add viewport offset. */
+ x += framebuffer.render_target->viewport.x;
+ y += framebuffer.render_target->viewport.y;
+
+ /* Use fbblit_info to encapsulate rendering. */
+ source_info.mode_info = &source->mode_info;
+ source_info.data = source->data;
+ target_info.mode_info = &framebuffer.render_target->mode_info;
+ target_info.data = framebuffer.render_target->data;
+
+ /* Do actual blitting. */
+ common_blitter (&target_info, &source_info, oper, x, y, width, height,
+ offset_x, offset_y);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_scroll (grub_video_color_t color, int dx, int dy)
+{
+ int width;
+ int height;
+ int src_x;
+ int src_y;
+ int dst_x;
+ int dst_y;
+
+ /* 1. Check if we have something to do. */
+ if ((dx == 0) && (dy == 0))
+ return GRUB_ERR_NONE;
+
+ width = framebuffer.render_target->viewport.width - grub_abs (dx);
+ height = framebuffer.render_target->viewport.height - grub_abs (dy);
+
+ if (dx < 0)
+ {
+ src_x = framebuffer.render_target->viewport.x - dx;
+ dst_x = framebuffer.render_target->viewport.x;
+ }
+ else
+ {
+ src_x = framebuffer.render_target->viewport.x;
+ dst_x = framebuffer.render_target->viewport.x + dx;
+ }
+
+ if (dy < 0)
+ {
+ src_y = framebuffer.render_target->viewport.y - dy;
+ dst_y = framebuffer.render_target->viewport.y;
+ }
+ else
+ {
+ src_y = framebuffer.render_target->viewport.y;
+ dst_y = framebuffer.render_target->viewport.y + dy;
+ }
+
+ /* 2. Check if there is need to copy data. */
+ if ((grub_abs (dx) < framebuffer.render_target->viewport.width)
+ && (grub_abs (dy) < framebuffer.render_target->viewport.height))
+ {
+ /* 3. Move data in render target. */
+ struct grub_video_fbblit_info target;
+ int i, j;
+ int linedelta, linelen;
+
+ target.mode_info = &framebuffer.render_target->mode_info;
+ target.data = framebuffer.render_target->data;
+
+ linedelta = target.mode_info->pitch
+ - width * target.mode_info->bytes_per_pixel;
+ linelen = width * target.mode_info->bytes_per_pixel;
+#define DO_SCROLL \
+ /* Check vertical direction of the move. */ \
+ if (dy < 0 || (dy == 0 && dx < 0)) \
+ { \
+ dst = (void *) grub_video_fb_get_video_ptr (&target, \
+ dst_x, dst_y); \
+ src = (void *) grub_video_fb_get_video_ptr (&target, \
+ src_x, src_y); \
+ /* 3a. Move data upwards. */ \
+ for (j = 0; j < height; j++) \
+ { \
+ for (i = 0; i < linelen; i++) \
+ *(dst++) = *(src++); \
+ dst += linedelta; \
+ src += linedelta; \
+ } \
+ } \
+ else \
+ { \
+ /* 3b. Move data downwards. */ \
+ dst = (void *) grub_video_fb_get_video_ptr (&target, \
+ dst_x + width, \
+ dst_y + height - 1); \
+ src = (void *) grub_video_fb_get_video_ptr (&target, \
+ src_x + width, \
+ src_y + height - 1); \
+ dst--; \
+ src--; \
+ for (j = 0; j < height; j++) \
+ { \
+ for (i = 0; i < linelen; i++) \
+ *(dst--) = *(src--); \
+ dst -= linedelta; \
+ src -= linedelta; \
+ } \
+ }
+
+ /* If everything is aligned on 32-bit use 32-bit copy. */
+ if ((grub_addr_t) grub_video_fb_get_video_ptr (&target, src_x, src_y)
+ % sizeof (grub_uint32_t) == 0
+ && (grub_addr_t) grub_video_fb_get_video_ptr (&target, dst_x, dst_y)
+ % sizeof (grub_uint32_t) == 0
+ && linelen % sizeof (grub_uint32_t) == 0
+ && linedelta % sizeof (grub_uint32_t) == 0)
+ {
+ grub_uint32_t *src, *dst;
+ linelen /= sizeof (grub_uint32_t);
+ linedelta /= sizeof (grub_uint32_t);
+ DO_SCROLL
+ }
+ /* If everything is aligned on 16-bit use 16-bit copy. */
+ else if ((grub_addr_t) grub_video_fb_get_video_ptr (&target, src_x, src_y)
+ % sizeof (grub_uint16_t) == 0
+ && (grub_addr_t) grub_video_fb_get_video_ptr (&target,
+ dst_x, dst_y)
+ % sizeof (grub_uint16_t) == 0
+ && linelen % sizeof (grub_uint16_t) == 0
+ && linedelta % sizeof (grub_uint16_t) == 0)
+ {
+ grub_uint16_t *src, *dst;
+ linelen /= sizeof (grub_uint16_t);
+ linedelta /= sizeof (grub_uint16_t);
+ DO_SCROLL
+ }
+ /* If not aligned at all use 8-bit copy. */
+ else
+ {
+ grub_uint8_t *src, *dst;
+ DO_SCROLL
+ }
+ }
+
+ /* 4. Fill empty space with specified color. In this implementation
+ there might be colliding areas but at the moment there is no need
+ to optimize this. */
+
+ /* 4a. Fill top & bottom parts. */
+ if (dy > 0)
+ grub_video_fb_fill_rect (color, 0, 0, framebuffer.render_target->viewport.width, dy);
+ else if (dy < 0)
+ {
+ if (framebuffer.render_target->viewport.height < grub_abs (dy))
+ dy = -framebuffer.render_target->viewport.height;
+
+ grub_video_fb_fill_rect (color, 0, framebuffer.render_target->viewport.height + dy,
+ framebuffer.render_target->viewport.width, -dy);
+ }
+
+ /* 4b. Fill left & right parts. */
+ if (dx > 0)
+ grub_video_fb_fill_rect (color, 0, 0,
+ dx, framebuffer.render_target->viewport.height);
+ else if (dx < 0)
+ {
+ if (framebuffer.render_target->viewport.width < grub_abs (dx))
+ dx = -framebuffer.render_target->viewport.width;
+
+ grub_video_fb_fill_rect (color, framebuffer.render_target->viewport.width + dx, 0,
+ -dx, framebuffer.render_target->viewport.height);
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+
+grub_err_t
+grub_video_fb_create_render_target (struct grub_video_fbrender_target **result,
+ unsigned int width, unsigned int height,
+ unsigned int mode_type __attribute__ ((unused)))
+{
+ struct grub_video_fbrender_target *target;
+ unsigned int size;
+
+ /* Validate arguments. */
+ if ((! result)
+ || (width == 0)
+ || (height == 0))
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "invalid argument given");
+
+ /* Allocate memory for render target. */
+ target = grub_malloc (sizeof (struct grub_video_fbrender_target));
+ if (! target)
+ return grub_errno;
+
+ /* TODO: Implement other types too.
+ Currently only 32bit render targets are supported. */
+
+ /* Mark render target as allocated. */
+ target->is_allocated = 1;
+
+ /* Maximize viewport. */
+ target->viewport.x = 0;
+ target->viewport.y = 0;
+ target->viewport.width = width;
+ target->viewport.height = height;
+
+ /* Setup render target format. */
+ target->mode_info.width = width;
+ target->mode_info.height = height;
+ target->mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_RGB
+ | GRUB_VIDEO_MODE_TYPE_ALPHA;
+ target->mode_info.bpp = 32;
+ target->mode_info.bytes_per_pixel = 4;
+ target->mode_info.pitch = target->mode_info.bytes_per_pixel * width;
+ target->mode_info.number_of_colors = framebuffer.palette_size; /* Emulated palette. */
+ target->mode_info.red_mask_size = 8;
+ target->mode_info.red_field_pos = 0;
+ target->mode_info.green_mask_size = 8;
+ target->mode_info.green_field_pos = 8;
+ target->mode_info.blue_mask_size = 8;
+ target->mode_info.blue_field_pos = 16;
+ target->mode_info.reserved_mask_size = 8;
+ target->mode_info.reserved_field_pos = 24;
+
+ target->mode_info.blit_format = grub_video_get_blit_format (&target->mode_info);
+
+ /* Calculate size needed for the data. */
+ size = (width * target->mode_info.bytes_per_pixel) * height;
+
+ target->data = grub_malloc (size);
+ if (! target->data)
+ {
+ grub_free (target);
+ return grub_errno;
+ }
+
+ /* Clear render target with black and maximum transparency. */
+ grub_memset (target->data, 0, size);
+
+ /* TODO: Add render target to render target list. */
+
+ /* Save result to caller. */
+ *result = target;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_create_render_target_from_pointer (struct grub_video_fbrender_target **result,
+ const struct grub_video_mode_info *mode_info,
+ void *ptr)
+{
+ struct grub_video_fbrender_target *target;
+ unsigned y;
+
+ /* Allocate memory for render target. */
+ target = grub_malloc (sizeof (struct grub_video_fbrender_target));
+ if (! target)
+ return grub_errno;
+
+ /* Mark framebuffer memory as non allocated. */
+ target->is_allocated = 0;
+ target->data = ptr;
+
+ grub_memcpy (&(target->mode_info), mode_info, sizeof (target->mode_info));
+
+ /* Reset viewport to match new mode. */
+ target->viewport.x = 0;
+ target->viewport.y = 0;
+ target->viewport.width = mode_info->width;
+ target->viewport.height = mode_info->height;
+
+ /* Clear render target with black and maximum transparency. */
+ for (y = 0; y < mode_info->height; y++)
+ grub_memset (target->data + mode_info->pitch * y, 0,
+ mode_info->bytes_per_pixel * mode_info->width);
+
+ /* Save result to caller. */
+ *result = target;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_delete_render_target (struct grub_video_fbrender_target *target)
+{
+ /* If there is no target, then just return without error. */
+ if (! target)
+ return GRUB_ERR_NONE;
+
+ /* TODO: Delist render target from render target list. */
+
+ /* If this is software render target, free it's memory. */
+ if (target->is_allocated)
+ grub_free (target->data);
+
+ /* Free render target. */
+ grub_free (target);
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_set_active_render_target (struct grub_video_fbrender_target *target)
+{
+ if (target == (struct grub_video_fbrender_target *)
+ GRUB_VIDEO_RENDER_TARGET_DISPLAY)
+ target = framebuffer.back_target;
+
+ if (! target->data)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "invalid render target given");
+
+ framebuffer.render_target = target;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_get_active_render_target (struct grub_video_fbrender_target **target)
+{
+ *target = framebuffer.render_target;
+
+ if (*target == framebuffer.back_target)
+ *target = (struct grub_video_fbrender_target *) GRUB_VIDEO_RENDER_TARGET_DISPLAY;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+doublebuf_blit_update_screen (struct grub_video_fbrender_target *front,
+ struct grub_video_fbrender_target *back)
+{
+ grub_memcpy (front->data, back->data,
+ front->mode_info.pitch * front->mode_info.height);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_fb_doublebuf_blit_init (struct grub_video_fbrender_target **front,
+ struct grub_video_fbrender_target **back,
+ struct grub_video_mode_info mode_info,
+ void *framebuf)
+{
+ grub_err_t err;
+ int page_size = mode_info.pitch * mode_info.height;
+
+ err = grub_video_fb_create_render_target_from_pointer (front, &mode_info,
+ framebuf);
+ if (err)
+ return err;
+
+ framebuffer.offscreen_buffer = grub_malloc (page_size);
+ if (! framebuffer.offscreen_buffer)
+ {
+ grub_video_fb_delete_render_target (*front);
+ *front = 0;
+ return grub_errno;
+ }
+
+ err = grub_video_fb_create_render_target_from_pointer (back, &mode_info,
+ framebuffer.offscreen_buffer);
+
+ if (err)
+ {
+ grub_video_fb_delete_render_target (*front);
+ grub_free (framebuffer.offscreen_buffer);
+ framebuffer.offscreen_buffer = 0;
+ *front = 0;
+ return grub_errno;
+ }
+ (*back)->is_allocated = 1;
+
+ framebuffer.update_screen = doublebuf_blit_update_screen;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+doublebuf_pageflipping_update_screen (struct grub_video_fbrender_target *front
+ __attribute__ ((unused)),
+ struct grub_video_fbrender_target *back
+ __attribute__ ((unused)))
+{
+ int new_displayed_page;
+ struct grub_video_fbrender_target *target;
+ grub_err_t err;
+
+ /* Swap the page numbers in the framebuffer struct. */
+ new_displayed_page = framebuffer.render_page;
+ framebuffer.render_page = framebuffer.displayed_page;
+ framebuffer.displayed_page = new_displayed_page;
+
+ err = framebuffer.set_page (framebuffer.displayed_page);
+ if (err)
+ {
+ /* Restore previous state. */
+ framebuffer.render_page = framebuffer.displayed_page;
+ framebuffer.displayed_page = new_displayed_page;
+ return err;
+ }
+
+ target = framebuffer.back_target;
+ framebuffer.back_target = framebuffer.front_target;
+ framebuffer.front_target = target;
+
+ if (framebuffer.front_target->mode_info.mode_type
+ & GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP)
+ grub_memcpy (framebuffer.back_target->data, framebuffer.front_target->data,
+ framebuffer.back_target->mode_info.pitch
+ * framebuffer.back_target->mode_info.height);
+
+ err = grub_video_fb_get_active_render_target (&target);
+ if (err)
+ return err;
+
+ if (framebuffer.render_target == framebuffer.back_target)
+ framebuffer.render_target = framebuffer.front_target;
+ else if (framebuffer.render_target == framebuffer.front_target)
+ framebuffer.render_target = framebuffer.back_target;
+
+ return err;
+}
+
+static grub_err_t
+doublebuf_pageflipping_init (struct grub_video_mode_info *mode_info,
+ volatile void *page0_ptr,
+ grub_video_fb_set_page_t set_page_in,
+ volatile void *page1_ptr)
+{
+ grub_err_t err;
+
+ framebuffer.displayed_page = 0;
+ framebuffer.render_page = 1;
+
+ framebuffer.update_screen = doublebuf_pageflipping_update_screen;
+
+ err = grub_video_fb_create_render_target_from_pointer (&framebuffer.front_target,
+ mode_info,
+ (void *) page0_ptr);
+ if (err)
+ return err;
+
+ err = grub_video_fb_create_render_target_from_pointer (&framebuffer.back_target,
+ mode_info,
+ (void *) page1_ptr);
+ if (err)
+ {
+ grub_video_fb_delete_render_target (framebuffer.front_target);
+ return err;
+ }
+
+ /* Set the framebuffer memory data pointer and display the right page. */
+ err = set_page_in (framebuffer.displayed_page);
+ if (err)
+ {
+ grub_video_fb_delete_render_target (framebuffer.front_target);
+ grub_video_fb_delete_render_target (framebuffer.back_target);
+ return err;
+ }
+ framebuffer.set_page = set_page_in;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Select the best double buffering mode available. */
+grub_err_t
+grub_video_fb_setup (unsigned int mode_type, unsigned int mode_mask,
+ struct grub_video_mode_info *mode_info,
+ volatile void *page0_ptr,
+ grub_video_fb_set_page_t set_page_in,
+ volatile void *page1_ptr)
+{
+ grub_err_t err;
+ int updating_swap_needed;
+
+ updating_swap_needed
+ = grub_video_check_mode_flag (mode_type, mode_mask,
+ GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP, 0);
+
+ /* Do double buffering only if it's either requested or efficient. */
+ if (set_page_in && grub_video_check_mode_flag (mode_type, mode_mask,
+ GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED,
+ !updating_swap_needed))
+ {
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED;
+ if (updating_swap_needed)
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP;
+
+ err = doublebuf_pageflipping_init (mode_info, page0_ptr,
+ set_page_in,
+ page1_ptr);
+ if (!err)
+ {
+ framebuffer.render_target = framebuffer.back_target;
+ return GRUB_ERR_NONE;
+ }
+
+ mode_info->mode_type &= ~(GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED
+ | GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP);
+
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ if (grub_video_check_mode_flag (mode_type, mode_mask,
+ GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED,
+ 0))
+ {
+ /* It was much nicer with the cast directly at function call but
+ some older gcc versions don't accept it properly.*/
+ void *tmp = (void *) page0_ptr;
+ mode_info->mode_type |= (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED
+ | GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP);
+
+ err = grub_video_fb_doublebuf_blit_init (&framebuffer.front_target,
+ &framebuffer.back_target,
+ *mode_info,
+ tmp);
+
+ if (!err)
+ {
+ framebuffer.render_target = framebuffer.back_target;
+ return GRUB_ERR_NONE;
+ }
+
+ mode_info->mode_type &= ~(GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED
+ | GRUB_VIDEO_MODE_TYPE_UPDATING_SWAP);
+
+ grub_errno = GRUB_ERR_NONE;
+ }
+
+ /* Fall back to no double buffering. */
+ err = grub_video_fb_create_render_target_from_pointer (&framebuffer.front_target,
+ mode_info,
+ (void *) page0_ptr);
+
+ if (err)
+ return err;
+
+ framebuffer.back_target = framebuffer.front_target;
+ framebuffer.update_screen = 0;
+
+ mode_info->mode_type &= ~GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED;
+
+ framebuffer.render_target = framebuffer.back_target;
+
+ return GRUB_ERR_NONE;
+}
+
+
+grub_err_t
+grub_video_fb_swap_buffers (void)
+{
+ grub_err_t err;
+ if (!framebuffer.update_screen)
+ return GRUB_ERR_NONE;
+
+ err = framebuffer.update_screen (framebuffer.front_target,
+ framebuffer.back_target);
+ if (err)
+ return err;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_fb_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuf)
+{
+ grub_memcpy (mode_info, &(framebuffer.front_target->mode_info),
+ sizeof (*mode_info));
+
+ /* We are about to load a kernel. Switch back to page zero, since some
+ kernel drivers expect that. */
+ if ((mode_info->mode_type & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED)
+ && framebuffer.set_page && framebuffer.displayed_page != 0)
+ {
+ /* Ensure both pages are exactly in sync. */
+ grub_memcpy (framebuffer.back_target->data,
+ framebuffer.front_target->data,
+ framebuffer.back_target->mode_info.pitch
+ * framebuffer.back_target->mode_info.height);
+ grub_video_swap_buffers ();
+ }
+
+ *framebuf = framebuffer.front_target->data;
+
+ grub_video_fb_fini ();
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/video/i386/pc/vbe.c b/grub-core/video/i386/pc/vbe.c
new file mode 100644
index 0000000..a109bcf
--- /dev/null
+++ b/grub-core/video/i386/pc/vbe.c
@@ -0,0 +1,918 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/machine/memory.h>
+#include <grub/machine/vga.h>
+#include <grub/machine/vbe.h>
+#include <grub/video_fb.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/machine/int.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static int vbe_detected = -1;
+
+static struct grub_vbe_info_block controller_info;
+
+/* Track last mode to support cards which fail on get_mode. */
+static grub_uint32_t last_set_mode = 3;
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+
+ grub_uint8_t *ptr;
+} framebuffer;
+
+static grub_uint32_t initial_vbe_mode;
+static grub_uint16_t *vbe_mode_list;
+
+static void *
+real2pm (grub_vbe_farptr_t ptr)
+{
+ return (void *) ((((unsigned long) ptr & 0xFFFF0000) >> 12UL)
+ + ((unsigned long) ptr & 0x0000FFFF));
+}
+
+/* Call VESA BIOS 0x4f09 to set palette data, return status. */
+static grub_vbe_status_t
+grub_vbe_bios_set_palette_data (grub_uint32_t color_count,
+ grub_uint32_t start_index,
+ struct grub_vbe_palette_data *palette_data)
+{
+ struct grub_bios_int_registers regs;
+ regs.eax = 0x4f09;
+ regs.ebx = 0;
+ regs.ecx = color_count;
+ regs.edx = start_index;
+ regs.es = (((grub_addr_t) palette_data) & 0xffff0000) >> 4;
+ regs.edi = ((grub_addr_t) palette_data) & 0xffff;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f00 to get VBE Controller Information, return status. */
+grub_vbe_status_t
+grub_vbe_bios_get_controller_info (struct grub_vbe_info_block *ci)
+{
+ struct grub_bios_int_registers regs;
+ /* Store *controller_info to %es:%di. */
+ regs.es = (((grub_addr_t) ci) & 0xffff0000) >> 4;
+ regs.edi = ((grub_addr_t) ci) & 0xffff;
+ regs.eax = 0x4f00;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f01 to get VBE Mode Information, return status. */
+grub_vbe_status_t
+grub_vbe_bios_get_mode_info (grub_uint32_t mode,
+ struct grub_vbe_mode_info_block *mode_info)
+{
+ struct grub_bios_int_registers regs;
+ regs.eax = 0x4f01;
+ regs.ecx = mode;
+ /* Store *mode_info to %es:%di. */
+ regs.es = ((grub_addr_t) mode_info & 0xffff0000) >> 4;
+ regs.edi = (grub_addr_t) mode_info & 0x0000ffff;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f02 to set video mode, return status. */
+static grub_vbe_status_t
+grub_vbe_bios_set_mode (grub_uint32_t mode,
+ struct grub_vbe_crtc_info_block *crtc_info)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x4f02;
+ regs.ebx = mode;
+ /* Store *crtc_info to %es:%di. */
+ regs.es = (((grub_addr_t) crtc_info) & 0xffff0000) >> 4;
+ regs.edi = ((grub_addr_t) crtc_info) & 0xffff;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f03 to return current VBE Mode, return status. */
+grub_vbe_status_t
+grub_vbe_bios_get_mode (grub_uint32_t *mode)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x4f03;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ *mode = regs.ebx & 0xffff;
+
+ return regs.eax & 0xffff;
+}
+
+grub_vbe_status_t
+grub_vbe_bios_getset_dac_palette_width (int set, int *dac_mask_size)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x4f08;
+ regs.ebx = (*dac_mask_size & 0xff) >> 8;
+ regs.ebx = set ? 1 : 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ *dac_mask_size = (regs.ebx >> 8) & 0xff;
+
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f05 to set memory window, return status. */
+grub_vbe_status_t
+grub_vbe_bios_set_memory_window (grub_uint32_t window,
+ grub_uint32_t position)
+{
+ struct grub_bios_int_registers regs;
+
+ /* BL = window, BH = 0, Set memory window. */
+ regs.ebx = window & 0x00ff;
+ regs.edx = position;
+ regs.eax = 0x4f05;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f05 to return memory window, return status. */
+grub_vbe_status_t
+grub_vbe_bios_get_memory_window (grub_uint32_t window,
+ grub_uint32_t *position)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x4f05;
+ /* BH = 1, Get memory window. BL = window. */
+ regs.ebx = (window & 0x00ff) | 0x100;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+
+ *position = regs.edx & 0xffff;
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f06 to set scanline length (in bytes), return status. */
+grub_vbe_status_t
+grub_vbe_bios_set_scanline_length (grub_uint32_t length)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.ecx = length;
+ regs.eax = 0x4f06;
+ /* BL = 2, Set Scan Line in Bytes. */
+ regs.ebx = 0x0002;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f06 to return scanline length (in bytes), return status. */
+grub_vbe_status_t
+grub_vbe_bios_get_scanline_length (grub_uint32_t *length)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x4f06;
+ regs.ebx = 0x0001;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ /* BL = 1, Get Scan Line Length (in bytes). */
+ grub_bios_interrupt (0x10, &regs);
+
+ *length = regs.ebx & 0xffff;
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f07 to set display start, return status. */
+static grub_vbe_status_t
+grub_vbe_bios_set_display_start (grub_uint32_t x, grub_uint32_t y)
+{
+ struct grub_bios_int_registers regs;
+
+ /* Store x in %ecx. */
+ regs.ecx = x;
+ regs.edx = y;
+ regs.eax = 0x4f07;
+ /* BL = 80h, Set Display Start during Vertical Retrace. */
+ regs.ebx = 0x0080;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f07 to get display start, return status. */
+grub_vbe_status_t
+grub_vbe_bios_get_display_start (grub_uint32_t *x,
+ grub_uint32_t *y)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x4f07;
+ /* BL = 1, Get Display Start. */
+ regs.ebx = 0x0001;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+
+ *x = regs.ecx & 0xffff;
+ *y = regs.edx & 0xffff;
+ return regs.eax & 0xffff;
+}
+
+/* Call VESA BIOS 0x4f0a. */
+grub_vbe_status_t
+grub_vbe_bios_get_pm_interface (grub_uint16_t *segment, grub_uint16_t *offset,
+ grub_uint16_t *length)
+{
+ struct grub_bios_int_registers regs;
+
+ regs.eax = 0x4f0a;
+ regs.ebx = 0x0000;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+
+ if ((regs.eax & 0xffff) != GRUB_VBE_STATUS_OK)
+ {
+ *segment = 0;
+ *offset = 0;
+ *length = 0;
+ }
+
+ *segment = regs.es & 0xffff;
+ *offset = regs.edi & 0xffff;
+ *length = regs.ecx & 0xffff;
+ return regs.eax & 0xffff;
+}
+
+
+grub_err_t
+grub_vbe_probe (struct grub_vbe_info_block *info_block)
+{
+ struct grub_vbe_info_block *vbe_ib;
+ grub_vbe_status_t status;
+
+ /* Clear caller's controller info block. */
+ if (info_block)
+ grub_memset (info_block, 0, sizeof (*info_block));
+
+ /* Do not probe more than one time, if not necessary. */
+ if (vbe_detected == -1 || info_block)
+ {
+ /* Clear old copy of controller info block. */
+ grub_memset (&controller_info, 0, sizeof (controller_info));
+
+ /* Mark VESA BIOS extension as undetected. */
+ vbe_detected = 0;
+
+ /* Use low memory scratch area as temporary storage
+ for VESA BIOS call. */
+ vbe_ib = (struct grub_vbe_info_block *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+
+ /* Prepare info block. */
+ grub_memset (vbe_ib, 0, sizeof (*vbe_ib));
+
+ vbe_ib->signature[0] = 'V';
+ vbe_ib->signature[1] = 'B';
+ vbe_ib->signature[2] = 'E';
+ vbe_ib->signature[3] = '2';
+
+ /* Try to get controller info block. */
+ status = grub_vbe_bios_get_controller_info (vbe_ib);
+ if (status == GRUB_VBE_STATUS_OK)
+ {
+ /* Copy it for later usage. */
+ grub_memcpy (&controller_info, vbe_ib, sizeof (controller_info));
+
+ /* Mark VESA BIOS extension as detected. */
+ vbe_detected = 1;
+ }
+ }
+
+ if (! vbe_detected)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "VESA BIOS Extension not found");
+
+ /* Make copy of controller info block to caller. */
+ if (info_block)
+ grub_memcpy (info_block, &controller_info, sizeof (*info_block));
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_vbe_set_video_mode (grub_uint32_t vbe_mode,
+ struct grub_vbe_mode_info_block *vbe_mode_info)
+{
+ grub_vbe_status_t status;
+ grub_uint32_t old_vbe_mode;
+ struct grub_vbe_mode_info_block new_vbe_mode_info;
+ grub_err_t err;
+
+ /* Make sure that VBE is supported. */
+ grub_vbe_probe (0);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Try to get mode info. */
+ grub_vbe_get_video_mode_info (vbe_mode, &new_vbe_mode_info);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* For all VESA BIOS modes, force linear frame buffer. */
+ if (vbe_mode >= 0x100)
+ {
+ /* We only want linear frame buffer modes. */
+ vbe_mode |= 1 << 14;
+
+ /* Determine frame buffer pixel format. */
+ if (new_vbe_mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL
+ && new_vbe_mode_info.memory_model
+ != GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "unsupported pixel format 0x%x",
+ new_vbe_mode_info.memory_model);
+ }
+
+ /* Get current mode. */
+ grub_vbe_get_video_mode (&old_vbe_mode);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Try to set video mode. */
+ status = grub_vbe_bios_set_mode (vbe_mode, 0);
+ if (status != GRUB_VBE_STATUS_OK)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "cannot set VBE mode %x", vbe_mode);
+ last_set_mode = vbe_mode;
+
+ if (vbe_mode < 0x100)
+ {
+ /* If this is not a VESA mode, guess address. */
+ framebuffer.ptr = (grub_uint8_t *) GRUB_MEMORY_MACHINE_VGA_ADDR;
+ }
+ else
+ {
+ framebuffer.ptr = (grub_uint8_t *) new_vbe_mode_info.phys_base_addr;
+ }
+
+ /* Check whether mode is text mode or graphics mode. */
+ if (new_vbe_mode_info.memory_model == GRUB_VBE_MEMORY_MODEL_TEXT)
+ {
+ /* Text mode. */
+
+ /* No special action needed for text mode as it is not supported for
+ graphical support. */
+ }
+ else
+ {
+ /* Graphics mode. */
+
+ /* If video mode is in indexed color, setup default VGA palette. */
+ if (vbe_mode < 0x100 || new_vbe_mode_info.memory_model
+ == GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL)
+ {
+ struct grub_vbe_palette_data *palette
+ = (struct grub_vbe_palette_data *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+ unsigned i;
+
+ /* Make sure that the BIOS can reach the palette. */
+ for (i = 0; i < GRUB_VIDEO_FBSTD_NUMCOLORS; i++)
+ {
+ palette[i].red = grub_video_fbstd_colors[i].r;
+ palette[i].green = grub_video_fbstd_colors[i].g;
+ palette[i].blue = grub_video_fbstd_colors[i].b;
+ palette[i].alignment = 0;
+ }
+
+ status = grub_vbe_bios_set_palette_data (GRUB_VIDEO_FBSTD_NUMCOLORS,
+ 0, palette);
+
+ /* Just ignore the status. */
+ err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+ if (err)
+ return err;
+
+ }
+ }
+
+ /* Copy mode info for caller. */
+ if (vbe_mode_info)
+ grub_memcpy (vbe_mode_info, &new_vbe_mode_info, sizeof (*vbe_mode_info));
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_vbe_get_video_mode (grub_uint32_t *mode)
+{
+ grub_vbe_status_t status;
+
+ /* Make sure that VBE is supported. */
+ grub_vbe_probe (0);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Try to query current mode from VESA BIOS. */
+ status = grub_vbe_bios_get_mode (mode);
+ /* XXX: ATI cards don't support get_mode. */
+ if (status != GRUB_VBE_STATUS_OK)
+ *mode = last_set_mode;
+
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_vbe_get_video_mode_info (grub_uint32_t mode,
+ struct grub_vbe_mode_info_block *mode_info)
+{
+ struct grub_vbe_mode_info_block *mi_tmp
+ = (struct grub_vbe_mode_info_block *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR;
+ grub_vbe_status_t status;
+
+ /* Make sure that VBE is supported. */
+ grub_vbe_probe (0);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* If mode is not VESA mode, skip mode info query. */
+ if (mode >= 0x100)
+ {
+ /* Try to get mode info from VESA BIOS. */
+ status = grub_vbe_bios_get_mode_info (mode, mi_tmp);
+ if (status != GRUB_VBE_STATUS_OK)
+ return grub_error (GRUB_ERR_BAD_DEVICE,
+ "cannot get information on the mode %x", mode);
+
+ /* Make copy of mode info block. */
+ grub_memcpy (mode_info, mi_tmp, sizeof (*mode_info));
+ }
+ else
+ /* Just clear mode info block if it isn't a VESA mode. */
+ grub_memset (mode_info, 0, sizeof (*mode_info));
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_vbe_init (void)
+{
+ grub_uint16_t *rm_vbe_mode_list;
+ grub_uint16_t *p;
+ grub_size_t vbe_mode_list_size;
+ struct grub_vbe_info_block info_block;
+
+ /* Check if there is adapter present.
+
+ Firmware note: There has been a report that some cards store video mode
+ list in temporary memory. So we must first use vbe probe to get
+ refreshed information to receive valid pointers and data, and then
+ copy this information to somewhere safe. */
+ grub_vbe_probe (&info_block);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Copy modelist to local memory. */
+ p = rm_vbe_mode_list = real2pm (info_block.video_mode_ptr);
+ while(*p++ != 0xFFFF)
+ ;
+
+ vbe_mode_list_size = (grub_addr_t) p - (grub_addr_t) rm_vbe_mode_list;
+ vbe_mode_list = grub_malloc (vbe_mode_list_size);
+ if (! vbe_mode_list)
+ return grub_errno;
+ grub_memcpy (vbe_mode_list, rm_vbe_mode_list, vbe_mode_list_size);
+
+ /* Adapter could be found, figure out initial video mode. */
+ grub_vbe_get_video_mode (&initial_vbe_mode);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ /* Free allocated resources. */
+ grub_free (vbe_mode_list);
+ vbe_mode_list = NULL;
+
+ return grub_errno;
+ }
+
+ /* Reset frame buffer. */
+ grub_memset (&framebuffer, 0, sizeof(framebuffer));
+
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_vbe_fini (void)
+{
+ grub_vbe_status_t status;
+ grub_err_t err;
+
+ /* Restore old video mode. */
+ if (last_set_mode != initial_vbe_mode)
+ {
+ status = grub_vbe_bios_set_mode (initial_vbe_mode, 0);
+ if (status != GRUB_VBE_STATUS_OK)
+ /* TODO: Decide, is this something we want to do. */
+ return grub_errno;
+ }
+ last_set_mode = initial_vbe_mode;
+
+ /* TODO: Free any resources allocated by driver. */
+ grub_free (vbe_mode_list);
+ vbe_mode_list = NULL;
+
+ err = grub_video_fb_fini ();
+ return err;
+}
+
+/*
+ Set framebuffer render target page and display the proper page, based on
+ `doublebuf_state.render_page' and `doublebuf_state.displayed_page',
+ respectively.
+*/
+static grub_err_t
+doublebuf_pageflipping_set_page (int page)
+{
+ /* Tell the video adapter to display the new front page. */
+ int display_start_line
+ = framebuffer.mode_info.height * page;
+
+ grub_vbe_status_t vbe_err =
+ grub_vbe_bios_set_display_start (0, display_start_line);
+
+ if (vbe_err != GRUB_VBE_STATUS_OK)
+ return grub_error (GRUB_ERR_IO, "couldn't commit pageflip");
+
+ return 0;
+}
+
+static void
+vbe2videoinfo (grub_uint32_t mode,
+ const struct grub_vbe_mode_info_block *vbeinfo,
+ struct grub_video_mode_info *mode_info)
+{
+ mode_info->mode_number = mode;
+
+ mode_info->width = vbeinfo->x_resolution;
+ mode_info->height = vbeinfo->y_resolution;
+ mode_info->mode_type = 0;
+ switch (vbeinfo->memory_model)
+ {
+ case GRUB_VBE_MEMORY_MODEL_TEXT:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_PURE_TEXT;
+ break;
+
+ /* CGA is basically 4-bit packed pixel. */
+ case GRUB_VBE_MEMORY_MODEL_CGA:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_CGA;
+ case GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+ break;
+
+ case GRUB_VBE_MEMORY_MODEL_HERCULES:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_HERCULES
+ | GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP;
+ break;
+
+ /* Non chain 4 is a special case of planar. */
+ case GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_NONCHAIN4;
+ case GRUB_VBE_MEMORY_MODEL_PLANAR:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_PLANAR
+ | GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+ break;
+
+ case GRUB_VBE_MEMORY_MODEL_YUV:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_YUV;
+ break;
+
+ case GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_RGB;
+ break;
+ default:
+ mode_info->mode_type |= GRUB_VIDEO_MODE_TYPE_UNKNOWN;
+ break;
+ }
+
+ mode_info->bpp = vbeinfo->bits_per_pixel;
+ /* Calculate bytes_per_pixel value. */
+ switch(vbeinfo->bits_per_pixel)
+ {
+ case 32:
+ mode_info->bytes_per_pixel = 4;
+ break;
+ case 24:
+ mode_info->bytes_per_pixel = 3;
+ break;
+ case 16:
+ mode_info->bytes_per_pixel = 2;
+ break;
+ case 15:
+ mode_info->bytes_per_pixel = 2;
+ break;
+ case 8:
+ mode_info->bytes_per_pixel = 1;
+ break;
+ case 4:
+ mode_info->bytes_per_pixel = 0;
+ break;
+ }
+
+ if (controller_info.version >= 0x300)
+ mode_info->pitch = vbeinfo->lin_bytes_per_scan_line;
+ else
+ mode_info->pitch = vbeinfo->bytes_per_scan_line;
+
+ mode_info->number_of_colors = 256; /* TODO: fix me. */
+ mode_info->red_mask_size = vbeinfo->red_mask_size;
+ mode_info->red_field_pos = vbeinfo->red_field_position;
+ mode_info->green_mask_size = vbeinfo->green_mask_size;
+ mode_info->green_field_pos = vbeinfo->green_field_position;
+ mode_info->blue_mask_size = vbeinfo->blue_mask_size;
+ mode_info->blue_field_pos = vbeinfo->blue_field_position;
+ mode_info->reserved_mask_size = vbeinfo->rsvd_mask_size;
+ mode_info->reserved_field_pos = vbeinfo->rsvd_field_position;
+
+ mode_info->blit_format = grub_video_get_blit_format (mode_info);
+}
+
+static int
+grub_video_vbe_iterate (int (*hook) (const struct grub_video_mode_info *info))
+{
+ grub_uint16_t *p;
+ struct grub_vbe_mode_info_block vbe_mode_info;
+ struct grub_video_mode_info mode_info;
+
+ for (p = vbe_mode_list; *p != 0xFFFF; p++)
+ {
+ grub_vbe_get_video_mode_info (*p, &vbe_mode_info);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ /* Could not retrieve mode info, retreat. */
+ grub_errno = GRUB_ERR_NONE;
+ break;
+ }
+
+ vbe2videoinfo (*p, &vbe_mode_info, &mode_info);
+ if (hook (&mode_info))
+ return 1;
+ }
+ return 0;
+}
+
+static grub_err_t
+grub_video_vbe_setup (unsigned int width, unsigned int height,
+ grub_video_mode_type_t mode_type,
+ grub_video_mode_type_t mode_mask)
+{
+ grub_uint16_t *p;
+ struct grub_vbe_mode_info_block vbe_mode_info;
+ struct grub_vbe_mode_info_block best_vbe_mode_info;
+ grub_uint32_t best_vbe_mode = 0;
+ int depth;
+
+ /* Decode depth from mode_type. If it is zero, then autodetect. */
+ depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ >> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
+
+ /* Walk thru mode list and try to find matching mode. */
+ for (p = vbe_mode_list; *p != 0xFFFF; p++)
+ {
+ grub_uint32_t vbe_mode = *p;
+
+ grub_vbe_get_video_mode_info (vbe_mode, &vbe_mode_info);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ /* Could not retrieve mode info, retreat. */
+ grub_errno = GRUB_ERR_NONE;
+ break;
+ }
+
+ if ((vbe_mode_info.mode_attributes & 0x001) == 0)
+ /* If not available, skip it. */
+ continue;
+
+ if ((vbe_mode_info.mode_attributes & 0x008) == 0)
+ /* Monochrome is unusable. */
+ continue;
+
+ if ((vbe_mode_info.mode_attributes & 0x080) == 0)
+ /* We support only linear frame buffer modes. */
+ continue;
+
+ if ((vbe_mode_info.mode_attributes & 0x010) == 0)
+ /* We allow only graphical modes. */
+ continue;
+
+ if ((vbe_mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL)
+ && (vbe_mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR))
+ /* Not compatible memory model. */
+ continue;
+
+ if (vbe_mode_info.bits_per_pixel != 8
+ && vbe_mode_info.bits_per_pixel != 15
+ && vbe_mode_info.bits_per_pixel != 16
+ && vbe_mode_info.bits_per_pixel != 24
+ && vbe_mode_info.bits_per_pixel != 32)
+ /* Unsupported bitdepth . */
+ continue;
+
+ if (((vbe_mode_info.x_resolution != width)
+ || (vbe_mode_info.y_resolution != height)) && width != 0 && height != 0)
+ /* Non matching resolution. */
+ continue;
+
+ /* Check if user requested RGB or index color mode. */
+ if ((mode_mask & GRUB_VIDEO_MODE_TYPE_COLOR_MASK) != 0)
+ {
+ unsigned my_mode_type = 0;
+
+ if (vbe_mode_info.memory_model == GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL)
+ my_mode_type |= GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+
+ if (vbe_mode_info.memory_model == GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)
+ my_mode_type |= GRUB_VIDEO_MODE_TYPE_RGB;
+
+ if ((my_mode_type & mode_mask
+ & (GRUB_VIDEO_MODE_TYPE_RGB | GRUB_VIDEO_MODE_TYPE_INDEX_COLOR))
+ != (mode_type & mode_mask
+ & (GRUB_VIDEO_MODE_TYPE_RGB
+ | GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)))
+ continue;
+ }
+
+ /* If there is a request for specific depth, ignore others. */
+ if ((depth != 0) && (vbe_mode_info.bits_per_pixel != depth))
+ continue;
+
+ /* Select mode with most of "volume" (size of framebuffer in bits). */
+ if (best_vbe_mode != 0)
+ if ((grub_uint64_t) vbe_mode_info.bits_per_pixel
+ * vbe_mode_info.x_resolution * vbe_mode_info.y_resolution
+ < (grub_uint64_t) best_vbe_mode_info.bits_per_pixel
+ * best_vbe_mode_info.x_resolution * best_vbe_mode_info.y_resolution)
+ continue;
+
+ /* Save so far best mode information for later use. */
+ best_vbe_mode = vbe_mode;
+ grub_memcpy (&best_vbe_mode_info, &vbe_mode_info, sizeof (vbe_mode_info));
+ }
+
+ /* Try to initialize best mode found. */
+ if (best_vbe_mode != 0)
+ {
+ grub_err_t err;
+ static struct grub_vbe_mode_info_block active_vbe_mode_info;
+ /* If this fails, then we have mode selection heuristics problem,
+ or adapter failure. */
+ grub_vbe_set_video_mode (best_vbe_mode, &active_vbe_mode_info);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ /* Fill mode info details. */
+ vbe2videoinfo (best_vbe_mode, &active_vbe_mode_info,
+ &framebuffer.mode_info);
+
+ {
+ /* Get video RAM size in bytes. */
+ grub_size_t vram_size = controller_info.total_memory << 16;
+ grub_size_t page_size; /* The size of a page in bytes. */
+
+ page_size = framebuffer.mode_info.pitch * framebuffer.mode_info.height;
+
+ if (vram_size >= 2 * page_size)
+ err = grub_video_fb_setup (mode_type, mode_mask,
+ &framebuffer.mode_info,
+ framebuffer.ptr,
+ doublebuf_pageflipping_set_page,
+ framebuffer.ptr + page_size);
+ else
+ err = grub_video_fb_setup (mode_type, mode_mask,
+ &framebuffer.mode_info,
+ framebuffer.ptr, 0, 0);
+ }
+
+ /* Copy default palette to initialize emulated palette. */
+ err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+ return err;
+ }
+
+ /* Couldn't found matching mode. */
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
+}
+
+static grub_err_t
+grub_video_vbe_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ if (framebuffer.mode_info.mode_type == GRUB_VIDEO_MODE_TYPE_INDEX_COLOR)
+ {
+ /* TODO: Implement setting indexed color mode palette to hardware. */
+ //status = grub_vbe_bios_set_palette_data (sizeof (vga_colors)
+ // / sizeof (struct grub_vbe_palette_data),
+ // 0,
+ // palette);
+
+ }
+
+ /* Then set color to emulated palette. */
+
+ return grub_video_fb_set_palette (start, count, palette_data);
+}
+
+static grub_err_t
+grub_video_vbe_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuf)
+{
+ grub_free (vbe_mode_list);
+ vbe_mode_list = NULL;
+ return grub_video_fb_get_info_and_fini (mode_info, framebuf);
+}
+
+static void
+grub_video_vbe_print_adapter_specific_info (void)
+{
+ grub_printf (" VBE info: version: %d.%d OEM software rev: %d.%d\n",
+ controller_info.version >> 8,
+ controller_info.version & 0xFF,
+ controller_info.oem_software_rev >> 8,
+ controller_info.oem_software_rev & 0xFF);
+
+ /* The total_memory field is in 64 KiB units. */
+ grub_printf (" total memory: %d KiB\n",
+ (controller_info.total_memory << 16) / 1024);
+}
+
+static struct grub_video_adapter grub_video_vbe_adapter =
+ {
+ .name = "VESA BIOS Extension Video Driver",
+ .id = GRUB_VIDEO_DRIVER_VBE,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_FIRMWARE,
+
+ .init = grub_video_vbe_init,
+ .fini = grub_video_vbe_fini,
+ .setup = grub_video_vbe_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_vbe_get_info_and_fini,
+ .set_palette = grub_video_vbe_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_fb_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_fb_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+ .iterate = grub_video_vbe_iterate,
+ .print_adapter_specific_info = grub_video_vbe_print_adapter_specific_info,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(video_i386_pc_vbe)
+{
+ grub_video_register (&grub_video_vbe_adapter);
+}
+
+GRUB_MOD_FINI(video_i386_pc_vbe)
+{
+ grub_video_unregister (&grub_video_vbe_adapter);
+}
diff --git a/grub-core/video/i386/pc/vga.c b/grub-core/video/i386/pc/vga.c
new file mode 100644
index 0000000..fe387a2
--- /dev/null
+++ b/grub-core/video/i386/pc/vga.c
@@ -0,0 +1,390 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/machine/vga.h>
+#include <grub/machine/int.h>
+#include <grub/machine/console.h>
+#include <grub/cpu/io.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/vga.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+#define VGA_WIDTH 640
+#define VGA_HEIGHT 350
+#define VGA_MEM ((grub_uint8_t *) GRUB_MEMORY_MACHINE_VGA_ADDR)
+#define PAGE_OFFSET(x) ((x) * (VGA_WIDTH * VGA_HEIGHT / 8))
+
+static unsigned char text_mode;
+static unsigned char saved_map_mask;
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+ struct grub_video_render_target *render_target;
+ grub_uint8_t *temporary_buffer;
+ int front_page;
+ int back_page;
+} framebuffer;
+
+static unsigned char
+grub_vga_set_mode (unsigned char mode)
+{
+ struct grub_bios_int_registers regs;
+ unsigned char ret;
+ /* get current mode */
+ regs.eax = 0x0f00;
+ regs.ebx = 0;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+
+ ret = regs.eax & 0xff;
+ regs.eax = mode;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+
+ return ret;
+}
+
+static inline void
+wait_vretrace (void)
+{
+ /* Wait until there is a vertical retrace. */
+ while (! (grub_inb (GRUB_VGA_IO_INPUT_STATUS1_REGISTER)
+ & GRUB_VGA_IO_INPUT_STATUS1_VERTR_BIT));
+}
+
+/* Get Map Mask Register. */
+static unsigned char
+get_map_mask (void)
+{
+ return grub_vga_sr_read (GRUB_VGA_SR_MAP_MASK_REGISTER);
+}
+
+/* Set Map Mask Register. */
+static void
+set_map_mask (unsigned char mask)
+{
+ grub_vga_sr_write (mask, GRUB_VGA_SR_MAP_MASK_REGISTER);
+}
+
+#if 0
+/* Set Read Map Register. */
+static void
+set_read_map (unsigned char map)
+{
+ grub_vga_gr_write (map, GRUB_VGA_GR_READ_MAP_REGISTER);
+}
+#endif
+
+/* Set start address. */
+static void
+set_start_address (unsigned int start)
+{
+ grub_vga_cr_write (start & 0xFF, GRUB_VGA_CR_START_ADDR_LOW_REGISTER);
+ grub_vga_cr_write (start >> 8, GRUB_VGA_CR_START_ADDR_HIGH_REGISTER);
+}
+
+static int setup = 0;
+static int is_target = 0;
+
+static grub_err_t
+grub_video_vga_init (void)
+{
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_vga_setup (unsigned int width, unsigned int height,
+ grub_video_mode_type_t mode_type,
+ grub_video_mode_type_t mode_mask)
+{
+ grub_err_t err;
+
+ if ((width && width != VGA_WIDTH) || (height && height != VGA_HEIGHT))
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
+
+ framebuffer.temporary_buffer = grub_malloc (VGA_HEIGHT * VGA_WIDTH);
+ framebuffer.front_page = 0;
+ framebuffer.back_page = 0;
+ if (!framebuffer.temporary_buffer)
+ return grub_errno;
+
+ saved_map_mask = get_map_mask ();
+
+ text_mode = grub_vga_set_mode (0x10);
+ setup = 1;
+ set_map_mask (0x0f);
+ set_start_address (PAGE_OFFSET (framebuffer.front_page));
+
+ framebuffer.mode_info.width = VGA_WIDTH;
+ framebuffer.mode_info.height = VGA_HEIGHT;
+
+ framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+
+ if (grub_video_check_mode_flag (mode_type, mode_mask,
+ GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED, 1))
+ {
+ framebuffer.back_page = 1;
+ framebuffer.mode_info.mode_type |= GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED;
+ }
+
+ framebuffer.mode_info.bpp = 8;
+ framebuffer.mode_info.bytes_per_pixel = 1;
+ framebuffer.mode_info.pitch = VGA_WIDTH;
+ framebuffer.mode_info.number_of_colors = 16;
+ framebuffer.mode_info.red_mask_size = 0;
+ framebuffer.mode_info.red_field_pos = 0;
+ framebuffer.mode_info.green_mask_size = 0;
+ framebuffer.mode_info.green_field_pos = 0;
+ framebuffer.mode_info.blue_mask_size = 0;
+ framebuffer.mode_info.blue_field_pos = 0;
+ framebuffer.mode_info.reserved_mask_size = 0;
+ framebuffer.mode_info.reserved_field_pos = 0;
+
+ framebuffer.mode_info.blit_format
+ = grub_video_get_blit_format (&framebuffer.mode_info);
+
+ err = grub_video_fb_create_render_target_from_pointer (&framebuffer.render_target,
+ &framebuffer.mode_info,
+ framebuffer.temporary_buffer);
+
+ if (err)
+ {
+ grub_dprintf ("video", "Couldn't create FB target\n");
+ return err;
+ }
+
+ is_target = 1;
+ err = grub_video_fb_set_active_render_target (framebuffer.render_target);
+
+ if (err)
+ return err;
+
+ err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_vga_fini (void)
+{
+ if (setup)
+ {
+ set_map_mask (saved_map_mask);
+ grub_vga_set_mode (text_mode);
+ }
+ setup = 0;
+ grub_free (framebuffer.temporary_buffer);
+ framebuffer.temporary_buffer = 0;
+ return GRUB_ERR_NONE;
+}
+
+static inline void
+update_target (void)
+{
+ int plane;
+
+ if (!is_target)
+ return;
+
+ for (plane = 0x01; plane <= 0x08; plane <<= 1)
+ {
+ grub_uint8_t *ptr;
+ volatile grub_uint8_t *ptr2;
+ unsigned cbyte = 0;
+ int shift = 7;
+ set_map_mask (plane);
+ for (ptr = framebuffer.temporary_buffer,
+ ptr2 = VGA_MEM + PAGE_OFFSET (framebuffer.back_page);
+ ptr < framebuffer.temporary_buffer + VGA_WIDTH * VGA_HEIGHT; ptr++)
+ {
+ cbyte |= (!!(plane & *ptr)) << shift;
+ shift--;
+ if (shift == -1)
+ {
+ *ptr2++ = cbyte;
+ shift = 7;
+ cbyte = 0;
+ }
+ }
+ }
+}
+
+static grub_err_t
+grub_video_vga_blit_bitmap (struct grub_video_bitmap *bitmap,
+ enum grub_video_blit_operators oper, int x, int y,
+ int offset_x, int offset_y,
+ unsigned int width, unsigned int height)
+{
+ grub_err_t ret;
+ ret = grub_video_fb_blit_bitmap (bitmap, oper, x, y, offset_x, offset_y,
+ width, height);
+ update_target ();
+ return ret;
+}
+
+static grub_err_t
+grub_video_vga_blit_render_target (struct grub_video_fbrender_target *source,
+ enum grub_video_blit_operators oper,
+ int x, int y, int offset_x, int offset_y,
+ unsigned int width, unsigned int height)
+{
+ grub_err_t ret;
+
+ ret = grub_video_fb_blit_render_target (source, oper, x, y,
+ offset_x, offset_y, width, height);
+ update_target ();
+
+ return ret;
+}
+
+static grub_err_t
+grub_video_vga_set_active_render_target (struct grub_video_render_target *target)
+{
+ if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
+ {
+ is_target = 1;
+ target = framebuffer.render_target;
+ }
+ else
+ is_target = 0;
+
+ return grub_video_fb_set_active_render_target (target);
+}
+
+static grub_err_t
+grub_video_vga_get_active_render_target (struct grub_video_render_target **target)
+{
+ grub_err_t err;
+ err = grub_video_fb_get_active_render_target (target);
+ if (err)
+ return err;
+
+ if (*target == framebuffer.render_target)
+ *target = GRUB_VIDEO_RENDER_TARGET_DISPLAY;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_vga_swap_buffers (void)
+{
+ if (!(framebuffer.mode_info.mode_type & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED))
+ return GRUB_ERR_NONE;
+
+ /* Activate the other page. */
+ framebuffer.front_page = !framebuffer.front_page;
+ framebuffer.back_page = !framebuffer.back_page;
+ wait_vretrace ();
+ set_start_address (PAGE_OFFSET (framebuffer.front_page));
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_vga_set_palette (unsigned int start __attribute__ ((unused)),
+ unsigned int count __attribute__ ((unused)),
+ struct grub_video_palette_data *palette_data __attribute__ ((unused)))
+{
+ return grub_error (GRUB_ERR_IO, "can't change palette");
+}
+
+static grub_err_t
+grub_video_vga_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuf)
+{
+ set_map_mask (0xf);
+
+ grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
+ mode_info->bpp = 1;
+ mode_info->bytes_per_pixel = 0;
+ mode_info->pitch = VGA_WIDTH / 8;
+ mode_info->number_of_colors = 1;
+
+ mode_info->bg_red = 0;
+ mode_info->bg_green = 0;
+ mode_info->bg_blue = 0;
+ mode_info->bg_alpha = 255;
+
+ mode_info->fg_red = 255;
+ mode_info->fg_green = 255;
+ mode_info->fg_blue = 255;
+ mode_info->fg_alpha = 255;
+
+ *framebuf = VGA_MEM + PAGE_OFFSET (framebuffer.front_page);
+
+ grub_video_fb_fini ();
+ grub_free (framebuffer.temporary_buffer);
+ framebuffer.temporary_buffer = 0;
+ setup = 0;
+
+ return GRUB_ERR_NONE;
+}
+
+
+static struct grub_video_adapter grub_video_vga_adapter =
+ {
+ .name = "VGA Video Driver",
+ .id = GRUB_VIDEO_DRIVER_VGA,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_FALLBACK,
+
+ .init = grub_video_vga_init,
+ .fini = grub_video_vga_fini,
+ .setup = grub_video_vga_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_vga_get_info_and_fini,
+ .set_palette = grub_video_vga_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_vga_blit_bitmap,
+ .blit_render_target = grub_video_vga_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_vga_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_vga_set_active_render_target,
+ .get_active_render_target = grub_video_vga_get_active_render_target,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(vga)
+{
+ grub_video_register (&grub_video_vga_adapter);
+}
+
+GRUB_MOD_FINI(vga)
+{
+ grub_video_unregister (&grub_video_vga_adapter);
+}
diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c
new file mode 100644
index 0000000..913ea83
--- /dev/null
+++ b/grub-core/video/ieee1275.c
@@ -0,0 +1,316 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/ieee1275/ieee1275.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Only 8-bit indexed color is supported for now. */
+
+static unsigned old_width, old_height;
+static int restore_needed;
+static char *display;
+static grub_ieee1275_ihandle_t stdout_ihandle;
+static int have_setcolors = 0;
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+ struct grub_video_render_target *render_target;
+ grub_uint8_t *ptr;
+} framebuffer;
+
+static grub_err_t
+grub_video_ieee1275_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data);
+
+static void
+set_video_mode (unsigned width __attribute__ ((unused)),
+ unsigned height __attribute__ ((unused)))
+{
+ /* TODO */
+}
+
+static void
+find_display (void)
+{
+ auto int hook (struct grub_ieee1275_devalias *alias);
+ int hook (struct grub_ieee1275_devalias *alias)
+ {
+ if (grub_strcmp (alias->type, "display") == 0)
+ {
+ grub_dprintf ("video", "Found display %s\n", alias->path);
+ display = grub_strdup (alias->path);
+ return 1;
+ }
+ return 0;
+ }
+
+ grub_ieee1275_devices_iterate (hook);
+}
+
+static grub_err_t
+grub_video_ieee1275_init (void)
+{
+ grub_ssize_t actual;
+
+ grub_memset (&framebuffer, 0, sizeof(framebuffer));
+
+ if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS)
+ && !grub_ieee1275_get_integer_property (grub_ieee1275_chosen,
+ "stdout", &stdout_ihandle,
+ sizeof (stdout_ihandle), &actual)
+ && actual == sizeof (stdout_ihandle))
+ have_setcolors = 1;
+
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_ieee1275_fini (void)
+{
+ if (restore_needed)
+ {
+ set_video_mode (old_width, old_height);
+ restore_needed = 0;
+ }
+ return grub_video_fb_fini ();
+}
+
+static grub_err_t
+grub_video_ieee1275_fill_mode_info (grub_ieee1275_phandle_t dev,
+ struct grub_video_mode_info *out)
+{
+ grub_uint32_t tmp;
+
+ grub_memset (out, 0, sizeof (*out));
+
+ if (grub_ieee1275_get_integer_property (dev, "width", &tmp,
+ sizeof (tmp), 0))
+ return grub_error (GRUB_ERR_IO, "Couldn't retrieve display width.");
+ out->width = tmp;
+
+ if (grub_ieee1275_get_integer_property (dev, "height", &tmp,
+ sizeof (tmp), 0))
+ return grub_error (GRUB_ERR_IO, "Couldn't retrieve display height.");
+ out->height = tmp;
+
+ if (grub_ieee1275_get_integer_property (dev, "linebytes", &tmp,
+ sizeof (tmp), 0))
+ return grub_error (GRUB_ERR_IO, "Couldn't retrieve display pitch.");
+ out->pitch = tmp;
+
+ out->mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
+ out->bpp = 8;
+ out->bytes_per_pixel = 1;
+ out->number_of_colors = 256;
+
+ out->blit_format = grub_video_get_blit_format (out);
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_ieee1275_setup (unsigned int width, unsigned int height,
+ unsigned int mode_type __attribute__ ((unused)),
+ unsigned int mode_mask __attribute__ ((unused)))
+{
+ grub_uint32_t current_width, current_height, address;
+ grub_err_t err;
+ grub_ieee1275_phandle_t dev;
+
+ if (!display)
+ return grub_error (GRUB_ERR_IO, "Couldn't find display device.");
+
+ if (grub_ieee1275_finddevice (display, &dev))
+ return grub_error (GRUB_ERR_IO, "Couldn't open display device.");
+
+ if (grub_ieee1275_get_integer_property (dev, "width", &current_width,
+ sizeof (current_width), 0))
+ return grub_error (GRUB_ERR_IO, "Couldn't retrieve display width.");
+
+ if (grub_ieee1275_get_integer_property (dev, "height", &current_height,
+ sizeof (current_width), 0))
+ return grub_error (GRUB_ERR_IO, "Couldn't retrieve display height.");
+
+ if ((width == current_width && height == current_height)
+ || (width == 0 && height == 0))
+ {
+ grub_dprintf ("video", "IEEE1275: keeping current mode %dx%d\n",
+ current_width, current_height);
+ }
+ else
+ {
+ grub_dprintf ("video", "IEEE1275: Setting mode %dx%d\n", width, height);
+ /* TODO. */
+ return grub_error (GRUB_ERR_IO, "can't set mode %dx%d", width, height);
+ }
+
+ err = grub_video_ieee1275_fill_mode_info (dev, &framebuffer.mode_info);
+ if (err)
+ {
+ grub_dprintf ("video", "IEEE1275: couldn't fill mode info\n");
+ return err;
+ }
+
+ if (grub_ieee1275_get_integer_property (dev, "address", (void *) &address,
+ sizeof (address), 0))
+ return grub_error (GRUB_ERR_IO, "Couldn't retrieve display address.");
+
+ /* For some reason sparc64 uses 32-bit pointer too. */
+ framebuffer.ptr = (void *) (grub_addr_t) address;
+
+ grub_dprintf ("video", "IEEE1275: initialising FB @ %p %dx%dx%d\n",
+ framebuffer.ptr, framebuffer.mode_info.width,
+ framebuffer.mode_info.height, framebuffer.mode_info.bpp);
+
+ err = grub_video_fb_create_render_target_from_pointer
+ (&framebuffer.render_target, &framebuffer.mode_info, framebuffer.ptr);
+
+ if (err)
+ {
+ grub_dprintf ("video", "IEEE1275: Couldn't create FB target\n");
+ return err;
+ }
+
+ err = grub_video_fb_set_active_render_target (framebuffer.render_target);
+
+ if (err)
+ {
+ grub_dprintf ("video", "IEEE1275: Couldn't set FB target\n");
+ return err;
+ }
+
+ grub_video_ieee1275_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+
+ return err;
+}
+
+static grub_err_t
+grub_video_ieee1275_swap_buffers (void)
+{
+ /* TODO: Implement buffer swapping. */
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_ieee1275_set_active_render_target (struct grub_video_render_target *target)
+{
+ if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
+ target = framebuffer.render_target;
+
+ return grub_video_fb_set_active_render_target (target);
+}
+
+static grub_err_t
+grub_video_ieee1275_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuf)
+{
+ grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
+ *framebuf = (char *) framebuffer.ptr;
+
+ grub_video_fb_fini ();
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_ieee1275_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ grub_err_t err;
+ struct grub_video_palette_data fb_palette_data[256];
+
+ err = grub_video_fb_set_palette (start, count, palette_data);
+ if (err)
+ return err;
+
+ grub_video_fb_get_palette (0, ARRAY_SIZE (fb_palette_data), fb_palette_data);
+
+ /* Set colors. */
+ if (have_setcolors)
+ {
+ unsigned col;
+ for (col = 0; col < ARRAY_SIZE (fb_palette_data); col++)
+ grub_ieee1275_set_color (stdout_ihandle, col, fb_palette_data[col].r,
+ fb_palette_data[col].g,
+ fb_palette_data[col].b);
+ }
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_video_adapter grub_video_ieee1275_adapter =
+ {
+ .name = "IEEE1275 video driver",
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_FIRMWARE,
+
+ .init = grub_video_ieee1275_init,
+ .fini = grub_video_ieee1275_fini,
+ .setup = grub_video_ieee1275_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_ieee1275_get_info_and_fini,
+ .set_palette = grub_video_ieee1275_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_ieee1275_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_ieee1275_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(ieee1275_fb)
+{
+ find_display ();
+ if (display)
+ grub_video_register (&grub_video_ieee1275_adapter);
+}
+
+GRUB_MOD_FINI(ieee1275_fb)
+{
+ if (restore_needed)
+ {
+ set_video_mode (old_width, old_height);
+ restore_needed = 0;
+ }
+ if (display)
+ grub_video_unregister (&grub_video_ieee1275_adapter);
+ grub_free (display);
+}
diff --git a/grub-core/video/readers/jpeg.c b/grub-core/video/readers/jpeg.c
new file mode 100644
index 0000000..8cdb2f6
--- /dev/null
+++ b/grub-core/video/readers/jpeg.c
@@ -0,0 +1,764 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/bitmap.h>
+#include <grub/types.h>
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/bufio.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Uncomment following define to enable JPEG debug. */
+//#define JPEG_DEBUG
+
+#define JPEG_ESC_CHAR 0xFF
+
+#define JPEG_SAMPLING_1x1 0x11
+
+#define JPEG_MARKER_SOI 0xd8
+#define JPEG_MARKER_EOI 0xd9
+#define JPEG_MARKER_DHT 0xc4
+#define JPEG_MARKER_DQT 0xdb
+#define JPEG_MARKER_SOF0 0xc0
+#define JPEG_MARKER_SOS 0xda
+
+#define SHIFT_BITS 8
+#define CONST(x) ((int) ((x) * (1L << SHIFT_BITS) + 0.5))
+
+#define JPEG_UNIT_SIZE 8
+
+static const grub_uint8_t jpeg_zigzag_order[64] = {
+ 0, 1, 8, 16, 9, 2, 3, 10,
+ 17, 24, 32, 25, 18, 11, 4, 5,
+ 12, 19, 26, 33, 40, 48, 41, 34,
+ 27, 20, 13, 6, 7, 14, 21, 28,
+ 35, 42, 49, 56, 57, 50, 43, 36,
+ 29, 22, 15, 23, 30, 37, 44, 51,
+ 58, 59, 52, 45, 38, 31, 39, 46,
+ 53, 60, 61, 54, 47, 55, 62, 63
+};
+
+#ifdef JPEG_DEBUG
+static grub_command_t cmd;
+#endif
+
+typedef int jpeg_data_unit_t[64];
+
+struct grub_jpeg_data
+{
+ grub_file_t file;
+ struct grub_video_bitmap **bitmap;
+
+ int image_width;
+ int image_height;
+
+ grub_uint8_t *huff_value[4];
+ int huff_offset[4][16];
+ int huff_maxval[4][16];
+
+ grub_uint8_t quan_table[2][64];
+ int comp_index[3][3];
+
+ jpeg_data_unit_t ydu[4];
+ jpeg_data_unit_t crdu;
+ jpeg_data_unit_t cbdu;
+
+ int vs, hs;
+
+ int dc_value[3];
+
+ int bit_mask, bit_save;
+};
+
+static grub_uint8_t
+grub_jpeg_get_byte (struct grub_jpeg_data *data)
+{
+ grub_uint8_t r;
+
+ r = 0;
+ grub_file_read (data->file, &r, 1);
+
+ return r;
+}
+
+static grub_uint16_t
+grub_jpeg_get_word (struct grub_jpeg_data *data)
+{
+ grub_uint16_t r;
+
+ r = 0;
+ grub_file_read (data->file, &r, sizeof (grub_uint16_t));
+
+ return grub_be_to_cpu16 (r);
+}
+
+static int
+grub_jpeg_get_bit (struct grub_jpeg_data *data)
+{
+ int ret;
+
+ if (data->bit_mask == 0)
+ {
+ data->bit_save = grub_jpeg_get_byte (data);
+ if (data->bit_save == JPEG_ESC_CHAR)
+ {
+ if (grub_jpeg_get_byte (data) != 0)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: invalid 0xFF in data stream");
+ return 0;
+ }
+ }
+ data->bit_mask = 0x80;
+ }
+
+ ret = ((data->bit_save & data->bit_mask) != 0);
+ data->bit_mask >>= 1;
+ return ret;
+}
+
+static int
+grub_jpeg_get_number (struct grub_jpeg_data *data, int num)
+{
+ int value, i, msb;
+
+ if (num == 0)
+ return 0;
+
+ msb = value = grub_jpeg_get_bit (data);
+ for (i = 1; i < num; i++)
+ value = (value << 1) + (grub_jpeg_get_bit (data) != 0);
+ if (!msb)
+ value += 1 - (1 << num);
+
+ return value;
+}
+
+static int
+grub_jpeg_get_huff_code (struct grub_jpeg_data *data, int id)
+{
+ int code;
+ unsigned i;
+
+ code = 0;
+ for (i = 0; i < ARRAY_SIZE (data->huff_maxval[id]); i++)
+ {
+ code <<= 1;
+ if (grub_jpeg_get_bit (data))
+ code++;
+ if (code < data->huff_maxval[id][i])
+ return data->huff_value[id][code + data->huff_offset[id][i]];
+ }
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: huffman decode fails");
+ return 0;
+}
+
+static grub_err_t
+grub_jpeg_decode_huff_table (struct grub_jpeg_data *data)
+{
+ int id, ac, n, base, ofs;
+ grub_uint32_t next_marker;
+ grub_uint8_t count[16];
+ unsigned i;
+
+ next_marker = data->file->offset;
+ next_marker += grub_jpeg_get_word (data);
+
+ while (data->file->offset + sizeof (count) + 1 <= next_marker)
+ {
+ id = grub_jpeg_get_byte (data);
+ ac = (id >> 4) & 1;
+ id &= 0xF;
+ if (id > 1)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: too many huffman tables");
+
+ if (grub_file_read (data->file, &count, sizeof (count)) !=
+ sizeof (count))
+ return grub_errno;
+
+ n = 0;
+ for (i = 0; i < ARRAY_SIZE (count); i++)
+ n += count[i];
+
+ id += ac * 2;
+ data->huff_value[id] = grub_malloc (n);
+ if (grub_errno)
+ return grub_errno;
+
+ if (grub_file_read (data->file, data->huff_value[id], n) != n)
+ return grub_errno;
+
+ base = 0;
+ ofs = 0;
+ for (i = 0; i < ARRAY_SIZE (count); i++)
+ {
+ base += count[i];
+ ofs += count[i];
+
+ data->huff_maxval[id][i] = base;
+ data->huff_offset[id][i] = ofs - base;
+
+ base <<= 1;
+ }
+ }
+
+ if (data->file->offset != next_marker)
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: extra byte in huffman table");
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_jpeg_decode_quan_table (struct grub_jpeg_data *data)
+{
+ int id;
+ grub_uint32_t next_marker;
+
+ next_marker = data->file->offset;
+ next_marker += grub_jpeg_get_word (data);
+
+ while (data->file->offset + sizeof (data->quan_table[id]) + 1
+ <= next_marker)
+ {
+ id = grub_jpeg_get_byte (data);
+ if (id >= 0x10) /* Upper 4-bit is precision. */
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: only 8-bit precision is supported");
+
+ if (id > 1)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: too many quantization tables");
+
+ if (grub_file_read (data->file, &data->quan_table[id],
+ sizeof (data->quan_table[id]))
+ != sizeof (data->quan_table[id]))
+ return grub_errno;
+
+ }
+
+ if (data->file->offset != next_marker)
+ grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: extra byte in quantization table");
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_jpeg_decode_sof (struct grub_jpeg_data *data)
+{
+ int i, cc;
+ grub_uint32_t next_marker;
+
+ next_marker = data->file->offset;
+ next_marker += grub_jpeg_get_word (data);
+
+ if (grub_jpeg_get_byte (data) != 8)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: only 8-bit precision is supported");
+
+ data->image_height = grub_jpeg_get_word (data);
+ data->image_width = grub_jpeg_get_word (data);
+
+ if ((!data->image_height) || (!data->image_width))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: invalid image size");
+
+ cc = grub_jpeg_get_byte (data);
+ if (cc != 3)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: component count must be 3");
+
+ for (i = 0; i < cc; i++)
+ {
+ int id, ss;
+
+ id = grub_jpeg_get_byte (data) - 1;
+ if ((id < 0) || (id >= 3))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: invalid index");
+
+ ss = grub_jpeg_get_byte (data); /* Sampling factor. */
+ if (!id)
+ {
+ data->vs = ss & 0xF; /* Vertical sampling. */
+ data->hs = ss >> 4; /* Horizontal sampling. */
+ if ((data->vs > 2) || (data->hs > 2))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: sampling method not supported");
+ }
+ else if (ss != JPEG_SAMPLING_1x1)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: sampling method not supported");
+ data->comp_index[id][0] = grub_jpeg_get_byte (data);
+ }
+
+ if (data->file->offset != next_marker)
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: extra byte in sof");
+
+ return grub_errno;
+}
+
+static void
+grub_jpeg_idct_transform (jpeg_data_unit_t du)
+{
+ int *pd;
+ int i;
+ int t0, t1, t2, t3, t4, t5, t6, t7;
+ int v0, v1, v2, v3, v4;
+
+ pd = du;
+ for (i = 0; i < JPEG_UNIT_SIZE; i++, pd++)
+ {
+ if ((pd[JPEG_UNIT_SIZE * 1] | pd[JPEG_UNIT_SIZE * 2] |
+ pd[JPEG_UNIT_SIZE * 3] | pd[JPEG_UNIT_SIZE * 4] |
+ pd[JPEG_UNIT_SIZE * 5] | pd[JPEG_UNIT_SIZE * 6] |
+ pd[JPEG_UNIT_SIZE * 7]) == 0)
+ {
+ pd[JPEG_UNIT_SIZE * 0] <<= SHIFT_BITS;
+
+ pd[JPEG_UNIT_SIZE * 1] = pd[JPEG_UNIT_SIZE * 2]
+ = pd[JPEG_UNIT_SIZE * 3] = pd[JPEG_UNIT_SIZE * 4]
+ = pd[JPEG_UNIT_SIZE * 5] = pd[JPEG_UNIT_SIZE * 6]
+ = pd[JPEG_UNIT_SIZE * 7] = pd[JPEG_UNIT_SIZE * 0];
+
+ continue;
+ }
+
+ t0 = pd[JPEG_UNIT_SIZE * 0];
+ t1 = pd[JPEG_UNIT_SIZE * 2];
+ t2 = pd[JPEG_UNIT_SIZE * 4];
+ t3 = pd[JPEG_UNIT_SIZE * 6];
+
+ v4 = (t1 + t3) * CONST (0.541196100);
+
+ v0 = ((t0 + t2) << SHIFT_BITS);
+ v1 = ((t0 - t2) << SHIFT_BITS);
+ v2 = v4 - t3 * CONST (1.847759065);
+ v3 = v4 + t1 * CONST (0.765366865);
+
+ t0 = v0 + v3;
+ t3 = v0 - v3;
+ t1 = v1 + v2;
+ t2 = v1 - v2;
+
+ t4 = pd[JPEG_UNIT_SIZE * 7];
+ t5 = pd[JPEG_UNIT_SIZE * 5];
+ t6 = pd[JPEG_UNIT_SIZE * 3];
+ t7 = pd[JPEG_UNIT_SIZE * 1];
+
+ v0 = t4 + t7;
+ v1 = t5 + t6;
+ v2 = t4 + t6;
+ v3 = t5 + t7;
+
+ v4 = (v2 + v3) * CONST (1.175875602);
+
+ v0 *= CONST (0.899976223);
+ v1 *= CONST (2.562915447);
+ v2 = v2 * CONST (1.961570560) - v4;
+ v3 = v3 * CONST (0.390180644) - v4;
+
+ t4 = t4 * CONST (0.298631336) - v0 - v2;
+ t5 = t5 * CONST (2.053119869) - v1 - v3;
+ t6 = t6 * CONST (3.072711026) - v1 - v2;
+ t7 = t7 * CONST (1.501321110) - v0 - v3;
+
+ pd[JPEG_UNIT_SIZE * 0] = t0 + t7;
+ pd[JPEG_UNIT_SIZE * 7] = t0 - t7;
+ pd[JPEG_UNIT_SIZE * 1] = t1 + t6;
+ pd[JPEG_UNIT_SIZE * 6] = t1 - t6;
+ pd[JPEG_UNIT_SIZE * 2] = t2 + t5;
+ pd[JPEG_UNIT_SIZE * 5] = t2 - t5;
+ pd[JPEG_UNIT_SIZE * 3] = t3 + t4;
+ pd[JPEG_UNIT_SIZE * 4] = t3 - t4;
+ }
+
+ pd = du;
+ for (i = 0; i < JPEG_UNIT_SIZE; i++, pd += JPEG_UNIT_SIZE)
+ {
+ if ((pd[1] | pd[2] | pd[3] | pd[4] | pd[5] | pd[6] | pd[7]) == 0)
+ {
+ pd[0] >>= (SHIFT_BITS + 3);
+ pd[1] = pd[2] = pd[3] = pd[4] = pd[5] = pd[6] = pd[7] = pd[0];
+ continue;
+ }
+
+ v4 = (pd[2] + pd[6]) * CONST (0.541196100);
+
+ v0 = (pd[0] + pd[4]) << SHIFT_BITS;
+ v1 = (pd[0] - pd[4]) << SHIFT_BITS;
+ v2 = v4 - pd[6] * CONST (1.847759065);
+ v3 = v4 + pd[2] * CONST (0.765366865);
+
+ t0 = v0 + v3;
+ t3 = v0 - v3;
+ t1 = v1 + v2;
+ t2 = v1 - v2;
+
+ t4 = pd[7];
+ t5 = pd[5];
+ t6 = pd[3];
+ t7 = pd[1];
+
+ v0 = t4 + t7;
+ v1 = t5 + t6;
+ v2 = t4 + t6;
+ v3 = t5 + t7;
+
+ v4 = (v2 + v3) * CONST (1.175875602);
+
+ v0 *= CONST (0.899976223);
+ v1 *= CONST (2.562915447);
+ v2 = v2 * CONST (1.961570560) - v4;
+ v3 = v3 * CONST (0.390180644) - v4;
+
+ t4 = t4 * CONST (0.298631336) - v0 - v2;
+ t5 = t5 * CONST (2.053119869) - v1 - v3;
+ t6 = t6 * CONST (3.072711026) - v1 - v2;
+ t7 = t7 * CONST (1.501321110) - v0 - v3;
+
+ pd[0] = (t0 + t7) >> (SHIFT_BITS * 2 + 3);
+ pd[7] = (t0 - t7) >> (SHIFT_BITS * 2 + 3);
+ pd[1] = (t1 + t6) >> (SHIFT_BITS * 2 + 3);
+ pd[6] = (t1 - t6) >> (SHIFT_BITS * 2 + 3);
+ pd[2] = (t2 + t5) >> (SHIFT_BITS * 2 + 3);
+ pd[5] = (t2 - t5) >> (SHIFT_BITS * 2 + 3);
+ pd[3] = (t3 + t4) >> (SHIFT_BITS * 2 + 3);
+ pd[4] = (t3 - t4) >> (SHIFT_BITS * 2 + 3);
+ }
+
+ for (i = 0; i < JPEG_UNIT_SIZE * JPEG_UNIT_SIZE; i++)
+ {
+ du[i] += 128;
+
+ if (du[i] < 0)
+ du[i] = 0;
+ if (du[i] > 255)
+ du[i] = 255;
+ }
+}
+
+static void
+grub_jpeg_decode_du (struct grub_jpeg_data *data, int id, jpeg_data_unit_t du)
+{
+ int h1, h2, qt;
+ unsigned pos;
+
+ grub_memset (du, 0, sizeof (jpeg_data_unit_t));
+
+ qt = data->comp_index[id][0];
+ h1 = data->comp_index[id][1];
+ h2 = data->comp_index[id][2];
+
+ data->dc_value[id] +=
+ grub_jpeg_get_number (data, grub_jpeg_get_huff_code (data, h1));
+
+ du[0] = data->dc_value[id] * (int) data->quan_table[qt][0];
+ pos = 1;
+ while (pos < ARRAY_SIZE (data->quan_table[qt]))
+ {
+ int num, val;
+
+ num = grub_jpeg_get_huff_code (data, h2);
+ if (!num)
+ break;
+
+ val = grub_jpeg_get_number (data, num & 0xF);
+ num >>= 4;
+ pos += num;
+ du[jpeg_zigzag_order[pos]] = val * (int) data->quan_table[qt][pos];
+ pos++;
+ }
+
+ grub_jpeg_idct_transform (du);
+}
+
+static void
+grub_jpeg_ycrcb_to_rgb (int yy, int cr, int cb, grub_uint8_t * rgb)
+{
+ int dd;
+
+ cr -= 128;
+ cb -= 128;
+
+ /* Red */
+ dd = yy + ((cr * CONST (1.402)) >> SHIFT_BITS);
+ if (dd < 0)
+ dd = 0;
+ if (dd > 255)
+ dd = 255;
+ *(rgb++) = dd;
+
+ /* Green */
+ dd = yy - ((cb * CONST (0.34414) + cr * CONST (0.71414)) >> SHIFT_BITS);
+ if (dd < 0)
+ dd = 0;
+ if (dd > 255)
+ dd = 255;
+ *(rgb++) = dd;
+
+ /* Blue */
+ dd = yy + ((cb * CONST (1.772)) >> SHIFT_BITS);
+ if (dd < 0)
+ dd = 0;
+ if (dd > 255)
+ dd = 255;
+ *(rgb++) = dd;
+}
+
+static grub_err_t
+grub_jpeg_decode_sos (struct grub_jpeg_data *data)
+{
+ int i, cc, r1, c1, nr1, nc1, vb, hb;
+ grub_uint8_t *ptr1;
+ grub_uint32_t data_offset;
+
+ data_offset = data->file->offset;
+ data_offset += grub_jpeg_get_word (data);
+
+ cc = grub_jpeg_get_byte (data);
+
+ if (cc != 3)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "jpeg: component count must be 3");
+
+ for (i = 0; i < cc; i++)
+ {
+ int id, ht;
+
+ id = grub_jpeg_get_byte (data) - 1;
+ if ((id < 0) || (id >= 3))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: invalid index");
+
+ ht = grub_jpeg_get_byte (data);
+ data->comp_index[id][1] = (ht >> 4);
+ data->comp_index[id][2] = (ht & 0xF) + 2;
+ }
+
+ grub_jpeg_get_byte (data); /* Skip 3 unused bytes. */
+ grub_jpeg_get_word (data);
+
+ if (data->file->offset != data_offset)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: extra byte in sos");
+
+ if (grub_video_bitmap_create (data->bitmap, data->image_width,
+ data->image_height,
+ GRUB_VIDEO_BLIT_FORMAT_RGB_888))
+ return grub_errno;
+
+ data->bit_mask = 0x0;
+
+ vb = data->vs * 8;
+ hb = data->hs * 8;
+ nr1 = (data->image_height + vb - 1) / vb;
+ nc1 = (data->image_width + hb - 1) / hb;
+
+ ptr1 = (*data->bitmap)->data;
+ for (r1 = 0; r1 < nr1;
+ r1++, ptr1 += (vb * data->image_width - hb * nc1) * 3)
+ for (c1 = 0; c1 < nc1; c1++, ptr1 += hb * 3)
+ {
+ int r2, c2, nr2, nc2;
+ grub_uint8_t *ptr2;
+
+ for (r2 = 0; r2 < data->vs; r2++)
+ for (c2 = 0; c2 < data->hs; c2++)
+ grub_jpeg_decode_du (data, 0, data->ydu[r2 * 2 + c2]);
+
+ grub_jpeg_decode_du (data, 1, data->cbdu);
+ grub_jpeg_decode_du (data, 2, data->crdu);
+
+ if (grub_errno)
+ return grub_errno;
+
+ nr2 = (r1 == nr1 - 1) ? (data->image_height - r1 * vb) : vb;
+ nc2 = (c1 == nc1 - 1) ? (data->image_width - c1 * hb) : hb;
+
+ ptr2 = ptr1;
+ for (r2 = 0; r2 < nr2; r2++, ptr2 += (data->image_width - nc2) * 3)
+ for (c2 = 0; c2 < nc2; c2++, ptr2 += 3)
+ {
+ int i0, yy, cr, cb;
+
+ i0 = (r2 / data->vs) * 8 + (c2 / data->hs);
+ cr = data->crdu[i0];
+ cb = data->cbdu[i0];
+ yy =
+ data->ydu[(r2 / 8) * 2 + (c2 / 8)][(r2 % 8) * 8 + (c2 % 8)];
+
+ grub_jpeg_ycrcb_to_rgb (yy, cr, cb, ptr2);
+ }
+ }
+
+ return grub_errno;
+}
+
+static grub_uint8_t
+grub_jpeg_get_marker (struct grub_jpeg_data *data)
+{
+ grub_uint8_t r;
+
+ r = grub_jpeg_get_byte (data);
+
+ if (r != JPEG_ESC_CHAR)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: invalid maker");
+ return 0;
+ }
+
+ return grub_jpeg_get_byte (data);
+}
+
+static grub_err_t
+grub_jpeg_decode_jpeg (struct grub_jpeg_data *data)
+{
+ if (grub_jpeg_get_marker (data) != JPEG_MARKER_SOI) /* Start Of Image. */
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: invalid jpeg file");
+
+ while (grub_errno == 0)
+ {
+ grub_uint8_t marker;
+
+ marker = grub_jpeg_get_marker (data);
+ if (grub_errno)
+ break;
+
+#ifdef JPEG_DEBUG
+ grub_printf ("jpeg marker: %x\n", marker);
+#endif
+
+ switch (marker)
+ {
+ case JPEG_MARKER_DHT: /* Define Huffman Table. */
+ grub_jpeg_decode_huff_table (data);
+ break;
+ case JPEG_MARKER_DQT: /* Define Quantization Table. */
+ grub_jpeg_decode_quan_table (data);
+ break;
+ case JPEG_MARKER_SOF0: /* Start Of Frame 0. */
+ grub_jpeg_decode_sof (data);
+ break;
+ case JPEG_MARKER_SOS: /* Start Of Scan. */
+ grub_jpeg_decode_sos (data);
+ break;
+ case JPEG_MARKER_EOI: /* End Of Image. */
+ return grub_errno;
+ default: /* Skip unrecognized marker. */
+ {
+ grub_uint16_t sz;
+
+ sz = grub_jpeg_get_word (data);
+ if (grub_errno)
+ return (grub_errno);
+ grub_file_seek (data->file, data->file->offset + sz - 2);
+ }
+ }
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_video_reader_jpeg (struct grub_video_bitmap **bitmap,
+ const char *filename)
+{
+ grub_file_t file;
+ struct grub_jpeg_data *data;
+
+ file = grub_buffile_open (filename, 0);
+ if (!file)
+ return grub_errno;
+
+ data = grub_zalloc (sizeof (*data));
+ if (data != NULL)
+ {
+ int i;
+
+ data->file = file;
+ data->bitmap = bitmap;
+ grub_jpeg_decode_jpeg (data);
+
+ for (i = 0; i < 4; i++)
+ if (data->huff_value[i])
+ grub_free (data->huff_value[i]);
+
+ grub_free (data);
+ }
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_video_bitmap_destroy (*bitmap);
+ *bitmap = 0;
+ }
+
+ grub_file_close (file);
+ return grub_errno;
+}
+
+#if defined(JPEG_DEBUG)
+static grub_err_t
+grub_cmd_jpegtest (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct grub_video_bitmap *bitmap = 0;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ grub_video_reader_jpeg (&bitmap, args[0]);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ grub_video_bitmap_destroy (bitmap);
+
+ return GRUB_ERR_NONE;
+}
+#endif
+
+static struct grub_video_bitmap_reader jpg_reader = {
+ .extension = ".jpg",
+ .reader = grub_video_reader_jpeg,
+ .next = 0
+};
+
+static struct grub_video_bitmap_reader jpeg_reader = {
+ .extension = ".jpeg",
+ .reader = grub_video_reader_jpeg,
+ .next = 0
+};
+
+GRUB_MOD_INIT (jpeg)
+{
+ grub_video_bitmap_reader_register (&jpg_reader);
+ grub_video_bitmap_reader_register (&jpeg_reader);
+#if defined(JPEG_DEBUG)
+ cmd = grub_register_command ("jpegtest", grub_cmd_jpegtest,
+ "FILE", "Tests loading of JPEG bitmap.");
+#endif
+}
+
+GRUB_MOD_FINI (jpeg)
+{
+#if defined(JPEG_DEBUG)
+ grub_unregister_command (cmd);
+#endif
+ grub_video_bitmap_reader_unregister (&jpeg_reader);
+ grub_video_bitmap_reader_unregister (&jpg_reader);
+}
diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c
new file mode 100644
index 0000000..5728651
--- /dev/null
+++ b/grub-core/video/readers/png.c
@@ -0,0 +1,915 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/bitmap.h>
+#include <grub/types.h>
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/bufio.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Uncomment following define to enable PNG debug. */
+//#define PNG_DEBUG
+
+#define PNG_COLOR_MASK_PALETTE 1
+#define PNG_COLOR_MASK_COLOR 2
+#define PNG_COLOR_MASK_ALPHA 4
+
+#define PNG_COLOR_TYPE_GRAY 0
+#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)
+#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR)
+#define PNG_COLOR_TYPE_RGBA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)
+#define PNG_COLOR_TYPE_GRAYA (PNG_COLOR_MASK_ALPHA)
+
+#define PNG_COMPRESSION_BASE 0
+
+#define PNG_INTERLACE_NONE 0
+#define PNG_INTERLACE_ADAM7 1
+
+#define PNG_FILTER_TYPE_BASE 0
+
+#define PNG_FILTER_VALUE_NONE 0
+#define PNG_FILTER_VALUE_SUB 1
+#define PNG_FILTER_VALUE_UP 2
+#define PNG_FILTER_VALUE_AVG 3
+#define PNG_FILTER_VALUE_PAETH 4
+#define PNG_FILTER_VALUE_LAST 5
+
+#define PNG_CHUNK_IHDR 0x49484452
+#define PNG_CHUNK_IDAT 0x49444154
+#define PNG_CHUNK_IEND 0x49454e44
+
+#define Z_DEFLATED 8
+#define Z_FLAG_DICT 32
+
+#define INFLATE_STORED 0
+#define INFLATE_FIXED 1
+#define INFLATE_DYNAMIC 2
+
+#define WSIZE 0x8000
+
+#define DEFLATE_HCLEN_BASE 4
+#define DEFLATE_HCLEN_MAX 19
+#define DEFLATE_HLIT_BASE 257
+#define DEFLATE_HLIT_MAX 288
+#define DEFLATE_HDIST_BASE 1
+#define DEFLATE_HDIST_MAX 30
+
+#define DEFLATE_HUFF_LEN 16
+
+#ifdef PNG_DEBUG
+static grub_command_t cmd;
+#endif
+
+struct huff_table
+{
+ int *values, *maxval, *offset;
+ int num_values, max_length;
+};
+
+struct grub_png_data
+{
+ grub_file_t file;
+ struct grub_video_bitmap **bitmap;
+
+ int bit_count, bit_save;
+
+ grub_uint32_t next_offset;
+
+ int image_width, image_height, bpp, is_16bit, raw_bytes;
+ grub_uint8_t *image_data;
+
+ int inside_idat, idat_remain;
+
+ int code_values[DEFLATE_HLIT_MAX];
+ int code_maxval[DEFLATE_HUFF_LEN];
+ int code_offset[DEFLATE_HUFF_LEN];
+
+ int dist_values[DEFLATE_HDIST_MAX];
+ int dist_maxval[DEFLATE_HUFF_LEN];
+ int dist_offset[DEFLATE_HUFF_LEN];
+
+ struct huff_table code_table;
+ struct huff_table dist_table;
+
+ grub_uint8_t slide[WSIZE];
+ int wp;
+
+ grub_uint8_t *cur_rgb;
+
+ int cur_column, cur_filter, first_line;
+};
+
+static grub_uint32_t
+grub_png_get_dword (struct grub_png_data *data)
+{
+ grub_uint32_t r;
+
+ r = 0;
+ grub_file_read (data->file, &r, sizeof (grub_uint32_t));
+
+ return grub_be_to_cpu32 (r);
+}
+
+static grub_uint8_t
+grub_png_get_byte (struct grub_png_data *data)
+{
+ grub_uint8_t r;
+
+ if ((data->inside_idat) && (data->idat_remain == 0))
+ {
+ grub_uint32_t len, type;
+
+ do
+ {
+ /* Skip crc checksum. */
+ grub_png_get_dword (data);
+
+ if (data->file->offset != data->next_offset)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: chunk size error");
+ return 0;
+ }
+
+ len = grub_png_get_dword (data);
+ type = grub_png_get_dword (data);
+ if (type != PNG_CHUNK_IDAT)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: unexpected end of data");
+ return 0;
+ }
+
+ data->next_offset = data->file->offset + len + 4;
+ }
+ while (len == 0);
+ data->idat_remain = len;
+ }
+
+ r = 0;
+ grub_file_read (data->file, &r, 1);
+
+ if (data->inside_idat)
+ data->idat_remain--;
+
+ return r;
+}
+
+static int
+grub_png_get_bits (struct grub_png_data *data, int num)
+{
+ int code, shift;
+
+ if (data->bit_count == 0)
+ {
+ data->bit_save = grub_png_get_byte (data);
+ data->bit_count = 8;
+ }
+
+ code = 0;
+ shift = 0;
+ while (grub_errno == 0)
+ {
+ int n;
+
+ n = data->bit_count;
+ if (n > num)
+ n = num;
+
+ code += (int) (data->bit_save & ((1 << n) - 1)) << shift;
+ num -= n;
+ if (!num)
+ {
+ data->bit_count -= n;
+ data->bit_save >>= n;
+ break;
+ }
+
+ shift += n;
+
+ data->bit_save = grub_png_get_byte (data);
+ data->bit_count = 8;
+ }
+
+ return code;
+}
+
+static grub_err_t
+grub_png_decode_image_header (struct grub_png_data *data)
+{
+ int color_type;
+ int color_bits;
+
+ data->image_width = grub_png_get_dword (data);
+ data->image_height = grub_png_get_dword (data);
+
+ if ((!data->image_height) || (!data->image_width))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "png: invalid image size");
+
+ color_bits = grub_png_get_byte (data);
+ if ((color_bits != 8) && (color_bits != 16))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: bit depth must be 8 or 16");
+ data->is_16bit = (color_bits == 16);
+
+ color_type = grub_png_get_byte (data);
+ if (color_type == PNG_COLOR_TYPE_RGB)
+ {
+ if (grub_video_bitmap_create (data->bitmap, data->image_width,
+ data->image_height,
+ GRUB_VIDEO_BLIT_FORMAT_RGB_888))
+ return grub_errno;
+ data->bpp = 3;
+ }
+ else if (color_type == PNG_COLOR_TYPE_RGBA)
+ {
+ if (grub_video_bitmap_create (data->bitmap, data->image_width,
+ data->image_height,
+ GRUB_VIDEO_BLIT_FORMAT_RGBA_8888))
+ return grub_errno;
+ data->bpp = 4;
+ }
+ else
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: color type not supported");
+
+ if (data->is_16bit)
+ {
+ data->bpp <<= 1;
+
+ data->image_data = grub_malloc (data->image_height *
+ data->image_width * data->bpp);
+ if (grub_errno)
+ return grub_errno;
+
+ data->cur_rgb = data->image_data;
+ }
+ else
+ {
+ data->image_data = 0;
+ data->cur_rgb = (*data->bitmap)->data;
+ }
+
+ data->raw_bytes = data->image_height * (data->image_width + 1) * data->bpp;
+
+ data->cur_column = 0;
+ data->first_line = 1;
+
+ if (grub_png_get_byte (data) != PNG_COMPRESSION_BASE)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: compression method not supported");
+
+ if (grub_png_get_byte (data) != PNG_FILTER_TYPE_BASE)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: filter method not supported");
+
+ if (grub_png_get_byte (data) != PNG_INTERLACE_NONE)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: interlace method not supported");
+
+ /* Skip crc checksum. */
+ grub_png_get_dword (data);
+
+ return grub_errno;
+}
+
+/* Order of the bit length code lengths. */
+static const grub_uint8_t bitorder[] = {
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
+};
+
+/* Copy lengths for literal codes 257..285. */
+static const int cplens[] = {
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
+};
+
+/* Extra bits for literal codes 257..285. */
+static const grub_uint8_t cplext[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
+ 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99
+}; /* 99==invalid */
+
+/* Copy offsets for distance codes 0..29. */
+static const int cpdist[] = {
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577
+};
+
+/* Extra bits for distance codes. */
+static const grub_uint8_t cpdext[] = {
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
+ 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
+ 12, 12, 13, 13
+};
+
+static void
+grub_png_init_huff_table (struct huff_table *ht, int cur_maxlen,
+ int *cur_values, int *cur_maxval, int *cur_offset)
+{
+ ht->values = cur_values;
+ ht->maxval = cur_maxval;
+ ht->offset = cur_offset;
+ ht->num_values = 0;
+ ht->max_length = cur_maxlen;
+ grub_memset (cur_maxval, 0, sizeof (int) * cur_maxlen);
+}
+
+static void
+grub_png_insert_huff_item (struct huff_table *ht, int code, int len)
+{
+ int i, n;
+
+ if (len == 0)
+ return;
+
+ if (len > ht->max_length)
+ {
+ grub_error (GRUB_ERR_BAD_FILE_TYPE, "png: invalid code length");
+ return;
+ }
+
+ n = 0;
+ for (i = len; i < ht->max_length; i++)
+ n += ht->maxval[i];
+
+ for (i = 0; i < n; i++)
+ ht->values[ht->num_values - i] = ht->values[ht->num_values - i - 1];
+
+ ht->values[ht->num_values - n] = code;
+ ht->num_values++;
+ ht->maxval[len - 1]++;
+}
+
+static void
+grub_png_build_huff_table (struct huff_table *ht)
+{
+ int base, ofs, i;
+
+ base = 0;
+ ofs = 0;
+ for (i = 0; i < ht->max_length; i++)
+ {
+ base += ht->maxval[i];
+ ofs += ht->maxval[i];
+
+ ht->maxval[i] = base;
+ ht->offset[i] = ofs - base;
+
+ base <<= 1;
+ }
+}
+
+static int
+grub_png_get_huff_code (struct grub_png_data *data, struct huff_table *ht)
+{
+ int code, i;
+
+ code = 0;
+ for (i = 0; i < ht->max_length; i++)
+ {
+ code = (code << 1) + grub_png_get_bits (data, 1);
+ if (code < ht->maxval[i])
+ return ht->values[code + ht->offset[i]];
+ }
+ return 0;
+}
+
+static grub_err_t
+grub_png_init_fixed_block (struct grub_png_data *data)
+{
+ int i;
+
+ grub_png_init_huff_table (&data->code_table, DEFLATE_HUFF_LEN,
+ data->code_values, data->code_maxval,
+ data->code_offset);
+
+ for (i = 0; i < 144; i++)
+ grub_png_insert_huff_item (&data->code_table, i, 8);
+
+ for (; i < 256; i++)
+ grub_png_insert_huff_item (&data->code_table, i, 9);
+
+ for (; i < 280; i++)
+ grub_png_insert_huff_item (&data->code_table, i, 7);
+
+ for (; i < DEFLATE_HLIT_MAX; i++)
+ grub_png_insert_huff_item (&data->code_table, i, 8);
+
+ grub_png_build_huff_table (&data->code_table);
+
+ grub_png_init_huff_table (&data->dist_table, DEFLATE_HUFF_LEN,
+ data->dist_values, data->dist_maxval,
+ data->dist_offset);
+
+ for (i = 0; i < DEFLATE_HDIST_MAX; i++)
+ grub_png_insert_huff_item (&data->dist_table, i, 5);
+
+ grub_png_build_huff_table (&data->dist_table);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_png_init_dynamic_block (struct grub_png_data *data)
+{
+ int nl, nd, nb, i, prev;
+ struct huff_table cl;
+ int cl_values[sizeof (bitorder)];
+ int cl_maxval[8];
+ int cl_offset[8];
+ grub_uint8_t lens[DEFLATE_HCLEN_MAX];
+
+ nl = DEFLATE_HLIT_BASE + grub_png_get_bits (data, 5);
+ nd = DEFLATE_HDIST_BASE + grub_png_get_bits (data, 5);
+ nb = DEFLATE_HCLEN_BASE + grub_png_get_bits (data, 4);
+
+ if ((nl > DEFLATE_HLIT_MAX) || (nd > DEFLATE_HDIST_MAX) ||
+ (nb > DEFLATE_HCLEN_MAX))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "png: too much data");
+
+ grub_png_init_huff_table (&cl, 8, cl_values, cl_maxval, cl_offset);
+
+ for (i = 0; i < nb; i++)
+ lens[bitorder[i]] = grub_png_get_bits (data, 3);
+
+ for (; i < DEFLATE_HCLEN_MAX; i++)
+ lens[bitorder[i]] = 0;
+
+ for (i = 0; i < DEFLATE_HCLEN_MAX; i++)
+ grub_png_insert_huff_item (&cl, i, lens[i]);
+
+ grub_png_build_huff_table (&cl);
+
+ grub_png_init_huff_table (&data->code_table, DEFLATE_HUFF_LEN,
+ data->code_values, data->code_maxval,
+ data->code_offset);
+
+ grub_png_init_huff_table (&data->dist_table, DEFLATE_HUFF_LEN,
+ data->dist_values, data->dist_maxval,
+ data->dist_offset);
+
+ prev = 0;
+ for (i = 0; i < nl + nd; i++)
+ {
+ int n, code;
+ struct huff_table *ht;
+
+ if (grub_errno)
+ return grub_errno;
+
+ if (i < nl)
+ {
+ ht = &data->code_table;
+ code = i;
+ }
+ else
+ {
+ ht = &data->dist_table;
+ code = i - nl;
+ }
+
+ n = grub_png_get_huff_code (data, &cl);
+ if (n < 16)
+ {
+ grub_png_insert_huff_item (ht, code, n);
+ prev = n;
+ }
+ else if (n == 16)
+ {
+ int c;
+
+ c = 3 + grub_png_get_bits (data, 2);
+ while (c > 0)
+ {
+ grub_png_insert_huff_item (ht, code++, prev);
+ i++;
+ c--;
+ }
+ i--;
+ }
+ else if (n == 17)
+ i += 3 + grub_png_get_bits (data, 3) - 1;
+ else
+ i += 11 + grub_png_get_bits (data, 7) - 1;
+ }
+
+ grub_png_build_huff_table (&data->code_table);
+ grub_png_build_huff_table (&data->dist_table);
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_png_output_byte (struct grub_png_data *data, grub_uint8_t n)
+{
+ int row_bytes;
+
+ if (--data->raw_bytes < 0)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "image size overflown");
+
+ if (data->cur_column == 0)
+ {
+ if (n >= PNG_FILTER_VALUE_LAST)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "invalid filter value");
+
+ data->cur_filter = n;
+ }
+ else
+ *(data->cur_rgb++) = n;
+
+ data->cur_column++;
+ row_bytes = data->image_width * data->bpp;
+ if (data->cur_column == row_bytes + 1)
+ {
+ grub_uint8_t *blank_line = NULL;
+ grub_uint8_t *cur = data->cur_rgb - row_bytes;
+ grub_uint8_t *left = cur;
+ grub_uint8_t *up;
+
+ if (data->first_line)
+ {
+ blank_line = grub_zalloc (row_bytes);
+ if (blank_line == NULL)
+ return grub_errno;
+
+ up = blank_line;
+ }
+ else
+ up = cur - row_bytes;
+
+ switch (data->cur_filter)
+ {
+ case PNG_FILTER_VALUE_SUB:
+ {
+ int i;
+
+ cur += data->bpp;
+ for (i = data->bpp; i < row_bytes; i++, cur++, left++)
+ *cur += *left;
+
+ break;
+ }
+ case PNG_FILTER_VALUE_UP:
+ {
+ int i;
+
+ for (i = 0; i < row_bytes; i++, cur++, up++)
+ *cur += *up;
+
+ break;
+ }
+ case PNG_FILTER_VALUE_AVG:
+ {
+ int i;
+
+ for (i = 0; i < data->bpp; i++, cur++, up++)
+ *cur += *up >> 1;
+
+ for (; i < row_bytes; i++, cur++, up++, left++)
+ *cur += ((int) *up + (int) *left) >> 1;
+
+ break;
+ }
+ case PNG_FILTER_VALUE_PAETH:
+ {
+ int i;
+ grub_uint8_t *upper_left = up;
+
+ for (i = 0; i < data->bpp; i++, cur++, up++)
+ *cur += *up;
+
+ for (; i < row_bytes; i++, cur++, up++, left++, upper_left++)
+ {
+ int a, b, c, pa, pb, pc;
+
+ a = *left;
+ b = *up;
+ c = *upper_left;
+
+ pa = b - c;
+ pb = a - c;
+ pc = pa + pb;
+
+ if (pa < 0)
+ pa = -pa;
+
+ if (pb < 0)
+ pb = -pb;
+
+ if (pc < 0)
+ pc = -pc;
+
+ *cur += ((pa <= pb) && (pa <= pc)) ? a : (pb <= pc) ? b : c;
+ }
+ }
+ }
+
+ if (blank_line)
+ grub_free (blank_line);
+
+ data->cur_column = 0;
+ data->first_line = 0;
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_png_read_dynamic_block (struct grub_png_data *data)
+{
+ while (grub_errno == 0)
+ {
+ int n;
+
+ n = grub_png_get_huff_code (data, &data->code_table);
+ if (n < 256)
+ {
+ data->slide[data->wp] = n;
+ grub_png_output_byte (data, n);
+
+ data->wp++;
+ if (data->wp >= WSIZE)
+ data->wp = 0;
+ }
+ else if (n == 256)
+ break;
+ else
+ {
+ int len, dist, pos;
+
+ n -= 257;
+ len = cplens[n];
+ if (cplext[n])
+ len += grub_png_get_bits (data, cplext[n]);
+
+ n = grub_png_get_huff_code (data, &data->dist_table);
+ dist = cpdist[n];
+ if (cpdext[n])
+ dist += grub_png_get_bits (data, cpdext[n]);
+
+ pos = data->wp - dist;
+ if (pos < 0)
+ pos += WSIZE;
+
+ while (len > 0)
+ {
+ data->slide[data->wp] = data->slide[pos];
+ grub_png_output_byte (data, data->slide[data->wp]);
+
+ data->wp++;
+ if (data->wp >= WSIZE)
+ data->wp = 0;
+
+ pos++;
+ if (pos >= WSIZE)
+ pos = 0;
+
+ len--;
+ }
+ }
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_png_decode_image_data (struct grub_png_data *data)
+{
+ grub_uint8_t cmf, flg;
+ int final;
+
+ cmf = grub_png_get_byte (data);
+ flg = grub_png_get_byte (data);
+
+ if ((cmf & 0xF) != Z_DEFLATED)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: only support deflate compression method");
+
+ if (flg & Z_FLAG_DICT)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: dictionary not supported");
+
+ do
+ {
+ int block_type;
+
+ final = grub_png_get_bits (data, 1);
+ block_type = grub_png_get_bits (data, 2);
+
+ switch (block_type)
+ {
+ case INFLATE_STORED:
+ {
+ grub_uint16_t i, len;
+
+ data->bit_count = 0;
+ len = grub_png_get_byte (data);
+ len += ((grub_uint16_t) grub_png_get_byte (data)) << 8;
+
+ /* Skip NLEN field. */
+ grub_png_get_byte (data);
+ grub_png_get_byte (data);
+
+ for (i = 0; i < len; i++)
+ grub_png_output_byte (data, grub_png_get_byte (data));
+
+ break;
+ }
+
+ case INFLATE_FIXED:
+ grub_png_init_fixed_block (data);
+ grub_png_read_dynamic_block (data);
+ break;
+
+ case INFLATE_DYNAMIC:
+ grub_png_init_dynamic_block (data);
+ grub_png_read_dynamic_block (data);
+ break;
+
+ default:
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: unknown block type");
+ }
+ }
+ while ((!final) && (grub_errno == 0));
+
+ /* Skip adler checksum. */
+ grub_png_get_dword (data);
+
+ /* Skip crc checksum. */
+ grub_png_get_dword (data);
+
+ return grub_errno;
+}
+
+static const grub_uint8_t png_magic[8] =
+ { 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0x0a };
+
+static void
+grub_png_convert_image (struct grub_png_data *data)
+{
+ int i;
+ grub_uint8_t *d1, *d2;
+
+ d1 = (*data->bitmap)->data;
+ d2 = data->image_data + 1;
+
+ /* Only copy the upper 8 bit. */
+ for (i = 0; i < (data->image_width * data->image_height * data->bpp >> 1);
+ i++, d1++, d2+=2)
+ *d1 = *d2;
+}
+
+static grub_err_t
+grub_png_decode_png (struct grub_png_data *data)
+{
+ grub_uint8_t magic[8];
+
+ if (grub_file_read (data->file, &magic[0], 8) != 8)
+ return grub_errno;
+
+ if (grub_memcmp (magic, png_magic, sizeof (png_magic)))
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE, "png: not a png file");
+
+ while (1)
+ {
+ grub_uint32_t len, type;
+
+ len = grub_png_get_dword (data);
+ type = grub_png_get_dword (data);
+ data->next_offset = data->file->offset + len + 4;
+
+ switch (type)
+ {
+ case PNG_CHUNK_IHDR:
+ grub_png_decode_image_header (data);
+ break;
+
+ case PNG_CHUNK_IDAT:
+ data->inside_idat = 1;
+ data->idat_remain = len;
+ data->bit_count = 0;
+
+ grub_png_decode_image_data (data);
+
+ data->inside_idat = 0;
+ break;
+
+ case PNG_CHUNK_IEND:
+ if (data->is_16bit)
+ grub_png_convert_image (data);
+
+ return grub_errno;
+
+ default:
+ grub_file_seek (data->file, data->file->offset + len + 4);
+ }
+
+ if (grub_errno)
+ break;
+
+ if (data->file->offset != data->next_offset)
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "png: chunk size error");
+ }
+
+ return grub_errno;
+}
+
+static grub_err_t
+grub_video_reader_png (struct grub_video_bitmap **bitmap,
+ const char *filename)
+{
+ grub_file_t file;
+ struct grub_png_data *data;
+
+ file = grub_buffile_open (filename, 0);
+ if (!file)
+ return grub_errno;
+
+ data = grub_zalloc (sizeof (*data));
+ if (data != NULL)
+ {
+ data->file = file;
+ data->bitmap = bitmap;
+
+ grub_png_decode_png (data);
+
+ grub_free (data->image_data);
+ grub_free (data);
+ }
+
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_video_bitmap_destroy (*bitmap);
+ *bitmap = 0;
+ }
+
+ grub_file_close (file);
+ return grub_errno;
+}
+
+#if defined(PNG_DEBUG)
+static grub_err_t
+grub_cmd_pngtest (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct grub_video_bitmap *bitmap = 0;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ grub_video_reader_png (&bitmap, args[0]);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ grub_video_bitmap_destroy (bitmap);
+
+ return GRUB_ERR_NONE;
+}
+#endif
+
+static struct grub_video_bitmap_reader png_reader = {
+ .extension = ".png",
+ .reader = grub_video_reader_png,
+ .next = 0
+};
+
+GRUB_MOD_INIT (png)
+{
+ grub_video_bitmap_reader_register (&png_reader);
+#if defined(PNG_DEBUG)
+ cmd = grub_register_command ("pngtest", grub_cmd_pngtest,
+ "FILE",
+ "Tests loading of PNG bitmap.");
+#endif
+}
+
+GRUB_MOD_FINI (png)
+{
+#if defined(PNG_DEBUG)
+ grub_unregister_command (cmd);
+#endif
+ grub_video_bitmap_reader_unregister (&png_reader);
+}
diff --git a/grub-core/video/readers/tga.c b/grub-core/video/readers/tga.c
new file mode 100644
index 0000000..84be68a
--- /dev/null
+++ b/grub-core/video/readers/tga.c
@@ -0,0 +1,497 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/bitmap.h>
+#include <grub/types.h>
+#include <grub/normal.h>
+#include <grub/dl.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/bufio.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* Uncomment following define to enable TGA debug. */
+//#define TGA_DEBUG
+
+#if defined(TGA_DEBUG)
+#define dump_int_field(x) grub_printf( #x " = %d (0x%04x)\n", x, x);
+static grub_command_t cmd;
+#endif
+
+enum
+{
+ GRUB_TGA_IMAGE_TYPE_NONE = 0,
+ GRUB_TGA_IMAGE_TYPE_UNCOMPRESSED_INDEXCOLOR = 1,
+ GRUB_TGA_IMAGE_TYPE_UNCOMPRESSED_TRUECOLOR = 2,
+ GRUB_TGA_IMAGE_TYPE_UNCOMPRESSED_BLACK_AND_WHITE = 3,
+ GRUB_TGA_IMAGE_TYPE_RLE_INDEXCOLOR = 9,
+ GRUB_TGA_IMAGE_TYPE_RLE_TRUECOLOR = 10,
+ GRUB_TGA_IMAGE_TYPE_RLE_BLACK_AND_WHITE = 11,
+};
+
+enum
+{
+ GRUB_TGA_COLOR_MAP_TYPE_NONE = 0,
+ GRUB_TGA_COLOR_MAP_TYPE_INCLUDED = 1
+};
+
+enum
+{
+ GRUB_TGA_IMAGE_ORIGIN_RIGHT = 0x10,
+ GRUB_TGA_IMAGE_ORIGIN_TOP = 0x20
+};
+
+struct grub_tga_header
+{
+ grub_uint8_t id_length;
+ grub_uint8_t color_map_type;
+ grub_uint8_t image_type;
+
+ /* Color Map Specification. */
+ grub_uint16_t color_map_first_index;
+ grub_uint16_t color_map_length;
+ grub_uint8_t color_map_bpp;
+
+ /* Image Specification. */
+ grub_uint16_t image_x_origin;
+ grub_uint16_t image_y_origin;
+ grub_uint16_t image_width;
+ grub_uint16_t image_height;
+ grub_uint8_t image_bpp;
+ grub_uint8_t image_descriptor;
+} __attribute__ ((packed));
+
+static grub_err_t
+tga_load_truecolor_rle_R8G8B8 (struct grub_video_bitmap *bitmap,
+ struct grub_tga_header *header,
+ grub_file_t file)
+{
+ unsigned int x;
+ unsigned int y;
+ grub_uint8_t type;
+ grub_uint8_t *ptr;
+ grub_uint8_t tmp[4]; /* Size should be max_bpp / 8. */
+ grub_uint8_t bytes_per_pixel;
+
+ bytes_per_pixel = header->image_bpp / 8;
+
+ for (y = 0; y < header->image_height; y++)
+ {
+ ptr = bitmap->data;
+ if ((header->image_descriptor & GRUB_TGA_IMAGE_ORIGIN_TOP) != 0)
+ ptr += y * bitmap->mode_info.pitch;
+ else
+ ptr += (header->image_height - 1 - y) * bitmap->mode_info.pitch;
+
+ for (x = 0; x < header->image_width;)
+ {
+ if (grub_file_read (file, &type, sizeof (type)) != sizeof(type))
+ return grub_errno;
+
+ if (type & 0x80)
+ {
+ /* RLE-encoded packet. */
+ type &= 0x7f;
+ type++;
+
+ if (grub_file_read (file, &tmp[0], bytes_per_pixel)
+ != bytes_per_pixel)
+ return grub_errno;
+
+ while (type)
+ {
+ if (x < header->image_width)
+ {
+ ptr[0] = tmp[2];
+ ptr[1] = tmp[1];
+ ptr[2] = tmp[0];
+ ptr += 3;
+ }
+
+ type--;
+ x++;
+ }
+ }
+ else
+ {
+ /* RAW-encoded packet. */
+ type++;
+
+ while (type)
+ {
+ if (grub_file_read (file, &tmp[0], bytes_per_pixel)
+ != bytes_per_pixel)
+ return grub_errno;
+
+ if (x < header->image_width)
+ {
+ ptr[0] = tmp[2];
+ ptr[1] = tmp[1];
+ ptr[2] = tmp[0];
+ ptr += 3;
+ }
+
+ type--;
+ x++;
+ }
+ }
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+tga_load_truecolor_rle_R8G8B8A8 (struct grub_video_bitmap *bitmap,
+ struct grub_tga_header *header,
+ grub_file_t file)
+{
+ unsigned int x;
+ unsigned int y;
+ grub_uint8_t type;
+ grub_uint8_t *ptr;
+ grub_uint8_t tmp[4]; /* Size should be max_bpp / 8. */
+ grub_uint8_t bytes_per_pixel;
+
+ bytes_per_pixel = header->image_bpp / 8;
+
+ for (y = 0; y < header->image_height; y++)
+ {
+ ptr = bitmap->data;
+ if ((header->image_descriptor & GRUB_TGA_IMAGE_ORIGIN_TOP) != 0)
+ ptr += y * bitmap->mode_info.pitch;
+ else
+ ptr += (header->image_height - 1 - y) * bitmap->mode_info.pitch;
+
+ for (x = 0; x < header->image_width;)
+ {
+ if (grub_file_read (file, &type, sizeof (type)) != sizeof(type))
+ return grub_errno;
+
+ if (type & 0x80)
+ {
+ /* RLE-encoded packet. */
+ type &= 0x7f;
+ type++;
+
+ if (grub_file_read (file, &tmp[0], bytes_per_pixel)
+ != bytes_per_pixel)
+ return grub_errno;
+
+ while (type)
+ {
+ if (x < header->image_width)
+ {
+ ptr[0] = tmp[2];
+ ptr[1] = tmp[1];
+ ptr[2] = tmp[0];
+ ptr[3] = tmp[3];
+ ptr += 4;
+ }
+
+ type--;
+ x++;
+ }
+ }
+ else
+ {
+ /* RAW-encoded packet. */
+ type++;
+
+ while (type)
+ {
+ if (grub_file_read (file, &tmp[0], bytes_per_pixel)
+ != bytes_per_pixel)
+ return grub_errno;
+
+ if (x < header->image_width)
+ {
+ ptr[0] = tmp[2];
+ ptr[1] = tmp[1];
+ ptr[2] = tmp[0];
+ ptr[3] = tmp[3];
+ ptr += 4;
+ }
+
+ type--;
+ x++;
+ }
+ }
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+tga_load_truecolor_R8G8B8 (struct grub_video_bitmap *bitmap,
+ struct grub_tga_header *header,
+ grub_file_t file)
+{
+ unsigned int x;
+ unsigned int y;
+ grub_uint8_t *ptr;
+ grub_uint8_t tmp[4]; /* Size should be max_bpp / 8. */
+ grub_uint8_t bytes_per_pixel;
+
+ bytes_per_pixel = header->image_bpp / 8;
+
+ for (y = 0; y < header->image_height; y++)
+ {
+ ptr = bitmap->data;
+ if ((header->image_descriptor & GRUB_TGA_IMAGE_ORIGIN_TOP) != 0)
+ ptr += y * bitmap->mode_info.pitch;
+ else
+ ptr += (header->image_height - 1 - y) * bitmap->mode_info.pitch;
+
+ for (x = 0; x < header->image_width; x++)
+ {
+ if (grub_file_read (file, &tmp[0], bytes_per_pixel)
+ != bytes_per_pixel)
+ return grub_errno;
+
+ ptr[0] = tmp[2];
+ ptr[1] = tmp[1];
+ ptr[2] = tmp[0];
+
+ ptr += 3;
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+tga_load_truecolor_R8G8B8A8 (struct grub_video_bitmap *bitmap,
+ struct grub_tga_header *header,
+ grub_file_t file)
+{
+ unsigned int x;
+ unsigned int y;
+ grub_uint8_t *ptr;
+ grub_uint8_t tmp[4]; /* Size should be max_bpp / 8. */
+ grub_uint8_t bytes_per_pixel;
+
+ bytes_per_pixel = header->image_bpp / 8;
+
+ for (y = 0; y < header->image_height; y++)
+ {
+ ptr = bitmap->data;
+ if ((header->image_descriptor & GRUB_TGA_IMAGE_ORIGIN_TOP) != 0)
+ ptr += y * bitmap->mode_info.pitch;
+ else
+ ptr += (header->image_height - 1 - y) * bitmap->mode_info.pitch;
+
+ for (x = 0; x < header->image_width; x++)
+ {
+ if (grub_file_read (file, &tmp[0], bytes_per_pixel)
+ != bytes_per_pixel)
+ return grub_errno;
+
+ ptr[0] = tmp[2];
+ ptr[1] = tmp[1];
+ ptr[2] = tmp[0];
+ ptr[3] = tmp[3];
+
+ ptr += 4;
+ }
+ }
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_reader_tga (struct grub_video_bitmap **bitmap,
+ const char *filename)
+{
+ grub_file_t file;
+ grub_ssize_t pos;
+ struct grub_tga_header header;
+ int has_alpha;
+
+ file = grub_buffile_open (filename, 0);
+ if (! file)
+ return grub_errno;
+
+ /* TGA Specification states that we SHOULD start by reading
+ ID from end of file, but we really don't care about that as we are
+ not going to support developer area & extensions at this point. */
+
+ /* Read TGA header from beginning of file. */
+ if (grub_file_read (file, &header, sizeof (header))
+ != sizeof (header))
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+
+ /* Skip ID field. */
+ pos = grub_file_tell (file);
+ pos += header.id_length;
+ grub_file_seek (file, pos);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+
+#if defined(TGA_DEBUG)
+ grub_printf("tga: header\n");
+ dump_int_field(header.id_length);
+ dump_int_field(header.color_map_type);
+ dump_int_field(header.image_type);
+ dump_int_field(header.color_map_first_index);
+ dump_int_field(header.color_map_length);
+ dump_int_field(header.color_map_bpp);
+ dump_int_field(header.image_x_origin);
+ dump_int_field(header.image_y_origin);
+ dump_int_field(header.image_width);
+ dump_int_field(header.image_height);
+ dump_int_field(header.image_bpp);
+ dump_int_field(header.image_descriptor);
+#endif
+
+ /* Check that bitmap encoding is supported. */
+ switch (header.image_type)
+ {
+ case GRUB_TGA_IMAGE_TYPE_UNCOMPRESSED_TRUECOLOR:
+ case GRUB_TGA_IMAGE_TYPE_RLE_TRUECOLOR:
+ break;
+
+ default:
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "unsupported bitmap format (unknown encoding)");
+ }
+
+ /* Check that bitmap depth is supported. */
+ switch (header.image_bpp)
+ {
+ case 24:
+ has_alpha = 0;
+ break;
+
+ case 32:
+ has_alpha = 1;
+ break;
+
+ default:
+ grub_file_close (file);
+ return grub_error (GRUB_ERR_BAD_FILE_TYPE,
+ "unsupported bitmap format (bpp=%d)",
+ header.image_bpp);
+ }
+
+ /* Allocate bitmap. If there is alpha information store it too. */
+ if (has_alpha)
+ {
+ grub_video_bitmap_create (bitmap, header.image_width,
+ header.image_height,
+ GRUB_VIDEO_BLIT_FORMAT_RGBA_8888);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+
+ /* Load bitmap data. */
+ switch (header.image_type)
+ {
+ case GRUB_TGA_IMAGE_TYPE_UNCOMPRESSED_TRUECOLOR:
+ tga_load_truecolor_R8G8B8A8 (*bitmap, &header, file);
+ break;
+
+ case GRUB_TGA_IMAGE_TYPE_RLE_TRUECOLOR:
+ tga_load_truecolor_rle_R8G8B8A8 (*bitmap, &header, file);
+ break;
+ }
+ }
+ else
+ {
+ grub_video_bitmap_create (bitmap, header.image_width,
+ header.image_height,
+ GRUB_VIDEO_BLIT_FORMAT_RGB_888);
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_file_close (file);
+ return grub_errno;
+ }
+
+ /* Load bitmap data. */
+ switch (header.image_type)
+ {
+ case GRUB_TGA_IMAGE_TYPE_UNCOMPRESSED_TRUECOLOR:
+ tga_load_truecolor_R8G8B8 (*bitmap, &header, file);
+ break;
+
+ case GRUB_TGA_IMAGE_TYPE_RLE_TRUECOLOR:
+ tga_load_truecolor_rle_R8G8B8 (*bitmap, &header, file);
+ break;
+ }
+ }
+
+ /* If there was a loading problem, destroy bitmap. */
+ if (grub_errno != GRUB_ERR_NONE)
+ {
+ grub_video_bitmap_destroy (*bitmap);
+ *bitmap = 0;
+ }
+
+ grub_file_close (file);
+ return grub_errno;
+}
+
+#if defined(TGA_DEBUG)
+static grub_err_t
+grub_cmd_tgatest (grub_command_t cmd __attribute__ ((unused)),
+ int argc, char **args)
+{
+ struct grub_video_bitmap *bitmap = 0;
+
+ if (argc != 1)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
+
+ grub_video_reader_tga (&bitmap, args[0]);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ grub_video_bitmap_destroy (bitmap);
+
+ return GRUB_ERR_NONE;
+}
+#endif
+
+static struct grub_video_bitmap_reader tga_reader = {
+ .extension = ".tga",
+ .reader = grub_video_reader_tga,
+ .next = 0
+};
+
+GRUB_MOD_INIT(tga)
+{
+ grub_video_bitmap_reader_register (&tga_reader);
+#if defined(TGA_DEBUG)
+ cmd = grub_register_command ("tgatest", grub_cmd_tgatest,
+ "FILE", "Tests loading of TGA bitmap.");
+#endif
+}
+
+GRUB_MOD_FINI(tga)
+{
+#if defined(TGA_DEBUG)
+ grub_unregister_command (cmd);
+#endif
+ grub_video_bitmap_reader_unregister (&tga_reader);
+}
diff --git a/grub-core/video/sm712.c b/grub-core/video/sm712.c
new file mode 100644
index 0000000..60f2c90
--- /dev/null
+++ b/grub-core/video/sm712.c
@@ -0,0 +1,787 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define grub_video_render_target grub_video_fbrender_target
+
+#include <grub/err.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/video.h>
+#include <grub/video_fb.h>
+#include <grub/pci.h>
+#include <grub/vga.h>
+
+#include "sm712_init.c"
+
+#define GRUB_SM712_TOTAL_MEMORY_SPACE 0x700400
+#define GRUB_SM712_REG_BASE 0x700000
+#define GRUB_SM712_PCIID 0x0712126f
+
+enum
+ {
+ GRUB_SM712_SR_TV_CONTROL = 0x65,
+ GRUB_SM712_SR_RAM_LUT = 0x66,
+ GRUB_SM712_SR_CLOCK_CONTROL1 = 0x68,
+ GRUB_SM712_SR_CLOCK_CONTROL2 = 0x69,
+ GRUB_SM712_SR_VCLK_NUM = 0x6c,
+ GRUB_SM712_SR_VCLK_DENOM = 0x6d,
+ GRUB_SM712_SR_VCLK2_NUM = 0x6e,
+ GRUB_SM712_SR_VCLK2_DENOM = 0x6f,
+ GRUB_SM712_SR_POPUP_ICON_LOW = 0x80,
+ GRUB_SM712_SR_POPUP_ICON_HIGH = 0x81,
+ GRUB_SM712_SR_POPUP_ICON_CTRL = 0x82,
+ GRUB_SM712_SR_POPUP_ICON_COLOR1 = 0x84,
+ GRUB_SM712_SR_POPUP_ICON_COLOR2 = 0x85,
+ GRUB_SM712_SR_POPUP_ICON_COLOR3 = 0x86,
+
+ GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_X_LOW = 0x88,
+ GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_X_HIGH = 0x89,
+ GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_Y_LOW = 0x8a,
+ GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_Y_HIGH = 0x8b,
+ GRUB_SM712_SR_HW_CURSOR_FG_COLOR = 0x8c,
+ GRUB_SM712_SR_HW_CURSOR_BG_COLOR = 0x8d,
+
+ GRUB_SM712_SR_POPUP_ICON_X_LOW = 0x90,
+ GRUB_SM712_SR_POPUP_ICON_X_HIGH = 0x91,
+ GRUB_SM712_SR_POPUP_ICON_Y_LOW = 0x92,
+ GRUB_SM712_SR_POPUP_ICON_Y_HIGH = 0x93,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_CONTROL = 0xa0,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_LOW = 0xa1,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_HIGH = 0xa2,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_MASK_LOW = 0xa3,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_MASK_HIGH = 0xa4,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_RED_CONSTANT = 0xa5,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_GREEN_CONSTANT = 0xa6,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_BLUE_CONSTANT = 0xa7,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_TOP_BOUNDARY = 0xa8,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_LEFT_BOUNDARY = 0xa9,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_BOTTOM_BOUNDARY = 0xaa,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_RIGHT_BOUNDARY = 0xab,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_TOP_LEFT_OVERFLOW_BOUNDARY = 0xac,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_BOTTOM_RIGHT_OVERFLOW_BOUNDARY = 0xad,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_VERTICAL_STRETCH_FACTOR = 0xae,
+ GRUB_SM712_SR_PANEL_HW_VIDEO_HORIZONTAL_STRETCH_FACTOR = 0xaf,
+ };
+enum
+ {
+ GRUB_SM712_SR_TV_CRT_SRAM = 0x00,
+ GRUB_SM712_SR_TV_LCD_SRAM = 0x08
+ };
+enum
+ {
+ GRUB_SM712_SR_TV_ALT_CLOCK = 0x00,
+ GRUB_SM712_SR_TV_FREE_RUN_CLOCK = 0x04
+ };
+enum
+ {
+ GRUB_SM712_SR_TV_CLOCK_CKIN_NTSC = 0x00,
+ GRUB_SM712_SR_TV_CLOCK_REFCLK_PAL = 0x04
+ };
+enum
+ {
+ GRUB_SM712_SR_TV_HSYNC = 0x00,
+ GRUB_SM712_SR_TV_COMPOSITE_HSYNC = 0x01
+ };
+enum
+ {
+ GRUB_SM712_SR_RAM_LUT_NORMAL = 0,
+ GRUB_SM712_SR_RAM_LUT_LCD_RAM_OFF = 0x80,
+ GRUB_SM712_SR_RAM_LUT_CRT_RAM_OFF = 0x40,
+ GRUB_SM712_SR_RAM_LUT_LCD_RAM_NO_WRITE = 0x20,
+ GRUB_SM712_SR_RAM_LUT_CRT_RAM_NO_WRITE = 0x10,
+ GRUB_SM712_SR_RAM_LUT_CRT_8BIT = 0x08,
+ GRUB_SM712_SR_RAM_LUT_CRT_GAMMA = 0x04
+ };
+
+enum
+ {
+ GRUB_SM712_SR_CLOCK_CONTROL1_VCLK_FROM_CCR = 0x40,
+ GRUB_SM712_SR_CLOCK_CONTROL1_8DOT_CLOCK = 0x10,
+ };
+
+enum
+ {
+ GRUB_SM712_SR_CLOCK_CONTROL2_PROGRAM_VCLOCK = 0x03
+ };
+
+#define GRUB_SM712_SR_POPUP_ICON_HIGH_MASK 0x7
+#define GRUB_SM712_SR_POPUP_ICON_HIGH_HW_CURSOR_EN 0x80
+ enum
+ {
+ GRUB_SM712_SR_POPUP_ICON_CTRL_DISABLED = 0,
+ GRUB_SM712_SR_POPUP_ICON_CTRL_ZOOM_ENABLED = 0x40,
+ GRUB_SM712_SR_POPUP_ICON_CTRL_ENABLED = 0x80
+ };
+#define RGB332_BLACK 0
+#define RGB332_WHITE 0xff
+
+ enum
+ {
+ GRUB_SM712_CR_OVERFLOW_INTERLACE = 0x30,
+ GRUB_SM712_CR_INTERLACE_RETRACE = 0x31,
+ GRUB_SM712_CR_TV_VDISPLAY_START = 0x32,
+ GRUB_SM712_CR_TV_VDISPLAY_END_HIGH = 0x33,
+ GRUB_SM712_CR_TV_VDISPLAY_END_LOW = 0x34,
+ GRUB_SM712_CR_DDA_CONTROL_LOW = 0x35,
+ GRUB_SM712_CR_DDA_CONTROL_HIGH = 0x36,
+ GRUB_SM712_CR_TV_EQUALIZER = 0x38,
+ GRUB_SM712_CR_TV_SERRATION = 0x39,
+ GRUB_SM712_CR_HSYNC_CTRL = 0x3a,
+ GRUB_SM712_CR_DEBUG = 0x3c,
+ GRUB_SM712_CR_SHADOW_VGA_HTOTAL = 0x40,
+ GRUB_SM712_CR_SHADOW_VGA_HBLANK_START = 0x41,
+ GRUB_SM712_CR_SHADOW_VGA_HBLANK_END = 0x42,
+ GRUB_SM712_CR_SHADOW_VGA_HRETRACE_START = 0x43,
+ GRUB_SM712_CR_SHADOW_VGA_HRETRACE_END = 0x44,
+ GRUB_SM712_CR_SHADOW_VGA_VERTICAL_TOTAL = 0x45,
+ GRUB_SM712_CR_SHADOW_VGA_VBLANK_START = 0x46,
+ GRUB_SM712_CR_SHADOW_VGA_VBLANK_END = 0x47,
+ GRUB_SM712_CR_SHADOW_VGA_VRETRACE_START = 0x48,
+ GRUB_SM712_CR_SHADOW_VGA_VRETRACE_END = 0x49,
+ GRUB_SM712_CR_SHADOW_VGA_OVERFLOW = 0x4a,
+ GRUB_SM712_CR_SHADOW_VGA_CELL_HEIGHT = 0x4b,
+ GRUB_SM712_CR_SHADOW_VGA_HDISPLAY_END = 0x4c,
+ GRUB_SM712_CR_SHADOW_VGA_VDISPLAY_END = 0x4d,
+ GRUB_SM712_CR_DDA_LOOKUP_REG3_START = 0x90,
+ GRUB_SM712_CR_DDA_LOOKUP_REG2_START = 0x91,
+ GRUB_SM712_CR_DDA_LOOKUP_REG1_START = 0xa0,
+ GRUB_SM712_CR_VCENTERING_OFFSET = 0xa6,
+ GRUB_SM712_CR_HCENTERING_OFFSET = 0xa7,
+ };
+
+#define GRUB_SM712_CR_DEBUG_NONE 0
+
+#define SM712_DDA_REG3_COMPARE_SHIFT 2
+#define SM712_DDA_REG3_COMPARE_MASK 0xfc
+#define SM712_DDA_REG3_DDA_SHIFT 8
+#define SM712_DDA_REG3_DDA_MASK 0x3
+#define SM712_DDA_REG2_DDA_MASK 0xff
+#define SM712_DDA_REG2_VCENTER_MASK 0x3f
+
+static struct
+{
+ grub_uint8_t compare;
+ grub_uint16_t dda;
+ grub_uint8_t vcentering;
+} dda_lookups[] = {
+ { 21, 469, 2},
+ { 23, 477, 2},
+ { 33, 535, 2},
+ { 35, 682, 21},
+ { 34, 675, 2},
+ { 55, 683, 6},
+};
+
+static struct
+{
+ struct grub_video_mode_info mode_info;
+ struct grub_video_render_target *render_target;
+
+ grub_uint8_t *ptr;
+ int mapped;
+ grub_uint32_t base;
+ grub_pci_device_t dev;
+} framebuffer;
+
+#ifndef TEST
+static grub_err_t
+grub_video_sm712_video_init (void)
+{
+ /* Reset frame buffer. */
+ grub_memset (&framebuffer, 0, sizeof(framebuffer));
+
+ return grub_video_fb_init ();
+}
+
+static grub_err_t
+grub_video_sm712_video_fini (void)
+{
+ if (framebuffer.mapped)
+ grub_pci_device_unmap_range (framebuffer.dev, framebuffer.ptr,
+ GRUB_SM712_TOTAL_MEMORY_SPACE);
+
+ return grub_video_fb_fini ();
+}
+#endif
+
+static inline void
+grub_sm712_write_reg (grub_uint8_t val, grub_uint16_t addr)
+{
+#ifdef TEST
+ printf (" {1, 0x%x, 0x%x},\n", addr, val);
+#else
+ *(volatile grub_uint8_t *) (framebuffer.ptr + GRUB_SM712_REG_BASE
+ + addr) = val;
+#endif
+}
+
+static inline grub_uint8_t
+grub_sm712_read_reg (grub_uint16_t addr)
+{
+#ifdef TEST
+ printf (" {-1, 0x%x, 0x5},\n", addr);
+#else
+ return *(volatile grub_uint8_t *) (framebuffer.ptr + GRUB_SM712_REG_BASE
+ + addr);
+#endif
+}
+
+static inline grub_uint8_t
+grub_sm712_sr_read (grub_uint8_t addr)
+{
+ grub_sm712_write_reg (addr, GRUB_VGA_IO_SR_INDEX);
+ return grub_sm712_read_reg (GRUB_VGA_IO_SR_DATA);
+}
+
+static inline void
+grub_sm712_sr_write (grub_uint8_t val, grub_uint8_t addr)
+{
+ grub_sm712_write_reg (addr, GRUB_VGA_IO_SR_INDEX);
+ grub_sm712_write_reg (val, GRUB_VGA_IO_SR_DATA);
+}
+
+static inline void
+grub_sm712_gr_write (grub_uint8_t val, grub_uint8_t addr)
+{
+ grub_sm712_write_reg (addr, GRUB_VGA_IO_GR_INDEX);
+ grub_sm712_write_reg (val, GRUB_VGA_IO_GR_DATA);
+}
+
+static inline void
+grub_sm712_cr_write (grub_uint8_t val, grub_uint8_t addr)
+{
+ grub_sm712_write_reg (addr, GRUB_VGA_IO_CR_INDEX);
+ grub_sm712_write_reg (val, GRUB_VGA_IO_CR_DATA);
+}
+
+static inline void
+grub_sm712_write_arx (grub_uint8_t val, grub_uint8_t addr)
+{
+ grub_sm712_read_reg (GRUB_VGA_IO_INPUT_STATUS1_REGISTER);
+ grub_sm712_write_reg (addr, GRUB_VGA_IO_ARX);
+ grub_sm712_read_reg (GRUB_VGA_IO_ARX_READ);
+ grub_sm712_write_reg (val, GRUB_VGA_IO_ARX);
+}
+
+static inline void
+grub_sm712_cr_shadow_write (grub_uint8_t val, grub_uint8_t addr)
+{
+ grub_uint8_t mapping[] =
+ {
+ [GRUB_VGA_CR_HTOTAL] = GRUB_SM712_CR_SHADOW_VGA_HTOTAL,
+ [GRUB_VGA_CR_HORIZ_END] = 0xff,
+ [GRUB_VGA_CR_HBLANK_START] = GRUB_SM712_CR_SHADOW_VGA_HBLANK_START,
+ [GRUB_VGA_CR_HBLANK_END] = GRUB_SM712_CR_SHADOW_VGA_HBLANK_END,
+ [GRUB_VGA_CR_HORIZ_SYNC_PULSE_START] = GRUB_SM712_CR_SHADOW_VGA_HRETRACE_START,
+ [GRUB_VGA_CR_HORIZ_SYNC_PULSE_END] = GRUB_SM712_CR_SHADOW_VGA_HRETRACE_END,
+ [GRUB_VGA_CR_VERT_TOTAL] = GRUB_SM712_CR_SHADOW_VGA_VERTICAL_TOTAL,
+ [GRUB_VGA_CR_OVERFLOW] = GRUB_SM712_CR_SHADOW_VGA_OVERFLOW,
+ [GRUB_VGA_CR_BYTE_PANNING] = 0xff,
+ [GRUB_VGA_CR_CELL_HEIGHT] = GRUB_SM712_CR_SHADOW_VGA_CELL_HEIGHT,
+ [GRUB_VGA_CR_CURSOR_START] = 0xff,
+ [GRUB_VGA_CR_CURSOR_END] = 0xff,
+ [GRUB_VGA_CR_START_ADDR_HIGH_REGISTER] = 0xff,
+ [GRUB_VGA_CR_START_ADDR_LOW_REGISTER] = 0xff,
+ [GRUB_VGA_CR_CURSOR_ADDR_HIGH] = 0xff,
+ [GRUB_VGA_CR_CURSOR_ADDR_LOW] = 0xff,
+ [GRUB_VGA_CR_VSYNC_START] = GRUB_SM712_CR_SHADOW_VGA_VRETRACE_START,
+ [GRUB_VGA_CR_VSYNC_END] = GRUB_SM712_CR_SHADOW_VGA_VRETRACE_END,
+ [GRUB_VGA_CR_VDISPLAY_END] = GRUB_SM712_CR_SHADOW_VGA_VDISPLAY_END,
+ [GRUB_VGA_CR_PITCH] = GRUB_SM712_CR_SHADOW_VGA_HDISPLAY_END,
+ [GRUB_VGA_CR_UNDERLINE_LOCATION] = 0xff,
+
+ [GRUB_VGA_CR_VERTICAL_BLANK_START] = GRUB_SM712_CR_SHADOW_VGA_VBLANK_START,
+ [GRUB_VGA_CR_VERTICAL_BLANK_END] = GRUB_SM712_CR_SHADOW_VGA_VBLANK_END,
+ [GRUB_VGA_CR_MODE] = 0xff,
+ [GRUB_VGA_CR_LINE_COMPARE] = 0xff
+ };
+ if (addr >= ARRAY_SIZE (mapping) || mapping[addr] == 0xff)
+ return;
+ grub_sm712_cr_write (val, mapping[addr]);
+}
+
+static inline void
+grub_sm712_write_dda_lookup (int idx, grub_uint8_t compare, grub_uint16_t dda,
+ grub_uint8_t vcentering)
+{
+ grub_sm712_cr_write (((compare << SM712_DDA_REG3_COMPARE_SHIFT)
+ & SM712_DDA_REG3_COMPARE_MASK)
+ | ((dda >> SM712_DDA_REG3_DDA_SHIFT)
+ & SM712_DDA_REG3_DDA_MASK),
+ GRUB_SM712_CR_DDA_LOOKUP_REG3_START + 2 * idx);
+ grub_sm712_cr_write (dda & SM712_DDA_REG2_DDA_MASK,
+ GRUB_SM712_CR_DDA_LOOKUP_REG2_START + 2 * idx);
+ grub_sm712_cr_write (vcentering & SM712_DDA_REG2_VCENTER_MASK,
+ GRUB_SM712_CR_DDA_LOOKUP_REG1_START + idx);
+}
+
+static grub_err_t
+grub_video_sm712_setup (unsigned int width, unsigned int height,
+ unsigned int mode_type, unsigned int mode_mask __attribute__ ((unused)))
+{
+ int depth;
+ grub_err_t err;
+ int found = 0;
+ unsigned i;
+
+#ifndef TEST
+ auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__ ((unused)));
+ int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__ ((unused)))
+ {
+ grub_pci_address_t addr;
+ grub_uint32_t class;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
+ class = grub_pci_read (addr);
+
+ if (((class >> 16) & 0xffff) != GRUB_PCI_CLASS_SUBCLASS_VGA
+ || pciid != GRUB_SM712_PCIID)
+ return 0;
+
+ found = 1;
+
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
+ framebuffer.base = grub_pci_read (addr);
+ framebuffer.dev = dev;
+
+ return 1;
+ }
+
+ /* Decode depth from mode_type. If it is zero, then autodetect. */
+ depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ >> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
+
+ if ((width != 1024 && width != 0) || (height != 600 && height != 0)
+ || (depth != 16 && depth != 0))
+ return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+ "Only 1024x600x16 is supported");
+
+ grub_pci_iterate (find_card);
+ if (!found)
+ return grub_error (GRUB_ERR_IO, "Couldn't find graphics card");
+#endif
+ /* Fill mode info details. */
+ framebuffer.mode_info.width = 1024;
+ framebuffer.mode_info.height = 600;
+ framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
+ framebuffer.mode_info.bpp = 16;
+ framebuffer.mode_info.bytes_per_pixel = 2;
+ framebuffer.mode_info.pitch = 1024 * 2;
+ framebuffer.mode_info.number_of_colors = 256;
+ framebuffer.mode_info.red_mask_size = 5;
+ framebuffer.mode_info.red_field_pos = 11;
+ framebuffer.mode_info.green_mask_size = 6;
+ framebuffer.mode_info.green_field_pos = 5;
+ framebuffer.mode_info.blue_mask_size = 5;
+ framebuffer.mode_info.blue_field_pos = 0;
+ framebuffer.mode_info.reserved_mask_size = 0;
+ framebuffer.mode_info.reserved_field_pos = 0;
+#ifndef TEST
+ framebuffer.mode_info.blit_format
+ = grub_video_get_blit_format (&framebuffer.mode_info);
+#endif
+
+#ifndef TEST
+ if (found && framebuffer.base == 0)
+ {
+ grub_pci_address_t addr;
+ /* FIXME: choose address dynamically if needed. */
+ framebuffer.base = 0x04000000;
+
+ addr = grub_pci_make_address (framebuffer.dev, GRUB_PCI_REG_ADDRESS_REG0);
+ grub_pci_write (addr, framebuffer.base);
+
+ /* Set latency. */
+ addr = grub_pci_make_address (framebuffer.dev, GRUB_PCI_REG_CACHELINE);
+ grub_pci_write (addr, 0x8);
+
+ /* Enable address spaces. */
+ addr = grub_pci_make_address (framebuffer.dev, GRUB_PCI_REG_COMMAND);
+ grub_pci_write (addr, 0x7);
+ }
+#endif
+
+ /* We can safely discard volatile attribute. */
+#ifndef TEST
+ framebuffer.ptr
+ = (void *) grub_pci_device_map_range (framebuffer.dev,
+ framebuffer.base,
+ GRUB_SM712_TOTAL_MEMORY_SPACE);
+#endif
+ framebuffer.mapped = 1;
+
+ /* Initialise SM712. */
+#ifndef TEST
+ /* FIXME */
+ grub_vga_sr_write (0x11, 0x18);
+#endif
+
+#ifndef TEST
+ /* Prevent garbage from appearing on the screen. */
+ grub_memset (framebuffer.ptr, 0,
+ framebuffer.mode_info.height * framebuffer.mode_info.pitch);
+#endif
+
+ /* FIXME */
+ grub_sm712_sr_write (0, 0x21);
+ grub_sm712_sr_write (0x7a, 0x62);
+ grub_sm712_sr_write (0x16, 0x6a);
+ grub_sm712_sr_write (0x2, 0x6b);
+ grub_sm712_write_reg (0, GRUB_VGA_IO_PIXEL_MASK);
+ grub_sm712_sr_write (GRUB_VGA_SR_RESET_ASYNC, GRUB_VGA_SR_RESET);
+ grub_sm712_write_reg (GRUB_VGA_IO_MISC_NEGATIVE_VERT_POLARITY
+ | GRUB_VGA_IO_MISC_NEGATIVE_HORIZ_POLARITY
+ | GRUB_VGA_IO_MISC_UPPER_64K
+ | GRUB_VGA_IO_MISC_EXTERNAL_CLOCK_0
+ | GRUB_VGA_IO_MISC_ENABLE_VRAM_ACCESS
+ | GRUB_VGA_IO_MISC_COLOR, GRUB_VGA_IO_MISC_WRITE);
+ grub_sm712_sr_write (GRUB_VGA_SR_RESET_ASYNC | GRUB_VGA_SR_RESET_SYNC,
+ GRUB_VGA_SR_RESET);
+ grub_sm712_sr_write (GRUB_VGA_SR_CLOCKING_MODE_8_DOT_CLOCK,
+ GRUB_VGA_SR_CLOCKING_MODE);
+ grub_sm712_sr_write (GRUB_VGA_ALL_PLANES, GRUB_VGA_SR_MAP_MASK_REGISTER);
+ grub_sm712_sr_write (0, GRUB_VGA_SR_CHAR_MAP_SELECT);
+ grub_sm712_sr_write (GRUB_VGA_SR_MEMORY_MODE_CHAIN4
+ | GRUB_VGA_SR_MEMORY_MODE_SEQUENTIAL_ADDRESSING
+ | GRUB_VGA_SR_MEMORY_MODE_EXTERNAL_VIDEO_MEMORY,
+ GRUB_VGA_SR_MEMORY_MODE);
+
+ for (i = 0; i < ARRAY_SIZE (sm712_sr_seq1); i++)
+ grub_sm712_sr_write (sm712_sr_seq1[i], 0x10 + i);
+
+ for (i = 0; i < ARRAY_SIZE (sm712_sr_seq2); i++)
+ grub_sm712_sr_write (sm712_sr_seq2[i], 0x30 + i);
+
+ /* Undocumented. */
+ grub_sm712_sr_write (0x1a, 0x63);
+ /* Undocumented. */
+ grub_sm712_sr_write (0x1a, 0x64);
+
+ grub_sm712_sr_write (GRUB_SM712_SR_TV_CRT_SRAM | GRUB_SM712_SR_TV_ALT_CLOCK
+ | GRUB_SM712_SR_TV_CLOCK_CKIN_NTSC
+ | GRUB_SM712_SR_TV_HSYNC,
+ GRUB_SM712_SR_TV_CONTROL);
+
+ grub_sm712_sr_write (GRUB_SM712_SR_RAM_LUT_NORMAL, GRUB_SM712_SR_RAM_LUT);
+
+ /* Undocumented. */
+ grub_sm712_sr_write (0x00, 0x67);
+
+ grub_sm712_sr_write (GRUB_SM712_SR_CLOCK_CONTROL1_VCLK_FROM_CCR
+ | GRUB_SM712_SR_CLOCK_CONTROL1_8DOT_CLOCK,
+ GRUB_SM712_SR_CLOCK_CONTROL1);
+ grub_sm712_sr_write (GRUB_SM712_SR_CLOCK_CONTROL2_PROGRAM_VCLOCK,
+ GRUB_SM712_SR_CLOCK_CONTROL2);
+
+ grub_sm712_sr_write (82, GRUB_SM712_SR_VCLK_NUM);
+ grub_sm712_sr_write (137, GRUB_SM712_SR_VCLK_DENOM);
+
+ grub_sm712_sr_write (9, GRUB_SM712_SR_VCLK2_NUM);
+ grub_sm712_sr_write (2, GRUB_SM712_SR_VCLK2_DENOM);
+ /* FIXME */
+ grub_sm712_sr_write (0x04, 0x70);
+ /* FIXME */
+ grub_sm712_sr_write (0x45, 0x71);
+ /* Undocumented */
+ grub_sm712_sr_write (0x30, 0x72);
+ /* Undocumented */
+ grub_sm712_sr_write (0x30, 0x73);
+ /* Undocumented */
+ grub_sm712_sr_write (0x40, 0x74);
+ /* Undocumented */
+ grub_sm712_sr_write (0x20, 0x75);
+
+ grub_sm712_sr_write (0xff, GRUB_SM712_SR_POPUP_ICON_LOW);
+ grub_sm712_sr_write (GRUB_SM712_SR_POPUP_ICON_HIGH_MASK,
+ GRUB_SM712_SR_POPUP_ICON_HIGH);
+ grub_sm712_sr_write (GRUB_SM712_SR_POPUP_ICON_CTRL_DISABLED,
+ GRUB_SM712_SR_POPUP_ICON_CTRL);
+ /* Undocumented */
+ grub_sm712_sr_write (0x0, 0x83);
+
+ grub_sm712_sr_write (8, GRUB_SM712_SR_POPUP_ICON_COLOR1);
+ grub_sm712_sr_write (0, GRUB_SM712_SR_POPUP_ICON_COLOR2);
+ grub_sm712_sr_write (0x42, GRUB_SM712_SR_POPUP_ICON_COLOR3);
+
+ /* Undocumented */
+ grub_sm712_sr_write (0x3a, 0x87);
+
+ /* Why theese coordinates? */
+ grub_sm712_sr_write (0x59, GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_X_LOW);
+ grub_sm712_sr_write (0x02, GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_X_HIGH);
+ grub_sm712_sr_write (0x44, GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_Y_LOW);
+ grub_sm712_sr_write (0x02, GRUB_SM712_SR_HW_CURSOR_UPPER_LEFT_Y_HIGH);
+
+ grub_sm712_sr_write (RGB332_BLACK, GRUB_SM712_SR_HW_CURSOR_FG_COLOR);
+ grub_sm712_sr_write (RGB332_WHITE, GRUB_SM712_SR_HW_CURSOR_BG_COLOR);
+
+ /* Undocumented */
+ grub_sm712_sr_write (0x3a, 0x8e);
+ grub_sm712_sr_write (0x3a, 0x8f);
+
+ grub_sm712_sr_write (0, GRUB_SM712_SR_POPUP_ICON_X_LOW);
+ grub_sm712_sr_write (0, GRUB_SM712_SR_POPUP_ICON_X_HIGH);
+ grub_sm712_sr_write (0, GRUB_SM712_SR_POPUP_ICON_Y_LOW);
+ grub_sm712_sr_write (0, GRUB_SM712_SR_POPUP_ICON_Y_HIGH);
+
+ grub_sm712_sr_write (0, GRUB_SM712_SR_PANEL_HW_VIDEO_CONTROL);
+ grub_sm712_sr_write (0x10, GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_LOW);
+ grub_sm712_sr_write (0x08, GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_HIGH);
+ grub_sm712_sr_write (0x00, GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_MASK_LOW);
+ grub_sm712_sr_write (0x02, GRUB_SM712_SR_PANEL_HW_VIDEO_COLOR_KEY_MASK_HIGH);
+ grub_sm712_sr_write (0xed, GRUB_SM712_SR_PANEL_HW_VIDEO_RED_CONSTANT);
+ grub_sm712_sr_write (0xed, GRUB_SM712_SR_PANEL_HW_VIDEO_GREEN_CONSTANT);
+ grub_sm712_sr_write (0xed, GRUB_SM712_SR_PANEL_HW_VIDEO_BLUE_CONSTANT);
+
+ grub_sm712_sr_write (0x7b, GRUB_SM712_SR_PANEL_HW_VIDEO_TOP_BOUNDARY);
+ grub_sm712_sr_write (0xfb, GRUB_SM712_SR_PANEL_HW_VIDEO_LEFT_BOUNDARY);
+ grub_sm712_sr_write (0xff, GRUB_SM712_SR_PANEL_HW_VIDEO_BOTTOM_BOUNDARY);
+ grub_sm712_sr_write (0xff, GRUB_SM712_SR_PANEL_HW_VIDEO_RIGHT_BOUNDARY);
+ /* Doesn't match documentation? */
+ grub_sm712_sr_write (0x97, GRUB_SM712_SR_PANEL_HW_VIDEO_TOP_LEFT_OVERFLOW_BOUNDARY);
+ grub_sm712_sr_write (0xef, GRUB_SM712_SR_PANEL_HW_VIDEO_BOTTOM_RIGHT_OVERFLOW_BOUNDARY);
+
+ grub_sm712_sr_write (0xbf, GRUB_SM712_SR_PANEL_HW_VIDEO_VERTICAL_STRETCH_FACTOR);
+ grub_sm712_sr_write (0xdf, GRUB_SM712_SR_PANEL_HW_VIDEO_HORIZONTAL_STRETCH_FACTOR);
+
+ grub_sm712_gr_write (GRUB_VGA_NO_PLANES, GRUB_VGA_GR_SET_RESET_PLANE);
+ grub_sm712_gr_write (GRUB_VGA_NO_PLANES, GRUB_VGA_GR_SET_RESET_PLANE_ENABLE);
+ grub_sm712_gr_write (GRUB_VGA_NO_PLANES, GRUB_VGA_GR_COLOR_COMPARE);
+ grub_sm712_gr_write (GRUB_VGA_GR_DATA_ROTATE_NOP, GRUB_VGA_GR_DATA_ROTATE);
+ grub_sm712_gr_write (GRUB_VGA_NO_PLANES, GRUB_VGA_GR_READ_MAP_REGISTER);
+ grub_sm712_gr_write (GRUB_VGA_GR_MODE_256_COLOR, GRUB_VGA_GR_MODE);
+ grub_sm712_gr_write (GRUB_VGA_GR_GR6_MMAP_A0
+ | GRUB_VGA_GR_GR6_GRAPHICS_MODE, GRUB_VGA_GR_GR6);
+ grub_sm712_gr_write (GRUB_VGA_ALL_PLANES, GRUB_VGA_GR_COLOR_COMPARE_DISABLE);
+ grub_sm712_gr_write (0xff, GRUB_VGA_GR_BITMASK);
+
+ /* Write palette mapping. */
+ for (i = 0; i < 16; i++)
+ grub_sm712_write_arx (i, i);
+
+ grub_sm712_write_arx (GRUB_VGA_ARX_MODE_ENABLE_256COLOR
+ | GRUB_VGA_ARX_MODE_GRAPHICS, GRUB_VGA_ARX_MODE);
+ grub_sm712_write_arx (0, GRUB_VGA_ARX_OVERSCAN);
+ grub_sm712_write_arx (GRUB_VGA_ALL_PLANES, GRUB_VGA_ARX_COLOR_PLANE_ENABLE);
+ grub_sm712_write_arx (0, GRUB_VGA_ARX_HORIZONTAL_PANNING);
+ grub_sm712_write_arx (0, GRUB_VGA_ARX_COLOR_SELECT);
+
+ /* FIXME: compute this generically. */
+ {
+ struct grub_video_hw_config config =
+ {
+ .vertical_total = 806,
+ .vertical_blank_start = 0x300,
+ .vertical_blank_end = 0,
+ .vertical_sync_start = 0x303,
+ .vertical_sync_end = 0x9,
+ .line_compare = 0x3ff,
+ .vdisplay_end = 0x300,
+ .pitch = 0x80,
+ .horizontal_total = 164,
+ .horizontal_end = 128,
+ .horizontal_blank_start = 128,
+ .horizontal_blank_end = 0,
+ .horizontal_sync_pulse_start = 133,
+ .horizontal_sync_pulse_end = 22
+ };
+ grub_vga_set_geometry (&config, grub_sm712_cr_write);
+ config.horizontal_sync_pulse_start = 134;
+ config.horizontal_sync_pulse_end = 21;
+ config.vertical_sync_start = 0x301;
+ config.vertical_sync_end = 0x0;
+ config.line_compare = 0x0ff;
+ config.vdisplay_end = 0x258;
+ config.pitch = 0x7f;
+ grub_vga_set_geometry (&config, grub_sm712_cr_shadow_write);
+ }
+
+ grub_sm712_cr_write (GRUB_VGA_CR_BYTE_PANNING_NORMAL,
+ GRUB_VGA_CR_BYTE_PANNING);
+ grub_sm712_cr_write (0, GRUB_VGA_CR_CURSOR_START);
+ grub_sm712_cr_write (0, GRUB_VGA_CR_CURSOR_END);
+ grub_sm712_cr_write (0, GRUB_VGA_CR_START_ADDR_HIGH_REGISTER);
+ grub_sm712_cr_write (0, GRUB_VGA_CR_START_ADDR_LOW_REGISTER);
+ grub_sm712_cr_write (0, GRUB_VGA_CR_CURSOR_ADDR_HIGH);
+ grub_sm712_cr_write (0, GRUB_VGA_CR_CURSOR_ADDR_LOW);
+ grub_sm712_cr_write (GRUB_VGA_CR_UNDERLINE_LOCATION_DWORD_MODE,
+ GRUB_VGA_CR_UNDERLINE_LOCATION);
+ grub_sm712_cr_write (GRUB_VGA_CR_MODE_ADDRESS_WRAP
+ | GRUB_VGA_CR_MODE_BYTE_MODE
+ | GRUB_VGA_CR_MODE_TIMING_ENABLE
+ | GRUB_VGA_CR_MODE_NO_CGA
+ | GRUB_VGA_CR_MODE_NO_HERCULES,
+ GRUB_VGA_CR_MODE);
+
+ grub_sm712_cr_write (0, GRUB_SM712_CR_OVERFLOW_INTERLACE);
+ grub_sm712_cr_write (0, GRUB_SM712_CR_INTERLACE_RETRACE);
+ grub_sm712_cr_write (0, GRUB_SM712_CR_TV_VDISPLAY_START);
+ grub_sm712_cr_write (0, GRUB_SM712_CR_TV_VDISPLAY_END_HIGH);
+ grub_sm712_cr_write (0, GRUB_SM712_CR_TV_VDISPLAY_END_LOW);
+ grub_sm712_cr_write (0x80, GRUB_SM712_CR_DDA_CONTROL_LOW);
+ grub_sm712_cr_write (0x02, GRUB_SM712_CR_DDA_CONTROL_HIGH);
+
+ /* Undocumented */
+ grub_sm712_cr_write (0x20, 0x37);
+
+ grub_sm712_cr_write (0, GRUB_SM712_CR_TV_EQUALIZER);
+ grub_sm712_cr_write (0, GRUB_SM712_CR_TV_SERRATION);
+ grub_sm712_cr_write (0, GRUB_SM712_CR_HSYNC_CTRL);
+
+ /* Undocumented */
+ grub_sm712_cr_write (0x40, 0x3b);
+
+ grub_sm712_cr_write (GRUB_SM712_CR_DEBUG_NONE, GRUB_SM712_CR_DEBUG);
+
+ /* Undocumented */
+ grub_sm712_cr_write (0xff, 0x3d);
+ grub_sm712_cr_write (0x46, 0x3e);
+ grub_sm712_cr_write (0x91, 0x3f);
+
+ for (i = 0; i < ARRAY_SIZE (dda_lookups); i++)
+ grub_sm712_write_dda_lookup (i, dda_lookups[i].compare, dda_lookups[i].dda,
+ dda_lookups[i].vcentering);
+
+ /* Undocumented */
+ grub_sm712_cr_write (0, 0x9c);
+ grub_sm712_cr_write (0, 0x9d);
+ grub_sm712_cr_write (0, 0x9e);
+ grub_sm712_cr_write (0, 0x9f);
+
+ grub_sm712_cr_write (0, GRUB_SM712_CR_VCENTERING_OFFSET);
+ grub_sm712_cr_write (0, GRUB_SM712_CR_HCENTERING_OFFSET);
+
+ grub_sm712_write_reg (GRUB_VGA_IO_MISC_NEGATIVE_HORIZ_POLARITY
+ | GRUB_VGA_IO_MISC_UPPER_64K
+ | GRUB_VGA_IO_MISC_28MHZ
+ | GRUB_VGA_IO_MISC_ENABLE_VRAM_ACCESS
+ | GRUB_VGA_IO_MISC_COLOR,
+ GRUB_VGA_IO_MISC_WRITE);
+
+#ifndef TEST
+ /* Undocumented? */
+ *(volatile grub_uint32_t *) ((char *) framebuffer.ptr + 0x40c00c) = 0;
+ *(volatile grub_uint32_t *) ((char *) framebuffer.ptr + 0x40c040) = 0;
+ *(volatile grub_uint32_t *) ((char *) framebuffer.ptr + 0x40c000) = 0x20000;
+ *(volatile grub_uint32_t *) ((char *) framebuffer.ptr + 0x40c010) = 0x1020100;
+#endif
+
+ (void) grub_sm712_sr_read (0x16);
+
+#ifndef TEST
+ err = grub_video_fb_create_render_target_from_pointer (&framebuffer
+ .render_target,
+ &framebuffer.mode_info,
+ framebuffer.ptr);
+
+ if (err)
+ return err;
+
+ err = grub_video_fb_set_active_render_target (framebuffer.render_target);
+
+ if (err)
+ return err;
+
+ /* Copy default palette to initialize emulated palette. */
+ err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
+ grub_video_fbstd_colors);
+#endif
+ return err;
+}
+
+#ifndef TEST
+
+static grub_err_t
+grub_video_sm712_swap_buffers (void)
+{
+ /* TODO: Implement buffer swapping. */
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_video_sm712_set_active_render_target (struct grub_video_render_target *target)
+{
+ if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
+ target = framebuffer.render_target;
+
+ return grub_video_fb_set_active_render_target (target);
+}
+
+static grub_err_t
+grub_video_sm712_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuf)
+{
+ grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
+ *framebuf = (char *) framebuffer.ptr;
+
+ grub_video_fb_fini ();
+
+ return GRUB_ERR_NONE;
+}
+
+static struct grub_video_adapter grub_video_sm712_adapter =
+ {
+ .name = "SM712 Video Driver",
+ .id = GRUB_VIDEO_DRIVER_SM712,
+
+ .prio = GRUB_VIDEO_ADAPTER_PRIO_NATIVE,
+
+ .init = grub_video_sm712_video_init,
+ .fini = grub_video_sm712_video_fini,
+ .setup = grub_video_sm712_setup,
+ .get_info = grub_video_fb_get_info,
+ .get_info_and_fini = grub_video_sm712_get_info_and_fini,
+ .set_palette = grub_video_fb_set_palette,
+ .get_palette = grub_video_fb_get_palette,
+ .set_viewport = grub_video_fb_set_viewport,
+ .get_viewport = grub_video_fb_get_viewport,
+ .map_color = grub_video_fb_map_color,
+ .map_rgb = grub_video_fb_map_rgb,
+ .map_rgba = grub_video_fb_map_rgba,
+ .unmap_color = grub_video_fb_unmap_color,
+ .fill_rect = grub_video_fb_fill_rect,
+ .blit_bitmap = grub_video_fb_blit_bitmap,
+ .blit_render_target = grub_video_fb_blit_render_target,
+ .scroll = grub_video_fb_scroll,
+ .swap_buffers = grub_video_sm712_swap_buffers,
+ .create_render_target = grub_video_fb_create_render_target,
+ .delete_render_target = grub_video_fb_delete_render_target,
+ .set_active_render_target = grub_video_sm712_set_active_render_target,
+ .get_active_render_target = grub_video_fb_get_active_render_target,
+
+ .next = 0
+ };
+
+GRUB_MOD_INIT(video_sm712)
+{
+ grub_video_register (&grub_video_sm712_adapter);
+}
+
+GRUB_MOD_FINI(video_sm712)
+{
+ grub_video_unregister (&grub_video_sm712_adapter);
+}
+#else
+int
+main ()
+{
+ grub_video_sm712_setup (1024, 600, 0, 0);
+}
+#endif
diff --git a/grub-core/video/sm712_init.c b/grub-core/video/sm712_init.c
new file mode 100644
index 0000000..cdb0b73
--- /dev/null
+++ b/grub-core/video/sm712_init.c
@@ -0,0 +1,14 @@
+/* Following sequence is a capture of sm712 initialisation sequence. */
+static grub_uint8_t sm712_sr_seq1[] =
+ { 0xc8, 0x40, 0x14, 0x60, 0x0, 0xa, 0x92, 0x0,
+ 0x51, 0x00, 0x01, 0x00, 0x0, 0x0, 0x00, 0x0,
+ 0xc4, 0x30, 0x02, 0x00, 0x1 };
+
+static grub_uint8_t sm712_sr_seq2[] =
+ { 0x28, 0x03, 0x24, 0x09, 0xc0, 0x3a, 0x3a, 0x3a,
+ 0x3a, 0x3a, 0x3a, 0x3a, 0x00, 0x00, 0x03, 0xff,
+ 0x00, 0xfc, 0x00, 0x00, 0x20, 0x18, 0x00, 0xfc,
+ 0x20, 0x0c, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3a,
+ 0x06, 0x68, 0xa7, 0x7f, 0x83, 0x24, 0xff, 0x03,
+ 0x00, 0x60, 0x59, 0x3a, 0x3a, 0x00, 0x00, 0x3a,
+ 0x01, 0x80 };
diff --git a/grub-core/video/video.c b/grub-core/video/video.c
new file mode 100644
index 0000000..6a1d473
--- /dev/null
+++ b/grub-core/video/video.c
@@ -0,0 +1,675 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/video.h>
+#include <grub/types.h>
+#include <grub/dl.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+/* The list of video adapters registered to system. */
+grub_video_adapter_t grub_video_adapter_list = NULL;
+
+/* Active video adapter. */
+static grub_video_adapter_t grub_video_adapter_active;
+
+/* Restore back to initial mode (where applicable). */
+grub_err_t
+grub_video_restore (void)
+{
+ if (grub_video_adapter_active)
+ {
+ grub_video_adapter_active->fini ();
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_errno;
+
+ grub_video_adapter_active = 0;
+ }
+ return GRUB_ERR_NONE;
+}
+
+/* Get information about active video mode. */
+grub_err_t
+grub_video_get_info (struct grub_video_mode_info *mode_info)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ /* If mode_info is NULL just report that video adapter is active. */
+ if (! mode_info)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return grub_errno;
+ }
+
+ return grub_video_adapter_active->get_info (mode_info);
+}
+
+grub_video_driver_id_t
+grub_video_get_driver_id (void)
+{
+ if (! grub_video_adapter_active)
+ return GRUB_VIDEO_DRIVER_NONE;
+ return grub_video_adapter_active->id;
+}
+
+/* Get information about active video mode. */
+grub_err_t
+grub_video_get_info_and_fini (struct grub_video_mode_info *mode_info,
+ void **framebuffer)
+{
+ grub_err_t err;
+
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ err = grub_video_adapter_active->get_info_and_fini (mode_info, framebuffer);
+ if (err)
+ return err;
+
+ grub_video_adapter_active = 0;
+ return GRUB_ERR_NONE;
+}
+
+/* Determine optimized blitting formation for specified video mode info. */
+enum grub_video_blit_format
+grub_video_get_blit_format (struct grub_video_mode_info *mode_info)
+{
+ /* Check if we have any known 32 bit modes. */
+ if (mode_info->bpp == 32)
+ {
+ if ((mode_info->red_mask_size == 8)
+ && (mode_info->red_field_pos == 16)
+ && (mode_info->green_mask_size == 8)
+ && (mode_info->green_field_pos == 8)
+ && (mode_info->blue_mask_size == 8)
+ && (mode_info->blue_field_pos == 0))
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_BGRA_8888;
+ }
+ else if ((mode_info->red_mask_size == 8)
+ && (mode_info->red_field_pos == 0)
+ && (mode_info->green_mask_size == 8)
+ && (mode_info->green_field_pos == 8)
+ && (mode_info->blue_mask_size == 8)
+ && (mode_info->blue_field_pos == 16))
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_RGBA_8888;
+ }
+ }
+ /* Check if we have any known 24 bit modes. */
+ else if (mode_info->bpp == 24)
+ {
+ if ((mode_info->red_mask_size == 8)
+ && (mode_info->red_field_pos == 16)
+ && (mode_info->green_mask_size == 8)
+ && (mode_info->green_field_pos == 8)
+ && (mode_info->blue_mask_size == 8)
+ && (mode_info->blue_field_pos == 0))
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_BGR_888;
+ }
+ else if ((mode_info->red_mask_size == 8)
+ && (mode_info->red_field_pos == 0)
+ && (mode_info->green_mask_size == 8)
+ && (mode_info->green_field_pos == 8)
+ && (mode_info->blue_mask_size == 8)
+ && (mode_info->blue_field_pos == 16))
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_RGB_888;
+ }
+ }
+ /* Check if we have any known 16 bit modes. */
+ else if (mode_info->bpp == 16)
+ {
+ if ((mode_info->red_mask_size == 5)
+ && (mode_info->red_field_pos == 11)
+ && (mode_info->green_mask_size == 6)
+ && (mode_info->green_field_pos == 5)
+ && (mode_info->blue_mask_size == 5)
+ && (mode_info->blue_field_pos == 0))
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_BGR_565;
+ }
+ else if ((mode_info->red_mask_size == 5)
+ && (mode_info->red_field_pos == 0)
+ && (mode_info->green_mask_size == 6)
+ && (mode_info->green_field_pos == 5)
+ && (mode_info->blue_mask_size == 5)
+ && (mode_info->blue_field_pos == 11))
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_RGB_565;
+ }
+ }
+ else if (mode_info->bpp == 1)
+ return GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED;
+
+ /* Backup route. Unknown format. */
+
+ /* If there are more than 8 bits per color, assume RGB(A) mode. */
+ if (mode_info->bpp > 8)
+ {
+ if (mode_info->reserved_mask_size > 0)
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_RGBA;
+ }
+ else
+ {
+ return GRUB_VIDEO_BLIT_FORMAT_RGB;
+ }
+ }
+
+ /* Assume as indexcolor mode. */
+ return GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR;
+}
+
+/* Set new indexed color palette entries. */
+grub_err_t
+grub_video_set_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->set_palette (start, count, palette_data);
+}
+
+/* Get indexed color palette entries. */
+grub_err_t
+grub_video_get_palette (unsigned int start, unsigned int count,
+ struct grub_video_palette_data *palette_data)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->get_palette (start, count, palette_data);
+}
+
+/* Set viewport dimensions. */
+grub_err_t
+grub_video_set_viewport (unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->set_viewport (x, y, width, height);
+}
+
+/* Get viewport dimensions. */
+grub_err_t
+grub_video_get_viewport (unsigned int *x, unsigned int *y,
+ unsigned int *width, unsigned int *height)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->get_viewport (x, y, width, height);
+}
+
+/* Map color name to adapter specific color. */
+grub_video_color_t
+grub_video_map_color (grub_uint32_t color_name)
+{
+ if (! grub_video_adapter_active)
+ return 0;
+
+ return grub_video_adapter_active->map_color (color_name);
+}
+
+/* Map RGB value to adapter specific color. */
+grub_video_color_t
+grub_video_map_rgb (grub_uint8_t red, grub_uint8_t green, grub_uint8_t blue)
+{
+ if (! grub_video_adapter_active)
+ return 0;
+
+ return grub_video_adapter_active->map_rgb (red, green, blue);
+}
+
+/* Map RGBA value to adapter specific color. */
+grub_video_color_t
+grub_video_map_rgba (grub_uint8_t red, grub_uint8_t green, grub_uint8_t blue,
+ grub_uint8_t alpha)
+{
+ if (! grub_video_adapter_active)
+ return 0;
+
+ return grub_video_adapter_active->map_rgba (red, green, blue, alpha);
+}
+
+/* Unmap video color back to RGBA components. */
+grub_err_t
+grub_video_unmap_color (grub_video_color_t color, grub_uint8_t *red,
+ grub_uint8_t *green, grub_uint8_t *blue,
+ grub_uint8_t *alpha)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->unmap_color (color,
+ red,
+ green,
+ blue,
+ alpha);
+}
+
+/* Fill rectangle using specified color. */
+grub_err_t
+grub_video_fill_rect (grub_video_color_t color, int x, int y,
+ unsigned int width, unsigned int height)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->fill_rect (color, x, y, width, height);
+}
+
+/* Blit bitmap to screen. */
+grub_err_t
+grub_video_blit_bitmap (struct grub_video_bitmap *bitmap,
+ enum grub_video_blit_operators oper,
+ int x, int y, int offset_x, int offset_y,
+ unsigned int width, unsigned int height)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->blit_bitmap (bitmap, oper, x, y,
+ offset_x, offset_y,
+ width, height);
+}
+
+/* Blit render target to active render target. */
+grub_err_t
+grub_video_blit_render_target (struct grub_video_render_target *target,
+ enum grub_video_blit_operators oper,
+ int x, int y, int offset_x, int offset_y,
+ unsigned int width, unsigned int height)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->blit_render_target (target, oper, x, y,
+ offset_x, offset_y,
+ width, height);
+}
+
+/* Scroll viewport and fill new areas with specified color. */
+grub_err_t
+grub_video_scroll (grub_video_color_t color, int dx, int dy)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->scroll (color, dx, dy);
+}
+
+/* Swap buffers (swap active render target). */
+grub_err_t
+grub_video_swap_buffers (void)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->swap_buffers ();
+}
+
+/* Create new render target. */
+grub_err_t
+grub_video_create_render_target (struct grub_video_render_target **result,
+ unsigned int width, unsigned int height,
+ unsigned int mode_type)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->create_render_target (result,
+ width, height,
+ mode_type);
+}
+
+/* Delete render target. */
+grub_err_t
+grub_video_delete_render_target (struct grub_video_render_target *target)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->delete_render_target (target);
+}
+
+/* Set active render target. */
+grub_err_t
+grub_video_set_active_render_target (struct grub_video_render_target *target)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->set_active_render_target (target);
+}
+
+/* Get active render target. */
+grub_err_t
+grub_video_get_active_render_target (struct grub_video_render_target **target)
+{
+ if (! grub_video_adapter_active)
+ return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
+
+ return grub_video_adapter_active->get_active_render_target (target);
+}
+
+/* Parse <width>x<height>[x<depth>]*/
+static grub_err_t
+parse_modespec (const char *current_mode, int *width, int *height, int *depth)
+{
+ const char *value;
+ const char *param = current_mode;
+
+ *width = *height = *depth = -1;
+
+ if (grub_strcmp (param, "auto") == 0)
+ {
+ *width = *height = 0;
+ return GRUB_ERR_NONE;
+ }
+
+ /* Find width value. */
+ value = param;
+ param = grub_strchr(param, 'x');
+ if (param == NULL)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Invalid mode: %s\n",
+ current_mode);
+
+ param++;
+
+ *width = grub_strtoul (value, 0, 0);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Invalid mode: %s\n",
+ current_mode);
+
+ /* Find height value. */
+ value = param;
+ param = grub_strchr(param, 'x');
+ if (param == NULL)
+ {
+ *height = grub_strtoul (value, 0, 0);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Invalid mode: %s\n",
+ current_mode);
+ }
+ else
+ {
+ /* We have optional color depth value. */
+ param++;
+
+ *height = grub_strtoul (value, 0, 0);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Invalid mode: %s\n",
+ current_mode);
+
+ /* Convert color depth value. */
+ value = param;
+ *depth = grub_strtoul (value, 0, 0);
+ if (grub_errno != GRUB_ERR_NONE)
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "Invalid mode: %s\n",
+ current_mode);
+ }
+ return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_video_set_mode (const char *modestring,
+ unsigned int modemask,
+ unsigned int modevalue)
+{
+ char *tmp;
+ char *next_mode;
+ char *current_mode;
+ char *modevar;
+
+ modevalue &= modemask;
+
+ /* Take copy of env.var. as we don't want to modify that. */
+ modevar = grub_strdup (modestring);
+
+ /* Initialize next mode. */
+ next_mode = modevar;
+
+ if (! modevar)
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY,
+ "couldn't allocate space for local modevar copy");
+
+ if (grub_memcmp (next_mode, "keep", sizeof ("keep")) == 0
+ || grub_memcmp (next_mode, "keep,", sizeof ("keep,") - 1) == 0
+ || grub_memcmp (next_mode, "keep;", sizeof ("keep;") - 1) == 0)
+ {
+ int suitable = 1;
+ grub_err_t err;
+
+ if (grub_video_adapter_active)
+ {
+ struct grub_video_mode_info mode_info;
+ grub_memset (&mode_info, 0, sizeof (mode_info));
+ err = grub_video_get_info (&mode_info);
+ if (err)
+ {
+ suitable = 0;
+ grub_errno = GRUB_ERR_NONE;
+ }
+ if ((mode_info.mode_type & modemask) != modevalue)
+ suitable = 0;
+ }
+ else if (((GRUB_VIDEO_MODE_TYPE_PURE_TEXT & modemask) != 0)
+ && ((GRUB_VIDEO_MODE_TYPE_PURE_TEXT & modevalue) == 0))
+ suitable = 0;
+
+ if (suitable)
+ {
+ grub_free (modevar);
+ return GRUB_ERR_NONE;
+ }
+ next_mode += sizeof ("keep") - 1;
+ if (! *next_mode)
+ {
+ grub_free (modevar);
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "no suitable mode found");
+ }
+
+ /* Skip separator. */
+ next_mode++;
+ }
+
+ /* De-activate last set video adapter. */
+ if (grub_video_adapter_active)
+ {
+ /* Finalize adapter. */
+ grub_video_adapter_active->fini ();
+ if (grub_errno != GRUB_ERR_NONE)
+ grub_errno = GRUB_ERR_NONE;
+
+ /* Mark active adapter as not set. */
+ grub_video_adapter_active = 0;
+ }
+
+ /* Loop until all modes has been tested out. */
+ while (next_mode != NULL)
+ {
+ int width = -1;
+ int height = -1;
+ int depth = -1;
+ grub_err_t err;
+ unsigned int flags = modevalue;
+ unsigned int flagmask = modemask;
+
+ /* Use last next_mode as current mode. */
+ tmp = next_mode;
+
+ /* Save position of next mode and separate modes. */
+ for (; *next_mode; next_mode++)
+ if (*next_mode == ',' || *next_mode == ';')
+ break;
+ if (*next_mode)
+ {
+ *next_mode = 0;
+ next_mode++;
+ }
+ else
+ next_mode = 0;
+
+ /* Skip whitespace. */
+ while (grub_isspace (*tmp))
+ tmp++;
+
+ /* Initialize token holders. */
+ current_mode = tmp;
+
+ /* XXX: we assume that we're in pure text mode if
+ no video mode is initialized. Is it always true? */
+ if (grub_strcmp (current_mode, "text") == 0)
+ {
+ struct grub_video_mode_info mode_info;
+
+ grub_memset (&mode_info, 0, sizeof (mode_info));
+ if (((GRUB_VIDEO_MODE_TYPE_PURE_TEXT & modemask) == 0)
+ || ((GRUB_VIDEO_MODE_TYPE_PURE_TEXT & modevalue) != 0))
+ {
+ /* Valid mode found from adapter, and it has been activated.
+ Specify it as active adapter. */
+ grub_video_adapter_active = NULL;
+
+ /* Free memory. */
+ grub_free (modevar);
+
+ return GRUB_ERR_NONE;
+ }
+ }
+
+ err = parse_modespec (current_mode, &width, &height, &depth);
+ if (err)
+ {
+ /* Free memory before returning. */
+ grub_free (modevar);
+
+ return err;
+ }
+
+ /* Try out video mode. */
+
+ /* If user requested specific depth check if this depth is supported. */
+ if (depth != -1 && (flagmask & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ &&
+ (((flags & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
+ != ((depth << GRUB_VIDEO_MODE_TYPE_DEPTH_POS)
+ & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK))))
+ continue;
+
+ if (depth != -1)
+ {
+ flags |= (depth << GRUB_VIDEO_MODE_TYPE_DEPTH_POS)
+ & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK;
+ flagmask |= GRUB_VIDEO_MODE_TYPE_DEPTH_MASK;
+ }
+
+ /* Try to initialize requested mode. Ignore any errors. */
+ grub_video_adapter_t p;
+
+ /* Loop thru all possible video adapter trying to find requested mode. */
+ for (p = grub_video_adapter_list; p; p = p->next)
+ {
+ struct grub_video_mode_info mode_info;
+
+ grub_memset (&mode_info, 0, sizeof (mode_info));
+
+ /* Try to initialize adapter, if it fails, skip to next adapter. */
+ err = p->init ();
+ if (err != GRUB_ERR_NONE)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ /* Try to initialize video mode. */
+ err = p->setup (width, height, flags, flagmask);
+ if (err != GRUB_ERR_NONE)
+ {
+ p->fini ();
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ err = p->get_info (&mode_info);
+ if (err != GRUB_ERR_NONE)
+ {
+ p->fini ();
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ flags = mode_info.mode_type & ~GRUB_VIDEO_MODE_TYPE_DEPTH_MASK;
+ flags |= (mode_info.bpp << GRUB_VIDEO_MODE_TYPE_DEPTH_POS)
+ & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK;
+
+ /* Check that mode is suitable for upper layer. */
+ if ((flags & GRUB_VIDEO_MODE_TYPE_PURE_TEXT)
+ ? (((GRUB_VIDEO_MODE_TYPE_PURE_TEXT & modemask) != 0)
+ && ((GRUB_VIDEO_MODE_TYPE_PURE_TEXT & modevalue) == 0))
+ : ((flags & modemask) != modevalue))
+ {
+ p->fini ();
+ grub_errno = GRUB_ERR_NONE;
+ continue;
+ }
+
+ /* Valid mode found from adapter, and it has been activated.
+ Specify it as active adapter. */
+ grub_video_adapter_active = p;
+
+ /* Free memory. */
+ grub_free (modevar);
+
+ return GRUB_ERR_NONE;
+ }
+
+ }
+
+ /* Free memory. */
+ grub_free (modevar);
+
+ return grub_error (GRUB_ERR_BAD_ARGUMENT,
+ "no suitable mode found");
+}
+
+/* Initialize Video API module. */
+GRUB_MOD_INIT(video)
+{
+}
+
+/* Finalize Video API module. */
+GRUB_MOD_FINI(video)
+{
+}